1 // Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License, or (at your option) any later version.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 #include <Standard_Stream.hxx>
25 #include <GEOMImpl_PartitionDriver.hxx>
26 #include <GEOMImpl_IPartition.hxx>
27 #include <GEOMImpl_Types.hxx>
29 #include <GEOM_Object.hxx>
30 #include <GEOM_Function.hxx>
32 #include <GEOMAlgo_Splitter.hxx>
34 #include <TDataStd_IntegerArray.hxx>
35 #include <TNaming_CopyShape.hxx>
37 //#include <BRepBuilderAPI_Copy.hxx>
38 #include <BRep_Tool.hxx>
39 #include <BRepAlgo.hxx>
40 #include <BRepTools.hxx>
45 #include <TopoDS_Shape.hxx>
46 #include <TopoDS_Vertex.hxx>
47 #include <TopoDS_Wire.hxx>
48 #include <TopoDS_Iterator.hxx>
49 #include <TopTools_MapOfShape.hxx>
50 #include <TopTools_IndexedMapOfShape.hxx>
51 #include <TopTools_ListIteratorOfListOfShape.hxx>
52 #include <TopTools_DataMapOfShapeShape.hxx>
54 #include <ShapeFix_ShapeTolerance.hxx>
55 #include <ShapeFix_Shape.hxx>
57 #include <TColStd_IndexedDataMapOfTransientTransient.hxx>
58 #include <TColStd_ListIteratorOfListOfInteger.hxx>
59 #include <TColStd_ListOfInteger.hxx>
60 #include <Standard_NullObject.hxx>
61 #include <StdFail_NotDone.hxx>
62 #include <Precision.hxx>
64 #include <BOPAlgo_CheckerSI.hxx>
65 #include <BOPCol_IndexedDataMapOfShapeListOfShape.hxx>
66 #include <BOPCol_ListOfShape.hxx>
67 #include <BOPDS_DS.hxx>
69 // Depth of self-intersection check (see BOPAlgo_CheckerSI::SetLevelOfCheck() for more details)
70 // Default value for BOPAlgo_CheckerSI gives very long computation when checking face-to-face intersections;
71 // here check level is decreased to more appropriate value to avoid problems with performance).
72 #define BOP_SELF_INTERSECTIONS_LEVEL 4
74 //=======================================================================
77 //=======================================================================
78 const Standard_GUID& GEOMImpl_PartitionDriver::GetID()
80 static Standard_GUID aPartitionDriver("FF1BBB22-5D14-4df2-980B-3A668264EA16");
81 return aPartitionDriver;
85 //=======================================================================
86 //function : GEOMImpl_PartitionDriver
88 //=======================================================================
89 GEOMImpl_PartitionDriver::GEOMImpl_PartitionDriver()
93 //=======================================================================
94 //function : SimplifyCompound
96 //=======================================================================
97 static void PrepareShapes (const TopoDS_Shape& theShape,
98 Standard_Integer theType,
99 TopTools_ListOfShape& theSimpleList)
101 if (theType == PARTITION_NO_SELF_INTERSECTIONS ||
102 theShape.ShapeType() != TopAbs_COMPOUND) {
103 theSimpleList.Append(theShape);
107 // explode compound on simple shapes to allow their intersections
108 TopoDS_Iterator It (theShape, Standard_True, Standard_True);
109 TopTools_MapOfShape mapShape;
110 for (; It.More(); It.Next()) {
111 if (mapShape.Add(It.Value())) {
112 TopoDS_Shape curSh = It.Value();
113 PrepareShapes(curSh, theType, theSimpleList);
118 static void CheckSelfIntersection(const TopoDS_Shape &theShape)
120 BOPAlgo_CheckerSI aCSI; // checker of self-interferences
121 BOPCol_ListOfShape aList;
123 aList.Append(theShape);
124 aCSI.SetLevelOfCheck(BOP_SELF_INTERSECTIONS_LEVEL);
125 aCSI.SetArguments(aList);
128 if (aCSI.ErrorStatus() || aCSI.DS().Interferences().Extent() > 0) {
129 StdFail_NotDone::Raise("Partition operation will not be performed, because argument shape is self-intersected");
133 //=======================================================================
136 //=======================================================================
137 Standard_Integer GEOMImpl_PartitionDriver::Execute(TFunction_Logbook& log) const
139 if (Label().IsNull()) return 0;
140 Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
142 GEOMImpl_IPartition aCI (aFunction);
143 Standard_Integer aType = aFunction->GetType();
144 const Standard_Boolean isCheckSelfInte = aCI.GetCheckSelfIntersection();
147 GEOMAlgo_Splitter PS;
149 TopTools_DataMapOfShapeShape aCopyMap;
150 TColStd_IndexedDataMapOfTransientTransient aMapTShapes;
152 if (aType == PARTITION_PARTITION || aType == PARTITION_NO_SELF_INTERSECTIONS)
154 Handle(TColStd_HSequenceOfTransient) aShapes = aCI.GetShapes();
155 Handle(TColStd_HSequenceOfTransient) aTools = aCI.GetTools();
156 Handle(TColStd_HSequenceOfTransient) aKeepIns = aCI.GetKeepIns();
157 Handle(TColStd_HSequenceOfTransient) aRemIns = aCI.GetRemoveIns();
158 Handle(TColStd_HArray1OfInteger) aMaterials = aCI.GetMaterials();
159 //skl Standard_Boolean DoRemoveWebs = !aMaterials.IsNull();
162 //unsigned int ind, nbshapes = 0;
163 //nbshapes += aShapes->Length() + aTools->Length();
164 //nbshapes += aKeepIns->Length() + aRemIns->Length();
165 //TopTools_MapOfShape ShapesMap(nbshapes), ToolsMap(nbshapes);
166 TopTools_MapOfShape ShapesMap, ToolsMap;
168 // add object shapes that are in ListShapes;
169 for (ind = 1; ind <= aShapes->Length(); ind++) {
170 Handle(GEOM_Function) aRefShape = Handle(GEOM_Function)::DownCast(aShapes->Value(ind));
171 TopoDS_Shape aShape_i = aRefShape->GetValue();
172 if (aShape_i.IsNull()) {
173 Standard_NullObject::Raise("In Partition a shape is null");
176 // Check self-intersection.
177 if (isCheckSelfInte && aType == PARTITION_NO_SELF_INTERSECTIONS) {
178 CheckSelfIntersection(aShape_i);
181 TopoDS_Shape aShape_i_copy;
182 TNaming_CopyShape::CopyTool(aShape_i, aMapTShapes, aShape_i_copy);
184 // fill aCopyMap for history
185 TopTools_IndexedMapOfShape aShape_i_inds;
186 TopTools_IndexedMapOfShape aShape_i_copy_inds;
187 TopExp::MapShapes(aShape_i, aShape_i_inds);
188 TopExp::MapShapes(aShape_i_copy, aShape_i_copy_inds);
189 Standard_Integer nbInds = aShape_i_inds.Extent();
190 for (Standard_Integer ie = 1; ie <= nbInds; ie++) {
191 aCopyMap.Bind(aShape_i_inds.FindKey(ie), aShape_i_copy_inds.FindKey(ie));
194 TopTools_ListOfShape aSimpleShapes;
195 //PrepareShapes(aShape_i, aType, aSimpleShapes);
196 PrepareShapes(aShape_i_copy, aType, aSimpleShapes);
197 TopTools_ListIteratorOfListOfShape aSimpleIter (aSimpleShapes);
198 for (; aSimpleIter.More(); aSimpleIter.Next()) {
199 const TopoDS_Shape& aSimpleSh = aSimpleIter.Value();
200 if (ShapesMap.Add(aSimpleSh)) {
201 PS.AddArgument(aSimpleSh);
202 //skl if (DoRemoveWebs) {
203 //skl if (aMaterials->Length() >= ind)
204 //skl PS.SetMaterial(aSimpleSh, aMaterials->Value(ind));
210 // add tool shapes that are in ListTools and not in ListShapes;
211 for (ind = 1; ind <= aTools->Length(); ind++) {
212 Handle(GEOM_Function) aRefShape = Handle(GEOM_Function)::DownCast(aTools->Value(ind));
213 TopoDS_Shape aShape_i = aRefShape->GetValue();
214 if (aShape_i.IsNull()) {
215 Standard_NullObject::Raise("In Partition a tool shape is null");
218 // Check self-intersection.
219 if (isCheckSelfInte && aType == PARTITION_NO_SELF_INTERSECTIONS) {
220 CheckSelfIntersection(aShape_i);
224 //BRepBuilderAPI_Copy aCopyTool (aShape_i);
225 TopoDS_Shape aShape_i_copy;
226 TNaming_CopyShape::CopyTool(aShape_i, aMapTShapes, aShape_i_copy);
227 //if (aCopyTool.IsDone())
228 // aShape_i_copy = aCopyTool.Shape();
230 // Standard_NullObject::Raise("Bad shape detected");
232 // fill aCopyMap for history
233 TopTools_IndexedMapOfShape aShape_i_inds;
234 TopTools_IndexedMapOfShape aShape_i_copy_inds;
235 TopExp::MapShapes(aShape_i, aShape_i_inds);
236 TopExp::MapShapes(aShape_i_copy, aShape_i_copy_inds);
237 Standard_Integer nbInds = aShape_i_inds.Extent();
238 for (Standard_Integer ie = 1; ie <= nbInds; ie++) {
239 aCopyMap.Bind(aShape_i_inds.FindKey(ie), aShape_i_copy_inds.FindKey(ie));
242 TopTools_ListOfShape aSimpleShapes;
243 //PrepareShapes(aShape_i, aType, aSimpleShapes);
244 PrepareShapes(aShape_i_copy, aType, aSimpleShapes);
245 TopTools_ListIteratorOfListOfShape aSimpleIter (aSimpleShapes);
246 for (; aSimpleIter.More(); aSimpleIter.Next()) {
247 const TopoDS_Shape& aSimpleSh = aSimpleIter.Value();
248 if (!ShapesMap.Contains(aSimpleSh) && ToolsMap.Add(aSimpleSh)) {
249 PS.AddTool(aSimpleSh);
254 // add shapes that are in ListKeepInside, as object shapes;
255 for (ind = 1; ind <= aKeepIns->Length(); ind++) {
256 Handle(GEOM_Function) aRefShape = Handle(GEOM_Function)::DownCast(aKeepIns->Value(ind));
257 TopoDS_Shape aShape_i = aRefShape->GetValue();
258 if (aShape_i.IsNull()) {
259 Standard_NullObject::Raise("In Partition a Keep Inside shape is null");
262 //BRepBuilderAPI_Copy aCopyTool (aShape_i);
263 TopoDS_Shape aShape_i_copy;
264 TNaming_CopyShape::CopyTool(aShape_i, aMapTShapes, aShape_i_copy);
265 //if (aCopyTool.IsDone())
266 // aShape_i_copy = aCopyTool.Shape();
268 // Standard_NullObject::Raise("Bad shape detected");
270 // fill aCopyMap for history
271 TopTools_IndexedMapOfShape aShape_i_inds;
272 TopTools_IndexedMapOfShape aShape_i_copy_inds;
273 TopExp::MapShapes(aShape_i, aShape_i_inds);
274 TopExp::MapShapes(aShape_i_copy, aShape_i_copy_inds);
275 Standard_Integer nbInds = aShape_i_inds.Extent();
276 for (Standard_Integer ie = 1; ie <= nbInds; ie++) {
277 aCopyMap.Bind(aShape_i_inds.FindKey(ie), aShape_i_copy_inds.FindKey(ie));
280 TopTools_ListOfShape aSimpleShapes;
281 //PrepareShapes(aShape_i, aType, aSimpleShapes);
282 PrepareShapes(aShape_i_copy, aType, aSimpleShapes);
283 TopTools_ListIteratorOfListOfShape aSimpleIter (aSimpleShapes);
284 for (; aSimpleIter.More(); aSimpleIter.Next()) {
285 const TopoDS_Shape& aSimpleSh = aSimpleIter.Value();
286 if (!ToolsMap.Contains(aSimpleSh) && ShapesMap.Add(aSimpleSh))
287 PS.AddArgument(aSimpleSh);
291 // add shapes that are in ListRemoveInside, as object shapes;
292 for (ind = 1; ind <= aRemIns->Length(); ind++) {
293 Handle(GEOM_Function) aRefShape = Handle(GEOM_Function)::DownCast(aRemIns->Value(ind));
294 TopoDS_Shape aShape_i = aRefShape->GetValue();
295 if (aShape_i.IsNull()) {
296 Standard_NullObject::Raise("In Partition a Remove Inside shape is null");
299 //BRepBuilderAPI_Copy aCopyTool (aShape_i);
300 TopoDS_Shape aShape_i_copy;
301 TNaming_CopyShape::CopyTool(aShape_i, aMapTShapes, aShape_i_copy);
302 //if (aCopyTool.IsDone())
303 // aShape_i_copy = aCopyTool.Shape();
305 // Standard_NullObject::Raise("Bad shape detected");
307 // fill aCopyMap for history
308 TopTools_IndexedMapOfShape aShape_i_inds;
309 TopTools_IndexedMapOfShape aShape_i_copy_inds;
310 TopExp::MapShapes(aShape_i, aShape_i_inds);
311 TopExp::MapShapes(aShape_i_copy, aShape_i_copy_inds);
312 Standard_Integer nbInds = aShape_i_inds.Extent();
313 for (Standard_Integer ie = 1; ie <= nbInds; ie++) {
314 aCopyMap.Bind(aShape_i_inds.FindKey(ie), aShape_i_copy_inds.FindKey(ie));
317 TopTools_ListOfShape aSimpleShapes;
318 //PrepareShapes(aShape_i, aType, aSimpleShapes);
319 PrepareShapes(aShape_i_copy, aType, aSimpleShapes);
320 TopTools_ListIteratorOfListOfShape aSimpleIter (aSimpleShapes);
321 for (; aSimpleIter.More(); aSimpleIter.Next()) {
322 const TopoDS_Shape& aSimpleSh = aSimpleIter.Value();
323 if (!ToolsMap.Contains(aSimpleSh) && ShapesMap.Add(aSimpleSh))
324 PS.AddArgument(aSimpleSh);
328 PS.SetLimitMode(aCI.GetKeepNonlimitShapes());
329 PS.SetLimit((TopAbs_ShapeEnum)aCI.GetLimit());
333 //skl PS.SetRemoveWebs(!DoRemoveWebs);
334 //skl PS.Build((TopAbs_ShapeEnum) aCI.GetLimit());
336 // suppress result outside of shapes in KInsideMap
337 for (ind = 1; ind <= aKeepIns->Length(); ind++) {
338 Handle(GEOM_Function) aRefShape = Handle(GEOM_Function)::DownCast(aKeepIns->Value(ind));
339 TopoDS_Shape aShape_i = aRefShape->GetValue();
340 PS.KeepShapesInside(aShape_i);
343 // suppress result inside of shapes in RInsideMap
344 for (ind = 1; ind <= aRemIns->Length(); ind++) {
345 Handle(GEOM_Function) aRefShape = Handle(GEOM_Function)::DownCast(aRemIns->Value(ind));
346 TopoDS_Shape aShape_i = aRefShape->GetValue();
347 PS.RemoveShapesInside(aShape_i);
351 else if (aType == PARTITION_HALF)
353 Handle(GEOM_Function) aRefShape = aCI.GetShape();
354 Handle(GEOM_Function) aRefPlane = aCI.GetPlane();
355 TopoDS_Shape aShapeArg = aRefShape->GetValue();
356 TopoDS_Shape aPlaneArg = aRefPlane->GetValue();
358 if (aShapeArg.IsNull() || aPlaneArg.IsNull()) {
359 Standard_NullObject::Raise("In Half Partition a shape or a plane is null");
362 TopoDS_Shape aShapeArg_copy;
363 TopoDS_Shape aPlaneArg_copy;
365 TNaming_CopyShape::CopyTool(aShapeArg, aMapTShapes, aShapeArg_copy);
366 //BRepBuilderAPI_Copy aCopyTool (aShapeArg);
367 //if (aCopyTool.IsDone())
368 // aShapeArg_copy = aCopyTool.Shape();
370 // Standard_NullObject::Raise("Bad shape detected");
372 // fill aCopyMap for history
373 TopTools_IndexedMapOfShape aShapeArg_inds;
374 TopTools_IndexedMapOfShape aShapeArg_copy_inds;
375 TopExp::MapShapes(aShapeArg, aShapeArg_inds);
376 TopExp::MapShapes(aShapeArg_copy, aShapeArg_copy_inds);
377 Standard_Integer nbInds = aShapeArg_inds.Extent();
378 for (Standard_Integer ie = 1; ie <= nbInds; ie++) {
379 aCopyMap.Bind(aShapeArg_inds.FindKey(ie), aShapeArg_copy_inds.FindKey(ie));
383 TNaming_CopyShape::CopyTool(aPlaneArg, aMapTShapes, aPlaneArg_copy);
384 //BRepBuilderAPI_Copy aCopyTool (aPlaneArg);
385 //if (aCopyTool.IsDone())
386 // aPlaneArg_copy = aCopyTool.Shape();
388 // Standard_NullObject::Raise("Bad shape detected");
390 // fill aCopyMap for history
391 TopTools_IndexedMapOfShape aPlaneArg_inds;
392 TopTools_IndexedMapOfShape aPlaneArg_copy_inds;
393 TopExp::MapShapes(aPlaneArg, aPlaneArg_inds);
394 TopExp::MapShapes(aPlaneArg_copy, aPlaneArg_copy_inds);
395 Standard_Integer nbInds = aPlaneArg_inds.Extent();
396 for (Standard_Integer ie = 1; ie <= nbInds; ie++) {
397 aCopyMap.Bind(aPlaneArg_inds.FindKey(ie), aPlaneArg_copy_inds.FindKey(ie));
401 // add object shapes that are in ListShapes;
402 TopTools_ListOfShape aSimpleShapes;
403 TopTools_MapOfShape aShapesMap;
405 PrepareShapes(aShapeArg_copy, aType, aSimpleShapes);
407 TopTools_ListIteratorOfListOfShape aSimpleIter (aSimpleShapes);
409 for (; aSimpleIter.More(); aSimpleIter.Next()) {
410 const TopoDS_Shape& aSimpleSh = aSimpleIter.Value();
412 if (aShapesMap.Add(aSimpleSh)) {
413 PS.AddArgument(aSimpleSh);
417 // add tool shapes that are in ListTools and not in ListShapes;
418 PS.AddTool(aPlaneArg_copy);
419 //PS.AddTool(aPlaneArg);
423 //PS.SetRemoveWebs(Standard_False);
424 //PS.Build(aShapeArg.ShapeType());
430 if (aShape.IsNull()) {
431 // Mantis issue 22009
432 if (PS.ErrorStatus() == 100 && PS.Tools().Extent() == 0 && PS.Arguments().Extent() == 1)
433 aShape = PS.Arguments().First();
438 //Alternative case to check not valid partition IPAL21418
439 TopoDS_Iterator It (aShape, Standard_True, Standard_True);
441 for (; It.More(); It.Next())
444 Standard_ConstructionError::Raise("Partition aborted : non valid shape result");
447 if (!BRepAlgo::IsValid(aShape)) {
448 // 08.07.2008 added by skl during fixing bug 19761 from Mantis
449 ShapeFix_ShapeTolerance aSFT;
450 aSFT.LimitTolerance(aShape, Precision::Confusion(),
451 Precision::Confusion(), TopAbs_SHAPE);
452 Handle(ShapeFix_Shape) aSfs = new ShapeFix_Shape(aShape);
454 aShape = aSfs->Shape();
455 if (!BRepAlgo::IsValid(aShape))
456 Standard_ConstructionError::Raise("Partition aborted : non valid shape result");
459 aFunction->SetValue(aShape);
461 // Fill history to be used by GetInPlace functionality
462 TopTools_IndexedMapOfShape aResIndices;
463 TopExp::MapShapes(aShape, aResIndices);
465 // Map: source_shape/images of source_shape in Result
466 const BOPCol_IndexedDataMapOfShapeListOfShape& aMR = PS.ImagesResult();
467 //const TopTools_IndexedDataMapOfShapeListOfShape& aMR = PS.ImagesResult();
469 // history for all argument shapes
470 // be sure to use aCopyMap
471 TDF_LabelSequence aLabelSeq;
472 aFunction->GetDependency(aLabelSeq);
473 Standard_Integer nbArg = aLabelSeq.Length();
475 for (Standard_Integer iarg = 1; iarg <= nbArg; iarg++) {
477 TDF_Label anArgumentRefLabel = aLabelSeq.Value(iarg);
479 Handle(GEOM_Object) anArgumentObject = GEOM_Object::GetReferencedObject(anArgumentRefLabel);
480 TopoDS_Shape anArgumentShape = anArgumentObject->GetValue();
482 TopTools_IndexedMapOfShape anArgumentIndices;
483 TopExp::MapShapes(anArgumentShape, anArgumentIndices);
484 Standard_Integer nbArgumentEntities = anArgumentIndices.Extent();
486 // Find corresponding label in history
487 TDF_Label anArgumentHistoryLabel =
488 aFunction->GetArgumentHistoryEntry(anArgumentRefLabel, Standard_True);
490 for (Standard_Integer ie = 1; ie <= nbArgumentEntities; ie++) {
491 TopoDS_Shape anEntity = anArgumentIndices.FindKey(ie);
492 // be sure to use aCopyMap here
493 if (aCopyMap.IsBound(anEntity))
494 anEntity = aCopyMap.Find(anEntity);
496 if (!aMR.Contains(anEntity)) continue;
498 const BOPCol_ListOfShape& aModified = aMR.FindFromKey(anEntity);
499 //const TopTools_ListOfShape& aModified = aMR.FindFromKey(anEntity);
500 Standard_Integer nbModified = aModified.Extent();
502 if (nbModified > 0) { // Mantis issue 0021182
504 BOPCol_ListIteratorOfListOfShape itM (aModified);
505 for (; itM.More() && nbModified > 0; itM.Next(), ++ih) {
506 if (!aResIndices.Contains(itM.Value())) {
511 if (nbModified > 0) {
512 TDF_Label aWhatHistoryLabel = anArgumentHistoryLabel.FindChild(ie, Standard_True);
513 Handle(TDataStd_IntegerArray) anAttr =
514 TDataStd_IntegerArray::Set(aWhatHistoryLabel, 1, nbModified);
517 BOPCol_ListIteratorOfListOfShape itM (aModified);
518 //TopTools_ListIteratorOfListOfShape itM (aModified);
519 for (; itM.More(); itM.Next(), ++ih) {
520 int id = aResIndices.FindIndex(itM.Value());
521 anAttr->SetValue(ih, id);
527 log.SetTouched(Label());
532 //================================================================================
534 * \brief Returns a name of creation operation and names and values of creation parameters
536 //================================================================================
538 bool GEOMImpl_PartitionDriver::
539 GetCreationInformation(std::string& theOperationName,
540 std::vector<GEOM_Param>& theParams)
542 if (Label().IsNull()) return 0;
543 Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
545 GEOMImpl_IPartition aCI( function );
546 Standard_Integer aType = function->GetType();
548 theOperationName = "PARTITION";
551 case PARTITION_PARTITION:
552 case PARTITION_NO_SELF_INTERSECTIONS:
553 AddParam( theParams, "Objects", aCI.GetShapes() );
554 AddParam( theParams, "Tool objects", aCI.GetTools() );
556 Handle(TColStd_HSequenceOfTransient) objSeq = aCI.GetKeepIns();
557 if ( !objSeq.IsNull() && objSeq->Length() > 0 )
558 AddParam( theParams, "Objects to keep inside", objSeq );
559 objSeq = aCI.GetRemoveIns();
560 if ( !objSeq.IsNull() && objSeq->Length() > 0 )
561 AddParam( theParams, "Objects to remove inside", objSeq );
562 Handle(TColStd_HArray1OfInteger) intSeq = aCI.GetMaterials();
563 if ( !intSeq.IsNull() && intSeq->Length() > 0 )
564 AddParam( theParams, "Materials", aCI.GetMaterials() );
566 AddParam( theParams, "Resulting type", (TopAbs_ShapeEnum) aCI.GetLimit());
567 AddParam( theParams, "Keep shapes of lower type", aCI.GetKeepNonlimitShapes());
568 AddParam( theParams, "No object intersections", ( aType == PARTITION_NO_SELF_INTERSECTIONS ));
570 if (aType == PARTITION_NO_SELF_INTERSECTIONS) {
571 AddParam( theParams, "Check self-intersections", aCI.GetCheckSelfIntersection());
575 AddParam( theParams, "Object", aCI.GetShape() );
576 AddParam( theParams, "Plane", aCI.GetPlane() );
585 IMPLEMENT_STANDARD_HANDLE (GEOMImpl_PartitionDriver,GEOM_BaseDriver);
586 IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_PartitionDriver,GEOM_BaseDriver);