# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
#
# File : GEOM_TestOthers.py
# Module : GEOM
# $Header$
+# ! Please, if you edit this example file, update also
+# ! GEOM_SRC/doc/salome/gui/GEOM/input/tui_test_others.doc
+# ! as some sequences of symbols from this example are used during
+# ! documentation generation to identify certain places of this file
+
import os
def TestExportImport (geompy, shape):
def TestOtherOperations (geompy, math):
- # MakeFaces
+ # prepare data for further operations
+ vx = geompy.MakeVectorDXDYDZ( 1, 0, 0)
+ vy = geompy.MakeVectorDXDYDZ( 0, 1, 0)
+ vz = geompy.MakeVectorDXDYDZ( 0, 0, 1)
+
p11 = geompy.MakeVertex( 0, 0, 0)
p12 = geompy.MakeVertex(30, 0, 0)
p13 = geompy.MakeVertex(30, 30, 0)
id_w2 = geompy.addToStudy(w2, "Inside Wire")
id_w3 = geompy.addToStudy(w3, "Inside Wire, translated along OZ")
+ # MakeFaces
f12 = geompy.MakeFaces([w1, w2], 0)
id_f12 = geompy.addToStudy(f12, "MakeFaces WO + WI")
else:
print "The Box is VALID"
+ # GetSame
+ Cone_ss = geompy.GetSame(Compound1, Cone)
+ id_Cone_ss = geompy.addToStudyInFather(Compound1, Cone_ss, "Cone subshape")
+
# test geometrical groups
# CreateGroup
for ObjectID in GetObjectIDs:
print " ", ObjectID
+ # GetMainShape
BoxCopy = geompy.GetMainShape(CreateGroup)
# DifferenceIDs
# -----------------------------------------------------------------------------
# enumeration ShapeTypeString as a dictionary
# -----------------------------------------------------------------------------
- ShapeTypeString = {'0':"COMPOUND", '1':"COMPSOLID", '2':"SOLID", '3':"SHELL", '4':"FACE", '5':"WIRE", '6':"EDGE", '7':"VERTEX", '8':"SHAPE"}
+ ShapeTypeString = {'0':"COMPOUND", '1':"COMPSOLID", '2':"SOLID", '3':"SHELL",
+ '4':"FACE", '5':"WIRE", '6':"EDGE", '7':"VERTEX", '8':"SHAPE"}
GroupType = geompy.GetType(CreateGroup)
print "Type of elements of the created group is ", ShapeTypeString[`GroupType`]
id_s0 = geompy.addToStudy(s0, "s0")
v_0pp = geompy.MakeVectorDXDYDZ( 0, 1, 1)
- v_0np = geompy.MakeVectorDXDYDZ( 0, -1, 1)
- v_p0p = geompy.MakeVectorDXDYDZ( 1, 0, 1)
- v_n0p = geompy.MakeVectorDXDYDZ(-1, 0, 1)
- v_pp0 = geompy.MakeVectorDXDYDZ( 1, 1, 0)
- v_np0 = geompy.MakeVectorDXDYDZ(-1, 1, 0)
+ #v_0np = geompy.MakeVectorDXDYDZ( 0, -1, 1)
+ #v_p0p = geompy.MakeVectorDXDYDZ( 1, 0, 1)
+ #v_n0p = geompy.MakeVectorDXDYDZ(-1, 0, 1)
+ #v_pp0 = geompy.MakeVectorDXDYDZ( 1, 1, 0)
+ #v_np0 = geompy.MakeVectorDXDYDZ(-1, 1, 0)
v_0n0 = geompy.MakeVectorDXDYDZ( 0, -1, 0)
- pln_0pp = geompy.MakePlane(p0, v_0pp, 300)
- pln_0np = geompy.MakePlane(p0, v_0np, 300)
- pln_p0p = geompy.MakePlane(p0, v_p0p, 300)
- pln_n0p = geompy.MakePlane(p0, v_n0p, 300)
- pln_pp0 = geompy.MakePlane(p0, v_pp0, 300)
- pln_np0 = geompy.MakePlane(p0, v_np0, 300)
-
- #part_tool_1 = geompy.MakePartition([b0, pln_0pp, pln_0np, pln_p0p, pln_n0p, pln_pp0, pln_np0],
- # [],
- # [],
- # [b0])
- part_tool_1 = geompy.MakePartition([b0, pln_0pp, pln_0np, pln_p0p, pln_n0p, pln_pp0, pln_np0])
-
- id_part_tool_1 = geompy.addToStudy(part_tool_1, "part_tool_1")
-
- pt_pnt_1 = geompy.MakeVertex( 55, 0, 55)
- pt_pnt_2 = geompy.MakeVertex( 0, 55, 55)
- pt_pnt_3 = geompy.MakeVertex(-55, 0, 55)
- pt_pnt_4 = geompy.MakeVertex( 0, -55, 55)
- pt_pnt_5 = geompy.MakeVertex( 55, 55, 0)
- pt_pnt_6 = geompy.MakeVertex( 55, -55, 0)
- pt_pnt_7 = geompy.MakeVertex(-55, 55, 0)
- pt_pnt_8 = geompy.MakeVertex(-55, -55, 0)
- pt_pnt_9 = geompy.MakeVertex( 55, 0, -55)
- pt_pnt_10 = geompy.MakeVertex( 0, 55, -55)
- pt_pnt_11 = geompy.MakeVertex(-55, 0, -55)
- pt_pnt_12 = geompy.MakeVertex( 0, -55, -55)
-
- pt_face_1 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_1)
- pt_face_2 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_2)
- pt_face_3 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_3)
- pt_face_4 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_4)
- pt_face_5 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_5)
- pt_face_6 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_6)
- pt_face_7 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_7)
- pt_face_8 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_8)
- pt_face_9 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_9)
- pt_face_10 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_10)
- pt_face_11 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_11)
- pt_face_12 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_12)
-
+ #pln_0pp = geompy.MakePlane(p0, v_0pp, 300)
+ #pln_0np = geompy.MakePlane(p0, v_0np, 300)
+ #pln_p0p = geompy.MakePlane(p0, v_p0p, 300)
+ #pln_n0p = geompy.MakePlane(p0, v_n0p, 300)
+ #pln_pp0 = geompy.MakePlane(p0, v_pp0, 300)
+ #pln_np0 = geompy.MakePlane(p0, v_np0, 300)
+ #
+ #part_objs = [b0, pln_0pp, pln_0np, pln_p0p, pln_n0p, pln_pp0, pln_np0]
+ #part_tool_1 = geompy.MakePartition(part_objs, [], [], [b0])
+ #part_tool_1 = geompy.MakePartition(part_objs)
+ #
+ #id_part_tool_1 = geompy.addToStudy(part_tool_1, "part_tool_1")
+ #
+ #pt_pnt_1 = geompy.MakeVertex( 55, 0, 55)
+ #pt_pnt_2 = geompy.MakeVertex( 0, 55, 55)
+ #pt_pnt_3 = geompy.MakeVertex(-55, 0, 55)
+ #pt_pnt_4 = geompy.MakeVertex( 0, -55, 55)
+ #pt_pnt_5 = geompy.MakeVertex( 55, 55, 0)
+ #pt_pnt_6 = geompy.MakeVertex( 55, -55, 0)
+ #pt_pnt_7 = geompy.MakeVertex(-55, 55, 0)
+ #pt_pnt_8 = geompy.MakeVertex(-55, -55, 0)
+ #pt_pnt_9 = geompy.MakeVertex( 55, 0, -55)
+ #pt_pnt_10 = geompy.MakeVertex( 0, 55, -55)
+ #pt_pnt_11 = geompy.MakeVertex(-55, 0, -55)
+ #pt_pnt_12 = geompy.MakeVertex( 0, -55, -55)
+ #
+ #pt_face_1 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_1)
+ #pt_face_2 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_2)
+ #pt_face_3 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_3)
+ #pt_face_4 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_4)
+ #pt_face_5 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_5)
+ #pt_face_6 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_6)
+ #pt_face_7 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_7)
+ #pt_face_8 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_8)
+ #pt_face_9 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_9)
+ #pt_face_10 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_10)
+ #pt_face_11 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_11)
+ #pt_face_12 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_12)
+ #
#pt_box = geompy.GetBlockNearPoint(part_tool_1, p0)
-
- #part_tool = geompy.MakeCompound([pt_face_1, pt_face_4, pt_face_7, pt_face_10,
- # pt_face_2, pt_face_5, pt_face_8, pt_face_11,
- # #pt_face_3, pt_face_6, pt_face_9, pt_face_12, pt_box])
- # pt_face_3, pt_face_6, pt_face_9, pt_face_12)
+ #
+ #comp_parts = [pt_face_1, pt_face_4, pt_face_7, pt_face_10,
+ # pt_face_2, pt_face_5, pt_face_8, pt_face_11,
+ # #pt_face_3, pt_face_6, pt_face_9, pt_face_12, pt_box]
+ # pt_face_3, pt_face_6, pt_face_9, pt_face_12]
+ #part_tool = geompy.MakeCompound(comp_parts)
#id_part_tool = geompy.addToStudy(part_tool, "part_tool")
-
+ #
#part = geompy.MakePartition([s0], [part_tool])
- #part = geompy.MakePartition([s0], [ pt_face_1, pt_face_4, pt_face_7, pt_face_10,
- # pt_face_2, pt_face_5, pt_face_8, pt_face_11,
- # pt_face_3, pt_face_6, pt_face_9, pt_face_12, b0] )
+ #
+ #part_tools = [pt_face_1, pt_face_4, pt_face_7, pt_face_10,
+ # pt_face_2, pt_face_5, pt_face_8, pt_face_11,
+ # pt_face_3, pt_face_6, pt_face_9, pt_face_12, b0]
+ #part = geompy.MakePartition([s0], part_tools)
p1 = geompy.MakeVertex(50, 0, 0)
p2 = geompy.MakeVertex(-50, 0, 0)
p5 = geompy.MakeVertex(0, 0, 50)
p6 = geompy.MakeVertex(0, 0, -50)
- vx = geompy.MakeVectorDXDYDZ( 1, 0, 0)
- vy = geompy.MakeVectorDXDYDZ( 0, 1, 0)
- vz = geompy.MakeVectorDXDYDZ( 0, 0, 1)
-
plnX1 = geompy.MakePlane(p1, vx, 300)
plnX2 = geompy.MakePlane(p2, vx, 300)
plnY1 = geompy.MakePlane(p3, vy, 300)
geompy.addToStudy(freeFacesWithoutExtra, "freeFacesWithoutExtra")
# GetSharedShapes
- sharedFaces = geompy.GetSharedShapes(part, freeFacesWithoutExtra, geompy.ShapeType["FACE"])
+ sharedFaces = geompy.GetSharedShapes(part, freeFacesWithoutExtra,
+ geompy.ShapeType["FACE"])
for shFace in sharedFaces:
geompy.addToStudy(shFace, "sharedFace")
geompy.addToStudy(edge_i, "Edge on Plane (N = (0, -1, 0) & Location = (0, -50, 0)")
# GetShapesOnPlaneWithLocationIDs
- edges_on_pln_ids = geompy.GetShapesOnPlaneWithLocationIDs(blocksComp, geompy.ShapeType["EDGE"],
- v_0n0, Loc, geompy.GEOM.ST_ON)
+ edges_on_pln_ids = geompy.GetShapesOnPlaneWithLocationIDs(
+ blocksComp, geompy.ShapeType["EDGE"], v_0n0, Loc, geompy.GEOM.ST_ON)
group_edges_on_pln = geompy.CreateGroup(blocksComp, geompy.ShapeType["EDGE"])
geompy.UnionIDs(group_edges_on_pln, edges_on_pln_ids)
- geompy.addToStudy(group_edges_on_pln, "Group of edges on Plane (N = (0, -1, 0) & Location = (0, -50, 0))")
-
+ grname = "Group of edges on Plane (N = (0, -1, 0) & Location = (0, -50, 0))"
+ geompy.addToStudy(group_edges_on_pln, grname)
+
# GetShapesOnCylinder
edges_out_cyl = geompy.GetShapesOnCylinder(blocksComp, geompy.ShapeType["EDGE"],
vy, 55, geompy.GEOM.ST_OUT)
p0, 100, geompy.GEOM.ST_ON)
for vertex_i in vertices_on_sph:
geompy.addToStudy(vertex_i, "Vertex on Sphere (center = (0, 0, 0), r = 100)")
- pass
# GetShapesOnSphereIDs
vertices_on_sph_ids = geompy.GetShapesOnSphereIDs(blocksComp, geompy.ShapeType["VERTEX"],
quadrangle = geompy.MakeWire([qe1, qe2, qe3, qe4])
geompy.addToStudy(quadrangle, "Quadrangle")
- edges_onin_quad = geompy.GetShapesOnQuadrangle( f12, geompy.ShapeType["EDGE"],
- tl, tr, bl, br, geompy.GEOM.ST_ONIN)
+ edges_onin_quad = geompy.GetShapesOnQuadrangle(f12, geompy.ShapeType["EDGE"],
+ tl, tr, bl, br, geompy.GEOM.ST_ONIN)
comp = geompy.MakeCompound(edges_onin_quad)
geompy.addToStudy(comp, "Edges of F12 ONIN Quadrangle")
if len( edges_onin_quad ) != 4:
print "Error in GetShapesOnQuadrangle()"
- pass
# GetShapesOnQuadrangleIDs
vertices_on_quad_ids = geompy.GetShapesOnQuadrangleIDs(f12, geompy.ShapeType["VERTEX"],
geompy.UnionIDs(vertices_on_quad, vertices_on_quad_ids)
geompy.addToStudy(vertices_on_quad, "Group of vertices on Quadrangle F12")
+ # GetShapesOnBox
+ edges_on_box = geompy.GetShapesOnBox(b0, part, geompy.ShapeType["EDGE"],
+ geompy.GEOM.ST_ON)
+ comp = geompy.MakeCompound(edges_on_box)
+ geompy.addToStudy(comp, "Edges of part ON box b0")
+ if len( edges_on_box ) != 12:
+ print "Error in GetShapesOnBox()"
+
+ # GetShapesOnBoxIDs
+ faces_on_box_ids = geompy.GetShapesOnBoxIDs(b0, part, geompy.ShapeType["FACE"],
+ geompy.GEOM.ST_ON)
+ faces_on_box = geompy.CreateGroup(part, geompy.ShapeType["FACE"])
+ geompy.UnionIDs(faces_on_box, faces_on_box_ids)
+ geompy.addToStudyInFather(part, faces_on_box, "Group of faces on box b0")
+
+ # Prepare arguments for GetShapesOnShape
+ sph1 = geompy.MakeSphere(50, 50, 50, 40)
+ sph2 = geompy.MakeSphere(50, 50, -50, 40)
+ pcyl = geompy.MakeVertex(50, 50, -50)
+ cyli = geompy.MakeCylinder(pcyl, vz, 40, 100)
+ fuse = geompy.MakeFuse(sph1, cyli)
+ fuse = geompy.MakeFuse(fuse, sph2)
+ # As after Fuse we have a compound, we need to obtain a solid from it
+ shsh = geompy.SubShapeAll(fuse, geompy.ShapeType["SOLID"])
+ sh_1 = shsh[0]
+ geompy.addToStudy(sh_1, "sh_1")
+
+ # GetShapesOnShape
+ faces_in_sh = geompy.GetShapesOnShape(sh_1, part, geompy.ShapeType["FACE"],
+ geompy.GEOM.ST_IN)
+ comp = geompy.MakeCompound(faces_in_sh)
+ geompy.addToStudy(comp, "Faces of part IN shape sh_1")
+ if len(faces_in_sh) != 11:
+ print "Error in GetShapesOnShape()"
+
+ # GetShapesOnShapeAsCompound
+ faces_in_sh_c = geompy.GetShapesOnShapeAsCompound(sh_1, part, geompy.ShapeType["FACE"],
+ geompy.GEOM.ST_IN)
+ geompy.addToStudy(faces_in_sh_c, "Faces of part IN shape sh_1 (as compound)")
+
+ # GetShapesOnShapeIDs
+ edges_in_sh_ids = geompy.GetShapesOnShapeIDs(sh_1, part, geompy.ShapeType["EDGE"],
+ geompy.GEOM.ST_IN)
+ edges_in_sh = geompy.CreateGroup(part, geompy.ShapeType["EDGE"])
+ geompy.UnionIDs(edges_in_sh, edges_in_sh_ids)
+ geompy.addToStudyInFather(part, edges_in_sh, "Group of edges in shape sh_1")
+ if len(edges_in_sh_ids) != 15:
+ print "Error in GetShapesOnShapeIDs()"
+
# Prepare arguments for GetInPlace and GetInPlaceByHistory
box5 = geompy.MakeBoxDXDYDZ(100, 100, 100)
box6 = geompy.MakeTranslation(box5, 50, 50, 0)
box5_faces = geompy.SubShapeAll(box5, geompy.ShapeType["FACE"])
box6_faces = geompy.SubShapeAll(box6, geompy.ShapeType["FACE"])
- ifa = 1
- for aface in box5_faces:
- geompy.addToStudyInFather(box5, aface, "Face" + `ifa`)
- ifa = ifa + 1
-
- ifa = 1
- for aface in box6_faces:
- geompy.addToStudyInFather(box6, aface, "Face" + `ifa`)
- ifa = ifa + 1
+ for ifa in range(6):
+ geompy.addToStudyInFather(box5, box5_faces[ifa], "Face" + `ifa + 1`)
+ geompy.addToStudyInFather(box6, box6_faces[ifa], "Face" + `ifa + 1`)
# GetInPlace(theShapeWhere, theShapeWhat)
ibb = 5
for afaces in faces_list:
ifa = 1
for aface in afaces:
+ refl_box_face = geompy.GetInPlace(part, aface)
if ibb == 6 and (ifa == 2 or ifa == 4):
- # use IDL interface directly to avoid error message appearence in Python console
- refl_box_face = geompy.ShapesOp.GetInPlace(part, aface)
+ # For two faces of the tool box
+ # there is no reflection in the result.
if refl_box_face is not None:
- geompy.addToStudyInFather(part, refl_box_face,
- "Reflection of face " + `ifa` + " of box " + `ibb`)
- error = "Result of GetInPlace must be NULL for face " + `ifa` + " of box " + `ibb`
+ error = "Result of GetInPlace must be NULL for face "
+ error += `ifa` + " of box " + `ibb`
raise RuntimeError, error
else:
- # use geompy interface
- refl_box_face = geompy.GetInPlace(part, aface)
- geompy.addToStudyInFather(part, refl_box_face,
- "Reflection of face " + `ifa` + " of box " + `ibb`)
+ ssname = "Reflection of face " + `ifa` + " of box " + `ibb`
+ geompy.addToStudyInFather(part, refl_box_face, ssname)
ifa = ifa + 1
ibb = ibb + 1
for afaces in faces_list:
ifa = 1
for aface in afaces:
+ ssname = "Reflection of face " + `ifa` + " of box " + `ibb` + " (by history)"
if ibb == 6 and (ifa == 2 or ifa == 4):
# use IDL interface directly to avoid error message appearence in Python console
refl_box_face = geompy.ShapesOp.GetInPlaceByHistory(part, aface)
if refl_box_face is not None:
- geompy.addToStudyInFather(part, refl_box_face,
- "Reflection of face " + `ifa` + " of box " + `ibb` + " (by history)")
- error = "Result of GetInPlaceByHistory must be NULL for face " + `ifa` + " of box " + `ibb`
+ geompy.addToStudyInFather(part, refl_box_face, ssname)
+ error = "Result of GetInPlaceByHistory must be NULL for face "
+ error += `ifa` + " of box " + `ibb`
raise RuntimeError, error
else:
# use geompy interface
refl_box_face = geompy.GetInPlaceByHistory(part, aface)
- geompy.addToStudyInFather(part, refl_box_face,
- "Reflection of face " + `ifa` + " of box " + `ibb` + " (by history)")
+ geompy.addToStudyInFather(part, refl_box_face, ssname)
ifa = ifa + 1
ibb = ibb + 1
+
+#END
## Get name for sub-shape aSubObj of shape aMainObj
#
- # @ref tui_todo "Example"
+ # @ref swig_SubShapeAllSorted "Example"
def SubShapeName(self,aSubObj, aMainObj):
# Example: see GEOM_TestAll.py
# these arguments description
# \return study entry of the published shape in form of string
#
- # @ref tui_todo "Example"
+ # @ref swig_MakeQuad4Vertices "Example"
def addToStudy(self, aShape, aName, doRestoreSubShapes=False,
theArgs=[], theFindMethod=GEOM.FSM_GetInPlace, theInheritFirstArg=False):
# Example: see GEOM_TestAll.py
## Publish in study aShape with name aName as sub-object of previously published aFather
#
- # @ref tui_todo "Example"
+ # @ref swig_SubShapeAllSorted "Example"
def addToStudyInFather(self, aFather, aShape, aName):
# Example: see GEOM_TestAll.py
try:
# @param theVParameter Value of V-parameter on the referenced surface.
# @return New GEOM_Object, containing the created point.
#
- # @ref tui_todo "Example"
- def MakeVertexOnSurface(self,theRefSurf, theUParameter, theVParameter):
+ # @ref swig_MakeVertexOnSurface "Example"
+ def MakeVertexOnSurface(self, theRefSurf, theUParameter, theVParameter):
# Example: see GEOM_TestAll.py
anObj = self.BasicOp.MakePointOnSurface(theRefSurf, theUParameter, theVParameter)
RaiseIfFailed("MakePointOnSurface", self.BasicOp)
# @param theRefLine1, theRefLine2 The referenced lines.
# @return New GEOM_Object, containing the created point.
#
- # @ref tui_todo "Example"
+ # @ref swig_MakeVertexOnLinesIntersection "Example"
def MakeVertexOnLinesIntersection(self, theRefLine1, theRefLine2):
# Example: see GEOM_TestAll.py
anObj = self.BasicOp.MakePointOnLinesIntersection(theRefLine1, theRefLine2)
# @param theParameter Value of parameter on the referenced curve.
# @return New GEOM_Object, containing the created tangent.
#
- # @ref tui_todo "Example"
- def MakeTangentOnCurve(self,theRefCurve, theParameter):
+ # @ref swig_MakeTangentOnCurve "Example"
+ def MakeTangentOnCurve(self, theRefCurve, theParameter):
anObj = self.BasicOp.MakeTangentOnCurve(theRefCurve, theParameter)
RaiseIfFailed("MakeTangentOnCurve", self.BasicOp)
return anObj
# @param theFace2 Second of two faces, defining the line.
# @return New GEOM_Object, containing the created line.
#
- # @ref tui_todo "Example"
+ # @ref swig_MakeLineTwoFaces "Example"
def MakeLineTwoFaces(self, theFace1, theFace2):
# Example: see GEOM_TestAll.py
anObj = self.BasicOp.MakeLineTwoFaces(theFace1, theFace2)
# @param YDX,YDY,YDZ Three components of OY direction
# @return New GEOM_Object, containing the created coordinate system.
#
- # @ref tui_todo "Example"
- def MakeMarker(self,OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ):
+ # @ref swig_MakeMarker "Example"
+ def MakeMarker(self, OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ):
# Example: see GEOM_TestAll.py
anObj = self.BasicOp.MakeMarker(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ)
RaiseIfFailed("MakeMarker", self.BasicOp)
# @param theXVec Vector of X direction
# @param theYVec Vector of Y direction
# @return New GEOM_Object, containing the created coordinate system.
- def MakeMarkerPntTwoVec(self,theOrigin, theXVec, theYVec):
+ #
+ # @ref swig_MakeMarker "Example"
+ def MakeMarkerPntTwoVec(self, theOrigin, theXVec, theYVec):
O = self.PointCoordinates( theOrigin )
OXOY = []
for vec in [ theXVec, theYVec ]:
# @param thePnt3 End point of the arc.
# @return New GEOM_Object, containing the created arc.
#
- # @ref tui_todo "Example"
+ # @ref swig_MakeArc "Example"
def MakeArc(self,thePnt1, thePnt2, thePnt3):
# Example: see GEOM_TestAll.py
anObj = self.CurvesOp.MakeArc(thePnt1, thePnt2, thePnt3)
# @param theSense Orientation of the arc
# @return New GEOM_Object, containing the created arc.
#
- # @ref tui_todo "Example"
+ # @ref swig_MakeArc "Example"
def MakeArcCenter(self, thePnt1, thePnt2, thePnt3, theSense=False):
# Example: see GEOM_TestAll.py
anObj = self.CurvesOp.MakeArcCenter(thePnt1, thePnt2, thePnt3, theSense)
# @param thePnt1,thePnt2,thePnt3 Points, defining the circle.
# @return New GEOM_Object, containing the created circle.
#
- # @ref tui_todo "Example"
+ # @ref swig_MakeCircle "Example"
def MakeCircleCenter2Pnt(self,thePnt1, thePnt2, thePnt3):
# Example: see GEOM_example6.py
anObj = self.CurvesOp.MakeCircleCenter2Pnt(thePnt1, thePnt2, thePnt3)
# @param theRuled - mode defining type of the result surfaces (ruled or smoothed).
# @return New GEOM_Object, containing the created shell or solid.
#
- # @ref tui_todo "Example"
+ # @ref swig_todo "Example"
def MakeThruSections(self,theSeqSections,theModeSolid,thePreci,theRuled):
# Example: see GEOM_TestAll.py
anObj = self.PrimOp.MakeThruSections(theSeqSections,theModeSolid,thePreci,theRuled)
# orthogonal to the spine tangent in the correspondent point
# @return New GEOM_Object, containing the created pipe.
#
- # @ref tui_todo "Example"
+ # @ref swig_todo "Example"
def MakePipeWithDifferentSections(self, theSeqBases,
theLocations, thePath,
theWithContact, theWithCorrection):
# orthogonal to the spine tangent in the correspondent point
# @return New GEOM_Object, containing the created solids.
#
- # @ref tui_todo "Example"
+ # @ref swig_todo "Example"
def MakePipeWithShellSections(self,theSeqBases, theSeqSubBases,
theLocations, thePath,
theWithContact, theWithCorrection):
# @param theLocations - list of corresponding vertexes
# @return New GEOM_Object, containing the created solids.
#
- # @ref tui_todo "Example"
+ # @ref swig_todo "Example"
def MakePipeShellsWithoutPath(self, theSeqBases, theLocations):
anObj = self.PrimOp.MakePipeShellsWithoutPath(theSeqBases, theLocations)
RaiseIfFailed("MakePipeShellsWithoutPath", self.PrimOp)
## Shortcut to MakeFaceWires()
#
- # @ref tui_creation_face "Example"
+ # @ref tui_creation_face "Example 1"
+ # \n @ref swig_MakeFaces "Example 2"
def MakeFaces(self,theWires, isPlanarWanted):
# Example: see GEOM_TestOthers.py
anObj = self.MakeFaceWires(theWires, isPlanarWanted)
# @param theShape Shape to count faces of.
# @return Quantity of faces.
#
- # @ref tui_todo "Example"
+ # @ref swig_NumberOfFaces "Example"
def NumberOfFaces(self,theShape):
# Example: see GEOM_TestOthers.py
nb_faces = self.ShapesOp.NumberOfFaces(theShape)
# @param theShape Shape to count edges of.
# @return Quantity of edges.
#
- # @ref tui_todo "Example"
+ # @ref swig_NumberOfEdges "Example"
def NumberOfEdges(self,theShape):
# Example: see GEOM_TestOthers.py
nb_edges = self.ShapesOp.NumberOfEdges(theShape)
# @param theShape Shape to be reversed.
# @return The reversed copy of theShape.
#
- # @ref tui_todo "Example"
+ # @ref swig_ChangeOrientation "Example"
def ChangeOrientation(self,theShape):
# Example: see GEOM_TestAll.py
anObj = self.ShapesOp.ChangeOrientation(theShape)
## Shortcut to ChangeOrientation()
#
- # @ref tui_todo "Example"
+ # @ref swig_OrientationChange "Example"
def OrientationChange(self,theShape):
# Example: see GEOM_TestOthers.py
anObj = self.ChangeOrientation(theShape)
# @param theShapeType Type of sub-shapes to be retrieved.
# @return List of sub-shapes of theShape1, shared with theShape2.
#
- # @ref tui_todo "Example"
+ # @ref swig_GetSharedShapes "Example"
def GetSharedShapes(self,theShape1, theShape2, theShapeType):
# Example: see GEOM_TestOthers.py
aList = self.ShapesOp.GetSharedShapes(theShape1, theShape2, theShapeType)
# ST_ON, ST_OUT, ST_ONOUT, ST_IN, ST_ONIN.
# @return List of all found sub-shapes.
#
- # @ref tui_todo "Example"
+ # @ref swig_GetShapesOnPlane "Example"
def GetShapesOnPlane(self,theShape, theShapeType, theAx1, theState):
# Example: see GEOM_TestOthers.py
aList = self.ShapesOp.GetShapesOnPlane(theShape, theShapeType, theAx1, theState)
## Works like the above method, but returns list of sub-shapes indices
#
- # @ref tui_todo "Example"
+ # @ref swig_GetShapesOnPlaneIDs "Example"
def GetShapesOnPlaneIDs(self,theShape, theShapeType, theAx1, theState):
# Example: see GEOM_TestOthers.py
aList = self.ShapesOp.GetShapesOnPlaneIDs(theShape, theShapeType, theAx1, theState)
# ST_ON, ST_OUT, ST_ONOUT, ST_IN, ST_ONIN.
# @return List of all found sub-shapes.
#
- # @ref tui_todo "Example"
+ # @ref swig_GetShapesOnPlaneWithLocation "Example"
def GetShapesOnPlaneWithLocation(self, theShape, theShapeType, theAx1, thePnt, theState):
# Example: see GEOM_TestOthers.py
aList = self.ShapesOp.GetShapesOnPlaneWithLocation(theShape, theShapeType,
## Works like the above method, but returns list of sub-shapes indices
#
- # @ref tui_todo "Example"
+ # @ref swig_GetShapesOnPlaneWithLocationIDs "Example"
def GetShapesOnPlaneWithLocationIDs(self, theShape, theShapeType, theAx1, thePnt, theState):
# Example: see GEOM_TestOthers.py
aList = self.ShapesOp.GetShapesOnPlaneWithLocationIDs(theShape, theShapeType,
# ST_ON, ST_OUT, ST_ONOUT, ST_IN, ST_ONIN.
# @return List of all found sub-shapes.
#
- # @ref tui_todo "Example"
+ # @ref swig_GetShapesOnCylinder "Example"
def GetShapesOnCylinder(self, theShape, theShapeType, theAxis, theRadius, theState):
# Example: see GEOM_TestOthers.py
aList = self.ShapesOp.GetShapesOnCylinder(theShape, theShapeType, theAxis, theRadius, theState)
## Works like the above method, but returns list of sub-shapes indices
#
- # @ref tui_todo "Example"
+ # @ref swig_GetShapesOnCylinderIDs "Example"
def GetShapesOnCylinderIDs(self, theShape, theShapeType, theAxis, theRadius, theState):
# Example: see GEOM_TestOthers.py
aList = self.ShapesOp.GetShapesOnCylinderIDs(theShape, theShapeType, theAxis, theRadius, theState)
# ST_ON, ST_OUT, ST_ONOUT, ST_IN, ST_ONIN.
# @return List of all found sub-shapes.
#
- # @ref tui_todo "Example"
+ # @ref swig_GetShapesOnSphere "Example"
def GetShapesOnSphere(self,theShape, theShapeType, theCenter, theRadius, theState):
# Example: see GEOM_TestOthers.py
aList = self.ShapesOp.GetShapesOnSphere(theShape, theShapeType, theCenter, theRadius, theState)
## Works like the above method, but returns list of sub-shapes indices
#
- # @ref tui_todo "Example"
+ # @ref swig_GetShapesOnSphereIDs "Example"
def GetShapesOnSphereIDs(self,theShape, theShapeType, theCenter, theRadius, theState):
# Example: see GEOM_TestOthers.py
aList = self.ShapesOp.GetShapesOnSphereIDs(theShape, theShapeType, theCenter, theRadius, theState)
# ST_ON, ST_OUT, ST_ONOUT, ST_IN, ST_ONIN.
# @return List of all found sub-shapes.
#
- # @ref tui_todo "Example"
+ # @ref swig_GetShapesOnQuadrangle "Example"
def GetShapesOnQuadrangle(self, theShape, theShapeType,
theTopLeftPoint, theTopRigthPoint,
theBottomLeftPoint, theBottomRigthPoint, theState):
## Works like the above method, but returns list of sub-shapes indices
#
- # @ref tui_todo "Example"
+ # @ref swig_GetShapesOnQuadrangleIDs "Example"
def GetShapesOnQuadrangleIDs(self, theShape, theShapeType,
theTopLeftPoint, theTopRigthPoint,
theBottomLeftPoint, theBottomRigthPoint, theState):
# ST_ON, ST_OUT, ST_ONOUT, ST_IN, ST_ONIN.
# @return List of all found sub-shapes.
#
- # @ref tui_todo "Example"
- def GetShapesOnBox(self,theBox, theShape, theShapeType, theState):
+ # @ref swig_GetShapesOnBox "Example"
+ def GetShapesOnBox(self, theBox, theShape, theShapeType, theState):
+ # Example: see GEOM_TestOthers.py
aList = self.ShapesOp.GetShapesOnBox(theBox, theShape, theShapeType, theState)
RaiseIfFailed("GetShapesOnBox", self.ShapesOp)
return aList
## Works like the above method, but returns list of sub-shapes indices
#
- def GetShapesOnBoxIDs(self,theBox, theShape, theShapeType, theState):
+ # @ref swig_GetShapesOnBoxIDs "Example"
+ def GetShapesOnBoxIDs(self, theBox, theShape, theShapeType, theState):
+ # Example: see GEOM_TestOthers.py
aList = self.ShapesOp.GetShapesOnBoxIDs(theBox, theShape, theShapeType, theState)
RaiseIfFailed("GetShapesOnBoxIDs", self.ShapesOp)
return aList
# ST_ON, ST_OUT, ST_ONOUT, ST_IN, ST_ONIN.
# @return List of all found sub-shapes.
#
- # @ref tui_todo "Example"
+ # @ref swig_GetShapesOnShape "Example"
def GetShapesOnShape(self, theCheckShape, theShape, theShapeType, theState):
+ # Example: see GEOM_TestOthers.py
aList = self.ShapesOp.GetShapesOnShape(theCheckShape, theShape,
theShapeType, theState)
RaiseIfFailed("GetShapesOnShape", self.ShapesOp)
## Works like the above method, but returns result as compound
#
+ # @ref swig_GetShapesOnShapeAsCompound "Example"
def GetShapesOnShapeAsCompound(self, theCheckShape, theShape, theShapeType, theState):
+ # Example: see GEOM_TestOthers.py
anObj = self.ShapesOp.GetShapesOnShapeAsCompound(theCheckShape, theShape,
theShapeType, theState)
RaiseIfFailed("GetShapesOnShapeAsCompound", self.ShapesOp)
## Works like the above method, but returns list of sub-shapes indices
#
+ # @ref swig_GetShapesOnShapeIDs "Example"
def GetShapesOnShapeIDs(self, theCheckShape, theShape, theShapeType, theState):
+ # Example: see GEOM_TestOthers.py
aList = self.ShapesOp.GetShapesOnShapeIDs(theCheckShape, theShape,
theShapeType, theState)
RaiseIfFailed("GetShapesOnShapeIDs", self.ShapesOp)
# @param theShapeWhat Shape, specifying what to find.
# @return Group of all found sub-shapes or a single found sub-shape.
#
- # @ref tui_todo "Example"
+ # @ref swig_GetInPlace "Example"
def GetInPlace(self,theShapeWhere, theShapeWhat):
# Example: see GEOM_TestOthers.py
anObj = self.ShapesOp.GetInPlace(theShapeWhere, theShapeWhat)
# building history of the ShapeWhere).
# @return Group of all found sub-shapes or a single found sub-shape.
#
- # @ref tui_todo "Example"
+ # @ref swig_GetInPlace "Example"
def GetInPlaceByHistory(self, theShapeWhere, theShapeWhat):
# Example: see GEOM_TestOthers.py
anObj = self.ShapesOp.GetInPlaceByHistory(theShapeWhere, theShapeWhat)
# @param theShapeWhat Shape, specifying what to find.
# @return New GEOM_Object for found sub-shape.
#
- # @ref tui_todo "Example"
+ # @ref swig_GetSame "Example"
def GetSame(self,theShapeWhere, theShapeWhat):
anObj = self.ShapesOp.GetSame(theShapeWhere, theShapeWhat)
RaiseIfFailed("GetSame", self.ShapesOp)
## Obtain a composite sub-shape of <VAR>aShape</VAR>, composed from sub-shapes
# of aShape, selected by their unique IDs inside <VAR>aShape</VAR>
#
- # @ref tui_todo "Example"
+ # @ref swig_all_decompose "Example"
def GetSubShape(self, aShape, ListOfID):
# Example: see GEOM_TestAll.py
anObj = self.AddSubShape(aShape,ListOfID)
## Obtain unique ID of sub-shape <VAR>aSubShape</VAR> inside <VAR>aShape</VAR>
#
- # @ref tui_todo "Example"
+ # @ref swig_all_decompose "Example"
def GetSubShapeID(self, aShape, aSubShape):
# Example: see GEOM_TestAll.py
anID = self.LocalOp.GetSubShapeIndex(aShape, aSubShape)
# end of l4_access
## @}
- ## @addtogroup l4_decompose Decompose objects
+ ## @addtogroup l4_decompose
## @{
## Explode a shape on subshapes of a given type.
# @param aType Type of sub-shapes to be retrieved.
# @return List of sub-shapes of type theShapeType, contained in theShape.
#
- # @ref tui_todo "Example"
+ # @ref swig_all_decompose "Example"
def SubShapeAll(self, aShape, aType):
# Example: see GEOM_TestAll.py
ListObj = self.ShapesOp.MakeExplode(aShape,aType,0)
# @param aType Type of sub-shapes to be retrieved.
# @return List of IDs of sub-shapes.
#
- # @ref tui_todo "Example"
+ # @ref swig_all_decompose "Example"
def SubShapeAllIDs(self, aShape, aType):
ListObj = self.ShapesOp.SubShapeAllIDs(aShape,aType,0)
RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
# @param aType Type of sub-shapes to be retrieved.
# @return List of sub-shapes of type theShapeType, contained in theShape.
#
- # @ref tui_working_with_groups_page "Example"
+ # @ref swig_SubShapeAllSorted "Example"
def SubShapeAllSorted(self, aShape, aType):
# Example: see GEOM_TestAll.py
ListObj = self.ShapesOp.MakeExplode(aShape,aType,1)
# @param aType Type of sub-shapes to be retrieved.
# @return List of IDs of sub-shapes.
#
- # @ref tui_todo "Example"
+ # @ref swig_all_decompose "Example"
def SubShapeAllSortedIDs(self, aShape, aType):
ListIDs = self.ShapesOp.SubShapeAllIDs(aShape,aType,1)
RaiseIfFailed("SubShapeAllIDs", self.ShapesOp)
# selected by they indices in list of all sub-shapes of type <VAR>aType</VAR>.
# Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
#
- # @ref tui_todo "Example"
+ # @ref swig_all_decompose "Example"
def SubShape(self, aShape, aType, ListOfInd):
# Example: see GEOM_TestAll.py
ListOfIDs = []
# selected by they indices in sorted list of all sub-shapes of type <VAR>aType</VAR>.
# Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
#
- # @ref tui_todo "Example"
+ # @ref swig_all_decompose "Example"
def SubShapeSorted(self,aShape, aType, ListOfInd):
# Example: see GEOM_TestAll.py
ListOfIDs = []
# @param theObject Shape to be processed.
# @update given shape
#
- # @ref tui_todo "Example"
+ # @ref swig_todo "Example"
def ChangeOrientationShell(self,theObject):
theObject = self.HealOp.ChangeOrientation(theObject)
RaiseIfFailed("ChangeOrientation", self.HealOp)
# @param theObject Shape to be processed.
# @return New GEOM_Object, containing processed shape.
#
- # @ref tui_todo "Example"
+ # @ref swig_todo "Example"
def ChangeOrientationShellCopy(self,theObject):
anObj = self.HealOp.ChangeOrientationCopy(theObject)
RaiseIfFailed("ChangeOrientationCopy", self.HealOp)
# which can be considered as coincident.
# @return ListOfGO.
#
- # @ref tui_todo "Example"
+ # @ref swig_todo "Example"
def GetGlueFaces(self, theShape, theTolerance):
# Example: see GEOM_Spanner.py
anObj = self.ShapesOp.GetGlueFaces(theShape, theTolerance)
# @return New GEOM_Object, containing a copy of theShape
# without some faces.
#
- # @ref tui_todo "Example"
+ # @ref swig_todo "Example"
def MakeGlueFacesByList(self, theShape, theTolerance, theFaces, doKeepNonSolids=True):
# Example: see GEOM_Spanner.py
anObj = self.ShapesOp.MakeGlueFacesByList(theShape, theTolerance, theFaces, doKeepNonSolids)
## Shortcut to MakeBoolean(s1, s2, 1)
#
- # @ref tui_common "Example"
+ # @ref tui_common "Example 1"
+ # \n @ref swig_MakeCommon "Example 2"
def MakeCommon(self, s1, s2):
# Example: see GEOM_TestOthers.py
return self.MakeBoolean(s1, s2, 1)
## Shortcut to MakeBoolean(s1, s2, 2)
#
- # @ref tui_cut "Example"
+ # @ref tui_cut "Example 1"
+ # \n @ref swig_MakeCommon "Example 2"
def MakeCut(self, s1, s2):
# Example: see GEOM_TestOthers.py
return self.MakeBoolean(s1, s2, 2)
## Shortcut to MakeBoolean(s1, s2, 3)
#
- # @ref tui_fuse "Example"
+ # @ref tui_fuse "Example 1"
+ # \n @ref swig_MakeCommon "Example 2"
def MakeFuse(self, s1, s2):
# Example: see GEOM_TestOthers.py
return self.MakeBoolean(s1, s2, 3)
## Shortcut to MakeBoolean(s1, s2, 4)
#
- # @ref tui_section "Example"
+ # @ref tui_section "Example 1"
+ # \n @ref swig_MakeCommon "Example 2"
def MakeSection(self, s1, s2):
# Example: see GEOM_TestOthers.py
return self.MakeBoolean(s1, s2, 4)
#
# @return New GEOM_Object, containing the result shapes.
#
- # @ref tui_todo "Example"
+ # @ref swig_todo "Example"
def MakePartitionNonSelfIntersectedShape(self, ListShapes, ListTools=[],
ListKeepInside=[], ListRemoveInside=[],
Limit=ShapeType["SHAPE"], RemoveWebs=0,
## Shortcut to MakePartition()
#
- # @ref tui_partition "Example"
+ # @ref tui_partition "Example 1"
+ # \n @ref swig_Partition "Example 2"
def Partition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
Limit=ShapeType["SHAPE"], RemoveWebs=0, ListMaterials=[],
KeepNonlimitShapes=0):
# @param thePoint2 End point of translation vector.
# @return New GEOM_Object, containing the translated object.
#
- # @ref tui_translation "Example"
+ # @ref tui_translation "Example 1"
+ # \n @ref swig_MakeTranslationTwoPoints "Example 2"
def MakeTranslationTwoPoints(self,theObject, thePoint1, thePoint2):
# Example: see GEOM_TestAll.py
anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2)
return anObj
## The same, as MultiRotate1D(), but axis is given by direction and point
+ # @ref swig_MakeMultiRotation "Example"
def MakeMultiRotation1D(self,aShape,aDir,aPoint,aNbTimes):
# Example: see GEOM_TestOthers.py
aVec = self.MakeLine(aPoint,aDir)
return anObj
## The same, as MultiRotate2D(), but axis is given by direction and point
+ # @ref swig_MakeMultiRotation "Example"
def MakeMultiRotation2D(self,aShape,aDir,aPoint,anAngle,nbtimes1,aStep,nbtimes2):
# Example: see GEOM_TestOthers.py
aVec = self.MakeLine(aPoint,aDir)
# @param theR Fillet radius.
# @return New GEOM_Object, containing the result shape.
#
- # @ref tui_fillet "Example"
+ # @ref tui_fillet "Example 1"
+ # \n @ref swig_MakeFilletAll "Example 2"
def MakeFilletAll(self,theShape, theR):
# Example: see GEOM_TestOthers.py
anObj = self.LocalOp.MakeFilletAll(theShape, theR)
# @param theD Chamfer size along each face.
# @return New GEOM_Object, containing the result shape.
#
- # @ref tui_chamfer "Example"
+ # @ref tui_chamfer "Example 1"
+ # \n @ref swig_MakeChamferAll "Example 2"
def MakeChamferAll(self,theShape, theD):
# Example: see GEOM_TestOthers.py
anObj = self.LocalOp.MakeChamferAll(theShape, theD)
RaiseIfFailed("MakeChamferEdge", self.LocalOp)
return anObj
- ## The Same that MakeChamferEdge but with params theD is chamfer lenght and
+ ## The Same that MakeChamferEdge but with params theD is chamfer length and
# theAngle is Angle of chamfer (angle in radians)
def MakeChamferEdgeAD(self, theShape, theD, theAngle, theFace1, theFace2):
anObj = self.LocalOp.MakeChamferEdgeAD(theShape, theD, theAngle, theFace1, theFace2)
## The Same that MakeChamferFaces but with params theD is chamfer lenght and
# theAngle is Angle of chamfer (angle in radians)
+ #
+ # @ref swig_FilletChamfer "Example"
def MakeChamferFacesAD(self, theShape, theD, theAngle, theFaces):
anObj = self.LocalOp.MakeChamferFacesAD(theShape, theD, theAngle, theFaces)
RaiseIfFailed("MakeChamferFacesAD", self.LocalOp)
# @param theEdges Sequence of edges of \a theShape.
# @return New GEOM_Object, containing the result shape.
#
- # @ref tui_todo "Example"
+ # @ref swig_FilletChamfer "Example"
def MakeChamferEdges(self, theShape, theD1, theD2, theEdges):
anObj = self.LocalOp.MakeChamferEdges(theShape, theD1, theD2, theEdges)
RaiseIfFailed("MakeChamferEdges", self.LocalOp)
## The Same that MakeChamferEdges but with params theD is chamfer lenght and
# theAngle is Angle of chamfer (angle in radians)
- #
- # @ref tui_todo "Example"
def MakeChamferEdgesAD(self, theShape, theD, theAngle, theEdges):
anObj = self.LocalOp.MakeChamferEdgesAD(theShape, theD, theAngle, theEdges)
RaiseIfFailed("MakeChamferEdgesAD", self.LocalOp)
return anObj
## Shortcut to MakeChamferEdge() and MakeChamferFaces()
+ #
+ # @ref swig_MakeChamfer "Example"
def MakeChamfer(self,aShape,d1,d2,aShapeType,ListShape):
# Example: see GEOM_TestOthers.py
anObj = None
# @param theShape1,theShape2 Shapes to find minimal distance between.
# @return Value of the minimal distance between the given shapes.
#
- # @ref tui_todo "Example"
+ # @ref swig_all_measure "Example"
def MinDistanceComponents(self, theShape1, theShape2):
# Example: see GEOM_TestMeasures.py
aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
## @{
## Measure curvature of a curve at a point, set by parameter.
- # @ref tui_todo "Example"
+ # @ref swig_todo "Example"
def CurveCurvatureByParam(self, theCurve, theParam):
# Example: see GEOM_TestMeasures.py
aCurv = self.MeasuOp.CurveCurvatureByParam(theCurve,theParam)
return aCurv
## @details
- # @ref tui_todo "Example"
+ # @ref swig_todo "Example"
def CurveCurvatureByPoint(self, theCurve, thePoint):
aCurv = self.MeasuOp.CurveCurvatureByPoint(theCurve,thePoint)
RaiseIfFailed("CurveCurvatureByPoint", self.MeasuOp)
## @{
## @details
- ## @ref tui_todo "Example"
+ ## @ref swig_todo "Example"
def MaxSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
# Example: see GEOM_TestMeasures.py
aSurf = self.MeasuOp.MaxSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
return aSurf
## @details
- ## @ref tui_todo "Example"
+ ## @ref swig_todo "Example"
def MaxSurfaceCurvatureByPoint(self, theSurf, thePoint):
aSurf = self.MeasuOp.MaxSurfaceCurvatureByPoint(theSurf,thePoint)
RaiseIfFailed("MaxSurfaceCurvatureByPoint", self.MeasuOp)
return aSurf
## @details
- ## @ref tui_todo "Example"
+ ## @ref swig_todo "Example"
def MinSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
aSurf = self.MeasuOp.MinSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
RaiseIfFailed("MinSurfaceCurvatureByParam", self.MeasuOp)
return aSurf
## @details
- ## @ref tui_todo "Example"
+ ## @ref swig_todo "Example"
def MinSurfaceCurvatureByPoint(self, theSurf, thePoint):
aSurf = self.MeasuOp.MinSurfaceCurvatureByPoint(theSurf,thePoint)
RaiseIfFailed("MinSurfaceCurvatureByPoint", self.MeasuOp)
# @param theOptionalPoint Point to compute the normale at.
# @return New GEOM_Object, containing the created vector.
#
- # @ref tui_todo "Example"
+ # @ref swig_todo "Example"
def GetNormal(self, theFace, theOptionalPoint = None):
# Example: see GEOM_TestMeasures.py
anObj = self.MeasuOp.GetNormal(theFace, theOptionalPoint)
# Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
# Xx,Xy,Xz: Coordinates of shape's LCS X direction.
#
- # @ref tui_todo "Example"
+ # @ref swig_todo "Example"
def GetPosition(self,theShape):
# Example: see GEOM_TestMeasures.py
aTuple = self.MeasuOp.GetPosition(theShape)
#
# - geompy.kind.VERTEX x y z
#
- # @ref tui_todo "Example"
+ # @ref swig_todo "Example"
def KindOfShape(self,theShape):
# Example: see GEOM_TestMeasures.py
aRoughTuple = self.MeasuOp.KindOfShape(theShape)
# Available formats can be obtained with InsertOp.ImportTranslators() method.
# @return New GEOM_Object, containing the imported shape.
#
- # @ref tui_todo "Example"
+ # @ref swig_Import_Export "Example"
def Import(self,theFileName, theFormatName):
# Example: see GEOM_TestOthers.py
anObj = self.InsertOp.Import(theFileName, theFormatName)
## Shortcut to Import() for BREP format
#
- # @ref tui_todo "Example"
+ # @ref swig_Import_Export "Example"
def ImportBREP(self,theFileName):
# Example: see GEOM_TestOthers.py
return self.Import(theFileName, "BREP")
## Shortcut to Import() for IGES format
#
- # @ref tui_todo "Example"
+ # @ref swig_Import_Export "Example"
def ImportIGES(self,theFileName):
# Example: see GEOM_TestOthers.py
return self.Import(theFileName, "IGES")
## Shortcut to Import() for STEP format
#
- # @ref tui_todo "Example"
+ # @ref swig_Import_Export "Example"
def ImportSTEP(self,theFileName):
# Example: see GEOM_TestOthers.py
return self.Import(theFileName, "STEP")
# @param theFormatName Specify format for the shape storage.
# Available formats can be obtained with InsertOp.ImportTranslators() method.
#
- # @ref tui_todo "Example"
+ # @ref swig_Import_Export "Example"
def Export(self,theObject, theFileName, theFormatName):
# Example: see GEOM_TestOthers.py
self.InsertOp.Export(theObject, theFileName, theFormatName)
## Shortcut to Export() for BREP format
#
- # @ref tui_todo "Example"
+ # @ref swig_Import_Export "Example"
def ExportBREP(self,theObject, theFileName):
# Example: see GEOM_TestOthers.py
return self.Export(theObject, theFileName, "BREP")
## Shortcut to Export() for IGES format
#
- # @ref tui_todo "Example"
+ # @ref swig_Import_Export "Example"
def ExportIGES(self,theObject, theFileName):
# Example: see GEOM_TestOthers.py
return self.Export(theObject, theFileName, "IGES")
## Shortcut to Export() for STEP format
#
- # @ref tui_todo "Example"
+ # @ref swig_Import_Export "Example"
def ExportSTEP(self,theObject, theFileName):
# Example: see GEOM_TestOthers.py
return self.Export(theObject, theFileName, "STEP")
# @param V1,V2,V3,V4 Corner vertices for the face.
# @return New GEOM_Object, containing the created face.
#
- # @ref tui_building_by_blocks_page "Example"
+ # @ref tui_building_by_blocks_page "Example 1"
+ # \n @ref swig_MakeQuad4Vertices "Example 2"
def MakeQuad4Vertices(self,V1, V2, V3, V4):
# Example: see GEOM_Spanner.py
anObj = self.BlocksOp.MakeQuad4Vertices(V1, V2, V3, V4)
# @param F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
# @return New GEOM_Object, containing the created solid.
#
- # @ref tui_building_by_blocks_page "Example"
+ # @ref tui_building_by_blocks_page "Example 1"
+ # \n @ref swig_MakeHexa "Example 2"
def MakeHexa(self,F1, F2, F3, F4, F5, F6):
# Example: see GEOM_Spanner.py
anObj = self.BlocksOp.MakeHexa(F1, F2, F3, F4, F5, F6)
# @param F1,F2 Two opposite faces for the hexahedral solid.
# @return New GEOM_Object, containing the created solid.
#
- # @ref tui_building_by_blocks_page "Example"
+ # @ref tui_building_by_blocks_page "Example 1"
+ # \n @ref swig_MakeHexa2Faces "Example 2"
def MakeHexa2Faces(self,F1, F2):
# Example: see GEOM_Spanner.py
anObj = self.BlocksOp.MakeHexa2Faces(F1, F2)
# vertex and point with the given coordinates.
# @return New GEOM_Object, containing the found vertex.
#
- # @ref tui_todo "Example"
+ # @ref swig_GetPoint "Example"
def GetPoint(self,theShape, theX, theY, theZ, theEpsilon):
# Example: see GEOM_TestOthers.py
anObj = self.BlocksOp.GetPoint(theShape, theX, theY, theZ, theEpsilon)
# @param thePoint1,thePoint2 Points, close to the ends of the desired edge.
# @return New GEOM_Object, containing the found edge.
#
- # @ref tui_todo "Example"
+ # @ref swig_todo "Example"
def GetEdge(self,theShape, thePoint1, thePoint2):
# Example: see GEOM_Spanner.py
anObj = self.BlocksOp.GetEdge(theShape, thePoint1, thePoint2)
# @param thePoint Point, close to the desired edge.
# @return New GEOM_Object, containing the found edge.
#
- # @ref tui_todo "Example"
+ # @ref swig_GetEdgeNearPoint "Example"
def GetEdgeNearPoint(self,theShape, thePoint):
# Example: see GEOM_TestOthers.py
anObj = self.BlocksOp.GetEdgeNearPoint(theShape, thePoint)
# @param thePoint1,thePoint2,thePoint3,thePoint4 Points, close to the corners of the desired face.
# @return New GEOM_Object, containing the found face.
#
- # @ref tui_todo "Example"
+ # @ref swig_todo "Example"
def GetFaceByPoints(self,theShape, thePoint1, thePoint2, thePoint3, thePoint4):
# Example: see GEOM_Spanner.py
anObj = self.BlocksOp.GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4)
# @param theEdge1,theEdge2 Edges, close to the edges of the desired face.
# @return New GEOM_Object, containing the found face.
#
- # @ref tui_todo "Example"
+ # @ref swig_todo "Example"
def GetFaceByEdges(self,theShape, theEdge1, theEdge2):
# Example: see GEOM_Spanner.py
anObj = self.BlocksOp.GetFaceByEdges(theShape, theEdge1, theEdge2)
# @param theFace Face of \a theBlock, opposite to the desired face.
# @return New GEOM_Object, containing the found face.
#
- # @ref tui_todo "Example"
+ # @ref swig_GetOppositeFace "Example"
def GetOppositeFace(self,theBlock, theFace):
# Example: see GEOM_Spanner.py
anObj = self.BlocksOp.GetOppositeFace(theBlock, theFace)
# @param thePoint Point, close to the desired face.
# @return New GEOM_Object, containing the found face.
#
- # @ref tui_todo "Example"
+ # @ref swig_GetFaceNearPoint "Example"
def GetFaceNearPoint(self,theShape, thePoint):
# Example: see GEOM_Spanner.py
anObj = self.BlocksOp.GetFaceNearPoint(theShape, thePoint)
# @param theVector Vector, close to the normale of the desired face.
# @return New GEOM_Object, containing the found face.
#
- # @ref tui_todo "Example"
+ # @ref swig_todo "Example"
def GetFaceByNormale(self, theBlock, theVector):
# Example: see GEOM_Spanner.py
anObj = self.BlocksOp.GetFaceByNormale(theBlock, theVector)
# @return TRUE, if the given shape is a compound of blocks.
# If theCompound is not valid, prints all discovered errors.
#
- # @ref tui_measurement_tools_page "Example"
+ # @ref tui_measurement_tools_page "Example 1"
+ # \n @ref swig_CheckCompoundOfBlocks "Example 2"
def CheckCompoundOfBlocks(self,theCompound):
# Example: see GEOM_Spanner.py
(IsValid, BCErrors) = self.BlocksOp.CheckCompoundOfBlocks(theCompound)
# @param theShape The compound or single solid to remove irregular edges from.
# @return Improved shape.
#
- # @ref tui_todo "Example"
+ # @ref swig_RemoveExtraEdges "Example"
def RemoveExtraEdges(self,theShape):
# Example: see GEOM_TestOthers.py
anObj = self.BlocksOp.RemoveExtraEdges(theShape)
# @param theShape The compound to check and improve.
# @return Improved compound.
#
- # @ref tui_todo "Example"
+ # @ref swig_CheckAndImprove "Example"
def CheckAndImprove(self,theShape):
# Example: see GEOM_TestOthers.py
anObj = self.BlocksOp.CheckAndImprove(theShape)
# \note If theMaxNbFaces = 0, the maximum number of faces is not restricted.
# @return List of GEOM_Objects, containing the retrieved blocks.
#
- # @ref tui_explode_on_blocks "Example"
+ # @ref tui_explode_on_blocks "Example 1"
+ # \n @ref swig_MakeBlockExplode "Example 2"
def MakeBlockExplode(self,theCompound, theMinNbFaces, theMaxNbFaces):
# Example: see GEOM_TestOthers.py
aList = self.BlocksOp.ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces)
# boundary between some blocks, we return block with nearest center.
# @return New GEOM_Object, containing the found block.
#
- # @ref tui_todo "Example"
+ # @ref swig_todo "Example"
def GetBlockNearPoint(self,theCompound, thePoint):
# Example: see GEOM_Spanner.py
anObj = self.BlocksOp.GetBlockNearPoint(theCompound, thePoint)
# @param theParts List of faces and/or edges and/or vertices to be parts of the found block.
# @return New GEOM_Object, containing the found block.
#
- # @ref tui_todo "Example"
+ # @ref swig_GetBlockByParts "Example"
def GetBlockByParts(self,theCompound, theParts):
# Example: see GEOM_TestOthers.py
anObj = self.BlocksOp.GetBlockByParts(theCompound, theParts)
# @param theParts List of faces and/or edges and/or vertices to be parts of the found blocks.
# @return List of GEOM_Objects, containing the found blocks.
#
- # @ref tui_todo "Example"
+ # @ref swig_todo "Example"
def GetBlocksByParts(self,theCompound, theParts):
# Example: see GEOM_Spanner.py
aList = self.BlocksOp.GetBlocksByParts(theCompound, theParts)
# @param theShape Shape to build propagation groups on.
# @return List of GEOM_Objects, each of them is a propagation group.
#
- # @ref tui_propagate "Example"
+ # @ref swig_Propagate "Example"
def Propagate(self,theShape):
# Example: see GEOM_TestOthers.py
listChains = self.BlocksOp.Propagate(theShape)
# @param theShapeType defines a shape type of the group
# @return a newly created GEOM group
#
- # @ref tui_working_with_groups_page "Example"
+ # @ref tui_working_with_groups_page "Example 1"
+ # \n @ref swig_CreateGroup "Example 2"
def CreateGroup(self,theMainShape, theShapeType):
# Example: see GEOM_TestOthers.py
anObj = self.GroupOp.CreateGroup(theMainShape, theShapeType)
## Works like the above method, but argument
# theSubShapes here is a list of sub-shapes indices
#
- # @ref tui_todo "Example"
+ # @ref swig_UnionIDs "Example"
def UnionIDs(self,theGroup, theSubShapes):
# Example: see GEOM_TestOthers.py
self.GroupOp.UnionIDs(theGroup, theSubShapes)
## Works like the above method, but argument
# theSubShapes here is a list of sub-shapes indices
#
- # @ref tui_todo "Example"
+ # @ref swig_DifferenceIDs "Example"
def DifferenceIDs(self,theGroup, theSubShapes):
# Example: see GEOM_TestOthers.py
self.GroupOp.DifferenceIDs(theGroup, theSubShapes)
## Returns a list of sub objects ID stored in the group
# @param theGroup is a GEOM group for which a list of IDs is requested
#
- # @ref tui_todo "Example"
+ # @ref swig_GetObjectIDs "Example"
def GetObjectIDs(self,theGroup):
# Example: see GEOM_TestOthers.py
ListIDs = self.GroupOp.GetObjects(theGroup)
## Returns a type of sub objects stored in the group
# @param theGroup is a GEOM group which type is returned.
#
- # @ref tui_todo "Example"
+ # @ref swig_GetType "Example"
def GetType(self,theGroup):
# Example: see GEOM_TestOthers.py
aType = self.GroupOp.GetType(theGroup)
# @param theGroup is a GEOM group for which a main shape object is requested
# @return a GEOM object which is a main shape for theGroup
#
- # @ref tui_todo "Example"
+ # @ref swig_GetMainShape "Example"
def GetMainShape(self,theGroup):
# Example: see GEOM_TestOthers.py
anObj = self.GroupOp.GetMainShape(theGroup)
## Create group of edges of theShape, whose length is in range [min_length, max_length].
# If include_min/max == 0, edges with length == min/max_length will not be included in result.
#
- # @ref tui_todo "Example"
+ # @ref swig_todo "Example"
def GetEdgesByLength (self, theShape, min_length, max_length, include_min = 1, include_max = 1):
edges = self.SubShapeAll(theShape, ShapeType["EDGE"])
edges_in_range = []
## Create group of edges of selected shape, whose length is in range [min_length, max_length].
# If include_min/max == 0, edges with length == min/max_length will not be included in result.
#
- # @ref tui_todo "Example"
+ # @ref swig_todo "Example"
def SelectEdges (self, min_length, max_length, include_min = 1, include_max = 1):
nb_selected = sg.SelectedCount()
if nb_selected < 1:
## Create a copy of the given object
# @ingroup l1_geompy_auxiliary
#
- # @ref tui_todo "Example"
+ # @ref swig_all_advanced "Example"
def MakeCopy(self,theOriginal):
# Example: see GEOM_TestAll.py
anObj = self.InsertOp.MakeCopy(theOriginal)