//Make a Python command
TCollection_AsciiString anEntry, aDescr;
TDF_Tool::Entry(anEdge->GetEntry(), anEntry);
- aDescr += (anEntry+" = IShapesOperations.MakeEdge(");
+ aDescr += (anEntry+" = geompy.MakeEdge(");
TDF_Tool::Entry(thePnt1->GetEntry(), anEntry);
aDescr += (anEntry+", ");
TDF_Tool::Entry(thePnt2->GetEntry(), anEntry);
TCollection_AsciiString anEntry, aDescr;
TDF_Tool::Entry(aFace->GetEntry(), anEntry);
aDescr += anEntry;
- aDescr += " = IShapesOperations.MakeFace(";
+ aDescr += " = geompy.MakeFace(";
TDF_Tool::Entry(theWire->GetEntry(), anEntry);
aDescr += anEntry;
if (isPlanarWanted)
aDescr += ", 1)";
-
else
aDescr += ", 0)";
//Make a Python command
TCollection_AsciiString anEntry, aDescr;
TDF_Tool::Entry(aShape->GetEntry(), anEntry);
- aDescr += (anEntry + " = IShapesOperations.MakeFaceWires([");
+ aDescr += (anEntry + " = geompy.MakeFaceWires([");
// Shapes
it = theShapes.begin();
if (it != theShapes.end()) {
TDF_Tool::Entry((*it)->GetEntry(), anEntry);
+ aDescr += anEntry;
it++;
- aDescr += (anEntry+", ");
for (; it != theShapes.end(); it++) {
aDescr += ", ";
TDF_Tool::Entry((*it)->GetEntry(), anEntry);
Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeSolidShells
(list<Handle(GEOM_Object)> theShapes)
{
- return MakeShape(theShapes, GEOM_SOLID, SOLID_SHELLS, "MakeSolidShells");
+ return MakeShape(theShapes, GEOM_SOLID, SOLID_SHELLS, "MakeSolid");
}
//=============================================================================
TCollection_AsciiString anEntry, aDescr("");
TDF_Tool::Entry(aSolid->GetEntry(), anEntry);
aDescr += anEntry;
- aDescr += " = IShapesOperations.MakeSolidShell(";
+ aDescr += " = geompy.MakeSolid(";
TDF_Tool::Entry(theShell->GetEntry(), anEntry);
aDescr += (anEntry+")");
//Make a Python command
TCollection_AsciiString anEntry, aDescr("");
TDF_Tool::Entry(aShape->GetEntry(), anEntry);
- aDescr += (anEntry + " = IShapesOperations.");
+ aDescr += (anEntry + " = geompy.");
aDescr += (theMethodName + "([");
// Shapes
it = theShapes.begin();
if (it != theShapes.end()) {
TDF_Tool::Entry((*it)->GetEntry(), anEntry);
+ aDescr += anEntry;
it++;
- aDescr += (anEntry+", ");
for (; it != theShapes.end(); it++) {
aDescr += ", ";
TDF_Tool::Entry((*it)->GetEntry(), anEntry);
TCollection_AsciiString anEntry, aDescr;
TDF_Tool::Entry(aGlued->GetEntry(), anEntry);
aDescr += anEntry;
- aDescr += " = IShapesOperations.MakeGlueFaces(";
+ aDescr += " = geompy.MakeGlueFaces(";
TDF_Tool::Entry(theShape->GetEntry(), anEntry);
aDescr += anEntry + ", ";
aDescr += TCollection_AsciiString(theTolerance) + ")";
anAsciiList.Trunc(anAsciiList.Length() - 1);
anAsciiList += "]";
- anAsciiList = TCollection_AsciiString("\n") + anAsciiList;
+ anAsciiList = TCollection_AsciiString("\n\t") + anAsciiList;
//The explode doesn't change object so no new function is requiered.
aFunction = theShape->GetLastFunction();
//Make a Python command
TCollection_AsciiString aDescr(anAsciiList);
TDF_Tool::Entry(theShape->GetEntry(), anEntry);
- aDescr += " = IShapesOperations.MakeExplode(";
- aDescr += (anEntry + ",");
if (isSorted)
- aDescr += (TCollection_AsciiString(theShapeType) + ", 1)");
+ aDescr += " = geompy.SubShapeAllSorted( ";
else
- aDescr += (TCollection_AsciiString(theShapeType) + ", 0)");
+ aDescr += " = geompy.SubShapeAll( ";
+ aDescr += (anEntry + ", ");
+ aDescr += theShapeType;
+ aDescr += " )";
TCollection_AsciiString anOldDescr = aFunction->GetDescription();
anOldDescr = anOldDescr + aDescr;
//Make a Python command
TCollection_AsciiString aDescr
- ("\nlistSubShapeAllIDs = IShapesOperations.SubShapeAllIDs(");
+ ("\n\tlistSubShapeAllIDs = geompy.SubShapeAllIDs(");
TCollection_AsciiString anEntry;
TDF_Tool::Entry(theShape->GetEntry(), anEntry);
aDescr += (anEntry + ",");
Handle(TColStd_HArray1OfInteger) anArray = new TColStd_HArray1OfInteger(1,1);
anArray->SetValue(1, theID);
- Handle(GEOM_Object) anObj = GetEngine()->AddSubShape(theMainShape, anArray);
+ Handle(GEOM_Object) anObj = GetEngine()->AddSubShape(theMainShape, anArray,true);
if (anObj.IsNull()) {
SetErrorCode("Can not get a sub-shape with the given ID");
return NULL;
Handle(GEOM_Function) aFunction = theMainShape->GetLastFunction();
//Make a Python command
- TCollection_AsciiString aDescr ("\n");
+ TCollection_AsciiString aDescr ("\n\t");
TCollection_AsciiString anEntry;
TDF_Tool::Entry(anObj->GetEntry(), anEntry);
- aDescr += anEntry + " = IShapesOperations.GetSubShape(";
+ aDescr += anEntry + " = geompy.GetSubShape(";
TDF_Tool::Entry(theMainShape->GetEntry(), anEntry);
- aDescr += anEntry + ", ";
- aDescr += TCollection_AsciiString(theID) + ")";
+ aDescr += anEntry + ", [" + theID + "])";
TCollection_AsciiString anOldDescr = aFunction->GetDescription();
anOldDescr = anOldDescr + aDescr;
TCollection_AsciiString anEntry, aDescr;
TDF_Tool::Entry(aReversed->GetEntry(), anEntry);
aDescr += anEntry;
- aDescr += " = IShapesOperations.ReverseShape(";
+ aDescr += " = geompy.ChangeOrientation(";
TDF_Tool::Entry(theShape->GetEntry(), anEntry);
aDescr += anEntry + ")";
Handle(GEOM_Function) aFunction = theShape->GetLastFunction();
//Make a Python command
- TCollection_AsciiString aDescr ("\nlistFreeFacesIDs = IShapesOperations.GetFreeFacesIDs(");
+ TCollection_AsciiString aDescr ("\n\tlistFreeFacesIDs = geompy.GetFreeFacesIDs(");
TCollection_AsciiString anEntry;
TDF_Tool::Entry(theShape->GetEntry(), anEntry);
aDescr += (anEntry + ")");
//Make a Python command
TCollection_AsciiString aDescr
- ("\nlistSharedShapes = IShapesOperations.GetSharedShapes(");
+ ("\n\tlistSharedShapes = geompy.GetSharedShapes(");
TCollection_AsciiString anEntry;
TDF_Tool::Entry(theShape1->GetEntry(), anEntry);
aDescr += (anEntry + ",");
// Make a Python command
TCollection_AsciiString anEntry, aDescr
- ("\nlistShapesOnPlane = IShapesOperations.GetShapesOnPlane(");
+ ("\n\tlistShapesOnPlane = geompy.GetShapesOnPlane(");
TDF_Tool::Entry(theShape->GetEntry(), anEntry);
aDescr += anEntry + TCollection_AsciiString(theShapeType) + ",";
TDF_Tool::Entry(theAx1->GetEntry(), anEntry);
// Make a Python command
TCollection_AsciiString anEntry, aDescr
- ("\nlistShapesOnCylinder = IShapesOperations.GetShapesOnCylinder(");
+ ("\n\tlistShapesOnCylinder = geompy.GetShapesOnCylinder(");
TDF_Tool::Entry(theShape->GetEntry(), anEntry);
aDescr += anEntry + TCollection_AsciiString(theShapeType) + ",";
TDF_Tool::Entry(theAxis->GetEntry(), anEntry);
// Make a Python command
TCollection_AsciiString anEntry, aDescr
- ("\nlistShapesOnSphere = IShapesOperations.GetShapesOnSphere(");
+ ("\n\tlistShapesOnSphere = geompy.GetShapesOnSphere(");
TDF_Tool::Entry(theShape->GetEntry(), anEntry);
aDescr += anEntry + TCollection_AsciiString(theShapeType) + ",";
TDF_Tool::Entry(theCenter->GetEntry(), anEntry);
TCollection_AsciiString anEntry, aDescr;
TDF_Tool::Entry(aResult->GetEntry(), anEntry);
aDescr += anEntry;
- aDescr += " = IShapesOperations.GetInPlace(";
+ aDescr += " = geompy.GetInPlace(";
TDF_Tool::Entry(theShapeWhere->GetEntry(), anEntry);
aDescr += anEntry + ",";
TDF_Tool::Entry(theShapeWhat->GetEntry(), anEntry);