Commit graph

1311 commits

Author SHA1 Message Date
Garth Minette
90e02ad7a4 Fix for #243. Added better docs and asserts to rot() 2020-08-26 15:59:35 -07:00
Revar Desmera
de946381ae
Merge pull request #244 from revarbat/revarbat_dev
Revarbat dev
2020-08-25 22:55:41 -07:00
Garth Minette
9f02750519 Merge branch 'master' of github.com:revarbat/BOSL2 into revarbat_dev 2020-08-25 22:54:00 -07:00
Revar Desmera
248921df8d
Merge pull request #242 from kelvie/diff-tag-fix
Fix diff/intersect when some tags are hidden
2020-08-25 22:50:48 -07:00
Revar Desmera
32c30c448e
Merge pull request #234 from RonaldoCMP/master
Geometry full review and minor edits
2020-08-25 22:38:51 -07:00
RonaldoCMP
fb8d49f8cc Restore updating calls to geometry 2020-08-25 12:28:15 +01:00
Kelvie Wong
e5a0a3cad7 Fix diff/intersect when some tags are hidden
When the first operand is hidden, some strange things happen, so this guards
against that.

Example:

    include <BOSL2/std.scad>

    part_to_show = "A"; // [A,B,C]
    part_to_hide = "B"; // [A,B,C]

    module my_part() {
        tags("A") left(10) cuboid(10);
        tags("B") diff("neg", "B") right(10) {
            cuboid(10);
            cyl(d=10, h=10, $tags="neg");
        }
        tags("C") fwd(10) cuboid(10);
    }

    show(part_to_show) hide(part_to_hide) my_part();

Tag "B" here acts very strangely when it is supposed to be hidden, and never
hides completely.
2020-08-22 16:19:39 -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
9611bc54ec Merge branch 'master' of https://github.com/RonaldoCMP/BOSL2 2020-08-20 22:41:00 +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
Garth Minette
5e981fb4a7 Added tests for path3d() and path4d() with fille= 2020-08-18 19:25:05 -07:00
Revar Desmera
92d9c49b90
Merge pull request #240 from revarbat/revarbat_dev
Added excess= argument to most mask modules.
2020-08-18 19:11:41 -07:00
Garth Minette
ee86544a81 Added excess= argument to most mask modules. 2020-08-18 19:09:26 -07:00
RonaldoCMP
a10a74a265
Update geometry.scad
Removed all double definitions
2020-08-18 23:31:29 +01:00
RonaldoCMP
29672105ed
Update geometry.scad
Removed all double definitions
2020-08-18 23:27:38 +01:00
RonaldoCMP
26ff57491e
Merge branch 'master' into master 2020-08-18 23:10:57 +01:00
RonaldoCMP
a290741b17 Merge remote-tracking branch 'upstream/master' 2020-08-18 11:06:36 +01:00
RonaldoCMP
5fab080f8e Revert "Revert "Merge remote-tracking branch 'upstream/revarbat_dev'""
This reverts commit f4a8138b37.
2020-08-18 11:04:56 +01:00
RonaldoCMP
f4a8138b37 Revert "Merge remote-tracking branch 'upstream/revarbat_dev'"
This reverts commit ee80b1d08f, reversing
changes made to 2b12659d00.
2020-08-18 11:01:42 +01:00
RonaldoCMP
ee80b1d08f Merge remote-tracking branch 'upstream/revarbat_dev' 2020-08-18 10:59:53 +01:00
Revar Desmera
005219f60d
Merge pull request #238 from adrianVmariano/master
Rabbit clips
2020-08-17 18:15:28 -07:00
Revar Desmera
d071537d82
Merge pull request #239 from revarbat/revarbat_dev
Fixed VNF attachment normal vector.
2020-08-17 18:14:11 -07:00
Garth Minette
7daa16f238 Fixed VNF attachment normal vector. 2020-08-17 18:11:49 -07:00
Adrian Mariano
9f9c128b6c Added rabbit clips. 2020-08-17 20:44:42 -04:00
Revar Desmera
da2a0bbd7b
Merge pull request #237 from adrianVmariano/master
Added attachment support to all modules, and bug fixed rounded_prism (problem introduced by error checking in det2), and fixed broken example in rounding.
2020-08-17 15:58:51 -07:00
Adrian Mariano
2ff93f34cd Added attachment support to all modules, and bug fixed rounded_prism
(problem introduced by error checking in det2), and fixed broken
example in rounding.
2020-08-17 18:43:58 -04:00
Revar Desmera
2e2465ca4e
Merge pull request #236 from revarbat/revarbat_dev
Revarbat dev
2020-08-16 23:14:45 -07:00
Garth Minette
fe4e46a9cc Merge branch 'master' of github.com:revarbat/BOSL2 into revarbat_dev 2020-08-16 23:10:50 -07:00
Garth Minette
25841bda73 Fixed attachable() anchors for vnf's with extent=false. 2020-08-16 23:10:43 -07:00
Garth Minette
c465a5b746 cuboid() with negative chamfer had mispositioned anti-chamfers. 2020-08-16 23:09:59 -07:00
RonaldoCMP
2b12659d00 refine arg validation of get_radius
It is assumed that args r and d in get_radius can be a finite number or a vector with dimension 1 or 2.
2020-08-17 00:18:33 +01:00
RonaldoCMP
2efd0ca5d0 Function name change
plane_projection >> projection_on_plane
2020-08-16 23:54:00 +01:00
RonaldoCMP
288f203bb6 Revert "Minor edits"
This reverts commit bf44fe5b03.
2020-08-16 23:42:59 +01:00
RonaldoCMP
bf44fe5b03 Minor edits 2020-08-16 23:39:11 +01:00
RonaldoCMP
143ba06467 Minor edits 2020-08-16 23:38:17 +01:00
RonaldoCMP
b4e26c035c Changes to noncollinear_triple 2020-08-16 23:34:31 +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
Revar Desmera
a7ac480e28
Merge pull request #233 from RonaldoCMP/master
Minor changes in arrays.scad and math.scad
2020-08-11 13:08:32 -07:00
RonaldoCMP
4019084904 Merge branch 'master' of https://github.com/RonaldoCMP/BOSL2 2020-08-11 16:03:58 +01:00
RonaldoCMP
f30d9344a4 Merge remote-tracking branch 'upstream/master' 2020-08-11 16:03:37 +01:00
RonaldoCMP
b6085e0cbc
Exclude echo() 2020-08-11 15:36:44 +01:00
RonaldoCMP
2e9d87f584 explore new scope of transpose in linear_solve and _qr_factor 2020-08-11 15:21:36 +01: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
RonaldoCMP
50b0f170e7 Extend the scope of transpose
It allows a transposition in respect to the secondary "diagonal"
2020-08-11 14:55:25 +01:00
RonaldoCMP
1df84f3552 Revert "Extend scope of transpose"
This reverts commit 5ebf1c80b9.
2020-08-11 14:33:42 +01:00
RonaldoCMP
5ebf1c80b9 Extend scope of transpose
Includes an arg to allow transposing in respecto to the secondary "diagonal"
2020-08-11 14:32:25 +01:00
Revar Desmera
63164b35ad
Merge pull request #230 from RonaldoCMP/master
Optimize sorting
2020-08-06 01:11:27 -07:00