discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

How does concat() actually work ?

F
fxeconomist@yahoo.com
Sun, May 29, 2022 7:02 PM
F
fxeconomist@yahoo.com
Sun, May 29, 2022 7:05 PM

I noticed it returns to an echo or to a new array, however it cannot reassign arrays. 

This works

piecePoints0=[ B0, A0, A1, B1 ]; piecePoints1=concat(piecePoints0,side0);

However, piecePoints0=concat(piecePoints(),side0); fills piecePoints() only with side0 array.

How can I go around this ? I need to add a dynamic number of points calculated inside a for loop.

I noticed it returns to an echo or to a new array, however it cannot reassign arrays.  This works piecePoints0=\[ B0, A0, A1, B1 \]; piecePoints1=concat(piecePoints0,side0); However, piecePoints0=concat(piecePoints(),side0); fills piecePoints() only with side0 array. How can I go around this ? I need to add a dynamic number of points calculated inside a for loop.