Commit graph

392 commits

Author SHA1 Message Date
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
a748c77077 vmul() to v_mul(), etc. 2021-06-14 20:28:49 -07:00
Garth Minette
3eb506e78a Rename quaternion functions to not have uppercase names. 2021-06-12 17:17:05 -07: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
Revar Desmera
dd6211e95a
Merge pull request #567 from RonaldoCMP/master 2021-06-08 12:51:07 -07:00
RonaldoCMP
6647c9e0b3 Speeding up of hull3d 2021-06-04 00:57:50 +01:00
Adrian Mariano
19c521913d Added general root finder 2021-05-21 19:03:07 -04:00
Garth Minette
33fda63cac Fixed mask2d_* shapes regressions. 2021-05-17 23:09:18 -07:00
Revar Desmera
7f837a05ec
Merge pull request #525 from RonaldoCMP/master
Fix small bug in hull3d_faces
2021-05-05 21:35:10 -07:00
RonaldoCMP
4568fe76df Still the fix of hull3d_faces 2021-05-05 23:02:48 +01:00
Adrian Mariano
d91a48ef28 fix tests 2021-04-22 06:28:23 -04: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
5ed3602391
Merge pull request #500 from adrianVmariano/master
Fix face orientation bugs
2021-04-14 15:13:32 -07:00
Adrian Mariano
27928eac70 bug fixes for caps and style 2021-04-13 20:21:19 -04:00
RonaldoCMP
41616872fe Correction in is_convex_polygon 2021-04-11 23:45:21 +01:00
RonaldoCMP
c5799d6539 Review of vnf_centroid() 2021-04-11 12:36:05 +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
Revar Desmera
c129fa659b
Merge pull request #494 from revarbat/revarbat_dev
Removed range(), rangex().  Added count().
2021-04-08 19:22:09 -07:00
Garth Minette
2225257f09 Tweaks suggested by @adrianVmariano. 2021-04-08 17:27:43 -07:00
Garth Minette
8bd3ef8a74 Removed range(), rangex(). Added count(). 2021-04-07 20:57:45 -07: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
Garth Minette
bda2661855 Merge branch 'master' into pr/483 2021-04-06 18:22:39 -07:00
Revar Desmera
27754b2725
Merge pull request #490 from revarbat/revarbat_dev
Revarbat dev
2021-04-06 17:05:41 -07:00
Garth Minette
2b78f82063 Regressions fixes for any()/all()/count_true() changes. 2021-04-06 17:01:41 -07:00
RonaldoCMP
8c0e389ec4 Revert "correction of centroid"
This reverts commit d4c7fab7ed.
2021-04-05 16:00:07 +01:00
RonaldoCMP
2c03b19246 Revert "Merge remote-tracking branch 'upstream/master'"
This reverts commit fd2c073bb2, reversing
changes made to d4c7fab7ed.
2021-04-05 15:59:54 +01:00
RonaldoCMP
407c36a8ae Revert "correction of centroid"
This reverts commit 575db80056.
2021-04-05 15:59:43 +01:00
Adrian Mariano
957907200b bezier doc fixes, test for complex() 2021-04-02 20:39:14 -04:00
Adrian Mariano
194f4a5b1f rounding tests 2021-04-02 17:00:58 -04:00
Adrian Mariano
dd13967049 Cleanup of path_resample, add tests for round_corners, fix
bezier_curve and arc to always return n points for either endpoint
setting.
2021-04-02 16:59:29 -04:00
Garth Minette
0b17bf5930 Brought slice() in line with select() indexing, without wrapping. Replaced a lot of select() and slice() calls with last(), list_head(), and list_tail() calls. 2021-03-30 00:46:59 -07:00
RonaldoCMP
575db80056 correction of centroid 2021-03-30 00:25:29 +01:00
RonaldoCMP
fd2c073bb2 Merge remote-tracking branch 'upstream/master' 2021-03-30 00:21:55 +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
Garth Minette
d7cb503ffc Replace most trivial uses of slice() with faster list_head() and list_tail() 2021-03-25 00:23:36 -07:00
RonaldoCMP
80e6cf6316 Minor corrections
Corrections and simplifications of  polygon_area(), centroid() and point_in_polygon.
2021-03-25 01:57:07 +00:00
Adrian Mariano
737baed34c further type checking fixes 2021-03-14 12:08:20 -04:00
Adrian Mariano
35c2d7df42 doc tweaks for skin
bug fixes for is_matrix, is_vector, and new tests for same
2021-03-14 10:25:22 -04:00
Revar Desmera
fd8319e0f4
Merge pull request #469 from revarbat/revarbat_dev
Workflow apt update fix.
2021-03-12 21:59:33 -08:00
Adrian Mariano
4dc2d4cfe5 Fix bug in skin, add some complex stuff to math and tests 2021-03-12 20:36:34 -05:00
Garth Minette
5b22e6f2d9 Added python-style zip(), zip_long(), combinations() and permutations(). 2021-03-10 14:49:39 -08:00
Garth Minette
a3f841de7d Fix regressions for fixed rot() 2021-03-08 14:54:16 -08:00
Garth Minette
532e95ae66 Merge branch 'revarbat_dev' of github.com:revarbat/BOSL2 into revarbat_dev 2021-03-06 02:45:40 -08:00
Garth Minette
5ac55f624c Fix regressions. 2021-03-06 02:45:29 -08:00
Adrian Mariano
6a1b141d5c hull 2d tweak 2021-03-05 20:39:15 -05:00
Adrian Mariano
f736ef98f7 same_shape bugfix (fails if b==undef)
check for collinear points in round_corners plus other fixes
fix path_cut to work correctly when closed==true, and change it to
fail with error when cut is too long instead of returning undef.
Add path_cut_segs.
2021-03-05 16:35:41 -05:00
Garth Minette
7fd16512f2 Regression fix for skew() 2021-02-26 13:11:23 -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
4f8b9fe7e8 Fixed errors in common.scad regressions. 2021-01-28 17:06:53 -08:00
Garth Minette
a13a09db8d Docs cleanup for common.scad 2021-01-28 16:59:46 -08:00
Garth Minette
48de08f89b Merge branch 'master' into revarbat_dev 2021-01-24 23:28:37 -08:00
Garth Minette
320518194f Various arrays.scad docs updates. Bugfixes. 2021-01-24 23:26:39 -08:00
Revar Desmera
e622af588c
Merge pull request #396 from adrianVmariano/master
rename zip to hstack
2021-01-24 23:10:30 -08:00
Adrian Mariano
d8d934b1de doc & test tweaks 2021-01-24 12:17:56 -05:00
Adrian Mariano
3790783cdc Rename zip to hstack and associated changes. 2021-01-24 10:29:34 -05:00
Garth Minette
ef4d367a98 Removed affine3d_chain() calls. 2021-01-20 18:14:04 -08:00
Garth Minette
c2129972c3 Dropped affine2d_chain(), affine3d_chain(). Improved affine.scad docs. 2021-01-20 18:06:46 -08:00
Garth Minette
6e42a1189d Regressions fix for affine3d_frame_map() 2021-01-20 13:40:25 -08:00
Garth Minette
b6cfda0537 Remove apply_list(). Renamed affine_frame_map() to affine3d_frame_map() 2021-01-20 13:36:41 -08:00
Garth Minette
e836213754 Update docs and regressions for apply() 2021-01-19 20:53:09 -08:00
Garth Minette
98aad31b69 Fixed vnf_get_vertex() for single point. 2021-01-14 00:32:40 -08:00
Revar Desmera
56a7037e81
Merge pull request #376 from revarbat/revarbat_dev
Added reuleaux_polygon()
2021-01-11 02:03:50 -08:00
Garth Minette
c790969ceb Added reuleaux_polygon() 2021-01-11 01:57:51 -08:00
Matthew Fallshaw
4c4e1c7993 Compare cylinders, with and without chamfers and circum. 2021-01-09 18:38:34 +11:00
Adrian Mariano
ec915a7eaa Added echo_matrix, matrix_strings, str_pad and str_replace_char. 2021-01-01 01:30:13 -05:00
Adrian Mariano
e0ac4d0c1b Fixed bugs in list_set, list_remove, list_insert that were revealed by
adding degenerate case tests.  List_set was broken for minlen
nonzero (no tests).  Added seed to shuffle.  Fixed bounds check error
in rounded_prism.
2020-12-31 09:32:47 -05: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
Adrian Mariano
3774e25689 remove hull.scad, replaced with test_hull.scad 2020-12-16 21:29:33 -05:00
Adrian Mariano
ecb915eb8f fixed arc test 2020-12-12 21:24:33 -05:00
Adrian Mariano
b82f1b8e5d tweaked vac example in turtle3d
added delete_last() to arrays.scad
added endpoint= option to arc
added tests for last two things
2020-12-12 21:15:33 -05:00
Garth Minette
70a6b7fac8 Fixed some undef warnings in distributors. 2020-12-09 23:43:08 -08:00
Garth Minette
e6ef5e98be Fix math.scad regression. 2020-12-02 17:21:58 -08:00
Garth Minette
f36fbb60db Fix for #166: tweaks for xcopies, etc. 2020-11-30 21:09:00 -08:00
Marcin Jaworski
8cd7530743 Added tests for struct_val() with default value 2020-11-13 17:19:29 +01:00
Adrian Mariano
f598426344 Add cumprod function and regression test 2020-10-23 19:06:30 -04:00
Adrian Mariano
c80c7c558a Added rot_decode to decode rotation matrices and matrix_trace,
supporting function, and regression tests for both.
2020-10-20 16:26:11 -04:00
Garth Minette
41ab991c15 Fixed bad spheroid() regression. 2020-10-15 19:21:36 -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
e3ccf482fa Make list functions make more sense with strings. 2020-09-28 19:12:07 -07:00
Garth Minette
cc29e07d8f Enable list-of-matrix use of vmul(). 2020-09-28 17:35:05 -07:00
Garth Minette
23bcc1b806 Removed sum_of_squares() as it's redundant with sqr(vector) 2020-09-28 16:56:18 -07:00
Garth Minette
37ae0cbba0 Simplify sqr(x) to x*x 2020-09-28 16:52:17 -07:00
Garth Minette
1435100e37 Implemented Issue #262 2020-09-25 00:31:42 -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
Garth Minette
45dbfe6524 Added regressions for torx_drive.scad 2020-09-24 15:59:25 -07:00
Garth Minette
c400843cb2 Added regressions for vnf_centroid() and vnf_volume() 2020-09-23 19:38:22 -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
b2121fbfb3 Added all_nonzero(). Added is_vector(all_nonzero=). 2020-09-07 23:10:39 -07:00
Garth Minette
a9b8f5618a Fix for Issue #263 2020-09-06 17:15:08 -07:00
Adrian Mariano
399c40f7a6 Added null_space and diagonal_matrix 2020-09-01 18:38:31 -04:00
Adrian Mariano
3caeeff2cd Added norm_fro, quadratic_roots and pivoting to qr_factor and
linear_solve.  Added tests.
2020-09-01 17:57:31 -04:00
Adrian Mariano
8f6c2e8538 Add submatrix_set and block_matrix and tests 2020-09-01 16:42:47 -04:00
RonaldoCMP
bbe4ad1467 Sort debugging and optimizing
There were bugs in the previous sorting functions. They didn't check the homogeneity of the input list before calling _sort_scalars and _sort_vectors. The bug might result in wrong order and missing list elements in the output.
Besides correcting the bug a recode of all sorting functions result in better performance and a enlargement of their scope. With the new functions, list of vectors of any dimension may be sorted, even with idx given, with the native comparison operators. The scope of indexed sorting is also extended.

