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

Search the Forums
See All Topics
Open CASCADEShowroomGet it!Developer CornerSupport and ProductsAbout us
Technical overview
Areas of use
Advantages
FAQ
Screenshots
Shape factory
Shape gallery
Demonstrations
What's new
System requirements
Download Center
Public license
Documentation
Getting started
Forums
Open Source community
Training and e-learning
A-la Carte Support
Value-added software
Complementary Components
Customer Corner
Company Profile
Marketing Materials
Contact Us
News
Home / Developer Corner / Forums / Usage issues / BRepAlgoAPI_Cut fails

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
  • Open CASCADE Technology 6.7.0 is available for download!
  • Open CASCADE Technology 6.6.0 is available for download!
  • Open CASCADE Technology 6.5.5 is available for download!

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