Brep with hole from two curves

Hello everybody.
I want to create a Brep with a hole from 2 concentric curves for example:

When I want to create a Brep whitout holes, I call the following function.
Surface mySurface= Surface.CreateExtrusion(curva, new Vector3d(0, 0, 10));

I have tried to create 2 breps with each curve and to use Brep.CreateBooleanIntersection() Brep.CreateBooleanDifference(),but not work.

Someone can help me?

Thank you.

Hi Miguel,

You can use
Breps = Rhino.Geometry.Brep.CreatePlanarBreps(ocurves)

and next extrude the Brep face(s) with BrepFace.CreateExtrusion(curve, cap)


Thank you very much for your answer Willem. But I don’t kwow how I can use this functions. Can you put a example please?

I write the following code:

   List<Curve> listCurves= new List<Curve>() { curveExt, curveInt};
   Brep brepAux = Brep.CreatePlanarBreps(curvasPlancha)[0];

And the brepAux is correct, but planar. How I can extrude brepAux with BrepFace.CreateExtrusion(???,false);

Thank you again.

I get it!

Where CurvePath in my case is

 brepFace.CreateExtrusion(new LineCurve(new Point3d(0,0,0),new Point3d(0, 0, 30)), true);

i.e, the path that extrusion has to follow.

All code is:

                    List<Curve> curvasPlancha = new List<Curve>() { curvaInterior, curvaExterior };

                    Brep aux = Brep.CreatePlanarBreps(curvasPlancha)[0];

                    Brep aux2 = aux.Faces[0].CreateExtrusion(new LineCurve(new Point3d(0,0,0),new Point3d(0, 0, 30)), true );


1 Like