return aDocID.IntegerValue();
}
-bool ProcessFunction(Handle(GEOM_Function)& theFunction,
- TCollection_AsciiString& theScript,
- TCollection_AsciiString& theAfterScript,
- const TVariablesList& theVariables,
- const bool theIsPublished,
- TDF_LabelMap& theProcessed,
- std::set<std::string>& theIgnoreObjs,
- bool& theIsDumpCollected);
-
-void ReplaceVariables(TCollection_AsciiString& theCommand,
- const TVariablesList& theVariables);
+bool ProcessFunction(Handle(GEOM_Function)& theFunction,
+ TCollection_AsciiString& theScript,
+ TCollection_AsciiString& theAfterScript,
+ const Resource_DataMapOfAsciiStringAsciiString& theObjectNames,
+ const bool theIsPublished,
+ TDF_LabelMap& theProcessed,
+ std::set<std::string>& theIgnoreObjs,
+ bool& theIsDumpCollected);
+
+void ReplaceVariables(TCollection_AsciiString& theCommand,
+ const TColStd_SequenceOfAsciiString& theVariables,
+ const Resource_DataMapOfAsciiStringAsciiString& theObjectNames);
Handle(TColStd_HSequenceOfInteger) FindEntries(TCollection_AsciiString& theString);
//=============================================================================
TCollection_AsciiString GEOM_Engine::DumpPython(int theDocID,
Resource_DataMapOfAsciiStringAsciiString& theObjectNames,
- TVariablesList theVariables,
bool isPublished,
bool& aValidScript)
{
}
bool isDumpCollected = false;
TCollection_AsciiString aCurScript, anAfterScript;
- if (!ProcessFunction(aFunction, aCurScript, anAfterScript, theVariables,
+ if (!ProcessFunction(aFunction, aCurScript, anAfterScript, theObjectNames,
isPublished, aCheckedFuncMap, anIgnoreObjMap,
isDumpCollected ))
continue;
* ProcessFunction: Dump fucntion description into script
*/
//=============================================================================
-bool ProcessFunction(Handle(GEOM_Function)& theFunction,
- TCollection_AsciiString& theScript,
- TCollection_AsciiString& theAfterScript,
- const TVariablesList& theVariables,
- const bool theIsPublished,
- TDF_LabelMap& theProcessed,
- std::set<std::string>& theIgnoreObjs,
- bool& theIsDumpCollected)
+bool ProcessFunction(Handle(GEOM_Function)& theFunction,
+ TCollection_AsciiString& theScript,
+ TCollection_AsciiString& theAfterScript,
+ const Resource_DataMapOfAsciiStringAsciiString& theObjectNames,
+ const bool theIsPublished,
+ TDF_LabelMap& theProcessed,
+ std::set<std::string>& theIgnoreObjs,
+ bool& theIsDumpCollected)
{
theIsDumpCollected = false;
if (theFunction.IsNull()) return false;
theIsDumpCollected = true;
}
- //Replace parameter by notebook variables
- ReplaceVariables(aDescr,theVariables);
+ // replace parameters of the function by notebook variables
+ TColStd_SequenceOfAsciiString aVariables;
+ for( int i = 1, n = theFunction->GetArgsCount(); i <= n; i++ )
+ aVariables.Append( theFunction->GetParam( i ) );
+ ReplaceVariables(aDescr, aVariables, theObjectNames);
+
if ( theIsDumpCollected ) {
int i = 1;
bool isBefore = true;
* Notebook if need
*/
//=============================================================================
-void ReplaceVariables(TCollection_AsciiString& theCommand,
- const TVariablesList& theVariables)
+void ReplaceVariables(TCollection_AsciiString& theCommand,
+ const TColStd_SequenceOfAsciiString& theVariables,
+ const Resource_DataMapOfAsciiStringAsciiString& theObjectNames)
{
if (MYDEBUG)
cout<<"Command : "<<theCommand<<endl;
- if (MYDEBUG) {
- cout<<"All Entries:"<<endl;
- TVariablesList::const_iterator it = theVariables.begin();
- for(;it != theVariables.end();it++)
- cout<<"\t'"<<(*it).first<<"'"<<endl;
- }
-
//Additional case - multi-row commands
int aCommandIndex = 1;
while( aCommandIndex < 10 ) { // tmp check
cout<<"Sub-entry : '" <<anEntry<<"'"<<endl;
}
- //Find variables used for object construction
- ObjectStates* aStates = 0;
- TVariablesList::const_iterator it = theVariables.find(anEntry);
- if( it != theVariables.end() )
- aStates = (*it).second;
-
- if(!aStates) {
- if(MYDEBUG)
- cout<<"Valiables list empty!!!"<<endl;
- aCommandIndex++;
- continue;
- }
-
- TState aVariables = aStates->GetCurrectState();
-
if(MYDEBUG) {
- cout<<"Variables from SObject:"<<endl;
- for (int i = 0; i < aVariables.size();i++)
- cout<<"\t Variable["<<i<<"] = "<<aVariables[i].myVariable<<endl;
+ cout<<"Variables:"<<endl;
+ for (int i = 1; i <= theVariables.Length(); i++)
+ cout<<"\t Variable["<<i<<"] = "<<theVariables.Value(i)<<endl;
}
//Calculate total number of parameters
//Replace parameters by variables
Standard_Integer aStartPos = 0;
Standard_Integer aEndPos = 0;
- int iVar = 0;
+ int iVar = 1;
TCollection_AsciiString aVar, aReplacedVar;
for(Standard_Integer i=aFirstParam;i <= aTotalNbParams;i++) {
//Replace first parameter (bettwen '(' character and first ',' character)
if(MYDEBUG)
cout<<"aParameter: "<<aParameter<<endl;
- if(iVar >= aVariables.size())
+ if(iVar > theVariables.Length())
continue;
- aReplacedParameter = aVariables[iVar].myVariable;
+ aReplacedParameter = theVariables.Value(iVar);
if(aReplacedParameter.IsEmpty()) {
iVar++;
continue;
}
- if(aVariables[iVar].isVariable) {
+ if(!theVariables.Value(iVar).IsEmpty()) {
aReplacedParameter.InsertBefore(1,"'");
aReplacedParameter.InsertAfter(aReplacedParameter.Length(),"'");
}
} // end of specific case for sketcher
//If parameter is entry or 'None', skip it
- if(theVariables.find(aVar) != theVariables.end() || aVar.Search(":") != -1 || aVar == PY_NULL)
+ if(theObjectNames.IsBound(aVar) || aVar.Search(":") != -1 || aVar == PY_NULL)
continue;
- if(iVar >= aVariables.size())
+ if(iVar > theVariables.Length())
continue;
- aReplacedVar = aVariables[iVar].myVariable;
+ aReplacedVar = theVariables.Value(iVar);
if(aReplacedVar.IsEmpty()) {
iVar++;
continue;
}
- if(aVariables[iVar].isVariable) {
+ if(!theVariables.Value(iVar).IsEmpty()) {
aReplacedVar.InsertBefore(1,"\"");
aReplacedVar.InsertAfter(aReplacedVar.Length(),"\"");
}
theCommand.Insert(aStartCommandPos, aCommand);
aCommandIndex++;
-
- aStates->IncrementState();
}
if (MYDEBUG)
theEntry.SubString( theEntry.SearchFromEnd(":")+1, theEntry.Length() ).IntegerValue();
theEntryToCommandMap.insert( std::make_pair( tag, aCommand.ToCString() ));
}
-
-//================================================================================
-/*!
- * \brief Constructor
- */
-//================================================================================
-ObjectStates::ObjectStates()
-{
- _dumpstate = 0;
-}
-
-//================================================================================
-/*!
- * \brief Destructor
- */
-//================================================================================
-ObjectStates::~ObjectStates()
-{
-}
-
-//================================================================================
-/*!
- * \brief Return current object state
- * \retval state - Object state (vector of notebook variable)
- */
-//================================================================================
-TState ObjectStates::GetCurrectState() const
-{
- if(_states.size() > _dumpstate)
- return _states[_dumpstate];
- return TState();
-}
-
-//================================================================================
-/*!
- * \brief Add new object state
- * \param theState - Object state (vector of notebook variable)
- */
-//================================================================================
-void ObjectStates::AddState(const TState &theState)
-{
- _states.push_back(theState);
-}
-
-//================================================================================
-/*!
- * \brief Increment object state
- */
-//================================================================================
-void ObjectStates::IncrementState()
-{
- _dumpstate++;
-}
theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
anObj = self.BasicOp.MakePointXYZ(theX, theY, theZ)
RaiseIfFailed("MakePointXYZ", self.BasicOp)
- anObj.SetParameters(Parameters)
+ SetParameters(anObj, Parameters)
return anObj
## Create a point, distant from the referenced point
theX,theY,theZ,Parameters = ParseParameters(theX, theY, theZ)
anObj = self.BasicOp.MakePointWithReference(theReference, theX, theY, theZ)
RaiseIfFailed("MakePointWithReference", self.BasicOp)
- anObj.SetParameters(Parameters)
+ SetParameters(anObj, Parameters)
return anObj
## Create a point, corresponding to the given parameter on the given curve.
theParameter, Parameters = ParseParameters(theParameter)
anObj = self.BasicOp.MakePointOnCurve(theRefCurve, theParameter)
RaiseIfFailed("MakePointOnCurve", self.BasicOp)
- anObj.SetParameters(Parameters)
+ SetParameters(anObj, Parameters)
return anObj
## Create a point by projection give coordinates on the given curve
theX, theY, theZ, Parameters = ParseParameters(theX, theY, theZ)
anObj = self.BasicOp.MakePointOnCurveByCoord(theRefCurve, theX, theY, theZ)
RaiseIfFailed("MakeVertexOnCurveByCoord", self.BasicOp)
- anObj.SetParameters(Parameters)
+ SetParameters(anObj, Parameters)
return anObj
## Create a point, corresponding to the given parameters on the
# Example: see GEOM_TestAll.py
anObj = self.BasicOp.MakePointOnSurface(theRefSurf, theUParameter, theVParameter)
RaiseIfFailed("MakePointOnSurface", self.BasicOp)
- anObj.SetParameters(Parameters);
+ SetParameters(anObj, Parameters);
return anObj
## Create a point by projection give coordinates on the given surface
# Example: see GEOM_TestAll.py
anObj = self.BasicOp.MakePointOnSurfaceByCoord(theRefSurf, theX, theY, theZ)
RaiseIfFailed("MakeVertexOnSurfaceByCoord", self.BasicOp)
- anObj.SetParameters(Parameters);
+ SetParameters(anObj, Parameters);
return anObj
## Create a point on intersection of two lines.
theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
anObj = self.BasicOp.MakeVectorDXDYDZ(theDX, theDY, theDZ)
RaiseIfFailed("MakeVectorDXDYDZ", self.BasicOp)
- anObj.SetParameters(Parameters)
+ SetParameters(anObj, Parameters)
return anObj
## Create a vector between two points.
theTrimSize, Parameters = ParseParameters(theTrimSize);
anObj = self.BasicOp.MakePlanePntVec(thePnt, theVec, theTrimSize)
RaiseIfFailed("MakePlanePntVec", self.BasicOp)
- anObj.SetParameters(Parameters)
+ SetParameters(anObj, Parameters)
return anObj
## Create a plane, passing through the three given points
theTrimSize, Parameters = ParseParameters(theTrimSize);
anObj = self.BasicOp.MakePlaneThreePnt(thePnt1, thePnt2, thePnt3, theTrimSize)
RaiseIfFailed("MakePlaneThreePnt", self.BasicOp)
- anObj.SetParameters(Parameters)
+ SetParameters(anObj, Parameters)
return anObj
## Create a plane, similar to the existing one, but with another size of representing face.
theTrimSize, Parameters = ParseParameters(theTrimSize);
anObj = self.BasicOp.MakePlaneFace(theFace, theTrimSize)
RaiseIfFailed("MakePlaneFace", self.BasicOp)
- anObj.SetParameters(Parameters)
+ SetParameters(anObj, Parameters)
return anObj
## Create a plane, passing through the 2 vectors
theTrimSize, Parameters = ParseParameters(theTrimSize);
anObj = self.BasicOp.MakePlane2Vec(theVec1, theVec2, theTrimSize)
RaiseIfFailed("MakePlane2Vec", self.BasicOp)
- anObj.SetParameters(Parameters)
+ SetParameters(anObj, Parameters)
return anObj
## Create a plane, based on a Local coordinate system.
theTrimSize, Parameters = ParseParameters(theTrimSize);
anObj = self.BasicOp.MakePlaneLCS(theLCS, theTrimSize, theOrientation)
RaiseIfFailed("MakePlaneLCS", self.BasicOp)
- anObj.SetParameters(Parameters)
+ SetParameters(anObj, Parameters)
return anObj
## Create a local coordinate system.
OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ, Parameters = ParseParameters(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ);
anObj = self.BasicOp.MakeMarker(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ)
RaiseIfFailed("MakeMarker", self.BasicOp)
- anObj.SetParameters(Parameters)
+ SetParameters(anObj, Parameters)
return anObj
## Create a local coordinate system.
theR, Parameters = ParseParameters(theR)
anObj = self.CurvesOp.MakeCirclePntVecR(thePnt, theVec, theR)
RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
- anObj.SetParameters(Parameters)
+ SetParameters(anObj, Parameters)
return anObj
## Create a circle with given radius.
anObj = self.CurvesOp.MakeEllipse(thePnt, theVec, theRMajor, theRMinor)
pass
RaiseIfFailed("MakeEllipse", self.CurvesOp)
- anObj.SetParameters(Parameters)
+ SetParameters(anObj, Parameters)
return anObj
## Create an ellipse with given radiuses.
theCommand,Parameters = ParseSketcherCommand(theCommand)
anObj = self.CurvesOp.MakeSketcher(theCommand, theWorkingPlane)
RaiseIfFailed("MakeSketcher", self.CurvesOp)
- anObj.SetParameters(Parameters)
+ SetParameters(anObj, Parameters)
return anObj
## Create a sketcher (wire or face), following the textual description,
theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
anObj = self.PrimOp.MakeBoxDXDYDZ(theDX, theDY, theDZ)
RaiseIfFailed("MakeBoxDXDYDZ", self.PrimOp)
- SetParameters( anObj, Parameters )
+ SetParameters(anObj, Parameters)
return anObj
## Create a box with two specified opposite vertices,
theH,theW,Parameters = ParseParameters(theH, theW)
anObj = self.PrimOp.MakeFaceHW(theH, theW, theOrientation)
RaiseIfFailed("MakeFaceHW", self.PrimOp)
- anObj.SetParameters(Parameters)
+ SetParameters(anObj, Parameters)
return anObj
## Create a face from another plane and two sizes,
theH,theW,Parameters = ParseParameters(theH, theW)
anObj = self.PrimOp.MakeFaceObjHW(theObj, theH, theW)
RaiseIfFailed("MakeFaceObjHW", self.PrimOp)
- anObj.SetParameters(Parameters)
+ SetParameters(anObj, Parameters)
return anObj
## Create a disk with given center, normal vector and radius.
theR,Parameters = ParseParameters(theR)
anObj = self.PrimOp.MakeDiskPntVecR(thePnt, theVec, theR)
RaiseIfFailed("MakeDiskPntVecR", self.PrimOp)
- anObj.SetParameters(Parameters)
+ SetParameters(anObj, Parameters)
return anObj
## Create a disk, passing through three given points
theR,Parameters = ParseParameters(theR)
anObj = self.PrimOp.MakeDiskR(theR, theOrientation)
RaiseIfFailed("MakeDiskR", self.PrimOp)
- anObj.SetParameters(Parameters)
+ SetParameters(anObj, Parameters)
return anObj
## Create a cylinder with given base point, axis, radius and height.
theR,theH,Parameters = ParseParameters(theR, theH)
anObj = self.PrimOp.MakeCylinderPntVecRH(thePnt, theAxis, theR, theH)
RaiseIfFailed("MakeCylinderPntVecRH", self.PrimOp)
- anObj.SetParameters(Parameters)
+ SetParameters(anObj, Parameters)
return anObj
## Create a cylinder with given radius and height at
theR,theH,Parameters = ParseParameters(theR, theH)
anObj = self.PrimOp.MakeCylinderRH(theR, theH)
RaiseIfFailed("MakeCylinderRH", self.PrimOp)
- anObj.SetParameters(Parameters)
+ SetParameters(anObj, Parameters)
return anObj
## Create a sphere with given center and radius.
theR,Parameters = ParseParameters(theR)
anObj = self.PrimOp.MakeSpherePntR(thePnt, theR)
RaiseIfFailed("MakeSpherePntR", self.PrimOp)
- anObj.SetParameters(Parameters)
+ SetParameters(anObj, Parameters)
return anObj
## Create a sphere with given center and radius.
theR,Parameters = ParseParameters(theR)
anObj = self.PrimOp.MakeSphereR(theR)
RaiseIfFailed("MakeSphereR", self.PrimOp)
- anObj.SetParameters(Parameters)
+ SetParameters(anObj, Parameters)
return anObj
## Create a cone with given base point, axis, height and radiuses.
theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
anObj = self.PrimOp.MakeConePntVecR1R2H(thePnt, theAxis, theR1, theR2, theH)
RaiseIfFailed("MakeConePntVecR1R2H", self.PrimOp)
- anObj.SetParameters(Parameters)
+ SetParameters(anObj, Parameters)
return anObj
## Create a cone with given height and radiuses at
theR1,theR2,theH,Parameters = ParseParameters(theR1,theR2,theH)
anObj = self.PrimOp.MakeConeR1R2H(theR1, theR2, theH)
RaiseIfFailed("MakeConeR1R2H", self.PrimOp)
- anObj.SetParameters(Parameters)
+ SetParameters(anObj, Parameters)
return anObj
## Create a torus with given center, normal vector and radiuses.
theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
anObj = self.PrimOp.MakeTorusPntVecRR(thePnt, theVec, theRMajor, theRMinor)
RaiseIfFailed("MakeTorusPntVecRR", self.PrimOp)
- anObj.SetParameters(Parameters)
+ SetParameters(anObj, Parameters)
return anObj
## Create a torus with given radiuses at the origin of coordinate system.
theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
anObj = self.PrimOp.MakeTorusRR(theRMajor, theRMinor)
RaiseIfFailed("MakeTorusRR", self.PrimOp)
- anObj.SetParameters(Parameters)
+ SetParameters(anObj, Parameters)
return anObj
# end of l3_3d_primitives
theH,Parameters = ParseParameters(theH)
anObj = self.PrimOp.MakePrismVecH(theBase, theVec, theH)
RaiseIfFailed("MakePrismVecH", self.PrimOp)
- anObj.SetParameters(Parameters)
+ SetParameters(anObj, Parameters)
return anObj
## Create a shape by extrusion of the base shape along the vector,
theH,Parameters = ParseParameters(theH)
anObj = self.PrimOp.MakePrismVecH2Ways(theBase, theVec, theH)
RaiseIfFailed("MakePrismVecH2Ways", self.PrimOp)
- anObj.SetParameters(Parameters)
+ SetParameters(anObj, Parameters)
return anObj
## Create a shape by extrusion of the base shape along the dx, dy, dz direction
theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
anObj = self.PrimOp.MakePrismDXDYDZ(theBase, theDX, theDY, theDZ)
RaiseIfFailed("MakePrismDXDYDZ", self.PrimOp)
- anObj.SetParameters(Parameters)
+ SetParameters(anObj, Parameters)
return anObj
## Create a shape by extrusion of the base shape along the dx, dy, dz direction
theDX,theDY,theDZ,Parameters = ParseParameters(theDX, theDY, theDZ)
anObj = self.PrimOp.MakePrismDXDYDZ2Ways(theBase, theDX, theDY, theDZ)
RaiseIfFailed("MakePrismDXDYDZ2Ways", self.PrimOp)
- anObj.SetParameters(Parameters)
+ SetParameters(anObj, Parameters)
return anObj
## Create a shape by revolution of the base shape around the axis
theAngle,Parameters = ParseParameters(theAngle)
anObj = self.PrimOp.MakeRevolutionAxisAngle(theBase, theAxis, theAngle)
RaiseIfFailed("MakeRevolutionAxisAngle", self.PrimOp)
- anObj.SetParameters(Parameters)
+ SetParameters(anObj, Parameters)
return anObj
## The Same Revolution but in both ways forward&backward.
theAngle,Parameters = ParseParameters(theAngle)
anObj = self.PrimOp.MakeRevolutionAxisAngle2Ways(theBase, theAxis, theAngle)
RaiseIfFailed("MakeRevolutionAxisAngle2Ways", self.PrimOp)
- anObj.SetParameters(Parameters)
+ SetParameters(anObj, Parameters)
return anObj
## Create a filling from the given compound of contours.
anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg,
theTol2D, theTol3D, theNbIter, isApprox)
RaiseIfFailed("MakeFilling", self.PrimOp)
- anObj.SetParameters(Parameters)
+ SetParameters(anObj, Parameters)
return anObj
## Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
for string in (theOperators + theParameters):
Parameters = ":" + Parameters
pass
- anObj.SetParameters(Parameters)
+ SetParameters(anObj, Parameters)
return anObj
## Remove faces from the given object (shape).
theTolerance,Parameters = ParseParameters(theTolerance)
anObj = self.HealOp.Sew(theObject, theTolerance)
RaiseIfFailed("Sew", self.HealOp)
- anObj.SetParameters(Parameters)
+ SetParameters(anObj, Parameters)
return anObj
## Remove internal wires and edges from the given object (face).
theEdgeIndex,theValue,isByParameter,Parameters = ParseParameters(theEdgeIndex,theValue,isByParameter)
anObj = self.HealOp.DivideEdge(theObject, theEdgeIndex, theValue, isByParameter)
RaiseIfFailed("DivideEdge", self.HealOp)
- anObj.SetParameters(Parameters)
+ SetParameters(anObj, Parameters)
return anObj
## Change orientation of the given object. Updates given shape.
anObj = self.ShapesOp.MakeGlueFaces(theShape, theTolerance, doKeepNonSolids)
if anObj is None:
raise RuntimeError, "MakeGlueFaces : " + self.ShapesOp.GetErrorCode()
- anObj.SetParameters(Parameters)
+ SetParameters(anObj, Parameters)
return anObj
## Find coincident faces in theShape for possible gluing.
# Example: see GEOM_TestAll.py
theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
anObj = self.TrsfOp.TranslateDXDYDZ(theObject, theDX, theDY, theDZ)
- anObj.SetParameters(Parameters)
+ SetParameters(anObj, Parameters)
RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
return anObj
# Example: see GEOM_TestAll.py
theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ)
anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
- anObj.SetParameters(Parameters)
+ SetParameters(anObj, Parameters)
RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
return anObj
theDistance,Parameters = ParseParameters(theDistance)
anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, theCopy)
RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
- anObj.SetParameters(Parameters)
+ SetParameters(anObj, Parameters)
return anObj
## Translate the given object along the given vector on given distance,
theDistance,Parameters = ParseParameters(theDistance)
anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, 1)
RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
- anObj.SetParameters(Parameters)
+ SetParameters(anObj, Parameters)
return anObj
## Rotate the given object around the given axis on the given angle.
theAngle = theAngle*math.pi/180.0
anObj = self.TrsfOp.Rotate(theObject, theAxis, theAngle)
RaiseIfFailed("RotateCopy", self.TrsfOp)
- anObj.SetParameters(Parameters)
+ SetParameters(anObj, Parameters)
return anObj
## Rotate the given object around the given axis
theAngle = theAngle*math.pi/180.0
anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
RaiseIfFailed("RotateCopy", self.TrsfOp)
- anObj.SetParameters(Parameters)
+ SetParameters(anObj, Parameters)
return anObj
## Rotate given object around vector perpendicular to plane
theFactor, Parameters = ParseParameters(theFactor)
anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
RaiseIfFailed("ScaleShapeCopy", self.TrsfOp)
- anObj.SetParameters(Parameters)
+ SetParameters(anObj, Parameters)
return anObj
## Scale the given object by different factors along coordinate axes,
anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint,
theFactorX, theFactorY, theFactorZ)
RaiseIfFailed("MakeScaleAlongAxes", self.TrsfOp)
- anObj.SetParameters(Parameters)
+ SetParameters(anObj, Parameters)
return anObj
## Create an object, symmetrical
theOffset, Parameters = ParseParameters(theOffset)
anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
RaiseIfFailed("OffsetShapeCopy", self.TrsfOp)
- anObj.SetParameters(Parameters)
+ SetParameters(anObj, Parameters)
return anObj
# -----------------------------------------------------------------------------
theStep, theNbTimes, Parameters = ParseParameters(theStep, theNbTimes)
anObj = self.TrsfOp.MultiTranslate1D(theObject, theVector, theStep, theNbTimes)
RaiseIfFailed("MultiTranslate1D", self.TrsfOp)
- anObj.SetParameters(Parameters)
+ SetParameters(anObj, Parameters)
return anObj
## Conseqently apply two specified translations to theObject specified number of times.
anObj = self.TrsfOp.MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1,
theVector2, theStep2, theNbTimes2)
RaiseIfFailed("MultiTranslate2D", self.TrsfOp)
- anObj.SetParameters(Parameters)
+ SetParameters(anObj, Parameters)
return anObj
## Rotate the given object around the given axis a given number times.
theAxis, theNbTimes, Parameters = ParseParameters(theAxis, theNbTimes)
anObj = self.TrsfOp.MultiRotate1D(theObject, theAxis, theNbTimes)
RaiseIfFailed("MultiRotate1D", self.TrsfOp)
- anObj.SetParameters(Parameters)
+ SetParameters(anObj, Parameters)
return anObj
## Rotate the given object around the
theAngle, theNbTimes1, theStep, theNbTimes2, Parameters = ParseParameters(theAngle, theNbTimes1, theStep, theNbTimes2)
anObj = self.TrsfOp.MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2)
RaiseIfFailed("MultiRotate2D", self.TrsfOp)
- anObj.SetParameters(Parameters)
+ SetParameters(anObj, Parameters)
return anObj
## The same, as MultiRotate1D(), but axis is given by direction and point
theR,Parameters = ParseParameters(theR)
anObj = self.LocalOp.MakeFilletAll(theShape, theR)
RaiseIfFailed("MakeFilletAll", self.LocalOp)
- anObj.SetParameters(Parameters)
+ SetParameters(anObj, Parameters)
return anObj
## Perform a fillet on the specified edges/faces of the given shape
else:
anObj = self.LocalOp.MakeFilletFaces(theShape, theR, theListShapes)
RaiseIfFailed("MakeFilletFaces", self.LocalOp)
- anObj.SetParameters(Parameters)
+ SetParameters(anObj, Parameters)
return anObj
## The same that MakeFillet but with two Fillet Radius R1 and R2
else:
anObj = self.LocalOp.MakeFilletFacesR1R2(theShape, theR1, theR2, theListShapes)
RaiseIfFailed("MakeFilletFacesR1R2", self.LocalOp)
- anObj.SetParameters(Parameters)
+ SetParameters(anObj, Parameters)
return anObj
## Perform a fillet on the specified edges of the given shape
theD,Parameters = ParseParameters(theD)
anObj = self.LocalOp.MakeChamferAll(theShape, theD)
RaiseIfFailed("MakeChamferAll", self.LocalOp)
- anObj.SetParameters(Parameters)
+ SetParameters(anObj, Parameters)
return anObj
## Perform a chamfer on edges, common to the specified faces,
theD1,theD2,Parameters = ParseParameters(theD1,theD2)
anObj = self.LocalOp.MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2)
RaiseIfFailed("MakeChamferEdge", self.LocalOp)
- anObj.SetParameters(Parameters)
+ SetParameters(anObj, Parameters)
return anObj
## The Same that MakeChamferEdge but with params theD is chamfer length and
theAngle = theAngle*math.pi/180.0
anObj = self.LocalOp.MakeChamferEdgeAD(theShape, theD, theAngle, theFace1, theFace2)
RaiseIfFailed("MakeChamferEdgeAD", self.LocalOp)
- anObj.SetParameters(Parameters)
+ SetParameters(anObj, Parameters)
return anObj
## Perform a chamfer on all edges of the specified faces,
theD1,theD2,Parameters = ParseParameters(theD1,theD2)
anObj = self.LocalOp.MakeChamferFaces(theShape, theD1, theD2, theFaces)
RaiseIfFailed("MakeChamferFaces", self.LocalOp)
- anObj.SetParameters(Parameters)
+ SetParameters(anObj, Parameters)
return anObj
## The Same that MakeChamferFaces but with params theD is chamfer lenght and
theAngle = theAngle*math.pi/180.0
anObj = self.LocalOp.MakeChamferFacesAD(theShape, theD, theAngle, theFaces)
RaiseIfFailed("MakeChamferFacesAD", self.LocalOp)
- anObj.SetParameters(Parameters)
+ SetParameters(anObj, Parameters)
return anObj
## Perform a chamfer on edges,
theD1,theD2,Parameters = ParseParameters(theD1,theD2)
anObj = self.LocalOp.MakeChamferEdges(theShape, theD1, theD2, theEdges)
RaiseIfFailed("MakeChamferEdges", self.LocalOp)
- anObj.SetParameters(Parameters)
+ SetParameters(anObj, Parameters)
return anObj
## The Same that MakeChamferEdges but with params theD is chamfer lenght and
theAngle = theAngle*math.pi/180.0
anObj = self.LocalOp.MakeChamferEdgesAD(theShape, theD, theAngle, theEdges)
RaiseIfFailed("MakeChamferEdgesAD", self.LocalOp)
- anObj.SetParameters(Parameters)
+ SetParameters(anObj, Parameters)
return anObj
## Shortcut to MakeChamferEdge() and MakeChamferFaces()
theWeight,theWaterDensity,theMeshDeflection)
anObj = self.LocalOp.MakeArchimede(theShape, theWeight, theWaterDensity, theMeshDeflection)
RaiseIfFailed("MakeArchimede", self.LocalOp)
- anObj.SetParameters(Parameters)
+ SetParameters(anObj, Parameters)
return anObj
# end of l3_basic_op
aList = self.BlocksOp.ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces)
RaiseIfFailed("ExplodeCompoundOfBlocks", self.BlocksOp)
for anObj in aList:
- anObj.SetParameters(Parameters)
+ SetParameters(anObj, Parameters)
pass
return aList
DirFace1,DirFace2,NbTimes,Parameters = ParseParameters(DirFace1,DirFace2,NbTimes)
anObj = self.BlocksOp.MakeMultiTransformation1D(Block, DirFace1, DirFace2, NbTimes)
RaiseIfFailed("MakeMultiTransformation1D", self.BlocksOp)
- anObj.SetParameters(Parameters)
+ SetParameters(anObj, Parameters)
return anObj
## Multi-transformate block and glue the result.
anObj = self.BlocksOp.MakeMultiTransformation2D(Block, DirFace1U, DirFace2U, NbTimesU,
DirFace1V, DirFace2V, NbTimesV)
RaiseIfFailed("MakeMultiTransformation2D", self.BlocksOp)
- anObj.SetParameters(Parameters)
+ SetParameters(anObj, Parameters)
return anObj
## Build all possible propagation groups.