+ /// \return the error.
+ GEOMALGOAPI_EXPORT std::string getError() { return myError; }
+
+ /// \brief Check the validity of the produced shape.
+ GEOMALGOAPI_EXPORT bool checkValid(std::string theMessage);
+
+ /// Optimization of access the new shapes by old shapes for the limited set of needed new shapes.
+ /// \param theWholeOld the whole old shape
+ /// \param theShapeType type of the sub-shapes that is used for optimization
+ /// \returns true if optimization containers are already filled
+ GEOMALGOAPI_EXPORT bool isNewShapesCollected(GeomShapePtr theWholeOld,
+ const int theShapeType);
+
+ /// Optimization of access the new shapes by old shapes for the limited set of needed new shapes.
+ /// \param theWholeOld the whole old shape
+ /// \param theShapeType type of the sub-shapes that is used for optimization
+ /// \returns true if optimization containers are already filled
+ GEOMALGOAPI_EXPORT void collectNewShapes(GeomShapePtr theWholeOld,
+ const int theShapeType);
+
+ /// Optimization of access the new shapes by old shapes for the limited set of needed new shapes.
+ /// \param theWholeOld the whole old shape
+ /// \param theNewShape the whole new shape
+ /// \param theShapeType type of the old sub-shapes
+ /// \returns compound of all old shapes that were used for creation of the given new
+ GEOMALGOAPI_EXPORT GeomShapePtr oldShapesForNew(GeomShapePtr theWholeOld,
+ GeomShapePtr theNewShape,
+ const int theShapeType);
+
+ /// Replaces \a theShape with shape from \a myMap.
+ GEOMALGOAPI_EXPORT void fixOrientation(GeomShapePtr& theShape);
+
+protected:
+ /// \brief Sets builder type.
+ /// \param[in] theBuilderType new builder type.
+ void setBuilderType(const BuilderType theBuilderType);
+
+ /// \brief Sets status of builder.
+ /// \param[in] theFlag new status.
+ void setDone(const bool theFlag);
+
+ /// \brief Sets result shape.
+ /// \param[in] theShape new shape.
+ void setShape(const GeomShapePtr theShape);
+
+ /// \return true if passed shape is valid for history.
+ bool isValidForHistory(const GeomShapePtr theShape);
+
+protected:
+ /// Data map to keep correct orientation of sub-shapes.
+ std::shared_ptr<GeomAPI_DataMapOfShapeShape> myMap;
+ /// Error occurred during the execution of an algorithm.
+ std::string myError;
+ /// Map of created faces with their name for naming.
+ std::map< std::string, GeomShapePtr > myCreatedFaces;
+
+private:
+ /// \brief Initializes internals.
+ void initialize();
+
+private:
+ GeomAlgoAPI_MakeShape::BuilderType myBuilderType; ///< Type of make shape builder.
+ bool myDone; ///< Builder status.
+ GeomShapePtr myShape; ///< Resulting shape.
+
+ /// map that is used to keep the optimization structure for access to the history
+ /// kind of sub-shapes -> whole old shape -> new shape -> list of old shapes that create this new
+ void* myHist;