- Sun Dec 13, 2020 11:42 pm
#320195
I personally use the PUT/GET statements for all my shapes because I hate changing the node quantity value in the "poly2_b" command every time I add a new node. Also most my shapes are parametric so the quantity of nodes changes based on the users application of the object, therefore I can't use anything but the PUT/USE/GET functions.
basic:
One thing to remember (especially when using the USE) function, is that you must remain aware of what is in your NSP. So if you are using the NSP values more then once, in a loop for instance and hence applying the USE function, then make sure the last call of the NSP values is a GET function, otherwise the values remain in the NSP and will populate the next unrelated GET function.
basic:
Code: Select all
smarter:
poly2_b 4, 7, fill_pen, fill_background_pen,
0, 0, 1,
a, 0, 1,
a, b, 1,
0, b, 1
Code: Select all
smartest:
put 0, 0, 1,
a, 0, 1,
a, b, 1,
0, b, 1
poly2_b nsp/3, 7, fill_pen, fill_background_pen,
get(nsp)
Code: Select all
The last example makes it a lot easier to add nodes to your shape.put 0, 0, 1
put a, 0, 1
put a, b, 1
put 0, b, 1
poly2_b nsp/3, 7, fill_pen, fill_background_pen,
get(nsp)
One thing to remember (especially when using the USE) function, is that you must remain aware of what is in your NSP. So if you are using the NSP values more then once, in a loop for instance and hence applying the USE function, then make sure the last call of the NSP values is a GET function, otherwise the values remain in the NSP and will populate the next unrelated GET function.
Creator of Cadswift's parametric GDL libraries
Creator of Infinite Openings and Component Catalogues
Push the envelope & watch it bend
website: https://cadswift.com.au/
YouTube: https://www.youtube.com/user/CADSwift/playlists
Creator of Infinite Openings and Component Catalogues
Push the envelope & watch it bend
website: https://cadswift.com.au/
YouTube: https://www.youtube.com/user/CADSwift/playlists