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
Adrian Mariano
4eda2c701e
added circle_circle_tangents
2020-05-23 17:25:46 -04:00
Revar Desmera
b1ae85e65c
Bugfix for split_polygons_at_each_z()
2020-05-18 01:49:46 -07:00
Revar Desmera
32e0f26fd8
Added vnf_bend_around_y_axis().
2020-05-14 05:14:23 -07:00
Revar Desmera
196ca2c055
Typo fix in triangle_area()
2020-05-03 19:11:08 -07:00
Revar Desmera
96e17c17e0
Fixed example generation for a few functions in geometry.scad.
2020-04-29 23:01:00 -07:00
Revar Desmera
182688cf02
Implemented solution for issue #159
2020-04-29 22:45:41 -07:00
Revar Desmera
e32735296c
Various bugfixes found by docs regen.
2020-04-26 04:29:21 -07:00
Revar Desmera
1c06298f10
Enhanced find_circle_2tangents()
2020-04-18 18:38:22 -07:00
Revar Desmera
ea20f59c44
Fix collinear() for cases when a==b.
2020-04-02 18:26:46 -07:00
Revar Desmera
975185e262
Bugfix and optimization for find_noncollinear_points(). Optimized points_are_collinear()
2020-04-02 18:15:43 -07:00
Revar Desmera
971c1e795f
Renamed place_copies() to move_copies()
2020-03-24 18:31:22 -07:00
Revar Desmera
1df6dcff2b
Made polygon_area() work with 3D polygons as well.
2020-03-19 14:04:40 -07:00
Revar Desmera
412dd9e260
plane_intersection() bugfix. plane_line_intersection() and polygon_line_intersection() can now detect on-plane intersections.
2020-03-17 01:12:51 -07:00
Revar Desmera
602e850d24
Added points_are_collinear(). Renamed pointslist_is_coplanar() to points_are_coplanar()
2020-03-13 21:48:31 -07:00
Revar Desmera
efa75eaf5a
Added pointslist_is_coplanar(). Added coplanar check to plane_from_pointslist().
2020-03-13 18:45:46 -07:00
Adrian Mariano
ee82a8bb97
bug fix qr factorization, removed echo in plane intersection, fixed
...
bezier_surface so vnf arg is in right order
2020-03-09 21:05:57 -04:00
Revar Desmera
c152d393db
Merge branch 'master' into master
2020-03-07 16:31:21 -08:00
Revar Desmera
47c9560d5f
Corrected docs about the equation of a plane used in plane functions.
2020-03-07 16:08:42 -08:00
Adrian Mariano
cc644c7a77
Added plane intersection and plane_from_normal and fixed docs for
...
plane definition.
2020-03-07 14:22:53 -05:00
Revar Desmera
07bfcd6a57
Renamed normalize() to unit()
2020-03-02 19:30:20 -08:00
Revar Desmera
c6ec9c8820
Moved path functions from geometry.scad to paths.scad
2020-03-01 16:12:51 -08:00
Adrian Mariano
4a3ecfe9ba
Tweaked docs for reindex_polygon
2020-02-29 23:09:16 -05:00
Revar Desmera
5d1865dc77
Merge branch 'master' of github.com:revarbat/BOSL2
2020-02-28 21:45:27 -08:00
Revar Desmera
7e0512e5f9
Bugfix for polygon_line_intersection() for failing to find intersection.
2020-02-28 21:37:16 -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
Adrian Mariano
bfcc45c998
Added plane_line_angle
2020-02-13 18:06:20 -05:00
Revar Desmera
90daf37a53
Added polygon_is_convex()
2020-01-30 21:18:39 -08:00
Revar Desmera
8da60800c9
Consolidated path code into paths.scad
2020-01-30 14:00:10 -08:00
Revar Desmera
a70734cd29
Docs grammar fixes for reindex_polygon()
2019-12-26 21:39:49 -08:00
Revar Desmera
969f17f4c6
Bugfix for polygon_shift_to_closest_point()
2019-12-06 19:14:03 -08:00
Revar Desmera
24de174d6f
Improved centroid() to work with 3D planar polygons.
2019-12-05 14:01:40 -08:00
Revar Desmera
4f0e6392e2
Split regions and boolean geometry out of geometry.scad into regions.scad. Added various ray intersection functions. Added plane intersection functions.
2019-12-02 15:35:03 -08:00
Revar Desmera
6901c02fa9
Fixed align_polygon() example.
2019-11-19 18:19:11 -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
bb92d788ef
Added reverse_polygon() and improved ccw_polygon() and clockwise_polygon()
2019-11-17 18:19:55 -08:00
Revar Desmera
25256f78ad
Fixed consistency of plane_from_pointslist()
2019-11-03 18:45:53 -08:00
Revar Desmera
bca3ef74de
find_noncollinear_points() was, in fact, failing to test for collinearity.
2019-10-30 17:44:03 -07:00
Revar Desmera
faea648e66
Simplified list_rotate() and polygon_shift()
2019-10-30 01:19:34 -07:00
Revar Desmera
54eea4a6d6
Some geometry.scad fixes and assert()s added.
2019-10-29 22:46:00 -07:00
Revar Desmera
50acb3c0b0
Various bugfixes, optimizations, and docs improvements found via regressions.
2019-10-25 15:16:48 -07:00
Revar Desmera
c0a131549f
Added find_circle_tangents()
2019-10-21 18:59:35 -07:00
Revar Desmera
4a2fb2ee56
Split VNF structures out into vnf.scad
2019-10-21 16:44:39 -07:00
Revar Desmera
8d56aab37b
Sped up path_self_intersections() a lot.
2019-09-24 23:32:30 -07:00
Revar Desmera
d4677923ba
Rewrote decompose_path() and assemble_path_fragments()
2019-09-24 03:58:45 -07:00
Revar Desmera
95952ee971
Added split_path_at_self_crossings() and split_path_at_region_crossings()
2019-09-21 01:57:50 -07:00
Revar Desmera
3846a367ee
Added path_self_intersections(), decompose_path(), and fixed inverted t result in _general_line_intersection()
2019-09-19 02:44:28 -07:00
Revar Desmera
a035b9b09a
Merge branch 'master' of github.com:revarbat/BOSL2
2019-08-29 18:01:05 -07:00
Revar Desmera
4334413781
Changed vnf_vertex_array() to take a nested 2D array of 3D points.
2019-08-29 17:58:12 -07:00
Adrian Mariano
d2ccdc331f
Added get_height() and no_children() to common.scad.
...
Changed the epsilon in one of offset's subfunctions from 1e-4 to
1e-6.
Modified rounded_sweep() to take h, l, or height, and to have default
behavior if height is omitted. It also quantizes the path to 1/1024.
Added no_children check to module offset_stroke().
2019-08-28 21:15:41 -04:00
Revar Desmera
da1086b71b
Fix for vnf_add_face()
2019-08-27 03:40:49 -07:00
Revar Desmera
57236506ff
Added VNF functions and modules.
2019-08-27 00:34:09 -07:00
Revar Desmera
edda3bb85d
Added polygon_shift()
2019-08-21 23:52:03 -07:00
Revar Desmera
700acae000
Added polygon_shift_to_closest_point(), clockwise_polygon(), ccw_polygon()
2019-08-20 20:47:29 -07:00
Revar Desmera
eb313d30f5
Added noncollinear_points(), first_noncollinear(), closest_point(), furthest_point() and plane_from_points()
2019-08-19 21:11:19 -07: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
0843bf7362
Fixed typo in find_circle_3points()
2019-08-16 02:06:04 -07:00
Revar Desmera
00b11d130c
Fix for bug #101
2019-08-11 22:15:37 -07:00
Revar Desmera
e8254cec7d
Fix for issue #82
2019-08-08 21:10:41 -07:00
Adrian Mariano
e4431d4940
Fixed bug with check_and_fix_path() naming. Also added examples to rounded_sweep.
2019-07-22 22:40:49 -04:00
Revar Desmera
2427e09dee
Merge branch 'master' of github.com:revarbat/BOSL2
2019-07-18 21:49:11 -07:00
Revar Desmera
52ab40b4f5
Added cleanup_path() and cleanup_region()
2019-07-18 21:48:32 -07:00
Adrian Mariano
3719378f49
Changed make_path_valid to check_and_fix_path
2019-07-18 21:27:57 -04:00
Adrian Mariano
20eae2b5d2
Changed offset() to check polygon orientation when closed==true.
...
Changed rounded_sweep() to work with updated offset().
Added make_path_valid() and use it in rounded_sweep for better error
handling and to support single component regions.
Added divided box example to rounded_sweep.
Updated examples to work with updated offset().
2019-07-18 19:21:08 -04:00
Revar Desmera
cf15742a3b
Fixed processing of regions in offset()
2019-07-17 16:33:08 -07:00
Revar Desmera
d1abaf891d
Added tri_calc()
2019-07-17 01:49:51 -07:00
Revar Desmera
ad59d88ce2
Tweaked offset() description formatting.
2019-07-16 15:18:00 -07:00
Adrian Mariano
e9ae6355e5
added spaces in offset docs
2019-07-16 17:17:32 -04:00
Adrian Mariano
a89c324b4c
Improved examples for offset(), and slight docs tweak.
2019-07-16 16:51:53 -04:00
Revar Desmera
aee7e4d9bd
Merge pull request #74 from adrianVmariano/master
...
Added repeat to turtle. Added centroid to geometry.scad.
2019-07-15 19:11:26 -07:00
Adrian Mariano
a71868431b
Added repeat to turtle. Added centroid to geometry.scad.
2019-07-15 20:14:29 -04:00
Revar Desmera
958786daf6
Added find_circle_3points()
2019-07-15 16:41:01 -07:00
Revar Desmera
81fd73588f
Moved heightfield() to shapes.scad.
2019-07-14 15:10:13 -07:00
Revar Desmera
72ecdbac5a
Fixed references to roundings.scad
2019-07-13 15:57:24 -07:00
Revar Desmera
3eb39d0018
Changed close argument of stroke() to closed.
2019-07-12 13:11:13 -07:00
Revar Desmera
9f0d55f5b3
triangle_area2d() -> triangle_area(). Added polygon_area()
2019-07-10 13:37:23 -07:00
Revar Desmera
e00ce0d81f
Removed right_of_line2d()
2019-07-10 13:22:24 -07:00
Revar Desmera
d60cd9411f
Make is_path() test for more than one point in a path.
2019-07-10 13:12:32 -07:00
Revar Desmera
a008f5aed7
Added heightfield()
2019-07-09 18:46:47 -07:00
Revar Desmera
baae135ab3
Fixes for point_in_region(). Fixed assemble_path_fragments() to detect and shortcut self intersecting path fragment sets.
2019-07-04 23:47:42 -07:00
Revar Desmera
d64b836e8b
Tweaked offset() to work on regions as well as paths.
2019-06-26 18:56:33 -07:00
Revar Desmera
83e6eb24ee
Added offset()
2019-06-25 17:57:03 -07:00
Revar Desmera
1715f36bc1
Updated boolean geometry docs.
2019-06-18 00:46:05 -07:00
Revar Desmera
3655bab0a3
Added exclusive_or() as a module.
2019-06-18 00:09:51 -07:00
Revar Desmera
fea4a6b6ca
Fixed unmerged adjacent polygons in boolean geometry.
2019-06-17 21:44:50 -07:00
Revar Desmera
1ad126f85d
Boolean geometry bugfixes.
2019-06-17 18:55:10 -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
bf6cfd1d65
Rewrote cyl() to allow external chamfers and roundings.
2019-06-12 02:27:42 -07:00
Revar Desmera
78510c0b33
Fixed segment intersection routines for FP rounding issues.
2019-05-29 18:01:00 -07:00
Revar Desmera
34f9677035
Fixed errant array_subindex() references.
2019-05-29 17:22:24 -07:00
Revar Desmera
ff1fa4e505
Added various line intersection functions.
2019-05-28 18:44:41 -07:00
Revar Desmera
f378b70151
Added in range step of 1 to avoid errors.
2019-05-26 22:34:46 -07:00
Revar Desmera
c79e887612
Removed per-file copyright messages in favor of the LICENSE file.
2019-05-03 12:30:20 -07:00
Revar Desmera
aa3af91889
Renamed some geometry.scad functions. Added geometry.scad tests.
2019-05-01 19:28:02 -07:00
Revar Desmera
66b82fc287
Fixed hull_points() for 2D
2019-05-01 00:07:55 -07:00
Revar Desmera
3a71633f7f
Bugfixes for hull.scad
2019-04-30 23:45:05 -07:00
Revar Desmera
06a460f757
Removed usage of upcube()
2019-04-23 15:59:43 -07:00
Revar Desmera
cc36235736
Updated copyright years. Split math.scad up. Enabled attach for lots of shapes. Removed backwards compatability.
2019-04-19 17:02:17 -07:00