Salome HOME
Do not disallow edition, otherwise we can't expand group items (e.g. vertices) when...
[modules/hexablock.git] / doc / tui_asso_quad_to_geom.rst
1 :tocdepth: 3
2
3 .. _tuiassoquadtogeom:
4
5 =============================================
6 Associate the model of blocks to the geometry
7 =============================================
8
9 .. _tuiassoelemts:
10
11 Elements association
12 ====================
13
14 Associate to a vertex of the geometry::
15
16     vx.setAssociation(geom_object_vertex)
17
18 Get the association::
19
20     gov = vx.getAssociation()
21
22 Associate to an edge or a wire of the geometry::
23
24     l = edg.addAssociation(geom_object_1D, debut, val)
25
26 Get the associations::
27
28     edge_associations = edg.getAssociations()
29
30 Associate to a face or a shell of the geometry::
31
32     l = quad.addAssociation(geom_object_2D)
33
34 Give the association::
35
36     go2d = quad.getAssociations()
37
38 .. _tuiassolines:
39
40 Associate by lines
41 ==================
42
43 To associate an opened line to the geometry, the following data have
44 to be mentioned:
45
46 - the starting edge of the model of blocks: *mstart*
47 - the list of edges of the model of blocks: *mline*
48 - the starting edge of the geometry: *gstart*
49 - the curvilinear abscissa on the starting edge of the geometry: *pstart* (double)
50 - the list of edges of the geometry: *gline*
51 - the curvilinear abscissa on the last edge of the geometry: *pend*
52
53 The number of edges of the model of blocks to associate may be
54 different from the number of edges of the geometry. 
55
56 Associate an opened line::
57
58         l = doc.associateOpenedLine(mstart, mline, gstart, pstart, gline, pend) 
59
60 To associate a closed line to the geometry, the following data have
61 to be mentioned:
62
63 - the starting vertex of the model of blocks: *mfirst*
64 - the starting edge of the model of blocks: *mstart*
65 - the list of edges of the model of blocks: *mline*
66 - the starting edge of the geometry: *gstart*
67 - the curvilinear abscissa on the starting edge of the geometry: *pstart* (double)
68 - the list of edges of the geometry: *gline*
69
70 The number of edges of the model of blocks to associate may be
71 different from the number of edges of the geometry. 
72
73 Associate a closed line::
74
75     l = doc.associateClosedLine(mfirst, mstart, mline, gstart, pstart, gline)
76
77 .. _tuiassocfacenote:
78
79 Note for face association
80 =========================
81
82 Face association (implicite or explicite) is not necessary for:
83
84 - planar faces, 
85 - cylindrical faces,
86 - conical faces.
87
88 Only edges association (implicite) on segments or arcs of cirle is necessary.
89
90 The following example show a model of block on which there isn't faces association but only 
91 implicite edges association on arcs of circle.
92  
93  
94 Example
95 -------
96
97 .. literalinclude:: test_doc/test_cone/test_cone.py
98    :linenos:
99
100
101 Result
102 ------
103
104 .. image:: _static/cone_mesh.png
105    :align: center
106
107 .. centered::
108    Cone mesh
109    
110    
111 GUI command: :ref:`guiassoquadtogeom`