The file test_arrays has been extended to check the new funcionality.

New functions:

is_homogeneous - checks if a list has elements of the same type (although not distinguing booleans from numbers) up to a given depth
_sort_vectors - internal function to sort homgeneous lists of vectors using native comparison operators; extends the scope of the previous _sort_vectors# functions with better performance
_lexical_sort - internal function to sort non-homogeneous lists; uses compare_vals
_indexed_sort - internal function to perform indexed sorting of non-homogeneous lists; uses compar_vals

Changed/reviewed functions:
_valid_idx - doesn't requires the input of imin and imax args
sort - explores the internal functions to get better performance and an enlarged scope
sortidx - explores the internal functions to get better performance and an enlarged scope
_sort_general - just for sortings of non-homogeneous lists using compare_vals
_array_dim_recurse - changed for bit better performance

Functions eliminated:
 _sort_vectors1
 _sort_vectors2
 _sort_vectors3
 _sort_vectors4
2020-08-30 12:12:36 +01:00
Garth Minette
5d2c45bba0 Merge branch 'master' of github.com:revarbat/BOSL2 into revarbat_dev 2020-08-28 19:19:04 -07:00
Garth Minette
e1b0985afc Fixed broken line-plane intersections. Attachment enhanced vnf_polyhedron(). 2020-08-28 19:07:10 -07:00
Adrian Mariano
411c1f866e fixed missing ; bug in test_transforms.scad 2020-08-27 19:48:13 -04:00
Garth Minette
b679ea52dc Add is_zero(), is_positive(), is_negative(), is_nonpositive(), is_nonnegative(). 2020-08-26 18:02:16 -07:00
Garth Minette
9f02750519 Merge branch 'master' of github.com:revarbat/BOSL2 into revarbat_dev 2020-08-25 22:54:00 -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
Garth Minette
5e981fb4a7 Added tests for path3d() and path4d() with fille= 2020-08-18 19:25:05 -07: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
RonaldoCMP
b6085e0cbc
Exclude echo() 2020-08-11 15:36:44 +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
c0481f14eb
Merge pull request #229 from adrianVmariano/master
move submatrix to arrays and relax input restrictions
2020-08-04 00:38:23 -07: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
c9408a66fa Merge remote-tracking branch 'upstream/master' 2020-08-04 00:13:26 +01:00
Adrian Mariano
06b69475cb Fix bug. Add test for subindex. 2020-08-02 10:38:11 -04:00
Adrian Mariano
47d02ae783 removed median tests 2020-08-02 01:23:15 -04:00
Adrian Mariano
e2817ae64d removed references to errors.scad 2020-08-02 01:18:33 -04:00
RonaldoCMP
e858d5627e Merge remote-tracking branch 'upstream/revarbat_dev' 2020-08-02 00:03:05 +01:00
RonaldoCMP
526c01109c Minor edits in in_list and transpose, removal of is_simple list 2020-07-31 15:52:35 +01:00
Garth Minette
6064dcbed0 Fix list_remove() for null index list. 2020-07-29 22:39:17 -07:00
Revar Desmera
cddb76a131
Merge branch 'master' into master 2020-07-29 22:14:16 -07:00
Revar Desmera
5e98cbf679
Merge pull request #216 from RonaldoCMP/master
Extensive changes in arrays.scad, vectors.scad, common.scad and their regression test codes
2020-07-29 21:44:39 -07:00
RonaldoCMP
8a25764744 Overall review, input data check, format, new function definitions
New function definitions in commom.scad:
1. valid_range;
2. _list_pattern

