Commit graph

88 commits

Author SHA1 Message Date
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
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
80e6cf6316 Minor corrections
Corrections and simplifications of  polygon_area(), centroid() and point_in_polygon.
2021-03-25 01:57:07 +00:00
Garth Minette
5ac55f624c Fix regressions. 2021-03-06 02:45:29 -08: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
Adrian Mariano
a495528398 Fixed bugs in hull_points, added seeds to tests, added seed parm to shuffle() 2020-12-22 18:15:25 -05: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
Garth Minette
eb969bba7e hull, quaternion, and edges regressions. 2020-09-22 20:33:50 -07: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
5462616e1e Revert "In observance of owner's last review"
This reverts commit 99e815f077.
2020-08-20 22:36:50 +01:00
RonaldoCMP
99e815f077 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:36:26 +01:00
RonaldoCMP
5051fe5977 Revert "In observance of owner's last review"
This reverts commit 12963296bb.
2020-08-20 22:22:55 +01:00
RonaldoCMP
12963296bb 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:03:20 +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
b7b276099f commented out test for removed function
added test for find_noncollinear_points where no such points exist
2020-07-28 18:06:57 -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
Adrian Mariano
7eafa691b4 Changed to relative include names 2020-07-21 20:05:21 -04:00
Garth Minette
dde616dad5 unit() now asserts error for zero-length vector unless dflt= arg is given. 2020-07-10 00:03:55 -07:00
Garth Minette
78ecbbd9c5 Added regression for centroid() 2020-07-06 16:15:32 -07:00
Revar Desmera
53c1e25395 Standardize indention on spaces, not tabs. 2020-05-29 19:04:34 -07:00
Revar Desmera
9c2cf53b2d Renamed find_circle_tangents() to circle_point_tangents() 2020-05-23 19:22:44 -07:00
Revar Desmera
7cba0b60f9 Fixed regression test for function namechange. 2020-03-20 13:53:47 -07:00
Revar Desmera
07bfcd6a57 Renamed normalize() to unit() 2020-03-02 19:30:20 -08:00
Revar Desmera
bb92d788ef Added reverse_polygon() and improved ccw_polygon() and clockwise_polygon() 2019-11-17 18:19:55 -08:00
Revar Desmera
38abe860f9 Tweaks to geometry,scad regressions to more correctly report coverage. 2019-11-06 23:53:16 -08:00
Revar Desmera
387232e8dc More geometry.scad regression tests. 2019-10-30 18:41:18 -07:00
Revar Desmera
f19179e232 Added a bunch of regression tests for geometry.scad. 2019-10-29 22:47:38 -07:00
Revar Desmera
e064db6b14 Added several regression tests. 2019-10-25 15:17:55 -07:00
Revar Desmera
b0caccebe7 Regression test fixes. 2019-10-23 22:49:40 -07:00
Revar Desmera
aa3af91889 Renamed some geometry.scad functions. Added geometry.scad tests. 2019-05-01 19:28:02 -07:00