GDL
About building parametric objects with GDL.

Dynamic Polyline base code object - VERSION 2

sinceV6
Advocate
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!
28 REPLIES 28
Super fun stuff. Cant wait to see what you did!
Mathias Jonathan
Advocate
Thank you for sharing!

Just one question, one of your objects is protected by password, is it volontary?
The object link to a Attribution-ShareAlike 4.0 International licence.

(It is the Dynamic Polyline ER LK Report Length)
sinceV6
Advocate
Mathias wrote:
Thank you for sharing!

Just one question, one of your objects is protected by password, is it volontary?
The object link to a Attribution-ShareAlike 4.0 International licence.

(It is the Dynamic Polyline ER LK Report Length)
Hi.
I remember I shared the locked object for length measuring purposes only. It is basically the polyline object but with two added length parameters: list2DLength and list3DLength; with some code in master script after this section
!---LENGTH-----
!_______________
!---LISTING LENGTH---	20170323-01-Added listing parameters
PARAMETERS list2DLength = fullLength[1][get2D]
PARAMETERS list3DLength = fullLength[1][get3D]
LOCK "list2DLength"
LOCK "list3DLength"
!_______________________________________________________________
That's it.
Best regards.
Anonymous
Not applicable
Thank you so much.

You are my idol
Nader Belal
Mentor
@sinceV6

Thanks a lot for sharing the scripts with us ... anyhow, I couldn't revise them in detail until now, so I will put my questions and comments whenever I fond something that I find interesting.
A good friend of mine have once told me that I´m so brute that I´m capable of creating a GDL script capable of creating GDLs.
Nader Belal
Mentor
Tip 01: Optimisation
The midpoint coordinate component that you used:
Midpoint = Pt01 + ((Pt02 - pt01) / 2)

Its optimised version is:
Midpoint = (Pt01 + Pt02) * 0.5
A good friend of mine have once told me that I´m so brute that I´m capable of creating a GDL script capable of creating GDLs.
Hmooslechner
Rockstar
I want to point you at my last polyline-Object on the foundation of sinceV6:

It "curves" between all edges with bezier-curves - also in the Z-Axes (and now graphisoft should make an export for mario-cart! )

had no time to make an Engish-Version, but you should get the points.

https://bimcomponents.com/GSM/Details/24075



Profile-manager - profiles are used to follow the 3D-Polyline-Curve
AC5.5-AC27EduAut, PC-Win10, MacbookAirM1, MacbookM1Max, Win-I7+Nvidia
Anonymous
Not applicable

Now THIS is mind boggling!
Simply amazing Hmooslechner.
Thanks for all your GDL contributions.
Just one question (And if the answer is yes, then this is a revolution): Is it possible to do rotation on the axis of the profile for individual nodes?
Hmooslechner
Rockstar
Thougt also about rotating at the nodes, but its not possible with the normal tube-command. Maybe Graphisoft could add an extension for the tube with the possibilities of rotating the profiles on nodes in the future?
AC5.5-AC27EduAut, PC-Win10, MacbookAirM1, MacbookM1Max, Win-I7+Nvidia

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!