2013-09-2103:36 AM - last edited on 2022-09-2610:58 PM by Daniel Kassai
In the past couple of months I've been in a GDL streak creating, updating and fixing lots of little self made parts... and the code just seemed to flow; so I tackled my wish to have (make, to learn, in my case) a dynamic polyline. A few months ago, I sketched a new "parking place" object that I wanted, but just didn't have the time to do; and didn't really need because I've just been adding stuff and parameters to the GS parking place object for years.
I did some research a few years ago, but just kept the links for reference. Now that I was naturally digging into GDL again, I though I could make it possible.
The basic code for a Dynamic Polyline is useful for me; and I thought many people here could benefit from it. I tried several approaches for two weeks trying to make it work the way I wanted (I'm really no expert in GDL). It solves a few issues and serves as learning resource too, as it dynamically adds points to the polyline between segments, adds points at the end, dynamically removes points and dynamically grows and shrinks arrays.
I already have other ideas for this, like a 3D railing (the code already has Z for each point). I'm not putting it in BIMcomponents (this is for AC15+) or the Depository as it is not a final product.
I hope you find it useful, if you do, leave a comment; the only condition is that if you use it for something, you must post back the developed object with the code unlocked so other people can see how to implement it in new objects. (so please, no locked commercial derivatives... this is for the community)
Thanks to the plethora of information found in this community.
Thank you very much for sharing!
At that time (I had time) I studied this problem to write an object for claddings. So I needed a closed dynamic polygone to be used to define a slab to be oriented anyhow in the space ...
I see that your dynamic polyline cannot be closed. Right?
The script won't check for overlapping segments... so it will give you the area based on clockwise or counterclockwise coordinates (so, some area polygons will have positive area, others negative area). It is the same result if you use the measure tool and trace over all the segments (following their order) including the overlapping segments.
The 3D script will do nothing more than lift the points.
You can extend it to show whatever you need. If you do, share what you accomplish!
Now i had time to look at Your code.. and i am sure not to understand the half of it.- Wow!
I wish this would have existed when i made my own little steps in this topic. This seems to be exact the "base" for what i was looking for to make a functioning 3D-Railing, a much easier GDL für sewer than i tried to make and so on..
I have to learn much! thats sure.
I will try to adapt this für my existing sewer-Part.