Commit graph

117 commits

Author SHA1 Message Date
Garth Minette
f4cfd67d94 Fix link to is_homogeneous() 2021-03-01 23:20:53 -08:00
Garth Minette
3d86835752 Actually add homogenous() alias. 2021-03-01 23:05:32 -08:00
Garth Minette
abb9955f92 Added Alias for homogenous(),homogeneous(). Both are valid. 2021-03-01 23:04:11 -08:00
Garth Minette
a346a0cbf0 Added Topics/SeeAlso to affine, arrays, attachments, beziers, common, constants, gears 2021-03-01 22:44:00 -08:00
Garth Minette
1b8f28cf35 Fix warnings for null range in idx() 2021-01-24 23:51:52 -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
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
f328ca87a5 Clean up Usage docs lines for arrays.scad. Typo fix in joiners.scad. 2021-01-07 19:17:10 -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
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
f2bb9bcb4b Added vnf_wireframe, tweaked reverse error message, 2020-12-19 11:48:05 -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
Jerome Plut
1d324128e4 Added more flexibility to get_named_args(), and all the left_half(), etc. as functions 2020-12-03 21:40:32 +01: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
e3ccf482fa Make list functions make more sense with strings. 2020-09-28 19:12:07 -07:00
Adrian Mariano
9cd91cc6cc Faster version of norm_fro, and some arg validation 2020-09-02 16:46:58 -04:00
Adrian Mariano
399c40f7a6 Added null_space and diagonal_matrix 2020-09-01 18:38:31 -04:00
Adrian Mariano
8f6c2e8538 Add submatrix_set and block_matrix and tests 2020-09-01 16:42:47 -04:00
RonaldoCMP
42bffef35f Minor doc corrections 2020-08-30 12:18:53 +01: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
Adrian Mariano
2eb0ce0348 added os_mask to rounding and tweaked error messages in transpose 2020-08-28 23:16:11 -04: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
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
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
c9408a66fa Merge remote-tracking branch 'upstream/master' 2020-08-04 00:13:26 +01: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
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
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
Garth Minette
6064dcbed0 Fix list_remove() for null index list. 2020-07-29 22:39:17 -07:00
Garth Minette
aa0e77b1f4 Minor fixes for PR #216 2020-07-29 21:58:12 -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
014eea601d Revert "formating"
This reverts commit f67226a6dd.
2020-07-29 06:52:12 +01:00
RonaldoCMP
f67226a6dd formating 2020-07-29 03:19:01 +01:00
RonaldoCMP
3d226f1ffa doc correction 2020-07-28 21:51:45 +01:00
RonaldoCMP
ab57790c27 Correction of is_vector and doc text 2020-07-28 19:02:35 +01:00
Garth Minette
b5d465cf1e docs_gen.py now shows more docs errors. 2020-07-27 15:15:34 -07:00