Curve to polyline

image

Is there a way i can change this curve to a polyline?

Hi,
What’s the idea? You need to clarify more or share the .dyn so we can help you.


i have two points like this on my 2 different alignments. First i want to create lines joining these points and then extend the line on either side by 3-4m. Then i will create the offset alignments on either side of my 2 main alignments. Those offset alignments will intersect somewhere with my lines. I want to get that point and its chainage. In the method that i am trying right now, i am not able to get a node which give intersect of curve and alignment. I will share the draft script on which i am working.
sample script.dyn (59.3 KB)

Can you share a sample dwg too ?

You can convert your alignment to polycurve and work with it;
image

image

The problem is not with alignment. The problem is with the lines. I am using above node to get the intersections of alignment with curve lines. But i am not getting that since the “object” input in this node does not support curves, so I wanted to convert curve line into polyline so that it will support the “object” type of this node.

In your case,I’ll use Geometry.intersect to get that intersection Point.

Thank you @A.C3D , it works. I have one more doubt. I want to create a polygon using four points.
image
I have these points in four different lists which looks like this.


I want to create a list which has different list in it each having 4 points taken from four separate initial lists.
I am uploading the script for reference. Please let me know how to achieve this.
sample script.dyn (131.9 KB)

Please attach a dwg sample.

fortunately, this issue is being resolved and i am able to create the polygons.

Now the issue is that even though 4 polygons are being created here in script, i don’t see any of them in my drawing.

Test_Design File.dwg - Google Drive

sample script.dyn (134.5 KB)

I am sharing dwg sample as well as updated script. Please check why no polygon is created.

The Polygon is still just an Object inside of Dynamo. To get it to the DWG-drawing you need a node to create an object inside of Civil 3D.

Try using this node instead of the Polygon node, Polyline.ByPoints.

image

Hola Amigos buenas. @A.C3D @ritesh.trivedi885J6 before to run learn to walk, make your baby steps first begin reading the hand book, to learn the dynamo Core and other resources first.

https://dictionary.dynamobim.com/#/

Search post related also.

and for last read also the specialized threads for Civil3DToolKit, Camber, and Arkance Systems, i hope this helps you and good look!!

1 Like

image
this only joins my 4 points and create lines…but i want to join the last points with first point again and complete the polygon.
is there a way to achieve that?

Yes, you can use PolyCurve.ByPoints to create a curve with the option connectLastToFirst being set to true. Then within the Package Civil3DToolkit you can find the node PolylineExtensions.ObjectByGeometry that will give you a Polyline from the Polycurve.

You can add simply polyline.setIsClosed.
image

1 Like

this works…thank you for the helo @HenrikJ and @A.C3D .
I have one more doubt …During working on script i am creating line geometry so that i can use that to get intersect points for some further calculation purpose but i don’t want these lines to be drawn in my Dwg drawing. Is there a way i can off their visibility in main drawing?
image
image
for example…this alignment and curve. I have created them but i don’t want to be visible in my drawing.