#include <TDF_Tool.hxx>
#include "GEOM_Function.hxx"
+#include "GEOM_PythonDump.hxx"
#include "GEOMImpl_PointDriver.hxx"
#include "GEOMImpl_VectorDriver.hxx"
}
//Make a Python command
- TCollection_AsciiString anEntry, aDescr;
- TDF_Tool::Entry(aPoint->GetEntry(), anEntry);
- aDescr += (anEntry+" = IBasicOperations.MakePointXYZ(");
- aDescr += (TCollection_AsciiString(theX)+", ");
- aDescr += (TCollection_AsciiString(theY)+", ");
- aDescr += (TCollection_AsciiString(theZ)+")");
-
- aFunction->SetDescription(aDescr);
+ GEOM::TPythonDump(aFunction) << aPoint << " = geompy.MakeVertex("
+ << theX << ", " << theY << ", " << theZ << ")";
SetErrorCode(OK);
return aPoint;
}
//Make a Python command
- TCollection_AsciiString anEntry, aDescr;
- TDF_Tool::Entry(aPoint->GetEntry(), anEntry);
- aDescr += (anEntry+" = IBasicOperations.MakePointReference(");
- TDF_Tool::Entry(theReference->GetEntry(), anEntry);
- aDescr += (anEntry+", ");
- aDescr += (TCollection_AsciiString(theX)+", ");
- aDescr += (TCollection_AsciiString(theY)+", ");
- aDescr += (TCollection_AsciiString(theZ)+")");
-
- aFunction->SetDescription(aDescr);
+ GEOM::TPythonDump(aFunction) << aPoint << " = geompy.MakeVertexWithRef("
+ << theReference << ", " << theX << ", " << theY << ", " << theZ << ")";
SetErrorCode(OK);
return aPoint;
}
//Make a Python command
- TCollection_AsciiString anEntry, aDescr;
- TDF_Tool::Entry(aPoint->GetEntry(), anEntry);
- aDescr += (anEntry+" = IBasicOperations.MakePointReference(");
- TDF_Tool::Entry(theCurve->GetEntry(), anEntry);
- aDescr += (anEntry+", ");
- aDescr += (TCollection_AsciiString(theParameter)+")");
-
- aFunction->SetDescription(aDescr);
+ GEOM::TPythonDump(aFunction) << aPoint << " = geompy.MakeVertexOnCurve("
+ << theCurve << ", " << theParameter << ")";
SetErrorCode(OK);
return aPoint;
}
//Make a Python command
- TCollection_AsciiString anEntry, aDescr;
- TDF_Tool::Entry(aVector->GetEntry(), anEntry);
- aDescr += (anEntry+" = IBasicOperations.MakeVectorDXDYDZ(");
- aDescr += (TCollection_AsciiString(theDX)+", ");
- aDescr += (TCollection_AsciiString(theDY)+", ");
- aDescr += (TCollection_AsciiString(theDZ)+")");
-
- aFunction->SetDescription(aDescr);
+ GEOM::TPythonDump(aFunction) << aVector << " = geompy.MakeVectorDXDYDZ("
+ << theDX << ", " << theDY << ", " << theDZ << ")";
SetErrorCode(OK);
return aVector;
}
//Make a Python command
- TCollection_AsciiString anEntry, aDescr;
- TDF_Tool::Entry(aVector->GetEntry(), anEntry);
- aDescr += (anEntry+" = IBasicOperations.MakeVectorTwoPnt(");
- TDF_Tool::Entry(thePnt1->GetEntry(), anEntry);
- aDescr += (anEntry+", ");
- TDF_Tool::Entry(thePnt2->GetEntry(), anEntry);
- aDescr += (anEntry+")");
-
- aFunction->SetDescription(aDescr);
+ GEOM::TPythonDump(aFunction) << aVector << " = geompy.MakeVector("
+ << thePnt1 << ", " << thePnt2 << ")";
SetErrorCode(OK);
return aVector;
}
//Make a Python command
- TCollection_AsciiString anEntry, aDescr;
- TDF_Tool::Entry(aLine->GetEntry(), anEntry);
- aDescr += (anEntry+" = IBasicOperations.MakeLine(");
- TDF_Tool::Entry(thePnt->GetEntry(), anEntry);
- aDescr += (anEntry+", ");
- TDF_Tool::Entry(theDir->GetEntry(), anEntry);
- aDescr += (anEntry+")");
-
- aFunction->SetDescription(aDescr);
+ GEOM::TPythonDump(aFunction) << aLine << " = geompy.MakeLine("
+ << thePnt << ", " << theDir << ")";
SetErrorCode(OK);
return aLine;
}
//Make a Python command
- TCollection_AsciiString anEntry, aDescr;
- TDF_Tool::Entry(aLine->GetEntry(), anEntry);
- aDescr += (anEntry+" = IBasicOperations.MakeLineTwoPnt(");
- TDF_Tool::Entry(thePnt1->GetEntry(), anEntry);
- aDescr += (anEntry+", ");
- TDF_Tool::Entry(thePnt2->GetEntry(), anEntry);
- aDescr += (anEntry+")");
-
- aFunction->SetDescription(aDescr);
+ GEOM::TPythonDump(aFunction) << aLine << " = geompy.MakeLineTwoPnt("
+ << thePnt1 << ", " << thePnt2 << ")";
SetErrorCode(OK);
return aLine;
}
//Make a Python command
- TCollection_AsciiString anEntry, aDescr;
- TDF_Tool::Entry(aPlane->GetEntry(), anEntry);
- aDescr += (anEntry+" = IBasicOperations.MakePlaneThreePnt(");
- TDF_Tool::Entry(thePnt1->GetEntry(), anEntry);
- aDescr += (anEntry+", ");
- TDF_Tool::Entry(thePnt2->GetEntry(), anEntry);
- aDescr += (anEntry+", ");
- TDF_Tool::Entry(thePnt3->GetEntry(), anEntry);
- aDescr += (anEntry+", ");
- aDescr += TCollection_AsciiString(theSize) + ")";
-
- aFunction->SetDescription(aDescr);
+ GEOM::TPythonDump(aFunction) << aPlane << " = geompy.MakePlaneThreePnt("
+ << thePnt1 << ", " << thePnt2 << ", " << thePnt3 << ", " << theSize << ")";
SetErrorCode(OK);
return aPlane;
}
//Make a Python command
- TCollection_AsciiString anEntry, aDescr;
- TDF_Tool::Entry(aPlane->GetEntry(), anEntry);
- aDescr += (anEntry+" = IBasicOperations.MakePlanePntVec(");
- TDF_Tool::Entry(thePnt->GetEntry(), anEntry);
- aDescr += (anEntry+", ");
- TDF_Tool::Entry(theVec->GetEntry(), anEntry);
- aDescr += (anEntry+", ");
- aDescr += TCollection_AsciiString(theSize) + ")";
-
- aFunction->SetDescription(aDescr);
+ GEOM::TPythonDump(aFunction) << aPlane << " = geompy.MakePlane("
+ << thePnt << ", " << theVec << ", " << theSize << ")";
SetErrorCode(OK);
return aPlane;
}
//Make a Python command
- TCollection_AsciiString anEntry, aDescr;
- TDF_Tool::Entry(aPlane->GetEntry(), anEntry);
- aDescr += (anEntry+" = IBasicOperations.MakePlaneFace(");
- TDF_Tool::Entry(theFace->GetEntry(), anEntry);
- aDescr += (anEntry+", ");
- aDescr += TCollection_AsciiString(theSize) + ")";
-
- aFunction->SetDescription(aDescr);
+ GEOM::TPythonDump(aFunction) << aPlane << " = geompy.MakePlaneFace("
+ << theFace << ", " << theSize << ")";
SetErrorCode(OK);
return aPlane;
}
//Make a Python command
- TCollection_AsciiString anEntry, aDescr;
- TDF_Tool::Entry(aMarker->GetEntry(), anEntry);
- aDescr += anEntry + " = IBasicOperations.MakeMarker(";
- aDescr += TCollection_AsciiString(theOX) + ", ";
- aDescr += TCollection_AsciiString(theOY) + ", ";
- aDescr += TCollection_AsciiString(theOZ) + ", ";
- aDescr += TCollection_AsciiString(theXDX) + ", ";
- aDescr += TCollection_AsciiString(theXDY) + ", ";
- aDescr += TCollection_AsciiString(theXDZ) + ", ";
- aDescr += TCollection_AsciiString(theYDX) + ", ";
- aDescr += TCollection_AsciiString(theYDY) + ", ";
- aDescr += TCollection_AsciiString(theYDZ) + ")";
-
- aFunction->SetDescription(aDescr);
+ GEOM::TPythonDump(aFunction) << aMarker << " = geompy.MakeMarker("
+ << theOX << ", " << theOY << ", " << theOZ << ", "
+ << theXDX << ", " << theXDY << ", " << theXDZ << ", "
+ << theYDX << ", " << theYDY << ", " << theYDZ << ")";
SetErrorCode(OK);
return aMarker;