]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/Model/Model_ResultConstruction.h
Salome HOME
Debug of the selector filter by neighbors and make sketch results stored in the data...
[modules/shaper.git] / src / Model / Model_ResultConstruction.h
index b5ea41cd985bb9589aa74b3c07ceae5ef82d6174..3ba48777fc81fc3e42ae1607519b03d6203a1181 100644 (file)
@@ -39,22 +39,13 @@ class Model_ResultConstruction : public ModelAPI_ResultConstruction
 {
   std::shared_ptr<ModelAPI_Feature> myOwner;  ///< owner of this result
   std::shared_ptr<GeomAPI_Shape> myShape;  ///< shape of this result created "on the fly"
-  bool myFacesUpToDate; ///< is true if faces in myuFaces are computed and up to date
-  /// stores the up to date faces if they exist
-  std::vector<std::shared_ptr<GeomAPI_Face> > myFaces;
-  bool myIsInHistory;
-  bool myIsInfinite;
  public:
   /// Retuns the parameters of color definition in the resources config manager
   MODEL_EXPORT virtual void colorConfigInfo(std::string& theSection, std::string& theName,
                                             std::string& theDefault);
 
   /// By default object is displayed in the object browser.
-  MODEL_EXPORT virtual bool isInHistory()
-  {
-    return myIsInHistory;
-  }
-
+  MODEL_EXPORT virtual bool isInHistory();
   /// Sets the result
   MODEL_EXPORT virtual void setShape(std::shared_ptr<GeomAPI_Shape> theShape);
   /// Returns the shape-result produced by this feature
@@ -76,39 +67,16 @@ class Model_ResultConstruction : public ModelAPI_ResultConstruction
   /// The construction element is never concealed
   MODEL_EXPORT virtual void setIsConcealed(const bool theValue);
 
-  // methods related to selection of sub-shapes in construction, used by SelectionAttribute
-
-  /// Selects theSubShape in the construction. Returns an index of the selected sub-shape.
-  /// Puts the selected shape with a needed BRepNaming sub-structure to the data tree of result.
-  /// If theSubShape is null, it selects the whole construction and returns zero index.
-  /// If theIndex is not -1, it re-selects over the existing data (used for update selection).
-  /// If theExtDoc is document where this selection is needed, if it differs from this,
-  /// naming structures will be located there.
-  int select(const std::shared_ptr<GeomAPI_Shape>& theSubShape,
-    const std::shared_ptr<ModelAPI_Document> theExtDoc, const int theIndex = -1);
-
-  /// Returns already selected shape by the given index. Zero index means the whole construction,
-  /// so, the returned shape in this case is null.
-  /// If theExtDoc is document where this selection is needed, if it differs from this,
-  /// naming structures will be located there.
-  std::shared_ptr<GeomAPI_Shape> shape(const int theIndex,
-    const std::shared_ptr<ModelAPI_Document> theExtDoc);
-
-  /// Updates the existing selection by the index.
-  /// Returns false if update is failed. Returns theModified true if the selection was updated.
-  /// If theExtDoc is document where this selection is needed, if it differs from this,
-  /// naming structures will be updated there.
-  bool update(const int theIndex, const std::shared_ptr<ModelAPI_Document> theExtDoc,
-    bool& theModified);
+  /// Updates the shape taking the current value from the data structure, returns true
+  /// if update has been correctly done
+  MODEL_EXPORT virtual bool updateShape();
 
  protected:
   /// Makes a body on the given feature
   Model_ResultConstruction();
 
-  /// Searchies for the working label selection/update will start from
-  /// Returns true if this is label of the external document.
-  /// theExtDoc is document where this selection is required
-  TDF_Label startLabel(const std::shared_ptr<ModelAPI_Document> theExtDoc, bool& theExternal);
+  /// Stores shape in the data structure to allow identification it by the naming
+  void storeShape(std::shared_ptr<GeomAPI_Shape> theShape);
 
   friend class Model_Objects;
 };