X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGEOM_I%2FGEOM_IBasicOperations_i.cc;h=4257ae0a2c60bda215bd9162dac177b4182439d6;hb=ec9d8f68fc1c85c7656f98e3337892e0447afcb1;hp=b24857da187189aaecab5f261362e172d2fce847;hpb=a62a321c849518376e3aa4d24a0b902a24167c64;p=modules%2Fgeom.git diff --git a/src/GEOM_I/GEOM_IBasicOperations_i.cc b/src/GEOM_I/GEOM_IBasicOperations_i.cc index b24857da1..4257ae0a2 100644 --- a/src/GEOM_I/GEOM_IBasicOperations_i.cc +++ b/src/GEOM_I/GEOM_IBasicOperations_i.cc @@ -15,7 +15,7 @@ // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// See http://www.salome-platform.org/ +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // #include @@ -136,6 +136,37 @@ GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakePointOnCurve return GetObject(anObject); } +//============================================================================= +/*! + * MakeTangentOnCurve + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakeTangentOnCurve + (GEOM::GEOM_Object_ptr theCurve, CORBA::Double theParameter) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theCurve == NULL) return aGEOMObject._retn(); + + //Get the reference curve + + Handle(GEOM_Object) aRefernce = GetOperations()->GetEngine()->GetObject + (theCurve->GetStudyID(), theCurve->GetEntry()); + if (aRefernce.IsNull()) return aGEOMObject._retn(); + + //Create the point + + Handle(GEOM_Object) anObject = + GetOperations()->MakeTangentOnCurve(aRefernce, theParameter); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + //============================================================================= /*! @@ -388,3 +419,39 @@ GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakeMarker return GetObject(anObject); } + +//============================================================================= +/*! + * MakeTangentPlaneOnFace + */ +//============================================================================= + +GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakeTangentPlaneOnFace + (GEOM::GEOM_Object_ptr theFace, + CORBA::Double theParameterU, + CORBA::Double theParameterV, + CORBA::Double theTrimSize) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theFace == NULL) return aGEOMObject._retn(); + + //Get the reference face + + Handle(GEOM_Object) aRef = GetOperations()->GetEngine()->GetObject + (theFace->GetStudyID(), theFace->GetEntry()); + if (aRef.IsNull()) return aGEOMObject._retn(); + + //Create the plane + + Handle(GEOM_Object) anObject = + GetOperations()->MakeTangentPlaneOnFace(aRef, theParameterU,theParameterV,theTrimSize); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} +