]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Lot 2 : Basic properties
authorcg246364 <clarisse.genrault@cea.fr>
Thu, 3 Dec 2020 16:25:13 +0000 (17:25 +0100)
committercg246364 <clarisse.genrault@cea.fr>
Thu, 3 Dec 2020 16:25:13 +0000 (17:25 +0100)
1  2 
src/FeaturesAPI/CMakeLists.txt
src/FeaturesAPI/FeaturesAPI.i
src/FeaturesAPI/FeaturesAPI_swig.h
src/FeaturesPlugin/CMakeLists.txt
src/FeaturesPlugin/FeaturesPlugin_Plugin.cpp
src/FeaturesPlugin/doc/FeaturesPlugin.rst
src/FeaturesPlugin/geometry_calculation_widget.xml
src/FeaturesPlugin/plugin-Features.xml
src/GeomAlgoAPI/CMakeLists.txt
src/PythonAPI/model/features/__init__.py

index 280b95f2f9ec7a464f066a99c2c841e29f107784,093877f66ae861cef159442dfc772c5c715a9ddb..66ee1d4e623d4b20b510d2b096d568b834abb34e
@@@ -32,7 -32,7 +32,8 @@@ SET(PROJECT_HEADER
    FeaturesAPI_Fillet.h
    FeaturesAPI_Intersection.h
    FeaturesAPI_Measurement.h
 +  FeaturesAPI_PointCoordinates.h
+   FeaturesAPI_GeometryCalculation.h
    FeaturesAPI_MultiRotation.h
    FeaturesAPI_MultiTranslation.h
    FeaturesAPI_Partition.h
@@@ -66,7 -66,7 +67,8 @@@ SET(PROJECT_SOURCE
    FeaturesAPI_Fillet.cpp
    FeaturesAPI_Intersection.cpp
    FeaturesAPI_Measurement.cpp
 +  FeaturesAPI_PointCoordinates.cpp
+   FeaturesAPI_GeometryCalculation.cpp
    FeaturesAPI_MultiRotation.cpp
    FeaturesAPI_MultiTranslation.cpp
    FeaturesAPI_Partition.cpp
index 211fe3db4e67cae3293ea39e1603f97f78dbc136,c2c0631d42eb6e77c772e42e7876831e99bc97ee..4651e840134b951d675545831d347172610e44a4
  %include "FeaturesAPI_Fillet.h"
  %include "FeaturesAPI_Intersection.h"
  %include "FeaturesAPI_Measurement.h"
 +%include "FeaturesAPI_PointCoordinates.h"
+ %include "FeaturesAPI_GeometryCalculation.h"
  %include "FeaturesAPI_MultiRotation.h"
  %include "FeaturesAPI_MultiTranslation.h"
  %include "FeaturesAPI_Partition.h"
index f338d877e779c3fe55ad103feec920a11c50e964,030fbaa261aad1b95e4ea3868893b23e3ff3bec4..075fc129d78a739df2c6cddc4ae976b1f72f2bd5
@@@ -35,7 -35,7 +35,8 @@@
    #include "FeaturesAPI_Fillet.h"
    #include "FeaturesAPI_Intersection.h"
    #include "FeaturesAPI_Measurement.h"
 +  #include "FeaturesAPI_PointCoordinates.h"
+   #include "FeaturesAPI_GeometryCalculation.h"
    #include "FeaturesAPI_MultiRotation.h"
    #include "FeaturesAPI_MultiTranslation.h"
    #include "FeaturesAPI_Partition.h"
index ea359860532267cc9018c770772d82bcc70fdb9b,83df4b4930c798a206636851135bdc0fc5596352..d17eace79d18981502cfe24038a6f56dc5484661
@@@ -69,7 -69,7 +69,8 @@@ SET(PROJECT_HEADER
      FeaturesPlugin_Fillet.h
      FeaturesPlugin_Fillet1D.h
      FeaturesPlugin_Measurement.h
 +    FeaturesPlugin_PointCoordinates.h
+     FeaturesPlugin_GeometryCalculation.h
      FeaturesPlugin_FusionFaces.h
      FeaturesPlugin_RemoveResults.h
      FeaturesPlugin_Chamfer.h
@@@ -117,7 -117,7 +118,8 @@@ SET(PROJECT_SOURCE
      FeaturesPlugin_Fillet.cpp
      FeaturesPlugin_Fillet1D.cpp
      FeaturesPlugin_Measurement.cpp
 +    FeaturesPlugin_PointCoordinates.cpp
+     FeaturesPlugin_GeometryCalculation.cpp
      FeaturesPlugin_FusionFaces.cpp
      FeaturesPlugin_RemoveResults.cpp
      FeaturesPlugin_Chamfer.cpp
@@@ -156,7 -156,7 +158,8 @@@ SET(XML_RESOURCE
    fillet_widget.xml
    fillet1d_widget.xml
    measurement_widget.xml
 +  point_coordinates_widget.xml
+   geometry_calculation_widget.xml
    fusion_faces_widget.xml
    chamfer_widget.xml
    copy_widget.xml
@@@ -700,11 -700,5 +703,12 @@@ ADD_UNIT_TESTS(TestExtrusion.p
                 TestFillet1D_Wire_3.py
                 TestFillet1D_Wire_4.py
                 TestFillet1D_Wire_5.py
 +               Test19931.py
 +               Test20027.py
 +               Test20245_1.py
 +               Test20245_2.py
 +               Test20245_3.py
 +               Test20247.py
 +               TestPointCoordinates.py
+                TestBasicProperties.py
  )
index 9e97eb0ce4cd7294ca67379eebe70702c80fcafb,d4f2f77a3b315a724d6286b6ccaf77df8e1e410e..51281006758f8bd8a19d2666178e136236a8b5a9
  #include <FeaturesPlugin_ExtrusionFuse.h>
  #include <FeaturesPlugin_Fillet.h>
  #include <FeaturesPlugin_Fillet1D.h>
++#include <FeaturesPlugin_GeometryCalculation.h>
  #include <FeaturesPlugin_Intersection.h>
  #include <FeaturesPlugin_Measurement.h>
 -#include <FeaturesPlugin_GeometryCalculation.h>
 +#include <FeaturesPlugin_PointCoordinates.h>
  #include <FeaturesPlugin_MultiRotation.h>
  #include <FeaturesPlugin_MultiTranslation.h>
  #include <FeaturesPlugin_Partition.h>
@@@ -188,8 -188,8 +189,10 @@@ FeaturePtr FeaturesPlugin_Plugin::creat
      return FeaturePtr(new FeaturesPlugin_Fillet1D);
    } else if (theFeatureID == FeaturesPlugin_Measurement::ID()) {
      return FeaturePtr(new FeaturesPlugin_Measurement);
 +  } else if (theFeatureID == FeaturesPlugin_PointCoordinates::ID()) {
 +    return FeaturePtr(new FeaturesPlugin_PointCoordinates);
+   } else if (theFeatureID == FeaturesPlugin_GeometryCalculation::ID()) {
+     return FeaturePtr(new FeaturesPlugin_GeometryCalculation);
    } else if (theFeatureID == FeaturesPlugin_RemoveResults::ID()) {
      return FeaturePtr(new FeaturesPlugin_RemoveResults);
    } else if (theFeatureID == FeaturesPlugin_Chamfer::ID()) {
index a2d77f7bfecec93eb3ca863bccf034a2e9a52f01,cb35ea50a9d5f83a02786bac7672ff277d753346..7f0ff9a1eef3a8d832c6f32546fd571824efe7a8
@@@ -18,14 -18,14 +18,15 @@@ Features plug-in provides a set of comm
     extrusionCutFeature.rst
     extrusionFeature.rst
     extrusionFuseFeature.rst
 -   fillet1dFeature.rst
     filletFeature.rst
 +   fillet1dFeature.rst
     fuseFeatureFaces.rst
++   geometryCalculationFeature.rst
     importResultFeature.rst
     linearCopyFeature.rst
     measurementFeature.rst
-    pointCoordinatesFeature.rst
 -   geometryCalculationFeature.rst
     pipeFeature.rst
++   pointCoordinatesFeature.rst
     placementFeature.rst
     recoverFeature.rst
     removeSubShapesFeature.rst
index 0000000000000000000000000000000000000000,da30ff1766bfcdeef3604e39765b5164880f0374..81d5b24898417ebc868506e2cc0d1eef0c862f7e
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,13 +1,13 @@@
 -                  shape_types="edges faces solids compsolids"
+ <source>
+   <shape_selector id="main_object"
+                   label="Object"
+                   tooltip="Select a object"
++                  shape_types="edges wires faces shells solids compsolids compounds"
+                   default=""
+                   geometrical_selection="true">
+     <validator id="GeomValidators_ShapeType" parameters="line,edge,wire,face,shell,solid,compsolid,compound"/>
+   </shape_selector>
+   <label id="lenght" isSelectable = "true"/>
+   <label id="area" isSelectable = "true"/>
+   <label id="volume" isSelectable = "true"/>
+ </source>
index 926f4cfe2c221036ad16800d0d53ba2f29b54dfb,343c77567b99c013ce1543acc8b7add3f4e1b8e2..92de1c372431842722cf4efbe12b8109fc71e5ec
      </group>
    </workbench>
    <workbench id="Inspection">
 +    <group id="PointCoordinates">
 +      <feature id="PointCoordinates" title="Point coordinates" tooltip="View point coordinate"
 +               icon="icons/Features/point_coord.png" helpfile="pointCoordinatesFeature.html" abort_confirmation="false">
 +        <source path="point_coordinates_widget.xml"/>
 +      </feature>
 +    </group>
      <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">
+         <source path="geometry_calculation_widget.xml"/>
+       </feature>
        <feature id="Measurement" title="Measurement" tooltip="Calculate properties of objects"
                 icon="icons/Features/measurement.png" helpfile="measurementFeature.html" abort_confirmation="false">
          <source path="measurement_widget.xml"/>
Simple merge
index 41f3e1e8e66bd2d0042284791c782cff13284a20,354362e09fc346b35888d0d83fc345ef33bc7ae3..ff5d62f2b823a26d0507987d9a4b48079a00e815
@@@ -30,7 -30,7 +30,8 @@@ from FeaturesAPI import addRecove
  from FeaturesAPI import addFillet, addChamfer
  from FeaturesAPI import addFusionFaces
  from FeaturesAPI import measureLength, measureDistance, measureRadius, measureAngle
 +from FeaturesAPI import getPointCoordinates
+ from FeaturesAPI import getBasicProperties
  from FeaturesAPI import addRemoveResults
  from FeaturesAPI import addCopy, addImportResult
  from FeaturesAPI import addDefeaturing