Trim a surface with another surface

Hello Dynamo community,

I am hoping you can help me with this. I am trying to trim this cylindrical surface with the other surfaces.

The surface to be trimmed is the extrusion of a polycurve like so:

The trimming surfaces are selected faces in the revit model like so:

I have tried many approaches…
The one which seems more promising is to trim the surface with the intersection between the surfaces like so:

How do I use these intersections to trim the surface?
Honestly, I don’t know what to do with this anymore, I have tried many things but nothing worked.

Any help would be appreciated!

Try Geometry.Split

1 Like

Thank you for the reply @JacobSmall.

Unfortunately Geometry.Split doesn’t seem to be working either.

Most geometric operations that work with surfaces, do not support polysurfaces. I’m sure you’ll get a lot more help if you attach the geometry in question. You can export the two parts to a .sat file and attach them here.

1 Like

Thank you for the reply @Dimitar_Venkov
Here are the files:
Analytical Model 8.dyn (74.2 KB)AnalyticalModel.sat (561.4 KB)

No need for the geometry.intersect. Use the polysurface as your other.

Hi,

Hi @JacobSmall , I tried that as well but still it does not cut the geometry.

@Durmus_Cesur, can you explain your approach? It seems to me that you are suggesting to get the bounding box by points of the cylinder voids. My question is: how do I select the cylinder voids?

He’s showing what I suggested.

Check your previews -

1 Like

Hi,

I’m sorry I answered late. Please do the checks.

Durmus


Thank you @JacobSmall and @Durmus_Cesur
The only disadvantage to this approach is that I would have to define my cutting surfaces through the center, radius, and normal, but I don’t have that information on the cylinder voids. It would be ideal to use the current geometry in the model, instead of creating it from scratch. I have to use the polysurface obtained from the element geometry of the selected model element.

The issue is that I can’t seem to be able to cut the geometry with the polysurface.BySolid as you can see here:

Use the solid instead of a polysurface. If that fails do a save as, delete everything but that element from the model, and upload the model and your dyn.

1 Like

It didn’t work @JacobSmall.

Analytical Model 11.dyn (73.0 KB) AnalyticalModel.sat (561.4 KB)

Surface/Surface trimming tend to be error prone. try replacing the curve.extrude with an extrude as solid and see if that gives you more consistent results

Thank you for the reply @jp2982.
However, my end goal is to obtain a cylindrical surface with those circular holes, and thus, not a solid.
Unless… maybe I can try do to that and then obtain just the outer face of the new solid…
I will try that and let you know how it goes.

That sat was of no help at all :stuck_out_tongue:

I’d say your best bet is the Surface.SubtractFrom node. You’ll need to cut each face of the extruded polycurve and subtract the solid from it.

However, if you have faces that are cut more than once, then you’ll need to do something a bit trickier - imperatively iterate each face and cut it consecutively with each solid.

Yep. if we can’t get the Revit file with the elements used to create the cutting geometry and the elements being cut, then we can’t do much of anything. @RitaAguiar, please upload the .rvt with the unnecessary model elements as previously requested if you’re still looking for assistance.

@JacobSmall and @Dimitar_Venkov
Here is the .rvt file


The challenge here is to obtain the cylindrical voids with which I want to cut the surface. I must obtain those voids from the solid itself and not recreate them from scratch as that is error prone.

@JacobSmall and @Dimitar_Venkov, did you have a look at the revit file?