- vtkMath::Cross( theDir[1], theDir[0], theNormal );
- vtkMath::Normalize( theNormal );
- vtkMath::Cross( theNormal, theDir[1], theDir[0] );
+ /*!
+ * \brief Return a name of a father mesh if any
+ */
+ QString getFatherName( _PTR(SObject)& theSObj )
+ {
+ _PTR(SComponent) objComponent = theSObj->GetFatherComponent();
+ const int theMeshDepth = 1 + objComponent->Depth();
+ if ( theSObj->Depth() <= theMeshDepth )
+ return QString(); // theSObj is a mesh
+
+ _PTR(SObject) sobj = theSObj->GetFather();
+ while ( sobj && sobj->Depth() > theMeshDepth )
+ sobj = sobj->GetFather();
+
+ return sobj ? sobj->GetName().c_str() : "";
+ }