Debian Codegraph @

lib/database/src/so/nodes/nurbs/libnurbs/mesher.c++

raw symbols SCIP
1 /*
2 *
3 * Copyright (C) 2000 Silicon Graphics, Inc. All Rights Reserved.
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * Further, this software is distributed without any warranty that it is
16 * free of the rightful claim of any third person regarding infringement
17 * or the like. Any license provided herein, whether implied or
18 * otherwise, applies only to this software file. Patent licenses, if
19 * any, provided herein do not apply to combinations of this program with
20 * other software, or any other product whatsoever.
21 *
22 * You should have received a copy of the GNU Lesser General Public
23 * License along with this library; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 *
26 * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
27 * Mountain View, CA 94043, or:
28 *
29 * http://www.sgi.com
30 *
31 * For further information regarding this notice, see:
32 *
33 * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
34 *
35 */
36
37 /*
38 * mesher.c++ - $Revision: 1.2 $
39 * Derrick Burns - 1991
40 */
41
42 #include "glimports.h"cxx . . $ `<file>/lib/database/src/so/nodes/nurbs/head/glimports.h`/
43 #include "myassert.h"cxx . . $ `<file>/lib/database/src/so/nodes/nurbs/head/myassert.h`/
44 #include "mystdio.h"cxx . . $ `<file>/lib/database/src/so/nodes/nurbs/head/mystdio.h`/
45 #include "mesher.h"cxx . . $ `<file>/lib/database/src/so/nodes/nurbs/head/mesher.h`/
46 #include "gridvertex.h"cxx . . $ `<file>/lib/database/src/so/nodes/nurbs/head/gridvertex.h`/
47 #include "gridtrimvertex.h"cxx . . $ `<file>/lib/database/src/so/nodes/nurbs/head/gridtrimvertex.h`/
48 #include "jarcloc.h"cxx . . $ `<file>/lib/database/src/so/nodes/nurbs/head/jarcloc.h`/
49 #include "gridline.h"cxx . . $ `<file>/lib/database/src/so/nodes/nurbs/head/gridline.h`/
50 #include "trimline.h"cxx . . $ `<file>/lib/database/src/so/nodes/nurbs/head/trimline.h`/
51 #include "uarray.h"cxx . . $ `<file>/lib/database/src/so/nodes/nurbs/head/uarray.h`/
52 #include "backend.h"cxx . . $ `<file>/lib/database/src/so/nodes/nurbs/head/backend.h`/
53
54
55 const float Meshercxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:70:9`!::ZEROcxx . . $ _SoNurbsMesher#ZERO. = 0.0;
56
57 Meshercxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:70:9`!::Meshercxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:70:9`!( Backendcxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:42:9`!& b )
58 : backendcxx . . $ _SoNurbsMesher#backend.( b ),
59 pcxx . . $ _SoNurbsMesher#p.( sizeof( GridTrimVertexcxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:59:9`! ), 100, "GridTrimVertexPool" )
60 {
61 stacksizecxx . . $ _SoNurbsMesher#stacksize. = 0;
62 vdatacxx . . $ _SoNurbsMesher#vdata. = 0;
63 lastedgecxx . . $ _SoNurbsMesher#lastedge. = 0;
64 }
65
66 Meshercxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:70:9`!::~cxx . . $ _SoNurbsMesher#`~_SoNurbsMesher`(49f6e7a06ebc5aa8).Meshercxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:70:9`!( void )
67 {
68 if( vdatacxx . . $ _SoNurbsMesher#vdata. ) delete[] vdatacxx . . $ _SoNurbsMesher#vdata.;
69 }
70
71 void
72 Meshercxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:70:9`!::initcxx . . $ _SoNurbsMesher#init(cb2f890c2fdad230).( unsigned int npts )
73 {
74 pcxx . . $ _SoNurbsMesher#p..clearcxx . . $ _SoNurbsPool#clear(49f6e7a06ebc5aa8).();
75 if( stacksizecxx . . $ _SoNurbsMesher#stacksize. < npts ) {
76 stacksizecxx . . $ _SoNurbsMesher#stacksize. = 2 * npts;
77 if( vdatacxx . . $ _SoNurbsMesher#vdata. ) delete[] vdatacxx . . $ _SoNurbsMesher#vdata.;
78 vdatacxx . . $ _SoNurbsMesher#vdata. = new GridTrimVertex_pcxx . . $ GridTrimVertex_p#[stacksizecxx . . $ _SoNurbsMesher#stacksize.];
79 }
80 }
81
82 inline void
83 Meshercxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:70:9`!::pushcxx . . $ _SoNurbsMesher#push(7e1bb334168cf85f).( GridTrimVertexcxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:59:9`! *gt )
84 {
85 assertcxx . . $ `/usr/include/assert.h:50:10`!( itop+1 != stacksize );
86 vdatacxx . . $ _SoNurbsMesher#vdata.[++itopcxx . . $ _SoNurbsMesher#itop.] = gt;
87 }
88
89 inline void
90 Meshercxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:70:9`!::popcxx . . $ _SoNurbsMesher#pop(1624ee8275b10bda).( long )
91 {
92 }
93
94 inline void
95 Meshercxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:70:9`!::openMeshcxx . . $ _SoNurbsMesher#openMesh(49f6e7a06ebc5aa8).()
96 {
97 backendcxx . . $ _SoNurbsMesher#backend..bgntmeshcxx . . $ _SoNurbsBackend#bgntmesh(fda57c8427c60377).( "addedge" );
98 }
99
100 inline void
101 Meshercxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:70:9`!::closeMeshcxx . . $ _SoNurbsMesher#closeMesh(49f6e7a06ebc5aa8).()
102 {
103 backendcxx . . $ _SoNurbsMesher#backend..endtmeshcxx . . $ _SoNurbsBackend#endtmesh(49f6e7a06ebc5aa8).();
104 }
105
106 inline void
107 Meshercxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:70:9`!::swapMeshcxx . . $ _SoNurbsMesher#swapMesh(49f6e7a06ebc5aa8).()
108 {
109 backendcxx . . $ _SoNurbsMesher#backend..swaptmeshcxx . . $ _SoNurbsBackend#swaptmesh(49f6e7a06ebc5aa8).();
110 }
111
112 inline void
113 Meshercxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:70:9`!::clearStackcxx . . $ _SoNurbsMesher#clearStack(49f6e7a06ebc5aa8).()
114 {
115 itopcxx . . $ _SoNurbsMesher#itop. = -1;
116 lastcxx . . $ _SoNurbsMesher#last.[0] = 0;
117 }
118
119 void
120 Meshercxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:70:9`!::finishLowercxx . . $ _SoNurbsMesher#finishLower(7e1bb334168cf85f).( GridTrimVertexcxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:59:9`! *gtlower )
121 {
122 for( pushcxx . . $ _SoNurbsMesher#push(7e1bb334168cf85f).(gtlower);
123 nextlowercxx . . $ _SoNurbsHull#nextlower(e25b1b2923294a68).( gtlower=new(pcxx . . $ _SoNurbsMesher#p.) GridTrimVertexcxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:59:9`! );
124 pushcxx . . $ _SoNurbsMesher#push(7e1bb334168cf85f).(gtlower) )
125 addLowercxx . . $ _SoNurbsMesher#addLower(49f6e7a06ebc5aa8).();
126 addLastcxx . . $ _SoNurbsMesher#addLast(49f6e7a06ebc5aa8).();
127 }
128
129 void
130 Meshercxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:70:9`!::finishUppercxx . . $ _SoNurbsMesher#finishUpper(7e1bb334168cf85f).( GridTrimVertexcxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:59:9`! *gtupper )
131 {
132 for( pushcxx . . $ _SoNurbsMesher#push(7e1bb334168cf85f).(gtupper);
133 nextuppercxx . . $ _SoNurbsHull#nextupper(e25b1b2923294a68).( gtupper=new(pcxx . . $ _SoNurbsMesher#p.) GridTrimVertexcxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:59:9`! );
134 pushcxx . . $ _SoNurbsMesher#push(7e1bb334168cf85f).(gtupper) )
135 addUppercxx . . $ _SoNurbsMesher#addUpper(49f6e7a06ebc5aa8).();
136 addLastcxx . . $ _SoNurbsMesher#addLast(49f6e7a06ebc5aa8).();
137 }
138
139 void
140 Meshercxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:70:9`!::meshcxx . . $ _SoNurbsMesher#mesh(49f6e7a06ebc5aa8).( void )
141 {
142 GridTrimVertexcxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:59:9`! *gtlower, *gtupper;
143
144 Hullcxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:63:9`!::initcxx . . $ _SoNurbsHull#init(49f6e7a06ebc5aa8).( );
145 nextuppercxx . . $ _SoNurbsHull#nextupper(e25b1b2923294a68).( gtupper = new(pcxx . . $ _SoNurbsMesher#p.) GridTrimVertexcxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:59:9`! );
146 nextlowercxx . . $ _SoNurbsHull#nextlower(e25b1b2923294a68).( gtlower = new(pcxx . . $ _SoNurbsMesher#p.) GridTrimVertexcxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:59:9`! );
147
148 clearStackcxx . . $ _SoNurbsMesher#clearStack(49f6e7a06ebc5aa8).();
149 openMeshcxx . . $ _SoNurbsMesher#openMesh(49f6e7a06ebc5aa8).();
150 pushcxx . . $ _SoNurbsMesher#push(7e1bb334168cf85f).(gtupper);
151
152 nextuppercxx . . $ _SoNurbsHull#nextupper(e25b1b2923294a68).( gtupper = new(pcxx . . $ _SoNurbsMesher#p.) GridTrimVertexcxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:59:9`! );
153 nextlowercxx . . $ _SoNurbsHull#nextlower(e25b1b2923294a68).( gtlower );
154
155 assertcxx . . $ `/usr/include/assert.h:50:10`!( gtupper->t && gtlower->t );
156
157 if( gtupper->tcxx . . $ _SoNurbsGridTrimVertex#t.->paramcxx . . $ _SoNurbsTrimVertex#param.[0] < gtlower->tcxx . . $ _SoNurbsGridTrimVertex#t.->paramcxx . . $ _SoNurbsTrimVertex#param.[0] ) {
158 pushcxx . . $ _SoNurbsMesher#push(7e1bb334168cf85f).(gtupper);
159 lastedgecxx . . $ _SoNurbsMesher#lastedge. = 1;
160 if( nextuppercxx . . $ _SoNurbsHull#nextupper(e25b1b2923294a68).( gtupper=new(pcxx . . $ _SoNurbsMesher#p.) GridTrimVertexcxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:59:9`! ) == 0 ) {
161 finishLowercxx . . $ _SoNurbsMesher#finishLower(7e1bb334168cf85f).(gtlower);
162 return;
163 }
164 } else if( gtupper->tcxx . . $ _SoNurbsGridTrimVertex#t.->paramcxx . . $ _SoNurbsTrimVertex#param.[0] > gtlower->tcxx . . $ _SoNurbsGridTrimVertex#t.->paramcxx . . $ _SoNurbsTrimVertex#param.[0] ) {
165 pushcxx . . $ _SoNurbsMesher#push(7e1bb334168cf85f).(gtlower);
166 lastedgecxx . . $ _SoNurbsMesher#lastedge. = 0;
167 if( nextlowercxx . . $ _SoNurbsHull#nextlower(e25b1b2923294a68).( gtlower=new(pcxx . . $ _SoNurbsMesher#p.) GridTrimVertexcxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:59:9`! ) == 0 ) {
168 finishUppercxx . . $ _SoNurbsMesher#finishUpper(7e1bb334168cf85f).(gtupper);
169 return;
170 }
171 } else {
172 if( lastedgecxx . . $ _SoNurbsMesher#lastedge. == 0 ) {
173 pushcxx . . $ _SoNurbsMesher#push(7e1bb334168cf85f).(gtupper);
174 lastedgecxx . . $ _SoNurbsMesher#lastedge. = 1;
175 if( nextuppercxx . . $ _SoNurbsHull#nextupper(e25b1b2923294a68).(gtupper=new(pcxx . . $ _SoNurbsMesher#p.) GridTrimVertexcxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:59:9`!) == 0 ) {
176 finishLowercxx . . $ _SoNurbsMesher#finishLower(7e1bb334168cf85f).(gtlower);
177 return;
178 }
179 } else {
180 pushcxx . . $ _SoNurbsMesher#push(7e1bb334168cf85f).(gtlower);
181 lastedgecxx . . $ _SoNurbsMesher#lastedge. = 0;
182 if( nextlowercxx . . $ _SoNurbsHull#nextlower(e25b1b2923294a68).( gtlower=new(pcxx . . $ _SoNurbsMesher#p.) GridTrimVertexcxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:59:9`! ) == 0 ) {
183 finishUppercxx . . $ _SoNurbsMesher#finishUpper(7e1bb334168cf85f).(gtupper);
184 return;
185 }
186 }
187 }
188
189 while ( 1 ) {
190 if( gtupper->tcxx . . $ _SoNurbsGridTrimVertex#t.->paramcxx . . $ _SoNurbsTrimVertex#param.[0] < gtlower->tcxx . . $ _SoNurbsGridTrimVertex#t.->paramcxx . . $ _SoNurbsTrimVertex#param.[0] ) {
191 pushcxx . . $ _SoNurbsMesher#push(7e1bb334168cf85f).(gtupper);
192 addUppercxx . . $ _SoNurbsMesher#addUpper(49f6e7a06ebc5aa8).();
193 if( nextuppercxx . . $ _SoNurbsHull#nextupper(e25b1b2923294a68).( gtupper=new(pcxx . . $ _SoNurbsMesher#p.) GridTrimVertexcxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:59:9`! ) == 0 ) {
194 finishLowercxx . . $ _SoNurbsMesher#finishLower(7e1bb334168cf85f).(gtlower);
195 return;
196 }
197 } else if( gtupper->tcxx . . $ _SoNurbsGridTrimVertex#t.->paramcxx . . $ _SoNurbsTrimVertex#param.[0] > gtlower->tcxx . . $ _SoNurbsGridTrimVertex#t.->paramcxx . . $ _SoNurbsTrimVertex#param.[0] ) {
198 pushcxx . . $ _SoNurbsMesher#push(7e1bb334168cf85f).(gtlower);
199 addLowercxx . . $ _SoNurbsMesher#addLower(49f6e7a06ebc5aa8).();
200 if( nextlowercxx . . $ _SoNurbsHull#nextlower(e25b1b2923294a68).( gtlower=new(pcxx . . $ _SoNurbsMesher#p.) GridTrimVertexcxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:59:9`! ) == 0 ) {
201 finishUppercxx . . $ _SoNurbsMesher#finishUpper(7e1bb334168cf85f).(gtupper);
202 return;
203 }
204 } else {
205 if( lastedgecxx . . $ _SoNurbsMesher#lastedge. == 0 ) {
206 pushcxx . . $ _SoNurbsMesher#push(7e1bb334168cf85f).(gtupper);
207 addUppercxx . . $ _SoNurbsMesher#addUpper(49f6e7a06ebc5aa8).();
208 if( nextuppercxx . . $ _SoNurbsHull#nextupper(e25b1b2923294a68).( gtupper=new(pcxx . . $ _SoNurbsMesher#p.) GridTrimVertexcxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:59:9`! ) == 0 ) {
209 finishLowercxx . . $ _SoNurbsMesher#finishLower(7e1bb334168cf85f).(gtlower);
210 return;
211 }
212 } else {
213 pushcxx . . $ _SoNurbsMesher#push(7e1bb334168cf85f).(gtlower);
214 addLowercxx . . $ _SoNurbsMesher#addLower(49f6e7a06ebc5aa8).();
215 if( nextlowercxx . . $ _SoNurbsHull#nextlower(e25b1b2923294a68).( gtlower=new(pcxx . . $ _SoNurbsMesher#p.) GridTrimVertexcxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:59:9`! ) == 0 ) {
216 finishUppercxx . . $ _SoNurbsMesher#finishUpper(7e1bb334168cf85f).(gtupper);
217 return;
218 }
219 }
220 }
221 }
222 }
223
224 inline int
225 Meshercxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:70:9`!::isCcwcxx . . $ _SoNurbsMesher#isCcw(7864480464b09eea).( int ilast )
226 {
227 REALcxx . . $ REAL# area = det3cxx . . $ det3(a1ce5adc30dfcb7).( vdatacxx . . $ _SoNurbsMesher#vdata.[ilast]->tcxx . . $ _SoNurbsGridTrimVertex#t., vdatacxx . . $ _SoNurbsMesher#vdata.[itopcxx . . $ _SoNurbsMesher#itop.-1]->tcxx . . $ _SoNurbsGridTrimVertex#t., vdatacxx . . $ _SoNurbsMesher#vdata.[itopcxx . . $ _SoNurbsMesher#itop.-2]->tcxx . . $ _SoNurbsGridTrimVertex#t. );
228 return (area < ZEROcxx . . $ _SoNurbsMesher#ZERO.) ? 0 : 1;
229 }
230
231 inline int
232 Meshercxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:70:9`!::isCwcxx . . $ _SoNurbsMesher#isCw(7864480464b09eea).( int ilast )
233 {
234 REALcxx . . $ REAL# area = det3cxx . . $ det3(a1ce5adc30dfcb7).( vdatacxx . . $ _SoNurbsMesher#vdata.[ilast]->tcxx . . $ _SoNurbsGridTrimVertex#t., vdatacxx . . $ _SoNurbsMesher#vdata.[itopcxx . . $ _SoNurbsMesher#itop.-1]->tcxx . . $ _SoNurbsGridTrimVertex#t., vdatacxx . . $ _SoNurbsMesher#vdata.[itopcxx . . $ _SoNurbsMesher#itop.-2]->tcxx . . $ _SoNurbsGridTrimVertex#t. );
235 return (area > -ZEROcxx . . $ _SoNurbsMesher#ZERO.) ? 0 : 1;
236 }
237
238 inline int
239 Meshercxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:70:9`!::equalcxx . . $ _SoNurbsMesher#equal(9b79fb6aee4c0440).( int x, int y )
240 {
241 return( lastcxx . . $ _SoNurbsMesher#last.[0] == vdatacxx . . $ _SoNurbsMesher#vdata.[x] && lastcxx . . $ _SoNurbsMesher#last.[1] == vdatacxx . . $ _SoNurbsMesher#vdata.[y] );
242 }
243
244 inline void
245 Meshercxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:70:9`!::copycxx . . $ _SoNurbsMesher#copy(3e454b8ccf442868).( int x, int y )
246 {
247 lastcxx . . $ _SoNurbsMesher#last.[0] = vdatacxx . . $ _SoNurbsMesher#vdata.[x]; lastcxx . . $ _SoNurbsMesher#last.[1] = vdatacxx . . $ _SoNurbsMesher#vdata.[y];
248 }
249
250 inline void
251 Meshercxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:70:9`!::movecxx . . $ _SoNurbsMesher#move(3e454b8ccf442868).( int x, int y )
252 {
253 vdatacxx . . $ _SoNurbsMesher#vdata.[x] = vdatacxx . . $ _SoNurbsMesher#vdata.[y];
254 }
255
256 inline void
257 Meshercxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:70:9`!::outputcxx . . $ _SoNurbsMesher#output(d4f767463ce0a6b3).( int x )
258 {
259 backendcxx . . $ _SoNurbsMesher#backend..tmeshvertcxx . . $ _SoNurbsBackend#tmeshvert(7e1bb334168cf85f).( vdatacxx . . $ _SoNurbsMesher#vdata.[x] );
260 }
261
262 /*---------------------------------------------------------------------------
263 * addedge - addedge an edge to the triangulation
264 *
265 * This code has been re-written to generate large triangle meshes
266 * from a monotone polygon. Although smaller triangle meshes
267 * could be generated faster and with less code, larger meshes
268 * actually give better SYSTEM performance. This is because
269 * vertices are processed in the backend slower than they are
270 * generated by this code and any decrease in the number of vertices
271 * results in a decrease in the time spent in the backend.
272 *---------------------------------------------------------------------------
273 */
274
275 void
276 Meshercxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:70:9`!::addLastcxx . . $ _SoNurbsMesher#addLast(49f6e7a06ebc5aa8).( )
277 {
278 register int ilast = itopcxx . . $ _SoNurbsMesher#itop.;
279
280 if( lastedgecxx . . $ _SoNurbsMesher#lastedge. == 0 ) {
281 if( equalcxx . . $ _SoNurbsMesher#equal(9b79fb6aee4c0440).( 0, 1 ) ) {
282 outputcxx . . $ _SoNurbsMesher#output(d4f767463ce0a6b3).( ilast );
283 swapMeshcxx . . $ _SoNurbsMesher#swapMesh(49f6e7a06ebc5aa8).();
284 for( register int i = 2; i < ilast; i++ ) {
285 swapMeshcxx . . $ _SoNurbsMesher#swapMesh(49f6e7a06ebc5aa8).();
286 outputcxx . . $ _SoNurbsMesher#output(d4f767463ce0a6b3).( i );
287 }
288 copycxx . . $ _SoNurbsMesher#copy(3e454b8ccf442868).( ilast, ilast-1 );
289 } else if( equalcxx . . $ _SoNurbsMesher#equal(9b79fb6aee4c0440).( ilast-2, ilast-1) ) {
290 swapMeshcxx . . $ _SoNurbsMesher#swapMesh(49f6e7a06ebc5aa8).();
291 outputcxx . . $ _SoNurbsMesher#output(d4f767463ce0a6b3).( ilast );
292 for( register int i = ilast-3; i >= 0; i-- ) {
293 outputcxx . . $ _SoNurbsMesher#output(d4f767463ce0a6b3).( i );
294 swapMeshcxx . . $ _SoNurbsMesher#swapMesh(49f6e7a06ebc5aa8).();
295 }
296 copycxx . . $ _SoNurbsMesher#copy(3e454b8ccf442868).( 0, ilast );
297 } else {
298 closeMeshcxx . . $ _SoNurbsMesher#closeMesh(49f6e7a06ebc5aa8).(); openMeshcxx . . $ _SoNurbsMesher#openMesh(49f6e7a06ebc5aa8).();
299 outputcxx . . $ _SoNurbsMesher#output(d4f767463ce0a6b3).( ilast );
300 outputcxx . . $ _SoNurbsMesher#output(d4f767463ce0a6b3).( 0 );
301 for( register int i = 1; i < ilast; i++ ) {
302 swapMeshcxx . . $ _SoNurbsMesher#swapMesh(49f6e7a06ebc5aa8).();
303 outputcxx . . $ _SoNurbsMesher#output(d4f767463ce0a6b3).( i );
304 }
305 copycxx . . $ _SoNurbsMesher#copy(3e454b8ccf442868).( ilast, ilast-1 );
306 }
307 } else {
308 if( equalcxx . . $ _SoNurbsMesher#equal(9b79fb6aee4c0440).( 1, 0) ) {
309 swapMeshcxx . . $ _SoNurbsMesher#swapMesh(49f6e7a06ebc5aa8).();
310 outputcxx . . $ _SoNurbsMesher#output(d4f767463ce0a6b3).( ilast );
311 for( register int i = 2; i < ilast; i++ ) {
312 outputcxx . . $ _SoNurbsMesher#output(d4f767463ce0a6b3).( i );
313 swapMeshcxx . . $ _SoNurbsMesher#swapMesh(49f6e7a06ebc5aa8).();
314 }
315 copycxx . . $ _SoNurbsMesher#copy(3e454b8ccf442868).( ilast-1, ilast );
316 } else if( equalcxx . . $ _SoNurbsMesher#equal(9b79fb6aee4c0440).( ilast-1, ilast-2) ) {
317 outputcxx . . $ _SoNurbsMesher#output(d4f767463ce0a6b3).( ilast );
318 swapMeshcxx . . $ _SoNurbsMesher#swapMesh(49f6e7a06ebc5aa8).();
319 for( register int i = ilast-3; i >= 0; i-- ) {
320 swapMeshcxx . . $ _SoNurbsMesher#swapMesh(49f6e7a06ebc5aa8).();
321 outputcxx . . $ _SoNurbsMesher#output(d4f767463ce0a6b3).( i );
322 }
323 copycxx . . $ _SoNurbsMesher#copy(3e454b8ccf442868).( ilast, 0 );
324 } else {
325 closeMeshcxx . . $ _SoNurbsMesher#closeMesh(49f6e7a06ebc5aa8).(); openMeshcxx . . $ _SoNurbsMesher#openMesh(49f6e7a06ebc5aa8).();
326 outputcxx . . $ _SoNurbsMesher#output(d4f767463ce0a6b3).( 0 );
327 outputcxx . . $ _SoNurbsMesher#output(d4f767463ce0a6b3).( ilast );
328 for( register int i = 1; i < ilast; i++ ) {
329 outputcxx . . $ _SoNurbsMesher#output(d4f767463ce0a6b3).( i );
330 swapMeshcxx . . $ _SoNurbsMesher#swapMesh(49f6e7a06ebc5aa8).();
331 }
332 copycxx . . $ _SoNurbsMesher#copy(3e454b8ccf442868).( ilast-1, ilast );
333 }
334 }
335 closeMeshcxx . . $ _SoNurbsMesher#closeMesh(49f6e7a06ebc5aa8).();
336 //for( register long k=0; k<=ilast; k++ ) pop( k );
337 }
338
339 void
340 Meshercxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:70:9`!::addUppercxx . . $ _SoNurbsMesher#addUpper(49f6e7a06ebc5aa8).( )
341 {
342 register int ilast = itopcxx . . $ _SoNurbsMesher#itop.;
343
344 if( lastedgecxx . . $ _SoNurbsMesher#lastedge. == 0 ) {
345 if( equalcxx . . $ _SoNurbsMesher#equal(9b79fb6aee4c0440).( 0, 1 ) ) {
346 outputcxx . . $ _SoNurbsMesher#output(d4f767463ce0a6b3).( ilast );
347 swapMeshcxx . . $ _SoNurbsMesher#swapMesh(49f6e7a06ebc5aa8).();
348 for( register int i = 2; i < ilast; i++ ) {
349 swapMeshcxx . . $ _SoNurbsMesher#swapMesh(49f6e7a06ebc5aa8).();
350 outputcxx . . $ _SoNurbsMesher#output(d4f767463ce0a6b3).( i );
351 }
352 copycxx . . $ _SoNurbsMesher#copy(3e454b8ccf442868).( ilast, ilast-1 );
353 } else if( equalcxx . . $ _SoNurbsMesher#equal(9b79fb6aee4c0440).( ilast-2, ilast-1) ) {
354 swapMeshcxx . . $ _SoNurbsMesher#swapMesh(49f6e7a06ebc5aa8).();
355 outputcxx . . $ _SoNurbsMesher#output(d4f767463ce0a6b3).( ilast );
356 for( register int i = ilast-3; i >= 0; i-- ) {
357 outputcxx . . $ _SoNurbsMesher#output(d4f767463ce0a6b3).( i );
358 swapMeshcxx . . $ _SoNurbsMesher#swapMesh(49f6e7a06ebc5aa8).();
359 }
360 copycxx . . $ _SoNurbsMesher#copy(3e454b8ccf442868).( 0, ilast );
361 } else {
362 closeMeshcxx . . $ _SoNurbsMesher#closeMesh(49f6e7a06ebc5aa8).(); openMeshcxx . . $ _SoNurbsMesher#openMesh(49f6e7a06ebc5aa8).();
363 outputcxx . . $ _SoNurbsMesher#output(d4f767463ce0a6b3).( ilast );
364 outputcxx . . $ _SoNurbsMesher#output(d4f767463ce0a6b3).( 0 );
365 for( register int i = 1; i < ilast; i++ ) {
366 swapMeshcxx . . $ _SoNurbsMesher#swapMesh(49f6e7a06ebc5aa8).();
367 outputcxx . . $ _SoNurbsMesher#output(d4f767463ce0a6b3).( i );
368 }
369 copycxx . . $ _SoNurbsMesher#copy(3e454b8ccf442868).( ilast, ilast-1 );
370 }
371 lastedgecxx . . $ _SoNurbsMesher#lastedge. = 1;
372 //for( register long k=0; k<ilast-1; k++ ) pop( k );
373 movecxx . . $ _SoNurbsMesher#move(3e454b8ccf442868).( 0, ilast-1 );
374 movecxx . . $ _SoNurbsMesher#move(3e454b8ccf442868).( 1, ilast );
375 itopcxx . . $ _SoNurbsMesher#itop. = 1;
376 } else {
377 if( ! isCcwcxx . . $ _SoNurbsMesher#isCcw(7864480464b09eea).( ilast ) ) return;
378 do {
379 itopcxx . . $ _SoNurbsMesher#itop.--;
380 } while( (itopcxx . . $ _SoNurbsMesher#itop. > 1) && isCcwcxx . . $ _SoNurbsMesher#isCcw(7864480464b09eea).( ilast ) );
381
382 if( equalcxx . . $ _SoNurbsMesher#equal(9b79fb6aee4c0440).( ilast-1, ilast-2 ) ) {
383 outputcxx . . $ _SoNurbsMesher#output(d4f767463ce0a6b3).( ilast );
384 swapMeshcxx . . $ _SoNurbsMesher#swapMesh(49f6e7a06ebc5aa8).();
385 for( register int i=ilast-3; i>=itopcxx . . $ _SoNurbsMesher#itop.-1; i-- ) {
386 swapMeshcxx . . $ _SoNurbsMesher#swapMesh(49f6e7a06ebc5aa8).();
387 outputcxx . . $ _SoNurbsMesher#output(d4f767463ce0a6b3).( i );
388 }
389 copycxx . . $ _SoNurbsMesher#copy(3e454b8ccf442868).( ilast, itopcxx . . $ _SoNurbsMesher#itop.-1 );
390 } else if( equalcxx . . $ _SoNurbsMesher#equal(9b79fb6aee4c0440).( itopcxx . . $ _SoNurbsMesher#itop., itopcxx . . $ _SoNurbsMesher#itop.-1 ) ) {
391 swapMeshcxx . . $ _SoNurbsMesher#swapMesh(49f6e7a06ebc5aa8).();
392 outputcxx . . $ _SoNurbsMesher#output(d4f767463ce0a6b3).( ilast );
393 for( register int i = itopcxx . . $ _SoNurbsMesher#itop.+1; i < ilast; i++ ) {
394 outputcxx . . $ _SoNurbsMesher#output(d4f767463ce0a6b3).( i );
395 swapMeshcxx . . $ _SoNurbsMesher#swapMesh(49f6e7a06ebc5aa8).();
396 }
397 copycxx . . $ _SoNurbsMesher#copy(3e454b8ccf442868).( ilast-1, ilast );
398 } else {
399 closeMeshcxx . . $ _SoNurbsMesher#closeMesh(49f6e7a06ebc5aa8).(); openMeshcxx . . $ _SoNurbsMesher#openMesh(49f6e7a06ebc5aa8).();
400 outputcxx . . $ _SoNurbsMesher#output(d4f767463ce0a6b3).( ilast );
401 outputcxx . . $ _SoNurbsMesher#output(d4f767463ce0a6b3).( ilast-1 );
402 for( register int i=ilast-2; i>=itopcxx . . $ _SoNurbsMesher#itop.-1; i-- ) {
403 swapMeshcxx . . $ _SoNurbsMesher#swapMesh(49f6e7a06ebc5aa8).();
404 outputcxx . . $ _SoNurbsMesher#output(d4f767463ce0a6b3).( i );
405 }
406 copycxx . . $ _SoNurbsMesher#copy(3e454b8ccf442868).( ilast, itopcxx . . $ _SoNurbsMesher#itop.-1 );
407 }
408 //for( register int k=itop; k<ilast; k++ ) pop( k );
409 movecxx . . $ _SoNurbsMesher#move(3e454b8ccf442868).( itopcxx . . $ _SoNurbsMesher#itop., ilast );
410 }
411 }
412
413 void
414 Meshercxx . . $ `lib/database/src/so/nodes/nurbs/_defines.h:70:9`!::addLowercxx . . $ _SoNurbsMesher#addLower(49f6e7a06ebc5aa8).()
415 {
416 register int ilast = itopcxx . . $ _SoNurbsMesher#itop.;
417
418 if( lastedgecxx . . $ _SoNurbsMesher#lastedge. == 1 ) {
419 if( equalcxx . . $ _SoNurbsMesher#equal(9b79fb6aee4c0440).( 1, 0) ) {
420 swapMeshcxx . . $ _SoNurbsMesher#swapMesh(49f6e7a06ebc5aa8).();
421 outputcxx . . $ _SoNurbsMesher#output(d4f767463ce0a6b3).( ilast );
422 for( register int i = 2; i < ilast; i++ ) {
423 outputcxx . . $ _SoNurbsMesher#output(d4f767463ce0a6b3).( i );
424 swapMeshcxx . . $ _SoNurbsMesher#swapMesh(49f6e7a06ebc5aa8).();
425 }
426 copycxx . . $ _SoNurbsMesher#copy(3e454b8ccf442868).( ilast-1, ilast );
427 } else if( equalcxx . . $ _SoNurbsMesher#equal(9b79fb6aee4c0440).( ilast-1, ilast-2) ) {
428 outputcxx . . $ _SoNurbsMesher#output(d4f767463ce0a6b3).( ilast );
429 swapMeshcxx . . $ _SoNurbsMesher#swapMesh(49f6e7a06ebc5aa8).();
430 for( register int i = ilast-3; i >= 0; i-- ) {
431 swapMeshcxx . . $ _SoNurbsMesher#swapMesh(49f6e7a06ebc5aa8).();
432 outputcxx . . $ _SoNurbsMesher#output(d4f767463ce0a6b3).( i );
433 }
434 copycxx . . $ _SoNurbsMesher#copy(3e454b8ccf442868).( ilast, 0 );
435 } else {
436 closeMeshcxx . . $ _SoNurbsMesher#closeMesh(49f6e7a06ebc5aa8).(); openMeshcxx . . $ _SoNurbsMesher#openMesh(49f6e7a06ebc5aa8).();
437 outputcxx . . $ _SoNurbsMesher#output(d4f767463ce0a6b3).( 0 );
438 outputcxx . . $ _SoNurbsMesher#output(d4f767463ce0a6b3).( ilast );
439 for( register int i = 1; i < ilast; i++ ) {
440 outputcxx . . $ _SoNurbsMesher#output(d4f767463ce0a6b3).( i );
441 swapMeshcxx . . $ _SoNurbsMesher#swapMesh(49f6e7a06ebc5aa8).();
442 }
443 copycxx . . $ _SoNurbsMesher#copy(3e454b8ccf442868).( ilast-1, ilast );
444 }
445
446 lastedgecxx . . $ _SoNurbsMesher#lastedge. = 0;
447 //for( register long k=0; k<ilast-1; k++ ) pop( k );
448 movecxx . . $ _SoNurbsMesher#move(3e454b8ccf442868).( 0, ilast-1 );
449 movecxx . . $ _SoNurbsMesher#move(3e454b8ccf442868).( 1, ilast );
450 itopcxx . . $ _SoNurbsMesher#itop. = 1;
451 } else {
452 if( ! isCwcxx . . $ _SoNurbsMesher#isCw(7864480464b09eea).( ilast ) ) return;
453 do {
454 itopcxx . . $ _SoNurbsMesher#itop.--;
455 } while( (itopcxx . . $ _SoNurbsMesher#itop. > 1) && isCwcxx . . $ _SoNurbsMesher#isCw(7864480464b09eea).( ilast ) );
456
457 if( equalcxx . . $ _SoNurbsMesher#equal(9b79fb6aee4c0440).( ilast-2, ilast-1) ) {
458 swapMeshcxx . . $ _SoNurbsMesher#swapMesh(49f6e7a06ebc5aa8).();
459 outputcxx . . $ _SoNurbsMesher#output(d4f767463ce0a6b3).( ilast );
460 for( register int i=ilast-3; i>=itopcxx . . $ _SoNurbsMesher#itop.-1; i--) {
461 outputcxx . . $ _SoNurbsMesher#output(d4f767463ce0a6b3).( i );
462 swapMeshcxx . . $ _SoNurbsMesher#swapMesh(49f6e7a06ebc5aa8).( );
463 }
464 copycxx . . $ _SoNurbsMesher#copy(3e454b8ccf442868).( itopcxx . . $ _SoNurbsMesher#itop.-1, ilast );
465 } else if( equalcxx . . $ _SoNurbsMesher#equal(9b79fb6aee4c0440).( itopcxx . . $ _SoNurbsMesher#itop.-1, itopcxx . . $ _SoNurbsMesher#itop.) ) {
466 outputcxx . . $ _SoNurbsMesher#output(d4f767463ce0a6b3).( ilast );
467 swapMeshcxx . . $ _SoNurbsMesher#swapMesh(49f6e7a06ebc5aa8).();
468 for( register int i=itopcxx . . $ _SoNurbsMesher#itop.+1; i<ilast; i++ ) {
469 swapMeshcxx . . $ _SoNurbsMesher#swapMesh(49f6e7a06ebc5aa8).( );
470 outputcxx . . $ _SoNurbsMesher#output(d4f767463ce0a6b3).( i );
471 }
472 copycxx . . $ _SoNurbsMesher#copy(3e454b8ccf442868).( ilast, ilast-1 );
473 } else {
474 closeMeshcxx . . $ _SoNurbsMesher#closeMesh(49f6e7a06ebc5aa8).(); openMeshcxx . . $ _SoNurbsMesher#openMesh(49f6e7a06ebc5aa8).();
475 outputcxx . . $ _SoNurbsMesher#output(d4f767463ce0a6b3).( ilast-1 );
476 outputcxx . . $ _SoNurbsMesher#output(d4f767463ce0a6b3).( ilast );
477 for( register int i=ilast-2; i>=itopcxx . . $ _SoNurbsMesher#itop.-1; i-- ) {
478 outputcxx . . $ _SoNurbsMesher#output(d4f767463ce0a6b3).( i );
479 swapMeshcxx . . $ _SoNurbsMesher#swapMesh(49f6e7a06ebc5aa8).( );
480 }
481 copycxx . . $ _SoNurbsMesher#copy(3e454b8ccf442868).( itopcxx . . $ _SoNurbsMesher#itop.-1, ilast );
482 }
483 //for( register int k=itop; k<ilast; k++ ) pop( k );
484 movecxx . . $ _SoNurbsMesher#move(3e454b8ccf442868).( itopcxx . . $ _SoNurbsMesher#itop., ilast );
485 }
486 }
487
488