X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=doc%2Fsalome%2Fgui%2FGEOM%2Finput%2Ftui_basic_geom_objs.doc;h=5e1f733128b81a9643d67209b1c41b3ba834e5d1;hb=0f8fc7e029e6e4a3cb9380bef51f77253951cd76;hp=f3671425679cbe52ec84973db1b3090c988a09fa;hpb=522b8bee2266d0688108a4e7084ec857385212f4;p=modules%2Fgeom.git diff --git a/doc/salome/gui/GEOM/input/tui_basic_geom_objs.doc b/doc/salome/gui/GEOM/input/tui_basic_geom_objs.doc index f36714256..5e1f73312 100644 --- a/doc/salome/gui/GEOM/input/tui_basic_geom_objs.doc +++ b/doc/salome/gui/GEOM/input/tui_basic_geom_objs.doc @@ -17,9 +17,19 @@ px = geompy.MakeVertex(100., 0., 0.) py = geompy.MakeVertex(0., 100., 0.) pz = geompy.MakeVertex(0., 0., 100.) -# create a curve and a vertex on it +# create a curve and a vertices on it Arc = geompy.MakeArc(py, pz, px) +# create vertex by parameter p_on_arc = geompy.MakeVertexOnCurve(Arc, 0.25) +#create vertex by point projection +p_on_arc2 = geompy.MakeVertexOnCurveByCoord(Arc, 100, -10, 10) + +# create a face and vertices on it +Add_line = geompy.MakeLineTwoPnt(px, py) +arc_face = geompy.MakeFaceWires([Arc, Add_line], 1) +p_on_face1 = geompy.MakeVertexOnSurface(arc_face, 0.5, 0.5) +p_on_face2 = geompy.MakeVertexOnSurfaceByCoord(Face_1, 35, 35, 35) + # add objects in the study id_p0 = geompy.addToStudy(p0, "Vertex 0") @@ -28,7 +38,10 @@ id_px = geompy.addToStudy(px, "Vertex X") id_py = geompy.addToStudy(py, "Vertex Y") id_pz = geompy.addToStudy(pz, "Vertex Z") id_Arc = geompy.addToStudy(Arc, "Arc") -id_p_on_arc = geompy.addToStudy(p_on_arc, "Vertex on Arc") +id_p_on_arc = geompy.addToStudy(p_on_arc, "Vertex on Arc by parameter") +id_p_on_arc2 = geompy.addToStudy(p_on_arc, "Vertex on Arc by point projection") +id_p_on_face1 = geompy.addToStudy(p_on_face1, "Vertex on face by parameter") +id_p_on_face2 = geompy.addToStudy(p_on_face2, "Vertex on face by point projection") # display vertices gg.createAndDisplayGO(id_p0) @@ -332,4 +345,45 @@ gg.setDisplayMode(id_plane5,1) gg.setTransparency(id_plane5,0.5) \endcode +\anchor tui_creation_lcs +

Creation of a Local Coordinate System

+\code +import GEOM +import geompy +import math +import SALOMEDS + +#Create vertexes, vectors and shapes to construct local CS +Vertex_1 = geompy.MakeVertex(50, 50, 50) +Vertex_2 = geompy.MakeVertex(70, 70, 70) +Vertex_3 = geompy.MakeVertex(0, 0, 0) +Vector_X = geompy.MakeVectorDXDYDZ(50, 0, 0) +Vector_Y = geompy.MakeVectorDXDYDZ(0, 50, 0) +Face_1 = geompy.MakeFaceHW(100, 100, 1) +Box_1 = geompy.MakeBoxTwoPnt(Vertex_1, Vertex_2) + +#Construct local CS by manual definition +LocalCS_1 = geompy.MakeMarker(0, 0, 0, 1, 0, 0, 0, 1, 0) + +#Construct local CS by center point and two vectors (X and Y directions) +LocalCS_2 = geompy.MakeMarkerPntTwoVec(Vertex_3, Vector_X, Vector_Y) + +#Construct local CS from shape orientation +LocalCS_FACE = geompy.MakeMarkerFromShape(Face_1) +LocalCS_BOX = geompy.MakeMarkerFromShape(Box_1) + +#Add created object to study +geompy.addToStudy( Face_1, "Face_1" ) +geompy.addToStudy( Vertex_1, "Vertex_1" ) +geompy.addToStudy( Vertex_2, "Vertex_2" ) +geompy.addToStudy( Box_1, "Box_1" ) +geompy.addToStudy( Vertex_3, "Vertex_3" ) +geompy.addToStudy( Vector_X, "Vector_X" ) +geompy.addToStudy( Vector_Y, "Vector_Y" ) +geompy.addToStudy( LocalCS_1, "LocalCS_1" ) +geompy.addToStudy( LocalCS_2, "LocalCS_3" ) +geompy.addToStudy( LocalCS_FACE, "LocalCS_FACE" ) +geompy.addToStudy( LocalCS_BOX, "LocalCS_BOX" ) +\endcode + */