+ gp_XYZ aXYZ = aDir->impl<gp_Dir>().XYZ();
+ double aTwist = 0.0;
+
+ // orienting projection
+ if(aBaseShape.get() != NULL) {
+ std::shared_ptr<GeomAPI_Pnt> aCenterPnt = GeomAlgoAPI_ShapeTools::centreOfMass(aGShape);
+ gp_Pnt aPnt = aCenterPnt->impl<gp_Pnt>();
+ aPnt.Translate(aDir->impl<gp_Dir>().XYZ() * (10 * Precision::Confusion()));
+
+ BRepClass3d_SolidClassifier aClassifier;
+ aClassifier.Load(aBaseShape->impl<TopoDS_Shape>());
+ aClassifier.Perform(aPnt, Precision::Confusion());
+
+ if(aClassifier.State() == TopAbs_IN) {
+ aXYZ.Reverse();
+ }
+ }