- /// Constructor by the builder and wire. Used for pipe builder.
- GEOMALGOAPI_EXPORT GeomAlgoAPI_MakeShape(void* theBuilder, const std::shared_ptr<GeomAPI_Shape> theWire);
+ /// \brief Constructor by builder and builder type.
+ /// \param[in] theBuilder pointer to the builder.
+ /// \param[in] theBuilderType builder type.
+ template<class T> explicit GeomAlgoAPI_MakeShape(T* theBuilder, const BuilderType theBuilderType = OCCT_BRepBuilderAPI_MakeShape)
+ : GeomAPI_Interface(theBuilder),
+ myBuilderType(theBuilderType)
+ {
+ initialize();
+ }
+
+ /// \brief Initializes internals.
+ /// \param[in] theBuilder pointer to the builder.
+ /// \param[in] theBuilderType builder type.
+ template<class T> void initialize(T* theBuilder, const BuilderType theBuilderType = OCCT_BRepBuilderAPI_MakeShape)
+ {
+ setImpl(theBuilder);
+ myBuilderType = theBuilderType;
+ initialize();
+ }
+
+ /// \return status of builder.
+ GEOMALGOAPI_EXPORT bool isDone() const;
+
+ /// \return a shape built by the shape construction algorithm.
+ GEOMALGOAPI_EXPORT virtual const std::shared_ptr<GeomAPI_Shape> shape() const;
+
+ /// \return true if resulting shape is valid.
+ GEOMALGOAPI_EXPORT bool isValid() const;