The Global Archicad Community

Stay informed. Get help. Share your knowledge.

Topics specific to the scripting and development of Library Parts and Libraries using Param-O or the Geometric Description Language – GDL. (Example: How do you use “REQUEST” GDL commands?)

Moderators: Karl Ottenstein, LaszloNagy, ejrolon, Barry Kelly, gkmethy, rmasaki, Akos Somorjai, Csilla Mai, Peter Baksa

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.

(131.15 KiB) Downloaded 105 times
Mathias Jonathan 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)
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
Code: Select all
!---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.

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.
Tip 01: Optimisation
The midpoint coordinate component that you used:
Midpoint = Pt01 + ((Pt02 - pt01) / 2)

Its optimised version is:
Midpoint = (Pt01 + Pt02) * 0.5
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! :mrgreen: )

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

Profile-manager - profiles are used to follow the 3D-Polyline-Curve
Now THIS is mind boggling!
Simply amazing Hmooslechner.
Thanks for all your GDL contributions. :D
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? :mrgreen:
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?