Commit graph

180 commits

Author SHA1 Message Date
Adrian Mariano
6ef2f71255 improved thread_helix docs
fixed bugs in spiral_sweep: wrong sampling rate, left_handed broken
2021-08-28 08:57:09 -04:00
Adrian Mariano
c0bf42836d remove debug echo 2021-08-24 22:21:16 -04:00
Adrian Mariano
8b23eb4951 Fixed facet sampling bugs in spiral_sweep 2021-08-24 22:14:54 -04:00
Adrian Mariano
6da612f7e6 Fixed higbee=0 problem in spiral_sweep, cleaned up thread_helix. Made
spiral sweep force its input to be clockwise to avoid reversed
polyhedra.

Changed thread_angle in thread_helix to flank_angle, which is the
correct term for this angle, and then propagated change in
bottlecap.scad.
2021-08-23 23:03:25 -04:00
Adrian Mariano
ce0b4e9d32 internal: can set bevel to true and get non-garbage result
bevel is always set by thread depth
   acme takes tpi
   square threads are at angle 0
   added generic_threaded_{rod,nut}
   eliminated metric_trapezoidal_*
   cleaned up matrices some in generic_threaded_rod
   threaded_rod can produce spec-true ISO/UTS profile with a triplet input for the diameter.
   Added bevel1 and bevel2 to all modules.  Made default uniformly false for every case instead of
       sometimes true, sometimes false
   Profiles that go over zero are not clipped, and bevels are based on actual profile top, not nominal
   When bevel is given to nuts it bevels the outside of the nut by thread depth
   higbee looks best with quincunx, but it's more expensive.  Select quincunx when higbee is used, min_edge otherwise
   Current code uses difference to remove excess length in the rod.  This gives faster renders at the cost
      of more complex code and green top/bottom surfaces.
   Changed slop to 4 * $slop.  I got good results printing with $slop=0.05 with this setting.
   Don't generate excess threads when starts>1, and don't force threads to be even
