Rectangle around curve geometry

Hi got curve in a random order - forming multiple shape with curve I want to place a rentangle around each shape at perimeter.
I am not getting any idea how to identify or group curve which are making a shape as all coming random from Cad.CurvesFromCadLayers

Also these curve coming out from a same layer

@sovitek could you please help

In the picture red outline is what i want

Hello and welcome, im not in dyn in the moment, try group these curves in 4 curve area, try group by distance from spring, and use a BoundingBox.ByGeometry…but you are welcome share that cad :wink:

something here maybe…

2 Likes

Thanks for quick action @sovitek , as a new user I am not allowed to attached things

I have tried this and stuck in a loop “Run Started” for more than 10mins now

allright no worries you can share with webtransfer, filetransfer etc. and share the link here

Bit of simplified version.

Hi Vijay, for each shape I want to have rectangle not combined

Something to try:

  1. Get the bounding box for each curve
  2. Convert the bounding boxes to cuboids
  3. Union the cuboids into one solid
  4. Separate the disjointed solids
  5. Check each curve for intersection with each solid
  6. Get the index of the true intersection result
  7. Group the curves by the key of intersection index
1 Like

I might have multiple point at same place so i use this logic to make it bit lighter

but in one direction it is not fully capturing the area

@jacob.small not sure what I need to do after this

Uploading: image.png…

Test-1.dwg (271.0 KB)

@sovitek - here is the cad file

Hi try something here and see if it could work for you

@sovitek thanks its working, but if I have curve not mesh how would I get mesh

in the main Cad file I have different layer so I have to go with CurveByCadLayers

allright we can only help with that cad you shared and is has only one layer, if its another cad and another situation i cant help you , right now…for get the mesh on your shared cad just select as i try show in the image

1 Like

thanks @sovitek, I think I got the workaround here