}
// Check self-intersection.
- if (isCheckSelfInte) {
+ if (isCheckSelfInte && aType == PARTITION_NO_SELF_INTERSECTIONS) {
CheckSelfIntersection(aShape_i);
}
}
// Check self-intersection.
- if (isCheckSelfInte) {
+ if (isCheckSelfInte && aType == PARTITION_NO_SELF_INTERSECTIONS) {
CheckSelfIntersection(aShape_i);
}
Standard_NullObject::Raise("In Half Partition a shape or a plane is null");
}
- // Check self-intersection.
- if (isCheckSelfInte) {
- CheckSelfIntersection(aShapeArg);
- CheckSelfIntersection(aPlaneArg);
- }
-
TopoDS_Shape aShapeArg_copy;
TopoDS_Shape aPlaneArg_copy;
{
}
// add object shapes that are in ListShapes;
- PS.AddArgument(aShapeArg_copy);
- //PS.AddShape(aShapeArg);
+ TopTools_ListOfShape aSimpleShapes;
+ TopTools_MapOfShape aShapesMap;
+
+ PrepareShapes(aShapeArg_copy, aType, aSimpleShapes);
+
+ TopTools_ListIteratorOfListOfShape aSimpleIter (aSimpleShapes);
+
+ for (; aSimpleIter.More(); aSimpleIter.Next()) {
+ const TopoDS_Shape& aSimpleSh = aSimpleIter.Value();
+
+ if (aShapesMap.Add(aSimpleSh)) {
+ PS.AddArgument(aSimpleSh);
+ }
+ }
// add tool shapes that are in ListTools and not in ListShapes;
PS.AddTool(aPlaneArg_copy);
AddParam( theParams, "Resulting type", (TopAbs_ShapeEnum) aCI.GetLimit());
AddParam( theParams, "Keep shapes of lower type", aCI.GetKeepNonlimitShapes());
AddParam( theParams, "No object intersections", ( aType == PARTITION_NO_SELF_INTERSECTIONS ));
+
+ if (aType == PARTITION_NO_SELF_INTERSECTIONS) {
+ AddParam( theParams, "Check self-intersections", aCI.GetCheckSelfIntersection());
+ }
break;
case PARTITION_HALF:
AddParam( theParams, "Object", aCI.GetShape() );