2021-08-22 21:53:08 -04:00
Garth Minette
eb4e16fcf1 Fixed path_chamfer_and_rounding() default for closed= 2021-07-10 21:39:56 -07:00
Garth Minette
c43423829b Allow extrude_from_to() to accept 2D paths. 2021-06-26 22:23:29 -07:00
Garth Minette
5a355434ce Tweaks for docs usage lines. 2021-06-26 20:59:33 -07:00
Garth Minette
48c5139099 Fix tab indents. 2021-06-22 17:20:08 -07:00
RonaldoCMP
d18f558c1a Extend convolve and deltas; do minor doc corrections 2021-06-22 01:20:05 +01:00
Garth Minette
44feeab7e6 Bugfix for path_self_intersections() with closed paths. 2021-06-21 00:37:31 -07:00
Garth Minette
fee3cb0d80 Fix for issue #429 2021-06-19 23:21:52 -07:00
Garth Minette
3eb506e78a Rename quaternion functions to not have uppercase names. 2021-06-12 17:17:05 -07:00
Revar Desmera
2f33c673f7
Merge pull request #517 from adrianVmariano/master
project_plane & lift_plane update
2021-04-24 14:12:11 -07:00
Adrian Mariano
493ef62826 normalized project_plane and lift_plane to match other transform
functions.
2021-04-21 22:49:06 -04:00
Garth Minette
bec448d0a1 Cleanup for bottlecaps_adapters.scad 2021-04-16 17:29:01 -07:00
Revar Desmera
5ed3602391
Merge pull request #500 from adrianVmariano/master
Fix face orientation bugs
2021-04-14 15:13:32 -07:00
Adrian Mariano
4a179920cf Speed improvement for vnf_vertex_array by changing deduplicate
testing.  Add "min_edge" style to vnf vertex array.
eliminate _skin_core, replace with vnf_vertex_array, add style option
to all modules/functions.
fix bug in path_normals (not normalized)
2021-04-13 19:27:42 -04:00
RonaldoCMP
376609d52f Cosmetics 2021-04-11 12:34:59 +01:00
Garth Minette
8bd3ef8a74 Removed range(), rangex(). Added count(). 2021-04-07 20:57:45 -07:00
Adrian Mariano
47104bcfe0 remove echo 2021-04-02 20:44:11 -04:00
Adrian Mariano
dd13967049 Cleanup of path_resample, add tests for round_corners, fix
bezier_curve and arc to always return n points for either endpoint
setting.
2021-04-02 16:59:29 -04:00
Garth Minette
0b17bf5930 Brought slice() in line with select() indexing, without wrapping. Replaced a lot of select() and slice() calls with last(), list_head(), and list_tail() calls. 2021-03-30 00:46:59 -07:00
Garth Minette
19f08c253a Fix typo in assemble_a_path_from_fragments() 2021-03-25 00:29:52 -07:00
Garth Minette
d7cb503ffc Replace most trivial uses of slice() with faster list_head() and list_tail() 2021-03-25 00:23:36 -07:00
Garth Minette
84bd2088e5 Optimized cleanup_path() and list_rotate() 2021-03-20 01:37:46 -07:00
Garth Minette
df9d045475 Added subdivide_long_segments(), path_add_jitter(), jittered_poly() 2021-03-17 18:27:10 -07:00
Adrian Mariano
539d612b3c bug fix 2021-03-09 06:39:28 -05:00
Adrian Mariano
7a14909ec0 fix names for path_cut_segs which is broken 2021-03-06 11:10:31 -05:00
Garth Minette
b2001ecadf Removed redundant path_cut_segs() 2021-03-06 02:54:03 -08:00
Revar Desmera
e7e523bcf7
Merge branch 'master' into revarbat_dev 2021-03-06 02:37:00 -08:00
Garth Minette
3682f7b27c Added dashed_stroke(). path_cut() -> path_cut_points(). 2021-03-06 02:26:39 -08:00
Adrian Mariano
f736ef98f7 same_shape bugfix (fails if b==undef)
check for collinear points in round_corners plus other fixes
fix path_cut to work correctly when closed==true, and change it to
fail with error when cut is too long instead of returning undef.
Add path_cut_segs.
2021-03-05 16:35:41 -05:00
Adrian Mariano
1627c3409d Fix path_normals to handle 2d and better error message.
Improve error message for bogus endcaps to stroke() and
running unit() on a zero vector
2021-02-24 16:56:21 -05:00
Garth Minette
6cfbc538fc Re-work to use openscad_docsgen package. 2021-02-19 19:56:43 -08:00
Garth Minette
cc4e4ff402 Enable taper and better higbee in thread_helix() 2021-01-31 15:43:50 -08:00
Garth Minette
48de08f89b Merge branch 'master' into revarbat_dev 2021-01-24 23:28:37 -08:00
Garth Minette
320518194f Various arrays.scad docs updates. Bugfixes. 2021-01-24 23:26:39 -08:00
Adrian Mariano
3790783cdc Rename zip to hstack and associated changes. 2021-01-24 10:29:34 -05:00
Adrian Mariano
536a8715b5 n= option bug fix 2021-01-20 19:33:24 -05:00
Adrian Mariano
61db695210 doc tweak for affine
change path_spread to use affine3d_frame_map and fix bug when using n= option
2021-01-20 19:30:09 -05:00
Garth Minette
b6cfda0537 Remove apply_list(). Renamed affine_frame_map() to affine3d_frame_map() 2021-01-20 13:36:41 -08:00
Garth Minette
f9aa81e178 Improved docs gen script for Returns:, Custom:, Includes:, Topics:, and positional/named args spits. 2021-01-05 01:20:01 -08:00
Garth Minette
6e677498f9 Example fix for path_chamfer_and_rounding() 2020-12-30 00:38:24 -08:00
Garth Minette
0299270f6a Added rounding and chamfering to trapezoid() 2020-12-30 00:34:25 -08:00
Jerome Plut
0df1308e4e fixed modulated_circle() to work as advertised 2020-12-01 23:56:57 +01:00
Garth Minette
0399cd085c Guard various linear_extrude()s for height=0 2020-11-29 20:23:03 -08:00
Garth Minette
e4f2497863 Changes all references to polyline to path. 2020-11-16 17:50:08 -08:00
Garth Minette
38873d8ef9 Fixed a bunch of docs errors with Usage headers. 2020-10-03 20:29:35 -07:00
Garth Minette
16ee49e8b2 Fixed a bunch of undef math warnings with dev snapshot OpenSCAD builds. 2020-10-03 19:50:29 -07:00
Adrian Mariano
e50a577094 Added path_join() function, fixed degenerate case issue in path_cut 2020-09-23 22:00:17 -04:00
Garth Minette
dba5aab918 Implement Issue #2. Added diameter alternates for most radius options. 2020-08-26 20:39:45 -07:00
RonaldoCMP
0dc8bf6c8f Review is_path and extend the scope of simplify_path and simplify_pat_indexed
- introducing is_matrix in is_path makes it more efficient.
- simplify is_path and simplify_path_indexed is now able to deal with path of any dimension.
2020-08-11 15:15:49 +01:00
Garth Minette
b5d465cf1e docs_gen.py now shows more docs errors. 2020-07-27 15:15:34 -07:00
Garth Minette
feba482396 Optimizations for is_vector(), is_matrix(). Added is_finite(). 2020-07-06 18:28:35 -07:00
Garth Minette
62b54e4ef3 Fixed typo in subdivide_path() docs. 2020-06-24 23:32:59 -07:00
Adrian Mariano
66ec3ec6c0 Added refine option to subdivide_path 2020-06-20 12:49:13 -04:00
Adrian Mariano
a5753d7953 Added non-uniform sampling to deriv and uniform option to
path_tangents, and path_segment_lengths.
2020-06-13 22:35:22 -04:00
Revar Desmera
53c1e25395 Standardize indention on spaces, not tabs. 2020-05-29 19:04:34 -07:00
Adrian Mariano
3b19c7dac0 Added resample_path 2020-05-15 17:28:54 -04:00
Revar Desmera
2834e8bc56 Add example image fixes for paths.scad 2020-04-26 01:16:20 -07:00
Revar Desmera
ef5d5a15be Bugfix for spiral_sweep(). polyline needed to be converted to 3D. 2020-04-19 14:17:37 -07:00
Revar Desmera
0524194391 Optimizations for decompose_path() 2020-04-01 01:36:48 -07:00
Revar Desmera
5769ef1036 Removed BOSL2/ from includes. 2020-03-28 20:50:04 -07:00
Revar Desmera
b0b436eb63 Renamed spread() to line_of(). Renamed [xyz]spread() to [xyz]copies() 2020-03-24 19:11:05 -07:00
Revar Desmera
971c1e795f Renamed place_copies() to move_copies() 2020-03-24 18:31:22 -07:00
Revar Desmera
265db9fe5d Removed affine2d_apply() and affine3d_apply() 2020-03-15 11:50:41 -07:00
Adrian Mariano
b1bd81e26f fixed bug in is_path() 2020-03-13 20:55:17 -04:00
Revar Desmera
2cf0ce47d9 Minimized area of subpaths assembled during boolean geometry. 2020-03-11 22:14:16 -07:00
Revar Desmera
95e97a81ad Fixed errors in ruler(). Moved trace_polyline() to debug.scad. 2020-03-09 14:21:11 -07:00
Adrian Mariano
fcbeadc363 renamed replist to repeat
fixed normalization issue in path_to_bezier
2020-03-04 23:22:39 -05:00
Adrian Mariano
51af394c24 Added force_list, path_to_bezier, smooth_path, associate_vertices,
improved skin and sweep error handling.  Allow path_sweep to take a 2d
path.
2020-03-04 20:24:00 -05:00
Revar Desmera
b157b8de8d
Merge pull request #130 from adrianVmariano/master
added is_consistent, added error check to sum(), clarified docs to is_path, and added fast versions of path2d, path3d and path4d.
2020-03-02 21:25:54 -08:00
Revar Desmera
07bfcd6a57 Renamed normalize() to unit() 2020-03-02 19:30:20 -08:00
Adrian Mariano
243dd7723e added is_consistent, added error check to sum(), clarified docs to
is_path, and added fast versions of path2d, path3d and path4d.
2020-03-02 21:39:57 -05:00
Revar Desmera
af0e285781 Added is_list_of(). Improved is_path() and is_vector() tests. 2020-03-02 13:47:43 -08:00
Revar Desmera
c6ec9c8820 Moved path functions from geometry.scad to paths.scad 2020-03-01 16:12:51 -08:00
Revar Desmera
6651e1be42 Renamed orient_and_anchor() to attachable() and refactored arguments and internals. 2020-02-29 13:16:15 -08:00
Adrian Mariano
f8fc8cb544 Adds sweep and new version of path_sweep to skin.scad, which probably
needs a name change.  Adds apply(), apply_list() and
affine_frame_map() to affine.scad.  Adds derivative calcluation to
math.scad.  Adds path_tangent, path_normal, path_curvature and
path_torsion functions.  Adds path_length_fraction().
Fixed bug in reindex_polygon where it randomly reverses a 3d path (due
to clockwise check that is bogus in 3d) and put a check in
polygon_is_clockwise to trap this case.
2020-02-27 17:32:03 -05:00
Revar Desmera
7a92ffdbaf Reorganized functions in paths.scad 2020-01-31 16:37:27 -08:00
Revar Desmera
8da60800c9 Consolidated path code into paths.scad 2020-01-30 14:00:10 -08:00
Revar Desmera
cee46b1721 Added path_pos_from_start(), path_pos_from_end(), path_trim_start(), path_trim_end() 2020-01-28 19:13:56 -08:00
Revar Desmera
0acf0c829c Added closed= to trace_polyline() 2019-12-26 21:40:47 -08:00
Revar Desmera
b0b4e026a8 Fixed missing docs for method= arg of subdivide_path() 2019-12-06 19:16:31 -08:00
Revar Desmera
7cef1f81af Tweak subdivide_path() example images. 2019-11-19 18:11:50 -08:00
Revar Desmera
8f63ce43ad Fixed some docs formatting errors. 2019-11-19 18:03:47 -08:00
Adrian Mariano
4ea33f9bf3 Added subdivide_paths, reindex_polygon and align_polygon. 2019-11-19 17:42:11 -05:00
Revar Desmera
066bb190f9 Added quaternion.scad regressions and bugfixes. Added function variant of Qrot() 2019-11-11 19:09:46 -08:00
Revar Desmera
659584b6ea Added segment_closest_point(), line_closest_point(), and path_closest_point() 2019-08-16 21:22:41 -07:00
Revar Desmera
65b78f90ae mat3_to_mat4() -> affine2d_to_3d() and various trailing space and formatting issues. 2019-08-09 13:07:18 -07:00
Adrian Mariano
7855cf98c0 Tweaked pentagram example for turtle()
path_cut had a bug when invoked with a single distance
_bezcorner would fail if $fn wasn't set and $fs was too large
added offset_stroke()
2019-08-01 16:36:53 -04:00
Revar Desmera
e2d286bbf1 Fixed formatting error in docs for path_cut() 2019-07-12 13:21:23 -07:00
Revar Desmera
3eb39d0018 Changed close argument of stroke() to closed. 2019-07-12 13:11:13 -07:00
Adrian Mariano
b8526998c7 Added path_spread() and path_cut() 2019-07-01 19:25:00 -04:00
Revar Desmera
2f6671e56d Long overdue path and bezier function and module name cleanups. 2019-06-24 00:32:13 -07:00
Revar Desmera
2886cd907b Made trace_polyline() not have horrible joints. 2019-06-21 17:38:14 -07:00
Revar Desmera
88314af127 Moved some paths functions to geometry.scad 2019-06-17 00:10:01 -07:00
Revar Desmera
f585b1fecd Added regions and compound boolean 2d geometry. 2019-06-16 23:57:05 -07:00
Revar Desmera
ac9ef3b9e4 Docs tweaks 2019-05-26 23:56:41 -07:00
Revar Desmera
09f0351d22 Removed references to path2d_regular_ngon() 2019-05-26 23:43:15 -07:00