X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=doc%2Fsalome%2Fgui%2FGEOM%2Finput%2Ftui_transformation_operations.doc;h=09744cddfffe8d8ebc4365e0fcfd605bbff59b04;hb=00621ab4f35ece96476fc358acf598d78ec0a95d;hp=a05846a7904dd23e791f754c2b1332d3aa6936e6;hpb=239f8109c64fa0c5a2e1d87a420bad5529b57f48;p=modules%2Fgeom.git
diff --git a/doc/salome/gui/GEOM/input/tui_transformation_operations.doc b/doc/salome/gui/GEOM/input/tui_transformation_operations.doc
index a05846a79..09744cddf 100644
--- a/doc/salome/gui/GEOM/input/tui_transformation_operations.doc
+++ b/doc/salome/gui/GEOM/input/tui_transformation_operations.doc
@@ -27,12 +27,14 @@ cylinder = geompy.MakeCylinder(p1, v, radius1, height)
translation1 = geompy.MakeTranslationTwoPoints(cylinder, p1, p3)
translation2 = geompy.MakeTranslation(cylinder, 40, 40, 0)
translation3 = geompy.MakeTranslationVector(cylinder, vt)
+translation4 = geompy.MakeTranslationVectorDistance(cylinder, vt, 200)
# add objects in the study
id_cylinder = geompy.addToStudy(cylinder, "Cylinder")
id_translation1 = geompy.addToStudy(translation1, "Translation1")
id_translation2 = geompy.addToStudy(translation2, "Translation2")
id_translation3 = geompy.addToStudy(translation3, "Translation3")
+id_translation4 = geompy.addToStudy(translation4, "Translation4")
# display the results
gg.createAndDisplayGO(id_cylinder)
@@ -43,6 +45,8 @@ gg.createAndDisplayGO(id_translation2)
gg.setDisplayMode(id_translation2,1)
gg.createAndDisplayGO(id_translation3)
gg.setDisplayMode(id_translation3,1)
+gg.createAndDisplayGO(id_translation4)
+gg.setDisplayMode(id_translation4,1)
\endcode
\anchor tui_rotation
@@ -111,6 +115,7 @@ v = geompy.MakeVector(p1, p2)
height = 35
radius1 = 20
cylinder = geompy.MakeCylinder(p1, v, radius1, height)
+circle = geompy.MakeCircle(p2, v, radius1)
# create local coordinate systems
cs1 = geompy.MakeMarker( 0, 0, 0, 1,0,0, 0,1,0)
@@ -118,18 +123,25 @@ cs2 = geompy.MakeMarker(30,40,40, 1,0,0, 0,1,0)
# modify the location of the given object
position = geompy.MakePosition(cylinder, cs1, cs2)
+position2 = geompy.PositionAlongPath(position, circle, 0.75, 1, 1)
# add objects in the study
id_cs1 = geompy.addToStudy(cs1, "Coordinate system 1")
id_cs2 = geompy.addToStudy(cs2, "Coordinate system 2")
id_cylinder = geompy.addToStudy(cylinder, "Cylinder")
+id_circle = geompy.addToStudy(circle, "Circle")
id_position = geompy.addToStudy(position, "Position")
+id_position2 = geompy.addToStudy(position2, "PositionAlongPath")
# display the results
gg.createAndDisplayGO(id_cylinder)
gg.setDisplayMode(id_cylinder,1)
gg.createAndDisplayGO(id_position)
gg.setDisplayMode(id_position,1)
+gg.createAndDisplayGO(id_circle)
+gg.setDisplayMode(id_circle,1)
+gg.createAndDisplayGO(id_position2)
+gg.setDisplayMode(id_position2,1)
\endcode
\anchor tui_mirror
@@ -234,6 +246,41 @@ gg.setDisplayMode(id_box,1)
gg.createAndDisplayGO(id_offset)
\endcode
+\anchor tui_projection
+
Projection
+
+\code
+import geompy
+import salome
+
+# create a cylindric face and a curve(edge)
+cylinder = geompy.MakeCylinderRH(100, 300)
+[face_cyl] = geompy.SubShapes(cylinder, [3])
+
+p1 = geompy.MakeVertex(200, 0, 100)
+p2 = geompy.MakeVertex(200, 80, 100)
+p3 = geompy.MakeVertex(200, 80, 180)
+p4 = geompy.MakeVertex(130, 80, 180)
+p5 = geompy.MakeVertex(90, 80, 240)
+
+curve = geompy.MakeInterpol([p1, p2, p3, p4, p5], False, False)
+
+# create a new object as projection of the
+# given curve on the given cylindric face
+projection = geompy.MakeProjection(curve, face_cyl)
+
+# add objects in the study
+geompy.addToStudy(cylinder, "cylinder")
+geompy.addToStudyInFather(cylinder, face_cyl, "face_cyl")
+geompy.addToStudy(p1, "p1")
+geompy.addToStudy(p2, "p2")
+geompy.addToStudy(p3, "p3")
+geompy.addToStudy(p4, "p4")
+geompy.addToStudy(p5, "p5")
+geompy.addToStudy(curve, "curve")
+geompy.addToStudy(projection, "projection")
+\endcode
+
\anchor tui_multi_translation
Multi Translation
@@ -337,6 +384,50 @@ gg.createAndDisplayGO(id_rot2d)
gg.setDisplayMode(id_rot2d,1)
\endcode
+\anchor tui_fillet2d
+
Fillet 2D
+
+\code
+import geompy
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+
+# create a face in OXY plane
+face = geompy.MakeFaceHW(100, 100, 1)
+fillet2d = geompy.MakeFillet2D(face, 30, [7, 9])
+
+# add objects in the study
+id_face = geompy.addToStudy(face,"Face_1")
+id_fillet2d = geompy.addToStudy(fillet2d,"Fillet 2D_1")
+
+# display disks
+gg.createAndDisplayGO(id_face)
+gg.createAndDisplayGO(id_fillet2d)
+\endcode
+
+\anchor tui_fillet1d
+
Fillet 1D
+
+\code
+import geompy
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+
+# create box
+Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
+# take box edges to create custom complex wire
+[Edge_1,Edge_2,Edge_3,Edge_4,Edge_5,Edge_6,Edge_7,Edge_8,Edge_9,Edge_10,Edge_11,Edge_12] = geompy.SubShapeAllSortedCentres(Box_1, geompy.ShapeType["EDGE"])
+# create wire
+Wire_1 = geompy.MakeWire([Edge_12, Edge_7, Edge_11, Edge_6, Edge_1,Edge_4])
+# make fillet at given wire vertices with giver radius
+Fillet_1D_1 = geompy.MakeFillet1D(Wire_1, 55, [3, 4, 6, 8, 10])
+
+
+# display disks
+gg.createAndDisplayGO(Wire_1)
+gg.createAndDisplayGO(Fillet_1D_1)
+\endcode
+
\anchor tui_fillet
Fillet
@@ -368,7 +459,7 @@ face = geompy.MakeFace(wire, 1)
prism = geompy.MakePrismVecH(face, vz, 100.0)
# get the list of IDs (IDList) for the fillet
-prism_edges = geompy.SubShapeAllSorted(prism, ShapeTypeEdge)
+prism_edges = geompy.SubShapeAllSortedCentres(prism, ShapeTypeEdge)
IDlist_e = []
IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
@@ -426,7 +517,7 @@ face = geompy.MakeFace(wire, 1)
prism = geompy.MakePrismVecH(face, vz, 100.0)
# get the list of IDs (IDList) for the chamfer
-prism_faces = geompy.SubShapeAllSorted(prism, ShapeTypeFace)
+prism_faces = geompy.SubShapeAllSortedCentres(prism, ShapeTypeFace)
f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
IDlist_f = [f_ind_1, f_ind_2]
@@ -461,4 +552,4 @@ gg.createAndDisplayGO(id_chamfer_all)
gg.setDisplayMode(id_chamfer_all,1)
\endcode
-*/
\ No newline at end of file
+*/