2023-12-07 03:21 PM
Hello,
I am looking to create something like a fill object. It doesn't need any curved sides but I would like to be able to add and remove points using nodes. I currently have an object working where I can add and remove nodes to increase the number of lines to create a fill but it is limited in that I have made if statements specifically for number of sides up to 10. I would ideally like to be able to have it automated beyond that without having to create an if statement for each possibility. I have nodes that can create additional lines infinitely, it's just a case of being able to automate those points into being a poly / fill. The only way I can possibly see this working is by using the parameter buffer but I haven't had any experience with it and I'm not even sure if this is something that's possible.
Any help would be greatly appreciated.
2023-12-08 12:04 AM
The best way would be to modify the dynamic poly line object that sincev6 has shared.
2023-12-08 01:35 AM - edited 2023-12-08 01:38 AM
If you have a polyline object, you quite possibly have everything you need already.
I just tried with one I have and in the 2D script it places a POLY2 and GETs the parameters from a stored array.
It is a very old version of the dynamic polyline object SenecaDesign mentioned.
So that object uses PUT to store the parameters and GET to retrieve them
It draws the POLY2 but has a frame fill status of '1' - so it doesn't close the ployline and doesn't add a fill.
So just make sure you SET the fill you want before the POLY2 command, and change the frame status to '7'.
If your polyline object does not use a POLY2 for the output, then we will have to think of something else, or use the dynamic polyline object.
https://community.graphisoft.com/t5/GDL/Dynamic-Polyline-base-code-object/m-p/198874
Barry.