License Delivery maintenance is expected to occur on Saturday, November 30, between 8 AM and 11 AM CET. This may cause a short 3-hours outage in which license-related tasks: license key upload, download, update, SSA validation, access to the license pool and Graphisoft ID authentication may not function properly. We apologize for any inconvenience.
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
Peter Baksa
Graphisoft
Graphisoft
HKEY_CURRENT_USER\Software\GRAPHISOFT\ARCHICAD\ARCHICAD <version>\GSModeler\Better GDL Tube Triangulation
Maybe Peter can shed some light onto this one
These registry keys are experimental features. We don't want to keep compatibility with their values, they might change. They aren't stored in the plan, others might see the model differently.

This one particularly is about how the longitudinal faces between the nodes are triangulated into two parts.
Péter Baksa
Software Engineer, Library as a Platform
Graphisoft SE, Budapest
Anonymous
Not applicable
Peter wrote:
Yes, the tricky part is the direction of the 0° direction on that plane. It is the projection of the Z axis to the plane, but sometimes is flipped 180° so the tube is less twisted. Sometimes this flipping is not needed for the model, but it can't be controlled intuitively.
I recall passing thru this on an object I scripted ages ago (With the precious help of many good friends here ) to INFOR, our local representative here in Portugal. It was/is a Curb/Gutter object that became some sort of obsolete with the creation of the Railing Tool. In this object I faced this weird distortions and work around it by creating a "Pseudo Tube" with individual Ruled segments where the profile joins were perpendicular to the xy plane. It still works, but is full of internal errors, and besides this people found it overkill for the purpose. I recently found a copy of it floating in the internet by a colleague from Mexico.
Anyway... If anyone is interested, I post it here in attachment.

@Hmooslechner

Great progress Heimo!
Hmooslechner wrote:
There is another problem with streets: in curved sections, they usually are broader than in straigt directions - sections. Here the tube-command comes to its "boarders". The trailing-curve comes into the topic.
Yes. I think that a proper road/street tool will have to be much more complex than that.
Perhaps your object, instead of creating a single profile geometry, it could define the axis of the road and two separate profiles for the curbs. Then, by GDL you could generate a txt file with a point cloud of the curb path nodes. With this file we could automatically create a Mesh. What do you think?
Aaron Bourgoin
Virtuoso
I'm not sure if I'm entering this thread at the right time, but I am looking to use this amazing code snippet to create a tool for making metal flashing and copings for 2D details.

Without modifications, applying the Double Line as the 2D linetype I can create bend and ends. At the very least, I'd like to filet the right angles so that they look break-formed.

Has anyone used this poly line for the representation of bent metal or membranes?
Think Like a Spec Writer
AC4.55 through 27 / USA AC27-6000 USA
Rhino 8 Mac
MacOS 14.6.1
sinceV6
Advocate
Hmooslechner wrote:
I want to point you at my last polyline-Object on the foundation of sinceV6:
...



Profile-manager - profiles are used to follow the 3D-Polyline-Curve

Amazing as always!
The bezier construct object looks rather fun!

Best regards.
Mathias Jonathan
Advocate

Hi! Thank you for the object.

I found that the object stop to work with two points on my projects: I can't add any more points to the polyline. Do you know where it come from?

How many points did you use ?- if i remember right - its limited somehow  50 or 100 points or so- just add a new object to prolong it.

AC5.5-AC27EduAut, PC-Win10, MacbookAirM1, MacbookM1Max, Win-I7+Nvidia

Just two points in total.

There is also a minimum of needet points to it.. but i didnt test this, because i always uset more points..  logoically 3 points?

 

AC5.5-AC27EduAut, PC-Win10, MacbookAirM1, MacbookM1Max, Win-I7+Nvidia

It works with 3 points. The problem is that the object lets the user reduce to 2 points, and then, the object is blocked.

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!