#include <TopTools_ListIteratorOfListOfShape.hxx>
//=================================================================================================
-GeomAlgoAPI_MakeShape::GeomAlgoAPI_MakeShape(void* theMkShape, const BuilderType theBuilderType)
-: GeomAPI_Interface(theMkShape),
- myBuilderType(theBuilderType),
- myShape(new GeomAPI_Shape())
-{
+void GeomAlgoAPI_MakeShape::initialize() {
switch (myBuilderType) {
case OCCT_BRepBuilderAPI_MakeShape: {
myDone = implPtr<BRepBuilderAPI_MakeShape>()->IsDone() == Standard_True;
* \param[in] theBuilder pointer to the builder.
* \param[in] theBuilderType builder type.
*/
- GEOMALGOAPI_EXPORT GeomAlgoAPI_MakeShape(void* theBuilder, const BuilderType theBuilderType = OCCT_BRepBuilderAPI_MakeShape);
+ template<class T> explicit GeomAlgoAPI_MakeShape(T* theBuilder, const BuilderType theBuilderType = OCCT_BRepBuilderAPI_MakeShape)
+ : GeomAPI_Interface(theBuilder),
+ myBuilderType(theBuilderType),
+ myShape(new GeomAPI_Shape())
+ {
+ initialize();
+ }
+
/// \return status of builder.
GEOMALGOAPI_EXPORT bool isDone() const;
*/
GEOMALGOAPI_EXPORT void setShape(const std::shared_ptr<GeomAPI_Shape> theShape);
+ /// \brief Initializes internals.
+ GEOMALGOAPI_EXPORT void initialize();
+
private:
GeomAlgoAPI_MakeShape::BuilderType myBuilderType; ///< Type of make shape builder.
bool myDone; ///< Builder status.