
Wed, 02/24/2021 - 20:34
Forums:
Hallo !
Is the following line correct :
TopoDS_Shape myShape = BRepPrimAPI_MakeRevol ( myWire, RevolAxis, 2.0*M_PI );
Or is it mandatory to use some kind of intermediate object to be able to call the Shape() method, like this:
BRepPrimAPI_MakeRevol myRevolMaker ( myWire, RevolAxis, 2.0*M_PI );
TopoDS_Shape myShape = myRevolMaker.Shape();
Thanks !
Wed, 02/24/2021 - 20:48
BRepBuilderAPI_MakeShape defines TopoDS_Shape cast operator as a shortcut to BRepBuilderAPI_MakeShape::Shape() method returning result - so both return the same thing.
There is no need creating a temporary object, but it is a good practice to check BRepBuilderAPI_MakeShape::IsDone() method before requesting result shape and handle failures (normally - due to wrong user input).
Fri, 02/26/2021 - 11:22
Hallo Kirill !
OK, understood !
Thanks for that clarification.
BR
Karl