From: gdd Date: Thu, 30 Aug 2012 08:33:36 +0000 (+0000) Subject: CTN: EDF 1729 SMESH : Example of a script using Projection1D2D => Update documentation X-Git-Tag: V6_6_0a1~165 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3058574b87b8ba4ff4893c0ef7a7c64ff44d65ce;p=modules%2Fsmesh.git CTN: EDF 1729 SMESH : Example of a script using Projection1D2D => Update documentation --- diff --git a/doc/salome/gui/SMESH/input/tui_defining_hypotheses.doc b/doc/salome/gui/SMESH/input/tui_defining_hypotheses.doc index e98eca6b4..9178688a7 100644 --- a/doc/salome/gui/SMESH/input/tui_defining_hypotheses.doc +++ b/doc/salome/gui/SMESH/input/tui_defining_hypotheses.doc @@ -457,6 +457,40 @@ src_mesh.TranslateObject( src_mesh, MakeDirStruct( 210, 0, 0 ), Copy=False) \endcode +

Projection 1D2D

+ +\code +# Project triangles from one meshed face to another mesh on the same box + +from smesh import * + +# Prepare geometry + +# Create a box +box = geompy.MakeBoxDXDYDZ(100, 100, 100) + +# Get geom faces to mesh with triangles in the 1ts and 2nd meshes +faces = geompy.SubShapeAll(box, geompy.ShapeType["FACE"]) +# 2 adjacent faces of the box +Face_1 = faces[2] +Face_2 = faces[0] + +geompy.addToStudy( box, 'box' ) +geompy.addToStudyInFather( box, Face_1, 'Face_1' ) +geompy.addToStudyInFather( box, Face_2, 'Face_2' ) + +# Make the source mesh with Netgem2D +src_mesh = Mesh(Face_1, "Source mesh") +src_mesh.Segment().NumberOfSegments(15) +src_mesh.Triangle() +src_mesh.Compute() + +# Mesh the target mesh using the algoritm Projection1D2D +tgt_mesh = smesh.Mesh(Face_2, "Target mesh") +tgt_mesh.Projection1D2D().SourceFace(Face_1,src_mesh) +tgt_mesh.Compute() +\endcode +
\anchor tui_fixed_points