Trim Surfaces

I’m having a problem trimming curves or even solids with some surfaces I import from Alias.

I always get the inner trim of a circle, instead of the main surface with a hole.

Can Anyone explain the exact method to trim a curve or solid into a surface?

When I’m home I’ll be able to post a screenshot of the code, as at work I can’t do it.


Two methods:

Actually there is one more, which we used for our sample files:
It takes a surface, and a solid (which can be several, not intersecting bodies) which is then removed (=trimming) form that surface. This is especially useful, if the entities you want to trim out of your surfaces vary in amount and shape, due to changing script parameters.
Hope that helps,

Sorry my late reply.
I’m still having problem trimming surfaces. The only way I can manage is to covert it into a solid and then use Solid.DifferenceAll to make holes.
I’ve an issue I’m having with TrimWithEdgeLoops. It keeps trimming the outer surface filling the holes instead.
I’ll post a screenshot to show what happens.

Maybe I’m doing something wrong.

Any help appreciated. :wink:

tried both but none of them worked for me ;(

try the surface difference nodes

Looks like there is a bug in the Trim with Edge loops as it’s behaving the exact opposite of what the diagram shows. Fortunately there is a "Surface.TrimWIthLoopsFix in the springs package that should do what you need. The node has no call to anything resources Dynamo so you should be able to leverage this in any environment.

1 Like

I think to get trimWithEdgeLoops to work as you expect you just need to add an outer loop around the interior loops. (ie a loop around the entire surface)

Well this is certainly a bug…

Faster and more stable than the custom node, so this is the work around for now. Not sure how it’ll handle surfaces which are not coplanar but with testing out @gianbupa.

@Michael_Kirschner2 I’m filing the GitHub issue now. :slight_smile:

I don’t think this is a bug.

@jacob.small @gianbupa by definition of the TrimWithEdgeLoops node, this is unfortunately not a bug. One is expected to provide all the edges of the surface, both outer and interior ones for the node to work as expected.

Ok, giving the outline of the surface it works.
Although is quite annoying as concept.

but now I have another issue.
It works with a single surface like a rect, but I work with complex surfaces and sometimes I use objects containing over 20 small surfaces.
It seems to work but everytime I press RUN, I have a different result.
Sometimes holes half cut, sometimes I get errors and now, for example, I get nothing

It seems I have to start scripting to get what I want and I didn’t really wanted to start coding.

Could you share a graph with some example workflows which are not working.