Open CASCADE, the 3D modelling kernel
3D modeling & numerical simulation

Search the Forums
See All Topics
 

BRepAlgoAPI_Cut fails

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
 
 
Latest news
  • New features to enhance the development process
  • Open CASCADE Technology 6.7.1 is available for download!
  • Open CASCADE Technology 6.7.0 is available for download!

  • © OPEN CASCADE 2000 - 2014  |  Search  |  Contacts   |  Site map