#include "GEOMImpl_ILocalOperations.hxx"
#include "GEOM_Function.hxx"
+#include "GEOM_PythonDump.hxx"
+
#include "GEOMImpl_Types.hxx"
#include "GEOMImpl_FilletDriver.hxx"
}
//Make a Python command
- TCollection_AsciiString anEntry, aDescr("");
- TDF_Tool::Entry(aFillet->GetEntry(), anEntry);
- aDescr = anEntry + " = ILocalOperations.MakeFilletAll(";
- TDF_Tool::Entry(theShape->GetEntry(), anEntry);
- aDescr += (anEntry+", ");
- aDescr += (TCollection_AsciiString(theR)+")");
-
- aFunction->SetDescription(aDescr);
+ GEOM::TPythonDump(aFunction) << aFillet << " = geompy.MakeFilletAll("
+ << theShape << ", " << theR << ")";
SetErrorCode(OK);
return aFillet;
}
//Make a Python command
- TCollection_AsciiString anEntry, aDescr("");
- TDF_Tool::Entry(aFillet->GetEntry(), anEntry);
- aDescr = anEntry + " = ILocalOperations.MakeFilletEdges(";
- TDF_Tool::Entry(theShape->GetEntry(), anEntry);
- aDescr += (anEntry+", ");
- aDescr += (TCollection_AsciiString(theR)+", [");
+ GEOM::TPythonDump pd (aFunction);
+ pd << aFillet << " = geompy.MakeFillet(" << theShape
+ << ", " << theR << ", geompy.ShapeType[\"EDGE\"], [";
+
it = theEdges.begin();
- aDescr += (TCollection_AsciiString(*it)+", ");
- it++;
- for (; it != theEdges.end(); it++) {
- aDescr += ", ";
- aDescr += TCollection_AsciiString(*it);
+ pd << (*it++);
+ while (it != theEdges.end()) {
+ pd << ", " << (*it++);
}
- aDescr += "])";
-
- aFunction->SetDescription(aDescr);
+ pd << "])";
SetErrorCode(OK);
return aFillet;
}
//Make a Python command
- TCollection_AsciiString anEntry, aDescr("");
- TDF_Tool::Entry(aFillet->GetEntry(), anEntry);
- aDescr = anEntry + " = ILocalOperations.MakeFilletFaces(";
- TDF_Tool::Entry(theShape->GetEntry(), anEntry);
- aDescr += (anEntry+", ");
- aDescr += (TCollection_AsciiString(theR)+", [");
+ GEOM::TPythonDump pd (aFunction);
+ pd << aFillet << " = geompy.MakeFillet(" << theShape
+ << ", " << theR << ", geompy.ShapeType[\"FACE\"], [";
+
it = theFaces.begin();
- aDescr += (TCollection_AsciiString(*it)+", ");
- it++;
- for (; it != theFaces.end(); it++) {
- aDescr += ", ";
- aDescr += TCollection_AsciiString(*it);
+ pd << (*it++);
+ while (it != theFaces.end()) {
+ pd << ", " << (*it++);
}
- aDescr += "])";
-
- aFunction->SetDescription(aDescr);
+ pd << "])";
SetErrorCode(OK);
return aFillet;
}
//Make a Python command
- TCollection_AsciiString anEntry, aDescr("");
- TDF_Tool::Entry(aChamfer->GetEntry(), anEntry);
- aDescr += anEntry;
- aDescr += " = ILocalOperations.MakeChamferAll(";
- TDF_Tool::Entry(theShape->GetEntry(), anEntry);
- aDescr += (anEntry+", ");
- aDescr += (TCollection_AsciiString(theD)+")");
-
- aFunction->SetDescription(aDescr);
+ GEOM::TPythonDump(aFunction) << aChamfer << " = geompy.MakeChamferAll("
+ << theShape << ", " << theD << ")";
SetErrorCode(OK);
return aChamfer;
}
//Make a Python command
- TCollection_AsciiString anEntry, aDescr("");
- TDF_Tool::Entry(aChamfer->GetEntry(), anEntry);
- aDescr += anEntry;
- aDescr += " = ILocalOperations.MakeChamferEdge(";
- TDF_Tool::Entry(theShape->GetEntry(), anEntry);
- aDescr += (anEntry+", ");
- aDescr += (TCollection_AsciiString(theD1)+", ");
- aDescr += (TCollection_AsciiString(theD2)+", ");
- aDescr += (TCollection_AsciiString(theFace1)+", ");
- aDescr += (TCollection_AsciiString(theFace2)+")");
-
- aFunction->SetDescription(aDescr);
+ GEOM::TPythonDump(aFunction) << aChamfer
+ << " = geompy.MakeChamferEdge(" << theShape << ", " << theD1
+ << ", " << theD2 << ", " << theFace1 << ", " << theFace2 << ")";
SetErrorCode(OK);
return aChamfer;
}
//Make a Python command
- TCollection_AsciiString anEntry, aDescr("");
- TDF_Tool::Entry(aChamfer->GetEntry(), anEntry);
- aDescr += anEntry;
- aDescr += " = ILocalOperations.MakeChamferFaces(";
- TDF_Tool::Entry(theShape->GetEntry(), anEntry);
- aDescr += (anEntry+", ");
- aDescr += (TCollection_AsciiString(theD1)+", ");
- aDescr += (TCollection_AsciiString(theD2)+", [");
+ GEOM::TPythonDump pd (aFunction);
+ pd << aChamfer << " = geompy.MakeChamferFaces(" << theShape
+ << ", " << theD1 << ", " << theD2 << ", [";
+
it = theFaces.begin();
- aDescr += (TCollection_AsciiString(*it)+", ");
- it++;
- for (; it != theFaces.end(); it++) {
- aDescr += ", ";
- aDescr += TCollection_AsciiString(*it);
+ pd << (*it++);
+ while (it != theFaces.end()) {
+ pd << ", " << (*it++);
}
- aDescr += "])";
-
- aFunction->SetDescription(aDescr);
+ pd << "])";
SetErrorCode(OK);
return aChamfer;
}
//Make a Python command
- TCollection_AsciiString anEntry, aDescr("");
- TDF_Tool::Entry(aChamfer->GetEntry(), anEntry);
- aDescr += anEntry;
- aDescr += " = ILocalOperations.MakeArchimede(";
- TDF_Tool::Entry(theShape->GetEntry(), anEntry);
- aDescr += (anEntry+", ");
- aDescr += (TCollection_AsciiString(theWeight)+", ");
- aDescr += (TCollection_AsciiString(theWaterDensity)+", ");
- aDescr += (TCollection_AsciiString(theMeshingDeflection)+")");
-
- aFunction->SetDescription(aDescr);
+ GEOM::TPythonDump(aFunction) << aChamfer
+ << " = geompy.Archimede(" << theShape << ", " << theWeight << ", "
+ << theWaterDensity << ", " << theMeshingDeflection << ")";
SetErrorCode(OK);
return aChamfer;