New function definitions in math.scad:
1. binomial;
2. binomial_coefficient;
3. convolve;

Code review in math:
1. sum;
2. median;
3. is_matrix;
4. approx;
5. count_true;
6. doc of deriv2;
7. polynomial;
8. poly_mult;
9; poly_div;
10. _poly_trim

Code change in test_common:
1. new test_valid_range;
2. test_is_consistent

Code change in test_math:
1. test_approx;
2. new test_convolve;
3. new test_binomial;
4. new test_binomial_coefficient;
5. test_outer_product;
6. test_polynomial;
7. test_poly_mult;
8. test_poly_div;
9. test_poly_add;
2020-07-29 22:41:02 +01:00
RonaldoCMP
babc10d60d Revert "input checks in math and new function definitions"
This reverts commit 19e5a9504a.
2020-07-29 21:50:22 +01:00
RonaldoCMP
19e5a9504a input checks in math and new function definitions 2020-07-29 21:49:15 +01:00
RonaldoCMP
281d945ed7 Revert "update"
This reverts commit d45f289a95.
2020-07-29 15:30:35 +01:00
RonaldoCMP
62629b6eb6 Revert "remove test_all"
This reverts commit 66aba45802.
2020-07-29 06:50:42 +01:00
RonaldoCMP
66aba45802 remove test_all 2020-07-29 02:40:59 +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
RonaldoCMP
d45f289a95 update 2020-07-28 22:55:21 +01:00
Adrian Mariano
7b5c2456ce change hull to use find_noncollinear_points, add some error checks,
add regression tests
2020-07-28 17:54:57 -04:00
RonaldoCMP
ab57790c27 Correction of is_vector and doc text 2020-07-28 19:02:35 +01:00
RonaldoCMP
c10a8b919d Extensive review of arrays.scad, vectors.scad, common.scad and their regression tests
Here is an extensive review of common.scad, vectors.scad, arrays.scad and their regression test codes. The changes were mostly in input data check and format. Some few functions got more changes either to adapt them to the new asserts or because a better (faster, simpler) code was found.

