PAL9166. Add possibility to make sketcher on an existing plane

This commit is contained in:
eap 2005-06-20 05:15:39 +00:00
parent eab0044eba
commit 3cb6f863c5
3 changed files with 38 additions and 0 deletions

View File

@ -1463,6 +1463,17 @@ module GEOM
* \return New GEOM_Object, containing the created wire.
*/
GEOM_Object MakeSketcher (in string theCommand, in ListOfDouble theWorkingPlane);
/*!
* Create a sketcher (wire or face), following the textual description,
* passed through \a theCommand argument. \n
* For format of the description string see the previous method.\n
* \param theCommand String, defining the sketcher in local
* coordinates of the working plane.
* \param theWorkingPlane Planar Face of the working plane.
* \return New GEOM_Object, containing the created wire.
*/
GEOM_Object MakeSketcherOnPlane (in string theCommand, in GEOM_Object theWorkingPlane);
};
/*!

View File

@ -303,3 +303,28 @@ GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakeSketcher (const char* theCom
return GetObject(anObject);
}
//=============================================================================
/*!
* MakeSketcherOnPlane
*/
//=============================================================================
GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakeSketcherOnPlane (const char* theCommand, GEOM::GEOM_Object_ptr theWorkingPlane)
{
GEOM::GEOM_Object_var aGEOMObject;
//Set a not done flag
GetOperations()->SetNotDone();
Handle(GEOM_Object) aWorkingPlane = GetOperations()->GetEngine()->GetObject
(theWorkingPlane->GetStudyID(), theWorkingPlane->GetEntry());
// Make Sketcher
Handle(GEOM_Object) anObject =
GetOperations()->MakeSketcherOnPlane(theCommand, aWorkingPlane);
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
return GetObject(anObject);
}

View File

@ -44,6 +44,8 @@ class GEOM_ICurvesOperations_i :
GEOM::GEOM_Object_ptr MakeSketcher (const char* theCommand, const GEOM::ListOfDouble& theWorkingPlane);
GEOM::GEOM_Object_ptr MakeSketcherOnPlane (const char* theCommand, GEOM::GEOM_Object_ptr theWorkingPlane);
::GEOMImpl_ICurvesOperations* GetOperations()
{ return (::GEOMImpl_ICurvesOperations*)GetImpl(); }
};