Salome HOME
PAL12557: Documentation for scripts is not up to date.
[modules/geom.git] / doc / salome / gui / GEOM / modify_the_location.htm
1 <!doctype HTML public "-//W3C//DTD HTML 4.0 Frameset//EN">\r
2 \r
3 <html>\r
4 \r
5 <head>\r
6 <title>Modify the Location</title>\r
7 <meta http-equiv="content-type" content="text/html; charset=windows-1252">\r
8 <meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com">\r
9 <link rel="stylesheet" href="default_ns.css"><script type="text/javascript" language="JavaScript" title="WebHelpSplitCss">\r
10 <!--\r
11 if (navigator.appName !="Netscape")\r
12 {   document.write("<link rel='stylesheet' href='default.css'>");}\r
13 //-->\r
14 </script>\r
15 <style type="text/css">\r
16 <!--\r
17 img_whs1 { border:none; width:25px; height:22px; border-style:none; }\r
18 p.whs2 { font-size:12pt; }\r
19 p.whs3 { font-size:12pt; margin-left:40px; }\r
20 img_whs4 { border:none; width:312px; height:350px; float:none; border-style:none; }\r
21 img_whs5 { border:none; width:431px; height:233px; border-style:none; }\r
22 img_whs6 { border:none; width:312px; height:385px; float:none; border-style:none; }\r
23 img_whs7 { border:none; width:214px; height:222px; border-style:none; }\r
24 table.whs8 { x-cell-content-align:top; width:100%; border-spacing:0px; }\r
25 col.whs9 { width:50%; }\r
26 tr.whs10 { x-cell-content-align:top; }\r
27 td.whs11 { width:50%; padding-right:10px; padding-left:10px; border-bottom-style:none; border-right-style:none; border-left-style:none; border-top-style:none; }\r
28 td.whs12 { width:50%; padding-right:10px; padding-left:10px; border-bottom-style:none; border-top-style:none; border-right-style:none; }\r
29 td.whs13 { width:50%; padding-right:10px; padding-left:10px; border-right-style:none; border-left-style:none; border-bottom-style:none; }\r
30 img_whs14 { border:none; width:238px; height:218px; border-style:none; }\r
31 td.whs15 { width:50%; padding-right:10px; padding-left:10px; border-bottom-style:none; border-right-style:none; }\r
32 img_whs16 { border:none; width:316px; height:215px; border-style:none; }\r
33 p.whs17 { list-style:disc; margin-left:0in; margin-right:0in; margin-top:0px; margin-bottom:0px; }\r
34 -->\r
35 </style><script type="text/javascript" language="JavaScript">\r
36 <!--\r
37 if ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) == 4))\r
38 {\r
39   var strNSS = "<style type='text/css'>";\r
40   strNSS += "p.whs17 {margin-left:1pt;margin-right:1pt;margin-top:1pt;margin-bottom:1pt; }";\r
41   strNSS +="</style>";\r
42   document.write(strNSS);\r
43 }\r
44 //-->\r
45 </script>\r
46 <script type="text/javascript" language="JavaScript" title="WebHelpInlineScript">\r
47 <!--\r
48 function reDo() {\r
49   if (innerWidth != origWidth || innerHeight != origHeight)\r
50      location.reload();\r
51 }\r
52 if ((parseInt(navigator.appVersion) == 4) && (navigator.appName == "Netscape")) {\r
53         origWidth = innerWidth;\r
54         origHeight = innerHeight;\r
55         onresize = reDo;\r
56 }\r
57 onerror = null; \r
58 //-->\r
59 </script>\r
60 <style type="text/css">\r
61 <!--\r
62 div.WebHelpPopupMenu { position:absolute; left:0px; top:0px; z-index:4; visibility:hidden; }\r
63 p.WebHelpNavBar { text-align:right; }\r
64 -->\r
65 </style><script type="text/javascript" language="javascript1.2" src="whmsg.js"></script>\r
66 <script type="text/javascript" language="javascript" src="whver.js"></script>\r
67 <script type="text/javascript" language="javascript1.2" src="whproxy.js"></script>\r
68 <script type="text/javascript" language="javascript1.2" src="whutils.js"></script>\r
69 <script type="text/javascript" language="javascript1.2" src="whtopic.js"></script>\r
70 <script type="text/javascript" language="javascript1.2">\r
71 <!--\r
72 if (window.gbWhTopic)\r
73 {\r
74         if (window.setRelStartPage)\r
75         {\r
76         addTocInfo("Geometry module\nTransforming geometrical objects\nTransformation Operations\nModify the Location");\r
77 addButton("show",BTN_IMG,"Show","","","","",0,0,"whd_show0.gif","whd_show2.gif","whd_show1.gif");\r
78 addButton("hide",BTN_IMG,"Hide","","","","",0,0,"whd_hide0.gif","whd_hide2.gif","whd_hide1.gif");\r
79 \r
80         }\r
81 \r
82 \r
83         if (window.setRelStartPage)\r
84         {\r
85         setRelStartPage("index.htm");\r
86 \r
87                 autoSync(1);\r
88                 sendSyncInfo();\r
89                 sendAveInfoOut();\r
90         }\r
91 \r
92 }\r
93 else\r
94         if (window.gbIE4)\r
95                 document.location.reload();\r
96 //-->\r
97 </script>\r
98 </head>\r
99 <body><script type="text/javascript" language="javascript1.2">\r
100 <!--\r
101 if (window.writeIntopicBar)\r
102         writeIntopicBar(4);\r
103 //-->\r
104 </script>\r
105 <h1><span style="font-size: 14pt;"><font size=4 style="font-size:14pt;"><img src="image59.gif" width="25px" height="22px" border="0" class="img_whs1"> </font></span>Modify the Location</h1>\r
106 \r
107 <p class="whs2"><b style="font-weight: normal;">T</b>o<span \r
108  style="font-weight: bold;"><B> Modify the Location</B></span> in the Main Menu \r
109  select <span style="font-weight: bold;"><B>Operations - &gt; Transformation \r
110  - &gt; Modify the Location.</B></span></p>\r
111 \r
112 <p class="whs2">&nbsp;</p>\r
113 \r
114 <p class="whs2">This operation modifies the <span style="font-weight: bold;"><B>Location</B></span> \r
115  of an <span style="font-weight: bold;"><B>Object. </B></span></p>\r
116 \r
117 <p class="whs2">&nbsp;</p>\r
118 \r
119 <p class="whs2">The first algorithm places the object so that \r
120  its center coincides with the center of an End Local Coordinate System.</p>\r
121 \r
122 <p class="whs2"><span style="font-weight: bold;"><B>Create a copy \r
123  </B></span>checkbox allows to keep the initial object, otherwise it will be \r
124  removed.</p>\r
125 \r
126 <p class="whs2"><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><span><b style="font-weight: bold;">A</span>rguments:</b> \r
127  Name + 1 Object + End Coordinate System.</font></span></p>\r
128 \r
129 <p>&nbsp;</p>\r
130 \r
131 <p class="whs3"><img src="pics/transformation5.png" x-maintain-ratio="TRUE" width="312px" height="350px" border="0" class="img_whs4"> &nbsp;&nbsp;</p>\r
132 \r
133 <p class="whs2">&nbsp;</p>\r
134 \r
135 <p class="whs2">In the picture the initial cube with the global \r
136  coordinate system is &nbsp;to \r
137  the right and the modified cube with the Local Coordinate System in the \r
138  center of it is to the left . </p>\r
139 \r
140 <p class="whs2">&nbsp;</p>\r
141 \r
142 <p class="whs3"><img src="image30.gif" width="431px" height="233px" border="0" class="img_whs5"></p>\r
143 \r
144 <p class="whs2">&nbsp;</p>\r
145 \r
146 <p class="whs2">The second algorithm &nbsp;modifies \r
147  the location of an object using Start and End LSC, although the final \r
148  position of the object will not coincide with the center of &nbsp;either \r
149  of the two systems. In this method the object is shifted from its initial \r
150  position by the value of the remainder after subtraction of the coordinates \r
151  of the Start LSC from the coordinates of the End LSC. </p>\r
152 \r
153 <p class="whs2"><span style="font-weight: bold;"><B>Create a copy \r
154  </B></span>checkbox allows to keep the initial object, otherwise it will be \r
155  removed.</p>\r
156 \r
157 <p class="whs2"><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"><b style="font-weight: bold;">Arguments:</b> \r
158  Name + 1 Object + Start Coordinate System + End Coordinate System.</font></span></p>\r
159 \r
160 <p class="whs2">&nbsp;</p>\r
161 \r
162 <p class="whs3"><img src="pics/transformation6.png" x-maintain-ratio="TRUE" width="312px" height="385px" border="0" class="img_whs6"></p>\r
163 \r
164 <p class="whs2">&nbsp;</p>\r
165 \r
166 <p class="whs2">In this picture we see the initial cube with \r
167  the global coordinate system and two LCS: LocalCS1 (GCS+100 along x-axis) \r
168  and LocalCS2 (GCS+200 along x-axis) &nbsp;</p>\r
169 \r
170 <p class="whs2">&nbsp;</p>\r
171 \r
172 <p class="whs3"><img src="image1.gif" width="214px" height="222px" border="0" class="img_whs7"></p>\r
173 \r
174 <p class="whs2">&nbsp;</p>\r
175 \r
176 <table x-use-null-cells cellspacing="0" width="100%" class="whs8">\r
177 <col class="whs9">\r
178 <col class="whs9">\r
179 \r
180 <tr valign="top" class="whs10">\r
181 <td width="50%" class="whs11">\r
182 <p class="whs2">Selecting Start LCS = LCS1 and End LCS = LCS2, \r
183  we obtain the translated cube at the position (100;0;0)</p>\r
184 <p>&nbsp;</td>\r
185 <td width="50%" class="whs12">\r
186 <p class="whs2">Selecting Start LCS = LCS2 and End LCS = LCS1, \r
187  we obtain the translated cube at the position (-100;0;0)</td></tr>\r
188 \r
189 <tr valign="top" class="whs10">\r
190 <td width="50%" class="whs13">\r
191 <p><img src="image2.gif" width="238px" height="218px" border="0" class="img_whs14"></td>\r
192 <td width="50%" class="whs15">\r
193 <p><img src="image4.gif" width="316px" height="215px" border="0" class="img_whs16"></td></tr>\r
194 </table>\r
195 \r
196 <p class="whs2">&nbsp;</p>\r
197 \r
198 <p class="whs2"><b style="font-weight: bold;">TUI Command:</b><i> \r
199  geompy.MakePosition(theObject, theStartLCS, theEndLCS), </i>where&nbsp;theObject \r
200  is a shape, location of which is modified, theStartLCS is a location to \r
201  move the shape from, theEndLCS is a location to move the shape to.</p>\r
202 \r
203 <p class="whs2">&nbsp;</p>\r
204 \r
205 <p class="whs17"><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;">Our </font></span><span \r
206  style="font-weight: bold;"><B>TUI Scripts</B></span><span style="font-size: 12pt;"><font size=3 style="font-size:12pt;"> \r
207  provide you with useful examples of the use of <a href="transformation_operations.htm#bookmark2">Transformation \r
208  Operations</a>. </font></span></p>\r
209 \r
210 <p>&nbsp;</p>\r
211 \r
212 <script type="text/javascript" language="javascript1.2">\r
213 <!--\r
214 if (window.writeIntopicBar)\r
215         writeIntopicBar(0);\r
216 //-->\r
217 </script>\r
218 </body>\r
219 </html>\r