| BRepAlgoAPI_Cut fails |
 |
| Yaron |
2013/01/02 17:14 |
hi,
I'm to subtract one shape from another and from some reason, for certain shapes the operation fails (exception occurs).
I enclosed the shapes here where the subtraction is applied by the following code:
CString filename = "C:\\Temp\\S1.brep";
TopoDS_Shape aShape1;
Standard_CString aFileName = (Standard_CString)(LPCTSTR)filename;
BRep_Builder aBuilder;
BRepTools::Read(aShape1,aFileName,aBuilder);
filename = "C:\\Temp\\S2.brep";
TopoDS_Shape aShape2;
aFileName = (Standard_CString)(LPCTSTR)filename;
BRepTools::Read(aShape2,aFileName,aBuilder);
BRepAlgoAPI_Cut ba = BRepAlgoAPI_Cut(aShape1,aShape2);
TopoDS_Shape ShapeCut = ba.Shape();
Handle (AIS_Shape) ais3 = new AIS_Shape(ShapeCut);
myAISContext->SetDisplayMode(ais3,1,Standard_False);
myAISContext->SetColor(ais3,Quantity_NOC_RED,Standard_False);
myAISContext->SetMaterial(ais3,Graphic3d_NOM_PLASTIC,Standard_False);
myAISContext->Display(ais3,Standard_False);
myAISContext->SetCurrentObject(ais3,Standard_False);
Fit();
any ideas?
thanks |
|
You have to be logged in to download the attached file
|
 |
| | | |