//! \returns index started from zero, or -1 if object is invisible or belongs to another document
MODEL_EXPORT virtual const int index(std::shared_ptr<ModelAPI_Object> theObject,
const bool theAllowFolder = false);
+ //! Returns the shape index in the result.
+ //! \param theResult result
+ //! \param theShape result subshape
+ //! \returns index started from zero, or -1 if shape is not stored or is not a subshape of the result
+ MODEL_EXPORT virtual const int index(std::shared_ptr<ModelAPI_Result> theResult,
+ std::shared_ptr<GeomAPI_Shape> theShape,
+ const bool theAllowFolder = false);
+ //! Returns the shape index in the result.
+ //! \param theResult result
+ //! \param theShape result subshape
+ //! \returns index started from zero, or -1 if shape is not stored or is not a subshape of the result
+ MODEL_EXPORT virtual const int index(std::shared_ptr<ModelAPI_Result> theResult,
+ std::shared_ptr<GeomAPI_Shape> theShape,
+ const bool theAllowFolder = false);
+
//! Internal sub-document by ID
MODEL_EXPORT virtual std::shared_ptr<Model_Document> subDoc(int theDocID);
#include <TDF_CopyLabel.hxx>
#include <TDF_ListIteratorOfLabelList.hxx>
+ // relocate to other file
+ #include <TNaming_Builder.hxx>
+ #include <TNaming_NamedShape.hxx>
+
++// relocate to other file
++#include <TNaming_Builder.hxx>
++#include <TNaming_NamedShape.hxx>
++
+#include <TNaming_Builder.hxx>
+#include <TNaming_NamedShape.hxx>
+
#if OCC_VERSION_LARGE < 0x07080000
+
#include <TDF_LabelMapHasher.hxx>
+
// for TDF_Label map usage
static Standard_Integer HashCode(const TDF_Label& theLab, const Standard_Integer theUpper);
static Standard_Boolean IsEqual(const TDF_Label& theLab1, const TDF_Label& theLab2);
aMain = ModelAPI_Tools::mainBody(aMain);
int anIndex = index(theResult, theShape);
- Handle(TDataStd_IntegerArray) anColor;
-
- if (anIndex != -1)
- {
- TDF_Label aResultLabel;
- if (aMain.get())
- aResultLabel = resultLabel(theResult->data(), index(aMain));
- else
- aResultLabel = resultLabel(theResult->data(), index(theResult));
-
- TDF_Label anAttributeLabel = subShapeLabel(aResultLabel, anIndex).FindChild(TAG_FEATURE_ARGUMENTS);
- anAttributeLabel.FindAttribute(TDataStd_IntegerArray::GetID(), anColor);
+ if (anIndex == -1) {
+ return opencascade::handle<TDF_Attribute>(nullptr);
}
- return anColor;
+
+ TDF_Label aResultLabel;
+ if (aMain.get())
+ aResultLabel = resultLabel(theResult->data(), index(aMain));
+ else
+ aResultLabel = resultLabel(theResult->data(), index(theResult));
+
+ TDF_Label anAttributeLabel = subShapeLabel(aResultLabel, anIndex).FindChild(TAG_FEATURE_ARGUMENTS);
+
+ Handle(TDF_Attribute) anAttr;
- anAttributeLabel.FindAttribute(theID, anAttr);
++ anAttributeLabel.FindAttribute(theID, anAttr); // ? TDataStd_IntegerArray::GetID() or TDataStd_Integer::GetID()
+ return anAttr;
}
+ void Model_Objects::getColoredShapes(const std::shared_ptr<ModelAPI_Result> theResult,
+ std::map<std::shared_ptr<GeomAPI_Shape>, std::vector<int>>& theColoredShapes)
+ {
+ ResultBodyPtr aMainBody = std::dynamic_pointer_cast<ModelAPI_ResultBody>(theResult);
+ aMainBody = ModelAPI_Tools::mainBody(aMainBody);
+ TDF_Label aShapesLabel;
+ if (aMainBody.get())
+ aShapesLabel = shapesFromResult(resultLabel(theResult->data(), index(aMainBody)));
+ else
+ aShapesLabel = shapesFromResult(resultLabel(theResult->data(), index(theResult)));
+
+ for (TDF_ChildIterator aChilds(aShapesLabel); aChilds.More(); aChilds.Next())
+ {
+ TDF_Label aCurSubShape = aChilds.Value();
+ Handle(TNaming_NamedShape) aNamedShape;
+ aCurSubShape.FindAttribute(TNaming_NamedShape::GetID(), aNamedShape);
+ if (aNamedShape.IsNull())
+ continue;
+
+ std::shared_ptr<GeomAPI_Shape> aSub(new GeomAPI_Shape);
+ aSub->setImpl(new TopoDS_Shape(aNamedShape->Get()));
+
+ Handle(TDataStd_IntegerArray) aColorAttr;
+ std::vector<int> aColor;
+ aCurSubShape.FindChild(TAG_FEATURE_ARGUMENTS).FindAttribute(TDataStd_IntegerArray::GetID(), aColorAttr);
+ if (aColorAttr.IsNull())
+ continue;
+ for (int anIndex = aColorAttr->Lower(); anIndex <= aColorAttr->Upper(); ++anIndex)
+ aColor.push_back(aColorAttr->Value(anIndex));
+ if (aColor.size() != 3)
+ continue;
+
+ theColoredShapes[aSub] = aColor;
+ }
+ }
+
+ void Model_Objects::removeShapeColors(const std::shared_ptr<ModelAPI_Result> theResult)
+ {
+ ResultBodyPtr aMainBody = std::dynamic_pointer_cast<ModelAPI_ResultBody>(theResult);
+ aMainBody = ModelAPI_Tools::mainBody(aMainBody);
+
+ TDF_Label aShapesLabel;
+ if (aMainBody.get())
+ aShapesLabel = shapesFromResult(resultLabel(theResult->data(), index(aMainBody)));
+ else
+ {
+ ResultPartPtr aResPart = std::dynamic_pointer_cast<ModelAPI_ResultPart>(theResult);
+ if (!aResPart.get())
+ return;
+ aShapesLabel = shapesFromResult(resultLabel(theResult->data(), index(aResPart)));
+ }
+ for (TDF_ChildIterator aChilds(aShapesLabel); aChilds.More(); aChilds.Next())
+ {
+ TDF_Label aCurSubShape = aChilds.Value();
+ Handle(TNaming_NamedShape) aNamedShape;
+ aCurSubShape.FindAttribute(TNaming_NamedShape::GetID(), aNamedShape);
+ if (aNamedShape.IsNull())
+ continue;
+
+ aCurSubShape.FindChild(TAG_FEATURE_ARGUMENTS).ForgetAttribute(TDataStd_IntegerArray::GetID());
+ }
+ }
+
++TDF_Label Model_Objects::shapesFromResult(TDF_Label theResult) const
++{
++ return theResult.Father().FindChild(TAG_RESULT_SHAPES);
++}
++
+void Model_Objects::getSubShapesWithEdgeThickness(
+ const std::shared_ptr<ModelAPI_Result> theResult,
+ std::map<std::shared_ptr<GeomAPI_Shape>, int>& oShapes
+) const {
+ ResultBodyPtr aMainBody = std::dynamic_pointer_cast<ModelAPI_ResultBody>(theResult);
+ aMainBody = ModelAPI_Tools::mainBody(aMainBody);
+ TDF_Label aShapesLabel;
+ if (aMainBody.get())
+ aShapesLabel = shapesFromResult(resultLabel(theResult->data(), index(aMainBody)));
+ else
+ aShapesLabel = shapesFromResult(resultLabel(theResult->data(), index(theResult)));
+
+ for (TDF_ChildIterator aChilds(aShapesLabel); aChilds.More(); aChilds.Next())
+ {
+ TDF_Label aCurSubShape = aChilds.Value();
+ Handle(TNaming_NamedShape) aNamedShape;
+ aCurSubShape.FindAttribute(TNaming_NamedShape::GetID(), aNamedShape);
+ if (aNamedShape.IsNull())
+ continue;
+
+ std::shared_ptr<GeomAPI_Shape> aSub(new GeomAPI_Shape);
+ aSub->setImpl(new TopoDS_Shape(aNamedShape->Get()));
+
+ Handle(TDataStd_Integer) aEdgeThicknessAttr;
+ aCurSubShape.FindChild(TAG_FEATURE_ARGUMENTS).FindAttribute(TDataStd_Integer::GetID(), aEdgeThicknessAttr);
+ if (aEdgeThicknessAttr.IsNull())
+ continue;
+
+ oShapes[aSub] = aEdgeThicknessAttr->Get();
+ }
+}
+
+void Model_Objects::removeSubShapeEdgeThickness(const std::shared_ptr<ModelAPI_Result> theResult) const
+{
+ ResultBodyPtr aMainBody = std::dynamic_pointer_cast<ModelAPI_ResultBody>(theResult);
+ aMainBody = ModelAPI_Tools::mainBody(aMainBody);
+
+ TDF_Label aShapesLabel;
+ if (aMainBody.get())
+ aShapesLabel = shapesFromResult(resultLabel(theResult->data(), index(aMainBody)));
+ else
+ {
+ ResultPartPtr aResPart = std::dynamic_pointer_cast<ModelAPI_ResultPart>(theResult);
+ if (!aResPart.get())
+ return;
+ aShapesLabel = shapesFromResult(resultLabel(theResult->data(), index(aResPart)));
+ }
+ for (TDF_ChildIterator aChilds(aShapesLabel); aChilds.More(); aChilds.Next())
+ {
+ TDF_Label aCurSubShape = aChilds.Value();
+ Handle(TNaming_NamedShape) aNamedShape;
+ aCurSubShape.FindAttribute(TNaming_NamedShape::GetID(), aNamedShape);
+ if (aNamedShape.IsNull())
+ continue;
+
+ aCurSubShape.FindChild(TAG_FEATURE_ARGUMENTS).ForgetAttribute(TDataStd_Integer::GetID());
+ }
+}
+
static std::wstring composeName(const std::string& theFeatureKind, const int theIndex)
{
std::stringstream aNameStream;
std::shared_ptr<ModelAPI_Result> theResult,
std::shared_ptr<GeomAPI_Shape> theShape);
+ void getSubShapesWithEdgeThickness(
+ const std::shared_ptr<ModelAPI_Result> theResult,
+ std::map<std::shared_ptr<GeomAPI_Shape>, int>& oShapes
+ ) const;
+
+ void removeSubShapeEdgeThickness(const std::shared_ptr<ModelAPI_Result> theResult) const;
+ //! Get colored shapes from result
+ void getColoredShapes(const std::shared_ptr<ModelAPI_Result> theResult,
+ std::map<std::shared_ptr<GeomAPI_Shape>, std::vector<int>>& theColoredShapes);
+
+ //! Forget subshape colors
+ void removeShapeColors(const std::shared_ptr<ModelAPI_Result> theResult);
//! Sets the owner of this manager
void setOwner(DocumentPtr theDoc);
}
}
- void Model_ResultBody::addShapeColor( const std::wstring& theName,std::vector<int>& color) {
+void Model_ResultBody::setSubShapeEdgeThickness(
+ const std::shared_ptr<ModelAPI_Result> theResult,
+ const std::shared_ptr<GeomAPI_Shape> theSubShape,
+ int theEdgeThickness
+)
+{
+ TopoDS_Shape aShape = shape()->impl<TopoDS_Shape>();
+ TopoDS_Shape aSubShape = theSubShape->impl<TopoDS_Shape>();
+ if (!shape()->isSubShape(theSubShape))
+ return;
+
+ Model_Objects* anObjects = std::dynamic_pointer_cast<Model_Document>(document())->objects();
+ document()->storeShape(data(), theResult, theSubShape);
+
+ Handle(TDataStd_Integer) aThickness = new TDataStd_Integer();
+ aThickness->Set(theEdgeThickness);
+ anObjects->setAttribute(aThickness, theResult, theSubShape);
+}
+
+int Model_ResultBody::getSubShapeEdgeThickness(const std::shared_ptr<ModelAPI_Result> theResult, const std::shared_ptr<GeomAPI_Shape> theSubShape) const
+{
+ TopoDS_Shape aShape = shape()->impl<TopoDS_Shape>();
+ TopoDS_Shape aSubShape = theSubShape->impl<TopoDS_Shape>();
+ if (!shape()->isSubShape(theSubShape))
+ return -1;
+
+ Model_Objects* anObjects = std::dynamic_pointer_cast<Model_Document>(document())->objects();
+ auto anAttr = Handle(TDataStd_Integer)::DownCast(anObjects->getAttribute(TDataStd_Integer::GetID(), theResult, theSubShape));
+ if (anAttr.IsNull())
+ return;
+
+ return anAttr->Get();
+}
+
+void Model_ResultBody::getSubShapesWithEdgeThickness(
+ const std::shared_ptr<ModelAPI_Result> theResult,
+ std::map<std::shared_ptr<GeomAPI_Shape>, int>& oShapes
+) const
+{
+ Model_Objects* anObjects = std::dynamic_pointer_cast<Model_Document>(document())->objects();
+ anObjects->getSubShapesWithEdgeThickness(theResult, oShapes);
+}
+
++void Model_ResultBody::setSubShapeEdgeThickness(
++ const std::shared_ptr<ModelAPI_Result> theResult,
++ const std::shared_ptr<GeomAPI_Shape> theSubShape,
++ int theEdgeThickness
++)
++{
++ TopoDS_Shape aShape = shape()->impl<TopoDS_Shape>();
++ TopoDS_Shape aSubShape = theSubShape->impl<TopoDS_Shape>();
++ if (!shape()->isSubShape(theSubShape))
++ return;
++
++ Model_Objects* anObjects = std::dynamic_pointer_cast<Model_Document>(document())->objects();
++ document()->storeShape(data(), theResult, theSubShape);
++
++ Handle(TDataStd_Integer) aThickness = new TDataStd_Integer();
++ aThickness->Set(theEdgeThickness);
++ anObjects->setAttribute(aThickness, theResult, theSubShape);
++}
++
++int Model_ResultBody::getSubShapeEdgeThickness(const std::shared_ptr<ModelAPI_Result> theResult, const std::shared_ptr<GeomAPI_Shape> theSubShape) const
++{
++ TopoDS_Shape aShape = shape()->impl<TopoDS_Shape>();
++ TopoDS_Shape aSubShape = theSubShape->impl<TopoDS_Shape>();
++ if (!shape()->isSubShape(theSubShape))
++ return -1;
++
++ Model_Objects* anObjects = std::dynamic_pointer_cast<Model_Document>(document())->objects();
++ auto anAttr = Handle(TDataStd_Integer)::DownCast(anObjects->getAttribute(TDataStd_Integer::GetID(), theResult, theSubShape));
++ if (anAttr.IsNull())
++ return;
+
++ return anAttr->Get();
++}
++
++void Model_ResultBody::getSubShapesWithEdgeThickness(
++ const std::shared_ptr<ModelAPI_Result> theResult,
++ std::map<std::shared_ptr<GeomAPI_Shape>, int>& oShapes
++) const
++{
++ Model_Objects* anObjects = std::dynamic_pointer_cast<Model_Document>(document())->objects();
++ anObjects->getSubShapesWithEdgeThickness(theResult, oShapes);
++}
++
+ void Model_ResultBody::addShapeColor( const std::wstring& theName,std::vector<int>& color)
+ {
if (myColorsShape.find(theName) == myColorsShape.end())
myColorsShape[ theName ] = color;
}
#include <TNaming_Tool.hxx>
#include <TNaming_NamedShape.hxx>
#include <TDataStd_Name.hxx>
+#include <TDataStd_Integer.hxx>
+ #include <TDataStd_IntegerArray.hxx>
#include <TopoDS_Compound.hxx>
#include <BRep_Builder.hxx>
#include <TopExp_Explorer.hxx>
return aResult;
}
+void Model_ResultPart::setSubShapeEdgeThickness(const std::shared_ptr<GeomAPI_Shape>& theSubShape, int theThickness)
+{
+ TopoDS_Shape aShape = shape()->impl<TopoDS_Shape>();
+ TopoDS_Shape aSubShape = theSubShape->impl<TopoDS_Shape>();
+ if (!shape()->isSubShape(theSubShape))
+ return;
+
+ Model_Objects* anObjects = std::dynamic_pointer_cast<Model_Document>(document())->objects();
+
+ document()->storeShape(data(), original(), theSubShape);
+ Handle(TDataStd_Integer) aThickness = new TDataStd_Integer();
+ aThickness->Set(theThickness);
+ anObjects->setAttribute(aThickness, original(), theSubShape);
+}
+
+int Model_ResultPart::getSubShapeEdgeThickness(const std::shared_ptr<GeomAPI_Shape>& theSubShape) const
+{
+ TopoDS_Shape aShape = shape()->impl<TopoDS_Shape>();
+ TopoDS_Shape aSubShape = theSubShape->impl<TopoDS_Shape>();
+ if (!shape()->isSubShape(theSubShape))
+ return;
+
+ Model_Objects* anObjects = std::dynamic_pointer_cast<Model_Document>(document())->objects();
+ Handle(TDataStd_Integer) anAttr = Handle(TDataStd_Integer)::DownCast(anObjects->getAttribute(TDataStd_Integer::GetID(), original(), theSubShape));
+ if (anAttr.IsNull())
+ return;
+
+ return anAttr->Get();
+}
+
+void Model_ResultPart::getSubShapesWithEdgeThickness(std::map<std::shared_ptr<GeomAPI_Shape>, int>& oShapes)
+{
+ Model_Objects* anObjects = std::dynamic_pointer_cast<Model_Document>(document())->objects();
+ anObjects->getSubShapesWithEdgeThickness(original(), oShapes);
+}
+
+void Model_ResultPart::removeSubShapeEdgeThickness()
+{
+ Model_Objects* anObjects = std::dynamic_pointer_cast<Model_Document>(document())->objects();
+ anObjects->removeSubShapeEdgeThickness(original());
+}
+
+ void Model_ResultPart::setSubShapeColor(const std::shared_ptr<GeomAPI_Shape>& theShape,
+ const std::vector<int>& theColor)
+ {
+ TopoDS_Shape aShape = this->shape()->impl<TopoDS_Shape>();
+ TopoDS_Shape aSubShape = theShape->impl<TopoDS_Shape>();
+ if (!this->shape()->isSubShape(theShape))
+ return;
+
+ Model_Objects* anObjects = std::dynamic_pointer_cast<Model_Document>(document())->objects();
+
+ document()->storeShape(data(), original(), theShape);
+ Handle(TDataStd_IntegerArray) aColor = new TDataStd_IntegerArray();
+ aColor->Init(0, 2);
+ aColor->SetValue(0, theColor[0]);
+ aColor->SetValue(1, theColor[1]);
+ aColor->SetValue(2, theColor[2]);
+ anObjects->setAttribute(aColor, original(), theShape);
+ }
+
+ void Model_ResultPart::getSubShapeColor(const std::shared_ptr<GeomAPI_Shape>& theShape,
+ std::vector<int>& theColor)
+ {
+ TopoDS_Shape aShape = this->shape()->impl<TopoDS_Shape>();
+ TopoDS_Shape aSubShape = theShape->impl<TopoDS_Shape>();
+ if (!this->shape()->isSubShape(theShape))
+ return;
+
+ Model_Objects* anObjects = std::dynamic_pointer_cast<Model_Document>(document())->objects();
+ Handle(TDataStd_IntegerArray) anAttr = Handle(TDataStd_IntegerArray)::DownCast(
+ anObjects->getAttribute(TDataStd_IntegerArray::GetID(), original(), theShape));
+ if (anAttr.IsNull())
+ return;
+ for (int anIndex = anAttr->Lower(); anIndex <= anAttr->Upper(); ++anIndex)
+ theColor.push_back(anAttr->Value(anIndex));
+ if (theColor.size() != 3)
+ theColor.clear();
+ }
+
+ void Model_ResultPart::getColoredShapes(std::map<std::shared_ptr<GeomAPI_Shape>,
+ std::vector<int>>&theColoredShapes)
+ {
+ Model_Objects* anObjects = std::dynamic_pointer_cast<Model_Document>(document())->objects();
+ anObjects->getColoredShapes(original(), theColoredShapes);
+ }
+
+ void Model_ResultPart::removeShapeColors()
+ {
+ Model_Objects* anObjects = std::dynamic_pointer_cast<Model_Document>(document())->objects();
+ anObjects->removeShapeColors(original());
+ }
+
std::shared_ptr<GeomAPI_Shape> Model_ResultPart::selectionValue(const int theIndex)
{
std::shared_ptr<GeomAPI_Shape> aResult;
MODEL_EXPORT virtual bool updateInPart(const int theIndex);
/// Returns the shape by the name in the part
MODEL_EXPORT virtual std::shared_ptr<GeomAPI_Shape> shapeInPart(
- const std::wstring& theName, const std::string& theType, int& theIndex);
+ const std::wstring& theName, const std::string& theType, int& theIndex); /// Set color on subshape
+ MODEL_EXPORT virtual void setSubShapeColor(const std::shared_ptr<GeomAPI_Shape>& theShape,
+ const std::vector<int>& theColor);
+
+ /// Get color on subshape
+ MODEL_EXPORT virtual void getSubShapeColor(const std::shared_ptr<GeomAPI_Shape>& theShape,
+ std::vector<int>& theColor);
+
+ /// Get colored shapes from result
+ MODEL_EXPORT virtual void getColoredShapes(std::map<std::shared_ptr<GeomAPI_Shape>,
+ std::vector<int>>&theColoredShapes);
+
+ /// Forget subshape colors
+ MODEL_EXPORT virtual void removeShapeColors();
+
+
+ MODEL_EXPORT virtual void setSubShapeEdgeThickness(const std::shared_ptr<GeomAPI_Shape>& theSubShape, int theThickness);
+
+ MODEL_EXPORT virtual int getSubShapeEdgeThickness(const std::shared_ptr<GeomAPI_Shape>& theSubShape) const;
+
+ MODEL_EXPORT virtual void getSubShapesWithEdgeThickness(std::map<std::shared_ptr<GeomAPI_Shape>, int>& oSubShapes);
+
+ MODEL_EXPORT virtual void removeSubShapeEdgeThickness();
+
/// Updates the selection inside of the part as a geometrical selection
MODEL_EXPORT virtual bool combineGeometrical(const int theIndex, std::wstring& theNewName);
/// Updates the shape-result of the part (called on Part feature execution)
//! \returns index started from zero, or -1 if object is invisible or belongs to another document
virtual const int index(std::shared_ptr<ModelAPI_Object> theObject,
const bool theAllowFolder = false) = 0;
+ //! Returns the shape index in the result.
+ //! \param theResult result
+ //! \param theShape result subshape
+ //! \returns index started from zero, or -1 if shape is not stored or is not a subshape of the result
+ virtual const int index(std::shared_ptr<ModelAPI_Result> theResult,
+ std::shared_ptr<GeomAPI_Shape> theShape,
+ const bool theAllowFolder = false) = 0;
+ //! Returns the shape index in the result.
+ //! \param theResult result
+ //! \param theShape result subshape
+ //! \returns index started from zero, or -1 if shape is not stored or is not a subshape of the result
+ virtual const int index(std::shared_ptr<ModelAPI_Result> theResult,
+ std::shared_ptr<GeomAPI_Shape> theShape,
+ const bool theAllowFolder = false) = 0;
+
//! Returns the number of objects in the group of objects
//! \param theGroupID group of objects
//! \param theAllowFolder take into account grouping feature by folders
/// Returns the shape by the name in the part
virtual std::shared_ptr<GeomAPI_Shape> shapeInPart(
const std::wstring& theName, const std::string& theType, int& theIndex) = 0;
+ /// Set color on subshape
+ virtual void setSubShapeColor(const std::shared_ptr<GeomAPI_Shape>& theShape,
+ const std::vector<int>& theColor) = 0;
+
+ /// Get subshape color
+ virtual void getSubShapeColor(const std::shared_ptr<GeomAPI_Shape>& theShape,
+ std::vector<int>& theColor) = 0;
+
+ /// Get colored shapes from result
+ virtual void getColoredShapes(std::map<std::shared_ptr<GeomAPI_Shape>,
+ std::vector<int>>&theColoredShapes) = 0;
+
+ /// Forget subshape colors
+ virtual void removeShapeColors() = 0;
+ virtual void setSubShapeEdgeThickness(const std::shared_ptr<GeomAPI_Shape>& theSubShape, int theThickness) = 0;
+
+ virtual int getSubShapeEdgeThickness(const std::shared_ptr<GeomAPI_Shape>& theSubShape) const = 0;
+
+ virtual void getSubShapesWithEdgeThickness(std::map<std::shared_ptr<GeomAPI_Shape>, int>& oSubShapes) = 0;
+
+ virtual void removeSubShapeEdgeThickness() = 0;
+
/// Updates the selection inside of the part as a geometrical selection
virtual bool combineGeometrical(const int theIndex, std::wstring& theNewName) = 0;
ModelAPI_Tools::allResults(theEntity, allRes);
for(std::list<ResultPtr>::iterator aRes = allRes.begin(); aRes != allRes.end(); aRes++) {
if(!myNames[*aRes].myIsDefault || !isDefaultColor(*aRes) ||
- !isDefaultDeflection(*aRes) || !isDefaultTransparency(*aRes) || isEdgeThicknessDefined(*aRes))
- !isDefaultDeflection(*aRes) || !isDefaultTransparency(*aRes) ||
++ !isDefaultDeflection(*aRes) || !isDefaultTransparency(*aRes) || isEdgeThicknessDefined(*aRes) ||
+ (isParentResult(*aRes) && hasColoredShape(*aRes, true)))
- aResultsWithNameOrColor.push_back(*aRes);
+ aResultsWithNonDefaultAttr.push_back(*aRes);
}
// store just dumped entity to stack
if (myEntitiesStack.empty() || myEntitiesStack.top().myEntity != theEntity)
Config_PropManager::registerProp("Visualization", "axis_arrow_size",
"Trihedron arrows constant size", Config_Prop::IntSpin, "10");
- Config_PropManager::registerProp("Shortcuts", "add_parameter_shortcut",
- "Add parameter in parameters manager dialog",
- Config_Prop::Shortcut, "Ctrl+A");
-
+ Config_PropManager::registerProp("Visualization", "result_subshape_with_edge_thickness",
+ "Set edge thickness of subshape of result", Config_Prop::Boolean, "true");
+
+ Config_PropManager::registerProp("Visualization", "color_subshape_result",
+ "Set color on subshape of result", Config_Prop::Boolean, "true");
+
Config_PropManager::registerProp("Windows", "use_hide_faces_panel",
"Use HideFaces panel in operations", Config_Prop::Boolean, "false");
}