mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-11-15 10:08:35 +05:00
0020327: EDF 1018 GEOM : Missing MakeTangentPlaneOnFace in geompy
This commit is contained in:
parent
19bf0c8c6a
commit
687fb51a2e
@ -33,7 +33,6 @@ provided by Geometry module.
|
||||
<li>\ref tui_repairing_operations_page</li>
|
||||
</ul>
|
||||
<li>\subpage tui_measurement_tools_page</li>
|
||||
<li>\subpage tui_3dsketcher_page</li>
|
||||
<li>\subpage tui_swig_examples_page</li>
|
||||
<ul>
|
||||
<li>\ref tui_test_others_page</li>
|
||||
|
@ -623,4 +623,31 @@ from math import pi
|
||||
spring = MakeSpring(50, 100, 2*pi, 1, 5, pi/2)
|
||||
\endcode
|
||||
|
||||
<br><h2>Creation of Tangent Plane On Face</h2>
|
||||
\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
|
||||
|
||||
|
||||
*/
|
||||
|
@ -29,6 +29,9 @@
|
||||
\anchor swig_MakeTangentOnCurve
|
||||
\until tan_on_arc
|
||||
|
||||
\anchor swig_MakeTangentPlaneOnFace
|
||||
\until tan_on_face
|
||||
|
||||
\until MakeCompound
|
||||
|
||||
\anchor swig_MakeVertexOnSurface
|
||||
|
@ -112,6 +112,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.MakePrismDXDYDZ(tan_curve, 0, 30, -60)
|
||||
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
|
||||
@ -311,7 +320,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")
|
||||
|
Loading…
Reference in New Issue
Block a user