print "MakePointOnCurve : ", BasicOp.GetErrorCode()
return anObj
+def MakeVertexOnLinesIntersection(line1,line2):
+ anObj = BasicOp.MakePointOnLinesIntersection(line1,line2)
+ if BasicOp.IsDone() == 0:
+ print "MakePointOnLinesIntersection : ", BasicOp.GetErrorCode()
+ return anObj
+
def MakeVectorDXDYDZ(dx,dy,dz):
anObj = BasicOp.MakeVectorDXDYDZ(dx,dy,dz)
if BasicOp.IsDone() == 0:
print "MakeLineTwoPnt : ", BasicOp.GetErrorCode()
return anObj
+def MakeLineTwoFaces(f1, f2):
+ anObj = BasicOp.MakeLineTwoFaces(f1,f2)
+ if BasicOp.IsDone() == 0:
+ print "MakeLineTwoFaces : ", BasicOp.GetErrorCode()
+ return anObj
+
def MakePlane(p1,v1,trimsize):
anObj = BasicOp.MakePlanePntVec(p1,v1,trimsize)
if BasicOp.IsDone() == 0:
RaiseIfFailed("MakePointOnCurve", BasicOp)
return anObj
+## Create a point on intersection of two lines.
+# @param theRefLine1, theRefLine2 The referenced lines.
+# @return New GEOM_Object, containing the created point.
+#
+# Example: see GEOM_TestAll.py
+def MakeVertexOnLinesIntersection(theRefLine1, theRefLine2):
+ anObj = BasicOp.MakePointOnCurve(theRefLine1, theRefLine2)
+ RaiseIfFailed("MakePointOnLinesIntersection", BasicOp)
+ return anObj
+
## Create a tangent, corresponding to the given parameter on the given curve.
# @param theRefCurve The referenced curve.
# @param theParameter Value of parameter on the referenced curve.
RaiseIfFailed("MakeLineTwoPnt", BasicOp)
return anObj
+## Create a line on two faces intersection.
+# @param theFace1 First of two faces, defining the line.
+# @param theFace2 Second of two faces, defining the line.
+# @return New GEOM_Object, containing the created line.
+#
+# Example: see GEOM_TestAll.py
+def MakeLineTwoFaces(theFace1, theFace2):
+ anObj = BasicOp.MakeLineTwoFaces(theFace1, theFace2)
+ RaiseIfFailed("MakeLineTwoFaces", BasicOp)
+ return anObj
+
## Create a plane, passing through the given point
# and normal to the given vector.
# @param thePnt Point, the plane has to pass through.
# @return New GEOM_Object, containing the created wire.
def MakeSketcherOnPlane(theCommand, theWorkingPlane):
anObj = CurvesOp.MakeSketcherOnPlane(theCommand, theWorkingPlane)
- RaiseIfFailed("MakeSketcher", CurvesOp)
+ RaiseIfFailed("MakeSketcherOnPlane", CurvesOp)
return anObj
# -----------------------------------------------------------------------------
# Example: see GEOM_TestAll.py
def MakeSphereR(theR):
anObj = PrimOp.MakeSphereR(theR)
- RaiseIfFailed("MakeSphreR", PrimOp)
+ RaiseIfFailed("MakeSphereR", PrimOp)
return anObj
## Create a cone with given base point, axis, height and radiuses.
# Example: see GEOM_TestAll.py
def MakeSolid(theShells):
anObj = ShapesOp.MakeSolidShells(theShells)
- RaiseIfFailed("MakeSolid", ShapesOp)
+ RaiseIfFailed("MakeSolidShells", ShapesOp)
return anObj
## Create a compound of the given shapes.
# Example: see GEOM_TestOthers.py
def NumberOfFaces(theShape):
nb_faces = ShapesOp.NumberOfFaces(theShape)
- RaiseIfFailed("NumberOfFace", ShapesOp)
+ RaiseIfFailed("NumberOfFaces", ShapesOp)
return nb_faces
## Gives quantity of edges in the given shape.
# Example: see GEOM_TestOthers.py
def GetShapesOnPlane(theShape, theShapeType, theAx1, theState):
aList = ShapesOp.GetShapesOnPlane(theShape, theShapeType, theAx1, theState)
- RaiseIfFailed("GetShaepsOnPlane", ShapesOp)
+ RaiseIfFailed("GetShapesOnPlane", ShapesOp)
return aList
## Works like the above method, but returns list of sub-shapes indices
# Example: see GEOM_TestHealing.py
def SuppressInternalWires(theObject, theWires):
anObj = HealOp.RemoveIntWires(theObject, theWires)
- RaiseIfFailed("SuppressIntWires", HealOp)
+ RaiseIfFailed("RemoveIntWires", HealOp)
return anObj
## Remove internal closed contours (holes) from the given object.
# Example: see GEOM_TestMeasures.py
def KindOfShape(theShape):
aRoughTuple = MeasuOp.KindOfShape(theShape)
- if MeasuOp.IsDone() == 0:
- raise RuntimerError, "KindOfShape : " + MeasuOp.GetErrorCode()
- return []
+ RaiseIfFailed("KindOfShape", MeasuOp)
aKind = aRoughTuple[0]
anInts = aRoughTuple[1]
# Example: see GEOM_Spanner.py
def CheckCompoundOfBlocks(theCompound):
(IsValid, BCErrors) = BlocksOp.CheckCompoundOfBlocks(theCompound)
- if BlocksOp.IsDone() == 0:
- raise RuntimeError, "CheckCompoundOfBlocks : " + BlocksOp.GetErrorCode()
- else:
- if IsValid == 0:
+ RaiseIfFailed("CheckCompoundOfBlocks", BlocksOp)
+ if IsValid == 0:
Descr = BlocksOp.PrintBCErrors(theCompound, BCErrors)
print Descr
return IsValid
# Example: see GEOM_TestOthers.py
def GetObjectIDs(theGroup):
ListIDs = GroupOp.GetObjects(theGroup)
- RaiseIfFailed("GetObject", GroupOp)
+ RaiseIfFailed("GetObjects", GroupOp)
return ListIDs
## Returns a type of sub objects stored in the group