Commit graph

1275 commits

Author SHA1 Message Date
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
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
RonaldoCMP
9a5724aebd
Merge branch 'master' into master 2020-08-05 06:22:07 +01:00
RonaldoCMP
c6b472318f Optimize sorting
Optimize _sort_general and change  accordingly sort and sortidx.
Introduce _valid_idx() to simplify teh validations of arg idx.
Add input validation to subindex().
2020-08-05 06:16:48 +01:00
Revar Desmera
c0481f14eb
Merge pull request #229 from adrianVmariano/master
move submatrix to arrays and relax input restrictions
2020-08-04 00:38:23 -07:00
Revar Desmera
ba6d59a615
Merge pull request #225 from RonaldoCMP/master
Minor changes in is_matrix, in_list, removal of duplicate definitions and format
2020-08-04 00:34:30 -07:00
Adrian Mariano
719f1ff585 doc bugfix 2020-08-03 19:58:11 -04:00
Adrian Mariano
baf4eb76dc doc tweak 2020-08-03 19:52:13 -04:00
Adrian Mariano
4e36eacca8 Moved submatrix to arrays.scad and relaxed requirement for numerical
input.  Added examples and tests.
2020-08-03 19:49:22 -04:00
RonaldoCMP
e06519bbfb changes to hide recursion args and avoid repetitive arg validations
cumsum broken in two to hide recursion args and avoid repetitive arg validations.

back_substitute changed to avoid repetitive arg validations in the recursion.

minor change in deriv2 and deriv3 to avoid an unecessary call to is_matrix.

change in is_matrix for better performance

any() and all() broken in two to avoid repetitive arg validation in the recursion and to hide recursion args.

change in polymult to call convolve

break of poly_div in two to avoid repetitive arg validations in the recursion.
2020-08-04 00:38:36 +01:00
RonaldoCMP
0e7517ecfe Merge branch 'master' of https://github.com/RonaldoCMP/BOSL2 2020-08-04 00:16:33 +01:00
RonaldoCMP
c9408a66fa Merge remote-tracking branch 'upstream/master' 2020-08-04 00:13:26 +01:00
RonaldoCMP
e4bd6238b4 Revert "Minor edits in is_matrix"
This reverts commit 764420e71d.
2020-08-04 00:08:23 +01:00
Revar Desmera
a05509dc6d
Merge pull request #228 from revarbat/revarbat_dev
Fixed calls to vmul() with heterogenous vector sizes.
2020-08-02 23:26:51 -07:00
Garth Minette
e56f953c1c Fixed calls to vmul() with heteerogenous vector sizes. 2020-08-02 23:23:50 -07:00
Revar Desmera
59aebd33ce
Merge pull request #227 from adrianVmariano/master
subindex speed improvement
2020-08-02 09:22:34 -07:00
Adrian Mariano
8f1162e7bf doc typo fix 2020-08-02 10:38:33 -04:00
Adrian Mariano
06b69475cb Fix bug. Add test for subindex. 2020-08-02 10:38:11 -04:00
Adrian Mariano
37ca6efebb Modified subindex to be faster. Note also changed behavior for
idx=singleton list.
2020-08-02 10:35:32 -04:00
Revar Desmera
76eb822aad
Merge pull request #224 from adrianVmariano/master
remove error.scad
2020-08-01 22:25:29 -07:00
Adrian Mariano
47d02ae783 removed median tests 2020-08-02 01:23:15 -04:00
Adrian Mariano
817bdffdef Removed bogus median function 2020-08-02 01:20:11 -04:00
Adrian Mariano
e2817ae64d removed references to errors.scad 2020-08-02 01:18:33 -04:00
RonaldoCMP
764420e71d Minor edits in is_matrix 2020-08-02 01:15:07 +01:00
RonaldoCMP
84fa648dc5 Revert "Minor is_matrix definition and format"
This reverts commit 2da259c2cc.
2020-08-02 01:08:24 +01:00
RonaldoCMP
afb236f084
Merge branch 'master' into master 2020-08-02 01:03:46 +01:00
RonaldoCMP
2da259c2cc Minor is_matrix definition and format 2020-08-02 00:47:22 +01:00
RonaldoCMP
e858d5627e Merge remote-tracking branch 'upstream/revarbat_dev' 2020-08-02 00:03:05 +01:00
Adrian Mariano
f1cd94e986 remove error.scad include 2020-08-01 15:56:40 -04:00
Adrian Mariano
45a8b3ec6a Moved no_children to common.scad, and changed references to
echo_warning in skin.scad and polyhedra.scad.
2020-08-01 15:54:58 -04:00
RonaldoCMP
855c1da6f1 Minor doc edit 2020-07-31 15:53:06 +01:00
RonaldoCMP
526c01109c Minor edits in in_list and transpose, removal of is_simple list 2020-07-31 15:52:35 +01:00
Revar Desmera
1ef7dc0c92
Merge pull request #223 from adrianVmariano/master
improved back_substitute, cleaned up a few other functions, removed some non-breaking space characters.
2020-07-30 18:55:05 -07:00
Adrian Mariano
046266778c improved back_substitute, cleaned up a few other functions, removed
some non-breaking space characters.
2020-07-30 20:46:19 -04:00
RonaldoCMP
3b1d567219 Revert "Minor edits in in_list"
This reverts commit 74cc246c75.
2020-07-31 01:03:32 +01:00
RonaldoCMP
74cc246c75 Minor edits in in_list 2020-07-31 00:59:05 +01:00
RonaldoCMP
5c239187e9 removal of duplicate definitions 2020-07-31 00:57:52 +01:00
Revar Desmera
a2e177ecf4
Merge pull request #221 from revarbat/revarbat_dev
Fix list_remove() for null index list.
2020-07-29 22:51:54 -07:00