Another change was moving add_scalar from vectors.scad to arrays.scad. It is in fact an array operation. Some few documentation examples and test codes were added. Some function argument names were changed to keep them consistent with the names they have in other similar functions. That name changes were not as extensive as I would like but it is advisable to favor users.

Most, but not all, changed function codes are followed by a comment with a short summary of the changes done. Those comments always start with:
//***

I can eliminate those comments before a merge is done or in a second round.
2020-07-25 20:27:19 +01:00
RonaldoCMP
bdba4c0821 A broad review of input data check and code format
Some functions were changed for sake of clarity or better performance.
2020-07-24 22:54:34 +01: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
RonaldoCMP
d2e851ae42
Merge branch 'master' into master 2020-07-24 14:47:25 +01:00
RonaldoCMP
464c65ce8c Eliminating tabs 2020-07-24 13:30:19 +01:00
RonaldoCMP
877a07b711 Full review of input data checking, formating and improvement in some functions
Refactorigng of list_set(), list_insert() and list_remove() without any sorting and speed gain.

Some argument names changed for consistence between functions.

test_array() updated.
2020-07-24 00:19:49 +01:00
RonaldoCMP
88e2fc0f29 Input data check review and some refactoring
Some functions have been changed as a consequence of the dat checking review. vector_axis was fully refactored. add_scalar was moved to arrays.scad
2020-07-24 00:10:36 +01:00
RonaldoCMP
39b4b7282d Update typeof(), int(), range(), list_of() and segs 2020-07-24 00:04:16 +01:00
Adrian Mariano
7eafa691b4 Changed to relative include names 2020-07-21 20:05:21 -04:00
Adrian Mariano
a73ca6368c fixed in_list bug 2020-07-21 19:55:05 -04:00
Garth Minette
4a37a5dc8e Added zero=undef/true/false arg to is_vector. Bugfix for vector_axis() 2020-07-21 16:15:02 -07:00
RonaldoCMP
e017c6075d input data checks and addition of many new functions
1. Input data check in all functions
2. Definition of new functions for data check, new interpolations functions, quaternion from matrix, rotation path interpolating quaternions, inverse, exp, ln, power.
2020-07-17 20:28:28 +01:00
Revar Desmera
0ade5d5baa
Merge pull request #201 from adrianVmariano/master
Updates
2020-07-13 09:35:21 -07:00
Adrian Mariano
f190b50c4d substituted correct file 2020-07-12 07:10:56 -04:00
Adrian Mariano
4e2092f347 Added a bunch of tests 2020-07-11 12:22:44 -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
34e16dc0ca Fixed skin regression. 2020-07-07 21:21:05 -07:00
Garth Minette
78ecbbd9c5 Added regression for centroid() 2020-07-06 16:15:32 -07:00
Garth Minette
8b6e07326f Added regressions for linear_bearings.scad and shapes.scad 2020-07-04 21:42:39 -07:00
Garth Minette
f60ef80eaa Added regressions for is_matrix(), matrix_inverse() 2020-07-04 00:38:40 -07:00
Garth Minette
3ec34ce9f1 Added regresstions for cube(), cylinder(), and sphere() 2020-07-04 00:14:25 -07:00
Garth Minette
8985837b63 Added regression for debug.scad 2020-07-03 18:00:37 -07:00
Garth Minette
a718b66026 Added regressions for missing common.scad functions. 2020-07-03 17:42:08 -07:00
Garth Minette
ed0a3e3e7b Added regressions for set functions and force_list() 2020-07-03 15:23:03 -07:00
Garth Minette
74723f32f5 Added regressions for shapes2d.scad 2020-06-30 17:19:09 -07:00
Revar Desmera
a3207af6ab Added a bunch of regressions for shapes2d.scad 2020-06-24 22:33:41 -07:00
Revar Desmera
1a7bfb687f Added mutator.scad mutators. 2020-06-22 22:34:36 -07:00
Revar Desmera
794741f824 Added regression for skew() 2020-06-21 19:46:22 -07:00
Revar Desmera
bebb993125 Added regressions for transforms.scad 2020-06-21 01:30:49 -07:00
Revar Desmera
012c8d555d Added regressions for vfloor() and vceil() 2020-06-20 21:42:22 -07:00
Revar Desmera
0c612f40f6 Added regression for Q_Cumulative() 2020-06-20 21:31:38 -07:00
Revar Desmera
20dfaac113 Bugfix for #182. Added assert_equal() and assert_approx() for regression helpers. 2020-06-20 19:51:58 -07:00
Revar Desmera
f727a9c3f1 Add regression run to CI. 2020-06-19 23:00:40 -07:00
Revar Desmera
5b39cefe7b Fixed skin() regression. 2020-06-15 01:29:23 -07:00
Revar Desmera
e3b64888a8 Added regressions for strings.scad. 2020-06-15 01:25:35 -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
971c1e795f Renamed place_copies() to move_copies() 2020-03-24 18:31:22 -07:00
Revar Desmera
6183e6d0d2 Added deduplicate_indexed() 2020-03-24 14:51:37 -07:00
Revar Desmera
00f69ba95b Removed translate_points(), scale_points(), rotate_points2d() and rotate_points3d() 2020-03-22 05:11:19 -07:00
Revar Desmera
7cba0b60f9 Fixed regression test for function namechange. 2020-03-20 13:53:47 -07:00
Revar Desmera
19ed457e38 Regressions for repeat() fixed. 2020-03-04 20:29:17 -08:00
Revar Desmera
19e6ec8093 Fix coords.scad regressions. 2020-03-02 21:48:54 -08:00
Revar Desmera
07bfcd6a57 Renamed normalize() to unit() 2020-03-02 19:30:20 -08:00
Revar Desmera
019961aef7 Added dflt= arg to sum(), defaulting to 0. 2020-02-08 21:54:39 -08:00
Revar Desmera
9f6a95090f Added regressions for gcd(), lcm(), and factorial() 2020-01-16 13:27:50 -08:00
Revar Desmera
68260afebb Added regressions for permute() and repeat_entries() 2020-01-16 13:01:41 -08:00
Revar Desmera
be8b30974a Added is_int() regressions 2020-01-15 20:27:01 -08:00
Revar Desmera
43bc09d838 Add regression test for vang() 2020-01-15 20:13:07 -08:00
Revar Desmera
c05b6bfa5c Fixed erroneous assertion in list_range() 2019-11-19 18:02:36 -08:00
Revar Desmera
9f92fe8775 Enhanced lerp() to allow list/range u values to return lists of results. 2019-11-18 21:11:38 -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
871540c57c Changed skin params. matching= -> method= and "evenly" -> "uniform" 2019-11-13 21:58:48 -08:00
Revar Desmera
e644cc750b Updated regressions for edge_set() -> _edge_set() 2019-11-12 14:14:15 -08:00
Revar Desmera
066bb190f9 Added quaternion.scad regressions and bugfixes. Added function variant of Qrot() 2019-11-11 19:09:46 -08:00