Error boolean common

Hi,
I have two IGES-files. I read this and than I use the brepalgoapi:

BRepAlgoAPI_Common algoOp = BRepAlgoAPI_Common(Shape1, SHape2);
cmp.Build();
TopoDS_Shape ShapeResult=cmp.Shape();

The problem is that I get this error:
- ShapeResult{myTShape={...} myLocation={...} myOrient=TopAbs_FORWARD } TopoDS_Shape

jelle's picture

If you expect a meaningful reply, than you probably need to share the CAD files [ also check if you can share the data publicly... ]

James D.'s picture

I don't know what you mean ... I have to simple files and can't use boolean COMMON. My second problem is the color.

// Function to load IGES
TopoDS_Shape aIGES1= readIGES("file1.igs");
TopoDS_Shape aIGES2= readIGES(file2.igs);

//boolean common
TopoDS_Shape aresult= booleanCommon (aIGES1, aIGES2);

// CREATE DOCUMENT AND APPLICATION
Handle(TDocStd_Document) aDoc;
Handle(XCAFApp_Application) anApp = XCAFApp_Application::GetApplication();
anApp->NewDocument("MDTV-XCAF",aDoc);
// CREATE A LABEL AND ADD A SHAPE TO IT
Handle (XCAFDoc_ShapeTool) myShapeTool = XCAFDoc_DocumentTool::ShapeTool(aDoc->Main());
TDF_Label aLabel = myShapeTool->NewShape();
myShapeTool->SetShape(aLabel,aresult);

// ADD COLOR TO THE LABEL
Handle(XCAFDoc_ColorTool) myColors = XCAFDoc_DocumentTool::ColorTool(aDoc->Main ());
Standard_Real r=1;
Standard_Real g=0;
Standard_Real b=0;
Quantity_Color theColor(r,g,b,Quantity_TOC_RGB);
myColors->SetColor(aLabel, theColor, XCAFDoc_ColorGen);

// WRITE THIS DOCUMENT AS A IGES FILE
IGESCAFControl_Writer *myWriter = new IGESCAFControl_Writer();
myWriter->Perform(aDoc,"file_resukt.gis";

James D.'s picture

No I do not have CAD Data . I have online the iges-files. I can cut or fuse the objects, but intersection does not work.