]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Clean sources
authorJérôme <jerome.lucas@cesgenslab.fr>
Thu, 12 Nov 2020 10:05:56 +0000 (11:05 +0100)
committerJérôme <jerome.lucas@cesgenslab.fr>
Thu, 12 Nov 2020 10:05:56 +0000 (11:05 +0100)
24 files changed:
src/FeaturesAPI/FeaturesAPI.i
src/FeaturesPlugin/CMakeLists.txt
src/FeaturesPlugin/FeaturesPlugin_Fillet.cpp
src/FeaturesPlugin/FeaturesPlugin_Fillet.h
src/FeaturesPlugin/FeaturesPlugin_Plugin.cpp
src/FeaturesPlugin/FeaturesPlugin_VersionedChFi.cpp
src/FeaturesPlugin/FeaturesPlugin_msg_fr.ts
src/FeaturesPlugin/fillet_widget.xml
src/FeaturesPlugin/plugin-Features.xml
src/GeomAlgoAPI/CMakeLists.txt
src/GeomAlgoAPI/GeomAlgoAPI_BasicProperties.h [new file with mode: 0644]
src/GeomAlgoAPI/GeomAlgoAPI_Fillet.cpp
src/GeomAlgoAPI/GeomAlgoAPI_Fillet.h
src/GeomAlgoAPI/GeomAlgoAPI_STEPImport.cpp
src/GeomAlgoAPI/GeomAlgoAPI_STEPImport.h
src/Model/Model_Objects.cpp
src/Model/Model_Objects.h
src/Model/Model_ResultBody.cpp
src/Model/Model_ResultBody.h
src/ModelAPI/CMakeLists.txt
src/ModelAPI/ModelAPI_Feature.h
src/ModelAPI/ModelAPI_ResultBody.h
src/ModuleBase/ModuleBase_WidgetSelectionFilter.cpp
src/PythonAPI/model/exchange/__init__.py

index c5c0c28de3deb44d36ee70e0fb651764ee1e2b15..b76fd2dc433da48ec55917f838656249d29c963a 100644 (file)
@@ -42,8 +42,6 @@
 %feature("kwargs") addCommon;
 %feature("kwargs") addCut;
 %feature("kwargs") addFillet;
-%feature("kwargs") addFilletMultiRadiusBypoint;
-%feature("kwargs") addFilletMultiRadiusByCurv;
 %feature("kwargs") addFuse;
 %feature("kwargs") addIntersection;
 %feature("kwargs") addMultiRotation;
index 5c3ecc45ca148cdd841b603375441f0876e01ec4..c93c66a173f551dd39cd53f0ea742d80b19cb4ef 100644 (file)
 
 INCLUDE(Common)
 INCLUDE(UnitTest)
-INCLUDE(UseQtExt)
-
-# additional include directories
-INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/src/GeomDataAPI
-                     ${PROJECT_SOURCE_DIR}/src/Locale
-                     ${QT_INCLUDES})
-
-# additional preprocessor / compiler flags
-ADD_DEFINITIONS(${QT_DEFINITIONS})
-
 
 SET(PROJECT_HEADERS
     FeaturesPlugin.h
@@ -76,12 +66,6 @@ SET(PROJECT_HEADERS
     FeaturesPlugin_ImportResult.h
     FeaturesPlugin_Defeaturing.h
     FeaturesPlugin_VersionedChFi.h
-    FeaturesPlugin_WidgetCreator.h
-    FeaturesPlugin_WidgetFilletMultiRadiuses.h
-)
-
-SET(PROJECT_MOC_HEADERS
-    FeaturesPlugin_WidgetFilletMultiRadiuses.h
 )
 
 SET(PROJECT_SOURCES
@@ -129,8 +113,6 @@ SET(PROJECT_SOURCES
     FeaturesPlugin_ImportResult.cpp
     FeaturesPlugin_Defeaturing.cpp
     FeaturesPlugin_VersionedChFi.cpp
-    FeaturesPlugin_WidgetCreator.cpp
-    FeaturesPlugin_WidgetFilletMultiRadiuses.cpp
 )
 
 SET(XML_RESOURCES
@@ -175,12 +157,6 @@ SET(TEXT_RESOURCES
     FeaturesPlugin_msg_ru.ts
 )
 
-# sources / moc wrappings
-QT_WRAP_MOC(PROJECT_AUTOMOC ${PROJECT_MOC_HEADERS})
-
-#QT5_ADD_TRANSLATION(QM_RESOURCES ${TEXT_RESOURCES})
-
-SOURCE_GROUP ("Generated Files" FILES ${PROJECT_AUTOMOC} ${PROJECT_COMPILED_RESOURCES} ${QM_RESOURCES})
 SOURCE_GROUP ("XML Files" FILES ${XML_RESOURCES})
 SOURCE_GROUP ("Resource Files" FILES ${TEXT_RESOURCES})
 
@@ -190,7 +166,6 @@ INCLUDE_DIRECTORIES(
   ../GeomAPI
   ../GeomAlgoAPI
   ../GeomValidators
-  ../ModuleBase
   ../Events
   ../Config
   ${OpenCASCADE_INCLUDE_DIR}
@@ -207,12 +182,7 @@ SET(PROJECT_LIBRARIES
 )
 
 ADD_DEFINITIONS(-DFEATURESPLUGIN_EXPORTS)
-ADD_LIBRARY(FeaturesPlugin MODULE 
-            ${PROJECT_SOURCES} 
-            ${PROJECT_HEADERS} 
-            ${XML_RESOURCES} 
-            ${TEXT_RESOURCES}
-            ${PROJECT_AUTOMOC})
+ADD_LIBRARY(FeaturesPlugin MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${XML_RESOURCES} ${TEXT_RESOURCES})
 TARGET_LINK_LIBRARIES(FeaturesPlugin ${PROJECT_LIBRARIES})
 
 INSTALL(TARGETS FeaturesPlugin DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
@@ -712,4 +682,6 @@ ADD_UNIT_TESTS(TestExtrusion.py
                TestFillet1D_Wire_3.py
                TestFillet1D_Wire_4.py
                TestFillet1D_Wire_5.py
+               Test19931.py
+               Test20027.py
 )
index 79292632e7660350e1ffffa1089f8669e465e7c2..c8c5bf0d5a6f305054af06233eb66093ab32b329 100644 (file)
@@ -22,9 +22,6 @@
 #include <ModelAPI_AttributeDouble.h>
 #include <ModelAPI_AttributeSelectionList.h>
 #include <ModelAPI_AttributeString.h>
-#include <ModelAPI_AttributeDoubleArray.h>
-#include <ModelAPI_AttributeTables.h>
-
 #include <ModelAPI_Session.h>
 #include <ModelAPI_Validator.h>
 
 #include <GeomAlgoAPI_Tools.h>
 
 #include <GeomAPI_ShapeExplorer.h>
-#include <GeomAPI_Pnt.h>
-#include <GeomAPI_Edge.h>
-
-#include <GeomDataAPI_Point.h>
-#include <iostream>
-#include <Locale_Convert.h>
-#include <GeomAlgoAPI_PointBuilder.h>
-#include <GeomAPI_Vertex.h>
-#include <math.h>
-
 
 // Extract edges from the list
 static ListOfShape extractEdges(const ListOfShape& theShapes)
@@ -62,29 +49,12 @@ FeaturesPlugin_Fillet::FeaturesPlugin_Fillet()
 void FeaturesPlugin_Fillet::initAttributes()
 {
   data()->addAttribute(CREATION_METHOD(), ModelAPI_AttributeString::typeId());
-  data()->addAttribute(CREATION_METHOD_MULTIPLES_RADIUSES(), ModelAPI_AttributeString::typeId());
-  
   AttributePtr aSelectionList =
       data()->addAttribute(OBJECT_LIST_ID(), ModelAPI_AttributeSelectionList::typeId());
   data()->addAttribute(START_RADIUS_ID(), ModelAPI_AttributeDouble::typeId());
   data()->addAttribute(END_RADIUS_ID(), ModelAPI_AttributeDouble::typeId());
 
-  data()->addAttribute(VALUES_ID(), ModelAPI_AttributeTables::typeId());
-  data()->addAttribute(VALUES_CURV_ID(), ModelAPI_AttributeTables::typeId());
-  data()->addAttribute(EDGE_SELECTED_ID(), ModelAPI_AttributeSelection::typeId());
-
-  data()->addAttribute(ARRAY_POINT_RADIUS_BY_POINTS(), ModelAPI_AttributeSelectionList::typeId());
-
-  data()->addAttribute(CREATION_METHOD_BY_POINTS(), ModelAPI_AttributeString::typeId());
-  data()->addAttribute(CREATION_METHOD_BY_CURVILEAR_ABSCISSA(), ModelAPI_AttributeString::typeId());
-
   ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), END_RADIUS_ID());
-  ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), ARRAY_POINT_RADIUS_BY_POINTS());
-  ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), VALUES_ID());
-  ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), VALUES_CURV_ID());
-  ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), CREATION_METHOD_MULTIPLES_RADIUSES());
-  ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), CREATION_METHOD_BY_CURVILEAR_ABSCISSA());
-  ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), CREATION_METHOD_BY_POINTS());
 
   initVersion(aSelectionList);
 }
