//function : Execute
//purpose :
//=======================================================================
-Standard_Integer GEOMImpl_BooleanDriver::Execute(LOGBOOK& log) const
+Standard_Integer GEOMImpl_BooleanDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
aList2.Append(aShape2);
aCSI.SetArguments(aList1);
aCSI.Perform();
-#if OCC_VERSION_LARGE > 0x07010000
if (aCSI.HasErrors() || aCSI.DS().Interferences().Extent() > 0)
-#else
- if (aCSI.ErrorStatus() || aCSI.DS().Interferences().Extent() > 0)
-#endif
StdFail_NotDone::Raise("Boolean operation will not be performed, because argument shape is self-intersected");
aCSI.SetArguments(aList2);
aCSI.Perform();
-#if OCC_VERSION_LARGE > 0x07010000
if (aCSI.HasErrors() || aCSI.DS().Interferences().Extent() > 0)
-#else
- if (aCSI.ErrorStatus() || aCSI.DS().Interferences().Extent() > 0)
-#endif
StdFail_NotDone::Raise("Boolean operation will not be performed, because argument shape is self-intersected");
}
aList1.Append(aShape);
aCSI.SetArguments(aList1);
aCSI.Perform();
-#if OCC_VERSION_LARGE > 0x07010000
if (aCSI.HasErrors() || aCSI.DS().Interferences().Extent() > 0) {
-#else
- if (aCSI.ErrorStatus() || aCSI.DS().Interferences().Extent() > 0) {
-#endif
StdFail_NotDone::Raise("Boolean operation will not be performed, because argument shape is self-intersected");
}
}
aList2.Append(aShape2);
aCSI.SetArguments(aList2);
aCSI.Perform();
-#if OCC_VERSION_LARGE > 0x07010000
if (aCSI.HasErrors() || aCSI.DS().Interferences().Extent() > 0) {
-#else
- if (aCSI.ErrorStatus() || aCSI.DS().Interferences().Extent() > 0) {
-#endif
StdFail_NotDone::Raise("Boolean operation will not be performed, because argument shape is self-intersected");
}
}
aList1.Append(aShape);
aCSI.SetArguments(aList1);
aCSI.Perform();
-#if OCC_VERSION_LARGE > 0x07010000
if (aCSI.HasErrors() || aCSI.DS().Interferences().Extent() > 0) {
-#else
- if (aCSI.ErrorStatus() || aCSI.DS().Interferences().Extent() > 0) {
-#endif
StdFail_NotDone::Raise("Boolean operation will not be performed, because argument shape is self-intersected");
}
}
aList2.Append(aTool);
aCSI.SetArguments(aList2);
aCSI.Perform();
-#if OCC_VERSION_LARGE > 0x07010000
if (aCSI.HasErrors() || aCSI.DS().Interferences().Extent() > 0) {
-#else
- if (aCSI.ErrorStatus() || aCSI.DS().Interferences().Extent() > 0) {
-#endif
StdFail_NotDone::Raise("Boolean operation will not be performed, because argument shape is self-intersected");
}
}
aFunction->SetValue(aShape);
-#if OCC_VERSION_MAJOR < 7
- log.SetTouched(Label());
-#else
log->SetTouched(Label());
-#endif
return 1;
}
TopoDS_Shape aStepResult = BO.Shape();
// check result of this step: if it is a compound (boolean operations
- // allways return a compound), we add all sub-shapes of it.
+ // always return a compound), we add all sub-shapes of it.
// This allows to avoid adding empty compounds,
// resulting from COMMON on two non-intersecting shapes.
if (aStepResult.ShapeType() == TopAbs_COMPOUND) {
-#if OCC_VERSION_MAJOR >= 7
if ((aValue1.ShapeType() == TopAbs_FACE || aValue1.ShapeType() == TopAbs_SHELL) &&
(aValue2.ShapeType() == TopAbs_FACE || aValue2.ShapeType() == TopAbs_SHELL)) {
aStepResult = makeCompoundShellFromFaces(aStepResult);
}
-#endif
TopoDS_Iterator aCompIter (aStepResult);
for (; aCompIter.More(); aCompIter.Next()) {
// add shape in a result
}
if (isCompound) {
// check result of this step: if it is a compound (boolean operations
- // allways return a compound), we add all sub-shapes of it.
+ // always return a compound), we add all sub-shapes of it.
// This allows to avoid adding empty compounds,
// resulting from CUT of parts
if (aCut.ShapeType() == TopAbs_COMPOUND) {
-#if OCC_VERSION_MAJOR >= 7
if (itSub1.Value().ShapeType() == TopAbs_FACE ||
itSub1.Value().ShapeType() == TopAbs_SHELL) {
aCut = makeCompoundShellFromFaces(aCut);
}
-#endif
TopoDS_Iterator aCompIter (aCut);
for (; aCompIter.More(); aCompIter.Next()) {
// add shape in a result
// perform FUSE operation
else if (theType == BOOLEAN_FUSE) {
-#if OCC_VERSION_MAJOR >= 7
Standard_Boolean isFaces = Standard_False;
TopTools_ListOfShape listShape1, listShape2;
GEOMUtils::AddSimpleShapes(theShape1, listShape1);
}
}
}
-#endif
// Perform
BRepAlgoAPI_Fuse BO (theShape1, theShape2);
StdFail_NotDone::Raise("Fuse operation can not be performed on the given shapes");
}
aShape = BO.Shape();
-#if OCC_VERSION_MAJOR >= 7
if (isFaces)
aShape = makeCompoundShellFromFaces(aShape);
-#endif
}
// perform SECTION operation
TopoDS_Shape aStepResult = BO.Shape();
// check result of this step: if it is a compound (boolean operations
- // allways return a compound), we add all sub-shapes of it.
+ // always return a compound), we add all sub-shapes of it.
// This allows to avoid adding empty compounds,
// resulting from SECTION on two non-intersecting shapes.
if (aStepResult.ShapeType() == TopAbs_COMPOUND) {
return true;
}
-OCCT_IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_BooleanDriver,GEOM_BaseDriver);
+IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_BooleanDriver,GEOM_BaseDriver);