For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings


Need to speed up your development?
Have a look at our:

Samples & Tools


Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

BRepOffsetAPI_MakeThickSolid Crash

Monty Sagar's picture

Hello all,

I am trying to contruct a dish like object as per the code below.

I use GC_MakeArcOfEllipse to make a quarter ellipse and together with two lines I can create a solid using BRepPrimAPI_MakeRevol.

Now when I try to make this hollow to make the dish by removing the bottom flat surface and defining a thickness in BRepOffsetAPI_MakeThickSolid, I get a crash.

Any help.

gp_Ax2 axes = gp::XOY();
Standard_Real R = 100;
Standard_Real r = 50;
Standard_Real Thickness = 15;
gp_Elips ell(axes, R, r);

gp_Trsf aTrsf;

aTrsf.SetRotation(gp_Ax1(gp_Pnt(0,0,0), gp_Dir(0, 0, 1)), 0.5*PI);

aTrsf.SetRotation(gp_Ax1(gp_Pnt(0,0,0), gp_Dir(0, 1, 0)), 0.5*PI);

Handle(Geom_TrimmedCurve) aArcOfEllipse = GC_MakeArcOfEllipse (ell, 0, 0.5*PI, true);

gp_Pnt aPnt1(0, 0, 0);
gp_Pnt aPnt2(0, R, 0);
gp_Pnt aPnt3(0, 0, r);

Handle(Geom_TrimmedCurve) aSegment1 = GC_MakeSegment(aPnt1 , aPnt2);
Handle(Geom_TrimmedCurve) aSegment2 = GC_MakeSegment(aPnt1 , aPnt3);

TopoDS_Edge aEdge1 = BRepBuilderAPI_MakeEdge(aSegment1);
TopoDS_Edge aEdge2 = BRepBuilderAPI_MakeEdge(aArcOfEllipse);
TopoDS_Edge aEdge3 = BRepBuilderAPI_MakeEdge(aSegment2);
TopoDS_Wire aWire = BRepBuilderAPI_MakeWire(aEdge1 , aEdge2 , aEdge3);

BRepBuilderAPI_MakeWire mkWire;

TopoDS_Wire myWireProfile = mkWire.Wire();

TopoDS_Face myFaceProfile = BRepBuilderAPI_MakeFace(myWireProfile);

gp_Ax1 axis(gp_Pnt(0,0,0),gp_Dir(0,0,1));

TopoDS_Shape Dish = BRepPrimAPI_MakeRevol(myFaceProfile,axis).Shape();
// Full revol

Handle(AIS_Shape) anAISShape = new AIS_Shape(Dish);

TopTools_ListOfShape facesToRemove;

//Remove the bottom face
facesToRemove.Append(FaceOfSolid(Dish, 0, axes));

Dish = BRepOffsetAPI_MakeThickSolid(Dish , facesToRemove , -Thickness, 1.e-9);

Contact us

Attention: DO NOT use this form for all kind of request for the removal of your personal data. Please follow this link for such cases.