#include <ModelHighAPI_Tools.h>
//=================================================================================================
-std::list<double> getBasicProperties(const std::shared_ptr<ModelAPI_Document>& thePart,
- const ModelHighAPI_Selection& theObject)
+std::list<double> getGeometryCalculation(const std::shared_ptr<ModelAPI_Document>& thePart,
+ const ModelHighAPI_Selection& theObject)
{
FeaturePtr aPointCoodFeat = thePart->addFeature(FeaturesPlugin_GeometryCalculation::ID());
class ModelHighAPI_Selection;
/// \ingroup CPPHighAPI
-/// \brief get the basic properties (length, Surface area, volume)
+/// \brief get the geometry calculation (length, Surface area, volume)
FEATURESAPI_EXPORT
-std::list<double> getBasicProperties(const std::shared_ptr<ModelAPI_Document>& thePart,
- const ModelHighAPI_Selection& theObject);
+std::list<double> getGeometryCalculation(const std::shared_ptr<ModelAPI_Document>& thePart,
+ const ModelHighAPI_Selection& theObject);
#endif // FeaturesAPI_GeometryCalculation_H_
\ No newline at end of file
TestFillet1D_Wire_3.py
TestFillet1D_Wire_4.py
TestFillet1D_Wire_5.py
- TestBasicProperties.py
+ TestGeometryCalculation.py
)
#include <Config_PropManager.h>
#include <GeomAPI_Shape.h>
-#include <GeomAlgoAPI_BasicProperties.h>
+#include <GeomAlgoAPI_GeometryCalculation.h>
#include <iomanip>
double aSurfArea;
double aVolume;
std::string aError;
- if (!GetBasicProperties(aShape,
- aTolerance,
- aLength,
- aSurfArea,
- aVolume,
- aError))
+ if (!getGeometryCalculation(aShape,
+ aTolerance,
+ aLength,
+ aSurfArea,
+ aVolume,
+ aError))
setError("Error in Geometry calculation :" + aError);
streamL << std::setprecision(14) << aLength;
aValues->setValue(2, aVolume);
}
- string(LENGTH_ID())->setValue("Length = " + streamL.str());
- string(AREA_ID())->setValue("Area = " + streamA.str());
- string(VOLUME_ID())->setValue("Volume = " + streamV.str());
+ string(LENGTH_ID())->setValue(streamL.str());
+ string(AREA_ID())->setValue(streamA.str());
+ string(VOLUME_ID())->setValue(streamV.str());
}
}
<source>Angular Copy</source>
<translation>Copie angulaire</translation>
</message>
+ <message>
+ <source>Bounding box</source>
+ <translation>Boite englobante</translation>
+ </message>
<message>
<source>Geometry calculation</source>
- <translation>Calcul géométrique</translation>
+ <translation>Calcul de la géométrie</translation>
</message>
<message>
<source>Linear copy</source>
<translation>Pas pour la direction angulaire</translation>
</message>
</context>
-
+ <!--Geometry calculation-->
+ <context>
+ <name>GeometryCalculation</name>
+ <message>
+ <source>Geometry calculation</source>
+ <translation>Calcul de la géometrie</translation>
+ </message>
+ </context>
+ <context>
+ <name>GeometryCalculation:main_object</name>
+ <message>
+ <source>Object</source>
+ <translation>Objet</translation>
+ </message>
+ </context>
+ <context>
+ <name>GeometryCalculation</name>
+ <message>
+ <source>Length = </source>
+ <translation>Longueur = </translation>
+ </message>
+ <message>
+ <source>Area = </source>
+ <translation>Surface = </translation>
+ </message>
+ <message>
+ <source>Volume = </source>
+ <translation>Volume = </translation>
+ </message>
+ </context>
<!-- LinearCopy -->
<context>
<name>LinearCopy</name>
<translation>Deuxième direction</translation>
</message>
</context>
-
- <!-- Geometry calculation -->
- <context>
- <name>GeometryCalculation</name>
- <message>
- <source>Geometry calculation</source>
- <translation>Calcul géométrique</translation>
- </message>
- <message>
- <source>GeometryCalculation:Object</source>
- <translation>Objet</translation>
- </message>
- <message>
- <source>GeometryCalculation:Length</source>
- <translation>Longueur</translation>
- </message>
- <message>
- <source>GeometryCalculation:Area</source>
- <translation>Surface</translation>
- </message>
- <message>
- <source>GeometryCalculation:Volume</source>
- <translation>Volume</translation>
- </message>
- </context>
<!-- Measurement -->
<context>
<name>Measurement</name>
+++ /dev/null
-# Copyright (C) 2014-2020 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
-#
-
-"""
- Unit test of ...
-"""
-#=========================================================================
-# Initialization of the test
-#=========================================================================
-
-import salome
-
-import os
-import math
-
-from ModelAPI import *
-from salome.shaper import model
-
-
-
-__updated__ = "2020-11-12"
-
-
-#=========================================================================
-# test basic properties
-#=========================================================================
-def test_Basic_properties():
-
- model.begin()
- file_path = os.path.join(os.getenv("DATA_DIR"),"Shapes","Brep","box1.brep")
- partSet = model.moduleDocument()
- Part_1 = model.addPart(partSet)
- Part_1_doc = Part_1.document()
- Import_1 = model.addImport(Part_1_doc,file_path)
- model.do()
-
- myDelta = 1e-6
- Props = model.getBasicProperties(Part_1_doc,model.selection("SOLID", "box1_1"))
-
- print(" Basic Properties:")
- print(" Wires length: ", Props[0])
- print(" Surface area: ", Props[1])
- print(" Volume : ", Props[2])
-
- aReflength = 2400
- aReslength = Props[0]
- assert (math.fabs(aReslength - aReflength) < myDelta), "The surface is wrong: expected = {0}, real = {1}".format(aReflength, aReslength)
-
- aRefSurface = 240000
- aResSurface = Props[1]
- assert (math.fabs(aResSurface - aRefSurface) < myDelta), "The surface is wrong: expected = {0}, real = {1}".format(aRefSurface, aResSurface)
-
- aRefVolume = 8000000
- aResVolume = Props[2]
- assert (math.fabs(aResVolume - aRefVolume) < myDelta), "The volume is wrong: expected = {0}, real = {1}".format(aRefVolume, aResVolume)
-
-
-if __name__ == '__main__':
-
- test_Basic_properties()
-
- #=========================================================================
- # End of test
- #=========================================================================
--- /dev/null
+# Copyright (C) 2014-2020 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
+#
+
+"""
+ Unit test of ...
+"""
+#=========================================================================
+# Initialization of the test
+#=========================================================================
+
+import salome
+
+import os
+import math
+
+from ModelAPI import *
+from salome.shaper import model
+
+
+
+__updated__ = "2020-11-12"
+
+
+#=========================================================================
+# test Geometry calculation
+#=========================================================================
+def test_Geometry_Calculation():
+
+ model.begin()
+ file_path = os.path.join(os.getenv("DATA_DIR"),"Shapes","Brep","box1.brep")
+ partSet = model.moduleDocument()
+ Part_1 = model.addPart(partSet)
+ Part_1_doc = Part_1.document()
+ Import_1 = model.addImport(Part_1_doc,file_path)
+ model.do()
+
+ myDelta = 1e-6
+ Props = model.getGeometryCalculation(Part_1_doc,model.selection("SOLID", "box1_1"))
+
+ print(" Geometry calculation:")
+ print(" Wires length: ", Props[0])
+ print(" Surface area: ", Props[1])
+ print(" Volume : ", Props[2])
+
+ aReflength = 2400
+ aReslength = Props[0]
+ assert (math.fabs(aReslength - aReflength) < myDelta), "The surface is wrong: expected = {0}, real = {1}".format(aReflength, aReslength)
+
+ aRefSurface = 240000
+ aResSurface = Props[1]
+ assert (math.fabs(aResSurface - aRefSurface) < myDelta), "The surface is wrong: expected = {0}, real = {1}".format(aRefSurface, aResSurface)
+
+ aRefVolume = 8000000
+ aResVolume = Props[2]
+ assert (math.fabs(aResVolume - aRefVolume) < myDelta), "The volume is wrong: expected = {0}, real = {1}".format(aRefVolume, aResVolume)
+
+
+if __name__ == '__main__':
+
+ test_Geometry_Calculation()
+
+ #=========================================================================
+ # End of test
+ #=========================================================================
+++ /dev/null
-
- .. _tui_basic_properties:
-
-Get basic properties
-====================
-
-.. literalinclude:: examples/basic_properties.py
- :linenos:
- :language: python
-
-:download:`Download this script <examples/basic_properties.py>`
-
--- /dev/null
+
+ .. _tui_geometry_calculation:
+
+Get Geometry Calculation
+========================
+
+.. literalinclude:: examples/geometry_calculation.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/geometry_calculation.py>`
+
+++ /dev/null
-import os
-from salome.shaper import model
-
-model.begin()
-partSet = model.moduleDocument()
-Part_1 = model.addPart(partSet)
-Part_1_doc = Part_1.document()
-Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
-properties = model.getBasicProperties(Part_1_doc,model.selection("SOLID", "Box_1_1"))
-print(" length: ", properties[0])
-print(" area: ", properties[1])
-print(" volume: ", properties[2])
-model.end()
\ No newline at end of file
--- /dev/null
+import os
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
+properties = model.getGeometryCalculation(Part_1_doc,model.selection("SOLID", "Box_1_1"))
+print(" length: ", properties[0])
+print(" area: ", properties[1])
+print(" volume: ", properties[2])
+model.end()
\ No newline at end of file
-.. |basicproperties.icon| image:: images/basicproperties.png
+.. |GeometryCalculation.icon| image:: images/geometryCalculation.png
Geometry calculation
====================
The **Geometry calculation** feature displays basic properties of sub-elements of a geometrical object (shape).
-The basic properties displayed in the property panel are length, area and volume.
+The geometry calculation displayed in the property panel are length, area and volume.
**Apply** button does not generate any result and has the same effect as **Cancel** for this feature.
-To display basic properties in the active part:
+To display geometry calculation in the active part:
#. select in the Main Menu *Inspection - > Geometry calculation* item or
-#. click |basicproperties.icon| **Geometry calculation** button in the toolbar
+#. click |GeometryCalculation.icon| **Geometry calculation** button in the toolbar
-The basic properties can be displayed for a selected object in the property panel :
+The geometry calculation can be displayed for a selected object in the property panel :
-.. figure:: images/basicPropertiesPropertyPanel.png
+.. figure:: images/geometryCalculationPropertyPanel.png
:align: center
Geometry calculation
- **Object** contains an object selected in 3D OCC viewer or object browser.
-The basic properties displayed can be selected.
+The geometry calculation displayed can be selected.
**TUI Command**:
-.. py:function:: model.GetBasicProperties(Part_doc, shape)
+.. py:function:: model.getGeometryCalculation(Part_doc, shape)
:param part: The current part object.
:param object: A shape in format *model.selection("type", shape)*.
:return: list containing length, area and volume.
-**See Also** a sample TUI Script of :ref:`tui_basic_properties` operation.
\ No newline at end of file
+**See Also** a sample TUI Script of :ref:`tui_geometry_calculation` operation.
\ No newline at end of file
geometrical_selection="true">
<validator id="GeomValidators_ShapeType" parameters="line,edge,wire,face,shell,solid,compsolid,compound"/>
</shape_selector>
- <label id="length" isSelectable = "true"/>
- <label id="area" isSelectable = "true"/>
- <label id="volume" isSelectable = "true"/>
+ <label id="length" label="Length = " isSelectable = "true"/>
+ <label id="area" label="Area = " isSelectable = "true"/>
+ <label id="volume" label="Volume = " isSelectable = "true"/>
</source>
<source path="fillet1d_widget.xml"/>
</feature>
<feature id="Fillet" title="Fillet" tooltip="Perform fillet on face or edge"
- icon="icons/Features/fillet.png" auto_preview="false" helpfile="filletFeature.html">
+ icon="icons/Features/fillet.png" auto_preview="true" helpfile="filletFeature.html">
<source path="fillet_widget.xml"/>
</feature>
<feature id="Chamfer" title="Chamfer" tooltip="Perform chamfer on face or edge"
<workbench id="Inspection">
<group id="Calculation">
<feature id="GeometryCalculation" title="Geometry calculation" tooltip="Calculate properties of objects"
- icon="icons/Features/basicproperties.png" helpfile="geometryCalculationFeature.html" abort_confirmation="false">
+ icon="icons/Features/geometryCalculation.png" helpfile="geometryCalculationFeature.html" abort_confirmation="false">
<source path="geometry_calculation_widget.xml"/>
</feature>
<feature id="Measurement" title="Measurement" tooltip="Calculate properties of objects"
GeomAlgoAPI_Prism.h
GeomAlgoAPI_Revolution.h
GeomAlgoAPI_Boolean.h
- GeomAlgoAPI_BasicProperties.h
+ GeomAlgoAPI_GeometryCalculation.h
GeomAlgoAPI_ThroughAll.h
GeomAlgoAPI_Rotation.h
GeomAlgoAPI_Translation.h
GeomAlgoAPI_Prism.cpp
GeomAlgoAPI_Revolution.cpp
GeomAlgoAPI_Boolean.cpp
- GeomAlgoAPI_BasicProperties.cpp
+ GeomAlgoAPI_GeometryCalculation.cpp
GeomAlgoAPI_ThroughAll.cpp
GeomAlgoAPI_Rotation.cpp
GeomAlgoAPI_Translation.cpp
+++ /dev/null
-// Copyright (C) 2014-2020 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
-//
-
-#include "GeomAlgoAPI_BasicProperties.h"
-
-#include <GProp_GProps.hxx>
-#include <TopoDS_Shape.hxx>
-#include <BRepGProp.hxx>
-#include <TopExp_Explorer.hxx>
-#include <Standard_ErrorHandler.hxx>
-
-//=================================================================================================
-bool GetBasicProperties(const std::shared_ptr<GeomAPI_Shape>& theShape,
- const double theTolerance,
- Standard_Real& theLength,
- Standard_Real& theSurfArea,
- Standard_Real& theVolume,
- std::string& theError)
-{
-
- #ifdef _DEBUG
- std::cout << "GetBasicProperties " << std::endl;
- #endif
-
- if (!theShape.get()) {
- theError = "GetBasicProperties : An invalid argument";
- return false;
- }
-
- TopoDS_Shape aShape = theShape->impl<TopoDS_Shape>();
-
- //Compute the parameters
- GProp_GProps LProps, SProps;
- Standard_Real anEps = theTolerance >= 0 ? theTolerance : 1.e-6;
- try {
- OCC_CATCH_SIGNALS;
- BRepGProp::LinearProperties(aShape, LProps, Standard_True);
- theLength = LProps.Mass();
-
- BRepGProp::SurfaceProperties(aShape, SProps, anEps, Standard_True);
- theSurfArea = SProps.Mass();
-
- theVolume = 0.0;
- if (aShape.ShapeType() < TopAbs_SHELL) {
- for (TopExp_Explorer Exp (aShape, TopAbs_SOLID); Exp.More(); Exp.Next()) {
- GProp_GProps VProps;
- BRepGProp::VolumeProperties(Exp.Current(), VProps, anEps, Standard_True);
- theVolume += VProps.Mass();
- }
- }
- }
- catch (Standard_Failure& aFail) {
- theError = aFail.GetMessageString();
- return false;
- }
-
- return true;
-
-}
\ No newline at end of file
+++ /dev/null
-// Copyright (C) 2014-2020 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
-//
-
-#ifndef GeomAlgoAPI_BasicProperties_H_
-#define GeomAlgoAPI_BasicProperties_H_
-
-#include <GeomAlgoAPI.h>
-#include <GeomAPI_Shape.h>
-#include <Standard_TypeDef.hxx>
-
-/// Run chamfer operation with two distances or with a distance and an angle .
- /// \param theShape the shape
- /// \param theTolerance tolerance desirated
- /// \param theLength length calculated
- /// \param theSurfArea Surface Area calculated
- /// \param theVolume Volume calculated
- /// \param theError error
-GEOMALGOAPI_EXPORT
-bool GetBasicProperties(const std::shared_ptr<GeomAPI_Shape>& theShape,
- const Standard_Real theTolerance,
- Standard_Real& theLength,
- Standard_Real& theSurfArea,
- Standard_Real& theVolume,
- std::string& theError);
-
-#endif
--- /dev/null
+// Copyright (C) 2014-2020 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
+//
+
+#include "GeomAlgoAPI_GeometryCalculation.h"
+
+#include <GProp_GProps.hxx>
+#include <TopoDS_Shape.hxx>
+#include <BRepGProp.hxx>
+#include <TopExp_Explorer.hxx>
+#include <Standard_ErrorHandler.hxx>
+
+//=================================================================================================
+bool getGeometryCalculation(const std::shared_ptr<GeomAPI_Shape>& theShape,
+ const double theTolerance,
+ Standard_Real& theLength,
+ Standard_Real& theSurfArea,
+ Standard_Real& theVolume,
+ std::string& theError)
+{
+
+ #ifdef _DEBUG
+ std::cout << "getGeometryCalculation " << std::endl;
+ #endif
+
+ if (!theShape.get()) {
+ theError = "getGeometryCalculation : An invalid argument";
+ return false;
+ }
+
+ TopoDS_Shape aShape = theShape->impl<TopoDS_Shape>();
+
+ //Compute the parameters
+ GProp_GProps aLProps, aSProps;
+ Standard_Real anEps = theTolerance >= 0 ? theTolerance : 1.e-6;
+ try {
+ OCC_CATCH_SIGNALS;
+ BRepGProp::LinearProperties(aShape, aLProps, Standard_True);
+ theLength = aLProps.Mass();
+
+ BRepGProp::SurfaceProperties(aShape, aSProps, anEps, Standard_True);
+ theSurfArea = aSProps.Mass();
+
+ theVolume = 0.0;
+ if (aShape.ShapeType() < TopAbs_SHELL) {
+ for (TopExp_Explorer anExp (aShape, TopAbs_SOLID); anExp.More(); anExp.Next()) {
+ GProp_GProps aVProps;
+ BRepGProp::VolumeProperties(anExp.Current(), aVProps, anEps, Standard_True);
+ theVolume += aVProps.Mass();
+ }
+ }
+ }
+ catch (Standard_Failure& aFail) {
+ theError = aFail.GetMessageString();
+ return false;
+ }
+
+ return true;
+
+}
\ No newline at end of file
--- /dev/null
+// Copyright (C) 2014-2020 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
+//
+
+#ifndef GeomAlgoAPI_GeometryCalculation_H_
+#define GeomAlgoAPI_GeometryCalculation_H_
+
+#include <GeomAlgoAPI.h>
+#include <GeomAPI_Shape.h>
+#include <Standard_TypeDef.hxx>
+
+/// Run chamfer operation with two distances or with a distance and an angle .
+ /// \param theShape the shape
+ /// \param theTolerance tolerance desirated
+ /// \param theLength length calculated
+ /// \param theSurfArea Surface Area calculated
+ /// \param theVolume Volume calculated
+ /// \param theError error
+GEOMALGOAPI_EXPORT
+bool getGeometryCalculation(const std::shared_ptr<GeomAPI_Shape>& theShape,
+ const Standard_Real theTolerance,
+ Standard_Real& theLength,
+ Standard_Real& theSurfArea,
+ Standard_Real& theVolume,
+ std::string& theError);
+
+#endif
: ModuleBase_ModelWidget(theParent, theData)
{
QString aText = translate(theData->getProperty("title"));
+
+ myPrefix = theData->getProperty(ATTR_LABEL);
+
bool aIsHtml = theData->getBooleanAttribute(ATTR_HTML_STYLE, false);
QString aLabelIcon = QString::fromStdString(theData->getProperty("icon"));
aText = ModuleBase_Tools::translate(myFeature->getKind(), aMsg);
}
}
- myLabel->setText(aText);
+ if (myPrefix == "") {
+ myLabel->setText(aText);
+ } else {
+ myLabel->setText( ModuleBase_Tools::translate(myFeature->getKind(), myPrefix) + aText);
+ }
}
return true;
}
/// A label control
QLabel* myLabel;
+ /// prefix for label
+ std::string myPrefix;
};
#endif
from FeaturesAPI import addFillet, addChamfer
from FeaturesAPI import addFusionFaces
from FeaturesAPI import measureLength, measureDistance, measureRadius, measureAngle
-from FeaturesAPI import getBasicProperties
+from FeaturesAPI import getGeometryCalculation
from FeaturesAPI import addRemoveResults
from FeaturesAPI import addCopy, addImportResult
from FeaturesAPI import addDefeaturing