Reply To: Double use of buffer

Home Forums Problems and solutions in GDL 3D modelling Double use of buffer Reply To: Double use of buffer

#3563
Bruce Walker
Participant

I thought about using an array, but couldn’t figure out how to feed an array of undefined size into a TUBE or PRISM command.

In this part, the user can choose from a selection of profiles (let’s say Rectangle wide, Rectangle narrow, Pentagon, Hexagon). The profiles are also made up of two different surfaces (let’s say the top 3/4 is white, the bottom 1/4 is grey). They can also choose from a selection of paths (straight, horizontal bend 45°, vertical bend 45°, vertical bend 15°). If the user chooses the straight path, then they can define segment length and number. Horizontal and vertical bends are of fixed length.

In this situation, I use two PRISMs in a loop for the straight segments, and two TUBEs for each of the other options (the horizontal path needing to be defined differently to the vertical path).

At the moment I use the buffer for the path (as the angle can change, as can the number of steps / resolution), and have copied the profile to each of the commands. This means I double up on code, which will be difficult to add more profiles to, or edit what is there (which is almost guaranteed).

I think I know what you mean…but will have to play around with it to figure it out properly.

Cheers

www.brucepwalker.com
https://www.mindmeister.com/65450406

AC20 6005 AUS Full & AC 21 3009 NZE Full | Win 10 Pro 64 | Intel i7-7700HQ 2.80GHz | 16 Gb RAM
NVIDIA GeForce GTX 1060 8Mb