
Thu, 10/11/2007 - 14:04
Hi,
in my application I need to create sections between compound shape (from iges) and a planar face. I'm using OCCT6.2
With some iges all works in the right way. However with complex file i get a "freezing" problem during the edge Ais_InteractiveShape display.
My display code:
Handle(AIS_Shape) ais6 = new AIS_Shape(S3);
if (!ais6.IsNull())
{
myAISContext->SetColor(ais6, color,Standard_False);
myAISContext->SetMaterial(ais6,material,Standard_False);
myAISContext->SetTransparency(ais6,myTransparency,Standard_False); myAISContext->Display(ais6,Standard_False);//Here the code "freeze"
}
Section creation code:
BRepAlgo_Section section(toCut,cutter,Standard_False);
//BRepAlgoAPI_Section always fail...
//BRepAlgoAPI_Section section(toCut,cutter,Standard_False);
section.Approximation(Standard_True);
section.ComputePCurveOn1(Standard_True);
section.Build();
//
if (section.IsDone())
{
sec=section.Shape();
bRet=true;
}
I do:
-ShapeFix_Shape after iges import.
-ShapeFix_Edge after section creation
-Extracting the Handle_Geom_Curve from edge TopoDS_Edge and create a new TopoDS_Edge from that curve
Any hint?
Thu, 10/11/2007 - 17:12
Hi,
try to use intersection (GeomAPI_IntSS) between your compound and the plan instead of section.
Fri, 10/12/2007 - 13:51
I have a compound shape, so it is composed of a lot of surfaces.
I need to cut all the model with one plane.. GeomAPI_IntSS can work with compound surfaces?
Sat, 10/13/2007 - 13:02
I never used it with compound, but it should work with any two couple of TopoDS_Shape.
Mon, 10/15/2007 - 15:41
I used the followinf solution:
1) extract from the compound only the Face object
2) build a new compound with the Faces from step 1
3) run the BRepAlgoAPI_Section
4) build one (or more) wire from the Edges creted by step 3
step 1 is mandatory (in my current experience) to use BRepAlgoAPI_Section succesfully