From: azv Date: Wed, 27 Nov 2019 08:30:37 +0000 (+0300) Subject: Change the paradigm of versioning of Boolean Operations on the Python API level. X-Git-Tag: V9_5_0a1~155 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=13c564bef7d39cd31b142d6723caf03501a4f683;p=modules%2Fshaper.git Change the paradigm of versioning of Boolean Operations on the Python API level. --- diff --git a/src/CollectionPlugin/Test/Test3031.py b/src/CollectionPlugin/Test/Test3031.py index a96f09ff5..878436f1c 100644 --- a/src/CollectionPlugin/Test/Test3031.py +++ b/src/CollectionPlugin/Test/Test3031.py @@ -34,7 +34,7 @@ model.do() Face_1 = model.addFace(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchCircle_1_2r")]) Edge_1 = model.addEdge(Part_1_doc, [model.selection("EDGE", "Sketch_2/SketchLine_1")]) Group_1 = model.addGroup(Part_1_doc, "Edges", [model.selection("EDGE", "Edge_1_1")]) -Partition_1 = model.addPartition(Part_1_doc, [model.selection("FACE", "Face_1_1"), model.selection("EDGE", "Edge_1_1")], 20190506) +Partition_1 = model.addPartition(Part_1_doc, [model.selection("FACE", "Face_1_1"), model.selection("EDGE", "Edge_1_1")], keepSubResults = True) model.do() # move group after the partition Part_1_doc.moveFeature(Group_1.feature(), Partition_1.feature()) diff --git a/src/CollectionPlugin/Test/TestGroupMove25.py b/src/CollectionPlugin/Test/TestGroupMove25.py index 24255be20..ed5e99672 100644 --- a/src/CollectionPlugin/Test/TestGroupMove25.py +++ b/src/CollectionPlugin/Test/TestGroupMove25.py @@ -76,7 +76,7 @@ SketchCircle_3 = Sketch_3.addCircle(-2.3396523840492e-15, 15, 5) SketchConstraintCoincidence_6 = Sketch_3.setCoincident(SketchPoint_2.result(), SketchCircle_3.center()) SketchConstraintRadius_3 = Sketch_3.setRadius(SketchCircle_3.results()[1], 5) ExtrusionCut_1.setNestedSketch(Sketch_3) -Fuse_1 = model.addFuse(Part_1_doc, [model.selection("SOLID", "ExtrusionCut_1_1"), model.selection("SOLID", "ExtrusionCut_1_2")], True, 20190506) +Fuse_1 = model.addFuse(Part_1_doc, [model.selection("SOLID", "ExtrusionCut_1_1"), model.selection("SOLID", "ExtrusionCut_1_2")], True, keepSubResults = True) model.do() # move groups after the final fuse Part_1_doc.moveFeature(Group_1.feature(), Fuse_1.feature()) diff --git a/src/FeaturesAPI/FeaturesAPI.i b/src/FeaturesAPI/FeaturesAPI.i index a1a7fbe1f..c0a747b2f 100644 --- a/src/FeaturesAPI/FeaturesAPI.i +++ b/src/FeaturesAPI/FeaturesAPI.i @@ -37,6 +37,15 @@ %include "typemaps.i" %include "std_shared_ptr.i" +// functions with named parameters +%feature("kwargs") addCommon; +%feature("kwargs") addCut; +%feature("kwargs") addFuse; +%feature("kwargs") addPartition; +%feature("kwargs") addSplit; +%feature("kwargs") addSmash; +%feature("kwargs") addUnion; + // shared pointers %shared_ptr(FeaturesAPI_BooleanCut) %shared_ptr(FeaturesAPI_BooleanFuse) @@ -69,6 +78,68 @@ %shared_ptr(FeaturesAPI_FusionFaces) %shared_ptr(FeaturesAPI_RemoveResults) + +%typecheck(SWIG_TYPECHECK_POINTER) std::pair, bool>, const std::pair, bool> & { + ModelHighAPI_Selection* temp_selection; + bool* temp_bool; + int newmem = 0; + $1 = 1; + std::list temp_inputlist; + if (PySequence_Check($input)) { + for (Py_ssize_t i = 0; i < PySequence_Size($input) && $1; ++i) { + PyObject * temp = PySequence_GetItem($input, i); + + if ((SWIG_ConvertPtrAndOwn(temp, (void **)&temp_selection, $descriptor(ModelHighAPI_Selection*), SWIG_POINTER_EXCEPTION, &newmem)) == 0) { + if (temp_selection) { + $1 = 1; + } else { + $1 = 0; + } + } else { + $1 = 0; + } + } + } else if (PyBool_Check($input)) { + $1 = 1; + } else { + $1 = 0; + } +} + +%typemap(in) const std::pair, bool> & (std::pair, bool> temp) { + ModelHighAPI_Selection* temp_selection; + std::list temp_selectionlist; + int newmem = 0; + std::list temp_inputlist; + if (PySequence_Check($input)) { + for (Py_ssize_t i = 0; i < PySequence_Size($input); ++i) { + PyObject * temp = PySequence_GetItem($input, i); + + if ((SWIG_ConvertPtrAndOwn(temp, (void **)&temp_selection, $descriptor(ModelHighAPI_Selection*), SWIG_POINTER_EXCEPTION, &newmem)) == 0) { + if (temp_selection) { + temp_selectionlist.push_back(*temp_selection); + if (newmem & SWIG_CAST_NEW_MEMORY) { + delete temp_selection; + } + } + } else { + PyErr_SetString(PyExc_TypeError, "argument must be ModelHighAPI_Selection."); + return NULL; + } + } + temp = std::pair, bool>(temp_selectionlist, false); + } else if (PyBool_Check($input)) { + temp = std::pair, bool>(std::list(), $input == Py_True); + } else { + PyErr_SetString(PyExc_TypeError, "argument must be std::list or bool."); + return NULL; + } + $1 = &temp; +} + +// fix compilation error: 'res*' was not declared in this scope +%typemap(freearg) const std::pair, bool> & {} + // all supported interfaces %include "FeaturesAPI_BooleanCut.h" %include "FeaturesAPI_BooleanFuse.h" diff --git a/src/FeaturesAPI/FeaturesAPI_BooleanCommon.cpp b/src/FeaturesAPI/FeaturesAPI_BooleanCommon.cpp index d928b89da..6b7236978 100644 --- a/src/FeaturesAPI/FeaturesAPI_BooleanCommon.cpp +++ b/src/FeaturesAPI/FeaturesAPI_BooleanCommon.cpp @@ -124,27 +124,28 @@ void FeaturesAPI_BooleanCommon::dump(ModelHighAPI_Dumper& theDumper) const theDumper << ", " << aTools; } - if (aVersion && aVersion->isInitialized()) { - theDumper << ", " << aVersion->value(); + if (aVersion && aVersion->isInitialized() && + aVersion->value() == FeaturesPlugin_VersionedBoolean::THE_VERSION_1) { + theDumper << ", keepSubResults = True"; } theDumper << ")" << std::endl; } //================================================================================================== -BooleanCommonPtr addCommon(const std::shared_ptr& thePart, - const std::list& theMainObjects, - const int theVersion) +static BooleanCommonPtr addCommon(const std::shared_ptr& thePart, + const std::list& theMainObjects, + const int theVersion) { std::shared_ptr aFeature = thePart->addFeature(FeaturesAPI_BooleanCommon::ID()); return BooleanCommonPtr(new FeaturesAPI_BooleanCommon(aFeature, theMainObjects, theVersion)); } //================================================================================================== -BooleanCommonPtr addCommon(const std::shared_ptr& thePart, - const std::list& theMainObjects, - const std::list& theToolObjects, - const int theVersion) +static BooleanCommonPtr addCommon(const std::shared_ptr& thePart, + const std::list& theMainObjects, + const std::list& theToolObjects, + const int theVersion) { std::shared_ptr aFeature = thePart->addFeature(FeaturesAPI_BooleanCommon::ID()); return BooleanCommonPtr(new FeaturesAPI_BooleanCommon(aFeature, @@ -152,3 +153,15 @@ BooleanCommonPtr addCommon(const std::shared_ptr& thePart, theToolObjects, theVersion)); } + +//================================================================================================== +BooleanCommonPtr addCommon(const std::shared_ptr& thePart, + const std::list& theMainObjects, + const std::list& theToolObjects, + const bool keepSubResults) +{ + int aVersion = keepSubResults ? FeaturesPlugin_VersionedBoolean::THE_VERSION_1 + : FeaturesPlugin_VersionedBoolean::THE_VERSION_0; + return theToolObjects.empty() ? addCommon(thePart, theMainObjects, aVersion) + : addCommon(thePart, theMainObjects, theToolObjects, aVersion); +} diff --git a/src/FeaturesAPI/FeaturesAPI_BooleanCommon.h b/src/FeaturesAPI/FeaturesAPI_BooleanCommon.h index 3470276b7..66d4e74cd 100644 --- a/src/FeaturesAPI/FeaturesAPI_BooleanCommon.h +++ b/src/FeaturesAPI/FeaturesAPI_BooleanCommon.h @@ -87,17 +87,10 @@ typedef std::shared_ptr BooleanCommonPtr; /// \ingroup CPPHighAPI /// \brief Create Boolean Common feature. -FEATURESAPI_EXPORT -BooleanCommonPtr addCommon(const std::shared_ptr& thePart, - const std::list& theMainObjects, - const int theVersion = 0); - -/// \ingroup CPPHighAPI -/// \brief Create Boolean Common feature. -FEATURESAPI_EXPORT -BooleanCommonPtr addCommon(const std::shared_ptr& thePart, - const std::list& theMainObjects, - const std::list& theToolObjects, - const int theVersion = 0); +FEATURESAPI_EXPORT BooleanCommonPtr addCommon( + const std::shared_ptr& part, + const std::list& objects, + const std::list& tools = std::list(), + const bool keepSubResults = false); #endif // FeaturesAPI_BooleanCommon_H_ diff --git a/src/FeaturesAPI/FeaturesAPI_BooleanCut.cpp b/src/FeaturesAPI/FeaturesAPI_BooleanCut.cpp index b0bbd4cb6..6c44139de 100644 --- a/src/FeaturesAPI/FeaturesAPI_BooleanCut.cpp +++ b/src/FeaturesAPI/FeaturesAPI_BooleanCut.cpp @@ -86,8 +86,9 @@ void FeaturesAPI_BooleanCut::dump(ModelHighAPI_Dumper& theDumper) const theDumper << "(" << aDocName << ", " << anObjects << ", " << aTools; - if (aVersion && aVersion->isInitialized()) - theDumper << ", " << aVersion->value(); + if (aVersion && aVersion->isInitialized() && + aVersion->value() == FeaturesPlugin_VersionedBoolean::THE_VERSION_1) + theDumper << ", keepSubResults = True"; theDumper << ")" << std::endl; } @@ -96,11 +97,13 @@ void FeaturesAPI_BooleanCut::dump(ModelHighAPI_Dumper& theDumper) const BooleanCutPtr addCut(const std::shared_ptr& thePart, const std::list& theMainObjects, const std::list& theToolObjects, - const int theVersion) + const bool keepSubResults) { std::shared_ptr aFeature = thePart->addFeature(FeaturesAPI_BooleanCut::ID()); + int aVersion = keepSubResults ? FeaturesPlugin_VersionedBoolean::THE_VERSION_1 + : FeaturesPlugin_VersionedBoolean::THE_VERSION_0; return BooleanCutPtr(new FeaturesAPI_BooleanCut(aFeature, theMainObjects, theToolObjects, - theVersion)); + aVersion)); } diff --git a/src/FeaturesAPI/FeaturesAPI_BooleanCut.h b/src/FeaturesAPI/FeaturesAPI_BooleanCut.h index b7d113aac..80beb3175 100644 --- a/src/FeaturesAPI/FeaturesAPI_BooleanCut.h +++ b/src/FeaturesAPI/FeaturesAPI_BooleanCut.h @@ -79,6 +79,6 @@ FEATURESAPI_EXPORT BooleanCutPtr addCut(const std::shared_ptr& thePart, const std::list& theMainObjects, const std::list& theToolObjects, - const int theVersion = 0); + const bool keepSubResults = false); #endif // FeaturesAPI_BooleanCut_H_ diff --git a/src/FeaturesAPI/FeaturesAPI_BooleanFill.cpp b/src/FeaturesAPI/FeaturesAPI_BooleanFill.cpp index 511a7f56d..da25a8b43 100644 --- a/src/FeaturesAPI/FeaturesAPI_BooleanFill.cpp +++ b/src/FeaturesAPI/FeaturesAPI_BooleanFill.cpp @@ -89,8 +89,9 @@ void FeaturesAPI_BooleanFill::dump(ModelHighAPI_Dumper& theDumper) const theDumper << "(" << aDocName << ", " << anObjects << ", " << aTools; - if (aVersion && aVersion->isInitialized()) - theDumper << ", " << aVersion->value(); + if (aVersion && aVersion->isInitialized() && + aVersion->value() == FeaturesPlugin_VersionedBoolean::THE_VERSION_1) + theDumper << ", keepSubResults = True"; theDumper << ")" << std::endl; } @@ -99,11 +100,13 @@ void FeaturesAPI_BooleanFill::dump(ModelHighAPI_Dumper& theDumper) const BooleanFillPtr addSplit(const std::shared_ptr& thePart, const std::list& theMainObjects, const std::list& theToolObjects, - const int theVersion) + const bool keepSubResults) { std::shared_ptr aFeature = thePart->addFeature(FeaturesAPI_BooleanFill::ID()); + int aVersion = keepSubResults ? FeaturesPlugin_VersionedBoolean::THE_VERSION_1 + : FeaturesPlugin_VersionedBoolean::THE_VERSION_0; return BooleanFillPtr(new FeaturesAPI_BooleanFill(aFeature, theMainObjects, theToolObjects, - theVersion)); + aVersion)); } diff --git a/src/FeaturesAPI/FeaturesAPI_BooleanFill.h b/src/FeaturesAPI/FeaturesAPI_BooleanFill.h index 2826fe9e8..7375db2cf 100644 --- a/src/FeaturesAPI/FeaturesAPI_BooleanFill.h +++ b/src/FeaturesAPI/FeaturesAPI_BooleanFill.h @@ -79,6 +79,6 @@ FEATURESAPI_EXPORT BooleanFillPtr addSplit(const std::shared_ptr& thePart, const std::list& theMainObjects, const std::list& theToolObjects, - const int theVersion = 0); + const bool keepSubResults = false); #endif // FeaturesAPI_BooleanFill_H_ diff --git a/src/FeaturesAPI/FeaturesAPI_BooleanFuse.cpp b/src/FeaturesAPI/FeaturesAPI_BooleanFuse.cpp index cd7e08afd..a80b06908 100644 --- a/src/FeaturesAPI/FeaturesAPI_BooleanFuse.cpp +++ b/src/FeaturesAPI/FeaturesAPI_BooleanFuse.cpp @@ -138,23 +138,23 @@ void FeaturesAPI_BooleanFuse::dump(ModelHighAPI_Dumper& theDumper) const theDumper << ", " << aTools; } - bool hasVersion = aVersion && aVersion->isInitialized(); - if (aRemoveEdges->value() || hasVersion) { - theDumper << ", " << aRemoveEdges->value(); + if (aRemoveEdges->value()) { + theDumper << ", removeEdges = True"; } - if (hasVersion) { - theDumper << ", " << aVersion->value(); + if (aVersion && aVersion->isInitialized() && + aVersion->value() == FeaturesPlugin_VersionedBoolean::THE_VERSION_1) { + theDumper << ", keepSubResults = True"; } theDumper << ")" << std::endl; } //================================================================================================== -BooleanFusePtr addFuse(const std::shared_ptr& thePart, - const std::list& theObjects, - const bool theRemoveEdges, - const int theVersion) +static BooleanFusePtr addFuse(const std::shared_ptr& thePart, + const std::list& theObjects, + const bool theRemoveEdges, + const int theVersion) { std::shared_ptr aFeature = thePart->addFeature(FeaturesAPI_BooleanFuse::ID()); return BooleanFusePtr(new FeaturesAPI_BooleanFuse(aFeature, @@ -164,11 +164,11 @@ BooleanFusePtr addFuse(const std::shared_ptr& thePart, } //================================================================================================== -BooleanFusePtr addFuse(const std::shared_ptr& thePart, - const std::list& theMainObjects, - const std::list& theToolObjects, - const bool theRemoveEdges, - const int theVersion) +static BooleanFusePtr addFuse(const std::shared_ptr& thePart, + const std::list& theMainObjects, + const std::list& theToolObjects, + const bool theRemoveEdges, + const int theVersion) { std::shared_ptr aFeature = thePart->addFeature(FeaturesAPI_BooleanFuse::ID()); return BooleanFusePtr(new FeaturesAPI_BooleanFuse(aFeature, @@ -177,3 +177,20 @@ BooleanFusePtr addFuse(const std::shared_ptr& thePart, theRemoveEdges, theVersion)); } + +//================================================================================================== +BooleanFusePtr addFuse(const std::shared_ptr& thePart, + const std::list& theMainObjects, + const std::pair, bool>& theToolObjects, + const bool theRemoveEdges, + const bool keepSubResults) +{ + int aVersion = keepSubResults ? FeaturesPlugin_VersionedBoolean::THE_VERSION_1 + : FeaturesPlugin_VersionedBoolean::THE_VERSION_0; + bool aRemoveEdges = theRemoveEdges; + if (theToolObjects.first.empty()) + aRemoveEdges = aRemoveEdges || theToolObjects.second; + return theToolObjects.first.empty() ? + addFuse(thePart, theMainObjects, aRemoveEdges, aVersion) : + addFuse(thePart, theMainObjects, theToolObjects.first, aRemoveEdges, aVersion); +} diff --git a/src/FeaturesAPI/FeaturesAPI_BooleanFuse.h b/src/FeaturesAPI/FeaturesAPI_BooleanFuse.h index 5f44f8aa9..307a886bb 100644 --- a/src/FeaturesAPI/FeaturesAPI_BooleanFuse.h +++ b/src/FeaturesAPI/FeaturesAPI_BooleanFuse.h @@ -93,21 +93,16 @@ public: /// Pointer on Boolean object. typedef std::shared_ptr BooleanFusePtr; -/// \ingroup CPPHighAPI -/// \brief Create Boolean Fuse feature. -FEATURESAPI_EXPORT -BooleanFusePtr addFuse(const std::shared_ptr& thePart, - const std::list& theObjects, - const bool theRemoveEdges = false, - const int theVersion = 0); +#define DUMMY_TOOLS std::pair, bool>\ + (std::list(), false) /// \ingroup CPPHighAPI /// \brief Create Boolean Fuse feature. -FEATURESAPI_EXPORT -BooleanFusePtr addFuse(const std::shared_ptr& thePart, - const std::list& theMainObjects, - const std::list& theToolObjects, - const bool theRemoveEdges = false, - const int theVersion = 0); +FEATURESAPI_EXPORT BooleanFusePtr addFuse( + const std::shared_ptr& part, + const std::list& objects, + const std::pair, bool>& tools = DUMMY_TOOLS, + const bool removeEdges = false, + const bool keepSubResults = false); #endif // FeaturesAPI_BooleanFuse_H_ diff --git a/src/FeaturesAPI/FeaturesAPI_BooleanSmash.cpp b/src/FeaturesAPI/FeaturesAPI_BooleanSmash.cpp index c23f63967..a91647c09 100644 --- a/src/FeaturesAPI/FeaturesAPI_BooleanSmash.cpp +++ b/src/FeaturesAPI/FeaturesAPI_BooleanSmash.cpp @@ -89,8 +89,9 @@ void FeaturesAPI_BooleanSmash::dump(ModelHighAPI_Dumper& theDumper) const theDumper << "(" << aDocName << ", " << anObjects << ", " << aTools; - if (aVersion && aVersion->isInitialized()) - theDumper << ", " << aVersion->value(); + if (aVersion && aVersion->isInitialized() && + aVersion->value() == FeaturesPlugin_VersionedBoolean::THE_VERSION_1) + theDumper << ", keepSubResults = True"; theDumper << ")" << std::endl; } @@ -99,11 +100,13 @@ void FeaturesAPI_BooleanSmash::dump(ModelHighAPI_Dumper& theDumper) const BooleanSmashPtr addSmash(const std::shared_ptr& thePart, const std::list& theMainObjects, const std::list& theToolObjects, - const int theVersion) + const bool keepSubResults) { std::shared_ptr aFeature = thePart->addFeature(FeaturesAPI_BooleanSmash::ID()); + int aVersion = keepSubResults ? FeaturesPlugin_VersionedBoolean::THE_VERSION_1 + : FeaturesPlugin_VersionedBoolean::THE_VERSION_0; return BooleanSmashPtr(new FeaturesAPI_BooleanSmash(aFeature, theMainObjects, theToolObjects, - theVersion)); + aVersion)); } diff --git a/src/FeaturesAPI/FeaturesAPI_BooleanSmash.h b/src/FeaturesAPI/FeaturesAPI_BooleanSmash.h index a6e1bbc52..46d9fd870 100644 --- a/src/FeaturesAPI/FeaturesAPI_BooleanSmash.h +++ b/src/FeaturesAPI/FeaturesAPI_BooleanSmash.h @@ -79,6 +79,6 @@ FEATURESAPI_EXPORT BooleanSmashPtr addSmash(const std::shared_ptr& thePart, const std::list& theMainObjects, const std::list& theToolObjects, - const int theVersion = 0); + const bool keepSubResults = false); #endif // FeaturesAPI_BooleanSmash_H_ diff --git a/src/FeaturesAPI/FeaturesAPI_Partition.cpp b/src/FeaturesAPI/FeaturesAPI_Partition.cpp index e0a0186ef..8e5ac5658 100644 --- a/src/FeaturesAPI/FeaturesAPI_Partition.cpp +++ b/src/FeaturesAPI/FeaturesAPI_Partition.cpp @@ -69,8 +69,9 @@ void FeaturesAPI_Partition::dump(ModelHighAPI_Dumper& theDumper) const theDumper << aBase << " = model.addPartition(" << aDocName << ", " << anAttrObjects; - if (aVersion && aVersion->isInitialized()) - theDumper << ", " << aVersion->value(); + if (aVersion && aVersion->isInitialized() && + aVersion->value() == FeaturesPlugin_VersionedBoolean::THE_VERSION_1) + theDumper << ", keepSubResults = True"; theDumper << ")" << std::endl; } @@ -78,8 +79,10 @@ void FeaturesAPI_Partition::dump(ModelHighAPI_Dumper& theDumper) const //================================================================================================== PartitionPtr addPartition(const std::shared_ptr& thePart, const std::list& theBaseObjects, - const int theVersion) + const bool keepSubResults) { + int aVersion = keepSubResults ? FeaturesPlugin_VersionedBoolean::THE_VERSION_1 + : FeaturesPlugin_VersionedBoolean::THE_VERSION_0; std::shared_ptr aFeature = thePart->addFeature(FeaturesAPI_Partition::ID()); - return PartitionPtr(new FeaturesAPI_Partition(aFeature, theBaseObjects, theVersion)); + return PartitionPtr(new FeaturesAPI_Partition(aFeature, theBaseObjects, aVersion)); } diff --git a/src/FeaturesAPI/FeaturesAPI_Partition.h b/src/FeaturesAPI/FeaturesAPI_Partition.h index 07b534972..392aa5907 100644 --- a/src/FeaturesAPI/FeaturesAPI_Partition.h +++ b/src/FeaturesAPI/FeaturesAPI_Partition.h @@ -71,6 +71,6 @@ typedef std::shared_ptr PartitionPtr; FEATURESAPI_EXPORT PartitionPtr addPartition(const std::shared_ptr& thePart, const std::list& theBaseObjects, - const int theVersion = 0); + const bool keepSubResults = false); #endif // FeaturesAPI_Partition_H_ diff --git a/src/FeaturesAPI/FeaturesAPI_Union.cpp b/src/FeaturesAPI/FeaturesAPI_Union.cpp index 7c960b135..bc8bc1859 100644 --- a/src/FeaturesAPI/FeaturesAPI_Union.cpp +++ b/src/FeaturesAPI/FeaturesAPI_Union.cpp @@ -68,8 +68,9 @@ void FeaturesAPI_Union::dump(ModelHighAPI_Dumper& theDumper) const theDumper << aBase << " = model.addUnion(" << aDocName << ", " << anAttrObjects; - if (aVersion && aVersion->isInitialized()) - theDumper << ", " << aVersion->value(); + if (aVersion && aVersion->isInitialized() && + aVersion->value() == FeaturesPlugin_VersionedBoolean::THE_VERSION_1) + theDumper << ", keepSubResults = True"; theDumper << ")" << std::endl; } @@ -77,8 +78,10 @@ void FeaturesAPI_Union::dump(ModelHighAPI_Dumper& theDumper) const //================================================================================================== UnionPtr addUnion(const std::shared_ptr& thePart, const std::list& theBaseObjects, - const int theVersion) + const bool keepSubResults) { + int aVersion = keepSubResults ? FeaturesPlugin_VersionedBoolean::THE_VERSION_1 + : FeaturesPlugin_VersionedBoolean::THE_VERSION_0; std::shared_ptr aFeature = thePart->addFeature(FeaturesAPI_Union::ID()); - return UnionPtr(new FeaturesAPI_Union(aFeature, theBaseObjects, theVersion)); + return UnionPtr(new FeaturesAPI_Union(aFeature, theBaseObjects, aVersion)); } diff --git a/src/FeaturesAPI/FeaturesAPI_Union.h b/src/FeaturesAPI/FeaturesAPI_Union.h index ff1f7820a..bcc6aee2e 100644 --- a/src/FeaturesAPI/FeaturesAPI_Union.h +++ b/src/FeaturesAPI/FeaturesAPI_Union.h @@ -71,6 +71,6 @@ typedef std::shared_ptr UnionPtr; FEATURESAPI_EXPORT UnionPtr addUnion(const std::shared_ptr& thePart, const std::list& theBaseObjects, - const int theVersion = 0); + const bool keepSubResults = false); #endif // FeaturesAPI_Union_H_ diff --git a/src/FeaturesPlugin/FeaturesPlugin_BooleanCommon.cpp b/src/FeaturesPlugin/FeaturesPlugin_BooleanCommon.cpp index 99c3da987..1afe60e8b 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_BooleanCommon.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_BooleanCommon.cpp @@ -38,8 +38,6 @@ #include #include -static const int THE_COMMON_VERSION_1 = 20190506; - //================================================================================================== FeaturesPlugin_BooleanCommon::FeaturesPlugin_BooleanCommon() : FeaturesPlugin_Boolean(FeaturesPlugin_Boolean::BOOL_COMMON) @@ -54,7 +52,7 @@ void FeaturesPlugin_BooleanCommon::initAttributes() data()->addAttribute(OBJECT_LIST_ID(), ModelAPI_AttributeSelectionList::typeId()); data()->addAttribute(TOOL_LIST_ID(), ModelAPI_AttributeSelectionList::typeId()); - initVersion(THE_COMMON_VERSION_1, selectionList(OBJECT_LIST_ID()), selectionList(TOOL_LIST_ID())); + initVersion(THE_VERSION_1, selectionList(OBJECT_LIST_ID()), selectionList(TOOL_LIST_ID())); } //================================================================================================== @@ -117,7 +115,7 @@ void FeaturesPlugin_BooleanCommon::execute() aMakeShapeList->appendAlgo(aCommonAlgo); } - if (aCommonVersion == THE_COMMON_VERSION_1) { + if (aCommonVersion == THE_VERSION_1) { // merge hierarchies of compounds containing objects and tools // and append the result of the FUSE operation aShape = keepUnusedSubsOfCompound(aShape, anObjects, aTools, aMakeShapeList); @@ -149,7 +147,7 @@ void FeaturesPlugin_BooleanCommon::execute() aResultShapesList.push_back(aShape); } } else { - if (aCommonVersion == THE_COMMON_VERSION_1) { + if (aCommonVersion == THE_VERSION_1) { // merge hierarchies of compounds containing objects and tools aResultCompound = keepUnusedSubsOfCompound(GeomShapePtr(), anObjects, aTools, aMakeShapeList); diff --git a/src/FeaturesPlugin/FeaturesPlugin_BooleanCut.cpp b/src/FeaturesPlugin/FeaturesPlugin_BooleanCut.cpp index 383ffaa12..d954e917d 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_BooleanCut.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_BooleanCut.cpp @@ -35,8 +35,6 @@ #include #include -static const int THE_CUT_VERSION_1 = 20190506; - //================================================================================================== FeaturesPlugin_BooleanCut::FeaturesPlugin_BooleanCut() : FeaturesPlugin_Boolean(FeaturesPlugin_Boolean::BOOL_CUT) @@ -47,7 +45,7 @@ FeaturesPlugin_BooleanCut::FeaturesPlugin_BooleanCut() void FeaturesPlugin_BooleanCut::initAttributes() { FeaturesPlugin_Boolean::initAttributes(); - initVersion(THE_CUT_VERSION_1, selectionList(OBJECT_LIST_ID()), selectionList(TOOL_LIST_ID())); + initVersion(THE_VERSION_1, selectionList(OBJECT_LIST_ID()), selectionList(TOOL_LIST_ID())); } //================================================================================================== @@ -79,7 +77,7 @@ void FeaturesPlugin_BooleanCut::execute() std::shared_ptr aMakeShapeList(new GeomAlgoAPI_MakeShapeList()); GeomShapePtr aResultCompound; - if (aCutVersion == THE_CUT_VERSION_1) { + if (aCutVersion == THE_VERSION_1) { // merge hierarchies of compounds containing objects and tools aResultCompound = keepUnusedSubsOfCompound(GeomShapePtr(), anObjects, aTools, aMakeShapeList); diff --git a/src/FeaturesPlugin/FeaturesPlugin_BooleanFill.cpp b/src/FeaturesPlugin/FeaturesPlugin_BooleanFill.cpp index 7d8d3f471..6db4eb4d9 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_BooleanFill.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_BooleanFill.cpp @@ -40,8 +40,6 @@ #include #include -static const int THE_SPLIT_VERSION_1 = 20190506; - //================================================================================================= FeaturesPlugin_BooleanFill::FeaturesPlugin_BooleanFill() : FeaturesPlugin_Boolean(FeaturesPlugin_Boolean::BOOL_FILL) @@ -52,7 +50,7 @@ FeaturesPlugin_BooleanFill::FeaturesPlugin_BooleanFill() void FeaturesPlugin_BooleanFill::initAttributes() { FeaturesPlugin_Boolean::initAttributes(); - initVersion(THE_SPLIT_VERSION_1, selectionList(OBJECT_LIST_ID()), selectionList(TOOL_LIST_ID())); + initVersion(THE_VERSION_1, selectionList(OBJECT_LIST_ID()), selectionList(TOOL_LIST_ID())); } //================================================================================================= @@ -89,7 +87,7 @@ void FeaturesPlugin_BooleanFill::execute() std::shared_ptr aMakeShapeList(new GeomAlgoAPI_MakeShapeList()); GeomShapePtr aResultCompound; - if (aSplitVersion == THE_SPLIT_VERSION_1) { + if (aSplitVersion == THE_VERSION_1) { // merge hierarchies of compounds containing objects and tools aResultCompound = keepUnusedSubsOfCompound(GeomShapePtr(), anObjects, aTools, aMakeShapeList); diff --git a/src/FeaturesPlugin/FeaturesPlugin_BooleanFuse.cpp b/src/FeaturesPlugin/FeaturesPlugin_BooleanFuse.cpp index 04194d5b1..e8c47bae5 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_BooleanFuse.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_BooleanFuse.cpp @@ -41,8 +41,6 @@ #include #include -static const int THE_FUSE_VERSION_1 = 20190506; - //================================================================================================== FeaturesPlugin_BooleanFuse::FeaturesPlugin_BooleanFuse() : FeaturesPlugin_Boolean(FeaturesPlugin_Boolean::BOOL_FUSE) @@ -62,7 +60,7 @@ void FeaturesPlugin_BooleanFuse::initAttributes() ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), OBJECT_LIST_ID()); ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), TOOL_LIST_ID()); - initVersion(THE_FUSE_VERSION_1, selectionList(OBJECT_LIST_ID()), selectionList(TOOL_LIST_ID())); + initVersion(THE_VERSION_1, selectionList(OBJECT_LIST_ID()), selectionList(TOOL_LIST_ID())); } //================================================================================================== @@ -236,7 +234,7 @@ void FeaturesPlugin_BooleanFuse::execute() aMakeShapeList->appendAlgo(aUnifyAlgo); } - if (aFuseVersion == THE_FUSE_VERSION_1) { + if (aFuseVersion == THE_VERSION_1) { // merge hierarchies of compounds containing objects and tools // and append the result of the FUSE operation aShape = keepUnusedSubsOfCompound(aShape, anObjectsHierarchy, aToolsHierarchy, aMakeShapeList); diff --git a/src/FeaturesPlugin/FeaturesPlugin_BooleanSmash.cpp b/src/FeaturesPlugin/FeaturesPlugin_BooleanSmash.cpp index f94009aa1..11b47079e 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_BooleanSmash.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_BooleanSmash.cpp @@ -35,8 +35,6 @@ #include #include -static const int THE_SMASH_VERSION_1 = 20190506; - //================================================================================================== FeaturesPlugin_BooleanSmash::FeaturesPlugin_BooleanSmash() : FeaturesPlugin_Boolean(FeaturesPlugin_Boolean::BOOL_SMASH) @@ -49,7 +47,7 @@ void FeaturesPlugin_BooleanSmash::initAttributes() data()->addAttribute(OBJECT_LIST_ID(), ModelAPI_AttributeSelectionList::typeId()); data()->addAttribute(TOOL_LIST_ID(), ModelAPI_AttributeSelectionList::typeId()); - initVersion(THE_SMASH_VERSION_1, selectionList(OBJECT_LIST_ID()), selectionList(TOOL_LIST_ID())); + initVersion(THE_VERSION_1, selectionList(OBJECT_LIST_ID()), selectionList(TOOL_LIST_ID())); } //================================================================================================== @@ -170,7 +168,7 @@ void FeaturesPlugin_BooleanSmash::execute() // take into account a version of SMASH feature int aSmashVersion = version(); - if (aSmashVersion == THE_SMASH_VERSION_1) { + if (aSmashVersion == THE_VERSION_1) { // merge hierarchies of compounds containing objects and tools // and append the result of the FUSE operation aShape = keepUnusedSubsOfCompound(aShape, anObjectsHistory, aToolsHistory, aMakeShapeList); diff --git a/src/FeaturesPlugin/FeaturesPlugin_Partition.cpp b/src/FeaturesPlugin/FeaturesPlugin_Partition.cpp index 48c7141a2..824a9cb46 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_Partition.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_Partition.cpp @@ -48,8 +48,6 @@ #include #include -static const int THE_PARTITION_VERSION_1 = 20190506; - //================================================================================================= FeaturesPlugin_Partition::FeaturesPlugin_Partition() @@ -60,7 +58,7 @@ FeaturesPlugin_Partition::FeaturesPlugin_Partition() void FeaturesPlugin_Partition::initAttributes() { data()->addAttribute(BASE_OBJECTS_ID(), ModelAPI_AttributeSelectionList::typeId()); - initVersion(THE_PARTITION_VERSION_1, selectionList(BASE_OBJECTS_ID())); + initVersion(THE_VERSION_1, selectionList(BASE_OBJECTS_ID())); } //================================================================================================= @@ -127,7 +125,7 @@ void FeaturesPlugin_Partition::execute() int aResultIndex = 0; int aPartitionVersion = version(); - if (aPartitionVersion < THE_PARTITION_VERSION_1) { + if (aPartitionVersion < THE_VERSION_1) { // default behaviors of Partition if(aResultShape->shapeType() == GeomAPI_Shape::COMPOUND) { for(GeomAPI_ShapeIterator anIt(aResultShape); anIt.more(); anIt.next()) { diff --git a/src/FeaturesPlugin/FeaturesPlugin_Union.cpp b/src/FeaturesPlugin/FeaturesPlugin_Union.cpp index 257ba22be..5663d6918 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_Union.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_Union.cpp @@ -33,8 +33,6 @@ #include #include -static const int THE_UNION_VERSION_1 = 20190506; - //================================================================================================= FeaturesPlugin_Union::FeaturesPlugin_Union() { @@ -44,7 +42,7 @@ FeaturesPlugin_Union::FeaturesPlugin_Union() void FeaturesPlugin_Union::initAttributes() { data()->addAttribute(BASE_OBJECTS_ID(), ModelAPI_AttributeSelectionList::typeId()); - initVersion(THE_UNION_VERSION_1, selectionList(BASE_OBJECTS_ID())); + initVersion(THE_VERSION_1, selectionList(BASE_OBJECTS_ID())); } //================================================================================================= @@ -104,7 +102,7 @@ void FeaturesPlugin_Union::execute() GeomShapePtr aShape; GeomAPI_ShapeIterator aCIt(aResultCompound); - if (aUnionVersion < THE_UNION_VERSION_1) { + if (aUnionVersion < THE_VERSION_1) { // if the compound consists of a single sub-shape, take it, // otherwise, take the full compound aShape = aCIt.current(); diff --git a/src/FeaturesPlugin/FeaturesPlugin_VersionedBoolean.h b/src/FeaturesPlugin/FeaturesPlugin_VersionedBoolean.h index 4d95da152..21db544d7 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_VersionedBoolean.h +++ b/src/FeaturesPlugin/FeaturesPlugin_VersionedBoolean.h @@ -37,6 +37,9 @@ class GeomAlgoAPI_MakeShapeList; class FeaturesPlugin_VersionedBoolean : public ModelAPI_Feature { public: + static const int THE_VERSION_0 = 0; + static const int THE_VERSION_1 = 20190506; + /// Attribute name of the version of Boolean feature inline static const std::string& VERSION_ID() { diff --git a/src/FeaturesPlugin/Test/Test2920.py b/src/FeaturesPlugin/Test/Test2920.py index e4d5c4033..7801a9d6a 100644 --- a/src/FeaturesPlugin/Test/Test2920.py +++ b/src/FeaturesPlugin/Test/Test2920.py @@ -105,7 +105,7 @@ model.do() Extrusion_3 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_3/Face-SketchLine_19r-SketchLine_18r-SketchLine_17r-SketchLine_16r-SketchLine_15r-SketchLine_20f-SketchLine_21f-SketchLine_22f-SketchLine_23f-SketchLine_24f")], model.selection(), 10, 0) Extrusion_3.result().setName("C") Extrusion_3.result().setColor(0, 85, 255) -Cut_1 = model.addCut(Part_1_doc, [model.selection("SOLID", "Compound_1_1_1"), model.selection("SOLID", "Compound_2_1_2")], [model.selection("SOLID", "C")], 20190506) +Cut_1 = model.addCut(Part_1_doc, [model.selection("SOLID", "Compound_1_1_1"), model.selection("SOLID", "Compound_2_1_2")], [model.selection("SOLID", "C")], keepSubResults = True) model.end() from GeomAPI import GeomAPI_Shape diff --git a/src/FeaturesPlugin/Test/Test3014.py b/src/FeaturesPlugin/Test/Test3014.py index 711b12e64..597d2334f 100644 --- a/src/FeaturesPlugin/Test/Test3014.py +++ b/src/FeaturesPlugin/Test/Test3014.py @@ -38,7 +38,7 @@ SketchMultiRotation_1 = Sketch_1.addRotation([SketchCircle_1.results()[1]], Sket model.do() Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("COMPOUND", "all-in-Sketch_1")], model.selection(), "h", 0) Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Extrusion_1_4/To_Face"), "h/2", True) -Partition_1 = model.addPartition(Part_1_doc, [model.selection("FACE", "Plane_1"), model.selection("COMPOUND", "all-in-Extrusion_1")], 20190506) +Partition_1 = model.addPartition(Part_1_doc, [model.selection("FACE", "Plane_1"), model.selection("COMPOUND", "all-in-Extrusion_1")], keepSubResults = True) model.end() assert(Partition_1.feature().error() == "") diff --git a/src/FeaturesPlugin/Test/TestBooleanCommon_MultiLevelCompound_v20190506_1.py b/src/FeaturesPlugin/Test/TestBooleanCommon_MultiLevelCompound_v20190506_1.py index d23996c4c..6864993ae 100644 --- a/src/FeaturesPlugin/Test/TestBooleanCommon_MultiLevelCompound_v20190506_1.py +++ b/src/FeaturesPlugin/Test/TestBooleanCommon_MultiLevelCompound_v20190506_1.py @@ -77,7 +77,7 @@ Compound_1.result().subResult(0).subResult(0).setColor(0, 170, 0) Compound_1.result().subResult(0).subResult(1).setColor(0, 170, 0) Compound_1.result().subResult(1).subResult(0).setColor(0, 255, 0) Compound_1.result().subResult(1).subResult(1).setColor(0, 255, 0) -Common_1 = model.addCommon(Part_1_doc, [model.selection("SOLID", "LinearCopy_2_1_1_1"), model.selection("COMPOUND", "Compound_1_1_2")], 20190506) +Common_1 = model.addCommon(Part_1_doc, [model.selection("SOLID", "LinearCopy_2_1_1_1"), model.selection("COMPOUND", "Compound_1_1_2")], keepSubResults = True) model.testHaveNamingSubshapes(Common_1, model, Part_1_doc) diff --git a/src/FeaturesPlugin/Test/TestBooleanCommon_MultiLevelCompound_v20190506_2.py b/src/FeaturesPlugin/Test/TestBooleanCommon_MultiLevelCompound_v20190506_2.py index 3c5b105e3..8d4825194 100644 --- a/src/FeaturesPlugin/Test/TestBooleanCommon_MultiLevelCompound_v20190506_2.py +++ b/src/FeaturesPlugin/Test/TestBooleanCommon_MultiLevelCompound_v20190506_2.py @@ -102,7 +102,7 @@ Compound_3.result().subResult(0).setColor(0, 170, 0) Compound_3.result().subResult(1).setColor(0, 255, 0) Compound_3.result().subResult(1).subResult(0).setColor(0, 255, 0) Compound_3.result().subResult(1).subResult(1).setColor(0, 255, 0) -Common_1 = model.addCommon(Part_1_doc, [model.selection("SOLID", "Compound_2_1_1_1"), model.selection("SOLID", "Compound_2_1_2_3")], [model.selection("COMPOUND", "Compound_3_1_2")], 20190506) +Common_1 = model.addCommon(Part_1_doc, [model.selection("SOLID", "Compound_2_1_1_1"), model.selection("SOLID", "Compound_2_1_2_3")], [model.selection("COMPOUND", "Compound_3_1_2")], keepSubResults = True) model.testHaveNamingSubshapes(Common_1, model, Part_1_doc) diff --git a/src/FeaturesPlugin/Test/TestBooleanCut_MultiLevelCompound_v20190506_1.py b/src/FeaturesPlugin/Test/TestBooleanCut_MultiLevelCompound_v20190506_1.py index f46bd8579..b769f0451 100644 --- a/src/FeaturesPlugin/Test/TestBooleanCut_MultiLevelCompound_v20190506_1.py +++ b/src/FeaturesPlugin/Test/TestBooleanCut_MultiLevelCompound_v20190506_1.py @@ -44,7 +44,7 @@ SketchConstraintCoincidence_1 = Sketch_2.setCoincident(SketchPoint_2.result(), S SketchConstraintRadius_2 = Sketch_2.setRadius(SketchCircle_2.results()[1], 3) model.do() Extrusion_2 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_2/Face-SketchCircle_2_2f")], model.selection(), 5, 5) -Cut_1 = model.addCut(Part_1_doc, [model.selection("SOLID", "LinearCopy_1_1_1_2")], [model.selection("SOLID", "Extrusion_2_1")], 20190506) +Cut_1 = model.addCut(Part_1_doc, [model.selection("SOLID", "LinearCopy_1_1_1_2")], [model.selection("SOLID", "Extrusion_2_1")], keepSubResults = True) model.testHaveNamingSubshapes(Cut_1, model, Part_1_doc) diff --git a/src/FeaturesPlugin/Test/TestBooleanCut_MultiLevelCompound_v20190506_2.py b/src/FeaturesPlugin/Test/TestBooleanCut_MultiLevelCompound_v20190506_2.py index 242bc6f07..a30a2928a 100644 --- a/src/FeaturesPlugin/Test/TestBooleanCut_MultiLevelCompound_v20190506_2.py +++ b/src/FeaturesPlugin/Test/TestBooleanCut_MultiLevelCompound_v20190506_2.py @@ -102,7 +102,7 @@ Compound_3.result().subResult(0).setColor(0, 170, 0) Compound_3.result().subResult(1).setColor(0, 255, 0) Compound_3.result().subResult(1).subResult(0).setColor(0, 255, 0) Compound_3.result().subResult(1).subResult(1).setColor(0, 255, 0) -Cut_1 = model.addCut(Part_1_doc, [model.selection("SOLID", "Compound_2_1_1_1"), model.selection("SOLID", "Compound_2_1_2_3")], [model.selection("SOLID", "Compound_3_1_2_2")], 20190506) +Cut_1 = model.addCut(Part_1_doc, [model.selection("SOLID", "Compound_2_1_1_1"), model.selection("SOLID", "Compound_2_1_2_3")], [model.selection("SOLID", "Compound_3_1_2_2")], keepSubResults = True) model.testHaveNamingSubshapes(Cut_1, model, Part_1_doc) diff --git a/src/FeaturesPlugin/Test/TestBooleanFuse_MultiLevelCompound_v20190506_1.py b/src/FeaturesPlugin/Test/TestBooleanFuse_MultiLevelCompound_v20190506_1.py index 5cb60f3da..22c7f85a9 100644 --- a/src/FeaturesPlugin/Test/TestBooleanFuse_MultiLevelCompound_v20190506_1.py +++ b/src/FeaturesPlugin/Test/TestBooleanFuse_MultiLevelCompound_v20190506_1.py @@ -78,7 +78,7 @@ Compound_1.result().subResult(0).subResult(1).setColor(0, 170, 0) Compound_1.result().subResult(1).subResult(0).setColor(0, 255, 0) Compound_1.result().subResult(1).subResult(1).setColor(0, 255, 0) Fuse_1_objects_1 = [model.selection("SOLID", "LinearCopy_2_1_1_1"), model.selection("SOLID", "Compound_1_1_1_1"), model.selection("COMPOUND", "Compound_1_1_2")] -Fuse_1 = model.addFuse(Part_1_doc, Fuse_1_objects_1, False, 20190506) +Fuse_1 = model.addFuse(Part_1_doc, Fuse_1_objects_1, False, keepSubResults = True) model.testHaveNamingSubshapes(Fuse_1, model, Part_1_doc) diff --git a/src/FeaturesPlugin/Test/TestBooleanFuse_MultiLevelCompound_v20190506_2.py b/src/FeaturesPlugin/Test/TestBooleanFuse_MultiLevelCompound_v20190506_2.py index 869746328..22569aa81 100644 --- a/src/FeaturesPlugin/Test/TestBooleanFuse_MultiLevelCompound_v20190506_2.py +++ b/src/FeaturesPlugin/Test/TestBooleanFuse_MultiLevelCompound_v20190506_2.py @@ -76,7 +76,7 @@ Edge_1 = model.addEdge(Part_1_doc, [model.selection("EDGE", "Sketch_2/SketchLine Extrusion_2 = model.addExtrusion(Part_1_doc, [model.selection("EDGE", "Edge_1_1")], model.selection("EDGE", "PartSet/OZ"), 13, 3) Compound_1 = model.addCompound(Part_1_doc, [model.selection("COMPSOLID", "Extrusion_1_1"), model.selection("FACE", "Extrusion_2_1")]) Fuse_1_objects_1 = [model.selection("SOLID", "Compound_1_1_1_1"), model.selection("SOLID", "LinearCopy_2_1_1_1"), model.selection("FACE", "Compound_1_1_2")] -Fuse_1 = model.addFuse(Part_1_doc, Fuse_1_objects_1, True, 20190506) +Fuse_1 = model.addFuse(Part_1_doc, Fuse_1_objects_1, True, keepSubResults = True) model.testHaveNamingSubshapes(Fuse_1, model, Part_1_doc) diff --git a/src/FeaturesPlugin/Test/TestBooleanFuse_MultiLevelCompound_v20190506_3.py b/src/FeaturesPlugin/Test/TestBooleanFuse_MultiLevelCompound_v20190506_3.py index 17c412ecd..2e80098ba 100644 --- a/src/FeaturesPlugin/Test/TestBooleanFuse_MultiLevelCompound_v20190506_3.py +++ b/src/FeaturesPlugin/Test/TestBooleanFuse_MultiLevelCompound_v20190506_3.py @@ -75,7 +75,7 @@ model.do() Edge_1 = model.addEdge(Part_1_doc, [model.selection("EDGE", "Sketch_2/SketchLine_9")]) Extrusion_2 = model.addExtrusion(Part_1_doc, [model.selection("EDGE", "Edge_1_1")], model.selection("EDGE", "PartSet/OZ"), 13, 3) Compound_1 = model.addCompound(Part_1_doc, [model.selection("COMPSOLID", "Extrusion_1_1"), model.selection("FACE", "Extrusion_2_1")]) -Fuse_1 = model.addFuse(Part_1_doc, [model.selection("SOLID", "Compound_1_1_1_1")], [model.selection("SOLID", "LinearCopy_2_1_1_1"), model.selection("FACE", "Compound_1_1_2")], True, 20190506) +Fuse_1 = model.addFuse(Part_1_doc, [model.selection("SOLID", "Compound_1_1_1_1")], [model.selection("SOLID", "LinearCopy_2_1_1_1"), model.selection("FACE", "Compound_1_1_2")], True, keepSubResults = True) model.end() from GeomAPI import * diff --git a/src/FeaturesPlugin/Test/TestBooleanFuse_MultiLevelCompound_v20190506_4.py b/src/FeaturesPlugin/Test/TestBooleanFuse_MultiLevelCompound_v20190506_4.py index 996bb2ad3..0b8fdf93f 100644 --- a/src/FeaturesPlugin/Test/TestBooleanFuse_MultiLevelCompound_v20190506_4.py +++ b/src/FeaturesPlugin/Test/TestBooleanFuse_MultiLevelCompound_v20190506_4.py @@ -75,7 +75,7 @@ model.do() Edge_1 = model.addEdge(Part_1_doc, [model.selection("EDGE", "Sketch_2/SketchLine_9")]) Extrusion_2 = model.addExtrusion(Part_1_doc, [model.selection("EDGE", "Edge_1_1")], model.selection("EDGE", "PartSet/OZ"), 13, 3) Compound_1 = model.addCompound(Part_1_doc, [model.selection("COMPSOLID", "Extrusion_1_1"), model.selection("FACE", "Extrusion_2_1")]) -Fuse_1 = model.addFuse(Part_1_doc, [model.selection("SOLID", "Compound_1_1_1_1")], [model.selection("SOLID", "LinearCopy_2_1_1_1")], False, 20190506) +Fuse_1 = model.addFuse(Part_1_doc, [model.selection("SOLID", "Compound_1_1_1_1")], [model.selection("SOLID", "LinearCopy_2_1_1_1")], False, keepSubResults = True) model.testHaveNamingSubshapes(Fuse_1, model, Part_1_doc) diff --git a/src/FeaturesPlugin/Test/TestBooleanSmash_MultiLevelCompound_v20190506_1.py b/src/FeaturesPlugin/Test/TestBooleanSmash_MultiLevelCompound_v20190506_1.py index e0b1e5c55..943387e8c 100644 --- a/src/FeaturesPlugin/Test/TestBooleanSmash_MultiLevelCompound_v20190506_1.py +++ b/src/FeaturesPlugin/Test/TestBooleanSmash_MultiLevelCompound_v20190506_1.py @@ -77,7 +77,7 @@ Compound_1.result().subResult(0).subResult(0).setColor(0, 170, 0) Compound_1.result().subResult(0).subResult(1).setColor(0, 170, 0) Compound_1.result().subResult(1).subResult(0).setColor(0, 255, 0) Compound_1.result().subResult(1).subResult(1).setColor(0, 255, 0) -Smash_1 = model.addSmash(Part_1_doc, [model.selection("SOLID", "LinearCopy_2_1_1_1")], [model.selection("SOLID", "Compound_1_1_2_1"), model.selection("SOLID", "Compound_1_1_2_2")], 20190506) +Smash_1 = model.addSmash(Part_1_doc, [model.selection("SOLID", "LinearCopy_2_1_1_1")], [model.selection("SOLID", "Compound_1_1_2_1"), model.selection("SOLID", "Compound_1_1_2_2")], keepSubResults = True) model.testHaveNamingSubshapes(Smash_1, model, Part_1_doc) diff --git a/src/FeaturesPlugin/Test/TestBooleanSmash_MultiLevelCompound_v20190506_2.py b/src/FeaturesPlugin/Test/TestBooleanSmash_MultiLevelCompound_v20190506_2.py index d7b2d5607..5d5c28f41 100644 --- a/src/FeaturesPlugin/Test/TestBooleanSmash_MultiLevelCompound_v20190506_2.py +++ b/src/FeaturesPlugin/Test/TestBooleanSmash_MultiLevelCompound_v20190506_2.py @@ -102,7 +102,7 @@ Compound_3.result().subResult(0).setColor(0, 170, 0) Compound_3.result().subResult(1).setColor(0, 255, 0) Compound_3.result().subResult(1).subResult(0).setColor(0, 255, 0) Compound_3.result().subResult(1).subResult(1).setColor(0, 255, 0) -Smash_1 = model.addSmash(Part_1_doc, [model.selection("SOLID", "Compound_2_1_1_1"), model.selection("SOLID", "Compound_2_1_2_3")], [model.selection("SOLID", "Compound_3_1_2_2")], 20190506) +Smash_1 = model.addSmash(Part_1_doc, [model.selection("SOLID", "Compound_2_1_1_1"), model.selection("SOLID", "Compound_2_1_2_3")], [model.selection("SOLID", "Compound_3_1_2_2")], keepSubResults = True) model.testHaveNamingSubshapes(Smash_1, model, Part_1_doc) diff --git a/src/FeaturesPlugin/Test/TestBooleanSplit_MultiLevelCompound_v20190506_1.py b/src/FeaturesPlugin/Test/TestBooleanSplit_MultiLevelCompound_v20190506_1.py index f768b45a3..9e753aa91 100644 --- a/src/FeaturesPlugin/Test/TestBooleanSplit_MultiLevelCompound_v20190506_1.py +++ b/src/FeaturesPlugin/Test/TestBooleanSplit_MultiLevelCompound_v20190506_1.py @@ -77,7 +77,7 @@ Compound_1.result().subResult(0).subResult(0).setColor(0, 170, 0) Compound_1.result().subResult(0).subResult(1).setColor(0, 170, 0) Compound_1.result().subResult(1).subResult(0).setColor(0, 255, 0) Compound_1.result().subResult(1).subResult(1).setColor(0, 255, 0) -Split_1 = model.addSplit(Part_1_doc, [model.selection("SOLID", "LinearCopy_2_1_1_1")], [model.selection("COMPOUND", "Compound_1_1_2")], 20190506) +Split_1 = model.addSplit(Part_1_doc, [model.selection("SOLID", "LinearCopy_2_1_1_1")], [model.selection("COMPOUND", "Compound_1_1_2")], keepSubResults = True) model.testHaveNamingSubshapes(Split_1, model, Part_1_doc) diff --git a/src/FeaturesPlugin/Test/TestBooleanSplit_MultiLevelCompound_v20190506_2.py b/src/FeaturesPlugin/Test/TestBooleanSplit_MultiLevelCompound_v20190506_2.py index bee85a528..bda2fb37d 100644 --- a/src/FeaturesPlugin/Test/TestBooleanSplit_MultiLevelCompound_v20190506_2.py +++ b/src/FeaturesPlugin/Test/TestBooleanSplit_MultiLevelCompound_v20190506_2.py @@ -102,7 +102,7 @@ Compound_3.result().subResult(0).setColor(0, 170, 0) Compound_3.result().subResult(1).setColor(0, 255, 0) Compound_3.result().subResult(1).subResult(0).setColor(0, 255, 0) Compound_3.result().subResult(1).subResult(1).setColor(0, 255, 0) -Split_1 = model.addSplit(Part_1_doc, [model.selection("SOLID", "Compound_2_1_1_1"), model.selection("SOLID", "Compound_2_1_2_3")], [model.selection("COMPOUND", "Compound_3_1_2")], 20190506) +Split_1 = model.addSplit(Part_1_doc, [model.selection("SOLID", "Compound_2_1_1_1"), model.selection("SOLID", "Compound_2_1_2_3")], [model.selection("COMPOUND", "Compound_3_1_2")], keepSubResults = True) model.testHaveNamingSubshapes(Split_1, model, Part_1_doc) diff --git a/src/FeaturesPlugin/Test/TestPartition_MultiLevelCompound_v20190506_1.py b/src/FeaturesPlugin/Test/TestPartition_MultiLevelCompound_v20190506_1.py index b0bd23d04..2e425e14e 100644 --- a/src/FeaturesPlugin/Test/TestPartition_MultiLevelCompound_v20190506_1.py +++ b/src/FeaturesPlugin/Test/TestPartition_MultiLevelCompound_v20190506_1.py @@ -77,7 +77,7 @@ Compound_1.result().subResult(0).subResult(0).setColor(0, 170, 0) Compound_1.result().subResult(0).subResult(1).setColor(0, 170, 0) Compound_1.result().subResult(1).subResult(0).setColor(0, 255, 0) Compound_1.result().subResult(1).subResult(1).setColor(0, 255, 0) -Partition_1 = model.addPartition(Part_1_doc, [model.selection("SOLID", "LinearCopy_2_1_1_1"), model.selection("COMPOUND", "Compound_1_1_2")], 20190506) +Partition_1 = model.addPartition(Part_1_doc, [model.selection("SOLID", "LinearCopy_2_1_1_1"), model.selection("COMPOUND", "Compound_1_1_2")], keepSubResults = True) model.testHaveNamingSubshapes(Partition_1, model, Part_1_doc) diff --git a/src/FeaturesPlugin/Test/TestPartition_MultiLevelCompound_v20190506_2.py b/src/FeaturesPlugin/Test/TestPartition_MultiLevelCompound_v20190506_2.py index 26e0f567b..68f840d90 100644 --- a/src/FeaturesPlugin/Test/TestPartition_MultiLevelCompound_v20190506_2.py +++ b/src/FeaturesPlugin/Test/TestPartition_MultiLevelCompound_v20190506_2.py @@ -102,7 +102,7 @@ Compound_3.result().subResult(0).setColor(0, 170, 0) Compound_3.result().subResult(1).setColor(0, 255, 0) Compound_3.result().subResult(1).subResult(0).setColor(0, 255, 0) Compound_3.result().subResult(1).subResult(1).setColor(0, 255, 0) -Partition_1 = model.addPartition(Part_1_doc, [model.selection("SOLID", "Compound_2_1_1_1"), model.selection("SOLID", "Compound_2_1_2_3"), model.selection("COMPOUND", "Compound_3_1_2")], 20190506) +Partition_1 = model.addPartition(Part_1_doc, [model.selection("SOLID", "Compound_2_1_1_1"), model.selection("SOLID", "Compound_2_1_2_3"), model.selection("COMPOUND", "Compound_3_1_2")], keepSubResults = True) model.testHaveNamingSubshapes(Partition_1, model, Part_1_doc) diff --git a/src/FeaturesPlugin/Test/TestPartition_MultiLevelCompound_v20190506_3.py b/src/FeaturesPlugin/Test/TestPartition_MultiLevelCompound_v20190506_3.py index 0354f6252..e7e3f9e14 100644 --- a/src/FeaturesPlugin/Test/TestPartition_MultiLevelCompound_v20190506_3.py +++ b/src/FeaturesPlugin/Test/TestPartition_MultiLevelCompound_v20190506_3.py @@ -79,7 +79,7 @@ Compound_1.result().subResult(0).subResult(1).setColor(0, 170, 0) Compound_1.result().subResult(1).subResult(0).setColor(0, 255, 0) Compound_1.result().subResult(1).subResult(1).setColor(0, 255, 0) Partition_1_objects = [model.selection("SOLID", "LinearCopy_2_1_1_1"), model.selection("SOLID", "Compound_1_1_2_2"), model.selection("SOLID", "LinearCopy_2_1_2_2"), model.selection("SOLID", "Compound_1_1_1_2")] -Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, 20190506) +Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, keepSubResults = True) model.do() model.testNbResults(Partition_1, 1) diff --git a/src/FeaturesPlugin/Test/TestRecover_Compound.py b/src/FeaturesPlugin/Test/TestRecover_Compound.py index 19703b4f7..615ccd0c0 100644 --- a/src/FeaturesPlugin/Test/TestRecover_Compound.py +++ b/src/FeaturesPlugin/Test/TestRecover_Compound.py @@ -34,7 +34,7 @@ SketchConstraintRadius_1 = Sketch_1.setRadius(SketchCircle_1.results()[1], 5) SketchConstraintMiddle_1 = Sketch_1.setMiddlePoint(SketchCircle_1.center(), SketchLine_1.result()) model.do() Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchCircle_1_2f")], model.selection(), 100, 0) -Cut_1 = model.addCut(Part_1_doc, [model.selection("SOLID", "LinearCopy_2_1_2_2")], [model.selection("SOLID", "Extrusion_1_1")], 20190506) +Cut_1 = model.addCut(Part_1_doc, [model.selection("SOLID", "LinearCopy_2_1_2_2")], [model.selection("SOLID", "Extrusion_1_1")], keepSubResults = True) Recover_1 = model.addRecover(Part_1_doc, Cut_1, [LinearCopy_2.result()], True) model.do() model.end() diff --git a/src/FeaturesPlugin/Test/TestRecover_Compsolid1.py b/src/FeaturesPlugin/Test/TestRecover_Compsolid1.py index 7106ac642..ef1e24191 100644 --- a/src/FeaturesPlugin/Test/TestRecover_Compsolid1.py +++ b/src/FeaturesPlugin/Test/TestRecover_Compsolid1.py @@ -48,7 +48,7 @@ Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1_2/ SketchCircle_1 = Sketch_2.addCircle(-4.420087352215441, 24.04732854606771, 12.87676926472621) model.do() Extrusion_2 = model.addExtrusion(Part_1_doc, [model.selection("WIRE", "Sketch_2/Face-SketchCircle_1_2r_wire")], model.selection(), 20, 80) -Cut_1 = model.addCut(Part_1_doc, [model.selection("SOLID", "Extrusion_1_1_2")], [model.selection("SOLID", "Extrusion_2_1")], 20190506) +Cut_1 = model.addCut(Part_1_doc, [model.selection("SOLID", "Extrusion_1_1_2")], [model.selection("SOLID", "Extrusion_2_1")], keepSubResults = True) Recover_1 = model.addRecover(Part_1_doc, Cut_1, [Extrusion_1.result()], True) model.end() diff --git a/src/FeaturesPlugin/Test/TestRecover_Compsolid2.py b/src/FeaturesPlugin/Test/TestRecover_Compsolid2.py index 25b379941..c795429f1 100644 --- a/src/FeaturesPlugin/Test/TestRecover_Compsolid2.py +++ b/src/FeaturesPlugin/Test/TestRecover_Compsolid2.py @@ -26,7 +26,7 @@ Part_1_doc = Part_1.document() Box_1 = model.addBox(Part_1_doc, 100, 100, 100) Translation_1 = model.addTranslation(Part_1_doc, [model.selection("SOLID", "Box_1_1")], -50, -50, -50) Partition_1_objects = [model.selection("SOLID", "Translation_1_1"), model.selection("FACE", "PartSet/XOY"), model.selection("FACE", "PartSet/YOZ"), model.selection("FACE", "PartSet/XOZ")] -Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, 20190506) +Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, keepSubResults = True) CompSolid_1_objects = [model.selection("SOLID", "Partition_1_1_1"), model.selection("SOLID", "Partition_1_1_5"), model.selection("SOLID", "Partition_1_1_6"), model.selection("SOLID", "Partition_1_1_8")] CompSolid_1 = model.addCompSolid(Part_1_doc, CompSolid_1_objects) Recover_1 = model.addRecover(Part_1_doc, CompSolid_1, [Partition_1.result()], True) diff --git a/src/FeaturesPlugin/Test/TestUnionFaces_v20190506.py b/src/FeaturesPlugin/Test/TestUnionFaces_v20190506.py index 21beac1c6..06b3717e9 100644 --- a/src/FeaturesPlugin/Test/TestUnionFaces_v20190506.py +++ b/src/FeaturesPlugin/Test/TestUnionFaces_v20190506.py @@ -29,7 +29,7 @@ model.do() Face_1 = model.addFace(Part_1_doc, [model.selection("EDGE", "Sketch_1/SketchCircle_1_2")]) Partition_1_objects = [model.selection("FACE", "Face_1_1"), model.selection("FACE", "PartSet/YOZ"), model.selection("FACE", "PartSet/XOZ")] Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects) -Union_1 = model.addUnion(Part_1_doc, [model.selection("FACE", "Partition_1_1_1"), model.selection("FACE", "Partition_1_1_2")], 20190506) +Union_1 = model.addUnion(Part_1_doc, [model.selection("FACE", "Partition_1_1_1"), model.selection("FACE", "Partition_1_1_2")], keepSubResults = True) model.do() model.end() diff --git a/src/FeaturesPlugin/Test/TestUnion_MultiLevelCompound_v20190506.py b/src/FeaturesPlugin/Test/TestUnion_MultiLevelCompound_v20190506.py index 3e2469c59..18e2c1e27 100644 --- a/src/FeaturesPlugin/Test/TestUnion_MultiLevelCompound_v20190506.py +++ b/src/FeaturesPlugin/Test/TestUnion_MultiLevelCompound_v20190506.py @@ -68,7 +68,7 @@ Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("COMPOUND", "Sketc Compound_1_objects = [model.selection("COMPSOLID", "Extrusion_1_1"), model.selection("SOLID", "Extrusion_1_2"), model.selection("SOLID", "Extrusion_1_3"), model.selection("SOLID", "Extrusion_1_4"), model.selection("SOLID", "Extrusion_1_5"), model.selection("SOLID", "Extrusion_1_6"), model.selection("SOLID", "Extrusion_1_7"), model.selection("SOLID", "Extrusion_1_8"), model.selection("SOLID", "Extrusion_1_9")] Compound_1 = model.addCompound(Part_1_doc, Compound_1_objects) Union_1_objects = [model.selection("SOLID", "Compound_1_1_1_1"), model.selection("SOLID", "Compound_1_1_1_2"), model.selection("SOLID", "Compound_1_1_1_3")] -Union_1 = model.addUnion(Part_1_doc, Union_1_objects, 20190506) +Union_1 = model.addUnion(Part_1_doc, Union_1_objects, keepSubResults = True) model.testHaveNamingSubshapes(Union_1, model, Part_1_doc) diff --git a/src/FiltersPlugin/Test/TestFilter_ExternalFaces1.py b/src/FiltersPlugin/Test/TestFilter_ExternalFaces1.py index 58f21450e..48bae94e3 100644 --- a/src/FiltersPlugin/Test/TestFilter_ExternalFaces1.py +++ b/src/FiltersPlugin/Test/TestFilter_ExternalFaces1.py @@ -26,7 +26,7 @@ Part_1 = model.addPart(partSet) Part_1_doc = Part_1.document() Box_1 = model.addBox(Part_1_doc, 10, 10, 10) Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right")) -Partition_1 = model.addPartition(Part_1_doc, [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1")], 20190506) +Partition_1 = model.addPartition(Part_1_doc, [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1")], keepSubResults = True) Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10) Translation_1 = model.addTranslation(Part_1_doc, [model.selection("SOLID", "Cylinder_1_1")], model.selection("EDGE", "PartSet/OX"), 20) Filters = model.filters(Part_1_doc, [model.addFilter(name = "ExternalFaces")]) diff --git a/src/FiltersPlugin/Test/TestFilter_ExternalFaces2.py b/src/FiltersPlugin/Test/TestFilter_ExternalFaces2.py index 5e3121c9f..23a4f839e 100644 --- a/src/FiltersPlugin/Test/TestFilter_ExternalFaces2.py +++ b/src/FiltersPlugin/Test/TestFilter_ExternalFaces2.py @@ -48,7 +48,7 @@ SketchConstraintDistance_3 = Sketch_1.setDistance(SketchAPI_Point(SketchPoint_1) SketchConstraintDistance_4 = Sketch_1.setDistance(SketchAPI_Point(SketchPoint_1).coordinates(), SketchLine_3.result(), 8, True) model.do() Face_1 = model.addFace(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_4r-SketchLine_3r-SketchLine_2r-SketchLine_1r")]) -Partition_1 = model.addPartition(Part_1_doc, [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Face_1_1")], 20190506) +Partition_1 = model.addPartition(Part_1_doc, [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Face_1_1")], keepSubResults = True) Filters = model.filters(Part_1_doc, [model.addFilter(name = "ExternalFaces")]) model.end() diff --git a/src/FiltersPlugin/Test/TestFilter_ExternalFaces_Exclude1.py b/src/FiltersPlugin/Test/TestFilter_ExternalFaces_Exclude1.py index 4a5e962a3..ca45d9cda 100644 --- a/src/FiltersPlugin/Test/TestFilter_ExternalFaces_Exclude1.py +++ b/src/FiltersPlugin/Test/TestFilter_ExternalFaces_Exclude1.py @@ -26,7 +26,7 @@ Part_1 = model.addPart(partSet) Part_1_doc = Part_1.document() Box_1 = model.addBox(Part_1_doc, 10, 10, 10) Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right")) -Partition_1 = model.addPartition(Part_1_doc, [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1")], 20190506) +Partition_1 = model.addPartition(Part_1_doc, [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1")], keepSubResults = True) Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10) Translation_1 = model.addTranslation(Part_1_doc, [model.selection("SOLID", "Cylinder_1_1")], model.selection("EDGE", "PartSet/OX"), 20) Filters = model.filters(Part_1_doc, [model.addFilter(name = "ExternalFaces", exclude = True)]) diff --git a/src/FiltersPlugin/Test/TestFilter_ExternalFaces_Exclude2.py b/src/FiltersPlugin/Test/TestFilter_ExternalFaces_Exclude2.py index 9148ba337..2aae738a9 100644 --- a/src/FiltersPlugin/Test/TestFilter_ExternalFaces_Exclude2.py +++ b/src/FiltersPlugin/Test/TestFilter_ExternalFaces_Exclude2.py @@ -48,7 +48,7 @@ SketchConstraintDistance_3 = Sketch_1.setDistance(SketchAPI_Point(SketchPoint_1) SketchConstraintDistance_4 = Sketch_1.setDistance(SketchAPI_Point(SketchPoint_1).coordinates(), SketchLine_3.result(), 8, True) model.do() Face_1 = model.addFace(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_4r-SketchLine_3r-SketchLine_2r-SketchLine_1r")]) -Partition_1 = model.addPartition(Part_1_doc, [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Face_1_1")], 20190506) +Partition_1 = model.addPartition(Part_1_doc, [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Face_1_1")], keepSubResults = True) Filters = model.filters(Part_1_doc, [model.addFilter(name = "ExternalFaces", exclude = True)]) model.end() diff --git a/src/FiltersPlugin/Test/TestFilter_OnGeometry_Edge1.py b/src/FiltersPlugin/Test/TestFilter_OnGeometry_Edge1.py index 368a57918..9471e5868 100644 --- a/src/FiltersPlugin/Test/TestFilter_OnGeometry_Edge1.py +++ b/src/FiltersPlugin/Test/TestFilter_OnGeometry_Edge1.py @@ -26,7 +26,7 @@ Part_1 = model.addPart(partSet) Part_1_doc = Part_1.document() Box_1 = model.addBox(Part_1_doc, 10, 10, 10) Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right")) -Partition_1 = model.addPartition(Part_1_doc, [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1")], 20190506) +Partition_1 = model.addPartition(Part_1_doc, [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1")], keepSubResults = True) Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10) Translation_1 = model.addTranslation(Part_1_doc, [model.selection("SOLID", "Cylinder_1_1")], model.selection("EDGE", "PartSet/OX"), 20) FilterFace = model.filters(Part_1_doc, [model.addFilter(name = "OnGeometry", args = [model.selection("EDGE", "Partition_1_1_2/Generated_Edge&Plane_1/Plane_1&Box_1_1/Front"), model.selection("EDGE", "[Partition_1_1_1/Modified_Face&Box_1_1/Top][Partition_1_1_1/Modified_Face&Box_1_1/Front]")])]) diff --git a/src/FiltersPlugin/Test/TestFilter_OnGeometry_Exclude_Edge1.py b/src/FiltersPlugin/Test/TestFilter_OnGeometry_Exclude_Edge1.py index 287317a83..870e6bb1a 100644 --- a/src/FiltersPlugin/Test/TestFilter_OnGeometry_Exclude_Edge1.py +++ b/src/FiltersPlugin/Test/TestFilter_OnGeometry_Exclude_Edge1.py @@ -26,7 +26,7 @@ Part_1 = model.addPart(partSet) Part_1_doc = Part_1.document() Box_1 = model.addBox(Part_1_doc, 10, 10, 10) Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right")) -Partition_1 = model.addPartition(Part_1_doc, [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1")], 20190506) +Partition_1 = model.addPartition(Part_1_doc, [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1")], keepSubResults = True) Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10) Translation_1 = model.addTranslation(Part_1_doc, [model.selection("SOLID", "Cylinder_1_1")], model.selection("EDGE", "PartSet/OX"), 20) FilterFace = model.filters(Part_1_doc, [model.addFilter(name = "OnGeometry", exclude = True, args = [model.selection("EDGE", "Partition_1_1_2/Generated_Edge&Plane_1/Plane_1&Box_1_1/Front"), model.selection("EDGE", "[Partition_1_1_1/Modified_Face&Box_1_1/Top][Partition_1_1_1/Modified_Face&Box_1_1/Front]")])]) diff --git a/src/FiltersPlugin/Test/TestFilter_OnGeometry_Exclude_Face1.py b/src/FiltersPlugin/Test/TestFilter_OnGeometry_Exclude_Face1.py index 5f519a0fe..d9d629410 100644 --- a/src/FiltersPlugin/Test/TestFilter_OnGeometry_Exclude_Face1.py +++ b/src/FiltersPlugin/Test/TestFilter_OnGeometry_Exclude_Face1.py @@ -26,7 +26,7 @@ Part_1 = model.addPart(partSet) Part_1_doc = Part_1.document() Box_1 = model.addBox(Part_1_doc, 10, 10, 10) Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right")) -Partition_1 = model.addPartition(Part_1_doc, [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1")], 20190506) +Partition_1 = model.addPartition(Part_1_doc, [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1")], keepSubResults = True) Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10) Translation_1 = model.addTranslation(Part_1_doc, [model.selection("SOLID", "Cylinder_1_1")], model.selection("EDGE", "PartSet/OX"), 20) FilterFace = model.filters(Part_1_doc, [model.addFilter(name = "OnGeometry", exclude = True, args = [model.selection("FACE", "Partition_1_1_1/Modified_Face&Box_1_1/Top")])]) diff --git a/src/FiltersPlugin/Test/TestFilter_OnGeometry_Face1.py b/src/FiltersPlugin/Test/TestFilter_OnGeometry_Face1.py index 6e6cb326c..e511f634e 100644 --- a/src/FiltersPlugin/Test/TestFilter_OnGeometry_Face1.py +++ b/src/FiltersPlugin/Test/TestFilter_OnGeometry_Face1.py @@ -26,7 +26,7 @@ Part_1 = model.addPart(partSet) Part_1_doc = Part_1.document() Box_1 = model.addBox(Part_1_doc, 10, 10, 10) Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right")) -Partition_1 = model.addPartition(Part_1_doc, [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1")], 20190506) +Partition_1 = model.addPartition(Part_1_doc, [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1")], keepSubResults = True) Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10) Translation_1 = model.addTranslation(Part_1_doc, [model.selection("SOLID", "Cylinder_1_1")], model.selection("EDGE", "PartSet/OX"), 20) FilterFace = model.filters(Part_1_doc, [model.addFilter(name = "OnGeometry", args = [model.selection("FACE", "Partition_1_1_1/Modified_Face&Box_1_1/Top")])]) diff --git a/src/FiltersPlugin/Test/TestFilter_OnPlaneSide_Exclude_Face.py b/src/FiltersPlugin/Test/TestFilter_OnPlaneSide_Exclude_Face.py index 776ab48f1..4dbf4ff89 100644 --- a/src/FiltersPlugin/Test/TestFilter_OnPlaneSide_Exclude_Face.py +++ b/src/FiltersPlugin/Test/TestFilter_OnPlaneSide_Exclude_Face.py @@ -26,7 +26,7 @@ Part_1 = model.addPart(partSet) Part_1_doc = Part_1.document() Box_1 = model.addBox(Part_1_doc, 10, 10, 10) Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right")) -Partition_1 = model.addPartition(Part_1_doc, [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1")], 20190506) +Partition_1 = model.addPartition(Part_1_doc, [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1")], keepSubResults = True) Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10) Translation_1 = model.addTranslation(Part_1_doc, [model.selection("SOLID", "Cylinder_1_1")], model.selection("EDGE", "PartSet/OX"), 20) Sketch_1 = model.addSketch(Part_1_doc, model.standardPlane("XOY")) diff --git a/src/FiltersPlugin/Test/TestFilter_OnPlaneSide_Exclude_Plane.py b/src/FiltersPlugin/Test/TestFilter_OnPlaneSide_Exclude_Plane.py index 48e80de43..f3d9e7e58 100644 --- a/src/FiltersPlugin/Test/TestFilter_OnPlaneSide_Exclude_Plane.py +++ b/src/FiltersPlugin/Test/TestFilter_OnPlaneSide_Exclude_Plane.py @@ -26,7 +26,7 @@ Part_1 = model.addPart(partSet) Part_1_doc = Part_1.document() Box_1 = model.addBox(Part_1_doc, 10, 10, 10) Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right")) -Partition_1 = model.addPartition(Part_1_doc, [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1")], 20190506) +Partition_1 = model.addPartition(Part_1_doc, [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1")], keepSubResults = True) Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10) Translation_1 = model.addTranslation(Part_1_doc, [model.selection("SOLID", "Cylinder_1_1")], model.selection("EDGE", "PartSet/OX"), 20) Sketch_1 = model.addSketch(Part_1_doc, model.standardPlane("XOY")) diff --git a/src/FiltersPlugin/Test/TestFilter_OnPlaneSide_Face.py b/src/FiltersPlugin/Test/TestFilter_OnPlaneSide_Face.py index 7ab2dfdb4..b5f9bfe9d 100644 --- a/src/FiltersPlugin/Test/TestFilter_OnPlaneSide_Face.py +++ b/src/FiltersPlugin/Test/TestFilter_OnPlaneSide_Face.py @@ -26,7 +26,7 @@ Part_1 = model.addPart(partSet) Part_1_doc = Part_1.document() Box_1 = model.addBox(Part_1_doc, 10, 10, 10) Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right")) -Partition_1 = model.addPartition(Part_1_doc, [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1")], 20190506) +Partition_1 = model.addPartition(Part_1_doc, [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1")], keepSubResults = True) Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10) Translation_1 = model.addTranslation(Part_1_doc, [model.selection("SOLID", "Cylinder_1_1")], model.selection("EDGE", "PartSet/OX"), 20) Sketch_1 = model.addSketch(Part_1_doc, model.standardPlane("XOY")) diff --git a/src/FiltersPlugin/Test/TestFilter_OnPlaneSide_Plane.py b/src/FiltersPlugin/Test/TestFilter_OnPlaneSide_Plane.py index 0656e1993..39897be2a 100644 --- a/src/FiltersPlugin/Test/TestFilter_OnPlaneSide_Plane.py +++ b/src/FiltersPlugin/Test/TestFilter_OnPlaneSide_Plane.py @@ -26,7 +26,7 @@ Part_1 = model.addPart(partSet) Part_1_doc = Part_1.document() Box_1 = model.addBox(Part_1_doc, 10, 10, 10) Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right")) -Partition_1 = model.addPartition(Part_1_doc, [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1")], 20190506) +Partition_1 = model.addPartition(Part_1_doc, [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1")], keepSubResults = True) Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10) Translation_1 = model.addTranslation(Part_1_doc, [model.selection("SOLID", "Cylinder_1_1")], model.selection("EDGE", "PartSet/OX"), 20) Sketch_1 = model.addSketch(Part_1_doc, model.standardPlane("XOY")) diff --git a/src/FiltersPlugin/Test/TestFilter_OppositeToEdge.py b/src/FiltersPlugin/Test/TestFilter_OppositeToEdge.py index 86b9b99af..f5b20ca83 100644 --- a/src/FiltersPlugin/Test/TestFilter_OppositeToEdge.py +++ b/src/FiltersPlugin/Test/TestFilter_OppositeToEdge.py @@ -29,7 +29,7 @@ Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "PartSet/XOY"), mod Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "PartSet/YOZ"), model.selection("EDGE", "PartSet/OY"), 30) Plane_6 = model.addPlane(Part_1_doc, model.selection("FACE", "PartSet/XOZ"), model.selection("EDGE", "PartSet/OZ"), 30) Partition_1_objects = [model.selection("SOLID", "Translation_1_1"), model.selection("FACE", "Plane_1"), model.selection("FACE", "Plane_2"), model.selection("FACE", "Plane_3")] -Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, 20190506) +Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, keepSubResults = True) Filters = model.filters(Part_1_doc, [model.addFilter(name = "OppositeToEdge", args = [model.selection("EDGE", "Partition_1_1_7/Generated_Edge&Plane_2/Plane_2&Plane_1/Plane_1")])]) model.end() diff --git a/src/FiltersPlugin/Test/TestFilter_OppositeToEdge_Exclude.py b/src/FiltersPlugin/Test/TestFilter_OppositeToEdge_Exclude.py index 2af1de6da..33abc37e6 100644 --- a/src/FiltersPlugin/Test/TestFilter_OppositeToEdge_Exclude.py +++ b/src/FiltersPlugin/Test/TestFilter_OppositeToEdge_Exclude.py @@ -29,7 +29,7 @@ Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "PartSet/XOY"), mod Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "PartSet/YOZ"), model.selection("EDGE", "PartSet/OY"), 30) Plane_6 = model.addPlane(Part_1_doc, model.selection("FACE", "PartSet/XOZ"), model.selection("EDGE", "PartSet/OZ"), 30) Partition_1_objects = [model.selection("SOLID", "Translation_1_1"), model.selection("FACE", "Plane_1"), model.selection("FACE", "Plane_2"), model.selection("FACE", "Plane_3")] -Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, 20190506) +Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, keepSubResults = True) Filters = model.filters(Part_1_doc, [model.addFilter(name = "OppositeToEdge", exclude = True, args = [model.selection("EDGE", "Partition_1_1_7/Generated_Edge&Plane_2/Plane_2&Plane_1/Plane_1")])]) model.end() diff --git a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Edge1.py b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Edge1.py index a53fc56b5..ff21d2cb3 100644 --- a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Edge1.py +++ b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Edge1.py @@ -28,7 +28,7 @@ Box_1 = model.addBox(Part_1_doc, 10, 10, 10) Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right")) Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("FACE", "Box_1_1/Back")) Partition_1_objects = [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1"), model.selection("FACE", "Plane_2")] -Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, 20190506) +Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, keepSubResults = True) Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10) Filters = model.filters(Part_1_doc, [model.addFilter(name = "TopoConnectedFaces", args = [model.selection("EDGE", "[Partition_1_1_3/Modified_Face&Box_1_1/Front][Partition_1_1_3/Modified_Face&Box_1_1/Left]"), False])]) model.end() diff --git a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Edge2.py b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Edge2.py index 09818ac6b..940645bcb 100644 --- a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Edge2.py +++ b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Edge2.py @@ -28,7 +28,7 @@ Box_1 = model.addBox(Part_1_doc, 10, 10, 10) Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right")) Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("FACE", "Box_1_1/Back")) Partition_1_objects = [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1"), model.selection("FACE", "Plane_2")] -Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, 20190506) +Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, keepSubResults = True) Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10) Filters = model.filters(Part_1_doc, [model.addFilter(name = "TopoConnectedFaces", args = [model.selection("EDGE", "Partition_1_1_2/Generated_Edge&Plane_2/Plane_2&Box_1_1/Top"), False])]) model.end() diff --git a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Edge3.py b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Edge3.py index c9b8f6b36..34a28aa07 100644 --- a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Edge3.py +++ b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Edge3.py @@ -28,7 +28,7 @@ Box_1 = model.addBox(Part_1_doc, 10, 10, 10) Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right")) Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("FACE", "Box_1_1/Back")) Partition_1_objects = [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1"), model.selection("FACE", "Plane_2")] -Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, 20190506) +Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, keepSubResults = True) Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10) Filters = model.filters(Part_1_doc, [model.addFilter(name = "TopoConnectedFaces", args = [model.selection("EDGE", "([Cylinder_1_1/Face_1][Cylinder_1_1/Face_2])([Cylinder_1_1/Face_1][Cylinder_1_1/Face_3])"), False])]) model.end() diff --git a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Exclude_Edge1.py b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Exclude_Edge1.py index c3dd4bb4e..76e56dd2b 100644 --- a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Exclude_Edge1.py +++ b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Exclude_Edge1.py @@ -28,7 +28,7 @@ Box_1 = model.addBox(Part_1_doc, 10, 10, 10) Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right")) Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("FACE", "Box_1_1/Back")) Partition_1_objects = [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1"), model.selection("FACE", "Plane_2")] -Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, 20190506) +Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, keepSubResults = True) Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10) Filters = model.filters(Part_1_doc, [model.addFilter(name = "TopoConnectedFaces", exclude = True, args = [model.selection("EDGE", "[Partition_1_1_3/Modified_Face&Box_1_1/Front][Partition_1_1_3/Modified_Face&Box_1_1/Left]"), False])]) model.end() diff --git a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Exclude_Edge2.py b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Exclude_Edge2.py index c3b0b30bc..bdeafa330 100644 --- a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Exclude_Edge2.py +++ b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Exclude_Edge2.py @@ -28,7 +28,7 @@ Box_1 = model.addBox(Part_1_doc, 10, 10, 10) Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right")) Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("FACE", "Box_1_1/Back")) Partition_1_objects = [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1"), model.selection("FACE", "Plane_2")] -Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, 20190506) +Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, keepSubResults = True) Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10) Filters = model.filters(Part_1_doc, [model.addFilter(name = "TopoConnectedFaces", exclude = True, args = [model.selection("EDGE", "Partition_1_1_2/Generated_Edge&Plane_2/Plane_2&Box_1_1/Top"), False])]) model.end() diff --git a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Exclude_Edge3.py b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Exclude_Edge3.py index 214682ce8..b750318f1 100644 --- a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Exclude_Edge3.py +++ b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Exclude_Edge3.py @@ -28,7 +28,7 @@ Box_1 = model.addBox(Part_1_doc, 10, 10, 10) Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right")) Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("FACE", "Box_1_1/Back")) Partition_1_objects = [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1"), model.selection("FACE", "Plane_2")] -Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, 20190506) +Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, keepSubResults = True) Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10) Filters = model.filters(Part_1_doc, [model.addFilter(name = "TopoConnectedFaces", exclude = True, args = [model.selection("EDGE", "([Cylinder_1_1/Face_1][Cylinder_1_1/Face_2])([Cylinder_1_1/Face_1][Cylinder_1_1/Face_3])"), False])]) model.end() diff --git a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Exclude_Face1.py b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Exclude_Face1.py index 5d4145a67..fdf223ccc 100644 --- a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Exclude_Face1.py +++ b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Exclude_Face1.py @@ -28,7 +28,7 @@ Box_1 = model.addBox(Part_1_doc, 10, 10, 10) Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right")) Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("FACE", "Box_1_1/Back")) Partition_1_objects = [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1"), model.selection("FACE", "Plane_2")] -Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, 20190506) +Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, keepSubResults = True) Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10) Filters = model.filters(Part_1_doc, [model.addFilter(name = "TopoConnectedFaces", exclude = True, args = [model.selection("FACE", "Partition_1_1_3/Modified_Face&Box_1_1/Left"), False])]) model.end() diff --git a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Exclude_Face2.py b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Exclude_Face2.py index 5ba48d6ef..db4c7d752 100644 --- a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Exclude_Face2.py +++ b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Exclude_Face2.py @@ -28,7 +28,7 @@ Box_1 = model.addBox(Part_1_doc, 10, 10, 10) Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right")) Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("FACE", "Box_1_1/Back")) Partition_1_objects = [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1"), model.selection("FACE", "Plane_2")] -Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, 20190506) +Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, keepSubResults = True) Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10) Filters = model.filters(Part_1_doc, [model.addFilter(name = "TopoConnectedFaces", exclude = True, args = [model.selection("FACE", "Partition_1_1_2/Modified_Face&Box_1_1/Top"), False])]) model.end() diff --git a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Exclude_Face3.py b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Exclude_Face3.py index 18216baa4..2fbd6dd2c 100644 --- a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Exclude_Face3.py +++ b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Exclude_Face3.py @@ -28,7 +28,7 @@ Box_1 = model.addBox(Part_1_doc, 10, 10, 10) Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right")) Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("FACE", "Box_1_1/Back")) Partition_1_objects = [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1"), model.selection("FACE", "Plane_2")] -Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, 20190506) +Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, keepSubResults = True) Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10) Filters = model.filters(Part_1_doc, [model.addFilter(name = "TopoConnectedFaces", exclude = True, args = [model.selection("FACE", "Cylinder_1_1/Face_3"), False])]) model.end() diff --git a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Exclude_Vertex1.py b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Exclude_Vertex1.py index 3687361e7..5638c3e64 100644 --- a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Exclude_Vertex1.py +++ b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Exclude_Vertex1.py @@ -28,7 +28,7 @@ Box_1 = model.addBox(Part_1_doc, 10, 10, 10) Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right")) Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("FACE", "Box_1_1/Back")) Partition_1_objects = [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1"), model.selection("FACE", "Plane_2")] -Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, 20190506) +Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, keepSubResults = True) Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10) Filters = model.filters(Part_1_doc, [model.addFilter(name = "TopoConnectedFaces", exclude = True, args = [model.selection("VERTEX", "[Partition_1_1_3/Modified_Face&Box_1_1/Top][Partition_1_1_3/Modified_Face&Box_1_1/Front][Partition_1_1_3/Modified_Face&Box_1_1/Left]"), False])]) model.end() diff --git a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Exclude_Vertex2.py b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Exclude_Vertex2.py index 8cdee75cd..1da7a02ce 100644 --- a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Exclude_Vertex2.py +++ b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Exclude_Vertex2.py @@ -28,7 +28,7 @@ Box_1 = model.addBox(Part_1_doc, 10, 10, 10) Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right")) Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("FACE", "Box_1_1/Back")) Partition_1_objects = [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1"), model.selection("FACE", "Plane_2")] -Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, 20190506) +Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, keepSubResults = True) Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10) Filters = model.filters(Part_1_doc, [model.addFilter(name = "TopoConnectedFaces", exclude = True, args = [model.selection("VERTEX", "[Partition_1_1_2/Modified_Face&Box_1_1/Top][Partition_1_1_2/Modified_Face&Plane_1/Plane_1][Partition_1_1_2/Modified_Face&Plane_2/Plane_2]"), False])]) model.end() diff --git a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Exclude_Vertex3.py b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Exclude_Vertex3.py index 787af0e79..a573b315f 100644 --- a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Exclude_Vertex3.py +++ b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Exclude_Vertex3.py @@ -28,7 +28,7 @@ Box_1 = model.addBox(Part_1_doc, 10, 10, 10) Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right")) Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("FACE", "Box_1_1/Back")) Partition_1_objects = [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1"), model.selection("FACE", "Plane_2")] -Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, 20190506) +Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, keepSubResults = True) Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10) Filters = model.filters(Part_1_doc, [model.addFilter(name = "TopoConnectedFaces", exclude = True, args = [model.selection("VERTEX", "[Cylinder_1_1/Face_1][Cylinder_1_1/Face_3]"), False])]) model.end() diff --git a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Face1.py b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Face1.py index edcc01e8d..b4e8c4c26 100644 --- a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Face1.py +++ b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Face1.py @@ -28,7 +28,7 @@ Box_1 = model.addBox(Part_1_doc, 10, 10, 10) Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right")) Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("FACE", "Box_1_1/Back")) Partition_1_objects = [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1"), model.selection("FACE", "Plane_2")] -Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, 20190506) +Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, keepSubResults = True) Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10) Filters = model.filters(Part_1_doc, [model.addFilter(name = "TopoConnectedFaces", args = [model.selection("FACE", "Partition_1_1_3/Modified_Face&Box_1_1/Left"), False])]) model.end() diff --git a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Face2.py b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Face2.py index 7ec42304a..fe7f7f4bf 100644 --- a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Face2.py +++ b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Face2.py @@ -28,7 +28,7 @@ Box_1 = model.addBox(Part_1_doc, 10, 10, 10) Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right")) Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("FACE", "Box_1_1/Back")) Partition_1_objects = [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1"), model.selection("FACE", "Plane_2")] -Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, 20190506) +Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, keepSubResults = True) Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10) Filters = model.filters(Part_1_doc, [model.addFilter(name = "TopoConnectedFaces", args = [model.selection("FACE", "Partition_1_1_2/Modified_Face&Box_1_1/Top"), False])]) model.end() diff --git a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Face3.py b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Face3.py index cd09cc0ce..9f43f9e5c 100644 --- a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Face3.py +++ b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Face3.py @@ -28,7 +28,7 @@ Box_1 = model.addBox(Part_1_doc, 10, 10, 10) Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right")) Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("FACE", "Box_1_1/Back")) Partition_1_objects = [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1"), model.selection("FACE", "Plane_2")] -Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, 20190506) +Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, keepSubResults = True) Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10) Filters = model.filters(Part_1_doc, [model.addFilter(name = "TopoConnectedFaces", args = [model.selection("FACE", "Cylinder_1_1/Face_3"), False])]) model.end() diff --git a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Edge1.py b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Edge1.py index 1ebc1012b..b4727da88 100644 --- a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Edge1.py +++ b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Edge1.py @@ -28,7 +28,7 @@ Box_1 = model.addBox(Part_1_doc, 10, 10, 10) Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right")) Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("FACE", "Box_1_1/Back")) Partition_1_objects = [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1"), model.selection("FACE", "Plane_2")] -Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, 20190506) +Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, keepSubResults = True) Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10) Filters = model.filters(Part_1_doc, [model.addFilter(name = "TopoConnectedFaces", args = [model.selection("EDGE", "[Partition_1_1_3/Modified_Face&Box_1_1/Front][Partition_1_1_3/Modified_Face&Box_1_1/Left]"), True])]) model.end() diff --git a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Edge2.py b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Edge2.py index d4914af5b..2a7880b54 100644 --- a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Edge2.py +++ b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Edge2.py @@ -28,7 +28,7 @@ Box_1 = model.addBox(Part_1_doc, 10, 10, 10) Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right")) Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("FACE", "Box_1_1/Back")) Partition_1_objects = [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1"), model.selection("FACE", "Plane_2")] -Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, 20190506) +Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, keepSubResults = True) Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10) Filters = model.filters(Part_1_doc, [model.addFilter(name = "TopoConnectedFaces", args = [model.selection("EDGE", "Partition_1_1_2/Generated_Edge&Plane_2/Plane_2&Box_1_1/Top"), True])]) model.end() diff --git a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Edge3.py b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Edge3.py index 3f6605d54..2f3f9e6f0 100644 --- a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Edge3.py +++ b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Edge3.py @@ -28,7 +28,7 @@ Box_1 = model.addBox(Part_1_doc, 10, 10, 10) Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right")) Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("FACE", "Box_1_1/Back")) Partition_1_objects = [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1"), model.selection("FACE", "Plane_2")] -Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, 20190506) +Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, keepSubResults = True) Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10) Filters = model.filters(Part_1_doc, [model.addFilter(name = "TopoConnectedFaces", args = [model.selection("EDGE", "([Cylinder_1_1/Face_1][Cylinder_1_1/Face_2])([Cylinder_1_1/Face_1][Cylinder_1_1/Face_3])"), True])]) model.end() diff --git a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Exclude_Edge1.py b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Exclude_Edge1.py index 458cb0806..aaa366c1f 100644 --- a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Exclude_Edge1.py +++ b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Exclude_Edge1.py @@ -28,7 +28,7 @@ Box_1 = model.addBox(Part_1_doc, 10, 10, 10) Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right")) Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("FACE", "Box_1_1/Back")) Partition_1_objects = [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1"), model.selection("FACE", "Plane_2")] -Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, 20190506) +Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, keepSubResults = True) Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10) Filters = model.filters(Part_1_doc, [model.addFilter(name = "TopoConnectedFaces", exclude = True, args = [model.selection("EDGE", "[Partition_1_1_3/Modified_Face&Box_1_1/Front][Partition_1_1_3/Modified_Face&Box_1_1/Left]"), True])]) model.end() diff --git a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Exclude_Edge2.py b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Exclude_Edge2.py index 35e7aa6d8..b510c9617 100644 --- a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Exclude_Edge2.py +++ b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Exclude_Edge2.py @@ -28,7 +28,7 @@ Box_1 = model.addBox(Part_1_doc, 10, 10, 10) Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right")) Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("FACE", "Box_1_1/Back")) Partition_1_objects = [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1"), model.selection("FACE", "Plane_2")] -Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, 20190506) +Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, keepSubResults = True) Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10) Filters = model.filters(Part_1_doc, [model.addFilter(name = "TopoConnectedFaces", exclude = True, args = [model.selection("EDGE", "Partition_1_1_2/Generated_Edge&Plane_2/Plane_2&Box_1_1/Top"), True])]) model.end() diff --git a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Exclude_Edge3.py b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Exclude_Edge3.py index 6e6d21859..603846224 100644 --- a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Exclude_Edge3.py +++ b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Exclude_Edge3.py @@ -28,7 +28,7 @@ Box_1 = model.addBox(Part_1_doc, 10, 10, 10) Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right")) Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("FACE", "Box_1_1/Back")) Partition_1_objects = [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1"), model.selection("FACE", "Plane_2")] -Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, 20190506) +Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, keepSubResults = True) Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10) Filters = model.filters(Part_1_doc, [model.addFilter(name = "TopoConnectedFaces", exclude = True, args = [model.selection("EDGE", "([Cylinder_1_1/Face_1][Cylinder_1_1/Face_2])([Cylinder_1_1/Face_1][Cylinder_1_1/Face_3])"), True])]) model.end() diff --git a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Exclude_Face1.py b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Exclude_Face1.py index 4552f0497..15991d0a9 100644 --- a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Exclude_Face1.py +++ b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Exclude_Face1.py @@ -28,7 +28,7 @@ Box_1 = model.addBox(Part_1_doc, 10, 10, 10) Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right")) Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("FACE", "Box_1_1/Back")) Partition_1_objects = [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1"), model.selection("FACE", "Plane_2")] -Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, 20190506) +Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, keepSubResults = True) Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10) Filters = model.filters(Part_1_doc, [model.addFilter(name = "TopoConnectedFaces", exclude = True, args = [model.selection("FACE", "Partition_1_1_3/Modified_Face&Box_1_1/Left"), True])]) model.end() diff --git a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Exclude_Face2.py b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Exclude_Face2.py index da4826372..3fab19a75 100644 --- a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Exclude_Face2.py +++ b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Exclude_Face2.py @@ -28,7 +28,7 @@ Box_1 = model.addBox(Part_1_doc, 10, 10, 10) Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right")) Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("FACE", "Box_1_1/Back")) Partition_1_objects = [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1"), model.selection("FACE", "Plane_2")] -Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, 20190506) +Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, keepSubResults = True) Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10) Filters = model.filters(Part_1_doc, [model.addFilter(name = "TopoConnectedFaces", exclude = True, args = [model.selection("FACE", "Partition_1_1_2/Modified_Face&Box_1_1/Top"), True])]) model.end() diff --git a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Exclude_Face3.py b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Exclude_Face3.py index 2cf406b80..47f0e3fc8 100644 --- a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Exclude_Face3.py +++ b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Exclude_Face3.py @@ -28,7 +28,7 @@ Box_1 = model.addBox(Part_1_doc, 10, 10, 10) Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right")) Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("FACE", "Box_1_1/Back")) Partition_1_objects = [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1"), model.selection("FACE", "Plane_2")] -Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, 20190506) +Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, keepSubResults = True) Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10) Filters = model.filters(Part_1_doc, [model.addFilter(name = "TopoConnectedFaces", exclude = True, args = [model.selection("FACE", "Cylinder_1_1/Face_3"), True])]) model.end() diff --git a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Exclude_Vertex1.py b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Exclude_Vertex1.py index 5a82acb36..6594a06bd 100644 --- a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Exclude_Vertex1.py +++ b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Exclude_Vertex1.py @@ -28,7 +28,7 @@ Box_1 = model.addBox(Part_1_doc, 10, 10, 10) Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right")) Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("FACE", "Box_1_1/Back")) Partition_1_objects = [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1"), model.selection("FACE", "Plane_2")] -Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, 20190506) +Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, keepSubResults = True) Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10) Filters = model.filters(Part_1_doc, [model.addFilter(name = "TopoConnectedFaces", exclude = True, args = [model.selection("VERTEX", "[Partition_1_1_3/Modified_Face&Box_1_1/Top][Partition_1_1_3/Modified_Face&Box_1_1/Front][Partition_1_1_3/Modified_Face&Box_1_1/Left]"), True])]) model.end() diff --git a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Exclude_Vertex2.py b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Exclude_Vertex2.py index 826a2f365..502fdbadb 100644 --- a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Exclude_Vertex2.py +++ b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Exclude_Vertex2.py @@ -28,7 +28,7 @@ Box_1 = model.addBox(Part_1_doc, 10, 10, 10) Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right")) Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("FACE", "Box_1_1/Back")) Partition_1_objects = [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1"), model.selection("FACE", "Plane_2")] -Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, 20190506) +Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, keepSubResults = True) Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10) Filters = model.filters(Part_1_doc, [model.addFilter(name = "TopoConnectedFaces", exclude = True, args = [model.selection("VERTEX", "[Partition_1_1_2/Modified_Face&Box_1_1/Top][Partition_1_1_2/Modified_Face&Plane_1/Plane_1][Partition_1_1_2/Modified_Face&Plane_2/Plane_2]"), True])]) model.end() diff --git a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Exclude_Vertex3.py b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Exclude_Vertex3.py index 2796ab672..350f8c63d 100644 --- a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Exclude_Vertex3.py +++ b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Exclude_Vertex3.py @@ -28,7 +28,7 @@ Box_1 = model.addBox(Part_1_doc, 10, 10, 10) Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right")) Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("FACE", "Box_1_1/Back")) Partition_1_objects = [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1"), model.selection("FACE", "Plane_2")] -Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, 20190506) +Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, keepSubResults = True) Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10) Filters = model.filters(Part_1_doc, [model.addFilter(name = "TopoConnectedFaces", exclude = True, args = [model.selection("VERTEX", "[Cylinder_1_1/Face_1][Cylinder_1_1/Face_3]"), True])]) model.end() diff --git a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Face1.py b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Face1.py index 01d2ab748..786b049fc 100644 --- a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Face1.py +++ b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Face1.py @@ -28,7 +28,7 @@ Box_1 = model.addBox(Part_1_doc, 10, 10, 10) Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right")) Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("FACE", "Box_1_1/Back")) Partition_1_objects = [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1"), model.selection("FACE", "Plane_2")] -Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, 20190506) +Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, keepSubResults = True) Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10) Filters = model.filters(Part_1_doc, [model.addFilter(name = "TopoConnectedFaces", args = [model.selection("FACE", "Partition_1_1_3/Modified_Face&Box_1_1/Left"), True])]) model.end() diff --git a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Face2.py b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Face2.py index dda94d36c..b1b4e5a16 100644 --- a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Face2.py +++ b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Face2.py @@ -28,7 +28,7 @@ Box_1 = model.addBox(Part_1_doc, 10, 10, 10) Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right")) Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("FACE", "Box_1_1/Back")) Partition_1_objects = [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1"), model.selection("FACE", "Plane_2")] -Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, 20190506) +Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, keepSubResults = True) Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10) Filters = model.filters(Part_1_doc, [model.addFilter(name = "TopoConnectedFaces", args = [model.selection("FACE", "Partition_1_1_2/Modified_Face&Box_1_1/Top"), True])]) model.end() diff --git a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Face3.py b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Face3.py index 29fb41d68..a98ee3ca4 100644 --- a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Face3.py +++ b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Face3.py @@ -28,7 +28,7 @@ Box_1 = model.addBox(Part_1_doc, 10, 10, 10) Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right")) Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("FACE", "Box_1_1/Back")) Partition_1_objects = [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1"), model.selection("FACE", "Plane_2")] -Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, 20190506) +Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, keepSubResults = True) Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10) Filters = model.filters(Part_1_doc, [model.addFilter(name = "TopoConnectedFaces", args = [model.selection("FACE", "Cylinder_1_1/Face_3"), True])]) model.end() diff --git a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Vertex1.py b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Vertex1.py index 340f2431e..8e9643757 100644 --- a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Vertex1.py +++ b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Vertex1.py @@ -28,7 +28,7 @@ Box_1 = model.addBox(Part_1_doc, 10, 10, 10) Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right")) Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("FACE", "Box_1_1/Back")) Partition_1_objects = [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1"), model.selection("FACE", "Plane_2")] -Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, 20190506) +Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, keepSubResults = True) Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10) Filters = model.filters(Part_1_doc, [model.addFilter(name = "TopoConnectedFaces", args = [model.selection("VERTEX", "[Partition_1_1_3/Modified_Face&Box_1_1/Top][Partition_1_1_3/Modified_Face&Box_1_1/Front][Partition_1_1_3/Modified_Face&Box_1_1/Left]"), True])]) model.end() diff --git a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Vertex2.py b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Vertex2.py index 6d51a5571..ae4e3944b 100644 --- a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Vertex2.py +++ b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Vertex2.py @@ -28,7 +28,7 @@ Box_1 = model.addBox(Part_1_doc, 10, 10, 10) Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right")) Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("FACE", "Box_1_1/Back")) Partition_1_objects = [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1"), model.selection("FACE", "Plane_2")] -Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, 20190506) +Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, keepSubResults = True) Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10) Filters = model.filters(Part_1_doc, [model.addFilter(name = "TopoConnectedFaces", args = [model.selection("VERTEX", "[Partition_1_1_2/Modified_Face&Box_1_1/Top][Partition_1_1_2/Modified_Face&Plane_1/Plane_1][Partition_1_1_2/Modified_Face&Plane_2/Plane_2]"), True])]) model.end() diff --git a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Vertex3.py b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Vertex3.py index ca73b3110..0cd8d9cf3 100644 --- a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Vertex3.py +++ b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Prop_Vertex3.py @@ -28,7 +28,7 @@ Box_1 = model.addBox(Part_1_doc, 10, 10, 10) Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right")) Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("FACE", "Box_1_1/Back")) Partition_1_objects = [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1"), model.selection("FACE", "Plane_2")] -Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, 20190506) +Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, keepSubResults = True) Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10) Filters = model.filters(Part_1_doc, [model.addFilter(name = "TopoConnectedFaces", args = [model.selection("VERTEX", "[Cylinder_1_1/Face_1][Cylinder_1_1/Face_3]"), True])]) model.end() diff --git a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Vertex1.py b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Vertex1.py index 2f2dafb04..04c88ae6e 100644 --- a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Vertex1.py +++ b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Vertex1.py @@ -28,7 +28,7 @@ Box_1 = model.addBox(Part_1_doc, 10, 10, 10) Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right")) Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("FACE", "Box_1_1/Back")) Partition_1_objects = [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1"), model.selection("FACE", "Plane_2")] -Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, 20190506) +Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, keepSubResults = True) Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10) Filters = model.filters(Part_1_doc, [model.addFilter(name = "TopoConnectedFaces", args = [model.selection("VERTEX", "[Partition_1_1_3/Modified_Face&Box_1_1/Top][Partition_1_1_3/Modified_Face&Box_1_1/Front][Partition_1_1_3/Modified_Face&Box_1_1/Left]"), False])]) model.end() diff --git a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Vertex2.py b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Vertex2.py index 01d9f9cbf..d887a811e 100644 --- a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Vertex2.py +++ b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Vertex2.py @@ -28,7 +28,7 @@ Box_1 = model.addBox(Part_1_doc, 10, 10, 10) Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right")) Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("FACE", "Box_1_1/Back")) Partition_1_objects = [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1"), model.selection("FACE", "Plane_2")] -Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, 20190506) +Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, keepSubResults = True) Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10) Filters = model.filters(Part_1_doc, [model.addFilter(name = "TopoConnectedFaces", args = [model.selection("VERTEX", "[Partition_1_1_2/Modified_Face&Box_1_1/Top][Partition_1_1_2/Modified_Face&Plane_1/Plane_1][Partition_1_1_2/Modified_Face&Plane_2/Plane_2]"), False])]) model.end() diff --git a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Vertex3.py b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Vertex3.py index 7727e7546..49909c12b 100644 --- a/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Vertex3.py +++ b/src/FiltersPlugin/Test/TestFilter_TopoConnectedFaces_Vertex3.py @@ -28,7 +28,7 @@ Box_1 = model.addBox(Part_1_doc, 10, 10, 10) Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right")) Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("FACE", "Box_1_1/Back")) Partition_1_objects = [model.selection("SOLID", "Box_1_1"), model.selection("FACE", "Plane_1"), model.selection("FACE", "Plane_2")] -Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, 20190506) +Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, keepSubResults = True) Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10) Filters = model.filters(Part_1_doc, [model.addFilter(name = "TopoConnectedFaces", args = [model.selection("VERTEX", "[Cylinder_1_1/Face_1][Cylinder_1_1/Face_3]"), False])]) model.end()