// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
#include <Standard_Stream.hxx>
* MakeCurveParametric
*/
//=============================================================================
-GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakeCurveParametric(const char* thexExpr, const char* theyExpr, const char* thezExpr,
- double theParamMin, double theParamMax, double theParamStep,
- GEOM::curve_type theCurveType) {
+GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakeCurveParametric
+ (const char* thexExpr, const char* theyExpr, const char* thezExpr,
+ double theParamMin, double theParamMax, double theParamStep,
+ GEOM::curve_type theCurveType)
+{
GEOM::GEOM_Object_var aGEOMObject;
//Set a not done flag
GetOperations()->SetNotDone();
-
+
GEOMImpl_ICurvesOperations::CurveType aType;
switch(theCurveType) {
case GEOM::Polyline:
break;
default:
break;
- }
-
+ }
// Make Polyline
Handle(GEOM_Object) anObject =
- GetOperations()->MakeCurveParametric(thexExpr, theyExpr, thezExpr,
- theParamMin, theParamMax,
- theParamStep, aType);
-
+ GetOperations()->MakeCurveParametric(thexExpr, theyExpr, thezExpr,
+ theParamMin, theParamMax,
+ theParamStep, aType);
+
if (!GetOperations()->IsDone() || anObject.IsNull())
- return aGEOMObject._retn();
-
+ return aGEOMObject._retn();
+
return GetObject(anObject);
}
* MakeCurveParametricNew
*/
//=============================================================================
-GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakeCurveParametricNew(const char* thexExpr, const char* theyExpr, const char* thezExpr,
- double theParamMin, double theParamMax, CORBA::Long theParamNbStep,
- GEOM::curve_type theCurveType) {
+GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakeCurveParametricNew
+ (const char* thexExpr, const char* theyExpr, const char* thezExpr,
+ double theParamMin, double theParamMax, CORBA::Long theParamNbStep,
+ GEOM::curve_type theCurveType)
+{
GEOM::GEOM_Object_var aGEOMObject;
//Set a not done flag
GetOperations()->SetNotDone();
-
+
GEOMImpl_ICurvesOperations::CurveType aType;
switch(theCurveType) {
case GEOM::Polyline:
break;
default:
break;
- }
-
+ }
// Make Polyline
Handle(GEOM_Object) anObject =
- GetOperations()->MakeCurveParametric(thexExpr, theyExpr, thezExpr,
- theParamMin, theParamMax,
+ GetOperations()->MakeCurveParametric(thexExpr, theyExpr, thezExpr,
+ theParamMin, theParamMax,
0.0, aType, theParamNbStep, true);
-
+
if (!GetOperations()->IsDone() || anObject.IsNull())
- return aGEOMObject._retn();
-
+ return aGEOMObject._retn();
+
return GetObject(anObject);
}
//=============================================================================
/*!
- * Make3DSketcher
+ * MakeSketcherOnPlane
*/
//=============================================================================
-GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::Make3DSketcher
- (const GEOM::ListOfDouble& theCoordinates)
+GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakeSketcherOnPlane
+ (const char* theCommand, GEOM::GEOM_Object_ptr theWorkingPlane)
{
//Set a not done flag
GetOperations()->SetNotDone();
- int ind = 0;
- int aLen = theCoordinates.length();
- std::list<double> aCoords;
- for (; ind < aLen; ind++)
- aCoords.push_back(theCoordinates[ind]);
+ Handle(GEOM_Object) aWorkingPlane = GetObjectImpl(theWorkingPlane);
// Make Sketcher
Handle(GEOM_Object) anObject =
- GetOperations()->Make3DSketcher(aCoords);
+ GetOperations()->MakeSketcherOnPlane(theCommand, aWorkingPlane);
if (!GetOperations()->IsDone() || anObject.IsNull())
return GEOM::GEOM_Object::_nil();
//=============================================================================
/*!
- * MakeSketcherOnPlane
+ * Make3DSketcherCommand
*/
//=============================================================================
-GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakeSketcherOnPlane
- (const char* theCommand, GEOM::GEOM_Object_ptr theWorkingPlane)
+GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::Make3DSketcherCommand (const char* theCommand)
{
//Set a not done flag
GetOperations()->SetNotDone();
- Handle(GEOM_Object) aWorkingPlane = GetObjectImpl(theWorkingPlane);
+ // Make 3D Sketcher
+ Handle(GEOM_Object) anObject = GetOperations()->Make3DSketcherCommand(theCommand);
+ if (!GetOperations()->IsDone() || anObject.IsNull())
+ return GEOM::GEOM_Object::_nil();
+
+ return GetObject(anObject);
+}
+
+//=============================================================================
+/*!
+ * Make3DSketcher
+ */
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::Make3DSketcher
+ (const GEOM::ListOfDouble& theCoordinates)
+{
+ //Set a not done flag
+ GetOperations()->SetNotDone();
+
+ int ind = 0;
+ int aLen = theCoordinates.length();
+ std::list<double> aCoords;
+ for (; ind < aLen; ind++)
+ aCoords.push_back(theCoordinates[ind]);
// Make Sketcher
Handle(GEOM_Object) anObject =
- GetOperations()->MakeSketcherOnPlane(theCommand, aWorkingPlane);
+ GetOperations()->Make3DSketcher(aCoords);
if (!GetOperations()->IsDone() || anObject.IsNull())
return GEOM::GEOM_Object::_nil();