@@ -94,20 +64,6 @@ AttributePtr FeaturesPlugin_Fillet::objectsAttribute()
   return attribute(OBJECT_LIST_ID());
 }
 
-void FeaturesPlugin_Fillet::attributeChanged(const std::string& theID)
-{
-  if (theID == EDGE_SELECTED_ID() 
-      && string(CREATION_METHOD())->value() == CREATION_METHOD_MULTIPLES_RADIUSES()) {
-    
-    AttributeSelectionPtr anEdges =
-      std::dynamic_pointer_cast<ModelAPI_AttributeSelection>(attribute(EDGE_SELECTED_ID()));
-    AttributeSelectionListPtr array = selectionList(OBJECT_LIST_ID());
-    if(array->isInitialized())
-      array->clear();
-    array->append(anEdges->namingName() );
-  }
-}
-
 const std::string& FeaturesPlugin_Fillet::modifiedShapePrefix() const
 {
   static const std::string& THE_PREFIX("Fillet");
@@ -118,65 +74,31 @@ GeomMakeShapePtr FeaturesPlugin_Fillet::performOperation(const GeomShapePtr& the
                                                          const ListOfShape& theEdges)
 {
   AttributeStringPtr aCreationMethod = string(CREATION_METHOD());
-  std::string anError;
-
-  if (!aCreationMethod){
-    setError(anError);
+  if (!aCreationMethod)
     return GeomMakeShapePtr();
+
+  bool isFixedRadius = aCreationMethod->value() == CREATION_METHOD_SINGLE_RADIUS();
+  double aRadius1 = 0.0, aRadius2 = 0.0;
+  if (isFixedRadius)
+    aRadius1 = real(RADIUS_ID())->value();
+  else {
+    aRadius1 = real(START_RADIUS_ID())->value();
+    aRadius2 = real(END_RADIUS_ID())->value();
   }
-   
+
+  // Perform fillet operation
   std::shared_ptr<GeomAlgoAPI_Fillet> aFilletBuilder;
-  
-  ListOfShape aFilletEdges = extractEdges(theEdges);
+  std::string anError;
 
-  std::cout << "coucou aCreationMethod->value() = " <<  aCreationMethod->value()<< std::endl;
-  if ( aCreationMethod->value() == CREATION_METHOD_MULTIPLES_RADIUSES() )
-  {
-
-    std::list<double> coodCurv; 
-    std::list<double> radiuses;
-    AttributeTablesPtr aTablesAttr;
-
-    if( string(CREATION_METHOD_MULTIPLES_RADIUSES())->value() == CREATION_METHOD_BY_POINTS() )
-    {
-      aTablesAttr =  tables(VALUES_ID());
-  
-    }else{
-      aTablesAttr =  tables(VALUES_CURV_ID());
-    }
-
-    int aRows = aTablesAttr->rows();
-    ModelAPI_AttributeTables::Value aVal;
-    for (int k = 0; k < aRows; k++) { 
-        aVal = aTablesAttr->value(k, 0);
-        coodCurv.push_back(aVal.myDouble);
-        aVal = aTablesAttr->value(k, 1);
-        radiuses.push_back(aVal.myDouble);
-    }
-
-    aFilletBuilder.reset(new GeomAlgoAPI_Fillet(theSolid, aFilletEdges, coodCurv,radiuses));
-
-  }else
-  {
-    bool isFixedRadius = aCreationMethod->value() == CREATION_METHOD_SINGLE_RADIUS();
-    double aRadius1 = 0.0, aRadius2 = 0.0;
-    if (isFixedRadius)
-      aRadius1 = real(RADIUS_ID())->value();
-    else {
-      aRadius1 = real(START_RADIUS_ID())->value();
-      aRadius2 = real(END_RADIUS_ID())->value();
-    }
-
-    if (isFixedRadius)
-      aFilletBuilder.reset(new GeomAlgoAPI_Fillet(theSolid, aFilletEdges, aRadius1));
-    else
-      aFilletBuilder.reset(new GeomAlgoAPI_Fillet(theSolid, aFilletEdges, aRadius1, aRadius2));
-  }
+  ListOfShape aFilletEdges = extractEdges(theEdges);
+  if (isFixedRadius)
+    aFilletBuilder.reset(new GeomAlgoAPI_Fillet(theSolid, aFilletEdges, aRadius1));
+  else
+    aFilletBuilder.reset(new GeomAlgoAPI_Fillet(theSolid, aFilletEdges, aRadius1, aRadius2));
 
   if (GeomAlgoAPI_Tools::AlgoError::isAlgorithmFailed(aFilletBuilder, getKind(), anError)) {
-      setError(anError);
-      return GeomMakeShapePtr();
+    setError(anError);
+    return GeomMakeShapePtr();
   }
   return aFilletBuilder;
 }
-
index ff7f2774d459b7a300072451692bc106e87520d1..2c1460b957618bcae4c77d0adb07a73202933f11 100644 (file)
@@ -61,30 +61,6 @@ public:
     return MY_VARYING_RADIUS;
   }
 
-  inline static const std::string CREATION_METHOD_MULTIPLES_RADIUSES()
-  {
-    static std::string MY_METHOD_MULTIPLES_RADIUSES("multiple_radiuses");
-    return MY_METHOD_MULTIPLES_RADIUSES;
-  }
-
-  inline static const std::string CREATION_METHOD_BY_POINTS()
-  {
-    static std::string MY_CREATION_METHOD_BY_POINTS("by_point_method");
-    return MY_CREATION_METHOD_BY_POINTS;
-  }
-
-  inline static const std::string ARRAY_POINT_RADIUS_BY_POINTS()
-  {
-    static std::string MY_ARRAY_POINT_RADIUS_BY_POINTS("array_point_radius_by_point");
-    return MY_ARRAY_POINT_RADIUS_BY_POINTS;
-  }
-
-  inline static const std::string CREATION_METHOD_BY_CURVILEAR_ABSCISSA()
-  {
-    static std::string MY_CREATION_METHOD_BY_CURVILEAR_ABSCISSA("by_curvilinear_abscissa_methode");
-    return MY_CREATION_METHOD_BY_CURVILEAR_ABSCISSA;
-  }
-
   /// Attribute name of main objects.
   inline static const std::string& OBJECT_LIST_ID()
   {
@@ -99,27 +75,6 @@ public:
     return MY_START_RADIUS_ID;
   }
 
-  /// Attribute name of edge selected.
-  inline static const std::string& EDGE_SELECTED_ID()
-  {
-    static const std::string MY_EDGE_SELECTED_ID("edge_selected");
-    return MY_EDGE_SELECTED_ID;
-  }
-
-  /// attribute name of list of tables that contain deafult values (row 0) and the custom values
-  inline static const std::string& VALUES_ID()
-  {
-    static const std::string MY_VALUES_ID("values");
-    return MY_VALUES_ID;
-  }
-  
-  /// attribute name of list of tables that contain deafult values (row 0) and the custom values
-  inline static const std::string& VALUES_CURV_ID()
-  {
-    static const std::string MY_VALUES_ID("values_curv");
-    return MY_VALUES_ID;
-  }
-
   /// Attribute name of end radius.
   inline static const std::string& END_RADIUS_ID()
   {
@@ -136,8 +91,6 @@ public:
   /// Request for initialization of data model of the feature: adding all attributes.
   FEATURESPLUGIN_EXPORT virtual void initAttributes();
 
-  FEATURESPLUGIN_EXPORT void attributeChanged(const std::string& theID);
-
   /// Use plugin manager for features creation.
   FeaturesPlugin_Fillet();
 
index e68b35d69835509a0fc3d73c1980fcfc0fb24181..0d49dfe08d1da9ca019628b9784e630e8b5331f9 100644 (file)
 #include <FeaturesPlugin_ValidatorTransform.h>
 #include <FeaturesPlugin_Validators.h>
 
-#include <ModuleBase_WidgetCreatorFactory.h>
-
-#include "FeaturesPlugin_WidgetCreator.h"
-
 #include <ModelAPI_Session.h>
 
 #include <string>
@@ -70,13 +66,7 @@ static FeaturesPlugin_Plugin* MY_FEATURES_INSTANCE = new FeaturesPlugin_Plugin()
 
 FeaturesPlugin_Plugin::FeaturesPlugin_Plugin()
 {
-
-  WidgetCreatorFactoryPtr aWidgetCreatorFactory = ModuleBase_WidgetCreatorFactory::get();
-  aWidgetCreatorFactory->registerCreator(
-   std::shared_ptr<FeaturesPlugin_WidgetCreator>(new FeaturesPlugin_WidgetCreator()));
-
   SessionPtr aMgr = ModelAPI_Session::get();
-
   ModelAPI_ValidatorsFactory* aFactory = aMgr->validators();
   aFactory->registerValidator("FeaturesPlugin_ValidatorTransform",
                               new FeaturesPlugin_ValidatorTransform);
index 7738cf1fec9278fbdcdf461f660910aaec5f4cdb..7dfa2e3394ec18945277654e11746f4ce1cdaada 100644 (file)
@@ -27,7 +27,6 @@
 
 #include <GeomAPI_ShapeExplorer.h>
 
-#include <iostream>
 
 static const std::string CHAMFERFILLET_VERSION_1("v9.5");
 
@@ -82,7 +81,6 @@ void FeaturesPlugin_VersionedChFi::execute()
 
     anOriginalSolids.push_back(aSolid);
     anEdges.insert(anEdges.end(), aSubs.begin(), aSubs.end());
-
   }
 
   // Build results of the operaion.
@@ -127,28 +125,14 @@ bool FeaturesPlugin_VersionedChFi::processAttribute(const AttributePtr& theAttri
     if (aContext.get()) {
       ResultBodyPtr aCtxOwner = ModelAPI_Tools::bodyOwner(aContext);
       if (aCtxOwner && aCtxOwner->shape()->shapeType() == GeomAPI_Shape::COMPSOLID)
-      {
         aContext = aCtxOwner;
-      }
       aParent = aContext->shape();
       if (!aParent)
         return false;
 
       // store full shape hierarchy for the corresponding version only
-      if (anObject->shapeType() <= GeomAPI_Shape::SOLID)
-      {
-        ListOfShape anEdges;
-        collectSubs(aParent, anEdges, GeomAPI_Shape::EDGE);
-        for (ListOfShape::iterator anIt = anEdges.begin(); anIt != anEdges.end(); ++anIt) {
-          theObjects.addObject(*anIt);
-          theObjects.addParent(*anIt, aParent);
-        }
-      }else
-      {
-        theObjects.addObject(anObject);
-        theObjects.addParent(anObject, aParent);
-      }
-      
+      theObjects.addObject(anObject);
+      theObjects.addParent(anObject, aParent);
       if (isStoreFullHierarchy)
         ModelAPI_Tools::fillShapeHierarchy(aParent, aContext, theObjects);
     } else { // get it from a feature
index aeebd768de1fc3ace1925dff286ffb73622d48a2..6f821a2e2fa1c59eadfbf68ab80c4f2e9fbd427a 100644 (file)
   </context>
   <context>
     <name>Fillet:main_objects</name>
-    <message>
-      <source>Faces, edges or/and solids</source>
-      <translation>Faces, arêtes ou/et solides</translation>
-    </message>
     <message>
       <source>Faces or/and edges</source>
       <translation>Faces ou/et arêtes</translation>
index 1ba6e708f072d0838d936b29881baf04799e949a..7abb4a5dfab0e5ebe2363695ad3f13707ddc9c36 100644 (file)
@@ -5,10 +5,10 @@
          tooltip="Fillet with fixed radius"
          icon="icons/Features/fillet_fixed_radius.png">
       <multi_selector id="main_objects"
-                      label="Faces, edges or/and solids"
+                      label="Faces or/and edges"
                       icon=""
                       tooltip="Select objects"
-                      shape_types="edges faces solids"
+                      shape_types="edges faces"
                       use_choice="false"
                       concealment="true">
         <validator id="PartSet_DifferentObjects"/>
         <validator id="GeomValidators_Positive"/>
       </doublevalue>
     </box>
-    <box id="multiple_radiuses"
-         title="Multiple radiuses"
-         tooltip="Fillet with multiple radiuses"
-         icon="icons/Features/fillet_var_multiple_radiuses.png">
-      <toolbox id="by_point_method">
-        <box id="by_points"
-         title="By points"
-         tooltip="Fillet with multiple radiuses by points"
-         icon="icons/Features/fillet_multiradius_by_point.png">
-          <shape_selector id="edge_selected"
-                        icon="icons/Features/edge.png"
-                        label="Start"
-                        tooltip="Select edge"
-                        shape_types="edge"
-                        use_choice="false"
-                        concealment="true">
-           <validator id="GeomValidators_ShapeType" parameters="empty,line"/>
-           <!--validator id="FeaturesPlugin_ValidatorFilletSelection"/-->
-          </shape_selector>
-          <multiradius-panel id="array_point_radius_by_point"
-            filter_points="false">
-            <validator id="GeomValidators_ShapeType" parameters="empty,vertex"/>
-          </multiradius-panel>
-        </box>
-        <box id="by_curvilinear_abscissa_methode"
-         title="By curvilinear abscissa"
-         tooltip="Fillet with multiple radiuses by curvilinear abscissa"
-         icon="icons/Features/fillet_multiradius_by_curv.png">
-          <multi_selector id="main_objects"
-                      label="Faces, edges or/and solids"
-                      icon=""
-                      tooltip="Select objects"
-                      shape_types="edges faces solids"
-                      use_choice="false"
-                      concealment="true">
-          <validator id="PartSet_DifferentObjects"/>
-          <validator id="FeaturesPlugin_ValidatorFilletSelection"/>
-          </multi_selector>
-          <multiradiuscurv-panel id="array_point_radius_by_point"
-            filter_points="false">
-            <validator id="GeomValidators_ShapeType" parameters="empty,vertex"/>
-          </multiradiuscurv-panel>
-        </box>
-      </toolbox>
-    </box>
   </toolbox>
 </source>
index 74b60d59ac38b980f940926da5dfef4154d66d56..08c08b775d79c7aaf9fa5ea31cc8103dbe6f65bf 100644 (file)
         <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"
         <source path="chamfer_widget.xml"/>
       </feature>
       <feature id="FusionFaces" title="Fuse Faces" tooltip="Performs fusion of connected faces"
-               icon="icons/Features/fusion_faces.png" auto_preview="true" helpfile="FeaturesPlugin/fusionFacesFeature.html">
+               icon="icons/Features/fusion_faces.png" auto_preview="true" helpfile="fuseFeatureFaces.html">
         <source path="fusion_faces_widget.xml"/>
       </feature>
       <feature id="Defeaturing" title="Defeaturing" tooltip="Perform removing faces from solid"
index a03ae213f7537d4a1653bfbd2bf1183de71810a5..c60586a11ce15bd6ddc675a4bb18851db814628b 100644 (file)
@@ -45,11 +45,9 @@ SET(PROJECT_HEADERS
     GeomAlgoAPI_Placement.h
     GeomAlgoAPI_BREPImport.h
     GeomAlgoAPI_STEPImport.h
-    GeomAlgoAPI_STEPImportXCAF.h
     GeomAlgoAPI_IGESImport.h
     GeomAlgoAPI_BREPExport.h
     GeomAlgoAPI_STEPExport.h
-    GeomAlgoAPI_STLExport.h
     GeomAlgoAPI_IGESExport.h
     GeomAlgoAPI_Transform.h
     GeomAlgoAPI_ShapeTools.h
@@ -112,11 +110,9 @@ SET(PROJECT_SOURCES
     GeomAlgoAPI_Placement.cpp
     GeomAlgoAPI_BREPImport.cpp
     GeomAlgoAPI_STEPImport.cpp
-    GeomAlgoAPI_STEPImportXCAF.cpp
     GeomAlgoAPI_IGESImport.cpp
     GeomAlgoAPI_BREPExport.cpp
     GeomAlgoAPI_STEPExport.cpp
-    GeomAlgoAPI_STLExport.cpp
     GeomAlgoAPI_IGESExport.cpp
     GeomAlgoAPI_Transform.cpp
     GeomAlgoAPI_ShapeTools.cpp
diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_BasicProperties.h b/src/GeomAlgoAPI/GeomAlgoAPI_BasicProperties.h
new file mode 100644 (file)
index 0000000..5450ea7
--- /dev/null
@@ -0,0 +1,42 @@
+// 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     lenght 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
index f1241dd3627ffc67e279274337d15283b18f4683..1fc2b871fc3dca89376e1318093caf0d87230f79 100644 (file)
@@ -21,8 +21,6 @@
 #include <GeomAlgoAPI_DFLoader.h>
 
 #include <BRepFilletAPI_MakeFillet.hxx>
-#include <TColgp_Array1OfPnt2d.hxx>
-#include <gp_Pnt2d.hxx>
 
 //=================================================================================================
 GeomAlgoAPI_Fillet::GeomAlgoAPI_Fillet(const GeomShapePtr& theBaseSolid,
@@ -43,17 +41,6 @@ GeomAlgoAPI_Fillet::GeomAlgoAPI_Fillet(const GeomShapePtr& theBaseSolid,
   build(theBaseSolid, theFilletEdges, theStartRadius, theEndRadius);
 }
 
-//=================================================================================================
-GeomAlgoAPI_Fillet::GeomAlgoAPI_Fillet(const GeomShapePtr& theBaseSolid,
-                                       const ListOfShape&  theFilletEdges,
-                                       const std::list<double>& theCurvCoord,
-                                       const std::list<double>& theRadiuses)
-{
-  if (theRadiuses.size()== 0 )
-    return;
-  build(theBaseSolid, theFilletEdges,theCurvCoord, theRadiuses);
-}
-
 //=================================================================================================
 void GeomAlgoAPI_Fillet::build(const GeomShapePtr& theBaseSolid,
                                const ListOfShape&  theFilletEdges,
@@ -97,54 +84,3 @@ void GeomAlgoAPI_Fillet::build(const GeomShapePtr& theBaseSolid,
   setShape(aShape);
   setDone(true);
 }
-
-//=================================================================================================
-void GeomAlgoAPI_Fillet::build(const GeomShapePtr& theBaseSolid,
-                               const ListOfShape&  theFilletEdges,
-                               const std::list<double>& theCurvCoord,
-                               const std::list<double>& theRadiuses)
-{
-  if (!theBaseSolid || theFilletEdges.empty() || theRadiuses.size() == 0)
-    return;
-
-  // create fillet builder
-  BRepFilletAPI_MakeFillet* aFilletBuilder =
-      new BRepFilletAPI_MakeFillet(theBaseSolid->impl<TopoDS_Shape>());
-  setImpl(aFilletBuilder);
-  setBuilderType(OCCT_BRepBuilderAPI_MakeShape);
-
-  // assign filleting edges
-  for (ListOfShape::const_iterator anIt = theFilletEdges.begin();
-       anIt != theFilletEdges.end(); ++anIt) {
-    if ((*anIt)->isEdge())
-      aFilletBuilder->Add( (*anIt)->impl<TopoDS_Edge>() );
-  }
-
-  TColgp_Array1OfPnt2d array(1, theRadiuses.size());
-  int i = 1;
-  std::list<double>::const_iterator itCurv = theCurvCoord.begin();
-  std::list<double>::const_iterator itRadius = theRadiuses.begin();
-  
-  for( ; itCurv != theCurvCoord.end(); ++itCurv, ++itRadius )
-  {
-    array.SetValue(i, gp_Pnt2d( (*itCurv) , (*itRadius)));
-    i++;
-  }
-  // assign fillet radii for each contour of filleting edges
-  int aNbContours = aFilletBuilder->NbContours();
-  for (int ind = 1; ind <= aNbContours; ++ind) {
-    aFilletBuilder->SetRadius(array, ind, 1);
-  }
-
-  // build and get result
-  aFilletBuilder->Build();
-  if (!aFilletBuilder->IsDone())
-    return;
-  TopoDS_Shape aResult = GeomAlgoAPI_DFLoader::refineResult(aFilletBuilder->Shape());
-
-  std::shared_ptr<GeomAPI_Shape> aShape(new GeomAPI_Shape());
-  aShape->setImpl(new TopoDS_Shape(aResult));
-  setShape(aShape);
-  setDone(true);
-}
\ No newline at end of file
index 175a88717dd699c3196108a5bbf2b6b731b1839e..f986933df0a956ad49c60ae0958bf969f8072424 100644 (file)
@@ -24,7 +24,6 @@
 #include <GeomAlgoAPI_MakeShape.h>
 
 #include <GeomAPI_Shape.h>
-#include <vector>
 
 /// \class GeomAlgoAPI_Fillet
 /// \ingroup DataAlgo
@@ -49,16 +48,6 @@ public:
                                         const ListOfShape&  theFilletEdges,
                                         const double        theStartRadius,
                                         const double        theEndRadius);
-  
-  /// Run fillet operation with variable radius.
-  /// \param theBaseSolid    a changing solid
-  /// \param theFilletEdges  list of edges the fillet is performed on
-  /// \param theRadiuses  theradius of the fillet
-  GEOMALGOAPI_EXPORT GeomAlgoAPI_Fillet(const GeomShapePtr& theBaseSolid,
-                                        const ListOfShape&  theFilletEdges,
-                                        const std::list<double>& theCurvCoord,
-                                        const std::list<double>& theRadiuses);
-
 
 private:
   /// Perform fillet operation.
@@ -71,18 +60,6 @@ private:
              const ListOfShape&  theFilletEdges,
              const double        theStartRadius,
              const double        theEndRadius = -1.0);
-
-  /// Perform fillet operation.
-  /// If theEndRadius is less than 0., the fixed radius fillet will be built.
-  /// \param theBaseSolid    a changing solid
-  /// \param theFilletEdges  list of edges the fillet is performed on
-  /// \param theCurvCoord    the coordinate of a point defines a relative parameter on the edge
-  /// \param theRadiuses     the corresponding value of the radius, and the radius evolves 
-  //                         between the first and last vertices of the contour of index 
-  void build(const GeomShapePtr& theBaseSolid,
-             const ListOfShape&  theFilletEdges,
-             const std::list<double>& theCurvCoord,
-             const std::list<double>& theRadiuses);
 };
 
 #endif
index 9e20ba201236d835795da1b1939f42c0b63aabee..3a824f106861e2731ee49ecd3b3fea9d4707fe9a 100644 (file)
 #include <TopTools_IndexedMapOfShape.hxx>
 #include <TopoDS_Compound.hxx>
 #include <TopoDS_Iterator.hxx>
+#include <TopoDS_Shape.hxx>
 
-#include <XCAFApp_Application.hxx>
-#include <XCAFDoc_DocumentTool.hxx>
-#include <OSD_Exception.hxx>
-#include <STEPCAFControl_Reader.hxx>
-#include <TDocStd_Document.hxx>
-#include <XCAFDoc_ColorTool.hxx>
-#include <XCAFDoc_ShapeTool.hxx>
-#include <GeomAlgoAPI_STEPImportXCAF.h>
-#include <Quantity_Color.hxx>
 
 #include <TColStd_SequenceOfAsciiString.hxx>
-#include <TCollection_ExtendedString.hxx>
 
 #include <Standard_Failure.hxx>
 #include <Standard_ErrorHandler.hxx> // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC
-
-// ----------------------------------------------------------------------------
-
 std::shared_ptr<GeomAPI_Shape> STEPImport(const std::string& theFileName,
                                           const std::string& theFormatName,
-                                          const bool  anScalInterUnits,
                                           std::string& theError)
 {
-
   TopoDS_Shape aResShape;
 
   // Set "C" numeric locale to save numbers correctly
   // Kernel_Utils::Localizer loc;
+
   STEPControl_Reader aReader;
 
   //VSR: 16/09/09: Convert to METERS
@@ -103,7 +89,7 @@ std::shared_ptr<GeomAPI_Shape> STEPImport(const std::string& theFileName,
     if (status == IFSelect_RetDone) {
 
       // Regard or not the model units
-      if (!anScalInterUnits) {
+      if (theFormatName == "STEP_SCALE") {
         // set UnitFlag to units from file
         TColStd_SequenceOfAsciiString anUnitLengthNames;
         TColStd_SequenceOfAsciiString anUnitAngleNames;
@@ -208,83 +194,3 @@ std::shared_ptr<GeomAPI_Shape> STEPImport(const std::string& theFileName,
   aGeomShape->setImpl(new TopoDS_Shape(aResShape));
   return aGeomShape;
 }
-
-
-std::shared_ptr<GeomAPI_Shape>  STEPImportAttributs(const std::string& theFileName,
-                                                    std::shared_ptr<ModelAPI_ResultBody> theResultBody,
-                                                    const bool  anScalInterUnits,
-                                                    const bool  anMaterials,
-                                                    const bool  anColor,
-                                                    std::map< std::wstring, std::list<std::wstring>> &theMaterialShape,
-                                                    std::string& theError)
-{
-  
-  STEPControl_Reader aReader;
-  std::shared_ptr<GeomAPI_Shape> aGeomShape(new GeomAPI_Shape);
-  //VSR: 16/09/09: Convert to METERS
-  Interface_Static::SetCVal("xstep.cascade.unit","M");
-  Interface_Static::SetIVal("read.step.ideas", 1);
-  Interface_Static::SetIVal("read.step.nonmanifold", 1);
-
-  try {
-    OCC_CATCH_SIGNALS;
-
-    IFSelect_ReturnStatus status = aReader.ReadFile(theFileName.c_str());
-
-    if (status == IFSelect_RetDone) {
-
-      // Regard or not the model units
-      if (!anScalInterUnits) {
-        // set UnitFlag to units from file
-        TColStd_SequenceOfAsciiString anUnitLengthNames;
-        TColStd_SequenceOfAsciiString anUnitAngleNames;
-        TColStd_SequenceOfAsciiString anUnitSolidAngleNames;
-        aReader.FileUnits(anUnitLengthNames, anUnitAngleNames, anUnitSolidAngleNames);
-        if (anUnitLengthNames.Length() > 0) {
-          TCollection_AsciiString aLenUnits = anUnitLengthNames.First();
-          if (aLenUnits == "millimetre")
-            Interface_Static::SetCVal("xstep.cascade.unit", "MM");
-          else if (aLenUnits == "centimetre")
-            Interface_Static::SetCVal("xstep.cascade.unit", "CM");
-          else if (aLenUnits == "metre" || aLenUnits.IsEmpty())
-            Interface_Static::SetCVal("xstep.cascade.unit", "M");
-          else if (aLenUnits == "INCH")
-            Interface_Static::SetCVal("xstep.cascade.unit", "INCH");
-          else {
-            theError = "The file contains not supported units.";
-            aGeomShape->setImpl(new TopoDS_Shape());
-            return aGeomShape;
-          }
-          // TODO (for other units than mm, cm, m or inch)
-          //else if (aLenUnits == "")
-          //  Interface_Static::SetCVal("xstep.cascade.unit", "???");
-        }
-      }
-      else {
-        //cout<<"need re-scale a model"<<endl;
-        // set UnitFlag to 'meter'
-        Interface_Static::SetCVal("xstep.cascade.unit","M");
-      }
-    }
-  }
-  catch (Standard_Failure const& anException) {
-    theError = anException.GetMessageString();
-    aGeomShape->setImpl(new TopoDS_Shape());
-    return aGeomShape;
-  }
-
-  STEPCAFControl_Reader cafreader;
-  cafreader.SetColorMode(true);
-  cafreader.SetNameMode(true);
-  cafreader.SetMatMode(true);
-
-  if(cafreader.ReadFile(theFileName.c_str()) != IFSelect_RetDone) {
-    theError = "Wrong format of the imported file. Can't import file.";
-    std::shared_ptr<GeomAPI_Shape> aGeomShape(new GeomAPI_Shape);
-    aGeomShape->setImpl(new TopoDS_Shape());
-    return aGeomShape;
-  }
-
-  return readAttributes(cafreader,theResultBody,anMaterials, theMaterialShape, "STEP-XCAF");
-  }
-
index 9433a0a70bb88c07fe23b1d78e53c92349a0062e..470791a3bca3f27c7ad8a859b3e29a4f06522df1 100644 (file)
 #include <GeomAlgoAPI.h>
 
 #include <string>
-#include <GeomAPI_Shape.h>
-
-#include <ModelAPI_ResultBody.h>
 
+#include <GeomAPI_Shape.h>
 
 /// Implementation of the import STEP files algorithms
 GEOMALGOAPI_EXPORT
 std::shared_ptr<GeomAPI_Shape> STEPImport(const std::string& theFileName,
                                           const std::string& theFormatName,
-                                          const bool  anScalInterUnits,
                                           std::string& theError);
 
-/// Implementation of the import STEP files algorithms with Attributs (Name, Color, Materials)
-GEOMALGOAPI_EXPORT
-std::shared_ptr<GeomAPI_Shape>  STEPImportAttributs(const std::string& theFileName,
-                                                    std::shared_ptr<ModelAPI_ResultBody> theResultBody,
-                                                    const bool  anScalInterUnits,
-                                                    const bool  anMaterials,
-                                                    const bool  anColor, 
-                                                    std::map< std::wstring, std::list<std::wstring>> &theMaterialShape,
-                                                    std::string& theError);
-
 #endif /* GEOMALGOAPI_STEPIMPORT_H_ */
index 63380e3e2cf3a95178608b0fa9bb9eff14abd6ef..2c32988e2188e13577ee28df27f657110fbb5c6c 100644 (file)
@@ -1226,8 +1226,7 @@ bool Model_Objects::hasCustomName(DataPtr theFeatureData,
 
 void Model_Objects::storeResult(std::shared_ptr<ModelAPI_Data> theFeatureData,
                                 std::shared_ptr<ModelAPI_Result> theResult,
-                                const int theResultIndex,
-                                const std::wstring& theNameShape)
+                                const int theResultIndex)
 {
   theResult->init();
   theResult->setDoc(myDoc);
@@ -1241,15 +1240,11 @@ void Model_Objects::storeResult(std::shared_ptr<ModelAPI_Data> theFeatureData,
       theResult->data()->setName(L"");
     } else {
       std::wstringstream aName;
-      if( theNameShape != L"" ){
-        aName << theNameShape;
-      }else{
-        aName << aNewName;
-        // if there are several results (issue #899: any number of result),
-        // add unique prefix starting from second
-        if (theResultIndex > 0 || theResult->groupName() == ModelAPI_ResultBody::group())
-          aName << "_" << theResultIndex + 1;
-      }
+      aName << aNewName;
+      // if there are several results (issue #899: any number of result),
+      // add unique prefix starting from second
+      if (theResultIndex > 0 || theResult->groupName() == ModelAPI_ResultBody::group())
+        aName << "_" << theResultIndex + 1;
       aNewName = aName.str();
     }
     theResult->data()->setName(aNewName);
@@ -1274,7 +1269,7 @@ std::shared_ptr<ModelAPI_ResultConstruction> Model_Objects::createConstruction(
 }
 
 std::shared_ptr<ModelAPI_ResultBody> Model_Objects::createBody(
-    const std::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex,const std::wstring& theNameShape )
+    const std::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex)
 {
   TDF_Label aLab = resultLabel(theFeatureData, theIndex);
   TDataStd_Comment::Set(aLab, ModelAPI_ResultBody::group().c_str());
@@ -1285,7 +1280,7 @@ std::shared_ptr<ModelAPI_ResultBody> Model_Objects::createBody(
   }
   if (!aResult.get()) {
     aResult = std::shared_ptr<ModelAPI_ResultBody>(new Model_ResultBody);
-    storeResult(theFeatureData, aResult, theIndex,theNameShape);
+    storeResult(theFeatureData, aResult, theIndex);
   }
   return aResult;
 }
index fe38115434b4c9ea78abfae516709ffc6df12a89..c929be8ce86a19d26b9a51b3e039d573b5cdf422 100644 (file)
@@ -124,8 +124,7 @@ class Model_Objects
       const std::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex = 0);
   /// Creates a body result
   std::shared_ptr<ModelAPI_ResultBody> createBody(
-      const std::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex = 0,
-     const std::wstring& theNameShape = L"");
+      const std::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex = 0);
   /// Creates a part result
   std::shared_ptr<ModelAPI_ResultPart> createPart(
       const std::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex = 0);
@@ -220,13 +219,12 @@ class Model_Objects
 
   //! Initializes the data fields of the feature
   void initData(ObjectPtr theObj, TDF_Label theLab, const int theTag);
-  
- //! Allows to store the result in the data tree of the document
+
 //! Allows to store the result in the data tree of the document
   //! (attaches 'data' of result to tree)
   void storeResult(std::shared_ptr<ModelAPI_Data> theFeatureData,
                    std::shared_ptr<ModelAPI_Result> theResult,
-                   const int theResultIndex = 0,
-                   const std::wstring& theNameShape = L"");
+                   const int theResultIndex = 0);
 
   //! returns the label of result by index; creates this label if it was not created before
   TDF_Label resultLabel(const std::shared_ptr<ModelAPI_Data>& theFeatureData,
index 74b932c81d0abd7e2074a2a70e39fef8010adf87..7d6918c6af9a06246a04e25d8bb4241cce6481e3 100644 (file)
@@ -30,8 +30,6 @@
 #include <Events_Loop.h>
 #include <GeomAPI_ShapeIterator.h>
 #include <GeomAPI_ShapeExplorer.h>
-#include <GeomAPI_Face.h>
-#include <GeomAPI_Pnt.h>
 
 #include <TopoDS_Shape.hxx>
 #include <TopExp_Explorer.hxx>
@@ -235,54 +233,6 @@ void Model_ResultBody::updateConcealment()
   }
 }
 
-void Model_ResultBody::addShapeColor( const std::wstring& theName,std::vector<int>& color) {
-
-  if( myColorsShape.find(theName) == myColorsShape.end())
-    myColorsShape[ theName ] =  color; 
-}
-
-std::wstring Model_ResultBody::addShapeName(std::shared_ptr<GeomAPI_Shape> theshape,const std::wstring& theName ){
-
-    int indice = 1; 
-    std::wstringstream aName; 
-    aName << theName;
-    while(myNamesShape.find(aName.str()) != myNamesShape.end() ){
-        aName.str(L"");
-        aName << theName << L"__" << indice; 
-        indice++;
-    }
-    myNamesShape[ aName.str() ] =  theshape;
-
-    return aName.str();
-}
-
-std::wstring Model_ResultBody::findShapeName(std::shared_ptr<GeomAPI_Shape> theshape){
-
-    TopoDS_Shape  aShape =  theshape->impl<TopoDS_Shape>();
-    for (std::map< std::wstring, std::shared_ptr<GeomAPI_Shape> >::iterator it = myNamesShape.begin();
-           it != myNamesShape.end();
-           ++it)
-        {   
-            TopoDS_Shape curSelectedShape = (*it).second->impl<TopoDS_Shape>();
-            if( (aShape.IsSame(curSelectedShape)))  {
-                return (*it).first;
-            }
-              
-        }
-       return  L"material not found" ;
-}
-
-
-void Model_ResultBody::setShapeName(std::map< std::wstring, std::shared_ptr<GeomAPI_Shape> > &theshapename,
-                                    std::map< std::wstring, std::vector<int>> & theColorsShape) 
-{
-    myNamesShape = theshapename;
-    myColorsShape = theColorsShape;
-}
-void Model_ResultBody::clearShapeNameAndColor(){
-  myNamesShape.clear();
-  myColorsShape.clear();
-}
 void Model_ResultBody::updateSubs(const std::shared_ptr<GeomAPI_Shape>& theThisShape,
                                   const bool theShapeChanged)
 {
@@ -312,31 +262,13 @@ void Model_ResultBody::updateSubs(const std::shared_ptr<GeomAPI_Shape>& theThisS
       aShape->setImpl(new TopoDS_Shape(aShapesIter.Value()));
       ResultBodyPtr aSub;
       if (mySubs.size() <= aSubIndex) { // it is needed to create a new sub-result
-        std::wstring thenameshape = L"";
-        // find shape name read
-        for (std::map< std::wstring, std::shared_ptr<GeomAPI_Shape> >::iterator it = myNamesShape.begin();
-           it != myNamesShape.end();
-           ++it)
-        {   
-            TopoDS_Shape curSelectedShape = (*it).second->impl<TopoDS_Shape>();
-            if( !(aShapesIter.Value().IsSame(curSelectedShape))) continue;
-            thenameshape = (*it).first;
-            break;
-        }
-        aSub = anObjects->createBody(this->data(), aSubIndex,thenameshape);
-        //finf color read
-        std::map< std::wstring, std::vector<int>>::iterator itColor = myColorsShape.find(thenameshape);
-        if(itColor != myColorsShape.end()){
-            ModelAPI_Tools::setColor(aSub,(*itColor).second);
-        }   
-        aSub->setShapeName(myNamesShape,myColorsShape);
+        aSub = anObjects->createBody(this->data(), aSubIndex);
         mySubs.push_back(aSub);
         mySubsMap[aSub] = int(mySubs.size() - 1);
         if (isConcealed()) { // for issue #2579 note7
           aSub->ModelAPI_ResultBody::setIsConcealed(true);
           std::dynamic_pointer_cast<Model_ResultBody>(aSub)->updateConcealment();
         }
-        
       } else { // just update shape of this result
         aSub = mySubs[aSubIndex];
       }
index fe39876429da461c9918f5f632d01160a65caf04..94e9d9b7c1276ef43b7f7381a8aefc843e0d9316 100644 (file)
@@ -117,7 +117,7 @@ protected:
   /// Makes a body on the given feature
   Model_ResultBody();
 
-/// Updates the sub-bodies if shape of this object is composite-solid
+  /// Updates the sub-bodies if shape of this object is composite-solid
   void updateSubs(const std::shared_ptr<GeomAPI_Shape>& theThisShape,
                   const bool theShapeChanged = true);
 
@@ -134,23 +134,6 @@ protected:
     const std::list<GeomShapePtr>& theAllOlds, std::list<GeomShapePtr>& theOldForSub);
 
   friend class Model_Objects;
-
-  // Add shape Name for read shape in step file 
-  std::wstring addShapeName(std::shared_ptr<GeomAPI_Shape>,const std::wstring& theName) override;
-  // Add color for shape Name read shape in step file 
-  void addShapeColor( const std::wstring& theName,std::vector<int>& color) override;
-  // Set the map of name and color read shape in step file 
-  void setShapeName(std::map< std::wstring, std::shared_ptr<GeomAPI_Shape> > &theshapename,std::map< std::wstring, std::vector<int>> & theColorsShape) override;
-  // find the name of shapp read in step file
-  std::wstring findShapeName(std::shared_ptr<GeomAPI_Shape> theshape) override;
-  // Clear the map of name and color read shape in step file
-  void clearShapeNameAndColor() override;
-  
-  // map with the name read in step file and shape 
-  std::map< std::wstring, std::shared_ptr<GeomAPI_Shape> > myNamesShape;
-  // map with the name contruct and color read 
-  std::map< std::wstring, std::vector<int>> myColorsShape; 
-
 };
 
 #endif
index 7b7876165946fb970b92faf8a221c3f33b3e7693..dd2f4acd920a972c11e1a6715dc2eca41ec5d271 100644 (file)
@@ -117,7 +117,7 @@ SET(PROJECT_SOURCES
 SET(PROJECT_LIBRARIES
     Config
     GeomAPI
-    ${OpenCASCADE_ApplicationFramework_LIBRARIES}
+    Locale
 )
 SET(CMAKE_SWIG_FLAGS -threads -w325,321,362,383,302,403,451,473)
 ADD_DEFINITIONS(-DMODELAPI_EXPORTS)
@@ -131,10 +131,6 @@ INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/Config
                     ${PROJECT_SOURCE_DIR}/src/GeomAPI
                     ${PROJECT_SOURCE_DIR}/src/GeomAlgoAPI
                     ${PROJECT_SOURCE_DIR}/src/Locale
-                    ${OpenCASCADE_INCLUDE_DIR}
-                    ${OpenCASCADE_DataExchange_LIBRARIES}
-                    ${OpenCASCADE_ModelingAlgorithms_LIBRARIES}
-                    ${OpenCASCADE_ApplicationFramework_LIBRARIES}
 )
 
 
@@ -269,4 +265,6 @@ ADD_UNIT_TESTS(TestConstants.py
                Test19707.py
                Test19726.py
                Test19912.py
+               Test19932.py
+               Test19989.py
 )
index 811845db21fb82826513ecf48354a279e08184e8..a700139ec7ce53c41961fce4f5020b03222ed4d1 100644 (file)
@@ -193,11 +193,6 @@ class ModelAPI_Feature : public ModelAPI_Object
   {
     return data()->intArray(theID);
   }
-  /// Returns the double array attribute by the identifier
-  inline std::shared_ptr<ModelAPI_AttributeDoubleArray> realArray(const std::string& theID)
-  {
-    return data()->realArray(theID);
-  }
   /// Returns the reference attribute by the identifier
   inline std::shared_ptr<ModelAPI_AttributeRefAttr> refattr(const std::string& theID)
   {
index 11fdd242171c577527f8302c4f8266a614133cd2..c88fb08fcd8500e37246bd36b82de371899ab499 100644 (file)
@@ -24,8 +24,6 @@
 #include <GeomAPI_Shape.h>
 #include <GeomAPI_DataMapOfShapeShape.h>
 #include <string>
-#include <map>
-#include <vector>
 
 class ModelAPI_BodyBuilder;
 class GeomAlgoAPI_MakeShape;
@@ -184,26 +182,11 @@ public:
 
   /// Cleans cash related to the already stored elements
   MODELAPI_EXPORT virtual void cleanCash() = 0;
-  
-  // Add shape Name for read shape in step file 
-  MODELAPI_EXPORT virtual std::wstring addShapeName(std::shared_ptr<GeomAPI_Shape>,const std::wstring& theName) = 0;
-  // Add color for shape Name read shape in step file 
-  MODELAPI_EXPORT virtual void addShapeColor(const std::wstring& theName,std::vector<int>& color) = 0;
-  // Set the map of name and color read shape in step file 
-  MODELAPI_EXPORT virtual void setShapeName(std::map< std::wstring, std::shared_ptr<GeomAPI_Shape> > &theshapename,
-                                            std::map< std::wstring, std::vector<int>> & theColorsShape) = 0;
-  // Clear the map of name and color read shape in step file                                      
-  MODELAPI_EXPORT virtual void clearShapeNameAndColor() = 0;
-  // find the name of shapp read in step file
-  MODELAPI_EXPORT virtual std::wstring findShapeName(std::shared_ptr<GeomAPI_Shape> theshape) = 0;
-
 
 protected:
   /// Default constructor accessible only from Model_Objects
   MODELAPI_EXPORT ModelAPI_ResultBody();
 
-  
-
 };
 
 //! Pointer on feature object
index 33bb8470ccb51068b65d67db615dfe4c2bcb2303..4184e2999b9af5d4dfef7d6b8d3c5f896f90d1c6 100644 (file)
@@ -178,6 +178,7 @@ ModuleBase_FilterItem::ModuleBase_FilterItem(
       connect(aWidget, SIGNAL(focusOutWidget(ModuleBase_ModelWidget*)),
         theParent, SIGNAL(focusOutWidget(ModuleBase_ModelWidget*)));
       connect(aWidget, SIGNAL(objectUpdated()), theParent, SLOT(onObjectUpdated()));
+      aWidget->enableFocusProcessing();
     }
     aLayout->addWidget(aParamsWgt);
   }
index 84b62bcc3e4ee37ca2144914a17b9f4452d931d5..a37fdd6784b19b40d9b4e267ac4d8aef19eb874d 100644 (file)
@@ -19,7 +19,7 @@
 """Package for Exchange plugin for the Parametric Geometry API of the Modeler.
 """
 
-from ExchangeAPI import addImport, addImportStep, exportToFile, exportToXAO, exportToSTL
+from ExchangeAPI import addImport, exportToFile, exportToXAO
 from ExchangeAPI import exportPart, importPart
 
 from .tools import *