model.do()
Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchCircle_1_2r-SketchLine_5f-SketchLine_6f-SketchLine_9r-SketchLine_10r"), model.selection("FACE", "Sketch_1/Face-SketchLine_1f-SketchCircle_1_2r-SketchLine_7f-SketchLine_9f-SketchLine_12r"), model.selection("FACE", "Sketch_1/Face-SketchLine_4f-SketchCircle_1_2r-SketchLine_8f-SketchLine_11r-SketchLine_12f"), model.selection("FACE", "Sketch_1/Face-SketchLine_2f-SketchLine_3f-SketchCircle_1_2r-SketchLine_10f-SketchLine_11f")], model.selection(), 150, 0)
Group_1 = model.addGroup(Part_1_doc, [model.selection("FACE", "Extrusion_1_1/To_Face_1"), model.selection("FACE", "Extrusion_1_1/To_Face_4"), model.selection("FACE", "Extrusion_1_1/To_Face_3"), model.selection("FACE", "Extrusion_1_1/To_Face_2")])
-Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_12"), 150, True)
+Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_15"), 150, True)
Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_7"), 150, True)
Partition_1 = model.addPartition(Part_1_doc, [model.selection("FACE", "Plane_1"), model.selection("COMPSOLID", "Extrusion_1_1"), model.selection("FACE", "Plane_2")])
Plane_6 = model.addPlane(Part_1_doc, model.selection("FACE", "Partition_1_1_7/Modified_Face_2_4"), 110, True)
-Plane_7 = model.addPlane(Part_1_doc, model.selection("FACE", "Partition_1_1_3/Modified_Face_3_5"), 380, True)
+Plane_7 = model.addPlane(Part_1_doc, model.selection("FACE", "Partition_1_1_5/Modified_Face_3_4"), 380, True)
Partition_2 = model.addPartition(Part_1_doc, [model.selection("FACE", "Plane_3"), model.selection("COMPSOLID", "Partition_1_1"), model.selection("FACE", "Plane_4")])
model.do()
%include "std_string.i"
%include "Config_ModuleReader.h"
+%include "Config_PropManager.h"
+%include "Config_Prop.h"
#include <string>
#include <list>
-const static char* SKETCH_TAB_NAME = "Sketch";
+static const char* SKETCH_TAB_NAME = "Sketch";
/*!
* \class Config_Prop
#define SRC_CONFIG_SWIG_H_
#include "Config_ModuleReader.h"
+ #include "Config_Prop.h"
+ #include "Config_PropManager.h"
#endif /* SRC_CONFIG_SWIG_H_ */
void FeaturesAPI_RemoveSubShapes::setSubShapesToKeep(
const std::list<ModelHighAPI_Selection>& theSubShapes)
{
- fillAttribute(theSubShapes, mysubshapes);
+ fillAttribute(FeaturesPlugin_RemoveSubShapes::CREATION_METHOD_BY_KEEP_SUBSHAPES(),
+ mycreationMethod);
+ fillAttribute(theSubShapes, mysubshapesToKeep);
+
+ execute();
+}
+
+//==================================================================================================
+void FeaturesAPI_RemoveSubShapes::setSubShapesToRemove(
+ const std::list<ModelHighAPI_Selection>& theSubShapes)
+{
+ fillAttribute(FeaturesPlugin_RemoveSubShapes::CREATION_METHOD_BY_REMOVE_SUBSHAPES(),
+ mycreationMethod);
+ fillAttribute(theSubShapes, mysubshapesToRemove);
execute();
}
AttributeSelectionPtr anAttrBaseShape =
aBase->selection(FeaturesPlugin_RemoveSubShapes::BASE_SHAPE_ID());
- AttributeSelectionListPtr anAttrSubShapes =
- aBase->selectionList(FeaturesPlugin_RemoveSubShapes::SUBSHAPES_ID());
- theDumper << aBase << " = model.addRemoveSubShapes(" << aDocName <<
- ", " << anAttrBaseShape << ")" << std::endl;
- theDumper << aBase << ".setSubShapesToKeep(" << anAttrSubShapes << ")" << std::endl;
+ std::string aCreationMethod =
+ aBase->string(FeaturesPlugin_RemoveSubShapes::CREATION_METHOD())->value();
+
+ AttributeSelectionListPtr anAttrSubShapes;
+
+ if (aCreationMethod == FeaturesPlugin_RemoveSubShapes::CREATION_METHOD_BY_KEEP_SUBSHAPES()) {
+ anAttrSubShapes =
+ aBase->selectionList(FeaturesPlugin_RemoveSubShapes::SUBSHAPES_TO_KEEP_ID());
+ }
+ else {
+ anAttrSubShapes =
+ aBase->selectionList(FeaturesPlugin_RemoveSubShapes::SUBSHAPES_TO_REMOVE_ID());
+ }
+
+ theDumper << aBase << " = model.addRemoveSubShapes(" << aDocName << ", " << anAttrBaseShape << ")"
+ << std::endl;
+ theDumper << aBase
+ << (aCreationMethod == FeaturesPlugin_RemoveSubShapes::CREATION_METHOD_BY_KEEP_SUBSHAPES() ?
+ ".setSubShapesToKeep(" : ".setSubShapesToRemove(")
+ << anAttrSubShapes << ")" << std::endl;
}
//==================================================================================================
FEATURESAPI_EXPORT
virtual ~FeaturesAPI_RemoveSubShapes();
- INTERFACE_2(FeaturesPlugin_RemoveSubShapes::ID(),
+ INTERFACE_4(FeaturesPlugin_RemoveSubShapes::ID(),
base, FeaturesPlugin_RemoveSubShapes::BASE_SHAPE_ID(),
ModelAPI_AttributeSelection, /** Base */,
- subshapes, FeaturesPlugin_RemoveSubShapes::SUBSHAPES_ID(),
- ModelAPI_AttributeSelectionList, /** Subshapes */)
+ creationMethod, FeaturesPlugin_RemoveSubShapes::CREATION_METHOD(),
+ ModelAPI_AttributeString, /** Creation method */,
+ subshapesToKeep, FeaturesPlugin_RemoveSubShapes::SUBSHAPES_TO_KEEP_ID(),
+ ModelAPI_AttributeSelectionList, /** Subshapes to keep*/,
+ subshapesToRemove, FeaturesPlugin_RemoveSubShapes::SUBSHAPES_TO_REMOVE_ID(),
+ ModelAPI_AttributeSelectionList, /** Subshapes to remove*/)
/// Modify objects attribute of the feature.
FEATURESAPI_EXPORT
FEATURESAPI_EXPORT
void setSubShapesToKeep(const std::list<ModelHighAPI_Selection>& theSubShapes);
+ /// Modify tools attribute of the feature.
+ FEATURESAPI_EXPORT
+ void setSubShapesToRemove(const std::list<ModelHighAPI_Selection>& theSubShapes);
+
/// Dump wrapped feature
FEATURESAPI_EXPORT
virtual void dump(ModelHighAPI_Dumper& theDumper) const;
TestBooleanCompSolids.py
TestBooleanSmash.py
TestBooleanFill.py
+ TestBooleanFillWithPlane.py
TestMultiBoolean.py
TestSerialBoolean.py
TestIntersection.py
TestUnion.py
+ TestUnionFaces.py
TestRemoveSubShapes.py
+ TestRemoveSubShapes2.py
TestPipe.py
TestRecover.py
TestRecover1798.py
Test2251.py
Test2255.py
Test2289.py
+ Test2304.py
)
#include <ModelAPI_Tools.h>
#include <GeomAlgoAPI_Boolean.h>
+#include <GeomAlgoAPI_MakeShapeCustom.h>
#include <GeomAlgoAPI_MakeShapeList.h>
#include <GeomAlgoAPI_Partition.h>
#include <GeomAlgoAPI_PaveFiller.h>
#include <GeomAlgoAPI_ShapeTools.h>
+#include <GeomAPI_Face.h>
#include <GeomAPI_ShapeExplorer.h>
#include <GeomAPI_ShapeIterator.h>
return;
OperationType aType = (FeaturesPlugin_Boolean::OperationType)aTypeAttr->value();
- ListOfShape anObjects, aTools, anEdgesAndFaces;
+ ListOfShape anObjects, aTools, anEdgesAndFaces, aPlanes;
std::map<std::shared_ptr<GeomAPI_Shape>, ListOfShape> aCompSolidsObjects;
// Getting objects.
AttributeSelectionListPtr aToolsSelList = selectionList(FeaturesPlugin_Boolean::TOOL_LIST_ID());
for(int aToolsIndex = 0; aToolsIndex < aToolsSelList->size(); aToolsIndex++) {
AttributeSelectionPtr aToolAttr = aToolsSelList->value(aToolsIndex);
- std::shared_ptr<GeomAPI_Shape> aTool = aToolAttr->value();
+ GeomShapePtr aTool = aToolAttr->value();
if(!aTool.get()) {
- return;
- }
- if(aTool->shapeType() == GeomAPI_Shape::EDGE ||
+ // It could be a construction plane.
+ ResultPtr aContext = aToolAttr->context();
+ aPlanes.push_back(aToolAttr->context()->shape());
+ } else if(aTool->shapeType() == GeomAPI_Shape::EDGE ||
aTool->shapeType() == GeomAPI_Shape::FACE) {
anEdgesAndFaces.push_back(aTool);
} else {
case BOOL_CUT:
case BOOL_COMMON:
case BOOL_FILL: {
- if((anObjects.empty() && aCompSolidsObjects.empty()) || aTools.empty()) {
+ if((anObjects.empty() && aCompSolidsObjects.empty())
+ || (aTools.empty() && aPlanes.empty())) {
std::string aFeatureError = "Error: Not enough objects for boolean operation.";
setError(aFeatureError);
return;
std::shared_ptr<GeomAPI_Shape> anObject = *anObjectsIt;
ListOfShape aListWithObject;
aListWithObject.push_back(anObject);
- GeomAlgoAPI_MakeShape aBoolAlgo;
+ GeomAlgoAPI_MakeShapeList aMakeShapeList;
+ std::shared_ptr<GeomAlgoAPI_MakeShape> aBoolAlgo;
GeomShapePtr aResShape;
switch(aType) {
case BOOL_CUT: {
- aBoolAlgo =
- GeomAlgoAPI_Boolean(aListWithObject, aTools, GeomAlgoAPI_Boolean::BOOL_CUT);
- aResShape = aBoolAlgo.shape();
+ aBoolAlgo.reset(new GeomAlgoAPI_Boolean(aListWithObject,
+ aTools,
+ GeomAlgoAPI_Boolean::BOOL_CUT));
+ aResShape = aBoolAlgo->shape();
break;
}
case BOOL_COMMON: {
- aBoolAlgo =
- GeomAlgoAPI_Boolean(aListWithObject, aTools, GeomAlgoAPI_Boolean::BOOL_COMMON);
- aResShape = aBoolAlgo.shape();
+ aBoolAlgo.reset(new GeomAlgoAPI_Boolean(aListWithObject,
+ aTools,
+ GeomAlgoAPI_Boolean::BOOL_COMMON));
+ aResShape = aBoolAlgo->shape();
break;
}
case BOOL_FILL: {
- aBoolAlgo = GeomAlgoAPI_Partition(aListWithObject, aTools);
- aResShape = aBoolAlgo.shape();
+ std::list<std::shared_ptr<GeomAPI_Pnt> > aBoundingPoints =
+ GeomAlgoAPI_ShapeTools::getBoundingBox(aListWithObject, 1.0);
+
+ // Resize planes.
+ ListOfShape aToolsWithPlanes = aTools;
+ for(ListOfShape::const_iterator anIt = aPlanes.cbegin();
+ anIt != aPlanes.cend();
+ ++anIt)
+ {
+ GeomShapePtr aPlane = *anIt;
+ GeomShapePtr aTool = GeomAlgoAPI_ShapeTools::fitPlaneToBox(aPlane, aBoundingPoints);
+ std::shared_ptr<GeomAlgoAPI_MakeShapeCustom> aMkShCustom(
+ new GeomAlgoAPI_MakeShapeCustom);
+ aMkShCustom->addModified(aPlane, aTool);
+ aMakeShapeList.appendAlgo(aMkShCustom);
+ aToolsWithPlanes.push_back(aTool);
+ }
+
+ aBoolAlgo.reset(new GeomAlgoAPI_Partition(aListWithObject, aToolsWithPlanes));
+ aResShape = aBoolAlgo->shape();
if(aResShape->shapeType() == GeomAPI_Shape::COMPOUND) {
int aSubResultsNb = 0;
GeomAPI_ShapeIterator anIt(aResShape);
}
// Checking that the algorithm worked properly.
- if(!aBoolAlgo.isDone()) {
+ if(!aBoolAlgo->isDone()) {
static const std::string aFeatureError = "Error: Boolean algorithm failed.";
setError(aFeatureError);
return;
setError(aShapeError);
return;
}
- if(!aBoolAlgo.isValid()) {
+ if(!aBoolAlgo->isValid()) {
std::string aFeatureError = "Error: Resulting shape is not valid.";
setError(aFeatureError);
return;
}
+ aMakeShapeList.appendAlgo(aBoolAlgo);
+
if(GeomAlgoAPI_ShapeTools::volume(aResShape) > 1.e-27) {
std::shared_ptr<ModelAPI_ResultBody> aResultBody =
document()->createBody(data(), aResultIndex);
- loadNamingDS(aResultBody, anObject, aTools, aResShape,
- aBoolAlgo, *aBoolAlgo.mapOfSubShapes().get());
+
+ ListOfShape aUsedTools = aTools;
+ if (aType == BOOL_FILL) {
+ aUsedTools.insert(aUsedTools.end(), aPlanes.begin(), aPlanes.end());
+ }
+
+ loadNamingDS(aResultBody, anObject, aUsedTools, aResShape,
+ aMakeShapeList, *(aBoolAlgo->mapOfSubShapes()), aType == BOOL_FILL);
setResult(aResultBody, aResultIndex);
aResultIndex++;
}
}
}
+ GeomAlgoAPI_MakeShapeList aMakeShapeList;
std::shared_ptr<GeomAlgoAPI_MakeShape> aBoolAlgo;
switch(aType) {
break;
}
case BOOL_FILL: {
- aBoolAlgo.reset(new GeomAlgoAPI_Partition(aUsedInOperationSolids, aTools));
+ std::list<std::shared_ptr<GeomAPI_Pnt> > aBoundingPoints =
+ GeomAlgoAPI_ShapeTools::getBoundingBox(aUsedInOperationSolids, 1.0);
+
+ // Resize planes.
+ ListOfShape aToolsWithPlanes = aTools;
+ for(ListOfShape::const_iterator anIt = aPlanes.cbegin();
+ anIt != aPlanes.cend();
+ ++anIt)
+ {
+ GeomShapePtr aPlane = *anIt;
+ GeomShapePtr aTool = GeomAlgoAPI_ShapeTools::fitPlaneToBox(aPlane, aBoundingPoints);
+ std::shared_ptr<GeomAlgoAPI_MakeShapeCustom> aMkShCustom(
+ new GeomAlgoAPI_MakeShapeCustom);
+ aMkShCustom->addModified(aPlane, aTool);
+ aMakeShapeList.appendAlgo(aMkShCustom);
+ aToolsWithPlanes.push_back(aTool);
+ }
+
+ aBoolAlgo.reset(new GeomAlgoAPI_Partition(aUsedInOperationSolids, aToolsWithPlanes));
break;
}
}
return;
}
- GeomAlgoAPI_MakeShapeList aMakeShapeList;
aMakeShapeList.appendAlgo(aBoolAlgo);
GeomAPI_DataMapOfShapeShape aMapOfShapes;
aMapOfShapes.merge(aBoolAlgo->mapOfSubShapes());
if(GeomAlgoAPI_ShapeTools::volume(aResultShape) > 1.e-27) {
std::shared_ptr<ModelAPI_ResultBody> aResultBody =
document()->createBody(data(), aResultIndex);
- loadNamingDS(aResultBody, aCompSolid, aTools, aResultShape, aMakeShapeList, aMapOfShapes);
+
+ ListOfShape aUsedTools = aTools;
+ if (aType == BOOL_FILL) {
+ aUsedTools.insert(aUsedTools.end(), aPlanes.begin(), aPlanes.end());
+ }
+
+ loadNamingDS(aResultBody,
+ aCompSolid,
+ aUsedTools,
+ aResultShape,
+ aMakeShapeList,
+ aMapOfShapes,
+ aType == BOOL_FILL);
setResult(aResultBody, aResultIndex);
aResultIndex++;
}
const ListOfShape& theTools,
const std::shared_ptr<GeomAPI_Shape> theResultShape,
GeomAlgoAPI_MakeShape& theMakeShape,
- GeomAPI_DataMapOfShapeShape& theMapOfShapes)
+ GeomAPI_DataMapOfShapeShape& theMapOfShapes,
+ const bool theIsStoreAsGenerated)
{
//load result
if(theBaseShape->isEqual(theResultShape)) {
const std::string aModFName = "Modified_Face";
theResultBody->loadAndOrientModifiedShapes(&theMakeShape, theBaseShape, GeomAPI_Shape::FACE,
- aModifyTag, aModName, theMapOfShapes, false, false, true);
+ aModifyTag, aModName, theMapOfShapes, false, theIsStoreAsGenerated, true);
theResultBody->loadDeletedShapes(&theMakeShape, theBaseShape,
GeomAPI_Shape::FACE, aDeletedTag);
}
theResultBody->loadAndOrientModifiedShapes(&theMakeShape, *anIter,
aName == aModEName ? GeomAPI_Shape::EDGE : GeomAPI_Shape::FACE,
- aTag, aName, theMapOfShapes, false, false, true);
+ aTag, aName, theMapOfShapes, false, theIsStoreAsGenerated, true);
theResultBody->loadDeletedShapes(&theMakeShape, *anIter, GeomAPI_Shape::FACE, aDeletedTag);
}
}
const ListOfShape& theTools,
const std::shared_ptr<GeomAPI_Shape> theResultShape,
GeomAlgoAPI_MakeShape& theMakeShape,
- GeomAPI_DataMapOfShapeShape& theMapOfShapes);
+ GeomAPI_DataMapOfShapeShape& theMapOfShapes,
+ const bool theIsStoreAsGenerated = false);
};
#endif
#include "FeaturesPlugin_RemoveSubShapes.h"
#include <ModelAPI_AttributeSelectionList.h>
+#include <ModelAPI_AttributeString.h>
#include <ModelAPI_ResultBody.h>
#include <ModelAPI_ResultCompSolid.h>
#include <ModelAPI_ResultConstruction.h>
//==================================================================================================
FeaturesPlugin_RemoveSubShapes::FeaturesPlugin_RemoveSubShapes()
+: myChangedInCode(false)
{
}
{
data()->addAttribute(BASE_SHAPE_ID(), ModelAPI_AttributeSelection::typeId());
- data()->addAttribute(SUBSHAPES_ID(), ModelAPI_AttributeSelectionList::typeId());
+ data()->addAttribute(CREATION_METHOD(), ModelAPI_AttributeString::typeId());
+
+ data()->addAttribute(SUBSHAPES_TO_KEEP_ID(), ModelAPI_AttributeSelectionList::typeId());
+
+ data()->addAttribute(SUBSHAPES_TO_REMOVE_ID(), ModelAPI_AttributeSelectionList::typeId());
}
void FeaturesPlugin_RemoveSubShapes::attributeChanged(const std::string& theID)
{
ModelAPI_Feature::attributeChanged(theID);
- if(theID == BASE_SHAPE_ID()) {
- AttributeSelectionPtr aShapeAttrSelection = selection(BASE_SHAPE_ID());
- AttributeSelectionListPtr aSubShapesAttrList = selectionList(SUBSHAPES_ID());
- if(!aShapeAttrSelection.get() || !aSubShapesAttrList.get()) {
- return;
- }
+ if (myChangedInCode) return;
- aSubShapesAttrList->clear();
+ AttributeSelectionPtr aShapeAttrSelection = selection(BASE_SHAPE_ID());
+ AttributeSelectionListPtr aSubShapesToKeepAttrList = selectionList(SUBSHAPES_TO_KEEP_ID());
+ AttributeSelectionListPtr aSubShapesToRemoveAttrList = selectionList(SUBSHAPES_TO_REMOVE_ID());
+ if (!aShapeAttrSelection.get()
+ || !aSubShapesToKeepAttrList.get()
+ || !aSubShapesToRemoveAttrList.get())
+ {
+ return;
+ }
- ResultPtr aContext = aShapeAttrSelection->context();
- ResultCompSolidPtr aResultCompSolid =
- std::dynamic_pointer_cast<ModelAPI_ResultCompSolid>(aContext);
- if(!aResultCompSolid.get()) {
- return;
- }
+ ResultPtr aContext = aShapeAttrSelection->context();
+ ResultCompSolidPtr aResultCompSolid =
+ std::dynamic_pointer_cast<ModelAPI_ResultCompSolid>(aContext);
+ if(!aResultCompSolid.get()) {
+ aSubShapesToKeepAttrList->clear();
+ aSubShapesToRemoveAttrList->clear();
+ return;
+ }
+ const int aNumOfSubs = aResultCompSolid->numberOfSubs();
- GeomShapePtr aBaseShape = aShapeAttrSelection->value();
- if(!aBaseShape.get()) {
- aBaseShape = aContext->shape();
- }
- if(!aBaseShape.get()) {
- return;
- }
- GeomAPI_Shape::ShapeType aShapeType = aBaseShape->shapeType();
- if(aShapeType != GeomAPI_Shape::WIRE
- && aShapeType != GeomAPI_Shape::SHELL
- && aShapeType != GeomAPI_Shape::COMPSOLID
- && aShapeType != GeomAPI_Shape::COMPOUND) {
+ GeomShapePtr aBaseShape = aShapeAttrSelection->value();
+ if(!aBaseShape.get()) {
+ aBaseShape = aContext->shape();
+ }
+
+ myChangedInCode = true;
+
+ if(theID == BASE_SHAPE_ID()) {
+ aSubShapesToKeepAttrList->clear();
+ aSubShapesToRemoveAttrList->clear();
+
+ if (!aBaseShape.get()) {
return;
}
+
for(GeomAPI_ShapeIterator anIt(aBaseShape); anIt.more(); anIt.next()) {
GeomShapePtr aSubShape = anIt.current();
- const int aNumOfSubs = aResultCompSolid->numberOfSubs();
if(aNumOfSubs == 0) {
- aSubShapesAttrList->append(aContext, aSubShape);
+ aSubShapesToKeepAttrList->append(aContext, aSubShape);
} else {
for(int anIndex = 0; anIndex < aResultCompSolid->numberOfSubs(); ++anIndex) {
ResultBodyPtr aSubResult = aResultCompSolid->subResult(anIndex);
if(aSubResult->shape()->isEqual(aSubShape)) {
- aSubShapesAttrList->append(aSubResult, aSubShape);
+ aSubShapesToKeepAttrList->append(aSubResult, aSubShape);
break;
}
}
}
}
}
+ else if (theID == SUBSHAPES_TO_KEEP_ID())
+ {
+ aSubShapesToRemoveAttrList->clear();
+
+ if (!aBaseShape.get()) {
+ return;
+ }
+
+ int anIndex;
+ const int aSubsToKeepNb = aSubShapesToKeepAttrList->size();
+ for(GeomAPI_ShapeIterator anIt(aBaseShape); anIt.more(); anIt.next()) {
+ GeomShapePtr aSubShape = anIt.current();
+ for(anIndex = 0; anIndex < aSubsToKeepNb; ++anIndex) {
+ AttributeSelectionPtr anAttrSelectionInList = aSubShapesToKeepAttrList->value(anIndex);
+ GeomShapePtr aSubShapeToKeep = anAttrSelectionInList->value();
+ if (aSubShapeToKeep.get() && aSubShapeToKeep->isEqual(aSubShape)) {
+ break;
+ }
+ }
+
+ if (anIndex == aSubsToKeepNb) {
+ if(aNumOfSubs == 0) {
+ aSubShapesToRemoveAttrList->append(aContext, aSubShape);
+ } else {
+ for(int anIndex = 0; anIndex < aResultCompSolid->numberOfSubs(); ++anIndex) {
+ ResultBodyPtr aSubResult = aResultCompSolid->subResult(anIndex);
+ if(aSubResult->shape()->isEqual(aSubShape)) {
+ aSubShapesToRemoveAttrList->append(aSubResult, aSubShape);
+ break;
+ }
+ }
+ }
+ }
+ }
+ }
+ else if (theID == SUBSHAPES_TO_REMOVE_ID())
+ {
+ aSubShapesToKeepAttrList->clear();
+
+ if (!aBaseShape.get()) {
+ return;
+ }
+
+ int anIndex;
+ const int aSubsToRemoveNb = aSubShapesToRemoveAttrList->size();
+ for(GeomAPI_ShapeIterator anIt(aBaseShape); anIt.more(); anIt.next()) {
+ GeomShapePtr aSubShape = anIt.current();
+ for(anIndex = 0; anIndex < aSubsToRemoveNb; ++anIndex) {
+ AttributeSelectionPtr anAttrSelectionInList = aSubShapesToRemoveAttrList->value(anIndex);
+ GeomShapePtr aSubShapeToRemove = anAttrSelectionInList->value();
+ if (aSubShapeToRemove.get() && aSubShapeToRemove->isEqual(aSubShape)) {
+ break;
+ }
+ }
+
+ if (anIndex == aSubsToRemoveNb) {
+ if(aNumOfSubs == 0) {
+ aSubShapesToKeepAttrList->append(aContext, aSubShape);
+ } else {
+ for(int anIndex = 0; anIndex < aResultCompSolid->numberOfSubs(); ++anIndex) {
+ ResultBodyPtr aSubResult = aResultCompSolid->subResult(anIndex);
+ if(aSubResult->shape()->isEqual(aSubShape)) {
+ aSubShapesToKeepAttrList->append(aSubResult, aSubShape);
+ break;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ myChangedInCode = false;
}
//==================================================================================================
{
// Get base shape and sub-shapes list.
AttributeSelectionPtr aShapeAttrSelection = selection(BASE_SHAPE_ID());
- AttributeSelectionListPtr aSubShapesAttrList = selectionList(SUBSHAPES_ID());
+ AttributeSelectionListPtr aSubShapesAttrList = selectionList(SUBSHAPES_TO_KEEP_ID());
if(!aShapeAttrSelection.get() || !aSubShapesAttrList.get()) {
return;
}
return MY_BASE_SHAPE_ID;
}
- /// Attribute name of sub-shapes.
- inline static const std::string& SUBSHAPES_ID()
+ /// Attribute name for creation method.
+ inline static const std::string& CREATION_METHOD()
{
- static const std::string MY_SUBSHAPES_ID("subshapes");
+ static const std::string MY_CREATION_METHOD_ID("creation_method");
+ return MY_CREATION_METHOD_ID;
+ }
+
+ /// Attribute name for creation method.
+ inline static const std::string& CREATION_METHOD_BY_KEEP_SUBSHAPES()
+ {
+ static const std::string MY_CREATION_METHOD_ID("by_keep_subshapes");
+ return MY_CREATION_METHOD_ID;
+ }
+
+ /// Attribute name for creation method.
+ inline static const std::string& CREATION_METHOD_BY_REMOVE_SUBSHAPES()
+ {
+ static const std::string MY_CREATION_METHOD_ID("by_remove_subshapes");
+ return MY_CREATION_METHOD_ID;
+ }
+
+ /// Attribute name of sub-shapes to keep.
+ inline static const std::string& SUBSHAPES_TO_KEEP_ID()
+ {
+ static const std::string MY_SUBSHAPES_ID("subshapes_to_keep");
return MY_SUBSHAPES_ID;
}
+ /// Attribute name of sub-shapes to remove.
+ inline static const std::string& SUBSHAPES_TO_REMOVE_ID()
+ {
+ static const std::string MY_SUBSHAPES_ID("subshapes_to_remove");
+ return MY_SUBSHAPES_ID;
+ }
+
+
/// \return the kind of a feature.
FEATURESPLUGIN_EXPORT virtual const std::string& getKind()
{
/// Creates a new part document if needed.
FEATURESPLUGIN_EXPORT virtual void execute();
+
+private:
+ bool myChangedInCode;
};
#endif
#include <GeomAlgoAPI_Boolean.h>
#include <GeomAlgoAPI_MakeShapeList.h>
#include <GeomAlgoAPI_PaveFiller.h>
+#include <GeomAlgoAPI_UnifySameDomain.h>
#include <GeomAPI_ShapeExplorer.h>
+#include <GeomAPI_ShapeIterator.h>
#include <ModelAPI_AttributeSelectionList.h>
#include <ModelAPI_ResultCompSolid.h>
anObjects.insert(anObjects.end(), aUsedInOperationSolids.begin(), aUsedInOperationSolids.end());
// Collect solids from compsolid which will not be modified in boolean operation.
- for(GeomAPI_ShapeExplorer anExp(aCompSolid, GeomAPI_Shape::SOLID); anExp.more(); anExp.next()) {
+ for(GeomAPI_ShapeIterator anExp(aCompSolid); anExp.more(); anExp.next()) {
std::shared_ptr<GeomAPI_Shape> aSolidInCompSolid = anExp.current();
ListOfShape::iterator anIt = aUsedInOperationSolids.begin();
for(; anIt != aUsedInOperationSolids.end(); anIt++) {
}
// Fuse objects.
+ std::shared_ptr<GeomAlgoAPI_MakeShape> anAlgo;
ListOfShape aTools;
- aTools.splice(aTools.begin(), anObjects, anObjects.begin());
- std::shared_ptr<GeomAlgoAPI_Boolean> aFuseAlgo(new GeomAlgoAPI_Boolean(anObjects,
- aTools,
- GeomAlgoAPI_Boolean::BOOL_FUSE));
+ if (anObjects.front()->shapeType() == GeomAPI_Shape::SOLID) {
+ aTools.splice(aTools.begin(), anObjects, anObjects.begin());
+ anAlgo.reset(new GeomAlgoAPI_Boolean(anObjects,
+ aTools,
+ GeomAlgoAPI_Boolean::BOOL_FUSE));
+ } else {
+ anAlgo.reset(new GeomAlgoAPI_UnifySameDomain(anObjects));
+ }
// Checking that the algorithm worked properly.
GeomAlgoAPI_MakeShapeList aMakeShapeList;
GeomAPI_DataMapOfShapeShape aMapOfShapes;
- if(!aFuseAlgo->isDone()) {
+ if(!anAlgo->isDone()) {
setError("Error: Boolean algorithm failed.");
return;
}
- if(aFuseAlgo->shape()->isNull()) {
+ if(anAlgo->shape()->isNull()) {
setError("Error: Resulting shape is Null.");
return;
}
- if(!aFuseAlgo->isValid()) {
+ if(!anAlgo->isValid()) {
setError("Error: Resulting shape is not valid.");
return;
}
- GeomShapePtr aShape = aFuseAlgo->shape();
- aMakeShapeList.appendAlgo(aFuseAlgo);
- aMapOfShapes.merge(aFuseAlgo->mapOfSubShapes());
+ GeomShapePtr aShape = anAlgo->shape();
+ aMakeShapeList.appendAlgo(anAlgo);
+ aMapOfShapes.merge(anAlgo->mapOfSubShapes());
// Store original shapes for naming.
anObjects.splice(anObjects.begin(), aTools);
}
// Store result and naming.
- const int aModifyTag = 1;
- const int aDeletedTag = 2;
- /// sub solids will be placed at labels 3, 4, etc. if result is compound of solids
- const int aSubsolidsTag = 3;
+ const int aModifyEdgeTag = 1;
+ const int aModifyFaceTag = 2;
+ const int aDeletedTag = 3;
+ /// sub solids will be placed at labels 4, 5 etc. if result is compound of solids
+ const int aSubsolidsTag = 4;
const std::string aModName = "Modified";
std::shared_ptr<ModelAPI_ResultBody> aResultBody = document()->createBody(data());
aResultBody->storeModified(anObjects.front(), aShape, aSubsolidsTag);
for(ListOfShape::const_iterator anIter = anObjects.begin(); anIter != anObjects.end(); ++anIter) {
+ aResultBody->loadAndOrientModifiedShapes(&aMakeShapeList, *anIter, GeomAPI_Shape::EDGE,
+ aModifyEdgeTag, aModName, aMapOfShapes);
aResultBody->loadAndOrientModifiedShapes(&aMakeShapeList, *anIter, GeomAPI_Shape::FACE,
- aModifyTag, aModName, aMapOfShapes);
+ aModifyFaceTag, aModName, aMapOfShapes);
aResultBody->loadDeletedShapes(&aMakeShapeList, *anIter, GeomAPI_Shape::FACE, aDeletedTag);
}
#include "FeaturesPlugin_Validators.h"
+#include "FeaturesPlugin_Boolean.h"
#include "FeaturesPlugin_Union.h"
#include <Events_InfoMessage.h>
ResultConstructionPtr aResultConstruction =
std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(aContext);
if(aResultConstruction.get()) {
- theError = "Error: Result construction not allowed for selection.";
- return false;
+ if (anOperationType != FeaturesPlugin_Boolean::BOOL_FILL
+ || theAttribute->id() != FeaturesPlugin_Boolean::TOOL_LIST_ID()) {
+ theError = "Error: Result construction not allowed for selection.";
+ return false;
+ }
}
std::shared_ptr<GeomAPI_Shape> aShape = anAttrSelection->value();
GeomShapePtr aContextShape = aContext->shape();
}
int aShapeType = aShape->shapeType();
- if(anOperationType == 1) {
+ if(anOperationType == FeaturesPlugin_Boolean::BOOL_FUSE) {
// Fuse operation. Allow to select edges, faces and solids.
if(aShapeType != GeomAPI_Shape::EDGE &&
aShapeType != GeomAPI_Shape::FACE &&
theError = "Error: Selected shape has the wrong type.";
return false;
}
+ } else if (anOperationType == FeaturesPlugin_Boolean::BOOL_FILL) {
+ if(aShapeType != GeomAPI_Shape::FACE &&
+ aShapeType != GeomAPI_Shape::SOLID &&
+ aShapeType != GeomAPI_Shape::COMPSOLID &&
+ aShapeType != GeomAPI_Shape::COMPOUND) {
+ theError = "Error: Selected shape has the wrong type.";
+ return false;
+ }
} else {
if(aShapeType != GeomAPI_Shape::SOLID &&
aShapeType != GeomAPI_Shape::COMPSOLID &&
Events_InfoMessage& theError) const
{
static const std::string aBaseShapeID = "base_shape";
- static const std::string aSubShapesID = "subshapes";
+ static const std::string aSubShapesID = "subshapes_to_keep";
if(theFeature->getKind() != "Remove_SubShapes") {
theError = "Error: Feature \"%1\" does not supported by this validator.";
}
GeomShapePtr aResultShape = aBaseShape->emptyCopied();
+ if (aSubShapesAttrList->size() == 0) {
+ theError = "Error: Resulting shape is not valid.";
+ return false;
+ }
+
// Copy sub-shapes from list to new shape.
for(int anIndex = 0; anIndex < aSubShapesAttrList->size(); ++anIndex) {
AttributeSelectionPtr anAttrSelectionInList = aSubShapesAttrList->value(anIndex);
for(int anIndex = 0; anIndex < aBaseObjectsAttrList->size(); ++anIndex) {
bool isSameFound = false;
AttributeSelectionPtr anAttrSelectionInList = aBaseObjectsAttrList->value(anIndex);
+ ResultPtr aContext = anAttrSelectionInList->context();
+
+ ResultConstructionPtr aConstruction =
+ std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(aContext);
+ if(aConstruction.get()) {
+ theError = "Error: Result construction not allowed for selection.";
+ return false;
+ }
+
+ GeomShapePtr aShape = anAttrSelectionInList->value();
+ GeomShapePtr aContextShape = aContext->shape();
+ if (aShape.get() && aContextShape.get() && !aContextShape->isEqual(aShape)) {
+ theError = "Error: Local selection not allowed.";
+ return false;
+ }
+
ResultCompSolidPtr aResult =
- std::dynamic_pointer_cast<ModelAPI_ResultCompSolid>(anAttrSelectionInList->context());
+ std::dynamic_pointer_cast<ModelAPI_ResultCompSolid>(aContext);
if(!aResult.get()) {
continue;
}
+
if(aResult->numberOfSubs() > 0) {
theError = "Error: Whole compsolids not allowed for selection.";
return false;
}
// Get all shapes.
+ GeomAPI_Shape::ShapeType aType = GeomAPI_Shape::COMPSOLID;
ListOfShape aBaseShapesList;
for(int anIndex = 0; anIndex < aBaseObejctsAttrList->size(); ++anIndex) {
AttributeSelectionPtr anAttrSelectionInList = aBaseObejctsAttrList->value(anIndex);
GeomShapePtr aShape = anAttrSelectionInList->value();
+ if (!aShape.get()) {
+ continue;
+ }
aBaseShapesList.push_back(aShape);
+ aType = aShape->shapeType() == GeomAPI_Shape::FACE ? GeomAPI_Shape::SHELL :
+ GeomAPI_Shape::COMPSOLID;
}
- // Make componud and find connected.
+ // Make compound and find connected.
GeomShapePtr aCompound = GeomAlgoAPI_CompoundBuilder::compound(aBaseShapesList);
ListOfShape aCombined, aFree;
- GeomAlgoAPI_ShapeTools::combineShapes(aCompound, GeomAPI_Shape::COMPSOLID, aCombined, aFree);
+ GeomAlgoAPI_ShapeTools::combineShapes(
+ aCompound,
+ aType,
+ aCombined,
+ aFree);
if(aFree.size() > 0 || aCombined.size() > 1) {
theError = "Error: Not all shapes have shared topology.";
<context>
<name>Union:GeomValidators_MinObjectsSelected</name>
<message>
- <source>Error: Attribute \"%1\" should contain at least %2 items.</source>
- <translation></translation>
+ <source>Error: Attribute "%1" should contain at least %2 items.</source>
+ <translation>"Base objects" should contain at least 2 items.</translation>
</message>
</context>
</TS>
SketchConstraintCoincidence_4 = Sketch_1.setCoincident(SketchLine_1.startPoint(), SketchLine_4.endPoint())
model.do()
Revolution_1 = model.addRevolution(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1f-SketchLine_2f-SketchLine_3f-SketchLine_4f")], model.selection("EDGE", "Sketch_1/Edge-SketchLine_4"), 360, 0)
-Group_1 = model.addGroup(Part_1_doc, [model.selection("EDGE", "Revolution_1_1/Lateral_Edge_4"), model.selection("EDGE", "Revolution_1_1/Base_Edge_2"), model.selection("EDGE", "Revolution_1_1/Lateral_Edge_2"), model.selection("EDGE", "Revolution_1_1/Base_Edge_1"), model.selection("EDGE", "Revolution_1_1/Base_Edge_3")])
+Group_1 = model.addGroup(Part_1_doc, [model.selection("EDGE", "Revolution_1_1/Lateral_Edge_3"), model.selection("EDGE", "Revolution_1_1/Base_Edge_2"), model.selection("EDGE", "Revolution_1_1/Lateral_Edge_2"), model.selection("EDGE", "Revolution_1_1/Base_Edge_1"), model.selection("EDGE", "Revolution_1_1/Base_Edge_3")])
model.end()
# check that resulting group selection is valid
SketchConstraintCoincidence_5.setName("SketchConstraintCoincidence_7")
model.do()
Revolution_1 = model.addRevolution(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1f-SketchLine_3f-SketchLine_4f-SketchLine_5r-SketchLine_6r")], model.selection("EDGE", "Sketch_1/Edge-SketchLine_4"), 360, 0)
-Group_1 = model.addGroup(Part_1_doc, [model.selection("EDGE", "Revolution_1_1/Generated_Face_5&Revolution_1_1/Generated_Face_1"), model.selection("EDGE", "Revolution_1_1/Generated_Face_2&Revolution_1_1/Generated_Face_1"), model.selection("EDGE", "Revolution_1_1/Generated_Face_3&Revolution_1_1/Generated_Face_2"), model.selection("EDGE", "Revolution_1_1/Base_Edge_2"), model.selection("EDGE", "Revolution_1_1/Base_Edge_1"), model.selection("EDGE", "Revolution_1_1/Generated_Face_1"), model.selection("EDGE", "Revolution_1_1/Generated_Face_2")])
+Group_1 = model.addGroup(Part_1_doc, [model.selection("EDGE", "Revolution_1_1/Generated_Face_5&Revolution_1_1/Generated_Face_4"), model.selection("EDGE", "Revolution_1_1/Generated_Face_4&Revolution_1_1/Generated_Face_3"), model.selection("EDGE", "Revolution_1_1/Generated_Face_3&Revolution_1_1/Generated_Face_2"), model.selection("EDGE", "Revolution_1_1/Base_Edge_2"), model.selection("EDGE", "Revolution_1_1/Base_Edge_1"), model.selection("EDGE", "Revolution_1_1/Generated_Face_4"), model.selection("EDGE", "Revolution_1_1/Generated_Face_3")])
model.end()
# check that resulting group selection is valid
Group_2.result().setColor(170, 85, 0)
Sketch_3 = model.addSketch(Part_1_doc, model.selection("FACE", "PartSet/XOY"))
SketchLine_11 = Sketch_3.addLine(40, 0, 30, 0)
-SketchPoint_1 = Sketch_3.addPoint(model.selection("VERTEX", "Partition_1_1_1/Modified_Edge_15_18&Partition_1_1_1/Modified_Edge_15_17"))
+SketchPoint_1 = Sketch_3.addPoint(model.selection("VERTEX", "Partition_1_1_1/Modified_Edge_15_15&Partition_1_1_1/Modified_Edge_15_16"))
SketchConstraintCoincidence_19 = Sketch_3.setCoincident(SketchLine_11.endPoint(), SketchPoint_1.result())
SketchLine_12 = Sketch_3.addLine(30, 0, 30, 10)
SketchLine_13 = Sketch_3.addLine(30, 10, 40, 10)
SketchCircle_1 = Sketch_1.addCircle(-13.45056286489504, 169.4770920976776, 150.6703210346195)
model.do()
Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("COMPOUND", "Sketch_1")], model.selection(), 10, 0)
-Group_1 = model.addGroup(Part_1_doc, [model.selection("EDGE", "Extrusion_1_1/Generated_Face_3&Extrusion_1_1/To_Face_2"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_4&Extrusion_1_1/From_Face_2"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_4&Extrusion_1_1/To_Face_2"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_3&Extrusion_1_1/From_Face_2"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_10&Extrusion_1_1/To_Face_3"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_10&Extrusion_1_1/From_Face_3"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_3&Extrusion_1_1/To_Face_3"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_3&Extrusion_1_1/From_Face_3"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_3&Extrusion_1_1/Generated_Face_10"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_9&Extrusion_1_1/Generated_Face_10"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_9&Extrusion_1_1/To_Face_3"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_9&Extrusion_1_1/From_Face_3"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_3&Extrusion_1_1/Generated_Face_9"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_2&Extrusion_1_1/Generated_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_2&Extrusion_1_1/To_Face_4"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_2&Extrusion_1_1/From_Face_4"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_5&Extrusion_1_1/From_Face_4"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_5&Extrusion_1_1/To_Face_4"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_2&Extrusion_1_1/Generated_Face_5"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_5&Extrusion_1_1/Generated_Face_6"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_6&Extrusion_1_1/From_Face_4"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_6&Extrusion_1_1/To_Face_4"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_1&Extrusion_1_1/To_Face_4"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_1&Extrusion_1_1/From_Face_4"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_6&Extrusion_1_1/Generated_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_5&Extrusion_1_1/To_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_5&Extrusion_1_1/From_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_11&Extrusion_1_1/Generated_Face_5"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_11&Extrusion_1_1/To_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_11&Extrusion_1_1/From_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_11&Extrusion_1_1/Generated_Face_10"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_6&Extrusion_1_1/Generated_Face_5"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_10&Extrusion_1_1/From_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_10&Extrusion_1_1/To_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_6&Extrusion_1_1/From_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_6&Extrusion_1_1/To_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_7&Extrusion_1_1/Generated_Face_6"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_7&Extrusion_1_1/To_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_7&Extrusion_1_1/From_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_10&Extrusion_1_1/Generated_Face_9"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_9&Extrusion_1_1/From_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_9&Extrusion_1_1/To_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_9&Extrusion_1_1/Generated_Face_8"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_8&Extrusion_1_1/To_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_8&Extrusion_1_1/From_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_8&Extrusion_1_1/Generated_Face_7")])
+Group_1 = model.addGroup(Part_1_doc, [model.selection("EDGE", "Extrusion_1_1/Generated_Face_3&Extrusion_1_1/To_Face_2"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_4&Extrusion_1_1/From_Face_2"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_4&Extrusion_1_1/To_Face_2"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_3&Extrusion_1_1/From_Face_2"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_10&Extrusion_1_1/To_Face_3"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_10&Extrusion_1_1/From_Face_3"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_3&Extrusion_1_1/To_Face_3"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_3&Extrusion_1_1/From_Face_3"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_3&Extrusion_1_1/Generated_Face_10"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_9&Extrusion_1_1/Generated_Face_10"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_9&Extrusion_1_1/To_Face_3"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_9&Extrusion_1_1/From_Face_3"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_3&Extrusion_1_1/Generated_Face_9"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_2&Extrusion_1_1/Generated_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_2&Extrusion_1_1/To_Face_4"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_2&Extrusion_1_1/From_Face_4"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_7&Extrusion_1_1/From_Face_4"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_7&Extrusion_1_1/To_Face_4"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_2&Extrusion_1_1/Generated_Face_7"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_7&Extrusion_1_1/Generated_Face_6"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_6&Extrusion_1_1/From_Face_4"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_6&Extrusion_1_1/To_Face_4"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_1&Extrusion_1_1/To_Face_4"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_1&Extrusion_1_1/From_Face_4"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_6&Extrusion_1_1/Generated_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_5&Extrusion_1_1/To_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_5&Extrusion_1_1/From_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_11&Extrusion_1_1/Generated_Face_5"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_11&Extrusion_1_1/To_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_11&Extrusion_1_1/From_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_11&Extrusion_1_1/Generated_Face_10"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_6&Extrusion_1_1/Generated_Face_5"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_10&Extrusion_1_1/From_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_10&Extrusion_1_1/To_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_6&Extrusion_1_1/From_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_6&Extrusion_1_1/To_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_7&Extrusion_1_1/Generated_Face_6"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_7&Extrusion_1_1/To_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_7&Extrusion_1_1/From_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_10&Extrusion_1_1/Generated_Face_9"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_9&Extrusion_1_1/From_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_9&Extrusion_1_1/To_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_9&Extrusion_1_1/Generated_Face_8"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_8&Extrusion_1_1/To_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_8&Extrusion_1_1/From_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_8&Extrusion_1_1/Generated_Face_7")])
model.end()
# check that resulting group selection is valid
--- /dev/null
+## Copyright (C) 2014-2017 CEA/DEN, EDF R&D
+##
+## This library is free software; you can redistribute it and/or
+## modify it under the terms of the GNU Lesser General Public
+## License as published by the Free Software Foundation; either
+## version 2.1 of the License, or (at your option) any later version.
+##
+## This library is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+## Lesser General Public License for more details.
+##
+## You should have received a copy of the GNU Lesser General Public
+## License along with this library; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##
+## See http:##www.salome-platform.org/ or
+## email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+##
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
+SketchLine_1 = Sketch_1.addLine(64.44596912521442, 49.72041166380789, -52.66552315608919, 49.72041166380789)
+SketchLine_2 = Sketch_1.addLine(-52.66552315608919, 49.72041166380789, -52.66552315608919, -67.3910806174957)
+SketchLine_3 = Sketch_1.addLine(-52.66552315608919, -67.3910806174957, 64.44596912521442, -67.3910806174957)
+SketchLine_4 = Sketch_1.addLine(64.44596912521442, -67.3910806174957, 64.44596912521442, 49.72041166380789)
+SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_4.endPoint(), SketchLine_1.startPoint())
+SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint())
+SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchLine_3.startPoint())
+SketchConstraintCoincidence_4 = Sketch_1.setCoincident(SketchLine_3.endPoint(), SketchLine_4.startPoint())
+SketchConstraintHorizontal_1 = Sketch_1.setHorizontal(SketchLine_1.result())
+SketchConstraintVertical_1 = Sketch_1.setVertical(SketchLine_2.result())
+SketchConstraintHorizontal_2 = Sketch_1.setHorizontal(SketchLine_3.result())
+SketchConstraintVertical_2 = Sketch_1.setVertical(SketchLine_4.result())
+SketchLine_5 = Sketch_1.addLine(34.99485420240136, 11.60720411663807, -11.7804459691252, 11.60720411663807)
+SketchLine_6 = Sketch_1.addLine(-11.7804459691252, 11.60720411663807, -11.7804459691252, -33.78216123499142)
+SketchLine_7 = Sketch_1.addLine(-11.7804459691252, -33.78216123499142, 34.99485420240136, -33.78216123499142)
+SketchLine_8 = Sketch_1.addLine(34.99485420240136, -33.78216123499142, 34.99485420240136, 11.60720411663807)
+SketchConstraintCoincidence_5 = Sketch_1.setCoincident(SketchLine_8.endPoint(), SketchLine_5.startPoint())
+SketchConstraintCoincidence_6 = Sketch_1.setCoincident(SketchLine_5.endPoint(), SketchLine_6.startPoint())
+SketchConstraintCoincidence_7 = Sketch_1.setCoincident(SketchLine_6.endPoint(), SketchLine_7.startPoint())
+SketchConstraintCoincidence_8 = Sketch_1.setCoincident(SketchLine_7.endPoint(), SketchLine_8.startPoint())
+SketchConstraintHorizontal_3 = Sketch_1.setHorizontal(SketchLine_5.result())
+SketchConstraintVertical_3 = Sketch_1.setVertical(SketchLine_6.result())
+SketchConstraintHorizontal_4 = Sketch_1.setHorizontal(SketchLine_7.result())
+SketchConstraintVertical_4 = Sketch_1.setVertical(SketchLine_8.result())
+model.do()
+Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_5f-SketchLine_6f-SketchLine_7f-SketchLine_8f")], model.selection(), 100, 100)
+Face_1 = model.addFace(Part_1_doc, [model.selection("EDGE", "Sketch_1/Edge-SketchLine_2"), model.selection("EDGE", "Sketch_1/Edge-SketchLine_1"), model.selection("EDGE", "Sketch_1/Edge-SketchLine_4"), model.selection("EDGE", "Sketch_1/Edge-SketchLine_3")])
+Partition_1 = model.addPartition(Part_1_doc, [model.selection("SOLID", "Extrusion_1_1"), model.selection("FACE", "Face_1_1")])
+model.do()
+model.end()
+
+from GeomAPI import GeomAPI_Shape
+
+model.testNbResults(Partition_1, 1)
+model.testNbSubResults(Partition_1, [2])
+model.testNbSubShapes(Partition_1, GeomAPI_Shape.SOLID, [2])
+model.testNbSubShapes(Partition_1, GeomAPI_Shape.FACE, [13])
+model.testNbSubShapes(Partition_1, GeomAPI_Shape.EDGE, [56])
+model.testNbSubShapes(Partition_1, GeomAPI_Shape.VERTEX, [112])
+model.testResultsVolumes(Partition_1, [424620.237783511402085423469543457])
+
+assert(model.checkPythonDump())
--- /dev/null
+## Copyright (C) 2014-2017 CEA/DEN, EDF R&D
+##
+## This library is free software; you can redistribute it and/or
+## modify it under the terms of the GNU Lesser General Public
+## License as published by the Free Software Foundation; either
+## version 2.1 of the License, or (at your option) any later version.
+##
+## This library is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+## Lesser General Public License for more details.
+##
+## You should have received a copy of the GNU Lesser General Public
+## License along with this library; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##
+## See http:##www.salome-platform.org/ or
+## email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+##
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
+SketchLine_1 = Sketch_1.addLine(50.45430931454487, 141.3050678403047, -211.8625790259634, 141.3050678403047)
+SketchLine_2 = Sketch_1.addLine(-211.8625790259634, 141.3050678403047, -211.8625790259634, -163.3288837233227)
+SketchLine_3 = Sketch_1.addLine(-211.8625790259634, -163.3288837233227, 50.45430931454487, -163.3288837233227)
+SketchLine_4 = Sketch_1.addLine(50.45430931454487, -163.3288837233227, 50.45430931454487, 141.3050678403047)
+SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_4.endPoint(), SketchLine_1.startPoint())
+SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint())
+SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchLine_3.startPoint())
+SketchConstraintCoincidence_4 = Sketch_1.setCoincident(SketchLine_3.endPoint(), SketchLine_4.startPoint())
+SketchConstraintHorizontal_1 = Sketch_1.setHorizontal(SketchLine_1.result())
+SketchConstraintVertical_1 = Sketch_1.setVertical(SketchLine_2.result())
+SketchConstraintHorizontal_2 = Sketch_1.setHorizontal(SketchLine_3.result())
+SketchConstraintVertical_2 = Sketch_1.setVertical(SketchLine_4.result())
+SketchLine_5 = Sketch_1.addLine(246.5736143115653, 48.78197815871301, -51.09047583637312, 48.78197815871301)
+SketchLine_6 = Sketch_1.addLine(-51.09047583637312, 48.78197815871301, -51.09047583637312, -104.8260668928192)
+SketchLine_7 = Sketch_1.addLine(-51.09047583637312, -104.8260668928192, 246.5736143115653, -104.8260668928192)
+SketchLine_8 = Sketch_1.addLine(246.5736143115653, -104.8260668928192, 246.5736143115653, 48.78197815871301)
+SketchConstraintCoincidence_5 = Sketch_1.setCoincident(SketchLine_8.endPoint(), SketchLine_5.startPoint())
+SketchConstraintCoincidence_6 = Sketch_1.setCoincident(SketchLine_5.endPoint(), SketchLine_6.startPoint())
+SketchConstraintCoincidence_7 = Sketch_1.setCoincident(SketchLine_6.endPoint(), SketchLine_7.startPoint())
+SketchConstraintCoincidence_8 = Sketch_1.setCoincident(SketchLine_7.endPoint(), SketchLine_8.startPoint())
+SketchConstraintHorizontal_3 = Sketch_1.setHorizontal(SketchLine_5.result())
+SketchConstraintVertical_3 = Sketch_1.setVertical(SketchLine_6.result())
+SketchConstraintHorizontal_4 = Sketch_1.setHorizontal(SketchLine_7.result())
+SketchConstraintVertical_4 = Sketch_1.setVertical(SketchLine_8.result())
+model.do()
+Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("COMPOUND", "Sketch_1")], model.selection(), 100, 0)
+Boolean_1 = model.addFill(Part_1_doc, [model.selection("SOLID", "Extrusion_1_1_2")], [model.selection("FACE", "PartSet/YOZ")])
+Group_1 = model.addGroup(Part_1_doc, [model.selection("FACE", "Boolean_1_1_4/Modified_3"), model.selection("FACE", "Boolean_1_1_4/Modified_Face_1"), model.selection("FACE", "_Extrusion_1_1/Generated_Face_9"), model.selection("FACE", "Boolean_1_1_4/Modified_2"), model.selection("FACE", "Boolean_1_1_4/Modified_4"), model.selection("FACE", "Boolean_1_1_4/Modified_1"), model.selection("FACE", "Boolean_1_1_4/Modified_3"), model.selection("FACE", "_Extrusion_1_1/Generated_Face_6"), model.selection("FACE", "Boolean_1_1_3/Modified_3"), model.selection("FACE", "_Extrusion_1_1/Generated_Face_7"), model.selection("FACE", "_Extrusion_1_1/Generated_Face_9"), model.selection("FACE", "Boolean_1_1_1/Modified_1"), model.selection("FACE", "_Extrusion_1_1/Generated_Face_5"), model.selection("FACE", "Boolean_1_1_4/Modified_4"), model.selection("FACE", "Boolean_1_1_1/Modified_2"), model.selection("FACE", "Boolean_1_1_3/Modified_4"), model.selection("FACE", "_Extrusion_1_1/Generated_Face_12"), model.selection("FACE", "_Extrusion_1_1/Generated_Face_11"), model.selection("FACE", "Boolean_1_1_3/Modified_3"), model.selection("FACE", "Boolean_1_1_3/Modified_2"), model.selection("FACE", "Boolean_1_1_3/Modified_1"), model.selection("FACE", "_Extrusion_1_1/Generated_Face_4"), model.selection("FACE", "Boolean_1_1_3/Modified_4"), model.selection("FACE", "Boolean_1_1_4/Modified_Face_1"), model.selection("FACE", "_Extrusion_1_1/Generated_Face_4"), model.selection("FACE", "_Extrusion_1_1/To_Face_3"), model.selection("FACE", "_Extrusion_1_1/Generated_Face_3"), model.selection("FACE", "_Extrusion_1_1/Generated_Face_2"), model.selection("FACE", "_Extrusion_1_1/From_Face_3"), model.selection("FACE", "_Extrusion_1_1/Generated_Face_1")])
+model.do()
+model.end()
+
+from GeomAPI import GeomAPI_Shape
+
+model.testNbResults(Boolean_1, 1)
+model.testNbSubResults(Boolean_1, [4])
+model.testNbSubShapes(Boolean_1, GeomAPI_Shape.SOLID, [4])
+model.testNbSubShapes(Boolean_1, GeomAPI_Shape.FACE, [30])
+model.testNbSubShapes(Boolean_1, GeomAPI_Shape.EDGE, [132])
+model.testNbSubShapes(Boolean_1, GeomAPI_Shape.VERTEX, [264])
+model.testResultsVolumes(Boolean_1, [11003613.329450136050581932067871094])
+
+assert(model.checkPythonDump())
anExtrusionFt.string("CreationMethod").setValue("ByPlanesAndOffsets")
anExtrusionFt.real("to_size").setValue(0) #TODO: remove
anExtrusionFt.real("from_size").setValue(0) #TODO: remove
-anExtrusionFt.selection("to_object").selectSubShape("face", "Extrusion_3_1/Generated_Face_2")
+anExtrusionFt.selection("to_object").selectSubShape("face", "Extrusion_3_1/Generated_Face_3")
anExtrusionFt.real("to_offset").setValue(0)
-anExtrusionFt.selection("from_object").selectSubShape("face", "Extrusion_3_1/Generated_Face_1")
+anExtrusionFt.selection("from_object").selectSubShape("face", "Extrusion_3_1/Generated_Face_4")
anExtrusionFt.real("from_offset").setValue(0)
anExtrusionFt.execute()
aSession.finishOperation()
aSession.startOperation()
aRemoveSubShapesFeature = aPart.addFeature("Remove_SubShapes")
aRemoveSubShapesFeature.selection("base_shape").setValue(anExtrusionResult, None)
-aRemoveSubShapesFeature.selectionList("subshapes").removeLast();
+aRemoveSubShapesFeature.string("creation_method").setValue("by_keep_subshapes")
+aRemoveSubShapesFeature.selectionList("subshapes_to_keep").removeLast();
aSession.finishOperation()
assert (len(aRemoveSubShapesFeature.results()) > 0)
anUnionResult = modelAPI_ResultCompSolid(modelAPI_ResultBody(aRemoveSubShapesFeature.firstResult()))
--- /dev/null
+## Copyright (C) 2014-2017 CEA/DEN, EDF R&D
+##
+## This library is free software; you can redistribute it and/or
+## modify it under the terms of the GNU Lesser General Public
+## License as published by the Free Software Foundation; either
+## version 2.1 of the License, or (at your option) any later version.
+##
+## This library is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+## Lesser General Public License for more details.
+##
+## You should have received a copy of the GNU Lesser General Public
+## License along with this library; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##
+## See http:##www.salome-platform.org/ or
+## email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+##
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
+SketchCircle_1 = Sketch_1.addCircle(-38.80617495711836, 0.1732418524871273, 42.63017006028262)
+SketchCircle_2 = Sketch_1.addCircle(-117.8044596912521, -0.1732418524871385, 54.50817511994374)
+model.do()
+Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("COMPOUND", "Sketch_1")], model.selection(), 10, 0)
+Remove_SubShapes_1 = model.addRemoveSubShapes(Part_1_doc, model.selection("COMPSOLID", "Extrusion_1_1"))
+Remove_SubShapes_1.setSubShapesToRemove([model.selection("SOLID", "Extrusion_1_1_3")])
+model.do()
+model.end()
+
+from GeomAPI import GeomAPI_Shape
+
+model.testNbResults(Remove_SubShapes_1, 1)
+model.testNbSubResults(Remove_SubShapes_1, [2])
+model.testNbSubShapes(Remove_SubShapes_1, GeomAPI_Shape.SOLID, [2])
+model.testNbSubShapes(Remove_SubShapes_1, GeomAPI_Shape.FACE, [10])
+model.testNbSubShapes(Remove_SubShapes_1, GeomAPI_Shape.EDGE, [36])
+model.testNbSubShapes(Remove_SubShapes_1, GeomAPI_Shape.VERTEX, [72])
+model.testResultsVolumes(Remove_SubShapes_1, [136619.795923917088657617568969727])
+
+assert(model.checkPythonDump())
--- /dev/null
+## Copyright (C) 2014-2017 CEA/DEN, EDF R&D
+##
+## This library is free software; you can redistribute it and/or
+## modify it under the terms of the GNU Lesser General Public
+## License as published by the Free Software Foundation; either
+## version 2.1 of the License, or (at your option) any later version.
+##
+## This library is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+## Lesser General Public License for more details.
+##
+## You should have received a copy of the GNU Lesser General Public
+## License along with this library; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##
+## See http:##www.salome-platform.org/ or
+## email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+##
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
+SketchCircle_1 = Sketch_1.addCircle(-5.197255574614073, 0.1732418524871273, 67.586529314451)
+model.do()
+Face_1 = model.addFace(Part_1_doc, [model.selection("EDGE", "Sketch_1/Edge-SketchCircle_1_2")])
+Partition_1 = model.addPartition(Part_1_doc, [model.selection("FACE", "Face_1_1"), model.selection("FACE", "PartSet/YOZ"), model.selection("FACE", "PartSet/XOZ")])
+Union_1 = model.addUnion(Part_1_doc, [model.selection("FACE", "Partition_1_1_3"), model.selection("FACE", "Partition_1_1_4")])
+model.do()
+model.end()
+
+from GeomAPI import GeomAPI_Shape
+
+model.testNbResults(Union_1, 1)
+model.testNbSubResults(Union_1, [3])
+model.testNbSubShapes(Union_1, GeomAPI_Shape.SOLID, [0])
+model.testNbSubShapes(Union_1, GeomAPI_Shape.FACE, [3])
+model.testNbSubShapes(Union_1, GeomAPI_Shape.EDGE, [10])
+model.testNbSubShapes(Union_1, GeomAPI_Shape.VERTEX, [20])
+
+assert(model.checkPythonDump())
<validator id="GeomValidators_ShapeType" parameters="wire,shell,compsolid,compound"/>
<validator id="GeomValidators_BodyShapes" parameters="toplevel"/>
</shape_selector>
- <multi_selector id="subshapes"
- label="Sub-Shapes to keep:"
- tooltip="Select shapes to keep."
- type_choice="vertices edges wires faces shells solids compsolids compounds"
- clear_in_neutral_point="false">
- <validator id="FeaturesPlugin_ValidatorRemoveSubShapesSelection"/>
- </multi_selector>
+ <toolbox id="creation_method">
+ <box id="by_remove_subshapes"
+ title="By removing sub-shapes"
+ icon="icons/Features/remove_subshapes_32x32.png">
+ <multi_selector id="subshapes_to_remove"
+ label="Sub-Shapes to remove:"
+ tooltip="Select shapes to remove."
+ type_choice="vertices edges wires faces shells solids compsolids compounds"
+ clear_in_neutral_point="false">
+ <validator id="FeaturesPlugin_ValidatorRemoveSubShapesSelection"/>
+ </multi_selector>
+ </box>
+ <box id="by_keep_subshapes"
+ title="By keeping sub-shapes"
+ icon="icons/Features/keep_subshapes_32x32.png">
+ <multi_selector id="subshapes_to_keep"
+ label="Sub-Shapes to keep:"
+ tooltip="Select shapes to keep."
+ type_choice="vertices edges wires faces shells solids compsolids compounds"
+ clear_in_neutral_point="false">
+ <validator id="FeaturesPlugin_ValidatorRemoveSubShapesSelection"/>
+ </multi_selector>
+ </box>
+ </toolbox>
<validator id="FeaturesPlugin_ValidatorRemoveSubShapesResult"/>
</source>
<multi_selector id="base_objects"
label="Base objects:"
tooltip="Select solids for union."
- type_choice="solids compsolids"
+ type_choice="faces solids compsolids"
use_choice="false"
concealment="true">
<validator id="FeaturesPlugin_ValidatorUnionSelection"/>
SET(PROJECT_HEADERS
GDMLAPI.h
GDMLAPI_ConeSegment.h
+ GDMLAPI_Ellipsoid.h
)
SET(PROJECT_SOURCES
GDMLAPI_ConeSegment.cpp
+ GDMLAPI_Ellipsoid.cpp
)
SET(PROJECT_LIBRARIES
// shared pointers
%shared_ptr(GDMLAPI_ConeSegment)
+%shared_ptr(GDMLAPI_Ellipsoid)
// all supported interfaces
%include "GDMLAPI_ConeSegment.h"
-
+%include "GDMLAPI_Ellipsoid.h"
--- /dev/null
+// Copyright (C) 2014-2017 CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or
+// email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+//
+
+#include "GDMLAPI_Ellipsoid.h"
+
+#include <ModelHighAPI_Dumper.h>
+#include <ModelHighAPI_Tools.h>
+
+GDMLAPI_Ellipsoid::GDMLAPI_Ellipsoid(const std::shared_ptr<ModelAPI_Feature>& theFeature)
+ : ModelHighAPI_Interface(theFeature)
+{
+ initialize();
+}
+
+GDMLAPI_Ellipsoid::GDMLAPI_Ellipsoid(const std::shared_ptr<ModelAPI_Feature>& theFeature,
+ const ModelHighAPI_Double& theAX,
+ const ModelHighAPI_Double& theBY,
+ const ModelHighAPI_Double& theCZ)
+ : ModelHighAPI_Interface(theFeature)
+{
+ if (initialize()) {
+ setSizes(theAX, theBY, theCZ);
+ fillAttribute("", useZCut1());
+ fillAttribute("", useZCut1());
+ }
+}
+
+GDMLAPI_Ellipsoid::GDMLAPI_Ellipsoid(const std::shared_ptr<ModelAPI_Feature>& theFeature,
+ const ModelHighAPI_Double& theAX,
+ const ModelHighAPI_Double& theBY,
+ const ModelHighAPI_Double& theCZ,
+ const ModelHighAPI_Double& theZCut1,
+ const ModelHighAPI_Double& theZCut2)
+ : ModelHighAPI_Interface(theFeature)
+{
+ if (initialize()) {
+ setSizes(theAX, theBY, theCZ);
+ setZCut1(theZCut1);
+ setZCut2(theZCut2);
+ }
+}
+
+GDMLAPI_Ellipsoid::~GDMLAPI_Ellipsoid()
+{
+}
+
+void GDMLAPI_Ellipsoid::setSizes(const ModelHighAPI_Double& theAX,
+ const ModelHighAPI_Double& theBY,
+ const ModelHighAPI_Double& theCZ)
+{
+ fillAttribute(theAX, ax());
+ fillAttribute(theBY, by());
+ fillAttribute(theCZ, cz());
+
+ execute();
+}
+
+void GDMLAPI_Ellipsoid::setZCut1(const ModelHighAPI_Double& theZCut1)
+{
+ fillAttribute("true", useZCut1());
+ fillAttribute(theZCut1, zCut1());
+
+ execute();
+}
+
+void GDMLAPI_Ellipsoid::setZCut2(const ModelHighAPI_Double& theZCut2)
+{
+ fillAttribute("true", useZCut2());
+ fillAttribute(theZCut2, zCut2());
+
+ execute();
+}
+
+
+//==================================================================================================
+void GDMLAPI_Ellipsoid::dump(ModelHighAPI_Dumper& theDumper) const
+{
+ FeaturePtr aBase = feature();
+ const std::string& aDocName = theDumper.name(aBase->document());
+
+ AttributeDoublePtr anAttrAX = aBase->real(GDMLPlugin_Ellipsoid::AX_ID());
+ AttributeDoublePtr anAttrBY = aBase->real(GDMLPlugin_Ellipsoid::BY_ID());
+ AttributeDoublePtr anAttrCZ = aBase->real(GDMLPlugin_Ellipsoid::CZ_ID());
+
+ theDumper << aBase << " = model.addEllipsoid(" << aDocName << ", "
+ << anAttrAX << ", " << anAttrBY << ", " << anAttrCZ;
+
+ AttributeStringPtr anAttrUseZCut1 = aBase->string(GDMLPlugin_Ellipsoid::USE_ZCUT1_ID());
+ AttributeDoublePtr anAttrZCut1 = aBase->real(GDMLPlugin_Ellipsoid::ZCUT1_ID());
+ AttributeStringPtr anAttrUseZCut2 = aBase->string(GDMLPlugin_Ellipsoid::USE_ZCUT2_ID());
+ AttributeDoublePtr anAttrZCut2 = aBase->real(GDMLPlugin_Ellipsoid::ZCUT2_ID());
+
+ bool isZCut1 = !anAttrUseZCut1->value().empty();
+ bool isZCut2 = !anAttrUseZCut2->value().empty();
+ if (isZCut1 && isZCut2)
+ theDumper << ", " << anAttrZCut1 << ", " << anAttrZCut2 << ")" << std::endl;
+ else {
+ theDumper << ")" << std::endl;
+
+ if (isZCut1 && !isZCut2)
+ theDumper << theDumper.name(aBase) << ".setZCut1(" << anAttrZCut1 << ")" << std::endl;
+ else if (!isZCut1 && isZCut2)
+ theDumper << theDumper.name(aBase) << ".setZCut2(" << anAttrZCut2 << ")" << std::endl;
+ }
+}
+
+
+//==================================================================================================
+EllipsoidPtr addEllipsoid(const std::shared_ptr<ModelAPI_Document>& thePart,
+ const ModelHighAPI_Double& theAX,
+ const ModelHighAPI_Double& theBY,
+ const ModelHighAPI_Double& theCZ)
+{
+ std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(GDMLAPI_Ellipsoid::ID());
+ return EllipsoidPtr(new GDMLAPI_Ellipsoid(aFeature, theAX, theBY, theCZ));
+}
+
+EllipsoidPtr addEllipsoid(const std::shared_ptr<ModelAPI_Document>& thePart,
+ const ModelHighAPI_Double& theAX,
+ const ModelHighAPI_Double& theBY,
+ const ModelHighAPI_Double& theCZ,
+ const ModelHighAPI_Double& theZCut1,
+ const ModelHighAPI_Double& theZCut2)
+{
+ std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(GDMLAPI_Ellipsoid::ID());
+ return EllipsoidPtr(new GDMLAPI_Ellipsoid(aFeature, theAX, theBY, theCZ, theZCut1, theZCut2));
+}
--- /dev/null
+// Copyright (C) 2014-2017 CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or
+// email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+//
+
+#ifndef GDMLAPI_Ellipsoid_H_
+#define GDMLAPI_Ellipsoid_H_
+
+#include "GDMLAPI.h"
+
+#include <GDMLPlugin_Ellipsoid.h>
+
+#include <ModelHighAPI_Interface.h>
+#include <ModelHighAPI_Macro.h>
+
+class ModelHighAPI_Double;
+
+/// \class GDMLAPI_Ellipsoid
+/// \ingroup CPPHighAPI
+/// \brief Interface for primitive Ellipsoid feature.
+class GDMLAPI_Ellipsoid: public ModelHighAPI_Interface
+{
+public:
+ /// Constructor without values.
+ GDMLAPI_EXPORT
+ explicit GDMLAPI_Ellipsoid(const std::shared_ptr<ModelAPI_Feature>& theFeature);
+
+ /// Constructor with values.
+ GDMLAPI_EXPORT
+ explicit GDMLAPI_Ellipsoid(const std::shared_ptr<ModelAPI_Feature>& theFeature,
+ const ModelHighAPI_Double& theAX,
+ const ModelHighAPI_Double& theBY,
+ const ModelHighAPI_Double& theCZ);
+
+ /// Constructor with values.
+ GDMLAPI_EXPORT
+ explicit GDMLAPI_Ellipsoid(const std::shared_ptr<ModelAPI_Feature>& theFeature,
+ const ModelHighAPI_Double& theAX,
+ const ModelHighAPI_Double& theBY,
+ const ModelHighAPI_Double& theCZ,
+ const ModelHighAPI_Double& theZCut1,
+ const ModelHighAPI_Double& theZCut2);
+
+ /// Destructor.
+ GDMLAPI_EXPORT
+ virtual ~GDMLAPI_Ellipsoid();
+
+ INTERFACE_7(GDMLPlugin_Ellipsoid::ID(),
+ ax, GDMLPlugin_Ellipsoid::AX_ID(),
+ ModelAPI_AttributeDouble,
+ /** Ellipsoid size along X axis */,
+ by, GDMLPlugin_Ellipsoid::BY_ID(),
+ ModelAPI_AttributeDouble,
+ /** Ellipsoid size along Y axis */,
+ cz, GDMLPlugin_Ellipsoid::CZ_ID(),
+ ModelAPI_AttributeDouble,
+ /** Ellipsoid size along Z axis */,
+ useZCut1, GDMLPlugin_Ellipsoid::USE_ZCUT1_ID(),
+ ModelAPI_AttributeString,
+ /** First cut of the ellipsoid along Z axis */,
+ zCut1, GDMLPlugin_Ellipsoid::ZCUT1_ID(),
+ ModelAPI_AttributeDouble,
+ /** Position of the first cut */,
+ useZCut2, GDMLPlugin_Ellipsoid::USE_ZCUT2_ID(),
+ ModelAPI_AttributeString,
+ /** Second cut of the ellipsoid along Z axis */,
+ zCut2, GDMLPlugin_Ellipsoid::ZCUT2_ID(),
+ ModelAPI_AttributeDouble,
+ /** Position of the second cut */)
+
+ /// Set dimensions
+ GDMLAPI_EXPORT
+ void setSizes(const ModelHighAPI_Double& theAX,
+ const ModelHighAPI_Double& theBY,
+ const ModelHighAPI_Double& theCZ);
+
+ /// Set Z cut no.1
+ GDMLAPI_EXPORT
+ void setZCut1(const ModelHighAPI_Double& theZCut1);
+
+ /// Set Z cut no.2
+ GDMLAPI_EXPORT
+ void setZCut2(const ModelHighAPI_Double& theZCut2);
+
+ /// Dump wrapped feature
+ GDMLAPI_EXPORT
+ virtual void dump(ModelHighAPI_Dumper& theDumper) const;
+};
+
+/// Pointer on primitive Ellipsoid object
+typedef std::shared_ptr<GDMLAPI_Ellipsoid> EllipsoidPtr;
+
+/// \ingroup CPPHighAPI
+/// \brief Create GDML Ellipsoid feature.
+GDMLAPI_EXPORT
+EllipsoidPtr addEllipsoid(const std::shared_ptr<ModelAPI_Document>& thePart,
+ const ModelHighAPI_Double& theAX,
+ const ModelHighAPI_Double& theBY,
+ const ModelHighAPI_Double& theCZ);
+
+/// \ingroup CPPHighAPI
+/// \brief Create GDML Ellipsoid feature.
+GDMLAPI_EXPORT
+EllipsoidPtr addEllipsoid(const std::shared_ptr<ModelAPI_Document>& thePart,
+ const ModelHighAPI_Double& theAX,
+ const ModelHighAPI_Double& theBY,
+ const ModelHighAPI_Double& theCZ,
+ const ModelHighAPI_Double& theZCut1,
+ const ModelHighAPI_Double& theZCut2);
+#endif // GDMLAPI_Ellipsoid_H_
#include "GDMLAPI.h"
#include "GDMLAPI_ConeSegment.h"
+ #include "GDMLAPI_Ellipsoid.h"
#endif // GDMLAPI_swig_H_
GeomAlgoAPI_Symmetry.h
GeomAlgoAPI_Scale.h
GeomAlgoAPI_Circ2dBuilder.h
+ GeomAlgoAPI_UnifySameDomain.h
)
SET(PROJECT_SOURCES
GeomAlgoAPI_Symmetry.cpp
GeomAlgoAPI_Scale.cpp
GeomAlgoAPI_Circ2dBuilder.cpp
+ GeomAlgoAPI_UnifySameDomain.cpp
)
SET(PROJECT_LIBRARIES
#include <GEOMAlgo_Splitter.hxx>
+#include <NCollection_Vector.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS_Builder.hxx>
#include <TopTools_MapOfShape.hxx>
+//=================================================================================================
+bool isSubShape(const TopoDS_Shape& theShape, const TopoDS_Shape& theSubShape)
+{
+ for(TopExp_Explorer anExp(theShape, theSubShape.ShapeType()); anExp.More(); anExp.Next()) {
+ if(theSubShape.IsSame(anExp.Current())) {
+ return true;
+ }
+ }
+
+ return false;
+}
+
//=================================================================================================
std::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_Partition::make(const ListOfShape& theObjects,
const ListOfShape& theTools)
TopTools_MapOfShape ShapesMap;
// Getting objects.
- for(ListOfShape::const_iterator
- anObjectsIt = theObjects.begin(); anObjectsIt != theObjects.end(); anObjectsIt++) {
+ for(ListOfShape::const_iterator anObjectsIt = theObjects.begin();
+ anObjectsIt != theObjects.end();
+ anObjectsIt++)
+ {
const TopoDS_Shape& aShape = (*anObjectsIt)->impl<TopoDS_Shape>();
// #2240: decompose compounds to get the valid result
TopTools_ListOfShape aSimpleShapes;
#endif
TopoDS_Shape aResult = anOperation->Shape();
+ if(aResult.ShapeType() == TopAbs_COMPOUND) {
+ // Exclude faces and edges which are shared as another sub-shape.
+ NCollection_Vector<TopoDS_Shape> aFacesAndEdges;
+ TopoDS_Compound aTempCompound;
+ TopoDS_Builder aBuilder;
+ aBuilder.MakeCompound(aTempCompound);
+ for(TopoDS_Iterator anIt(aResult);
+ anIt.More();
+ anIt.Next()) {
+ const TopoDS_Shape& aSubShape = anIt.Value();
+ if (aSubShape.ShapeType() == TopAbs_FACE || aSubShape.ShapeType() == TopAbs_EDGE) {
+ aFacesAndEdges.Append(aSubShape);
+ } else {
+ aBuilder.Add(aTempCompound, aSubShape);
+ }
+ }
+
+ for (NCollection_Vector<TopoDS_Shape>::Iterator anIt(aFacesAndEdges);
+ anIt.More();
+ anIt.Next())
+ {
+ const TopoDS_Shape& aSubShape = anIt.Value();
+ if (!isSubShape(aTempCompound, aSubShape))
+ {
+ aBuilder.Add(aTempCompound, aSubShape);
+ }
+ }
+
+ aResult = aTempCompound;
+ }
+
if(aResult.ShapeType() == TopAbs_COMPOUND) {
std::shared_ptr<GeomAPI_Shape> aGeomShape(new GeomAPI_Shape);
aGeomShape->setImpl(new TopoDS_Shape(aResult));
#include <BOPAlgo_Builder.hxx>
#include <BRep_Builder.hxx>
+#include <BRepTools_WireExplorer.hxx>
#include <BRepTopAdaptor_FClass2d.hxx>
#include <Geom_Plane.hxx>
#include <Geom_TrimmedCurve.hxx>
return aStart;
}
-static TopoDS_Vertex findStartVertex(const TopoDS_Shape& theShape,
+static TopoDS_Vertex findStartVertex(const TopoDS_Wire& theWire, const TopoDS_Face& theFace,
const std::list<std::shared_ptr<GeomAPI_Shape> >& theInitialShapes)
{
// Try to find edge lying on the one of original edges.
if (aCurve->DynamicType() == STANDARD_TYPE(Geom_TrimmedCurve))
aCurve = Handle(Geom_TrimmedCurve)::DownCast(aCurve)->BasisCurve();
- TopExp_Explorer anExp(theShape, TopAbs_EDGE);
+ BRepTools_WireExplorer anExp(theWire, theFace);
for (; anExp.More(); anExp.Next()) {
- const TopoDS_Edge& aShapeEdge = TopoDS::Edge(anExp.Current());
+ const TopoDS_Edge& aShapeEdge = anExp.Current();
double aF, aL;
Handle(Geom_Curve) aShapeCurve = BRep_Tool::Curve(aShapeEdge, aF, aL);
if (aShapeCurve->DynamicType() == STANDARD_TYPE(Geom_TrimmedCurve))
}
// start vertex is not found, use algorithm to search vertex with the greatest coordinates
- return findStartVertex(theShape);
+ return findStartVertex(theWire);
}
// returns true if the first shape must be located earlier than the second
// to make faces equal on different platforms, we will find
// a vertex lying on an edge with the lowest index in the list of initial edges
- TopoDS_Vertex aStartVertex = findStartVertex(aWire, theFeatures);
+ TopoDS_Vertex aStartVertex = findStartVertex(aWire, aFace, theFeatures);
TopoDS_Wire aNewWire;
aBuilder.MakeWire(aNewWire);
bool aStartFound = false;
// remove internal edges from faces and make wire start from found vertex
- TopExp_Explorer anExp(aWire, TopAbs_EDGE);
+ BRepTools_WireExplorer anExp(aWire, aFace);
for (; anExp.More(); anExp.Next()) {
if (anExp.Current().Orientation() == TopAbs_INTERNAL)
continue;
if (!aStartFound) {
- const TopoDS_Edge& anEdge = TopoDS::Edge(anExp.Current());
+ const TopoDS_Edge& anEdge = anExp.Current();
TopoDS_Vertex aV1, aV2;
TopExp::Vertices(anEdge, aV1, aV2, Standard_True);
if (aV1.IsSame(aStartVertex) == Standard_True)
aBuilder.Add(aNewWire, *aSkIt);
// check the wire is empty
- anExp.Init(aNewWire, TopAbs_EDGE);
+ anExp.Init(aNewWire);
if (anExp.More())
aBuilder.Add(aNewFace, aNewWire);
}
--- /dev/null
+// Copyright (C) 2014-2017 CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or
+// email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+//
+
+#include "GeomAlgoAPI_UnifySameDomain.h"
+
+#include <GeomAlgoAPI_CompoundBuilder.h>
+#include <GeomAlgoAPI_ShapeTools.h>
+
+#include <ShapeUpgrade_UnifySameDomain.hxx>
+#include <TopExp_Explorer.hxx>
+#include <TopoDS_Shape.hxx>
+
+//==================================================================================================
+GeomAlgoAPI_UnifySameDomain::GeomAlgoAPI_UnifySameDomain(const ListOfShape& theShapes)
+{
+ build(theShapes);
+}
+
+void GeomAlgoAPI_UnifySameDomain::build(const ListOfShape& theShapes)
+{
+ if(theShapes.empty()) {
+ return;
+ }
+
+ // Make compound.
+ GeomShapePtr aCompound = GeomAlgoAPI_CompoundBuilder::compound(theShapes);
+ ListOfShape aCombined, aFree;
+ GeomAlgoAPI_ShapeTools::combineShapes(
+ aCompound,
+ GeomAPI_Shape::SHELL,
+ aCombined,
+ aFree);
+
+ if(aFree.size() > 0 || aCombined.size() > 1) {
+ return;
+ }
+
+ const TopoDS_Shape& aShell = aCombined.front()->impl<TopoDS_Shape>();
+
+ ShapeUpgrade_UnifySameDomain* aUnifyAlgo = new ShapeUpgrade_UnifySameDomain();
+ this->setImpl(aUnifyAlgo);
+
+ aUnifyAlgo->Initialize(aShell);
+ aUnifyAlgo->UnifyFacesAndEdges();
+ aUnifyAlgo->Build();
+
+ TopoDS_Shape aResult = aUnifyAlgo->Shape();
+ if (aResult.IsNull()) {
+ return;
+ }
+
+ if (aResult.ShapeType() == TopAbs_SHELL) {
+ int aNb = 0;
+ TopoDS_Iterator anIt(aResult);
+ for (; anIt.More(); anIt.Next()) {
+ ++aNb;
+ }
+
+ if (aNb == 1) {
+ anIt.Initialize(aResult);
+ aResult = anIt.Value();
+ }
+ }
+
+ std::shared_ptr<GeomAPI_Shape> aShape(new GeomAPI_Shape());
+ aShape->setImpl(new TopoDS_Shape(aResult));
+ this->setShape(aShape);
+ this->setDone(true);
+}
+
+//==================================================================================================
+void GeomAlgoAPI_UnifySameDomain::modified(const std::shared_ptr<GeomAPI_Shape> theShape,
+ ListOfShape& theHistory)
+{
+ if(!theShape.get()) {
+ return;
+ }
+
+ const TopoDS_Shape& aShape = theShape->impl<TopoDS_Shape>();
+ const ShapeUpgrade_UnifySameDomain& aUnifyAlgo = this->impl<ShapeUpgrade_UnifySameDomain>();
+
+ TopoDS_Shape aModifiedShape = aUnifyAlgo.Generated(aShape);
+
+ for(TopExp_Explorer anExp(aModifiedShape, aShape.ShapeType()); anExp.More(); anExp.Next()) {
+ GeomShapePtr aGeomShape(new GeomAPI_Shape());
+ aGeomShape->setImpl(new TopoDS_Shape(anExp.Current()));
+ theHistory.push_back(aGeomShape);
+ }
+}
--- /dev/null
+// Copyright (C) 2014-2017 CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or
+// email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+//
+
+#ifndef GeomAlgoAPI_UnifySameDomain_H_
+#define GeomAlgoAPI_UnifySameDomain_H_
+
+#include "GeomAlgoAPI.h"
+#include "GeomAlgoAPI_MakeShape.h"
+
+#include <GeomAPI_Shape.h>
+
+/// \class GeomAlgoAPI_UnifySameDomain
+/// \ingroup DataAlgo
+/// \brief This tool tries to unify faces and edges of the shape which lies on the same geometry.
+class GeomAlgoAPI_UnifySameDomain: public GeomAlgoAPI_MakeShape
+{
+public:
+ /// Constructor.
+ GEOMALGOAPI_EXPORT GeomAlgoAPI_UnifySameDomain(const ListOfShape& theShapes);
+
+ /// \return the list of shapes modified from the shape \a theShape.
+ /// \param[in] theShape base shape.
+ /// \param[out] theHistory modified shapes.
+ GEOMALGOAPI_EXPORT virtual void modified(const std::shared_ptr<GeomAPI_Shape> theShape,
+ ListOfShape& theHistory);
+
+private:
+ /// Builds resulting shape.
+ void build(const ListOfShape& theShapes);
+};
+
+#endif
if (myObjs)
myObjs->eraseAllFeatures();
}
+
+void Model_Document::setExecuteFeatures(const bool theFlag)
+{
+ myExecuteFeatures = theFlag;
+ const std::set<int> aSubs = subDocuments();
+ std::set<int>::iterator aSubIter = aSubs.begin();
+ for (; aSubIter != aSubs.end(); aSubIter++) {
+ if (!subDoc(*aSubIter)->myObjs)
+ continue;
+ subDoc(*aSubIter)->setExecuteFeatures(theFlag);
+ }
+}
///! Returns true if parametric updater need to execute feature on recomputartion
///! On abort, undo or redo it is not necessary: results in document are updated automatically
- bool& executeFeatures() {return myExecuteFeatures;}
+ bool executeFeatures() {return myExecuteFeatures;}
+
+ ///! On abort, undo or redo it is not necessary: results in document are updated automatically
+ void setExecuteFeatures(const bool theFlag);
//! Registers the name of the shape for the topological naming needs
void addNamingName(const TDF_Label theLabel, std::string theName);
myDoc = theDoc;
// update all fields and recreate features and result objects if needed
TDF_LabelList aNoUpdated;
- synchronizeFeatures(aNoUpdated, true, true, true, true);
+ synchronizeFeatures(aNoUpdated, true, false, true, true);
myHistory.clear();
}
myHistory.clear();
}
- if (theExecuteFeatures)
- anOwner->executeFeatures() = false;
+ if (!theExecuteFeatures)
+ anOwner->setExecuteFeatures(false);
aLoop->activateFlushes(isActive);
if (theFlush) {
aLoop->flush(aRedispEvent);
aLoop->flush(aToHideEvent);
}
- if (theExecuteFeatures)
- anOwner->executeFeatures() = true;
+ if (!theExecuteFeatures)
+ anOwner->setExecuteFeatures(true);
}
/// synchronises back references for the given object basing on the collected data
bool isNotExecuted = theFeature->isPersistentResult() &&
!std::dynamic_pointer_cast<Model_Document>((theFeature)->document())->executeFeatures();
if (isNotExecuted) {
+ redisplayWithResults(theFeature, ModelAPI_StateNothing, false); // redisplay even not executed
if (!theReason.get()) // no reason => no construction reason
return false;
if (myNotPersistentRefs.find(theFeature) == myNotPersistentRefs.end()) {
// update arguments for "apply button" state change
if ((!theFeature->isPreviewNeeded() && !myIsFinish) || myIsPreviewBlocked) {
- myProcessOnFinish.insert(theFeature);
+ if (theReason.get())
+ myProcessOnFinish[theFeature].insert(theReason);
+ else if (myProcessOnFinish.find(theFeature) == myProcessOnFinish.end())
+ myProcessOnFinish[theFeature] = std::set<std::shared_ptr<ModelAPI_Feature> >();
#ifdef DEB_UPDATE
std::cout<<"*** Add process on finish "<<theFeature->name()<<std::endl;
#endif
if (theMessage->eventID() == kOpFinishEvent) {
myIsFinish = true;
// add features that wait for finish as modified
- std::set<std::shared_ptr<ModelAPI_Feature> >::iterator aFeature = myProcessOnFinish.begin();
- for(; aFeature != myProcessOnFinish.end(); aFeature++)
- if ((*aFeature)->data()->isValid()) // there may be already removed wait for features
- addModified(*aFeature, FeaturePtr());
+ std::map<std::shared_ptr<ModelAPI_Feature>, std::set<std::shared_ptr<ModelAPI_Feature> > >::
+ iterator aFeature = myProcessOnFinish.begin();
+ for(; aFeature != myProcessOnFinish.end(); aFeature++) {
+ if (aFeature->first->data()->isValid()) {// there may be already removed while wait
+ if (aFeature->second.empty()) {
+ addModified(aFeature->first, FeaturePtr());
+ continue;
+ }
+ std::set<std::shared_ptr<ModelAPI_Feature> >::iterator aReasons;
+ for(aReasons = aFeature->second.begin(); aReasons != aFeature->second.end(); aReasons++) {
+ addModified(aFeature->first, *aReasons);
+ }
+ }
+ }
myIsFinish = false;
}
// processed features must be only on finish, so clear anyway (to avoid reimport on load)
return true;
}
-void Model_Update::redisplayWithResults(FeaturePtr theFeature, const ModelAPI_ExecState theState)
+void Model_Update::redisplayWithResults(
+ FeaturePtr theFeature, const ModelAPI_ExecState theState, bool theUpdateState)
{
// make updated and redisplay all results
static Events_ID EVENT_DISP = Events_Loop::loop()->eventByName(EVENT_OBJECT_TO_REDISPLAY);
if (!aRes->isDisabled()) {
// update state only for enabled results
// (Placement Result Part may make the original Part Result as invalid)
- aRes->data()->execState(theState);
+ if (theUpdateState)
+ aRes->data()->execState(theState);
}
if (theFeature->data()->updateID() > aRes->data()->updateID()) {
aRes->data()->setUpdateID(theFeature->data()->updateID());
}
// to redisplay "presentable" feature (for ex. distance constraint)
ModelAPI_EventCreator::get()->sendUpdated(theFeature, EVENT_DISP);
- theFeature->data()->execState(theState);
+ if (theUpdateState)
+ theFeature->data()->execState(theState);
}
/// Updates the state by the referenced object: if something bad with it, set state for this one
bool myIsFinish;
/// try if processing is currently performed
bool myIsProcessed;
- /// set that contains features that must be executed only on finish of the operation
- std::set<std::shared_ptr<ModelAPI_Feature> > myProcessOnFinish;
+ /// map that contains features that must be executed only on finish of the operation
+ /// the value in map is the set of reasons
+ std::map<std::shared_ptr<ModelAPI_Feature>, std::set<std::shared_ptr<ModelAPI_Feature> > >
+ myProcessOnFinish;
/// to avoid infinitive cycling: feature -> count of the processing periods during this update
std::map<std::shared_ptr<ModelAPI_Feature>, int > myProcessed;
/// if preview in hte property panel is blocked and
/// Sends the redisplay events for feature and results, updates the updated status
void redisplayWithResults(std::shared_ptr<ModelAPI_Feature> theFeature,
- const ModelAPI_ExecState theState);
+ const ModelAPI_ExecState theState, bool theUpdateState = true);
/// On operation start/end/abort the "Just" fileds must be cleared and processed in the right way
//! \param theFlushRedisplay a boolean value if the redisplay signal should be flushed
aPlane = aPartSet.addFeature("Plane")
aPlane.string("creation_method").setValue("by_other_plane")
aPlane.string("by_other_plane_option").setValue("by_distance_from_other")
-aPlane.selection("plane").selectSubShape("face", "Part_1/Extrusion_1_1/Generated_Face_1")
+aPlane.selection("plane").selectSubShape("face", "Part_1/Extrusion_1_1/Generated_Face_2")
aPlane.real("distance").setValue(0.001)
aPlane.boolean("reverse").setValue(False)
aSession.finishOperation()
assert(ModelAPI.ModelAPI_Session.get().validators().validate(Sketch_4.feature()))
assert(ModelAPI.ModelAPI_Session.get().validators().validate(ExtrusionCut_2.feature()))
-assert(Sketch_3.feature().selection("External").namingName() == "Extrusion_1_1/Modfied_6")
+assert(Sketch_3.feature().selection("External").namingName() == "_Extrusion_1_1/Modfied_4")
assert(model.checkPythonDump())
Boolean_2 = model.addCut(Part_1_doc, [model.selection("SOLID", "Extrusion_1_1")], [model.selection("SOLID", "Extrusion_4_1")])
Partition_1 = model.addPartition(Part_1_doc, [model.selection("SOLID", "Extrusion_1_1"), model.selection("SOLID", "Extrusion_2_1"), model.selection("FACE", "Face_1_1")])
Remove_SubShapes_1 = model.addRemoveSubShapes(Part_1_doc, model.selection("COMPOUND", "Extrusion_1_1"))
-Remove_SubShapes_1.setSubShapesToKeep([model.selection("COMPSOLID", "Partition_1_1_1"), model.selection("FACE", "Partition_1_1_3"), model.selection("FACE", "Partition_1_1_4"), model.selection("FACE", "Partition_1_1_5"), model.selection("FACE", "Partition_1_1_6"), model.selection("FACE", "Partition_1_1_7")])
+Remove_SubShapes_1.setSubShapesToKeep([model.selection("COMPSOLID", "Partition_1_1_1")])
model.end()
from ModelAPI import *
aFactory = ModelAPI_Session.get().validators()
assert(aFactory.validate(Remove_SubShapes_1.feature()))
-assert(Remove_SubShapes_1.subshapes().size() == 6)
-assert(Remove_SubShapes_1.subshapes().value(0).namingName() == "Partition_1_1_1")
-assert(Remove_SubShapes_1.subshapes().value(1).namingName() == "Partition_1_1_3")
-assert(Remove_SubShapes_1.subshapes().value(2).namingName() == "Partition_1_1_4")
-assert(Remove_SubShapes_1.subshapes().value(3).namingName() == "Partition_1_1_5")
-assert(Remove_SubShapes_1.subshapes().value(4).namingName() == "Partition_1_1_6")
-assert(Remove_SubShapes_1.subshapes().value(5).namingName() == "Partition_1_1_7")
+assert(Remove_SubShapes_1.subshapesToKeep().size() == 1)
+assert(Remove_SubShapes_1.subshapesToKeep().value(0).namingName() == "Partition_1_1_1")
Face_4 = model.addFace(Part_1_doc, [model.selection("EDGE", "Sketch_2/Edge-SketchCircle_1_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_2_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_3_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_4_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_5_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_7_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_6_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_9_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_8_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_10_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_12_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_11_2"), model.selection("WIRE", "Sketch_1/Wire-SketchLine_1f-SketchLine_3f-SketchLine_4f-SketchLine_5f-SketchLine_6f-SketchLine_7f-SketchLine_9f-SketchLine_10r-SketchArc_2_2f")])
Sketch_3 = model.addSketch(Part_1_doc, model.selection("FACE", "PartSet/XOY"))
SketchLine_11 = Sketch_3.addLine(40, 0, 30, 0)
-SketchPoint_1 = Sketch_3.addPoint(model.selection("VERTEX", "Face_1_1/Edge_4&Face_1_1/Edge_5"))
+SketchPoint_1 = Sketch_3.addPoint(model.selection("VERTEX", "Face_1_1/Edge_6&Face_1_1/Edge_7"))
SketchConstraintCoincidence_19 = Sketch_3.setCoincident(SketchLine_11.endPoint(), SketchPoint_1.result())
SketchLine_12 = Sketch_3.addLine(30, 0, 30, 10)
SketchLine_13 = Sketch_3.addLine(30, 10, 40, 10)
Face_5 = model.addFace(Part_1_doc, [model.selection("WIRE", "Sketch_3/Wire-SketchLine_11r-SketchLine_12r-SketchLine_13r-SketchLine_14r")])
MultiTranslation_1 = model.addMultiTranslation(Part_1_doc, [model.selection("FACE", "Face_5_1")], model.selection("EDGE", "PartSet/OX"), "l", 4, model.selection("EDGE", "PartSet/OY"), "l", 2)
Recover_1 = model.addRecover(Part_1_doc, MultiTranslation_1, [Face_5.result()])
-Translation_1 = model.addTranslation(Part_1_doc, [model.selection("FACE", "Recover_1_1")], model.selection("VERTEX", "Face_4_1/Edge_4&Face_4_1/Edge_5"), model.selection("VERTEX", "Face_4_1/Edge_6&Face_4_1/Edge_7"))
+Translation_1 = model.addTranslation(Part_1_doc, [model.selection("FACE", "Recover_1_1")], model.selection("VERTEX", "Face_4_1/Edge_6&Face_4_1/Edge_7"), model.selection("VERTEX", "Face_4_1/Edge_4&Face_4_1/Edge_5"))
Translation_1.result().setName("Translation_1_1")
MultiTranslation_2 = model.addMultiTranslation(Part_1_doc, [model.selection("FACE", "Translation_1_1")], model.selection("EDGE", "PartSet/OX"), "l", 4, model.selection("EDGE", "PartSet/OY"), "l", 2)
Recover_2 = model.addRecover(Part_1_doc, MultiTranslation_1, [Face_5.result()])
-Translation_2 = model.addTranslation(Part_1_doc, [model.selection("FACE", "Recover_2_1")], model.selection("VERTEX", "Face_4_1/Edge_4&Face_4_1/Edge_5"), model.selection("VERTEX", "Face_4_1/Edge_8&Face_4_1/Edge_9"))
+Translation_2 = model.addTranslation(Part_1_doc, [model.selection("FACE", "Recover_2_1")], model.selection("VERTEX", "Face_4_1/Edge_6&Face_4_1/Edge_7"), model.selection("VERTEX", "Face_4_1/Edge_2&Face_4_1/Edge_3"))
Translation_2.result().setName("Translation_2_1")
MultiTranslation_3 = model.addMultiTranslation(Part_1_doc, [model.selection("FACE", "Translation_2_1")], model.selection("EDGE", "PartSet/OX"), "l", 4)
Recover_3 = model.addRecover(Part_1_doc, MultiTranslation_1, [Face_5.result()])
-Translation_3 = model.addTranslation(Part_1_doc, [model.selection("FACE", "Recover_3_1")], model.selection("VERTEX", "Face_4_1/Edge_4&Face_4_1/Edge_5"), model.selection("VERTEX", "Translation_2_1/Translated_Edge_1_4&Translation_2_1/Translated_Edge_1_1"))
+Translation_3 = model.addTranslation(Part_1_doc, [model.selection("FACE", "Recover_3_1")], model.selection("VERTEX", "Face_4_1/Edge_6&Face_4_1/Edge_7"), model.selection("VERTEX", "Translation_2_1/Translated_Edge_1_4&Translation_2_1/Translated_Edge_1_3"))
Translation_3.result().setName("Translation_3_1")
MultiTranslation_4 = model.addMultiTranslation(Part_1_doc, [model.selection("FACE", "Translation_3_1")], model.selection("EDGE", "PartSet/OX"), "l", 3)
Recover_4 = model.addRecover(Part_1_doc, MultiTranslation_1, [Face_5.result()])
-Translation_4 = model.addTranslation(Part_1_doc, [model.selection("FACE", "Recover_4_1")], model.selection("VERTEX", "Face_4_1/Edge_4&Face_4_1/Edge_5"), model.selection("VERTEX", "Face_4_1/Edge_1&Face_4_1/Edge_2"))
+Translation_4 = model.addTranslation(Part_1_doc, [model.selection("FACE", "Recover_4_1")], model.selection("VERTEX", "Face_4_1/Edge_6&Face_4_1/Edge_7"), model.selection("VERTEX", "Face_4_1/Edge_1&Face_4_1/Edge_9"))
Translation_4.result().setName("Translation_4_1")
MultiTranslation_5 = model.addMultiTranslation(Part_1_doc, [model.selection("FACE", "Translation_4_1")], model.selection("EDGE", "PartSet/OX"), "l", 2)
Group_1 = model.addGroup(Part_1_doc, [model.selection("FACE", "MultiTranslation_4_1_2"), model.selection("FACE", "MultiTranslation_1_1_8"), model.selection("FACE", "MultiTranslation_1_1_4"), model.selection("FACE", "MultiTranslation_1_1_3"), model.selection("FACE", "MultiTranslation_1_1_6"), model.selection("FACE", "MultiTranslation_1_1_2"), model.selection("FACE", "MultiTranslation_1_1_7"), model.selection("FACE", "MultiTranslation_2_1_3"), model.selection("FACE", "MultiTranslation_3_1_4"), model.selection("FACE", "MultiTranslation_2_1_8"), model.selection("FACE", "MultiTranslation_2_1_4"), model.selection("FACE", "MultiTranslation_2_1_7"), model.selection("FACE", "MultiTranslation_4_1_3"), model.selection("FACE", "MultiTranslation_1_1_1"), model.selection("FACE", "MultiTranslation_5_1_2"), model.selection("FACE", "MultiTranslation_4_1_1"), model.selection("FACE", "MultiTranslation_5_1_1"), model.selection("FACE", "MultiTranslation_3_1_3"), model.selection("FACE", "MultiTranslation_3_1_2"), model.selection("FACE", "MultiTranslation_3_1_1"), model.selection("FACE", "MultiTranslation_2_1_6"), model.selection("FACE", "MultiTranslation_2_1_2"), model.selection("FACE", "MultiTranslation_2_1_5"), model.selection("FACE", "MultiTranslation_2_1_1"), model.selection("FACE", "MultiTranslation_1_1_5")])
Shell_1.result().setName("Shell_1_1")
Partition_1 = model.addPartition(Part_1_doc, [model.selection("FACE", "Face_3_1"), model.selection("FACE", "Face_3_2"), model.selection("FACE", "Face_4_1"), model.selection("FACE", "Face_2_1"), model.selection("FACE", "Face_1_1"), model.selection("FACE", "Face_3_5"), model.selection("FACE", "Face_3_3"), model.selection("FACE", "Face_3_4"), model.selection("FACE", "Face_3_7"), model.selection("FACE", "Face_3_6"), model.selection("FACE", "Face_3_8"), model.selection("FACE", "Face_3_9"), model.selection("FACE", "Face_3_10"), model.selection("FACE", "Face_3_11"), model.selection("FACE", "Face_3_12"), model.selection("SHELL", "Shell_1_1")])
Remove_SubShapes_1 = model.addRemoveSubShapes(Part_1_doc, model.selection("COMPOUND", "Face_3_1"))
-Remove_SubShapes_1.setSubShapesToKeep([model.selection("FACE", "Partition_1_1_2"), model.selection("FACE", "Partition_1_1_3"), model.selection("FACE", "Partition_1_1_4"), model.selection("FACE", "Partition_1_1_5"), model.selection("FACE", "Partition_1_1_6"), model.selection("FACE", "Partition_1_1_7"), model.selection("FACE", "Partition_1_1_8"), model.selection("FACE", "Partition_1_1_9"), model.selection("FACE", "Partition_1_1_10"), model.selection("FACE", "Partition_1_1_11"), model.selection("FACE", "Partition_1_1_12"), model.selection("FACE", "Partition_1_1_13"), model.selection("FACE", "Partition_1_1_14"), model.selection("FACE", "Partition_1_1_15"), model.selection("FACE", "Partition_1_1_16"), model.selection("FACE", "Partition_1_1_17"), model.selection("FACE", "Partition_1_1_18"), model.selection("FACE", "Partition_1_1_19"), model.selection("FACE", "Partition_1_1_20"), model.selection("FACE", "Partition_1_1_21"), model.selection("FACE", "Partition_1_1_22"), model.selection("FACE", "Partition_1_1_23"), model.selection("FACE", "Partition_1_1_24"), model.selection("FACE", "Partition_1_1_25"), model.selection("FACE", "Partition_1_1_26"), model.selection("FACE", "Partition_1_1_27"), model.selection("FACE", "Partition_1_1_28"), model.selection("FACE", "Partition_1_1_29"), model.selection("FACE", "Partition_1_1_30"), model.selection("FACE", "Partition_1_1_31"), model.selection("FACE", "Partition_1_1_32"), model.selection("FACE", "Partition_1_1_33"), model.selection("FACE", "Partition_1_1_34"), model.selection("FACE", "Partition_1_1_35"), model.selection("FACE", "Partition_1_1_36"), model.selection("FACE", "Partition_1_1_37"), model.selection("FACE", "Partition_1_1_38"), model.selection("FACE", "Partition_1_1_39"), model.selection("FACE", "Partition_1_1_40"), model.selection("FACE", "Partition_1_1_41"), model.selection("FACE", "Partition_1_1_42"), model.selection("FACE", "Partition_1_1_43"), model.selection("FACE", "Partition_1_1_44"), model.selection("FACE", "Partition_1_1_45"), model.selection("FACE", "Partition_1_1_46"), model.selection("FACE", "Partition_1_1_47"), model.selection("FACE", "Partition_1_1_48"), model.selection("FACE", "Partition_1_1_49"), model.selection("FACE", "Partition_1_1_50"), model.selection("FACE", "Partition_1_1_51"), model.selection("FACE", "Partition_1_1_52"), model.selection("FACE", "Partition_1_1_53"), model.selection("FACE", "Partition_1_1_54"), model.selection("FACE", "Partition_1_1_55"), model.selection("FACE", "Partition_1_1_56"), model.selection("FACE", "Partition_1_1_57")])
+Remove_SubShapes_1.setSubShapesToKeep([model.selection("FACE", "Partition_1_1_2"), model.selection("FACE", "Partition_1_1_3"), model.selection("FACE", "Partition_1_1_4"), model.selection("FACE", "Partition_1_1_5"), model.selection("FACE", "Partition_1_1_6"), model.selection("FACE", "Partition_1_1_7"), model.selection("FACE", "Partition_1_1_8"), model.selection("FACE", "Partition_1_1_9")])
model.end()
# move groups
Part_1_doc.moveFeature(Group_3.feature(), Group_2.feature())
model.end()
-# check that groups 2 and 3 are correct, but Group_1 elements are removed (because shell is removed)
+# check that group 2 is correct, but Group_1 and Group_3 elements are removed (because shell is removed)
from ModelAPI import *
aFactory = ModelAPI_Session.get().validators()
-for Group in [Group_1, Group_2, Group_3]:
- if Group != Group_1:
- assert(aFactory.validate(Group.feature()))
- assert(Group.groupList().size() != 0)
- for a in range(Group.groupList().size()):
- if Group == Group_1:
- assert(len(Group.groupList().value(a).namingName()) == 0)
- else:
- assert(Group.groupList().value(a).value().shapeTypeStr() == "FACE")
- assert(len(Group.groupList().value(a).namingName()) > 0)
+
+assert(Group_1.groupList().size() != 0)
+for a in range(Group_1.groupList().size()):
+ assert(len(Group_1.groupList().value(a).namingName()) == 0)
+
+assert(aFactory.validate(Group_3.feature()))
+assert(Group_3.groupList().size() != 0)
+for a in range(Group_3.groupList().size()):
+ assert(Group_3.groupList().value(a).value().shapeTypeStr() == "FACE")
+ assert(len(Group_3.groupList().value(a).namingName()) > 0)
+
+# for Group in [Group_1, Group_2, Group_3]:
+# if Group == Group_2:
+# assert(aFactory.validate(Group.feature()))
+# assert(Group.groupList().size() != 0)
+# for a in range(Group.groupList().size()):
+# if Group != Group_2:
+# assert(len(Group.groupList().value(a).namingName()) == 0)
+# else:
+# assert(Group.groupList().value(a).value().shapeTypeStr() == "FACE")
+# assert(len(Group.groupList().value(a).namingName()) > 0)
Extrusion_1.result().setName("prism")
Revolution_1 = model.addRevolution(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_5r-SketchLine_6r-SketchLine_7r")], model.selection("EDGE", "Sketch_1/Edge-SketchLine_6"), 360, 0)
Revolution_1.result().setName("spinner")
-Placement_1 = model.addPlacement(Part_1_doc, [model.selection("SOLID", "spinner")], model.selection("VERTEX", "spinner/Lateral_Edge_1&spinner/Base_Edge_2"), model.selection("FACE", "prism/Generated_Face_1"), False, True)
+Placement_1 = model.addPlacement(Part_1_doc, [model.selection("SOLID", "spinner")], model.selection("VERTEX", "spinner/Lateral_Edge_1&spinner/Base_Edge_1"), model.selection("FACE", "prism/Generated_Face_2"), False, True)
model.do()
assert(Placement_1.result().name() == Revolution_1.result().name()), "Placement name '{}' != '{}'".format(Placement_1.result().name(), Revolution_1.result().name())
else {
FeaturePtr aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(*anIt);
theDumper.dumpFeature(aFeature, true);
- // dump all referred features for the "Copy"
+ // dump the Projection feature which produces this "Copy" entity
AttributeBooleanPtr aCopyAttr = aFeature->boolean("Copy");
if (aCopyAttr.get() && aCopyAttr->value())
{
const std::set<AttributePtr>& aRefs = aFeature->data()->refsToMe();
std::set<AttributePtr>::iterator aRefIt = aRefs.begin();
for (; aRefIt != aRefs.end(); ++aRefIt)
- {
- FeaturePtr anOwner = ModelAPI_Feature::feature((*aRefIt)->owner());
- if (anOwner && !theDumper.isDumped(anOwner))
- theDumper.dumpFeature(anOwner, true);
- }
+ if ((*aRefIt)->id() == "ProjectedFeature")
+ { // process projection only
+ FeaturePtr anOwner = ModelAPI_Feature::feature((*aRefIt)->owner());
+ if (anOwner && !theDumper.isDumped(anOwner))
+ theDumper.dumpFeature(anOwner, true);
+ }
}
}
}
SET(PROJECT_HEADERS
ModuleBase.h
ModuleBase_ActionInfo.h
+ ModuleBase_ActionType.h
ModuleBase_Definitions.h
ModuleBase_DoubleSpinBox.h
ModuleBase_Events.h
--- /dev/null
+// Copyright (C) 2014-2017 CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or
+// email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+//
+
+#ifndef ModuleBase_ActionType_H_
+#define ModuleBase_ActionType_H_
+
+#include <ModuleBase.h>
+
+/*!
+ * Structure to describe widget processed types of actions.
+ */
+enum MODULEBASE_EXPORT ModuleBase_ActionType
+{
+ ActionEnter,
+ ActionEscape,
+ ActionDelete,
+ ActionUndo,
+ ActionRedo
+};
+
+#endif /* ModuleBase_ActionType_H_ */
}
}
+bool ModuleBase_ModelWidget::canProcessAction(ModuleBase_ActionType theActionType,
+ bool& isActionEnabled)
+{
+ isActionEnabled = false;
+ switch (theActionType) {
+ case ActionEnter: return false;
+ case ActionEscape: return false;
+ case ActionDelete: return true;
+ case ActionUndo:
+ case ActionRedo:
+ default:
+ return false;
+ }
+}
+
+bool ModuleBase_ModelWidget::processAction(ModuleBase_ActionType theActionType)
+{
+ switch (theActionType) {
+ case ActionEnter:
+ return processEnter();
+ case ActionEscape:
+ return processEscape();
+ case ActionDelete:
+ return processDelete();
+ case ActionUndo:
+ case ActionRedo:
+ default:
+ return false;
+ }
+}
+
bool ModuleBase_ModelWidget::processEnter()
{
return false;
#define MODULEBASE_MODELWIDGET_H
#include <ModuleBase.h>
+#include <ModuleBase_ActionType.h>
#include <ModuleBase_OperationFeature.h>
#include <ModelAPI_Feature.h>
/// \return Current Editing mode
bool isEditingMode() const { return myIsEditing; }
- /// Returns true if the event is processed. The default implementation is empty, returns false.
- virtual bool processEnter();
-
- /// Returns true if the event is processed. The default implementation is empty, returns false.
- virtual bool processEscape();
+ /// Returns true if the action can be processed. By default it is empty and returns false.
+ /// \param theActionType an action type
+ /// \param isActionEnabled if true, the enable state of the action
+ virtual bool canProcessAction(ModuleBase_ActionType theActionType, bool& isActionEnabled);
/// Returns true if the event is processed. The default implementation is empty, returns false.
- virtual bool processDelete();
+ virtual bool processAction(ModuleBase_ActionType theActionType);
/// Sends Update and Redisplay for the given object
/// \param theObj is updating object
/// The method called when widget is activated
virtual void activateCustom() {};
+ //// Returns true if the event is processed. The default implementation is empty, returns false.
+ virtual bool processEnter();
+
+ //// Returns true if the event is processed. The default implementation is empty, returns false.
+ virtual bool processEscape();
+
+ //// Returns true if the event is processed. The default implementation is empty, returns false.
+ virtual bool processDelete();
+
protected slots:
/// Processing of values changed in model widget by store the current value to the feature
void onWidgetValuesChanged();
/// \return a control list
virtual QList<QWidget*> getControls() const;
- /// Returns true if the event is processed.
- virtual bool processEnter();
-
public slots:
// Delayed value chnged: when user starts typing something,
// it gives him a 0,5 second to finish typing, when sends valueChnaged() signal
// void onValueChanged();
protected:
+ /// Returns true if the event is processed.
+ virtual bool processEnter();
+
/// Saves the internal parameters to the given feature
/// \return True in success
virtual bool storeValueCustom();
/// \param theY the Y coordinate
void setCursorPosition(const int theX, const int theY);
+protected:
/// Returns true if the event is processed.
virtual bool processEnter();
/// Redefinition of virtual method
virtual QList<QWidget*> getControls() const;
- /// Returns true if the event is processed.
- virtual bool processEnter();
-
protected slots:
/// A slot for processing text changed event
void onTextChanged();
protected:
+ /// Returns true if the event is processed.
+ virtual bool processEnter();
+
/// Do not initialize value on the widget activation
virtual void initializeValueByActivate();
/// exists and has supported format
bool isCurrentPathValid();
- /// Reject the current editor dialog if it is shown and returns true.
- virtual bool processEscape();
-
public slots:
/// Processing of path selection button press
void onPathSelectionBtn();
void onPathChanged();
protected:
+ /// Reject the current editor dialog if it is shown and returns true.
+ virtual bool processEscape();
+
/// Saves the internal parameters to the given feature
/// \return True in success
virtual bool storeValueCustom();
/// \return a control list
virtual QList<QWidget*> getControls() const;
+protected:
/// Returns true if the event is processed.
virtual bool processEnter();
-protected:
/// Saves the internal parameters to the given feature
/// \return True in success
virtual bool storeValueCustom();
/// Redefinition of virtual method
virtual QList<QWidget*> getControls() const;
+protected:
/// Returns true if the event is processed.
virtual bool processEnter();
-protected:
/// Saves the internal parameters to the given feature
/// \return True in success
virtual bool storeValueCustom();
const int ATTRIBUTE_SELECTION_INDEX_ROLE = Qt::UserRole + 1;
+//#define DEBUG_UNDO_REDO
+
/**
* Customization of a List Widget to make it to be placed on full width of container
*/
#endif
};
+#ifdef DEBUG_UNDO_REDO
+void printHistoryInfo(const QString& theMethodName, int theCurrentHistoryIndex,
+ QList<QList<std::shared_ptr<ModuleBase_ViewerPrs> > > theSelectedHistoryValues)
+{
+ QStringList aSizes;
+ for (int i = 0; i < theSelectedHistoryValues.size(); i++)
+ aSizes.append(QString::number(theSelectedHistoryValues[i].size()));
+
+ std::cout << theMethodName.toStdString()
+ << " current = " << theCurrentHistoryIndex
+ << " size(history) = " << theSelectedHistoryValues.size()
+ << " (" << aSizes.join(", ").toStdString() << ")"
+ << std::endl;
+}
+#endif
+
ModuleBase_WidgetMultiSelector::ModuleBase_WidgetMultiSelector(QWidget* theParent,
ModuleBase_IWorkshop* theWorkshop,
const Config_WidgetAPI* theData)
: ModuleBase_WidgetSelector(theParent, theWorkshop, theData),
- myIsSetSelectionBlocked(false)
+ myIsSetSelectionBlocked(false), myCurrentHistoryIndex(-1)
{
QGridLayout* aMainLay = new QGridLayout(this);
ModuleBase_Tools::adjustMargins(aMainLay);
myWorkshop->module()->activateCustomPrs(myFeature,
ModuleBase_IModule::CustomizeHighlightedObjects, true);
+ clearSelectedHistory();
+ myWorkshop->updateCommandStatus();
}
//********************************************************************
ModuleBase_WidgetSelector::deactivate();
myWorkshop->module()->deactivateCustomPrs(ModuleBase_IModule::CustomizeHighlightedObjects, true);
+ clearSelectedHistory();
+ myWorkshop->updateCommandStatus();
}
//********************************************************************
convertIndicesToViewerSelection(anAttributeIds, theValues);
}
+//********************************************************************
+bool ModuleBase_WidgetMultiSelector::canProcessAction(ModuleBase_ActionType theActionType,
+ bool& isActionEnabled)
+{
+ isActionEnabled = false;
+ bool aCanProcess = false;
+ switch (theActionType) {
+ case ActionUndo:
+ case ActionRedo: {
+ aCanProcess = true;
+ isActionEnabled = theActionType == ActionUndo ? myCurrentHistoryIndex > 0
+ : (mySelectedHistoryValues.size() > 0 &&
+ myCurrentHistoryIndex < mySelectedHistoryValues.size() - 1);
+ }
+ break;
+ default:
+ break;
+ }
+ return aCanProcess;
+}
+
+//********************************************************************
+bool ModuleBase_WidgetMultiSelector::processAction(ModuleBase_ActionType theActionType)
+{
+ switch (theActionType) {
+ case ActionUndo:
+ case ActionRedo: {
+ if (theActionType == ActionUndo)
+ myCurrentHistoryIndex--;
+ else
+ myCurrentHistoryIndex++;
+ QList<ModuleBase_ViewerPrsPtr> aSelected = mySelectedHistoryValues[myCurrentHistoryIndex];
+ // equal vertices should not be used here
+ ModuleBase_ISelection::filterSelectionOnEqualPoints(aSelected);
+ bool isDone = setSelection(aSelected,
+ false /*need not validate because values already was in list*/);
+ updateOnSelectionChanged(isDone);
+
+ myWorkshop->updateCommandStatus();
+#ifdef DEBUG_UNDO_REDO
+ printHistoryInfo(QString("processAction %1").arg(theActionType == ActionUndo ? "Undo"
+ : "Redo"), myCurrentHistoryIndex, mySelectedHistoryValues);
+#endif
+ return true;
+ }
+ default:
+ return ModuleBase_ModelWidget::processAction(theActionType);
+ }
+}
+
+//********************************************************************
+bool ModuleBase_WidgetMultiSelector::activateSelectionAndFilters(bool toActivate)
+{
+ myWorkshop->updateCommandStatus(); // update enable state of Undo/Redo application actions
+ return ModuleBase_WidgetSelector::activateSelectionAndFilters(toActivate);
+}
+
//********************************************************************
bool ModuleBase_WidgetMultiSelector::isValidSelectionCustom(const ModuleBase_ViewerPrsPtr& thePrs)
{
//********************************************************************
bool ModuleBase_WidgetMultiSelector::processDelete()
{
+ appendFirstSelectionInHistory();
+
// find attribute indices to delete
std::set<int> anAttributeIds;
getSelectedAttributeIndices(anAttributeIds);
}
}
}
+ appendSelectionInHistory();
return aDone;
}
// may be the feature's result is not displayed, but attributes should be
myWorkshop->module()->customizeObject(myFeature, ModuleBase_IModule::CustomizeArguments,
true); /// hope that something is redisplayed by object updated
+ // clear history should follow after set selected to do not increase history by setSelected
+ clearSelectedHistory();
}
//********************************************************************
}
}
}
+ appendFirstSelectionInHistory();
ModuleBase_WidgetSelector::onSelectionChanged();
+ appendSelectionInHistory();
+}
+
+void ModuleBase_WidgetMultiSelector::appendFirstSelectionInHistory()
+{
+ if (mySelectedHistoryValues.empty()) {
+ myCurrentHistoryIndex++;
+ mySelectedHistoryValues.append(getAttributeSelection());
+
+#ifdef DEBUG_UNDO_REDO
+ printHistoryInfo("appendSelectionInHistory", myCurrentHistoryIndex, mySelectedHistoryValues);
+#endif
+ }
+}
+
+void ModuleBase_WidgetMultiSelector::appendSelectionInHistory()
+{
+ while (myCurrentHistoryIndex != mySelectedHistoryValues.count() - 1)
+ mySelectedHistoryValues.removeLast();
+
+ QList<ModuleBase_ViewerPrsPtr> aSelected = getFilteredSelected();
+ myCurrentHistoryIndex++;
+ mySelectedHistoryValues.append(aSelected);
+ myWorkshop->updateCommandStatus();
+
+#ifdef DEBUG_UNDO_REDO
+ printHistoryInfo("appendSelectionInHistory", myCurrentHistoryIndex, mySelectedHistoryValues);
+#endif
+}
+
+void ModuleBase_WidgetMultiSelector::clearSelectedHistory()
+{
+ mySelectedHistoryValues.clear();
+ myCurrentHistoryIndex = -1;
+ myWorkshop->updateCommandStatus();
+
+#ifdef DEBUG_UNDO_REDO
+ printHistoryInfo("clearSelectedHistory", myCurrentHistoryIndex, mySelectedHistoryValues);
+#endif
}
void ModuleBase_WidgetMultiSelector::updateFocus()
/// \param theValues a list of presentations
virtual void getHighlighted(QList<std::shared_ptr<ModuleBase_ViewerPrs>>& theValues);
+ /// Returns true if the action can be processed. By default it is empty and returns false.
+ /// \param theActionType an action type
+ /// \param isActionEnabled if true, the enable state of the action
+ virtual bool canProcessAction(ModuleBase_ActionType theActionType, bool& isActionEnabled);
+
+ /// Returns true if the event is processed. The default implementation is empty, returns false.
+ virtual bool processAction(ModuleBase_ActionType theActionType);
+
+ /// Activate or deactivate selection and selection filters
+ /// \return true if the selection filter of the widget is activated in viewer context
+ virtual bool activateSelectionAndFilters(bool toActivate);
+
/// Checks the widget validity. By default, it returns true.
/// \param thePrs a selected presentation in the view
/// \return a boolean value
virtual bool isValidSelectionCustom(const std::shared_ptr<ModuleBase_ViewerPrs>& thePrs);
- /// Returns true if the event is processed. The default implementation is empty, returns false.
- virtual bool processDelete();
-
public slots:
/// Slot is called on selection type changed
void onSelectionTypeChanged();
void onListSelection();
protected:
+ /// Returns true if the event is processed. The default implementation is empty, returns false.
+ virtual bool processDelete();
+
/// The methiod called when widget is activated
virtual void activateCustom();
/// \return True in success
virtual bool storeValueCustom();
+ /// restire type of selection by feature attribute
virtual bool restoreValueCustom();
+ /// Creates an element of the attribute current selection if history is empty
+ virtual void appendFirstSelectionInHistory();
+
+ /// Create an element in the history that stores the current selection,
+ /// position in the history is incremented
+ void appendSelectionInHistory();
+
+ /// Clear list of stored selected items, reset current position into '-1'
+ void clearSelectedHistory();
+
/// Set the focus on the last item in the list
virtual void updateFocus();
/// A flag to block set selection perform if the method is in process
bool myIsSetSelectionBlocked;
+
+ /// A container of selected objects
+ QList<QList<std::shared_ptr<ModuleBase_ViewerPrs> > > mySelectedHistoryValues;
+ /// Position in a container of selected values
+ int myCurrentHistoryIndex;
};
#endif /* MODULEBASE_WIDGETFILESELECTOR_H_ */
FeaturePtr aCreatedFeature;
aSelectedObject = PartSet_Tools::createFixedObjectByExternal(theShape,
theSelectedObject, theSketch, theTemporary, aCreatedFeature);
- if (aSelectedObject.get() && theTemporary)
+ if (aCreatedFeature.get() && theTemporary)
myExternalObjectValidated = aCreatedFeature;
}
return aSelectedObject;
SketcherPrs_Tools::setArrowSize(aLen);
const double aCurScale = aViewer->activeView()->Camera()->Scale();
aViewer->SetScale(aViewer->activeView(), aCurScale);
- double aTextHeight = SketcherPrs_Tools::getConfigTextHeight();
- SketcherPrs_Tools::setTextHeight (aTextHeight);
bool isModified = false;
QList<AISObjectPtr> aPrsList = aDisplayer->displayedPresentations();
foreach (AISObjectPtr aAIS, aPrsList) {
Handle(AIS_Dimension) aDim = Handle(AIS_Dimension)::DownCast(aAisObj);
if (!aDim.IsNull()) {
aDim->DimensionAspect()->ArrowAspect()->SetLength(aLen);
- aDim->DimensionAspect()->TextAspect()->SetHeight(aTextHeight);
aContext->Redisplay(aDim, false);
isModified = true;
}
def body_3():
# Create XOZ sketch
- sketch = model.addSketch(part, "Boolean_1_1/Modified_2")
+ sketch = model.addSketch(part, "Boolean_1_1/Modified_3")
# Create base polygon
H, L, l, r = 28, 40, 8, 12
sketch.setRadius(arc, r)
# Binding
- bottom_e = sketch.addLine("Boolean_1_1/Modified_7&Boolean_1_1/Modified_5")
+ bottom_e = sketch.addLine("Boolean_1_1/Modified_8&Boolean_1_1/Modified_5")
sketch.setCoincident(bottom_e, bottom.startPoint())
sketch.setCoincident(bottom_e.startPoint(), bottom.endPoint())
sketch.setCoincident(bottom_e.endPoint(), bottom.startPoint())
sketch.setCoincident(bottom_e.startPoint(), left.startPoint())
- left_e = sketch.addLine("Boolean_2_1/Modified_6&Boolean_2_1/Modified_8")
+ left_e = sketch.addLine("Boolean_2_1/Modified_6&Boolean_2_1/Modified_7")
sketch.setCoincident(left_e.startPoint(), left.endPoint())
model.do() #!!!
"""Package for GDML plugin for the Parametric Geometry API of the Modeler.
"""
-from GDMLAPI import addConeSegment
+from GDMLAPI import addConeSegment, addEllipsoid
aDistCE = sketcher.tools.distancePointPoint(aCenterPnt, aEndPnt)
assert math.fabs(aDistCS - aDistCE) < TOLERANCE, "Wrong arc: center-start distance {}, center-end distance {}".format(aDistCS, aDistCE)
assert math.fabs(aRadius.value() -aDistCS) < TOLERANCE, "Wrong arc: radius is {0}, expected {1}".format(aRadius.value(), aDistCS)
+
+def checkBooleansResult(theFeature,theModel,NbRes,NbSubRes,NbSolid,NbFace,NbEdge,NbVertex):
+ """ Tests numbers of sub-shapes in results (used in Boolean operations tests)
+ """
+ theModel.testNbResults(theFeature, NbRes)
+ theModel.testNbSubResults(theFeature,NbSubRes)
+ theModel.testNbSubShapes(theFeature, GeomAPI_Shape.SOLID, NbSolid )
+ theModel.testNbSubShapes(theFeature, GeomAPI_Shape.FACE, NbFace)
+ theModel.testNbSubShapes(theFeature, GeomAPI_Shape.EDGE, NbEdge)
+ theModel.testNbSubShapes(theFeature, GeomAPI_Shape.VERTEX, NbVertex)
std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(lastResult());
if (aResult && aResult->shape() && theID == EXTERNAL_FEATURE_ID()) {
aResult->setShape(std::shared_ptr<GeomAPI_Edge>());
- aProjection->selection(EXTERNAL_ID())->setValue(lastResult(), lastResult()->shape());
+ if (aProjection)
+ aProjection->selection(EXTERNAL_ID())->setValue(lastResult(), lastResult()->shape());
}
if (aVertex) {
("VERTEX", "Extrusion_1_1/Generated_Face_3&Extrusion_1_1/Generated_Face_2&Extrusion_1_1/To_Face_1"),
#
("EDGE", "Extrusion_1_1/Generated_Face_2&Extrusion_1_1/From_Face_1"),
- ("EDGE", "Extrusion_1_1/Generated_Face_3&Extrusion_1_1/From_Face_1"),
+ ("EDGE", "Extrusion_1_1/Generated_Face_1&Extrusion_1_1/From_Face_1"),
("EDGE", "Extrusion_1_1/Generated_Face_4&Extrusion_1_1/From_Face_1"),
- ("EDGE", "Extrusion_1_1/Generated_Face_1&Extrusion_1_1/To_Face_1"),
+ ("EDGE", "Extrusion_1_1/Generated_Face_3&Extrusion_1_1/To_Face_1"),
#
- ("EDGE", "Extrusion_1_1/Generated_Face_2&Extrusion_1_1/Generated_Face_1"),
- ("EDGE", "Extrusion_1_1/Generated_Face_3&Extrusion_1_1/Generated_Face_2"),
- ("EDGE", "Extrusion_1_1/Generated_Face_4&Extrusion_1_1/Generated_Face_3"),
+ ("EDGE", "Extrusion_1_1/Generated_Face_2&Extrusion_1_1/Generated_Face_3"),
+ ("EDGE", "Extrusion_1_1/Generated_Face_1&Extrusion_1_1/Generated_Face_2"),
("EDGE", "Extrusion_1_1/Generated_Face_4&Extrusion_1_1/Generated_Face_1"),
+ ("EDGE", "Extrusion_1_1/Generated_Face_4&Extrusion_1_1/Generated_Face_3"),
#
("EDGE", "Extrusion_1_1/Generated_Face_2&Extrusion_1_1/To_Face_1"),
- ("EDGE", "Extrusion_1_1/Generated_Face_3&Extrusion_1_1/To_Face_1"),
+ ("EDGE", "Extrusion_1_1/Generated_Face_1&Extrusion_1_1/To_Face_1"),
("EDGE", "Extrusion_1_1/Generated_Face_4&Extrusion_1_1/To_Face_1"),
- ("EDGE", "Extrusion_1_1/Generated_Face_1&Extrusion_1_1/From_Face_1")
+ ("EDGE", "Extrusion_1_1/Generated_Face_3&Extrusion_1_1/From_Face_1")
]
# Test projection to the same plane
testProjections(Part_1_doc, Sketch_6, aProjectedList, aFailedIDs)
# Test projection to orthogonal side face of the prism
-Sketch_7 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_1"))
+Sketch_7 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_3"))
aFailedIDs = set([0, 1, 18, 20, 26, 28])
testProjections(Part_1_doc, Sketch_7, aProjectedList, aFailedIDs)
# Test projection to slope side face of the prism
-Sketch_8 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_3"))
+Sketch_8 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_1"))
aFailedIDs = set([0, 1])
testProjections(Part_1_doc, Sketch_8, aProjectedList, aFailedIDs)
--- /dev/null
+## Copyright (C) 2014-2017 CEA/DEN, EDF R&D
+##
+## This library is free software; you can redistribute it and/or
+## modify it under the terms of the GNU Lesser General Public
+## License as published by the Free Software Foundation; either
+## version 2.1 of the License, or (at your option) any later version.
+##
+## This library is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+## Lesser General Public License for more details.
+##
+## You should have received a copy of the GNU Lesser General Public
+## License along with this library; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##
+## See http:##www.salome-platform.org/ or
+## email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+##
+
+"""
+ Check that there is no crash while changing the projecting feature
+"""
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+
+Sketch_1 = model.addSketch(partSet, model.defaultPlane("XOY"))
+SketchLine_1 = Sketch_1.addLine(20, -50, 70, 50)
+model.do()
+
+Sketch_2 = model.addSketch(partSet, model.defaultPlane("YOZ"))
+SketchProjection_1 = Sketch_2.addProjection(model.selection("VERTEX", "Sketch_1/Vertex-SketchLine_1s"), True)
+model.do()
+
+# change the feature projected (no crash expected)
+SketchProjection_1.setExternalFeature(model.selection("EDGE", "Sketch_1/Edge-SketchLine_1"))
+model.do()
+
+model.end()
return;
}
}
- SetSelToleranceForText2d(SketcherPrs_Tools::getTextHeight());
+ SetSelToleranceForText2d(SketcherPrs_Tools::getArrowSize()/5.);
AIS_AngleDimension::ComputeSelection(aSelection, aMode);
}
return;
}
}
- SetSelToleranceForText2d(SketcherPrs_Tools::getTextHeight());
+ SetSelToleranceForText2d(SketcherPrs_Tools::getArrowSize()/5.);
AIS_LengthDimension::ComputeSelection(aSelection, aMode);
}
return;
}
}
- SetSelToleranceForText2d(SketcherPrs_Tools::getTextHeight());
+ SetSelToleranceForText2d(SketcherPrs_Tools::getArrowSize()/5.);
AIS_RadiusDimension::ComputeSelection(aSelection, aMode);
}
ObjectPtr aObj = object(theIndex);
if (aObj.get()) {
+ if (aObj->groupName() == ModelAPI_ResultParameter::group())
+ return NoneState;
ResultPtr aResObj = std::dynamic_pointer_cast<ModelAPI_Result>(aObj);
if (aResObj.get()) {
XGUI_Displayer* aDisplayer = myWorkshop->displayer();
return myOperations.at(idx - 1);
}
+ModuleBase_ModelWidget* XGUI_OperationMgr::activeWidget() const
+{
+ ModuleBase_ModelWidget* anActiveWidget = 0;
+ ModuleBase_Operation* anOperation = currentOperation();
+ if (anOperation) {
+ ModuleBase_IPropertyPanel* aPanel = anOperation->propertyPanel();
+ if (aPanel)
+ anActiveWidget = aPanel->activeWidget();
+ }
+ return anActiveWidget;
+}
+
bool XGUI_OperationMgr::startOperation(ModuleBase_Operation* theOperation)
{
if (hasOperation())
ModuleBase_IPropertyPanel* aPanel = aOperation->propertyPanel();
ModuleBase_ModelWidget* anActiveWgt = aPanel->activeWidget();
if (anActiveWgt)
- isAccepted = anActiveWgt && anActiveWgt->processEscape();
+ isAccepted = anActiveWgt && anActiveWgt->processAction(ActionEscape);
}
// default Escape button functionality
if (!isAccepted && aOperation) {
}
}
if (!isAborted) {
- isAccepted = anActiveWgt && anActiveWgt->processEnter();
+ isAccepted = anActiveWgt && anActiveWgt->processAction(ActionEnter);
if (!isAccepted) {
isAccepted =
myWorkshop->module()->processEnter(anActiveWgt ? anActiveWgt->attributeID() : "");
if (isPPChildObject) {
anActiveWgt = aPanel->activeWidget();
if (anActiveWgt) {
- isAccepted = anActiveWgt->processDelete();
+ isAccepted = anActiveWgt->processAction(ActionDelete);
}
}
}
/// else, or if there is no parent - returns NULL
ModuleBase_Operation* previousOperation(ModuleBase_Operation* theOperation) const;
+ /// Returns an active widget of the current operation.
+ /// \return widget or NULL
+ ModuleBase_ModelWidget* activeWidget() const;
+
/// Start the operation and append it to the stack of operations
/// \param theOperation the started operation
/// \return the state whether the current operation is started
#include <AppElements_Workbench.h>
#endif
+#include <Config_XMLReader.h>
+
#include <ModelAPI_AttributeDocRef.h>
#include <ModelAPI_AttributeIntArray.h>
#include <ModelAPI_AttributeDouble.h>
Config_PropManager::registerProp("Plugins", "default_path", "Default Path",
Config_Prop::Directory, "");
- std::string aDir = getenv(QString("%1Resources").arg(
- ModuleBase_Preferences::resourceMgr()->appName()).toLatin1());
+ std::string aDir = Config_XMLReader::resourcesConfigFile();
Config_PropManager::registerProp("Plugins", "import_initial_path", "Import initial directory",
Config_Prop::Directory, aDir);
#ifdef _DEBUG
bool aNewPart = Config_PropManager::boolean("Plugins", "create_part_by_start");
if (aNewPart) {
- module()->launchOperation("Part", false);
+ module()->launchOperation("Part", false); // PartSetPlugin_Part::ID()
}
#endif
}
#ifndef HAVE_SALOME
myMainWindow->setCurrentDir(myCurrentDir, true);
#endif
+
+#ifdef _DEBUG
+ bool aNewPart = Config_PropManager::boolean("Plugins", "create_part_by_start");
+ if (aNewPart) {
+
+ DocumentPtr aRootDoc = ModelAPI_Session::get()->moduleDocument();
+ int aSize = aRootDoc->size(ModelAPI_ResultPart::group());
+ if (aSize > 0 ) {
+ ObjectPtr aObject = aRootDoc->object(ModelAPI_ResultPart::group(), 0);
+ ResultPartPtr aPart = std::dynamic_pointer_cast<ModelAPI_ResultPart>(aObject);
+ if (aPart.get())
+ aPart->activate();
+ }
+ }
+#endif
+
QApplication::restoreOverrideCursor();
}
//******************************************************
void XGUI_Workshop::onUndo(int theTimes)
{
+ ModuleBase_ModelWidget* anActiveWidget = myOperationMgr->activeWidget();
+ if (anActiveWidget && anActiveWidget->processAction(ActionUndo))
+ return;
+
objectBrowser()->treeView()->setCurrentIndex(QModelIndex());
SessionPtr aMgr = ModelAPI_Session::get();
std::list<std::string> aUndoList = aMgr->undoList();
//******************************************************
void XGUI_Workshop::onRedo(int theTimes)
{
+ ModuleBase_ModelWidget* anActiveWidget = myOperationMgr->activeWidget();
+ if (anActiveWidget && anActiveWidget->processAction(ActionRedo))
+ return;
+
// the viewer update should be blocked in order to avoid the features blinking. For the created
// feature a results are created, the flush of the created signal caused the viewer redisplay for
// each created result. After a redisplay signal is flushed. So, the viewer update is blocked
//******************************************************
void XGUI_Workshop::onWidgetStateChanged(int thePreviousState)
{
- ModuleBase_ModelWidget* anActiveWidget = 0;
- ModuleBase_Operation* anOperation = myOperationMgr->currentOperation();
- if (anOperation) {
- ModuleBase_IPropertyPanel* aPanel = anOperation->propertyPanel();
- if (aPanel)
- anActiveWidget = aPanel->activeWidget();
- }
+ ModuleBase_ModelWidget* anActiveWidget = myOperationMgr->activeWidget();
+ //ModuleBase_Operation* anOperation = myOperationMgr->currentOperation();
+ //if (anOperation) {
+ // ModuleBase_IPropertyPanel* aPanel = anOperation->propertyPanel();
+ // if (aPanel)
+ // anActiveWidget = aPanel->activeWidget();
+ //}
if (anActiveWidget)
operationMgr()->onValidateOperation();
if (aMgr->hasModuleDocument()) {
foreach(QAction* aCmd, aCommands) {
QString aId = aCmd->data().toString();
- if (aId == "UNDO_CMD")
- aCmd->setEnabled(myModule->canUndo());
- else if (aId == "REDO_CMD")
- aCmd->setEnabled(myModule->canRedo());
+ if (aId == "UNDO_CMD") {
+ bool isActionEnabled = false;
+ // if ultimate is true -> using result of operation only, or using OR combination
+ ModuleBase_ModelWidget* anActiveWidget = myOperationMgr->activeWidget();
+ if (anActiveWidget && anActiveWidget->canProcessAction(ActionUndo, isActionEnabled))
+ aCmd->setEnabled(isActionEnabled);
+ else
+ aCmd->setEnabled(myModule->canUndo());
+ }
+ else if (aId == "REDO_CMD") {
+ bool isActionEnabled = false;
+ // if ultimate is true -> using result of operation only, or using OR combination
+ ModuleBase_ModelWidget* anActiveWidget = myOperationMgr->activeWidget();
+ if (anActiveWidget && anActiveWidget->canProcessAction(ActionRedo, isActionEnabled))
+ aCmd->setEnabled(isActionEnabled);
+ else
+ aCmd->setEnabled(myModule->canRedo());
+ }
else
// Enable all commands
aCmd->setEnabled(true);
aObj->setDisplayed(isVisible);
}
Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_OBJECT_TO_REDISPLAY));
+#ifndef WIN32
+ // Necessary for update icons in ObjectBrowser on Linux
+ QModelIndexList aIndexes = mySelector->selection()->selectedIndexes();
+ foreach (QModelIndex aIdx, aIndexes) {
+ if (aIdx.column() == 0) {
+ myObjectBrowser->treeView()->update(aIdx);
+ }
+ }
+#endif
}
//**************************************************************
aObj->setDisplayed(true);
}
Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_OBJECT_TO_REDISPLAY));
+#ifndef WIN32
+ // Necessary for update icons in ObjectBrowser on Linux
+ QModelIndexList aIndexes = mySelector->selection()->selectedIndexes();
+ foreach (QModelIndex aIdx, aIndexes) {
+ if (aIdx.column() == 0) {
+ myObjectBrowser->treeView()->update(aIdx);
+ }
+ }
+#endif
}
Box_13 = model.addBox(Part_1_doc, Vertex_3, Point_2)
Box_14 = model.addBox(Part_1_doc, Point_2, Vertex_3)
Box_15 = model.addBox(Part_1_doc, model.selection("VERTEX", "Sketch_1/Vertex-SketchLine_1s-SketchLine_4e"), model.selection("VERTEX", "Sketch_2/Vertex-SketchLine_7s-SketchLine_6e"))
-Box_16 = model.addBox(Part_1_doc, model.selection("VERTEX", "Extrusion_1_1/Generated_Face_3&Extrusion_1_1/Generated_Face_2&Extrusion_1_1/To_Face_1"), model.selection("VERTEX", "Extrusion_2_1/Generated_Face_2&Extrusion_2_1/Generated_Face_1&Extrusion_2_1/To_Face_1"))
+Box_16 = model.addBox(Part_1_doc, model.selection("VERTEX", "Extrusion_1_1/Generated_Face_2&Extrusion_1_1/Generated_Face_1&Extrusion_1_1/To_Face_1"), model.selection("VERTEX", "Extrusion_2_1/Generated_Face_3&Extrusion_2_1/Generated_Face_2&Extrusion_2_1/To_Face_1"))
Box_17 = model.addBox(Part_1_doc, model.selection("VERTEX", "Vertex_1_1"), model.selection("VERTEX", "Vertex_2_1"))
Box_18 = model.addBox(Part_1_doc, "dx", "dy", "dz")
model.do()
model.do()
Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1f-SketchLine_2f-SketchLine_3f-SketchLine_4f-SketchLine_5f-SketchLine_6f-SketchLine_7f-SketchLine_8f-SketchLine_9f-SketchLine_10f-SketchArc_1_2r-SketchArc_2_2r")], model.selection(), "b/2", "b/2")
Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/To_Face_1"))
-SketchPoint_2 = Sketch_2.addPoint(model.selection("VERTEX", "Extrusion_1_1/Generated_Face_10&Extrusion_1_1/Generated_Face_9&Extrusion_1_1/To_Face_1"))
+SketchPoint_2 = Sketch_2.addPoint(model.selection("VERTEX", "Extrusion_1_1/Generated_Face_3&Extrusion_1_1/Generated_Face_2&Extrusion_1_1/To_Face_1"))
SketchCircle_1 = Sketch_2.addCircle(-15, 35.00000000000001, 25)
SketchConstraintCoincidence_15 = Sketch_2.setCoincident(SketchPoint_2.result(), SketchCircle_1.center())
SketchConstraintCoincidence_15.setName("SketchConstraintCoincidence_16")
ExtrusionCut_1 = model.addExtrusionCut(Part_1_doc, [model.selection("WIRE", "Sketch_2/Wire-SketchCircle_1_2f")], model.selection(), 0, 13, [model.selection("SOLID", "Extrusion_1_1")])
ExtrusionCut_1.result().setName("ExtrusionCut_1_1")
Sketch_3 = model.addSketch(Part_1_doc, model.selection("FACE", "ExtrusionCut_1_1/Modfied_4"))
-SketchPoint_3 = Sketch_3.addPoint(model.selection("VERTEX", "ExtrusionCut_1_1/Modfied_3&ExtrusionCut_1_1/Modfied_2&ExtrusionCut_1_1/Modfied_4"))
-SketchLine_11 = Sketch_3.addLine(model.selection("EDGE", "ExtrusionCut_1_1/Modfied_2&ExtrusionCut_1_1/Modfied_4"))
+SketchPoint_3 = Sketch_3.addPoint(model.selection("VERTEX", "ExtrusionCut_1_1/Modfied_2&ExtrusionCut_1_1/Modfied_3&ExtrusionCut_1_1/Modfied_4"))
+SketchLine_11 = Sketch_3.addLine(model.selection("EDGE", "ExtrusionCut_1_1/Modfied_3&ExtrusionCut_1_1/Modfied_4"))
SketchArc_3 = Sketch_3.addArc(-15, 35.00000000000001, -15, 46.0103340429751, -17.02045759563166, 24.17663606626138, True)
SketchConstraintCoincidence_16 = Sketch_3.setCoincident(SketchPoint_3.result(), SketchArc_3.center())
SketchConstraintCoincidence_16.setName("SketchConstraintCoincidence_17")
SketchConstraintCoincidence_17 = Sketch_3.setCoincident(SketchLine_11.result(), SketchArc_3.startPoint())
SketchConstraintCoincidence_17.setName("SketchConstraintCoincidence_18")
-SketchArc_4 = Sketch_3.addArc(model.selection("EDGE", "ExtrusionCut_1_1/Modfied_3&ExtrusionCut_1_1/Modfied_4"))
+SketchArc_4 = Sketch_3.addArc(model.selection("EDGE", "ExtrusionCut_1_1/Modfied_2&ExtrusionCut_1_1/Modfied_4"))
SketchConstraintCoincidence_18 = Sketch_3.setCoincident(SketchArc_3.endPoint(), SketchArc_4.results()[1])
SketchConstraintCoincidence_18.setName("SketchConstraintCoincidence_19")
SketchLine_12 = Sketch_3.addLine(-15, 46.0103340429751, -15, 35.00000000000001)
ExtrusionFuse_1 = model.addExtrusionFuse(Part_1_doc, [model.selection("FACE", "Sketch_3/Face-SketchArc_3_2f-SketchLine_12f-SketchArc_5_2r")], model.selection(), 5, 0, [model.selection("SOLID", "ExtrusionCut_1_1")])
ExtrusionFuse_1.result().setName("ExtrusionFuse_1_1")
Sketch_4 = model.addSketch(Part_1_doc, model.selection("FACE", "ExtrusionFuse_1_1/To_Face_1"))
-SketchPoint_4 = Sketch_4.addPoint(model.selection("VERTEX", "ExtrusionFuse_1_1/Modfied_5&ExtrusionFuse_1_1/Modfied_4&ExtrusionFuse_1_1/To_Face_1"))
+SketchPoint_4 = Sketch_4.addPoint(model.selection("VERTEX", "ExtrusionFuse_1_1/Modfied_4&ExtrusionFuse_1_1/Modfied_5&ExtrusionFuse_1_1/To_Face_1"))
SketchCircle_2 = Sketch_4.addCircle(-15, 35.00000000000001, 5)
SketchConstraintCoincidence_24 = Sketch_4.setCoincident(SketchPoint_4.result(), SketchCircle_2.center())
SketchConstraintCoincidence_24.setName("SketchConstraintCoincidence_25")
ExtrusionFuse_3 = model.addExtrusionFuse(Part_1_doc, [model.selection("FACE", "Sketch_5/Face-SketchArc_7_2f-SketchArc_8_2r-SketchLine_13r-SketchArc_9_2r")], model.selection(), 0, 8, [model.selection("SOLID", "ExtrusionFuse_2_1")])
ExtrusionFuse_3.result().setName("ExtrusionFuse_3_1")
Sketch_6 = model.addSketch(Part_1_doc, model.selection("FACE", "ExtrusionFuse_3_1/Modfied_3"))
-SketchLine_14 = Sketch_6.addLine(model.selection("EDGE", "ExtrusionFuse_3_1/Modfied_3&Extrusion_1_1/Generated_Face_5"))
+SketchLine_14 = Sketch_6.addLine(model.selection("EDGE", "ExtrusionFuse_3_1/Modfied_3&Extrusion_1_1/Generated_Face_7"))
SketchArc_10 = Sketch_6.addArc(55, 35, 55, 15, 35, 35, True)
SketchConstraintCoincidence_34 = Sketch_6.setCoincident(SketchLine_14.result(), SketchArc_10.center())
SketchConstraintCoincidence_34.setName("SketchConstraintCoincidence_35")
SketchConstraintCoincidence_35 = Sketch_6.setCoincident(SketchLine_14.result(), SketchArc_10.startPoint())
SketchConstraintCoincidence_35.setName("SketchConstraintCoincidence_36")
-SketchLine_15 = Sketch_6.addLine(model.selection("EDGE", "ExtrusionFuse_3_1/Modfied_3&Extrusion_1_1/Generated_Face_4"))
+SketchLine_15 = Sketch_6.addLine(model.selection("EDGE", "ExtrusionFuse_3_1/Modfied_3&Extrusion_1_1/Generated_Face_8"))
SketchConstraintDistance_8 = Sketch_6.setDistance(SketchArc_10.center(), SketchLine_15.result(), 35)
SketchLine_16 = Sketch_6.addLine(35, 35, 35, 48)
SketchConstraintCoincidence_36 = Sketch_6.setCoincident(SketchArc_10.endPoint(), SketchLine_16.startPoint())
ExtrusionCut_2.result().setName("ExtrusionCut_2_1")
Sketch_7 = model.addSketch(Part_1_doc, model.selection("FACE", "ExtrusionCut_2_1/Modfied_4"))
SketchCircle_4 = Sketch_7.addCircle(45, 35, 5)
-SketchLine_20 = Sketch_7.addLine(model.selection("EDGE", "ExtrusionCut_2_1/Modfied_1&ExtrusionCut_2_1/Modfied_4"))
+SketchLine_20 = Sketch_7.addLine(model.selection("EDGE", "ExtrusionCut_2_1/Modfied_2&ExtrusionCut_2_1/Modfied_4"))
SketchConstraintDistance_9 = Sketch_7.setDistance(SketchCircle_4.center(), SketchLine_20.result(), 10)
SketchConstraintRadius_6 = Sketch_7.setRadius(SketchCircle_4.results()[1], "10/2")
SketchLine_21 = Sketch_7.addLine(35, 35, 45, 35)
model.do()
ExtrusionCut_3 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_7/Face-SketchCircle_4_2f")], model.selection(), model.selection(), 0, model.selection("FACE", "Extrusion_1_1/From_Face_1"), 0, [model.selection("SOLID", "ExtrusionCut_2_1")])
ExtrusionCut_3.result().setName("ExtrusionCut_3_1")
-Sketch_8 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_8"))
+Sketch_8 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_4"))
SketchLine_22 = Sketch_8.addLine(55, 25, 5.000000000000002, 25)
SketchLine_23 = Sketch_8.addLine(5.000000000000002, 25, 5.000000000000002, 13)
SketchLine_24 = Sketch_8.addLine(5.000000000000002, 13, 55, 13)
SketchConstraintVertical_8 = Sketch_8.setVertical(SketchLine_25.result())
SketchConstraintLength_2 = Sketch_8.setLength(SketchLine_22.result(), 50)
SketchConstraintLength_3 = Sketch_8.setLength(SketchLine_25.result(), 12)
-SketchProjection_1 = Sketch_8.addProjection(model.selection("EDGE", "ExtrusionCut_2_1/Modfied_1&ExtrusionCut_2_1/Modfied_2"))
+SketchProjection_1 = Sketch_8.addProjection(model.selection("EDGE", "ExtrusionCut_2_1/Modfied_2&ExtrusionCut_2_1/Modfied_1"))
SketchLine_26 = SketchProjection_1.createdFeature()
SketchConstraintCoincidence_48 = Sketch_8.setCoincident(SketchLine_22.startPoint(), SketchLine_26.result())
SketchConstraintCoincidence_48.setName("SketchConstraintCoincidence_49")
-SketchLine_27 = Sketch_8.addLine(model.selection("EDGE", "ExtrusionCut_3_1/Modfied_2&Extrusion_1_1/Generated_Face_8"))
+SketchLine_27 = Sketch_8.addLine(model.selection("EDGE", "ExtrusionCut_3_1/Modfied_2&Extrusion_1_1/Generated_Face_4"))
SketchConstraintCoincidence_49 = Sketch_8.setCoincident(SketchLine_22.startPoint(), SketchLine_27.result())
SketchConstraintCoincidence_49.setName("SketchConstraintCoincidence_50")
model.do()
-ExtrusionCut_4 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_8/Face-SketchLine_22f-SketchLine_23f-SketchLine_24f-SketchLine_25f")], model.selection(), model.selection(), 0, model.selection("FACE", "Extrusion_1_1/Generated_Face_4"), 0, [model.selection("SOLID", "ExtrusionCut_3_1")])
+ExtrusionCut_4 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_8/Face-SketchLine_22f-SketchLine_23f-SketchLine_24f-SketchLine_25f")], model.selection(), model.selection(), 0, model.selection("FACE", "Extrusion_1_1/Generated_Face_8"), 0, [model.selection("SOLID", "ExtrusionCut_3_1")])
ExtrusionCut_4.result().setName("ExtrusionCut_4_1")
Sketch_9 = model.addSketch(Part_1_doc, model.selection("FACE", "ExtrusionFuse_1_1/Modfied_2"))
SketchLine_28 = Sketch_9.addLine(25, -45, 18.44853578320836, -63)
Boolean_6 = model.addCut(Part_1_doc, [model.selection("SOLID", "Boolean_5_1")], [model.selection("SOLID", "Boolean_3_1")])
Boolean_6.result().setName("Boolean_6_1")
Extrusion_8 = model.addExtrusion(Part_1_doc, [model.selection("WIRE", "Sketch_1/Wire-SketchLine_10r-SketchLine_11r-SketchLine_8r-SketchLine_3r-SketchLine_9r-SketchLine_6r-SketchArc_1_2r-SketchArc_2_2f")], model.selection(), 55, 55)
-Sketch_7 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_8_1/Generated_Face_7"))
+Sketch_7 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_8_1/Generated_Face_1"))
SketchLine_54 = Sketch_7.addLine(55, -9.237604307034024, 55, -60)
SketchLine_54.setName("SketchLine_66")
SketchLine_54.result().setName("SketchLine_66")
-SketchPoint_6 = Sketch_7.addPoint(model.selection("VERTEX", "Extrusion_8_1/Generated_Face_7&Extrusion_8_1/Generated_Face_6&Extrusion_8_1/To_Face_1"))
+SketchPoint_6 = Sketch_7.addPoint(model.selection("VERTEX", "Extrusion_8_1/Generated_Face_2&Extrusion_8_1/Generated_Face_1&Extrusion_8_1/To_Face_1"))
SketchLine_55 = Sketch_7.addLine(55, -9.237604307034024, 55, -70)
SketchLine_55.setName("SketchLine_57")
SketchLine_55.result().setName("SketchLine_57")
SketchLine_55.setAuxiliary(True)
SketchConstraintCoincidence_91 = Sketch_7.setCoincident(SketchLine_55.startPoint(), SketchPoint_6.result())
SketchConstraintCoincidence_91.setName("SketchConstraintCoincidence_95")
-SketchPoint_7 = Sketch_7.addPoint(model.selection("VERTEX", "Extrusion_8_1/Generated_Face_8&Extrusion_8_1/Generated_Face_7&Extrusion_8_1/To_Face_1"))
+SketchPoint_7 = Sketch_7.addPoint(model.selection("VERTEX", "Extrusion_8_1/Generated_Face_8&Extrusion_8_1/Generated_Face_1&Extrusion_8_1/To_Face_1"))
SketchConstraintCoincidence_92 = Sketch_7.setCoincident(SketchLine_55.endPoint(), SketchPoint_7.result())
SketchConstraintCoincidence_92.setName("SketchConstraintCoincidence_96")
SketchLine_56 = Sketch_7.addLine(45.00000000000001, -70, -45.00000000000001, -70)
SketchLine_57.setAuxiliary(True)
SketchConstraintCoincidence_93 = Sketch_7.setCoincident(SketchLine_55.endPoint(), SketchLine_57.startPoint())
SketchConstraintCoincidence_93.setName("SketchConstraintCoincidence_97")
-SketchPoint_8 = Sketch_7.addPoint(model.selection("VERTEX", "Extrusion_8_1/Generated_Face_8&Extrusion_8_1/Generated_Face_7&Extrusion_8_1/From_Face_1"))
+SketchPoint_8 = Sketch_7.addPoint(model.selection("VERTEX", "Extrusion_8_1/Generated_Face_8&Extrusion_8_1/Generated_Face_1&Extrusion_8_1/From_Face_1"))
SketchConstraintCoincidence_94 = Sketch_7.setCoincident(SketchLine_57.endPoint(), SketchPoint_8.result())
SketchConstraintCoincidence_94.setName("SketchConstraintCoincidence_98")
SketchLine_58 = Sketch_7.addLine(-55.00000000000001, -59.99999999999999, -55, -9.237604307034024)
SketchLine_59.setAuxiliary(True)
SketchConstraintCoincidence_95 = Sketch_7.setCoincident(SketchLine_57.endPoint(), SketchLine_59.startPoint())
SketchConstraintCoincidence_95.setName("SketchConstraintCoincidence_99")
-SketchPoint_9 = Sketch_7.addPoint(model.selection("VERTEX", "Extrusion_8_1/Generated_Face_7&Extrusion_8_1/Generated_Face_6&Extrusion_8_1/From_Face_1"))
+SketchPoint_9 = Sketch_7.addPoint(model.selection("VERTEX", "Extrusion_8_1/Generated_Face_2&Extrusion_8_1/Generated_Face_1&Extrusion_8_1/From_Face_1"))
SketchConstraintCoincidence_96 = Sketch_7.setCoincident(SketchLine_59.endPoint(), SketchPoint_9.result())
SketchConstraintCoincidence_96.setName("SketchConstraintCoincidence_100")
SketchLine_60 = Sketch_7.addLine(-55, -9.237604307034024, -61.32702426187202, -9.237604307034024)
SketchCircle_7 = Sketch_7.addCircle(-44, -20.23760430703402, 5)
SketchConstraintRadius_16 = Sketch_7.setRadius(SketchCircle_7.results()[1], 5)
SketchConstraintDistance_31 = Sketch_7.setDistance(SketchCircle_6.center(), SketchLine_54.result(), 11)
-SketchLine_66 = Sketch_7.addLine(model.selection("EDGE", "Extrusion_8_1/Generated_Face_7&Extrusion_8_1/Generated_Face_6"))
+SketchLine_66 = Sketch_7.addLine(model.selection("EDGE", "Extrusion_8_1/Generated_Face_2&Extrusion_8_1/Generated_Face_1"))
SketchLine_66.setName("SketchLine_69")
SketchLine_66.result().setName("SketchLine_69")
SketchConstraintDistance_32 = Sketch_7.setDistance(SketchCircle_6.center(), SketchLine_66.result(), 11)
model.do()
ExtrusionCut_1 = model.addExtrusionCut(Part_1_doc, [model.selection("WIRE", "Sketch_7/Wire-SketchLine_66f-SketchLine_67f-SketchLine_68f-SketchLine_60f-SketchLine_61f-SketchLine_62f-SketchLine_63f-SketchLine_64f-SketchArc_14_2r-SketchArc_15_2r"), model.selection("FACE", "Sketch_7/Face-SketchCircle_4_2f"), model.selection("FACE", "Sketch_7/Face-SketchCircle_5_2f"), model.selection("FACE", "Sketch_7/Face-SketchCircle_7_2f"), model.selection("FACE", "Sketch_7/Face-SketchCircle_6_2f")], model.selection(), 0, 10, [model.selection("SOLID", "Extrusion_8_1")])
ExtrusionCut_1.result().setName("ExtrusionCut_1_1")
-Sketch_8 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_8_1/Generated_Face_5"))
+Sketch_8 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_8_1/Generated_Face_3"))
SketchLine_67 = Sketch_8.addLine(55, -34.06366588218793, 55, 66.69872981077805)
SketchLine_67.setName("SketchLine_79")
SketchLine_67.result().setName("SketchLine_79")
-SketchPoint_10 = Sketch_8.addPoint(model.selection("VERTEX", "ExtrusionCut_1_1/Modfied_6&ExtrusionCut_1_1/Modfied_1&Extrusion_8_1/Generated_Face_5"))
+SketchPoint_10 = Sketch_8.addPoint(model.selection("VERTEX", "ExtrusionCut_1_1/Modfied_6&ExtrusionCut_1_1/Modfied_1&Extrusion_8_1/Generated_Face_3"))
SketchLine_68 = Sketch_8.addLine(55, -34.06366588218793, 55, 76.69872981077803)
SketchLine_68.setName("SketchLine_70")
SketchLine_68.result().setName("SketchLine_70")
SketchLine_68.setAuxiliary(True)
SketchConstraintCoincidence_116 = Sketch_8.setCoincident(SketchLine_68.startPoint(), SketchPoint_10.result())
SketchConstraintCoincidence_116.setName("SketchConstraintCoincidence_120")
-SketchPoint_11 = Sketch_8.addPoint(model.selection("VERTEX", "ExtrusionCut_1_1/Modfied_1&Extrusion_8_1/Generated_Face_5&Extrusion_8_1/Generated_Face_4"))
+SketchPoint_11 = Sketch_8.addPoint(model.selection("VERTEX", "ExtrusionCut_1_1/Modfied_1&Extrusion_8_1/Generated_Face_3&Extrusion_8_1/Generated_Face_4"))
SketchConstraintCoincidence_117 = Sketch_8.setCoincident(SketchLine_68.endPoint(), SketchPoint_11.result())
SketchConstraintCoincidence_117.setName("SketchConstraintCoincidence_121")
SketchLine_69 = Sketch_8.addLine(45, 76.69872981077805, -44.9999999570576, 76.69872981077805)
SketchLine_70.setAuxiliary(True)
SketchConstraintCoincidence_118 = Sketch_8.setCoincident(SketchLine_68.endPoint(), SketchLine_70.startPoint())
SketchConstraintCoincidence_118.setName("SketchConstraintCoincidence_122")
-SketchPoint_12 = Sketch_8.addPoint(model.selection("VERTEX", "ExtrusionCut_1_1/Modfied_3&Extrusion_8_1/Generated_Face_5&Extrusion_8_1/Generated_Face_4"))
+SketchPoint_12 = Sketch_8.addPoint(model.selection("VERTEX", "ExtrusionCut_1_1/Modfied_3&Extrusion_8_1/Generated_Face_3&Extrusion_8_1/Generated_Face_4"))
SketchConstraintCoincidence_119 = Sketch_8.setCoincident(SketchLine_70.endPoint(), SketchPoint_12.result())
SketchConstraintCoincidence_119.setName("SketchConstraintCoincidence_123")
SketchLine_71 = Sketch_8.addLine(-55, 66.69872976783566, -55, -34.06366588218793)
SketchLine_72.setAuxiliary(True)
SketchConstraintCoincidence_120 = Sketch_8.setCoincident(SketchLine_70.endPoint(), SketchLine_72.startPoint())
SketchConstraintCoincidence_120.setName("SketchConstraintCoincidence_124")
-SketchPoint_13 = Sketch_8.addPoint(model.selection("VERTEX", "ExtrusionCut_1_1/Modfied_6&ExtrusionCut_1_1/Modfied_3&Extrusion_8_1/Generated_Face_5"))
+SketchPoint_13 = Sketch_8.addPoint(model.selection("VERTEX", "ExtrusionCut_1_1/Modfied_6&ExtrusionCut_1_1/Modfied_3&Extrusion_8_1/Generated_Face_3"))
SketchConstraintCoincidence_121 = Sketch_8.setCoincident(SketchLine_72.endPoint(), SketchPoint_13.result())
SketchConstraintCoincidence_121.setName("SketchConstraintCoincidence_125")
SketchLine_73 = Sketch_8.addLine(-55, -34.06366588218793, -83.25521566485324, -34.06366588218793)
SketchConstraintCoincidence_10.setName("SketchConstraintCoincidence_35")
model.do()
Revolution_1 = model.addRevolution(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1r-SketchLine_2r-SketchLine_4r-SketchArc_1_2f-SketchArc_2_2f-SketchLine_28r-SketchLine_29r")], model.selection("EDGE", "PartSet/OZ"), 360, 0)
-Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Revolution_1_1/Generated_Face_5"))
+Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Revolution_1_1/Generated_Face_2"))
SketchLine_8 = Sketch_2.addLine(0, 0, 25, 43.30127018922193)
SketchLine_8.setName("SketchLine_5")
SketchLine_8.result().setName("SketchLine_5")
SketchLine_8.setAuxiliary(True)
SketchPoint_3 = Sketch_2.addPoint(model.selection("VERTEX", "PartSet/Origin"))
SketchConstraintCoincidence_11 = Sketch_2.setCoincident(SketchLine_8.startPoint(), SketchPoint_3.result())
-SketchCircle_1 = Sketch_2.addCircle(model.selection("EDGE", "Revolution_1_1/Generated_Face_6&Revolution_1_1/Generated_Face_5"))
+SketchCircle_1 = Sketch_2.addCircle(model.selection("EDGE", "Revolution_1_1/Generated_Face_2&Revolution_1_1/Generated_Face_1"))
SketchConstraintCoincidence_12 = Sketch_2.setCoincident(SketchLine_8.endPoint(), SketchCircle_1.results()[1])
SketchLine_9 = Sketch_2.addLine(39.43375672974064, -43.30127018922192, 15.87711932209923, -2.499977343709401)
SketchLine_9.setName("SketchLine_10")
SketchLine_10.result().setName("SketchLine_6")
SketchLine_10.setAuxiliary(True)
SketchConstraintCoincidence_13 = Sketch_2.setCoincident(SketchLine_10.startPoint(), SketchPoint_3.result())
-SketchCircle_2 = Sketch_2.addCircle(model.selection("EDGE", "Revolution_1_1/Generated_Face_6&Revolution_1_1/Generated_Face_5"))
+SketchCircle_2 = Sketch_2.addCircle(model.selection("EDGE", "Revolution_1_1/Generated_Face_2&Revolution_1_1/Generated_Face_1"))
SketchConstraintCoincidence_14 = Sketch_2.setCoincident(SketchLine_10.endPoint(), SketchCircle_2.results()[1])
SketchLine_11 = Sketch_2.addLine(15.87713238415337, 2.499999967850816, 39.43375672974065, 43.30127018922192)
SketchLine_12 = Sketch_2.addLine(model.selection("EDGE", "PartSet/OX"))
SketchConstraintDistance_9 = Sketch_2.setDistance(SketchArc_9.center(), SketchPoint_3.coordinates(), 21)
SketchConstraintDistance_9.setName("SketchConstraintDistance_8")
model.do()
-Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("WIRE", "Sketch_2/Wire-SketchLine_10r-SketchLine_11r-SketchArc_3_2f-SketchArc_4_2f"), model.selection("WIRE", "Sketch_2/Wire-SketchLine_14r-SketchArc_7_2f-SketchLine_15r-SketchArc_8_2f"), model.selection("FACE", "Sketch_2/Face-SketchLine_12r-SketchArc_5_2f-SketchLine_13r-SketchArc_6_2f"), model.selection("FACE", "Sketch_2/Face-SketchLine_19f-SketchLine_20f-SketchLine_21f-SketchArc_10_2f"), model.selection("FACE", "Sketch_2/Face-SketchLine_16f-SketchLine_17f-SketchLine_18f-SketchArc_9_2f"), model.selection("WIRE", "Sketch_2/Wire-SketchLine_22f-SketchLine_23f-SketchLine_24f-SketchArc_11_2f")], model.selection(), model.selection(), 10, model.selection("FACE", "Revolution_1_1/Generated_Face_2"), 10)
+Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("WIRE", "Sketch_2/Wire-SketchLine_10r-SketchLine_11r-SketchArc_3_2f-SketchArc_4_2f"), model.selection("WIRE", "Sketch_2/Wire-SketchLine_14r-SketchArc_7_2f-SketchLine_15r-SketchArc_8_2f"), model.selection("FACE", "Sketch_2/Face-SketchLine_12r-SketchArc_5_2f-SketchLine_13r-SketchArc_6_2f"), model.selection("FACE", "Sketch_2/Face-SketchLine_19f-SketchLine_20f-SketchLine_21f-SketchArc_10_2f"), model.selection("FACE", "Sketch_2/Face-SketchLine_16f-SketchLine_17f-SketchLine_18f-SketchArc_9_2f"), model.selection("WIRE", "Sketch_2/Wire-SketchLine_22f-SketchLine_23f-SketchLine_24f-SketchArc_11_2f")], model.selection(), model.selection(), 10, model.selection("FACE", "Revolution_1_1/Generated_Face_5"), 10)
Boolean_1 = model.addCut(Part_1_doc, [model.selection("SOLID", "Revolution_1_1")], [model.selection("SOLID", "Extrusion_1_1"), model.selection("SOLID", "Extrusion_1_4"), model.selection("SOLID", "Extrusion_1_5")])
Boolean_1.result().setName("Boolean_1_1")
Boolean_2 = model.addCut(Part_1_doc, [model.selection("SOLID", "Boolean_1_1")], [model.selection("SOLID", "Extrusion_1_2"), model.selection("SOLID", "Extrusion_1_3"), model.selection("SOLID", "Extrusion_1_6")])
SketchConstraintDistance_35 = Sketch_10.setDistance(SketchLine_98.endPoint(), SketchLine_99.result(), "Thickness")
model.do()
Revolution_2 = model.addRevolution(Part_5_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1r-SketchLine_2r-SketchLine_3r-SketchLine_4r-SketchLine_5r-SketchLine_6r")], model.selection("EDGE", "Sketch_1/Edge-SketchLine_6"), 360, 0)
-Sketch_11 = model.addSketch(Part_5_doc, model.selection("FACE", "Revolution_1_1/Generated_Face_5"))
+Sketch_11 = model.addSketch(Part_5_doc, model.selection("FACE", "Revolution_1_1/Generated_Face_1"))
SketchCircle_14 = Sketch_11.addCircle(0, 0, 8.5)
SketchCircle_14.setAuxiliary(True)
SketchPoint_8 = Sketch_11.addPoint(model.selection("VERTEX", "Sketch_1/Vertex-SketchLine_1s-SketchLine_6e"))
SketchConstraintHorizontal_20 = Sketch_12.setHorizontal(SketchLine_107.result())
SketchConstraintVertical_20 = Sketch_12.setVertical(SketchLine_106.result())
SketchConstraintAngle_8 = Sketch_12.setAngle(SketchLine_108.result(), SketchLine_107.result(), 30)
-SketchLine_109 = Sketch_12.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_4&Extrusion_1_1/Generated_Face_3"))
+SketchLine_109 = Sketch_12.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_2&Extrusion_1_1/Generated_Face_3"))
SketchConstraintCoincidence_249 = Sketch_12.setCoincident(SketchLine_108.endPoint(), SketchLine_109.result())
SketchProjection_2 = Sketch_12.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_3&Extrusion_1_1/To_Face_1"))
SketchLine_110 = SketchProjection_2.createdFeature()
SketchConstraintDistance_13 = Sketch_3.setDistance(SketchCircle_4.center(), SketchLine_379.result(), 15)
model.do()
Revolution_1 = model.addRevolution(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1f-SketchLine_2f-SketchLine_3f-SketchLine_4f-SketchLine_5f-SketchLine_6f-SketchLine_8f-SketchLine_9f-SketchLine_11f-SketchLine_12f-SketchLine_13f-SketchLine_14f")], model.selection("EDGE", "PartSet/OX"), 360, 0)
-ExtrusionCut_1 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_2/Face-SketchArc_1_2r-SketchLine_382f-SketchLine_383f-SketchLine_20f-SketchArc_2_2r-SketchLine_21f-SketchLine_22f-SketchLine_23f-SketchLine_24f-SketchLine_25f-SketchLine_26f-SketchLine_27f-SketchLine_28f-SketchLine_29f-SketchLine_30f-SketchLine_31f-SketchLine_32f-SketchLine_33f-SketchLine_34f-SketchLine_35f-SketchLine_36f-SketchLine_37f-SketchLine_38f-SketchLine_39f-SketchLine_40f-SketchLine_41f-SketchLine_42f-SketchLine_43f-SketchLine_44f-SketchLine_45f-SketchLine_46f-SketchLine_47f-SketchLine_48f-SketchLine_49f-SketchLine_50f-SketchLine_51f-SketchLine_52f-SketchLine_53f-SketchLine_54f-SketchLine_55f-SketchLine_56f-SketchLine_57f-SketchLine_58f-SketchLine_59f-SketchLine_60f-SketchLine_61f-SketchLine_62f-SketchLine_63f-SketchLine_64f-SketchLine_65f-SketchLine_66f-SketchLine_67f-SketchLine_68f-SketchLine_69f-SketchLine_70f-SketchLine_71f-SketchLine_72f-SketchLine_73f-SketchLine_74f-SketchLine_75f-SketchLine_76f-SketchLine_77f-SketchLine_78f-SketchLine_79f-SketchLine_80f-SketchLine_81f-SketchLine_82f-SketchLine_83f-SketchLine_84f-SketchLine_85f-SketchLine_86f-SketchLine_87f-SketchLine_88f-SketchLine_89f-SketchLine_90f-SketchLine_91f-SketchLine_92f-SketchLine_93f-SketchLine_94f-SketchLine_95f-SketchLine_96f-SketchLine_97f-SketchLine_98f-SketchLine_99f-SketchLine_100f-SketchLine_101f-SketchLine_102f-SketchLine_103f-SketchLine_104f-SketchLine_105f-SketchLine_106f-SketchLine_107f-SketchLine_108f-SketchLine_109f-SketchLine_110f-SketchLine_111f-SketchLine_112f-SketchLine_113f-SketchLine_114f-SketchLine_115f-SketchLine_116f-SketchLine_117f-SketchLine_118f-SketchLine_119f-SketchLine_120f-SketchLine_121f-SketchLine_122f-SketchLine_123f-SketchLine_124f-SketchLine_125f-SketchLine_126f-SketchLine_127f-SketchLine_128f-SketchLine_129f-SketchLine_130f-SketchLine_131f-SketchLine_132f-SketchLine_133f-SketchLine_134f-SketchLine_135f-SketchLine_136f-SketchLine_137f-SketchLine_138f-SketchLine_139f-SketchLine_140f-SketchLine_141f-SketchLine_142f-SketchLine_143f-SketchLine_144f-SketchLine_145f-SketchLine_146f-SketchLine_147f-SketchLine_148f-SketchLine_149f-SketchLine_150f-SketchLine_151f-SketchLine_152f-SketchLine_153f-SketchLine_154f-SketchLine_155f-SketchLine_156f-SketchLine_157f-SketchLine_158f-SketchLine_159f-SketchLine_160f-SketchLine_161f-SketchLine_162f-SketchLine_163f-SketchLine_164f-SketchLine_165f-SketchLine_166f-SketchLine_167f-SketchLine_168f-SketchLine_169f-SketchLine_170f-SketchLine_171f-SketchLine_172f-SketchLine_173f-SketchLine_174f-SketchLine_175f-SketchLine_176f-SketchLine_177f-SketchLine_178f-SketchLine_179f-SketchLine_180f-SketchLine_181f-SketchLine_182f-SketchLine_183f-SketchLine_184f-SketchLine_185f-SketchLine_186f-SketchLine_187f-SketchLine_188f-SketchLine_189f-SketchLine_190f-SketchLine_191f-SketchLine_192f-SketchLine_193f-SketchLine_194f-SketchLine_195f-SketchLine_196f-SketchLine_197f-SketchLine_198f-SketchLine_199f-SketchArc_3_2r-SketchArc_4_2r-SketchArc_5_2r-SketchArc_6_2r-SketchArc_7_2r-SketchArc_8_2r-SketchArc_9_2r-SketchArc_10_2r-SketchArc_11_2r-SketchArc_12_2r-SketchArc_13_2r-SketchArc_14_2r-SketchArc_15_2r-SketchArc_16_2r-SketchArc_17_2r-SketchArc_18_2r-SketchArc_19_2r-SketchArc_20_2r-SketchArc_21_2r-SketchArc_22_2r-SketchArc_23_2r-SketchArc_24_2r-SketchArc_25_2r-SketchArc_26_2r-SketchArc_27_2r-SketchArc_28_2r-SketchArc_29_2r-SketchArc_30_2r-SketchArc_31_2r-SketchArc_32_2r-SketchArc_33_2r-SketchArc_34_2r-SketchArc_35_2r-SketchArc_36_2r-SketchArc_37_2r-SketchArc_38_2r-SketchArc_39_2r-SketchArc_40_2r-SketchArc_41_2r-SketchArc_42_2r-SketchArc_43_2r-SketchArc_44_2r-SketchArc_45_2r-SketchArc_46_2r-SketchArc_47_2r-SketchArc_48_2r-SketchArc_49_2r-SketchArc_50_2r-SketchArc_51_2r-SketchArc_52_2r-SketchArc_53_2r-SketchArc_54_2r-SketchArc_55_2r-SketchArc_56_2r-SketchArc_57_2r-SketchArc_58_2r-SketchArc_59_2r-SketchArc_60_2r-SketchArc_61_2r-SketchArc_62_2r-SketchArc_63_2r-SketchArc_64_2r-SketchArc_65_2r-SketchArc_66_2r-SketchArc_67_2r-SketchArc_68_2r-SketchArc_69_2r-SketchArc_70_2r-SketchArc_71_2r-SketchArc_72_2r-SketchArc_73_2r-SketchArc_74_2r-SketchArc_75_2r-SketchArc_76_2r-SketchArc_77_2r-SketchArc_78_2r-SketchArc_79_2r-SketchArc_80_2r-SketchArc_81_2r-SketchArc_82_2r-SketchArc_83_2r-SketchArc_84_2r-SketchArc_85_2r-SketchArc_86_2r-SketchArc_87_2r-SketchArc_88_2r-SketchArc_89_2r-SketchArc_90_2r-SketchArc_91_2r-SketchArc_92_2r-SketchArc_93_2r-SketchArc_94_2r-SketchArc_95_2r-SketchArc_96_2r-SketchArc_97_2r-SketchArc_98_2r-SketchArc_99_2r-SketchArc_100_2r-SketchArc_101_2r-SketchArc_102_2r-SketchArc_103_2r-SketchArc_104_2r-SketchArc_105_2r-SketchArc_106_2r-SketchArc_107_2r-SketchArc_108_2r-SketchArc_109_2r-SketchArc_110_2r-SketchArc_111_2r-SketchArc_112_2r-SketchArc_113_2r-SketchArc_114_2r-SketchArc_115_2r-SketchArc_116_2r-SketchArc_117_2r-SketchArc_118_2r-SketchArc_119_2r-SketchArc_120_2r-SketchArc_121_2r-SketchArc_122_2r-SketchArc_123_2r-SketchArc_124_2r-SketchArc_125_2r-SketchArc_126_2r-SketchArc_127_2r-SketchArc_128_2r-SketchArc_129_2r-SketchArc_130_2r-SketchArc_131_2r-SketchArc_132_2r-SketchArc_133_2r-SketchArc_134_2r-SketchArc_135_2r-SketchArc_136_2r-SketchArc_137_2r-SketchArc_138_2r-SketchArc_139_2r-SketchArc_140_2r-SketchArc_141_2r-SketchArc_142_2r-SketchArc_143_2r-SketchArc_144_2r-SketchArc_145_2r-SketchArc_146_2r-SketchArc_147_2r-SketchArc_148_2r-SketchArc_149_2r-SketchArc_150_2r-SketchArc_151_2r-SketchArc_152_2r-SketchArc_153_2r-SketchArc_154_2r-SketchArc_155_2r-SketchArc_156_2r-SketchArc_157_2r-SketchArc_158_2r-SketchArc_159_2r-SketchArc_160_2r-SketchArc_161_2r-SketchArc_162_2r-SketchArc_163_2r-SketchArc_164_2r-SketchArc_165_2r-SketchArc_166_2r-SketchArc_167_2r-SketchArc_168_2r-SketchArc_169_2r-SketchArc_170_2r-SketchArc_171_2r-SketchArc_172_2r-SketchArc_173_2r-SketchArc_174_2r-SketchArc_175_2r-SketchArc_176_2r-SketchArc_177_2r-SketchArc_178_2r-SketchArc_179_2r-SketchArc_180_2r-SketchLine_200f-SketchLine_201f-SketchLine_202f-SketchLine_203f-SketchLine_204f-SketchLine_205f-SketchLine_206f-SketchLine_207f-SketchLine_208f-SketchLine_209f-SketchLine_210f-SketchLine_211f-SketchLine_212f-SketchLine_213f-SketchLine_214f-SketchLine_215f-SketchLine_216f-SketchLine_217f-SketchLine_218f-SketchLine_219f-SketchLine_220f-SketchLine_221f-SketchLine_222f-SketchLine_223f-SketchLine_224f-SketchLine_225f-SketchLine_226f-SketchLine_227f-SketchLine_228f-SketchLine_229f-SketchLine_230f-SketchLine_231f-SketchLine_232f-SketchLine_233f-SketchLine_234f-SketchLine_235f-SketchLine_236f-SketchLine_237f-SketchLine_238f-SketchLine_239f-SketchLine_240f-SketchLine_241f-SketchLine_242f-SketchLine_243f-SketchLine_244f-SketchLine_245f-SketchLine_246f-SketchLine_247f-SketchLine_248f-SketchLine_249f-SketchLine_250f-SketchLine_251f-SketchLine_252f-SketchLine_253f-SketchLine_254f-SketchLine_255f-SketchLine_256f-SketchLine_257f-SketchLine_258f-SketchLine_259f-SketchLine_260f-SketchLine_261f-SketchLine_262f-SketchLine_263f-SketchLine_264f-SketchLine_265f-SketchLine_266f-SketchLine_267f-SketchLine_268f-SketchLine_269f-SketchLine_270f-SketchLine_271f-SketchLine_272f-SketchLine_273f-SketchLine_274f-SketchLine_275f-SketchLine_276f-SketchLine_277f-SketchLine_278f-SketchLine_279f-SketchLine_280f-SketchLine_281f-SketchLine_282f-SketchLine_283f-SketchLine_284f-SketchLine_285f-SketchLine_286f-SketchLine_287f-SketchLine_288f-SketchLine_289f-SketchLine_290f-SketchLine_291f-SketchLine_292f-SketchLine_293f-SketchLine_294f-SketchLine_295f-SketchLine_296f-SketchLine_297f-SketchLine_298f-SketchLine_299f-SketchLine_300f-SketchLine_301f-SketchLine_302f-SketchLine_303f-SketchLine_304f-SketchLine_305f-SketchLine_306f-SketchLine_307f-SketchLine_308f-SketchLine_309f-SketchLine_310f-SketchLine_311f-SketchLine_312f-SketchLine_313f-SketchLine_314f-SketchLine_315f-SketchLine_316f-SketchLine_317f-SketchLine_318f-SketchLine_319f-SketchLine_320f-SketchLine_321f-SketchLine_322f-SketchLine_323f-SketchLine_324f-SketchLine_325f-SketchLine_326f-SketchLine_327f-SketchLine_328f-SketchLine_329f-SketchLine_330f-SketchLine_331f-SketchLine_332f-SketchLine_333f-SketchLine_334f-SketchLine_335f-SketchLine_336f-SketchLine_337f-SketchLine_338f-SketchLine_339f-SketchLine_340f-SketchLine_341f-SketchLine_342f-SketchLine_343f-SketchLine_344f-SketchLine_345f-SketchLine_346f-SketchLine_347f-SketchLine_348f-SketchLine_349f-SketchLine_350f-SketchLine_351f-SketchLine_352f-SketchLine_353f-SketchLine_354f-SketchLine_355f-SketchLine_356f-SketchLine_357f-SketchLine_358f-SketchLine_359f-SketchLine_360f-SketchLine_361f-SketchLine_362f-SketchLine_363f-SketchLine_364f-SketchLine_365f-SketchLine_366f-SketchLine_367f-SketchLine_368f-SketchLine_369f-SketchLine_370f-SketchLine_371f-SketchLine_372f-SketchLine_373f-SketchLine_374f-SketchLine_375f-SketchLine_376f-SketchLine_377f-SketchCircle_3_2f")], model.selection(), model.selection("FACE", "Revolution_1_1/Generated_Face_7"), 0, model.selection(), 0, [model.selection("SOLID", "Revolution_1_1")])
+ExtrusionCut_1 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_2/Face-SketchArc_1_2r-SketchLine_382f-SketchLine_383f-SketchLine_20f-SketchLine_22f-SketchLine_23f-SketchLine_24f-SketchLine_25f-SketchLine_26f-SketchLine_27f-SketchLine_28f-SketchLine_29f-SketchLine_30f-SketchLine_31f-SketchLine_32f-SketchLine_33f-SketchLine_34f-SketchLine_35f-SketchLine_36f-SketchLine_37f-SketchLine_38f-SketchLine_39f-SketchLine_40f-SketchLine_41f-SketchLine_42f-SketchLine_43f-SketchLine_44f-SketchLine_45f-SketchLine_46f-SketchLine_47f-SketchLine_48f-SketchLine_49f-SketchLine_50f-SketchLine_51f-SketchLine_52f-SketchLine_53f-SketchLine_54f-SketchLine_55f-SketchLine_56f-SketchLine_57f-SketchLine_58f-SketchLine_59f-SketchLine_60f-SketchLine_61f-SketchLine_62f-SketchLine_63f-SketchLine_64f-SketchLine_65f-SketchLine_66f-SketchLine_67f-SketchLine_68f-SketchLine_69f-SketchLine_70f-SketchLine_71f-SketchLine_72f-SketchLine_73f-SketchLine_74f-SketchLine_75f-SketchLine_76f-SketchLine_77f-SketchLine_78f-SketchLine_79f-SketchLine_80f-SketchLine_81f-SketchLine_82f-SketchLine_83f-SketchLine_84f-SketchLine_85f-SketchLine_86f-SketchLine_87f-SketchLine_88f-SketchLine_89f-SketchLine_90f-SketchLine_91f-SketchLine_92f-SketchLine_93f-SketchLine_94f-SketchLine_95f-SketchLine_96f-SketchLine_97f-SketchLine_98f-SketchLine_99f-SketchLine_100f-SketchLine_101f-SketchLine_102f-SketchLine_103f-SketchLine_104f-SketchLine_105f-SketchLine_106f-SketchLine_107f-SketchLine_108f-SketchLine_109f-SketchLine_110f-SketchLine_111f-SketchLine_112f-SketchLine_113f-SketchLine_114f-SketchLine_115f-SketchLine_116f-SketchLine_117f-SketchLine_118f-SketchLine_119f-SketchLine_120f-SketchLine_121f-SketchLine_122f-SketchLine_123f-SketchLine_124f-SketchLine_125f-SketchLine_126f-SketchLine_127f-SketchLine_128f-SketchLine_129f-SketchLine_130f-SketchLine_131f-SketchLine_132f-SketchLine_133f-SketchLine_134f-SketchLine_135f-SketchLine_136f-SketchLine_137f-SketchLine_138f-SketchLine_139f-SketchLine_140f-SketchLine_141f-SketchLine_142f-SketchLine_143f-SketchLine_144f-SketchLine_145f-SketchLine_146f-SketchLine_147f-SketchLine_148f-SketchLine_149f-SketchLine_150f-SketchLine_151f-SketchLine_152f-SketchLine_153f-SketchLine_154f-SketchLine_155f-SketchLine_156f-SketchLine_157f-SketchLine_158f-SketchLine_159f-SketchLine_160f-SketchLine_161f-SketchLine_162f-SketchLine_163f-SketchLine_164f-SketchLine_165f-SketchLine_166f-SketchLine_167f-SketchLine_168f-SketchLine_169f-SketchLine_170f-SketchLine_171f-SketchLine_172f-SketchLine_173f-SketchLine_174f-SketchLine_175f-SketchLine_176f-SketchLine_177f-SketchLine_178f-SketchLine_179f-SketchLine_180f-SketchLine_181f-SketchLine_182f-SketchLine_183f-SketchLine_184f-SketchLine_185f-SketchLine_186f-SketchLine_187f-SketchLine_188f-SketchLine_189f-SketchLine_190f-SketchLine_191f-SketchLine_192f-SketchLine_193f-SketchLine_194f-SketchLine_195f-SketchLine_196f-SketchLine_197f-SketchLine_198f-SketchLine_199f-SketchArc_2_2r-SketchArc_3_2r-SketchArc_4_2r-SketchArc_5_2r-SketchArc_6_2r-SketchArc_7_2r-SketchArc_8_2r-SketchArc_9_2r-SketchArc_10_2r-SketchArc_11_2r-SketchArc_12_2r-SketchArc_13_2r-SketchArc_14_2r-SketchArc_15_2r-SketchArc_16_2r-SketchArc_17_2r-SketchArc_18_2r-SketchArc_19_2r-SketchArc_20_2r-SketchArc_21_2r-SketchArc_22_2r-SketchArc_23_2r-SketchArc_24_2r-SketchArc_25_2r-SketchArc_26_2r-SketchArc_27_2r-SketchArc_28_2r-SketchArc_29_2r-SketchArc_30_2r-SketchArc_31_2r-SketchArc_32_2r-SketchArc_33_2r-SketchArc_34_2r-SketchArc_35_2r-SketchArc_36_2r-SketchArc_37_2r-SketchArc_38_2r-SketchArc_39_2r-SketchArc_40_2r-SketchArc_41_2r-SketchArc_42_2r-SketchArc_43_2r-SketchArc_44_2r-SketchArc_45_2r-SketchArc_46_2r-SketchArc_47_2r-SketchArc_48_2r-SketchArc_49_2r-SketchArc_50_2r-SketchArc_51_2r-SketchArc_52_2r-SketchArc_53_2r-SketchArc_54_2r-SketchArc_55_2r-SketchArc_56_2r-SketchArc_57_2r-SketchArc_58_2r-SketchArc_59_2r-SketchArc_60_2r-SketchArc_61_2r-SketchArc_62_2r-SketchArc_63_2r-SketchArc_64_2r-SketchArc_65_2r-SketchArc_66_2r-SketchArc_67_2r-SketchArc_68_2r-SketchArc_69_2r-SketchArc_70_2r-SketchArc_71_2r-SketchArc_72_2r-SketchArc_73_2r-SketchArc_74_2r-SketchArc_75_2r-SketchArc_76_2r-SketchArc_77_2r-SketchArc_78_2r-SketchArc_79_2r-SketchArc_80_2r-SketchArc_81_2r-SketchArc_82_2r-SketchArc_83_2r-SketchArc_84_2r-SketchArc_85_2r-SketchArc_86_2r-SketchArc_87_2r-SketchArc_88_2r-SketchArc_89_2r-SketchArc_90_2r-SketchArc_91_2r-SketchArc_92_2r-SketchArc_93_2r-SketchArc_94_2r-SketchArc_95_2r-SketchArc_96_2r-SketchArc_97_2r-SketchArc_98_2r-SketchArc_99_2r-SketchArc_100_2r-SketchArc_101_2r-SketchArc_102_2r-SketchArc_103_2r-SketchArc_104_2r-SketchArc_105_2r-SketchArc_106_2r-SketchArc_107_2r-SketchArc_108_2r-SketchArc_109_2r-SketchArc_110_2r-SketchArc_111_2r-SketchArc_112_2r-SketchArc_113_2r-SketchArc_114_2r-SketchArc_115_2r-SketchArc_116_2r-SketchArc_117_2r-SketchArc_118_2r-SketchArc_119_2r-SketchArc_120_2r-SketchArc_121_2r-SketchArc_122_2r-SketchArc_123_2r-SketchArc_124_2r-SketchArc_125_2r-SketchArc_126_2r-SketchArc_127_2r-SketchArc_128_2r-SketchArc_129_2r-SketchArc_130_2r-SketchArc_131_2r-SketchArc_132_2r-SketchArc_133_2r-SketchArc_134_2r-SketchArc_135_2r-SketchArc_136_2r-SketchArc_137_2r-SketchArc_138_2r-SketchArc_139_2r-SketchArc_140_2r-SketchArc_141_2r-SketchArc_142_2r-SketchArc_143_2r-SketchArc_144_2r-SketchArc_145_2r-SketchArc_146_2r-SketchArc_147_2r-SketchArc_148_2r-SketchArc_149_2r-SketchArc_150_2r-SketchArc_151_2r-SketchArc_152_2r-SketchArc_153_2r-SketchArc_154_2r-SketchArc_155_2r-SketchArc_156_2r-SketchArc_157_2r-SketchArc_158_2r-SketchArc_159_2r-SketchArc_160_2r-SketchArc_161_2r-SketchArc_162_2r-SketchArc_163_2r-SketchArc_164_2r-SketchArc_165_2r-SketchArc_166_2r-SketchArc_167_2r-SketchArc_168_2r-SketchArc_169_2r-SketchArc_170_2r-SketchArc_171_2r-SketchArc_172_2r-SketchArc_173_2r-SketchArc_174_2r-SketchArc_175_2r-SketchArc_176_2r-SketchArc_177_2r-SketchArc_178_2r-SketchArc_179_2r-SketchArc_180_2r-SketchLine_21f-SketchLine_200f-SketchLine_201f-SketchLine_202f-SketchLine_203f-SketchLine_204f-SketchLine_205f-SketchLine_206f-SketchLine_207f-SketchLine_208f-SketchLine_209f-SketchLine_210f-SketchLine_211f-SketchLine_212f-SketchLine_213f-SketchLine_214f-SketchLine_215f-SketchLine_216f-SketchLine_217f-SketchLine_218f-SketchLine_219f-SketchLine_220f-SketchLine_221f-SketchLine_222f-SketchLine_223f-SketchLine_224f-SketchLine_225f-SketchLine_226f-SketchLine_227f-SketchLine_228f-SketchLine_229f-SketchLine_230f-SketchLine_231f-SketchLine_232f-SketchLine_233f-SketchLine_234f-SketchLine_235f-SketchLine_236f-SketchLine_237f-SketchLine_238f-SketchLine_239f-SketchLine_240f-SketchLine_241f-SketchLine_242f-SketchLine_243f-SketchLine_244f-SketchLine_245f-SketchLine_246f-SketchLine_247f-SketchLine_248f-SketchLine_249f-SketchLine_250f-SketchLine_251f-SketchLine_252f-SketchLine_253f-SketchLine_254f-SketchLine_255f-SketchLine_256f-SketchLine_257f-SketchLine_258f-SketchLine_259f-SketchLine_260f-SketchLine_261f-SketchLine_262f-SketchLine_263f-SketchLine_264f-SketchLine_265f-SketchLine_266f-SketchLine_267f-SketchLine_268f-SketchLine_269f-SketchLine_270f-SketchLine_271f-SketchLine_272f-SketchLine_273f-SketchLine_274f-SketchLine_275f-SketchLine_276f-SketchLine_277f-SketchLine_278f-SketchLine_279f-SketchLine_280f-SketchLine_281f-SketchLine_282f-SketchLine_283f-SketchLine_284f-SketchLine_285f-SketchLine_286f-SketchLine_287f-SketchLine_288f-SketchLine_289f-SketchLine_290f-SketchLine_291f-SketchLine_292f-SketchLine_293f-SketchLine_294f-SketchLine_295f-SketchLine_296f-SketchLine_297f-SketchLine_298f-SketchLine_299f-SketchLine_300f-SketchLine_301f-SketchLine_302f-SketchLine_303f-SketchLine_304f-SketchLine_305f-SketchLine_306f-SketchLine_307f-SketchLine_308f-SketchLine_309f-SketchLine_310f-SketchLine_311f-SketchLine_312f-SketchLine_313f-SketchLine_314f-SketchLine_315f-SketchLine_316f-SketchLine_317f-SketchLine_318f-SketchLine_319f-SketchLine_320f-SketchLine_321f-SketchLine_322f-SketchLine_323f-SketchLine_324f-SketchLine_325f-SketchLine_326f-SketchLine_327f-SketchLine_328f-SketchLine_329f-SketchLine_330f-SketchLine_331f-SketchLine_332f-SketchLine_333f-SketchLine_334f-SketchLine_335f-SketchLine_336f-SketchLine_337f-SketchLine_338f-SketchLine_339f-SketchLine_340f-SketchLine_341f-SketchLine_342f-SketchLine_343f-SketchLine_344f-SketchLine_345f-SketchLine_346f-SketchLine_347f-SketchLine_348f-SketchLine_349f-SketchLine_350f-SketchLine_351f-SketchLine_352f-SketchLine_353f-SketchLine_354f-SketchLine_355f-SketchLine_356f-SketchLine_357f-SketchLine_358f-SketchLine_359f-SketchLine_360f-SketchLine_361f-SketchLine_362f-SketchLine_363f-SketchLine_364f-SketchLine_365f-SketchLine_366f-SketchLine_367f-SketchLine_368f-SketchLine_369f-SketchLine_370f-SketchLine_371f-SketchLine_372f-SketchLine_373f-SketchLine_374f-SketchLine_375f-SketchLine_376f-SketchLine_377f-SketchCircle_3_2f")], model.selection(), model.selection("FACE", "Revolution_1_1/Generated_Face_5"), 0, model.selection(), 0, [model.selection("SOLID", "Revolution_1_1")])
ExtrusionCut_1.result().setName("ExtrusionCut_1_1")
ExtrusionCut_2 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_3/Face-SketchCircle_4_2f")], model.selection(), 30, 0, [model.selection("SOLID", "ExtrusionCut_1_1")])
ExtrusionCut_2.result().setName("ExtrusionCut_2_1")
SketchLine_16 = Sketch_3.addLine(-20, 0, 0, 0)
SketchLine_16.setName("SketchLine_15")
SketchLine_16.result().setName("SketchLine_15")
-SketchPoint_2 = Sketch_3.addPoint(model.selection("VERTEX", "ExtrusionFuse_2_1/Modfied_7&ExtrusionFuse_2_1/Modfied_5&ExtrusionFuse_2_1/Modfied_8&ExtrusionFuse_2_1/Modfied_11"))
+SketchPoint_2 = Sketch_3.addPoint(model.selection("VERTEX", "ExtrusionFuse_2_1/Modfied_7&ExtrusionFuse_2_1/Modfied_6&ExtrusionFuse_2_1/Modfied_8&ExtrusionFuse_2_1/Modfied_9"))
SketchConstraintCoincidence_23 = Sketch_3.setCoincident(SketchLine_16.endPoint(), SketchPoint_2.result())
SketchLine_17 = Sketch_3.addLine(0, 0, 0, -20)
SketchLine_17.setName("SketchLine_16")
SketchLine_77 = Sketch_10.addLine(64, 20, 89, 20)
SketchLine_77.setName("SketchLine_76")
SketchLine_77.result().setName("SketchLine_76")
-SketchPoint_4 = Sketch_10.addPoint(model.selection("VERTEX", "RevolutionFuse_2_1/Modfied_11&RevolutionFuse_2_1/Modfied_13&RevolutionFuse_3_1/Modfied_15&RevolutionFuse_3_1/Modfied_4"))
+SketchPoint_4 = Sketch_10.addPoint(model.selection("VERTEX", "RevolutionFuse_2_1/Modfied_11&RevolutionFuse_2_1/Modfied_15&RevolutionFuse_3_1/Modfied_15&RevolutionFuse_3_1/Modfied_4"))
SketchConstraintCoincidence_122 = Sketch_10.setCoincident(SketchLine_77.startPoint(), SketchPoint_4.result())
SketchConstraintCoincidence_122.setName("SketchConstraintCoincidence_120")
SketchPoint_5 = Sketch_10.addPoint(model.selection("VERTEX", "Sketch_1/Vertex-SketchLine_1s-SketchLine_8e-SketchLine_4e"))
SketchLine_78 = Sketch_10.addLine(64, -20, 89, -20)
SketchLine_78.setName("SketchLine_77")
SketchLine_78.result().setName("SketchLine_77")
-SketchPoint_6 = Sketch_10.addPoint(model.selection("VERTEX", "RevolutionFuse_1_1/Modfied_4&RevolutionFuse_1_1/Modfied_9&RevolutionFuse_3_1/Modfied_17&RevolutionFuse_3_1/Modfied_8"))
+SketchPoint_6 = Sketch_10.addPoint(model.selection("VERTEX", "RevolutionFuse_1_1/Modfied_4&RevolutionFuse_1_1/Modfied_10&RevolutionFuse_3_1/Modfied_17&RevolutionFuse_3_1/Modfied_8"))
SketchConstraintCoincidence_124 = Sketch_10.setCoincident(SketchLine_78.startPoint(), SketchPoint_6.result())
SketchConstraintCoincidence_124.setName("SketchConstraintCoincidence_122")
-SketchPoint_7 = Sketch_10.addPoint(model.selection("VERTEX", "ExtrusionFuse_2_1/Modfied_2&RevolutionFuse_1_1/Modfied_4&ExtrusionFuse_2_1/Modfied_1&RevolutionFuse_3_1/Modfied_17"))
+SketchPoint_7 = Sketch_10.addPoint(model.selection("VERTEX", "ExtrusionFuse_2_1/Modfied_3&RevolutionFuse_1_1/Modfied_4&ExtrusionFuse_2_1/Modfied_4&RevolutionFuse_3_1/Modfied_17"))
SketchConstraintCoincidence_125 = Sketch_10.setCoincident(SketchLine_78.endPoint(), SketchPoint_7.result())
SketchConstraintCoincidence_125.setName("SketchConstraintCoincidence_123")
SketchArc_10 = Sketch_10.addArc(89.00000104846708, 1.669244441022778e-015, 89, -20, 89, 20, False)
SketchConstraintCoincidence_129.setName("SketchConstraintCoincidence_127")
SketchConstraintTangent_19 = Sketch_10.setTangent(SketchArc_11.results()[1], SketchLine_78.result())
SketchConstraintTangent_19.setName("SketchConstraintTangent_24")
-SketchPoint_8 = Sketch_10.addPoint(model.selection("VERTEX", "ExtrusionCut_2_1/Modfied_5&RevolutionFuse_3_1/Modfied_7&RevolutionFuse_3_1/Modfied_8&RevolutionFuse_3_1/Modfied_24&RevolutionFuse_3_1/Modfied_9"))
+SketchPoint_8 = Sketch_10.addPoint(model.selection("VERTEX", "RevolutionFuse_3_1/Modfied_9&RevolutionFuse_3_1/Modfied_8&ExtrusionCut_2_1/Modfied_5&RevolutionFuse_3_1/Modfied_7&RevolutionFuse_3_1/Modfied_24"))
SketchConstraintCoincidence_130 = Sketch_10.setCoincident(SketchArc_11.endPoint(), SketchPoint_8.result())
SketchConstraintCoincidence_130.setName("SketchConstraintCoincidence_128")
SketchArc_12 = Sketch_10.addArc(64.00001789135865, 23.01137360115889, 64, 20, 61.15622559702543, 22.02080994708722, True)
SketchConstraintCoincidence_131.setName("SketchConstraintCoincidence_129")
SketchConstraintTangent_20 = Sketch_10.setTangent(SketchArc_12.results()[1], SketchLine_77.result())
SketchConstraintTangent_20.setName("SketchConstraintTangent_25")
-SketchPoint_9 = Sketch_10.addPoint(model.selection("VERTEX", "ExtrusionCut_2_1/Modfied_5&RevolutionFuse_3_1/Modfied_3&RevolutionFuse_3_1/Modfied_4&RevolutionFuse_3_1/Modfied_24&RevolutionFuse_3_1/Modfied_5"))
+SketchPoint_9 = Sketch_10.addPoint(model.selection("VERTEX", "RevolutionFuse_3_1/Modfied_5&RevolutionFuse_3_1/Modfied_4&ExtrusionCut_2_1/Modfied_5&RevolutionFuse_3_1/Modfied_3&RevolutionFuse_3_1/Modfied_24"))
SketchConstraintCoincidence_132 = Sketch_10.setCoincident(SketchArc_12.endPoint(), SketchPoint_9.result())
SketchConstraintCoincidence_132.setName("SketchConstraintCoincidence_130")
SketchLine_79 = Sketch_10.addLine(61.15622559702543, 22.02080994708722, 59.81204392543111, 22.0208099470871)
SketchConstraintCoincidence_20 = Sketch_2.setCoincident(SketchArc_3.endPoint(), SketchLine_14.result())
SketchConstraintCoincidence_20.setName("SketchConstraintCoincidence_24")
SketchConstraintRadius_2 = Sketch_2.setRadius(SketchArc_3.results()[1], 6)
-SketchLine_15 = Sketch_2.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_13&Extrusion_1_1/Generated_Face_1"))
+SketchLine_15 = Sketch_2.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_13&Extrusion_1_1/Generated_Face_12"))
SketchLine_15.setName("SketchLine_17")
SketchLine_15.result().setName("SketchLine_17")
SketchConstraintDistance_8 = Sketch_2.setDistance(SketchArc_3.startPoint(), SketchLine_15.result(), 6)
model.do()
ExtrusionCut_1 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_2/Face-SketchArc_3_2r-SketchLine_18r-SketchLine_19r-SketchLine_20r-SketchLine_21r-SketchLine_22r")], model.selection(), 7, 15, [model.selection("SOLID", "Extrusion_1_1")])
ExtrusionCut_1.result().setName("ExtrusionCut_1_1")
-Sketch_3 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_4"))
+Sketch_3 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_9"))
SketchLine_21 = Sketch_3.addLine(28, -6, -4.270492394552598, -6.000000000000001)
SketchLine_21.setName("SketchLine_23")
SketchLine_21.result().setName("SketchLine_23")
SketchLine_21.setAuxiliary(True)
-SketchLine_22 = Sketch_3.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_5&Extrusion_1_1/Generated_Face_4"))
+SketchLine_22 = Sketch_3.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_8&Extrusion_1_1/Generated_Face_9"))
SketchLine_22.setName("SketchLine_24")
SketchLine_22.result().setName("SketchLine_24")
SketchConstraintCoincidence_27 = Sketch_3.setCoincident(SketchLine_21.startPoint(), SketchLine_22.result())
SketchConstraintMiddle_2 = Sketch_3.setMiddlePoint(SketchLine_34.result(), SketchPoint_4.coordinates())
SketchConstraintCoincidence_52 = Sketch_3.setCoincident(SketchPoint_4.coordinates(), SketchLine_21.result())
SketchConstraintCoincidence_52.setName("SketchConstraintCoincidence_56")
-SketchLine_35 = Sketch_3.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_4&ExtrusionCut_1_1/Modfied_4"))
+SketchLine_35 = Sketch_3.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_9&ExtrusionCut_1_1/Modfied_3"))
SketchLine_35.setName("SketchLine_37")
SketchLine_35.result().setName("SketchLine_37")
SketchConstraintCoincidence_53 = Sketch_3.setCoincident(SketchLine_25.startPoint(), SketchLine_35.result())
SketchConstraintCoincidence_53.setName("SketchConstraintCoincidence_57")
SketchConstraintLength_10 = Sketch_3.setLength(SketchLine_24.result(), 31)
SketchConstraintLength_10.setName("SketchConstraintLength_11")
-SketchLine_36 = Sketch_3.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_9&Extrusion_1_1/Generated_Face_8"))
+SketchLine_36 = Sketch_3.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_4&Extrusion_1_1/Generated_Face_5"))
SketchLine_36.setName("SketchLine_38")
SketchLine_36.result().setName("SketchLine_38")
SketchConstraintCoincidence_54 = Sketch_3.setCoincident(SketchLine_30.startPoint(), SketchLine_36.result())
SketchConstraintCoincidence_54.setName("SketchConstraintCoincidence_58")
SketchConstraintEqual_2 = Sketch_3.setEqual(SketchLine_30.result(), SketchLine_25.result())
model.do()
-ExtrusionCut_2 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_3/Face-SketchLine_32f-SketchLine_33f-SketchLine_34f-SketchLine_35f"), model.selection("FACE", "Sketch_3/Face-SketchLine_26f-SketchLine_27f-SketchLine_28f-SketchLine_29f")], model.selection(), model.selection("FACE", "ExtrusionCut_1_1/Modfied_3"), 0, model.selection(), 0, [model.selection("SOLID", "ExtrusionCut_1_1")])
+ExtrusionCut_2 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_3/Face-SketchLine_32f-SketchLine_33f-SketchLine_34f-SketchLine_35f"), model.selection("FACE", "Sketch_3/Face-SketchLine_26f-SketchLine_27f-SketchLine_28f-SketchLine_29f")], model.selection(), model.selection("FACE", "ExtrusionCut_1_1/Modfied_4"), 0, model.selection(), 0, [model.selection("SOLID", "ExtrusionCut_1_1")])
ExtrusionCut_2.result().setName("ExtrusionCut_2_1")
Sketch_4 = model.addSketch(Part_1_doc, model.selection("FACE", "ExtrusionCut_1_1/Modfied_1"))
SketchLine_37 = Sketch_4.addLine(0.4324637622511017, 3.581086955422081, 1.55585595716119, 2.812450190483599)
SketchLine_37.setName("SketchLine_39")
SketchLine_37.result().setName("SketchLine_39")
-SketchLine_38 = Sketch_4.addLine(model.selection("EDGE", "ExtrusionCut_1_1/Modfied_1&Extrusion_1_1/Generated_Face_11"))
+SketchLine_38 = Sketch_4.addLine(model.selection("EDGE", "ExtrusionCut_1_1/Modfied_1&Extrusion_1_1/Generated_Face_2"))
SketchLine_38.setName("SketchLine_40")
SketchLine_38.result().setName("SketchLine_40")
SketchConstraintCoincidence_55 = Sketch_4.setCoincident(SketchLine_37.startPoint(), SketchLine_38.result())
model.do()
ExtrusionCut_3 = model.addExtrusionCut(Part_1_doc, [model.selection("COMPOUND", "Sketch_4")], model.selection(), model.selection("FACE", "ExtrusionCut_1_1/Modfied_2"), 0, model.selection(), 0, [model.selection("SOLID", "ExtrusionCut_2_1")])
ExtrusionCut_3.result().setName("ExtrusionCut_3_1")
-Plane_4 = model.addPlane(Part_1_doc, model.selection("VERTEX", "ExtrusionCut_1_1/Modfied_5&ExtrusionCut_3_1/Modfied_3&Extrusion_1_1/Generated_Face_12"), model.selection("VERTEX", "ExtrusionCut_3_1/Modfied_3&Extrusion_1_1/Generated_Face_7&Extrusion_1_1/Generated_Face_6"), model.selection("VERTEX", "ExtrusionCut_1_1/Modfied_5&ExtrusionCut_2_1/Modfied_9&ExtrusionCut_3_1/Modfied_3"))
+Plane_4 = model.addPlane(Part_1_doc, model.selection("VERTEX", "ExtrusionCut_1_1/Modfied_5&ExtrusionCut_3_1/Modfied_3&Extrusion_1_1/Generated_Face_1"), model.selection("VERTEX", "ExtrusionCut_3_1/Modfied_3&Extrusion_1_1/Generated_Face_7&Extrusion_1_1/Generated_Face_6"), model.selection("VERTEX", "ExtrusionCut_1_1/Modfied_5&ExtrusionCut_2_1/Modfied_9&ExtrusionCut_3_1/Modfied_3"))
Sketch_5 = model.addSketch(Part_1_doc, model.selection("FACE", "Plane_1"))
SketchArc_4 = Sketch_5.addArc(25.00007393928819, -7.521062532210847, 22.00014787857639, -7.5, 28, -7.5, True)
SketchPoint_5 = Sketch_5.addPoint(22.00014787857639, -7.5)
SketchConstraintCoincidence_193 = Sketch_12.setCoincident(SketchArc_26.endPoint(), SketchLine_120.result())
SketchConstraintCoincidence_193.setName("SketchConstraintCoincidence_24")
SketchConstraintRadius_13 = Sketch_12.setRadius(SketchArc_26.results()[1], 6)
-SketchLine_121 = Sketch_12.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_13&Extrusion_1_1/Generated_Face_1"))
+SketchLine_121 = Sketch_12.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_13&Extrusion_1_1/Generated_Face_12"))
SketchLine_121.setName("SketchLine_17")
SketchLine_121.result().setName("SketchLine_17")
SketchConstraintDistance_25 = Sketch_12.setDistance(SketchArc_26.startPoint(), SketchLine_121.result(), 6)
model.do()
ExtrusionCut_10 = model.addExtrusionCut(Part_2_doc, [model.selection("FACE", "Sketch_2/Face-SketchArc_3_2r-SketchLine_18r-SketchLine_19r-SketchLine_20r-SketchLine_21r-SketchLine_22r")], model.selection(), 7, 15, [model.selection("SOLID", "Extrusion_1_1")])
ExtrusionCut_10.result().setName("ExtrusionCut_1_1")
-Sketch_13 = model.addSketch(Part_2_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_4"))
+Sketch_13 = model.addSketch(Part_2_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_9"))
SketchLine_127 = Sketch_13.addLine(28, -6, -4.270492394552598, -6.000000000000001)
SketchLine_127.setName("SketchLine_23")
SketchLine_127.result().setName("SketchLine_23")
SketchLine_127.setAuxiliary(True)
-SketchLine_128 = Sketch_13.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_5&Extrusion_1_1/Generated_Face_4"))
+SketchLine_128 = Sketch_13.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_8&Extrusion_1_1/Generated_Face_9"))
SketchLine_128.setName("SketchLine_24")
SketchLine_128.result().setName("SketchLine_24")
SketchConstraintCoincidence_200 = Sketch_13.setCoincident(SketchLine_127.startPoint(), SketchLine_128.result())
SketchConstraintMiddle_10 = Sketch_13.setMiddlePoint(SketchLine_140.result(), SketchPoint_28.coordinates())
SketchConstraintCoincidence_225 = Sketch_13.setCoincident(SketchPoint_28.coordinates(), SketchLine_127.result())
SketchConstraintCoincidence_225.setName("SketchConstraintCoincidence_56")
-SketchLine_141 = Sketch_13.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_4&ExtrusionCut_1_1/Modfied_4"))
+SketchLine_141 = Sketch_13.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_9&ExtrusionCut_1_1/Modfied_3"))
SketchLine_141.setName("SketchLine_37")
SketchLine_141.result().setName("SketchLine_37")
SketchConstraintCoincidence_226 = Sketch_13.setCoincident(SketchLine_131.startPoint(), SketchLine_141.result())
SketchConstraintCoincidence_226.setName("SketchConstraintCoincidence_57")
SketchConstraintLength_27 = Sketch_13.setLength(SketchLine_130.result(), 31)
SketchConstraintLength_27.setName("SketchConstraintLength_11")
-SketchLine_142 = Sketch_13.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_9&Extrusion_1_1/Generated_Face_8"))
+SketchLine_142 = Sketch_13.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_4&Extrusion_1_1/Generated_Face_5"))
SketchLine_142.setName("SketchLine_38")
SketchLine_142.result().setName("SketchLine_38")
SketchConstraintCoincidence_227 = Sketch_13.setCoincident(SketchLine_136.startPoint(), SketchLine_142.result())
SketchConstraintCoincidence_227.setName("SketchConstraintCoincidence_58")
SketchConstraintEqual_5 = Sketch_13.setEqual(SketchLine_136.result(), SketchLine_131.result())
model.do()
-ExtrusionCut_11 = model.addExtrusionCut(Part_2_doc, [model.selection("FACE", "Sketch_3/Face-SketchLine_32f-SketchLine_33f-SketchLine_34f-SketchLine_35f"), model.selection("FACE", "Sketch_3/Face-SketchLine_26f-SketchLine_27f-SketchLine_28f-SketchLine_29f")], model.selection(), model.selection("FACE", "ExtrusionCut_1_1/Modfied_3"), 0, model.selection(), 0, [model.selection("SOLID", "ExtrusionCut_1_1")])
+ExtrusionCut_11 = model.addExtrusionCut(Part_2_doc, [model.selection("FACE", "Sketch_3/Face-SketchLine_32f-SketchLine_33f-SketchLine_34f-SketchLine_35f"), model.selection("FACE", "Sketch_3/Face-SketchLine_26f-SketchLine_27f-SketchLine_28f-SketchLine_29f")], model.selection(), model.selection("FACE", "ExtrusionCut_1_1/Modfied_4"), 0, model.selection(), 0, [model.selection("SOLID", "ExtrusionCut_1_1")])
ExtrusionCut_11.result().setName("ExtrusionCut_2_1")
Sketch_14 = model.addSketch(Part_2_doc, model.selection("FACE", "ExtrusionCut_1_1/Modfied_1"))
SketchLine_143 = Sketch_14.addLine(0.4324637622511017, 3.581086955422081, 1.55585595716119, 2.812450190483599)
SketchLine_143.setName("SketchLine_39")
SketchLine_143.result().setName("SketchLine_39")
-SketchLine_144 = Sketch_14.addLine(model.selection("EDGE", "ExtrusionCut_1_1/Modfied_1&Extrusion_1_1/Generated_Face_11"))
+SketchLine_144 = Sketch_14.addLine(model.selection("EDGE", "ExtrusionCut_1_1/Modfied_1&Extrusion_1_1/Generated_Face_2"))
SketchLine_144.setName("SketchLine_40")
SketchLine_144.result().setName("SketchLine_40")
SketchConstraintCoincidence_228 = Sketch_14.setCoincident(SketchLine_143.startPoint(), SketchLine_144.result())
model.do()
ExtrusionCut_12 = model.addExtrusionCut(Part_2_doc, [model.selection("COMPOUND", "Sketch_4")], model.selection(), model.selection("FACE", "ExtrusionCut_1_1/Modfied_2"), 0, model.selection(), 0, [model.selection("SOLID", "ExtrusionCut_2_1")])
ExtrusionCut_12.result().setName("ExtrusionCut_3_1")
-Plane_9 = model.addPlane(Part_2_doc, model.selection("VERTEX", "ExtrusionCut_1_1/Modfied_5&ExtrusionCut_3_1/Modfied_3&Extrusion_1_1/Generated_Face_12"), model.selection("VERTEX", "ExtrusionCut_3_1/Modfied_3&Extrusion_1_1/Generated_Face_7&Extrusion_1_1/Generated_Face_6"), model.selection("VERTEX", "ExtrusionCut_1_1/Modfied_5&ExtrusionCut_2_1/Modfied_9&ExtrusionCut_3_1/Modfied_3"))
+Plane_9 = model.addPlane(Part_2_doc, model.selection("VERTEX", "ExtrusionCut_1_1/Modfied_5&ExtrusionCut_3_1/Modfied_3&Extrusion_1_1/Generated_Face_1"), model.selection("VERTEX", "ExtrusionCut_3_1/Modfied_3&Extrusion_1_1/Generated_Face_7&Extrusion_1_1/Generated_Face_6"), model.selection("VERTEX", "ExtrusionCut_1_1/Modfied_5&ExtrusionCut_2_1/Modfied_9&ExtrusionCut_3_1/Modfied_3"))
Sketch_15 = model.addSketch(Part_2_doc, model.selection("FACE", "Plane_1"))
SketchArc_27 = Sketch_15.addArc(25.00007393928819, -7.521062532210847, 22.00014787857639, -7.5, 28, -7.5, True)
SketchPoint_29 = Sketch_15.addPoint(22.00014787857639, -7.5)
Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("WIRE", "Sketch_1/Wire-SketchLine_1f-SketchLine_10f-SketchLine_11f-SketchLine_12f-SketchLine_13f-SketchLine_4f-SketchLine_8f-SketchLine_9f-SketchArc_1_2r-SketchArc_2_2f")], model.selection(), "307/2.", "307/2.")
Extrusion_1.setName("Profil")
Extrusion_1.result().setName("Extrusion_1_1")
-Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_7"))
+Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_3"))
SketchLine_14 = Sketch_2.addLine(149.5, -2.3, 153.5, -2.3)
-SketchPoint_1 = Sketch_2.addPoint(model.selection("VERTEX", "Extrusion_1_1/Generated_Face_7&Extrusion_1_1/Generated_Face_6&Extrusion_1_1/To_Face_1"))
+SketchPoint_1 = Sketch_2.addPoint(model.selection("VERTEX", "Extrusion_1_1/Generated_Face_4&Extrusion_1_1/Generated_Face_3&Extrusion_1_1/To_Face_1"))
SketchConstraintCoincidence_24 = Sketch_2.setCoincident(SketchLine_14.endPoint(), SketchPoint_1.result())
SketchLine_15 = Sketch_2.addLine(153.5, -2.3, 153.5, 7.7)
SketchLine_16 = Sketch_2.addLine(153.5, 7.7, 149.5, 7.7)
SketchConstraintLength_5.setName("SketchConstraintLength_6")
SketchConstraintDistance_2 = Sketch_2.setDistance(SketchLine_16.endPoint(), SketchLine_21.result(), 299)
SketchConstraintEqual_1 = Sketch_2.setEqual(SketchLine_16.result(), SketchLine_20.result())
-SketchPoint_2 = Sketch_2.addPoint(model.selection("VERTEX", "Extrusion_1_1/Generated_Face_7&Extrusion_1_1/Generated_Face_6&Extrusion_1_1/From_Face_1"))
+SketchPoint_2 = Sketch_2.addPoint(model.selection("VERTEX", "Extrusion_1_1/Generated_Face_4&Extrusion_1_1/Generated_Face_3&Extrusion_1_1/From_Face_1"))
SketchPoint_2.setName("SketchPoint_4")
SketchPoint_2.result().setName("SketchPoint_4")
SketchConstraintCoincidence_34 = Sketch_2.setCoincident(SketchLine_19.startPoint(), SketchPoint_2.coordinates())
SketchConstraintCoincidence_34.setName("SketchConstraintCoincidence_39")
model.do()
-ExtrusionCut_1 = model.addExtrusionCut(Part_1_doc, [model.selection("COMPOUND", "Sketch_2")], model.selection(), model.selection("FACE", "Extrusion_1_1/Generated_Face_4"), 0, model.selection(), 0, [model.selection("SOLID", "Extrusion_1_1")])
+ExtrusionCut_1 = model.addExtrusionCut(Part_1_doc, [model.selection("COMPOUND", "Sketch_2")], model.selection(), model.selection("FACE", "Extrusion_1_1/Generated_Face_6"), 0, model.selection(), 0, [model.selection("SOLID", "Extrusion_1_1")])
ExtrusionCut_1.setName("Decoupe_Angle")
ExtrusionCut_1.result().setName("ExtrusionCut_1_1")
-Sketch_3 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_8"))
+Sketch_3 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_2"))
SketchLine_22 = Sketch_3.addLine(153.5, -10.3, 153.5, -8.3)
SketchLine_22.setName("SketchLine_29")
SketchLine_22.result().setName("SketchLine_29")
-SketchPoint_3 = Sketch_3.addPoint(model.selection("VERTEX", "Extrusion_1_1/Generated_Face_9&ExtrusionCut_1_1/Modfied_1&Extrusion_1_1/Generated_Face_8"))
+SketchPoint_3 = Sketch_3.addPoint(model.selection("VERTEX", "Extrusion_1_1/Generated_Face_1&ExtrusionCut_1_1/Modfied_1&Extrusion_1_1/Generated_Face_2"))
SketchPoint_3.setName("SketchPoint_5")
SketchPoint_3.result().setName("SketchPoint_5")
SketchConstraintCoincidence_35 = Sketch_3.setCoincident(SketchLine_22.startPoint(), SketchPoint_3.result())
SketchConstraintCoincidence_35.setName("SketchConstraintCoincidence_40")
-SketchLine_23 = Sketch_3.addLine(model.selection("EDGE", "ExtrusionCut_1_1/Modfied_1&Extrusion_1_1/Generated_Face_8"))
+SketchLine_23 = Sketch_3.addLine(model.selection("EDGE", "ExtrusionCut_1_1/Modfied_1&Extrusion_1_1/Generated_Face_2"))
SketchLine_23.setName("SketchLine_30")
SketchLine_23.result().setName("SketchLine_30")
SketchConstraintCoincidence_36 = Sketch_3.setCoincident(SketchLine_22.endPoint(), SketchLine_23.result())
ExtrusionCut_2 = model.addExtrusionCut(Part_1_doc, [model.selection("COMPOUND", "Sketch_4")], model.selection(), 0, 10, [model.selection("SOLID", "ExtrusionCut_1_1")])
ExtrusionCut_2.setName("Chamfrein_1")
ExtrusionCut_2.result().setName("ExtrusionCut_2_1")
-Sketch_4 = model.addSketch(Part_1_doc, model.selection("FACE", "ExtrusionCut_1_1/Modfied_7"))
+Sketch_4 = model.addSketch(Part_1_doc, model.selection("FACE", "ExtrusionCut_1_1/Modfied_5"))
SketchLine_30 = Sketch_4.addLine(-149.5, 10.3, -149.5, 8.3)
SketchLine_30.setName("SketchLine_35")
SketchLine_30.result().setName("SketchLine_35")
-SketchPoint_4 = Sketch_4.addPoint(model.selection("VERTEX", "ExtrusionCut_1_1/Modfied_11&ExtrusionCut_1_1/Modfied_7&ExtrusionCut_1_1/Modfied_6"))
+SketchPoint_4 = Sketch_4.addPoint(model.selection("VERTEX", "ExtrusionCut_1_1/Modfied_11&ExtrusionCut_1_1/Modfied_5&ExtrusionCut_1_1/Modfied_6"))
SketchPoint_4.setName("SketchPoint_6")
SketchPoint_4.result().setName("SketchPoint_6")
SketchConstraintCoincidence_42 = Sketch_4.setCoincident(SketchLine_30.startPoint(), SketchPoint_4.result())
SketchConstraintCoincidence_42.setName("SketchConstraintCoincidence_43")
-SketchLine_31 = Sketch_4.addLine(model.selection("EDGE", "ExtrusionCut_1_1/Modfied_11&ExtrusionCut_1_1/Modfied_7"))
+SketchLine_31 = Sketch_4.addLine(model.selection("EDGE", "ExtrusionCut_1_1/Modfied_11&ExtrusionCut_1_1/Modfied_5"))
SketchLine_31.setName("SketchLine_36")
SketchLine_31.result().setName("SketchLine_36")
SketchConstraintCoincidence_43 = Sketch_4.setCoincident(SketchLine_30.endPoint(), SketchLine_31.result())
model.do()
Sketch_4.setName("Sketch_5")
Sketch_4.result().setName("Sketch_5")
-ExtrusionCut_3 = model.addExtrusionCut(Part_1_doc, [model.selection("COMPOUND", "Sketch_5")], model.selection(), model.selection("FACE", "ExtrusionCut_1_1/Modfied_5"), 0, model.selection(), 0, [model.selection("SOLID", "ExtrusionCut_2_1")])
+ExtrusionCut_3 = model.addExtrusionCut(Part_1_doc, [model.selection("COMPOUND", "Sketch_5")], model.selection(), model.selection("FACE", "ExtrusionCut_1_1/Modfied_7"), 0, model.selection(), 0, [model.selection("SOLID", "ExtrusionCut_2_1")])
ExtrusionCut_3.result().setName("ExtrusionCut_3_1")
-Sketch_5 = model.addSketch(Part_1_doc, model.selection("FACE", "ExtrusionCut_1_1/Modfied_9"))
+Sketch_5 = model.addSketch(Part_1_doc, model.selection("FACE", "ExtrusionCut_1_1/Modfied_3"))
SketchLine_40 = Sketch_5.addLine(152.2999838762584, -21.04999053274691, 153.5, -21.04999053274714)
SketchLine_40.setName("SketchLine_58")
SketchLine_40.result().setName("SketchLine_58")
SketchLine_41 = Sketch_5.addLine(152.2999838292651, -45.04999053274704, 153.5, -45.04999053274702)
SketchLine_41.setName("SketchLine_57")
SketchLine_41.result().setName("SketchLine_57")
-SketchLine_42 = Sketch_5.addLine(model.selection("EDGE", "ExtrusionCut_2_1/Modfied_2&ExtrusionCut_1_1/Modfied_9"))
+SketchLine_42 = Sketch_5.addLine(model.selection("EDGE", "ExtrusionCut_2_1/Modfied_2&ExtrusionCut_1_1/Modfied_3"))
SketchLine_42.setName("SketchLine_46")
SketchLine_42.result().setName("SketchLine_46")
SketchLine_43 = Sketch_5.addLine(150.8, -45.04999053274702, 153.5, -45.04999053274702)
SketchConstraintLength_10 = Sketch_3.setLength(SketchLine_83.result(), "2*R_fillet")
model.do()
Revolution_1 = model.addRevolution(Part_1_doc, [model.selection("FACE", "PartSet/Sketch_1")], model.selection("EDGE", "PartSet/Sketch_1/Edge-SketchLine_1"), 360, 0)
-Sketch_4 = model.addSketch(Part_1_doc, model.selection("FACE", "Revolution_1_1/Generated_Face_5"))
+Sketch_4 = model.addSketch(Part_1_doc, model.selection("FACE", "Revolution_1_1/Generated_Face_1"))
SketchPoint_4 = Sketch_4.addPoint(model.selection("VERTEX", "PartSet/Origin"))
SketchLine_86 = Sketch_4.addLine(0, -13.49999999999519, 3.1, -13.49999999999519)
SketchLine_87 = Sketch_4.addLine(model.selection("EDGE", "PartSet/OZ"))
SketchConstraintCoincidence_62 = Sketch_4.setCoincident(SketchPoint_6.coordinates(), SketchLine_89.result())
SketchConstraintDistance_6 = Sketch_4.setDistance(SketchPoint_6.coordinates(), SketchLine_86.result(), 24.5)
model.do()
-ExtrusionCut_1 = model.addExtrusionCut(Part_1_doc, [model.selection("COMPOUND", "Sketch_1")], model.selection(), model.selection("FACE", "Revolution_1_1/Generated_Face_1"), 0, model.selection(), 0, [model.selection("SOLID", "Revolution_1_1")])
+ExtrusionCut_1 = model.addExtrusionCut(Part_1_doc, [model.selection("COMPOUND", "Sketch_1")], model.selection(), model.selection("FACE", "Revolution_1_1/Generated_Face_5"), 0, model.selection(), 0, [model.selection("SOLID", "Revolution_1_1")])
ExtrusionCut_1.result().setName("ExtrusionCut_1_1")
RevolutionCut_1 = model.addRevolutionCut(Part_1_doc, [model.selection("COMPOUND", "Sketch_2")], model.selection("EDGE", "PartSet/OX"), 0, 360, [model.selection("SOLID", "ExtrusionCut_1_1")])
RevolutionCut_1.result().setName("RevolutionCut_1_1")
model.do()
Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1r-SketchLine_3f-SketchLine_5r-SketchLine_6r-SketchArc_1_2f-SketchArc_2_2f-SketchArc_3_2f-SketchArc_4_2f")], model.selection(), 76, 0)
Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/To_Face_1"))
-SketchLine_7 = Sketch_2.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_7&Extrusion_1_1/To_Face_1"))
+SketchLine_7 = Sketch_2.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_1&Extrusion_1_1/To_Face_1"))
SketchLine_7.setName("SketchLine_8")
SketchLine_7.result().setName("SketchLine_8")
SketchLine_8 = Sketch_2.addLine(21, 45.99999999998655, 20.99999999998684, 0)
SketchLine_8.setName("SketchLine_9")
SketchLine_8.result().setName("SketchLine_9")
SketchLine_8.setAuxiliary(True)
-SketchLine_9 = Sketch_2.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_5&Extrusion_1_1/To_Face_1"))
+SketchLine_9 = Sketch_2.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_3&Extrusion_1_1/To_Face_1"))
SketchLine_9.setName("SketchLine_10")
SketchLine_9.result().setName("SketchLine_10")
SketchConstraintCoincidence_17 = Sketch_2.setCoincident(SketchLine_8.startPoint(), SketchLine_9.result())
SketchConstraintCoincidence_17.setName("SketchConstraintCoincidence_18")
-SketchLine_10 = Sketch_2.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_1&Extrusion_1_1/To_Face_1"))
+SketchLine_10 = Sketch_2.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_7&Extrusion_1_1/To_Face_1"))
SketchLine_10.setName("SketchLine_11")
SketchLine_10.result().setName("SketchLine_11")
SketchConstraintCoincidence_18 = Sketch_2.setCoincident(SketchLine_8.endPoint(), SketchLine_10.result())
SketchConstraintCoincidence_18.setName("SketchConstraintCoincidence_19")
SketchConstraintMiddle_1 = Sketch_2.setMiddlePoint(SketchLine_8.startPoint(), SketchLine_9.result())
SketchConstraintMiddle_2 = Sketch_2.setMiddlePoint(SketchLine_8.endPoint(), SketchLine_10.result())
-SketchLine_11 = Sketch_2.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_3&Extrusion_1_1/To_Face_1"))
+SketchLine_11 = Sketch_2.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_5&Extrusion_1_1/To_Face_1"))
SketchLine_11.setName("SketchLine_12")
SketchLine_11.result().setName("SketchLine_12")
SketchPoint_1 = Sketch_2.addPoint(20.99999999999342, 22.99999999999327)
SketchLine_13.setName("SketchLine_14")
SketchLine_13.result().setName("SketchLine_14")
SketchLine_13.setAuxiliary(True)
-SketchLine_14 = Sketch_3.addLine(model.selection("EDGE", "ExtrusionCut_2_1/Modfied_2&Extrusion_1_1/Generated_Face_3"))
+SketchLine_14 = Sketch_3.addLine(model.selection("EDGE", "ExtrusionCut_2_1/Modfied_2&Extrusion_1_1/Generated_Face_5"))
SketchLine_14.setName("SketchLine_15")
SketchLine_14.result().setName("SketchLine_15")
SketchConstraintCoincidence_26 = Sketch_3.setCoincident(SketchLine_13.startPoint(), SketchLine_14.result())
SketchConstraintCoincidence_26.setName("SketchConstraintCoincidence_27")
-SketchLine_15 = Sketch_3.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_7&ExtrusionCut_2_1/Modfied_2"))
+SketchLine_15 = Sketch_3.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_1&ExtrusionCut_2_1/Modfied_2"))
SketchLine_15.setName("SketchLine_16")
SketchLine_15.result().setName("SketchLine_16")
SketchConstraintCoincidence_27 = Sketch_3.setCoincident(SketchLine_13.endPoint(), SketchLine_15.result())
SketchLine_16.setName("SketchLine_17")
SketchLine_16.result().setName("SketchLine_17")
SketchLine_16.setAuxiliary(True)
-SketchLine_17 = Sketch_3.addLine(model.selection("EDGE", "ExtrusionCut_2_1/Modfied_2&Extrusion_1_1/Generated_Face_5"))
+SketchLine_17 = Sketch_3.addLine(model.selection("EDGE", "ExtrusionCut_2_1/Modfied_2&Extrusion_1_1/Generated_Face_3"))
SketchLine_17.setName("SketchLine_18")
SketchLine_17.result().setName("SketchLine_18")
SketchConstraintCoincidence_28 = Sketch_3.setCoincident(SketchLine_16.startPoint(), SketchLine_17.result())
model.do()
ExtrusionCut_3 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_3/Face-SketchCircle_5_2f-SketchCircle_6_2r-SketchCircle_7_2r")], model.selection(), 15, 0, [model.selection("SOLID", "ExtrusionCut_2_1")])
ExtrusionCut_3.result().setName("ExtrusionCut_3_1")
-Sketch_4 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_5"))
-SketchProjection_1 = Sketch_4.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_7&Extrusion_1_1/Generated_Face_6"))
+Sketch_4 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_3"))
+SketchProjection_1 = Sketch_4.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_1&Extrusion_1_1/Generated_Face_2"))
SketchLine_19 = SketchProjection_1.createdFeature()
SketchLine_19.setName("SketchLine_20")
SketchLine_19.result().setName("SketchLine_20")
-SketchProjection_2 = Sketch_4.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_3&Extrusion_1_1/Generated_Face_4"))
+SketchProjection_2 = Sketch_4.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_5&Extrusion_1_1/Generated_Face_4"))
SketchLine_20 = SketchProjection_2.createdFeature()
SketchLine_20.setName("SketchLine_21")
SketchLine_20.result().setName("SketchLine_21")
SketchLine_21 = Sketch_4.addLine(4.999999999999999, -28, 37, -28)
SketchLine_21.setName("SketchLine_22")
SketchLine_21.result().setName("SketchLine_22")
-SketchLine_22 = Sketch_4.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_6&Extrusion_1_1/Generated_Face_5"))
+SketchLine_22 = Sketch_4.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_2&Extrusion_1_1/Generated_Face_3"))
SketchLine_22.setName("SketchLine_23")
SketchLine_22.result().setName("SketchLine_23")
SketchConstraintCoincidence_34 = Sketch_4.setCoincident(SketchLine_21.startPoint(), SketchLine_22.result())
SketchConstraintCoincidence_34.setName("SketchConstraintCoincidence_35")
-SketchLine_23 = Sketch_4.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_5&Extrusion_1_1/Generated_Face_4"))
+SketchLine_23 = Sketch_4.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_3&Extrusion_1_1/Generated_Face_4"))
SketchLine_23.setName("SketchLine_24")
SketchLine_23.result().setName("SketchLine_24")
SketchConstraintCoincidence_35 = Sketch_4.setCoincident(SketchLine_21.endPoint(), SketchLine_23.result())
SketchConstraintVertical_3 = Sketch_5.setVertical(SketchLine_31.result())
SketchConstraintEqual_8 = Sketch_5.setEqual(SketchLine_29.result(), SketchLine_28.result())
SketchConstraintEqual_9 = Sketch_5.setEqual(SketchLine_31.result(), SketchLine_30.result())
-SketchLine_32 = Sketch_5.addLine(model.selection("EDGE", "Extrusion_2_1/Generated_Face_1&Extrusion_2_1/To_Face_1"))
+SketchLine_32 = Sketch_5.addLine(model.selection("EDGE", "Extrusion_2_1/Generated_Face_7&Extrusion_2_1/To_Face_1"))
SketchLine_32.setName("SketchLine_33")
SketchLine_32.result().setName("SketchLine_33")
SketchConstraintDistance_7 = Sketch_5.setDistance(SketchLine_30.endPoint(), SketchLine_32.result(), 2)
-SketchLine_33 = Sketch_5.addLine(model.selection("EDGE", "Extrusion_2_1/Generated_Face_5&Extrusion_2_1/To_Face_1"))
+SketchLine_33 = Sketch_5.addLine(model.selection("EDGE", "Extrusion_2_1/Generated_Face_3&Extrusion_2_1/To_Face_1"))
SketchLine_33.setName("SketchLine_34")
SketchLine_33.result().setName("SketchLine_34")
SketchConstraintDistance_8 = Sketch_5.setDistance(SketchLine_31.startPoint(), SketchLine_33.result(), 2)
-SketchLine_34 = Sketch_5.addLine(model.selection("EDGE", "Extrusion_2_1/Generated_Face_7&Extrusion_2_1/To_Face_1"))
+SketchLine_34 = Sketch_5.addLine(model.selection("EDGE", "Extrusion_2_1/Generated_Face_1&Extrusion_2_1/To_Face_1"))
SketchLine_34.setName("SketchLine_35")
SketchLine_34.result().setName("SketchLine_35")
SketchConstraintDistance_9 = Sketch_5.setDistance(SketchLine_29.startPoint(), SketchLine_34.result(), 2)
-SketchLine_35 = Sketch_5.addLine(model.selection("EDGE", "Extrusion_2_1/Generated_Face_3&Extrusion_2_1/To_Face_1"))
+SketchLine_35 = Sketch_5.addLine(model.selection("EDGE", "Extrusion_2_1/Generated_Face_5&Extrusion_2_1/To_Face_1"))
SketchLine_35.setName("SketchLine_36")
SketchLine_35.result().setName("SketchLine_36")
SketchConstraintDistance_10 = Sketch_5.setDistance(SketchLine_28.startPoint(), SketchLine_35.result(), 2)
SketchConstraintLength_4 = Sketch_6.setLength(SketchLine_43.result(), 20)
SketchConstraintLength_5 = Sketch_6.setLength(SketchLine_44.result(), 15)
SketchConstraintLength_6 = Sketch_6.setLength(SketchLine_39.result(), 42)
-SketchProjection_3 = Sketch_6.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_1&Extrusion_1_1/Generated_Face_2"))
+SketchProjection_3 = Sketch_6.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_7&Extrusion_1_1/Generated_Face_6"))
SketchLine_46 = SketchProjection_3.createdFeature()
SketchLine_46.setName("SketchLine_47")
SketchLine_46.result().setName("SketchLine_47")
-SketchProjection_4 = Sketch_6.addProjection(model.selection("EDGE", "ExtrusionCut_1_1/Modfied_3&Extrusion_1_1/Generated_Face_3"))
+SketchProjection_4 = Sketch_6.addProjection(model.selection("EDGE", "ExtrusionCut_1_1/Modfied_3&Extrusion_1_1/Generated_Face_5"))
SketchLine_47 = SketchProjection_4.createdFeature()
SketchLine_47.setName("SketchLine_48")
SketchLine_47.result().setName("SketchLine_48")
-SketchProjection_5 = Sketch_6.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_1&Extrusion_1_1/Generated_Face_2"))
+SketchProjection_5 = Sketch_6.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_7&Extrusion_1_1/Generated_Face_6"))
SketchLine_48 = SketchProjection_5.createdFeature()
SketchLine_48.setName("SketchLine_49")
SketchLine_48.result().setName("SketchLine_49")
SketchConstraintDistance_13 = Sketch_6.setDistance(SketchLine_38.endPoint(), SketchLine_46.result(), 2)
SketchConstraintDistance_14 = Sketch_6.setDistance(SketchLine_38.startPoint(), SketchLine_47.result(), 17)
model.do()
-ExtrusionCut_6 = model.addExtrusionCut(Part_1_doc, [model.selection("COMPOUND", "Sketch_6")], model.selection(), model.selection("FACE", "Extrusion_1_1/Generated_Face_3"), -2, model.selection(), -2, [model.selection("SOLID", "ExtrusionCut_5_2")])
+ExtrusionCut_6 = model.addExtrusionCut(Part_1_doc, [model.selection("COMPOUND", "Sketch_6")], model.selection(), model.selection("FACE", "Extrusion_1_1/Generated_Face_5"), -2, model.selection(), -2, [model.selection("SOLID", "ExtrusionCut_5_2")])
ExtrusionCut_6.result().setName("ExtrusionCut_6_1")
-Sketch_7 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_7"))
+Sketch_7 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_1"))
SketchLine_49 = Sketch_7.addLine(0, -22.99999999998656, -76, -22.99999999998655)
SketchLine_49.setName("SketchLine_50")
SketchLine_49.result().setName("SketchLine_50")
SketchLine_49.setAuxiliary(True)
-SketchLine_50 = Sketch_7.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_7&ExtrusionCut_3_1/Modfied_4"))
+SketchLine_50 = Sketch_7.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_1&ExtrusionCut_3_1/Modfied_4"))
SketchLine_50.setName("SketchLine_51")
SketchLine_50.result().setName("SketchLine_51")
SketchConstraintCoincidence_74 = Sketch_7.setCoincident(SketchLine_49.startPoint(), SketchLine_50.result())
SketchLine_51.setName("SketchLine_52")
SketchLine_51.result().setName("SketchLine_52")
SketchLine_51.setAuxiliary(True)
-SketchLine_52 = Sketch_7.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_7&ExtrusionCut_4_2/Modfied_4"))
+SketchLine_52 = Sketch_7.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_1&ExtrusionCut_4_2/Modfied_4"))
SketchLine_52.setName("SketchLine_53")
SketchLine_52.result().setName("SketchLine_53")
SketchConstraintCoincidence_76 = Sketch_7.setCoincident(SketchLine_51.startPoint(), SketchLine_52.result())
SketchConstraintCoincidence_76.setName("SketchConstraintCoincidence_77")
-SketchLine_53 = Sketch_7.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_8&Extrusion_1_1/Generated_Face_7"))
+SketchLine_53 = Sketch_7.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_8&Extrusion_1_1/Generated_Face_1"))
SketchLine_53.setName("SketchLine_54")
SketchLine_53.result().setName("SketchLine_54")
SketchConstraintCoincidence_77 = Sketch_7.setCoincident(SketchLine_51.endPoint(), SketchLine_53.result())
SketchLine_54 = SketchProjection_6.createdFeature()
SketchLine_54.setName("SketchLine_55")
SketchLine_54.result().setName("SketchLine_55")
-SketchProjection_7 = Sketch_8.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_7&ExtrusionCut_3_1/Modfied_4"))
+SketchProjection_7 = Sketch_8.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_1&ExtrusionCut_3_1/Modfied_4"))
SketchLine_55 = SketchProjection_7.createdFeature()
SketchLine_55.setName("SketchLine_56")
SketchLine_55.result().setName("SketchLine_56")
SketchConstraintCoincidence_83 = Sketch_8.setCoincident(SketchLine_57.result(), SketchPoint_5.coordinates())
SketchConstraintCoincidence_83.setName("SketchConstraintCoincidence_84")
SketchConstraintPerpendicular_1 = Sketch_8.setPerpendicular(SketchLine_57.result(), SketchLine_56.result())
-SketchProjection_8 = Sketch_8.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_7&ExtrusionCut_4_2/Modfied_4"))
+SketchProjection_8 = Sketch_8.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_1&ExtrusionCut_4_2/Modfied_4"))
SketchLine_58 = SketchProjection_8.createdFeature()
SketchLine_58.setName("SketchLine_59")
SketchLine_58.result().setName("SketchLine_59")
-SketchProjection_9 = Sketch_8.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_8&Extrusion_1_1/Generated_Face_1"))
+SketchProjection_9 = Sketch_8.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_8&Extrusion_1_1/Generated_Face_7"))
SketchLine_59 = SketchProjection_9.createdFeature()
SketchLine_59.setName("SketchLine_60")
SketchLine_59.result().setName("SketchLine_60")
SketchConstraintLength_2 = Sketch_1.setLength(SketchLine_10.result(), "d1*coeff")
model.do()
Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("WIRE", "Sketch_1/Wire-SketchLine_1f-SketchArc_1_2f-SketchLine_3f-SketchArc_2_2r-SketchLine_4f-SketchArc_3_2r-SketchLine_5f-SketchArc_4_2f-SketchLine_6f-SketchLine_7r-SketchLine_8r-SketchArc_5_2r-SketchLine_9r-SketchArc_6_2f-SketchLine_10r-SketchArc_7_2f-SketchLine_11r-SketchArc_8_2r-SketchLine_12r-SketchLine_13r")], model.selection(), "epaisseur_plat*coeff", 0)
-Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_19"), "d2*coeff", True)
+Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_1"), "d2*coeff", True)
Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Plane_1"))
-SketchProjection_1 = Sketch_2.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_14&Extrusion_1_1/Generated_Face_13"))
+SketchProjection_1 = Sketch_2.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_7&Extrusion_1_1/Generated_Face_6"), False)
SketchLine_14 = SketchProjection_1.createdFeature()
-SketchProjection_2 = Sketch_2.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_12&Extrusion_1_1/To_Face_1"))
+SketchProjection_2 = Sketch_2.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_8&Extrusion_1_1/To_Face_1"), False)
SketchLine_15 = SketchProjection_2.createdFeature()
SketchLine_16 = Sketch_2.addLine(-24.99999999999999, -35.00000000000001, -31.24999999999999, -35.00000000000001)
SketchConstraintCoincidence_25 = Sketch_2.setCoincident(SketchAPI_Line(SketchLine_14).endPoint(), SketchLine_16.startPoint())
#SketchConstraintDistance_14 = Sketch_2.setDistance(SketchLine_17.startPoint(), SketchLine_23.result(), "(e3-epaisseur_plat)*coeff")
model.do()
Extrusion_2 = model.addExtrusion(Part_1_doc, [model.selection("WIRE", "Sketch_2/Wire-SketchLine_16r-SketchArc_9_2f-SketchLine_17r-SketchArc_10_2f-SketchLine_18r-SketchLine_19r-SketchLine_20r-SketchArc_11_2r-SketchLine_21r-SketchArc_12_2r-SketchLine_22r-SketchLine_23f")], model.selection(), "d6*coeff", 0)
-Sketch_3 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_2_1/Generated_Face_9"))
+Sketch_3 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_2_1/Generated_Face_3"))
SketchLine_24 = Sketch_3.addLine(46.25, 22.91561885925604, 51.3, 20.00000000000001)
-SketchLine_25 = Sketch_3.addLine(model.selection("EDGE", "Extrusion_2_1/Generated_Face_9&Extrusion_2_1/To_Face_1"))
+SketchLine_25 = Sketch_3.addLine(model.selection("EDGE", "Extrusion_2_1/Generated_Face_3&Extrusion_2_1/To_Face_1"))
#SketchConstraintCoincidence_41 = Sketch_3.setCoincident(SketchLine_24.startPoint(), SketchLine_25.result())
SketchLine_26 = Sketch_3.addLine(51.3, 20.00000000000001, 62.50000000000001, 20.00000000000001)
SketchConstraintCoincidence_42 = Sketch_3.setCoincident(SketchLine_24.endPoint(), SketchLine_26.startPoint())
SketchConstraintVertical_13 = Sketch_3.setVertical(SketchLine_33.result())
SketchConstraintVertical_14 = Sketch_3.setVertical(SketchLine_31.result())
SketchConstraintAngle_1 = Sketch_3.setAngleComplementary(SketchLine_26.result(), SketchLine_24.result(), "angle")
-SketchProjection_3 = Sketch_3.addProjection(model.selection("EDGE", "Extrusion_2_1/Generated_Face_8&Extrusion_2_1/Generated_Face_7"))
+SketchProjection_3 = Sketch_3.addProjection(model.selection("EDGE", "Extrusion_2_1/Generated_Face_5&Extrusion_2_1/Generated_Face_4"))
SketchLine_34 = SketchProjection_3.createdFeature()
-SketchProjection_4 = Sketch_3.addProjection(model.selection("EDGE", "Extrusion_2_1/Generated_Face_11&Extrusion_2_1/Generated_Face_10"))
+SketchProjection_4 = Sketch_3.addProjection(model.selection("EDGE", "Extrusion_2_1/Generated_Face_2&Extrusion_2_1/Generated_Face_1"))
SketchLine_35 = SketchProjection_4.createdFeature()
SketchConstraintCoincidence_51 = Sketch_3.setCoincident(SketchLine_28.endPoint(), SketchLine_34.result())
SketchConstraintDistance_15 = Sketch_3.setDistance(SketchLine_31.result(), SketchLine_33.endPoint(), "(d6-d5)*coeff")
ExtrusionCut_1.result().setName("ExtrusionCut_1_1")
ExtrusionCut_2 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_3/Face-SketchLine_30r-SketchLine_31r-SketchLine_32r-SketchLine_33r")], model.selection(), model.selection("FACE", "Extrusion_1_1/To_Face_1"), 0, model.selection(), 0, [model.selection("SOLID", "ExtrusionCut_1_1")])
ExtrusionCut_2.result().setName("ExtrusionCut_2_1")
-Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_19"), "d3*coeff", True)
+Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_1"), "d3*coeff", True)
Sketch_4 = model.addSketch(Part_1_doc, model.selection("FACE", "Plane_2"))
-SketchProjection_5 = Sketch_4.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_16&Extrusion_1_1/To_Face_1"))
+SketchProjection_5 = Sketch_4.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_4&Extrusion_1_1/To_Face_1"))
SketchLine_36 = SketchProjection_5.createdFeature()
SketchProjection_6 = Sketch_4.addProjection(model.selection("EDGE", "ExtrusionCut_2_1/Modfied_8&ExtrusionCut_2_1/Modfied_9"))
SketchLine_37 = SketchProjection_6.createdFeature()
-SketchProjection_7 = Sketch_4.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_15&Extrusion_1_1/Generated_Face_14"))
+SketchProjection_7 = Sketch_4.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_6&Extrusion_1_1/Generated_Face_5"))
SketchLine_38 = SketchProjection_7.createdFeature()
SketchLine_39 = Sketch_4.addLine(-25, -35.00000000000001, -31.24999999999999, -35.00000000000001)
SketchConstraintCoincidence_55 = Sketch_4.setCoincident(SketchAPI_Line(SketchLine_37).startPoint(), SketchLine_39.startPoint())
SketchConstraintDistance_20 = Sketch_4.setDistance(SketchLine_41.startPoint(), SketchLine_39.result(), "h2")
model.do()
Extrusion_3 = model.addExtrusion(Part_1_doc, [model.selection("WIRE", "Sketch_4/Wire-SketchLine_39r-SketchArc_13_2f-SketchLine_40r-SketchLine_41r-SketchLine_42r-SketchArc_14_2r-SketchLine_43r-SketchLine_44f")], model.selection(), 0, "e1*coeff")
-Sketch_5 = model.addSketch(Part_1_doc, model.selection("FACE", "ExtrusionCut_1_1/Modfied_6"))
+Sketch_5 = model.addSketch(Part_1_doc, model.selection("FACE", "ExtrusionCut_1_1/Modfied_4"))
SketchCircle_1 = Sketch_5.addCircle(70, 17.5, 3.125)
-SketchLine_45 = Sketch_5.addLine(model.selection("EDGE", "ExtrusionCut_1_1/Modfied_6&ExtrusionCut_1_1/Modfied_5"))
+SketchLine_45 = Sketch_5.addLine(model.selection("EDGE", "ExtrusionCut_1_1/Modfied_5&ExtrusionCut_1_1/Modfied_4"))
SketchConstraintDistance_21 = Sketch_5.setDistance(SketchCircle_1.center(), SketchLine_45.result(), "d9*coeff")
-SketchProjection_8 = Sketch_5.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_9&Extrusion_1_1/Generated_Face_8"))
+SketchProjection_8 = Sketch_5.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_12&Extrusion_1_1/Generated_Face_11"))
SketchLine_46 = SketchProjection_8.createdFeature()
-SketchProjection_9 = Sketch_5.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_20&Extrusion_1_1/Generated_Face_19"))
+SketchProjection_9 = Sketch_5.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_20&Extrusion_1_1/Generated_Face_1"))
SketchLine_47 = SketchProjection_9.createdFeature()
SketchConstraintDistance_22 = Sketch_5.setDistance(SketchCircle_1.center(), SketchLine_47.result(), "d1*coeff")
SketchConstraintRadius_7 = Sketch_5.setRadius(SketchCircle_1.results()[1], "r_trou")
model.do()
-ExtrusionCut_3 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_5/Face-SketchCircle_1_2f")], model.selection(), model.selection("FACE", "ExtrusionCut_1_1/Modfied_4"), 0, model.selection(), 0, [model.selection("SOLID", "ExtrusionCut_2_1")])
+ExtrusionCut_3 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_5/Face-SketchCircle_1_2f")], model.selection(), model.selection("FACE", "ExtrusionCut_1_1/Modfied_6"), 0, model.selection(), 0, [model.selection("SOLID", "ExtrusionCut_2_1")])
ExtrusionCut_3.result().setName("ExtrusionCut_3_1")
-Sketch_6 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_14"))
+Sketch_6 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_6"))
SketchCircle_2 = Sketch_6.addCircle(70, -17.5, 5)
-SketchLine_48 = Sketch_6.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_14&Extrusion_1_1/To_Face_1"))
-SketchProjection_10 = Sketch_6.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_19&Extrusion_1_1/Generated_Face_18"))
+SketchLine_48 = Sketch_6.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_6&Extrusion_1_1/To_Face_1"))
+SketchProjection_10 = Sketch_6.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_2&Extrusion_1_1/Generated_Face_1"))
SketchLine_49 = SketchProjection_10.createdFeature()
SketchConstraintDistance_23 = Sketch_6.setDistance(SketchCircle_2.center(), SketchLine_49.result(), "d1*coeff")
SketchConstraintDistance_23.setName("SketchConstraintDistance_24")
SketchConstraintDistance_24 = Sketch_6.setDistance(SketchCircle_2.center(), SketchLine_50.result(), "d_trou")
SketchConstraintDistance_24.setName("SketchConstraintDistance_25")
model.do()
-ExtrusionCut_4 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_6/Face-SketchCircle_2_2f")], model.selection(), model.selection("FACE", "Extrusion_1_1/Generated_Face_4"), 0, model.selection(), 0, [model.selection("SOLID", "Extrusion_1_1")])
+ExtrusionCut_4 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_6/Face-SketchCircle_2_2f")], model.selection(), model.selection("FACE", "Extrusion_1_1/Generated_Face_16"), 0, model.selection(), 0, [model.selection("SOLID", "Extrusion_1_1")])
ExtrusionCut_4.result().setName("ExtrusionCut_4_1")
-Sketch_7 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_8"))
+Sketch_7 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_12"))
SketchLine_51 = Sketch_7.addLine(110, 21.46600893000899, 110, 7.22841614740048)
SketchLine_51.setAuxiliary(True)
-SketchLine_52 = Sketch_7.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_9&Extrusion_1_1/Generated_Face_8"))
+SketchLine_52 = Sketch_7.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_12&Extrusion_1_1/Generated_Face_11"))
SketchConstraintCoincidence_65 = Sketch_7.setCoincident(SketchLine_51.startPoint(), SketchLine_52.result())
SketchConstraintCoincidence_66 = Sketch_7.setCoincident(SketchLine_51.endPoint(), SketchLine_52.result())
-SketchLine_53 = Sketch_7.addLine(model.selection("EDGE", "Extrusion_1_1/From_Face_1&Extrusion_1_1/Generated_Face_8"))
+SketchLine_53 = Sketch_7.addLine(model.selection("EDGE", "Extrusion_1_1/From_Face_1&Extrusion_1_1/Generated_Face_12"))
SketchArc_15 = Sketch_7.addArc(102.5, 7.22841614740048, 110, 7.22841614740048, 104.5, 0, True)
SketchConstraintCoincidence_67 = Sketch_7.setCoincident(SketchLine_51.endPoint(), SketchArc_15.startPoint())
SketchConstraintTangent_29 = Sketch_7.setTangent(SketchLine_51.result(), SketchArc_15.results()[1])
SketchLine_56 = Sketch_7.addLine(110, 12.5, 0, 12.5)
SketchLine_56.setAuxiliary(True)
SketchConstraintCoincidence_73 = Sketch_7.setCoincident(SketchLine_56.startPoint(), SketchLine_52.result())
-SketchLine_57 = Sketch_7.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_20&Extrusion_1_1/Generated_Face_19"))
+SketchLine_57 = Sketch_7.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_20&Extrusion_1_1/Generated_Face_1"))
SketchConstraintCoincidence_74 = Sketch_7.setCoincident(SketchLine_56.endPoint(), SketchLine_57.result())
SketchConstraintMiddle_1 = Sketch_7.setMiddlePoint(SketchLine_56.endPoint(), SketchLine_57.result())
SketchConstraintMiddle_2 = Sketch_7.setMiddlePoint(SketchLine_56.startPoint(), SketchLine_52.result())
-SketchProjection_11 = Sketch_7.addProjection(model.selection("EDGE", "Extrusion_1_1/To_Face_1&ExtrusionCut_4_1/Modfied_1"))
+SketchProjection_11 = Sketch_7.addProjection(model.selection("EDGE", "Extrusion_1_1/To_Face_1&ExtrusionCut_4_1/Modfied_2"))
SketchLine_58 = SketchProjection_11.createdFeature()
SketchLine_59 = Sketch_7.addLine(55.00000000000002, 0, 55.00000000000002, 25)
SketchLine_59.setAuxiliary(True)
Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "PartSet/XOY"), "22.5*coeff", False)
Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Plane_1"), "45*coeff", True)
Sketch_3 = model.addSketch(Part_1_doc, model.selection("FACE", "Plane_2"))
-SketchProjection_3 = Sketch_3.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_4&Extrusion_1_1/Generated_Face_3"))
+SketchProjection_3 = Sketch_3.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_4&Extrusion_1_1/Generated_Face_1"))
SketchLine_18 = SketchProjection_3.createdFeature()
SketchLine_18.setName("SketchLine_4")
SketchLine_18.result().setName("SketchLine_4")
SketchConstraintDistance_14 = Sketch_3.setDistance(SketchLine_23.result(), SketchLine_25.startPoint(), "2.5*coeff")
SketchConstraintDistance_14.setName("SketchConstraintDistance_12")
model.do()
-Extrusion_3 = model.addExtrusion(Part_1_doc, [model.selection("WIRE", "Sketch_3/Wire-SketchLine_9r-SketchLine_12r-SketchLine_14r-SketchLine_26r-SketchLine_27r-SketchLine_28r")], model.selection(), model.selection("FACE", "Extrusion_1_1/Generated_Face_1"), 0, model.selection(), 0)
+Extrusion_3 = model.addExtrusion(Part_1_doc, [model.selection("WIRE", "Sketch_3/Wire-SketchLine_9r-SketchLine_12r-SketchLine_14r-SketchLine_26r-SketchLine_27r-SketchLine_28r")], model.selection(), model.selection("FACE", "Extrusion_1_1/Generated_Face_3"), 0, model.selection(), 0)
Boolean_1 = model.addSmash(Part_1_doc, [model.selection("SOLID", "Extrusion_3_1")], [model.selection("SOLID", "ExtrusionCut_4_1")])
Boolean_1.result().setName("Boolean_1_1")
ExtrusionCut_5 = model.addExtrusionCut(Part_1_doc, [model.selection("WIRE", "Sketch_3/Wire-SketchCircle_8_2f")], model.selection(), 10, 0, [model.selection("SOLID", "Boolean_1_1_1")])
SketchConstraintLength_10 = Sketch_4.setLength(SketchLine_36.result(), 12.975642079145)
SketchConstraintLength_10.setName("SketchConstraintLength_7")
model.do()
-Extrusion_4 = model.addExtrusion(Part_1_doc, [model.selection("WIRE", "Sketch_4/Wire-SketchLine_19f-SketchLine_20f-SketchLine_24f-SketchLine_21f-SketchLine_22f-SketchLine_23f")], model.selection(), model.selection("FACE", "Extrusion_1_1/Generated_Face_3"), 0, model.selection(), 0)
+Extrusion_4 = model.addExtrusion(Part_1_doc, [model.selection("WIRE", "Sketch_4/Wire-SketchLine_19f-SketchLine_20f-SketchLine_24f-SketchLine_21f-SketchLine_22f-SketchLine_23f")], model.selection(), model.selection("FACE", "Extrusion_1_1/Generated_Face_1"), 0, model.selection(), 0)
Boolean_2 = model.addSmash(Part_1_doc, [model.selection("SOLID", "ExtrusionCut_6_1_1"), model.selection("SOLID", "Extrusion_4_1")], [model.selection("SOLID", "ExtrusionCut_6_1_2")])
Boolean_2.result().setName("Boolean_2_1")
ExtrusionCut_7 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_4/Face-SketchCircle_9_2f")], model.selection(), 0, 10, [model.selection("SOLID", "Boolean_2_1_1")])
SketchConstraintRadius_13.setName("SketchConstraintRadius_10")
model.do()
Extrusion_6 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_6/Face-SketchLine_33r-SketchArc_6_2r-SketchLine_36r-SketchLine_37f")], model.selection(), "77*coeff-h_p*coeff", 0)
-Sketch_7 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_6_1/Generated_Face_3"))
+Sketch_7 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_6_1/Generated_Face_1"))
SketchLine_46 = Sketch_7.addLine(37, -8.881784197001252e-16, -22, 1.665334536937735e-15)
SketchLine_46.setName("SketchLine_38")
SketchLine_46.result().setName("SketchLine_38")
SketchLine_46.setAuxiliary(True)
-SketchLine_47 = Sketch_7.addLine(model.selection("EDGE", "Extrusion_6_1/Generated_Face_3&Extrusion_6_1/To_Face_1"))
+SketchLine_47 = Sketch_7.addLine(model.selection("EDGE", "Extrusion_6_1/Generated_Face_1&Extrusion_6_1/To_Face_1"))
SketchLine_47.setName("SketchLine_39")
SketchLine_47.result().setName("SketchLine_39")
SketchConstraintCoincidence_69 = Sketch_7.setCoincident(SketchLine_46.startPoint(), SketchLine_47.result())
ExtrusionCut_9 = model.addExtrusionCut(Part_1_doc, [model.selection("WIRE", "Sketch_7/Wire-SketchCircle_10_2f")], model.selection(), 0, "10*coeff", [model.selection("SOLID", "Extrusion_6_1")])
ExtrusionCut_9.result().setName("ExtrusionCut_9_1")
ExtrusionCut_10 = model.addExtrusionCut(Part_1_doc, [model.selection("WIRE", "Sketch_1/Wire-SketchArc_7_2r-SketchArc_10_2f-SketchLine_44r-SketchArc_12_2r-SketchArc_13_2r-SketchLine_48r-SketchLine_43f-SketchArc_14_2f"), model.selection("FACE", "Sketch_1/Face-SketchCircle_11_2f"), model.selection("WIRE", "Sketch_1/Wire-SketchLine_50f-SketchArc_15_2f-SketchArc_16_2r-SketchLine_51r-SketchArc_17_2r-SketchLine_52f"), model.selection("FACE", "Sketch_1/Face-SketchLine_53f-SketchArc_18_2r-SketchLine_54f-SketchArc_19_2r-SketchArc_20_2f-SketchLine_55r-SketchArc_21_2f-SketchArc_22_2r"), model.selection("FACE", "Sketch_1/Face-SketchArc_8_2r-SketchArc_9_2f-SketchLine_42r-SketchLine_45f-SketchLine_46r-SketchArc_11_2r")], model.selection(), model.selection("FACE", "ExtrusionCut_3_2/Modfied_1"), 0, model.selection(), 0, [model.selection("SOLID", "ExtrusionCut_8_1_2")])
-Sketch_8 = model.addSketch(Part_1_doc, model.selection("FACE", "ExtrusionCut_9_1/Modfied_2"))
+Sketch_8 = model.addSketch(Part_1_doc, model.selection("FACE", "ExtrusionCut_9_1/Modfied_1"))
SketchLine_50 = Sketch_8.addLine(37, 14.80042035331162, 37, -14)
SketchLine_50.setName("SketchLine_56")
SketchLine_50.result().setName("SketchLine_56")
SketchLine_50.setAuxiliary(True)
-SketchLine_51 = Sketch_8.addLine(model.selection("EDGE", "ExtrusionCut_9_1/Modfied_2&Extrusion_6_1/To_Face_1"))
+SketchLine_51 = Sketch_8.addLine(model.selection("EDGE", "ExtrusionCut_9_1/Modfied_1&Extrusion_6_1/To_Face_1"))
SketchLine_51.setName("SketchLine_57")
SketchLine_51.result().setName("SketchLine_57")
SketchConstraintCoincidence_73 = Sketch_8.setCoincident(SketchLine_50.startPoint(), SketchLine_51.result())
SketchConstraintCoincidence_73.setName("SketchConstraintCoincidence_81")
SketchConstraintCoincidence_74 = Sketch_8.setCoincident(SketchLine_50.endPoint(), SketchLine_51.result())
SketchConstraintCoincidence_74.setName("SketchConstraintCoincidence_82")
-SketchLine_52 = Sketch_8.addLine(model.selection("EDGE", "Extrusion_6_1/Generated_Face_4&ExtrusionCut_9_1/Modfied_2"))
+SketchLine_52 = Sketch_8.addLine(model.selection("EDGE", "Extrusion_6_1/Generated_Face_4&ExtrusionCut_9_1/Modfied_1"))
SketchLine_52.setName("SketchLine_58")
SketchLine_52.result().setName("SketchLine_58")
SketchArc_21 = Sketch_8.addArc(34, -14, 37, -14, 34.00000001126211, -17, True)
SketchArc_22.results()[1].setName("SketchArc_24_2")
model.do()
ExtrusionCut_11 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_8/Face-SketchArc_23_2r-SketchLine_59f-SketchLine_60r"), model.selection("WIRE", "Sketch_8/Wire-SketchArc_24_2r-SketchLine_62f-SketchLine_63r")], model.selection(), 0, "100*coeff", [model.selection("SOLID", "ExtrusionCut_9_1")])
-Sketch_9 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_5_1/Generated_Face_3"))
+Sketch_9 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_5_1/Generated_Face_1"))
SketchLine_58 = Sketch_9.addLine(-32, -19, -32, -3.575047476349699)
SketchLine_58.setName("SketchLine_64")
SketchLine_58.result().setName("SketchLine_64")
SketchLine_58.setAuxiliary(True)
-SketchLine_59 = Sketch_9.addLine(model.selection("EDGE", "Extrusion_5_1/Generated_Face_3&Extrusion_5_1/Generated_Face_2"))
+SketchLine_59 = Sketch_9.addLine(model.selection("EDGE", "Extrusion_5_1/Generated_Face_1&Extrusion_5_1/Generated_Face_2"))
SketchLine_59.setName("SketchLine_65")
SketchLine_59.result().setName("SketchLine_65")
SketchConstraintCoincidence_81 = Sketch_9.setCoincident(SketchLine_58.startPoint(), SketchLine_59.result())
SketchConstraintCoincidence_81.setName("SketchConstraintCoincidence_89")
SketchConstraintCoincidence_82 = Sketch_9.setCoincident(SketchLine_58.endPoint(), SketchLine_59.result())
SketchConstraintCoincidence_82.setName("SketchConstraintCoincidence_90")
-SketchLine_60 = Sketch_9.addLine(model.selection("EDGE", "Extrusion_5_1/Generated_Face_3&Extrusion_5_1/From_Face_1"))
+SketchLine_60 = Sketch_9.addLine(model.selection("EDGE", "Extrusion_5_1/Generated_Face_1&Extrusion_5_1/From_Face_1"))
SketchLine_60.setName("SketchLine_66")
SketchLine_60.result().setName("SketchLine_66")
SketchArc_23 = Sketch_9.addArc(-29, -19, -32, -19, -29.00002201340376, -22, False)