#
# @sa addToStudyAuto()
def _autoPublish(self, theObj, theName, theDefaultName="noname"):
- if not theObj: return
- aName = theName
- if not aName and self.myMaxNbSubShapesAllowed != 0: aName = theDefaultName
- if not aName: return
+ # ---
+ def _item_name(_names, _defname, _idx=-1):
+ if not _names: _names = _defname
+ if type(_names) in [types.ListType, types.TupleType]:
+ if _idx >= 0:
+ if _idx >= len(_names) or not _names[_idx]:
+ _name = "%s_%d"%(_defname, _idx+1)
+ else:
+ _name = _names[_idx]
+ else:
+ # must be wrong usage
+ _name = _names[0]
+ pass
+ else:
+ if _idx >= 0:
+ _name = "%s_%d"%(_names, _idx+1)
+ else:
+ _name = _names
+ pass
+ return _name
+ # ---
+ if not theObj:
+ return # null object
+ if not theName and not self.myMaxNbSubShapesAllowed:
+ return # nothing to do: auto-publishing is disabled
+ if not theName and not theDefaultName:
+ return # neither theName nor theDefaultName is given
import types
if type(theObj) in [types.ListType, types.TupleType]:
- # if list of objects is being published
- idx = 1
+ # list of objects is being published
+ idx = 0
for obj in theObj:
+ name = _item_name(theName, theDefaultName, idx)
if obj.IsMainShape():
- self.addToStudy(obj, "%s_%d"%(aName, idx))
+ self.addToStudy(obj, name) # "%s_%d"%(aName, idx)
else:
- self.addToStudyInFather(obj.GetMainShape(), obj, "%s_%d"%(aName, idx))
+ self.addToStudyInFather(obj.GetMainShape(), obj, name) # "%s_%d"%(aName, idx)
pass
- if not theName and idx == self.myMaxNbSubShapesAllowed: break
idx = idx+1
+ if not theName and idx == self.myMaxNbSubShapesAllowed: break
pass
pass
else:
+ # single object is published
+ name = _item_name(theName, theDefaultName)
if theObj.IsMainShape():
- self.addToStudy(theObj, aName)
+ self.addToStudy(theObj, name)
else:
- self.addToStudyInFather(theObj.GetMainShape(), theObj, aName)
+ self.addToStudyInFather(theObj.GetMainShape(), theObj, name)
pass
pass
pass
anObj = self.BasicOp.MakePointXYZ(theX, theY, theZ)
RaiseIfFailed("MakePointXYZ", self.BasicOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "vertex")
return anObj
## Create a point, distant from the referenced point
anObj = self.BasicOp.MakePointWithReference(theReference, theX, theY, theZ)
RaiseIfFailed("MakePointWithReference", self.BasicOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "vertex")
return anObj
## Create a point, corresponding to the given parameter on the given curve.
anObj = self.BasicOp.MakePointOnCurve(theRefCurve, theParameter)
RaiseIfFailed("MakePointOnCurve", self.BasicOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "vertex")
return anObj
## Create a point by projection give coordinates on the given curve
anObj = self.BasicOp.MakePointOnCurveByCoord(theRefCurve, theX, theY, theZ)
RaiseIfFailed("MakeVertexOnCurveByCoord", self.BasicOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "vertex")
return anObj
## Create a point, corresponding to the given length on the given curve.
anObj = self.BasicOp.MakePointOnCurveByLength(theRefCurve, theLength, theStartPoint)
RaiseIfFailed("MakePointOnCurveByLength", self.BasicOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "vertex")
return anObj
## Create a point, corresponding to the given parameters on the
anObj = self.BasicOp.MakePointOnSurface(theRefSurf, theUParameter, theVParameter)
RaiseIfFailed("MakePointOnSurface", self.BasicOp)
anObj.SetParameters(Parameters);
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "vertex")
return anObj
## Create a point by projection give coordinates on the given surface
anObj = self.BasicOp.MakePointOnSurfaceByCoord(theRefSurf, theX, theY, theZ)
RaiseIfFailed("MakeVertexOnSurfaceByCoord", self.BasicOp)
anObj.SetParameters(Parameters);
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "vertex")
return anObj
## Create a point, which lays on the given face.
# Example: see GEOM_TestAll.py
anObj = self.BasicOp.MakePointOnFace(theFace)
RaiseIfFailed("MakeVertexInsideFace", self.BasicOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "vertex")
return anObj
## Create a point on intersection of two lines.
# Example: see GEOM_TestAll.py
anObj = self.BasicOp.MakePointOnLinesIntersection(theRefLine1, theRefLine2)
RaiseIfFailed("MakePointOnLinesIntersection", self.BasicOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "vertex")
return anObj
## Create a tangent, corresponding to the given parameter on the given curve.
"""
anObj = self.BasicOp.MakeTangentOnCurve(theRefCurve, theParameter)
RaiseIfFailed("MakeTangentOnCurve", self.BasicOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "tangent")
return anObj
## Create a tangent plane, corresponding to the given parameter on the given face.
"""
anObj = self.BasicOp.MakeTangentPlaneOnFace(theFace, theParameterU, theParameterV, theTrimSize)
RaiseIfFailed("MakeTangentPlaneOnFace", self.BasicOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "tangent")
return anObj
## Create a vector with the given components.
anObj = self.BasicOp.MakeVectorDXDYDZ(theDX, theDY, theDZ)
RaiseIfFailed("MakeVectorDXDYDZ", self.BasicOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "vector")
return anObj
## Create a vector between two points.
# Example: see GEOM_TestAll.py
anObj = self.BasicOp.MakeVectorTwoPnt(thePnt1, thePnt2)
RaiseIfFailed("MakeVectorTwoPnt", self.BasicOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "vector")
return anObj
## Create a line, passing through the given point
# Example: see GEOM_TestAll.py
anObj = self.BasicOp.MakeLine(thePnt, theDir)
RaiseIfFailed("MakeLine", self.BasicOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "line")
return anObj
## Create a line, passing through the given points
# Example: see GEOM_TestAll.py
anObj = self.BasicOp.MakeLineTwoPnt(thePnt1, thePnt2)
RaiseIfFailed("MakeLineTwoPnt", self.BasicOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "line")
return anObj
## Create a line on two faces intersection.
# Example: see GEOM_TestAll.py
anObj = self.BasicOp.MakeLineTwoFaces(theFace1, theFace2)
RaiseIfFailed("MakeLineTwoFaces", self.BasicOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "line")
return anObj
## Create a plane, passing through the given point
anObj = self.BasicOp.MakePlanePntVec(thePnt, theVec, theTrimSize)
RaiseIfFailed("MakePlanePntVec", self.BasicOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "plane")
return anObj
## Create a plane, passing through the three given points
anObj = self.BasicOp.MakePlaneThreePnt(thePnt1, thePnt2, thePnt3, theTrimSize)
RaiseIfFailed("MakePlaneThreePnt", self.BasicOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "plane")
return anObj
## Create a plane, similar to the existing one, but with another size of representing face.
anObj = self.BasicOp.MakePlaneFace(theFace, theTrimSize)
RaiseIfFailed("MakePlaneFace", self.BasicOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "plane")
return anObj
## Create a plane, passing through the 2 vectors
anObj = self.BasicOp.MakePlane2Vec(theVec1, theVec2, theTrimSize)
RaiseIfFailed("MakePlane2Vec", self.BasicOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "plane")
return anObj
## Create a plane, based on a Local coordinate system.
anObj = self.BasicOp.MakePlaneLCS(theLCS, theTrimSize, theOrientation)
RaiseIfFailed("MakePlaneLCS", self.BasicOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "plane")
return anObj
## Create a local coordinate system.
anObj = self.BasicOp.MakeMarker(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ)
RaiseIfFailed("MakeMarker", self.BasicOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "lcs")
return anObj
## Create a local coordinate system from shape.
"""
anObj = self.BasicOp.MakeMarkerFromShape(theShape)
RaiseIfFailed("MakeMarkerFromShape", self.BasicOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "lcs")
return anObj
## Create a local coordinate system from point and two vectors.
"""
anObj = self.BasicOp.MakeMarkerPntTwoVec(theOrigin, theXVec, theYVec)
RaiseIfFailed("MakeMarkerPntTwoVec", self.BasicOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "lcs")
return anObj
# end of l3_basic_go
# Example: see GEOM_TestAll.py
anObj = self.CurvesOp.MakeArc(thePnt1, thePnt2, thePnt3)
RaiseIfFailed("MakeArc", self.CurvesOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "arc")
return anObj
## Create an arc of circle from a center and 2 points.
# Example: see GEOM_TestAll.py
anObj = self.CurvesOp.MakeArcCenter(thePnt1, thePnt2, thePnt3, theSense)
RaiseIfFailed("MakeArcCenter", self.CurvesOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "arc")
return anObj
## Create an arc of ellipse, of center and two points.
# Example: see GEOM_TestAll.py
anObj = self.CurvesOp.MakeArcOfEllipse(theCenter, thePnt1, thePnt2)
RaiseIfFailed("MakeArcOfEllipse", self.CurvesOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "arc")
return anObj
## Create a circle with given center, normal vector and radius.
anObj = self.CurvesOp.MakeCirclePntVecR(thePnt, theVec, theR)
RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "circle")
return anObj
## Create a circle with given radius.
"""
anObj = self.CurvesOp.MakeCirclePntVecR(None, None, theR)
RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "circle")
return anObj
## Create a circle, passing through three given points
# Example: see GEOM_TestAll.py
anObj = self.CurvesOp.MakeCircleThreePnt(thePnt1, thePnt2, thePnt3)
RaiseIfFailed("MakeCircleThreePnt", self.CurvesOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "circle")
return anObj
## Create a circle, with given point1 as center,
# Example: see GEOM_example6.py
anObj = self.CurvesOp.MakeCircleCenter2Pnt(thePnt1, thePnt2, thePnt3)
RaiseIfFailed("MakeCircleCenter2Pnt", self.CurvesOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "circle")
return anObj
## Create an ellipse with given center, normal vector and radiuses.
pass
RaiseIfFailed("MakeEllipse", self.CurvesOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "ellipse")
return anObj
## Create an ellipse with given radiuses.
"""
anObj = self.CurvesOp.MakeEllipse(None, None, theRMajor, theRMinor)
RaiseIfFailed("MakeEllipse", self.CurvesOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "ellipse")
return anObj
## Create a polyline on the set of points.
# Example: see GEOM_TestAll.py
anObj = self.CurvesOp.MakePolyline(thePoints, theIsClosed)
RaiseIfFailed("MakePolyline", self.CurvesOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "polyline")
return anObj
## Create bezier curve on the set of points.
# Example: see GEOM_TestAll.py
anObj = self.CurvesOp.MakeSplineBezier(thePoints, theIsClosed)
RaiseIfFailed("MakeSplineBezier", self.CurvesOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "bezier")
return anObj
## Create B-Spline curve on the set of points.
# Example: see GEOM_TestAll.py
anObj = self.CurvesOp.MakeSplineInterpolation(thePoints, theIsClosed, theDoReordering)
RaiseIfFailed("MakeInterpol", self.CurvesOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "bspline")
return anObj
## Create B-Spline curve on the set of points.
# Example: see GEOM_TestAll.py
anObj = self.CurvesOp.MakeSplineInterpolWithTangents(thePoints, theFirstVec, theLastVec)
RaiseIfFailed("MakeInterpolWithTangents", self.CurvesOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "bspline")
return anObj
## Creates a curve using the parametric definition of the basic points.
anObj = self.CurvesOp.MakeCurveParametric(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
RaiseIfFailed("MakeSplineInterpolation", self.CurvesOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "curve")
return anObj
# end of l4_curves
anObj = self.CurvesOp.MakeSketcher(theCommand, theWorkingPlane)
RaiseIfFailed("MakeSketcher", self.CurvesOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "sketch")
return anObj
## Create a sketcher (wire or face), following the textual description,
anObj = self.CurvesOp.MakeSketcherOnPlane(theCommand, theWorkingPlane)
RaiseIfFailed("MakeSketcherOnPlane", self.CurvesOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "sketch")
return anObj
## Create a sketcher wire, following the numerical description,
anObj = self.CurvesOp.Make3DSketcher(theCoordinates)
RaiseIfFailed("Make3DSketcher", self.CurvesOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "sketch")
return anObj
## Obtain a 3D sketcher interface
anObj = self.PrimOp.MakeBoxDXDYDZ(theDX, theDY, theDZ)
RaiseIfFailed("MakeBoxDXDYDZ", self.PrimOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "box")
return anObj
## Create a box with two specified opposite vertices,
# Example: see GEOM_TestAll.py
anObj = self.PrimOp.MakeBoxTwoPnt(thePnt1, thePnt2)
RaiseIfFailed("MakeBoxTwoPnt", self.PrimOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "box")
return anObj
## Create a face with specified dimensions with edges parallel to coordinate axes.
anObj = self.PrimOp.MakeFaceHW(theH, theW, theOrientation)
RaiseIfFailed("MakeFaceHW", self.PrimOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "rectangle")
return anObj
## Create a face from another plane and two sizes,
anObj = self.PrimOp.MakeFaceObjHW(theObj, theH, theW)
RaiseIfFailed("MakeFaceObjHW", self.PrimOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "rectangle")
return anObj
## Create a disk with given center, normal vector and radius.
anObj = self.PrimOp.MakeDiskPntVecR(thePnt, theVec, theR)
RaiseIfFailed("MakeDiskPntVecR", self.PrimOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "disk")
return anObj
## Create a disk, passing through three given points
# Example: see GEOM_TestAll.py
anObj = self.PrimOp.MakeDiskThreePnt(thePnt1, thePnt2, thePnt3)
RaiseIfFailed("MakeDiskThreePnt", self.PrimOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "disk")
return anObj
## Create a disk with specified dimensions along OX-OY coordinate axes.
anObj = self.PrimOp.MakeDiskR(theR, theOrientation)
RaiseIfFailed("MakeDiskR", self.PrimOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "disk")
return anObj
## Create a cylinder with given base point, axis, radius and height.
anObj = self.PrimOp.MakeCylinderPntVecRH(thePnt, theAxis, theR, theH)
RaiseIfFailed("MakeCylinderPntVecRH", self.PrimOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "cylinder")
return anObj
## Create a cylinder with given radius and height at
anObj = self.PrimOp.MakeCylinderRH(theR, theH)
RaiseIfFailed("MakeCylinderRH", self.PrimOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "cylinder")
return anObj
## Create a sphere with given center and radius.
anObj = self.PrimOp.MakeSpherePntR(thePnt, theR)
RaiseIfFailed("MakeSpherePntR", self.PrimOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "sphere")
return anObj
## Create a sphere with given center and radius.
anObj = self.PrimOp.MakeSphereR(theR)
RaiseIfFailed("MakeSphereR", self.PrimOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "sphere")
return anObj
## Create a cone with given base point, axis, height and radiuses.
anObj = self.PrimOp.MakeConePntVecR1R2H(thePnt, theAxis, theR1, theR2, theH)
RaiseIfFailed("MakeConePntVecR1R2H", self.PrimOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "cone")
return anObj
## Create a cone with given height and radiuses at
anObj = self.PrimOp.MakeConeR1R2H(theR1, theR2, theH)
RaiseIfFailed("MakeConeR1R2H", self.PrimOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "cone")
return anObj
## Create a torus with given center, normal vector and radiuses.
anObj = self.PrimOp.MakeTorusPntVecRR(thePnt, theVec, theRMajor, theRMinor)
RaiseIfFailed("MakeTorusPntVecRR", self.PrimOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "torus")
return anObj
## Create a torus with given radiuses at the origin of coordinate system.
anObj = self.PrimOp.MakeTorusRR(theRMajor, theRMinor)
RaiseIfFailed("MakeTorusRR", self.PrimOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "torus")
return anObj
# end of l3_3d_primitives
anObj = self.PrimOp.MakePrismTwoPnt(theBase, thePoint1, thePoint2)
RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "prism")
return anObj
## Create a shape by extrusion of the base shape along a
# Example: see GEOM_TestAll.py
anObj = self.PrimOp.MakePrismTwoPnt2Ways(theBase, thePoint1, thePoint2)
RaiseIfFailed("MakePrismTwoPnt", self.PrimOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "prism")
return anObj
## Create a shape by extrusion of the base shape along the vector,
anObj = self.PrimOp.MakePrismVecH(theBase, theVec, theH)
RaiseIfFailed("MakePrismVecH", self.PrimOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "prism")
return anObj
## Create a shape by extrusion of the base shape along the vector,
anObj = self.PrimOp.MakePrismVecH2Ways(theBase, theVec, theH)
RaiseIfFailed("MakePrismVecH2Ways", self.PrimOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "prism")
return anObj
## Create a shape by extrusion of the base shape along the dx, dy, dz direction
anObj = self.PrimOp.MakePrismDXDYDZ(theBase, theDX, theDY, theDZ)
RaiseIfFailed("MakePrismDXDYDZ", self.PrimOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "prism")
return anObj
## Create a shape by extrusion of the base shape along the dx, dy, dz direction
anObj = self.PrimOp.MakePrismDXDYDZ2Ways(theBase, theDX, theDY, theDZ)
RaiseIfFailed("MakePrismDXDYDZ2Ways", self.PrimOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "prism")
return anObj
## Create a shape by revolution of the base shape around the axis
anObj = self.PrimOp.MakeRevolutionAxisAngle(theBase, theAxis, theAngle)
RaiseIfFailed("MakeRevolutionAxisAngle", self.PrimOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "revolution")
return anObj
## Create a shape by revolution of the base shape around the axis
anObj = self.PrimOp.MakeRevolutionAxisAngle2Ways(theBase, theAxis, theAngle)
RaiseIfFailed("MakeRevolutionAxisAngle2Ways", self.PrimOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "revolution")
return anObj
## Create a filling from the given compound of contours.
theMethod, isApprox)
RaiseIfFailed("MakeFilling", self.PrimOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "filling")
return anObj
0, theTol3D, 0, GEOM.FOM_Default, True)
RaiseIfFailed("MakeFillingNew", self.PrimOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "filling")
return anObj
## Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
# Example: see GEOM_TestAll.py
anObj = self.PrimOp.MakeThruSections(theSeqSections,theModeSolid,thePreci,theRuled)
RaiseIfFailed("MakeThruSections", self.PrimOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "filling")
return anObj
## Create a shape by extrusion of the base shape along
# Example: see GEOM_TestAll.py
anObj = self.PrimOp.MakePipe(theBase, thePath)
RaiseIfFailed("MakePipe", self.PrimOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "pipe")
return anObj
## Create a shape by extrusion of the profile shape along
theLocations, thePath,
theWithContact, theWithCorrection)
RaiseIfFailed("MakePipeWithDifferentSections", self.PrimOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "pipe")
return anObj
## Create a shape by extrusion of the profile shape along
theLocations, thePath,
theWithContact, theWithCorrection)
RaiseIfFailed("MakePipeWithShellSections", self.PrimOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "pipe")
return anObj
## Create a shape by extrusion of the profile shape along
resc = self.MakeCompound(res)
#resc = self.MakeSewing(res, 0.001)
#print "resc: ",resc
- self._autoPublish(resc, theName)
+ self._autoPublish(resc, theName, "pipe")
return resc
## Create solids between given sections
"""
anObj = self.PrimOp.MakePipeShellsWithoutPath(theSeqBases, theLocations)
RaiseIfFailed("MakePipeShellsWithoutPath", self.PrimOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "pipe")
return anObj
## Create a shape by extrusion of the base shape along
# Example: see GEOM_TestAll.py
anObj = self.PrimOp.MakePipeBiNormalAlongVector(theBase, thePath, theVec)
RaiseIfFailed("MakePipeBiNormalAlongVector", self.PrimOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "pipe")
return anObj
## Build a middle path of a pipe-like shape.
"""
anObj = self.PrimOp.RestorePath(theShape, theBase1, theBase2)
RaiseIfFailed("RestorePath", self.PrimOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "path")
return anObj
## Build a middle path of a pipe-like shape.
"""
anObj = self.PrimOp.RestorePathEdges(theShape, listEdges1, listEdges2)
RaiseIfFailed("RestorePath", self.PrimOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "path")
return anObj
# end of l3_complex
# Example: see GEOM_TestAll.py
anObj = self.ShapesOp.MakeEdge(thePnt1, thePnt2)
RaiseIfFailed("MakeEdge", self.ShapesOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "edge")
return anObj
## Create a new edge, corresponding to the given length on the given curve.
anObj = self.ShapesOp.MakeEdgeOnCurveByLength(theRefCurve, theLength, theStartPoint)
RaiseIfFailed("MakeEdgeOnCurveByLength", self.ShapesOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "edge")
return anObj
## Create an edge from specified wire.
# Example: see GEOM_TestAll.py
anObj = self.ShapesOp.MakeEdgeWire(theWire, theLinearTolerance, theAngularTolerance)
RaiseIfFailed("MakeEdgeWire", self.ShapesOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "edge")
return anObj
## Create a wire from the set of edges and wires.
# Example: see GEOM_TestAll.py
anObj = self.ShapesOp.MakeWire(theEdgesAndWires, theTolerance)
RaiseIfFailed("MakeWire", self.ShapesOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "wire")
return anObj
## Create a face on the given wire.
print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
else:
RaiseIfFailed("MakeFace", self.ShapesOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "face")
return anObj
## Create a face on the given wires set.
print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
else:
RaiseIfFailed("MakeFaceWires", self.ShapesOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "face")
return anObj
## See MakeFaceWires() method for details.
# Example: see GEOM_TestAll.py
anObj = self.ShapesOp.MakeShell(theFacesAndShells)
RaiseIfFailed("MakeShell", self.ShapesOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "shell")
return anObj
## Create a solid, bounded by the given shells.
raise RuntimeError, "MakeSolidShells : Unable to create solid from unclosed shape"
anObj = self.ShapesOp.MakeSolidShells(theShells)
RaiseIfFailed("MakeSolidShells", self.ShapesOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "solid")
return anObj
## Create a compound of the given shapes.
# Example: see GEOM_TestAll.py
anObj = self.ShapesOp.MakeCompound(theShapes)
RaiseIfFailed("MakeCompound", self.ShapesOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "compound")
return anObj
# end of l3_advanced
# Example: see GEOM_TestAll.py
anObj = self.ShapesOp.ChangeOrientation(theShape)
RaiseIfFailed("ChangeOrientation", self.ShapesOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "reversed")
return anObj
## See ChangeOrientation() method for details.
Parameters = ":" + Parameters
pass
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "healed")
return anObj
## Remove faces from the given object (shape).
# Example: see GEOM_TestHealing.py
anObj = self.HealOp.SuppressFaces(theObject, theFaces)
RaiseIfFailed("SuppressFaces", self.HealOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "suppressFaces")
return anObj
## Sewing of some shapes into single shape.
anObj = self.HealOp.Sew(theObject, theTolerance)
RaiseIfFailed("Sew", self.HealOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "sewed")
return anObj
## Remove internal wires and edges from the given object (face).
# Example: see GEOM_TestHealing.py
anObj = self.HealOp.RemoveIntWires(theObject, theWires)
RaiseIfFailed("RemoveIntWires", self.HealOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "suppressWires")
return anObj
## Remove internal closed contours (holes) from the given object.
# Example: see GEOM_TestHealing.py
anObj = self.HealOp.FillHoles(theObject, theWires)
RaiseIfFailed("FillHoles", self.HealOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "suppressHoles")
return anObj
## Close an open wire.
# Example: see GEOM_TestHealing.py
anObj = self.HealOp.CloseContour(theObject, theWires, isCommonVertex)
RaiseIfFailed("CloseContour", self.HealOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "closeContour")
return anObj
## Addition of a point to a given edge object.
anObj = self.HealOp.DivideEdge(theObject, theEdgeIndex, theValue, isByParameter)
RaiseIfFailed("DivideEdge", self.HealOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "divideEdge")
return anObj
## Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
"""
anObj = self.HealOp.FuseCollinearEdgesWithinWire(theWire, theVertices)
RaiseIfFailed("FuseCollinearEdgesWithinWire", self.HealOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "fuseEdges")
return anObj
## Change orientation of the given object. Updates given shape.
"""
anObj = self.HealOp.ChangeOrientationCopy(theObject)
RaiseIfFailed("ChangeOrientationCopy", self.HealOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "reversed")
return anObj
## Try to limit tolerance of the given object by value \a theTolerance.
"""
anObj = self.HealOp.LimitTolerance(theObject, theTolerance)
RaiseIfFailed("LimitTolerance", self.HealOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "limitTolerance")
return anObj
## Get a list of wires (wrapped in GEOM.GEOM_Object-s),
if anObj is None:
raise RuntimeError, "MakeGlueFaces : " + self.ShapesOp.GetErrorCode()
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "glueFaces")
return anObj
## Find coincident faces in theShape for possible gluing.
doKeepNonSolids, doGlueAllEdges)
if anObj is None:
raise RuntimeError, "MakeGlueFacesByList : " + self.ShapesOp.GetErrorCode()
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "glueFaces")
return anObj
## Replace coincident edges in theShape by one edge.
if anObj is None:
raise RuntimeError, "MakeGlueEdges : " + self.ShapesOp.GetErrorCode()
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "glueEdges")
return anObj
## Find coincident edges in theShape for possible gluing.
anObj = self.ShapesOp.MakeGlueEdgesByList(theShape, theTolerance, theEdges)
if anObj is None:
raise RuntimeError, "MakeGlueEdgesByList : " + self.ShapesOp.GetErrorCode()
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "glueEdges")
return anObj
# end of l3_healing
# Example: see GEOM_TestAll.py
anObj = self.BoolOp.MakeBoolean(theShape1, theShape2, theOperation)
RaiseIfFailed("MakeBoolean", self.BoolOp)
- self._autoPublish(anObj, theName)
+ def_names = { 1: "common", 2: "cut", 3: "fuse", 4: "section" }
+ self._autoPublish(anObj, theName, def_names[theOperation])
return anObj
## Perform Common boolean operation on two given shapes.
Limit, RemoveWebs, ListMaterials,
KeepNonlimitShapes);
RaiseIfFailed("MakePartition", self.BoolOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "partition")
return anObj
## Perform partition operation.
Limit, RemoveWebs, ListMaterials,
KeepNonlimitShapes);
RaiseIfFailed("MakePartitionNonSelfIntersectedShape", self.BoolOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "partition")
return anObj
## See method MakePartition() for more information.
# Example: see GEOM_TestAll.py
anObj = self.BoolOp.MakeHalfPartition(theShape, thePlane)
RaiseIfFailed("MakeHalfPartition", self.BoolOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "partition")
return anObj
# end of l3_basic_op
# Example: see GEOM_TestAll.py
anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
RaiseIfFailed("TranslateTwoPointsCopy", self.TrsfOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "translated")
return anObj
## Translate the given object along the vector, specified by its components.
anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ)
anObj.SetParameters(Parameters)
RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "translated")
return anObj
## Translate the given object along the given vector.
# Example: see GEOM_TestAll.py
anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
RaiseIfFailed("TranslateVectorCopy", self.TrsfOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "translated")
return anObj
## Translate the given object along the given vector on given distance.
anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, 1)
RaiseIfFailed("TranslateVectorDistance", self.TrsfOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "translated")
return anObj
## Rotate the given object around the given axis on the given angle.
anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle)
RaiseIfFailed("RotateCopy", self.TrsfOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "rotated")
return anObj
## Rotate given object around vector perpendicular to plane
# Example: see GEOM_TestAll.py
anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2)
RaiseIfFailed("RotateThreePointsCopy", self.TrsfOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "rotated")
return anObj
## Scale the given object by the specified factor.
anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor)
RaiseIfFailed("ScaleShapeCopy", self.TrsfOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "scaled")
return anObj
## Scale the given object by different factors along coordinate axes.
theFactorX, theFactorY, theFactorZ)
RaiseIfFailed("MakeScaleAlongAxes", self.TrsfOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "scaled")
return anObj
## Mirror an object relatively the given plane.
# Example: see GEOM_TestAll.py
anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane)
RaiseIfFailed("MirrorPlaneCopy", self.TrsfOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "mirrored")
return anObj
## Mirror an object relatively the given axis.
# Example: see GEOM_TestAll.py
anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis)
RaiseIfFailed("MirrorAxisCopy", self.TrsfOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "mirrored")
return anObj
## Mirror an object relatively the given point.
# Example: see GEOM_TestAll.py
anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint)
RaiseIfFailed("MirrorPointCopy", self.TrsfOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "mirrored")
return anObj
## Modify the location of the given object.
# Example: see GEOM_TestAll.py
anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS)
RaiseIfFailed("PositionShapeCopy", self.TrsfOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "displaced")
return anObj
## Modify the Location of the given object by Path.
# Example: see GEOM_TestAll.py
anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, 1, theReverse)
RaiseIfFailed("PositionAlongPath", self.TrsfOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "displaced")
return anObj
## Offset given shape.
anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset)
RaiseIfFailed("OffsetShapeCopy", self.TrsfOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "offset")
return anObj
## Create new object as projection of the given one on a 2D surface.
# Example: see GEOM_TestAll.py
anObj = self.TrsfOp.ProjectShapeCopy(theSource, theTarget)
RaiseIfFailed("ProjectShapeCopy", self.TrsfOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "projection")
return anObj
# -----------------------------------------------------------------------------
anObj = self.TrsfOp.MultiTranslate1D(theObject, theVector, theStep, theNbTimes)
RaiseIfFailed("MultiTranslate1D", self.TrsfOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "multitranslation")
return anObj
## Conseqently apply two specified translations to theObject specified number of times.
theVector2, theStep2, theNbTimes2)
RaiseIfFailed("MultiTranslate2D", self.TrsfOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "multitranslation")
return anObj
## Rotate the given object around the given axis a given number times.
anObj = self.TrsfOp.MultiRotate1D(theObject, theAxis, theNbTimes)
RaiseIfFailed("MultiRotate1D", self.TrsfOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "multirotation")
return anObj
## Rotate the given object around the
anObj = self.TrsfOp.MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2)
RaiseIfFailed("MultiRotate2D", self.TrsfOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "multirotation")
return anObj
## The same, as MultiRotate1D(), but axis is given by direction and point
anObj = self.LocalOp.MakeFilletAll(theShape, theR)
RaiseIfFailed("MakeFilletAll", self.LocalOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "fillet")
return anObj
## Perform a fillet on the specified edges/faces of the given shape
anObj = self.LocalOp.MakeFilletFaces(theShape, theR, theListShapes)
RaiseIfFailed("MakeFilletFaces", self.LocalOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "fillet")
return anObj
## The same that MakeFillet() but with two Fillet Radius R1 and R2
anObj = self.LocalOp.MakeFilletFacesR1R2(theShape, theR1, theR2, theListShapes)
RaiseIfFailed("MakeFilletFacesR1R2", self.LocalOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "fillet")
return anObj
## Perform a fillet on the specified edges of the given shape
anObj = self.LocalOp.MakeFillet1D(theShape, theR, theListOfVertexes, doIgnoreSecantVertices)
RaiseIfFailed("MakeFillet1D", self.LocalOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "fillet")
return anObj
## Perform a fillet at the specified vertices of the given face/shell.
anObj = self.LocalOp.MakeFillet2D(theShape, theR, theListOfVertexes)
RaiseIfFailed("MakeFillet2D", self.LocalOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "fillet")
return anObj
## Perform a symmetric chamfer on all edges of the given shape.
anObj = self.LocalOp.MakeChamferAll(theShape, theD)
RaiseIfFailed("MakeChamferAll", self.LocalOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "chamfer")
return anObj
## Perform a chamfer on edges, common to the specified faces,
anObj = self.LocalOp.MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2)
RaiseIfFailed("MakeChamferEdge", self.LocalOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "chamfer")
return anObj
## Perform a chamfer on edges
anObj = self.LocalOp.MakeChamferEdgeAD(theShape, theD, theAngle, theFace1, theFace2)
RaiseIfFailed("MakeChamferEdgeAD", self.LocalOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "chamfer")
return anObj
## Perform a chamfer on all edges of the specified faces,
anObj = self.LocalOp.MakeChamferFaces(theShape, theD1, theD2, theFaces)
RaiseIfFailed("MakeChamferFaces", self.LocalOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "chamfer")
return anObj
## The Same that MakeChamferFaces() but with params theD is chamfer lenght and
anObj = self.LocalOp.MakeChamferFacesAD(theShape, theD, theAngle, theFaces)
RaiseIfFailed("MakeChamferFacesAD", self.LocalOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "chamfer")
return anObj
## Perform a chamfer on edges,
anObj = self.LocalOp.MakeChamferEdges(theShape, theD1, theD2, theEdges)
RaiseIfFailed("MakeChamferEdges", self.LocalOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "chamfer")
return anObj
## The Same that MakeChamferEdges() but with params theD is chamfer lenght and
anObj = self.LocalOp.MakeChamferEdgesAD(theShape, theD, theAngle, theEdges)
RaiseIfFailed("MakeChamferEdgesAD", self.LocalOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "chamfer")
return anObj
## @sa MakeChamferEdge(), MakeChamferFaces()
anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, False)
RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
#anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "extrudedCut")
return anObj
## Add material to a solid by extrusion of the base shape on the given distance.
anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, True)
RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
#anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "extrudedBoss")
return anObj
# end of l3_local
anObj = self.LocalOp.MakeArchimede(theShape, theWeight, theWaterDensity, theMeshDeflection)
RaiseIfFailed("MakeArchimede", self.LocalOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "archimede")
return anObj
# end of l3_basic_op
# Example: see GEOM_TestMeasures.py
anObj = self.MeasuOp.MakeBoundingBox(theShape)
RaiseIfFailed("MakeBoundingBox", self.MeasuOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "bndbox")
return anObj
## Get inertia matrix and moments of inertia of theShape.
# Example: see GEOM_TestMeasures.py
anObj = self.MeasuOp.GetCentreOfMass(theShape)
RaiseIfFailed("GetCentreOfMass", self.MeasuOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "centerOfMass")
return anObj
## Get a vertex sub-shape by index depended with orientation.
# Example: see GEOM_TestMeasures.py
anObj = self.MeasuOp.GetVertexByIndex(theShape, theIndex)
RaiseIfFailed("GetVertexByIndex", self.MeasuOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "vertex")
return anObj
## Get the first vertex of wire/edge depended orientation.
# Example: see GEOM_TestMeasures.py
anObj = self.MeasuOp.GetNormal(theFace, theOptionalPoint)
RaiseIfFailed("GetNormal", self.MeasuOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "normal")
return anObj
## Check a topology of the given shape.
# Example: see GEOM_TestOthers.py
anObj = self.InsertOp.ImportFile(theFileName, theFormatName)
RaiseIfFailed("ImportFile", self.InsertOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "imported")
return anObj
## Deprecated analog of ImportFile()
# Example: see GEOM_TestOthers.py
anObj = self.InsertOp.RestoreShape(theStream)
RaiseIfFailed("RestoreShape", self.InsertOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "restored")
return anObj
## Export the given shape into a file with given name.
# Example: see GEOM_Spanner.py
anObj = self.BlocksOp.MakeQuad(E1, E2, E3, E4)
RaiseIfFailed("MakeQuad", self.BlocksOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "quad")
return anObj
## Create a quadrangle face on two edges.
# Example: see GEOM_Spanner.py
anObj = self.BlocksOp.MakeQuad2Edges(E1, E2)
RaiseIfFailed("MakeQuad2Edges", self.BlocksOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "quad")
return anObj
## Create a quadrangle face with specified corners.
# Example: see GEOM_Spanner.py
anObj = self.BlocksOp.MakeQuad4Vertices(V1, V2, V3, V4)
RaiseIfFailed("MakeQuad4Vertices", self.BlocksOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "quad")
return anObj
## Create a hexahedral solid, bounded by the six given faces. Order of
# Example: see GEOM_Spanner.py
anObj = self.BlocksOp.MakeHexa(F1, F2, F3, F4, F5, F6)
RaiseIfFailed("MakeHexa", self.BlocksOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "hexa")
return anObj
## Create a hexahedral solid between two given faces.
# Example: see GEOM_Spanner.py
anObj = self.BlocksOp.MakeHexa2Faces(F1, F2)
RaiseIfFailed("MakeHexa2Faces", self.BlocksOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "hexa")
return anObj
# end of l3_blocks
# Example: see GEOM_TestOthers.py
anObj = self.BlocksOp.GetPoint(theShape, theX, theY, theZ, theEpsilon)
RaiseIfFailed("GetPoint", self.BlocksOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "vertex")
return anObj
## Find a vertex of the given shape, which has minimal distance to the given point.
# Example: see GEOM_TestOthers.py
anObj = self.BlocksOp.GetVertexNearPoint(theShape, thePoint)
RaiseIfFailed("GetVertexNearPoint", self.BlocksOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "vertex")
return anObj
## Get an edge, found in the given shape by two given vertices.
# Example: see GEOM_Spanner.py
anObj = self.BlocksOp.GetEdge(theShape, thePoint1, thePoint2)
RaiseIfFailed("GetEdge", self.BlocksOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "edge")
return anObj
## Find an edge of the given shape, which has minimal distance to the given point.
# Example: see GEOM_TestOthers.py
anObj = self.BlocksOp.GetEdgeNearPoint(theShape, thePoint)
RaiseIfFailed("GetEdgeNearPoint", self.BlocksOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "edge")
return anObj
## Returns a face, found in the given shape by four given corner vertices.
# Example: see GEOM_Spanner.py
anObj = self.BlocksOp.GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4)
RaiseIfFailed("GetFaceByPoints", self.BlocksOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "face")
return anObj
## Get a face of block, found in the given shape by two given edges.
# Example: see GEOM_Spanner.py
anObj = self.BlocksOp.GetFaceByEdges(theShape, theEdge1, theEdge2)
RaiseIfFailed("GetFaceByEdges", self.BlocksOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "face")
return anObj
## Find a face, opposite to the given one in the given block.
# Example: see GEOM_Spanner.py
anObj = self.BlocksOp.GetOppositeFace(theBlock, theFace)
RaiseIfFailed("GetOppositeFace", self.BlocksOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "face")
return anObj
## Find a face of the given shape, which has minimal distance to the given point.
# Example: see GEOM_Spanner.py
anObj = self.BlocksOp.GetFaceNearPoint(theShape, thePoint)
RaiseIfFailed("GetFaceNearPoint", self.BlocksOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "face")
return anObj
## Find a face of block, whose outside normale has minimal angle with the given vector.
# Example: see GEOM_Spanner.py
anObj = self.BlocksOp.GetFaceByNormale(theBlock, theVector)
RaiseIfFailed("GetFaceByNormale", self.BlocksOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "face")
return anObj
## Find all sub-shapes of type \a theShapeType of the given shape,
# Example: see GEOM_TestOthers.py
anObj = self.BlocksOp.GetShapesNearPoint(theShape, thePoint, theShapeType, theTolerance)
RaiseIfFailed("GetShapesNearPoint", self.BlocksOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "group")
return anObj
# end of l3_blocks_op
if doUnionFaces is True: nbFacesOptimum = 0 # 0 means unite faces
anObj = self.BlocksOp.RemoveExtraEdges(theShape, nbFacesOptimum)
RaiseIfFailed("RemoveExtraEdges", self.BlocksOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "removeExtraEdges")
return anObj
## Check, if the given shape is a blocks compound.
# Example: see GEOM_TestOthers.py
anObj = self.BlocksOp.CheckAndImprove(theShape)
RaiseIfFailed("CheckAndImprove", self.BlocksOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "improved")
return anObj
# end of l4_blocks_measure
# Example: see GEOM_Spanner.py
anObj = self.BlocksOp.GetBlockNearPoint(theCompound, thePoint)
RaiseIfFailed("GetBlockNearPoint", self.BlocksOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "block")
return anObj
## Find block, containing all the elements, passed as the parts, or maximum quantity of them.
# Example: see GEOM_TestOthers.py
anObj = self.BlocksOp.GetBlockByParts(theCompound, theParts)
RaiseIfFailed("GetBlockByParts", self.BlocksOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "block")
return anObj
## Return all blocks, containing all the elements, passed as the parts.
anObj = self.BlocksOp.MakeMultiTransformation1D(Block, DirFace1, DirFace2, NbTimes)
RaiseIfFailed("MakeMultiTransformation1D", self.BlocksOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "transformed")
return anObj
## Multi-transformate block and glue the result.
DirFace1V, DirFace2V, NbTimesV)
RaiseIfFailed("MakeMultiTransformation2D", self.BlocksOp)
anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "transformed")
return anObj
## Build all possible propagation groups.
# Example: see GEOM_TestOthers.py
anObj = self.GroupOp.CreateGroup(theMainShape, theShapeType)
RaiseIfFailed("CreateGroup", self.GroupOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "group")
return anObj
## Adds a sub-object with ID theSubShapeId to the group
# Example: see GEOM_TestOthers.py
aGroup = self.GroupOp.UnionGroups(theGroup1, theGroup2)
RaiseIfFailed("UnionGroups", self.GroupOp)
- self._autoPublish(aGroup, theName)
+ self._autoPublish(aGroup, theName, "group")
return aGroup
## Intersection of two groups.
# Example: see GEOM_TestOthers.py
aGroup = self.GroupOp.IntersectGroups(theGroup1, theGroup2)
RaiseIfFailed("IntersectGroups", self.GroupOp)
- self._autoPublish(aGroup, theName)
+ self._autoPublish(aGroup, theName, "group")
return aGroup
## Cut of two groups.
# Example: see GEOM_TestOthers.py
aGroup = self.GroupOp.CutGroups(theGroup1, theGroup2)
RaiseIfFailed("CutGroups", self.GroupOp)
- self._autoPublish(aGroup, theName)
+ self._autoPublish(aGroup, theName, "group")
return aGroup
## Union of list of groups.
# Example: see GEOM_TestOthers.py
aGroup = self.GroupOp.UnionListOfGroups(theGList)
RaiseIfFailed("UnionListOfGroups", self.GroupOp)
- self._autoPublish(aGroup, theName)
+ self._autoPublish(aGroup, theName, "group")
return aGroup
## Cut of lists of groups.
# Example: see GEOM_TestOthers.py
aGroup = self.GroupOp.IntersectListOfGroups(theGList)
RaiseIfFailed("IntersectListOfGroups", self.GroupOp)
- self._autoPublish(aGroup, theName)
+ self._autoPublish(aGroup, theName, "group")
return aGroup
## Cut of lists of groups.
# Example: see GEOM_TestOthers.py
aGroup = self.GroupOp.CutListOfGroups(theGList1, theGList2)
RaiseIfFailed("CutListOfGroups", self.GroupOp)
- self._autoPublish(aGroup, theName)
+ self._autoPublish(aGroup, theName, "group")
return aGroup
## Returns a list of sub-objects ID stored in the group
anObj = self.AdvOp.MakeDividedDisk(theR, 67.0, theOrientation, thePattern)
RaiseIfFailed("MakeDividedDisk", self.AdvOp)
if Parameters: anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "dividedDisk")
return anObj
## This function allows creating a disk already divided into blocks. It
anObj = self.AdvOp.MakeDividedDiskPntVecR(theCenter, theVector, theRadius, 67.0, thePattern)
RaiseIfFailed("MakeDividedDiskPntVecR", self.AdvOp)
if Parameters: anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "dividedDisk")
return anObj
## Builds a cylinder prepared for hexa meshes
anObj = self.AdvOp.MakeDividedCylinder(theR, theH, thePattern)
RaiseIfFailed("MakeDividedCylinder", self.AdvOp)
if Parameters: anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "dividedCylinder")
return anObj
#@@ insert new functions before this line @@ do not remove this line @@#
# Example: see GEOM_TestAll.py
anObj = self.InsertOp.MakeCopy(theOriginal)
RaiseIfFailed("MakeCopy", self.InsertOp)
- self._autoPublish(anObj, theName)
+ self._autoPublish(anObj, theName, "copy")
return anObj
## Add Path to load python scripts from