Hello everyone.
Almost seven years now from the polyline object. Wow. I've seen some awesome objects created with that. Congratulations to all of you who have taken a plunge into understanding GDL and that old object, and used it to create amazing things and shared them with the rest of us.
I've had these "version 2" objects for years now. Made them, thought of things to do with them, got busy living and working, used them in a couple of objects for me, and forgot about them.
I tried to simplify the main polyline functions as much as I could, so building upon them was easier. Still couldn't solve the "z" coordinate issue when removing points but it really is no big deal (i think).
The main goal at the time was to add arcs, but to be done over the simplified script. So... the library has a few objects:
* Two objects with the main functions. The difference with these is the way the script is written. One has separate x, y and z arrays, the other one has only one XYZ array. Would depend on your liking to use either one.
* A version 2 Dynamic Polyline, that includes arcs. This was a challenge and a nightmare. Dealing with the way GDL creates arcs is really something, and then realizing there would be ellipses, projected and rotated spherical and polar coordinates involved, was frightening. I just couldn't figure out some other arc examples on how they were done with simpler code. Mine was the result of extensive trigonometry research of long forgotten things. Has two type of arcs: based on floor plan projection (which yields helices in 3D) or based on the segment's 3D rotation (which yields ellipses in floor plan). It was not easy, but quite satisfying to achieve.
* A dynamic multi-polyline object. This one doesn't have arcs (my brain would have died), but has the ability to have many polylines in a single object. It is not using MACRO calls to load the basic functions. I saw this way of using the polyline object to have and use more than one poyline, and wanted to see if I could solve it within the same object. Perhaps you might find good use for this one, despite missing arc code.
I really hope you find these useful, either to build and share more objects, or just to learn a few things that might help you. They are shared using this
license.
Thank you everyone.
Enjoy!