Commit graph

249 commits

Author SHA1 Message Date
Adrian Mariano
2f895cb8d1 hiding some infrastructure, added is_path_simple() 2021-09-22 14:59:18 -04:00
Adrian Mariano
3c6e9804a8 phillips_drive bugfix:
wing angle corrected from ~70 deg to 92 deg
   adjusted cutouts so length "b" in the spec is correct
      (this causes the cutout to not align with the end so it
       doesn't look as pretty, but the spec wins, right?)
   Changed construction method to avoid z-fighting which gave
       rise to failed render

doc fixes and shifting in paths.scad
decompose_path -> polygon_parts
2021-09-21 19:19:02 -04:00
Adrian Mariano
935a113fcf Examples fix
merge primitives stuff into shapes*.scad
move text commands to shapes3d.scad
rename common.scad
2021-09-16 21:50:12 -04:00
Adrian Mariano
856f54df32 removed old triangulation.scad
other file name changes
2021-09-15 23:12:51 -04:00
Adrian Mariano
6e61a6567f remove echos 2021-09-15 22:11:30 -04:00
Adrian Mariano
d957f556d6 bug fixes 2021-09-15 20:03:15 -04:00
Adrian Mariano
d78eb5213e Add "is" to geometry.scad predicates 2021-09-15 19:01:34 -04:00
Adrian Mariano
ea7b947bcb fix doc error 2021-09-15 18:27:01 -04:00
Adrian Mariano
33ca0d4a69 Resectioned distributors and vnf.
Error msg fix in shapes2d
section tweak in transforms
fixed polygon_line_intersection
2021-09-15 16:30:04 -04:00
Adrian Mariano
4f8ebb2e80 more error messages for star()
improve speed and flexibility of apply()
fix triangulation bug
add support for single point 2d solutions in polygon_line_intersection
2021-09-14 20:10:55 -04:00
Adrian Mariano
2ea90b7467 add fix for duplicate points in polygon_triangulation 2021-09-13 22:23:20 -04:00
Adrian Mariano
5a4d9554df err message tweak in star()
rearranged polygon_line_intersection to handle 2d and fixed
but where it didn't test polygon membership correctly.  Also
there was a bug with use of the bounded argument.
Added Ronaldo's triangulation.
2021-09-13 22:09:51 -04:00
Adrian Mariano
06c5912f02 doc tweaks
speedup tweak for _general_line_intersection
restore older faster is_polygon_clockwise
bugfix polygon_normal
2021-09-12 13:14:40 -04:00
Adrian Mariano
0388119cb4 doc tweak 2021-09-11 23:13:00 -04:00
Adrian Mariano
47f0c88c4a added example and explantion to point_in_polygon 2021-09-11 23:11:18 -04:00
Adrian Mariano
2494de9368 reordering and moving for improved docs
removed xxrot and xxflip
2021-09-11 18:48:23 -04:00
Adrian Mariano
60dbf8c73e Fix bug where polygon_normal and plane_from_polygon sometimes give a
wrong-pointing normal.
Rename project_onto_plane to plane_closest_point for consistency with
line_closest_point.  (Also this distinguishes it better from
project_plane.
Other misc doc tweaks
2021-09-11 16:42:40 -04:00
Garth Minette
444fc57267 Moved trig functions to trigonometry.scad 2021-09-11 02:29:07 -07:00
Adrian Mariano
2a2458577b fix tests, rename in_front_of_plane to above_plane 2021-09-10 18:16:42 -04:00
Adrian Mariano
566d9b4ece Remove triangle_area (because polygon_area) 2021-09-10 18:02:56 -04:00
Adrian Mariano
14ae1795bb fix permutation docs
consolidate "line/segment/ray" functions to just "line" with bounded option
add RAY, LINE and SEGMENT constants
2021-09-09 18:32:58 -04:00
RonaldoCMP
662d2c66f0 Doc and formating tweaks, minor code bugs/changes 2021-07-02 11:30:13 +01:00
Garth Minette
5a355434ce Tweaks for docs usage lines. 2021-06-26 20:59:33 -07:00
RonaldoCMP
fee433f654 Tweaks to deal with some coner case 2021-06-25 16:32:28 +01:00
RonaldoCMP
83f7ec499e Better codes for _closest_s 2021-06-25 14:43:38 +01:00
RonaldoCMP
e63c1680a6 Better cides for _closest_s 2021-06-25 14:40:03 +01:00
RonaldoCMP
a6d35e46e5 Merge branch 'master' of https://github.com/RonaldoCMP/BOSL2 2021-06-23 16:31:40 +01:00
RonaldoCMP
dcae838b82 Minor tweaks 2021-06-23 16:24:59 +01:00
RonaldoCMP
d1f0bb00cf
Merge branch 'master' into master 2021-06-23 15:40:00 +01:00
RonaldoCMP
d90e22e4ca Doc review 2021-06-23 15:34:46 +01:00
RonaldoCMP
a429b91f4c Doc reviews 2021-06-23 15:28:08 +01:00
Garth Minette
48c5139099 Fix tab indents. 2021-06-22 17:20:08 -07:00
RonaldoCMP
9c2e4c23ac introduce convex collision and distance 2021-06-21 20:19:07 +01:00
RonaldoCMP
c010626bc9 Merge branch 'master' of https://github.com/RonaldoCMP/BOSL2 2021-06-21 20:15:00 +01:00
RonaldoCMP
4d09b78771
minor doc correction 2021-06-21 19:57:28 +01:00
RonaldoCMP
ea26679b92 Revert "Introduces convex collision and distance"
This reverts commit eccb006f85.
2021-06-21 19:51:26 +01:00
RonaldoCMP
eccb006f85 Introduces convex collision and distance 2021-06-21 19:08:13 +01:00
RonaldoCMP
3a857d89ec Revert "convex collision and distance"
This reverts commit 319ef14e6c.
2021-06-21 18:43:51 +01:00
RonaldoCMP
83e9bfb2fa
Merge branch 'master' into master 2021-06-21 18:37:03 +01:00
RonaldoCMP
319ef14e6c convex collision and distance 2021-06-21 18:25:35 +01:00
Garth Minette
5ee224f2d3 Added point_segment_distance(), segment_distance(). Renamed distance_from_line() -> point_line_distance(). Renamed distance_from_plane() -> point_plane_distance() 2021-06-10 15:49:44 -07:00
Adrian Mariano
493ef62826 normalized project_plane and lift_plane to match other transform
functions.
2021-04-21 22:49:06 -04:00
Revar Desmera
0718bcb9be
Merge pull request #496 from adrianVmariano/master
vnf_tri_array & bezier_patch_degenerate
2021-04-12 00:38:44 -07:00
Adrian Mariano
d4d5794ef2 fixed sum to handle larger input
added all_equal
added vnf_tri_array as public
added bezier_patch_degenerate as public
2021-04-11 22:29:25 -04:00
RonaldoCMP
41616872fe Correction in is_convex_polygon 2021-04-11 23:45:21 +01:00
RonaldoCMP
dab6407b0f Minor tweak 2021-04-11 13:01:06 +01:00
RonaldoCMP
80feb93c98 Change undef to [] as return of polygon functions 2021-04-11 12:32:49 +01:00
RonaldoCMP
160e3f3edd Correction of polygon_area and a better polygon_normal 2021-04-11 11:35:38 +01:00
RonaldoCMP
5c6181d4d4 Correction of some coplanarity tests and reorganization 2021-04-11 09:02:08 +01:00
RonaldoCMP
2dcbfeee11 Review of geometry.scad for speed 2021-04-10 21:07:23 +01:00
RonaldoCMP
cdb68ad977 Revert "Review of geometry.scad for speed"
This reverts commit 49a3a166eb.
2021-04-10 20:14:40 +01:00
RonaldoCMP
49a3a166eb Review of geometry.scad for speed 2021-04-10 20:09:03 +01:00
RonaldoCMP
99e40a5679 Test convexity of 3d polygons 2021-04-07 07:13:03 +01:00
Garth Minette
a8a34e77e0 Fixed docs errors and regressions issue. 2021-04-06 19:25:40 -07:00
Garth Minette
698268c8c7 Resolved conflicts with master. 2021-04-06 19:18:57 -07:00
RonaldoCMP
8c0e389ec4 Revert "correction of centroid"
This reverts commit d4c7fab7ed.
2021-04-05 16:00:07 +01:00
RonaldoCMP
407c36a8ae Revert "correction of centroid"
This reverts commit 575db80056.
2021-04-05 15:59:43 +01:00
RonaldoCMP
575db80056 correction of centroid 2021-03-30 00:25:29 +01:00
RonaldoCMP
d4c7fab7ed correction of centroid 2021-03-29 12:04:45 +01:00
RonaldoCMP
11cb12b0d6 Revert "teste2"
This reverts commit 46b0f03af3.
2021-03-28 17:09:07 +01:00
RonaldoCMP
46b0f03af3 teste2 2021-03-28 17:06:00 +01:00
RonaldoCMP
ba32198d68
Merge branch 'master' into master 2021-03-25 13:40:09 +00:00
RonaldoCMP
cdfc267ac7 Fixes and improvements 2021-03-25 11:51:10 +00:00
RonaldoCMP
da7f9a2412 Revert "Minor corrections"
This reverts commit 80e6cf6316.
2021-03-25 08:36:57 +00:00
RonaldoCMP
097c18b804 Revert "Minor edition"
This reverts commit f54be54379.
2021-03-25 08:36:43 +00:00
RonaldoCMP
f54be54379 Minor edition 2021-03-25 02:18:33 +00:00
RonaldoCMP
80e6cf6316 Minor corrections
Corrections and simplifications of  polygon_area(), centroid() and point_in_polygon.
2021-03-25 01:57:07 +00:00
Garth Minette
3682f7b27c Added dashed_stroke(). path_cut() -> path_cut_points(). 2021-03-06 02:26:39 -08:00
Garth Minette
6cfbc538fc Re-work to use openscad_docsgen package. 2021-02-19 19:56:43 -08:00
Revar Desmera
4c7ee14cee
Merge pull request #411 from adrianVmariano/master 2021-02-02 15:47:06 -08:00
Adrian Mariano
fbcf8b02b7 doc fix 2021-02-02 18:00:07 -05:00
Adrian Mariano
592fd34986 Doc tweak for modular hose. Add is_bool_list to common.scad. Add
line circle intersection and line bezier intersection.
2021-02-02 17:49:44 -05:00
Martin Čížek
ba32041b53 Make circle_point_tangents() behavior consistent for points on the circle. Fix #408 2021-02-02 19:18:43 +01:00
Garth Minette
320518194f Various arrays.scad docs updates. Bugfixes. 2021-01-24 23:26:39 -08:00
Garth Minette
3b4f3d3f0e Examples fixes for joiners, hingesnaps, projection_on_plane() 2021-01-05 22:07:40 -08:00
Garth Minette
697368b3a3 Fix projection_on_plane() example. 2021-01-05 17:53:03 -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
35e6fdb1aa Various fixes to get example generation working. 2020-12-14 18:28:26 -08:00
Garth Minette
d43b4667d5 Fix for #241: split_polygons_at_each_y produces non simple polygons 2020-11-29 22:39:42 -08:00
Garth Minette
775e0c4c48 Fixed bevel_gear() so that complementary gears will mesh. 2020-10-13 22:32:20 -07:00
Garth Minette
29ed649740 Added angle= and shift= to trapezoid() 2020-10-07 22:50:05 -07: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
Garth Minette
f193871a34 Implement fix for issue #174. 2020-09-25 00:01:45 -07:00
Garth Minette
4f88775ef9 Changed circle_point_tangents() to return just a list of 2D tangent points. 2020-09-24 17:09:06 -07:00
RonaldoCMP
a00b738a75 Correct docs 2020-09-10 00:27:56 +01:00
RonaldoCMP
28cbdb4d89 removing tabs 2020-09-09 09:51:59 +01:00
RonaldoCMP
75e5cd4979 Solving bugs in functions on planes 2020-09-09 09:37:31 +01:00
Garth Minette
e1b0985afc Fixed broken line-plane intersections. Attachment enhanced vnf_polyhedron(). 2020-08-28 19:07:10 -07:00
RonaldoCMP
da5546cbc2 In observance of owner's last review
Eliminate double definitions.
Eliminate unneeded comments.

In common.scad redefine num_defined(), all_defined() and get_radius().

In geometry.scad:
- change name _dist to _dist2line
- simplify _point_above_below_segment() and triangle_area()
- change some arg names for uniformity (path>>poly)
- change point_in_polygon() to accept the Even-odd rule as alternative
- and other minor edits

Update tests_geometry to the new funcionalities.
2020-08-20 22:42:24 +01:00
RonaldoCMP
29672105ed
Update geometry.scad
Removed all double definitions
2020-08-18 23:27:38 +01:00
RonaldoCMP
2efd0ca5d0 Function name change
plane_projection >> projection_on_plane
2020-08-16 23:54:00 +01:00
RonaldoCMP
3bf22cd236 In-depth review
Besides param validation and some formating, changes:

A. add new functions:

1. _valid_line()
2. _valid_plane()
3. line_from_points()
4. projection_on_plane()
5. points_on_plane()

B. rename/redefine/remove functions:

1. points_are_coplanar() >> coplanar()
2. collinear() works with list of points as well as coplanar()
3. find_noncollinear_points >> noncollinear_triple
4. collinear_indexed() removed
5. polygon_is_convex() >> is_convex_polygon()

C. recode/optimize the codes of the functions:

1. point_on_segment2d()
2. point_left_of_line2d()
3. distance_from_line()
4. line_closest_point()
5. plane_from_polygon()
6. _general_plane_line_intersection()
7. polygon_line_intersection()
8. find_circle_2tangents()
9. find_circle_3points()
10. polygon_area()
11. is_convex_polygon()
12. reindex_polygon()
13. centroid()
14. polygon_is_clockwise()
15. clockwise_polygon()
16. ccw_polygon()

The function name changes were updated in:
test_geometry.scad
hull.scad
rounding.scad
vnf.scad

Regression tests for the new external functions were included in test_geometry.scad.

Unsolved questions:
1. why sorting the indices in plane_from_points and polygon_line_intersection?
2. aren't redundant plane_from_polygon() and plane_from_points()?
2020-08-16 23:33:11 +01:00
Adrian Mariano
e222d26136 Removed unneeded functions 2020-07-28 17:55:56 -04:00
Adrian Mariano
3c9e304675 fix find_noncollinear_points 2020-07-28 17:54:45 -04:00
Adrian Mariano
1dda5b088c Fixed docs for path2d.
Modified pointlist_bounds to give output that matches input
dimension and to work on any input dimension.  Also made it ~20 times faster.
2020-07-24 16:36:57 -04:00
Garth Minette
ae1a6d8d61 Rewrote line_closest_point() and segment_closest_point() to support 3D. Added ray_closest_point(). 2020-07-19 23:07:49 -07:00
Revar Desmera
53c1e25395 Standardize indention on spaces, not tabs. 2020-05-29 19:04:34 -07:00
Revar Desmera
f3127d96a2 Formatting tweaks. 2020-05-24 01:03:37 -07:00
Revar Desmera
9c2cf53b2d Renamed find_circle_tangents() to circle_point_tangents() 2020-05-23 19:22:44 -07:00