From 563636748210ee5a25d715435a871af82fb7df55 Mon Sep 17 00:00:00 2001 From: dmv Date: Wed, 29 Apr 2009 06:23:47 +0000 Subject: [PATCH] 0020327: EDF 1018 GEOM : Missing MakeTangentPlaneOnFace in geompy --- .../gui/GEOM/input/tui_complex_objs.doc | 26 +++++++++++++++++++ doc/salome/gui/GEOM/input/tui_test_all.doc | 3 +++ src/GEOM_SWIG/GEOM_TestAll.py | 12 ++++++++- 3 files changed, 40 insertions(+), 1 deletion(-) diff --git a/doc/salome/gui/GEOM/input/tui_complex_objs.doc b/doc/salome/gui/GEOM/input/tui_complex_objs.doc index 254846e07..183c72a8e 100644 --- a/doc/salome/gui/GEOM/input/tui_complex_objs.doc +++ b/doc/salome/gui/GEOM/input/tui_complex_objs.doc @@ -623,4 +623,30 @@ from math import pi spring = MakeSpring(50, 100, 2*pi, 1, 5, pi/2) \endcode +

Creation of Tangent Plane On Face

+\code +import salome +import geompy + + # Create Vertexes for curve + Vertex_1 = geompy.MakeVertex(0, 0, 0) + Vertex_2 = geompy.MakeVertex(0, 90, 30) + Vertex_3 = geompy.MakeVertex(100, 90, 0) + Vertex_4 = geompy.MakeVertex(-100, 90, 0) + # Create curve + Curve_1 = geompy.MakeInterpol([Vertex_4, Vertex_2, Vertex_3, Vertex_1]) + # Create Face by Extrusion of the Curve + Extrusion_1 = geompy.MakePrismDXDYDZ(Curve_1, 0, 30, -60) + # Make Tangent on this Extrusion (Face) + Tangent_1 = geompy.MakeTangentPlaneOnFace(Extrusion_1, 0.7, 0.5, 150) + # Publish in the study + geompy.addToStudy( Vertex_1, "Vertex_1" ) + geompy.addToStudy( Vertex_2, "Vertex_2" ) + geompy.addToStudy( Vertex_3, "Vertex_3" ) + geompy.addToStudy( Vertex_4, "Vertex_4" ) + geompy.addToStudy( Curve_1, "Curve_1" ) + geompy.addToStudy( Extrusion_1, "Extrusion_1" ) + geompy.addToStudy( Tangent_1, "Tangent_1" ) +\endcode + */ diff --git a/doc/salome/gui/GEOM/input/tui_test_all.doc b/doc/salome/gui/GEOM/input/tui_test_all.doc index caeae7be8..4570a965a 100644 --- a/doc/salome/gui/GEOM/input/tui_test_all.doc +++ b/doc/salome/gui/GEOM/input/tui_test_all.doc @@ -29,6 +29,9 @@ \anchor swig_MakeTangentOnCurve \until tan_on_arc +\anchor swig_MakeTangentPlaneOnFace +\until tan_on_face + \until MakeCompound \anchor swig_MakeVertexOnSurface diff --git a/src/GEOM_SWIG/GEOM_TestAll.py b/src/GEOM_SWIG/GEOM_TestAll.py index 3610dde3b..a37fa0502 100644 --- a/src/GEOM_SWIG/GEOM_TestAll.py +++ b/src/GEOM_SWIG/GEOM_TestAll.py @@ -110,6 +110,15 @@ def TestAll (geompy, math): #Test tangent on curve creation tan_on_arc = geompy.MakeTangentOnCurve(Arc, 0.7) #(GEOM_Object_ptr, Double)->GEOM_Object_ptr + + #Test tangent on face creation + tan_vertex_1 = geompy.MakeVertex(0, 0, 0) + tan_vertex_2 = geompy.MakeVertex(0, 90, 30) + tan_vertex_3 = geompy.MakeVertex(100, 90, 0) + tan_vertex_4 = geompy.MakeVertex(-100, 90, 0) + tan_curve = geompy.MakeInterpol([tan_vertex_4, tan_vertex_2, tan_vertex_3, tan_vertex_1]) + tan_extrusion = geompy.MakePrism(tan_curve, tan_vertex_1, tan_vertex_4) + tan_on_face = geompy.MakeTangentPlaneOnFace(tan_extrusion, 0.7, 0.5, 150) #Create base geometry 3D Box = geompy.MakeBoxTwoPnt(p0, p200) #(2 GEOM_Object_ptr)->GEOM_Object_ptr @@ -297,7 +306,8 @@ def TestAll (geompy, math): id_p_on_arc = geompy.addToStudy(p_on_arc, "Vertex on Arc (0.25)") id_p_on_l1l2 = geompy.addToStudy(p_on_l1l2, "Vertex on Lines Intersection") - id_tan_on_arc = geompy.addToStudy(tan_on_arc, "Tangent on Arc (0.7)") + id_tan_on_arc = geompy.addToStudy(tan_on_arc, "Tangent on Arc (0.7)") + id_tan_on_face = geompy.addToStudy(tan_on_face, "Tangent on Face") id_Box = geompy.addToStudy(Box, "Box") id_Box1 = geompy.addToStudy(Box1, "Box 10x20x30") -- 2.39.2