this->myPluginLibrary = myPluginLibrary;
}
+// LCOV_EXCL_START
bool Config_FeatureMessage::isUseInput() const
{
return myUseInput;
{
return myIsApplyContinue;
}
-
+// LCOV_EXCL_STOP
void Config_FeatureMessage::setUseInput(bool isUseInput)
{
} else {
std::string anError;
ListOfShape aListOfShape;
- std::shared_ptr<GeomAlgoAPI_MakeShapeList>
- aListOfTranslationAlgo(new GeomAlgoAPI_MakeShapeList);
+ ListOfMakeShape aMakeShapeList;
for (int i=0; i<nbCopies; i++) {
std::shared_ptr<GeomAlgoAPI_Translation> aTranslationAlgo(
break;
}
aListOfShape.push_back(aTranslationAlgo->shape());
- aListOfTranslationAlgo->appendAlgo(aTranslationAlgo);
+ aMakeShapeList.push_back(aTranslationAlgo);
}
+
+ std::shared_ptr<GeomAlgoAPI_MakeShapeList>
+ aListOfTranslationAlgo(new GeomAlgoAPI_MakeShapeList(aMakeShapeList));
+
std::shared_ptr<GeomAPI_Shape> aCompound =
GeomAlgoAPI_CompoundBuilder::compound(aListOfShape);
ResultBodyPtr aResultBody = document()->createBody(data(), aResultIndex);
} else {
std::string anError;
ListOfShape aListOfShape;
- std::shared_ptr<GeomAlgoAPI_MakeShapeList>
- aListOfTranslationAlgo(new GeomAlgoAPI_MakeShapeList);
+ ListOfMakeShape aMakeShapeList;
for (int j=0; j<aSecondNbCopies; j++) {
for (int i=0; i<aFirstNbCopies; i++) {
break;
}
aListOfShape.push_back(aTranslationAlgo->shape());
- aListOfTranslationAlgo->appendAlgo(aTranslationAlgo);
+ aMakeShapeList.push_back(aTranslationAlgo);
}
}
+
+ std::shared_ptr<GeomAlgoAPI_MakeShapeList>
+ aListOfTranslationAlgo(new GeomAlgoAPI_MakeShapeList(aMakeShapeList));
+
std::shared_ptr<GeomAPI_Shape> aCompound =
GeomAlgoAPI_CompoundBuilder::compound(aListOfShape);
ResultBodyPtr aResultBody = document()->createBody(data(), aResultIndex);
Part_1 = model.addPart(partSet)
Part_1_doc = Part_1.document()
Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
-Group_1 = model.addGroup(Part_1_doc, [model.selection("FACE", "Box_1_1/Bottom"), model.selection("FACE", "Box_1_1/Top"), model.filters(Part_1_doc, [model.addFilter(name = "BelongsTo", args = []), model.addFilter(name = "HorizontalFaces")])])
+Group_1 = model.addGroup(Part_1_doc, [model.selection("FACE", "Box_1_1/Bottom"), model.filters(Part_1_doc, [model.addFilter(name = "BelongsTo", args = [model.selection("SOLID", "Box_1_1")]), model.addFilter(name = "HorizontalFaces"), model.addFilter(name = "OnGeometry", args = [model.selection("FACE", "PartSet/XOY")])])])
model.end()
aFactory = ModelAPI_Session.get().validators()
GroupFeature = Group_1.feature()
assert(aFactory.validate(GroupFeature))
-assert(GroupFeature.selectionList("group_list").size() == 2)
+assert(GroupFeature.selectionList("group_list").size() == 1)
assert(model.checkPythonDump())
}
//==================================================================================================
-#include <GeomAPI_ShapeExplorer.h>
#include <GeomAPI_ShapeIterator.h>
-typedef std::map<GeomShapePtr, ListOfShape, GeomAPI_Shape::Comparator> MapFaceSolid;
-static void facesBelongingToSolids(const GeomShapePtr& theShape,
- MapFaceSolid& theShapeRelations)
-{
- for (GeomAPI_ShapeExplorer aSolidExp(theShape, GeomAPI_Shape::SHELL);
- aSolidExp.more(); aSolidExp.next()) {
- GeomShapePtr aSolid = aSolidExp.current();
- for (GeomAPI_ShapeExplorer aFaceExp(aSolid, GeomAPI_Shape::FACE);
- aFaceExp.more(); aFaceExp.next())
- theShapeRelations[aFaceExp.current()].push_back(aSolid);
- }
-}
-
-static bool isShapeInList(const GeomShapePtr& theShape, const ListOfShape& theList)
-{
- for (ListOfShape::const_iterator anIt = theList.begin(); anIt != theList.end(); ++anIt)
- if (theShape->isEqual(*anIt))
- return true;
- return false;
-}
-
void GeomAlgoAPI_Sewing::modified(const std::shared_ptr<GeomAPI_Shape> theShape,
ListOfShape& theHistory)
{
if(anObjectsNb < aMinObjectsNb) {
theError = "Error: Attribute \"%1\" should contain at least %2 items.";
- theError.arg(aSelectionListId).arg(theArguments.back());
+ theError.arg(aSelectionListId).arg(aMinObjectsNb);
return false;
}
assert(aFound[0].data().isEqual(aFolder.data()))
assert(aFound[1] == 0)
+# check sketch is the last feature in the folder
+aLastFeature = Folder_2.lastVisibleFeature()
+assert(aLastFeature.getKind() == "Sketch")
+
#=========================================================================
# Test 3. Sketch could be removed from the folder