I'm starting to use OpenCascade, and of course learning as I go. I'm successfully loading STEP files and exampining the toploogy.
OpenCascade is clearly a very powerful system. But I'm not sure of the difference between the various classes I'm using.
For instance, what is the difference between the class Geom_Plane and the class gp_Pln? (Or between Geom_CylindricalSurface and gp_Cylinder)?
Geom_Plane contains a gp_Pln. But it seems you do some operations on the Geom_Plane and some on the gp_Pln
What is the difference/relationship between Geom_Plane and gp_Pln? They both contain a method 'Axis()'
When should you use Geom_Plane, and when gp_Pln?
Is there any documentation on this? I have looked, but without success . Perhaps I'm looking in the wrong place.
My (working!) loading code is below.
void MyClass::GetShapeInfo(const TopoDS_Shape& aShape)
//Get all faces in the shape with an explorer
for (TopExp_Explorer aFaceExplorer(aShape, TopAbs_FACE); aFaceExplorer.More(); aFaceExplorer.Next())
TopoDS_Face aFace = TopoDS::Face(aFaceExplorer.Current());
//Get surface from face
Handle(Geom_Surface) aSurface = BRep_Tool::Surface(aFace);
//Get the type of the surface
Standard_CString surfaceName = aSurface->DynamicType()->Name(); //!!jw**
// Handle different surface types.
if (aSurface->DynamicType() == STANDARD_TYPE(Geom_Plane))
Handle(Geom_Plane) aPlane = Handle(Geom_Plane)::DownCast(aSurface);
//Get plane's normal
gp_Dir norm = aPlane->Pln().Axis().Direction();
Thank you very much