mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-11-15 01:58:36 +05:00
PAL9166. Add possibility to make sketcher on an existing plane
This commit is contained in:
parent
eab0044eba
commit
3cb6f863c5
@ -1463,6 +1463,17 @@ module GEOM
|
|||||||
* \return New GEOM_Object, containing the created wire.
|
* \return New GEOM_Object, containing the created wire.
|
||||||
*/
|
*/
|
||||||
GEOM_Object MakeSketcher (in string theCommand, in ListOfDouble theWorkingPlane);
|
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);
|
||||||
};
|
};
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -303,3 +303,28 @@ GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakeSketcher (const char* theCom
|
|||||||
|
|
||||||
return GetObject(anObject);
|
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);
|
||||||
|
}
|
||||||
|
@ -44,6 +44,8 @@ class GEOM_ICurvesOperations_i :
|
|||||||
|
|
||||||
GEOM::GEOM_Object_ptr MakeSketcher (const char* theCommand, const GEOM::ListOfDouble& theWorkingPlane);
|
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()
|
::GEOMImpl_ICurvesOperations* GetOperations()
|
||||||
{ return (::GEOMImpl_ICurvesOperations*)GetImpl(); }
|
{ return (::GEOMImpl_ICurvesOperations*)GetImpl(); }
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user