External Internal Contours?

Hi all. I do need to extract the external and internal contours from some BREPs for CNC mechanization and unfortunately I can’t find a viable way to do so. I can’t find a way to merge or “solder” all the faces together so I can easily extract the contours of the shapes. Any help will be appreciated. Thank you.


External Internal Contours.gh (25.4 KB)

Hi,

You have a lot of surfaces that are degenerated (appear to be straight lines).

And duplicated curves.

This works but you’d better clean the input geometry.

External Internal Contours.gh (36.2 KB)

Yes I know, because they are BREPS projected on the XY plane. I just need the contours and literally nothing works properly in this situation, unfortunately.

I do attach the original BREPs, so maybe can find a way to extract the contours from the original BREPs:
test.3dm (185.5 KB)

Make2D could be a way.

External Internal Contours_Make2D.gh (84.9 KB)

I do tried this method, but unfortunately Make2D can’t distinguish between pockets that are not full depth and partial pockets.

I do need only the external and internal contours that are passing through the geometry.

This ? There is only one hole that goes entirely through the solids though, others are blind holes, chamfers of pockets.

I’m sorry but your original request is far from explicit.

External Internal Contours_OnlyFullHeight.gh (52.7 KB)

Thank you for the definition. Much better but still not working with mitered edges. Please find a new file with some mitered edges that are giving some weird results.

P.S. For this I wanted to project all the surfaces in one plane, because then I do have the guarantee that I will have the desired contours. The only drawback for that approach are the degenerated surfaces.

test.3dm (372.8 KB)

I still don’t understand if you want those chamfers to show up of not.
I’ve added a test for the direction of the surface, it removes all non-vertical surfaces.
Maybe you can use this the other way around, keep only non-vertical faces and project their edges…

External Internal Contours_OnlyFullHeight.gh (18.4 KB)

1 Like

It is working better but still not working with any kind of shapes.

In this case it is not working with parts that have cutouts:


test.3dm (736.7 KB)

@Cumberland
Are you talking about something like this?
2d 2023.gh (6.9 KB)

No, I do need only the pass-throug contours. The ones where the parts have holes from top to bottom.

Drown with the mouse, hopefully it can be understood:

I need something that works with any shape you can imagine projecting the pass-throug contour from top to bottom view of the parts.

Personally I tried a lot of strategies but literally nothing seems to work in this situation. Maybe somebody with programming skills can write a script or component to do this task.

My personal preference it is to “Squash” all the faces projected on the XY plane because this way I am 100% that I can extract the desired edges but I am stuck to the merging all the resulting faces together phase, because looks like there it is no way to join all the resulting faces together.

You may find this interesting.

As you can see it is not working:

@Cumberland
Ok, I have almost run out of ideas (I have been sick all day. Thus the sporadic posts) Here is my last shot. Looking at your parts it seems that I got the desired result. :grimacing:
Brep to Meshshadow to Boundrysurface :slightly_smiling_face:


I also tried this variant, the drawback it is that it not producing accurate arcs and circles. All of them are converted to polyline segments, not a desirable result, unless I can find a way to convert this segments into arcs and circles.

Maybe use the MShadow calculations to cull all the internal edges and join only the external ones in closed polylines?

Here is the solution.

Now this is the part where I quit because I know the next thing you are going to answer is a new edge-case that breaks this.

External Internal Contours_OnlyFullHeight.gh (9.9 KB)

4 Likes

Thank you. For now it is working.