How to create closed polycurves or polygons from autocad polylines

ultimately, I want to use the Geometry Intersectall node to find the intersecting closed areas of two geometries, but first I imported in the polylines and converted the geometry to polycurves, I don’t know how to close my poycurves.

any advice is appreciated, thanks

Hello Marshmallow - welcome to the community!

Could you please post a screenshot of your graph? That way it’s easier for everyone to understand :slight_smile:

This graph below may start to help if I’ve guessed what you are after. The PolyCurve.ByJoinedCurves node needs to have lines that are in a singular closed curve - you can’t have branches of lines (i.e like a tree).

1 Like

Thank you for the quick response. Here is a screenshot

I am trying to figure out the intersection areas circled in red

Thanks!


Capture|690x385

Are you able to share the originating DWG? If they are on different layers then we can probably do something! Exploding the Geometry makes it a little more difficult too parse.

If you can share - we can have a look at it :slight_smile:

Hey,

Just out of curiosity, which package are you using?

A couple of points which are hopefully of interest…

As Sol is alluding to, there is a lot of geometry in your image, we’ll want to try and find a way of isolating those particular areas, ideally by layer or object type?

If there is a dwg hatch there, you can extract that as a closed polycurve and bring it in ready for patching.

Otherwise, polycurve by points might be handy, along with prune duplicates & Is Closed :slight_smile:

Let us know how you get on!

Mark

I am using dynamo for Civil 3d, no third party packages are installed!

I ended up importing closed polylines and using the surface patch… that was a lot easier than importing them as separate polycurves!

Thanks

2 Likes

Hi Mark,

Could you expand a bit on this method you mentioned?

If there is a dwg hatch there, you can extract that as a closed polycurve and bring it in ready for patching.

I have a dwg I need to read area boundaries from but the polylines overlap and throw errors. I think obtaining a polycurve from each hatched area would be ideal.

Hey,

I think if you play around with different packages, particularly BiMorph and LinkDwg you’ll find better ways, but off the top of my head, this works… You’ll see it’s not perfect!

Thank you Mark, I made use of the ImportGeometriesByLayer node from LinkDWG and it did the trick!

1 Like