Polyline / polygon rectangles from cogo point location

Hi,

Still new to dynamo, am trying to convert old vb apps to dynamo. This one in the end will draw runway centerline and other markings, first is the centerline stripes. I was able to create points at the beginning and end of stripes from each end of runway. Runways stripes are set from each runway end to the midpoint of the runway, basically, how many 120-foot-long stripes, with 80-foot space fit in the distance from the start of stripes 310 feet from runway end to the midpoint. The issue I’m having is how to use these layout points to calc / draw the rectangle or polygon, my old routine would set first point and test if there was enough room to place the next stripe, if true it would generate the 4 points to define the stripe, then assign those point locations to a polyline, draw it, then set the same start point for next stripe and loop until done or distance was false.
I am having a hard time seeing how I can do the same in dynamo. Maybe I just need to do it differently in dynamo, it seems like a simple task, generate layout points, which I’ve done, then create offset points from those point locations that define a 3-foot wide by 120 long stripe polyline and stuff those points into a polyline / polygon create tool.

Thanks John,
marking centerline.pdf (29.5 KB)


marking centerline.dwg (1.1 MB)
MARKING CENTERLINE CogoPoints by station offset.dyn (62.5 KB)

Hi,
Could you please try this Dyn Script? I did it quickly, so I apologize for any mess.
MARKING CENTERLINE Test.dyn (96.0 KB)

Hola amigos buenas. amigo @jcoon there are some options to do this, if you get already the Cogo points by station offset, you can use this points to put a plane and align it with the alignment and then draw a rectangle in this plane, after you can import the geometry to C3D i let you an example.



Come take a look to the basics post of autocad.

A.C3D,

This looks like what I’m trying to do, now I have to figure out what it’s doing.
Thank you, it might take a day or so to get back to you after I understand what is doing.

Thank you,

Sorry again for the mess.

I might be able to use this as well, stripes include polyline and a layer for solid hatch. hopefully I can use both.

Thank you

1 Like

A.C3D,

Do you know how to fix the unresolved error. this works fine in dynamo, but doesn’t draw in AutoCAD.

Do you have all needed packages installed? Seems like one is missing or if the graph Isn’t created in Civil 3D

Thank you, Patrick,.

1 Like

A.C3D,

For some reason I could not get Dynamo to resolve the polycurve.points node you had, so I added another polycurve.points from a spring node with the same name, but I’m not sure it’s doing what you had scripted. It runs the script without error, but the spacing inserts the first stripe in the correct location and size, but the remaining stripes are being inserted with a 206.69 distance that I’m not skilled enough to find where that is being applied yet. also, I’m not sure what the unresolved node is doing, maybe that’s why the spacing is wrong.
Thank you for your help.

MARKING CENTERLINE Test-spacing-question.dyn (135.2 KB)
p.


MARKING CENTERLINE Test-spacing-question.dwg (1.2 MB)

Hi, sorry for late :frowning: try this:
MARKING CENTERLINE Test-spacing-question.dyn (152.5 KB)

A.C3D,

Thank you for looking at this, still making my way thru how you get this to work, I still get an unresolved note now on the “if” node, so I can’t really tell what that node if doing, the view workspace doesn’t show that it needs a different installed package, all packages are green checks, maybe it’s because I’m still working with 2021 civil 3D.

I’ll keep trying. thank you for all your efforts.

Amigo @jcoon buenas. i check your .dyn, i think your problems is mostly organization, in some points you create mathematics that gives nulls, and then you drag errors for the rest of the script.

I strongly advice you start practice to use groups and clean and organize better your scripts you can also download the package monochle, it allows you create and personalize your groups, i let you my standars.

Besides i have the impresion that you didn’t read the link i’ve send you the last time, there are the basics for autocad!!


Gilberto,

It’s not that I didn’t look at the link you gave me, it was I have never used planes before, I have used the create polylines like what A.C3D posted before. so, I thought I might have better chance understanding how that worked than the planes, I will try this out, and see if I can understand what you did. If I can I’ll use that as a go by.

It takes several hours listing coordinates and adding comments to understand how you and A.C3D scripts really do, I’m still pretty new to this, I learn something every time I open the program and read other posts. I really want to understand how these scripts work so I can produce more on my own.
Thank you.

1 Like

Hi All,

I changed this draft script to place the stripe polylines by cogo alignment station offsets points so it is much easier to see if the ultimate list used had the correct point locations before the polylines were placed. I have 2 questions, one is, how would you change the list that contains the polyline points so the polyline doesn’t cross over itself, I believe positions 0 & 1 are ok, but 2 & 3 I think need to switch, I looked at the definitions of all types of lists and I didn’t see one that was straight forward that would let me switch out or swap a position in the list.

Q2, when I run this script in automatic mode that uses an alignment and cogo point station offset locations to create the point list for the polyline, it doesn’t draw the new polylines when I move the alignment, is this normal with the use of cogo point station offset points, even in manual mode
I had to close the script and reload to update the polylines location by station offset points

Thank you,
John.

Hi All,

I’m sure there are other ways of switching positions in a list, but I found this reorder list, and it does
what I needed, switch order of original list to new order.
John