netgen-6.2.1804/0000755000175000017500000000000013272137567012005 5ustar kurtkurtnetgen-6.2.1804/TODO0000644000175000017500000000000013272137567012463 0ustar kurtkurtnetgen-6.2.1804/py_tutorials/0000755000175000017500000000000013272137567014543 5ustar kurtkurtnetgen-6.2.1804/py_tutorials/exportNeutral.py0000644000175000017500000000104213272137567017766 0ustar kurtkurtimport sys def Export (mesh, filename): """ export Netgen mesh to neutral format """ print ("export mesh in neutral format to file = ", filename) f = open (filename, 'w') points = mesh.Points() print (len(points), file=f) for p in points: print (p.p[0], p.p[1], p.p[2], file=f) volels = mesh.Elements3D(); print (len(volels), file=f) for el in volels: print (el.index, end=" ", file=f) for p in el.points: print (p.nr, end=" ", file=f) print(file=f) netgen-6.2.1804/py_tutorials/mesh.py0000644000175000017500000000043613272137567016054 0ustar kurtkurtfrom netgen.meshing import * from netgen.csg import * geo = CSGeometry("shaft.geo") param = MeshingParameters() param.maxh = 10 print (param) m1 = GenerateMesh (geo, param) m1.SecondOrder() import exportNeutral exportNeutral.Export (m1, "shaft.mesh") Save (m1, "mesh.vol", geo) netgen-6.2.1804/py_tutorials/csg_first_example.py0000644000175000017500000000336313272137567020620 0ustar kurtkurtfrom netgen.csg import * import netgen.meshing as meshing #from OpenGL.GL import * #from OpenGL.GLU import * #from OpenGL.GLUT import * sp1 = Sphere (Pnt(0,0,0), 0.2) sp2 = Sphere (Pnt(0.5,0,0), 0.2) sp3 = Sphere (Pnt(0,0,0.5), 0.2) sp4 = Sphere (Pnt(0,0.2,0.7), 0.2) all = sp1+sp2+sp3+sp4 geom = CSGeometry() geom.Add (all) #vis = VS(geom) # vis.Draw() #window = 0 # glut window number #width, height = 500, 500 #def mydraw(): # glViewport(0, 0, width, height); # glMatrixMode(GL_PROJECTION); # glLoadIdentity(); # pnear = 0.1; # pfar = 10; # gluPerspective(20.0, 1.0*width / height, pnear, pfar); # glMatrixMode(GL_MODELVIEW); # glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT) # glLoadIdentity() # gluLookAt (0, 0, 6, 0, 0, 0, 0, 1, 0); ## glBegin(GL_QUADS) ## glColor4d(0.0, 1.0, 0.0, 0.0); ## glVertex3d(0.0,0.0,0.7) ## glVertex3d(1.0,0.0,2.1) ## glColor4d(1.0, 1.0, 1.0, 0.0); ## glVertex3d(1.0,1.0,0.2) ## glVertex3d(0.0,1.0,0.5) ## glEnd() # vis.Draw() # glutSwapBuffers() #glutInit("mainwin") # initialize glut #glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE | GLUT_ALPHA | GLUT_DEPTH) #glutInitWindowSize(width, height) # set window size #glutInitWindowPosition(0, 0) # set window position #window = glutCreateWindow(b"ngs") # create window with title #glutDisplayFunc(vis.Draw) # set draw function callback #glutIdleFunc(mydraw) # draw all the time #glutMainLoop() param = meshing.MeshingParameters(maxh=0.2) mesh = GenerateMesh (geom, param) mesh.Save ("test.vol") netgen-6.2.1804/py_tutorials/opengl.py0000644000175000017500000000321413272137567016401 0ustar kurtkurtfrom netgen.csg import * import netgen.meshing as meshing import libvisual from OpenGL.GLUT import * # import Window class from other file from opengl_window import Window sp1 = Sphere (Pnt(0,0,0), 0.2) sp2 = Sphere (Pnt(0.5,0,0), 0.2) all = sp1+sp2 geom = CSGeometry() geom.Add (all) param = meshing.MeshingParameters() param.maxh = 0.1 m1 = GenerateMesh (geom, param) vis = VS(geom) # window callback functions def mydraw(): vis.Draw() glutSwapBuffers() def mymouse(xold, yold, x, y, mode): MouseMove(vis,xold,yold, x,y, mode) # init glut and create window glutInit("mainwin") win_geom = Window( name=b"ngs", drawfunc=mydraw, mousefunc=mymouse) ########################################### # press ctrl+c to break loop while(True): for i in range(10000): glutMainLoopEvent() print('press ctrl+c to create second window!') ########################################### # create second window (transformation matrices are shared) vismesh = libvisual.meshvis.VS(m1) def mydraw2(): vismesh.Draw() glutSwapBuffers() win_mesh = Window( name=b"ngs2", drawfunc=mydraw2, mousefunc=mymouse) ########################################### # press ctrl+c to break loop try: while(True): for i in range(10000): glutMainLoopEvent() print('press ctrl+c to hide/destroy first window!') except: pass ########################################### ## BREAKS (on numericus) as soon as mouse touches remaining window ("Error of failed request: GLXBadContextTag") # glutDestroyWindow(win_geom.handle) ## WORKS glutHideWindow(win_geom.handle) try: while(True): glutMainLoopEvent() except: pass netgen-6.2.1804/py_tutorials/opengl_thread.py0000644000175000017500000000176713272137567017743 0ustar kurtkurtfrom netgen.csg import * import netgen.meshing as meshing import libvisual from OpenGL.GLUT import * # import Window class from other file from opengl_window import Window sp1 = Sphere (Pnt(0,0,0), 0.2) sp2 = Sphere (Pnt(0.5,0,0), 0.2) all = sp1+sp2 geom = CSGeometry() geom.Add (all) param = meshing.MeshingParameters() param.maxh = 0.1 m1 = GenerateMesh (geom, param) vis = VS(geom) # window callback functions def mydraw(): vis.Draw() glutSwapBuffers() def mymouse(xold, yold, x, y, mode): MouseMove(vis,xold,yold, x,y, mode) ########################################### glutInit("mainwin") # IMPORTANT: create window in the mainloop - thread! ## not working: #win_geom = Window( name=b"ngs", drawfunc=mydraw, mousefunc=mymouse) def runVisualization(): ## working: win_geom = Window( name=b"ngs", drawfunc=mydraw, mousefunc=mymouse) glutMainLoop() # create thread from threading import Thread thread = Thread(target = runVisualization) thread.start() thread.join() netgen-6.2.1804/py_tutorials/opengl_window.py0000644000175000017500000000364213272137567017775 0ustar kurtkurtfrom OpenGL.GL import * from OpenGL.GLU import * from OpenGL.GLUT import * class Window(): xold = -1; yold = -1; mode = 'r' modes = {0:'r', 1:'m', 2:'z'} drawfunc = None mousefunc = None def draw(self): glutSetWindow(self.handle) self.drawfunc() def __init__( self, name=b"Window", width=500, height=500, drawfunc=None, mousefunc=None ): # glutSetOption(GLUT_ACTION_ON_WINDOW_CLOSE,GLUT_ACTION_GLUTMAINLOOP_RETURNS) glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE | GLUT_ALPHA | GLUT_DEPTH) glutInitWindowSize(width, height) # set window size glutInitWindowPosition(0, 0) # set window position self.handle = glutCreateWindow(b"ngs") # create window with title glutMotionFunc(self.motionHandler) glutMouseFunc(self.mouseHandler) glutPassiveMotionFunc(self.passiveMotionHandler) glMatrixMode(GL_PROJECTION); glLoadIdentity(); pnear = 0.1; pfar = 10; gluPerspective(20.0, 1.0*width / height, pnear, pfar); glViewport(0, 0, width, height); glMatrixMode(GL_MODELVIEW); self.drawfunc = drawfunc self.mousefunc = mousefunc if drawfunc: glutDisplayFunc(self.draw) # set draw function callback def motionHandler(self, x, y ): self.mousefunc(self.xold,self.yold, x,y, self.mode) # 'm','z' self.xold = x self.yold = y glutPostRedisplay() def passiveMotionHandler(self, x, y ): self.xold = x self.yold = y def mouseHandler(self, button, state, x, y ): print(button,state,x,y) if button<3: if state==0: self.mode = self.modes[button] else: self.mode = 'r' glutInit("mainwin") # initialize glut netgen-6.2.1804/py_tutorials/shaft.geo0000644000175000017500000000435713272137567016355 0ustar kurtkurt# ## Crankshaft # algebraic3d solid p1 = plane (0, 0, 0; -1, 0, 0) and plane (10, 0, 0; 1, 0, 0) and ( plane (35, 0, 28; 0, -1, 3) and plane (35, 0, -28; 0, -1, -3) and plane (35, 0, 0; 0, 1, 0) and plane (35, -30, 0; 0, -1, 0) or cylinder (-10, 0, 0; 20, 0, 0; 30) or cylinder (-10, -30, 0; 20, -30, 0; 20) ); solid p2 = plane (35, 0, 0; -1, 0, 0) and plane (45, 0, 0; 1, 0, 0) and ( plane (35, 0, 28; 0, -1, 3) and plane (35, 0, -28; 0, -1, -3) and plane (35, 0, 0; 0, 1, 0) and plane (35, -30, 0; 0, -1, 0) or cylinder (30, 0, 0; 50, 0, 0; 30) or cylinder (30, -30, 0; 50, -30, 0; 20) ); solid p3 = plane (80, 0, 0; -1, 0, 0) and plane (90, 0, 0; 1, 0, 0) and ( plane (0, 0, 28; 0, 1, 3) and plane (0, 0, -28; 0, 1, -3) and plane (0, 0, 0; 0, -1, 0) and plane (0, 30, 0; 0, 1, 0) or cylinder (70, 0, 0; 100, 0, 0; 30) or cylinder (70, 30, 0; 100, 30, 0; 20) ); solid p4 = plane (115, 0, 0; -1, 0, 0) and plane (125, 0, 0; 1, 0, 0) and ( plane (35, 0, 28; 0, 1, 3) and plane (35, 0, -28; 0, 1, -3) and plane (35, 0, 0; 0, -1, 0) and plane (35, 30, 0; 0, 1, 0) or cylinder (110, 0, 0; 130, 0, 0; 30) or cylinder (110, 30, 0;130, 30, 0; 20) ); solid sh1 = cylinder (-50, 0, 0; 10, 0, 0; 15) and plane (-40, 0, 0; -1, 0, 0) and plane (5, 0, 0; 1, 0, 0); solid sh2 = cylinder (30, 0, 0; 90, 0, 0; 15) and plane (40, 0, 0; -1, 0, 0) and plane (85, 0, 0; 1, 0, 0); solid sh3 = cylinder (110, 0, 0; 170, 0, 0; 15) and plane (120, 0, 0; -1, 0, 0) and plane (165, 0, 0; 1, 0, 0); solid pl1 = cylinder (0, -30, 0; 50, -30, 0; 10) and plane (5, 0, 0; -1, 0, 0) and plane (40, 0, 0; 1, 0, 0); solid pl2 = cylinder (80, 30, 0; 130, 30, 0; 10) and plane (85, 0, 0; -1, 0, 0) and plane (120, 0, 0; 1, 0, 0); # # solid main = p1 or p2 or p3 or p4 or sh1 or sh2 or sh3 or pl1 or pl2; tlo main; netgen-6.2.1804/py_tutorials/merge.py0000644000175000017500000000336613272137567016224 0ustar kurtkurtfrom netgen.meshing import * from netgen.csg import * from ngsolve import ngsglobals ngsglobals.msg_level = 2 # generate brick and mesh it geo1 = CSGeometry() geo1.Add (OrthoBrick( Pnt(0,0,0), Pnt(1,1,1) )) m1 = geo1.GenerateMesh (maxh=0.1) m1.Refine() # generate sphere and mesh it geo2 = CSGeometry() geo2.Add (Sphere (Pnt(0.5,0.5,0.5), 0.1)) m2 = geo2.GenerateMesh (maxh=0.05) m2.Refine() m2.Refine() print ("***************************") print ("** merging suface meshes **") print ("***************************") # create an empty mesh mesh = Mesh() # a face-descriptor stores properties associated with a set of surface elements # bc .. boundary condition marker, # domin/domout .. domain-number in front/back of surface elements (0 = void), # surfnr .. number of the surface described by the face-descriptor fd_outside = mesh.Add (FaceDescriptor(bc=1,domin=1,surfnr=1)) fd_inside = mesh.Add (FaceDescriptor(bc=2,domin=2,domout=1,surfnr=2)) # copy all boundary points from first mesh to new mesh. # pmap1 maps point-numbers from old to new mesh pmap1 = { } for e in m1.Elements2D(): for v in e.vertices: if (v not in pmap1): pmap1[v] = mesh.Add (m1[v]) # copy surface elements from first mesh to new mesh # we have to map point-numbers: for e in m1.Elements2D(): mesh.Add (Element2D (fd_outside, [pmap1[v] for v in e.vertices])) # same for the second mesh: pmap2 = { } for e in m2.Elements2D(): for v in e.vertices: if (v not in pmap2): pmap2[v] = mesh.Add (m2[v]) for e in m2.Elements2D(): mesh.Add (Element2D (fd_inside, [pmap2[v] for v in e.vertices])) print ("******************") print ("** merging done **") print ("******************") mesh.GenerateVolumeMesh() mesh.Save ("newmesh.vol") netgen-6.2.1804/py_tutorials/cube.geo0000644000175000017500000000046013272137567016155 0ustar kurtkurt# ## A cube # algebraic3d # cube consisting of 6 planes: solid cube = plane (0, 0, 0; 0, 0, -1) and plane (0, 0, 0; 0, -1, 0) and plane (0, 0, 0; -1, 0, 0) and plane (1, 1, 1; 0, 0, 1) and plane (1, 1, 1; 0, 1, 0) and plane (1, 1, 1; 1, 0, 0); tlo cube; netgen-6.2.1804/py_tutorials/CMakeLists.txt0000644000175000017500000000026213272137567017303 0ustar kurtkurtinstall( FILES shaft.geo mesh.py exportNeutral.py DESTINATION ${NG_INSTALL_DIR_RES}/${NG_INSTALL_SUFFIX}/py_tutorials COMPONENT netgen_tutorial ) netgen-6.2.1804/rules/0000755000175000017500000000000013272137567013137 5ustar kurtkurtnetgen-6.2.1804/rules/pyramids.rls0000644000175000017500000000471713272137567015522 0ustar kurtkurttolfak 0.5 rule "Pyramid on quad" quality 100 mappoints (0, 0, 0); (1, 0, 0); (1, 1, 0); (0, 1, 0); mapfaces (1, 2, 3, 4) del; newpoints (0.5, 0.5, -0.5) { 0.25 X1, 0.25 X2, 0.25 X3, 0.25 X4 } { 0.25 Y1, 0.25 Y2, 0.25 Y3, 0.25 Y4 } { }; newfaces (1, 2, 5); (2, 3, 5); (3, 4, 5); (4, 1, 5); elements (1, 2, 3, 4, 5); freezone2 { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { 1.4 P5, -0.1 P1, -0.1 P2, -0.1 P3, -0.1 P4 }; freezonelimit { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { 1 P5 }; freeset 1 2 3 5; freeset 1 3 4 5; endrule rule "small Pyramid on quad" quality 100 mappoints (0, 0, 0); (1, 0, 0); (1, 1, 0); (0, 1, 0); mapfaces (1, 2, 3, 4) del; newpoints (0.5, 0.5, -0.1 ) { 0.25 X1, 0.25 X2, 0.25 X3, 0.25 X4 } { 0.25 Y1, 0.25 Y2, 0.25 Y3, 0.25 Y4 } { }; newfaces (1, 2, 5); (2, 3, 5); (3, 4, 5); (4, 1, 5); elements (1, 2, 3, 4, 5); freezone2 { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { 1.4 P5, -0.1 P1, -0.1 P2, -0.1 P3, -0.1 P4 }; freezonelimit { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { 1 P5 }; freeset 1 2 3 5; freeset 1 3 4 5; endrule rule "connect pyramid" quality 1 mappoints (0, 0, 0); (1, 0, 0); (1, 1, 0); (0, 1, 0); (0.5, 0.5, -0.5); mapfaces (1, 2, 3, 4) del; newpoints newfaces (1, 2, 5); (2, 3, 5); (3, 4, 5); (4, 1, 5); elements (1, 2, 3, 4, 5); freezone2 { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { 1 P5 }; freeset 1 2 3 5; freeset 1 3 4 5; endrule rule "pyramid with one trig" quality 1 mappoints (0, 0, 0); (1, 0, 0); (1, 1, 0); (0, 1, 0); (0.5, 0.5, -0.5); mapfaces (1, 2, 3, 4) del; (2, 1, 5) del; newpoints newfaces (2, 3, 5); (3, 4, 5); (4, 1, 5); elements (1, 2, 3, 4, 5); freezone2 { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { 1 P5 }; { 0.34 P2, 0.34 P3, 0.34 P5, -0.02 P1 }; { 0.34 P3, 0.34 P4, 0.34 P5, -0.02 P1 }; { 0.34 P1, 0.34 P4, 0.34 P5, -0.02 P3 }; freezonelimit { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { 1 P5 }; { 0.333 P2, 0.333 P3, 0.334 P5, 0 P1 }; { 0.333 P3, 0.333 P4, 0.334 P5, 0 P1 }; { 0.333 P1, 0.333 P4, 0.334 P5, 0 P3 }; orientations (1, 2, 3, 5); (1, 3, 4, 5); freeset 1 2 3 5; freeset 1 3 4 5; freeset 2 3 5 6; freeset 3 4 5 7; freeset 1 4 5 8; endrule rule "pyramid with two trig" quality 1 mappoints (0, 0, 0); (1, 0, 0); (1, 1, 0); (0, 1, 0); (0.5, 0.5, -0.5); mapfaces (1, 2, 3, 4) del; (2, 1, 5) del; (3, 2, 5) del; newpoints newfaces (3, 4, 5); (4, 1, 5); elements (1, 2, 3, 4, 5); freezone2 { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { 1 P5 }; freeset 1 2 3 5; freeset 1 3 4 5; endrule netgen-6.2.1804/rules/pyramids2.rls0000644000175000017500000000547113272137567015602 0ustar kurtkurttolfak 0.5 rule "Pyramid on quad" quality 100 mappoints (0, 0, 0); (1, 0, 0); (1, 1, 0); (0, 1, 0); mapfaces (1, 2, 3, 4) del; newpoints (0.5, 0.5, -0.5) { 0.25 X1, 0.25 X2, 0.25 X3, 0.25 X4 } { 0.25 Y1, 0.25 Y2, 0.25 Y3, 0.25 Y4 } { }; newfaces (1, 2, 5); (2, 3, 5); (3, 4, 5); (4, 1, 5); elements (1, 2, 3, 4, 5); freezone2 { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { 1.4 P5, -0.1 P1, -0.1 P2, -0.1 P3, -0.1 P4 }; freezonelimit { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { 1 P5 }; freeset 1 2 3 5; freeset 1 3 4 5; endrule rule "small Pyramid on quad" quality 100 mappoints (0, 0, 0); (1, 0, 0); (1, 1, 0); (0, 1, 0); mapfaces (1, 2, 3, 4) del; newpoints (0.5, 0.5, -0.1 ) { 0.25 X1, 0.25 X2, 0.25 X3, 0.25 X4 } { 0.25 Y1, 0.25 Y2, 0.25 Y3, 0.25 Y4 } { }; newfaces (1, 2, 5); (2, 3, 5); (3, 4, 5); (4, 1, 5); elements (1, 2, 3, 4, 5); freezone2 { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { 1.4 P5, -0.1 P1, -0.1 P2, -0.1 P3, -0.1 P4 }; freezonelimit { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { 1 P5 }; freeset 1 2 3 5; freeset 1 3 4 5; endrule rule "connect pyramid" quality 100 mappoints (0, 0, 0); (1, 0, 0); (1, 1, 0); (0, 1, 0); (0.5, 0.5, -0.5); mapfaces (1, 2, 3, 4) del; newpoints newfaces (1, 2, 5); (2, 3, 5); (3, 4, 5); (4, 1, 5); elements (1, 2, 3, 4, 5); freezone2 { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { 1 P5 }; freeset 1 2 3 5; freeset 1 3 4 5; endrule rule "pyramid with one trig" quality 1 mappoints (0, 0, 0); (1, 0, 0); (1, 1, 0); (0, 1, 0); (0.5, 0.5, -0.5); mapfaces (1, 2, 3, 4) del; (2, 1, 5) del; newpoints newfaces (2, 3, 5); (3, 4, 5); (4, 1, 5); elements (1, 2, 3, 4, 5); freezone2 { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { 1 P5 }; { 0.34 P2, 0.34 P3, 0.34 P5, -0.02 P1 }; { 0.34 P3, 0.34 P4, 0.34 P5, -0.02 P1 }; { 0.34 P1, 0.34 P4, 0.34 P5, -0.02 P2 }; freezonelimit { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { 1 P5 }; { 0.333 P2, 0.333 P3, 0.334 P5, 0 P1 }; { 0.333 P3, 0.333 P4, 0.334 P5, 0 P1 }; { 0.333 P1, 0.333 P4, 0.334 P5, 0 P2 }; orientations (1, 2, 3, 5); (1, 3, 4, 5); freeset 1 2 3 5; freeset 1 3 4 5; freeset 2 3 5 6; freeset 3 4 5 7; freeset 1 4 5 8; endrule rule "pyramid with two trig" quality 1 mappoints (0, 0, 0); (1, 0, 0); (1, 1, 0); (0, 1, 0); (0.5, 0.5, -0.5); mapfaces (1, 2, 3, 4) del; (2, 1, 5) del; (3, 2, 5) del; newpoints newfaces (3, 4, 5); (4, 1, 5); elements (1, 2, 3, 4, 5); freezone2 { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { 1 P5 }; freeset 1 2 3 5; freeset 1 3 4 5; endrule rule "pyramid with two trig, left" quality 1 mappoints (0, 0, 0); (1, 0, 0); (1, 1, 0); (0, 1, 0); (0.5, 0.5, -0.5); mapfaces (1, 2, 3, 4) del; (2, 1, 5) del; (1, 4, 5) del; newpoints newfaces (3, 4, 5); (2, 3, 5); elements (1, 2, 3, 4, 5); freezone2 { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { 1 P5 }; freeset 1 2 3 5; freeset 1 3 4 5; endrule netgen-6.2.1804/rules/triangle.rls0000644000175000017500000001172213272137567015471 0ustar kurtkurtrule "Free Triangle (1)" quality 1 mappoints (0, 0); (1, 0) { 1.0, 0, 1.0 }; maplines (1, 2) del; newpoints (0.5, 0.866) { 0.5 X2 } { }; newlines (1, 3); (3, 2); freearea (0, 0); (1, 0) { 1 X2 } { }; (1.5, 0.7) { 0.5 X2 } { }; (0.5, 1.5) { 0.5 X2 } { }; (-0.5, 0.7) { 0.5 X2 } { }; freearea2 (0, 0); (1, 0) { 1 X2 } { }; (0.5, 0.866) { 0.5 X2 } { }; (0.5, 0.866) { 0.5 X2 } { }; (0.5, 0.866) { 0.5 X2 } { }; elements (1, 2, 3); endrule rule "Free Triangle (5)" quality 5 mappoints (0, 0); (1, 0) { 1.0, 0, 1.0 }; maplines (1, 2) del; newpoints (0.5, 0.5) { 0.5 X2 } { }; newlines (1, 3); (3, 2); freearea (0, 0); (1, 0) { 1 X2 } { }; (1, 0.7) { 1 X2 } { }; (0, 0.7) { } { }; freearea2 (0, 0); (1, 0) { 1 X2 } { }; (0.5, 0.5) { 0.5 X2 } { }; (0.5, 0.5) { 0.5 X2 } { }; elements (1, 2, 3); endrule rule "Free Triangle (10)" quality 10 mappoints (0, 0); (1, 0) { 1.0, 0, 1.0 }; maplines (1, 2) del; newpoints (0.5, 0.3) { 0.5 X2 } { }; newlines (1, 3); (3, 2); freearea (0, 0); (1, 0) { 1 X2 } { }; (1, 0.5) { 1 X2 } { }; (0, 0.5) { } { }; freearea2 (0, 0); (1, 0) { 1 X2 } { }; (0.5, 0.3) { 0.5 X2 } { }; (0.5, 0.3) { 0.5 X2 } { }; elements (1, 2, 3); endrule rule "Free Triangle (20)" quality 20 mappoints (0, 0); (1, 0) { 1.0, 0, 1.0 }; maplines (1, 2) del; newpoints (0.5, 0.1) { 0.5 X2 } { }; newlines (1, 3); (3, 2); freearea (0, 0); (1, 0) { 1 X2 } { }; (1, 0.2) { 1 X2 } { }; (0, 0.2) { } { }; freearea2 (0, 0); (1, 0) { 1 X2 } { }; (0.5, 0.1) { 0.5 X2 } { }; (0.5, 0.1) { 0.5 X2 } { }; elements (1, 2, 3); endrule rule "Right 60 (1)" quality 1 mappoints (0, 0); (1, 0) { 0.5, 0, 1.0 }; (0.5, 0.866) { 0.6, 0, 0.8 }; maplines (1, 2) del; (2, 3) del; newpoints newlines (1, 3); freearea (0, 0); (1, 0) { 1 X2 } { }; (0.5, 0.866) { 1 X3 } { 1 Y3 }; (-0.125, 0.6495) { -0.5 X2, 0.75 X3 } { -0.5 Y2, 0.75 Y3 }; freearea2 (0, 0); (1, 0) { 1 X2 } { }; (0.5, 0.866) { 1 X3 } { 1 Y3 }; (0.25, 0.433) { 0.5 X3 } { 0.5 Y3 }; elements (1, 2, 3); endrule rule "Left 60 (1)" quality 1 mappoints (0, 0); (1, 0); (0.5, 0.866); maplines (1, 2) del; (3, 1) del; newpoints newlines (3, 2); freearea (0, 0); (1, 0) { 1 X2 } { }; (1.125, 0.6495) { 0.75 X2, 0.75 X3 } { 0.75 Y3 }; (0.5, 0.866) { 1 X3 } { 1 Y3 }; freearea2 (0, 0); (1, 0) { 1 X2 } { }; (0.75, 0.433) { 0.5 X2, 0.5 X3 } { 0.5 Y2, 0.5 Y3 }; (0.5, 0.866) { 1 X3 } { 1 Y3 }; elements (1, 2, 3); endrule rule "Right 120 (1)" quality 1 mappoints (0, 0); (1, 0); (1.5, 0.866); maplines (1, 2) del; (2, 3) del; newpoints (0.5, 0.866) { 1 X3, -1 X2 } { 1 Y3 }; newlines (1, 4); (4, 3); freearea (0, 0); (1, 0) { 1 X2 } { }; (1.5, 0.866) { 1 X3 } { 1 Y3 }; (1, 1.732) { -2 X2, 2 X3 } { 2 Y3 }; (0, 1.732) { -3 X2, 2 X3 } { 2 Y3 }; (-0.5, 0.866) { -2 X2, 1 X3 } {1 Y3 }; elements (1, 2, 4); (2, 3, 4); endrule rule "Left 120 (1)" quality 1 mappoints (0, 0); (1, 0); (-0.5, 0.866); maplines (1, 2) del; (3, 1) del; newpoints (0.5, 0.866) { 1 X3, 1 X2 } { 1 Y3 }; newlines (3, 4); (4, 2); freearea (0, 0); (1, 0) { 1 X2 } { }; (1.5, 0.866) { 2 X2, 1 X3 } { 1 Y3 }; (1, 1.732) { 2 X2, 2 X3 } { 2 Y3 }; (0, 1.732) { 1 X2, 2 X3 } { 2 Y3 }; (-0.5, 0.866) { 1 X3 } {1 Y3 }; elements (1, 2, 4); (1, 4, 3); endrule rule "Left Right 120 (1)" quality 1 mappoints (0, 0); (1, 0); (-0.5, 0.866); (1.5, 0.866); maplines (1, 2) del; (3, 1) del; (2, 4) del; newpoints (0.5, 0.866) { 0.5 X3, 0.5 X4 } { 0.5 Y3, 0.5 Y4 }; newlines (3, 5); (5, 4); freearea (0, 0); (1, 0) { 1 X2 } { }; (1.5, 0.866) { 1 X4 } { 1 Y4 }; (1, 1.299) { -0.5 X2, 0.375 X3, 1.125 X4 } { -0.5 Y2, 0.375 Y3, 1.125 Y4 }; (0, 1.299) { 1.125 X3, 0.375 X4 } { 1.125 Y3, 0.375 Y4 }; (-0.5, 0.866) { 1 X3 } { 1 Y3 }; elements (1, 2, 5); (3, 1, 5); (2, 4, 5); endrule rule "Fill Triangle" quality 1 mappoints (0, 0); (1, 0); (0.5, 0.866); maplines (1, 2) del; (2, 3) del; (3, 1) del; newpoints newlines freearea (0, 0); (1, 0) { 1 X2 } { 1 Y2 }; (0.5, 0.866) { 1 X3 } { 1 Y3 }; elements (1, 2, 3); endrule rule "Vis A Vis (1)" quality 1 mappoints (0, 0); (1, 0); (0.5, 0.866); maplines (1, 2) del; newpoints newlines (1, 3); (3, 2); freearea (0, 0); (1, 0) { 1 X2 } { }; (1.2, 0.693) { 0.8 X2, 0.8 X3 } { 0.8 Y2, 0.8 Y3 }; (0.5, 0.866) { 1 X3 } { 1 Y3 }; (-0.2, 0.693) { -0.6 X2, 0.8 X3 } { -0.6 Y2, 0.8 Y3 }; freearea2 (0, 0); (1, 0) { 1 X2 } { }; (0.75, 0.433) { 0.5 X2, 0.5 X3 } { 0.5 Y2, 0.5 Y3 }; (0.5, 0.866) { 1 X3 } { 1 Y3 }; (0.25, 0.433) { 0.5 X3 } { 0.5 Y3 }; elements (1, 2, 3); endrule rule "2 h Vis A Vis (1)" quality 3 mappoints (0, 0); (1, 0); (1, 1.732); (0, 1.732); maplines (1, 2) del; (3, 4) del; newpoints (0.5, 0.866) { 0.25 X2, 0.25 X3, 0.25 X4 } { 0.25 Y2, 0.25 Y3, 0.25 Y4 }; newlines (1, 5); (5, 4); (3, 5); (5, 2); freearea (0, 0); (1, 0) { 1 X2 } { 1 Y2 }; (1.5, 0.866) { 0.75 X2, 0.75 X3, -0.25 X4 } { 0.75 Y2, 0.75 Y3, -0.25 Y4 }; (1, 1.732) { 1 X3 } { 1 Y3 }; (0, 1.732) { 1 X4 } { 1 Y4 }; (-0.5, 0.866) { 0.75 X4, -0.25 X2, -0.25 X3 } { 0.75 Y4, -0.25 Y3 }; elements (1, 2, 5); (3, 4, 5); endrule netgen-6.2.1804/rules/makerlsfile.cpp0000644000175000017500000000202613272137567016141 0ustar kurtkurt#include #include #include using namespace std; #define maxlen 1000 int main (int argc, char ** argv) { if (argc != 3) { cout << "use: makerlsfile infile outfile" << endl; exit(1); } char line[maxlen], infile[maxlen], outfile[maxlen];\ char ch; int i, j; /* cout << "infile: "; cin >> infile; cout << "outfile: "; cin >> outfile; */ ifstream inf (argv[1]); ofstream outf (argv[2]); outf << "const char * ngscript[] = {" << endl; while (inf.good()) { i = 0; inf.get(ch); while (ch != '\n' && inf.good() && i < maxlen) { if (ch == '\"') { line[i] = '\\'; line[i+1] = '\"'; i+= 2; } else if (ch == '\\') { line[i] = '\\'; line[i+1] = '\\'; i+= 2; } else { line[i] = ch; i++; } inf.get(ch); } line[i] = 0; cout << line << endl; outf << "\"" << line << "\\n\",\\" << endl; } outf << "0};" << endl; return 0; } netgen-6.2.1804/rules/prisms2.rls0000644000175000017500000001033313272137567015260 0ustar kurtkurttolfak 0.5 rule "prism on quad" quality 1 mappoints (0, 0, 0); (1, 0, 0); (1, 1, 0); (0, 1, 0); (0.5, 0, -0.86); (0.5, 1, -0.86); mapfaces (1, 2, 3, 4) del; (1, 5, 2) del; (4, 3, 6) del; newpoints newfaces (5, 2, 3, 6); (1, 5, 6, 4); elements (1, 5, 2, 4, 6, 3); orientations (1, 2, 3, 5); (1, 3, 4, 6); freezone2 { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { 1 P5 }; { 1 P6 }; { 0.3 P1, -0.1 P2, -0.1 P3, 0.3 P4, 0.3 P5, 0.3 P6 }; { -0.1 P1, 0.3 P2, 0.3 P3, -0.1 P4, 0.3 P5, 0.3 P6 }; freezonelimit { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { 1 P5 }; { 1 P6 }; { 0.25 P1, 0 P2, 0 P3, 0.25 P4, 0.25 P5, 0.25 P6 }; { 0 P1, 0.25 P2, 0.25 P3, 0 P4, 0.25 P5, 0.25 P6 }; freeset 1 2 4 5 6 7; freeset 2 3 4 5 6 8; endrule rule "prism on quad, one trig" quality 2 mappoints (0, 0, 0); (1, 0, 0); (1, 1, 0); (0, 1, 0); (0.5, 0, -0.86); (0.5, 1, -0.86); mapfaces (1, 2, 3, 4) del; (1, 5, 2) del; newpoints newfaces (5, 2, 3, 6); (1, 5, 6, 4); (4, 6, 3); elements (1, 5, 2, 4, 6, 3); orientations (1, 2, 3, 5); (1, 3, 4, 6); freezone2 { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { 1 P5 }; { 1 P6 }; { 0.3 P1, -0.1 P2, -0.1 P3, 0.3 P4, 0.3 P5, 0.3 P6 }; { -0.1 P1, 0.3 P2, 0.3 P3, -0.1 P4, 0.3 P5, 0.3 P6 }; freezonelimit { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { 1 P5 }; { 1 P6 }; { 0.25 P1, 0 P2, 0 P3, 0.25 P4, 0.25 P5, 0.25 P6 }; { 0 P1, 0.25 P2, 0.25 P3, 0 P4, 0.25 P5, 0.25 P6 }; freeset 1 2 4 5 6 7; freeset 2 3 4 5 6 8; endrule rule "prism on 2 quad" quality 1 mappoints (0, 0, 0); (1, 0, 0); (1, 1, 0); (0, 1, 0); (0.5, 0, -0.86); (0.5, 1, -0.86); mapfaces (1, 2, 3, 4) del; (2, 5, 6, 3) del; (1, 5, 2) del; (4, 3, 6) del; newpoints newfaces (1, 5, 6, 4); elements (1, 5, 2, 4, 6, 3); freezone2 { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { 1 P5 }; { 1 P6 }; { 0.3 P1, -0.1 P2, -0.1 P3, 0.3 P4, 0.3 P5, 0.3 P6 }; freezonelimit { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { 1 P5 }; { 1 P6 }; { 0.25 P1, 0 P2, 0 P3, 0.25 P4, 0.25 P5, 0.25 P6 }; freeset 1 2 4 5 6 7; freeset 2 3 4 6; endrule rule "prism on 2 quad, one trig" quality 2 mappoints (0, 0, 0); (1, 0, 0); (1, 1, 0); (0, 1, 0); (0.5, 0, -0.86); (0.5, 1, -0.86); mapfaces (1, 2, 3, 4) del; (2, 5, 6, 3) del; (1, 5, 2) del; newpoints newfaces (1, 5, 6, 4); (4, 6, 3); elements (1, 5, 2, 4, 6, 3); freezone2 { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { 1 P5 }; { 1 P6 }; { 0.3 P1, -0.1 P2, -0.1 P3, 0.3 P4, 0.3 P5, 0.3 P6 }; freezonelimit { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { 1 P5 }; { 1 P6 }; { 0.25 P1, 0 P2, 0 P3, 0.25 P4, 0.25 P5, 0.25 P6 }; freeset 1 2 4 5 6 7; freeset 2 3 4 6; endrule rule "prism on 2 quada" quality 1 mappoints (0, 0, 0); (1, 0, 0); (1, 1, 0); (0, 1, 0); (0.5, 0, -0.86); (0.5, 1, -0.86); mapfaces (1, 2, 3, 4) del; (5, 1, 4, 6) del; (1, 5, 2) del; (4, 3, 6) del; newpoints newfaces (5, 2, 3, 6); elements (1, 5, 2, 4, 6, 3); freezone2 { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { 1 P5 }; { 1 P6 }; { -0.1 P1, 0.3 P2, 0.3 P3, -0.1 P4, 0.3 P5, 0.3 P6 }; freezonelimit { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { 1 P5 }; { 1 P6 }; { 0 P1, 0.25 P2, 0.25 P3, 0 P4, 0.25 P5, 0.25 P6 }; freeset 1 2 3 5 6 7; freeset 1 3 4 6; endrule rule "fill prism" quality 1 mappoints (0, 0, 0); (1, 0, 0); (1, 1, 0); (0, 1, 0); (0.5, 0, -0.86); (0.5, 1, -0.86); mapfaces (1, 2, 3, 4) del; (2, 5, 6, 3) del; (5, 1, 4, 6) del; (1, 5, 2) del; (4, 3, 6) del; newpoints newfaces elements (1, 5, 2, 4, 6, 3); freezone2 { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { 1 P5 }; { 1 P6 }; freeset 1 2 4 5; freeset 2 3 4 6; endrule rule "prism on 3 quad, one trig" quality 2 mappoints (0, 0, 0); (1, 0, 0); (1, 1, 0); (0, 1, 0); (0.5, 0, -0.86); (0.5, 1, -0.86); mapfaces (1, 2, 3, 4) del; (2, 5, 6, 3) del; (5, 1, 4, 6) del; (1, 5, 2) del; newpoints newfaces (4, 6, 3); elements (1, 5, 2, 4, 6, 3); freezone2 { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { 1 P5 }; { 1 P6 }; freeset 1 2 4 5; freeset 2 3 4 6; endrule rule "flat prism" quality 100 mappoints (0, 0, 0); (1, 0, 0); (0.5, 0.866, 0); (0, 0, -1); (1, 0, -1); (0.5, 0.866, -1); mapfaces (1, 2, 3) del; (5, 4, 6) del; newpoints newfaces (1, 2, 4); (4, 2, 5); (2, 3, 5); (5, 3, 6); (3, 1, 6); (6, 1, 4); elements (1, 2, 3, 5, 4, 6); freezone2 { 1 P1 }; { 1 P2 }; { 1 P5 }; { 1 P6 }; endrule netgen-6.2.1804/rules/tetra.rls0000644000175000017500000004302213272137567015001 0ustar kurtkurttolfak 0.5 rule "Free Tetrahedron" quality 1 mappoints (0, 0, 0); (1, 0, 0); (0.5, 0.866, 0); mapfaces (1, 2, 3) del; newpoints (0.5, 0.288, -0.816) { 0.333 X1, 0.333 X2, 0.333 X3 } { 0.333 Y1, 0.333 Y2, 0.333 Y3 } { }; newfaces (4, 1, 2); (4, 2, 3); (4, 3, 1); elements (1, 2, 3, 4); freezone2 { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1.6 P4, -0.2 P1, -0.2 P2, -0.2 P3 }; { -0.5 P1, 0.5 P2, 0.5 P3, 0.5 P4 }; { 0.5 P1, -0.5 P2, 0.5 P3, 0.5 P4 }; { 0.5 P1, 0.5 P2, -0.5 P3, 0.5 P4 }; endrule rule "Tetrahedron 60" quality 1 flags c; mappoints (0, 0, 0); (1, 0, 0) { 0.5 } ; (0.5, 0.866, 0) { 0.5 }; (0.5, 0.288, -0.816) { 0.5 }; mapfaces (1, 2, 3) del; (1, 4, 2) del; newpoints newfaces (1, 4, 3); (4, 2, 3); elements (1, 2, 3, 4); freezone2 { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { -0.35 P1, 0.45 P2, 0.45 P3, 0.45 P4 }; { 0.45 P1, -0.35 P2, 0.45 P3, 0.45 P4 }; { -0.05 P1, -0.05 P2, 0.7 P3, 0.4 P4 }; freezonelimit { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { 0.3333 P2, 0.3333 P3, 0.3334 P4 }; { 0.3333 P1, 0.3333 P3, 0.3334 P4 }; { 0.65 P3, 0.35 P4 }; endrule rule "Tetrahedron 60 with edge(1)" quality 1 flags c; mappoints (0, 0, 0); (1, 0, 0) { 0.8 }; (0.5, 0.866, 0) { 0.8 }; (0.5, 0.288, -0.816) { 0.8 }; mapfaces (1, 2, 3) del; (1, 4, 2) del; mapedges (3, 4); newpoints newfaces (1, 4, 3); (4, 2, 3); elements (1, 2, 3, 4); freezone2 { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { 0.4 P1, 0.4 P4, 0.4 P3, -0.2 P2 }; { 0.4 P2, 0.4 P4, 0.4 P3, -0.2 P1 }; freezonelimit { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { 0.3333 P1, 0.3333 P4, 0.3334 P3 }; { 0.3333 P2, 0.3333 P4, 0.3334 P3 }; endrule rule "Tetrahedron Vis a Vis Point (1)" quality 1 mappoints (0, 0, 0); (1, 0, 0) { 0.5 }; (0.5, 0.866, 0) { 0.5 }; (0.5, 0.288, -0.816) { 0.5 }; mapfaces (1, 2, 3) del; newpoints newfaces (4, 3, 1); (4, 2, 3); (4, 1, 2); elements (1, 2, 3, 4); freezone2 { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { -0.5 P1, 0.5 P2, 0.5 P3, 0.5 P4 }; { 0.5 P1, -0.5 P2, 0.5 P3, 0.5 P4 }; { 0.5 P1, 0.5 P2, -0.5 P3, 0.5 P4 }; { 0.8 P1, -0.1 P2, -0.1 P3, 0.4 P4 }; { -0.1 P1, 0.8 P2, -0.1 P3, 0.4 P4 }; { -0.1 P1, -0.1 P2, 0.8 P3, 0.4 P4 }; freezonelimit { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { 0.3333 P2, 0.3333 P3, 0.3334 P4 }; { 0.3333 P1, 0.3333 P3, 0.3334 P4 }; { 0.3333 P1, 0.3333 P2, 0.3334 P4 }; { 0.7 P1, 0.3 P4 }; { 0.7 P2, 0.3 P4 }; { 0.7 P3, 0.3 P4 }; endrule rule "Tetrahedron Vis a Vis Point with edge(1)" quality 1 mappoints (0, 0, 0); (1, 0, 0) { 0.5 }; (0.5, 0.866, 0) { 0.5 }; (0.5, 0.288, -0.816) { 0.5 }; mapfaces (1, 2, 3) del; mapedges (1, 4); newpoints newfaces (4, 3, 1); (4, 2, 3); (4, 1, 2); elements (1, 2, 3, 4); freezone2 { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { -0.35 P1, 0.45 P2, 0.45 P3, 0.45 P4 }; { 0.45 P1, -0.35 P2, 0.45 P3, 0.45 P4 }; { 0.45 P1, 0.45 P2, -0.35 P3, 0.45 P4 }; { -0.05 P1, 0.7 P2, -0.05 P3, 0.4 P4 }; { -0.05 P1, -0.05 P2, 0.7 P3, 0.4 P4 }; freezonelimit { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { 0.3333 P2, 0.3333 P3, 0.3334 P4 }; { 0.3333 P1, 0.3333 P3, 0.3334 P4 }; { 0.3333 P1, 0.3333 P2, 0.3334 P4 }; { 0.65 P2, 0.35 P4 }; { 0.65 P3, 0.35 P4 }; endrule rule "Tetrahedron Vis a Vis Point with 2 edges (1)" quality 1 mappoints (0, 0, 0); (1, 0, 0) { 0.5 }; (0.5, 0.866, 0) { 0.5 }; (0.5, 0.288, -0.816) { 0.5 }; mapfaces (1, 2, 3) del; mapedges (1, 4); (2, 4); newpoints newfaces (4, 3, 1); (4, 2, 3); (4, 1, 2); elements (1, 2, 3, 4); freezone2 { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { -0.35 P1, 0.45 P2, 0.45 P3, 0.45 P4 }; { 0.45 P1, -0.35 P2, 0.45 P3, 0.45 P4 }; { 0.45 P1, 0.45 P2, -0.35 P3, 0.45 P4 }; { -0.05 P1, -0.05 P2, 0.7 P3, 0.4 P4 }; freezonelimit { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { 0.3333 P2, 0.3333 P3, 0.3334 P4 }; { 0.3333 P1, 0.3333 P3, 0.3334 P4 }; { 0.3333 P1, 0.3333 P2, 0.3334 P4 }; { 0.65 P3, 0.35 P4 }; endrule rule "Tetrahedron Vis a Vis Point with 3 edges (1)" quality 1 mappoints (0, 0, 0); (1, 0, 0) { 0.5 }; (0.5, 0.866, 0) { 0.5 }; (0.5, 0.288, -0.816) { 0.5 }; mapfaces (1, 2, 3) del; mapedges (1, 4); (2, 4); (3, 4); newpoints newfaces (4, 3, 1); (4, 2, 3); (4, 1, 2); elements (1, 2, 3, 4); freezone2 { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { -0.35 P1, 0.45 P2, 0.45 P3, 0.45 P4 }; { 0.45 P1, -0.35 P2, 0.45 P3, 0.45 P4 }; { 0.45 P1, 0.45 P2, -0.35 P3, 0.45 P4 }; freezonelimit { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { 0.3333 P2, 0.3333 P3, 0.3334 P4 }; { 0.3333 P1, 0.3333 P3, 0.3334 P4 }; { 0.3333 P1, 0.3333 P2, 0.3334 P4 }; endrule rule "Tetrahedron Vis a Vis Triangle (1)" quality 100 mappoints (0, 0, 0); (1, 0, 0) { 0.5 }; (0.5, 0.866, 0) { 0.5 }; (0, 0, -0.816) { 0.5 }; (1, 0, -0.816) { 0.5 }; (0.5, 0.866, -0.816) { 0.5 }; mapfaces (1, 2, 3) del; (4, 6, 5) del; newpoints newfaces (1, 2, 4); (2, 5, 4); (2, 3, 6); (2, 6, 5); (3, 1, 4); (3, 4, 6); elements (1, 2, 3, 4); (4, 2, 3, 6); (4, 2, 6, 5); freezone2 { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { 1 P5 }; { 1 P6 }; { -0.2 P1, 0.35 P2, 0.35 P3, -0.2 P4, 0.35 P5, 0.35 P6 }; { 0.35 P1, -0.2 P2, 0.35 P3, 0.35 P4, -0.2 P5, 0.35 P6 }; { 0.35 P1, 0.35 P2, -0.2 P3, 0.35 P4, 0.35 P5, -0.2 P6 }; endrule rule "Octaeder 1" quality 100 mappoints (0, 0, 0); (1, 0, 0) { 0.95 }; (0.5, 0.866, 0) { 0.95 }; (0.5, -0.288, -0.816) { 0.5 }; mapfaces (1, 2, 3) del; (1, 4, 2) del; newpoints (1, 0.578, -0.816) { 0.5 X3, 0.5 X4 } { 0.5 Y3, 0.5 Y4} { 0.5 Z3, 0.5 Z4 }; (0, 0.578, -0.816) { 0.5 X3, 0.5 X4 } { 0.5 Y3, 0.5 Y4} { 0.5 Z3, 0.5 Z4 }; newfaces (2, 3, 5); (3, 1, 6); (3, 6, 5); (2, 5, 4); (1, 4, 6); (4, 5, 6); elements (3, 4, 1, 2); (3, 4, 2, 5); (3, 4, 5, 6); (3, 4, 6, 1); freezone (0, 0, 0); (1, 0, 0) { 1 X2 } { } { }; (0.5, 0.866, 0) { 1 X3 } { 1 Y3 } { }; (0.5, -0.288, -0.816) { 1 X4 } { 1 Y4 } { 1 Z4 }; (-0.5, 1, -1.5) { 0.5 X3, 0.5 X4 } { 0.5 Y3, 0.5 Y4 } { 1 Z4 }; ( 1.5, 1, -1.5) { 0.5 X3, 0.5 X4 } { 0.5 Y3, 0.5 Y4 } { 1 Z4 }; endrule rule "Octaeder 2" quality 100 mappoints (0, 0, 0); (1, 0, 0) { 0.95 }; (0.5, 0.866, 0) { 0.95 }; (0.5, -0.288, -0.816) { 0.5 }; (1, 0.578, -0.816) { 0.5 }; mapfaces (1, 2, 3) del; (1, 4, 2) del; newpoints (0, 0.578, -0.816) { 0.5 X3, 0.5 X4 } { 0.5 Y3, 0.5 Y4} { 0.5 Z3, 0.5 Z4 }; newfaces (2, 3, 5); (3, 1, 6); (3, 6, 5); (2, 5, 4); (1, 4, 6); (4, 5, 6); elements (3, 4, 1, 2); (3, 4, 2, 5); (3, 4, 5, 6); (3, 4, 6, 1); freezone (0, 0, 0); (1, 0, 0) { 1 X2 } { } { }; (0.5, 0.866, 0) { 1 X3 } { 1 Y3 } { }; (0.5, -0.288, -0.816) { 1 X4 } { 1 Y4 } { 1 Z4 }; (1, 0.578, -0.816) { 1 X5 } { 1 Y5 } { 1 Z5 }; (0.9, 0.097, -0.544) { 0.333 X2, 0.333 X4, 0.333 X5 } { 0.333 Y2, 0.333 Y4, 0.333 Y5 } { 0.333 Z2, 0.333 Z4, 0.333 Z5 }; (0.9, 0.481, -0.272) { 0.333 X2, 0.333 X3, 0.333 X5 } { 0.333 Y2, 0.333 Y3, 0.333 Y5 } { 0.333 Z2, 0.333 Z3, 0.333 Z5 }; (-0.5, 1, -1.5) { 0.5 X3, 0.5 X4 } { 0.5 Y3, 0.5 Y4 } { 0.5 Z4, 0.5 Z5 }; endrule rule "Octaeder 2a" quality 100 mappoints (0, 0, 0); (1, 0, 0) { 0.95 }; (0.5, 0.866, 0) { 0.95 }; (0.5, -0.288, -0.816) { 0.5 }; (1, 0.578, -0.816) { 0.5 }; mapfaces (1, 2, 3) del; (3, 2, 5) del; newpoints (0, 0.578, -0.816) { -1 X2, 1 X3, 1 X4 } { -1 Y2, 1 Y3, 1 Y4 } { -1 Z2, 1 Z3, 1 Z4 }; newfaces (1, 2, 4); (3, 1, 6); (3, 6, 5); (2, 5, 4); (1, 4, 6); (4, 5, 6); elements (3, 4, 1, 2); (3, 4, 2, 5); (3, 4, 5, 6); (3, 4, 6, 1); freezone (0, 0, 0); (1, 0, 0) { 1 X2 } { } { }; (0.5, 0.866, 0) { 1 X3 } { 1 Y3 } { }; (0.5, -0.288, -0.816) { 1 X4 } { 1 Y4 } { 1 Z4 }; (1, 0.578, -0.816) { 1 X5 } { 1 Y5 } { 1 Z5 }; (0.9, 0.097, -0.544) { 0.333 X2, 0.333 X4, 0.333 X5 } { 0.333 Y2, 0.333 Y4, 0.333 Y5 } { 0.333 Z2, 0.333 Z4, 0.333 Z5 }; (0.5, -0.097, -0.272) { 0.333 X2, 0.333 X4, 0.333 X1 } { 0.333 Y2, 0.333 Y4, 0.333 Y1 } { 0.333 Z2, 0.333 Z4, 0.333 Z1 }; (-0.5, 1, -1.5) { 0.5 X3, 0.5 X4 } { 0.5 Y3, 0.5 Y4 } { 0.5 Z4, 0.5 Z5 }; endrule rule "Pyramid 1" quality 100 mappoints (0, 0, 0); (1, 0, 0) { 1 }; (0.5, 0.866, 0) { 1 }; (0.5, -0.288, -0.816) { 1 }; mapfaces (1, 2, 3) del; (1, 4, 2) del; newpoints (1, 0.578, -0.816) { 0.5 X3, 0.5 X4 } { 0.5 Y3, 0.5 Y4} { 0.5 Z3, 0.5 Z4 }; newfaces (1, 4, 3); (2, 3, 5); (2, 5, 4); (4, 5, 3); elements (1, 2, 3, 4); (4, 2, 3, 5); freezone (0, 0, 0); (1, 0, 0) { 1 X2 } { } { }; (0.5, 0.866, 0) { 1 X3 } { 1 Y3 } { }; (0.5, -0.288, -0.816) { 1 X4 } { 1 Y4 } { 1 Z4 }; (0, 1, -1) { 0.5 X3, 0.5 X4 } { 1 Y3 } { 1 Z4 }; (1.5, 1, -1.5) { 0.5 X3, 0.5 X4 } { 0.5 Y3, 0.5 Y4} { 0.5 Z3, 0.5 Z4 }; endrule rule "Tetrahedron 2 times 60" quality 1 mappoints (0, 0, 0); (1, 0, 0) { 0.3 }; (0.5, 0.866, 0) { 0.3 }; (0.5, 0.288, -0.816) { 0.3 }; mapfaces (1, 2, 3) del; (1, 4, 2) del; (2, 4, 3) del; newpoints newfaces (1, 4, 3); elements (1, 2, 3, 4); freezone2 { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { 0.4 P1, 0.4 P4, 0.4 P3, -0.2 P2 }; freezonelimit { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { 0.3333 P1, 0.3333 P3, 0.3334 P4 }; endrule rule "Fill Tetrahedron (1)" quality 1 mappoints (0, 0, 0); (1, 0, 0) { 0.2 }; (0.5, 0.866, 0) { 0.2 }; (0.5, 0.288, -0.816) { 0.2 }; mapfaces (1, 2, 3) del; (1, 4, 2) del; (2, 4, 3) del; (3, 4, 1) del; newpoints newfaces elements (1, 2, 3, 4); freezone2 { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; endrule rule "Tetrahedron 120 (1)" quality 1 mappoints (0, 0, 0); (1, 0, 0) { 1 }; (0.5, 0.866, 0) { 1 }; (0.5, -0.674, -0.544) { 1 }; mapfaces (1, 2, 3) del; (1, 4, 2) del; newpoints (0.5, 0.288, -0.816) { -0.5 X1, -0.5 X2, 1 X3, 1 X4 } { -0.5 Y1, -0.5 Y2, 1 Y3, 1 Y4} { -0.5 Z1, -0.5 Z2, 1 Z3, 1 Z4}; newfaces (1, 5, 3); (3, 5, 2); (1, 4, 5); (2, 5, 4); elements (1, 2, 3, 5); (1, 4, 2, 5); freezone2 { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { 1.3 P5, -0.3 P1 }; { 1.3 P5, -0.3 P2 }; freezonelimit { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { 1 P5 }; { 1 P5 }; endrule rule "Tetrahedron 2 times 120 (1)" quality 100 mappoints (0, 0, 0); (1, 0, 0) { 1 }; (0.5, 0.866, 0) { 1 }; (0.5, -0.674, -0.544) { 0.8 }; (1.334, 0.77, -0.544) { 0.8 }; mapfaces (1, 2, 3) del; (1, 4, 2) del; (3, 2, 5) del; newpoints (0.5, 0.288, -0.816) { 0.25 X1, -0.5 X2, 0.25 X3, 0.5 X4, 0.5 X5 } { 0.25 Y1, -0.5 Y2, 0.25 Y3, 0.5 Y4, 0.5 Y5 } { 0.25 Z1, -0.5 Z2, 0.25 Z3, 0.5 Z4, 0.5 Z5 }; newfaces (6, 3, 1); (6, 1, 4); (6, 4, 2); (6, 2, 5); (6, 5, 3); elements (1, 2, 3, 6); (1, 4, 2, 6); (2, 5, 3, 6); freezone2 { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { 1 P5 }; { 1.4 P6, -0.4 P2 }; { 1.4 P6, -0.4 P1 }; { 1.4 P6, -0.4 P3 }; endrule rule "four Tetrahedron non convex (4)" quality 4 flags l; mappoints (0, 0, 0); (1, 0, 0) { 0.1 }; (0.5, 1, 0) { 0.1 }; (0.5, 0, -1) { 0.1 }; (0.5, 0.3, -0.3) { 0.1 }; mapfaces (1, 2, 3) del; (1, 4, 2) del; (1, 5, 4) del; (1, 3, 5) del; newpoints (0.5, 0.1, -0.1) { 0.333 X1, 0.333 X2, 0.334 X5 } { 0.333 Y1, 0.333 Y2, 0.334 Y5 } { 0.333 Z1, 0.333 Z2, 0.334 Z5 }; newfaces (6, 2, 3) del; (6, 4, 2) del; (6, 5, 4) del; (6, 3, 5) del; elements (1, 2, 3, 6); (1, 4, 2, 6); (1, 5, 4, 6); (1, 3, 5, 6); freezone2 { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { 1 P5 }; { 1.5 P6, -0.5 P1 }; freezonelimit { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { 1 P5 }; { 1 P6 }; freeset 1 6 2 3; freeset 1 6 3 5; freeset 1 6 5 4; freeset 1 6 4 2; endrule rule "five Tetrahedron non convex (4)" quality 4 flags l; mappoints (0, 0, 0); (1, 0, 0) { 0.5 }; (0.5, 1, 0) { 0.5 }; (0, 0.8, -0.2) { 0.5 }; (0, 0.2, -0.8) { 0.5 }; (0.5, 0, -1) { 0.5 }; mapfaces (1, 2, 3) del; (1, 3, 4) del; (1, 4, 5) del; (1, 5, 6) del; (1, 6, 2) del; newpoints (0.1, 0.1, -0.1) { 0.75 X1, 0.05 X2, 0.05 X3, 0.05 X4, 0.05 X5, 0.05 X6 } { 0.75 Y1, 0.05 Y2, 0.05 Y3, 0.05 Y4, 0.05 Y5, 0.05 Y6 } { 0.75 Z1, 0.05 Z2, 0.05 Z3, 0.05 Z4, 0.05 Z5, 0.05 Z6 }; newfaces (7, 2, 3); (7, 3, 4); (7, 4, 5); (7, 5, 6); (7, 6, 2); elements (1, 2, 3, 7); (1, 3, 4, 7); (1, 4, 5, 7); (1, 5, 6, 7); (1, 6, 2, 7); freezone2 { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { 1 P5 }; { 1 P6 }; { 1.5 P7, -0.5 P1 }; freezonelimit { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { 1 P5 }; { 1 P6 }; { 1 P7 }; freeset 1 7 2 3; freeset 1 7 3 4; freeset 1 7 4 5; freeset 1 7 5 6; freeset 1 7 6 2; endrule rule "four Tetrahedron non convex (6)" quality 6 flags l; mappoints (0, 0, 0); (1, 0, 0) { 0.5 }; (0.5, 1, 0) { 0.5 }; (0.5, 0, -1) { 0.5 }; (0.5, 0.3, -0.3) { 0.5 }; mapfaces (1, 2, 3) del; (1, 4, 2) del; (1, 5, 4) del; (1, 3, 5) del; newpoints (0.095, 0.003, -0.003) { 0.9 X1, 0.09 X2, 0.01 X5 } { 0.9 Y1, 0.09 Y2, 0.01 Y5 } { 0.9 Z1, 0.09 Z2, 0.01 Z5 }; newfaces (6, 2, 3) del; (6, 4, 2) del; (6, 5, 4) del; (6, 3, 5) del; elements (1, 2, 3, 6); (1, 4, 2, 6); (1, 5, 4, 6); (1, 3, 5, 6); freezone2 { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { 1 P5 }; { 1.499 P6, -0.5 P1, 0.001 P2 }; freezonelimit { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { 1 P5 }; { 1 P6 }; freeset 1 6 2 3; freeset 1 6 3 5; freeset 1 6 5 4; freeset 1 6 4 2; endrule rule "four Tetrahedron non convex (6)" quality 100 mappoints (0, 0, 0); (1, 0, 0) { 0.5 }; (0.5, 1, 0) { 0.5 }; (0.5, 0, -1) { 0.5 }; (0.5, 0.4, -0.4) { 0.5 }; mapfaces (1, 2, 3) del; (1, 4, 2) del; (4, 5, 2) del; (5, 3, 2) del; newpoints (0.925, 0.02, -0.02) { 0.05 X1, 0.9 X2, 0.05 X5 } { 0.05 Y1, 0.9 Y2, 0.05 Y5 } { 0.05 Z1, 0.9 Z2, 0.05 Z5 }; newfaces (3, 1, 6); (1, 4, 6); (4, 5, 6); (5, 3, 6); elements (3, 1, 2, 6); (1, 4, 2, 6); (4, 5, 2, 6); (5, 3, 2, 6); orientations (3, 1, 2, 5); (1, 4, 2, 5); (2, 4, 5, 1); (3, 2, 5, 1); (5, 4, 2, 3); freezone2 { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { 1 P5 }; { 1.5 P6, -0.5 P2 }; freezonelimit { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { 1 P5 }; { 1 P6 }; freeset 3 1 2 6; freeset 1 4 2 6; freeset 4 5 2 6; freeset 5 3 2 6; endrule rule "three Tetrahedron non convex (4)" quality 4 flags l; mappoints (0, 0, 0); (1, 0, 0) { 0.5 }; (0.5, 1, 0) { 0.5 }; (0.5, 0, -1) { 0.5 }; mapfaces (1, 2, 3) del; (1, 4, 2) del; (1, 3, 4) del; newpoints (0.5, 0.25, -0.25) { 0.25 X1, 0.25 X2, 0.25 X3, 0.25 X4 } { 0.25 Y1, 0.25 Y2, 0.25 Y3, 0.25 Y4 } { 0.25 Z1, 0.25 Z2, 0.25 Z3, 0.25 Z4 }; newfaces (5, 2, 3); (5, 4, 2); (5, 3, 4); elements (2, 3, 1, 5); (3, 4, 1, 5); (4, 2, 1, 5; orientations (1, 2, 4, 3); freezone2 { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { 1.5 P5, -0.5 P1 }; freezonelimit { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { 1 P5 }; freeset 1 2 3 5; freeset 1 3 4 5; freeset 1 4 2 5; endrule rule "three Tetrahedron non convex (6)" quality 100 mappoints (0, 0, 0); (1, 0, 0) { 0.5 }; (0.5, 1, 0) { 0.5 }; (0.5, 0, -1) { 0.5 }; mapfaces (1, 2, 3) del; (1, 4, 2) del; (1, 3, 4) del; newpoints (0.2, 0.1, -0.1) { 0.7 X1, 0.1 X2, 0.1 X3, 0.1 X4 } { 0.7 Y1, 0.1 Y2, 0.1 Y3, 0.1 Y4 } { 0.7 Z1, 0.1 Z2, 0.1 Z3, 0.1 Z4 }; newfaces (5, 2, 3); (5, 4, 2); (5, 3, 4); elements (2, 3, 1, 5); (3, 4, 1, 5); (4, 2, 1, 5; orientations (1, 2, 3, 4); freezone2 { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { 1.5 P5, -0.5 P1 }; freezonelimit { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { 1 P5 }; freeset 1 2 3 5; freeset 1 3 4 5; freeset 1 4 2 5; endrule rule "four Tetrahedron non convex (6)" quality 100 mappoints (0, 0, 0); (1, 0, 0) { 0.5 }; (0.5, 1, 0) { 0.5 }; (0.5, 0, -1) { 0.5 }; (0.5, 0.4, -0.4) { 0.5 }; mapfaces (1, 2, 3) del; (1, 4, 2) del; (4, 5, 2) del; (5, 3, 2) del; newpoints (0.7, 0.08, -0.08) { 0.6 X2, 0.2 X5 } { 0.2 Y5 } { 0.2 Z5 }; newfaces (3, 1, 6); (1, 4, 6); (4, 5, 6); (5, 3, 6); elements (3, 1, 2, 6); (1, 4, 2, 6); (4, 5, 2, 6); (5, 3, 2, 6); orientations (3, 1, 2, 5); (5, 1, 2, 4); freezone (0, 0, 0); (1, 0, 0) { 1 X2 } { } { }; (0.5, 1, 0) { 1 X3 } { 1 Y3 } { }; (0.5, 0, -1) { 1 X4 } { 1 Y4 } { 1 Z4 }; (0.5, 0.4, -0.4) { 1 X5 } { 1 Y5 } { 1 Z5 }; (0.55, 0.12, -0.12) { 0.4 X2, 0.3 X5 } { 0.3 Y5 } { 0.3 Z5 }; freeset 3 1 2 6; freeset 1 4 2 6; freeset 4 5 2 6; freeset 5 3 2 6; endrule rule "Tetrahedron 2 in 60 (12)" quality 100 mappoints (0, 0, 0); (1, 0, 0) { 0.5 }; (0.5, 1, 0) { 0.5 }; (0.5, 0, -1) { 0.5 }; mapfaces (1, 2, 3) del; (1, 4, 2) del; newpoints (0.5, 0.1, -0.1) { 0.4 X1, 0.4 X2, 0.1 X3, 0.1 X4 } { 0.4 Y1, 0.4 Y2, 0.1 Y3, 0.1 Y4 } { 0.4 Z1, 0.4 Z2, 0.1 Z3, 0.1 Z4 }; newfaces (5, 2, 3); (5, 3, 1); (5, 4, 2); (5, 1, 4); elements (1, 2, 3, 5); (1, 2, 5, 4); freezone2 { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { 1.5 P5, -0.25 P1, -0.25 P2 }; freezonelimit { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { 1 P5 }; freeset 1 2 3 5; freeset 1 2 4 5; endrule rule "Tetrahedron 120, but more than 180 (13)" quality 100 mappoints (0, 0, 0); (1, 0, 0) { 1 }; (0.5, 0.866, 0) { 1 }; (0.5, -0.866, 0) { 1 }; mapfaces (1, 2, 3) del; (1, 4, 2); newpoints (0.5, 0, -0.3) { 0.5 X3, 0.5 X4 } { 0.5 Y3, 0.5 Y4} { 0.5 Z3, 0.5 Z4 }; newfaces (1, 5, 3); (3, 5, 2); (2, 5, 1); elements (1, 2, 3, 5); freezone (0, 0, 0); (1, 0, 0) { 1 X2 } { } { }; (0.5, 0.866, 0) { 1 X3 } { 1 Y3 } { }; (0.5, -0.1, -0.4) { 0.5 X3, 0.5 X4 } { 0.5 Y3, 0.5 Y4} { 0.5 Z3, 0.5 Z4 }; endrule rule "Free Tetrahedron (14)" quality 100 mappoints (0, 0, 0); (1, 0, 0) { 1.0 }; (0.5, 0.866, 0) { 1.0 }; mapfaces (1, 2, 3) del; newpoints (0.5, 0.288, -0.2) { 0.333 X2, 0.333 X3 } { 0.333 Y3 } { }; newfaces (4, 1, 2); (4, 2, 3); (4, 3, 1); elements (1, 2, 3, 4); freezone (0, 0, 0); (1, 0, 0) { 1 X2 } { } { }; (0.5, 0.866, 0) { 1 X3 } { 1 Y3 } { }; (0.5, 0.288, -0.25) { 0.333 X2, 0.333 X3 } { 0.333 Y3 } { }; endrule rule "Free Tetrahedron (15)" quality 100 mappoints (0, 0, 0); (1, 0, 0) { 1.0 }; (0.5, 0.866, 0) { 1.0 }; mapfaces (1, 2, 3) del; newpoints (0.5, 0.288, -0.1) { 0.333 X2, 0.333 X3 } { 0.333 Y3 } { }; newfaces (4, 1, 2); (4, 2, 3); (4, 3, 1); elements (1, 2, 3, 4); freezone (0, 0, 0); (1, 0, 0) { 1 X2 } { } { }; (0.5, 0.866, 0) { 1 X3 } { 1 Y3 } { }; (0.5, 0.288, -0.15) { 0.333 X2, 0.333 X3 } { 0.333 Y3 } { }; endrule netgen-6.2.1804/rules/quad.rls0000644000175000017500000001773313272137567014626 0ustar kurtkurtrule "Free Quad (1)" quality 1 mappoints (0, 0); (1, 0); maplines (1, 2) del; newpoints (1, 1) { 1 X2 } { }; (0, 1) { } { }; newlines (3, 2); (4, 3); (1, 4); freearea (0, 0); (1, 0) { 1 X2 } { }; (1.5, 1.5) { 1.5 X2 } { }; (-0.5, 1.5) { -0.5 X2 } { }; elements (1, 2, 3, 4); endrule rule "Free Quad (5)" quality 5 mappoints (0, 0); (1, 0); maplines (1, 2) del; newpoints (1, 1) { 1 X2 } { }; (0, 1) { } { }; newlines (3, 2); (4, 3); (1, 4); freearea (0, 0); (1, 0) { 1 X2 } { }; (1.5, 1.5) { 1.5 X2 } { }; (-0.5, 1.5) { -0.5 X2 } { }; freearea2 (0, 0); (1, 0) { 1 X2 } { }; (1, 1) { 1 X2 } { }; (0, 1) { } { }; elements (1, 2, 3, 4); endrule rule "Quad Right (1)" quality 1 mappoints (0, 0); (1, 0); (1, 1); maplines (1, 2) del; (2, 3) del; newpoints (0, 1) { } { 1 y3 }; newlines (1, 4); (4, 3); freearea (0, 0); (1, 0) { 1 X2 } { }; (1, 1) { 1 X3 } { 1 Y3 }; (-0.5, 1.5) { } { 1.5 Y3 }; freearea2 (0, 0); (1, 0) { 1 X2 } { }; (1, 1) { 1 X3 } { 1 Y3 }; (0, 1) { } { 1 Y3 }; elements (1, 2, 3, 4); endrule rule "Quad P Right (2)" quality 2 mappoints (0, 0); (1, 0); (1, 1); maplines (1, 2) del; newpoints (0, 1) { -1 X2, 1 X3 } { 1 Y3 }; newlines (1, 4); (4, 3); (3, 2); freearea (0, 0); (1, 0) { 1 X2 } { }; (1.2, 0.5) { 0.7 X2, 0.5 X3 } { 0.5 Y3 }; (1, 1) { 1 X3 } { 1 Y3 }; (-0.5, 1.5) { -2 X2, 1.5 X3 } { 1.5 Y3 }; freearea2 (0, 0); (1, 0) { 1 X2 } { }; (1, 0.5) { 0.5 X2, 0.5 X3 } { 0.5 Y3 }; (1, 1) { 1 X3 } { 1 Y3 }; (0, 1) { -1 X2, 1 X3 } { 1 Y3 }; elements (1, 2, 3, 4); orientations (1, 2, 3); endrule rule "Quad Right PL (2)" quality 2 mappoints (0, 0); (1, 0); (1, 1); (0, 1); maplines (1, 2) del; (2, 3) del; newpoints newlines (1, 4); (4, 3); freearea (0, 0); (1, 0) { 1 X2 } { }; (1, 1) { 1 X3 } { 1 Y3 }; (0.5, 1.2) { -0.1 X2, 0.6 X3, 0.6 X4 } { -0.1 Y2, 0.6 Y3, 0.6 Y4 }; (0, 1) { 1 X4 } { 1 Y4 }; (-0.2, 0.5) { -0.1 X2, -0.1 X3, 0.6 X4 } { -0.1 Y2, -0.1 Y3, 0.6 Y4 }; freearea2 (0, 0); (1, 0) { 1 X2 } { }; (1, 1) { 1 X3 } { 1 Y3 }; (0.5, 1) { 0.5 X3, 0.5 X4 } { 0.5 Y3, 0.5 Y4 }; (0, 1) { 1 X4 } { 1 Y4 }; (0, 0.5) { 0.5 X4 } { 0.5 Y4 }; elements (1, 2, 3, 4); orientations (1, 2, 3); (1, 3, 4); (1, 2, 4); (4, 2, 3); endrule rule "Left Quad (1)" quality 1 mappoints (0, 0); (1, 0); (0, 1); maplines (1, 2) del; (3, 1) del; newpoints (1, 1) { 1 X2, 1 X3 } { 1 Y3 }; newlines (3, 4); (4, 2); freearea (0, 0); (1, 0) { 1 X2 } { }; (1.5, 1.5) { 1.5 X2, 1.5 X3 } { 1.5 Y3 }; (0, 1) { 1 X3 } { 1 Y3 }; freearea2 (0, 0); (1, 0) { 1 X2 } { }; (1, 1) { 1 X2, 1 X3 } { 1 Y3 }; (0, 1) { 1 X3 } { 1 Y3 }; elements (1, 2, 4, 3); endrule rule "Left P Quad (2)" quality 2 mappoints (0, 0); (1, 0); (0, 1); maplines (1, 2) del; newpoints (1, 1) { 1 X2, 1 X3 } { 1 Y3 }; newlines (1, 3); (3, 4); (4, 2); freearea (0, 0); (1, 0) { 1 X2 } { }; (1.5, 1.5) { 1.5 X2, 1.5 X3 } { 1.5 Y3 }; (0, 1) { 1 X3 } { 1 Y3 }; (-0.2, 0.6) { -0.2 X2, 0.6 X3 } { 0.6 Y3 }; freearea2 (0, 0); (1, 0) { 1 X2 } { }; (1, 1) { 1 X2, 1 X3 } { 1 Y3 }; (0, 1) { 1 X3 } { 1 Y3 }; (0, 0.5) { 0.5 X3 } { 0.5 Y3 }; elements (1, 2, 4, 3); endrule rule "Left Quad RP (2)" quality 2 mappoints (0, 0); (1, 0); (0, 1); (1, 1); maplines (1, 2) del; (3, 1) del; newpoints newlines (3, 4); (4, 2); freearea (0, 0); (1, 0) { 1 X2 } { }; (1.2, 0.5) { 0.6 X2, 0.6 X4, -0.1 X3 } { 0.6 Y2, 0.6 Y4, -0.1 Y3 }; (1, 1) { 1 X4 } { 1 Y4 }; (0.5, 1.2) { -0.1 X2, 0.6 X3, 0.6 X4 } { -0.1 Y2, 0.6 Y3, 0.6 Y4 }; (0, 1) { 1 X3 } { 1 Y3 }; freearea2 (0, 0); (1, 0) { 1 X2 } { }; (1, 0.5) { 0.5 X2, 0.5 X4 } { 0.5 Y2, 0.5 Y4 }; (1, 1) { 1 X4 } { 1 Y4 }; (0.5, 1) { 0.5 X3, 0.5 X4 } { 0.5 Y3, 0.5 Y4 }; (0, 1) { 1 X3 } { 1 Y3 }; elements (1, 2, 4, 3); orientations (1, 2, 4); (1, 4, 3); endrule rule "Two left (1)" quality 1 mappoints (0, 0); (1, 0); (1, 1); (0, 1); maplines (1, 2) del; (3, 4) del; (4, 1) del; newpoints newlines (3, 2); freearea (0, 0); (1, 0) { 1 X2 } { }; (1.5, 0.5) { 0.75 X2, 0.75 X3, -0.25 X4 } { 0.75 Y3, -0.25 Y4 }; (1, 1) { 1 X3 } { 1 Y3 }; (0, 1) { 1 X4 } { 1 Y4 }; freearea2 (0, 0); (1, 0) { 1 X2 } { }; (1, 0.5) { 0.5 X2, 0.5 X3 } { 0.5 Y3 }; (1, 1) { 1 X3 } { 1 Y3 }; (0, 1) { 1 X4 } { 1 Y4 }; elements (1, 2, 3, 4); endrule rule "Two Right (1)" quality 1 mappoints (0, 0); (1, 0); (1, 1); (0, 1); maplines (1, 2) del; (2, 3) del; (3, 4) del; newpoints newlines (1, 4); freearea (0, 0); (1, 0) { 1 X2 } { }; (1, 1) { 1 X3 } { 1 Y3 }; (0, 1) { 1 X4 } { 1 Y4 }; (-0.5, 0.5) { -0.25 X2, -0.25 X3, 0.75 X4 } { -0.25 Y3, 0.75 Y4 }; freearea2 (0, 0); (1, 0) { 1 X2 } { }; (1, 1) { 1 X3 } { 1 Y3 }; (0, 1) { 1 X4 } { 1 Y4 }; (0, 0.5) { 0.5 X4 } { 0.5 Y4 }; elements (1, 2, 3, 4); endrule rule "Right 120 (1)" quality 1000 mappoints (0, 0); (1, 0); (1.5, 0.866); maplines (1, 2) del; (2, 3) del; newpoints (0.5, 0.866) { 1 X3, -1 X2 } { 1 Y3 }; newlines (1, 4); (4, 3); freearea (0, 0); (1, 0) { 1 X2 } { }; (1.5, 0.866) { 1 X3 } { 1 Y3 }; (1, 1.732) { -2 X2, 2 X3 } { 2 Y3 }; (0, 1.732) { -3 X2, 2 X3 } { 2 Y3 }; (-0.5, 0.866) { -2 X2, 1 X3 } {1 Y3 }; elements (1, 2, 4); (2, 3, 4); endrule rule "Left 120 (1)" quality 1000 mappoints (0, 0); (1, 0); (-0.5, 0.866); maplines (1, 2) del; (3, 1) del; newpoints (0.5, 0.866) { 1 X3, 1 X2 } { 1 Y3 }; newlines (3, 4); (4, 2); freearea (0, 0); (1, 0) { 1 X2 } { }; (1.5, 0.866) { 2 X2, 1 X3 } { 1 Y3 }; (1, 1.732) { 2 X2, 2 X3 } { 2 Y3 }; (0, 1.732) { -1 X2, 2 X3 } { 2 Y3 }; (-0.5, 0.866) { 1 X3 } {1 Y3 }; elements (1, 2, 4); (2, 3, 4); endrule rule "Left Right (1)" quality 1 mappoints (0, 0); (1, 0); (1, 1); (0, 1); maplines (1, 2) del; (2, 3) del; (4, 1) del; newlines (4, 3); freearea (0, 0); (1, 0) { 1 X2 } { }; (1, 1) { 1 X3 } { 1 Y3 }; (0.5, 1.5) { -0.25 X2, 0.75 X3, 0.75 X4 } { 0.75 Y3, 0.75 Y4 }; (0, 1) { 1 X4 } { 1 Y4 }; freearea2 (0, 0); (1, 0) { 1 X2 } { }; (1, 1) { 1 X3 } { 1 Y3 }; (0.5, 1) { 0.5 X3, 0.5 X4 } { 0.5 Y3, 0.5 Y4 }; (0, 1) { 1 X4 } { 1 Y4 }; elements (1, 2, 3, 4); endrule rule "Fill Quad" quality 1 mappoints (0, 0); (1, 0); (1, 1); (0, 1); maplines (1, 2) del; (2, 3) del; (3, 4) del; (4, 1) del; newpoints newlines freearea (0, 0); (1, 0) { 1 X2 } { 1 Y2 }; (1, 1) { 1 X3 } { 1 Y3 }; (0, 1) { 1 X4 } { 1 Y4 }; elements (1, 2, 3, 4); endrule rule "Fill Triangle" quality 10 mappoints (0, 0); (1, 0); (0.5, 0.86); maplines (1, 2) del; (2, 3) del; (3, 1) del; newpoints newlines freearea (0, 0); (1, 0) { 1 X2 } { 1 Y2 }; (0.5, 0.86) { 1 X3 } { 1 Y3 }; elements (1, 2, 3); endrule rule "Right 60 (1)" quality 10 mappoints (0, 0); (1, 0) { 0.5, 0, 1.0 }; (0.5, 0.866) { 0.6, 0, 0.8 }; maplines (1, 2) del; (2, 3) del; newpoints newlines (1, 3); freearea (0, 0); (1, 0) { 1 X2 } { }; (0.5, 0.866) { 1 X3 } { 1 Y3 }; (-0.125, 0.6495) { -0.5 X2, 0.75 X3 } { -0.5 Y2, 0.75 Y3 }; freearea2 (0, 0); (1, 0) { 1 X2 } { }; (0.5, 0.866) { 1 X3 } { 1 Y3 }; (0.25, 0.433) { 0.5 X3 } { 0.5 Y3 }; elements (1, 2, 3); endrule rule "Vis A Vis (2)" quality 2 mappoints (0, 0); (1, 0); (1, 1); (0, 1); maplines (1, 2) del; (3, 4) del; newpoints newlines (1, 4); (3, 2); freearea (0, 0); (1, 0) { 1 X2 } { }; (1.5, 0.5) { 0.75 X2, 0.75 X3, -0.25 X4 } { 0.75 Y3, -0.25 Y4 }; (1, 1) { 1 X3 } { 1 Y3 }; (0, 1) { 1 X4 } { 1 Y4 }; (-0.5, 0.5) { -0.25 X2, -0.25 X3, 0.75 X4 } { -0.25 Y3, 0.75 Y4 }; freearea2 (0, 0); (1, 0) { 1 X2 } { }; (1, 0.5) { 0.5 X2, 0.5 X3 } { 0.5 Y3 }; (1, 1) { 1 X3 } { 1 Y3 }; (0, 1) { 1 X4 } { 1 Y4 }; (0, 0.5) { 0.5 X4 } { 0.5 Y4 }; elements (1, 2, 3, 4); orientations (1, 3, 4); (2, 3, 4); (1, 2, 3); (1, 2, 4); endrule rule "2 h Vis A Vis (1)" quality 3000 mappoints (0, 0); (1, 0); (1, 1.732); (0, 1.732); maplines (1, 2) del; (3, 4) del; newpoints (0.5, 0.866) { 0.25 X3, 0.25 X4 } { 0.25 Y2, 0.25 Y3, 0.25 Y4 }; newlines (1, 5); (5, 4); (3, 5); (5, 2); freearea (0, 0); (1, 0) { 1 X2 } { 1 Y2 }; (1.5, 0.866) { 0.75 X2, 0.75 X3, -0.25 X4 } { 0.75 Y2, 0.75 Y3, -0.25 Y4 }; (1, 1.732) { 1 X3 } { 1 Y3 }; (0, 1.732) { 1 X4 } { 1 Y4 }; (-0.5, 0.866) { 0.75 X4, -0.25 X2, -0.25 X3 } { 0.75 Y4, -0.25 Y3 }; elements (1, 2, 5); (3, 4, 5); endrule netgen-6.2.1804/rules/prisms.rls0000644000175000017500000000477213272137567015210 0ustar kurtkurttolfak 0.5 rule "prism on quad" quality 1 mappoints (0, 0, 0); (1, 0, 0); (1, 1, 0); (0, 1, 0); (0.5, 0, -0.86); (0.5, 1, -0.86); mapfaces (1, 2, 3, 4) del; (1, 5, 2) del; (4, 3, 6) del; newpoints newfaces (5, 2, 3, 6); (1, 5, 6, 4); elements (1, 5, 2, 4, 6, 3); orientations (1, 2, 3, 5); (1, 3, 4, 6); freezone2 { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { 1 P5 }; { 1 P6 }; { 0.3 P1, -0.1 P2, -0.1 P3, 0.3 P4, 0.3 P5, 0.3 P6 }; { -0.1 P1, 0.3 P2, 0.3 P3, -0.1 P4, 0.3 P5, 0.3 P6 }; freezonelimit { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { 1 P5 }; { 1 P6 }; { 0.25 P1, 0 P2, 0 P3, 0.25 P4, 0.25 P5, 0.25 P6 }; { 0 P1, 0.25 P2, 0.25 P3, 0 P4, 0.25 P5, 0.25 P6 }; endrule rule "prism on 2 quad" quality 1 mappoints (0, 0, 0); (1, 0, 0); (1, 1, 0); (0, 1, 0); (0.5, 0, -0.86); (0.5, 1, -0.86); mapfaces (1, 2, 3, 4) del; (2, 5, 6, 3) del; (1, 5, 2) del; (4, 3, 6) del; newpoints newfaces (1, 5, 6, 4); elements (1, 5, 2, 4, 6, 3); freezone2 { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { 1 P5 }; { 1 P6 }; { 0.3 P1, -0.1 P2, -0.1 P3, 0.3 P4, 0.3 P5, 0.3 P6 }; freezonelimit { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { 1 P5 }; { 1 P6 }; { 0.25 P1, 0 P2, 0 P3, 0.25 P4, 0.25 P5, 0.25 P6 }; freeset 1 2 4 5 6 7; freeset 2 3 4 6; endrule rule "prism on 2 quada" quality 1 mappoints (0, 0, 0); (1, 0, 0); (1, 1, 0); (0, 1, 0); (0.5, 0, -0.86); (0.5, 1, -0.86); mapfaces (1, 2, 3, 4) del; (5, 1, 4, 6) del; (1, 5, 2) del; (4, 3, 6) del; newpoints newfaces (5, 2, 3, 6); elements (1, 5, 2, 4, 6, 3); freezone2 { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { 1 P5 }; { 1 P6 }; { -0.1 P1, 0.3 P2, 0.3 P3, -0.1 P4, 0.3 P5, 0.3 P6 }; freezonelimit { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { 1 P5 }; { 1 P6 }; { 0 P1, 0.25 P2, 0.25 P3, 0 P4, 0.25 P5, 0.25 P6 }; freeset 1 2 3 5 6 7; freeset 1 3 4 6; endrule rule "fill prism" quality 1 mappoints (0, 0, 0); (1, 0, 0); (1, 1, 0); (0, 1, 0); (0.5, 0, -0.86); (0.5, 1, -0.86); mapfaces (1, 2, 3, 4) del; (2, 5, 6, 3) del; (5, 1, 4, 6) del; (1, 5, 2) del; (4, 3, 6) del; newpoints newfaces elements (1, 5, 2, 4, 6, 3); freezone2 { 1 P1 }; { 1 P2 }; { 1 P3 }; { 1 P4 }; { 1 P5 }; { 1 P6 }; freeset 1 2 4 5; freeset 2 3 4 6; endrule rule "flat prism" quality 1 mappoints (0, 0, 0); (1, 0, 0); (0.5, 0.866, 0); (0, 0, -1); (1, 0, -1); (0.5, 0.866, -1); mapfaces (1, 2, 3) del; (5, 4, 6) del; newpoints newfaces (1, 2, 4); (4, 2, 5); (2, 3, 5); (5, 3, 6); (3, 1, 6); (6, 1, 4); elements (1, 2, 3, 5, 4, 6); freezone2 { 1 P1 }; { 1 P2 }; { 1 P5 }; { 1 P6 }; endrule netgen-6.2.1804/rules/hexa.rls0000644000175000017500000000516413272137567014614 0ustar kurtkurtrule "Hexa left-right-top" quality 1 flags t; mappoints (0, 0, 0); (1, 0, 0) { 1 } ; (1, 1, 0) { 1 } ; (0, 1, 0) { 1 } ; (0, 0, 1) { 1 } ; (1, 0, 1) { 1 } ; (1, 1, 1) { 1 } ; (0, 1, 1) { 1 } ; mapfaces (4, 3, 2, 1) del; (3, 7, 6, 2) del; (7, 8, 5, 6) del; (8, 4, 1, 5) del; newpoints newfaces (5, 6, 2, 1); (7, 8, 4, 3); elements (4, 3, 2, 1, 8, 7, 6, 5); freezone2 { 1 P5 }; { 1 P6 }; { 1 P2 }; { 1 P3 }; { 0.3 P1, 0.3 P2, 0.3 P5, 0.3 P6, -0.05 P3, -0.05 P4, -0.05 P7, -0.05 P8 }; { 0.3 P3, 0.3 P4, 0.3 P7, 0.3 P8, -0.05 P1, -0.05 P2, -0.05 P5, -0.05 P6 }; freezonelimit { 1 P5 }; { 1 P6 }; { 1 P2 }; { 1 P3 }; { 0.25 P1, 0.25 P2, 0.25 P5, 0.25 P6, -0.0 P3, -0.0 P4, -0.0 P7, -0.0 P8 }; { 0.25 P3, 0.25 P4, 0.25 P7, 0.25 P8, -0.0 P1, -0.0 P1, -0.0 P5, -0.0 P6 }; endrule rule "Hexa left-right-top (10)" quality 10 flags t; mappoints (0, 0, 0); (1, 0, 0) { 1 } ; (1, 1, 0) { 1 } ; (0, 1, 0) { 1 } ; (0, 0, 1) { 1 } ; (1, 0, 1) { 1 } ; (1, 1, 1) { 1 } ; (0, 1, 1) { 1 } ; mapfaces (4, 3, 2, 1) del; (3, 7, 6, 2) del; (7, 8, 5, 6) del; (8, 4, 1, 5) del; newpoints newfaces (5, 6, 2, 1); (7, 8, 4, 3); elements (4, 3, 2, 1, 8, 7, 6, 5); freezone2 { 1 P5 }; { 1 P6 }; { 1 P2 }; { 1 P3 }; { 0.251 P1, 0.251 P2, 0.251 P5, 0.251 P6, -0.05 P3, -0.001 P4, -0.001 P7, -0.001 P8 }; { 0.251 P3, 0.251 P4, 0.251 P7, 0.251 P8, -0.05 P1, -0.001 P2, -0.001 P5, -0.001 P6 }; freezonelimit { 1 P5 }; { 1 P6 }; { 1 P2 }; { 1 P3 }; { 0.25 P1, 0.25 P2, 0.25 P5, 0.25 P6, -0.0 P3, -0.0 P4, -0.0 P7, -0.0 P8 }; { 0.25 P3, 0.25 P4, 0.25 P7, 0.25 P8, -0.0 P1, -0.0 P1, -0.0 P5, -0.0 P6 }; endrule rule "Hexa left-right-top-front" quality 1 flags t; mappoints (0, 0, 0); (1, 0, 0) { 1 } ; (1, 1, 0) { 1 } ; (0, 1, 0) { 1 } ; (0, 0, 1) { 1 } ; (1, 0, 1) { 1 } ; (1, 1, 1) { 1 } ; (0, 1, 1) { 1 } ; mapfaces (4, 3, 2, 1) del; (3, 7, 6, 2) del; (7, 8, 5, 6) del; (8, 4, 1, 5) del; (1, 2, 6, 5) del; newpoints newfaces (7, 8, 4, 3); elements (4, 3, 2, 1, 8, 7, 6, 5); freezone2 { 1 P5 }; { 1 P6 }; { 1 P2 }; { 1 P3 }; { 0.3 P3, 0.3 P4, 0.3 P7, 0.3 P8, -0.05 P1, -0.05 P2, -0.05 P5, -0.05 P6 }; freezonelimit { 1 P5 }; { 1 P6 }; { 1 P2 }; { 1 P3 }; { 0.25 P3, 0.25 P4, 0.25 P7, 0.25 P8, -0.0 P1, -0.0 P1, -0.0 P5, -0.0 P6 }; endrule rule "Hexa fill" quality 1 flags t; mappoints (0, 0, 0); (1, 0, 0) { 1 } ; (1, 1, 0) { 1 } ; (0, 1, 0) { 1 } ; (0, 0, 1) { 1 } ; (1, 0, 1) { 1 } ; (1, 1, 1) { 1 } ; (0, 1, 1) { 1 } ; mapfaces (4, 3, 2, 1) del; (3, 7, 6, 2) del; (7, 8, 5, 6) del; (8, 4, 1, 5) del; (1, 2, 6, 5) del; (3, 4, 8, 7) del; newpoints newfaces elements (4, 3, 2, 1, 8, 7, 6, 5); freezone2 { 1 P1 }; { 1 P2 }; { 1 P5 }; { 1 P3 }; endrule netgen-6.2.1804/depcomp0000755000175000017500000003117413272137567013370 0ustar kurtkurt#! /bin/sh # depcomp - compile a program generating dependencies as side-effects # Copyright 1999, 2000 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # `libtool' can also be set to `yes' or `no'. depfile=${depfile-`echo "$object" | sed 's,\([^/]*\)$,.deps/\1,;s/\.\([^.]*\)$/.P\1/'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> $depfile echo >> $depfile # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> $depfile else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. This file always lives in the current directory. # Also, the AIX compiler puts `$object:' at the start of each line; # $object doesn't have directory information. stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'` tmpdepfile="$stripped.u" outname="$stripped.o" if test "$libtool" = yes; then "$@" -Wc,-M else "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi if test -f "$tmpdepfile"; then # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Must come before tru64. # Intel's C compiler understands `-MD -MF file'. However # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" sed -e "s,^[^:]*: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; tru64) # The Tru64 AIX compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. tmpdepfile1="$object.d" tmpdepfile2=`echo "$object" | sed -e 's/.o$/.d/'` if test "$libtool" = yes; then "$@" -Wc,-MD else "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi if test -f "$tmpdepfile1"; then tmpdepfile="$tmpdepfile1" else tmpdepfile="$tmpdepfile2" fi if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a space and a tab in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the proprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. test -z "$dashmflag" && dashmflag=-M ( IFS=" " case " $* " in *" --mode=compile "*) # this is libtool, let us make it quiet for arg do # cycle over the arguments case "$arg" in "--mode=compile") # insert --quiet before "--mode=compile" set fnord "$@" --quiet shift # fnord ;; esac set fnord "$@" "$arg" shift # fnord shift # "$arg" done ;; esac "$@" $dashmflag | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" ) & proc=$! "$@" stat=$? wait "$proc" if test "$stat" != 0; then exit $stat; fi rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) # X makedepend ( shift cleared=no for arg in "$@"; do case $cleared in no) set ""; shift cleared=yes esac case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift;; -*) ;; *) set fnord "$@" "$arg"; shift;; esac done obj_suffix="`echo $object | sed 's/^.*\././'`" touch "$tmpdepfile" ${MAKEDEPEND-makedepend} 2>/dev/null -o"$obj_suffix" -f"$tmpdepfile" "$@" ) & proc=$! "$@" stat=$? wait "$proc" if test "$stat" != 0; then exit $stat; fi rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tail +3 "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the proprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. ( IFS=" " case " $* " in *" --mode=compile "*) for arg do # cycle over the arguments case $arg in "--mode=compile") # insert --quiet before "--mode=compile" set fnord "$@" --quiet shift # fnord ;; esac set fnord "$@" "$arg" shift # fnord shift # "$arg" done ;; esac "$@" -E | sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" ) & proc=$! "$@" stat=$? wait "$proc" if test "$stat" != 0; then exit $stat; fi rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the proprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. ( IFS=" " case " $* " in *" --mode=compile "*) for arg do # cycle over the arguments case $arg in "--mode=compile") # insert --quiet before "--mode=compile" set fnord "$@" --quiet shift # fnord ;; esac set fnord "$@" "$arg" shift # fnord shift # "$arg" done ;; esac "$@" -E | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" ) & proc=$! "$@" stat=$? wait "$proc" if test "$stat" != 0; then exit $stat; fi rm -f "$depfile" echo "$object : \\" > "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 netgen-6.2.1804/ChangeLog0000644000175000017500000000000013272137567013545 0ustar kurtkurtnetgen-6.2.1804/AUTHORS0000644000175000017500000000006313272137567013054 0ustar kurtkurtJoachim Schoeberl netgen-6.2.1804/libsrc/0000755000175000017500000000000013272137567013263 5ustar kurtkurtnetgen-6.2.1804/libsrc/stlgeom/0000755000175000017500000000000013272137567014735 5ustar kurtkurtnetgen-6.2.1804/libsrc/stlgeom/stlline.cpp0000644000175000017500000003565613272137567017132 0ustar kurtkurt#include #include #include #include #include #include "stlgeom.hpp" namespace netgen { //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ //++++++++++++++ EDGE DATA ++++++++++++++++++++++++++++++++++++++++++ //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ /* void STLEdgeData :: Write(ofstream& of) const { of // << angle << " " << p1 << " " << p2 << " " << lt << " " << rt << " " // << status << endl; } void STLEdgeData :: Read(ifstream& ifs) { // ifs >> angle; ifs >> p1; ifs >> p2; ifs >> lt; ifs >> rt; // ifs >> status; } int STLEdgeData :: GetStatus () const { if (topedgenr <= 0 || topedgenr > top->GetNTE()) return 0; return top->GetTopEdge (topedgenr).GetStatus(); } void STLEdgeData ::SetStatus (int stat) { if (topedgenr >= 1 && topedgenr <= top->GetNTE()) top->GetTopEdge (topedgenr).SetStatus(stat); } float STLEdgeData :: CosAngle() const { return top->GetTopEdge (topedgenr).CosAngle(); } void STLEdgeDataList :: ResetAll() { int i; for (i = 1; i <= edgedata.Size(); i++) { edgedata.Elem(i).SetUndefined(); } } void STLEdgeDataList :: ResetCandidates() { int i; for (i = 1; i <= edgedata.Size(); i++) { if (edgedata.Get(i).Candidate()) {edgedata.Elem(i).SetUndefined();} } } int STLEdgeDataList :: GetNConfEdges() const { int i; int cnt = 0; for (i = 1; i <= edgedata.Size(); i++) { if (edgedata.Get(i).Confirmed()) {cnt++;} } return cnt; } void STLEdgeDataList :: ConfirmCandidates() { int i; for (i = 1; i <= edgedata.Size(); i++) { if (edgedata.Get(i).Candidate()) {edgedata.Elem(i).SetConfirmed();} } } int STLEdgeDataList :: GetEdgeNum(int np1, int np2) const { INDEX_2 ed(np1,np2); ed.Sort(); if (hashtab.Used(ed)) { return hashtab.Get(ed); } // int i; // for (i = 1; i <= Size(); i++) // { // if ((Get(i).p1 == np1 && Get(i).p2 == np2) || // (Get(i).p2 == np1 && Get(i).p1 == np2)) // { // return i; // } // } return 0; } const STLEdgeDataList& STLEdgeDataList :: operator=(const STLEdgeDataList& edl) { int i; SetSize(edl.Size()); for (i = 1; i <= Size(); i++) { Add(edl.Get(i), i); } return *this; } void STLEdgeDataList :: Add(const STLEdgeData& ed, int i) { INDEX_2 edge(ed.p1,ed.p2); edge.Sort(); hashtab.Set(edge, i); Elem(i) = ed; AddEdgePP(ed.p1,i); AddEdgePP(ed.p2,i); } void STLEdgeDataList :: Write(ofstream& of) const { of.precision(16); int i; of << Size() << endl; for (i = 1; i <= Size(); i++) { Get(i).Write(of); } } void STLEdgeDataList :: Read(ifstream& ifs) { int i,n; ifs >> n; SetSize(n); STLEdgeData ed; for (i = 1; i <= n; i++) { ed.Read(ifs); Add(ed,i); } } int STLEdgeDataList :: GetNEPPStat(int p, int status) const { int i; int cnt = 0; for (i = 1; i <= GetNEPP(p); i++) { if (Get(GetEdgePP(p,i)).GetStatus() == status) { cnt++; } } return cnt; } int STLEdgeDataList :: GetNConfCandEPP(int p) const { int i; int cnt = 0; for (i = 1; i <= GetNEPP(p); i++) { if (Get(GetEdgePP(p,i)).ConfCand()) { cnt++; } } return cnt; } void STLEdgeDataList :: BuildLineWithEdge(int ep1, int ep2, Array& line) { int status = Get(GetEdgeNum(ep1,ep2)).GetStatus(); int found, pstart, p, en, pnew, ennew; int closed = 0; int j, i; for (j = 1; j <= 2; j++) { if (j == 1) {p = ep1;} if (j == 2) {p = ep2;} pstart = p; en = GetEdgeNum(ep1,ep2); found = 1; while (found && !closed) { found = 0; if (GetNEPPStat(p,status) == 2) { for (i = 1; i <= GetNEPP(p); i++) { const STLEdgeData& e = Get(GetEdgePP(p,i)); if (GetEdgePP(p,i) != en && e.GetStatus() == status) { if (e.p1 == p) {pnew = e.p2;} else {pnew = e.p1;} ennew = GetEdgePP(p,i); } } if (pnew == pstart) {closed = 1;} else { line.Append(twoint(p,pnew)); p = pnew; en = ennew; found = 1; } } } } } */ STLEdgeDataList :: STLEdgeDataList (STLTopology & ageom) : geom(ageom) { ; } STLEdgeDataList :: ~STLEdgeDataList() { ; } void STLEdgeDataList :: Store () { int i, ne = geom.GetNTE(); storedstatus.SetSize(ne); for (i = 1; i <= ne; i++) { storedstatus.Elem(i) = Get(i).GetStatus(); } } void STLEdgeDataList :: Restore () { int i, ne = geom.GetNTE(); if (storedstatus.Size() == ne) for (i = 1; i <= ne; i++) geom.GetTopEdge(i).SetStatus (storedstatus.Elem(i)); } void STLEdgeDataList :: ResetAll() { int i, ne = geom.GetNTE(); for (i = 1; i <= ne; i++) geom.GetTopEdge (i).SetStatus (ED_UNDEFINED); } int STLEdgeDataList :: GetNConfEdges() const { int i, ne = geom.GetNTE(); int cnt = 0; for (i = 1; i <= ne; i++) if (geom.GetTopEdge (i).GetStatus() == ED_CONFIRMED) cnt++; return cnt; } void STLEdgeDataList :: ChangeStatus(int status1, int status2) { int i, ne = geom.GetNTE(); for (i = 1; i <= ne; i++) if (geom.GetTopEdge (i).GetStatus() == status1) geom.GetTopEdge (i).SetStatus (status2); } /* void STLEdgeDataList :: Add(const STLEdgeData& ed, int i) { INDEX_2 edge(ed.p1,ed.p2); edge.Sort(); hashtab.Set(edge, i); Elem(i) = ed; AddEdgePP(ed.p1,i); AddEdgePP(ed.p2,i); } */ void STLEdgeDataList :: Write(ofstream& of) const { /* of.precision(16); int i; of << Size() << endl; for (i = 1; i <= Size(); i++) { Get(i).Write(of); } */ of.precision(16); int i, ne = geom.GetNTE(); //of << GetNConfEdges() << endl; of << geom.GetNTE() << endl; for (i = 1; i <= ne; i++) { const STLTopEdge & edge = geom.GetTopEdge(i); //if (edge.GetStatus() == ED_CONFIRMED) of << edge.GetStatus() << " "; const Point3d & p1 = geom.GetPoint (edge.PNum(1)); const Point3d & p2 = geom.GetPoint (edge.PNum(2)); of << p1.X() << " " << p1.Y() << " " << p1.Z() << " " << p2.X() << " " << p2.Y() << " " << p2.Z() << endl; } } void STLEdgeDataList :: Read(ifstream& ifs) { int i, nce; Point3d p1, p2; int pi1, pi2; int status, ednum; ifs >> nce; for (i = 1; i <= nce; i++) { ifs >> status; ifs >> p1.X() >> p1.Y() >> p1.Z(); ifs >> p2.X() >> p2.Y() >> p2.Z(); pi1 = geom.GetPointNum (p1); pi2 = geom.GetPointNum (p2); ednum = geom.GetTopEdgeNum (pi1, pi2); if (ednum) { geom.GetTopEdge(ednum).SetStatus (status); // geom.GetTopEdge (ednum).SetStatus (ED_CONFIRMED); } } /* int i,n; ifs >> n; SetSize(n); STLEdgeData ed; for (i = 1; i <= n; i++) { ed.Read(ifs); Add(ed,i); } */ } int STLEdgeDataList :: GetNEPPStat(int p, int status) const { int i; int cnt = 0; for (i = 1; i <= GetNEPP(p); i++) { if (Get(GetEdgePP(p,i)).GetStatus() == status) { cnt++; } } return cnt; } int STLEdgeDataList :: GetNConfCandEPP(int p) const { int i; int cnt = 0; for (i = 1; i <= GetNEPP(p); i++) { if (Get(GetEdgePP(p,i)).GetStatus() == ED_CANDIDATE || Get(GetEdgePP(p,i)).GetStatus() == ED_CONFIRMED) { cnt++; } } return cnt; } void STLEdgeDataList :: BuildLineWithEdge(int ep1, int ep2, Array& line) { int status = Get(GetEdgeNum(ep1,ep2)).GetStatus(); int found, pstart, p(0), en, pnew(0), ennew(0); int closed = 0; int j, i; for (j = 1; j <= 2; j++) { if (j == 1) {p = ep1;} if (j == 2) {p = ep2;} pstart = p; en = GetEdgeNum(ep1,ep2); found = 1; while (found && !closed) { found = 0; if (GetNEPPStat(p,status) == 2) { for (i = 1; i <= GetNEPP(p); i++) { const STLTopEdge & e = Get(GetEdgePP(p,i)); if (GetEdgePP(p,i) != en && e.GetStatus() == status) { if (e.PNum(1) == p) {pnew = e.PNum(2);} else {pnew = e.PNum(1);} ennew = GetEdgePP(p,i); } } if (pnew == pstart) {closed = 1;} else { line.Append(twoint(p,pnew)); p = pnew; en = ennew; found = 1; } } } } } int Exists(int p1, int p2, const Array& line) { int i; for (i = 1; i <= line.Size(); i++) { if ( (line.Get(i).i1 == p1 && line.Get(i).i2 == p2) || (line.Get(i).i1 == p2 && line.Get(i).i2 == p1) ) {return 1;} } return 0; } void STLEdgeDataList :: BuildClusterWithEdge(int ep1, int ep2, Array& line) { int status = Get(GetEdgeNum(ep1,ep2)).GetStatus(); int p(0), en; int j, i, k; int oldend; int newend = 1; int pnew, ennew(0); int changed = 1; while (changed) { changed = 0; for (j = 1; j <= 2; j++) { oldend = newend; newend = line.Size(); for (k = oldend; k <= line.Size(); k++) { if (j == 1) p = line.Get(k).i1; if (j == 2) p = line.Get(k).i2; en = GetEdgeNum(line.Get(k).i1, line.Get(k).i2); for (i = 1; i <= GetNEPP(p); i++) { pnew = 0; const STLTopEdge & e = Get(GetEdgePP(p,i)); if (GetEdgePP(p,i) != en && e.GetStatus() == status) { if (e.PNum(1) == p) {pnew = e.PNum(2);} else {pnew = e.PNum(1);} ennew = GetEdgePP(p,i); } if (pnew && !Exists(p,pnew,line)) { changed = 1; line.Append(twoint(p,pnew)); p = pnew; en = ennew; } } } } } } //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ //+++++++++++++++++++ STL LINE +++++++++++++++++++++++++++++++ //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ STLLine :: STLLine(const STLGeometry * ageometry) : pts(), lefttrigs(), righttrigs() { geometry = ageometry; split = 0; }; int STLLine :: GetNS() const { if (pts.Size() <= 1) {return 0;} return pts.Size()-1; } void STLLine :: GetSeg(int nr, int& p1, int& p2) const { p1 = pts.Get(nr); p2 = pts.Get(nr+1); } int STLLine :: GetLeftTrig(int nr) const { if (nr > lefttrigs.Size()) {PrintSysError("In STLLine::GetLeftTrig!!!"); return 0;} return lefttrigs.Get(nr); }; int STLLine :: GetRightTrig(int nr) const { if (nr > righttrigs.Size()) {PrintSysError("In STLLine::GetRightTrig!!!"); return 0;} return righttrigs.Get(nr); }; double STLLine :: GetSegLen(const Array >& ap, int nr) const { return Dist(ap.Get(PNum(nr)),ap.Get(PNum(nr+1))); } double STLLine :: GetLength(const Array >& ap) const { double len = 0; for (int i = 2; i <= pts.Size(); i++) { len += (ap.Get(pts.Get(i)) - ap.Get(pts.Get(i-1))).Length(); } return len; } void STLLine :: GetBoundingBox (const Array > & ap, Box<3> & box) const { box.Set (ap.Get (pts[0])); for (int i = 1; i < pts.Size(); i++) box.Add (ap.Get(pts[i])); } Point<3> STLLine :: GetPointInDist(const Array >& ap, double dist, int& index) const { if (dist <= 0) { index = 1; return ap.Get(StartP()); } double len = 0; int i; for (i = 1; i < pts.Size(); i++) { double seglen = Dist (ap.Get(pts.Get(i)), ap.Get(pts.Get(i+1))); if (len + seglen > dist) { index = i; double relval = (dist - len) / (seglen + 1e-16); Vec3d v (ap.Get(pts.Get(i)), ap.Get(pts.Get(i+1))); return ap.Get(pts.Get(i)) + relval * v; } len += seglen; } index = pts.Size() - 1; return ap.Get(EndP()); } /* double stlgh; double GetH(const Point3d& p, double x) { return stlgh;//+0.5)*(x+0.5); } */ STLLine* STLLine :: Mesh(const Array >& ap, Array& mp, double ghi, class Mesh& mesh) const { static int timer1a = NgProfiler::CreateTimer ("mesh stl-line 1a"); static int timer1b = NgProfiler::CreateTimer ("mesh stl-line 1b"); static int timer2 = NgProfiler::CreateTimer ("mesh stl-line 2"); static int timer3 = NgProfiler::CreateTimer ("mesh stl-line 3"); NgProfiler::StartTimer (timer1a); STLLine* line = new STLLine(geometry); //stlgh = ghi; //uebergangsloesung!!!! double len = GetLength(ap); double inthl = 0; //integral of 1/h double dist = 0; double h; int ind; Point3d p; Box<3> bbox; GetBoundingBox (ap, bbox); double diam = bbox.Diam(); double minh = mesh.LocalHFunction().GetMinH (bbox.PMin(), bbox.PMax()); double maxseglen = 0; for (int i = 1; i <= GetNS(); i++) maxseglen = max2 (maxseglen, GetSegLen (ap, i)); int nph = 10+int(maxseglen / minh); //anzahl der integralauswertungen pro segment Array inthi(GetNS()*nph); Array curvelen(GetNS()*nph); NgProfiler::StopTimer (timer1a); NgProfiler::StartTimer (timer1b); for (int i = 1; i <= GetNS(); i++) { //double seglen = GetSegLen(ap,i); for (int j = 1; j <= nph; j++) { p = GetPointInDist(ap,dist,ind); //h = GetH(p,dist/len); h = mesh.GetH(p); dist += GetSegLen(ap,i)/(double)nph; inthl += GetSegLen(ap,i)/nph/(h); inthi.Elem((i-1)*nph+j) = GetSegLen(ap,i)/nph/h; curvelen.Elem((i-1)*nph+j) = GetSegLen(ap,i)/nph; } } int inthlint = int(inthl+1); if ( (inthlint < 3) && (StartP() == EndP())) { inthlint = 3; } if ( (inthlint == 1) && ShouldSplit()) { inthlint = 2; } double fact = inthl/(double)inthlint; dist = 0; int j = 1; p = ap.Get(StartP()); int pn = AddPointIfNotExists(mp, p, 1e-10*diam); int segn = 1; line->AddPoint(pn); line->AddLeftTrig(GetLeftTrig(segn)); line->AddRightTrig(GetRightTrig(segn)); line->AddDist(dist); NgProfiler::StopTimer (timer1b); NgProfiler::StartTimer (timer2); inthl = 0; //restart each meshseg for (int i = 1; i <= inthlint; i++) { while (inthl < 1.000000001 && j <= inthi.Size()) { inthl += inthi.Get(j)/fact; dist += curvelen.Get(j); j++; } //went too far: j--; double tofar = (inthl - 1)/inthi.Get(j); inthl -= tofar*inthi.Get(j); dist -= tofar*curvelen.Get(j)*fact; if (i == inthlint && fabs(dist - len) >= 1E-8) { PrintSysError("meshline failed!!!"); } if (i != inthlint) { p = GetPointInDist(ap,dist,ind); pn = AddPointIfNotExists(mp, p, 1e-10*diam); segn = ind; line->AddPoint(pn); line->AddLeftTrig(GetLeftTrig(segn)); line->AddRightTrig(GetRightTrig(segn)); line->AddDist(dist); } inthl = tofar*inthi.Get(j); dist += tofar*curvelen.Get(j)*fact; j++; } NgProfiler::StopTimer (timer2); NgProfiler::StartTimer (timer3); p = ap.Get(EndP()); pn = AddPointIfNotExists(mp, p, 1e-10*diam); segn = GetNS(); line->AddPoint(pn); line->AddLeftTrig(GetLeftTrig(segn)); line->AddRightTrig(GetRightTrig(segn)); line->AddDist(dist); for (int ii = 1; ii <= line->GetNS(); ii++) { int p1, p2; line->GetSeg(ii,p1,p2); } /* (*testout) << "line, " << ap.Get(StartP()) << "-" << ap.Get(EndP()) << " len = " << Dist (ap.Get(StartP()), ap.Get(EndP())) << endl; */ NgProfiler::StopTimer (timer3); return line; } } netgen-6.2.1804/libsrc/stlgeom/stltopology.hpp0000644000175000017500000002373613272137567020060 0ustar kurtkurt#ifndef FILE_STLTOPOLOGY #define FILE_STLTOPOLOGY /**************************************************************************/ /* File: stltopology.hpp */ /* Author: Joachim Schoeberl */ /* Author2: Johannes Gerstmayr */ /* Date: 26. Jul. 99 */ /**************************************************************************/ /* The STLTopology contains topologic information as triangle->point, point->triangles, triangle->edge, 2-points->edge,... */ class STLGeometry; #define STLBASE 1 class STLPointIndex { int i; public: STLPointIndex () { ; } STLPointIndex (int ai) : i(ai) { ; } STLPointIndex & operator= (const STLPointIndex & ai) { i = ai.i; return *this; } STLPointIndex & operator= (int ai) { i = ai; return *this; } operator int () const { return i; } STLPointIndex operator++ (int) { return i++; } STLPointIndex operator-- (int) { return i--; } }; class STLTrigIndex { int i; public: STLTrigIndex () { ; } STLTrigIndex (int ai) : i(ai) { ; } STLTrigIndex & operator= (const STLTrigIndex & ai) { i = ai.i; return *this; } STLTrigIndex & operator= (int ai) { i = ai; return *this; } operator int () const { return i; } STLTrigIndex operator++ (int) { return i++; } STLTrigIndex operator-- (int) { return i--; } }; // triangle structure for loading stl files class STLReadTriangle { Vec<3> normal; Point<3> pts[3]; public: STLReadTriangle (const Point<3> * apts, const Vec<3> & anormal); STLReadTriangle () {}; const Point<3> & operator[] (int i) const { return pts[i]; } const Vec<3> & Normal() const { return normal; } }; class STLTriangle { // topology edges of triangle, edge[i] opposite to point[i] int topedges[3]; // neighbour triangles, trig[i] opposite to point[i] int nbtrigs[2][3]; // normalized stored normal vector ?? Vec<3> normal; // point numbers of triangle int pts[3]; // front-side and back-side domains int domains[2]; public: Box<3> box; Point<3> center; double rad; int facenum; struct { unsigned int toperror : 1; } flags; STLTriangle (const int * apts); STLTriangle () {pts[0]=0;pts[1]=0;pts[2]=0;} int operator[] (int i) const { return pts[i]; } int & operator[] (int i) { return pts[i]; } int EdgeNum(int i) const { return topedges[(i-1)]; } int & EdgeNum(int i) { return topedges[(i-1)]; } int NBTrig (bool side, int i) const { return nbtrigs[side][i]; } int & NBTrig (bool side, int i) { return nbtrigs[side][i]; } int Domain (bool side) const { return domains[side]; } int & Domain (bool side) { return domains[side]; } // obsolete: int PNum(int i) const { return pts[(i-1)]; } int & PNum(int i) { return pts[(i-1)]; } int PNumMod(int i) const { return pts[(i-1)%3]; } int & PNumMod(int i) { return pts[(i-1)%3]; } int EdgeNumMod(int i) const { return topedges[(i-1)%3]; } int & EdgeNumMod(int i) { return topedges[(i-1)%3]; } int NBTrigNum(int i) const { return nbtrigs[0][(i-1)]; } int & NBTrigNum(int i) { return nbtrigs[0][(i-1)]; } int NBTrigNumMod(int i) const { return nbtrigs[0][(i-1)%3]; } int & NBTrigNumMod(int i) { return nbtrigs[0][(i-1)%3]; } // consistently oriented neighbour: int IsNeighbourFrom(const STLTriangle& t) const; // opposite to consistently oriented neighbour: int IsWrongNeighbourFrom(const STLTriangle& t) const; ///Get the two points of neighbour-Triangles in orientation of this-Triangle void GetNeighbourPoints(const STLTriangle& t, int& p1, int& p2) const; int GetNeighbourPointsAndOpposite(const STLTriangle& t, int& p1, int& p2, int& po) const; // NON-normalized geometry - normal vector Vec<3> GeomNormal(const Array >& ap) const; // Stored normal vector, normalized void SetNormal (const Vec<3> & n); const Vec<3> & Normal () const { return normal; } void ChangeOrientation(); //project with a certain normal vector in plane void ProjectInPlain(const Array >& ap, const Vec<3> & n, Point<3> & pp) const; //project with the triangle's normal vector in plane void ProjectInPlain(const Array > & ap, Point<3> & pp) const; /* Project the point pp along the nproj into the plane of the triangle. The triangle normal is given by ntrig to avoid numerical instabilities. The local coordinates lam are defined by pp(input) = P1 + lam1 v1 + lam2 v2 + lam3 n the result is pp(output) = P1 + lam1 v1 + lam2 v2 */ int ProjectInPlain (const Array >& ap, const Vec<3> & nproj, Point<3> & pp, Vec<3> & lam) const; int PointInside(const Array >& ap, const Point<3> & pp) const; //get nearest point on triangle and distance to it double GetNearestPoint(const Array >& ap, Point<3> & p3d) const; double Area(const Array >& ap) const; double MinHeight(const Array >& ap) const; double MaxLength(const Array >& ap) const; //max length of a side of triangle int GetFaceNum() {return facenum;} void SetFaceNum(int i) {facenum = i;} int HasEdge(int p1, int p2) const; }; /** Topology Edge: Useful unside a face. A edges sharing more than 2 faces: trigs are undefined */ class STLTopEdge { int pts[2]; int trigs[2]; double cosangle; int status; // excluded, confirmed, candidate, undefined public: STLTopEdge (); STLTopEdge (int p1, int p2, int trig1, int trig2); int operator[] (int i) const { return pts[i]; } int & operator[] (int i) { return pts[i]; } int PNum(int i) const { return pts[(i-1)]; } int & PNum(int i) { return pts[(i-1)]; } int PNumMod(int i) const { return pts[(i-1)%2]; } int & PNumMod(int i) { return pts[(i-1)%2]; } int TrigNum(int i) const { return trigs[(i-1)]; } int & TrigNum(int i) { return trigs[(i-1)]; } int TrigNumMod(int i) const { return trigs[(i-1)%2]; } int & TrigNumMod(int i) { return trigs[(i-1)%2]; } void SetCosAngle (double ca) { cosangle = ca; } double CosAngle () const { return cosangle; } double Angle () const { return acos (cosangle); } void SetStatus (int stat) { status = stat; } int GetStatus () const { return status; } }; ostream& operator<<(ostream& os, const STLTriangle& t); class STLTopology { protected: Array trias; Array topedges; Array > points; // mapping of sorted pair of points to topedge INDEX_2_HASHTABLE * ht_topedges; // mapping of node to trigs TABLE trigsperpoint; // mapping of node to edges TABLE topedgesperpoint; // searchtree for trigs and points BoxTree<3> * searchtree; // ADT Point3dTree * pointtree; Box<3> boundingbox; double pointtol; public: enum STL_GEOM_STATUS { STL_GOOD, STL_WARNING, STL_ERROR }; protected: STL_GEOM_STATUS status; string statustext; bool topology_ok; bool orientation_ok; public: STLTopology(); virtual ~STLTopology(); static STLGeometry * LoadNaomi (istream & ist); static STLGeometry * Load (istream & ist); static STLGeometry * LoadBinary (istream & ist); void Save (const char* filename) const; void SaveBinary (const char* filename, const char* aname) const; void SaveSTLE (const char * filename) const; // stores trigs and edges virtual void InitSTLGeometry (const Array & readtrigs); virtual void TopologyChanged() {}; //do some things, if topology changed! /// Generate topology tables void FindNeighbourTrigs(); void GetTrianglesInBox (const Box<3> & box, Array & trias) const; int GetNP() const { return points.Size(); } int AddPoint(const Point<3> & p) { points.Append(p); return points.Size(); } const Point<3> & GetPoint(int nr) const { return points.Get(nr); } int GetPointNum (const Point<3> & p); void SetPoint(int nr, const Point<3> & p) { points.Elem(nr) = p; } const Array >& GetPoints() const { return points; } const Point<3> & operator[] (STLPointIndex i) const { return points[i]; } Point<3> & operator[] (STLPointIndex i) { return points[i]; } int GetNT() const { return trias.Size(); } void AddTriangle(const STLTriangle& t); const STLTriangle & GetTriangle (int nr) const { return trias.Get(nr); } STLTriangle & GetTriangle (int nr) { return trias.Elem(nr); } const STLTriangle & operator[] (STLTrigIndex i) const { return trias[i]; } STLTriangle & operator[] (STLTrigIndex i) { return trias[i]; } int GetNTE() const { return topedges.Size(); } const STLTopEdge & GetTopEdge (int nr) const { return topedges.Get(nr); } STLTopEdge & GetTopEdge (int nr) { return topedges.Elem(nr); } int GetTopEdgeNum (int pi1, int pi2) const; int NOTrigsPerPoint(int pn) { return trigsperpoint.EntrySize(pn); } int TrigPerPoint(int pn, int i) { return trigsperpoint.Get(pn, i); } int NTopEdgesPerPoint (int pn) const { return topedgesperpoint.EntrySize(pn); } int TopEdgePerPoint (int pn, int ei) const { return topedgesperpoint.Get(pn, ei); } bool Topology_Ok() const { return topology_ok; } bool Orientation_Ok() const { return orientation_ok; } STL_GEOM_STATUS GetStatus () const { return status; } const string & GetStatusText () const { return statustext; } DLL_HEADER void InvertTrig (int trig); DLL_HEADER void DeleteTrig (int trig); DLL_HEADER void OrientAfterTrig (int trig); // Table will be constructed, if topology is not ok /// neighbourtrigs for surfacetrigs TABLE neighbourtrigs; /// get nr-th neighbour Triangle for triangle trig int NONeighbourTrigs(int trig) const { return neighbourtrigs.EntrySize(trig); } int NeighbourTrig(int trig, int nr) const { return neighbourtrigs.Get(trig,nr); } int NeighbourTrigSorted(int trig, int nr) const; void AddNeighbourTrig(int i, int nt) { neighbourtrigs.Add1(i, nt); } int GetLeftTrig (int p1, int p2) const; int GetRightTrig (int p1, int p2) const; const Box<3> & GetBoundingBox () const { return boundingbox; } }; #endif netgen-6.2.1804/libsrc/stlgeom/meshstlsurface.cpp0000644000175000017500000006711513272137567020503 0ustar kurtkurt#include #include #include #include #include #include "stlgeom.hpp" namespace netgen { static void STLFindEdges (STLGeometry & geom, class Mesh & mesh) { double h = mparam.maxh; // mark edge points: //int ngp = geom.GetNP(); geom.RestrictLocalH(mesh, h); PushStatusF("Mesh Lines"); Array meshlines; Array meshpoints; PrintMessage(3,"Mesh Lines"); /* cout << geom.GetNLines() << " lines" << endl; double totnp = 0; for (int i = 1; i <= geom.GetNLines(); i++) totnp += geom.GetLine(i)->NP(); cout << "avg np per line " << totnp/geom.GetNLines() << endl; */ for (int i = 1; i <= geom.GetNLines(); i++) { meshlines.Append(geom.GetLine(i)->Mesh(geom.GetPoints(), meshpoints, h, mesh)); SetThreadPercent(100.0 * (double)i/(double)geom.GetNLines()); } geom.meshpoints.SetSize(0); //testing geom.meshlines.SetSize(0); //testing for (int i = 1; i <= meshpoints.Size(); i++) { geom.meshpoints.Append(meshpoints.Get(i)); //testing mesh.AddPoint(meshpoints.Get(i)); } //(++++++++++++++testing for (int i = 1; i <= geom.GetNLines(); i++) { geom.meshlines.Append(meshlines.Get(i)); } //++++++++++++++testing) PrintMessage(7,"feed with edges"); for (int i = 1; i <= meshlines.Size(); i++) { STLLine* line = meshlines.Get(i); (*testout) << "store line " << i << endl; for (int j = 1; j <= line->GetNS(); j++) { int p1, p2; line->GetSeg(j, p1, p2); int trig1, trig2, trig1b, trig2b; if (p1 == p2) cout << "Add Segment, p1 == p2 == " << p1 << endl; // Test auf geschlossener Rand mit 2 Segmenten if ((j == 2) && (line->GetNS() == 2)) { int oldp1, oldp2; line->GetSeg (1, oldp1, oldp2); if (oldp1 == p2 && oldp2 == p1) { PrintMessage(7,"MESSAGE: don't use second segment"); continue; } } //mesh point number //p1 = geom2meshnum.Get(p1); // for unmeshed lines!!! //p2 = geom2meshnum.Get(p2); // for unmeshed lines!!! //left and right trigs trig1 = line->GetLeftTrig(j); trig2 = line->GetRightTrig(j); trig1b = line->GetLeftTrig(j+1); trig2b = line->GetRightTrig(j+1); (*testout) << "j = " << j << ", p1 = " << p1 << ", p2 = " << p2 << endl; (*testout) << "segm-trigs: " << "trig1 = " << trig1 << ", trig1b = " << trig1b << ", trig2 = " << trig2 << ", trig2b = " << trig2b << endl; if (trig1 <= 0 || trig2 <= 0 || trig1b <= 0 || trig2b <= 0) { cout << "negative trigs, " << ", trig1 = " << trig1 << ", trig1b = " << trig1b << ", trig2 = " << trig2 << ", trig2b = " << trig2b << endl; } /* (*testout) << " trigs p1: " << trig1 << " - " << trig2 << endl; (*testout) << " trigs p2: " << trig1b << " - " << trig2b << endl; (*testout) << " charts p1: " << geom.GetChartNr(trig1) << " - " << geom.GetChartNr(trig2) << endl; (*testout) << " charts p2: " << geom.GetChartNr(trig1b) << " - " << geom.GetChartNr(trig2b) << endl; */ Point3d hp, hp2; Segment seg; seg[0] = p1 + PointIndex::BASE-1; seg[1] = p2 + PointIndex::BASE-1; seg.si = geom.GetTriangle(trig1).GetFaceNum(); seg.edgenr = i; seg.epgeominfo[0].edgenr = i; seg.epgeominfo[0].dist = line->GetDist(j); seg.epgeominfo[1].edgenr = i; seg.epgeominfo[1].dist = line->GetDist(j+1); /* (*testout) << "seg = " << "edgenr " << seg.epgeominfo[0].edgenr << " dist " << seg.epgeominfo[0].dist << " edgenr " << seg.epgeominfo[1].edgenr << " dist " << seg.epgeominfo[1].dist << endl; */ seg.geominfo[0].trignum = trig1; seg.geominfo[1].trignum = trig1b; /* geom.SelectChartOfTriangle (trig1); hp = hp2 = mesh.Point (seg[0]); seg.geominfo[0].trignum = geom.Project (hp); (*testout) << "hp = " << hp2 << ", hp proj = " << hp << ", trignum = " << seg.geominfo[0].trignum << endl; if (Dist (hp, hp2) > 1e-5 || seg.geominfo[0].trignum == 0) { (*testout) << "PROBLEM" << endl; } geom.SelectChartOfTriangle (trig1b); hp = hp2 = mesh.Point (seg[1]); seg.geominfo[1].trignum = geom.Project (hp); (*testout) << "hp = " << hp2 << ", hp proj = " << hp << ", trignum = " << seg.geominfo[1].trignum << endl; if (Dist (hp, hp2) > 1e-5 || seg.geominfo[1].trignum == 0) { (*testout) << "PROBLEM" << endl; } */ if (Dist (mesh.Point(seg[0]), mesh.Point(seg[1])) < 1e-10) { (*testout) << "ERROR: Line segment of length 0" << endl; (*testout) << "pi1, 2 = " << seg[0] << ", " << seg[1] << endl; (*testout) << "p1, 2 = " << mesh.Point(seg[0]) << ", " << mesh.Point(seg[1]) << endl; throw NgException ("Line segment of length 0"); } mesh.AddSegment (seg); Segment seg2; seg2[0] = p2 + PointIndex::BASE-1;; seg2[1] = p1 + PointIndex::BASE-1;; seg2.si = geom.GetTriangle(trig2).GetFaceNum(); seg2.edgenr = i; seg2.epgeominfo[0].edgenr = i; seg2.epgeominfo[0].dist = line->GetDist(j+1); seg2.epgeominfo[1].edgenr = i; seg2.epgeominfo[1].dist = line->GetDist(j); /* (*testout) << "seg = " << "edgenr " << seg2.epgeominfo[0].edgenr << " dist " << seg2.epgeominfo[0].dist << " edgenr " << seg2.epgeominfo[1].edgenr << " dist " << seg2.epgeominfo[1].dist << endl; */ seg2.geominfo[0].trignum = trig2b; seg2.geominfo[1].trignum = trig2; /* geom.SelectChartOfTriangle (trig2); hp = hp2 = mesh.Point (seg[0]); seg2.geominfo[0].trignum = geom.Project (hp); (*testout) << "hp = " << hp2 << ", hp proj = " << hp << ", trignum = " << seg.geominfo[0].trignum << endl; if (Dist (hp, hp2) > 1e-5 || seg2.geominfo[0].trignum == 0) { (*testout) << "Get GeomInfo PROBLEM" << endl; } geom.SelectChartOfTriangle (trig2b); hp = hp2 = mesh.Point (seg[1]); seg2.geominfo[1].trignum = geom.Project (hp); (*testout) << "hp = " << hp2 << ", hp proj = " << hp << ", trignum = " << seg.geominfo[1].trignum << endl; if (Dist (hp, hp2) > 1e-5 || seg2.geominfo[1].trignum == 0) { (*testout) << "Get GeomInfo PROBLEM" << endl; } */ mesh.AddSegment (seg2); } } PopStatus(); } void STLSurfaceMeshing1 (STLGeometry & geom, class Mesh & mesh, int retrynr); int STLSurfaceMeshing (STLGeometry & geom, class Mesh & mesh) { PrintFnStart("Do Surface Meshing"); geom.PrepareSurfaceMeshing(); if (mesh.GetNSeg() == 0) STLFindEdges (geom, mesh); int nopen; int outercnt = 20; for (int i = 1; i <= mesh.GetNSeg(); i++) { const Segment & seg = mesh.LineSegment (i); if (seg.geominfo[0].trignum <= 0 || seg.geominfo[1].trignum <= 0) (*testout) << "Problem with segment " << i << ": " << seg << endl; } do { outercnt--; if (outercnt <= 0) return MESHING3_OUTERSTEPSEXCEEDED; if (multithread.terminate) return MESHING3_TERMINATE; mesh.FindOpenSegments(); nopen = mesh.GetNOpenSegments(); if (nopen) { int trialcnt = 0; while (nopen && trialcnt <= 5) { if (multithread.terminate) { return MESHING3_TERMINATE; } trialcnt++; STLSurfaceMeshing1 (geom, mesh, trialcnt); mesh.FindOpenSegments(); nopen = mesh.GetNOpenSegments(); if (nopen) { geom.ClearMarkedSegs(); for (int i = 1; i <= nopen; i++) { const Segment & seg = mesh.GetOpenSegment (i); geom.AddMarkedSeg(mesh.Point(seg[0]),mesh.Point(seg[1])); } geom.InitMarkedTrigs(); for (int i = 1; i <= nopen; i++) { const Segment & seg = mesh.GetOpenSegment (i); geom.SetMarkedTrig(seg.geominfo[0].trignum,1); geom.SetMarkedTrig(seg.geominfo[1].trignum,1); } MeshOptimizeSTLSurface optmesh(geom); optmesh.SetFaceIndex (0); optmesh.SetImproveEdges (0); optmesh.SetMetricWeight (0); mesh.CalcSurfacesOfNode(); optmesh.EdgeSwapping (mesh, 0); mesh.CalcSurfacesOfNode(); optmesh.ImproveMesh (mesh, mparam); } mesh.Compress(); mesh.FindOpenSegments(); nopen = mesh.GetNOpenSegments(); if (trialcnt <= 5 && nopen) { mesh.RemoveOneLayerSurfaceElements(); if (trialcnt >= 4) { mesh.FindOpenSegments(); mesh.RemoveOneLayerSurfaceElements(); mesh.FindOpenSegments (); nopen = mesh.GetNOpenSegments(); } } } if (multithread.terminate) return MESHING3_TERMINATE; if (nopen) { PrintMessage(3,"Meshing failed, trying to refine"); mesh.FindOpenSegments (); nopen = mesh.GetNOpenSegments(); mesh.FindOpenSegments (); mesh.RemoveOneLayerSurfaceElements(); mesh.FindOpenSegments (); mesh.RemoveOneLayerSurfaceElements(); // Open edge-segments will be refined ! INDEX_2_HASHTABLE openseght (nopen+1); for (int i = 1; i <= mesh.GetNOpenSegments(); i++) { const Segment & seg = mesh.GetOpenSegment (i); INDEX_2 i2(seg[0], seg[1]); i2.Sort(); openseght.Set (i2, 1); } mesh.FindOpenSegments (); mesh.RemoveOneLayerSurfaceElements(); mesh.FindOpenSegments (); mesh.RemoveOneLayerSurfaceElements(); INDEX_2_HASHTABLE newpht(100); int nsegold = mesh.GetNSeg(); for (int i = 1; i <= nsegold; i++) { Segment seg = mesh.LineSegment(i); INDEX_2 i2(seg[0], seg[1]); i2.Sort(); if (openseght.Used (i2)) { // segment will be split PrintMessage(7,"Split segment ", int(seg[0]), "-", int(seg[1])); Segment nseg1, nseg2; EdgePointGeomInfo newgi; const EdgePointGeomInfo & gi1 = seg.epgeominfo[0]; const EdgePointGeomInfo & gi2 = seg.epgeominfo[1]; newgi.dist = 0.5 * (gi1.dist + gi2.dist); newgi.edgenr = gi1.edgenr; int hi; Point3d newp; int newpi; if (!newpht.Used (i2)) { newp = geom.GetLine (gi1.edgenr)-> GetPointInDist (geom.GetPoints(), newgi.dist, hi); newpi = mesh.AddPoint (newp); newpht.Set (i2, newpi); } else { newpi = newpht.Get (i2); newp = mesh.Point (newpi); } nseg1 = seg; nseg2 = seg; nseg1[1] = newpi; nseg1.epgeominfo[1] = newgi; nseg2[0] = newpi; nseg2.epgeominfo[0] = newgi; mesh.LineSegment(i) = nseg1; mesh.AddSegment (nseg2); mesh.RestrictLocalH (Center (mesh.Point(nseg1[0]), mesh.Point(nseg1[1])), Dist (mesh.Point(nseg1[0]), mesh.Point(nseg1[1]))); mesh.RestrictLocalH (Center (mesh.Point(nseg2[0]), mesh.Point(nseg2[1])), Dist (mesh.Point(nseg2[0]), mesh.Point(nseg2[1]))); } } } nopen = -1; } else { PrintMessage(5,"mesh is closed, verifying ..."); // no open elements, check wrong elements (intersecting..) PrintMessage(5,"check overlapping"); // mesh.FindOpenElements(); // would leed to locked points if(mesh.CheckOverlappingBoundary()) return MESHING3_BADSURFACEMESH; geom.InitMarkedTrigs(); for (int i = 1; i <= mesh.GetNSE(); i++) if (mesh.SurfaceElement(i).BadElement()) { int trig = mesh.SurfaceElement(i).PNum(1); geom.SetMarkedTrig(trig,1); PrintMessage(7, "overlapping element, will be removed"); } Array refpts; Array refh; // was commented: for (int i = 1; i <= mesh.GetNSE(); i++) if (mesh.SurfaceElement(i).BadElement()) { for (int j = 1; j <= 3; j++) { refpts.Append (mesh.Point (mesh.SurfaceElement(i).PNum(j))); refh.Append (mesh.GetH (refpts.Last()) / 2); } mesh.DeleteSurfaceElement(i); } // delete wrong oriented element for (int i = 1; i <= mesh.GetNSE(); i++) { const Element2d & el = mesh.SurfaceElement(i); if (!el.PNum(1)) continue; Vec3d n = Cross (Vec3d (mesh.Point(el.PNum(1)), mesh.Point(el.PNum(2))), Vec3d (mesh.Point(el.PNum(1)), mesh.Point(el.PNum(3)))); Vec3d ng = geom.GetTriangle(el.GeomInfoPi(1).trignum).Normal(); if (n * ng < 0) { refpts.Append (mesh.Point (mesh.SurfaceElement(i).PNum(1))); refh.Append (mesh.GetH (refpts.Last()) / 2); mesh.DeleteSurfaceElement(i); } } // end comments for (int i = 1; i <= refpts.Size(); i++) mesh.RestrictLocalH (refpts.Get(i), refh.Get(i)); mesh.RemoveOneLayerSurfaceElements(); mesh.Compress(); mesh.FindOpenSegments (); nopen = mesh.GetNOpenSegments(); /* if (!nopen) { // mesh is still ok void STLSurfaceOptimization (STLGeometry & geom, class Mesh & mesh, MeshingParameters & mparam) } */ } } while (nopen); mesh.Compress(); mesh.CalcSurfacesOfNode(); return MESHING3_OK; } void STLSurfaceMeshing1 (STLGeometry & geom, class Mesh & mesh, int retrynr) { static int timer1 = NgProfiler::CreateTimer ("STL surface meshing1"); static int timer1a = NgProfiler::CreateTimer ("STL surface meshing1a"); static int timer1b = NgProfiler::CreateTimer ("STL surface meshing1b"); static int timer1c = NgProfiler::CreateTimer ("STL surface meshing1c"); static int timer1d = NgProfiler::CreateTimer ("STL surface meshing1d"); double h = mparam.maxh; mesh.FindOpenSegments(); Array spiralps(0); spiralps.SetSize(0); for (int i = 1; i <= geom.GetNP(); i++) if (geom.GetSpiralPoint(i)) spiralps.Append(i); PrintMessage(7,"NO spiralpoints = ", spiralps.Size()); //int spfound; /* Array meshsp(mesh.GetNP()); meshsp = 0; for (int i = 1; i <= mesh.GetNP(); i++) for (int j = 1; j <= spiralps.Size(); j++) if (Dist2(geom.GetPoint(spiralps.Get(j)), mesh.Point(i)) < 1e-20) meshsp.Elem(i) = spiralps.Get(j); Array imeshsp; for (int i = 1; i <= meshsp.Size(); i++) if (meshsp.Elem(i)) imeshsp.Append(i); */ Array imeshsp; Array ispiral_point; for (int i = 1; i <= mesh.GetNP(); i++) { for (int j = 1; j <= spiralps.Size(); j++) if (Dist2(geom.GetPoint(spiralps.Get(j)), mesh.Point(i)) < 1e-20) { imeshsp.Append(i); ispiral_point.Append(spiralps.Get(j)); break; } } double starttime = GetTime (); mesh.SurfaceArea().ReCalc(); // int oldnp = mesh.GetNP(); Array compress(mesh.GetNP()); compress = 0; Array icompress; Array opensegsperface(mesh.GetNFD()); opensegsperface = 0; for (int i = 1; i <= mesh.GetNOpenSegments(); i++) opensegsperface[mesh.GetOpenSegment(i).si]++; TABLE opensegments(mesh.GetNFD()); for (int i = 1; i <= mesh.GetNOpenSegments(); i++) { const Segment & seg = mesh.GetOpenSegment (i); if (seg.si < 1 || seg.si > mesh.GetNFD()) cerr << "segment index " << seg.si << " out of range [1, " << mesh.GetNFD() << "]" << endl; opensegments.Add (seg.si, i); } for (int fnr = 1; fnr <= mesh.GetNFD(); fnr++) { if (fnr == 100) NgProfiler::ClearTimers(); if (!opensegsperface[fnr]) continue; if (multithread.terminate) return; NgProfiler::StartTimer (timer1); NgProfiler::StartTimer (timer1a); PrintMessage(5,"Meshing surface ", fnr, "/", mesh.GetNFD()); MeshingSTLSurface meshing (geom, mparam); meshing.SetStartTime (starttime); // compress = 0; icompress.SetSize(0); int cntused = 0; for (int i = 0; i < imeshsp.Size(); i++) { compress[imeshsp[i]] = ++cntused; icompress.Append(imeshsp[i]); } NgProfiler::StopTimer (timer1a); NgProfiler::StartTimer (timer1b); /* for (int i = 1; i <= mesh.GetNOpenSegments(); i++) { const Segment & seg = mesh.GetOpenSegment (i); if (seg.si == fnr) for (int j = 0; j < 2; j++) if (compress[seg[j]] == 0) { compress[seg[j]] = ++cntused; icompress.Append(seg[j]); } } */ FlatArray segs = opensegments[fnr]; for (int hi = 0; hi < segs.Size(); hi++) { int i = segs[hi]; const Segment & seg = mesh.GetOpenSegment (i); for (int j = 0; j < 2; j++) if (compress[seg[j]] == 0) { compress[seg[j]] = ++cntused; icompress.Append(seg[j]); } } NgProfiler::StopTimer (timer1b); NgProfiler::StartTimer (timer1c); for (int hi = 0; hi < icompress.Size(); hi++) { PointIndex pi = icompress[hi]; /* // int sppointnum = meshsp.Get(i); int sppointnum = 0; if (hi < ispiral_point.Size()) sppointnum = ispiral_point[hi]; if (sppointnum) { */ if (hi < ispiral_point.Size()) { int sppointnum = ispiral_point[hi]; MultiPointGeomInfo mgi; int ntrigs = geom.NOTrigsPerPoint(sppointnum); for (int j = 0; j < ntrigs; j++) { PointGeomInfo gi; gi.trignum = geom.TrigPerPoint(sppointnum, j+1); mgi.AddPointGeomInfo (gi); } // Einfuegen von ConePoint: Point bekommt alle // Dreiecke (werden dann intern kopiert) // Ein Segment zum ConePoint muss vorhanden sein !!! // meshing.AddPoint (mesh.Point(i), i, &mgi); meshing.AddPoint (mesh[pi], pi, &mgi); } else meshing.AddPoint (mesh[pi], pi); } NgProfiler::StopTimer (timer1c); NgProfiler::StartTimer (timer1d); /* for (int i = 1; i <= mesh.GetNOpenSegments(); i++) { const Segment & seg = mesh.GetOpenSegment (i); if (seg.si == fnr) meshing.AddBoundaryElement (compress[seg[0]], compress[seg[1]], seg.geominfo[0], seg.geominfo[1]); } */ // FlatArray segs = opensegments[fnr]; for (int hi = 0; hi < segs.Size(); hi++) { int i = segs[hi]; const Segment & seg = mesh.GetOpenSegment (i); meshing.AddBoundaryElement (compress[seg[0]], compress[seg[1]], seg.geominfo[0], seg.geominfo[1]); } NgProfiler::StopTimer (timer1d); NgProfiler::StopTimer (timer1); PrintMessage(3,"start meshing, trialcnt = ", retrynr); meshing.GenerateMesh (mesh, mparam, h, fnr); for (int i = 0; i < icompress.Size(); i++) compress[icompress[i]] = 0; mparam.Render(); } // NgProfiler::Print(stdout); mesh.CalcSurfacesOfNode(); } void STLSurfaceOptimization (STLGeometry & geom, class Mesh & mesh, MeshingParameters & meshparam) { PrintFnStart("optimize STL Surface"); MeshOptimizeSTLSurface optmesh(geom); optmesh.SetFaceIndex (0); optmesh.SetImproveEdges (0); optmesh.SetMetricWeight (meshparam.elsizeweight); PrintMessage(5,"optimize string = ", meshparam.optimize2d, " elsizew = ", meshparam.elsizeweight); for (int i = 1; i <= meshparam.optsteps2d; i++) for (size_t j = 1; j <= meshparam.optimize2d.length(); j++) { if (multithread.terminate) break; //(*testout) << "optimize, before, step = " << meshparam.optimize2d[j-1] << mesh.Point (3679) << endl; mesh.CalcSurfacesOfNode(); switch (meshparam.optimize2d[j-1]) { case 's': { optmesh.EdgeSwapping (mesh, 0); break; } case 'S': { optmesh.EdgeSwapping (mesh, 1); break; } case 'm': { optmesh.ImproveMesh(mesh, mparam); break; } case 'c': { optmesh.CombineImprove (mesh); break; } } //(*testout) << "optimize, after, step = " << meshparam.optimize2d[j-1] << mesh.Point (3679) << endl; } geom.surfaceoptimized = 1; mesh.Compress(); mesh.CalcSurfacesOfNode(); } MeshingSTLSurface :: MeshingSTLSurface (STLGeometry & ageom, const MeshingParameters & mp) : Meshing2(mp, ageom.GetBoundingBox()), geom(ageom) { ; } void MeshingSTLSurface :: DefineTransformation (const Point3d & p1, const Point3d & p2, const PointGeomInfo * geominfo, const PointGeomInfo * geominfo2) { transformationtrig = geominfo[0].trignum; geom.DefineTangentialPlane(p1, p2, transformationtrig); } void MeshingSTLSurface :: TransformToPlain (const Point3d & locpoint, const MultiPointGeomInfo & gi, Point2d & plainpoint, double h, int & zone) { int trigs[10000]; if (gi.GetNPGI() >= 9999) { PrintError("In Transform to plane: increase size of trigs!!!"); } for (int i = 1; i <= gi.GetNPGI(); i++) trigs[i-1] = gi.GetPGI(i).trignum; trigs[gi.GetNPGI()] = 0; // int trig = gi.trignum; // (*testout) << "locpoint = " << locpoint; Point<2> hp2d; geom.ToPlane (locpoint, trigs, hp2d, h, zone, 1); plainpoint = hp2d; // geom.ToPlane (locpoint, NULL, plainpoint, h, zone, 1); /* (*testout) << " plainpoint = " << plainpoint << " h = " << h << endl; */ } /* int MeshingSTLSurface :: ComputeLineGeoInfo (const Point3d & p1, const Point3d & p2, int & geoinfosize, void *& geoinfo) { static int geomtrig[2] = { 0, 0 }; Point3d hp; hp = p1; geomtrig[0] = geom.Project (hp); hp = p2; geomtrig[1] = geom.Project (hp); geoinfosize = sizeof (geomtrig); geoinfo = &geomtrig; if (geomtrig[0] == 0) { return 1; } return 0; } */ int MeshingSTLSurface :: ComputePointGeomInfo (const Point3d & p, PointGeomInfo & gi) { // compute triangle of point, // if non-unique: 0 Point<3> hp = p; gi.trignum = geom.Project (hp); if (!gi.trignum) { return 1; } return 0; } int MeshingSTLSurface :: ChooseChartPointGeomInfo (const MultiPointGeomInfo & mpgi, PointGeomInfo & pgi) { for (int i = 1; i <= mpgi.GetNPGI(); i++) if (geom.TrigIsInOC (mpgi.GetPGI(i).trignum, geom.meshchart)) { pgi = mpgi.GetPGI(i); return 0; } /* for (i = 0; i < mpgi.cnt; i++) { // (*testout) << "d" << endl; if (geom.TrigIsInOC (mpgi.mgi[i].trignum, geom.meshchart)) { pgi = mpgi.mgi[i]; return 0; } } */ PrintMessage(7,"INFORM: no gi on chart"); pgi.trignum = 1; return 1; } int MeshingSTLSurface :: IsLineVertexOnChart (const Point3d & p1, const Point3d & p2, int endpoint, const PointGeomInfo & gi) { int lineendtrig = gi.trignum; return geom.TrigIsInOC (lineendtrig, geom.meshchart); // Vec3d baselinenormal = geom.meshtrignv; // Vec3d linenormal = geom.GetTriangleNormal (lineendtrig); // return ( (baselinenormal * linenormal) > cos (30 * (M_PI/180)) ); } void MeshingSTLSurface :: GetChartBoundary (Array & points, Array & points3d, Array & lines, double h) const { points.SetSize (0); points3d.SetSize (0); lines.SetSize (0); geom.GetMeshChartBoundary (points, points3d, lines, h); } int MeshingSTLSurface :: TransformFromPlain (Point2d & plainpoint, Point3d & locpoint, PointGeomInfo & gi, double h) { //return 0, wenn alles OK Point<3> hp3d; int res = geom.FromPlane (plainpoint, hp3d, h); locpoint = hp3d; ComputePointGeomInfo (locpoint, gi); return res; } int MeshingSTLSurface :: BelongsToActiveChart (const Point3d & p, const PointGeomInfo & gi) { return (geom.TrigIsInOC(gi.trignum, geom.meshchart) != 0); } double MeshingSTLSurface :: CalcLocalH (const Point3d & p, double gh) const { return gh; } double MeshingSTLSurface :: Area () const { return geom.Area(); } MeshOptimizeSTLSurface :: MeshOptimizeSTLSurface (STLGeometry & ageom) : MeshOptimize2d(), geom(ageom) { ; } void MeshOptimizeSTLSurface :: SelectSurfaceOfPoint (const Point<3> & p, const PointGeomInfo & gi) { // (*testout) << "sel char: " << gi.trignum << endl; geom.SelectChartOfTriangle (gi.trignum); // geom.SelectChartOfPoint (p); } void MeshOptimizeSTLSurface :: ProjectPoint (INDEX surfind, Point<3> & p) const { if (!geom.Project (p)) { PrintMessage(7,"project failed"); if (!geom.ProjectOnWholeSurface(p)) { PrintMessage(7, "project on whole surface failed"); } } // geometry.GetSurface(surfind)->Project (p); } void MeshOptimizeSTLSurface :: ProjectPoint2 (INDEX surfind, INDEX surfind2, Point<3> & p) const { /* ProjectToEdge ( geometry.GetSurface(surfind), geometry.GetSurface(surfind2), p); */ } int MeshOptimizeSTLSurface :: CalcPointGeomInfo(PointGeomInfo& gi, const Point<3> & p3) const { Point<3> hp = p3; gi.trignum = geom.Project (hp); if (gi.trignum) return 1; return 0; } void MeshOptimizeSTLSurface :: GetNormalVector(INDEX surfind, const Point<3> & p, Vec<3> & n) const { n = geom.GetChartNormalVector(); } RefinementSTLGeometry :: RefinementSTLGeometry (const STLGeometry & ageom) : Refinement(), geom(ageom) { ; } RefinementSTLGeometry :: ~RefinementSTLGeometry () { ; } void RefinementSTLGeometry :: PointBetween (const Point<3> & p1, const Point<3> & p2, double secpoint, int surfi, const PointGeomInfo & gi1, const PointGeomInfo & gi2, Point<3> & newp, PointGeomInfo & newgi) const { newp = p1+secpoint*(p2-p1); /* (*testout) << "surf-between: p1 = " << p1 << ", p2 = " << p2 << ", gi = " << gi1 << " - " << gi2 << endl; */ if (gi1.trignum > 0) { // ((STLGeometry&)geom).SelectChartOfTriangle (gi1.trignum); Point<3> np1 = newp; Point<3> np2 = newp; ((STLGeometry&)geom).SelectChartOfTriangle (gi1.trignum); int tn1 = geom.Project (np1); ((STLGeometry&)geom).SelectChartOfTriangle (gi2.trignum); int tn2 = geom.Project (np2); newgi.trignum = tn1; //urspruengliche version newp = np1; //urspruengliche version if (!newgi.trignum) { newgi.trignum = tn2; newp = np2; } if (!newgi.trignum) newgi.trignum = gi1.trignum; /* if (tn1 != 0 && tn2 != 0 && ((STLGeometry&)geom).GetAngle(tn1,tn2) < M_PI*0.05) { newgi.trignum = tn1; newp = np1; } else { newp = ((STLGeometry&)geom).PointBetween(p1, gi1.trignum, p2, gi2.trignum); tn1 = ((STLGeometry&)geom).Project(newp); newgi.trignum = tn1; if (!tn1) { newp = Center (p1, p2); newgi.trignum = 0; } } */ } else { // (*testout) << "WARNING: PointBetween got geominfo = 0" << endl; newp = p1+secpoint*(p2-p1); newgi.trignum = 0; } // (*testout) << "newp = " << newp << ", ngi = " << newgi << endl; } void RefinementSTLGeometry :: PointBetween (const Point<3> & p1, const Point<3> & p2, double secpoint, int surfi1, int surfi2, const EdgePointGeomInfo & gi1, const EdgePointGeomInfo & gi2, Point<3> & newp, EdgePointGeomInfo & newgi) const { /* (*testout) << "edge-between: p1 = " << p1 << ", p2 = " << p2 << ", gi1,2 = " << gi1 << ", " << gi2 << endl; */ /* newp = Center (p1, p2); ((STLGeometry&)geom).SelectChartOfTriangle (gi1.trignum); newgi.trignum = geom.Project (newp); */ int hi; newgi.dist = (1.0-secpoint) * gi1.dist + secpoint*gi2.dist; newgi.edgenr = gi1.edgenr; /* (*testout) << "p1 = " << p1 << ", p2 = " << p2 << endl; (*testout) << "refedge: " << gi1.edgenr << " d1 = " << gi1.dist << ", d2 = " << gi2.dist << endl; */ newp = geom.GetLine (gi1.edgenr)->GetPointInDist (geom.GetPoints(), newgi.dist, hi); // (*testout) << "newp = " << newp << endl; } void RefinementSTLGeometry :: ProjectToSurface (Point<3> & p, int surfi) const { cout << "RefinementSTLGeometry :: ProjectToSurface not implemented!" << endl; }; void RefinementSTLGeometry :: ProjectToSurface (Point<3> & p, int surfi, PointGeomInfo & gi) const { ((STLGeometry&)geom).SelectChartOfTriangle (gi.trignum); gi.trignum = geom.Project (p); // if (!gi.trignum) // cout << "projectSTL failed" << endl; }; } netgen-6.2.1804/libsrc/stlgeom/vsstl.hpp0000644000175000017500000000252713272137567016627 0ustar kurtkurt#ifndef FILE_VSSTL #define FILE_VSSTL /**************************************************************************/ /* File: vsstl.hpp */ /* Author: Joachim Schoeberl */ /* Date: 05. Jan. 2011 */ /**************************************************************************/ namespace netgen { class VisualSceneSTLGeometry : public VisualScene { Array trilists; class STLGeometry * stlgeometry; public: DLL_HEADER VisualSceneSTLGeometry (); DLL_HEADER virtual ~VisualSceneSTLGeometry (); DLL_HEADER void SetGeometry (class STLGeometry * astlgeometry) { stlgeometry = astlgeometry; } DLL_HEADER virtual void BuildScene (int zoomall = 0); DLL_HEADER virtual void DrawScene (); }; class VisualSceneSTLMeshing : public VisualScene { Array trilists; int selecttrig, nodeofseltrig; class STLGeometry * stlgeometry; public: DLL_HEADER VisualSceneSTLMeshing (); DLL_HEADER virtual ~VisualSceneSTLMeshing (); void SetGeometry (class STLGeometry * astlgeometry) { stlgeometry = astlgeometry; } virtual void BuildScene (int zoomall = 0); virtual void DrawScene (); virtual void MouseDblClick (int px, int py); int seltria; }; } #endif netgen-6.2.1804/libsrc/stlgeom/stltool.cpp0000644000175000017500000007660013272137567017152 0ustar kurtkurt#include #include #include #include #include #include "stlgeom.hpp" namespace netgen { //add a point into a pointlist, return pointnumber int AddPointIfNotExists(Array& ap, const Point3d& p, double eps) { double eps2 = sqr(eps); for (int i = 1; i <= ap.Size(); i++) if (Dist2(ap.Get(i),p) <= eps2 ) return i; ap.Append(p); return ap.Size(); } //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ double GetDistFromLine(const Point<3> & lp1, const Point<3> & lp2, Point<3> & p) { Vec3d vn = lp2 - lp1; Vec3d v1 = p - lp1; Vec3d v2 = lp2 - p; Point3d pold = p; if (v2 * vn <= 0) {p = lp2; return (pold - p).Length();} if (v1 * vn <= 0) {p = lp1; return (pold - p).Length();} double vnl = vn.Length(); if (vnl == 0) {return Dist(lp1,p);} vn /= vnl; p = lp1 + (v1 * vn) * vn; return (pold - p).Length(); }; double GetDistFromInfiniteLine(const Point<3>& lp1, const Point<3>& lp2, const Point<3>& p) { Vec3d vn(lp1, lp2); Vec3d v1(lp1, p); double vnl = vn.Length(); if (vnl == 0) { return Dist (lp1, p); } else { return Cross (vn, v1).Length() / vnl; } }; //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ //Binary IO-Manipulation void FIOReadInt(istream& ios, int& i) { const int ilen = sizeof(int); char buf[ilen]; for (int j = 0; j < ilen; j++) ios.get(buf[j]); memcpy(&i, &buf, ilen); } void FIOWriteInt(ostream& ios, const int& i) { const int ilen = sizeof(int); char buf[ilen]; memcpy(&buf, &i, ilen); for (int j = 0; j < ilen; j++) ios << buf[j]; } void FIOReadDouble(istream& ios, double& i) { const int ilen = sizeof(double); char buf[ilen]; for (int j = 0; j < ilen; j++) ios.get(buf[j]); memcpy(&i, &buf, ilen); } void FIOWriteDouble(ostream& ios, const double& i) { const int ilen = sizeof(double); char buf[ilen]; memcpy(&buf, &i, ilen); for (int j = 0; j < ilen; j++) ios << buf[j]; } void FIOReadFloat(istream& ios, float& i) { const int ilen = sizeof(float); char buf[ilen]; int j; for (j = 0; j < ilen; j++) { ios.get(buf[j]); } memcpy(&i, &buf, ilen); } void FIOWriteFloat(ostream& ios, const float& i) { const int ilen = sizeof(float); char buf[ilen]; memcpy(&buf, &i, ilen); for (int j = 0; j < ilen; j++) ios << buf[j]; } void FIOReadString(istream& ios, char* str, int len) { for (int j = 0; j < len; j++) ios.get(str[j]); } //read string and add terminating 0 void FIOReadStringE(istream& ios, char* str, int len) { for (int j = 0; j < len; j++) ios.get(str[j]); str[len] = 0; } void FIOWriteString(ostream& ios, char* str, int len) { for (int j = 0; j < len; j++) ios << str[j]; } /* void FIOReadInt(istream& ios, int& i) { const int ilen = sizeof(int); char buf[ilen]; int j; for (j = 0; j < ilen; j++) { ios.get(buf[ilen-j-1]); } memcpy(&i, &buf, ilen); } void FIOWriteInt(ostream& ios, const int& i) { const int ilen = sizeof(int); char buf[ilen]; memcpy(&buf, &i, ilen); int j; for (j = 0; j < ilen; j++) { ios << buf[ilen-j-1]; } } void FIOReadDouble(istream& ios, double& i) { const int ilen = sizeof(double); char buf[ilen]; int j; for (j = 0; j < ilen; j++) { ios.get(buf[ilen-j-1]); } memcpy(&i, &buf, ilen); } void FIOWriteDouble(ostream& ios, const double& i) { const int ilen = sizeof(double); char buf[ilen]; memcpy(&buf, &i, ilen); int j; for (j = 0; j < ilen; j++) { ios << buf[ilen-j-1]; } } void FIOReadFloat(istream& ios, float& i) { const int ilen = sizeof(float); char buf[ilen]; int j; for (j = 0; j < ilen; j++) { ios.get(buf[ilen-j-1]); } memcpy(&i, &buf, ilen); } void FIOWriteFloat(ostream& ios, const float& i) { const int ilen = sizeof(float); char buf[ilen]; memcpy(&buf, &i, ilen); int j; for (j = 0; j < ilen; j++) { ios << buf[ilen-j-1]; } } void FIOReadString(istream& ios, char* str, int len) { int j; for (j = 0; j < len; j++) { ios.get(str[j]); } } //read string and add terminating 0 void FIOReadStringE(istream& ios, char* str, int len) { int j; for (j = 0; j < len; j++) { ios.get(str[j]); } str[len] = 0; } void FIOWriteString(ostream& ios, char* str, int len) { int j; for (j = 0; j < len; j++) { ios << str[j]; } } */ //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ STLReadTriangle :: STLReadTriangle (const Point<3> * apts, const Vec<3> & anormal) { pts[0] = apts[0]; pts[1] = apts[1]; pts[2] = apts[2]; normal = anormal; } STLTriangle :: STLTriangle(const int * apts) { pts[0] = apts[0]; pts[1] = apts[1]; pts[2] = apts[2]; facenum = 0; } int STLTriangle :: IsNeighbourFrom(const STLTriangle& t) const { //triangles must have same orientation!!! for(int i = 0; i <= 2; i++) for(int j = 0; j <= 2; j++) if (t.pts[(i+1)%3] == pts[j] && t.pts[i] == pts[(j+1)%3]) return 1; return 0; } int STLTriangle :: IsWrongNeighbourFrom(const STLTriangle& t) const { //triangles have not same orientation!!! for(int i = 0; i <= 2; i++) for(int j = 0; j <= 2; j++) if (t.pts[(i+1)%3] == pts[(j+1)%3] && t.pts[i] == pts[j]) return 1; return 0; } void STLTriangle :: GetNeighbourPoints(const STLTriangle& t, int& p1, int& p2) const { for(int i = 1; i <= 3; i++) for(int j = 1; j <= 3; j++) if (t.PNumMod(i+1) == PNumMod(j) && t.PNumMod(i) == PNumMod(j+1)) { p1 = PNumMod(j); p2 = PNumMod(j+1); return; } PrintSysError("Get neighbourpoints failed!"); } int STLTriangle :: GetNeighbourPointsAndOpposite(const STLTriangle& t, int& p1, int& p2, int& po) const { for(int i = 1; i <= 3; i++) for(int j = 1; j <= 3; j++) if (t.PNumMod(i+1) == PNumMod(j) && t.PNumMod(i) == PNumMod(j+1)) { p1 = PNumMod(j); p2 = PNumMod(j+1); po = PNumMod(j+2); return 1; } return 0; } Vec<3> STLTriangle :: GeomNormal(const Array >& ap) const { const Point<3> & p1 = ap.Get(PNum(1)); const Point<3> & p2 = ap.Get(PNum(2)); const Point<3> & p3 = ap.Get(PNum(3)); return Cross(p2-p1, p3-p1); } void STLTriangle :: SetNormal (const Vec<3> & n) { double len = n.Length(); if (len > 0) { normal = n; normal.Normalize(); } else { normal = Vec<3> (1, 0, 0); } } void STLTriangle :: ChangeOrientation() { normal *= -1; Swap(pts[0],pts[1]); } double STLTriangle :: Area(const Array >& ap) const { return 0.5 * Cross(ap.Get(PNum(2))-ap.Get(PNum(1)), ap.Get(PNum(3))-ap.Get(PNum(1))).Length(); } double STLTriangle :: MinHeight(const Array >& ap) const { double ml = MaxLength(ap); if (ml != 0) {return 2.*Area(ap)/ml;} PrintWarning("max Side Length of a triangle = 0!!!"); return 0; } double STLTriangle :: MaxLength(const Array >& ap) const { return max3(Dist(ap.Get(PNum(1)),ap.Get(PNum(2))), Dist(ap.Get(PNum(2)),ap.Get(PNum(3))), Dist(ap.Get(PNum(3)),ap.Get(PNum(1)))); } void STLTriangle :: ProjectInPlain(const Array >& ap, const Vec<3> & n, Point<3> & pp) const { const Point<3> & p1 = ap.Get(PNum(1)); const Point<3> & p2 = ap.Get(PNum(2)); const Point<3> & p3 = ap.Get(PNum(3)); Vec<3> v1 = p2 - p1; Vec<3> v2 = p3 - p1; Vec<3> nt = Cross(v1, v2); double c = - (p1(0)*nt(0) + p1(1)*nt(1) + p1(2)*nt(2)); double prod = n * nt; if (fabs(prod) == 0) { pp = Point<3>(1.E20,1.E20,1.E20); return; } double nfact = -(pp(0)*nt(0) + pp(1)*nt(1) + pp(2)*nt(2) + c) / (prod); pp = pp + (nfact) * n; } int STLTriangle :: ProjectInPlain (const Array >& ap, const Vec<3> & nproj, Point<3> & pp, Vec<3> & lam) const { const Point<3> & p1 = ap.Get(PNum(1)); const Point<3> & p2 = ap.Get(PNum(2)); const Point<3> & p3 = ap.Get(PNum(3)); Vec<3> v1 = p2-p1; Vec<3> v2 = p3-p1; Mat<3> mat; for (int i = 0; i < 3; i++) { mat(i,0) = v1(i); mat(i,1) = v2(i); mat(i,2) = nproj(i); } int err = 0; mat.Solve (pp-p1, lam); // int err = SolveLinearSystem (v1, v2, nproj, pp-p1, lam); if (!err) { // pp = p1 + lam(0) * v1 + lam(1) * v2; pp(0) = p1(0) + lam(0) * v1(0) + lam(1) * v2(0); pp(1) = p1(1) + lam(0) * v1(1) + lam(1) * v2(1); pp(2) = p1(2) + lam(0) * v1(2) + lam(1) * v2(2); } return err; } void STLTriangle :: ProjectInPlain(const Array >& ap, Point<3> & pp) const { const Point<3> & p1 = ap.Get(PNum(1)); const Point<3> & p2 = ap.Get(PNum(2)); const Point<3> & p3 = ap.Get(PNum(3)); Vec<3> v1 = p2 - p1; Vec<3> v2 = p3 - p1; Vec<3> nt = Cross(v1, v2); double c = - (p1(0)*nt(0) + p1(1)*nt(1) + p1(2)*nt(2)); double prod = nt * nt; double nfact = -(pp(0)*nt(0) + pp(1)*nt(1) + pp(2)*nt(2) + c) / (prod); pp = pp + (nfact) * nt; } int STLTriangle :: PointInside(const Array > & ap, const Point<3> & pp) const { const Point<3> & p1 = ap.Get(PNum(1)); const Point<3> & p2 = ap.Get(PNum(2)); const Point<3> & p3 = ap.Get(PNum(3)); Vec<3> v1 = p2 - p1; Vec<3> v2 = p3 - p1; Vec<3> v = pp - p1; double det, l1, l2; Vec<3> ex, ey, ez; ez = GeomNormal(ap); ez /= ez.Length(); ex = v1; ex /= ex.Length(); ey = Cross (ez, ex); Vec<2> v1p(v1*ex, v1*ey); Vec<2> v2p(v2*ex, v2*ey); Vec<2> vp(v*ex, v*ey); det = v2p(1) * v1p(0) - v2p(0) * v1p(1); if (fabs(det) == 0) {return 0;} l2 = (vp(1) * v1p(0) - vp(0) * v1p(1)) / det; if (v1p(0) != 0.) { l1 = (vp(0) - l2 * v2p(0)) / v1p(0); } else if (v1p(1) != 0.) { l1 = (vp(1) - l2 * v2p(1)) / v1p(1); } else {return 0;} if (l1 >= -1E-10 && l2 >= -1E-10 && l1 + l2 <= 1.+1E-10) {return 1;} return 0; } double STLTriangle :: GetNearestPoint(const Array >& ap, Point<3> & p3d) const { Point<3> p = p3d; ProjectInPlain(ap, p); double dist = (p - p3d).Length(); if (PointInside(ap, p)) {p3d = p; return dist;} else { Point<3> pf = 0.0; double nearest = 1E50; //int fi = 0; for (int j = 1; j <= 3; j++) { p = p3d; dist = GetDistFromLine(ap.Get(PNum(j)), ap.Get(PNumMod(j+1)), p); if (dist < nearest) { nearest = dist; pf = p; } } p3d = pf; return nearest; } } int STLTriangle :: HasEdge(int p1, int p2) const { int i; for (i = 1; i <= 3; i++) { if (p1 == PNum(i) && p2 == PNumMod(i+1)) {return 1;} } return 0; } ostream& operator<<(ostream& os, const STLTriangle& t) { os << "["; os << t[0] << ","; os << t[1] << ","; os << t[2] << "]"; return os; }; STLTopEdge :: STLTopEdge () { pts[0] = pts[1] = 0; trigs[0] = trigs[1] = 0; cosangle = 1; status = ED_UNDEFINED; } STLTopEdge :: STLTopEdge (int p1, int p2, int trig1, int trig2) { pts[0] = p1; pts[1] = p2; trigs[0] = trig1; trigs[1] = trig2; cosangle = 1; status = ED_UNDEFINED; } //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ //+++++++++++++++++++ STL CHART +++++++++++++++++++++++++++++++ //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ STLChart :: STLChart(STLGeometry * ageometry) { charttrigs = new Array (0,0); outertrigs = new Array (0,0); ilimit = new Array (0,0); olimit = new Array (0,0); geometry = ageometry; if ( stlparam.usesearchtree == 1) searchtree = new BoxTree<3> (geometry->GetBoundingBox().PMin() - Vec3d(1,1,1), geometry->GetBoundingBox().PMax() + Vec3d(1,1,1)); else searchtree = NULL; } void STLChart :: AddChartTrig(int i) { // static int timer = NgProfiler::CreateTimer ("STLChart::AddChartTrig"); // NgProfiler::RegionTimer reg(timer); charttrigs->Append(i); const STLTriangle & trig = geometry->GetTriangle(i); const Point3d & p1 = geometry->GetPoint (trig.PNum(1)); const Point3d & p2 = geometry->GetPoint (trig.PNum(2)); const Point3d & p3 = geometry->GetPoint (trig.PNum(3)); Point3d pmin(p1), pmax(p1); pmin.SetToMin (p2); pmin.SetToMin (p3); pmax.SetToMax (p2); pmax.SetToMax (p3); if (!geomsearchtreeon && (stlparam.usesearchtree == 1)) {searchtree->Insert (pmin, pmax, i);} } void STLChart :: AddOuterTrig(int i) { // static int timer = NgProfiler::CreateTimer ("STLChart::AddOuterTrig"); // NgProfiler::RegionTimer reg(timer); outertrigs->Append(i); const STLTriangle & trig = geometry->GetTriangle(i); const Point3d & p1 = geometry->GetPoint (trig.PNum(1)); const Point3d & p2 = geometry->GetPoint (trig.PNum(2)); const Point3d & p3 = geometry->GetPoint (trig.PNum(3)); Point3d pmin(p1), pmax(p1); pmin.SetToMin (p2); pmin.SetToMin (p3); pmax.SetToMax (p2); pmax.SetToMax (p3); if (!geomsearchtreeon && (stlparam.usesearchtree==1)) {searchtree->Insert (pmin, pmax, i);} } int STLChart :: IsInWholeChart(int nr) const { for (int i = 1; i <= charttrigs->Size(); i++) if (charttrigs->Get(i) == nr) return 1; for (int i = 1; i <= outertrigs->Size(); i++) if (outertrigs->Get(i) == nr) return 1; return 0; } void STLChart :: GetTrianglesInBox (const Point3d & pmin, const Point3d & pmax, Array & trias) const { if (geomsearchtreeon) {PrintMessage(5,"geomsearchtreeon is set!!!");} if (searchtree) searchtree -> GetIntersecting (pmin, pmax, trias); else { Box3d box1(pmin, pmax); box1.Increase (1e-4); Box3d box2; trias.SetSize(0); int nt = GetNT(); for (int i = 1; i <= nt; i++) { int trignum = GetTrig(i); const STLTriangle & trig = geometry->GetTriangle(trignum); box2.SetPoint (geometry->GetPoint (trig.PNum(1))); box2.AddPoint (geometry->GetPoint (trig.PNum(2))); box2.AddPoint (geometry->GetPoint (trig.PNum(3))); if (box1.Intersect (box2)) trias.Append (trignum); } } } //trigs may contain the same triangle double void STLChart :: MoveToOuterChart(const Array& trigs) { if (!trigs.Size()) {return;} for (int i = 1; i <= trigs.Size(); i++) { if (charttrigs->Get(trigs.Get(i)) != -1) {AddOuterTrig(charttrigs->Get(trigs.Get(i)));} charttrigs->Elem(trigs.Get(i)) = -1; } DelChartTrigs(trigs); } //trigs may contain the same triangle double void STLChart :: DelChartTrigs(const Array& trigs) { if (!trigs.Size()) {return;} for (int i = 1; i <= trigs.Size(); i++) { charttrigs->Elem(trigs.Get(i)) = -1; } int cnt = 0; for (int i = 1; i <= charttrigs->Size(); i++) { if (charttrigs->Elem(i) == -1) { cnt++; } if (cnt != 0 && i < charttrigs->Size()) { charttrigs->Elem(i-cnt+1) = charttrigs->Get(i+1); } } int i = charttrigs->Size() - trigs.Size(); charttrigs->SetSize(i); if (!geomsearchtreeon && stlparam.usesearchtree == 1) { PrintMessage(7, "Warning: unsecure routine due to first use of searchtrees!!!"); //bould new searchtree!!! searchtree = new BoxTree<3> (geometry->GetBoundingBox().PMin() - Vec3d(1,1,1), geometry->GetBoundingBox().PMax() + Vec3d(1,1,1)); for (int i = 1; i <= charttrigs->Size(); i++) { const STLTriangle & trig = geometry->GetTriangle(i); const Point3d & p1 = geometry->GetPoint (trig.PNum(1)); const Point3d & p2 = geometry->GetPoint (trig.PNum(2)); const Point3d & p3 = geometry->GetPoint (trig.PNum(3)); Point3d pmin(p1), pmax(p1); pmin.SetToMin (p2); pmin.SetToMin (p3); pmax.SetToMax (p2); pmax.SetToMax (p3); searchtree->Insert (pmin, pmax, i); } } } void STLChart :: SetNormal (const Point<3> & apref, const Vec<3> & anormal) { pref = apref; normal = anormal; double len = normal.Length(); if (len) normal /= len; else normal = Vec<3> (1, 0, 0); t1 = normal.GetNormal (); t2 = Cross (normal, t1); } /* Point<2> STLChart :: Project2d (const Point<3> & p3d) const { Vec<3> v = p3d-pref; return Point<2> (t1 * v, t2 * v); } */ /* Point3d p1, p2, center; double rad; int i1, i2; public: */ /* STLBoundarySeg :: STLBoundarySeg (int ai1, int ai2, const Array > & points, const STLChart * chart) { i1 = ai1; i2 = ai2; p1 = points.Get(i1); p2 = points.Get(i2); center = ::netgen::Center (p1, p2); rad = Dist (p1, center); p2d1 = chart->Project2d (p1); p2d2 = chart->Project2d (p2); boundingbox.Set (p2d1); boundingbox.Add (p2d2); } */ void STLBoundarySeg :: Swap () { ::netgen::Swap (i1, i2); ::netgen::Swap (p1, p2); } STLBoundary :: STLBoundary (STLGeometry * ageometry) : // boundary(), geometry(ageometry) { ; } void STLBoundary :: AddOrDelSegment(const STLBoundarySeg & seg) { int i; int found = 0; for (i = 1; i <= boundary.Size(); i++) { if (found) {boundary.Elem(i-1) = boundary.Get(i);} if (boundary.Get(i) == seg) {found = 1;} } if (!found) { boundary.Append(seg); } else { boundary.SetSize(boundary.Size()-1); } } void STLBoundary ::AddTriangle(const STLTriangle & t) { // static int timer_old = NgProfiler::CreateTimer ("STLChart::AddTriangle_old"); // static int timer_new = NgProfiler::CreateTimer ("STLChart::AddTriangle_new"); // NgProfiler::StartTimer (timer_old); #ifdef ADDTRIGOLD int i; int found1 = 0; int found2 = 0; int found3 = 0; //int offset = 0; STLBoundarySeg seg1(t[0],t[1], geometry->GetPoints(), chart); STLBoundarySeg seg2(t[1],t[2], geometry->GetPoints(), chart); STLBoundarySeg seg3(t[2],t[0], geometry->GetPoints(), chart); seg1.SetSmoothEdge (geometry->IsSmoothEdge (seg1.I1(), seg1.I2())); seg2.SetSmoothEdge (geometry->IsSmoothEdge (seg2.I1(), seg2.I2())); seg3.SetSmoothEdge (geometry->IsSmoothEdge (seg3.I1(), seg3.I2())); /* for (i = 1; i <= boundary.Size(); i++) { if (offset) {boundary.Elem(i-offset) = boundary.Get(i);} if (boundary.Get(i) == seg1) {found1 = 1; offset++;} if (boundary.Get(i) == seg2) {found2 = 1; offset++;} if (boundary.Get(i) == seg3) {found3 = 1; offset++;} } if (offset) { boundary.SetSize(boundary.Size()-offset); } */ for (i = boundary.Size(); i >= 1; i--) { if (boundary.Get(i) == seg1) { boundary.DeleteElement (i); found1 = 1; } else if (boundary.Get(i) == seg2) { boundary.DeleteElement (i); found2 = 1; } else if (boundary.Get(i) == seg3) { boundary.DeleteElement (i); found3 = 1; } } if (!found1) { seg1.Swap(); boundary.Append(seg1); /* int newnr; if (freelist.Size()) { newnr = freelist.Last(); freelist.DeleteLast(); boundary[newnr] = seg1; } else { boundary.Append(seg1); newnr = boundary.Size(); } // cout << "tree add el " << boundary.Size() << endl; if (searchtree) { // cout << "add " << boundary.Size() << endl; searchtree->Insert (seg1.BoundingBox(), newnr); } */ } if (!found2) { seg2.Swap(); boundary.Append(seg2); /* int newnr; if (freelist.Size()) { newnr = freelist.Last(); freelist.DeleteLast(); boundary[newnr] = seg2; } else { boundary.Append(seg2); newnr = boundary.Size(); } // boundary.Append(seg2); // cout << "tree add el " << boundary.Size() << endl; if (searchtree) { // cout << "add " << boundary.Size() << endl; searchtree->Insert (seg2.BoundingBox(), newnr); } */ } if (!found3) { seg3.Swap(); boundary.Append(seg3); /* int newnr; if (freelist.Size()) { newnr = freelist.Last(); freelist.DeleteLast(); boundary[newnr] = seg3; } else { boundary.Append(seg3); newnr = boundary.Size(); } // cout << "tree add el " << boundary.Size() << endl; if (searchtree) { // cout << "add " << boundary.Size() << endl; searchtree->Insert (seg3.BoundingBox(), newnr); } */ } #endif // NgProfiler::StopTimer (timer_old); // NgProfiler::StartTimer (timer_new); INDEX_2 segs[3]; segs[0] = INDEX_2(t[0], t[1]); segs[1] = INDEX_2(t[1], t[2]); segs[2] = INDEX_2(t[2], t[0]); for (auto seg : segs) { STLBoundarySeg bseg(seg[0], seg[1], geometry->GetPoints(), chart); bseg.SetSmoothEdge (geometry->IsSmoothEdge (seg[0],seg[1])); INDEX_2 op(seg[1], seg[0]); if (boundary_ht.Used(op)) { // cout << "delete " << op << endl; boundary_ht.Delete(op); } else { // cout << "insert " << seg << endl; boundary_ht[seg] = bseg; } } /* // cout << "bounds = " << boundary << endl; cout << "bounds:"; for (auto & val : boundary) cout << val.I1() << "-" << val.I2() << endl; cout << "ht = " << boundary_ht << endl; if (boundary_ht.UsedElements() != boundary.Size()) { cout << "wrong count" << endl; char key; cin >> key; } */ // NgProfiler::StopTimer (timer_new); } int STLBoundary :: TestSeg(const Point<3>& p1, const Point<3> & p2, const Vec<3> & sn, double sinchartangle, int divisions, Array >& points, double eps) { if (usechartnormal) return TestSegChartNV (p1, p2, sn); #ifdef NONE // for statistics { int i; static Array cntclass; static int cnt = 0; static int cnti = 0, cnto = 0; static long int cntsegs = 0; if (cntclass.Size() == 0) { cntclass.SetSize (20); for (i = 1; i <= cntclass.Size(); i++) cntclass.Elem(i) = 0; } cntsegs += NOSegments(); int cla = int (log (double(NOSegments()+1)) / log(2.0)); if (cla < 1) cla = 1; if (cla > cntclass.Size()) cla = cntclass.Size(); cntclass.Elem(cla)++; cnt++; if (divisions) cnti++; else cnto++; if (cnt > 100000) { cnt = 0; /* (*testout) << "TestSeg-calls for classes:" << endl; (*testout) << cnti << " inner calls, " << cnto << " outercalls" << endl; (*testout) << "total testes segments: " << cntsegs << endl; for (i = 1; i <= cntclass.Size(); i++) { (*testout) << int (exp (i * log(2.0))) << " bnd segs: " << cntclass.Get(i) << endl; } */ } } #endif int i,j,k; Point<3> seg1p/*, seg2p*/; Point<3> sp1,sp2; double lambda1, lambda2, vlen2; Vec<3> vptpl; double sinchartangle2 = sqr(sinchartangle); double scal; int possible; //double maxval = -1; //double maxvalnew = -1; double scalp1 = p1(0) * sn(0) + p1(1) * sn(1) + p1(2) * sn(2); double scalp2 = p2(0) * sn(0) + p2(1) * sn(1) + p2(2) * sn(2); double minl = min2(scalp1, scalp2); double maxl = max2(scalp1, scalp2); Point<3> c = Center (p1, p2); double dist1 = Dist (c, p1); int nseg = NOSegments(); for (j = 1; j <= nseg; j++) { const STLBoundarySeg & seg = GetSegment(j); if (seg.IsSmoothEdge()) continue; sp1 = seg.P1(); sp2 = seg.P2(); // Test, ob Spiral Konfikt moeglich possible = 1; double scalsp1 = sp1(0) * sn(0) + sp1(1) * sn(1) + sp1(2) * sn(2); double scalsp2 = sp2(0) * sn(0) + sp2(1) * sn(1) + sp2(2) * sn(2); double minsl = min2(scalsp1, scalsp2); double maxsl = max2(scalsp1, scalsp2); double maxdiff = max2 (maxsl - minl, maxl - minsl); /* Point3d sc = Center (sp1, sp2); double mindist = Dist(c, sc) - dist1 - GetSegment(j).Radius(); if (maxdiff < sinchartangle * mindist) { possible = 0; } */ double hscal = maxdiff + sinchartangle * (dist1 + seg.Radius()); if (hscal * hscal < sinchartangle * Dist2(c, seg.center )) possible = 0; /* if (possible) { double mindist2ex = MinDistLL2 (p1, p2, sp1, sp2); if (maxdiff * maxdiff < sinchartangle2 * mindist2ex) possible = 0; } */ if (possible) { LinearPolynomial2V lp (scalp1 - scalsp1, scalp2 - scalp1, -(scalsp2 - scalsp1)); QuadraticPolynomial2V slp; slp.Square (lp); Vec3d v (p1, sp1); Vec3d vl (p1, p2); Vec3d vsl (sp1, sp2); QuadraticPolynomial2V qp (v.Length2(), -2 * (v * vl), 2 * (v * vsl), vl.Length2(), -2 * (vl * vsl), vsl.Length2()); slp.Add (-sinchartangle2, qp); double hv = slp.MaxUnitSquare(); if (hv > eps) return 0; /* if (hv > maxvalnew) maxvalnew = hv; */ } // if (possible && 0) if (false) for (i = 0; i <= divisions; i++) { lambda1 = (double)i/(double)divisions; seg1p = Point3d(p1(0)*lambda1+p2(0)*(1.-lambda1), p1(1)*lambda1+p2(1)*(1.-lambda1), p1(2)*lambda1+p2(2)*(1.-lambda1)); for (k = 0; k <= divisions; k++) { lambda2 = (double)k/(double)divisions; vptpl = Vec3d(sp1(0)*lambda2+sp2(0)*(1.-lambda2)-seg1p(0), sp1(1)*lambda2+sp2(1)*(1.-lambda2)-seg1p(1), sp1(2)*lambda2+sp2(2)*(1.-lambda2)-seg1p(2)); vlen2 = vptpl.Length2(); // if (vlen2 > 0) { scal = vptpl * sn; double hv = scal*scal - sinchartangle2*vlen2; /* if (hv > maxval) maxval = hv; */ if (hv > eps) return 0; } } } } return 1; // return (maxvalnew < eps); } void STLBoundary :: BuildSearchTree() { // static int timer = NgProfiler::CreateTimer ("BuildSearchTree"); // NgProfiler::RegionTimer reg(timer); delete searchtree; /* Box<2> box2d(Box<2>::EMPTY_BOX); int nseg = NOSegments(); for (int j = 1; j <= nseg; j++) { const STLBoundarySeg & seg = GetSegment(j); if (seg.IsSmoothEdge()) continue; box2d.Add(seg.BoundingBox().PMin()); box2d.Add(seg.BoundingBox().PMax()); } searchtree = new BoxTree<2> (box2d); for (int j = 1; j <= nseg; j++) { const STLBoundarySeg & seg = GetSegment(j); if (seg.IsSmoothEdge()) continue; searchtree -> Insert (seg.BoundingBox(), j); } */ Box<2> box2d(Box<2>::EMPTY_BOX); Box<3> box3d = geometry->GetBoundingBox(); for (size_t i = 0; i < 8; i++) box2d.Add ( chart->Project2d (box3d.GetPointNr(i))); searchtree = new BoxTree<2,INDEX_2> (box2d); } void STLBoundary :: DeleteSearchTree() { // static int timer = NgProfiler::CreateTimer ("DeleteSearchTree"); // NgProfiler::RegionTimer reg(timer); delete searchtree; searchtree = nullptr; } // checks, whether 2d projection intersects int STLBoundary :: TestSegChartNV(const Point3d & p1, const Point3d& p2, const Vec3d& sn) { // static int timerquick = NgProfiler::CreateTimer ("TestSegChartNV-searchtree"); // static int timer = NgProfiler::CreateTimer ("TestSegChartNV"); int nseg = NOSegments(); Point<2> p2d1 = chart->Project2d (p1); Point<2> p2d2 = chart->Project2d (p2); Box<2> box2d; box2d.Set (p2d1); box2d.Add (p2d2); Line2d l1 (p2d1, p2d2); double eps = 1e-3; bool ok = true; /* static long int cnt = 0; static long int totnseg = 0; totnseg += nseg; cnt++; if ( (cnt % 100000) == 0) cout << "avg nseg = " << double(totnseg)/cnt << endl; */ if (searchtree) { // NgProfiler::RegionTimer reg(timerquick); ArrayMem pis; searchtree -> GetIntersecting (box2d.PMin(), box2d.PMax(), pis); for (auto i2 : pis) { // const STLBoundarySeg & seg = GetSegment(j); const STLBoundarySeg & seg = boundary_ht[i2]; if (seg.IsSmoothEdge()) continue; if (!box2d.Intersect (seg.BoundingBox())) continue; const Point<2> & sp1 = seg.P2D1(); const Point<2> & sp2 = seg.P2D2(); Line2d l2 (sp1, sp2); double lam1, lam2; int err = CrossPointBarycentric (l1, l2, lam1, lam2); if (!err && lam1 > eps && lam1 < 1-eps && lam2 > eps && lam2 < 1-eps) { ok = false; break; } } } else { // NgProfiler::RegionTimer reg(timer); for (int j = 1; j <= nseg; j++) { const STLBoundarySeg & seg = GetSegment(j); if (seg.IsSmoothEdge()) continue; if (!box2d.Intersect (seg.BoundingBox())) continue; const Point<2> & sp1 = seg.P2D1(); const Point<2> & sp2 = seg.P2D2(); Line2d l2 (sp1, sp2); double lam1, lam2; int err = CrossPointBarycentric (l1, l2, lam1, lam2); if (!err && lam1 > eps && lam1 < 1-eps && lam2 > eps && lam2 < 1-eps) { ok = false; break; } } } return ok; } STLDoctorParams :: STLDoctorParams() { drawmeshededges = 1; geom_tol_fact = 1E-6; longlinefact = 0; showexcluded = 1; selectmode = 0; edgeselectmode = 0; useexternaledges = 0; showfaces = 0; showtouchedtrigchart = 1; showedgecornerpoints = 1; conecheck = 1; spiralcheck = 1; selecttrig = 0; nodeofseltrig = 1; selectwithmouse = 1; showmarkedtrigs = 1; dirtytrigfact = 0.001; smoothangle = 90; smoothnormalsweight = 0.2; vicinity = 0; showvicinity = 0; } STLDoctorParams stldoctor; void STLDoctorParams :: Print (ostream & ost) const { ost << "STL doctor parameters:" << endl << "selecttrig = " << selecttrig << endl << "selectlocalpoint = " << nodeofseltrig << endl << "selectwithmouse = " << selectwithmouse << endl << "showmarkedtrigs = " << showmarkedtrigs << endl << "dirtytrigfact = " << dirtytrigfact << endl << "smoothangle = " << smoothangle << endl; } STLParameters :: STLParameters() { yangle = 30; contyangle = 20; edgecornerangle = 60; chartangle = 15; outerchartangle = 70; usesearchtree = 0; atlasminh = 1E-4; resthsurfcurvfac = 2; resthsurfcurvenable = 0; resthatlasfac = 2; resthatlasenable = 1; resthchartdistfac = 1.2; resthchartdistenable = 1; resthlinelengthfac = 0.5; resthlinelengthenable = 1; resthcloseedgefac = 1; resthcloseedgeenable = 1; resthedgeanglefac = 1; resthedgeangleenable = 0; resthsurfmeshcurvfac = 1; resthsurfmeshcurvenable = 0; recalc_h_opt = 1; } void STLParameters :: Print (ostream & ost) const { ost << "STL parameters:" << endl << "yellow angle = " << yangle << endl << "continued yellow angle = " << contyangle << endl << "edgecornerangle = " << edgecornerangle << endl << "chartangle = " << chartangle << endl << "outerchartangle = " << outerchartangle << endl << "restrict h due to ..., enable and safety factor: " << endl << "surface curvature: " << resthsurfcurvenable << ", fac = " << resthsurfcurvfac << endl << "atlas surface curvature: " << resthatlasenable << ", fac = " << resthatlasfac << endl << "chart distance: " << resthchartdistenable << ", fac = " << resthchartdistfac << endl << "line length: " << resthlinelengthenable << ", fac = " << resthlinelengthfac << endl << "close edges: " << resthcloseedgeenable << ", fac = " << resthcloseedgefac << endl << "edge angle: " << resthedgeangleenable << ", fac = " << resthedgeanglefac << endl; } STLParameters stlparam; } netgen-6.2.1804/libsrc/stlgeom/stlline.hpp0000644000175000017500000001144013272137567017120 0ustar kurtkurt#ifndef FILE_STLLINE #define FILE_STLLINE /**************************************************************************/ /* File: stlline.hh */ /* Author: Joachim Schoeberl */ /* Author2: Johannes Gerstmayr */ /* Date: 20. Nov. 99 */ /**************************************************************************/ class STLGeometry; class STLTopology; class STLEdge { public: int pts[2]; int trigs[2]; //left and right trig STLEdge (const int * apts) {pts[0] = apts[0]; pts[1] = apts[1];} STLEdge (int v1, int v2) {pts[0] = v1; pts[1] = v2;} STLEdge () {pts[0]=0;pts[1]=0;} int PNum(int i) const {return pts[(i-1)];} int LeftTrig() const {return trigs[0];} int RightTrig() const {return trigs[1];} void SetLeftTrig(int i) {trigs[0] = i;} void SetRightTrig(int i) {trigs[1] = i;} }; enum STL_ED_STATUS { ED_EXCLUDED, ED_CONFIRMED, ED_CANDIDATE, ED_UNDEFINED }; /* class STLEdgeData { public: // float angle; int p1; int p2; int lt; //left trig int rt; //right trig // int status; STLTopology * top; // pointer to stl topology int topedgenr; // number of corresponding topology edge STLEdgeData() {}; STLEdgeData(float anglei, int p1i, int p2i, int lti, int rti) { // angle = anglei; p1 = p1i; p2 = p2i; lt = lti; rt = rti; } int GetStatus () const; void SetStatus (int stat); void SetExcluded() { SetStatus (ED_EXCLUDED); } void SetConfirmed() { SetStatus (ED_CONFIRMED); } void SetCandidate() { SetStatus (ED_CANDIDATE); } void SetUndefined() { SetStatus (ED_UNDEFINED); } int Excluded() const {return GetStatus() == ED_EXCLUDED;} int Confirmed() const {return GetStatus() == ED_CONFIRMED;} int Candidate() const {return GetStatus() == ED_CANDIDATE;} int Undefined() const {return GetStatus() == ED_UNDEFINED;} int ConfCand() const {return GetStatus() == ED_CONFIRMED || GetStatus() == ED_CANDIDATE;} float CosAngle() const; void Write(ofstream& of) const; void Read(ifstream& ifs); }; class STLEdgeDataList { private: INDEX_2_HASHTABLE hashtab; Array edgedata; TABLE edgesperpoint; public: STLEdgeDataList():edgedata(),hashtab(1),edgesperpoint() {}; const STLEdgeDataList& operator=(const STLEdgeDataList& edl); void SetSize(int size) { edgedata.SetSize(size); hashtab.SetSize(size); edgesperpoint.SetSize(size); } void Clear() {SetSize(0);} int Size() const {return edgedata.Size();} const STLEdgeData& Get(int i) const {return edgedata.Get(i);} STLEdgeData& Elem(int i) {return edgedata.Elem(i);} void Add(const STLEdgeData& ed, int i); int GetNEPP(int pn) const { return edgesperpoint.EntrySize(pn); }; int GetEdgePP(int pn, int vi) const { return edgesperpoint.Get(pn,vi); }; void AddEdgePP(int pn, int vn) {edgesperpoint.Add(pn,vn);}; void ResetAll(); void ResetCandidates(); void ConfirmCandidates(); int GetEdgeNum(int np1, int np2) const; int GetNConfEdges() const; void Write(ofstream& of) const; void Read(ifstream& ifs); void BuildLineWithEdge(int ep1, int ep2, Array& line); int GetNEPPStat(int p, int status) const; int GetNConfCandEPP(int p) const; }; */ //a line defined by several points (polyline) class STLLine { private: const STLGeometry * geometry; Array pts; Array lefttrigs; Array righttrigs; Array dists; int split; public: STLLine(const STLGeometry * ageometry); void AddPoint(int i) {pts.Append(i);} int PNum(int i) const {return pts.Get(i);} int NP() const {return pts.Size();} int GetNS() const; void GetSeg(int nr, int& p1, int& p2) const; double GetSegLen(const Array >& ap, int nr) const; int GetLeftTrig(int nr) const; int GetRightTrig(int nr) const; double GetDist(int nr) const { return dists.Get(nr);}; void GetBoundingBox (const Array > & ap, Box<3> & box) const; void AddLeftTrig(int nr) {lefttrigs.Append(nr);} void AddRightTrig(int nr) {righttrigs.Append(nr);} void AddDist (double dist) {dists.Append(dist); } int StartP() const {return pts.Get(1);} int EndP() const {return pts.Get(pts.Size());} double GetLength(const Array >& ap) const; //suche punkt in entfernung (in linienkoordinaten) dist //in index ist letzter punkt VOR dist (d.h. max pts.Size()-1) Point<3> GetPointInDist(const Array >& ap, double dist, int& index) const; //return a meshed polyline STLLine* Mesh(const Array >& ap, Array& mp, double ghi, class Mesh& mesh) const; void DoSplit() {split = 1;} int ShouldSplit() const {return split;} }; #endif netgen-6.2.1804/libsrc/stlgeom/stlgeom.hpp0000644000175000017500000003406013272137567017123 0ustar kurtkurt#ifndef FILE_STLGEOM #define FILE_STLGEOM /**************************************************************************/ /* File: stlgeom.hpp */ /* Author: Joachim Schoeberl */ /* Author2: Johannes Gerstmayr */ /* Date: 26. Jul. 99 */ /**************************************************************************/ /** STL Geometry Terminology: Point ... coordinates of STL triangles Triangle (short Trig) STL triangle TopEdge .... edge in topology, boundary of STL triangles (many) Edge .... Edges which will occur in the mesh (confirmed edges, less) */ #include namespace netgen { inline int IsInArray(int n, const Array& ia) { return ia.Contains(n); } inline bool AddIfNotExists(Array& list, int x) { if (list.Contains(x)) return false; list.Append(x); return true; } extern DLL_HEADER MeshingParameters mparam; #include "stltopology.hpp" #include "stltool.hpp" #include "stlline.hpp" class STLEdgeDataList { Array storedstatus; STLTopology & geom; public: STLEdgeDataList(STLTopology & ageom); ~STLEdgeDataList(); void Store (); void Restore (); void SetSize(int /* size */) { }; void Clear() { }; int Size() const { return geom.GetNTE(); } const STLTopEdge & Get(int i) const { return geom.GetTopEdge(i); } STLTopEdge & Elem(int i) { return geom.GetTopEdge(i); } int GetNEPP(int pn) const {return geom.NTopEdgesPerPoint(pn); } int GetEdgePP(int pn, int vi) const {return geom.TopEdgePerPoint(pn, vi);}; //void AddEdgePP(int pn, int vn) { } ; void ResetAll(); void ChangeStatus(int status1, int status2); int GetEdgeNum(int np1, int np2) const { return geom.GetTopEdgeNum (np1, np2); } int GetNConfEdges() const; void Write(ofstream& of) const; void Read(ifstream& ifs); void BuildLineWithEdge(int ep1, int ep2, Array& line); void BuildClusterWithEdge(int ep1, int ep2, Array& line); int GetNEPPStat(int p, int status) const; int GetNConfCandEPP(int p) const; }; class STLGeometry : public NetgenGeometry, public STLTopology { // edges to be meshed: Array edges; //edges per point TABLE edgesperpoint; // line: a connection of edges Array lines; Array lineendpoints; //per geometrypoint, 1 = is endpoint; 0 = no endpoint, Array normals; //normals belong to points! Array externaledges; int undoexternaledges; Array storedexternaledges; STLEdgeDataList * edgedata; // STLEdgeDataList edgedata_store; int calcedgedataanglesnew; int edgedatastored; int facecnt; //meshpoint is only set, if an edge is at this point!!! Array vicinity; //is one, if a triangle belongs to vicinity (eg. of selecttrig) Array markedtrigs; //is one, if a triangle belongs to marked triangles (calcdirtystrigs) Array markedsegs; //every pointpair is a segment!!! Array selectedmultiedge; //spiralpoints: Array spiralpoints; // Array atlas; //marks all already charted trigs with chartnumber Array chartmark; //outerchartspertrig, ascending sorted TABLE outerchartspertrig; //for meshing and project: Array meshcharttrigs; //per trig: 1=belong to chart, 0 not int meshchart; Array ha_points; // help array, np long, filled with 0 // sharp geometric edges not declared as edges // (not considered for spiral check) INDEX_2_HASHTABLE * smoothedges; //transformation: Vec<3> meshtrignv; Vec<3> ex, ey, ez; Point<3> p1; mutable class RefinementSTLGeometry * ref; public: int edgesfound; int surfacemeshed; int surfaceoptimized; int volumemeshed; int trigsconverted; //when STLTriangles exist -> 1 //for selecting nodes //int selecttrig, nodeofseltrig; //only for testing; Array meshlines; Array meshpoints; double area; public: STLGeometry(); virtual ~STLGeometry(); void Clear(); virtual void Save (string filename) const; DLL_HEADER void STLInfo(double* data); //stldoctor: DLL_HEADER void SmoothNormals(); DLL_HEADER void MarkNonSmoothNormals(); DLL_HEADER void CalcEdgeData(); DLL_HEADER void CalcEdgeDataAngles(); const STLEdgeDataList& EdgeDataList() const {return *edgedata;} DLL_HEADER void UndoEdgeChange(); DLL_HEADER void StoreEdgeData(); DLL_HEADER void RestoreEdgeData(); //void ClearSelectedMultiEdge() {selectedmultiedge.SetSize(0);} //void AddSelectedMultiEdge(twoint ep) {selectedmultiedge.Append(ep);} //int SelectedMultiEdgeSize() {return selectedmultiedge.Size();} const Array& SelectedMultiEdge() {return selectedmultiedge;} twoint GetNearestSelectedDefinedEdge(); void BuildSelectedMultiEdge(twoint ep); void BuildSelectedEdge(twoint ep); void BuildSelectedCluster(twoint ep); DLL_HEADER void ImportEdges(); DLL_HEADER void AddEdges(const Array >& eps); DLL_HEADER void ExportEdges(); DLL_HEADER void LoadEdgeData(const char* file); DLL_HEADER void SaveEdgeData(const char* file); // void SetEdgeAtSelected(int mode); DLL_HEADER void STLDoctorConfirmEdge(); DLL_HEADER void STLDoctorCandidateEdge(); DLL_HEADER void STLDoctorExcludeEdge(); DLL_HEADER void STLDoctorUndefinedEdge(); DLL_HEADER void STLDoctorSetAllUndefinedEdges(); DLL_HEADER void STLDoctorEraseCandidateEdges(); DLL_HEADER void STLDoctorConfirmCandidateEdges(); DLL_HEADER void STLDoctorConfirmedToCandidateEdges(); DLL_HEADER void STLDoctorDirtyEdgesToCandidates(); DLL_HEADER void STLDoctorLongLinesToCandidates(); DLL_HEADER void UndoExternalEdges(); DLL_HEADER void StoreExternalEdges(); DLL_HEADER void RestoreExternalEdges(); DLL_HEADER void ImportExternalEdges(const char * filename); // Flame edges, JS // void LoadExternalEdges(); DLL_HEADER void BuildExternalEdgesFromEdges(); DLL_HEADER void SaveExternalEdges(); DLL_HEADER void AddExternalEdgeAtSelected(); DLL_HEADER void AddClosedLinesToExternalEdges(); DLL_HEADER void AddLongLinesToExternalEdges(); DLL_HEADER void AddAllNotSingleLinesToExternalEdges(); DLL_HEADER void STLDoctorBuildEdges(); DLL_HEADER void AddExternalEdgesFromGeomLine(); DLL_HEADER void DeleteDirtyExternalEdges(); DLL_HEADER void DeleteExternalEdgeAtSelected(); DLL_HEADER void DeleteExternalEdgeInVicinity(); void AddExternalEdge(int p1, int p2); void DeleteExternalEdge(int p1, int p2); int IsExternalEdge(int p1, int p2); int NOExternalEdges() const {return externaledges.Size();} twoint GetExternalEdge(int i) const {return externaledges.Get(i);} DLL_HEADER void DestroyDirtyTrigs(); DLL_HEADER void CalcNormalsFromGeometry(); DLL_HEADER void MoveSelectedPointToMiddle(); DLL_HEADER void NeighbourAnglesOfSelectedTrig(); DLL_HEADER void PrintSelectInfo(); DLL_HEADER void ShowSelectedTrigChartnum(); DLL_HEADER void ShowSelectedTrigCoords(); DLL_HEADER void SmoothGeometry (); DLL_HEADER void LoadMarkedTrigs(); DLL_HEADER void SaveMarkedTrigs(); void ClearMarkedSegs() {markedsegs.SetSize(0);} void AddMarkedSeg(const Point<3> & ap1, const Point<3> & ap2) { markedsegs.Append(ap1);markedsegs.Append(ap2); } void GetMarkedSeg(int i, Point<3> & ap1, Point<3> & ap2) { ap1=markedsegs.Get(i*2-1); ap2=markedsegs.Get(i*2); } int GetNMarkedSegs() {return markedsegs.Size()/2;} DLL_HEADER void CalcVicinity(int starttrig); DLL_HEADER void GetVicinity(int starttrig, int size, Array& vic); DLL_HEADER int Vicinity(int trig) const; DLL_HEADER void InitMarkedTrigs(); DLL_HEADER void MarkDirtyTrigs(); DLL_HEADER void SmoothDirtyTrigs(); DLL_HEADER void GeomSmoothRevertedTrigs(); DLL_HEADER void MarkRevertedTrigs(); DLL_HEADER double CalcTrigBadness(int i); DLL_HEADER int IsMarkedTrig(int trig) const; DLL_HEADER void SetMarkedTrig(int trig, int num); DLL_HEADER void MarkTopErrorTrigs (); //Selected triangle DLL_HEADER void SetSelectTrig(int trig); DLL_HEADER int GetSelectTrig() const; DLL_HEADER void SetNodeOfSelTrig(int n); DLL_HEADER int GetNodeOfSelTrig() const; int AddNormal(const Vec3d& n) { normals.Append(n); return normals.Size(); } const Vec3d & GetNormal(int nr) const {return normals.Get(nr);} void SetNormal(int nr, const Vec3d& n) {normals.Elem(nr) = n;} int AddEdge(const STLEdge& v) { edges.Append(v); return edges.Size(); } int AddEdge(int p1, int p2); STLEdge GetEdge(int nr) {return edges.Get(nr);} int GetNE() {return edges.Size();} double Area(); double GetAngle(int t1, int t2); double GetGeomAngle(int t1, int t2); //if triangles t1 and t2 touch, return 1 and in p1, p2 the touching points //int TrigsTouch(int t1, int t2, int& p1, int& p2); /// ///ReadTriangle->STLTriangle, initialise some important variables, always after load!!! virtual void InitSTLGeometry (const Array & readtrigs); virtual void TopologyChanged(); //do some things, if topology changed! int CheckGeometryOverlapping(); //get NO edges per point int GetEPPSize() const {return edgesperpoint.Size();}; int GetNEPP(int pn) { if (edgesperpoint.Size() == 0) {BuildEdgesPerPoint();} return edgesperpoint.EntrySize(pn); }; int GetEdgePP(int pn, int vi) { if (edgesperpoint.Size() == 0) {BuildEdgesPerPoint();} return edgesperpoint.Get(pn,vi); }; void AddEdgePP(int pn, int vn) {edgesperpoint.Add1(pn,vn);}; //von 2 punkten ermitteln, ob sie eine Kante sind int IsEdge(int p1, int p2); int IsEdgeNum(int p1, int p2); ///Build EdgeSegments void ClearEdges(); void BuildEdges(); void BuildEdgesPerPoint(); void UseExternalEdges(); void FindEdgesFromAngles(); void CalcFaceNums(); int GetNOBodys(); int GetNOFaces() {return facecnt;} void LinkEdges(); void AddConeAndSpiralEdges(); void AddFaceEdges(); //each face should have at least one starting edge (outherwise it won't be meshed) void GetDirtyChartTrigs(int chartnum, STLChart& chart, const Array& outercharttrigs, Array& chartpointchecked, Array& dirtytrigs); void ClearSpiralPoints(); void SetSpiralPoint(int pn) {spiralpoints.Elem(pn) = 1;}; int GetSpiralPoint(int pn) const {return spiralpoints.Get(pn);}; void GetSortedTrianglesAroundPoint(int p, int starttrig, Array& trigs); // smooth edges: sharp geometric edges not declared as edges void BuildSmoothEdges (); int IsSmoothEdge (int pi1, int pi2) const; //make charts with regions of a max. angle void MakeAtlas(class Mesh & mesh); //outerchartspertrig, sorted! int GetOCPTSize() const {return outerchartspertrig.Size();}; int GetNOCPT(int tn) const {return outerchartspertrig.EntrySize(tn);}; int GetOCPT(int tn, int vi) const {return outerchartspertrig.Get(tn,vi);}; void SetOCPT(int tn, int vi, int ocn) {outerchartspertrig.Set(tn,vi,ocn);}; void AddOCPT(int tn, int ocn) {outerchartspertrig.Add1(tn, ocn);}; int TrigIsInOC(int tn, int ocn) const; //get chart number of a trig or 0 if unmarked int GetChartNr(int i) const; int GetMarker(int i) const { return chartmark.Get(i); } void SetMarker(int nr, int m); int GetNOCharts() const; //get a chart from atlas const STLChart& GetChart(int nr) const; STLChart& GetChart(int nr) {return *(atlas.Get(nr));}; int AtlasMade() const; void GetInnerChartLimes(Array& limes, int chartnum); //FOR MESHING int GetMeshChartNr () { return meshchart; } void GetMeshChartBoundary (Array & points, Array & points3d, Array & lines, double h); Point<3> PointBetween(const Point<3> & p1, int t1, const Point<3> & p2, int t2); //select triangles in meshcharttrigs of actual (defined by trig) whole chart void PrepareSurfaceMeshing(); // void DefineTangentialPlane(const Point<3> & ap1, const Point<3> & ap2, int trig); // void SelectChartOfTriangle (int trignum); // void SelectChartOfPoint (const Point<3> & p); // const Vec<3> & GetChartNormalVector () const { return meshtrignv; } // list of trigs void ToPlane (const Point<3> & locpoint, int * trigs, Point<2> & plainpoint, double h, int& zone, int checkchart); //return 0, wenn alles OK, 1 sonst int FromPlane (const Point<2> & plainpoint, Point<3> & locpoint, double h); //get nearest point in actual chart and return any triangle where it lies on int ProjectNearest(Point<3> & p3d) const; //project point with normal nv from last define tangential plane int LastTrig() const; int Project(Point<3> & p3d) const; int ProjectOnWholeSurface (Point<3> & p3d) const; int GetNLines() const {return lines.Size();} int AddLine(STLLine* line) { lines.Append(line); return lines.Size(); } STLLine* GetLine(int nr) const {return lines.Get(nr);} int GetLineP(int lnr, int pnr) const {return lines.Get(lnr)->PNum(pnr);} int GetLineNP(int nr) const {return lines.Get(nr)->NP();} void SetLineEndPoint(int pn); int IsLineEndPoint(int pn); int LineEndPointsSet() const {return lineendpoints.Size() == GetNP();} void ClearLineEndPoints(); DLL_HEADER void RestrictLocalH(class Mesh & mesh, double gh); void RestrictLocalHCurv(class Mesh & mesh, double gh); void RestrictHChartDistOneChart(int chartnum, Array& acttrigs, class Mesh & mesh, double gh, double fact, double minh); friend class MeshingSTLSurface; virtual int GenerateMesh (shared_ptr & mesh, MeshingParameters & mparam); virtual const Refinement & GetRefinement () const; }; #include "meshstlsurface.hpp" extern int STLMeshingDummy (STLGeometry* stlgeometry, shared_ptr & mesh, MeshingParameters & mparam); } #endif netgen-6.2.1804/libsrc/stlgeom/stlgeommesh.cpp0000644000175000017500000011506713272137567020002 0ustar kurtkurt//20.11.1999 second part of stlgeom.cc, mainly mesh functions #include #include #include #include #include #include "stlgeom.hpp" namespace netgen { int EdgeUsed(int p1, int p2, Array& edges, INDEX_2_HASHTABLE& hashtab) { if (p1 > p2) {swap (p1,p2);} if (hashtab.Used(INDEX_2(p1,p2))) {return hashtab.Get(INDEX_2(p1,p2));} return 0; } Point<3> STLGeometry :: PointBetween(const Point<3> & ap1, int t1, const Point<3> & ap2, int t2) { //funktioniert nicht in allen Fällen! PrintWarning("Point between"); ClearMarkedSegs(); InitMarkedTrigs(); SetMarkedTrig(t1,1); SetMarkedTrig(t2,1); TABLE edgepoints; TABLE edgepointdists; TABLE edgepointorigines; TABLE edgepointoriginps; Array edgetrigs; Array edgepointnums; Array edgetriglocinds; int size = 3*GetNT(); INDEX_2_HASHTABLE hashtab(size); int divisions = 10; edgepoints.SetSize(size); edgepointdists.SetSize(size); edgepointorigines.SetSize(size); edgepointoriginps.SetSize(size); edgetrigs.SetSize(size); edgepointnums.SetSize(size); edgetriglocinds.SetSize(size); Array edgelist1; Array edgelist2; edgelist1.SetSize(0); edgelist2.SetSize(0); int i, j, k, l, m; int edgecnt = 0; //first triangle: for (i = 1; i <= 3; i++) { int ptn1 = GetTriangle(t1).PNum(i); int ptn2 = GetTriangle(t1).PNumMod(i+1); if (ptn1 > ptn2) {swap(ptn1,ptn2);} Point3d pt1 = GetPoint(ptn1); Point3d pt2 = GetPoint(ptn2); edgecnt++; edgetrigs.Elem(edgecnt) = t1; edgepointnums.Elem(edgecnt) = INDEX_2(ptn1,ptn2); hashtab.Set(edgepointnums.Get(edgecnt),edgecnt); edgetriglocinds.Elem(edgecnt) = i; edgelist1.Append(edgecnt); for (j = 1; j <= divisions; j++) { double lfact = (double)j/(double)divisions; Point3d pbtw(lfact*pt1.X()+(1.-lfact)*pt2.X(), lfact*pt1.Y()+(1.-lfact)*pt2.Y(), lfact*pt1.Z()+(1.-lfact)*pt2.Z()); //AddMarkedSeg(ap1,pbtw); edgepoints.Add1(edgecnt,pbtw); edgepointdists.Add1(edgecnt,Dist(pbtw,ap1)); edgepointorigines.Add1(edgecnt,0); edgepointoriginps.Add1(edgecnt,0); } } int finished = 0; int endpointorigine = 0; int endpointoriginp = 0; double endpointmindist = 1E50; int maxsize = 0; while (!finished) { finished = 1; if (edgelist1.Size() > maxsize) {maxsize = edgelist1.Size();} for (i = 1; i <= edgelist1.Size(); i++) { int en = edgelist1.Get(i); int trig = edgetrigs.Get(en); int edgenum = edgetriglocinds.Get(en); int tn = NeighbourTrigSorted(trig,edgenum); if (tn != t2) { for (k = 1; k <= 3; k++) { int pnt1 = GetTriangle(tn).PNum(k); int pnt2 = GetTriangle(tn).PNumMod(k+1); if (pnt1 > pnt2) {swap(pnt1,pnt2);} Point3d pt1 = GetPoint(pnt1); Point3d pt2 = GetPoint(pnt2); //AddMarkedSeg(pt1,pt2); //if (!(pnt1 == ep1 && pnt2 == ep2)) // { int edgeused = 0; edgenum = EdgeUsed(pnt1, pnt2, edgepointnums, hashtab); if (edgenum != en) { if (edgenum != 0) {edgeused = 1;} else { edgecnt++; edgenum = edgecnt; edgetrigs.Elem(edgenum) = tn; edgepointnums.Elem(edgenum) = INDEX_2(pnt1,pnt2); hashtab.Set(edgepointnums.Get(edgenum),edgenum); edgetriglocinds.Elem(edgenum) = k; } if (edgenum > size || edgenum == 0) {PrintSysError("edgenum = ", edgenum);} double minofmindist = 1E50; int changed = 0; for (l = 1; l <= divisions; l++) { double lfact = (double)l/(double)divisions; Point3d pbtw(lfact*pt1.X()+(1.-lfact)*pt2.X(), lfact*pt1.Y()+(1.-lfact)*pt2.Y(), lfact*pt1.Z()+(1.-lfact)*pt2.Z()); double mindist = 1E50; int index=0; for (m = 1; m <= divisions; m++) { const Point3d& p = edgepoints.Get(en,m); if (Dist(pbtw,p) + edgepointdists.Get(en,m) < mindist) {mindist = Dist(pbtw,p) + edgepointdists.Get(en,m); index = m;} } //if (mindist < endpointmindist) {finished = 0;} if (mindist < minofmindist) {minofmindist = mindist;} if (!edgeused) { //AddMarkedSeg(pbtw,edgepoints.Get(en,index)); edgepoints.Add1(edgenum,pbtw); edgepointdists.Add1(edgenum,mindist); edgepointorigines.Add1(edgenum,en); edgepointoriginps.Add1(edgenum,index); changed = 1; } else { if (mindist < edgepointdists.Get(edgenum,l)) { edgepointdists.Set(edgenum,l,mindist); edgepointorigines.Set(edgenum,l,en); edgepointoriginps.Set(edgenum,l,index); changed = 1; } } } if (minofmindist < endpointmindist-1E-10 && changed) { finished = 0; edgelist2.Append(edgenum); } } } } else { double mindist = 1E50; int index(0); for (m = 1; m <= divisions; m++) { const Point3d& p = edgepoints.Get(en,m); if (Dist(ap2,p) + edgepointdists.Get(en,m) < mindist) {mindist = Dist(ap2,p) + edgepointdists.Get(en,m); index = m;} } if (mindist < endpointmindist) { endpointorigine = en; endpointoriginp = index; endpointmindist = mindist; } } } edgelist1.SetSize(0); for (i = 1; i <= edgelist2.Size(); i++) { edgelist1.Append(edgelist2.Get(i)); } } if (!endpointorigine) {PrintSysError("No connection found!");} Array plist; plist.Append(ap2); int laste = endpointorigine; int lastp = endpointoriginp; int lle, llp; while (laste) { plist.Append(edgepoints.Get(laste,lastp)); lle = laste; llp = lastp; laste = edgepointorigines.Get(lle,llp); lastp = edgepointoriginps.Get(lle,llp); } plist.Append(ap1); for (i = 1; i <= plist.Size()-1; i++) { AddMarkedSeg(plist.Get(i),plist.Get(i+1)); } PrintMessage(5,"PointBetween: complexity=", maxsize); Point3d pm; double dist = 0; int found = 0; for (i = 1; i <= plist.Size()-1; i++) { dist += Dist(plist.Get(i),plist.Get(i+1)); if (dist > endpointmindist*0.5) { double segl = Dist(plist.Get(i), plist.Get(i+1)); double d = dist - endpointmindist * 0.5; pm = Point3d(d/segl*plist.Get(i).X() + (1.-d/segl)*plist.Get(i+1).X(), d/segl*plist.Get(i).Y() + (1.-d/segl)*plist.Get(i+1).Y(), d/segl*plist.Get(i).Z() + (1.-d/segl)*plist.Get(i+1).Z()); found = 1; break; } } if (!found) {PrintWarning("Problem in PointBetween"); pm = Center(ap1,ap2);} AddMarkedSeg(pm, Point3d(0.,0.,0.)); return pm; } void STLGeometry :: PrepareSurfaceMeshing() { meshchart = -1; //clear no old chart meshcharttrigs.SetSize(GetNT()); meshcharttrigs = 0; } void STLGeometry::GetMeshChartBoundary (Array & apoints, Array & points3d, Array & alines, double h) { twoint seg, newseg; int zone; Point<2> p2; const STLChart& chart = GetChart(meshchart); for (int i = 1; i <= chart.GetNOLimit(); i++) { seg = chart.GetOLimit(i); INDEX_2 i2; for (int j = 1; j <= 2; j++) { int pi = (j == 1) ? seg.i1 : seg.i2; int lpi; if (ha_points.Get(pi) == 0) { const Point<3> & p3d = GetPoint (pi); Point<2> p2d; points3d.Append (p3d); ToPlane(p3d, 0, p2d, h, zone, 0); apoints.Append (p2d); lpi = apoints.Size(); ha_points.Elem(pi) = lpi; } else lpi = ha_points.Get(pi); i2.I(j) = lpi; } alines.Append (i2); /* seg = chart.GetOLimit(i); psize = points.Size(); newseg.i1 = psize+1; newseg.i2 = psize+2; ToPlane(GetPoint(seg.i1), 0, p2, h, zone, 0); points.Append(p2); points3d.Append (GetPoint(seg.i1)); ToPlane(GetPoint(seg.i2), 0, p2, h, zone, 0); points.Append(p2); points3d.Append (GetPoint(seg.i2)); lines.Append (INDEX_2 (points.Size()-1, points.Size())); */ } for (int i = 1; i <= chart.GetNOLimit(); i++) { seg = chart.GetOLimit(i); ha_points.Elem(seg.i1) = 0; ha_points.Elem(seg.i2) = 0; } } void STLGeometry :: DefineTangentialPlane (const Point<3> & ap1, const Point<3> & ap2, int trig) { p1 = ap1; //save for ToPlane, in data of STLGeometry class Point<3> p2 = ap2; //only locally used meshchart = GetChartNr(trig); if (usechartnormal) meshtrignv = GetChart(meshchart).GetNormal(); else meshtrignv = GetTriangle(trig).Normal(); //meshtrignv = GetTriangle(trig).Normal(points); meshtrignv /= meshtrignv.Length(); GetTriangle(trig).ProjectInPlain(points, meshtrignv, p2); ez = meshtrignv; ez /= ez.Length(); ex = p2 - p1; ex -= (ex * ez) * ez; ex /= ex.Length(); ey = Cross (ez, ex); } void STLGeometry :: SelectChartOfTriangle (int trignum) { meshchart = GetChartNr(trignum); meshtrignv = GetTriangle(trignum).Normal(); } void STLGeometry :: SelectChartOfPoint (const Point<3> & p) { int i, ii; Array trigsinbox; Box<3> box(p,p); box.Increase (1e-6); GetTrianglesInBox (box, trigsinbox); // for (i = 1; i <= GetNT(); i++) for (ii = 1; ii <= trigsinbox.Size(); ii++) { i = trigsinbox.Get(ii); Point<3> hp = p; if (GetTriangle(i).GetNearestPoint(points, hp) <= 1E-8) { SelectChartOfTriangle (i); break; } } return; } void STLGeometry :: ToPlane (const Point<3> & locpoint, int * trigs, Point<2> & plainpoint, double h, int& zone, int checkchart) { if (checkchart) { //check if locpoint lies on actual chart: zone = 0; // Point3d p; int i = 1; const STLChart& chart = GetChart(meshchart); int foundinchart = 0; const double range = 1e-6; //1e-4 old if (trigs) { int * htrigs = trigs; while (*htrigs) { if (TrigIsInOC (*htrigs, meshchart)) { foundinchart = 1; break; } htrigs++; } } else { Array trigsinbox; if (!geomsearchtreeon) { //alter chart-tree Box<3> box(locpoint, locpoint); box.Increase (range); chart.GetTrianglesInBox (box.PMin(), box.PMax(), trigsinbox); } else { Array trigsinbox2; Box<3> box(locpoint, locpoint); box.Increase (range); GetTrianglesInBox (box, trigsinbox2); for (i = 1; i <= trigsinbox2.Size(); i++) { if (TrigIsInOC(trigsinbox2.Get(i),meshchart)) {trigsinbox.Append(trigsinbox2.Get(i));} } } for (i = 1; i <= trigsinbox.Size(); i++) { Point<3> p = locpoint; if (GetTriangle(trigsinbox.Get(i)).GetNearestPoint(points, p) <= 1E-8) { foundinchart = 1; break; } } } //do not use this point (but do correct projection (joachim) if (!foundinchart) { zone = -1; // plainpoint.X() = 11111; plainpoint.Y() = 11111; return; } } else { zone = 0; } //transform in plane Vec<3> p1p = locpoint - p1; plainpoint(0) = (p1p * ex) / h; plainpoint(1) = (p1p * ey) / h; } int STLGeometry :: FromPlane (const Point<2> & plainpoint, Point<3> & locpoint, double h) { Point2d plainpoint2 (plainpoint); plainpoint2.X() *= h; plainpoint2.Y() *= h; Vec3d p1p = plainpoint2.X() * ex + plainpoint2.Y() * ey; locpoint = p1 + p1p; int rv = Project(locpoint); if (!rv) {return 1;} //project nicht gegangen return 0; } int lasttrig; int STLGeometry :: LastTrig() const {return lasttrig;}; //project normal to tangential plane int STLGeometry :: Project(Point<3> & p3d) const { Point<3> p, pf; int i, j; int fi = 0; int cnt = 0; int different = 0; const double lamtol = 1e-6; const STLChart& chart = GetChart(meshchart); int nt = chart.GetNT(); QuadraticFunction3d quadfun(p3d, meshtrignv); /* Vec3d hv = meshtrignv; hv /= hv.Length(); Vec3d t1, t2; hv.GetNormal (t1); Cross (hv, t1, t2); */ for (j = 1; j <= nt; j++) { i = chart.GetTrig(j); const Point<3> & c = GetTriangle(i).center; /* double d1 = t1 * (c-p3d); double d2 = t2 * (c-p3d); */ /* if (d1 * d1 + d2 * d2 > sqr (GetTriangle(i).rad)) continue; */ if (quadfun.Eval(c) > sqr (GetTriangle(i).rad)) continue; p = p3d; Vec<3> lam; int err = GetTriangle(i).ProjectInPlain(points, meshtrignv, p, lam); int inside = (err == 0 && lam(0) > -lamtol && lam(1) > -lamtol && (1-lam(0)-lam(1)) > -lamtol); /* p = p3d; GetTriangle(i).ProjectInPlain(points, meshtrignv, p); if (GetTriangle(i).PointInside(points, p)) */ if (inside) { if (cnt != 0) { if (Dist2(p,pf)>=1E-16) { // (*testout) << "ERROR: found two points to project which are different" << endl; //(*testout) << "p=" << p << ", pf=" << pf << endl; different = 1; } } pf = p; fi = i; cnt++; } if (inside) break; } // if (cnt == 2) {(*testout) << "WARNING: found 2 triangles to project" << endl;} //if (cnt == 3) {(*testout) << "WARNING: found 3 triangles to project" << endl;} //if (cnt > 3) {(*testout) << "WARNING: found more than 3 triangles to project" << endl;} if (fi != 0) {lasttrig = fi;} if (fi != 0 && !different) {p3d = pf; return fi;} // (*testout) << "WARNING: Project failed" << endl; return 0; } //project normal to tangential plane int STLGeometry :: ProjectOnWholeSurface(Point<3> & p3d) const { Point<3> p, pf; int i; int fi = 0; int cnt = 0; int different = 0; const double lamtol = 1e-6; for (i = 1; i <= GetNT(); i++) { p = p3d; Vec<3> lam; int err = GetTriangle(i).ProjectInPlain(points, meshtrignv, p, lam); int inside = (err == 0 && lam(0) > -lamtol && lam(1) > -lamtol && (1-lam(0)-lam(1)) > -lamtol); /* p = p3d; GetTriangle(i).ProjectInPlain(points, meshtrignv, p); if (GetTriangle(i).PointInside(points, p)) */ if (inside) { if (cnt != 0) { if (Dist2(p,pf)>=1E-16) { // (*testout) << "ERROR: found two points to project which are different" << endl; // (*testout) << "p=" << p << ", pf=" << pf << endl; different = 1; } } pf = p; fi = i; cnt++; } } /* if (cnt == 2) {(*testout) << "WARNING: found 2 triangles to project" << endl;} if (cnt == 3) {(*testout) << "WARNING: found 3 triangles to project" << endl;} if (cnt > 3) {(*testout) << "WARNING: found more than 3 triangles to project" << endl;} */ if (fi != 0) {lasttrig = fi;} if (fi != 0 && !different) {p3d = pf; return fi;} // (*testout) << "WARNING: Project failed" << endl; return 0; } int STLGeometry :: ProjectNearest(Point<3> & p3d) const { Point<3> p, pf = 0.0; //set new chart const STLChart& chart = GetChart(meshchart); int i; double nearest = 1E50; double dist; int ft = 0; for (i = 1; i <= chart.GetNT(); i++) { p = p3d; dist = GetTriangle(chart.GetTrig(i)).GetNearestPoint(points, p); if (dist < nearest) { pf = p; nearest = dist; ft = chart.GetTrig(i); } } p3d = pf; //if (!ft) {(*testout) << "ERROR: ProjectNearest failed" << endl;} return ft; } //Restrict local h due to curvature for make atlas void STLGeometry :: RestrictLocalHCurv(class Mesh & mesh, double gh) { PushStatusF("Restrict H due to surface curvature"); //bei jedem Dreieck alle Nachbardreiecke vergleichen, und, fallskein Kante dazwischen, //die Meshsize auf ein bestimmtes Mass limitieren int i,j; int ap1,ap2,p3,p4; Point<3> p1p, p2p, p3p, p4p; Vec<3> n, ntn; double rzyl, localh; // double localhfact = 0.5; // double geometryignorelength = 1E-4; double minlocalh = stlparam.atlasminh; Box<3> bb = GetBoundingBox(); // mesh.SetLocalH(bb.PMin() - Vec3d(10, 10, 10),bb.PMax() + Vec3d(10, 10, 10), // mparam.grading); // mesh.SetGlobalH(gh); double mincalch = 1E10; double maxcalch = -1E10 ; double objectsize = bb.Diam(); double geometryignoreedgelength = objectsize * 1e-5; if (stlparam.resthatlasenable) { Array minh; //minimales h pro punkt minh.SetSize(GetNP()); for (i = 1; i <= GetNP(); i++) { minh.Elem(i) = gh; } for (i = 1; i <= GetNT(); i++) { SetThreadPercent((double)i/(double)GetNT()*100.); if (multithread.terminate) {PopStatus(); return;} const STLTriangle& trig = GetTriangle(i); n = GetTriangle(i).Normal(); for (j = 1; j <= 3; j++) { const STLTriangle& nt = GetTriangle(NeighbourTrig(i,j)); trig.GetNeighbourPointsAndOpposite(nt,ap1,ap2,p3); //checken, ob ap1-ap2 eine Kante sind if (IsEdge(ap1,ap2)) continue; p4 = trig.PNum(1) + trig.PNum(2) + trig.PNum(3) - ap1 - ap2; p1p = GetPoint(ap1); p2p = GetPoint(ap2); p3p = GetPoint(p3); p4p = GetPoint(p4); double h1 = GetDistFromInfiniteLine(p1p,p2p, p4p); double h2 = GetDistFromInfiniteLine(p1p,p2p, p3p); double diaglen = Dist (p1p, p2p); if (diaglen < geometryignoreedgelength) continue; rzyl = ComputeCylinderRadius (n, GetTriangle(NeighbourTrig(i,j)).Normal(), h1, h2); if (h1 < 1e-3 * diaglen && h2 < 1e-3 * diaglen) continue; if (h1 < 1e-5 * objectsize && h2 < 1e-5 * objectsize) continue; // rzyl = mindist/(2*sinang); localh = 10.*rzyl / stlparam.resthatlasfac; if (localh < mincalch) {mincalch = localh;} if (localh > maxcalch) {maxcalch = localh;} if (localh < minlocalh) {localh = minlocalh;} if (localh < gh) { minh.Elem(ap1) = min2(minh.Elem(ap1),localh); minh.Elem(ap2) = min2(minh.Elem(ap2),localh); } mesh.RestrictLocalHLine(p1p, p2p, localh); } } } PrintMessage(5, "done\nATLAS H: nmin local h=", mincalch); PrintMessage(5, "ATLAS H: max local h=", maxcalch); PrintMessage(5, "Local h tree has ", mesh.LocalHFunction().GetNBoxes(), " boxes of size ", (int)sizeof(GradingBox)); PopStatus(); } //restrict local h due to near edges and due to outer chart distance void STLGeometry :: RestrictLocalH(class Mesh & mesh, double gh) { //bei jedem Dreieck alle Nachbardreiecke vergleichen, und, fallskein Kante dazwischen, //die Meshsize auf ein bestimmtes Mass limitieren int i,j; int ap1,ap2,p3,p4; Point3d p1p, p2p, p3p, p4p; Vec3d n, ntn; double rzyl, localh; // double localhfact = 0.5; // double geometryignorelength = 1E-4; Box<3> bb = GetBoundingBox(); //mesh.SetLocalH(bb.PMin() - Vec3d(10, 10, 10),bb.PMax() + Vec3d(10, 10, 10), // mparam.grading); //mesh.SetGlobalH(gh); double mincalch = 1E10; double maxcalch = -1E10; double objectsize = bb.Diam(); double geometryignoreedgelength = objectsize * 1e-5; if (stlparam.resthsurfcurvenable) { PushStatusF("Restrict H due to surface curvature"); Array minh; //minimales h pro punkt minh.SetSize(GetNP()); for (i = 1; i <= GetNP(); i++) { minh.Elem(i) = gh; } for (i = 1; i <= GetNT(); i++) { SetThreadPercent((double)i/(double)GetNT()*100.); if (i%20000==19999) {PrintMessage(7, (double)i/(double)GetNT()*100. , "%");} if (multithread.terminate) {PopStatus(); return;} const STLTriangle& trig = GetTriangle(i); n = GetTriangle(i).Normal(); for (j = 1; j <= 3; j++) { const STLTriangle& nt = GetTriangle(NeighbourTrig(i,j)); trig.GetNeighbourPointsAndOpposite(nt,ap1,ap2,p3); //checken, ob ap1-ap2 eine Kante sind if (IsEdge(ap1,ap2)) continue; p4 = trig.PNum(1) + trig.PNum(2) + trig.PNum(3) - ap1 - ap2; p1p = GetPoint(ap1); p2p = GetPoint(ap2); p3p = GetPoint(p3); p4p = GetPoint(p4); double h1 = GetDistFromInfiniteLine(p1p,p2p, p4p); double h2 = GetDistFromInfiniteLine(p1p,p2p, p3p); double diaglen = Dist (p1p, p2p); if (diaglen < geometryignoreedgelength) continue; rzyl = ComputeCylinderRadius (n, GetTriangle (NeighbourTrig(i,j)).Normal(), h1, h2); if (h1 < 1e-3 * diaglen && h2 < 1e-3 * diaglen) continue; if (h1 < 1e-5 * objectsize && h2 < 1e-5 * objectsize) continue; // rzyl = mindist/(2*sinang); localh = rzyl / stlparam.resthsurfcurvfac; if (localh < mincalch) {mincalch = localh;} if (localh > maxcalch) {maxcalch = localh;} if (localh < gh) { minh.Elem(ap1) = min2(minh.Elem(ap1),localh); minh.Elem(ap2) = min2(minh.Elem(ap2),localh); } //if (localh < 0.2) {localh = 0.2;} if(localh < objectsize) mesh.RestrictLocalHLine(p1p, p2p, localh); (*testout) << "restrict h along " << p1p << " - " << p2p << " to " << localh << endl; if (localh < 0.1) { localh = 0.1; } } } PrintMessage(7, "done\nmin local h=", mincalch, "\nmax local h=", maxcalch); PopStatus(); } if (stlparam.resthcloseedgeenable) { PushStatusF("Restrict H due to close edges"); //geht nicht für spiralen!!!!!!!!!!!!!!!!!! double disttohfact = sqr(10.0 / stlparam.resthcloseedgefac); int k,l; double h1, h2, dist; int rc = 0; Point3d p3p1; double mindist = 1E50; PrintMessage(7,"build search tree..."); BoxTree<3> * lsearchtree = new BoxTree<3> (GetBoundingBox().PMin() - Vec3d(1,1,1), GetBoundingBox().PMax() + Vec3d(1,1,1)); Array pmins(GetNLines()); Array pmaxs(GetNLines()); double maxhline; for (i = 1; i <= GetNLines(); i++) { maxhline = 0; STLLine* l1 = GetLine(i); Point3d pmin(GetPoint(l1->StartP())), pmax(GetPoint(l1->StartP())), px; for (j = 2; j <= l1->NP(); j++) { px = GetPoint(l1->PNum(j)); maxhline = max2(maxhline,mesh.GetH(px)); pmin.SetToMin (px); pmax.SetToMax (px); } Box3d box(pmin,pmax); box.Increase(maxhline); lsearchtree->Insert (box.PMin(), box.PMax(), i); pmins.Elem(i) = box.PMin(); pmaxs.Elem(i) = box.PMax(); } Array linenums; int k2; for (i = 1; i <= GetNLines(); i++) { SetThreadPercent((double)i/(double)GetNLines()*100.); if (multithread.terminate) {PopStatus(); return;} linenums.SetSize(0); lsearchtree->GetIntersecting(pmins.Get(i),pmaxs.Get(i),linenums); STLLine* l1 = GetLine(i); for (j = 1; j <= l1->NP(); j++) { p3p1 = GetPoint(l1->PNum(j)); h1 = sqr(mesh.GetH(p3p1)); for (k2 = 1; k2 <= linenums.Size(); k2++) { k = linenums.Get(k2); if (k <= i) {continue;} /* //old, without searchtrees for (k = i+1; k <= GetNLines(); k++) { */ STLLine* l2 = GetLine(k); for (l = 1; l <= l2->NP(); l++) { const Point3d& p3p2 = GetPoint(l2->PNum(l)); h2 = sqr(mesh.GetH(p3p2)); dist = Dist2(p3p1,p3p2)*disttohfact; if (dist > 1E-12) { if (dist < h1) { mesh.RestrictLocalH(p3p1,sqrt(dist)); rc++; mindist = min2(mindist,sqrt(dist)); } if (dist < h2) { mesh.RestrictLocalH(p3p2,sqrt(dist)); rc++; mindist = min2(mindist,sqrt(dist)); } } } } } } PrintMessage(5, "done\n Restricted h in ", rc, " points due to near edges!"); PopStatus(); } if (stlparam.resthedgeangleenable) { PushStatusF("Restrict h due to close edges"); int lp1, lp2; Vec3d v1,v2; mincalch = 1E50; maxcalch = -1E50; for (i = 1; i <= GetNP(); i++) { SetThreadPercent((double)i/(double)GetNP()*100.); if (multithread.terminate) {PopStatus(); return;} if (GetNEPP(i) == 2 && !IsLineEndPoint(i)) { if (GetEdge(GetEdgePP(i,1)).PNum(2) == GetEdge(GetEdgePP(i,2)).PNum(1) || GetEdge(GetEdgePP(i,1)).PNum(1) == GetEdge(GetEdgePP(i,2)).PNum(2)) { lp1 = 1; lp2 = 2; } else { lp1 = 2; lp2 = 1; } v1 = Vec3d(GetPoint(GetEdge(GetEdgePP(i,1)).PNum(1)), GetPoint(GetEdge(GetEdgePP(i,1)).PNum(2))); v2 = Vec3d(GetPoint(GetEdge(GetEdgePP(i,2)).PNum(lp1)), GetPoint(GetEdge(GetEdgePP(i,2)).PNum(lp2))); rzyl = ComputeCylinderRadius(v1, v2, v1.Length(), v2.Length()); localh = rzyl / stlparam.resthedgeanglefac; if (localh < mincalch) {mincalch = localh;} if (localh > maxcalch) {maxcalch = localh;} if (localh != 0) mesh.RestrictLocalH(GetPoint(i), localh); } } PrintMessage(7,"edge-angle min local h=", mincalch, "\nedge-angle max local h=", maxcalch); PopStatus(); } if (stlparam.resthchartdistenable) { PushStatusF("Restrict H due to outer chart distance"); // mesh.LocalHFunction().Delete(); //berechne minimale distanz von chart zu einem nicht-outerchart-punkt in jedem randpunkt einer chart Array acttrigs(GetNT()); //outercharttrigs acttrigs = 0; for (i = 1; i <= GetNOCharts(); i++) { SetThreadPercent((double)i/(double)GetNOCharts()*100.); if (multithread.terminate) {PopStatus(); return;} RestrictHChartDistOneChart(i, acttrigs, mesh, gh, 1., 0.); } PopStatus(); // NgProfiler::Print(stdout); } if (stlparam.resthlinelengthenable) { //restrict h due to short lines PushStatusF("Restrict H due to line-length"); double minhl = 1E50; double linefact = 1./stlparam.resthlinelengthfac; double l; for (i = 1; i <= GetNLines(); i++) { SetThreadPercent((double)i/(double)GetNLines()*100.); if (multithread.terminate) {PopStatus(); return;} l = GetLine(i)->GetLength(points); const Point3d& pp1 = GetPoint(GetLine(i)->StartP()); const Point3d& pp2 = GetPoint(GetLine(i)->EndP()); if (l != 0) { minhl = min2(minhl,l*linefact); mesh.RestrictLocalH(pp1, l*linefact); mesh.RestrictLocalH(pp2, l*linefact); } } PopStatus(); PrintMessage(5, "minh due to line length=", minhl); } } void STLGeometry :: RestrictHChartDistOneChart(int chartnum, Array& acttrigs, class Mesh & mesh, double gh, double fact, double minh) { static int timer1 = NgProfiler::CreateTimer ("restrictH OneChart 1"); static int timer2 = NgProfiler::CreateTimer ("restrictH OneChart 2"); static int timer3 = NgProfiler::CreateTimer ("restrictH OneChart 3"); static int timer3a = NgProfiler::CreateTimer ("restrictH OneChart 3a"); static int timer3b = NgProfiler::CreateTimer ("restrictH OneChart 3b"); NgProfiler::StartTimer (timer1); double limessafety = stlparam.resthchartdistfac*fact; // original: 2 double localh; // mincalch = 1E10; //maxcalch = -1E10; Array limes1; Array limes2; Array plimes1; Array plimes2; Array plimes1trigs; //check from which trig the points come Array plimes2trigs; Array plimes1origin; //either the original pointnumber or zero, if new point int divisions = 10; int np1, np2; // Point3d p3p1, p3p2; STLTriangle tt; limes1.SetSize(0); limes2.SetSize(0); plimes1.SetSize(0); plimes2.SetSize(0); plimes1trigs.SetSize(0); plimes2trigs.SetSize(0); plimes1origin.SetSize(0); STLChart& chart = GetChart(chartnum); chart.ClearOLimit(); chart.ClearILimit(); for (int j = 1; j <= chart.GetNChartT(); j++) { int t = chart.GetChartTrig(j); tt = GetTriangle(t); for (int k = 1; k <= 3; k++) { int nt = NeighbourTrig(t,k); if (GetChartNr(nt) != chartnum) { tt.GetNeighbourPoints(GetTriangle(nt),np1,np2); if (!IsEdge(np1,np2) && !GetSpiralPoint(np1) && !GetSpiralPoint(np2)) { Point3d p3p1 = GetPoint(np1); Point3d p3p2 = GetPoint(np2); if (AddIfNotExists(limes1,np1)) { plimes1.Append(p3p1); plimes1trigs.Append(t); plimes1origin.Append(np1); } if (AddIfNotExists(limes1,np2)) { plimes1.Append(p3p2); plimes1trigs.Append(t); plimes1origin.Append(np2); } chart.AddILimit(twoint(np1,np2)); for (int di = 1; di <= divisions; di++) { double f1 = (double)di/(double)(divisions+1.); double f2 = (divisions+1.-(double)di)/(double)(divisions+1.); plimes1.Append(Point3d(p3p1.X()*f1+p3p2.X()*f2, p3p1.Y()*f1+p3p2.Y()*f2, p3p1.Z()*f1+p3p2.Z()*f2)); plimes1trigs.Append(t); plimes1origin.Append(0); } } } } } NgProfiler::StopTimer (timer1); NgProfiler::StartTimer (timer2); for (int j = 1; j <= chart.GetNT(); j++) acttrigs.Elem(chart.GetTrig(j)) = chartnum; for (int j = 1; j <= chart.GetNOuterT(); j++) { int t = chart.GetOuterTrig(j); tt = GetTriangle(t); for (int k = 1; k <= 3; k++) { int nt = NeighbourTrig(t,k); if (acttrigs.Get(nt) != chartnum) { tt.GetNeighbourPoints(GetTriangle(nt),np1,np2); if (!IsEdge(np1,np2)) { Point3d p3p1 = GetPoint(np1); Point3d p3p2 = GetPoint(np2); if (AddIfNotExists(limes2,np1)) {plimes2.Append(p3p1); plimes2trigs.Append(t);} if (AddIfNotExists(limes2,np2)) {plimes2.Append(p3p2); plimes2trigs.Append(t);} chart.AddOLimit(twoint(np1,np2)); for (int di = 1; di <= divisions; di++) { double f1 = (double)di/(double)(divisions+1.); double f2 = (divisions+1.-(double)di)/(double)(divisions+1.); plimes2.Append(Point3d(p3p1.X()*f1+p3p2.X()*f2, p3p1.Y()*f1+p3p2.Y()*f2, p3p1.Z()*f1+p3p2.Z()*f2)); plimes2trigs.Append(t); } } } } } NgProfiler::StopTimer (timer2); NgProfiler::StartTimer (timer3); double chartmindist = 1E50; if (plimes2.Size()) { NgProfiler::StartTimer (timer3a); Box3d bbox; bbox.SetPoint (plimes2.Get(1)); for (int j = 2; j <= plimes2.Size(); j++) bbox.AddPoint (plimes2.Get(j)); Point3dTree stree(bbox.PMin(), bbox.PMax()); for (int j = 1; j <= plimes2.Size(); j++) stree.Insert (plimes2.Get(j), j); Array foundpts; NgProfiler::StopTimer (timer3a); NgProfiler::StartTimer (timer3b); for (int j = 1; j <= plimes1.Size(); j++) { double mindist = 1E50; const Point3d & ap1 = plimes1.Get(j); double boxs = mesh.GetH (plimes1.Get(j)) * limessafety; Point3d pmin = ap1 - Vec3d (boxs, boxs, boxs); Point3d pmax = ap1 + Vec3d (boxs, boxs, boxs); stree.GetIntersecting (pmin, pmax, foundpts); for (int kk = 1; kk <= foundpts.Size(); kk++) { int k = foundpts.Get(kk); double dist = Dist2(plimes1.Get(j),plimes2.Get(k)); if (dist < mindist) mindist = dist; } /* const Point3d & ap1 = plimes1.Get(j); double his = mesh.GetH (plimes1.Get(j)); double xmin = ap1.X() - his * limessafety; double xmax = ap1.X() + his * limessafety; double ymin = ap1.Y() - his * limessafety; double ymax = ap1.Y() + his * limessafety; double zmin = ap1.Z() - his * limessafety; double zmax = ap1.Z() + his * limessafety; for (k = 1; k <= plimes2.Size(); k++) { const Point3d & ap2 = plimes2.Get(k); if (ap2.X() >= xmin && ap2.X() <= xmax && ap2.Y() >= ymin && ap2.Y() <= ymax && ap2.Z() >= zmin && ap2.Z() <= zmax) { dist = Dist2(plimes1.Get(j),plimes2.Get(k)); if (dist < mindist) { mindist = dist; } } } */ mindist = sqrt(mindist); localh = mindist/limessafety; if (localh < minh && localh != 0) {localh = minh;} //minh is generally 0! (except make atlas) if (localh < gh && localh > 0) { mesh.RestrictLocalH(plimes1.Get(j), localh); // if (mindist < mincalch) {mincalch = mindist;} // if (mindist > maxcalch) {maxcalch = mindist;} if (mindist < chartmindist) {chartmindist = mindist;} } } NgProfiler::StopTimer (timer3b); } NgProfiler::StopTimer (timer3); } int STLMeshingDummy (STLGeometry* stlgeometry, shared_ptr & mesh, MeshingParameters & mparam) { if (mparam.perfstepsstart > mparam.perfstepsend) return 0; multithread.terminate = 0; int success = 1; //int trialcntouter = 0; if (mparam.perfstepsstart <= MESHCONST_MESHEDGES) { if (mesh) mesh -> DeleteMesh(); else mesh = make_shared(); mesh->geomtype = Mesh::GEOM_STL; mesh -> SetGlobalH (mparam.maxh); mesh -> SetLocalH (stlgeometry->GetBoundingBox().PMin() - Vec3d(10, 10, 10), stlgeometry->GetBoundingBox().PMax() + Vec3d(10, 10, 10), mparam.grading); mesh -> LoadLocalMeshSize (mparam.meshsizefilename); success = 0; //mesh->DeleteMesh(); STLMeshing (*stlgeometry, *mesh); stlgeometry->edgesfound = 1; stlgeometry->surfacemeshed = 0; stlgeometry->surfaceoptimized = 0; stlgeometry->volumemeshed = 0; } if (multithread.terminate) return 0; if (mparam.perfstepsstart <= MESHCONST_MESHSURFACE && mparam.perfstepsend >= MESHCONST_MESHSURFACE) { if (!stlgeometry->edgesfound) { PrintUserError("You have to do 'analyse geometry' first!!!"); return 0; } if (stlgeometry->surfacemeshed || stlgeometry->surfacemeshed) { PrintUserError("Already meshed. Please start again with 'Analyse Geometry'!!!"); return 0; } success = 0; int retval = STLSurfaceMeshing (*stlgeometry, *mesh); if (retval == MESHING3_OK) { PrintMessage(3,"Success !!!!"); stlgeometry->surfacemeshed = 1; stlgeometry->surfaceoptimized = 0; stlgeometry->volumemeshed = 0; success = 1; } else if (retval == MESHING3_OUTERSTEPSEXCEEDED) { PrintError("Give up because of too many trials. Meshing aborted!"); } else if (retval == MESHING3_TERMINATE) { PrintWarning("Meshing Stopped by user!"); } else { PrintError("Surface meshing not successful. Meshing aborted!"); } #ifdef STAT_STREAM (*statout) << mesh->GetNSeg() << " & " << endl << mesh->GetNSE() << " & " << endl << GetTime() << " & "; #endif } if (multithread.terminate) return 0; if (success) { if (mparam.perfstepsstart <= MESHCONST_OPTSURFACE && mparam.perfstepsend >= MESHCONST_OPTSURFACE) { if (!stlgeometry->edgesfound) { PrintUserError("You have to do 'meshing->analyse geometry' first!!!"); return 0; } if (!stlgeometry->surfacemeshed) { PrintUserError("You have to do 'meshing->mesh surface' first!!!"); return 0; } if (stlgeometry->volumemeshed) { PrintWarning("Surface optimization with meshed volume is dangerous!!!"); } /* if (!optstring || strlen(optstring) == 0) { mparam.optimize2d = "smcm"; } else { mparam.optimize2d = optstring; } */ STLSurfaceOptimization (*stlgeometry, *mesh, mparam); if (stlparam.recalc_h_opt) { mesh -> SetLocalH (stlgeometry->GetBoundingBox().PMin() - Vec3d(10, 10, 10), stlgeometry->GetBoundingBox().PMax() + Vec3d(10, 10, 10), mparam.grading); mesh -> LoadLocalMeshSize (mparam.meshsizefilename); mesh -> CalcLocalHFromSurfaceCurvature (mparam.grading, stlparam.resthsurfmeshcurvfac); mparam.optimize2d = "cmsmSm"; STLSurfaceOptimization (*stlgeometry, *mesh, mparam); #ifdef STAT_STREAM (*statout) << GetTime() << " & "; #endif mparam.Render(); } stlgeometry->surfaceoptimized = 1; } if (multithread.terminate) return 0; if (mparam.perfstepsstart <= MESHCONST_MESHVOLUME && mparam.perfstepsend >= MESHCONST_MESHVOLUME) { if (stlgeometry->volumemeshed) { PrintUserError("Volume already meshed!"); return 0; } if (!stlgeometry->edgesfound) { PrintUserError("You have to do 'meshing->analyse geometry' first!!!"); return 0; } if (!stlgeometry->surfacemeshed) { PrintUserError("You have to do 'meshing->mesh surface' first!!!"); return 0; } if (!stlgeometry->surfaceoptimized) { PrintWarning("You should do 'meshing->optimize surface' first!!!"); } PrintMessage(5,"Check Overlapping boundary: "); mesh->FindOpenElements(); mesh->CheckOverlappingBoundary(); PrintMessage(5,""); if (stlparam.recalc_h_opt) { mesh -> SetLocalH (stlgeometry->GetBoundingBox().PMin() - Vec3d(10, 10, 10), stlgeometry->GetBoundingBox().PMax() + Vec3d(10, 10, 10), mparam.grading); mesh -> LoadLocalMeshSize (mparam.meshsizefilename); mesh -> CalcLocalH (mparam.grading); } PrintMessage(5,"Volume meshing"); int retval = MeshVolume (mparam, *mesh); if (retval == MESHING3_OK) { RemoveIllegalElements(*mesh); stlgeometry->volumemeshed = 1; } else if (retval == MESHING3_OUTERSTEPSEXCEEDED) { PrintError("Give up because of too many trials. Meshing aborted!"); return 0; } else if (retval == MESHING3_TERMINATE) { PrintWarning("Meshing Stopped by user!"); } else { PrintError("Volume meshing not successful. Meshing aborted!"); return 0; } #ifdef STAT_STREAM (*statout) << GetTime() << " & " << endl; #endif MeshQuality3d (*mesh); } if (multithread.terminate) return 0; if (mparam.perfstepsstart <= MESHCONST_OPTVOLUME && mparam.perfstepsend >= MESHCONST_OPTVOLUME) { if (!stlgeometry->edgesfound) { PrintUserError("You have to do 'meshing->analyse geometry' first!!!"); return 0; } if (!stlgeometry->surfacemeshed) { PrintUserError("You have to do 'meshing->mesh surface' first!!!"); return 0; } if (!stlgeometry->volumemeshed) { PrintUserError("You have to do 'meshing->mesh volume' first!!!"); return 0; } /* if (!optstring || strlen(optstring) == 0) { mparam.optimize3d = "cmdmstm"; } else { mparam.optimize3d = optstring; } */ OptimizeVolume (mparam, *mesh); #ifdef STAT_STREAM (*statout) << GetTime() << " & " << endl; (*statout) << mesh->GetNE() << " & " << endl << mesh->GetNP() << " " << '\\' << '\\' << " \\" << "hline" << endl; #endif mparam.Render(); } } return 0; } } netgen-6.2.1804/libsrc/stlgeom/python_stl.cpp0000644000175000017500000000231013272137567017640 0ustar kurtkurt #ifdef NG_PYTHON #include <../general/ngpython.hpp> #include #ifdef WIN32 #define DLL_HEADER __declspec(dllexport) #endif using namespace netgen; namespace netgen { //extern shared_ptr mesh; extern shared_ptr ng_geometry; } DLL_HEADER void ExportSTL(py::module & m) { py::class_, NetgenGeometry> (m,"STLGeometry") .def(py::init<>()) ; m.def("LoadSTLGeometry", FunctionPointer([] (const string & filename) { ifstream ist(filename); return shared_ptr(STLGeometry::Load(ist)); }),py::call_guard()); m.def("GenerateMesh", FunctionPointer([] (shared_ptr geo, MeshingParameters ¶m) { auto mesh = make_shared(); SetGlobalMesh(mesh); mesh->SetGeometry(geo); ng_geometry = geo; try { geo->GenerateMesh(mesh,param); } catch (NgException ex) { cout << "Caught NgException: " << ex.What() << endl; } return mesh; }),py::call_guard()) ; } PYBIND11_MODULE(libstl, m) { ExportSTL(m); } #endif netgen-6.2.1804/libsrc/stlgeom/vsstl.cpp0000644000175000017500000007527113272137567016630 0ustar kurtkurt#include #include #include #include #include #include #include "vsstl.hpp" namespace netgen { /* //mmm #include "stlgeom/modeller.hpp" */ /* *********************** Draw STL Geometry **************** */ extern STLGeometry * stlgeometry; extern shared_ptr mesh; // #include "../../ngtcltk/mvdraw.hpp" VisualSceneSTLMeshing :: VisualSceneSTLMeshing () : VisualScene() { selecttrig = 0; nodeofseltrig = 1; stlgeometry->SetSelectTrig(selecttrig); stlgeometry->SetNodeOfSelTrig(nodeofseltrig); } VisualSceneSTLMeshing :: ~VisualSceneSTLMeshing () { ; } void VisualSceneSTLMeshing :: DrawScene () { int i, j, k; if (changeval != stlgeometry->GetNT()) BuildScene(); changeval = stlgeometry->GetNT(); int colormeshsize = vispar.colormeshsize; double hmin = 0.0, hmax = 1.0; if (colormeshsize) { hmax = -1E50; hmin = +1E50; double ms; for (i = 1; i <= stlgeometry->GetNP(); i++) { ms = mesh->GetH (stlgeometry->GetPoint(i)); hmin = min2(hmin,ms); hmax = max2(hmax,ms); } //hmax = mparam.maxh; //hmin = mesh->GetMinH (stlgeometry->GetBoundingBox().PMin(), // stlgeometry->GetBoundingBox().PMax()); if (hmin == 0) hmin = 0.1 * hmax; //hmax *= 1.1; } glClearColor(backcolor, backcolor, backcolor, 1.0); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); SetLight(); glPushMatrix(); glMultMatrixd (transformationmat); SetClippingPlane (); glShadeModel (GL_SMOOTH); glDisable (GL_COLOR_MATERIAL); glPolygonMode (GL_FRONT_AND_BACK, GL_FILL); glEnable (GL_BLEND); glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); float mat_spec_col[] = { 1, 1, 1, 1 }; glMaterialfv (GL_FRONT_AND_BACK, GL_SPECULAR, mat_spec_col); double shine = vispar.shininess; // double transp = vispar.transp; glMaterialf (GL_FRONT_AND_BACK, GL_SHININESS, shine); glLogicOp (GL_COPY); float mat_colred[] = { 0.9f, 0.0f, 0.0f, 1.0f }; float mat_colgreen[] = { 0.0f, 0.9f, 0.0f, 1.0f }; float mat_colblue[] = { 0.1f, 0.1f, 1.0f, 1.0f }; float mat_colbluegreen[] = { 0.1f, 0.5f, 0.9f, 1.0f }; // float mat_colpink[] = { 1.0f, 0.1f, 0.5f, 1.0f }; float mat_colviolet[] = { 1.0f, 0.1f, 1.0f, 1.0f }; float mat_colbrown[] = { 0.8f, 0.6f, 0.1f, 1.0f }; // float mat_colorange[] = { 0.9f, 0.7f, 0.1f, 1.0f }; // float mat_colturquis[] = { 0.0f, 1.0f, 0.8f, 1.0f }; float mat_colgrey[] = { 0.3f, 0.3f, 0.3f, 1.0f }; float mat_collred[] = { 1.0f, 0.5f, 0.5f, 1.0f }; float mat_collgreen[] = { 0.2f, 1.9f, 0.2f, 1.0f }; float mat_collbrown[] = { 1.0f, 0.8f, 0.3f, 1.0f }; float mat_collgrey[] = { 0.8f, 0.8f, 0.8f, 1.0f }; // float mat_colmgrey[] = { 0.4f, 0.4f, 0.4f, 1.0f }; float mat_colstlbody[] = { 0.0f, 0.0f, 0.8f, 1.0f }; float mat_colseltrig[] = { 0.7f, 0.7f, 0.3f, 1.0f }; float mat_colseledge[] = { 0.7f, 0.7f, 1.0f, 1.0f }; glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_colblue); float pgoff = 0.5f; glPolygonOffset (pgoff*1, pgoff*1); glEnable (GL_POLYGON_OFFSET_FILL); glEnable (GL_NORMALIZE); /* { //mmm //test modeller Modeller model; //MoZylinder z1(Point3d(0,0,0),Vec3d(100,0,0),20,0.01); //model.Add(&z1); //MoZylinder z2(Point3d(50,50,0),Vec3d(0,-100,0),20,0.01); //model.Add(&z2); MoZylinder z1(Point3d(0,0,0),Vec3d(100,0,0),20,0.01); MoZylinder z2(Point3d(50,50,0),Vec3d(0,-100,0),20,0.01); MoCombine cb1(&z1,&z2); model.Add(&cb1); Array trigs; model.GetTriangles(trigs); int i, k; glBegin (GL_TRIANGLES); for (i = 1; i <= trigs.Size(); i++) { const MoTriangle & tria = trigs.Get(i); glNormal3f (tria.normal.X(), tria.normal.Y(), tria.normal.Z()); for (k = 0; k < 3; k++) { glVertex3f (tria.pts[k].X(), tria.pts[k].Y(), tria.pts[k].Z()); } } glEnd (); } */ if (!stlgeometry->trigsconverted) { glBegin (GL_TRIANGLES); for (j = 1; j <= stlgeometry -> GetNT(); j++) { /* if (j % 10 == seltria) glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_colred); */ const Vec3d & n = stlgeometry->GetTriangle(j).Normal(); glNormal3f (n.X(), n.Y(), n.Z()); /* const STLReadTriangle & tria = stlgeometry -> GetReadTriangle(j); glNormal3f (tria.normal.X(), tria.normal.Y(), tria.normal.Z()); */ for (k = 1; k <= 3; k++) { const Point3d & tp = stlgeometry->GetPoint(stlgeometry->GetTriangle(j).PNum(k)); glVertex3f (tp.X(), tp.Y(), tp.Z()); } /* if (j%10 == seltria) glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_colblue); */ } glEnd (); glDisable (GL_POLYGON_OFFSET_FILL); int showtrias = vispar.stlshowtrias; if (showtrias) { float mat_coll[] = { 0.2f, 0.2f, 0.2f, 1.f }; glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_coll); glPolygonMode (GL_FRONT_AND_BACK, GL_LINE); glEnable (GL_NORMALIZE); glBegin (GL_TRIANGLES); for (j = 1; j <= stlgeometry -> GetNT(); j++) { const Vec3d & n = stlgeometry->GetTriangle(j).Normal(); glNormal3f (n.X(), n.Y(), n.Z()); /* const STLReadTriangle & tria = stlgeometry -> GetReadTriangle(j); glNormal3f (tria.normal.X(), tria.normal.Y(), tria.normal.Z()); */ for (k = 1; k <= 3; k++) { const Point3d & tp = stlgeometry->GetPoint(stlgeometry->GetTriangle(j).PNum(k)); glVertex3f (tp.X(), tp.Y(), tp.Z()); } /* for (k = 0; k < 3; k++) { glVertex3f (tria.pts[k].X(), tria.pts[k].Y(), tria.pts[k].Z()); } */ } glEnd (); } } else { int showfilledtrias = vispar.stlshowfilledtrias; //(*mycout) << "in " << showfilledtrias << ", NT=" << stlgeometry -> GetNT() << endl; int chartnumber; if (vispar.stlshowmarktrias) chartnumber = vispar.stlchartnumber + vispar.stlchartnumberoffset; else chartnumber = stlgeometry->GetMeshChartNr(); if (showfilledtrias) { glPolygonMode (GL_FRONT_AND_BACK, GL_FILL); if (colormeshsize) glEnable (GL_COLOR_MATERIAL); glPolygonOffset (pgoff*4, pgoff*4); glEnable (GL_POLYGON_OFFSET_FILL); glEnable (GL_NORMALIZE); glBegin (GL_TRIANGLES); int selt = stlgeometry -> GetSelectTrig(); if (stldoctor.selectmode != 0) {selt = 0; } //do not show selected triangle!!!! glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_colstlbody); for (j = 1; j <= stlgeometry -> GetNT(); j++) { if (stldoctor.showvicinity && !stlgeometry->Vicinity(j)) {continue;} if (j == selt) { glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_colseltrig); } else if (j == selt+1) { glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_colstlbody); } const STLTriangle& st = stlgeometry -> GetTriangle(j); const Vec3d & n = stlgeometry->GetTriangle(j).Normal(); glNormal3f (n.X(), n.Y(), n.Z()); /* const STLReadTriangle& tria = stlgeometry -> GetReadTriangle(j); glNormal3f (tria.normal.X(), tria.normal.Y(), tria.normal.Z()); */ for (k = 0; k < 3; k++) { const Point3d & p = stlgeometry->GetPoint(st[k]); if (colormeshsize) { SetOpenGlColor (mesh->GetH (p), hmin, hmax, 1); } glVertex3f (p.X(), p.Y(), p.Z()); } } glEnd (); } int foundseltrig = stlgeometry -> GetSelectTrig(); if (foundseltrig == 0 || foundseltrig > stlgeometry->GetNT() || (stldoctor.showvicinity && !stlgeometry->Vicinity(foundseltrig))) {foundseltrig = 0;} if (foundseltrig) { glPolygonOffset (pgoff*0, 0); glEnable (GL_POLYGON_OFFSET_FILL); //glDisable (GL_POLYGON_OFFSET_FILL); glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_colseledge); glPolygonMode (GL_FRONT_AND_BACK, GL_LINE); glEnable (GL_NORMALIZE); if (stldoctor.selectmode == 2) { //point const STLTriangle& st = stlgeometry -> GetTriangle(foundseltrig); const Point3d & p1 = stlgeometry->GetPoint(st[0]); const Point3d & p2 = stlgeometry->GetPoint(st[1]); const Point3d & p3 = stlgeometry->GetPoint(st[2]); double cs = (Dist(p1,p2)+Dist(p2,p3)+Dist(p3,p1))/100.; const Point3d & p = stlgeometry->GetPoint(st[nodeofseltrig-1]); glLineWidth (4); glBegin (GL_LINES); glVertex3f(p.X()+cs, p.Y()+cs, p.Z()+cs); glVertex3f(p.X()-cs, p.Y()-cs, p.Z()-cs); glVertex3f(p.X()-cs, p.Y()+cs, p.Z()+cs); glVertex3f(p.X()+cs, p.Y()-cs, p.Z()-cs); glVertex3f(p.X()-cs, p.Y()+cs, p.Z()+cs); glVertex3f(p.X()+cs, p.Y()-cs, p.Z()-cs); glVertex3f(p.X()+cs, p.Y()-cs, p.Z()+cs); glVertex3f(p.X()-cs, p.Y()+cs, p.Z()-cs); glEnd (); glLineWidth (1); } else if (stldoctor.selectmode == 1 || stldoctor.selectmode == 3 || stldoctor.selectmode == 4) { //multiedge const Array& me = stlgeometry->SelectedMultiEdge(); if (stlgeometry->GetSelectTrig() > 0 && stlgeometry->GetSelectTrig() <= stlgeometry->GetNT() && me.Size()) { int en = stlgeometry->EdgeDataList().GetEdgeNum(me.Get(1).i1,me.Get(1).i2); int status = stlgeometry->EdgeDataList().Get(en).GetStatus(); switch (status) { case ED_CONFIRMED: glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_collgreen); break; case ED_CANDIDATE: glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_collbrown); break; case ED_EXCLUDED: glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_collred); break; } glLineWidth (2); glBegin (GL_LINES); for (j = 1; j <= me.Size(); j++) { Point3d p1 = stlgeometry->GetPoint(me.Get(j).i1); Point3d p2 = stlgeometry->GetPoint(me.Get(j).i2); glVertex3f(p1.X(), p1.Y(), p1.Z()); glVertex3f(p2.X(), p2.Y(), p2.Z()); } glEnd (); glLineWidth (1); } } } int showmarktrias = vispar.stlshowmarktrias || vispar.stlshowactivechart; if (stldoctor.showmarkedtrigs) { //(*mycout) << "marked" << endl; glPolygonMode (GL_FRONT_AND_BACK, GL_LINE); //GL_LINE glPolygonOffset (pgoff*1, pgoff*1); glEnable (GL_POLYGON_OFFSET_FILL); glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_colbluegreen); glEnable (GL_NORMALIZE); glBegin (GL_TRIANGLES); for (j = 1; j <= stlgeometry -> GetNT(); j++) { if (stldoctor.showvicinity && !stlgeometry->Vicinity(j)) {continue;} if (!stlgeometry->IsMarkedTrig(j)) {continue;} const STLTriangle& st = stlgeometry -> GetTriangle(j); const Vec3d & n = stlgeometry->GetTriangle(j).Normal(); glNormal3f (n.X(), n.Y(), n.Z()); /* const STLReadTriangle& tria = stlgeometry -> GetReadTriangle(j); glNormal3f (tria.normal.X(), tria.normal.Y(), tria.normal.Z()); */ for (k = 0; k < 3; k++) { const Point3d & p = stlgeometry->GetPoint(st[k]); glVertex3f (p.X(), p.Y(), p.Z()); } } glEnd (); //show OpenSegments on original geometry glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_colviolet); glPolygonMode (GL_FRONT_AND_BACK, GL_LINE); glPolygonOffset (pgoff*1, 1); glEnable (GL_NORMALIZE); glBegin (GL_LINES); if (stlgeometry->GetNMarkedSegs()) { Point<3> p1,p2; for (j = 1; j <= stlgeometry -> GetNMarkedSegs(); j++) { stlgeometry->GetMarkedSeg(j,p1,p2); glVertex3dv(&p1(0)); glVertex3dv(&p2(0)); } } glEnd (); } if (stldoctor.showfaces) { int facenumber = vispar.stlchartnumber + vispar.stlchartnumberoffset; glPolygonMode (GL_FRONT_AND_BACK, GL_FILL); glPolygonOffset (pgoff*3, 3); glEnable (GL_POLYGON_OFFSET_FILL); glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_collgrey); glEnable (GL_NORMALIZE); glBegin (GL_TRIANGLES); for (j = 1; j <= stlgeometry -> GetNT(); j++) { if (stldoctor.showvicinity && !stlgeometry->Vicinity(j)) {continue;} //(*mycout) << " facenum = " << stlgeometry->GetTriangle(j).GetFaceNum() << " "; if (stlgeometry->GetTriangle(j).GetFaceNum() != facenumber) {continue;} const STLTriangle& st = stlgeometry -> GetTriangle(j); const Vec3d & n = stlgeometry->GetTriangle(j).Normal(); glNormal3f (n.X(), n.Y(), n.Z()); /* const STLReadTriangle& tria = stlgeometry -> GetReadTriangle(j); glNormal3f (tria.normal.X(), tria.normal.Y(), tria.normal.Z()); */ for (k = 0; k < 3; k++) { Point3d p = stlgeometry->GetPoint(st[k]); glVertex3f (p.X(), p.Y(), p.Z()); } } glEnd (); } if (showmarktrias && stlgeometry->AtlasMade()) { glPolygonMode (GL_FRONT_AND_BACK, GL_FILL); glPolygonOffset (pgoff*3, 3); glEnable (GL_POLYGON_OFFSET_FILL); glBegin (GL_TRIANGLES); if (chartnumber >= 1 && chartnumber <= stlgeometry->GetNOCharts()) { glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_colbrown); const STLChart& chart = stlgeometry->GetChart(chartnumber); for (j = 1; j <= chart.GetNChartT(); j++) { /* if (j == charttrignumber) {glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_colred);} else {glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_colbrown);} */ const STLTriangle& st = stlgeometry -> GetTriangle(chart.GetChartTrig(j)); const Vec3d & n = stlgeometry->GetTriangle(chart.GetChartTrig(j)).Normal(); glNormal3f (n.X(), n.Y(), n.Z()); /* const STLReadTriangle& tria = stlgeometry -> GetReadTriangle(chart.GetChartTrig(j)); glNormal3f (tria.normal.X(), tria.normal.Y(), tria.normal.Z()); */ for (k = 0; k < 3; k++) { glVertex3f (stlgeometry->GetPoint(st[k])(0), stlgeometry->GetPoint(st[k])(1), stlgeometry->GetPoint(st[k])(2)); } } glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_colgreen); for (j = 1; j <= chart.GetNOuterT(); j++) { const STLTriangle& st = stlgeometry -> GetTriangle(chart.GetOuterTrig(j)); const Vec3d & n = stlgeometry->GetTriangle(chart.GetOuterTrig(j)).Normal(); glNormal3f (n.X(), n.Y(), n.Z()); /* const STLReadTriangle& tria = stlgeometry -> GetReadTriangle(chart.GetOuterTrig(j)); glNormal3f (tria.normal.X(), tria.normal.Y(), tria.normal.Z()); */ for (k = 0; k < 3; k++) { glVertex3f (stlgeometry->GetPoint(st[k])(0), stlgeometry->GetPoint(st[k])(1), stlgeometry->GetPoint(st[k])(2)); } } } glEnd (); } int showtrias = vispar.stlshowtrias; if (showtrias) { glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_colgrey); glPolygonMode (GL_FRONT_AND_BACK, GL_LINE); glPolygonOffset (pgoff*2, 2); glEnable (GL_POLYGON_OFFSET_FILL); glEnable (GL_NORMALIZE); glBegin (GL_TRIANGLES); for (j = 1; j <= stlgeometry -> GetNT(); j++) { if (stldoctor.showvicinity && !stlgeometry->Vicinity(j)) {continue;} const STLTriangle& st = stlgeometry -> GetTriangle(j); const Vec3d & n = stlgeometry->GetTriangle(j).Normal(); glNormal3f (n.X(), n.Y(), n.Z()); /* const STLReadTriangle& tria = stlgeometry -> GetReadTriangle(j); glNormal3f (tria.normal.X(), tria.normal.Y(), tria.normal.Z()); */ for (k = 0; k < 3; k++) { glVertex3f (stlgeometry->GetPoint(st[k])(0), stlgeometry->GetPoint(st[k])(1), stlgeometry->GetPoint(st[k])(2)); } } glEnd (); } int showedges = vispar.stlshowedges; if (showedges) { glPolygonOffset (pgoff*1, 1); glEnable (GL_POLYGON_OFFSET_FILL); //glDisable (GL_POLYGON_OFFSET_FILL); glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_colgreen); glPolygonMode (GL_FRONT_AND_BACK, GL_LINE); glEnable (GL_NORMALIZE); glBegin (GL_LINES); /* if (stldoctor.useexternaledges) { glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_colorange); for (j = 1; j <= stlgeometry -> NOExternalEdges(); j++) { twoint v = stlgeometry->GetExternalEdge(j); Point3d p1 = stlgeometry->GetPoint(v.i1); Point3d p2 = stlgeometry->GetPoint(v.i2); Vec3d n1 = stlgeometry->GetNormal(v.i1); Vec3d n2 = stlgeometry->GetNormal(v.i2); glNormal3f(n1.X(), n1.Y(), n1.Z()); glVertex3f(p1.X(), p1.Y(), p1.Z()); glNormal3f(n2.X(), n2.Y(), n2.Z()); glVertex3f(p2.X(), p2.Y(), p2.Z()); } } */ if (!stlgeometry->meshlines.Size() || !stldoctor.drawmeshededges) { /* for (j = 1; j <= stlgeometry -> GetNE(); j++) { STLEdge v = stlgeometry->GetEdge(j); Point3d p1 = stlgeometry->GetPoint(v.pts[0]); Point3d p2 = stlgeometry->GetPoint(v.pts[1]); Vec3d n1 = stlgeometry->GetNormal(v.pts[0]); Vec3d n2 = stlgeometry->GetNormal(v.pts[1]); glNormal3f(n1.X(), n1.Y(), n1.Z()); glVertex3f(p1.X(), p1.Y(), p1.Z()); glNormal3f(n2.X(), n2.Y(), n2.Z()); glVertex3f(p2.X(), p2.Y(), p2.Z()); } */ const STLEdgeDataList& ed = stlgeometry->EdgeDataList(); for (i = 1; i <= ed.Size(); i++) { if (ed.Get(i).GetStatus() != ED_UNDEFINED) { switch (ed.Get(i).GetStatus()) { case ED_CONFIRMED: glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_colgreen); break; case ED_CANDIDATE: glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_colbrown); break; case ED_EXCLUDED: glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_colred); break; } if (ed.Get(i).GetStatus() == ED_EXCLUDED && !stldoctor.showexcluded) continue; Point3d p1 = stlgeometry->GetPoint(ed.Get(i).PNum(1)); Point3d p2 = stlgeometry->GetPoint(ed.Get(i).PNum(2)); glVertex3f(p1.X(), p1.Y(), p1.Z()); glVertex3f(p2.X(), p2.Y(), p2.Z()); } } } /* else if (stlgeometry->meshlines.Size() == 0) { for (j = 1; j <= stlgeometry->GetNLines(); j++) { STLLine* line = stlgeometry->GetLine(j); int pn1, pn2; for (int k = 1; k <= line->NP()-1; k++) { pn1 = line->PNum(k); pn2 = line->PNum(k+1); Point3d p1 = stlgeometry->GetPoint(pn1); Point3d p2 = stlgeometry->GetPoint(pn2); Vec3d n1 = stlgeometry->GetNormal(pn1); Vec3d n2 = stlgeometry->GetNormal(pn2); glNormal3f(n1.X(), n1.Y(), n1.Z()); glVertex3f(p1.X(), p1.Y(), p1.Z()); glNormal3f(n2.X(), n2.Y(), n2.Z()); glVertex3f(p2.X(), p2.Y(), p2.Z()); } } } */ else if (stlgeometry->meshlines.Size() != 0) { glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_colgreen); for (j = 1; j <= stlgeometry->meshlines.Size(); j++) { STLLine* line = stlgeometry->meshlines.Get(j); int pn1, pn2; for (int k = 1; k <= line->NP()-1; k++) { pn1 = line->PNum(k); pn2 = line->PNum(k+1); Point3d p1 = stlgeometry->meshpoints.Get(pn1); Point3d p2 = stlgeometry->meshpoints.Get(pn2); glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_colgreen); glVertex3f(p1.X(), p1.Y(), p1.Z()); glVertex3f(p2.X(), p2.Y(), p2.Z()); glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_colred); double cs = 0.02*Dist(p1,p2); glVertex3f(p1.X()+cs, p1.Y()+cs, p1.Z()+cs); glVertex3f(p1.X()-cs, p1.Y()-cs, p1.Z()-cs); glVertex3f(p2.X()+cs, p2.Y()+cs, p2.Z()+cs); glVertex3f(p2.X()-cs, p2.Y()-cs, p2.Z()-cs); glVertex3f(p1.X()-cs, p1.Y()+cs, p1.Z()+cs); glVertex3f(p1.X()+cs, p1.Y()-cs, p1.Z()-cs); glVertex3f(p2.X()-cs, p2.Y()+cs, p2.Z()+cs); glVertex3f(p2.X()+cs, p2.Y()-cs, p2.Z()-cs); } } } glEnd (); } if (stldoctor.showedgecornerpoints && stlgeometry->LineEndPointsSet()) { glPointSize (5); glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_colred); glBegin (GL_POINTS); for (i = 1; i <= stlgeometry->GetNP(); i++) { if (stlgeometry->IsLineEndPoint(i)) { const Point3d p = stlgeometry->GetPoint(i); glVertex3f (p.X(), p.Y(), p.Z()); } } glEnd(); } } glPopMatrix(); if (vispar.colormeshsize) DrawColorBar (hmin, hmax, 1); glFinish(); } void VisualSceneSTLMeshing :: BuildScene (int zoomall) { if (selecttrig && zoomall == 2) center = stlgeometry -> GetPoint ( stlgeometry->GetTriangle(selecttrig).PNum(nodeofseltrig)); else center = stlgeometry -> GetBoundingBox().Center(); rad = stlgeometry -> GetBoundingBox().Diam() / 2; CalcTransformationMatrices(); } void VisualSceneSTLMeshing :: MouseDblClick (int px, int py) { // (*mycout) << "dblclick: " << px << " - " << py << endl; int i, j, k, hits; // select surface triangle by mouse click GLuint selbuf[10000]; glSelectBuffer (10000, selbuf); glRenderMode (GL_SELECT); GLint viewport[4]; glGetIntegerv (GL_VIEWPORT, viewport); /* (*mycout) << "viewport = " << viewport[0] << " " << viewport[1] << " " << viewport[2] << " " << viewport[3] << endl; */ glMatrixMode (GL_PROJECTION); glPushMatrix(); GLdouble projmat[16]; glGetDoublev (GL_PROJECTION_MATRIX, projmat); glLoadIdentity(); gluPickMatrix (px, viewport[3] - py, 1, 1, viewport); glMultMatrixd (projmat); glClearColor(backcolor, backcolor, backcolor, 1.0); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glMatrixMode (GL_MODELVIEW); glPushMatrix(); glMultMatrixd (transformationmat); glInitNames(); glPushName (1); glEnable (GL_POLYGON_OFFSET_FILL); for (j = 1; j <= stlgeometry -> GetNT(); j++) { if (stldoctor.showvicinity && !stlgeometry->Vicinity(j)) {continue;} const STLTriangle& st = stlgeometry -> GetTriangle(j); //const STLReadTriangle& tria = stlgeometry -> GetReadTriangle(j); //glNormal3f (tria.normal.X(), tria.normal.Y(), tria.normal.Z()); if (stldoctor.selectmode == 0) { glLoadName (j); glBegin (GL_TRIANGLES); for (k = 0; k < 3; k++) { Point3d p = stlgeometry->GetPoint(st[k]); glVertex3f (p.X(), p.Y(), p.Z()); } glEnd (); } else if (stldoctor.selectmode == 1 || stldoctor.selectmode == 3 || stldoctor.selectmode == 4) { Point3d pm = Center(stlgeometry->GetPoint(st[0]), stlgeometry->GetPoint(st[1]), stlgeometry->GetPoint(st[2])); for (k = 0; k < 3; k++) { glLoadName (j*3+k-2); glBegin (GL_TRIANGLES); Point3d p1 = stlgeometry->GetPoint(st[k]); Point3d p2 = stlgeometry->GetPoint(st[(k+1)%3]); glVertex3f (p1.X(), p1.Y(), p1.Z()); glVertex3f (p2.X(), p2.Y(), p2.Z()); glVertex3f (pm.X(), pm.Y(), pm.Z()); glEnd (); } } else { Point3d pm1 = Center(stlgeometry->GetPoint(st[0]), stlgeometry->GetPoint(st[1])); Point3d pm2 = Center(stlgeometry->GetPoint(st[1]), stlgeometry->GetPoint(st[2])); Point3d pm3 = Center(stlgeometry->GetPoint(st[2]), stlgeometry->GetPoint(st[0])); Point3d p1 = stlgeometry->GetPoint(st[0]); Point3d p2 = stlgeometry->GetPoint(st[1]); Point3d p3 = stlgeometry->GetPoint(st[2]); glLoadName (j*4-3); glBegin (GL_TRIANGLES); glVertex3f (p1.X(), p1.Y(), p1.Z()); glVertex3f (pm1.X(), pm1.Y(), pm1.Z()); glVertex3f (pm3.X(), pm3.Y(), pm3.Z()); glEnd (); glLoadName (j*4-2); glBegin (GL_TRIANGLES); glVertex3f (p2.X(), p2.Y(), p2.Z()); glVertex3f (pm2.X(), pm2.Y(), pm2.Z()); glVertex3f (pm1.X(), pm1.Y(), pm1.Z()); glEnd (); glLoadName (j*4-1); glBegin (GL_TRIANGLES); glVertex3f (p3.X(), p3.Y(), p3.Z()); glVertex3f (pm3.X(), pm3.Y(), pm3.Z()); glVertex3f (pm2.X(), pm2.Y(), pm2.Z()); glEnd (); glLoadName (j*4); glBegin (GL_TRIANGLES); glVertex3f (pm1.X(), pm1.Y(), pm1.Z()); glVertex3f (pm2.X(), pm2.Y(), pm2.Z()); glVertex3f (pm3.X(), pm3.Y(), pm3.Z()); glEnd (); } } glPopName(); glMatrixMode (GL_PROJECTION); glPopMatrix(); glMatrixMode (GL_MODELVIEW); glPopMatrix(); glFlush(); hits = glRenderMode (GL_RENDER); // (*mycout) << "hits = " << hits << endl; //int minrec = -1; int minname = 0; GLuint mindepth = 0; for (i = 0; i < hits; i++) { int curname = selbuf[4*i+3]; GLuint curdepth = selbuf[4*i+1]; /* (*mycout) << selbuf[4*i] << " " << selbuf[4*i+1] << " " << selbuf[4*i+2] << " " << selbuf[4*i+3] << endl; */ if (curname && (curdepth < mindepth || !minname)) { //minrec = i; mindepth = curdepth; minname = curname; } } if (!minname) {return;} if (stldoctor.selectmode == 0) { int oldtrig = selecttrig; selecttrig = minname; if (selecttrig == oldtrig) nodeofseltrig = (nodeofseltrig % 3) + 1; else nodeofseltrig = 1; stlgeometry->SetSelectTrig(selecttrig); stlgeometry->SetNodeOfSelTrig(nodeofseltrig); stlgeometry->PrintSelectInfo(); } else if (stldoctor.selectmode == 1 || stldoctor.selectmode == 3 || stldoctor.selectmode == 4) { selecttrig = (minname-1) / 3 + 1; nodeofseltrig = minname-selecttrig*3+3; stlgeometry->SetSelectTrig(selecttrig); stlgeometry->SetNodeOfSelTrig(nodeofseltrig); stlgeometry->PrintSelectInfo(); if (stldoctor.selectmode == 1) { stlgeometry->BuildSelectedEdge(twoint(stlgeometry->GetTriangle(selecttrig).PNumMod(nodeofseltrig), stlgeometry->GetTriangle(selecttrig).PNumMod(nodeofseltrig+1))); } if (stldoctor.selectmode == 3) { stlgeometry->BuildSelectedMultiEdge(twoint(stlgeometry->GetTriangle(selecttrig).PNumMod(nodeofseltrig), stlgeometry->GetTriangle(selecttrig).PNumMod(nodeofseltrig+1))); } else if (stldoctor.selectmode == 4) { stlgeometry->BuildSelectedCluster(twoint(stlgeometry->GetTriangle(selecttrig).PNumMod(nodeofseltrig), stlgeometry->GetTriangle(selecttrig).PNumMod(nodeofseltrig+1))); } switch (stldoctor.edgeselectmode) { case 1: stlgeometry->STLDoctorUndefinedEdge(); break; case 2: stlgeometry->STLDoctorConfirmEdge(); break; case 3: stlgeometry->STLDoctorCandidateEdge(); break; case 4: stlgeometry->STLDoctorExcludeEdge(); break; default: break; } } else if (stldoctor.selectmode == 2) { selecttrig = (minname-1) / 4 + 1; nodeofseltrig = minname-selecttrig*4+4; if (nodeofseltrig == 4) {nodeofseltrig = 1;} stlgeometry->SetSelectTrig(selecttrig); stlgeometry->SetNodeOfSelTrig(nodeofseltrig); stlgeometry->PrintSelectInfo(); } if (stldoctor.showtouchedtrigchart && stlgeometry->AtlasMade() && stlgeometry->GetSelectTrig()) { vispar.stlchartnumber = stlgeometry->GetChartNr(stlgeometry->GetSelectTrig()); vispar.stlchartnumberoffset = 0; } } // VisualSceneSTLMeshing vsstlmeshing; /* *********************** Draw STL Geometry **************** */ VisualSceneSTLGeometry :: VisualSceneSTLGeometry () : VisualScene() { ; } VisualSceneSTLGeometry :: ~VisualSceneSTLGeometry () { ; } void VisualSceneSTLGeometry :: DrawScene () { if (changeval != stlgeometry->GetNT()) BuildScene(); changeval = stlgeometry->GetNT(); glClearColor(backcolor, backcolor, backcolor, 1.0); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); SetLight(); glPushMatrix(); glMultMatrixd (transformationmat); glShadeModel (GL_SMOOTH); glDisable (GL_COLOR_MATERIAL); glPolygonMode (GL_FRONT_AND_BACK, GL_FILL); glEnable (GL_BLEND); glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); double shine = vispar.shininess; // double transp = vispar.transp; glMaterialf (GL_FRONT_AND_BACK, GL_SHININESS, shine); glLogicOp (GL_COPY); float mat_col[] = { 0.2f, 0.2f, 0.8f, 1.0f}; glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_col); glPolygonOffset (1, 1); glEnable (GL_POLYGON_OFFSET_FILL); glCallList (trilists.Get(1)); glDisable (GL_POLYGON_OFFSET_FILL); int showtrias = vispar.showstltrias; if (showtrias) { float mat_coll[] = { 0.2f, 0.2f, 0.2f, 1.0f }; glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_coll); glPolygonMode (GL_FRONT_AND_BACK, GL_LINE); glCallList (trilists.Get(1)); } /* glBegin (GL_TRIANGLES); for (j = 1; j <= stlgeometry -> GetNT(); j++) { const STLTriangle & tria = stlgeometry -> GetTriangle(j); glNormal3f (tria.normal.X(), tria.normal.Y(), tria.normal.Z()); for (k = 0; k < 3; k++) { glVertex3f (tria.pts[k].X(), tria.pts[k].Y(), tria.pts[k].Z()); } } glEnd (); */ glPopMatrix(); glFinish(); } void VisualSceneSTLGeometry :: BuildScene (int zoomall) { // cout << "rebuild stl geometry scene" << endl; center = stlgeometry -> GetBoundingBox().Center(); rad = stlgeometry -> GetBoundingBox().Diam() / 2; CalcTransformationMatrices(); for (int i = 1; i <= trilists.Size(); i++) glDeleteLists (trilists.Elem(i), 1); trilists.SetSize(0); trilists.Append (glGenLists (1)); glNewList (trilists.Last(), GL_COMPILE); glEnable (GL_NORMALIZE); glBegin (GL_TRIANGLES); for (int j = 1; j <= stlgeometry -> GetNT(); j++) { const Vec3d & n = stlgeometry->GetTriangle(j).Normal(); glNormal3f (n.X(), n.Y(), n.Z()); for (int k = 1; k <= 3; k++) { const Point3d & p = stlgeometry->GetPoint (stlgeometry -> GetTriangle(j).PNum(k)); glVertex3f (p.X(),p.Y(), p.Z()); } } glEnd (); glEndList (); } } #ifdef NG_PYTHON #ifdef WIN32 #define DLL_HEADER __declspec(dllexport) #endif #include <../general/ngpython.hpp> DLL_HEADER void ExportSTLVis(py::module &m) { using namespace netgen; py::class_> (m, "VisualSceneSTLGeometry") .def("Draw", &VisualSceneSTLGeometry::DrawScene) ; m.def("SetBackGroundColor", &VisualSceneSTLGeometry::SetBackGroundColor); m.def("VS", [](STLGeometry & geom) { auto vs = make_shared(); vs->SetGeometry(&geom); return vs; }); } PYBIND11_MODULE(libstlvis, m) { ExportSTLVis(m); } #endif netgen-6.2.1804/libsrc/stlgeom/stlgeomchart.cpp0000644000175000017500000005460213272137567020144 0ustar kurtkurt//20.11.1999 third part of stlgeom.cc, functions with chart and atlas #include #include #include #include #include #include "stlgeom.hpp" namespace netgen { int chartdebug = 0; void STLGeometry :: MakeAtlas(Mesh & mesh) { // int timer1 = NgProfiler::CreateTimer ("makeatlas"); /* int timerb = NgProfiler::CreateTimer ("makeatlas - begin"); int timere = NgProfiler::CreateTimer ("makeatlas - end"); int timere1 = NgProfiler::CreateTimer ("makeatlas - end1"); int timere2 = NgProfiler::CreateTimer ("makeatlas - end2"); int timer2 = NgProfiler::CreateTimer ("makeatlas - part 2"); int timer3 = NgProfiler::CreateTimer ("makeatlas - part 3"); int timer4 = NgProfiler::CreateTimer ("makeatlas - part 4"); int timer4a = NgProfiler::CreateTimer ("makeatlas - part 4a"); int timer4b = NgProfiler::CreateTimer ("makeatlas - part 4b"); int timer4c = NgProfiler::CreateTimer ("makeatlas - part 4c"); int timer4d = NgProfiler::CreateTimer ("makeatlas - part 4d"); int timer4e = NgProfiler::CreateTimer ("makeatlas - part 4e"); int timer5 = NgProfiler::CreateTimer ("makeatlas - part 5"); int timer5a = NgProfiler::CreateTimer ("makeatlas - part 5a"); int timer5b = NgProfiler::CreateTimer ("makeatlas - part 5b"); int timer5cs = NgProfiler::CreateTimer ("makeatlas - part 5cs"); int timer5cl = NgProfiler::CreateTimer ("makeatlas - part 5cl"); */ PushStatusF("Make Atlas"); double h = mparam.maxh; double atlasminh = 5e-3 * Dist (boundingbox.PMin(), boundingbox.PMax()); PrintMessage(5, "atlasminh = ", atlasminh); //speedup for make atlas if (GetNT() > 50000) mesh.SetGlobalH(min2 (0.05*Dist (boundingbox.PMin(), boundingbox.PMax()), mparam.maxh)); atlas.SetSize(0); ClearSpiralPoints(); BuildSmoothEdges(); // NgProfiler::StartTimer (timer1); double chartangle = stlparam.chartangle; double outerchartangle = stlparam.outerchartangle; chartangle = chartangle/180.*M_PI; outerchartangle = outerchartangle/180.*M_PI; double coschartangle = cos(chartangle); double cosouterchartangle = cos(outerchartangle); double cosouterchartanglehalf = cos(0.5*outerchartangle); double sinchartangle = sin(chartangle); double sinouterchartangle = sin(outerchartangle); Array outermark(GetNT()); //marks all trigs form actual outer region Array outertested(GetNT()); //marks tested trigs for outer region Array pointstochart(GetNP()); //point in chart becomes chartnum Array innerpointstochart(GetNP()); //point in chart becomes chartnum Array chartpoints; //point in chart becomes chartnum Array innerchartpoints; Array> innerchartpts; Array dirtycharttrigs; Array chartdistacttrigs (GetNT()); //outercharttrigs chartdistacttrigs = 0; STLBoundary chartbound(this); //knows the actual chart boundary //int chartboundarydivisions = 10; markedsegs.SetSize(0); //for testing!!! Array chartpointchecked(GetNP()); //for dirty-chart-trigs pointstochart.SetSize(GetNP()); innerpointstochart.SetSize(GetNP()); chartmark.SetSize(GetNT()); for (int i = 1; i <= GetNP(); i++) { innerpointstochart.Elem(i) = 0; pointstochart.Elem(i) = 0; chartpointchecked.Elem(i) = 0; } double eps = 1e-12 * Dist (boundingbox.PMin(), boundingbox.PMax()); int spiralcheckon = stldoctor.spiralcheck; if (!spiralcheckon) {PrintWarning("++++++++++++\nspiral deactivated by user!!!!\n+++++++++++++++"); } chartmark = 0; outermark = 0; outertested = 0; double atlasarea = Area(); double workedarea = 0; double showinc = 100.*5000./(double)GetNT(); double nextshow = 0; // Point<3> startp; int lastunmarked = 1; PrintMessage(5,"one dot per 5000 triangles: "); int markedtrigcnt = 0; while (markedtrigcnt < GetNT()) { if (multithread.terminate) { PopStatus(); return; } // NgProfiler::StartTimer (timerb); if (workedarea / atlasarea*100. >= nextshow) {PrintDot(); nextshow+=showinc;} SetThreadPercent(100.0 * workedarea / atlasarea); STLChart * chart = new STLChart(this); atlas.Append(chart); // *testout << "Chart " << atlas.Size() << endl; //find unmarked trig int prelastunmarked = lastunmarked; bool found = false; for (int j = lastunmarked; j <= GetNT(); j++) if (!GetMarker(j)) { found = true; lastunmarked = j; break; } chartpoints.SetSize(0); innerchartpoints.SetSize(0); innerchartpts.SetSize(0); chartbound.Clear(); chartbound.SetChart(chart); chartbound.BuildSearchTree(); // different !!! if (!found) { PrintSysError("Make Atlas, no starttrig found"); return; } //find surrounding trigs // int starttrig = j; int starttrig = lastunmarked; Point<3> startp = GetPoint(GetTriangle(starttrig).PNum(1)); int accepted; int chartnum = GetNOCharts(); Vec<3> sn = GetTriangle(starttrig).Normal(); chart->SetNormal (startp, sn); // *testout << "first trig " << starttrig << ", n = " << sn << endl; SetMarker(starttrig, chartnum); markedtrigcnt++; chart->AddChartTrig(starttrig); chartbound.AddTriangle(GetTriangle(starttrig)); workedarea += GetTriangle(starttrig).Area(points); for (int i = 1; i <= 3; i++) { innerpointstochart.Elem(GetTriangle(starttrig).PNum(i)) = chartnum; pointstochart.Elem(GetTriangle(starttrig).PNum(i)) = chartnum; chartpoints.Append(GetTriangle(starttrig).PNum(i)); innerchartpoints.Append(GetTriangle(starttrig).PNum(i)); } bool changed = true; int oldstartic = 1; int oldstartic2; // NgProfiler::StopTimer (timerb); // NgProfiler::StartTimer (timer2); while (changed) { changed = false; oldstartic2 = oldstartic; oldstartic = chart->GetNT(); // for (ic = oldstartic2; ic <= chart->GetNT(); ic++) for (int ic = oldstartic2; ic <= oldstartic; ic++) { int i = chart->GetTrig(ic); if (GetMarker(i) == chartnum) { for (int j = 1; j <= NONeighbourTrigs(i); j++) { int nt = NeighbourTrig(i,j); // *testout << "check trig " << nt << endl; int np1, np2; GetTriangle(i).GetNeighbourPoints(GetTriangle(nt),np1,np2); if (GetMarker(nt) == 0 && !IsEdge(np1,np2)) { Vec<3> n2 = GetTriangle(nt).Normal(); // *testout << "acos = " << 180/M_PI*acos (n2*sn) << endl; if ( (n2 * sn) >= coschartangle ) { // *testout << "good angle " << endl; accepted = 1; /* //alter spiralentest, schnell, aber ungenau for (k = 1; k <= 3; k++) { //find overlapping charts: Point3d pt = GetPoint(GetTriangle(nt).PNum(k)); if (innerpointstochart.Get(GetTriangle(nt).PNum(k)) != chartnum) { for (l = 1; l <= chartpoints.Size(); l++) { Vec3d vptpl(GetPoint(chartpoints.Get(l)), pt); double vlen = vptpl.Length(); if (vlen > 0) { vptpl /= vlen; if ( fabs( vptpl * sn) > sinchartangle ) { accepted = 0; break; } } } } } */ //find overlapping charts exacter (fast, too): for (int k = 1; k <= 3; k++) { int nnt = NeighbourTrig(nt,k); if (GetMarker(nnt) != chartnum) { int nnp1, nnp2; GetTriangle(nt).GetNeighbourPoints(GetTriangle(nnt),nnp1,nnp2); accepted = chartbound.TestSeg(GetPoint(nnp1), GetPoint(nnp2), sn,sinchartangle,1 /*chartboundarydivisions*/ ,points, eps); // if (!accepted) *testout << "not acc due to testseg" << endl; Vec<3> n3 = GetTriangle(nnt).Normal(); if ( (n3 * sn) >= coschartangle && IsSmoothEdge (nnp1, nnp2) ) accepted = 1; } if (!accepted) break; } if (accepted) { // *testout << "trig accepted" << endl; SetMarker(nt, chartnum); changed = true; markedtrigcnt++; workedarea += GetTriangle(nt).Area(points); chart->AddChartTrig(nt); chartbound.AddTriangle(GetTriangle(nt)); for (int k = 1; k <= 3; k++) { if (innerpointstochart.Get(GetTriangle(nt).PNum(k)) != chartnum) { innerpointstochart.Elem(GetTriangle(nt).PNum(k)) = chartnum; pointstochart.Elem(GetTriangle(nt).PNum(k)) = chartnum; chartpoints.Append(GetTriangle(nt).PNum(k)); innerchartpoints.Append(GetTriangle(nt).PNum(k)); } } } } } } } } } innerchartpts.SetSize(innerchartpoints.Size()); for (size_t i = 0; i < innerchartpoints.Size(); i++) innerchartpts[i] = GetPoint(innerchartpoints[i]); // chartbound.BuildSearchTree(); // different !!! // NgProfiler::StopTimer (timer2); // NgProfiler::StartTimer (timer3); //find outertrigs // chartbound.Clear(); // warum, ic-bound auf edge macht Probleme js ??? outermark.Elem(starttrig) = chartnum; //chart->AddOuterTrig(starttrig); changed = true; oldstartic = 1; while (changed) { changed = false; oldstartic2 = oldstartic; oldstartic = chart->GetNT(); for (int ic = oldstartic2; ic <= oldstartic; ic++) { int i = chart->GetTrig(ic); if (outermark.Get(i) != chartnum) continue; for (int j = 1; j <= NONeighbourTrigs(i); j++) { int nt = NeighbourTrig(i,j); if (outermark.Get(nt) == chartnum) continue; const STLTriangle & ntrig = GetTriangle(nt); int np1, np2; GetTriangle(i).GetNeighbourPoints(GetTriangle(nt),np1,np2); if (IsEdge (np1, np2)) continue; /* if (outertested.Get(nt) == chartnum) continue; */ outertested.Elem(nt) = chartnum; Vec<3> n2 = GetTriangle(nt).Normal(); //abfragen, ob noch im tolerierten Winkel if ( (n2 * sn) >= cosouterchartangle ) { accepted = 1; // NgProfiler::StartTimer (timer4); bool isdirtytrig = false; Vec<3> gn = GetTriangle(nt).GeomNormal(points); double gnlen = gn.Length(); if (n2 * gn <= cosouterchartanglehalf * gnlen) isdirtytrig = true; //zurueckweisen, falls eine Spiralartige outerchart entsteht //find overlapping charts exacter: //do not check dirty trigs! // NgProfiler::StartTimer (timer4a); if (spiralcheckon && !isdirtytrig) for (int k = 1; k <= 3; k++) { // NgProfiler::StartTimer (timer4b); int nnt = NeighbourTrig(nt,k); if (outermark.Elem(nnt) != chartnum) { // NgProfiler::StartTimer (timer4c); int nnp1, nnp2; GetTriangle(nt).GetNeighbourPoints(GetTriangle(nnt),nnp1,nnp2); // NgProfiler::StopTimer (timer4c); // NgProfiler::StartTimer (timer4d); accepted = chartbound.TestSeg(GetPoint(nnp1),GetPoint(nnp2), sn,sinouterchartangle, 0 /*chartboundarydivisions*/ ,points, eps); // NgProfiler::StopTimer (timer4d); // NgProfiler::StartTimer (timer4e); Vec<3> n3 = GetTriangle(nnt).Normal(); if ( (n3 * sn) >= cosouterchartangle && IsSmoothEdge (nnp1, nnp2) ) accepted = 1; // NgProfiler::StopTimer (timer4e); } // NgProfiler::StopTimer (timer4b); if (!accepted) break; } // NgProfiler::StopTimer (timer4a); // NgProfiler::StopTimer (timer4); // NgProfiler::RegionTimer reg5(timer5); // outer chart is only small environment of // inner chart: if (accepted) { // NgProfiler::StartTimer (timer5a); accepted = 0; for (int k = 1; k <= 3; k++) if (innerpointstochart.Get(ntrig.PNum(k)) == chartnum) { accepted = 1; break; } // NgProfiler::StopTimer (timer5a); // int timer5csl = (innerchartpts.Size() < 100) ? timer5cs : timer5cl; // NgProfiler::StartTimer (timer5csl); if (!accepted) for (int k = 1; k <= 3; k++) { Point<3> pt = GetPoint(ntrig.PNum(k)); double h2 = sqr(mesh.GetH(pt)); /* for (int l = 1; l <= innerchartpoints.Size(); l++) { double tdist = Dist2(pt, GetPoint (innerchartpoints.Get(l))); if (tdist < 4 * h2) { accepted = 1; break; } } */ for (int l = 0; l < innerchartpts.Size(); l++) { double tdist = Dist2(pt, innerchartpts[l]); if (tdist < 4 * h2) { accepted = 1; break; } } if (accepted) break; } // NgProfiler::StopTimer (timer5csl); } // NgProfiler::StartTimer (timer5b); if (accepted) { changed = true; outermark.Elem(nt) = chartnum; if (GetMarker(nt) != chartnum) { chartbound.AddTriangle(GetTriangle(nt)); chart->AddOuterTrig(nt); for (int k = 1; k <= 3; k++) { if (pointstochart.Get(GetTriangle(nt).PNum(k)) != chartnum) { pointstochart.Elem(GetTriangle(nt).PNum(k)) = chartnum; chartpoints.Append(GetTriangle(nt).PNum(k)); } } } } // NgProfiler::StopTimer (timer5b); } } } } // NgProfiler::StopTimer (timer3); // NgProfiler::StartTimer (timere); // NgProfiler::StartTimer (timere1); //end of while loop for outer chart GetDirtyChartTrigs(chartnum, *chart, outermark, chartpointchecked, dirtycharttrigs); //dirtycharttrigs are local (chart) point numbers!!!!!!!!!!!!!!!! if (dirtycharttrigs.Size() != 0 && (dirtycharttrigs.Size() != chart->GetNChartT() || dirtycharttrigs.Size() != 1)) { if (dirtycharttrigs.Size() == chart->GetNChartT() && dirtycharttrigs.Size() != 1) { //if all trigs would be eliminated -> leave 1 trig! dirtycharttrigs.SetSize(dirtycharttrigs.Size() - 1); } for (int k = 1; k <= dirtycharttrigs.Size(); k++) { int tn = chart->GetChartTrig(dirtycharttrigs.Get(k)); outermark.Elem(tn) = 0; //not necessary, for later use SetMarker(tn, 0); markedtrigcnt--; workedarea -= GetTriangle(tn).Area(points); } chart->MoveToOuterChart(dirtycharttrigs); lastunmarked = 1; lastunmarked = prelastunmarked; } chartbound.DeleteSearchTree(); // NgProfiler::StopTimer (timere1); // NgProfiler::StartTimer (timere2); // cout << "key" << endl; // char key; // cin >> key; //calculate an estimate meshsize, not to produce too large outercharts, with factor 2 larger! RestrictHChartDistOneChart(chartnum, chartdistacttrigs, mesh, h, 0.5, atlasminh); // NgProfiler::Print(stdout); // NgProfiler::StopTimer (timere2); // NgProfiler::StopTimer (timere); } // NgProfiler::StopTimer (timer1); // NgProfiler::Print(stdout); PrintMessage(5,""); PrintMessage(5,"NO charts=", atlas.Size()); int cnttrias = 0; outerchartspertrig.SetSize(GetNT()); for (int i = 1; i <= atlas.Size(); i++) { for (int j = 1; j <= GetChart(i).GetNT(); j++) { int tn = GetChart(i).GetTrig(j); AddOCPT(tn,i); } cnttrias += GetChart(i).GetNT(); } PrintMessage(5, "NO outer chart trias=", cnttrias); //sort outerchartspertrig for (int i = 1; i <= GetNT(); i++) { for (int k = 1; k < GetNOCPT(i); k++) for (int j = 1; j < GetNOCPT(i); j++) { int swap = GetOCPT(i,j); if (GetOCPT(i,j+1) < swap) { SetOCPT(i,j,GetOCPT(i,j+1)); SetOCPT(i,j+1,swap); } } // check make atlas if (GetChartNr(i) <= 0 || GetChartNr(i) > GetNOCharts()) PrintSysError("Make Atlas: chartnr(", i, ")=0!!"); } mesh.SetGlobalH(mparam.maxh); mesh.SetMinimalH(mparam.minh); AddConeAndSpiralEdges(); PrintMessage(5,"Make Atlas finished"); PopStatus(); } int STLGeometry::TrigIsInOC(int tn, int ocn) const { if (tn < 1 || tn > GetNT()) { // assert (1); abort (); PrintSysError("STLGeometry::TrigIsInOC illegal tn: ", tn); return 0; } /* int firstval = 0; int i; for (i = 1; i <= GetNOCPT(tn); i++) { if (GetOCPT(tn, i) == ocn) {firstval = 1;} } */ int found = 0; int inc = 1; while (inc <= GetNOCPT(tn)) {inc *= 2;} inc /= 2; int start = inc; while (!found && inc > 0) { if (GetOCPT(tn,start) > ocn) {inc = inc/2; start -= inc;} else if (GetOCPT(tn,start) < ocn) {inc = inc/2; if (start+inc <= GetNOCPT(tn)) {start += inc;}} else {found = 1;} } return GetOCPT(tn, start) == ocn; } int STLGeometry :: GetChartNr(int i) const { if (i > chartmark.Size()) { PrintSysError("GetChartNr(", i, ") not possible!!!"); i = 1; } return chartmark.Get(i); } /* int STLGeometry :: GetMarker(int i) const { return chartmark.Get(i); } */ void STLGeometry :: SetMarker(int nr, int m) { chartmark.Elem(nr) = m; } int STLGeometry :: GetNOCharts() const { return atlas.Size(); } const STLChart& STLGeometry :: GetChart(int nr) const { if (nr > atlas.Size()) { PrintSysError("GetChart(", nr, ") not possible!!!"); nr = 1; } return *(atlas.Get(nr)); } int STLGeometry :: AtlasMade() const { return chartmark.Size() != 0; } /* //return 1 if not exists int AddIfNotExists(Array& list, int x) { int i; for (i = 1; i <= list.Size(); i++) { if (list.Get(i) == x) {return 0;} } list.Append(x); return 1; } */ void STLGeometry :: GetInnerChartLimes(Array& limes, int chartnum) { int j, k; int t, nt, np1, np2; limes.SetSize(0); STLChart& chart = GetChart(chartnum); for (j = 1; j <= chart.GetNChartT(); j++) { t = chart.GetChartTrig(j); const STLTriangle& tt = GetTriangle(t); for (k = 1; k <= 3; k++) { nt = NeighbourTrig(t,k); if (GetChartNr(nt) != chartnum) { tt.GetNeighbourPoints(GetTriangle(nt),np1,np2); if (!IsEdge(np1,np2)) { limes.Append(twoint(np1,np2)); /* p3p1 = GetPoint(np1); p3p2 = GetPoint(np2); if (AddIfNotExists(limes,np1)) { plimes1.Append(p3p1); //plimes1trigs.Append(t); //plimes1origin.Append(np1); } if (AddIfNotExists(limes1,np2)) { plimes1.Append(p3p2); //plimes1trigs.Append(t); //plimes1origin.Append(np2); } //chart.AddILimit(twoint(np1,np2)); for (int di = 1; di <= divisions; di++) { double f1 = (double)di/(double)(divisions+1.); double f2 = (divisions+1.-(double)di)/(double)(divisions+1.); plimes1.Append(Point3d(p3p1.X()*f1+p3p2.X()*f2, p3p1.Y()*f1+p3p2.Y()*f2, p3p1.Z()*f1+p3p2.Z()*f2)); //plimes1trigs.Append(t); //plimes1origin.Append(0); } */ } } } } } void STLGeometry :: GetDirtyChartTrigs(int chartnum, STLChart& chart, const Array& outercharttrigs, Array& chartpointchecked, Array& dirtytrigs) { dirtytrigs.SetSize(0); int j,k,n; int np1, np2, nt; int cnt = 0; for (j = 1; j <= chart.GetNChartT(); j++) { int t = chart.GetChartTrig(j); const STLTriangle& tt = GetTriangle(t); for (k = 1; k <= 3; k++) { nt = NeighbourTrig(t,k); if (GetChartNr(nt) != chartnum && outercharttrigs.Get(nt) != chartnum) { tt.GetNeighbourPoints(GetTriangle(nt),np1,np2); if (!IsEdge(np1,np2)) { dirtytrigs.Append(j); //local numbers!!! cnt++; break; //only once per trig!!! } } } } cnt = 0; int ap1, ap2, tn1, tn2, l, problem, pn; Array trigsaroundp; for (j = chart.GetNChartT(); j >= 1; j--) { int t = chart.GetChartTrig(j); const STLTriangle& tt = GetTriangle(t); for (k = 1; k <= 3; k++) { pn = tt.PNum(k); //if (chartpointchecked.Get(pn) == chartnum) //{continue;} int checkpoint = 0; for (n = 1; n <= trigsperpoint.EntrySize(pn); n++) { if (trigsperpoint.Get(pn,n) != t && //ueberfluessig??? GetChartNr(trigsperpoint.Get(pn,n)) != chartnum && outercharttrigs.Get(trigsperpoint.Get(pn,n)) != chartnum) {checkpoint = 1;}; } if (checkpoint) { chartpointchecked.Elem(pn) = chartnum; GetSortedTrianglesAroundPoint(pn,t,trigsaroundp); trigsaroundp.Append(t); //ring problem = 0; //forward: for (l = 2; l <= trigsaroundp.Size()-1; l++) { tn1 = trigsaroundp.Get(l-1); tn2 = trigsaroundp.Get(l); const STLTriangle& t1 = GetTriangle(tn1); const STLTriangle& t2 = GetTriangle(tn2); t1.GetNeighbourPoints(t2, ap1, ap2); if (IsEdge(ap1,ap2)) break; if (GetChartNr(tn2) != chartnum && outercharttrigs.Get(tn2) != chartnum) {problem = 1;} } //backwards: for (l = trigsaroundp.Size()-1; l >= 2; l--) { tn1 = trigsaroundp.Get(l+1); tn2 = trigsaroundp.Get(l); const STLTriangle& t1 = GetTriangle(tn1); const STLTriangle& t2 = GetTriangle(tn2); t1.GetNeighbourPoints(t2, ap1, ap2); if (IsEdge(ap1,ap2)) break; if (GetChartNr(tn2) != chartnum && outercharttrigs.Get(tn2) != chartnum) {problem = 1;} } if (problem && !IsInArray(j,dirtytrigs)) { dirtytrigs.Append(j); cnt++; break; //only once per triangle } } } } } } netgen-6.2.1804/libsrc/stlgeom/CMakeLists.txt0000644000175000017500000000140513272137567017475 0ustar kurtkurtadd_library(stl ${NG_LIB_TYPE} meshstlsurface.cpp stlgeom.cpp stlgeomchart.cpp stlgeommesh.cpp stlline.cpp stltool.cpp stltopology.cpp python_stl.cpp ) if(NOT WIN32) target_link_libraries( stl mesh ${PYTHON_LIBRARIES}) target_link_libraries( stl ${PYTHON_LIBRARIES}) install( TARGETS stl ${NG_INSTALL_DIR}) endif(NOT WIN32) if(USE_GUI) add_library(stlvis ${NG_LIB_TYPE} vsstl.cpp ) if(NOT WIN32) target_link_libraries( stlvis stl ) install( TARGETS stlvis ${NG_INSTALL_DIR}) endif(NOT WIN32) endif(USE_GUI) install(FILES meshstlsurface.hpp stlgeom.hpp stlline.hpp stltool.hpp stltopology.hpp vsstl.hpp DESTINATION ${NG_INSTALL_DIR_INCLUDE}/stlgeom COMPONENT netgen_devel ) netgen-6.2.1804/libsrc/stlgeom/stlgeom.cpp0000644000175000017500000023242513272137567017123 0ustar kurtkurt#include #include "stlgeom.hpp" namespace netgen { //globalen searchtree fuer gesamte geometry aktivieren int geomsearchtreeon = 0; int usechartnormal = 1; //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ void STLMeshing (STLGeometry & geom, Mesh & mesh) { geom.Clear(); geom.BuildEdges(); geom.MakeAtlas(mesh); if (multithread.terminate) { return; } geom.CalcFaceNums(); geom.AddFaceEdges(); geom.LinkEdges(); mesh.ClearFaceDescriptors(); for (int i = 1; i <= geom.GetNOFaces(); i++) mesh.AddFaceDescriptor (FaceDescriptor (i, 1, 0, 0)); } //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ //+++++++++++++++++++ STL GEOMETRY ++++++++++++++++++++++++++++ //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ STLGeometry :: STLGeometry() /* : edges(), edgesperpoint(), normals(), externaledges(), atlas(), chartmark(), lines(), outerchartspertrig(), vicinity(), markedtrigs(), markedsegs(), lineendpoints(), spiralpoints(), selectedmultiedge() */ { ref = NULL; edgedata = new STLEdgeDataList(*this); externaledges.SetSize(0); Clear(); meshchart = 0; // initialize all ?? JS if (geomsearchtreeon) searchtree = new BoxTree<3> (GetBoundingBox().PMin() - Vec3d(1,1,1), GetBoundingBox().PMax() + Vec3d(1,1,1)); else searchtree = NULL; status = STL_GOOD; statustext = "Good Geometry"; smoothedges = NULL; area = -1; } STLGeometry :: ~STLGeometry() { delete edgedata; delete ref; } void STLGeometry :: Save (string filename) const { const char * cfilename = filename.c_str(); if (strlen(cfilename) < 4) throw NgException ("illegal filename"); if (strlen(cfilename) > 3 && strcmp (&cfilename[strlen(cfilename)-3], "stl") == 0) { STLTopology::Save (cfilename); } else if (strlen(cfilename) > 4 && strcmp (&cfilename[strlen(cfilename)-4], "stlb") == 0) { SaveBinary (cfilename,"Binary STL Geometry"); } else if (strlen(cfilename) > 4 && strcmp (&cfilename[strlen(cfilename)-4], "stle") == 0) { SaveSTLE (cfilename); } } int STLGeometry :: GenerateMesh (shared_ptr & mesh, MeshingParameters & mparam) { return STLMeshingDummy (this, mesh, mparam); } const Refinement & STLGeometry :: GetRefinement () const { delete ref; ref = new RefinementSTLGeometry(*this); // ref -> Set2dOptimizer(new MeshOptimizeSTLSurface(*this)); ??? copied from CSG return *ref; } void STLGeometry :: STLInfo(double* data) { data[0] = GetNT(); Box<3> b = GetBoundingBox(); data[1] = b.PMin()(0); data[2] = b.PMax()(0); data[3] = b.PMin()(1); data[4] = b.PMax()(1); data[5] = b.PMin()(2); data[6] = b.PMax()(2); int i; int cons = 1; for (i = 1; i <= GetNT(); i++) { if (NONeighbourTrigs(i) != 3) {cons = 0;} } data[7] = cons; } void STLGeometry :: MarkNonSmoothNormals() { PrintFnStart("Mark Non-Smooth Normals"); int i,j; markedtrigs.SetSize(GetNT()); for (i = 1; i <= GetNT(); i++) { SetMarkedTrig(i, 0); } double dirtyangle = stlparam.yangle/180.*M_PI; int cnt = 0; int lp1,lp2; for (i = 1; i <= GetNT(); i++) { for (j = 1; j <= NONeighbourTrigs(i); j++) { if (GetAngle(i, NeighbourTrig(i,j)) > dirtyangle) { GetTriangle(i).GetNeighbourPoints(GetTriangle(NeighbourTrig(i,j)), lp1, lp2); if (!IsEdge(lp1,lp2)) { if (!IsMarkedTrig(i)) {SetMarkedTrig(i,1); cnt++;} } } } } PrintMessage(5,"marked ",cnt," non-smooth trig-normals"); } void STLGeometry :: SmoothNormals() { multithread.terminate = 0; // UseExternalEdges(); BuildEdges(); DenseMatrix m(3), hm(3); Vector rhs(3), sol(3), hv(3), hv2(3); Vec<3> ri; double wnb = stldoctor.smoothnormalsweight; // neighbour normal weight double wgeom = 1-wnb; // geometry normal weight // minimize // wgeom sum_T \sum ri \| ri^T (n - n_geom) \|^2 // + wnb sum_SE \| ri x (n - n_nb) \|^2 int i, j, k, l; int nt = GetNT(); PushStatusF("Smooth Normals"); //int testmode; for (i = 1; i <= nt; i++) { SetThreadPercent( 100.0 * (double)i / (double)nt); const STLTriangle & trig = GetTriangle (i); m = 0; rhs = 0; // normal of geometry: Vec<3> ngeom = trig.GeomNormal(points); ngeom.Normalize(); for (j = 1; j <= 3; j++) { int pi1 = trig.PNumMod (j); int pi2 = trig.PNumMod (j+1); // edge vector ri = GetPoint (pi2) - GetPoint (pi1); for (k = 0; k < 3; k++) for (l = 0; l < 3; l++) hm.Elem(k+1, l+1) = wgeom * ri(k) * ri(l); for (k = 0; k < 3; k++) hv(k) = ngeom(k); hm.Mult (hv, hv2); /* if (testmode) (*testout) << "add vec " << hv2 << endl << " add m " << hm << endl; */ rhs.Add (1, hv2); m += hm; int nbt = 0; int fp1,fp2; for (k = 1; k <= NONeighbourTrigs(i); k++) { trig.GetNeighbourPoints(GetTriangle(NeighbourTrig(i, k)),fp1,fp2); if (fp1 == pi1 && fp2 == pi2) { nbt = NeighbourTrig(i, k); } } if (!nbt) { cerr << "ERROR: stlgeom::Smoothnormals, nbt = 0" << endl; } // smoothed normal Vec<3> nnb = GetTriangle(nbt).Normal(); // neighbour normal nnb.Normalize(); if (!IsEdge(pi1,pi2)) { double lr2 = ri * ri; for (k = 0; k < 3; k++) { for (l = 0; l < k; l++) { hm.Elem(k+1, l+1) = -wnb * ri(k) * ri(l); hm.Elem(l+1, k+1) = -wnb * ri(k) * ri(l); } hm.Elem(k+1, k+1) = wnb * (lr2 - ri(k) * ri(k)); } for (k = 0; k < 3; k++) hv(k) = nnb(k); hm.Mult (hv, hv2); /* if (testmode) (*testout) << "add nb vec " << hv2 << endl << " add nb m " << hm << endl; */ rhs.Add (1, hv2); m += hm; } } m.Solve (rhs, sol); Vec3d newn(sol(0), sol(1), sol(2)); newn /= (newn.Length() + 1e-24); GetTriangle(i).SetNormal(newn); // setnormal (sol); } /* for (i = 1; i <= nt; i++) SetMarkedTrig(i, 0); int crloop; for (crloop = 1; crloop <= 3; crloop++) { // find critical: Array critpairs; for (i = 1; i <= nt; i++) { const STLTriangle & trig = GetTriangle (i); Vec3d ngeom = GetTriangleNormal (i); // trig.Normal(points); ngeom /= (ngeom.Length() + 1e-24); for (j = 1; j <= 3; j++) { int pi1 = trig.PNumMod (j); int pi2 = trig.PNumMod (j+1); int nbt = 0; int fp1,fp2; for (k = 1; k <= NONeighbourTrigs(i); k++) { trig.GetNeighbourPoints(GetTriangle(NeighbourTrig(i, k)),fp1,fp2); if (fp1 == pi1 && fp2 == pi2) { nbt = NeighbourTrig(i, k); } } if (!nbt) { cerr << "ERROR: stlgeom::Smoothnormals, nbt = 0" << endl; } Vec3d nnb = GetTriangleNormal(nbt); // neighbour normal nnb /= (nnb.Length() + 1e-24); if (!IsEdge(pi1,pi2)) { if (Angle (nnb, ngeom) > 150 * M_PI/180) { SetMarkedTrig(i, 1); SetMarkedTrig(nbt, 1); critpairs.Append (INDEX_2 (i, nbt)); } } } } if (!critpairs.Size()) { break; } if (critpairs.Size()) { Array friends; double area1 = 0, area2 = 0; for (i = 1; i <= critpairs.Size(); i++) { int tnr1 = critpairs.Get(i).I1(); int tnr2 = critpairs.Get(i).I2(); (*testout) << "t1 = " << tnr1 << ", t2 = " << tnr2 << " angle = " << Angle (GetTriangleNormal (tnr1), GetTriangleNormal (tnr2)) << endl; // who has more friends ? int side; area1 = 0; area2 = 0; for (side = 1; side <= 2; side++) { friends.SetSize (0); friends.Append ( (side == 1) ? tnr1 : tnr2); for (j = 1; j <= 3; j++) { int fsize = friends.Size(); for (k = 1; k <= fsize; k++) { int testtnr = friends.Get(k); Vec3d ntt = GetTriangleNormal(testtnr); ntt /= (ntt.Length() + 1e-24); for (l = 1; l <= NONeighbourTrigs(testtnr); l++) { int testnbnr = NeighbourTrig(testtnr, l); Vec3d nbt = GetTriangleNormal(testnbnr); nbt /= (nbt.Length() + 1e-24); if (Angle (nbt, ntt) < 15 * M_PI/180) { int ii; int found = 0; for (ii = 1; ii <= friends.Size(); ii++) { if (friends.Get(ii) == testnbnr) { found = 1; break; } } if (!found) friends.Append (testnbnr); } } } } // compute area: for (k = 1; k <= friends.Size(); k++) { double area = GetTriangle (friends.Get(k)).Area(points); if (side == 1) area1 += area; else area2 += area; } } (*testout) << "area1 = " << area1 << " area2 = " << area2 << endl; if (area1 < 0.1 * area2) { Vec3d n = GetTriangleNormal (tnr1); n *= -1; SetTriangleNormal(tnr1, n); } if (area2 < 0.1 * area1) { Vec3d n = GetTriangleNormal (tnr2); n *= -1; SetTriangleNormal(tnr2, n); } } } } */ calcedgedataanglesnew = 1; PopStatus(); } int STLGeometry :: AddEdge(int ap1, int ap2) { STLEdge e(ap1,ap2); e.SetLeftTrig(GetLeftTrig(ap1,ap2)); e.SetRightTrig(GetRightTrig(ap1,ap2)); edges.Append(e); return edges.Size(); } void STLGeometry :: STLDoctorConfirmEdge() { StoreEdgeData(); if (GetSelectTrig() >= 1 && GetSelectTrig() <= GetNT() && GetNodeOfSelTrig()) { if (stldoctor.selectmode == 1) { int ap1 = GetTriangle(GetSelectTrig()).PNum(GetNodeOfSelTrig()); int ap2 = GetTriangle(GetSelectTrig()).PNumMod(GetNodeOfSelTrig()+1); edgedata->Elem(edgedata->GetEdgeNum(ap1,ap2)).SetStatus (ED_CONFIRMED); } else if (stldoctor.selectmode == 3 || stldoctor.selectmode == 4) { int i; for (i = 1; i <= selectedmultiedge.Size(); i++) { int ap1 = selectedmultiedge.Get(i).i1; int ap2 = selectedmultiedge.Get(i).i2; edgedata->Elem(edgedata->GetEdgeNum(ap1,ap2)).SetStatus (ED_CONFIRMED); } } } } void STLGeometry :: STLDoctorCandidateEdge() { StoreEdgeData(); if (GetSelectTrig() >= 1 && GetSelectTrig() <= GetNT() && GetNodeOfSelTrig()) { if (stldoctor.selectmode == 1) { int ap1 = GetTriangle(GetSelectTrig()).PNum(GetNodeOfSelTrig()); int ap2 = GetTriangle(GetSelectTrig()).PNumMod(GetNodeOfSelTrig()+1); edgedata->Elem(edgedata->GetEdgeNum(ap1,ap2)).SetStatus (ED_CANDIDATE); } else if (stldoctor.selectmode == 3 || stldoctor.selectmode == 4) { int i; for (i = 1; i <= selectedmultiedge.Size(); i++) { int ap1 = selectedmultiedge.Get(i).i1; int ap2 = selectedmultiedge.Get(i).i2; edgedata->Elem(edgedata->GetEdgeNum(ap1,ap2)).SetStatus (ED_CANDIDATE); } } } } void STLGeometry :: STLDoctorExcludeEdge() { StoreEdgeData(); if (GetSelectTrig() >= 1 && GetSelectTrig() <= GetNT() && GetNodeOfSelTrig()) { if (stldoctor.selectmode == 1) { int ap1 = GetTriangle(GetSelectTrig()).PNum(GetNodeOfSelTrig()); int ap2 = GetTriangle(GetSelectTrig()).PNumMod(GetNodeOfSelTrig()+1); edgedata->Elem(edgedata->GetEdgeNum(ap1,ap2)).SetStatus(ED_EXCLUDED); } else if (stldoctor.selectmode == 3 || stldoctor.selectmode == 4) { int i; for (i = 1; i <= selectedmultiedge.Size(); i++) { int ap1 = selectedmultiedge.Get(i).i1; int ap2 = selectedmultiedge.Get(i).i2; edgedata->Elem(edgedata->GetEdgeNum(ap1,ap2)).SetStatus(ED_EXCLUDED); } } } } void STLGeometry :: STLDoctorUndefinedEdge() { StoreEdgeData(); if (GetSelectTrig() >= 1 && GetSelectTrig() <= GetNT() && GetNodeOfSelTrig()) { if (stldoctor.selectmode == 1) { int ap1 = GetTriangle(GetSelectTrig()).PNum(GetNodeOfSelTrig()); int ap2 = GetTriangle(GetSelectTrig()).PNumMod(GetNodeOfSelTrig()+1); edgedata->Elem(edgedata->GetEdgeNum(ap1,ap2)).SetStatus(ED_UNDEFINED); } else if (stldoctor.selectmode == 3 || stldoctor.selectmode == 4) { int i; for (i = 1; i <= selectedmultiedge.Size(); i++) { int ap1 = selectedmultiedge.Get(i).i1; int ap2 = selectedmultiedge.Get(i).i2; edgedata->Elem(edgedata->GetEdgeNum(ap1,ap2)).SetStatus(ED_UNDEFINED); } } } } void STLGeometry :: STLDoctorSetAllUndefinedEdges() { edgedata->ResetAll(); } void STLGeometry :: STLDoctorEraseCandidateEdges() { StoreEdgeData(); edgedata->ChangeStatus(ED_CANDIDATE, ED_UNDEFINED); } void STLGeometry :: STLDoctorConfirmCandidateEdges() { StoreEdgeData(); edgedata->ChangeStatus(ED_CANDIDATE, ED_CONFIRMED); } void STLGeometry :: STLDoctorConfirmedToCandidateEdges() { StoreEdgeData(); edgedata->ChangeStatus(ED_CONFIRMED, ED_CANDIDATE); } void STLGeometry :: STLDoctorDirtyEdgesToCandidates() { StoreEdgeData(); } void STLGeometry :: STLDoctorLongLinesToCandidates() { StoreEdgeData(); } twoint STLGeometry :: GetNearestSelectedDefinedEdge() { Point<3> pestimate = Center(GetTriangle(GetSelectTrig()).center, GetPoint(GetTriangle(GetSelectTrig()).PNum(GetNodeOfSelTrig()))); //Point3d pestimate = GetTriangle(GetSelectTrig()).center; int i, j, en; Array vic; GetVicinity(GetSelectTrig(),4,vic); twoint fedg; fedg.i1 = 0; fedg.i2 = 0; double mindist = 1E50; double dist; Point<3> p; for (i = 1; i <= vic.Size(); i++) { const STLTriangle& t = GetTriangle(vic.Get(i)); for (j = 1; j <= 3; j++) { en = edgedata->GetEdgeNum(t.PNum(j),t.PNumMod(j+1)); if (edgedata->Get(en).GetStatus() != ED_UNDEFINED) { p = pestimate; dist = GetDistFromLine(GetPoint(t.PNum(j)),GetPoint(t.PNumMod(j+1)),p); if (dist < mindist) { mindist = dist; fedg.i1 = t.PNum(j); fedg.i2 = t.PNumMod(j+1); } } } } return fedg; } void STLGeometry :: BuildSelectedMultiEdge(twoint ep) { if (edgedata->Size() == 0 || !GetEPPSize()) { return; } selectedmultiedge.SetSize(0); int tenum = GetTopEdgeNum (ep.i1, ep.i2); if (edgedata->Get(tenum).GetStatus() == ED_UNDEFINED) { twoint epnew = GetNearestSelectedDefinedEdge(); if (epnew.i1) { ep = epnew; tenum = GetTopEdgeNum (ep.i1, ep.i2); } } selectedmultiedge.Append(twoint(ep)); if (edgedata->Get(tenum).GetStatus() == ED_UNDEFINED) { return; } edgedata->BuildLineWithEdge(ep.i1,ep.i2,selectedmultiedge); } void STLGeometry :: BuildSelectedEdge(twoint ep) { if (edgedata->Size() == 0 || !GetEPPSize()) { return; } selectedmultiedge.SetSize(0); selectedmultiedge.Append(twoint(ep)); } void STLGeometry :: BuildSelectedCluster(twoint ep) { if (edgedata->Size() == 0 || !GetEPPSize()) { return; } selectedmultiedge.SetSize(0); int tenum = GetTopEdgeNum (ep.i1, ep.i2); if (edgedata->Get(tenum).GetStatus() == ED_UNDEFINED) { twoint epnew = GetNearestSelectedDefinedEdge(); if (epnew.i1) { ep = epnew; tenum = GetTopEdgeNum (ep.i1, ep.i2); } } selectedmultiedge.Append(twoint(ep)); if (edgedata->Get(tenum).GetStatus() == ED_UNDEFINED) { return; } edgedata->BuildClusterWithEdge(ep.i1,ep.i2,selectedmultiedge); } void STLGeometry :: ImportEdges() { StoreEdgeData(); PrintMessage(5, "import edges from file 'edges.ng'"); ifstream fin("edges.ng"); int ne; fin >> ne; Array > eps; int i; Point<3> p; for (i = 1; i <= 2*ne; i++) { fin >> p(0); fin >> p(1); fin >> p(2); eps.Append(p); } AddEdges(eps); } void STLGeometry :: AddEdges(const Array >& eps) { int i; int ne = eps.Size()/2; Array epsi; Box<3> bb = GetBoundingBox(); bb.Increase(1); Point3dTree ptree (bb.PMin(), bb.PMax()); Array pintersect; double gtol = GetBoundingBox().Diam()/1.E10; Point<3> p; for (i = 1; i <= GetNP(); i++) { p = GetPoint(i); ptree.Insert (p, i); } int error = 0; for (i = 1; i <= 2*ne; i++) { p = eps.Get(i); Point3d pmin = p - Vec3d (gtol, gtol, gtol); Point3d pmax = p + Vec3d (gtol, gtol, gtol); ptree.GetIntersecting (pmin, pmax, pintersect); if (pintersect.Size() > 1) { PrintError("Found too much points in epsilon-dist"); error = 1; } else if (pintersect.Size() == 0) { error = 1; PrintError("edgepoint does not exist!"); PrintMessage(5,"p=",Point3d(eps.Get(i))); } else { epsi.Append(pintersect.Get(1)); } } if (error) return; int en; for (i = 1; i <= ne; i++) { if (epsi.Get(2*i-1) == epsi.Get(2*i)) {PrintError("Edge with zero length!");} else { en = edgedata->GetEdgeNum(epsi.Get(2*i-1),epsi.Get(2*i)); edgedata->Elem(en).SetStatus (ED_CONFIRMED); } } } void STLGeometry :: ImportExternalEdges(const char * filename) { //AVL edges!!!!!! ifstream inf (filename); char ch; //int cnt = 0; int records, units, i, j; PrintFnStart("Import edges from ",filename); const int flen=30; char filter[flen+1]; filter[flen] = 0; char buf[20]; Array importpoints; Array importlines; Array importpnums; while (inf.good()) { inf.get(ch); // (*testout) << cnt << ": " << ch << endl; for (i = 0; i < flen; i++) filter[i] = filter[i+1]; filter[flen-1] = ch; // (*testout) << filter << endl; if (strcmp (filter+flen-7, "RECORDS") == 0) { inf.get(ch); // '=' inf >> records; } if (strcmp (filter+flen-5, "UNITS") == 0) { inf.get(ch); // '=' inf >> units; } if (strcmp (filter+flen-17, "EDGE NODE NUMBERS") == 0) { int nodenr; importlines.SetSize (units); for (i = 1; i <= units; i++) { inf >> nodenr; importlines.Elem(i) = nodenr; // (*testout) << nodenr << endl; } } if (strcmp (filter+flen-23, "EDGE POINT COORD IN DIR") == 0) { int coord; inf >> coord; importpoints.SetSize (units); inf >> ch; inf.putback (ch); for (i = 1; i <= units; i++) { for (j = 0; j < 12; j++) inf.get (buf[j]); buf[12] = 0; importpoints.Elem(i).X(coord) = 1000 * atof (buf); } } } /* (*testout) << "lines: " << endl; for (i = 1; i <= importlines.Size(); i++) (*testout) << importlines.Get(i) << endl; (*testout) << "points: " << endl; for (i = 1; i <= importpoints.Size(); i++) (*testout) << importpoints.Get(i) << endl; */ importpnums.SetSize (importpoints.Size()); Box3d bb (GetBoundingBox().PMin() + Vec3d (-1,-1,-1), GetBoundingBox().PMax() + Vec3d (1, 1, 1)); Point3dTree ptree (bb.PMin(), bb.PMax()); PrintMessage(7,"stl - bb: ",bb.PMin(), " - ", bb.PMax()); Box3d ebb; ebb.SetPoint (importpoints.Get(1)); for (i = 1; i <= importpoints.Size(); i++) ebb.AddPoint (importpoints.Get(i)); PrintMessage(7,"edgep - bb: ", ebb.PMin(), " - ", ebb.PMax()); Array pintersect; double gtol = GetBoundingBox().Diam()/1.E6; for (i = 1; i <= GetNP(); i++) { Point3d p = GetPoint(i); // (*testout) << "stlpt: " << p << endl; ptree.Insert (p, i); } for (i = 1; i <= importpoints.Size(); i++) { Point3d p = importpoints.Get(i); Point3d pmin = p - Vec3d (gtol, gtol, gtol); Point3d pmax = p + Vec3d (gtol, gtol, gtol); ptree.GetIntersecting (pmin, pmax, pintersect); if (pintersect.Size() > 1) { importpnums.Elem(i) = 0; PrintError("Found too many points in epsilon-dist"); } else if (pintersect.Size() == 0) { importpnums.Elem(i) = 0; PrintError("Edgepoint does not exist!"); } else { importpnums.Elem(i) = pintersect.Get(1); } } // if (!error) { PrintMessage(7,"found all edge points in stl file"); StoreEdgeData(); int oldp = 0; for (i = 1; i <= importlines.Size(); i++) { int newp = importlines.Get(i); if (!importpnums.Get(abs(newp))) newp = 0; if (oldp && newp) { int en = edgedata->GetEdgeNum(importpnums.Get(oldp), importpnums.Get(abs(newp))); edgedata->Elem(en).SetStatus (ED_CONFIRMED); } if (newp < 0) oldp = 0; else oldp = newp; } } } void STLGeometry :: ExportEdges() { PrintFnStart("Save edges to file 'edges.ng'"); ofstream fout("edges.ng"); fout.precision(16); int n = edgedata->GetNConfEdges(); fout << n << endl; int i; for (i = 1; i <= edgedata->Size(); i++) { if (edgedata->Get(i).GetStatus() == ED_CONFIRMED) { const STLTopEdge & e = edgedata->Get(i); fout << GetPoint(e.PNum(1))(0) << " " << GetPoint(e.PNum(1))(1) << " " << GetPoint(e.PNum(1))(2) << endl; fout << GetPoint(e.PNum(2))(0) << " " << GetPoint(e.PNum(2))(1) << " " << GetPoint(e.PNum(2))(2) << endl; } } } void STLGeometry :: LoadEdgeData(const char* file) { StoreEdgeData(); PrintFnStart("Load edges from file '", file, "'"); ifstream fin(file); edgedata->Read(fin); // calcedgedataanglesnew = 1; } void STLGeometry :: SaveEdgeData(const char* file) { PrintFnStart("save edges to file '", file, "'"); ofstream fout(file); edgedata->Write(fout); } /* void STLGeometry :: SaveExternalEdges() { ofstream fout("externaledgesp3.ng"); fout.precision(16); int n = NOExternalEdges(); fout << n << endl; int i; for (i = 1; i <= n; i++) { twoint e = GetExternalEdge(i); fout << GetPoint(e.i1)(0) << " " << GetPoint(e.i1)(1) << " " << GetPoint(e.i1)(2) << endl; fout << GetPoint(e.i2)(0) << " " << GetPoint(e.i2)(1) << " " << GetPoint(e.i2)(2) << endl; } } */ void STLGeometry :: StoreExternalEdges() { storedexternaledges.SetSize(0); undoexternaledges = 1; int i; for (i = 1; i <= externaledges.Size(); i++) { storedexternaledges.Append(externaledges.Get(i)); } } void STLGeometry :: UndoExternalEdges() { if (!undoexternaledges) { PrintMessage(1, "undo not further possible!"); return; } RestoreExternalEdges(); undoexternaledges = 0; } void STLGeometry :: RestoreExternalEdges() { externaledges.SetSize(0); int i; for (i = 1; i <= storedexternaledges.Size(); i++) { externaledges.Append(storedexternaledges.Get(i)); } } void STLGeometry :: AddExternalEdgeAtSelected() { StoreExternalEdges(); if (GetSelectTrig() >= 1 && GetSelectTrig() <= GetNT()) { int ap1 = GetTriangle(GetSelectTrig()).PNum(GetNodeOfSelTrig()); int ap2 = GetTriangle(GetSelectTrig()).PNumMod(GetNodeOfSelTrig()+1); if (!IsExternalEdge(ap1,ap2)) {AddExternalEdge(ap1,ap2);} } } void STLGeometry :: AddClosedLinesToExternalEdges() { StoreExternalEdges(); int i, j; for (i = 1; i <= GetNLines(); i++) { STLLine* l = GetLine(i); if (l->StartP() == l->EndP()) { for (j = 1; j < l->NP(); j++) { int ap1 = l->PNum(j); int ap2 = l->PNum(j+1); if (!IsExternalEdge(ap1,ap2)) {AddExternalEdge(ap1,ap2);} } } } } void STLGeometry :: AddLongLinesToExternalEdges() { StoreExternalEdges(); double diamfact = stldoctor.dirtytrigfact; double diam = GetBoundingBox().Diam(); int i, j; for (i = 1; i <= GetNLines(); i++) { STLLine* l = GetLine(i); if (l->GetLength(points) >= diamfact*diam) { for (j = 1; j < l->NP(); j++) { int ap1 = l->PNum(j); int ap2 = l->PNum(j+1); if (!IsExternalEdge(ap1,ap2)) {AddExternalEdge(ap1,ap2);} } } } } void STLGeometry :: AddAllNotSingleLinesToExternalEdges() { StoreExternalEdges(); int i, j; for (i = 1; i <= GetNLines(); i++) { STLLine* l = GetLine(i); if (GetNEPP(l->StartP()) > 1 || GetNEPP(l->EndP()) > 1) { for (j = 1; j < l->NP(); j++) { int ap1 = l->PNum(j); int ap2 = l->PNum(j+1); if (!IsExternalEdge(ap1,ap2)) {AddExternalEdge(ap1,ap2);} } } } } void STLGeometry :: DeleteDirtyExternalEdges() { //delete single triangle edges and single edge-lines in clusters" StoreExternalEdges(); int i, j; for (i = 1; i <= GetNLines(); i++) { STLLine* l = GetLine(i); if (l->NP() <= 3 || (l->StartP() == l->EndP() && l->NP() == 4)) { for (j = 1; j < l->NP(); j++) { int ap1 = l->PNum(j); int ap2 = l->PNum(j+1); if (IsExternalEdge(ap1,ap2)) {DeleteExternalEdge(ap1,ap2);} } } } } void STLGeometry :: AddExternalEdgesFromGeomLine() { StoreExternalEdges(); if (GetSelectTrig() >= 1 && GetSelectTrig() <= GetNT()) { int ap1 = GetTriangle(GetSelectTrig()).PNum(GetNodeOfSelTrig()); int ap2 = GetTriangle(GetSelectTrig()).PNumMod(GetNodeOfSelTrig()+1); if (IsEdge(ap1,ap2)) { int edgenum = IsEdgeNum(ap1,ap2); if (!IsExternalEdge(ap1,ap2)) {AddExternalEdge(ap1,ap2);} int noend = 1; int startp = ap1; int laste = edgenum; int np1, np2; while (noend) { if (GetNEPP(startp) == 2) { if (GetEdgePP(startp,1) != laste) {laste = GetEdgePP(startp,1);} else {laste = GetEdgePP(startp,2);} np1 = GetEdge(laste).PNum(1); np2 = GetEdge(laste).PNum(2); if (!IsExternalEdge(np1, np2)) {AddExternalEdge(np1, np2);} else {noend = 0;} if (np1 != startp) {startp = np1;} else {startp = np2;} } else {noend = 0;} } startp = ap2; laste = edgenum; noend = 1; while (noend) { if (GetNEPP(startp) == 2) { if (GetEdgePP(startp,1) != laste) {laste = GetEdgePP(startp,1);} else {laste = GetEdgePP(startp,2);} np1 = GetEdge(laste).PNum(1); np2 = GetEdge(laste).PNum(2); if (!IsExternalEdge(np1, np2)) {AddExternalEdge(np1, np2);} else {noend = 0;} if (np1 != startp) {startp = np1;} else {startp = np2;} } else {noend = 0;} } } } } void STLGeometry :: ClearEdges() { edgesfound = 0; edges.SetSize(0); //edgedata->SetSize(0); // externaledges.SetSize(0); edgesperpoint.SetSize(0); undoexternaledges = 0; } void STLGeometry :: STLDoctorBuildEdges() { // if (!trigsconverted) {return;} ClearEdges(); meshlines.SetSize(0); FindEdgesFromAngles(); } void STLGeometry :: DeleteExternalEdgeAtSelected() { StoreExternalEdges(); if (GetSelectTrig() >= 1 && GetSelectTrig() <= GetNT()) { int ap1 = GetTriangle(GetSelectTrig()).PNum(GetNodeOfSelTrig()); int ap2 = GetTriangle(GetSelectTrig()).PNumMod(GetNodeOfSelTrig()+1); if (IsExternalEdge(ap1,ap2)) {DeleteExternalEdge(ap1,ap2);} } } void STLGeometry :: DeleteExternalEdgeInVicinity() { StoreExternalEdges(); if (!stldoctor.showvicinity || vicinity.Size() != GetNT()) {return;} int i, j, ap1, ap2; for (i = 1; i <= GetNT(); i++) { if (vicinity.Elem(i)) { for (j = 1; j <= 3; j++) { ap1 = GetTriangle(i).PNum(j); ap2 = GetTriangle(i).PNumMod(j+1); if (IsExternalEdge(ap1,ap2)) { DeleteExternalEdge(ap1,ap2); } } } } } void STLGeometry :: BuildExternalEdgesFromEdges() { StoreExternalEdges(); if (GetNE() == 0) {PrintWarning("Edges possibly not generated!");} int i; externaledges.SetSize(0); for (i = 1; i <= GetNE(); i++) { STLEdge e = GetEdge(i); AddExternalEdge(e.PNum(1), e.PNum(2)); } } void STLGeometry :: AddExternalEdge(int ap1, int ap2) { externaledges.Append(twoint(ap1,ap2)); } void STLGeometry :: DeleteExternalEdge(int ap1, int ap2) { int i; int found = 0; for (i = 1; i <= NOExternalEdges(); i++) { if ((GetExternalEdge(i).i1 == ap1 && GetExternalEdge(i).i2 == ap2) || (GetExternalEdge(i).i1 == ap2 && GetExternalEdge(i).i2 == ap1)) {found = 1;}; if (found && i < NOExternalEdges()) { externaledges.Elem(i) = externaledges.Get(i+1); } } if (!found) {PrintWarning("edge not found");} else { externaledges.SetSize(externaledges.Size()-1); } } int STLGeometry :: IsExternalEdge(int ap1, int ap2) { int i; for (i = 1; i <= NOExternalEdges(); i++) { if ((GetExternalEdge(i).i1 == ap1 && GetExternalEdge(i).i2 == ap2) || (GetExternalEdge(i).i1 == ap2 && GetExternalEdge(i).i2 == ap1)) {return 1;}; } return 0; } void STLGeometry :: DestroyDirtyTrigs() { PrintFnStart("Destroy dirty triangles"); PrintMessage(5,"original number of triangles=", GetNT()); //destroy every triangle with other than 3 neighbours; int changed = 1; int i, j, k; while (changed) { changed = 0; Clear(); for (i = 1; i <= GetNT(); i++) { int dirty = NONeighbourTrigs(i) < 3; for (j = 1; j <= 3; j++) { int pnum = GetTriangle(i).PNum(j); /* if (pnum == 1546) { // for (k = 1; k <= NOTrigsPerPoint(pnum); k++) } */ if (NOTrigsPerPoint(pnum) <= 2) dirty = 1; } int pi1 = GetTriangle(i).PNum(1); int pi2 = GetTriangle(i).PNum(2); int pi3 = GetTriangle(i).PNum(3); if (pi1 == pi2 || pi1 == pi3 || pi2 == pi3) { PrintMessage(5,"triangle with Volume 0: ", i, " nodes: ", pi1, ", ", pi2, ", ", pi3); dirty = 1; } if (dirty) { for (k = i+1; k <= GetNT(); k++) { trias.Elem(k-1) = trias.Get(k); // readtrias: not longer permanent, JS // readtrias.Elem(k-1) = readtrias.Get(k); } int size = GetNT(); trias.SetSize(size-1); // readtrias.SetSize(size-1); changed = 1; break; } } } FindNeighbourTrigs(); PrintMessage(5,"final number of triangles=", GetNT()); } void STLGeometry :: CalcNormalsFromGeometry() { int i; for (i = 1; i <= GetNT(); i++) { const STLTriangle & tr = GetTriangle(i); const Point3d& ap1 = GetPoint(tr.PNum(1)); const Point3d& ap2 = GetPoint(tr.PNum(2)); const Point3d& ap3 = GetPoint(tr.PNum(3)); Vec3d normal = Cross (ap2-ap1, ap3-ap1); if (normal.Length() != 0) { normal /= (normal.Length()); } GetTriangle(i).SetNormal(normal); } PrintMessage(5,"Normals calculated from geometry!!!"); calcedgedataanglesnew = 1; } void STLGeometry :: SetSelectTrig(int trig) { stldoctor.selecttrig = trig; } int STLGeometry :: GetSelectTrig() const { return stldoctor.selecttrig; } void STLGeometry :: SetNodeOfSelTrig(int n) { stldoctor.nodeofseltrig = n; } int STLGeometry :: GetNodeOfSelTrig() const { return stldoctor.nodeofseltrig; } void STLGeometry :: MoveSelectedPointToMiddle() { if (GetSelectTrig() >= 1 && GetSelectTrig() <= GetNT()) { int p = GetTriangle(GetSelectTrig()).PNum(GetNodeOfSelTrig()); Point<3> pm(0.,0.,0.); //Middlevector; Point<3> p0(0.,0.,0.); PrintMessage(5,"original point=", Point3d(GetPoint(p))); int i; int cnt = 0; for (i = 1; i <= trigsperpoint.EntrySize(p); i++) { const STLTriangle& tr = GetTriangle(trigsperpoint.Get(p,i)); int j; for (j = 1; j <= 3; j++) { if (tr.PNum(j) != p) { cnt++; pm(0) += GetPoint(tr.PNum(j))(0); pm(1) += GetPoint(tr.PNum(j))(1); pm(2) += GetPoint(tr.PNum(j))(2); } } } Point<3> origp = GetPoint(p); double fact = 0.2; SetPoint(p, p0 + fact*(1./(double)cnt)*(pm-p0)+(1.-fact)*(origp-p0)); PrintMessage(5,"middle point=", Point3d (GetPoint(p))); PrintMessage(5,"moved point ", Point3d (p)); } } void STLGeometry :: PrintSelectInfo() { //int trig = GetSelectTrig(); //int p = GetTriangle(trig).PNum(GetNodeOfSelTrig()); PrintMessage(1,"touch triangle ", GetSelectTrig() , ", local node ", GetNodeOfSelTrig() , " (=", GetTriangle(GetSelectTrig()).PNum(GetNodeOfSelTrig()), ")"); if (AtlasMade() && GetSelectTrig() >= 1 && GetSelectTrig() <= GetNT()) { PrintMessage(1," chartnum=",GetChartNr(GetSelectTrig())); /* PointBetween(Center(Center(GetPoint(GetTriangle(270).PNum(1)), GetPoint(GetTriangle(270).PNum(2))), GetPoint(GetTriangle(270).PNum(3))),270, Center(Center(GetPoint(GetTriangle(trig).PNum(1)), GetPoint(GetTriangle(trig).PNum(2))), GetPoint(GetTriangle(trig).PNum(3))),trig); */ //PointBetween(Point3d(5.7818, 7.52768, 4.14879),260,Point3d(6.80292, 6.55392, 4.70184),233); } } void STLGeometry :: ShowSelectedTrigChartnum() { int st = GetSelectTrig(); if (st >= 1 && st <= GetNT() && AtlasMade()) PrintMessage(1,"selected trig ", st, " has chartnumber ", GetChartNr(st)); } void STLGeometry :: ShowSelectedTrigCoords() { int st = GetSelectTrig(); /* //testing!!!! Array trigs; GetSortedTrianglesAroundPoint(GetTriangle(st).PNum(GetNodeOfSelTrig()),st,trigs); */ if (st >= 1 && st <= GetNT()) { PrintMessage(1, "coordinates of selected trig ", st, ":"); PrintMessage(1, " p1 = ", GetTriangle(st).PNum(1), " = ", Point3d (GetPoint(GetTriangle(st).PNum(1)))); PrintMessage(1, " p2 = ", GetTriangle(st).PNum(2), " = ", Point3d (GetPoint(GetTriangle(st).PNum(2)))); PrintMessage(1, " p3 = ", GetTriangle(st).PNum(3), " = ", Point3d (GetPoint(GetTriangle(st).PNum(3)))); } } void STLGeometry :: LoadMarkedTrigs() { PrintFnStart("load marked trigs from file 'markedtrigs.ng'"); ifstream fin("markedtrigs.ng"); int n; fin >> n; if (n != GetNT() || n == 0) {PrintError("Not a suitable marked-trig-file!"); return;} int i, m; for (i = 1; i <= n; i++) { fin >> m; SetMarkedTrig(i, m); } fin >> n; if (n != 0) { Point<3> ap1, ap2; for (i = 1; i <= n; i++) { fin >> ap1(0); fin >> ap1(1); fin >> ap1(2); fin >> ap2(0); fin >> ap2(1); fin >> ap2(2); AddMarkedSeg(ap1,ap2); } } } void STLGeometry :: SaveMarkedTrigs() { PrintFnStart("save marked trigs to file 'markedtrigs.ng'"); ofstream fout("markedtrigs.ng"); int n = GetNT(); fout << n << endl; int i; for (i = 1; i <= n; i++) { fout << IsMarkedTrig(i) << "\n"; } n = GetNMarkedSegs(); fout << n << endl; Point<3> ap1,ap2; for (i = 1; i <= n; i++) { GetMarkedSeg(i,ap1,ap2); fout << ap1(0) << " " << ap1(1) << " " << ap1(2) << " "; fout << ap2(0) << " " << ap2(1) << " " << ap2(2) << " " << "\n"; } } void STLGeometry :: NeighbourAnglesOfSelectedTrig() { int st = GetSelectTrig(); if (st >= 1 && st <= GetNT()) { int i; PrintMessage(1,"Angle to triangle ", st, ":"); for (i = 1; i <= NONeighbourTrigs(st); i++) { PrintMessage(1," triangle ", NeighbourTrig(st,i), ": angle = ", 180./M_PI*GetAngle(st, NeighbourTrig(st,i)), "°", ", calculated = ", 180./M_PI*Angle(GetTriangle(st).GeomNormal(points), GetTriangle(NeighbourTrig(st,i)).GeomNormal(points)), "°"); } } } void STLGeometry :: GetVicinity(int starttrig, int size, Array& vic) { if (starttrig == 0 || starttrig > GetNT()) {return;} Array vicarray; vicarray.SetSize(GetNT()); int i; for (i = 1; i <= vicarray.Size(); i++) { vicarray.Elem(i) = 0; } vicarray.Elem(starttrig) = 1; int j = 0,k; Array list1; list1.SetSize(0); Array list2; list2.SetSize(0); list1.Append(starttrig); while (j < size) { j++; for (i = 1; i <= list1.Size(); i++) { for (k = 1; k <= NONeighbourTrigs(i); k++) { int nbtrig = NeighbourTrig(list1.Get(i),k); if (nbtrig && vicarray.Get(nbtrig) == 0) { list2.Append(nbtrig); vicarray.Elem(nbtrig) = 1; } } } list1.SetSize(0); for (i = 1; i <= list2.Size(); i++) { list1.Append(list2.Get(i)); } list2.SetSize(0); } vic.SetSize(0); for (i = 1; i <= vicarray.Size(); i++) { if (vicarray.Get(i)) {vic.Append(i);} } } void STLGeometry :: CalcVicinity(int starttrig) { if (starttrig == 0 || starttrig > GetNT()) {return;} vicinity.SetSize(GetNT()); if (!stldoctor.showvicinity) {return;} int i; for (i = 1; i <= vicinity.Size(); i++) { vicinity.Elem(i) = 0; } vicinity.Elem(starttrig) = 1; int j = 0,k; Array list1; list1.SetSize(0); Array list2; list2.SetSize(0); list1.Append(starttrig); // int cnt = 1; while (j < stldoctor.vicinity) { j++; for (i = 1; i <= list1.Size(); i++) { for (k = 1; k <= NONeighbourTrigs(i); k++) { int nbtrig = NeighbourTrig(list1.Get(i),k); if (nbtrig && vicinity.Get(nbtrig) == 0) { list2.Append(nbtrig); vicinity.Elem(nbtrig) = 1; //cnt++; } } } list1.SetSize(0); for (i = 1; i <= list2.Size(); i++) { list1.Append(list2.Get(i)); } list2.SetSize(0); } } int STLGeometry :: Vicinity(int trig) const { if (trig <= vicinity.Size() && trig >=1) { return vicinity.Get(trig); } else {PrintSysError("In STLGeometry::Vicinity");} return 0; } void STLGeometry :: InitMarkedTrigs() { markedtrigs.SetSize(GetNT()); int i; for (i = 1; i <= GetNT(); i++) { SetMarkedTrig(i, 0); } } void STLGeometry :: MarkDirtyTrigs() { PrintFnStart("mark dirty trigs"); int i,j; markedtrigs.SetSize(GetNT()); for (i = 1; i <= GetNT(); i++) { SetMarkedTrig(i, 0); } int found; double dirtyangle = stlparam.yangle/2./180.*M_PI; int cnt = 0; for (i = 1; i <= GetNT(); i++) { found = 0; for (j = 1; j <= NONeighbourTrigs(i); j++) { if (GetAngle(i, NeighbourTrig(i,j)) > dirtyangle) { found++; } } if (found && GetTriangle(i).MinHeight(points) < stldoctor.dirtytrigfact*GetTriangle(i).MaxLength(points)) { SetMarkedTrig(i, 1); cnt++; } /* else if (found == 3) { SetMarkedTrig(i, 1); cnt++; } */ } PrintMessage(1, "marked ", cnt, " dirty trigs"); } void STLGeometry :: MarkTopErrorTrigs() { int cnt = 0; markedtrigs.SetSize(GetNT()); for (int i = 1; i <= GetNT(); i++) { const STLTriangle & trig = GetTriangle(i); SetMarkedTrig(i, trig.flags.toperror); if (trig.flags.toperror) cnt++; } PrintMessage(1,"marked ", cnt, " inconsistent triangles"); } double STLGeometry :: CalcTrigBadness(int i) { int j; double maxbadness = 0; int ap1, ap2; for (j = 1; j <= NONeighbourTrigs(i); j++) { GetTriangle(i).GetNeighbourPoints(GetTriangle(NeighbourTrig(i,j)), ap1, ap2); if (!IsEdge(ap1,ap2) && GetGeomAngle(i, NeighbourTrig(i,j)) > maxbadness) { maxbadness = GetGeomAngle(i, NeighbourTrig(i,j)); } } return maxbadness; } void STLGeometry :: GeomSmoothRevertedTrigs() { //double revertedangle = stldoctor.smoothangle/180.*M_PI; double fact = stldoctor.dirtytrigfact; MarkRevertedTrigs(); int i, j, k, l, p; for (i = 1; i <= GetNT(); i++) { if (IsMarkedTrig(i)) { for (j = 1; j <= 3; j++) { double origbadness = CalcTrigBadness(i); p = GetTriangle(i).PNum(j); Point<3> pm(0.,0.,0.); //Middlevector; Point<3> p0(0.,0.,0.); int cnt = 0; for (k = 1; k <= trigsperpoint.EntrySize(p); k++) { const STLTriangle& tr = GetTriangle(trigsperpoint.Get(p,k)); for (l = 1; l <= 3; l++) { if (tr.PNum(l) != p) { cnt++; pm(0) += GetPoint(tr.PNum(l))(0); pm(1) += GetPoint(tr.PNum(l))(1); pm(2) += GetPoint(tr.PNum(l))(2); } } } Point3d origp = GetPoint(p); Point3d newp = p0 + fact*(1./(double)cnt)*(pm-p0)+(1.-fact)*(origp-p0); SetPoint(p, newp); if (CalcTrigBadness(i) > 0.9*origbadness) {SetPoint(p,origp); PrintDot('f');} else {PrintDot('s');} } } } MarkRevertedTrigs(); } void STLGeometry :: MarkRevertedTrigs() { int i,j; if (edgesperpoint.Size() != GetNP()) {BuildEdges();} PrintFnStart("mark reverted trigs"); InitMarkedTrigs(); int found; double revertedangle = stldoctor.smoothangle/180.*M_PI; int cnt = 0; int ap1, ap2; for (i = 1; i <= GetNT(); i++) { found = 0; for (j = 1; j <= NONeighbourTrigs(i); j++) { GetTriangle(i).GetNeighbourPoints(GetTriangle(NeighbourTrig(i,j)), ap1, ap2); if (!IsEdge(ap1,ap2)) { if (GetGeomAngle(i, NeighbourTrig(i,j)) > revertedangle) { found = 1; break; } } } if (found) { SetMarkedTrig(i, 1); cnt++; } } PrintMessage(5, "found ", cnt, " reverted trigs"); } void STLGeometry :: SmoothDirtyTrigs() { PrintFnStart("smooth dirty trigs"); MarkDirtyTrigs(); int i,j; int changed = 1; int ap1, ap2; while (changed) { changed = 0; for (i = 1; i <= GetNT(); i++) { if (IsMarkedTrig(i)) { int foundtrig = 0; double maxlen = 0; // JS: darf normalvector nicht ueber kurze Seite erben maxlen = GetTriangle(i).MaxLength(GetPoints()) / 2.1; //JG: bei flachem dreieck auch kurze Seite for (j = 1; j <= NONeighbourTrigs(i); j++) { if (!IsMarkedTrig(NeighbourTrig(i,j))) { GetTriangle(i).GetNeighbourPoints(GetTriangle(NeighbourTrig(i,j)),ap1,ap2); if (Dist(GetPoint(ap1),GetPoint(ap2)) >= maxlen) { foundtrig = NeighbourTrig(i,j); maxlen = Dist(GetPoint(ap1),GetPoint(ap2)); } } } if (foundtrig) { GetTriangle(i).SetNormal(GetTriangle(foundtrig).Normal()); changed = 1; SetMarkedTrig(i,0); } } } } calcedgedataanglesnew = 1; MarkDirtyTrigs(); int cnt = 0; for (i = 1; i <= GetNT(); i++) { if (IsMarkedTrig(i)) {cnt++;} } PrintMessage(5,"NO marked dirty trigs=", cnt); } int STLGeometry :: IsMarkedTrig(int trig) const { if (trig <= markedtrigs.Size() && trig >=1) { return markedtrigs.Get(trig); } else {PrintSysError("In STLGeometry::IsMarkedTrig");} return 0; } void STLGeometry :: SetMarkedTrig(int trig, int num) { if (trig <= markedtrigs.Size() && trig >=1) { markedtrigs.Elem(trig) = num; } else {PrintSysError("In STLGeometry::SetMarkedTrig");} } void STLGeometry :: Clear() { PrintFnStart("Clear"); surfacemeshed = 0; surfaceoptimized = 0; volumemeshed = 0; selectedmultiedge.SetSize(0); meshlines.SetSize(0); // neighbourtrigs.SetSize(0); outerchartspertrig.SetSize(0); atlas.SetSize(0); ClearMarkedSegs(); ClearSpiralPoints(); ClearLineEndPoints(); SetSelectTrig(0); SetNodeOfSelTrig(1); facecnt = 0; SetThreadPercent(100.); ClearEdges(); } double STLGeometry :: Area() { if (area >= 0) return area; area = 0; for (int i = 1; i <= GetNT(); i++) area += GetTriangle(i).Area(points); return area; } double STLGeometry :: GetAngle(int t1, int t2) { return Angle(GetTriangle(t1).Normal(),GetTriangle(t2).Normal()); } double STLGeometry :: GetGeomAngle(int t1, int t2) { Vec3d n1 = GetTriangle(t1).GeomNormal(points); Vec3d n2 = GetTriangle(t2).GeomNormal(points); return Angle(n1,n2); } void STLGeometry :: InitSTLGeometry(const Array & readtrias) { PrintFnStart("Init STL Geometry"); STLTopology::InitSTLGeometry(readtrias); int i, k; //const double geometry_tol_fact = 1E8; //distances lower than max_box_size/tol are ignored int np = GetNP(); PrintMessage(5,"NO points= ", GetNP()); normals.SetSize(GetNP()); Array normal_cnt(GetNP()); // counts number of added normals in a point for (i = 1; i <= np; i++) { normal_cnt.Elem(i) = 0; normals.Elem(i) = Vec3d (0,0,0); } for(i = 1; i <= GetNT(); i++) { // STLReadTriangle t = GetReadTriangle(i); // STLTriangle st; Vec<3> n = GetTriangle(i).Normal (); for (k = 1; k <= 3; k++) { int pi = GetTriangle(i).PNum(k); normal_cnt.Elem(pi)++; SetNormal(pi, GetNormal(pi) + n); } } //normalize the normals for (i = 1; i <= GetNP(); i++) { SetNormal(i,1./(double)normal_cnt.Get(i)*GetNormal(i)); } trigsconverted = 1; vicinity.SetSize(GetNT()); markedtrigs.SetSize(GetNT()); for (i = 1; i <= GetNT(); i++) { markedtrigs.Elem(i) = 0; vicinity.Elem(i) = 1; } ha_points.SetSize(GetNP()); for (i = 1; i <= GetNP(); i++) ha_points.Elem(i) = 0; calcedgedataanglesnew = 0; edgedatastored = 0; edgedata->Clear(); if (GetStatus() == STL_ERROR) return; CalcEdgeData(); CalcEdgeDataAngles(); ClearLineEndPoints(); CheckGeometryOverlapping(); } void STLGeometry :: TopologyChanged() { calcedgedataanglesnew = 1; } int STLGeometry :: CheckGeometryOverlapping() { PrintMessageCR(3,"Check overlapping geometry ..."); Box<3> geombox = GetBoundingBox(); Point<3> pmin = geombox.PMin(); Point<3> pmax = geombox.PMax(); BoxTree<3> setree(pmin, pmax); int oltrigs = 0; markedtrigs.SetSize(GetNT()); for (int i = 1; i <= GetNT(); i++) SetMarkedTrig(i, 0); for (int i = 1; i <= GetNT(); i++) { const STLTriangle & tri = GetTriangle(i); Point<3> tpmin = tri.box.PMin(); Point<3> tpmax = tri.box.PMax(); Vec<3> diag = tpmax - tpmin; tpmax = tpmax + 0.001 * diag; tpmin = tpmin - 0.001 * diag; setree.Insert (tpmin, tpmax, i); } { mutex inters_mutex; ParallelFor( 1, GetNT()+1, [&] (int first, int next) { Array inters; for (int i=first; i tpmin = tri.box.PMin(); Point<3> tpmax = tri.box.PMax(); setree.GetIntersecting (tpmin, tpmax, inters); for (int j = 1; j <= inters.Size(); j++) { const STLTriangle & tri2 = GetTriangle(inters.Get(j)); const Point<3> *trip1[3], *trip2[3]; Point<3> hptri1[3], hptri2[3]; /* for (k = 1; k <= 3; k++) { trip1[k-1] = &GetPoint (tri.PNum(k)); trip2[k-1] = &GetPoint (tri2.PNum(k)); } */ for (int k = 0; k < 3; k++) { hptri1[k] = GetPoint (tri[k]); hptri2[k] = GetPoint (tri2[k]); trip1[k] = &hptri1[k]; trip2[k] = &hptri2[k]; } if (IntersectTriangleTriangle (&trip1[0], &trip2[0])) { lock_guard guard(inters_mutex); { oltrigs++; PrintMessage(5,"Intersecting Triangles: trig ",i," with ",inters.Get(j),"!"); SetMarkedTrig(i, 1); SetMarkedTrig(inters.Get(j), 1); } } } } }); } PrintMessage(3,"Check overlapping geometry ... ", oltrigs, " triangles overlap"); return oltrigs; } /* void STLGeometry :: InitSTLGeometry() { STLTopology::InitSTLGeometry(); int i, j, k; const double geometry_tol_fact = 1E8; //distances lower than max_box_size/tol are ignored trias.SetSize(0); points.SetSize(0); normals.SetSize(0); Array normal_cnt; // counts number of added normals in a point Box3d bb (GetBoundingBox().PMin() + Vec3d (-1,-1,-1), GetBoundingBox().PMax() + Vec3d (1, 1, 1)); Point3dTree pointtree (bb.PMin(), bb.PMax()); Array pintersect; double gtol = GetBoundingBox().CalcDiam()/geometry_tol_fact; for(i = 1; i <= GetReadNT(); i++) { //if (i%500==499) {(*mycout) << (double)i/(double)GetReadNT()*100. << "%" << endl;} STLReadTriangle t = GetReadTriangle(i); STLTriangle st; Vec3d n = t.normal; for (k = 0; k < 3; k++) { Point3d p = t.pts[k]; Point3d pmin = p - Vec3d (gtol, gtol, gtol); Point3d pmax = p + Vec3d (gtol, gtol, gtol); pointtree.GetIntersecting (pmin, pmax, pintersect); if (pintersect.Size() > 1) (*mycout) << "found too much " << char(7) << endl; int foundpos = 0; if (pintersect.Size()) foundpos = pintersect.Get(1); if (foundpos) { normal_cnt[foundpos]++; SetNormal(foundpos,GetNormal(foundpos)+n); // (*testout) << "found p " << p << endl; } else { foundpos = AddPoint(p); AddNormal(n); normal_cnt.Append(1); pointtree.Insert (p, foundpos); } //(*mycout) << "foundpos=" << foundpos << endl; st.pts[k] = foundpos; } if ( (st.pts[0] == st.pts[1]) || (st.pts[0] == st.pts[2]) || (st.pts[1] == st.pts[2]) ) { (*mycout) << "ERROR: STL Triangle degenerated" << endl; } else { // do not add ? js AddTriangle(st); } //(*mycout) << "TRIG" << i << " = " << st << endl; } //normal the normals for (i = 1; i <= GetNP(); i++) { SetNormal(i,1./(double)normal_cnt[i]*GetNormal(i)); } trigsconverted = 1; vicinity.SetSize(GetNT()); markedtrigs.SetSize(GetNT()); for (i = 1; i <= GetNT(); i++) { markedtrigs.Elem(i) = 0; vicinity.Elem(i) = 1; } ha_points.SetSize(GetNP()); for (i = 1; i <= GetNP(); i++) ha_points.Elem(i) = 0; calcedgedataanglesnew = 0; edgedatastored = 0; edgedata->Clear(); CalcEdgeData(); CalcEdgeDataAngles(); ClearLineEndPoints(); (*mycout) << "done" << endl; } */ void STLGeometry :: SetLineEndPoint(int pn) { if (pn <1 || pn > lineendpoints.Size()) {PrintSysError("Illegal pnum in SetLineEndPoint!!!"); return; } lineendpoints.Elem(pn) = 1; } int STLGeometry :: IsLineEndPoint(int pn) { // return 0; if (pn <1 || pn > lineendpoints.Size()) {PrintSysError("Illegal pnum in IsLineEndPoint!!!"); return 0;} return lineendpoints.Get(pn); } void STLGeometry :: ClearLineEndPoints() { lineendpoints.SetSize(GetNP()); int i; for (i = 1; i <= GetNP(); i++) { lineendpoints.Elem(i) = 0; } } int STLGeometry :: IsEdge(int ap1, int ap2) { int i,j; for (i = 1; i <= GetNEPP(ap1); i++) { for (j = 1; j <= GetNEPP(ap2); j++) { if (GetEdgePP(ap1,i) == GetEdgePP(ap2,j)) {return 1;} } } return 0; } int STLGeometry :: IsEdgeNum(int ap1, int ap2) { int i,j; for (i = 1; i <= GetNEPP(ap1); i++) { for (j = 1; j <= GetNEPP(ap2); j++) { if (GetEdgePP(ap1,i) == GetEdgePP(ap2,j)) {return GetEdgePP(ap1,i);} } } return 0; } void STLGeometry :: BuildEdges() { //PrintFnStart("build edges"); edges.SetSize(0); meshlines.SetSize(0); FindEdgesFromAngles(); } void STLGeometry :: UseExternalEdges() { for (int i = 1; i <= NOExternalEdges(); i++) AddEdge(GetExternalEdge(i).i1,GetExternalEdge(i).i2); //BuildEdgesPerPointy(); } void STLGeometry :: UndoEdgeChange() { if (edgedatastored) { RestoreEdgeData(); } else { PrintWarning("no edge undo possible"); } } void STLGeometry :: StoreEdgeData() { // edgedata_store = *edgedata; edgedata->Store(); edgedatastored = 1; // put stlgeom-edgedata to stltopology edgedata /* int i; for (i = 1; i <= GetNTE(); i++) { const STLTopEdge & topedge = GetTopEdge (i); int ednum = edgedata->GetEdgeNum (topedge.PNum(1), topedge.PNum(2)); topedges.Elem(i).SetStatus (edgedata->Get (ednum).status); } */ } void STLGeometry :: RestoreEdgeData() { // *edgedata = edgedata_store; edgedata->Restore(); edgedatastored=0; } void STLGeometry :: CalcEdgeData() { PushStatus("Calc Edge Data"); int np1, np2; int ecnt = 0; edgedata->SetSize(GetNT()/2*3); for (int i = 1; i <= GetNT(); i++) { SetThreadPercent((double)i/(double)GetNT()*100.); const STLTriangle & t1 = GetTriangle(i); for (int j = 1; j <= NONeighbourTrigs(i); j++) { int nbti = NeighbourTrig(i,j); if (nbti > i) { const STLTriangle & t2 = GetTriangle(nbti); if (t1.IsNeighbourFrom(t2)) { ecnt++; if (ecnt > edgedata->Size()) {PrintError("In Calc edge data, illegal geometry");} t1.GetNeighbourPoints(t2,np1,np2); /* ang = GetAngle(i,nbti); if (ang < -M_PI) {ang += 2*M_PI;}*/ // edgedata->Add(STLEdgeData(0, np1, np2, i, nbti),ecnt); edgedata->Elem(ecnt).SetStatus(ED_UNDEFINED); // edgedata->Elem(ecnt).top = this; // edgedata->Elem(ecnt).topedgenr = GetTopEdgeNum (np1, np2); } } } } //BuildEdgesPerPoint(); PopStatus(); } void STLGeometry :: CalcEdgeDataAngles() { PrintMessageCR (5,"calc edge data angles ... "); for (int i = 1; i <= GetNTE(); i++) { STLTopEdge & edge = GetTopEdge (i); double cosang = GetTriangle(edge.TrigNum(1)).Normal() * GetTriangle(edge.TrigNum(2)).Normal(); edge.SetCosAngle (cosang); } for (int i = 1; i <= edgedata->Size(); i++) { /* const STLEdgeData& e = edgedata->Get(i); ang = GetAngle(e.lt,e.rt); if (ang < -M_PI) {ang += 2*M_PI;} edgedata->Elem(i).angle = fabs(ang); */ } PrintMessage (5,"calc edge data angles ... done"); } void STLGeometry :: FindEdgesFromAngles() { // PrintFnStart("find edges from angles"); double min_edge_angle = stlparam.yangle/180.*M_PI; double cont_min_edge_angle = stlparam.contyangle/180.*M_PI; double cos_min_edge_angle = cos (min_edge_angle); double cos_cont_min_edge_angle = cos (cont_min_edge_angle); if (calcedgedataanglesnew) {CalcEdgeDataAngles(); calcedgedataanglesnew = 0;} for (int i = 1; i <= edgedata->Size(); i++) { STLTopEdge & sed = edgedata->Elem(i); if (sed.GetStatus() == ED_CANDIDATE || sed.GetStatus() == ED_UNDEFINED) { if (sed.CosAngle() <= cos_min_edge_angle) { sed.SetStatus (ED_CANDIDATE); } else { sed.SetStatus(ED_UNDEFINED); } } } if (stlparam.contyangle < stlparam.yangle) { int changed = 1; int its = 0; while (changed && stlparam.contyangle < stlparam.yangle) { its++; //(*mycout) << "." << flush; changed = 0; for (int i = 1; i <= edgedata->Size(); i++) { STLTopEdge & sed = edgedata->Elem(i); if (sed.CosAngle() <= cos_cont_min_edge_angle && sed.GetStatus() == ED_UNDEFINED && (edgedata->GetNConfCandEPP(sed.PNum(1)) == 1 || edgedata->GetNConfCandEPP(sed.PNum(2)) == 1)) { changed = 1; sed.SetStatus (ED_CANDIDATE); } } } } int confcand = 0; if (edgedata->GetNConfEdges() == 0) { confcand = 1; } for (int i = 1; i <= edgedata->Size(); i++) { STLTopEdge & sed = edgedata->Elem(i); if (sed.GetStatus() == ED_CONFIRMED || (sed.GetStatus() == ED_CANDIDATE && confcand)) { STLEdge se(sed.PNum(1),sed.PNum(2)); se.SetLeftTrig(sed.TrigNum(1)); se.SetRightTrig(sed.TrigNum(2)); AddEdge(se); } } BuildEdgesPerPoint(); //(*mycout) << "its for continued angle = " << its << endl; PrintMessage(5,"built ", GetNE(), " edges with yellow angle = ", stlparam.yangle, " degree"); } /* void STLGeometry :: FindEdgesFromAngles() { double yangle = stlparam.yangle; char * savetask = multithread.task; multithread.task = "find edges"; const double min_edge_angle = yangle/180.*M_PI; int np1, np2; double ang; int i; //(*mycout) << "area=" << Area() << endl; for (i = 1; i <= GetNT(); i++) { multithread.percent = (double)i/(double)GetReadNT()*100.; const STLTriangle & t1 = GetTriangle(i); //NeighbourTrigs(nt,i); for (int j = 1; j <= NONeighbourTrigs(i); j++) { int nbti = NeighbourTrig(i,j); if (nbti > i) { const STLTriangle & t2 = GetTriangle(nbti); if (t1.IsNeighbourFrom(t2)) { ang = GetAngle(i,nbti); if (ang < -M_PI*0.5) {ang += 2*M_PI;} t1.GetNeighbourPoints(t2,np1,np2); if (fabs(ang) >= min_edge_angle) { STLEdge se(np1,np2); se.SetLeftTrig(i); se.SetRightTrig(nbti); AddEdge(se); } } } } } (*mycout) << "added " << GetNE() << " edges" << endl; //BuildEdgesPerPoint(); multithread.percent = 100.; multithread.task = savetask; } */ void STLGeometry :: BuildEdgesPerPoint() { //cout << "*** build edges per point" << endl; edgesperpoint.SetSize(GetNP()); //add edges to points for (int i = 1; i <= GetNE(); i++) { //(*mycout) << "EDGE " << GetEdge(i).PNum(1) << " - " << GetEdge(i).PNum(2) << endl; for (int j = 1; j <= 2; j++) { AddEdgePP(GetEdge(i).PNum(j),i); } } } void STLGeometry :: AddFaceEdges() { PrintFnStart("Add starting edges for faces"); //für Kugel eine STLLine hinzufügen (Vorteil: verfeinerbar, unabhängig von Auflösung der Geometrie!!!): //Grenze von 1. gefundener chart Array edgecnt; Array chartindex; edgecnt.SetSize(GetNOFaces()); chartindex.SetSize(GetNOFaces()); for (int i = 1; i <= GetNOFaces(); i++) { edgecnt.Elem(i) = 0; chartindex.Elem(i) = 0; } for (int i = 1; i <= GetNT(); i++) { int fn = GetTriangle(i).GetFaceNum(); if (!chartindex.Get(fn)) {chartindex.Elem(fn) = GetChartNr(i);} for (int j = 1; j <= 3; j++) { edgecnt.Elem(fn) += GetNEPP(GetTriangle(i).PNum(j)); } } for (int i = 1; i <= GetNOFaces(); i++) { if (!edgecnt.Get(i)) {PrintMessage(5,"Face", i, " has no edge!");} } int changed = 0; int ap1, ap2; for (int i = 1; i <= GetNOFaces(); i++) { if (!edgecnt.Get(i)) { const STLChart& c = GetChart(chartindex.Get(i)); // bool foundone = false; int longest_ap1 = -1, longest_ap2 = -1; double maxlen = -1; for (int j = 1; j <= c.GetNChartT(); j++) { const STLTriangle& t1 = GetTriangle(c.GetChartTrig(j)); for (int k = 1; k <= 3; k++) { int nt = NeighbourTrig(c.GetChartTrig(j),k); if (GetChartNr(nt) != chartindex.Get(i)) { t1.GetNeighbourPoints(GetTriangle(nt),ap1,ap2); // AddEdge(ap1,ap2); double len = Dist(GetPoint(ap1), GetPoint(ap2)); if (len > maxlen) { maxlen = len; longest_ap1 = ap1; longest_ap2 = ap2; } changed = 1; } } } if (maxlen > 0) AddEdge(longest_ap1,longest_ap2); } } if (changed) BuildEdgesPerPoint(); } void STLGeometry :: LinkEdges() { PushStatusF("Link Edges"); PrintMessage(5,"have now ", GetNE(), " edges with yellow angle = ", stlparam.yangle, " degree"); int i; lines.SetSize(0); int starte(0); int edgecnt = 0; int found; int rev(0); //indicates, that edge is inserted reverse //worked edges Array we(GetNE()); //setlineendpoints; wenn 180°, dann keine endpunkte //nur punkte mit 2 edges kommen in frage, da bei mehr oder weniger punkten ohnehin ein meshpoint hinkommt Vec3d v1,v2; double cos_eca = cos(stlparam.edgecornerangle/180.*M_PI); int ecnt = 0; int lp1, lp2; if (stlparam.edgecornerangle < 180) { for (i = 1; i <= GetNP(); i++) { if (GetNEPP(i) == 2) { if (GetEdge(GetEdgePP(i,1)).PNum(2) == GetEdge(GetEdgePP(i,2)).PNum(1) || GetEdge(GetEdgePP(i,1)).PNum(1) == GetEdge(GetEdgePP(i,2)).PNum(2)) { lp1 = 1; lp2 = 2; } else { lp1 = 2; lp2 = 1; } v1 = Vec3d(GetPoint(GetEdge(GetEdgePP(i,1)).PNum(1)), GetPoint(GetEdge(GetEdgePP(i,1)).PNum(2))); v2 = Vec3d(GetPoint(GetEdge(GetEdgePP(i,2)).PNum(lp1)), GetPoint(GetEdge(GetEdgePP(i,2)).PNum(lp2))); if ((v1*v2)/sqrt(v1.Length2()*v2.Length2()) < cos_eca) { //(*testout) << "add edgepoint " << i << endl; SetLineEndPoint(i); ecnt++; } } } } PrintMessage(5, "added ", ecnt, " mesh_points due to edge corner angle (", stlparam.edgecornerangle, " degree)"); for (i = 1; i <= GetNE(); i++) {we.Elem(i) = 0;} while(edgecnt < GetNE()) { SetThreadPercent((double)edgecnt/(double)GetNE()*100.); STLLine* line = new STLLine(this); //find start edge int j = 1; found = 0; //try second time, if only rings are left!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! int second = 0; //find a starting edge at point with 1 or more than 2 edges or at lineendpoint while (!found && j<=GetNE()) { if (!we.Get(j)) { if (GetNEPP(GetEdge(j).PNum(1)) != 2 || IsLineEndPoint(GetEdge(j).PNum(1))) { starte = j; found = 1; rev = 0; } else if (GetNEPP(GetEdge(j).PNum(2)) != 2 || IsLineEndPoint(GetEdge(j).PNum(2))) { starte = j; found = 1; rev = 1; } else if (second) { starte = j; found = 1; rev = 0; //0 or 1 are possible } } j++; if (!second && j == GetNE()) {second = 1; j = 1;} } if (!found) {PrintSysError("No starting edge found, edgecnt=", edgecnt, ", GETNE=", GetNE());} line->AddPoint(GetEdge(starte).PNum(1+rev)); line->AddPoint(GetEdge(starte).PNum(2-rev)); if (!rev) { line->AddLeftTrig(GetEdge(starte).LeftTrig()); line->AddRightTrig(GetEdge(starte).RightTrig()); } else { line->AddLeftTrig(GetEdge(starte).RightTrig()); line->AddRightTrig(GetEdge(starte).LeftTrig()); } edgecnt++; we.Elem(starte) = 1; //add segments to line as long as segments other than starting edge are found or lineendpoint is reached found = 1; int other; while(found) { found = 0; int fp = GetEdge(starte).PNum(2-rev); if (GetNEPP(fp) == 2 && !IsLineEndPoint(fp)) { //find the "other" edge of point fp other = 0; if (GetEdgePP(fp,1) == starte) {other = 1;} starte = GetEdgePP(fp,1+other); //falls ring -> aufhoeren !!!!!!!!!!! if (!we.Elem(starte)) { found = 1; rev = 0; if (GetEdge(starte).PNum(2) == fp) {rev = 1;} else if (GetEdge(starte).PNum(1) != fp) {PrintSysError("In Link Edges!");} line->AddPoint(GetEdge(starte).PNum(2-rev)); if (!rev) { line->AddLeftTrig(GetEdge(starte).LeftTrig()); line->AddRightTrig(GetEdge(starte).RightTrig()); } else { line->AddLeftTrig(GetEdge(starte).RightTrig()); line->AddRightTrig(GetEdge(starte).LeftTrig()); } edgecnt++; we.Elem(starte) = 1; } } } AddLine(line); } PrintMessage(5,"number of lines generated = ", GetNLines()); //check, which lines must have at least one midpoint INDEX_2_HASHTABLE lineht(GetNLines()+1); for (i = 1; i <= GetNLines(); i++) { if (GetLine(i)->StartP() == GetLine(i)->EndP()) { GetLine(i)->DoSplit(); } } for (i = 1; i <= GetNLines(); i++) { INDEX_2 lineep (GetLine(i)->StartP(),GetLine(i)->EndP()); lineep.Sort(); if (lineht.Used (lineep)) { GetLine(i)->DoSplit(); int other = lineht.Get(lineep); GetLine(other)->DoSplit(); } else { lineht.Set (lineep, i); } } for (i = 1; i <= GetNLines(); i++) { STLLine* line = GetLine(i); for (int ii = 1; ii <= line->GetNS(); ii++) { int ap1, ap2; line->GetSeg(ii,ap1,ap2); // (*mycout) << "SEG " << p1 << " - " << p2 << endl; } } PopStatus(); } int STLGeometry :: GetNOBodys() { int markedtrigs1 = 0; int starttrig = 1; int i, k, nnt; int bodycnt = 0; Array bodynum(GetNT()); for (i = 1; i <= GetNT(); i++) bodynum.Elem(i)=0; while (markedtrigs1 < GetNT()) { for (i = starttrig; i <= GetNT(); i++) { if (!bodynum.Get(i)) { starttrig = i; break; } } //add all triangles around starttriangle, which is reachable without going over an edge Array todolist; Array nextlist; bodycnt++; markedtrigs1++; bodynum.Elem(starttrig) = bodycnt; todolist.Append(starttrig); while(todolist.Size()) { for (i = 1; i <= todolist.Size(); i++) { //const STLTriangle& tt = GetTriangle(todolist.Get(i)); for (k = 1; k <= NONeighbourTrigs(todolist.Get(i)); k++) { nnt = NeighbourTrig(todolist.Get(i),k); if (!bodynum.Get(nnt)) { nextlist.Append(nnt); bodynum.Elem(nnt) = bodycnt; markedtrigs1++; } } } todolist.SetSize(0); for (i = 1; i <= nextlist.Size(); i++) { todolist.Append(nextlist.Get(i)); } nextlist.SetSize(0); } } PrintMessage(3, "Geometry has ", bodycnt, " separated bodys"); return bodycnt; } void STLGeometry :: CalcFaceNums() { int markedtrigs1 = 0; int starttrig(0); int laststarttrig = 1; int i, k, nnt; facecnt = 0; for (i = 1; i <= GetNT(); i++) GetTriangle(i).SetFaceNum(0); while (markedtrigs1 < GetNT()) { for (i = laststarttrig; i <= GetNT(); i++) { if (!GetTriangle(i).GetFaceNum()) { starttrig = i; laststarttrig = i; break; } } //add all triangles around starttriangle, which is reachable without going over an edge Array todolist; Array nextlist; facecnt++; markedtrigs1++; GetTriangle(starttrig).SetFaceNum(facecnt); todolist.Append(starttrig); int ap1, ap2; while(todolist.Size()) { for (i = 1; i <= todolist.Size(); i++) { const STLTriangle& tt = GetTriangle(todolist.Get(i)); for (k = 1; k <= NONeighbourTrigs(todolist.Get(i)); k++) { nnt = NeighbourTrig(todolist.Get(i),k); STLTriangle& nt = GetTriangle(nnt); if (!nt.GetFaceNum()) { tt.GetNeighbourPoints(nt,ap1,ap2); if (!IsEdge(ap1,ap2)) { nextlist.Append(nnt); nt.SetFaceNum(facecnt); markedtrigs1++; } } } } todolist.SetSize(0); for (i = 1; i <= nextlist.Size(); i++) { todolist.Append(nextlist.Get(i)); } nextlist.SetSize(0); } } GetNOBodys(); PrintMessage(3,"generated ", facecnt, " faces"); } void STLGeometry :: ClearSpiralPoints() { spiralpoints.SetSize(GetNP()); int i; for (i = 1; i <= spiralpoints.Size(); i++) { spiralpoints.Elem(i) = 0; } } void STLGeometry :: BuildSmoothEdges () { if (smoothedges) delete smoothedges; smoothedges = new INDEX_2_HASHTABLE (GetNE()/10 + 1); // Jack: Ok ? // UseExternalEdges(); PushStatusF("Build Smooth Edges"); int nt = GetNT(); Vec3d ng1, ng2; for (int i = 1; i <= nt; i++) { if (multithread.terminate) {PopStatus();return;} SetThreadPercent(100.0 * (double)i / (double)nt); const STLTriangle & trig = GetTriangle (i); ng1 = trig.GeomNormal(points); ng1 /= (ng1.Length() + 1e-24); for (int j = 1; j <= 3; j++) { int nbt = NeighbourTrig (i, j); ng2 = GetTriangle(nbt).GeomNormal(points); ng2 /= (ng2.Length() + 1e-24); int pi1, pi2; trig.GetNeighbourPoints(GetTriangle(nbt), pi1, pi2); if (!IsEdge(pi1,pi2)) { if (ng1 * ng2 < 0) { PrintMessage(7,"smoothedge found"); INDEX_2 i2(pi1, pi2); i2.Sort(); smoothedges->Set (i2, 1); } } } } PopStatus(); } int STLGeometry :: IsSmoothEdge (int pi1, int pi2) const { if (!smoothedges) return 0; INDEX_2 i2(pi1, pi2); i2.Sort(); return smoothedges->Used (i2); } /* //function is not used now int IsInArray(int n, const Array& ia) { int i; for (i = 1; i <= ia.Size(); i++) { if (ia.Get(i) == n) {return 1;} } return 0; } */ void STLGeometry :: AddConeAndSpiralEdges() { PrintMessage(5,"have now ", GetNE(), " edges with yellow angle = ", stlparam.yangle, " degree"); PrintFnStart("AddConeAndSpiralEdges"); int i,j,k,n; // int changed = 0; //check edges, where inner chart and no outer chart come together without an edge int np1, np2, nt; int cnt = 0; for (i = 1; i <= GetNOCharts(); i++) { STLChart& chart = GetChart(i); for (j = 1; j <= chart.GetNChartT(); j++) { int t = chart.GetChartTrig(j); const STLTriangle& tt = GetTriangle(t); for (k = 1; k <= 3; k++) { nt = NeighbourTrig(t,k); if (GetChartNr(nt) != i && !TrigIsInOC(nt,i)) { tt.GetNeighbourPoints(GetTriangle(nt),np1,np2); if (!IsEdge(np1,np2)) { STLEdge se(np1,np2); se.SetLeftTrig(t); se.SetRightTrig(nt); int edgenum = AddEdge(se); AddEdgePP(np1,edgenum); AddEdgePP(np2,edgenum); //changed = 1; PrintWarning("Found a spiral like structure: chart=", i, ", trig=", t, ", p1=", np1, ", p2=", np2); cnt++; } } } } } PrintMessage(5, "found ", cnt, " spiral like structures"); PrintMessage(5, "added ", cnt, " edges due to spiral like structures"); cnt = 0; int edgecnt = 0; Array trigsaroundp; Array chartpointchecked; //gets number of chart, if in this chart already checked chartpointchecked.SetSize(GetNP()); for (i = 1; i <= GetNP(); i++) { chartpointchecked.Elem(i) = 0; } int onoc, notonoc, tpp, pn; int ap1, ap2, tn1, tn2, l, problem; if (!stldoctor.conecheck) {PrintWarning("++++++++++++ \ncone checking deactivated by user!!!!!\n+++++++++++++++"); return ;} PushStatus("Find Critical Points"); int addedges = 0; for (i = 1; i <= GetNOCharts(); i++) { SetThreadPercent((double)i/(double)GetNOCharts()*100.); if (multithread.terminate) {PopStatus();return;} STLChart& chart = GetChart(i); for (j = 1; j <= chart.GetNChartT(); j++) { int t = chart.GetChartTrig(j); const STLTriangle& tt = GetTriangle(t); for (k = 1; k <= 3; k++) { pn = tt.PNum(k); if (chartpointchecked.Get(pn) == i) {continue;} int checkpoint = 0; for (n = 1; n <= trigsperpoint.EntrySize(pn); n++) { if (trigsperpoint.Get(pn,n) != t && GetChartNr(trigsperpoint.Get(pn,n)) != i && !TrigIsInOC(trigsperpoint.Get(pn,n),i)) {checkpoint = 1;}; } if (checkpoint) { chartpointchecked.Elem(pn) = i; int worked = 0; int spworked = 0; GetSortedTrianglesAroundPoint(pn,t,trigsaroundp); trigsaroundp.Append(t); problem = 0; for (l = 2; l <= trigsaroundp.Size()-1; l++) { tn1 = trigsaroundp.Get(l-1); tn2 = trigsaroundp.Get(l); const STLTriangle& t1 = GetTriangle(tn1); const STLTriangle& t2 = GetTriangle(tn2); t1.GetNeighbourPoints(t2, ap1, ap2); if (IsEdge(ap1,ap2)) break; if (GetChartNr(tn2) != i && !TrigIsInOC(tn2,i)) {problem = 1;} } if (problem) { for (l = 2; l <= trigsaroundp.Size()-1; l++) { tn1 = trigsaroundp.Get(l-1); tn2 = trigsaroundp.Get(l); const STLTriangle& t1 = GetTriangle(tn1); const STLTriangle& t2 = GetTriangle(tn2); t1.GetNeighbourPoints(t2, ap1, ap2); if (IsEdge(ap1,ap2)) break; if ((GetChartNr(tn1) == i && GetChartNr(tn2) != i && TrigIsInOC(tn2,i)) || (GetChartNr(tn2) == i && GetChartNr(tn1) != i && TrigIsInOC(tn1,i))) { if (addedges || !GetNEPP(pn)) { STLEdge se(ap1,ap2); se.SetLeftTrig(tn1); se.SetRightTrig(tn2); int edgenum = AddEdge(se); AddEdgePP(ap1,edgenum); AddEdgePP(ap2,edgenum); edgecnt++; } if (!addedges && !GetSpiralPoint(pn)) { SetSpiralPoint(pn); spworked = 1; } worked = 1; } } } //backwards: problem = 0; for (l = trigsaroundp.Size()-1; l >= 2; l--) { tn1 = trigsaroundp.Get(l+1); tn2 = trigsaroundp.Get(l); const STLTriangle& t1 = GetTriangle(tn1); const STLTriangle& t2 = GetTriangle(tn2); t1.GetNeighbourPoints(t2, ap1, ap2); if (IsEdge(ap1,ap2)) break; if (GetChartNr(tn2) != i && !TrigIsInOC(tn2,i)) {problem = 1;} } if (problem) for (l = trigsaroundp.Size()-1; l >= 2; l--) { tn1 = trigsaroundp.Get(l+1); tn2 = trigsaroundp.Get(l); const STLTriangle& t1 = GetTriangle(tn1); const STLTriangle& t2 = GetTriangle(tn2); t1.GetNeighbourPoints(t2, ap1, ap2); if (IsEdge(ap1,ap2)) break; if ((GetChartNr(tn1) == i && GetChartNr(tn2) != i && TrigIsInOC(tn2,i)) || (GetChartNr(tn2) == i && GetChartNr(tn1) != i && TrigIsInOC(tn1,i))) { if (addedges || !GetNEPP(pn)) { STLEdge se(ap1,ap2); se.SetLeftTrig(tn1); se.SetRightTrig(tn2); int edgenum = AddEdge(se); AddEdgePP(ap1,edgenum); AddEdgePP(ap2,edgenum); edgecnt++; } if (!addedges && !GetSpiralPoint(pn)) { SetSpiralPoint(pn); spworked = 1; //if (GetNEPP(pn) == 0) {(*mycout) << "ERROR: spiralpoint with no edge found!" << endl;} } worked = 1; } } if (worked) { //(*testout) << "set edgepoint due to spirals: pn=" << i << endl; SetLineEndPoint(pn); } if (spworked) { /* (*mycout) << "Warning: Critical Point " << tt.PNum(k) << "( chart " << i << ", trig " << t << ") has been neutralized!!!" << endl; */ cnt++; } // markedpoints.Elem(tt.PNum(k)) = 1; } } } } PrintMessage(5, "found ", cnt, " critical points!"); PrintMessage(5, "added ", edgecnt, " edges due to critical points!"); PopStatus(); //search points where inner chart and outer chart and "no chart" trig come together at edge-point PrintMessage(7,"search for special chart points"); for (i = 1; i <= GetNOCharts(); i++) { STLChart& chart = GetChart(i); for (j = 1; j <= chart.GetNChartT(); j++) { int t = chart.GetChartTrig(j); const STLTriangle& tt = GetTriangle(t); for (k = 1; k <= 3; k++) { pn = tt.PNum(k); if (GetNEPP(pn) == 2) { onoc = 0; notonoc = 0; for (n = 1; n <= trigsperpoint.EntrySize(pn); n++) { tpp = trigsperpoint.Get(pn,n); if (tpp != t && GetChartNr(tpp) != i) { if (TrigIsInOC(tpp,i)) {onoc = 1;} if (!TrigIsInOC(tpp,i)) {notonoc = 1;} } } if (onoc && notonoc && !IsLineEndPoint(pn)) { GetSortedTrianglesAroundPoint(pn,t,trigsaroundp); int here = 1; //we start on this side of edge, !here = there int thereOC = 0; int thereNotOC = 0; for (l = 2; l <= trigsaroundp.Size(); l++) { GetTriangle(trigsaroundp.Get(l-1)). GetNeighbourPoints(GetTriangle(trigsaroundp.Get(l)), ap1, ap2); if (IsEdge(ap1,ap2)) {here = (here+1)%2;} if (!here && TrigIsInOC(trigsaroundp.Get(l),i)) {thereOC = 1;} if (!here && !TrigIsInOC(trigsaroundp.Get(l),i)) {thereNotOC = 1;} } if (thereOC && thereNotOC) { //(*mycout) << "Special OCICnotC - point " << pn << " found!" << endl; //(*testout) << "set edgepoint due to spirals: pn=" << i << endl; SetLineEndPoint(pn); } } } } } } PrintMessage(5,"have now ", GetNE(), " edges with yellow angle = ", stlparam.yangle, " degree"); } //get trigs at a point, started with starttrig, then every left void STLGeometry :: GetSortedTrianglesAroundPoint(int p, int starttrig, Array& trigs) { int acttrig = starttrig; trigs.SetAllocSize(trigsperpoint.EntrySize(p)); trigs.SetSize(0); trigs.Append(acttrig); int i, j, t, ap1, ap2, locindex1(0), locindex2(0); //(*mycout) << "trigs around point " << p << endl; int end = 0; while (!end) { const STLTriangle& at = GetTriangle(acttrig); for (i = 1; i <= trigsperpoint.EntrySize(p); i++) { t = trigsperpoint.Get(p,i); const STLTriangle& nt = GetTriangle(t); if (at.IsNeighbourFrom(nt)) { at.GetNeighbourPoints(nt, ap1, ap2); if (ap2 == p) {Swap(ap1,ap2);} if (ap1 != p) {PrintSysError("In GetSortedTrianglesAroundPoint!!!");} for (j = 1; j <= 3; j++) { if (at.PNum(j) == ap1) {locindex1 = j;}; if (at.PNum(j) == ap2) {locindex2 = j;}; } if ((locindex2+1)%3+1 == locindex1) { if (t != starttrig) { trigs.Append(t); // (*mycout) << "trig " << t << endl; acttrig = t; } else { end = 1; } break; } } } } } /* int STLGeometry :: NeighbourTrig(int trig, int nr) const { return neighbourtrigs.Get(trig,nr); } */ void STLGeometry :: SmoothGeometry () { int i, j, k; double maxerr0, maxerr; for (i = 1; i <= GetNP(); i++) { if (GetNEPP(i)) continue; maxerr0 = 0; for (j = 1; j <= NOTrigsPerPoint(i); j++) { int tnum = TrigPerPoint(i, j); double err = Angle (GetTriangle(tnum).Normal (), GetTriangle(tnum).GeomNormal(GetPoints())); if (err > maxerr0) maxerr0 = err; } Point3d pi = GetPoint (i); if (maxerr0 < 1.1) continue; // about 60 degree maxerr0 /= 2; // should be at least halfen for (k = 1; k <= NOTrigsPerPoint(i); k++) { const STLTriangle & trig = GetTriangle (TrigPerPoint (i, k)); Point3d c = Center(GetPoint (trig.PNum(1)), GetPoint (trig.PNum(2)), GetPoint (trig.PNum(3))); Point3d np = pi + 0.1 * (c - pi); SetPoint (i, np); maxerr = 0; for (j = 1; j <= NOTrigsPerPoint(i); j++) { int tnum = TrigPerPoint(i, j); double err = Angle (GetTriangle(tnum).Normal (), GetTriangle(tnum).GeomNormal(GetPoints())); if (err > maxerr) maxerr = err; } if (maxerr < maxerr0) { pi = np; } } SetPoint (i, pi); } } class STLGeometryRegister : public GeometryRegister { public: virtual NetgenGeometry * Load (string filename) const; }; NetgenGeometry * STLGeometryRegister :: Load (string filename) const { const char * cfilename = filename.c_str(); if (strcmp (&cfilename[strlen(cfilename)-3], "stl") == 0) { PrintMessage (1, "Load STL geometry file ", cfilename); ifstream infile(cfilename); STLGeometry * hgeom = STLGeometry :: Load (infile); hgeom -> edgesfound = 0; return hgeom; } else if (strcmp (&cfilename[strlen(cfilename)-4], "stlb") == 0) { PrintMessage (1, "Load STL binary geometry file ", cfilename); ifstream infile(cfilename); STLGeometry * hgeom = STLGeometry :: LoadBinary (infile); hgeom -> edgesfound = 0; return hgeom; } else if (strcmp (&cfilename[strlen(cfilename)-3], "nao") == 0) { PrintMessage (1, "Load naomi (F. Kickinger) geometry file ", cfilename); ifstream infile(cfilename); STLGeometry * hgeom = STLGeometry :: LoadNaomi (infile); hgeom -> edgesfound = 0; return hgeom; } return NULL; } class STLInit { public: STLInit() { geometryregister.Append (new STLGeometryRegister); } }; STLInit stlinit; } netgen-6.2.1804/libsrc/stlgeom/stltool.hpp0000644000175000017500000001747513272137567017164 0ustar kurtkurt#ifndef FILE_STLTOOL #define FILE_STLTOOL //#include "gprim/gprim.hh" /**************************************************************************/ /* File: stlgeom.hh */ /* Author: Joachim Schoeberl */ /* Author2: Johannes Gerstmayr */ /* Date: 20. Nov. 99 */ /**************************************************************************/ // use one normal vector for whole chart extern int usechartnormal; extern int chartdebug; extern int geomsearchtreeon; extern int AddPointIfNotExists(Array& ap, const Point3d& p, double eps = 1e-8); //get distance from line lp1-lp2 to point p extern double GetDistFromLine(const Point<3>& lp1, const Point<3>& lp2, Point<3>& p); extern double GetDistFromInfiniteLine(const Point<3>& lp1, const Point<3>& lp2, const Point<3>& p); extern void FIOReadInt(istream& ios, int& i); extern void FIOWriteInt(ostream& ios, const int& i); extern void FIOReadDouble(istream& ios, double& i); extern void FIOWriteDouble(ostream& ios, const double& i); extern void FIOReadFloat(istream& ios, float& i); extern void FIOWriteFloat(ostream& ios, const float& i); extern void FIOReadString(istream& ios, char* str, int len); extern void FIOReadStringE(istream& ios, char* str, int len); extern void FIOWriteString(ostream& ios, char* str, int len); typedef Array * ArrayINTPTR; class STLGeometry; class STLChart { private: STLGeometry * geometry; Array* charttrigs; // trigs which only belong to this chart Array* outertrigs; // trigs which belong to other charts BoxTree<3> * searchtree; // ADT containing outer trigs Array* olimit; //outer limit of outer chart Array* ilimit; //outer limit of inner chart public: STLChart(STLGeometry * ageometry); void AddChartTrig(int i); void AddOuterTrig(int i); int IsInWholeChart(int nr) const; int GetChartTrig(int i) const {return charttrigs->Get(i);} int GetOuterTrig(int i) const {return outertrigs->Get(i);} //get all trigs: int GetTrig(int i) const { if (i <= charttrigs->Size()) {return charttrigs->Get(i);} else {return outertrigs->Get(i-charttrigs->Size());} } int GetNChartT() const {return charttrigs->Size();} int GetNOuterT() const {return outertrigs->Size();} int GetNT() const {return charttrigs->Size()+outertrigs->Size(); } void GetTrianglesInBox (const Point3d & pmin, const Point3d & pmax, Array & trias) const; void AddOLimit(twoint l) {olimit->Append(l);} void AddILimit(twoint l) {ilimit->Append(l);} void ClearOLimit() {olimit->SetSize(0);} void ClearILimit() {ilimit->SetSize(0);} int GetNOLimit() const {return olimit->Size();} int GetNILimit() const {return ilimit->Size();} twoint GetOLimit(int i) const {return olimit->Get(i);} twoint GetILimit(int i) const {return ilimit->Get(i);} //move triangles trigs (local chart-trig numbers) to outer chart void MoveToOuterChart(const Array& trigs); void DelChartTrigs(const Array& trigs); // define local coordinate system, JS: private: Vec<3> normal; Point<3> pref; Vec<3> t1, t2; public: void SetNormal (const Point<3> & apref, const Vec<3> & anormal); const Vec<3> & GetNormal () const { return normal; } Point<2> Project2d (const Point<3> & p3d) const { Vec<3> v = p3d-pref; return Point<2> (t1 * v, t2 * v); } }; class STLBoundarySeg { Point<3> p1, p2, center; Point<2> p2d1, p2d2; Box<2> boundingbox; // Point<2> p2dmin, p2dmax; double rad; int i1, i2; int smoothedge; public: STLBoundarySeg () { ; } STLBoundarySeg (int ai1, int ai2, const Array > & points, const STLChart * chart) : p1(points.Get(ai1)), p2(points.Get(ai2)), i1(ai1), i2(ai2) { center = ::netgen::Center (p1, p2); rad = Dist (p1, center); p2d1 = chart->Project2d (p1); p2d2 = chart->Project2d (p2); boundingbox.Set (p2d1); boundingbox.Add (p2d2); } int operator== (const STLBoundarySeg & s2) const { return i1 == s2.i1 && i2 == s2.i2; } void Swap (); int I1() const { return i1; } int I2() const { return i2; } const Point<3> & P1() const { return p1; } const Point<3> & P2() const { return p2; } const Point<2> & P2D1() const { return p2d1; } const Point<2> & P2D2() const { return p2d2; } const Point<2> & P2DMin() const { return boundingbox.PMin(); } const Point<2> & P2DMax() const { return boundingbox.PMax(); } const Point<3> & Center() const { return center; } const Box<2> & BoundingBox() const { return boundingbox; } double Radius () const { return rad; } void SetSmoothEdge (int se) { smoothedge = se; } int IsSmoothEdge () const { return smoothedge; } friend class STLBoundary; }; class STLBoundary { private: STLGeometry * geometry; const STLChart * chart; Array boundary; ClosedHashTable boundary_ht; BoxTree<2,INDEX_2> * searchtree = nullptr; public: STLBoundary(STLGeometry * ageometry); ~STLBoundary() { delete searchtree; } void Clear() {boundary.SetSize(0); boundary_ht = ClosedHashTable(); } void SetChart (const STLChart * achart) { chart = achart; } //don't check, if already exists! void AddNewSegment(const STLBoundarySeg & seg) {boundary.Append(seg);}; //check if segment exists void AddOrDelSegment(const STLBoundarySeg & seg); //addordelsegment for all 3 triangle segments! void AddTriangle(const STLTriangle & t); int NOSegments() {return boundary.Size();}; const STLBoundarySeg & GetSegment(int i) {return boundary.Get(i);} void BuildSearchTree(); void DeleteSearchTree(); int TestSeg(const Point<3> & p1, const Point<3> & p2, const Vec<3> & sn, double sinchartangle, int divisions, Array >& points, double eps); int TestSegChartNV(const Point3d& p1, const Point3d& p2, const Vec3d& sn); }; class STLDoctorParams { public: int drawmeshededges; double geom_tol_fact; double longlinefact; int showexcluded; int selectmode; //0==trig, 1==edge, 2==point, 3==multiedge, 4==line cluster int edgeselectmode; int useexternaledges; int showfaces; int showedgecornerpoints; int showtouchedtrigchart; int conecheck; int spiralcheck; int selecttrig; int nodeofseltrig; int selectwithmouse; int showmarkedtrigs; double dirtytrigfact; double smoothangle; double smoothnormalsweight; int showvicinity; int vicinity; /// STLDoctorParams(); /// void Print (ostream & ost) const; }; DLL_HEADER extern STLDoctorParams stldoctor; class STLParameters { public: /// angle for edge detection double yangle; double contyangle; //edges continued with contyangle /// angle of geometry edge at which the mesher should set a point double edgecornerangle; /// angle inside on chart double chartangle; /// angle for overlapping parts of char double outerchartangle; /// 0 .. no, 1 .. local, (2 .. global) int usesearchtree; /// double resthatlasfac; int resthatlasenable; double atlasminh; double resthsurfcurvfac; int resthsurfcurvenable; double resthchartdistfac; int resthchartdistenable; double resthcloseedgefac; int resthcloseedgeenable; double resthedgeanglefac; int resthedgeangleenable; double resthsurfmeshcurvfac; int resthsurfmeshcurvenable; double resthlinelengthfac; int resthlinelengthenable; /// int recalc_h_opt; /// STLParameters(); /// void Print (ostream & ost) const; }; DLL_HEADER extern STLParameters stlparam; void STLMeshing (STLGeometry & geom, class Mesh & mesh); int STLSurfaceMeshing (STLGeometry & geom, class Mesh & mesh); void STLSurfaceOptimization (STLGeometry & geom, class Mesh & mesh, class MeshingParameters & mparam); #endif netgen-6.2.1804/libsrc/stlgeom/meshstlsurface.hpp0000644000175000017500000000635513272137567020507 0ustar kurtkurt#ifndef FILE_MESHSTLSURF #define FILE_MESHSTLSURF /* *************************************************************************/ /* File: meshstlsurf.hpp */ /* Author: Johannes Gerstmayr, Joachim Schoeberl */ /* Date: 01. Aug. 99 */ /* *************************************************************************/ /* The interface between mesh generation and stl geometry */ /// class MeshingSTLSurface : public Meshing2 { /// STLGeometry & geom; /// int transformationtrig; public: /// MeshingSTLSurface (STLGeometry & ageom, const MeshingParameters & mp); protected: /// virtual void DefineTransformation (const Point3d & p1, const Point3d & p2, const PointGeomInfo * geominfo1, const PointGeomInfo * geominfo2); /// virtual void TransformToPlain (const Point3d & locpoint, const MultiPointGeomInfo & geominfo, Point2d & plainpoint, double h, int & zone); /// virtual int TransformFromPlain (Point2d & plainpoint, Point3d & locpoint, PointGeomInfo & gi, double h); /// virtual int BelongsToActiveChart (const Point3d & p, const PointGeomInfo & gi); /// virtual int ComputePointGeomInfo (const Point3d & p, PointGeomInfo & gi); /// virtual int ChooseChartPointGeomInfo (const MultiPointGeomInfo & mpgi, PointGeomInfo & pgi); /// virtual int IsLineVertexOnChart (const Point3d & p1, const Point3d & p2, int endpoint, const PointGeomInfo & gi); virtual void GetChartBoundary (Array & points, Array & poitns3d, Array & lines, double h) const; /// virtual double CalcLocalH (const Point3d & p, double gh) const; /// virtual double Area () const; }; /// class MeshOptimizeSTLSurface : public MeshOptimize2d { /// STLGeometry & geom; public: /// MeshOptimizeSTLSurface (STLGeometry & ageom); /// virtual void SelectSurfaceOfPoint (const Point<3> & p, const PointGeomInfo & gi); /// virtual void ProjectPoint (INDEX surfind, Point<3> & p) const; /// virtual void ProjectPoint2 (INDEX surfind, INDEX surfind2, Point<3> & p) const; /// virtual int CalcPointGeomInfo(PointGeomInfo& gi, const Point<3> & p3) const; /// virtual void GetNormalVector(INDEX surfind, const Point<3> & p, Vec<3> & n) const; }; class RefinementSTLGeometry : public Refinement { const STLGeometry & geom; public: RefinementSTLGeometry (const STLGeometry & ageom); virtual ~RefinementSTLGeometry (); virtual void PointBetween (const Point<3> & p1, const Point<3> & p2, double secpoint, int surfi, const PointGeomInfo & gi1, const PointGeomInfo & gi2, Point<3> & newp, PointGeomInfo & newgi) const; virtual void PointBetween (const Point<3> & p1, const Point<3> & p2, double secpoint, int surfi1, int surfi2, const EdgePointGeomInfo & ap1, const EdgePointGeomInfo & ap2, Point<3> & newp, EdgePointGeomInfo & newgi) const; virtual void ProjectToSurface (Point<3> & p, int surfi) const; virtual void ProjectToSurface (Point<3> & p, int surfi, PointGeomInfo & gi) const; }; #endif netgen-6.2.1804/libsrc/stlgeom/stlpkg.cpp0000644000175000017500000003512513272137567016753 0ustar kurtkurt#include #include #include #include #include #include #include #include #include "vsstl.hpp" extern "C" int Ng_STL_Init (Tcl_Interp * interp); namespace netgen { DLL_HEADER extern shared_ptr ng_geometry; DLL_HEADER extern shared_ptr mesh; static VisualSceneSTLGeometry vsstlgeom; static VisualSceneSTLMeshing vsstlmeshing; char * err_needsstlgeometry = (char*) "This operation needs an STL geometry"; class STLGeometryVisRegister : public GeometryRegister { public: virtual NetgenGeometry * Load (string filename) const { return NULL; } virtual VisualScene * GetVisualScene (const NetgenGeometry * geom) const; virtual void SetParameters (Tcl_Interp * interp) { stlparam.yangle = atof (Tcl_GetVar (interp, "::stloptions.yangle", 0)); stlparam.contyangle = atof (Tcl_GetVar (interp, "::stloptions.contyangle", 0)); stlparam.edgecornerangle = atof (Tcl_GetVar (interp, "::stloptions.edgecornerangle", 0)); stlparam.chartangle = atof (Tcl_GetVar (interp, "::stloptions.chartangle", 0)); stlparam.outerchartangle = atof (Tcl_GetVar (interp, "::stloptions.outerchartangle", 0)); stlparam.usesearchtree = atoi (Tcl_GetVar (interp, "::stloptions.usesearchtree", 0)); stlparam.atlasminh = atof (Tcl_GetVar (interp, "::stloptions.atlasminh", 0)); stlparam.resthsurfcurvfac = atof (Tcl_GetVar (interp, "::stloptions.resthsurfcurvfac", 0)); stlparam.resthsurfcurvenable = atoi (Tcl_GetVar (interp, "::stloptions.resthsurfcurvenable", 0)); stlparam.resthatlasfac = atof (Tcl_GetVar (interp, "::stloptions.resthatlasfac", 0)); stlparam.resthatlasenable = atoi (Tcl_GetVar (interp, "::stloptions.resthatlasenable", 0)); stlparam.resthchartdistfac = atof (Tcl_GetVar (interp, "::stloptions.resthchartdistfac", 0)); stlparam.resthchartdistenable = atoi (Tcl_GetVar (interp, "::stloptions.resthchartdistenable", 0)); stlparam.resthlinelengthfac = atof (Tcl_GetVar (interp, "::stloptions.resthlinelengthfac", 0)); stlparam.resthlinelengthenable = atoi (Tcl_GetVar (interp, "::stloptions.resthlinelengthenable", 0)); stlparam.resthcloseedgefac = atof (Tcl_GetVar (interp, "::stloptions.resthcloseedgefac", 0)); stlparam.resthcloseedgeenable = atoi (Tcl_GetVar (interp, "::stloptions.resthcloseedgeenable", 0)); stlparam.resthedgeanglefac = atof (Tcl_GetVar (interp, "::stloptions.resthedgeanglefac", 0)); stlparam.resthedgeangleenable = atoi (Tcl_GetVar (interp, "::stloptions.resthedgeangleenable", 0)); stlparam.resthsurfmeshcurvfac = atof (Tcl_GetVar (interp, "::stloptions.resthsurfmeshcurvfac", 0)); stlparam.resthsurfmeshcurvenable = atoi (Tcl_GetVar (interp, "::stloptions.resthsurfmeshcurvenable", 0)); stlparam.recalc_h_opt = atoi (Tcl_GetVar (interp, "::stloptions.recalchopt", 0)); // stlparam.Print (cout); } }; int Ng_SetSTLParameters (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { STLGeometryVisRegister reg; reg.SetParameters (interp); return TCL_OK; } int Ng_STLDoctor (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { //cout << "STL doctor" << endl; STLGeometry * stlgeometry = dynamic_cast (ng_geometry.get()); stldoctor.drawmeshededges = atoi (Tcl_GetVar (interp, "::stldoctor.drawmeshededges", 0)); stldoctor.geom_tol_fact = atof (Tcl_GetVar (interp, "::stldoctor.geom_tol_fact", 0)); stldoctor.useexternaledges = atoi (Tcl_GetVar (interp, "::stldoctor.useexternaledges", 0)); stldoctor.showfaces = atoi (Tcl_GetVar (interp, "::stldoctor.showfaces", 0)); stldoctor.conecheck = atoi (Tcl_GetVar (interp, "::stldoctor.conecheck", 0)); stldoctor.spiralcheck = atoi (Tcl_GetVar (interp, "::stldoctor.spiralcheck", 0)); stldoctor.selectwithmouse = atoi (Tcl_GetVar (interp, "::stldoctor.selectwithmouse", 0)); stldoctor.showedgecornerpoints = atoi (Tcl_GetVar (interp, "::stldoctor.showedgecornerpoints", 0)); stldoctor.showmarkedtrigs = atoi (Tcl_GetVar (interp, "::stldoctor.showmarkedtrigs", 0)); stldoctor.showtouchedtrigchart = atoi (Tcl_GetVar (interp, "::stldoctor.showtouchedtrigchart", 0)); //cout << "smt=" << stldoctor.showmarkedtrigs << endl; stldoctor.dirtytrigfact = atof (Tcl_GetVar (interp, "::stldoctor.dirtytrigfact", 0)); stldoctor.smoothnormalsweight = atof (Tcl_GetVar (interp, "::stldoctor.smoothnormalsweight", 0)); stldoctor.smoothangle = atof (Tcl_GetVar (interp, "::stldoctor.smoothangle", 0)); stldoctor.selectmode = atoi (Tcl_GetVar (interp, "::stldoctor.selectmode", 0)); stldoctor.edgeselectmode = atoi (Tcl_GetVar (interp, "::stldoctor.edgeselectmode", 0)); stldoctor.longlinefact = atoi (Tcl_GetVar (interp, "::stldoctor.longlinefact", 0)); stldoctor.showexcluded = atoi (Tcl_GetVar (interp, "::stldoctor.showexcluded", 0)); if (!stldoctor.selectwithmouse) { stldoctor.selecttrig = atoi (Tcl_GetVar (interp, "::stldoctor.selecttrig", 0)); stldoctor.nodeofseltrig = atoi (Tcl_GetVar (interp, "::stldoctor.nodeofseltrig", 0)); } stldoctor.showvicinity = atoi (Tcl_GetVar (interp, "::stldoctor.showvicinity", 0)); stldoctor.vicinity = atoi (Tcl_GetVar (interp, "::stldoctor.vicinity", 0)); if (argc >= 2) { if (!stlgeometry) { Tcl_SetResult (interp, err_needsstlgeometry, TCL_STATIC); return TCL_ERROR; } if (strcmp (argv[1], "destroy0trigs") == 0) { stlgeometry->DestroyDirtyTrigs(); } else if (strcmp (argv[1], "movepointtomiddle") == 0) { stlgeometry->MoveSelectedPointToMiddle(); } else if (strcmp (argv[1], "calcnormals") == 0) { stlgeometry->CalcNormalsFromGeometry(); } else if (strcmp (argv[1], "showchartnum") == 0) { stlgeometry->ShowSelectedTrigChartnum(); } else if (strcmp (argv[1], "showcoords") == 0) { stlgeometry->ShowSelectedTrigCoords(); } else if (strcmp (argv[1], "loadmarkedtrigs") == 0) { stlgeometry->LoadMarkedTrigs(); } else if (strcmp (argv[1], "savemarkedtrigs") == 0) { stlgeometry->SaveMarkedTrigs(); } else if (strcmp (argv[1], "neighbourangles") == 0) { stlgeometry->NeighbourAnglesOfSelectedTrig(); } else if (strcmp (argv[1], "vicinity") == 0) { stlgeometry->CalcVicinity(stldoctor.selecttrig); } else if (strcmp (argv[1], "markdirtytrigs") == 0) { stlgeometry->MarkDirtyTrigs(); } else if (strcmp (argv[1], "smoothdirtytrigs") == 0) { stlgeometry->SmoothDirtyTrigs(); } else if (strcmp (argv[1], "smoothrevertedtrigs") == 0) { stlgeometry->GeomSmoothRevertedTrigs(); } else if (strcmp (argv[1], "invertselectedtrig") == 0) { stlgeometry->InvertTrig(stlgeometry->GetSelectTrig()); } else if (strcmp (argv[1], "deleteselectedtrig") == 0) { stlgeometry->DeleteTrig(stlgeometry->GetSelectTrig()); } else if (strcmp (argv[1], "smoothgeometry") == 0) { stlgeometry->SmoothGeometry(); } else if (strcmp (argv[1], "orientafterselectedtrig") == 0) { stlgeometry->OrientAfterTrig(stlgeometry->GetSelectTrig()); } else if (strcmp (argv[1], "marktoperrortrigs") == 0) { stlgeometry->MarkTopErrorTrigs(); } else if (strcmp (argv[1], "exportedges") == 0) { stlgeometry->ExportEdges(); } else if (strcmp (argv[1], "importedges") == 0) { stlgeometry->ImportEdges(); } else if (strcmp (argv[1], "importexternaledges") == 0) { stlgeometry->ImportExternalEdges(argv[2]); } else if (strcmp (argv[1], "loadedgedata") == 0) { if (argc >= 3) { stlgeometry->LoadEdgeData(argv[2]); } } else if (strcmp (argv[1], "saveedgedata") == 0) { if (argc >= 3) { stlgeometry->SaveEdgeData(argv[2]); } } else if (strcmp (argv[1], "buildexternaledges") == 0) { stlgeometry->BuildExternalEdgesFromEdges(); } else if (strcmp (argv[1], "smoothnormals") == 0) { stlgeometry->SmoothNormals(); } else if (strcmp (argv[1], "marknonsmoothnormals") == 0) { stlgeometry->MarkNonSmoothNormals(); } else if (strcmp (argv[1], "addexternaledge") == 0) { stlgeometry->AddExternalEdgeAtSelected(); } else if (strcmp (argv[1], "addgeomline") == 0) { stlgeometry->AddExternalEdgesFromGeomLine(); } else if (strcmp (argv[1], "addlonglines") == 0) { stlgeometry->AddLongLinesToExternalEdges(); } else if (strcmp (argv[1], "addclosedlines") == 0) { stlgeometry->AddClosedLinesToExternalEdges(); } else if (strcmp (argv[1], "addnotsinglelines") == 0) { stlgeometry->AddAllNotSingleLinesToExternalEdges(); } else if (strcmp (argv[1], "deletedirtyexternaledges") == 0) { stlgeometry->DeleteDirtyExternalEdges(); } else if (strcmp (argv[1], "deleteexternaledge") == 0) { stlgeometry->DeleteExternalEdgeAtSelected(); } else if (strcmp (argv[1], "deletevicexternaledge") == 0) { stlgeometry->DeleteExternalEdgeInVicinity(); } else if (strcmp (argv[1], "addlonglines") == 0) { stlgeometry->STLDoctorLongLinesToCandidates(); } else if (strcmp (argv[1], "deletedirtyedges") == 0) { stlgeometry->STLDoctorDirtyEdgesToCandidates(); } else if (strcmp (argv[1], "undoedgechange") == 0) { stlgeometry->UndoEdgeChange(); } else if (strcmp (argv[1], "buildedges") == 0) { stlgeometry->STLDoctorBuildEdges(); } else if (strcmp (argv[1], "confirmedge") == 0) { stlgeometry->STLDoctorConfirmEdge(); } else if (strcmp (argv[1], "candidateedge") == 0) { stlgeometry->STLDoctorCandidateEdge(); } else if (strcmp (argv[1], "excludeedge") == 0) { stlgeometry->STLDoctorExcludeEdge(); } else if (strcmp (argv[1], "undefinededge") == 0) { stlgeometry->STLDoctorUndefinedEdge(); } else if (strcmp (argv[1], "setallundefinededges") == 0) { stlgeometry->STLDoctorSetAllUndefinedEdges(); } else if (strcmp (argv[1], "erasecandidateedges") == 0) { stlgeometry->STLDoctorEraseCandidateEdges(); } else if (strcmp (argv[1], "confirmcandidateedges") == 0) { stlgeometry->STLDoctorConfirmCandidateEdges(); } else if (strcmp (argv[1], "confirmedtocandidateedges") == 0) { stlgeometry->STLDoctorConfirmedToCandidateEdges(); } } return TCL_OK; } int Ng_STLInfo (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { double data[10]; static char buf[20]; STLGeometry * stlgeometry = dynamic_cast (ng_geometry.get()); if (!stlgeometry) { Tcl_SetResult (interp, err_needsstlgeometry, TCL_STATIC); return TCL_ERROR; } if (stlgeometry) { stlgeometry->STLInfo(data); // cout << "NT=" << data[0] << endl; if (argc == 2) { if (strcmp (argv[1], "status") == 0) { switch (stlgeometry->GetStatus()) { case STLGeometry::STL_GOOD: strcpy (buf, "GOOD"); break; case STLGeometry::STL_WARNING: strcpy (buf, "WARNING"); break; case STLGeometry::STL_ERROR: strcpy (buf, "ERROR"); break; } Tcl_SetResult (interp, buf, TCL_STATIC); return TCL_OK; } if (strcmp (argv[1], "statustext") == 0) { Tcl_SetResult (interp, (char*)stlgeometry->GetStatusText().c_str(), TCL_STATIC); return TCL_OK; } if (strcmp (argv[1], "topology_ok") == 0) { sprintf (buf, "%d", stlgeometry->Topology_Ok()); Tcl_SetResult (interp, buf, TCL_STATIC); } if (strcmp (argv[1], "orientation_ok") == 0) { sprintf (buf, "%d", stlgeometry->Orientation_Ok()); Tcl_SetResult (interp, buf, TCL_STATIC); } } } else { data[0] = 0; data[1] = 0; data[2] = 0; data[3] = 0; data[4] = 0; data[5] = 0; data[6] = 0; data[7] = 0; } sprintf (buf, "%i", (int)data[0]); Tcl_SetVar (interp, argv[1], buf, 0); sprintf (buf, "%5.3g", data[1]); Tcl_SetVar (interp, argv[2], buf, 0); sprintf (buf, "%5.3g", data[2]); Tcl_SetVar (interp, argv[3], buf, 0); sprintf (buf, "%5.3g", data[3]); Tcl_SetVar (interp, argv[4], buf, 0); sprintf (buf, "%5.3g", data[4]); Tcl_SetVar (interp, argv[5], buf, 0); sprintf (buf, "%5.3g", data[5]); Tcl_SetVar (interp, argv[6], buf, 0); sprintf (buf, "%5.3g", data[6]); Tcl_SetVar (interp, argv[7], buf, 0); sprintf (buf, "%i", (int)data[7]); Tcl_SetVar (interp, argv[8], buf, 0); return TCL_OK; } extern int Ng_SetMeshingParameters (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]); int Ng_STLCalcLocalH (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { for (int i = 0; i < geometryregister.Size(); i++) geometryregister[i] -> SetParameters (interp); Ng_SetMeshingParameters (clientData, interp, argc, argv); STLGeometry * stlgeometry = dynamic_cast (ng_geometry.get()); if (mesh && stlgeometry) { mesh -> SetLocalH (stlgeometry->GetBoundingBox().PMin() - Vec3d(10, 10, 10), stlgeometry->GetBoundingBox().PMax() + Vec3d(10, 10, 10), mparam.grading); stlgeometry -> RestrictLocalH(*mesh, mparam.maxh); if (stlparam.resthsurfmeshcurvenable) mesh -> CalcLocalHFromSurfaceCurvature (mparam.grading, stlparam.resthsurfmeshcurvfac); } return TCL_OK; } VisualScene * STLGeometryVisRegister :: GetVisualScene (const NetgenGeometry * geom) const { const STLGeometry * geometry = dynamic_cast (geom); if (geometry) { vsstlmeshing.SetGeometry (const_cast (geometry)); return &vsstlmeshing; } return NULL; } } using namespace netgen; extern "C" int Ng_stl_Init (Tcl_Interp * interp); int Ng_stl_Init (Tcl_Interp * interp) { geometryregister.Append (new STLGeometryVisRegister); Tcl_CreateCommand (interp, "Ng_SetSTLParameters", Ng_SetSTLParameters, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_STLDoctor", Ng_STLDoctor, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_STLInfo", Ng_STLInfo, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_STLCalcLocalH", Ng_STLCalcLocalH, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); return TCL_OK; } netgen-6.2.1804/libsrc/stlgeom/stltopology.cpp0000644000175000017500000005367713272137567020062 0ustar kurtkurt#include #include #include #include #include #include "stlgeom.hpp" #include namespace netgen { STLTopology :: STLTopology() : trias(), topedges(), points(), ht_topedges(NULL), trigsperpoint(), neighbourtrigs() { ; } STLTopology :: ~STLTopology() { ; } STLGeometry * STLTopology :: LoadBinary (istream & ist) { STLGeometry * geom = new STLGeometry(); Array readtrigs; PrintMessage(1,"Read STL binary file"); if (sizeof(int) != 4 || sizeof(float) != 4) { PrintWarning("for stl-binary compatibility only use 32 bit compilation!!!"); } //specific settings for stl-binary format const int namelen = 80; //length of name of header in file const int nospaces = 2; //number of spaces after a triangle //read header: name char buf[namelen+1]; FIOReadStringE(ist,buf,namelen); PrintMessage(5,"header = ",buf); //Read Number of facets int nofacets; FIOReadInt(ist,nofacets); PrintMessage(5,"NO facets = ",nofacets); Point<3> pts[3]; Vec<3> normal; char spaces[nospaces+1]; for (int cntface = 0; cntface < nofacets; cntface++) { if (cntface % 10000 == 0) // { PrintDot(); } PrintMessageCR (3, cntface, " triangles loaded\r"); float f; FIOReadFloat(ist,f); normal(0) = f; FIOReadFloat(ist,f); normal(1) = f; FIOReadFloat(ist,f); normal(2) = f; for (int j = 0; j < 3; j++) { FIOReadFloat(ist,f); pts[j](0) = f; FIOReadFloat(ist,f); pts[j](1) = f; FIOReadFloat(ist,f); pts[j](2) = f; } readtrigs.Append (STLReadTriangle (pts, normal)); FIOReadString(ist,spaces,nospaces); } PrintMessage (3, nofacets, " triangles loaded\r"); geom->InitSTLGeometry(readtrigs); return geom; } void STLTopology :: SaveBinary (const char* filename, const char* aname) const { ofstream ost(filename); PrintFnStart("Write STL binary file '",filename,"'"); if (sizeof(int) != 4 || sizeof(float) != 4) {PrintWarning("for stl-binary compatibility only use 32 bit compilation!!!");} //specific settings for stl-binary format const int namelen = 80; //length of name of header in file const int nospaces = 2; //number of spaces after a triangle //write header: aname int i, j; char buf[namelen+1]; int strend = 0; for(i = 0; i <= namelen; i++) { if (aname[i] == 0) {strend = 1;} if (!strend) {buf[i] = aname[i];} else {buf[i] = 0;} } FIOWriteString(ost,buf,namelen); PrintMessage(5,"header = ",buf); //RWrite Number of facets int nofacets = GetNT(); FIOWriteInt(ost,nofacets); PrintMessage(5,"NO facets = ", nofacets); float f; char spaces[nospaces+1]; for (i = 0; i < nospaces; i++) {spaces[i] = ' ';} spaces[nospaces] = 0; for (i = 1; i <= GetNT(); i++) { const STLTriangle & t = GetTriangle(i); const Vec<3> & n = t.Normal(); f = n(0); FIOWriteFloat(ost,f); f = n(1); FIOWriteFloat(ost,f); f = n(2); FIOWriteFloat(ost,f); for (j = 1; j <= 3; j++) { const Point3d p = GetPoint(t.PNum(j)); f = p.X(); FIOWriteFloat(ost,f); f = p.Y(); FIOWriteFloat(ost,f); f = p.Z(); FIOWriteFloat(ost,f); } FIOWriteString(ost,spaces,nospaces); } PrintMessage(5,"done"); } void STLTopology :: SaveSTLE (const char* filename) const { ofstream outf (filename); int i, j; outf << GetNT() << endl; for (i = 1; i <= GetNT(); i++) { const STLTriangle & t = GetTriangle(i); for (j = 1; j <= 3; j++) { const Point3d p = GetPoint(t.PNum(j)); outf << p.X() << " " << p.Y() << " " << p.Z() << endl; } } int ned = 0; for (i = 1; i <= GetNTE(); i++) { if (GetTopEdge (i).GetStatus() == ED_CONFIRMED) ned++; } outf << ned << endl; for (i = 1; i <= GetNTE(); i++) { const STLTopEdge & edge = GetTopEdge (i); if (edge.GetStatus() == ED_CONFIRMED) for (j = 1; j <= 2; j++) { const Point3d p = GetPoint(edge.PNum(j)); outf << p.X() << " " << p.Y() << " " << p.Z() << endl; } } } STLGeometry * STLTopology :: LoadNaomi (istream & ist) { int i; STLGeometry * geom = new STLGeometry(); Array readtrigs; PrintFnStart("read NAOMI file format"); char buf[100]; Vec<3> normal; //int cntface = 0; //int cntvertex = 0; double px, py, pz; int noface, novertex; Array > readpoints; ist >> buf; if (strcmp (buf, "NODES") == 0) { ist >> novertex; PrintMessage(5,"nuber of vertices = ", novertex); for (i = 0; i < novertex; i++) { ist >> px; ist >> py; ist >> pz; readpoints.Append(Point<3> (px,py,pz)); } } else { PrintFileError("no node information"); } ist >> buf; if (strcmp (buf, "2D_EDGES") == 0) { ist >> noface; PrintMessage(5,"number of faces=",noface); int dummy, p1, p2, p3; Point<3> pts[3]; for (i = 0; i < noface; i++) { ist >> dummy; //2 ist >> dummy; //1 ist >> p1; ist >> p2; ist >> p3; ist >> dummy; //0 pts[0] = readpoints.Get(p1); pts[1] = readpoints.Get(p2); pts[2] = readpoints.Get(p3); normal = Cross (pts[1]-pts[0], pts[2]-pts[0]) . Normalize(); readtrigs.Append (STLReadTriangle (pts, normal)); } PrintMessage(5,"read ", readtrigs.Size(), " triangles"); } else { PrintMessage(5,"read='",buf,"'\n"); PrintFileError("ERROR: no Triangle information"); } geom->InitSTLGeometry(readtrigs); return geom; } void STLTopology :: Save (const char* filename) const { PrintFnStart("Write stl-file '",filename, "'"); ofstream fout(filename); fout << "solid\n"; char buf1[50]; char buf2[50]; char buf3[50]; int i, j; for (i = 1; i <= GetNT(); i++) { const STLTriangle & t = GetTriangle(i); fout << "facet normal "; const Vec3d& n = GetTriangle(i).Normal(); sprintf(buf1,"%1.9g",n.X()); sprintf(buf2,"%1.9g",n.Y()); sprintf(buf3,"%1.9g",n.Z()); fout << buf1 << " " << buf2 << " " << buf3 << "\n"; fout << "outer loop\n"; for (j = 1; j <= 3; j++) { const Point3d p = GetPoint(t.PNum(j)); sprintf(buf1,"%1.9g",p.X()); sprintf(buf2,"%1.9g",p.Y()); sprintf(buf3,"%1.9g",p.Z()); fout << "vertex " << buf1 << " " << buf2 << " " << buf3 << "\n"; } fout << "endloop\n"; fout << "endfacet\n"; } fout << "endsolid\n"; // write also NETGEN surface mesh: ofstream fout2("geom.surf"); fout2 << "surfacemesh" << endl; fout2 << GetNP() << endl; for (i = 1; i <= GetNP(); i++) { for (j = 0; j < 3; j++) { fout2.width(8); fout2 << GetPoint(i)(j); } fout2 << endl; } fout2 << GetNT() << endl; for (i = 1; i <= GetNT(); i++) { const STLTriangle & t = GetTriangle(i); for (j = 1; j <= 3; j++) { fout2.width(8); fout2 << t.PNum(j); } fout2 << endl; } } STLGeometry * STLTopology ::Load (istream & ist) { STLGeometry * geom = new STLGeometry(); Array readtrigs; char buf[100]; Point<3> pts[3]; Vec<3> normal; int cntface = 0; int vertex = 0; bool badnormals = false; while (ist.good()) { ist >> buf; int n = strlen (buf); for (int i = 0; i < n; i++) buf[i] = tolower (buf[i]); if (strcmp (buf, "facet") == 0) { cntface++; } if (strcmp (buf, "normal") == 0) { ist >> normal(0) >> normal(1) >> normal(2); normal.Normalize(); } if (strcmp (buf, "vertex") == 0) { ist >> pts[vertex](0) >> pts[vertex](1) >> pts[vertex](2); vertex++; if (vertex == 3) { if (normal.Length() <= 1e-5) { normal = Cross (pts[1]-pts[0], pts[2]-pts[0]); normal.Normalize(); } else { Vec<3> hnormal = Cross (pts[1]-pts[0], pts[2]-pts[0]); hnormal.Normalize(); if (normal * hnormal < 0.5) badnormals = true; } vertex = 0; if ( (Dist2 (pts[0], pts[1]) > 1e-16) && (Dist2 (pts[0], pts[2]) > 1e-16) && (Dist2 (pts[1], pts[2]) > 1e-16) ) { readtrigs.Append (STLReadTriangle (pts, normal)); if (readtrigs.Size() % 100000 == 0) PrintMessageCR (3, readtrigs.Size(), " triangles loaded\r"); } else { cout << "Skipping flat triangle " << "l1 = " << Dist(pts[0], pts[1]) << ", l2 = " << Dist(pts[0], pts[2]) << ", l3 = " << Dist(pts[2], pts[1]) << endl; } } } } PrintMessage (3, readtrigs.Size(), " triangles loaded"); if (badnormals) { PrintWarning("File has normal vectors which differ extremely from geometry->correct with stldoctor!!!"); } geom->InitSTLGeometry(readtrigs); return geom; } void STLTopology :: InitSTLGeometry(const Array & readtrigs) { // const double geometry_tol_fact = 1E6; // distances lower than max_box_size/tol are ignored trias.SetSize(0); points.SetSize(0); PrintMessage(3,"number of triangles = ", readtrigs.Size()); if (!readtrigs.Size()) return; boundingbox.Set (readtrigs[0][0]); for (int i = 0; i < readtrigs.Size(); i++) for (int k = 0; k < 3; k++) boundingbox.Add (readtrigs[i][k]); PrintMessage(5,"boundingbox: ", Point3d(boundingbox.PMin()), " - ", Point3d(boundingbox.PMax())); Box<3> bb = boundingbox; bb.Increase (1); pointtree = new Point3dTree (bb.PMin(), bb.PMax()); Array pintersect; pointtol = boundingbox.Diam() * stldoctor.geom_tol_fact; PrintMessage(5,"point tolerance = ", pointtol); PrintMessageCR(5,"identify points ..."); for(int i = 0; i < readtrigs.Size(); i++) { const STLReadTriangle & t = readtrigs[i]; STLTriangle st; st.SetNormal (t.Normal()); for (int k = 0; k < 3; k++) { Point<3> p = t[k]; Point<3> pmin = p - Vec<3> (pointtol, pointtol, pointtol); Point<3> pmax = p + Vec<3> (pointtol, pointtol, pointtol); pointtree->GetIntersecting (pmin, pmax, pintersect); if (pintersect.Size() > 1) PrintError("too many close points"); int foundpos = -1; if (pintersect.Size()) foundpos = pintersect[0]; if (foundpos == -1) { foundpos = AddPoint(p); pointtree->Insert (p, foundpos); } if (Dist(p, points.Get(foundpos)) > 1e-10) cout << "identify close points: " << p << " " << points.Get(foundpos) << ", dist = " << Dist(p, points.Get(foundpos)) << endl; st[k] = foundpos; } if ( (st[0] == st[1]) || (st[0] == st[2]) || (st[1] == st[2]) ) { PrintError("STL Triangle degenerated"); } else { AddTriangle(st); } } PrintMessage(5,"identify points ... done"); FindNeighbourTrigs(); } int STLTopology :: GetPointNum (const Point<3> & p) { Point<3> pmin = p - Vec<3> (pointtol, pointtol, pointtol); Point<3> pmax = p + Vec<3> (pointtol, pointtol, pointtol); Array pintersect; pointtree->GetIntersecting (pmin, pmax, pintersect); if (pintersect.Size() == 1) return pintersect[0]; else return 0; } void STLTopology :: FindNeighbourTrigs() { // if (topedges.Size()) return; PushStatusF("Find Neighbour Triangles"); PrintMessage(5,"build topology ..."); // build up topology tables int nt = GetNT(); INDEX_2_HASHTABLE * oldedges = ht_topedges; ht_topedges = new INDEX_2_HASHTABLE (GetNP()+1); topedges.SetSize(0); for (int i = 1; i <= nt; i++) { STLTriangle & trig = GetTriangle(i); for (int j = 1; j <= 3; j++) { int pi1 = trig.PNumMod (j+1); int pi2 = trig.PNumMod (j+2); INDEX_2 i2(pi1, pi2); i2.Sort(); int enr; int othertn; if (ht_topedges->Used(i2)) { enr = ht_topedges->Get(i2); topedges.Elem(enr).TrigNum(2) = i; othertn = topedges.Get(enr).TrigNum(1); STLTriangle & othertrig = GetTriangle(othertn); trig.NBTrigNum(j) = othertn; trig.EdgeNum(j) = enr; for (int k = 1; k <= 3; k++) if (othertrig.EdgeNum(k) == enr) othertrig.NBTrigNum(k) = i; } else { topedges.Append (STLTopEdge (pi1, pi2, i, 0)); enr = topedges.Size(); ht_topedges->Set (i2, enr); trig.EdgeNum(j) = enr; } } } PrintMessage(5,"topology built, checking"); topology_ok = 1; int ne = GetNTE(); for (int i = 1; i <= nt; i++) GetTriangle(i).flags.toperror = 0; for (int i = 1; i <= nt; i++) for (int j = 1; j <= 3; j++) { const STLTopEdge & edge = GetTopEdge (GetTriangle(i).EdgeNum(j)); if (edge.TrigNum(1) != i && edge.TrigNum(2) != i) { topology_ok = 0; GetTriangle(i).flags.toperror = 1; } } for (int i = 1; i <= ne; i++) { const STLTopEdge & edge = GetTopEdge (i); if (!edge.TrigNum(2)) { topology_ok = 0; GetTriangle(edge.TrigNum(1)).flags.toperror = 1; } } if (topology_ok) { orientation_ok = 1; for (int i = 1; i <= nt; i++) { const STLTriangle & t = GetTriangle (i); for (int j = 1; j <= 3; j++) { const STLTriangle & nbt = GetTriangle (t.NBTrigNum(j)); if (!t.IsNeighbourFrom (nbt)) orientation_ok = 0; } } } else orientation_ok = 0; status = STL_GOOD; statustext = ""; if (!topology_ok || !orientation_ok) { status = STL_ERROR; if (!topology_ok) statustext = "Topology not ok"; else statustext = "Orientation not ok"; } PrintMessage(3,"topology_ok = ",topology_ok); PrintMessage(3,"orientation_ok = ",orientation_ok); PrintMessage(3,"topology found"); // generate point -> trig table trigsperpoint.SetSize(GetNP()); for (int i = 1; i <= GetNT(); i++) for (int j = 1; j <= 3; j++) trigsperpoint.Add1(GetTriangle(i).PNum(j),i); //check trigs per point: /* for (i = 1; i <= GetNP(); i++) { if (trigsperpoint.EntrySize(i) < 3) { (*testout) << "ERROR: Point " << i << " has " << trigsperpoint.EntrySize(i) << " triangles!!!" << endl; } } */ topedgesperpoint.SetSize (GetNP()); for (int i = 1; i <= ne; i++) for (int j = 1; j <= 2; j++) topedgesperpoint.Add1 (GetTopEdge (i).PNum(j), i); PrintMessage(5,"point -> trig table generated"); // transfer edge data: // .. to be done delete oldedges; for (STLTrigIndex ti = 0; ti < GetNT(); ti++) { STLTriangle & trig = trias[ti]; for (int k = 0; k < 3; k++) { STLPointIndex pi = trig[k] - STLBASE; STLPointIndex pi2 = trig[(k+1)%3] - STLBASE; STLPointIndex pi3 = trig[(k+2)%3] - STLBASE; // vector along edge Vec<3> ve = points[pi2] - points[pi]; ve.Normalize(); // vector along third point Vec<3> vt = points[pi3] - points[pi]; vt -= (vt * ve) * ve; vt.Normalize(); Vec<3> vn = trig.GeomNormal (points); vn.Normalize(); double phimin = 10, phimax = -1; // out of (0, 2 pi) for (int j = 0; j < trigsperpoint[pi].Size(); j++) { STLTrigIndex ti2 = trigsperpoint[pi][j] - STLBASE; const STLTriangle & trig2 = trias[ti2]; if (ti == ti2) continue; bool hasboth = 0; for (int l = 0; l < 3; l++) if (trig2[l] - STLBASE == pi2) { hasboth = 1; break; } if (!hasboth) continue; STLPointIndex pi4(0); for (int l = 0; l < 3; l++) if (trig2[l] - STLBASE != pi && trig2[l] - STLBASE != pi2) pi4 = trig2[l] - STLBASE; Vec<3> vt2 = points[pi4] - points[pi]; double phi = atan2 (vt2 * vn, vt2 * vt); if (phi < 0) phi += 2 * M_PI; if (phi < phimin) { phimin = phi; trig.NBTrig (0, (k+2)%3) = ti2 + STLBASE; } if (phi > phimax) { phimax = phi; trig.NBTrig (1, (k+2)%3) = ti2 + STLBASE; } } } } if (status == STL_GOOD) { // for compatibility: neighbourtrigs.SetSize(GetNT()); for (int i = 1; i <= GetNT(); i++) for (int k = 1; k <= 3; k++) AddNeighbourTrig (i, GetTriangle(i).NBTrigNum(k)); } else { // assemble neighbourtrigs (should be done only for illegal topology): neighbourtrigs.SetSize(GetNT()); int tr, found; int wrongneighbourfound = 0; for (int i = 1; i <= GetNT(); i++) { SetThreadPercent((double)i/(double)GetNT()*100.); if (multithread.terminate) { PopStatus(); return; } for (int k = 1; k <= 3; k++) { for (int j = 1; j <= trigsperpoint.EntrySize(GetTriangle(i).PNum(k)); j++) { tr = trigsperpoint.Get(GetTriangle(i).PNum(k),j); if (i != tr && (GetTriangle(i).IsNeighbourFrom(GetTriangle(tr)) || GetTriangle(i).IsWrongNeighbourFrom(GetTriangle(tr)))) { if (GetTriangle(i).IsWrongNeighbourFrom(GetTriangle(tr))) { /*(*testout) << "ERROR: triangle " << i << " has a wrong neighbour triangle!!!" << endl;*/ wrongneighbourfound ++; } found = 0; for (int ii = 1; ii <= NONeighbourTrigs(i); ii++) {if (NeighbourTrig(i,ii) == tr) {found = 1;break;};} if (! found) {AddNeighbourTrig(i,tr);} } } } if (NONeighbourTrigs(i) != 3) { PrintError("TRIG ",i," has ",NONeighbourTrigs(i)," neighbours!!!!"); for (int kk=1; kk <= NONeighbourTrigs(i); kk++) { PrintMessage(5,"neighbour-trig",kk," = ",NeighbourTrig(i,kk)); } }; } if (wrongneighbourfound) { PrintError("++++++++++++++++++++\n"); PrintError(wrongneighbourfound, " wrong oriented neighbourtriangles found!"); PrintError("try to correct it (with stldoctor)!"); PrintError("++++++++++++++++++++\n"); status = STL_ERROR; statustext = "STL Mesh not consistent"; multithread.terminate = 1; #ifdef STAT_STREAM (*statout) << "non-conform stl geometry \\hline" << endl; #endif } } TopologyChanged(); PopStatus(); } void STLTopology :: GetTrianglesInBox (/* const Point<3> & pmin, const Point<3> & pmax, */ const Box<3> & box, Array & btrias) const { if (searchtree) searchtree -> GetIntersecting (box.PMin(), box.PMax(), btrias); else { int i; Box<3> box1 = box; box1.Increase (1e-4); btrias.SetSize(0); int nt = GetNT(); for (i = 1; i <= nt; i++) { if (box1.Intersect (GetTriangle(i).box)) { btrias.Append (i); } } } } void STLTopology :: AddTriangle(const STLTriangle& t) { trias.Append(t); const Point<3> & p1 = GetPoint (t.PNum(1)); const Point<3> & p2 = GetPoint (t.PNum(2)); const Point<3> & p3 = GetPoint (t.PNum(3)); Box<3> box; box.Set (p1); box.Add (p2); box.Add (p3); /* // Point<3> pmin(p1), pmax(p1); pmin.SetToMin (p2); pmin.SetToMin (p3); pmax.SetToMax (p2); pmax.SetToMax (p3); */ trias.Last().box = box; trias.Last().center = Center (p1, p2, p3); double r1 = Dist (p1, trias.Last().center); double r2 = Dist (p2, trias.Last().center); double r3 = Dist (p3, trias.Last().center); trias.Last().rad = max2 (max2 (r1, r2), r3); if (geomsearchtreeon) {searchtree->Insert (box.PMin(), box.PMax(), trias.Size());} } int STLTopology :: GetLeftTrig(int p1, int p2) const { int i; for (i = 1; i <= trigsperpoint.EntrySize(p1); i++) { if (GetTriangle(trigsperpoint.Get(p1,i)).HasEdge(p1,p2)) {return trigsperpoint.Get(p1,i);} } PrintSysError("ERROR in GetLeftTrig !!!"); return 0; } int STLTopology :: GetRightTrig(int p1, int p2) const { return GetLeftTrig(p2,p1); } int STLTopology :: NeighbourTrigSorted(int trig, int edgenum) const { int i, p1, p2; int psearch = GetTriangle(trig).PNum(edgenum); for (i = 1; i <= 3; i++) { GetTriangle(trig).GetNeighbourPoints(GetTriangle(NeighbourTrig(trig,i)),p1,p2); if (p1 == psearch) {return NeighbourTrig(trig,i);} } PrintSysError("ERROR in NeighbourTrigSorted"); return 0; } int STLTopology :: GetTopEdgeNum (int pi1, int pi2) const { if (!ht_topedges) return 0; INDEX_2 i2(pi1, pi2); i2.Sort(); if (!ht_topedges->Used(i2)) return 0; return ht_topedges->Get(i2); } void STLTopology :: InvertTrig (int trig) { if (trig >= 1 && trig <= GetNT()) { GetTriangle(trig).ChangeOrientation(); FindNeighbourTrigs(); } else { PrintUserError("no triangle selected!"); } } void STLTopology :: DeleteTrig (int trig) { if (trig >= 1 && trig <= GetNT()) { trias.DeleteElement(trig); FindNeighbourTrigs(); } else { PrintUserError("no triangle selected!"); } } void STLTopology :: OrientAfterTrig (int trig) { int starttrig = trig; if (starttrig >= 1 && starttrig <= GetNT()) { Array oriented; oriented.SetSize(GetNT()); int i; for (i = 1; i <= oriented.Size(); i++) { oriented.Elem(i) = 0; } oriented.Elem(starttrig) = 1; int k; Array list1; list1.SetSize(0); Array list2; list2.SetSize(0); list1.Append(starttrig); int cnt = 1; int end = 0; int nt; while (!end) { end = 1; for (i = 1; i <= list1.Size(); i++) { const STLTriangle& tt = GetTriangle(list1.Get(i)); for (k = 1; k <= 3; k++) { nt = tt.NBTrigNum (k); // NeighbourTrig(list1.Get(i),k); if (oriented.Get(nt) == 0) { if (tt.IsWrongNeighbourFrom(GetTriangle(nt))) { GetTriangle(nt).ChangeOrientation(); } oriented.Elem(nt) = 1; list2.Append(nt); cnt++; end = 0; } } } list1.SetSize(0); for (i = 1; i <= list2.Size(); i++) { list1.Append(list2.Get(i)); } list2.SetSize(0); } PrintMessage(5,"NO corrected triangles = ",cnt); if (cnt == GetNT()) { PrintMessage(5,"ALL triangles oriented in same way!"); } else { PrintWarning("NOT ALL triangles oriented in same way!"); } // topedges.SetSize(0); FindNeighbourTrigs(); } else { PrintUserError("no triangle selected!"); } } } netgen-6.2.1804/libsrc/linalg/0000755000175000017500000000000013272137567014531 5ustar kurtkurtnetgen-6.2.1804/libsrc/linalg/linalg.hpp0000644000175000017500000000131013272137567016503 0ustar kurtkurt#ifndef FILE_LINALG #define FILE_LINALG /* *************************************************************************/ /* File: linalg.hpp */ /* Author: Joachim Schoeberl */ /* Date: 01. Oct. 94 */ /* *************************************************************************/ /* Data types for basic linear algebra The basic concepts include the data types Vector SparseMatrix DenseMatrix */ #include "../include/myadt.hpp" namespace netgen { #include "vector.hpp" #include "densemat.hpp" #include "polynomial.hpp" } #endif netgen-6.2.1804/libsrc/linalg/opti.hpp0000644000175000017500000000767613272137567016235 0ustar kurtkurt#ifndef FILE_OPTI #define FILE_OPTI /**************************************************************************/ /* File: opti.hpp */ /* Author: Joachim Schoeberl */ /* Date: 01. Jun. 95 */ /**************************************************************************/ namespace netgen { /** Function to be minimized. */ class MinFunction { public: /// virtual double Func (const Vector & x) const; /// virtual void Grad (const Vector & x, Vector & g) const; /// function and gradient virtual double FuncGrad (const Vector & x, Vector & g) const; /// directional derivative virtual double FuncDeriv (const Vector & x, const Vector & dir, double & deriv) const; /// if |g| < gradaccuray, then stop bfgs virtual double GradStopping (const Vector & /* x */) const { return 0; } /// virtual void ApproximateHesse (const Vector & /* x */, DenseMatrix & /* hesse */) const; }; class OptiParameters { public: int maxit_linsearch; int maxit_bfgs; double typf; double typx; OptiParameters () { maxit_linsearch = 100; maxit_bfgs = 100; typf = 1; typx = 1; } }; /** Implementation of BFGS method. Efficient method for non-linear minimiztion problems. @param x initial value and solution @param fun function to be minimized */ extern double BFGS (Vector & x, const MinFunction & fun, const OptiParameters & par, double eps = 1e-8); /** Steepest descent method. Simple method for non-linear minimization problems. @param x initial value and solution @param fun function to be minimized */ void SteepestDescent (Vector & x, const MinFunction & fun, const OptiParameters & par); extern void lines ( Vector & x, // i: Ausgangspunkt der Liniensuche Vector & xneu, // o: Loesung der Liniensuche bei Erfolg Vector & p, // i: Suchrichtung double & f, // i: Funktionswert an der Stelle x // o: Funktionswert an der Stelle xneu, falls ifail = 0 Vector & g, // i: Gradient an der Stelle x // o: Gradient an der Stelle xneu, falls ifail = 0 const MinFunction & fun, // function to minmize const OptiParameters & par, // parameters double & alphahat, // i: Startwert fr alpha_hat // o: Loesung falls ifail = 0 double fmin, // i: untere Schranke fr f double mu1, // i: Parameter mu_1 aus Alg.2.1 double sigma, // i: Parameter sigma aus Alg.2.1 double xi1, // i: Parameter xi_1 aus Alg.2.1 double xi2, // i: Parameter xi_1 aus Alg.2.1 double tau, // i: Parameter tau aus Alg.2.1 double tau1, // i: Parameter tau_1 aus Alg.2.1 double tau2, // i: Parameter tau_2 aus Alg.2.1 int & ifail); // o: 0 bei erfolgreicher Liniensuche // -1 bei Abbruch wegen Unterschreiten von fmin // 1 bei Abbruch, aus sonstigen Grnden /** Solver for linear programming problem. \begin{verbatim} min c^t x A x <= b \end{verbatim} */ extern void LinearOptimize (const DenseMatrix & a, const Vector & b, const Vector & c, Vector & x); #ifdef NONE /** Simple projection iteration. find $u = argmin_{v >= 0} 0.5 u A u - f u$ */ extern void ApproxProject (const BaseMatrix & a, Vector & u, const Vector & f, double tau, int its); /** CG Algorithm for quadratic programming problem. See: Dostal ... d ... diag(A) ^{-1} */ extern void ApproxProjectCG (const BaseMatrix & a, Vector & x, const Vector & b, const class DiagMatrix & d, double gamma, int & steps, int & changes); #endif } #endif netgen-6.2.1804/libsrc/linalg/densemat.hpp0000644000175000017500000002037413272137567017050 0ustar kurtkurt#ifndef FILE_DENSEMAT #define FILE_DENSEMAT /**************************************************************************/ /* File: densemat.hpp */ /* Author: Joachim Schoeberl */ /* Date: 01. Oct. 94 */ /**************************************************************************/ /** Data type dense matrix */ class DenseMatrix { protected: int height; int width; double * data; public: /// DLL_HEADER DenseMatrix (); /// DLL_HEADER DenseMatrix (int h, int w = 0); /// DLL_HEADER DenseMatrix (const DenseMatrix & m2); /// DLL_HEADER ~DenseMatrix (); /// DLL_HEADER void SetSize (int h, int w = 0); int Height() const { return height; } int Width() const {return width; } double & operator() (int i, int j) { return data[i*width+j]; } double operator() (int i, int j) const { return data[i*width+j]; } double & operator() (int i) { return data[i]; } double operator() (int i) const { return data[i]; } /// DLL_HEADER DenseMatrix & operator= (const DenseMatrix & m2); /// DLL_HEADER DenseMatrix & operator+= (const DenseMatrix & m2); /// DLL_HEADER DenseMatrix & operator-= (const DenseMatrix & m2); /// DLL_HEADER DenseMatrix & operator= (double v); /// DLL_HEADER DenseMatrix & operator*= (double v); /// DLL_HEADER void Mult (const FlatVector & v, FlatVector & prod) const { double sum; const double * mp, * sp; double * dp; #ifdef DEBUG if (prod.Size() != height) { (*myerr) << "Mult: wrong vector size " << endl; } if (!height) { cout << "DenseMatrix::Mult height = 0" << endl; } if (!width) { cout << "DenseMatrix::Mult width = 0" << endl; } if (width != v.Size()) { (*myerr) << "\nMatrix and Vector don't fit" << endl; } else if (Height() != prod.Size()) { (*myerr) << "Base_Matrix::operator*(Vector): prod vector not ok" << endl; } else #endif { mp = data; dp = &prod(0); for (int i = 0; i < height; i++) { sum = 0; sp = &v(0); for (int j = 0; j < width; j++) { // sum += Get(i,j) * v.Get(j); sum += *mp * *sp; mp++; sp++; } *dp = sum; dp++; } } } /// DLL_HEADER void MultTrans (const Vector & v, Vector & prod) const; /// DLL_HEADER void Residuum (const Vector & x, const Vector & b, Vector & res) const; /// DLL_HEADER double Det () const; /// friend DenseMatrix operator* (const DenseMatrix & m1, const DenseMatrix & m2); /// friend DenseMatrix operator+ (const DenseMatrix & m1, const DenseMatrix & m2); /// friend void Transpose (const DenseMatrix & m1, DenseMatrix & m2); /// friend void Mult (const DenseMatrix & m1, const DenseMatrix & m2, DenseMatrix & m3); /// // friend void CalcInverse (const DenseMatrix & m1, DenseMatrix & m2); /// friend void CalcAAt (const DenseMatrix & a, DenseMatrix & m2); /// // friend void CalcAtA (const DenseMatrix & a, DenseMatrix & m2); /// friend void CalcABt (const DenseMatrix & a, const DenseMatrix & b, DenseMatrix & m2); /// friend void CalcAtB (const DenseMatrix & a, const DenseMatrix & b, DenseMatrix & m2); /// DLL_HEADER void Solve (const Vector & b, Vector & x) const; /// void SolveDestroy (const Vector & b, Vector & x); /// const double & Get(int i, int j) const { return data[(i-1)*width+j-1]; } /// const double & Get(int i) const { return data[i-1]; } /// void Set(int i, int j, double v) { data[(i-1)*width+j-1] = v; } /// double & Elem(int i, int j) { return data[(i-1)*width+j-1]; } /// const double & ConstElem(int i, int j) const { return data[(i-1)*width+j-1]; } }; extern ostream & operator<< (ostream & ost, const DenseMatrix & m); template class MatrixFixWidth { protected: int height; T * __restrict data; bool ownmem; public: /// MatrixFixWidth () { height = 0; data = 0; ownmem = false; } /// MatrixFixWidth (int h) { height = h; data = new T[WIDTH*height]; ownmem = true; } /// MatrixFixWidth (int h, T * adata) { height = h; data = adata; ownmem = false; } /// MatrixFixWidth (const MatrixFixWidth & m2) : height(m2.height), data(m2.data), ownmem(false) { ; } /// ~MatrixFixWidth () { if (ownmem) delete [] data; } void SetSize (int h) { if (h != height) { if (ownmem) delete data; height = h; data = new T[WIDTH*height]; ownmem = true; } } /// int Height() const { return height; } /// int Width() const { return WIDTH; } MatrixFixWidth & operator= (const MatrixFixWidth & m2) { for (int i = 0; i < height*WIDTH; i++) data[i] = m2.data[i]; } /// MatrixFixWidth & operator= (T v) { for (int i = 0; i < height*WIDTH; i++) data[i] = v; return *this; } /* /// void Mult (const FlatVector & v, FlatVector & prod) const { T sum; const T * mp, * sp; T * dp; mp = data; dp = &prod[0]; for (int i = 0; i < height; i++) { sum = 0; sp = &v[0]; for (int j = 0; j < WIDTH; j++) { sum += *mp * *sp; mp++; sp++; } *dp = sum; dp++; } } */ T & operator() (int i, int j) { return data[i*WIDTH+j]; } const T & operator() (int i, int j) const { return data[i*WIDTH+j]; } MatrixFixWidth & operator*= (T v) { if (data) for (int i = 0; i < height*WIDTH; i++) data[i] *= v; return *this; } const T & Get(int i, int j) const { return data[(i-1)*WIDTH+j-1]; } /// const T & Get(int i) const { return data[i-1]; } /// void Set(int i, int j, T v) { data[(i-1)*WIDTH+j-1] = v; } /// T & Elem(int i, int j) { return data[(i-1)*WIDTH+j-1]; } /// const T & ConstElem(int i, int j) const { return data[(i-1)*WIDTH+j-1]; } }; template class MatrixFixWidth { protected: int height; double * data; bool ownmem; public: /// MatrixFixWidth () { height = 0; data = 0; ownmem = false; } /// MatrixFixWidth (int h) { height = h; data = new double[WIDTH*height]; ownmem = true; } /// MatrixFixWidth (int h, double * adata) { height = h; data = adata; ownmem = false; } /// ~MatrixFixWidth () { if (ownmem) delete [] data; } void SetSize (int h) { if (h != height) { if (ownmem) delete data; height = h; data = new double[WIDTH*height]; ownmem = true; } } /// int Height() const { return height; } /// int Width() const { return WIDTH; } /// MatrixFixWidth & operator= (double v) { for (int i = 0; i < height*WIDTH; i++) data[i] = v; return *this; } /// void Mult (const FlatVector & v, FlatVector & prod) const { double sum; const double * mp, * sp; double * dp; /* if (prod.Size() != height) { cerr << "MatrixFixWidth::Mult: wrong vector size " << endl; assert (1); } */ mp = data; dp = &prod[0]; for (int i = 0; i < height; i++) { sum = 0; sp = &v[0]; for (int j = 0; j < WIDTH; j++) { sum += *mp * *sp; mp++; sp++; } *dp = sum; dp++; } } double & operator() (int i, int j) { return data[i*WIDTH+j]; } const double & operator() (int i, int j) const { return data[i*WIDTH+j]; } MatrixFixWidth & operator*= (double v) { if (data) for (int i = 0; i < height*WIDTH; i++) data[i] *= v; return *this; } const double & Get(int i, int j) const { return data[(i-1)*WIDTH+j-1]; } /// const double & Get(int i) const { return data[i-1]; } /// void Set(int i, int j, double v) { data[(i-1)*WIDTH+j-1] = v; } /// double & Elem(int i, int j) { return data[(i-1)*WIDTH+j-1]; } /// const double & ConstElem(int i, int j) const { return data[(i-1)*WIDTH+j-1]; } }; template extern ostream & operator<< (ostream & ost, const MatrixFixWidth & m) { for (int i = 0; i < m.Height(); i++) { for (int j = 0; j < m.Width(); j++) ost << m.Get(i+1,j+1) << " "; ost << endl; } return ost; }; extern DLL_HEADER void CalcAtA (const DenseMatrix & a, DenseMatrix & m2); extern DLL_HEADER void CalcInverse (const DenseMatrix & m1, DenseMatrix & m2); #endif netgen-6.2.1804/libsrc/linalg/linopt.cpp0000644000175000017500000000315113272137567016542 0ustar kurtkurt#include #include #include #include "opti.hpp" namespace netgen { void LinearOptimize (const DenseMatrix & a, const Vector & b, const Vector & c, Vector & x) { int i1, i2, i3, j; DenseMatrix m(3), inv(3); Vector rs(3), hx(3), res(a.Height()), res2(3); double f, fmin; int nrest; if (a.Width() != 3) { cerr << "LinearOptimize only implemented for 3 unknowns" << endl; return; } fmin = 1e10; x = 0; nrest = a.Height(); for (i1 = 1; i1 <= nrest; i1++) for (i2 = i1 + 1; i2 <= nrest; i2++) for (i3 = i2 + 1; i3 <= nrest; i3++) { for (j = 1; j <= 3; j++) { m.Elem(1, j) = a.Get(i1, j); m.Elem(2, j) = a.Get(i2, j); m.Elem(3, j) = a.Get(i3, j); } rs(0) = b(i1-1); rs(1) = b(i2-1); rs(2) = b(i3-1); if (fabs (m.Det()) < 1e-12) continue; CalcInverse (m, inv); inv.Mult (rs, hx); a.Residuum (hx, b, res); // m.Residuum (hx, rs, res2); f = c * hx; /* testout -> precision(12); (*testout) << "i = (" << i1 << "," << i2 << "," << i3 << "), f = " << f << " x = " << x << " res = " << res << " resmin = " << res.Min() << " res2 = " << res2 << " prod = " << prod << endl; */ double rmin = res(0); for (int hi = 1; hi < res.Size(); hi++) if (res(hi) < rmin) rmin = res(hi); if ( (f < fmin) && rmin >= -1e-8) { fmin = f; x = hx; } } } } netgen-6.2.1804/libsrc/linalg/vector.hpp0000644000175000017500000001066513272137567016554 0ustar kurtkurt#ifndef FILE_VECTOR #define FILE_VECTOR /* *************************************************************************/ /* File: vector.hpp */ /* Author: Joachim Schoeberl */ /* Date: 01. Oct. 94 */ /* *************************************************************************/ template class TFlatVector { protected: int s; T * data; public: TFlatVector () { ; } TFlatVector (int as, T * adata) { s = as; data = adata; } int Size () const { return s; } TFlatVector & operator= (const TFlatVector & v) { memcpy (data, v.data, s*sizeof(T)); return *this; } TFlatVector & operator= (T scal) { for (int i = 0; i < s; i++) data[i] = scal; return *this; } T & operator[] (int i) { return data[i]; } const T & operator[] (int i) const { return data[i]; } T & operator() (int i) { return data[i]; } const T & operator() (int i) const { return data[i]; } // double & Elem (int i) { return data[i-1]; } // const double & Get (int i) const { return data[i-1]; } // void Set (int i, double val) { data[i-1] = val; } TFlatVector & operator*= (T scal) { for (int i = 0; i < s; i++) data[i] *= scal; return *this; } }; class FlatVector { protected: int s; double *data; public: FlatVector () { ; } FlatVector (int as, double * adata) { s = as; data = adata; } int Size () const { return s; } FlatVector & operator= (const FlatVector & v) { memcpy (data, v.data, s*sizeof(double)); return *this; } FlatVector & operator= (double scal) { for (int i = 0; i < s; i++) data[i] = scal; return *this; } double & operator[] (int i) { return data[i]; } const double & operator[] (int i) const { return data[i]; } double & operator() (int i) { return data[i]; } const double & operator() (int i) const { return data[i]; } // double & Elem (int i) { return data[i-1]; } // const double & Get (int i) const { return data[i-1]; } // void Set (int i, double val) { data[i-1] = val; } FlatVector & operator*= (double scal) { for (int i = 0; i < s; i++) data[i] *= scal; return *this; } FlatVector & Add (double scal, const FlatVector & v2) { for (int i = 0; i < s; i++) data[i] += scal * v2[i]; return *this; } FlatVector & Set (double scal, const FlatVector & v2) { for (int i = 0; i < s; i++) data[i] = scal * v2[i]; return *this; } FlatVector & Set2 (double scal1, const FlatVector & v1, double scal2, const FlatVector & v2) { for (int i = 0; i < s; i++) data[i] = scal1 * v1[i] + scal2 * v2[i]; return *this; } double L2Norm() const { double sum = 0; for (int i = 0; i < s; i++) sum += data[i] * data[i]; return sqrt (sum); } operator TFlatVector () const { return TFlatVector (s, data); } friend double operator* (const FlatVector & v1, const FlatVector & v2); }; class Vector : public FlatVector { bool ownmem; public: Vector () { s = 0; data = 0; ownmem = false; } Vector (int as) { s = as; data = new double[s]; ownmem = true; } Vector (int as, double * mem) { s = as; data = mem; ownmem = false; } ~Vector () { if (ownmem) delete [] data; } Vector & operator= (const FlatVector & v) { memcpy (data, &v(0), s*sizeof(double)); return *this; } Vector & operator= (double scal) { for (int i = 0; i < s; i++) data[i] = scal; return *this; } void SetSize (int as) { if (s != as) { s = as; if (ownmem) delete [] data; data = new double [s]; ownmem = true; } } operator TFlatVector () const { return TFlatVector (s, data); } }; template class VectorMem : public Vector { double mem[S]; public: VectorMem () : Vector(S, &mem[0]) { ; } VectorMem & operator= (const FlatVector & v) { memcpy (data, &v(0), S*sizeof(double)); return *this; } VectorMem & operator= (double scal) { for (int i = 0; i < S; i++) data[i] = scal; return *this; } }; inline double operator* (const FlatVector & v1, const FlatVector & v2) { double sum = 0; for (int i = 0; i < v1.s; i++) sum += v1.data[i] * v2.data[i]; return sum; } inline ostream & operator<< (ostream & ost, const FlatVector & v) { for (int i = 0; i < v.Size(); i++) ost << " " << setw(7) << v[i]; return ost; } #endif netgen-6.2.1804/libsrc/linalg/polynomial.hpp0000644000175000017500000000231213272137567017423 0ustar kurtkurt#ifndef FILE_POLYNOMIAL #define FILE_POLYNOMIAL /* *************************************************************************/ /* File: polynomial.hh */ /* Author: Joachim Schoeberl */ /* Date: 25. Nov. 99 */ /* *************************************************************************/ class QuadraticPolynomial1V { double c, cx, cxx; public: QuadraticPolynomial1V (double ac, double acx, double acxx); double Value (double x); double MaxUnitInterval (); }; class LinearPolynomial2V { double c, cx, cy; public: LinearPolynomial2V (double ac, double acx, double acy); friend class QuadraticPolynomial2V; }; class QuadraticPolynomial2V { double c, cx, cy, cxx, cxy, cyy; public: QuadraticPolynomial2V (); QuadraticPolynomial2V (double ac, double acx, double acy, double acxx, double acxy, double acyy); void Square (const LinearPolynomial2V & lp); void Add (double lam, const QuadraticPolynomial2V & qp); double Value (double x, double y); // double MinUnitSquare (); double MaxUnitSquare (); double MaxUnitTriangle (); }; #endif netgen-6.2.1804/libsrc/linalg/densemat.cpp0000644000175000017500000007432613272137567017051 0ustar kurtkurt#include #include namespace netgen { DenseMatrix :: DenseMatrix () { data = NULL; height = 0; width = 0; } DenseMatrix :: DenseMatrix (int h, int w) { if (!w) w = h; width = w; height = h; int hw = h*w; if (hw) data = new double[hw]; else data = 0; for (int i = 0 ; i < (hw); i++) data[i] = 0; } /* DenseMatrix :: DenseMatrix (int h, int w, const double * d) : BaseMatrix (h, w) { int size = h * w; int i; if (size) { data = new double[size]; for (i = 0; i < size; i++) data[i] = d[i]; } else data = NULL; } */ DenseMatrix :: DenseMatrix (const DenseMatrix & m2) { data = NULL; height = width = 0; SetSize (m2.Height(), m2.Width()); memcpy (data, m2.data, sizeof(double) * Height() * Width()); } DenseMatrix :: ~DenseMatrix () { delete [] data; } void DenseMatrix :: SetSize (int h, int w) { if (!w) w = h; if (height == h && width == w) return; height = h; width = w; delete[] data; if (h*w) data = new double[h*w]; else data = NULL; } /* DenseMatrix & DenseMatrix :: operator= (const BaseMatrix & m2) { int i, j; SetSize (m2.Height(), m2.Width()); if (data) for (i = 1; i <= Height(); i++) for (j = 1; j <= Width(); j++) Set (i, j, m2(i, j)); else (*myerr) << "DenseMatrix::Operator=: Matrix not allocated" << endl; return *this; } */ DenseMatrix & DenseMatrix :: operator= (const DenseMatrix & m2) { SetSize (m2.Height(), m2.Width()); if (data) memcpy (data, m2.data, sizeof(double) * m2.Height() * m2.Width()); return *this; } DenseMatrix & DenseMatrix :: operator+= (const DenseMatrix & m2) { int i; double * p, * q; if (Height() != m2.Height() || Width() != m2.Width()) { (*myerr) << "DenseMatrix::Operator+=: Sizes don't fit" << endl; return *this; } if (data) { p = data; q = m2.data; for (i = Width() * Height(); i > 0; i--) { *p += *q; p++; q++; } } else (*myerr) << "DenseMatrix::Operator+=: Matrix not allocated" << endl; return *this; } DenseMatrix & DenseMatrix :: operator-= (const DenseMatrix & m2) { int i; double * p, * q; if (Height() != m2.Height() || Width() != m2.Width()) { (*myerr) << "DenseMatrix::Operator-=: Sizes don't fit" << endl; return *this; } if (data) { p = data; q = m2.data; for (i = Width() * Height(); i > 0; i--) { *p -= *q; p++; q++; } } else (*myerr) << "DenseMatrix::Operator-=: Matrix not allocated" << endl; return *this; } DenseMatrix & DenseMatrix :: operator= (double v) { double * p = data; if (data) for (int i = width*height; i > 0; i--, p++) *p = v; return *this; } DenseMatrix & DenseMatrix :: operator*= (double v) { double * p = data; if (data) for (int i = width*height; i > 0; i--, p++) *p *= v; return *this; } double DenseMatrix :: Det () const { if (width != height) { (*myerr) << "DenseMatrix :: Det: width != height" << endl; return 0; } switch (width) { case 1: return data[0]; case 2: return data[0] * data[3] - data[1] * data[2]; case 3: return data[0] * data[4] * data[8] + data[1] * data[5] * data[6] + data[2] * data[3] * data[7] - data[0] * data[5] * data[7] - data[1] * data[3] * data[8] - data[2] * data[4] * data[6]; default: { (*myerr) << "Matrix :: Det: general size not implemented (size=" << width << ")" << endl; return 0; } } } void CalcInverse (const DenseMatrix & m1, DenseMatrix & m2) { double det; if (m1.Width() != m1.Height()) { (*myerr) << "CalcInverse: matrix not symmetric" << endl; return; } if (m1.Width() != m2.Width() || m1.Height() != m2.Height()) { (*myerr) << "CalcInverse: dim(m2) != dim(m1)" << endl; return; } if (m1.Width() <= 3) { det = m1.Det(); if (det == 0) { (*myerr) << "CalcInverse: Matrix singular" << endl; (*testout) << "CalcInverse: Matrix singular" << endl; return; } det = 1.0 / det; switch (m1.Width()) { case 1: { m2(0,0) = det; return; } case 2: { m2(0,0) = det * m1(3); m2(1,1) = det * m1(0); m2(0,1) = -det * m1(1); m2(1,0) = - det * m1(2); return; } case 3: { m2(0, 0) = det * (m1(4) * m1(8) - m1(5) * m1(7)); m2(1, 0) = -det * (m1(3) * m1(8) - m1(5) * m1(6)); m2(2, 0) = det * (m1(3) * m1(7) - m1(4) * m1(6)); m2(0, 1) = -det * (m1(1) * m1(8) - m1(2) * m1(7)); m2(1, 1) = det * (m1(0) * m1(8) - m1(2) * m1(6)); m2(2, 1) = -det * (m1(0) * m1(7) - m1(1) * m1(6)); m2(0, 2) = det * (m1(1) * m1(5) - m1(2) * m1(4)); m2(1, 2) = -det * (m1(0) * m1(5) - m1(2) * m1(3)); m2(2, 2) = det * (m1(0) * m1(4) - m1(1) * m1(3)); return; } } } else { int i, j, k, n; n = m1.Height(); #ifdef CHOL int dots = (n > 200); // Cholesky double x; Vector p(n); m2 = m1; /* m2.SetSymmetric(); if (!m2.Symmetric()) cerr << "m should be symmetric for Cholesky" << endl; */ for (i = 1; i <= n; i++) for (j = 1; j < i; j++) m2.Elem(j, i) = m2.Get(i, j); for (i = 1; i <= n; i++) { if (dots && i % 10 == 0) (*mycout) << "." << flush; for (j = i; j <= n; j++) { x = m2.Get(i, j); const double * pik = &m2.Get(i, 1); const double * pjk = &m2.Get(j, 1); for (k = i-2; k >= 0; --k, ++pik, ++pjk) x -= (*pik) * (*pjk); // for (k = i-1; k >= 1; --k) // x -= m2.Get(j, k) * m2.Get(i, k); if (i == j) { if (x <= 0) { cerr << "Matrix indefinite 1" << endl; return; } p.Elem(i) = 1 / sqrt(x); } else { m2.Elem(j, i) = x * p.Get(i); } } } for (i = 1; i <= n; i++) m2.Elem(i, i) = 1 / p.Get(i); // check: A = L L^t // for (i = 1; i <= n; i++) // for (j = 1; j <= n; j++) // { // x = 0; // for (k = 1; k <= i && k <= j; k++) // x += m2.Get(i, k) * m2.Get(j, k); // (*testout) << "err " << i << "," << j << " = " << (m1.Get(i, j) - x) << endl; // } // calc L^{-1}, store upper triangle // DenseMatrix hm(n); // hm = m2; for (i = 1; i <= n; i++) { if (dots && i % 10 == 0) (*mycout) << "+" << flush; for (j = i; j <= n; j++) { x = 0; if (j == i) x = 1; const double * pjk = &m2.Get(j, i); const double * pik = &m2.Get(i, i); for (k = i; k < j; k++, ++pjk, ++pik) x -= *pik * *pjk; // for (k = i; k < j; k++) // x -= m2.Get(j, k) * m2.Get(i, k); m2.Elem(i, j) = x / m2.Get(j, j); } } // (*testout) << "check L^-1" << endl; // for (i = 1; i <= n; i++) // for (j = 1; j <= n; j++) // { // x = 0; // for (k = j; k <= i; k++) // x += hm.Get(i, k) * m2.Get(j, k); // (*testout) << "i, j = " << i << "," << j << " x = " << x << endl; // } // calc A^-1 = L^-T * L^-1 for (i = 1; i <= n; i++) { if (dots && i % 10 == 0) (*mycout) << "-" << flush; for (j = 1; j <= i; j++) { x = 0; k = i; if (j > i) k = j; const double * pik = &m2.Get(i, k); const double * pjk = &m2.Get(j, k); for ( ; k <= n; ++k, ++pik, ++pjk) x += *pik * *pjk; // for ( ; k <= n; k++) // x += m2.Get(i, k) * m2.Get(j, k); m2.Elem(i, j) = x; } } for (i = 1; i <= n; i++) for (j = 1; j < i; j++) m2.Elem(j, i) = m2.Get(i, j); if (dots) (*mycout) << endl; #endif // Gauss - Jordan - algorithm int r, hi; double max, hr; Array p(n); // pivot-permutation Vector hv(n); m2 = m1; /* if (m2.Symmetric()) for (i = 1; i <= n; i++) for (j = 1; j < i; j++) m2.Elem(j, i) = m2.Get(i, j); */ // Algorithm of Stoer, Einf. i. d. Num. Math, S 145 for (j = 1; j <= n; j++) p.Set(j, j); for (j = 1; j <= n; j++) { // pivot search max = fabs(m2.Get(j, j)); r = j; for (i = j+1; i <= n ;i++) if (fabs (m2.Get(i, j)) > max) { r = i; max = fabs (m2.Get(i, j)); } if (max < 1e-20) { cerr << "Inverse matrix: matrix singular" << endl; *testout << "Inverse matrix: matrix singular" << endl; return; } r = j; // exchange rows if (r > j) { for (k = 1; k <= n; k++) { hr = m2.Get(j, k); m2.Elem(j, k) = m2.Get(r, k); m2.Elem(r, k) = hr; } hi = p.Get(j); p.Elem(j) = p.Get(r); p.Elem(r) = hi; } // transformation hr = 1 / m2.Get(j, j); for (i = 1; i <= n; i++) m2.Elem(i, j) *= hr; m2.Elem(j, j) = hr; for (k = 1; k <= n; k++) if (k != j) { for (i = 1; i <= n; i++) if (i != j) m2.Elem(i, k) -= m2.Elem(i, j) * m2.Elem(j, k); m2.Elem(j, k) *= -hr; } } // col exchange for (i = 1; i <= n; i++) { for (k = 1; k <= n; k++) hv(p.Get(k)-1) = m2.Get(i, k); for (k = 1; k <= n; k++) m2.Elem(i, k) = hv(k-1); } /* if (m1.Symmetric()) for (i = 1; i <= n; i++) for (j = 1; j < i; j++) m1.Elem(j, i) = m1.Get(i, j); m2 = 0; for (i = 1; i <= n; i++) m2.Elem(i, i) = 1; for (i = 1; i <= n; i++) { // (*mycout) << '.' << flush; q = m1.Get(i, i); for (k = 1; k <= n; k++) { m1.Elem(i, k) /= q; m2.Elem(i, k) /= q; } for (j = i+1; j <= n; j++) { q = m1.Elem(j, i); double * m1pi = &m1.Elem(i, i); double * m1pj = &m1.Elem(j, i); for (k = n; k >= i; --k, ++m1pi, ++m1pj) *m1pj -= q * (*m1pi); double * m2pi = &m2.Elem(i, 1); double * m2pj = &m2.Elem(j, 1); for (k = i; k > 0; --k, ++m2pi, ++m2pj) *m2pj -= q * (*m2pi); // for (k = 1; k <= n; k++) // { // m1.Elem(j, k) -= q * m1.Elem(i, k); // m2.Elem(j, k) -= q * m2.Elem(i, k); // } } } for (i = n; i >= 1; i--) { // (*mycout) << "+" << flush; for (j = 1; j < i; j++) { q = m1.Elem(j, i); double * m2pi = &m2.Elem(i, 1); double * m2pj = &m2.Elem(j, 1); for (k = n; k > 0; --k, ++m2pi, ++m2pj) *m2pj -= q * (*m2pi); // for (k = 1; k <= n; k++) // { // m1.Elem(j, k) -= q * m1.Elem(i, k); // m2.Elem(j, k) -= q * m2.Elem(i, k); // } } } if (m2.Symmetric()) { for (i = 1; i <= n; i++) for (j = 1; j < i; j++) m2.Elem(i, j) = m2.Elem(j, i); } */ } } void CalcAAt (const DenseMatrix & a, DenseMatrix & m2) { int n1 = a.Height(); int n2 = a.Width(); int i, j, k; double sum; const double *p, *q, *p0; if (m2.Height() != n1 || m2.Width() != n1) { (*myerr) << "CalcAAt: sizes don't fit" << endl; return; } for (i = 1; i <= n1; i++) { sum = 0; p = &a.ConstElem(i, 1); for (k = 1; k <= n2; k++) { sum += *p * *p; p++; } m2.Set(i, i, sum); p0 = &a.ConstElem(i, 1); q = a.data; for (j = 1; j < i; j++) { sum = 0; p = p0; for (k = 1; k <= n2; k++) { sum += *p * *q; p++; q++; } m2.Set(i, j, sum); m2.Set(j, i, sum); } } } void CalcAtA (const DenseMatrix & a, DenseMatrix & m2) { int n1 = a.Height(); int n2 = a.Width(); int i, j, k; double sum; if (m2.Height() != n2 || m2.Width() != n2) { (*myerr) << "CalcAtA: sizes don't fit" << endl; return; } for (i = 1; i <= n2; i++) for (j = 1; j <= n2; j++) { sum = 0; for (k = 1; k <= n1; k++) sum += a.Get(k, i) * a.Get(k, j); m2.Elem(i, j) = sum; } } void CalcABt (const DenseMatrix & a, const DenseMatrix & b, DenseMatrix & m2) { int n1 = a.Height(); int n2 = a.Width(); int n3 = b.Height(); int i, j, k; double sum; if (m2.Height() != n1 || m2.Width() != n3 || b.Width() != n2) { (*myerr) << "CalcABt: sizes don't fit" << endl; return; } double * pm2 = &m2.Elem(1, 1); const double * pa1 = &a.Get(1, 1); for (i = 1; i <= n1; i++) { const double * pb = &b.Get(1, 1); for (j = 1; j <= n3; j++) { sum = 0; const double * pa = pa1; for (k = 1; k <= n2; k++) { sum += *pa * *pb; pa++; pb++; } *pm2 = sum; pm2++; } pa1 += n2; } } void CalcAtB (const DenseMatrix & a, const DenseMatrix & b, DenseMatrix & m2) { int n1 = a.Height(); int n2 = a.Width(); int n3 = b.Width(); int i, j, k; if (m2.Height() != n2 || m2.Width() != n3 || b.Height() != n1) { (*myerr) << "CalcAtB: sizes don't fit" << endl; return; } for (i = 1; i <= n2 * n3; i++) m2.data[i-1] = 0; for (i = 1; i <= n1; i++) for (j = 1; j <= n2; j++) { const double va = a.Get(i, j); double * pm2 = &m2.Elem(j, 1); const double * pb = &b.Get(i, 1); for (k = 1; k <= n3; ++k, ++pm2, ++pb) *pm2 += va * *pb; // for (k = 1; k <= n3; k++) // m2.Elem(j, k) += va * b.Get(i, k); } /* for (i = 1; i <= n2; i++) for (j = 1; j <= n3; j++) { sum = 0; for (k = 1; k <= n1; k++) sum += a.Get(k, i) * b.Get(k, j); m2.Elem(i, j) = sum; } */ } DenseMatrix operator* (const DenseMatrix & m1, const DenseMatrix & m2) { DenseMatrix temp (m1.Height(), m2.Width()); if (m1.Width() != m2.Height()) { (*myerr) << "DenseMatrix :: operator*: Matrix Size does not fit" << endl; } else if (temp.Height() != m1.Height()) { (*myerr) << "DenseMatrix :: operator*: temp not allocated" << endl; } else { Mult (m1, m2, temp); } return temp; } void Mult (const DenseMatrix & m1, const DenseMatrix & m2, DenseMatrix & m3) { double sum; double *p1, *p1s, *p1sn, *p1snn, *p2, *p2s, *p2sn, *p3; if (m1.Width() != m2.Height() || m1.Height() != m3.Height() || m2.Width() != m3.Width() ) { (*myerr) << "DenseMatrix :: Mult: Matrix Size does not fit" << endl; (*myerr) << "m1: " << m1.Height() << " x " << m1.Width() << endl; (*myerr) << "m2: " << m2.Height() << " x " << m2.Width() << endl; (*myerr) << "m3: " << m3.Height() << " x " << m3.Width() << endl; return; } /* else if (m1.Symmetric() || m2.Symmetric() || m3.Symmetric()) { (*myerr) << "DenseMatrix :: Mult: not implemented for symmetric matrices" << endl; return; } */ else { // int i, j, k; int n1 = m1.Height(); int n2 = m2.Width(); int n3 = m1.Width(); /* for (i = n1 * n2-1; i >= 0; --i) m3.data[i] = 0; const double * pm1 = &m1.Get(1, 1); for (i = 1; i <= n1; i++) { const double * pm2 = &m2.Get(1, 1); double * pm3i = &m3.Elem(i, 1); for (j = 1; j <= n3; j++) { const double vm1 = *pm1; ++pm1; // const double vm1 = m1.Get(i, j); double * pm3 = pm3i; // const double * pm2 = &m2.Get(j, 1); for (k = 0; k < n2; k++) { *pm3 += vm1 * *pm2; ++pm2; ++pm3; } // for (k = 1; k <= n2; k++) // m3.Elem(i, k) += m1.Get(i, j) * m2.Get(j, k); } } */ /* for (i = 1; i <= n1; i++) for (j = 1; j <= n2; j++) { sum = 0; for (k = 1; k <= n3; k++) sum += m1.Get(i, k) * m2.Get(k, j); m3.Set(i, j, sum); } */ /* for (i = 1; i <= n1; i++) { const double pm1i = &m1.Get(i, 1); const double pm2j = &m2.Get(1, 1); for (j = 1; j <= n2; j++) { double sum = 0; const double * pm1 = pm1i; const double * pm2 = pm2j; pm2j++; for (k = 1; k <= n3; k++) { sum += *pm1 * *pm2; ++pm1; pm2 += n2; } m3.Set (i, j, sum); } } */ p3 = m3.data; p1s = m1.data; p2sn = m2.data + n2; p1snn = p1s + n1 * n3; while (p1s != p1snn) { p1sn = p1s + n3; p2s = m2.data; while (p2s != p2sn) { sum = 0; p1 = p1s; p2 = p2s; p2s++; while (p1 != p1sn) { sum += *p1 * *p2; p1++; p2 += n2; } *p3++ = sum; } p1s = p1sn; } } } DenseMatrix operator+ (const DenseMatrix & m1, const DenseMatrix & m2) { DenseMatrix temp (m1.Height(), m1.Width()); int i, j; if (m1.Width() != m2.Width() || m1.Height() != m2.Height()) { (*myerr) << "BaseMatrix :: operator+: Matrix Size does not fit" << endl; } else if (temp.Height() != m1.Height()) { (*myerr) << "BaseMatrix :: operator+: temp not allocated" << endl; } else { for (i = 1; i <= m1.Height(); i++) for (j = 1; j <= m1.Width(); j++) { temp.Set(i, j, m1.Get(i, j) + m2.Get(i, j)); } } return temp; } void Transpose (const DenseMatrix & m1, DenseMatrix & m2) { int w = m1.Width(); int h = m1.Height(); int i, j; m2.SetSize (w, h); double * pm2 = &m2.Elem(1, 1); for (j = 1; j <= w; j++) { const double * pm1 = &m1.Get(1, j); for (i = 1; i <= h; i++) { *pm2 = *pm1; pm2 ++; pm1 += w; } } } /* void DenseMatrix :: Mult (const Vector & v, Vector & prod) const { double sum, val; const double * mp, * sp; double * dp; // const Vector & v = bv.CastToVector(); // Vector & prod = bprod.CastToVector(); int n = Height(); int m = Width(); if (prod.Size() != n) prod.SetSize (n); #ifdef DEVELOP if (!n) { cout << "DenseMatrix::Mult mheight = 0" << endl; } if (!m) { cout << "DenseMatrix::Mult mwidth = 0" << endl; } if (m != v.Size()) { (*myerr) << "\nMatrix and Vector don't fit" << endl; } else if (Height() != prod.Size()) { (*myerr) << "Base_Matrix::operator*(Vector): prod vector not ok" << endl; } else #endif { if (Symmetric()) { int i, j; for (i = 1; i <= n; i++) { sp = &v.Get(1); dp = &prod.Elem(1); mp = &Get(i, 1); val = v.Get(i); sum = Get(i, i) * val; for (j = 1; j < i; ++j, ++mp, ++sp, ++dp) { sum += *mp * *sp; *dp += val * *mp; } prod.Elem(i) = sum; } } else { mp = data; dp = &prod.Elem(1); for (int i = 1; i <= n; i++) { sum = 0; sp = &v.Get(1); for (int j = 1; j <= m; j++) { // sum += Get(i,j) * v.Get(j); sum += *mp * *sp; mp++; sp++; } // prod.Set (i, sum); *dp = sum; dp++; } } } } */ void DenseMatrix :: MultTrans (const Vector & v, Vector & prod) const { // const Vector & v = (const Vector&)bv; // .CastToVector(); // Vector & prod = (Vector & )bprod; // .CastToVector(); /* if (Height() != v.Size()) { (*myerr) << "\nMatrix and Vector don't fit" << endl; } else if (Width() != prod.Size()) { (*myerr) << "Base_Matrix::operator*(Vector): prod vector not ok" << endl; } else */ { int i, j; int w = Width(), h = Height(); if (prod.Size() != w) prod.SetSize (w); const double * pmat = &Get(1, 1); const double * pv = &v(0); prod = 0; for (i = 1; i <= h; i++) { double val = *pv; ++pv; double * pprod = &prod(0); for (j = w-1; j >= 0; --j, ++pmat, ++pprod) { *pprod += val * *pmat; } } /* double sum; for (i = 1; i <= Width(); i++) { sum = 0; for (int j = 1; j <= Height(); j++) sum += Get(j, i) * v.Get(j); prod.Set (i, sum); } */ } } void DenseMatrix :: Residuum (const Vector & x, const Vector & b, Vector & res) const { double sum; // const Vector & x = bx.CastToVector(); // const Vector & b = bb.CastToVector(); // Vector & res = bres.CastToVector(); res.SetSize (Height()); if (Width() != x.Size() || Height() != b.Size()) { (*myerr) << "\nMatrix and Vector don't fit" << endl; } else if (Height() != res.Size()) { (*myerr) << "Base_Matrix::operator*(Vector): prod vector not ok" << endl; } else { int h = Height(); int w = Width(); const double * mp = &Get(1, 1); for (int i = 1; i <= h; i++) { sum = b(i-1); const double * xp = &x(0); for (int j = 1; j <= w; ++j, ++mp, ++xp) sum -= *mp * *xp; res(i-1) = sum; } } } #ifdef ABC double DenseMatrix :: EvaluateBilinearform (const Vector & hx) const { double sum = 0, hsum; // const Vector & hx = x.CastToVector(); int i, j; if (Width() != hx.Size() || Height() != hx.Size()) { (*myerr) << "Matrix::EvaluateBilinearForm: sizes don't fit" << endl; } else { for (i = 1; i <= Height(); i++) { hsum = 0; for (j = 1; j <= Height(); j++) { hsum += Get(i, j) * hx.Get(j); } sum += hsum * hx.Get(i); } } // testout << "sum = " << sum << endl; return sum; } void DenseMatrix :: MultElementMatrix (const Array & pnum, const Vector & hx, Vector & hy) { int i, j; // const Vector & hx = x.CastToVector(); // Vector & hy = y.CastToVector(); if (Symmetric()) { for (i = 1; i <= Height(); i++) { for (j = 1; j < i; j++) { hy.Elem(pnum.Get(i)) += Get(i, j) * hx.Get(pnum.Get(j)); hy.Elem(pnum.Get(j)) += Get(i, j) * hx.Get(pnum.Get(i)); } hy.Elem(pnum.Get(j)) += Get(i, i) * hx.Get(pnum.Get(i)); } } else for (i = 1; i <= Height(); i++) for (j = 1; j <= Width(); j++) hy.Elem(pnum.Get(i)) += Get(i, j) * hx.Get(pnum.Get(j)); } void DenseMatrix :: MultTransElementMatrix (const Array & pnum, const Vector & hx, Vector & hy) { int i, j; // const Vector & hx = x.CastToVector(); // Vector & hy = y.CastToVector(); if (Symmetric()) MultElementMatrix (pnum, hx, hy); else for (i = 1; i <= Height(); i++) for (j = 1; j <= Width(); j++) hy.Elem(pnum.Get(i)) += Get(j, i) * hx.Get(pnum.Get(j)); } #endif void DenseMatrix :: Solve (const Vector & v, Vector & sol) const { DenseMatrix temp (*this); temp.SolveDestroy (v, sol); } void DenseMatrix :: SolveDestroy (const Vector & v, Vector & sol) { double q; if (Width() != Height()) { (*myerr) << "SolveDestroy: Matrix not square"; return; } if (Width() != v.Size()) { (*myerr) << "SolveDestroy: Matrix and Vector don't fit"; return; } sol = v; if (Height() != sol.Size()) { (*myerr) << "SolveDestroy: Solution Vector not ok"; return; } if (0 /* Symmetric() */) { // Cholesky factorization int i, j, k, n; n = Height(); // Cholesky double x; Vector p(n); for (i = 1; i <= n; i++) for (j = 1; j < i; j++) Elem(j, i) = Get(i, j); for (i = 1; i <= n; i++) { // (*mycout) << "." << flush; for (j = i; j <= n; j++) { x = Get(i, j); const double * pik = &Get(i, 1); const double * pjk = &Get(j, 1); for (k = i-2; k >= 0; --k, ++pik, ++pjk) x -= (*pik) * (*pjk); // for (k = i-1; k >= 1; --k) // x -= Get(j, k) * Get(i, k); if (i == j) { if (x <= 0) { cerr << "Matrix indefinite" << endl; return; } p(i-1) = 1 / sqrt(x); } else { Elem(j, i) = x * p(i-1); } } } for (int i = 1; i <= n; i++) Elem(i, i) = 1 / p(i-1); // A = L L^t // L stored in left-lower triangle sol = v; // Solve L sol = sol for (int i = 1; i <= n; i++) { double val = sol(i-1); const double * pij = &Get(i, 1); const double * solj = &sol(0); for (int j = 1; j < i; j++, ++pij, ++solj) val -= *pij * *solj; // for (j = 1; j < i; j++) // val -= Get(i, j) * sol.Get(j); sol(i-1) = val / Get(i, i); } // Solve L^t sol = sol for (int i = n; i >= 1; i--) { double val = sol(i-1) / Get(i, i); sol(i-1) = val; double * solj = &sol(0); const double * pij = &Get(i, 1); for (j = 1; j < i; ++j, ++pij, ++solj) *solj -= val * *pij; // for (j = 1; j < i; j++) // sol.Elem(j) -= Get(i, j) * val; } } else { // (*mycout) << "gauss" << endl; int n = Height(); for (int i = 1; i <= n; i++) { for (int j = i+1; j <= n; j++) { q = Get(j,i) / Get(i,i); if (q) { const double * pik = &Get(i, i+1); double * pjk = &Elem(j, i+1); for (int k = i+1; k <= n; ++k, ++pik, ++pjk) *pjk -= q * *pik; // for (k = i+1; k <= Height(); k++) // Elem(j, k) -= q * Get(i,k); sol(j-1) -= q * sol(i-1); } } } for (int i = n; i >= 1; i--) { q = sol(i-1); for (int j = i+1; j <= n; j++) q -= Get(i,j) * sol(j-1); sol(i-1) = q / Get(i,i); } } } /* BaseMatrix * DenseMatrix :: Copy () const { return new DenseMatrix (*this); } */ ostream & operator<< (ostream & ost, const DenseMatrix & m) { for (int i = 0; i < m.Height(); i++) { for (int j = 0; j < m.Width(); j++) ost << m.Get(i+1,j+1) << " "; ost << endl; } return ost; } } netgen-6.2.1804/libsrc/linalg/CMakeLists.txt0000644000175000017500000000050213272137567017266 0ustar kurtkurtadd_library( la OBJECT densemat.cpp polynomial.cpp bfgs.cpp linopt.cpp linsearch.cpp ) set_target_properties(la PROPERTIES POSITION_INDEPENDENT_CODE ON ) install(FILES densemat.hpp linalg.hpp opti.hpp polynomial.hpp vector.hpp DESTINATION ${NG_INSTALL_DIR_INCLUDE}/linalg COMPONENT netgen_devel ) netgen-6.2.1804/libsrc/linalg/bfgs.cpp0000644000175000017500000002063713272137567016166 0ustar kurtkurt/***************************************************************************/ /* */ /* Vorlesung Optimierung I, Gfrerer, WS94/95 */ /* BFGS-Verfahren zur Lösung freier nichtlinearer Optimierungsprobleme */ /* */ /* Programmautor: Joachim Schöberl */ /* Matrikelnummer: 9155284 */ /* */ /***************************************************************************/ #include #include #include #include "opti.hpp" namespace netgen { void Cholesky (const DenseMatrix & a, DenseMatrix & l, Vector & d) { // Factors A = L D L^T double x; int n = a.Height(); // (*testout) << "a = " << a << endl; l = a; for (int i = 1; i <= n; i++) { for (int j = i; j <= n; j++) { x = l.Get(i, j); for (int k = 1; k < i; k++) x -= l.Get(i, k) * l.Get(j, k) * d(k-1); if (i == j) { d(i-1) = x; } else { l.Elem(j, i) = x / d(i-1); } } } for (int i = 1; i <= n; i++) { l.Elem(i, i) = 1; for (int j = i+1; j <= n; j++) l.Elem(i, j) = 0; } /* // Multiply: (*testout) << "multiplied factors: " << endl; for (i = 1; i <= n; i++) for (j = 1; j <= n; j++) { x = 0; for (k = 1; k <= n; k++) x += l.Get(i, k) * l.Get(j, k) * d.Get(k); (*testout) << x << " "; } (*testout) << endl; */ } void MultLDLt (const DenseMatrix & l, const Vector & d, const Vector & g, Vector & p) { /* int i, j, n; double val; n = l.Height(); p = g; for (i = 1; i <= n; i++) { val = 0; for (j = i; j <= n; j++) val += p.Get(j) * l.Get(j, i); p.Set(i, val); } for (i = 1; i <= n; i++) p.Elem(i) *= d.Get(i); for (i = n; i >= 1; i--) { val = 0; for (j = 1; j <= i; j++) val += p.Get(j) * l.Get(i, j); p.Set(i, val); } */ double val; int n = l.Height(); p = g; for (int i = 0; i < n; i++) { val = 0; for (int j = i; j < n; j++) val += p(j) * l(j, i); p(i) = val; } for (int i = 0; i < n; i++) p(i) *= d(i); for (int i = n-1; i >= 0; i--) { val = 0; for (int j = 0; j <= i; j++) val += p(j) * l(i, j); p(i) = val; } } void SolveLDLt (const DenseMatrix & l, const Vector & d, const Vector & g, Vector & p) { double val; int n = l.Height(); p = g; for (int i = 0; i < n; i++) { val = 0; for (int j = 0; j < i; j++) val += p(j) * l(i,j); p(i) -= val; } for (int i = 0; i < n; i++) p(i) /= d(i); for (int i = n-1; i >= 0; i--) { val = 0; for (int j = i+1; j < n; j++) val += p(j) * l(j, i); p(i) -= val; } } int LDLtUpdate (DenseMatrix & l, Vector & d, double a, const Vector & u) { // Bemerkung: Es wird a aus R erlaubt // Rueckgabewert: 0 .. D bleibt positiv definit // 1 .. sonst int n = l.Height(); Vector v(n); double t, told, xi; told = 1; v = u; for (int j = 1; j <= n; j++) { t = told + a * sqr (v(j-1)) / d(j-1); if (t <= 0) { (*testout) << "update err, t = " << t << endl; return 1; } xi = a * v(j-1) / (d(j-1) * t); d(j-1) *= t / told; for (int i = j + 1; i <= n; i++) { v(i-1) -= v(j-1) * l.Elem(i, j); l.Elem(i, j) += xi * v(i-1); } told = t; } return 0; } double BFGS ( Vector & x, // i: Startwert // o: Loesung, falls IFAIL = 0 const MinFunction & fun, const OptiParameters & par, double eps ) { int n = x.Size(); long it; char a1crit, a3acrit; Vector d(n), g(n), p(n), temp(n), bs(n), xneu(n), y(n), s(n), x0(n); DenseMatrix l(n); DenseMatrix hesse(n); double /* normg, */ alphahat, hd, fold; double a1, a2; const double mu1 = 0.1, sigma = 0.1, xi1 = 1, xi2 = 10; const double tau = 0.1, tau1 = 0.1, tau2 = 0.6; Vector typx(x.Size()); // i: typische Groessenordnung der Komponenten double f, f0; double typf; // i: typische Groessenordnung der Loesung double fmin = -1e5; // i: untere Schranke fuer Funktionswert // double eps = 1e-8; // i: Abbruchschranke fuer relativen Gradienten double tauf = 0.1; // i: Abbruchschranke fuer die relative Aenderung der // Funktionswerte int ifail; // o: 0 .. Erfolg // -1 .. Unterschreitung von fmin // 1 .. kein Erfolg bei Liniensuche // 2 .. Überschreitung von itmax typx = par.typx; typf = par.typf; l = 0; for (int i = 1; i <= n; i++) l.Elem(i, i) = 1; f = fun.FuncGrad (x, g); f0 = f; x0 = x; it = 0; do { // Restart // cout << "it " << it << "f = " << f << endl; if (it % (5 * n) == 0) { for (int i = 1; i <= n; i++) d(i-1) = typf/ sqr (typx(i-1)); // 1; for (int i = 2; i <= n; i++) for (int j = 1; j < i; j++) l.Elem(i, j) = 0; /* hesse = 0; for (i = 1; i <= n; i++) hesse.Elem(i, i) = typf / sqr (typx.Get(i)); fun.ApproximateHesse (x, hesse); Cholesky (hesse, l, d); */ } it++; if (it > par.maxit_bfgs) { ifail = 2; break; } // Solve with factorized B SolveLDLt (l, d, g, p); // (*testout) << "l " << l << endl // << "d " << d << endl // << "g " << g << endl // << "p " << p << endl; p *= -1; y = g; fold = f; // line search alphahat = 1; lines (x, xneu, p, f, g, fun, par, alphahat, fmin, mu1, sigma, xi1, xi2, tau, tau1, tau2, ifail); if(ifail == 1) (*testout) << "no success with linesearch" << endl; /* // if (it > par.maxit_bfgs/2) { (*testout) << "x = " << x << endl; (*testout) << "xneu = " << xneu << endl; (*testout) << "f = " << f << endl; (*testout) << "g = " << g << endl; } */ // (*testout) << "it = " << it << " f = " << f << endl; // if (ifail != 0) break; s.Set2 (1, xneu, -1, x); y *= -1; y.Add (1,g); // y += g; x = xneu; // BFGS Update MultLDLt (l, d, s, bs); a1 = y * s; a2 = s * bs; if (a1 > 0 && a2 > 0) { if (LDLtUpdate (l, d, 1 / a1, y) != 0) { cerr << "BFGS update error1" << endl; (*testout) << "BFGS update error1" << endl; (*testout) << "l " << endl << l << endl << "d " << d << endl; ifail = 1; break; } if (LDLtUpdate (l, d, -1 / a2, bs) != 0) { cerr << "BFGS update error2" << endl; (*testout) << "BFGS update error2" << endl; (*testout) << "l " << endl << l << endl << "d " << d << endl; ifail = 1; break; } } // Calculate stop conditions hd = eps * max2 (typf, fabs (f)); a1crit = 1; for (int i = 1; i <= n; i++) if ( fabs (g(i-1)) * max2 (typx(i-1), fabs (x(i-1))) > hd) a1crit = 0; a3acrit = (fold - f <= tauf * max2 (typf, fabs (f))); // testout << "g = " << g << endl; // testout << "a1crit, a3crit = " << int(a1crit) << ", " << int(a3acrit) << endl; /* // Output for tests normg = sqrt (g * g); testout << "it =" << setw (5) << it << " f =" << setw (12) << setprecision (5) << f << " |g| =" << setw (12) << setprecision (5) << normg; testout << " x = (" << setw (12) << setprecision (5) << x.Elem(1); for (i = 2; i <= n; i++) testout << "," << setw (12) << setprecision (5) << x.Elem(i); testout << ")" << endl; */ //(*testout) << "it = " << it << " f = " << f << " x = " << x << endl // << " g = " << g << " p = " << p << endl << endl; // (*testout) << "|g| = " << g.L2Norm() << endl; if (g.L2Norm() < fun.GradStopping (x)) break; } while (!a1crit || !a3acrit); /* (*testout) << "it = " << it << " g = " << g << " f = " << f << " fail = " << ifail << endl; */ if (f0 < f || (ifail == 1)) { (*testout) << "fail, f = " << f << " f0 = " << f0 << endl; f = f0; x = x0; } // cout << endl; // (*testout) << "x = " << x << ", x0 = " << x0 << endl; return f; } } netgen-6.2.1804/libsrc/linalg/polynomial.cpp0000644000175000017500000000651313272137567017425 0ustar kurtkurt#include #include namespace netgen { QuadraticPolynomial1V :: QuadraticPolynomial1V (double ac, double acx, double acxx) { c = ac; cx = acx; cxx = acxx; } double QuadraticPolynomial1V :: Value (double x) { return c + cx * x + cxx * x * x; } double QuadraticPolynomial1V :: MaxUnitInterval () { // inner max if (cxx < 0 && cx > 0 && cx < -2 * cxx) { return c - 0.25 * cx * cx / cxx; } if (cx + cxx > 0) // right edge return c + cx + cxx; // left end return c; } LinearPolynomial2V :: LinearPolynomial2V (double ac, double acx, double acy) { c = ac; cx = acx; cy = acy; }; QuadraticPolynomial2V :: QuadraticPolynomial2V () { ; } QuadraticPolynomial2V :: QuadraticPolynomial2V (double ac, double acx, double acy, double acxx, double acxy, double acyy) { c = ac; cx = acx; cy = acy; cxx = acxx; cxy = acxy; cyy = acyy; } void QuadraticPolynomial2V :: Square (const LinearPolynomial2V & lp) { c = lp.c * lp.c; cx = 2 * lp.c * lp.cx; cy = 2 * lp.c * lp.cy; cxx = lp.cx * lp.cx; cxy = 2 * lp.cx * lp.cy; cyy = lp.cy * lp.cy; } void QuadraticPolynomial2V :: Add (double lam, const QuadraticPolynomial2V & qp2) { c += lam * qp2.c; cx += lam * qp2.cx; cy += lam * qp2.cy; cxx += lam * qp2.cxx; cxy += lam * qp2.cxy; cyy += lam * qp2.cyy; } double QuadraticPolynomial2V :: Value (double x, double y) { return c + cx * x + cy * y + cxx * x * x + cxy * x * y + cyy * y * y; } /* double QuadraticPolynomial2V :: MinUnitSquare () { double x, y; double minv = 1e8; double val; for (x = 0; x <= 1; x += 0.1) for (y = 0; y <= 1; y += 0.1) { val = Value (x, y); if (val < minv) minv = val; } return minv; }; */ double QuadraticPolynomial2V :: MaxUnitSquare () { // find critical point double maxv = c; double hv; double det, x0, y0; det = 4 * cxx * cyy - cxy * cxy; if (det > 0) { // definite surface x0 = (-2 * cyy * cx + cxy * cy) / det; y0 = (cxy * cx -2 * cxx * cy) / det; if (x0 >= 0 && x0 <= 1 && y0 >= 0 && y0 <= 1) { hv = Value (x0, y0); if (hv > maxv) maxv = hv; } } QuadraticPolynomial1V e1(c, cx, cxx); QuadraticPolynomial1V e2(c, cy, cyy); QuadraticPolynomial1V e3(c+cy+cyy, cx+cxy, cxx); QuadraticPolynomial1V e4(c+cx+cxx, cy+cxy, cyy); hv = e1.MaxUnitInterval(); if (hv > maxv) maxv = hv; hv = e2.MaxUnitInterval(); if (hv > maxv) maxv = hv; hv = e3.MaxUnitInterval(); if (hv > maxv) maxv = hv; hv = e4.MaxUnitInterval(); if (hv > maxv) maxv = hv; return maxv; }; double QuadraticPolynomial2V :: MaxUnitTriangle () { // find critical point double maxv = c; double hv; double det, x0, y0; det = 4 * cxx * cyy - cxy * cxy; if (cxx < 0 && det > 0) { // definite surface x0 = (-2 * cyy * cx + cxy * cy) / det; y0 = (cxy * cx -2 * cxx * cy) / det; if (x0 >= 0 && y0 >= 0 && x0+y0 <= 1) { return Value (x0, y0); } } QuadraticPolynomial1V e1(c, cx, cxx); QuadraticPolynomial1V e2(c, cy, cyy); QuadraticPolynomial1V e3(c+cy+cyy, cx-cy+cxy-2*cyy, cxx-cxy+cyy); hv = e1.MaxUnitInterval(); if (hv > maxv) maxv = hv; hv = e2.MaxUnitInterval(); if (hv > maxv) maxv = hv; hv = e3.MaxUnitInterval(); if (hv > maxv) maxv = hv; return maxv; } } netgen-6.2.1804/libsrc/linalg/linsearch.cpp0000644000175000017500000001701113272137567017205 0ustar kurtkurt/***************************************************************************/ /* */ /* Problem: Liniensuche */ /* */ /* Programmautor: Joachim Schöberl */ /* Matrikelnummer: 9155284 */ /* */ /* Algorithmus nach: */ /* */ /* Optimierung I, Gfrerer, WS94/95 */ /* Algorithmus 2.1: Liniensuche Problem (ii) */ /* */ /***************************************************************************/ #include #include // min, max, sqr #include #include "opti.hpp" namespace netgen { const double eps0 = 1E-15; // Liniensuche double MinFunction :: Func (const Vector & /* x */) const { cerr << "Func of MinFunction called" << endl; return 0; } void MinFunction :: Grad (const Vector & /* x */, Vector & /* g */) const { cerr << "Grad of MinFunction called" << endl; } double MinFunction :: FuncGrad (const Vector & x, Vector & g) const { cerr << "Grad of MinFunction called" << endl; return 0; /* int n = x.Size(); Vector xr(n); Vector xl(n); double eps = 1e-6; double fl, fr; for (int i = 1; i <= n; i++) { xr.Set (1, x); xl.Set (1, x); xr.Elem(i) += eps; fr = Func (xr); xl.Elem(i) -= eps; fl = Func (xl); g.Elem(i) = (fr - fl) / (2 * eps); } double f = Func(x); // (*testout) << "f = " << f << " grad = " << g << endl; return f; */ } double MinFunction :: FuncDeriv (const Vector & x, const Vector & dir, double & deriv) const { Vector g(x.Size()); double f = FuncGrad (x, g); deriv = (g * dir); // (*testout) << "g = " << g << ", dir = " << dir << ", deriv = " << deriv << endl; return f; } void MinFunction :: ApproximateHesse (const Vector & x, DenseMatrix & hesse) const { int n = x.Size(); int i, j; static Vector hx; hx.SetSize(n); double eps = 1e-6; double f, f11, f12, f21, f22; for (i = 0; i < n; i++) { for (j = 0; j < i; j++) { hx = x; hx(i) = x(i) + eps; hx(j) = x(j) + eps; f11 = Func(hx); hx(i) = x(i) + eps; hx(j) = x(j) - eps; f12 = Func(hx); hx(i) = x(i) - eps; hx(j) = x(j) + eps; f21 = Func(hx); hx(i) = x(i) - eps; hx(j) = x(j) - eps; f22 = Func(hx); hesse(i, j) = hesse(j, i) = (f11 + f22 - f12 - f21) / (2 * eps * eps); } hx = x; f = Func(x); hx(i) = x(i) + eps; f11 = Func(hx); hx(i) = x(i) - eps; f22 = Func(hx); hesse(i, i) = (f11 + f22 - 2 * f) / (eps * eps); } // (*testout) << "hesse = " << hesse << endl; } /// Line search, modified Mangasarien conditions void lines (Vector & x, // i: initial point of line-search Vector & xneu, // o: solution, if successful Vector & p, // i: search direction double & f, // i: function-value at x // o: function-value at xneu, iff ifail = 0 Vector & g, // i: gradient at x // o: gradient at xneu, iff ifail = 0 const MinFunction & fun, // function to minimize const OptiParameters & par, double & alphahat, // i: initial value for alpha_hat // o: solution alpha iff ifail = 0 double fmin, // i: lower bound for f double mu1, // i: Parameter mu_1 of Alg.2.1 double sigma, // i: Parameter sigma of Alg.2.1 double xi1, // i: Parameter xi_1 of Alg.2.1 double xi2, // i: Parameter xi_1 of Alg.2.1 double tau, // i: Parameter tau of Alg.2.1 double tau1, // i: Parameter tau_1 of Alg.2.1 double tau2, // i: Parameter tau_2 of Alg.2.1 int & ifail) // o: 0 on success // -1 bei termination because lower limit fmin // 1 bei illegal termination due to different reasons { double phi0, phi0prime, phi1, phi1prime, phihatprime; double alpha1, alpha2, alphaincr, c; char flag = 1; long it; alpha1 = 0; alpha2 = 1e50; phi0 = phi1 = f; phi0prime = g * p; if (phi0prime > 0) { ifail = 1; return; } ifail = 1; // Markus phi1prime = phi0prime; // (*testout) << "phi0prime = " << phi0prime << endl; // it = 100000l; it = 0; // cout << "lin: "; while (it++ <= par.maxit_linsearch) { // cout << "i = " << it << " f = " << f << " "; xneu.Set2 (1, x, alphahat, p); // f = fun.FuncGrad (xneu, g); // f = fun.Func (xneu); f = fun.FuncDeriv (xneu, p, phihatprime); // (*testout) << "lines, f = " << f << " phip = " << phihatprime << endl; if (f < fmin) { ifail = -1; break; } if (alpha2 - alpha1 < eps0 * alpha2) { ifail = 0; break; } // (*testout) << "i = " << it << " al = " << alphahat << " f = " << f << " fprime " << phihatprime << endl;; if (f - phi0 > mu1 * alphahat * phi1prime + eps0 * fabs (phi0)) { flag = 0; alpha2 = alphahat; c = (f - phi1 - phi1prime * (alphahat-alpha1)) / sqr (alphahat-alpha1); alphahat = alpha1 - 0.5 * phi1prime / c; if (alphahat > alpha2) alphahat = alpha1 + 1/(4*c) * ( (sigma+mu1) * phi0prime - 2*phi1prime + sqrt (sqr(phi1prime - mu1 * phi0prime) - 4 * (phi1 - phi0 - mu1 * alpha1 * phi0prime) * c)); alphahat = max2 (alphahat, alpha1 + tau * (alpha2 - alpha1)); alphahat = min2 (alphahat, alpha2 - tau * (alpha2 - alpha1)); // (*testout) << " if-branch" << endl; } else { /* f = fun.FuncGrad (xneu, g); phihatprime = g * p; */ f = fun.FuncDeriv (xneu, p, phihatprime); if (phihatprime < sigma * phi0prime * (1 + eps0)) { if (phi1prime < phihatprime) // Approximationsfunktion ist konvex alphaincr = (alphahat - alpha1) * phihatprime / (phi1prime - phihatprime); else alphaincr = 1e99; // MAXDOUBLE; if (flag) { alphaincr = max2 (alphaincr, xi1 * (alphahat-alpha1)); alphaincr = min2 (alphaincr, xi2 * (alphahat-alpha1)); } else { alphaincr = max2 (alphaincr, tau1 * (alpha2 - alphahat)); alphaincr = min2 (alphaincr, tau2 * (alpha2 - alphahat)); } alpha1 = alphahat; alphahat += alphaincr; phi1 = f; phi1prime = phihatprime; } else { ifail = 0; // Erfolg !! break; } // (*testout) << " else, " << endl; } } // (*testout) << "linsearch: it = " << it << " ifail = " << ifail << endl; // cout << endl; fun.FuncGrad (xneu, g); if (it < 0) ifail = 1; // (*testout) << "fail = " << ifail << endl; } void SteepestDescent (Vector & x, const MinFunction & fun, const OptiParameters & par) { int it, n = x.Size(); Vector xnew(n), p(n), g(n), g2(n); double val, alphahat; int fail; val = fun.FuncGrad(x, g); alphahat = 1; // testout << "f = "; for (it = 0; it < 10; it++) { // testout << val << " "; // p = -g; p.Set (-1, g); lines (x, xnew, p, val, g, fun, par, alphahat, -1e5, 0.1, 0.1, 1, 10, 0.1, 0.1, 0.6, fail); x = xnew; } // testout << endl; } } netgen-6.2.1804/libsrc/csg/0000755000175000017500000000000013272137567014037 5ustar kurtkurtnetgen-6.2.1804/libsrc/csg/csgparser.hpp0000644000175000017500000000427513272137567016551 0ustar kurtkurt#ifndef _CSGPARSER_HPP #define _CSGPARSER_HPP namespace netgen { enum TOKEN_TYPE { TOK_MINUS = '-', TOK_LP = '(', OK_RP = ')', TOK_LSP = '[', TOK_RSP = ']', TOK_EQU = '=', TOK_COMMA = ',', TOK_SEMICOLON = ';', TOK_NUM = 100, TOK_STRING, TOK_NAMED_SOLID, TOK_PRIMITIVE, TOK_OR, TOK_AND, TOK_NOT, TOK_SINGULAR, TOK_EDGE, TOK_POINT, TOK_FACE, TOK_IDENTIFY, TOK_CLOSESURFACES, TOK_CLOSEEDGES, TOK_PERIODIC, TOK_SOLID, TOK_RECO, TOK_TLO, TOK_CURVE2D, TOK_CURVE3D, TOK_BOUNDINGBOX, TOK_BOUNDARYCONDITION, TOK_BOUNDARYCONDITIONNAME, TOK_DEFINE, TOK_CONSTANT, TOK_END }; struct kwstruct { TOKEN_TYPE kw; const char * name; }; enum PRIMITIVE_TYPE { TOK_SPHERE = 1, TOK_CYLINDER, TOK_PLANE, TOK_ELLIPTICCYLINDER, TOK_ELLIPSOID, TOK_CONE, TOK_ELLIPTICCONE, TOK_ORTHOBRICK, TOK_POLYHEDRON, TOK_TORUS, TOK_TUBE, TOK_GENCYL, TOK_EXTRUSION, TOK_REVOLUTION, TOK_TRANSLATE, TOK_MULTITRANSLATE, TOK_ROTATE, TOK_MULTIROTATE }; struct primstruct { PRIMITIVE_TYPE kw; const char * name; }; class CSGScanner { TOKEN_TYPE token; PRIMITIVE_TYPE prim_token; double num_value; string string_value; int linenum; istream * scanin; public: CSGScanner (istream & ascanin); TOKEN_TYPE GetToken() const { return token; } double GetNumValue() const { return num_value; } const string & GetStringValue() const { return string_value; } char GetCharValue() const { return string_value[0]; } PRIMITIVE_TYPE GetPrimitiveToken() const { return prim_token; } void ReadNext(); /* CSGScanner & Parse (char ch); CSGScanner & Parse (int & i); CSGScanner & Parse (double & d); CSGScanner & Parse (Point<3> & p); CSGScanner & Parse (Vec<3> & p); */ void Error (const string & err); }; CSGScanner & operator>> (CSGScanner & scan, char ch); CSGScanner & operator>> (CSGScanner & scan, double & d); CSGScanner & operator>> (CSGScanner & scan, int & i); CSGScanner & operator>> (CSGScanner & scan, Point<3> & p); CSGScanner & operator>> (CSGScanner & scan, Vec<3> & v); } #endif netgen-6.2.1804/libsrc/csg/splinesurface.hpp0000644000175000017500000000602213272137567017413 0ustar kurtkurt#ifndef FILE_SPLINESURFACE #define FILE_SPLINESURFACE namespace netgen { class SplineSurface : public OneSurfacePrimitive { protected: Array> geompoints; Array>> splines; Array bcnames; Array maxh; shared_ptr baseprimitive; shared_ptr>> cuts; shared_ptr>> all_cuts; public: SplineSurface(shared_ptr abaseprimitive, shared_ptr>> acuts) : OneSurfacePrimitive(), baseprimitive(abaseprimitive), cuts(acuts) { ; } virtual ~SplineSurface() { ; } const auto & GetSplines() const { return splines; } int GetNSplines() const { return splines.Size(); } const Array>& GetPoints() const { return geompoints; } string GetSplineType(const int i) const { return splines[i]->GetType(); } SplineSeg<3> & GetSpline(const int i) { return *splines[i]; } const SplineSeg<3> & GetSpline(const int i) const { return *splines[i]; } int GetNP() const { return geompoints.Size(); } const GeomPoint<3> & GetPoint(int i) const { return geompoints[i]; } string GetBCName(int i) const { return bcnames[i]; } string GetBCNameOf(Point<3> p1, Point<3> p2) const; DLL_HEADER void AppendPoint(const Point<3> & p, const double reffac = 1., const bool hpref=false); void AppendSegment(shared_ptr> spline, string & bcname, double amaxh = -1); const shared_ptr>> CreateCuttingSurfaces(); const shared_ptr>> GetCuts() const { return all_cuts; } const shared_ptr GetBase() const { return baseprimitive; } virtual void Project (Point<3> & p3d) const { baseprimitive->Project(p3d); } virtual double CalcFunctionValue (const Point<3> & point) const { return baseprimitive->CalcFunctionValue (point); } virtual void CalcGradient (const Point<3> & point, Vec<3> & grad) const { baseprimitive->CalcGradient (point,grad); } virtual double HesseNorm () const { return baseprimitive->HesseNorm(); } virtual Point<3> GetSurfacePoint () const { return baseprimitive->GetSurfacePoint(); } virtual void CalcSpecialPoints(Array> & pts) const { baseprimitive->CalcSpecialPoints(pts); } virtual INSOLID_TYPE BoxInSolid(const BoxSphere<3> & box) const { return baseprimitive->BoxInSolid(box); } /* virtual void Project (Point<3> & p3d) const; virtual double CalcFunctionValue (const Point<3> & point) const; virtual void CalcGradient (const Point<3> & point, Vec<3> & grad) const; virtual double HesseNorm () const; virtual Point<3> GetSurfacePoint () const; virtual void CalcSpecialPoints(Array> & pts) const; virtual INSOLID_TYPE BoxInSolid(const BoxSphere<3> & box) const; */ virtual void Print (ostream & str) const; }; } #endif netgen-6.2.1804/libsrc/csg/brick.hpp0000644000175000017500000000635713272137567015655 0ustar kurtkurt#ifndef FILE_BRICK #define FILE_BRICK /**************************************************************************/ /* File: brick.hpp */ /* Author: Joachim Schoeberl */ /* Date: 11. Mar. 98 */ /**************************************************************************/ namespace netgen { /* brick geometry, has several surfaces */ class Parallelogram3d : public Surface { Point<3> p1, p2, p3, p4; Vec<3> v12, v13; Vec<3> n; public: Parallelogram3d (Point<3> ap1, Point<3> ap2, Point<3> ap3); virtual ~Parallelogram3d (); void SetPoints (Point<3> ap1, Point<3> ap2, Point<3> ap3); virtual int IsIdentic (const Surface & s2, int & inv, double eps) const; virtual double CalcFunctionValue (const Point<3> & point) const; virtual void CalcGradient (const Point<3> & point, Vec<3> & grad) const; virtual void CalcHesse (const Point<3> & point, Mat<3> & hesse) const; virtual double HesseNorm () const; virtual Point<3> GetSurfacePoint () const; virtual void Print (ostream & str) const; virtual void GetTriangleApproximation (TriangleApproximation & tas, const Box<3> & boundingbox, double facets) const; protected: void CalcData(); }; class Brick : public Primitive { Point<3> p1, p2, p3, p4; Vec<3> v12, v13, v14; // Array faces; Array faces; public: Brick (Point<3> ap1, Point<3> ap2, Point<3> ap3, Point<3> ap4); virtual ~Brick (); static Primitive * CreateDefault (); virtual Primitive * Copy () const; virtual void Transform (Transformation<3> & trans); virtual INSOLID_TYPE BoxInSolid (const BoxSphere<3> & box) const; virtual INSOLID_TYPE PointInSolid (const Point<3> & p, double eps) const; virtual INSOLID_TYPE VecInSolid (const Point<3> & p, const Vec<3> & v, double eps) const; virtual INSOLID_TYPE VecInSolid2 (const Point<3> & p, const Vec<3> & v1, const Vec<3> & v2, double eps) const; virtual INSOLID_TYPE VecInSolid3 (const Point<3> & p, const Vec<3> & v1, const Vec<3> & v2, double eps) const; virtual INSOLID_TYPE VecInSolid4 (const Point<3> & p, const Vec<3> & v, const Vec<3> & v2, const Vec<3> & m, double eps) const; virtual int GetNSurfaces() const { return 6; } virtual Surface & GetSurface (int i) { return *faces[i]; } virtual const Surface & GetSurface (int i) const { return *faces[i]; } virtual void GetPrimitiveData (const char *& classname, Array & coeffs) const; virtual void SetPrimitiveData (Array & coeffs); virtual void Reduce (const BoxSphere<3> & box); virtual void UnReduce (); protected: void CalcData(); }; class OrthoBrick : public Brick { protected: Point<3> pmin, pmax; public: OrthoBrick (const Point<3> & ap1, const Point<3> & ap2); virtual INSOLID_TYPE BoxInSolid (const BoxSphere<3> & box) const; virtual void Reduce (const BoxSphere<3> & box); }; } #endif netgen-6.2.1804/libsrc/csg/extrusion.cpp0000644000175000017500000004452213272137567016612 0ustar kurtkurt#include #include #include namespace netgen { Array > project1, project2; void ExtrusionFace :: Init(void) { p0.SetSize(path->GetNSplines()); x_dir.SetSize(path->GetNSplines()); y_dir.SetSize(path->GetNSplines()); z_dir.SetSize(path->GetNSplines()); loc_z_dir.SetSize(path->GetNSplines()); spline3_path.SetSize(path->GetNSplines()); line_path.SetSize(path->GetNSplines()); for(int i=0; iGetNSplines(); i++) { spline3_path[i] = dynamic_cast < const SplineSeg3<3>* >(&path->GetSpline(i)); line_path[i] = dynamic_cast < const LineSeg<3>* >(&path->GetSpline(i)); if(line_path[i]) { y_dir[i] = line_path[i]->EndPI() - line_path[i]->StartPI(); y_dir[i].Normalize(); z_dir[i] = glob_z_direction; Orthogonalize(y_dir[i],z_dir[i]); x_dir[i] = Cross(y_dir[i],z_dir[i]); loc_z_dir[i] = z_dir[i]; } else { z_dir[i] = glob_z_direction; loc_z_dir[i] = glob_z_direction; } } profile->GetCoeff(profile_spline_coeff); latest_point3d = -1.111e30; } ExtrusionFace :: ExtrusionFace(const SplineSeg<2> * profile_in, const SplineGeometry<3> * path_in, const Vec<3> & z_direction) : profile(profile_in), path(path_in), glob_z_direction(z_direction) { deletable = false; Init(); } ExtrusionFace :: ExtrusionFace(const Array & raw_data) { deletable = true; int pos=0; Array< Point<2> > p(3); int ptype = int(raw_data[pos]); pos++; for(int i=0; i(GeomPoint<2>(p[0],1), GeomPoint<2>(p[1],1)); } else if(ptype == 3) { profile = new SplineSeg3<2>(GeomPoint<2>(p[0],1), GeomPoint<2>(p[1],1), GeomPoint<2>(p[2],1)); } path = new SplineGeometry<3>; pos = const_cast< SplineGeometry<3> *>(path)->Load(raw_data,pos); for(int i = 0; i < 3; i++) { glob_z_direction(i) = raw_data[pos]; pos++; } Init(); } ExtrusionFace :: ~ExtrusionFace() { if(deletable) { delete profile; delete path; } } int ExtrusionFace :: IsIdentic (const Surface & s2, int & inv, double eps) const { const ExtrusionFace * ext2 = dynamic_cast(&s2); if(!ext2) return 0; if(ext2 == this) return 1; return 0; } void ExtrusionFace :: Orthogonalize(const Vec<3> & v1, Vec<3> & v2) const { v2 -= (v1*v2)*v1; v2.Normalize(); } void ExtrusionFace :: CalcProj(const Point<3> & point3d, Point<2> & point2d, int & seg, double & t) const { if (Dist2 (point3d, latest_point3d) < 1e-25 * Dist2(path->GetSpline(0).StartPI(), path->GetSpline(0).EndPI())) { point2d = latest_point2d; seg = latest_seg; t = latest_t; return; } latest_point3d = point3d; double cutdist = -1; Array mindist(path->GetNSplines()); for(int i = 0; i < path->GetNSplines(); i++) { double auxcut = -1; double auxmin = -1; if(spline3_path[i]) { Point<3> startp(path->GetSpline(i).StartPI()); Point<3> endp(path->GetSpline(i).EndPI()); Point<3> tanp(spline3_path[i]->TangentPoint()); // lower bound for dist auxmin = sqrt (MinDistTP2 (startp, endp, tanp, point3d)); // upper bound for dist auxcut = min2 (Dist (startp, point3d), Dist (endp, point3d)); } else if(line_path[i]) { auxmin = auxcut = sqrt (MinDistLP2 (path->GetSpline(i).StartPI(), path->GetSpline(i).EndPI(), point3d)); } mindist[i] = auxmin; if(i==0 || auxcut < cutdist) cutdist = auxcut; } Point<2> testpoint2d; Point<3> testpoint3d; double minproj(-1); bool minproj_set(false); for(int i=0; iGetNSplines(); i++) { if(mindist[i] > cutdist*(1+1e-10)) continue; double thist = CalcProj(point3d,testpoint2d,i); testpoint3d = p0[i] + testpoint2d(0)*x_dir[i] + testpoint2d(1)*loc_z_dir[i]; double d = Dist2(point3d,testpoint3d); if(!minproj_set || d < minproj) { minproj_set = true; minproj = d; point2d = testpoint2d; t = thist; seg = i; latest_seg = i; latest_t = t; latest_point2d = point2d; } } } double ExtrusionFace :: CalcProj(const Point<3> & point3d, Point<2> & point2d, int seg) const { double t = -1; if(line_path[seg]) { point2d(0) = (point3d-line_path[seg]->StartPI())*x_dir[seg]; point2d(1) = (point3d-line_path[seg]->StartPI())*z_dir[seg]; double l = Dist(line_path[seg]->StartPI(), line_path[seg]->EndPI()); t = min2(max2((point3d - line_path[seg]->StartPI()) * y_dir[seg],0.), l); p0[seg] = line_path[seg]->StartPI() + t*y_dir[seg]; t *= 1./l; } else if(spline3_path[seg]) { spline3_path[seg]->Project(point3d,p0[seg],t); y_dir[seg] = spline3_path[seg]->GetTangent(t); y_dir[seg].Normalize(); loc_z_dir[seg] = z_dir[seg]; Orthogonalize(y_dir[seg],loc_z_dir[seg]); x_dir[seg] = Cross(y_dir[seg],loc_z_dir[seg]); Vec<3> dir = point3d-p0[seg]; point2d(0) = x_dir[seg]*dir; point2d(1) = loc_z_dir[seg]*dir; } return t; } double ExtrusionFace :: CalcFunctionValue (const Point<3> & point) const { Point<2> p; double dummyd; int dummyi; CalcProj(point, p, dummyi, dummyd); return profile_spline_coeff(0)*p(0)*p(0) + profile_spline_coeff(1)*p(1)*p(1) + profile_spline_coeff(2)*p(0)*p(1) + profile_spline_coeff(3)*p(0) + profile_spline_coeff(4)*p(1) + profile_spline_coeff(5); } void ExtrusionFace :: CalcGradient (const Point<3> & point, Vec<3> & grad) const { Point<2> p2d; double t_path; int seg; CalcProj (point, p2d, seg, t_path); Point<3> phi; Vec<3> phip, phipp, phi_minus_point; path->GetSpline(seg).GetDerivatives(t_path, phi, phip, phipp); phi_minus_point = phi-point; Vec<3> grad_t = (1.0/(phipp*phi_minus_point + phip*phip)) * phip; Vec<3> grad_xbar, grad_ybar; Vec<3> hex, hey, hez, dex, dey, dez; CalcLocalCoordinatesDeriv (seg, t_path, hex, hey, hez, dex, dey, dez); grad_xbar = hex - (phi_minus_point*dex + hex*phip) * grad_t; grad_ybar = hez - (phi_minus_point*dez + hez*phip) * grad_t; double dFdxbar = 2.*profile_spline_coeff(0)*p2d(0) + profile_spline_coeff(2)*p2d(1) + profile_spline_coeff(3); double dFdybar = 2.*profile_spline_coeff(1)*p2d(1) + profile_spline_coeff(2)*p2d(0) + profile_spline_coeff(4); grad = dFdxbar * grad_xbar + dFdybar * grad_ybar; } void ExtrusionFace :: CalcHesse (const Point<3> & point, Mat<3> & hesse) const { const double eps = 1e-7*Dist(path->GetSpline(0).StartPI(),path->GetSpline(0).EndPI()); Point<3> auxpoint1(point),auxpoint2(point); Vec<3> auxvec,auxgrad1,auxgrad2; for(int i=0; i<3; i++) { auxpoint1(i) -= eps; auxpoint2(i) += eps; CalcGradient(auxpoint1,auxgrad1); CalcGradient(auxpoint2,auxgrad2); auxvec = (1./(2.*eps)) * (auxgrad2-auxgrad1); for(int j=0; j<3; j++) hesse(i,j) = auxvec(j); auxpoint1(i) = point(i); auxpoint2(i) = point(i); } /* Vec<3> grad; CalcGradient(point,grad); Point<3> auxpoint(point); Vec<3> auxvec,auxgrad; for(int i=0; i<3; i++) { auxpoint(i) -= eps; CalcGradient(auxpoint,auxgrad); auxvec = (1./eps) * (grad-auxgrad); for(int j=0; j<3; j++) hesse(i,j) = auxvec(j); auxpoint(i) = point(i); } */ for(int i=0; i<3; i++) for(int j=i+1; j<3; j++) hesse(i,j) = hesse(j,i) = 0.5*(hesse(i,j)+hesse(j,i)); } double ExtrusionFace :: HesseNorm () const { return fabs(profile_spline_coeff(0) + profile_spline_coeff(1)) + sqrt(pow(profile_spline_coeff(0)+profile_spline_coeff(1),2)+4.*pow(profile_spline_coeff(2),2)); } double ExtrusionFace :: MaxCurvature () const { double retval,actmax; retval = profile->MaxCurvature(); for(int i=0; iGetNSplines(); i++) { actmax = path->GetSpline(i).MaxCurvature(); if(actmax > retval) retval = actmax; } return 2.*retval; } void ExtrusionFace :: Project (Point<3> & p) const { double dummyt; int seg; Point<2> p2d; CalcProj(p,p2d,seg,dummyt); profile->Project(p2d,p2d,profile_par); p = p0[seg] + p2d(0)*x_dir[seg] + p2d(1)*loc_z_dir[seg]; Vec<2> tangent2d = profile->GetTangent(profile_par); profile_tangent = tangent2d(0)*x_dir[seg] + tangent2d(1)*y_dir[seg]; } Point<3> ExtrusionFace :: GetSurfacePoint () const { p0[0] = path->GetSpline(0).GetPoint(0.5); if(!line_path[0]) { y_dir[0] = path->GetSpline(0).GetTangent(0.5); y_dir[0].Normalize(); loc_z_dir[0] = z_dir[0]; Orthogonalize(y_dir[0],loc_z_dir[0]); x_dir[0] = Cross(y_dir[0],loc_z_dir[0]); } Point<2> locpoint = profile->GetPoint(0.5); return p0[0] + locpoint(0)*x_dir[0] + locpoint(1)*loc_z_dir[0]; } bool ExtrusionFace :: BoxIntersectsFace(const Box<3> & box) const { Point<3> center = box.Center(); Project(center); //(*testout) << "box.Center() " << box.Center() << " projected " << center << " diam " << box.Diam() // << " dist " << Dist(box.Center(),center) << endl; return (Dist(box.Center(),center) < 0.5*box.Diam()); } void ExtrusionFace :: LineIntersections ( const Point<3> & p, const Vec<3> & v, const double eps, int & before, int & after, bool & intersecting ) const { Point<2> p2d; Vec<2> v2d; intersecting = false; double segt; int seg; CalcProj(p,p2d,seg,segt); if(seg == 0 && segt < 1e-20) { Vec<3> v1,v2; v1 = path->GetSpline(0).GetTangent(0); v2 = p-p0[seg]; if(v1*v2 < -eps) return; } if(seg == path->GetNSplines()-1 && 1.-segt < 1e-20) { Vec<3> v1,v2; v1 = path->GetSpline(seg).GetTangent(1); v2 = p-p0[seg]; if(v1*v2 > eps) return; } v2d(0) = v * x_dir[seg]; v2d(1) = v * loc_z_dir[seg]; Vec<2> n(v2d(1),-v2d(0)); Array < Point<2> > ips; profile->LineIntersections(v2d(1), -v2d(0), -v2d(1)*p2d(0) + v2d(0)*p2d(1), ips,eps); int comp; if(fabs(v2d(0)) >= fabs(v2d(1))) comp = 0; else comp = 1; //(*testout) << "p2d " << p2d; for(int i=0; i eps) after++; else intersecting = true; } //(*testout) << endl; } void ExtrusionFace :: Print (ostream & str) const{} INSOLID_TYPE ExtrusionFace :: VecInFace ( const Point<3> & p, const Vec<3> & v, const double eps ) const { Vec<3> normal1; CalcGradient(p,normal1); normal1.Normalize(); double d1 = normal1*v; if(d1 > eps) return IS_OUTSIDE; if(d1 < -eps) return IS_INSIDE; return DOES_INTERSECT; /* Point<2> p2d; double t_path; int seg; CalcProj(p,p2d,seg,t_path); double t; profile.Project(p2d,p2d,t); Vec<2> profile_tangent = profile.GetTangent(t); double d; Vec<3> normal1; CalcGradient(p,normal1); normal1.Normalize(); double d1 = normal1*v; Vec<2> v2d; v2d(0) = v*x_dir[seg]; v2d(1) = v*loc_z_dir[seg]; Vec<2> normal(-profile_tangent(1),profile_tangent(0)); //d = normal*v2d; d = d1; if(d > eps) return IS_OUTSIDE; if(d < -eps) return IS_INSIDE; return DOES_INTERSECT; */ } void ExtrusionFace :: GetTriangleApproximation (TriangleApproximation & tas, const Box<3> & boundingbox, double facets) const { int n = int(facets) + 1; for(int k = 0; k < path -> GetNSplines(); k++) { for(int i = 0; i <= n; i++) { Point<3> origin = path -> GetSpline(k).GetPoint(double(i)/double(n)); if(!line_path[k]) { y_dir[k] = path->GetSpline(k).GetTangent(double(i)/double(n)); y_dir[k].Normalize(); } loc_z_dir[k] = z_dir[k]; Orthogonalize(y_dir[k],loc_z_dir[k]); if(!line_path[k]) x_dir[k] = Cross(y_dir[k],loc_z_dir[k]); for(int j = 0; j <= n; j++) { Point<2> locp = profile->GetPoint(double(j)/double(n)); tas.AddPoint(origin + locp(0)*x_dir[k] + locp(1)*loc_z_dir[k]); } } } for(int k = 0; k < path->GetNSplines(); k++) for(int i = 0; i < n; i++) for(int j = 0; j < n; j++) { int pi = k*(n+1)*(n+1) + (n+1)*i +j; tas.AddTriangle( TATriangle (0, pi,pi+1,pi+n+1) ); tas.AddTriangle( TATriangle (0, pi+1,pi+n+1,pi+n+2) ); } } void ExtrusionFace :: GetRawData(Array & data) const { data.DeleteAll(); profile->GetRawData(data); path->GetRawData(data); for(int i=0; i<3; i++) data.Append(glob_z_direction[i]); } void ExtrusionFace :: CalcLocalCoordinates (int seg, double t, Vec<3> & ex, Vec<3> & ey, Vec<3> & ez) const { ey = path->GetSpline(seg).GetTangent(t); ey /= ey.Length(); ex = Cross (ey, glob_z_direction); ex /= ex.Length(); ez = Cross (ex, ey); } void ExtrusionFace :: CalcLocalCoordinatesDeriv (int seg, double t, Vec<3> & ex, Vec<3> & ey, Vec<3> & ez, Vec<3> & dex, Vec<3> & dey, Vec<3> & dez) const { Point<3> point; Vec<3> first, second; path->GetSpline(seg).GetDerivatives (t, point, first, second); ey = first; ex = Cross (ey, glob_z_direction); ez = Cross (ex, ey); dey = second; dex = Cross (dey, glob_z_direction); dez = Cross (dex, ey) + Cross (ex, dey); double lenx = ex.Length(); double leny = ey.Length(); double lenz = ez.Length(); ex /= lenx; ey /= leny; ez /= lenz; dex /= lenx; dex -= (dex * ex) * ex; dey /= leny; dey -= (dey * ey) * ey; dez /= lenz; dez -= (dez * ez) * ez; } Extrusion :: Extrusion(const SplineGeometry<3> & path_in, const SplineGeometry<2> & profile_in, const Vec<3> & z_dir) : path(path_in), profile(profile_in), z_direction(z_dir) { surfaceactive.SetSize(0); surfaceids.SetSize(0); for(int j=0; j & box) const { for(int i=0; iBoxIntersectsFace(box)) return DOES_INTERSECT; } return PointInSolid(box.Center(),0); } INSOLID_TYPE Extrusion :: PointInSolid (const Point<3> & p, const double eps, Array * const facenums) const { Vec<3> random_vec(-0.4561,0.7382,0.4970247); int before(0), after(0); bool intersects(false); bool does_intersect(false); for(int i=0; iLineIntersections(p,random_vec,eps,before,after,intersects); //(*testout) << "intersects " << intersects << " before " << before << " after " << after << endl; if(intersects) { if(facenums) { facenums->Append(i); does_intersect = true; } else return DOES_INTERSECT; } } if(does_intersect) return DOES_INTERSECT; if(before % 2 == 0) return IS_OUTSIDE; return IS_INSIDE; } INSOLID_TYPE Extrusion :: PointInSolid (const Point<3> & p, double eps) const { return PointInSolid(p,eps,NULL); } INSOLID_TYPE Extrusion :: VecInSolid (const Point<3> & p, const Vec<3> & v, double eps) const { Array facenums; INSOLID_TYPE pInSolid = PointInSolid(p,eps,&facenums); if(pInSolid != DOES_INTERSECT) return pInSolid; double d(0); if(facenums.Size() == 1) { Vec<3> normal; faces[facenums[0]]->CalcGradient(p,normal); normal.Normalize(); d = normal*v; latestfacenum = facenums[0]; } else if (facenums.Size() == 2) { Vec<3> checkvec; Point<3> dummy(p); faces[facenums[0]]->Project(dummy); if(fabs(faces[facenums[0]]->GetProfilePar()) < 0.1) { int aux = facenums[0]; facenums[0] = facenums[1]; facenums[1] = aux; } checkvec = faces[facenums[0]]->GetYDir(); Vec<3> n0, n1; faces[facenums[0]]->CalcGradient(p,n0); faces[facenums[1]]->CalcGradient(p,n1); n0.Normalize(); n1.Normalize(); Vec<3> t = Cross(n0,n1); if(checkvec*t < 0) t*= (-1.); Vec<3> t0 = Cross(n0,t); Vec<3> t1 = Cross(t,n1); t0.Normalize(); t1.Normalize(); const double t0v = t0*v; const double t1v = t1*v; if(t0v > t1v) { latestfacenum = facenums[0]; d = n0*v; } else { latestfacenum = facenums[1]; d = n1*v; } if(fabs(t0v) < eps && fabs(t1v) < eps) latestfacenum = -1; } else { cerr << "WHY ARE THERE " << facenums.Size() << " FACES?" << endl; } if(d > eps) return IS_OUTSIDE; if(d < -eps) return IS_INSIDE; return DOES_INTERSECT; } // checks if lim s->0 lim t->0 p + t(v1 + s v2) in solid INSOLID_TYPE Extrusion :: VecInSolid2 (const Point<3> & p, const Vec<3> & v1, const Vec<3> & v2, double eps) const { INSOLID_TYPE retval; retval = VecInSolid(p,v1,eps); // *testout << "extr, vecinsolid=" << int(retval) << endl; if(retval != DOES_INTERSECT) return retval; if(latestfacenum >= 0) return faces[latestfacenum]->VecInFace(p,v2,0); else return VecInSolid(p,v2,eps); } int Extrusion :: GetNSurfaces() const { return faces.Size(); } Surface & Extrusion :: GetSurface (int i) { return *faces[i]; } const Surface & Extrusion :: GetSurface (int i) const { return *faces[i]; } void Extrusion :: Reduce (const BoxSphere<3> & box) { for(int i = 0; i < faces.Size(); i++) surfaceactive[i] = faces[i]->BoxIntersectsFace(box); } void Extrusion :: UnReduce () { for(int i = 0; i < faces.Size(); i++) surfaceactive[i] = true; } } netgen-6.2.1804/libsrc/csg/csgeom.hpp0000644000175000017500000002266713272137567016042 0ustar kurtkurt#ifndef FILE_CSGEOM #define FILE_CSGEOM /**************************************************************************/ /* File: csgeom.hh */ /* Author: Joachim Schoeberl */ /* Date: 27. Nov. 97 */ /**************************************************************************/ namespace netgen { /** Constructive Solid Geometry */ class TriangleApproximation; class TATriangle; /** A top level object is an entity to be meshed. I can be either a solid, or one surface patch of a solid. */ class DLL_HEADER TopLevelObject { Solid * solid; Surface * surface; double red, blue, green; bool visible, transp; double maxh; string material; int layer; int bc; // for surface patches, only string bcname; public: TopLevelObject (Solid * asolid, Surface * asurface = NULL); const Solid * GetSolid() const { return solid; } Solid * GetSolid() { return solid; } const Surface * GetSurface () const { return surface; } Surface * GetSurface () { return surface; } void GetData (ostream & ost); void SetData (istream & ist); void SetMaxH (double amaxh) { maxh = amaxh; } double GetMaxH () const { return maxh; } void SetRGB (double ared, double agreen, double ablue) { red = ared; green = agreen; blue = ablue; } double GetRed () const { return red; } double GetGreen () const { return green; } double GetBlue () const { return blue; } void SetTransparent (bool atransp) { transp = atransp; } bool GetTransparent () const { return transp; } void SetVisible (bool avisible) { visible = avisible; } bool GetVisible () const { return visible; } const string GetMaterial () const { return material; } void SetMaterial (const string & mat) { material = mat; } int GetLayer () const { return layer; } void SetLayer (int alayer) { layer = alayer; } void SetBCProp (int abc) { bc = abc; } int GetBCProp () const { return bc; } void SetBCName (string abc) { bcname = abc; } const string GetBCName () const { return bcname; } }; /** CSGeometry has the whole geometric information */ class DLL_HEADER CSGeometry : public NetgenGeometry { private: /// all surfaces SYMBOLTABLE surfaces; public: /// primitive of surface Array surf2prim; private: Array delete_them; /// all named solids SYMBOLTABLE solids; /// all 2d splinecurves SYMBOLTABLE< SplineGeometry<2>* > splinecurves2d; /// all 3d splinecurves SYMBOLTABLE< SplineGeometry<3>* > splinecurves3d; /// all top level objects: solids and surfaces Array toplevelobjects; public: /// additional points specified by user class UserPoint : public Point<3> { int index; public: UserPoint() = default; UserPoint (Point<3> p, int _index) : Point<3>(p), index(_index) { ; } int GetIndex() const { return index; } }; private: // Array > userpoints; Array userpoints; Array userpoints_ref_factor; mutable Array > identpoints; /// triangular approximation of top level objects Array triapprox; /// increment, if geometry is changed static int changeval; /// bounding box of geometry Box<3> boundingbox; /// bounding box, if not set by input file static Box<3> default_boundingbox; /// identic surfaces are stored by pair of indizes, val = inverse INDEX_2_HASHTABLE identicsurfaces; Array isidenticto; /// identification of boundaries (periodic, thin domains, ...) double ideps; /// filename of inputfile string filename; /// store splinesurfaces, such that added ones do not get deleted before geometry does Array> spline_surfaces; public: CSGeometry (); CSGeometry (const string & afilename); virtual ~CSGeometry (); void Clean (); virtual void Save (string filename) const; void Save (ostream & ost) const; void Load (istream & ist); void SaveSurfaces (ostream & out) const; void LoadSurfaces (istream & in); virtual void SaveToMeshFile (ostream & ost) const; int GetChangeVal() { return changeval; } void Change() { changeval++; } void AddSurface (Surface * surf); void AddSurface (char * name, Surface * surf); void AddSurfaces (Primitive * prim); int GetNSurf () const { return surfaces.Size(); } const Surface * GetSurface (const char * name) const; const Surface * GetSurface (int i) const { return surfaces[i]; } void SetSolid (const char * name, Solid * sol); const Solid * GetSolid (const char * name) const; const Solid * GetSolid (const string & name) const; int GetNSolids () const { return solids.Size(); } const Solid * GetSolid (int i) const { return solids[i]; } const SYMBOLTABLE & GetSolids () const { return solids; } void SetSplineCurve (const char * name, SplineGeometry<2> * spl); void SetSplineCurve (const char * name, SplineGeometry<3> * spl); const SplineGeometry<2> * GetSplineCurve2d (const string & name) const; const SplineGeometry<3> * GetSplineCurve3d (const string & name) const; void SetFlags (const char * solidname, const Flags & flags); int GetNTopLevelObjects () const { return toplevelobjects.Size(); } int SetTopLevelObject (Solid * sol, Surface * surf = NULL); void GetTopLevelObject (int nr, Solid *& sol, Surface *& surf) { sol = toplevelobjects[nr]->GetSolid(); surf = toplevelobjects[nr]->GetSurface(); } void GetTopLevelObject (int nr, const Solid *& sol, const Surface *& surf) const { sol = toplevelobjects[nr]->GetSolid(); surf = toplevelobjects[nr]->GetSurface(); } TopLevelObject * GetTopLevelObject (const Solid * sol, const Surface * surf = NULL); TopLevelObject * GetTopLevelObject (int nr) const { return toplevelobjects[nr]; } // const TopLevelObject * GetTopLevelObject (int nr) const // { return toplevelobjects[nr]; } void RemoveTopLevelObject (Solid * sol, Surface * surf = NULL); void AddUserPoint (const Point<3> & p, double ref_factor = 0) { userpoints.Append (UserPoint(p,1)); userpoints_ref_factor.Append (ref_factor); } void AddUserPoint (const UserPoint up, double ref_factor = 0) { userpoints.Append (up); userpoints_ref_factor.Append (ref_factor); } int GetNUserPoints () const { return userpoints.Size(); } const UserPoint & GetUserPoint (int nr) const { return userpoints[nr]; } double GetUserPointRefFactor (int nr) const { return userpoints_ref_factor[nr]; } void AddIdentPoint (const Point<3> & p) const { identpoints.Append(p);} int GetNIdentPoints (void) const { return identpoints.Size();} const Point<3> & GetIdentPoint(int nr) const { return identpoints[nr]; } void DeleteIdentPoints(void) const { identpoints.DeleteAll();} // quick implementations: Array singfaces; Array singedges; Array singpoints; Array identifications; int GetNIdentifications (void) const { return identifications.Size(); } void AddIdentification (Identification * ident); /// void CalcTriangleApproximation(double detail, double facets); /// void FindIdenticSurfaces (double eps); /// void GetSurfaceIndices (const Solid * sol, const BoxSphere<3> & box, Array & locsurf) const; /// void GetIndependentSurfaceIndices (const Solid * sol, const BoxSphere<3> & box, Array & locsurf) const; /// /* void GetIndependentSurfaceIndices (const Solid * sol, const Point<3> & p, Vec<3> & v, Array & locsurf) const; */ /// void GetIndependentSurfaceIndices (Array & locsurf) const; /// int GetSurfaceClassRepresentant (int si) const { return isidenticto[si]; } /// const TriangleApproximation * GetTriApprox (int msnr) { if (msnr < triapprox.Size()) return triapprox[msnr]; return 0; } void IterateAllSolids (SolidIterator & it, bool only_once = false) const; void RefineTriangleApprox (Solid * locsol, int surfind, const BoxSphere<3> & box, double detail, const TATriangle & tria, TriangleApproximation & tams, IndexSet & iset, int level); const Box<3> & BoundingBox () const { return boundingbox; } void SetBoundingBox (const Box<3> & abox) { boundingbox = abox; } static void SetDefaultBoundingBox (const Box<3> & abox) { default_boundingbox = abox; } double MaxSize () const; void SetIdEps(double eps){ideps = eps;} double GetIdEps(void) const {return ideps;} class BCModification { public: int si; int tlonr; int bcnr; string * bcname; }; Array bcmodifications; virtual int GenerateMesh (shared_ptr & mesh, MeshingParameters & mparam); virtual const Refinement & GetRefinement () const; void AddSplineSurface (shared_ptr ss) { spline_surfaces.Append(ss); } }; } #endif netgen-6.2.1804/libsrc/csg/bspline2d.cpp0000644000175000017500000001236413272137567016433 0ustar kurtkurt#include #include namespace netgen { BSplineCurve2d :: BSplineCurve2d () { redlevel = 0; } void BSplineCurve2d :: AddPoint (const Point<2> & apoint) { points.Append (apoint); intervallused.Append (0); } bool BSplineCurve2d :: Inside (const Point<2> & p, double & dist) const { Point<2> hp = p; double t = ProjectParam (p); hp = Eval(t); Vec<2> v = EvalPrime (t); Vec<2> n (v(0), -v(1)); cout << "p = " << p << ", hp = " << hp << endl; dist = Dist (p, hp); double scal = (hp-p) * n; cout << "scal = " << scal << endl; return scal >= 0; } double BSplineCurve2d :: ProjectParam (const Point<2> & p) const { double t, dt, mindist, mint = 0.0; int n1; mindist = 1e10; dt = 0.2; for (n1 = 1; n1 <= points.Size(); n1++) if (intervallused.Get(n1) == 0) for (t = n1; t <= n1+1; t += dt) if (Dist (Eval(t), p) < mindist) { mint = t; mindist = Dist (Eval(t), p); } if (mindist > 1e9) { for (t = 0; t <= points.Size(); t += dt) if (Dist (Eval(t), p) < mindist) { mint = t; mindist = Dist (Eval(t), p); } } while (Dist (Eval (mint-dt), p) < mindist) { mindist = Dist (Eval (mint-dt), p); mint -= dt; } while (Dist (Eval (mint+dt), p) < mindist) { mindist = Dist (Eval (mint+dt), p); mint += dt; } return NumericalProjectParam (p, mint-dt, mint+dt); } // t \in (n1, n2) Point<2> BSplineCurve2d :: Eval (double t) const { int n, n1, n2, n3, n4; double loct, b1, b2, b3, b4; Point<2> hp; static int cnt = 0; cnt++; if (cnt % 100000 == 0) (*mycout) << "cnt = " << cnt << endl; n = int(t); loct = t - n; b1 = 0.25 * (1 - loct) * (1 - loct); b4 = 0.25 * loct * loct; b2 = 0.5 - b4; b3 = 0.5 - b1; n1 = (n + 10 * points.Size() -1) % points.Size() + 1; n2 = n1+1; if (n2 > points.Size()) n2 = 1; n3 = n2+1; if (n3 > points.Size()) n3 = 1; n4 = n3+1; if (n4 > points.Size()) n4 = 1; // (*mycout) << "t = " << t << " n = " << n << " loct = " << loct // << " n1 = " << n1 << endl; hp(0) = b1 * points.Get(n1)(0) + b2 * points.Get(n2)(0) + b3 * points.Get(n3)(0) + b4 * points.Get(n4)(0); hp(1) = b1 * points.Get(n1)(1) + b2 * points.Get(n2)(1) + b3 * points.Get(n3)(1) + b4 * points.Get(n4)(1); return hp; } Vec<2> BSplineCurve2d :: EvalPrime (double t) const { int n, n1, n2, n3, n4; double loct, db1, db2, db3, db4; Vec<2> hv; n = int(t); loct = t - n; db1 = 0.5 * (loct - 1); db4 = 0.5 * loct; db2 = -db4; db3 = -db1; n1 = (n + 10 * points.Size() -1) % points.Size() + 1; n2 = n1+1; if (n2 > points.Size()) n2 = 1; n3 = n2+1; if (n3 > points.Size()) n3 = 1; n4 = n3+1; if (n4 > points.Size()) n4 = 1; hv(0) = db1 * points.Get(n1)(0) + db2 * points.Get(n2)(0) + db3 * points.Get(n3)(0) + db4 * points.Get(n4)(0); hv(1) = db1 * points.Get(n1)(1) + db2 * points.Get(n2)(1) + db3 * points.Get(n3)(1) + db4 * points.Get(n4)(1); return hv; } Vec<2> BSplineCurve2d :: EvalPrimePrime (double t) const { int n, n1, n2, n3, n4; double ddb1, ddb2, ddb3, ddb4; Vec<2> hv; n = int(t); // double loct = t - n; ddb1 = 0.5; ddb4 = 0.5; ddb2 = -0.5; ddb3 = -0.5; n1 = (n + 10 * points.Size() -1) % points.Size() + 1; n2 = n1+1; if (n2 > points.Size()) n2 = 1; n3 = n2+1; if (n3 > points.Size()) n3 = 1; n4 = n3+1; if (n4 > points.Size()) n4 = 1; hv(0) = ddb1 * points.Get(n1)(0) + ddb2 * points.Get(n2)(0) + ddb3 * points.Get(n3)(0) + ddb4 * points.Get(n4)(0); hv(1) = ddb1 * points.Get(n1)(1) + ddb2 * points.Get(n2)(1) + ddb3 * points.Get(n3)(1) + ddb4 * points.Get(n4)(1); return hv; } int BSplineCurve2d :: SectionUsed (double t) const { int n1 = int(t); n1 = (n1 + 10 * points.Size() - 1) % points.Size() + 1; return (intervallused.Get(n1) == 0); } void BSplineCurve2d :: Reduce (const Point<2> & p, double rad) { int n1, n; int j; double minx, miny, maxx, maxy; // (*testout) << "Reduce: " << p << "," << rad << endl; redlevel++; for (n1 = 1; n1 <= points.Size(); n1++) { if (intervallused.Get(n1) != 0) continue; minx = maxx = points.Get(n1)(0); miny = maxy = points.Get(n1)(1); n = n1; for (j = 1; j <= 3; j++) { n++; if (n > points.Size()) n = 1; if (points.Get(n)(0) < minx) minx = points.Get(n)(0); if (points.Get(n)(1) < miny) miny = points.Get(n)(1); if (points.Get(n)(0) > maxx) maxx = points.Get(n)(0); if (points.Get(n)(1) > maxy) maxy = points.Get(n)(1); } if (minx > p(0) + rad || maxx < p(0) - rad || miny > p(1) + rad || maxy < p(1) - rad) { intervallused.Elem(n1) = redlevel; // (*testout) << 0; } else { // (*testout) << 1; intervallused.Elem(n1) = 0; } } // (*testout) << endl; } void BSplineCurve2d :: UnReduce () { int i; for (i = 1; i <= intervallused.Size(); i++) if (intervallused.Get(i) == redlevel) intervallused.Set (i, 0); redlevel--; } void BSplineCurve2d :: Print (ostream & ost) const { ost << "SplineCurve: " << points.Size() << " points." << endl; for (int i = 1; i <= points.Size(); i++) ost << "P" << i << " = " << points.Get(i) << endl; } } netgen-6.2.1804/libsrc/csg/surface.cpp0000644000175000017500000002470713272137567016205 0ustar kurtkurt#include #include #include #include #include namespace netgen { Surface :: Surface () { maxh = 1e10; name = new char[7]; strcpy (name, "noname"); bcprop = -1; bcname = "default"; } Surface :: ~Surface() { delete [] name; } void Surface :: SetName (const char * aname) { delete [] name; name = new char[strlen (aname)+1]; strcpy (name, aname); } int Surface :: PointOnSurface (const Point<3> & p, double eps) const { double val = CalcFunctionValue (p); return fabs (val) < eps; } void Surface :: CalcHesse (const Point<3> & point, Mat<3> & hesse) const { double dx = 1e-5; Point<3> hp1, hp2; Vec<3> g1, g2; for (int i = 0; i < 3; i++) { hp1 = point; hp2 = point; hp1(i) += dx; hp2(i) -= dx; CalcGradient (hp1, g1); CalcGradient (hp2, g2); for (int j = 0; j < 3; j++) hesse(i, j) = (g1(j) - g2(j)) / (2 * dx); } } /* void Surface :: GetNormalVector (const Point<3> & p, Vec<3> & n) const { CalcGradient (p, n); n.Normalize(); } */ Vec<3> Surface :: GetNormalVector (const Point<3> & p) const { Vec<3> n; CalcGradient (p, n); n.Normalize(); return n; } void Surface :: DefineTangentialPlane (const Point<3> & ap1, const Point<3> & ap2) { p1 = ap1; p2 = ap2; ez = GetNormalVector (p1); ex = p2 - p1; ex -= (ex * ez) * ez; ex.Normalize(); ey = Cross (ez, ex); } void Surface :: ToPlane (const Point<3> & p3d, Point<2> & pplane, double h, int & zone) const { Vec<3> p1p, n; n = GetNormalVector (p3d); if (n * ez < 0) { zone = -1; pplane(0) = 1e8; pplane(1) = 1e9; return; } p1p = p3d - p1; pplane(0) = (p1p * ex) / h; pplane(1) = (p1p * ey) / h; zone = 0; } void Surface :: FromPlane (const Point<2> & pplane, Point<3> & p3d, double h) const { p3d = p1 + (h * pplane(0)) * ex + (h * pplane(1)) * ey; Project (p3d); } void Surface :: Project (Point<3> & p) const { Vec<3> n; double val; for (int i = 1; i <= 10; i++) { val = CalcFunctionValue (p); if (fabs (val) < 1e-12) return; CalcGradient (p, n); p -= (val / Abs2 (n)) * n; } } void Surface :: SkewProject (Point<3> & p, const Vec<3> & direction) const { Point<3> startp(p); double t_old(0),t_new(1); Vec<3> grad; for(int i=0; fabs(t_old-t_new) > 1e-20 && i<15; i++) { t_old = t_new; CalcGradient(p,grad); t_new = t_old - CalcFunctionValue(p)/(grad*direction); p = startp + t_new*direction; } } double Surface :: MaxCurvature () const { return 0.5 * HesseNorm (); } double Surface :: MaxCurvatureLoc (const Point<3> & /* c */ , double /* rad */) const { return MaxCurvature (); } double Surface :: LocH (const Point<3> & p, double x, double c, const MeshingParameters & mparam, double hmax) const // finds h <= hmax, s.t. h * \kappa_x*h < c { /* double h, hmin, kappa; hmin = 0; while (hmin < 0.9 * hmax) { h = 0.5 * (hmin + hmax); kappa = 2 * MaxCurvatureLoc (p, x * h); if (kappa * h >= c) hmax = h; else hmin = h; } return h; */ double hret; double kappa = MaxCurvatureLoc (p, x*hmax); kappa *= c * mparam.curvaturesafety; if (hmax * kappa < 1) hret = hmax; else hret = 1 / kappa; if (maxh < hret) hret = maxh; return hret; } Primitive :: Primitive () { surfaceids.SetSize (1); surfaceactive.SetSize (1); surfaceactive[0] = 1; } Primitive :: ~Primitive() { ; } int Primitive :: GetSurfaceId (int i) const { return surfaceids[i]; } void Primitive :: SetSurfaceId (int i, int id) { surfaceids[i] = id; } void Primitive :: GetPrimitiveData (const char *& classname, Array & coeffs) const { classname = "undef"; coeffs.SetSize (0); } void Primitive :: SetPrimitiveData (Array & coeffs) { ; } Primitive * Primitive :: CreatePrimitive (const char * classname) { if (strcmp (classname, "sphere") == 0) return Sphere::CreateDefault(); if (strcmp (classname, "plane") == 0) return Plane::CreateDefault(); if (strcmp (classname, "cylinder") == 0) return Cylinder::CreateDefault(); if (strcmp (classname, "cone") == 0) return Cone::CreateDefault(); if (strcmp (classname, "brick") == 0) return Brick::CreateDefault(); stringstream ost; ost << "Primitve::CreatePrimitive not implemented for " << classname << endl; throw NgException (ost.str()); } Primitive * Primitive :: Copy () const { stringstream ost; ost << "Primitve::Copy not implemented for " << typeid(*this).name() << endl; throw NgException (ost.str()); } void Primitive :: Transform (Transformation<3> & trans) { stringstream ost; ost << "Primitve::Transform not implemented for " << typeid(*this).name() << endl; throw NgException (ost.str()); } void Primitive :: GetTangentialSurfaceIndices (const Point<3> & p, Array & surfind, double eps) const { for (int j = 0; j < GetNSurfaces(); j++) if (fabs (GetSurface(j).CalcFunctionValue (p)) < eps) if (!surfind.Contains (GetSurfaceId(j))) surfind.Append (GetSurfaceId(j)); } void Primitive :: GetTangentialVecSurfaceIndices (const Point<3> & p, const Vec<3> & v, Array & surfind, double eps) const { cout << "get tangvecsurfind not implemented" << endl; surfind.SetSize (0); } void Primitive :: GetTangentialVecSurfaceIndices2 (const Point<3> & p, const Vec<3> & v1, const Vec<3> & v2, Array & surfind, double eps) const { for (int j = 0; j < GetNSurfaces(); j++) { if (fabs (GetSurface(j).CalcFunctionValue (p)) < eps) { Vec<3> grad; GetSurface(j).CalcGradient (p, grad); if (sqr (grad * v1) < 1e-6 * v1.Length2() * grad.Length2() && sqr (grad * v2) < 1e-6 * v2.Length2() * grad.Length2() ) // new, 18032006 JS { if (!surfind.Contains (GetSurfaceId(j))) surfind.Append (GetSurfaceId(j)); } } } } INSOLID_TYPE Primitive :: VecInSolid2 (const Point<3> & p, const Vec<3> & v1, const Vec<3> & v2, double eps) const { //(*testout) << "Primitive::VecInSolid2" << endl; Point<3> hp = p + 1e-3 * v1 + 1e-5 * v2; INSOLID_TYPE res = PointInSolid (hp, eps); // (*testout) << "vectorin2, type = " << typeid(*this).name() << ", res = " << res << endl; return res; } INSOLID_TYPE Primitive :: VecInSolid3 (const Point<3> & p, const Vec<3> & v1, const Vec<3> & v2, double eps) const { //(*testout) << "Primitive::VecInSolid3" << endl; return VecInSolid (p, v1, eps); } INSOLID_TYPE Primitive :: VecInSolid4 (const Point<3> & p, const Vec<3> & v, const Vec<3> & v2, const Vec<3> & m, double eps) const { return VecInSolid2 (p, v, m, eps); } OneSurfacePrimitive :: OneSurfacePrimitive() { ; } OneSurfacePrimitive :: ~OneSurfacePrimitive() { ; } INSOLID_TYPE OneSurfacePrimitive :: PointInSolid (const Point<3> & p, double eps) const { double hv1 = (GetSurface(0).CalcFunctionValue(p)); if (hv1 <= -eps) return IS_INSIDE; if (hv1 >= eps) return IS_OUTSIDE; return DOES_INTERSECT; } INSOLID_TYPE OneSurfacePrimitive :: VecInSolid (const Point<3> & p, const Vec<3> & v, double eps) const { double hv1 = (GetSurface(0).CalcFunctionValue(p)); if (hv1 <= -eps) return IS_INSIDE; if (hv1 >= eps) return IS_OUTSIDE; Vec<3> hv; GetSurface(0).CalcGradient (p, hv); hv1 = v * hv; if (hv1 <= -eps) return IS_INSIDE; if (hv1 >= eps) return IS_OUTSIDE; return DOES_INTERSECT; } INSOLID_TYPE OneSurfacePrimitive :: VecInSolid2 (const Point<3> & p, const Vec<3> & v1, const Vec<3> & v2, double eps) const { double hv1 = (GetSurface(0).CalcFunctionValue(p)); if (hv1 <= -eps) return IS_INSIDE; if (hv1 >= eps) return IS_OUTSIDE; Vec<3> hv; GetSurface(0).CalcGradient (p, hv); hv1 = v1 * hv; if (hv1 <= -eps) return IS_INSIDE; if (hv1 >= eps) return IS_OUTSIDE; double hv2 = v2 * hv; if (hv2 <= 0) return IS_INSIDE; else return IS_OUTSIDE; } INSOLID_TYPE OneSurfacePrimitive :: VecInSolid3 (const Point<3> & p, const Vec<3> & v, const Vec<3> & v2, double eps) const { //(*testout) << "OneSurfacePrimitive::VecInSolid3" << endl; double hv1 = (GetSurface(0).CalcFunctionValue(p)); if (hv1 <= -eps) return IS_INSIDE; if (hv1 >= eps) return IS_OUTSIDE; Vec<3> grad; GetSurface(0).CalcGradient (p, grad); hv1 = v * grad; if (hv1 <= -eps) return IS_INSIDE; if (hv1 >= eps) return IS_OUTSIDE; Mat<3> hesse; GetSurface(0).CalcHesse (p, hesse); double hv2 = v2 * grad + v * (hesse * v); if (hv2 <= -eps) return IS_INSIDE; if (hv2 >= eps) return IS_OUTSIDE; return DOES_INTERSECT; } INSOLID_TYPE OneSurfacePrimitive :: VecInSolid4 (const Point<3> & p, const Vec<3> & v, const Vec<3> & v2, const Vec<3> & m, double eps) const { double hv1 = (GetSurface(0).CalcFunctionValue(p)); if (hv1 <= -eps) return IS_INSIDE; if (hv1 >= eps) return IS_OUTSIDE; Vec<3> grad; GetSurface(0).CalcGradient (p, grad); hv1 = v * grad; if (hv1 <= -eps) return IS_INSIDE; if (hv1 >= eps) return IS_OUTSIDE; Mat<3> hesse; GetSurface(0).CalcHesse (p, hesse); double hv2 = v2 * grad + v * (hesse * v); if (hv2 <= -eps) return IS_INSIDE; if (hv2 >= eps) return IS_OUTSIDE; double hv3 = m * grad; if (hv3 <= -eps) return IS_INSIDE; if (hv3 >= eps) return IS_OUTSIDE; return DOES_INTERSECT; } int OneSurfacePrimitive :: GetNSurfaces() const { return 1; } Surface & OneSurfacePrimitive :: GetSurface (int i) { return *this; } const Surface & OneSurfacePrimitive :: GetSurface (int i) const { return *this; } void ProjectToEdge (const Surface * f1, const Surface * f2, Point<3> & hp) { Vec<2> rs, lam; Vec<3> a1, a2; Mat<2> a; int i = 10; while (i > 0) { i--; rs(0) = f1 -> CalcFunctionValue (hp); rs(1) = f2 -> CalcFunctionValue (hp); f1->CalcGradient (hp, a1); f2->CalcGradient (hp, a2); double alpha = fabs(a1*a2)/sqrt(a1.Length2()*a2.Length2()); if(fabs(1.-alpha) < 1e-6) { if(fabs(rs(0)) >= fabs(rs(1))) f1 -> Project(hp); else f2 -> Project(hp); } else { a(0,0) = a1 * a1; a(0,1) = a(1,0) = a1 * a2; a(1,1) = a2 * a2; a.Solve (rs, lam); hp -= lam(0) * a1 + lam(1) * a2; } if (Abs2 (rs) < 1e-24 && i > 1) i = 1; } } } netgen-6.2.1804/libsrc/csg/surface.hpp0000644000175000017500000002364013272137567016205 0ustar kurtkurt#ifndef FILE_SURFACE #define FILE_SURFACE /**************************************************************************/ /* File: surface.hh */ /* Author: Joachim Schoeberl */ /* Date: 1. Dez. 95 */ /**************************************************************************/ namespace netgen { class TriangleApproximation; /** Basis class for implicit surface geometry. This class is used for generation of surface meshes in NETGEN */ class Surface { protected: /// invert normal vector bool inverse; /// maximal h in surface double maxh; /// name of surface char * name; /// boundary condition nr int bcprop; /// boundary condition label string bcname; public: Surface (); /** @name Tangential plane. The tangential plane is used for surface mesh generation. */ virtual ~Surface(); protected: /** @name Points in the surface defining tangential plane. Tangential plane is taken in p1, the local x-axis is directed to p2. */ //@{ /// Point<3> p1; /// Point<3> p2; //@} /** @name Base-vectos for local coordinate system. */ //@{ /// in plane, directed p1->p2 Vec<3> ex; /// in plane Vec<3> ey; /// outer normal direction Vec<3> ez; //@} public: void SetName (const char * aname); const char * Name () const { return name; } //@{ /** Defines tangential plane in ap1. The local x-coordinate axis points to the direction of ap2 */ virtual void DefineTangentialPlane (const Point<3> & ap1, const Point<3> & ap2); /// Transforms 3d point p3d to local coordinates pplane virtual void ToPlane (const Point<3> & p3d, Point<2> & pplane, double h, int & zone) const; /// Transforms point pplane in local coordinates to 3d point virtual void FromPlane (const Point<2> & pplane, Point<3> & p3d, double h) const; //@} /// Project point p onto surface (closest point) virtual void Project (Point<3> & p) const; /// Project along direction virtual void SkewProject(Point<3> & p, const Vec<3> & direction) const; /// Is current surface identic to surface 2 ? virtual int IsIdentic (const Surface & /* s2 */, int & /* inv */, double /* eps */) const { return 0; } /// virtual int PointOnSurface (const Point<3> & p, double eps = 1e-6) const; /** @name Implicit function. Calculate function value and derivatives. */ //@{ /// Calculate implicit function value in point point virtual double CalcFunctionValue (const Point<3> & point) const = 0; /** Calc gradient of implicit function. gradient should be O(1) at surface */ virtual void CalcGradient (const Point<3> & point, Vec<3> & grad) const = 0; /** Calculate second derivatives of implicit function. */ virtual void CalcHesse (const Point<3> & point, Mat<3> & hesse) const; /** Returns outer normal vector. */ // virtual void GetNormalVector (const Point<3> & p, Vec<3> & n) const; virtual Vec<3> GetNormalVector (const Point<3> & p) const; /** Upper bound for spectral norm of Hesse-matrix */ virtual double HesseNorm () const = 0; /** Upper bound for spectral norm of Hesse-matrix in the rad - environment of point c. */ virtual double HesseNormLoc (const Point<3> & /* c */, double /* rad */) const { return HesseNorm (); } //@} /// virtual double MaxCurvature () const; /// virtual double MaxCurvatureLoc (const Point<3> & /* c */ , double /* rad */) const; /** Returns any point in the surface. Needed to start surface mesh generation e.g. on sphere */ virtual Point<3> GetSurfacePoint () const = 0; /// bool Inverse () const { return inverse; } /// void SetInverse (bool ainverse) { inverse = ainverse; } /// virtual void Print (ostream & str) const = 0; /// virtual void Reduce (const BoxSphere<3> & /* box */) { }; /// virtual void UnReduce () { }; /// set max h in surface void SetMaxH (double amaxh) { maxh = amaxh; } /// double GetMaxH () const { return maxh; } /// int GetBCProperty () const { return bcprop; } /// void SetBCProperty (int abc) { bcprop = abc; } /** Determine local mesh-size. Find \[ h \leq hmax, \] such that \[ h \times \kappa (x) \leq c \qquad \mbox{in} B(x, h), \] where kappa(x) is the curvature in x. */ virtual double LocH (const Point<3> & p, double x, double c, const MeshingParameters & mparam, double hmax) const; /** Gets Approximation by triangles, where qual is about the number of triangles per radius */ virtual void GetTriangleApproximation (TriangleApproximation & /* tas */, const Box<3> & /* boundingbox */, double /* facets */ ) const { }; string GetBCName() const { return bcname; } void SetBCName( string abc ) { bcname = abc; } }; inline ostream & operator<< (ostream & ost, const Surface & surf) { surf.Print(ost); return ost; } typedef enum { IS_OUTSIDE = 0, IS_INSIDE = 1, DOES_INTERSECT = 2} INSOLID_TYPE; class DummySurface : public Surface { virtual double CalcFunctionValue (const Point<3> & /* point */) const { return 0; } virtual void CalcGradient (const Point<3> & /* point */, Vec<3> & grad) const { grad = Vec<3> (0,0,0); } virtual Point<3> GetSurfacePoint () const { return Point<3> (0,0,0); } virtual double HesseNorm () const { return 0; } virtual void Project (Point<3> & /* p */) const { ; } virtual void Print (ostream & ost) const { ost << "dummy surface"; } }; class Primitive { public: Primitive (); virtual ~Primitive(); /* Check, whether box intersects solid defined by surface. return values: 0 .. box outside solid \\ 1 .. box in solid \\ 2 .. can't decide (allowed, iff box is close to solid) */ virtual INSOLID_TYPE BoxInSolid (const BoxSphere<3> & box) const = 0; virtual INSOLID_TYPE PointInSolid (const Point<3> & p, double eps) const = 0; virtual void GetTangentialSurfaceIndices (const Point<3> & p, Array & surfind, double eps) const; virtual INSOLID_TYPE VecInSolid (const Point<3> & p, const Vec<3> & v, double eps) const = 0; // checks if lim s->0 lim t->0 p + t(v1 + s v2) in solid virtual INSOLID_TYPE VecInSolid2 (const Point<3> & p, const Vec<3> & v1, const Vec<3> & v2, double eps) const; // checks if p + s v1 + s*s/2 v2 is inside virtual INSOLID_TYPE VecInSolid3 (const Point<3> & p, const Vec<3> & v1, const Vec<3> & v2, double eps) const; // like VecInSolid2, but second order approximation virtual INSOLID_TYPE VecInSolid4 (const Point<3> & p, const Vec<3> & v, const Vec<3> & v2, const Vec<3> & m, double eps) const; virtual void GetTangentialVecSurfaceIndices (const Point<3> & p, const Vec<3> & v, Array & surfind, double eps) const; virtual void GetTangentialVecSurfaceIndices2 (const Point<3> & p, const Vec<3> & v1, const Vec<3> & v2, Array & surfind, double eps) const; virtual void CalcSpecialPoints (Array > & /* pts */) const { ; } virtual void AnalyzeSpecialPoint (const Point<3> & /* pt */, Array > & /* specpts */) const { ; } virtual Vec<3> SpecialPointTangentialVector (const Point<3> & /* p */, int /* s1 */, int /* s2 */) const { return Vec<3> (0,0,0); } virtual int GetNSurfaces() const = 0; virtual Surface & GetSurface (int i = 0) = 0; virtual const Surface & GetSurface (int i = 0) const = 0; Array surfaceids; Array surfaceactive; int GetSurfaceId (int i = 0) const; void SetSurfaceId (int i, int id); int SurfaceActive (int i) const { return surfaceactive[i]; } virtual int SurfaceInverted (int /* i */ = 0) const { return 0; } virtual void GetPrimitiveData (const char *& classname, Array & coeffs) const; virtual void SetPrimitiveData (Array & coeffs); static Primitive * CreatePrimitive (const char * classname); virtual void Reduce (const BoxSphere<3> & /* box */) { }; virtual void UnReduce () { }; virtual Primitive * Copy () const; virtual void Transform (Transformation<3> & trans); }; class OneSurfacePrimitive : public Surface, public Primitive { public: OneSurfacePrimitive(); ~OneSurfacePrimitive(); virtual INSOLID_TYPE PointInSolid (const Point<3> & p, double eps) const; virtual INSOLID_TYPE VecInSolid (const Point<3> & p, const Vec<3> & v, double eps) const; virtual INSOLID_TYPE VecInSolid2 (const Point<3> & p, const Vec<3> & v1, const Vec<3> & v2, double eps) const; virtual INSOLID_TYPE VecInSolid3 (const Point<3> & p, const Vec<3> & v1, const Vec<3> & v2, double eps) const; virtual INSOLID_TYPE VecInSolid4 (const Point<3> & p, const Vec<3> & v, const Vec<3> & v2, const Vec<3> & m, double eps) const; virtual int GetNSurfaces() const; virtual Surface & GetSurface (int i = 0); virtual const Surface & GetSurface (int i = 0) const; }; /** Projects point to edge. The point hp is projected to the edge described by f1 and f2. It is assumed that the edge is non-degenerated, and the (generalized) Newton method converges. */ extern void ProjectToEdge (const Surface * f1, const Surface * f2, Point<3> & hp); } #endif netgen-6.2.1804/libsrc/csg/solid.cpp0000644000175000017500000011463113272137567015663 0ustar kurtkurt#include #include #include namespace netgen { //using namespace netgen; /* SolidIterator :: SolidIterator () { ; } SolidIterator :: ~SolidIterator () { ; } */ // int Solid :: cntnames = 0; Solid :: Solid (Primitive * aprim) { op = TERM; prim = aprim; s1 = s2 = NULL; maxh = 1e10; name = NULL; num_surfs = prim->GetNSurfaces(); } Solid :: Solid (optyp aop, Solid * as1, Solid * as2) { op = aop; s1 = as1; s2 = as2; prim = NULL; name = NULL; maxh = 1e10; num_surfs = 0; if (s1) num_surfs += s1->num_surfs; if (s2) num_surfs += s2->num_surfs; } Solid :: ~Solid () { // cout << "delete solid, op = " << int(op) << endl; delete [] name; switch (op) { case UNION: case SECTION: { if (s1->op != ROOT) delete s1; if (s2->op != ROOT) delete s2; break; } case SUB: // case ROOT: { if (s1->op != ROOT) delete s1; break; } case TERM: { // cout << "has term" << endl; delete prim; break; } default: break; } } void Solid :: SetName (const char * aname) { delete [] name; name = new char[strlen (aname)+1]; strcpy (name, aname); } Solid * Solid :: Copy (CSGeometry & geom) const { Solid * nsol(NULL); switch (op) { case TERM: case TERM_REF: { Primitive * nprim = prim->Copy(); geom.AddSurfaces (nprim); nsol = new Solid (nprim); break; } case SECTION: case UNION: { nsol = new Solid (op, s1->Copy(geom), s2->Copy(geom)); break; } case SUB: { nsol = new Solid (SUB, s1 -> Copy (geom)); break; } case ROOT: { nsol = s1->Copy(geom); break; } } return nsol; } void Solid :: Transform (Transformation<3> & trans) { switch (op) { case TERM: case TERM_REF: { prim -> Transform (trans); break; } case SECTION: case UNION: { s1 -> Transform (trans); s2 -> Transform (trans); break; } case SUB: case ROOT: { s1 -> Transform (trans); break; } } } void Solid :: IterateSolid (SolidIterator & it, bool only_once) { if (only_once) { if (visited) return; visited = 1; } it.Do (this); switch (op) { case SECTION: { s1->IterateSolid (it, only_once); s2->IterateSolid (it, only_once); break; } case UNION: { s1->IterateSolid (it, only_once); s2->IterateSolid (it, only_once); break; } case SUB: case ROOT: { s1->IterateSolid (it, only_once); break; } case TERM: case TERM_REF: break; // do nothing } } bool Solid :: IsIn (const Point<3> & p, double eps) const { switch (op) { case TERM: case TERM_REF: { INSOLID_TYPE ist = prim->PointInSolid (p, eps); return ( (ist == IS_INSIDE) || (ist == DOES_INTERSECT) ) ? 1 : 0; } case SECTION: return s1->IsIn (p, eps) && s2->IsIn (p, eps); case UNION: return s1->IsIn (p, eps) || s2->IsIn (p, eps); case SUB: return !s1->IsStrictIn (p, eps); case ROOT: return s1->IsIn (p, eps); } return 0; } bool Solid :: IsStrictIn (const Point<3> & p, double eps) const { switch (op) { case TERM: case TERM_REF: { INSOLID_TYPE ist = prim->PointInSolid (p, eps); return (ist == IS_INSIDE) ? 1 : 0; } case SECTION: return s1->IsStrictIn(p, eps) && s2->IsStrictIn(p, eps); case UNION: return s1->IsStrictIn(p, eps) || s2->IsStrictIn(p, eps); case SUB: return !s1->IsIn (p, eps); case ROOT: return s1->IsStrictIn (p, eps); } return 0; } bool Solid :: VectorIn (const Point<3> & p, const Vec<3> & v, double eps) const { Vec<3> hv; switch (op) { case TERM: case TERM_REF: { INSOLID_TYPE ist = prim->VecInSolid (p, v, eps); return (ist == IS_INSIDE || ist == DOES_INTERSECT) ? 1 : 0; } case SECTION: return s1 -> VectorIn (p, v, eps) && s2 -> VectorIn (p, v, eps); case UNION: return s1 -> VectorIn (p, v, eps) || s2 -> VectorIn (p, v, eps); case SUB: return !s1->VectorStrictIn(p, v, eps); case ROOT: return s1->VectorIn(p, v, eps); } return 0; } bool Solid :: VectorStrictIn (const Point<3> & p, const Vec<3> & v, double eps) const { Vec<3> hv; switch (op) { case TERM: case TERM_REF: { INSOLID_TYPE ist = prim->VecInSolid (p, v, eps); return (ist == IS_INSIDE) ? true : false; } case SECTION: return s1 -> VectorStrictIn (p, v, eps) && s2 -> VectorStrictIn (p, v, eps); case UNION: return s1 -> VectorStrictIn (p, v, eps) || s2 -> VectorStrictIn (p, v, eps); case SUB: return !s1->VectorIn(p, v, eps); case ROOT: return s1->VectorStrictIn(p, v, eps); } return 0; } bool Solid::VectorIn2 (const Point<3> & p, const Vec<3> & v1, const Vec<3> & v2, double eps) const { if (VectorStrictIn (p, v1, eps)) return 1; if (!VectorIn (p, v1, eps)) return 0; bool res = VectorIn2Rec (p, v1, v2, eps); return res; } bool Solid::VectorIn2Rec (const Point<3> & p, const Vec<3> & v1, const Vec<3> & v2, double eps) const { switch (op) { case TERM: case TERM_REF: return (prim->VecInSolid2 (p, v1, v2, eps) != IS_OUTSIDE); // Is this correct???? case SECTION: return s1->VectorIn2Rec (p, v1, v2, eps) && s2->VectorIn2Rec (p, v1, v2, eps); case UNION: return s1->VectorIn2Rec (p, v1, v2, eps) || s2->VectorIn2Rec (p, v1, v2, eps); case SUB: return !s1->VectorIn2Rec (p, v1, v2, eps); case ROOT: return s1->VectorIn2Rec (p, v1, v2, eps); } return 0; } void Solid :: Print (ostream & str) const { switch (op) { case TERM: case TERM_REF: { str << prim->GetSurfaceId(0); for (int i = 1; i < prim->GetNSurfaces(); i++) str << "," << prim->GetSurfaceId(i); break; } case SECTION: { str << "("; s1 -> Print (str); str << " AND "; s2 -> Print (str); str << ")"; break; } case UNION: { str << "("; s1 -> Print (str); str << " OR "; s2 -> Print (str); str << ")"; break; } case SUB: { str << " NOT "; s1 -> Print (str); break; } case ROOT: { str << " [" << name << "="; s1 -> Print (str); str << "] "; break; } } } void Solid :: GetSolidData (ostream & ost, int first) const { switch (op) { case SECTION: { ost << "("; s1 -> GetSolidData (ost, 0); ost << " AND "; s2 -> GetSolidData (ost, 0); ost << ")"; break; } case UNION: { ost << "("; s1 -> GetSolidData (ost, 0); ost << " OR "; s2 -> GetSolidData (ost, 0); ost << ")"; break; } case SUB: { ost << "NOT "; s1 -> GetSolidData (ost, 0); break; } case TERM: case TERM_REF: { if (name) ost << name; else ost << "(noname)"; break; } case ROOT: { if (first) s1 -> GetSolidData (ost, 0); else ost << name; break; } } } static Solid * CreateSolidExpr (istream & ist, const SYMBOLTABLE & solids); static Solid * CreateSolidTerm (istream & ist, const SYMBOLTABLE & solids); static Solid * CreateSolidPrim (istream & ist, const SYMBOLTABLE & solids); static void ReadString (istream & ist, char * str) { //char * hstr = str; char ch; while (1) { ist.get(ch); if (!ist.good()) break; if (!isspace (ch)) { ist.putback (ch); break; } } while (1) { ist.get(ch); if (!ist.good()) break; if (isalpha(ch) || isdigit(ch)) { *str = ch; str++; } else { ist.putback (ch); break; } } *str = 0; // cout << "Read string (" << hstr << ")" // << "put back: " << ch << endl; } Solid * CreateSolidExpr (istream & ist, const SYMBOLTABLE & solids) { // cout << "create expr" << endl; Solid *s1, *s2; char str[100]; s1 = CreateSolidTerm (ist, solids); ReadString (ist, str); if (strcmp (str, "OR") == 0) { // cout << " OR "; s2 = CreateSolidExpr (ist, solids); return new Solid (Solid::UNION, s1, s2); } // cout << "no OR found, put back string: " << str << endl; for (int i = int(strlen(str))-1; i >= 0; i--) ist.putback (str[i]); return s1; } Solid * CreateSolidTerm (istream & ist, const SYMBOLTABLE & solids) { // cout << "create term" << endl; Solid *s1, *s2; char str[100]; s1 = CreateSolidPrim (ist, solids); ReadString (ist, str); if (strcmp (str, "AND") == 0) { // cout << " AND "; s2 = CreateSolidTerm (ist, solids); return new Solid (Solid::SECTION, s1, s2); } // cout << "no AND found, put back string: " << str << endl; for (int i = int(strlen(str))-1; i >= 0; i--) ist.putback (str[i]); return s1; } Solid * CreateSolidPrim (istream & ist, const SYMBOLTABLE & solids) { Solid * s1; char ch; char str[100]; ist >> ch; if (ch == '(') { s1 = CreateSolidExpr (ist, solids); ist >> ch; // ')' // cout << "close back " << ch << endl; return s1; } ist.putback (ch); ReadString (ist, str); if (strcmp (str, "NOT") == 0) { // cout << " NOT "; s1 = CreateSolidPrim (ist, solids); return new Solid (Solid::SUB, s1); } (*testout) << "get terminal " << str << endl; s1 = solids.Get(str); if (s1) { // cout << "primitive: " << str << endl; return s1; } cerr << "syntax error" << endl; return NULL; } Solid * Solid :: CreateSolid (istream & ist, const SYMBOLTABLE & solids) { Solid * nsol = CreateSolidExpr (ist, solids); nsol = new Solid (ROOT, nsol); (*testout) << "Print new sol: "; nsol -> Print (*testout); (*testout) << endl; return nsol; } void Solid :: Boundaries (const Point<3> & p, Array & bounds) const { int in, strin; bounds.SetSize (0); RecBoundaries (p, bounds, in, strin); } void Solid :: RecBoundaries (const Point<3> & p, Array & bounds, int & in, int & strin) const { switch (op) { case TERM: case TERM_REF: { /* double val; val = surf->CalcFunctionValue (p); in = (val < 1e-6); strin = (val < -1e-6); if (in && !strin) bounds.Append (id); */ if (prim->PointInSolid (p, 1e-6) == DOES_INTERSECT) bounds.Append (prim->GetSurfaceId (1)); break; } case SECTION: { int i, in1, in2, strin1, strin2; Array bounds1, bounds2; s1 -> RecBoundaries (p, bounds1, in1, strin1); s2 -> RecBoundaries (p, bounds2, in2, strin2); if (in1 && in2) { for (i = 1; i <= bounds1.Size(); i++) bounds.Append (bounds1.Get(i)); for (i = 1; i <= bounds2.Size(); i++) bounds.Append (bounds2.Get(i)); } in = (in1 && in2); strin = (strin1 && strin2); break; } case UNION: { int i, in1, in2, strin1, strin2; Array bounds1, bounds2; s1 -> RecBoundaries (p, bounds1, in1, strin1); s2 -> RecBoundaries (p, bounds2, in2, strin2); if (!strin1 && !strin2) { for (i = 1; i <= bounds1.Size(); i++) bounds.Append (bounds1.Get(i)); for (i = 1; i <= bounds2.Size(); i++) bounds.Append (bounds2.Get(i)); } in = (in1 || in2); strin = (strin1 || strin2); break; } case SUB: { int hin, hstrin; s1 -> RecBoundaries (p, bounds, hin, hstrin); in = !hstrin; strin = !hin; break; } case ROOT: { s1 -> RecBoundaries (p, bounds, in, strin); break; } } } void Solid :: TangentialSolid (const Point<3> & p, Solid *& tansol, Array & surfids, double eps) const { int in, strin; RecTangentialSolid (p, tansol, surfids, in, strin, eps); surfids.SetSize (0); if (tansol) tansol -> GetTangentialSurfaceIndices (p, surfids, eps); } void Solid :: RecTangentialSolid (const Point<3> & p, Solid *& tansol, Array & surfids, int & in, int & strin, double eps) const { tansol = NULL; switch (op) { case TERM: case TERM_REF: { INSOLID_TYPE ist = prim->PointInSolid(p, eps); in = (ist == IS_INSIDE || ist == DOES_INTERSECT); strin = (ist == IS_INSIDE); if (ist == DOES_INTERSECT) { tansol = new Solid (prim); tansol -> op = TERM_REF; } break; } case SECTION: { int in1, in2, strin1, strin2; Solid * tansol1, * tansol2; s1 -> RecTangentialSolid (p, tansol1, surfids, in1, strin1, eps); s2 -> RecTangentialSolid (p, tansol2, surfids, in2, strin2, eps); if (in1 && in2) { if (tansol1 && tansol2) tansol = new Solid (SECTION, tansol1, tansol2); else if (tansol1) tansol = tansol1; else if (tansol2) tansol = tansol2; } in = (in1 && in2); strin = (strin1 && strin2); break; } case UNION: { int in1, in2, strin1, strin2; Solid * tansol1 = 0, * tansol2 = 0; s1 -> RecTangentialSolid (p, tansol1, surfids, in1, strin1, eps); s2 -> RecTangentialSolid (p, tansol2, surfids, in2, strin2, eps); if (!strin1 && !strin2) { if (tansol1 && tansol2) tansol = new Solid (UNION, tansol1, tansol2); else if (tansol1) tansol = tansol1; else if (tansol2) tansol = tansol2; } else { delete tansol1; delete tansol2; } in = (in1 || in2); strin = (strin1 || strin2); break; } case SUB: { int hin, hstrin; Solid * tansol1; s1 -> RecTangentialSolid (p, tansol1, surfids, hin, hstrin, eps); if (tansol1) tansol = new Solid (SUB, tansol1); in = !hstrin; strin = !hin; break; } case ROOT: { s1 -> RecTangentialSolid (p, tansol, surfids, in, strin, eps); break; } } } void Solid :: TangentialSolid2 (const Point<3> & p, const Vec<3> & t, Solid *& tansol, Array & surfids, double eps) const { int in, strin; surfids.SetSize (0); RecTangentialSolid2 (p, t, tansol, surfids, in, strin, eps); if (tansol) tansol -> GetTangentialSurfaceIndices2 (p, t, surfids, eps); } void Solid :: RecTangentialSolid2 (const Point<3> & p, const Vec<3> & t, Solid *& tansol, Array & surfids, int & in, int & strin, double eps) const { tansol = NULL; switch (op) { case TERM: case TERM_REF: { /* double val; val = surf->CalcFunctionValue (p); in = (val < 1e-6); strin = (val < -1e-6); if (in && !strin) tansol = new Solid (surf, id); */ INSOLID_TYPE ist = prim->PointInSolid(p, eps); if (ist == DOES_INTERSECT) ist = prim->VecInSolid (p, t, eps); in = (ist == IS_INSIDE || ist == DOES_INTERSECT); strin = (ist == IS_INSIDE); if (ist == DOES_INTERSECT) { tansol = new Solid (prim); tansol -> op = TERM_REF; } break; } case SECTION: { int in1, in2, strin1, strin2; Solid * tansol1, * tansol2; s1 -> RecTangentialSolid2 (p, t, tansol1, surfids, in1, strin1, eps); s2 -> RecTangentialSolid2 (p, t, tansol2, surfids, in2, strin2, eps); if (in1 && in2) { if (tansol1 && tansol2) tansol = new Solid (SECTION, tansol1, tansol2); else if (tansol1) tansol = tansol1; else if (tansol2) tansol = tansol2; } in = (in1 && in2); strin = (strin1 && strin2); break; } case UNION: { int in1, in2, strin1, strin2; Solid * tansol1, * tansol2; s1 -> RecTangentialSolid2 (p, t, tansol1, surfids, in1, strin1, eps); s2 -> RecTangentialSolid2 (p, t, tansol2, surfids, in2, strin2, eps); if (!strin1 && !strin2) { if (tansol1 && tansol2) tansol = new Solid (UNION, tansol1, tansol2); else if (tansol1) tansol = tansol1; else if (tansol2) tansol = tansol2; } in = (in1 || in2); strin = (strin1 || strin2); break; } case SUB: { int hin, hstrin; Solid * tansol1; s1 -> RecTangentialSolid2 (p, t, tansol1, surfids, hin, hstrin, eps); if (tansol1) tansol = new Solid (SUB, tansol1); in = !hstrin; strin = !hin; break; } case ROOT: { s1 -> RecTangentialSolid2 (p, t, tansol, surfids, in, strin, eps); break; } } } void Solid :: TangentialSolid3 (const Point<3> & p, const Vec<3> & t, const Vec<3> & t2, Solid *& tansol, Array & surfids, double eps) const { int in, strin; surfids.SetSize (0); RecTangentialSolid3 (p, t, t2, tansol, surfids, in, strin, eps); if (tansol) tansol -> GetTangentialSurfaceIndices3 (p, t, t2, surfids, eps); } void Solid :: RecTangentialSolid3 (const Point<3> & p, const Vec<3> & t, const Vec<3> & t2, Solid *& tansol, Array & surfids, int & in, int & strin, double eps) const { tansol = NULL; switch (op) { case TERM: case TERM_REF: { INSOLID_TYPE ist = prim->PointInSolid(p, eps); if (ist == DOES_INTERSECT) ist = prim->VecInSolid3 (p, t, t2, eps); in = (ist == IS_INSIDE || ist == DOES_INTERSECT); strin = (ist == IS_INSIDE); if (ist == DOES_INTERSECT) { tansol = new Solid (prim); tansol -> op = TERM_REF; } break; } case SECTION: { int in1, in2, strin1, strin2; Solid * tansol1, * tansol2; s1 -> RecTangentialSolid3 (p, t, t2, tansol1, surfids, in1, strin1, eps); s2 -> RecTangentialSolid3 (p, t, t2, tansol2, surfids, in2, strin2, eps); if (in1 && in2) { if (tansol1 && tansol2) tansol = new Solid (SECTION, tansol1, tansol2); else if (tansol1) tansol = tansol1; else if (tansol2) tansol = tansol2; } in = (in1 && in2); strin = (strin1 && strin2); break; } case UNION: { int in1, in2, strin1, strin2; Solid * tansol1, * tansol2; s1 -> RecTangentialSolid3 (p, t, t2, tansol1, surfids, in1, strin1, eps); s2 -> RecTangentialSolid3 (p, t, t2, tansol2, surfids, in2, strin2, eps); if (!strin1 && !strin2) { if (tansol1 && tansol2) tansol = new Solid (UNION, tansol1, tansol2); else if (tansol1) tansol = tansol1; else if (tansol2) tansol = tansol2; } in = (in1 || in2); strin = (strin1 || strin2); break; } case SUB: { int hin, hstrin; Solid * tansol1; s1 -> RecTangentialSolid3 (p, t, t2, tansol1, surfids, hin, hstrin, eps); if (tansol1) tansol = new Solid (SUB, tansol1); in = !hstrin; strin = !hin; break; } case ROOT: { s1 -> RecTangentialSolid3 (p, t, t2, tansol, surfids, in, strin, eps); break; } } } void Solid :: TangentialEdgeSolid (const Point<3> & p, const Vec<3> & t, const Vec<3> & t2, const Vec<3> & m, Solid *& tansol, Array & surfids, double eps) const { int in, strin; surfids.SetSize (0); // *testout << "tangentialedgesolid,sol = " << (*this) << endl; RecTangentialEdgeSolid (p, t, t2, m, tansol, surfids, in, strin, eps); if (tansol) tansol -> RecGetTangentialEdgeSurfaceIndices (p, t, t2, m, surfids, eps); } void Solid :: RecTangentialEdgeSolid (const Point<3> & p, const Vec<3> & t, const Vec<3> & t2, const Vec<3> & m, Solid *& tansol, Array & surfids, int & in, int & strin, double eps) const { tansol = NULL; switch (op) { case TERM: case TERM_REF: { INSOLID_TYPE ist = prim->PointInSolid(p, eps); /* (*testout) << "tangedgesolid, p = " << p << ", t = " << t << " for prim " << typeid (*prim).name() << " with surf " << prim->GetSurface() << endl; (*testout) << "ist = " << ist << endl; */ if (ist == DOES_INTERSECT) ist = prim->VecInSolid4 (p, t, t2, m, eps); // (*testout) << "ist2 = " << ist << endl; in = (ist == IS_INSIDE || ist == DOES_INTERSECT); strin = (ist == IS_INSIDE); if (ist == DOES_INTERSECT) { tansol = new Solid (prim); tansol -> op = TERM_REF; } break; } case SECTION: { int in1, in2, strin1, strin2; Solid * tansol1, * tansol2; s1 -> RecTangentialEdgeSolid (p, t, t2, m, tansol1, surfids, in1, strin1, eps); s2 -> RecTangentialEdgeSolid (p, t, t2, m, tansol2, surfids, in2, strin2, eps); if (in1 && in2) { if (tansol1 && tansol2) tansol = new Solid (SECTION, tansol1, tansol2); else if (tansol1) tansol = tansol1; else if (tansol2) tansol = tansol2; } in = (in1 && in2); strin = (strin1 && strin2); break; } case UNION: { int in1, in2, strin1, strin2; Solid * tansol1, * tansol2; s1 -> RecTangentialEdgeSolid (p, t, t2, m, tansol1, surfids, in1, strin1, eps); s2 -> RecTangentialEdgeSolid (p, t, t2, m, tansol2, surfids, in2, strin2, eps); if (!strin1 && !strin2) { if (tansol1 && tansol2) tansol = new Solid (UNION, tansol1, tansol2); else if (tansol1) tansol = tansol1; else if (tansol2) tansol = tansol2; } in = (in1 || in2); strin = (strin1 || strin2); break; } case SUB: { int hin, hstrin; Solid * tansol1; s1 -> RecTangentialEdgeSolid (p, t, t2, m, tansol1, surfids, hin, hstrin, eps); if (tansol1) tansol = new Solid (SUB, tansol1); in = !hstrin; strin = !hin; break; } case ROOT: { s1 -> RecTangentialEdgeSolid (p, t, t2, m, tansol, surfids, in, strin, eps); break; } } } int Solid :: Edge (const Point<3> & p, const Vec<3> & v, double eps) const { int in, strin, faces; RecEdge (p, v, in, strin, faces, eps); return faces >= 2; } int Solid :: OnFace (const Point<3> & p, const Vec<3> & v, double eps) const { int in, strin, faces; RecEdge (p, v, in, strin, faces, eps); return faces >= 1; } void Solid :: RecEdge (const Point<3> & p, const Vec<3> & v, int & in, int & strin, int & faces, double eps) const { switch (op) { case TERM: case TERM_REF: { INSOLID_TYPE ist = prim->VecInSolid (p, v, eps); in = (ist == IS_INSIDE || ist == DOES_INTERSECT); strin = (ist == IS_INSIDE); /* in = VectorIn (p, v); strin = VectorStrictIn (p, v); */ faces = 0; if (in && ! strin) { // faces = 1; int i; Vec<3> grad; for (i = 0; i < prim->GetNSurfaces(); i++) { double val = prim->GetSurface(i).CalcFunctionValue(p); prim->GetSurface(i).CalcGradient (p, grad); if (fabs (val) < eps && fabs (v * grad) < 1e-6) faces++; } } // else // faces = 0; break; } case SECTION: { int in1, in2, strin1, strin2, faces1, faces2; s1 -> RecEdge (p, v, in1, strin1, faces1, eps); s2 -> RecEdge (p, v, in2, strin2, faces2, eps); faces = 0; if (in1 && in2) faces = faces1 + faces2; in = in1 && in2; strin = strin1 && strin2; break; } case UNION: { int in1, in2, strin1, strin2, faces1, faces2; s1 -> RecEdge (p, v, in1, strin1, faces1, eps); s2 -> RecEdge (p, v, in2, strin2, faces2, eps); faces = 0; if (!strin1 && !strin2) faces = faces1 + faces2; in = in1 || in2; strin = strin1 || strin2; break; } case SUB: { int in1, strin1; s1 -> RecEdge (p, v, in1, strin1, faces, eps); in = !strin1; strin = !in1; break; } case ROOT: { s1 -> RecEdge (p, v, in, strin, faces, eps); break; } } } void Solid :: CalcSurfaceInverse () { CalcSurfaceInverseRec (0); } void Solid :: CalcSurfaceInverseRec (int inv) { switch (op) { case TERM: case TERM_REF: { bool priminv; for (int i = 0; i < prim->GetNSurfaces(); i++) { priminv = (prim->SurfaceInverted(i) != 0); if (inv) priminv = !priminv; prim->GetSurface(i).SetInverse (priminv); } break; } case UNION: case SECTION: { s1 -> CalcSurfaceInverseRec (inv); s2 -> CalcSurfaceInverseRec (inv); break; } case SUB: { s1 -> CalcSurfaceInverseRec (1 - inv); break; } case ROOT: { s1 -> CalcSurfaceInverseRec (inv); break; } } } Solid * Solid :: GetReducedSolid (const BoxSphere<3> & box) const { INSOLID_TYPE in; return RecGetReducedSolid (box, in); } Solid * Solid :: RecGetReducedSolid (const BoxSphere<3> & box, INSOLID_TYPE & in) const { if (num_surfs <= 2) { // checking special case for degenerated plane - cylinder, Dec 2014 int cnt_plane = 0, cnt_cyl = 0; bool inv_plane, inv_cyl; Plane * plane; Cylinder * cyl; ForEachSurface ( [&] (Surface * surf, bool inv) { if (dynamic_cast(surf)) { cnt_plane++; plane = dynamic_cast(surf); inv_plane = inv; } if (dynamic_cast(surf)) { cnt_cyl++; cyl = dynamic_cast(surf); inv_cyl = inv; } }); if (cnt_plane == 1 && cnt_cyl == 1) { double scala = (cyl->A()-plane->P()) * plane->N(); double scalb = (cyl->B()-plane->P()) * plane->N(); double scal = plane->N() * plane->N(); if ( ( fabs (scala*scala - cyl->R()*cyl->R()*scal) < 1e-10*cyl->R()*cyl->R() ) && ( fabs (scalb*scalb - cyl->R()*cyl->R()*scal) < 1e-10*cyl->R()*cyl->R() ) ) { // intersection edge in box ? Point<3> p0 = cyl->A() - (scala/scal) * plane->N(); Vec<3> vedge = cyl->B() - cyl->A(); Vec<3> ve_center = box.Center()-p0; // dist(lam) = \| ve_center \|^2 - 2 lam (vedge, ve_center) + lam^2 \| vedge \|^2 double num = vedge*ve_center; double den = vedge*vedge; double dist_edge_center2 = ve_center*ve_center - num * num /den; bool edge_in_box = dist_edge_center2 < sqr (box.Diam()); if (!edge_in_box) { if (op == SECTION) { // cout << "solid = " << *this << endl; if (!inv_cyl && !inv_plane && scala < 0) { // cout << "fix for degenerated cyl-plane edge: just the cylinder" << endl; Solid * sol = new Solid (cyl); sol -> op = TERM_REF; return sol; } } if (op == UNION) { // cout << "solid = " << *this << ", inv_plane = " << inv_plane << " inv_cyl = " << inv_cyl << " scalb " << scalb << endl; if (!inv_plane && !inv_cyl && (scala < 0)) { // cout << "fix for degenerated cyl-plane edge: just the plane" << endl; // return new Solid (plane); Solid * sol = new Solid (plane); sol -> op = TERM_REF; return sol; } } ; // *testout << "have 1 plane and 1 cyl, degenerated" << endl; } } } } Solid * redsol = NULL; switch (op) { case TERM: case TERM_REF: { in = prim -> BoxInSolid (box); if (in == DOES_INTERSECT) { redsol = new Solid (prim); redsol -> op = TERM_REF; } break; } case SECTION: { INSOLID_TYPE in1, in2; Solid * redsol1, * redsol2; redsol1 = s1 -> RecGetReducedSolid (box, in1); redsol2 = s2 -> RecGetReducedSolid (box, in2); if (in1 == IS_OUTSIDE || in2 == IS_OUTSIDE) { if (in1 == DOES_INTERSECT) delete redsol1; if (in2 == DOES_INTERSECT) delete redsol2; in = IS_OUTSIDE; } else { if (in1 == DOES_INTERSECT || in2 == DOES_INTERSECT) in = DOES_INTERSECT; else in = IS_INSIDE; if (in1 == DOES_INTERSECT && in2 == DOES_INTERSECT) redsol = new Solid (SECTION, redsol1, redsol2); else if (in1 == DOES_INTERSECT) redsol = redsol1; else if (in2 == DOES_INTERSECT) redsol = redsol2; } break; } case UNION: { INSOLID_TYPE in1, in2; Solid * redsol1, * redsol2; redsol1 = s1 -> RecGetReducedSolid (box, in1); redsol2 = s2 -> RecGetReducedSolid (box, in2); if (in1 == IS_INSIDE || in2 == IS_INSIDE) { if (in1 == DOES_INTERSECT) delete redsol1; if (in2 == DOES_INTERSECT) delete redsol2; in = IS_INSIDE; } else { if (in1 == DOES_INTERSECT || in2 == DOES_INTERSECT) in = DOES_INTERSECT; else in = IS_OUTSIDE; if (in1 == DOES_INTERSECT && in2 == DOES_INTERSECT) redsol = new Solid (UNION, redsol1, redsol2); else if (in1 == DOES_INTERSECT) redsol = redsol1; else if (in2 == DOES_INTERSECT) redsol = redsol2; } break; } case SUB: { INSOLID_TYPE in1; Solid * redsol1 = s1 -> RecGetReducedSolid (box, in1); switch (in1) { case IS_OUTSIDE: in = IS_INSIDE; break; case IS_INSIDE: in = IS_OUTSIDE; break; case DOES_INTERSECT: in = DOES_INTERSECT; break; } if (redsol1) redsol = new Solid (SUB, redsol1); break; } case ROOT: { INSOLID_TYPE in1; redsol = s1 -> RecGetReducedSolid (box, in1); in = in1; break; } } /* if (redsol) (*testout) << "getrecsolid, redsol = " << endl << (*redsol) << endl; else (*testout) << "redsol is null" << endl; */ return redsol; } int Solid :: NumPrimitives () const { switch (op) { case TERM: case TERM_REF: { return 1; } case UNION: case SECTION: { return s1->NumPrimitives () + s2 -> NumPrimitives(); } case SUB: case ROOT: { return s1->NumPrimitives (); } } return 0; } void Solid :: GetSurfaceIndices (Array & surfind) const { surfind.SetSize (0); RecGetSurfaceIndices (surfind); } void Solid :: RecGetSurfaceIndices (Array & surfind) const { switch (op) { case TERM: case TERM_REF: { /* int i; for (i = 1; i <= surfind.Size(); i++) if (surfind.Get(i) == prim->GetSurfaceId()) return; surfind.Append (prim->GetSurfaceId()); break; */ for (int j = 0; j < prim->GetNSurfaces(); j++) if (prim->SurfaceActive (j)) { bool found = 0; int siprim = prim->GetSurfaceId(j); for (int i = 0; i < surfind.Size(); i++) if (surfind[i] == siprim) { found = 1; break; } if (!found) surfind.Append (siprim); } break; } case UNION: case SECTION: { s1 -> RecGetSurfaceIndices (surfind); s2 -> RecGetSurfaceIndices (surfind); break; } case SUB: case ROOT: { s1 -> RecGetSurfaceIndices (surfind); break; } } } void Solid :: ForEachSurface (const std::function & lambda, bool inv) const { switch (op) { case TERM: case TERM_REF: { for (int j = 0; j < prim->GetNSurfaces(); j++) if (prim->SurfaceActive (j)) lambda (&prim->GetSurface(j), inv); break; } case UNION: case SECTION: { s1 -> ForEachSurface (lambda, inv); s2 -> ForEachSurface (lambda, inv); break; } case SUB: { s1 -> ForEachSurface (lambda, !inv); break; } case ROOT: { s1 -> ForEachSurface (lambda, inv); break; } } } void Solid :: GetTangentialSurfaceIndices (const Point<3> & p, Array & surfind, double eps) const { surfind.SetSize (0); RecGetTangentialSurfaceIndices (p, surfind, eps); } void Solid :: RecGetTangentialSurfaceIndices (const Point<3> & p, Array & surfind, double eps) const { switch (op) { case TERM: case TERM_REF: { /* for (int j = 0; j < prim->GetNSurfaces(); j++) if (fabs (prim->GetSurface(j).CalcFunctionValue (p)) < eps) if (!surfind.Contains (prim->GetSurfaceId(j))) surfind.Append (prim->GetSurfaceId(j)); */ prim->GetTangentialSurfaceIndices (p, surfind, eps); break; } case UNION: case SECTION: { s1 -> RecGetTangentialSurfaceIndices (p, surfind, eps); s2 -> RecGetTangentialSurfaceIndices (p, surfind, eps); break; } case SUB: case ROOT: { s1 -> RecGetTangentialSurfaceIndices (p, surfind, eps); break; } } } void Solid :: GetTangentialSurfaceIndices2 (const Point<3> & p, const Vec<3> & v, Array & surfind, double eps) const { surfind.SetSize (0); RecGetTangentialSurfaceIndices2 (p, v, surfind, eps); } void Solid :: RecGetTangentialSurfaceIndices2 (const Point<3> & p, const Vec<3> & v, Array & surfind, double eps) const { switch (op) { case TERM: case TERM_REF: { for (int j = 0; j < prim->GetNSurfaces(); j++) { if (fabs (prim->GetSurface(j).CalcFunctionValue (p)) < eps) { Vec<3> grad; prim->GetSurface(j).CalcGradient (p, grad); if (sqr (grad * v) < 1e-6 * v.Length2() * grad.Length2()) { if (!surfind.Contains (prim->GetSurfaceId(j))) surfind.Append (prim->GetSurfaceId(j)); } } } break; } case UNION: case SECTION: { s1 -> RecGetTangentialSurfaceIndices2 (p, v, surfind, eps); s2 -> RecGetTangentialSurfaceIndices2 (p, v, surfind, eps); break; } case SUB: case ROOT: { s1 -> RecGetTangentialSurfaceIndices2 (p, v, surfind, eps); break; } } } void Solid :: GetTangentialSurfaceIndices3 (const Point<3> & p, const Vec<3> & v, const Vec<3> & v2, Array & surfind, double eps) const { surfind.SetSize (0); RecGetTangentialSurfaceIndices3 (p, v, v2, surfind, eps); } void Solid :: RecGetTangentialSurfaceIndices3 (const Point<3> & p, const Vec<3> & v, const Vec<3> & v2, Array & surfind, double eps) const { switch (op) { case TERM: case TERM_REF: { for (int j = 0; j < prim->GetNSurfaces(); j++) { if (fabs (prim->GetSurface(j).CalcFunctionValue (p)) < eps) { Vec<3> grad; prim->GetSurface(j).CalcGradient (p, grad); if (sqr (grad * v) < 1e-6 * v.Length2() * grad.Length2()) { Mat<3> hesse; prim->GetSurface(j).CalcHesse (p, hesse); double hv2 = v2 * grad + v * (hesse * v); if (fabs (hv2) < 1e-6) { if (!surfind.Contains (prim->GetSurfaceId(j))) surfind.Append (prim->GetSurfaceId(j)); } /* else { *testout << "QUAD NOT OK" << endl; *testout << "v = " << v << ", v2 = " << v2 << endl; *testout << "v * grad = " << v*grad << endl; *testout << "v2 * grad = " << v2*grad << endl; *testout << "v H v = " << v*(hesse*v) << endl; *testout << "grad = " << grad << endl; *testout << "hesse = " << hesse << endl; *testout << "hv2 = " << v2 * grad + v * (hesse * v) << endl; } */ } } } break; } case UNION: case SECTION: { s1 -> RecGetTangentialSurfaceIndices3 (p, v, v2, surfind, eps); s2 -> RecGetTangentialSurfaceIndices3 (p, v, v2, surfind, eps); break; } case SUB: case ROOT: { s1 -> RecGetTangentialSurfaceIndices3 (p, v, v2, surfind, eps); break; } } } void Solid :: RecGetTangentialEdgeSurfaceIndices (const Point<3> & p, const Vec<3> & v, const Vec<3> & v2, const Vec<3> & m, Array & surfind, double eps) const { switch (op) { case TERM: case TERM_REF: { // *testout << "check vecinsolid4, p = " << p << ", v = " << v << "; m = " << m << endl; if (prim->VecInSolid4 (p, v, v2, m, eps) == DOES_INTERSECT) { prim->GetTangentialVecSurfaceIndices2 (p, v, m, surfind, eps); /* for (int j = 0; j < prim->GetNSurfaces(); j++) { if (fabs (prim->GetSurface(j).CalcFunctionValue (p)) < eps) { Vec<3> grad; prim->GetSurface(j).CalcGradient (p, grad); *testout << "grad = " << grad << endl; if (sqr (grad * v) < 1e-6 * v.Length2() * grad.Length2() && sqr (grad * m) < 1e-6 * m.Length2() * grad.Length2() ) // new, 18032006 JS { *testout << "add surf " << prim->GetSurfaceId(j) << endl; if (!surfind.Contains (prim->GetSurfaceId(j))) surfind.Append (prim->GetSurfaceId(j)); } } } */ } break; } case UNION: case SECTION: { s1 -> RecGetTangentialEdgeSurfaceIndices (p, v, v2, m, surfind, eps); s2 -> RecGetTangentialEdgeSurfaceIndices (p, v, v2, m, surfind, eps); break; } case SUB: case ROOT: { s1 -> RecGetTangentialEdgeSurfaceIndices (p, v, v2, m, surfind, eps); break; } } } void Solid :: GetSurfaceIndices (IndexSet & iset) const { iset.Clear(); RecGetSurfaceIndices (iset); } void Solid :: RecGetSurfaceIndices (IndexSet & iset) const { switch (op) { case TERM: case TERM_REF: { /* int i; for (i = 1; i <= surfind.Size(); i++) if (surfind.Get(i) == prim->GetSurfaceId()) return; surfind.Append (prim->GetSurfaceId()); break; */ for (int j = 0; j < prim->GetNSurfaces(); j++) if (prim->SurfaceActive (j)) { int siprim = prim->GetSurfaceId(j); iset.Add (siprim); } break; } case UNION: case SECTION: { s1 -> RecGetSurfaceIndices (iset); s2 -> RecGetSurfaceIndices (iset); break; } case SUB: case ROOT: { s1 -> RecGetSurfaceIndices (iset); break; } } } void Solid :: CalcOnePrimitiveSpecialPoints (const Box<3> & box, Array > & pts) const { double eps = 1e-8 * box.Diam (); pts.SetSize (0); this -> RecCalcOnePrimitiveSpecialPoints (pts); for (int i = pts.Size()-1; i >= 0; i--) { if (!IsIn (pts[i],eps) || IsStrictIn (pts[i],eps)) pts.Delete (i); } } void Solid :: RecCalcOnePrimitiveSpecialPoints (Array > & pts) const { switch (op) { case TERM: case TERM_REF: { prim -> CalcSpecialPoints (pts); break; } case UNION: case SECTION: { s1 -> RecCalcOnePrimitiveSpecialPoints (pts); s2 -> RecCalcOnePrimitiveSpecialPoints (pts); break; } case SUB: case ROOT: { s1 -> RecCalcOnePrimitiveSpecialPoints (pts); break; } } } BlockAllocator Solid :: ball(sizeof (Solid)); } netgen-6.2.1804/libsrc/csg/singularref.hpp0000644000175000017500000000373213272137567017076 0ustar kurtkurt#ifndef FILE_SINGULARREF #define FILE_SINGULARREF /**************************************************************************/ /* File: singularref.hh */ /* Author: Joachim Schoeberl */ /* Date: 25. Sep. 99 */ /**************************************************************************/ namespace netgen { /** Control for local refinement */ /** Singular Face. Causes a bounday layer mesh refinement. All elements in subdomain domnr will get a boundary layer on faces sharing the solid sol */ class DLL_HEADER SingularFace { public: int domnr; const Solid *sol; double factor; // Array > points; // Array segms; public: SingularFace (int adomnr, const Solid * asol, double sf) : domnr(adomnr), sol(asol), factor(sf) { ; } const Solid * GetSolid() const { return sol; } int GetDomainNr () const { return domnr; } }; /// class DLL_HEADER SingularEdge { public: double beta; int domnr; const CSGeometry& geom; const Solid *sol1, *sol2; Array > points; Array segms; double factor; double maxhinit; public: SingularEdge (double abeta, int adomnr, const CSGeometry & ageom, const Solid * asol1, const Solid * asol2, double sf, const double maxh_at_initialization = -1); void FindPointsOnEdge (class Mesh & mesh); void SetMeshSize (class Mesh & mesh, double globalh); }; /// class DLL_HEADER SingularPoint { public: double beta; const Solid *sol1, *sol2, *sol3; Array > points; double factor; public: SingularPoint (double abeta, const Solid * asol1, const Solid * asol2, const Solid * asol3, double sf); void FindPoints (class Mesh & mesh); void SetMeshSize (class Mesh & mesh, double globalh); }; } #endif netgen-6.2.1804/libsrc/csg/polyhedra.hpp0000644000175000017500000000556713272137567016554 0ustar kurtkurt#ifndef FILE_POLYHEDRA #define FILE_POLYHEDRA /**************************************************************************/ /* File: polyhedra.hh */ /* Author: Joachim Schoeberl */ /* Date: 19. Mar. 2000 */ /**************************************************************************/ namespace netgen { /* Polyhedral primitive */ class Polyhedra : public Primitive { class Face { public: int pnums[3]; int planenr; int inputnr; Box<3> bbox; // Point<3> center; Vec<3> v1, v2; // edges Vec<3> w1, w2; // pseudo-inverse Vec<3> n; // normal to face Vec<3> nn; // normed normal Face () { ; } Face (int pi1, int pi2, int pi3, const Array > & points, int ainputnr); }; Array > points; Array faces; Array planes; Box<3> poly_bbox; double eps_base1; public: Polyhedra (); virtual ~Polyhedra (); static Primitive * CreateDefault (); virtual INSOLID_TYPE BoxInSolid (const BoxSphere<3> & box) const; virtual INSOLID_TYPE PointInSolid (const Point<3> & p, double eps) const; virtual INSOLID_TYPE VecInSolid (const Point<3> & p, const Vec<3> & v, double eps) const; // checks if lim s->0 lim t->0 p + t(v1 + s v2) in solid virtual INSOLID_TYPE VecInSolid2 (const Point<3> & p, const Vec<3> & v1, const Vec<3> & v2, double eps) const; virtual void GetTangentialSurfaceIndices (const Point<3> & p, Array & surfind, double eps) const; virtual void GetTangentialVecSurfaceIndices2 (const Point<3> & p, const Vec<3> & v1, const Vec<3> & v2, Array & surfind, double eps) const; virtual void CalcSpecialPoints (Array > & pts) const; virtual void AnalyzeSpecialPoint (const Point<3> & pt, Array > & specpts) const; virtual Vec<3> SpecialPointTangentialVector (const Point<3> & p, int s1, int s2) const; virtual int GetNSurfaces() const { return planes.Size(); } virtual Surface & GetSurface (int i) { return *planes[i]; } virtual const Surface & GetSurface (int i) const { return *planes[i]; } virtual void GetPrimitiveData (const char *& classname, Array & coeffs) const; virtual void SetPrimitiveData (Array & coeffs); virtual void Reduce (const BoxSphere<3> & box); virtual void UnReduce (); int AddPoint (const Point<3> & p); int AddFace (int pi1, int pi2, int pi3, int inputnum); void GetPolySurfs(Array < Array * > & polysurfs); protected: int FaceBoxIntersection (int fnr, const BoxSphere<3> & box) const; // void CalcData(); }; } #endif netgen-6.2.1804/libsrc/csg/csg.hpp0000644000175000017500000000213313272137567015323 0ustar kurtkurt#ifndef FILE_CSG #define FILE_CSG /* *************************************************************************/ /* File: geoml.hpp */ /* Author: Joachim Schoeberl */ /* Date: 21. Jun. 98 */ /* *************************************************************************/ #include #include #include // #include #include "../gprim/spline.hpp" #include "../gprim/splinegeometry.hpp" #include "surface.hpp" #include "solid.hpp" #include "identify.hpp" #include "singularref.hpp" #include "splinesurface.hpp" #include "csgeom.hpp" #include "csgparser.hpp" #include "triapprox.hpp" #include "algprim.hpp" #include "brick.hpp" #include "spline3d.hpp" #include "manifold.hpp" #include "curve2d.hpp" #include "explicitcurve2d.hpp" #include "gencyl.hpp" #include "polyhedra.hpp" #include "extrusion.hpp" #include "revolution.hpp" #include "specpoin.hpp" #include "edgeflw.hpp" #include "meshsurf.hpp" #endif netgen-6.2.1804/libsrc/csg/zrefine.cpp0000644000175000017500000003737513272137567016224 0ustar kurtkurt#include #include "meshing.hpp" #include namespace netgen { // find singular edges void SelectSingularEdges (const Mesh & mesh, const CSGeometry & geom, INDEX_2_HASHTABLE & singedges, ZRefinementOptions & opt) { // edges selected in csg input file for (int i = 1; i <= geom.singedges.Size(); i++) { //if(geom.singedges.Get(i)->maxhinit > 0) // continue; //!!!! const SingularEdge & se = *geom.singedges.Get(i); for (int j = 1; j <= se.segms.Size(); j++) { INDEX_2 i2 = se.segms.Get(j); singedges.Set (i2, 1); } } // edges interactively selected for (int i = 1; i <= mesh.GetNSeg(); i++) { const Segment & seg = mesh.LineSegment(i); if (seg.singedge_left || seg.singedge_right) { INDEX_2 i2(seg[0], seg[1]); i2.Sort(); singedges.Set (i2, 1); } } } /** Convert elements (vol-tets, surf-trigs) into prisms/quads */ void MakePrismsSingEdge (Mesh & mesh, INDEX_2_HASHTABLE & singedges) { // volume elements for (int i = 1; i <= mesh.GetNE(); i++) { Element & el = mesh.VolumeElement(i); if (el.GetType() != TET) continue; for (int j = 1; j <= 3; j++) for (int k = j+1; k <= 4; k++) { INDEX_2 edge(el.PNum(j), el.PNum(k)); edge.Sort(); if (singedges.Used (edge)) { int pi3 = 1, pi4 = 1; while (pi3 == j || pi3 == k) pi3++; pi4 = 10 - j - k - pi3; int p3 = el.PNum(pi3); int p4 = el.PNum(pi4); el.SetType(PRISM); el.PNum(1) = edge.I1(); el.PNum(2) = p3; el.PNum(3) = p4; el.PNum(4) = edge.I2(); el.PNum(5) = p3; el.PNum(6) = p4; } } } // surface elements for (int i = 1; i <= mesh.GetNSE(); i++) { Element2d & el = mesh.SurfaceElement(i); if (el.GetType() != TRIG) continue; for (int j = 1; j <= 3; j++) { int k = (j % 3) + 1; INDEX_2 edge(el.PNum(j), el.PNum(k)); edge.Sort(); if (singedges.Used (edge)) { int pi3 = 6-j-k; int p3 = el.PNum(pi3); int p1 = el.PNum(j); int p2 = el.PNum(k); el.SetType(QUAD); el.PNum(1) = p2; el.PNum(2) = p3; el.PNum(3) = p3; el.PNum(4) = p1; } } } } /* Convert tets and pyramids next to close (identified) points into prisms */ void MakePrismsClosePoints (Mesh & mesh) { int i, j, k; for (i = 1; i <= mesh.GetNE(); i++) { Element & el = mesh.VolumeElement(i); if (el.GetType() == TET) { for (j = 1; j <= 3; j++) for (k = j+1; k <= 4; k++) { INDEX_2 edge(el.PNum(j), el.PNum(k)); edge.Sort(); if (mesh.GetIdentifications().GetSymmetric (el.PNum(j), el.PNum(k))) { int pi3 = 1, pi4 = 1; while (pi3 == j || pi3 == k) pi3++; pi4 = 10 - j - k - pi3; int p3 = el.PNum(pi3); int p4 = el.PNum(pi4); el.SetType(PRISM); el.PNum(1) = edge.I1(); el.PNum(2) = p3; el.PNum(3) = p4; el.PNum(4) = edge.I2(); el.PNum(5) = p3; el.PNum(6) = p4; } } } if (el.GetType() == PYRAMID) { // pyramid, base face = 1,2,3,4 for (j = 0; j <= 1; j++) { PointIndex pi1 = el.PNum( (j+0) % 4 + 1); PointIndex pi2 = el.PNum( (j+1) % 4 + 1); PointIndex pi3 = el.PNum( (j+2) % 4 + 1); PointIndex pi4 = el.PNum( (j+3) % 4 + 1); PointIndex pi5 = el.PNum(5); INDEX_2 edge1(pi1, pi4); INDEX_2 edge2(pi2, pi3); edge1.Sort(); edge2.Sort(); if (mesh.GetIdentifications().GetSymmetric (pi1, pi4) && mesh.GetIdentifications().GetSymmetric (pi2, pi3)) { //int p3 = el.PNum(pi3); //int p4 = el.PNum(pi4); el.SetType(PRISM); el.PNum(1) = pi1; el.PNum(2) = pi2; el.PNum(3) = pi5; el.PNum(4) = pi4; el.PNum(5) = pi3; el.PNum(6) = pi5; } } } } for (i = 1; i <= mesh.GetNSE(); i++) { Element2d & el = mesh.SurfaceElement(i); if (el.GetType() != TRIG) continue; for (j = 1; j <= 3; j++) { k = (j % 3) + 1; INDEX_2 edge(el.PNum(j), el.PNum(k)); edge.Sort(); if (mesh.GetIdentifications().GetSymmetric (el.PNum(j), el.PNum(k))) { int pi3 = 6-j-k; int p3 = el.PNum(pi3); int p1 = el.PNum(j); int p2 = el.PNum(k); el.SetType(QUAD); el.PNum(1) = p2; el.PNum(2) = p3; el.PNum(3) = p3; el.PNum(4) = p1; } } } } #ifdef OLD void MakeCornerNodes (Mesh & mesh, INDEX_HASHTABLE & cornernodes) { int i, j; int nseg = mesh.GetNSeg(); Array edgesonpoint(mesh.GetNP()); for (i = 1; i <= mesh.GetNP(); i++) edgesonpoint.Elem(i) = 0; for (i = 1; i <= nseg; i++) { for (j = 1; j <= 2; j++) { int pi = (j == 1) ? mesh.LineSegment(i)[0] : mesh.LineSegment(i)[1]; edgesonpoint.Elem(pi)++; } } /* cout << "cornernodes: "; for (i = 1; i <= edgesonpoint.Size(); i++) if (edgesonpoint.Get(i) >= 6) { cornernodes.Set (i, 1); cout << i << " "; } cout << endl; */ // cornernodes.Set (5, 1); } #endif void RefinePrisms (Mesh & mesh, const CSGeometry * geom, ZRefinementOptions & opt) { int i, j; bool found, change; int cnt = 0; // markers for z-refinement: p1, p2, levels // p1-p2 is an edge to be refined Array ref_uniform; Array ref_singular; Array ref_slices; BitArray first_id(geom->identifications.Size()); first_id.Set(); // if (mesh.GetIdentifications().HasIdentifiedPoints()) { INDEX_2_HASHTABLE & identpts = mesh.GetIdentifications().GetIdentifiedPoints (); for (i = 1; i <= identpts.GetNBags(); i++) for (j = 1; j <= identpts.GetBagSize(i); j++) { INDEX_2 pair; int idnr; identpts.GetData(i, j, pair, idnr); const CloseSurfaceIdentification * csid = dynamic_cast (geom->identifications.Get(idnr)); if (csid) { if (!csid->GetSlices().Size()) { if (first_id.Test (idnr)) { first_id.Clear(idnr); ref_uniform.Append (INDEX_3 (pair.I1(), pair.I2(), csid->RefLevels())); ref_singular.Append (INDEX_3 (pair.I1(), pair.I2(), csid->RefLevels1())); ref_singular.Append (INDEX_3 (pair.I2(), pair.I1(), csid->RefLevels2())); } } else { //const Array & slices = csid->GetSlices(); INDEX_4 i4; i4[0] = pair.I1(); i4[1] = pair.I2(); i4[2] = idnr; i4[3] = csid->GetSlices().Size(); ref_slices.Append (i4); } } } } Array epgi; while (1) { cnt++; PrintMessage (3, "Z-Refinement, level = ", cnt); INDEX_2_HASHTABLE refedges(mesh.GetNSE()+1); found = 0; // mark prisms due to close surface flags: int oldsize = ref_uniform.Size(); for (i = 1; i <= oldsize; i++) { int pi1 = ref_uniform.Get(i).I1(); int pi2 = ref_uniform.Get(i).I2(); int levels = ref_uniform.Get(i).I3(); if (levels > 0) { const Point3d & p1 = mesh.Point(pi1); const Point3d & p2 = mesh.Point(pi2); int npi(0); INDEX_2 edge(pi1, pi2); edge.Sort(); if (!refedges.Used(edge)) { Point3d np = Center (p1, p2); npi = mesh.AddPoint (np); refedges.Set (edge, npi); found = 1; } ref_uniform.Elem(i) = INDEX_3(pi1, npi, levels-1); ref_uniform.Append (INDEX_3(pi2, npi, levels-1)); } } for (i = 1; i <= ref_singular.Size(); i++) { int pi1 = ref_singular.Get(i).I1(); int pi2 = ref_singular.Get(i).I2(); int levels = ref_singular.Get(i).I3(); if (levels > 0) { const Point3d & p1 = mesh.Point(pi1); const Point3d & p2 = mesh.Point(pi2); int npi; INDEX_2 edge(pi1, pi2); edge.Sort(); if (!refedges.Used(edge)) { Point3d np = Center (p1, p2); npi = mesh.AddPoint (np); refedges.Set (edge, npi); found = 1; } else npi = refedges.Get (edge); ref_singular.Elem(i) = INDEX_3(pi1, npi, levels-1); } } for (i = 1; i <= ref_slices.Size(); i++) { int pi1 = ref_slices.Get(i)[0]; int pi2 = ref_slices.Get(i)[1]; int idnr = ref_slices.Get(i)[2]; int slicenr = ref_slices.Get(i)[3]; if (slicenr > 0) { const Point3d & p1 = mesh.Point(pi1); const Point3d & p2 = mesh.Point(pi2); int npi; const CloseSurfaceIdentification * csid = dynamic_cast (geom->identifications.Get(idnr)); INDEX_2 edge(pi1, pi2); edge.Sort(); if (!refedges.Used(edge)) { const Array & slices = csid->GetSlices(); //(*testout) << "idnr " << idnr << " i " << i << endl; //(*testout) << "slices " << slices << endl; double slicefac = slices.Get(slicenr); double slicefaclast = (slicenr == slices.Size()) ? 1 : slices.Get(slicenr+1); Point3d np = p1 + (slicefac / slicefaclast) * (p2-p1); //(*testout) << "slicenr " << slicenr << " slicefac " << slicefac << " quot " << (slicefac / slicefaclast) << " np " << np << endl; npi = mesh.AddPoint (np); refedges.Set (edge, npi); found = 1; } else npi = refedges.Get (edge); ref_slices.Elem(i)[1] = npi; ref_slices.Elem(i)[3] --; } } for (i = 1; i <= mesh.GetNE(); i++) { Element & el = mesh.VolumeElement (i); if (el.GetType() != PRISM) continue; for (j = 1; j <= 3; j++) { int pi1 = el.PNum(j); int pi2 = el.PNum(j+3); const Point3d & p1 = mesh.Point(pi1); const Point3d & p2 = mesh.Point(pi2); bool ref = 0; /* if (Dist (p1, p2) > mesh.GetH (Center (p1, p2))) ref = 1; */ /* if (cnt <= opt.minref) ref = 1; */ /* if ((pi1 == 460 || pi2 == 460 || pi1 == 461 || pi2 == 461) && cnt <= 8) ref = 1; */ if (ref == 1) { INDEX_2 edge(pi1, pi2); edge.Sort(); if (!refedges.Used(edge)) { Point3d np = Center (p1, p2); int npi = mesh.AddPoint (np); refedges.Set (edge, npi); found = 1; } } } } if (!found) break; // build closure: PrintMessage (5, "start closure"); do { PrintMessage (5, "start loop"); change = 0; for (i = 1; i <= mesh.GetNE(); i++) { Element & el = mesh.VolumeElement (i); if (el.GetType() != PRISM) continue; bool hasref = 0, hasnonref = 0; for (j = 1; j <= 3; j++) { int pi1 = el.PNum(j); int pi2 = el.PNum(j+3); if (pi1 != pi2) { INDEX_2 edge(pi1, pi2); edge.Sort(); if (refedges.Used(edge)) hasref = 1; else hasnonref = 1; } } if (hasref && hasnonref) { // cout << "el " << i << " in closure" << endl; change = 1; for (j = 1; j <= 3; j++) { int pi1 = el.PNum(j); int pi2 = el.PNum(j+3); const Point3d & p1 = mesh.Point(pi1); const Point3d & p2 = mesh.Point(pi2); INDEX_2 edge(pi1, pi2); edge.Sort(); if (!refedges.Used(edge)) { Point3d np = Center (p1, p2); int npi = mesh.AddPoint (np); refedges.Set (edge, npi); } } } } } while (change); PrintMessage (5, "Do segments"); // (*testout) << "closure formed, np = " << mesh.GetNP() << endl; int oldns = mesh.GetNSeg(); for (i = 1; i <= oldns; i++) { const Segment & el = mesh.LineSegment(i); INDEX_2 i2(el[0], el[1]); i2.Sort(); int pnew; EdgePointGeomInfo ngi; if (refedges.Used(i2)) { pnew = refedges.Get(i2); // ngi = epgi.Get(pnew); } else { continue; // Point3d pb; // /* // geom->PointBetween (mesh.Point (el[0]), // mesh.Point (el[1]), // el.surfnr1, el.surfnr2, // el.epgeominfo[0], el.epgeominfo[1], // pb, ngi); // */ // pb = Center (mesh.Point (el[0]), mesh.Point (el[1])); // pnew = mesh.AddPoint (pb); // refedges.Set (i2, pnew); // if (pnew > epgi.Size()) // epgi.SetSize (pnew); // epgi.Elem(pnew) = ngi; } Segment ns1 = el; Segment ns2 = el; ns1[1] = pnew; ns1.epgeominfo[1] = ngi; ns2[0] = pnew; ns2.epgeominfo[0] = ngi; mesh.LineSegment(i) = ns1; mesh.AddSegment (ns2); } PrintMessage (5, "Segments done, NSeg = ", mesh.GetNSeg()); // do refinement int oldne = mesh.GetNE(); for (i = 1; i <= oldne; i++) { Element & el = mesh.VolumeElement (i); if (el.GetNP() != 6) continue; int npi[3]; for (j = 1; j <= 3; j++) { int pi1 = el.PNum(j); int pi2 = el.PNum(j+3); if (pi1 == pi2) npi[j-1] = pi1; else { INDEX_2 edge(pi1, pi2); edge.Sort(); if (refedges.Used (edge)) npi[j-1] = refedges.Get(edge); else { /* (*testout) << "ERROR: prism " << i << " has hanging node !!" << ", edge = " << edge << endl; cerr << "ERROR: prism " << i << " has hanging node !!" << endl; */ npi[j-1] = 0; } } } if (npi[0]) { Element nel1(6), nel2(6); for (j = 1; j <= 3; j++) { nel1.PNum(j) = el.PNum(j); nel1.PNum(j+3) = npi[j-1]; nel2.PNum(j) = npi[j-1]; nel2.PNum(j+3) = el.PNum(j+3); } nel1.SetIndex (el.GetIndex()); nel2.SetIndex (el.GetIndex()); mesh.VolumeElement (i) = nel1; mesh.AddVolumeElement (nel2); } } PrintMessage (5, "Elements done, NE = ", mesh.GetNE()); // do surface elements int oldnse = mesh.GetNSE(); // cout << "oldnse = " << oldnse << endl; for (i = 1; i <= oldnse; i++) { Element2d & el = mesh.SurfaceElement (i); if (el.GetType() != QUAD) continue; int index = el.GetIndex(); int npi[2]; for (j = 1; j <= 2; j++) { int pi1, pi2; if (j == 1) { pi1 = el.PNum(1); pi2 = el.PNum(4); } else { pi1 = el.PNum(2); pi2 = el.PNum(3); } if (pi1 == pi2) npi[j-1] = pi1; else { INDEX_2 edge(pi1, pi2); edge.Sort(); if (refedges.Used (edge)) npi[j-1] = refedges.Get(edge); else { npi[j-1] = 0; } } } if (npi[0]) { Element2d nel1(QUAD), nel2(QUAD); for (j = 1; j <= 4; j++) { nel1.PNum(j) = el.PNum(j); nel2.PNum(j) = el.PNum(j); } nel1.PNum(3) = npi[1]; nel1.PNum(4) = npi[0]; nel2.PNum(1) = npi[0]; nel2.PNum(2) = npi[1]; /* for (j = 1; j <= 2; j++) { nel1.PNum(j) = el.PNum(j); nel1.PNum(j+2) = npi[j-1]; nel2.PNum(j) = npi[j-1]; nel2.PNum(j+2) = el.PNum(j+2); } */ nel1.SetIndex (el.GetIndex()); nel2.SetIndex (el.GetIndex()); mesh.SurfaceElement (i) = nel1; mesh.AddSurfaceElement (nel2); int si = mesh.GetFaceDescriptor (index).SurfNr(); Point<3> hp = mesh.Point(npi[0]); geom->GetSurface(si)->Project (hp); mesh.Point (npi[0]).SetPoint (hp); hp = mesh.Point(npi[1]); geom->GetSurface(si)->Project (hp); mesh.Point (npi[1]).SetPoint (hp); // geom->GetSurface(si)->Project (mesh.Point(npi[0])); // geom->GetSurface(si)->Project (mesh.Point(npi[1])); } } mesh.RebuildSurfaceElementLists(); PrintMessage (5, "Surface elements done, NSE = ", mesh.GetNSE()); } } void ZRefinement (Mesh & mesh, const NetgenGeometry * hgeom, ZRefinementOptions & opt) { const CSGeometry * geom = dynamic_cast (hgeom); if (!geom) return; INDEX_2_HASHTABLE singedges(mesh.GetNSeg()); SelectSingularEdges (mesh, *geom, singedges, opt); //MakePrismsSingEdge (mesh, singedges); MakePrismsClosePoints (mesh); RefinePrisms (mesh, geom, opt); } ZRefinementOptions :: ZRefinementOptions() { minref = 0; } } netgen-6.2.1804/libsrc/csg/algprim.cpp0000644000175000017500000012740113272137567016203 0ustar kurtkurt#include #include #include namespace netgen { double QuadraticSurface :: CalcFunctionValue (const Point<3> & p) const { return p(0) * (cxx * p(0) + cxy * p(1) + cxz * p(2) + cx) + p(1) * (cyy * p(1) + cyz * p(2) + cy) + p(2) * (czz * p(2) + cz) + c1; } void QuadraticSurface :: CalcGradient (const Point<3> & p, Vec<3> & grad) const { grad(0) = 2 * cxx * p(0) + cxy * p(1) + cxz * p(2) + cx; grad(1) = 2 * cyy * p(1) + cxy * p(0) + cyz * p(2) + cy; grad(2) = 2 * czz * p(2) + cxz * p(0) + cyz * p(1) + cz; } void QuadraticSurface :: CalcHesse (const Point<3> & /* p */, Mat<3> & hesse) const { hesse(0,0) = 2 * cxx; hesse(1,1) = 2 * cyy; hesse(2,2) = 2 * czz; hesse(0,1) = hesse(1,0) = cxy; hesse(0,2) = hesse(2,0) = cxz; hesse(1,2) = hesse(2,1) = cyz; } void QuadraticSurface :: Read (istream & ist) { ist >> cxx >> cyy >> czz >> cxy >> cxz >> cyz >> cx >> cy >> cz >> c1; } void QuadraticSurface :: Print (ostream & ost) const { ost << cxx << " " << cyy << " " << czz << " " << cxy << " " << cxz << " " << cyz << " " << cx << " " << cy << " " << cz << " " << c1; } void QuadraticSurface :: PrintCoeff (ostream & ost) const { ost << " cxx = " << cxx << " cyy = " << cyy << " czz = " << czz << " cxy = " << cxy << " cxz = " << cxz << " cyz = " << cyz << " cx = " << cx << " cy = " << cy << " cz = " << cz << " c1 = " << c1 << endl; } Point<3> QuadraticSurface :: GetSurfacePoint () const { MyError ("GetSurfacePoint called for QuadraticSurface"); return Point<3> (0, 0, 0); } Plane :: Plane (const Point<3> & ap, Vec<3> an) { eps_base = 1e-8; p = ap; n = an; CalcData(); } void Plane :: CalcData() { n.Normalize(); cxx = cyy = czz = cxy = cxz = cyz = 0; cx = n(0); cy = n(1); cz = n(2); c1 = - (cx * p(0) + cy * p(1) + cz * p(2)); } Primitive * Plane :: Copy () const { return new Plane (p, n); } void Plane :: Print (ostream & ost) const { ost << "plane(" << p << "; " << n << ")"; } void Plane :: Transform (Transformation<3> & trans) { Point<3> hp; Vec<3> hn; trans.Transform (p, hp); trans.Transform (n, hn); p = hp; n = hn; CalcData(); } void Plane :: GetPrimitiveData (const char *& classname, Array & coeffs) const { classname = "plane"; coeffs.SetSize (6); coeffs.Elem(1) = p(0); coeffs.Elem(2) = p(1); coeffs.Elem(3) = p(2); coeffs.Elem(4) = n(0); coeffs.Elem(5) = n(1); coeffs.Elem(6) = n(2); } void Plane :: SetPrimitiveData (Array & coeffs) { p(0) = coeffs.Elem(1); p(1) = coeffs.Elem(2); p(2) = coeffs.Elem(3); n(0) = coeffs.Elem(4); n(1) = coeffs.Elem(5); n(2) = coeffs.Elem(6); CalcData(); } Primitive * Plane :: CreateDefault () { return new Plane (Point<3> (0,0,0), Vec<3> (0,0,1)); } int Plane :: IsIdentic (const Surface & s2, int & inv, double eps) const { const Plane * ps2 = dynamic_cast(&s2); if(ps2) { Point<3> pp2 = ps2->GetSurfacePoint(); Vec<3> n2 = s2.GetNormalVector(pp2); if(fabs(n*n2) < 1.-eps_base) return 0; if (fabs (s2.CalcFunctionValue(p)) > eps) return 0; } else { if (fabs (s2.CalcFunctionValue(p)) > eps) return 0; Vec<3> hv1, hv2; hv1 = n.GetNormal (); hv2 = Cross (n, hv1); Point<3> hp = p + hv1; if (fabs (s2.CalcFunctionValue(hp)) > eps) return 0; hp = p + hv2; if (fabs (s2.CalcFunctionValue(hp)) > eps) return 0; } Vec<3> n1, n2; n1 = GetNormalVector (p); n2 = s2.GetNormalVector (p); inv = (n1 * n2 < 0); return 1; } void Plane :: DefineTangentialPlane (const Point<3> & ap1, const Point<3> & ap2) { Surface::DefineTangentialPlane (ap1, ap2); } void Plane :: ToPlane (const Point<3> & p3d, Point<2> & pplane, double h, int & zone) const { Vec<3> p1p; p1p = p3d - p1; p1p /= h; pplane(0) = p1p * ex; pplane(1) = p1p * ey; zone = 0; } void Plane :: FromPlane (const Point<2> & pplane, Point<3> & p3d, double h) const { p3d = p1 + (h * pplane(0)) * ex + (h * pplane(1)) * ey; } void Plane :: Project (Point<3> & p3d) const { double val = Plane::CalcFunctionValue (p3d); p3d -= val * n; } INSOLID_TYPE Plane :: BoxInSolid (const BoxSphere<3> & box) const { int i; double val; Point<3> pp; val = Plane::CalcFunctionValue (box.Center()); if (val > box.Diam() / 2) return IS_OUTSIDE; if (val < -box.Diam() / 2) return IS_INSIDE; if (val > 0) { /* double modify = ((box.MaxX()-box.MinX()) * fabs (cx) + (box.MaxY()-box.MinY()) * fabs (cy) + (box.MaxZ()-box.MinZ()) * fabs (cz)) / 2; */ Vec<3> vdiag = box.PMax() - box.PMin(); double modify = (vdiag(0) * fabs (cx) + vdiag(1) * fabs (cy) + vdiag(2) * fabs (cz) ) / 2; if (val - modify < 0) return DOES_INTERSECT; return IS_OUTSIDE; // only outside or intersect possible for (i = 0; i < 8; i++) { pp = box.GetPointNr (i); val = Plane::CalcFunctionValue (pp); if (val < 0) return DOES_INTERSECT; } return IS_OUTSIDE; } else { /* double modify = ((box.MaxX()-box.MinX()) * fabs (cx) + (box.MaxY()-box.MinY()) * fabs (cy) + (box.MaxZ()-box.MinZ()) * fabs (cz)) / 2; */ Vec<3> vdiag = box.PMax() - box.PMin(); double modify = (vdiag(0) * fabs (cx) + vdiag(1) * fabs (cy) + vdiag(2) * fabs (cz) ) / 2; if (val + modify > 0) return DOES_INTERSECT; return IS_INSIDE; // only inside or intersect possible for (i = 0; i < 8; i++) { pp = box.GetPointNr (i); val = Plane::CalcFunctionValue (pp); if (val > 0) return DOES_INTERSECT; } return IS_INSIDE; } /* for (i = 1; i <= 8; i++) { box.GetPointNr (i, p); val = CalcFunctionValue (p); if (val > 0) inside = 0; if (val < 0) outside = 0; } if (inside) return IS_INSIDE; if (outside) return IS_OUTSIDE; return DOES_INTERSECT; */ } // double Plane :: CalcFunctionValue (const Point<3> & p3d) const // { // return cx * p3d(0) + cy * p3d(1) + cz * p3d(2) + c1; // } void Plane :: CalcGradient (const Point<3> & /* p */, Vec<3> & grad) const { grad(0) = cx; grad(1) = cy; grad(2) = cz; } void Plane :: CalcHesse (const Point<3> & /* p */, Mat<3> & hesse) const { hesse = 0; } double Plane :: HesseNorm () const { return 0; } Point<3> Plane :: GetSurfacePoint () const { return p; } void Plane :: GetTriangleApproximation (TriangleApproximation & tas, const Box<3> & boundingbox, double /* facets */) const { // find triangle, such that // boundingbox \cap plane is contained in it Point<3> c = boundingbox.Center(); double r = boundingbox.Diam(); Project (c); Vec<3> t1 = n.GetNormal(); Vec<3> t2 = Cross (n, t1); t1.Normalize(); t2.Normalize(); tas.AddPoint (c + (-0.5 * r) * t2 + (sqrt(0.75) * r) * t1); tas.AddPoint (c + (-0.5 * r) * t2 + (-sqrt(0.75) * r) * t1); tas.AddPoint (c + r * t2); tas.AddTriangle (TATriangle (0, 0, 1, 2)); } Sphere :: Sphere (const Point<3> & ac, double ar) { c = ac; r = ar; invr = 1.0/r; cxx = cyy = czz = 0.5 / r; cxy = cxz = cyz = 0; cx = - c(0) / r; cy = - c(1) / r; cz = - c(2) / r; c1 = (c(0) * c(0) + c(1) * c(1) + c(2) * c(2)) / (2 * r) - r / 2; } void Sphere :: GetPrimitiveData (const char *& classname, Array & coeffs) const { classname = "sphere"; coeffs.SetSize (4); coeffs.Elem(1) = c(0); coeffs.Elem(2) = c(1); coeffs.Elem(3) = c(2); coeffs.Elem(4) = r; } void Sphere :: SetPrimitiveData (Array & coeffs) { c(0) = coeffs.Elem(1); c(1) = coeffs.Elem(2); c(2) = coeffs.Elem(3); r = coeffs.Elem(4); invr = 1.0/r; cxx = cyy = czz = 0.5 / r; cxy = cxz = cyz = 0; cx = - c(0) / r; cy = - c(1) / r; cz = - c(2) / r; c1 = (c(0) * c(0) + c(1) * c(1) + c(2) * c(2)) / (2 * r) - r / 2; } Primitive * Sphere :: CreateDefault () { return new Sphere (Point<3> (0,0,0), 1); } Primitive * Sphere :: Copy () const { return new Sphere (c, r); } void Sphere :: Transform (Transformation<3> & trans) { Point<3> hp; trans.Transform (c, hp); c = hp; cxx = cyy = czz = 0.5 / r; cxy = cxz = cyz = 0; cx = - c(0) / r; cy = - c(1) / r; cz = - c(2) / r; c1 = (c(0) * c(0) + c(1) * c(1) + c(2) * c(2)) / (2 * r) - r / 2; } double Sphere :: CalcFunctionValue (const Point<3> & point) const { return 0.5* (invr * Abs2 (point-c) - r); } int Sphere :: IsIdentic (const Surface & s2, int & inv, double eps) const { const Sphere * sp2 = dynamic_cast (&s2); if (!sp2) return 0; if (Dist (sp2->c, c) > eps) return 0; if (fabs (sp2->r - r) > eps) return 0; inv = 0; return 1; } void Sphere :: DefineTangentialPlane (const Point<3> & ap1, const Point<3> & ap2) { Surface::DefineTangentialPlane (ap1, ap2); ez = p1 - c; ez /= ez.Length(); ex = p2 - p1; ex -= (ex * ez) * ez; ex /= ex.Length(); ey = Cross (ez, ex); } void Sphere :: ToPlane (const Point<3> & p, Point<2> & pplane, double h, int & zone) const { Vec<3> p1p; p1p = p - p1; /* if (p1p * ez < -r) { zone = -1; pplane = Point<2> (1E8, 1E8); } else { zone = 0; p1p /= h; pplane(0) = p1p * ex; pplane(1) = p1p * ey; } */ Point<3> p1top = c + (c - p1); Vec<3> p1topp = p - p1top; Vec<3> p1topp1 = p1 - p1top; Vec<3> lam; // SolveLinearSystem (ex, ey, p1topp, p1topp1, lam); Mat<3> m; for (int i = 0; i < 3; i++) { m(i, 0) = ex(i); m(i, 1) = ey(i); m(i, 2) = p1topp(i); } m.Solve (p1topp1, lam); pplane(0) = -lam(0) / h; pplane(1) = -lam(1) / h; if (lam(2) > 2) zone = -1; else zone = 0; } void Sphere :: FromPlane (const Point<2> & pplane, Point<3> & p, double h) const { /* // Vec<3> p1p; double z; Point<2> pplane2 (pplane); pplane2(0) *= h; pplane2(1) *= h; z = -r + sqrt (sqr (r) - sqr (pplane2(0)) - sqr (pplane2(1))); // p = p1; p(0) = p1(0) + pplane2(0) * ex(0) + pplane2(1) * ey(0) + z * ez(0); p(1) = p1(1) + pplane2(0) * ex(1) + pplane2(1) * ey(1) + z * ez(1); p(2) = p1(2) + pplane2(0) * ex(2) + pplane2(1) * ey(2) + z * ez(2); */ Point<2> pplane2 (pplane); pplane2(0) *= h; pplane2(1) *= h; p(0) = p1(0) + pplane2(0) * ex(0) + pplane2(1) * ey(0); p(1) = p1(1) + pplane2(0) * ex(1) + pplane2(1) * ey(1); p(2) = p1(2) + pplane2(0) * ex(2) + pplane2(1) * ey(2); Project (p); } void Sphere :: Project (Point<3> & p) const { Vec<3> v; v = p - c; v *= (r / v.Length()); p = c + v; } INSOLID_TYPE Sphere :: BoxInSolid (const BoxSphere<3> & box) const { double dist; dist = Dist (box.Center(), c); if (dist - box.Diam()/2 > r) return IS_OUTSIDE; if (dist + box.Diam()/2 < r) return IS_INSIDE; return DOES_INTERSECT; } double Sphere :: HesseNorm () const { return 2 / r; } Point<3> Sphere :: GetSurfacePoint () const { return c + Vec<3> (r, 0, 0); } void Sphere :: GetTriangleApproximation (TriangleApproximation & tas, const Box<3> & /* boundingbox */, double facets) const { int n = int(facets) + 1; for (int j = 0; j <= n; j++) for (int i = 0; i <= n; i++) { double lg = 2 * M_PI * double (i) / n; double bg = M_PI * (double(j) / n - 0.5); Point<3> p(c(0) + r * cos(bg) * sin (lg), c(1) + r * cos(bg) * cos (lg), c(2) + r * sin(bg)); tas.AddPoint (p); } for (int j = 0; j < n; j++) for (int i = 0; i < n; i++) { int pi = i + (n+1) * j; tas.AddTriangle (TATriangle (0, pi, pi+1, pi+n+2)); tas.AddTriangle (TATriangle (0, pi, pi+n+2, pi+n+1)); } } Ellipsoid :: Ellipsoid (const Point<3> & aa, const Vec<3> & av1, const Vec<3> & av2, const Vec<3> & av3) { a = aa; v1 = av1; v2 = av2; v3 = av3; CalcData(); } void Ellipsoid :: CalcData () { // f = (x-a, vl)^2 / |vl|^2 + (x-a, vs)^2 / |vs|^2 -1 // f = sum_{i=1}^3 (x-a,v_i)^2 / |vi|^4 - 1 = sum (x-a,hv_i)^2 Vec<3> hv1, hv2, hv3; double lv1 = v1.Length2 (); if (lv1 < 1e-32) lv1 = 1; double lv2 = v2.Length2 (); if (lv2 < 1e-32) lv2 = 1; double lv3 = v3.Length2 (); if (lv3 < 1e-32) lv3 = 1; rmin = sqrt (min3 (lv1, lv2, lv3)); hv1 = (1.0 / lv1) * v1; hv2 = (1.0 / lv2) * v2; hv3 = (1.0 / lv3) * v3; cxx = hv1(0) * hv1(0) + hv2(0) * hv2(0) + hv3(0) * hv3(0); cyy = hv1(1) * hv1(1) + hv2(1) * hv2(1) + hv3(1) * hv3(1); czz = hv1(2) * hv1(2) + hv2(2) * hv2(2) + hv3(2) * hv3(2); cxy = 2 * (hv1(0) * hv1(1) + hv2(0) * hv2(1) + hv3(0) * hv3(1)); cxz = 2 * (hv1(0) * hv1(2) + hv2(0) * hv2(2) + hv3(0) * hv3(2)); cyz = 2 * (hv1(1) * hv1(2) + hv2(1) * hv2(2) + hv3(1) * hv3(2)); Vec<3> va (a); c1 = sqr(va * hv1) + sqr(va * hv2) + sqr(va * hv3) - 1; Vec<3> v = -2 * (va * hv1) * hv1 - 2 * (va * hv2) * hv2 - 2 * (va * hv3) * hv3; cx = v(0); cy = v(1); cz = v(2); } INSOLID_TYPE Ellipsoid :: BoxInSolid (const BoxSphere<3> & box) const { // double grad = 2.0 / rmin; // double grad = 3*(box.Center()-a).Length() / (rmin*rmin*rmin); double ggrad = 1.0 / (rmin*rmin); Vec<3> g; double val = CalcFunctionValue (box.Center()); CalcGradient (box.Center(), g); double grad = g.Length(); double r = box.Diam() / 2; double maxval = grad * r + ggrad * r * r; // (*testout) << "box = " << box << ", val = " << val << ", maxval = " << maxval << endl; if (val > maxval) return IS_OUTSIDE; if (val < -maxval) return IS_INSIDE; return DOES_INTERSECT; } double Ellipsoid :: HesseNorm () const { return 1.0/ (rmin * rmin); } double Ellipsoid :: MaxCurvature () const { const double a2 = v1.Length2(); const double b2 = v2.Length2(); const double c2 = v3.Length2(); return max3 ( sqrt(a2)/min2(b2,c2), sqrt(b2)/min2(a2,c2), sqrt(c2)/min2(a2,b2) ); } Point<3> Ellipsoid :: GetSurfacePoint () const { return a + v1; } void Ellipsoid :: GetTriangleApproximation (TriangleApproximation & tas, const Box<3> & /* boundingbox */, double facets) const { int n = int(facets) + 1; for (int j = 0; j <= n; j++) for (int i = 0; i <= n; i++) { double lg = 2 * M_PI * double (i) / n; double bg = M_PI * (double(j) / n - 0.5); Point<3> p(a + sin (bg) * v1 + cos (bg) * sin (lg) * v2 + cos (bg) * cos (lg) * v3); tas.AddPoint (p); } for (int j = 0; j < n; j++) for (int i = 0; i < n; i++) { int pi = i + (n+1) * j; tas.AddTriangle (TATriangle (0, pi, pi+1, pi+n+2)); tas.AddTriangle (TATriangle (0, pi, pi+n+2, pi+n+1)); } } Cylinder :: Cylinder (Array & coeffs) { SetPrimitiveData(coeffs); } Cylinder :: Cylinder (const Point<3> & aa, const Point<3> & ab, double ar) { a = aa; b = ab; vab = (b - a); vab /= vab.Length(); r = ar; // ( - 2 + // - ^2 + 2 - ^2 // - r^2) / (2r) = 0 double hv; cxx = cyy = czz = 0.5 / r; cxy = cxz = cyz = 0; cx = - a(0) / r; cy = - a(1) / r; cz = - a(2) / r; c1 = (a(0) * a(0) + a(1) * a(1) + a(2) * a(2)) / (2 * r); hv = a(0) * vab(0) + a(1) * vab(1) + a(2) * vab(2); cxx -= vab(0) * vab(0) / (2 * r); cyy -= vab(1) * vab(1) / (2 * r); czz -= vab(2) * vab(2) / (2 * r); cxy -= vab(0) * vab(1) / r; cxz -= vab(0) * vab(2) / r; cyz -= vab(1) * vab(2) / r; cx += vab(0) * hv / r; cy += vab(1) * hv / r; cz += vab(2) * hv / r; c1 -= hv * hv / (2 * r); c1 -= r / 2; // PrintCoeff (); } void Cylinder :: GetPrimitiveData (const char *& classname, Array & coeffs) const { classname = "cylinder"; coeffs.SetSize (7); coeffs.Elem(1) = a(0); coeffs.Elem(2) = a(1); coeffs.Elem(3) = a(2); coeffs.Elem(4) = b(0); coeffs.Elem(5) = b(1); coeffs.Elem(6) = b(2); coeffs.Elem(7) = r; } void Cylinder :: SetPrimitiveData (Array & coeffs) { a(0) = coeffs.Elem(1); a(1) = coeffs.Elem(2); a(2) = coeffs.Elem(3); b(0) = coeffs.Elem(4); b(1) = coeffs.Elem(5); b(2) = coeffs.Elem(6); r = coeffs.Elem(7); vab = (b - a); vab /= vab.Length(); double hv; cxx = cyy = czz = 0.5 / r; cxy = cxz = cyz = 0; cx = - a(0) / r; cy = - a(1) / r; cz = - a(2) / r; c1 = (a(0) * a(0) + a(1) * a(1) + a(2) * a(2)) / (2 * r); hv = a(0) * vab(0) + a(1) * vab(1) + a(2) * vab(2); cxx -= vab(0) * vab(0) / (2 * r); cyy -= vab(1) * vab(1) / (2 * r); czz -= vab(2) * vab(2) / (2 * r); cxy -= vab(0) * vab(1) / r; cxz -= vab(0) * vab(2) / r; cyz -= vab(1) * vab(2) / r; cx += vab(0) * hv / r; cy += vab(1) * hv / r; cz += vab(2) * hv / r; c1 -= hv * hv / (2 * r); c1 -= r / 2; } Primitive * Cylinder :: CreateDefault () { return new Cylinder (Point<3> (0,0,0), Point<3> (1,0,0), 1); } Primitive * Cylinder :: Copy () const { return new Cylinder (a, b, r); } void Cylinder :: Print (ostream & ost) const { ost << "cylinder(" << a << "; " << b << "; " << r << ")"; } int Cylinder :: IsIdentic (const Surface & s2, int & inv, double eps) const { const Cylinder * cyl2 = dynamic_cast (&s2); if (!cyl2) return 0; if (fabs (cyl2->r - r) > eps) return 0; Vec<3> v1 = b - a; Vec<3> v2 = cyl2->a - a; if ( fabs (v1 * v2) < (1-eps) * v1.Length() * v2.Length()) return 0; v2 = cyl2->b - a; if ( fabs (v1 * v2) < (1-eps) * v1.Length() * v2.Length()) return 0; inv = 0; return 1; } void Cylinder :: Transform (Transformation<3> & trans) { Point<3> hp; trans.Transform (a, hp); a = hp; trans.Transform (b, hp); b = hp; vab = (b - a); vab /= vab.Length(); // ( - 2 + // - ^2 + 2 - ^2 // - r^2) / (2r) = 0 double hv; cxx = cyy = czz = 0.5 / r; cxy = cxz = cyz = 0; cx = - a(0) / r; cy = - a(1) / r; cz = - a(2) / r; c1 = (a(0) * a(0) + a(1) * a(1) + a(2) * a(2)) / (2 * r); hv = a(0) * vab(0) + a(1) * vab(1) + a(2) * vab(2); cxx -= vab(0) * vab(0) / (2 * r); cyy -= vab(1) * vab(1) / (2 * r); czz -= vab(2) * vab(2) / (2 * r); cxy -= vab(0) * vab(1) / r; cxz -= vab(0) * vab(2) / r; cyz -= vab(1) * vab(2) / r; cx += vab(0) * hv / r; cy += vab(1) * hv / r; cz += vab(2) * hv / r; c1 -= hv * hv / (2 * r); c1 -= r / 2; // PrintCoeff (); } void Cylinder :: DefineTangentialPlane (const Point<3> & ap1, const Point<3> & ap2) { Surface::DefineTangentialPlane (ap1, ap2); ez = Center (p1, p2) - a; ez -= (ez * vab) * vab; ez /= ez.Length(); ex = p2 - p1; ex -= (ex * ez) * ez; ex /= ex.Length(); ey = Cross (ez, ex); } void Cylinder :: ToPlane (const Point<3> & p, Point<2> & pplane, double h, int & zone) const { Point<3> cp1p2 = Center (p1, p2); Project (cp1p2); Point<3> ccp1p2 = a + ( (cp1p2 - a) * vab ) * vab; Vec<3> er = cp1p2 - ccp1p2; er.Normalize(); Vec<3> ephi = Cross (vab, er); double co, si; Point<2> p1p, p2p, pp; co = er * (p1 - ccp1p2); si = ephi * (p1 - ccp1p2); p1p(0) = r * atan2 (si, co); p1p(1) = vab * (p1 - ccp1p2); co = er * (p2 - ccp1p2); si = ephi * (p2 - ccp1p2); p2p(0) = r * atan2 (si, co); p2p(1) = vab * (p2 - ccp1p2); co = er * (p - ccp1p2); si = ephi * (p - ccp1p2); double phi = atan2 (si, co); pp(0) = r * phi; pp(1) = vab * (p - ccp1p2); zone = 0; if (phi > 1.57) zone = 1; if (phi < -1.57) zone = 2; Vec<2> e2x = p2p - p1p; e2x /= e2x.Length(); Vec<2> e2y (-e2x(1), e2x(0)); Vec<2> p1pp = pp - p1p; pplane(0) = (p1pp * e2x) / h; pplane(1) = (p1pp * e2y) / h; /* (*testout) << "p1 = " << p1 << ", p2 = " << p2 << endl; (*testout) << "p = " << p << ", pp = " << pp << ", pplane = " << pplane << endl; */ /* Vec<3> p1p; p1p = p - p1; if (p1p * ez < -1 * r) { zone = -1; pplane(0) = 1e8; pplane(1) = 1e8; } else { zone = 0; p1p /= h; pplane(0) = p1p * ex; pplane(1) = p1p * ey; } */ } void Cylinder :: FromPlane (const Point<2> & pplane, Point<3> & p, double h) const { Point<2> pplane2 (pplane); pplane2(0) *= h; pplane2(1) *= h; p(0) = p1(0) + pplane2(0) * ex(0) + pplane2(1) * ey(0); p(1) = p1(1) + pplane2(0) * ex(1) + pplane2(1) * ey(1); p(2) = p1(2) + pplane2(0) * ex(2) + pplane2(1) * ey(2); Project (p); } void Cylinder :: Project (Point<3> & p) const { Vec<3> v; Point<3> c; c = a + ((p - a) * vab) * vab; v = p - c; v *= (r / v.Length()); p = c + v; } /* int Cylinder :: RootInBox (const BoxSphere<3> & box) const { double dist; dist = sqrt (2 * CalcFunctionValue(box.Center()) * r + r * r); if (fabs (dist - r) > box.Diam()/2) return 0; return 2; } */ INSOLID_TYPE Cylinder :: BoxInSolid (const BoxSphere<3> & box) const { double dist; // dist = sqrt (2 * CalcFunctionValue(box.Center()) * r + r * r); dist = (2 * CalcFunctionValue(box.Center()) * r + r * r); if (dist <= 0) dist = 0; else dist = sqrt (dist + 1e-16); if (dist - box.Diam()/2 > r) return IS_OUTSIDE; if (dist + box.Diam()/2 < r) return IS_INSIDE; return DOES_INTERSECT; } double Cylinder :: HesseNorm () const { return 2 / r; } Point<3> Cylinder :: GetSurfacePoint () const { Vec<3> vr; if (fabs (vab(0)) > fabs(vab(2))) vr = Vec<3> (vab(1), -vab(0), 0); else vr = Vec<3> (0, -vab(2), vab(1)); vr *= (r / vr.Length()); return a + vr; } void Cylinder :: GetTriangleApproximation (TriangleApproximation & tas, const Box<3> & /* boundingbox */, double facets) const { int n = int(facets) + 1; Vec<3> lvab = b - a; Vec<3> n1 = lvab.GetNormal(); Vec<3> n2 = Cross (lvab, n1); n1.Normalize(); n2.Normalize(); for (int j = 0; j <= n; j++) for (int i = 0; i <= n; i++) { double lg = 2 * M_PI * double (i) / n; double bg = double(j) / n; Point<3> p = a + (bg * lvab) + ((r * cos(lg)) * n1) + ((r * sin(lg)) * n2); tas.AddPoint (p); } for (int j = 0; j < n; j++) for (int i = 0; i < n; i++) { int pi = i + (n+1) * j; tas.AddTriangle (TATriangle (0, pi, pi+1, pi+n+2)); tas.AddTriangle (TATriangle (0, pi, pi+n+2, pi+n+1)); } } EllipticCylinder :: EllipticCylinder (const Point<3> & aa, const Vec<3> & avl, const Vec<3> & avs) { a = aa; if(avl.Length2() > avs.Length2()) { vl = avl; vs = avs; } else { vl = avs; vs = avl; } CalcData(); } EllipticCylinder :: EllipticCylinder (Array & coeffs) { SetPrimitiveData(coeffs); } void EllipticCylinder :: GetPrimitiveData (const char *& classname, Array & coeffs) const { classname = "ellipticcylinder"; coeffs.SetSize (9); coeffs[0] = a(0); coeffs[1] = a(1); coeffs[2] = a(2); coeffs[3] = vl(0); coeffs[4] = vl(1); coeffs[5] = vl(2); coeffs[6] = vs(0); coeffs[7] = vs(1); coeffs[8] = vs(2); } void EllipticCylinder :: SetPrimitiveData (Array & coeffs) { a(0) = coeffs[0]; a(1) = coeffs[1]; a(2) = coeffs[2]; vl(0) = coeffs[3]; vl(1) = coeffs[4]; vl(2) = coeffs[5]; vs(0) = coeffs[6]; vs(1) = coeffs[7]; vs(2) = coeffs[8]; CalcData(); } void EllipticCylinder :: CalcData () { // f = (x-a, vl)^2 / |vl|^2 + (x-a, vs)^2 / |vs|^2 -1 Vec<3> hvl, hvs; double lvl = vl.Length2 (); if (lvl < 1e-32) lvl = 1; double lvs = vs.Length2 (); if (lvs < 1e-32) lvs = 1; hvl = (1.0 / lvl) * vl; hvs = (1.0 / lvs) * vs; cxx = hvl(0) * hvl(0) + hvs(0) * hvs(0); cyy = hvl(1) * hvl(1) + hvs(1) * hvs(1); czz = hvl(2) * hvl(2) + hvs(2) * hvs(2); cxy = 2 * (hvl(0) * hvl(1) + hvs(0) * hvs(1)); cxz = 2 * (hvl(0) * hvl(2) + hvs(0) * hvs(2)); cyz = 2 * (hvl(1) * hvl(2) + hvs(1) * hvs(2)); Vec<3> va (a); c1 = pow(va * hvl,2) + pow(va * hvs,2) - 1; Vec<3> v = -2 * (va * hvl) * hvl - 2 * (va * hvs) * hvs; cx = v(0); cy = v(1); cz = v(2); } INSOLID_TYPE EllipticCylinder :: BoxInSolid (const BoxSphere<3> & box) const { double grad = 2.0 / vs.Length (); double ggrad = 1.0 / vs.Length2 (); double val = CalcFunctionValue (box.Center()); double r = box.Diam() / 2; double maxval = grad * r + ggrad * r * r; // (*testout) << "box = " << box << ", val = " << val << ", maxval = " << maxval << endl; if (val > maxval) return IS_OUTSIDE; if (val < -maxval) return IS_INSIDE; return DOES_INTERSECT; } double EllipticCylinder :: HesseNorm () const { return 1.0/min(vs.Length2 (),vl.Length2()); } double EllipticCylinder :: MaxCurvature () const { double aa = vs.Length(); double bb = vl.Length(); return max2(bb/(aa*aa),aa/(bb*bb)); } double EllipticCylinder :: MaxCurvatureLoc (const Point<3> & /* c */, double /* rad */) const { // saubere Loesung wird noch notwendig !!! double aa = vs.Length(); double bb = vl.Length(); return max2(bb/(aa*aa),aa/(bb*bb)); } Point<3> EllipticCylinder :: GetSurfacePoint () const { return a + vl; } void EllipticCylinder :: GetTriangleApproximation (TriangleApproximation & tas, const Box<3> & /* boundingbox */, double facets) const { int n = int(facets) + 1; Vec<3> axis = Cross (vl, vs); for (int j = 0; j <= n; j++) for (int i = 0; i <= n; i++) { double lg = 2 * M_PI * double (i) / n; double bg = double(j) / n; Point<3> p = a + (bg * axis) + cos(lg) * vl + sin(lg) * vs; tas.AddPoint (p); } for (int j = 0; j < n; j++) for (int i = 0; i < n; i++) { int pi = i + (n+1) * j; tas.AddTriangle (TATriangle (0, pi, pi+1, pi+n+2)); tas.AddTriangle (TATriangle (0, pi, pi+n+2, pi+n+1)); } } Cone :: Cone (const Point<3> & aa, const Point<3> & ab, double ara, double arb) { a = aa; b = ab; ra = ara; rb = arb; CalcData(); // Print (cout); } Primitive * Cone :: CreateDefault () { return new Cone (Point<3> (0,0,0), Point<3> (1,0,0), 0.5, 0.2); } void Cone :: GetPrimitiveData (const char *& classname, Array & coeffs) const { classname = "cone"; coeffs.SetSize (8); coeffs.Elem(1) = a(0); coeffs.Elem(2) = a(1); coeffs.Elem(3) = a(2); coeffs.Elem(4) = b(0); coeffs.Elem(5) = b(1); coeffs.Elem(6) = b(2); coeffs.Elem(7) = ra; coeffs.Elem(8) = rb; } void Cone :: SetPrimitiveData (Array & coeffs) { a(0) = coeffs.Elem(1); a(1) = coeffs.Elem(2); a(2) = coeffs.Elem(3); b(0) = coeffs.Elem(4); b(1) = coeffs.Elem(5); b(2) = coeffs.Elem(6); ra = coeffs.Elem(7); rb = coeffs.Elem(8); CalcData(); } void Cone :: CalcData () { minr = (ra < rb) ? ra : rb; vab = b - a; vabl = vab.Length(); Vec<3> va (a); // // f = r(P)^2 - R(z(P))^2 // // z(P) = t0vec * P + t0 = (P-a, b-a)/(b-a,b-a) // R(z(P)) = t1vec * P + t1 = rb * z + ra * (1-z) // r(P)^2 =||P-a||^2 - ||a-b||^2 z^2k cosphi = vabl / sqrt (vabl*vabl+sqr(ra-rb)); t0vec = vab; t0vec /= (vabl * vabl); t0 = -(va * vab) / (vabl * vabl); t1vec = t0vec; t1vec *= (rb - ra); t1 = ra + (rb - ra) * t0; cxx = cyy = czz = 1; cxy = cxz = cyz = 0; cxx = 1 - (vab*vab) * t0vec(0) * t0vec(0) - t1vec(0) * t1vec(0); cyy = 1 - (vab*vab) * t0vec(1) * t0vec(1) - t1vec(1) * t1vec(1); czz = 1 - (vab*vab) * t0vec(2) * t0vec(2) - t1vec(2) * t1vec(2); cxy = -2 * (vab * vab) * t0vec(0) * t0vec(1) - 2 * t1vec(0) * t1vec(1); cxz = -2 * (vab * vab) * t0vec(0) * t0vec(2) - 2 * t1vec(0) * t1vec(2); cyz = -2 * (vab * vab) * t0vec(1) * t0vec(2) - 2 * t1vec(1) * t1vec(2); cx = -2 * a(0) - 2 * (vab * vab) * t0 * t0vec(0) - 2 * t1 * t1vec(0); cy = -2 * a(1) - 2 * (vab * vab) * t0 * t0vec(1) - 2 * t1 * t1vec(1); cz = -2 * a(2) - 2 * (vab * vab) * t0 * t0vec(2) - 2 * t1 * t1vec(2); c1 = va.Length2() - (vab * vab) * t0 * t0 - t1 * t1; double maxr = max2(ra,rb); cxx /= maxr; cyy /= maxr; czz /= maxr; cxy /= maxr; cxz /= maxr; cyz /= maxr; cx /= maxr; cy /= maxr; cz /= maxr; c1 /= maxr; // (*testout) << "t0vec = " << t0vec << " t0 = " << t0 << endl; // (*testout) << "t1vec = " << t1vec << " t1 = " << t1 << endl; // PrintCoeff (*testout); } INSOLID_TYPE Cone :: BoxInSolid (const BoxSphere<3> & box) const { Vec<3> cv(box.Center()); double rzp = cv * t1vec + t1; double dist = sqrt (CalcFunctionValue(box.Center()) *max2(ra,rb) + rzp * rzp) - rzp; dist *= cosphi; INSOLID_TYPE res = DOES_INTERSECT; if (dist - box.Diam() > 0) res = IS_OUTSIDE; if (dist + box.Diam() < 0) res = IS_INSIDE; return res; } double Cone :: HesseNorm () const { // cout << "2/minr = " << 2/minr << ", cxx .. = " << cxx << ", " << cyy << ", " << czz << endl; return 2 / minr; } double Cone :: LocH (const Point<3> & p, double /* x */, double /* c */, const MeshingParameters & mparam, double hmax) const { //double bloch = Surface::LocH (p, x, c, hmax); Vec<3> g; CalcGradient (p, g); double lam = Abs(g); double meancurv = -( 2 * g(0)*g(1)*cxy - 2 * czz * (g(0)*g(0)+g(1)*g(1)) +2 * g(1)*g(2)*cyz - 2 * cxx * (g(1)*g(1)+g(2)*g(2)) +2 * g(0)*g(2)*cxz - 2 * cyy * (g(0)*g(0)+g(2)*g(2))) / (3*lam*lam*lam); // cout << "type = " << typeid(*this).name() << ", baseh = " << bloch << ", meancurv = " << meancurv << endl; // return bloch; meancurv = fabs (meancurv); if (meancurv < 1e-20) meancurv = 1e-20; // cout << "c = " << c << ", safety = " << mparam.curvaturesafety << endl; double hcurv = 1.0/(4*meancurv*mparam.curvaturesafety); return min2 (hmax, hcurv); } Point<3> Cone :: GetSurfacePoint () const { Vec<3> vr = vab.GetNormal (); vr *= (ra / vr.Length()); return a + vr; } void Cone :: GetTriangleApproximation (TriangleApproximation & tas, const Box<3> & /* boundingbox */, double facets) const { int i, j; double lg, bg; int n = int(facets) + 1; Vec<3> lvab = b - a; Vec<3> n1 = lvab.GetNormal(); Vec<3> n2 = Cross (lvab, n1); n1.Normalize(); n2.Normalize(); for (j = 0; j <= n; j++) for (i = 0; i <= n; i++) { lg = 2 * M_PI * double (i) / n; bg = double(j) / n; Point<3> p = a + (bg * lvab) + (( (ra+(rb-ra)*bg) * cos(lg)) * n1) + (( (ra+(rb-ra)*bg) * sin(lg)) * n2); tas.AddPoint (p); } for (j = 0; j < n; j++) for (i = 0; i < n; i++) { int pi = i + (n+1) * j; tas.AddTriangle (TATriangle (0, pi, pi+1, pi+n+2)); tas.AddTriangle (TATriangle (0, pi, pi+n+2, pi+n+1)); } } /// Elliptic Cone /// Josephat Kalezhi (kalezhi@cbu.ac.zm) /// February 21st, 2018 /// EllipticCone :: EllipticCone (const Point<3> & aa, const Vec<3> & avl, const Vec<3> & avs, double ah, double avlr) { a = aa; h = ah; vlr = avlr; if (avl.Length2() >= avs.Length2()) { vl = avl; vs = avs; } else { vl = avs; vs = avl; } CalcData(); // Print (cout); } Primitive * EllipticCone :: CreateDefault () { return new EllipticCone (Point<3> (0,0,0), Vec<3> (1,0,0), Vec<3> (0,1,0), 1, 0.5); } void EllipticCone :: GetPrimitiveData (const char *& classname, Array & coeffs) const { classname = "ellipticcone"; coeffs.SetSize (15); coeffs.Elem(1) = a(0); coeffs.Elem(2) = a(1); coeffs.Elem(3) = a(2); coeffs.Elem(4) = vl(0); coeffs.Elem(5) = vl(1); coeffs.Elem(6) = vl(2); coeffs.Elem(7) = vs(0); coeffs.Elem(8) = vs(1); coeffs.Elem(9) = vs(2); coeffs.Elem(10) = h; coeffs.Elem(11) = vlr; } void EllipticCone :: SetPrimitiveData (Array & coeffs) { a(0) = coeffs.Elem(1); a(1) = coeffs.Elem(2); a(2) = coeffs.Elem(3); vl(0) = coeffs.Elem(4); vl(1) = coeffs.Elem(5); vl(2) = coeffs.Elem(6); vs(0) = coeffs.Elem(7); vs(1) = coeffs.Elem(8); vs(2) = coeffs.Elem(9); h = coeffs.Elem(10); vlr = coeffs.Elem(11); CalcData(); } void EllipticCone :: CalcData () { Vec<3> nh = Cross(vl, vs); nh.Normalize(); double lvl = vl.Length(); double lvs = vs.Length(); Vec<3> t1vec = lvl*(vlr -1)*(1/h)*nh; Vec<3> va (a); double t1 = lvl*(1 - (vlr -1)*(1/h)*(va*nh)); Vec<3> nvl = (1.0/lvl)*vl; Vec<3> nvs = (1.0/lvs)*vs; double ellipt2 = sqr(lvl/lvs); cxx = nvl(0)*nvl(0) + ellipt2*nvs(0)*nvs(0) - t1vec(0)*t1vec(0); cyy = nvl(1)*nvl(1) + ellipt2*nvs(1)*nvs(1) - t1vec(1)*t1vec(1); czz = nvl(2)*nvl(2) + ellipt2*nvs(2)*nvs(2) - t1vec(2)*t1vec(2); cxy = 2*(nvl(0)*nvl(1) + ellipt2*nvs(0)*nvs(1) - t1vec(0)*t1vec(1)); cxz = 2*(nvl(0)*nvl(2) + ellipt2*nvs(0)*nvs(2) - t1vec(0)*t1vec(2)); cyz = 2*(nvl(1)*nvl(2) + ellipt2*nvs(1)*nvs(2) - t1vec(1)*t1vec(2)); Vec<3> v = -2*((va*nvl)*nvl + ellipt2*(va*nvs)*nvs + t1*t1vec); cx = v(0); cy = v(1); cz = v(2); c1 = pow(va*nvl,2) + ellipt2*pow(va*nvs,2) - t1*t1; double lvltop = vlr*lvl; // double minlvl = (lvl < lvltop) ? lvl : lvltop; double maxlvl = max2( lvl,lvltop); cxx /= maxlvl; cyy /= maxlvl; czz /= maxlvl; cxy /= maxlvl; cxz /= maxlvl; cyz /= maxlvl; cx /= maxlvl; cy /= maxlvl; cz /= maxlvl; c1 /= maxlvl; } INSOLID_TYPE EllipticCone :: BoxInSolid (const BoxSphere<3> & box) const { double rp, dist; Vec<3> cv( box.Center()); Vec<3> nh = Cross(vl, vs); nh.Normalize(); double lvl = vl.Length(); Vec<3> t1vec = lvl*(vlr -1)*(1/h)*nh; Vec<3> va (a); double t1 = lvl*(1 - (vlr -1)*(1/h)*(va*nh)); rp = cv*t1vec + t1; double lvltop = vlr*lvl; double maxlvl = max2( lvl,lvltop); dist = sqrt( CalcFunctionValue(box.Center())*maxlvl + rp*rp) - rp; if (dist - box.Diam() > 0) return IS_OUTSIDE; if (dist + box.Diam() < 0) return IS_INSIDE; return DOES_INTERSECT; } double EllipticCone :: HesseNorm () const { return 1.0/min(vs.Length2 (),vl.Length2()); } double EllipticCone :: MaxCurvature () const { double a = vs.Length(); double b = vl.Length(); return max2(b/(a*a),a/(b*b)); } double EllipticCone :: MaxCurvatureLoc (const Point<3> & c, double rad) const { #ifdef JOACHIMxxx cout << "max curv local" << endl; return 0.02; #endif // saubere Loesung wird noch notwendig !!! double a = vs.Length(); double b = vl.Length(); return max2(b/(a*a),a/(b*b)); } Point<3> EllipticCone :: GetSurfacePoint () const { return a + vl; } void EllipticCone :: GetTriangleApproximation (TriangleApproximation & tas, const Box<3> & boundingbox, double facets) const { int i, j; double lg, bg; int n = int(facets) + 1; Vec<3> nh = Cross(vl, vs); nh.Normalize(); Vec<3> vh = h*nh; double lvl = vl.Length(); double lvs = vs.Length(); Vec<3> nvl = (1.0/lvl)*vl; Vec<3> nvs = (1.0/lvs)*vs; for ( j = 0; j <= n; j++ ) for (i = 0; i <= n; i++) { lg = 2 *M_PI * double (i) /n; bg = double(j) /n; Point<3> p = a + (bg *vh) + (( lvl*(1 + (vlr -1)*bg) * cos(lg)) * nvl) + (( lvs*(1 + (vlr -1)*bg)* sin(lg) ) * nvs); tas.AddPoint (p); } for ( j = 0; j < n; j++) for ( i = 0; i < n; i++) { int pi = i + (n+1) * j; tas.AddTriangle (TATriangle (0, pi, pi+1, pi+n+2)); tas.AddTriangle (TATriangle (0, pi, pi+n+2, pi+n+1)); } } /// Torus /// Lorenzo Codecasa (codecasa@elet.polimi.it) /// April 27th, 2005 /// Torus :: Torus (const Point<3> & ac, const Vec<3> & an, double aR, double ar) { c = ac; n = an; n.Normalize(); R = aR; r = ar; } void Torus :: GetPrimitiveData (const char *& classname, Array & coeffs) const { classname = "torus"; coeffs.SetSize (8); coeffs.Elem(1) = c(0); coeffs.Elem(2) = c(1); coeffs.Elem(3) = c(2); coeffs.Elem(4) = n(0); coeffs.Elem(5) = n(1); coeffs.Elem(6) = n(2); coeffs.Elem(7) = R; coeffs.Elem(8) = r; } void Torus :: SetPrimitiveData (Array & coeffs) { c(0) = coeffs.Elem(1); c(1) = coeffs.Elem(2); c(2) = coeffs.Elem(3); n(0) = coeffs.Elem(4); n(1) = coeffs.Elem(5); n(2) = coeffs.Elem(6); R = coeffs.Elem(7); r = coeffs.Elem(8); } Primitive * Torus :: CreateDefault () { return new Torus (Point<3> (0,0,0), Vec<3> (0,0,1), 2, 1); } Primitive * Torus :: Copy () const { return new Torus (c, n, R, r); } void Torus :: Transform (Transformation<3> & trans) { Point<3> hc; trans.Transform (c, hc); c = hc; Vec<3> hn; trans.Transform (n, hn); n = hn; } int Torus :: IsIdentic (const Surface & s2, int & inv, double eps) const { const Torus * torus2 = dynamic_cast (&s2); if (!torus2) return 0; if (fabs (torus2->R - R) > eps) return 0; if (fabs (torus2->r - r) > eps) return 0; Vec<3> v2 = torus2->n - n; if ( v2 * v2 > eps ) return 0; v2 = torus2->c - c; if ( v2 * v2 > eps ) return 0; inv = 0; return 1; } double Torus :: CalcFunctionValue (const Point<3> & point) const { /* // original version Vec<3> v1 = point - c; double a1 = Abs2 (v1); // v1(0) * v1(0) + v1(1) * v1(1) + v1(2) * v1(2); double a2 = n * v1; // n(0) * v1(0) + n(1) * v1(1) + n(2) * v1(2); double a3 = a1 + R * R - r * r; double a4 = Abs2 (n); // n(0) * n(0) + n(1) * n(1) + n(2) * n(2); return ( a3 * a3 -4 * R * R * ( a1 - a2 * a2 / a4 ) ) / ( R * R * R ); */ // JS, April 2011 Vec<3> v1 = point-c; double abs2 = Abs2(v1); double tau = v1 * n; double rho = sqrt (abs2 - tau*tau); return sqr (R - rho) + tau*tau - r*r; // double val2 = sqr (tau*tau + sqr (R - rho) -r*r) / (R*R*R); } void Torus :: CalcGradient (const Point<3> & point, Vec<3> & grad) const { /* Vec<3> v1 = point - c; double a1 = v1(0) * v1(0) + v1(1) * v1(1) + v1(2) * v1(2); double a2 = n(0) * v1(0) + n(1) * v1(1) + n(2) * v1(2); double a3 = a1 - R * R - r * r; double a4 = n(0) * n(0) + n(1) * n(1) + n(2) * n(2); grad(0) = ( 4 * a3 * v1(0) + 8 * R * R * a2 / a4 * n(0) ) / ( R * R * R ); grad(1) = ( 4 * a3 * v1(1) + 8 * R * R * a2 / a4 * n(1) ) / ( R * R * R ); grad(2) = ( 4 * a3 * v1(2) + 8 * R * R * a2 / a4 * n(2) ) / ( R * R * R ); */ Vec<3> v1 = point-c; double abs2 = Abs2(v1); double tau = v1 * n; double rho = sqrt (abs2 - tau*tau); // double func = sqr (R - rho) + tau*tau - r*r; Vec<3> gradabs2 = 2 * v1; Vec<3> gradtau = n; Vec<3> gradrho = 0.5 / rho * (gradabs2 - 2 * tau * gradtau); grad = -2 * (R - rho) * gradrho + 2 * tau * gradtau; } void Torus :: CalcHesse (const Point<3> & point, Mat<3> & hesse) const { Surface::CalcHesse (point, hesse); return; Vec<3> v1 = point - c; double a1 = v1(0) * v1(0) + v1(1) * v1(1) + v1(2) * v1(2); double a3 = a1 - R * R - r * r; double a4 = n(0) * n(0) + n(1) * n(1) + n(2) * n(2); hesse(0,0) = ( 4 * a3 + 8 * (v1(0) * v1(0) + (R * n(0)) * (R * n(0)) / a4 ) ) / ( R * R * R ); hesse(1,1) = ( 4 * a3 + 8 * (v1(1) * v1(1) + (R * n(1)) * (R * n(1)) / a4 ) ) / ( R * R * R ); hesse(2,2) = ( 4 * a3 + 8 * (v1(2) * v1(2) + (R * n(2)) * (R * n(2)) / a4 ) ) / ( R * R * R ); hesse(0,1) = hesse(1,0) = 8 * (v1(0) * v1(1) + (R * n(0)) * (R * n(1)) / a4 ) / ( R * R * R ); hesse(1,2) = hesse(2,1) = 8 * (v1(1) * v1(2) + (R * n(1)) * (R * n(2)) / a4) / ( R * R * R ); hesse(0,2) = hesse(2,0) = 8 * (v1(0) * v1(2) + (R * n(0)) * (R * n(2)) / a4) / ( R * R * R ); } double Torus :: HesseNorm () const { return 4/(r*r); // return ( 2 / r + 2 / ( R - r ) ); } Point<3> Torus :: GetSurfacePoint () const { Vec<3> vn = n.GetNormal(); return c + ( R + r ) * vn.Normalize(); } /// void Torus :: DefineTangentialPlane (const Point<3> & ap1, const Point<3> & ap2) /// { /// } /// void Torus :: ToPlane (const Point<3> & p, /// Point<2> & pplane, /// double h, int & zone) const /// { /// } /// void Torus :: FromPlane (const Point<2> & pplane, Point<3> & p, double h) const /// { /// } /// void Torus :: Project (Point<3> & p) const /// { /// } INSOLID_TYPE Torus :: BoxInSolid (const BoxSphere<3> & box) const { Vec<3> v1 = box.Center() - c; double a1 = Abs2(v1); // v1(0) * v1(0) + v1(1) * v1(1) + v1(2) * v1(2); double a2 = n * v1; // n(0) * v1(0) + n(1) * v1(1) + n(2) * v1(2); double a4 = Abs2(n); // n(0) * n(0) + n(1) * n(1) + n(2) * n(2); double dist = sqrt( a1 + R * R - 2 * R * sqrt( a1 - a2 * a2 / a4) ); if (dist - box.Diam()/2 > r) return IS_OUTSIDE; if (dist + box.Diam()/2 < r) return IS_INSIDE; return DOES_INTERSECT; } void Torus :: GetTriangleApproximation (TriangleApproximation & tas, const Box<3> & /* boundingbox */, double facets) const { int N = int(facets) + 1; Vec<3> lvab = n ; lvab.Normalize(); Vec<3> n1 = lvab.GetNormal(); n1.Normalize(); Vec<3> n2 = Cross(lvab, n1); n2.Normalize(); for (int j = 0; j <= N; j++) for (int i = 0; i <= N; i++) { double lg = 2 * M_PI * double (i) / N; double bg = 2 * M_PI * double(j) / N; Point<3> p = c + ( R + r * cos(lg) ) * ( cos(bg) * n1 + sin(bg) * n2 ) + r * sin(lg) * n; tas.AddPoint (p); } for (int j = 0; j < N; j++) for (int i = 0; i < N; i++) { int pi = i + (N+1) * j; tas.AddTriangle (TATriangle (0, pi, pi+1, pi+N+2)); tas.AddTriangle (TATriangle (0, pi, pi+N+2, pi+N+1)); } } void Torus :: Read (istream & ist) { ist >> c(0) >> c(1) >> c(2) >> n(0) >> n(1) >> n(2) >> R >> r; } void Torus :: Print (ostream & ost) const { ost << c(0) << " " << c(1) << " " << c(2) << " " << n(0) << " " << n(1) << " " << n(2) << " " << R << " " << r << endl; } } netgen-6.2.1804/libsrc/csg/vscsg.cpp0000644000175000017500000002546113272137567015700 0ustar kurtkurt#include #include "incopengl.hpp" #include #include #include #include #include #include "vscsg.hpp" namespace netgen { /* *********************** Draw Geometry **************** */ extern shared_ptr mesh; extern Array specpoints; extern Array > boxes; VisualSceneGeometry :: VisualSceneGeometry () : VisualScene() { selsurf = 0; } VisualSceneGeometry :: ~VisualSceneGeometry () { ; } void VisualSceneGeometry :: SelectSurface (int aselsurf) { selsurf = aselsurf; DrawScene(); } void VisualSceneGeometry :: DrawScene () { if (changeval != geometry->GetChangeVal()) BuildScene(); changeval = geometry->GetChangeVal(); glClearColor(backcolor, backcolor, backcolor, 1.0); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); SetLight(); glPushMatrix(); glMultMatrixd (transformationmat); SetClippingPlane (); glShadeModel (GL_SMOOTH); glDisable (GL_COLOR_MATERIAL); glPolygonMode (GL_FRONT_AND_BACK, GL_FILL); glEnable (GL_BLEND); glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); /* float mat_spec_col[] = { 1, 1, 1, 1 }; glMaterialfv (GL_FRONT_AND_BACK, GL_SPECULAR, mat_spec_col); */ double shine = vispar.shininess; double transp = vispar.transp; glMaterialf (GL_FRONT_AND_BACK, GL_SHININESS, shine); glLogicOp (GL_COPY); glEnable (GL_NORMALIZE); for (int i = 0; i < geometry->GetNTopLevelObjects(); i++) { const TopLevelObject * tlo = geometry -> GetTopLevelObject (i); if (tlo->GetVisible() && !tlo->GetTransparent()) { float mat_col[] = { float(tlo->GetRed()), float(tlo->GetGreen()), float(tlo->GetBlue()), 1 }; glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_col); glCallList (trilists[i]); } } glPolygonOffset (1, 1); glEnable (GL_POLYGON_OFFSET_FILL); glLogicOp (GL_NOOP); for (int i = 0; i < geometry->GetNTopLevelObjects(); i++) { const TopLevelObject * tlo = geometry -> GetTopLevelObject (i); if (tlo->GetVisible() && tlo->GetTransparent()) { float mat_col[] = { float(tlo->GetRed()), float(tlo->GetGreen()), float(tlo->GetBlue()), float(transp) }; glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_col); glCallList (trilists[i]); } } glDisable (GL_POLYGON_OFFSET_FILL); glPopMatrix(); glDisable(GL_CLIP_PLANE0); DrawCoordinateCross (); DrawNetgenLogo (); glFinish(); } void VisualSceneGeometry :: BuildScene (int zoomall) { VisualScene::BuildScene(zoomall); // setting light ... Box<3> box; int hasp = 0; for (int i = 0; i < geometry->GetNTopLevelObjects(); i++) { const TriangleApproximation * ta = geometry->GetTriApprox(i); if (!ta) continue; for (int j = 0; j < ta->GetNP(); j++) { if (hasp) box.Add (ta->GetPoint(j)); else { hasp = 1; box.Set (ta->GetPoint(j)); } } } if (hasp) { center = box.Center(); rad = box.Diam() / 2; } else { center = Point3d(0,0,0); rad = 1; } CalcTransformationMatrices(); for (int i = 0; i < trilists.Size(); i++) glDeleteLists (trilists[i], 1); trilists.SetSize(0); for (int i = 0; i < geometry->GetNTopLevelObjects(); i++) { trilists.Append (glGenLists (1)); glNewList (trilists.Last(), GL_COMPILE); glEnable (GL_NORMALIZE); const TriangleApproximation * ta = geometry->GetTriApprox(i); if (ta) { glEnableClientState(GL_VERTEX_ARRAY); glVertexPointer(3, GL_DOUBLE, 0, &ta->GetPoint(0)(0)); glEnableClientState(GL_NORMAL_ARRAY); glNormalPointer(GL_DOUBLE, 0, &ta->GetNormal(0)(0)); for (int j = 0; j < ta->GetNT(); j++) glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, & (ta->GetTriangle(j)[0])); glDisableClientState(GL_VERTEX_ARRAY); glDisableClientState(GL_NORMAL_ARRAY); /* for (int j = 0; j < ta.GetNT(); j++) { glBegin (GL_TRIANGLES); for (int k = 0; k < 3; k++) { int pi = ta.GetTriangle(j)[k]; glNormal3dv (ta.GetNormal(pi)); glVertex3dv (ta.GetPoint(pi)); cout << "v = " << ta.GetPoint(pi) << endl; } glEnd (); } */ } glEndList (); } } VisualSceneSpecPoints :: VisualSceneSpecPoints () : VisualScene() { ; } VisualSceneSpecPoints :: ~VisualSceneSpecPoints () { ; } void VisualSceneSpecPoints :: DrawScene () { if (!mesh) { VisualScene::DrawScene(); return; } if (changeval != specpoints.Size()) BuildScene(); changeval = specpoints.Size(); glClearColor(backcolor, backcolor, backcolor, 1.0); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glEnable (GL_COLOR_MATERIAL); glColor3f (1.0f, 1.0f, 1.0f); glLineWidth (1.0f); glPushMatrix(); glMultMatrixd (transformationmat); // glEnable (GL_COLOR); // glDisable (GL_COLOR_MATERIAL); if (vispar.drawedtangents) { glColor3d (1, 0, 0); glBegin (GL_LINES); for (int i = 1; i <= specpoints.Size(); i++) { const Point3d p1 = specpoints.Get(i).p; const Point3d p2 = specpoints.Get(i).p + len * specpoints.Get(i).v; glVertex3d (p1.X(), p1.Y(), p1.Z()); glVertex3d (p2.X(), p2.Y(), p2.Z()); } glEnd(); } if (vispar.drawededges) { glColor3d (1, 0, 0); glBegin (GL_LINES); for (int i = 1; i <= mesh->GetNSeg(); i++) { const Segment & seg = mesh -> LineSegment (i); glVertex3dv ( (*mesh)[seg[0]] ); glVertex3dv ( (*mesh)[seg[1]] ); // glVertex3dv ( &(*mesh)[seg[0]].X() ); // glVertex3dv ( &(*mesh)[seg[1]].X() ); } glEnd(); } glColor3d (1, 0, 0); glBegin (GL_LINES); int edges[12][2] = { { 0, 1 }, { 2, 3 }, { 4, 5 }, { 6, 7 }, { 0, 2 }, { 1, 3 }, { 4, 6 }, { 5, 7 }, { 0, 4 }, { 1, 5 }, { 2, 6 }, { 3, 7 } }; for (int i = 0; i < boxes.Size(); i++) { for (int j = 0; j < 12; j++) { glVertex3dv ( boxes[i].GetPointNr(edges[j][0]) ); glVertex3dv ( boxes[i].GetPointNr(edges[j][1]) ); } /* glVertex3dv ( boxes[i].PMin() ); glVertex3dv ( boxes[i].PMax() ); */ } glEnd(); if (vispar.drawededgenrs) { glEnable (GL_COLOR_MATERIAL); GLfloat textcol[3] = { GLfloat(1 - backcolor), GLfloat(1 - backcolor), GLfloat(1 - backcolor) }; glColor3fv (textcol); glNormal3d (0, 0, 1); glPushAttrib (GL_LIST_BIT); // glListBase (fontbase); char buf[20]; for (int i = 1; i <= mesh->GetNSeg(); i++) { const Segment & seg = mesh -> LineSegment (i); const Point3d p1 = mesh -> Point (seg[0]); const Point3d p2 = mesh -> Point (seg[1]); const Point3d p = Center (p1, p2); glRasterPos3d (p.X(), p.Y(), p.Z()); sprintf (buf, "%d", seg.edgenr); // glCallLists (GLsizei(strlen (buf)), GL_UNSIGNED_BYTE, buf); MyOpenGLText (buf); } glPopAttrib (); glDisable (GL_COLOR_MATERIAL); } if (vispar.drawedpoints) { glColor3d (0, 0, 1); /* glPointSize( 3.0 ); float range[2]; glGetFloatv(GL_POINT_SIZE_RANGE, &range[0]); cout << "max ptsize = " << range[0] << "-" << range[1] << endl; glBegin( GL_POINTS ); for (int i = 1; i <= mesh -> GetNP(); i++) { const Point3d & p = mesh -> Point(i); if (i % 2) glVertex3f( p.X(), p.Y(), p.Z()); } glEnd(); */ static GLubyte knoedel[] = { 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, }; glPixelStorei(GL_UNPACK_ALIGNMENT, 1); glDisable (GL_COLOR_MATERIAL); glDisable (GL_LIGHTING); glDisable (GL_CLIP_PLANE0); /* for (int i = 1; i <= mesh -> GetNP(); i++) { const Point3d & p = mesh -> Point(i); glRasterPos3d (p.X(), p.Y(), p.Z()); glBitmap (7, 7, 3, 3, 0, 0, &knoedel[0]); } */ for (const Point3d & p : mesh->Points()) { glRasterPos3d (p.X(), p.Y(), p.Z()); glBitmap (7, 7, 3, 3, 0, 0, &knoedel[0]); } } if (vispar.drawedpointnrs) { glEnable (GL_COLOR_MATERIAL); GLfloat textcol[3] = { GLfloat(1 - backcolor), GLfloat(1 - backcolor), GLfloat(1 - backcolor) }; glColor3fv (textcol); glNormal3d (0, 0, 1); glPushAttrib (GL_LIST_BIT); // glListBase (fontbase); char buf[20]; // for (int i = 1; i <= mesh->GetNP(); i++) for (auto i : mesh->Points().Range()) { const Point3d & p = mesh->Point(i); glRasterPos3d (p.X(), p.Y(), p.Z()); sprintf (buf, "%d", int(i)); // glCallLists (GLsizei(strlen (buf)), GL_UNSIGNED_BYTE, buf); MyOpenGLText (buf); } glPopAttrib (); glDisable (GL_COLOR_MATERIAL); } glPopMatrix(); if (vispar.drawcoordinatecross) DrawCoordinateCross (); DrawNetgenLogo (); glFinish(); } void VisualSceneSpecPoints :: BuildScene (int zoomall) { if (!mesh) { VisualScene::BuildScene(zoomall); return; } Box3d box; if (mesh->GetNSeg()) { box.SetPoint (mesh->Point (mesh->LineSegment(1)[0])); for (int i = 1; i <= mesh->GetNSeg(); i++) { box.AddPoint (mesh->Point (mesh->LineSegment(i)[0])); box.AddPoint (mesh->Point (mesh->LineSegment(i)[1])); } } else if (specpoints.Size() >= 2) { box.SetPoint (specpoints.Get(1).p); for (int i = 2; i <= specpoints.Size(); i++) box.AddPoint (specpoints.Get(i).p); } else { box = Box3d (Point3d (0,0,0), Point3d (1,1,1)); } if (zoomall == 2 && ((vispar.centerpoint >= 1 && vispar.centerpoint <= mesh->GetNP()) || vispar.use_center_coords)) { if (vispar.use_center_coords) { center.X() = vispar.centerx; center.Y() = vispar.centery; center.Z() = vispar.centerz; } else center = mesh->Point (vispar.centerpoint); } else center = Center (box.PMin(), box.PMax()); rad = 0.5 * Dist (box.PMin(), box.PMax()); CalcTransformationMatrices(); } } #ifdef NG_PYTHON #include <../general/ngpython.hpp> DLL_HEADER void ExportCSGVis(py::module &m) { using namespace netgen; py::class_> (m, "VisualSceneGeometry") .def("Draw", &VisualSceneGeometry::DrawScene) ; m.def("SetBackGroundColor", &VisualSceneGeometry::SetBackGroundColor); m.def("VS", [](CSGeometry & geom) { geom.FindIdenticSurfaces(1e-6); geom.CalcTriangleApproximation(0.01, 20); auto vs = make_shared(); vs->SetGeometry(&geom); return vs; }); m.def("MouseMove", [](VisualSceneGeometry &vsgeom, int oldx, int oldy, int newx, int newy, char mode) { vsgeom.MouseMove(oldx, oldy, newx, newy, mode); }); } PYBIND11_MODULE(libcsgvis, m) { ExportCSGVis(m); } #endif netgen-6.2.1804/libsrc/csg/polyhedra.cpp0000644000175000017500000004111013272137567016527 0ustar kurtkurt#include #include #include namespace netgen { Polyhedra::Face::Face (int pi1, int pi2, int pi3, const Array > & points, int ainputnr) { inputnr = ainputnr; pnums[0] = pi1; pnums[1] = pi2; pnums[2] = pi3; bbox.Set (points[pi1]); bbox.Add (points[pi2]); bbox.Add (points[pi3]); v1 = points[pi2] - points[pi1]; v2 = points[pi3] - points[pi1]; n = Cross (v1, v2); nn = n; nn.Normalize(); // PseudoInverse (v1, v2, w1, w2); Mat<2,3> mat; Mat<3,2> inv; for (int i = 0; i < 3; i++) { mat(0,i) = v1(i); mat(1,i) = v2(i); } CalcInverse (mat, inv); for (int i = 0; i < 3; i++) { w1(i) = inv(i,0); w2(i) = inv(i,1); } } Polyhedra :: Polyhedra () { surfaceactive.SetSize(0); surfaceids.SetSize(0); eps_base1 = 1e-8; } Polyhedra :: ~Polyhedra () { ; } Primitive * Polyhedra :: CreateDefault () { return new Polyhedra(); } INSOLID_TYPE Polyhedra :: BoxInSolid (const BoxSphere<3> & box) const { /* for (i = 1; i <= faces.Size(); i++) if (FaceBoxIntersection (i, box)) return DOES_INTERSECT; */ for (int i = 0; i < faces.Size(); i++) { if (!faces[i].bbox.Intersect (box)) continue; //(*testout) << "face " << i << endl; const Point<3> & p1 = points[faces[i].pnums[0]]; const Point<3> & p2 = points[faces[i].pnums[1]]; const Point<3> & p3 = points[faces[i].pnums[2]]; if (fabs (faces[i].nn * (p1 - box.Center())) > box.Diam()/2) continue; //(*testout) << "still in loop" << endl; double dist2 = MinDistTP2 (p1, p2, p3, box.Center()); //(*testout) << "p1 " << p1 << " p2 " << p2 << " p3 " << p3 << endl // << " box.Center " << box.Center() << " box.Diam() " << box.Diam() << endl // << " dist2 " << dist2 << " sqr(box.Diam()/2) " << sqr(box.Diam()/2) << endl; if (dist2 < sqr (box.Diam()/2)) { //(*testout) << "DOES_INTERSECT" << endl; return DOES_INTERSECT; } }; return PointInSolid (box.Center(), 1e-3 * box.Diam()); } INSOLID_TYPE Polyhedra :: PointInSolid (const Point<3> & p, double eps) const { //(*testout) << "PointInSolid p " << p << " eps " << eps << endl; //(*testout) << "bbox " << poly_bbox << endl; if((p(0) > poly_bbox.PMax()(0) + eps) || (p(0) < poly_bbox.PMin()(0) - eps) || (p(1) > poly_bbox.PMax()(1) + eps) || (p(1) < poly_bbox.PMin()(1) - eps) || (p(2) > poly_bbox.PMax()(2) + eps) || (p(2) < poly_bbox.PMin()(2) - eps)) { //(*testout) << "returning IS_OUTSIDE" << endl; return IS_OUTSIDE; } Vec<3> n, v1, v2; // random (?) numbers: n(0) = -0.424621; n(1) = 0.15432; n(2) = 0.89212238; int cnt = 0; for (int i = 0; i < faces.Size(); i++) { const Point<3> & p1 = points[faces[i].pnums[0]]; Vec<3> v0 = p - p1; double lam3 = faces[i].nn * v0; if(fabs(lam3) < eps) { double lam1 = (faces[i].w1 * v0); double lam2 = (faces[i].w2 * v0); if (lam1 >= -eps_base1 && lam2 >= -eps_base1 && lam1+lam2 <= 1+eps_base1) { //(*testout) << "returning DOES_INTERSECT" << endl; return DOES_INTERSECT; } } else { lam3 = -(faces[i].n * v0) / (faces[i].n * n); if (lam3 < 0) continue; Vec<3> rs = v0 + lam3 * n; double lam1 = (faces[i].w1 * rs); double lam2 = (faces[i].w2 * rs); if (lam1 >= 0 && lam2 >= 0 && lam1+lam2 <= 1) cnt++; } } //(*testout) << " cnt = " << cnt%2 << endl; return (cnt % 2) ? IS_INSIDE : IS_OUTSIDE; } void Polyhedra :: GetTangentialSurfaceIndices (const Point<3> & p, Array & surfind, double eps) const { for (int i = 0; i < faces.Size(); i++) { const Point<3> & p1 = points[faces[i].pnums[0]]; Vec<3> v0 = p - p1; double lam3 = -(faces[i].nn * v0); // n->nn if (fabs (lam3) > eps) continue; double lam1 = (faces[i].w1 * v0); double lam2 = (faces[i].w2 * v0); if (lam1 >= -eps_base1 && lam2 >= -eps_base1 && lam1+lam2 <= 1+eps_base1) if (!surfind.Contains (GetSurfaceId(i))) surfind.Append (GetSurfaceId(i)); } } INSOLID_TYPE Polyhedra :: VecInSolid (const Point<3> & p, const Vec<3> & v, double eps) const { Array point_on_faces; INSOLID_TYPE res(DOES_INTERSECT); Vec<3> vn = v; vn.Normalize(); for (int i = 0; i < faces.Size(); i++) { const Point<3> & p1 = points[faces[i].pnums[0]]; Vec<3> v0 = p - p1; double lam3 = -(faces[i].nn * v0); // n->nn if (fabs (lam3) > eps) continue; //(*testout) << "lam3 <= eps" << endl; double lam1 = (faces[i].w1 * v0); double lam2 = (faces[i].w2 * v0); if (lam1 >= -eps_base1 && lam2 >= -eps_base1 && lam1+lam2 <= 1+eps_base1) { point_on_faces.Append(i); double scal = vn * faces[i].nn; // n->nn res = DOES_INTERSECT; if (scal > eps_base1) res = IS_OUTSIDE; if (scal < -eps_base1) res = IS_INSIDE; } } //(*testout) << "point_on_faces.Size() " << point_on_faces.Size() // << " res " << res << endl; if (point_on_faces.Size() == 0) return PointInSolid (p, 0); if (point_on_faces.Size() == 1) return res; double mindist(0); bool first = true; for(int i=0; i eps && (first || dist < mindist)) { mindist = dist; first = false; } } } Point<3> p2 = p + (1e-2*mindist) * vn; res = PointInSolid (p2, eps); // (*testout) << "mindist " << mindist << " res " << res << endl; return res; } /* INSOLID_TYPE Polyhedra :: VecInSolid2 (const Point<3> & p, const Vec<3> & v1, const Vec<3> & v2, double eps) const { INSOLID_TYPE res; res = VecInSolid(p,v1,eps); if(res != DOES_INTERSECT) return res; int point_on_n_faces = 0; Vec<3> v1n = v1; v1n.Normalize(); Vec<3> v2n = v2; v2n.Normalize(); for (int i = 0; i < faces.Size(); i++) { const Point<3> & p1 = points[faces[i].pnums[0]]; Vec<3> v0 = p - p1; double lam3 = -(faces[i].n * v0); if (fabs (lam3) > eps) continue; double lam1 = (faces[i].w1 * v0); double lam2 = (faces[i].w2 * v0); if (lam1 >= -eps && lam2 >= -eps && lam1+lam2 <= 1+eps) { double scal1 = v1n * faces[i].n; if (fabs (scal1) > eps) continue; point_on_n_faces++; double scal2 = v2n * faces[i].n; res = DOES_INTERSECT; if (scal2 > eps) res = IS_OUTSIDE; if (scal2 < -eps) res = IS_INSIDE; } } if (point_on_n_faces == 1) return res; cerr << "primitive::vecinsolid2 makes nonsense for polyhedra" << endl; return Primitive :: VecInSolid2 (p, v1, v2, eps); } */ INSOLID_TYPE Polyhedra :: VecInSolid2 (const Point<3> & p, const Vec<3> & v1, const Vec<3> & v2, double eps) const { //(*testout) << "VecInSolid2 eps " << eps << endl; INSOLID_TYPE res = VecInSolid(p,v1,eps); //(*testout) << "VecInSolid = " < v1n = v1; v1n.Normalize(); Vec<3> v2n = v2 - (v2 * v1n) * v1n; v2n.Normalize(); double cosv2, cosv2max = -99; for (int i = 0; i < faces.Size(); i++) { const Point<3> & p1 = points[faces[i].pnums[0]]; Vec<3> v0 = p - p1; if (fabs (faces[i].nn * v0) > eps) continue; // n->nn if (fabs (v1n * faces[i].nn) > eps_base1) continue; // n->nn double lam1 = (faces[i].w1 * v0); double lam2 = (faces[i].w2 * v0); if (lam1 >= -eps_base1 && lam2 >= -eps_base1 && lam1+lam2 <= 1+eps_base1) { // v1 is in face Point<3> fc = Center (points[faces[i].pnums[0]], points[faces[i].pnums[1]], points[faces[i].pnums[2]]); Vec<3> vpfc = fc - p; cosv2 = (v2n * vpfc) / vpfc.Length(); if (cosv2 > cosv2max) { cosv2max = cosv2; point_on_n_faces++; double scal2 = v2n * faces[i].nn; // n->nn res = DOES_INTERSECT; if (scal2 > eps_base1) res = IS_OUTSIDE; if (scal2 < -eps_base1) res = IS_INSIDE; } } } if (point_on_n_faces >= 1) return res; (*testout) << "primitive::vecinsolid2 makes nonsense for polyhedra" << endl; cerr << "primitive::vecinsolid2 makes nonsense for polyhedra" << endl; return Primitive :: VecInSolid2 (p, v1, v2, eps); } void Polyhedra :: GetTangentialVecSurfaceIndices2 (const Point<3> & p, const Vec<3> & v1, const Vec<3> & v2, Array & surfind, double eps) const { Vec<3> v1n = v1; v1n.Normalize(); Vec<3> v2n = v2; // - (v2 * v1n) * v1n; v2n.Normalize(); for (int i = 0; i < faces.Size(); i++) { const Point<3> & p1 = points[faces[i].pnums[0]]; Vec<3> v0 = p - p1; if (fabs (v0 * faces[i].nn) > eps) continue; // n->nn if (fabs (v1n * faces[i].nn) > eps_base1) continue; // n->nn if (fabs (v2n * faces[i].nn) > eps_base1) continue; // n->nn double lam01 = (faces[i].w1 * v0); double lam02 = (faces[i].w2 * v0); double lam03 = 1-lam01-lam02; double lam11 = (faces[i].w1 * v1); double lam12 = (faces[i].w2 * v1); double lam13 = -lam11-lam12; double lam21 = (faces[i].w1 * v2); double lam22 = (faces[i].w2 * v2); double lam23 = -lam21-lam22; bool ok1 = lam01 > eps_base1 || (lam01 > -eps_base1 && lam11 > eps_base1) || (lam01 > -eps_base1 && lam11 > -eps_base1 && lam21 > eps_base1); bool ok2 = lam02 > eps_base1 || (lam02 > -eps_base1 && lam12 > eps_base1) || (lam02 > -eps_base1 && lam12 > -eps_base1 && lam22 > eps_base1); bool ok3 = lam03 > eps_base1 || (lam03 > -eps_base1 && lam13 > eps_base1) || (lam03 > -eps_base1 && lam13 > -eps_base1 && lam23 > eps_base1); if (ok1 && ok2 && ok3) { if (!surfind.Contains (GetSurfaceId(faces[i].planenr))) surfind.Append (GetSurfaceId(faces[i].planenr)); } } } void Polyhedra :: GetPrimitiveData (const char *& classname, Array & coeffs) const { classname = "Polyhedra"; coeffs.SetSize(0); coeffs.Append (points.Size()); coeffs.Append (faces.Size()); coeffs.Append (planes.Size()); /* int i, j; for (i = 1; i <= planes.Size(); i++) { planes.Elem(i)->Print (*testout); } for (i = 1; i <= faces.Size(); i++) { (*testout) << "face " << i << " has plane " << faces.Get(i).planenr << endl; for (j = 1; j <= 3; j++) (*testout) << points.Get(faces.Get(i).pnums[j-1]); (*testout) << endl; } */ } void Polyhedra :: SetPrimitiveData (Array & /* coeffs */) { ; } void Polyhedra :: Reduce (const BoxSphere<3> & box) { for (int i = 0; i < planes.Size(); i++) surfaceactive[i] = 0; for (int i = 0; i < faces.Size(); i++) if (FaceBoxIntersection (i, box)) surfaceactive[faces[i].planenr] = 1; } void Polyhedra :: UnReduce () { for (int i = 0; i < planes.Size(); i++) surfaceactive[i] = 1; } int Polyhedra :: AddPoint (const Point<3> & p) { if(points.Size() == 0) poly_bbox.Set(p); else poly_bbox.Add(p); points.Append (p); return points.Size(); } int Polyhedra :: AddFace (int pi1, int pi2, int pi3, int inputnum) { (*testout) << "polyhedra, add face " << pi1 << ", " << pi2 << ", " << pi3 << endl; if(pi1 == pi2 || pi2 == pi3 || pi3 == pi1) { ostringstream msg; msg << "Illegal point numbers for polyhedron face: " << pi1+1 << ", " << pi2+1 << ", " << pi3+1; throw NgException(msg.str()); } faces.Append (Face (pi1, pi2, pi3, points, inputnum)); Point<3> p1 = points[pi1]; Point<3> p2 = points[pi2]; Point<3> p3 = points[pi3]; Vec<3> v1 = p2 - p1; Vec<3> v2 = p3 - p1; Vec<3> n = Cross (v1, v2); n.Normalize(); Plane pl (p1, n); // int inverse; // int identicto = -1; // for (int i = 0; i < planes.Size(); i++) // if (pl.IsIdentic (*planes[i], inverse, 1e-9*max3(v1.Length(),v2.Length(),Dist(p2,p3)))) // { // if (!inverse) // identicto = i; // } // // cout << "is identic = " << identicto << endl; // identicto = -1; // changed April 10, JS // if (identicto != -1) // faces.Last().planenr = identicto; // else { planes.Append (new Plane (p1, n)); surfaceactive.Append (1); surfaceids.Append (0); faces.Last().planenr = planes.Size()-1; } // (*testout) << "is plane nr " << faces.Last().planenr << endl; return faces.Size(); } int Polyhedra :: FaceBoxIntersection (int fnr, const BoxSphere<3> & box) const { /* (*testout) << "check face box intersection, fnr = " << fnr << endl; (*testout) << "box = " << box << endl; (*testout) << "face-box = " << faces[fnr].bbox << endl; */ if (!faces[fnr].bbox.Intersect (box)) return 0; const Point<3> & p1 = points[faces[fnr].pnums[0]]; const Point<3> & p2 = points[faces[fnr].pnums[1]]; const Point<3> & p3 = points[faces[fnr].pnums[2]]; double dist2 = MinDistTP2 (p1, p2, p3, box.Center()); /* (*testout) << "p1 = " << p1 << endl; (*testout) << "p2 = " << p2 << endl; (*testout) << "p3 = " << p3 << endl; (*testout) << "box.Center() = " << box.Center() << endl; (*testout) << "center = " << box.Center() << endl; (*testout) << "dist2 = " << dist2 << endl; (*testout) << "diam = " << box.Diam() << endl; */ if (dist2 < sqr (box.Diam()/2)) { // (*testout) << "intersect" << endl; return 1; } return 0; } void Polyhedra :: GetPolySurfs(Array < Array * > & polysurfs) { int maxnum = -1; for(int i = 0; i maxnum) maxnum = faces[i].inputnr; } polysurfs.SetSize(maxnum+1); for(int i=0; i; for(int i = 0; iAppend(faces[i].planenr); } void Polyhedra::CalcSpecialPoints (Array > & pts) const { for (int i = 0; i < points.Size(); i++) pts.Append (points[i]); } void Polyhedra :: AnalyzeSpecialPoint (const Point<3> & /* pt */, Array > & /* specpts */) const { ; } Vec<3> Polyhedra :: SpecialPointTangentialVector (const Point<3> & p, int s1, int s2) const { const double eps = 1e-10*poly_bbox.Diam(); for (int fi1 = 0; fi1 < faces.Size(); fi1++) for (int fi2 = 0; fi2 < faces.Size(); fi2++) { int si1 = faces[fi1].planenr; int si2 = faces[fi2].planenr; if (surfaceids[si1] != s1 || surfaceids[si2] != s2) continue; //(*testout) << "check pair fi1/fi2 " << fi1 << "/" << fi2 << endl; Vec<3> n1 = GetSurface(si1) . GetNormalVector (p); Vec<3> n2 = GetSurface(si2) . GetNormalVector (p); Vec<3> t = Cross (n1, n2); //(*testout) << "t = " << t << endl; /* int samepts = 0; for (int j = 0; j < 3; j++) for (int k = 0; k < 3; k++) if (Dist(points[faces[fi1].pnums[j]], points[faces[fi2].pnums[k]]) < eps) samepts++; if (samepts < 2) continue; */ bool shareedge = false; for(int j = 0; !shareedge && j < 3; j++) { Vec<3> v1 = points[faces[fi1].pnums[(j+1)%3]] - points[faces[fi1].pnums[j]]; double smax = v1.Length(); v1 *= 1./smax; int pospos; if(fabs(v1(0)) > 0.5) pospos = 0; else if(fabs(v1(1)) > 0.5) pospos = 1; else pospos = 2; double sp = (p(pospos) - points[faces[fi1].pnums[j]](pospos)) / v1(pospos); if(sp < -eps || sp > smax+eps) continue; for (int k = 0; !shareedge && k < 3; k ++) { Vec<3> v2 = points[faces[fi2].pnums[(k+1)%3]] - points[faces[fi2].pnums[k]]; v2.Normalize(); if(v2 * v1 > 0) v2 -= v1; else v2 += v1; //(*testout) << "v2.Length2() " << v2.Length2() << endl; if(v2.Length2() > 1e-18) continue; double sa,sb; sa = (points[faces[fi2].pnums[k]](pospos) - points[faces[fi1].pnums[j]](pospos)) / v1(pospos); sb = (points[faces[fi2].pnums[(k+1)%3]](pospos) - points[faces[fi1].pnums[j]](pospos)) / v1(pospos); if(Dist(points[faces[fi1].pnums[j]] + sa*v1, points[faces[fi2].pnums[k]]) > eps) continue; if(sa > sb) { double aux = sa; sa = sb; sb = aux; } //testout->precision(20); //(*testout) << "sa " << sa << " sb " << sb << " smax " << smax << " sp " << sp << " v1 " << v1 << endl; //testout->precision(8); shareedge = (sa < -eps && sb > eps) || (sa < smax-eps && sb > smax+eps) || (sa > -eps && sb < smax+eps); if(!shareedge) continue; sa = max2(sa,0.); sb = min2(sb,smax); if(sp < sa+eps) shareedge = (t * v1 > 0); else if (sp > sb-eps) shareedge = (t * v1 < 0); } } if (!shareedge) continue; t.Normalize(); return t; } return Vec<3> (0,0,0); } } netgen-6.2.1804/libsrc/csg/curve2d.hpp0000644000175000017500000000247613272137567016133 0ustar kurtkurt#ifndef FILE_CURVE2D #define FILE_CURVE2D /**************************************************************************/ /* File: curve2d.hh */ /* Author: Joachim Schoeberl */ /* Date: 24. Jul. 96 */ /**************************************************************************/ namespace netgen { /* 2D Curve repesentation */ /// class Curve2d : public Manifold { public: /// virtual void Project (Point<2> & p) const = 0; /// virtual void NormalVector (const Point<2> & p, Vec<2> & n) const = 0; }; /// class CircleCurve2d : public Curve2d { /// Point<2> center; /// double rad; public: /// CircleCurve2d (const Point<2> & acenter, double arad); /// virtual void Project (Point<2> & p) const; /// virtual void NormalVector (const Point<2> & p, Vec<2> & n) const; }; /// class QuadraticCurve2d : public Curve2d { /// double cxx, cyy, cxy, cx, cy, c; public: /// QuadraticCurve2d (); /// void Read (istream & ist); /// virtual void Project (Point<2> & p) const; /// virtual void NormalVector (const Point<2> & p, Vec<2> & n) const; }; } #endif netgen-6.2.1804/libsrc/csg/identify.hpp0000644000175000017500000001623013272137567016365 0ustar kurtkurt #ifndef FILE_IDENTIFY #define FILE_IDENTIFY /**************************************************************************/ /* File: identify.hh */ /* Author: Joachim Schoeberl */ /* Date: 1. Aug. 99 */ /**************************************************************************/ namespace netgen { /** Identify surfaces for periodic b.c. or thin domains */ class SpecialPoint; class Identification { protected: const CSGeometry & geom; // identified faces, index sorted INDEX_2_HASHTABLE identfaces; int nr; public: DLL_HEADER Identification (int anr, const CSGeometry & ageom); DLL_HEADER virtual ~Identification (); DLL_HEADER virtual void Print (ostream & ost) const = 0; DLL_HEADER virtual void GetData (ostream & ost) const = 0; /// obsolete // virtual void IdentifySpecialPoints (Array & points); /// can identify both special points (fixed direction) /// (identified points, same tangent) virtual int Identifyable (const SpecialPoint & sp1, const SpecialPoint & sp2, const TABLE & specpoint2solid, const TABLE & specpoint2surface) const; /// virtual int Identifyable (const Point<3> & p1, const Point<3> & sp2) const; /// is it possible to identify sp1 with some other ? virtual int IdentifyableCandidate (const SpecialPoint & sp1) const; /// are points (if connected) by a short edge (direction anyhow) ? virtual int ShortEdge (const SpecialPoint & sp1, const SpecialPoint & sp2) const; /// add entries in mesh identification tables virtual void IdentifyPoints (class Mesh & mesh); /// add entries to identified faces (based on segment infos) virtual void IdentifyFaces (class Mesh & mesh); /// get point on other surface, add entry in mesh identifications virtual int GetIdentifiedPoint (class Mesh & mesh, int pi1); /// copy surfaces, or fill rectangles virtual void BuildSurfaceElements (Array & segs, class Mesh & mesh, const Surface * surf); /// insert volume elements in thin layers virtual void BuildVolumeElements (Array & surfels, class Mesh & mesh); /// get list of identified faces virtual void GetIdentifiedFaces (Array & idfaces) const; friend ostream & operator<< (ostream & ost, Identification & ident); }; class PeriodicIdentification : public Identification { const Surface * s1; const Surface * s2; Transformation<3> trafo; // from s1 to s2 Transformation<3> inv_trafo; // from s2 to s1 public: PeriodicIdentification (int anr, const CSGeometry & ageom, const Surface * as1, const Surface * as2, Transformation<3> atrafo = Vec<3>(0,0,0)); virtual ~PeriodicIdentification () override; virtual void Print (ostream & ost) const override; virtual void GetData (ostream & ost) const override; // virtual void IdentifySpecialPoints (Array & points); virtual int Identifyable (const SpecialPoint & sp1, const SpecialPoint & sp2, const TABLE & specpoint2solid, const TABLE & specpoint2surface) const override; virtual int Identifyable (const Point<3> & p1, const Point<3> & sp2) const override; virtual int GetIdentifiedPoint (class Mesh & mesh, int pi1) override; virtual void IdentifyPoints (class Mesh & mesh) override; virtual void IdentifyFaces (class Mesh & mesh) override; virtual void BuildSurfaceElements (Array & segs, class Mesh & mesh, const Surface * surf) override; }; /// class TopLevelObject; class CloseSurfaceIdentification : public Identification { const Surface * s1; const Surface * s2; const TopLevelObject * domain; /// int dom_nr; /// number of refinement levels (in Z-refinement) int ref_levels; /// number of refinement levels for layer next to s1 (in Z-refinement) int ref_levels_s1; /// number of refinement levels for layer next to s2 (in Z-refinement) int ref_levels_s2; /// double eps_n; Array slices; /// used only for domain-local identification: Array domain_surfaces; /// bool dom_surf_valid; /// Vec<3> direction; /// bool usedirection; public: CloseSurfaceIdentification (int anr, const CSGeometry & ageom, const Surface * as1, const Surface * as2, const TopLevelObject * adomain, const Flags & flags); virtual ~CloseSurfaceIdentification (); virtual void Print (ostream & ost) const; virtual void GetData (ostream & ost) const; // virtual void IdentifySpecialPoints (Array & points); virtual int Identifyable (const SpecialPoint & sp1, const SpecialPoint & sp2, const TABLE & specpoint2solid, const TABLE & specpoint2surface) const; virtual int Identifyable (const Point<3> & p1, const Point<3> & sp2) const; virtual int IdentifyableCandidate (const SpecialPoint & sp1) const; virtual int ShortEdge (const SpecialPoint & sp1, const SpecialPoint & sp2) const; virtual int GetIdentifiedPoint (class Mesh & mesh, int pi1); const Array & GetSlices () const { return slices; } virtual void IdentifyPoints (class Mesh & mesh); virtual void IdentifyFaces (class Mesh & mesh); virtual void BuildSurfaceElements (Array & segs, class Mesh & mesh, const Surface * surf); void BuildSurfaceElements2 (Array & segs, class Mesh & mesh, const Surface * surf); virtual void BuildVolumeElements (Array & surfels, class Mesh & mesh); int RefLevels () const { return ref_levels; } int RefLevels1 () const { return ref_levels_s1; } int RefLevels2 () const { return ref_levels_s2; } bool IsSkewIdentification(void) const {return usedirection;} const Vec<3> & GetDirection(void) const {return direction;} const Surface & GetSurface1(void) const { return *s1;} const Surface & GetSurface2(void) const { return *s2;} }; class CloseEdgesIdentification : public Identification { const Surface * facet; const Surface * s1; const Surface * s2; public: CloseEdgesIdentification (int anr, const CSGeometry & ageom, const Surface * afacet, const Surface * as1, const Surface * as2); virtual ~CloseEdgesIdentification (); virtual void Print (ostream & ost) const; virtual void GetData (ostream & ost) const; // virtual void IdentifySpecialPoints (Array & points); virtual int Identifyable (const SpecialPoint & sp1, const SpecialPoint & sp2, const TABLE & specpoint2solid, const TABLE & specpoint2surface) const; virtual void IdentifyPoints (class Mesh & mesh); virtual void BuildSurfaceElements (Array & segs, class Mesh & mesh, const Surface * surf); }; } #endif netgen-6.2.1804/libsrc/csg/genmesh.cpp0000644000175000017500000005315613272137567016203 0ustar kurtkurt#include #include #include #include #include namespace netgen { Array specpoints; static Array spoints; #define TCL_OK 0 #define TCL_ERROR 1 static void FindPoints (CSGeometry & geom, Mesh & mesh) { PrintMessage (1, "Start Findpoints"); const char * savetask = multithread.task; multithread.task = "Find points"; mesh.pointelements.SetSize(0); for (int i = 0; i < geom.GetNUserPoints(); i++) { auto up = geom.GetUserPoint(i); auto pnum = mesh.AddPoint(up); mesh.Points().Last().Singularity (geom.GetUserPointRefFactor(i)); mesh.AddLockedPoint (PointIndex (i+1)); mesh.pointelements.Append (Element0d(pnum, up.GetIndex())); } SpecialPointCalculation spc; spc.SetIdEps(geom.GetIdEps()); if (spoints.Size() == 0) spc.CalcSpecialPoints (geom, spoints); PrintMessage (2, "Analyze spec points"); spc.AnalyzeSpecialPoints (geom, spoints, specpoints); PrintMessage (5, "done"); (*testout) << specpoints.Size() << " special points:" << endl; for (int i = 0; i < specpoints.Size(); i++) specpoints[i].Print (*testout); /* for (int i = 1; i <= geom.identifications.Size(); i++) geom.identifications.Elem(i)->IdentifySpecialPoints (specpoints); */ multithread.task = savetask; } static void FindEdges (CSGeometry & geom, Mesh & mesh, MeshingParameters & mparam, const bool setmeshsize = false) { EdgeCalculation ec (geom, specpoints, mparam); ec.SetIdEps(geom.GetIdEps()); ec.Calc (mparam.maxh, mesh); for (int i = 0; i < geom.singedges.Size(); i++) { geom.singedges[i]->FindPointsOnEdge (mesh); if(setmeshsize) geom.singedges[i]->SetMeshSize(mesh,10.*geom.BoundingBox().Diam()); } for (int i = 0; i < geom.singpoints.Size(); i++) geom.singpoints[i]->FindPoints (mesh); for (int i = 1; i <= mesh.GetNSeg(); i++) { //(*testout) << "segment " << mesh.LineSegment(i) << endl; int ok = 0; for (int k = 1; k <= mesh.GetNFD(); k++) if (mesh.GetFaceDescriptor(k).SegmentFits (mesh.LineSegment(i))) { ok = k; //(*testout) << "fits to " << k << endl; } if (!ok) { ok = mesh.AddFaceDescriptor (FaceDescriptor (mesh.LineSegment(i))); //(*testout) << "did not find, now " << ok << endl; } //(*testout) << "change from " << mesh.LineSegment(i).si; mesh.LineSegment(i).si = ok; //(*testout) << " to " << mesh.LineSegment(i).si << endl; } for(int k = 1; k<=mesh.GetNFD(); k++) { *testout << "face: " << k << endl << "FD: " << mesh.GetFaceDescriptor(k) << endl; } if (geom.identifications.Size()) { PrintMessage (3, "Find Identifications"); for (int i = 0; i < geom.identifications.Size(); i++) { geom.identifications[i]->IdentifyPoints (mesh); //(*testout) << "identification " << i << " is " // << *geom.identifications[i] << endl; } for (int i = 0; i < geom.identifications.Size(); i++) geom.identifications[i]->IdentifyFaces (mesh); } // find intersecting segments PrintMessage (3, "Check intersecting edges"); Point3d pmin, pmax; mesh.GetBox (pmin, pmax); BoxTree<3> segtree (pmin, pmax); for (SegmentIndex si = 0; si < mesh.GetNSeg(); si++) { if (mesh[si].seginfo) { Box<3> hbox; hbox.Set (mesh[mesh[si][0]]); hbox.Add (mesh[mesh[si][1]]); segtree.Insert (hbox.PMin(), hbox.PMax(), si); } } Array loc; if (!ec.point_on_edge_problem) for (SegmentIndex si = 0; si < mesh.GetNSeg(); si++) { if (!mesh[si].seginfo) continue; Box<3> hbox; hbox.Set (mesh[mesh[si][0]]); hbox.Add (mesh[mesh[si][1]]); hbox.Increase (1e-6); segtree.GetIntersecting (hbox.PMin(), hbox.PMax(), loc); // for (SegmentIndex sj = 0; sj < si; sj++) for (int j = 0; j < loc.Size(); j++) { SegmentIndex sj = loc[j]; if (sj >= si) continue; if (!mesh[si].seginfo || !mesh[sj].seginfo) continue; if (mesh[mesh[si][0]].GetLayer() != mesh[mesh[sj][1]].GetLayer()) continue; Point<3> pi1 = mesh[mesh[si][0]]; Point<3> pi2 = mesh[mesh[si][1]]; Point<3> pj1 = mesh[mesh[sj][0]]; Point<3> pj2 = mesh[mesh[sj][1]]; Vec<3> vi = pi2 - pi1; Vec<3> vj = pj2 - pj1; if (sqr (vi * vj) > (1.-1e-6) * Abs2 (vi) * Abs2 (vj)) continue; // pi1 + vi t = pj1 + vj s Mat<3,2> mat; Vec<3> rhs; Vec<2> sol; for (int jj = 0; jj < 3; jj++) { mat(jj,0) = vi(jj); mat(jj,1) = -vj(jj); rhs(jj) = pj1(jj)-pi1(jj); } mat.Solve (rhs, sol); //(*testout) << "mat " << mat << endl << "rhs " << rhs << endl << "sol " << sol << endl; if (sol(0) > 1e-6 && sol(0) < 1-1e-6 && sol(1) > 1e-6 && sol(1) < 1-1e-6 && Abs (rhs - mat*sol) < 1e-6) { Point<3> ip = pi1 + sol(0) * vi; //(*testout) << "ip " << ip << endl; Point<3> pip = ip; ProjectToEdge (geom.GetSurface (mesh[si].surfnr1), geom.GetSurface (mesh[si].surfnr2), pip); //(*testout) << "Dist (ip, pip_si) " << Dist (ip, pip) << endl; if (Dist (ip, pip) > 1e-6*geom.MaxSize()) continue; pip = ip; ProjectToEdge (geom.GetSurface (mesh[sj].surfnr1), geom.GetSurface (mesh[sj].surfnr2), pip); //(*testout) << "Dist (ip, pip_sj) " << Dist (ip, pip) << endl; if (Dist (ip, pip) > 1e-6*geom.MaxSize()) continue; cout << "Intersection at " << ip << endl; geom.AddUserPoint (ip); spoints.Append (MeshPoint (ip, mesh[mesh[si][0]].GetLayer())); mesh.AddPoint (ip); (*testout) << "found intersection at " << ip << endl; (*testout) << "sol = " << sol << endl; (*testout) << "res = " << (rhs - mat*sol) << endl; (*testout) << "segs = " << pi1 << " - " << pi2 << endl; (*testout) << "and = " << pj1 << " - " << pj2 << endl << endl; } } } } static void MeshSurface (CSGeometry & geom, Mesh & mesh, MeshingParameters & mparam) { const char * savetask = multithread.task; multithread.task = "Surface meshing"; Array segments; int noldp = mesh.GetNP(); double starttime = GetTime(); // find master faces from identified Array masterface(mesh.GetNFD()); for (int i = 1; i <= mesh.GetNFD(); i++) masterface.Elem(i) = i; Array fpairs; bool changed; do { changed = 0; for (int i = 0; i < geom.identifications.Size(); i++) { geom.identifications[i]->GetIdentifiedFaces (fpairs); for (int j = 0; j < fpairs.Size(); j++) { if (masterface.Get(fpairs[j].I1()) < masterface.Get(fpairs[j].I2())) { changed = 1; masterface.Elem(fpairs[j].I2()) = masterface.Elem(fpairs[j].I1()); } if (masterface.Get(fpairs[j].I2()) < masterface.Get(fpairs[j].I1())) { changed = 1; masterface.Elem(fpairs[j].I1()) = masterface.Elem(fpairs[j].I2()); } } } } while (changed); int bccnt=0; for (int k = 0; k < geom.GetNSurf(); k++) bccnt = max2 (bccnt, geom.GetSurface(k)->GetBCProperty()); for (int k = 1; k <= mesh.GetNFD(); k++) { bool increased = false; FaceDescriptor & fd = mesh.GetFaceDescriptor(k); const Surface * surf = geom.GetSurface(fd.SurfNr()); if (fd.TLOSurface() && geom.GetTopLevelObject(fd.TLOSurface()-1) -> GetBCProp() > 0) fd.SetBCProperty (geom.GetTopLevelObject(fd.TLOSurface()-1) -> GetBCProp()); else if (surf -> GetBCProperty() != -1) fd.SetBCProperty (surf->GetBCProperty()); else { bccnt++; fd.SetBCProperty (bccnt); increased = true; } for (int l = 0; l < geom.bcmodifications.Size(); l++) { if (geom.GetSurfaceClassRepresentant (fd.SurfNr()) == geom.GetSurfaceClassRepresentant (geom.bcmodifications[l].si) && (fd.DomainIn() == geom.bcmodifications[l].tlonr+1 || fd.DomainOut() == geom.bcmodifications[l].tlonr+1)) { if(geom.bcmodifications[l].bcname == NULL) fd.SetBCProperty (geom.bcmodifications[l].bcnr); else { if(!increased) { bccnt++; fd.SetBCProperty (bccnt); increased = true; } } } } } mesh.SetNBCNames( bccnt ); for (int k = 1; k <= mesh.GetNFD(); k++) { FaceDescriptor & fd = mesh.GetFaceDescriptor(k); const Surface * surf = geom.GetSurface(fd.SurfNr()); if (fd.TLOSurface() ) { int bcp = fd.BCProperty(); string nextbcname = geom.GetTopLevelObject(fd.TLOSurface()-1) -> GetBCName(); if ( nextbcname != "default" ) mesh.SetBCName ( bcp - 1 , nextbcname ); } else // if (surf -> GetBCProperty() != -1) { int bcp = fd.BCProperty(); string nextbcname = surf->GetBCName(); if ( nextbcname != "default" ) mesh.SetBCName ( bcp - 1, nextbcname ); } } for (int k = 1; k <= mesh.GetNFD(); k++) { FaceDescriptor & fd = mesh.GetFaceDescriptor(k); fd.SetBCName ( mesh.GetBCNamePtr ( fd.BCProperty() - 1 ) ); } //!! for (int k = 1; k <= mesh.GetNFD(); k++) { FaceDescriptor & fd = mesh.GetFaceDescriptor(k); //const Surface * surf = geom.GetSurface(fd.SurfNr()); for (int l = 0; l < geom.bcmodifications.Size(); l++) { if (geom.GetSurfaceClassRepresentant (fd.SurfNr()) == geom.GetSurfaceClassRepresentant (geom.bcmodifications[l].si) && (fd.DomainIn() == geom.bcmodifications[l].tlonr+1 || fd.DomainOut() == geom.bcmodifications[l].tlonr+1) && geom.bcmodifications[l].bcname != NULL ) { int bcp = fd.BCProperty(); mesh.SetBCName ( bcp - 1, *(geom.bcmodifications[l].bcname) ); fd.SetBCName ( mesh.GetBCNamePtr ( bcp - 1) ); } } } for(int k = 0; k surfs; geom.GetIndependentSurfaceIndices (geom.singfaces[j]->GetSolid(), geom.BoundingBox(), surfs); for (int k = 1; k <= mesh.GetNFD(); k++) { FaceDescriptor & fd = mesh.GetFaceDescriptor(k); for (int l = 0; l < surfs.Size(); l++) if (surfs[l] == fd.SurfNr()) { if (geom.singfaces[j]->GetDomainNr() == fd.DomainIn()) fd.SetDomainInSingular (1); if (geom.singfaces[j]->GetDomainNr() == fd.DomainOut()) fd.SetDomainOutSingular (1); } } } // assemble edge hash-table mesh.CalcSurfacesOfNode(); for (int k = 1; k <= mesh.GetNFD(); k++) { multithread.percent = 100.0 * k / (mesh.GetNFD()+1e-10); if (masterface.Get(k) != k) continue; FaceDescriptor & fd = mesh.GetFaceDescriptor(k); (*testout) << "Surface " << k << endl; (*testout) << "Face Descriptor: " << fd << endl; PrintMessage (1, "Surface ", k, " / ", mesh.GetNFD()); int oldnf = mesh.GetNSE(); const Surface * surf = geom.GetSurface((mesh.GetFaceDescriptor(k).SurfNr())); Meshing2Surfaces meshing(*surf, mparam, geom.BoundingBox()); meshing.SetStartTime (starttime); double eps = 1e-8 * geom.MaxSize(); for (PointIndex pi = PointIndex::BASE; pi < noldp+PointIndex::BASE; pi++) { // if(surf->PointOnSurface(mesh[pi])) meshing.AddPoint (mesh[pi], pi, NULL, (surf->PointOnSurface(mesh[pi], eps) != 0)); } segments.SetSize (0); for (SegmentIndex si = 0; si < mesh.GetNSeg(); si++) if (mesh[si].si == k) { segments.Append (mesh[si]); (*testout) << "appending segment " << mesh[si] << endl; //<< " from " << mesh[mesh[si][0]] // << " to " < BuildSurfaceElements(segments, mesh, surf); } for (int si = 0; si < segments.Size(); si++) { PointGeomInfo gi; gi.trignum = k; meshing.AddBoundaryElement (segments[si][0] + 1 - PointIndex::BASE, segments[si][1] + 1 - PointIndex::BASE, gi, gi); } double maxh = mparam.maxh; if (fd.DomainIn() != 0) { const Solid * s1 = geom.GetTopLevelObject(fd.DomainIn()-1) -> GetSolid(); if (s1->GetMaxH() < maxh) maxh = s1->GetMaxH(); maxh = min2(maxh, geom.GetTopLevelObject(fd.DomainIn()-1)->GetMaxH()); } if (fd.DomainOut() != 0) { const Solid * s1 = geom.GetTopLevelObject(fd.DomainOut()-1) -> GetSolid(); if (s1->GetMaxH() < maxh) maxh = s1->GetMaxH(); maxh = min2(maxh, geom.GetTopLevelObject(fd.DomainOut()-1)->GetMaxH()); } if (fd.TLOSurface() != 0) { double hi = geom.GetTopLevelObject(fd.TLOSurface()-1) -> GetMaxH(); if (hi < maxh) maxh = hi; } (*testout) << "domin = " << fd.DomainIn() << ", domout = " << fd.DomainOut() << ", tlo-surf = " << fd.TLOSurface() << " mpram.maxh = " << mparam.maxh << ", maxh = " << maxh << endl; mparam.checkoverlap = 0; MESHING2_RESULT res = meshing.GenerateMesh (mesh, mparam, maxh, k); if (res != MESHING2_OK) { PrintError ("Problem in Surface mesh generation"); throw NgException ("Problem in Surface mesh generation"); } if (multithread.terminate) return; for (SurfaceElementIndex sei = oldnf; sei < mesh.GetNSE(); sei++) mesh[sei].SetIndex (k); // mesh.CalcSurfacesOfNode(); if (segments.Size()) { // surface was meshed, not copied static int timer = NgProfiler::CreateTimer ("total surface mesh optimization"); NgProfiler::RegionTimer reg (timer); PrintMessage (2, "Optimize Surface"); for (int i = 1; i <= mparam.optsteps2d; i++) { if (multithread.terminate) return; { MeshOptimize2dSurfaces meshopt(geom); meshopt.SetFaceIndex (k); meshopt.SetImproveEdges (0); meshopt.SetMetricWeight (mparam.elsizeweight); meshopt.SetWriteStatus (0); meshopt.EdgeSwapping (mesh, (i > mparam.optsteps2d/2)); } if (multithread.terminate) return; { // mesh.CalcSurfacesOfNode(); MeshOptimize2dSurfaces meshopt(geom); meshopt.SetFaceIndex (k); meshopt.SetImproveEdges (0); meshopt.SetMetricWeight (mparam.elsizeweight); meshopt.SetWriteStatus (0); meshopt.ImproveMesh (mesh, mparam); } { MeshOptimize2dSurfaces meshopt(geom); meshopt.SetFaceIndex (k); meshopt.SetImproveEdges (0); meshopt.SetMetricWeight (mparam.elsizeweight); meshopt.SetWriteStatus (0); meshopt.CombineImprove (mesh); // mesh.CalcSurfacesOfNode(); } if (multithread.terminate) return; { MeshOptimize2dSurfaces meshopt(geom); meshopt.SetFaceIndex (k); meshopt.SetImproveEdges (0); meshopt.SetMetricWeight (mparam.elsizeweight); meshopt.SetWriteStatus (0); meshopt.ImproveMesh (mesh, mparam); } } } PrintMessage (3, (mesh.GetNSE() - oldnf), " elements, ", mesh.GetNP(), " points"); mparam.Render(); } mesh.Compress(); do { changed = 0; for (int k = 1; k <= mesh.GetNFD(); k++) { multithread.percent = 100.0 * k / (mesh.GetNFD()+1e-10); if (masterface.Get(k) == k) continue; FaceDescriptor & fd = mesh.GetFaceDescriptor(k); (*testout) << "Surface " << k << endl; (*testout) << "Face Descriptor: " << fd << endl; PrintMessage (2, "Surface ", k); int oldnf = mesh.GetNSE(); const Surface * surf = geom.GetSurface((mesh.GetFaceDescriptor(k).SurfNr())); /* if (surf -> GetBCProperty() != -1) fd.SetBCProperty (surf->GetBCProperty()); else { bccnt++; fd.SetBCProperty (bccnt); } */ segments.SetSize (0); for (int i = 1; i <= mesh.GetNSeg(); i++) { Segment * seg = &mesh.LineSegment(i); if (seg->si == k) segments.Append (*seg); } for (int i = 1; i <= geom.identifications.Size(); i++) { geom.identifications.Elem(i)->GetIdentifiedFaces (fpairs); int found = 0; for (int j = 1; j <= fpairs.Size(); j++) if (fpairs.Get(j).I1() == k || fpairs.Get(j).I2() == k) found = 1; if (!found) continue; geom.identifications.Get(i)-> BuildSurfaceElements(segments, mesh, surf); if (!segments.Size()) break; } if (multithread.terminate) return; for (SurfaceElementIndex sei = oldnf; sei < mesh.GetNSE(); sei++) mesh[sei].SetIndex (k); if (!segments.Size()) { masterface.Elem(k) = k; changed = 1; } PrintMessage (3, (mesh.GetNSE() - oldnf), " elements, ", mesh.GetNP(), " points"); } mparam.Render(); } while (changed); mesh.SplitSeparatedFaces(); mesh.CalcSurfacesOfNode(); multithread.task = savetask; } int CSGGenerateMesh (CSGeometry & geom, shared_ptr & mesh, MeshingParameters & mparam) { if (mesh && mesh->GetNSE() && !geom.GetNSolids()) { if (mparam.perfstepsstart < MESHCONST_MESHVOLUME) mparam.perfstepsstart = MESHCONST_MESHVOLUME; } if (mparam.perfstepsstart <= MESHCONST_ANALYSE) { if (mesh) mesh -> DeleteMesh(); else mesh = make_shared(); mesh->SetGlobalH (mparam.maxh); mesh->SetMinimalH (mparam.minh); Array maxhdom(geom.GetNTopLevelObjects()); for (int i = 0; i < maxhdom.Size(); i++) maxhdom[i] = geom.GetTopLevelObject(i)->GetMaxH(); mesh->SetMaxHDomain (maxhdom); if (mparam.uselocalh) { double maxsize = geom.MaxSize(); mesh->SetLocalH (Point<3>(-maxsize, -maxsize, -maxsize), Point<3>(maxsize, maxsize, maxsize), mparam.grading); mesh -> LoadLocalMeshSize (mparam.meshsizefilename); for (auto mspnt : mparam.meshsize_points) mesh -> RestrictLocalH (mspnt.pnt, mspnt.h); } spoints.SetSize(0); FindPoints (geom, *mesh); PrintMessage (5, "find points done"); #ifdef LOG_STREAM (*logout) << "Special points found" << endl << "time = " << GetTime() << " sec" << endl << "points: " << mesh->GetNP() << endl << endl; #endif } if (multithread.terminate || mparam.perfstepsend <= MESHCONST_ANALYSE) return TCL_OK; if (mparam.perfstepsstart <= MESHCONST_MESHEDGES) { FindEdges (geom, *mesh, mparam, true); if (multithread.terminate) return TCL_OK; #ifdef LOG_STREAM (*logout) << "Edges meshed" << endl << "time = " << GetTime() << " sec" << endl << "points: " << mesh->GetNP() << endl; #endif if (multithread.terminate) return TCL_OK; if (mparam.uselocalh) { mesh->CalcLocalH(mparam.grading); mesh->DeleteMesh(); FindPoints (geom, *mesh); if (multithread.terminate) return TCL_OK; FindEdges (geom, *mesh, mparam, true); if (multithread.terminate) return TCL_OK; mesh->DeleteMesh(); FindPoints (geom, *mesh); if (multithread.terminate) return TCL_OK; FindEdges (geom, *mesh, mparam); if (multithread.terminate) return TCL_OK; } } if (multithread.terminate || mparam.perfstepsend <= MESHCONST_MESHEDGES) return TCL_OK; if (mparam.perfstepsstart <= MESHCONST_MESHSURFACE) { MeshSurface (geom, *mesh, mparam); if (multithread.terminate) return TCL_OK; #ifdef LOG_STREAM (*logout) << "Surfaces meshed" << endl << "time = " << GetTime() << " sec" << endl << "points: " << mesh->GetNP() << endl; #endif /* if (mparam.uselocalh) { mesh->CalcLocalH(mparam.grading); mesh->DeleteMesh(); FindPoints (geom, *mesh); if (multithread.terminate) return TCL_OK; FindEdges (geom, *mesh, mparam); if (multithread.terminate) return TCL_OK; MeshSurface (geom, *mesh, mparam); if (multithread.terminate) return TCL_OK; } */ #ifdef LOG_STREAM (*logout) << "Surfaces remeshed" << endl << "time = " << GetTime() << " sec" << endl << "points: " << mesh->GetNP() << endl; #endif #ifdef STAT_STREAM (*statout) << mesh->GetNSeg() << " & " << mesh->GetNSE() << " & - &" << GetTime() << " & " << endl; #endif MeshQuality2d (*mesh); mesh->CalcSurfacesOfNode(); } if (multithread.terminate || mparam.perfstepsend <= MESHCONST_OPTSURFACE) return TCL_OK; if (mparam.perfstepsstart <= MESHCONST_MESHVOLUME) { multithread.task = "Volume meshing"; MESHING3_RESULT res = MeshVolume (mparam, *mesh); if (res != MESHING3_OK) return TCL_ERROR; if (multithread.terminate) return TCL_OK; RemoveIllegalElements (*mesh); if (multithread.terminate) return TCL_OK; MeshQuality3d (*mesh); for (int i = 0; i < geom.GetNTopLevelObjects(); i++) mesh->SetMaterial (i+1, geom.GetTopLevelObject(i)->GetMaterial().c_str()); #ifdef STAT_STREAM (*statout) << GetTime() << " & "; #endif #ifdef LOG_STREAM (*logout) << "Volume meshed" << endl << "time = " << GetTime() << " sec" << endl << "points: " << mesh->GetNP() << endl; #endif } if (multithread.terminate || mparam.perfstepsend <= MESHCONST_MESHVOLUME) return TCL_OK; if (mparam.perfstepsstart <= MESHCONST_OPTVOLUME) { multithread.task = "Volume optimization"; OptimizeVolume (mparam, *mesh); if (multithread.terminate) return TCL_OK; #ifdef STAT_STREAM (*statout) << GetTime() << " & " << mesh->GetNE() << " & " << mesh->GetNP() << " " << '\\' << '\\' << " \\" << "hline" << endl; #endif #ifdef LOG_STREAM (*logout) << "Volume optimized" << endl << "time = " << GetTime() << " sec" << endl << "points: " << mesh->GetNP() << endl; #endif } mesh -> OrderElements(); return TCL_OK; } } netgen-6.2.1804/libsrc/csg/explicitcurve2d.cpp0000644000175000017500000000613513272137567017664 0ustar kurtkurt#include #include namespace netgen { ExplicitCurve2d :: ExplicitCurve2d () { ; } void ExplicitCurve2d :: Project (Point<2> & p) const { double t; t = ProjectParam (p); p = Eval (t); } double ExplicitCurve2d :: NumericalProjectParam (const Point<2> & p, double lb, double ub) const { double t(-1); Vec<2> tan; Vec<2> curv; Point<2> cp; double f, fl, fu; int cnt; tan = EvalPrime (lb); cp = Eval (lb); fl = tan * (cp - p); if (fl > 0) // changed by wmf, originally fl >= 0 { // cerr << "tan = " << tan << " cp - p = " << (cp - p) << endl; // cerr << "ExplicitCurve2d::NumericalProject: lb wrong" << endl; return 0; } tan = EvalPrime (ub); cp = Eval (ub); fu = tan * (cp - p); if (fu < 0) // changed by wmf, originally fu <= 0 { // cerr << "tan = " << tan << " cp - p = " << (cp - p) << endl; // cerr << "ExplicitCurve2d::NumericalProject: ub wrong" << endl; return 0; } cnt = 0; while (ub - lb > 1e-12 && fu - fl > 1e-12) { cnt++; if (cnt > 50) { (*testout) << "Num Proj, cnt = " << cnt << endl; } t = (lb * fu - ub * fl) / (fu - fl); if (t > 0.9 * ub + 0.1 * lb) t = 0.9 * ub + 0.1 * lb; if (t < 0.1 * ub + 0.9 * lb) t = 0.1 * ub + 0.9 * lb; tan = EvalPrime (t); cp = Eval (t); f = tan * (cp - p); if (f >= 0) { ub = t; fu = f; } else { lb = t; fl = f; } } return t; } Vec<2> ExplicitCurve2d :: Normal (double t) const { Vec<2> tan = EvalPrime (t); tan.Normalize(); return Vec<2> (tan(1), -tan(0)); } void ExplicitCurve2d :: NormalVector (const Point<2> & p, Vec<2> & n) const { double t = ProjectParam (p); n = Normal (t); } Point<2> ExplicitCurve2d :: CurvCircle (double t) const { Point<2> cp; Vec<2> tan, n, curv; double den; cp = Eval (t); tan = EvalPrime (t); n = Normal (t); curv = EvalPrimePrime (t); den = n * curv; if (fabs (den) < 1e-12) return cp + 1e12 * n; return cp + (tan.Length2() / den) * n; } double ExplicitCurve2d :: MaxCurvature () const { double t, tmin, tmax, dt; double curv; Vec<2> tan; double maxcurv; maxcurv = 0; tmin = MinParam (); tmax = MaxParam (); dt = (tmax - tmin) / 1000; for (t = tmin; t <= tmax+dt; t += dt) if (SectionUsed (t)) { tan = EvalPrime (t); curv = fabs ( (Normal(t) * EvalPrimePrime(t)) / tan.Length2()); if (curv > maxcurv) maxcurv = curv; } return maxcurv; } double ExplicitCurve2d :: MaxCurvatureLoc (const Point<2> & p, double rad) const { double t, tmin, tmax, dt; double curv; Vec<2> tan; double maxcurv; maxcurv = 0; tmin = MinParam (); tmax = MaxParam (); dt = (tmax - tmin) / 1000; for (t = tmin; t <= tmax+dt; t += dt) if (Dist (Eval(t), p) < rad) { tan = EvalPrime (t); curv = fabs ( (Normal(t) * EvalPrimePrime(t)) / tan.Length2()); if (curv > maxcurv) maxcurv = curv; } return maxcurv; } } netgen-6.2.1804/libsrc/csg/specpoin.cpp0000644000175000017500000014071213272137567016370 0ustar kurtkurt#include #include #include /* Special Point calculation uses the global Flags: relydegtest when to rely on degeneration ? calccp calculate points of intersection ? cpeps1 eps for degenerated poi calcep calculate points of extreme coordinates ? epeps1 eps for degenerated edge epeps2 eps for axis parallel pec epspointdist eps for distance of special points */ // #define DEVELOP namespace netgen { Array > boxes; void ProjectToEdge (const Surface * f1, const Surface * f2, Point<3> & hp); enum { check_crosspoint = 5 }; SpecialPoint :: SpecialPoint (const SpecialPoint & sp) { p = sp.p; v = sp.v; s1 = sp.s1; s2 = sp.s2; s1_orig = sp.s1_orig; s2_orig = sp.s2_orig; layer = sp.layer; unconditional = sp.unconditional; } SpecialPoint & SpecialPoint :: operator= (const SpecialPoint & sp) { p = sp.p; v = sp.v; s1 = sp.s1; s2 = sp.s2; s1_orig = sp.s1_orig; s2_orig = sp.s2_orig; layer = sp.layer; unconditional = sp.unconditional; return *this; } void SpecialPoint :: Print (ostream & str) const { str << "p = " << p << " v = " << v << " s1/s2 = " << s1 << "/" << s2; str << " layer = " << layer << " unconditional = " << unconditional << endl; } static Array numprim_hist; SpecialPointCalculation :: SpecialPointCalculation () { ideps = 1e-9; } void SpecialPointCalculation :: CalcSpecialPoints (const CSGeometry & ageometry, Array & apoints) { static int timer = NgProfiler::CreateTimer ("CSG: find special points"); NgProfiler::RegionTimer reg (timer); geometry = &ageometry; points = &apoints; size = geometry->MaxSize(); (*testout) << "Find Special Points" << endl; (*testout) << "maxsize = " << size << endl; cpeps1 = 1e-6; epeps1 = 1e-3; epeps2 = 1e-6; epspointdist2 = sqr (size * 1e-8); relydegtest = size * 1e-4; BoxSphere<3> box (Point<3> (-size, -size, -size), Point<3> ( size, size, size)); box.CalcDiamCenter(); PrintMessage (3, "main-solids: ", geometry->GetNTopLevelObjects()); numprim_hist.SetSize (geometry->GetNSurf()+1); numprim_hist = 0; for (int i = 0; i < geometry->GetNTopLevelObjects(); i++) { const TopLevelObject * tlo = geometry->GetTopLevelObject(i); (*testout) << "tlo " << i << ":" << endl << *tlo->GetSolid() << endl; if (tlo->GetSolid()) { Array > hpts; tlo->GetSolid()->CalcOnePrimitiveSpecialPoints (box, hpts); // if (hpts.Size()) // cout << "oneprimitivespecialpoints = " << hpts << endl; for (int j = 0; j < hpts.Size(); j++) AddPoint (hpts[j], tlo->GetLayer()); } CalcSpecialPointsRec (tlo->GetSolid(), tlo->GetLayer(), box, 1, 1, 1); } geometry->DeleteIdentPoints(); for (int i = 0; i < geometry->GetNIdentifications(); i++) { CloseSurfaceIdentification * ident = dynamic_cast(geometry->identifications[i]); if(!ident || !ident->IsSkewIdentification()) continue; for(int j=0; jSize(); j++) { if(fabs(ident->GetSurface1().CalcFunctionValue((*points)[j])) < 1e-15) { Point<3> auxpoint = (*points)[j]; ident->GetSurface2().SkewProject(auxpoint,ident->GetDirection()); geometry->AddIdentPoint(auxpoint); geometry->AddIdentPoint((*points)[j]); AddPoint (auxpoint,1); #ifdef DEVELOP (*testout) << "added identpoint " << auxpoint << "; proj. of " << (*points)[j] << endl; #endif break; } } } // add user point: for (int i = 0; i < geometry->GetNUserPoints(); i++) AddPoint (geometry->GetUserPoint(i), 1); PrintMessage (3, "Found points ", apoints.Size()); for (int i = 0; i < boxesinlevel.Size(); i++) (*testout) << "level " << i << " has " << boxesinlevel[i] << " boxes" << endl; (*testout) << "numprim_histogramm = " << endl << numprim_hist << endl; } void SpecialPointCalculation :: CalcSpecialPointsRec (const Solid * sol, int layer, const BoxSphere<3> & box, int level, bool calccp, bool calcep) { // boxes.Append (box); #ifdef DEVELOP *testout << "lev " << level << ", box = " << box << endl; *testout << "calccp = " << calccp << ", calcep = " << calcep << endl; *testout << "locsol = " << *sol << endl; #endif if (multithread.terminate) { *testout << "boxes = " << boxes << endl; *testout << "boxesinlevel = " << boxesinlevel << endl; throw NgException ("Meshing stopped"); } if (!sol) return; if (level >= 100) { MyStr err = MyStr("Problems in CalcSpecialPoints\nPoint: ") + MyStr (box.Center()); throw NgException (err.c_str()); } if (level == 40 || level == 41 || level == 45) { *testout << "level = " << level << " cp = " << calccp << " ep = " << calcep << ", box = " << box << ", solid = " << *sol << endl; } bool decision; bool possiblecrossp, possibleexp; // possible cross or extremalpoint bool surecrossp = 0, sureexp = 0; // sure ... // static Array locsurf; // attention: array is static ArrayMem locsurf; // static int cntbox = 0; // cntbox++; if (level <= boxesinlevel.Size()) boxesinlevel.Elem(level)++; else boxesinlevel.Append (1); /* numprim = sol -> NumPrimitives(); sol -> GetSurfaceIndices (locsurf); */ geometry -> GetIndependentSurfaceIndices (sol, box, locsurf); int numprim = locsurf.Size(); #ifdef DEVELOP (*testout) << "numprim = " << numprim << endl; #endif numprim_hist[numprim]++; Point<3> p = box.Center(); // explicit solution for planes only and at most one quadratic if (numprim <= check_crosspoint) { int nplane = 0, nquad = 0, quadi = -1, nsphere = 0; const QuadraticSurface *qsurf = 0, *qsurfi; for (int i = 0; i < numprim; i++) { qsurfi = dynamic_cast (geometry->GetSurface(locsurf[i])); if (qsurfi) nquad++; if (dynamic_cast (qsurfi)) nplane++; else { quadi = i; qsurf = qsurfi; } if (dynamic_cast (qsurfi)) nsphere++; } /* if (nquad == numprim && nplane == numprim-2) return; */ #ifdef DEVELOP (*testout) << "nquad " << nquad << " nplane " << nplane << endl; #endif if (nquad == numprim && nplane >= numprim-1) { Array > pts; Array surfids; for (int k1 = 0; k1 < numprim - 2; k1++) for (int k2 = k1 + 1; k2 < numprim - 1; k2++) for (int k3 = k2 + 1; k3 < numprim; k3++) if (k1 != quadi && k2 != quadi && k3 != quadi) { ComputeCrossPoints (dynamic_cast (geometry->GetSurface(locsurf[k1])), dynamic_cast (geometry->GetSurface(locsurf[k2])), dynamic_cast (geometry->GetSurface(locsurf[k3])), pts); for (int j = 0; j < pts.Size(); j++) if (Dist (pts[j], box.Center()) < box.Diam()/2) { Solid * tansol; sol -> TangentialSolid (pts[j], tansol, surfids, 1e-9*size); if(!tansol) continue; bool ok1 = false, ok2 = false, ok3 = false; int rep1 = geometry->GetSurfaceClassRepresentant(locsurf[k1]); int rep2 = geometry->GetSurfaceClassRepresentant(locsurf[k2]); int rep3 = geometry->GetSurfaceClassRepresentant(locsurf[k3]); for(int jj=0; jjGetSurfaceClassRepresentant(surfids[jj]); if(actrep == rep1) ok1 = true; if(actrep == rep2) ok2 = true; if(actrep == rep3) ok3 = true; } if (tansol && ok1 && ok2 && ok3) // if (sol -> IsIn (pts[j], 1e-6*size) && !sol->IsStrictIn (pts[j], 1e-6*size)) { if (AddPoint (pts[j], layer)) (*testout) << "cross point found, 1: " << pts[j] << endl; } delete tansol; } } if (qsurf) { for (int k1 = 0; k1 < numprim - 1; k1++) for (int k2 = k1 + 1; k2 < numprim; k2++) if (k1 != quadi && k2 != quadi) { ComputeCrossPoints (dynamic_cast (geometry->GetSurface(locsurf[k1])), dynamic_cast (geometry->GetSurface(locsurf[k2])), qsurf, pts); //(*testout) << "checking pot. crosspoints: " << pts << endl; for (int j = 0; j < pts.Size(); j++) if (Dist (pts[j], box.Center()) < box.Diam()/2) { Solid * tansol; sol -> TangentialSolid (pts[j], tansol, surfids, 1e-9*size); if(!tansol) continue; bool ok1 = false, ok2 = false, ok3 = true;//false; int rep1 = geometry->GetSurfaceClassRepresentant(locsurf[k1]); int rep2 = geometry->GetSurfaceClassRepresentant(locsurf[k2]); //int rep3 = geometry->GetSurfaceClassRepresentant(quadi); for(int jj=0; jjGetSurfaceClassRepresentant(surfids[jj]); if(actrep == rep1) ok1 = true; if(actrep == rep2) ok2 = true; //if(actrep == rep3) ok3 = true; } if (tansol && ok1 && ok2 && ok3) //if (sol -> IsIn (pts[j], 1e-6*size) && !sol->IsStrictIn (pts[j], 1e-6*size) ) { if (AddPoint (pts[j], layer)) (*testout) << "cross point found, 2: " << pts[j] << endl; } delete tansol; } } for (int k1 = 0; k1 < numprim; k1++) if (k1 != quadi) { ComputeExtremalPoints (dynamic_cast (geometry->GetSurface(locsurf[k1])), qsurf, pts); for (int j = 0; j < pts.Size(); j++) if (Dist (pts[j], box.Center()) < box.Diam()/2) { Solid * tansol; sol -> TangentialSolid (pts[j], tansol, surfids, 1e-9*size); if (tansol) // sol -> IsIn (pts[j], 1e-6*size) && !sol->IsStrictIn (pts[j], 1e-6*size) ) { if (AddPoint (pts[j], layer)) (*testout) << "extremal point found, 1: " << pts[j] << endl; } delete tansol; } } } return; } if (nsphere == numprim) // && calccp == false) { Array > pts; Array surfids; for (int k1 = 0; k1 < numprim; k1++) for (int k2 = 0; k2 < k1; k2++) for (int k3 = 0; k3 < k2; k3++) { ComputeCrossPoints (dynamic_cast (geometry->GetSurface(locsurf[k1])), dynamic_cast (geometry->GetSurface(locsurf[k2])), dynamic_cast (geometry->GetSurface(locsurf[k3])), pts); for (int j = 0; j < pts.Size(); j++) if (Dist (pts[j], box.Center()) < box.Diam()/2) { Solid * tansol; sol -> TangentialSolid (pts[j], tansol, surfids, 1e-9*size); if(!tansol) continue; bool ok1 = false, ok2 = false, ok3 = false; int rep1 = geometry->GetSurfaceClassRepresentant(locsurf[k1]); int rep2 = geometry->GetSurfaceClassRepresentant(locsurf[k2]); int rep3 = geometry->GetSurfaceClassRepresentant(locsurf[k3]); for(int jj=0; jjGetSurfaceClassRepresentant(surfids[jj]); if(actrep == rep1) ok1 = true; if(actrep == rep2) ok2 = true; if(actrep == rep3) ok3 = true; } if (tansol && ok1 && ok2 && ok3) // if (sol -> IsIn (pts[j], 1e-6*size) && !sol->IsStrictIn (pts[j], 1e-6*size)) { if (AddPoint (pts[j], layer)) (*testout) << "cross point found, 1: " << pts[j] << endl; } delete tansol; } } for (int k1 = 0; k1 < numprim; k1++) for (int k2 = 0; k2 < k1; k2++) { ComputeExtremalPoints (dynamic_cast (geometry->GetSurface(locsurf[k1])), dynamic_cast (geometry->GetSurface(locsurf[k2])), pts); for (int j = 0; j < pts.Size(); j++) if (Dist (pts[j], box.Center()) < box.Diam()/2) { Solid * tansol; sol -> TangentialSolid (pts[j], tansol, surfids, 1e-9*size); if (tansol) // sol -> IsIn (pts[j], 1e-6*size) && !sol->IsStrictIn (pts[j], 1e-6*size) ) { if (AddPoint (pts[j], layer)) (*testout) << "extremal point found, spheres: " << pts[j] << endl; } delete tansol; } } return; } } possiblecrossp = (numprim >= 3) && calccp; surecrossp = 0; if (possiblecrossp && (locsurf.Size() <= check_crosspoint || level > 50)) { decision = 1; surecrossp = 0; for (int k1 = 1; k1 <= locsurf.Size() - 2; k1++) for (int k2 = k1 + 1; k2 <= locsurf.Size() - 1; k2++) for (int k3 = k2 + 1; k3 <= locsurf.Size(); k3++) { int nc, deg; nc = CrossPointNewtonConvergence (geometry->GetSurface(locsurf.Get(k1)), geometry->GetSurface(locsurf.Get(k2)), geometry->GetSurface(locsurf.Get(k3)), box ); deg = CrossPointDegenerated (geometry->GetSurface(locsurf.Get(k1)), geometry->GetSurface(locsurf.Get(k2)), geometry->GetSurface(locsurf.Get(k3)), box ); #ifdef DEVELOP (*testout) << "k1,2,3 = " << k1 << "," << k2 << "," << k3 << ", nc = " << nc << ", deg = " << deg << endl; #endif if (!nc && !deg) decision = 0; if (nc) surecrossp = 1; } #ifdef DEVELOP (*testout) << "dec = " << decision << ", surcp = " << surecrossp << endl; #endif if (decision && surecrossp) { for (int k1 = 1; k1 <= locsurf.Size() - 2; k1++) for (int k2 = k1 + 1; k2 <= locsurf.Size() - 1; k2++) for (int k3 = k2 + 1; k3 <= locsurf.Size(); k3++) { if (CrossPointNewtonConvergence (geometry->GetSurface(locsurf.Get(k1)), geometry->GetSurface(locsurf.Get(k2)), geometry->GetSurface(locsurf.Get(k3)), box ) ) { Point<3> pp = p; CrossPointNewton (geometry->GetSurface(locsurf.Get(k1)), geometry->GetSurface(locsurf.Get(k2)), geometry->GetSurface(locsurf.Get(k3)), pp); BoxSphere<3> hbox (pp, pp); hbox.Increase (1e-8*size); if (pp(0) > box.PMin()(0) - 1e-5*size && pp(0) < box.PMax()(0) + 1e-5*size && pp(1) > box.PMin()(1) - 1e-5*size && pp(1) < box.PMax()(1) + 1e-5*size && pp(2) > box.PMin()(2) - 1e-5*size && pp(2) < box.PMax()(2) + 1e-5*size && sol -> IsIn (pp, 1e-6*size) && !sol->IsStrictIn (pp, 1e-6*size) && !CrossPointDegenerated (geometry->GetSurface(locsurf.Get(k1)), geometry->GetSurface(locsurf.Get(k2)), geometry->GetSurface(locsurf.Get(k3)), hbox )) { // AddCrossPoint (locsurf, sol, p); BoxSphere<3> boxp (pp, pp); boxp.Increase (1e-3*size); boxp.CalcDiamCenter(); Array locsurf2; geometry -> GetIndependentSurfaceIndices (sol, boxp, locsurf2); bool found1 = false, found2 = false, found3 = false; for (int i = 0; i < locsurf2.Size(); i++) { if (locsurf2[i] == locsurf.Get(k1)) found1 = true; if (locsurf2[i] == locsurf.Get(k2)) found2 = true; if (locsurf2[i] == locsurf.Get(k3)) found3 = true; } if (found1 && found2 && found3) if (AddPoint (pp, layer)) { (*testout) << "Crosspoint found: " << pp << " diam = " << box.Diam() << ", surfs: " << locsurf.Get(k1) << "," << locsurf.Get(k2) << "," << locsurf.Get(k3) << endl; } } } } } if (decision) possiblecrossp = 0; } possibleexp = (numprim >= 2) && calcep; // (*testout) << "l = " << level << "locsize = " << locsurf.Size() << " possexp = " << possibleexp << "\n"; if (possibleexp && (numprim <= check_crosspoint || level >= 50)) { decision = 1; sureexp = 0; /* (*testout) << "extremal surfs = "; for (int k5 = 0; k5 < locsurf.Size(); k5++) (*testout) << typeid(*geometry->GetSurface(locsurf[k5])).name() << " "; (*testout) << "\n"; */ for (int k1 = 0; k1 < locsurf.Size() - 1; k1++) for (int k2 = k1+1; k2 < locsurf.Size(); k2++) { const Surface * surf1 = geometry->GetSurface(locsurf[k1]); const Surface * surf2 = geometry->GetSurface(locsurf[k2]); /* (*testout) << "edgecheck, types = " << typeid(*surf1).name() << ", " << typeid(*surf2).name() << "edge-newton-conv = " << EdgeNewtonConvergence (surf1, surf2, p) << "edge-deg = " << EdgeDegenerated (surf1, surf2, box) << "\n"; */ if (EdgeNewtonConvergence (surf1, surf2, p) ) sureexp = 1; else { if (!EdgeDegenerated (surf1, surf2, box)) decision = 0; } } // (*testout) << "l = " << level << " dec/sureexp = " << decision << sureexp << endl; if (decision && sureexp) { for (int k1 = 0; k1 < locsurf.Size() - 1; k1++) for (int k2 = k1+1; k2 < locsurf.Size(); k2++) { const Surface * surf1 = geometry->GetSurface(locsurf[k1]); const Surface * surf2 = geometry->GetSurface(locsurf[k2]); if (EdgeNewtonConvergence (surf1, surf2, p)) { EdgeNewton (surf1, surf2, p); Point<3> pp; if (IsEdgeExtremalPoint (surf1, surf2, p, pp, box.Diam()/2)) { (*testout) << "extremalpoint (nearly) found:" << pp << "box.diam = " << box.Diam() << ", dist = " << Dist(pp,box.Center()) << endl; if (Dist (pp, box.Center()) < box.Diam()/2 && sol -> IsIn (pp, 1e-6*size) && !sol->IsStrictIn (pp, 1e-6*size) ) { if (AddPoint (pp, layer)) (*testout) << "Extremal point found: " << pp << endl;//"(eps="<<1e-9*size<<")"<< endl; } } } } } if (decision) possibleexp = 0; } // (*testout) << "l = " << level << " poss cp/ep sure exp = " << possiblecrossp << " " << possibleexp << " " << sureexp << "\n"; if (possiblecrossp || possibleexp) { BoxSphere<3> sbox; for (int i = 0; i < 8; i++) { box.GetSubBox (i, sbox); sbox.Increase (1e-4 * sbox.Diam()); sbox.CalcDiamCenter(); Solid * redsol = sol -> GetReducedSolid (sbox); if (redsol) { CalcSpecialPointsRec (redsol, layer, sbox, level+1, calccp, calcep); delete redsol; } } } } /******* Tests for Point of intersection **********************/ bool SpecialPointCalculation :: CrossPointNewtonConvergence (const Surface * f1, const Surface * f2, const Surface * f3, const BoxSphere<3> & box) { Vec<3> grad, rs, x; Mat<3> jacobi, inv; Point<3> p = box.Center(); f1->CalcGradient (p, grad); jacobi(0,0) = grad(0); jacobi(0,1) = grad(1); jacobi(0,2) = grad(2); f2->CalcGradient (p, grad); jacobi(1,0) = grad(0); jacobi(1,1) = grad(1); jacobi(1,2) = grad(2); f3->CalcGradient (p, grad); jacobi(2,0) = grad(0); jacobi(2,1) = grad(1); jacobi(2,2) = grad(2); if (fabs (Det (jacobi)) > 1e-8) { double gamma = f1 -> HesseNorm() + f2 -> HesseNorm() + f3 -> HesseNorm(); if (gamma == 0.0) return 1; CalcInverse (jacobi, inv); rs(0) = f1->CalcFunctionValue (p); rs(1) = f2->CalcFunctionValue (p); rs(2) = f3->CalcFunctionValue (p); x = inv * rs; double beta = 0; for (int i = 0; i < 3; i++) { double sum = 0; for (int j = 0; j < 3; j++) sum += fabs (inv(i,j)); if (sum > beta) beta = sum; } double eta = Abs (x); #ifdef DEVELOP *testout << "check Newton: " << "beta = " << beta << ", gamma = " << gamma << ", eta = " << eta << endl; double rad = 1.0 / (beta * gamma); *testout << "rad = " << rad << endl; *testout << "rs = " << rs << endl; #endif return (beta * gamma * eta < 0.1) && (2 > box.Diam()*beta*gamma); } return 0; } bool SpecialPointCalculation :: CrossPointDegenerated (const Surface * f1, const Surface * f2, const Surface * f3, const BoxSphere<3> & box) const { Mat<3> mat; Vec<3> g1, g2, g3; double normprod; if (box.Diam() > relydegtest) return 0; f1->CalcGradient (box.Center(), g1); normprod = Abs2 (g1); f2->CalcGradient (box.Center(), g2); normprod *= Abs2 (g2); f3->CalcGradient (box.Center(), g3); normprod *= Abs2 (g3); for (int i = 0; i < 3; i++) { mat(i,0) = g1(i); mat(i,1) = g2(i); mat(i,2) = g3(i); } return sqr (Det (mat)) < sqr(cpeps1) * normprod; } void SpecialPointCalculation :: CrossPointNewton (const Surface * f1, const Surface * f2, const Surface * f3, Point<3> & p) { Vec<3> g1, g2, g3; Vec<3> rs, sol; Mat<3> mat; int i = 10; while (i > 0) { i--; rs(0) = f1->CalcFunctionValue (p); rs(1) = f2->CalcFunctionValue (p); rs(2) = f3->CalcFunctionValue (p); f1->CalcGradient (p, g1); f2->CalcGradient (p, g2); f3->CalcGradient (p, g3); for (int j = 0; j < 3; j++) { mat(0, j) = g1(j); mat(1, j) = g2(j); mat(2, j) = g3(j); } mat.Solve (rs, sol); if (sol.Length2() < 1e-24 && i > 1) i = 1; #ifdef DEVELOP *testout << "CrossPointNewton, err = " << sol.Length2() << endl; #endif p -= sol; } } /******* Tests for Point on edges **********************/ bool SpecialPointCalculation :: EdgeNewtonConvergence (const Surface * f1, const Surface * f2, const Point<3> & p) { Vec<3> g1, g2, sol; Vec<2> vrs; Mat<2,3> mat; Mat<3,2> inv; f1->CalcGradient (p, g1); f2->CalcGradient (p, g2); if ( sqr(g1 * g2) < (1 - 1e-8) * Abs2 (g1) * Abs2 (g2)) { double gamma = f1 -> HesseNorm() + f2 -> HesseNorm(); if (gamma < 1e-32) return 1; gamma = sqr (gamma); for (int i = 0; i < 3; i++) { mat(0,i) = g1(i); mat(1,i) = g2(i); } CalcInverse (mat, inv); vrs(0) = f1->CalcFunctionValue (p); vrs(1) = f2->CalcFunctionValue (p); sol = inv * vrs; double beta = 0; for (int i = 0; i < 3; i++) for (int j = 0; j < 2; j++) beta += inv(i,j) * inv(i,j); // beta = sqrt (beta); double eta = Abs2 (sol); // alpha = beta * gamma * eta; return (beta * gamma * eta < 0.01); } return 0; } bool SpecialPointCalculation :: EdgeDegenerated (const Surface * f1, const Surface * f2, const BoxSphere<3> & box) const { // perform newton steps. normals parallel ? // if not decidable: return 0 Point<3> p = box.Center(); Vec<3> g1, g2, sol; Vec<2> vrs; Mat<2,3> mat; int i = 20; while (i > 0) { if (Dist2 (p, box.Center()) > sqr(box.Diam())) return 0; i--; vrs(0) = f1->CalcFunctionValue (p); vrs(1) = f2->CalcFunctionValue (p); f1->CalcGradient (p, g1); f2->CalcGradient (p, g2); if ( sqr (g1 * g2) > (1 - 1e-10) * Abs2 (g1) * Abs2 (g2)) return 1; for (int j = 0; j < 3; j++) { mat(0,j) = g1(j); mat(1,j) = g2(j); } mat.Solve (vrs, sol); if (Abs2 (sol) < 1e-24 && i > 1) i = 1; p -= sol; } return 0; } void SpecialPointCalculation :: EdgeNewton (const Surface * f1, const Surface * f2, Point<3> & p) { Vec<3> g1, g2, sol; Vec<2> vrs; Mat<2,3> mat; int i = 10; while (i > 0) { i--; vrs(0) = f1->CalcFunctionValue (p); vrs(1) = f2->CalcFunctionValue (p); f1->CalcGradient (p, g1); f2->CalcGradient (p, g2); //(*testout) << "p " << p << " f1 " << vrs(0) << " f2 " << vrs(1) << " g1 " << g1 << " g2 " << g2 << endl; for (int j = 0; j < 3; j++) { mat(0,j) = g1(j); mat(1,j) = g2(j); } mat.Solve (vrs, sol); if (Abs2 (sol) < 1e-24 && i > 1) i = 1; p -= sol; } } bool SpecialPointCalculation :: IsEdgeExtremalPoint (const Surface * f1, const Surface * f2, const Point<3> & p, Point<3> & pp, double rad) { Vec<3> g1, g2, t, t1, t2; f1->CalcGradient (p, g1); f2->CalcGradient (p, g2); t = Cross (g1, g2); t.Normalize(); Point<3> p1 = p + rad * t; Point<3> p2 = p - rad * t; EdgeNewton (f1, f2, p1); EdgeNewton (f1, f2, p2); f1->CalcGradient (p1, g1); f2->CalcGradient (p1, g2); t1 = Cross (g1, g2); t1.Normalize(); f1->CalcGradient (p2, g1); f2->CalcGradient (p2, g2); t2 = Cross (g1, g2); t2.Normalize(); double val = 1e-8 * rad * rad; for (int j = 0; j < 3; j++) if ( (t1(j) * t2(j) < -val) ) { pp = p; ExtremalPointNewton (f1, f2, j+1, pp); return 1; } return 0; } /********** Tests of Points of extremal coordinates ****************/ void SpecialPointCalculation :: ExtremalPointNewton (const Surface * f1, const Surface * f2, int dir, Point<3> & p) { Vec<3> g1, g2, v, curv; Vec<3> rs, x, y1, y2, y; Mat<3> h1, h2; Mat<3> jacobi; int i = 50; while (i > 0) { i--; rs(0) = f1->CalcFunctionValue (p); rs(1) = f2->CalcFunctionValue (p); f1 -> CalcGradient (p, g1); f2 -> CalcGradient (p, g2); f1 -> CalcHesse (p, h1); f2 -> CalcHesse (p, h2); v = Cross (g1, g2); rs(2) = v(dir-1); jacobi(0,0) = g1(0); jacobi(0,1) = g1(1); jacobi(0,2) = g1(2); jacobi(1,0) = g2(0); jacobi(1,1) = g2(1); jacobi(1,2) = g2(2); switch (dir) { case 1: { y1(0) = 0; y1(1) = g2(2); y1(2) = -g2(1); y2(0) = 0; y2(1) = -g1(2); y2(2) = g1(1); break; } case 2: { y1(0) = -g2(2); y1(1) = 0; y1(2) = g2(0); y2(0) = g1(2); y2(1) = 0; y2(2) = -g1(0); break; } case 3: { y1(0) = g2(1); y1(1) = -g2(0); y1(2) = 0; y2(0) = -g1(1); y2(1) = g1(0); y2(2) = 0; break; } } y = h1 * y1 + h2 * y2; jacobi(2,0) = y(0); jacobi(2,1) = y(1); jacobi(2,2) = y(2); /* (*testout) << "p " << p << " f1 " << rs(0) << " f2 " << rs(1) << endl << " jacobi " << jacobi << endl << " rhs " << rs << endl; */ jacobi.Solve (rs, x); if (Abs2 (x) < 1e-24 && i > 1) { i = 1; } double minval(Abs2(rs)),minfac(1); double startval(minval); for(double fac = 1; fac > 1e-7; fac *= 0.6) { Point<3> testpoint = p-fac*x; rs(0) = f1->CalcFunctionValue (testpoint); rs(1) = f2->CalcFunctionValue (testpoint); f1 -> CalcGradient (testpoint, g1); f2 -> CalcGradient (testpoint, g2); v = Cross (g1, g2); rs(2) = v(dir-1); double val = Abs2(rs); if(val < minval) { minfac = fac; if(val < 0.5 * startval) break; minval = val; } } p -= minfac*x; //p -= x; } if (Abs2 (x) > 1e-20) { (*testout) << "Error: extremum Newton not convergent" << endl; (*testout) << "dir = " << dir << endl; (*testout) << "p = " << p << endl; (*testout) << "x = " << x << endl; } } void SpecialPointCalculation :: ComputeCrossPoints (const Plane * plane1, const Plane * plane2, const Plane * plane3, Array > & pts) { Mat<3> mat; Vec<3> rhs, sol; Point<3> p0(0,0,0); pts.SetSize (0); for (int i = 0; i < 3; i++) { const Plane * pi(NULL); switch (i) { case 0: pi = plane1; break; case 1: pi = plane2; break; case 2: pi = plane3; break; } double val; Vec<3> hvec; val = pi -> CalcFunctionValue(p0); pi -> CalcGradient (p0, hvec); for (int j = 0; j < 3; j++) mat(i,j) = hvec(j); rhs(i) = -val; } if (fabs (Det (mat)) > 1e-8) { mat.Solve (rhs, sol); pts.Append (Point<3> (sol)); } } void SpecialPointCalculation :: ComputeCrossPoints (const Plane * plane1, const Plane * plane2, const QuadraticSurface * quadric, Array > & pts) { Mat<2,3> mat; Mat<3,2> inv; Vec<2> rhs; Vec<3> sol, t; Point<3> p0(0,0,0); pts.SetSize (0); for (int i = 0; i < 2; i++) { const Plane * pi(NULL); switch (i) { case 0: pi = plane1; break; case 1: pi = plane2; break; } double val; Vec<3> hvec; val = pi -> CalcFunctionValue(p0); pi -> CalcGradient (p0, hvec); for (int j = 0; j < 3; j++) mat(i,j) = hvec(j); rhs(i) = -val; } CalcInverse (mat, inv); sol = inv * rhs; t = Cross (mat.Row(0), mat.Row(1)); if (t.Length() > 1e-8) { Point<3> p (sol); // quadratic on p + s t = 0 double quad_a; Vec<3> quad_b; Mat<3> quad_c; quad_a = quadric -> CalcFunctionValue(p); quadric -> CalcGradient (p, quad_b); quadric -> CalcHesse (p, quad_c); double a, b, c; a = quad_a; b = quad_b * t; c = 0.5 * t * (quad_c * t); // a + s b + s^2 c = 0; double disc = b*b-4*a*c; if (disc > 1e-10 * fabs (b)) { disc = sqrt (disc); double s1 = (-b-disc) / (2*c); double s2 = (-b+disc) / (2*c); pts.Append (p + s1 * t); pts.Append (p + s2 * t); } } } void SpecialPointCalculation :: ComputeCrossPoints (const Sphere * sphere1, const Sphere * sphere2, const Sphere * sphere3, Array > & pts) { Mat<2,3> mat; Mat<3,2> inv; Vec<2> rhs; Vec<3> sol, t; Point<3> p0(0,0,0); pts.SetSize (0); Point<3> c1 = sphere1 -> Center(); Point<3> c2 = sphere2 -> Center(); Point<3> c3 = sphere3 -> Center(); double r1 = sphere1 -> Radius(); double r2 = sphere2 -> Radius(); double r3 = sphere3 -> Radius(); Vec<3> a1 = c2-c1; double b1 = 0.5 * (sqr(r1) - sqr(r2) - Abs2(Vec<3> (c1)) + Abs2(Vec<3> (c2)) ); Vec<3> a2 = c3-c1; double b2 = 0.5 * (sqr(r1) - sqr(r3) - Abs2(Vec<3> (c1)) + Abs2(Vec<3> (c3)) ); for (int j = 0; j < 3; j++) { mat(0,j) = a1(j); mat(1,j) = a2(j); } rhs(0) = b1; rhs(1) = b2; CalcInverse (mat, inv); sol = inv * rhs; t = Cross (mat.Row(0), mat.Row(1)); if (t.Length() > 1e-8) { Point<3> p (sol); // quadratic on p + s t = 0 double quad_a; Vec<3> quad_b; Mat<3> quad_c; quad_a = sphere1 -> CalcFunctionValue(p); sphere1 -> CalcGradient (p, quad_b); sphere1 -> CalcHesse (p, quad_c); double a, b, c; a = quad_a; b = quad_b * t; c = 0.5 * t * (quad_c * t); // a + s b + s^2 c = 0; double disc = b*b-4*a*c; if (disc > 1e-10 * fabs (b)) { disc = sqrt (disc); double s1 = (-b-disc) / (2*c); double s2 = (-b+disc) / (2*c); pts.Append (p + s1 * t); pts.Append (p + s2 * t); } } } void SpecialPointCalculation :: ComputeExtremalPoints (const Plane * plane, const QuadraticSurface * quadric, Array > & pts) { // 3 equations: // surf1 = 0 <===> plane_a + plane_b x = 0; // surf2 = 0 <===> quad_a + quad_b x + x^T quad_c x = 0 // (grad 1 x grad 2)(i) = 0 <====> (grad 1 x e_i) . grad_2 = 0 pts.SetSize (0); Point<3> p0(0,0,0); double plane_a, quad_a; Vec<3> plane_b, quad_b, ei; Mat<3> quad_c; plane_a = plane -> CalcFunctionValue(p0); plane -> CalcGradient (p0, plane_b); quad_a = quadric -> CalcFunctionValue(p0); quadric -> CalcGradient (p0, quad_b); quadric -> CalcHesse (p0, quad_c); for (int i = 0; i < 3; i++) for (int j = 0; j < 3; j++) quad_c(i,j) *= 0.5; for (int dir = 0; dir <= 2; dir++) { ei = 0.0; ei(dir) = 1; Vec<3> v1 = Cross (plane_b, ei); // grad_2 . v1 ... linear: double g2v1_c = v1 * quad_b; Vec<3> g2v1_l = 2.0 * (quad_c * v1); // find line of two linear equations: Vec<2> rhs; Vec<3> sol; Mat<2,3> mat; for (int j = 0; j < 3; j++) { mat(0,j) = plane_b(j); mat(1,j) = g2v1_l(j); } rhs(0) = -plane_a; rhs(1) = -g2v1_c; Vec<3> t = Cross (plane_b, g2v1_l); if (Abs2(t) > 0) { mat.Solve (rhs, sol); // solve quadratic equation along line sol + alpha t .... double a = quad_a + quad_b * sol + sol * (quad_c * sol); double b = quad_b * t + 2 * (sol * (quad_c * t)); double c = t * (quad_c * t); // solve a + b alpha + c alpha^2: if (fabs (c) > 1e-32) { double disc = sqr (0.5*b/c) - a/c; if (disc > 0) { disc = sqrt (disc); double alpha1 = -0.5*b/c + disc; double alpha2 = -0.5*b/c - disc; pts.Append (Point<3> (sol+alpha1*t)); pts.Append (Point<3> (sol+alpha2*t)); /* cout << "sol1 = " << sol + alpha1 * t << ", sol2 = " << sol + alpha2 * t << endl; */ } } } } } void SpecialPointCalculation :: ComputeExtremalPoints (const Sphere * sphere1, const Sphere * sphere2, Array > & pts) { // 3 equations: // surf1 = 0 <===> |x-c1|^2 - r1^2 = 0; // surf2 = 0 <===> |x-c2|^2 - r2^2 = 0; // (grad 1 x grad 2)(i) = 0 <====> (x-p1) x (p1-p2) . e_i = 0; pts.SetSize (0); Point<3> c1 = sphere1 -> Center(); Point<3> c2 = sphere2 -> Center(); double r1 = sphere1 -> Radius(); double r2 = sphere2 -> Radius(); /* *testout << "\n\ncompute extremalpoint, sphere-sphere" << endl; *testout << "c1 = " << c1 << ", r1 = " << r1 << endl; *testout << "c2 = " << c2 << ", r2 = " << r2 << endl; *testout << "dist = " << Abs (c2-c1) << ", r1+r2 = " << r1+r2 << endl; */ Vec<3> v12 = c2 - c1; Vec<3> a1, a2; double b1, b2; // eqn: ai . x = bi a1 = v12; b1 = 0.5 * (sqr(r1) - sqr(r2) - Abs2(Vec<3> (c1)) + Abs2(Vec<3> (c2)) ); int dir = 0; for (int j = 1; j < 3; j++) if (fabs (v12(j)) > v12(dir)) dir = j; // *testout << "dir = " << dir << endl; Vec<3> ei = 0.0; ei(dir) = 1; a2 = Cross (v12, ei); b2 = Vec<3>(c1) * a2; Point<3> p0 (0,0,0); double quad_a; Vec<3> quad_b; Mat<3> quad_c; quad_a = sphere1 -> CalcFunctionValue(p0); sphere1 -> CalcGradient (p0, quad_b); sphere1 -> CalcHesse (p0, quad_c); for (int i = 0; i < 3; i++) for (int j = 0; j < 3; j++) quad_c(i,j) *= 0.5; // find line of two linear equations: Vec<2> rhs; Vec<3> sol; Mat<2,3> mat; for (int j = 0; j < 3; j++) { mat(0,j) = a1(j); mat(1,j) = a2(j); } rhs(0) = b1; rhs(1) = b2; // *testout << "mat = " << endl << mat << endl; // *testout << "rhs = " << endl << rhs << endl; Vec<3> t = Cross (a1, a2); if (Abs2(t) > 0) { mat.Solve (rhs, sol); /* *testout << "sol = " << endl << sol << endl; *testout << "a * sol = " << mat * sol << endl; *testout << "c1-sol = " << Abs (Vec<3>(c1)-sol) << endl; *testout << "c2-sol = " << Abs (Vec<3>(c2)-sol) << endl; */ // solve quadratic equation along line sol + alpha t .... double a = quad_a + quad_b * sol + sol * (quad_c * sol); double b = quad_b * t + 2 * (sol * (quad_c * t)); double c = t * (quad_c * t); // solve a + b alpha + c alpha^2: if (fabs (c) > 1e-32) { double disc = sqr (0.5*b/c) - a/c; if (disc > 0) { disc = sqrt (disc); double alpha1 = -0.5*b/c + disc; double alpha2 = -0.5*b/c - disc; pts.Append (Point<3> (sol+alpha1*t)); pts.Append (Point<3> (sol+alpha2*t)); // *testout << "pts = " << endl << pts << endl; /* cout << "sol1 = " << sol + alpha1 * t << ", sol2 = " << sol + alpha2 * t << endl; */ } } } } /* bool SpecialPointCalculation :: ExtremalPointPossible (const Surface * f1, const Surface * f2, int dir, const BoxSphere<3> & box) { double hn1, hn2, gn1, gn2; Point<3> p; Vec<3> g1, g2, v; double f3; double r = box.Diam()/2; p = box.Center(); f1 -> CalcGradient (p, g1); f2 -> CalcGradient (p, g2); gn1 = g1.Length(); gn2 = g2.Length(); hn1 = f1 -> HesseNorm (); hn2 = f2 -> HesseNorm (); v = Cross (g1, g2); f3 = fabs (v(dir-1)); // (*testout) << "f3 = " << f3 << " r = " << r // << "normbound = " // << (hn1 * (gn2 + r * hn2) + hn2 * (gn1 + r * hn1)) << endl; return (f3 <= 3 * r * (hn1 * (gn2 + r * hn2) + hn2 * (gn1 + r * hn1))); } bool SpecialPointCalculation :: ExtremalPointNewtonConvergence (const Surface * f1, const Surface * f2, int dir, const BoxSphere<3> & box) { return box.Diam() < 1e-8; } bool SpecialPointCalculation :: ExtremalPointDegenerated (const Surface * f1, const Surface * f2, int dir, const BoxSphere<3> & box) { double gn1, gn2; Point<3> p; Vec<3> g1, g2, v; double maxderiv; double minv; Vec<3> curv, t; Vec<2> rs, x; Mat<3> h1, h2; Mat<2> a, inv; double leftside; if (box.Diam() > relydegtest) return 0; p = box.Center(); f1 -> CalcGradient (p, g1); f2 -> CalcGradient (p, g2); gn1 = g1.Length(); gn2 = g2.Length(); v = Cross (g1, g2); if (Abs (v) < epeps1 * gn1 * gn2) return 1; // irregular edge f1 -> CalcHesse (p, h1); f2 -> CalcHesse (p, h2); // hn1 = f1 -> HesseNorm (); // hn2 = f2 -> HesseNorm (); t = v; a(0, 0) = g1 * g1; a(0, 1) = a(1, 0) = g1 * g2; a(1, 1) = g2 * g2; rs(0) = g1(dir-1); rs(1) = g2(dir-1); a.Solve (rs, x); // (*testout) << "g1 = " << g1 << " g2 = " << g2 << endl; // (*testout) << "lam = " << x << endl; // (*testout) << "h2 = " << h2 << endl; leftside = fabs (x(0) * ( t * (h1 * t)) + x(1) * ( t * (h2 * t))); // (*testout) << "leftside = " << leftside << endl; if (leftside < epeps2 * Abs2 (v)) return 1; return 0; } */ bool SpecialPointCalculation :: AddPoint (const Point<3> & p, int layer) { for (int i = 0; i < points->Size(); i++) if (Dist2 ( (*points)[i], p) < epspointdist2 && (*points)[i].GetLayer() == layer) return false; points->Append (MeshPoint(p, layer)); PrintMessageCR (3, "Found points ", points->Size()); return true; } void SpecialPointCalculation :: AnalyzeSpecialPoints (const CSGeometry & ageometry, Array & apoints, Array & specpoints) { static int timer = NgProfiler::CreateTimer ("CSG: analyze special points"); NgProfiler::RegionTimer reg (timer); Array surfind, rep_surfind, surfind2, rep_surfind2, surfind3; Array > normalvecs; Vec<3> nsurf = 0.0; Array specpoint2point; specpoints.SetSize (0); geometry = &ageometry; double geomsize = ageometry.MaxSize(); (*testout) << "AnalyzeSpecialPoints\n"; if (!apoints.Size()) return; { /* sort points in the (arbitrary) direction dir important for periodic boundaries: corner points on the left and the right boundary come in the same ordering */ Vec<3> dir(1.2, 1.7, 0.9); Array coord(apoints.Size()); for (int i = 0; i < apoints.Size(); i++) coord[i] = dir * Vec<3> (apoints[i]); QuickSort (coord, apoints); } Box<3> bbox (apoints[0], apoints[0]); for (int i = 1; i < apoints.Size(); i++) bbox.Add (apoints[i]); bbox.Increase (0.1 * bbox.Diam()); (*testout) << "points = " << apoints << endl; Point3dTree searchtree (bbox.PMin(), bbox.PMax()); Array locsearch; for (int si = 0; si < ageometry.GetNTopLevelObjects(); si++) { const TopLevelObject * tlo = ageometry.GetTopLevelObject(si); const Solid * sol = tlo->GetSolid(); const Surface * surf = tlo->GetSurface(); for (int i = 0; i < apoints.Size(); i++) { Point<3> p = apoints[i]; #ifdef DEVELOP *testout << " test point " << p << endl; #endif if (tlo->GetLayer() != apoints[i].GetLayer()) continue; Solid * locsol; sol -> TangentialSolid (p, locsol, surfind, ideps*geomsize); rep_surfind.SetSize (surfind.Size()); int num_indep_surfs = 0; for (int j = 0; j < surfind.Size(); j++) { rep_surfind[j] = ageometry.GetSurfaceClassRepresentant (surfind[j]); bool found = false; for (int k = 0; !found && k < j; k++) found = (rep_surfind[k] == rep_surfind[j]); if(!found) num_indep_surfs++; } #ifdef DEVELOP *testout << "surfs = " << surfind << endl; *testout << "rep_surfs = " << rep_surfind << endl; #endif if (!locsol) continue; // get all surface indices, if (surf) { // locsol -> GetSurfaceIndices (surfind); bool hassurf = 0; for (int m = 0; m < surfind.Size(); m++) if (ageometry.GetSurface(surfind[m]) == surf) hassurf = 1; if (!hassurf) continue; nsurf = surf->GetNormalVector (p); } /* // get independent surfaces of tangential solid BoxSphere<3> box(p,p); box.Increase (1e-6*geomsize); box.CalcDiamCenter(); ageometry.GetIndependentSurfaceIndices (locsol, box, surfind); */ // ageometry.GetIndependentSurfaceIndices (surfind); normalvecs.SetSize(surfind.Size()); for (int j = 0; j < surfind.Size(); j++) normalvecs[j] = ageometry.GetSurface(surfind[j]) -> GetNormalVector(apoints[i]); for (int j = 0; j < normalvecs.Size(); j++) for (int k = 0; k < normalvecs.Size(); k++) { if (rep_surfind[j] == rep_surfind[k]) continue; //if (j == k) continue; Vec<3> t; if (dynamic_cast (ageometry.surf2prim[surfind[j]]) && ageometry.surf2prim[surfind[j]] == ageometry.surf2prim[surfind[k]]) { t = ageometry.surf2prim[surfind[j]] -> SpecialPointTangentialVector (p, surfind[j], surfind[k]); } else { t = Cross (normalvecs[j], normalvecs[k]); } if (Abs2 (t) < 1e-8) continue; #ifdef DEVELOP *testout << " tangential vector " << t << endl; #endif t.Normalize(); // try tangential direction t if (surf && fabs (nsurf * t) > 1e-6) continue; #ifdef DEVELOP *testout << " j " << j << " k " << k << endl; #endif if (!surf) { // compute second order approximation // c(s) = p + s t + s*s/2 t2 Vec<3> gradj, gradk; Mat<3> hessej, hessek; ageometry.GetSurface (surfind[j]) -> CalcGradient (p, gradj); ageometry.GetSurface (surfind[k]) -> CalcGradient (p, gradk); ageometry.GetSurface (surfind[j]) -> CalcHesse (p, hessej); ageometry.GetSurface (surfind[k]) -> CalcHesse (p, hessek); Vec<2> rhs; Vec<3> t2; Mat<2,3> mat; Mat<3,2> inv; for (int l = 0; l < 3; l++) { mat(0,l) = gradj(l); mat(1,l) = gradk(l); } rhs(0) = -t * (hessej * t); rhs(1) = -t * (hessek * t); CalcInverse (mat, inv); t2 = inv * rhs; /* ageometry.GetIndependentSurfaceIndices (locsol, p, t, surfind2); */ Solid * locsol2; locsol -> TangentialSolid3 (p, t, t2, locsol2, surfind2, ideps*geomsize); if (!locsol2) continue; // locsol2 -> GetTangentialSurfaceIndices3 (p, t, t2, surfind2, 1e-9*geomsize); rep_surfind2.SetSize (surfind2.Size()); for (int j2 = 0; j2 < surfind2.Size(); j2++) rep_surfind2[j2] = ageometry.GetSurfaceClassRepresentant (surfind2[j2]); #ifdef DEVELOP (*testout) << "surfind2 = " << endl << surfind2 << endl; #endif Array surfind2_aux(surfind2); ageometry.GetIndependentSurfaceIndices (surfind2_aux); #ifdef DEVELOP (*testout) << "surfind2,rep = " << endl << surfind2_aux << endl; #endif bool ok = true; // intersecting surfaces must be in second order tangential solid /* if (!surfind2.Contains(surfind[j]) || !surfind2.Contains(surfind[k])) ok = false; */ if (!surfind2_aux.Contains(rep_surfind[j]) || !surfind2_aux.Contains(rep_surfind[k])) ok = false; #ifdef DEVELOP (*testout) << "ok,1 = " << ok << endl; #endif // there must be 2 different tangential faces to the edge int cnt_tang_faces = 0; for (int l = 0; l < surfind2.Size(); l++) { Vec<3> nv = ageometry.GetSurface(surfind2[l]) -> GetNormalVector(p); Vec<3> m1 = Cross (t, nv); Vec<3> m2 = -m1; bool isface1 = 0, isface2 = 0; Solid * locsol3; // locsol2 -> TangentialSolid2 (p, m1, locsol3, surfind3, 1e-9*geomsize); locsol -> TangentialEdgeSolid (p, t, t2, m1, locsol3, surfind3, ideps*geomsize); //ageometry.GetIndependentSurfaceIndices (surfind3); if (surfind3.Contains(surfind2[l])) isface1 = 1; delete locsol3; // locsol2 -> TangentialSolid2 (p, m2, locsol3, surfind3, 1e-9*geomsize); locsol -> TangentialEdgeSolid (p, t, t2, m2, locsol3, surfind3, ideps*geomsize); // ageometry.GetIndependentSurfaceIndices (surfind3); if (surfind3.Contains(surfind2[l])) isface2 = 1; delete locsol3; if (isface1 != isface2) cnt_tang_faces++; } #ifdef DEVELOP (*testout) << "cnt_tang = " << cnt_tang_faces << endl; #endif if (cnt_tang_faces < 1) ok = false; delete locsol2; if (!ok) continue; } // edge must be on tangential surface bool isedge = locsol->VectorIn (p, t) && !locsol->VectorStrictIn (p, t); #ifdef DEVELOP (*testout) << "isedge,1 = " << isedge << "\n"; #endif // there must exist at least two different faces on edge if (isedge) { // *testout << "succ 1" << endl; int cnts = 0; for (int m = 0; m < surfind.Size(); m++) { if (fabs (normalvecs[m] * t) > 1e-6) continue; Vec<3> s = Cross (normalvecs[m], t); Vec<3> t2a = t + 0.01 *s; Vec<3> t2b = t - 0.01 *s; bool isface = (locsol->VectorIn (p, t2a, 1e-6*geomsize) && !locsol->VectorStrictIn (p, t2a, 1e-6*geomsize)) || (locsol->VectorIn (p, t2b, 1e-6*geomsize) && !locsol->VectorStrictIn (p, t2b, 1e-6*geomsize)); /* bool isface = (locsol->VectorIn (p, t2a) && !locsol->VectorStrictIn (p, t2a)) || (locsol->VectorIn (p, t2b) && !locsol->VectorStrictIn (p, t2b)); */ if (isface) { cnts++; } } if (cnts < 2) isedge = 0; } if (isedge) { #ifdef DEVELOP *testout << "success" << endl; #endif int spi = -1; const double searchradius = 1e-4*geomsize;//1e-5*geomsize; searchtree.GetIntersecting (apoints[i]-Vec3d(searchradius,searchradius,searchradius), apoints[i]+Vec3d(searchradius,searchradius,searchradius), locsearch); for (int m = 0; m < locsearch.Size(); m++) { if (Dist2 (specpoints[locsearch[m]].p, apoints[i]) < 1e-10*geomsize && Abs2(specpoints[locsearch[m]].v - t) < 1e-8) { spi = locsearch[m]; break; } } if (spi == -1) { specpoints.Append (SpecialPoint()); spi = specpoints.Size()-1; specpoint2point.Append (i); specpoints.Last().unconditional = 0; searchtree.Insert (apoints[i], spi); } if(!specpoints[spi].unconditional) { specpoints[spi].p = apoints[i]; specpoints[spi].v = t; //if (surfind.Size() >= 3) if (num_indep_surfs >= 3) specpoints[spi].unconditional = 1; specpoints[spi].s1 = rep_surfind[j]; specpoints[spi].s2 = rep_surfind[k]; specpoints[spi].s1_orig = surfind[j]; specpoints[spi].s2_orig = surfind[k]; specpoints[spi].layer = apoints[i].GetLayer(); for (int up = 0; up < geometry->GetNUserPoints(); up++) if (Dist (geometry->GetUserPoint(up), apoints[i]) < 1e-8*geomsize) specpoints[spi].unconditional = 1; for (int ip = 0; ip < geometry->GetNIdentPoints(); ip++) if (Dist (geometry->GetIdentPoint(ip), apoints[i]) < 1e-8*geomsize) specpoints[spi].unconditional = 1; } } } delete locsol; } } /* BitArray testuncond (specpoints.Size()); testuncond.Clear(); for(int i = 0; i same; same.Append(i); for(int j = i+1; j & aboundingbox); protected: /// virtual void DefineTransformation (const Point3d & p1, const Point3d & p2, const PointGeomInfo * geominfo1, const PointGeomInfo * geominfo2); /// virtual void TransformToPlain (const Point3d & locpoint, const MultiPointGeomInfo & geominfo, Point2d & plainpoint, double h, int & zone); /// virtual int TransformFromPlain (Point2d & plainpoint, Point3d & locpoint, PointGeomInfo & gi, double h); /// virtual double CalcLocalH (const Point3d & p, double gh) const; }; /// class MeshOptimize2dSurfaces : public MeshOptimize2d { /// const CSGeometry & geometry; public: /// MeshOptimize2dSurfaces (const CSGeometry & ageometry); /// virtual void ProjectPoint (INDEX surfind, Point<3> & p) const; /// virtual void ProjectPoint2 (INDEX surfind, INDEX surfind2, Point<3> & p) const; /// virtual void GetNormalVector(INDEX surfind, const Point<3> & p, Vec<3> & n) const; }; class RefinementSurfaces : public Refinement { const CSGeometry & geometry; public: RefinementSurfaces (const CSGeometry & ageometry); virtual ~RefinementSurfaces (); virtual void PointBetween (const Point<3> & p1, const Point<3> & p2, double secpoint, int surfi, const PointGeomInfo & gi1, const PointGeomInfo & gi2, Point<3> & newp, PointGeomInfo & newgi) const; virtual void PointBetween (const Point<3> & p1, const Point<3> & p2, double secpoint, int surfi1, int surfi2, const EdgePointGeomInfo & ap1, const EdgePointGeomInfo & ap2, Point<3> & newp, EdgePointGeomInfo & newgi) const; virtual Vec<3> GetTangent (const Point<3> & p, int surfi1, int surfi2, const EdgePointGeomInfo & ap1) const; virtual Vec<3> GetNormal (const Point<3> & p, int surfi1, const PointGeomInfo & gi) const; virtual void ProjectToSurface (Point<3> & p, int surfi) const; virtual void ProjectToEdge (Point<3> & p, int surfi1, int surfi2, const EdgePointGeomInfo & egi) const; }; } #endif netgen-6.2.1804/libsrc/csg/splinesurface.cpp0000644000175000017500000000403313272137567017406 0ustar kurtkurt #include namespace netgen { void SplineSurface :: AppendPoint(const Point<3> & p, const double reffac, const bool hpref) { auto pp = p; Project(pp); geompoints.Append(GeomPoint<3>(pp,reffac)); geompoints.Last().hpref = hpref; } void SplineSurface :: AppendSegment(shared_ptr> sp, string & bcname, double amaxh) { splines.Append(sp); bcnames.Append(bcname); maxh.Append(amaxh); } string SplineSurface :: GetBCNameOf (Point<3> p1, Point<3> p2) const { for(int i=0; i(splines[i]->GetPoint(0)); Project(pp1); auto pp2 = Point<3>(splines[i]->GetPoint(1)); Project(pp2); double eps = (p1-p2).Length() * 1e-4; if (((pp1-p1).Length()>> SplineSurface :: CreateCuttingSurfaces() { if(all_cuts) return all_cuts; auto cuttings = make_shared>>(); for (auto cut : *cuts) cuttings->Append(cut); for(int i = 0; i*>(spline.get()); if(lineseg) { auto p1 = Point<3>(spline->GetPoint(0)); Project(p1); auto p2 = Point<3>(spline->GetPoint(1)); Project(p2); auto vec = Vec<3>(p2)-Vec<3>(p1); auto plane = make_shared(p1,-Cross(vec,baseprimitive->GetNormalVector(p1))); if(maxh[i]>0) { plane->SetMaxH(maxh[i]); } cuttings->Append(plane); } else throw NgException("Spline type not implemented for SplineSurface!"); } all_cuts = cuttings; return cuttings; } void SplineSurface :: Print(ostream & str) const { str << "SplineSurface with base " << *baseprimitive << endl; } } netgen-6.2.1804/libsrc/csg/algprim.hpp0000644000175000017500000003004513272137567016205 0ustar kurtkurt#ifndef FILE_ALGPRIM #define FILE_ALGPRIM /**************************************************************************/ /* File: algprim.hpp */ /* Author: Joachim Schoeberl */ /* Date: 1. Dez. 95 */ /**************************************************************************/ namespace netgen { /* Quadric Surfaces (Plane, Sphere, Cylinder) */ /** A quadric surface. surface defined by cxx x^2 + cyy y^2 + czz z^2 + cxy x y + cxz x z + cyz y z + cx x + cy y + cz z + c1 = 0. **/ class QuadraticSurface : public OneSurfacePrimitive { protected: double cxx, cyy, czz, cxy, cxz, cyz, cx, cy, cz, c1; public: virtual double CalcFunctionValue (const Point<3> & point) const; virtual void CalcGradient (const Point<3> & point, Vec<3> & grad) const; virtual void CalcHesse (const Point<3> & point, Mat<3> & hesse) const; /* virtual int RootInBox (const Box<3> & box) const { return 0; } virtual INSOLID_TYPE BoxInSolid (const BoxSphere<3> & box) const { return DOES_INTERSECT; } */ virtual double HesseNorm () const { return cxx + cyy + czz; } virtual Point<3> GetSurfacePoint () const; virtual void Print (ostream & str) const; virtual void Read (istream & ist); void PrintCoeff (ostream & ost) const; }; /// A Plane (i.e., the plane and everything behind it). class Plane : public QuadraticSurface { protected: /// a point in the plane Point<3> p; /// outward normal vector Vec<3> n; double eps_base; public: /// Plane (const Point<3> & ap, Vec<3> an); Point<3> P() const { return p; } Vec<3> N() const { return n; } virtual void GetPrimitiveData (const char *& classname, Array & coeffs) const; virtual void SetPrimitiveData (Array & coeffs); static Primitive * CreateDefault (); virtual Primitive * Copy () const; virtual void Print (ostream & str) const; virtual void Transform (Transformation<3> & trans); virtual int IsIdentic (const Surface & s2, int & inv, double eps) const; /// virtual void DefineTangentialPlane (const Point<3> & ap1, const Point<3> & ap2); /// virtual void ToPlane (const Point<3> & p3d, Point<2> & pplane, double h, int & zone) const; /// virtual void FromPlane (const Point<2> & pplane, Point<3> & p3d, double h) const; /// virtual void Project (Point<3> & p) const; /// virtual INSOLID_TYPE BoxInSolid (const BoxSphere<3> & box) const; /// inline virtual double CalcFunctionValue (const Point<3> & p3d) const {return cx * p3d(0) + cy * p3d(1) + cz * p3d(2) + c1;} /// virtual void CalcGradient (const Point<3> & point, Vec<3> & grad) const; /// virtual void CalcHesse (const Point<3> & point, Mat<3> & hesse) const; /// virtual double HesseNorm () const; /// virtual Point<3> GetSurfacePoint () const; /// virtual void GetTriangleApproximation (TriangleApproximation & tas, const Box<3> & boundingbox, double facets) const; protected: void CalcData(); }; // typedef Plane Plane; /// class Sphere : public QuadraticSurface { /// Point<3> c; /// double r, invr; public: /// Sphere (const Point<3> & ac, double ar); virtual void GetPrimitiveData (const char *& classname, Array & coeffs) const; virtual void SetPrimitiveData (Array & coeffs); static Primitive * CreateDefault (); virtual Primitive * Copy () const; virtual void Transform (Transformation<3> & trans); virtual double CalcFunctionValue (const Point<3> & point) const; virtual int IsIdentic (const Surface & s2, int & inv, double eps) const; /// virtual void DefineTangentialPlane (const Point<3> & ap1, const Point<3> & ap2); /// virtual void ToPlane (const Point<3> & p3d, Point<2> & pplane, double h, int & zone) const; /// virtual void FromPlane (const Point<2> & pplane, Point<3> & p, double h) const; /// virtual void Project (Point<3> & p) const; /// virtual INSOLID_TYPE BoxInSolid (const BoxSphere<3> & box) const; /// virtual double HesseNorm () const; /// virtual Point<3> GetSurfacePoint () const; /// const Point<3> & Center () const { return c; } /// double Radius () const { return r; } /// virtual void GetTriangleApproximation (TriangleApproximation & tas, const Box<3> & bbox, double facets) const; }; /// class Cylinder : public QuadraticSurface { /// Point<3> a, b; /// double r; /// Vec<3> vab; public: Cylinder (const Point<3> & aa, const Point<3> & ab, double ar); Cylinder (Array & coeffs); Point<3> A() const { return a; } Point<3> B() const { return b; } double R() const { return r; } virtual void GetPrimitiveData (const char *& classname, Array & coeffs) const; virtual void SetPrimitiveData (Array & coeffs); static Primitive * CreateDefault (); virtual Primitive * Copy () const; virtual void Print (ostream & str) const; virtual void Transform (Transformation<3> & trans); /// virtual int IsIdentic (const Surface & s2, int & inv, double eps) const; /// virtual void DefineTangentialPlane (const Point<3> & ap1, const Point<3> & ap2); /// virtual void ToPlane (const Point<3> & p, Point<2> & pplane, double h, int & zone) const; /// virtual void FromPlane (const Point<2> & pplane, Point<3> & p, double h) const; /// virtual void Project (Point<3> & p) const; /// virtual INSOLID_TYPE BoxInSolid (const BoxSphere<3> & box) const; /// virtual double HesseNorm () const; /// virtual Point<3> GetSurfacePoint () const; /// virtual void GetTriangleApproximation (TriangleApproximation & tas, const Box<3> & bbox, double facets) const; }; /// class EllipticCylinder : public QuadraticSurface { private: /// Point<3> a; /// Vec<3> vl, vs; /// Vec<3> vab, t0vec, t1vec; /// double vabl, t0, t1; public: /// EllipticCylinder (const Point<3> & aa, const Vec<3> & avl, const Vec<3> & avs); EllipticCylinder (Array & coeffs); // static Primitive * CreateDefault (); virtual void GetPrimitiveData (const char *& classname, Array & coeffs) const; virtual void SetPrimitiveData (Array & coeffs); /// virtual INSOLID_TYPE BoxInSolid (const BoxSphere<3> & box) const; /// virtual double HesseNorm () const; /// virtual Point<3> GetSurfacePoint () const; virtual void GetTriangleApproximation (TriangleApproximation & tas, const Box<3> & bbox, double facets) const; virtual double MaxCurvature () const; virtual double MaxCurvatureLoc (const Point<3> & /* c */ , double /* rad */) const; private: void CalcData(); }; /// class Ellipsoid : public QuadraticSurface { private: /// Point<3> a; /// Vec<3> v1, v2, v3; /// double rmin; public: /// Ellipsoid (const Point<3> & aa, const Vec<3> & av1, const Vec<3> & av2, const Vec<3> & av3); /// virtual INSOLID_TYPE BoxInSolid (const BoxSphere<3> & box) const; /// virtual double HesseNorm () const; /// virtual double MaxCurvature () const; /// virtual Point<3> GetSurfacePoint () const; virtual void GetTriangleApproximation (TriangleApproximation & tas, const Box<3> & bbox, double facets) const; private: void CalcData(); }; /// class Cone : public QuadraticSurface { /// Point<3> a, b; /// double ra, rb, minr; /// Vec<3> vab, t0vec, t1vec; /// double vabl, t0, t1; double cosphi; public: /// Cone (const Point<3> & aa, const Point<3> & ab, double ara, double arb); /// static Primitive * CreateDefault (); virtual void GetPrimitiveData (const char *& classname, Array & coeffs) const; virtual void SetPrimitiveData (Array & coeffs); /// virtual INSOLID_TYPE BoxInSolid (const BoxSphere<3> & box) const; /// virtual double HesseNorm () const; virtual double LocH (const Point<3> & p, double x, double c, const MeshingParameters & mparam, double hmax) const; /// virtual Point<3> GetSurfacePoint () const; virtual void GetTriangleApproximation (TriangleApproximation & tas, const Box<3> & bbox, double facets) const; private: void CalcData(); }; /// /// Elliptic Cone /// Josephat Kalezhi (kalezhi@cbu.ac.zm) /// February 21st, 2018 /// /// class EllipticCone : public QuadraticSurface { Point<3> a; Vec<3> vl, vs; double h, vlr; public: /// EllipticCone (const Point<3> & aa, const Vec<3> & avl, const Vec<3> & avs, double ah, double avlr); static Primitive * CreateDefault (); virtual void GetPrimitiveData (const char *& classname, Array & coeffs) const; virtual void SetPrimitiveData (Array & coeffs); /// virtual INSOLID_TYPE BoxInSolid (const BoxSphere<3> & box) const; /// virtual double HesseNorm () const; virtual double MaxCurvature () const; virtual double MaxCurvatureLoc (const Point<3> & /* c */ , double /* rad */) const; /// virtual Point<3> GetSurfacePoint () const; virtual void GetTriangleApproximation (TriangleApproximation & tas, const Box<3> & bbox, double facets) const; private: void CalcData(); }; /** Torus /// Lorenzo Codecasa (codecasa@elet.polimi.it) /// April 27th, 2005 */ class Torus : public OneSurfacePrimitive { /// center of the torus Point<3> c; /// vector normal to the symmetry plane of the torus Vec<3> n; /// Large radius of the torus double R; /// Small radius of the torus double r; public: /// OK Torus (const Point<3> & ac, const Vec<3> & an, double aR, double ar); /// OK const Point<3> & Center () const { return c; } /// OK const Vec<3> & NormalToPlane () const { return n; } /// OK double LargeRadius () const { return R; } /// OK double SmallRadius () const { return r; } /// OK virtual double CalcFunctionValue (const Point<3> & point) const; /// OK virtual void CalcGradient (const Point<3> & point, Vec<3> & grad) const; /// OK virtual void CalcHesse (const Point<3> & point, Mat<3> & hesse) const; /// OK virtual double HesseNorm () const; /// OK virtual Point<3> GetSurfacePoint () const; /// OK virtual void GetPrimitiveData (const char *& classname, Array & coeffs) const; /// OK virtual void SetPrimitiveData (Array & coeffs); /// OK static Primitive * CreateDefault (); /// OK virtual Primitive * Copy () const; /// OK virtual void Transform (Transformation<3> & trans); /// OK virtual int IsIdentic (const Surface & s2, int & inv, double eps) const; /// OK /// virtual void DefineTangentialPlane (const Point<3> & ap1, // const Point<3> & ap2); /// OK /// virtual void ToPlane (const Point<3> & p3d, /// Point<2> & pplane, /// double h, int & zone) const; /// OK /// virtual void FromPlane (const Point<2> & pplane, // Point<3> & p, double h) const; /// OK /// virtual void Project (Point<3> & p) const; /// OK virtual INSOLID_TYPE BoxInSolid (const BoxSphere<3> & box) const; /// OK virtual void GetTriangleApproximation (TriangleApproximation & tas, const Box<3> & bbox, double facets) const; /// OK virtual void Print (ostream & ist) const; /// OK virtual void Read (istream & ist); }; /// ...end } #endif netgen-6.2.1804/libsrc/csg/meshsurf.cpp0000644000175000017500000001175013272137567016403 0ustar kurtkurt#include #include #include namespace netgen { /* Meshing2Surfaces :: Meshing2Surfaces (const Surface & asurface) : surface(asurface) { ; } */ Meshing2Surfaces :: Meshing2Surfaces (const Surface & asurf, const MeshingParameters & mp, const Box<3> & abb) : Meshing2(mp, abb), surface(asurf), mparam (mp) { ; } void Meshing2Surfaces :: DefineTransformation (const Point3d & p1, const Point3d & p2, const PointGeomInfo * geominfo1, const PointGeomInfo * geominfo2) { ((Surface&)surface).DefineTangentialPlane (p1, p2); } void Meshing2Surfaces :: TransformToPlain (const Point3d & locpoint, const MultiPointGeomInfo & geominfo, Point2d & planepoint, double h, int & zone) { Point<2> hp; surface.ToPlane (locpoint, hp, h, zone); planepoint.X() = hp(0); planepoint.Y() = hp(1); } int Meshing2Surfaces :: TransformFromPlain (Point2d & planepoint, Point3d & locpoint, PointGeomInfo & gi, double h) { Point<3> hp; Point<2> hp2 (planepoint.X(), planepoint.Y()); surface.FromPlane (hp2, hp, h); locpoint = hp; gi.trignum = 1; return 0; } double Meshing2Surfaces :: CalcLocalH (const Point3d & p, double gh) const { return surface.LocH (p, 3, 1, mparam, gh); /* double loch = mesh.lochfunc->GetH(p); if (gh < loch) loch = gh; return loch; */ } MeshOptimize2dSurfaces :: MeshOptimize2dSurfaces (const CSGeometry & ageometry) : MeshOptimize2d(), geometry(ageometry) { ; } void MeshOptimize2dSurfaces :: ProjectPoint (INDEX surfind, Point<3> & p) const { Point<3> hp = p; geometry.GetSurface(surfind)->Project (hp); p = hp; } void MeshOptimize2dSurfaces :: ProjectPoint2 (INDEX surfind, INDEX surfind2, Point<3> & p) const { Point<3> hp = p; ProjectToEdge ( geometry.GetSurface(surfind), geometry.GetSurface(surfind2), hp); p = hp; } void MeshOptimize2dSurfaces :: GetNormalVector(INDEX surfind, const Point<3> & p, Vec<3> & n) const { Vec<3> hn = n; geometry.GetSurface(surfind)->CalcGradient (p, hn); hn.Normalize(); n = hn; /* if (geometry.GetSurface(surfind)->Inverse()) n *= -1; */ } RefinementSurfaces :: RefinementSurfaces (const CSGeometry & ageometry) : Refinement(), geometry(ageometry) { if(geometry.GetNSurf() == 0) *testout << endl << "WARNING: Initializing 2D refinement with 0-surface geometry" << endl << "==========================================================" << endl << endl << endl; } RefinementSurfaces :: ~RefinementSurfaces () { ; } void RefinementSurfaces :: PointBetween (const Point<3> & p1, const Point<3> & p2, double secpoint, int surfi, const PointGeomInfo & gi1, const PointGeomInfo & gi2, Point<3> & newp, PointGeomInfo & newgi) const { Point<3> hnewp; hnewp = p1+secpoint*(p2-p1); if (surfi != -1) { geometry.GetSurface (surfi) -> Project (hnewp); newgi.trignum = 1; } newp = hnewp; } void RefinementSurfaces :: PointBetween (const Point<3> & p1, const Point<3> & p2, double secpoint, int surfi1, int surfi2, const EdgePointGeomInfo & ap1, const EdgePointGeomInfo & ap2, Point<3> & newp, EdgePointGeomInfo & newgi) const { Point<3> hnewp = p1+secpoint*(p2-p1); //(*testout) << "hnewp " << hnewp << " s1 " << surfi1 << " s2 " << surfi2 << endl; if (surfi1 != -1 && surfi2 != -1 && surfi1 != surfi2) { netgen::ProjectToEdge (geometry.GetSurface(surfi1), geometry.GetSurface(surfi2), hnewp); // (*testout) << "Pointbetween, newp = " << hnewp << endl // << ", err = " << sqrt (sqr (hnewp(0))+ sqr(hnewp(1)) + sqr (hnewp(2))) - 1 << endl; newgi.edgenr = 1; //(*testout) << "hnewp (a1) " << hnewp << endl; } else if (surfi1 != -1) { geometry.GetSurface (surfi1) -> Project (hnewp); //(*testout) << "hnewp (a2) " << hnewp << endl; } newp = hnewp; }; Vec<3> RefinementSurfaces :: GetTangent (const Point<3> & p, int surfi1, int surfi2, const EdgePointGeomInfo & ap1) const { Vec<3> n1 = geometry.GetSurface (surfi1)->GetNormalVector (p); Vec<3> n2 = geometry.GetSurface (surfi2)->GetNormalVector (p); Vec<3> tau = Cross (n1, n2).Normalize(); return tau; } Vec<3> RefinementSurfaces :: GetNormal (const Point<3> & p, int surfi1, const PointGeomInfo & gi) const { return geometry.GetSurface (surfi1)->GetNormalVector (p); } void RefinementSurfaces :: ProjectToSurface (Point<3> & p, int surfi) const { if (surfi != -1) geometry.GetSurface (surfi) -> Project (p); }; void RefinementSurfaces :: ProjectToEdge (Point<3> & p, int surfi1, int surfi2, const EdgePointGeomInfo & egi) const { netgen::ProjectToEdge (geometry.GetSurface(surfi1), geometry.GetSurface(surfi2), p); } } netgen-6.2.1804/libsrc/csg/manifold.cpp0000644000175000017500000000015513272137567016335 0ustar kurtkurt#include namespace netgen { Manifold :: Manifold () { ; } Manifold :: ~Manifold () { ; } } netgen-6.2.1804/libsrc/csg/triapprox.hpp0000644000175000017500000000324413272137567016603 0ustar kurtkurt#ifndef FILE_TRIAPPROX #define FILE_TRIAPPROX /**************************************************************************/ /* File: triapprox.hh */ /* Author: Joachim Schoeberl */ /* Date: 2. Mar. 98 */ /**************************************************************************/ namespace netgen { /** Triangulated approximation to true surface */ class TATriangle { int pi[3]; int surfind; public: TATriangle () { ; } TATriangle (int si, int pi1, int pi2, int pi3) { surfind = si; pi[0] = pi1; pi[1] = pi2; pi[2] = pi3; } int SurfaceIndex() const { return surfind; } int & SurfaceIndex() { return surfind; } int & operator[] (int i) { return pi[i]; } const int & operator[] (int i) const { return pi[i]; } }; class TriangleApproximation { Array > points; Array > normals; Array trigs; public: TriangleApproximation(); int GetNP () const { return points.Size(); } int GetNT () const { return trigs.Size(); } int AddPoint (const Point<3> & p) { points.Append (p); return points.Size()-1; } int AddNormal (const Vec<3> & n) { normals.Append (n); return normals.Size()-1; } int AddTriangle (const TATriangle & tri, bool invert = 0); const Point<3> & GetPoint (int i) const { return points[i]; } const TATriangle & GetTriangle (int i) const { return trigs[i]; } const Vec<3> & GetNormal (int i) const { return normals[i]; } void RemoveUnusedPoints (); friend class CSGeometry; }; } #endif netgen-6.2.1804/libsrc/csg/csgparser.cpp0000644000175000017500000007460313272137567016546 0ustar kurtkurt#include #include #include #include namespace netgen { static kwstruct defkw[] = { { TOK_RECO, "algebraic3d" }, { TOK_SOLID, "solid" }, { TOK_TLO, "tlo" }, { TOK_CURVE2D, "curve2d" }, { TOK_CURVE3D, "curve3d" }, { TOK_BOUNDINGBOX, "boundingbox" }, { TOK_OR, "or" }, { TOK_AND, "and" }, { TOK_NOT, "not" }, { TOK_SINGULAR, "singular" }, { TOK_EDGE, "edge" }, { TOK_FACE, "face" }, { TOK_POINT, "point" }, { TOK_IDENTIFY, "identify" }, { TOK_CLOSESURFACES, "closesurfaces" }, { TOK_CLOSEEDGES, "closeedges" }, { TOK_PERIODIC, "periodic" }, { TOK_BOUNDARYCONDITION, "boundarycondition" }, { TOK_BOUNDARYCONDITIONNAME, "boundaryconditionname" }, { TOK_DEFINE, "define" }, { TOK_CONSTANT, "constant" }, { TOKEN_TYPE(0), 0 } }; static primstruct defprim[] = { { TOK_PLANE, "plane" }, { TOK_SPHERE, "sphere" }, { TOK_CYLINDER, "cylinder" }, { TOK_CONE, "cone" }, { TOK_ELLIPTICCONE, "ellipticcone" }, { TOK_ELLIPTICCYLINDER, "ellipticcylinder" }, { TOK_ELLIPSOID, "ellipsoid" }, { TOK_ORTHOBRICK, "orthobrick" }, { TOK_POLYHEDRON, "polyhedron" }, { TOK_TORUS, "torus" }, { TOK_TUBE, "tube" }, { TOK_GENCYL, "gencyl" }, { TOK_EXTRUSION, "extrusion" }, { TOK_REVOLUTION, "revolution" }, { TOK_TRANSLATE, "translate" }, { TOK_MULTITRANSLATE, "multitranslate" }, { TOK_ROTATE, "rotate" }, { TOK_MULTIROTATE, "multirotate" }, { PRIMITIVE_TYPE(0), 0 } }; static CSGeometry * geom; CSGScanner :: CSGScanner (istream & ascanin) { scanin = &ascanin; token = TOK_END; num_value = 0; linenum = 1; } void CSGScanner :: ReadNext () { char ch; // scan whitespaces do { scanin->get(ch); //if (ch == '\n') // linenum++; // end of file reached if (scanin->eof()) { token = TOK_END; return; } if (ch == '\n') linenum++; // skip comment line if (ch == '#') { while (ch != '\n') { scanin->get(ch); if (scanin->eof()) { token = TOK_END; return; } } linenum++; } } while (isspace(ch)); switch (ch) { case '(': case ')': case '[': case ']': case '-': case '=': case ',': case ';': { token = TOKEN_TYPE (ch); break; } default: { if (isdigit (ch) || ch == '.') { scanin->putback (ch); (*scanin) >> num_value; token = TOK_NUM; return; } if (isalpha (ch)) { string_value = string (1, ch); scanin->get(ch); while (isalnum(ch) || ch == '_') { string_value += ch; scanin->get(ch); } scanin->putback (ch); } int nr = 0; while (defkw[nr].kw) { if (string_value == defkw[nr].name) { token = defkw[nr].kw; return; } nr++; } nr = 0; while (defprim[nr].kw) { if (string_value == defprim[nr].name) { token = TOK_PRIMITIVE; prim_token = defprim[nr].kw; return; } nr++; } token = TOK_STRING; } } } void CSGScanner :: Error (const string & err) { stringstream errstr; errstr << "Parsing error in line " << linenum << ": " << endl << err << endl; throw string(errstr.str()); } /* Solid = Term { OR Term } Term = Primary { AND Primary } Primary = PRIM | IDENT | ( Solid ) | NOT Primary */ void ParseChar (CSGScanner & scan, char ch) { if (scan.GetToken() != TOKEN_TYPE(ch)) scan.Error (string ("token '") + string(1, ch) + string("' expected")); scan.ReadNext(); } double ParseNumber(CSGScanner & scan) { if (scan.GetToken() == '-') { scan.ReadNext(); return -ParseNumber (scan); } if (scan.GetToken() != TOK_NUM) scan.Error ("number expected"); double val = scan.GetNumValue(); scan.ReadNext(); return val; } Vec<3> ParseVector (CSGScanner & scan) { Vec<3> v; v(0) = ParseNumber (scan); ParseChar (scan, ','); v(1) = ParseNumber (scan); ParseChar (scan, ','); v(2) = ParseNumber (scan); return v; } CSGScanner & operator>> (CSGScanner & scan, char ch) { if (scan.GetToken() != TOKEN_TYPE(ch)) scan.Error (string ("token '") + string(1, ch) + string("' expected")); scan.ReadNext(); return scan; } CSGScanner & operator>> (CSGScanner & scan, double & d) { d = ParseNumber (scan); return scan; } CSGScanner & operator>> (CSGScanner & scan, int & i) { i = int (ParseNumber (scan)); return scan; } CSGScanner & operator>> (CSGScanner & scan, Point<3> & p) { scan >> p(0) >> ',' >> p(1) >> ',' >> p(2); return scan; } CSGScanner & operator>> (CSGScanner & scan, Vec<3> & v) { scan >> v(0) >> ',' >> v(1) >> ',' >> v(2); return scan; } Solid * ParseSolid (CSGScanner & scan); Solid * ParseTerm (CSGScanner & scan); Solid * ParsePrimary (CSGScanner & scan); Solid * ParsePrimary (CSGScanner & scan) { if (scan.GetToken() == TOK_PRIMITIVE) { switch (scan.GetPrimitiveToken()) { case TOK_PLANE: { Point<3> p; Vec<3> v; scan.ReadNext(); scan >> '(' >> p >> ';' >> v >> ')'; OneSurfacePrimitive * surf = new Plane ( p, v ); geom->AddSurfaces (surf); return new Solid (surf); } case TOK_CYLINDER: { Point<3> pa, pb; double r; scan.ReadNext(); scan >> '(' >> pa >> ';' >> pb >> ';' >> r >> ')'; OneSurfacePrimitive * surf = new Cylinder ( pa, pb, r ); geom->AddSurfaces (surf); return new Solid (surf); } case TOK_ELLIPTICCYLINDER: { Point<3> pa; Vec<3> vl, vs; scan.ReadNext(); scan >> '(' >> pa >> ';' >> vl >> ';' >> vs >> ')'; OneSurfacePrimitive * surf = new EllipticCylinder ( pa, vl, vs); geom->AddSurfaces (surf); return new Solid (surf); } case TOK_ELLIPSOID: { Point<3> pa; Vec<3> v1, v2, v3; scan.ReadNext(); scan >> '(' >> pa >> ';' >> v1 >> ';' >> v2 >> ';' >> v3 >> ')'; OneSurfacePrimitive * surf = new Ellipsoid ( pa, v1, v2, v3); geom->AddSurfaces (surf); return new Solid (surf); } case TOK_CONE: { Point<3> pa, pb; double ra, rb; scan.ReadNext(); scan >> '(' >> pa >> ';' >> ra >> ';' >> pb >> ';' >> rb >> ')'; OneSurfacePrimitive * surf = new Cone ( pa, pb, ra, rb ); geom->AddSurfaces (surf); return new Solid (surf); } case TOK_ELLIPTICCONE: { Point<3> a; Vec<3> vl, vs; double h, vlr; scan.ReadNext(); scan >> '(' >> a >> ';' >> vl >> ';' >> vs >> ';' >> h >>';' >> vlr >> ')'; OneSurfacePrimitive * surf = new EllipticCone ( a, vl, vs, h, vlr ); geom->AddSurfaces (surf); return new Solid (surf); } case TOK_SPHERE: { Point<3> p; double r; scan.ReadNext(); scan >> '(' >> p >> ';' >> r >> ')'; OneSurfacePrimitive * surf = new Sphere ( p, r ); geom->AddSurfaces (surf); return new Solid (surf); } case TOK_ORTHOBRICK: { Point<3> pa, pb; scan.ReadNext(); scan >> '(' >> pa >> ';' >> pb >> ')'; Primitive * nprim = new OrthoBrick (pa, pb); geom->AddSurfaces (nprim); return new Solid (nprim); } case TOK_POLYHEDRON: { // Added by Dalibor Lukas, October 15, 2003 Point<3> p; //int pi1, pi2, pi3, pi4; scan.ReadNext(); ParseChar (scan, '('); Polyhedra * polyhedron = new Polyhedra; // scanning the points while (1) { p = Point<3> (ParseVector (scan)); ParseChar (scan, ';'); polyhedron->AddPoint(p); if (scan.GetToken() == ';') { scan.ReadNext(); break; } } // scanning the faces int inputface = 0; while (1) { Array pnums,cleaned_pnums; for(int i=0; i<3; i++) { pnums.Append((int) (ParseNumber (scan))); if(i<2) ParseChar (scan, ','); } if (scan.GetToken() == TOK_COMMA) { ParseChar (scan, ','); pnums.Append((int) (ParseNumber (scan))); } for(int i=0; iAddFace(cleaned_pnums[0]-1, cleaned_pnums[1]-1, cleaned_pnums[2]-1, inputface); } else if(cleaned_pnums.Size() == 4) { polyhedron->AddFace(cleaned_pnums[0]-1, cleaned_pnums[1]-1, cleaned_pnums[2]-1, inputface); polyhedron->AddFace(cleaned_pnums[0]-1, cleaned_pnums[2]-1, cleaned_pnums[3]-1, inputface); } else { ostringstream msg; msg << "Something wrong with polyhedron face:"; for(int i=0; iAddSurfaces (polyhedron); return new Solid (polyhedron); } case TOK_REVOLUTION: { Point<3> p0,p1; scan.ReadNext(); scan >> '(' >> p0 >> ';' >> p1 >> ';'; string spline = scan.GetStringValue(); scan.ReadNext(); scan >> ')'; if(!geom->GetSplineCurve2d(spline)) { scan.Error ( string("2D Spline curve not found: ") + spline ); break; } Primitive * nprim = new Revolution(p0,p1, *(geom->GetSplineCurve2d(spline))); geom->AddSurfaces (nprim); return new Solid(nprim); } case TOK_EXTRUSION: { scan.ReadNext(); scan >> '('; string epath = scan.GetStringValue(); scan.ReadNext(); scan >> ';'; string profile = scan.GetStringValue(); scan.ReadNext(); Vec<3> z_dir; scan >> ';' >> z_dir(0) >> ',' >> z_dir(1) >> ',' >> z_dir(2) >> ')'; if(!geom->GetSplineCurve2d(profile)) { scan.Error ( string("2D Spline curve not found: ") + profile ); break; } if(!geom->GetSplineCurve3d(epath)) { scan.Error ( string("2D Spline curve not found: ") + epath ); break; } Primitive * nprim = new Extrusion(*(geom->GetSplineCurve3d(epath)), *(geom->GetSplineCurve2d(profile)), z_dir); geom->AddSurfaces (nprim); return new Solid(nprim); } /// Torus /// Lorenzo Codecasa (codecasa@elet.polimi.it) /// April 27th, 2005 /// /// begin... case TOK_TORUS: { Point<3> pc; Vec<3> vn; double R, r; scan.ReadNext(); scan >> '(' >> pc >> ';' >> vn >> ';' >> R >> ';' >> r >> ')'; OneSurfacePrimitive * surf = new Torus ( pc, vn, R, r ); geom->AddSurfaces (surf); return new Solid (surf); } /// ..end case TOK_TRANSLATE: { Vec<3> v; scan.ReadNext(); ParseChar (scan, '('); v = ParseVector (scan); ParseChar (scan, ';'); Solid * sol1 = ParseSolid (scan); ParseChar (scan, ')'); Solid * nsol = sol1 -> Copy(*geom); Transformation<3> trans(v); nsol -> Transform (trans); return nsol; } case TOK_ROTATE: { Point<3> c; Vec<3> v; scan.ReadNext(); scan >> '(' >> c >> ';' >> v >> ';'; Solid * sol1 = ParseSolid (scan); ParseChar (scan, ')'); Solid * nsol = sol1 -> Copy(*geom); Transformation<3> trans(c,v(0),v(1),v(2)); nsol -> Transform (trans); return nsol; } case TOK_MULTITRANSLATE: { Vec<3> v; int n; scan.ReadNext(); scan >> '(' >> v >> ';' >> n >> ';'; Solid * sol1 = ParseSolid (scan); scan >> ')'; Solid * hsol = sol1; for (int i = 1; i <= n; i++) { Solid * nsol = sol1 -> Copy(*geom); Transformation<3> trans(double(i) * v); nsol -> Transform (trans); hsol = new Solid (Solid::UNION, hsol, nsol); } return hsol; } case TOK_MULTIROTATE: { Point<3> c; Vec<3> v; int n; scan.ReadNext(); scan >> '(' >> c >> ';' >> v >> ';' >> n >> ';'; Solid * sol1 = ParseSolid (scan); scan >> ')'; Transformation<3> trans(c, v(0), v(1), v(2)); Transformation<3> multi(Vec<3>(0,0,0)); Transformation<3> ht; Solid * hsol = sol1; for (int i = 1; i <= n; i++) { Solid * nsol = sol1 -> Copy(*geom); nsol -> Transform (multi); hsol = new Solid (Solid::UNION, hsol, nsol); ht=multi; multi.Combine (trans, ht); } return hsol; } default: { scan.Error (string ("unknown primary ") + scan.GetStringValue()); } } } else if (scan.GetToken() == TOK_STRING && geom->GetSolid(scan.GetStringValue())) { Solid * sol = const_cast (geom->GetSolid(scan.GetStringValue())); scan.ReadNext(); return sol; } else if (scan.GetToken() == TOK_NOT) { scan.ReadNext(); Solid * sol1 = ParsePrimary (scan); return new Solid (Solid::SUB, sol1); } else if (scan.GetToken() == '(') { scan.ReadNext(); Solid * sol1 = ParseSolid (scan); scan.ReadNext(); return sol1; } scan.Error (string ("not a primary, name = ")+ scan.GetStringValue()); return 0; } Solid * ParseTerm (CSGScanner & scan) { Solid * sol = ParsePrimary(scan); while (scan.GetToken() == TOK_AND) { scan.ReadNext(); Solid * sol2 = ParsePrimary(scan); sol = new Solid (Solid::SECTION, sol, sol2); } return sol; } Solid * ParseSolid (CSGScanner & scan) { Solid * sol = ParseTerm(scan); while (scan.GetToken() == TOK_OR) { scan.ReadNext(); Solid * sol2 = ParseTerm(scan); sol = new Solid (Solid::UNION, sol, sol2); } return sol; } template void LoadSpline (SplineGeometry & spline, CSGScanner & scan) { double hd; Point x; int nump, numseg; //scan.ReadNext(); scan >> nump >> ';'; hd = 1; spline.geompoints.SetSize(nump); for(int i = 0; i> x(0) >> ',' >> x(1) >> ';'; else if(D==3) scan >> x(0) >> ',' >> x(1) >> ',' >> x(2) >> ';'; spline.geompoints[i] = GeomPoint(x,hd); } scan >> numseg;// >> ';'; spline.splines.SetSize(numseg); int pnums,pnum1,pnum2,pnum3; for(int i = 0; i> ';' >> pnums >> ','; if (pnums == 2) { scan >> pnum1 >> ',' >> pnum2;// >> ';'; spline.splines[i] = new LineSeg(spline.geompoints[pnum1-1], spline.geompoints[pnum2-1]); } else if (pnums == 3) { scan >> pnum1 >> ',' >> pnum2 >> ',' >> pnum3;// >> ';'; spline.splines[i] = new SplineSeg3(spline.geompoints[pnum1-1], spline.geompoints[pnum2-1], spline.geompoints[pnum3-1]); } else if (pnums == 4) { scan >> pnum1 >> ',' >> pnum2 >> ',' >> pnum3;// >> ';'; spline.splines[i] = new CircleSeg(spline.geompoints[pnum1-1], spline.geompoints[pnum2-1], spline.geompoints[pnum3-1]); } } } void ParseFlags (CSGScanner & scan, Flags & flags) { while (scan.GetToken() == '-') { scan.ReadNext(); string name = scan.GetStringValue(); scan.ReadNext(); if (scan.GetToken() == '=') { scan.ReadNext(); if (scan.GetToken() == TOK_STRING) { flags.SetFlag (name.c_str(), scan.GetStringValue().c_str()); scan.ReadNext(); } else if (scan.GetToken() == '[') { scan.ReadNext(); if(scan.GetToken() == '-' || scan.GetToken() == TOK_NUM) { Array vals; vals.Append (ParseNumber(scan)); while (scan.GetToken() == ',') { scan.ReadNext(); vals.Append (ParseNumber(scan)); } ParseChar (scan, ']'); flags.SetFlag (name.c_str(), vals); } else { // string list Array vals; string val = scan.GetStringValue(); vals.Append(new char[val.size()+1]); strcpy(vals.Last(),val.c_str()); scan.ReadNext(); while (scan.GetToken() == ',') { scan.ReadNext(); val = scan.GetStringValue(); vals.Append(new char[val.size()+1]); strcpy(vals.Last(),val.c_str()); scan.ReadNext(); } ParseChar (scan, ']'); flags.SetFlag (name.c_str(), vals); for(int i=0; iGetSolid (name)) scan.Error ("Top-Level-Object "+name+" not defined"); int tlonr = geom->SetTopLevelObject ((Solid*)geom->GetSolid(name)); TopLevelObject * tlo = geom->GetTopLevelObject (tlonr); if (flags.NumListFlagDefined ("col")) { const Array & col = flags.GetNumListFlag ("col"); tlo->SetRGB (col[0], col[1], col[2]); } if (flags.GetDefineFlag ("transparent")) tlo->SetTransparent (1); tlo->SetMaterial (flags.GetStringFlag ("material", "")); tlo->SetLayer (int(flags.GetNumFlag ("layer", 1))); if (flags.NumFlagDefined ("maxh")) tlo->SetMaxH (flags.GetNumFlag("maxh", 1e10)); } else { // a surface TLO string surfname = scan.GetStringValue(); scan.ReadNext(); Flags flags; ParseFlags (scan, flags); ParseChar (scan, ';'); Array si; geom->GetSolid(surfname)->GetSurfaceIndices(si); int tlonr = geom->SetTopLevelObject ((Solid*)geom->GetSolid(name), (Surface*)geom->GetSurface(si.Get(1))); TopLevelObject * tlo = geom->GetTopLevelObject (tlonr); if (flags.NumListFlagDefined ("col")) { const Array & col = flags.GetNumListFlag ("col"); tlo->SetRGB (col.Get(1), col.Get(2), col.Get(3)); } if (flags.GetDefineFlag ("transparent")) tlo->SetTransparent (1); if (flags.NumFlagDefined ("maxh")) tlo->SetMaxH (flags.GetNumFlag("maxh", 1e10)); tlo->SetLayer (int(flags.GetNumFlag ("layer", 1))); tlo->SetBCProp (int(flags.GetNumFlag ("bc", -1))); if ( flags.StringFlagDefined("bcname") ) tlo->SetBCName ( flags.GetStringFlag ("bcname", "default") ); } } else if (scan.GetToken() == TOK_IDENTIFY) { scan.ReadNext(); switch (scan.GetToken()) { case TOK_CLOSESURFACES: { scan.ReadNext(); string name1 = scan.GetStringValue(); scan.ReadNext(); string name2 = scan.GetStringValue(); scan.ReadNext(); Flags flags; ParseFlags (scan, flags); ParseChar (scan, ';'); Array si1, si2; geom->GetSolid(name1)->GetSurfaceIndices(si1); geom->GetSolid(name2)->GetSurfaceIndices(si2); const TopLevelObject * domain = 0; if (flags.StringFlagDefined ("tlo")) { domain = geom->GetTopLevelObject (geom->GetSolid(flags.GetStringFlag ("tlo",""))); if (!domain) scan.Error ("identification needs undefined tlo"); } geom->AddIdentification (new CloseSurfaceIdentification (geom->GetNIdentifications()+1, *geom, geom->GetSurface (si1[0]), geom->GetSurface (si2[0]), domain, flags)); break; } case TOK_PERIODIC: { scan.ReadNext(); string name1 = scan.GetStringValue(); scan.ReadNext(); string name2 = scan.GetStringValue(); scan.ReadNext(); ParseChar (scan, ';'); Array si1, si2; geom->GetSolid(name1)->GetSurfaceIndices(si1); geom->GetSolid(name2)->GetSurfaceIndices(si2); geom->AddIdentification (new PeriodicIdentification (geom->GetNIdentifications()+1, *geom, geom->GetSurface (si1.Get(1)), geom->GetSurface (si2.Get(1)))); break; } default: scan.Error ("keyword 'closesurfaces' or 'periodic' expected"); } } else if (scan.GetToken() == TOK_SINGULAR) { scan.ReadNext(); switch (scan.GetToken()) { case TOK_FACE: { scan.ReadNext(); string name1 = scan.GetStringValue(); // tlo scan.ReadNext(); string name2 = scan.GetStringValue(); scan.ReadNext(); Flags flags; ParseFlags (scan, flags); int factor = int(flags.GetNumFlag("factor",1)); // cout << "Singular Face with factor " << factor << endl; PrintMessageCR (3, "Singular Face with factor ", factor); ParseChar (scan, ';'); const Solid * sol = geom->GetSolid(name2); if(!sol) scan.Error ("unknown solid in singular face definition"); else for (int i = 0; i < geom->GetNTopLevelObjects(); i++) if (name1 == geom->GetTopLevelObject (i)->GetSolid()->Name()) geom->singfaces.Append (new SingularFace (i+1, sol,factor)); break; } case TOK_EDGE: { scan.ReadNext(); string name1 = scan.GetStringValue(); scan.ReadNext(); string name2 = scan.GetStringValue(); scan.ReadNext(); Flags flags; ParseFlags (scan, flags); int factor = int(flags.GetNumFlag("factor",1)); double maxhinit = flags.GetNumFlag("maxh",-1); ParseChar (scan, ';'); const Solid * s1 = geom->GetSolid(name1); const Solid * s2 = geom->GetSolid(name2); PrintMessageCR (3, "Singular Edge with factor ", factor); int domnr = -1; if (flags.StringFlagDefined ("tlo")) { const Solid * sol = geom->GetSolid(flags.GetStringFlag ("tlo","")); for (int i = 0; i < geom->GetNTopLevelObjects(); i++) if (geom->GetTopLevelObject(i)->GetSolid() == sol) domnr = i; // cout << "domnr = " << domnr; } if(!s1 || !s2) scan.Error ("unknown solid ins singular edge definition"); else geom->singedges.Append (new SingularEdge (1, domnr, *geom, s1, s2, factor, maxhinit)); break; } case TOK_POINT: { scan.ReadNext(); string name1 = scan.GetStringValue(); scan.ReadNext(); string name2 = scan.GetStringValue(); scan.ReadNext(); string name3 = scan.GetStringValue(); scan.ReadNext(); Flags flags; ParseFlags (scan, flags); int factor = int(flags.GetNumFlag("factor",1)); ParseChar (scan, ';'); const Solid * s1 = geom->GetSolid(name1); const Solid * s2 = geom->GetSolid(name2); const Solid * s3 = geom->GetSolid(name3); // cout << "Singular Point with factor " << factor << endl; PrintMessageCR (3, "Singular Point with factor ", factor); geom->singpoints.Append (new SingularPoint (1, s1, s2, s3, factor)); break; } default: scan.Error ("keyword 'face' or 'edge' or 'point' expected"); } } else if (scan.GetToken() == TOK_POINT) { Point<3> p; scan.ReadNext(); ParseChar (scan, '('); p = Point<3> (ParseVector (scan)); ParseChar (scan, ')'); Flags flags; ParseFlags (scan, flags); int factor = int(flags.GetNumFlag("factor",0)); ParseChar (scan, ';'); geom->AddUserPoint (p, factor); } else if (scan.GetToken() == TOK_BOUNDINGBOX) { Point<3> p1, p2; scan.ReadNext(); ParseChar (scan, '('); p1 = Point<3> (ParseVector (scan)); ParseChar (scan, ';'); p2 = Point<3> (ParseVector (scan)); ParseChar (scan, ')'); ParseChar (scan, ';'); geom->SetBoundingBox (Box<3> (p1, p2)); } else if (scan.GetToken() == TOK_CURVE2D) { scan.ReadNext(); if (scan.GetToken() != TOK_STRING) scan.Error ("name identifier expected"); string curvename = scan.GetStringValue(); scan.ReadNext(); ParseChar (scan, '='); ParseChar (scan, '('); SplineGeometry<2> * newspline = new SplineGeometry<2>; // newspline->CSGLoad(scan); LoadSpline (*newspline, scan); ParseChar (scan, ')'); ParseChar (scan, ';'); geom->SetSplineCurve(curvename.c_str(),newspline); PrintMessage (4, "define 2d curve ", curvename); } else if (scan.GetToken() == TOK_CURVE3D) { scan.ReadNext(); if (scan.GetToken() != TOK_STRING) scan.Error ("name identifier expected"); string curvename = scan.GetStringValue(); scan.ReadNext(); ParseChar (scan, '='); ParseChar (scan, '('); SplineGeometry<3> * newspline = new SplineGeometry<3>; // newspline->CSGLoad(scan); LoadSpline (*newspline, scan); ParseChar (scan, ')'); ParseChar (scan, ';'); geom->SetSplineCurve(curvename.c_str(),newspline); PrintMessage (4, "define 3d curve ", curvename); } else if (scan.GetToken() == TOK_BOUNDARYCONDITION) { scan.ReadNext(); string name1 = scan.GetStringValue(); scan.ReadNext(); string name2 = scan.GetStringValue(); scan.ReadNext(); int num = int (ParseNumber (scan)); ParseChar (scan, ';'); CSGeometry::BCModification bcm; bcm.bcname = NULL; Array si; geom->GetSolid(name1)->GetSurfaceIndices(si); if(si.Size() == 0) { string errstring = "solid \""; errstring += name1; errstring += "\" has no surfaces"; scan.Error (errstring); } bcm.tlonr = -1; int i; for (i = 0; i < geom->GetNTopLevelObjects(); i++) if (string (geom->GetTopLevelObject(i)->GetSolid()->Name()) == name2) { bcm.tlonr = i; break; } if(bcm.tlonr == -1) { string errstring = "tlo \""; errstring += name2; errstring += "\" not found"; scan.Error(errstring); } bcm.bcnr = num; for (i = 0; i < si.Size(); i++) { bcm.si = si[i]; geom->bcmodifications.Append (bcm); } } else if (scan.GetToken() == TOK_BOUNDARYCONDITIONNAME) { scan.ReadNext(); string name1 = scan.GetStringValue(); scan.ReadNext(); string name2 = scan.GetStringValue(); scan.ReadNext(); string bcname = scan.GetStringValue(); scan.ReadNext(); ParseChar(scan, ';'); CSGeometry::BCModification bcm; bcm.bcname = NULL; Array si; geom->GetSolid(name1)->GetSurfaceIndices(si); if(si.Size() == 0) { string errstring = "solid \""; errstring += name1; errstring += "\" has no surfaces"; scan.Error (errstring); } bcm.tlonr = -1; int i; for (i = 0; i < geom->GetNTopLevelObjects(); i++) if (string (geom->GetTopLevelObject(i)->GetSolid()->Name()) == name2) { bcm.tlonr = i; break; } if(bcm.tlonr == -1) { string errstring = "tlo \""; errstring += name2; errstring += "\" not found"; scan.Error(errstring); } bcm.bcnr = -1; for (i = 0; i < si.Size(); i++) { bcm.si = si[i]; geom->bcmodifications.Append (bcm); geom->bcmodifications.Last().bcname = new string(bcname); } } else if (scan.GetToken() == TOK_DEFINE) { scan.ReadNext(); string name; double val; switch (scan.GetToken()) { case TOK_CONSTANT: scan.ReadNext(); name = scan.GetStringValue(); scan.ReadNext(); ParseChar(scan, '='); val = ParseNumber(scan); if(name == "identprec") geom->SetIdEps(val); break; default: scan.Error ("keyword 'constant' expected"); } } else { cout << "read unidentified token " << scan.GetToken() << " (as char: \"" << char(scan.GetToken()) << "\")" << " string = " << scan.GetStringValue() << endl; scan.ReadNext(); } } } catch (string errstr) { cout << "caught error " << errstr << endl; throw NgException (errstr); } (*testout) << geom->GetNTopLevelObjects() << " TLOs:" << endl; for (int i = 0; i < geom->GetNTopLevelObjects(); i++) { const TopLevelObject * tlo = geom->GetTopLevelObject(i); if (tlo->GetSolid()) (*testout) << i << ": " << *tlo->GetSolid() << endl; } (*testout) << geom->GetNSurf() << " Surfaces" << endl; for (int i = 0; i < geom->GetNSurf(); i++) (*testout) << i << ": " << *geom->GetSurface(i) << endl; return geom; /* do { scan.ReadNext(); if (scan.GetToken() == TOK_STRING) cout << "found string " << scan.GetStringValue() << endl; else cout << "token = " << int(scan.GetToken()) << endl; } while (scan.GetToken() != TOK_END); */ } }; netgen-6.2.1804/libsrc/csg/spline3d.cpp0000644000175000017500000001725513272137567016276 0ustar kurtkurt#include #include #include #include namespace netgen { splinesegment3d :: splinesegment3d (const Point<3> & ap1, const Point<3> & ap2, const Point<3> & ap3) { p1 = ap1; p2 = ap2; p3 = ap3; } /* todo Tip von Joerg Stiller: setzt Du in void splinesegment3d :: Evaluate Zeilen 54 und 56 b2 = 2 * t * (1-t); b2 /= sqrt(2); Das heisst, Du wichtest das zweite Bersteinpolynom mit w2 = 1 / sqrt(2); Das ist aber nur fuer 45-Grad-Segmente korrekt. Fuer den allgemeinen Fall funktioniert w2 = ( e(p3 - p1), e(p2 - p1) ); // also cos(winkel(p3-p1, p2-p1)) bzw. schoen symmetrisch w2 = ( e(p3 - p1), e(p2 - p1) )/2 + ( e(p1 - p3), e(p2 - p3) )/2; Das ist natuerlich kein C++ Code sondern symbolisch, wobei e(p3 - p1) ist der von p1 zu p3 zeigende Einheitsvektor und (a, b) steht fuer das Skalarprodukt zweier Vektoren etc. Eine vergleichbare Information steht auch irgendwo im Hoscheck & Lasser. Ich habe das Buch aber eben nicht zur Hand. */ void splinesegment3d :: Evaluate (double t, Point<3> & p) const { double x, y, z, w; double b1, b2, b3; b1 = (1-t)*(1-t); b2 = 2 * t * (1-t); b3 = t * t; b2 /= sqrt(double(2)); x = p1(0) * b1 + p2(0) * b2 + p3(0) * b3; y = p1(1) * b1 + p2(1) * b2 + p3(1) * b3; z = p1(2) * b1 + p2(2) * b2 + p3(2) * b3; w = b1 + b2 + b3; p(0) = x / w; p(1) = y / w; p(2) = z / w; } void splinesegment3d :: EvaluateTangent (double t, Vec<3> & tang) const { double x, y, z, w, xprime, yprime, zprime, wprime; double b1, b2, b3, b1prime, b2prime, b3prime; b1 = (1-t)*(1-t); b2 = 2 * t * (1-t); b3 = t * t; b2 /= sqrt(double(2)); b1prime = 2 * t - 2; b2prime = - 4 * t + 2; b3prime = 2 * t; b2prime /= sqrt(double(2)); x = p1(0) * b1 + p2(0) * b2 + p3(0) * b3; y = p1(1) * b1 + p2(1) * b2 + p3(1) * b3; z = p1(2) * b1 + p2(2) * b2 + p3(2) * b3; w = b1 + b2 + b3; xprime = p1(0) * b1prime + p2(0) * b2prime + p3(0) * b3prime; yprime = p1(1) * b1prime + p2(1) * b2prime + p3(1) * b3prime; zprime = p1(2) * b1prime + p2(2) * b2prime + p3(2) * b3prime; wprime = b1prime + b2prime + b3prime; tang(0) = (w * xprime - x * wprime) / (w * w); tang(1) = (w * yprime - y * wprime) / (w * w); tang(2) = (w * zprime - z * wprime) / (w * w); } void spline3d :: AddSegment (const Point<3> & ap1, const Point<3> & ap2, const Point<3> & ap3) { segments.Append (new splinesegment3d (ap1, ap2, ap3)); } void spline3d :: Evaluate (double t, Point<3> & p) const { int nr; double loct; static int cnt = 0; cnt++; if (cnt % 10000 == 0) (*mycout) << "Evaluate calls: " << cnt << endl; while (t < 0) t += GetNumSegments(); while (t >= GetNumSegments()) t -= GetNumSegments(); nr = 1 + int (t); loct = t - nr + 1; segments.Get(nr)->Evaluate (loct, p); } void spline3d :: EvaluateTangent (double t, Vec<3> & tang) const { int nr; double loct; while (t < 0) t += GetNumSegments(); while (t >= GetNumSegments()) t -= GetNumSegments(); nr = 1 + int (t); loct = t - nr + 1; segments.Get(nr)->EvaluateTangent (loct, tang); } double spline3d :: ProjectToSpline (Point<3> & p) const { double t, tl, tu, dt, dist, mindist, optt(0); Point<3> hp; Vec<3> tanx, px; dt = 0.01; mindist = 0; for (t = 0; t <= GetNumSegments() + dt/2; t += dt) { Evaluate (t, hp); dist = Dist (hp, p); if (t == 0 || dist < mindist) { optt = t; mindist = dist; } } tu = optt + dt; tl = optt - dt; while (tu - tl > 1e-2) { optt = 0.5 * (tu + tl); Evaluate (optt, hp); EvaluateTangent (optt, tanx); if (tanx * (hp - p) > 0) tu = optt; else tl = optt; } optt = 0.5 * (tu + tl); optt = ProjectToSpline (p, optt); return optt; } double spline3d :: ProjectToSpline (Point<3> & p, double optt) const { double tl, tu, dt, val, dval, valu, vall; Point<3> hp; Vec<3> tanx, px; int its = 0; int cnt = 1000; do { dt = 1e-8; tl = optt - dt; tu = optt + dt; EvaluateTangent (optt, tanx); Evaluate (optt, hp); px = hp - p; val = px * tanx; EvaluateTangent (tl, tanx); Evaluate (tl, hp); px = hp - p; vall = px * tanx; EvaluateTangent (tu, tanx); Evaluate (tu, hp); px = hp - p; valu = px * tanx; dval = (valu - vall) / (2 * dt); if (its % 100 == 99) (*testout) << "optt = " << optt << " val = " << val << " dval = " << dval << endl; optt -= val / dval; its++; if (fabs(val) < 1e-8 && cnt > 5) cnt = 5; cnt--; } while (cnt > 0); Evaluate (optt, p); return optt; } splinetube :: splinetube (const spline3d & amiddlecurve, double ar) : Surface(), middlecurve (amiddlecurve), r(ar) { (*mycout) << "Splinetube Allocated, r = " << r << endl; } void splinetube :: DefineTangentialPlane (const Point<3> & ap1, const Point<3> & ap2) { double t; double phi, z; p1 = ap1; p2 = ap2; cp = p1; t = middlecurve.ProjectToSpline (cp); ex = p1 - cp; middlecurve.EvaluateTangent (t, ez); ex.Normalize(); ez.Normalize(); ey = Cross (ez, ex); phi = r * atan2 (ey * (p2-cp), ex * (p2-cp)); z = ez * (p2 - cp); e2x(0) = phi; e2x(1) = z; e2x.Normalize(); e2y(1) = e2x(0); e2y(0) = -e2x(1); // (*testout) << "Defineplane: " << endl // << "p1 = " << p1 << " p2 = " << p2 << endl // << "pc = " << cp << endl // << "ex = " << ex << " ey = " << ey << " ez = " << ez << endl // << "phi = " << phi << " z = " << z << endl // << "e2x = " << e2x << " e2y = " << e2y << endl; } void splinetube :: ToPlane (const Point<3> & p3d, Point<2> & pplain, double h, int & zone) const { Vec<2> v; v(0) = r * atan2 (ey * (p3d-cp), ex * (p3d-cp)); v(1) = ez * (p3d - cp); zone = 0; if (v(0) > r * 2) zone = 1; if (v(0) < r * 2) zone = 2; pplain(0) = (v * e2x) / h; pplain(1) = (v * e2y) / h; } void splinetube :: FromPlane (const Point<2> & pplain, Point<3> & p3d, double h) const { Vec<2> v; v(0) = pplain(0) * h * e2x(0) + pplain(1) * h * e2y(0); v(1) = pplain(0) * h * e2x(1) + pplain(1) * h * e2y(1); p3d = p1 + v(0) * ey + v(1) * ez; Project (p3d); } void splinetube :: Project (Point<3> & p3d) const { Point<3> hp; hp = p3d; middlecurve.ProjectToSpline (hp); p3d = hp + (r / Dist(p3d, hp)) * (p3d - hp); } double splinetube :: CalcFunctionValue (const Point<3> & point) const { Point<3> hcp; double rad; hcp = point; middlecurve.ProjectToSpline (hcp); rad = Dist (hcp, point); return 0.5 * (rad * rad / r - r); } void splinetube :: CalcGradient (const Point<3> & point, Vec<3> & grad) const { Point<3> hcp; hcp = point; middlecurve.ProjectToSpline (hcp); grad = point - hcp; grad /= r; } Point<3> splinetube :: GetSurfacePoint () const { Point<3> p; Vec<3> t, n; middlecurve.Evaluate (0, p); middlecurve.EvaluateTangent (0, t); n = t.GetNormal (); n *= r; (*mycout) << "p = " << p << " t = " << t << " n = " << n << endl; return p + n; } void splinetube :: Print (ostream & str) const { int i; str << "SplineTube, " << middlecurve.GetNumSegments () << " segments, r = " << r << endl; for (i = 1; i <= middlecurve.GetNumSegments(); i++) str << middlecurve.P1(i) << " - " << middlecurve.P2(i) << " - " << middlecurve.P3(i) << endl; } int splinetube :: BoxInSolid (const BoxSphere<3> & box) const // 0 .. no, 1 .. yes, 2 .. maybe { Point<3> pc = box.Center(); middlecurve.ProjectToSpline (pc); double d = Dist (pc, box.Center()); if (d < r - box.Diam()/2) return 1; if (d > r + box.Diam()/2) return 0; return 2; } } netgen-6.2.1804/libsrc/csg/geoml.hpp0000644000175000017500000000106613272137567015656 0ustar kurtkurt#ifndef FILE_GEOML #define FILE_GEOML /* *************************************************************************/ /* File: geoml.hh */ /* Author: Joachim Schoeberl */ /* Date: 21. Jun. 98 */ /* *************************************************************************/ #include #include #include #include #include #endif netgen-6.2.1804/libsrc/csg/edgeflw.hpp0000644000175000017500000000520413272137567016166 0ustar kurtkurt#ifndef FILE_EDGEFLW #define FILE_EDGEFLW /**************************************************************************/ /* File: edgeflw.hh */ /* Author: Joachim Schoeberl */ /* Date: 01. Okt. 95 */ /**************************************************************************/ namespace netgen { /* Edge - following function and Projection to edge of implicitly given edge */ /** Calculates edges. The edges of a solid geometry are computed. Special points have to be given. */ extern void CalcEdges (const CSGeometry & geometry, const Array & specpoints, double h, Mesh & mesh); class EdgeCalculation { const CSGeometry & geometry; Array & specpoints; Point3dTree * searchtree; Point3dTree * meshpoint_tree; int cntedge; double ideps; MeshingParameters & mparam; public: EdgeCalculation (const CSGeometry & ageometry, Array & aspecpoints, MeshingParameters & amparam); ~EdgeCalculation(); void SetIdEps(const double epsin) {ideps = epsin;} void Calc(double h, Mesh & mesh); private: void CalcEdges1 (double h, Mesh & mesh); void FollowEdge (int pi1, int & ep, int & pos, // const Array & hsp, const Array & hsp, double h, const Mesh & mesh, Array > & edgepoints, Array & curvelength); void AnalyzeEdge (int s1, int s2, int s1_rep, int s2_rep, int pos, int layer, const Array > & edgepoints, Array & refedges, Array & refedgesinv); void StoreEdge (const Array & refedges, const Array & refedgesinv, const Array > & edgepoints, const Array & curvelength, int layer, Mesh & mesh); void StoreShortEdge (const Array & refedges, const Array & refedgesinv, const Array > & edgepoints, const Array & curvelength, int layer, Mesh & mesh); void CopyEdge (const Array & refedges, const Array & refedgesinv, int copyfromedge, const Point<3> & fromstart, const Point<3> & fromend, const Point<3> & tostart, const Point<3> & toend, int copyedgeidentification, int layer, Mesh & mesh); void SplitEqualOneSegEdges (Mesh & mesh); void FindClosedSurfaces (double h, Mesh & mesh); public: bool point_on_edge_problem; }; } #endif netgen-6.2.1804/libsrc/csg/extrusion.hpp0000644000175000017500000001026313272137567016612 0ustar kurtkurt#ifndef _EXTRUSION_HPP #define _EXTRUSION_HPP namespace netgen { class Extrusion; class ExtrusionFace : public Surface { private: const SplineSeg<2> * profile; const SplineGeometry<3> * path; Vec<3> glob_z_direction; bool deletable; Array< const SplineSeg3<3> * > spline3_path; Array< const LineSeg<3> * > line_path; mutable Array < Vec<3> > x_dir, y_dir, z_dir, loc_z_dir; mutable Array < Point<3> > p0; mutable Vec<3> profile_tangent; mutable double profile_par; mutable Vector profile_spline_coeff; mutable int latest_seg; mutable double latest_t; mutable Point<2> latest_point2d; mutable Point<3> latest_point3d; private: void Orthogonalize(const Vec<3> & v1, Vec<3> & v2) const; void Init(void); public: double CalcProj(const Point<3> & point3d, Point<2> & point2d, int seg) const; void CalcProj(const Point<3> & point3d, Point<2> & point2d, int & seg, double & t) const; public: ExtrusionFace(const SplineSeg<2> * profile_in, const SplineGeometry<3> * path_in, const Vec<3> & z_direction); ExtrusionFace(const Array & raw_data); ~ExtrusionFace(); virtual int IsIdentic (const Surface & s2, int & inv, double eps) const; virtual double CalcFunctionValue (const Point<3> & point) const; virtual void CalcGradient (const Point<3> & point, Vec<3> & grad) const; virtual void CalcHesse (const Point<3> & point, Mat<3> & hesse) const; virtual double HesseNorm () const; virtual double MaxCurvature () const; //virtual double MaxCurvatureLoc (const Point<3> & /* c */ , // double /* rad */) const; virtual void Project (Point<3> & p) const; virtual Point<3> GetSurfacePoint () const; virtual void Print (ostream & str) const; virtual void GetTriangleApproximation (TriangleApproximation & tas, const Box<3> & boundingbox, double facets) const; const SplineGeometry<3> & GetPath(void) const {return *path;} const SplineSeg<2> & GetProfile(void) const {return *profile;} bool BoxIntersectsFace(const Box<3> & box) const; void LineIntersections ( const Point<3> & p, const Vec<3> & v, const double eps, int & before, int & after, bool & intersecting ) const; INSOLID_TYPE VecInFace ( const Point<3> & p, const Vec<3> & v, const double eps ) const; const Vec<3> & GetYDir ( void ) const {return y_dir[latest_seg];} const Vec<3> & GetProfileTangent (void) const {return profile_tangent;} double GetProfilePar(void) const {return profile_par;} void GetRawData(Array & data) const; void CalcLocalCoordinates (int seg, double t, Vec<3> & ex, Vec<3> & ey, Vec<3> & ez) const; void CalcLocalCoordinatesDeriv (int seg, double t, Vec<3> & ex, Vec<3> & ey, Vec<3> & ez, Vec<3> & dex, Vec<3> & dey, Vec<3> & dez) const; }; class Extrusion : public Primitive { private: const SplineGeometry<3> & path; const SplineGeometry<2> & profile; // closed, clockwise oriented curve const Vec<3> & z_direction; Array faces; mutable int latestfacenum; public: Extrusion(const SplineGeometry<3> & path_in, const SplineGeometry<2> & profile_in, const Vec<3> & z_dir); ~Extrusion(); virtual INSOLID_TYPE BoxInSolid (const BoxSphere<3> & box) const; virtual INSOLID_TYPE PointInSolid (const Point<3> & p, double eps) const; INSOLID_TYPE PointInSolid (const Point<3> & p, double eps, Array * const facenums) const; virtual INSOLID_TYPE VecInSolid (const Point<3> & p, const Vec<3> & v, double eps) const; // checks if lim s->0 lim t->0 p + t(v1 + s v2) in solid virtual INSOLID_TYPE VecInSolid2 (const Point<3> & p, const Vec<3> & v1, const Vec<3> & v2, double eps) const; virtual int GetNSurfaces() const; virtual Surface & GetSurface (int i = 0); virtual const Surface & GetSurface (int i = 0) const; virtual void Reduce (const BoxSphere<3> & box); virtual void UnReduce (); }; } #endif //_EXTRUSION_HPP netgen-6.2.1804/libsrc/csg/vscsg.hpp0000644000175000017500000000156313272137567015702 0ustar kurtkurt#ifndef FILE_VSCSG #define FILE_VSCSG /**************************************************************************/ /* File: vscsg.hpp */ /* Author: Joachim Schoeberl */ /* Date: 05. Jan. 2011 */ /**************************************************************************/ namespace netgen { class DLL_HEADER VisualSceneGeometry : public VisualScene { class CSGeometry * geometry; Array trilists; int selsurf; public: VisualSceneGeometry (); virtual ~VisualSceneGeometry (); void SetGeometry (class CSGeometry * ageometry) { geometry = ageometry; } virtual void SelectSurface (int aselsurf); virtual void BuildScene (int zoomall = 0); virtual void DrawScene (); }; } #endif netgen-6.2.1804/libsrc/csg/solid.hpp0000644000175000017500000001635313272137567015672 0ustar kurtkurt#ifndef FILE_SOLID #define FILE_SOLID /**************************************************************************/ /* File: solid.hh */ /* Author: Joachim Schoeberl */ /* Date: 1. Dez. 95 */ /**************************************************************************/ #include namespace netgen { /* Constructive Solid Model (csg) */ class Solid; class SolidIterator { public: SolidIterator () { ; } virtual ~SolidIterator () { ; } virtual void Do (Solid * sol) = 0; }; class Solid { public: typedef enum optyp1 { TERM, TERM_REF, SECTION, UNION, SUB, ROOT /*, DUMMY */ } optyp; private: char * name; Primitive * prim; Solid * s1, * s2; optyp op; bool visited; double maxh; int num_surfs; // static int cntnames; public: Solid (Primitive * aprim); Solid (optyp aop, Solid * as1, Solid * as2 = NULL); ~Solid (); const char * Name () const { return name; } void SetName (const char * aname); Solid * Copy (class CSGeometry & geom) const; void Transform (Transformation<3> & trans); void IterateSolid (SolidIterator & it, bool only_once = 0); void Boundaries (const Point<3> & p, Array & bounds) const; int NumPrimitives () const; void GetSurfaceIndices (Array & surfind) const; void GetSurfaceIndices (IndexSet & iset) const; void GetTangentialSurfaceIndices (const Point<3> & p, Array & surfids, double eps) const; void GetTangentialSurfaceIndices2 (const Point<3> & p, const Vec<3> & v, Array & surfids, double eps) const; void GetTangentialSurfaceIndices3 (const Point<3> & p, const Vec<3> & v, const Vec<3> & v2, Array & surfids, double eps) const; void ForEachSurface (const std::function & lambda, bool inv = false) const; Primitive * GetPrimitive () { return (op == TERM || op == TERM_REF) ? prim : NULL; } const Primitive * GetPrimitive () const { return (op == TERM || op == TERM_REF) ? prim : NULL; } Solid * S1() { return s1; } Solid * S2() { return s2; } // geometric tests bool IsIn (const Point<3> & p, double eps = 1e-6) const; bool IsStrictIn (const Point<3> & p, double eps = 1e-6) const; bool VectorIn (const Point<3> & p, const Vec<3> & v, double eps = 1e-6) const; bool VectorStrictIn (const Point<3> & p, const Vec<3> & v, double eps = 1e-6) const; bool VectorIn2 (const Point<3> & p, const Vec<3> & v1, const Vec<3> & v2, double eps) const; bool VectorIn2Rec (const Point<3> & p, const Vec<3> & v1, const Vec<3> & v2, double eps) const; /// compute localization in point p void TangentialSolid (const Point<3> & p, Solid *& tansol, Array & surfids, double eps) const; /// compute localization in point p tangential to vector t void TangentialSolid2 (const Point<3> & p, const Vec<3> & t, Solid *& tansol, Array & surfids, double eps) const; /** compute localization in point p, with second order approximation to edge p + s t + s*s/2 t2 **/ void TangentialSolid3 (const Point<3> & p, const Vec<3> & t, const Vec<3> & t2, Solid *& tansol, Array & surfids, double eps) const; /** tangential solid, which follows the edge p + s t + s*s/2 t2 with second order, and the neighbouring face p + s t + s*s/2 t2 + r m with first order **/ void TangentialEdgeSolid (const Point<3> & p, const Vec<3> & t, const Vec<3> & t2, const Vec<3> & m, Solid *& tansol, Array & surfids, double eps) const; void CalcOnePrimitiveSpecialPoints (const Box<3> & box, Array > & pts) const; /// int Edge (const Point<3> & p, const Vec<3> & v, double eps) const; /// int OnFace (const Point<3> & p, const Vec<3> & v, double eps) const; /// void Print (ostream & str) const; /// void CalcSurfaceInverse (); /// Solid * GetReducedSolid (const BoxSphere<3> & box) const; void SetMaxH (double amaxh) { maxh = amaxh; } double GetMaxH () const { return maxh; } void GetSolidData (ostream & ost, int first = 1) const; static Solid * CreateSolid (istream & ist, const SYMBOLTABLE & solids); static BlockAllocator ball; void * operator new(size_t /* s */) { return ball.Alloc(); } void operator delete (void * p) { ball.Free (p); } protected: /// void RecBoundaries (const Point<3> & p, Array & bounds, int & in, int & strin) const; /// void RecTangentialSolid (const Point<3> & p, Solid *& tansol, Array & surfids, int & in, int & strin, double eps) const; void RecTangentialSolid2 (const Point<3> & p, const Vec<3> & vec, Solid *& tansol, Array & surfids, int & in, int & strin, double eps) const; /// void RecTangentialSolid3 (const Point<3> & p, const Vec<3> & vec,const Vec<3> & vec2, Solid *& tansol, Array & surfids, int & in, int & strin, double eps) const; /// void RecTangentialEdgeSolid (const Point<3> & p, const Vec<3> & t, const Vec<3> & t2, const Vec<3> & m, Solid *& tansol, Array & surfids, int & in, int & strin, double eps) const; /// void RecEdge (const Point<3> & p, const Vec<3> & v, int & in, int & strin, int & faces, double eps) const; /// void CalcSurfaceInverseRec (int inv); /// Solid * RecGetReducedSolid (const BoxSphere<3> & box, INSOLID_TYPE & in) const; /// void RecGetSurfaceIndices (Array & surfind) const; void RecGetTangentialSurfaceIndices (const Point<3> & p, Array & surfids, double eps) const; void RecGetTangentialSurfaceIndices2 (const Point<3> & p, const Vec<3> & v, Array & surfids, double eps) const; void RecGetTangentialSurfaceIndices3 (const Point<3> & p, const Vec<3> & v, const Vec<3> & v2, Array & surfids, double eps) const; void RecGetTangentialEdgeSurfaceIndices (const Point<3> & p, const Vec<3> & v, const Vec<3> & v2, const Vec<3> & m, Array & surfids, double eps) const; void RecGetSurfaceIndices (IndexSet & iset) const; void RecCalcOnePrimitiveSpecialPoints (Array > & pts) const; friend class SolidIterator; friend class ClearVisitedIt; friend class RemoveDummyIterator; friend class CSGeometry; }; inline ostream & operator<< (ostream & ost, const Solid & sol) { sol.Print (ost); return ost; } class ReducePrimitiveIterator : public SolidIterator { const BoxSphere<3> & box; public: ReducePrimitiveIterator (const BoxSphere<3> & abox) : SolidIterator(), box(abox) { ; } virtual ~ReducePrimitiveIterator () { ; } virtual void Do (Solid * sol) { if (sol -> GetPrimitive()) sol -> GetPrimitive() -> Reduce (box); } }; class UnReducePrimitiveIterator : public SolidIterator { public: UnReducePrimitiveIterator () { ; } virtual ~UnReducePrimitiveIterator () { ; } virtual void Do (Solid * sol) { if (sol -> GetPrimitive()) sol -> GetPrimitive() -> UnReduce (); } }; } #endif netgen-6.2.1804/libsrc/csg/manifold.hpp0000644000175000017500000000114613272137567016343 0ustar kurtkurt#ifndef FILE_MANIFOLD #define FILE_MANIFOLD /**************************************************************************/ /* File: manifold.hh */ /* Author: Joachim Schoeberl */ /* Date: 7. Aug. 96 */ /**************************************************************************/ namespace netgen { /** Basis class for manifolds in 2d and 3d */ class Manifold { public: /// Manifold (); /// virtual ~Manifold (); }; } #endif netgen-6.2.1804/libsrc/csg/identify.cpp0000644000175000017500000011126413272137567016363 0ustar kurtkurt#include #include #include #include #include namespace netgen { Identification :: Identification (int anr, const CSGeometry & ageom) : geom(ageom), identfaces(10) { nr = anr; } Identification :: ~Identification () { ; } ostream & operator<< (ostream & ost, Identification & ident) { ident.Print (ost); return ost; } /* void Identification :: IdentifySpecialPoints (Array & points) { ; } */ int Identification :: Identifyable (const SpecialPoint & sp1, const SpecialPoint & sp2, const TABLE & specpoint2solid, const TABLE & specpoint2surface) const { cout << "Identification::Identifyable called for base-class" << endl; return 0; } int Identification :: Identifyable (const Point<3> & p1, const Point<3> & sp2) const { cout << "Identification::Identifyable called for base-class" << endl; return 0; } int Identification :: IdentifyableCandidate (const SpecialPoint & sp1) const { return 1; } int Identification :: ShortEdge (const SpecialPoint & sp1, const SpecialPoint & sp2) const { return 0; } int Identification :: GetIdentifiedPoint (class Mesh & mesh, int pi) { cout << "Identification::GetIdentifiedPoint called for base-class" << endl; return -1; } void Identification :: IdentifyPoints (Mesh & mesh) { cout << "Identification::IdentifyPoints called for base-class" << endl; ; } void Identification :: IdentifyFaces (class Mesh & mesh) { cout << "Identification::IdentifyFaces called for base-class" << endl; ; } void Identification :: BuildSurfaceElements (Array & segs, Mesh & mesh, const Surface * surf) { cout << "Identification::BuildSurfaceElements called for base-class" << endl; ; } void Identification :: BuildVolumeElements (Array & surfels, class Mesh & mesh) { ; } void Identification :: GetIdentifiedFaces (Array & idfaces) const { idfaces.SetSize(0); for (int i = 1; i <= identfaces.GetNBags(); i++) for (int j = 1; j <= identfaces.GetBagSize(i); j++) { INDEX_2 i2; int val; identfaces.GetData (i, j, i2, val); idfaces.Append (i2); } } PeriodicIdentification :: PeriodicIdentification (int anr, const CSGeometry & ageom, const Surface * as1, const Surface * as2, Transformation<3> atrafo) : Identification(anr, ageom), trafo(atrafo) { inv_trafo = trafo.CalcInverse(); s1 = as1; s2 = as2; } PeriodicIdentification :: ~PeriodicIdentification () { ; } /* void PeriodicIdentification :: IdentifySpecialPoints (Array & points) { int i, j; int bestj; double bestval, val; for (i = 1; i <= points.Size(); i++) { Point<3> p1 = points.Get(i).p; Point<3> hp1 = p1; s1->Project (hp1); if (Dist (p1, hp1) > 1e-6) continue; Vec<3> n1; s1->GetNormalVector (p1, n1); n1 /= n1.Length(); if ( fabs(n1 * points.Get(i).v) > 1e-3) continue; bestval = 1e8; bestj = 1; for (j = 1; j <= points.Size(); j++) { Point<3> p2= points.Get(j).p; Point<3> hp2 = p2; s2->Project (hp2); if (Dist (p2, hp2) > 1e-6) continue; Vec<3> n2; s2->GetNormalVector (p2, n2); n2 /= n2.Length(); if ( fabs(n2 * points.Get(j).v) > 1e-3) continue; Vec<3> v(p1, p2); double vl = v.Length(); double cl = fabs (v*n1); val = 1 - cl*cl/(vl*vl); val += (points.Get(i).v - points.Get(j).v).Length(); if (val < bestval) { bestj = j; bestval = val; } } (*testout) << "Identify Periodic special points: pi = " << points.Get(i).p << ", vi = " << points.Get(i).v << " pj = " << points.Get(bestj).p << ", vj = " << points.Get(bestj).v << " bestval = " << bestval << endl; } } */ int PeriodicIdentification :: Identifyable (const SpecialPoint & sp1, const SpecialPoint & sp2, const TABLE & specpoint2solid, const TABLE & specpoint2surface) const { SpecialPoint hsp1 = sp1; SpecialPoint hsp2 = sp2; for (int i = 1; i <= 1; i++) { // Swap (hsp1, hsp2); if (!s1->PointOnSurface (hsp1.p)) continue; Vec<3> n1; n1 = s1->GetNormalVector (hsp1.p); n1 /= n1.Length(); if ( fabs(n1 * hsp1.v) > 1e-3) continue; if (!s2->PointOnSurface(hsp2.p)) continue; Vec<3> n2; n2 = s2->GetNormalVector (hsp2.p); n2 /= n2.Length(); if ( fabs(n2 * hsp2.v) > 1e-3) continue; if ((trafo(hsp1.v)-hsp2.v).Length2() > 1e-12) return false; double d2typ = Dist2(hsp1.p, hsp2.p); if (Dist2 (trafo(hsp1.p),hsp2.p) < 1e-18*d2typ) return true; if (Dist2 (hsp1.p, trafo(hsp1.p)) < 1e-18*d2typ) { // old style without trafo, but normal projection Vec<3> v = hsp2.p - hsp1.p; double vl = v.Length(); double cl = fabs (v*n1); double val1 = 1 - cl*cl/(vl*vl); double val2 = (hsp1.v - hsp2.v).Length(); if (val1 < 1e-10 && val2 < 1e-6) return true; } } return false; } int PeriodicIdentification :: Identifyable (const Point<3> & p1, const Point<3> & p2) const { return (s1->PointOnSurface (p1) && s2->PointOnSurface (p2)); } int PeriodicIdentification :: GetIdentifiedPoint (class Mesh & mesh, int pi) { const Surface *snew; const Point<3> & p = mesh.Point (pi); Point<3> hp = p; if (s1->PointOnSurface (p)) { snew = s2; hp = trafo(hp); } else { if (s2->PointOnSurface (p)) { snew = s1; hp = inv_trafo(hp); } else { throw NgException("GetIdenfifiedPoint: Not possible"); } } // project to other surface snew->Project (hp); int newpi = 0; for (int i = 1; i <= mesh.GetNP(); i++) if (Dist2 (mesh.Point(i), hp) < 1e-12) { newpi = i; break; } if (!newpi) newpi = mesh.AddPoint (hp); if (snew == s2) mesh.GetIdentifications().Add (pi, newpi, nr); else mesh.GetIdentifications().Add (newpi, pi, nr); mesh.GetIdentifications().SetType(nr,Identifications::PERIODIC); /* (*testout) << "Identify points(periodic), nr = " << nr << ": " << mesh.Point(pi) << " and " << mesh.Point(newpi) << ((snew == s2) ? "" : " inverse") << endl; */ return newpi; } void PeriodicIdentification :: IdentifyPoints (class Mesh & mesh) { for (int i = 1; i <= mesh.GetNP(); i++) { Point<3> p = mesh.Point(i); if (s1->PointOnSurface (p)) { Point<3> pp = p; pp = trafo(pp); s2->Project (pp); for (int j = 1; j <= mesh.GetNP(); j++) if (Dist2(mesh.Point(j), pp) < 1e-6) { mesh.GetIdentifications().Add (i, j, nr); /* (*testout) << "Identify points(periodic:), nr = " << nr << ": " << mesh.Point(i) << " - " << mesh.Point(j) << endl; */ } } } mesh.GetIdentifications().SetType(nr,Identifications::PERIODIC); } void PeriodicIdentification :: IdentifyFaces (class Mesh & mesh) { int i, j, k, l; int fi1, fi2, side; for (i = 1; i <= mesh.GetNFD(); i++) for (j = 1; j <= mesh.GetNFD(); j++) { int surfi = mesh.GetFaceDescriptor(i).SurfNr(); int surfj = mesh.GetFaceDescriptor(j).SurfNr(); if (surfi == surfj) continue; if (geom.GetSurface (surfi) != s1 || geom.GetSurface (surfj) != s2) continue; int idok = 1; // (*testout) << "check faces " << i << " and " << j << endl; for (side = 1; side <= 2 && idok; side++) { if (side == 1) { fi1 = i; fi2 = j; } else { fi1 = j; fi2 = i; } for (k = 1; k <= mesh.GetNSeg(); k++) { const Segment & seg1 = mesh.LineSegment(k); if (seg1.si != fi1) continue; int foundother = 0; for (l = 1; l <= mesh.GetNSeg(); l++) { const Segment & seg2 = mesh.LineSegment(l); if (seg2.si != fi2) continue; // (*testout) << "seg1 = " << seg1[0] << "-" << seg1[1] << ", seg2 = " << seg2[0] << "-" << seg2[1]; if (side == 1) { if (mesh.GetIdentifications().Get (seg1[0], seg2[0]) && mesh.GetIdentifications().Get (seg1[1], seg2[1])) { foundother = 1; break; } if (mesh.GetIdentifications().Get (seg1[0], seg2[1]) && mesh.GetIdentifications().Get (seg1[1], seg2[0])) { foundother = 1; break; } } else { if (mesh.GetIdentifications().Get (seg2[0], seg1[0]) && mesh.GetIdentifications().Get (seg2[1], seg1[1])) { foundother = 1; break; } if (mesh.GetIdentifications().Get (seg2[0], seg1[1]) && mesh.GetIdentifications().Get (seg2[1], seg1[0])) { foundother = 1; break; } } } if (!foundother) { idok = 0; break; } } } if (idok) { // (*testout) << "Identify faces " << i << " and " << j << endl; INDEX_2 fpair(i,j); fpair.Sort(); identfaces.Set (fpair, 1); } } } void PeriodicIdentification :: BuildSurfaceElements (Array & segs, Mesh & mesh, const Surface * surf) { int found = 0; int fother = -1; int facei = segs.Get(1).si; int surfnr = mesh.GetFaceDescriptor(facei).SurfNr(); if (geom.GetSurface(surfnr) == s1 || geom.GetSurface(surfnr) == s2) { Array copy_points; for (SurfaceElementIndex sei = 0; sei < mesh.GetNSE(); sei++) { const Element2d & sel = mesh[sei]; INDEX_2 fpair (facei, sel.GetIndex()); fpair.Sort(); if (identfaces.Used (fpair)) { for (int k = 0; k < sel.GetNP(); k++) if (!copy_points.Contains (sel[k])) copy_points.Append (sel[k]); } } BubbleSort (copy_points); for (int k = 0; k < copy_points.Size(); k++) GetIdentifiedPoint (mesh, copy_points[k]); for (SurfaceElementIndex sei = 0; sei < mesh.GetNSE(); sei++) { const Element2d & sel = mesh[sei]; INDEX_2 fpair (facei, sel.GetIndex()); fpair.Sort(); if (identfaces.Used (fpair)) { found = 1; fother = sel.GetIndex(); // copy element Element2d newel(sel.GetType()); newel.SetIndex (facei); for (int k = 0; k < sel.GetNP(); k++) newel[k] = GetIdentifiedPoint (mesh, sel[k]); Vec<3> nt = Cross (Point<3> (mesh[newel[1]])- Point<3> (mesh[newel[0]]), Point<3> (mesh[newel[2]])- Point<3> (mesh[newel[0]])); Vec<3> nsurf = geom.GetSurface (surfnr)->GetNormalVector (mesh[newel[0]]); if (nsurf * nt < 0) Swap (newel[0], newel[2]); mesh.AddSurfaceElement (newel); } } } if (found) { // (*mycout) << " copy face " << facei << " from face " << fother; PrintMessage (4, " copy face ", facei, " from face ", fother); segs.SetSize(0); } } void PeriodicIdentification :: Print (ostream & ost) const { ost << "Periodic Identifiaction, surfaces: " << s1->Name() << " - " << s2->Name() << endl; s1->Print (ost); ost << " - "; s2->Print (ost); ost << endl; } void PeriodicIdentification :: GetData (ostream & ost) const { ost << "periodic " << s1->Name() << " " << s2->Name(); } CloseSurfaceIdentification :: CloseSurfaceIdentification (int anr, const CSGeometry & ageom, const Surface * as1, const Surface * as2, const TopLevelObject * adomain, const Flags & flags) : Identification(anr, ageom) { s1 = as1; s2 = as2; domain = adomain; ref_levels = int (flags.GetNumFlag ("reflevels", 2)); ref_levels_s1 = int (flags.GetNumFlag ("reflevels1", 0)); ref_levels_s2 = int (flags.GetNumFlag ("reflevels2", 0)); slices = flags.GetNumListFlag ("slices"); for(int i=0; i0 && slices[i] <= slices[i-1]) || (slices[i] >= 1)) throw NgException ("slices have to be in ascending order, between 0 and 1"); // eps_n = 1e-3; eps_n = 1e-6; dom_surf_valid = 0; if (domain) for (int i = 0; i < geom.GetNTopLevelObjects(); i++) if (domain == geom.GetTopLevelObject(i)) dom_nr = i; usedirection = flags.NumListFlagDefined("direction"); if(usedirection) { for(int i=0; i<3; i++) direction(i) = flags.GetNumListFlag("direction")[i]; direction.Normalize(); } } CloseSurfaceIdentification :: ~CloseSurfaceIdentification () { ; } void CloseSurfaceIdentification :: Print (ostream & ost) const { ost << "CloseSurface Identifiaction, surfaces: " << s1->Name() << " - " << s2->Name() << endl; s1->Print (ost); s2->Print (ost); ost << endl; } void CloseSurfaceIdentification :: GetData (ostream & ost) const { ost << "close surface " << s1->Name() << " " << s2->Name(); } /* void CloseSurfaceIdentification :: IdentifySpecialPoints (Array & points) { int i, j; int bestj; double bestval, val; for (i = 1; i <= points.Size(); i++) { Point<3> p1 = points.Get(i).p; Vec<3> n1; if (!s1->PointOnSurface (p1)) continue; s1->GetNormalVector (p1, n1); n1 /= n1.Length(); if ( fabs(n1 * points.Get(i).v) > 1e-3) continue; bestval = 1e8; bestj = 1; for (j = 1; j <= points.Size(); j++) { Point<3> p2= points.Get(j).p; if (!s2->PointOnSurface (p2)) continue; Vec<3> n2; s2->GetNormalVector (p2, n2); n2 /= n2.Length(); if ( fabs(n2 * points.Get(j).v) > 1e-3) continue; Vec<3> v(p1, p2); double vl = v.Length(); double cl = fabs (v*n1); val = 1 - cl*cl/(vl*vl); val += (points.Get(i).v - points.Get(j).v).Length(); if (val < bestval) { bestj = j; bestval = val; } } (*testout) << "Identify close surfaces special points: pi = " << points.Get(i).p << ", vi = " << points.Get(i).v << " pj = " << points.Get(bestj).p << ", vj = " << points.Get(bestj).v << " bestval = " << bestval << endl; } } */ int CloseSurfaceIdentification :: Identifyable (const SpecialPoint & sp1, const SpecialPoint & sp2, const TABLE & specpoint2solid, const TABLE & specpoint2surface) const { //(*testout) << "identcheck: " << sp1.p << "; " << sp2.p << endl; if (!dom_surf_valid) { const_cast (dom_surf_valid) = 1; Array & hsurf = const_cast&> (domain_surfaces); if (domain) { BoxSphere<3> hbox (geom.BoundingBox()); geom.GetIndependentSurfaceIndices (domain->GetSolid(), hbox, hsurf); //(*testout) << "surfs of identification " << nr << ": " << endl << hsurf << endl; } else { hsurf.SetSize (geom.GetNSurf()); for (int j = 0; j < hsurf.Size(); j++) hsurf[j] = j; } } if (domain) { bool has1 = 0, has2 = 0; for (int i = 0; i < specpoint2solid[sp1.nr].Size(); i++) if (specpoint2solid[sp1.nr][i] == dom_nr) { has1 = 1; break; } for (int i = 0; i < specpoint2solid[sp2.nr].Size(); i++) if (specpoint2solid[sp2.nr][i] == dom_nr) { has2 = 1; break; } if (!has1 || !has2) { //(*testout) << "failed at pos1" << endl; return 0; } } if (!s1->PointOnSurface (sp1.p)) { //(*testout) << "failed at pos2" << endl; return 0; } // (*testout) << "sp1 " << sp1.p << " sp2 " << sp2.p << endl // << "specpoint2solid[sp1.nr] " << specpoint2solid[sp1.nr] << endl // << "specpoint2solid[sp2.nr] " << specpoint2solid[sp2.nr] << endl; Vec<3> n1 = s1->GetNormalVector (sp1.p); n1.Normalize(); if ( fabs(n1 * sp1.v) > eps_n) { //(*testout) << "failed at pos3" << endl; return 0; } if (!s2->PointOnSurface(sp2.p)) { //(*testout) << "failed at pos4" << endl; return 0; } Vec<3> n2 = s2->GetNormalVector (sp2.p); n2.Normalize(); if ( fabs(n2 * sp2.v) > eps_n) { //(*testout) << "failed at pos5" << endl; return 0; } // must have joint surface bool joint = 0; int j = 0, k = 0; while (1) { int snr1 = specpoint2surface[sp1.nr][j]; int snr2 = specpoint2surface[sp2.nr][k]; if (snr1 < snr2) { j++; if (j == specpoint2surface[sp1.nr].Size()) break; } else if (snr2 < snr1) { k++; if (k == specpoint2surface[sp2.nr].Size()) break; } else { bool dom_surf = 0; for (int l = 0; l < domain_surfaces.Size(); l++) if (domain_surfaces[l] == snr1) dom_surf = 1; if (dom_surf) { Vec<3> hn1 = geom.GetSurface(snr1)->GetNormalVector (sp1.p); Vec<3> hn2 = geom.GetSurface(snr1)->GetNormalVector (sp2.p); if (hn1 * hn2 > 0) { joint = 1; break; } } j++; if (j == specpoint2surface[sp1.nr].Size()) break; k++; if (k == specpoint2surface[sp2.nr].Size()) break; } } if (!joint) { //(*testout) << "failed at pos6" << endl; return 0; } Vec<3> v = sp2.p - sp1.p; double vl = v.Length(); double cl = (usedirection) ? fabs(v*direction) : fabs (v*n1); if(cl <= (1-eps_n*eps_n) * vl) { //(*testout) << "failed at pos7" << endl; return 0; } double dl; if(usedirection) { Vec<3> v1 = sp1.v - (sp1.v*direction)*direction; v1.Normalize(); Vec<3> v2 = sp2.v - (sp2.v*direction)*direction; v2.Normalize(); dl = (v1 - v2).Length(); } else dl = (sp1.v - sp2.v).Length(); if (dl < 0.1) return 1; //(*testout) << "failed at pos8" << endl; return 0; } int CloseSurfaceIdentification :: Identifyable (const Point<3> & p1, const Point<3> & p2) const { // if (domain) // if (!domain->GetSolid()->IsIn (p1) || !domain->GetSolid()->IsIn (p2)) // return 0; return (s1->PointOnSurface (p1) && s2->PointOnSurface (p2)); } int CloseSurfaceIdentification :: IdentifyableCandidate (const SpecialPoint & sp1) const { if (domain) if (!domain->GetSolid()->IsIn (sp1.p)) return 0; if (s1->PointOnSurface (sp1.p)) { Vec<3> n1; n1 = s1->GetNormalVector (sp1.p); n1.Normalize(); if ( fabs(n1 * sp1.v) > eps_n) return 0; return 1; } if (s2->PointOnSurface (sp1.p)) { Vec<3> n1; n1 = s2->GetNormalVector (sp1.p); n1.Normalize(); if ( fabs(n1 * sp1.v) > eps_n) return 0; return 1; } return 0; } int CloseSurfaceIdentification :: ShortEdge (const SpecialPoint & sp1, const SpecialPoint & sp2) const { if ( (s1->PointOnSurface (sp1.p) && s2->PointOnSurface (sp2.p)) || (s1->PointOnSurface (sp2.p) && s2->PointOnSurface (sp1.p)) ) { return 1; } return 0; } int CloseSurfaceIdentification :: GetIdentifiedPoint (class Mesh & mesh, int pi) { const Surface *snew; const Point<3> & p = mesh.Point (pi); Array identmap(mesh.GetNP()); mesh.GetIdentifications().GetMap (nr, identmap); if (identmap.Get(pi)) return identmap.Get(pi); if (s1->PointOnSurface (p)) snew = s2; else if (s2->PointOnSurface (p)) snew = s1; else { (*testout) << "GetIdenfifiedPoint: Not possible" << endl; (*testout) << "p = " << p << endl; (*testout) << "surf1: " << (*s1) << endl << "surf2: " << (*s2) << endl; cerr << "GetIdenfifiedPoint: Not possible" << endl; throw NgException ("GetIdenfifiedPoint: Not possible"); } // project to other surface Point<3> hp = p; if(usedirection) snew->SkewProject(hp,direction); else snew->Project (hp); //(*testout) << "projecting " << p << " to " << hp << endl; int newpi = 0; for (int i = 1; i <= mesh.GetNP(); i++) if (Dist2 (mesh.Point(i), hp) < 1e-12) // if (Dist2 (mesh.Point(i), hp) < 1 * Dist2 (hp, p)) { newpi = i; break; } if (!newpi) newpi = mesh.AddPoint (hp); if (snew == s2) { mesh.GetIdentifications().Add (pi, newpi, nr); //(*testout) << "add identification(1) " << pi << " - " << newpi << ", " << nr << endl; } else { mesh.GetIdentifications().Add (newpi, pi, nr); //(*testout) << "add identification(2) " << newpi << " - " << pi << ", " << nr << endl; } mesh.GetIdentifications().SetType(nr,Identifications::CLOSESURFACES); /* (*testout) << "Identify points(closesurface), nr = " << nr << ": " << mesh.Point(pi) << " and " << mesh.Point(newpi) << ((snew == s2) ? "" : " inverse") << endl; */ return newpi; } void CloseSurfaceIdentification :: IdentifyPoints (Mesh & mesh) { int np = mesh.GetNP(); Array points_on_surf2; for (int i2 = 1; i2 <= np; i2++) if (s2->PointOnSurface (mesh.Point(i2))) points_on_surf2.Append (i2); Array surfs_of_p1; for (int i1 = 1; i1 <= np; i1++) { Point<3> p1 = mesh.Point(i1); // (*testout) << "p1 = " << i1 << " = " << p1 << endl; if (domain && !domain->GetSolid()->IsIn (p1)) continue; //if(domain) (*testout) << "p1 is in " << domain->GetSolid()->Name() << endl; if (s1->PointOnSurface (p1)) { int candi2 = 0; double mindist = 1e10; Vec<3> n1; n1 = s1->GetNormalVector (p1); n1.Normalize(); surfs_of_p1.SetSize(0); for (int jj = 0; jj < domain_surfaces.Size(); jj++) { int j = domain_surfaces[jj]; if (geom.GetSurface(j) -> PointOnSurface(p1)) surfs_of_p1.Append (j); } //(*testout) << " surfs of p1 = " << endl << surfs_of_p1 << endl; for (int ii2 = 0; ii2 < points_on_surf2.Size(); ii2++) { int i2 = points_on_surf2[ii2]; if (i2 == i1) continue; const Point<3> p2 = mesh.Point(i2); Vec<3> n = p2 - p1; n.Normalize(); bool joint = 0; for (int jj = 0; jj < surfs_of_p1.Size(); jj++) { int j = surfs_of_p1[jj]; if (geom.GetSurface(j) -> PointOnSurface(p2)) { Vec<3> hn1 = geom.GetSurface(j)->GetNormalVector (p1); Vec<3> hn2 = geom.GetSurface(j)->GetNormalVector (p2); if (hn1 * hn2 > 0) { joint = 1; break; } } } if (!joint) continue; if(usedirection) { if (fabs (n*direction) > 0.9) { Vec<3> p1p2 = p2-p1; double ndist = p1p2.Length2() - pow(p1p2*direction,2); if(ndist < mindist) { candi2 = i2; mindist = ndist; } } } else { if (fabs (n * n1) > 0.9 && Dist (p1, p2) < mindist) { candi2 = i2; mindist = Dist (p1, p2); } } } if (candi2) { //(*testout) << "identify points " << p1 << " - " << mesh.Point(candi2) << endl; /* (*testout) << "Add Identification from CSI2, nr = " << nr << ", p1 = " << i1 << " = " << mesh[PointIndex(i1)] << ", p2 = " << candi2 << " = " << mesh[PointIndex(candi2)] << endl; */ mesh.GetIdentifications().Add (i1, candi2, nr); mesh.GetIdentifications().SetType(nr,Identifications::CLOSESURFACES); //(*testout) << "add identification " << i1 << " - " << candi2 << ", " << nr << endl; } } } } void CloseSurfaceIdentification :: IdentifyFaces (class Mesh & mesh) { int fi1, fi2, side; int s1rep = -1, s2rep = -1; for (int i = 0; i < geom.GetNSurf(); i++) { if (geom.GetSurface (i) == s1) s1rep = geom.GetSurfaceClassRepresentant(i); if (geom.GetSurface (i) == s2) s2rep = geom.GetSurfaceClassRepresentant(i); } Array segs_on_face1, segs_on_face2; identfaces.DeleteData(); //(*testout) << "identify faces, nr = " << nr << endl; for (int i = 1; i <= mesh.GetNFD(); i++) { auto & fdi = mesh.GetFaceDescriptor(i); int surfi = mesh.GetFaceDescriptor(i).SurfNr(); if (s1rep != surfi) continue; if (domain && domain != geom.GetTopLevelObject (mesh.GetFaceDescriptor(i).DomainIn()-1) && domain != geom.GetTopLevelObject (mesh.GetFaceDescriptor(i).DomainOut()-1)) continue; for (int j = 1; j <= mesh.GetNFD(); j++) { auto & fdj = mesh.GetFaceDescriptor(j); int surfj = mesh.GetFaceDescriptor(j).SurfNr(); if (surfi == surfj) continue; if (s2rep != surfj) continue; bool have_common = false; if (fdi.DomainIn() != 0) if (fdi.DomainIn() == fdj.DomainIn() || fdi.DomainIn() == fdj.DomainOut()) have_common = true; if (fdi.DomainOut() != 0) if (fdi.DomainOut() == fdj.DomainIn() || fdi.DomainOut() == fdj.DomainOut()) have_common = true; if (!have_common) continue; int idok = 1; for (side = 1; side <= 2 && idok; side++) { if (side == 1) { fi1 = i; fi2 = j; } else { fi1 = j; fi2 = i; } segs_on_face1.SetSize(0); segs_on_face2.SetSize(0); for (int k = 1; k <= mesh.GetNSeg(); k++) { if (mesh.LineSegment(k).si == fi1) segs_on_face1.Append (k); if (mesh.LineSegment(k).si == fi2) segs_on_face2.Append (k); } for (int k = 1; k <= mesh.GetNSeg(); k++) { const Segment & seg1 = mesh.LineSegment(k); if (seg1.si != fi1) continue; int foundother = 0; /* for (int l = 1; l <= mesh.GetNSeg(); l++) { const Segment & seg2 = mesh.LineSegment(l); if (seg2.si != fi2) continue; */ for (int ll = 0; ll < segs_on_face2.Size(); ll++) { int l = segs_on_face2[ll]; const Segment & seg2 = mesh.LineSegment(l); if (side == 1) { if (mesh.GetIdentifications().Get (seg1[0], seg2[0]) && mesh.GetIdentifications().Get (seg1[1], seg2[1])) { foundother = 1; break; } if (mesh.GetIdentifications().Get (seg1[0], seg2[1]) && mesh.GetIdentifications().Get (seg1[1], seg2[0])) { foundother = 1; break; } } else { if (mesh.GetIdentifications().Get (seg2[0], seg1[0]) && mesh.GetIdentifications().Get (seg2[1], seg1[1])) { foundother = 1; break; } if (mesh.GetIdentifications().Get (seg2[0], seg1[1]) && mesh.GetIdentifications().Get (seg2[1], seg1[0])) { foundother = 1; break; } } } if (!foundother) { idok = 0; break; } } } if (idok) { //(*testout) << "Identification " << nr << ", identify faces " << i << " and " << j << endl; INDEX_2 fpair(i,j); fpair.Sort(); identfaces.Set (fpair, 1); } } } } void CloseSurfaceIdentification :: BuildSurfaceElements (Array & segs, Mesh & mesh, const Surface * surf) { bool found = 0; int cntquads = 0; Array identmap; identmap = 0; mesh.GetIdentifications().GetMap (nr, identmap); for (int i = PointIndex::BASE; i < identmap.Size()+PointIndex::BASE; i++) if (identmap[i]) identmap[identmap[i]] = i; //(*testout) << "identification nr = " << nr << endl; //(*testout) << "surf = " << (*surf) << endl; //(*testout) << "domain = " << domain->GetSolid()->Name() << endl; //(*testout) << "segs = " << endl << segs << endl; //(*testout) << "identmap = " << endl << identmap << endl; //Array foundseg(segs.Size()); //foundseg = false; // insert quad layer: for (int i1 = 0; i1 < segs.Size(); i1++) { const Segment & s1 = segs[i1]; if (identmap[s1[0]] && identmap[s1[1]]) for (int i2 = 0; i2 < i1; i2++) { const Segment & s2 = segs[i2]; //(*testout) << "checking " << s1 << " and " << s2 << " for ident." << endl; if(domain && !((s1.domin == dom_nr || s1.domout == dom_nr) && (s2.domin == dom_nr || s2.domout == dom_nr))) continue; if ((mesh.GetIdentifications().Get (s1[0], s2[1], nr) && mesh.GetIdentifications().Get (s1[1], s2[0], nr)) || (mesh.GetIdentifications().Get (s2[0], s1[1], nr) && mesh.GetIdentifications().Get (s2[1], s1[0], nr))) { Vec<3> ns = surf->GetNormalVector (mesh[s1[0]]); Vec<3> t1 = mesh[s1[1]] - mesh[s1[0]]; // Vec<3> t2 = mesh[s2[1]] - mesh[s2[0]]; Vec<3> nst1 = Cross(t1, ns); // Vec<3> nst2 = Cross(t2, ns); Vec<3> dvec = Center(mesh[s1[0]], mesh[s1[1]])-Center(mesh[s2[0]], mesh[s2[1]]); if (nst1 * dvec < 0) continue; Element2d el(s1[0], s1[1], s2[0], s2[1]); Vec<3> n = Cross (mesh[el[1]] - mesh[el[0]], mesh[el[3]] - mesh[el[0]]); if (n * ns < 0) { Swap (el.PNum(1), el.PNum(2)); Swap (el.PNum(3), el.PNum(4)); } mesh.AddSurfaceElement (el); // (*testout) << "(id nr "<< nr <<") add rect element: " // << mesh.Point (el.PNum(1)) << " - " // << mesh.Point (el.PNum(2)) << " - " // << mesh.Point (el.PNum(3)) << " - " // << mesh.Point (el.PNum(4)) << endl; found = true; //foundseg[i1]=foundseg[i2] = true; cntquads++; } } } if (found) { PrintMessage(3, "insert quad layer of ", cntquads, " elements at face ", segs.Get(1).si); //Array aux; //for(int i=0; i & segs, Mesh & mesh, const Surface * surf) { // copy mesh // (*testout) << "copy trig face, identnr = " << nr << endl; // (*testout) << "identfaces = " << endl << identfaces << endl; if (!segs.Size()) return; bool found = 0; int fother = -1; int facei = segs[0].si; int surfnr = mesh.GetFaceDescriptor(facei).SurfNr(); bool foundid = 0; for (INDEX_2_HASHTABLE::Iterator it = identfaces.Begin(); it != identfaces.End(); it++) { INDEX_2 i2; int data; identfaces.GetData (it, i2, data); if (i2.I1() == facei || i2.I2() == facei) foundid = 1; } /* for (int i = 1; i <= identfaces.GetNBags(); i++) for (int j = 1; j <= identfaces.GetBagSize(i); j++) { INDEX_2 i2; int data; identfaces.GetData (i, j, i2, data); if (i2.I1() == facei || i2.I2() == facei) foundid = 1; (*testout) << "identface = " << i2 << endl; (*testout) << "face " << i2.I1() << " = " << mesh.GetFaceDescriptor(i2.I1()) << endl; (*testout) << "face " << i2.I2() << " = " << mesh.GetFaceDescriptor(i2.I2()) << endl; } */ if (foundid) { // (*testout) << "surfaces found" << endl; // copy surface for (SurfaceElementIndex sei = 0; sei < mesh.GetNSE(); sei++) { const Element2d & sel = mesh[sei]; INDEX_2 fpair (facei, sel.GetIndex()); fpair.Sort(); if (identfaces.Used (fpair)) { found = 1; fother = sel.GetIndex(); // copy element Element2d newel(sel.GetType()); newel.SetIndex (facei); for (int k = 1; k <= sel.GetNP(); k++) newel.PNum(k) = GetIdentifiedPoint (mesh, sel.PNum(k)); Vec<3> nt = Cross (Point<3> (mesh.Point (newel.PNum(2)))- Point<3> (mesh.Point (newel.PNum(1))), Point<3> (mesh.Point (newel.PNum(3)))- Point<3> (mesh.Point (newel.PNum(1)))); Vec<3> nsurf; nsurf = geom.GetSurface (surfnr)->GetNormalVector (mesh.Point(newel.PNum(1))); if (nsurf * nt < 0) Swap (newel.PNum(2), newel.PNum(3)); mesh.AddSurfaceElement (newel); } } } if (found) { // (*mycout) << " copy face " << facei << " from face " << fother; PrintMessage (4, " copy face ", facei, " from face ", fother); segs.SetSize(0); } } void CloseSurfaceIdentification :: BuildVolumeElements (Array & surfels, class Mesh & mesh) { ; } /* ***************** Close Edges Identification ********** */ CloseEdgesIdentification :: CloseEdgesIdentification (int anr, const CSGeometry & ageom, const Surface * afacet, const Surface * as1, const Surface * as2) : Identification(anr, ageom) { facet = afacet; s1 = as1; s2 = as2; } CloseEdgesIdentification :: ~CloseEdgesIdentification () { ; } void CloseEdgesIdentification :: Print (ostream & ost) const { ost << "CloseEdges Identifiaction, facet = " << facet->Name() << ", surfaces: " << s1->Name() << " - " << s2->Name() << endl; facet->Print (ost); s1->Print (ost); s2->Print (ost); ost << endl; } void CloseEdgesIdentification :: GetData (ostream & ost) const { ost << "closeedges " << facet->Name() << " " << s1->Name() << " " << s2->Name(); } /* void CloseEdgesIdentification :: IdentifySpecialPoints (Array & points) { int i, j; int bestj; double bestval, val; for (i = 1; i <= points.Size(); i++) { Point<3> p1 = points.Get(i).p; Vec<3> n1; if (!s1->PointOnSurface (p1)) continue; s1->GetNormalVector (p1, n1); n1 /= n1.Length(); if ( fabs(n1 * points.Get(i).v) > 1e-3) continue; bestval = 1e8; bestj = 1; for (j = 1; j <= points.Size(); j++) { Point<3> p2= points.Get(j).p; if (!s2->PointOnSurface (p2)) continue; Vec<3> n2; s2->GetNormalVector (p2, n2); n2 /= n2.Length(); if ( fabs(n2 * points.Get(j).v) > 1e-3) continue; Vec<3> v(p1, p2); double vl = v.Length(); double cl = fabs (v*n1); val = 1 - cl*cl/(vl*vl); val += (points.Get(i).v - points.Get(j).v).Length(); if (val < bestval) { bestj = j; bestval = val; } } (*testout) << "Identify close surfaces special points: pi = " << points.Get(i).p << ", vi = " << points.Get(i).v << " pj = " << points.Get(bestj).p << ", vj = " << points.Get(bestj).v << " bestval = " << bestval << endl; } } */ int CloseEdgesIdentification :: Identifyable (const SpecialPoint & sp1, const SpecialPoint & sp2, const TABLE & specpoint2solid, const TABLE & specpoint2surface) const { int i; double val; SpecialPoint hsp1 = sp1; SpecialPoint hsp2 = sp2; for (i = 1; i <= 1; i++) { if (!s1->PointOnSurface (hsp1.p)) continue; Vec<3> n1; n1 = s1->GetNormalVector (hsp1.p); n1 /= n1.Length(); if ( fabs(n1 * hsp1.v) > 1e-3) continue; if (!s2->PointOnSurface(hsp2.p)) continue; Vec<3> n2; n2 = s2->GetNormalVector (hsp2.p); n2 /= n2.Length(); if ( fabs(n2 * hsp2.v) > 1e-3) continue; Vec<3> v = hsp2.p - hsp1.p; double vl = v.Length(); double cl = fabs (v*n1); val = 1 - cl*cl/(vl*vl); val += (hsp1.v - hsp2.v).Length(); if (val < 1e-3) { return 1; } } return 0; } void CloseEdgesIdentification :: IdentifyPoints (Mesh & mesh) { int np = mesh.GetNP(); for (int i1 = 1; i1 <= np; i1++) for (int i2 = 1; i2 <= np; i2++) { if (i2 == i1) continue; const Point<3> p1 = mesh.Point(i1); const Point<3> p2 = mesh.Point(i2); Point<3> pp1 = p1; Point<3> pp2 = p2; s1->Project (pp1); facet->Project (pp1); s2->Project (pp2); facet->Project (pp2); if (Dist (p1, pp1) > 1e-6 || Dist (p2, pp2) > 1e-6) continue; Vec<3> n1, nf, t; Vec<3> n = p2 - p1; n.Normalize(); n1 = s1->GetNormalVector (p1); nf = facet->GetNormalVector (p1); t = Cross (n1, nf); t /= t.Length(); if (fabs (n * t) < 0.5) { (*testout) << "close edges identify points " << p1 << " - " << p2 << endl; mesh.GetIdentifications().Add (i1, i2, nr); mesh.GetIdentifications().SetType(nr,Identifications::CLOSEEDGES); } } } void CloseEdgesIdentification :: BuildSurfaceElements (Array & segs, Mesh & mesh, const Surface * surf) { int found = 0; if (surf != facet) return; for (int i1 = 1; i1 <= segs.Size(); i1++) for (int i2 = 1; i2 < i1; i2++) { const Segment & s1 = segs.Get(i1); const Segment & s2 = segs.Get(i2); if (mesh.GetIdentifications().Get (s1[0], s2[1]) && mesh.GetIdentifications().Get (s1[1], s2[0])) { Element2d el(QUAD); el.PNum(1) = s1[0]; el.PNum(2) = s1[1]; el.PNum(3) = s2[1]; el.PNum(4) = s2[0]; Vec<3> n = Cross (Point<3> (mesh.Point(el.PNum(2)))- Point<3> (mesh.Point(el.PNum(1))), Point<3> (mesh.Point(el.PNum(3)))- Point<3> (mesh.Point(el.PNum(1)))); Vec<3> ns; ns = surf->GetNormalVector (mesh.Point(el.PNum(1))); //(*testout) << "n = " << n << " ns = " << ns << endl; if (n * ns < 0) { //(*testout) << "Swap the quad" << endl; Swap (el.PNum(1), el.PNum(2)); Swap (el.PNum(3), el.PNum(4)); } Swap (el.PNum(3), el.PNum(4)); mesh.AddSurfaceElement (el); // (*testout) << "add rect element: " // << mesh.Point (el.PNum(1)) << " - " // << mesh.Point (el.PNum(2)) << " - " // << mesh.Point (el.PNum(3)) << " - " // << mesh.Point (el.PNum(4)) << endl; found = 1; } } if (found) segs.SetSize(0); } } netgen-6.2.1804/libsrc/csg/triapprox.cpp0000644000175000017500000000201113272137567016565 0ustar kurtkurt#include #include #include #include namespace netgen { TriangleApproximation :: TriangleApproximation () { ; } int TriangleApproximation :: AddTriangle (const TATriangle & tri, bool invert) { trigs.Append (tri); if (invert) { trigs.Last()[1] = tri[2]; trigs.Last()[2] = tri[1]; } return trigs.Size()-1; } void TriangleApproximation :: RemoveUnusedPoints () { BitArray used(GetNP()); Array map (GetNP()); int i, j; int cnt = 0; used.Clear(); for (i = 0; i < GetNT(); i++) for (j = 0; j < 3; j++) used.Set (GetTriangle (i)[j]); for (i = 0; i < GetNP(); i++) if (used.Test(i)) map[i] = cnt++; for (i = 0; i < GetNT(); i++) for (j = 0; j < 3; j++) trigs[i][j] = map[trigs[i][j]]; for (i = 0; i < GetNP(); i++) if (used.Test(i)) { points[map[i]] = points[i]; normals[map[i]] = normals[i]; } points.SetSize (cnt); normals.SetSize (cnt); } } netgen-6.2.1804/libsrc/csg/revolution.hpp0000644000175000017500000000747213272137567016770 0ustar kurtkurt#ifndef _REVOLUTION_HPP #define _REVOLUTION_HPP namespace netgen { class Revolution; class RevolutionFace : public Surface { private: bool isfirst, islast; const SplineSeg<2> * spline; bool deletable; Point<3> p0; Vec<3> v_axis; int id; // coefficient for implicizt polynomial mutable Vector spline_coefficient; mutable Vector spline_coefficient_shifted; Array < Vec<2>* > checklines_vec; Array < Point<2>* > checklines_start; Array < Vec<2>* > checklines_normal; private: void Init (void); public: void CalcProj(const Point<3> & point3d, Point<2> & point2d) const; void CalcProj(const Point<3> & point3d, Point<2> & point2d, const Vec<3> & vector3d, Vec<2> & vector2d) const; void CalcProj0(const Vec<3> & point3d_minus_p0, Point<2> & point2d) const; public: RevolutionFace(const SplineSeg<2> & spline_in, const Point<3> & p, const Vec<3> & vec, bool first = false, bool last = false, const int id_in = 0); RevolutionFace(const Array & raw_data); ~RevolutionFace(); virtual int IsIdentic (const Surface & s2, int & inv, double eps) const; virtual double CalcFunctionValue (const Point<3> & point) const; virtual void CalcGradient (const Point<3> & point, Vec<3> & grad) const; virtual void CalcHesse (const Point<3> & point, Mat<3> & hesse) const; virtual double HesseNorm () const; virtual double MaxCurvature () const; //virtual double MaxCurvatureLoc (const Point<3> & /* c */ , // double /* rad */) const; virtual void Project (Point<3> & p) const; virtual Point<3> GetSurfacePoint () const; virtual void Print (ostream & str) const; virtual void GetTriangleApproximation (TriangleApproximation & tas, const Box<3> & boundingbox, double facets) const; bool BoxIntersectsFace (const Box<3> & box) const; /* bool BoxIntersectsFace (const BoxSphere<2> & box, bool & uncertain) const; bool BoxIntersectsFace (const BoxSphere<3> & box, bool & uncertain) const; */ const SplineSeg<2> & GetSpline(void) const {return *spline;} /* INSOLID_TYPE */ bool PointInFace (const Point<3> & p, const double eps) const; void GetRawData(Array & data) const; }; /* Primitive of revolution */ class Revolution : public Primitive { private: Point<3> p0,p1; Vec<3> v_axis; const SplineGeometry<2> & splinecurve; const int nsplines; // 1 ... torus-like // 2 ... sphere-like int type; Array faces; mutable int intersecting_face; public: Revolution(const Point<3> & p0_in, const Point<3> & p1_in, const SplineGeometry<2> & spline_in); ~Revolution(); /* Check, whether box intersects solid defined by surface. return values: 0 .. box outside solid \\ 1 .. box in solid \\ 2 .. can't decide (allowed, iff box is close to solid) */ virtual INSOLID_TYPE BoxInSolid (const BoxSphere<3> & box) const; virtual INSOLID_TYPE PointInSolid (const Point<3> & p, double eps) const; virtual void GetTangentialSurfaceIndices (const Point<3> & p, Array & surfind, double eps) const; virtual INSOLID_TYPE VecInSolid (const Point<3> & p, const Vec<3> & v, double eps) const; // checks if lim s->0 lim t->0 p + t(v1 + s v2) in solid virtual INSOLID_TYPE VecInSolid2 (const Point<3> & p, const Vec<3> & v1, const Vec<3> & v2, double eps) const; virtual int GetNSurfaces() const; virtual Surface & GetSurface (int i = 0); virtual const Surface & GetSurface (int i = 0) const; virtual void Reduce (const BoxSphere<3> & box); virtual void UnReduce (); }; } #endif netgen-6.2.1804/libsrc/csg/spline3d.hpp0000644000175000017500000000460013272137567016271 0ustar kurtkurtnamespace netgen { /// class splinesegment3d { /// Point<3> p1, p2, p3; public: /// splinesegment3d (const Point<3> & ap1, const Point<3> & ap2, const Point<3> & ap3); /// void Evaluate (double t, Point<3> & p) const; /// void EvaluateTangent (double t, Vec<3> & tang) const; /// const Point<3> & P1() const { return p1; } /// const Point<3> & P2() const { return p2; } /// const Point<3> & P3() const { return p3; } }; /// class spline3d { /// Array segments; public: /// spline3d () { }; /// void AddSegment (const Point<3> & ap1, const Point<3> & ap2, const Point<3> & ap3); /// int GetNumSegments () const { return segments.Size(); } /// double ProjectToSpline (Point<3> & p) const; /// double ProjectToSpline (Point<3> & p, double t) const; /// void Evaluate (double t, Point<3> & p) const; /// void EvaluateTangent (double t, Vec<3> & tang) const; /// const Point<3> & P1(int i) const { return segments.Get(i)->P1(); } /// const Point<3> & P2(int i) const { return segments.Get(i)->P2(); } /// const Point<3> & P3(int i) const { return segments.Get(i)->P3(); } }; /// class splinetube : public Surface { /// const spline3d & middlecurve; /// double r; /// Vec<3> ex, ey, ez; Vec<2> e2x, e2y; /// Point<3> cp; public: /// splinetube (const spline3d & amiddlecurve, double ar); /// virtual void DefineTangentialPlane (const Point<3> & ap1, const Point<3> & ap2); /// virtual void ToPlane (const Point<3> & p, Point<2> & pplain, double h, int & zone) const; /// virtual void FromPlane (const Point<2> & pplain, Point<3> & p, double h) const; /// virtual void Project (Point<3> & p) const; // virtual int RootInBox (const box3d & box) const { return 0; } /// 0 .. no, 1 .. yes, 2 .. maybe virtual int BoxInSolid (const BoxSphere<3> & box) const; /// 0 .. no, 1 .. yes, 2 .. maybe virtual double CalcFunctionValue (const Point<3> & point) const; /// virtual void CalcGradient (const Point<3> & point, Vec<3> & grad) const; /// virtual double HesseNorm () const { return 0.5 / r; } /// virtual Point<3> GetSurfacePoint () const; /// virtual void Print (ostream & str) const; }; } netgen-6.2.1804/libsrc/csg/csgeom.cpp0000644000175000017500000010666013272137567016031 0ustar kurtkurt#include #include #include #include namespace netgen { int CSGeometry :: changeval = 0; TopLevelObject :: TopLevelObject (Solid * asolid, Surface * asurface) { solid = asolid; surface = asurface; SetRGB (0, 0, 1); SetTransparent (0); SetVisible (1); SetLayer (1); if (!surface) maxh = solid->GetMaxH(); else maxh = surface->GetMaxH(); SetBCProp (-1); bcname = "default"; } void TopLevelObject :: GetData (ostream & ost) { ost << red << " " << green << " " << blue << " " << transp << " " << visible << " "; } void TopLevelObject :: SetData (istream & ist) { ist >> red >> green >> blue >> transp >> visible; } Box<3> CSGeometry::default_boundingbox (Point<3> (-1000, -1000, -1000), Point<3> ( 1000, 1000, 1000)); CSGeometry :: CSGeometry () : boundingbox (default_boundingbox), identicsurfaces (100), ideps(1e-9), filename("") { ; } CSGeometry :: CSGeometry (const string & afilename) : boundingbox (default_boundingbox), identicsurfaces (100), ideps(1e-9), filename(afilename) { changeval++; } CSGeometry :: ~CSGeometry () { Clean(); } void CSGeometry :: Clean () { Array< Solid* > to_delete; for (int i = 0; i < solids.Size(); i++) if(!to_delete.Contains(solids[i]->S1())) to_delete.Append(solids[i]->S1()); for (int i = 0; i < solids.Size(); i++) if(!to_delete.Contains(solids[i])) to_delete.Append(solids[i]); for(int i = 0; i < to_delete.Size(); i++) delete to_delete[i]; solids.DeleteAll (); for (int i = 0; i < splinecurves2d.Size(); i++) delete splinecurves2d[i]; splinecurves2d.DeleteAll(); /* for (int i = 0; i < surfaces.Size(); i++) delete surfaces[i]; surfaces.DeleteAll (); */ for(int i = 0; i & mesh, MeshingParameters & mparam); int CSGeometry :: GenerateMesh (shared_ptr & mesh, MeshingParameters & mparam) { return CSGGenerateMesh (*this, mesh, mparam); } const Refinement & CSGeometry :: GetRefinement () const { // cout << "get CSGeometry - Refinement" << endl; // should become class variables RefinementSurfaces * ref = new RefinementSurfaces(*this); ref -> Set2dOptimizer(new MeshOptimize2dSurfaces(*this)); return *ref; } class WritePrimitivesIt : public SolidIterator { ostream & ost; public: WritePrimitivesIt (ostream & aost) : ost(aost) { ; } virtual ~WritePrimitivesIt () { ; } virtual void Do (Solid * sol); }; void WritePrimitivesIt :: Do (Solid * sol) { Primitive * prim = sol->GetPrimitive(); if (prim) { const char * classname; Array coeffs; prim -> GetPrimitiveData (classname, coeffs); if (sol->Name()) ost << "primitive " << sol->Name() << " " << classname << " " << coeffs.Size(); for (int i = 0; i < coeffs.Size(); i++) ost << " " << coeffs[i]; ost << endl; } } void CSGeometry :: Save (string filename) const { ofstream ost (filename.c_str()); Save (ost); } void CSGeometry :: Save (ostream & ost) const { ost << "boundingbox " << boundingbox.PMin()(0) << " " << boundingbox.PMin()(1) << " " << boundingbox.PMin()(2) << " " << boundingbox.PMax()(0) << " " << boundingbox.PMax()(1) << " " << boundingbox.PMax()(2) << endl; WritePrimitivesIt wpi(ost); IterateAllSolids (wpi, 1); for (int i = 0; i < solids.Size(); i++) { if (!solids[i]->GetPrimitive()) { ost << "solid " << solids.GetName(i) << " "; solids[i] -> GetSolidData (ost); ost << endl; } } for (int i = 0; i < GetNTopLevelObjects(); i++) { TopLevelObject * tlo = GetTopLevelObject (i); ost << "toplevel "; if (tlo -> GetSurface()) ost << "surface " << tlo->GetSolid()->Name() << " " << tlo->GetSurface()->Name() << " "; else ost << "solid " << tlo->GetSolid()->Name() << " "; tlo->GetData(ost); ost << endl; } for (int i = 0; i < identifications.Size(); i++) { ost << "identify "; identifications[i] -> GetData (ost); ost << endl; } ost << "end" << endl; } void CSGeometry :: Load (istream & ist) { // CSGeometry * geo = new CSGeometry; char key[100], name[100], classname[100], sname[100]; int ncoeff, i, j; Array coeff; while (ist.good()) { ist >> key; if (strcmp (key, "boundingbox") == 0) { Point<3> pmin, pmax; ist >> pmin(0) >> pmin(1) >> pmin(2); ist >> pmax(0) >> pmax(1) >> pmax(2); SetBoundingBox (Box<3> (pmin, pmax)); } if (strcmp (key, "primitive") == 0) { ist >> name >> classname >> ncoeff; coeff.SetSize (ncoeff); for (i = 0; i < ncoeff; i++) ist >> coeff[i]; Primitive * nprim = Primitive::CreatePrimitive (classname); nprim -> SetPrimitiveData (coeff); Solid * nsol = new Solid (nprim); for (j = 0; j < nprim->GetNSurfaces(); j++) { sprintf (sname, "%s,%d", name, j); AddSurface (sname, &nprim->GetSurface(j)); nprim -> SetSurfaceId (j, GetNSurf()); } SetSolid (name, nsol); } else if (strcmp (key, "solid") == 0) { ist >> name; Solid * nsol = Solid::CreateSolid (ist, solids); cout << " I have found solid " << name << " = "; nsol -> GetSolidData (cout); cout << endl; SetSolid (name, nsol); } else if (strcmp (key, "toplevel") == 0) { char type[20], solname[50], surfname[50]; const Solid * sol = NULL; const Surface * surf = NULL; int nr; ist >> type; if (strcmp (type, "solid") == 0) { ist >> solname; sol = GetSolid (solname); } if (strcmp (type, "surface") == 0) { ist >> solname >> surfname; sol = GetSolid (solname); surf = GetSurface (surfname); } nr = SetTopLevelObject ((Solid*)sol, (Surface*)surf); GetTopLevelObject (nr) -> SetData (ist); } else if (strcmp (key, "identify") == 0) { char type[10], surfname1[50], surfname2[50]; const Surface * surf1; const Surface * surf2; ist >> type >> surfname1 >> surfname2; surf1 = GetSurface(surfname1); surf2 = GetSurface(surfname2); AddIdentification (new PeriodicIdentification (GetNIdentifications(), *this, surf1, surf2)); } else if (strcmp (key, "end") == 0) break; } changeval++; } void CSGeometry :: SaveSurfaces (ostream & out) const { if(singfaces.Size() > 0 || singedges.Size() > 0 || singpoints.Size() > 0) { PrintMessage(3,"Singular faces/edges/points => no csg-information in .vol file"); return; } Array coeffs; const char * classname; out << "csgsurfaces " << GetNSurf() << "\n"; for(int i=0; i (GetSurface(i)); const ExtrusionFace * ef = dynamic_cast< const ExtrusionFace * > (GetSurface(i)); const RevolutionFace * rf = dynamic_cast< const RevolutionFace * > (GetSurface(i)); const DummySurface * dummyf = dynamic_cast< const DummySurface * > (GetSurface(i)); const SplineSurface * splines = dynamic_cast (GetSurface(i)); if (splines) { splines->GetBase()->GetPrimitiveData(classname,coeffs); out << classname << " " << coeffs.Size() << "\n"; for (int j=0; jGetCuts())) { cut->GetPrimitiveData(classname,coeffs); out << classname << " " << coeffs.Size() << "\n"; for (int j=0; jGetPrimitiveData(classname,coeffs); out << classname << " "; } else if(ef) { out << "extrusionface "; ef->GetRawData(coeffs); } else if(rf) { out << "revolutionface "; rf->GetRawData(coeffs); } else if(dummyf) { out << "dummy "; coeffs.SetSize(0); } else throw NgException ("Cannot write csg surface. Please, contact developers!"); out << coeffs.Size() << "\n"; for(int j=0; j coeffs; string classname; int nsurfaces,size; in >> classname; if(classname == "csgsurfaces") in >> nsurfaces; else nsurfaces = atoi(classname.c_str()); Point<3> dummypoint(0,0,0); Vec<3> dummyvec(0,0,0); double dummydouble(0.1); for(int i=0; i> classname; in >> size; coeffs.SetSize(size); for(int j=0; j> coeffs[j]; if(classname == "plane") { Plane * plane = new Plane(dummypoint,dummyvec); plane->SetPrimitiveData(coeffs); AddSurface(plane); delete_them.Append(plane); } else if(classname == "sphere") { Sphere * sphere = new Sphere(dummypoint,dummydouble); sphere->SetPrimitiveData(coeffs); AddSurface(sphere); delete_them.Append(sphere); } else if(classname == "cylinder") { Cylinder * cylinder = new Cylinder(coeffs); AddSurface(cylinder); delete_them.Append(cylinder); } else if(classname == "ellipticcylinder") { EllipticCylinder * cylinder = new EllipticCylinder(coeffs); AddSurface(cylinder); delete_them.Append(cylinder); } else if(classname == "torus") { Torus * torus = new Torus(dummypoint,dummyvec,dummydouble, dummydouble); torus->SetPrimitiveData(coeffs); AddSurface(torus); delete_them.Append(torus); } else if(classname == "cone") { Cone * cone = new Cone(dummypoint,dummypoint,dummydouble,dummydouble); cone->SetPrimitiveData(coeffs); AddSurface(cone); delete_them.Append(cone); } else if(classname == "ellipticcone") { EllipticCone * ellipticcone = new EllipticCone(dummypoint,dummyvec,dummyvec,dummydouble,dummydouble); ellipticcone->SetPrimitiveData(coeffs); AddSurface(ellipticcone); delete_them.Append(ellipticcone); } else if(classname == "extrusionface") { ExtrusionFace * ef = new ExtrusionFace(coeffs); AddSurface(ef); delete_them.Append(ef); } else if(classname == "revolutionface") { RevolutionFace * rf = new RevolutionFace(coeffs); AddSurface(rf); delete_them.Append(rf); } else if(classname == "dummy") { Surface * surf = new DummySurface(); AddSurface(surf); delete_them.Append(surf); } } } void CSGeometry :: SaveToMeshFile (ostream & ost) const { SaveSurfaces (ost); } void CSGeometry :: AddSurface (Surface * surf) { static int cntsurfs = 0; cntsurfs++; char name[15]; sprintf (name, "nnsurf%d", cntsurfs); AddSurface (name, surf); } void CSGeometry :: AddSurface (char * name, Surface * surf) { (*testout) << "Adding surface " << name << ": " << (*surf) << endl; surfaces.Set (name, surf); surf->SetName (name); changeval++; } void CSGeometry :: AddSurfaces (Primitive * prim) { for (int i = 0; i < prim->GetNSurfaces(); i++) { AddSurface (&prim->GetSurface(i)); prim->SetSurfaceId (i, GetNSurf()-1); surf2prim.Append (prim); } } const Surface * CSGeometry :: GetSurface (const char * name) const { if (surfaces.Used(name)) return surfaces.Get(name); else return NULL; } /* const Surface * CSGeometry :: GetSurface (int i) const { if (i >= 0 && i < surfaces.Size()) return surfaces[i]; else throw NgException ("CSGeometry::GetSurface out of range"); } */ void CSGeometry :: SetSolid (const char * name, Solid * sol) { Solid * oldsol = NULL; if (solids.Used (name)) oldsol = solids.Get(name); solids.Set (name, sol); sol->SetName (name); if (oldsol) { if (oldsol->op != Solid::ROOT || sol->op != Solid::ROOT) { cerr << "Setsolid: old or new no root" << endl; } oldsol -> s1 = sol -> s1; } changeval++; } const Solid * CSGeometry :: GetSolid (const char * name) const { if (solids.Used(name)) return solids.Get(name); else return NULL; } const Solid * CSGeometry :: GetSolid (const string & name) const { if (solids.Used(name.c_str())) return solids.Get(name.c_str()); else return NULL; } void CSGeometry :: SetSplineCurve (const char * name, SplineGeometry<2> * spl) { splinecurves2d.Set(name,spl); } void CSGeometry :: SetSplineCurve (const char * name, SplineGeometry<3> * spl) { splinecurves3d.Set(name,spl); } const SplineGeometry<2> * CSGeometry :: GetSplineCurve2d (const string & name) const { if (splinecurves2d.Used(name.c_str())) return splinecurves2d.Get(name.c_str()); else return NULL; } const SplineGeometry<3> * CSGeometry :: GetSplineCurve3d (const string & name) const { if (splinecurves3d.Used(name.c_str())) return splinecurves3d.Get(name.c_str()); else return NULL; } /* class RemoveDummyIterator : public SolidIterator { public: RemoveDummyIterator() { ; } virtual ~RemoveDummyIterator() { ; } virtual void Do(Solid * sol); }; void RemoveDummyIterator :: Do(Solid * sol) { cerr << "remove dummy iterator is obsolete" << endl; if ( (sol->op == Solid::SUB || sol->op == Solid::SECTION || sol->op == Solid::UNION) && sol->s1->op == Solid::DUMMY) sol->s1 = sol->s1->s1; if ( (sol->op == Solid::SECTION || sol->op == Solid::UNION) && sol->s2->op == Solid::DUMMY) sol->s2 = sol->s2->s1; } */ int CSGeometry :: SetTopLevelObject (Solid * sol, Surface * surf) { toplevelobjects.Append (new TopLevelObject (sol, surf)); return toplevelobjects.Size()-1; } TopLevelObject * CSGeometry :: GetTopLevelObject (const Solid * sol, const Surface * surf) { for (int i = 0; i < toplevelobjects.Size(); i++) { if (toplevelobjects[i]->GetSolid() == sol && toplevelobjects[i]->GetSurface() == surf) return (toplevelobjects[i]); } return NULL; } void CSGeometry :: RemoveTopLevelObject (Solid * sol, Surface * surf) { for (int i = 0; i < toplevelobjects.Size(); i++) { if (toplevelobjects[i]->GetSolid() == sol && toplevelobjects[i]->GetSurface() == surf) { delete toplevelobjects[i]; toplevelobjects.DeleteElement (i+1); changeval++; break; } } } void CSGeometry :: AddIdentification (Identification * ident) { identifications.Append (ident); } void CSGeometry :: SetFlags (const char * solidname, const Flags & flags) { Solid * solid = solids.Elem(solidname); Array surfind; int i; double maxh = flags.GetNumFlag ("maxh", -1); if (maxh > 0 && solid) { solid->GetSurfaceIndices (surfind); for (i = 0; i < surfind.Size(); i++) { if (surfaces[surfind[i]]->GetMaxH() > maxh) surfaces[surfind[i]] -> SetMaxH (maxh); } solid->SetMaxH (maxh); } if ( flags.StringFlagDefined ("bcname") ) { solid->GetSurfaceIndices (surfind); string bcn = flags.GetStringFlag("bcname", "default"); for (i = 0; i < surfind.Size(); i++) { if(surfaces[surfind[i]]->GetBCName() == "default") surfaces[surfind[i]]->SetBCName(bcn); } } if (flags.StringListFlagDefined ("bcname")) { const Array & bcname = flags.GetStringListFlag("bcname"); Polyhedra * polyh; if(solid->S1()) polyh = dynamic_cast(solid->S1()->GetPrimitive()); else polyh = dynamic_cast(solid->GetPrimitive()); if(polyh) { Array < Array * > polysurfs; polyh->GetPolySurfs(polysurfs); if(bcname.Size() != polysurfs.Size()) cerr << "WARNING: solid \"" << solidname << "\" has " << polysurfs.Size() << " surfaces and should get " << bcname.Size() << " bc-names!" << endl; for ( i = 0; i < min2(polysurfs.Size(),bcname.Size()); i++) { for (int j = 0; j < polysurfs[i]->Size(); j++) { if(surfaces[(*polysurfs[i])[j]]->GetBCName() == "default") surfaces[(*polysurfs[i])[j]]->SetBCName(bcname[i]); } delete polysurfs[i]; } } else { solid->GetSurfaceIndices (surfind); if(bcname.Size() != surfind.Size()) cerr << "WARNING: solid \"" << solidname << "\" has " << surfind.Size() << " surfaces and should get " << bcname.Size() << " bc-names!" << endl; for (i = 0; i < min2(surfind.Size(),bcname.Size()); i++) { if(surfaces[surfind[i]]->GetBCName() == "default") surfaces[surfind[i]]->SetBCName(bcname[i]); } } } if (flags.NumFlagDefined ("bc")) { solid->GetSurfaceIndices (surfind); int bc = int (flags.GetNumFlag("bc", -1)); for (i = 0; i < surfind.Size(); i++) { if (surfaces[surfind[i]]->GetBCProperty() == -1) surfaces[surfind[i]]->SetBCProperty(bc); } } if (flags.NumListFlagDefined ("bc")) { const Array & bcnum = flags.GetNumListFlag("bc"); Polyhedra * polyh; if(solid->S1()) polyh = dynamic_cast(solid->S1()->GetPrimitive()); else polyh = dynamic_cast(solid->GetPrimitive()); if(polyh) { Array < Array * > polysurfs; polyh->GetPolySurfs(polysurfs); if(bcnum.Size() != polysurfs.Size()) cerr << "WARNING: solid \"" << solidname << "\" has " << polysurfs.Size() << " surfaces and should get " << bcnum.Size() << " bc-numbers!" << endl; for ( i = 0; i < min2(polysurfs.Size(),bcnum.Size()); i++) { for (int j = 0; j < polysurfs[i]->Size(); j++) { if ( surfaces[(*polysurfs[i])[j]]->GetBCProperty() == -1 ) surfaces[(*polysurfs[i])[j]]->SetBCProperty(int(bcnum[i])); } delete polysurfs[i]; } } else { solid->GetSurfaceIndices (surfind); if(bcnum.Size() != surfind.Size()) cerr << "WARNING: solid \"" << solidname << "\" has " << surfind.Size() << " surfaces and should get " << bcnum.Size() << " bc-numbers!" << endl; for (i = 0; i < min2(surfind.Size(),bcnum.Size()); i++) { if (surfaces[surfind[i]]->GetBCProperty() == -1) surfaces[surfind[i]]->SetBCProperty(int(bcnum[i])); } } } } void CSGeometry :: FindIdenticSurfaces (double eps) { int inv; int nsurf = GetNSurf(); isidenticto.SetSize(nsurf); for (int i = 0; i < nsurf; i++) isidenticto[i] = i; for (int i = 0; i < nsurf; i++) for (int j = i+1; j < nsurf; j++) { if (GetSurface(j) -> IsIdentic (*GetSurface(i), inv, eps)) { INDEX_2 i2(i, j); identicsurfaces.Set (i2, inv); isidenticto[j] = isidenticto[i]; } } (*testout) << "identicmap:" << endl; for (int i = 0; i < isidenticto.Size(); i++) (*testout) << i << " -> " << isidenticto[i] << endl; } void CSGeometry :: GetSurfaceIndices (const Solid * sol, const BoxSphere<3> & box, Array & locsurf) const { ReducePrimitiveIterator rpi(box); UnReducePrimitiveIterator urpi; const_cast (sol) -> IterateSolid (rpi); sol -> GetSurfaceIndices (locsurf); const_cast (sol) -> IterateSolid (urpi); for (int i = locsurf.Size()-1; i >= 0; i--) { bool indep = 1; for (int j = 0; j < i; j++) if (locsurf[i] == locsurf[j]) { indep = 0; break; } if (!indep) locsurf.Delete(i); } } void CSGeometry :: GetIndependentSurfaceIndices (const Solid * sol, const BoxSphere<3> & box, Array & locsurf) const { ReducePrimitiveIterator rpi(box); UnReducePrimitiveIterator urpi; ((Solid*)sol) -> IterateSolid (rpi); sol -> GetSurfaceIndices (locsurf); ((Solid*)sol) -> IterateSolid (urpi); for (int i = 0; i < locsurf.Size(); i++) locsurf[i] = isidenticto[locsurf[i]]; for (int i = locsurf.Size()-1; i >= 0; i--) { bool indep = 1; for (int j = 0; j < i; j++) if (locsurf[i] == locsurf[j]) { indep = 0; break; } if (!indep) locsurf.Delete(i); } /* // delete identified for (int i = locsurf.Size()-1; i >= 0; i--) { bool indep = 1; for (int j = 0; j < i; j++) { if (identicsurfaces.Used (INDEX_2::Sort (locsurf[i], locsurf[j])) != (isidenticto[locsurf[i]] == isidenticto[locsurf[j]])) { cerr << "different result" << endl; exit(1); } if (isidenticto[locsurf[i]] == isidenticto[locsurf[j]]) { indep = 0; break; } } if (!indep) locsurf.Delete(i); } for (int i = 0; i < locsurf.Size(); i++) locsurf[i] = isidenticto[locsurf[i]]; */ } /* void CSGeometry :: GetIndependentSurfaceIndices (const Solid * sol, const Point<3> & p, Vec<3> & v, Array & locsurf) const { cout << "very dangerous" << endl; Point<3> p2 = p + 1e-2 * v; BoxSphere<3> box (p2, p2); box.Increase (1e-3); box.CalcDiamCenter(); GetIndependentSurfaceIndices (sol, box, locsurf); } */ void CSGeometry :: GetIndependentSurfaceIndices (Array & locsurf) const { for (int i = 0; i < locsurf.Size(); i++) locsurf[i] = isidenticto[locsurf[i]]; for (int i = locsurf.Size()-1; i >= 0; i--) { bool indep = 1; for (int j = 0; j < i; j++) if (locsurf[i] == locsurf[j]) { indep = 0; break; } if (!indep) locsurf.Delete(i); } } void CSGeometry :: CalcTriangleApproximation(double detail, double facets) { PrintMessage (1, "Calc Triangle Approximation"); try { // FindIdenticSurfaces (1e-6); int ntlo = GetNTopLevelObjects(); for (int i = 0; i < triapprox.Size(); i++) delete triapprox[i]; triapprox.SetSize (ntlo); Array surfind; IndexSet iset(GetNSurf()); for (int i = 0; i < ntlo; i++) { Solid * sol; Surface * surf; GetTopLevelObject (i, sol, surf); sol -> CalcSurfaceInverse (); TriangleApproximation * tams = new TriangleApproximation(); triapprox[i] = tams; // sol -> GetSurfaceIndices (surfind); for (int j = 0; j < GetNSurf(); j++) // for (int jj = 0; jj < surfind.Size(); jj++) { // int j = surfind[jj]; PrintMessageCR (3, "Surface ", j, "/", GetNSurf()); // PrintMessageCR (3, "Surface ", j, "/", surfind.Size()); if (surf && surf != GetSurface(j)) continue; TriangleApproximation tas; GetSurface (j) -> GetTriangleApproximation (tas, boundingbox, facets); int oldnp = tams -> GetNP(); if (!tas.GetNP()) continue; for (int k = 0; k < tas.GetNP(); k++) { tams -> AddPoint (tas.GetPoint(k)); Vec<3> n = GetSurface(j) -> GetNormalVector (tas.GetPoint(k)); n.Normalize(); if (GetSurface(j)->Inverse()) n *= -1; tams -> AddNormal (n); } BoxSphere<3> surfbox; if (tas.GetNP()) surfbox.Set (tas.GetPoint(0)); for (int k = 1; k < tas.GetNP(); k++) surfbox.Add (tas.GetPoint(k)); surfbox.Increase (1e-6); surfbox.CalcDiamCenter(); Solid * surflocsol = sol -> GetReducedSolid (surfbox); if (!surflocsol) continue; for (int k = 0; k < tas.GetNT(); k++) { const TATriangle & tri = tas.GetTriangle (k); // check triangle BoxSphere<3> box; box.Set (tas.GetPoint (tri[0])); box.Add (tas.GetPoint (tri[1])); box.Add (tas.GetPoint (tri[2])); box.Increase (1e-6); box.CalcDiamCenter(); Solid * locsol = surflocsol -> GetReducedSolid (box); if (locsol) { TATriangle tria(j, tri[0] + oldnp, tri[1] + oldnp, tri[2] + oldnp); // tams -> AddTriangle (tria); RefineTriangleApprox (locsol, j, box, detail, tria, *tams, iset, 1); delete locsol; } } } tams->RemoveUnusedPoints (); PrintMessage (2, "Object ", i, " has ", tams->GetNT(), " triangles"); } } catch (exception) { cerr << "*************************************************************" << endl << "**** out of memory problem in CSG visualization ****" << endl << "**** Restart netgen, and disable ****" << endl << "**** 'Draw Geometry' in Geometry -> CSG Options ****" << endl << "**** before loading the geometry ****" << endl << "**** meshing will still work ! ****" << endl << "*************************************************************" << endl; exit(1); } Change(); } void CSGeometry :: RefineTriangleApprox (Solid * locsol, int surfind, const BoxSphere<3> & box, double detail, const TATriangle & tria, TriangleApproximation & tams, IndexSet & iset, int level) { // if (level > 10) return; //tams.AddTriangle (tria); //(*testout) << "tria " << tams.GetPoint(tria[0]) << " - " << tams.GetPoint(tria[1]) << " - " << tams.GetPoint(tria[2]) // << " ( " << tria[0] << " " << tria[1] << " " << tria[2] << ")" < surfused(GetNSurf()); ReducePrimitiveIterator rpi(box); UnReducePrimitiveIterator urpi; locsol -> IterateSolid (rpi); // locsol -> GetSurfaceIndices (lsurfi); // IndexSet iset(GetNSurf()); locsol -> GetSurfaceIndices (iset); const Array & lsurfi = iset.GetArray(); locsol -> IterateSolid (urpi); int surfii = -1; for (int i = 0; i < lsurfi.Size(); i++) if (lsurfi[i] == surfind) { surfii = i; break; } if (surfii == -1) return; int cntindep = 0; for (int i = 0; i < lsurfi.Size(); i++) { int linkto = isidenticto[lsurfi[i]]; surfused[linkto] = 0; } for (int i = 0; i < lsurfi.Size(); i++) { int linkto = isidenticto[lsurfi[i]]; if (!surfused[linkto]) { surfused[linkto] = 1; cntindep++; } } int inverse = surfaces[surfind]->Inverse(); if (cntindep == 1) { tams.AddTriangle (tria); //(*testout) << "pos1 " << tams.GetPoint(tria[0]) << " - " << tams.GetPoint(tria[1]) << " - " << tams.GetPoint(tria[2]) << endl; return; } if (cntindep == 2) { // just 2 surfaces: // if smooth, project inner points to edge and finish int otherind = -1; for (int i = 0; i < lsurfi.Size(); i++) { INDEX_2 i2 (lsurfi[i], surfind); i2.Sort(); if (i != surfii && !identicsurfaces.Used(i2)) otherind = lsurfi[i]; } double kappa = GetSurface(otherind)-> MaxCurvature (); if (kappa * box.Diam() < 0.1) { int pnums[6]; static int between[3][3] = { { 1, 2, 3 }, { 0, 2, 4 }, { 0, 1, 5 } }; int onsurface[3]; for (int j = 0; j < 3; j++) { int pi = tria[j]; pnums[j] = pi; onsurface[j] = !locsol->IsStrictIn (tams.GetPoint (pi), 1e-6) && locsol->IsIn (tams.GetPoint (pi), 1e-6); // /* static int nos=0; if(!onsurface[j]) { nos++; cout << "NOT ON SURFACE!! "<< nos << endl; } */ } for (int j = 0; j < 3; j++) { int lpi1 = between[j][0]; int lpi2 = between[j][1]; int lpin = between[j][2]; if (onsurface[lpi1] == onsurface[lpi2]) pnums[lpin] = -1; else { const Point<3> & p1 = tams.GetPoint (pnums[lpi1]); const Point<3> & p2 = tams.GetPoint (pnums[lpi2]); double f1 = GetSurface(otherind)->CalcFunctionValue (p1); double f2 = GetSurface(otherind)->CalcFunctionValue (p2); Point<3> pn; double l2(100),l1(100); if ( fabs (f1-f2) > 1e-20 ) { l2 = -f1/(f2-f1); l1 = f2/(f2-f1); pn = Point<3>(l1 * p1(0) + l2 * p2(0), l1 * p1(1) + l2 * p2(1), l1 * p1(2) + l2 * p2(2)); } else pn = p1; // if(fabs(pn(0)) > 4 || fabs(pn(1)) > 4 || fabs(pn(2)) > 4) // { // cout << "p1 " << p1 << " p2 " << p2 // << " f1 " << f1 << " f2 " << f2 // << " l1 " << l1 << " l2 " << l2 // << " pn " << pn << endl; // } //GetSurface (surfind)->Project (pn); pnums[lpin] = tams.AddPoint (pn); GetSurface (surfind)->Project (pn); Vec<3> n; n = GetSurface (surfind)->GetNormalVector (pn); if (inverse) n *= -1; tams.AddNormal(n); } } int vcase = 0; if (onsurface[0]) vcase++; if (onsurface[1]) vcase+=2; if (onsurface[2]) vcase+=4; static int trias[8][6] = { { 0, 0, 0, 0, 0, 0 }, { 1, 6, 5, 0, 0, 0 }, { 2, 4, 6, 0, 0, 0 }, { 1, 2, 4, 1, 4, 5 }, { 3, 5, 4, 0, 0, 0 }, { 1, 6, 4, 1, 4, 3 }, { 2, 3, 6, 3, 5, 6 }, { 1, 2, 3, 0, 0, 0 } }; static int ntrias[4] = { 0, 1, 2, 1 }; int nvis = 0; for (int j = 0; j < 3; j++) if (onsurface[j]) nvis++; for (int j = 0; j < ntrias[nvis]; j++) { TATriangle ntria(tria.SurfaceIndex(), pnums[trias[vcase][3*j]-1], pnums[trias[vcase][3*j+1]-1], pnums[trias[vcase][3*j+2]-1]); //(*testout) << "pos2 " << tams.GetPoint(ntria[0]) << " - " << tams.GetPoint(ntria[1]) << " - " << tams.GetPoint(ntria[2]) << endl // << "( " << ntria[0] << " - " << ntria[1] << " - " << ntria[2] << ")" << endl; tams.AddTriangle (ntria); } /* saturn changes: int pvis[3]; for (j = 0; j < 3; j++) pvis[j] = !locsol->IsStrictIn (tams.GetPoint (j+1), 1e-6) && locsol->IsIn (tams.GetPoint (j+1), 1e-6); int newpi[3]; for (j = 0; j < 3; j++) { int pi1 = j; int pi2 = (j+1) % 3; int pic = j; if (pvis[pi1] != pvis[pi2]) { Point<3> hp = Center (tams.GetPoint (tria.PNum (pi1+1)), tams.GetPoint (tria.PNum (pi2+1))); newpi[j] = tams.AddPoint (hp); Vec<3> n = tams.GetNormal (pi1); tams.AddNormal (n); } else newpi[j] = 0; } int nvis = 0; for (j = 0; j <= nvis; j++) if (pvis[j]) nvis++; int si = tria.SurfaceIndex(); switch (nvis) { case 0: break; case 1: { int visj; for (j = 0; j < 3; j++) if (pvis[j]) visj = j; int pivis = tria.PNum (visj+1); int pic1 = newpi[(visj+1)%3]; int pic2 = newpi[(visj+2)%3]; cout << pivis << "," << pic1 << "," << pic2 << endl; tams.AddTriangle (TATriangle (si, pivis, pic1,pic2)); break; } case 2: { int nvisj; for (j = 0; j < 3; j++) if (!pvis[j]) nvisj = j; int pivis1 = tria.PNum ((nvisj+1)%3+1); int pivis2 = tria.PNum ((nvisj+2)%3+1); int pic1 = newpi[nvisj]; int pic2 = newpi[(nvisj+2)%3]; tams.AddTriangle (TATriangle (si, pivis1, pic1,pic2)); tams.AddTriangle (TATriangle (si, pivis1, pic1,pivis2)); break; } case 3: { tams.AddTriangle (tria); break; } } */ return; } } // bisection if (box.Diam() < detail) { //cout << "returning" << endl; return; } for (int i = 0; i < 3; i++) pinds[i] = tria[i]; static int between[3][3] = { { 0, 1, 5 }, { 0, 2, 4 }, { 1, 2, 3 } }; for (int i = 0; i < 3; i++) { // int pi1 = tria[between[i][0]]; Point<3> newp = Center (tams.GetPoint (tria[between[i][0]]), tams.GetPoint (tria[between[i][1]])); Vec<3> n; GetSurface(surfind)->Project (newp); n = GetSurface(surfind)->GetNormalVector (newp); pinds[between[i][2]] = tams.AddPoint (newp); if (inverse) n *= -1; tams.AddNormal (n); } static int trias[4][4] = { { 0, 5, 4 }, { 5, 1, 3 }, { 4, 3, 2 }, { 3, 4, 5 } }; for (int i = 0; i < 4; i++) { TATriangle ntri(surfind, pinds[trias[i][0]], pinds[trias[i][1]], pinds[trias[i][2]]); // check triangle BoxSphere<3> nbox; nbox.Set (tams.GetPoint (ntri[0])); nbox.Add (tams.GetPoint (ntri[1])); nbox.Add (tams.GetPoint (ntri[2])); nbox.Increase (1e-8); nbox.CalcDiamCenter(); Solid * nsol = locsol -> GetReducedSolid (nbox); if (nsol) { RefineTriangleApprox (nsol, surfind, nbox, detail, ntri, tams, iset, level+1); delete nsol; } } } class ClearVisitedIt : public SolidIterator { public: ClearVisitedIt () { ; } virtual ~ClearVisitedIt () { ; } virtual void Do (Solid * sol) { sol -> visited = 0; } }; void CSGeometry :: IterateAllSolids (SolidIterator & it, bool only_once) const { if (only_once) { ClearVisitedIt clit; for (int i = 0; i < solids.Size(); i++) solids[i] -> IterateSolid (clit, 0); } for (int i = 0; i < solids.Size(); i++) solids[i] -> IterateSolid (it, only_once); } double CSGeometry :: MaxSize () const { double maxs, mins; maxs = max3 (boundingbox.PMax()(0), boundingbox.PMax()(1), boundingbox.PMax()(2)); mins = min3 (boundingbox.PMin()(0), boundingbox.PMin()(1), boundingbox.PMin()(2)); return max2 (maxs, -mins) * 1.1; } class CSGeometryRegister : public GeometryRegister { public: virtual NetgenGeometry * Load (string filename) const; virtual NetgenGeometry * LoadFromMeshFile (istream & ist) const; // virtual VisualScene * GetVisualScene (const NetgenGeometry * geom) const; }; extern CSGeometry * ParseCSG (istream & istr, CSGeometry *instance=nullptr); NetgenGeometry * CSGeometryRegister :: Load (string filename) const { const char * cfilename = filename.c_str(); if (strcmp (&cfilename[strlen(cfilename)-3], "geo") == 0) { PrintMessage (1, "Load CSG geometry file ", cfilename); ifstream infile(cfilename); CSGeometry * hgeom = ParseCSG (infile); if (!hgeom) throw NgException ("geo-file should start with 'algebraic3d'"); hgeom -> FindIdenticSurfaces(1e-8 * hgeom->MaxSize()); return hgeom; } if (strcmp (&cfilename[strlen(cfilename)-3], "ngg") == 0) { PrintMessage (1, "Load new CSG geometry file ", cfilename); ifstream infile(cfilename); CSGeometry * hgeom = new CSGeometry(""); hgeom -> Load (infile); return hgeom; } return NULL; } NetgenGeometry * CSGeometryRegister :: LoadFromMeshFile (istream & ist) const { string auxstring; if (ist.good()) { ist >> auxstring; if (auxstring == "csgsurfaces") { CSGeometry * geometry = new CSGeometry (""); geometry -> LoadSurfaces(ist); return geometry; } // else // ist.putback (auxstring); } return NULL; } class CSGInit { public: CSGInit() { geometryregister.Append (new CSGeometryRegister); } }; CSGInit csginit; } netgen-6.2.1804/libsrc/csg/gencyl.hpp0000644000175000017500000000313213272137567016030 0ustar kurtkurt#ifndef FILE_GENCYL #define FILE_GENCYL /**************************************************************************/ /* File: gencyl.hh */ /* Author: Joachim Schoeberl */ /* Date: 14. Oct. 96 */ /**************************************************************************/ namespace netgen { /* Generalized Cylinder */ /// class GeneralizedCylinder : public Surface { /// ExplicitCurve2d & crosssection; /// Point<3> planep; /// Vec<3> planee1, planee2, planee3; /// Vec<3> ex, ey, ez; Vec2d e2x, e2y; /// Point<3> cp; public: /// GeneralizedCylinder (ExplicitCurve2d & acrosssection, Point<3> ap, Vec<3> ae1, Vec<3> ae2); /// virtual void Project (Point<3> & p) const; /// virtual int BoxInSolid (const BoxSphere<3> & box) const; /// 0 .. no, 1 .. yes, 2 .. maybe virtual double CalcFunctionValue (const Point<3> & point) const; /// virtual void CalcGradient (const Point<3> & point, Vec<3> & grad) const; /// virtual void CalcHesse (const Point<3> & point, Mat<3> & hesse) const; /// virtual double HesseNorm () const; /// virtual double MaxCurvatureLoc (const Point<3> & c, double rad) const; /// virtual Point<3> GetSurfacePoint () const; /// virtual void Print (ostream & str) const; /// virtual void Reduce (const BoxSphere<3> & box); /// virtual void UnReduce (); }; } #endif netgen-6.2.1804/libsrc/csg/revolution.cpp0000644000175000017500000006232013272137567016754 0ustar kurtkurt#include #include #include namespace netgen { void RevolutionFace :: Init(void) { const LineSeg<2> * line = dynamic_cast*>(spline); const SplineSeg3<2> * spline3 = dynamic_cast*>(spline); if(line) { checklines_start.Append(new Point<2>(line->StartPI())); checklines_vec.Append(new Vec<2>(line->EndPI() - line->StartPI())); (*checklines_vec.Last()) *= 1./pow(checklines_vec.Last()->Length(),2); //!! } else if (spline3) { checklines_start.Append(new Point<2>(spline3->EndPI())); checklines_start.Append(new Point<2>(spline3->TangentPoint())); checklines_start.Append(new Point<2>(spline3->StartPI())); checklines_vec.Append(new Vec<2>(spline3->StartPI() - spline3->EndPI())); (*checklines_vec.Last()) *= 1./pow(checklines_vec.Last()->Length(),2); //!! checklines_vec.Append(new Vec<2>(spline3->EndPI() - spline3->TangentPoint())); (*checklines_vec.Last()) *= 1./pow(checklines_vec.Last()->Length(),2); //!! checklines_vec.Append(new Vec<2>(spline3->TangentPoint() - spline3->StartPI())); (*checklines_vec.Last()) *= 1./pow(checklines_vec.Last()->Length(),2); //!! } for(int i=0; i); (*checklines_normal.Last())(0) = - (*checklines_vec[i])(1); (*checklines_normal.Last())(1) = (*checklines_vec[i])(0); checklines_normal.Last()->Normalize(); } } RevolutionFace :: RevolutionFace(const SplineSeg<2> & spline_in, const Point<3> & p, const Vec<3> & vec, bool first, bool last, const int id_in) : isfirst(first), islast(last), spline(&spline_in), p0(p), v_axis(vec), id(id_in) { deletable = false; Init(); } RevolutionFace :: RevolutionFace(const Array & raw_data) { deletable = true; int pos = 0; Array< Point<2> > p(3); int stype = int(raw_data[pos]); pos++; for(int i=0; i(GeomPoint<2>(p[0],1), GeomPoint<2>(p[1],1)); //(*testout) << "appending LineSeg<2> " << p[0] // << " to " << p[1] << endl; } else if(stype == 3) { spline = new SplineSeg3<2>(GeomPoint<2>(p[0],1), GeomPoint<2>(p[1],1), GeomPoint<2>(p[2],1)); //(*testout) << "appending SplineSeg<3> " // << p[0] << " -- " << p[1] << " -- " << p[2] << endl; } for(int i=0; i<3; i++) { p0(i) = raw_data[pos]; pos++; } for(int i=0; i<3; i++) { v_axis(i) = raw_data[pos]; pos++; } isfirst = (raw_data[pos] > 0.9); pos++; islast = (raw_data[pos] < 0.1); pos++; } RevolutionFace :: ~RevolutionFace() { for(int i=0; i & point3d, Point<2> & point2d, const Vec<3> & vector3d, Vec<2> & vector2d) const { Vec<3> pmp0 = point3d-p0; CalcProj0(pmp0,point2d); Vec<3> y=pmp0-point2d(0)*v_axis; y.Normalize(); vector2d(0) = vector3d*v_axis; vector2d(1) = vector3d*y; } void RevolutionFace :: CalcProj(const Point<3> & point3d, Point<2> & point2d) const { Vec<3> pmp0 = point3d-p0; CalcProj0(pmp0,point2d); } void RevolutionFace :: CalcProj0(const Vec<3> & point3d_minus_p0, Point<2> & point2d) const { point2d(0) = point3d_minus_p0 * v_axis; point2d(1) = sqrt( point3d_minus_p0 * point3d_minus_p0 - point2d(0)*point2d(0) ); } int RevolutionFace ::IsIdentic (const Surface & s2, int & inv, double eps) const { const RevolutionFace * rev2 = dynamic_cast(&s2); if(!rev2) return 0; if(rev2 == this) return 1; return 0; } double RevolutionFace :: CalcFunctionValue (const Point<3> & point) const { if(spline_coefficient.Size() == 0) spline->GetCoeff(spline_coefficient); if(spline_coefficient_shifted.Size() == 0) spline->GetCoeff(spline_coefficient_shifted, spline->StartPI()); Point<2> p; CalcProj(point,p); /* double val = spline_coefficient(0)*p(0)*p(0) + spline_coefficient(1)*p(1)*p(1) + spline_coefficient(2)*p(0)*p(1) + spline_coefficient(3)*p(0) + spline_coefficient(4)*p(1) + spline_coefficient(5); */ Vec<2> pr = p-spline->StartPI(); // cout << "spline_coefficinet = " << spline_coefficient << endl; // cout << "shifted = " << spline_coefficient_shifted << endl; double val2 = spline_coefficient_shifted(0)*pr(0)*pr(0) + spline_coefficient_shifted(1)*pr(1)*pr(1) + spline_coefficient_shifted(2)*pr(0)*pr(1) + spline_coefficient_shifted(3)*pr(0) + spline_coefficient_shifted(4)*pr(1) + spline_coefficient_shifted(5); // cout << "val = " << val << " =?= " << val2 << endl; return val2; } void RevolutionFace :: CalcGradient (const Point<3> & point, Vec<3> & grad) const { if(spline_coefficient.Size() == 0) spline->GetCoeff(spline_coefficient); if(spline_coefficient_shifted.Size() == 0) spline->GetCoeff(spline_coefficient_shifted, spline->StartPI()); Vec<3> point_minus_p0 = point-p0; Point<2> p; CalcProj0(point_minus_p0,p); /* const double dFdxbar = 2.*spline_coefficient(0)*p(0) + spline_coefficient(2)*p(1) + spline_coefficient(3); if(fabs(p(1)) > 1e-10) { const double dFdybar = 2.*spline_coefficient(1)*p(1) + spline_coefficient(2)*p(0) + spline_coefficient(4); grad(0) = dFdxbar*v_axis(0) + dFdybar * ( point_minus_p0(0)-v_axis(0)*p(0) )/p(1); grad(1) = dFdxbar*v_axis(1) + dFdybar * ( point_minus_p0(1)-v_axis(1)*p(0) )/p(1); grad(2) = dFdxbar*v_axis(2) + dFdybar * ( point_minus_p0(2)-v_axis(2)*p(0) )/p(1); //(*testout) << "grad1("< 1e-10) { double aux = spline_coefficient(0)-spline_coefficient(1); hesse(0,0) = aux*v_axis(0)*v_axis(0) + spline_coefficient(1); hesse(0,0) = aux*v_axis(1)*v_axis(1) + spline_coefficient(1); hesse(0,0) = aux*v_axis(2)*v_axis(2) + spline_coefficient(1); hesse(0,1) = hesse(1,0) = aux*v_axis(0)*v_axis(1); hesse(0,2) = hesse(2,0) = aux*v_axis(0)*v_axis(2); hesse(1,2) = hesse(2,1) = aux*v_axis(1)*v_axis(2); //(*testout) << "hesse2: " << hesse < 1e-10) return 2.*max2(fabs(spline_coefficient(0)),fabs(spline_coefficient(1))); double alpha = fabs(spline_coefficient(2)*(spline->StartPI()(0)-spline->EndPI()(0))) / max2(fabs(spline->StartPI()(1)),fabs(spline->EndPI()(1))); return max2(2.*fabs(spline_coefficient(0))+sqrt(2.)*fabs(spline_coefficient(2)), 2.*fabs(spline_coefficient(1))+spline_coefficient(2)+1.5*alpha); } double RevolutionFace :: MaxCurvature() const { double retval = spline->MaxCurvature(); Array < Point<2> > checkpoints; const SplineSeg3<2> * ss3 = dynamic_cast *>(spline); const LineSeg<2> * ls = dynamic_cast *>(spline); if(ss3) { checkpoints.Append(ss3->StartPI()); checkpoints.Append(ss3->TangentPoint()); checkpoints.Append(ss3->TangentPoint()); checkpoints.Append(ss3->EndPI()); } else if(ls) { checkpoints.Append(ls->StartPI()); checkpoints.Append(ls->EndPI()); } for(int i=0; i v = checkpoints[i+1]-checkpoints[i]; Vec<2> n(v(1),-v(0)); n.Normalize(); //if(ss3) // (*testout) << "n " << n << endl; if(fabs(n(1)) < 1e-15) continue; double t1 = -checkpoints[i](1)/n(1); double t2 = -checkpoints[i+1](1)/n(1); double c1 = (t1 > 0) ? (1./t1) : -1; double c2 = (t2 > 0) ? (1./t2) : -1; //if(ss3) // (*testout) << "t1 " << t1 << " t2 " << t2 << " c1 " << c1 << " c2 " << c2 << endl; if(c1 > retval) retval = c1; if(c2 > retval) retval = c2; } //if(ss3) // (*testout) << "curvature " << retval << endl; return retval; /* // find smallest y value of spline: Array testt; if(!isfirst) testt.Append(0); if(!islast) testt.Append(1); const SplineSegment3 * s3 = dynamic_cast(&spline); if(s3) { double denom = (2.-sqrt(2.))*(s3->EndPI()(1) - s3->StartPI()(1)); if(fabs(denom) < 1e-20) testt.Append(0.5); else { double sD = sqrt(pow(s3->TangentPoint()(1) - s3->StartPI()(1),2)+ pow(s3->TangentPoint()(1) - s3->EndPI()(1),2)); testt.Append((s3->StartPI()(1)*(sqrt(2.)-1.) - sqrt(2.)*s3->TangentPoint()(1) + s3->EndPI()(1) + sD)/denom); testt.Append((s3->StartPI()(1)*(sqrt(2.)-1.) - sqrt(2.)*s3->TangentPoint()(1) + s3->EndPI()(1) - sD)/denom); } } double miny = fabs(spline.GetPoint(testt[0])(1)); for(int i=1; i & p) const { Point<2> p2d; CalcProj(p,p2d); const Vec<3> y = (p-p0)-p2d(0)*v_axis; const double yl = y.Length(); double dummy; spline->Project(p2d,p2d,dummy); p = p0 + p2d(0)*v_axis; if(yl > 1e-20*Dist(spline->StartPI(),spline->EndPI())) p+= (p2d(1)/yl)*y; } Point<3> RevolutionFace :: GetSurfacePoint () const { Vec<3> random_vec(0.760320,-0.241175,0.60311534); Vec<3> n = Cross(v_axis,random_vec); n.Normalize(); Point<2> sp = spline->GetPoint(0.5); Point<3> retval = p0 + sp(0)*v_axis + sp(1)*n; return retval; } void RevolutionFace :: Print (ostream & str) const { if(spline_coefficient.Size() == 0) spline->GetCoeff(spline_coefficient); str << p0(0) << " " << p0(1) << " " << p0(2) << " " << v_axis(0) << " " << v_axis(1) << " " << v_axis(2) << " "; for(int i=0; i<6; i++) str << spline_coefficient(i) << " "; str << endl; } void RevolutionFace :: GetTriangleApproximation (TriangleApproximation & tas, const Box<3> & boundingbox, double facets) const { Vec<3> random_vec(0.760320,-0.241175,0.60311534); Vec<3> v1 = Cross(v_axis,random_vec); v1.Normalize(); Vec<3> v2 = Cross(v1,v_axis); v2.Normalize(); int n = int(2.*facets) + 1; for(int i=0; i<=n; i++) { Point<2> sp = spline->GetPoint(double(i)/double(n)); for(int j=0; j<=n; j++) { double phi = 2.*M_PI*double(j)/double(n); Point<3> p = p0 + sp(0)*v_axis + sp(1)*cos(phi)*v1 + sp(1)*sin(phi)*v2; tas.AddPoint(p); } } for(int i=0; i & box) const { Point<3> center = box.Center(); Project(center); return (Dist(box.Center(),center) < 0.5*box.Diam()); } /* bool RevolutionFace :: BoxIntersectsFace (const BoxSphere<3> & box, bool & uncertain) const { Point<2> c,pmin,pmax; CalcProj(box.Center(),c); double aux = box.Diam()/sqrt(8.); pmin(0) = c(0)-aux; pmin(1) = c(1)-aux; pmax(0) = c(0)+aux; pmax(1) = c(1)+aux; BoxSphere<2> box2d(pmin,pmax); return BoxIntersectsFace(box2d, uncertain); } bool RevolutionFace :: BoxIntersectsFace (const BoxSphere<2> & box, bool & uncertain) const { const LineSegment * line = dynamic_cast(&spline); const SplineSegment3 * spline3 = dynamic_cast(&spline); bool always_right = true, always_left = true; bool retval = false; bool thisint; bool intdirect = false; bool inttangent = false; uncertain = false; if(line) inttangent = true; for(int i=0; i b = box.Center()- (*checklines_start[i]); double d; double checkdist = b * (*checklines_vec[i]); double ncomp = b * (*checklines_normal[i]); if(checkdist < 0) d = b.Length(); else if (checkdist > 1) { if(spline3) d = Dist(box.Center(),*checklines_start[(i+1)%3]); else d = Dist(box.Center(),(*checklines_start[i]) + pow(checklines_vec[i]->Length(),2)*(*checklines_vec[i])); } else d = fabs(ncomp); thisint = (box.Diam() >= 2.*d); retval = retval || thisint; if(thisint) { if(i==0) intdirect = true; else inttangent = true; } if(ncomp > 0) always_right = false; else if(ncomp < 0) always_left = false; } if(retval && !(intdirect && inttangent)) uncertain = true; if(!retval && spline3 && (always_right || always_left)) { retval = true; uncertain = true; } return retval; } */ /* INSOLID_TYPE */ bool RevolutionFace :: PointInFace (const Point<3> & p, const double eps) const { Point<2> p2d; CalcProj(p,p2d); if (!spline -> InConvexHull(p2d, eps)) return false; /* double val = spline_coefficient(0)*p2d(0)*p2d(0) + spline_coefficient(1)*p2d(1)*p2d(1) + spline_coefficient(2)*p2d(0)*p2d(1) + spline_coefficient(3)*p2d(0) + spline_coefficient(4)*p2d(1) + spline_coefficient(5); */ Vec<2> pr = p2d - spline->StartPI(); double val = spline_coefficient_shifted(0)*pr(0)*pr(0) + spline_coefficient_shifted(1)*pr(1)*pr(1) + spline_coefficient_shifted(2)*pr(0)*pr(1) + spline_coefficient_shifted(3)*pr(0) + spline_coefficient_shifted(4)*pr(1) + spline_coefficient_shifted(5); return (fabs(val) < eps); /* if(val > eps) return IS_OUTSIDE; if(val < -eps) return IS_INSIDE; return DOES_INTERSECT; */ } void RevolutionFace :: GetRawData(Array & data) const { data.DeleteAll(); spline->GetRawData(data); for(int i=0; i<3; i++) data.Append(p0(i)); for(int i=0; i<3; i++) data.Append(v_axis(i)); data.Append((isfirst) ? 1. : 0.); data.Append((islast) ? 1. : 0.); } Revolution :: Revolution(const Point<3> & p0_in, const Point<3> & p1_in, const SplineGeometry<2> & spline_in) : p0(p0_in), p1(p1_in), splinecurve(spline_in), nsplines(spline_in.GetNSplines()) { surfaceactive.SetSize(0); surfaceids.SetSize(0); v_axis = p1-p0; v_axis.Normalize(); if(splinecurve.GetSpline(0).StartPI()(1) <= 0. && splinecurve.GetSpline(nsplines-1).EndPI()(1) <= 0.) type = 2; else if (Dist(splinecurve.GetSpline(0).StartPI(), splinecurve.GetSpline(nsplines-1).EndPI()) < 1e-7) type = 1; else cerr << "Surface of revolution cannot be constructed" << endl; for(int i=0; i & box) const { for(int i=0; iBoxIntersectsFace(box)) return DOES_INTERSECT; return PointInSolid(box.Center(),0); /* Point<2> c,pmin,pmax; faces[0]->CalcProj(box.Center(),c); double aux = box.Diam()/sqrt(8.); pmin(0) = c(0)-aux; pmin(1) = c(1)-aux; pmax(0) = c(0)+aux; pmax(1) = c(1)+aux; BoxSphere<2> box2d(pmin,pmax); bool intersection = false; bool uncertain = true; for(int i=0; !(intersection && !uncertain) && iBoxIntersectsFace(box2d,thisuncertain); intersection = intersection || thisintersects; if(thisintersects && !thisuncertain) uncertain = false; } if(intersection) { if(!uncertain) return DOES_INTERSECT; else { Array < Point<3> > pext(2); Point<3> p; pext[0] = box.PMin(); pext[1] = box.PMax(); INSOLID_TYPE position; bool firsttime = true; for(int i=0; i<2; i++) for(int j=0; j<2; j++) for(int k=0; k<2; k++) { p(0) = pext[i](0); p(1) = pext[j](1); p(2) = pext[k](2); INSOLID_TYPE ppos = PointInSolid(p,0); if(ppos == DOES_INTERSECT) return DOES_INTERSECT; if(firsttime) { firsttime = false; position = ppos; } if(position != ppos) return DOES_INTERSECT; } return position; } } return PointInSolid(box.Center(),0); */ } INSOLID_TYPE Revolution :: PointInSolid (const Point<3> & p, double eps) const { Point<2> p2d; faces[0]->CalcProj(p,p2d); int intersections_before(0), intersections_after(0); double randomx = 7.42357; double randomy = 1.814756; randomx *= 1./sqrt(randomx*randomx+randomy*randomy); randomy *= 1./sqrt(randomx*randomx+randomy*randomy); const double a = randomy; const double b = -randomx; const double c = -a*p2d(0)-b*p2d(1); Array < Point<2> > points; //(*testout) << "face intersections at: " << endl; for(int i=0; iGetSpline().LineIntersections(a,b,c,points,eps); for(int j=0; j eps ) intersections_after++; else { intersecting_face = i; return DOES_INTERSECT; } } } if(intersections_before % 2 == 0) return IS_OUTSIDE; else return IS_INSIDE; } void Revolution :: GetTangentialSurfaceIndices (const Point<3> & p, Array & surfind, double eps) const { for (int j = 0; j < faces.Size(); j++) if (faces[j] -> PointInFace(p, eps)) if (!surfind.Contains (GetSurfaceId(j))) surfind.Append (GetSurfaceId(j)); } INSOLID_TYPE Revolution :: VecInSolid (const Point<3> & p, const Vec<3> & v, double eps) const { INSOLID_TYPE pInSolid = PointInSolid(p,eps); if(pInSolid != DOES_INTERSECT) { //(*testout) << "pInSolid" << endl; return pInSolid; } Array intersecting_faces; for(int i=0; iPointInFace(p,eps)) // == DOES_INTERSECT) intersecting_faces.Append(i); Vec<3> hv; if(intersecting_faces.Size() == 1) { faces[intersecting_faces[0]]->CalcGradient(p,hv); double hv1; hv1 = v * hv; if (hv1 <= -eps) return IS_INSIDE; if (hv1 >= eps) return IS_OUTSIDE; return DOES_INTERSECT; } else if(intersecting_faces.Size() == 2) { Point<2> p2d; Vec<2> v2d; faces[intersecting_faces[0]]->CalcProj(p,p2d,v,v2d); if(Dist(faces[intersecting_faces[0]]->GetSpline().StartPI(),p2d) < Dist(faces[intersecting_faces[0]]->GetSpline().EndPI(),p2d)) { int aux = intersecting_faces[0]; intersecting_faces[0] = intersecting_faces[1]; intersecting_faces[1] = aux; } const SplineSeg3<2> * splinesegment3 = dynamic_cast *>(&faces[intersecting_faces[0]]->GetSpline()); const LineSeg<2> * linesegment = dynamic_cast *>(&faces[intersecting_faces[0]]->GetSpline()); Vec<2> t1(0),t2(0); if(linesegment) t1 = linesegment->StartPI() - linesegment->EndPI(); else if(splinesegment3) t1 = splinesegment3->TangentPoint() - splinesegment3->EndPI(); linesegment = dynamic_cast *>(&faces[intersecting_faces[1]]->GetSpline()); splinesegment3 = dynamic_cast *>(&faces[intersecting_faces[1]]->GetSpline()); if(linesegment) t2 = linesegment->EndPI() - linesegment->StartPI(); else if(splinesegment3) t2 = splinesegment3->TangentPoint() - splinesegment3->StartPI(); t1.Normalize(); t2.Normalize(); double d1 = v2d*t1; double d2 = v2d*t2; Vec<2> n; if(d1 > d2) { n(0) = t1(1); n(1) = -t1(0); } else { n(0) = -t2(1); n(1) = t2(0); } double d = v2d*n; if(d > eps) return IS_OUTSIDE; else if (d < -eps) return IS_INSIDE; else return DOES_INTERSECT; } else { cerr << "Jo gibt's denn des?" << endl; } return DOES_INTERSECT; } INSOLID_TYPE Revolution :: VecInSolid2 (const Point<3> & p, const Vec<3> & v1, const Vec<3> & v2, double eps) const { INSOLID_TYPE ret1 = VecInSolid(p,v1,eps); if(ret1 != DOES_INTERSECT) return ret1; return VecInSolid(p,v1+0.01*v2,eps); } int Revolution :: GetNSurfaces() const { return faces.Size(); } Surface & Revolution :: GetSurface (int i) { return *faces[i]; } const Surface & Revolution :: GetSurface (int i) const { return *faces[i]; } void Revolution :: Reduce (const BoxSphere<3> & box) { //bool dummy; for(int i=0; iBoxIntersectsFace(box)); //surfaceactive[i] = (faces[i]->BoxIntersectsFace(box,dummy)); } void Revolution :: UnReduce () { for(int i=0; i #include #include // #undef DEVELOP // #define DEVELOP namespace netgen { EdgeCalculation :: EdgeCalculation (const CSGeometry & ageometry, Array & aspecpoints, MeshingParameters & amparam) : geometry(ageometry), specpoints(aspecpoints), mparam(amparam) { Box<3> bbox = geometry.BoundingBox(); searchtree = new Point3dTree (bbox.PMin(), bbox.PMax()); meshpoint_tree = new Point3dTree (bbox.PMin(), bbox.PMax()); for (int i = 0; i < specpoints.Size(); i++) searchtree->Insert (specpoints[i].p, i); ideps = 1e-9; } EdgeCalculation :: ~EdgeCalculation() { delete searchtree; delete meshpoint_tree; } void EdgeCalculation :: Calc(double h, Mesh & mesh) { static int timer = NgProfiler::CreateTimer ("CSG: mesh edges"); NgProfiler::RegionTimer reg (timer); PrintMessage (1, "Find edges"); PushStatus ("Find edges"); for (PointIndex pi : mesh.Points().Range()) meshpoint_tree->Insert (mesh[pi], pi); // add all special points before edge points (important for periodic identification) // JS, Jan 2007 const double di=1e-7*geometry.MaxSize(); Array locsearch; for (int i = 0; i < specpoints.Size(); i++) if (specpoints[i].unconditional) { Point<3> p = specpoints[i].p; meshpoint_tree -> GetIntersecting (p-Vec<3> (di,di,di), p+Vec<3> (di,di,di), locsearch); if (locsearch.Size() == 0) { PointIndex pi = mesh.AddPoint (p, specpoints[i].GetLayer(), FIXEDPOINT); meshpoint_tree -> Insert (p, pi); } } /* // slow version for (int i = 0; i < specpoints.Size(); i++) if (specpoints[i].unconditional) { Point<3> p = specpoints[i].p; bool found = false; for (int j = 1; j <= mesh.GetNP(); j++) if (Dist (p, mesh.Point(j)) < 1e-8) found = true; if (!found) mesh.AddPoint (p, specpoints[i].GetLayer(), FIXEDPOINT); } */ CalcEdges1 (h, mesh); SplitEqualOneSegEdges (mesh); FindClosedSurfaces (h, mesh); PrintMessage (3, cntedge, " edges found"); PopStatus (); } void EdgeCalculation :: CalcEdges1 (double h, Mesh & mesh) { Array hsp(specpoints.Size()); Array glob2hsp(specpoints.Size()); Array startpoints, endpoints; int pos, ep; int layer; Point<3> p, np; int pi1, s1, s2, s1_orig, s2_orig; Array > edgepoints; Array curvelength; int copyedge = 0, copyfromedge = -1, copyedgeidentification = -1; Array locsurfind, locind; int checkedcopy = 0; // double size = geometry.MaxSize(); // double epspointdist2 = sqr (size) * 1e-12; // copy special points to work with for (int i = 0; i < specpoints.Size(); i++) { hsp[i] = i; glob2hsp[i] = i; } //for(int i=0; i identification_used(100); // identification i already used for startpoint j mesh.GetIdentifications().Delete(); TABLE specpoint2surface(specpoints.Size()); if (geometry.identifications.Size()) { for (int i = 0; i < specpoints.Size(); i++) for (int j = 0; j < geometry.GetNSurf(); j++) if (geometry.GetSurface(j)->PointOnSurface (specpoints[i].p)) specpoint2surface.Add (i, j); } TABLE specpoint2tlo(specpoints.Size()); if (geometry.identifications.Size()) { for (int i = 0; i < specpoints.Size(); i++) for (int j = 0; j < geometry.GetNTopLevelObjects(); j++) { const TopLevelObject * tlo = geometry.GetTopLevelObject (j); if (tlo->GetSolid() && tlo->GetSolid()->VectorIn (specpoints[i].p,specpoints[i].v)) //if (tlo->GetSolid() && tlo->GetSolid()->IsIn (specpoints[i].p)) { #ifdef DEVELOP (*testout) << "point " << specpoints[i].p << " v " <GetSolid()->Name() << endl; #endif specpoint2tlo.Add (i, j); } } } for (int i = 0; i < specpoints.Size(); i++) specpoints[i].nr = i; while (hsp.Size()) { SetThreadPercent(100 - 100 * double (hsp.Size()) / specpoints.Size()); #ifdef DEVELOP (*testout) << "hsp.Size() " << hsp.Size() << " specpoints.Size() " << specpoints.Size() << endl; (*testout) << endl << "edge nr " << cntedge+1 << endl; #endif edgepoints.SetSize (0); curvelength.SetSize (0); pi1 = 0; copyedge = 0; // identifyable point available ? for (int i = 0; i < geometry.identifications.Size() && !pi1; i++) for (int j = checkedcopy; j < startpoints.Size() && !pi1; j++) { #ifdef DEVELOP (*testout) << "checking point " << specpoints[startpoints[j]].p << ", v = " << specpoints[startpoints[j]].v << " for copying (i,j = " << i << ", " << j << ")" << endl; #endif if (geometry.identifications[i]->IdentifyableCandidate (specpoints[startpoints[j]]) && geometry.identifications[i]->IdentifyableCandidate (specpoints[endpoints[j]])) { int pi1cand = 0; double mindist = 1e10; for (int k = 0; k < hsp.Size() && !pi1; k++) { //(*testout) << " ? identifyable with " << specpoints[hsp[k]].p //<< ", v = " << specpoints[hsp[k]].v // << endl; if (identification_used.Used (INDEX_2(i, startpoints[j])) || identification_used.Used (INDEX_2(i, hsp[k]))) { //(*testout) << "failed at pos0" << endl; continue; } if (geometry.identifications[i] ->Identifyable(specpoints[startpoints[j]], specpoints[hsp[k]], specpoint2tlo, specpoint2surface) || geometry.identifications[i] ->Identifyable(specpoints[hsp[k]], specpoints[startpoints[j]], specpoint2tlo, specpoint2surface)) { #ifdef DEVELOP (*testout) << "identifyable: " << specpoints[hsp[k]].p << ", v = " << specpoints[hsp[k]].v << " and " << specpoints[startpoints[j]].p << ", v = " << specpoints[startpoints[j]].v << " (identification " << i+1 << ")" << endl; #endif if (Dist (specpoints[startpoints[j]].p, specpoints[hsp[k]].p) < mindist) { mindist = Dist (specpoints[startpoints[j]].p, specpoints[hsp[k]].p); pi1cand = k+1; } } } if (pi1cand) { pi1 = pi1cand; copyedge = 1; copyfromedge = j+1; copyedgeidentification = i+1; identification_used.Set (INDEX_2(i, startpoints[j]), 1); identification_used.Set (INDEX_2(i, hsp.Get(pi1)), 1); } } } // cannot copy from other ege ? if (!pi1) checkedcopy = startpoints.Size(); // unconditional special point available ? if (!pi1) for (int i = 1; i <= hsp.Size(); i++) if (specpoints[hsp.Get(i)].unconditional == 1) { pi1 = i; break; } if (!pi1) { // no unconditional points available, choose first conitional pi1 = 1; } layer = specpoints[hsp.Get(pi1)].GetLayer(); if (!specpoints[hsp.Get(pi1)].unconditional) { specpoints[hsp.Elem(pi1)].unconditional = 1; for (int i = 1; i <= hsp.Size(); i++) if (i != pi1 && Dist (specpoints[hsp.Get(pi1)].p, specpoints[hsp.Get(i)].p) < 1e-8*geometry.MaxSize() && (specpoints[hsp.Get(pi1)].v + specpoints[hsp.Get(i)].v).Length() < 1e-4) { // opposite direction specpoints[hsp.Elem(i)].unconditional = 1; } } cntedge++; startpoints.Append (hsp.Get(pi1)); #ifdef DEVELOP (*testout) << "start followedge: p1 = " << specpoints[hsp.Get(pi1)].p << ", v = " << specpoints[hsp.Get(pi1)].v << endl; #endif FollowEdge (pi1, ep, pos, hsp, h, mesh, edgepoints, curvelength); if (multithread.terminate) return; if (!ep) { // ignore starting point hsp.DeleteElement (pi1); cout << "yes, this happens" << endl; continue; } endpoints.Append (hsp.Get(ep)); double elen = 0; for (int i = 1; i <= edgepoints.Size()-1; i++) elen += Dist (edgepoints.Get(i), edgepoints.Get(i+1)); int shortedge = 0; for (int i = 1; i <= geometry.identifications.Size(); i++) if (geometry.identifications.Get(i)->ShortEdge(specpoints[hsp.Get(pi1)], specpoints[hsp.Get(ep)])) shortedge = 1; // (*testout) << "shortedge = " << shortedge << endl; if (!shortedge) { mesh.RestrictLocalHLine (Point3d (specpoints[hsp.Get(pi1)].p), Point3d (specpoints[hsp.Get(ep)].p), elen / mparam.segmentsperedge); } s1 = specpoints[hsp.Get(pi1)].s1; s2 = specpoints[hsp.Get(pi1)].s2; s1_orig = specpoints[hsp.Get(pi1)].s1_orig; s2_orig = specpoints[hsp.Get(pi1)].s2_orig; // delete initial, terminal and conditional points #ifdef DEVELOP (*testout) << "terminal point: p = " << specpoints[hsp.Get(ep)].p << ", v = " << specpoints[hsp.Get(ep)].v << endl; #endif searchtree -> DeleteElement (hsp.Get(ep)); searchtree -> DeleteElement (hsp.Get(pi1)); if (ep > pi1) { glob2hsp[hsp[ep-1]] = -1; glob2hsp[hsp.Last()] = ep-1; hsp.DeleteElement (ep); glob2hsp[hsp[pi1-1]] = -1; glob2hsp[hsp.Last()] = pi1-1; hsp.DeleteElement (pi1); } else { glob2hsp[hsp[pi1-1]] = -1; glob2hsp[hsp.Last()] = pi1-1; hsp.DeleteElement (pi1); glob2hsp[hsp[ep-1]] = -1; glob2hsp[hsp.Last()] = ep-1; hsp.DeleteElement (ep); } for (int j = 1; j <= edgepoints.Size()-1; j++) { p = edgepoints.Get(j); np = Center (p, edgepoints.Get(j+1)); double hd = Dist (p, np); Box<3> boxp (np - (1.2 * hd) * Vec<3> (1, 1, 1), np + (1.2 * hd) * Vec<3> (1, 1, 1)); searchtree -> GetIntersecting (boxp.PMin(), boxp.PMax(), locind); for (int i = 0; i < locind.Size(); i++) { if ( specpoints[locind[i]].HasSurfaces (s1, s2) && specpoints[locind[i]].unconditional == 0) { searchtree -> DeleteElement (locind[i]); int li = glob2hsp[locind[i]]; glob2hsp[locind[i]] = -1; glob2hsp[hsp.Last()] = li; hsp.Delete (li); } } /* for (int i = 1; i <= hsp.Size(); i++) if ( specpoints[hsp.Get(i)].HasSurfaces (s1, s2) && specpoints[hsp.Get(i)].unconditional == 0 && Dist2 (np, specpoints[hsp.Get(i)].p) < 1.2 * hd) { searchtree -> DeleteElement (hsp.Get(i)+1); hsp.DeleteElement (i); i--; } */ } Array refedges; Array refedgesinv; AnalyzeEdge (s1_orig, s2_orig, s1, s2, pos, layer, edgepoints, refedges, refedgesinv); for (int i = 0; i < refedges.Size(); i++) refedges[i].edgenr = cntedge; #ifdef DEVELOP (*testout) << "edge " << cntedge << endl << "startp: " << specpoints[startpoints.Last()].p << ", v = " << specpoints[startpoints.Last()].v << endl << "copy = " << copyedge << endl << refedges.Size() << " refedges: "; for (int i = 1; i <= refedges.Size(); i++) (*testout) << " " << refedges.Get(i).si; (*testout) << endl; if (refedgesinv.Size()) (*testout) << "inv[1] = " << refedgesinv.Get(1) << endl; #endif if (refedges.Size() == 0) throw NgException ("Problem in edge detection"); if (!copyedge) { // (*testout) << "store edge" << endl; // int oldnseg = mesh.GetNSeg(); if (!shortedge) StoreEdge (refedges, refedgesinv, edgepoints, curvelength, layer, mesh); else StoreShortEdge (refedges, refedgesinv, edgepoints, curvelength, layer, mesh); for(int i = 0; i < refedges.Size(); i++) { refedges[i].surfnr1 = geometry.GetSurfaceClassRepresentant(refedges[i].surfnr1); refedges[i].surfnr2 = geometry.GetSurfaceClassRepresentant(refedges[i].surfnr2); } /* for (int i = oldnseg+1; i <= mesh.GetNSeg(); i++) for (int j = 1; j <= oldnseg; j++) { const Point<3> & l1p1 = mesh.Point (mesh.LineSegment(i).p1); const Point<3> & l1p2 = mesh.Point (mesh.LineSegment(i).p2); const Point<3> & l2p1 = mesh.Point (mesh.LineSegment(j).p1); const Point<3> & l2p2 = mesh.Point (mesh.LineSegment(j).p2); Vec<3> vl1(l1p1, l1p2); for (double lamk = 0; lamk <= 1; lamk += 0.1) { Point<3> l2p = l1p1 + lamk * vl1; double dist = sqrt (MinDistLP2 (l2p1, l2p2, l2p)); if (dist > 1e-12) mesh.RestrictLocalH (l2p, 3*dist); } } */ } else { CopyEdge (refedges, refedgesinv, copyfromedge, specpoints[startpoints.Get(copyfromedge)].p, specpoints[endpoints.Get(copyfromedge)].p, edgepoints.Get(1), edgepoints.Last(), copyedgeidentification, layer, mesh); } for(int i=0; i(geometry.GetSurface(refedges[i].surfnr1)); if(splinesurface) { auto name = splinesurface->GetBCNameOf(specpoints[startpoints.Get(refedges[i].edgenr)].p,specpoints[endpoints.Get(refedges[i].edgenr)].p); mesh.SetCD2Name(refedges[i].edgenr,name); } else { auto splinesurface2 = dynamic_cast(geometry.GetSurface(refedges[i].surfnr2)); if(splinesurface2) { auto name = splinesurface2->GetBCNameOf(specpoints[startpoints.Get(refedges[i].edgenr)].p,specpoints[endpoints.Get(refedges[i].edgenr)].p); mesh.SetCD2Name(refedges[i].edgenr,name); } } } /* // not available ... for (int i = 0; i < refedges.Size(); i++) { EdgeDescriptor ed; ed.SetSurfNr(0, refedges[i].surfnr1); ed.SetSurfNr(1, refedges[i].surfnr2); int hnr = mesh.AddEdgeDescriptor(ed); if (hnr != refedges[i].edgenr) { cerr << "edgedescriptor index wrong: new : " << hnr << " old = " << refedges[i].edgenr << endl; } } */ // for(int i=0; i osedges(cntedge); INDEX_2_HASHTABLE osedgesht (cntedge+1); osedges = 2; // count segments on edges for (si = 0; si < mesh.GetNSeg(); si++) { const Segment & seg = mesh[si]; if (seg.seginfo && seg.edgenr >= 1 && seg.edgenr <= cntedge) osedges.Elem(seg.edgenr)--; } // flag one segment edges for (int i = 0; i < cntedge; i++) osedges[i] = (osedges[i] > 0) ? 1 : 0; for (si = 0; si < mesh.GetNSeg(); si++) { const Segment & seg = mesh[si]; if (seg.seginfo && seg.edgenr >= 1 && seg.edgenr <= cntedge) { if (osedges.Get(seg.edgenr)) { INDEX_2 i2(seg[0], seg[1]); i2.Sort (); if (osedgesht.Used (i2)) osedgesht.Set (i2, 2); else osedgesht.Set (i2, 1); } } } // one edge 1 segment, other 2 segments // yes, it happens ! point_on_edge_problem = 0; for (int i = 1; i <= osedgesht.GetNBags(); i++) for (int j = 1; j <= osedgesht.GetBagSize(i); j++) { INDEX_2 i2; int val; osedgesht.GetData (i, j, i2, val); const Point<3> & p1 = mesh[PointIndex(i2.I1())]; const Point<3> & p2 = mesh[PointIndex(i2.I2())]; Vec<3> v = p2 - p1; double vlen = v.Length(); v /= vlen; for (pi = PointIndex::BASE; pi < mesh.GetNP()+PointIndex::BASE; pi++) if (pi != i2.I1() && pi != i2.I2()) { const Point<3> & p = mesh[pi]; Vec<3> v2 = p - p1; double lam = (v2 * v); if (lam > 0 && lam < vlen) { Point<3> hp = p1 + lam * v; if (Dist (p, hp) < 1e-4 * vlen) { PrintWarning ("Point on edge !!!"); cout << "seg: " << i2 << ", p = " << pi << endl; osedgesht.Set (i2, 2); point_on_edge_problem = 1; (*testout) << "Point on edge" << endl << "seg = " << i2 << ", p = " << pi << endl << "pos = " << p << ", projected = " << hp << endl << "seg is = " << mesh.Point(PointIndex(i2.I1())) << " - " << mesh.Point(PointIndex(i2.I2())) << endl; } } } } // insert new points osedges = -1; int nseg = mesh.GetNSeg(); for (si = 0; si < nseg; si++) { const Segment & seg = mesh[si]; if (seg.seginfo && seg.edgenr >= 1 && seg.edgenr <= cntedge) { INDEX_2 i2(seg[0], seg[1]); i2.Sort (); if (osedgesht.Used (i2) && osedgesht.Get (i2) == 2 && osedges.Elem(seg.edgenr) == -1) { Point<3> newp = Center (mesh[PointIndex(seg[0])], mesh[PointIndex(seg[1])]); ProjectToEdge (geometry.GetSurface(seg.surfnr1), geometry.GetSurface(seg.surfnr2), newp); osedges.Elem(seg.edgenr) = mesh.AddPoint (newp, mesh[PointIndex(seg[0])].GetLayer(), EDGEPOINT); meshpoint_tree -> Insert (newp, osedges.Elem(seg.edgenr)); } } } // for (int i = 1; i <= nseg; i++) for (Segment & seg : mesh.LineSegments()) { // Segment & seg = mesh.LineSegment (i); if (seg.edgenr >= 1 && seg.edgenr <= cntedge) { if (osedges.Get(seg.edgenr) != -1) { Segment newseg = seg; newseg[0] = osedges.Get(seg.edgenr); seg[1] = osedges.Get(seg.edgenr); mesh.AddSegment (newseg); } } } } void EdgeCalculation :: FollowEdge (int pi1, int & ep, int & pos, const Array & hsp, double h, const Mesh & mesh, Array > & edgepoints, Array & curvelength) { int s1, s2, s1_rep, s2_rep; double len, steplen, cursteplen, loch; Point<3> p, np, pnp; Vec<3> a1, a2, t; Array locind; double size = geometry.MaxSize(); double epspointdist2 = size * 1e-6; epspointdist2 = sqr (epspointdist2); int uselocalh = mparam.uselocalh; s1_rep = specpoints[hsp.Get(pi1)].s1; s2_rep = specpoints[hsp.Get(pi1)].s2; s1 = specpoints[hsp.Get(pi1)].s1_orig; s2 = specpoints[hsp.Get(pi1)].s2_orig; p = specpoints[hsp.Get(pi1)].p; //ProjectToEdge (geometry.GetSurface(s1), // geometry.GetSurface(s2), p); geometry.GetSurface(s1) -> CalcGradient (p, a1); geometry.GetSurface(s2) -> CalcGradient (p, a2); t = Cross (a1, a2); t.Normalize(); pos = (specpoints[hsp.Get(pi1)].v * t) > 0; if (!pos) t *= -1; edgepoints.Append (p); curvelength.Append (0); len = 0; // (*testout) << "geometry.GetSurface(s1) -> LocH (p, 3, 1, h) " << geometry.GetSurface(s1) -> LocH (p, 3, 1, h) // << " geometry.GetSurface(s2) -> LocH (p, 3, 1, h) " << geometry.GetSurface(s2) -> LocH (p, 3, 1, h) << endl; loch = min2 (geometry.GetSurface(s1) -> LocH (p, 3, 1, mparam, h), geometry.GetSurface(s2) -> LocH (p, 3, 1, mparam, h)); if (uselocalh) { double lh = mesh.GetH(p); // (*testout) << "lh " << lh << endl; if (lh < loch) loch = lh; } steplen = 0.1 * loch; do { if (multithread.terminate) return; if (fabs (p(0)) + fabs (p(1)) + fabs (p(2)) > 100000*size) { ep = 0; PrintWarning ("Give up line"); break; } if (steplen > 0.1 * loch) steplen = 0.1 * loch; steplen *= 2; do { steplen *= 0.5; np = p + steplen * t; pnp = np; ProjectToEdge (geometry.GetSurface(s1), geometry.GetSurface(s2), pnp); } while (Dist (np, pnp) > 0.1 * steplen); cursteplen = steplen; if (Dist (np, pnp) < 0.01 * steplen) steplen *= 2; np = pnp; ep = 0; double hvtmin = 1.5 * cursteplen; Box<3> boxp (p - (2 * cursteplen) * Vec<3> (1, 1, 1), p + (2 * cursteplen) * Vec<3> (1, 1, 1)); searchtree -> GetIntersecting (boxp.PMin(), boxp.PMax(), locind); for (int i = 0; i < locind.Size(); i++) { Vec<3> hv = specpoints[locind[i]].p - p; if (hv.Length2() > 9 * cursteplen * cursteplen) continue; double hvt = hv * t; hv -= hvt * t; if (hv.Length() < 0.2 * cursteplen && hvt > 0 && // hvt < 1.5 * cursteplen && hvt < hvtmin && specpoints[locind[i]].unconditional == 1 && (specpoints[locind[i]].v + t).Length() < 0.4 ) { Point<3> hep = specpoints[locind[i]].p; ProjectToEdge (geometry.GetSurface(s1), geometry.GetSurface(s2), hep); if (Dist2 (hep, specpoints[locind[i]].p) < epspointdist2 ) { geometry.GetSurface(s1) -> CalcGradient (hep, a1); geometry.GetSurface(s2) -> CalcGradient (hep, a2); Vec<3> ept = Cross (a1, a2); ept /= ept.Length(); if (!pos) ept *= -1; if ( (specpoints[locind[i]].v + ept).Length() < 1e-4 ) { np = specpoints[locind[i]].p; for (int jj = 0; jj < hsp.Size(); jj++) if (hsp[jj] == locind[i]) ep = jj+1; if (!ep) cerr << "endpoint not found" << endl; // ep = i; hvtmin = hvt; // break; } } } } /* for (int i = 1; i <= hsp.Size(); i++) { if (!boxp.IsIn (specpoints[hsp.Get(i)].p)) continue; Vec<3> hv = specpoints[hsp.Get(i)].p - p; if (hv.Length2() > 9 * cursteplen * cursteplen) continue; double hvt = hv * t; hv -= hvt * t; if (hv.Length() < 0.2 * cursteplen && hvt > 0 && // hvt < 1.5 * cursteplen && hvt < hvtmin && specpoints[hsp.Get(i)].unconditional == 1 && (specpoints[hsp.Get(i)].v + t).Length() < 0.4 ) { Point<3> hep = specpoints[hsp.Get(i)].p; ProjectToEdge (geometry.GetSurface(s1), geometry.GetSurface(s2), hep); if (Dist2 (hep, specpoints[hsp.Get(i)].p) < epspointdist2 ) { geometry.GetSurface(s1) -> CalcGradient (hep, a1); geometry.GetSurface(s2) -> CalcGradient (hep, a2); Vec<3> ept = Cross (a1, a2); ept /= ept.Length(); if (!pos) ept *= -1; if ( (specpoints[hsp.Get(i)].v + ept).Length() < 1e-4 ) { np = specpoints[hsp.Get(i)].p; ep = i; hvtmin = hvt; // break; } } } } */ loch = min2 (geometry.GetSurface(s1_rep) -> LocH (np, 3, 1, mparam, h), geometry.GetSurface(s2_rep) -> LocH (np, 3, 1, mparam, h)); loch = max2 (loch, mparam.minh); if (uselocalh) { double lh = mesh.GetH(np); if (lh < loch) loch = lh; } len += Dist (p, np) / loch; edgepoints.Append (np); curvelength.Append (len); p = np; geometry.GetSurface(s1) -> CalcGradient (p, a1); geometry.GetSurface(s2) -> CalcGradient (p, a2); t = Cross (a1, a2); t.Normalize(); if (!pos) t *= -1; } while (! ep); } void EdgeCalculation :: AnalyzeEdge (int s1, int s2, int s1_rep, int s2_rep, int pos, int layer, const Array > & edgepoints, Array & refedges, Array & refedgesinv) { Segment seg; Array locsurfind, locsurfind2; Array edges_priority; double size = geometry.MaxSize(); bool debug = 0; #ifdef DEVELOP debug = 1; #endif if (debug) { (*testout) << "debug edge !!!" << endl; (*testout) << "edgepoints = " << edgepoints << endl; (*testout) << "s1, s2 = " << s1 << " - " << s2 << endl; (*testout) << "s1_rep, s2_rep = " << s1_rep << " - " << s2_rep << endl; } refedges.SetSize(0); refedgesinv.SetSize(0); Point<3> hp = Center (edgepoints[0], edgepoints[1]); ProjectToEdge (geometry.GetSurface(s1), geometry.GetSurface(s2), hp); if (debug) *testout << "hp = " << hp << endl; Vec<3> t, a1, a2; geometry.GetSurface(s1) -> CalcGradient (hp, a1); geometry.GetSurface(s2) -> CalcGradient (hp, a2); t = Cross (a1, a2); t.Normalize(); if (!pos) t *= -1; for (int i = 0; i < geometry.GetNTopLevelObjects(); i++) { Solid * locsol; if (geometry.GetTopLevelObject(i)->GetLayer() != layer) continue; const Solid * sol = geometry.GetTopLevelObject(i)->GetSolid(); const Surface * surf = geometry.GetTopLevelObject(i)->GetSurface(); sol -> TangentialSolid (hp, locsol, locsurfind, size*ideps); //*testout << "hp = " << hp << endl; //(*testout) << "locsol: " << endl; //if (locsol) locsol->Print(*testout); //(*testout) << endl; if (!locsol) continue; BoxSphere<3> boxp (hp, hp); boxp.Increase (1e-8*size); boxp.CalcDiamCenter(); ReducePrimitiveIterator rpi(boxp); UnReducePrimitiveIterator urpi; ((Solid*)locsol) -> IterateSolid (rpi); locsol -> CalcSurfaceInverse (); if (!surf) { locsol -> GetTangentialSurfaceIndices (hp,locsurfind,ideps*size); } else { /* if (fabs (surf->CalcFunctionValue (hp)) < 1e-6) continue; */ locsurfind.SetSize(1); locsurfind[0] = -1; for (int j = 0; j < geometry.GetNSurf(); j++) if (geometry.GetSurface(j) == surf) { locsurfind[0] = j; // geometry.GetSurfaceClassRepresentant(j); break; } } ((Solid*)locsol) -> IterateSolid (urpi); if (debug) (*testout) << "edge of tlo " << i << ", has " << locsurfind.Size() << " faces." << endl; for (int j = locsurfind.Size()-1; j >= 0; j--) if (fabs (geometry.GetSurface(locsurfind[j]) ->CalcFunctionValue (hp) ) > ideps*size) locsurfind.Delete(j); if (debug) (*testout) << locsurfind.Size() << " faces on hp" << endl; for (int j = 0; j < locsurfind.Size(); j++) { int lsi = locsurfind[j]; int rlsi = geometry.GetSurfaceClassRepresentant(lsi); // n is outer normal to solid Vec<3> n = geometry.GetSurface(lsi) -> GetNormalVector (hp); if (debug) *testout << "n1 = " << n << endl; if (geometry.GetSurface (lsi)->Inverse()) n *= -1; if (fabs (t * n) > 1e-4) continue; if (debug) { (*testout) << "face " << locsurfind[j] << ", rep = " << rlsi << " has (t*n) = " << (t*n) << endl; (*testout) << "n = " << n << endl; } // rn is normal to class representant Vec<3> rn = geometry.GetSurface(rlsi) -> GetNormalVector (hp); if (debug) { (*testout) << "rn = " << rn << endl; } //if( n*rn < 0) // rn *= -1; bool sameasref = ((n * rn) > 0); //m = Cross (t, rn); Vec<3> m = Cross (t, n); if(!sameasref) m*=-1.; m.Normalize(); if (debug) (*testout) << "m = " << m << endl; //bool founddirection = false; //int k; double eps = 1e-8*size; Array pre_ok(2); do { eps *= 0.5; pre_ok[0] = (locsol -> VectorIn2 (hp, m, n, eps) == IS_OUTSIDE && locsol -> VectorIn2 (hp, m, -1. * n, eps) == IS_INSIDE); pre_ok[1] = (locsol -> VectorIn2 (hp, -1.*m, n, eps) == IS_OUTSIDE && locsol -> VectorIn2 (hp, -1.*m, -1. * n, eps) == IS_INSIDE); if (debug) { *testout << "eps = " << eps << endl; *testout << "in,1 = " << locsol -> VectorIn2 (hp, m, n, eps) << endl; *testout << "in,1 = " << locsol -> VectorIn2 (hp, m, -1. * n, eps) << endl; *testout << "in,1 = " << locsol -> VectorIn2 (hp, -1.*m, n, eps) << endl; *testout << "in,1 = " << locsol -> VectorIn2 (hp, -1.*m, -1. * n, eps) << endl; } } while(pre_ok[0] && pre_ok[1] && eps > 1e-16*size); if (debug) { *testout << "eps = " << eps << ", size = " << size << endl; *testout << "pre_ok[0,1] = " << pre_ok[0] << "," << pre_ok[1] << endl; } eps = 1e-8*size; for (int k = 1; k <= 2; k ++) { bool edgeinv = (k == 2); if (debug) { (*testout) << "onface(" << hp << ", " << m << ")= " << flush; (*testout) << locsol->OnFace (hp, m, eps) << flush; (*testout) << " n " << n << flush; (*testout) << " vec2in = " << locsol -> VectorIn2 (hp, m, n, eps) << " and " << locsol -> VectorIn2 (hp, m, -1 * n, eps) << endl; } // if (locsol -> OnFace (hp, m)) // one side must be inside, the other must be outside bool ok = (pre_ok[k-1] || (locsol -> VectorIn2 (hp, m, n, eps) == IS_OUTSIDE && locsol -> VectorIn2 (hp, m, -1 * n, eps) == IS_INSIDE)); if (debug) (*testout) << "ok (before) " << ok << endl; // compute second order approximation // curve = hp + t m + t*t/2 m2 Vec<3> grad, m2; Mat<3> hesse; geometry.GetSurface(lsi) -> CalcGradient (hp, grad); geometry.GetSurface(lsi) -> CalcHesse (hp, hesse); double fac = -(m * (hesse * m)) / (grad * grad); m2 = fac * grad; // (*testout) << "hp = " << hp << ", m = " << m << ", m2 = " << m2 << endl; Solid * locsol2; locsol -> TangentialSolid3 (hp, m, m2, locsol2, locsurfind2, ideps*size); if (!locsol2) ok = 0; delete locsol2; if (ok) { if (debug) (*testout) << "is true" << endl; int hi = 0; for (int l = 1; !hi && l <= refedges.Size(); l++) { if (refedges.Get(l).si == rlsi && // JS sept 2006 // if (refedges.Get(l).si == lsi && refedgesinv.Get(l) == edgeinv) { hi = l; } } if (!hi) { seg.si = rlsi; // JS Sept 2006 // seg.si = lsi; seg.domin = -1; seg.domout = -1; seg.tlosurf = -1; //seg.surfnr1 = s1_rep; //seg.surfnr2 = s2_rep; seg.surfnr1 = s1; seg.surfnr2 = s2; refedges.Append (seg); hi = refedges.Size(); refedgesinv.Append (edgeinv); edges_priority.Append((pre_ok[k-1]) ? 1 : 0); } else { if(edges_priority[hi-1] / 10 == -i-1) edges_priority[hi-1] = 10*(i+1); else edges_priority[hi-1] = -10*(i+1); } if (!surf) { if (sameasref) refedges.Elem(hi).domin = i; else refedges.Elem(hi).domout = i; } else { refedges.Elem(hi).tlosurf = i; for(int kk = 0; kk < geometry.GetNTopLevelObjects(); kk++) { auto othersolid = geometry.GetTopLevelObject(kk)->GetSolid(); auto othersurf = geometry.GetTopLevelObject(kk)->GetSurface(); if(!othersurf) { if(othersolid->IsIn(edgepoints[0]) && othersolid->IsIn(edgepoints[edgepoints.Size()-1])) { refedges.Elem(hi).domin = kk; refedges.Elem(hi).domout = kk; } } } } if(pre_ok[k-1]) edges_priority[hi-1] = 1; if (debug) (*testout) << "add ref seg:" << "si = " << refedges.Get(hi).si << ", domin = " << refedges.Get(hi).domin << ", domout = " << refedges.Get(hi).domout << ", surfnr1/2 = " << refedges.Get(hi).surfnr1 << ", " << refedges.Get(hi).surfnr2 << ", inv = " << refedgesinv.Get(hi) << ", refedgenr = " << hi << ", priority = " << edges_priority[hi-1] << ", hi = " << hi << endl; } else { if (debug) (*testout) << "is false" << endl; } m *= -1; } } delete locsol; } if (debug) { *testout << "Refsegments, before delete: " << endl << refedges << endl; *testout << "inv: " << endl << refedgesinv << endl; } BitArray todelete(refedges.Size()); todelete.Clear(); for(int i=0; i edges_priority[j]) { todelete.Set(j); } } } } int num = refedges.Size(); for(int i=refedges.Size()-1; num>2 && i>=0; i--) if(todelete.Test(i)) { refedges.Delete(i); refedgesinv.Delete(i); num--; } if (debug) { *testout << "Refsegments: " << endl << refedges << endl; } } void EdgeCalculation :: StoreEdge (const Array & refedges, const Array & refedgesinv, const Array > & edgepoints, const Array & curvelength, int layer, Mesh & mesh) { // Calculate optimal element-length int i, j, k; PointIndex pi; int ne; double len, corr, lam; PointIndex thispi, lastpi; Point<3> p, np; Segment seg; const Surface * surf1 = geometry.GetSurface (refedges.Get(1).surfnr1); const Surface * surf2 = geometry.GetSurface (refedges.Get(1).surfnr2); (*testout) << "s1 " << refedges.Get(1).surfnr1 << " s2 " << refedges.Get(1).surfnr2 << " rs1 " << geometry.GetSurfaceClassRepresentant(refedges.Get(1).surfnr1) << " rs2 " << geometry.GetSurfaceClassRepresentant(refedges.Get(1).surfnr2) << endl; len = curvelength.Last(); ne = int (len + 0.5); if (ne == 0) ne = 1; if (Dist (edgepoints.Get(1), edgepoints.Last()) < 1e-8*geometry.MaxSize() && ne <= 6) ne = 6; corr = len / ne; // generate initial point p = edgepoints.Get(1); lastpi = -1; /* for (pi = PointIndex::BASE; pi < mesh.GetNP()+PointIndex::BASE; pi++) if (Dist (mesh[pi], p) < 1e-6) { lastpi = pi; break; } */ const double di=1e-7*geometry.MaxSize(); Array locsearch; meshpoint_tree -> GetIntersecting (p-Vec<3> (di,di,di), p+Vec<3> (di,di,di), locsearch); if (locsearch.Size()) lastpi = locsearch[0]; if (lastpi == -1) { lastpi = mesh.AddPoint (p, layer, FIXEDPOINT); meshpoint_tree -> Insert (p, lastpi); // (*testout) << "test1, store point " << lastpi << ", p = " << p << endl; } j = 1; for (i = 1; i <= ne; i++) { while (curvelength.Get(j) < i * corr && j < curvelength.Size()) j++; lam = (i * corr - curvelength.Get(j-1)) / (curvelength.Get(j) - curvelength.Get(j-1)); np(0) = (1-lam) * edgepoints.Get(j-1)(0) + lam * edgepoints.Get(j)(0); np(1) = (1-lam) * edgepoints.Get(j-1)(1) + lam * edgepoints.Get(j)(1); np(2) = (1-lam) * edgepoints.Get(j-1)(2) + lam * edgepoints.Get(j)(2); thispi = -1; if (i == ne) { /* for (pi = PointIndex::BASE; pi < mesh.GetNP()+PointIndex::BASE; pi++) if (Dist(mesh[pi], np) < 1e-6) thispi = pi; */ meshpoint_tree -> GetIntersecting (np-Vec<3> (di,di,di), np+Vec<3> (di,di,di), locsearch); if (locsearch.Size()) thispi = locsearch[0]; } if (thispi == -1) { ProjectToEdge (surf1, surf2, np); thispi = mesh.AddPoint (np, layer, (i==ne) ? FIXEDPOINT : EDGEPOINT); meshpoint_tree -> Insert (np, thispi); // (*testout) << "test2, store point " << thispi << ", p = " << np << endl; } for (k = 1; k <= refedges.Size(); k++) { if (refedgesinv.Get(k)) { seg[0] = lastpi; seg[1] = thispi; } else { seg[0] = thispi; seg[1] = lastpi; } seg.si = refedges.Get(k).si; seg.domin = refedges.Get(k).domin; seg.domout = refedges.Get(k).domout; seg.tlosurf = refedges.Get(k).tlosurf; seg.edgenr = refedges.Get(k).edgenr; seg.surfnr1 = refedges.Get(k).surfnr1; seg.surfnr2 = refedges.Get(k).surfnr2; seg.seginfo = 0; if (k == 1) seg.seginfo = (refedgesinv.Get(k)) ? 2 : 1; mesh.AddSegment (seg); //(*testout) << "add seg " << mesh[seg.p1] << "-" << mesh[seg.p2] << endl; //(*testout) << "refedge " << k << " surf1 " << seg.surfnr1 << " surf2 " << seg.surfnr2 << " inv " << refedgesinv.Get(k) << endl; double maxh = min2 (geometry.GetSurface(seg.surfnr1)->GetMaxH(), geometry.GetSurface(seg.surfnr2)->GetMaxH()); if (seg.domin != -1) { const Solid * s1 = geometry.GetTopLevelObject(seg.domin) -> GetSolid(); maxh = min2 (maxh, s1->GetMaxH()); maxh = min2 (maxh, geometry.GetTopLevelObject(seg.domin)->GetMaxH()); mesh.RestrictLocalH (p, maxh); mesh.RestrictLocalH (np, maxh); } if (seg.domout != -1) { const Solid * s1 = geometry.GetTopLevelObject(seg.domout) -> GetSolid(); maxh = min2 (maxh, s1->GetMaxH()); maxh = min2 (maxh, geometry.GetTopLevelObject(seg.domout)->GetMaxH()); mesh.RestrictLocalH (p, maxh); mesh.RestrictLocalH (np, maxh); } if (seg.tlosurf != -1) { double hi = geometry.GetTopLevelObject(seg.tlosurf) -> GetMaxH(); maxh = min2 (maxh, hi); mesh.RestrictLocalH (p, maxh); mesh.RestrictLocalH (np, maxh); } } p = np; lastpi = thispi; } #ifdef DEVELOP (*testout) << " eplast = " << lastpi << " = " << p << endl; #endif } void EdgeCalculation :: StoreShortEdge (const Array & refedges, const Array & refedgesinv, const Array > & edgepoints, const Array & curvelength, int layer, Mesh & mesh) { // Calculate optimal element-length PointIndex pi; // int ne; Segment seg; /* double len, corr, lam; int thispi, lastpi; Point<3> p, np; const Surface * surf1 = geometry.GetSurface (refedges.Get(1).surfnr1); const Surface * surf2 = geometry.GetSurface (refedges.Get(1).surfnr2); len = curvelength.Last(); ne = int (len + 0.5); if (ne == 0) ne = 1; if (Dist2 (edgepoints[1], edgepoints.Last()) < 1e-8 && ne <= 6) ne = 6; corr = len / ne; */ // generate initial point Point<3> p = edgepoints[0]; PointIndex pi1 = -1; for (pi = PointIndex::BASE; pi < mesh.GetNP()+PointIndex::BASE; pi++) if (Dist (mesh[pi], p) < 1e-6*geometry.MaxSize()) { pi1 = pi; break; } if (pi1 == -1) { pi1 = mesh.AddPoint (p, layer, FIXEDPOINT); meshpoint_tree -> Insert (p, pi1); // (*testout) << "test3, store point " << pi1 << ", p = " << p << endl; } p = edgepoints.Last(); PointIndex pi2 = -1; for (pi = PointIndex::BASE; pi < mesh.GetNP()+PointIndex::BASE; pi++) if (Dist (mesh[pi], p) < 1e-6*geometry.MaxSize()) { pi2 = pi; break; } if (pi2==-1) { pi2 = mesh.AddPoint (p, layer, FIXEDPOINT); meshpoint_tree -> Insert (p, pi2); // (*testout) << "test4, store point " << pi2 << ", p = " << p << endl; } /* j = 1; for (i = 1; i <= ne; i++) { while (curvelength[j] < i * corr && j < curvelength.Size()) j++; lam = (i * corr - curvelength[j-1]) / (curvelength[j] - curvelength[j-1]); np(0) = (1-lam) * edgepoints[j-1](0) + lam * edgepoints[j](0); np(1) = (1-lam) * edgepoints[j-1](1) + lam * edgepoints[j](1); np(2) = (1-lam) * edgepoints[j-1](2) + lam * edgepoints[j](2); thispi = 0; if (i == ne) for (j = 1; j <= mesh.GetNP(); j++) if (Dist(mesh.Point(j), np) < 1e-6) thispi = j; if (!thispi) { ProjectToEdge (surf1, surf2, np); thispi = mesh.AddPoint (np); } */ // (*testout) << "short edge " << pi1 << " - " << pi2 << endl; for (int k = 1; k <= refedges.Size(); k++) { if (refedgesinv.Get(k)) { seg[0] = pi1; seg[1] = pi2; } else { seg[0] = pi2; seg[1] = pi1; } seg.si = refedges.Get(k).si; seg.domin = refedges.Get(k).domin; seg.domout = refedges.Get(k).domout; seg.tlosurf = refedges.Get(k).tlosurf; seg.edgenr = refedges.Get(k).edgenr; seg.surfnr1 = refedges.Get(k).surfnr1; seg.surfnr2 = refedges.Get(k).surfnr2; seg.seginfo = 0; if (k == 1) seg.seginfo = (refedgesinv.Get(k)) ? 2 : 1; mesh.AddSegment (seg); // (*testout) << "add seg " << seg[0] << "-" << seg[1] << endl; } } void EdgeCalculation :: CopyEdge (const Array & refedges, const Array & refedgesinv, int copyfromedge, const Point<3> & fromstart, const Point<3> & fromend, const Point<3> & tostart, const Point<3> & toend, int copyedgeidentification, int layer, Mesh & mesh) { int k; PointIndex pi; double size = geometry.MaxSize(); // copy start and end points for (int i = 1; i <= 2; i++) { Point<3> fromp = (i == 1) ? fromstart : fromend; Point<3> top = (i == 1) ? tostart : toend; PointIndex frompi = -1; PointIndex topi = -1; for (pi = PointIndex::BASE; pi < mesh.GetNP()+PointIndex::BASE; pi++) { if (Dist2 (mesh[pi], fromp) <= 1e-16*size) frompi = pi; if (Dist2 (mesh[pi], top) <= 1e-16*size) topi = pi; } if (topi == -1) { topi = mesh.AddPoint (top, layer, FIXEDPOINT); meshpoint_tree -> Insert (top, topi); } const Identification & csi = (*geometry.identifications.Get(copyedgeidentification)); if (csi.Identifyable (mesh[frompi], mesh[topi])) mesh.GetIdentifications().Add(frompi, topi, copyedgeidentification); else if (csi.Identifyable (mesh[topi], mesh[frompi])) mesh.GetIdentifications().Add(topi, frompi, copyedgeidentification); else { cerr << "edgeflw.cpp: should identify, but cannot"; exit(1); } #ifdef DEVELOP (*testout) << "adding identification " << mesh[frompi] << "; " << mesh[topi] << " (id " << copyedgeidentification <<")" << endl; #endif /* (*testout) << "Add Identification from CopyEdge, p1 = " << mesh[PointIndex(frompi)] << ", p2 = " << mesh[PointIndex(topi)] << endl; mesh.GetIdentifications().Add(frompi, topi, copyedgeidentification); */ } int oldns = mesh.GetNSeg(); for (int i = 1; i <= oldns; i++) { // real copy, since array might be reallocated !! const Segment oldseg = mesh.LineSegment(i); if (oldseg.edgenr != copyfromedge) continue; if (oldseg.seginfo == 0) continue; int pi1 = oldseg[0]; int pi2 = oldseg[1]; int npi1 = geometry.identifications.Get(copyedgeidentification) -> GetIdentifiedPoint (mesh, pi1); int npi2 = geometry.identifications.Get(copyedgeidentification) -> GetIdentifiedPoint (mesh, pi2); //(*testout) << "copy edge, pts = " << npi1 << " - " << npi2 << endl; Segment seg; for (k = 1; k <= refedges.Size(); k++) { bool inv = refedgesinv.Get(k); // other edge is inverse if (oldseg.seginfo == 1) inv = !inv; // (*testout) << "inv, now = " << inv << endl; if (inv) { seg[0] = npi1; seg[1] = npi2; } else { seg[0] = npi2; seg[1] = npi1; } seg.si = refedges.Get(k).si; seg.domin = refedges.Get(k).domin; seg.domout = refedges.Get(k).domout; seg.tlosurf = refedges.Get(k).tlosurf; seg.edgenr = refedges.Get(k).edgenr; seg.surfnr1 = refedges.Get(k).surfnr1; seg.surfnr2 = refedges.Get(k).surfnr2; seg.seginfo = 0; if (k == 1) seg.seginfo = refedgesinv.Get(k) ? 2 : 1; mesh.AddSegment (seg); // (*testout) << "copy seg " << seg[0] << "-" << seg[1] << endl; #ifdef DEVELOP (*testout) << "copy seg, face = " << seg.si << ": " << " inv = " << inv << ", refinv = " << refedgesinv.Get(k) << mesh.Point(seg[0]) << ", " << mesh.Point(seg[1]) << endl; #endif } } } void EdgeCalculation :: FindClosedSurfaces (double h, Mesh & mesh) { // if there is no special point at a sphere, one has to add a segment pair int nsurf = geometry.GetNSurf(); int layer = 0; Solid * tansol; Array tansurfind; double size = geometry.MaxSize(); int nsol = geometry.GetNTopLevelObjects(); BitArray pointatsurface (nsurf); pointatsurface.Clear(); for (int i = 1; i <= mesh.GetNSeg(); i++) { const Segment & seg = mesh.LineSegment(i); #ifdef DEVELOP (*testout) << seg.surfnr1 << ", " << seg.surfnr2 << ", si = " << seg.si << endl; #endif int classrep = geometry.GetSurfaceClassRepresentant (seg.si); pointatsurface.Set (classrep); } for (int i = 0; i < nsurf; i++) { int classrep = geometry.GetSurfaceClassRepresentant (i); if (!pointatsurface.Test(classrep)) { const Surface * s = geometry.GetSurface(i); Point<3> p1 = s -> GetSurfacePoint(); Vec<3> nv = s -> GetNormalVector (p1); double hloc = min2 (s->LocH (p1, 3, 1, mparam, h), mesh.GetH(p1)); Segment seg1; seg1.si = i; seg1.domin = -1; seg1.domout = -1; Segment seg2; seg2.si = i; seg2.domin = -1; seg2.domout = -1; seg1.surfnr1 = i; seg2.surfnr1 = i; seg1.surfnr2 = i; seg2.surfnr2 = i; for (int j = 0; j < nsol; j++) { if (geometry.GetTopLevelObject(j)->GetSurface()) continue; const Solid * sol = geometry.GetTopLevelObject(j)->GetSolid(); sol -> TangentialSolid (p1, tansol, tansurfind, ideps*size); layer = geometry.GetTopLevelObject(j)->GetLayer(); if (tansol) { tansol -> GetSurfaceIndices (tansurfind); if (tansurfind.Size() == 1 && tansurfind.Get(1) == i) { hloc = min2 (hloc, geometry.GetTopLevelObject(j)->GetMaxH()); if (!tansol->VectorIn(p1, nv)) { seg1.domin = j; seg2.domin = j; seg1.tlosurf = -1; seg2.tlosurf = -1; } else { seg1.domout = j; seg2.domout = j; seg1.tlosurf = -1; seg2.tlosurf = -1; } // seg.s2 = i; // seg.invs1 = surfaces[i] -> Inverse(); // seg.invs2 = ! (surfaces[i] -> Inverse()); } delete tansol; } } Vec<3> tv = nv.GetNormal (); tv *= (hloc / tv.Length()); Point<3> p2 = p1 + tv; s->Project (p2); if (seg1.domin != -1 || seg1.domout != -1) { mesh.AddPoint (p1, layer, EDGEPOINT); mesh.AddPoint (p2, layer, EDGEPOINT); seg1[0] = mesh.GetNP()-1; seg1[1] = mesh.GetNP(); seg2[1] = mesh.GetNP()-1; seg2[0] = mesh.GetNP(); seg1.geominfo[0].trignum = 1; seg1.geominfo[1].trignum = 1; seg2.geominfo[0].trignum = 1; seg2.geominfo[1].trignum = 1; mesh.AddSegment (seg1); mesh.AddSegment (seg2); PrintMessage (5, "Add line segment to smooth surface"); #ifdef DEVELOP (*testout) << "Add segment at smooth surface " << i; if (i != classrep) (*testout) << ", classrep = " << classrep; (*testout) << ": " << mesh.Point (mesh.GetNP()-1) << " - " << mesh.Point (mesh.GetNP()) << endl; #endif } } } } } netgen-6.2.1804/libsrc/csg/brick.cpp0000644000175000017500000002374013272137567015643 0ustar kurtkurt#include #include #include namespace netgen { Parallelogram3d :: Parallelogram3d (Point<3> ap1, Point<3> ap2, Point<3> ap3) { p1 = ap1; p2 = ap2; p3 = ap3; CalcData(); } Parallelogram3d ::~Parallelogram3d () { ; } void Parallelogram3d :: SetPoints (Point<3> ap1, Point<3> ap2, Point<3> ap3) { p1 = ap1; p2 = ap2; p3 = ap3; CalcData(); } void Parallelogram3d :: CalcData() { v12 = p2 - p1; v13 = p3 - p1; p4 = p2 + v13; n = Cross (v12, v13); n.Normalize(); } int Parallelogram3d :: IsIdentic (const Surface & s2, int & inv, double eps) const { int id = (fabs (s2.CalcFunctionValue (p1)) <= eps) && (fabs (s2.CalcFunctionValue (p2)) <= eps) && (fabs (s2.CalcFunctionValue (p3)) <= eps); if (id) { Vec<3> n2; n2 = s2.GetNormalVector(p1); inv = (n * n2) < 0; } return id; } double Parallelogram3d :: CalcFunctionValue (const Point<3> & point) const { return n * (point - p1); } void Parallelogram3d :: CalcGradient (const Point<3> & /* point */, Vec<3> & grad) const { grad = n; } void Parallelogram3d :: CalcHesse (const Point<3> & /* point */, Mat<3> & hesse) const { hesse = 0; } double Parallelogram3d :: HesseNorm () const { return 0; } Point<3> Parallelogram3d :: GetSurfacePoint () const { return p1; } void Parallelogram3d :: Print (ostream & str) const { str << "Parallelogram3d " << p1 << " - " << p2 << " - " << p3 << endl; } void Parallelogram3d :: GetTriangleApproximation (TriangleApproximation & tas, const Box<3> & /* bbox */, double /* facets */) const { tas.AddPoint (p1); tas.AddPoint (p2); tas.AddPoint (p3); tas.AddPoint (p4); tas.AddTriangle (TATriangle (0, 0, 1, 2)); tas.AddTriangle (TATriangle (0, 2, 1, 3)); } Brick :: Brick (Point<3> ap1, Point<3> ap2, Point<3> ap3, Point<3> ap4) { faces.SetSize (6); surfaceids.SetSize (6); surfaceactive.SetSize(6); p1 = ap1; p2 = ap2; p3 = ap3; p4 = ap4; for (int i = 0; i < 6; i++) { faces[i] = new Plane (Point<3>(0,0,0), Vec<3> (0,0,1)); surfaceactive[i] = 1; } CalcData(); } Brick :: ~Brick () { for (int i = 0; i < 6; i++) delete faces[i]; } Primitive * Brick :: CreateDefault () { return new Brick (Point<3> (0,0,0), Point<3> (1,0,0), Point<3> (0,1,0), Point<3> (0,0,1)); } Primitive * Brick :: Copy () const { return new Brick (p1, p2, p3, p4); } void Brick :: Transform (Transformation<3> & trans) { trans.Transform (p1); trans.Transform (p2); trans.Transform (p3); trans.Transform (p4); CalcData(); } INSOLID_TYPE Brick :: BoxInSolid (const BoxSphere<3> & box) const { /* int i; double maxval; for (i = 1; i <= 6; i++) { double val = faces.Get(i)->CalcFunctionValue (box.Center()); if (i == 1 || val > maxval) maxval = val; } if (maxval > box.Diam()) return IS_OUTSIDE; if (maxval < -box.Diam()) return IS_INSIDE; return DOES_INTERSECT; */ bool inside = 1; bool outside = 0; Point<3> p[8]; for (int j = 0; j < 8; j++) p[j] = box.GetPointNr(j); for (int i = 0; i < 6; i++) { bool outsidei = 1; for (int j = 0; j < 8; j++) { // Point<3> p = box.GetPointNr (j); double val = faces[i]->Plane::CalcFunctionValue (p[j]); if (val > 0) inside = 0; if (val < 0) outsidei = 0; } if (outsidei) outside = 1; } if (outside) return IS_OUTSIDE; if (inside) return IS_INSIDE; return DOES_INTERSECT; } INSOLID_TYPE Brick :: PointInSolid (const Point<3> & p, double eps) const { double maxval = faces[0] -> Plane::CalcFunctionValue (p); for (int i = 1; i < 6; i++) { double val = faces[i] -> Plane::CalcFunctionValue (p); if (val > maxval) maxval = val; } if (maxval > eps) return IS_OUTSIDE; if (maxval < -eps) return IS_INSIDE; return DOES_INTERSECT; } INSOLID_TYPE Brick :: VecInSolid (const Point<3> & p, const Vec<3> & v, double eps) const { INSOLID_TYPE result = IS_INSIDE; for (int i = 0; i < faces.Size(); i++) { INSOLID_TYPE hres = faces[i]->VecInSolid(p, v, eps); if (hres == IS_OUTSIDE || result == IS_OUTSIDE) result = IS_OUTSIDE; else if (hres == DOES_INTERSECT || result == DOES_INTERSECT) result = DOES_INTERSECT; else result = IS_INSIDE; } return result; /* INSOLID_TYPE is = IS_INSIDE; Vec<3> grad; double scal; for (int i = 0; i < faces.Size(); i++) { if (faces[i] -> PointOnSurface (p, eps)) { GetSurface(i).CalcGradient (p, grad); scal = v * grad; if (scal >= eps) is = IS_OUTSIDE; if (scal >= -eps && is == IS_INSIDE) is = DOES_INTERSECT; } } return is; */ /* Point<3> p2 = p + 1e-2 * v; return PointInSolid (p2, eps); */ } INSOLID_TYPE Brick :: VecInSolid2 (const Point<3> & p, const Vec<3> & v1, const Vec<3> & v2, double eps) const { INSOLID_TYPE result = IS_INSIDE; for (int i = 0; i < faces.Size(); i++) { INSOLID_TYPE hres = faces[i]->VecInSolid2(p, v1, v2, eps); if (hres == IS_OUTSIDE || result == IS_OUTSIDE) result = IS_OUTSIDE; else if (hres == DOES_INTERSECT || result == DOES_INTERSECT) result = DOES_INTERSECT; else result = IS_INSIDE; } return result; } INSOLID_TYPE Brick :: VecInSolid3 (const Point<3> & p, const Vec<3> & v1, const Vec<3> & v2, double eps) const { INSOLID_TYPE result = IS_INSIDE; for (int i = 0; i < faces.Size(); i++) { INSOLID_TYPE hres = faces[i]->VecInSolid3(p, v1, v2, eps); if (hres == IS_OUTSIDE || result == IS_OUTSIDE) result = IS_OUTSIDE; else if (hres == DOES_INTERSECT || result == DOES_INTERSECT) result = DOES_INTERSECT; else result = IS_INSIDE; } return result; } INSOLID_TYPE Brick :: VecInSolid4 (const Point<3> & p, const Vec<3> & v, const Vec<3> & v2, const Vec<3> & m, double eps) const { INSOLID_TYPE result = IS_INSIDE; for (int i = 0; i < faces.Size(); i++) { INSOLID_TYPE hres = faces[i]->VecInSolid4(p, v, v2, m, eps); if (hres == IS_OUTSIDE || result == IS_OUTSIDE) result = IS_OUTSIDE; else if (hres == DOES_INTERSECT || result == DOES_INTERSECT) result = DOES_INTERSECT; else result = IS_INSIDE; } return result; } void Brick :: GetPrimitiveData (const char *& classname, Array & coeffs) const { classname = "brick"; coeffs.SetSize(12); coeffs.Elem(1) = p1(0); coeffs.Elem(2) = p1(1); coeffs.Elem(3) = p1(2); coeffs.Elem(4) = p2(0); coeffs.Elem(5) = p2(1); coeffs.Elem(6) = p2(2); coeffs.Elem(7) = p3(0); coeffs.Elem(8) = p3(1); coeffs.Elem(9) = p3(2); coeffs.Elem(10) = p4(0); coeffs.Elem(11) = p4(1); coeffs.Elem(12) = p4(2); } void Brick :: SetPrimitiveData (Array & coeffs) { p1(0) = coeffs.Elem(1); p1(1) = coeffs.Elem(2); p1(2) = coeffs.Elem(3); p2(0) = coeffs.Elem(4); p2(1) = coeffs.Elem(5); p2(2) = coeffs.Elem(6); p3(0) = coeffs.Elem(7); p3(1) = coeffs.Elem(8); p3(2) = coeffs.Elem(9); p4(0) = coeffs.Elem(10); p4(1) = coeffs.Elem(11); p4(2) = coeffs.Elem(12); CalcData(); } void Brick :: CalcData() { v12 = p2 - p1; v13 = p3 - p1; v14 = p4 - p1; Point<3> pi[8]; int i1, i2, i3; int i, j; i = 0; for (i3 = 0; i3 <= 1; i3++) for (i2 = 0; i2 <= 1; i2++) for (i1 = 0; i1 <= 1; i1++) { pi[i] = p1 + i1 * v12 + i2 * v13 + i3 * v14; i++; } static int lface[6][4] = { { 1, 3, 2, 4 }, { 5, 6, 7, 8 }, { 1, 2, 5, 6 }, { 3, 7, 4, 8 }, { 1, 5, 3, 7 }, { 2, 4, 6, 8 } }; Array data(6); for (i = 0; i < 6; i++) { const Point<3> lp1 = pi[lface[i][0]-1]; const Point<3> lp2 = pi[lface[i][1]-1]; const Point<3> lp3 = pi[lface[i][2]-1]; Vec<3> n = Cross ((lp2-lp1), (lp3-lp1)); n.Normalize(); for (j = 0; j < 3; j++) { data[j] = lp1(j); data[j+3] = n(j); } faces[i] -> SetPrimitiveData (data); /* { faces.Elem(i+1) -> SetPoints (pi[lface[i][0]-1], pi[lface[i][1]-1], pi[lface[i][2]-1]); } */ } } void Brick :: Reduce (const BoxSphere<3> & box) { double val; // Point<3> p; Point<3> p[8]; for(int j=0;j<8;j++) p[j]=box.GetPointNr(j); for (int i = 0; i < 6; i++) { bool hasout = 0; bool hasin = 0; for (int j = 0; j < 8; j++) { // p = box.GetPointNr (j); val = faces[i]->Plane::CalcFunctionValue (p[j]); if (val > 0) hasout = 1; else if (val < 0) hasin = 1; if (hasout && hasin) break; } surfaceactive[i] = hasout && hasin; } } void Brick :: UnReduce () { for (int i = 0; i < 6; i++) surfaceactive[i] = 1; } OrthoBrick :: OrthoBrick (const Point<3> & ap1, const Point<3> & ap2) : Brick (ap1, Point<3> (ap2(0), ap1(1), ap1(2)), Point<3> (ap1(0), ap2(1), ap1(2)), Point<3> (ap1(0), ap1(1), ap2(2))) { pmin = ap1; pmax = ap2; } INSOLID_TYPE OrthoBrick :: BoxInSolid (const BoxSphere<3> & box) const { if (pmin(0) > box.PMax()(0) || pmin(1) > box.PMax()(1) || pmin(2) > box.PMax()(2) || pmax(0) < box.PMin()(0) || pmax(1) < box.PMin()(1) || pmax(2) < box.PMin()(2)) return IS_OUTSIDE; if (pmin(0) < box.PMin()(0) && pmin(1) < box.PMin()(1) && pmin(2) < box.PMin()(2) && pmax(0) > box.PMax()(0) && pmax(1) > box.PMax()(1) && pmax(2) > box.PMax()(2)) return IS_INSIDE; return DOES_INTERSECT; } void OrthoBrick :: Reduce (const BoxSphere<3> & box) { surfaceactive.Elem(1) = (box.PMin()(2) < pmin(2)) && (pmin(2) < box.PMax()(2)); surfaceactive.Elem(2) = (box.PMin()(2) < pmax(2)) && (pmax(2) < box.PMax()(2)); surfaceactive.Elem(3) = (box.PMin()(1) < pmin(1)) && (pmin(1) < box.PMax()(1)); surfaceactive.Elem(4) = (box.PMin()(1) < pmax(1)) && (pmax(1) < box.PMax()(1)); surfaceactive.Elem(5) = (box.PMin()(0) < pmin(0)) && (pmin(0) < box.PMax()(0)); surfaceactive.Elem(6) = (box.PMin()(0) < pmax(0)) && (pmax(0) < box.PMax()(0)); } } netgen-6.2.1804/libsrc/csg/CMakeLists.txt0000644000175000017500000000267213272137567016606 0ustar kurtkurtadd_definitions(-DNGINTERFACE_EXPORTS) add_library(csg ${NG_LIB_TYPE} algprim.cpp brick.cpp bspline2d.cpp csgeom.cpp csgparser.cpp curve2d.cpp edgeflw.cpp explicitcurve2d.cpp extrusion.cpp gencyl.cpp genmesh.cpp identify.cpp manifold.cpp meshsurf.cpp polyhedra.cpp revolution.cpp singularref.cpp solid.cpp specpoin.cpp spline3d.cpp surface.cpp triapprox.cpp zrefine.cpp python_csg.cpp splinesurface.cpp ) if(APPLE) set_target_properties( csg PROPERTIES SUFFIX ".so") endif(APPLE) if(NOT WIN32) target_link_libraries(csg mesh ${PYTHON_LIBRARIES}) target_link_libraries(csg ${PYTHON_LIBRARIES}) install( TARGETS csg ${NG_INSTALL_DIR}) endif(NOT WIN32) if(USE_GUI) add_library(csgvis ${NG_LIB_TYPE} vscsg.cpp ) if(NOT WIN32) target_link_libraries(csgvis csg visual) if(APPLE) set_target_properties( csgvis PROPERTIES SUFFIX ".so") endif(APPLE) install( TARGETS csgvis ${NG_INSTALL_DIR}) endif(NOT WIN32) endif(USE_GUI) install(FILES algprim.hpp brick.hpp csgeom.hpp csg.hpp csgparser.hpp curve2d.hpp edgeflw.hpp explicitcurve2d.hpp extrusion.hpp gencyl.hpp geoml.hpp identify.hpp manifold.hpp meshsurf.hpp polyhedra.hpp revolution.hpp singularref.hpp solid.hpp specpoin.hpp spline3d.hpp splinesurface.hpp surface.hpp triapprox.hpp vscsg.hpp DESTINATION ${NG_INSTALL_DIR_INCLUDE}/csg COMPONENT netgen_devel ) netgen-6.2.1804/libsrc/csg/python_csg.cpp0000644000175000017500000006671213272137567016734 0ustar kurtkurt#ifdef NG_PYTHON #include <../general/ngpython.hpp> #include using namespace netgen; namespace netgen { extern shared_ptr ng_geometry; } // a shadow solid tree using shared pointers. class SPSolid { shared_ptr s1, s2; Solid * solid; int bc = -1; string bcname = ""; double maxh = -1; string material; bool owner; double red = 0, green = 0, blue = 1; bool transp = false; public: enum optyp { TERM, SECTION, UNION, SUB }; SPSolid (Solid * as) : solid(as), owner(true), op(TERM) { ; } ~SPSolid () { ; // if (owner) delete solid; } SPSolid (optyp aop, shared_ptr as1, shared_ptr as2) : s1(as1), s2(as2), owner(true), op(aop) { if (aop == UNION) solid = new Solid (Solid::UNION, s1->GetSolid(), s2->GetSolid()); else if (aop == SECTION) solid = new Solid (Solid::SECTION, s1->GetSolid(), s2->GetSolid()); else if (aop == SUB) solid = new Solid (Solid::SUB, s1->GetSolid()); // , s2->GetSolid()); } Solid * GetSolid() { return solid; } const Solid * GetSolid() const { return solid; } void GiveUpOwner() { owner = false; if (s1) s1 -> GiveUpOwner(); if (s2) s2 -> GiveUpOwner(); } void AddSurfaces(CSGeometry & geom) { if (op == TERM) geom.AddSurfaces (solid->GetPrimitive()); if (s1) s1 -> AddSurfaces (geom); if (s2) s2 -> AddSurfaces (geom); } void SetMaterial (string mat) { material = mat; } string GetMaterial () { if (!material.empty()) return material; if (s1) { string s1mat = s1->GetMaterial(); if (!s1mat.empty()) return s1mat; } if (s2) { string s2mat = s2->GetMaterial(); if (!s2mat.empty()) return s2mat; } return material; } void SetBC(int abc) { if (bc == -1) { bc = abc; if (s1) s1 -> SetBC(bc); if (s2) s2 -> SetBC(bc); if (op == TERM) { Primitive * prim = solid -> GetPrimitive(); for (int i = 0; i < prim->GetNSurfaces(); i++) prim->GetSurface(i).SetBCProperty (abc); // cout << "set " << prim->GetNSurfaces() << " surfaces to bc " << bc << endl; } } } void SetBCName(string name) { if (bcname == "") { bcname = name; if (s1) s1 -> SetBCName(name); if (s2) s2 -> SetBCName(name); if (op == TERM) { Primitive * prim = solid -> GetPrimitive(); for (int i = 0; i < prim->GetNSurfaces(); i++) prim->GetSurface(i).SetBCName (name); // cout << "set " << prim->GetNSurfaces() << " surfaces to bc " << bc << endl; } } } void SetMaxH(double amaxh) { if (maxh == -1) { maxh = amaxh; if (s1) s1 -> SetMaxH(maxh); if (s2) s2 -> SetMaxH(maxh); if (op == TERM) { Primitive * prim = solid -> GetPrimitive(); for (int i = 0; i < prim->GetNSurfaces(); i++) prim->GetSurface(i).SetMaxH (maxh); } } } void SetColor(double ared, double agreen, double ablue) { red = ared; green = agreen; blue = ablue; } double GetRed() const { return red; } double GetGreen() const { return green; } double GetBlue() const { return blue; } void SetTransparent() { transp = true; } bool IsTransparent() { return transp; } private: optyp op; }; inline ostream & operator<< (ostream & ost, const SPSolid & sol) { ost << *sol.GetSolid(); return ost; } namespace netgen { extern CSGeometry * ParseCSG (istream & istr, CSGeometry *instance=nullptr); } DLL_HEADER void ExportCSG(py::module &m) { py::class_> (m, "SplineCurve2d") .def(py::init<>()) .def ("AddPoint", FunctionPointer ([] (SplineGeometry<2> & self, double x, double y) { self.geompoints.Append (GeomPoint<2> (Point<2> (x,y))); return self.geompoints.Size()-1; })) .def ("AddSegment", FunctionPointer ([] (SplineGeometry<2> & self, int i1, int i2) { self.splines.Append (new LineSeg<2> (self.geompoints[i1], self.geompoints[i2])); })) .def ("AddSegment", FunctionPointer ([] (SplineGeometry<2> & self, int i1, int i2, int i3) { self.splines.Append (new SplineSeg3<2> (self.geompoints[i1], self.geompoints[i2], self.geompoints[i3])); })) ; py::class_,shared_ptr>> (m,"SplineCurve3d") .def(py::init<>()) .def ("AddPoint", FunctionPointer ([] (SplineGeometry<3> & self, double x, double y, double z) { self.geompoints.Append (GeomPoint<3> (Point<3> (x,y,z))); return self.geompoints.Size()-1; })) .def ("AddSegment", FunctionPointer ([] (SplineGeometry<3> & self, int i1, int i2) { self.splines.Append (new LineSeg<3> (self.geompoints[i1], self.geompoints[i2])); })) .def ("AddSegment", FunctionPointer ([] (SplineGeometry<3> & self, int i1, int i2, int i3) { self.splines.Append (new SplineSeg3<3> (self.geompoints[i1], self.geompoints[i2], self.geompoints[i3])); })) ; py::class_> (m, "SplineSurface", "A surface for co dim 2 integrals on the splines") .def("__init__", FunctionPointer ([](SplineSurface* instance, shared_ptr base, py::list cuts) { auto primitive = dynamic_cast (base->GetSolid()->GetPrimitive()); auto acuts = make_shared>>(); for(int i = 0; i> sps(cuts[i]); if(!sps.check()) throw NgException("Cut must be SurfacePrimitive in constructor of SplineSurface!"); auto sp = dynamic_cast(sps()->GetSolid()->GetPrimitive()); if(sp) acuts->Append(shared_ptr(sp)); else throw NgException("Cut must be SurfacePrimitive in constructor of SplineSurface!"); } if(!primitive) throw NgException("Base is not a SurfacePrimitive in constructor of SplineSurface!"); new (instance) SplineSurface(shared_ptr(primitive),acuts); py::object obj = py::cast(instance); }),py::arg("base"), py::arg("cuts")=py::list()) .def("AddPoint", FunctionPointer ([] (SplineSurface & self, double x, double y, double z, bool hpref) { self.AppendPoint(Point<3>(x,y,z),hpref); return self.GetNP()-1; }), py::arg("x"),py::arg("y"),py::arg("z"),py::arg("hpref")=false) .def("AddSegment", FunctionPointer ([] (SplineSurface & self, int i1, int i2, string bcname, double maxh) { auto seg = make_shared>(self.GetPoint(i1),self.GetPoint(i2)); self.AppendSegment(seg,bcname,maxh); }), py::arg("pnt1"),py::arg("pnt2"),py::arg("bcname")="default", py::arg("maxh")=-1.) ; py::class_> (m, "Solid") .def ("__str__", &ToString) .def ("__add__", FunctionPointer( [] ( shared_ptr self, shared_ptr other) { return make_shared (SPSolid::UNION, self, other); })) .def ("__mul__", FunctionPointer( [] ( shared_ptr self, shared_ptr other) { return make_shared (SPSolid::SECTION, self, other); })) .def ("__sub__", FunctionPointer ([] ( shared_ptr self, shared_ptr other) { return make_shared (SPSolid::SECTION, self, make_shared (SPSolid::SUB, other, nullptr)); })) .def ("bc", FunctionPointer([](shared_ptr & self, int nr) -> shared_ptr { self->SetBC(nr); return self; })) .def ("bc", FunctionPointer([](shared_ptr & self, string name) -> shared_ptr { self->SetBCName(name); return self; })) .def ("maxh", FunctionPointer([](shared_ptr & self, double maxh) -> shared_ptr { self->SetMaxH(maxh); return self; })) .def ("mat", FunctionPointer([](shared_ptr & self, string mat) -> shared_ptr { self->SetMaterial(mat); return self; })) .def ("mat", &SPSolid::GetMaterial) .def("col", FunctionPointer([](shared_ptr & self, py::list rgb) -> shared_ptr { py::extract red(rgb[0]); py::extract green(rgb[1]); py::extract blue(rgb[2]); self->SetColor(red(),green(),blue()); return self; })) .def("transp", FunctionPointer([](shared_ptr & self)->shared_ptr < SPSolid > { self->SetTransparent(); return self; })) ; m.def ("Sphere", FunctionPointer([](Point<3> c, double r) { Sphere * sp = new Sphere (c, r); Solid * sol = new Solid (sp); return make_shared (sol); })); m.def ("Ellipsoid", FunctionPointer([](Point<3> m, Vec<3> a, Vec<3> b, Vec<3> c) { Ellipsoid * ell = new Ellipsoid (m, a, b, c); Solid * sol = new Solid (ell); return make_shared (sol); })); m.def ("Plane", FunctionPointer([](Point<3> p, Vec<3> n) { Plane * sp = new Plane (p,n); Solid * sol = new Solid (sp); return make_shared (sol); })); m.def ("Cone", FunctionPointer([](Point<3> a, Point<3> b, double ra, double rb) { Cone * cyl = new Cone (a, b, ra, rb); Solid * sol = new Solid (cyl); return make_shared (sol); })); m.def ("Cylinder", FunctionPointer([](Point<3> a, Point<3> b, double r) { Cylinder * cyl = new Cylinder (a, b, r); Solid * sol = new Solid (cyl); return make_shared (sol); })); m.def ("OrthoBrick", FunctionPointer([](Point<3> p1, Point<3> p2) { OrthoBrick * brick = new OrthoBrick (p1,p2); Solid * sol = new Solid (brick); return make_shared (sol); })); m.def ("Torus", FunctionPointer([](Point<3> c, Vec<3> n, double R, double r) { Torus * torus = new Torus (c,n,R,r); Solid * sol = new Solid (torus); return make_shared (sol); })); m.def ("Revolution", FunctionPointer([](Point<3> p1, Point<3> p2, const SplineGeometry<2> & spline) { Revolution * rev = new Revolution (p1, p2, spline); Solid * sol = new Solid(rev); return make_shared (sol); })); m.def ("Extrusion", FunctionPointer([](const SplineGeometry<3> & path, const SplineGeometry<2> & profile, Vec<3> n) { Extrusion * extr = new Extrusion (path,profile,n); Solid * sol = new Solid(extr); return make_shared (sol); })); m.def("EllipticCone", [](const Point<3>& a, const Vec<3>& v, const Vec<3>& w, double h, double r) { auto ellcone = new EllipticCone(a,v,w,h,r); auto sol = new Solid(ellcone); return make_shared(sol); }, py::arg("a"), py::arg("vl"), py::arg("vs"), py::arg("h"), py::arg("r"), R"raw_string( An elliptic cone, given by the point 'a' at the base of the cone along the main axis, the vectors v and w of the long and short axis of the ellipse, respectively, the height of the cone, h, and ratio of base long axis length to top long axis length, r Note: The elliptic cone has to be truncated by planes similar to a cone or an elliptic cylinder. When r =1, the truncated elliptic cone becomes an elliptic cylinder. When r tends to zero, the truncated elliptic cone tends to a full elliptic cone. However, when r = 0, the top part becomes a point(tip) and meshing fails! )raw_string"); m.def ("Or", FunctionPointer([](shared_ptr s1, shared_ptr s2) { return make_shared (SPSolid::UNION, s1, s2); })); m.def ("And", FunctionPointer([](shared_ptr s1, shared_ptr s2) { return make_shared (SPSolid::SECTION, s1, s2); })); py::class_> (m, "CSGeometry") .def(py::init<>()) .def("__init__", [](CSGeometry *instance, const string & filename) { cout << "load geometry"; ifstream ist(filename); ParseCSG(ist, instance); instance -> FindIdenticSurfaces(1e-8 * instance->MaxSize()); }) .def("__init__", [](CSGeometry *instance, const py::list & solidlist) { cout << "csg from list"; new (instance) CSGeometry(); for (int i = 0; i < len(solidlist); i++) { py::object obj = solidlist[i]; cout << "obj " << i << endl; py::extract> solid(solidlist[i]); if(solid.check()) { cout << "its a solid" << endl; solid()->AddSurfaces (*instance); solid()->GiveUpOwner(); int tlonr = instance->SetTopLevelObject (solid()->GetSolid()); instance->GetTopLevelObject(tlonr) -> SetMaterial(solid()->GetMaterial()); } } instance -> FindIdenticSurfaces(1e-8 * instance->MaxSize()); }) .def("Save", FunctionPointer([] (CSGeometry & self, string filename) { cout << "save geometry to file " << filename << endl; self.Save (filename); })) .def("Add", [] (CSGeometry & self, shared_ptr solid, py::list bcmod, double maxh, py::tuple col, bool transparent, int layer) { solid->AddSurfaces (self); solid->GiveUpOwner(); int tlonr = self.SetTopLevelObject (solid->GetSolid()); self.GetTopLevelObject(tlonr) -> SetMaterial(solid->GetMaterial()); self.GetTopLevelObject(tlonr) -> SetRGB(solid->GetRed(),solid->GetGreen(),solid->GetBlue()); // self.GetTopLevelObject(tlonr)->SetTransparent(solid->IsTransparent()); self.GetTopLevelObject(tlonr)->SetTransparent(transparent); self.GetTopLevelObject(tlonr)->SetMaxH(maxh); self.GetTopLevelObject(tlonr)->SetLayer(layer); // cout << "rgb = " << py::len(rgb) << endl; if (py::len(col)==3) self.GetTopLevelObject(tlonr) -> SetRGB(py::cast(col[0]), py::cast(col[1]), py::cast(col[2])); // bcmod is list of tuples ( solid, bcnr ) for (int i = 0; i < py::len(bcmod); i++) { py::tuple tup = py::extract (bcmod[i]) (); auto mod_solid = py::extract> (tup[0]) (); int mod_nr = -1; string * bcname = nullptr; py::object val = tup[1]; if (py::extract(val).check()) mod_nr = py::extract (val)(); if (py::extract(val).check()) bcname = new string ( py::extract (val)()); Array si; mod_solid -> GetSolid() -> GetSurfaceIndices (si); // cout << "change bc on surfaces: " << si << " to " << mod_nr << endl; for (int j = 0; j < si.Size(); j++) { CSGeometry::BCModification bcm; bcm.bcname = bcname ? new string (*bcname) : nullptr; bcm.tlonr = tlonr; bcm.si = si[j]; bcm.bcnr = mod_nr; self.bcmodifications.Append (bcm); } delete bcname; } return tlonr; }, py::arg("solid"), py::arg("bcmod")=py::list(), py::arg("maxh")=1e99, py::arg("col")=py::tuple(), py::arg("transparent")=false, py::arg("layer")=1 ) .def("AddSurface", FunctionPointer ([] (CSGeometry & self, shared_ptr surface, shared_ptr solid) { solid->AddSurfaces (self); solid->GiveUpOwner(); Surface & surf = surface->GetSolid()->GetPrimitive()->GetSurface(); int tlonr = self.SetTopLevelObject (solid->GetSolid(), &surf); // self.GetTopLevelObject(tlonr) -> SetMaterial(solid->GetMaterial()); self.GetTopLevelObject(tlonr) -> SetBCProp(surf.GetBCProperty()); self.GetTopLevelObject(tlonr) -> SetBCName(surf.GetBCName()); self.GetTopLevelObject(tlonr) -> SetRGB(solid->GetRed(),solid->GetGreen(),solid->GetBlue()); self.GetTopLevelObject(tlonr)->SetTransparent(solid->IsTransparent()); }), py::arg("surface"), py::arg("solid") ) .def("AddSplineSurface", FunctionPointer ([] (CSGeometry & self, shared_ptr surf) { auto cuttings = surf->CreateCuttingSurfaces(); auto spsol = make_shared(new Solid(surf.get())); for(auto cut : (*cuttings)){ spsol = make_shared(SPSolid::SECTION,spsol,make_shared(new Solid(cut.get()))); } spsol->AddSurfaces(self); int tlonr = self.SetTopLevelObject(spsol->GetSolid(), surf.get()); self.GetTopLevelObject(tlonr) -> SetBCProp(surf->GetBase()->GetBCProperty()); self.GetTopLevelObject(tlonr) -> SetBCName(surf->GetBase()->GetBCName()); self.GetTopLevelObject(tlonr) -> SetMaxH(surf->GetBase()->GetMaxH()); for(auto p : surf->GetPoints()) self.AddUserPoint(p); self.AddSplineSurface(surf); }), py::arg("SplineSurface")) .def("SingularEdge", [] (CSGeometry & self, shared_ptr s1,shared_ptr s2, double factor) { auto singedge = new SingularEdge(1, -1, self, s1->GetSolid(), s2->GetSolid(), factor); self.singedges.Append (singedge); }) .def("SingularPoint", [] (CSGeometry & self, shared_ptr s1,shared_ptr s2, shared_ptr s3, double factor) { auto singpoint = new SingularPoint(1, s1->GetSolid(), s2->GetSolid(), s3->GetSolid(), factor); self.singpoints.Append (singpoint); }) .def("CloseSurfaces", FunctionPointer ([] (CSGeometry & self, shared_ptr s1, shared_ptr s2, py::list aslices ) { Array si1, si2; s1->GetSolid()->GetSurfaceIndices (si1); s2->GetSolid()->GetSurfaceIndices (si2); cout << "surface ids1 = " << si1 << endl; cout << "surface ids2 = " << si2 << endl; Flags flags; try { int n = py::len(aslices); Array slices(n); for(int i=0; i(aslices[i])(); } flags.SetFlag("slices", slices); } catch( py::error_already_set const & ) { cout << "caught python error:" << endl; PyErr_Print(); } const TopLevelObject * domain = nullptr; self.AddIdentification (new CloseSurfaceIdentification (self.GetNIdentifications()+1, self, self.GetSurface (si1[0]), self.GetSurface (si2[0]), domain, flags)); }), py::arg("solid1"), py::arg("solid2"), py::arg("slices") ) .def("CloseSurfaces", FunctionPointer ([] (CSGeometry & self, shared_ptr s1, shared_ptr s2, int reflevels, shared_ptr domain_solid) { Array si1, si2; s1->GetSolid()->GetSurfaceIndices (si1); s2->GetSolid()->GetSurfaceIndices (si2); cout << "surface ids1 = " << si1 << endl; cout << "surface ids2 = " << si2 << endl; Flags flags; const TopLevelObject * domain = nullptr; if (domain_solid) domain = self.GetTopLevelObject(domain_solid->GetSolid()); self.AddIdentification (new CloseSurfaceIdentification (self.GetNIdentifications()+1, self, self.GetSurface (si1[0]), self.GetSurface (si2[0]), domain, flags)); }), py::arg("solid1"), py::arg("solid2"), py::arg("reflevels")=2, py::arg("domain")=nullptr ) .def("PeriodicSurfaces", FunctionPointer ([] (CSGeometry & self, shared_ptr s1, shared_ptr s2, Transformation<3> trafo) { Array si1, si2; s1->GetSolid()->GetSurfaceIndices (si1); s2->GetSolid()->GetSurfaceIndices (si2); cout << "identify surfaces " << si1[0] << " and " << si2[0] << endl; self.AddIdentification (new PeriodicIdentification (self.GetNIdentifications()+1, self, self.GetSurface (si1[0]), self.GetSurface (si2[0]), trafo)); }), py::arg("solid1"), py::arg("solid2"), py::arg("trafo")=Transformation<3>(Vec<3>(0,0,0)) ) .def("AddPoint", [] (CSGeometry & self, Point<3> p, int index) -> CSGeometry& { self.AddUserPoint(CSGeometry::UserPoint(p, index)); return self; }) .def("GetTransparent", FunctionPointer ([] (CSGeometry & self, int tlonr) { return self.GetTopLevelObject(tlonr)->GetTransparent(); }), py::arg("tlonr") ) .def("SetTransparent", FunctionPointer ([] (CSGeometry & self, int tlonr, bool transparent) { self.GetTopLevelObject(tlonr)->SetTransparent(transparent); }), py::arg("tlonr"), py::arg("transparent") ) .def("GetVisible", FunctionPointer ([] (CSGeometry & self, int tlonr) { return self.GetTopLevelObject(tlonr)->GetVisible(); }), py::arg("tlonr") ) .def("SetVisible", FunctionPointer ([] (CSGeometry & self, int tlonr, bool visible) { self.GetTopLevelObject(tlonr)->SetVisible(visible); }), py::arg("tlonr"), py::arg("visible") ) .def("SetBoundingBox", FunctionPointer ([] (CSGeometry & self, Point<3> pmin, Point<3> pmax) { self.SetBoundingBox(Box<3> (pmin, pmax)); }), py::arg("pmin"), py::arg("pmax") ) .def("Draw", FunctionPointer ([] (shared_ptr self) { self->FindIdenticSurfaces(1e-6); self->CalcTriangleApproximation(0.01, 20); ng_geometry = self; }) ) .def_property_readonly ("ntlo", &CSGeometry::GetNTopLevelObjects) ; m.def("GenerateMesh", FunctionPointer ([](shared_ptr geo, MeshingParameters & param) { auto dummy = make_shared(); SetGlobalMesh (dummy); dummy->SetGeometry(geo); ng_geometry = geo; geo->FindIdenticSurfaces(1e-8 * geo->MaxSize()); try { geo->GenerateMesh (dummy, param); } catch (NgException ex) { cout << "Caught NgException: " << ex.What() << endl; } return dummy; }),py::call_guard()) ; m.def("Save", FunctionPointer ([](const Mesh & self, const string & filename, const CSGeometry & geom) { ostream * outfile; if (filename.substr (filename.length()-3, 3) == ".gz") outfile = new ogzstream (filename.c_str()); else outfile = new ofstream (filename.c_str()); self.Save (*outfile); *outfile << endl << endl << "endmesh" << endl << endl; geom.SaveToMeshFile (*outfile); delete outfile; }),py::call_guard()) ; m.def("ZRefinement", FunctionPointer ([](Mesh & mesh, CSGeometry & geom) { ZRefinementOptions opt; opt.minref = 5; ZRefinement (mesh, &geom, opt); }),py::call_guard()) ; } PYBIND11_MODULE(libcsg, m) { ExportCSG(m); } #endif netgen-6.2.1804/libsrc/csg/singularref.cpp0000644000175000017500000001205513272137567017067 0ustar kurtkurt#include #include #include #include #include namespace netgen { SingularEdge :: SingularEdge (double abeta, int adomnr, const CSGeometry & ageom, const Solid * asol1, const Solid * asol2, double sf, const double maxh_at_initialization) : domnr(adomnr), geom(ageom) { beta = abeta; maxhinit = maxh_at_initialization; if (beta > 1) { beta = 1; cout << "Warning: beta set to 1" << endl; } if (beta <= 1e-3) { beta = 1e-3; cout << "Warning: beta set to minimal value 0.001" << endl; } sol1 = asol1; sol2 = asol2; factor = sf; } void SingularEdge :: FindPointsOnEdge (class Mesh & mesh) { (*testout) << "find points on edge" << endl; points.SetSize(0); segms.SetSize(0); Array si1, si2; sol1->GetSurfaceIndices (si1); sol2->GetSurfaceIndices (si2); for (int i = 0; i < si1.Size(); i++) si1[i] = geom.GetSurfaceClassRepresentant(si1[i]); for (int i = 0; i < si2.Size(); i++) si2[i] = geom.GetSurfaceClassRepresentant(si2[i]); for (SegmentIndex si = 0; si < mesh.GetNSeg(); si++) { INDEX_2 i2 (mesh[si][0], mesh[si][1]); /* bool onedge = 1; for (j = 1; j <= 2; j++) { const Point<3> p = mesh[ PointIndex (i2.I(j)) ]; if (sol1->IsIn (p, 1e-3) && sol2->IsIn(p, 1e-3) && !sol1->IsStrictIn (p, 1e-3) && !sol2->IsStrictIn(p, 1e-3)) { ; } else onedge = 0; } */ if (domnr != -1 && domnr != mesh[si].domin && domnr != mesh[si].domout) continue; /* bool onedge = 1; for (int j = 0; j < 2; j++) { int surfi = (j == 0) ? mesh[si].surfnr1 : mesh[si].surfnr2; surfi = geom.GetSurfaceClassRepresentant(surfi); if (!si1.Contains(surfi) && !si2.Contains(surfi)) onedge = 0; } */ int surfi1 = geom.GetSurfaceClassRepresentant(mesh[si].surfnr1); int surfi2 = geom.GetSurfaceClassRepresentant(mesh[si].surfnr2); if ( (si1.Contains(surfi1) && si2.Contains(surfi2)) || (si1.Contains(surfi2) && si2.Contains(surfi1)) ) // if (onedge) { segms.Append (i2); // PrintMessage (5, "sing segment ", i2.I1(), " - ", i2.I2()); points.Append (mesh[ PointIndex (i2.I1())]); points.Append (mesh[ PointIndex (i2.I2())]); mesh[si].singedge_left = factor; mesh[si].singedge_right = factor; } } /* (*testout) << "Singular edge points:" << endl; for (int i = 0; i < points.Size(); i++) (*testout) << points[i] << endl; */ } void SingularEdge :: SetMeshSize (class Mesh & mesh, double globalh) { double hloc = pow (globalh, 1/beta); if(maxhinit > 0 && maxhinit < hloc) { hloc = maxhinit; if(points.Size() > 1) { for (int i = 0; i < points.Size()-1; i++) mesh.RestrictLocalHLine(points[i],points[i+1],hloc); } else { for (int i = 0; i < points.Size(); i++) mesh.RestrictLocalH (points[i], hloc); } } else { for (int i = 0; i < points.Size(); i++) mesh.RestrictLocalH (points[i], hloc); } } SingularPoint :: SingularPoint (double abeta, const Solid * asol1, const Solid * asol2, const Solid * asol3, double sf) { beta = abeta; sol1 = asol1; sol2 = asol2; sol3 = asol3; factor = sf; } void SingularPoint :: FindPoints (class Mesh & mesh) { points.SetSize(0); Array surfk, surf; for (PointIndex pi = PointIndex::BASE; pi < mesh.GetNP()+PointIndex::BASE; pi++) { if (mesh[pi].Type() != FIXEDPOINT) continue; const Point<3> p = mesh[pi]; (*testout) << "check singular point" << p << endl; if (sol1->IsIn (p) && sol2->IsIn(p) && sol3->IsIn(p) && !sol1->IsStrictIn (p) && !sol2->IsStrictIn(p) && !sol3->IsStrictIn(p)) { surf.SetSize (0); for (int k = 1; k <= 3; k++) { const Solid * solk(NULL); Solid *tansol; switch (k) { case 1: solk = sol1; break; case 2: solk = sol2; break; case 3: solk = sol3; break; } solk -> TangentialSolid (p, tansol, surfk, 1e-3); (*testout) << "Tansol = " << *tansol << endl; if (!tansol) continue; ReducePrimitiveIterator rpi(Box<3> (p-Vec<3> (1e-3,1e-3,1e-3), p+Vec<3> (1e-3,1e-3,1e-3))); UnReducePrimitiveIterator urpi; tansol -> IterateSolid (rpi); tansol->GetSurfaceIndices (surfk); tansol -> IterateSolid (urpi); (*testout) << "surfinds = " << surfk << endl; for (int i = 0; i < surfk.Size(); i++) if (!surf.Contains (surfk[i])) surf.Append (surfk[i]); delete tansol; } if (surf.Size() < 3) continue; points.Append (p); PrintMessage (5, "Point (", p(0), ", ", p(1), ", ", p(2), ") is singular"); mesh[pi].Singularity(factor); } } } void SingularPoint :: SetMeshSize (class Mesh & mesh, double globalh) { double hloc = pow (globalh, 1/beta); for (int i = 1; i <= points.Size(); i++) mesh.RestrictLocalH (points.Get(i), hloc); } } netgen-6.2.1804/libsrc/csg/csgpkg.cpp0000644000175000017500000004326313272137567016031 0ustar kurtkurt#include #include #include #include #include #include #include "vscsg.hpp" extern "C" int Ng_CSG_Init (Tcl_Interp * interp); namespace netgen { // extern DLL_HEADER NetgenGeometry * ng_geometry; extern DLL_HEADER shared_ptr ng_geometry; extern DLL_HEADER shared_ptr mesh; static VisualSceneGeometry vsgeom; char * err_needscsgeometry = (char*) "This operation needs an CSG geometry"; char * err_needsmesh = (char*) "This operation needs a mesh"; char * err_jobrunning = (char*) "Meshing Job already running"; int Ng_ParseGeometry (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { CSGeometry * csgeom = dynamic_cast (ng_geometry.get()); if (csgeom) { double detail = atof (Tcl_GetVar (interp, "::geooptions.detail", 0)); double facets = atof (Tcl_GetVar (interp, "::geooptions.facets", 0)); if (atoi (Tcl_GetVar (interp, "::geooptions.drawcsg", 0))) csgeom->CalcTriangleApproximation(detail, facets); } return TCL_OK; } int Ng_GeometryOptions (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { CSGeometry * geometry = dynamic_cast (ng_geometry.get()); const char * command = argv[1]; if (strcmp (command, "get") == 0) { if (geometry) { char buf[20]; Point3d pmin = geometry->BoundingBox ().PMin(); Point3d pmax = geometry->BoundingBox ().PMax(); sprintf (buf, "%5.1lf", pmin.X()); Tcl_SetVar (interp, "::geooptions.minx", buf, 0); sprintf (buf, "%5.1lf", pmin.Y()); Tcl_SetVar (interp, "::geooptions.miny", buf, 0); sprintf (buf, "%5.1lf", pmin.Z()); Tcl_SetVar (interp, "::geooptions.minz", buf, 0); sprintf (buf, "%5.1lf", pmax.X()); Tcl_SetVar (interp, "::geooptions.maxx", buf, 0); sprintf (buf, "%5.1lf", pmax.Y()); Tcl_SetVar (interp, "::geooptions.maxy", buf, 0); sprintf (buf, "%5.1lf", pmax.Z()); Tcl_SetVar (interp, "::geooptions.maxz", buf, 0); } } else if (strcmp (command, "set") == 0) { Point<3> pmin (atof (Tcl_GetVar (interp, "::geooptions.minx", 0)), atof (Tcl_GetVar (interp, "::geooptions.miny", 0)), atof (Tcl_GetVar (interp, "::geooptions.minz", 0))); Point<3> pmax (atof (Tcl_GetVar (interp, "::geooptions.maxx", 0)), atof (Tcl_GetVar (interp, "::geooptions.maxy", 0)), atof (Tcl_GetVar (interp, "::geooptions.maxz", 0))); Box<3> box (pmin, pmax); if (geometry) geometry -> SetBoundingBox (box); CSGeometry::SetDefaultBoundingBox (box); } return TCL_OK; } // attempt of a simple modeller int Ng_CreatePrimitive (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) {/* CSGeometry * geometry = dynamic_cast (ng_geometry.get()); if (!geometry) { Tcl_SetResult (interp, err_needscsgeometry, TCL_STATIC); return TCL_ERROR; } tcl_const char * classname = argv[1]; tcl_const char * name = argv[2]; cout << "Create primitive, class = " << classname << ", name = " << name << endl; Primitive * nprim = Primitive::CreatePrimitive (classname); Solid * nsol = new Solid (nprim); char sname[100]; for (int j = 1; j <= nprim->GetNSurfaces(); j++) { sprintf (sname, "%s,%d", name, j); geometry -> AddSurface (sname, &nprim->GetSurface(j)); nprim -> SetSurfaceId (j, geometry->GetNSurf()); } geometry->SetSolid (name, nsol); */ return TCL_OK; } int Ng_SetPrimitiveData (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { CSGeometry * geometry = dynamic_cast (ng_geometry.get()); if (!geometry) { Tcl_SetResult (interp, err_needscsgeometry, TCL_STATIC); return TCL_ERROR; } tcl_const char * name = argv[1]; tcl_const char * value = argv[2]; Array coeffs; cout << "Set primitive data, name = " << name << ", value = " << value << endl; istringstream vst (value); double val; while (!vst.eof()) { vst >> val; coeffs.Append (val); } ((Primitive*) geometry->GetSolid (name)->GetPrimitive())->SetPrimitiveData (coeffs); return TCL_OK; } int Ng_SetSolidData (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) {/* CSGeometry * geometry = dynamic_cast (ng_geometry.get()); if (!geometry) { Tcl_SetResult (interp, err_needscsgeometry, TCL_STATIC); return TCL_ERROR; } tcl_const char * name = argv[1]; tcl_const char * val = argv[2]; cout << "Set Solid Data, name = " << name << ", value = " << val << endl; istringstream vst (val); Solid * nsol = Solid::CreateSolid (vst, geometry->GetSolids()); geometry->SetSolid (name, nsol); */ return TCL_OK; } int Ng_GetPrimitiveData (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { CSGeometry * geometry = dynamic_cast (ng_geometry.get()); if (!geometry) { Tcl_SetResult (interp, err_needscsgeometry, TCL_STATIC); return TCL_ERROR; } tcl_const char * name = argv[1]; tcl_const char * classnamevar = argv[2]; tcl_const char * valuevar = argv[3]; const char * classname; Array coeffs; geometry->GetSolid (name)->GetPrimitive()->GetPrimitiveData (classname, coeffs); ostringstream vst; for (int i = 1; i <= coeffs.Size(); i++) vst << coeffs.Get(i) << " "; cout << "GetPrimitiveData, name = " << name << ", classnamevar = " << classnamevar << ", classname = " << classname << endl << " valuevar = " << valuevar << ", values = " << vst.str() << endl; Tcl_SetVar (interp, classnamevar, (char*)classname, 0); Tcl_SetVar (interp, valuevar, (char*)vst.str().c_str(), 0); return TCL_OK; } int Ng_GetSolidData (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) {/* CSGeometry * geometry = dynamic_cast (ng_geometry.get()); if (!geometry) { Tcl_SetResult (interp, err_needscsgeometry, TCL_STATIC); return TCL_ERROR; } tcl_const char * name = argv[1]; tcl_const char * valuevar = argv[2]; ostringstream vst; const Solid * sol = geometry->GetSolid (name); sol->GetSolidData (vst); cout << "GetSolidData, name = " << name << ", data = " << vst.str() << endl; Tcl_SetVar (interp, valuevar, (char*)vst.str().c_str(), 0); */ return TCL_OK; } int Ng_GetPrimitiveList (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { CSGeometry * geometry = dynamic_cast (ng_geometry.get()); if (!geometry) { Tcl_SetResult (interp, err_needscsgeometry, TCL_STATIC); return TCL_ERROR; } tcl_const char * valuevar = argv[1]; int i; stringstream vst; for (i = 1; i <= geometry->GetNSolids(); i++) { const Solid * sol = geometry->GetSolid(i); if (sol->GetPrimitive()) vst << sol->Name() << " "; } cout << "primnames = " << vst.str() << endl; Tcl_SetVar (interp, valuevar, (char*)vst.str().c_str(), 0); return TCL_OK; } int Ng_GetSurfaceList (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { CSGeometry * geometry = dynamic_cast (ng_geometry.get()); if (!geometry) { Tcl_SetResult (interp, err_needscsgeometry, TCL_STATIC); return TCL_ERROR; } tcl_const char * valuevar = argv[1]; int i; stringstream vst; for (i = 1; i <= geometry->GetNSurf(); i++) { const Surface * surf = geometry->GetSurface(i); vst << surf->Name() << " "; } cout << "surfnames = " << vst.str() << endl; Tcl_SetVar (interp, valuevar, (char*)vst.str().c_str(), 0); return TCL_OK; } int Ng_GetSolidList (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { CSGeometry * geometry = dynamic_cast (ng_geometry.get()); if (!geometry) { Tcl_SetResult (interp, err_needscsgeometry, TCL_STATIC); return TCL_ERROR; } tcl_const char * valuevar = argv[1]; int i; stringstream vst; for (i = 1; i <= geometry->GetNSolids(); i++) { const Solid * sol = geometry->GetSolid(i); if (!sol->GetPrimitive()) vst << sol->Name() << " "; } cout << "solnames = " << vst.str() << endl; Tcl_SetVar (interp, valuevar, (char*)vst.str().c_str(), 0); return TCL_OK; } int Ng_TopLevel (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { CSGeometry * geometry = dynamic_cast (ng_geometry.get()); if (!geometry) { Tcl_SetResult (interp, err_needscsgeometry, TCL_STATIC); return TCL_ERROR; } int i; /* for (i = 0; i < argc; i++) cout << argv[i] << ", "; cout << endl; */ if (strcmp (argv[1], "getlist") == 0) { stringstream vst; for (i = 0; i < geometry->GetNTopLevelObjects(); i++) { const Solid * sol; const Surface * surf; geometry->GetTopLevelObject (i, sol, surf); if (!surf) vst << "{ " << sol->Name() << " } "; else vst << "{ " << sol->Name() << " " << surf->Name() << " } "; } tcl_const char * valuevar = argv[2]; Tcl_SetVar (interp, valuevar, (char*)vst.str().c_str(), 0); } if (strcmp (argv[1], "set") == 0) { tcl_const char * solname = argv[2]; tcl_const char * surfname = argv[3]; Solid * sol = (Solid*)geometry->GetSolid (solname); Surface * surf = (Surface*)geometry->GetSurface (surfname); geometry->SetTopLevelObject (sol, surf); } if (strcmp (argv[1], "remove") == 0) { tcl_const char * solname = argv[2]; tcl_const char * surfname = argv[3]; Solid * sol = (Solid*)geometry->GetSolid (solname); Surface * surf = (Surface*)geometry->GetSurface (surfname); geometry->RemoveTopLevelObject (sol, surf); } if (strcmp (argv[1], "setprop") == 0) { tcl_const char * solname = argv[2]; tcl_const char * surfname = argv[3]; tcl_const char * propvar = argv[4]; Solid * sol = (Solid*)geometry->GetSolid (solname); Surface * surf = (Surface*)geometry->GetSurface (surfname); TopLevelObject * tlo = geometry->GetTopLevelObject (sol, surf); if (!tlo) return TCL_OK; char varname[50]; sprintf (varname, "%s(red)", propvar); double red = atof (Tcl_GetVar (interp, varname, 0)); sprintf (varname, "%s(blue)", propvar); double blue = atof (Tcl_GetVar (interp, varname, 0)); sprintf (varname, "%s(green)", propvar); double green = atof (Tcl_GetVar (interp, varname, 0)); tlo -> SetRGB (red, green, blue); sprintf (varname, "%s(visible)", propvar); tlo -> SetVisible (bool(atoi (Tcl_GetVar (interp, varname, 0)))); sprintf (varname, "%s(transp)", propvar); tlo -> SetTransparent (bool(atoi (Tcl_GetVar (interp, varname, 0)))); } if (strcmp (argv[1], "getprop") == 0) { tcl_const char * solname = argv[2]; tcl_const char * surfname = argv[3]; tcl_const char * propvar = argv[4]; Solid * sol = (Solid*)geometry->GetSolid (solname); Surface * surf = (Surface*)geometry->GetSurface (surfname); TopLevelObject * tlo = geometry->GetTopLevelObject (sol, surf); if (!tlo) return TCL_OK; char varname[50], varval[10]; sprintf (varname, "%s(red)", propvar); sprintf (varval, "%lf", tlo->GetRed()); Tcl_SetVar (interp, varname, varval, 0); sprintf (varname, "%s(green)", propvar); sprintf (varval, "%lf", tlo->GetGreen()); Tcl_SetVar (interp, varname, varval, 0); sprintf (varname, "%s(blue)", propvar); sprintf (varval, "%lf", tlo->GetBlue()); Tcl_SetVar (interp, varname, varval, 0); sprintf (varname, "%s(visible)", propvar); sprintf (varval, "%d", tlo->GetVisible()); Tcl_SetVar (interp, varname, varval, 0); sprintf (varname, "%s(transp)", propvar); sprintf (varval, "%d", tlo->GetTransparent()); Tcl_SetVar (interp, varname, varval, 0); } return TCL_OK; } int Ng_SingularEdgeMS (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { CSGeometry * geometry = dynamic_cast (ng_geometry.get()); if (!geometry) { Tcl_SetResult (interp, err_needscsgeometry, TCL_STATIC); return TCL_ERROR; } if (!mesh) { Tcl_SetResult (interp, err_needsmesh, TCL_STATIC); return TCL_ERROR; } if (multithread.running) { Tcl_SetResult (interp, err_jobrunning, TCL_STATIC); return TCL_ERROR; } // double globh = mparam.maxh; for (int i = 1; i <= geometry->singedges.Size(); i++) geometry->singedges.Get(i)->SetMeshSize (*mesh, 1e99 /* globh*/); return TCL_OK; } int Ng_SingularPointMS (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { CSGeometry * geometry = dynamic_cast (ng_geometry.get()); if (!geometry) { Tcl_SetResult (interp, err_needscsgeometry, TCL_STATIC); return TCL_ERROR; } // double globh = mparam.maxh; for (int i = 1; i <= geometry->singpoints.Size(); i++) geometry->singpoints.Get(i)->SetMeshSize (*mesh, 1e99 /* globh */ ); return TCL_OK; } int Ng_SelectSurface (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { int surfnr = atoi (argv[1]); vsgeom.SelectSurface (surfnr); return TCL_OK; } /* class CSGeometryRegister : public GeometryRegister { public: virtual NetgenGeometry * Load (string filename) const; virtual NetgenGeometry * LoadFromMeshFile (istream & ist) const; virtual VisualScene * GetVisualScene (const NetgenGeometry * geom) const; }; extern CSGeometry * ParseCSG (istream & istr); NetgenGeometry * CSGeometryRegister :: Load (string filename) const { const char * cfilename = filename.c_str(); if (strcmp (&cfilename[strlen(cfilename)-3], "geo") == 0) { PrintMessage (1, "Load CSG geometry file ", cfilename); ifstream infile(cfilename); CSGeometry * hgeom = ParseCSG (infile); if (!hgeom) throw NgException ("geo-file should start with 'algebraic3d'"); hgeom -> FindIdenticSurfaces(1e-8 * hgeom->MaxSize()); return hgeom; } if (strcmp (&cfilename[strlen(cfilename)-3], "ngg") == 0) { PrintMessage (1, "Load new CSG geometry file ", cfilename); ifstream infile(cfilename); CSGeometry * hgeom = new CSGeometry(""); hgeom -> Load (infile); return hgeom; } return NULL; } NetgenGeometry * CSGeometryRegister :: LoadFromMeshFile (istream & ist) const { string auxstring; if (ist.good()) { ist >> auxstring; if (auxstring == "csgsurfaces") { CSGeometry * geometry = new CSGeometry (""); geometry -> LoadSurfaces(ist); return geometry; } // else // ist.putback (auxstring); } return NULL; } VisualScene * CSGeometryRegister :: GetVisualScene (const NetgenGeometry * geom) const { CSGeometry * geometry = dynamic_cast (ng_geometry.get()); if (geometry) { vsgeom.SetGeometry (geometry); return &vsgeom; } return NULL; } */ class CSGeometryVisRegister : public GeometryRegister { public: virtual NetgenGeometry * Load (string filename) const { return NULL; } virtual VisualScene * GetVisualScene (const NetgenGeometry * geom) const; }; VisualScene * CSGeometryVisRegister :: GetVisualScene (const NetgenGeometry * geom) const { const CSGeometry * geometry = dynamic_cast (geom); if (geometry) { vsgeom.SetGeometry (const_cast(geometry)); return &vsgeom; } return NULL; } } using namespace netgen; int Ng_CSG_Init (Tcl_Interp * interp) { geometryregister.Append (new CSGeometryVisRegister); if (interp == NULL) return TCL_OK; Tcl_CreateCommand (interp, "Ng_ParseGeometry", Ng_ParseGeometry, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); // geometry Tcl_CreateCommand (interp, "Ng_CreatePrimitive", Ng_CreatePrimitive, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_SetPrimitiveData", Ng_SetPrimitiveData, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_GetPrimitiveData", Ng_GetPrimitiveData, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_GetPrimitiveList", Ng_GetPrimitiveList, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_GetSurfaceList", Ng_GetSurfaceList, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_SetSolidData", Ng_SetSolidData, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_GetSolidData", Ng_GetSolidData, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_GetSolidList", Ng_GetSolidList, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_TopLevel", Ng_TopLevel, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_GeometryOptions", Ng_GeometryOptions, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_SingularEdgeMS", Ng_SingularEdgeMS, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_SingularPointMS", Ng_SingularPointMS, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_SelectSurface", Ng_SelectSurface, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); return TCL_OK; } netgen-6.2.1804/libsrc/csg/curve2d.cpp0000644000175000017500000000272613272137567016124 0ustar kurtkurt#include #include #include namespace netgen { CircleCurve2d :: CircleCurve2d (const Point<2> & acenter, double arad) { center = acenter; rad = arad; } void CircleCurve2d :: Project (Point<2> & p) const { Vec<2> v = p - center; v *= rad/v.Length(); p = center + v; } void CircleCurve2d :: NormalVector (const Point<2> & p, Vec<2> & n) const { n = p - center; n /= n.Length(); } QuadraticCurve2d :: QuadraticCurve2d () { cxx = cyy = cxy = cx = cy = c = 0; } void QuadraticCurve2d :: Read (istream & ist) { ist >> cxx >> cyy >> cxy >> cx >> cy >> c; } void QuadraticCurve2d :: Project (Point<2> & p) const { double f, x, y, gradx, grady, grad2; int its = 0; x = p(0); y = p(1); do { f = cxx * x * x + cyy * y * y + cxy * x * y + cx * x + cy * y + c; gradx = 2 * cxx * x + cxy * y + cx; grady = 2 * cyy * y + cxy * x + cy; grad2 = gradx * gradx + grady * grady; x -= f * gradx / grad2; y -= f * grady / grad2; // (*mycout) << "x = " << x << " y = " << y << " f = " << f << endl; its++; } while (fabs (f) > 1e-8 && its < 20); if (its >= 20) cerr << "QuadraticCurve2d::Project: many iterations, f = " << f << endl; p(0) = x; p(1) = y; } void QuadraticCurve2d :: NormalVector (const Point<2> & p, Vec<2> & n) const { n(0) = 2 * cxx * p(0) + cxy * p(1) + cx; n(1) = 2 * cyy * p(1) + cxy * p(0) + cy; n.Normalize(); } } netgen-6.2.1804/libsrc/csg/explicitcurve2d.hpp0000644000175000017500000000510713272137567017667 0ustar kurtkurt#ifndef FILE_EXPLICITCURVE2D #define FILE_EXPLICITCURVE2D /**************************************************************************/ /* File: explicitcurve2d.hh */ /* Author: Joachim Schoeberl */ /* Date: 14. Oct. 96 */ /**************************************************************************/ namespace netgen { /* Explicit 2D Curve repesentation */ /// class ExplicitCurve2d : public Curve2d { public: /// ExplicitCurve2d (); /// virtual void Project (Point<2> & p) const; /// virtual double ProjectParam (const Point<2> & p) const = 0; /// virtual double NumericalProjectParam (const Point<2> & p, double lb, double ub) const; /// virtual double MinParam () const = 0; /// virtual double MaxParam () const = 0; /// virtual Point<2> Eval (double t) const = 0; /// virtual Vec<2> EvalPrime (double t) const = 0; /// virtual Vec<2> Normal (double t) const; /// virtual void NormalVector (const Point<2> & p, Vec<2> & n) const; /// virtual Vec<2> EvalPrimePrime (double t) const = 0; /// virtual double MaxCurvature () const; /// virtual double MaxCurvatureLoc (const Point<2> & p, double rad) const; /// virtual Point<2> CurvCircle (double t) const; /// virtual void Print (ostream & /* str */) const { }; /// virtual int SectionUsed (double /* t */) const { return 1; } /// virtual void Reduce (const Point<2> & /* p */, double /* rad */) { }; /// virtual void UnReduce () { }; }; /// class BSplineCurve2d : public ExplicitCurve2d { /// Array > points; /// Array intervallused; /// int redlevel; public: /// BSplineCurve2d (); /// void AddPoint (const Point<2> & apoint); bool Inside (const Point<2> & p, double & dist) const; /// virtual double ProjectParam (const Point<2> & p) const; /// virtual double MinParam () const { return 0; } /// virtual double MaxParam () const { return points.Size(); } /// virtual Point<2> Eval (double t) const; /// virtual Vec<2> EvalPrime (double t) const; /// virtual Vec<2> EvalPrimePrime (double t) const; /// virtual void Print (ostream & str) const; /// virtual int SectionUsed (double t) const; /// virtual void Reduce (const Point<2> & p, double rad); /// virtual void UnReduce (); }; } #endif netgen-6.2.1804/libsrc/csg/gencyl.cpp0000644000175000017500000001032213272137567016022 0ustar kurtkurt#include #include namespace netgen { GeneralizedCylinder :: GeneralizedCylinder (ExplicitCurve2d & acrosssection, Point<3> ap, Vec<3> ae1, Vec<3> ae2) : crosssection(acrosssection) { planep = ap; planee1 = ae1; planee2 = ae2; planee3 = Cross (planee1, planee2); (*testout) << "Vecs = " << planee1 << " " << planee2 << " " << planee3 << endl; }; void GeneralizedCylinder :: Project (Point<3> & p) const { Point<2> p2d; double z; p2d = Point<2> (planee1 * (p - planep), planee2 * (p - planep)); z = planee3 * (p - planep); crosssection.Project (p2d); p = planep + p2d(0) * planee1 + p2d(1) * planee2 + z * planee3; } int GeneralizedCylinder ::BoxInSolid (const BoxSphere<3> & box) const { Point<3> p3d; Point<2> p2d, projp; double t; Vec<2> tan, n; p3d = box.Center(); p2d = Point<2> (planee1 * (p3d - planep), planee2 * (p3d - planep)); t = crosssection.ProjectParam (p2d); projp = crosssection.Eval (t); tan = crosssection.EvalPrime (t); n(0) = tan(1); n(1) = -tan(0); if (Dist (p2d, projp) < box.Diam()/2) return 2; if (n * (p2d - projp) > 0) { return 0; } return 1; } double GeneralizedCylinder :: CalcFunctionValue (const Point<3> & point) const { Point<2> p2d, projp; double t; Vec<2> tan, n; p2d = Point<2> (planee1 * (point - planep), planee2 * (point - planep)); t = crosssection.ProjectParam (p2d); projp = crosssection.Eval (t); tan = crosssection.EvalPrime (t); n(0) = tan(1); n(1) = -tan(0); n /= n.Length(); return n * (p2d - projp); } void GeneralizedCylinder :: CalcGradient (const Point<3> & point, Vec<3> & grad) const { Point<2> p2d, projp; double t; Vec<2> tan, n; p2d = Point<2> (planee1 * (point - planep), planee2 * (point - planep)); t = crosssection.ProjectParam (p2d); projp = crosssection.Eval (t); tan = crosssection.EvalPrime (t); n(0) = tan(1); n(1) = -tan(0); n /= n.Length(); grad = n(0) * planee1 + n(1) * planee2; } void GeneralizedCylinder :: CalcHesse (const Point<3> & point, Mat<3> & hesse) const { Point<2> p2d, projp; double t, dist, val; Point<2> curvp; Vec<2> curvpp; Mat<2> h2d; Mat<3,2> vmat; int i, j, k, l; p2d = Point<2> (planee1 * (point - planep), planee2 * (point - planep)); t = crosssection.ProjectParam (p2d); curvp = crosssection.CurvCircle (t); curvpp = p2d-curvp; dist = curvpp.Length(); curvpp /= dist; h2d(0, 0) = (1 - curvpp(0) * curvpp(0) ) / dist; h2d(0, 1) = h2d(1, 0) = (- curvpp(0) * curvpp(1) ) / dist; h2d(1, 1) = (1 - curvpp(1) * curvpp(1) ) / dist; vmat(0,0) = planee1(0); vmat(1,0) = planee1(1); vmat(2,0) = planee1(2); vmat(0,1) = planee2(0); vmat(1,1) = planee2(1); vmat(2,1) = planee2(2); for (i = 0; i < 3; i++) for (j = 0; j < 3; j++) { val = 0; for (k = 0; k < 2; k++) for (l = 0; l < 2; l++) val += vmat(i,k) * h2d(k,l) * vmat(j,l); hesse(i,j) = val; } } double GeneralizedCylinder :: HesseNorm () const { return crosssection.MaxCurvature(); } double GeneralizedCylinder :: MaxCurvatureLoc (const Point<3> & c, double rad) const { Point<2> c2d = Point<2> (planee1 * (c - planep), planee2 * (c - planep)); return crosssection.MaxCurvatureLoc(c2d, rad); } Point<3> GeneralizedCylinder :: GetSurfacePoint () const { Point<2> p2d; p2d = crosssection.Eval(0); return planep + p2d(0) * planee1 + p2d(1) * planee2; } void GeneralizedCylinder :: Reduce (const BoxSphere<3> & box) { Point<2> c2d = Point<2> (planee1 * (box.Center() - planep), planee2 * (box.Center() - planep)); crosssection.Reduce (c2d, box.Diam()/2); } void GeneralizedCylinder :: UnReduce () { crosssection.UnReduce (); } void GeneralizedCylinder :: Print (ostream & str) const { str << "Generalized Cylinder" << endl; crosssection.Print (str); } } netgen-6.2.1804/libsrc/csg/specpoin.hpp0000644000175000017500000001103413272137567016367 0ustar kurtkurt#ifndef FILE_SPECPOIN #define FILE_SPECPOIN /**************************************************************************/ /* File: specpoin.hpp */ /* Author: Joachim Schoeberl */ /* Date: 01. Okt. 95 */ /**************************************************************************/ namespace netgen { // extern DLL_HEADER MeshingParameters mparam; /* Special Point Calculation */ class Surface; class Solid; /// Special point. class SpecialPoint { public: /// coordinates Point<3> p; /// tangential to edge Vec<3> v; /// int layer; /// point must be used in mesh bool unconditional; /// surfaces defining edge int s1, s2; /// if s1 and s2 are only representatives, then these are the original indices int s1_orig, s2_orig; int nr; /// SpecialPoint () : p(0,0,0), v(0,0,0), layer(0), unconditional(0), s1(0), s2(0), s1_orig(0), s2_orig(0) { ; } /// SpecialPoint (const SpecialPoint & sp2); /// SpecialPoint & operator= (const SpecialPoint & sp2); /// void Print (ostream & str) const; int GetLayer() const { return layer; } /// bool HasSurfaces (int as1, int as2) const { return ( (s1 == as1 && s2 == as2) || (s1 == as2 && s2 == as1) ); } }; inline ostream & operator<< (ostream & ost, const SpecialPoint & sp) { sp.Print (ost); return ost; } /// class SpecialPointCalculation { private: /// const CSGeometry * geometry; /// Array * points; /// Array boxesinlevel; /// double size; /// double relydegtest; // maximal dimension of bisection intervall for /// test of degeneration parameters double cpeps1, epeps1, epeps2, epspointdist2; double ideps; public: /// SpecialPointCalculation (); /// void SetIdEps(const double epsin) {ideps = epsin;} /// void CalcSpecialPoints (const CSGeometry & ageometry, Array & points); /// void AnalyzeSpecialPoints (const CSGeometry & geometry, Array & points, Array & specpoints); protected: /// void CalcSpecialPointsRec (const Solid * sol, int layer, const BoxSphere<3> & box, int level, bool calccp, bool calcep); /// bool CrossPointNewtonConvergence (const Surface * f1, const Surface * f2, const Surface * f3, const BoxSphere<3> & box); /// bool CrossPointDegenerated (const Surface * f1, const Surface * f2, const Surface * f3, const BoxSphere<3> & box) const; /// void CrossPointNewton (const Surface * f1, const Surface * f2, const Surface * f3, Point<3> & p); bool EdgeNewtonConvergence (const Surface * f1, const Surface * f2, const Point<3> & p); /// bool EdgeDegenerated (const Surface * f1, const Surface * f2, const BoxSphere<3> & box) const; /// void EdgeNewton (const Surface * f1, const Surface * f2, Point<3> & p); /// bool IsEdgeExtremalPoint (const Surface * f1, const Surface * f2, const Point<3> & p, Point<3> & pp, double rad); /* /// bool ExtremalPointPossible (const Surface * f1, const Surface * f2, int dir, const BoxSphere<3> & box); /// bool ExtremalPointDegenerated (const Surface * f1, const Surface * f2, int dir, const BoxSphere<3> & box); /// bool ExtremalPointNewtonConvergence (const Surface * f1, const Surface * f2, int dir, const BoxSphere<3> & box); */ /// void ExtremalPointNewton (const Surface * f1, const Surface * f2, int dir, Point<3> & p); /// bool AddPoint (const Point<3> & p, int layer); void ComputeExtremalPoints (const Plane * plane, const QuadraticSurface * quadric, Array > & pts); void ComputeExtremalPoints (const Sphere * sphere1, const Sphere * sphere2, Array > & pts); void ComputeCrossPoints (const Plane * plane1, const Plane * plane2, const Plane * plane3, Array > & pts); void ComputeCrossPoints (const Plane * plane1, const Plane * plane2, const QuadraticSurface * quadratic, Array > & pts); void ComputeCrossPoints (const Sphere * sphere1, const Sphere * sphere2, const Sphere * sphere3, Array > & pts); }; } #endif netgen-6.2.1804/libsrc/geom2d/0000755000175000017500000000000013272137567014440 5ustar kurtkurtnetgen-6.2.1804/libsrc/geom2d/vsgeom2d.hpp0000644000175000017500000000150313272137567016676 0ustar kurtkurt#ifndef FILE_VSGEOM2D #define FILE_VSGEOM2D /**************************************************************************/ /* File: vsgeom2d.hpp */ /* Author: Joachim Schoeberl */ /* Date: 05. Jan. 2011 */ /**************************************************************************/ namespace netgen { class DLL_HEADER VisualSceneGeometry2d : public VisualScene { const class SplineGeometry2d * geometry2d; public: VisualSceneGeometry2d (); virtual ~VisualSceneGeometry2d (); void SetGeometry (const class SplineGeometry2d * ageometry2d) { geometry2d = ageometry2d; } virtual void BuildScene (int zoomall = 0); virtual void DrawScene (); }; } #endif netgen-6.2.1804/libsrc/geom2d/geom2dpkg.cpp0000644000175000017500000000215013272137567017021 0ustar kurtkurt#include #include #include #include #include "vsgeom2d.hpp" // extern "C" int Ng_CSG_Init (Tcl_Interp * interp); namespace netgen { // extern DLL_HEADER NetgenGeometry * ng_geometry; static VisualSceneGeometry2d vsgeom2d; class SplineGeometryVisRegister : public GeometryRegister { public: virtual NetgenGeometry * Load (string filename) const { return NULL; } virtual VisualScene * GetVisualScene (const NetgenGeometry * geom) const; }; VisualScene * SplineGeometryVisRegister :: GetVisualScene (const NetgenGeometry * geom) const { const SplineGeometry2d * geometry = dynamic_cast (geom); if (geometry) { vsgeom2d.SetGeometry (geometry); return &vsgeom2d; } return NULL; } } using namespace netgen; #ifdef WIN32 extern "C" __declspec(dllexport) int Ng_geom2d_Init (Tcl_Interp * interp); #else extern "C" int Ng_geom2d_Init (Tcl_Interp * interp); #endif int Ng_geom2d_Init (Tcl_Interp * interp) { geometryregister.Append (new SplineGeometryVisRegister); return TCL_OK; } netgen-6.2.1804/libsrc/geom2d/geom2dmesh.cpp0000644000175000017500000000644513272137567017207 0ustar kurtkurt#include #include namespace netgen { Refinement2d :: Refinement2d (const SplineGeometry2d & ageometry) : Refinement(), geometry(ageometry) { ; } Refinement2d :: ~Refinement2d () { ; } void Refinement2d :: PointBetween (const Point<3> & p1, const Point<3> & p2, double secpoint, int surfi, const PointGeomInfo & gi1, const PointGeomInfo & gi2, Point<3> & newp, PointGeomInfo & newgi) const { newp = p1+secpoint*(p2-p1); newgi.trignum = 1; } void Refinement2d :: PointBetween (const Point<3> & p1, const Point<3> & p2, double secpoint, int surfi1, int surfi2, const EdgePointGeomInfo & ap1, const EdgePointGeomInfo & ap2, Point<3> & newp, EdgePointGeomInfo & newgi) const { Point<2> p2d; double newdist; auto spline = geometry.GetSplines().Get(ap1.edgenr); if( (ap1.dist == 0.0) && (ap2.dist == 0.0) ) { // used for manually generated meshes const SplineSeg3<2> * ss3; const LineSeg<2> * ls; auto ext = dynamic_cast(spline); if(ext) { ss3 = dynamic_cast *>(&ext->seg); ls = dynamic_cast *>(&ext->seg); } else { ss3 = dynamic_cast *>(spline); ls = dynamic_cast *>(spline); } Point<2> p12d(p1(0),p1(1)), p22d(p2(0),p2(1)); Point<2> p1_proj(0.0,0.0), p2_proj(0.0,0.0); double t1_proj = 0.0; double t2_proj = 0.0; if(ss3) { ss3->Project(p12d,p1_proj,t1_proj); ss3->Project(p22d,p2_proj,t2_proj); } else if(ls) { ls->Project(p12d,p1_proj,t1_proj); ls->Project(p22d,p2_proj,t2_proj); } p2d = spline->GetPoint (((1-secpoint)*t1_proj+secpoint*t2_proj)); newdist = (1-secpoint)*t1_proj+secpoint*t2_proj; } else { p2d = spline->GetPoint (((1-secpoint)*ap1.dist+secpoint*ap2.dist)); newdist = (1-secpoint)*ap1.dist+secpoint*ap2.dist; } // (*testout) << "refine 2d line, ap1.dist, ap2.dist = " << ap1.dist << ", " << ap2.dist << endl; // (*testout) << "p1, p2 = " << p1 << p2 << ", newp = " << p2d << endl; newp = Point3d (p2d(0), p2d(1), 0); newgi.edgenr = ap1.edgenr; newgi.dist = newdist; }; Vec<3> Refinement2d :: GetTangent (const Point<3> & p, int surfi1, int surfi2, const EdgePointGeomInfo & ap1) const { Vec<2> t2d = geometry.GetSplines().Get(ap1.edgenr) -> GetTangent(ap1.dist); return Vec<3> (t2d(0), t2d(1), 0); } Vec<3> Refinement2d :: GetNormal (const Point<3> & p, int surfi1, const PointGeomInfo & gi) const { return Vec<3> (0,0,1); } void Refinement2d :: ProjectToSurface (Point<3> & p, int surfi, const PointGeomInfo & /* gi */) const { p(2) = 0; } void Refinement2d :: ProjectToEdge (Point<3> & p, int surfi1, int surfi2, const EdgePointGeomInfo & egi) const { Point<2> p2d (p(0), p(1)), pp; double t; geometry.GetSplines().Get(egi.edgenr) -> Project (p2d, pp, t); p = Point<3> (pp(0), pp(1), 0); } } netgen-6.2.1804/libsrc/geom2d/vsgeom2d.cpp0000644000175000017500000000435213272137567016676 0ustar kurtkurt#include #include #include #include "vsgeom2d.hpp" namespace netgen { /* *********************** Draw 2D Geometry **************** */ VisualSceneGeometry2d :: VisualSceneGeometry2d () : VisualScene() { ; } VisualSceneGeometry2d :: ~VisualSceneGeometry2d () { ; } void VisualSceneGeometry2d :: DrawScene () { if (changeval != geometry2d->GetSplines().Size()) BuildScene(); changeval = geometry2d->GetSplines().Size(); glClearColor(backcolor, backcolor, backcolor, 1.0); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); SetLight(); // glEnable (GL_LIGHT0); glDisable (GL_LIGHTING); glPushMatrix(); glMultMatrixd (transformationmat); // SetClippingPlane (); glShadeModel (GL_SMOOTH); glEnable (GL_COLOR_MATERIAL); glPolygonMode (GL_FRONT_AND_BACK, GL_LINE); // float mat_col[] = { 0, 0, 1, 1 }; // glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_col); glColor3f (0, 0, 1); Array > points, otherpoints; for (int i = 1; i <= geometry2d->GetSplines().Size(); i++) { geometry2d->GetSplines().Get(i)->GetPoints (200, points); glBegin (GL_LINE_STRIP); for (int j = 0; j < points.Size(); j++) glVertex3d (points[j](0), points[j](1), 0); glEnd(); } glColor3f (1, 0, 0); for (int i = 1; i <= geometry2d->GetSplines().Size(); i++) { int other = geometry2d->GetSpline(i-1).copyfrom; if (other != -1) { geometry2d->GetSplines().Get(i)->GetPoints (6, points); geometry2d->GetSplines().Get(other)->GetPoints (6, otherpoints); glBegin (GL_LINES); for (int j = 1; j < 5; j++) { glVertex3d (points[j](0), points[j](1), 0); glVertex3d (otherpoints[j](0), otherpoints[j](1), 0); } glEnd (); } } glPopMatrix(); DrawCoordinateCross (); DrawNetgenLogo (); glFinish(); } void VisualSceneGeometry2d :: BuildScene (int zoomall) { Box<2> bbox; geometry2d->GetBoundingBox (bbox); Point<2> c = Center (bbox.PMin(), bbox.PMax()); center = Point3d (c(0), c(1), 0); rad = Dist (bbox.PMin(), bbox.PMax()) / 2; CalcTransformationMatrices(); } } netgen-6.2.1804/libsrc/geom2d/geom2dmesh.hpp0000644000175000017500000000314513272137567017206 0ustar kurtkurt#ifndef FILE_GEOM2DMESH #define FILE_GEOM2DMESH /**************************************************************************/ /* File: geom2dmesh.hh */ /* Author: Joachim Schoeberl */ /* Date: 22. Jan. 01 */ /**************************************************************************/ namespace netgen { class Refinement2d : public Refinement { const class SplineGeometry2d & geometry; public: Refinement2d (const class SplineGeometry2d & ageometry); virtual ~Refinement2d (); virtual void PointBetween (const Point<3> & p1, const Point<3> & p2, double secpoint, int surfi, const PointGeomInfo & gi1, const PointGeomInfo & gi2, Point<3> & newp, PointGeomInfo & newgi) const; virtual void PointBetween (const Point<3> & p1, const Point<3> & p2, double secpoint, int surfi1, int surfi2, const EdgePointGeomInfo & ap1, const EdgePointGeomInfo & ap2, Point<3> & newp, EdgePointGeomInfo & newgi) const; virtual Vec<3> GetTangent (const Point<3> & p, int surfi1, int surfi2, const EdgePointGeomInfo & ap1) const; virtual Vec<3> GetNormal (const Point<3> & p, int surfi1, const PointGeomInfo & gi) const; virtual void ProjectToSurface (Point<3> & p, int surfi, const PointGeomInfo & /* gi */) const; virtual void ProjectToEdge (Point<3> & p, int surfi1, int surfi2, const EdgePointGeomInfo & egi) const; }; } #endif netgen-6.2.1804/libsrc/geom2d/spline2d.hpp0000644000175000017500000001333613272137567016677 0ustar kurtkurt das File sollte nicht mehr verwendet werden ---> spline.hpp #ifndef FILE_SPLINE2D #define FILE_SPLINE2D /**************************************************************************/ /* File: spline2d.hh */ /* Author: Joachim Schoeberl */ /* Date: 24. Jul. 96 */ /**************************************************************************/ /* Spline curves for 2D mesh generation */ #include "spline.hpp" //#define OLDSPLINEVERSION #ifdef OLDSPLINEVERSION /// Geometry point class GeomPoint2d : public Point<2> { public: /// refinement to point double refatpoint; bool hpref; GeomPoint2d () { ; } /// GeomPoint2d (double ax, double ay, double aref = 1) : Point<2> (ax, ay), refatpoint(aref) { ; } }; /// base class for 2d - segment class SplineSegment { public: /// left domain int leftdom; /// right domain int rightdom; /// refinement at line double reffak; /// boundary condition number int bc; /// copy spline mesh from other spline (-1.. do not copy) int copyfrom; /// perform anisotropic refinement (hp-refinement) to edge bool hpref_left; bool hpref_right; /// calculates length of curve virtual double Length () const; /// returns point at curve, 0 <= t <= 1 virtual Point<2> GetPoint (double t) const = 0; /// partitionizes curve void Partition (double h, double elto0, Mesh & mesh, Point3dTree & searchtree, int segnr) const; /// returns initial point on curve virtual const GeomPoint2d & StartPI () const = 0; /// returns terminal point on curve virtual const GeomPoint2d & EndPI () const = 0; /** writes curve description for fepp: for implicitly given quadratic curves, the 6 coefficients of the polynomial $$ a x^2 + b y^2 + c x y + d x + e y + f = 0 $$ are written to ost */ void PrintCoeff (ostream & ost) const; virtual void GetCoeff (Vector & coeffs) const = 0; virtual void GetPoints (int n, Array > & points); /** calculates lineintersections: for lines $$ a x + b y + c = 0 $$ the interecting points are calculated and stored in points */ virtual void LineIntersections (const double a, const double b, const double c, Array < Point<2> > & points, const double eps) const {points.SetSize(0);} virtual double MaxCurvature(void) const = 0; virtual string GetType(void) const {return "splinebase";} }; /// Straight line form p1 to p2 class LineSegment : public SplineSegment { /// const GeomPoint2d &p1, &p2; public: /// LineSegment (const GeomPoint2d & ap1, const GeomPoint2d & ap2); /// virtual double Length () const; /// virtual Point<2> GetPoint (double t) const; /// virtual const GeomPoint2d & StartPI () const { return p1; }; /// virtual const GeomPoint2d & EndPI () const { return p2; } /// //virtual void PrintCoeff (ostream & ost) const; virtual void GetCoeff (Vector & coeffs) const; virtual string GetType(void) const {return "line";} virtual void LineIntersections (const double a, const double b, const double c, Array < Point<2> > & points, const double eps) const; virtual double MaxCurvature(void) const {return 0;} }; /// curve given by a rational, quadratic spline (including ellipses) class SplineSegment3 : public SplineSegment { /// const GeomPoint2d &p1, &p2, &p3; public: /// SplineSegment3 (const GeomPoint2d & ap1, const GeomPoint2d & ap2, const GeomPoint2d & ap3); /// virtual Point<2> GetPoint (double t) const; /// virtual const GeomPoint2d & StartPI () const { return p1; }; /// virtual const GeomPoint2d & EndPI () const { return p3; } /// //virtual void PrintCoeff (ostream & ost) const; virtual void GetCoeff (Vector & coeffs) const; virtual string GetType(void) const {return "spline3";} const GeomPoint2d & TangentPoint (void) const { return p2; } virtual void LineIntersections (const double a, const double b, const double c, Array < Point<2> > & points, const double eps) const; virtual double MaxCurvature(void) const; }; // Gundolf Haase 8/26/97 /// A circle class CircleSegment : public SplineSegment { /// private: const GeomPoint2d &p1, &p2, &p3; Point<2> pm; double radius, w1,w3; public: /// CircleSegment (const GeomPoint2d & ap1, const GeomPoint2d & ap2, const GeomPoint2d & ap3); /// virtual Point<2> GetPoint (double t) const; /// virtual const GeomPoint2d & StartPI () const { return p1; } /// virtual const GeomPoint2d & EndPI () const { return p3; } /// //virtual void PrintCoeff (ostream & ost) const; virtual void GetCoeff (Vector & coeffs) const; /// double Radius() const { return radius; } /// double StartAngle() const { return w1; } /// double EndAngle() const { return w3; } /// const Point<2> & MidPoint(void) const {return pm; } virtual string GetType(void) const {return "circle";} virtual void LineIntersections (const double a, const double b, const double c, Array < Point<2> > & points, const double eps) const; virtual double MaxCurvature(void) const {return 1./radius;} }; /// class DiscretePointsSegment : public SplineSegment { Array > pts; GeomPoint2d p1, p2; public: /// DiscretePointsSegment (const Array > & apts); /// virtual ~DiscretePointsSegment (); /// virtual Point<2> GetPoint (double t) const; /// virtual const GeomPoint2d & StartPI () const { return p1; }; /// virtual const GeomPoint2d & EndPI () const { return p2; } /// //virtual void PrintCoeff (ostream & /* ost */) const { ; } virtual void GetCoeff (Vector & coeffs) const {;} virtual double MaxCurvature(void) const {return 1;} }; #endif #endif netgen-6.2.1804/libsrc/geom2d/python_geom2d.cpp0000644000175000017500000002373013272137567017727 0ustar kurtkurt#ifdef NG_PYTHON #include <../general/ngpython.hpp> #include #include using namespace netgen; namespace netgen { extern std::shared_ptr ng_geometry; } DLL_HEADER void ExportGeom2d(py::module &m) { py::class_> (m, "SplineGeometry", "a 2d boundary representation geometry model by lines and splines") .def(py::init<>()) .def("__init__", [](SplineGeometry2d *instance, const string & filename) { cout << "load geometry"; ifstream ist(filename); new (instance) SplineGeometry2d(); instance->Load (filename.c_str()); ng_geometry = shared_ptr(instance, NOOP_Deleter); }) .def("Load",&SplineGeometry2d::Load) .def("AppendPoint", FunctionPointer ([](SplineGeometry2d &self, double px, double py, double maxh, double hpref) { Point<2> p; p(0) = px; p(1) = py; GeomPoint<2> gp(p); gp.hmax = maxh; gp.hpref = hpref; self.geompoints.Append(gp); return self.geompoints.Size()-1; }), py::arg("x"), py::arg("y"), py::arg("maxh") = 1e99, py::arg("hpref")=0) .def("Append", FunctionPointer([](SplineGeometry2d &self, py::list segment, int leftdomain, int rightdomain, py::object bc, py::object copy, double maxh, double hpref) { py::extract segtype(segment[0]); SplineSegExt * seg; if (segtype().compare("line") == 0) { py::extract point_index1(segment[1]); py::extract point_index2(segment[2]); //point_index1.check() LineSeg<2> * l = new LineSeg<2>(self.GetPoint(point_index1()), self.GetPoint(point_index2())); seg = new SplineSegExt(*l); } else if (segtype().compare("spline3") == 0) { py::extract point_index1(segment[1]); py::extract point_index2(segment[2]); py::extract point_index3(segment[3]); SplineSeg3<2> * seg3 = new SplineSeg3<2>(self.GetPoint(point_index1()), self.GetPoint(point_index2()), self.GetPoint(point_index3())); seg = new SplineSegExt(*seg3); } else { cout << "Appended segment is not a line or a spline3" << endl; } seg->leftdom = leftdomain; seg->rightdom = rightdomain; seg->hmax = maxh; seg->hpref_left = hpref; seg->hpref_right = hpref; seg->reffak = 1; seg->copyfrom = -1; if (py::extract(copy).check()) seg->copyfrom = py::extract(copy)()+1; if (py::extract(bc).check()) seg->bc = py::extract(bc)(); else if (py::extract(bc).check()) { string bcname = py::extract(bc)(); int bcnum = self.GetBCNumber(bcname); if (bcnum == 0) bcnum = self.AddBCName(bcname); seg->bc = bcnum; } else seg->bc = self.GetNSplines()+1; self.AppendSegment(seg); return self.GetNSplines()-1; }), py::arg("point_indices"), py::arg("leftdomain") = 1, py::arg("rightdomain") = py::int_(0), py::arg("bc")=NGDummyArgument(), py::arg("copy")=NGDummyArgument(), py::arg("maxh")=1e99, py::arg("hpref")=0) .def("AppendSegment", FunctionPointer([](SplineGeometry2d &self, py::list point_indices, int leftdomain, int rightdomain) { int npts = py::len(point_indices); SplineSegExt * seg; //int a = py::extract(point_indices[0]); if (npts == 2) { LineSeg<2> * l = new LineSeg<2>(self.GetPoint(py::extract(point_indices[0])()), self.GetPoint(py::extract(point_indices[1])())); seg = new SplineSegExt(*l); } else if (npts == 3) { SplineSeg3<2> * seg3 = new SplineSeg3<2>(self.GetPoint(py::extract(point_indices[0])()), self.GetPoint(py::extract(point_indices[1])()), self.GetPoint(py::extract(point_indices[2])())); seg = new SplineSegExt(*seg3); } seg->leftdom = leftdomain; seg->rightdom = rightdomain; seg->hmax = 1e99; seg->reffak = 1; seg->copyfrom = -1; self.AppendSegment(seg); }), py::arg("point_indices"), py::arg("leftdomain") = 1, py::arg("rightdomain") = py::int_(0)) //.def("AppendSegment", FunctionPointer([](SplineGeometry2d &self, int point_index1, int point_index2)//, int leftdomain, int rightdomain) // { // LineSeg<2> * l = new LineSeg<2>(self.GetPoint(point_index1), self.GetPoint(point_index2)); // SplineSegExt * seg = new SplineSegExt(*l); // seg->leftdom = 1;// leftdomain; // seg->rightdom = 0;// rightdomain; // seg->hmax = 1e99; // seg->reffak = 1; // seg->copyfrom = -1; // self.AppendSegment(seg); // }))//, (py::arg("self"), py::arg("point_index1"), py::arg("point_index2"), py::arg("leftdomain") = 1, py::arg("rightdomain") = 0) ) //.def("AppendSegment", FunctionPointer([](SplineGeometry2d &self, int point_index1, int point_index2, int point_index3)//, int leftdomain, int rightdomain) // { // SplineSeg3<2> * seg3 = new SplineSeg3<2>(self.GetPoint(point_index1), self.GetPoint(point_index2), self.GetPoint(point_index3)); // SplineSegExt * seg = new SplineSegExt(*seg3); // seg->leftdom = 1;// leftdomain; // seg->rightdom = 0;// rightdomain; // seg->hmax = 1e99; // seg->reffak = 1; // seg->copyfrom = -1; // self.AppendSegment(seg); // }))//, (py::arg("self"), py::arg("point_index1"), py::arg("point_index2"), py::arg("point_index3"), py::arg("leftdomain") = 1, py::arg("rightdomain") = 0 ) ) .def("SetMaterial", &SplineGeometry2d::SetMaterial) .def("SetDomainMaxH", &SplineGeometry2d::SetDomainMaxh) .def("PlotData", FunctionPointer([](SplineGeometry2d &self) { Box<2> box(self.GetBoundingBox()); double xdist = box.PMax()(0) - box.PMin()(0); double ydist = box.PMax()(1) - box.PMin()(1); py::tuple xlim = py::make_tuple(box.PMin()(0) - 0.1*xdist, box.PMax()(0) + 0.1*xdist); py::tuple ylim = py::make_tuple(box.PMin()(1) - 0.1*ydist, box.PMax()(1) + 0.1*ydist); py::list xpoints, ypoints; for (int i = 0; i < self.splines.Size(); i++) { py::list xp, yp; if (self.splines[i]->GetType().compare("line")==0) { GeomPoint<2> p1 = self.splines[i]->StartPI(); GeomPoint<2> p2 = self.splines[i]->EndPI(); xp.append(py::cast(p1(0))); xp.append(py::cast(p2(0))); yp.append(py::cast(p1(1))); yp.append(py::cast(p2(1))); } else if (self.splines[i]->GetType().compare("spline3")==0) { double len = self.splines[i]->Length(); int n = floor(len/(0.05*min(xdist,ydist))); for (int j = 0; j <= n; j++) { GeomPoint<2> point = self.splines[i]->GetPoint(j*1./n); xp.append(py::cast(point(0))); yp.append(py::cast(point(1))); } } else { cout << "spline is neither line nor spline3" << endl; } xpoints.append(xp); ypoints.append(yp); } return py::tuple(py::make_tuple(xlim, ylim, xpoints, ypoints)); })) .def("PointData", FunctionPointer([](SplineGeometry2d &self) { py::list xpoints, ypoints, pointindex; for (int i = 0; i < self.geompoints.Size(); i++) { pointindex.append(py::cast(i)); xpoints.append(py::cast(self.geompoints[i][0])); ypoints.append(py::cast(self.geompoints[i][1])); } return py::tuple(py::make_tuple(xpoints, ypoints, pointindex)); })) .def("SegmentData", FunctionPointer([](SplineGeometry2d &self) { py::list leftpoints, rightpoints, leftdom, rightdom; for (int i = 0; i < self.splines.Size(); i++) { GeomPoint<2> point = self.splines[i]->GetPoint(0.5); Vec<2> normal = self.GetSpline(i).GetTangent(0.5); double temp = normal(0); normal(0) = normal(1); normal(1) = -temp; leftdom.append(py::cast(self.GetSpline(i).leftdom)); rightdom.append(py::cast(self.GetSpline(i).rightdom)); rightpoints.append(py::make_tuple(point(0), point(1), normal(0)<0, normal(1)<0)); leftpoints.append(py::make_tuple(point(0), point(1), normal(0)<0, normal(1)<0)); } return py::tuple(py::make_tuple(leftpoints, rightpoints, leftdom, rightdom)); })) .def("Print", FunctionPointer([](SplineGeometry2d &self) { for (int i = 0; i < self.geompoints.Size(); i++) { cout << i << " : " << self.geompoints[i][0] << " , " << self.geompoints[i][1] << endl; } //Box<2> box(self.GetBoundingBox()); //cout << box.PMin() << endl; //cout << box.PMax() << endl; cout << self.splines.Size() << endl; for (int i = 0; i < self.splines.Size(); i++) { cout << self.splines[i]->GetType() << endl; //cout << i << " : " << self.splines[i]->GetPoint(0.1) << " , " << self.splines[i]->GetPoint(0.5) << endl; } })) .def("GenerateMesh", [](shared_ptr self, MeshingParameters & mparam) { shared_ptr mesh = make_shared (); mesh->SetGeometry(self); SetGlobalMesh (mesh); ng_geometry = self; self->GenerateMesh(mesh, mparam); return mesh; },py::call_guard()) ; } PYBIND11_MODULE(libgeom2d, m) { ExportGeom2d(m); } #endif netgen-6.2.1804/libsrc/geom2d/geometry2d.hpp0000644000175000017500000001116013272137567017231 0ustar kurtkurt#ifndef FILE_GEOMETRY2D #define FILE_GEOMETRY2D /* *************************************************************************/ /* File: geometry2d.hpp */ /* Author: Joachim Schoeberl */ /* Date: 20. Jul. 02 */ /* *************************************************************************/ #include #include // #include "../gprim/spline.hpp" // #include "../gprim/splinegeometry.hpp" #include "geom2dmesh.hpp" namespace netgen { class SplineSegExt : public SplineSeg<2> { public: const SplineSeg<2> & seg; /// left domain int leftdom; /// right domain int rightdom; /// refinement at line double reffak; /// maximal h; double hmax; /// boundary condition number int bc; /// copy spline mesh from other spline (-1.. do not copy) int copyfrom; /// perform anisotropic refinement (hp-refinement) to edge double hpref_left; /// perform anisotropic refinement (hp-refinement) to edge double hpref_right; /// int layer; SplineSegExt (const SplineSeg<2> & hseg) : seg(hseg) { layer = 1; } ~SplineSegExt () { delete &seg; } virtual const GeomPoint<2> & StartPI () const { return seg.StartPI(); } virtual const GeomPoint<2> & EndPI () const { return seg.EndPI(); } virtual Point<2> GetPoint (double t) const { return seg.GetPoint(t); } virtual Vec<2> GetTangent (const double t) const { return seg.GetTangent(t); } virtual void GetDerivatives (const double t, Point<2> & point, Vec<2> & first, Vec<2> & second) const { seg.GetDerivatives (t, point, first, second); } virtual void GetCoeff (Vector & coeffs) const { seg.GetCoeff (coeffs); } virtual void GetPoints (int n, Array > & points) const { seg.GetPoints (n, points); } virtual double MaxCurvature () const { return seg.MaxCurvature(); } virtual string GetType () const { return seg.GetType(); } virtual double CalcCurvature (double t) const { Point<2> point; Vec<2> first, second; GetDerivatives (t, point, first, second); double curv = fabs(first(0)*second(1)-first(1)*second(0)) / pow(first.Length(), 3); return curv; } virtual bool InConvexHull (Point<2> p, double eps) const { return seg.InConvexHull (p, eps); } }; class SplineGeometry2d : public SplineGeometry<2>, public NetgenGeometry { protected: Array materials; Array maxh; Array quadmeshing; Array tensormeshing; Array layer; Array bcnames; double elto0 = 1.0; public: DLL_HEADER virtual ~SplineGeometry2d(); DLL_HEADER void Load (const char * filename); DLL_HEADER void LoadData( ifstream & infile ); DLL_HEADER void LoadDataNew ( ifstream & infile ); DLL_HEADER void LoadDataV2 ( ifstream & infile ); void TestComment ( ifstream & infile ) ; const SplineSegExt & GetSpline (const int i) const { return dynamic_cast (*splines[i]); } SplineSegExt & GetSpline (const int i) { return dynamic_cast (*splines[i]); } DLL_HEADER virtual int GenerateMesh (shared_ptr & mesh, MeshingParameters & mparam); void PartitionBoundary (MeshingParameters & mp, double h, Mesh & mesh2d); void CopyEdgeMesh (int from, int to, Mesh & mesh2d, Point3dTree & searchtree); void GetMaterial (int domnr, char* & material ); void SetMaterial (int domnr, const string & material); double GetDomainMaxh ( const int domnr ); void SetDomainMaxh ( const int domnr, double maxh ); bool GetDomainQuadMeshing ( int domnr ) { if ( quadmeshing.Size() ) return quadmeshing[domnr-1]; else return false; } bool GetDomainTensorMeshing ( int domnr ) { if ( tensormeshing.Size() ) return tensormeshing[domnr-1]; else return false; } int GetDomainLayer ( int domnr ) { if ( layer.Size() ) return layer[domnr-1]; else return 1; } string GetBCName (int bcnr) const; void SetBCName (int bcnr, string name); int GetBCNumber (string name) const; // 0 if not exists int AddBCName (string name); string * BCNamePtr ( const int bcnr ); DLL_HEADER virtual Refinement & GetRefinement () const; }; } #endif netgen-6.2.1804/libsrc/geom2d/splinegeometry2.hpp0000644000175000017500000000637713272137567020316 0ustar kurtkurt OLD IMPLEMENTATION, NOT USED ANYMORE! #ifndef FILE_SPLINEGEOMETRY2 #define FILE_SPLINEGEOMETRY2 /**************************************************************************/ /* File: splinegeometry2.hpp */ /* Author: Joachim Schoeberl */ /* Date: 24. Jul. 96 */ /**************************************************************************/ #include "splinegeometry.hpp" #ifdef OLDSPLINEGEOMETRY /// extern void LoadBoundarySplines (const char * filename, Array & geompoints, Array & splines, double & elto0); /// extern void PartitionBoundary (const Array & splines, double h, double elto0, Mesh & mesh2d); class CSGScanner; class SplineGeometry2d { Array geompoints; Array splines; double elto0; private: void AppendSegment(SplineSegment * spline, const int leftdomain, const int rightdomain, const int bc, const double reffac, const bool hprefleft, const bool hprefright, const int copyfrom); public: ~SplineGeometry2d(); void Load (const char * filename); void CSGLoad (CSGScanner & scan); void PartitionBoundary (double h, Mesh & mesh2d); void CopyEdgeMesh (int from, int to, Mesh & mesh2d, Point3dTree & searchtree); const Array & GetSplines () const { return splines; } int GetNSplines (void) const { return splines.Size(); } string GetSplineType (const int i) const { return splines[i]->GetType(); } SplineSegment & GetSpline (const int i) {return *splines[i];} const SplineSegment & GetSpline (const int i) const {return *splines[i];} void GetBoundingBox (Box<2> & box) const; int GetNP () const { return geompoints.Size(); } const GeomPoint2d & GetPoint(int i) const { return geompoints[i]; } void SetGrading (const double grading); void AppendPoint (const double x, const double y, const double reffac = 1., const bool hpref = false); void AppendLineSegment (const int n1, const int n2, const int leftdomain, const int rightdomain, const int bc = -1, const double reffac = 1., const bool hprefleft = false, const bool hprefright = false, const int copyfrom = -1); void AppendSplineSegment (const int n1, const int n2, const int n3, const int leftdomain, const int rightdomain, const int bc = -1, const double reffac = 1., const bool hprefleft = false, const bool hprefright = false, const int copyfrom = -1); void AppendCircleSegment (const int n1, const int n2, const int n3, const int leftdomain, const int rightdomain, const int bc = -1, const double reffac = 1., const bool hprefleft = false, const bool hprefright = false, const int copyfrom = -1); void AppendDiscretePointsSegment (const Array< Point<2> > & points, const int leftdomain, const int rightdomain, const int bc = -1, const double reffac = 1., const bool hprefleft = false, const bool hprefright = false, const int copyfrom = -1); }; void MeshFromSpline2D (SplineGeometry2d & geometry, shared_ptr & mesh, MeshingParameters & mp); #endif #endif netgen-6.2.1804/libsrc/geom2d/geometry2d.cpp0000644000175000017500000005413013272137567017230 0ustar kurtkurt/* 2d Spline curve for Mesh generator */ #include #include namespace netgen { SplineGeometry2d :: ~SplineGeometry2d() { for ( int i = 0; i < bcnames.Size(); i++ ) delete bcnames[i]; for (int i=0; i x; char buf[50]; infile.open (filename); if ( ! infile.good() ) throw NgException(string ("Input file '") + string (filename) + string ("' not available!")); TestComment ( infile ); infile >> buf; // file recognition tensormeshing.SetSize(0); quadmeshing.SetSize(0); TestComment ( infile ); if ( strcmp (buf, "splinecurves2dnew") == 0 ) { LoadDataNew ( infile ); } else if ( strcmp (buf, "splinecurves2dv2") == 0 ) { LoadDataV2 ( infile ); } else { LoadData(infile ); } infile.close(); } // herbert: fixed TestComment void SplineGeometry2d :: TestComment ( ifstream & infile ) { bool comment = true; char ch; while ( comment == true && !infile.eof() ) { infile.get(ch); if ( ch == '#' ) { // skip comments while ( ch != '\n' && !infile.eof() ) { infile.get(ch); } } else if ( ch == '\n' ) { // skip empty lines ; } else if ( isspace(ch) ) { // skip whitespaces ; } else { // end of comment infile.putback(ch); comment = false; } } return; } void SplineGeometry2d :: LoadData ( ifstream & infile ) { enum { D = 2 }; int nump, numseg, leftdom, rightdom; Point x; int hi1, hi2, hi3; double hd; char buf[50], ch; materials.SetSize(0); maxh.SetSize(0); infile >> elto0; TestComment ( infile ); infile >> nump; for (int i = 0; i < nump; i++) { TestComment ( infile ); for(int j=0; j> x(j); infile >> hd; Flags flags; ch = 'a'; // infile >> ch; do { infile.get (ch); } while (isspace(ch) && ch != '\n'); while (ch == '-') { char flag[100]; flag[0]='-'; infile >> (flag+1); flags.SetCommandLineFlag (flag); ch = 'a'; do { infile.get (ch); } while (isspace(ch) && ch != '\n'); } if (infile.good()) infile.putback (ch); geompoints.Append (GeomPoint(x, hd)); geompoints.Last().hpref = flags.GetDefineFlag ("hpref"); geompoints.Last().hmax = 1e99; } PrintMessage (3, nump, " points loaded"); TestComment ( infile ); infile >> numseg; bcnames.SetSize(numseg); for ( int i = 0; i < numseg; i++ ) bcnames[i] = 0; // "default"; SplineSeg * spline = 0; PrintMessage (3, numseg, " segments loaded"); for (int i = 0; i < numseg; i++) { TestComment ( infile ); infile >> leftdom >> rightdom; // cout << "add spline " << i << ", left = " << leftdom << ", right = " << rightdom << endl; infile >> buf; // type of spline segment if (strcmp (buf, "2") == 0) { // a line infile >> hi1 >> hi2; spline = new LineSeg(geompoints[hi1-1], geompoints[hi2-1]); } else if (strcmp (buf, "3") == 0) { // a rational spline infile >> hi1 >> hi2 >> hi3; spline = new SplineSeg3 (geompoints[hi1-1], geompoints[hi2-1], geompoints[hi3-1]); } else if (strcmp (buf, "4") == 0) { // an arc infile >> hi1 >> hi2 >> hi3; spline = new CircleSeg (geompoints[hi1-1], geompoints[hi2-1], geompoints[hi3-1]); // break; } else if (strcmp (buf, "discretepoints") == 0) { int npts; infile >> npts; Array< Point > pts(npts); for (int j = 0; j < npts; j++) for(int k=0; k> pts[j](k); spline = new DiscretePointsSeg (pts); } SplineSegExt * spex = new SplineSegExt (*spline); infile >> spex->reffak; spex -> leftdom = leftdom; spex -> rightdom = rightdom; spex -> hmax = 1e99; splines.Append (spex); Flags flags; ch = 'a'; infile >> ch; while (ch == '-') { char flag[100]; flag[0]='-'; infile >> (flag+1); flags.SetCommandLineFlag (flag); ch = 'a'; infile >> ch; } if (infile.good()) infile.putback (ch); spex->bc = int (flags.GetNumFlag ("bc", i+1)); spex->hpref_left = int (flags.GetDefineFlag ("hpref")) || int (flags.GetDefineFlag ("hprefleft")); spex->hpref_right = int (flags.GetDefineFlag ("hpref")) || int (flags.GetDefineFlag ("hprefright")); spex->copyfrom = int (flags.GetNumFlag ("copy", -1)); if ( flags.StringFlagDefined("bcname") ) { int mybc = spex->bc-1; delete bcnames[mybc]; bcnames[mybc] = new string (flags.GetStringFlag("bcname","") ); } } } void SplineGeometry2d :: LoadDataNew ( ifstream & infile ) { enum { D = 2 }; int nump, numseg, leftdom, rightdom; Point x; int hi1, hi2, hi3; double hd; char buf[50], ch; int pointnr; TestComment ( infile ); infile >> elto0; TestComment ( infile ); infile >> nump; geompoints.SetSize(nump); for (int i = 0; i < nump; i++) { TestComment ( infile ); infile >> pointnr; if ( pointnr > nump ) { throw NgException(string ("Point number greater than total number of points") ); } for(int j=0; j> x(j); // hd is now optional, default 1 // infile >> hd; hd = 1; Flags flags; // get flags, ch = 'a'; // infile >> ch; do { infile.get (ch); // if another int-value, set refinement flag to this value // (corresponding to old files) if ( int (ch) >= 48 && int(ch) <= 57 ) { infile.putback(ch); infile >> hd; infile.get(ch); } } while (isspace(ch) && ch != '\n'); while (ch == '-') { char flag[100]; flag[0]='-'; infile >> (flag+1); flags.SetCommandLineFlag (flag); ch = 'a'; do { infile.get (ch); } while (isspace(ch) && ch != '\n'); } if (infile.good()) infile.putback (ch); if ( hd == 1 ) hd = flags.GetNumFlag ( "ref", 1.0); // geompoints.Append (GeomPoint(x, hd)); geompoints[pointnr-1] = GeomPoint(x, hd); geompoints[pointnr-1].hpref = flags.GetDefineFlag ("hpref"); } TestComment ( infile ); infile >> numseg; bcnames.SetSize(numseg); for ( int i = 0; i < numseg; i++ ) bcnames[i] = 0;//new"default"; SplineSeg * spline = 0; for (int i = 0; i < numseg; i++) { TestComment ( infile ); infile >> leftdom >> rightdom; // cout << "add spline " << i << ", left = " << leftdom << endl; infile >> buf; // type of spline segment if (strcmp (buf, "2") == 0) { // a line infile >> hi1 >> hi2; spline = new LineSeg (geompoints[hi1-1], geompoints[hi2-1]); } else if (strcmp (buf, "3") == 0) { // a rational spline infile >> hi1 >> hi2 >> hi3; spline = new SplineSeg3 (geompoints[hi1-1], geompoints[hi2-1], geompoints[hi3-1]); } else if (strcmp (buf, "4") == 0) { // an arc infile >> hi1 >> hi2 >> hi3; spline = new CircleSeg (geompoints[hi1-1], geompoints[hi2-1], geompoints[hi3-1]); // break; } else if (strcmp (buf, "discretepoints") == 0) { int npts; infile >> npts; Array< Point > pts(npts); for (int j = 0; j < npts; j++) for(int k=0; k> pts[j](k); spline = new DiscretePointsSeg (pts); } // infile >> spline->reffak; SplineSegExt * spex = new SplineSegExt (*spline); spex -> leftdom = leftdom; spex -> rightdom = rightdom; splines.Append (spex); // hd is now optional, default 1 // infile >> hd; hd = 1; infile >> ch; // get refinement parameter, if it is there // infile.get (ch); // if another int-value, set refinement flag to this value // (corresponding to old files) if ( int (ch) >= 48 && int(ch) <= 57 ) { infile.putback(ch); infile >> hd; infile >> ch ; } Flags flags; while (ch == '-') { char flag[100]; flag[0]='-'; infile >> (flag+1); flags.SetCommandLineFlag (flag); ch = 'a'; infile >> ch; } if (infile.good()) infile.putback (ch); spex->bc = int (flags.GetNumFlag ("bc", i+1)); spex->hpref_left = int (flags.GetDefineFlag ("hpref")) || int (flags.GetDefineFlag ("hprefleft")); spex->hpref_right = int (flags.GetDefineFlag ("hpref")) || int (flags.GetDefineFlag ("hprefright")); spex->copyfrom = int (flags.GetNumFlag ("copy", -1)); spex->reffak = flags.GetNumFlag ("ref", 1 ); spex->hmax = flags.GetNumFlag ("maxh", 1e99 ); if ( flags.StringFlagDefined("bcname") ) { int mybc = spex->bc-1; if ( bcnames[mybc] ) delete bcnames[mybc]; bcnames[mybc] = new string (flags.GetStringFlag("bcname","") ); } if ( hd != 1 ) spex->reffak = hd; } if ( !infile.good() ) return; TestComment ( infile ); int numdomains; int domainnr; char material[100]; if ( !infile.good() ) return; infile >> numdomains; materials.SetSize(numdomains) ; maxh.SetSize ( numdomains ) ; maxh = 1e99; TestComment ( infile ); for ( int i=0; i> domainnr; infile >> material; strcpy(materials[domainnr-1], material); Flags flags; ch = 'a'; infile >> ch; while (ch == '-') { char flag[100]; flag[0]='-'; infile >> (flag+1); flags.SetCommandLineFlag (flag); ch = 'a'; infile >> ch; } if (infile.good()) infile.putback (ch); maxh[domainnr-1] = flags.GetNumFlag ( "maxh", 1e99); } return; } void SplineGeometry2d :: LoadDataV2 ( ifstream & infile ) { enum { D = 2 }; // new parser by Astrid Sinwel PrintMessage (1, "Load 2D Geometry V2"); int nump, leftdom, rightdom; Point x; int hi1, hi2, hi3; double hd; char buf[50], ch; int pointnr; string keyword; Array < GeomPoint > infilepoints (0); Array pointnrs (0); nump = 0; int numdomains = 0; TestComment ( infile ); // refinement factor infile >> elto0; TestComment ( infile ); // test if next ch is a letter, i.e. new keyword starts bool ischar = false; while ( infile.good() ) { infile >> keyword; ischar = false; if ( keyword == "points" ) { PrintMessage (3, "load points"); infile.get(ch); infile.putback(ch); // test if ch is a letter if ( int(ch) >= 65 && int(ch) <=90 ) ischar = true; if ( int(ch) >= 97 && int(ch) <= 122 ) ischar = true; while ( ! ischar ) { TestComment ( infile ); infile >> pointnr; // pointnrs 1-based if ( pointnr > nump ) nump = pointnr; pointnrs.Append(pointnr); for(int j=0; j> x(j); // hd is now optional, default 1 // infile >> hd; hd = 1; Flags flags; // get flags, ch = 'a'; // infile >> ch; do { infile.get (ch); // if another int-value, set refinement flag to this value // (corresponding to old files) if ( int (ch) >= 48 && int(ch) <= 57 ) { infile.putback(ch); infile >> hd; infile.get(ch); } } while (isspace(ch) && ch != '\n'); while (ch == '-') { char flag[100]; flag[0]='-'; infile >> (flag+1); flags.SetCommandLineFlag (flag); ch = 'a'; do { infile.get (ch); } while (isspace(ch) && ch != '\n'); } if (infile.good()) infile.putback (ch); if ( hd == 1 ) hd = flags.GetNumFlag ( "ref", 1.0); // geompoints.Append (GeomPoint(x, hd)); infilepoints.Append ( GeomPoint(x, hd) ); infilepoints.Last().hpref = flags.GetDefineFlag ("hpref"); infilepoints.Last().hmax = flags.GetNumFlag ("maxh", 1e99); TestComment(infile); infile.get(ch); infile.putback(ch); // test if letter if ( int(ch) >= 65 && int(ch) <=90 ) ischar = true; if ( int(ch) >= 97 && int(ch) <= 122 ) ischar = true; } // infile.putback (ch); geompoints.SetSize(nump); for ( int i = 0; i < nump; i++ ) { geompoints[pointnrs[i] - 1] = infilepoints[i]; geompoints[pointnrs[i] - 1].hpref = infilepoints[i].hpref; } TestComment(infile); } else if ( keyword == "segments" ) { PrintMessage (3, "load segments"); bcnames.SetSize(0); infile.get(ch); infile.putback(ch); int i = 0; // test if ch is a letter if ( int(ch) >= 65 && int(ch) <=90 ) ischar = true; if ( int(ch) >= 97 && int(ch) <= 122 ) ischar = true; while ( !ischar ) //ch != 'p' && ch != 'm' ) { i++; TestComment ( infile ); SplineSeg * spline = 0; TestComment ( infile ); infile >> leftdom >> rightdom; if ( leftdom > numdomains ) numdomains = leftdom; if ( rightdom > numdomains ) numdomains = rightdom; infile >> buf; // type of spline segment if (strcmp (buf, "2") == 0) { // a line infile >> hi1 >> hi2; spline = new LineSeg(geompoints[hi1-1], geompoints[hi2-1]); } else if (strcmp (buf, "3") == 0) { // a rational spline infile >> hi1 >> hi2 >> hi3; spline = new SplineSeg3 (geompoints[hi1-1], geompoints[hi2-1], geompoints[hi3-1]); } else if (strcmp (buf, "4") == 0) { // an arc infile >> hi1 >> hi2 >> hi3; spline = new CircleSeg (geompoints[hi1-1], geompoints[hi2-1], geompoints[hi3-1]); } else if (strcmp (buf, "discretepoints") == 0) { int npts; infile >> npts; Array< Point > pts(npts); for (int j = 0; j < npts; j++) for(int k=0; k> pts[j](k); spline = new DiscretePointsSeg (pts); } else if (strcmp (buf, "bsplinepoints") == 0) { int npts,order; infile >> npts; infile >> order; Array< Point > pts(npts); for (int j = 0; j < npts; j++) for(int k=0; k> pts[j](k); if(order<2) cerr<<"Minimum order of 2 is required!!"< (pts); else if(order==3) spline = new BSplineSeg (pts); else if(order==4) spline = new BSplineSeg (pts); else if(order>4) cerr<<"Maximum allowed order is 4!!"<> spline->reffak; SplineSegExt * spex = new SplineSegExt (*spline); spex -> leftdom = leftdom; spex -> rightdom = rightdom; splines.Append (spex); // hd is now optional, default 1 // infile >> hd; hd = 1; infile >> ch; // get refinement parameter, if it is there //infile.get (ch); // if another int-value, set refinement flag to this value // (corresponding to old files) /* if ( int (ch) >= 48 && int(ch) <= 57 ) { infile.putback(ch); infile >> hd; infile >> ch ; } */ // get flags, Flags flags; while (ch == '-') { char flag[100]; flag[0]='-'; infile >> (flag+1); flags.SetCommandLineFlag (flag); ch = 'a'; infile >> ch; } if (infile.good()) infile.putback (ch); spex->bc = int (flags.GetNumFlag ("bc", i+1)); spex->hpref_left = int (flags.GetDefineFlag ("hpref")) || int (flags.GetDefineFlag ("hprefleft")); spex->hpref_right = int (flags.GetDefineFlag ("hpref")) || int (flags.GetDefineFlag ("hprefright")); spex->copyfrom = int (flags.GetNumFlag ("copy", -1)); spex->reffak = flags.GetNumFlag ("ref", 1 ); spex->hmax = flags.GetNumFlag ("maxh", 1e99 ); if ( hd != 1 ) spex->reffak = hd; if ( flags.StringFlagDefined("bcname") ) { int mybc = spex->bc-1; for ( int ii = bcnames.Size(); ii <= mybc; ii++ ) bcnames.Append ( new string ("default")); if ( bcnames[mybc] ) delete bcnames[mybc]; bcnames[mybc] = new string (flags.GetStringFlag("bcname","") ); } TestComment(infile); infile.get(ch); infile.putback(ch); // test if ch is a letter if ( int(ch) >= 65 && int(ch) <=90 ) ischar = true; if ( int(ch) >= 97 && int(ch) <= 122 ) ischar = true; } infile.get(ch); infile.putback(ch); } else if ( keyword == "materials" ) { TestComment ( infile ); int domainnr; char material[100]; if ( !infile.good() ) return; materials.SetSize(numdomains) ; maxh.SetSize ( numdomains ) ; for ( int i = 0; i < numdomains; i++) maxh[i] = 1000; quadmeshing.SetSize ( numdomains ); quadmeshing = false; tensormeshing.SetSize ( numdomains ); tensormeshing = false; layer.SetSize ( numdomains ); layer = 1; TestComment ( infile ); for ( int i=0; i> domainnr; infile >> material; strcpy (materials[domainnr-1], material); Flags flags; ch = 'a'; infile >> ch; while (ch == '-') { char flag[100]; flag[0]='-'; infile >> (flag+1); flags.SetCommandLineFlag (flag); ch = 'a'; infile >> ch; } if (infile.good()) infile.putback (ch); maxh[domainnr-1] = flags.GetNumFlag ( "maxh", 1000); if (flags.GetDefineFlag("quad")) quadmeshing[domainnr-1] = true; if (flags.GetDefineFlag("tensor")) tensormeshing[domainnr-1] = true; layer[domainnr-1] = int(flags.GetNumFlag ("layer", 1)); } } } return; } /* void CalcPartition (const SplineSegExt & spline, double l, double h, double h1, double h2, double hcurve, double elto0, Array & points) { double fperel, oldf, f; int n = 1000; points.SetSize (0); double dt = l / n; double sum = 0; for (int i = 1; i <= n; i++) { double t = (i-0.5)*dt; double fun = min3 (hcurve, t/elto0 + h1, (l-t)/elto0 + h2); double curv = spline.CalcCurvature (t/l); cout << "curv = " << curv << endl; if (curv < 1e-10) curv = 1e-10; fun = min2 (fun, 0.1/curv); sum += dt / fun; } int nel = int (sum+1); fperel = sum / nel; points.Append (0); int i = 1; oldf = 0; // t = 0.5 * dt; for (int j = 1; j <= n && i < nel; j++) { double t = (j-0.5)*dt; double fun = min3 (hcurve, t/elto0 + h1, (l-t)/elto0 + h2); double curv = spline.CalcCurvature (t/l); if (curv < 1e-10) curv = 1e-10; fun = min2 (fun, 0.1/curv); f = oldf + dt / fun; while (i * fperel < f && i < nel) { points.Append ( dt * (j-1) + (i * fperel - oldf) * fun); i++; } oldf = f; t += dt; } points.Append (l); } */ void SplineGeometry2d :: SetBCName (int bcnr, string name) { if (bcnr < 1) throw NgException ("Illegal nr in SetBCName"); int new_to_add = bcnr - bcnames.Size(); for (int i = 0; i < new_to_add; i++) bcnames.Append (new string("default")); delete bcnames[bcnr-1]; bcnames[bcnr-1] = new string(name); } string SplineGeometry2d :: GetBCName( int bcnr ) const { if (bcnames.Size() >= bcnr) if (bcnames[bcnr-1] ) return *bcnames[bcnr-1]; return "default"; } string * SplineGeometry2d :: BCNamePtr( int bcnr ) { if ( bcnr > bcnames.Size() ) return nullptr; else return bcnames[bcnr-1]; } int SplineGeometry2d :: GetBCNumber (string name) const { for (int i = 0; i < bcnames.Size(); i++) if (*bcnames[i] == name) return i+1; return 0; } int SplineGeometry2d :: AddBCName (string name) { bcnames.Append (new string(name)); return bcnames.Size(); } void SplineGeometry2d :: GetMaterial (int domnr, char* & material ) { if ( materials.Size() >= domnr) material = materials[domnr-1]; else material = 0; } void SplineGeometry2d :: SetMaterial (int domnr, const string & material) { int oldsize = materials.Size(); if (domnr > materials.Size()) materials.SetSize (domnr); for (int i = oldsize; i < domnr; i++) materials[i] = nullptr; if (domnr >= 1) // && domnr <= materials.Size()) { delete materials[domnr-1]; materials[domnr-1] = new char[material.size()+1]; strcpy(materials[domnr-1], material.c_str()); } else throw NgException ("material index out of range"); } double SplineGeometry2d :: GetDomainMaxh (const int domnr ) { if ( maxh.Size() >= domnr && domnr > 0) return maxh[domnr-1]; else return -1; } void SplineGeometry2d :: SetDomainMaxh (int domnr, double h) { int oldsize = maxh.Size(); if (domnr > maxh.Size()) maxh.SetSize (domnr); for (int i = oldsize; i < domnr; i++) maxh[i] = 1e99; if (domnr >= 1) maxh[domnr-1] = h; else throw NgException ("material index out of range"); } extern void MeshFromSpline2D (SplineGeometry2d & geometry, shared_ptr & mesh, MeshingParameters & mp); int SplineGeometry2d :: GenerateMesh (shared_ptr & mesh, MeshingParameters & mparam) { MeshFromSpline2D (*this, mesh, mparam); return 0; } Refinement & SplineGeometry2d :: GetRefinement () const { return * new Refinement2d (*this); } class SplineGeometryRegister : public GeometryRegister { public: virtual NetgenGeometry * Load (string filename) const; }; NetgenGeometry * SplineGeometryRegister :: Load (string filename) const { const char * cfilename = filename.c_str(); if (strcmp (&cfilename[strlen(cfilename)-4], "in2d") == 0) { PrintMessage (1, "Load 2D-Spline geometry file ", cfilename); ifstream infile(cfilename); SplineGeometry2d * hgeom = new SplineGeometry2d(); hgeom -> Load (cfilename); return hgeom; } return NULL; } class SplineGeoInit { public: SplineGeoInit() { geometryregister.Append (new SplineGeometryRegister); } }; SplineGeoInit sginit; } netgen-6.2.1804/libsrc/geom2d/CMakeLists.txt0000644000175000017500000000134613272137567017204 0ustar kurtkurtadd_definitions(-DNGLIB_EXPORTS) add_library(geom2d ${NG_LIB_TYPE} genmesh2d.cpp geom2dmesh.cpp geometry2d.cpp python_geom2d.cpp ) if(APPLE) set_target_properties( geom2d PROPERTIES SUFFIX ".so") endif(APPLE) if(NOT WIN32) target_link_libraries(geom2d mesh ${PYTHON_LIBRARIES}) install( TARGETS geom2d ${NG_INSTALL_DIR}) endif(NOT WIN32) if(USE_GUI) add_library(geom2dvis ${NG_LIB_TYPE} vsgeom2d.cpp) if(NOT WIN32) target_link_libraries(geom2dvis geom2d) install( TARGETS geom2dvis ${NG_INSTALL_DIR}) endif(NOT WIN32) endif(USE_GUI) install(FILES geom2dmesh.hpp geometry2d.hpp spline2d.hpp splinegeometry2.hpp vsgeom2d.hpp DESTINATION ${NG_INSTALL_DIR_INCLUDE}/geom2d COMPONENT netgen_devel ) netgen-6.2.1804/libsrc/geom2d/genmesh2d.cpp0000644000175000017500000004030613272137567017023 0ustar kurtkurt#include #include namespace netgen { // extern DLL_HEADER MeshingParameters mparam; extern void Optimize2d (Mesh & mesh, MeshingParameters & mp); void CalcPartition (const SplineSegExt & spline, // double l, MeshingParameters & mp, Mesh & mesh, // double h, double h1, double h2, double hcurve, double elto0, Array & points) { double fperel, oldf, f; int n = 10000; Array > xi(n); Array hi(n); for (int i = 0; i < n; i++) { xi[i] = spline.GetPoint ( (i+0.5) / n ); hi[i] = mesh.GetH (Point<3> (xi[i](0), xi[i](1), 0)); } // limit slope double gradh = min(1/elto0,mp.grading); for (int i = 0; i < n-1; i++) { double hnext = hi[i] + gradh * (xi[i+1]-xi[i]).Length(); hi[i+1] = min(hi[i+1], hnext); } for (int i = n-1; i > 1; i--) { double hnext = hi[i] + gradh * (xi[i-1]-xi[i]).Length(); hi[i-1] = min(hi[i-1], hnext); } points.SetSize (0); double len = spline.Length(); double dt = len / n; double sum = 0; for (int i = 1; i <= n; i++) { // double t = (i-0.5)*dt; double fun = hi[i-1]; sum += dt / fun; } int nel = int (sum+1); fperel = sum / nel; points.Append (0); int i = 1; oldf = 0; for (int j = 1; j <= n && i < nel; j++) { double t = (j-0.5)*dt; double fun = hi[j-1]; f = oldf + dt / fun; while (i * fperel < f && i < nel) { points.Append ( dt * (j-1) + (i * fperel - oldf) * fun); i++; } oldf = f; t += dt; } points.Append (len); } // partitionizes spline curve void Partition (const SplineSegExt & spline, MeshingParameters & mp, double hxxx, double elto0, Mesh & mesh, Point3dTree & searchtree, int segnr) { int n = 100; Point<2> mark, oldmark; Array curvepoints; double edgelength, edgelengthold; CalcPartition (spline, mp, mesh, elto0, curvepoints); double dt = 1.0 / n; int j = 1; Point<2> pold = spline.GetPoint (0); double lold = 0; oldmark = pold; edgelengthold = 0; Array locsearch; for (int i = 1; i <= n; i++) { Point<2> p = spline.GetPoint (i*dt); double l = lold + Dist (p, pold); while (j < curvepoints.Size() && (l >= curvepoints[j] || i == n)) { double frac = (curvepoints[j]-lold) / (l-lold); edgelength = i*dt + (frac-1)*dt; mark = spline.GetPoint (edgelength); { PointIndex pi1 = -1, pi2 = -1; Point3d mark3(mark(0), mark(1), 0); Point3d oldmark3(oldmark(0), oldmark(1), 0); double h = mesh.GetH (Point<3> (oldmark(0), oldmark(1), 0)); Vec<3> v (1e-4*h, 1e-4*h, 1e-4*h); searchtree.GetIntersecting (oldmark3 - v, oldmark3 + v, locsearch); for (int k = 0; k < locsearch.Size(); k++) if ( mesh[PointIndex(locsearch[k])].GetLayer() == spline.layer) pi1 = locsearch[k]; searchtree.GetIntersecting (mark3 - v, mark3 + v, locsearch); for (int k = 0; k < locsearch.Size(); k++) if ( mesh[PointIndex(locsearch[k])].GetLayer() == spline.layer) pi2 = locsearch[k]; if (pi1 == -1) { pi1 = mesh.AddPoint(oldmark3, spline.layer); searchtree.Insert (oldmark3, pi1); } if (pi2 == -1) { pi2 = mesh.AddPoint(mark3, spline.layer); searchtree.Insert (mark3, pi2); } Segment seg; seg.edgenr = segnr; seg.si = spline.bc; // segnr; seg[0] = pi1; seg[1] = pi2; seg.domin = spline.leftdom; seg.domout = spline.rightdom; seg.epgeominfo[0].edgenr = segnr; seg.epgeominfo[0].dist = edgelengthold; seg.epgeominfo[1].edgenr = segnr; seg.epgeominfo[1].dist = edgelength; seg.singedge_left = spline.hpref_left; seg.singedge_right = spline.hpref_right; mesh.AddSegment (seg); } oldmark = mark; edgelengthold = edgelength; j++; } pold = p; lold = l; } } void SplineGeometry2d :: PartitionBoundary (MeshingParameters & mp, double h, Mesh & mesh2d) { enum { D = 2 }; Box bbox; GetBoundingBox (bbox); double dist = Dist (bbox.PMin(), bbox.PMax()); Point<3> pmin; Point<3> pmax; pmin(2) = -dist; pmax(2) = dist; for(int j=0;j & p1 = spline.StartPI(); const GeomPoint<2> & p2 = spline.EndPI(); double h1 = min (p1.hmax, h/p1.refatpoint); mesh2d.RestrictLocalH (Point<3>(p1(0),p1(1),0), h1); double h2 = min (p2.hmax, h/p2.refatpoint); mesh2d.RestrictLocalH (Point<3>(p2(0),p2(1),0), h2); double len = spline.Length(); mesh2d.RestrictLocalHLine (Point<3>(p1(0),p1(1),0), Point<3>(p2(0),p2(1),0), len/mp.segmentsperedge); double hcurve = min (spline.hmax, h/spline.reffak); double hl = GetDomainMaxh (spline.leftdom); if (hl > 0) hcurve = min2 (hcurve, hl); double hr = GetDomainMaxh (spline.rightdom); if (hr > 0) hcurve = min2 (hcurve, hr); int np = 1000; for (double t = 0.5/np; t < 1; t += 1.0/np) { Point<2> x = spline.GetPoint(t); double hc = 1.0/mp.curvaturesafety / (1e-99+spline.CalcCurvature (t)); mesh2d.RestrictLocalH (Point<3> (x(0), x(1), 0), min2(hc, hcurve)); } } // first add all vertices (for compatible orientation on periodic bnds) { double diam2 = Dist2(pmin, pmax); for (int i = 0; i < splines.Size(); i++) for (int j : { 1, 2 }) { Point<2> hnewp = (j == 1) ? splines[i]->StartPI() : splines[i]->EndPI(); Point<3> newp(hnewp(0), hnewp(1), 0); int layer = GetSpline(i).layer; int npi = -1; for (PointIndex pi = PointIndex::BASE; pi < mesh2d.GetNP()+PointIndex::BASE; pi++) if (Dist2 (mesh2d.Point(pi), newp) < 1e-12 * diam2 && mesh2d.Point(pi).GetLayer() == layer) npi = pi; if (npi == -1) { npi = mesh2d.AddPoint (newp, layer); searchtree.Insert (newp, npi); } } } for (int i = 0; i < splines.Size(); i++) if (GetSpline(i).copyfrom == -1) { // astrid - set boundary meshsize to domain meshsize h // if no domain mesh size is given, the max h value from the bounding box is used double hl = GetDomainMaxh ( GetSpline(i).leftdom ); double hr = GetDomainMaxh ( GetSpline(i).rightdom ); double useh = h; if (hl > 0) useh = min2 (h, hl); if (hr > 0) useh = min2 (h, hr); Partition(GetSpline(i), mp, useh, elto0, mesh2d, searchtree, i+1); } else { CopyEdgeMesh (GetSpline(i).copyfrom, i+1, mesh2d, searchtree); } } void SplineGeometry2d :: CopyEdgeMesh (int from, int to, Mesh & mesh, Point3dTree & searchtree) { // const int D = 2; Array mappoints (mesh.GetNP()); Array param (mesh.GetNP()); mappoints = -1; param = 0; Point3d pmin, pmax; mesh.GetBox (pmin, pmax); double diam2 = Dist2(pmin, pmax); if (printmessage_importance>0) cout << "copy edge, from = " << from << " to " << to << endl; for (int i = 1; i <= mesh.GetNSeg(); i++) { const Segment & seg = mesh.LineSegment(i); if (seg.edgenr == from) { mappoints.Elem(seg[0]) = 1; param.Elem(seg[0]) = seg.epgeominfo[0].dist; mappoints.Elem(seg[1]) = 1; param.Elem(seg[1]) = seg.epgeominfo[1].dist; } } bool mapped = false; for (int i = 1; i <= mappoints.Size(); i++) { if (mappoints.Get(i) != -1) { Point<2> newp = splines.Get(to)->GetPoint (param.Get(i)); Point<3> newp3 (newp(0), newp(1), 0); int npi = -1; for (PointIndex pi = PointIndex::BASE; pi < mesh.GetNP()+PointIndex::BASE; pi++) if (Dist2 (mesh.Point(pi), newp3) < 1e-12 * diam2) npi = pi; if (npi == -1) { npi = mesh.AddPoint (newp3); searchtree.Insert (newp3, npi); } mappoints.Elem(i) = npi; mesh.GetIdentifications().Add (i, npi, to); mapped = true; } } if(mapped) mesh.GetIdentifications().SetType(to,Identifications::PERIODIC); // copy segments int oldnseg = mesh.GetNSeg(); for (int i = 1; i <= oldnseg; i++) { const Segment & seg = mesh.LineSegment(i); if (seg.edgenr == from) { Segment nseg; nseg.edgenr = to; nseg.si = GetSpline(to-1).bc; // splines.Get(to)->bc; nseg[0] = mappoints.Get(seg[0]); nseg[1] = mappoints.Get(seg[1]); nseg.domin = GetSpline(to-1).leftdom; nseg.domout = GetSpline(to-1).rightdom; nseg.epgeominfo[0].edgenr = to; nseg.epgeominfo[0].dist = param.Get(seg[0]); nseg.epgeominfo[1].edgenr = to; nseg.epgeominfo[1].dist = param.Get(seg[1]); mesh.AddSegment (nseg); } } } void MeshFromSpline2D (SplineGeometry2d & geometry, shared_ptr & mesh, MeshingParameters & mp) { PrintMessage (1, "Generate Mesh from spline geometry"); Box<2> bbox = geometry.GetBoundingBox (); if (bbox.Diam() < mp.maxh) mp.maxh = bbox.Diam(); // double h = mp.maxh; // mesh = make_shared(); mesh->SetDimension (2); Point3d pmin(bbox.PMin()(0), bbox.PMin()(1), -bbox.Diam()); Point3d pmax(bbox.PMax()(0), bbox.PMax()(1), bbox.Diam()); mesh->SetLocalH (pmin, pmax, mp.grading); mesh->SetGlobalH (mp.maxh); geometry.PartitionBoundary (mp, mp.maxh, *mesh); PrintMessage (3, "Boundary mesh done, np = ", mesh->GetNP()); // marks mesh points for hp-refinement for (int i = 0; i < geometry.GetNP(); i++) if (geometry.GetPoint(i).hpref) { double mindist = 1e99; PointIndex mpi(0); Point<2> gp = geometry.GetPoint(i); Point<3> gp3(gp(0), gp(1), 0); for (PointIndex pi = PointIndex::BASE; pi < mesh->GetNP()+PointIndex::BASE; pi++) if (Dist2(gp3, (*mesh)[pi]) < mindist) { mpi = pi; mindist = Dist2(gp3, (*mesh)[pi]); } (*mesh)[mpi].Singularity(geometry.GetPoint(i).hpref); } int maxdomnr = 0; for (SegmentIndex si = 0; si < mesh->GetNSeg(); si++) { if ( (*mesh)[si].domin > maxdomnr) maxdomnr = (*mesh)[si].domin; if ( (*mesh)[si].domout > maxdomnr) maxdomnr = (*mesh)[si].domout; } mesh->ClearFaceDescriptors(); for (int i = 1; i <= maxdomnr; i++) mesh->AddFaceDescriptor (FaceDescriptor (i, 0, 0, i)); // set Array bcnames... // number of bcnames int maxsegmentindex = 0; for (SegmentIndex si = 0; si < mesh->GetNSeg(); si++) if ( (*mesh)[si].si > maxsegmentindex) maxsegmentindex = (*mesh)[si].si; mesh->SetNBCNames(maxsegmentindex+1); for ( int sindex = 0; sindex <= maxsegmentindex; sindex++ ) mesh->SetBCName ( sindex, geometry.GetBCName( sindex+1 ) ); for (SegmentIndex si = 0; si < mesh->GetNSeg(); si++) (*mesh)[si].SetBCName ( (*mesh).GetBCNamePtr( (*mesh)[si].si-1 ) ); mesh->CalcLocalH(mp.grading); int bnp = mesh->GetNP(); // boundary points auto BndPntRange = mesh->Points().Range(); int hquad = mp.quad; for (int domnr = 1; domnr <= maxdomnr; domnr++) if (geometry.GetDomainTensorMeshing (domnr)) { // tensor product mesh Array nextpi(bnp); Array si1(bnp), si2(bnp); PointIndex firstpi; nextpi = -1; si1 = -1; si2 = -1; for (SegmentIndex si = 0; si < mesh->GetNSeg(); si++) { int p1 = -1, p2 = -2; if ( (*mesh)[si].domin == domnr) { p1 = (*mesh)[si][0]; p2 = (*mesh)[si][1]; } if ( (*mesh)[si].domout == domnr) { p1 = (*mesh)[si][1]; p2 = (*mesh)[si][0]; } if (p1 == -1) continue; nextpi[p1] = p2; // counter-clockwise int index = (*mesh)[si].si; if (si1[p1] != index && si2[p1] != index) { si2[p1] = si1[p1]; si1[p1] = index; } if (si1[p2] != index && si2[p2] != index) { si2[p2] = si1[p2]; si1[p2] = index; } } PointIndex c1(0), c2, c3, c4; // 4 corner points int nex = 1, ney = 1; for (PointIndex pi = 1; pi <= si2.Size(); pi++) if (si2[pi] != -1) { c1 = pi; break; } for (c2 = nextpi[c1]; si2[c2] == -1; c2 = nextpi[c2], nex++); for (c3 = nextpi[c2]; si2[c3] == -1; c3 = nextpi[c3], ney++); for (c4 = nextpi[c3]; si2[c4] == -1; c4 = nextpi[c4]); Array pts ( (nex+1) * (ney+1) ); // x ... inner loop pts = -1; for (PointIndex pi = c1, i = 0; pi != c2; pi = nextpi[pi], i++) pts[i] = pi; for (PointIndex pi = c2, i = 0; pi != c3; pi = nextpi[pi], i++) pts[(nex+1)*i+nex] = pi; for (PointIndex pi = c3, i = 0; pi != c4; pi = nextpi[pi], i++) pts[(nex+1)*(ney+1)-i-1] = pi; for (PointIndex pi = c4, i = 0; pi != c1; pi = nextpi[pi], i++) pts[(nex+1)*(ney-i)] = pi; for (PointIndex pix = nextpi[c1], ix = 0; pix != c2; pix = nextpi[pix], ix++) for (PointIndex piy = nextpi[c2], iy = 0; piy != c3; piy = nextpi[piy], iy++) { Point<3> p = (*mesh)[pix] + ( (*mesh)[piy] - (*mesh)[c2] ); pts[(nex+1)*(iy+1) + ix+1] = mesh -> AddPoint (p , 1, FIXEDPOINT); } for (int i = 0; i < ney; i++) for (int j = 0; j < nex; j++) { Element2d el(QUAD); el[0] = pts[i*(nex+1)+j]; el[1] = pts[i*(nex+1)+j+1]; el[2] = pts[(i+1)*(nex+1)+j+1]; el[3] = pts[(i+1)*(nex+1)+j]; el.SetIndex (domnr); mesh -> AddSurfaceElement (el); } } for (int domnr = 1; domnr <= maxdomnr; domnr++) { if (geometry.GetDomainTensorMeshing (domnr)) continue; double h = mp.maxh; if ( geometry.GetDomainMaxh ( domnr ) > 0 ) h = geometry.GetDomainMaxh(domnr); PrintMessage (3, "Meshing domain ", domnr, " / ", maxdomnr); int oldnf = mesh->GetNSE(); mp.quad = hquad || geometry.GetDomainQuadMeshing (domnr); Meshing2 meshing (mp, Box<3> (pmin, pmax)); Array compress(bnp); compress = -1; int cnt = 0; for (PointIndex pi : BndPntRange) if ( (*mesh)[pi].GetLayer() == geometry.GetDomainLayer(domnr)) { meshing.AddPoint ((*mesh)[pi], pi); cnt++; compress[pi] = cnt; } PointGeomInfo gi; gi.trignum = 1; for (SegmentIndex si = 0; si < mesh->GetNSeg(); si++) { if ( (*mesh)[si].domin == domnr) { meshing.AddBoundaryElement (compress[(*mesh)[si][0]], compress[(*mesh)[si][1]], gi, gi); } if ( (*mesh)[si].domout == domnr) { meshing.AddBoundaryElement (compress[(*mesh)[si][1]], compress[(*mesh)[si][0]], gi, gi); } } // not complete, use at own risk ... // meshing.Delaunay(*mesh, domnr, mp); mp.checkoverlap = 0; meshing.GenerateMesh (*mesh, mp, h, domnr); for (SurfaceElementIndex sei = oldnf; sei < mesh->GetNSE(); sei++) (*mesh)[sei].SetIndex (domnr); // astrid char * material; geometry.GetMaterial (domnr, material); if (material) mesh->SetMaterial (domnr, material); } mp.quad = hquad; int hsteps = mp.optsteps2d; mp.optimize2d = "smcm"; mp.optsteps2d = hsteps/2; Optimize2d (*mesh, mp); mp.optimize2d = "Smcm"; mp.optsteps2d = (hsteps+1)/2; Optimize2d (*mesh, mp); mp.optsteps2d = hsteps; mesh->Compress(); mesh->OrderElements(); mesh -> SetNextMajorTimeStamp(); mp.Render(); } } netgen-6.2.1804/libsrc/gprim/0000755000175000017500000000000013272137567014401 5ustar kurtkurtnetgen-6.2.1804/libsrc/gprim/spline.cpp0000644000175000017500000002775713272137567016421 0ustar kurtkurt/* Spline curve for Mesh generator */ #include #include #include #include "spline.hpp" namespace netgen { // just for testing (JS) template void ProjectTrivial (const SplineSeg3 & seg, const Point point, Point & point_on_curve, double & t) { double mindist = -1; for (int i = 0; i <= 1000; i++) { double ht = double(i)/1000; Point p = seg.GetPoint(ht); double dist = Dist2 (p, point); if (i == 0 || dist < mindist) { mindist = dist; t = ht; } } point_on_curve = seg.GetPoint(t); } template <> void CircleSeg<3> :: LineIntersections (const double a, const double b, const double c, Array < Point<3> > & points, const double eps) const { cerr << "CircleSeg<3>::LineIntersections not implemented" << endl; } template <> void CircleSeg<2> :: LineIntersections (const double a, const double b, const double c, Array < Point<2> > & points, const double eps) const { points.SetSize(0); double px=0,py=0; if(fabs(b) > 1e-20) py = -c/b; else px = -c/a; const double c1 = a*a + b*b; const double c2 = 2. * ( a*(py-pm(1)) - b*(px-pm(0))); const double c3 = pow(px-pm(0),2) + pow(py-pm(1),2) - pow(Radius(),2); const double discr = c2*c2 - 4*c1*c3; if(discr < 0) return; Array t; if(fabs(discr) < 1e-20) t.Append(-0.5*c2/c1); else { t.Append((-c2+sqrt(discr))/(2.*c1)); t.Append((-c2-sqrt(discr))/(2.*c1)); } for(int i=0; i p (px-t[i]*b,py+t[i]*a); double angle = atan2(p(1),p(0))+M_PI; if(angle > StartAngle()-eps && angle < EndAngle()+eps) points.Append(p); } } template SplineSeg3 :: SplineSeg3 (const GeomPoint & ap1, const GeomPoint & ap2, const GeomPoint & ap3) : p1(ap1), p2(ap2), p3(ap3) { weight = Dist (p1, p3) / sqrt (0.5 * (Dist2 (p1, p2) + Dist2 (p2, p3))); // weight = sqrt(2); // cout << "weight = " << weight << endl; proj_latest_t = 0.5; } template inline Point SplineSeg3 :: GetPoint (double t) const { double b1, b2, b3; b1 = (1-t)*(1-t); b2 = weight * t * (1-t); b3 = t * t; Vec hp = b1 * Vec(p1) + b2 * Vec(p2) + b3 * Vec(p3); double w = b1+b2+b3; return Point ((1.0/w)*hp); /* double x, y, w; x = p1(0) * b1 + p2(0) * b2 + p3(0) * b3; y = p1(1) * b1 + p2(1) * b2 + p3(1) * b3; w = b1 + b2 + b3; if(D==3) { double z = p1(2) * b1 + p2(2) * b2 + p3(2) * b3; return Point (x/w, y/w, z/w); } else return Point (x/w, y/w); */ } template Vec SplineSeg3 :: GetTangent (const double t) const { const double b1 = (1.-t)*((weight-2.)*t-weight); const double b2 = weight*(1.-2.*t); const double b3 = t*((weight-2)*t+2.); Vec retval; for(int i=0; i void SplineSeg3 :: GetCoeff (Vector & u) const { DenseMatrix a(6, 6); DenseMatrix ata(6, 6); Vector f(6); u.SetSize(6); // ata.SetSymmetric(1); double t = 0; for (int i = 0; i < 5; i++, t += 0.25) { Point p = GetPoint (t); a(i, 0) = p(0) * p(0); a(i, 1) = p(1) * p(1); a(i, 2) = p(0) * p(1); a(i, 3) = p(0); a(i, 4) = p(1); a(i, 5) = 1; } a(5, 0) = 1; CalcAtA (a, ata); u = 0; u(5) = 1; a.MultTrans (u, f); ata.Solve (f, u); // the sign Point p0 = GetPoint(0); Vec ht = GetTangent(0); Vec<2> tang(ht(0), ht(1)); double gradx = 2.*u(0)*p0(0) + u(2)*p0(1) + u(3); double grady = 2.*u(1)*p0(1) + u(2)*p0(0) + u(4); Vec<2> gradn (grady, -gradx); if (tang * gradn < 0) u *= -1; } template void SplineSeg3 :: GetCoeff (Vector & u, Point pref) const { DenseMatrix a(6, 6); DenseMatrix ata(6, 6); Vector f(6); u.SetSize(6); // ata.SetSymmetric(1); double t = 0; for (int i = 0; i < 5; i++, t += 0.25) { Vec p = GetPoint (t)-pref; a(i, 0) = p(0) * p(0); a(i, 1) = p(1) * p(1); a(i, 2) = p(0) * p(1); a(i, 3) = p(0); a(i, 4) = p(1); a(i, 5) = 1; } a(5, 0) = 1; CalcAtA (a, ata); u = 0; u(5) = 1; a.MultTrans (u, f); ata.Solve (f, u); // the sign // Point p0 = GetPoint(0); Vec ht = GetTangent(0); Vec<2> tang(ht(0), ht(1)); double gradx = u(3); double grady = u(4); // double gradx = 2.*u(0)*p0(0) + u(2)*p0(1) + u(3); // double grady = 2.*u(1)*p0(1) + u(2)*p0(0) + u(4); Vec<2> gradn (grady, -gradx); if (tang * gradn < 0) u *= -1; } template void SplineSeg3 :: Project (const Point point, Point & point_on_curve, double & t) const { double t_old = -1; /* if(proj_latest_t > 0. && proj_latest_t < 1.) t = proj_latest_t; else t = 0.5; */ double tmin = 1; double dist_min2 = Dist2 (GetPoint(tmin), point); for (double ti = 0; ti < 0.99; ti += 0.25) { double di = Dist2(GetPoint(ti), point); if (di < dist_min2) { tmin = ti; dist_min2 = di; } } t = tmin; Point phi; Vec phip,phipp,phimp; int i=0; while(t > -0.5 && t < 1.5 && i<20 && fabs(t-t_old) > 1e-15 ) { GetDerivatives(t,phi,phip,phipp); t_old = t; phimp = phi-point; //t = min2(max2(t-(phip*phimp)/(phipp*phimp + phip*phip),0.),1.); t -= (phip*phimp)/(phipp*phimp + phip*phip); i++; } //if(i<10 && t > 0. && t < 1.) if(i<20 && t > -0.4 && t < 1.4) { if(t < 0) { t = 0.; } if(t > 1) { t = 1.; } point_on_curve = SplineSeg3::GetPoint(t); double dist = Dist(point,point_on_curve); phi = SplineSeg3 ::GetPoint(0); double auxdist = Dist(phi,point); if(auxdist < dist) { t = 0.; point_on_curve = phi; dist = auxdist; } phi = SplineSeg3 ::GetPoint(1); auxdist = Dist(phi,point); if(auxdist < dist) { t = 1.; point_on_curve = phi; dist = auxdist; } } else { double t0 = 0; double t1 = 0.5; double t2 = 1.; double d0,d1,d2; //(*testout) << "newtonersatz" << endl; while(t2-t0 > 1e-8) { phi = SplineSeg3 ::GetPoint(t0); d0 = Dist(phi,point); phi = SplineSeg3 ::GetPoint(t1); d1 = Dist(phi,point); phi = SplineSeg3 ::GetPoint(t2); d2 = Dist(phi,point); double a = (2.*d0 - 4.*d1 +2.*d2)/pow(t2-t0,2); if(a <= 0) { if(d0 < d2) t2 -= 0.3*(t2-t0); else t0 += 0.3*(t2-t0); t1 = 0.5*(t2+t0); } else { double b = (d1-d0-a*(t1*t1-t0*t0))/(t1-t0); double auxt1 = -0.5*b/a; if(auxt1 < t0) { t2 -= 0.4*(t2-t0); t0 = max2(0.,t0-0.1*(t2-t0)); } else if (auxt1 > t2) { t0 += 0.4*(t2-t0); t2 = min2(1.,t2+0.1*(t2-t0)); } else { t1 = auxt1; auxt1 = 0.25*(t2-t0); t0 = max2(0.,t1-auxt1); t2 = min2(1.,t1+auxt1); } t1 = 0.5*(t2+t0); } } phi = SplineSeg3 ::GetPoint(t0); d0 = Dist(phi,point); phi = SplineSeg3 ::GetPoint(t1); d1 = Dist(phi,point); phi = SplineSeg3 ::GetPoint(t2); d2 = Dist(phi,point); double mind = d0; t = t0; if(d1 < mind) { t = t1; mind = d1; } if(d2 < mind) { t = t2; mind = d2; } point_on_curve = SplineSeg3 ::GetPoint(t); } //(*testout) << " latest_t " << proj_latest_t << " t " << t << endl; proj_latest_t = t; /* // test it by trivial sampling double ht; Point hp; ProjectTrivial (*this, point, hp, ht); if (fabs (t-ht) > 1e-3) { // if (Dist2 (point, hp) < Dist2 (point, point_on_curve)) cout << "project is wrong" << endl; cout << "t = " << t << ", ht = " << ht << endl; cout << "dist org = " << Dist(point, point_on_curve) << endl; cout << "dist trivial = " << Dist(point, hp) << endl; } */ } template void SplineSeg3 :: GetDerivatives (const double t, Point & point, Vec & first, Vec & second) const { Vec v1(p1), v2(p2), v3(p3); double b1 = (1.-t)*(1.-t); double b2 = weight*t*(1.-t); double b3 = t*t; double w = b1+b2+b3; b1 *= 1./w; b2 *= 1./w; b3 *= 1./w; double b1p = 2.*(t-1.); double b2p = weight*(1.-2.*t); double b3p = 2.*t; const double wp = b1p+b2p+b3p; const double fac1 = wp/w; b1p *= 1./w; b2p *= 1./w; b3p *= 1./w; const double b1pp = 2.; const double b2pp = -2.*weight; const double b3pp = 2.; const double wpp = b1pp+b2pp+b3pp; const double fac2 = (wpp*w-2.*wp*wp)/(w*w); for(int i=0; i double SplineSeg3<2> :: MaxCurvature(void) const { Vec<2> v1 = p1-p2; Vec<2> v2 = p3-p2; double l1 = v1.Length(); double l2 = v2.Length(); double cosalpha = (v1*v2)/(l1*l2); return sqrt(cosalpha + 1.)/(min2(l1,l2)*(1.-cosalpha)); } template<> double SplineSeg3<3> :: MaxCurvature(void) const { Vec<3> v1 = p1-p2; Vec<3> v2 = p3-p2; double l1 = v1.Length(); double l2 = v2.Length(); double cosalpha = v1*v2/(l1*l2); return sqrt(cosalpha + 1.)/(min2(l1,l2)*(1.-cosalpha)); } template void SplineSeg3 :: LineIntersections (const double a, const double b, const double c, Array < Point > & points, const double eps) const { points.SetSize(0); double t; const double c1 = a*p1(0) - weight*a*p2(0) + a*p3(0) + b*p1(1) - weight*b*p2(1) + b*p3(1) + (2.-weight)*c; const double c2 = -2.*a*p1(0) + weight*a*p2(0) -2.*b*p1(1) + weight*b*p2(1) + (weight-2.)*c; const double c3 = a*p1(0) + b*p1(1) + c; if(fabs(c1) < 1e-20) { if(fabs(c2) < 1e-20) return; t = -c3/c2; if((t > -eps) && (t < 1.+eps)) points.Append(GetPoint(t)); return; } const double discr = c2*c2-4.*c1*c3; if(discr < 0) return; if(fabs(discr/(c1*c1)) < 1e-14) { t = -0.5*c2/c1; if((t > -eps) && (t < 1.+eps)) points.Append(GetPoint(t)); return; } t = (-c2 + sqrt(discr))/(2.*c1); if((t > -eps) && (t < 1.+eps)) points.Append(GetPoint(t)); t = (-c2 - sqrt(discr))/(2.*c1); if((t > -eps) && (t < 1.+eps)) points.Append(GetPoint(t)); } template < int D > void SplineSeg3 :: GetRawData (Array & data) const { data.Append(3); for(int i=0; i; template class SplineSeg3<3>; } netgen-6.2.1804/libsrc/gprim/geomops.hpp0000644000175000017500000001575113272137567016574 0ustar kurtkurt#ifndef FILE_GEOMOPS #define FILE_GEOMOPS /* *************************************************************************/ /* File: geomops.hpp */ /* Author: Joachim Schoeberl */ /* Date: 20. Jul. 02 */ /* *************************************************************************/ namespace netgen { /* Point - Vector operations */ template inline Vec operator+ (Vec a, Vec b) { Vec res; for (int i = 0; i < D; i++) res(i) = a(i) + b(i); return res; } template inline Point operator+ (Point a, Vec b) { Point res; for (int i = 0; i < D; i++) res(i) = a(i) + b(i); return res; } template inline Vec operator- (Point a, Point b) { Vec res; for (int i = 0; i < D; i++) res(i) = a(i) - b(i); return res; } template inline Point operator- (Point a, Vec b) { Point res; for (int i = 0; i < D; i++) res(i) = a(i) - b(i); return res; } template inline Vec operator- (Vec a, Vec b) { Vec res; for (int i = 0; i < D; i++) res(i) = a(i) - b(i); return res; } template inline Vec operator* (T s, Vec b) { Vec res; for (int i = 0; i < D; i++) res(i) = s * b(i); return res; } template inline double operator* (Vec a, Vec b) { double sum = 0; for (int i = 0; i < D; i++) sum += a(i) * b(i); return sum; } template inline Vec operator- (Vec b) { Vec res; for (int i = 0; i < D; i++) res(i) = -b(i); return res; } template inline Point & operator+= (Point & a, Vec b) { for (int i = 0; i < D; i++) a(i) += b(i); return a; } template inline Vec & operator+= (Vec & a, Vec b) { for (int i = 0; i < D; i++) a(i) += b(i); return a; } template inline Point & operator-= (Point & a, const Vec & b) { for (int i = 0; i < D; i++) a(i) -= b(i); return a; } template inline Vec & operator-= (Vec & a, const Vec & b) { for (int i = 0; i < D; i++) a(i) -= b(i); return a; } template inline Vec & operator*= (Vec & a, T2 s) { for (int i = 0; i < D; i++) a(i) *= s; return a; } template inline Vec & operator/= (Vec & a, double s) { for (int i = 0; i < D; i++) a(i) /= s; return a; } // Matrix - Vector operations /* template inline Vec operator* (const Mat & m, const Vec & v) { Vec res; for (int i = 0; i < H; i++) { res(i) = 0; for (int j = 0; j < W; j++) res(i) += m(i,j) * v(j); } return res; } */ // thanks to VC60 partial template specialization features !!! inline Vec<2> operator* (const Mat<2,2> & m, const Vec<2> & v) { Vec<2> res; for (int i = 0; i < 2; i++) { res(i) = 0; for (int j = 0; j < 2; j++) res(i) += m(i,j) * v(j); } return res; } inline Vec<2> operator* (const Mat<2,3> & m, const Vec<3> & v) { Vec<2> res; for (int i = 0; i < 2; i++) { res(i) = 0; for (int j = 0; j < 3; j++) res(i) += m(i,j) * v(j); } return res; } inline Vec<3> operator* (const Mat<3,2> & m, const Vec<2> & v) { Vec<3> res; for (int i = 0; i < 3; i++) { res(i) = 0; for (int j = 0; j < 2; j++) res(i) += m(i,j) * v(j); } return res; } inline Vec<3> operator* (const Mat<3,3> & m, const Vec<3> & v) { Vec<3> res; for (int i = 0; i < 3; i++) { res(i) = 0; for (int j = 0; j < 3; j++) res(i) += m(i,j) * v(j); } return res; } /* template inline Mat operator* (const Mat & a, const Mat & b) { Mat m; for (int i = 0; i < H1; i++) for (int j = 0; j < W2; j++) { double sum = 0; for (int k = 0; k < W1; k++) sum += a(i,k) * b(k, j); m(i,j) = sum; } return m; } */ template inline Mat<2,2,T> operator* (const Mat<2,2,T> & a, const Mat<2,2,T> & b) { Mat<2,2,T> m; for (int i = 0; i < 2; i++) for (int j = 0; j < 2; j++) { T sum(0); for (int k = 0; k < 2; k++) sum += a(i,k) * b(k, j); m(i,j) = sum; } return m; } inline Mat<2,2> operator* (const Mat<2,3> & a, const Mat<3,2> & b) { Mat<2,2> m; for (int i = 0; i < 2; i++) for (int j = 0; j < 2; j++) { double sum = 0; for (int k = 0; k < 3; k++) sum += a(i,k) * b(k, j); m(i,j) = sum; } return m; } template inline Mat<3,2,T> operator* (const Mat<3,2,T> & a, const Mat<2,2,T> & b) { Mat<3,2,T> m; for (int i = 0; i < 3; i++) for (int j = 0; j < 2; j++) { T sum(0.0); for (int k = 0; k < 2; k++) sum += a(i,k) * b(k, j); m(i,j) = sum; } return m; } inline Mat<2,3> operator* (const Mat<2,2> & a, const Mat<2,3> & b) { Mat<2,3> m; for (int i = 0; i < 2; i++) for (int j = 0; j < 3; j++) { double sum = 0; for (int k = 0; k < 2; k++) sum += a(i,k) * b(k, j); m(i,j) = sum; } return m; } template inline Mat<3,3,T> operator* (const Mat<3,3,T> & a, const Mat<3,3,T> & b) { Mat<3,3,T> m; for (int i = 0; i < 3; i++) for (int j = 0; j < 3; j++) { T sum = T(0); for (int k = 0; k < 3; k++) sum += a(i,k) * b(k, j); m(i,j) = sum; } return m; } template inline Mat Trans (const Mat & m) { Mat res; for (int i = 0; i < H; i++) for (int j = 0; j < W; j++) res(j,i) = m(i,j); return res; } template inline ostream & operator<< (ostream & ost, const Vec & a) { ost << "("; for (int i = 0; i < D-1; i++) ost << a(i) << ", "; ost << a(D-1) << ")"; return ost; } template inline ostream & operator<< (ostream & ost, const Point & a) { ost << "("; for (int i = 0; i < D-1; i++) ost << a(i) << ", "; ost << a(D-1) << ")"; return ost; } template inline ostream & operator<< (ostream & ost, const Box & b) { ost << b.PMin() << " - " << b.PMax(); return ost; } template inline ostream & operator<< (ostream & ost, const Mat & m) { ost << "("; for (int i = 0; i < H; i++) { for (int j = 0; j < W; j++) ost << m(i,j) << " "; ost << endl; } return ost; } } #endif netgen-6.2.1804/libsrc/gprim/geomtest3d.cpp0000644000175000017500000005441313272137567017172 0ustar kurtkurt#include #include #include #include namespace netgen { int IntersectTriangleLine (const Point<3> ** tri, const Point<3> ** line) { Vec3d vl(*line[0], *line[1]); Vec3d vt1(*tri[0], *tri[1]); Vec3d vt2(*tri[0], *tri[2]); Vec3d vrs(*tri[0], *line[0]); // static DenseMatrix a(3), ainv(3); // static Vector rs(3), lami(3); Mat<3,3> a, ainv; Vec<3> rs, lami; int i; /* (*testout) << "Tri-Line inters: " << endl << "tri = " << *tri[0] << ", " << *tri[1] << ", " << *tri[2] << endl << "line = " << *line[0] << ", " << *line[1] << endl; */ for (i = 0; i < 3; i++) { a(i, 0) = -vl.X(i+1); a(i, 1) = vt1.X(i+1); a(i, 2) = vt2.X(i+1); rs(i) = vrs.X(i+1); } // double det = a.Det(); double det = Det(a); double arel = vl.Length() * vt1.Length() * vt2.Length(); /* double amax = 0; for (i = 1; i <= 9; i++) if (fabs (a.Get(i)) > amax) amax = fabs(a.Get(i)); */ // new !!!! if (fabs (det) <= 1e-10 * arel) { #ifdef DEVELOP // line parallel to triangle ! // cout << "ERROR: IntersectTriangleLine degenerated" << endl; // (*testout) << "WARNING: IntersectTriangleLine degenerated\n"; /* (*testout) << "lin-tri intersection: " << endl << "line = " << *line[0] << " - " << *line[1] << endl << "tri = " << *tri[0] << " - " << *tri[1] << " - " << *tri[2] << endl << "lami = " << lami << endl << "pc = " << ( *line[0] + lami.Get(1) * vl ) << endl << " = " << ( *tri[0] + lami.Get(2) * vt1 + lami.Get(3) * vt2) << endl << " a = " << a << endl << " ainv = " << ainv << endl << " det(a) = " << det << endl << " rs = " << rs << endl; */ #endif return 0; } CalcInverse (a, ainv); // ainv.Mult (rs, lami); lami = ainv * rs; // (*testout) << "lami = " << lami << endl; double eps = 1e-6; if ( (lami(0) >= -eps && lami(0) <= 1+eps && lami(1) >= -eps && lami(2) >= -eps && lami(1) + lami(2) <= 1+eps) && ! (lami(0) >= eps && lami(0) <= 1-eps && lami(1) >= eps && lami(2) >= eps && lami(1) + lami(2) <= 1-eps) ) { #ifdef DEVELOP // cout << "WARNING: IntersectTriangleLine degenerated" << endl; (*testout) << "WARNING: IntersectTriangleLine numerical inexact" << endl; (*testout) << "lin-tri intersection: " << endl << "line = " << *line[0] << " - " << *line[1] << endl << "tri = " << *tri[0] << " - " << *tri[1] << " - " << *tri[2] << endl << "lami = " << lami << endl << "pc = " << ( *line[0] + lami(0) * vl ) << endl << " = " << ( *tri[0] + lami(1) * vt1 + lami(2) * vt2) << endl << " a = " << a << endl << " ainv = " << ainv << endl << " det(a) = " << det << endl << " rs = " << rs << endl; #endif } if (lami(0) >= 0 && lami(0) <= 1 && lami(1) >= 0 && lami(2) >= 0 && lami(1) + lami(2) <= 1) { return 1; } return 0; } int IntersectTetTriangle (const Point<3> ** tet, const Point<3> ** tri, const int * tetpi, const int * tripi) { int i, j; double diam = Dist (*tri[0], *tri[1]); double epsrel = 1e-8; double eps = diam * epsrel; double eps2 = eps * eps; int cnt = 0; int tetp1 = -1, tetp2 = -1; int trip1 = -1, trip2 = -1; int tetp3, tetp4, trip3; /* for (i = 0; i < 4; i++) loctetpi[i] = -1; */ if (!tetpi) { for (i = 0; i <= 2; i++) { // loctripi[i] = -1; for (j = 0; j <= 3; j++) { if (Dist2 (*tet[j], *tri[i]) < eps2) { // loctripi[i] = j; // loctetpi[j] = i; cnt++; tetp2 = tetp1; tetp1 = j; trip2 = trip1; trip1 = i; break; } } } } else { for (i = 0; i <= 2; i++) { // loctripi[i] = -1; for (j = 0; j <= 3; j++) { if (tetpi[j] == tripi[i]) { // loctripi[i] = j; // loctetpi[j] = i; cnt++; tetp2 = tetp1; tetp1 = j; trip2 = trip1; trip1 = i; break; } } } } // (*testout) << "cnt = " << cnt << endl; // (*testout) << "tet-trig inters, cnt = " << cnt << endl; // cnt .. number of common points switch (cnt) { case 0: { Vec3d no, n; int inpi[3]; // check, if some trigpoint is in tet: for (j = 0; j < 3; j++) inpi[j] = 1; for (i = 1; i <= 4; i++) { int pi1 = i % 4; int pi2 = (i+1) % 4; int pi3 = (i+2) % 4; int pi4 = (i+3) % 4; Vec3d v1 (*tet[pi1], *tet[pi2]); Vec3d v2 (*tet[pi1], *tet[pi3]); Vec3d v3 (*tet[pi1], *tet[pi4]); Cross (v1, v2, n); // n /= n.Length(); double nl = n.Length(); if (v3 * n > 0) n *= -1; int outeri = 1; for (j = 0; j < 3; j++) { Vec3d v(*tet[pi1], *tri[j]); if ( v * n < eps * nl) outeri = 0; else inpi[j] = 0; } if (outeri) return 0; } if (inpi[0] || inpi[1] || inpi[2]) { return 1; } // check, if some tet edge intersects triangle: const Point<3> * line[2], *tetf[3]; for (i = 0; i <= 2; i++) for (j = i+1; j <= 3; j++) { line[0] = tet[i]; line[1] = tet[j]; if (IntersectTriangleLine (tri, &line[0])) return 1; } // check, if triangle line intersects tet face: for (i = 0; i <= 3; i++) { for (j = 0; j <= 2; j++) tetf[j] = tet[(i+j) % 4]; for (j = 0; j <= 2; j++) { line[0] = tri[j]; line[1] = tri[(j+1) % 3]; if (IntersectTriangleLine (&tetf[0], &line[0])) return 1; } } return 0; //GH break; } case 1: { trip2 = 0; while (trip2 == trip1) trip2++; trip3 = 3 - trip1 - trip2; tetp2 = 0; while (tetp2 == tetp1) tetp2++; tetp3 = 0; while (tetp3 == tetp1 || tetp3 == tetp2) tetp3++; tetp4 = 6 - tetp1 - tetp2 - tetp3; Vec3d vtri1 = *tri[trip2] - *tri[trip1]; Vec3d vtri2 = *tri[trip3] - *tri[trip1]; Vec3d ntri; Cross (vtri1, vtri2, ntri); // tri durch tet ? // fehlt noch // test 3 tet-faces: for (i = 1; i <= 3; i++) { Vec3d vtet1, vtet2; switch (i) { case 1: { vtet1 = *tet[tetp2] - *tet[tetp1]; vtet2 = *tet[tetp3] - *tet[tetp1]; break; } case 2: { vtet1 = *tet[tetp3] - *tet[tetp1]; vtet2 = *tet[tetp4] - *tet[tetp1]; break; } case 3: { vtet1 = *tet[tetp4] - *tet[tetp1]; vtet2 = *tet[tetp2] - *tet[tetp1]; break; } } Vec3d ntet; Cross (vtet1, vtet2, ntet); Vec3d crline = Cross (ntri, ntet); double lcrline = crline.Length(); if (lcrline < eps * eps * eps * eps) // new change ! continue; if (vtri1 * crline + vtri2 * crline < 0) crline *= -1; crline /= lcrline; double lam1, lam2, lam3, lam4; LocalCoordinates (vtri1, vtri2, crline, lam1, lam2); LocalCoordinates (vtet1, vtet2, crline, lam3, lam4); if (lam1 > -epsrel && lam2 > -epsrel && lam3 > -epsrel && lam4 > -epsrel) { /* (*testout) << "lcrline = " << lcrline << " eps = " << eps << " diam = " << diam << endl; (*testout) << "hit, cnt == 1 " << "lam1,2,3,4 = " << lam1 << ", " << lam2 << ", " << lam3 << ", " << lam4 << "\n"; */ return 1; } } return 0; //GH break; } case 2: { // common edge tetp3 = 0; while (tetp3 == tetp1 || tetp3 == tetp2) tetp3++; tetp4 = 6 - tetp1 - tetp2 - tetp3; trip3 = 3 - trip1 - trip2; // (*testout) << "trip1,2,3 = " << trip1 << ", " << trip2 << ", " << trip3 << endl; // (*testout) << "tetp1,2,3,4 = " << tetp1 << ", " << tetp2 // << ", " << tetp3 << ", " << tetp4 << endl; Vec3d vtri = *tri[trip3] - *tri[trip1]; Vec3d vtet1 = *tet[tetp3] - *tri[trip1]; Vec3d vtet2 = *tet[tetp4] - *tri[trip1]; Vec3d n = *tri[trip2] - *tri[trip1]; n /= n.Length(); vtet1 -= (n * vtet1) * n; vtet2 -= (n * vtet2) * n; double lam1, lam2; LocalCoordinates (vtet1, vtet2, vtri, lam1, lam2); if (lam1 < -epsrel || lam2 < -epsrel) return 0; else { /* (*testout) << "vtet1 = " << vtet1 << endl; (*testout) << "vtet2 = " << vtet2 << endl; (*testout) << "vtri = " << vtri << endl; (*testout) << "lam1 = " << lam1 << " lam2 = " << lam2 << endl; (*testout) << (lam1 * (vtet1 * vtet1) + lam2 * (vtet1 * vtet2)) << " = " << (vtet1 * vtri) << endl; (*testout) << (lam1 * (vtet1 * vtet2) + lam2 * (vtet2 * vtet2)) << " = " << (vtet2 * vtri) << endl; (*testout) << "tet = "; for (j = 0; j < 4; j++) (*testout) << (*tet[j]) << " "; (*testout) << endl; (*testout) << "tri = "; for (j = 0; j < 3; j++) (*testout) << (*tri[j]) << " "; (*testout) << endl; (*testout) << "hit, cnt == 2" << endl; */ return 1; } break; } case 3: { // common face return 0; } } (*testout) << "hit, cnt = " << cnt << endl; return 1; } int IntersectTetTriangleRef (const Point<3> ** tri, const int * tripi) { int i, j; double eps = 1e-8; // double eps2 = eps * eps; static Point<3> rtetp1(0, 0, 0); static Point<3> rtetp2(1, 0, 0); static Point<3> rtetp3(0, 1, 0); static Point<3> rtetp4(0, 0, 1); static const Point<3> * tet[] = { &rtetp1, &rtetp2, &rtetp3, &rtetp4 }; static int tetpi[] = { 1, 2, 3, 4 }; // return IntersectTetTriangle (tet, tri, tetpi, tripi); int cnt = 0; int tetp1 = -1, tetp2 = -1; int trip1 = -1, trip2 = -1; int tetp3, tetp4, trip3; /* if (!tetpi) { for (i = 0; i <= 2; i++) { for (j = 0; j <= 3; j++) { if (Dist2 (*tet[j], *tri[i]) < eps2) { cnt++; tetp2 = tetp1; tetp1 = j; trip2 = trip1; trip1 = i; break; } } } } else */ { for (i = 0; i <= 2; i++) { for (j = 0; j <= 3; j++) { if (tetpi[j] == tripi[i]) { cnt++; tetp2 = tetp1; tetp1 = j; trip2 = trip1; trip1 = i; break; } } } } // (*testout) << "cnt = " << cnt << endl; switch (cnt) { case 0: { Vec3d no, n; // int inpi[3]; int pside[3][4]; for (j = 0; j < 3; j++) { pside[j][0] = (*tri[j])(0) > -eps; pside[j][1] = (*tri[j])(1) > -eps; pside[j][2] = (*tri[j])(2) > -eps; pside[j][3] = (*tri[j])(0) + (*tri[j])(1) + (*tri[j])(2) < 1+eps; } for (j = 0; j < 4; j++) { if (!pside[0][j] && !pside[1][j] && !pside[2][j]) return 0; } for (j = 0; j < 3; j++) { if (pside[j][0] && pside[j][1] && pside[j][2] && pside[j][3]) return 1; } const Point<3> * line[2], *tetf[3]; for (i = 0; i <= 2; i++) for (j = i+1; j <= 3; j++) { line[0] = tet[i]; line[1] = tet[j]; if (IntersectTriangleLine (tri, &line[0])) return 1; } for (i = 0; i <= 3; i++) { for (j = 0; j <= 2; j++) tetf[j] = tet[(i+j) % 4]; for (j = 0; j <= 2; j++) { line[0] = tri[j]; line[1] = tri[(j+1) % 3]; if (IntersectTriangleLine (&tetf[0], &line[0])) return 1; } } return 0; break; } case 1: { trip2 = 0; if (trip2 == trip1) trip2++; trip3 = 3 - trip1 - trip2; tetp2 = 0; while (tetp2 == tetp1) tetp2++; tetp3 = 0; while (tetp3 == tetp1 || tetp3 == tetp2) tetp3++; tetp4 = 6 - tetp1 - tetp2 - tetp3; Vec3d vtri1 = *tri[trip2] - *tri[trip1]; Vec3d vtri2 = *tri[trip3] - *tri[trip1]; Vec3d ntri; Cross (vtri1, vtri2, ntri); // tri durch tet ? /* Vec3d vtet1(*tet[tetp1], *tet[tetp2]); Vec3d vtet2(*tet[tetp1], *tet[tetp3]); Vec3d vtet3(*tet[tetp1], *tet[tetp4]); Vec3d sol; SolveLinearSystem (vtet1, vtet2, vtet3, vtri1, sol); if (sol.X() > 0 && sol.Y() > 0 && sol.Z() > 0) return 1; SolveLinearSystem (vtet1, vtet2, vtet3, vtri2, sol); if (sol.X() > 0 && sol.Y() > 0 && sol.Z() > 0) return 1; */ // test 3 tet-faces: for (i = 1; i <= 3; i++) { Vec3d vtet1, vtet2; switch (i) { case 1: { vtet1 = *tet[tetp2] - *tet[tetp1]; vtet2 = *tet[tetp3] - *tet[tetp1]; break; } case 2: { vtet1 = *tet[tetp3] - *tet[tetp1]; vtet2 = *tet[tetp4] - *tet[tetp1]; break; } case 3: { vtet1 = *tet[tetp4] - *tet[tetp1]; vtet2 = *tet[tetp2] - *tet[tetp1]; break; } } Vec3d ntet; Cross (vtet1, vtet2, ntet); Vec3d crline = Cross (ntri, ntet); double lcrline = crline.Length(); if (lcrline < eps * eps) continue; if (vtri1 * crline + vtri2 * crline < 0) crline *= -1; double lam1, lam2, lam3, lam4; LocalCoordinates (vtri1, vtri2, crline, lam1, lam2); LocalCoordinates (vtet1, vtet2, crline, lam3, lam4); if (lam1 > -eps && lam2 > -eps && lam3 > -eps && lam4 > -eps) { // (*testout) << "hit, cnt == 1" << "\n"; return 1; } } return 0; break; } case 2: { // common edge tetp3 = 0; while (tetp3 == tetp1 || tetp3 == tetp2) tetp3++; tetp4 = 6 - tetp1 - tetp2 - tetp3; trip3 = 3 - trip1 - trip2; // (*testout) << "trip1,2,3 = " << trip1 << ", " << trip2 << ", " << trip3 << endl; // (*testout) << "tetp1,2,3,4 = " << tetp1 << ", " << tetp2 // << ", " << tetp3 << ", " << tetp4 << endl; Vec3d vtri = *tri[trip3] - *tri[trip1]; Vec3d vtet1 = *tet[tetp3] - *tri[trip1]; Vec3d vtet2 = *tet[tetp4] - *tri[trip1]; Vec3d n = *tri[trip2] - *tri[trip1]; n /= n.Length(); vtet1 -= (n * vtet1) * n; vtet2 -= (n * vtet2) * n; double lam1, lam2; LocalCoordinates (vtet1, vtet2, vtri, lam1, lam2); if (lam1 < -eps || lam2 < -eps) return 0; else { // (*testout) << "vtet1 = " << vtet1 << endl; // (*testout) << "vtet2 = " << vtet2 << endl; // (*testout) << "vtri = " << vtri << endl; // (*testout) << "lam1 = " << lam1 << " lam2 = " << lam2 << endl; // (*testout) << (lam1 * (vtet1 * vtet1) + lam2 * (vtet1 * vtet2)) // << " = " << (vtet1 * vtri) << endl; // (*testout) << (lam1 * (vtet1 * vtet2) + lam2 * (vtet2 * vtet2)) // << " = " << (vtet2 * vtri) << endl; // (*testout) << "tet = "; // for (j = 0; j < 4; j++) // (*testout) << (*tet[j]) << " "; // (*testout) << endl; // (*testout) << "tri = "; // for (j = 0; j < 3; j++) // (*testout) << (*tri[j]) << " "; // (*testout) << endl; // (*testout) << "hit, cnt == 2" << endl; return 1; } break; } case 3: { // common face return 0; } } (*testout) << "hit, cnt = " << cnt << endl; return 1; } int IntersectTriangleTriangle (const Point<3> ** tri1, const Point<3> ** tri2) { int i, j; double diam = Dist (*tri1[0], *tri1[1]); double epsrel = 1e-8; double eps = diam * epsrel; double eps2 = eps * eps; int cnt = 0; /* int tri1pi[3]; int tri2pi[3]; */ // int tri1p1 = -1; /// int tri1p2 = -1; // int tri2p1 = -1; // int tri2p2 = -1; // int tri1p3, tri2p3; /* for (i = 0; i < 3; i++) tri1pi[i] = -1; */ for (i = 0; i <= 2; i++) { // tri2pi[i] = -1; for (j = 0; j <= 2; j++) { if (Dist2 (*tri1[j], *tri2[i]) < eps2) { // tri2pi[i] = j; // tri1pi[j] = i; cnt++; // tri1p2 = tri1p1; // tri1p1 = j; // tri2p2 = tri2p1; // tri2p1 = i; break; } } } switch (cnt) { case 0: { const Point<3> * line[2]; for (i = 0; i <= 2; i++) { line[0] = tri2[i]; line[1] = tri2[(i+1)%3]; if (IntersectTriangleLine (tri1, &line[0])) { (*testout) << "int1, line = " << *line[0] << " - " << *line[1] << endl; return 1; } } for (i = 0; i <= 2; i++) { line[0] = tri1[i]; line[1] = tri1[(i+1)%3]; if (IntersectTriangleLine (tri2, &line[0])) { (*testout) << "int2, line = " << *line[0] << " - " << *line[1] << endl; return 1; } } break; } default: return 0; } return 0; } void LocalCoordinates (const Vec3d & e1, const Vec3d & e2, const Vec3d & v, double & lam1, double & lam2) { double m11 = e1 * e1; double m12 = e1 * e2; double m22 = e2 * e2; double rs1 = v * e1; double rs2 = v * e2; double det = m11 * m22 - m12 * m12; lam1 = (rs1 * m22 - rs2 * m12)/det; lam2 = (m11 * rs2 - m12 * rs1)/det; } int CalcSphereCenter (const Point<3> ** pts, Point<3> & c) { Vec3d row1 (*pts[0], *pts[1]); Vec3d row2 (*pts[0], *pts[2]); Vec3d row3 (*pts[0], *pts[3]); Vec3d rhs(0.5 * (row1*row1), 0.5 * (row2*row2), 0.5 * (row3*row3)); Transpose (row1, row2, row3); Vec3d sol; if (SolveLinearSystem (row1, row2, row3, rhs, sol)) { (*testout) << "CalcSphereCenter: degenerated" << endl; return 1; } c = *pts[0] + sol; return 0; } int CalcTriangleCenter (const Point3d ** pts, Point3d & c) { static DenseMatrix a(2), inva(2); static Vector rs(2), sol(2); double h = Dist(*pts[0], *pts[1]); Vec3d v1(*pts[0], *pts[1]); Vec3d v2(*pts[0], *pts[2]); rs(0) = v1 * v1; rs(1) = v2 * v2; a(0,0) = 2 * rs(0); a(0,1) = a(1,0) = 2 * (v1 * v2); a(1,1) = 2 * rs(1); if (fabs (a.Det()) <= 1e-12 * h * h) { (*testout) << "CalcTriangleCenter: degenerated" << endl; return 1; } CalcInverse (a, inva); inva.Mult (rs, sol); c = *pts[0]; v1 *= sol(0); v2 *= sol(1); c += v1; c += v2; return 0; } double ComputeCylinderRadius (const Point3d & p1, const Point3d & p2, const Point3d & p3, const Point3d & p4) { Vec3d v12(p1, p2); Vec3d v13(p1, p3); Vec3d v14(p1, p4); Vec3d n1 = Cross (v12, v13); Vec3d n2 = Cross (v14, v12); double n1l = n1.Length(); double n2l = n2.Length(); n1 /= n1l; n2 /= n2l; double v12len = v12.Length(); double h1 = n1l / v12len; double h2 = n2l / v12len; /* (*testout) << "n1 = " << n1 << " n2 = " << n2 << "h1 = " << h1 << " h2 = " << h2 << endl; */ return ComputeCylinderRadius (n1, n2, h1, h2); } /* Two triangles T1 and T2 have normals n1 and n2. The height over the common edge is h1, and h2. */ double ComputeCylinderRadius (const Vec3d & n1, const Vec3d & n2, double h1, double h2) { Vec3d t1, t2; double n11 = n1 * n1; double n12 = n1 * n2; double n22 = n2 * n2; double det = n11 * n22 - n12 * n12; if (fabs (det) < 1e-14 * n11 * n22) return 1e20; // a biorthogonal bases (ti * nj) = delta_ij: t1 = (n22/det) * n1 + (-n12/det) * n2; t2 = (-n12/det) * n1 + (n11/det) * n2; // normalize: t1 /= t1.Length(); t2 /= t2.Length(); /* vector to center point has form v = lam1 n1 + lam2 n2 and fulfills t2 v = h1/2 t1 v = h2/2 */ double lam1 = 0.5 * h2 / (n1 * t1); double lam2 = 0.5 * h1 / (n2 * t2); double rad = (lam1 * n1 + lam2 * n2).Length(); /* (*testout) << "n1 = " << n1 << " n2 = " << n2 << " t1 = " << t1 << " t2 = " << t2 << " rad = " << rad << endl; */ return rad; } double MinDistLP2 (const Point2d & lp1, const Point2d & lp2, const Point2d & p) { Vec2d v(lp1, lp2); Vec2d vlp(lp1, p); // dist(lam) = \| vlp \|^2 - 2 lam (v1p, v) + lam^2 \| v \|^2 // lam = (v * vlp) / (v * v); // if (lam < 0) lam = 0; // if (lam > 1) lam = 1; double num = v*vlp; double den = v*v; if (num <= 0) return Dist2 (lp1, p); if (num >= den) return Dist2 (lp2, p); if (den > 0) { return vlp.Length2() - num * num /den; } else return vlp.Length2(); } double MinDistLP2 (const Point3d & lp1, const Point3d & lp2, const Point3d & p) { Vec3d v(lp1, lp2); Vec3d vlp(lp1, p); // dist(lam) = \| vlp \|^2 - 2 lam (v1p, v) + lam^2 \| v \|^2 // lam = (v * vlp) / (v * v); // if (lam < 0) lam = 0; // if (lam > 1) lam = 1; double num = v*vlp; double den = v*v; if (num <= 0) return Dist2 (lp1, p); if (num >= den) return Dist2 (lp2, p); if (den > 0) { return vlp.Length2() - num * num /den; } else return vlp.Length2(); } double MinDistTP2 (const Point3d & tp1, const Point3d & tp2, const Point3d & tp3, const Point3d & p) { double lam1, lam2; double res; LocalCoordinates (Vec3d (tp1, tp2), Vec3d (tp1, tp3), Vec3d (tp1, p), lam1, lam2); int in1 = lam1 >= 0; int in2 = lam2 >= 0; int in3 = lam1+lam2 <= 1; if (in1 && in2 && in3) { Point3d pp = tp1 + lam1 * Vec3d(tp1, tp2) + lam2 * Vec3d (tp1, tp3); res = Dist2 (p, pp); } else { res = Dist2 (tp1, p); if (!in1) { double hv = MinDistLP2 (tp1, tp3, p); if (hv < res) res = hv; } if (!in2) { double hv = MinDistLP2 (tp1, tp2, p); if (hv < res) res = hv; } if (!in3) { double hv = MinDistLP2 (tp2, tp3, p); if (hv < res) res = hv; } /* double d1 = MinDistLP2 (tp1, tp2, p); double d2 = MinDistLP2 (tp1, tp3, p); double d3 = MinDistLP2 (tp2, tp3, p); res = min3 (d1, d2, d3); */ } return res; Vec3d pp1(tp1, p); Vec3d v1(tp1, tp2), v2(tp1, tp3); double c = pp1.Length2(); double cx = -2 * (pp1 * v1); double cy = -2 * (pp1 * v2); double cxx = v1.Length2(); double cxy = 2 * (v1 * v2); double cyy = v2.Length2(); QuadraticPolynomial2V pol (-c, -cx, -cy, -cxx, -cxy, -cyy); double res2 = - pol.MaxUnitTriangle (); if (fabs (res - res2) > 1e-8) cout << "res and res2 differ: " << res << " != " << res2 << endl; return res2; } // 0 checks !!! double MinDistLL2 (const Point3d & l1p1, const Point3d & l1p2, const Point3d & l2p1, const Point3d & l2p2) { // dist(lam1,lam2) = \| l2p1+lam2v2 - (l1p1+lam1 v1) \| // min ! Vec3d l1l2 (l1p1, l2p1); Vec3d v1 (l1p1, l1p2); Vec3d v2 (l2p1, l2p2); double a11, a12, a22, rs1, rs2; double lam1, lam2, det; a11 = v1*v1; a12 = -(v1*v2); a22 = v2*v2; rs1 = l1l2 * v1; rs2 = - (l1l2 * v2); det = a11 * a22 - a12 * a12; if (det < 1e-14 * a11 * a22) det = 1e-14 * a11 * a22; // regularization should be stable if (det < 1e-20) det = 1e-20; lam1 = (a22 * rs1 - a12 * rs2) / det; lam2 = (-a12 * rs1 + a11 * rs2) / det; if (lam1 >= 0 && lam2 >= 0 && lam1 <= 1 && lam2 <= 1) { Vec3d v = l1l2 + (-lam1) * v1 + lam2 * v2; return v.Length2(); } double minv, hv; minv = MinDistLP2 (l1p1, l1p2, l2p1); hv = MinDistLP2 (l1p1, l1p2, l2p2); if (hv < minv) minv = hv; hv = MinDistLP2 (l2p1, l2p2, l1p1); if (hv < minv) minv = hv; hv = MinDistLP2 (l2p1, l2p2, l1p2); if (hv < minv) minv = hv; return minv; } } netgen-6.2.1804/libsrc/gprim/spline.hpp0000644000175000017500000004101713272137567016407 0ustar kurtkurt#ifndef FILE_SPLINE_HPP #define FILE_SPLINE_HPP /**************************************************************************/ /* File: spline.hpp */ /* Author: Joachim Schoeberl */ /* Date: 24. Jul. 96 */ /**************************************************************************/ namespace netgen { /* Spline curves for 2D mesh generation */ /// Geometry point template < int D > class GeomPoint : public Point { public: /// refinement factor at point double refatpoint; /// max mesh-size at point double hmax; /// hp-refinement double hpref; /// GeomPoint () { ; } /// GeomPoint (const Point & ap, double aref = 1, double ahpref=0) : Point(ap), refatpoint(aref), hmax(1e99), hpref(ahpref) { ; } }; /// base class for 2d - segment template < int D > class SplineSeg { public: SplineSeg () { ; } /// virtual ~SplineSeg() { ; } /// calculates length of curve virtual double Length () const; /// returns point at curve, 0 <= t <= 1 virtual Point GetPoint (double t) const = 0; /// returns a (not necessarily unit-length) tangent vector for 0 <= t <= 1 virtual Vec GetTangent (const double t) const { cerr << "GetTangent not implemented for spline base-class" << endl; Vec dummy; return dummy; } virtual void GetDerivatives (const double t, Point & point, Vec & first, Vec & second) const { double eps = 1e-6; point = GetPoint (t); Point pl = GetPoint (t-eps); Point pr = GetPoint (t+eps); first = 1.0/(2*eps) * (pr-pl); second = 1.0/sqr(eps) * ( (pr-point)+(pl-point)); } /// returns initial point on curve virtual const GeomPoint & StartPI () const = 0; /// returns terminal point on curve virtual const GeomPoint & EndPI () const = 0; /** writes curve description for fepp: for implicitly given quadratic curves, the 6 coefficients of the polynomial $$ a x^2 + b y^2 + c x y + d x + e y + f = 0 $$ are written to ost */ void PrintCoeff (ostream & ost) const; virtual void GetCoeff (Vector & coeffs) const = 0; virtual void GetCoeff (Vector & coeffs, Point p0) const { ; } virtual void GetPoints (int n, Array > & points) const; /** calculates (2D) lineintersections: for lines $$ a x + b y + c = 0 $$ the interecting points are calculated and stored in points */ virtual void LineIntersections (const double a, const double b, const double c, Array < Point > & points, const double eps) const {points.SetSize(0);} // is the point in the convex hull (increased by eps) of the spline ? virtual bool InConvexHull (Point p, double eps) const = 0; virtual double MaxCurvature(void) const = 0; virtual string GetType(void) const {return "splinebase";} virtual void Project (const Point point, Point & point_on_curve, double & t) const { cerr << "Project not implemented for spline base-class" << endl;} virtual void GetRawData (Array & data) const { cerr << "GetRawData not implemented for spline base-class" << endl;} }; /// Straight line form p1 to p2 template< int D > class LineSeg : public SplineSeg { /// GeomPoint p1, p2; public: /// LineSeg (const GeomPoint & ap1, const GeomPoint & ap2); /// virtual double Length () const; /// inline virtual Point GetPoint (double t) const; /// virtual Vec GetTangent (const double t) const; virtual void GetDerivatives (const double t, Point & point, Vec & first, Vec & second) const; /// virtual const GeomPoint & StartPI () const { return p1; }; /// virtual const GeomPoint & EndPI () const { return p2; } /// virtual void GetCoeff (Vector & coeffs) const; virtual void GetCoeff (Vector & coeffs, Point p0) const; virtual string GetType(void) const {return "line";} virtual void LineIntersections (const double a, const double b, const double c, Array < Point > & points, const double eps) const; virtual bool InConvexHull (Point p, double eps) const { return MinDistLP2 (p1, p2, p) < sqr(eps); } virtual double MaxCurvature(void) const {return 0;} virtual void Project (const Point point, Point & point_on_curve, double & t) const; virtual void GetRawData (Array & data) const; }; /// curve given by a rational, quadratic spline (including ellipses) template< int D > class SplineSeg3 : public SplineSeg { /// GeomPoint p1, p2, p3; double weight; mutable double proj_latest_t; public: /// SplineSeg3 (const GeomPoint & ap1, const GeomPoint & ap2, const GeomPoint & ap3); /// inline virtual Point GetPoint (double t) const; /// virtual Vec GetTangent (const double t) const; DLL_HEADER virtual void GetDerivatives (const double t, Point & point, Vec & first, Vec & second) const; /// virtual const GeomPoint & StartPI () const { return p1; }; /// virtual const GeomPoint & EndPI () const { return p3; } /// virtual void GetCoeff (Vector & coeffs) const; virtual void GetCoeff (Vector & coeffs, Point p0) const; virtual string GetType(void) const {return "spline3";} const GeomPoint & TangentPoint (void) const { return p2; } DLL_HEADER virtual void LineIntersections (const double a, const double b, const double c, Array < Point > & points, const double eps) const; virtual bool InConvexHull (Point p, double eps) const { return MinDistTP2 (p1, p2, p3, p) < sqr(eps); } DLL_HEADER virtual double MaxCurvature(void) const; DLL_HEADER virtual void Project (const Point point, Point & point_on_curve, double & t) const; DLL_HEADER virtual void GetRawData (Array & data) const; }; // Gundolf Haase 8/26/97 /// A circle template < int D > class CircleSeg : public SplineSeg { /// private: GeomPoint p1, p2, p3; //const GeomPoint &p1, &p2, &p3; Point pm; double radius, w1,w3; public: /// CircleSeg (const GeomPoint & ap1, const GeomPoint & ap2, const GeomPoint & ap3); /// virtual Point GetPoint (double t) const; /// virtual const GeomPoint & StartPI () const { return p1; } /// virtual const GeomPoint & EndPI () const { return p3; } /// virtual void GetCoeff (Vector & coeffs) const; /// double Radius() const { return radius; } /// double StartAngle() const { return w1; } /// double EndAngle() const { return w3; } /// const Point & MidPoint(void) const {return pm; } virtual string GetType(void) const {return "circle";} virtual void LineIntersections (const double a, const double b, const double c, Array < Point > & points, const double eps) const; virtual bool InConvexHull (Point p, double eps) const { return (Dist2 (p, pm) < sqr(radius+eps)); } virtual double MaxCurvature(void) const {return 1./radius;} }; /// template class DiscretePointsSeg : public SplineSeg { Array > pts; GeomPoint p1n, p2n; public: /// DiscretePointsSeg (const Array > & apts); /// virtual ~DiscretePointsSeg (); /// virtual Point GetPoint (double t) const; /// virtual const GeomPoint & StartPI () const { return p1n; }; /// virtual const GeomPoint & EndPI () const { return p2n; } /// virtual void GetCoeff (Vector & coeffs) const {;} virtual double MaxCurvature(void) const {return 1;} // needs implementation ... virtual bool InConvexHull (Point p, double eps) const { return true; } }; // calculates length of spline-curve template double SplineSeg :: Length () const { int n = 100; double dt = 1.0 / n; Point pold = GetPoint (0); double l = 0; for (int i = 1; i <= n; i++) { Point p = GetPoint (i * dt); l += Dist (p, pold); pold = p; } return l; } template void SplineSeg :: GetPoints (int n, Array > & points) const { points.SetSize (n); if (n >= 2) for (int i = 0; i < n; i++) points[i] = GetPoint(double(i) / (n-1)); } template void SplineSeg :: PrintCoeff (ostream & ost) const { Vector u(6); GetCoeff(u); for ( int i=0; i<6; i++) ost << u[i] << " "; ost << endl; } /* Implementation of line-segment from p1 to p2 */ template LineSeg :: LineSeg (const GeomPoint & ap1, const GeomPoint & ap2) : p1(ap1), p2(ap2) { ; } template inline Point LineSeg :: GetPoint (double t) const { return p1 + t * (p2 - p1); } template Vec LineSeg :: GetTangent (const double t) const { return p2-p1; } template void LineSeg :: GetDerivatives (const double t, Point & point, Vec & first, Vec & second) const { first = p2 - p1; point = p1 + t * first; second = 0; } template double LineSeg :: Length () const { return Dist (p1, p2); } template void LineSeg :: GetCoeff (Vector & coeffs) const { coeffs.SetSize(6); double dx = p2(0) - p1(0); double dy = p2(1) - p1(1); coeffs[0] = coeffs[1] = coeffs[2] = 0; coeffs[3] = -dy; coeffs[4] = dx; coeffs[5] = -dx * p1(1) + dy * p1(0); } template void LineSeg :: GetCoeff (Vector & coeffs, Point p) const { coeffs.SetSize(6); double dx = p2(0) - p1(0); double dy = p2(1) - p1(1); coeffs[0] = coeffs[1] = coeffs[2] = 0; coeffs[3] = -dy; coeffs[4] = dx; coeffs[5] = -dx * (p1(1)-p(1)) + dy * (p1(0)-p(0)); } template void LineSeg :: LineIntersections (const double a, const double b, const double c, Array < Point > & points, const double eps) const { points.SetSize(0); double denom = -a*p2(0)+a*p1(0)-b*p2(1)+b*p1(1); if(fabs(denom) < 1e-20) return; double t = (a*p1(0)+b*p1(1)+c)/denom; if((t > -eps) && (t < 1.+eps)) points.Append(GetPoint(t)); } template void LineSeg :: Project (const Point point, Point & point_on_curve, double & t) const { Vec v = p2-p1; double l = v.Length(); v *= 1./l; t = (point-p1)*v; if(t<0) t = 0; if(t>l) t = l; point_on_curve = p1+t*v; t *= 1./l; } template void LineSeg :: GetRawData (Array & data) const { data.Append(2); for(int i=0; i double SplineSeg3 :: MaxCurvature(void) const { Vec v1 = p1-p2; Vec v2 = p3-p2; double l1 = v1.Length(); double l2 = v2.Length(); (*testout) << "v1 " << v1 << " v2 " << v2 << endl; double cosalpha = v1*v2/(l1*l2); (*testout) << "cosalpha " << cosalpha << endl; return sqrt(cosalpha + 1.)/(min2(l1,l2)*(1.-cosalpha)); } */ //######################################################################## // circlesegment template CircleSeg :: CircleSeg (const GeomPoint & ap1, const GeomPoint & ap2, const GeomPoint & ap3) : p1(ap1), p2(ap2), p3(ap3) { Vec v1,v2; v1 = p1 - p2; v2 = p3 - p2; Point p1t(p1+v1); Point p2t(p3+v2); // works only in 2D!!!!!!!!! Line2d g1t,g2t; g1t.P1() = Point<2>(p1(0),p1(1)); g1t.P2() = Point<2>(p1t(0),p1t(1)); g2t.P1() = Point<2>(p3(0),p3(1)); g2t.P2() = Point<2>(p2t(0),p2t(1)); Point<2> mp = CrossPoint (g1t,g2t); pm(0) = mp(0); pm(1) = mp(1); radius = Dist(pm,StartPI()); Vec2d auxv; auxv.X() = p1(0)-pm(0); auxv.Y() = p1(1)-pm(1); w1 = Angle(auxv); auxv.X() = p3(0)-pm(0); auxv.Y() = p3(1)-pm(1); w3 = Angle(auxv); if ( fabs(w3-w1) > M_PI ) { if ( w3>M_PI ) w3 -= 2*M_PI; if ( w1>M_PI ) w1 -= 2*M_PI; } } /* template Point CircleSeg :: GetPoint (double t) const { if (t >= 1.0) { return p3; } double phi = StartAngle() + t*(EndAngle()-StartAngle()); Vec tmp(cos(phi),sin(phi)); return pm + Radius()*tmp; } */ template<> inline Point<3> CircleSeg<3> :: GetPoint (double t) const { // not really useful, but keep it as it was ... if (t >= 1.0) { return p3; } double phi = StartAngle() + t*(EndAngle()-StartAngle()); Vec<3> tmp(cos(phi),sin(phi),0); return pm + Radius()*tmp; } template<> inline Point<2> CircleSeg<2> :: GetPoint (double t) const { if (t >= 1.0) { return p3; } double phi = StartAngle() + t*(EndAngle()-StartAngle()); Vec<2> tmp(cos(phi),sin(phi)); return pm + Radius()*tmp; } template void CircleSeg :: GetCoeff (Vector & coeff) const { coeff[0] = coeff[1] = 1.0; coeff[2] = 0.0; coeff[3] = -2.0 * pm[0]; coeff[4] = -2.0 * pm[1]; coeff[5] = sqr(pm[0]) + sqr(pm[1]) - sqr(Radius()); } template DiscretePointsSeg :: DiscretePointsSeg (const Array > & apts) : pts (apts) { for(int i=0; i DiscretePointsSeg :: ~DiscretePointsSeg () { ; } template Point DiscretePointsSeg :: GetPoint (double t) const { double t1 = t * (pts.Size()-1); int segnr = int(t1); if (segnr < 0) segnr = 0; if (segnr >= pts.Size()) segnr = pts.Size()-1; double rest = t1 - segnr; return pts[segnr] + rest*Vec(pts[segnr+1]-pts[segnr]); } // ************************************* // Template for B-Splines of order ORDER // thx to Gerhard Kitzler // ************************************* template class BSplineSeg : public SplineSeg { Array > pts; GeomPoint p1n, p2n; Array ti; public: /// BSplineSeg (const Array > & apts); /// virtual ~BSplineSeg(); /// virtual Point GetPoint (double t) const; /// virtual const GeomPoint & StartPI () const { return p1n; }; /// virtual const GeomPoint & EndPI () const { return p2n; } /// virtual void GetCoeff (Vector & coeffs) const {;} virtual double MaxCurvature(void) const {return 1;} // needs implementation ... virtual bool InConvexHull (Point p, double eps) const { return true; } }; // Constructor template BSplineSeg :: BSplineSeg (const Array > & apts) : pts (apts) { /* for(int i=0; i BSplineSeg :: ~BSplineSeg () { ; } // GetPoint Method...(evaluation of BSpline Curve) template Point BSplineSeg :: GetPoint (double t_in) const { int m=pts.Size()+ORDER; double t = t_in * (m-2*ORDER+1); double b[ORDER]; int interval_nr = int(t)+ORDER-1; if (interval_nr < ORDER-1) interval_nr = ORDER-1; if (interval_nr > m-ORDER-1) interval_nr = m-ORDER-1; b[ORDER-1] = 1.0; for(int degree=1;degree p = 0.0; for(int i=0; i < ORDER; i++) p += b[i] * Vec (pts[i+interval_nr-ORDER+1]); return p; } } #endif netgen-6.2.1804/libsrc/gprim/geomfuncs.hpp0000644000175000017500000000737313272137567017112 0ustar kurtkurt#ifndef FILE_GEOMFUNCS #define FILE_GEOMFUNCS /* *************************************************************************/ /* File: geomfuncs.hpp */ /* Author: Joachim Schoeberl */ /* Date: 20. Jul. 02 */ /* *************************************************************************/ namespace netgen { template inline double Abs (const Vec & v) { double sum = 0; for (int i = 0; i < D; i++) sum += v(i) * v(i); return sqrt (sum); } template inline double Abs2 (const Vec & v) { double sum = 0; for (int i = 0; i < D; i++) sum += v(i) * v(i); return sum; } template inline double Dist (const Point & a, const Point & b) { return Abs (a-b); } template inline double Dist2 (const Point & a, const Point & b) { return Abs2 (a-b); } template inline Point Center (const Point & a, const Point & b) { Point res; for (int i = 0; i < D; i++) res(i) = 0.5 * (a(i) + b(i)); return res; } template inline Point Center (const Point & a, const Point & b, const Point & c) { Point res; for (int i = 0; i < D; i++) res(i) = (1.0/3.0) * (a(i) + b(i) + c(i)); return res; } template inline Point Center (const Point & a, const Point & b, const Point & c, const Point & d) { Point res; for (int i = 0; i < D; i++) res(i) = (1.0/4.0) * (a(i) + b(i) + c(i) + d(i)); return res; } /* new wrong code problem with MSVC2010: using Cross ( & , & ) computes wrong cross-product, problem arises in Surface::DefineTangentialPlane, e.g. with example boxcyl.geo */ // inline Vec<3> Cross (const Vec<3> & v1, const Vec<3> & v2) template inline Vec<3,T> Cross (Vec<3,T> v1, Vec<3,T> v2) { return Vec<3,T> ( v1(1) * v2(2) - v1(2) * v2(1), v1(2) * v2(0) - v1(0) * v2(2), v1(0) * v2(1) - v1(1) * v2(0) ); } inline double Determinant (const Vec<3> & col1, const Vec<3> & col2, const Vec<3> & col3) { return col1(0) * ( col2(1) * col3(2) - col2(2) * col3(1)) + col1(1) * ( col2(2) * col3(0) - col2(0) * col3(2)) + col1(2) * ( col2(0) * col3(1) - col2(1) * col3(0)); } template <> inline Vec<2> Vec<2> :: GetNormal () const { return Vec<2> (-x[1], x[0]); } template <> inline Vec<3> Vec<3> :: GetNormal () const { if (fabs (x[0]) > fabs (x[2])) return Vec<3> (-x[1], x[0], 0); else return Vec<3> (0, x[2], -x[1]); } // template inline void CalcInverse (const Mat<2,2> & m, Mat<2,2> & inv) { double det = m(0,0) * m(1,1) - m(0,1) * m(1,0); if (det == 0) { inv = 0; return; } double idet = 1.0 / det; inv(0,0) = idet * m(1,1); inv(0,1) = -idet * m(0,1); inv(1,0) = -idet * m(1,0); inv(1,1) = idet * m(0,0); } void CalcInverse (const Mat<3,3> & m, Mat<3,3> & inv); inline void CalcInverse (const Mat<2,3> & m, Mat<3,2> & inv) { Mat<2,2> a = m * Trans (m); Mat<2,2> ainv; CalcInverse (a, ainv); inv = Trans (m) * ainv; } void CalcInverse (const Mat<3,2> & m, Mat<2,3> & inv); inline void CalcInverse (const Mat<3,2> & m, Mat<2,3> & inv) { Mat<2,2> a = Trans (m) * m; Mat<2,2> ainv; CalcInverse (a, ainv); inv = ainv * Trans (m); } double Det (const Mat<2,2> & m); double Det (const Mat<3,3> & m); // eigenvalues of a symmetric matrix void EigenValues (const Mat<3,3> & m, Vec<3> & ev); void EigenValues (const Mat<2,2> & m, Vec<3> & ev); } #endif netgen-6.2.1804/libsrc/gprim/transform3d.hpp0000644000175000017500000001061413272137567017356 0ustar kurtkurt#ifndef FILE_TRANSFORM3D #define FILE_TRANSFORM3D /* *************************************************************************/ /* File: transform3d.hh */ /* Author: Joachim Schoeberl */ /* Date: 22. Mar. 98 */ /* *************************************************************************/ /* Affine - Linear mapping in 3D space */ namespace netgen { class Transformation3d; ostream & operator<< (ostream & ost, Transformation3d & trans); class Transformation3d { double lin[3][3]; double offset[3]; public: /// Transformation3d (); /// Unit tet is mapped to tet described by pp Transformation3d (const Point3d ** pp); /// Unit tet is mapped to tet described by pp Transformation3d (const Point3d pp[]); /// translation Transformation3d (const Vec3d & translate); /// rotation with ... Transformation3d (const Point3d & c, double alpha, double beta, double gamma); /// void CalcInverse (Transformation3d & inv) const; /// this = ta x tb void Combine (const Transformation3d & ta, const Transformation3d & tb); /// dir = 1..3 (== x..z) void SetAxisRotation (int dir, double alpha); /// void Transform (const Point3d & from, Point3d & to) const { for (int i = 1; i <= 3; i++) { to.X(i) = offset[i-1] + lin[i-1][0] * from.X(1) + lin[i-1][1] * from.X(2) + lin[i-1][2] * from.X(3); } } /// void Transform (Point3d & p) const { Point3d hp; Transform (p, hp); p = hp; } /// transform vector, apply only linear part, not offset void Transform (const Vec3d & from, Vec3d & to) const { for (int i = 1; i <= 3; i++) { to.X(i) = lin[i-1][0] * from.X(1) + lin[i-1][1] * from.X(2) + lin[i-1][2] * from.X(3); } } friend ostream & operator<< (ostream & ost, Transformation3d & trans); }; template class Transformation { Mat m; Vec v; public: /// Transformation () { m = 0; v = 0; } /// Unit tet is mapped to tet described by pp Transformation (const Point * pp); /// translation Transformation (const Vec & translate) { v = translate; m = 0; for (int i = 0; i < D; i++) m(i,i) = 1; } // rotation with ... Transformation (const Point & c, double alpha, double beta, double gamma) { // total = T_c x Rot_0 x T_c^{-1} // Use Euler angles, see many books from tech mech, e.g. // Shabana "multibody systems" Vec vc(c); Transformation tc(vc); Transformation tcinv(-vc); // tc.CalcInverse (tcinv); Transformation r1, r2, r3, ht, ht2; r1.SetAxisRotation (3, alpha); r2.SetAxisRotation (1, beta); r3.SetAxisRotation (3, gamma); ht.Combine (tc, r3); ht2.Combine (ht, r2); ht.Combine (ht2, r1); Combine (ht, tcinv); // cout << "Rotation - Transformation:" << (*this) << endl; // (*testout) << "Rotation - Transformation:" << (*this) << endl; } /// Transformation CalcInverse () const { Transformation inv; // inv.m = Inv(m); ::netgen::CalcInverse (m, inv.m); inv.v = inv.m * (-v); return inv; } /// this = ta x tb void Combine (const Transformation & ta, const Transformation & tb) { v = ta.v + ta.m * tb.v; m = ta.m * tb.m; } /// dir = 1..3 (== x..z) void SetAxisRotation (int dir, double alpha) { double co = cos(alpha); double si = sin(alpha); dir--; int pos1 = (dir+1) % 3; int pos2 = (dir+2) % 3; int i, j; for (i = 0; i <= 2; i++) { v(i) = 0; for (j = 0; j <= 2; j++) m(i,j) = 0; } m(dir,dir) = 1; m(pos1, pos1) = co; m(pos2, pos2) = co; m(pos1, pos2) = si; m(pos2, pos1) = -si; } /// void Transform (const Point & from, Point & to) const { to = Point (v + m * Vec(from)); } void Transform (Point & p) const { p = Point (v + m * Vec(p)); } /// transform vector, apply only linear part, not offset void Transform (const Vec & from, Vec & to) const { to = m * from; } Point operator() (Point from) const { Point to; Transform(from, to); return to; } Vec operator() (Vec from) const { Vec to; Transform(from, to); return to; } }; template ostream & operator<< (ostream & ost, Transformation & trans); } #endif netgen-6.2.1804/libsrc/gprim/geomobjects.hpp0000644000175000017500000002037013272137567017415 0ustar kurtkurt#ifndef FILE_OBJECTS #define FILE_OBJECTS /* *************************************************************************/ /* File: geomobjects.hpp */ /* Author: Joachim Schoeberl */ /* Date: 20. Jul. 02 */ /* *************************************************************************/ namespace netgen { template class Vec; template class Point; template class Point : public ngsimd::AlignedAlloc> { protected: T x[D]; public: Point () { ; } Point (T ax) { for (int i = 0; i < D; i++) x[i] = ax; } Point (T ax, T ay) { // static_assert(D==2, "Point constructor with 2 args called"); x[0] = ax; x[1] = ay; } Point (T ax, T ay, T az) { // static_assert(D==3, "Point constructor with 3 args called"); x[0] = ax; x[1] = ay; x[2] = az; } Point (T ax, T ay, T az, T au) { x[0] = ax; x[1] = ay; x[2] = az; x[3] = au;} template Point (const Point & p2) { for (int i = 0; i < D; i++) x[i] = p2(i); } explicit Point (const Vec & v) { for (int i = 0; i < D; i++) x[i] = v(i); } template Point & operator= (const Point & p2) { for (int i = 0; i < D; i++) x[i] = p2(i); return *this; } Point & operator= (T val) { for (int i = 0; i < D; i++) x[i] = val; return *this; } T & operator() (int i) { return x[i]; } const T & operator() (int i) const { return x[i]; } operator const T* () const { return x; } }; template class Vec : public ngsimd::AlignedAlloc> { protected: T x[D]; public: Vec () { ; } // for (int i = 0; i < D; i++) x[i] = 0; } Vec (T ax) { for (int i = 0; i < D; i++) x[i] = ax; } Vec (T ax, T ay) { // static_assert(D==2, "Vec constructor with 2 args called"); x[0] = ax; x[1] = ay; } Vec (T ax, T ay, T az) { // static_assert(D==3, "Vec constructor with 3 args called"); x[0] = ax; x[1] = ay; x[2] = az; } Vec (T ax, T ay, T az, T au) { x[0] = ax; x[1] = ay; x[2] = az; x[3] = au; } Vec (const Vec & p2) { for (int i = 0; i < D; i++) x[i] = p2.x[i]; } explicit Vec (const Point & p) { for (int i = 0; i < D; i++) x[i] = p(i); } Vec (const Vec & p1, const Vec & p2) { for(int i=0; i Vec & operator= (const Vec & p2) { for (int i = 0; i < D; i++) x[i] = p2(i); return *this; } Vec & operator= (T s) { for (int i = 0; i < D; i++) x[i] = s; return *this; } T & operator() (int i) { return x[i]; } const T & operator() (int i) const { return x[i]; } operator const T* () const { return x; } T Length () const { T l = 0; for (int i = 0; i < D; i++) l += x[i] * x[i]; return sqrt (l); } T Length2 () const { T l = 0; for (int i = 0; i < D; i++) l += x[i] * x[i]; return l; } Vec & Normalize () { T l = Length(); // if (l != 0) for (int i = 0; i < D; i++) x[i] /= (l+1e-40); return *this; } Vec GetNormal () const; }; template class Mat : public ngsimd::AlignedAlloc> { protected: T x[H*W]; public: Mat () { ; } Mat (const Mat & b) { for (int i = 0; i < H*W; i++) x[i] = b.x[i]; } Mat & operator= (T s) { for (int i = 0; i < H*W; i++) x[i] = s; return *this; } Mat & operator= (const Mat & b) { for (int i = 0; i < H*W; i++) x[i] = b.x[i]; return *this; } T & operator() (int i, int j) { return x[i*W+j]; } const T & operator() (int i, int j) const { return x[i*W+j]; } T & operator() (int i) { return x[i]; } const T & operator() (int i) const { return x[i]; } Vec Col (int i) const { Vec hv; for (int j = 0; j < H; j++) hv(j) = x[j*W+i]; return hv; } Vec Row (int i) const { Vec hv; for (int j = 0; j < W; j++) hv(j) = x[i*W+j]; return hv; } void Solve (const Vec & rhs, Vec & sol) const { Mat inv; CalcInverse (*this, inv); sol = inv * rhs; } }; template class Box { protected: Point pmin, pmax; public: Box () { ; } Box ( const Point & p1) { for (int i = 0; i < D; i++) pmin(i) = pmax(i) = p1(i); } Box ( const Point & p1, const Point & p2) { for (int i = 0; i < D; i++) { pmin(i) = min2(p1(i), p2(i)); pmax(i) = max2(p1(i), p2(i)); } } enum EB_TYPE { EMPTY_BOX = 1 }; Box ( EB_TYPE et ) { for (int i = 0; i < D; i++) { pmin(i) = 1e99; pmax(i) = -1e99; } // pmin = Point (1e99, 1e99, 1e99); // pmax = Point (-1e99, -1e99, -1e99); } const Point & PMin () const { return pmin; } const Point & PMax () const { return pmax; } void Set (const Point & p) { pmin = pmax = p; } void Add (const Point & p) { for (int i = 0; i < D; i++) { if (p(i) < pmin(i)) pmin(i) = p(i); else if (p(i) > pmax(i)) pmax(i) = p(i); } } template void Set (const IndirectArray & points) { Set (points[points.Begin()]); for (int i = points.Begin()+1; i < points.End(); i++) Add (points[i]); } template void Add (const IndirectArray & points) { for (int i = points.Begin(); i < points.End(); i++) Add (points[i]); } Point Center () const { Point c; for (int i = 0; i < D; i++) c(i) = 0.5 * (pmin(i)+pmax(i)); return c; } double Diam () const { return Abs (pmax-pmin); } Point GetPointNr (int nr) const { Point p; for (int i = 0; i < D; i++) { p(i) = (nr & 1) ? pmax(i) : pmin(i); nr >>= 1; } return p; } bool Intersect (const Box & box2) const { for (int i = 0; i < D; i++) if (pmin(i) > box2.pmax(i) || pmax(i) < box2.pmin(i)) return 0; return 1; } bool IsIn (const Point & p) const { for (int i = 0; i < D; i++) if (p(i) < pmin(i) || p(i) > pmax(i)) return 0; return 1; } void Increase (double dist) { for (int i = 0; i < D; i++) { pmin(i) -= dist; pmax(i) += dist; } } }; template class BoxSphere : public Box { protected: /// Point c; /// double diam; /// double inner; public: /// BoxSphere () { }; /// BoxSphere (const Box & box) : Box (box) { CalcDiamCenter(); }; /// BoxSphere ( Point apmin, Point apmax ) : Box (apmin, apmax) { CalcDiamCenter(); } /// const Point & Center () const { return c; } /// double Diam () const { return diam; } /// double Inner () const { return inner; } /// void GetSubBox (int nr, BoxSphere & sbox) const { for (int i = 0; i < D; i++) { if (nr & 1) { sbox.pmin(i) = c(i); sbox.pmax(i) = this->pmax(i); } else { sbox.pmin(i) = this->pmin(i); sbox.pmax(i) = c(i); } sbox.c(i) = 0.5 * (sbox.pmin(i) + sbox.pmax(i)); nr >>= 1; } sbox.diam = 0.5 * diam; sbox.inner = 0.5 * inner; } /// void CalcDiamCenter () { c = Box::Center (); diam = Dist (this->pmin, this->pmax); inner = this->pmax(0) - this->pmin(0); for (int i = 1; i < D; i++) if (this->pmax(i) - this->pmin(i) < inner) inner = this->pmax(i) - this->pmin(i); } }; #ifdef PARALLEL template <> inline MPI_Datatype MyGetMPIType > () { static MPI_Datatype MPI_T = 0; if (!MPI_T) { MPI_Type_contiguous ( 3, MPI_DOUBLE, &MPI_T); MPI_Type_commit ( &MPI_T ); } return MPI_T; }; #endif } #endif netgen-6.2.1804/libsrc/gprim/geom3d.cpp0000644000175000017500000003715513272137567016276 0ustar kurtkurt#include #include #include #include namespace netgen { ostream & operator<<(ostream & s, const Point3d & p) { return s << "(" << p.x[0] << ", " << p.x[1] << ", " << p.x[2] << ")"; } ostream & operator<<(ostream & s, const Vec3d & v) { return s << "(" << v.x[0] << ", " << v.x[1] << ", " << v.x[2] << ")"; } double Angle (const Vec3d & v1, const Vec3d & v2) { double co = (v1 * v2) / (v1.Length() * v2.Length()); if (co > 1) co = 1; if (co < -1) co = -1; return acos ( co ); } void Vec3d :: GetNormal (Vec3d & n) const { if (fabs (X()) > fabs (Z())) { n.X() = -Y(); n.Y() = X(); n.Z() = 0; } else { n.X() = 0; n.Y() = Z(); n.Z() = -Y(); } double len = n.Length(); if (len == 0) { n.X() = 1; n.Y() = n.Z() = 0; } else n /= len; } /* ostream & operator<<(ostream & s, const ROTDenseMatrix3D & r) { return s << "{ (" << r.txx << ", " << r.txy << ", " << r.txz << ") , (" << r.tyx << ", " << r.tyy << ", " << r.tyz << ") , (" << r.tzx << ", " << r.tzy << ", " << r.tzz << ") }"; } */ /* Vec3d operator- (const Point3d & p1, const Point3d & p2) { return Vec3d (p1.X() - p2.X(), p1.Y() - p2.Y(),p1.Z() - p2.Z()); } Point3d operator- (const Point3d & p1, const Vec3d & v) { return Point3d (p1.X() - v.X(), p1.Y() - v.Y(),p1.Z() - v.Z()); } Point3d operator+ (const Point3d & p1, const Vec3d & v) { return Point3d (p1.X() + v.X(), p1.Y() + v.Y(),p1.Z() + v.Z()); } Vec3d operator- (const Vec3d & v1, const Vec3d & v2) { return Vec3d (v1.X() - v2.X(), v1.Y() - v2.Y(),v1.Z() - v2.Z()); } Vec3d operator+ (const Vec3d & v1, const Vec3d & v2) { return Vec3d (v1.X() + v2.X(), v1.Y() + v2.Y(),v1.Z() + v2.Z()); } Vec3d operator* (double scal, const Vec3d & v) { return Vec3d (scal * v.X(), scal * v.Y(), scal * v.Z()); } */ /* double operator* (const Vec3d & v1, const Vec3d & v2) { return v1.X() * v2.X() + v1.Y() * v2.Y() + v1.Z() * v2.Z(); } double Cross (const Vec3d & v1, const Vec3d & v2) { return v1.X() * v2.Y() - v1.Y() * v2.X(); } */ /* void ROTDenseMatrix3D :: CalcRotMat(double ag, double bg, double lg, double size2, Vec3d r) { size = size2; txx=size * ( cos(bg) * cos(lg) ); txy=size * ( cos(bg) * sin(lg) ); txz=size * (-sin(bg) ); tyx=size * ( sin(ag) * sin(bg) * cos(lg) - cos(ag) * sin(lg) ); tyy=size * ( sin(ag) * sin(bg) * sin(lg) + cos(ag) * cos(lg) ); tyz=size * ( sin(ag) * cos(bg) ); tzx=size * ( cos(ag) * sin(bg) * cos(lg) + sin(ag) * sin(lg) ); tzy=size * ( cos(ag) * sin(bg) * sin(lg) - sin(ag) * cos(lg) ); tzz=size * ( cos(ag) * cos(bg) ); deltaR=r; } ROTDenseMatrix3D :: ROTDenseMatrix3D(double ag, double bg, double lg, double size2, Vec3d r) {CalcRotMat(ag, bg, lg, size2, r); } ROTDenseMatrix3D :: ROTDenseMatrix3D(Vec3d rot2) { Vec3d r2(0,0,0); CalcRotMat(rot2.X(), rot2.Y(), rot2.Z(), 1, r2); } ROTDenseMatrix3D ROTDenseMatrix3D :: INV() { ROTDenseMatrix3D rinv(txx/sqr(size),tyx/sqr(size),tzx/sqr(size), txy/sqr(size),tyy/sqr(size),tzy/sqr(size), txz/sqr(size),tyz/sqr(size),tzz/sqr(size), 1/size,deltaR); return rinv; } Vec3d operator* (const ROTDenseMatrix3D & r, const Vec3d & v) { return Vec3d (r.XX() * v.X() + r.XY() * v.Y() + r.XZ() * v.Z(), r.YX() * v.X() + r.YY() * v.Y() + r.YZ() * v.Z(), r.ZX() * v.X() + r.ZY() * v.Y() + r.ZZ() * v.Z() ); } Point3d operator* (const ROTDenseMatrix3D & r, const Point3d & p) { return Point3d (r.XX() * p.X() + r.XY() * p.Y() + r.XZ() * p.Z(), r.YX() * p.X() + r.YY() * p.Y() + r.YZ() * p.Z(), r.ZX() * p.X() + r.ZY() * p.Y() + r.ZZ() * p.Z() ); } */ Box3d :: Box3d ( double aminx, double amaxx, double aminy, double amaxy, double aminz, double amaxz ) { minx[0] = aminx; maxx[0] = amaxx; minx[1] = aminy; maxx[1] = amaxy; minx[2] = aminz; maxx[2] = amaxz; } Box3d :: Box3d ( const Box3d & b2 ) { for (int i = 0; i < 3; i++) { minx[i] = b2.minx[i]; maxx[i] = b2.maxx[i]; } } Box3d :: Box3d ( const Box<3> & b2 ) { for (int i = 0; i < 3; i++) { minx[i] = b2.PMin()(i); maxx[i] = b2.PMax()(i); } } /* int Box3d :: Intersect (const Box3d & box2) const { int i; for (i = 0; i <= 2; i++) if (minx[i] > box2.maxx[i] || maxx[i] < box2.minx[i]) return 0; return 1; } */ /* void Box3d :: SetPoint (const Point3d & p) { minx[0] = maxx[0] = p.X(); minx[1] = maxx[1] = p.Y(); minx[2] = maxx[2] = p.Z(); } void Box3d :: AddPoint (const Point3d & p) { if (p.X() < minx[0]) minx[0] = p.X(); if (p.X() > maxx[0]) maxx[0] = p.X(); if (p.Y() < minx[1]) minx[1] = p.Y(); if (p.Y() > maxx[1]) maxx[1] = p.Y(); if (p.Z() < minx[2]) minx[2] = p.Z(); if (p.Z() > maxx[2]) maxx[2] = p.Z(); } */ void Box3d :: GetPointNr (int i, Point3d & point) const { i--; point.X() = (i & 1) ? maxx[0] : minx[0]; point.Y() = (i & 2) ? maxx[1] : minx[1]; point.Z() = (i & 4) ? maxx[2] : minx[2]; } void Box3d :: Increase (double d) { for (int i = 0; i <= 2; i++) { minx[i] -= d; maxx[i] += d; } } void Box3d :: IncreaseRel (double /* rel */) { for (int i = 0; i <= 2; i++) { double d = 0.5 * (maxx[i] - minx[i]); minx[i] -= d; maxx[i] += d; } } Box3d :: Box3d (const Point3d& p1, const Point3d& p2) { minx[0] = min2 (p1.X(), p2.X()); minx[1] = min2 (p1.Y(), p2.Y()); minx[2] = min2 (p1.Z(), p2.Z()); maxx[0] = max2 (p1.X(), p2.X()); maxx[1] = max2 (p1.Y(), p2.Y()); maxx[2] = max2 (p1.Z(), p2.Z()); } const Box3d& Box3d :: operator+=(const Box3d& b) { minx[0] = min2 (minx[0], b.minx[0]); minx[1] = min2 (minx[1], b.minx[1]); minx[2] = min2 (minx[2], b.minx[2]); maxx[0] = max2 (maxx[0], b.maxx[0]); maxx[1] = max2 (maxx[1], b.maxx[1]); maxx[2] = max2 (maxx[2], b.maxx[2]); return *this; } Point3d Box3d :: MaxCoords() const { return Point3d(maxx[0], maxx[1], maxx[2]); } Point3d Box3d :: MinCoords() const { return Point3d(minx[0], minx[1], minx[2]); } /* void Box3d :: CreateNegMinMaxBox() { minx[0] = MAXDOUBLE; minx[1] = MAXDOUBLE; minx[2] = MAXDOUBLE; maxx[0] = MINDOUBLE; maxx[1] = MINDOUBLE; maxx[2] = MINDOUBLE; } */ void Box3d :: WriteData(ofstream& fout) const { for(int i = 0; i < 3; i++) { fout << minx[i] << " " << maxx[i] << " "; } fout << "\n"; } void Box3d :: ReadData(ifstream& fin) { for(int i = 0; i < 3; i++) { fin >> minx[i]; fin >> maxx[i]; } } Box3dSphere :: Box3dSphere ( double aminx, double amaxx, double aminy, double amaxy, double aminz, double amaxz ) : Box3d (aminx, amaxx, aminy, amaxy, aminz, amaxz) { CalcDiamCenter (); } void Box3dSphere :: CalcDiamCenter () { diam = sqrt( sqr (maxx[0] - minx[0]) + sqr (maxx[1] - minx[1]) + sqr (maxx[2] - minx[2])); c.X() = 0.5 * (minx[0] + maxx[0]); c.Y() = 0.5 * (minx[1] + maxx[1]); c.Z() = 0.5 * (minx[2] + maxx[2]); inner = min2 ( min2 (maxx[0] - minx[0], maxx[1] - minx[1]), maxx[2] - minx[2]) / 2; } void Box3dSphere :: GetSubBox (int i, Box3dSphere & sbox) const { i--; if (i & 1) { sbox.minx[0] = c.X(); sbox.maxx[0] = maxx[0]; } else { sbox.minx[0] = minx[0]; sbox.maxx[0] = c.X(); } if (i & 2) { sbox.minx[1] = c.Y(); sbox.maxx[1] = maxx[1]; } else { sbox.minx[1] = minx[1]; sbox.maxx[1] = c.Y(); } if (i & 4) { sbox.minx[2] = c.Z(); sbox.maxx[2] = maxx[2]; } else { sbox.minx[2] = minx[2]; sbox.maxx[2] = c.Z(); } // sbox.CalcDiamCenter (); sbox.c.X() = 0.5 * (sbox.minx[0] + sbox.maxx[0]); sbox.c.Y() = 0.5 * (sbox.minx[1] + sbox.maxx[1]); sbox.c.Z() = 0.5 * (sbox.minx[2] + sbox.maxx[2]); sbox.diam = 0.5 * diam; sbox.inner = 0.5 * inner; } /* double Determinant (const Vec3d & col1, const Vec3d & col2, const Vec3d & col3) { return col1.x[0] * ( col2.x[1] * col3.x[2] - col2.x[2] * col3.x[1]) + col1.x[1] * ( col2.x[2] * col3.x[0] - col2.x[0] * col3.x[2]) + col1.x[2] * ( col2.x[0] * col3.x[1] - col2.x[1] * col3.x[0]); } */ void Transpose (Vec3d & v1, Vec3d & v2, Vec3d & v3) { Swap (v1.Y(), v2.X()); Swap (v1.Z(), v3.X()); Swap (v2.Z(), v3.Y()); } /* gcc4.8.3 warning: array subscript is above array bounds [-Warray-bounds] */ #ifdef __GNUC__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Warray-bounds" #endif int SolveLinearSystem (const Vec3d & col1, const Vec3d & col2, const Vec3d & col3, const Vec3d & rhs, Vec3d & sol) { // changed by MW double matrix[3][3]; double locrhs[3]; int retval = 0; for(int i=0; i<3; i++) { matrix[i][0] = col1.X(i+1); matrix[i][1] = col2.X(i+1); matrix[i][2] = col3.X(i+1); locrhs[i] = rhs.X(i+1); } for(int i=0; i<2; i++) { int pivot = i; double maxv = fabs(matrix[i][i]); for(int j=i+1; j<3; j++) if(fabs(matrix[j][i]) > maxv) { maxv = fabs(matrix[j][i]); pivot = j; } if(fabs(maxv) > 1e-40) { if(pivot != i) { swap(matrix[i][0],matrix[pivot][0]); swap(matrix[i][1],matrix[pivot][1]); swap(matrix[i][2],matrix[pivot][2]); swap(locrhs[i],locrhs[pivot]); } for(int j=i+1; j<3; j++) { double fac = matrix[j][i] / matrix[i][i]; for(int k=i+1; k<3; k++) matrix[j][k] -= fac*matrix[i][k]; locrhs[j] -= fac*locrhs[i]; } } else retval = 1; } if(fabs(matrix[2][2]) < 1e-40) retval = 1; if(retval != 0) return retval; for(int i=2; i>=0; i--) { double sum = locrhs[i]; for(int j=2; j>i; j--) sum -= matrix[i][j]*sol.X(j+1); sol.X(i+1) = sum/matrix[i][i]; } return 0; /* double det = Determinant (col1, col2, col3); if (fabs (det) < 1e-40) return 1; sol.X() = Determinant (rhs, col2, col3) / det; sol.Y() = Determinant (col1, rhs, col3) / det; sol.Z() = Determinant (col1, col2, rhs) / det; return 0; */ /* Vec3d cr; Cross (col1, col2, cr); double det = cr * col3; if (fabs (det) < 1e-40) return 1; if (fabs(cr.Z()) > 1e-12) { // solve for 3. component sol.Z() = (cr * rhs) / det; // 2x2 system for 1. and 2. component double res1 = rhs.X() - sol.Z() * col3.X(); double res2 = rhs.Y() - sol.Z() * col3.Y(); sol.X() = (col2.Y() * res1 - col2.X() * res2) / cr.Z(); sol.Y() = (col1.X() * res2 - col1.Y() * res1) / cr.Z(); } else { det = Determinant (col1, col2, col3); if (fabs (det) < 1e-40) return 1; sol.X() = Determinant (rhs, col2, col3) / det; sol.Y() = Determinant (col1, rhs, col3) / det; sol.Z() = Determinant (col1, col2, rhs) / det; } return 0; */ } #ifdef __GNUC__ #pragma GCC diagnostic pop #endif int SolveLinearSystemLS (const Vec3d & col1, const Vec3d & col2, const Vec2d & rhs, Vec3d & sol) { double a11 = col1 * col1; double a12 = col1 * col2; double a22 = col2 * col2; double det = a11 * a22 - a12 * a12; if (det*det <= 1e-24 * a11 * a22) { sol = Vec3d (0, 0, 0); return 1; } Vec2d invrhs; invrhs.X() = ( a22 * rhs.X() - a12 * rhs.Y()) / det; invrhs.Y() = (-a12 * rhs.X() + a11 * rhs.Y()) / det; sol.X() = invrhs.X() * col1.X() + invrhs.Y() * col2.X(); sol.Y() = invrhs.X() * col1.Y() + invrhs.Y() * col2.Y(); sol.Z() = invrhs.X() * col1.Z() + invrhs.Y() * col2.Z(); return 0; /* Vec3d inv1, inv2; int err = PseudoInverse (col1, col2, inv1, inv2); sol = rhs.X() * inv1 + rhs.Y() * inv2; return err; */ } int SolveLinearSystemLS2 (const Vec3d & col1, const Vec3d & col2, const Vec2d & rhs, Vec3d & sol, double & x, double & y) { double a11 = col1 * col1; double a12 = col1 * col2; double a22 = col2 * col2; double det = a11 * a22 - a12 * a12; if (fabs (det) <= 1e-12 * col1.Length() * col2.Length() || col1.Length2() == 0 || col2.Length2() == 0) { sol = Vec3d (0, 0, 0); x = 0; y = 0; return 1; } Vec2d invrhs; invrhs.X() = ( a22 * rhs.X() - a12 * rhs.Y()) / det; invrhs.Y() = (-a12 * rhs.X() + a11 * rhs.Y()) / det; sol.X() = invrhs.X() * col1.X() + invrhs.Y() * col2.X(); sol.Y() = invrhs.X() * col1.Y() + invrhs.Y() * col2.Y(); sol.Z() = invrhs.X() * col1.Z() + invrhs.Y() * col2.Z(); x = invrhs.X(); y = invrhs.Y(); return 0; /* Vec3d inv1, inv2; int err = PseudoInverse (col1, col2, inv1, inv2); sol = rhs.X() * inv1 + rhs.Y() * inv2; return err; */ } int PseudoInverse (const Vec3d & col1, const Vec3d & col2, Vec3d & inv1, Vec3d & inv2) { double a11 = col1 * col1; double a12 = col1 * col2; double a22 = col2 * col2; double det = a11 * a22 - a12 * a12; if (fabs (det) < 1e-12 * col1.Length() * col2.Length()) { inv1 = Vec3d (0, 0, 0); inv2 = Vec3d (0, 0, 0); return 1; } double ia11 = a22 / det; double ia12 = -a12 / det; double ia22 = a11 / det; inv1 = ia11 * col1 + ia12 * col2; inv2 = ia12 * col1 + ia22 * col2; return 0; } QuadraticFunction3d :: QuadraticFunction3d (const Point3d & p, const Vec3d & v) { Vec3d hv(v); hv /= (hv.Length() + 1e-12); Vec3d t1, t2; hv.GetNormal (t1); Cross (hv, t1, t2); double t1p = t1.X() * p.X() + t1.Y() * p.Y() + t1.Z() * p.Z(); double t2p = t2.X() * p.X() + t2.Y() * p.Y() + t2.Z() * p.Z(); c0 = sqr (t1p) + sqr (t2p); cx = -2 * (t1p * t1.X() + t2p * t2.X()); cy = -2 * (t1p * t1.Y() + t2p * t2.Y()); cz = -2 * (t1p * t1.Z() + t2p * t2.Z()); cxx = t1.X() * t1.X() + t2.X() * t2.X(); cyy = t1.Y() * t1.Y() + t2.Y() * t2.Y(); czz = t1.Z() * t1.Z() + t2.Z() * t2.Z(); cxy = 2 * t1.X() * t1.Y() + 2 * t2.X() * t2.Y(); cxz = 2 * t1.X() * t1.Z() + 2 * t2.X() * t2.Z(); cyz = 2 * t1.Y() * t1.Z() + 2 * t2.Y() * t2.Z(); /* (*testout) << "c0 = " << c0 << " clin = " << cx << " " << cy << " " << cz << " cq = " << cxx << " " << cyy << " " << czz << cxy << " " << cyz << " " << cyz << endl; */ } // QuadraticFunction3d gqf (Point3d (0,0,0), Vec3d (1, 0, 0)); void referencetransform :: Set (const Point3d & p1, const Point3d & p2, const Point3d & p3, double ah) { ex = p2 - p1; ex /= ex.Length(); ey = p3 - p1; ey -= (ex * ey) * ex; ey /= ey.Length(); ez = Cross (ex, ey); rp = p1; h = ah; exh = ah * ex; eyh = ah * ey; ezh = ah * ez; ah = 1 / ah; ex_h = ah * ex; ey_h = ah * ey; ez_h = ah * ez; } void referencetransform :: ToPlain (const Point3d & p, Point3d & pp) const { Vec3d v; v = p - rp; pp.X() = (ex_h * v); pp.Y() = (ey_h * v); pp.Z() = (ez_h * v); } void referencetransform :: ToPlain (const Array & p, Array & pp) const { Vec3d v; int i; pp.SetSize (p.Size()); for (i = 1; i <= p.Size(); i++) { v = p.Get(i) - rp; pp.Elem(i).X() = (ex_h * v); pp.Elem(i).Y() = (ey_h * v); pp.Elem(i).Z() = (ez_h * v); } } void referencetransform :: FromPlain (const Point3d & pp, Point3d & p) const { Vec3d v; // v = (h * pp.X()) * ex + (h * pp.Y()) * ey + (h * pp.Z()) * ez; // p = rp + v; v.X() = pp.X() * exh.X() + pp.Y() * eyh.X() + pp.Z() * ezh.X(); v.Y() = pp.X() * exh.Y() + pp.Y() * eyh.Y() + pp.Z() * ezh.Y(); v.Z() = pp.X() * exh.Z() + pp.Y() * eyh.Z() + pp.Z() * ezh.Z(); p.X() = rp.X() + v.X(); p.Y() = rp.Y() + v.Y(); p.Z() = rp.Z() + v.Z(); } } netgen-6.2.1804/libsrc/gprim/geomops2.hpp0000644000175000017500000001602313272137567016647 0ustar kurtkurt#ifndef FILE_GEOMOPS #define FILE_GEOMOPS /* *************************************************************************/ /* File: geomops.hpp */ /* Author: Joachim Schoeberl */ /* Date: 20. Jul. 02 */ /* *************************************************************************/ /* Point - Vector operations */ template class SumExpr : public VecExpr > { const TA a; const TB b; public: SumExpr (const TA aa, const TB ab) : a(aa), b(ab) { ; } double operator() (int i) const { return a(i) + b(i); } }; template inline SumExpr operator+ (const VecExpr & a, const VecExpr & b) { return SumExpr (static_cast (a), static_cast (b)); } /* template inline SumExpr&, const Vec&> operator+ (const Vec & a, const Vec & b) { return SumExpr&, const Vec&> (a, b); } */ /* template inline Vec operator+ (const Vec & a, const Vec & b) { Vec res; for (int i = 0; i < D; i++) res(i) = a(i) + b(i); return res; } */ template inline Point operator+ (const Point & a, const Vec & b) { Point res; for (int i = 0; i < D; i++) res(i) = a(i) + b(i); return res; } template inline Vec operator- (const Point & a, const Point & b) { Vec res; for (int i = 0; i < D; i++) res(i) = a(i) - b(i); return res; } template inline Point operator- (const Point & a, const Vec & b) { Point res; for (int i = 0; i < D; i++) res(i) = a(i) - b(i); return res; } template inline Vec operator- (const Vec & a, const Vec & b) { Vec res; for (int i = 0; i < D; i++) res(i) = a(i) - b(i); return res; } template inline Vec operator* (double s, const Vec & b) { Vec res; for (int i = 0; i < D; i++) res(i) = s * b(i); return res; } template inline double operator* (const Vec & a, const Vec & b) { double sum = 0; for (int i = 0; i < D; i++) sum += a(i) * b(i); return sum; } template inline Vec operator- (const Vec & b) { Vec res; for (int i = 0; i < D; i++) res(i) = -b(i); return res; } template inline Point & operator+= (Point & a, const Vec & b) { for (int i = 0; i < D; i++) a(i) += b(i); return a; } template inline Point & operator+= (Point & a, const VecExpr & b) { for (int i = 0; i < D; i++) a(i) += b(i); return a; } template inline Vec & operator+= (Vec & a, const Vec & b) { for (int i = 0; i < D; i++) a(i) += b(i); return a; } template inline Point & operator-= (Point & a, const Vec & b) { for (int i = 0; i < D; i++) a(i) -= b(i); return a; } template inline Point & operator-= (Point & a, const VecExpr & b) { for (int i = 0; i < D; i++) a(i) -= b(i); return a; } template inline Vec & operator-= (Vec & a, const Vec & b) { for (int i = 0; i < D; i++) a(i) -= b(i); return a; } template inline Vec & operator*= (Vec & a, double s) { for (int i = 0; i < D; i++) a(i) *= s; return a; } template inline Vec & operator/= (Vec & a, double s) { for (int i = 0; i < D; i++) a(i) /= s; return a; } // Matrix - Vector operations /* template inline Vec operator* (const Mat & m, const Vec & v) { Vec res; for (int i = 0; i < H; i++) { res(i) = 0; for (int j = 0; j < W; j++) res(i) += m(i,j) * v(j); } return res; } */ // thanks to VC60 partial template specialization features !!! inline Vec<2> operator* (const Mat<2,2> & m, const Vec<2> & v) { Vec<2> res; for (int i = 0; i < 2; i++) { res(i) = 0; for (int j = 0; j < 2; j++) res(i) += m(i,j) * v(j); } return res; } inline Vec<2> operator* (const Mat<2,3> & m, const Vec<3> & v) { Vec<2> res; for (int i = 0; i < 2; i++) { res(i) = 0; for (int j = 0; j < 3; j++) res(i) += m(i,j) * v(j); } return res; } inline Vec<3> operator* (const Mat<3,2> & m, const Vec<2> & v) { Vec<3> res; for (int i = 0; i < 3; i++) { res(i) = 0; for (int j = 0; j < 2; j++) res(i) += m(i,j) * v(j); } return res; } inline Vec<3> operator* (const Mat<3,3> & m, const Vec<3> & v) { Vec<3> res; for (int i = 0; i < 3; i++) { res(i) = 0; for (int j = 0; j < 3; j++) res(i) += m(i,j) * v(j); } return res; } /* template inline Mat operator* (const Mat & a, const Mat & b) { Mat m; for (int i = 0; i < H1; i++) for (int j = 0; j < W2; j++) { double sum = 0; for (int k = 0; k < W1; k++) sum += a(i,k) * b(k, j); m(i,j) = sum; } return m; } */ inline Mat<2,2> operator* (const Mat<2,2> & a, const Mat<2,2> & b) { Mat<2,2> m; for (int i = 0; i < 2; i++) for (int j = 0; j < 2; j++) { double sum = 0; for (int k = 0; k < 2; k++) sum += a(i,k) * b(k, j); m(i,j) = sum; } return m; } inline Mat<2,2> operator* (const Mat<2,3> & a, const Mat<3,2> & b) { Mat<2,2> m; for (int i = 0; i < 2; i++) for (int j = 0; j < 2; j++) { double sum = 0; for (int k = 0; k < 3; k++) sum += a(i,k) * b(k, j); m(i,j) = sum; } return m; } inline Mat<3,2> operator* (const Mat<3,2> & a, const Mat<2,2> & b) { Mat<3,2> m; for (int i = 0; i < 3; i++) for (int j = 0; j < 2; j++) { double sum = 0; for (int k = 0; k < 2; k++) sum += a(i,k) * b(k, j); m(i,j) = sum; } return m; } inline Mat<3,3> operator* (const Mat<3,3> & a, const Mat<3,3> & b) { Mat<3,3> m; for (int i = 0; i < 3; i++) for (int j = 0; j < 3; j++) { double sum = 0; for (int k = 0; k < 3; k++) sum += a(i,k) * b(k, j); m(i,j) = sum; } return m; } template inline Mat Trans (const Mat & m) { Mat res; for (int i = 0; i < H; i++) for (int j = 0; j < W; j++) res(j,i) = m(i,j); return res; } template inline ostream & operator<< (ostream & ost, const Vec & a) { ost << "("; for (int i = 0; i < D-1; i++) ost << a(i) << ", "; ost << a(D-1) << ")"; return ost; } template inline ostream & operator<< (ostream & ost, const Point & a) { ost << "("; for (int i = 0; i < D-1; i++) ost << a(i) << ", "; ost << a(D-1) << ")"; return ost; } template inline ostream & operator<< (ostream & ost, const Box & b) { ost << b.PMin() << " - " << b.PMax(); return ost; } template inline ostream & operator<< (ostream & ost, const Mat & m) { ost << "("; for (int i = 0; i < H; i++) { for (int j = 0; j < W; j++) ost << m(i,j) << " "; ost << endl; } return ost; } #endif netgen-6.2.1804/libsrc/gprim/transform3d.cpp0000644000175000017500000000640013272137567017347 0ustar kurtkurt#include #include #include #include namespace netgen { Transformation3d :: Transformation3d () { for (int i = 0; i < 3; i++) { offset[i] = 0; for (int j = 0; j < 3; j++) lin[i][j] = 0; } } Transformation3d :: Transformation3d (const Vec3d & translate) { for (int i = 0; i < 3; i++) for (int j = 0; j < 3; j++) lin[i][j] = 0; for (int i = 0; i < 3; i++) { offset[i] = translate.X(i+1); lin[i][i] = 1; } } Transformation3d :: Transformation3d (const Point3d & c, double alpha, double beta, double gamma) { // total = T_c x Rot_0 x T_c^{-1} // Use Euler angles, see many books from tech mech, e.g. // Shabana "multibody systems" Transformation3d tc(c); Transformation3d tcinv; tc.CalcInverse (tcinv); Transformation3d r1, r2, r3, ht, ht2; r1.SetAxisRotation (3, alpha); r2.SetAxisRotation (1, beta); r3.SetAxisRotation (3, gamma); ht.Combine (tc, r3); ht2.Combine (ht, r2); ht.Combine (ht2, r1); Combine (ht, tcinv); // cout << "Rotation - Transformation:" << (*this) << endl; // (*testout) << "Rotation - Transformation:" << (*this) << endl; } Transformation3d :: Transformation3d (const Point3d ** pp) { for (int i = 1; i <= 3; i++) { offset[i-1] = (*pp[0]).X(i); for (int j = 1; j <= 3; j++) lin[i-1][j-1] = (*pp[j]).X(i) - (*pp[0]).X(i); } } Transformation3d :: Transformation3d (const Point3d pp[]) { for (int i = 1; i <= 3; i++) { offset[i-1] = pp[0].X(i); for (int j = 1; j <= 3; j++) lin[i-1][j-1] = pp[j].X(i) - pp[0].X(i); } } void Transformation3d :: CalcInverse (Transformation3d & inv) const { static DenseMatrix a(3), inva(3); static Vector b(3), sol(3); for (int i = 0; i < 3; i++) { b(i) = offset[i]; for (int j = 0; j < 3; j++) a(i, j) = lin[i][j]; } ::netgen::CalcInverse (a, inva); inva.Mult (b, sol); for (int i = 0; i < 3; i++) { inv.offset[i] = -sol(i); for (int j = 0; j < 3; j++) inv.lin[i][j] = inva(i, j); } } void Transformation3d:: Combine (const Transformation3d & ta, const Transformation3d & tb) { // o = o_a+ m_a o_b // m = m_a m_b for (int i = 0; i <= 2; i++) { offset[i] = ta.offset[i]; for (int j = 0; j <= 2; j++) offset[i] += ta.lin[i][j] * tb.offset[j]; } for (int i = 0; i <= 2; i++) for (int j = 0; j <= 2; j++) { lin[i][j] = 0; for (int k = 0; k <= 2; k++) lin[i][j] += ta.lin[i][k] * tb.lin[k][j]; } } void Transformation3d :: SetAxisRotation (int dir, double alpha) { double co = cos(alpha); double si = sin(alpha); dir--; int pos1 = (dir+1) % 3; int pos2 = (dir+2) % 3; int i, j; for (i = 0; i <= 2; i++) { offset[i] = 0; for (j = 0; j <= 2; j++) lin[i][j] = 0; } lin[dir][dir] = 1; lin[pos1][pos1] = co; lin[pos2][pos2] = co; lin[pos1][pos2] = si; lin[pos2][pos1] = -si; } ostream & operator<< (ostream & ost, Transformation3d & trans) { ost << "offset = "; for (int i = 0; i <= 2; i++) ost << trans.offset[i] << " "; ost << endl << "linear = " << endl; for (int i = 0; i <= 2; i++) { for (int j = 0; j <= 2; j++) ost << trans.lin[i][j] << " "; ost << endl; } return ost; } } netgen-6.2.1804/libsrc/gprim/splinegeometry.cpp0000644000175000017500000000444213272137567020157 0ustar kurtkurt/* 2d Spline curve for Mesh generator */ #include #include #include #include "splinegeometry.hpp" namespace netgen { template SplineGeometry :: ~SplineGeometry() { for(int i = 0; i < splines.Size(); i++) delete splines[i]; } template void SplineGeometry :: GetRawData (Array & raw_data) const { raw_data.Append(D); // raw_data.Append(elto0); raw_data.Append(splines.Size()); for(int i=0; iGetRawData(raw_data); } template int SplineGeometry :: Load (const Array & raw_data, const int startpos) { int pos = startpos; if(raw_data[pos] != D) throw NgException("wrong dimension of spline raw_data"); pos++; // elto0 = raw_data[pos]; pos++; splines.SetSize(int(raw_data[pos])); pos++; Array< Point > pts(3); for(int i=0; i(GeomPoint(pts[0],1), GeomPoint(pts[1],1)); } else if (type == 3) { splines[i] = new SplineSeg3(GeomPoint(pts[0],1), GeomPoint(pts[1],1), GeomPoint(pts[2],1)); } else throw NgException("something wrong with spline raw data"); } return pos; } template void SplineGeometry :: GetBoundingBox (Box & box) const { if (!splines.Size()) { Point auxp = 0.; box.Set (auxp); return; } Array > points; for (int i = 0; i < splines.Size(); i++) { splines[i]->GetPoints (20, points); if (i == 0) box.Set(points[0]); for (int j = 0; j < points.Size(); j++) box.Add (points[j]); } } /* template void SplineGeometry :: SetGrading (const double grading) { elto0 = grading; } */ template void SplineGeometry :: AppendPoint (const Point & p, const double reffac, const bool hpref) { geompoints.Append (GeomPoint(p, reffac)); geompoints.Last().hpref = hpref; } template class SplineGeometry<2>; template class SplineGeometry<3>; } netgen-6.2.1804/libsrc/gprim/splinegeometry.hpp0000644000175000017500000000306513272137567020164 0ustar kurtkurt/* JS, Nov 2007 The 2D/3D template-base classes should go into the libsrc/gprim directory in geom2d only 2D - Geometry classes (with material properties etc.) */ #include "spline.hpp" #ifndef _FILE_SPLINEGEOMETRY #define _FILE_SPLINEGEOMETRY namespace netgen { template < int D > class SplineGeometry { // protected: public: Array < GeomPoint > geompoints; Array < SplineSeg* > splines; SplineGeometry() : geompoints{}, splines{} { ; } DLL_HEADER ~SplineGeometry(); DLL_HEADER int Load (const Array & raw_data, const int startpos = 0); DLL_HEADER void GetRawData (Array & raw_data) const; const Array*> & GetSplines () const { return splines; } int GetNSplines (void) const { return splines.Size(); } string GetSplineType (const int i) const { return splines[i]->GetType(); } SplineSeg & GetSpline (const int i) {return *splines[i];} const SplineSeg & GetSpline (const int i) const {return *splines[i];} DLL_HEADER void GetBoundingBox (Box & box) const; Box GetBoundingBox () const { Box box; GetBoundingBox (box); return box; } int GetNP () const { return geompoints.Size(); } const GeomPoint & GetPoint(int i) const { return geompoints[i]; } // void SetGrading (const double grading); DLL_HEADER void AppendPoint (const Point & p, const double reffac = 1., const bool hpref = false); void AppendSegment(SplineSeg * spline) { splines.Append (spline); } }; } #endif // _FILE_SPLINEGEOMETRY netgen-6.2.1804/libsrc/gprim/geomobjects2.hpp0000644000175000017500000001516713272137567017507 0ustar kurtkurt#ifndef FILE_OBJECTS #define FILE_OBJECTS /* *************************************************************************/ /* File: geomobjects.hpp */ /* Author: Joachim Schoeberl */ /* Date: 20. Jul. 02 */ /* *************************************************************************/ template class VecExpr { public: VecExpr () { ; } double operator() (int i) const { return static_cast (*this) (i); } }; template class Vec; template class Point; template class Point : public VecExpr > { protected: double x[D]; public: Point () { ; } Point (double ax) { x[0] = ax; } Point (double ax, double ay) { x[0] = ax; x[1] = ay; } Point (double ax, double ay, double az) { x[0] = ax; x[1] = ay; x[2] = az; } Point (double ax, double ay, double az, double au) { x[0] = ax; x[1] = ay; x[2] = az; x[3] = au;} Point (const Point & p2) { for (int i = 0; i < D; i++) x[i] = p2.x[i]; } explicit Point (const Vec & v) { for (int i = 0; i < D; i++) x[i] = v(i); } template explicit Point (const VecExpr & expr) { for (int i = 0; i < D; i++) x[i] = expr(i); } Point & operator= (const Point & p2) { for (int i = 0; i < D; i++) x[i] = p2.x[i]; return *this; } template Point & operator= (const VecExpr & expr) { for (int i = 0; i < D; i++) x[i] = expr(i); return *this; } double & operator() (int i) { return x[i]; } const double & operator() (int i) const { return x[i]; } operator const double* () const { return x; } }; template class Vec : public VecExpr > { protected: double x[D]; public: Vec () { ; } Vec (double ax) { for (int i = 0; i < D; i++) x[i] = ax; } Vec (double ax, double ay) { x[0] = ax; x[1] = ay; } Vec (double ax, double ay, double az) { x[0] = ax; x[1] = ay; x[2] = az; } Vec (double ax, double ay, double az, double au) { x[0] = ax; x[1] = ay; x[2] = az; x[3] = au; } Vec (const Vec & p2) { for (int i = 0; i < D; i++) x[i] = p2.x[i]; } explicit Vec (const Point & p) { for (int i = 0; i < D; i++) x[i] = p(i); } template explicit Vec (const VecExpr & expr) { for (int i = 0; i < D; i++) x[i] = expr(i); } Vec & operator= (const Vec & p2) { for (int i = 0; i < D; i++) x[i] = p2.x[i]; return *this; } template Vec & operator= (const VecExpr & expr) { for (int i = 0; i < D; i++) x[i] = expr(i); return *this; } Vec & operator= (double s) { for (int i = 0; i < D; i++) x[i] = s; return *this; } double & operator() (int i) { return x[i]; } const double & operator() (int i) const { return x[i]; } operator const double* () const { return x; } double Length () const { double l = 0; for (int i = 0; i < D; i++) l += x[i] * x[i]; return sqrt (l); } double Length2 () const { double l = 0; for (int i = 0; i < D; i++) l += x[i] * x[i]; return l; } const Vec & Normalize () { double l = Length(); if (l != 0) for (int i = 0; i < D; i++) x[i] /= l; return *this; } Vec GetNormal () const; }; template class Mat { protected: double x[H*W]; public: Mat () { ; } Mat (const Mat & b) { for (int i = 0; i < H*W; i++) x[i] = b.x[i]; } Mat & operator= (double s) { for (int i = 0; i < H*W; i++) x[i] = s; return *this; } Mat & operator= (const Mat & b) { for (int i = 0; i < H*W; i++) x[i] = b.x[i]; return *this; } double & operator() (int i, int j) { return x[i*W+j]; } const double & operator() (int i, int j) const { return x[i*W+j]; } Vec Col (int i) const { Vec hv; for (int j = 0; j < H; j++) hv(j) = x[j*W+i]; return hv; } Vec Row (int i) const { Vec hv; for (int j = 0; j < W; j++) hv(j) = x[i*W+j]; return hv; } void Solve (const Vec & rhs, Vec & sol) const { Mat inv; CalcInverse (*this, inv); sol = inv * rhs; } }; template class Box { protected: Point pmin, pmax; public: Box () { ; } Box ( const Point & p1, const Point & p2) { for (int i = 0; i < D; i++) { pmin(i) = min2(p1(i), p2(i)); pmax(i) = max2(p1(i), p2(i)); } } const Point & PMin () const { return pmin; } const Point & PMax () const { return pmax; } void Set (const Point & p) { pmin = pmax = p; } void Add (const Point & p) { for (int i = 0; i < D; i++) { if (p(i) < pmin(i)) pmin(i) = p(i); else if (p(i) > pmax(i)) pmax(i) = p(i); } } Point Center () const { Point c; for (int i = 0; i < D; i++) c(i) = 0.5 * (pmin(i)+pmax(i)); return c; } double Diam () const { return Abs (pmax-pmin); } Point GetPointNr (int nr) const { Point p; for (int i = 0; i < D; i++) { p(i) = (nr & 1) ? pmax(i) : pmin(i); nr >>= 1; } return p; } bool Intersect (const Box & box2) const { for (int i = 0; i < D; i++) if (pmin(i) > box2.pmax(i) || pmax(i) < box2.pmin(i)) return 0; return 1; } bool IsIn (const Point & p) const { for (int i = 0; i < D; i++) if (p(i) < pmin(i) || p(i) > pmax(i)) return 0; return 1; } void Increase (double dist) { for (int i = 0; i < D; i++) { pmin(i) -= dist; pmax(i) += dist; } } }; template class BoxSphere : public Box { protected: /// Point c; /// double diam; /// double inner; public: /// BoxSphere () { }; /// BoxSphere ( Point pmin, Point pmax ) : Box (pmin, pmax) { CalcDiamCenter(); } /// const Point & Center () const { return c; } /// double Diam () const { return diam; } /// double Inner () const { return inner; } /// void GetSubBox (int nr, BoxSphere & sbox) const { for (int i = 0; i < D; i++) { if (nr & 1) { sbox.pmin(i) = c(i); sbox.pmax(i) = this->pmax(i); } else { sbox.pmin(i) = this->pmin(i); sbox.pmax(i) = c(i); } sbox.c(i) = 0.5 * (sbox.pmin(i) + sbox.pmax(i)); nr >>= 1; } sbox.diam = 0.5 * diam; sbox.inner = 0.5 * inner; } /// void CalcDiamCenter () { c = Box::Center (); diam = Dist (this->pmin, this->pmax); inner = this->pmax(0) - this->pmin(0); for (int i = 1; i < D; i++) if (this->pmax(i) - this->pmin(i) < inner) inner = this->pmax(i) - this->pmin(i); } }; #endif netgen-6.2.1804/libsrc/gprim/geom2d.cpp0000644000175000017500000002251213272137567016264 0ustar kurtkurt#include #include #include #ifndef M_PI #define M_PI 3.14159265358979323846 #endif namespace netgen { ostream & operator<<(ostream & s, const Point2d & p) { return s << "(" << p.px << ", " << p.py << ")"; } ostream & operator<<(ostream & s, const Vec2d & v) { return s << "(" << v.vx << ", " << v.vy << ")"; } #ifdef none ostream & operator<<(ostream & s, const Line2d & l) { return s << l.p1 << "-" << l.p2; } ostream & operator<<(ostream & s, const TRIANGLE2D & t) { return s << t.p1 << "-" << t.p2 << "-" << t.p3; } #endif double Fastatan2 (double x, double y) { if (y > 0) { if (x > 0) return y / (x+y); else return 1 - x / (y-x); } else if (y < 0) { if (x < 0) return 2 + y / (x+y); else return 3 - x / (y-x); } else { if (x >= 0) return 0; else return 2; } } double Angle (const Vec2d & v) { if (v.X() == 0 && v.Y() == 0) return 0; double ang = atan2 (v.Y(), v.X()); if (ang < 0) ang+= 2 * M_PI; return ang; } double FastAngle (const Vec2d & v) { return Fastatan2 (v.X(), v.Y()); } double Angle (const Vec2d & v1, const Vec2d & v2) { double ang = Angle(v2) - Angle(v1); if (ang < 0) ang += 2 * M_PI; return ang; } double FastAngle (const Vec2d & v1, const Vec2d & v2) { double ang = FastAngle(v2) - FastAngle(v1); if (ang < 0) ang += 4; return ang; } /* int CW (const Point2d & p1,const Point2d & p2,const Point2d & p3) { return Cross (p2 - p1, p3 - p2) < 0; } int CCW (const Point2d & p1,const Point2d & p2,const Point2d & p3) { return Cross (p2 - p1, p3 - p2) > 0; } */ double Dist2(const Line2d & g, const Line2d & h ) { double dd = 0.0, d1,d2,d3,d4; Point2d cp = CrossPoint(g,h); if ( Parallel(g,h) || !IsOnLine(g,cp) || !IsOnLine(h,cp) ) { d1 = Dist2(g.P1(),h.P1()); d2 = Dist2(g.P1(),h.P2()); d3 = Dist2(g.P2(),h.P1()); d4 = Dist2(g.P2(),h.P2()); if (d1= -heps * len2 && c2 <= heps * len2 && d <= heps * len2; } #ifdef none int IsOnLine (const PLine2d & l, const Point2d & p, double heps) { double c1 = (p - l.P1()) * l.Delta(); double c2 = (p - l.P2()) * l.Delta(); double d = fabs (Cross ( (p - l.P1()), l.Delta())); double len2 = l.Length2(); return c1 >= -heps * len2 && c2 <= heps * len2 && d <= heps * len2; } int IsOnLongLine (const Line2d & l, const Point2d & p) { double d = fabs (Cross ( (p - l.P1()), l.Delta())); return d <= EPSGEOM * l.Length(); } int Hit (const Line2d & l1, const Line2d & l2, double heps) { double den = Cross ( (l1.P2() - l1.P1()), (l2.P1() - l2.P2())); double num1 = Cross ( (l2.P1() - l1.P1()), (l2.P1() - l2.P2())); double num2 = Cross ( (l1.P2() - l1.P1()), (l2.P1() - l1.P1())); num1 *= sgn (den); num2 *= sgn (den); den = fabs (den); int ch = (-den * heps <= num1 && num1 <= den * (1 + heps) && -den * heps <= num2 && num2 <= den * (1 + heps)); return ch; } void Line2d :: GetNormal (Line2d & n) const { double ax = P2().X()-P1().X(), ay = P2().Y()-P1().Y(); Point2d mid(P1().X()+.5*ax, P1().Y()+.5*ay); n=Line2d(mid,Point2d(mid.X()+ay,mid.Y()-ax)) ; } Vec2d Line2d :: NormalDelta () const { Line2d tmp; GetNormal(tmp); return tmp.Delta(); } int TRIANGLE2D :: IsOn (const Point2d & p) const { return IsOnLine (Line2d (p1, p2), p) || IsOnLine (Line2d (p1, p3), p) || IsOnLine (Line2d (p2, p3), p); } int TRIANGLE2D :: IsIn (const Point2d & p) const { return ::CW(p, p1, p2) == ::CW(p, p2, p3) && ::CW(p, p1, p2) == ::CW(p, p3, p1); } int PTRIANGLE2D :: IsOn (const Point2d & p) const { return IsOnLine (Line2d (*p1, *p2), p) || IsOnLine (Line2d (*p1, *p3), p) || IsOnLine (Line2d (*p2, *p3), p); } int PTRIANGLE2D :: IsIn (const Point2d & p) const { return ::CW(p, *p1, *p2) == ::CW(p, *p2, *p3) && ::CW(p, *p1, *p2) == ::CW(p, *p3, *p1); } #endif Polygon2d :: Polygon2d () { ; } Polygon2d :: ~Polygon2d () { ; } void Polygon2d :: AddPoint (const Point2d & p) { points.Append(p); } double Polygon2d :: HArea () const { int i; double ar = 0; for (i = 1; i <= points.Size(); i++) { const Point2d & p1 = points.Get(i); const Point2d & p2 = points.Get(i%points.Size()+1); ar += (p2.X()-p1.X()) * p1.Y() - (p2.Y()-p1.Y()) * p1.X(); } return ar/2; /* CURSOR c; double ar = 0; Point2d * p1, * p2, p0 = Point2d(0, 0); Vec2d v1, v2 = Vec2d(1, 0); p2 = points[points.Last()]; for (c = points.First(); c != points.Head(); c++) { p1 = p2; p2 = points[c]; ar += Cross ( (*p2-*p1), (*p1 - p0)); } return ar / 2; */ } int Polygon2d :: IsOn (const Point2d & p) const { int i; for (i = 1; i <= points.Size(); i++) { const Point2d & p1 = points.Get(i); const Point2d & p2 = points.Get(i%points.Size()+1); if (IsOnLine (Line2d(p1, p2), p)) return 1; } return 0; /* CURSOR c; Point2d * p1, * p2; p2 = points[points.Last()]; for (c = points.First(); c != points.Head(); c++) { p1 = p2; p2 = points[c]; if (IsOnLine (Line2d(*p1, *p2), p)) return 1; } return 0; */ } int Polygon2d :: IsIn (const Point2d & p) const { int i; double sum = 0, ang; for (i = 1; i <= points.Size(); i++) { const Point2d & p1 = points.Get(i); const Point2d & p2 = points.Get(i%points.Size()+1); ang = Angle ( (p1 - p), (p2 - p) ); if (ang > M_PI) ang -= 2 * M_PI; sum += ang; } return fabs(sum) > M_PI; /* CURSOR c; Point2d * p1, * p2; double sum = 0, ang; p2 = points[points.Last()]; for (c = points.First(); c != points.Head(); c++) { p1 = p2; p2 = points[c]; ang = Angle ( (*p1 - p), (*p2 - p) ); if (ang > M_PI) ang -= 2 * M_PI; sum += ang; } return fabs(sum) > M_PI; */ } int Polygon2d :: IsConvex () const { /* Point2d *p, *pold, *pnew; char cw; CURSOR c; if (points.Length() < 3) return 0; c = points.Last(); p = points[c]; c--; pold = points[c]; pnew = points[points.First()]; cw = ::CW (*pold, *p, *pnew); for (c = points.First(); c != points.Head(); c++) { pnew = points[c]; if (cw != ::CW (*pold, *p, *pnew)) return 0; pold = p; p = pnew; } */ return 0; } int Polygon2d :: IsStarPoint (const Point2d & p) const { /* Point2d *pnew, *pold; char cw; CURSOR c; if (points.Length() < 3) return 0; pold = points[points.Last()]; pnew = points[points.First()]; cw = ::CW (p, *pold, *pnew); for (c = points.First(); c != points.Head(); c++) { pnew = points[c]; if (cw != ::CW (p, *pold, *pnew)) return 0; pold = pnew; } return 1; */ return 0; } Point2d Polygon2d :: Center () const { /* double ai, a = 0, x = 0, y = 0; Point2d * p, *p2; Point2d p0 = Point2d(0, 0); CURSOR c; p2 = points[points.Last()]; for (c = points.First(); c != points.Head(); c++) { p = points[c]; ai = Cross (*p2 - p0, *p - p0); x += ai / 3 * (p2->X() + p->X()); y += ai / 3 * (p2->Y() + p->Y()); a+= ai; p2 = p; } if (a != 0) return Point2d (x / a, y / a); else return Point2d (0, 0); */ return Point2d (0, 0); } Point2d Polygon2d :: EqualAreaPoint () const { /* double a11 = 0, a12 = 0, a21= 0, a22 = 0; double b1 = 0, b2 = 0, dx, dy; double det; Point2d * p, *p2; CURSOR c; p = points[points.Last()]; for (c = points.First(); c != points.Head(); c++) { p2 = p; p = points[c]; dx = p->X() - p2->X(); dy = p->Y() - p2->Y(); a11 += sqr (dy); a12 -= dx * dy; a21 -= dx * dy; a22 += sqr (dx); b1 -= dy * (p->X() * p2->Y() - p2->X() * p->Y()); b2 -= dx * (p->Y() * p2->X() - p2->Y() * p->X()); } det = a11 * a22 - a21 * a12; if (det != 0) return Point2d ( (b1 * a22 - b2 * a12) / det, (a11 * b2 - a21 * b1) / det); else return Point2d (0, 0); */ return Point2d (0, 0); } } netgen-6.2.1804/libsrc/gprim/adtree.hpp0000644000175000017500000002466413272137567016372 0ustar kurtkurt#ifndef FILE_ADTREE #define FILE_ADTREE /* *************************************************************************/ /* File: adtree.hh */ /* Author: Joachim Schoeberl */ /* Date: 16. Feb. 98 */ /* Redesigned by Wolfram Muehlhuber, May 1998 */ /* *************************************************************************/ namespace netgen { /** Alternating Digital Tree */ // #include "../include/mystdlib.h" // #include "../include/myadt.hpp" class ADTreeNode { public: ADTreeNode *left, *right, *father; int dim; float sep; float *data; float *boxmin; float *boxmax; int pi; int nchilds; ADTreeNode (int adim); ~ADTreeNode (); friend class ADTree; }; class ADTreeCriterion { public: ADTreeCriterion() { } virtual int Eval (const ADTreeNode * node) const = 0; }; class ADTree { int dim; ADTreeNode * root; float *cmin, *cmax; Array ela; const ADTreeCriterion * criterion; Array stack; Array stackdir; int stackindex; public: ADTree (int adim, const float * acmin, const float * acmax); ~ADTree (); void Insert (const float * p, int pi); // void GetIntersecting (const float * bmin, const float * bmax, // Array & pis) const; void SetCriterion (ADTreeCriterion & acriterion); void Reset (); int Next (); void GetMatch (Array & matches); void DeleteElement (int pi); void Print (ostream & ost) const { PrintRec (ost, root); } void PrintRec (ostream & ost, const ADTreeNode * node) const; }; class ADTreeNode3 { public: ADTreeNode3 *left, *right, *father; float sep; float data[3]; int pi; int nchilds; ADTreeNode3 (); void DeleteChilds (); friend class ADTree3; static BlockAllocator ball; void * operator new(size_t); void operator delete (void *); }; class ADTree3 { ADTreeNode3 * root; float cmin[3], cmax[3]; Array ela; public: ADTree3 (const float * acmin, const float * acmax); ~ADTree3 (); void Insert (const float * p, int pi); void GetIntersecting (const float * bmin, const float * bmax, Array & pis) const; void DeleteElement (int pi); void Print (ostream & ost) const { PrintRec (ost, root); } void PrintRec (ostream & ost, const ADTreeNode3 * node) const; }; /* // divide each direction #define ADTN_DIV 10 class ADTreeNode3Div { public: ADTreeNode3Div *father; ADTreeNode3Div *childs[ADTN_DIV]; float minx, dist; float data[3]; int pi; int nchilds; ADTreeNode3Div (); void DeleteChilds (); friend class ADTree3Div; static BlockAllocator ball; void * operator new(size_t); void operator delete (void *); }; class ADTree3Div { ADTreeNode3Div * root; float cmin[3], cmax[3]; Array ela; public: ADTree3Div (const float * acmin, const float * acmax); ~ADTree3Div (); void Insert (const float * p, int pi); void GetIntersecting (const float * bmin, const float * bmax, Array & pis) const; void DeleteElement (int pi); void Print (ostream & ost) const { PrintRec (ost, root); } void PrintRec (ostream & ost, const ADTreeNode3Div * node) const; }; #define ADTN_SIZE 10 // multiple entries class ADTreeNode3M { public: ADTreeNode3M *left, *right, *father; float sep; float data[ADTN_SIZE][3]; int pi[ADTN_SIZE]; int nchilds; ADTreeNode3M (); void DeleteChilds (); friend class ADTree3M; static BlockAllocator ball; void * operator new(size_t); void operator delete (void *); }; class ADTree3M { ADTreeNode3M * root; float cmin[3], cmax[3]; Array ela; public: ADTree3M (const float * acmin, const float * acmax); ~ADTree3M (); void Insert (const float * p, int pi); void GetIntersecting (const float * bmin, const float * bmax, Array & pis) const; void DeleteElement (int pi); void Print (ostream & ost) const { PrintRec (ost, root); } void PrintRec (ostream & ost, const ADTreeNode3M * node) const; }; class ADTreeNode3F { public: ADTreeNode3F *father; ADTreeNode3F *childs[8]; float sep[3]; float data[3]; int pi; int nchilds; ADTreeNode3F (); void DeleteChilds (); friend class ADTree3F; static BlockAllocator ball; void * operator new(size_t); void operator delete (void *); }; // fat tree class ADTree3F { ADTreeNode3F * root; float cmin[3], cmax[3]; Array ela; public: ADTree3F (const float * acmin, const float * acmax); ~ADTree3F (); void Insert (const float * p, int pi); void GetIntersecting (const float * bmin, const float * bmax, Array & pis) const; void DeleteElement (int pi); void Print (ostream & ost) const { PrintRec (ost, root); } void PrintRec (ostream & ost, const ADTreeNode3F * node) const; }; class ADTreeNode3FM { public: ADTreeNode3FM *father; ADTreeNode3FM *childs[8]; float sep[3]; float data[ADTN_SIZE][3]; int pi[ADTN_SIZE]; int nchilds; ADTreeNode3FM (); void DeleteChilds (); friend class ADTree3FM; static BlockAllocator ball; void * operator new(size_t); void operator delete (void *); }; // fat tree class ADTree3FM { ADTreeNode3FM * root; float cmin[3], cmax[3]; Array ela; public: ADTree3FM (const float * acmin, const float * acmax); ~ADTree3FM (); void Insert (const float * p, int pi); void GetIntersecting (const float * bmin, const float * bmax, Array & pis) const; void DeleteElement (int pi); void Print (ostream & ost) const { PrintRec (ost, root); } void PrintRec (ostream & ost, const ADTreeNode3FM * node) const; }; */ class ADTreeNode6 { public: ADTreeNode6 *left, *right, *father; float sep; float data[6]; int pi; int nchilds; ADTreeNode6 (); void DeleteChilds (); friend class ADTree6; static BlockAllocator ball; void * operator new(size_t); void operator delete (void *); }; class ADTree6 { ADTreeNode6 * root; float cmin[6], cmax[6]; Array ela; public: ADTree6 (const float * acmin, const float * acmax); ~ADTree6 (); void Insert (const float * p, int pi); void GetIntersecting (const float * bmin, const float * bmax, Array & pis) const; void DeleteElement (int pi); void Print (ostream & ost) const { PrintRec (ost, root); } int Depth () const { return DepthRec (root); } int Elements () const { return ElementsRec (root); } void PrintRec (ostream & ost, const ADTreeNode6 * node) const; int DepthRec (const ADTreeNode6 * node) const; int ElementsRec (const ADTreeNode6 * node) const; void PrintMemInfo (ostream & ost) const; }; template class T_ADTreeNode { public: T_ADTreeNode *left, *right, *father; float sep; // float data[DIM]; Point data; T pi; int nchilds; T_ADTreeNode () { // pi = -1; SetInvalid(pi); left = NULL; right = NULL; father = NULL; nchilds = 0; } void DeleteChilds () { if (left) { left->DeleteChilds(); delete left; left = NULL; } if (right) { right->DeleteChilds(); delete right; right = NULL; } } // friend class T_ADTree; static BlockAllocator ball; void * operator new(size_t) { return ball.Alloc(); } void operator delete (void * p) { ball.Free(p); } }; template class T_ADTree { T_ADTreeNode * root; // float cmin[dim], cmax[dim]; Point cmin, cmax; // Array*> ela; ClosedHashTable*> ela; public: T_ADTree (Point acmin, Point acmax); ~T_ADTree (); void Insert (Point p, T pi); void GetIntersecting (Point bmin, Point bmax, Array & pis) const; void DeleteElement (T pi); void Print (ostream & ost) const { PrintRec (ost, root); } int Depth () const { return DepthRec (root); } int Elements () const { return ElementsRec (root); } void PrintRec (ostream & ost, const T_ADTreeNode * node) const; int DepthRec (const T_ADTreeNode * node) const; int ElementsRec (const T_ADTreeNode * node) const; void PrintMemInfo (ostream & ost) const; }; /* class ADTreeNode6F { public: ADTreeNode6F * father; ADTreeNode6F * childs[64]; float sep[6]; float data[6]; int pi; int nchilds; ADTreeNode6F (); void DeleteChilds (); friend class ADTree6F; static BlockAllocator ball; void * operator new(size_t); void operator delete (void *); }; class ADTree6F { ADTreeNode6F * root; float cmin[6], cmax[6]; Array ela; public: ADTree6F (const float * acmin, const float * acmax); ~ADTree6F (); void Insert (const float * p, int pi); void GetIntersecting (const float * bmin, const float * bmax, Array & pis) const; void DeleteElement (int pi); void Print (ostream & ost) const { PrintRec (ost, root); } int Depth () const { return DepthRec (root); } void PrintRec (ostream & ost, const ADTreeNode6F * node) const; int DepthRec (const ADTreeNode6F * node) const; }; */ class Point3dTree { ADTree3 * tree; public: DLL_HEADER Point3dTree (const Point<3> & pmin, const Point<3> & pmax); DLL_HEADER ~Point3dTree (); DLL_HEADER void Insert (const Point<3> & p, int pi); void DeleteElement (int pi) { tree->DeleteElement(pi); } DLL_HEADER void GetIntersecting (const Point<3> & pmin, const Point<3> & pmax, Array & pis) const; const ADTree3 & Tree() const { return *tree; }; }; template class BoxTree { T_ADTree<2*dim,T> * tree; Point boxpmin, boxpmax; public: BoxTree (const Box & abox); BoxTree (const Point & apmin, const Point & apmax); ~BoxTree (); void Insert (const Point & bmin, const Point & bmax, T pi); void Insert (const Box & box, T pi) { Insert (box.PMin(), box.PMax(), pi); } void DeleteElement (T pi) { tree->DeleteElement(pi); } void GetIntersecting (const Point & pmin, const Point & pmax, Array & pis) const; // const T_ADTree<2*dim> & Tree() const { return *tree; }; // T_ADTree<2*dim> & Tree() { return *tree; }; }; } #endif netgen-6.2.1804/libsrc/gprim/geomfuncs.cpp0000644000175000017500000000425113272137567017075 0ustar kurtkurt#include #include #include namespace netgen { /* // template <> inline void CalcInverse (const Mat<2,2> & m, Mat<2,2> & inv) { double det = m(0,0) * m(1,1) - m(0,1) * m(1,0); if (det == 0) { inv = 0; return; } double idet = 1.0 / det; inv(0,0) = idet * m(1,1); inv(0,1) = -idet * m(0,1); inv(1,0) = -idet * m(1,0); inv(1,1) = idet * m(0,0); } */ // template <> void CalcInverse (const Mat<3,3> & m, Mat<3,3> & inv) { double det = Det (m); if (det == 0) { inv = 0; return; } double idet = 1.0 / det; inv(0,0) = idet * (m(1,1) * m(2,2) - m(1,2) * m(2,1)); inv(1,0) = -idet * (m(1,0) * m(2,2) - m(1,2) * m(2,0)); inv(2,0) = idet * (m(1,0) * m(2,1) - m(1,1) * m(2,0)); inv(0,1) = -idet * (m(0,1) * m(2,2) - m(0,2) * m(2,1)); inv(1,1) = idet * (m(0,0) * m(2,2) - m(0,2) * m(2,0)); inv(2,1) = -idet * (m(0,0) * m(2,1) - m(0,1) * m(2,0)); inv(0,2) = idet * (m(0,1) * m(1,2) - m(0,2) * m(1,1)); inv(1,2) = -idet * (m(0,0) * m(1,2) - m(0,2) * m(1,0)); inv(2,2) = idet * (m(0,0) * m(1,1) - m(0,1) * m(1,0)); } /* // template <> void CalcInverse (const Mat<2,3> & m, Mat<3,2> & inv) { Mat<2,2> a = m * Trans (m); Mat<2,2> ainv; CalcInverse (a, ainv); inv = Trans (m) * ainv; } */ double Det (const Mat<2,2> & m) { return m(0,0) * m(1,1) - m(0,1) * m(1,0); } double Det (const Mat<3,3> & m) { return m(0,0) * m(1,1) * m(2,2) + m(1,0) * m(2,1) * m(0,2) + m(2,0) * m(0,1) * m(1,2) - m(0,0) * m(2,1) * m(1,2) - m(1,0) * m(0,1) * m(2,2) - m(2,0) * m(1,1) * m(0,2); } void EigenValues (const Mat<3,3> & m, Vec<3> & ev) { const double pi = 3.141592; double a, b, c, d; double p, q; double arg; a = -1.; b = m(0,0) + m(1,1) + m(2,2); c = -( m(0,0)*m(2,2) + m(1,1)*m(2,2) + m(0,0)*m(1,1) - sqr(m(0,1)) - sqr(m(0,2)) - sqr(m(1,2)) ); d = Det (m); p = 3.*a*c - sqr(b); q = 27.*sqr(a)*d - 9.*a*b*c + 2.*sqr(b)*b; arg = acos((-q/2)/sqrt(-(p*p*p))); ev(0) = (2. * sqrt(-p) * cos(arg/3.) - b) / 3.*a; ev(1) = (-2. * sqrt(-p) * cos(arg/3.+pi/3) - b) / 3.*a; ev(2) = (-2. * sqrt(-p) * cos(arg/3.-pi/3)- b) / 3.*a; } } netgen-6.2.1804/libsrc/gprim/adtree.cpp0000644000175000017500000012547313272137567016365 0ustar kurtkurt#include #include // class DenseMatrix; #include namespace netgen { /* ******************************* ADTree ******************************* */ ADTreeNode :: ADTreeNode(int adim) { pi = -1; left = NULL; right = NULL; father = NULL; nchilds = 0; dim = adim; data = new float [dim]; boxmin = NULL; boxmax = NULL; } ADTreeNode :: ~ADTreeNode() { delete data; } ADTree :: ADTree (int adim, const float * acmin, const float * acmax) : ela(0), stack(1000), stackdir(1000) { dim = adim; cmin = new float [dim]; cmax = new float [dim]; memcpy (cmin, acmin, dim * sizeof(float)); memcpy (cmax, acmax, dim * sizeof(float)); root = new ADTreeNode (dim); root->sep = (cmin[0] + cmax[0]) / 2; root->boxmin = new float [dim]; root->boxmax = new float [dim]; memcpy (root->boxmin, cmin, dim * sizeof(float)); memcpy (root->boxmax, cmax, dim * sizeof(float)); } ADTree :: ~ADTree () { ; } void ADTree :: Insert (const float * p, int pi) { ADTreeNode *node(NULL); ADTreeNode *next; int dir; int lr(1); float * bmin = new float [dim]; float * bmax = new float [dim]; memcpy (bmin, cmin, dim * sizeof(float)); memcpy (bmax, cmax, dim * sizeof(float)); next = root; dir = 0; while (next) { node = next; if (node->pi == -1) { memcpy (node->data, p, dim * sizeof(float)); node->pi = pi; if (ela.Size() < pi+1) ela.SetSize (pi+1); ela[pi] = node; return; } if (node->sep > p[dir]) { next = node->left; bmax[dir] = node->sep; lr = 0; } else { next = node->right; bmin[dir] = node->sep; lr = 1; } dir++; if (dir == dim) dir = 0; } next = new ADTreeNode(dim); memcpy (next->data, p, dim * sizeof(float)); next->pi = pi; next->sep = (bmin[dir] + bmax[dir]) / 2; next->boxmin = bmin; next->boxmax = bmax; if (ela.Size() < pi+1) ela.SetSize (pi+1); ela[pi] = next; if (lr) node->right = next; else node->left = next; next -> father = node; while (node) { node->nchilds++; node = node->father; } } void ADTree :: DeleteElement (int pi) { ADTreeNode * node = ela[pi]; node->pi = -1; node = node->father; while (node) { node->nchilds--; node = node->father; } } void ADTree :: SetCriterion (ADTreeCriterion & acriterion) { criterion = & acriterion; } void ADTree :: Reset () { stack.Elem(1) = root; stackdir.Elem(1) = 0; stackindex = 1; } int ADTree:: Next () { ADTreeNode *node; int dir; if (stackindex == 0) return -1; do { node = stack.Get(stackindex); dir = stackdir.Get(stackindex); stackindex --; if (criterion -> Eval(node)) { int ndir = dir + 1; if (ndir == dim) ndir = 0; if (node -> left && criterion -> Eval (node->left)) { stackindex ++; stack.Elem(stackindex) = node -> left; stackdir.Elem(stackindex) = ndir; } if (node->right && criterion -> Eval (node -> right)) { stackindex++; stack.Elem(stackindex) = node->right; stackdir.Elem(stackindex) = ndir; } if (node -> pi != -1) return node->pi; } } while (stackindex > 0); return -1; } void ADTree :: GetMatch (Array & matches) { int nodenr; Reset(); while ( (nodenr = Next()) != -1) matches.Append (nodenr); } void ADTree :: PrintRec (ostream & ost, const ADTreeNode * node) const { if (node->data) { ost << node->pi << ": "; ost << node->nchilds << " childs, "; for (int i = 0; i < dim; i++) ost << node->data[i] << " "; ost << endl; } if (node->left) { ost << "l "; PrintRec (ost, node->left); } if (node->right) { ost << "r "; PrintRec (ost, node->right); } } /* ******************************* ADTree3 ******************************* */ ADTreeNode3 :: ADTreeNode3() { pi = -1; left = NULL; right = NULL; father = NULL; nchilds = 0; } void ADTreeNode3 :: DeleteChilds () { if (left) { left->DeleteChilds(); delete left; left = NULL; } if (right) { right->DeleteChilds(); delete right; right = NULL; } } BlockAllocator ADTreeNode3 :: ball(sizeof (ADTreeNode3)); void * ADTreeNode3 :: operator new(size_t s) { return ball.Alloc(); } void ADTreeNode3 :: operator delete (void * p) { ball.Free (p); } ADTree3 :: ADTree3 (const float * acmin, const float * acmax) : ela(0) { memcpy (cmin, acmin, 3 * sizeof(float)); memcpy (cmax, acmax, 3 * sizeof(float)); root = new ADTreeNode3; root->sep = (cmin[0] + cmax[0]) / 2; } ADTree3 :: ~ADTree3 () { root->DeleteChilds(); delete root; } void ADTree3 :: Insert (const float * p, int pi) { ADTreeNode3 *node(NULL); ADTreeNode3 *next; int dir; int lr(0); float bmin[3]; float bmax[3]; memcpy (bmin, cmin, 3 * sizeof(float)); memcpy (bmax, cmax, 3 * sizeof(float)); next = root; dir = 0; while (next) { node = next; if (node->pi == -1) { memcpy (node->data, p, 3 * sizeof(float)); node->pi = pi; if (ela.Size() < pi+1) ela.SetSize (pi+1); ela[pi] = node; return; } if (node->sep > p[dir]) { next = node->left; bmax[dir] = node->sep; lr = 0; } else { next = node->right; bmin[dir] = node->sep; lr = 1; } dir++; if (dir == 3) dir = 0; } next = new ADTreeNode3; memcpy (next->data, p, 3 * sizeof(float)); next->pi = pi; next->sep = (bmin[dir] + bmax[dir]) / 2; if (ela.Size() < pi+1) ela.SetSize (pi+1); ela[pi] = next; if (lr) node->right = next; else node->left = next; next -> father = node; while (node) { node->nchilds++; node = node->father; } } void ADTree3 :: DeleteElement (int pi) { ADTreeNode3 * node = ela[pi]; node->pi = -1; node = node->father; while (node) { node->nchilds--; node = node->father; } } void ADTree3 :: GetIntersecting (const float * bmin, const float * bmax, Array & pis) const { static Array stack(1000); static Array stackdir(1000); ADTreeNode3 * node; int dir, stacks; stack.SetSize (1000); stackdir.SetSize(1000); pis.SetSize(0); stack.Elem(1) = root; stackdir.Elem(1) = 0; stacks = 1; while (stacks) { node = stack.Get(stacks); dir = stackdir.Get(stacks); stacks--; if (node->pi != -1) { if (node->data[0] >= bmin[0] && node->data[0] <= bmax[0] && node->data[1] >= bmin[1] && node->data[1] <= bmax[1] && node->data[2] >= bmin[2] && node->data[2] <= bmax[2]) pis.Append (node->pi); } int ndir = dir+1; if (ndir == 3) ndir = 0; if (node->left && bmin[dir] <= node->sep) { stacks++; stack.Elem(stacks) = node->left; stackdir.Elem(stacks) = ndir; } if (node->right && bmax[dir] >= node->sep) { stacks++; stack.Elem(stacks) = node->right; stackdir.Elem(stacks) = ndir; } } } void ADTree3 :: PrintRec (ostream & ost, const ADTreeNode3 * node) const { // if (node->data) // true anyway { ost << node->pi << ": "; ost << node->nchilds << " childs, "; for (int i = 0; i < 3; i++) ost << node->data[i] << " "; ost << endl; } if (node->left) PrintRec (ost, node->left); if (node->right) PrintRec (ost, node->right); } #ifdef ABC /* ******************************* ADTree3Div ******************************* */ ADTreeNode3Div :: ADTreeNode3Div() { pi = 0; int i; for (i = 0; i < ADTN_DIV; i++) childs[i] = NULL; father = NULL; nchilds = 0; minx = 0; dist = 1; } void ADTreeNode3Div :: DeleteChilds () { int i; for (i = 0; i < ADTN_DIV; i++) if (childs[i]) { childs[i]->DeleteChilds(); delete childs[i]; childs[i] = NULL; } } BlockAllocator ADTreeNode3Div :: ball(sizeof (ADTreeNode3Div)); void * ADTreeNode3Div :: operator new(size_t) { return ball.Alloc(); } void ADTreeNode3Div :: operator delete (void * p) { ball.Free (p); } ADTree3Div :: ADTree3Div (const float * acmin, const float * acmax) : ela(0) { memcpy (cmin, acmin, 3 * sizeof(float)); memcpy (cmax, acmax, 3 * sizeof(float)); root = new ADTreeNode3Div; root->minx = cmin[0]; root->dist = (cmax[0] - cmin[0]) / ADTN_DIV; // root->sep = (cmin[0] + cmax[0]) / 2; } ADTree3Div :: ~ADTree3Div () { root->DeleteChilds(); delete root; } void ADTree3Div :: Insert (const float * p, int pi) { ADTreeNode3Div *node; ADTreeNode3Div *next; int dir; int bag; float bmin[3]; float bmax[3]; memcpy (bmin, cmin, 3 * sizeof(float)); memcpy (bmax, cmax, 3 * sizeof(float)); next = root; dir = 0; while (next) { node = next; if (!node->pi) { memcpy (node->data, p, 3 * sizeof(float)); node->pi = pi; if (ela.Size() < pi) ela.SetSize (pi); ela.Elem(pi) = node; return; } double dx = (bmax[dir] - bmin[dir]) / ADTN_DIV; bag = int ((p[dir]-bmin[dir]) / dx); // (*testout) << "insert, bag = " << bag << endl; if (bag < 0) bag = 0; if (bag >= ADTN_DIV) bag = ADTN_DIV-1; double nbmin = bmin[dir] + bag * dx; double nbmax = bmin[dir] + (bag+1) * dx; /* (*testout) << "bmin, max = " << bmin[dir] << "-" << bmax[dir] << " p = " << p[dir]; */ next = node->childs[bag]; bmin[dir] = nbmin; bmax[dir] = nbmax; // (*testout) << "new bmin, max = " << bmin[dir] << "-" << bmax[dir] << endl; /* if (node->sep > p[dir]) { next = node->left; bmax[dir] = node->sep; lr = 0; } else { next = node->right; bmin[dir] = node->sep; lr = 1; } */ dir++; if (dir == 3) dir = 0; } next = new ADTreeNode3Div; memcpy (next->data, p, 3 * sizeof(float)); next->pi = pi; next->minx = bmin[dir]; next->dist = (bmax[dir] - bmin[dir]) / ADTN_DIV; // next->sep = (bmin[dir] + bmax[dir]) / 2; if (ela.Size() < pi) ela.SetSize (pi); ela.Elem(pi) = next; node->childs[bag] = next; next -> father = node; while (node) { node->nchilds++; node = node->father; } } void ADTree3Div :: DeleteElement (int pi) { ADTreeNode3Div * node = ela.Get(pi); node->pi = 0; node = node->father; while (node) { node->nchilds--; node = node->father; } } void ADTree3Div :: GetIntersecting (const float * bmin, const float * bmax, Array & pis) const { static Array stack(1000); static Array stackdir(1000); ADTreeNode3Div * node; int dir, i, stacks; stack.SetSize (1000); stackdir.SetSize(1000); pis.SetSize(0); stack.Elem(1) = root; stackdir.Elem(1) = 0; stacks = 1; while (stacks) { node = stack.Get(stacks); dir = stackdir.Get(stacks); stacks--; if (node->pi) { if (node->data[0] >= bmin[0] && node->data[0] <= bmax[0] && node->data[1] >= bmin[1] && node->data[1] <= bmax[1] && node->data[2] >= bmin[2] && node->data[2] <= bmax[2]) pis.Append (node->pi); } int ndir = dir+1; if (ndir == 3) ndir = 0; int mini = int ( (bmin[dir] - node->minx) / node->dist ); int maxi = int ( (bmax[dir] - node->minx) / node->dist ); // (*testout) << "get int, mini, maxi = " << mini << ", " << maxi << endl; if (mini < 0) mini = 0; if (maxi >= ADTN_DIV) maxi = ADTN_DIV-1; for (i = mini; i <= maxi; i++) if (node->childs[i]) { stacks++; stack.Elem(stacks) = node->childs[i]; stackdir.Elem(stacks) = ndir; } /* if (node->left && bmin[dir] <= node->sep) { stacks++; stack.Elem(stacks) = node->left; stackdir.Elem(stacks) = ndir; } if (node->right && bmax[dir] >= node->sep) { stacks++; stack.Elem(stacks) = node->right; stackdir.Elem(stacks) = ndir; } */ } } void ADTree3Div :: PrintRec (ostream & ost, const ADTreeNode3Div * node) const { if (node->data) { ost << node->pi << ": "; ost << node->nchilds << " childs, "; ost << " from " << node->minx << " - " << node->minx + node->dist*ADTN_DIV << " "; for (int i = 0; i < 3; i++) ost << node->data[i] << " "; ost << endl; } int i; for (i = 0; i < ADTN_DIV; i++) if (node->childs[i]) PrintRec (ost, node->childs[i]); } /* ******************************* ADTree3M ******************************* */ ADTreeNode3M :: ADTreeNode3M() { int i; for (i = 0; i < ADTN_SIZE; i++) pi[i] = 0; left = NULL; right = NULL; father = NULL; nchilds = 0; } void ADTreeNode3M :: DeleteChilds () { if (left) { left->DeleteChilds(); delete left; left = NULL; } if (right) { right->DeleteChilds(); delete right; right = NULL; } } BlockAllocator ADTreeNode3M :: ball(sizeof (ADTreeNode3M)); void * ADTreeNode3M :: operator new(size_t) { return ball.Alloc(); } void ADTreeNode3M :: operator delete (void * p) { ball.Free (p); } ADTree3M :: ADTree3M (const float * acmin, const float * acmax) : ela(0) { memcpy (cmin, acmin, 3 * sizeof(float)); memcpy (cmax, acmax, 3 * sizeof(float)); root = new ADTreeNode3M; root->sep = (cmin[0] + cmax[0]) / 2; } ADTree3M :: ~ADTree3M () { root->DeleteChilds(); delete root; } void ADTree3M :: Insert (const float * p, int pi) { ADTreeNode3M *node; ADTreeNode3M *next; int dir; int lr; int i; float bmin[3]; float bmax[3]; memcpy (bmin, cmin, 3 * sizeof(float)); memcpy (bmax, cmax, 3 * sizeof(float)); next = root; dir = 0; while (next) { node = next; for (i = 0; i < ADTN_SIZE; i++) if (!node->pi[i]) { memcpy (node->data[i], p, 3 * sizeof(float)); node->pi[i] = pi; if (ela.Size() < pi) ela.SetSize (pi); ela.Elem(pi) = node; return; } if (node->sep > p[dir]) { next = node->left; bmax[dir] = node->sep; lr = 0; } else { next = node->right; bmin[dir] = node->sep; lr = 1; } dir++; if (dir == 3) dir = 0; } next = new ADTreeNode3M; memcpy (next->data[0], p, 3 * sizeof(float)); next->pi[0] = pi; next->sep = (bmin[dir] + bmax[dir]) / 2; if (ela.Size() < pi) ela.SetSize (pi); ela.Elem(pi) = next; if (lr) node->right = next; else node->left = next; next -> father = node; while (node) { node->nchilds++; node = node->father; } } void ADTree3M :: DeleteElement (int pi) { ADTreeNode3M * node = ela.Get(pi); int i; for (i = 0; i < ADTN_SIZE; i++) if (node->pi[i] == pi) node->pi[i] = 0; node = node->father; while (node) { node->nchilds--; node = node->father; } } void ADTree3M :: GetIntersecting (const float * bmin, const float * bmax, Array & pis) const { static Array stack(1000); static Array stackdir(1000); ADTreeNode3M * node; int dir, i, stacks; stack.SetSize (1000); stackdir.SetSize(1000); pis.SetSize(0); stack.Elem(1) = root; stackdir.Elem(1) = 0; stacks = 1; while (stacks) { node = stack.Get(stacks); dir = stackdir.Get(stacks); stacks--; int * hpi = node->pi; for (i = 0; i < ADTN_SIZE; i++) if (hpi[i]) { float * datai = &node->data[i][0]; if (datai[0] >= bmin[0] && datai[0] <= bmax[0] && datai[1] >= bmin[1] && datai[1] <= bmax[1] && datai[2] >= bmin[2] && datai[2] <= bmax[2]) pis.Append (node->pi[i]); } int ndir = dir+1; if (ndir == 3) ndir = 0; if (node->left && bmin[dir] <= node->sep) { stacks++; stack.Elem(stacks) = node->left; stackdir.Elem(stacks) = ndir; } if (node->right && bmax[dir] >= node->sep) { stacks++; stack.Elem(stacks) = node->right; stackdir.Elem(stacks) = ndir; } } } void ADTree3M :: PrintRec (ostream & ost, const ADTreeNode3M * node) const { if (node->data) { // ost << node->pi << ": "; ost << node->nchilds << " childs, "; for (int i = 0; i < 3; i++) ost << node->data[i] << " "; ost << endl; } if (node->left) PrintRec (ost, node->left); if (node->right) PrintRec (ost, node->right); } /* ******************************* ADTree3F ******************************* */ ADTreeNode3F :: ADTreeNode3F() { pi = 0; father = NULL; nchilds = 0; int i; for (i = 0; i < 8; i++) childs[i] = NULL; } void ADTreeNode3F :: DeleteChilds () { int i; for (i = 0; i < 8; i++) { if (childs[i]) childs[i]->DeleteChilds(); delete childs[i]; childs[i] = NULL; } } BlockAllocator ADTreeNode3F :: ball(sizeof (ADTreeNode3F)); void * ADTreeNode3F :: operator new(size_t) { return ball.Alloc(); } void ADTreeNode3F :: operator delete (void * p) { ball.Free (p); } ADTree3F :: ADTree3F (const float * acmin, const float * acmax) : ela(0) { memcpy (cmin, acmin, 3 * sizeof(float)); memcpy (cmax, acmax, 3 * sizeof(float)); root = new ADTreeNode3F; for (int i = 0; i < 3; i++) root->sep[i] = (cmin[i] + cmax[i]) / 2; } ADTree3F :: ~ADTree3F () { root->DeleteChilds(); delete root; } void ADTree3F :: Insert (const float * p, int pi) { ADTreeNode3F *node; ADTreeNode3F *next; int lr; float bmin[3]; float bmax[3]; int i, dir; memcpy (bmin, cmin, 3 * sizeof(float)); memcpy (bmax, cmax, 3 * sizeof(float)); next = root; while (next) { node = next; if (!node->pi) { memcpy (node->data, p, 3 * sizeof(float)); node->pi = pi; if (ela.Size() < pi) ela.SetSize (pi); ela.Elem(pi) = node; return; } dir = 0; for (i = 0; i < 3; i++) { if (node->sep[i] > p[i]) { bmax[i] = node->sep[i]; } else { bmin[i] = node->sep[i]; dir += (1 << i); } } next = node->childs[dir]; /* if (node->sep > p[dir]) { next = node->left; bmax[dir] = node->sep; lr = 0; } else { next = node->right; bmin[dir] = node->sep; lr = 1; } */ } next = new ADTreeNode3F; memcpy (next->data, p, 3 * sizeof(float)); next->pi = pi; for (i = 0; i < 3; i++) next->sep[i] = (bmin[i] + bmax[i]) / 2; if (ela.Size() < pi) ela.SetSize (pi); ela.Elem(pi) = next; node->childs[dir] = next; next->father = node; while (node) { node->nchilds++; node = node->father; } } void ADTree3F :: DeleteElement (int pi) { ADTreeNode3F * node = ela.Get(pi); node->pi = 0; node = node->father; while (node) { node->nchilds--; node = node->father; } } void ADTree3F :: GetIntersecting (const float * bmin, const float * bmax, Array & pis) const { static Array stack(1000); ADTreeNode3F * node; int dir, i, stacks; stack.SetSize (1000); pis.SetSize(0); stack.Elem(1) = root; stacks = 1; while (stacks) { node = stack.Get(stacks); stacks--; if (node->pi) { if (node->data[0] >= bmin[0] && node->data[0] <= bmax[0] && node->data[1] >= bmin[1] && node->data[1] <= bmax[1] && node->data[2] >= bmin[2] && node->data[2] <= bmax[2]) pis.Append (node->pi); } int i1min = (bmin[0] <= node->sep[0]) ? 0 : 1; int i1max = (bmax[0] < node->sep[0]) ? 0 : 1; int i2min = (bmin[1] <= node->sep[1]) ? 0 : 1; int i2max = (bmax[1] < node->sep[1]) ? 0 : 1; int i3min = (bmin[2] <= node->sep[2]) ? 0 : 1; int i3max = (bmax[2] < node->sep[2]) ? 0 : 1; int i1, i2, i3; for (i1 = i1min; i1 <= i1max; i1++) for (i2 = i2min; i2 <= i2max; i2++) for (i3 = i3min; i3 <= i3max; i3++) { i = i1+2*i2+4*i3; if (node->childs[i]) { stacks++; stack.Elem(stacks) = node->childs[i]; } } /* if (node->left && bmin[dir] <= node->sep) { stacks++; stack.Elem(stacks) = node->left; stackdir.Elem(stacks) = ndir; } if (node->right && bmax[dir] >= node->sep) { stacks++; stack.Elem(stacks) = node->right; stackdir.Elem(stacks) = ndir; } */ } } void ADTree3F :: PrintRec (ostream & ost, const ADTreeNode3F * node) const { int i; if (node->data) { ost << node->pi << ": "; ost << node->nchilds << " childs, "; for (i = 0; i < 3; i++) ost << node->data[i] << " "; ost << endl; } for (i = 0; i < 8; i++) if (node->childs[i]) PrintRec (ost, node->childs[i]); } /* ******************************* ADTree3FM ******************************* */ ADTreeNode3FM :: ADTreeNode3FM() { father = NULL; nchilds = 0; int i; for (i = 0; i < ADTN_SIZE; i++) pi[i] = 0; for (i = 0; i < 8; i++) childs[i] = NULL; } void ADTreeNode3FM :: DeleteChilds () { int i; for (i = 0; i < 8; i++) { if (childs[i]) childs[i]->DeleteChilds(); delete childs[i]; childs[i] = NULL; } } BlockAllocator ADTreeNode3FM :: ball(sizeof (ADTreeNode3FM)); void * ADTreeNode3FM :: operator new(size_t) { return ball.Alloc(); } void ADTreeNode3FM :: operator delete (void * p) { ball.Free (p); } ADTree3FM :: ADTree3FM (const float * acmin, const float * acmax) : ela(0) { memcpy (cmin, acmin, 3 * sizeof(float)); memcpy (cmax, acmax, 3 * sizeof(float)); root = new ADTreeNode3FM; for (int i = 0; i < 3; i++) root->sep[i] = (cmin[i] + cmax[i]) / 2; } ADTree3FM :: ~ADTree3FM () { root->DeleteChilds(); delete root; } void ADTree3FM :: Insert (const float * p, int pi) { ADTreeNode3FM *node; ADTreeNode3FM *next; int lr; float bmin[3]; float bmax[3]; int i, dir; memcpy (bmin, cmin, 3 * sizeof(float)); memcpy (bmax, cmax, 3 * sizeof(float)); next = root; while (next) { node = next; for (i = 0; i < ADTN_SIZE; i++) if (!node->pi[i]) { memcpy (node->data[i], p, 3 * sizeof(float)); node->pi[i] = pi; if (ela.Size() < pi) ela.SetSize (pi); ela.Elem(pi) = node; return; } dir = 0; for (i = 0; i < 3; i++) { if (node->sep[i] > p[i]) { bmax[i] = node->sep[i]; } else { bmin[i] = node->sep[i]; dir += (1 << i); } } next = node->childs[dir]; /* if (node->sep > p[dir]) { next = node->left; bmax[dir] = node->sep; lr = 0; } else { next = node->right; bmin[dir] = node->sep; lr = 1; } */ } next = new ADTreeNode3FM; memcpy (next->data[0], p, 3 * sizeof(float)); next->pi[0] = pi; for (i = 0; i < 3; i++) next->sep[i] = (bmin[i] + bmax[i]) / 2; if (ela.Size() < pi) ela.SetSize (pi); ela.Elem(pi) = next; node->childs[dir] = next; next->father = node; while (node) { node->nchilds++; node = node->father; } } void ADTree3FM :: DeleteElement (int pi) { ADTreeNode3FM * node = ela.Get(pi); int i; for (i = 0; i < ADTN_SIZE; i++) if (node->pi[i] == pi) node->pi[i] = 0; node = node->father; while (node) { node->nchilds--; node = node->father; } } void ADTree3FM :: GetIntersecting (const float * bmin, const float * bmax, Array & pis) const { static Array stack(1000); ADTreeNode3FM * node; int dir, i, stacks; stack.SetSize (1000); pis.SetSize(0); stack.Elem(1) = root; stacks = 1; while (stacks) { node = stack.Get(stacks); stacks--; int * hpi = node->pi; for (i = 0; i < ADTN_SIZE; i++) if (hpi[i]) { float * datai = &node->data[i][0]; if (datai[0] >= bmin[0] && datai[0] <= bmax[0] && datai[1] >= bmin[1] && datai[1] <= bmax[1] && datai[2] >= bmin[2] && datai[2] <= bmax[2]) pis.Append (node->pi[i]); } /* if (node->pi) { if (node->data[0] >= bmin[0] && node->data[0] <= bmax[0] && node->data[1] >= bmin[1] && node->data[1] <= bmax[1] && node->data[2] >= bmin[2] && node->data[2] <= bmax[2]) pis.Append (node->pi); } */ int i1min = (bmin[0] <= node->sep[0]) ? 0 : 1; int i1max = (bmax[0] < node->sep[0]) ? 0 : 1; int i2min = (bmin[1] <= node->sep[1]) ? 0 : 1; int i2max = (bmax[1] < node->sep[1]) ? 0 : 1; int i3min = (bmin[2] <= node->sep[2]) ? 0 : 1; int i3max = (bmax[2] < node->sep[2]) ? 0 : 1; int i1, i2, i3; for (i1 = i1min; i1 <= i1max; i1++) for (i2 = i2min; i2 <= i2max; i2++) for (i3 = i3min; i3 <= i3max; i3++) { i = i1+2*i2+4*i3; if (node->childs[i]) { stacks++; stack.Elem(stacks) = node->childs[i]; } } /* if (node->left && bmin[dir] <= node->sep) { stacks++; stack.Elem(stacks) = node->left; stackdir.Elem(stacks) = ndir; } if (node->right && bmax[dir] >= node->sep) { stacks++; stack.Elem(stacks) = node->right; stackdir.Elem(stacks) = ndir; } */ } } void ADTree3FM :: PrintRec (ostream & ost, const ADTreeNode3FM * node) const { int i; if (node->data) { ost << node->pi << ": "; ost << node->nchilds << " childs, "; for (i = 0; i < 3; i++) ost << node->data[i] << " "; ost << endl; } for (i = 0; i < 8; i++) if (node->childs[i]) PrintRec (ost, node->childs[i]); } #endif /* ******************************* ADTree6 ******************************* */ ADTreeNode6 :: ADTreeNode6() { pi = -1; left = NULL; right = NULL; father = NULL; nchilds = 0; } void ADTreeNode6 :: DeleteChilds () { if (left) { left->DeleteChilds(); delete left; left = NULL; } if (right) { right->DeleteChilds(); delete right; right = NULL; } } BlockAllocator ADTreeNode6 :: ball (sizeof (ADTreeNode6)); void * ADTreeNode6 :: operator new(size_t s) { return ball.Alloc(); } void ADTreeNode6 :: operator delete (void * p) { ball.Free (p); } ADTree6 :: ADTree6 (const float * acmin, const float * acmax) : ela(0) { memcpy (cmin, acmin, 6 * sizeof(float)); memcpy (cmax, acmax, 6 * sizeof(float)); root = new ADTreeNode6; root->sep = (cmin[0] + cmax[0]) / 2; } ADTree6 :: ~ADTree6 () { root->DeleteChilds(); delete root; } void ADTree6 :: Insert (const float * p, int pi) { ADTreeNode6 *node(NULL); ADTreeNode6 *next; int dir; int lr(0); float bmin[6]; float bmax[6]; memcpy (bmin, cmin, 6 * sizeof(float)); memcpy (bmax, cmax, 6 * sizeof(float)); next = root; dir = 0; while (next) { node = next; if (node->pi == -1) { memcpy (node->data, p, 6 * sizeof(float)); node->pi = pi; if (ela.Size() < pi+1) ela.SetSize (pi+1); ela[pi] = node; return; } if (node->sep > p[dir]) { next = node->left; bmax[dir] = node->sep; lr = 0; } else { next = node->right; bmin[dir] = node->sep; lr = 1; } dir++; if (dir == 6) dir = 0; } next = new ADTreeNode6; memcpy (next->data, p, 6 * sizeof(float)); next->pi = pi; next->sep = (bmin[dir] + bmax[dir]) / 2; if (ela.Size() < pi+1) ela.SetSize (pi+1); ela[pi] = next; if (lr) node->right = next; else node->left = next; next -> father = node; while (node) { node->nchilds++; node = node->father; } } void ADTree6 :: DeleteElement (int pi) { ADTreeNode6 * node = ela[pi]; node->pi = -1; node = node->father; while (node) { node->nchilds--; node = node->father; } } void ADTree6 :: PrintMemInfo (ostream & ost) const { ost << Elements() << " elements a " << sizeof(ADTreeNode6) << " Bytes = " << Elements() * sizeof(ADTreeNode6) << endl; ost << "maxind = " << ela.Size() << " = " << sizeof(ADTreeNode6*) * ela.Size() << " Bytes" << endl; } class inttn6 { public: int dir; ADTreeNode6 * node; }; void ADTree6 :: GetIntersecting (const float * bmin, const float * bmax, Array & pis) const { // static Array stack(10000); // stack.SetSize (10000); ArrayMem stack(10000); pis.SetSize(0); stack[0].node = root; stack[0].dir = 0; int stacks = 0; while (stacks >= 0) { ADTreeNode6 * node = stack[stacks].node; int dir = stack[stacks].dir; stacks--; if (node->pi != -1) { if (node->data[0] > bmax[0] || node->data[1] > bmax[1] || node->data[2] > bmax[2] || node->data[3] < bmin[3] || node->data[4] < bmin[4] || node->data[5] < bmin[5]) ; else { pis.Append (node->pi); } } int ndir = (dir+1) % 6; if (node->left && bmin[dir] <= node->sep) { stacks++; stack[stacks].node = node->left; stack[stacks].dir = ndir; } if (node->right && bmax[dir] >= node->sep) { stacks++; stack[stacks].node = node->right; stack[stacks].dir = ndir; } } } void ADTree6 :: PrintRec (ostream & ost, const ADTreeNode6 * node) const { // if (node->data) // true anyway { ost << node->pi << ": "; ost << node->nchilds << " childs, "; for (int i = 0; i < 6; i++) ost << node->data[i] << " "; ost << endl; } if (node->left) PrintRec (ost, node->left); if (node->right) PrintRec (ost, node->right); } int ADTree6 :: DepthRec (const ADTreeNode6 * node) const { int ldepth = 0; int rdepth = 0; if (node->left) ldepth = DepthRec(node->left); if (node->right) rdepth = DepthRec(node->right); return 1 + max2 (ldepth, rdepth); } int ADTree6 :: ElementsRec (const ADTreeNode6 * node) const { int els = 1; if (node->left) els += ElementsRec(node->left); if (node->right) els += ElementsRec(node->right); return els; } template T_ADTree :: T_ADTree (Point acmin, Point acmax) // : ela(0) { cmin = acmin; cmax = acmax; root = new T_ADTreeNode; root->sep = (cmin[0] + cmax[0]) / 2; } template T_ADTree :: ~T_ADTree () { root->DeleteChilds(); delete root; } template void T_ADTree :: Insert (Point p, T pi) { T_ADTreeNode *node(NULL); T_ADTreeNode *next; int dir; int lr(0); Point bmin = cmin; Point bmax = cmax; next = root; dir = 0; while (next) { node = next; if (IsInvalid(node->pi)) { // memcpy (node->data, p, dim * sizeof(float)); node->data = p; node->pi = pi; // if (ela.Size() < pi+1) // ela.SetSize (pi+1); ela[pi] = node; return; } if (node->sep > p[dir]) { next = node->left; bmax(dir) = node->sep; lr = 0; } else { next = node->right; bmin(dir) = node->sep; lr = 1; } dir++; if (dir == dim) dir = 0; } next = new T_ADTreeNode; // memcpy (next->data, p, dim * sizeof(float)); next->data = p; next->pi = pi; next->sep = (bmin[dir] + bmax[dir]) / 2; // if (ela.Size() < pi+1) // ela.SetSize (pi+1); ela[pi] = next; if (lr) node->right = next; else node->left = next; next -> father = node; while (node) { node->nchilds++; node = node->father; } } template void T_ADTree :: DeleteElement (T pi) { T_ADTreeNode * node = ela[pi]; ela.Delete(pi); SetInvalid(node->pi); // = -1; node = node->father; while (node) { node->nchilds--; node = node->father; } } template void T_ADTree :: PrintMemInfo (ostream & ost) const { ost << Elements() << " elements a " << sizeof(ADTreeNode6) << " Bytes = " << Elements() * sizeof(T_ADTreeNode) << endl; ost << "maxind = " << ela.Size() << " = " << sizeof(T_ADTreeNode*) * ela.Size() << " Bytes" << endl; } template class inttn { public: int dir; T_ADTreeNode * node; }; template void T_ADTree :: GetIntersecting (Point bmin, Point bmax, Array & pis) const { // static Array stack(10000); // stack.SetSize (10000); ArrayMem,10000> stack(10000); pis.SetSize(0); stack[0].node = root; stack[0].dir = 0; int stacks = 0; while (stacks >= 0) { T_ADTreeNode * node = stack[stacks].node; int dir = stack[stacks].dir; stacks--; if (!IsInvalid(node->pi)) // != -1) { bool found = true; for (int i = 0; i < dim/2; i++) if (node->data[i] > bmax[i]) found = false; for (int i = dim/2; i < dim; i++) if (node->data[i] < bmin[i]) found = false; if (found) pis.Append (node->pi); /* if (node->data[0] > bmax[0] || node->data[1] > bmax[1] || node->data[2] > bmax[2] || node->data[3] < bmin[3] || node->data[4] < bmin[4] || node->data[5] < bmin[5]) ; else { pis.Append (node->pi); } */ } int ndir = (dir+1) % dim; if (node->left && bmin[dir] <= node->sep) { stacks++; stack[stacks].node = node->left; stack[stacks].dir = ndir; } if (node->right && bmax[dir] >= node->sep) { stacks++; stack[stacks].node = node->right; stack[stacks].dir = ndir; } } } template void T_ADTree :: PrintRec (ostream & ost, const T_ADTreeNode * node) const { // if (node->data) // true anyway { ost << node->pi << ": "; ost << node->nchilds << " childs, "; for (int i = 0; i < dim; i++) ost << node->data[i] << " "; ost << endl; } if (node->left) PrintRec (ost, node->left); if (node->right) PrintRec (ost, node->right); } template int T_ADTree :: DepthRec (const T_ADTreeNode * node) const { int ldepth = 0; int rdepth = 0; if (node->left) ldepth = DepthRec(node->left); if (node->right) rdepth = DepthRec(node->right); return 1 + max2 (ldepth, rdepth); } template int T_ADTree :: ElementsRec (const T_ADTreeNode * node) const { int els = 1; if (node->left) els += ElementsRec(node->left); if (node->right) els += ElementsRec(node->right); return els; } #ifdef ABC /* ******************************* ADTree6F ******************************* */ ADTreeNode6F :: ADTreeNode6F() { pi = 0; father = NULL; nchilds = 0; int i; for (i = 0; i < 64; i++) childs[i] = NULL; } void ADTreeNode6F :: DeleteChilds () { int i; for (i = 0; i < 64; i++) { if (childs[i]) childs[i]->DeleteChilds(); delete childs[i]; childs[i] = NULL; } } BlockAllocator ADTreeNode6F :: ball(sizeof (ADTreeNode6F)); void * ADTreeNode6F :: operator new(size_t) { return ball.Alloc(); } void ADTreeNode6F :: operator delete (void * p) { ball.Free (p); } ADTree6F :: ADTree6F (const float * acmin, const float * acmax) : ela(0) { memcpy (cmin, acmin, 6 * sizeof(float)); memcpy (cmax, acmax, 6 * sizeof(float)); root = new ADTreeNode6F; for (int i = 0; i < 6; i++) root->sep[i] = (cmin[i] + cmax[i]) / 2; } ADTree6F :: ~ADTree6F () { root->DeleteChilds(); delete root; } void ADTree6F :: Insert (const float * p, int pi) { ADTreeNode6F *node; ADTreeNode6F *next; int lr; float bmin[6]; float bmax[6]; int i, dir; memcpy (bmin, cmin, 6 * sizeof(float)); memcpy (bmax, cmax, 6 * sizeof(float)); next = root; while (next) { node = next; if (!node->pi) { memcpy (node->data, p, 6 * sizeof(float)); node->pi = pi; if (ela.Size() < pi) ela.SetSize (pi); ela.Elem(pi) = node; return; } dir = 0; for (i = 0; i < 6; i++) { if (node->sep[i] > p[i]) { bmax[i] = node->sep[i]; } else { bmin[i] = node->sep[i]; dir += (1 << i); } } next = node->childs[dir]; /* if (node->sep > p[dir]) { next = node->left; bmax[dir] = node->sep; lr = 0; } else { next = node->right; bmin[dir] = node->sep; lr = 1; } */ } next = new ADTreeNode6F; memcpy (next->data, p, 6 * sizeof(float)); next->pi = pi; for (i = 0; i < 6; i++) next->sep[i] = (bmin[i] + bmax[i]) / 2; if (ela.Size() < pi) ela.SetSize (pi); ela.Elem(pi) = next; node->childs[dir] = next; next->father = node; while (node) { node->nchilds++; node = node->father; } } void ADTree6F :: DeleteElement (int pi) { ADTreeNode6F * node = ela.Get(pi); node->pi = 0; node = node->father; while (node) { node->nchilds--; node = node->father; } } void ADTree6F :: GetIntersecting (const float * bmin, const float * bmax, Array & pis) const { static Array stack(1000); ADTreeNode6F * node; int dir, i, stacks; stack.SetSize (1000); pis.SetSize(0); stack.Elem(1) = root; stacks = 1; while (stacks) { node = stack.Get(stacks); stacks--; if (node->pi) { if ( node->data[0] >= bmin[0] && node->data[0] <= bmax[0] && node->data[1] >= bmin[1] && node->data[1] <= bmax[1] && node->data[2] >= bmin[2] && node->data[2] <= bmax[2] && node->data[3] >= bmin[3] && node->data[3] <= bmax[3] && node->data[4] >= bmin[4] && node->data[4] <= bmax[4] && node->data[5] >= bmin[5] && node->data[5] <= bmax[5] ) pis.Append (node->pi); } int i1min = (bmin[0] <= node->sep[0]) ? 0 : 1; int i1max = (bmax[0] < node->sep[0]) ? 0 : 1; int i2min = (bmin[1] <= node->sep[1]) ? 0 : 1; int i2max = (bmax[1] < node->sep[1]) ? 0 : 1; int i3min = (bmin[2] <= node->sep[2]) ? 0 : 1; int i3max = (bmax[2] < node->sep[2]) ? 0 : 1; int i4min = (bmin[3] <= node->sep[3]) ? 0 : 1; int i4max = (bmax[3] < node->sep[3]) ? 0 : 1; int i5min = (bmin[4] <= node->sep[4]) ? 0 : 1; int i5max = (bmax[4] < node->sep[4]) ? 0 : 1; int i6min = (bmin[5] <= node->sep[5]) ? 0 : 1; int i6max = (bmax[5] < node->sep[5]) ? 0 : 1; int i1, i2, i3, i4, i5, i6; for (i1 = i1min; i1 <= i1max; i1++) for (i2 = i2min; i2 <= i2max; i2++) for (i3 = i3min; i3 <= i3max; i3++) for (i4 = i4min; i4 <= i4max; i4++) for (i5 = i5min; i5 <= i5max; i5++) for (i6 = i6min; i6 <= i6max; i6++) { i = i1 + 2*i2 + 4*i3 + 8*i4 + 16*i5 +32*i6; if (node->childs[i]) { stacks++; stack.Elem(stacks) = node->childs[i]; } } /* if (node->left && bmin[dir] <= node->sep) { stacks++; stack.Elem(stacks) = node->left; stackdir.Elem(stacks) = ndir; } if (node->right && bmax[dir] >= node->sep) { stacks++; stack.Elem(stacks) = node->right; stackdir.Elem(stacks) = ndir; } */ } } void ADTree6F :: PrintRec (ostream & ost, const ADTreeNode6F * node) const { int i; if (node->data) { ost << node->pi << ": "; ost << node->nchilds << " childs, "; for (i = 0; i < 6; i++) ost << node->data[i] << " "; ost << endl; } for (i = 0; i < 64; i++) if (node->childs[i]) PrintRec (ost, node->childs[i]); } #endif /* ************************************* Point3dTree ********************** */ Point3dTree :: Point3dTree (const Point<3> & pmin, const Point<3> & pmax) { float pmi[3], pma[3]; for (int i = 0; i < 3; i++) { pmi[i] = pmin(i); pma[i] = pmax(i); } tree = new ADTree3 (pmi, pma); } Point3dTree :: ~Point3dTree () { delete tree; } void Point3dTree :: Insert (const Point<3> & p, int pi) { float pd[3]; pd[0] = p(0); pd[1] = p(1); pd[2] = p(2); tree->Insert (pd, pi); } void Point3dTree :: GetIntersecting (const Point<3> & pmin, const Point<3> & pmax, Array & pis) const { float pmi[3], pma[3]; for (int i = 0; i < 3; i++) { pmi[i] = pmin(i); pma[i] = pmax(i); } tree->GetIntersecting (pmi, pma, pis); } template BoxTree :: BoxTree (const Box & abox) { boxpmin = abox.PMin(); boxpmax = abox.PMax(); Point<2*dim> tpmin, tpmax; for (int i = 0; i < dim; i++) { tpmin(i) = tpmin(i+dim) = boxpmin(i); tpmax(i) = tpmax(i+dim) = boxpmax(i); } tree = new T_ADTree<2*dim,T> (tpmin, tpmax); } template BoxTree :: BoxTree (const Point & apmin, const Point & apmax) { boxpmin = apmin; boxpmax = apmax; Point<2*dim> tpmin, tpmax; for (int i = 0; i < dim; i++) { tpmin(i) = tpmin(i+dim) = boxpmin(i); tpmax(i) = tpmax(i+dim) = boxpmax(i); } tree = new T_ADTree<2*dim,T> (tpmin, tpmax); } template BoxTree :: ~BoxTree () { delete tree; } template void BoxTree :: Insert (const Point & bmin, const Point & bmax, T pi) { Point<2*dim> tp; for (size_t i = 0; i < dim; i++) { tp(i) = bmin(i); tp(i+dim) = bmax(i); } tree->Insert (tp, pi); } template void BoxTree ::GetIntersecting (const Point & pmin, const Point & pmax, Array & pis) const { Point<2*dim> tpmin, tpmax; for (size_t i = 0; i < dim; i++) { tpmin(i) = boxpmin(i); tpmax(i) = pmax(i); tpmin(i+dim) = pmin(i); tpmax(i+dim) = boxpmax(i); } tree->GetIntersecting (tpmin, tpmax, pis); } template<> BlockAllocator T_ADTreeNode<4,INDEX> :: ball(sizeof (T_ADTreeNode<4,INDEX>)); template class T_ADTree<4,INDEX>; template class BoxTree<2,INDEX>; template<> BlockAllocator T_ADTreeNode<4,INDEX_2> :: ball(sizeof (T_ADTreeNode<4,INDEX_2>)); template class T_ADTree<4,INDEX_2>; template class BoxTree<2,INDEX_2>; template<> BlockAllocator T_ADTreeNode<6,INDEX> :: ball(sizeof (T_ADTreeNode<6,INDEX>)); template class T_ADTree<6,INDEX>; template class BoxTree<3,INDEX>; } netgen-6.2.1804/libsrc/gprim/gprim.hpp0000644000175000017500000000134213272137567016230 0ustar kurtkurt#ifndef FILE_GPRIM #define FILE_GPRIM /* *************************************************************************/ /* File: gprim.hpp */ /* Author: Joachim Schoeberl */ /* Date: 14. Aug. 97 */ /* *************************************************************************/ #include #include #include "geomobjects.hpp" #include "geomops.hpp" #include "geomfuncs.hpp" #include "geom2d.hpp" #include "geom3d.hpp" #include "geomtest3d.hpp" #include "transform3d.hpp" #include "adtree.hpp" #include "spline.hpp" #include "splinegeometry.hpp" #endif netgen-6.2.1804/libsrc/gprim/CMakeLists.txt0000644000175000017500000000103313272137567017136 0ustar kurtkurtadd_definitions(-DNGINTERFACE_EXPORTS) add_library(gprim OBJECT adtree.cpp geom2d.cpp geom3d.cpp geomfuncs.cpp geomtest3d.cpp transform3d.cpp spline.cpp splinegeometry.cpp ) set_target_properties( gprim PROPERTIES POSITION_INDEPENDENT_CODE ON ) install(FILES adtree.hpp geom2d.hpp geom3d.hpp geomfuncs.hpp geomobjects2.hpp geomobjects.hpp geomops2.hpp geomops.hpp geomtest3d.hpp gprim.hpp splinegeometry.hpp spline.hpp transform3d.hpp DESTINATION ${NG_INSTALL_DIR_INCLUDE}/gprim COMPONENT netgen_devel ) netgen-6.2.1804/libsrc/gprim/geom2d.hpp0000644000175000017500000005222713272137567016277 0ustar kurtkurt#ifndef FILE_GEOM2D #define FILE_GEOM2D /* *************************************************************************/ /* File: geom2d.hh */ /* Author: Joachim Schoeberl */ /* Date: 5. Aug. 95 */ /* *************************************************************************/ namespace netgen { /* Geometric Algorithms */ #define EPSGEOM 1E-5 // extern void MyError (const char * ch); class Point2d; class Vec2d; class LINE2D; class Line2d; class PLine2d; class TRIANGLE2D; class PTRIANGLE2D; inline Vec2d operator- (const Point2d & p1, const Point2d & p2); inline Point2d operator- (const Point2d & p1, const Vec2d & v); inline Point2d operator+ (const Point2d & p1, const Vec2d & v); inline Point2d Center (const Point2d & p1, const Point2d & p2); inline void PpSmV (const Point2d & p1, double s, const Vec2d & v, Point2d & p2); inline void PmP (const Point2d & p1, const Point2d & p2, Vec2d & v); ostream & operator<<(ostream & s, const Point2d & p); inline Vec2d operator- (const Point2d & p1, const Point2d & p2); inline Point2d operator- (const Point2d & p1, const Vec2d & v); inline Point2d operator+ (const Point2d & p1, const Vec2d & v); inline Vec2d operator- (const Vec2d & p1, const Vec2d & v); inline Vec2d operator+ (const Vec2d & p1, const Vec2d & v); inline Vec2d operator* (double scal, const Vec2d & v); DLL_HEADER double Angle (const Vec2d & v); DLL_HEADER double FastAngle (const Vec2d & v); DLL_HEADER double Angle (const Vec2d & v1, const Vec2d & v2); DLL_HEADER double FastAngle (const Vec2d & v1, const Vec2d & v2); ostream & operator<<(ostream & s, const Vec2d & v); double Dist2(const Line2d & g, const Line2d & h ); // GH int Near (const Point2d & p1, const Point2d & p2, const double eps); int Parallel (const Line2d & l1, const Line2d & l2, double peps = EPSGEOM); int IsOnLine (const Line2d & l, const Point2d & p, double heps = EPSGEOM); int IsOnLongLine (const Line2d & l, const Point2d & p); int Hit (const Line2d & l1, const Line2d & l2, double heps = EPSGEOM); ostream & operator<<(ostream & s, const Line2d & l); DLL_HEADER Point2d CrossPoint (const PLine2d & l1, const PLine2d & l2); DLL_HEADER Point2d CrossPoint (const Line2d & l1, const Line2d & l2); int Parallel (const PLine2d & l1, const PLine2d & l2, double peps = EPSGEOM); int IsOnLine (const PLine2d & l, const Point2d & p, double heps = EPSGEOM); int IsOnLongLine (const PLine2d & l, const Point2d & p); int Hit (const PLine2d & l1, const Line2d & l2, double heps = EPSGEOM); ostream & operator<<(ostream & s, const Line2d & l); ostream & operator<<(ostream & s, const TRIANGLE2D & t); ostream & operator<<(ostream & s, const PTRIANGLE2D & t); double Dist2 (const Point2d & p1, const Point2d & p2); /// class Point2d { /// friend class Vec2d; protected: /// double px, py; public: /// Point2d() { /* px = py = 0; */ } /// Point2d(double ax, double ay) { px = ax; py = ay; } /// Point2d(const Point2d & p2) { px = p2.px; py = p2.py; } Point2d (const Point<2> & p2) { px = p2(0); py = p2(1); } /// Point2d & operator= (const Point2d & p2) { px = p2.px; py = p2.py; return *this; } /// int operator== (const Point2d & p2) const // GH { return (px == p2.px && py == p2.py) ; } /// double & X() { return px; } /// double & Y() { return py; } /// double X() const { return px; } /// double Y() const { return py; } operator Point<2> () const { return Point<2> (px, py); } /// friend inline Vec2d operator- (const Point2d & p1, const Point2d & p2); /// friend inline Point2d operator- (const Point2d & p1, const Vec2d & v); /// friend inline Point2d operator+ (const Point2d & p1, const Vec2d & v); /// friend inline Point2d Center (const Point2d & p1, const Point2d & p2); const Point2d & SetToMin (const Point2d & p2) { if (p2.px < px) px = p2.px; if (p2.py < py) py = p2.py; return *this; } /// const Point2d & SetToMax (const Point2d & p2) { if (p2.px > px) px = p2.px; if (p2.py > py) py = p2.py; return *this; } /// friend double Dist (const Point2d & p1, const Point2d & p2) { return sqrt ( (p1.px - p2.px) * (p1.px - p2.px) + (p1.py - p2.py) * (p1.py - p2.py) ); } // { return sqrt ( sqr (p1.X()-p2.X()) + sqr (p1.Y()-p2.Y()) ); } /// friend double Dist2 (const Point2d & p1, const Point2d & p2) { return ( (p1.px - p2.px) * (p1.px - p2.px) + (p1.py - p2.py) * (p1.py - p2.py) ); } // { return sqr (p1.X()-p2.X()) + sqr (p1.Y()-p2.Y()) ; } /** Points clock-wise ? Are the points (p1, p2, p3) clock-wise ? */ friend inline int CW (const Point2d & p1, const Point2d & p2, const Point2d & p3) { // return Cross (p2 - p1, p3 - p2) < 0; return (p2.px - p1.px) * (p3.py - p2.py) - (p2.py - p1.py) * (p3.px - p2.px) < 0; } /** Points counter-clock-wise ? Are the points (p1, p2, p3) counter-clock-wise ? */ friend inline bool CCW (const Point2d & p1, const Point2d & p2, const Point2d & p3) { // return Cross (p2 - p1, p3 - p2) > 0; return (p2.px - p1.px) * (p3.py - p2.py) - (p2.py - p1.py) * (p3.px - p2.px) > 0; } /** Points counter-clock-wise ? Are the points (p1, p2, p3) counter-clock-wise ? */ friend inline bool CCW (const Point2d & p1, const Point2d & p2, const Point2d & p3, double eps) { // return Cross (p2 - p1, p3 - p2) > 0; double ax = p2.px - p1.px; double ay = p2.py - p1.py; double bx = p3.px - p2.px; double by = p3.py - p2.py; return ax*by - ay*bx > eps*eps*max2(ax*ax+ay*ay,bx*bx+by*by); } /// friend inline void PpSmV (const Point2d & p1, double s, const Vec2d & v, Point2d & p2); /// friend inline void PmP (const Point2d & p1, const Point2d & p2, Vec2d & v); /// friend ostream & operator<<(ostream & s, const Point2d & p); }; inline int Near (const Point2d & p1, const Point2d & p2, const double eps = 1e-4 ) { return Dist2(p1,p2) <= eps*eps; } /// class Vec2d { protected: /// double vx, vy; public: /// Vec2d() { /* vx = vy = 0; */ } /// Vec2d(double ax, double ay) { vx = ax; vy = ay; } /// Vec2d(const Vec2d & v2) { vx = v2.vx; vy = v2.vy; } /// explicit Vec2d(const Vec<2> & v2) { vx = v2(0); vy = v2(1); } /// Vec2d(const Point2d & p1, const Point2d & p2) { vx = p2.px - p1.px; vy = p2.py - p1.py; } /// Vec2d & operator= (const Vec2d & p2) { vx = p2.vx; vy = p2.vy; return *this; } /// double & X() { return vx; } /// double & Y() { return vy; } /// double X() const { return vx; } /// double Y() const { return vy; } /// double Length() const { return sqrt (vx * vx + vy * vy); } /// double Length2() const { return vx * vx + vy * vy; } void GetNormal (Vec2d & n) const { n.vx=-vy; n.vy=vx; } // GH /// inline Vec2d & operator+= (const Vec2d & v2); /// inline Vec2d & operator-= (const Vec2d & v2); /// inline Vec2d & operator*= (double s); /// inline Vec2d & operator/= (double s); /// friend inline Vec2d operator- (const Point2d & p1, const Point2d & p2); /// friend inline Point2d operator- (const Point2d & p1, const Vec2d & v); /// friend inline Point2d operator+ (const Point2d & p1, const Vec2d & v); /// friend inline Vec2d operator- (const Vec2d & p1, const Vec2d & v); /// friend inline Vec2d operator+ (const Vec2d & p1, const Vec2d & v); /// friend inline Vec2d operator* (double scal, const Vec2d & v); /// friend double operator* (const Vec2d & v1, const Vec2d & v2) { return v1.X() * v2.X() + v1.Y() * v2.Y(); } /// friend double Cross (const Vec2d & v1, const Vec2d & v2) { return double(v1.X()) * double(v2.Y()) - double(v1.Y()) * double(v2.X()); } /// friend inline void PpSmV (const Point2d & p1, double s, const Vec2d & v, Point2d & p2); /// friend inline void PmP (const Point2d & p1, const Point2d & p2, Vec2d & v); /// Angle in [0,2*PI) /// friend DLL_HEADER double Angle (const Vec2d & v); /// friend DLL_HEADER double FastAngle (const Vec2d & v); /// friend DLL_HEADER double Angle (const Vec2d & v1, const Vec2d & v2); /// friend DLL_HEADER double FastAngle (const Vec2d & v1, const Vec2d & v2); /// friend ostream & operator<<(ostream & s, const Vec2d & v); }; /// class Line2d { protected: /// Point2d p1, p2; public: /// Line2d() : p1(), p2() { }; /// Line2d(const Point2d & ap1, const Point2d & ap2) { p1 = ap1; p2 = ap2; } /// Line2d & operator= (const Line2d & l2) { p1 = l2.p1; p2 = l2.p2; return *this;} /// Point2d & P1() { return p1; } /// Point2d & P2() { return p2; } /// const Point2d & P1() const { return p1; } /// const Point2d & P2() const { return p2; } /// double XMax() const { return max2 (p1.X(), p2.X()); } /// double YMax() const { return max2 (p1.Y(), p2.Y()); } /// double XMin() const { return min2 (p1.X(), p2.X()); } /// double YMin() const { return min2 (p1.Y(), p2.Y()); } /// Vec2d Delta () const { return Vec2d (p2.X()-p1.X(), p2.Y()-p1.Y()); } /// double Length () const { return Delta().Length(); } /// double Length2 () const { return sqr (p1.X() - p2.X()) + sqr (p1.Y() - p2.Y()); } void GetNormal (Line2d & n) const; // GH Vec2d NormalDelta () const; // GH /// square of the distance between two 2d-lines. friend double Dist2(const Line2d & g, const Line2d & h ); // GH /// friend DLL_HEADER Point2d CrossPoint (const Line2d & l1, const Line2d & l2); /// returns 1 iff parallel friend int CrossPointBarycentric (const Line2d & l1, const Line2d & l2, double & lam1, double & lam2); /// friend int Parallel (const Line2d & l1, const Line2d & l2, double peps); /// friend int IsOnLine (const Line2d & l, const Point2d & p, double heps); /// friend int IsOnLongLine (const Line2d & l, const Point2d & p); /// friend int Hit (const Line2d & l1, const Line2d & l2, double heps); /// friend ostream & operator<<(ostream & s, const Line2d & l); }; #ifdef NONE /// class PLine2d { protected: /// Point2d const * p1, *p2; public: /// PLine2d() { }; /// PLine2d(Point2d const * ap1, Point2d const * ap2) { p1 = ap1; p2 = ap2; } /// PLine2d & operator= (const PLine2d & l2) { p1 = l2.p1; p2 = l2.p2; return *this;} /// const Point2d *& P1() { return p1; } /// const Point2d *& P2() { return p2; } /// const Point2d & P1() const { return *p1; } /// const Point2d & P2() const { return *p2; } /// double XMax() const { return max2 (p1->X(), p2->X()); } /// double YMax() const { return max2 (p1->Y(), p2->Y()); } /// double XMin() const { return min2 (p1->X(), p2->X()); } /// double YMin() const { return min2 (p1->Y(), p2->Y()); } /// Vec2d Delta () const { return Vec2d (p2->X()-p1->X(), p2->Y()-p1->Y()); } /// double Length () const { return Delta().Length(); } /// double Length2 () const { return sqr (p1->X() - p2->X()) + sqr (p1->Y() - p2->Y()); } /// friend Point2d CrossPoint (const PLine2d & l1, const PLine2d & l2); /// friend int Parallel (const PLine2d & l1, const PLine2d & l2, double peps); /// friend int IsOnLine (const PLine2d & l, const Point2d & p, double heps); /// friend int IsOnLongLine (const PLine2d & l, const Point2d & p); /// friend int Hit (const PLine2d & l1, const Line2d & l2, double heps); /// friend ostream & operator<<(ostream & s, const Line2d & l); }; /// class ILINE { /// INDEX i[2]; public: /// ILINE() {}; /// ILINE(INDEX i1, INDEX i2) { i[0] = i1; i[1] = i2; } /// ILINE(const ILINE & l) { i[0] = l.i[0]; i[1] = l.i[1]; } /// ILINE & operator= (const ILINE & l) { i[0] = l.i[0]; i[1] = l.i[1]; return *this; } /// const INDEX & I(int ai) const { return i[ai-1]; } /// const INDEX & X() const { return i[0]; } /// const INDEX & Y() const { return i[1]; } /// const INDEX & I1() const { return i[0]; } /// const INDEX & I2() const { return i[1]; } /// INDEX & I(int ai) { return i[ai-1]; } /// INDEX & X() { return i[0]; } /// INDEX & Y() { return i[1]; } /// INDEX & I1() { return i[0]; } /// INDEX & I2() { return i[1]; } }; /// class TRIANGLE2D { private: /// Point2d p1, p2, p3; public: /// TRIANGLE2D() { }; /// TRIANGLE2D (const Point2d & ap1, const Point2d & ap2, const Point2d & ap3) { p1 = ap1; p2 = ap2; p3 = ap3;} /// TRIANGLE2D & operator= (const TRIANGLE2D & t2) { p1 = t2.p1; p2 = t2.p2; p3 = t2.p3; return *this; } /// Point2d & P1() { return p1; } /// Point2d & P2() { return p2; } /// Point2d & P3() { return p3; } /// const Point2d & P1() const { return p1; } /// const Point2d & P2() const { return p2; } /// const Point2d & P3() const { return p3; } /// double XMax() const { return max3 (p1.X(), p2.X(), p3.X()); } /// double YMax() const { return max3 (p1.Y(), p2.Y(), p3.Y()); } /// double XMin() const { return min3 (p1.X(), p2.X(), p3.X()); } /// double YMin() const { return min3 (p1.Y(), p2.Y(), p3.Y()); } /// inline Point2d Center () const { return Point2d( (p1.X()+p2.X()+p3.X())/3, (p1.Y()+p2.Y()+p3.Y())/3); } /// int Regular() const; /// int CW () const; /// int CCW () const; /// int IsOn (const Point2d & p) const; /// int IsIn (const Point2d & p) const; /// friend ostream & operator<<(ostream & s, const TRIANGLE2D & t); }; /// class PTRIANGLE2D { private: /// Point2d const *p1, *p2, *p3; public: /// PTRIANGLE2D() { }; /// PTRIANGLE2D (const Point2d * ap1, const Point2d * ap2, const Point2d * ap3) { p1 = ap1; p2 = ap2; p3 = ap3;} /// PTRIANGLE2D & operator= (const PTRIANGLE2D & t2) { p1 = t2.p1; p2 = t2.p2; p3 = t2.p3; return *this; } /// const Point2d *& P1() { return p1; } /// const Point2d *& P2() { return p2; } /// const Point2d *& P3() { return p3; } /// const Point2d * P1() const { return p1; } /// const Point2d * P2() const { return p2; } /// const Point2d * P3() const { return p3; } /// double XMax() const { return max3 (p1->X(), p2->X(), p3->X()); } /// double YMax() const { return max3 (p1->Y(), p2->Y(), p3->Y()); } /// double XMin() const { return min3 (p1->X(), p2->X(), p3->X()); } /// double YMin() const { return min3 (p1->Y(), p2->Y(), p3->Y()); } /// Point2d Center () const { return Point2d( (p1->X()+p2->X()+p3->X())/3, (p1->Y()+p2->Y()+p3->Y())/3); } /// int Regular() const; /// int CW () const; /// int CCW () const; /// int IsOn (const Point2d & p) const; /// int IsIn (const Point2d & p) const; /// friend ostream & operator<<(ostream & s, const PTRIANGLE2D & t); }; #endif class Polygon2d { protected: Array points; public: Polygon2d (); ~Polygon2d (); void AddPoint (const Point2d & p); int GetNP() const { return points.Size(); } void GetPoint (int i, Point2d & p) const { p = points.Get(i); } void GetLine (int i, Point2d & p1, Point2d & p2) const { p1 = points.Get(i); p2 = points.Get(i%points.Size()+1); } double Area () const { return fabs (HArea()); } int CW () const { return HArea() > 0; } int CCW () const { return HArea() < 0; } int IsOn (const Point2d & p) const; int IsIn (const Point2d & p) const; int IsConvex () const; int IsStarPoint (const Point2d & p) const; Point2d Center() const; Point2d EqualAreaPoint () const; private: double HArea () const; }; /** Cheap approximation to atan2. A monotone function of atan2(x,y) is computed. */ extern double Fastatan2 (double x, double y); inline Vec2d & Vec2d :: operator+= (const Vec2d & v2) { vx += v2.vx; vy += v2.vy; return *this; } inline Vec2d & Vec2d :: operator-= (const Vec2d & v2) { vx -= v2.vx; vy -= v2.vy; return *this; } inline Vec2d & Vec2d :: operator*= (double s) { vx *= s; vy *= s; return *this; } inline Vec2d & Vec2d :: operator/= (double s) { if (s != 0) { vx /= s; vy /= s; } else { MyError ("Vec2d::operator /=: Division by zero"); } return *this; } inline Vec2d operator- (const Point2d & p1, const Point2d & p2) { return Vec2d (p1.X() - p2.X(), p1.Y() - p2.Y()); } inline Point2d operator- (const Point2d & p1, const Vec2d & v) { return Point2d (p1.X() - v.X(), p1.Y() - v.Y()); } inline Point2d operator+ (const Point2d & p1, const Vec2d & v) { return Point2d (p1.X() + v.X(), p1.Y() + v.Y()); } inline Point2d Center (const Point2d & p1, const Point2d & p2) { return Point2d ((p1.X() + p2.X()) / 2, (p1.Y() + p2.Y()) / 2); } inline Vec2d operator- (const Vec2d & v1, const Vec2d & v2) { return Vec2d (v1.X() - v2.X(), v1.Y() - v2.Y()); } inline Vec2d operator+ (const Vec2d & v1, const Vec2d & v2) { return Vec2d (v1.X() + v2.X(), v1.Y() + v2.Y()); } inline Vec2d operator* (double scal, const Vec2d & v) { return Vec2d (scal * v.X(), scal * v.Y()); } inline void PpSmV (const Point2d & p1, double s, const Vec2d & v, Point2d & p2) { p2.X() = p1.X() + s * v.X(); p2.Y() = p1.Y() + s * v.Y(); } inline void PmP (const Point2d & p1, const Point2d & p2, Vec2d & v) { v.X() = p1.X() - p2.X(); v.Y() = p1.Y() - p2.Y(); } #ifdef none inline int TRIANGLE2D :: Regular() const { return fabs(Cross ( p2 - p1, p3 - p2)) > EPSGEOM; } inline int TRIANGLE2D :: CW () const { return Cross ( p2 - p1, p3 - p2) < 0; } inline int TRIANGLE2D :: CCW () const { return Cross ( p2 - p1, p3 - p2) > 0; } inline int PTRIANGLE2D :: Regular() const { return fabs(Cross ( *p2 - *p1, *p3 - *p2)) > EPSGEOM; } inline int PTRIANGLE2D :: CW () const { return Cross ( *p2 - *p1, *p3 - *p2) < 0; } inline int PTRIANGLE2D :: CCW () const { return Cross ( *p2 - *p1, *p3 - *p2) > 0; } #endif /// class Mat2d { protected: /// double coeff[4]; public: /// Mat2d() { coeff[0] = coeff[1] = coeff[2] = coeff[3] = 0; } /// Mat2d(double a11, double a12, double a21, double a22) { coeff[0] = a11; coeff[1] = a12; coeff[2] = a21; coeff[3] = a22; } /// Mat2d(const Mat2d & m2) { for (int i = 0; i < 4; i++) coeff[i] = m2.Get(i); } /// double & Elem (INDEX i, INDEX j) { return coeff[2*(i-1)+j-1]; } /// double & Elem (INDEX i) {return coeff[i]; } /// double Get (INDEX i, INDEX j) const { return coeff[2*(i-1)+j-1]; } /// double Get (INDEX i) const {return coeff[i]; } /// double Det () const { return coeff[0] * coeff[3] - coeff[1] * coeff[2]; } /// void Mult (const Vec2d & v, Vec2d & prod) const; /// void MultTrans (const Vec2d & v , Vec2d & prod) const; /// void Solve (const Vec2d & rhs, Vec2d & x) const; /// Solves mat * x = rhs, but using a positive definite matrix instead of mat void SolvePositiveDefinite (const Vec2d & rhs, Vec2d & x) const; /// add a term \alpha * v * v^T void AddDiadicProduct (double alpha, Vec2d & v); }; inline void Mat2d :: Mult (const Vec2d & v, Vec2d & prod) const { prod.X() = coeff[0] * v.X() + coeff[1] * v.Y(); prod.Y() = coeff[2] * v.X() + coeff[3] * v.Y(); } inline void Mat2d :: MultTrans (const Vec2d & v, Vec2d & prod) const { prod.X() = coeff[0] * v.X() + coeff[2] * v.Y(); prod.Y() = coeff[1] * v.X() + coeff[3] * v.Y(); } inline void Mat2d :: Solve (const Vec2d & rhs, Vec2d & x) const { double det = Det(); if (det == 0) MyError ("Mat2d::Solve: zero determinant"); else { x.X() = (coeff[3] * rhs.X() - coeff[1] * rhs.Y()) / det; x.Y() = (-coeff[2] * rhs.X() + coeff[0] * rhs.Y()) / det; } } inline void Mat2d :: SolvePositiveDefinite (const Vec2d & rhs, Vec2d & x) const { double a = max2(coeff[0], 1e-8); double b = coeff[1] / a; double c = coeff[2] / a; double d = max2(coeff[3] - a *b * c, 1e-8); x.X() = (rhs.X() - b * rhs.Y()) / a; x.Y() = rhs.Y() / d - c * x.X(); } inline void Mat2d :: AddDiadicProduct (double alpha, Vec2d & v) { coeff[0] += alpha * v.X() * v.X(); coeff[1] += alpha * v.X() * v.Y(); coeff[2] += alpha * v.Y() * v.X(); coeff[3] += alpha * v.Y() * v.Y(); } } #endif netgen-6.2.1804/libsrc/gprim/geomtest3d.hpp0000644000175000017500000000565013272137567017176 0ustar kurtkurt#ifndef FILE_GEOMTEST3D #define FILE_GEOMTEST3D /* *************************************************************************/ /* File: geomtest3d.hh */ /* Author: Joachim Schoeberl */ /* Date: 13. Feb. 98 */ /* *************************************************************************/ namespace netgen { extern int IntersectTriangleLine (const Point<3> ** tri, const Point<3> ** line); /** Returns 0, iff closure (tet) cup closure (tri) is empty, one corner point of tet, one edge of tet or one face of tet */ extern int IntersectTetTriangle (const Point<3> ** tet, const Point<3> ** tri, const int * tetpi = NULL, const int * tripi = NULL); /** Same test as above, but tet int reference position (0, ex, ey, ez), tetpi = 1, 2, 4, 5 */ extern int IntersectTetTriangleRef (const Point3d ** tri, const int * tripi = NULL); // 1, iff not regular triangulation extern int IntersectTriangleTriangle (const Point<3> ** tri1, const Point<3> ** tri2); extern void LocalCoordinates (const Vec3d & e1, const Vec3d & e2, const Vec3d & v, double & lam1, double & lam2); /// return 1 = degenerated sphere extern int CalcSphereCenter (const Point<3> ** pts, Point<3> & c); /// return 1 = degenerated triangle extern int CalcTriangleCenter (const Point3d ** pts, Point3d & c); /* Compute radius of cylinder fitting 4 points. cylinder axis is in the direction of p1-p2 */ extern double ComputeCylinderRadius (const Point3d & p1, const Point3d & p2, const Point3d & p3, const Point3d & p4); /* Two triangles T1 and T2 have normals n1 and n2. The height over the common edge is h1, and h2. Radius of cylinder fitting both triangles */ extern double ComputeCylinderRadius (const Vec3d & n1, const Vec3d & n2, double h1, double h2); /// Minimal distance of point p to the line segment [lp1,lp2] extern double MinDistLP2 (const Point2d & lp1, const Point2d & lp2, const Point2d & p); /// Minimal distance of point p to the line segment [lp1,lp2] extern double MinDistLP2 (const Point3d & lp1, const Point3d & lp2, const Point3d & p); /// Minimal distance of point p to the triangle segment [tp1,tp2,pt3] extern double MinDistTP2 (const Point3d & tp1, const Point3d & tp2, const Point3d & tp3, const Point3d & p); inline double MinDistTP2 (const Point<2> & tp1, const Point<2> & tp2, const Point<2> & tp3, const Point<2> & p) { return MinDistTP2 (Point<3> (tp1(0), tp1(1),0), Point<3> (tp2(0), tp2(1),0), Point<3> (tp3(0), tp3(1),0), Point<3> (p(0), p(1),0)); } /// Minimal distance of the 2 lines [l1p1,l1p2] and [l2p1,l2p2] extern double MinDistLL2 (const Point3d & l1p1, const Point3d & l1p2, const Point3d & l2p1, const Point3d & l2p2); } #endif netgen-6.2.1804/libsrc/gprim/geom3d.hpp0000644000175000017500000004471113272137567016277 0ustar kurtkurt#ifndef FILE_GEOM3D #define FILE_GEOM3D /* *************************************************************************/ /* File: geom3d.hh */ /* Author: Joachim Schoeberl */ /* Date: 5. Aug. 95 */ /* *************************************************************************/ namespace netgen { extern DLL_HEADER void MyError (const char * ch); class Point3d; class Vec3d; inline Vec3d operator- (const Point3d & p1, const Point3d & p2); inline Point3d operator- (const Point3d & p1, const Vec3d & v); inline Point3d operator+ (const Point3d & p1, const Vec3d & v); Point3d & Add (double d, const Vec3d & v); Point3d & Add2 (double d, const Vec3d & v, double d2, const Vec3d & v2); inline Point3d Center (const Point3d & p1, const Point3d & p2); inline Point3d Center (const Point3d & p1, const Point3d & p2, const Point3d & p3); inline Point3d Center (const Point3d & p1, const Point3d & p2, const Point3d & p3, const Point3d & p4); ostream & operator<<(ostream & s, const Point3d & p); inline Vec3d operator- (const Vec3d & p1, const Vec3d & v); inline Vec3d operator+ (const Vec3d & p1, const Vec3d & v); inline Vec3d operator* (double scal, const Vec3d & v); inline double operator* (const Vec3d & v1, const Vec3d & v2); inline Vec3d Cross (const Vec3d & v1, const Vec3d & v2); inline void Cross (const Vec3d & v1, const Vec3d & v2, Vec3d & prod); double Angle (const Vec3d & v); double FastAngle (const Vec3d & v); double Angle (const Vec3d & v1, const Vec3d & v2); double FastAngle (const Vec3d & v1, const Vec3d & v2); ostream & operator<<(ostream & s, const Vec3d & v); void Transpose (Vec3d & v1, Vec3d & v2, Vec3d & v3); int SolveLinearSystem (const Vec3d & col1, const Vec3d & col2, const Vec3d & col3, const Vec3d & rhs, Vec3d & sol); int SolveLinearSystemLS (const Vec3d & col1, const Vec3d & col2, const Vec2d & rhs, Vec3d & sol); int SolveLinearSystemLS2 (const Vec3d & col1, const Vec3d & col2, const Vec2d & rhs, Vec3d & sol, double & x, double & y); int PseudoInverse (const Vec3d & col1, const Vec3d & col2, Vec3d & inv1, Vec3d & inv2); double Determinant (const Vec3d & col1, const Vec3d & col2, const Vec3d & col3); inline double Dist2 (const Point3d & p1, const Point3d & p2); /// Point in R3 class Point3d { protected: /// double x[3]; public: /// Point3d () { x[0] = x[1] = x[2] = 0; } /// Point3d(double ax, double ay, double az) { x[0] = ax; x[1] = ay; x[2] = az; } /// Point3d(double ax[3]) { x[0] = ax[0]; x[1] = ax[1]; x[2] = ax[2]; } /// Point3d(const Point3d & p2) { x[0] = p2.x[0]; x[1] = p2.x[1]; x[2] = p2.x[2]; } Point3d (const Point<3> & p2) { for (int i = 0; i < 3; i++) x[i] = p2(i); } /// Point3d & operator= (const Point3d & p2) { x[0] = p2.x[0]; x[1] = p2.x[1]; x[2] = p2.x[2]; return *this; } /// int operator== (const Point3d& p) const { return (x[0] == p.x[0] && x[1] == p.x[1] && x[2] == p.x[2]); } /// double & X() { return x[0]; } /// double & Y() { return x[1]; } /// double & Z() { return x[2]; } /// double X() const { return x[0]; } /// double Y() const { return x[1]; } /// double Z() const { return x[2]; } /// double & X(int i) { return x[i-1]; } /// double X(int i) const { return x[i-1]; } /// const Point3d & SetToMin (const Point3d & p2) { if (p2.x[0] < x[0]) x[0] = p2.x[0]; if (p2.x[1] < x[1]) x[1] = p2.x[1]; if (p2.x[2] < x[2]) x[2] = p2.x[2]; return *this; } /// const Point3d & SetToMax (const Point3d & p2) { if (p2.x[0] > x[0]) x[0] = p2.x[0]; if (p2.x[1] > x[1]) x[1] = p2.x[1]; if (p2.x[2] > x[2]) x[2] = p2.x[2]; return *this; } /// friend inline Vec3d operator- (const Point3d & p1, const Point3d & p2); /// friend inline Point3d operator- (const Point3d & p1, const Vec3d & v); /// friend inline Point3d operator+ (const Point3d & p1, const Vec3d & v); /// inline Point3d & operator+= (const Vec3d & v); inline Point3d & operator-= (const Vec3d & v); /// inline Point3d & Add (double d, const Vec3d & v); /// inline Point3d & Add2 (double d, const Vec3d & v, double d2, const Vec3d & v2); /// friend inline double Dist (const Point3d & p1, const Point3d & p2) { return sqrt ( (p1.x[0]-p2.x[0]) * (p1.x[0]-p2.x[0]) + (p1.x[1]-p2.x[1]) * (p1.x[1]-p2.x[1]) + (p1.x[2]-p2.x[2]) * (p1.x[2]-p2.x[2])); } /// inline friend double Dist2 (const Point3d & p1, const Point3d & p2) { return ( (p1.x[0]-p2.x[0]) * (p1.x[0]-p2.x[0]) + (p1.x[1]-p2.x[1]) * (p1.x[1]-p2.x[1]) + (p1.x[2]-p2.x[2]) * (p1.x[2]-p2.x[2])); } /// friend inline Point3d Center (const Point3d & p1, const Point3d & p2); /// friend inline Point3d Center (const Point3d & p1, const Point3d & p2, const Point3d & p3); /// friend inline Point3d Center (const Point3d & p1, const Point3d & p2, const Point3d & p3, const Point3d & p4); /// friend ostream & operator<<(ostream & s, const Point3d & p); /// friend class Vec3d; /// friend class Box3d; operator Point<3> () const { return Point<3> (x[0], x[1], x[2]); } }; /// class Vec3d { protected: /// double x[3]; public: /// inline Vec3d() { x[0] = x[1] = x[2] = 0; } /// inline Vec3d(double ax, double ay, double az) { x[0] = ax; x[1] = ay; x[2] = az; } /// Vec3d(double ax[3]) { x[0] = ax[0]; x[1] = ax[1]; x[2] = ax[2]; } /// inline Vec3d(const Vec3d & v2) { x[0] = v2.x[0]; x[1] = v2.x[1]; x[2] = v2.x[2]; } /// inline Vec3d(const Point3d & p1, const Point3d & p2) { x[0] = p2.x[0] - p1.x[0]; x[1] = p2.x[1] - p1.x[1]; x[2] = p2.x[2] - p1.x[2]; } /// inline Vec3d(const Point3d & p1) { x[0] = p1.x[0]; x[1] = p1.x[1]; x[2] = p1.x[2]; } Vec3d (const Vec<3> & v2) { for (int i = 0; i < 3; i++) x[i] = v2(i); } operator Vec<3> () const { return Vec<3> (x[0], x[1], x[2]); } Vec3d & operator= (const Vec3d & v2) { x[0] = v2.x[0]; x[1] = v2.x[1]; x[2] = v2.x[2]; return *this; } /// Vec3d & operator= (double val) { x[0] = x[1] = x[2] = val; return *this; } /// double & X() { return x[0]; } /// double & Y() { return x[1]; } /// double & Z() { return x[2]; } /// double & X(int i) { return x[i-1]; } /// double X() const { return x[0]; } /// double Y() const { return x[1]; } /// double Z() const { return x[2]; } /// double X(int i) const { return x[i-1]; } /// double Length() const { return sqrt (x[0] * x[0] + x[1] * x[1] + x[2] * x[2]); } /// double Length2() const { return x[0] * x[0] + x[1] * x[1] + x[2] * x[2]; } /// inline friend double Dist (const Vec3d & v1, const Vec3d & v2) { return sqrt ( (v1.x[0]-v2.x[0]) * (v1.x[0]-v2.x[0]) + (v1.x[1]-v2.x[1]) * (v1.x[1]-v2.x[1]) + (v1.x[2]-v2.x[2]) * (v1.x[2]-v2.x[2])); } /// inline friend double Dist2 (const Vec3d & v1, const Vec3d & v2) { return ( (v1.x[0]-v2.x[0]) * (v1.x[0]-v2.x[0]) + (v1.x[1]-v2.x[1]) * (v1.x[1]-v2.x[1]) + (v1.x[2]-v2.x[2]) * (v1.x[2]-v2.x[2])); } /// Vec3d & operator+= (const Vec3d & v2); /// Vec3d & operator-= (const Vec3d & v2); /// Vec3d & operator*= (double s); /// Vec3d & operator/= (double s); /// inline Vec3d & Add (double d, const Vec3d & v); /// inline Vec3d & Add2 (double d, const Vec3d & v, double d2, const Vec3d & v2); /// friend inline Vec3d operator- (const Point3d & p1, const Point3d & p2); /// friend inline Point3d operator- (const Point3d & p1, const Vec3d & v); /// friend inline Point3d operator+ (const Point3d & p1, const Vec3d & v); /// friend inline Vec3d operator- (const Vec3d & p1, const Vec3d & v); /// friend inline Vec3d operator+ (const Vec3d & p1, const Vec3d & v); /// friend inline Vec3d operator* (double scal, const Vec3d & v); /// friend inline double operator* (const Vec3d & v1, const Vec3d & v2); /// friend inline Vec3d Cross (const Vec3d & v1, const Vec3d & v2); /// friend inline void Cross (const Vec3d & v1, const Vec3d & v2, Vec3d & prod); /// Returns one normal-vector to n void GetNormal (Vec3d & n) const; /// friend double Angle (const Vec3d & v); /// friend double FastAngle (const Vec3d & v); /// friend double Angle (const Vec3d & v1, const Vec3d & v2); /// friend double FastAngle (const Vec3d & v1, const Vec3d & v2); void Normalize() { double len = (x[0] * x[0] + x[1] * x[1] + x[2] * x[2]); if (len == 0) return; len = sqrt (len); x[0] /= len; x[1] /= len; x[2] /= len; } /// friend ostream & operator<<(ostream & s, const Vec3d & v); /// friend class Point3d; friend void Transpose (Vec3d & v1, Vec3d & v2, Vec3d & v3); friend int SolveLinearSystem (const Vec3d & col1, const Vec3d & col2, const Vec3d & col3, const Vec3d & rhs, Vec3d & sol); friend int SolveLinearSystemLS (const Vec3d & col1, const Vec3d & col2, const Vec2d & rhs, Vec3d & sol); friend int SolveLinearSystemLS2 (const Vec3d & col1, const Vec3d & col2, const Vec2d & rhs, Vec3d & sol, double & x, double & y); friend int PseudoInverse (const Vec3d & col1, const Vec3d & col2, Vec3d & inv1, Vec3d & inv2); friend double Determinant (const Vec3d & col1, const Vec3d & col2, const Vec3d & col3); }; class QuadraticFunction3d { double c0, cx, cy, cz; double cxx, cyy, czz, cxy, cxz, cyz; public: QuadraticFunction3d (const Point3d & p, const Vec3d & v); double Eval (const Point3d & p) { return c0 + p.X() * (cx + cxx * p.X() + cxy * p.Y() + cxz * p.Z()) + p.Y() * (cy + cyy * p.Y() + cyz * p.Z()) + p.Z() * (cz + czz * p.Z()); } }; inline Point3d Center (const Point3d & p1, const Point3d & p2) { return Point3d (0.5 * (p1.x[0] + p2.x[0]), 0.5 * (p1.x[1] + p2.x[1]), 0.5 * (p1.x[2] + p2.x[2])); } inline Point3d Center (const Point3d & p1, const Point3d & p2, const Point3d & p3) { return Point3d (1.0/3.0 * (p1.x[0] + p2.x[0] + p3.x[0]), 1.0/3.0 * (p1.x[1] + p2.x[1] + p3.x[1]), 1.0/3.0 * (p1.x[2] + p2.x[2] + p3.x[2])); } inline Point3d Center (const Point3d & p1, const Point3d & p2, const Point3d & p3, const Point3d & p4) { return Point3d (0.25 * (p1.x[0] + p2.x[0] + p3.x[0] + p4.x[0]), 0.25 * (p1.x[1] + p2.x[1] + p3.x[1] + p4.x[1]), 0.25 * (p1.x[2] + p2.x[2] + p3.x[2] + p4.x[2])); } inline Vec3d & Vec3d :: operator+= (const Vec3d & v2) { x[0] += v2.x[0]; x[1] += v2.x[1]; x[2] += v2.x[2]; return *this; } inline Vec3d & Vec3d :: operator-= (const Vec3d & v2) { x[0] -= v2.x[0]; x[1] -= v2.x[1]; x[2] -= v2.x[2]; return *this; } inline Vec3d & Vec3d :: operator*= (double s) { x[0] *= s; x[1] *= s; x[2] *= s; return *this; } inline Vec3d & Vec3d :: operator/= (double s) { if (s != 0) { x[0] /= s; x[1] /= s; x[2] /= s; } #ifdef DEBUG else { cerr << "Vec div by 0, v = " << (*this) << endl; // MyError ("Vec3d::operator /=: Divisioin by zero"); } #endif return *this; } inline Vec3d & Vec3d::Add (double d, const Vec3d & v) { x[0] += d * v.x[0]; x[1] += d * v.x[1]; x[2] += d * v.x[2]; return *this; } inline Vec3d & Vec3d::Add2 (double d, const Vec3d & v, double d2, const Vec3d & v2) { x[0] += d * v.x[0] + d2 * v2.x[0]; x[1] += d * v.x[1] + d2 * v2.x[1]; x[2] += d * v.x[2] + d2 * v2.x[2]; return *this; } inline Vec3d operator- (const Point3d & p1, const Point3d & p2) { return Vec3d (p1.x[0] - p2.x[0], p1.x[1] - p2.x[1],p1.x[2] - p2.x[2]); } inline Point3d operator- (const Point3d & p1, const Vec3d & v) { return Point3d (p1.x[0] - v.x[0], p1.x[1] - v.x[1],p1.x[2] - v.x[2]); } inline Point3d operator+ (const Point3d & p1, const Vec3d & v) { return Point3d (p1.x[0] + v.x[0], p1.x[1] + v.x[1],p1.x[2] + v.x[2]); } inline Point3d & Point3d::operator+= (const Vec3d & v) { x[0] += v.x[0]; x[1] += v.x[1]; x[2] += v.x[2]; return *this; } inline Point3d & Point3d::operator-= (const Vec3d & v) { x[0] -= v.x[0]; x[1] -= v.x[1]; x[2] -= v.x[2]; return *this; } inline Point3d & Point3d::Add (double d, const Vec3d & v) { x[0] += d * v.x[0]; x[1] += d * v.x[1]; x[2] += d * v.x[2]; return *this; } inline Point3d & Point3d::Add2 (double d, const Vec3d & v, double d2, const Vec3d & v2) { x[0] += d * v.x[0] + d2 * v2.x[0]; x[1] += d * v.x[1] + d2 * v2.x[1]; x[2] += d * v.x[2] + d2 * v2.x[2]; return *this; } inline Vec3d operator- (const Vec3d & v1, const Vec3d & v2) { return Vec3d (v1.x[0] - v2.x[0], v1.x[1] - v2.x[1],v1.x[2] - v2.x[2]); } inline Vec3d operator+ (const Vec3d & v1, const Vec3d & v2) { return Vec3d (v1.x[0] + v2.x[0], v1.x[1] + v2.x[1],v1.x[2] + v2.x[2]); } inline Vec3d operator* (double scal, const Vec3d & v) { return Vec3d (scal * v.x[0], scal * v.x[1], scal * v.x[2]); } inline double operator* (const Vec3d & v1, const Vec3d & v2) { return v1.x[0] * v2.x[0] + v1.x[1] * v2.x[1] + v1.x[2] * v2.x[2]; } inline Vec3d Cross (const Vec3d & v1, const Vec3d & v2) { return Vec3d ( v1.x[1] * v2.x[2] - v1.x[2] * v2.x[1], v1.x[2] * v2.x[0] - v1.x[0] * v2.x[2], v1.x[0] * v2.x[1] - v1.x[1] * v2.x[0]); } inline void Cross (const Vec3d & v1, const Vec3d & v2, Vec3d & prod) { prod.x[0] = v1.x[1] * v2.x[2] - v1.x[2] * v2.x[1]; prod.x[1] = v1.x[2] * v2.x[0] - v1.x[0] * v2.x[2]; prod.x[2] = v1.x[0] * v2.x[1] - v1.x[1] * v2.x[0]; } inline double Determinant (const Vec3d & col1, const Vec3d & col2, const Vec3d & col3) { return col1.x[0] * ( col2.x[1] * col3.x[2] - col2.x[2] * col3.x[1]) + col1.x[1] * ( col2.x[2] * col3.x[0] - col2.x[0] * col3.x[2]) + col1.x[2] * ( col2.x[0] * col3.x[1] - col2.x[1] * col3.x[0]); } /// class Box3d { protected: /// double minx[3], maxx[3]; public: /// Box3d () { }; /// Box3d ( double aminx, double amaxx, double aminy, double amaxy, double aminz, double amaxz ); /// Box3d ( const Box3d & b2 ); /// Box3d (const Point3d& p1, const Point3d& p2); /// Box3d (const Box<3> & b2); /// double MinX () const { return minx[0]; } /// double MaxX () const { return maxx[0]; } /// double MinY () const { return minx[1]; } /// double MaxY () const { return maxx[1]; } /// double MinZ () const { return minx[2]; } /// double MaxZ () const { return maxx[2]; } /// double Mini (int i) const { return minx[i-1]; } /// double Maxi (int i) const { return maxx[i-1]; } /// Point3d PMin () const { return Point3d(minx[0], minx[1], minx[2]); } /// Point3d PMax () const { return Point3d(maxx[0], maxx[1], maxx[2]); } /// void GetPointNr (int i, Point3d & point) const; /// increase Box at each side with dist void Increase (double dist); /// increase Box by factor rel void IncreaseRel (double rel); /// return 1 if closures are intersecting int Intersect (const Box3d & box2) const { if (minx[0] > box2.maxx[0] || maxx[0] < box2.minx[0] || minx[1] > box2.maxx[1] || maxx[1] < box2.minx[1] || minx[2] > box2.maxx[2] || maxx[2] < box2.minx[2]) return 0; return 1; } /// return 1 if point p in closure int IsIn (const Point3d & p) const { if (minx[0] <= p.x[0] && maxx[0] >= p.x[0] && minx[1] <= p.x[1] && maxx[1] >= p.x[1] && minx[2] <= p.x[2] && maxx[2] >= p.x[2]) return 1; return 0; } /// inline void SetPoint (const Point3d & p) { minx[0] = maxx[0] = p.X(); minx[1] = maxx[1] = p.Y(); minx[2] = maxx[2] = p.Z(); } /// inline void AddPoint (const Point3d & p) { if (p.x[0] < minx[0]) minx[0] = p.x[0]; if (p.x[0] > maxx[0]) maxx[0] = p.x[0]; if (p.x[1] < minx[1]) minx[1] = p.x[1]; if (p.x[1] > maxx[1]) maxx[1] = p.x[1]; if (p.x[2] < minx[2]) minx[2] = p.x[2]; if (p.x[2] > maxx[2]) maxx[2] = p.x[2]; } /// const Box3d& operator+=(const Box3d& b); /// Point3d MaxCoords() const; /// Point3d MinCoords() const; /// Make a negative sized box; // void CreateNegMinMaxBox(); /// Point3d CalcCenter () const { return Point3d(0.5*(minx[0] + maxx[0]), 0.5*(minx[1] + maxx[1]), 0.5*(minx[2] + maxx[2])); } /// double CalcDiam () const { return sqrt(sqr(maxx[0]-minx[0])+ sqr(maxx[1]-minx[1])+ sqr(maxx[2]-minx[2])); } /// void WriteData(ofstream& fout) const; /// void ReadData(ifstream& fin); }; class Box3dSphere : public Box3d { protected: /// double diam, inner; /// Point3d c; public: /// Box3dSphere () { }; /// Box3dSphere ( double aminx, double amaxx, double aminy, double amaxy, double aminz, double amaxz); /// const Point3d & Center () const { return c; } /// double Diam () const { return diam; } /// double Inner () const { return inner; } /// void GetSubBox (int i, Box3dSphere & sbox) const; // private: /// void CalcDiamCenter (); }; /// class referencetransform { /// Vec3d ex, ey, ez; /// Vec3d exh, eyh, ezh; /// Vec3d ex_h, ey_h, ez_h; /// Point3d rp; /// double h; public: /// void Set (const Point3d & p1, const Point3d & p2, const Point3d & p3, double ah); /// void ToPlain (const Point3d & p, Point3d & pp) const; /// void ToPlain (const Array & p, Array & pp) const; /// void FromPlain (const Point3d & pp, Point3d & p) const; }; } #endif netgen-6.2.1804/libsrc/meshing/0000755000175000017500000000000013272137567014715 5ustar kurtkurtnetgen-6.2.1804/libsrc/meshing/topology.cpp0000644000175000017500000016045613272137567017311 0ustar kurtkurt#include #include "meshing.hpp" namespace netgen { template void QuickSortRec (FlatArray data, int left, int right) { int i = left; int j = right; T midval = data[(left+right)/2]; do { while (data[i] < midval) i++; while (midval < data[j]) j--; if (i <= j) { Swap (data[i], data[j]); i++; j--; } } while (i <= j); if (left < j) QuickSortRec (data, left, j); if (i < right) QuickSortRec (data, i, right); } template void QuickSort (FlatArray data) { if (data.Size() > 1) QuickSortRec (data, 0, data.Size()-1); } MeshTopology :: MeshTopology (const Mesh & amesh) : mesh(&amesh) { buildedges = true; buildfaces = true; timestamp = -1; } MeshTopology :: ~MeshTopology () { ; } template void LoopOverEdges (const Mesh & mesh, MeshTopology & top, PointIndex v, FUNC func) { for (ElementIndex elnr : top.GetVertexElements(v)) { const Element & el = mesh[elnr]; int neledges = MeshTopology::GetNEdges (el.GetType()); const ELEMENT_EDGE * eledges = MeshTopology::GetEdges0 (el.GetType()); for (int k = 0; k < neledges; k++) { INDEX_2 edge(el[eledges[k][0]], el[eledges[k][1]]); // edge.Sort(); int edgedir = (edge.I1() > edge.I2()); if (edgedir) swap (edge.I1(), edge.I2()); if (edge.I1() != v) continue; func (edge, elnr, k, 3, edgedir); } } for (SurfaceElementIndex elnr : top.GetVertexSurfaceElements(v)) { const Element2d & el = mesh[elnr]; int neledges = MeshTopology::GetNEdges (el.GetType()); const ELEMENT_EDGE * eledges = MeshTopology::GetEdges0 (el.GetType()); for (int k = 0; k < neledges; k++) { INDEX_2 edge(el[eledges[k][0]], el[eledges[k][1]]); // edge.Sort(); int edgedir = (edge.I1() > edge.I2()); if (edgedir) swap (edge.I1(), edge.I2()); if (edge.I1() != v) continue; func (edge, elnr, k, 2, edgedir); } } for (SegmentIndex elnr : top.GetVertexSegments(v)) { const Segment & el = mesh[elnr]; INDEX_2 edge(el[0], el[1]); int edgedir = (edge.I1() > edge.I2()); if (edgedir) swap (edge.I1(), edge.I2()); edge.Sort(); if (edge.I1() != v) continue; func (edge, elnr, 0, 1, edgedir); } } template void LoopOverFaces (const Mesh & mesh, MeshTopology & top, PointIndex v, FUNC func) { for (ElementIndex elnr : top.GetVertexElements(v)) { const Element & el = mesh[elnr]; int nelfaces = MeshTopology::GetNFaces (el.GetType()); const ELEMENT_FACE * elfaces = MeshTopology::GetFaces0 (el.GetType()); for (int j = 0; j < nelfaces; j++) if (elfaces[j][3] < 0) { // triangle INDEX_4 face(el[elfaces[j][0]], el[elfaces[j][1]], el[elfaces[j][2]], 0); int facedir = 0; if (face.I1() > face.I2()) { swap (face.I1(), face.I2()); facedir += 1; } if (face.I2() > face.I3()) { swap (face.I2(), face.I3()); facedir += 2; } if (face.I1() > face.I2()) { swap (face.I1(), face.I2()); facedir += 4; } if (face.I1() != v) continue; func (face, elnr, j, true, facedir); } /* if (pass == 1) { if (!vert2face.Used (face)) { nfa++; vert2face.Set (face, nfa); INDEX_4 hface(face.I1(),face.I2(),face.I3(),0); face2vert.Append (hface); } } else { int facenum = vert2face.Get(face); faces[elnr][j].fnr = facenum-1; faces[elnr][j].forient = facedir; } */ else { // quad // int facenum; INDEX_4 face4(el[elfaces[j][0]], el[elfaces[j][1]], el[elfaces[j][2]], el[elfaces[j][3]]); int facedir = 0; if (min2 (face4.I1(), face4.I2()) > min2 (face4.I4(), face4.I3())) { // z - flip facedir += 1; swap (face4.I1(), face4.I4()); swap (face4.I2(), face4.I3()); } if (min2 (face4.I1(), face4.I4()) > min2 (face4.I2(), face4.I3())) { // x - flip facedir += 2; swap (face4.I1(), face4.I2()); swap (face4.I3(), face4.I4()); } if (face4.I2() > face4.I4()) { // diagonal flip facedir += 4; swap (face4.I2(), face4.I4()); } if (face4.I1() != v) continue; func(face4, elnr, j, true, facedir); /* INDEX_3 face(face4.I1(), face4.I2(), face4.I3()); if (vert2face.Used (face)) { facenum = vert2face.Get(face); } else { if (pass == 2) cout << "hier in pass 2" << endl; nfa++; vert2face.Set (face, nfa); facenum = nfa; INDEX_4 hface(face4.I1(),face4.I2(),face4.I3(),face4.I4()); face2vert.Append (hface); } faces[elnr][j].fnr = facenum-1; faces[elnr][j].forient = facedir; } */ } } for (SurfaceElementIndex elnr : top.GetVertexSurfaceElements(v)) { const Element2d & el = mesh.SurfaceElement (elnr); const ELEMENT_FACE * elfaces = MeshTopology::GetFaces1 (el.GetType()); if (elfaces[0][3] == 0) { // triangle // int facenum; int facedir; INDEX_4 face(el.PNum(elfaces[0][0]), el.PNum(elfaces[0][1]), el.PNum(elfaces[0][2]),0); facedir = 0; if (face.I1() > face.I2()) { swap (face.I1(), face.I2()); facedir += 1; } if (face.I2() > face.I3()) { swap (face.I2(), face.I3()); facedir += 2; } if (face.I1() > face.I2()) { swap (face.I1(), face.I2()); facedir += 4; } if (face.I1() != v) continue; func(face, elnr, 0, false, facedir); /* if (vert2face.Used (face)) facenum = vert2face.Get(face); else { nfa++; vert2face.Set (face, nfa); facenum = nfa; INDEX_4 hface(face.I1(),face.I2(),face.I3(),0); face2vert.Append (hface); } surffaces[elnr].fnr = facenum-1; surffaces[elnr].forient = facedir; */ } else { // quad // int facenum; int facedir; INDEX_4 face4(el.PNum(elfaces[0][0]), el.PNum(elfaces[0][1]), el.PNum(elfaces[0][2]), el.PNum(elfaces[0][3])); facedir = 0; if (min2 (face4.I1(), face4.I2()) > min2 (face4.I4(), face4.I3())) { // z - orientation facedir += 1; swap (face4.I1(), face4.I4()); swap (face4.I2(), face4.I3()); } if (min2 (face4.I1(), face4.I4()) > min2 (face4.I2(), face4.I3())) { // x - orientation facedir += 2; swap (face4.I1(), face4.I2()); swap (face4.I3(), face4.I4()); } if (face4.I2() > face4.I4()) { facedir += 4; swap (face4.I2(), face4.I4()); } if (face4.I1() != v) continue; func(face4, elnr, 0, false, facedir); /* INDEX_3 face(face4.I1(), face4.I2(), face4.I3()); if (vert2face.Used (face)) facenum = vert2face.Get(face); else { nfa++; vert2face.Set (face, nfa); facenum = nfa; INDEX_4 hface(face4.I1(),face4.I2(),face4.I3(),face4.I4()); face2vert.Append (hface); } surffaces[elnr].fnr = facenum-1; surffaces[elnr].forient = facedir; } */ } } } void MeshTopology :: Update (TaskManager tm, Tracer tracer) { static int timer = NgProfiler::CreateTimer ("topology"); NgProfiler::RegionTimer reg (timer); #ifdef PARALLEL // ParallelMeshTopology & paralleltop = mesh.GetParallelTopology(); #endif if (timestamp > mesh->GetTimeStamp()) return; int ne = mesh->GetNE(); int nse = mesh->GetNSE(); int nseg = mesh->GetNSeg(); int np = mesh->GetNP(); int nv = mesh->GetNV(); if (id == 0) PrintMessage (3, "Update mesh topology"); (*testout) << " UPDATE MESH TOPOLOGY " << endl; (*testout) << "ne = " << ne << endl; (*testout) << "nse = " << nse << endl; (*testout) << "nseg = " << nseg << endl; (*testout) << "np = " << np << endl; (*testout) << "nv = " << nv << endl; (*tracer) ("Topology::Update setup tables", false); Array cnt(nv); Array vnums; /* generate: vertex to element vertex to surface element vertex to segment */ cnt = 0; /* for (ElementIndex ei = 0; ei < ne; ei++) { const Element & el = (*mesh)[ei]; for (int j = 0; j < el.GetNV(); j++) cnt[el[j]]++; } */ ParallelForRange (tm, ne, [&] (size_t begin, size_t end) { for (ElementIndex ei = begin; ei < end; ei++) { const Element & el = (*mesh)[ei]; for (int j = 0; j < el.GetNV(); j++) AsAtomic(cnt[el[j]])++; } }); vert2element = TABLE (cnt); /* for (ElementIndex ei = 0; ei < ne; ei++) { const Element & el = (*mesh)[ei]; for (int j = 0; j < el.GetNV(); j++) vert2element.AddSave (el[j], ei); } */ ParallelForRange (tm, ne, [&] (size_t begin, size_t end) { for (ElementIndex ei = begin; ei < end; ei++) { const Element & el = (*mesh)[ei]; for (int j = 0; j < el.GetNV(); j++) vert2element.ParallelAdd (el[j], ei); } }); cnt = 0; /* for (SurfaceElementIndex sei = 0; sei < nse; sei++) { const Element2d & el = (*mesh)[sei]; for (int j = 0; j < el.GetNV(); j++) cnt[el[j]]++; } */ ParallelForRange (tm, nse, [&] (size_t begin, size_t end) { for (SurfaceElementIndex ei = begin; ei < end; ei++) { const Element2d & el = (*mesh)[ei]; for (int j = 0; j < el.GetNV(); j++) AsAtomic(cnt[el[j]])++; } }); vert2surfelement = TABLE (cnt); /* for (SurfaceElementIndex sei = 0; sei < nse; sei++) { const Element2d & el = (*mesh)[sei]; for (int j = 0; j < el.GetNV(); j++) vert2surfelement.AddSave (el[j], sei); } */ ParallelForRange (tm, nse, [&] (size_t begin, size_t end) { for (SurfaceElementIndex sei = begin; sei < end; sei++) { const Element2d & el = (*mesh)[sei]; for (int j = 0; j < el.GetNV(); j++) vert2surfelement.ParallelAdd (el[j], sei); } }); cnt = 0; for (SegmentIndex si = 0; si < nseg; si++) { const Segment & seg = mesh->LineSegment(si); cnt[seg[0]]++; cnt[seg[1]]++; } vert2segment = TABLE (cnt); for (SegmentIndex si = 0; si < nseg; si++) { const Segment & seg = mesh->LineSegment(si); vert2segment.AddSave (seg[0], si); vert2segment.AddSave (seg[1], si); } cnt = 0; for (int pei = 0; pei < mesh->pointelements.Size(); pei++) { const Element0d & pointel = mesh->pointelements[pei]; cnt[pointel.pnum]++; } vert2pointelement = TABLE (cnt); for (int pei = 0; pei < mesh->pointelements.Size(); pei++) { const Element0d & pointel = mesh->pointelements[pei]; vert2pointelement.AddSave (pointel.pnum, pei); } (*tracer) ("Topology::Update setup tables", true); if (buildedges) { static int timer1 = NgProfiler::CreateTimer ("topology::buildedges"); NgProfiler::RegionTimer reg1 (timer1); if (id == 0) PrintMessage (5, "Update edges "); edges.SetSize(ne); surfedges.SetSize(nse); segedges.SetSize(nseg); for (int i = 0; i < ne; i++) for (int j = 0; j < 12; j++) edges[i][j].nr = -1; for (int i = 0; i < nse; i++) for (int j = 0; j < 4; j++) surfedges[i][j].nr = -1; // keep existing edges cnt = 0; for (int i = 0; i < edge2vert.Size(); i++) cnt[edge2vert[i][0]]++; TABLE vert2edge (cnt); for (int i = 0; i < edge2vert.Size(); i++) vert2edge.AddSave (edge2vert[i][0], i); // ensure all coarse grid and intermediate level edges cnt = 0; for (int i = mesh->mlbetweennodes.Begin(); i < mesh->mlbetweennodes.End(); i++) { INDEX_2 parents = Sort (mesh->mlbetweennodes[i]); if (parents[0] >= PointIndex::BASE) cnt[parents[0]]++; } TABLE vert2vertcoarse (cnt); for (int i = mesh->mlbetweennodes.Begin(); i < mesh->mlbetweennodes.End(); i++) { INDEX_2 parents = Sort (mesh->mlbetweennodes[i]); if (parents[0] > PointIndex::BASE) vert2vertcoarse.AddSave (parents[0], parents[1]); } int max_edge_on_vertex = 0; for (int i = PointIndex::BASE; i < nv+PointIndex::BASE; i++) { int onv = vert2edge[i].Size() + vert2vertcoarse[i].Size() + 4*(vert2element)[i].Size() + 2*(vert2surfelement)[i].Size() + (vert2segment)[i].Size(); max_edge_on_vertex = max (onv, max_edge_on_vertex); } // count edges associated with vertices cnt = 0; ParallelForRange (tm, mesh->Points().Size(), [&] (size_t begin, size_t end) { INDEX_CLOSED_HASHTABLE v2eht(2*max_edge_on_vertex+10); for (PointIndex v = begin+PointIndex::BASE; v < end+PointIndex::BASE; v++) { v2eht.DeleteData(); for (int ednr : vert2edge[v]) { int v2 = edge2vert[ednr][1]; v2eht.Set (v2, ednr); } int cnti = 0; for (int v2 : vert2vertcoarse[v]) if (!v2eht.Used(v2)) { cnti++; v2eht.Set (v2, 33); // some value } LoopOverEdges (*mesh, *this, v, [&] (INDEX_2 edge, int elnr, int loc_edge, int element_dim, int edgedir) { if (!v2eht.Used (edge.I2())) { cnti++; v2eht.Set (edge.I2(), 33); // something } }); cnt[v] = cnti; } } ); // accumulate number of edges int ned = edge2vert.Size(); for (auto v : mesh->Points().Range()) { auto hv = cnt[v]; cnt[v] = ned; ned += hv; } edge2vert.SetSize(ned); // INDEX_CLOSED_HASHTABLE v2eht(2*max_edge_on_vertex+10); // Array vertex2; // for (PointIndex v = PointIndex::BASE; v < nv+PointIndex::BASE; v++) ParallelForRange (tm, mesh->Points().Size(), [&] (size_t begin, size_t end) { INDEX_CLOSED_HASHTABLE v2eht(2*max_edge_on_vertex+10); Array vertex2; for (PointIndex v = begin+PointIndex::BASE; v < end+PointIndex::BASE; v++) { int ned = cnt[v]; v2eht.DeleteData(); vertex2.SetSize (0); for (int ednr : vert2edge[v]) { int v2 = edge2vert[ednr][1]; v2eht.Set (v2, ednr); } for (int v2 : vert2vertcoarse[v]) if (!v2eht.Used(v2)) { v2eht.Set (v2, 33); // some value vertex2.Append (v2); } LoopOverEdges (*mesh, *this, v, [&](INDEX_2 edge, int elnr, int loc_edge, int element_dim, int edgedir) { if (!v2eht.Used(edge.I2())) { vertex2.Append (edge.I2()); v2eht.Set (edge.I2(), 33); } }); QuickSort (vertex2); for (int j = 0; j < vertex2.Size(); j++) { v2eht.Set (vertex2[j], ned); edge2vert[ned] = INDEX_2 (v, vertex2[j]); ned++; } LoopOverEdges (*mesh, *this, v, [&](INDEX_2 edge, int elnr, int loc_edge, int element_dim, int edgedir) { int edgenum = v2eht.Get(edge.I2()); switch (element_dim) { case 3: edges[elnr][loc_edge].nr = edgenum; // edges[elnr][loc_edge].orient = edgedir; break; case 2: surfedges[elnr][loc_edge].nr = edgenum; // surfedges[elnr][loc_edge].orient = edgedir; break; case 1: segedges[elnr].nr = edgenum; // segedges[elnr].orient = edgedir; break; } }); } } ); } // generate faces if (buildfaces) { static int timer2 = NgProfiler::CreateTimer ("topology::buildfaces"); static int timer2a = NgProfiler::CreateTimer ("topology::buildfacesa"); static int timer2b = NgProfiler::CreateTimer ("topology::buildfacesb"); static int timer2b1 = NgProfiler::CreateTimer ("topology::buildfacesb1"); static int timer2c = NgProfiler::CreateTimer ("topology::buildfacesc"); NgProfiler::RegionTimer reg2 (timer2); if (id == 0) PrintMessage (5, "Update faces "); NgProfiler::StartTimer (timer2a); faces.SetSize(ne); surffaces.SetSize(nse); cnt = 0; for (int i = 0; i < face2vert.Size(); i++) cnt[face2vert[i][0]]++; TABLE vert2oldface(cnt); for (int i = 0; i < face2vert.Size(); i++) vert2oldface.AddSave (face2vert[i][0], i); for (int elnr = 0; elnr < ne; elnr++) for (int j = 0; j < 6; j++) faces[elnr][j].fnr = -1; int max_face_on_vertex = 0; for (int i = PointIndex::BASE; i < nv+PointIndex::BASE; i++) { int onv = vert2oldface[i].Size() + vert2element[i].Size() + vert2surfelement[i].Size(); max_face_on_vertex = max (onv, max_face_on_vertex); } NgProfiler::StopTimer (timer2a); NgProfiler::StartTimer (timer2b); INDEX_3_CLOSED_HASHTABLE vert2face(2*max_face_on_vertex+10); int oldnfa = face2vert.Size(); // count faces associated with vertices cnt = 0; // for (auto v : mesh.Points().Range()) NgProfiler::StartTimer (timer2b1); ParallelForRange (tm, mesh->Points().Size(), [&] (size_t begin, size_t end) { INDEX_3_CLOSED_HASHTABLE vert2face(2*max_face_on_vertex+10); for (PointIndex v = begin+PointIndex::BASE; v < end+PointIndex::BASE; v++) { vert2face.DeleteData(); for (int j = 0; j < vert2oldface[v].Size(); j++) { int fnr = vert2oldface[v][j]; INDEX_3 face (face2vert[fnr].I1(), face2vert[fnr].I2(), face2vert[fnr].I3()); vert2face.Set (face, 33); // something } int cnti = 0; LoopOverFaces (*mesh, *this, v, [&] (INDEX_4 i4, int elnr, int j, bool volume, int facedir) { INDEX_3 face(i4.I1(), i4.I2(), i4.I3()); if (!vert2face.Used (face)) { cnti++; vert2face.Set (face, 33); // something } }); cnt[v] = cnti; } } ); NgProfiler::StopTimer (timer2b1); // accumulate number of faces int nfa = oldnfa; for (auto v : mesh->Points().Range()) { auto hv = cnt[v]; cnt[v] = nfa; nfa += hv; } face2vert.SetSize(nfa); // for (auto v : mesh.Points().Range()) ParallelForRange (tm, mesh->Points().Size(), [&] (size_t begin, size_t end) { INDEX_3_CLOSED_HASHTABLE vert2face(2*max_face_on_vertex+10); for (PointIndex v = begin+PointIndex::BASE; v < end+PointIndex::BASE; v++) { int first_fa = cnt[v]; int nfa = first_fa; vert2face.DeleteData(); for (int j = 0; j < vert2oldface[v].Size(); j++) { int fnr = vert2oldface[v][j]; INDEX_3 face (face2vert[fnr].I1(), face2vert[fnr].I2(), face2vert[fnr].I3()); vert2face.Set (face, fnr); } LoopOverFaces (*mesh, *this, v, [&] (INDEX_4 i4, int elnr, int j, bool volume, int facedir) { INDEX_3 face(i4.I1(), i4.I2(), i4.I3()); if (!vert2face.Used (face)) { face2vert[nfa] = i4; vert2face.Set (face, nfa); nfa++; } }); QuickSort (face2vert.Range(first_fa, nfa)); for (int j = first_fa; j < nfa; j++) { if (face2vert[j][0] == v) { INDEX_3 face (face2vert[j].I1(), face2vert[j].I2(), face2vert[j].I3()); vert2face.Set (face, j); } else break; } LoopOverFaces (*mesh, *this, v, [&] (INDEX_4 i4, int elnr, int j, bool volume, int facedir) { INDEX_3 face(i4.I1(), i4.I2(), i4.I3()); int facenum = vert2face.Get(face); if (volume) { faces[elnr][j].fnr = facenum; // faces[elnr][j].forient = facedir; } else { surffaces[elnr].fnr = facenum; // surffaces[elnr].forient = facedir; } }); } }); /* int oldnfa = face2vert.Size(); int nfa = oldnfa; INDEX_3_CLOSED_HASHTABLE vert2face(2*max_face_on_vertex+10); for (auto v : mesh.Points().Range()) { int first_fa = nfa; vert2face.DeleteData(); for (int j = 0; j < vert2oldface[v].Size(); j++) { int fnr = vert2oldface[v][j]; INDEX_3 face (face2vert[fnr].I1(), face2vert[fnr].I2(), face2vert[fnr].I3()); vert2face.Set (face, fnr+1); } for (int pass = 1; pass <= 2; pass++) { for (ElementIndex elnr : (*vert2element)[v]) { const Element & el = mesh[elnr]; int nelfaces = GetNFaces (el.GetType()); const ELEMENT_FACE * elfaces = GetFaces0 (el.GetType()); for (int j = 0; j < nelfaces; j++) if (elfaces[j][3] < 0) { // triangle INDEX_3 face(el[elfaces[j][0]], el[elfaces[j][1]], el[elfaces[j][2]]); int facedir = 0; if (face.I1() > face.I2()) { swap (face.I1(), face.I2()); facedir += 1; } if (face.I2() > face.I3()) { swap (face.I2(), face.I3()); facedir += 2; } if (face.I1() > face.I2()) { swap (face.I1(), face.I2()); facedir += 4; } if (face.I1() != v) continue; if (pass == 1) { if (!vert2face.Used (face)) { nfa++; vert2face.Set (face, nfa); INDEX_4 hface(face.I1(),face.I2(),face.I3(),0); face2vert.Append (hface); } } else { int facenum = vert2face.Get(face); faces[elnr][j].fnr = facenum-1; faces[elnr][j].forient = facedir; } } else { // quad int facenum; INDEX_4Q face4(el[elfaces[j][0]], el[elfaces[j][1]], el[elfaces[j][2]], el[elfaces[j][3]]); int facedir = 0; if (min2 (face4.I1(), face4.I2()) > min2 (face4.I4(), face4.I3())) { // z - flip facedir += 1; swap (face4.I1(), face4.I4()); swap (face4.I2(), face4.I3()); } if (min2 (face4.I1(), face4.I4()) > min2 (face4.I2(), face4.I3())) { // x - flip facedir += 2; swap (face4.I1(), face4.I2()); swap (face4.I3(), face4.I4()); } if (face4.I2() > face4.I4()) { // diagonal flip facedir += 4; swap (face4.I2(), face4.I4()); } INDEX_3 face(face4.I1(), face4.I2(), face4.I3()); if (face.I1() != v) continue; if (vert2face.Used (face)) { facenum = vert2face.Get(face); } else { if (pass == 2) cout << "hier in pass 2" << endl; nfa++; vert2face.Set (face, nfa); facenum = nfa; INDEX_4 hface(face4.I1(),face4.I2(),face4.I3(),face4.I4()); face2vert.Append (hface); } faces[elnr][j].fnr = facenum-1; faces[elnr][j].forient = facedir; } } for (int j = 0; j < (*vert2surfelement)[v].Size(); j++) { SurfaceElementIndex elnr = (*vert2surfelement)[v][j]; const Element2d & el = mesh.SurfaceElement (elnr); const ELEMENT_FACE * elfaces = GetFaces1 (el.GetType()); if (elfaces[0][3] == 0) { // triangle int facenum; int facedir; INDEX_3 face(el.PNum(elfaces[0][0]), el.PNum(elfaces[0][1]), el.PNum(elfaces[0][2])); facedir = 0; if (face.I1() > face.I2()) { swap (face.I1(), face.I2()); facedir += 1; } if (face.I2() > face.I3()) { swap (face.I2(), face.I3()); facedir += 2; } if (face.I1() > face.I2()) { swap (face.I1(), face.I2()); facedir += 4; } if (face.I1() != v) continue; if (vert2face.Used (face)) facenum = vert2face.Get(face); else { nfa++; vert2face.Set (face, nfa); facenum = nfa; INDEX_4 hface(face.I1(),face.I2(),face.I3(),0); face2vert.Append (hface); } surffaces[elnr].fnr = facenum-1; surffaces[elnr].forient = facedir; } else { // quad int facenum; int facedir; INDEX_4Q face4(el.PNum(elfaces[0][0]), el.PNum(elfaces[0][1]), el.PNum(elfaces[0][2]), el.PNum(elfaces[0][3])); facedir = 0; if (min2 (face4.I1(), face4.I2()) > min2 (face4.I4(), face4.I3())) { // z - orientation facedir += 1; swap (face4.I1(), face4.I4()); swap (face4.I2(), face4.I3()); } if (min2 (face4.I1(), face4.I4()) > min2 (face4.I2(), face4.I3())) { // x - orientation facedir += 2; swap (face4.I1(), face4.I2()); swap (face4.I3(), face4.I4()); } if (face4.I2() > face4.I4()) { facedir += 4; swap (face4.I2(), face4.I4()); } INDEX_3 face(face4.I1(), face4.I2(), face4.I3()); if (face.I1() != v) continue; if (vert2face.Used (face)) facenum = vert2face.Get(face); else { nfa++; vert2face.Set (face, nfa); facenum = nfa; INDEX_4 hface(face4.I1(),face4.I2(),face4.I3(),face4.I4()); face2vert.Append (hface); } surffaces[elnr].fnr = facenum-1; surffaces[elnr].forient = facedir; } } // sort faces if (pass == 1) { QuickSort (face2vert.Range(first_fa, nfa)); for (int j = first_fa; j < face2vert.Size(); j++) { if (face2vert[j][0] == v) { INDEX_3 face (face2vert[j].I1(), face2vert[j].I2(), face2vert[j].I3()); vert2face.Set (face, j+1); } else break; } } } } face2vert.SetAllocSize (nfa); */ // *testout << "face2vert = " << endl << face2vert << endl; NgProfiler::StopTimer (timer2b); NgProfiler::StartTimer (timer2c); face2surfel.SetSize (nfa); face2surfel = 0; for (int i = 1; i <= nse; i++) face2surfel.Elem(GetSurfaceElementFace(i)) = i; /* cout << "build table complete" << endl; cout << "faces = " << endl; cout << "face2vert = " << endl << face2vert << endl; cout << "surffaces = " << endl << surffaces << endl; cout << "face2surfel = " << endl << face2surfel << endl; */ surf2volelement.SetSize (nse); for (int i = 1; i <= nse; i++) { surf2volelement.Elem(i)[0] = 0; surf2volelement.Elem(i)[1] = 0; } (*tracer) ("Topology::Update build surf2vol", false); for (int i = 1; i <= ne; i++) for (int j = 0; j < 6; j++) { // int fnum = (faces.Get(i)[j]+7) / 8; int fnum = faces.Get(i)[j].fnr+1; if (fnum > 0 && face2surfel.Elem(fnum)) { int sel = face2surfel.Elem(fnum); surf2volelement.Elem(sel)[1] = surf2volelement.Elem(sel)[0]; surf2volelement.Elem(sel)[0] = i; } } (*tracer) ("Topology::Update build surf2vol", true); face2vert.SetAllocSize (face2vert.Size()); // face table complete #ifdef PARALLEL // (*testout) << " RESET Paralleltop" << endl; // paralleltop.Reset (); #endif (*tracer) ("Topology::Update count face_els", false); Array face_els(nfa), face_surfels(nfa); face_els = 0; face_surfels = 0; /* Array hfaces; for (int i = 1; i <= ne; i++) { GetElementFaces (i, hfaces); for (int j = 0; j < hfaces.Size(); j++) face_els[hfaces[j]-1]++; } */ ParallelForRange (tm, ne, [&] (size_t begin, size_t end) { Array hfaces; for (ElementIndex ei = begin; ei < end; ei++) { GetElementFaces (ei+1, hfaces); for (auto f : hfaces) AsAtomic(face_els[f-1])++; } }); for (int i = 1; i <= nse; i++) face_surfels[GetSurfaceElementFace (i)-1]++; (*tracer) ("Topology::Update count face_els", true); if (ne) { int cnt_err = 0; for (int i = 0; i < nfa; i++) { /* (*testout) << "face " << i << " has " << int(face_els[i]) << " els, " << int(face_surfels[i]) << " surfels, tot = " << face_els[i] + face_surfels[i] << endl; */ if (face_els[i] + face_surfels[i] == 1) { cnt_err++; #ifdef PARALLEL if ( ntasks > 1 ) { continue; // if ( !paralleltop.DoCoarseUpdate() ) continue; } else #endif { (*testout) << "illegal face : " << i << endl; (*testout) << "points = " << face2vert[i] << endl; (*testout) << "pos = "; for (int j = 0; j < 4; j++) if (face2vert[i].I(j+1) >= 1) (*testout) << (*mesh)[(PointIndex)face2vert[i].I(j+1)] << " "; (*testout) << endl; FlatArray vertels = GetVertexElements (face2vert[i].I(1)); for (int k = 0; k < vertels.Size(); k++) { int elfaces[10], orient[10]; int nf = GetElementFaces (vertels[k]+1, elfaces, orient); for (int l = 0; l < nf; l++) if (elfaces[l] == i) { // (*testout) << "is face of element " << vertels[k] << endl; if (mesh->coarsemesh && mesh->hpelements->Size() == mesh->GetNE() ) { const HPRefElement & hpref_el = (*mesh->hpelements) [ (*mesh)[vertels[k]].hp_elnr]; (*testout) << "coarse eleme = " << hpref_el.coarse_elnr << endl; } } } } } } if (cnt_err && ntasks == 1) cout << cnt_err << " elements are not matching !!!" << endl; } NgProfiler::StopTimer (timer2c); } #ifdef PARALLEL if (id != 0) { // if ( paralleltop.DoCoarseUpdate() ) // paralleltop.UpdateCoarseGrid(); } #endif /* for (i = 1; i <= ne; i++) { (*testout) << "Element " << i << endl; (*testout) << "PNums " << endl; for( int l=1;l<=8;l++) *testout << mesh.VolumeElement(i).PNum(l) << "\t"; *testout << endl; (*testout) << "edges: " << endl; for (j = 0; j < 9; j++) (*testout) << edges.Elem(i)[j] << " "; (*testout) << "faces: " << endl; for (j = 0; j < 6; j++)m (*testout) << faces.Elem(i)[j] << " "; } for (i = 1; i <= nse; i++) { (*testout) << "SElement " << i << endl; (*testout) << "PNums " << endl; for( int l=1;l<=4;l++) *testout << mesh.SurfaceElement(i).PNum(l) << "\t"; *testout << endl; } */ timestamp = NextTimeStamp(); } const Point3d * MeshTopology :: GetVertices (ELEMENT_TYPE et) { static Point3d segm_points [] = { Point3d (1, 0, 0), Point3d (0, 0, 0) }; static Point3d trig_points [] = { Point3d ( 1, 0, 0 ), Point3d ( 0, 1, 0 ), Point3d ( 0, 0, 0 ) }; static Point3d quad_points [] = { Point3d ( 0, 0, 0 ), Point3d ( 1, 0, 0 ), Point3d ( 1, 1, 0 ), Point3d ( 0, 1, 0 ) }; static Point3d tet_points [] = { Point3d ( 1, 0, 0 ), Point3d ( 0, 1, 0 ), Point3d ( 0, 0, 1 ), Point3d ( 0, 0, 0 ) }; static Point3d pyramid_points [] = { Point3d ( 0, 0, 0 ), Point3d ( 1, 0, 0 ), Point3d ( 1, 1, 0 ), Point3d ( 0, 1, 0 ), Point3d ( 0, 0, 1-1e-7 ), }; static Point3d prism_points[] = { Point3d ( 1, 0, 0 ), Point3d ( 0, 1, 0 ), Point3d ( 0, 0, 0 ), Point3d ( 1, 0, 1 ), Point3d ( 0, 1, 1 ), Point3d ( 0, 0, 1 ) }; static Point3d hex_points [] = { Point3d ( 0, 0, 0 ), Point3d ( 1, 0, 0 ), Point3d ( 1, 1, 0 ), Point3d ( 0, 1, 0 ), Point3d ( 0, 0, 1 ), Point3d ( 1, 0, 1 ), Point3d ( 1, 1, 1 ), Point3d ( 0, 1, 1 ) }; switch (et) { case SEGMENT: case SEGMENT3: return segm_points; case TRIG: case TRIG6: return trig_points; case QUAD: case QUAD6: case QUAD8: return quad_points; case TET: case TET10: return tet_points; case PYRAMID: return pyramid_points; case PRISM: case PRISM12: return prism_points; case HEX: return hex_points; default: cerr << "Ng_ME_GetVertices, illegal element type " << et << endl; } return 0; } void MeshTopology :: GetElementEdges (int elnr, Array & eledges) const { int ned = GetNEdges (mesh->VolumeElement(elnr).GetType()); eledges.SetSize (ned); for (int i = 0; i < ned; i++) eledges[i] = edges.Get(elnr)[i].nr+1; // eledges[i] = abs (edges.Get(elnr)[i]); } void MeshTopology :: GetElementFaces (int elnr, Array & elfaces, bool withorientation) const { int nfa = GetNFaces (mesh->VolumeElement(elnr).GetType()); elfaces.SetSize (nfa); if (!withorientation) for (int i = 1; i <= nfa; i++) { // elfaces.Elem(i) = (faces.Get(elnr)[i-1]-1) / 8 + 1; elfaces.Elem(i) = faces.Get(elnr)[i-1].fnr+1; } else { cerr << "GetElementFaces with orientation currently not supported" << endl; /* for (int i = 1; i <= nfa; i++) { elfaces.Elem(i) = (faces.Get(elnr)[i-1]-1) / 8 + 1; int orient = (faces.Get(elnr)[i-1]-1) % 8; if(orient == 1 || orient == 2 || orient == 4 || orient == 7) elfaces.Elem(i) *= -1; } */ } } void MeshTopology :: GetElementEdgeOrientations (int elnr, Array & eorient) const { int ned = GetNEdges (mesh->VolumeElement(elnr).GetType()); eorient.SetSize (ned); for (int i = 1; i <= ned; i++) // eorient.Elem(i) = (edges.Get(elnr)[i-1] > 0) ? 1 : -1; // eorient.Elem(i) = (edges.Get(elnr)[i-1].orient) ? -1 : 1; eorient.Elem(i) = GetElementEdgeOrientation (elnr, i-1) ? -1 : 1; } void MeshTopology :: GetElementFaceOrientations (int elnr, Array & forient) const { int nfa = GetNFaces (mesh->VolumeElement(elnr).GetType()); forient.SetSize (nfa); for (int i = 1; i <= nfa; i++) // forient.Elem(i) = faces.Get(elnr)[i-1].forient; // forient.Elem(i) = (faces.Get(elnr)[i-1]-1) % 8; forient.Elem(i) = GetElementFaceOrientation(elnr, i-1); } int MeshTopology :: GetElementEdges (int elnr, int * eledges, int * orient) const { // int ned = GetNEdges (mesh.VolumeElement(elnr).GetType()); if (mesh->GetDimension()==3 || 1) { if (orient) { for (int i = 0; i < 12; i++) { /* if (!edges.Get(elnr)[i]) return i; eledges[i] = abs (edges.Get(elnr)[i]); orient[i] = (edges.Get(elnr)[i] > 0 ) ? 1 : -1; */ if (edges.Get(elnr)[i].nr == -1) return i; eledges[i] = edges.Get(elnr)[i].nr+1; // orient[i] = edges.Get(elnr)[i].orient ? -1 : 1; orient[i] = GetElementEdgeOrientation(elnr, i) ? -1 : 1; } } else { for (int i = 0; i < 12; i++) { // if (!edges.Get(elnr)[i]) return i; // eledges[i] = abs (edges.Get(elnr)[i]); if (edges.Get(elnr)[i].nr == -1) return i; eledges[i] = edges.Get(elnr)[i].nr+1; } } return 12; } else { throw NgException("rethink implementation"); /* if (orient) { for (i = 0; i < 4; i++) { if (!surfedges.Get(elnr)[i]) return i; eledges[i] = abs (surfedges.Get(elnr)[i]); orient[i] = (surfedges.Get(elnr)[i] > 0 ) ? 1 : -1; } } else { if (!surfedges.Get(elnr)[i]) return i; for (i = 0; i < 4; i++) eledges[i] = abs (surfedges.Get(elnr)[i]); } */ return 4; // return GetSurfaceElementEdges (elnr, eledges, orient); } } int MeshTopology :: GetElementFaces (int elnr, int * elfaces, int * orient) const { // int nfa = GetNFaces (mesh.VolumeElement(elnr).GetType()); if (orient) { for (int i = 0; i < 6; i++) { /* if (!faces.Get(elnr)[i]) return i; elfaces[i] = (faces.Get(elnr)[i]-1) / 8 + 1; orient[i] = (faces.Get(elnr)[i]-1) % 8; */ if (faces.Get(elnr)[i].fnr == -1) return i; elfaces[i] = faces.Get(elnr)[i].fnr+1; // orient[i] = faces.Get(elnr)[i].forient; orient[i] = GetElementFaceOrientation (elnr, i); } } else { for (int i = 0; i < 6; i++) { // if (!faces.Get(elnr)[i]) return i; // elfaces[i] = (faces.Get(elnr)[i]-1) / 8 + 1; if (faces.Get(elnr)[i].fnr == -1) return i; elfaces[i] = faces.Get(elnr)[i].fnr+1; } } return 6; } void MeshTopology :: GetSurfaceElementEdges (int elnr, Array & eledges) const { int ned = GetNEdges (mesh->SurfaceElement(elnr).GetType()); eledges.SetSize (ned); for (int i = 0; i < ned; i++) // eledges[i] = abs (surfedges.Get(elnr)[i]); eledges[i] = surfedges.Get(elnr)[i].nr+1; } void MeshTopology :: GetEdges (SurfaceElementIndex elnr, Array & eledges) const { int ned = GetNEdges ( (*mesh)[elnr].GetType()); eledges.SetSize (ned); for (int i = 0; i < ned; i++) // eledges[i] = abs (surfedges[elnr][i])-1; eledges[i] = surfedges[elnr][i].nr; } int MeshTopology :: GetSurfaceElementFace (int elnr) const { return surffaces.Get(elnr).fnr+1; } /* int MeshTopology :: GetFace (SurfaceElementIndex elnr) const { return surffaces[elnr].fnr; } */ void MeshTopology :: GetSurfaceElementEdgeOrientations (int elnr, Array & eorient) const { int ned = GetNEdges (mesh->SurfaceElement(elnr).GetType()); eorient.SetSize (ned); for (int i = 0; i < ned; i++) // eorient[i] = (surfedges.Get(elnr)[i] > 0) ? 1 : -1; // eorient[i] = (surfedges.Get(elnr)[i].orient) ? -1 : 1; eorient[i] = GetSurfaceElementEdgeOrientation(elnr, i) ? -1 : 1; } int MeshTopology :: GetSurfaceElementFaceOrientation (int elnr) const { // return (surffaces.Get(elnr)-1) % 8; // return surffaces.Get(elnr).forient; return GetSurfaceElementFaceOrientation2(elnr); } int MeshTopology :: GetSurfaceElementEdges (int elnr, int * eledges, int * orient) const { int i; if (mesh->GetDimension() == 3 || 1) { if (orient) { for (i = 0; i < 4; i++) { /* if (!surfedges.Get(elnr)[i]) return i; eledges[i] = abs (surfedges.Get(elnr)[i]); orient[i] = (surfedges.Get(elnr)[i] > 0 ) ? 1 : -1; */ if (surfedges.Get(elnr)[i].nr == -1) return i; eledges[i] = surfedges.Get(elnr)[i].nr+1; // orient[i] = (surfedges.Get(elnr)[i].orient) ? -1 : 1; orient[i] = GetSurfaceElementEdgeOrientation(elnr, i) ? -1 : 1; } } else { for (i = 0; i < 4; i++) { /* if (!surfedges.Get(elnr)[i]) return i; eledges[i] = abs (surfedges.Get(elnr)[i]); */ if (surfedges.Get(elnr)[i].nr == -1) return i; eledges[i] = surfedges.Get(elnr)[i].nr+1; } } return 4; } else { /* eledges[0] = abs (segedges.Get(elnr)); if (orient) orient[0] = segedges.Get(elnr) > 0 ? 1 : -1; */ eledges[0] = segedges.Get(elnr).nr+1; if (orient) // orient[0] = segedges.Get(elnr).orient ? -1 : 1; orient[0] = GetSegmentEdgeOrientation(elnr) ? -1 : 1; } return 1; } int MeshTopology :: GetElementEdgeOrientation (int elnr, int locedgenr) const { const Element & el = mesh->VolumeElement (elnr); const ELEMENT_EDGE * eledges = MeshTopology::GetEdges0 (el.GetType()); int k = locedgenr; INDEX_2 edge(el[eledges[k][0]], el[eledges[k][1]]); int edgedir = (edge.I1() > edge.I2()); return edgedir; } int MeshTopology :: GetElementFaceOrientation (int elnr, int locfacenr) const { const Element & el = mesh->VolumeElement (elnr); const ELEMENT_FACE * elfaces = MeshTopology::GetFaces0 (el.GetType()); int j = locfacenr; if (elfaces[j][3] < 0) { // triangle INDEX_4 face(el[elfaces[j][0]], el[elfaces[j][1]], el[elfaces[j][2]], 0); int facedir = 0; if (face.I1() > face.I2()) { swap (face.I1(), face.I2()); facedir += 1; } if (face.I2() > face.I3()) { swap (face.I2(), face.I3()); facedir += 2; } if (face.I1() > face.I2()) { swap (face.I1(), face.I2()); facedir += 4; } return facedir; } else { // quad // int facenum; INDEX_4 face4(el[elfaces[j][0]], el[elfaces[j][1]], el[elfaces[j][2]], el[elfaces[j][3]]); int facedir = 0; if (min2 (face4.I1(), face4.I2()) > min2 (face4.I4(), face4.I3())) { // z - flip facedir += 1; swap (face4.I1(), face4.I4()); swap (face4.I2(), face4.I3()); } if (min2 (face4.I1(), face4.I4()) > min2 (face4.I2(), face4.I3())) { // x - flip facedir += 2; swap (face4.I1(), face4.I2()); swap (face4.I3(), face4.I4()); } if (face4.I2() > face4.I4()) { // diagonal flip facedir += 4; swap (face4.I2(), face4.I4()); } return facedir; } } int MeshTopology :: GetSurfaceElementEdgeOrientation (int elnr, int locedgenr) const { const Element2d & el = mesh->SurfaceElement (elnr); const ELEMENT_EDGE * eledges = MeshTopology::GetEdges0 (el.GetType()); int k = locedgenr; INDEX_2 edge(el[eledges[k][0]], el[eledges[k][1]]); int edgedir = (edge.I1() > edge.I2()); return edgedir; } int MeshTopology :: GetSurfaceElementFaceOrientation2 (int elnr) const { const Element2d & el = mesh->SurfaceElement (elnr); const ELEMENT_FACE * elfaces = MeshTopology::GetFaces0 (el.GetType()); int j = 0; if (elfaces[j][3] < 0) { // triangle INDEX_4 face(el[elfaces[j][0]], el[elfaces[j][1]], el[elfaces[j][2]], 0); int facedir = 0; if (face.I1() > face.I2()) { swap (face.I1(), face.I2()); facedir += 1; } if (face.I2() > face.I3()) { swap (face.I2(), face.I3()); facedir += 2; } if (face.I1() > face.I2()) { swap (face.I1(), face.I2()); facedir += 4; } return facedir; } else { // quad // int facenum; INDEX_4 face4(el[elfaces[j][0]], el[elfaces[j][1]], el[elfaces[j][2]], el[elfaces[j][3]]); int facedir = 0; if (min2 (face4.I1(), face4.I2()) > min2 (face4.I4(), face4.I3())) { // z - flip facedir += 1; swap (face4.I1(), face4.I4()); swap (face4.I2(), face4.I3()); } if (min2 (face4.I1(), face4.I4()) > min2 (face4.I2(), face4.I3())) { // x - flip facedir += 2; swap (face4.I1(), face4.I2()); swap (face4.I3(), face4.I4()); } if (face4.I2() > face4.I4()) { // diagonal flip facedir += 4; swap (face4.I2(), face4.I4()); } return facedir; } } int MeshTopology :: GetSegmentEdgeOrientation (int elnr) const { const Segment & el = mesh->LineSegment (elnr); const ELEMENT_EDGE * eledges = MeshTopology::GetEdges0 (el.GetType()); int k = 0; INDEX_2 edge(el[eledges[k][0]], el[eledges[k][1]]); int edgedir = (edge.I1() > edge.I2()); return edgedir; } void MeshTopology :: GetFaceVertices (int fnr, Array & vertices) const { vertices.SetSize(4); for (int i = 0; i < 4; i++) vertices[i] = face2vert.Get(fnr)[i]; if (vertices[3] == 0) vertices.SetSize(3); } void MeshTopology :: GetFaceVertices (int fnr, int * vertices) const { for (int i = 0; i <= 3; i++) vertices[i] = face2vert.Get(fnr)[i]; } void MeshTopology :: GetEdgeVertices (int ednr, int & v1, int & v2) const { // cout << "id = " << id << "getedgevertices, ednr = " << ednr << ", ned = " << edge2vert.Size() << "&v1 = " << &v1 << endl; if (ednr < 1 || ednr > edge2vert.Size()) cerr << "illegal edge nr: " << ednr << ", numedges = " << edge2vert.Size() << " id = " << id << endl; v1 = edge2vert.Get(ednr)[0]; v2 = edge2vert.Get(ednr)[1]; } void MeshTopology :: GetEdgeVertices (int ednr, PointIndex & v1, PointIndex & v2) const { v1 = edge2vert.Get(ednr)[0]; v2 = edge2vert.Get(ednr)[1]; } void MeshTopology :: GetFaceEdges (int fnr, Array & fedges, bool withorientation) const { ArrayMem pi(4); ArrayMem eledges; fedges.SetSize (0); GetFaceVertices(fnr, pi); // Sort Edges according to global vertex numbers // e1 = fmax, f2 // e2 = fmax, f1 // e3 = op e1(f2,f3) // e4 = op e2(f1,f3) /* ArrayMem fp; fp[0] = pi[0]; for(int k=1;kfp[0]) swap(fp[k],fp[0]); fp[1] = fp[0]+ */ // GetVertexElements (pi[0], els); FlatArray els = GetVertexElements (pi[0]); // find one element having all vertices of the face for (int i = 0; i < els.Size(); i++) { const Element & el = (*mesh)[els[i]]; int nref_faces = GetNFaces (el.GetType()); const ELEMENT_FACE * ref_faces = GetFaces1 (el.GetType()); int nfa_ref_edges = GetNEdges (GetFaceType(fnr)); int cntv = 0,fa=-1; for(int m=0;m0;j++) for(int k=0;k=0) { const ELEMENT_EDGE * fa_ref_edges = GetEdges1 (GetFaceType(fnr)); fedges.SetSize(nfa_ref_edges); GetElementEdges (els[i]+1, eledges); for (int j = 0; j < eledges.Size(); j++) { int vi1, vi2; GetEdgeVertices (eledges[j], vi1, vi2); bool has1 = 0; bool has2 = 0; for (int k = 0; k < pi.Size(); k++) { if (vi1 == pi[k]) has1 = 1; if (vi2 == pi[k]) has2 = 1; } if (has1 && has2) // eledges[j] is on face { // fedges.Append (eledges[j]); for(int k=0;k & elements) const { if (vert2element.Size()) { int ne = vert2element.EntrySize(vnr); elements.SetSize(ne); for (int i = 1; i <= ne; i++) elements.Elem(i) = vert2element.Get(vnr, i); } } /* FlatArray MeshTopology :: GetVertexElements (int vnr) const { if (vert2element) return (*vert2element)[vnr]; return FlatArray (0,0); } FlatArray MeshTopology :: GetVertexSurfaceElements (int vnr) const { if (vert2surfelement) return (*vert2surfelement)[vnr]; return FlatArray (0,0); } FlatArray MeshTopology :: GetVertexSegments (int vnr) const { if (vert2segment) return (*vert2segment)[vnr]; return FlatArray (0,0); } */ void MeshTopology :: GetVertexSurfaceElements( int vnr, Array & elements ) const { if (vert2surfelement.Size()) { int i; int ne = vert2surfelement.EntrySize(vnr); elements.SetSize(ne); for (i = 1; i <= ne; i++) elements.Elem(i) = vert2surfelement.Get(vnr, i); } } int MeshTopology :: GetVerticesEdge ( int v1, int v2 ) const { Array elements_v1; Array elementedges; GetVertexElements ( v1, elements_v1); int edv1, edv2; for ( int i = 0; i < elements_v1.Size(); i++ ) { GetElementEdges( elements_v1[i]+1, elementedges ); for ( int ed = 0; ed < elementedges.Size(); ed ++) { GetEdgeVertices( elementedges[ed], edv1, edv2 ); if ( ( edv1 == v1 && edv2 == v2 ) || ( edv1 == v2 && edv2 == v1 ) ) return elementedges[ed]; } } return -1; } void MeshTopology :: GetSegmentVolumeElements ( int segnr, Array & volels ) const { int v1, v2; GetEdgeVertices ( GetSegmentEdge (segnr), v1, v2 ); Array volels1, volels2; GetVertexElements ( v1, volels1 ); GetVertexElements ( v2, volels2 ); volels.SetSize(0); for ( int eli1=1; eli1 <= volels1.Size(); eli1++) if ( volels2.Contains( volels1.Elem(eli1) ) ) volels.Append ( volels1.Elem(eli1) ); } void MeshTopology :: GetSegmentSurfaceElements (int segnr, Array & els) const { int v1, v2; GetEdgeVertices ( GetSegmentEdge (segnr), v1, v2 ); Array els1, els2; GetVertexSurfaceElements ( v1, els1 ); GetVertexSurfaceElements ( v2, els2 ); els.SetSize(0); for ( int eli1=1; eli1 <= els1.Size(); eli1++) if ( els2.Contains( els1.Elem(eli1) ) ) els.Append ( els1.Elem(eli1) ); } } netgen-6.2.1804/libsrc/meshing/global.cpp0000644000175000017500000000414213272137567016662 0ustar kurtkurt#include #include "meshing.hpp" namespace netgen { class TraceGlobal { string name; public: TraceGlobal(string _name) : name(_name) { cout << "init global " << name << endl; } ~TraceGlobal() { cout << "exit global " << name << endl; } }; // stringstream emptystr; // ostream * testout = &emptystr; // testout -> clear(ios::failbit); // ostream * testout = &cout; ostream * testout = new ostream(0); // NetgenOutStream * testout = new NetgenOutStream; ostream * mycout = &cout; ostream * myerr = &cerr; // some functions (visualization) still need a global mesh // TraceGlobal glob1("global1"); DLL_HEADER shared_ptr mesh; DLL_HEADER shared_ptr ng_geometry; // TraceGlobal glob2("global2"); weak_ptr global_mesh; void SetGlobalMesh (shared_ptr m) { PrintMessage(5, "set global mesh"); global_mesh = m; } // true if netgen was started using the netgen executable // false if netgen.gui was imported from python DLL_HEADER bool netgen_executable_started = false; // Flags parameters; int silentflag = 0; int testmode = 0; volatile multithreadt multithread; string ngdir = "."; // parallel netgen int id = 0, ntasks = 1; void Ng_PrintDest(const char * s) { if (id == 0) (*mycout) << s << flush; } DLL_HEADER void MyError(const char * ch) { cout << ch; (*testout) << "Error !!! " << ch << endl << flush; } static clock_t starttimea; void ResetTime () { starttimea = clock(); } double GetTime () { return double(clock() - starttimea) / CLOCKS_PER_SEC; } Array tets_in_qualclass; mutex tcl_todo_mutex; int h_argc = 0; char ** h_argv = NULL; multithreadt :: multithreadt() { pause =0; testmode = 0; redraw = 0; drawing = 0; terminate = 0; running = 0; percent = 0; task = ""; } DebugParameters debugparam; bool verbose = 0; size_t timestamp = 0; /* int GetTimeStamp() { return timestamp; } int NextTimeStamp() { timestamp++; return timestamp; } */ } netgen-6.2.1804/libsrc/meshing/triarls.cpp0000644000175000017500000001737313272137567017114 0ustar kurtkurtnamespace netgen { const char * triarules[] = { "rule \"Free Triangle (1)\"\n",\ "\n",\ "quality 1\n",\ "\n",\ "mappoints\n",\ "(0, 0);\n",\ "(1, 0) { 1.0, 0, 1.0 };\n",\ "\n",\ "maplines\n",\ "(1, 2) del;\n",\ "\n",\ "newpoints\n",\ "(0.5, 0.866) { 0.5 X2 } { };\n",\ "\n",\ "newlines\n",\ "(1, 3);\n",\ "(3, 2);\n",\ "\n",\ "freearea\n",\ "(0, 0);\n",\ "(1, 0) { 1 X2 } { };\n",\ "(1.5, 0.7) { 0.5 X2 } { };\n",\ "(0.5, 1.5) { 0.5 X2 } { };\n",\ "(-0.5, 0.7) { 0.5 X2 } { };\n",\ "\n",\ "freearea2\n",\ "(0, 0);\n",\ "(1, 0) { 1 X2 } { };\n",\ "(0.5, 0.866) { 0.5 X2 } { };\n",\ "(0.5, 0.866) { 0.5 X2 } { };\n",\ "(0.5, 0.866) { 0.5 X2 } { };\n",\ "\n",\ "\n",\ "elements\n",\ "(1, 2, 3);\n",\ "\n",\ "endrule\n",\ "\n",\ "\n",\ "rule \"Free Triangle (5)\"\n",\ "\n",\ "quality 5\n",\ "\n",\ "mappoints\n",\ "(0, 0);\n",\ "(1, 0) { 1.0, 0, 1.0 };\n",\ "\n",\ "maplines\n",\ "(1, 2) del;\n",\ "\n",\ "newpoints\n",\ "(0.5, 0.5) { 0.5 X2 } { };\n",\ "\n",\ "newlines\n",\ "(1, 3);\n",\ "(3, 2);\n",\ "\n",\ "freearea\n",\ "(0, 0);\n",\ "(1, 0) { 1 X2 } { };\n",\ "(1, 0.7) { 1 X2 } { };\n",\ "(0, 0.7) { } { };\n",\ "\n",\ "freearea2\n",\ "(0, 0);\n",\ "(1, 0) { 1 X2 } { };\n",\ "(0.5, 0.5) { 0.5 X2 } { };\n",\ "(0.5, 0.5) { 0.5 X2 } { };\n",\ "\n",\ "\n",\ "elements\n",\ "(1, 2, 3);\n",\ "\n",\ "endrule\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "rule \"Free Triangle (10)\"\n",\ "\n",\ "quality 10\n",\ "\n",\ "mappoints\n",\ "(0, 0);\n",\ "(1, 0) { 1.0, 0, 1.0 };\n",\ "\n",\ "maplines\n",\ "(1, 2) del;\n",\ "\n",\ "newpoints\n",\ "(0.5, 0.3) { 0.5 X2 } { };\n",\ "\n",\ "newlines\n",\ "(1, 3);\n",\ "(3, 2);\n",\ "\n",\ "freearea\n",\ "(0, 0);\n",\ "(1, 0) { 1 X2 } { };\n",\ "(1, 0.5) { 1 X2 } { };\n",\ "(0, 0.5) { } { };\n",\ "\n",\ "freearea2\n",\ "(0, 0);\n",\ "(1, 0) { 1 X2 } { };\n",\ "(0.5, 0.3) { 0.5 X2 } { };\n",\ "(0.5, 0.3) { 0.5 X2 } { };\n",\ "\n",\ "\n",\ "elements\n",\ "(1, 2, 3);\n",\ "\n",\ "endrule\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "rule \"Free Triangle (20)\"\n",\ "\n",\ "quality 20\n",\ "\n",\ "mappoints\n",\ "(0, 0);\n",\ "(1, 0) { 1.0, 0, 1.0 };\n",\ "\n",\ "maplines\n",\ "(1, 2) del;\n",\ "\n",\ "newpoints\n",\ "(0.5, 0.1) { 0.5 X2 } { };\n",\ "\n",\ "newlines\n",\ "(1, 3);\n",\ "(3, 2);\n",\ "\n",\ "freearea\n",\ "(0, 0);\n",\ "(1, 0) { 1 X2 } { };\n",\ "(1, 0.2) { 1 X2 } { };\n",\ "(0, 0.2) { } { };\n",\ "\n",\ "freearea2\n",\ "(0, 0);\n",\ "(1, 0) { 1 X2 } { };\n",\ "(0.5, 0.1) { 0.5 X2 } { };\n",\ "(0.5, 0.1) { 0.5 X2 } { };\n",\ "\n",\ "\n",\ "elements\n",\ "(1, 2, 3);\n",\ "\n",\ "endrule\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "rule \"Right 60 (1)\"\n",\ "\n",\ "quality 1\n",\ "\n",\ "mappoints\n",\ "(0, 0);\n",\ "(1, 0) { 0.5, 0, 1.0 };\n",\ "(0.5, 0.866) { 0.6, 0, 0.8 };\n",\ "\n",\ "maplines\n",\ "(1, 2) del;\n",\ "(2, 3) del;\n",\ "\n",\ "newpoints\n",\ "\n",\ "newlines\n",\ "(1, 3);\n",\ "\n",\ "freearea\n",\ "(0, 0);\n",\ "(1, 0) { 1 X2 } { };\n",\ "(0.5, 0.866) { 1 X3 } { 1 Y3 };\n",\ "(-0.125, 0.6495) { -0.5 X2, 0.75 X3 } { -0.5 Y2, 0.75 Y3 };\n",\ "\n",\ "freearea2\n",\ "(0, 0);\n",\ "(1, 0) { 1 X2 } { };\n",\ "(0.5, 0.866) { 1 X3 } { 1 Y3 };\n",\ "(0.25, 0.433) { 0.5 X3 } { 0.5 Y3 };\n",\ "\n",\ "elements\n",\ "(1, 2, 3);\n",\ "\n",\ "endrule\n",\ "\n",\ "\n",\ "\n",\ "rule \"Left 60 (1)\"\n",\ "\n",\ "quality 1\n",\ "\n",\ "mappoints\n",\ "(0, 0);\n",\ "(1, 0);\n",\ "(0.5, 0.866);\n",\ "\n",\ "maplines\n",\ "(1, 2) del;\n",\ "(3, 1) del;\n",\ "\n",\ "newpoints\n",\ "\n",\ "newlines\n",\ "(3, 2);\n",\ "\n",\ "freearea\n",\ "(0, 0);\n",\ "(1, 0) { 1 X2 } { };\n",\ "(1.125, 0.6495) { 0.75 X2, 0.75 X3 } { 0.75 Y3 };\n",\ "(0.5, 0.866) { 1 X3 } { 1 Y3 };\n",\ "\n",\ "freearea2\n",\ "(0, 0);\n",\ "(1, 0) { 1 X2 } { };\n",\ "(0.75, 0.433) { 0.5 X2, 0.5 X3 } { 0.5 Y2, 0.5 Y3 };\n",\ "(0.5, 0.866) { 1 X3 } { 1 Y3 };\n",\ "\n",\ "elements\n",\ "(1, 2, 3);\n",\ "\n",\ "endrule\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "rule \"Right 120 (1)\"\n",\ "\n",\ "quality 1\n",\ "\n",\ "mappoints\n",\ "(0, 0);\n",\ "(1, 0);\n",\ "(1.5, 0.866);\n",\ "\n",\ "maplines\n",\ "(1, 2) del;\n",\ "(2, 3) del;\n",\ "\n",\ "newpoints\n",\ "(0.5, 0.866) { 1 X3, -1 X2 } { 1 Y3 };\n",\ "\n",\ "newlines\n",\ "(1, 4);\n",\ "(4, 3);\n",\ "\n",\ "freearea\n",\ "(0, 0);\n",\ "(1, 0) { 1 X2 } { };\n",\ "(1.5, 0.866) { 1 X3 } { 1 Y3 };\n",\ "(1, 1.732) { -2 X2, 2 X3 } { 2 Y3 };\n",\ "(0, 1.732) { -3 X2, 2 X3 } { 2 Y3 };\n",\ "(-0.5, 0.866) { -2 X2, 1 X3 } {1 Y3 };\n",\ "\n",\ "elements\n",\ "(1, 2, 4);\n",\ "(2, 3, 4);\n",\ "\n",\ "endrule\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "rule \"Left 120 (1)\"\n",\ "\n",\ "quality 1\n",\ "\n",\ "mappoints\n",\ "(0, 0);\n",\ "(1, 0);\n",\ "(-0.5, 0.866);\n",\ "\n",\ "maplines\n",\ "(1, 2) del;\n",\ "(3, 1) del;\n",\ "\n",\ "newpoints\n",\ "(0.5, 0.866) { 1 X3, 1 X2 } { 1 Y3 };\n",\ "\n",\ "newlines\n",\ "(3, 4);\n",\ "(4, 2);\n",\ "\n",\ "freearea\n",\ "(0, 0);\n",\ "(1, 0) { 1 X2 } { };\n",\ "(1.5, 0.866) { 2 X2, 1 X3 } { 1 Y3 };\n",\ "(1, 1.732) { 2 X2, 2 X3 } { 2 Y3 };\n",\ "(0, 1.732) { 1 X2, 2 X3 } { 2 Y3 };\n",\ "(-0.5, 0.866) { 1 X3 } {1 Y3 };\n",\ "\n",\ "elements\n",\ "(1, 2, 4);\n",\ "(1, 4, 3);\n",\ "\n",\ "endrule\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "rule \"Left Right 120 (1)\"\n",\ "\n",\ "quality 1\n",\ "\n",\ "mappoints\n",\ "(0, 0);\n",\ "(1, 0);\n",\ "(-0.5, 0.866);\n",\ "(1.5, 0.866);\n",\ "\n",\ "maplines\n",\ "(1, 2) del;\n",\ "(3, 1) del;\n",\ "(2, 4) del;\n",\ "\n",\ "newpoints\n",\ "(0.5, 0.866) { 0.5 X3, 0.5 X4 } { 0.5 Y3, 0.5 Y4 };\n",\ "\n",\ "newlines\n",\ "(3, 5);\n",\ "(5, 4);\n",\ "\n",\ "freearea\n",\ "(0, 0);\n",\ "(1, 0) { 1 X2 } { };\n",\ "(1.5, 0.866) { 1 X4 } { 1 Y4 };\n",\ "(1, 1.299) { -0.5 X2, 0.375 X3, 1.125 X4 } { -0.5 Y2, 0.375 Y3, 1.125 Y4 };\n",\ "(0, 1.299) { 1.125 X3, 0.375 X4 } { 1.125 Y3, 0.375 Y4 };\n",\ "(-0.5, 0.866) { 1 X3 } { 1 Y3 };\n",\ "\n",\ "elements\n",\ "(1, 2, 5);\n",\ "(3, 1, 5);\n",\ "(2, 4, 5);\n",\ "\n",\ "endrule\n",\ "\n",\ "\n",\ "rule \"Fill Triangle\"\n",\ "\n",\ "quality 1\n",\ "\n",\ "mappoints\n",\ "(0, 0);\n",\ "(1, 0);\n",\ "(0.5, 0.866);\n",\ "\n",\ "maplines\n",\ "(1, 2) del;\n",\ "(2, 3) del;\n",\ "(3, 1) del;\n",\ "\n",\ "newpoints\n",\ "\n",\ "newlines\n",\ "\n",\ "freearea\n",\ "(0, 0);\n",\ "(1, 0) { 1 X2 } { 1 Y2 };\n",\ "(0.5, 0.866) { 1 X3 } { 1 Y3 };\n",\ "\n",\ "elements\n",\ "(1, 2, 3);\n",\ "\n",\ "endrule\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "rule \"Vis A Vis (1)\"\n",\ "\n",\ "quality 1\n",\ "\n",\ "mappoints\n",\ "(0, 0);\n",\ "(1, 0);\n",\ "(0.5, 0.866);\n",\ "\n",\ "maplines\n",\ "(1, 2) del;\n",\ "\n",\ "newpoints\n",\ "\n",\ "newlines\n",\ "(1, 3);\n",\ "(3, 2);\n",\ "\n",\ "freearea\n",\ "(0, 0);\n",\ "(1, 0) { 1 X2 } { };\n",\ "(1.2, 0.693) { 0.8 X2, 0.8 X3 } { 0.8 Y2, 0.8 Y3 };\n",\ "(0.5, 0.866) { 1 X3 } { 1 Y3 };\n",\ "(-0.2, 0.693) { -0.6 X2, 0.8 X3 } { -0.6 Y2, 0.8 Y3 };\n",\ "\n",\ "freearea2\n",\ "(0, 0);\n",\ "(1, 0) { 1 X2 } { };\n",\ "(0.75, 0.433) { 0.5 X2, 0.5 X3 } { 0.5 Y2, 0.5 Y3 };\n",\ "(0.5, 0.866) { 1 X3 } { 1 Y3 };\n",\ "(0.25, 0.433) { 0.5 X3 } { 0.5 Y3 };\n",\ "\n",\ "elements\n",\ "(1, 2, 3);\n",\ "\n",\ "endrule\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "rule \"2 h Vis A Vis (1)\"\n",\ "\n",\ "quality 3\n",\ "\n",\ "mappoints\n",\ "(0, 0);\n",\ "(1, 0);\n",\ "(1, 1.732);\n",\ "(0, 1.732);\n",\ "\n",\ "maplines\n",\ "(1, 2) del;\n",\ "(3, 4) del;\n",\ "\n",\ "newpoints\n",\ "(0.5, 0.866) { 0.25 X2, 0.25 X3, 0.25 X4 } { 0.25 Y2, 0.25 Y3, 0.25 Y4 };\n",\ "\n",\ "newlines\n",\ "(1, 5);\n",\ "(5, 4);\n",\ "(3, 5);\n",\ "(5, 2);\n",\ "\n",\ "freearea\n",\ "(0, 0);\n",\ "(1, 0) { 1 X2 } { 1 Y2 };\n",\ "(1.5, 0.866) { 0.75 X2, 0.75 X3, -0.25 X4 } { 0.75 Y2, 0.75 Y3, -0.25 Y4 };\n",\ "(1, 1.732) { 1 X3 } { 1 Y3 };\n",\ "(0, 1.732) { 1 X4 } { 1 Y4 };\n",\ "(-0.5, 0.866) { 0.75 X4, -0.25 X2, -0.25 X3 } { 0.75 Y4, -0.25 Y3 };\n",\ "\n",\ "elements\n",\ "(1, 2, 5);\n",\ "(3, 4, 5);\n",\ "\n",\ "endrule\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ 0}; } netgen-6.2.1804/libsrc/meshing/hprefinement.cpp0000644000175000017500000015125413272137567020115 0ustar kurtkurt#include #include "meshing.hpp" #include "hprefinement.hpp" namespace netgen { #include "hpref_segm.hpp" #include "hpref_trig.hpp" #include "hpref_quad.hpp" #include "hpref_tet.hpp" #include "hpref_prism.hpp" #include "hpref_hex.hpp" #include "hpref_pyramid.hpp" #include "classifyhpel.hpp" void HPRefElement :: Reset(void) { np = 8; for (int i = 0; i < 8; i++) { pnums[i] = -1; param[i][0] = param[i][1] = param[i][2] = 0; domin=-1; domout=-1; // he: } } HPRefElement :: HPRefElement () { Reset(); } HPRefElement :: HPRefElement(Element & el) { //Reset(); np = el.GetNV(); for (int i=0; igeom == HP_TET) hps = &reftet; if (hps->geom == HP_TRIG) hps = &reftrig; } */ if (!hps) { cout << "Attention hps : hp-refinement not implemented for case " << type << endl; PrintSysError ("hp-refinement not implemented for case ", type); } return hps; } bool CheckSingularities(Mesh & mesh, INDEX_2_HASHTABLE & edges, INDEX_2_HASHTABLE & edgepoiclt_dom, BitArray & cornerpoint, BitArray & edgepoint, INDEX_3_HASHTABLE & faces, INDEX_2_HASHTABLE & face_edges, INDEX_2_HASHTABLE & surf_edges, Array & facepoint, int & levels, int & act_ref); bool ClassifyHPElements (Mesh & mesh, Array & elements, int & act_ref, int & levels); void InitHPElements(Mesh & mesh, Array & elements) { for(ElementIndex i = 0; i < mesh.GetNE(); i++) { HPRefElement hpel(mesh[i]); hpel.coarse_elnr = i; switch (mesh[i].GetType()) { case PRISM: hpel.type = HP_PRISM; break; case HEX: hpel.type = HP_HEX; break; case TET: hpel.type = HP_TET; break; case PYRAMID: hpel.type = HP_PYRAMID; break; default: cerr << "HPRefElement: illegal elementtype (1) " << mesh[i].GetType() << endl; throw NgException ("HPRefElement: illegal elementtype (1)"); } elements.Append(hpel); } for(SurfaceElementIndex i = 0; i < mesh.GetNSE(); i++) { HPRefElement hpel(mesh[i]); hpel.coarse_elnr = i; switch(mesh[i].GetType()) { case TRIG: hpel.type = HP_TRIG; break; case QUAD: hpel.type = HP_QUAD; break; default: cerr << "HPRefElement: illegal elementtype (1b) " << mesh[i].GetType() << endl; throw NgException ("HPRefElement: illegal elementtype (1b)"); } elements.Append(hpel); } for(SegmentIndex i = 0; i < mesh.GetNSeg(); i++) { Segment & seg = mesh[i]; HPRefElement hpel(mesh[i]); hpel.coarse_elnr = i; hpel.type = HP_SEGM; hpel.index = seg.edgenr + 10000*seg.si; if(seg.edgenr >= 10000) { throw NgException("assumption that seg.edgenr < 10000 is wrong"); } elements.Append(hpel); } } /* ******************************* DoRefinement *************************************** */ void DoRefinement (Mesh & mesh, Array & elements, Refinement * ref, double fac1) { elements.SetAllocSize (5 * elements.Size()); INDEX_2_HASHTABLE newpts(elements.Size()+1); INDEX_3_HASHTABLE newfacepts(elements.Size()+1); // prepare new points fac1 = max(0.001,min(0.33,fac1)); cout << " in HP-REFINEMENT with fac1 " << fac1 << endl; *testout << " in HP-REFINEMENT with fac1 " << fac1 << endl; int oldelsize = elements.Size(); for (int i = 0; i < oldelsize; i++) { HPRefElement & el = elements[i]; HPRef_Struct * hprs = Get_HPRef_Struct (el.type); if (!hprs) { cout << "Refinementstruct not defined for element " << el.type << endl; continue; } int j = 0; while (hprs->splitedges[j][0]) { INDEX_2 i2(el.pnums[hprs->splitedges[j][0]-1], el.pnums[hprs->splitedges[j][1]-1]); if (!newpts.Used (i2)) { Point<3> np; for( int l=0;l<3;l++) np(l) = (1-fac1)*mesh.Point(i2.I1())(l) + fac1 * mesh.Point(i2.I2())(l); int npi = mesh.AddPoint (np); newpts.Set (i2, npi); } j++; } j = 0; if (hprs->splitfaces) while (hprs->splitfaces[j][0]) { INDEX_3 i3(el.pnums[hprs->splitfaces[j][0]-1], el.pnums[hprs->splitfaces[j][1]-1], el.pnums[hprs->splitfaces[j][2]-1]); if (i3.I2() > i3.I3()) Swap (i3.I2(), i3.I3()); if (!newfacepts.Used (i3)) { Point<3> np; for( int l=0;l<3;l++) np(l) = (1-2*fac1)*mesh.Point(i3.I1())(l) + fac1*mesh.Point(i3.I2())(l) + fac1*mesh.Point(i3.I3())(l); int npi = mesh.AddPoint (np); newfacepts.Set (i3, npi); } j++; } } for (int i = 0; i < oldelsize; i++) { HPRefElement el = elements[i]; HPRef_Struct * hprs = Get_HPRef_Struct (el.type); int newlevel = el.levelx + 1; int oldnp = 0; switch (hprs->geom) { case HP_SEGM: oldnp = 2; break; case HP_TRIG: oldnp = 3; break; case HP_QUAD: oldnp = 4; break; case HP_TET: oldnp = 4; break; case HP_PYRAMID: oldnp = 5; break; case HP_PRISM: oldnp = 6; break; case HP_HEX: oldnp = 8; break; default: cerr << "HPRefElement: illegal type (3) " << hprs->geom << endl; throw NgException ("HPRefElement::SetType: illegal type (3)"); } if (el.type == HP_SEGM || el.type == HP_TRIG || el.type == HP_QUAD || el.type == HP_TET || el.type == HP_PRISM || el.type == HP_HEX || el.type == HP_PYRAMID) newlevel = el.levelx; if (!hprs) continue; int newpnums[64]; double newparam[64][3]; int j; for (j = 0; j < oldnp; j++) { newpnums[j] = el.pnums[j]; for (int l = 0; l < 3; l++) newparam[j][l] = el.param[j][l]; } // split edges, incl. transferring curvature j = 0; while (hprs->splitedges[j][0]) { INDEX_2 i2(el.pnums[hprs->splitedges[j][0]-1], el.pnums[hprs->splitedges[j][1]-1]); int npi = newpts.Get(i2); newpnums[hprs->splitedges[j][2]-1] = npi; for (int l = 0; l < 3; l++) newparam[hprs->splitedges[j][2]-1][l] = (1-fac1) * el.param[hprs->splitedges[j][0]-1][l] + fac1 * el.param[hprs->splitedges[j][1]-1][l]; j++; } // split faces j = 0; if (hprs->splitfaces) while (hprs->splitfaces[j][0]) { INDEX_3 i3(el.pnums[hprs->splitfaces[j][0]-1], el.pnums[hprs->splitfaces[j][1]-1], el.pnums[hprs->splitfaces[j][2]-1]); if (i3.I2() > i3.I3()) Swap (i3.I2(), i3.I3()); int npi = newfacepts.Get(i3); newpnums[hprs->splitfaces[j][3]-1] = npi; for (int l = 0; l < 3; l++) newparam[hprs->splitfaces[j][3]-1][l] = (1-2*fac1) * el.param[hprs->splitfaces[j][0]-1][l] + fac1 * el.param[hprs->splitfaces[j][1]-1][l] + fac1 * el.param[hprs->splitfaces[j][2]-1][l]; j++; } // split elements j = 0; if (hprs->splitelements) while (hprs->splitelements[j][0]) { //int pi1 = el.pnums[hprs->splitelements[j][0]-1]; Point<3> np; for( int l=0;l<3;l++) np(l) = (1-3*fac1)* mesh.Point(el.pnums[hprs->splitelements[j][0]-1])(l) + fac1* mesh.Point(el.pnums[hprs->splitelements[j][1]-1])(l) + fac1* mesh.Point(el.pnums[hprs->splitelements[j][2]-1])(l) + fac1* mesh.Point(el.pnums[hprs->splitelements[j][3]-1])(l); int npi = mesh.AddPoint (np); newpnums[hprs->splitelements[j][4]-1] = npi; for (int l = 0; l < 3; l++) newparam[hprs->splitelements[j][4]-1][l] = (1-3*fac1) * el.param[hprs->splitelements[j][0]-1][l] + fac1 * el.param[hprs->splitelements[j][1]-1][l] + fac1 * el.param[hprs->splitelements[j][2]-1][l] + fac1 * el.param[hprs->splitelements[j][3]-1][l]; j++; } j = 0; /* *testout << " newpnums = "; for (int hi = 0; hi < 64; hi++) *testout << newpnums[hi] << " "; *testout << endl; */ while (hprs->neweltypes[j]) { HPRef_Struct * hprsnew = Get_HPRef_Struct (hprs->neweltypes[j]); HPRefElement newel(el); newel.type = hprs->neweltypes[j]; // newel.index = elements[i].index; // newel.coarse_elnr = elements[i].coarse_elnr; newel.levelx = newel.levely = newel.levelz = newlevel; switch(hprsnew->geom) { case HP_SEGM: newel.np=2; break; case HP_QUAD: newel.np=4; break; case HP_TRIG: newel.np=3; break; case HP_HEX: newel.np=8; break; case HP_PRISM: newel.np=6; break; case HP_TET: newel.np=4; break; case HP_PYRAMID: newel.np=5; break; default: throw NgException (string("hprefinement.cpp: illegal type")); } for (int k = 0; k < newel.np; k++) newel.pnums[k] = newpnums[hprs->newels[j][k]-1]; /* *testout << " newel pnums " ; for (int k = 0; k < newel.np; k++) *testout << newel.pnums[k] << "\t"; *testout << endl; */ for (int k = 0; k < newel.np; k++) { for (int l = 0; l < 3; l++) { newel.param[k][l] = newparam[hprs->newels[j][k]-1][l]; // *testout << newel.param[k][l] << " \t "; } // *testout << endl; } if (j == 0) elements[i] = newel; // overwrite old element else elements.Append (newel); j++; } } } /* ************************** DoRefineDummies ******************************** */ void DoRefineDummies (Mesh & mesh, Array & elements, Refinement * ref) { int oldelsize = elements.Size(); for (int i = 0; i < oldelsize; i++) { HPRefElement el = elements[i]; HPRef_Struct * hprs = Get_HPRef_Struct (el.type); if (!hprs) continue; if (el.type != HP_DUMMY_QUAD_SINGCORNER && el.type != HP_PYRAMID_EDGES && el.type != HP_PYRAMID_0E_1V && el.type != HP_HEX_0E_1V && el.type != HP_HEX_1E_1V && el.type != HP_HEX_1E_0V && el.type != HP_HEX_3E_0V ) continue; int newlevel = el.levelx; int newpnums[8]; int j; for (j = 0; j < 8; j++) newpnums[j] = el.pnums[j]; double newparam[8][3]; for (j = 0; j < 8; j++) for (int k = 0; k < 3; k++) newparam[j][k] = el.param[j][k]; j = 0; while (hprs->neweltypes[j]) { HPRef_Struct * hprsnew = Get_HPRef_Struct (hprs->neweltypes[j]); HPRefElement newel(el); switch(hprsnew->geom) { case HP_SEGM: newel.np=2; break; case HP_QUAD: newel.np=4; break; case HP_TRIG: newel.np=3; break; case HP_HEX: newel.np=8; break; case HP_PRISM: newel.np=6; break; case HP_TET: newel.np=4; break; case HP_PYRAMID: newel.np=5; break; default: cerr << "HPRefElement: illegal type (4) " << hprsnew->geom << endl; throw NgException ("HPRefElement: illegal type (4)"); } newel.type = hprs->neweltypes[j]; for (int k = 0; k < 8; k++) newel.pnums[k] = newpnums[hprs->newels[j][k]-1]; newel.index = el.index; newel.coarse_elnr = el.coarse_elnr; newel.levelx = newel.levely = newel.levelz = newlevel; for (int k = 0; k < 8; k++) for (int l = 0; l < 3; l++) newel.param[k][l] = newparam[hprs->newels[j][k]-1][l]; if (j == 0) elements[i] = newel; else elements.Append (newel); j++; } } } void SubdivideDegeneratedHexes (Mesh & mesh, Array & elements, double fac1) { int oldne = elements.Size(); for (int i = 0; i < oldne; i++) if (Get_HPRef_Struct (elements[i].type)->geom == HP_HEX) { bool common = 0; for (int j = 0; j < 8; j++) for (int k = 0; k < j; k++) if (elements[i].pnums[j] == elements[i].pnums[k]) common = 1; if (common) { cout << " Degenerate Hex found " << endl; *testout << " Degenerate Hex found " << endl; HPRefElement el = elements[i]; HPRefElement newel = el; Point<3> center(0,0,0); double newparam[3] = { 0, 0, 0 }; for (int j = 0; j < 8; j++) { center += 0.125 * Vec<3>(mesh[el.pnums[j]]); // 0.125 originates form 8 points not from fac1; for (int l = 0; l < 3; l++) newparam[l] += 0.125 * el.param[j][l]; } int npi = mesh.AddPoint (center); const ELEMENT_FACE * faces = MeshTopology::GetFaces1 (HEX); for (int j = 0; j < 6; j++) { Array pts; for (int k = 0; k < 4; k++) { bool same = 0; for (int l = 0; l < pts.Size(); l++) if (el.pnums[pts[l]] == el.pnums[faces[j][k]-1]) same = 1; if (!same) pts.Append (faces[j][k]-1); } if (pts.Size() == 3) // TrigFace -> TET { for (int k = 0; k < 3; k++) { newel.pnums[k] = el.pnums[pts[2-k]]; for (int l = 0; l < 3; l++) newel.param[k][l] = el.param[pts[2-k]][l]; } newel.pnums[3] = npi; for (int l = 0; l < 3; l++) newel.param[3][l] = newparam[l]; newel.type = HP_TET; newel.np = 4; } else { for (int k = 0; k < 4; k++) { newel.pnums[k] = el.pnums[pts[3-k]]; for (int l = 0; l < 3; l++) newel.param[k][l] = el.param[pts[3-k]][l]; } newel.pnums[4] = npi; for (int l = 0; l < 3; l++) newel.param[4][l] = newparam[l]; newel.type = HP_PYRAMID; newel.np = 5; } if (j == 0) elements[i] = newel; else elements.Append (newel); } /* const ELEMENT_EDGE * edges = MeshTopology::GetEdges (HEX); for(int k=0;k<12;k++) { int e[2]; for(int l=0;l<2;l++) e[l] = edges[k][l]-1; if(el.PNum(e[0]+1)!=el.PNum(e[1]+1)) { newel.SetType(HP_SEGM); for(int l=0;l<2;l++) { newel.pnums[0] = el.PNum(e[l]+1); newel.pnums[1] = npi; for(int j=0;j<3;j++) { // newel.param[0][j] = el.param[e[l]][j]; // newel.param[1][j] = newparam[j]; } elements.Append(newel); } newel.SetType(HP_TRIG); newel.pnums[0] = el.PNum(e[0]+1); newel.pnums[1] = el.PNum(e[1]+1); newel.pnums[2] = npi; *testout << "DEGHEX TRIG :: newpnums " << newel.pnums[0] << "\t" << newel.pnums[1] << "\t" << newel.pnums[2] << endl; cout << "DEGHEX TRIG :: newpnums " << newel.pnums[0] << "\t" << newel.pnums[1] << "\t" << newel.pnums[2] << endl; for(int j=0;j<3;j++) { // newel.param[0][j] = el.param[e[0]][j]; // newel.param[1][j] = el.param[e[1]][j]; // newel.param[2][j] = newparam[j]; } elements.Append(newel); } }*/ } } } void CalcStatistics (Array & elements) { return; #ifdef ABC int i, p; int nsegm = 0, ntrig = 0, nquad = 0; int nhex = 0, nprism = 0, npyramid = 0, ntet = 0; int maxlevel = 0; for (i = 1; i <= elements.Size(); i++) { const HPRefElement & el = elements.Get(i); maxlevel = max2 (el.level, maxlevel); switch (Get_HPRef_Struct (el.type)->geom) { case HP_SEGM: { nsegm++; break; } case HP_TRIG: { ntrig ++; break; } case HP_QUAD: { nquad++; break; } case HP_TET: { ntet++; break; } case HP_PRISM: { nprism++; break; } case HP_PYRAMID: { npyramid++; break; } case HP_HEX: { nhex++; break; } default: { cerr << "statistics error, unknown element type" << endl; } } } cout << "level = " << maxlevel << endl; cout << "nsegm = " << nsegm << endl; cout << "ntrig = " << ntrig << ", nquad = " << nquad << endl; cout << "ntet = " << ntet << ", npyr = " << npyramid << ", nprism = " << nprism << ", nhex = " << nhex << endl; return; double memcost = 0, cpucost = 0; for (p = 1; p <= 20; p++) { memcost = (ntet + nprism + nhex) * pow (static_cast(p), 6.0); cpucost = (ntet + nprism + nhex) * pow (static_cast(p), 9.0); cout << "costs for p = " << p << ": mem = " << memcost << ", cpu = " << cpucost << endl; } double memcosttet = 0; double memcostprism = 0; double memcosthex = 0; double memcostsctet = 0; double memcostscprism = 0; double memcostschex = 0; double cpucosttet = 0; double cpucostprism = 0; double cpucosthex = 0; for (i = 1; i <= elements.Size(); i++) { const HPRefElement & el = elements.Get(i); switch (el.type) { case HP_TET: case HP_TET_0E_1V: case HP_TET_1E_0V: case HP_TET_1E_1VA: { int p1 = maxlevel - el.level + 1; (*testout) << "p1 = " << p1 << ", P1^6 = " << pow (static_cast(p1), 6.0) << " (p1-3)^6 = " << pow ( static_cast(max2(p1-3, 0)), 6.0) << " p1^3 = " << pow ( static_cast(p1), 3.0) << " (p1-3)^3 = " << pow ( static_cast(p1-3), 3.0) << " [p1^3-(p1-3)^3]^2 = " << sqr (pow (static_cast(p1),3.0) - pow ( static_cast(p1-3), 3.0)) << endl; p1 /= 2 +1; memcosttet += pow (static_cast(p1), 6.0); memcostsctet += pow (static_cast(p1), 6.0) - pow ( static_cast(max2(p1-3, 1)), 6.0); cpucosttet += pow (static_cast(p1), 9.0); break; } case HP_PRISM: case HP_PRISM_SINGEDGE: { int p1 = maxlevel - el.level + 1; p1 /= 2 +1; memcostprism += pow (static_cast(p1), 6.0); memcostscprism += pow (static_cast(p1), 6.0) - pow ( static_cast(max2(p1-3, 1)), 6.0); cpucostprism += pow (static_cast(p1), 9.0); break; } case HP_HEX: { int p1 = maxlevel - el.level + 1; int p2 = maxlevel; p1 /= 2 +1; p2 /= 2 +1; memcosthex += pow (static_cast(p1), 4.0) * pow (static_cast(p2), 2.0); memcostschex += pow (static_cast(p1), 6.0) - pow ( static_cast(max2(p1-2, 0)), 6.0); cpucosthex += pow (static_cast(p1), 6.0) * pow (static_cast(p2), 3.0); break; } default: ; } } cout << "TET: hp-memcost = " << memcosttet << ", scmemcost = " << memcostsctet << ", cpucost = " << cpucosttet << endl; cout << "PRI: hp-memcost = " << memcostprism << ", scmemcost = " << memcostscprism << ", cpucost = " << cpucostprism << endl; cout << "HEX: hp-memcost = " << memcosthex << ", scmemcost = " << memcostschex << ", cpucost = " << cpucosthex << endl; #endif } void ReorderPoints (Mesh & mesh, Array & hpelements) { Array map (mesh.GetNP()); for (int i = 1; i <= mesh.GetNP(); i++) map[i] = i; int nwrong(0), nright(0); for (int k = 0; k < 5; k++) { nwrong = nright = 0; for (int i = 0; i < hpelements.Size(); i++) { const HPRefElement & hpel = hpelements[i]; if (Get_HPRef_Struct (hpel.type) -> geom == HP_PRISM) { int minbot = 0, mintop = 0; for (int j = 0; j < 3; j++) { if (map[hpel.pnums[j]] < map[hpel.pnums[minbot]]) minbot = j; if (map[hpel.pnums[j+3]] < map[hpel.pnums[mintop+3]]) mintop = j; } if (minbot != mintop) nwrong++; else nright++; if (minbot != mintop) { if (map[hpel.pnums[minbot]] < map[hpel.pnums[mintop+3]]) swap (map[hpel.pnums[3+minbot]], map[hpel.pnums[3+mintop]]); else swap (map[hpel.pnums[minbot]], map[hpel.pnums[mintop]]); } } } // cout << nwrong << " wrong prisms, " << nright << " right prisms" << endl; } cout << nwrong << " wrong prisms, " << nright << " right prisms" << endl; Array hpts(mesh.GetNP()); for (int i = 1; i <= mesh.GetNP(); i++) hpts[map[i]] = mesh.Point(i); for (int i = 1; i <= mesh.GetNP(); i++) mesh.Point(i) = hpts[i]; for (int i = 0; i < hpelements.Size(); i++) { HPRefElement & hpel = hpelements[i]; for (int j = 0; j < hpel.np; j++) hpel.pnums[j] = map[hpel.pnums[j]]; } } /* ***************************** HPRefinement ********************************** */ void HPRefinement (Mesh & mesh, Refinement * ref, int levels, double fac1, bool setorders, bool reflevels) { PrintMessage (1, "HP Refinement called, levels = ", levels); // NgLock mem_lock (mem_mutex,1); mesh.coarsemesh = new Mesh; *mesh.coarsemesh = mesh; // #ifdef CURVEDELEMS_NEW const_cast (mesh.coarsemesh->GetCurvedElements() ). BuildCurvedElements (ref, mesh.GetCurvedElements().GetOrder()); // #endif delete mesh.hpelements; mesh.hpelements = new Array; Array & hpelements = *mesh.hpelements; InitHPElements(mesh,hpelements); Array nplevel; nplevel.Append (mesh.GetNP()); int act_ref=1; bool sing = ClassifyHPElements (mesh,hpelements, act_ref, levels); sing = true; // iterate at least once while(sing) { cout << " Start new hp-refinement: step " << act_ref << endl; DoRefinement (mesh, hpelements, ref, fac1); DoRefineDummies (mesh, hpelements, ref); nplevel.Append (mesh.GetNP()); CalcStatistics (hpelements); SubdivideDegeneratedHexes (mesh, hpelements,fac1); ReorderPoints (mesh, hpelements); mesh.ClearSegments(); mesh.ClearSurfaceElements(); mesh.ClearVolumeElements(); for (int i = 0; i < hpelements.Size(); i++) { HPRefElement & hpel = hpelements[i]; if (Get_HPRef_Struct (hpel.type)) switch (Get_HPRef_Struct (hpel.type) -> geom) { case HP_SEGM: { Segment seg; seg[0] = hpel.pnums[0]; seg[1] = hpel.pnums[1]; // NOTE: only for less than 10000 elements (HACK) !!! seg.edgenr = hpel.index % 10000; seg.si = hpel.index / 10000; /* seg.epgeominfo[0].dist = hpel.param[0][0]; // he: war hpel.param[0][0] seg.epgeominfo[1].dist = hpel.param[1][0]; // he: war hpel.param[1][0] */ const Segment & coarseseg = mesh.coarsemesh->LineSegment(hpel.coarse_elnr+1); double d1 = coarseseg.epgeominfo[0].dist; double d2 = coarseseg.epgeominfo[1].dist; // seg.epgeominfo[0].dist = hpel.param[0][0]; // he: war hpel.param[0][0] // seg.epgeominfo[1].dist = hpel.param[1][0]; // he: war hpel.param[1][0] seg.epgeominfo[0].dist = d1 + hpel.param[0][0] * (d2-d1); // JS, June 08 seg.epgeominfo[1].dist = d1 + hpel.param[1][0] * (d2-d1); seg.epgeominfo[0].edgenr = seg.edgenr; seg.epgeominfo[1].edgenr = seg.edgenr; seg.domin = hpel.domin; seg.domout=hpel.domout; // he: needed for segments! seg.hp_elnr = i; seg.singedge_left = hpel.singedge_left; seg.singedge_right = hpel.singedge_right; mesh.AddSegment (seg); break; } case HP_TRIG: case HP_QUAD: { Element2d el(hpel.np); for(int j=0;j geom)); } } cout << " Start with Update Topology " << endl; mesh.UpdateTopology(); cout << " Mesh Update Topology done " << endl; act_ref++; sing = ClassifyHPElements(mesh,hpelements, act_ref, levels); } cout << " HP-Refinement done with " << --act_ref << " refinement steps." << endl; if(act_ref>=1) { for(ElementIndex i=0;i v(hpel.param[edges[j][0]-1][0]-hpel.param[edges[j][1]-1][0], hpel.param[edges[j][0]-1][1]-hpel.param[edges[j][1]-1][1], hpel.param[edges[j][0]-1][2]-hpel.param[edges[j][1]-1][2]); dist[edge_dir[j]] = max(v.Length(),dist[edge_dir[j]]); } int refi[3]; for(int j=0;j<3;j++) refi[j] = int(max(double(floor(log(dist[ord_dir[j]]/sqrt(2.))/log(fac1))),0.)); // cout << " ref " << refi[0] << "\t" << refi[1] << "\t" << refi[2] << endl; // cout << " order " << act_ref +1 - refi[0] << "\t" << act_ref +1 - refi[1] << "\t" << act_ref +1 - refi[2] << endl; if(setorders) mesh[i].SetOrder(act_ref+1-refi[0],act_ref+1-refi[1],act_ref+1-refi[2]); } for(SurfaceElementIndex i=0;i v(hpel.param[edges[j][0]-1][0]-hpel.param[edges[j][1]-1][0], hpel.param[edges[j][0]-1][1]-hpel.param[edges[j][1]-1][1], hpel.param[edges[j][0]-1][2]-hpel.param[edges[j][1]-1][2]); dist[edge_dir[j]] = max(v.Length(),dist[edge_dir[j]]); } int refi[3]; for(int j=0;j<3;j++) refi[j] = int(max(double(floor(log(dist[ord_dir[j]]/sqrt(2.))/log(fac1))),0.)); if(setorders) mesh[i].SetOrder(act_ref+1-refi[0],act_ref+1-refi[1],act_ref+1-refi[2]); // cout << " ref " << refi[0] << "\t" << refi[1] << endl; // cout << " order " << act_ref +1 - refi[0] << "\t" << act_ref +1 - refi[1] << endl; } } } bool CheckSingularities(Mesh & mesh, INDEX_2_HASHTABLE & edges, INDEX_2_HASHTABLE & edgepoint_dom, BitArray & cornerpoint, BitArray & edgepoint, INDEX_3_HASHTABLE & faces, INDEX_2_HASHTABLE & face_edges, INDEX_2_HASHTABLE & surf_edges, Array & facepoint, int & levels, int & act_ref) { bool sing = 0; if (mesh.GetDimension() == 3) { /* // check, if point has as least 3 different surfs: Array surfonpoint(mesh.GetNP()); surfonpoint = INDEX_3(0,0,0); for (SurfaceElementIndex sei = 0; sei < mesh.GetNSE(); sei++) { const Element2d & el = mesh[sei]; int ind = el.GetIndex(); for (int j = 0; j < el.GetNP(); j++) { INDEX_3 & i3 = surfonpoint[el[j]]; if (ind != i3.I1() && ind != i3.I2() && ind != i3.I3()) { i3.I1() = i3.I2(); i3.I2() = i3.I3(); i3.I3() = ind; } } } for (int i = 1; i <= mesh.GetNP(); i++) if (surfonpoint.Get(i).I1()) cornerpoint.Set(i); */ cornerpoint.Clear(); for (int i = 1; i <= mesh.GetNP(); i++) { if (mesh.Point(i).Singularity() * levels >= act_ref) { cornerpoint.Set(i); sing = 1; } } cout << endl; for (int i = 1; i <= mesh.GetNSeg(); i++) if (mesh.LineSegment(i).singedge_left * levels >= act_ref) { INDEX_2 i2 (mesh.LineSegment(i)[0], mesh.LineSegment(i)[1]); /* // before edges.Set (i2, 1); i2.Sort(); INDEX_2 i2s(i2.I2(), i2.I1()); edges.Set (i2s, 1); */ edges.Set (i2, 1); INDEX_2 i2s(i2.I2(), i2.I1()); edges.Set (i2s, 1); edgepoint.Set (i2.I1()); edgepoint.Set (i2.I2()); sing = 1; } // if 2 adjacent edges of an element are singular, the // commen point must be a singular point for (int i = 1; i <= mesh.GetNE(); i++) { const Element & el = mesh.VolumeElement(i); const ELEMENT_EDGE * eledges = MeshTopology::GetEdges1 (el.GetType()); int nedges = MeshTopology::GetNEdges (el.GetType()); for (int j = 0; j < nedges; j++) for (int k = 0; k < nedges; k++) if (j != k) { INDEX_2 ej(el.PNum(eledges[j][0]), el.PNum(eledges[j][1])); ej.Sort(); INDEX_2 ek(el.PNum(eledges[k][0]), el.PNum(eledges[k][1])); ek.Sort(); if (edges.Used(ej) && edges.Used(ek)) { if (ej.I1() == ek.I1()) cornerpoint.Set (ek.I1()); if (ej.I1() == ek.I2()) cornerpoint.Set (ek.I2()); if (ej.I2() == ek.I1()) cornerpoint.Set (ek.I1()); if (ej.I2() == ek.I2()) cornerpoint.Set (ek.I2()); } } } edgepoint.Or (cornerpoint); (*testout) << "cornerpoint = " << endl << cornerpoint << endl; (*testout) << "edgepoint = " << endl << edgepoint << endl; facepoint = 0; for (SurfaceElementIndex sei = 0; sei < mesh.GetNSE(); sei++) { const Element2d & el = mesh[sei]; const FaceDescriptor & fd = mesh.GetFaceDescriptor (el.GetIndex()); int domnr = 0; if (fd.DomainInSingular() * levels < act_ref && fd.DomainOutSingular() * levels < act_ref) { domnr=0; continue;} if (fd.DomainInSingular() * levels >= act_ref) { domnr = fd.DomainIn(); sing = 1; } if (fd.DomainOutSingular() * levels >= act_ref) { domnr = fd.DomainOut(); sing = 1; } if (fd.DomainInSingular() * levels >= act_ref && fd.DomainOutSingular() * levels >= act_ref) { domnr = -1; sing = 1; } INDEX_3 i3; if (el.GetNP() == 3) i3 = INDEX_3::Sort (el[0], el[1], el[2]); else { INDEX_4 i4 (el[0], el[1], el[2], el[3]); i4.Sort(); i3 = INDEX_3(i4.I1(), i4.I2(), i4.I3()); } faces.Set (i3, domnr); for (int j = 0; j < el.GetNP(); j++) { face_edges.Set (INDEX_2::Sort (el[j], el[(j+1)%el.GetNP()]), domnr); surf_edges.Set (INDEX_2::Sort (el[j], el[(j+1)%el.GetNP()]), fd.SurfNr()+1); facepoint[el[j]] = domnr; } } (*testout) << "singular faces = " << faces << endl; (*testout) << "singular faces_edges = " << face_edges << endl; } else { // 2D case // check, if point has as least 3 different surfs: Array surfonpoint(mesh.GetNP()); for (int i = 1; i <= mesh.GetNP(); i++) surfonpoint.Elem(i) = INDEX_3(0,0,0); for (int i = 1; i <= mesh.GetNSeg(); i++) { const Segment & seg = mesh.LineSegment(i); int ind = seg.edgenr; if (seg.singedge_left * levels >= act_ref) { INDEX_2 i2 (mesh.LineSegment(i)[0], mesh.LineSegment(i)[1]); edges.Set(i2,1); edgepoint.Set(i2.I1()); edgepoint.Set(i2.I2()); *testout << " singleft " << endl; *testout << " mesh.LineSegment(i).domout " << mesh.LineSegment(i).domout << endl; *testout << " mesh.LineSegment(i).domin " << mesh.LineSegment(i).domin << endl; edgepoint_dom.Set (INDEX_2(mesh.LineSegment(i).domin, i2.I1()), 1); edgepoint_dom.Set (INDEX_2(mesh.LineSegment(i).domin, i2.I2()), 1); sing = 1; } if (seg.singedge_right * levels >= act_ref) { INDEX_2 i2 (mesh.LineSegment(i)[1], mesh.LineSegment(i)[0]); edges.Set (i2, 1); edgepoint.Set(i2.I1()); edgepoint.Set(i2.I2()); *testout << " singright " << endl; *testout << " mesh.LineSegment(i).domout " << mesh.LineSegment(i).domout << endl; *testout << " mesh.LineSegment(i).domin " << mesh.LineSegment(i).domin << endl; edgepoint_dom.Set (INDEX_2(mesh.LineSegment(i).domout, i2.I1()), 1); edgepoint_dom.Set (INDEX_2(mesh.LineSegment(i).domout, i2.I2()), 1); sing = 1; } // (*testout) << "seg = " << ind << ", " << seg[0] << "-" << seg[1] << endl; if (seg.singedge_left * levels >= act_ref || seg.singedge_right* levels >= act_ref) { for (int j = 0; j < 2; j++) { int pi = (j == 0) ? seg[0] : seg[1]; INDEX_3 & i3 = surfonpoint.Elem(pi); if (ind != i3.I1() && ind != i3.I2()) { i3.I1() = i3.I2(); i3.I2() = ind; } } } } for (int i = 1; i <= mesh.GetNP(); i++) { // mark points for refinement that are in corners between two anisotropic edges if (surfonpoint.Get(i).I1()) { // cornerpoint.Set(i); // disabled by JS, Aug 2009 edgepoint.Set(i); } // mark points for refinement that are explicitly specified in input file if (mesh.Point(i).Singularity()*levels >= act_ref) { cornerpoint.Set(i); edgepoint.Set(i); sing = 1; } } edgepoint.Or (cornerpoint); (*testout) << "2d sing edges: " << endl << edges << endl; (*testout) << "2d cornerpoints: " << endl << cornerpoint << endl << "2d edgepoints: " << endl << edgepoint << endl; facepoint = 0; } if (!sing) cout << "PrepareElements no more to do for actual refinement " << act_ref << endl; return(sing); } bool ClassifyHPElements (Mesh & mesh, Array & elements, int & act_ref, int & levels) { INDEX_2_HASHTABLE edges(mesh.GetNSeg()+1); BitArray edgepoint(mesh.GetNP()); INDEX_2_HASHTABLE edgepoint_dom(mesh.GetNSeg()+1); edgepoint.Clear(); BitArray cornerpoint(mesh.GetNP()); cornerpoint.Clear(); // value = nr > 0 ... refine elements in domain nr // value = -1 ..... refine elements in any domain INDEX_3_HASHTABLE faces(mesh.GetNSE()+1); INDEX_2_HASHTABLE face_edges(mesh.GetNSE()+1); INDEX_2_HASHTABLE surf_edges(mesh.GetNSE()+1); Array facepoint(mesh.GetNP()); bool sing = CheckSingularities(mesh, edges, edgepoint_dom, cornerpoint, edgepoint, faces, face_edges, surf_edges, facepoint, levels, act_ref); if(sing==0) return(sing); int cnt_undef = 0, cnt_nonimplement = 0; Array misses(10000); misses = 0; (*testout) << "edgepoint_dom = " << endl << edgepoint_dom << endl; for( int i = 0; igeom) { case HP_TET: { hpel.type = ClassifyTet(hpel, edges, edgepoint_dom, cornerpoint, edgepoint, faces,face_edges, surf_edges, facepoint); break; } case HP_PRISM: { hpel.type = ClassifyPrism(hpel, edges, edgepoint_dom, cornerpoint, edgepoint, faces, face_edges, surf_edges, facepoint); break; } case HP_HEX: { hpel.type = ClassifyHex(hpel, edges, edgepoint_dom, cornerpoint, edgepoint, faces, face_edges, surf_edges, facepoint); break; } case HP_TRIG: { int dim = mesh.GetDimension(); const FaceDescriptor & fd = mesh.GetFaceDescriptor (hpel.GetIndex()); hpel.type = ClassifyTrig(hpel, edges, edgepoint_dom, cornerpoint, edgepoint, faces, face_edges, surf_edges, facepoint, dim, fd); dd = 2; break; } case HP_QUAD: { int dim = mesh.GetDimension(); const FaceDescriptor & fd = mesh.GetFaceDescriptor (hpel.GetIndex()); hpel.type = ClassifyQuad(hpel, edges, edgepoint_dom, cornerpoint, edgepoint, faces, face_edges, surf_edges, facepoint, dim, fd); dd = 2; break; } case HP_SEGM: { hpel.type = ClassifySegm(hpel, edges, edgepoint_dom, cornerpoint, edgepoint, faces, face_edges, surf_edges, facepoint); dd = 1; break; } case HP_PYRAMID: { hpel.type = ClassifyPyramid(hpel, edges, edgepoint_dom, cornerpoint, edgepoint, faces, face_edges, surf_edges, facepoint); cout << " ** Pyramid classified " << hpel.type << endl; break; } default: { cout << "illegal element type for hp-prepare elements " << hpel.type << endl; throw NgException ("hprefinement.cpp: don't know how to set parameters"); } } if(hpel.type == HP_NONE) cnt_undef++; //else //cout << "elem " << i << " classified type " << hpel.type << endl; if (!Get_HPRef_Struct (hpel.type)) { (*testout) << "hp-element-type " << hpel.type << " not implemented " << endl; (*testout) << " elType " << hprs->geom << endl; (cout) << " elType " << hprs->geom << endl; cnt_nonimplement++; misses[hpel.type]++; } for(int j=0; j * quality_loss = NULL) const; void MakeSecondOrder (Mesh & mesh) const; void MakeSecondOrder (Mesh & mesh); virtual void PointBetween (const Point<3> & p1, const Point<3> & p2, double secpoint, int surfi, const PointGeomInfo & gi1, const PointGeomInfo & gi2, Point<3> & newp, PointGeomInfo & newgi) const; virtual void PointBetween (const Point<3> & p1, const Point<3> & p2, double secpoint, int surfi1, int surfi2, const EdgePointGeomInfo & ap1, const EdgePointGeomInfo & ap2, Point<3> & newp, EdgePointGeomInfo & newgi) const; virtual Vec<3> GetTangent (const Point<3> & p, int surfi1, int surfi2, const EdgePointGeomInfo & egi) const; virtual Vec<3> GetNormal (const Point<3> & p, int surfi1, const PointGeomInfo & gi) const; virtual void ProjectToSurface (Point<3> & p, int surfi) const; virtual void ProjectToSurface (Point<3> & p, int surfi, const PointGeomInfo & /* gi */) const { ProjectToSurface (p, surfi); } virtual void ProjectToEdge (Point<3> & p, int surfi1, int surfi2, const EdgePointGeomInfo & egi) const; void ValidateSecondOrder (Mesh & mesh); void ValidateRefinedMesh (Mesh & mesh, Array & parents); MeshOptimize2d * Get2dOptimizer(void) const { return optimizer2d; } void Set2dOptimizer(MeshOptimize2d * opti) { optimizer2d = opti; } virtual void LocalizeEdgePoints(Mesh & /* mesh */) const {;} }; #endif netgen-6.2.1804/libsrc/meshing/meshing2.hpp0000644000175000017500000000751513272137567017152 0ustar kurtkurt#ifndef FILE_MESHING2 #define FILE_MESHING2 /**************************************************************************/ /* File: meshing2.hpp */ /* Author: Joachim Schoeberl */ /* Date: 01. Okt. 95 */ /**************************************************************************/ enum MESHING2_RESULT { MESHING2_OK = 0, MESHING2_GIVEUP = 1 }; /* The basis class for 2D mesh generation. Has the method GenerateMesh For surface mesh generation, or non-Euklidean meshing, derive from Meshing2, and replace transformation. */ class Meshing2 { /// the current advancing front AdFront2 * adfront; /// rules for mesh generation Array rules; /// statistics Array ruleused, canuse, foundmap; /// Box<3> boundingbox; /// double starttime; /// double maxarea; Vec3d ex, ey; Point3d globp1; public: /// DLL_HEADER Meshing2 (const MeshingParameters & mp, const Box<3> & aboundingbox); /// DLL_HEADER virtual ~Meshing2 (); /// Load rules, either from file, or compiled rules void LoadRules (const char * filename, bool quad); /// DLL_HEADER MESHING2_RESULT GenerateMesh (Mesh & mesh, const MeshingParameters & mp, double gh, int facenr); DLL_HEADER void Delaunay (Mesh & mesh, int domainnr, const MeshingParameters & mp); DLL_HEADER void BlockFillLocalH (Mesh & mesh, const MeshingParameters & mp); /// DLL_HEADER void AddPoint (const Point3d & p, PointIndex globind, MultiPointGeomInfo * mgi = NULL, bool pointonsurface = true); /// DLL_HEADER void AddBoundaryElement (INDEX i1, INDEX i2, const PointGeomInfo & gi1, const PointGeomInfo & gi2); /// void SetStartTime (double astarttime); /// void SetMaxArea (double amaxarea); protected: /// virtual void StartMesh (); /// virtual void EndMesh (); /// virtual double CalcLocalH (const Point3d & p, double gh) const; /// virtual void DefineTransformation (const Point3d & p1, const Point3d & p2, const PointGeomInfo * geominfo1, const PointGeomInfo * geominfo2); /// virtual void TransformToPlain (const Point3d & locpoint, const MultiPointGeomInfo & geominfo, Point2d & plainpoint, double h, int & zone); /// return 0 .. ok /// return >0 .. cannot transform point to true surface virtual int TransformFromPlain (Point2d & plainpoint, Point3d & locpoint, PointGeomInfo & geominfo, double h); /// projects to surface /// return 0 .. ok virtual int BelongsToActiveChart (const Point3d & p, const PointGeomInfo & gi); /// computes geoinfo data for line with respect to /// selected chart virtual int ComputePointGeomInfo (const Point3d & p, PointGeomInfo & gi); /// Tries to select unique geominfo on active chart /// return 0: success /// return 1: failed virtual int ChooseChartPointGeomInfo (const MultiPointGeomInfo & mpgi, PointGeomInfo & pgi); /* tests, whether endpoint (= 1 or 2) of line segment p1-p2 is inside of the selected chart. The endpoint must be on the chart */ virtual int IsLineVertexOnChart (const Point3d & p1, const Point3d & p2, int endpoint, const PointGeomInfo & geominfo); /* get (projected) boundary of current chart */ virtual void GetChartBoundary (Array & points, Array & points3d, Array & lines, double p) const; virtual double Area () const; /** Applies 2D rules. Tests all 2D rules */ int ApplyRules (Array & lpoints, Array & legalpoints, int maxlegalpoint, Array & llines, int maxlegelline, Array & elements, Array & dellines, int tolerance, const MeshingParameters & mp); }; #endif netgen-6.2.1804/libsrc/meshing/meshing2.cpp0000644000175000017500000013137613272137567017150 0ustar kurtkurt#include #include "meshing.hpp" namespace netgen { static void glrender (int wait); // global variable for visualization // static Array locpoints; // static Array legalpoints; // static Array plainpoints; // static Array plainzones; // static Array loclines; // // static int geomtrig; // //static const char * rname; // static int cntelem, trials, nfaces; // static int oldnl; // static int qualclass; Meshing2 :: Meshing2 (const MeshingParameters & mp, const Box<3> & aboundingbox) { boundingbox = aboundingbox; LoadRules (NULL, mp.quad); // LoadRules ("rules/quad.rls"); // LoadRules ("rules/triangle.rls"); adfront = new AdFront2(boundingbox); starttime = GetTime(); maxarea = -1; } Meshing2 :: ~Meshing2 () { delete adfront; for (int i = 0; i < rules.Size(); i++) delete rules[i]; } void Meshing2 :: AddPoint (const Point3d & p, PointIndex globind, MultiPointGeomInfo * mgi, bool pointonsurface) { //(*testout) << "add point " << globind << endl; adfront ->AddPoint (p, globind, mgi, pointonsurface); } void Meshing2 :: AddBoundaryElement (int i1, int i2, const PointGeomInfo & gi1, const PointGeomInfo & gi2) { // (*testout) << "add line " << i1 << " - " << i2 << endl; if (!gi1.trignum || !gi2.trignum) { PrintSysError ("addboundaryelement: illegal geominfo"); } adfront -> AddLine (i1-1, i2-1, gi1, gi2); } void Meshing2 :: StartMesh () { foundmap.SetSize (rules.Size()); canuse.SetSize (rules.Size()); ruleused.SetSize (rules.Size()); foundmap = 0; canuse = 0; ruleused = 0; // cntelem = 0; // trials = 0; } void Meshing2 :: EndMesh () { for (int i = 0; i < ruleused.Size(); i++) (*testout) << setw(4) << ruleused[i] << " times used rule " << rules[i] -> Name() << endl; } void Meshing2 :: SetStartTime (double astarttime) { starttime = astarttime; } void Meshing2 :: SetMaxArea (double amaxarea) { maxarea = amaxarea; } double Meshing2 :: CalcLocalH (const Point3d & /* p */, double gh) const { return gh; } // should be class variables !!(?) // static Vec3d ex, ey; // static Point3d globp1; void Meshing2 :: DefineTransformation (const Point3d & p1, const Point3d & p2, const PointGeomInfo * geominfo1, const PointGeomInfo * geominfo2) { globp1 = p1; ex = p2 - p1; ex /= ex.Length(); ey.X() = -ex.Y(); ey.Y() = ex.X(); ey.Z() = 0; } void Meshing2 :: TransformToPlain (const Point3d & locpoint, const MultiPointGeomInfo & geominf, Point2d & plainpoint, double h, int & zone) { Vec3d p1p (globp1, locpoint); // p1p = locpoint - globp1; p1p /= h; plainpoint.X() = p1p * ex; plainpoint.Y() = p1p * ey; zone = 0; } int Meshing2 :: TransformFromPlain (Point2d & plainpoint, Point3d & locpoint, PointGeomInfo & gi, double h) { Vec3d p1p; gi.trignum = 1; p1p = plainpoint.X() * ex + plainpoint.Y() * ey; p1p *= h; locpoint = globp1 + p1p; return 0; } int Meshing2 :: BelongsToActiveChart (const Point3d & p, const PointGeomInfo & gi) { return 1; } int Meshing2 :: ComputePointGeomInfo (const Point3d & p, PointGeomInfo & gi) { gi.trignum = 1; return 0; } int Meshing2 :: ChooseChartPointGeomInfo (const MultiPointGeomInfo & mpgi, PointGeomInfo & pgi) { pgi = mpgi.GetPGI(1); return 0; } int Meshing2 :: IsLineVertexOnChart (const Point3d & p1, const Point3d & p2, int endpoint, const PointGeomInfo & geominfo) { return 1; } void Meshing2 :: GetChartBoundary (Array & points, Array & points3d, Array & lines, double h) const { points.SetSize (0); points3d.SetSize (0); lines.SetSize (0); } double Meshing2 :: Area () const { return -1; } MESHING2_RESULT Meshing2 :: GenerateMesh (Mesh & mesh, const MeshingParameters & mp, double gh, int facenr) { static int timer = NgProfiler::CreateTimer ("surface meshing"); static int timer1 = NgProfiler::CreateTimer ("surface meshing1"); static int timer2 = NgProfiler::CreateTimer ("surface meshing2"); static int timer3 = NgProfiler::CreateTimer ("surface meshing3"); static int ts1 = NgProfiler::CreateTimer ("surface meshing start 1"); static int ts2 = NgProfiler::CreateTimer ("surface meshing start 2"); static int ts3 = NgProfiler::CreateTimer ("surface meshing start 3"); NgProfiler::RegionTimer reg (timer); NgProfiler::StartTimer (ts1); Array pindex, lindex; Array delpoints, dellines; Array upgeominfo; // unique info Array mpgeominfo; // multiple info Array locelements; int z1, z2, oldnp(-1); bool found; int rulenr(-1); Point<3> p1, p2; const PointGeomInfo * blgeominfo1; const PointGeomInfo * blgeominfo2; bool morerisc; bool debugflag; double h, his, hshould; Array locpoints; Array legalpoints; Array plainpoints; Array plainzones; Array loclines; int cntelem = 0, trials = 0, nfaces = 0; int oldnl = 0; int qualclass; // test for 3d overlaps BoxTree<3> surfeltree (boundingbox.PMin(), boundingbox.PMax()); Array intersecttrias; Array critpoints; // test for doubled edges //INDEX_2_HASHTABLE doubleedge(300000); testmode = 0; StartMesh(); Array chartboundpoints; Array chartboundpoints3d; Array chartboundlines; // illegal points: points with more then 50 elements per node int maxlegalpoint(-1), maxlegalline(-1); Array trigsonnode; Array illegalpoint; trigsonnode.SetSize (mesh.GetNP()); illegalpoint.SetSize (mesh.GetNP()); trigsonnode = 0; illegalpoint = 0; double totalarea = Area (); double meshedarea = 0; // search tree for surface elements: /* for (sei = 0; sei < mesh.GetNSE(); sei++) { const Element2d & sel = mesh[sei]; if (sel.IsDeleted()) continue; if (sel.GetIndex() == facenr) { Box<3> box; box.Set ( mesh[sel[0]] ); box.Add ( mesh[sel[1]] ); box.Add ( mesh[sel[2]] ); surfeltree.Insert (box, sei); } } */ Array seia; mesh.GetSurfaceElementsOfFace (facenr, seia); for (int i = 0; i < seia.Size(); i++) { const Element2d & sel = mesh[seia[i]]; if (sel.IsDeleted()) continue; Box<3> box; box.Set ( mesh[sel[0]] ); box.Add ( mesh[sel[1]] ); box.Add ( mesh[sel[2]] ); surfeltree.Insert (box, seia[i]); } NgProfiler::StopTimer (ts1); NgProfiler::StartTimer (ts2); if (totalarea > 0 || maxarea > 0) meshedarea = mesh.SurfaceArea(); /* for (SurfaceElementIndex sei = 0; sei < mesh.GetNSE(); sei++) { const Element2d & sel = mesh[sei]; if (sel.IsDeleted()) continue; double trigarea = Cross ( mesh[sel[1]]-mesh[sel[0]], mesh[sel[2]]-mesh[sel[0]] ).Length() / 2; if (sel.GetNP() == 4) trigarea += Cross (Vec3d (mesh.Point (sel.PNum(1)), mesh.Point (sel.PNum(3))), Vec3d (mesh.Point (sel.PNum(1)), mesh.Point (sel.PNum(4)))).Length() / 2;; meshedarea += trigarea; } */ // cout << "meshedarea = " << meshedarea << " =?= " // << mesh.SurfaceArea() << endl; NgProfiler::StopTimer (ts2); NgProfiler::StartTimer (ts3); const char * savetask = multithread.task; multithread.task = "Surface meshing"; adfront ->SetStartFront (); int plotnexttrial = 999; double meshedarea_before = meshedarea; NgProfiler::StopTimer (ts3); while (!adfront ->Empty() && !multithread.terminate) { NgProfiler::RegionTimer reg1 (timer1); if (multithread.terminate) throw NgException ("Meshing stopped"); // known for STL meshing if (totalarea > 0) multithread.percent = 100 * meshedarea / totalarea; /* else multithread.percent = 0; */ locpoints.SetSize(0); loclines.SetSize(0); pindex.SetSize(0); lindex.SetSize(0); delpoints.SetSize(0); dellines.SetSize(0); locelements.SetSize(0); // plot statistics if (trials > plotnexttrial) { PrintMessage (5, "faces = ", nfaces, " trials = ", trials, " elements = ", mesh.GetNSE(), " els/sec = ", (mesh.GetNSE() / (GetTime() - starttime + 0.0001))); plotnexttrial += 1000; } // unique-pgi, multi-pgi upgeominfo.SetSize(0); mpgeominfo.SetSize(0); nfaces = adfront->GetNFL(); trials ++; if (trials % 1000 == 0) { (*testout) << "\n"; for (int i = 1; i <= canuse.Size(); i++) { (*testout) << foundmap.Get(i) << "/" << canuse.Get(i) << "/" << ruleused.Get(i) << " map/can/use rule " << rules.Get(i)->Name() << "\n"; } (*testout) << "\n"; } int baselineindex = adfront -> SelectBaseLine (p1, p2, blgeominfo1, blgeominfo2, qualclass); found = 1; his = Dist (p1, p2); Point3d pmid = Center (p1, p2); hshould = CalcLocalH (pmid, mesh.GetH (pmid)); if (gh < hshould) hshould = gh; mesh.RestrictLocalH (pmid, hshould); h = hshould; double hinner = (3 + qualclass) * max2 (his, hshould); adfront ->GetLocals (baselineindex, locpoints, mpgeominfo, loclines, pindex, lindex, 2*hinner); NgProfiler::RegionTimer reg2 (timer2); //(*testout) << "h for locals: " << 2*hinner << endl; //(*testout) << "locpoints " << locpoints << endl; if (qualclass > mp.giveuptol2d) { PrintMessage (3, "give up with qualclass ", qualclass); PrintMessage (3, "number of frontlines = ", adfront->GetNFL()); // throw NgException ("Give up 2d meshing"); break; } /* if (found && qualclass > 60) { found = 0; } */ // morerisc = ((qualclass > 20) && (qualclass % 2 == 1)); // morerisc = 1; morerisc = 0; PointIndex gpi1 = adfront -> GetGlobalIndex (pindex.Get(loclines[0].I1())); PointIndex gpi2 = adfront -> GetGlobalIndex (pindex.Get(loclines[0].I2())); debugflag = ( debugparam.haltsegment && ( ((debugparam.haltsegmentp1 == gpi1) && (debugparam.haltsegmentp2 == gpi2)) || ((debugparam.haltsegmentp1 == gpi2) && (debugparam.haltsegmentp2 == gpi1))) ) || ( debugparam.haltnode && ( (debugparam.haltsegmentp1 == gpi1) || (debugparam.haltsegmentp2 == gpi1)) ); if (debugparam.haltface && debugparam.haltfacenr == facenr) { debugflag = 1; cout << "set debugflag" << endl; } if (debugparam.haltlargequalclass && qualclass > 50) debugflag = 1; // problem recognition ! if (found && (gpi1 < illegalpoint.Size()+PointIndex::BASE) && (gpi2 < illegalpoint.Size()+PointIndex::BASE) ) { if (illegalpoint[gpi1] || illegalpoint[gpi2]) found = 0; } Point2d p12d, p22d; if (found) { oldnp = locpoints.Size(); oldnl = loclines.Size(); if (debugflag) (*testout) << "define new transformation" << endl; DefineTransformation (p1, p2, blgeominfo1, blgeominfo2); plainpoints.SetSize (locpoints.Size()); plainzones.SetSize (locpoints.Size()); // (*testout) << endl; if (debugflag) { *testout << "3d->2d transformation" << endl; *testout << "3d points: " << endl << locpoints << endl; } for (int i = 1; i <= locpoints.Size(); i++) { // (*testout) << "pindex(i) = " << pindex[i-1] << endl; TransformToPlain (locpoints.Get(i), mpgeominfo.Get(i), plainpoints.Elem(i), h, plainzones.Elem(i)); // (*testout) << mpgeominfo.Get(i).GetPGI(1).u << " " << mpgeominfo.Get(i).GetPGI(1).v << " "; // (*testout) << plainpoints.Get(i).X() << " " << plainpoints.Get(i).Y() << endl; //(*testout) << "transform " << locpoints.Get(i) << " to " << plainpoints.Get(i).X() << " " << plainpoints.Get(i).Y() << endl; } // (*testout) << endl << endl << endl; if (debugflag) *testout << "2d points: " << endl << plainpoints << endl; p12d = plainpoints.Get(1); p22d = plainpoints.Get(2); /* // last idea on friday plainzones.Elem(1) = 0; plainzones.Elem(2) = 0; */ /* // old netgen: for (i = 2; i <= loclines.Size(); i++) // don't remove first line { z1 = plainzones.Get(loclines.Get(i).I1()); z2 = plainzones.Get(loclines.Get(i).I2()); if (z1 && z2 && (z1 != z2) || (z1 == -1) || (z2 == -1) ) { loclines.DeleteElement(i); lindex.DeleteElement(i); oldnl--; i--; } } // for (i = 1; i <= plainpoints.Size(); i++) // if (plainzones.Elem(i) == -1) // plainpoints.Elem(i) = Point2d (1e4, 1e4); */ for (int i = 2; i <= loclines.Size(); i++) // don't remove first line { // (*testout) << "loclines(i) = " << loclines.Get(i).I1() << " - " << loclines.Get(i).I2() << endl; z1 = plainzones.Get(loclines.Get(i).I1()); z2 = plainzones.Get(loclines.Get(i).I2()); // one inner point, one outer if ( (z1 >= 0) != (z2 >= 0)) { int innerp = (z1 >= 0) ? 1 : 2; if (IsLineVertexOnChart (locpoints.Get(loclines.Get(i).I1()), locpoints.Get(loclines.Get(i).I2()), innerp, adfront->GetLineGeomInfo (lindex.Get(i), innerp))) // pgeominfo.Get(loclines.Get(i).I(innerp)))) { if (!morerisc) { // use one end of line int pini, pouti; Vec2d v; pini = loclines.Get(i).I(innerp); pouti = loclines.Get(i).I(3-innerp); Point2d pin (plainpoints.Get(pini)); Point2d pout (plainpoints.Get(pouti)); v = pout - pin; double len = v.Length(); if (len <= 1e-6) (*testout) << "WARNING(js): inner-outer: short vector" << endl; else v /= len; /* // don't elongate line towards base-line !! if (Vec2d (pin, p12d) * v > 0 && Vec2d (pin, p22d) * v > 0) v *= -1; */ Point2d newpout = pin + 1000 * v; newpout = pout; plainpoints.Append (newpout); Point3d pout3d = locpoints.Get(pouti); locpoints.Append (pout3d); plainzones.Append (0); pindex.Append (-1); oldnp++; loclines.Elem(i).I(3-innerp) = oldnp; } else plainzones.Elem(loclines.Get(i).I(3-innerp)) = 0; // (*testout) << "inner - outer correction" << endl; } else { // remove line loclines.DeleteElement(i); lindex.DeleteElement(i); oldnl--; i--; } } else if ( (z1 > 0 && z2 > 0 && (z1 != z2)) || ((z1 < 0) && (z2 < 0)) ) { loclines.DeleteElement(i); lindex.DeleteElement(i); oldnl--; i--; } } legalpoints.SetSize(plainpoints.Size()); for (int i = 1; i <= legalpoints.Size(); i++) legalpoints.Elem(i) = 1; double avy = 0; for (int i = 1; i <= plainpoints.Size(); i++) avy += plainpoints.Elem(i).Y(); avy *= 1./plainpoints.Size(); for (int i = 1; i <= plainpoints.Size(); i++) { if (plainzones.Elem(i) < 0) { plainpoints.Elem(i) = Point2d (1e4, 1e4); legalpoints.Elem(i) = 0; } if (pindex.Elem(i) == -1) { legalpoints.Elem(i) = 0; } if (plainpoints.Elem(i).Y() < -1e-10*avy) // changed { legalpoints.Elem(i) = 0; } } /* for (i = 3; i <= plainpoints.Size(); i++) if (sqr (plainpoints.Get(i).X()) + sqr (plainpoints.Get(i).Y()) > sqr (2 + 0.2 * qualclass)) legalpoints.Elem(i) = 0; */ /* int clp = 0; for (i = 1; i <= plainpoints.Size(); i++) if (legalpoints.Get(i)) clp++; (*testout) << "legalpts: " << clp << "/" << plainpoints.Size() << endl; // sort legal/illegal lines int lastleg = 2; int firstilleg = oldnl; while (lastleg < firstilleg) { while (legalpoints.Get(loclines.Get(lastleg).I1()) && legalpoints.Get(loclines.Get(lastleg).I2()) && lastleg < firstilleg) lastleg++; while ( ( !legalpoints.Get(loclines.Get(firstilleg).I1()) || !legalpoints.Get(loclines.Get(firstilleg).I2())) && lastleg < firstilleg) firstilleg--; if (lastleg < firstilleg) { swap (loclines.Elem(lastleg), loclines.Elem(firstilleg)); swap (lindex.Elem(lastleg), lindex.Elem(firstilleg)); } } (*testout) << "leglines " << lastleg << "/" << oldnl << endl; */ GetChartBoundary (chartboundpoints, chartboundpoints3d, chartboundlines, h); oldnp = plainpoints.Size(); maxlegalpoint = locpoints.Size(); maxlegalline = loclines.Size(); if (mp.checkchartboundary) { for (int i = 1; i <= chartboundpoints.Size(); i++) { plainpoints.Append (chartboundpoints.Get(i)); locpoints.Append (chartboundpoints3d.Get(i)); legalpoints.Append (0); } for (int i = 1; i <= chartboundlines.Size(); i++) { INDEX_2 line (chartboundlines.Get(i).I1()+oldnp, chartboundlines.Get(i).I2()+oldnp); loclines.Append (line); // (*testout) << "line: " << line.I1() << "-" << line.I2() << endl; } } oldnl = loclines.Size(); oldnp = plainpoints.Size(); } /* if (qualclass > 100) { multithread.drawing = 1; glrender(1); cout << "qualclass 100, nfl = " << adfront->GetNFL() << endl; } */ if (found) { rulenr = ApplyRules (plainpoints, legalpoints, maxlegalpoint, loclines, maxlegalline, locelements, dellines, qualclass, mp); // (*testout) << "Rule Nr = " << rulenr << endl; if (!rulenr) { found = 0; if ( debugflag || debugparam.haltnosuccess ) PrintWarning ("no rule found"); } } NgProfiler::RegionTimer reg3 (timer3); for (int i = 1; i <= locelements.Size() && found; i++) { const Element2d & el = locelements.Get(i); for (int j = 1; j <= el.GetNP(); j++) if (el.PNum(j) <= oldnp && pindex.Get(el.PNum(j)) == -1) { found = 0; PrintSysError ("meshing2, index missing"); } } if (found) { locpoints.SetSize (plainpoints.Size()); upgeominfo.SetSize(locpoints.Size()); for (int i = oldnp+1; i <= plainpoints.Size(); i++) { int err = TransformFromPlain (plainpoints.Elem(i), locpoints.Elem(i), upgeominfo.Elem(i), h); if (err) { found = 0; if ( debugflag || debugparam.haltnosuccess ) PrintSysError ("meshing2, Backtransformation failed"); break; } } } // for (i = 1; i <= oldnl; i++) // adfront -> ResetClass (lindex[i]); /* double violateminh; if (qualclass <= 10) violateminh = 3; else violateminh = 3 * qualclass; if (uselocalh && found) // && qualclass <= 10) { for (i = 1; i <= locelements.Size(); i++) { Point3d pmin = locpoints.Get(locelements.Get(i).PNum(1)); Point3d pmax = pmin; for (j = 2; j <= 3; j++) { const Point3d & hp = locpoints.Get(locelements.Get(i).PNum(j)); pmin.SetToMin (hp); pmax.SetToMax (hp); } double minh = mesh.GetMinH (pmin, pmax); if (h > violateminh * minh) { found = 0; loclines.SetSize (oldnl); locpoints.SetSize (oldnp); } } } */ if (found) { double violateminh = 3 + 0.1 * sqr (qualclass); double minh = 1e8; double newedgemaxh = 0; for (int i = oldnl+1; i <= loclines.Size(); i++) { double eh = Dist (locpoints.Get(loclines.Get(i).I1()), locpoints.Get(loclines.Get(i).I2())); // Markus (brute force method to avoid bad elements on geometries like \_/ ) //if(eh > 4.*mesh.GetH(locpoints.Get(loclines.Get(i).I1()))) found = 0; //if(eh > 4.*mesh.GetH(locpoints.Get(loclines.Get(i).I2()))) found = 0; // Markus end if (eh > newedgemaxh) newedgemaxh = eh; } for (int i = 1; i <= locelements.Size(); i++) { Point3d pmin = locpoints.Get(locelements.Get(i).PNum(1)); Point3d pmax = pmin; for (int j = 2; j <= locelements.Get(i).GetNP(); j++) { const Point3d & hp = locpoints.Get(locelements.Get(i).PNum(j)); pmin.SetToMin (hp); pmax.SetToMax (hp); } double eh = mesh.GetMinH (pmin, pmax); if (eh < minh) minh = eh; } for (int i = 1; i <= locelements.Size(); i++) for (int j = 1; j <= locelements.Get(i).GetNP(); j++) if (Dist2 (locpoints.Get(locelements.Get(i).PNum(j)), pmid) > hinner*hinner) found = 0; // cout << "violate = " << newedgemaxh / minh << endl; static double maxviolate = 0; if (newedgemaxh / minh > maxviolate) { maxviolate = newedgemaxh / minh; // cout << "max minhviolate = " << maxviolate << endl; } if (newedgemaxh > violateminh * minh) { found = 0; loclines.SetSize (oldnl); locpoints.SetSize (oldnp); if ( debugflag || debugparam.haltnosuccess ) PrintSysError ("meshing2, maxh too large"); } } /* // test good ComputeLineGeoInfo if (found) { // is line on chart ? for (i = oldnl+1; i <= loclines.Size(); i++) { int gisize; void *geominfo; if (ComputeLineGeoInfo (locpoints.Get(loclines.Get(i).I1()), locpoints.Get(loclines.Get(i).I2()), gisize, geominfo)) found = 0; } } */ // changed for OCC meshing if (found) { // take geominfo from dellines // upgeominfo.SetSize(locpoints.Size()); /* for (i = 1; i <= dellines.Size(); i++) for (j = 1; j <= 2; j++) { upgeominfo.Elem(loclines.Get(dellines.Get(i)).I(j)) = adfront -> GetLineGeomInfo (lindex.Get(dellines.Get(i)), j); } */ for (int i = 1; i <= locelements.Size(); i++) for (int j = 1; j <= locelements.Get(i).GetNP(); j++) { int pi = locelements.Get(i).PNum(j); if (pi <= oldnp) { if (ChooseChartPointGeomInfo (mpgeominfo.Get(pi), upgeominfo.Elem(pi))) { // cannot select, compute new one PrintWarning ("calc point geominfo instead of using"); if (ComputePointGeomInfo (locpoints.Get(pi), upgeominfo.Elem(pi))) { found = 0; PrintSysError ("meshing2d, geominfo failed"); } } } } /* // use upgeominfo from ProjectFromPlane for (i = oldnp+1; i <= locpoints.Size(); i++) { if (ComputePointGeomInfo (locpoints.Get(i), upgeominfo.Elem(i))) { found = 0; if ( debugflag || debugparam.haltnosuccess ) PrintSysError ("meshing2d, compute geominfo failed"); } } */ } if (found && mp.checkoverlap) { // cout << "checkoverlap" << endl; // test for overlaps Point3d hullmin(1e10, 1e10, 1e10); Point3d hullmax(-1e10, -1e10, -1e10); for (int i = 1; i <= locelements.Size(); i++) for (int j = 1; j <= locelements.Get(i).GetNP(); j++) { const Point3d & p = locpoints.Get(locelements.Get(i).PNum(j)); hullmin.SetToMin (p); hullmax.SetToMax (p); } hullmin += Vec3d (-his, -his, -his); hullmax += Vec3d ( his, his, his); surfeltree.GetIntersecting (hullmin, hullmax, intersecttrias); critpoints.SetSize (0); for (int i = oldnp+1; i <= locpoints.Size(); i++) critpoints.Append (locpoints.Get(i)); for (int i = 1; i <= locelements.Size(); i++) { const Element2d & tri = locelements.Get(i); if (tri.GetNP() == 3) { const Point3d & tp1 = locpoints.Get(tri.PNum(1)); const Point3d & tp2 = locpoints.Get(tri.PNum(2)); const Point3d & tp3 = locpoints.Get(tri.PNum(3)); Vec3d tv1 (tp1, tp2); Vec3d tv2 (tp1, tp3); double lam1, lam2; for (lam1 = 0.2; lam1 <= 0.8; lam1 += 0.2) for (lam2 = 0.2; lam2 + lam1 <= 0.8; lam2 += 0.2) { Point3d hp = tp1 + lam1 * tv1 + lam2 * tv2; critpoints.Append (hp); } } else if (tri.GetNP() == 4) { const Point3d & tp1 = locpoints.Get(tri.PNum(1)); const Point3d & tp2 = locpoints.Get(tri.PNum(2)); const Point3d & tp3 = locpoints.Get(tri.PNum(3)); const Point3d & tp4 = locpoints.Get(tri.PNum(4)); double l1, l2; for (l1 = 0.1; l1 <= 0.9; l1 += 0.1) for (l2 = 0.1; l2 <= 0.9; l2 += 0.1) { Point3d hp; hp.X() = (1-l1)*(1-l2) * tp1.X() + l1*(1-l2) * tp2.X() + l1*l2 * tp3.X() + (1-l1)*l2 * tp4.X(); hp.Y() = (1-l1)*(1-l2) * tp1.Y() + l1*(1-l2) * tp2.Y() + l1*l2 * tp3.Y() + (1-l1)*l2 * tp4.Y(); hp.Z() = (1-l1)*(1-l2) * tp1.Z() + l1*(1-l2) * tp2.Z() + l1*l2 * tp3.Z() + (1-l1)*l2 * tp4.Z(); critpoints.Append (hp); } } } /* for (i = oldnl+1; i <= loclines.Size(); i++) { Point3d hp = locpoints.Get(loclines.Get(i).I1()); Vec3d hv(hp, locpoints.Get(loclines.Get(i).I2())); int ncp = 2; for (j = 1; j <= ncp; j++) critpoints.Append ( hp + (double(j)/(ncp+1)) * hv); } */ /* for (i = oldnp+1; i <= locpoints.Size(); i++) { const Point3d & p = locpoints.Get(i); */ for (int i = 1; i <= critpoints.Size(); i++) { const Point3d & p = critpoints.Get(i); for (int jj = 0; jj < intersecttrias.Size(); jj++) { // int j = intersecttrias.Get(jj); // const Element2d & el = mesh.SurfaceElement(j); SurfaceElementIndex j = intersecttrias[jj]; const Element2d & el = mesh[j]; int ntrig = (el.GetNP() == 3) ? 1 : 2; int jl; for (jl = 1; jl <= ntrig; jl++) { Point3d tp1, tp2, tp3; if (jl == 1) { tp1 = mesh.Point(el.PNum(1)); tp2 = mesh.Point(el.PNum(2)); tp3 = mesh.Point(el.PNum(3)); } else { tp1 = mesh.Point(el.PNum(1)); tp2 = mesh.Point(el.PNum(3)); tp3 = mesh.Point(el.PNum(4)); } int onchart = 0; for (int k = 1; k <= el.GetNP(); k++) if (BelongsToActiveChart (mesh.Point(el.PNum(k)), el.GeomInfoPi(k))) onchart = 1; if (!onchart) continue; Vec3d e1(tp1, tp2); Vec3d e2(tp1, tp3); Vec3d n = Cross (e1, e2); n /= n.Length(); double lam1, lam2, lam3; lam3 = n * Vec3d (tp1, p); LocalCoordinates (e1, e2, Vec3d (tp1, p), lam1, lam2); if (fabs (lam3) < 0.1 * hshould && lam1 > 0 && lam2 > 0 && (lam1 + lam2) < 1) { #ifdef DEVELOP cout << "overlap" << endl; (*testout) << "overlap:" << endl << "tri = " << tp1 << "-" << tp2 << "-" << tp3 << endl << "point = " << p << endl << "lam1, 2 = " << lam1 << ", " << lam2 << endl << "lam3 = " << lam3 << endl; // cout << "overlap !!!" << endl; #endif for (int k = 1; k <= 5; k++) adfront -> IncrementClass (lindex.Get(1)); found = 0; if ( debugflag || debugparam.haltnosuccess ) PrintWarning ("overlapping"); if (debugparam.haltoverlap) { debugflag = 1; } /* multithread.drawing = 1; glrender(1); */ } } } } } if (found) { // check, whether new front line already exists for (int i = oldnl+1; i <= loclines.Size(); i++) { int nlgpi1 = loclines.Get(i).I1(); int nlgpi2 = loclines.Get(i).I2(); if (nlgpi1 <= pindex.Size() && nlgpi2 <= pindex.Size()) { nlgpi1 = adfront->GetGlobalIndex (pindex.Get(nlgpi1)); nlgpi2 = adfront->GetGlobalIndex (pindex.Get(nlgpi2)); int exval = adfront->ExistsLine (nlgpi1, nlgpi2); if (exval) { cout << "ERROR: new line exits, val = " << exval << endl; (*testout) << "ERROR: new line exits, val = " << exval << endl; found = 0; if (debugparam.haltexistingline) debugflag = 1; } } } } /* if (found) { // check, whether new triangles insert edges twice for (i = 1; i <= locelements.Size(); i++) for (j = 1; j <= 3; j++) { int tpi1 = locelements.Get(i).PNumMod (j); int tpi2 = locelements.Get(i).PNumMod (j+1); if (tpi1 <= pindex.Size() && tpi2 <= pindex.Size()) { tpi1 = adfront->GetGlobalIndex (pindex.Get(tpi1)); tpi2 = adfront->GetGlobalIndex (pindex.Get(tpi2)); if (doubleedge.Used (INDEX_2(tpi1, tpi2))) { if (debugparam.haltexistingline) debugflag = 1; cerr << "ERROR Insert edge " << tpi1 << " - " << tpi2 << " twice !!!" << endl; found = 0; } doubleedge.Set (INDEX_2(tpi1, tpi2), 1); } } } */ if (found) { // everything is ok, perform mesh update ruleused.Elem(rulenr)++; pindex.SetSize(locpoints.Size()); for (int i = oldnp+1; i <= locpoints.Size(); i++) { PointIndex globind = mesh.AddPoint (locpoints.Get(i)); pindex.Elem(i) = adfront -> AddPoint (locpoints.Get(i), globind); } for (int i = oldnl+1; i <= loclines.Size(); i++) { /* for (j = 1; j <= locpoints.Size(); j++) { (*testout) << j << ": " << locpoints.Get(j) << endl; } */ /* ComputeLineGeoInfo (locpoints.Get(loclines.Get(i).I1()), locpoints.Get(loclines.Get(i).I2()), gisize, geominfo); */ if (pindex.Get(loclines.Get(i).I1()) == -1 || pindex.Get(loclines.Get(i).I2()) == -1) { (*testout) << "pindex is 0" << endl; } if (!upgeominfo.Get(loclines.Get(i).I1()).trignum || !upgeominfo.Get(loclines.Get(i).I2()).trignum) { cout << "new el: illegal geominfo" << endl; } adfront -> AddLine (pindex.Get(loclines.Get(i).I1()), pindex.Get(loclines.Get(i).I2()), upgeominfo.Get(loclines.Get(i).I1()), upgeominfo.Get(loclines.Get(i).I2())); } for (int i = 1; i <= locelements.Size(); i++) { Element2d mtri(locelements.Get(i).GetNP()); mtri = locelements.Get(i); mtri.SetIndex (facenr); // compute triangle geominfo: // (*testout) << "triggeominfo: "; for (int j = 1; j <= locelements.Get(i).GetNP(); j++) { mtri.GeomInfoPi(j) = upgeominfo.Get(locelements.Get(i).PNum(j)); // (*testout) << mtri.GeomInfoPi(j).trignum << " "; } // (*testout) << endl; for (int j = 1; j <= locelements.Get(i).GetNP(); j++) { mtri.PNum(j) = locelements.Elem(i).PNum(j) = adfront -> GetGlobalIndex (pindex.Get(locelements.Get(i).PNum(j))); } mesh.AddSurfaceElement (mtri); cntelem++; // cout << "elements: " << cntelem << endl; Box<3> box; box.Set (mesh[mtri[0]]); box.Add (mesh[mtri[1]]); box.Add (mesh[mtri[2]]); surfeltree.Insert (box, mesh.GetNSE()-1); const Point3d & sep1 = mesh.Point (mtri.PNum(1)); const Point3d & sep2 = mesh.Point (mtri.PNum(2)); const Point3d & sep3 = mesh.Point (mtri.PNum(3)); double trigarea = Cross (Vec3d (sep1, sep2), Vec3d (sep1, sep3)).Length() / 2; if (mtri.GetNP() == 4) { const Point3d & sep4 = mesh.Point (mtri.PNum(4)); trigarea += Cross (Vec3d (sep1, sep3), Vec3d (sep1, sep4)).Length() / 2; } meshedarea += trigarea; if(maxarea > 0 && meshedarea-meshedarea_before > maxarea) { cerr << "meshed area = " << meshedarea-meshedarea_before << endl << "maximal area = " << maxarea << endl << "GIVING UP" << endl; return MESHING2_GIVEUP; } for (int j = 1; j <= locelements.Get(i).GetNP(); j++) { int gpi = locelements.Get(i).PNum(j); int oldts = trigsonnode.Size(); if (gpi >= oldts+PointIndex::BASE) { trigsonnode.SetSize (gpi+1-PointIndex::BASE); illegalpoint.SetSize (gpi+1-PointIndex::BASE); for (int k = oldts+PointIndex::BASE; k <= gpi; k++) { trigsonnode[k] = 0; illegalpoint[k] = 0; } } trigsonnode[gpi]++; if (trigsonnode[gpi] > 20) { illegalpoint[gpi] = 1; // cout << "illegal point: " << gpi << endl; (*testout) << "illegal point: " << gpi << endl; } static int mtonnode = 0; if (trigsonnode[gpi] > mtonnode) mtonnode = trigsonnode[gpi]; } // cout << "els = " << cntelem << " trials = " << trials << endl; // if (trials > 100) return; } for (int i = 1; i <= dellines.Size(); i++) adfront -> DeleteLine (lindex.Get(dellines.Get(i))); // rname = rules.Get(rulenr)->Name(); #ifdef MYGRAPH if (silentflag<3) { plotsurf.DrawPnL(locpoints, loclines); plotsurf.Plot(testmode, testmode); } #endif if (morerisc) { cout << "generated due to morerisc" << endl; // multithread.drawing = 1; // glrender(1); } if ( debugparam.haltsuccess || debugflag ) { // adfront -> PrintOpenSegments (*testout); cout << "success of rule" << rules.Get(rulenr)->Name() << endl; multithread.drawing = 1; multithread.testmode = 1; multithread.pause = 1; /* extern STLGeometry * stlgeometry; stlgeometry->ClearMarkedSegs(); for (i = 1; i <= loclines.Size(); i++) { stlgeometry->AddMarkedSeg(locpoints.Get(loclines.Get(i).I1()), locpoints.Get(loclines.Get(i).I2())); } */ (*testout) << "success of rule" << rules.Get(rulenr)->Name() << endl; (*testout) << "trials = " << trials << endl; (*testout) << "locpoints " << endl; for (int i = 1; i <= pindex.Size(); i++) (*testout) << adfront->GetGlobalIndex (pindex.Get(i)) << endl; (*testout) << "old number of lines = " << oldnl << endl; for (int i = 1; i <= loclines.Size(); i++) { (*testout) << "line "; for (int j = 1; j <= 2; j++) { int hi = 0; if (loclines.Get(i).I(j) >= 1 && loclines.Get(i).I(j) <= pindex.Size()) hi = adfront->GetGlobalIndex (pindex.Get(loclines.Get(i).I(j))); (*testout) << hi << " "; } (*testout) << " : " << plainpoints.Get(loclines.Get(i).I1()) << " - " << plainpoints.Get(loclines.Get(i).I2()) << " 3d: " << locpoints.Get(loclines.Get(i).I1()) << " - " << locpoints.Get(loclines.Get(i).I2()) << endl; } glrender(1); } } else { adfront -> IncrementClass (lindex.Get(1)); if ( debugparam.haltnosuccess || debugflag ) { cout << "Problem with seg " << gpi1 << " - " << gpi2 << ", class = " << qualclass << endl; (*testout) << "Problem with seg " << gpi1 << " - " << gpi2 << ", class = " << qualclass << endl; multithread.drawing = 1; multithread.testmode = 1; multithread.pause = 1; /* extern STLGeometry * stlgeometry; stlgeometry->ClearMarkedSegs(); for (i = 1; i <= loclines.Size(); i++) { stlgeometry->AddMarkedSeg(locpoints.Get(loclines.Get(i).I1()), locpoints.Get(loclines.Get(i).I2())); } */ for (int i = 1; i <= loclines.Size(); i++) { (*testout) << "line "; for (int j = 1; j <= 2; j++) { int hi = 0; if (loclines.Get(i).I(j) >= 1 && loclines.Get(i).I(j) <= pindex.Size()) hi = adfront->GetGlobalIndex (pindex.Get(loclines.Get(i).I(j))); (*testout) << hi << " "; } (*testout) << " : " << plainpoints.Get(loclines.Get(i).I1()) << " - " << plainpoints.Get(loclines.Get(i).I2()) << " 3d: " << locpoints.Get(loclines.Get(i).I1()) << " - " << locpoints.Get(loclines.Get(i).I2()) << endl; } /* cout << "p1gi = " << blgeominfo[0].trignum << ", p2gi = " << blgeominfo[1].trignum << endl; */ glrender(1); } #ifdef MYGRAPH if (silentflag<3) { if (testmode || trials%2 == 0) { plotsurf.DrawPnL(locpoints, loclines); plotsurf.Plot(testmode, testmode); } } #endif } } PrintMessage (3, "Surface meshing done"); adfront->PrintOpenSegments (*testout); multithread.task = savetask; EndMesh (); if (!adfront->Empty()) return MESHING2_GIVEUP; return MESHING2_OK; } } // #define OPENGL #ifdef OPENGLxx /* *********************** Draw Surface Meshing **************** */ #include #include namespace netgen { extern STLGeometry * stlgeometry; extern Mesh * mesh; VisualSceneSurfaceMeshing vssurfacemeshing; void glrender (int wait) { // cout << "plot adfront" << endl; if (multithread.drawing) { // vssurfacemeshing.Render(); Render (); if (wait || multithread.testmode) { multithread.pause = 1; } while (multithread.pause); } } VisualSceneSurfaceMeshing :: VisualSceneSurfaceMeshing () : VisualScene() { ; } VisualSceneSurfaceMeshing :: ~VisualSceneSurfaceMeshing () { ; } void VisualSceneSurfaceMeshing :: DrawScene () { int i, j, k; if (loclines.Size() != changeval) { center = Point<3>(0,0,-5); rad = 0.1; CalcTransformationMatrices(); changeval = loclines.Size(); } glClearColor(backcolor, backcolor, backcolor, 1.0); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); SetLight(); // glEnable (GL_COLOR_MATERIAL); // glDisable (GL_SHADING); // glColor3f (0.0f, 1.0f, 1.0f); // glLineWidth (1.0f); // glShadeModel (GL_SMOOTH); // glCallList (linelists.Get(1)); // SetLight(); glPushMatrix(); glMultMatrixf (transformationmat); glShadeModel (GL_SMOOTH); // glDisable (GL_COLOR_MATERIAL); glEnable (GL_COLOR_MATERIAL); glPolygonMode (GL_FRONT_AND_BACK, GL_FILL); glEnable (GL_BLEND); glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // glEnable (GL_LIGHTING); double shine = vispar.shininess; double transp = vispar.transp; glMaterialf (GL_FRONT_AND_BACK, GL_SHININESS, shine); glLogicOp (GL_COPY); /* float mat_col[] = { 0.2, 0.2, 0.8, 1 }; glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_col); glPolygonOffset (1, 1); glEnable (GL_POLYGON_OFFSET_FILL); float mat_colbl[] = { 0.8, 0.2, 0.2, 1 }; float mat_cololdl[] = { 0.2, 0.8, 0.2, 1 }; float mat_colnewl[] = { 0.8, 0.8, 0.2, 1 }; glPolygonMode (GL_FRONT_AND_BACK, GL_FILL); glPolygonOffset (1, -1); glLineWidth (3); for (i = 1; i <= loclines.Size(); i++) { if (i == 1) { glEnable (GL_POLYGON_OFFSET_FILL); glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_colbl); } else if (i <= oldnl) glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_cololdl); else glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_colnewl); int pi1 = loclines.Get(i).I1(); int pi2 = loclines.Get(i).I2(); if (pi1 >= 1 && pi2 >= 1) { Point3d p1 = locpoints.Get(pi1); Point3d p2 = locpoints.Get(pi2); glBegin (GL_LINES); glVertex3f (p1.X(), p1.Y(), p1.Z()); glVertex3f (p2.X(), p2.Y(), p2.Z()); glEnd(); } glDisable (GL_POLYGON_OFFSET_FILL); } glLineWidth (1); glPointSize (5); float mat_colp[] = { 1, 0, 0, 1 }; glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_colp); glBegin (GL_POINTS); for (i = 1; i <= locpoints.Size(); i++) { Point3d p = locpoints.Get(i); glVertex3f (p.X(), p.Y(), p.Z()); } glEnd(); glPopMatrix(); */ float mat_colp[] = { 1, 0, 0, 1 }; float mat_col2d1[] = { 1, 0.5, 0.5, 1 }; float mat_col2d[] = { 1, 1, 1, 1 }; glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_col2d); double scalex = 0.1, scaley = 0.1; glBegin (GL_LINES); for (i = 1; i <= loclines.Size(); i++) { glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_col2d); if (i == 1) glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_col2d1); int pi1 = loclines.Get(i).I1(); int pi2 = loclines.Get(i).I2(); if (pi1 >= 1 && pi2 >= 1) { Point2d p1 = plainpoints.Get(pi1); Point2d p2 = plainpoints.Get(pi2); glBegin (GL_LINES); glVertex3f (scalex * p1.X(), scaley * p1.Y(), -5); glVertex3f (scalex * p2.X(), scaley * p2.Y(), -5); glEnd(); } } glEnd (); glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_colp); glBegin (GL_POINTS); for (i = 1; i <= plainpoints.Size(); i++) { Point2d p = plainpoints.Get(i); glVertex3f (scalex * p.X(), scaley * p.Y(), -5); } glEnd(); glDisable (GL_POLYGON_OFFSET_FILL); glPopMatrix(); DrawCoordinateCross (); DrawNetgenLogo (); glFinish(); /* glDisable (GL_POLYGON_OFFSET_FILL); // cout << "draw surfacemeshing" << endl; // // if (changeval != stlgeometry->GetNT()) // BuildScene(); // changeval = stlgeometry->GetNT(); glClearColor(backcolor, backcolor, backcolor, 1.0); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); SetLight(); glPushMatrix(); glLoadMatrixf (transmat); glMultMatrixf (rotmat); glShadeModel (GL_SMOOTH); glDisable (GL_COLOR_MATERIAL); glPolygonMode (GL_FRONT_AND_BACK, GL_FILL); glEnable (GL_BLEND); glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); float mat_spec_col[] = { 1, 1, 1, 1 }; glMaterialfv (GL_FRONT_AND_BACK, GL_SPECULAR, mat_spec_col); double shine = vispar.shininess; double transp = vispar.transp; glMaterialf (GL_FRONT_AND_BACK, GL_SHININESS, shine); glLogicOp (GL_COPY); float mat_col[] = { 0.2, 0.2, 0.8, transp }; float mat_colrt[] = { 0.2, 0.8, 0.8, transp }; glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_col); glPolygonOffset (1, 1); glEnable (GL_POLYGON_OFFSET_FILL); glColor3f (1.0f, 1.0f, 1.0f); glEnable (GL_NORMALIZE); // glBegin (GL_TRIANGLES); // for (j = 1; j <= stlgeometry -> GetNT(); j++) // { // glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_col); // if (j == geomtrig) // glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_colrt); // const STLReadTriangle & tria = stlgeometry -> GetReadTriangle(j); // glNormal3f (tria.normal.X(), // tria.normal.Y(), // tria.normal.Z()); // for (k = 0; k < 3; k++) // { // glVertex3f (tria.pts[k].X(), // tria.pts[k].Y(), // tria.pts[k].Z()); // } // } // glEnd (); glDisable (GL_POLYGON_OFFSET_FILL); float mat_colbl[] = { 0.8, 0.2, 0.2, 1 }; float mat_cololdl[] = { 0.2, 0.8, 0.2, 1 }; float mat_colnewl[] = { 0.8, 0.8, 0.2, 1 }; glPolygonMode (GL_FRONT_AND_BACK, GL_FILL); glPolygonOffset (1, -1); glLineWidth (3); for (i = 1; i <= loclines.Size(); i++) { if (i == 1) { glEnable (GL_POLYGON_OFFSET_FILL); glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_colbl); } else if (i <= oldnl) glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_cololdl); else glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_colnewl); int pi1 = loclines.Get(i).I1(); int pi2 = loclines.Get(i).I2(); if (pi1 >= 1 && pi2 >= 1) { Point3d p1 = locpoints.Get(pi1); Point3d p2 = locpoints.Get(pi2); glBegin (GL_LINES); glVertex3f (p1.X(), p1.Y(), p1.Z()); glVertex3f (p2.X(), p2.Y(), p2.Z()); glEnd(); } glDisable (GL_POLYGON_OFFSET_FILL); } glLineWidth (1); glPointSize (5); float mat_colp[] = { 1, 0, 0, 1 }; glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_colp); glBegin (GL_POINTS); for (i = 1; i <= locpoints.Size(); i++) { Point3d p = locpoints.Get(i); glVertex3f (p.X(), p.Y(), p.Z()); } glEnd(); glPopMatrix(); float mat_col2d1[] = { 1, 0.5, 0.5, 1 }; float mat_col2d[] = { 1, 1, 1, 1 }; glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_col2d); double scalex = 0.1, scaley = 0.1; glBegin (GL_LINES); for (i = 1; i <= loclines.Size(); i++) { glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_col2d); if (i == 1) glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_col2d1); int pi1 = loclines.Get(i).I1(); int pi2 = loclines.Get(i).I2(); if (pi1 >= 1 && pi2 >= 1) { Point2d p1 = plainpoints.Get(pi1); Point2d p2 = plainpoints.Get(pi2); glBegin (GL_LINES); glVertex3f (scalex * p1.X(), scaley * p1.Y(), -5); glVertex3f (scalex * p2.X(), scaley * p2.Y(), -5); glEnd(); } } glEnd (); glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_colp); glBegin (GL_POINTS); for (i = 1; i <= plainpoints.Size(); i++) { Point2d p = plainpoints.Get(i); glVertex3f (scalex * p.X(), scaley * p.Y(), -5); } glEnd(); glFinish(); */ } void VisualSceneSurfaceMeshing :: BuildScene (int zoomall) { int i, j, k; /* center = stlgeometry -> GetBoundingBox().Center(); rad = stlgeometry -> GetBoundingBox().Diam() / 2; CalcTransformationMatrices(); */ } } #else namespace netgen { void glrender (int wait) { ; } } #endif netgen-6.2.1804/libsrc/meshing/msghandler.hpp0000644000175000017500000000603413272137567017555 0ustar kurtkurt#ifndef FILE_MSGHANDLER #define FILE_MSGHANDLER /**************************************************************************/ /* File: msghandler.hh */ /* Author: Johannes Gerstmayr */ /* Date: 20. Nov. 99 */ /**************************************************************************/ namespace netgen { extern void PrintDot(char ch = '.'); //Message Pipeline: //importance: importance of message: 1=very important, 3=middle, 5=low, 7=unimportant extern DLL_HEADER void PrintMessage(int importance, const MyStr& s1, const MyStr& s2=MyStr()); extern DLL_HEADER void PrintMessage(int importance, const MyStr& s1, const MyStr& s2, const MyStr& s3, const MyStr& s4=MyStr()); extern DLL_HEADER void PrintMessage(int importance, const MyStr& s1, const MyStr& s2, const MyStr& s3, const MyStr& s4, const MyStr& s5, const MyStr& s6=MyStr(), const MyStr& s7=MyStr(), const MyStr& s8=MyStr()); // CR without line-feed extern DLL_HEADER void PrintMessageCR(int importance, const MyStr& s1, const MyStr& s2="", const MyStr& s3="", const MyStr& s4="", const MyStr& s5="", const MyStr& s6="", const MyStr& s7="", const MyStr& s8=""); extern DLL_HEADER void PrintFnStart(const MyStr& s1, const MyStr& s2="", const MyStr& s3="", const MyStr& s4="", const MyStr& s5="", const MyStr& s6="", const MyStr& s7="", const MyStr& s8=""); extern DLL_HEADER void PrintWarning(const MyStr& s1, const MyStr& s2="", const MyStr& s3="", const MyStr& s4="", const MyStr& s5="", const MyStr& s6="", const MyStr& s7="", const MyStr& s8=""); extern DLL_HEADER void PrintError(const MyStr& s1, const MyStr& s2="", const MyStr& s3="", const MyStr& s4="", const MyStr& s5="", const MyStr& s6="", const MyStr& s7="", const MyStr& s8=""); extern DLL_HEADER void PrintFileError(const MyStr& s1, const MyStr& s2="", const MyStr& s3="", const MyStr& s4="", const MyStr& s5="", const MyStr& s6="", const MyStr& s7="", const MyStr& s8=""); extern DLL_HEADER void PrintSysError(const MyStr& s1, const MyStr& s2="", const MyStr& s3="", const MyStr& s4="", const MyStr& s5="", const MyStr& s6="", const MyStr& s7="", const MyStr& s8=""); extern DLL_HEADER void PrintUserError(const MyStr& s1, const MyStr& s2="", const MyStr& s3="", const MyStr& s4="", const MyStr& s5="", const MyStr& s6="", const MyStr& s7="", const MyStr& s8=""); extern DLL_HEADER void PrintTime(const MyStr& s1="", const MyStr& s2="", const MyStr& s3="", const MyStr& s4="", const MyStr& s5="", const MyStr& s6="", const MyStr& s7="", const MyStr& s8=""); extern DLL_HEADER void SetStatMsg(const MyStr& s); extern DLL_HEADER void PushStatus(const MyStr& s); extern DLL_HEADER void PushStatusF(const MyStr& s); extern DLL_HEADER void PopStatus(); extern DLL_HEADER void SetThreadPercent(double percent); extern DLL_HEADER void GetStatus(MyStr & s, double & percentage); } #endif netgen-6.2.1804/libsrc/meshing/clusters.hpp0000644000175000017500000000221213272137567017267 0ustar kurtkurt#ifndef CLUSTERS #define CLUSTERS /**************************************************************************/ /* File: clusers.hh */ /* Author: Joachim Schoeberl */ /* Date: 28. Apr. 01 */ /**************************************************************************/ /* Anisotropic clusters nodes, edges, faces, elements */ class AnisotropicClusters { const Mesh & mesh; int nv, ned, nfa, ne; // connected nodes, nodes = vertices, edges, faces, elements Array cluster_reps; public: AnisotropicClusters (const Mesh & amesh); ~AnisotropicClusters(); void Update(TaskManager tm = &DummyTaskManager, Tracer trace = &DummyTracer); int GetVertexRepresentant (int vnr) const { return cluster_reps.Get(vnr); } int GetEdgeRepresentant (int ednr) const { return cluster_reps.Get(nv+ednr); } int GetFaceRepresentant (int fnr) const { return cluster_reps.Get(nv+ned+fnr); } int GetElementRepresentant (int enr) const { return cluster_reps.Get(nv+ned+nfa+enr); } }; #endif netgen-6.2.1804/libsrc/meshing/adfront2.hpp0000644000175000017500000001275013272137567017152 0ustar kurtkurt#ifndef FILE_ADFRONT2 #define FILE_ADFRONT2 /**************************************************************************/ /* File: adfront2.hpp */ /* Author: Joachim Schoeberl */ /* Date: 01. Okt. 95 */ /**************************************************************************/ /** Advancing front class for surfaces */ /// class FrontPoint2 { /// coordinates Point<3> p; /// global node index PointIndex globalindex; /// number of front lines connected to point int nlinetopoint; /// distance to original boundary int frontnr; bool onsurface; public: /// MultiPointGeomInfo * mgi; /// FrontPoint2 () { globalindex.Invalidate(); // = -1; nlinetopoint = 0; frontnr = INT_MAX-10; // attention: overflow on calculating INT_MAX + 1 mgi = NULL; onsurface = true; } /// FrontPoint2 (const Point<3> & ap, PointIndex agi, MultiPointGeomInfo * amgi, bool aonsurface = true); /// ~FrontPoint2 () { ; } /// const Point<3> & P () const { return p; } /// operator const Point<3> & () const { return p; } /// PointIndex GlobalIndex () const { return globalindex; } /// void AddLine () { nlinetopoint++; } /// void RemoveLine () { nlinetopoint--; if (nlinetopoint == 0) nlinetopoint = -1; } /// bool Valid () const { return nlinetopoint >= 0; } /// bool OnSurface() const { return onsurface; } /// void DecFrontNr (int afrontnr) { if (frontnr > afrontnr) frontnr = afrontnr; } /// int FrontNr () const { return frontnr; } }; /// class FrontLine { private: /// Point Indizes INDEX_2 l; /// quality class int lineclass; /// geometry specific data PointGeomInfo geominfo[2]; public: FrontLine () { lineclass = 1; } /// FrontLine (const INDEX_2 & al) { l = al; lineclass = 1; } /// const INDEX_2 & L () const { return l; } /// int LineClass() const { return lineclass; } /// void IncrementClass () { lineclass++; } /// void ResetClass () { lineclass = 1; } /// bool Valid () const { return l.I1() != -1; } /// void Invalidate () { l.I1() = -1; l.I2() = -1; lineclass = 1000; } void SetGeomInfo (const PointGeomInfo & gi1, const PointGeomInfo & gi2) { geominfo[0] = gi1; geominfo[1] = gi2; } const PointGeomInfo * GetGeomInfo () const { return geominfo; } const PointGeomInfo & GetGeomInfo (int endp) const { return geominfo[endp-1]; } friend class AdFront2; }; class AdFront2 { /// Array points; /// front points Array lines; /// front lines Box3d boundingbox; BoxTree<3> linesearchtree; /// search tree for lines Point3dTree pointsearchtree; /// search tree for points Point3dTree cpointsearchtree; /// search tree for cone points (not used ???) Array delpointl; /// list of deleted front points Array dellinel; /// list of deleted front lines int nfl; /// number of front lines; INDEX_2_HASHTABLE * allflines; /// all front lines ever have been Array invpindex; int minval; int starti; public: /// // AdFront2 (); AdFront2 (const Box3d & aboundingbox); /// ~AdFront2 (); /// // void GetPoints (Array > & apoints) const; /// void Print (ostream & ost) const; /// bool Empty () const { return nfl == 0; } /// int GetNFL () const { return nfl; } const FrontLine & GetLine (int nr) { return lines[nr]; } const FrontPoint2 & GetPoint (int nr) { return points[nr]; } /// int SelectBaseLine (Point<3> & p1, Point<3> & p2, const PointGeomInfo *& geominfo1, const PointGeomInfo *& geominfo2, int & qualclass); /// int GetLocals (int baseline, Array & locpoints, Array & pgeominfo, Array & loclines, // local index Array & pindex, Array & lindex, double xh); /// void DeleteLine (int li); /// int AddPoint (const Point<3> & p, PointIndex globind, MultiPointGeomInfo * mgi = NULL, bool pointonsurface = true); /// int AddLine (int pi1, int pi2, const PointGeomInfo & gi1, const PointGeomInfo & gi2); /// int ExistsLine (int gpi1, int gpi2); /// void IncrementClass (int li) { lines[li].IncrementClass(); } /// void ResetClass (int li) { lines[li].ResetClass(); } /// const PointGeomInfo & GetLineGeomInfo (int li, int lend) const { return lines[li].GetGeomInfo (lend); } /// PointIndex GetGlobalIndex (int pi) const { return points[pi].GlobalIndex(); } /// is Point p inside Surface (flat geometry only) bool Inside (const Point<2> & p) const; bool SameSide (const Point<2> & lp1, const Point<2> & lp2, const Array * /* testfaces */ = NULL) const; /* { return Inside (lp1) == Inside (lp2); } */ /// void SetStartFront (); /// void PrintOpenSegments (ostream & ost) const; }; #endif netgen-6.2.1804/libsrc/meshing/adfront2.cpp0000644000175000017500000003151213272137567017142 0ustar kurtkurt/* Advancing front class for surfaces */ #include #include "meshing.hpp" namespace netgen { FrontPoint2 :: FrontPoint2 (const Point<3> & ap, PointIndex agi, MultiPointGeomInfo * amgi, bool aonsurface) { p = ap; globalindex = agi; nlinetopoint = 0; frontnr = INT_MAX-10; onsurface = aonsurface; if (amgi) { mgi = new MultiPointGeomInfo (*amgi); for (int i = 1; i <= mgi->GetNPGI(); i++) if (mgi->GetPGI(i).trignum <= 0) cout << "Add FrontPoint2, illegal geominfo = " << mgi->GetPGI(i).trignum << endl; } else mgi = NULL; } AdFront2 :: AdFront2 (const Box3d & aboundingbox) : boundingbox(aboundingbox), linesearchtree(boundingbox.PMin(), boundingbox.PMax()), pointsearchtree(boundingbox.PMin(), boundingbox.PMax()), cpointsearchtree(boundingbox.PMin(), boundingbox.PMax()) { nfl = 0; allflines = 0; minval = 0; starti = lines.Begin(); } AdFront2 :: ~AdFront2 () { delete allflines; } void AdFront2 :: PrintOpenSegments (ostream & ost) const { if (nfl > 0) { ost << nfl << " open front segments left:" << endl; for (int i = lines.Begin(); i < lines.End(); i++) if (lines[i].Valid()) ost << i << ": " << GetGlobalIndex (lines[i].L().I1()) << "-" << GetGlobalIndex (lines[i].L().I2()) << endl; } } /* void AdFront2 :: GetPoints (Array > & apoints) const { apoints.Append (points); // for (int i = 0; i < points.Size(); i++) // apoints.Append (points[i].P()); } */ int AdFront2 :: AddPoint (const Point<3> & p, PointIndex globind, MultiPointGeomInfo * mgi, bool pointonsurface) { // inserts at empty position or resizes array int pi; if (delpointl.Size() != 0) { pi = delpointl.Last(); delpointl.DeleteLast (); points[pi] = FrontPoint2 (p, globind, mgi, pointonsurface); } else { points.Append (FrontPoint2 (p, globind, mgi, pointonsurface)); pi = points.Size()-1; } if (mgi) cpointsearchtree.Insert (p, pi); if (pointonsurface) pointsearchtree.Insert (p, pi); return pi; } int AdFront2 :: AddLine (int pi1, int pi2, const PointGeomInfo & gi1, const PointGeomInfo & gi2) { int minfn; int li; FrontPoint2 & p1 = points[pi1]; FrontPoint2 & p2 = points[pi2]; nfl++; p1.AddLine(); p2.AddLine(); minfn = min2 (p1.FrontNr(), p2.FrontNr()); p1.DecFrontNr (minfn+1); p2.DecFrontNr (minfn+1); if (dellinel.Size() != 0) { li = dellinel.Last(); dellinel.DeleteLast (); lines[li] = FrontLine (INDEX_2(pi1, pi2)); } else { lines.Append(FrontLine (INDEX_2(pi1, pi2))); li = lines.Size()-1; } if (!gi1.trignum || !gi2.trignum) { cout << "ERROR: in AdFront::AddLine, illegal geominfo" << endl; } lines[li].SetGeomInfo (gi1, gi2); Box3d lbox; lbox.SetPoint(p1.P()); lbox.AddPoint(p2.P()); linesearchtree.Insert (lbox.PMin(), lbox.PMax(), li); if (allflines) { if (allflines->Used (INDEX_2 (GetGlobalIndex (pi1), GetGlobalIndex (pi2)))) { cerr << "ERROR Adfront2::AddLine: line exists" << endl; (*testout) << "ERROR Adfront2::AddLine: line exists" << endl; } allflines->Set (INDEX_2 (GetGlobalIndex (pi1), GetGlobalIndex (pi2)), 1); } return li; } void AdFront2 :: DeleteLine (int li) { int pi; nfl--; for (int i = 1; i <= 2; i++) { pi = lines[li].L().I(i); points[pi].RemoveLine(); if (!points[pi].Valid()) { delpointl.Append (pi); if (points[pi].mgi) { cpointsearchtree.DeleteElement (pi); delete points[pi].mgi; points[pi].mgi = NULL; } pointsearchtree.DeleteElement (pi); } } if (allflines) { allflines->Set (INDEX_2 (GetGlobalIndex (lines[li].L().I1()), GetGlobalIndex (lines[li].L().I2())), 2); } lines[li].Invalidate(); linesearchtree.DeleteElement (li); dellinel.Append (li); } int AdFront2 :: ExistsLine (int pi1, int pi2) { if (!allflines) return 0; if (allflines->Used (INDEX_2(pi1, pi2))) return allflines->Get (INDEX_2 (pi1, pi2)); else return 0; } int AdFront2 :: SelectBaseLine (Point<3> & p1, Point<3> & p2, const PointGeomInfo *& geominfo1, const PointGeomInfo *& geominfo2, int & qualclass) { int baselineindex = -1; for (int i = starti; i < lines.End(); i++) { if (lines[i].Valid()) { int hi = lines[i].LineClass() + points[lines[i].L().I1()].FrontNr() + points[lines[i].L().I2()].FrontNr(); if (hi <= minval) { minval = hi; baselineindex = i; break; } } } if (baselineindex == -1) { minval = INT_MAX; for (int i = lines.Begin(); i < lines.End(); i++) if (lines[i].Valid()) { int hi = lines[i].LineClass() + points[lines[i].L().I1()].FrontNr() + points[lines[i].L().I2()].FrontNr(); if (hi < minval) { minval = hi; baselineindex = i; } } } starti = baselineindex+1; p1 = points[lines[baselineindex].L().I1()].P(); p2 = points[lines[baselineindex].L().I2()].P(); geominfo1 = &lines[baselineindex].GetGeomInfo(1); geominfo2 = &lines[baselineindex].GetGeomInfo(2); qualclass = lines[baselineindex].LineClass(); return baselineindex; } int AdFront2 :: GetLocals (int baselineindex, Array & locpoints, Array & pgeominfo, Array & loclines, // local index Array & pindex, Array & lindex, double xh) { static int timer = NgProfiler::CreateTimer ("adfront2::GetLocals"); NgProfiler::RegionTimer reg (timer); int pstind; Point<3> midp, p0; pstind = lines[baselineindex].L().I1(); p0 = points[pstind].P(); loclines.Append(lines[baselineindex].L()); lindex.Append(baselineindex); ArrayMem nearlines(0); ArrayMem nearpoints(0); // dominating costs !! linesearchtree.GetIntersecting (p0 - Vec3d(xh, xh, xh), p0 + Vec3d(xh, xh, xh), nearlines); pointsearchtree.GetIntersecting (p0 - Vec3d(xh, xh, xh), p0 + Vec3d(xh, xh, xh), nearpoints); for (int ii = 0; ii < nearlines.Size(); ii++) { int i = nearlines[ii]; if (lines[i].Valid() && i != baselineindex) { loclines.Append(lines[i].L()); lindex.Append(i); } } // static Array invpindex; invpindex.SetSize (points.Size()); // invpindex = -1; for (int i = 0; i < nearpoints.Size(); i++) invpindex[nearpoints[i]] = -1; for (int i = 0; i < loclines.Size(); i++) { invpindex[loclines[i].I1()] = 0; invpindex[loclines[i].I2()] = 0; } for (int i = 0; i < loclines.Size(); i++) { for (int j = 0; j < 2; j++) { int pi = loclines[i][j]; if (invpindex[pi] == 0) { pindex.Append (pi); invpindex[pi] = pindex.Size(); locpoints.Append (points[pi].P()); loclines[i][j] = locpoints.Size(); } else loclines[i][j] = invpindex[pi]; } } // double xh2 = xh*xh; for (int ii = 0; ii < nearpoints.Size(); ii++) { int i = nearpoints[ii]; if (points[i].Valid() && points[i].OnSurface() && // Dist2 (points.Get(i).P(), p0) <= xh2 && invpindex[i] <= 0) { locpoints.Append (points[i].P()); invpindex[i] = locpoints.Size(); pindex.Append(i); } } /* double xh2 = xh*xh; for (i = 1; i <= points.Size(); i++) { if (points.Get(i).Valid() && points.Get(i).OnSurface() && Dist2 (points.Get(i).P(), p0) <= xh2 && invpindex.Get(i) <= 0) { invpindex.Elem(i) = locpoints.Append (points.Get(i).P()); pindex.Append(i); } } */ pgeominfo.SetSize (locpoints.Size()); for (int i = 0; i < pgeominfo.Size(); i++) pgeominfo[i].Init(); for (int i = 0; i < loclines.Size(); i++) for (int j = 0; j < 2; j++) { int lpi = loclines[i][j]; const PointGeomInfo & gi = lines[lindex[i]].GetGeomInfo (j+1); pgeominfo.Elem(lpi).AddPointGeomInfo (gi); /* if (pgeominfo.Elem(lpi).cnt == MULTIPOINTGEOMINFO_MAX) break; const PointGeomInfo & gi = lines.Get(lindex.Get(i)).GetGeomInfo (j); PointGeomInfo * pgi = pgeominfo.Elem(lpi).mgi; int found = 0; for (k = 0; k < pgeominfo.Elem(lpi).cnt; k++) if (pgi[k].trignum == gi.trignum) found = 1; if (!found) { pgi[pgeominfo.Elem(lpi).cnt] = gi; pgeominfo.Elem(lpi).cnt++; } */ } for (int i = 0; i < locpoints.Size(); i++) { int pi = pindex[i]; if (points[pi].mgi) for (int j = 1; j <= points[pi].mgi->GetNPGI(); j++) pgeominfo[i].AddPointGeomInfo (points[pi].mgi->GetPGI(j)); } if (loclines.Size() == 1) { cout << "loclines.Size = 1" << endl; (*testout) << "loclines.size = 1" << endl << " h = " << xh << endl << " nearline.size = " << nearlines.Size() << endl << " p0 = " << p0 << endl; } return lines[baselineindex].LineClass(); } void AdFront2 :: SetStartFront () { for (int i = lines.Begin(); i < lines.End(); i++) if (lines[i].Valid()) for (int j = 1; j <= 2; j++) points[lines[i].L().I(j)].DecFrontNr(0); } void AdFront2 :: Print (ostream & ost) const { ost << points.Size() << " Points: " << endl; for (int i = points.Begin(); i < points.End(); i++) if (points[i].Valid()) ost << i << " " << points[i].P() << endl; ost << nfl << " Lines: " << endl; for (int i = lines.Begin(); i < lines.End(); i++) if (lines[i].Valid()) ost << lines[i].L().I1() << " - " << lines[i].L().I2() << endl; ost << flush; } bool AdFront2 :: Inside (const Point<2> & p) const { int cnt; Vec<2> n; Vec<3> v1; DenseMatrix a(2), ainv(2); Vector b(2), u(2); // quasi-random numbers: n(0) = 0.123871; n(1) = 0.15432; cnt = 0; for (int i = 0; i < lines.Size(); i++) if (lines[i].Valid()) { const Point<3> & p1 = points[lines[i].L().I1()].P(); const Point<3> & p2 = points[lines[i].L().I2()].P(); v1 = p2 - p1; a(0, 0) = v1(0); a(1, 0) = v1(1); a(0, 1) = -n(0); a(1, 1) = -n(1); b(0) = p(0) - p1(0); b(1) = p(1) - p1(1); CalcInverse (a, ainv); ainv.Mult (b, u); if (u(0) >= 0 && u(0) <= 1 && u(1) > 0) cnt++; } return ((cnt % 2) != 0); } bool AdFront2 :: SameSide (const Point<2> & lp1, const Point<2> & lp2, const Array * testfaces) const { int cnt = 0; if (testfaces) { for (int ii = 0; ii < testfaces->Size(); ii++) if (lines[(*testfaces)[ii]].Valid()) { int i = (*testfaces)[ii]; const Point<3> & p13d = points[lines[i].L().I1()].P(); const Point<3> & p23d = points[lines[i].L().I2()].P(); Point<2> p1(p13d(0), p13d(1)); Point<2> p2(p23d(0), p23d(1)); // p1 + alpha v = lp1 + beta vl Vec<2> v = p2-p1; Vec<2> vl = lp2 - lp1; Mat<2,2> mat, inv; Vec<2> rhs, sol; mat(0,0) = v(0); mat(1,0) = v(1); mat(0,1) = -vl(0); mat(1,1) = -vl(1); rhs = lp1-p1; if (Det(mat) == 0) continue; CalcInverse (mat, inv); sol = inv * rhs; if ( (sol(0) >= 0) && (sol(0) <= 1) && (sol(1) >= 0) && (sol(1) <= 1)) { cnt++; } } } else { for (int i = 0; i < lines.Size(); i++) if (lines[i].Valid()) { const Point<3> & p13d = points[lines[i].L().I1()].P(); const Point<3> & p23d = points[lines[i].L().I2()].P(); Point<2> p1(p13d(0), p13d(1)); Point<2> p2(p23d(0), p23d(1)); // p1 + alpha v = lp1 + beta vl Vec<2> v = p2-p1; Vec<2> vl = lp2 - lp1; Mat<2,2> mat, inv; Vec<2> rhs, sol; mat(0,0) = v(0); mat(1,0) = v(1); mat(0,1) = -vl(0); mat(1,1) = -vl(1); rhs = lp1-p1; if (Det(mat) == 0) continue; CalcInverse (mat, inv); sol = inv * rhs; if ((sol(0) >= 0) && (sol(0) <= 1) && (sol(1) >= 0) && (sol(1) <= 1)) { cnt++; } } } return ((cnt % 2) == 0); } } netgen-6.2.1804/libsrc/meshing/paralleltop.hpp0000644000175000017500000000701413272137567017747 0ustar kurtkurt#ifndef FILE_PARALLELTOP #define FILE_PARALLELTOP namespace netgen { class ParallelMeshTopology { const Mesh & mesh; /** mapping from local to distant vertex number each row of the table corresponds to one vertex each row contains a list of pairs (procnr, dist_vnum) */ TABLE loc2distvert, loc2distedge, loc2distface; Array glob_vert, glob_edge, glob_face; Array glob_el, glob_surfel, glob_segm; bool is_updated; public: ParallelMeshTopology (const Mesh & amesh); ~ParallelMeshTopology (); void Reset (); void Print() const; void UpdateCoarseGrid(); void UpdateCoarseGridGlobal(); // bool DoCoarseUpdate() const { return !coarseupdate; } /// set number of local vertices, reset sizes of loc2dist_vert, isexchangevert... void SetNV (int anv); void SetNE (int ane); void SetNSE (int anse); void SetNSegm (int anseg); void SetLoc2Glob_Vert (int locnum, int globnum) { glob_vert[locnum-1] = globnum; } void SetLoc2Glob_Edge (int locnum, int globnum) { glob_edge[locnum-1] = globnum; } void SetLoc2Glob_Face (int locnum, int globnum) { glob_face[locnum-1] = globnum; } void SetLoc2Glob_VolEl (int locnum, int globnum) { glob_el[locnum-1] = globnum; } void SetLoc2Glob_SurfEl (int locnum, int globnum) { glob_surfel[locnum-1] = globnum; } void SetLoc2Glob_Segm (int locnum, int globnum) { glob_segm[locnum-1] = globnum; } int GetGlobalPNum (int locnum) const { return glob_vert[locnum-1]; } int GetGlobalEdgeNum (int locnum) const { return glob_edge[locnum-1]; } int GetGlobalFaceNum (int locnum) const { return glob_face[locnum-1]; } int GetGlobalElNum (int locnum) const { return glob_el[locnum-1]; } int GetGlobalSElNum (int locnum) const { return glob_surfel[locnum-1]; } void SetDistantFaceNum (int dest, int locnum); void SetDistantPNum (int dest, int locnum); void SetDistantEdgeNum (int dest, int locnum); int GetNDistantPNums (int locpnum) const { return loc2distvert[locpnum-1].Size(); } int GetNDistantFaceNums (int locfacenum) const { return loc2distface[locfacenum-1].Size(); } int GetNDistantEdgeNums ( int locedgenum) const { return loc2distedge[locedgenum-1].Size(); } void GetDistantPNums (int locpnum, int * distpnums ) const { for (int i = 0; i < loc2distvert[locpnum-1].Size(); i++ ) distpnums[i] = loc2distvert[locpnum-1][i]; } void GetDistantFaceNums (int locfacenum, int * distfacenums ) const { for ( int i = 0; i < loc2distface[locfacenum-1].Size(); i++ ) distfacenums[i] = loc2distface[locfacenum-1][i]; } void GetDistantFaceNums (int locfacenum, Array & distfacenums ) const { distfacenums = loc2distface[locfacenum-1]; } void GetDistantEdgeNums (int locedgenum, int * distedgenums ) const { for (int i = 0; i < loc2distedge[locedgenum-1].Size(); i++ ) distedgenums[i] = loc2distedge[locedgenum-1][i]; } void GetDistantEdgeNums (int locedgenum, Array & distedgenums ) const { distedgenums = loc2distedge[locedgenum-1]; } FlatArray GetDistantPNums (int locnum) const { return loc2distvert[locnum]; } FlatArray GetDistantFaceNums (int locnum) const { return loc2distface[locnum]; } FlatArray GetDistantEdgeNums (int locnum) const { return loc2distedge[locnum]; } bool IsExchangeVert (int dest, int vnum) const { return loc2distvert[vnum-1].Contains (dest); } }; } #endif netgen-6.2.1804/libsrc/meshing/delaunay.cpp0000644000175000017500000011117613272137567017232 0ustar kurtkurt#include #include "meshing.hpp" namespace netgen { static const int deltetfaces[][3] = { { 1, 2, 3 }, { 2, 0, 3 }, { 0, 1, 3 }, { 1, 0, 2 } }; class DelaunayTet { PointIndex pnums[4]; int nb[4]; public: DelaunayTet () { ; } DelaunayTet (const DelaunayTet & el) { for (int i = 0; i < 4; i++) pnums[i] = el[i]; } DelaunayTet (const Element & el) { for (int i = 0; i < 4; i++) pnums[i] = el[i]; } PointIndex & operator[] (int i) { return pnums[i]; } PointIndex operator[] (int i) const { return pnums[i]; } int & NB1(int i) { return nb[i-1]; } int NB1(int i) const { return nb[i-1]; } int & NB(int i) { return nb[i]; } int NB(int i) const { return nb[i]; } int FaceNr (INDEX_3 & face) const // which face nr is it ? { for (int i = 0; i < 3; i++) if (pnums[i] != face.I1() && pnums[i] != face.I2() && pnums[i] != face.I3()) return i; return 3; } void GetFace1 (int i, INDEX_3 & face) const { face.I(1) = pnums[deltetfaces[i-1][0]]; face.I(2) = pnums[deltetfaces[i-1][1]]; face.I(3) = pnums[deltetfaces[i-1][2]]; } void GetFace (int i, INDEX_3 & face) const { face.I(1) = pnums[deltetfaces[i][0]]; face.I(2) = pnums[deltetfaces[i][1]]; face.I(3) = pnums[deltetfaces[i][2]]; } INDEX_3 GetFace1 (int i) const { return INDEX_3 (pnums[deltetfaces[i-1][0]], pnums[deltetfaces[i-1][1]], pnums[deltetfaces[i-1][2]]); } INDEX_3 GetFace (int i) const { return INDEX_3 (pnums[deltetfaces[i][0]], pnums[deltetfaces[i][1]], pnums[deltetfaces[i][2]]); } void GetFace1 (int i, Element2d & face) const { // face.SetType(TRIG); face[0] = pnums[deltetfaces[i-1][0]]; face[1] = pnums[deltetfaces[i-1][1]]; face[2] = pnums[deltetfaces[i-1][2]]; } }; /* Table to maintain neighbour elements */ class MeshNB { // face nodes -> one element INDEX_3_CLOSED_HASHTABLE faces; // Array & tets; public: // estimated number of points MeshNB (Array & atets, int np) : faces(200), tets(atets) { ; } // add element with 4 nodes void Add (int elnr); // delete element with 4 nodes void Delete (int elnr) { DelaunayTet & el = tets.Elem(elnr); for (int i = 0; i < 4; i++) faces.Set (el.GetFace(i).Sort(), el.NB(i)); } // get neighbour of element elnr in direction fnr int GetNB (int elnr, int fnr) { return tets.Get(elnr).NB1(fnr); } // void ResetFaceHT (int size) { faces.SetSize (size); } }; void MeshNB :: Add (int elnr) { DelaunayTet & el = tets.Elem(elnr); for (int i = 0; i < 4; i++) { INDEX_3 i3 = INDEX_3::Sort (el.GetFace(i)); int posnr; if (!faces.PositionCreate (i3, posnr)) { // face already in use int othertet = faces.GetData (posnr); el.NB(i) = othertet; if (othertet) { int fnr = tets.Get(othertet).FaceNr (i3); tets.Elem(othertet).NB(fnr) = elnr; } } else { faces.SetData (posnr, elnr); el.NB(i) = 0; } } } /* connected lists of cosphereical elements */ class SphereList { Array links; public: SphereList () { ; } void AddElement (int elnr) { if (elnr > links.Size()) links.Append (1); links.Elem(elnr) = elnr; } void DeleteElement (int elnr) { links.Elem(elnr) = 0; } void ConnectElement (int eli, int toi) { links.Elem (eli) = links.Get (toi); links.Elem (toi) = eli; } void GetList (int eli, Array & linked) const; }; void SphereList :: GetList (int eli, Array & linked) const { linked.SetSize (0); int pi = eli; do { if (pi <= 0 || pi > links.Size()) { cerr << "link, error " << endl; cerr << "pi = " << pi << " linked.s = " << linked.Size() << endl; exit(1); } if (linked.Size() > links.Size()) { cerr << "links have loop" << endl; exit(1); } linked.Append (pi); pi = links.Get(pi); } while (pi != eli); } void AddDelaunayPoint (PointIndex newpi, const Point3d & newp, Array & tempels, Mesh & mesh, BoxTree<3> & tettree, MeshNB & meshnb, Array > & centers, Array & radi2, Array & connected, Array & treesearch, Array & freelist, SphereList & list, IndexSet & insphere, IndexSet & closesphere) { /* find any sphere, such that newp is contained in */ DelaunayTet el; int cfelind = -1; const Point<3> * pp[4]; Point<3> pc; double r2; Point3d tpmin, tpmax; tettree.GetIntersecting (newp, newp, treesearch); double quot,minquot(1e20); for (int j = 0; j < treesearch.Size(); j++) { int jjj = treesearch[j]; quot = Dist2 (centers.Get(jjj), newp) / radi2.Get(jjj); if((cfelind == -1 || quot < 0.99*minquot) && quot < 1) { minquot = quot; el = tempels.Get(jjj); cfelind = jjj; if(minquot < 0.917632) break; } } /* int i, j, k, l; if (!felind) { cerr << "not in any sphere, 1" << endl; // old, non tree search double mindist = 1e10; for (j = 1; j <= tempels.Size(); j++) { if (tempels.Get(j).PNum(1)) { double toofar = Dist2 (centers.Get(j), newp) - radi2.Get(j); if (toofar < mindist || toofar < 1e-7) { mindist = toofar; cout << " dist2 = " << Dist2 (centers.Get(j), newp) << " radi2 = " << radi2.Get(j) << endl; } if (toofar < 0) { el = tempels.Get(j); felind = j; cout << "sphere found !" << endl; break; } } } cout << "point is too far from sheres: " << mindist << endl; } */ if (cfelind == -1) { PrintWarning ("Delaunay, point not in any sphere"); return; } /* insphere: point is in sphere -> delete element closesphere: point is close to sphere -> considered for same center */ // save overestimate insphere.SetMaxIndex (2 * tempels.Size() + 5 * mesh.GetNP()); closesphere.SetMaxIndex (2 * tempels.Size() + 5 * mesh.GetNP()); insphere.Clear(); closesphere.Clear(); insphere.Add (cfelind); int changed = 1; int nstarti = 1, starti; while (changed) { changed = 0; starti = nstarti; nstarti = insphere.GetArray().Size()+1; // if point in sphere, then it is also closesphere for (int j = starti; j < nstarti; j++) { int helind = insphere.GetArray().Get(j); if (!closesphere.IsIn (helind)) closesphere.Add (helind); } // add connected spheres to insphere - list for (int j = starti; j < nstarti; j++) { list.GetList (insphere.GetArray().Get(j), connected); for (int k = 0; k < connected.Size(); k++) { int celind = connected[k]; if (tempels.Get(celind)[0] != -1 && !insphere.IsIn (celind)) { changed = 1; insphere.Add (celind); } } } // check neighbour-tets for (int j = starti; j < nstarti; j++) for (int k = 1; k <= 4; k++) { int helind = insphere.GetArray().Get(j); int nbind = meshnb.GetNB (helind, k); if (nbind && !insphere.IsIn (nbind) ) { //changed //int prec = testout->precision(); //testout->precision(12); //(*testout) << "val1 " << Dist2 (centers.Get(nbind), newp) // << " val2 " << radi2.Get(nbind) * (1+1e-8) // << " val3 " << radi2.Get(nbind) // << " val1 / val3 " << Dist2 (centers.Get(nbind), newp)/radi2.Get(nbind) << endl; //testout->precision(prec); if (Dist2 (centers.Get(nbind), newp) < radi2.Get(nbind) * (1+1e-8) ) closesphere.Add (nbind); if (Dist2 (centers.Get(nbind), newp) < radi2.Get(nbind) * (1 + 1e-12)) { // point is in sphere -> remove tet insphere.Add (nbind); changed = 1; } else { /* Element2d face; tempels.Get(helind).GetFace (k, face); const Point3d & p1 = mesh.Point (face.PNum(1)); const Point3d & p2 = mesh.Point (face[1]); const Point3d & p3 = mesh.Point (face[2]); */ INDEX_3 i3 = tempels.Get(helind).GetFace (k-1); const Point3d & p1 = mesh.Point ( PointIndex (i3.I1()) ); const Point3d & p2 = mesh.Point ( PointIndex (i3.I2()) ); const Point3d & p3 = mesh.Point ( PointIndex (i3.I3()) ); Vec3d v1(p1, p2); Vec3d v2(p1, p3); Vec3d n = Cross (v1, v2); n /= n.Length(); if (n * Vec3d (p1, mesh.Point (tempels.Get(helind)[k-1])) > 0) n *= -1; double dist = n * Vec3d (p1, newp); if (dist > -1e-10) // 1e-10 { insphere.Add (nbind); changed = 1; } } } } } // while (changed) // (*testout) << "newels: " << endl; Array newels; Element2d face(TRIG); for (int j = 1; j <= insphere.GetArray().Size(); j++) for (int k = 1; k <= 4; k++) { // int elind = insphere.GetArray().Get(j); int celind = insphere.GetArray().Get(j); int nbind = meshnb.GetNB (celind, k); if (!nbind || !insphere.IsIn (nbind)) { tempels.Get (celind).GetFace1 (k, face); Element newel(TET); for (int l = 0; l < 3; l++) newel[l] = face[l]; newel[3] = newpi; newels.Append (newel); Vec<3> v1 = mesh[face[1]] - mesh[face[0]]; Vec<3> v2 = mesh[face[2]] - mesh[face[0]]; Vec<3> n = Cross (v1, v2); n.Normalize(); if (n * Vec3d(mesh.Point (face[0]), mesh.Point (tempels.Get(insphere.GetArray().Get(j))[k-1])) > 0) n *= -1; double hval = n * ( newp - mesh[face[0]]); if (hval > -1e-12) { cerr << "vec to outer" << endl; (*testout) << "vec to outer, hval = " << hval << endl; (*testout) << "v1 x v2 = " << Cross (v1, v2) << endl; (*testout) << "facep: " << mesh.Point (face[0]) << " " << mesh.Point (face[1]) << " " << mesh.Point (face[2]) << endl; } } } meshnb.ResetFaceHT (10*insphere.GetArray().Size()+1); for (int j = 1; j <= insphere.GetArray().Size(); j++) { // int elind = int celind = insphere.GetArray().Get(j); meshnb.Delete (celind); list.DeleteElement (celind); for (int k = 0; k < 4; k++) tempels.Elem(celind)[k] = -1; // ((ADTree6&)tettree.Tree()).DeleteElement (celind); tettree.DeleteElement (celind); freelist.Append (celind); } int hasclose = 0; for (int j = 1; j <= closesphere.GetArray().Size(); j++) { int ind = closesphere.GetArray().Get(j); if (!insphere.IsIn(ind) && fabs (Dist2 (centers.Get (ind), newp) - radi2.Get(ind)) < 1e-8 ) hasclose = 1; } for (int j = 1; j <= newels.Size(); j++) { int nelind; if (!freelist.Size()) { tempels.Append (newels.Get(j)); nelind = tempels.Size(); } else { nelind = freelist.Last(); freelist.DeleteLast(); tempels.Elem(nelind) = newels.Get(j); } meshnb.Add (nelind); list.AddElement (nelind); for (int k = 0; k < 4; k++) pp[k] = &mesh.Point (newels.Get(j)[k]); if (CalcSphereCenter (&pp[0], pc) ) { PrintSysError ("Delaunay: New tet is flat"); (*testout) << "new tet is flat" << endl; for (int k = 1; k <= 4; k++) (*testout) << newels.Get(j).PNum(k) << " "; (*testout) << endl; for (int k = 1; k <= 4; k++) (*testout) << *pp[k-1] << " "; (*testout) << endl; } r2 = Dist2 (*pp[0], pc); if (hasclose) for (int k = 1; k <= closesphere.GetArray().Size(); k++) { int csameind = closesphere.GetArray().Get(k); if (!insphere.IsIn(csameind) && fabs (r2 - radi2.Get(csameind)) < 1e-10 && Dist (pc, centers.Get(csameind)) < 1e-10) { pc = centers.Get(csameind); r2 = radi2.Get(csameind); list.ConnectElement (nelind, csameind); break; } } if (centers.Size() < nelind) { centers.Append (pc); radi2.Append (r2); } else { centers.Elem(nelind) = pc; radi2.Elem(nelind) = r2; } closesphere.Add (nelind); tpmax = tpmin = *pp[0]; for (int k = 1; k <= 3; k++) { tpmin.SetToMin (*pp[k]); tpmax.SetToMax (*pp[k]); } tpmax = tpmax + 0.01 * (tpmax - tpmin); tettree.Insert (tpmin, tpmax, nelind); } } void Delaunay1 (Mesh & mesh, const MeshingParameters & mp, AdFront3 * adfront, Array & tempels, int oldnp, DelaunayTet & startel, Point3d & pmin, Point3d & pmax) { Array > centers; Array radi2; Point3d tpmin, tpmax; // new: local box mesh.GetBox (pmax, pmin); // lower bound for pmax, upper for pmin for (int i = 1; i <= adfront->GetNF(); i++) { const MiniElement2d & face = adfront->GetFace(i); for (PointIndex pi : face.PNums()) { pmin.SetToMin (mesh.Point (pi)); pmax.SetToMax (mesh.Point (pi)); } } for (PointIndex pi : mesh.LockedPoints()) { pmin.SetToMin (mesh.Point (pi)); pmax.SetToMax (mesh.Point (pi)); } Vec3d vdiag(pmin, pmax); // double r1 = vdiag.Length(); double r1 = sqrt (3.0) * max3(vdiag.X(), vdiag.Y(), vdiag.Z()); vdiag = Vec3d (r1, r1, r1); //double r2; Point3d pmin2 = pmin - 8 * vdiag; Point3d pmax2 = pmax + 8 * vdiag; Point3d cp1(pmin2), cp2(pmax2), cp3(pmax2), cp4(pmax2); cp2.X() = pmin2.X(); cp3.Y() = pmin2.Y(); cp4.Z() = pmin2.Z(); int np = mesh.GetNP(); startel[0] = mesh.AddPoint (cp1); startel[1] = mesh.AddPoint (cp2); startel[2] = mesh.AddPoint (cp3); startel[3] = mesh.AddPoint (cp4); // flag points to use for Delaunay: BitArrayChar usep(np); usep.Clear(); for (int i = 1; i <= adfront->GetNF(); i++) { const MiniElement2d & face = adfront->GetFace(i); for (int j = 0; j < face.GetNP(); j++) usep.Set (face[j]); } for (int i = oldnp + PointIndex::BASE; i < np + PointIndex::BASE; i++) usep.Set (i); for (int i = 0; i < mesh.LockedPoints().Size(); i++) usep.Set (mesh.LockedPoints()[i]); Array freelist; int cntp = 0; MeshNB meshnb (tempels, mesh.GetNP() + 5); SphereList list; pmin2 = pmin2 + 0.1 * (pmin2 - pmax2); pmax2 = pmax2 + 0.1 * (pmax2 - pmin2); BoxTree<3> tettree(pmin2, pmax2); tempels.Append (startel); meshnb.Add (1); list.AddElement (1); Array connected, treesearch; tpmin = tpmax = mesh.Point(startel[0]); for (int k = 1; k < 4; k++) { tpmin.SetToMin (mesh.Point (startel[k])); tpmax.SetToMax (mesh.Point (startel[k])); } tpmax = tpmax + 0.01 * (tpmax - tpmin); tettree.Insert (tpmin, tpmax, 1); Point<3> pc; const Point<3> * pp[4]; for (int k = 0; k < 4; k++) pp[k] = &mesh.Point (startel[k]); CalcSphereCenter (&pp[0], pc); centers.Append (pc); radi2.Append (Dist2 (*pp[0], pc)); IndexSet insphere(mesh.GetNP()); IndexSet closesphere(mesh.GetNP()); // "random" reordering of points (speeds a factor 3 - 5 !!!) Array mixed(np); int prims[] = { 11, 13, 17, 19, 23, 29, 31, 37 }; int prim; { int i = 0; while (np % prims[i] == 0) i++; prim = prims[i]; } for (PointIndex pi = mesh.Points().Begin(); pi < mesh.Points().End()-4; pi++) mixed[pi] = PointIndex ( (prim * pi) % np + PointIndex::BASE ); for (PointIndex pi = mesh.Points().Begin(); pi < mesh.Points().End()-4; pi++) { if (pi % 1000 == 0) { if (pi % 10000 == 0) PrintDot ('+'); else PrintDot ('.'); } multithread.percent = 100.0 * pi / np; if (multithread.terminate) break; PointIndex newpi = mixed[pi]; if (!usep.Test(newpi)) continue; cntp++; const MeshPoint & newp = mesh[newpi]; AddDelaunayPoint (newpi, newp, tempels, mesh, tettree, meshnb, centers, radi2, connected, treesearch, freelist, list, insphere, closesphere); } for (int i = tempels.Size(); i >= 1; i--) if (tempels.Get(i)[0] <= 0) tempels.DeleteElement (i); PrintDot ('\n'); PrintMessage (3, "Points: ", cntp); PrintMessage (3, "Elements: ", tempels.Size()); // (*mycout) << cntp << " / " << tempels.Size() << " points/elements" << endl; /* cout << "tempels: "; tempels.PrintMemInfo(cout); cout << "Searchtree: "; tettree.Tree().PrintMemInfo(cout); cout << "MeshNB: "; meshnb.PrintMemInfo(cout); */ } void Meshing3 :: Delaunay (Mesh & mesh, int domainnr, const MeshingParameters & mp) { int np, ne; PrintMessage (1, "Delaunay meshing"); PrintMessage (3, "number of points: ", mesh.GetNP()); PushStatus ("Delaunay meshing"); Array tempels; Point3d pmin, pmax; DelaunayTet startel; int oldnp = mesh.GetNP(); if (mp.blockfill) { BlockFillLocalH (mesh, mp); PrintMessage (3, "number of points: ", mesh.GetNP()); } np = mesh.GetNP(); Delaunay1 (mesh, mp, adfront, tempels, oldnp, startel, pmin, pmax); { // improve delaunay - mesh by swapping !!!! Mesh tempmesh; for (PointIndex pi = mesh.Points().Begin(); pi < mesh.Points().End(); pi++) tempmesh.AddPoint (mesh[pi]); for (int i = 1; i <= tempels.Size(); i++) { Element el(4); for (int j = 0; j < 4; j++) el[j] = tempels.Elem(i)[j]; el.SetIndex (1); const Point3d & lp1 = mesh.Point (el[0]); const Point3d & lp2 = mesh.Point (el[1]); const Point3d & lp3 = mesh.Point (el[2]); const Point3d & lp4 = mesh.Point (el[3]); Vec3d v1(lp1, lp2); Vec3d v2(lp1, lp3); Vec3d v3(lp1, lp4); Vec3d n = Cross (v1, v2); double vol = n * v3; if (vol > 0) swap (el[2], el[3]); tempmesh.AddVolumeElement (el); } MeshQuality3d (tempmesh); tempmesh.AddFaceDescriptor (FaceDescriptor (1, 1, 0, 0)); tempmesh.AddFaceDescriptor (FaceDescriptor (2, 1, 0, 0)); for (int i = 1; i <= mesh.GetNOpenElements(); i++) { Element2d sel = mesh.OpenElement(i); sel.SetIndex(1); tempmesh.AddSurfaceElement (sel); swap (sel[1], sel[2]); tempmesh.AddSurfaceElement (sel); } for (int i = 1; i <= 4; i++) { Element2d self(TRIG); self.SetIndex (1); startel.GetFace1 (i, self); tempmesh.AddSurfaceElement (self); } // for (i = mesh.GetNP() - 3; i <= mesh.GetNP(); i++) // tempmesh.AddLockedPoint (i); for (PointIndex pi = tempmesh.Points().Begin(); pi < tempmesh.Points().End(); pi++) tempmesh.AddLockedPoint (pi); // tempmesh.PrintMemInfo(cout); // tempmesh.Save ("tempmesh.vol"); for (int i = 1; i <= 2; i++) { tempmesh.FindOpenElements (); PrintMessage (5, "Num open: ", tempmesh.GetNOpenElements()); tempmesh.CalcSurfacesOfNode (); tempmesh.FreeOpenElementsEnvironment (1); MeshOptimize3d meshopt(mp); // tempmesh.CalcSurfacesOfNode(); meshopt.SwapImprove(tempmesh, OPT_CONFORM); } MeshQuality3d (tempmesh); tempels.SetSize(0); for (int i = 1; i <= tempmesh.GetNE(); i++) tempels.Append (tempmesh.VolumeElement(i)); } // remove degenerated BitArray badnode(mesh.GetNP()); badnode.Clear(); int ndeg = 0; for (int i = 1; i <= tempels.Size(); i++) { Element el(4); for (int j = 0; j < 4; j++) el[j] = tempels.Elem(i)[j]; // Element & el = tempels.Elem(i); const Point3d & lp1 = mesh.Point (el[0]); const Point3d & lp2 = mesh.Point (el[1]); const Point3d & lp3 = mesh.Point (el[2]); const Point3d & lp4 = mesh.Point (el[3]); Vec3d v1(lp1, lp2); Vec3d v2(lp1, lp3); Vec3d v3(lp1, lp4); Vec3d n = Cross (v1, v2); double vol = n * v3; double h = v1.Length() + v2.Length() + v3.Length(); if (fabs (vol) < 1e-8 * (h * h * h) && (el[0] <= np && el[1] <= np && el[2] <= np && el[3] <= np) ) // old: 1e-12 { badnode.Set(el[0]); badnode.Set(el[1]); badnode.Set(el[2]); badnode.Set(el[3]); ndeg++; (*testout) << "vol = " << vol << " h = " << h << endl; } if (vol > 0) Swap (el[2], el[3]); } ne = tempels.Size(); for (int i = ne; i >= 1; i--) { const DelaunayTet & el = tempels.Get(i); if (badnode.Test(el[0]) || badnode.Test(el[1]) || badnode.Test(el[2]) || badnode.Test(el[3]) ) tempels.DeleteElement(i); } PrintMessage (3, ndeg, " degenerated elements removed"); // find surface triangles which are no face of any tet INDEX_3_HASHTABLE openeltab(mesh.GetNOpenElements()+3); Array openels; for (int i = 1; i <= mesh.GetNOpenElements(); i++) { const Element2d & tri = mesh.OpenElement(i); INDEX_3 i3(tri[0], tri[1], tri[2]); i3.Sort(); openeltab.Set (i3, i); } for (int i = 1; i <= tempels.Size(); i++) { for (int j = 0; j < 4; j++) { INDEX_3 i3 = tempels.Get(i).GetFace (j); i3.Sort(); if (openeltab.Used(i3)) openeltab.Set (i3, 0); } } // and store them in openels for (int i = 1; i <= openeltab.GetNBags(); i++) for (int j = 1; j <= openeltab.GetBagSize(i); j++) { INDEX_3 i3; int fnr; openeltab.GetData (i, j, i3, fnr); if (fnr) openels.Append (fnr); } // find open triangle with close edge (from halfening of surface squares) INDEX_2_HASHTABLE twotrias(mesh.GetNOpenElements()+5); // for (i = 1; i <= mesh.GetNOpenElements(); i++) for (int ii = 1; ii <= openels.Size(); ii++) { int i = openels.Get(ii); const Element2d & el = mesh.OpenElement(i); for (int j = 1; j <= 3; j++) { INDEX_2 hi2 (el.PNumMod (j), el.PNumMod(j+1)); hi2.Sort(); if (twotrias.Used(hi2)) { INDEX_2 hi3; hi3 = twotrias.Get (hi2); hi3.I2() = el.PNumMod (j+2); twotrias.Set (hi2, hi3); } else { INDEX_2 hi3(el.PNumMod (j+2), 0); twotrias.Set (hi2, hi3); } } } INDEX_2_HASHTABLE tetedges(tempels.Size() + 5); for (int i = 1; i <= tempels.Size(); i++) { const DelaunayTet & el = tempels.Get(i); INDEX_2 i2; for (int j = 1; j <= 6; j++) { switch (j) { case 1: i2.I1()=el[0]; i2.I2()=el[1]; break; case 2: i2.I1()=el[0]; i2.I2()=el[2]; break; case 3: i2.I1()=el[0]; i2.I2()=el[3]; break; case 4: i2.I1()=el[1]; i2.I2()=el[2]; break; case 5: i2.I1()=el[1]; i2.I2()=el[3]; break; case 6: i2.I1()=el[2]; i2.I2()=el[3]; break; default: i2.I1()=i2.I2()=0; break; } i2.Sort(); tetedges.Set (i2, 1); } } // cout << "tetedges:"; // tetedges.PrintMemInfo (cout); for (INDEX_2_HASHTABLE::Iterator it = twotrias.Begin(); it != twotrias.End(); it++) { INDEX_2 hi2, hi3; twotrias.GetData (it, hi2, hi3); hi3.Sort(); if (tetedges.Used (hi3)) { const Point3d & p1 = mesh.Point ( PointIndex (hi2.I1())); const Point3d & p2 = mesh.Point ( PointIndex (hi2.I2())); const Point3d & p3 = mesh.Point ( PointIndex (hi3.I1())); const Point3d & p4 = mesh.Point ( PointIndex (hi3.I2())); Vec3d v1(p1, p2); Vec3d v2(p1, p3); Vec3d v3(p1, p4); Vec3d n = Cross (v1, v2); double vol = n * v3; double h = v1.Length() + v2.Length() + v3.Length(); if (fabs (vol) < 1e-4 * (h * h * h)) // old: 1e-12 { badnode.Set(hi3.I1()); badnode.Set(hi3.I2()); } } } /* for (i = 1; i <= twotrias.GetNBags(); i++) for (j = 1; j <= twotrias.GetBagSize (i); j++) { INDEX_2 hi2, hi3; twotrias.GetData (i, j, hi2, hi3); hi3.Sort(); if (tetedges.Used (hi3)) { const Point3d & p1 = mesh.Point (hi2.I1()); const Point3d & p2 = mesh.Point (hi2.I2()); const Point3d & p3 = mesh.Point (hi3.I1()); const Point3d & p4 = mesh.Point (hi3.I2()); Vec3d v1(p1, p2); Vec3d v2(p1, p3); Vec3d v3(p1, p4); Vec3d n = Cross (v1, v2); double vol = n * v3; double h = v1.Length() + v2.Length() + v3.Length(); if (fabs (vol) < 1e-4 * (h * h * h)) // old: 1e-12 { badnode.Set(hi3.I1()); badnode.Set(hi3.I2()); } } } */ ne = tempels.Size(); for (int i = ne; i >= 1; i--) { const DelaunayTet & el = tempels.Get(i); if (badnode.Test(el[0]) || badnode.Test(el[1]) || badnode.Test(el[2]) || badnode.Test(el[3]) ) tempels.DeleteElement(i); } // find intersecting: PrintMessage (3, "Remove intersecting"); if (openels.Size()) { BoxTree<3> setree(pmin, pmax); /* cout << "open elements in search tree: " << openels.Size() << endl; cout << "pmin, pmax = " << pmin << " - " << pmax << endl; */ for (int i = 1; i <= openels.Size(); i++) { int fnr; fnr = openels.Get(i); if (fnr) { const Element2d & tri = mesh.OpenElement(fnr); Point3d ltpmin (mesh.Point(tri[0])); Point3d ltpmax (ltpmin); for (int k = 2; k <= 3; k++) { ltpmin.SetToMin (mesh.Point (tri.PNum(k))); ltpmax.SetToMax (mesh.Point (tri.PNum(k))); } setree.Insert (ltpmin, ltpmax, fnr); } } Array neartrias; for (int i = 1; i <= tempels.Size(); i++) { const Point<3> *pp[4]; int tetpi[4]; DelaunayTet & el = tempels.Elem(i); int intersect = 0; for (int j = 0; j < 4; j++) { pp[j] = &mesh.Point(el[j]); tetpi[j] = el[j]; } Point3d tetpmin(*pp[0]); Point3d tetpmax(tetpmin); for (int j = 1; j < 4; j++) { tetpmin.SetToMin (*pp[j]); tetpmax.SetToMax (*pp[j]); } tetpmin = tetpmin + 0.01 * (tetpmin - tetpmax); tetpmax = tetpmax + 0.01 * (tetpmax - tetpmin); setree.GetIntersecting (tetpmin, tetpmax, neartrias); // for (j = 1; j <= mesh.GetNSE(); j++) // { for (int jj = 1; jj <= neartrias.Size(); jj++) { int j = neartrias.Get(jj); const Element2d & tri = mesh.OpenElement(j); const Point<3> *tripp[3]; int tripi[3]; for (int k = 1; k <= 3; k++) { tripp[k-1] = &mesh.Point (tri.PNum(k)); tripi[k-1] = tri.PNum(k); } if (IntersectTetTriangle (&pp[0], &tripp[0], tetpi, tripi)) { /* int il1, il2; (*testout) << "intersect !" << endl; (*testout) << "triind: "; for (il1 = 0; il1 < 3; il1++) (*testout) << " " << tripi[il1]; (*testout) << endl; (*testout) << "tetind: "; for (il2 = 0; il2 < 4; il2++) (*testout) << " " << tetpi[il2]; (*testout) << endl; (*testout) << "trip: "; for (il1 = 0; il1 < 3; il1++) (*testout) << " " << *tripp[il1]; (*testout) << endl; (*testout) << "tetp: "; for (il2 = 0; il2 < 4; il2++) (*testout) << " " << *pp[il2]; (*testout) << endl; */ intersect = 1; break; } } if (intersect) { tempels.DeleteElement(i); i--; } } } PrintMessage (3, "Remove outer"); // find connected tets (with no face between, and no hole due // to removed intersecting tets. // INDEX_3_HASHTABLE innerfaces(np); INDEX_3_HASHTABLE boundaryfaces(mesh.GetNOpenElements()/3+1); for (int i = 1; i <= mesh.GetNOpenElements(); i++) { const Element2d & tri = mesh.OpenElement(i); INDEX_3 i3 (tri[0], tri[1], tri[2]); i3.Sort(); boundaryfaces.PrepareSet (i3); } boundaryfaces.AllocateElements(); for (int i = 1; i <= mesh.GetNOpenElements(); i++) { const Element2d & tri = mesh.OpenElement(i); INDEX_3 i3 (tri[0], tri[1], tri[2]); i3.Sort(); boundaryfaces.Set (i3, 1); } for (int i = 0; i < tempels.Size(); i++) for (int j = 0; j < 4; j++) tempels[i].NB(j) = 0; TABLE elsonpoint(mesh.GetNP()); for (int i = 0; i < tempels.Size(); i++) { const DelaunayTet & el = tempels[i]; INDEX_4 i4(el[0], el[1], el[2], el[3]); i4.Sort(); elsonpoint.IncSizePrepare (i4.I1()); elsonpoint.IncSizePrepare (i4.I2()); } elsonpoint.AllocateElementsOneBlock(); for (int i = 0; i < tempels.Size(); i++) { const DelaunayTet & el = tempels[i]; INDEX_4 i4(el[0], el[1], el[2], el[3]); i4.Sort(); elsonpoint.Add (i4.I1(), i+1); elsonpoint.Add (i4.I2(), i+1); } // cout << "elsonpoint mem: "; // elsonpoint.PrintMemInfo(cout); INDEX_3_CLOSED_HASHTABLE faceht(100); Element2d hel(TRIG); for (PointIndex pi = mesh.Points().Begin(); pi < mesh.Points().End(); pi++) { faceht.SetSize (4 * elsonpoint[pi].Size()); for (int ii = 0; ii < elsonpoint[pi].Size(); ii++) { int i = elsonpoint[pi][ii]; const DelaunayTet & el = tempels.Get(i); for (int j = 1; j <= 4; j++) { el.GetFace1 (j, hel); hel.Invert(); hel.NormalizeNumbering(); if (hel[0] == pi) { INDEX_3 i3(hel[0], hel[1], hel[2]); if (!boundaryfaces.Used (i3)) { if (faceht.Used (i3)) { INDEX_2 i2 = faceht.Get(i3); tempels.Elem(i).NB1(j) = i2.I1(); tempels.Elem(i2.I1()).NB1(i2.I2()) = i; } else { hel.Invert(); hel.NormalizeNumbering(); INDEX_3 i3i(hel[0], hel[1], hel[2]); INDEX_2 i2(i, j); faceht.Set (i3i, i2); } } } } } } /* for (i = 1; i <= tempels.Size(); i++) { const DelaunayTet & el = tempels.Get(i); for (j = 1; j <= 4; j++) { INDEX_3 i3; Element2d face; el.GetFace1 (j, face); for (int kk = 1; kk <= 3; kk++) i3.I(kk) = face.PNum(kk); i3.Sort(); if (!boundaryfaces.Used (i3)) { if (innerfaces.Used(i3)) { INDEX_2 i2; i2 = innerfaces.Get(i3); i2.I2() = i; innerfaces.Set (i3, i2); } else { INDEX_2 i2; i2.I1() = i; i2.I2() = 0; innerfaces.Set (i3, i2); } } } } */ /* (*testout) << "nb elements:" << endl; for (i = 1; i <= tempels.Size(); i++) { (*testout) << i << " "; for (j = 1; j <= 4; j++) (*testout) << tempels.Get(i).NB1(j) << " "; (*testout) << endl; } (*testout) << "pairs:" << endl; for (i = 1; i <= innerfaces.GetNBags(); i++) for (j = 1; j <= innerfaces.GetBagSize(i); j++) { INDEX_3 i3; INDEX_2 i2; innerfaces.GetData (i, j, i3, i2); (*testout) << i2 << endl; } */ /* cout << "innerfaces: "; innerfaces.PrintMemInfo (cout); */ // cout << "boundaryfaces: "; // boundaryfaces.PrintMemInfo (cout); PrintMessage (5, "tables filled"); ne = tempels.Size(); BitArray inner(ne), outer(ne); inner.Clear(); outer.Clear(); Array elstack; /* int starti = 0; for (i = 1; i <= ne; i++) { const Element & el = tempels.Get(i); for (j = 1; j <= 4; j++) for (k = 1; k <= 4; k++) if (el.PNum(j) == startel.PNum(k)) { outer.Set(i); starti = i; } } */ while (1) { int inside; bool done = 1; int i; for (i = 1; i <= ne; i++) if (!inner.Test(i) && !outer.Test(i)) { done = 0; break; } if (done) break; const DelaunayTet & el = tempels.Get(i); const Point3d & p1 = mesh.Point (el[0]); const Point3d & p2 = mesh.Point (el[1]); const Point3d & p3 = mesh.Point (el[2]); const Point3d & p4 = mesh.Point (el[3]); Point3d ci = Center (p1, p2, p3, p4); inside = adfront->Inside (ci); /* cout << "startel: " << i << endl; cout << "inside = " << inside << endl; cout << "ins2 = " << adfront->Inside (Center (ci, p1)) << endl; cout << "ins3 = " << adfront->Inside (Center (ci, p2)) << endl; */ elstack.SetSize(0); elstack.Append (i); while (elstack.Size()) { int ei = elstack.Last(); elstack.DeleteLast(); if (!inner.Test(ei) && !outer.Test(ei)) { if (inside) inner.Set(ei); else outer.Set(ei); for (int j = 1; j <= 4; j++) { INDEX_3 i3 = tempels.Get(ei).GetFace1(j); /* Element2d face; tempels.Get(ei).GetFace(j, face); for (int kk = 1; kk <= 3; kk++) i3.I(kk) = face.PNum(kk); */ i3.Sort(); if (tempels.Get(ei).NB1(j)) elstack.Append (tempels.Get(ei).NB1(j)); /* if (innerfaces.Used(i3)) { INDEX_2 i2 = innerfaces.Get(i3); int other = i2.I1() + i2.I2() - ei; if (other != tempels.Get(ei).NB1(j)) cerr << "different1 !!" << endl; if (other) { elstack.Append (other); } } else if (tempels.Get(ei).NB1(j)) cerr << "different2 !!" << endl; */ } } } } // check outer elements if (debugparam.slowchecks) { for (int i = 1; i <= ne; i++) { const DelaunayTet & el = tempels.Get(i); const Point3d & p1 = mesh.Point (el[0]); const Point3d & p2 = mesh.Point (el[1]); const Point3d & p3 = mesh.Point (el[2]); const Point3d & p4 = mesh.Point (el[3]); Point3d ci = Center (p1, p2, p3, p4); // if (adfront->Inside (ci) != adfront->Inside (Center (ci, p1))) // cout << "ERROR: outer test unclear !!!" << endl; if (inner.Test(i) != adfront->Inside (ci)) { /* cout << "ERROR: outer test wrong !!!" << "inner = " << int(inner.Test(i)) << "outer = " << int(outer.Test(i)) << endl; cout << "Vol = " << Determinant(Vec3d(p1, p2), Vec3d(p1, p3), Vec3d(p1, p4)) << endl; */ for (int j = 1; j <= 4; j++) { Point3d hp; switch (j) { case 1: hp = Center (ci, p1); break; case 2: hp = Center (ci, p2); break; case 3: hp = Center (ci, p3); break; case 4: hp = Center (ci, p4); break; } // cout << "inside(" << hp << ") = " << adfront->Inside(hp) << endl; } } if (adfront->Inside(ci)) outer.Clear(i); else outer.Set(i); } } /* // find bug in innerfaces tempmesh.DeleteVolumeElements(); for (i = 1; i <= innerfaces.GetNBags(); i++) for (j = 1; j <= innerfaces.GetBagSize(i); j++) { INDEX_3 i3; INDEX_2 i2; innerfaces.GetData (i, j, i3, i2); if (i2.I2()) { if (outer.Test(i2.I1()) != outer.Test(i2.I2())) { tempmesh.AddVolumeElement (tempels.Get(i2.I1())); tempmesh.AddVolumeElement (tempels.Get(i2.I2())); cerr << "outer flag different for connected els" << endl; } } } cout << "Check intersectiong once more" << endl; for (i = 1; i <= openels.Size(); i++) { tempmesh.SurfaceElement(2*openels.Get(i)).SetIndex(2); tempmesh.SurfaceElement(2*openels.Get(i)-1).SetIndex(2); } // for (i = 1; i <= tempmesh.GetNE(); i++) // for (j = 1; j <= tempmesh.GetNSE(); j++) i = 6; j = 403; if (i <= tempmesh.GetNE() && j <= tempmesh.GetNSE()) if (tempmesh.SurfaceElement(j).GetIndex()==2) { const Element & el = tempmesh.VolumeElement(i); const Element2d & sel = tempmesh.SurfaceElement(j); const Point3d *tripp[3]; const Point3d *pp[4]; int tetpi[4], tripi[3]; for (k = 1; k <= 4; k++) { pp[k-1] = &tempmesh.Point(el.PNum(k)); tetpi[k-1] = el.PNum(k); } for (k = 1; k <= 3; k++) { tripp[k-1] = &tempmesh.Point (sel.PNum(k)); tripi[k-1] = sel.PNum(k); } (*testout) << "Check Triangle " << j << ":"; for (k = 1; k <= 3; k++) (*testout) << " " << sel.PNum(k); for (k = 1; k <= 3; k++) (*testout) << " " << tempmesh.Point(sel.PNum(k)); (*testout) << endl; (*testout) << "Check Tet " << i << ":"; for (k = 1; k <= 4; k++) (*testout) << " " << el.PNum(k); for (k = 1; k <= 4; k++) (*testout) << " " << tempmesh.Point(el.PNum(k)); (*testout) << endl; if (IntersectTetTriangle (&pp[0], &tripp[0], tetpi, tripi)) { cout << "Intesection detected !!" << endl; } } tempmesh.Save ("temp.vol"); // end bug search */ for (int i = ne; i >= 1; i--) { if (outer.Test(i)) tempels.DeleteElement(i); } // mesh.points.SetSize(mesh.points.Size()-4); for (int i = 0; i < tempels.Size(); i++) { Element el(4); for (int j = 0; j < 4; j++) el[j] = tempels[i][j]; mesh.AddVolumeElement (el); } PrintMessage (5, "outer removed"); mesh.FindOpenElements(domainnr); mesh.Compress(); PopStatus (); } } netgen-6.2.1804/libsrc/meshing/hpref_prism.hpp0000644000175000017500000022075213272137567017754 0ustar kurtkurt // HP_PRISM ... no refinement int refprism_splitedges[][3] = { { 0, 0, 0 } }; HPREF_ELEMENT_TYPE refprism_newelstypes[] = { HP_PRISM, HP_NONE, }; int refprism_newels[][8] = { { 1, 2, 3, 4, 5, 6 } }; HPRef_Struct refprism = { HP_PRISM, refprism_splitedges, 0, 0, refprism_newelstypes, refprism_newels }; // HP_PRISM_SINGEDGE ... vertical edge 1-4 is singular int refprism_singedge_splitedges[][3] = { { 1, 2, 7 }, { 1, 3, 8 }, { 4, 5, 9 }, { 4, 6, 10 }, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE refprism_singedge_newelstypes[] = { HP_PRISM_SINGEDGE, HP_HEX, HP_NONE, }; int refprism_singedge_newels[][8] = { { 1, 7, 8, 4, 9, 10 }, { 3, 8, 7, 2, 6, 10, 9, 5 } }; HPRef_Struct refprism_singedge = { HP_PRISM, refprism_singedge_splitedges, 0, 0, refprism_singedge_newelstypes, refprism_singedge_newels }; // HP_PRISM_SINGEDGE_V12 vertical edges 1-4 and 2-5 are singular int refprism_singedge_v12_splitedges[][3] = { { 1, 2, 7 }, { 1, 3, 8 }, { 2, 1, 9 }, { 2, 3, 10 }, { 4, 5, 11 }, { 4, 6, 12 }, { 5, 4, 13 }, { 5, 6, 14}, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE refprism_singedge_v12_newelstypes[] = { HP_HEX, HP_PRISM_SINGEDGE, HP_PRISM_SINGEDGE, HP_PRISM, HP_NONE, }; int refprism_singedge_v12_newels[][8] = { { 7, 9, 10, 8, 11, 13, 14, 12 }, { 1, 7, 8, 4, 11, 12 }, { 2, 10, 9, 5, 14, 13 }, { 3, 8, 10, 6, 12, 14 }, }; HPRef_Struct refprism_singedge_v12 = { HP_PRISM, refprism_singedge_v12_splitedges, 0, 0, refprism_singedge_v12_newelstypes, refprism_singedge_v12_newels }; // HP_PRISM_SINGEDGE_H12 int refprism_singedge_h12_splitedges[][3] = { { 1, 3, 7 }, { 2, 1, 8 }, { 2, 3, 9 }, { 3, 1, 10 }, { 4, 6, 12 }, { 5, 4, 13 }, { 5, 6, 14 }, { 6, 4, 15 }, { 0, 0, 0 } }; int refprism_singedge_h12_splitfaces[][4] = { { 2, 1, 3, 11 }, { 5, 4, 6, 16 }, { 0, 0, 0, 0 }, }; HPREF_ELEMENT_TYPE refprism_singedge_h12_newelstypes[] = { HP_HEX, HP_HEX, HP_PRISM, HP_PRISM, HP_PRISM, HP_NONE, }; int refprism_singedge_h12_newels[][8] = { { 1, 8, 11, 7, 4, 13, 16, 12 }, { 9, 3, 10, 11, 14, 6, 15, 16 }, { 7, 11, 10, 12, 16, 15 }, { 2, 9, 11, 5, 14, 16 }, { 8, 2, 11, 13, 5, 16 } }; HPRef_Struct refprism_singedge_h12 = { HP_PRISM, refprism_singedge_h12_splitedges, refprism_singedge_h12_splitfaces, 0, refprism_singedge_h12_newelstypes, refprism_singedge_h12_newels }; // HP_PRISM_SINGEDGE_H1 int refprism_singedge_h1_splitedges[][3] = { { 1, 3, 7 }, { 2, 3, 8 }, { 4, 6, 9 }, { 5, 6, 10 }, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE refprism_singedge_h1_newelstypes[] = { HP_HEX, HP_PRISM, HP_NONE, }; int refprism_singedge_h1_newels[][8] = { { 1, 2, 8, 7, 4, 5, 10, 9 }, { 3, 7, 8, 6, 9, 10 } }; HPRef_Struct refprism_singedge_h1 = { HP_PRISM, refprism_singedge_h1_splitedges, 0, 0, refprism_singedge_h1_newelstypes, refprism_singedge_h1_newels }; // HP_PRISM_1FA_0E_0V int refprism_1fa_0e_0v_splitedges[][3] = { { 1, 4, 16 }, { 2, 5, 17 }, { 3, 6, 18 }, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE refprism_1fa_0e_0v_newelstypes[] = { HP_PRISM, HP_PRISM_1FA_0E_0V, HP_NONE, }; int refprism_1fa_0e_0v_newels[][8] = { { 16, 17, 18, 4, 5, 6 }, { 1, 2, 3, 16, 17, 18 } }; HPRef_Struct refprism_1fa_0e_0v = { HP_PRISM, refprism_1fa_0e_0v_splitedges, 0, 0, refprism_1fa_0e_0v_newelstypes, refprism_1fa_0e_0v_newels }; // HP_PRISM_1FA_1E_0V int refprism_1fa_1e_0v_splitedges[][3] = { { 1, 4, 16 }, { 2, 5, 17 }, { 3, 6, 18 }, { 1, 2, 7}, { 1, 3, 12}, { 4, 6, 45}, { 4, 5, 40}, { 0, 0, 0 } }; int refprism_1fa_1e_0v_splitfaces[][4] = { {1,2,4,19}, {1,3,4,24}, {0,0,0,0} }; HPREF_ELEMENT_TYPE refprism_1fa_1e_0v_newelstypes[] = { HP_PRISM_SINGEDGE, HP_HEX, HP_PRISM_1FA_1E_0V, HP_HEX_1F_0E_0V, HP_NONE, }; int refprism_1fa_1e_0v_newels[][8] = { { 16, 19, 24, 4, 40, 45 }, { 24, 19, 17, 18, 45 , 40, 5, 6 }, { 1, 7 , 12 , 16, 19, 24 }, { 7, 2, 3, 12, 19, 17, 18, 24 } }; HPRef_Struct refprism_1fa_1e_0v = { HP_PRISM, refprism_1fa_1e_0v_splitedges, refprism_1fa_1e_0v_splitfaces, 0, refprism_1fa_1e_0v_newelstypes, refprism_1fa_1e_0v_newels }; // HP_PRISM_2FA_1E_0V int refprism_2fa_1e_0v_splitedges[][3] = { { 1, 4, 16 }, { 2, 5, 17 }, { 3, 6, 18 }, { 1, 2, 7}, { 1, 3, 12}, { 4, 6, 45}, { 4, 5, 40}, { 4, 1, 28}, { 5, 2, 29}, { 6, 3, 30}, { 0, 0, 0 } }; int refprism_2fa_1e_0v_splitfaces[][4] = { {1,2,4,19}, {1,3,4,24}, {4,1,5,31}, {4,1,6,36}, {0,0,0,0} }; HPREF_ELEMENT_TYPE refprism_2fa_1e_0v_newelstypes[] = { HP_PRISM_SINGEDGE, HP_HEX, HP_PRISM_1FA_1E_0V, HP_HEX_1F_0E_0V, HP_PRISM_1FA_1E_0V, HP_HEX_1F_0E_0V, HP_NONE, }; int refprism_2fa_1e_0v_newels[][8] = { { 16, 19, 24, 28, 31, 36 }, { 24, 19, 17, 18, 36, 31, 29, 30 }, { 1, 7 , 12 , 16, 19, 24 }, { 12, 7, 2, 3, 24, 19, 17, 18 }, { 4, 45, 40, 28, 36, 31 }, { 40, 45, 6, 5, 31, 36, 30, 29,} }; HPRef_Struct refprism_2fa_1e_0v = { HP_PRISM, refprism_2fa_1e_0v_splitedges, refprism_2fa_1e_0v_splitfaces, 0, refprism_2fa_1e_0v_newelstypes, refprism_2fa_1e_0v_newels }; // HP_PRISM_1FB_0E_0V ... quad face 1-2-4-5 int refprism_1fb_0e_0v_splitedges[][3] = { { 1, 3, 7 }, { 2, 3, 8 }, { 4, 6, 9 }, { 5, 6, 10 }, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE refprism_1fb_0e_0v_newelstypes[] = { HP_HEX_1F_0E_0V, HP_PRISM, HP_NONE, }; int refprism_1fb_0e_0v_newels[][8] = { { 1, 4, 5, 2, 7, 9, 10, 8 }, { 7, 8, 3, 9, 10, 6 } }; HPRef_Struct refprism_1fb_0e_0v = { HP_PRISM, refprism_1fb_0e_0v_splitedges, 0, 0, refprism_1fb_0e_0v_newelstypes, refprism_1fb_0e_0v_newels }; // HP_PRISM_1FB_1EA_0V ... quad face 1-2-4-5 int refprism_1fb_1ea_0v_splitedges[][3] = { { 1, 3, 7 }, { 2, 3, 8 }, { 4, 6, 9 }, { 5, 6, 10 }, { 1, 2, 11 }, { 4, 5, 12 }, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE refprism_1fb_1ea_0v_newelstypes[] = { HP_HEX_1F_0E_0V, HP_PRISM_1FB_1EA_0V, HP_PRISM, HP_NONE, }; int refprism_1fb_1ea_0v_newels[][8] = { { 11, 12, 5, 2, 7, 9, 10, 8 }, { 1, 11, 7, 4, 12, 9 }, { 7, 8, 3, 9, 10, 6 } }; HPRef_Struct refprism_1fb_1ea_0v = { HP_PRISM, refprism_1fb_1ea_0v_splitedges, 0, 0, refprism_1fb_1ea_0v_newelstypes, refprism_1fb_1ea_0v_newels }; // HP_PRISM_1FB_1EC_0V ... quad face 1-2-4-5 with singular edge 3-6 int refprism_1fb_1ec_0v_splitedges[][3] = { {2,3,9}, {1,3,12}, {3,2,10}, {3,1,11}, {5,6,42}, {4,6,45}, {6,5,43}, {6,4,44}, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE refprism_1fb_1ec_0v_newelstypes[] = { HP_PRISM_SINGEDGE, HP_HEX, HP_HEX_1F_0E_0V, HP_NONE, }; int refprism_1fb_1ec_0v_newels[][8] = { { 3, 11, 10, 6, 44, 43}, { 12, 9, 10, 11, 45, 42, 43, 44}, { 4, 5, 2, 1, 45, 42, 9, 12 } }; HPRef_Struct refprism_1fb_1ec_0v = { HP_PRISM, refprism_1fb_1ec_0v_splitedges, 0, 0, refprism_1fb_1ec_0v_newelstypes, refprism_1fb_1ec_0v_newels }; // HP_PRISM_1FA_1FB_1EC_0V ... bot-trig face, quad face 1-2-4-5 with singular edge 3-6 int refprism_1fa_1fb_1ec_0v_splitedges[][3] = { {2,3,9}, {1,3,12}, {3,2,10}, {3,1,11}, {5,6,42}, {4,6,45}, {6,5,43}, {6,4,44}, {1,4,16}, {2,5,17}, {3,6,18}, { 0, 0, 0 } }; int refprism_1fa_1fb_1ec_0v_splitfaces[][4] = { {2,3,5,21}, {3,2,6,22}, {3,1,6,23}, {1,3,4,24}, {0,0,0,0} }; HPREF_ELEMENT_TYPE refprism_1fa_1fb_1ec_0v_newelstypes[] = { HP_PRISM_SINGEDGE, HP_HEX, HP_HEX_1F_0E_0V, HP_PRISM_1FA_1E_0V, HP_HEX_1F_0E_0V, HP_HEX_1FA_1FB_0E_0V, HP_NONE, }; int refprism_1fa_1fb_1ec_0v_newels[][8] = { { 18, 23, 22, 6, 44, 43}, { 24, 21, 22, 23, 45, 42, 43, 44}, { 4, 5, 17, 16, 45, 42, 21, 24}, { 3, 11, 10, 18, 23, 22}, { 12, 9, 10, 11, 24, 21, 22, 23}, { 1, 2, 9, 12, 16, 17, 21, 24} }; HPRef_Struct refprism_1fa_1fb_1ec_0v = { HP_PRISM, refprism_1fa_1fb_1ec_0v_splitedges, refprism_1fa_1fb_1ec_0v_splitfaces, 0, refprism_1fa_1fb_1ec_0v_newelstypes, refprism_1fa_1fb_1ec_0v_newels }; // HP_PRISM_1FA_1FB_2EB_0V int refprism_1fa_1fb_2eb_0v_splitedges[][3] = { {2,3,9}, {1,3,12}, {3,2,10}, {3,1,11}, {5,6,42}, {4,6,45}, {6,5,43}, {6,4,44}, {1,4,16}, {2,5,17}, {3,6,18}, { 4, 5, 40}, { 4, 6, 45}, { 1, 2, 7}, { 0, 0, 0 } }; int refprism_1fa_1fb_2eb_0v_splitfaces[][4] = { {2,3,5,21}, {3,2,6,22}, {3,1,6,23}, {1,3,4,24}, {1,2,4,19}, {0,0,0,0} }; HPREF_ELEMENT_TYPE refprism_1fa_1fb_2eb_0v_newelstypes[] = { HP_PRISM_SINGEDGE, HP_HEX, HP_HEX_1F_0E_0V, HP_PRISM_1FA_1E_0V, HP_HEX_1F_0E_0V, HP_HEX_1FA_1FB_0E_0V, HP_PRISM_1FB_1EA_0V, HP_PRISM_1FA_1FB_1EA_0V, HP_NONE, }; int refprism_1fa_1fb_2eb_0v_newels[][8] = { { 18, 23, 22, 6, 44, 43}, { 24, 21, 22, 23, 45, 42, 43, 44}, { 40, 5, 17, 19, 45, 42, 21, 24}, { 3, 11, 10, 18, 23, 22}, { 12, 9, 10, 11, 24, 21, 22, 23}, { 7, 2, 9, 12, 19, 17, 21, 24}, {16,19,24,4,40,45}, {1,7,12,16,19,24} }; HPRef_Struct refprism_1fa_1fb_2eb_0v = { HP_PRISM, refprism_1fa_1fb_2eb_0v_splitedges, refprism_1fa_1fb_2eb_0v_splitfaces, 0, refprism_1fa_1fb_2eb_0v_newelstypes, refprism_1fa_1fb_2eb_0v_newels }; // HP_PRISM_1FA_1FB_2EC_0V int refprism_1fa_1fb_2ec_0v_splitedges[][3] = { {2,3,9}, {1,3,12}, {3,2,10}, {3,1,11}, {5,6,42}, {4,6,45}, {6,5,43}, {6,4,44}, {1,4,16}, {2,5,17}, {3,6,18}, {5,4,41}, {2,1,8}, { 0, 0, 0 } }; int refprism_1fa_1fb_2ec_0v_splitfaces[][4] = { {2,3,5,21}, {3,2,6,22}, {3,1,6,23}, {1,3,4,24}, {2,1,5,20}, {0,0,0,0} }; HPREF_ELEMENT_TYPE refprism_1fa_1fb_2ec_0v_newelstypes[] = { HP_PRISM_SINGEDGE, HP_HEX, HP_HEX_1F_0E_0V, HP_PRISM_1FA_1E_0V, HP_HEX_1F_0E_0V, HP_HEX_1FA_1FB_0E_0V, HP_PRISM_1FA_1FB_1EB_0V, HP_PRISM_1FB_1EA_0V, HP_NONE, }; int refprism_1fa_1fb_2ec_0v_newels[][8] = { { 18, 23, 22, 6, 44, 43}, { 24, 21, 22, 23, 45, 42, 43, 44}, { 4, 41, 20, 16, 45, 42, 21, 24}, { 3, 11, 10, 18, 23, 22}, { 12, 9, 10, 11, 24, 21, 22, 23}, { 1, 8, 9, 12, 16, 20, 21, 24}, {8,2,9,20,17,21}, {5,41,42,17,20,21} }; HPRef_Struct refprism_1fa_1fb_2ec_0v = { HP_PRISM, refprism_1fa_1fb_2ec_0v_splitedges, refprism_1fa_1fb_2ec_0v_splitfaces, 0, refprism_1fa_1fb_2ec_0v_newelstypes, refprism_1fa_1fb_2ec_0v_newels }; // HP_PRISM_2FA_1FB_1EC_0V ... trig faces, quad face 1-2-4-5 with singular edge 3-6 int refprism_2fa_1fb_1ec_0v_splitedges[][3] = { {2,3,9}, {1,3,12}, {3,2,10}, {3,1,11}, {5,6,42}, {4,6,45}, {6,5,43}, {6,4,44}, {1,4,16}, {2,5,17}, {3,6,18}, { 4, 1, 28}, { 5, 2, 29}, { 6, 3, 30}, { 0, 0, 0 } }; int refprism_2fa_1fb_1ec_0v_splitfaces[][4] = { {2,3,5,21}, {3,2,6,22}, {3,1,6,23}, {1,3,4,24}, {5,2,6,33}, {6,5,3,34}, {6,4,3,35}, {4,1,6,36}, {0,0,0,0} }; HPREF_ELEMENT_TYPE refprism_2fa_1fb_1ec_0v_newelstypes[] = { HP_PRISM_SINGEDGE, HP_HEX, HP_HEX_1F_0E_0V, HP_PRISM_1FA_1E_0V, HP_HEX_1F_0E_0V, HP_HEX_1FA_1FB_0E_0V, HP_PRISM_1FA_1E_0V, HP_HEX_1F_0E_0V, HP_HEX_1FA_1FB_0E_0V, HP_NONE, }; int refprism_2fa_1fb_1ec_0v_newels[][8] = { { 18, 23, 22, 30, 35, 34}, { 24, 21, 22, 23, 36, 33, 34, 35}, { 28, 29, 17, 16, 36, 33, 21, 24}, { 3, 11, 10, 18, 23, 22}, { 12, 9, 10, 11, 24, 21, 22, 23}, { 1, 2, 9, 12, 16, 17, 21, 24}, { 6, 43, 44, 30, 34, 35}, { 44, 43, 42, 45, 35, 34, 33, 36}, { 5, 4, 45, 42, 29, 28, 36, 33 }, }; HPRef_Struct refprism_2fa_1fb_1ec_0v = { HP_PRISM, refprism_2fa_1fb_1ec_0v_splitedges, refprism_2fa_1fb_1ec_0v_splitfaces, 0, refprism_2fa_1fb_1ec_0v_newelstypes, refprism_2fa_1fb_1ec_0v_newels }; // HP_PRISM_2FA_1FB_2EB_0V int refprism_2fa_1fb_2eb_0v_splitedges[][3] = { {2,3,9}, {1,3,12}, {3,2,10}, {3,1,11}, {5,6,42}, {4,6,45}, {6,5,43}, {6,4,44}, {1,4,16}, {2,5,17}, {3,6,18}, { 4, 1, 28}, { 5, 2, 29}, { 6, 3, 30}, {4,5,40}, {1,2,7}, { 0, 0, 0 } }; int refprism_2fa_1fb_2eb_0v_splitfaces[][4] = { {2,3,5,21}, {3,2,6,22}, {3,1,6,23}, {1,3,4,24}, {5,6,2,33}, {6,5,3,34}, {6,4,3,35}, {4,1,6,36}, {4,1,5,31}, {1,2,4,19}, {0,0,0,0} }; HPREF_ELEMENT_TYPE refprism_2fa_1fb_2eb_0v_newelstypes[] = { HP_PRISM_SINGEDGE, HP_HEX, HP_HEX_1F_0E_0V, HP_PRISM_1FA_1E_0V, HP_HEX_1F_0E_0V, HP_HEX_1FA_1FB_0E_0V, HP_PRISM_1FA_1E_0V, HP_HEX_1F_0E_0V, HP_HEX_1FA_1FB_0E_0V, HP_PRISM_1FA_1FB_1EA_0V, HP_PRISM_1FB_1EA_0V, HP_PRISM_1FA_1FB_1EB_0V, HP_NONE, }; int refprism_2fa_1fb_2eb_0v_newels[][8] = { { 18, 23, 22, 30, 35, 34}, { 24, 21, 22, 23, 36, 33, 34, 35}, { 31, 29, 17, 19, 36, 33, 21, 24}, { 3, 11, 10, 18, 23, 22}, { 12, 9, 10, 11, 24, 21, 22, 23}, { 7, 2, 9, 12, 19, 17, 21, 24}, { 6, 43, 44, 30, 34, 35}, { 44, 43, 42, 45, 35, 34, 33, 36}, { 5, 40, 45, 42, 29, 31, 36, 33 }, { 1, 7, 12, 16, 19, 24 }, { 16, 19, 24, 28, 31, 36 }, { 40, 4, 45, 31, 28, 36 }, }; HPRef_Struct refprism_2fa_1fb_2eb_0v = { HP_PRISM, refprism_2fa_1fb_2eb_0v_splitedges, refprism_2fa_1fb_2eb_0v_splitfaces, 0, refprism_2fa_1fb_2eb_0v_newelstypes, refprism_2fa_1fb_2eb_0v_newels }; // HP_PRISM_1FB_2EA_0V ... quad face 1-2-4-5 with singular edges 1-4, 2-5 int refprism_1fb_2ea_0v_splitedges[][3] = { { 1, 3, 7 }, { 2, 3, 8 }, { 1, 2, 9 }, { 2, 1, 10 }, { 4, 6, 11 }, { 5, 6, 12 }, { 4, 5, 13 }, { 5, 4, 14 }, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE refprism_1fb_2ea_0v_newelstypes[] = { HP_PRISM, HP_PRISM_1FB_1EA_0V, HP_HEX_1F_0E_0V, HP_PRISM_1FB_1EA_0V, HP_NONE, }; int refprism_1fb_2ea_0v_newels[][8] = { { 7, 8, 3, 11, 12, 6 }, { 1, 9, 7, 4, 13, 11 }, { 13, 14, 10, 9, 11, 12, 8, 7 }, { 5, 14, 12, 2, 10, 8 }, }; HPRef_Struct refprism_1fb_2ea_0v = { HP_PRISM, refprism_1fb_2ea_0v_splitedges, 0, 0, refprism_1fb_2ea_0v_newelstypes, refprism_1fb_2ea_0v_newels }; // HP_PRISM_1FB_2EB_0V ... quad face 1-2-4-5 with singular edges 1-4, 3-6 int refprism_1fb_2eb_0v_splitedges[][3] = { { 1, 2, 7}, { 2, 3, 9}, { 3, 2, 10}, { 3, 1, 11}, { 1, 3, 12}, { 4, 5, 40}, { 5, 6, 42}, { 6, 5, 43}, { 6, 4, 44}, { 4, 6, 45}, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE refprism_1fb_2eb_0v_newelstypes[] = { HP_PRISM_SINGEDGE, HP_HEX, HP_PRISM_1FB_1EA_0V, HP_HEX_1F_0E_0V, HP_NONE, }; int refprism_1fb_2eb_0v_newels[][8] = { { 3, 11, 10, 6, 44, 43 }, { 12, 9, 10, 11, 45, 42, 43, 44}, { 1, 7, 12, 4, 40, 45}, { 40, 5, 2, 7, 45, 42, 9, 12} }; HPRef_Struct refprism_1fb_2eb_0v = { HP_PRISM, refprism_1fb_2eb_0v_splitedges, 0, 0, refprism_1fb_2eb_0v_newelstypes, refprism_1fb_2eb_0v_newels }; // HP_PRISM_1FB_3E_0V ... quad face 1-2-4-5 with singular edges 1-4, 3-6 int refprism_1fb_3e_0v_splitedges[][3] = { { 1, 2, 7}, { 2, 1, 8}, { 2, 3, 9}, { 3, 2, 10}, { 3, 1, 11}, { 1, 3, 12}, { 4, 5, 40}, { 5, 4, 41}, { 5, 6, 42}, { 6, 5, 43}, { 6, 4, 44}, { 4, 6, 45}, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE refprism_1fb_3e_0v_newelstypes[] = { HP_PRISM_SINGEDGE, HP_HEX, HP_PRISM_1FB_1EA_0V, HP_HEX_1F_0E_0V, HP_PRISM_1FB_1EA_0V, HP_NONE, }; int refprism_1fb_3e_0v_newels[][8] = { { 3, 11, 10, 6, 44, 43 }, { 12, 9, 10, 11, 45, 42, 43, 44}, { 1, 7, 12, 4, 40, 45 }, { 40, 41, 8, 7, 45, 42, 9, 12}, { 5, 41, 42, 2, 8, 9}, }; HPRef_Struct refprism_1fb_3e_0v = { HP_PRISM, refprism_1fb_3e_0v_splitedges, 0, 0, refprism_1fb_3e_0v_newelstypes, refprism_1fb_3e_0v_newels }; // HP_PRISM_2FB ... quad face 1-2-4-5 and quad face 1-4-6-3 int refprism_2fb_0e_0v_splitedges[][3] = { { 1, 3, 7 }, { 2, 3, 8 }, { 1, 2, 9 }, { 3, 2, 10 }, { 4, 6, 11 }, { 5, 6, 12 }, { 4, 5, 13 }, { 6, 5, 14 }, { 0, 0, 0 } }; int refprism_2fb_0e_0v_splitfaces[][4] = { { 1, 2, 3, 15 }, { 4, 5, 6, 16 }, { 0, 0, 0, 0 }, }; HPREF_ELEMENT_TYPE refprism_2fb_0e_0v_newelstypes[] = { HP_PRISM, HP_HEX_1F_0E_0V, HP_HEX_1F_0E_0V, HP_PRISM_1FB_1EA_0V, HP_PRISM_1FB_1EA_0V, HP_NONE, }; int refprism_2fb_0e_0v_newels[][8] = { { 15, 8, 10, 16, 12, 14 }, { 13, 5, 2, 9, 16, 12, 8, 15}, { 11, 7, 3, 6, 16, 15, 10, 14 }, { 1, 9, 15, 4, 13, 16 }, { 4, 11, 16, 1,7, 15 } }; HPRef_Struct refprism_2fb_0e_0v = { HP_PRISM, refprism_2fb_0e_0v_splitedges, refprism_2fb_0e_0v_splitfaces, 0, refprism_2fb_0e_0v_newelstypes, refprism_2fb_0e_0v_newels }; // HP_PRISM_2FB ... quad face 1-2-4-5 and quad face 1-4-6-3 and sing edge 3-6 int refprism_2fb_1ec_0v_splitedges[][3] = { { 1, 3, 7 }, { 2, 3, 8 }, { 1, 2, 9 }, { 3, 2, 10 }, { 4, 6, 11 }, { 5, 6, 12 }, { 4, 5, 13 }, { 6, 5, 14 }, { 3, 1, 17}, { 6, 4, 18}, { 0, 0, 0 } }; int refprism_2fb_1ec_0v_splitfaces[][4] = { { 1, 2, 3, 15 }, { 4, 5, 6, 16 }, { 0, 0, 0, 0 }, }; HPREF_ELEMENT_TYPE refprism_2fb_1ec_0v_newelstypes[] = { HP_PRISM, HP_HEX_1F_0E_0V, HP_HEX_1F_0E_0V, HP_PRISM_1FB_1EA_0V, HP_PRISM_1FB_1EA_0V, HP_PRISM_1FB_1EA_0V, HP_NONE, }; int refprism_2fb_1ec_0v_newels[][8] = { { 15, 8, 10, 16, 12, 14 }, { 13, 5, 2, 9, 16, 12, 8, 15}, { 11, 7, 17, 18, 16, 15, 10, 14 }, { 1, 9, 15, 4, 13, 16 }, { 4, 11, 16, 1,7, 15 }, { 3, 17, 10, 6, 18, 14 } }; HPRef_Struct refprism_2fb_1ec_0v = { HP_PRISM, refprism_2fb_1ec_0v_splitedges, refprism_2fb_1ec_0v_splitfaces, 0, refprism_2fb_1ec_0v_newelstypes, refprism_2fb_1ec_0v_newels }; // HP_PRISM_2FB ... quad face 1-2-4-5 and quad face 1-4-6-3 and 3 sing edges int refprism_2fb_3e_0v_splitedges[][3] = { { 1, 3, 7 }, { 2, 3, 8 }, { 1, 2, 9 }, { 3, 2, 10 }, { 4, 6, 11 }, { 5, 6, 12 }, { 4, 5, 13 }, { 6, 5, 14 }, { 3, 1, 17}, { 6, 4, 18}, { 2, 1, 19}, { 5, 4, 20}, { 0, 0, 0 } }; int refprism_2fb_3e_0v_splitfaces[][4] = { { 1, 2, 3, 15 }, { 4, 5, 6, 16 }, { 0, 0, 0, 0 }, }; HPREF_ELEMENT_TYPE refprism_2fb_3e_0v_newelstypes[] = { HP_PRISM, HP_HEX_1F_0E_0V, HP_HEX_1F_0E_0V, HP_PRISM_1FB_1EA_0V, HP_PRISM_1FB_1EA_0V, HP_PRISM_1FB_1EA_0V, HP_PRISM_1FB_1EA_0V, HP_NONE, }; int refprism_2fb_3e_0v_newels[][8] = { { 15, 8, 10, 16, 12, 14 }, { 13, 20, 19, 9, 16, 12, 8, 15}, { 11, 7, 17, 18, 16, 15, 10, 14 }, { 1, 9, 15, 4, 13, 16 }, { 4, 11, 16, 1,7, 15 }, { 3, 17, 10, 6, 18, 14 }, { 5, 20, 12, 2, 19, 8 } }; HPRef_Struct refprism_2fb_3e_0v = { HP_PRISM, refprism_2fb_3e_0v_splitedges, refprism_2fb_3e_0v_splitfaces, 0, refprism_2fb_3e_0v_newelstypes, refprism_2fb_3e_0v_newels }; // HP_PRISM_1FA_1FB_0E_0V ... quad face 1-2-4-5 and trig face 1-2-3 int refprism_1fa_1fb_0e_0v_splitedges[][3] = { {1,4,16}, {2,5,17}, {3,6,18}, {2,3,9}, {1,3,12}, {5,6,42}, {4,6,45}, {0,0,0} }; int refprism_1fa_1fb_0e_0v_splitfaces[][4] = { {2,3,5,21}, {1,3,4,24}, { 0, 0, 0, 0 } }; HPREF_ELEMENT_TYPE refprism_1fa_1fb_0e_0v_newelstypes[] = { HP_PRISM, HP_HEX_1F_0E_0V, HP_PRISM_1FA_0E_0V, HP_HEX_1FA_1FB_0E_0V, HP_NONE, }; int refprism_1fa_1fb_0e_0v_newels[][8] = { { 24, 21, 18, 45, 42, 6 }, { 4, 5, 17, 16, 45, 42, 21, 24 }, { 12, 9, 3, 24, 21, 18 }, { 1, 2, 9, 12, 16, 17, 21, 24 } }; HPRef_Struct refprism_1fa_1fb_0e_0v = { HP_PRISM, refprism_1fa_1fb_0e_0v_splitedges, refprism_1fa_1fb_0e_0v_splitfaces, 0, refprism_1fa_1fb_0e_0v_newelstypes, refprism_1fa_1fb_0e_0v_newels }; /* // HP_PRISM_1FA_1FB_1EC_0V ... quad face 1-2-4-5 and trig face 1-2-3 int refprism_1fa_1fb_1ec_0v_splitedges[][3] = { {1,4,16}, {2,5,17}, {3,6,18}, {2,3,9}, {1,3,12}, {5,6,42}, {4,6,45}, {6,5,43}, {6,4,44}, {3,2,10}, {3,1,11}, {0,0,0} }; int refprism_1fa_1fb_1ec_0v_splitfaces[][4] = { {2,3,5,21}, {1,3,4,24}, { 0, 0, 0, 0 } }; HPREF_ELEMENT_TYPE refprism_1fa_1fb_1ec_0v_newelstypes[] = { HP_PRISM, HP_HEX_1F_0E_0V, HP_PRISM_1FA_0E_0V, HP_HEX_1FA_1FB_0E_0V, HP_PRISM_SINGEDGE, HP_PRISM_1FA_1E_0V, HP_PRISM_ HP_NONE, }; int refprism_1fa_1fb_0e_0v_newels[][8] = { { 24, 21, 18, 45, 42, 6 }, { 4, 5, 17, 16, 45, 42, 21, 24 }, { 12, 9, 3, 24, 21, 18 }, { 1, 2, 9, 12, 16, 17, 21, 24 } }; HPRef_Struct refprism_1fa_1fb_0e_0v = { HP_PRISM, refprism_1fa_1fb_1ec_0v_splitedges, refprism_1fa_1fb_1ec_0v_splitfaces, 0, refprism_1fa_1fb_1ec_0v_newelstypes, refprism_1fa_1fb_1ec_0v_newels }; */ // HP_PRISM_2FA_1FB_0E_0V ... quad face 1-2-4-5 and trig face 1-2-3 int refprism_2fa_1fb_0e_0v_splitedges[][3] = { {2,3,9}, {1,3,12}, {1,4,16}, {2,5,17}, {3,6,18}, {5,6,42}, {4,6,45}, {4,1,28}, {5,2,29}, {6,3,30}, {0,0,0} }; int refprism_2fa_1fb_0e_0v_splitfaces[][4] = { {2,3,5,21}, {1,3,4,24}, {5,6,2,33}, {4,1,6,36}, {0,0,0,0} }; HPREF_ELEMENT_TYPE refprism_2fa_1fb_0e_0v_newelstypes[] = { HP_HEX_1F_0E_0V, HP_PRISM, HP_PRISM_1FA_0E_0V, HP_HEX_1FA_1FB_0E_0V, HP_PRISM_1FA_0E_0V, HP_HEX_1FA_1FB_0E_0V, HP_NONE, }; int refprism_2fa_1fb_0e_0v_newels[][8] = { {28,29,17,16,36,33,21,24}, {24,21,18, 36, 33, 30}, {12,9,3,24,21,18}, {1,2,9,12,16,17,21,24}, {6,42,45,30,33,36}, {4,5,29,28,45,42,33,36} }; HPRef_Struct refprism_2fa_1fb_0e_0v = { HP_PRISM, refprism_2fa_1fb_0e_0v_splitedges, refprism_2fa_1fb_0e_0v_splitfaces, 0, refprism_2fa_1fb_0e_0v_newelstypes, refprism_2fa_1fb_0e_0v_newels }; // HP_PRISM_1FA_1FB_1EA_0V ... quad face 1-2-4-5 and trig face 1-2-3 int refprism_1fa_1fb_1ea_0v_splitedges[][3] = { {2,3,9}, {1,3,12}, {1,4,16}, {2,5,17}, {3,6,18}, {5,6,42}, {4,6,45}, {4,5,40}, {1,2,7}, {0,0,0}, }; int refprism_1fa_1fb_1ea_0v_splitfaces[][4] = { {2,3,5,21}, {1,3,4,24}, {1,2,4,19}, {0,0,0,0}, }; HPREF_ELEMENT_TYPE refprism_1fa_1fb_1ea_0v_newelstypes[] = { HP_HEX_1F_0E_0V, HP_PRISM, HP_PRISM_1FA_0E_0V, HP_HEX_1FA_1FB_0E_0V, HP_PRISM_1FB_1EA_0V, HP_PRISM_1FA_1FB_1EA_0V, HP_NONE }; int refprism_1fa_1fb_1ea_0v_newels[][8] = { {40,5,17,19,45,42,21,24}, {24,21,18,45,42,6}, {12,9,3,24,21,18}, {7,2,9,12,19,17,21,24}, {16,19,24,4,40,45}, {1,7,12,16,19,24} }; HPRef_Struct refprism_1fa_1fb_1ea_0v = { HP_PRISM, refprism_1fa_1fb_1ea_0v_splitedges, refprism_1fa_1fb_1ea_0v_splitfaces, 0, refprism_1fa_1fb_1ea_0v_newelstypes, refprism_1fa_1fb_1ea_0v_newels }; // HP_PRISM_2FA_1FB_1EA_0V int refprism_2fa_1fb_1ea_0v_splitedges[][3] = { {2,3,9}, {1,3,12}, {1,4,16}, {2,5,17}, {3,6,18}, {5,6,42}, {4,6,45}, {4,1,28}, {5,2,29}, {6,3,30}, {4,5,40}, {1,2,7}, {0,0,0}, }; int refprism_2fa_1fb_1ea_0v_splitfaces[][4] = { {2,3,5,21}, {1,3,4,24}, {1,2,4,19}, {4,1,6,36}, {4,1,5,31}, {5,6,2,33}, {0,0,0,0}, }; HPREF_ELEMENT_TYPE refprism_2fa_1fb_1ea_0v_newelstypes[] = { HP_PRISM, HP_HEX_1F_0E_0V, HP_PRISM_1FB_1EA_0V, HP_PRISM_1FA_0E_0V, HP_HEX_1FA_1FB_0E_0V, HP_PRISM_1FA_1FB_1EA_0V, HP_PRISM_1FA_0E_0V, HP_HEX_1FA_1FB_0E_0V, HP_PRISM_1FA_1FB_1EB_0V, HP_NONE }; int refprism_2fa_1fb_1ea_0v_newels[][8] = { { 18, 24, 21, 30, 36, 33}, { 31, 29, 17, 19, 36, 33, 21, 24}, { 16,19, 24, 28, 31, 36 }, { 3, 12, 9, 18, 24, 21 }, { 7, 2, 9, 12, 19, 17, 21, 24}, { 1, 7, 12, 16, 19, 24 }, { 6, 42, 45, 30, 33, 36 }, { 40, 5, 29, 31, 45, 42, 33, 36 }, { 40, 4, 45, 31, 28, 36} }; HPRef_Struct refprism_2fa_1fb_1ea_0v = { HP_PRISM, refprism_2fa_1fb_1ea_0v_splitedges, refprism_2fa_1fb_1ea_0v_splitfaces, 0, refprism_2fa_1fb_1ea_0v_newelstypes, refprism_2fa_1fb_1ea_0v_newels }; // HP_PRISM_2FA_1FB_2EA_0V int refprism_2fa_1fb_2ea_0v_splitedges[][3] = { {2,3,9}, {1,3,12}, {1,4,16}, {2,5,17}, {3,6,18}, {5,6,42}, {4,6,45}, {4,1,28}, {5,2,29}, {6,3,30}, {4,5,40}, {1,2,7}, { 5, 4, 41}, { 2, 1, 8}, {0,0,0}, }; int refprism_2fa_1fb_2ea_0v_splitfaces[][4] = { {2,3,5,21}, {1,3,4,24}, {1,2,4,19}, {4,1,6,36}, {4,1,5,31}, {5,6,2,33}, {5,4,2,32}, {2,1,5,20}, {0,0,0,0}, }; HPREF_ELEMENT_TYPE refprism_2fa_1fb_2ea_0v_newelstypes[] = { HP_PRISM, HP_HEX_1F_0E_0V, HP_PRISM_1FB_1EA_0V, HP_PRISM_1FA_0E_0V, HP_HEX_1FA_1FB_0E_0V, HP_PRISM_1FA_1FB_1EA_0V, HP_PRISM_1FA_0E_0V, HP_HEX_1FA_1FB_0E_0V, HP_PRISM_1FA_1FB_1EB_0V, HP_PRISM_1FA_1FB_1EB_0V, HP_PRISM_1FB_1EA_0V, HP_PRISM_1FA_1FB_1EA_0V, HP_NONE }; int refprism_2fa_1fb_2ea_0v_newels[][8] = { { 18, 24, 21, 30, 36, 33}, { 31, 32, 20, 19, 36, 33, 21, 24}, { 16,19, 24, 28, 31, 36 }, { 3, 12, 9, 18, 24, 21 }, {7,8,9,12,19,20,21,24}, { 1, 7, 12, 16, 19, 24 }, { 6, 42, 45, 30, 33, 36 }, { 40, 41, 32, 31, 45, 42, 33, 36}, { 40, 4, 45, 31, 28, 36}, { 8, 2, 9, 20, 17, 21 }, { 29, 32, 33, 17, 20, 21 }, { 5, 41, 42, 29, 32, 33 }, }; HPRef_Struct refprism_2fa_1fb_2ea_0v = { HP_PRISM, refprism_2fa_1fb_2ea_0v_splitedges, refprism_2fa_1fb_2ea_0v_splitfaces, 0, refprism_2fa_1fb_2ea_0v_newelstypes, refprism_2fa_1fb_2ea_0v_newels }; // HP_PRISM_2FA_1FB_3E_0V int refprism_2fa_1fb_3e_0v_splitedges[][3] = { { 1, 2, 7}, { 2, 1, 8}, { 2, 3, 9}, { 3, 2, 10}, { 3, 1, 11}, { 1, 3, 12}, { 1, 4, 16}, { 2, 5, 17}, { 3, 6, 18}, { 4, 1, 28}, { 5, 2, 29}, { 6, 3, 30}, { 4, 5, 40}, { 5, 4, 41}, { 5, 6, 42}, { 6, 5, 43}, { 6, 4, 44}, { 4, 6, 45}, {0,0,0}, }; int refprism_2fa_1fb_3e_0v_splitfaces[][4] = { {1,2,4,19}, {2,1,5,20}, {2,3,5,21}, {3,2,6,22}, {3,1,6,23}, {1,3,4,24}, {4,1,5,31}, {5,4,2,32}, {5,6,2,33}, {6,5,3,34}, {6,4,3,35}, {4,1,6,36}, {0,0,0,0}, }; HPREF_ELEMENT_TYPE refprism_2fa_1fb_3e_0v_newelstypes[] = { HP_HEX, HP_PRISM_SINGEDGE, HP_HEX_1F_0E_0V, HP_PRISM_1FB_1EA_0V, HP_PRISM_1FB_1EA_0V, HP_HEX_1F_0E_0V, HP_PRISM_1FA_1E_0V, HP_PRISM_1FA_1FB_1EA_0V, HP_PRISM_1FA_1FB_1EB_0V, HP_HEX_1FA_1FB_0E_0V, HP_HEX_1F_0E_0V, HP_PRISM_1FA_1E_0V, HP_PRISM_1FA_1FB_1EB_0V, HP_PRISM_1FA_1FB_1EA_0V, HP_HEX_1FA_1FB_0E_0V, HP_NONE }; int refprism_2fa_1fb_3e_0v_newels[][8] = { {24, 21, 22, 23, 36, 33, 34, 35}, {18, 23, 22, 30, 35, 34}, { 31, 32, 20, 19, 36, 33, 21, 24}, { 16,19, 24, 28, 31, 36 }, { 29, 32, 33, 17, 20, 21}, { 12, 9,10,11, 24, 21, 22, 23 }, { 3, 11, 10, 18,23,22}, { 1, 7, 12 , 16, 19, 24}, { 8,2,9, 20, 17,21}, { 7,8,9,12,19, 20, 21, 24}, { 44, 43, 42, 45, 35, 34, 33, 36}, { 6, 43, 44, 30, 34, 35}, { 40, 4, 45, 31,28, 36}, { 5, 41,42, 29, 32, 33}, { 40, 41, 32, 31, 45, 42, 33, 36}, }; HPRef_Struct refprism_2fa_1fb_3e_0v = { HP_PRISM, refprism_2fa_1fb_3e_0v_splitedges, refprism_2fa_1fb_3e_0v_splitfaces, 0, refprism_2fa_1fb_3e_0v_newelstypes, refprism_2fa_1fb_3e_0v_newels }; // HP_PRISM_1FA_1FB_1EB_0V ... quad face 1-2-4-5 and trig face 1-2-3 int refprism_1fa_1fb_1eb_0v_splitedges[][3] = { {2,3,9}, {1,3,12}, {1,4,16}, {2,5,17}, {3,6,18}, {5,6,42}, {4,6,45}, {5,4,41}, {2,1,8}, {0,0,0}, }; int refprism_1fa_1fb_1eb_0v_splitfaces[][4] = { {2,3,5,21}, {1,3,4,24}, {2,1,5,20}, {0,0,0,0}, }; HPREF_ELEMENT_TYPE refprism_1fa_1fb_1eb_0v_newelstypes[] = { HP_HEX_1F_0E_0V, HP_PRISM, HP_PRISM_1FA_0E_0V, HP_HEX_1FA_1FB_0E_0V, HP_PRISM_1FB_1EA_0V, HP_PRISM_1FA_1FB_1EB_0V , HP_NONE }; int refprism_1fa_1fb_1eb_0v_newels[][8] = { {4,41,20,16,45,42,21,24}, {24,21,18,45,42,6}, {12,9,3,24,21,18}, {1,8,9,12,16,20,21,24}, {5,41,42,17,20,21}, {8,2,9,20,17,21} }; HPRef_Struct refprism_1fa_1fb_1eb_0v = { HP_PRISM, refprism_1fa_1fb_1eb_0v_splitedges, refprism_1fa_1fb_1eb_0v_splitfaces, 0, refprism_1fa_1fb_1eb_0v_newelstypes, refprism_1fa_1fb_1eb_0v_newels }; // HP_PRISM_1FA_1FB_2EA_0V ... quad face 1-2-4-5 and trig face 1-2-3 int refprism_1fa_1fb_2ea_0v_splitedges[][3] = { {2,3,9}, {1,3,12}, {1,4,16}, {2,5,17}, {3,6,18}, {5,6,42}, {4,6,45}, {5,4,41}, {2,1,8}, {4,5,40}, {1,2,7}, {0,0,0}, }; int refprism_1fa_1fb_2ea_0v_splitfaces[][4] = { {2,3,5,21}, {1,3,4,24}, {2,1,5,20}, {1,2,4,19}, {0,0,0,0}, }; HPREF_ELEMENT_TYPE refprism_1fa_1fb_2ea_0v_newelstypes[] = { HP_HEX_1F_0E_0V, HP_PRISM, HP_PRISM_1FA_0E_0V, HP_HEX_1FA_1FB_0E_0V, HP_PRISM_1FB_1EA_0V, HP_PRISM_1FA_1FB_1EB_0V , HP_PRISM_1FB_1EA_0V, HP_PRISM_1FA_1FB_1EA_0V, HP_NONE }; int refprism_1fa_1fb_2ea_0v_newels[][8] = { {40,41,20,19,45,42,21,24}, {24,21,18,45,42,6}, {12,9,3,24,21,18}, {7,8,9,12,19,20,21,24}, {5,41,42,17,20,21}, {8,2,9,20,17,21}, {16,19,24,4,40,45}, {1,7,12,16,19,24} }; HPRef_Struct refprism_1fa_1fb_2ea_0v = { HP_PRISM, refprism_1fa_1fb_2ea_0v_splitedges, refprism_1fa_1fb_2ea_0v_splitfaces, 0, refprism_1fa_1fb_2ea_0v_newelstypes, refprism_1fa_1fb_2ea_0v_newels }; // HP_PRISM_1FA_1FB_3E_0V int refprism_1fa_1fb_3e_0v_splitedges[][3] = { {2,3,9}, {1,3,12}, {1,4,16}, {2,5,17}, {3,6,18}, {5,6,42}, {4,6,45}, {5,4,41}, {2,1,8}, {4,5,40}, {1,2,7}, { 3, 2, 10}, { 3, 1, 11}, { 6, 5, 43}, { 6, 4, 44}, {0,0,0}, }; int refprism_1fa_1fb_3e_0v_splitfaces[][4] = { {2,3,5,21}, {1,3,4,24}, {2,1,5,20}, {1,2,4,19}, {3,2,6,22}, {3,1,6,23}, {0,0,0,0}, }; HPREF_ELEMENT_TYPE refprism_1fa_1fb_3e_0v_newelstypes[] = { HP_HEX_1F_0E_0V, HP_HEX, HP_PRISM_SINGEDGE, HP_HEX_1F_0E_0V, HP_PRISM_1FA_1E_0V, HP_HEX_1FA_1FB_0E_0V, HP_PRISM_1FB_1EA_0V, HP_PRISM_1FA_1FB_1EB_0V , HP_PRISM_1FB_1EA_0V, HP_PRISM_1FA_1FB_1EA_0V, HP_NONE }; int refprism_1fa_1fb_3e_0v_newels[][8] = { {40,41,20,19,45,42,21,24}, {24, 21, 22, 23, 45, 42, 43, 44}, {18, 23, 22, 6, 44, 43}, {12, 9, 10, 11, 24, 21, 22, 23}, {3, 11, 10, 18, 23, 22}, {7,8,9,12,19,20,21,24}, {5,41,42,17,20,21}, {8,2,9,20,17,21}, {16,19,24,4,40,45}, {1,7,12,16,19,24} }; HPRef_Struct refprism_1fa_1fb_3e_0v = { HP_PRISM, refprism_1fa_1fb_3e_0v_splitedges, refprism_1fa_1fb_3e_0v_splitfaces, 0, refprism_1fa_1fb_3e_0v_newelstypes, refprism_1fa_1fb_3e_0v_newels }; // HP_PRISM_2FA_0E_0V singular trig faces int refprism_2fa_0e_0v_splitedges[][3] = { {1,4,16}, {2,5,17}, {3,6,18}, {4,1,28}, {5,2,29}, {6,3,30}, {0,0,0} }; HPREF_ELEMENT_TYPE refprism_2fa_0e_0v_newelstypes[] = { HP_PRISM, HP_PRISM_1FA_0E_0V, HP_PRISM_1FA_0E_0V, HP_NONE }; int refprism_2fa_0e_0v_newels[][8] = { {16,17,18,28,29,30}, {1,2,3,16,17,18}, {4,6,5,28,30,29}, }; HPRef_Struct refprism_2fa_0e_0v = { HP_PRISM, refprism_2fa_0e_0v_splitedges, 0, 0, refprism_2fa_0e_0v_newelstypes, refprism_2fa_0e_0v_newels }; // HP_PRISM_1FA_2FB ... quad face 1-2-4-5 and quad face 1-4-6-3 int refprism_1fa_2fb_0e_0v_splitedges[][3] = { { 1, 2, 7}, { 2, 3, 9}, { 3, 2, 10}, { 1, 3, 12}, { 1, 4, 16}, { 2, 5, 17}, { 3, 6, 18}, { 4, 5, 40}, { 5, 6, 42}, { 6, 5, 43}, { 4, 6, 45}, { 0, 0, 0 } }; int refprism_1fa_2fb_0e_0v_splitfaces[][4] = { {1,2,3,13}, {1,2,4,19}, {2,3,5,21}, {3,2,6,22}, {1,3,4,24}, {4,5,6,46}, { 0, 0, 0, 0 } }; int refprism_1fa_2fb_0e_0v_splitelement[][5] = { {1,2,3,4,25}, {0,0,0,0,0} }; HPREF_ELEMENT_TYPE refprism_1fa_2fb_0e_0v_newelstypes[] = { HP_PRISM, HP_HEX_1F_0E_0V, HP_HEX_1F_0E_0V, HP_PRISM_1FB_1EA_0V, HP_PRISM_1FB_1EA_0V, HP_PRISM_1FA_0E_0V, HP_HEX_1FA_1FB_0E_0V, HP_HEX_1FA_1FB_0E_0V, HP_PRISM_1FA_1FB_1EA_0V, HP_PRISM_1FA_1FB_1EB_0V, HP_NONE, }; int refprism_1fa_2fb_0e_0v_newels[][8] = { { 25, 21, 22, 46, 42, 43 }, { 40, 5, 17, 19, 46, 42, 21, 25 }, { 24, 18, 6, 45, 25, 22, 43, 46}, { 16, 19, 25, 4, 40, 46 }, { 4, 45, 46, 16, 24, 25 }, { 13, 9, 10, 25, 21, 22 }, { 7, 2, 9, 13, 19, 17, 21, 25 }, { 3, 12, 13, 10, 18, 24, 25, 22 }, { 1, 7, 13, 16, 19, 25 }, { 12, 1, 13, 24, 16, 25 } }; HPRef_Struct refprism_1fa_2fb_0e_0v = { HP_PRISM, refprism_1fa_2fb_0e_0v_splitedges, refprism_1fa_2fb_0e_0v_splitfaces, refprism_1fa_2fb_0e_0v_splitelement, refprism_1fa_2fb_0e_0v_newelstypes, refprism_1fa_2fb_0e_0v_newels }; // HP_PRISM_1FA_2FB_1EC ... quad face 1-2-4-5 and quad face 1-4-6-3 int refprism_1fa_2fb_1ec_0v_splitedges[][3] = { { 1, 2, 7}, { 2, 3, 9}, { 3, 2, 10}, { 3, 1, 11}, { 1, 3, 12}, { 1, 4, 16}, { 2, 5, 17}, { 3, 6, 18}, { 4, 5, 40}, { 5, 6, 42}, { 6, 5, 43}, { 6, 4, 44}, { 4, 6, 45}, { 0, 0, 0 } }; int refprism_1fa_2fb_1ec_0v_splitfaces[][4] = { {1,2,3,13}, {1,2,4,19}, {2,3,5,21}, {3,2,6,22}, {3,1,6,23}, {1,3,4,24}, {4,5,6,46}, { 0, 0, 0, 0 } }; int refprism_1fa_2fb_1ec_0v_splitelement[][5] = { {1,2,3,4,25}, {0,0,0,0,0} }; HPREF_ELEMENT_TYPE refprism_1fa_2fb_1ec_0v_newelstypes[] = { HP_PRISM, HP_HEX_1F_0E_0V, HP_HEX_1F_0E_0V, HP_PRISM_1FB_1EA_0V, HP_PRISM_1FB_1EA_0V, HP_PRISM_1FB_1EA_0V, HP_PRISM_1FA_0E_0V, HP_HEX_1FA_1FB_0E_0V, HP_HEX_1FA_1FB_0E_0V, HP_PRISM_1FA_1FB_1EA_0V, HP_PRISM_1FA_1FB_1EB_0V, HP_PRISM_1FA_1FB_1EA_0V, HP_NONE, }; int refprism_1fa_2fb_1ec_0v_newels[][8] = { { 25, 21, 22, 46, 42, 43 }, { 40, 5, 17, 19, 46, 42, 21, 25 }, { 24, 23, 44, 45, 25, 22, 43, 46}, { 16, 19, 25, 4, 40, 46 }, { 4, 45, 46, 16, 24, 25 }, { 18, 23, 22, 6, 44, 43}, { 13, 9, 10, 25, 21, 22 }, { 7, 2, 9, 13, 19, 17, 21, 25 }, { 11, 12, 13, 10, 23, 24, 25, 22 }, { 1, 7, 13, 16, 19, 25 }, { 12, 1, 13, 24, 16, 25 }, { 3, 11, 10, 18, 23, 22}, }; HPRef_Struct refprism_1fa_2fb_1ec_0v = { HP_PRISM, refprism_1fa_2fb_1ec_0v_splitedges, refprism_1fa_2fb_1ec_0v_splitfaces, refprism_1fa_2fb_1ec_0v_splitelement, refprism_1fa_2fb_1ec_0v_newelstypes, refprism_1fa_2fb_1ec_0v_newels }; // HP_PRISM_1FA_2FB_3E ... quad face 1-2-4-5 and quad face 1-4-6-3 int refprism_1fa_2fb_3e_0v_splitedges[][3] = { { 1, 2, 7}, { 2, 1, 8}, { 2, 3, 9}, { 3, 2, 10}, { 3, 1, 11}, { 1, 3, 12}, { 1, 4, 16}, { 2, 5, 17}, { 3, 6, 18}, { 4, 5, 40}, { 5, 4, 41}, { 5, 6, 42}, { 6, 5, 43}, { 6, 4, 44}, { 4, 6, 45}, { 0, 0, 0 } }; int refprism_1fa_2fb_3e_0v_splitfaces[][4] = { {1,2,3,13}, {1,2,4,19}, {2,1,5,20}, {2,3,5,21}, {3,2,6,22}, {3,1,6,23}, {1,3,4,24}, {4,5,6,46}, { 0, 0, 0, 0 } }; int refprism_1fa_2fb_3e_0v_splitelement[][5] = { {1,2,3,4,25}, {0,0,0,0,0} }; HPREF_ELEMENT_TYPE refprism_1fa_2fb_3e_0v_newelstypes[] = { HP_PRISM, HP_HEX_1F_0E_0V, HP_HEX_1F_0E_0V, HP_PRISM_1FB_1EA_0V, HP_PRISM_1FB_1EA_0V, HP_PRISM_1FB_1EA_0V, HP_PRISM_1FB_1EA_0V, HP_PRISM_1FA_0E_0V, HP_HEX_1FA_1FB_0E_0V, HP_HEX_1FA_1FB_0E_0V, HP_PRISM_1FA_1FB_1EA_0V, HP_PRISM_1FA_1FB_1EB_0V, HP_PRISM_1FA_1FB_1EA_0V, HP_PRISM_1FA_1FB_1EB_0V, HP_NONE, }; int refprism_1fa_2fb_3e_0v_newels[][8] = { { 25, 21, 22, 46, 42, 43 }, { 40, 41, 20, 19, 46, 42, 21, 25 }, { 24, 23, 44, 45, 25, 22, 43, 46}, { 16, 19, 25, 4, 40, 46 }, { 4, 45, 46, 16, 24, 25 }, { 18, 23, 22, 6, 44, 43}, { 5, 41, 42, 17, 20, 21}, { 13, 9, 10, 25, 21, 22 }, { 7, 8, 9, 13, 19, 20, 21, 25 }, { 11, 12, 13, 10, 23, 24, 25, 22 }, { 1, 7, 13, 16, 19, 25 }, { 12, 1, 13, 24, 16, 25 }, { 3, 11, 10, 18, 23, 22}, { 8, 2, 9, 20, 17, 21}, }; HPRef_Struct refprism_1fa_2fb_3e_0v = { HP_PRISM, refprism_1fa_2fb_3e_0v_splitedges, refprism_1fa_2fb_3e_0v_splitfaces, refprism_1fa_2fb_3e_0v_splitelement, refprism_1fa_2fb_3e_0v_newelstypes, refprism_1fa_2fb_3e_0v_newels }; // HP_PRISM_1FA_2FB_1eb ... quad face 1-2-4-5 and quad face 1-4-6-3 int refprism_1fa_2fb_1eb_0v_splitedges[][3] = { { 1, 2, 7}, { 2, 1, 8}, { 2, 3, 9}, { 3, 2, 10}, { 1, 3, 12}, { 1, 4, 16}, { 2, 5, 17}, { 3, 6, 18}, { 4, 5, 40}, { 5, 4, 41}, { 5, 6, 42}, { 6, 5, 43}, { 4, 6, 45}, { 0, 0, 0 } }; int refprism_1fa_2fb_1eb_0v_splitfaces[][4] = { {1,2,3,13}, {1,2,4,19}, {2,1,5,20}, {2,3,5,21}, {3,2,6,22}, {1,3,4,24}, {4,5,6,46}, { 0, 0, 0, 0 } }; int refprism_1fa_2fb_1eb_0v_splitelement[][5] = { {1,2,3,4,25}, {0,0,0,0,0} }; HPREF_ELEMENT_TYPE refprism_1fa_2fb_1eb_0v_newelstypes[] = { HP_PRISM, HP_HEX_1F_0E_0V, HP_HEX_1F_0E_0V, HP_PRISM_1FB_1EA_0V, HP_PRISM_1FB_1EA_0V, HP_PRISM_1FB_1EA_0V, HP_PRISM_1FA_0E_0V, HP_HEX_1FA_1FB_0E_0V, HP_HEX_1FA_1FB_0E_0V, HP_PRISM_1FA_1FB_1EA_0V, HP_PRISM_1FA_1FB_1EB_0V, HP_PRISM_1FA_1FB_1EB_0V, HP_NONE, }; int refprism_1fa_2fb_1eb_0v_newels[][8] = { { 25, 21, 22, 46, 42, 43 }, { 40, 41, 20, 19, 46, 42, 21, 25 }, { 24, 18, 6, 45, 25, 22, 43, 46}, { 16, 19, 25, 4, 40, 46 }, { 4, 45, 46, 16, 24, 25 }, { 5, 41, 42, 17, 20, 21 }, { 13, 9, 10, 25, 21, 22 }, { 7, 8, 9, 13, 19, 20, 21, 25 }, { 3, 12, 13, 10, 18, 24, 25, 22 }, { 1, 7, 13, 16, 19, 25 }, { 12, 1, 13, 24, 16, 25 }, { 8, 2, 9, 20, 17, 21}, }; HPRef_Struct refprism_1fa_2fb_1eb_0v = { HP_PRISM, refprism_1fa_2fb_1eb_0v_splitedges, refprism_1fa_2fb_1eb_0v_splitfaces, refprism_1fa_2fb_1eb_0v_splitelement, refprism_1fa_2fb_1eb_0v_newelstypes, refprism_1fa_2fb_1eb_0v_newels }; // HP_PRISM_2FA_2FB int refprism_2fa_2fb_0e_0v_splitedges[][3] = { { 1, 2, 7}, { 2, 3, 9}, { 3, 2, 10}, { 1, 3, 12}, { 1, 4, 16}, { 2, 5, 17}, { 3, 6, 18}, { 4, 5, 40}, { 5, 6, 42}, { 6, 5, 43}, { 4, 6, 45}, { 4, 1, 28}, { 5, 2, 29}, { 6, 3, 30}, { 0, 0, 0 } }; int refprism_2fa_2fb_0e_0v_splitfaces[][4] = { {1,2,3,13}, {1,2,4,19}, {2,3,5,21}, {3,2,6,22}, {1,3,4,24}, {4,5,6,46}, {4,1,5,31}, {5,6,2,33}, {6,5,3,34}, {4,1,6,36}, { 0, 0, 0, 0 } }; int refprism_2fa_2fb_0e_0v_splitelement[][5] = { {1,2,3,4,25}, {4,1,6,5,37}, {0,0,0,0,0} }; HPREF_ELEMENT_TYPE refprism_2fa_2fb_0e_0v_newelstypes[] = { HP_PRISM, HP_HEX_1F_0E_0V, HP_HEX_1F_0E_0V, HP_PRISM_1FB_1EA_0V, HP_PRISM_1FB_1EA_0V, HP_PRISM_1FA_0E_0V, HP_HEX_1FA_1FB_0E_0V, HP_HEX_1FA_1FB_0E_0V, HP_PRISM_1FA_1FB_1EA_0V, HP_PRISM_1FA_1FB_1EB_0V, HP_PRISM_1FA_0E_0V, HP_HEX_1FA_1FB_0E_0V, HP_HEX_1FA_1FB_0E_0V, HP_PRISM_1FA_1FB_1EB_0V, HP_PRISM_1FA_1FB_1EA_0V, HP_NONE, }; int refprism_2fa_2fb_0e_0v_newels[][8] = { { 25, 21, 22, 37, 33, 34}, { 31, 29, 17, 19, 37, 33, 21, 25}, { 36, 24, 18, 30, 37, 25, 22, 34}, { 16, 19, 25, 28, 31, 37}, { 28, 36, 37, 16, 24, 25}, { 13, 9, 10, 25, 21, 22 }, { 7, 2, 9, 13, 19, 17, 21, 25 }, { 3, 12, 13, 10, 18, 24, 25, 22 }, { 1, 7, 13, 16, 19, 25 }, { 12, 1, 13, 24, 16, 25 }, { 46, 43, 42 ,37, 34, 33}, { 40, 5, 29, 31, 46, 42, 33, 37 }, { 6, 45, 36, 30, 43, 46, 37, 34 }, { 40, 4, 46, 31, 28, 37 }, { 4, 45, 46, 28, 36, 37}, }; HPRef_Struct refprism_2fa_2fb_0e_0v = { HP_PRISM, refprism_2fa_2fb_0e_0v_splitedges, refprism_2fa_2fb_0e_0v_splitfaces, refprism_2fa_2fb_0e_0v_splitelement, refprism_2fa_2fb_0e_0v_newelstypes, refprism_2fa_2fb_0e_0v_newels }; // HP_PRISM_2FA_2FB_1EC int refprism_2fa_2fb_1ec_0v_splitedges[][3] = { { 1, 2, 7}, { 2, 3, 9}, { 3, 2, 10}, { 3, 1, 11}, { 1, 3, 12}, { 1, 4, 16}, { 2, 5, 17}, { 3, 6, 18}, { 4, 1, 28}, { 5, 2, 29}, { 6, 3, 30}, { 4, 5, 40}, { 5, 6, 42}, { 6, 5, 43}, { 6, 4, 44}, { 4, 6, 45}, { 0, 0, 0 } }; int refprism_2fa_2fb_1ec_0v_splitfaces[][4] = { {1,2,3,13}, {1,2,4,19}, {2,3,5,21}, {3,2,6,22}, {3,1,6,23}, {1,3,4,24}, {4,5,6,46}, {4,1,5,31}, {5,6,2,33}, {6,5,3,34}, {6,4,3,35}, {4,1,6,36}, { 0, 0, 0, 0 } }; int refprism_2fa_2fb_1ec_0v_splitelement[][5] = { {1,2,3,4,25}, {4,1,6,5,37}, {0,0,0,0,0} }; HPREF_ELEMENT_TYPE refprism_2fa_2fb_1ec_0v_newelstypes[] = { HP_PRISM, HP_HEX_1F_0E_0V, HP_HEX_1F_0E_0V, HP_PRISM_1FB_1EA_0V, HP_PRISM_1FB_1EA_0V, HP_PRISM_1FB_1EA_0V, HP_PRISM_1FA_0E_0V, HP_HEX_1FA_1FB_0E_0V, HP_HEX_1FA_1FB_0E_0V, HP_PRISM_1FA_1FB_1EA_0V, HP_PRISM_1FA_1FB_1EB_0V, HP_PRISM_1FA_1FB_1EA_0V, HP_PRISM_1FA_0E_0V, HP_HEX_1FA_1FB_0E_0V, HP_HEX_1FA_1FB_0E_0V, HP_PRISM_1FA_1FB_1EB_0V, HP_PRISM_1FA_1FB_1EA_0V, HP_PRISM_1FA_1FB_1EB_0V, HP_NONE, }; int refprism_2fa_2fb_1ec_0v_newels[][8] = { { 25, 21, 22, 37, 33, 34}, { 31, 29, 17, 19, 37, 33, 21, 25}, { 36, 24, 23, 35, 37, 25, 22, 34}, { 16, 19, 25, 28, 31, 37}, { 28, 36, 37, 16, 24, 25}, { 18, 23, 22, 30, 35, 34}, { 13, 9, 10, 25, 21, 22 }, { 7, 2, 9, 13, 19, 17, 21, 25 }, { 11, 12, 13, 10, 23, 24, 25, 22 }, { 1, 7, 13, 16, 19, 25 }, { 12, 1, 13, 24, 16, 25 }, { 3, 11, 10, 18, 23, 22 }, { 46, 43, 42 ,37, 34, 33}, { 40, 5, 29, 31, 46, 42, 33, 37 }, { 44, 45, 36, 35, 43, 46, 37, 34 }, { 40, 4, 46, 31, 28, 37 }, { 4, 45, 46, 28, 36, 37}, { 44, 6, 43, 35, 30, 34}, }; HPRef_Struct refprism_2fa_2fb_1ec_0v = { HP_PRISM, refprism_2fa_2fb_1ec_0v_splitedges, refprism_2fa_2fb_1ec_0v_splitfaces, refprism_2fa_2fb_1ec_0v_splitelement, refprism_2fa_2fb_1ec_0v_newelstypes, refprism_2fa_2fb_1ec_0v_newels }; // HP_PRISM_2FA_2FB_3E int refprism_2fa_2fb_3e_0v_splitedges[][3] = { { 1, 2, 7}, { 2, 1, 8}, { 2, 3, 9}, { 3, 2, 10}, { 3, 1, 11}, { 1, 3, 12}, { 1, 4, 16}, { 2, 5, 17}, { 3, 6, 18}, { 4, 1, 28}, { 5, 2, 29}, { 6, 3, 30}, { 4, 5, 40}, { 5, 4, 41}, { 5, 6, 42}, { 6, 5, 43}, { 6, 4, 44}, { 4, 6, 45}, { 0, 0, 0 } }; int refprism_2fa_2fb_3e_0v_splitfaces[][4] = { {1,2,3,13}, {1,2,4,19}, {2,1,5,20}, {2,3,5,21}, {3,2,6,22}, {3,1,6,23}, {1,3,4,24}, {4,5,6,46}, {4,1,5,31}, {5,4,2,32}, {5,6,2,33}, {6,5,3,34}, {6,4,3,35}, {4,1,6,36}, { 0, 0, 0, 0 } }; int refprism_2fa_2fb_3e_0v_splitelement[][5] = { {1,2,3,4,25}, {4,1,6,5,37}, {0,0,0,0,0} }; HPREF_ELEMENT_TYPE refprism_2fa_2fb_3e_0v_newelstypes[] = { HP_PRISM, HP_HEX_1F_0E_0V, HP_HEX_1F_0E_0V, HP_PRISM_1FB_1EA_0V, HP_PRISM_1FB_1EA_0V, HP_PRISM_1FB_1EA_0V, HP_PRISM_1FB_1EA_0V, HP_PRISM_1FA_0E_0V, HP_HEX_1FA_1FB_0E_0V, HP_HEX_1FA_1FB_0E_0V, HP_PRISM_1FA_1FB_1EA_0V, HP_PRISM_1FA_1FB_1EB_0V, HP_PRISM_1FA_1FB_1EA_0V, HP_PRISM_1FA_1FB_1EB_0V, HP_PRISM_1FA_0E_0V, HP_HEX_1FA_1FB_0E_0V, HP_HEX_1FA_1FB_0E_0V, HP_PRISM_1FA_1FB_1EB_0V, HP_PRISM_1FA_1FB_1EA_0V, HP_PRISM_1FA_1FB_1EB_0V, HP_PRISM_1FA_1FB_1EA_0V, HP_NONE, }; int refprism_2fa_2fb_3e_0v_newels[][8] = { { 25, 21, 22, 37, 33, 34}, { 31, 32, 20, 19, 37, 33, 21, 25}, { 36, 24, 23, 35, 37, 25, 22, 34}, { 16, 19, 25, 28, 31, 37}, { 28, 36, 37, 16, 24, 25}, { 18, 23, 22, 30, 35, 34}, { 29, 32, 33, 17, 20, 21}, { 13, 9, 10, 25, 21, 22 }, { 7, 8, 9, 13, 19, 20, 21, 25 }, { 11, 12, 13, 10, 23, 24, 25, 22 }, { 1, 7, 13, 16, 19, 25 }, { 12, 1, 13, 24, 16, 25 }, { 3, 11, 10, 18, 23, 22 }, { 8, 2, 9, 20, 17, 21 }, { 46, 43, 42 ,37, 34, 33}, { 40, 41, 32, 31, 46, 42, 33, 37 }, { 44, 45, 36, 35, 43, 46, 37, 34 }, { 40, 4, 46, 31, 28, 37 }, { 4, 45, 46, 28, 36, 37}, { 44, 6, 43, 35, 30, 34}, { 5, 41, 42, 29, 32, 33}, }; HPRef_Struct refprism_2fa_2fb_3e_0v = { HP_PRISM, refprism_2fa_2fb_3e_0v_splitedges, refprism_2fa_2fb_3e_0v_splitfaces, refprism_2fa_2fb_3e_0v_splitelement, refprism_2fa_2fb_3e_0v_newelstypes, refprism_2fa_2fb_3e_0v_newels }; // HP_PRISM_1FA_2E_0V int refprism_1fa_2e_0v_splitedges[][3] = { {2,3,9}, {1,3,12}, {1,4,16}, {2,5,17}, {3,6,18}, {5,6,42}, {4,6,45}, {5,4,41}, {2,1,8}, {4,5,40}, {1,2,7}, {0,0,0}, }; int refprism_1fa_2e_0v_splitfaces[][4] = { {2,3,5,21}, {1,3,4,24}, {2,1,5,20}, {1,2,4,19}, {0,0,0,0}, }; HPREF_ELEMENT_TYPE refprism_1fa_2e_0v_newelstypes[] = { HP_HEX, HP_PRISM, HP_PRISM_1FA_0E_0V, HP_HEX_1F_0E_0V, HP_PRISM_SINGEDGE, HP_PRISM_1FA_1E_0V, HP_PRISM_SINGEDGE, HP_PRISM_1FA_1E_0V, HP_NONE }; int refprism_1fa_2e_0v_newels[][8] = { {40,41,20,19,45,42,21,24}, {24,21,18,45,42,6}, {12,9,3,24,21,18}, {9, 12, 7, 8, 21, 24, 19, 20}, { 17, 21, 20, 5, 42, 41}, {2, 9, 8, 17, 21, 20}, {16,19,24,4,40,45}, {1,7,12,16,19,24} }; HPRef_Struct refprism_1fa_2e_0v = { HP_PRISM, refprism_1fa_2e_0v_splitedges, refprism_1fa_2e_0v_splitfaces, 0, refprism_1fa_2e_0v_newelstypes, refprism_1fa_2e_0v_newels }; // HP_PRISM_2FA_2E_0V int refprism_2fa_2e_0v_splitedges[][3] = { {2,3,9}, {1,3,12}, {1,4,16}, {2,5,17}, {3,6,18}, {5,6,42}, {4,6,45}, {4,1,28}, {5,2,29}, {6,3,30}, {4,5,40}, {1,2,7}, { 5, 4, 41}, { 2, 1, 8}, {0,0,0}, }; int refprism_2fa_2e_0v_splitfaces[][4] = { {2,3,5,21}, {1,3,4,24}, {1,2,4,19}, {4,1,6,36}, {4,1,5,31}, {5,6,2,33}, {5,4,2,32}, {2,1,5,20}, {0,0,0,0}, }; HPREF_ELEMENT_TYPE refprism_2fa_2e_0v_newelstypes[] = { HP_PRISM, HP_HEX, HP_PRISM_SINGEDGE, HP_PRISM_SINGEDGE, HP_PRISM_1FA_0E_0V, HP_HEX_1F_0E_0V, HP_PRISM_1FA_1E_0V, HP_PRISM_1FA_1E_0V, HP_PRISM_1FA_0E_0V, HP_HEX_1F_0E_0V, HP_PRISM_1FA_1E_0V, HP_PRISM_1FA_1E_0V, HP_NONE, }; int refprism_2fa_2e_0v_newels[][8] = { { 24, 21, 18, 36, 33, 30}, { 19, 20, 21, 24, 31, 32, 33, 36}, { 16, 19, 24, 28, 31, 36}, { 17, 21, 20, 29, 33, 32}, { 12, 9, 3, 24, 21, 18}, { 7, 8, 9, 12, 19, 20, 21, 24}, { 1, 7, 12, 16, 19, 24}, { 2, 9, 8, 17, 21, 20}, { 45, 6, 42, 36, 30, 33}, { 40, 45, 42, 41, 31, 36, 33, 32}, { 4, 45, 40, 28, 36, 31 }, { 5, 41, 42, 29, 32, 33 }, }; HPRef_Struct refprism_2fa_2e_0v = { HP_PRISM, refprism_2fa_2e_0v_splitedges, refprism_2fa_2e_0v_splitfaces, 0, refprism_2fa_2e_0v_newelstypes, refprism_2fa_2e_0v_newels }; // HP_PRISM_3E_0V int refprism_3e_0v_splitedges[][3] = { { 1, 2, 7}, { 2, 1, 8}, { 2, 3, 9}, { 3, 2, 10}, { 3, 1, 11}, { 1, 3, 12}, { 4, 5, 40}, { 5, 4, 41}, { 5, 6, 42}, { 6, 5, 43}, { 6, 4, 44}, { 4, 6, 45}, { 0, 0, 0}, }; int refprism_3e_0v_splitfaces[][4] = { {1,2,3,13}, {2,3,1,14}, {3,1,2,15}, {4,5,6,46}, {5,4,6,47}, {6,4,5,48}, {0,0,0,0}, }; HPREF_ELEMENT_TYPE refprism_3e_0v_newelstypes[] = { HP_PRISM, HP_HEX, HP_HEX, HP_HEX, HP_PRISM, HP_PRISM, HP_PRISM, HP_PRISM_SINGEDGE, HP_PRISM_SINGEDGE, HP_PRISM_SINGEDGE, HP_NONE }; int refprism_3e_0v_newels[][8] = { { 13, 14, 15, 46, 47, 48}, { 7, 8, 14, 13, 40, 41, 47, 46}, { 15, 14, 9, 10, 48, 47, 42, 43}, { 12, 13, 15, 11, 45, 46, 48, 44}, { 14, 8, 9, 47, 41, 42 }, { 11, 15, 10, 44, 48, 43 }, { 7, 13, 12, 40, 46, 45}, { 1, 7, 12, 4, 40, 45}, { 2, 9, 8, 5, 42, 41 }, { 3, 11, 10, 6, 44, 43 } }; HPRef_Struct refprism_3e_0v = { HP_PRISM, refprism_3e_0v_splitedges, refprism_3e_0v_splitfaces, 0, refprism_3e_0v_newelstypes, refprism_3e_0v_newels }; // HP_PRISM_3E_0V int refprism_1fa_3e_0v_splitedges[][3] = { { 1, 2, 7}, { 2, 1, 8}, { 2, 3, 9}, { 3, 2, 10}, { 3, 1, 11}, { 1, 3, 12}, { 1, 4, 16}, { 2, 5, 17}, { 3, 6, 18}, { 4, 5, 40}, { 5, 4, 41}, { 5, 6, 42}, { 6, 5, 43}, { 6, 4, 44}, { 4, 6, 45}, { 0, 0, 0}, }; int refprism_1fa_3e_0v_splitfaces[][4] = { {1,2,3,13}, {2,3,1,14}, {3,1,2,15}, {1,2,4,19}, {2,1,5,20}, {2,3,5,21}, {3,2,6,22}, {3,1,6,23}, {1,3,4,24}, {4,5,6,46}, {5,4,6,47}, {6,4,5,48}, {0,0,0,0}, }; int refprism_1fa_3e_0v_splitelements[][5] = { {1,2,3,4,25}, {2,1,3,5,26}, {3,1,2,6,27}, {0,0,0,0,0}, }; HPREF_ELEMENT_TYPE refprism_1fa_3e_0v_newelstypes[] = { HP_PRISM, HP_HEX, HP_HEX, HP_HEX, HP_PRISM, HP_PRISM, HP_PRISM, HP_PRISM_SINGEDGE, HP_PRISM_SINGEDGE, HP_PRISM_SINGEDGE, HP_PRISM_1FA_0E_0V, HP_HEX_1F_0E_0V, HP_HEX_1F_0E_0V, HP_HEX_1F_0E_0V, HP_PRISM_1FA_0E_0V, HP_PRISM_1FA_0E_0V, HP_PRISM_1FA_0E_0V, HP_PRISM_1FA_1E_0V, HP_PRISM_1FA_1E_0V, HP_PRISM_1FA_1E_0V, HP_NONE }; int refprism_1fa_3e_0v_newels[][8] = { { 25, 26, 27, 46, 47, 48}, { 19, 20, 26, 25, 40, 41, 47, 46}, { 27, 26, 21, 22, 48, 47, 42, 43}, { 23, 24, 25, 27, 44, 45, 46, 48}, { 19, 25, 24, 40, 46, 45}, { 26, 20, 21, 47, 41, 42}, { 23, 27, 22, 44, 48, 43}, { 16, 19, 24, 4, 40, 45}, { 17, 21, 20, 5, 42, 41}, { 18, 23, 22, 6, 44, 43}, { 13, 14, 15, 25, 26, 27}, { 7, 8, 14, 13, 19, 20, 26, 25}, { 15, 14, 9, 10, 27, 26, 21, 22}, { 12, 13, 15, 11, 24, 25, 27, 23}, { 14, 8, 9, 26, 20, 21}, { 11, 15, 10, 23, 27, 22}, { 7, 13 , 12, 19, 25, 24}, { 2, 9, 8, 17, 21, 20}, { 3, 11, 10, 18, 23, 22}, { 1, 7, 12, 16, 19, 24}, }; HPRef_Struct refprism_1fa_3e_0v = { HP_PRISM, refprism_1fa_3e_0v_splitedges, refprism_1fa_3e_0v_splitfaces, refprism_1fa_3e_0v_splitelements, refprism_1fa_3e_0v_newelstypes, refprism_1fa_3e_0v_newels }; // HP_PRISM_2FA_3E_0V int refprism_2fa_3e_0v_splitedges[][3] = { { 1, 2, 7}, { 2, 1, 8}, { 2, 3, 9}, { 3, 2, 10}, { 3, 1, 11}, { 1, 3, 12}, { 1, 4, 16}, { 2, 5, 17}, { 3, 6, 18}, { 4, 1, 28}, { 5, 2, 29}, { 6, 3, 30}, { 4, 5, 40}, { 5, 4, 41}, { 5, 6, 42}, { 6, 5, 43}, { 6, 4, 44}, { 4, 6, 45}, { 0, 0, 0}, }; int refprism_2fa_3e_0v_splitfaces[][4] = { {1,2,3,13}, {2,3,1,14}, {3,1,2,15}, {1,2,4,19}, {2,1,5,20}, {2,3,5,21}, {3,2,6,22}, {3,1,6,23}, {1,3,4,24}, {4,1,5,31}, {5,4,2,32}, {5,6,2,33}, {6,5,3,34}, {6,4,3,35}, {4,1,6,36}, {4,5,6,46}, {5,4,6,47}, {6,4,5,48}, {0,0,0,0}, }; int refprism_2fa_3e_0v_splitelements[][5] = { {1,2,3,4,25}, {2,1,3,5,26}, {3,1,2,6,27}, {4,1,6,5,37}, {5,2,4,6,38}, {6,4,5,3,39}, {0,0,0,0,0}, }; HPREF_ELEMENT_TYPE refprism_2fa_3e_0v_newelstypes[] = { HP_PRISM, HP_HEX, HP_HEX, HP_HEX, HP_PRISM, HP_PRISM, HP_PRISM, HP_PRISM_SINGEDGE, HP_PRISM_SINGEDGE, HP_PRISM_SINGEDGE, HP_PRISM_1FA_0E_0V, HP_HEX_1F_0E_0V, HP_HEX_1F_0E_0V, HP_HEX_1F_0E_0V, HP_PRISM_1FA_0E_0V, HP_PRISM_1FA_0E_0V, HP_PRISM_1FA_0E_0V, HP_PRISM_1FA_1E_0V, HP_PRISM_1FA_1E_0V, HP_PRISM_1FA_1E_0V, HP_PRISM_1FA_0E_0V, HP_HEX_1F_0E_0V, HP_HEX_1F_0E_0V, HP_HEX_1F_0E_0V, HP_PRISM_1FA_0E_0V, HP_PRISM_1FA_0E_0V, HP_PRISM_1FA_0E_0V, HP_PRISM_1FA_1E_0V, HP_PRISM_1FA_1E_0V, HP_PRISM_1FA_1E_0V, HP_NONE }; int refprism_2fa_3e_0v_newels[][8] = { { 25, 26, 27, 37, 38, 39}, { 19, 20, 26, 25, 31, 32, 38, 37}, { 27, 26, 21, 22, 39, 38, 33, 34}, { 23, 24, 25, 27, 35, 36, 37, 39}, { 19, 25, 24, 31, 37, 36}, { 26, 20, 21, 38, 32, 33}, { 23, 27, 22, 35, 39, 34}, { 16, 19, 24, 28, 31, 36}, { 17, 21, 20, 29, 33, 32}, { 18, 23, 22, 30, 35, 34}, { 13, 14, 15, 25, 26, 27}, { 7, 8, 14, 13, 19, 20, 26, 25}, { 15, 14, 9, 10, 27, 26, 21, 22}, { 12, 13, 15, 11, 24, 25, 27, 23}, { 14, 8, 9, 26, 20, 21}, { 11, 15, 10, 23, 27, 22}, { 7, 13 , 12, 19, 25, 24}, { 2, 9, 8, 17, 21, 20}, { 3, 11, 10, 18, 23, 22}, { 1, 7, 12, 16, 19, 24}, { 48, 47, 46, 39, 38, 37 }, { 48, 43, 42, 47, 39, 34, 33, 38}, { 45, 44, 48, 46, 36, 35, 39, 37}, { 46, 47, 41, 40, 37, 38, 32, 31}, { 47, 42, 41, 38, 33, 32}, { 45, 46, 40, 36, 37, 31}, { 44, 43, 48, 35, 34, 39}, { 6, 43, 44, 30, 34, 35}, { 5, 41, 42, 29, 32, 33}, { 4, 45, 40, 28, 36, 31}, }; HPRef_Struct refprism_2fa_3e_0v = { HP_PRISM, refprism_2fa_3e_0v_splitedges, refprism_2fa_3e_0v_splitfaces, refprism_2fa_3e_0v_splitelements, refprism_2fa_3e_0v_newelstypes, refprism_2fa_3e_0v_newels }; // HP_PRISM_3FB_0V int refprism_3fb_0v_splitedges[][3] = { { 1, 2, 7}, { 2, 1, 8}, { 2, 3, 9}, { 3, 2, 10}, { 3, 1, 11}, { 1, 3, 12}, { 4, 5, 40}, { 5, 4, 41}, { 5, 6, 42}, { 6, 5, 43}, { 6, 4, 44}, { 4, 6, 45}, { 0, 0, 0}, }; int refprism_3fb_0v_splitfaces[][4] = { {1,2,3,13}, {2,3,1,14}, {3,1,2,15}, {4,5,6,46}, {5,4,6,47}, {6,4,5,48}, {0,0,0,0}, }; HPREF_ELEMENT_TYPE refprism_3fb_0v_newelstypes[] = { HP_PRISM, HP_HEX_1F_0E_0V, HP_HEX_1F_0E_0V, HP_HEX_1F_0E_0V, HP_PRISM_1FB_1EA_0V, HP_PRISM_1FB_1EA_0V, HP_PRISM_1FB_1EA_0V, HP_PRISM_1FB_1EA_0V, HP_PRISM_1FB_1EA_0V, HP_PRISM_1FB_1EA_0V, HP_NONE }; int refprism_3fb_0v_newels[][8] = { { 13, 14, 15, 46, 47, 48}, { 8, 7, 40, 41, 14,13, 46, 47 }, { 10, 9, 42, 43, 15, 14, 47, 48 }, { 44, 45, 12, 11, 48, 46, 13, 15}, { 1, 7, 13, 4, 40, 46 }, { 4, 45, 46, 1, 12, 13}, { 2, 9, 14, 5, 42, 47 }, { 5, 41, 47, 2, 8, 14 }, { 3, 11, 15, 6, 44, 48}, { 6, 43, 48, 3, 10, 15}, }; HPRef_Struct refprism_3fb_0v = { HP_PRISM, refprism_3fb_0v_splitedges, refprism_3fb_0v_splitfaces, 0, refprism_3fb_0v_newelstypes, refprism_3fb_0v_newels }; // HP_PRISM_3FB_0V int refprism_1fa_3fb_0v_splitedges[][3] = { { 1, 2, 7}, { 2, 1, 8}, { 2, 3, 9}, { 3, 2, 10}, { 3, 1, 11}, { 1, 3, 12}, { 1, 4, 16}, { 2, 5, 17}, { 3, 6, 18}, { 4, 5, 40}, { 5, 4, 41}, { 5, 6, 42}, { 6, 5, 43}, { 6, 4, 44}, { 4, 6, 45}, { 0, 0, 0}, }; int refprism_1fa_3fb_0v_splitfaces[][4] = { {1,2,3,13}, {2,3,1,14}, {3,1,2,15}, {1,2,4,19}, {2,1,5,20}, {2,3,5,21}, {3,2,6,22}, {3,1,6,23}, {1,3,4,24}, {4,5,6,46}, {5,4,6,47}, {6,4,5,48}, {0,0,0,0}, }; int refprism_1fa_3fb_0v_splitelements[][5] = { {1,2,3,4,25}, {2,1,3,5,26}, {3,1,2,6,27}, {0,0,0,0,0}, }; HPREF_ELEMENT_TYPE refprism_1fa_3fb_0v_newelstypes[] = { HP_PRISM, HP_HEX_1F_0E_0V, HP_HEX_1F_0E_0V, HP_HEX_1F_0E_0V, HP_PRISM_1FB_1EA_0V, HP_PRISM_1FB_1EA_0V, HP_PRISM_1FB_1EA_0V, HP_PRISM_1FB_1EA_0V, HP_PRISM_1FB_1EA_0V, HP_PRISM_1FB_1EA_0V, HP_PRISM_1FA_0E_0V, HP_HEX_1FA_1FB_0E_0V, HP_HEX_1FA_1FB_0E_0V, HP_HEX_1FA_1FB_0E_0V, HP_PRISM_1FA_1FB_1EA_0V, HP_PRISM_1FA_1FB_1EB_0V, HP_PRISM_1FA_1FB_1EA_0V, HP_PRISM_1FA_1FB_1EB_0V, HP_PRISM_1FA_1FB_1EA_0V, HP_PRISM_1FA_1FB_1EB_0V, HP_NONE }; int refprism_1fa_3fb_0v_newels[][8] = { { 25, 26, 27, 46, 47, 48}, { 19, 40, 41, 20, 25, 46, 47, 26}, { 22, 21, 42, 43, 27, 26, 47, 48}, { 24, 23, 44, 45, 25, 27, 48, 46}, { 16, 19, 25, 4, 40, 46 }, { 4, 45, 46, 16, 24, 25 }, { 17, 21, 26, 5, 42, 47 }, { 5, 41, 47, 17, 20, 26}, { 18, 23, 27, 6, 44, 48}, { 6, 43, 48, 18, 22, 27}, { 13, 14, 15, 25, 26, 27}, { 7, 8, 14, 13, 19, 20, 26, 25}, { 9, 10, 15, 14, 21, 22, 27, 26}, { 11, 12, 13, 15, 23, 24, 25, 27}, { 2, 9, 14, 17, 21, 26}, { 8, 2, 14, 20, 17, 26}, { 1, 7, 13, 16, 19, 25}, { 12, 1, 13, 24, 16, 25 }, { 3, 11, 15, 18, 23, 27 }, { 10, 3, 15, 22, 18, 27}, }; HPRef_Struct refprism_1fa_3fb_0v = { HP_PRISM, refprism_1fa_3fb_0v_splitedges, refprism_1fa_3fb_0v_splitfaces, refprism_1fa_3fb_0v_splitelements, refprism_1fa_3fb_0v_newelstypes, refprism_1fa_3fb_0v_newels }; // HP_PRISM_2FA_3E_0V int refprism_2fa_3fb_0v_splitedges[][3] = { { 1, 2, 7}, { 2, 1, 8}, { 2, 3, 9}, { 3, 2, 10}, { 3, 1, 11}, { 1, 3, 12}, { 1, 4, 16}, { 2, 5, 17}, { 3, 6, 18}, { 4, 1, 28}, { 5, 2, 29}, { 6, 3, 30}, { 4, 5, 40}, { 5, 4, 41}, { 5, 6, 42}, { 6, 5, 43}, { 6, 4, 44}, { 4, 6, 45}, { 0, 0, 0}, }; int refprism_2fa_3fb_0v_splitfaces[][4] = { {1,2,3,13}, {2,3,1,14}, {3,1,2,15}, {1,2,4,19}, {2,1,5,20}, {2,3,5,21}, {3,2,6,22}, {3,1,6,23}, {1,3,4,24}, {4,1,5,31}, {5,4,2,32}, {5,6,2,33}, {6,5,3,34}, {6,4,3,35}, {4,1,6,36}, {4,5,6,46}, {5,4,6,47}, {6,4,5,48}, {0,0,0,0}, }; int refprism_2fa_3fb_0v_splitelements[][5] = { {1,2,3,4,25}, {2,1,3,5,26}, {3,1,2,6,27}, {4,1,6,5,37}, {5,2,4,6,38}, {6,4,5,3,39}, {0,0,0,0,0}, }; HPREF_ELEMENT_TYPE refprism_2fa_3fb_0v_newelstypes[] = { HP_PRISM, HP_HEX_1F_0E_0V, HP_HEX_1F_0E_0V, HP_HEX_1F_0E_0V, HP_PRISM_1FB_1EA_0V, HP_PRISM_1FB_1EA_0V, HP_PRISM_1FB_1EA_0V, HP_PRISM_1FB_1EA_0V, HP_PRISM_1FB_1EA_0V, HP_PRISM_1FB_1EA_0V, HP_PRISM_1FA_0E_0V, HP_HEX_1FA_1FB_0E_0V, HP_HEX_1FA_1FB_0E_0V, HP_HEX_1FA_1FB_0E_0V, HP_PRISM_1FA_1FB_1EA_0V, HP_PRISM_1FA_1FB_1EB_0V, HP_PRISM_1FA_1FB_1EA_0V, HP_PRISM_1FA_1FB_1EB_0V, HP_PRISM_1FA_1FB_1EA_0V, HP_PRISM_1FA_1FB_1EB_0V, HP_PRISM_1FA_0E_0V, HP_HEX_1FA_1FB_0E_0V, HP_HEX_1FA_1FB_0E_0V, HP_HEX_1FA_1FB_0E_0V, HP_PRISM_1FA_1FB_1EA_0V, HP_PRISM_1FA_1FB_1EB_0V, HP_PRISM_1FA_1FB_1EA_0V, HP_PRISM_1FA_1FB_1EB_0V, HP_PRISM_1FA_1FB_1EA_0V, HP_PRISM_1FA_1FB_1EB_0V, HP_NONE }; int refprism_2fa_3fb_0v_newels[][8] = { { 25, 26, 27, 37, 38, 39}, { 19, 31, 32, 20, 25, 37, 38, 26}, { 33, 34, 22, 21, 38, 39, 27, 26}, { 35, 36, 24, 23, 39, 37, 25, 27}, { 16, 19, 25, 28, 31, 37}, { 28, 36, 37, 16, 24, 25 }, { 17, 21, 26, 29, 33, 38 }, { 29, 32, 38, 17, 20, 26}, { 18, 23, 27, 30, 35, 39}, { 30, 34, 39, 18, 22, 27}, { 13, 14, 15, 25, 26, 27}, { 7, 8, 14, 13, 19, 20, 26, 25}, { 9, 10, 15, 14, 21, 22, 27, 26}, { 11, 12, 13, 15, 23, 24, 25, 27}, { 2, 9, 14, 17, 21, 26}, { 8, 2, 14, 20, 17, 26}, { 1, 7, 13, 16, 19, 25}, { 12, 1, 13, 24, 16, 25 }, { 3, 11, 15, 18, 23, 27 }, { 10, 3, 15, 22, 18, 27}, { 48, 47, 46, 39, 38, 37 }, { 44, 45, 36, 35, 48, 46, 37, 39}, { 40, 41, 32, 31, 46, 47, 38, 37}, { 42, 43, 34, 33, 47, 48, 39, 38}, { 6, 43, 48, 30, 34, 39}, { 44, 6, 48, 35, 30, 39}, { 4, 45, 46, 28, 36, 37}, { 40, 4, 46, 31, 28, 37}, { 5, 41, 47, 29, 32, 38}, { 42, 5, 47, 33, 29, 38}, }; HPRef_Struct refprism_2fa_3fb_0v = { HP_PRISM, refprism_2fa_3fb_0v_splitedges, refprism_2fa_3fb_0v_splitfaces, refprism_2fa_3fb_0v_splitelements, refprism_2fa_3fb_0v_newelstypes, refprism_2fa_3fb_0v_newels }; /* // HP_PRISM_3E_4EH int refprism_3e_4eh_splitedges[][3] = { { 1, 2, 7}, { 2, 1, 8}, { 2, 3, 9}, { 3, 2, 10}, { 3, 1, 11}, { 1, 3, 12}, { 4, 5, 40}, { 5, 4, 41}, { 5, 6, 42}, { 6, 5, 43}, { 6, 4, 44}, { 4, 6, 45}, { 0, 0, 0}, }; int refprism_3e_4eh_splitfaces[][4] = { {3,1,2,15}, {6,4,5,48}, {0,0,0,0}, }; HPREF_ELEMENT_TYPE refprism_2fa_3fb_0v_newelstypes[] = { HP_PRISM, HP_HEX_2EH_0V, HP_HEX_2EH_0V, HP_TET_2E, HP_TET_2E, HP_PRISM_1E_2EH_0V, HP_PRISM_1E_2EH_0V, HP_NONE }; int refprism_2fa_3fb_0v_newels[][8] = { {15, 7, 8, 48, 40, 41 }, }; HPRef_Struct refprism_2fa_3fb_0v = { HP_PRISM, refprism_2fa_3fb_0v_splitedges, refprism_2fa_3fb_0v_splitfaces, refprism_2fa_3fb_0v_splitelements, refprism_2fa_3fb_0v_newelstypes, refprism_2fa_3fb_0v_newels }; */ /* // HP_PRISM_2FA_3E_0V int refprism_3e_4_0v_splitedges[][3] = { { 1, 2, 7}, { 2, 1, 8}, { 2, 3, 9}, { 3, 2, 10}, { 3, 1, 11}, { 1, 3, 12}, { 1, 4, 16}, { 2, 5, 17}, { 3, 6, 18}, { 4, 1, 28}, { 5, 2, 29}, { 6, 3, 30}, { 4, 5, 40}, { 5, 4, 41}, { 5, 6, 42}, { 6, 5, 43}, { 6, 4, 44}, { 4, 6, 45}, { 0, 0, 0}, }; int refprism_2fa_3e_0v_splitfaces[][4] = { {1,2,3,13}, {2,3,1,14}, {3,1,2,15}, {1,2,4,19}, {2,1,5,20}, {2,3,5,21}, {3,2,6,22}, {3,1,6,23}, {1,3,4,24}, {4,1,5,31}, {5,4,2,32}, {5,6,2,33}, {6,5,3,34}, {6,4,3,35}, {4,1,6,36}, {4,5,6,46}, {5,4,6,47}, {6,4,5,48}, {0,0,0,0}, }; int refprism_2fa_3e_0v_splitelements[][5] = { {1,2,3,4,25}, {2,1,3,5,26}, {3,1,2,6,27}, {4,1,6,5,37}, {5,2,4,6,38}, {6,4,5,3,39}, {0,0,0,0,0}, }; HPREF_ELEMENT_TYPE refprism_2fa_3e_0v_newelstypes[] = { HP_PRISM, HP_HEX, HP_HEX, HP_HEX, HP_PRISM, HP_PRISM, HP_PRISM, HP_PRISM_SINGEDGE, HP_PRISM_SINGEDGE, HP_PRISM_SINGEDGE, HP_PRISM_1FA_0E_0V, HP_HEX_1F_0E_0V, HP_HEX_1F_0E_0V, HP_HEX_1F_0E_0V, HP_PRISM_1FA_0E_0V, HP_PRISM_1FA_0E_0V, HP_PRISM_1FA_0E_0V, HP_PRISM_1FA_1E_0V, HP_PRISM_1FA_1E_0V, HP_PRISM_1FA_1E_0V, HP_PRISM_1FA_0E_0V, HP_HEX_1F_0E_0V, HP_HEX_1F_0E_0V, HP_HEX_1F_0E_0V, HP_PRISM_1FA_0E_0V, HP_PRISM_1FA_0E_0V, HP_PRISM_1FA_0E_0V, HP_PRISM_1FA_1E_0V, HP_PRISM_1FA_1E_0V, HP_PRISM_1FA_1E_0V, HP_NONE }; int refprism_2fa_3e_0v_newels[][8] = { { 25, 26, 27, 37, 38, 39}, { 19, 20, 26, 25, 31, 32, 38, 37}, { 27, 26, 21, 22, 39, 38, 33, 34}, { 23, 24, 25, 27, 35, 36, 37, 39}, { 19, 25, 24, 31, 37, 36}, { 26, 20, 21, 38, 32, 33}, { 23, 27, 22, 35, 39, 34}, { 16, 19, 24, 28, 31, 36}, { 17, 21, 20, 29, 33, 32}, { 18, 23, 22, 30, 35, 34}, { 13, 14, 15, 25, 26, 27}, { 7, 8, 14, 13, 19, 20, 26, 25}, { 15, 14, 9, 10, 27, 26, 21, 22}, { 12, 13, 15, 11, 24, 25, 27, 23}, { 14, 8, 9, 26, 20, 21}, { 11, 15, 10, 23, 27, 22}, { 7, 13 , 12, 19, 25, 24}, { 2, 9, 8, 17, 21, 20}, { 3, 11, 10, 18, 23, 22}, { 1, 7, 12, 16, 19, 24}, { 48, 47, 46, 39, 38, 37 }, { 48, 43, 42, 47, 39, 34, 33, 38}, { 45, 44, 48, 46, 36, 35, 39, 37}, { 46, 47, 41, 40, 37, 38, 32, 31}, { 47, 42, 41, 38, 33, 32}, { 45, 46, 40, 36, 37, 31}, { 44, 43, 48, 35, 34, 39}, { 6, 43, 44, 30, 34, 35}, { 5, 41, 42, 29, 32, 33}, { 4, 45, 40, 28, 36, 31}, }; HPRef_Struct refprism_2fa_3e_0v = { HP_PRISM, refprism_2fa_3e_0v_splitedges, refprism_2fa_3e_0v_splitfaces, refprism_2fa_3e_0v_splitelements, refprism_2fa_3e_0v_newelstypes, refprism_2fa_3e_0v_newels }; */ /* // HP_PRISM_1FB_1EB_0V ... quad face 1-2-4-5 int refprism_1fb_1eb_0v_splitedges[][3] = { { 1, 3, 7 }, { 2, 3, 8 }, { 4, 6, 9 }, { 5, 6, 10 }, { 2, 1, 11 }, { 5, 4, 12 }, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE refprism_1fb_1eb_0v_newelstypes[] = { HP_HEX_1F_0E_0V, HP_PRISM_1FB_1EB_0V, HP_PRISM, HP_NONE, }; int refprism_1fb_1eb_0v_newels[][8] = { { 1, 4, 12, 11, 7, 9, 10, 8 }, { 11, 2, 8, 12, 5, 10 }, { 7, 8, 3, 9, 10, 6 } }; HPRef_Struct refprism_1fb_1eb_0v = { HP_PRISM, refprism_1fb_1eb_0v_splitedges, 0, 0, refprism_1fb_1eb_0v_newelstypes, refprism_1fb_1eb_0v_newels }; // HP_PRISM_2F_0E_0V int refprism_2f_0e_0v_splitedges[][3] = { { 1, 3, 7 }, { 2, 1, 8 }, { 2, 3, 9 }, { 3, 1, 10 }, { 4, 6, 12 }, { 5, 4, 13 }, { 5, 6, 14 }, { 6, 4, 15 }, { 0, 0, 0 } }; int refprism_2f_0e_0v_splitfaces[][4] = { { 2, 1, 3, 11 }, { 5, 4, 6, 16 }, { 0, 0, 0, 0 }, }; HPREF_ELEMENT_TYPE refprism_2f_0e_0v_newelstypes[] = { HP_HEX_1F_0E_0V, HP_HEX_1F_0E_0V, HP_PRISM_1FB_1EA_0V, HP_PRISM_1FB_1EA_0V, HP_PRISM, HP_NONE, }; int refprism_2f_0e_0v_newels[][8] = { //{ 1, 8, 11, 7, 4, 13, 16, 12 }, // { 9, 3, 10, 11, 14, 6, 15, 16 }, { 1, 4, 13, 8, 7, 12, 16, 11 }, { 9, 14, 6, 3, 11, 16, 15, 10 }, { 2, 9, 11, 5, 14, 16 }, // { 8, 2, 11, 13, 5, 16 }, { 5, 13, 16, 2, 8, 11 }, { 7, 11, 10, 12, 16, 15 } }; HPRef_Struct refprism_2f_0e_0v = { HP_PRISM, refprism_2f_0e_0v_splitedges, refprism_2f_0e_0v_splitfaces, 0, refprism_2f_0e_0v_newelstypes, refprism_2f_0e_0v_newels }; */ netgen-6.2.1804/libsrc/meshing/boundarylayer.cpp0000644000175000017500000006135513272137567020313 0ustar kurtkurt#include #include "meshing.hpp" namespace netgen { void InsertVirtualBoundaryLayer (Mesh & mesh) { cout << "Insert virt. b.l." << endl; int surfid; cout << "Boundary Nr:"; cin >> surfid; int i; int np = mesh.GetNP(); cout << "Old NP: " << mesh.GetNP() << endl; cout << "Trigs: " << mesh.GetNSE() << endl; BitArray bndnodes(np); Array mapto(np); bndnodes.Clear(); for (i = 1; i <= mesh.GetNSeg(); i++) { int snr = mesh.LineSegment(i).edgenr; cout << "snr = " << snr << endl; if (snr == surfid) { bndnodes.Set (mesh.LineSegment(i)[0]); bndnodes.Set (mesh.LineSegment(i)[1]); } } for (i = 1; i <= mesh.GetNSeg(); i++) { int snr = mesh.LineSegment(i).edgenr; if (snr != surfid) { bndnodes.Clear (mesh.LineSegment(i)[0]); bndnodes.Clear (mesh.LineSegment(i)[1]); } } for (i = 1; i <= np; i++) { if (bndnodes.Test(i)) mapto.Elem(i) = mesh.AddPoint (mesh.Point (i)); else mapto.Elem(i) = 0; } for (i = 1; i <= mesh.GetNSE(); i++) { Element2d & el = mesh.SurfaceElement(i); for (int j = 1; j <= el.GetNP(); j++) if (mapto.Get(el.PNum(j))) el.PNum(j) = mapto.Get(el.PNum(j)); } int nq = 0; for (i = 1; i <= mesh.GetNSeg(); i++) { int snr = mesh.LineSegment(i).edgenr; if (snr == surfid) { int p1 = mesh.LineSegment(i)[0]; int p2 = mesh.LineSegment(i)[1]; int p3 = mapto.Get (p1); if (!p3) p3 = p1; int p4 = mapto.Get (p2); if (!p4) p4 = p2; Element2d el(QUAD); el.PNum(1) = p1; el.PNum(2) = p2; el.PNum(3) = p3; el.PNum(4) = p4; el.SetIndex (2); mesh.AddSurfaceElement (el); nq++; } } cout << "New NP: " << mesh.GetNP() << endl; cout << "Quads: " << nq << endl; } /* Philippose Rajan - 11 June 2009 Function to calculate the surface normal at a given vertex of a surface element, with respect to that surface element. This function is used by the boundary layer generation function, in order to calculate the effective direction in which the prismatic layer should grow */ void GetSurfaceNormal(Mesh & mesh, const Element2d & el, int Vertex, Vec3d & SurfaceNormal) { int Vertex_A; int Vertex_B; Vertex_A = Vertex + 1; if(Vertex_A > el.GetNP()) Vertex_A = 1; Vertex_B = Vertex - 1; if(Vertex_B <= 0) Vertex_B = el.GetNP(); Vec3d Vect_A,Vect_B; Vect_A = mesh[el.PNum(Vertex_A)] - mesh[el.PNum(Vertex)]; Vect_B = mesh[el.PNum(Vertex_B)] - mesh[el.PNum(Vertex)]; SurfaceNormal = Cross(Vect_A,Vect_B); SurfaceNormal.Normalize(); } /* Philippose Rajan - 11 June 2009 Added an initial experimental function for generating prismatic boundary layers on a given set of surfaces. The number of layers, height of the first layer and the growth / shrink factor can be specified by the user Currently, the layer height is calculated using: height = h_first_layer * (growth_factor^(num_layers - 1)) */ void GenerateBoundaryLayer (Mesh & mesh, BoundaryLayerParameters & blp) { ofstream dbg("BndLayerDebug.log"); // Angle between a surface element and a growth-vector below which // a prism is project onto that surface as a quad // (in degrees) double angleThreshold = 5.0; Array surfid (blp.surfid); int prismlayers = blp.prismlayers; double hfirst = blp.hfirst; double growthfactor = blp.growthfactor; Array heights (blp.heights); bool grow_edges = false; // grow layer at edges // Monitor and print out the number of prism and quad elements // added to the mesh int numprisms = 0; int numquads = 0; cout << "Old NP: " << mesh.GetNP() << endl; cout << "Old NSE: " << mesh.GetNSE() << endl; for(int layer = prismlayers; layer >= 1; layer--) { cout << "Generating layer: " << layer << endl; const MeshTopology& meshtopo = mesh.GetTopology(); const_cast (meshtopo).SetBuildEdges(true); const_cast (meshtopo).SetBuildFaces(true); const_cast (meshtopo).Update(); double layerht = hfirst; if(heights.Size()>0) { layerht = heights[layer-1]; } else { if(growthfactor == 1) { layerht = layer * hfirst; } else { layerht = hfirst*(pow(growthfactor,(layer+1)) - 1)/(growthfactor - 1); } } cout << "Layer Height = " << layerht << endl; // Need to store the old number of points and // surface elements because there are new points and // surface elements being added during the process int np = mesh.GetNP(); int nse = mesh.GetNSE(); int ne = mesh.GetNE(); // Safety measure to ensure no issues with mesh // consistency int nseg = mesh.GetNSeg(); // Indicate which points need to be remapped BitArray bndnodes(np+1); // big enough for 1-based array // Map of the old points to the new points Array mapto(np); // Growth vectors for the prismatic layer based on // the effective surface normal at a given point Array growthvectors(np); // Bit array to identify all the points belonging // to the surface of interest bndnodes.Clear(); // Run through all the surface elements and mark the points // belonging to those where a boundary layer has to be created. // In addition, also calculate the effective surface normal // vectors at each of those points to determine the mesh motion // direction cout << "Marking points for remapping...." << endl; for (SurfaceElementIndex si = 0; si < nse; si++) if (surfid.Contains(mesh[si].GetIndex())) { const Element2d & sel = mesh[si]; for(int j = 0; j < sel.GetNP(); j++) { // Set the bitarray to indicate that the // point is part of the required set bndnodes.Set(sel[j]); Vec3d surfacenormal; // Calculate the surface normal at the current point // with respect to the current surface element GetSurfaceNormal(mesh,sel,j+1,surfacenormal); // Add the surface normal to the already existent one // (This gives the effective normal direction at corners // and curved areas) growthvectors[sel[j]] += surfacenormal; } } if (!grow_edges) for (SegmentIndex sei = 0; sei <= nseg; sei++) { bndnodes.Clear (mesh[sei][0]); bndnodes.Clear (mesh[sei][1]); } // Add additional points into the mesh structure in order to // clone the surface elements. // Also invert the growth vectors so that they point inwards, // and normalize them cout << "Cloning points and calculating growth vectors...." << endl; for (PointIndex pi = 1; pi <= np; pi++) { if (bndnodes.Test(pi)) { mapto[pi] = mesh.AddPoint (mesh[pi]); growthvectors[pi].Normalize(); growthvectors[pi] *= -1.0; } else { mapto[pi] = 0; growthvectors[pi] = Vec3d(0,0,0); } } // Add quad surface elements at edges for surfaces which // don't have boundary layers // Bit array to keep track of segments already processed BitArray segsel(nseg); // Set them all to "1" to initially activate all segments segsel.Set(); cout << "Adding 2D Quad elements on required surfaces...." << endl; if (grow_edges) for (SegmentIndex sei = 0; sei <= nseg; sei++) { PointIndex seg_p1 = mesh[sei][0]; PointIndex seg_p2 = mesh[sei][1]; // Only go in if the segment is still active, and if both its // surface index is part of the "hit-list" if(segsel.Test(sei) && surfid.Contains(mesh[sei].si)) { // clear the bit to indicate that this segment has been processed segsel.Clear(sei); // Find matching segment pair on other surface for (SegmentIndex sej = 0; sej < nseg; sej++) { PointIndex segpair_p1 = mesh[sej][1]; PointIndex segpair_p2 = mesh[sej][0]; // Find the segment pair on the neighbouring surface element // Identified by: seg1[0] = seg_pair[1] and seg1[1] = seg_pair[0] if(segsel.Test(sej) && ((segpair_p1 == seg_p1) && (segpair_p2 == seg_p2))) { // clear bit to indicate that processing of this segment is done segsel.Clear(sej); // Only worry about those surfaces which are not in the // boundary layer list if(!surfid.Contains(mesh[sej].si)) { SurfaceElementIndex pnt_commelem = 0; Array pnt1_elems; Array pnt2_elems; meshtopo.GetVertexSurfaceElements(segpair_p1,pnt1_elems); meshtopo.GetVertexSurfaceElements(segpair_p2,pnt2_elems); for(int k = 0; k < pnt1_elems.Size(); k++) { const Element2d & pnt1_sel = mesh.SurfaceElement(pnt1_elems[k]); for(int l = 0; l < pnt2_elems.Size(); l++) { const Element2d & pnt2_sel = mesh.SurfaceElement(pnt2_elems[l]); if((pnt1_sel.GetIndex() == mesh[sej].si) && (pnt2_sel.GetIndex() == mesh[sej].si) && (pnt1_elems[k] == pnt2_elems[l])) { pnt_commelem = pnt1_elems[k]; } } } /* int pnum_commelem = 0; for(int k = 1; k <= mesh.SurfaceElement(pnt_commelem).GetNP(); k++) { if((mesh.SurfaceElement(pnt_commelem).PNum(k) != segpair_p1) && (mesh.SurfaceElement(pnt_commelem).PNum(k) != segpair_p2)) { pnum_commelem = mesh.SurfaceElement(pnt_commelem).PNum(k); } } */ Vec3d surfelem_vect, surfelem_vect1; const Element2d & commsel = mesh.SurfaceElement(pnt_commelem); dbg << "NP= " << commsel.GetNP() << " : "; for(int k = 1; k <= commsel.GetNP(); k++) { GetSurfaceNormal(mesh,commsel,k,surfelem_vect1); surfelem_vect += surfelem_vect1; } surfelem_vect.Normalize(); double surfangle = Angle(growthvectors.Elem(segpair_p1),surfelem_vect); dbg << "V1= " << surfelem_vect1 << " : V2= " << surfelem_vect1 << " : V= " << surfelem_vect << " : GV= " << growthvectors.Elem(segpair_p1) << " : Angle= " << surfangle * 180 / 3.141592; // remap the segments to the new points mesh[sei][0] = mapto[seg_p1]; mesh[sei][1] = mapto[seg_p2]; mesh[sej][1] = mapto[seg_p1]; mesh[sej][0] = mapto[seg_p2]; if((surfangle < (90 + angleThreshold) * 3.141592 / 180.0) && (surfangle > (90 - angleThreshold) * 3.141592 / 180.0)) { dbg << " : quad\n"; // Since the surface is lower than the threshold, change the effective // prism growth vector to match with the surface vector, so that // the Quad which is created lies on the original surface //growthvectors.Elem(segpair_p1) = surfelem_vect; // Add a quad element to account for the prism volume // element which is going to be added Element2d sel(QUAD); sel.PNum(4) = mapto[seg_p1]; sel.PNum(3) = mapto[seg_p2]; sel.PNum(2) = segpair_p2; sel.PNum(1) = segpair_p1; sel.SetIndex(mesh[sej].si); mesh.AddSurfaceElement(sel); numquads++; } else { dbg << "\n"; for (int k = 0; k < pnt1_elems.Size(); k++) { Element2d & pnt_sel = mesh.SurfaceElement(pnt1_elems[k]); if(pnt_sel.GetIndex() == mesh[sej].si) { for(int l = 0; l < pnt_sel.GetNP(); l++) { if(pnt_sel[l] == segpair_p1) pnt_sel[l] = mapto[seg_p1]; else if (pnt_sel[l] == segpair_p2) pnt_sel[l] = mapto[seg_p2]; } } } for (int k = 0; k < pnt2_elems.Size(); k++) { Element2d & pnt_sel = mesh.SurfaceElement(pnt2_elems[k]); if(pnt_sel.GetIndex() == mesh[sej].si) { for(int l = 0; l < pnt_sel.GetNP(); l++) { if(pnt_sel[l] == segpair_p1) pnt_sel[l] = mapto.Get(seg_p1); else if (pnt_sel[l] == segpair_p2) pnt_sel[l] = mapto.Get(seg_p2); } } } } // } } else { // If the code comes here, it indicates that we are at // a line segment pair which is at the intersection // of two surfaces, both of which have to grow boundary // layers.... here too, remapping the segments to the // new points is required mesh[sei][0] = mapto.Get(seg_p1); mesh[sei][1] = mapto.Get(seg_p2); mesh[sej][1] = mapto.Get(seg_p1); mesh[sej][0] = mapto.Get(seg_p2); } } } } } // Add prismatic cells at the boundaries cout << "Generating prism boundary layer volume elements...." << endl; for (SurfaceElementIndex si = 0; si < nse; si++) { Element2d & sel = mesh.SurfaceElement(si); if(surfid.Contains(sel.GetIndex())) { /* Element el(PRISM); for (int j = 0; j < sel.GetNP(); j++) { // Check (Doublecheck) if the corresponding point has a // copy available for remapping if (mapto.Get(sel[j])) { // Define the points of the newly added Prism cell el[j+3] = mapto[sel[j]]; el[j] = sel[j]; } else { el[j+3] = sel[j]; el[j] = sel[j]; } } el.SetIndex(1); el.Invert(); mesh.AddVolumeElement(el); numprisms++; */ // cout << "add element: " << endl; int classify = 0; for (int j = 0; j < 3; j++) if (mapto[sel[j]]) classify += (1 << j); // cout << "classify = " << classify << endl; ELEMENT_TYPE types[] = { PRISM, TET, TET, PYRAMID, TET, PYRAMID, PYRAMID, PRISM }; int nums[] = { sel[0], sel[1], sel[2], mapto[sel[0]], mapto[sel[1]], mapto[sel[2]] }; int vertices[][6] = { { 0, 1, 2, 0, 1, 2 }, // should not occur { 0, 2, 1, 3, 0, 0 }, { 0, 2, 1, 4, 0, 0 }, { 0, 1, 4, 3, 2, 0 }, { 0, 2, 1, 5, 0, 0 }, { 2, 0, 3, 5, 1, 0 }, { 1, 2, 5, 4, 0, 0 }, { 0, 2, 1, 3, 5, 4 } }; Element el(types[classify]); for (int i = 0; i < 6; i++) el[i] = nums[vertices[classify][i]]; if(blp.new_matnrs.Size() > 0) el.SetIndex(blp.new_matnrs[layer-1]); else el.SetIndex(blp.new_matnr); // cout << "el = " << el << endl; if (classify != 0) mesh.AddVolumeElement(el); } } // Finally switch the point indices of the surface elements // to the newly added ones cout << "Transferring boundary layer surface elements to new vertex references...." << endl; for (int i = 1; i <= nse; i++) { Element2d & sel = mesh.SurfaceElement(i); if(surfid.Contains(sel.GetIndex())) { for (int j = 1; j <= sel.GetNP(); j++) { // Check (Doublecheck) if the corresponding point has a // copy available for remapping if (mapto.Get(sel.PNum(j))) { // Map the surface elements to the new points sel.PNum(j) = mapto.Get(sel.PNum(j)); } } } } for (int i = 1; i <= ne; i++) { Element & el = mesh.VolumeElement(i); if(el.GetIndex() != blp.bulk_matnr) { for (int j = 1; j <= el.GetNP(); j++) { // Check (Doublecheck) if the corresponding point has a // copy available for remapping if (mapto.Get(el.PNum(j))) { // Map the surface elements to the new points el.PNum(j) = mapto.Get(el.PNum(j)); } } } } // Lock all the prism points so that the rest of the mesh can be // optimised without invalidating the entire mesh for (PointIndex pi = mesh.Points().Begin(); pi < mesh.Points().End(); pi++) { if(bndnodes.Test(pi)) mesh.AddLockedPoint(pi); } // Now, actually pull back the old surface points to create // the actual boundary layers cout << "Moving and optimising boundary layer points...." << endl; for (int i = 1; i <= np; i++) { Array vertelems; if(bndnodes.Test(i)) { MeshPoint pointtomove; pointtomove = mesh.Point(i); if(layer == prismlayers) { mesh.Point(i).SetPoint(pointtomove + layerht * growthvectors.Elem(i)); meshtopo.GetVertexElements(i,vertelems); for(int j = 1; j <= vertelems.Size(); j++) { // double sfact = 0.9; Element volel = mesh.VolumeElement(vertelems.Elem(j)); if(((volel.GetType() == TET) || (volel.GetType() == TET10)) && (!volel.IsDeleted())) { //while((volel.Volume(mesh.Points()) <= 0.0) && (sfact >= 0.0)) //{ // mesh.Point(i).SetPoint(pointtomove + (sfact * layerht * growthvectors.Elem(i))); // mesh.ImproveMesh(); // // Try to move the point back by one step but // // if the volume drops to below zero, double back // mesh.Point(i).SetPoint(pointtomove + ((sfact + 0.1) * layerht * growthvectors.Elem(i))); // if(volel.Volume(mesh.Points()) <= 0.0) // { // mesh.Point(i).SetPoint(pointtomove + (sfact * layerht * growthvectors.Elem(i))); // } // sfact -= 0.1; //} volel.Delete(); } } } else { mesh.Point(i).SetPoint(pointtomove + layerht * growthvectors.Elem(i)); } } } mesh.Compress(); } // Optimise the tet part of the volume mesh after all the modifications // to the system are completed //OptimizeVolume(mparam,mesh); cout << "New NP: " << mesh.GetNP() << endl; cout << "Num of Quads: " << numquads << endl; cout << "Num of Prisms: " << numprisms << endl; cout << "Boundary Layer Generation....Done!" << endl; dbg.close(); } } netgen-6.2.1804/libsrc/meshing/bisect.cpp0000644000175000017500000027707013272137567016707 0ustar kurtkurt#include #include "meshing.hpp" #define noDEBUG namespace netgen { class MarkedTet; class MarkedPrism; class MarkedIdentification; class MarkedTri; class MarkedQuad; typedef Array T_MTETS; typedef Array T_MPRISMS; typedef Array T_MIDS; typedef Array T_MTRIS; typedef Array T_MQUADS; class MarkedTet { public: /// pnums of tet PointIndex pnums[4]; /// material number int matindex; /// element marked for refinement /// marked = 1: marked by element marker, marked = 2 due to closure unsigned int marked:2; /// flag of Arnold-Mukherjee algorithm unsigned int flagged:1; /// tetedge (local coordinates 0..3) unsigned int tetedge1:3; unsigned int tetedge2:3; // marked edge of faces // face_j : face without node j, // mark_k : edge without node k char faceedges[4]; // unsigned char faceedges[4]; bool incorder; unsigned int order:6; MarkedTet() = default; /* { for (int i = 0; i < 4; i++) { faceedges[i] = 127; } } */ MarkedTet (const MarkedTet&) = default; MarkedTet (MarkedTet &&) = default; MarkedTet & operator= (const MarkedTet&) = default; MarkedTet & operator= (MarkedTet&&) = default; }; ostream & operator<< (ostream & ost, const MarkedTet & mt) { for(int i=0; i<4; i++) ost << mt.pnums[i] << " "; ost << mt.matindex << " " << int(mt.marked) << " " << int(mt.flagged) << " " << int(mt.tetedge1) << " " << int(mt.tetedge2) << " "; ost << "faceedges = "; for(int i=0; i<4; i++) ost << int(mt.faceedges[i]) << " "; ost << " order = "; ost << mt.incorder << " " << int(mt.order) << "\n"; return ost; } istream & operator>> (istream & ost, MarkedTet & mt) { for(int i=0; i<4; i++) ost >> mt.pnums[i]; ost >> mt.matindex; int auxint; ost >> auxint; mt.marked = auxint; ost >> auxint; mt.flagged = auxint; ost >> auxint; mt.tetedge1 = auxint; ost >> auxint; mt.tetedge2 = auxint; char auxchar; for(int i=0; i<4; i++) { ost >> auxchar; mt.faceedges[i] = auxchar; } ost >> mt.incorder; ost >> auxint; mt.order = auxint; return ost; } class MarkedPrism { public: /// 6 point numbers PointIndex pnums[6]; /// material number int matindex; /// marked for refinement int marked; /// edge without node k (0,1,2) int markededge; bool incorder; unsigned int order:6; }; ostream & operator<< (ostream & ost, const MarkedPrism & mp) { for(int i=0; i<6; i++) ost << mp.pnums[i] << " "; ost << mp.matindex << " " << mp.marked << " " << mp.markededge << " " << mp.incorder << " " << int(mp.order) << "\n"; return ost; } istream & operator>> (istream & ist, MarkedPrism & mp) { for(int i=0; i<6; i++) ist >> mp.pnums[i]; ist >> mp.matindex >> mp.marked >> mp.markededge >> mp.incorder; int auxint; ist >> auxint; mp.order = auxint; return ist; } class MarkedIdentification { public: // number of points of one face (3 or 4) int np; /// 6 or 8 point numbers PointIndex pnums[8]; /// marked for refinement int marked; /// edge starting with node k (0,1,2, or 3) int markededge; bool incorder; unsigned int order:6; }; ostream & operator<< (ostream & ost, const MarkedIdentification & mi) { ost << mi.np << " "; for(int i=0; i<2*mi.np; i++) ost << mi.pnums[i] << " "; ost << mi.marked << " " << mi.markededge << " " << mi.incorder << " " << int(mi.order) << "\n"; return ost; } istream & operator>> (istream & ist, MarkedIdentification & mi) { ist >> mi.np; for(int i=0; i<2*mi.np; i++) ist >> mi.pnums[i]; ist >> mi.marked >> mi.markededge >> mi.incorder; int auxint; ist >> auxint; mi.order = auxint; return ist; } class MarkedTri { public: MarkedTri () = default; MarkedTri (const MarkedTri&) = default; MarkedTri (MarkedTri &&) = default; MarkedTri & operator= (const MarkedTri&) = default; MarkedTri & operator= (MarkedTri&&) = default; /// three point numbers PointIndex pnums[3]; /// three geominfos PointGeomInfo pgeominfo[3]; /// marked for refinement int marked; /// edge without node k int markededge; /// surface id int surfid; bool incorder; unsigned int order:6; }; ostream & operator<< (ostream & ost, const MarkedTri & mt) { for(int i=0; i<3; i++) ost << mt.pnums[i] << " "; for(int i=0; i<3; i++) ost << mt.pgeominfo[i] << " "; ost << mt.marked << " " << mt.markededge << " " << mt.surfid << " " << mt.incorder << " " << int(mt.order) << "\n"; return ost; } istream & operator>> (istream & ist, MarkedTri & mt) { for(int i=0; i<3; i++) ist >> mt.pnums[i]; for(int i=0; i<3; i++) ist >> mt.pgeominfo[i]; ist >> mt.marked >> mt.markededge >> mt.surfid >> mt.incorder; int auxint; ist >> auxint; mt.order = auxint; return ist; } class MarkedQuad { public: /// point numbers PointIndex pnums[4]; /// PointGeomInfo pgeominfo[4]; /// marked for refinement int marked; /// marked edge: 0/2 = vertical, 1/3 = horizontal int markededge; /// surface id int surfid; bool incorder; unsigned int order:6; }; ostream & operator<< (ostream & ost, const MarkedQuad & mt) { for(int i=0; i<4; i++) ost << mt.pnums[i] << " "; for(int i=0; i<4; i++) ost << mt.pgeominfo[i] << " "; ost << mt.marked << " " << mt.markededge << " " << mt.surfid << " " << mt.incorder << " " << int(mt.order) << "\n"; return ost; } istream & operator>> (istream & ist, MarkedQuad & mt) { for(int i=0; i<4; i++) ist >> mt.pnums[i]; for(int i=0; i<4; i++) ist >> mt.pgeominfo[i]; ist >> mt.marked >> mt.markededge >> mt.surfid >> mt.incorder; int auxint; ist >> auxint; mt.order = auxint; return ist; } void PrettyPrint(ostream & ost, const MarkedTet & mt) { int te1 = mt.tetedge1; int te2 = mt.tetedge2; int order = mt.order; ost << "MT: " << mt.pnums[0] << " - " << mt.pnums[1] << " - " << mt.pnums[2] << " - " << mt.pnums[3] << endl << "marked edge: " << te1 << " - " << te2 << ", order = " << order << endl; //for (int k = 0; k < 4; k++) // ost << int(mt.faceedges[k]) << " "; for (int k = 0; k < 4; k++) { ost << "face"; for (int j=0; j<4; j++) if(j != k) ost << " " << mt.pnums[j]; for(int i=0; i<3; i++) for(int j=i+1; j<4; j++) if(i != k && j != k && int(mt.faceedges[k]) == 6-k-i-j) ost << " marked edge " << mt.pnums[i] << " " << mt.pnums[j] << endl; } ost << endl; } int BTSortEdges (const Mesh & mesh, const Array< Array* > & idmaps, INDEX_2_CLOSED_HASHTABLE & edgenumber) { PrintMessage(4,"sorting ... "); // if (mesh.PureTetMesh()) if (1) { // new, fast version Array edges; Array eclasses; int i, j, k; int cntedges = 0; int go_on; int ned(0); // enumerate edges: for (i = 1; i <= mesh.GetNE(); i++) { const Element & el = mesh.VolumeElement (i); static int tetedges[6][2] = { { 1, 2 }, { 1, 3 }, { 1, 4 }, { 2, 3 }, { 2, 4 }, { 3, 4 } } ; static int prismedges[9][2] = { { 1, 2 }, { 1, 3 }, { 2, 3 }, { 4, 5 }, { 4, 6 }, { 5, 6 }, { 1, 4 }, { 2, 5 }, { 3, 6 } }; int pyramidedges[6][2] = { { 1, 2 }, { 3, 4 }, { 1, 5 }, { 2, 5 }, { 3, 5 }, { 4, 5 } }; int (*tip)[2] = NULL; switch (el.GetType()) { case TET: case TET10: { tip = tetedges; ned = 6; break; } case PRISM: case PRISM12: { tip = prismedges; ned = 6; break; } case PYRAMID: { tip = pyramidedges; ned = 6; break; } default: throw NgException("Bisect, element type not handled in switch"); } for (j = 0; j < ned; j++) { INDEX_2 i2(el.PNum(tip[j][0]), el.PNum(tip[j][1])); i2.Sort(); //(*testout) << "edge " << i2 << endl; if (!edgenumber.Used(i2)) { cntedges++; edges.Append (i2); edgenumber.Set(i2, cntedges); } } } // additional surface edges: for (i = 1; i <= mesh.GetNSE(); i++) { const Element2d & el = mesh.SurfaceElement (i); static int trigedges[3][2] = { { 1, 2 }, { 2, 3 }, { 3, 1 } }; static int quadedges[4][2] = { { 1, 2 }, { 2, 3 }, { 3, 4 }, { 4, 1 } }; int (*tip)[2] = NULL; switch (el.GetType()) { case TRIG: case TRIG6: { tip = trigedges; ned = 3; break; } case QUAD: case QUAD6: { tip = quadedges; ned = 4; break; } default: { cerr << "Error: Sort for Bisect, SE has " << el.GetNP() << " points" << endl; ned = 0; } } for (j = 0; j < ned; j++) { INDEX_2 i2(el.PNum(tip[j][0]), el.PNum(tip[j][1])); i2.Sort(); if (!edgenumber.Used(i2)) { cntedges++; edges.Append (i2); edgenumber.Set(i2, cntedges); } } } eclasses.SetSize (cntedges); for (i = 1; i <= cntedges; i++) eclasses.Elem(i) = i; // identify edges in element stack do { go_on = 0; for (i = 1; i <= mesh.GetNE(); i++) { const Element & el = mesh.VolumeElement (i); if (el.GetType() != PRISM && el.GetType() != PRISM12 && el.GetType() != PYRAMID) continue; int prismpairs[3][4] = { { 1, 2, 4, 5 }, { 2, 3, 5, 6 }, { 1, 3, 4, 6 } }; int pyramidpairs[3][4] = { { 1, 2, 4, 3 }, { 1, 5, 4, 5 }, { 2, 5, 3, 5 } }; int (*pairs)[4] = NULL; switch (el.GetType()) { case PRISM: case PRISM12: { pairs = prismpairs; break; } case PYRAMID: { pairs = pyramidpairs; break; } default: throw NgException("Bisect, element type not handled in switch, 2"); } for (j = 0; j < 3; j++) { INDEX_2 e1 (el.PNum(pairs[j][0]), el.PNum(pairs[j][1])); INDEX_2 e2 (el.PNum(pairs[j][2]), el.PNum(pairs[j][3])); e1.Sort(); e2.Sort(); int eclass1 = edgenumber.Get (e1); int eclass2 = edgenumber.Get (e2); // (*testout) << "identify edges " << eclass1 << "-" << eclass2 << endl; if (eclasses.Get(eclass1) > eclasses.Get(eclass2)) { eclasses.Elem(eclass1) = eclasses.Get(eclass2); go_on = 1; } else if (eclasses.Get(eclass2) > eclasses.Get(eclass1)) { eclasses.Elem(eclass2) = eclasses.Get(eclass1); go_on = 1; } } } for(SurfaceElementIndex sei = 0; sei < mesh.GetNSE(); sei++) { const Element2d & el2d = mesh[sei]; for(i = 0; i < el2d.GetNP(); i++) { INDEX_2 e1(el2d[i], el2d[(i+1) % el2d.GetNP()]); e1.Sort(); INDEX_2 e2; for(k = 0; k < idmaps.Size(); k++) { e2.I1() = (*idmaps[k])[e1.I1()]; e2.I2() = (*idmaps[k])[e1.I2()]; if(e2.I1() == 0 || e2.I2() == 0 || e1.I1() == e2.I1() || e1.I2() == e2.I2()) continue; e2.Sort(); if(!edgenumber.Used(e2)) continue; int eclass1 = edgenumber.Get (e1); int eclass2 = edgenumber.Get (e2); if (eclasses.Get(eclass1) > eclasses.Get(eclass2)) { eclasses.Elem(eclass1) = eclasses.Get(eclass2); go_on = 1; } else if (eclasses.Get(eclass2) > eclasses.Get(eclass1)) { eclasses.Elem(eclass2) = eclasses.Get(eclass1); go_on = 1; } } } } } while (go_on); // for (i = 1; i <= cntedges; i++) // { // (*testout) << "edge " << i << ": " // << edges.Get(i).I1() << "-" << edges.Get(i).I2() // << ", class = " << eclasses.Get(i) << endl; // } // compute classlength: Array edgelength(cntedges); /* for (i = 1; i <= cntedges; i++) edgelength.Elem(i) = 1e20; */ for (i = 1; i <= cntedges; i++) { INDEX_2 edge = edges.Get(i); double elen = Dist (mesh.Point(edge.I1()), mesh.Point(edge.I2())); edgelength.Elem (i) = elen; } /* for (i = 1; i <= mesh.GetNE(); i++) { const Element & el = mesh.VolumeElement (i); if (el.GetType() == TET) { for (j = 1; j <= 3; j++) for (k = j+1; k <= 4; k++) { INDEX_2 i2(el.PNum(j), el.PNum(k)); i2.Sort(); int enr = edgenumber.Get(i2); double elen = Dist (mesh.Point (i2.I1()), mesh.Point (i2.I2())); if (elen < edgelength.Get(enr)) edgelength.Set (enr, elen); } } else if (el.GetType() == PRISM) { for (j = 1; j <= 3; j++) { k = (j % 3) + 1; INDEX_2 i2(el.PNum(j), el.PNum(k)); i2.Sort(); int enr = edgenumber.Get(i2); double elen = Dist (mesh.Point (i2.I1()), mesh.Point (i2.I2())); if (elen < edgelength.Get(enr)) edgelength.Set (enr, elen); i2 = INDEX_2(el.PNum(j+3), el.PNum(k+3)); i2.Sort(); enr = edgenumber.Get(i2); elen = Dist (mesh.Point (i2.I1()), mesh.Point (i2.I2())); if (elen < edgelength.Get(enr)) edgelength.Set (enr, elen); if (!edgenumber.Used(i2)) { cntedges++; edgenumber.Set(i2, cntedges); } i2 = INDEX_2(el.PNum(j), el.PNum(j+3)); i2.Sort(); enr = edgenumber.Get(i2); elen = Dist (mesh.Point (i2.I1()), mesh.Point (i2.I2())); if (elen < edgelength.Get(enr)) edgelength.Set (enr, elen); } } } */ for (i = 1; i <= cntedges; i++) { if (eclasses.Get(i) != i) { if (edgelength.Get(i) < edgelength.Get(eclasses.Get(i))) edgelength.Elem(eclasses.Get(i)) = edgelength.Get(i); edgelength.Elem(i) = 1e20; } } TABLE eclasstab(cntedges); for (i = 1; i <= cntedges; i++) eclasstab.Add1 (eclasses.Get(i), i); // sort edges: Array sorted(cntedges); QuickSort (edgelength, sorted); int cnt = 0; for (i = 1; i <= cntedges; i++) { int ii = sorted.Get(i); for (j = 1; j <= eclasstab.EntrySize(ii); j++) { cnt++; edgenumber.Set (edges.Get(eclasstab.Get(ii, j)), cnt); } } return cnt; } else { // old version int i, j; int cnt = 0; int found; double len2, maxlen2; INDEX_2 ep; // sort edges by length, parallel edges (on prisms) // are added in blocks do { found = 0; maxlen2 = 1e30; for (i = 1; i <= mesh.GetNE(); i++) { const Element & el = mesh.VolumeElement (i); int ned; int tetedges[6][2] = { { 1, 2 }, { 1, 3 }, { 1, 4 }, { 2, 3 }, { 2, 4 }, { 3, 4 } }; int prismedges[6][2] = { { 1, 2 }, { 1, 3 }, { 2, 4 }, { 4, 5 }, { 4, 6 }, { 5, 6 } }; int pyramidedges[6][2] = { { 1, 2 }, { 3, 4 }, { 1, 5 }, { 2, 5 }, { 3, 5 }, { 4, 5 } }; int (*tip)[2]; switch (el.GetType()) { case TET: { tip = tetedges; ned = 6; break; } case PRISM: { tip = prismedges; ned = 6; break; } case PYRAMID: { tip = pyramidedges; ned = 6; break; } default: throw NgException("Bisect, element type not handled in switch, 3"); } for (j = 0; j < ned; j++) { INDEX_2 i2(el.PNum(tip[j][0]), el.PNum(tip[j][1])); i2.Sort(); if (!edgenumber.Used(i2)) { len2 = Dist (mesh.Point (i2.I1()), mesh.Point (i2.I2())); if (len2 < maxlen2) { maxlen2 = len2; ep = i2; found = 1; } } } } if (found) { cnt++; edgenumber.Set (ep, cnt); // find connected edges: int go_on = 0; do { go_on = 0; for (i = 1; i <= mesh.GetNE(); i++) { const Element & el = mesh.VolumeElement (i); if (el.GetNP() != 6) continue; int prismpairs[3][4] = { { 1, 2, 4, 5 }, { 2, 3, 5, 6 }, { 1, 3, 4, 6 } }; int pyramidpairs[3][4] = { { 1, 2, 4, 3 }, { 1, 5, 4, 5 }, { 2, 5, 3, 5 } }; int (*pairs)[4]; switch (el.GetType()) { case PRISM: { pairs = prismpairs; break; } case PYRAMID: { pairs = pyramidpairs; break; } default: throw NgException("Bisect, element type not handled in switch, 3a"); } for (j = 0; j < 3; j++) { INDEX_2 e1 (el.PNum(pairs[j][0]), el.PNum(pairs[j][1])); INDEX_2 e2 (el.PNum(pairs[j][2]), el.PNum(pairs[j][3])); e1.Sort(); e2.Sort(); int used1 = edgenumber.Used (e1); int used2 = edgenumber.Used (e2); if (used1 && !used2) { cnt++; edgenumber.Set (e2, cnt); go_on = 1; } if (used2 && !used1) { cnt++; edgenumber.Set (e1, cnt); go_on = 1; } } } } while (go_on); } } while (found); return cnt; } } void BTDefineMarkedTet (const Element & el, INDEX_2_CLOSED_HASHTABLE & edgenumber, MarkedTet & mt) { for (int i = 0; i < 4; i++) mt.pnums[i] = el[i]; mt.marked = 0; mt.flagged = 0; mt.incorder = 0; mt.order = 1; int val = 0; // find marked edge of tet: for (int i = 0; i < 3; i++) for (int j = i+1; j < 4; j++) { INDEX_2 i2(mt.pnums[i], mt.pnums[j]); i2.Sort(); int hval = edgenumber.Get(i2); if (hval > val) { val = hval; mt.tetedge1 = i; mt.tetedge2 = j; } } // find marked edges of faces: for (int k = 0; k < 4; k++) { val = 0; for (int i = 0; i < 3; i++) for (int j = i+1; j < 4; j++) if (i != k && j != k) { INDEX_2 i2(mt.pnums[i], mt.pnums[j]); i2.Sort(); int hval = edgenumber.Get(i2); if (hval > val) { val = hval; int hi = 6 - k - i - j; mt.faceedges[k] = char(hi); } } } } void BTDefineMarkedPrism (const Element & el, INDEX_2_CLOSED_HASHTABLE & edgenumber, MarkedPrism & mp) { if (el.GetType() == PRISM || el.GetType() == PRISM12) { for (int i = 0; i < 6; i++) mp.pnums[i] = el[i]; } else if (el.GetType() == PYRAMID) { static int map[6] = { 1, 2, 5, 4, 3, 5 }; for (int i = 0; i < 6; i++) mp.pnums[i] = el.PNum(map[i]); } else if (el.GetType() == TET || el.GetType() == TET10) { static int map[6] = { 1, 4, 3, 2, 4, 3 }; for (int i = 0; i < 6; i++) mp.pnums[i] = el.PNum(map[i]); } else { PrintSysError ("Define marked prism called for non-prism and non-pyramid"); } mp.marked = 0; mp.incorder = 0; mp.order = 1; int val = 0; for (int i = 0; i < 2; i++) for (int j = i+1; j < 3; j++) { INDEX_2 i2(mp.pnums[i], mp.pnums[j]); i2.Sort(); int hval = edgenumber.Get(i2); if (hval > val) { val = hval; mp.markededge = 3 - i - j; } } } bool BTDefineMarkedId(const Element2d & el, INDEX_2_CLOSED_HASHTABLE & edgenumber, const Array & idmap, MarkedIdentification & mi) { bool identified = true; mi.np = el.GetNP(); int min1(0),min2(0); for(int j = 0; identified && j < mi.np; j++) { mi.pnums[j] = el[j]; mi.pnums[j+mi.np] = idmap[el[j]]; if(j == 0 || el[j] < min1) min1 = el[j]; if(j == 0 || mi.pnums[j+mi.np] < min2) min2 = mi.pnums[j+mi.np]; identified = (mi.pnums[j+mi.np] != 0 && mi.pnums[j+mi.np] != mi.pnums[j]); } identified = identified && (min1 < min2); if(identified) { mi.marked = 0; mi.incorder = 0; mi.order = 1; int val = 0; for (int i = 0; i < mi.np; i++) { INDEX_2 i2(mi.pnums[i], mi.pnums[(i+1)%mi.np]); i2.Sort(); int hval = edgenumber.Get(i2); if (hval > val) { val = hval; mi.markededge = i; } } } return identified; } void BTDefineMarkedTri (const Element2d & el, INDEX_2_CLOSED_HASHTABLE & edgenumber, MarkedTri & mt) { for (int i = 0; i < 3; i++) { mt.pnums[i] = el[i]; mt.pgeominfo[i] = el.GeomInfoPi (i+1); } mt.marked = 0; mt.surfid = el.GetIndex(); mt.incorder = 0; mt.order = 1; int val = 0; for (int i = 0; i < 2; i++) for (int j = i+1; j < 3; j++) { INDEX_2 i2(mt.pnums[i], mt.pnums[j]); i2.Sort(); int hval = edgenumber.Get(i2); if (hval > val) { val = hval; mt.markededge = 3 - i - j; } } } void PrettyPrint(ostream & ost, const MarkedTri & mt) { ost << "MarkedTrig: " << endl; ost << " pnums = "; for (int i=0; i<3; i++) ost << mt.pnums[i] << " "; ost << endl; ost << " marked = " << mt.marked << ", markededge=" << mt.markededge << endl; for(int i=0; i<2; i++) for(int j=i+1; j<3; j++) if(mt.markededge == 3-i-j) ost << " marked edge pnums = " << mt.pnums[i] << " " << mt.pnums[j] << endl; } void PrettyPrint(ostream & ost, const MarkedQuad & mq) { ost << "MarkedQuad: " << endl; ost << " pnums = "; for (int i=0; i<4; i++) ost << mq.pnums[i] << " "; ost << endl; ost << " marked = " << mq.marked << ", markededge=" << mq.markededge << endl; } void BTDefineMarkedQuad (const Element2d & el, INDEX_2_CLOSED_HASHTABLE & edgenumber, MarkedQuad & mq) { for (int i = 0; i < 4; i++) mq.pnums[i] = el[i]; Swap (mq.pnums[2], mq.pnums[3]); mq.marked = 0; mq.markededge = 0; mq.surfid = el.GetIndex(); } // mark elements due to local h int BTMarkTets (T_MTETS & mtets, T_MPRISMS & mprisms, const Mesh & mesh) { int marked = 0; int np = mesh.GetNP(); Vector hv(np); for (int i = 0; i < np; i++) hv(i) = mesh.GetH (mesh.Point(i+1)); double hfac = 1; for (int step = 1; step <= 2; step++) { for (int i = 1; i <= mtets.Size(); i++) { double h = 0; for (int j = 0; j < 3; j++) for (int k = j+1; k < 4; k++) { const Point<3> & p1 = mesh.Point (mtets.Get(i).pnums[j]); const Point<3> & p2 = mesh.Point (mtets.Get(i).pnums[k]); double hh = Dist2 (p1, p2); if (hh > h) h = hh; } h = sqrt (h); double hshould = 1e10; for (int j = 0; j < 4; j++) { double hi = hv (mtets.Get(i).pnums[j]-1); if (hi < hshould) hshould = hi; } if (step == 1) { if (h / hshould > hfac) hfac = h / hshould; } else { if (h > hshould * hfac) { mtets.Elem(i).marked = 1; marked = 1; } else mtets.Elem(i).marked = 0; } } for (int i = 1; i <= mprisms.Size(); i++) { double h = 0; for (int j = 0; j < 2; j++) for (int k = j+1; k < 3; k++) { const Point<3> & p1 = mesh.Point (mprisms.Get(i).pnums[j]); const Point<3> & p2 = mesh.Point (mprisms.Get(i).pnums[k]); double hh = Dist2 (p1, p2); if (hh > h) h = hh; } h = sqrt (h); double hshould = 1e10; for (int j = 0; j < 6; j++) { double hi = hv (mprisms.Get(i).pnums[j]-1); if (hi < hshould) hshould = hi; } if (step == 1) { if (h / hshould > hfac) hfac = h / hshould; } else { if (h > hshould * hfac) { mprisms.Elem(i).marked = 1; marked = 1; } else mprisms.Elem(i).marked = 0; } } if (step == 1) { if (hfac > 2) hfac /= 2; else hfac = 1; } } return marked; } void BTBisectTet (const MarkedTet & oldtet, int newp, MarkedTet & newtet1, MarkedTet & newtet2) { #ifdef DEBUG *testout << "bisect tet " << oldtet << endl; #endif // points vis a vis from tet-edge int vis1, vis2; vis1 = 0; while (vis1 == oldtet.tetedge1 || vis1 == oldtet.tetedge2) vis1++; vis2 = 6 - vis1 - oldtet.tetedge1 - oldtet.tetedge2; // is tet of type P ? int istypep = 0; for (int i = 0; i < 4; i++) { int cnt = 0; for (int j = 0; j < 4; j++) if (oldtet.faceedges[j] == i) cnt++; if (cnt == 3) istypep = 1; } for (int i = 0; i < 4; i++) { newtet1.pnums[i] = oldtet.pnums[i]; newtet2.pnums[i] = oldtet.pnums[i]; } newtet1.flagged = istypep && !oldtet.flagged; newtet2.flagged = istypep && !oldtet.flagged; int nm = oldtet.marked - 1; if (nm < 0) nm = 0; newtet1.marked = nm; newtet2.marked = nm; #ifdef DEBUG *testout << "newtet1,before = " << newtet1 << endl; *testout << "newtet2,before = " << newtet2 << endl; #endif for (int i = 0; i < 4; i++) { if (i == oldtet.tetedge1) { newtet2.pnums[i] = newp; newtet2.faceedges[i] = oldtet.faceedges[i]; // inherited face newtet2.faceedges[vis1] = i; // cut faces newtet2.faceedges[vis2] = i; int j = 0; while (j == i || j == oldtet.faceedges[i]) j++; int k = 6 - i - oldtet.faceedges[i] - j; newtet2.tetedge1 = j; // tet-edge newtet2.tetedge2 = k; // new face: if (istypep && oldtet.flagged) { int hi = 6 - oldtet.tetedge1 - j - k; newtet2.faceedges[oldtet.tetedge2] = char(hi); } else newtet2.faceedges[oldtet.tetedge2] = oldtet.tetedge1; #ifdef DEBUG *testout << "i = " << i << ", j = " << j << " k = " << k << " oldtet.tetedge1 = " << oldtet.tetedge1 << " oldtet.tetedge2 = " << oldtet.tetedge2 << " 6-oldtet.tetedge1-j-k = " << 6 - oldtet.tetedge1 - j - k << " 6-oldtet.tetedge1-j-k = " << short(6 - oldtet.tetedge1 - j - k) << endl; *testout << "vis1 = " << vis1 << ", vis2 = " << vis2 << endl; for (int j = 0; j < 4; j++) if (newtet2.faceedges[j] > 3) { *testout << "ERROR1" << endl; } #endif } if (i == oldtet.tetedge2) { newtet1.pnums[i] = newp; newtet1.faceedges[i] = oldtet.faceedges[i]; // inherited face newtet1.faceedges[vis1] = i; newtet1.faceedges[vis2] = i; int j = 0; while (j == i || j == oldtet.faceedges[i]) j++; int k = 6 - i - oldtet.faceedges[i] - j; newtet1.tetedge1 = j; newtet1.tetedge2 = k; // new face: if (istypep && oldtet.flagged) { int hi = 6 - oldtet.tetedge2 - j - k; newtet1.faceedges[oldtet.tetedge1] = char(hi); } else newtet1.faceedges[oldtet.tetedge1] = oldtet.tetedge2; #ifdef DEBUG for (int j = 0; j < 4; j++) if (newtet2.faceedges[j] > 3) { *testout << "ERROR2" << endl; } #endif } } newtet1.matindex = oldtet.matindex; newtet2.matindex = oldtet.matindex; newtet1.incorder = 0; newtet1.order = oldtet.order; newtet2.incorder = 0; newtet2.order = oldtet.order; // *testout << "newtet1 = " << newtet1 << endl; // *testout << "newtet2 = " << newtet2 << endl; } void BTBisectPrism (const MarkedPrism & oldprism, int newp1, int newp2, MarkedPrism & newprism1, MarkedPrism & newprism2) { for (int i = 0; i < 6; i++) { newprism1.pnums[i] = oldprism.pnums[i]; newprism2.pnums[i] = oldprism.pnums[i]; } int pe1 = 0; if (pe1 == oldprism.markededge) pe1++; int pe2 = 3 - oldprism.markededge - pe1; newprism1.pnums[pe2] = newp1; newprism1.pnums[pe2+3] = newp2; newprism1.markededge = pe2; newprism2.pnums[pe1] = newp1; newprism2.pnums[pe1+3] = newp2; newprism2.markededge = pe1; newprism1.matindex = oldprism.matindex; newprism2.matindex = oldprism.matindex; int nm = oldprism.marked - 1; if (nm < 0) nm = 0; newprism1.marked = nm; newprism2.marked = nm; newprism1.incorder = 0; newprism1.order = oldprism.order; newprism2.incorder = 0; newprism2.order = oldprism.order; } void BTBisectIdentification (const MarkedIdentification & oldid, Array & newp, MarkedIdentification & newid1, MarkedIdentification & newid2) { for(int i=0; i<2*oldid.np; i++) { newid1.pnums[i] = oldid.pnums[i]; newid2.pnums[i] = oldid.pnums[i]; } newid1.np = newid2.np = oldid.np; if(oldid.np == 3) { newid1.pnums[(oldid.markededge+1)%3] = newp[0]; newid1.pnums[(oldid.markededge+1)%3+3] = newp[1]; newid1.markededge = (oldid.markededge+2)%3; newid2.pnums[oldid.markededge] = newp[0]; newid2.pnums[oldid.markededge+3] = newp[1]; newid2.markededge = (oldid.markededge+1)%3; } else if(oldid.np == 4) { newid1.pnums[(oldid.markededge+1)%4] = newp[0]; newid1.pnums[(oldid.markededge+2)%4] = newp[2]; newid1.pnums[(oldid.markededge+1)%4+4] = newp[1]; newid1.pnums[(oldid.markededge+2)%4+4] = newp[3]; newid1.markededge = (oldid.markededge+3)%4; newid2.pnums[oldid.markededge] = newp[0]; newid2.pnums[(oldid.markededge+3)%4] = newp[2]; newid2.pnums[oldid.markededge+4] = newp[1]; newid2.pnums[(oldid.markededge+3)%4+4] = newp[3]; newid2.markededge = (oldid.markededge+1)%4; } int nm = oldid.marked - 1; if (nm < 0) nm = 0; newid1.marked = newid2.marked = nm; newid1.incorder = newid2.incorder = 0; newid1.order = newid2.order = oldid.order; } void BTBisectTri (const MarkedTri & oldtri, int newp, const PointGeomInfo & newpgi, MarkedTri & newtri1, MarkedTri & newtri2) { for (int i = 0; i < 3; i++) { newtri1.pnums[i] = oldtri.pnums[i]; newtri1.pgeominfo[i] = oldtri.pgeominfo[i]; newtri2.pnums[i] = oldtri.pnums[i]; newtri2.pgeominfo[i] = oldtri.pgeominfo[i]; } int pe1 = 0; if (pe1 == oldtri.markededge) pe1++; int pe2 = 3 - oldtri.markededge - pe1; newtri1.pnums[pe2] = newp; newtri1.pgeominfo[pe2] = newpgi; newtri1.markededge = pe2; newtri2.pnums[pe1] = newp; newtri2.pgeominfo[pe1] = newpgi; newtri2.markededge = pe1; newtri1.surfid = oldtri.surfid; newtri2.surfid = oldtri.surfid; int nm = oldtri.marked - 1; if (nm < 0) nm = 0; newtri1.marked = nm; newtri2.marked = nm; newtri1.incorder = 0; newtri1.order = oldtri.order; newtri2.incorder = 0; newtri2.order = oldtri.order; } void BTBisectQuad (const MarkedQuad & oldquad, int newp1, const PointGeomInfo & npgi1, int newp2, const PointGeomInfo & npgi2, MarkedQuad & newquad1, MarkedQuad & newquad2) { for (int i = 0; i < 4; i++) { newquad1.pnums[i] = oldquad.pnums[i]; newquad1.pgeominfo[i] = oldquad.pgeominfo[i]; newquad2.pnums[i] = oldquad.pnums[i]; newquad2.pgeominfo[i] = oldquad.pgeominfo[i]; } /* if (oldquad.marked==1) // he/sz: 2d quads or 3d prism { newquad1.pnums[1] = newp1; newquad1.pgeominfo[1] = npgi1; newquad1.pnums[3] = newp2; newquad1.pgeominfo[3] = npgi2; newquad2.pnums[0] = newp1; newquad2.pgeominfo[0] = npgi1; newquad2.pnums[2] = newp2; newquad2.pgeominfo[2] = npgi2; } else if (oldquad.marked==2) // he/sz: 2d quads only { newquad1.pnums[0] = newp1; newquad1.pnums[1] = newp2; newquad1.pnums[3] = oldquad.pnums[2]; newquad1.pnums[2] = oldquad.pnums[0]; newquad1.pgeominfo[0] = npgi1; newquad1.pgeominfo[1] = npgi2; newquad1.pgeominfo[3] = oldquad.pgeominfo[2]; newquad1.pgeominfo[2] = oldquad.pgeominfo[0]; newquad2.pnums[0] = newp2; newquad2.pnums[1] = newp1; newquad2.pnums[3] = oldquad.pnums[1]; newquad2.pnums[2] = oldquad.pnums[3]; newquad2.pgeominfo[0] = npgi2; newquad2.pgeominfo[1] = npgi1; newquad2.pgeominfo[3] = oldquad.pgeominfo[1]; newquad2.pgeominfo[2] = oldquad.pgeominfo[3]; } */ if (oldquad.markededge==0 || oldquad.markededge==2) { newquad1.pnums[1] = newp1; newquad1.pgeominfo[1] = npgi1; newquad1.pnums[3] = newp2; newquad1.pgeominfo[3] = npgi2; newquad2.pnums[0] = newp1; newquad2.pgeominfo[0] = npgi1; newquad2.pnums[2] = newp2; newquad2.pgeominfo[2] = npgi2; } else // 1 || 3 { newquad1.pnums[2] = newp1; newquad1.pgeominfo[2] = npgi1; newquad1.pnums[3] = newp2; newquad1.pgeominfo[3] = npgi2; newquad2.pnums[0] = newp1; newquad2.pgeominfo[0] = npgi1; newquad2.pnums[1] = newp2; newquad2.pgeominfo[1] = npgi2; } newquad1.surfid = oldquad.surfid; newquad2.surfid = oldquad.surfid; int nm = oldquad.marked - 1; if (nm < 0) nm = 0; newquad1.marked = nm; newquad2.marked = nm; if (nm==1) { newquad1.markededge=1; newquad2.markededge=1; } else { newquad1.markededge=0; newquad2.markededge=0; } } int MarkHangingIdentifications(T_MIDS & mids, const INDEX_2_CLOSED_HASHTABLE & cutedges) { int hanging = 0; for (int i = 1; i <= mids.Size(); i++) { if (mids.Elem(i).marked) { hanging = 1; continue; } const int np = mids.Get(i).np; for(int j = 0; j < np; j++) { INDEX_2 edge1(mids.Get(i).pnums[j], mids.Get(i).pnums[(j+1) % np]); INDEX_2 edge2(mids.Get(i).pnums[j+np], mids.Get(i).pnums[((j+1) % np) + np]); edge1.Sort(); edge2.Sort(); if (cutedges.Used (edge1) || cutedges.Used (edge2)) { mids.Elem(i).marked = 1; hanging = 1; } } } return hanging; } /* void IdentifyCutEdges(Mesh & mesh, INDEX_2_CLOSED_HASHTABLE & cutedges) { int i,j,k; Array< Array* > idmaps; for(i=1; i<=mesh.GetIdentifications().GetMaxNr(); i++) { idmaps.Append(new Array); mesh.GetIdentifications().GetMap(i,*idmaps.Last()); } for(SurfaceElementIndex sei = 0; sei < mesh.GetNSE(); sei++) { const Element2d & el2d = mesh[sei]; for(i = 0; i < el2d.GetNP(); i++) { INDEX_2 e1(el2d[i], el2d[(i+1) % el2d.GetNP()]); e1.Sort(); if(!cutedges.Used(e1)) continue; for(k = 0; k < idmaps.Size(); k++) { INDEX_2 e2((*idmaps[k])[e1.I1()], (*idmaps[k])[e1.I2()]); if(e2.I1() == 0 || e2.I2() == 0 || e1.I1() == e2.I1() || e1.I2() == e2.I2()) continue; e2.Sort(); if(cutedges.Used(e2)) continue; Point3d np = Center(mesh.Point(e2.I1()), mesh.Point(e2.I2())); int newp = mesh.AddPoint(np); cutedges.Set(e2,newp); (*testout) << "DAAA" << endl; } } } for(i=0; i & cutedges, TaskManager tm) { static int timer = NgProfiler::CreateTimer ("MarkHangingTets"); NgProfiler::RegionTimer reg (timer); int hanging = 0; // for (int i = 1; i <= mtets.Size(); i++) ParallelForRange (tm, mtets.Size(), [&] (size_t begin, size_t end) { bool my_hanging = false; for (size_t i = begin; i < end; i++) { MarkedTet & teti = mtets[i]; if (teti.marked) { my_hanging = true; continue; } for (int j = 0; j < 3; j++) for (int k = j+1; k < 4; k++) { INDEX_2 edge(teti.pnums[j], teti.pnums[k]); edge.Sort(); if (cutedges.Used (edge)) { teti.marked = 1; my_hanging = true; } } } if (my_hanging) hanging = true; }); return hanging; } int MarkHangingPrisms (T_MPRISMS & mprisms, const INDEX_2_CLOSED_HASHTABLE & cutedges) { int hanging = 0; for (int i = 1; i <= mprisms.Size(); i++) { if (mprisms.Elem(i).marked) { hanging = 1; continue; } for (int j = 0; j < 2; j++) for (int k = j+1; k < 3; k++) { INDEX_2 edge1(mprisms.Get(i).pnums[j], mprisms.Get(i).pnums[k]); INDEX_2 edge2(mprisms.Get(i).pnums[j+3], mprisms.Get(i).pnums[k+3]); edge1.Sort(); edge2.Sort(); if (cutedges.Used (edge1) || cutedges.Used (edge2)) { mprisms.Elem(i).marked = 1; hanging = 1; } } } return hanging; } bool MarkHangingTris (T_MTRIS & mtris, const INDEX_2_CLOSED_HASHTABLE & cutedges, TaskManager tm) { bool hanging = false; // for (int i = 1; i <= mtris.Size(); i++) // for (auto & tri : mtris) ParallelForRange (tm, mtris.Size(), [&] (size_t begin, size_t end) { bool my_hanging = false; for (size_t i = begin; i < end; i++) { auto & tri = mtris[i]; if (tri.marked) { my_hanging = true; continue; } for (int j = 0; j < 2; j++) for (int k = j+1; k < 3; k++) { INDEX_2 edge(tri.pnums[j], tri.pnums[k]); edge.Sort(); if (cutedges.Used (edge)) { tri.marked = 1; my_hanging = true; } } } if (my_hanging) hanging = true; }); return hanging; } int MarkHangingQuads (T_MQUADS & mquads, const INDEX_2_CLOSED_HASHTABLE & cutedges) { int hanging = 0; for (int i = 1; i <= mquads.Size(); i++) { if (mquads.Elem(i).marked) { hanging = 1; continue; } INDEX_2 edge1(mquads.Get(i).pnums[0], mquads.Get(i).pnums[1]); INDEX_2 edge2(mquads.Get(i).pnums[2], mquads.Get(i).pnums[3]); edge1.Sort(); edge2.Sort(); if (cutedges.Used (edge1) || cutedges.Used (edge2)) { mquads.Elem(i).marked = 1; mquads.Elem(i).markededge = 0; hanging = 1; continue; } // he/sz: second case: split horizontally INDEX_2 edge3(mquads.Get(i).pnums[1], mquads.Get(i).pnums[3]); INDEX_2 edge4(mquads.Get(i).pnums[2], mquads.Get(i).pnums[0]); edge3.Sort(); edge4.Sort(); if (cutedges.Used (edge3) || cutedges.Used (edge4)) { mquads.Elem(i).marked = 1; mquads.Elem(i).markededge = 1; hanging = 1; continue; } } return hanging; } void ConnectToNodeRec (int node, int tonode, const TABLE & conto, Array & connecttonode) { // (*testout) << "connect " << node << " to " << tonode << endl; for (int i = 1; i <= conto.EntrySize(node); i++) { int n2 = conto.Get(node, i); if (!connecttonode.Get(n2)) { connecttonode.Elem(n2) = tonode; ConnectToNodeRec (n2, tonode, conto, connecttonode); } } } T_MTETS mtets; T_MPRISMS mprisms; T_MIDS mids; T_MTRIS mtris; T_MQUADS mquads; void WriteMarkedElements(ostream & ost) { ost << "Marked Elements\n"; ost << mtets.Size() << "\n"; for(int i=0; i> auxstring; if(auxstring != "Marked") return false; if(ist) ist >> auxstring; if(auxstring != "Elements") return false; int size; ist >> size; mtets.SetSize(size); for(int i=0; i> mtets[i]; if(mtets[i].pnums[0] > mesh.GetNV() || mtets[i].pnums[1] > mesh.GetNV() || mtets[i].pnums[2] > mesh.GetNV() || mtets[i].pnums[3] > mesh.GetNV()) return false; } ist >> size; mprisms.SetSize(size); for(int i=0; i> mprisms[i]; ist >> size; mids.SetSize(size); for(int i=0; i> mids[i]; ist >> size; mtris.SetSize(size); for(int i=0; i> mtris[i]; ist >> size; mquads.SetSize(size); for(int i=0; i> mquads[i]; return true; } void BisectTetsCopyMesh (Mesh & mesh, const NetgenGeometry *, BisectionOptions & opt, const Array< Array* > & idmaps, const string & refinfofile) { // mtets.SetName ("bisection, tets"); // mprisms.SetName ("bisection, prisms"); // mtris.SetName ("bisection, trigs"); // nmquads.SetName ("bisection, quads"); // mids.SetName ("bisection, identifications"); //int np = mesh.GetNP(); int ne = mesh.GetNE(); int nse = mesh.GetNSE(); /* if (mtets.Size() + mprisms.Size() == mesh.GetNE()) return; */ bool readok = false; if(refinfofile != "") { PrintMessage(3,"Reading marked-element information from \"",refinfofile,"\""); ifstream ist(refinfofile.c_str()); readok = ReadMarkedElements(ist,mesh); ist.close(); } if(!readok) { PrintMessage(3,"resetting marked-element information"); mtets.SetSize(0); mprisms.SetSize(0); mids.SetSize(0); mtris.SetSize(0); mquads.SetSize(0); INDEX_2_HASHTABLE shortedges(100); for (int i = 1; i <= ne; i++) { const Element & el = mesh.VolumeElement(i); if (el.GetType() == PRISM || el.GetType() == PRISM12) { for (int j = 1; j <= 3; j++) { INDEX_2 se(el.PNum(j), el.PNum(j+3)); se.Sort(); shortedges.Set (se, 1); } } } // INDEX_2_HASHTABLE edgenumber(np); INDEX_2_CLOSED_HASHTABLE edgenumber(9*ne+4*nse); BTSortEdges (mesh, idmaps, edgenumber); for (int i = 1; i <= ne; i++) { const Element & el = mesh.VolumeElement(i); switch (el.GetType()) { case TET: case TET10: { // if tet has short edge, it is handled as degenerated prism int foundse = 0; for (int j = 1; j <= 3; j++) for (int k = j+1; k <= 4; k++) { INDEX_2 se(el.PNum(j), el.PNum(k)); se.Sort(); if (shortedges.Used (se)) { // cout << "tet converted to prism" << endl; foundse = 1; int p3 = 1; while (p3 == j || p3 == k) p3++; int p4 = 10 - j - k - p3; // even permutation ? int pi[4]; pi[0] = j; pi[1] = k; pi[2] = p3; pi[3] = p4; int cnt = 0; for (int l = 1; l <= 4; l++) for (int m = 0; m < 3; m++) if (pi[m] > pi[m+1]) { Swap (pi[m], pi[m+1]); cnt++; } if (cnt % 2) Swap (p3, p4); Element hel = el; hel.PNum(1) = el.PNum(j); hel.PNum(2) = el.PNum(k); hel.PNum(3) = el.PNum(p3); hel.PNum(4) = el.PNum(p4); MarkedPrism mp; BTDefineMarkedPrism (hel, edgenumber, mp); mp.matindex = el.GetIndex(); mprisms.Append (mp); } } if (!foundse) { MarkedTet mt; BTDefineMarkedTet (el, edgenumber, mt); mt.matindex = el.GetIndex(); mtets.Append (mt); } break; } case PYRAMID: { // eventually rotate MarkedPrism mp; INDEX_2 se(el.PNum(1), el.PNum(2)); se.Sort(); if (shortedges.Used (se)) { Element hel = el; hel.PNum(1) = el.PNum(2); hel.PNum(2) = el.PNum(3); hel.PNum(3) = el.PNum(4); hel.PNum(4) = el.PNum(1); BTDefineMarkedPrism (hel, edgenumber, mp); } else { BTDefineMarkedPrism (el, edgenumber, mp); } mp.matindex = el.GetIndex(); mprisms.Append (mp); break; } case PRISM: case PRISM12: { MarkedPrism mp; BTDefineMarkedPrism (el, edgenumber, mp); mp.matindex = el.GetIndex(); mprisms.Append (mp); break; } default: throw NgException("Bisect, element type not handled in switch, 4"); } } for (int i = 1; i <= nse; i++) { const Element2d & el = mesh.SurfaceElement(i); if (el.GetType() == TRIG || el.GetType() == TRIG6) { MarkedTri mt; BTDefineMarkedTri (el, edgenumber, mt); mtris.Append (mt); } else { MarkedQuad mq; BTDefineMarkedQuad (el, edgenumber, mq); mquads.Append (mq); } MarkedIdentification mi; for(int j=0; j0) { ostringstream str1,str2; str1 << "copied " << mtets.Size() << " tets, " << mprisms.Size() << " prisms"; str2 << " " << mtris.Size() << " trigs, " << mquads.Size() << " quads"; PrintMessage(4,str1.str()); PrintMessage(4,str2.str()); } } /* void UpdateEdgeMarks2(Mesh & mesh, const Array< Array* > & idmaps) { Array< Array*,PointIndex::BASE > mtets_old(mesh.GetNP()); Array< Array*,PointIndex::BASE > mprisms_old(mesh.GetNP()); Array< Array*,PointIndex::BASE > mids_old(mesh.GetNP()); Array< Array*,PointIndex::BASE > mtris_old(mesh.GetNP()); Array< Array*,PointIndex::BASE > mquads_old(mesh.GetNP()); for(int i=PointIndex::BASE; i; for(int i=PointIndex::BASE; i; for(int i=PointIndex::BASE; i; for(int i=PointIndex::BASE; i; for(int i=PointIndex::BASE; i; for(int i=0; iAppend(mtets[i]); for(int i=0; iAppend(mprisms[i]); for(int i=0; iAppend(mids[i]); for(int i=0; iAppend(mtris[i]); } for(int i=0; iAppend(mquads[i]); int np = mesh.GetNP(); int ne = mesh.GetNE(); int nse = mesh.GetNSE(); int i, j, k, l, m; // if (mtets.Size() + mprisms.Size() == mesh.GetNE()) // return; mtets.SetSize(0); mprisms.SetSize(0); mids.SetSize(0); mtris.SetSize(0); mquads.SetSize(0); INDEX_2_HASHTABLE shortedges(100); for (i = 1; i <= ne; i++) { const Element & el = mesh.VolumeElement(i); if (el.GetType() == PRISM || el.GetType() == PRISM12) { for (j = 1; j <= 3; j++) { INDEX_2 se(el.PNum(j), el.PNum(j+3)); se.Sort(); shortedges.Set (se, 1); } } } // INDEX_2_HASHTABLE edgenumber(np); INDEX_2_CLOSED_HASHTABLE edgenumber(9*ne+4*nse); BTSortEdges (mesh, idmaps, edgenumber); for (i = 1; i <= ne; i++) { const Element & el = mesh.VolumeElement(i); switch (el.GetType()) { case TET: case TET10: { // if tet has short edge, it is handled as degenerated prism int foundse = 0; for (j = 1; j <= 3; j++) for (k = j+1; k <= 4; k++) { INDEX_2 se(el.PNum(j), el.PNum(k)); se.Sort(); if (shortedges.Used (se)) { // cout << "tet converted to prism" << endl; foundse = 1; int p3 = 1; while (p3 == j || p3 == k) p3++; int p4 = 10 - j - k - p3; // even permutation ? int pi[4]; pi[0] = j; pi[1] = k; pi[2] = p3; pi[3] = p4; int cnt = 0; for (l = 1; l <= 4; l++) for (m = 0; m < 3; m++) if (pi[m] > pi[m+1]) { Swap (pi[m], pi[m+1]); cnt++; } if (cnt % 2) Swap (p3, p4); Element hel = el; hel.PNum(1) = el.PNum(j); hel.PNum(2) = el.PNum(k); hel.PNum(3) = el.PNum(p3); hel.PNum(4) = el.PNum(p4); MarkedPrism mp; BTDefineMarkedPrism (hel, edgenumber, mp); mp.matindex = el.GetIndex(); mprisms.Append (mp); } } if (!foundse) { MarkedTet mt; int oldind = -1; for(l = 0; oldind < 0 && lSize(); l++) if(el[1] == (*mtets_old[el[0]])[l].pnums[1] && el[2] == (*mtets_old[el[0]])[l].pnums[2] && el[3] == (*mtets_old[el[0]])[l].pnums[3]) oldind = l; if(oldind >= 0) mtets.Append((*mtets_old[el[0]])[oldind]); else { BTDefineMarkedTet (el, edgenumber, mt); mt.matindex = el.GetIndex(); mtets.Append (mt); } } break; } case PYRAMID: { // eventually rotate MarkedPrism mp; INDEX_2 se(el.PNum(1), el.PNum(2)); se.Sort(); if (shortedges.Used (se)) { Element hel = el; hel.PNum(1) = el.PNum(2); hel.PNum(2) = el.PNum(3); hel.PNum(3) = el.PNum(4); hel.PNum(4) = el.PNum(1); BTDefineMarkedPrism (hel, edgenumber, mp); } else { BTDefineMarkedPrism (el, edgenumber, mp); } mp.matindex = el.GetIndex(); mprisms.Append (mp); break; } case PRISM: case PRISM12: { MarkedPrism mp; BTDefineMarkedPrism (el, edgenumber, mp); mp.matindex = el.GetIndex(); mprisms.Append (mp); break; } } } for (i = 1; i <= nse; i++) { const Element2d & el = mesh.SurfaceElement(i); if (el.GetType() == TRIG || el.GetType() == TRIG6) { MarkedTri mt; BTDefineMarkedTri (el, edgenumber, mt); mtris.Append (mt); } else { MarkedQuad mq; BTDefineMarkedQuad (el, edgenumber, mq); mquads.Append (mq); } MarkedIdentification mi; for(j=0; jSize(); l++) { bool equal = true; for(int m = 1; equal && m < mi.np; m++) equal = (mi.pnums[m] == (*mids_old[el[0]])[l].pnums[m]); if(equal) oldind = l; } if(oldind >= 0) mids.Last() = (*mids_old[mi.pnums[0]])[oldind]; } } for(int i=PointIndex::BASE; i* > & idmaps) //const Array < Array* > & elements_before, //const Array < Array* > & markedelts_num, // const Array < Array* > & surfelements_before, // const Array < Array* > & markedsurfelts_num) { /* T_MTETS mtets_old; mtets_old.Copy(mtets); T_MPRISMS mprisms_old; mprisms_old.Copy(mprisms); T_MIDS mids_old; mids_old.Copy(mids); T_MTRIS mtris_old; mtris_old.Copy(mtris); T_MQUADS mquads_old; mquads_old.Copy(mquads); */ T_MTETS mtets_old (mtets); T_MPRISMS mprisms_old (mprisms); T_MIDS mids_old (mids); T_MTRIS mtris_old (mtris); T_MQUADS mquads_old (mquads); mtets.SetSize(0); mprisms.SetSize(0); mids.SetSize(0); mtris.SetSize(0); mquads.SetSize(0); //int nv = mesh.GetNV(); INDEX_2_CLOSED_HASHTABLE edgenumber(9*mesh.GetNE()+4*mesh.GetNSE()); int maxnum = BTSortEdges (mesh, idmaps, edgenumber); for(int m = 0; m < mtets_old.Size(); m++) { MarkedTet & mt = mtets_old[m]; //(*testout) << "old mt " << mt; INDEX_2 edge (mt.pnums[mt.tetedge1],mt.pnums[mt.tetedge2]); edge.Sort(); if(edgenumber.Used(edge)) { int val = edgenumber.Get(edge); //(*testout) << "set voledge " << edge << " from " << val; if(val <= maxnum) { val += 2*maxnum; edgenumber.Set(edge,val); } else if(val <= 2*maxnum) { val += maxnum; edgenumber.Set(edge,val); } //(*testout) << " to " << val << endl; } for(int k=0; k<4; k++) for(int i=0; i<3; i++) for(int j=i+1; i != k && j<4; j++) if(j != k && int(mt.faceedges[k]) == 6-k-i-j) { edge[0] = mt.pnums[i]; edge[1] = mt.pnums[j]; edge.Sort(); if(edgenumber.Used(edge)) { int val = edgenumber.Get(edge); //(*testout) << "set faceedge " << edge << " from " << val; if(val <= maxnum) { val += maxnum; edgenumber.Set(edge,val); } //(*testout) << " to " << val << endl; } } } for(ElementIndex ei = 0; ei < mesh.GetNE(); ei++) { const Element & el = mesh[ei]; //int pos = elements_before[el[0]]->Pos(el); //int elnum = (pos >= 0) ? (*markedelts_num[el[0]])[pos] : -1; switch (el.GetType()) { case TET: case TET10: { //if(elnum >= 0) // { // mtets.Append(mtets_old[elnum]); // } //else // { MarkedTet mt; BTDefineMarkedTet (el, edgenumber, mt); mt.matindex = el.GetIndex(); mtets.Append (mt); //(*testout) << "mtet " << mtets.Last() << endl; break; } case PYRAMID: { cerr << "Refinement :: UpdateEdgeMarks not yet implemented for pyramids" << endl; break; } case PRISM: case PRISM12: { cerr << "Refinement :: UpdateEdgeMarks not yet implemented for prisms" << endl; break; } default: throw NgException("Bisect, element type not handled in switch, 6"); } } for(SurfaceElementIndex sei = 0; sei < mesh.GetNSE(); sei++) { const Element2d & el = mesh[sei]; /* for(int k=0; k<3; k++) auxind3[k] = el[k]; auxind3.Sort(); int pos = oldfaces[auxind3[0]]->Pos(auxind3); if(pos < 0) cout << "UIUIUI" << endl; */ switch (el.GetType()) { case TRIG: case TRIG6: { MarkedTri mt; BTDefineMarkedTri (el, edgenumber, mt); mtris.Append (mt); break; } case QUAD: case QUAD6: { MarkedQuad mt; BTDefineMarkedQuad (el, edgenumber, mt); mquads.Append (mt); break; } default: throw NgException("Bisect, element type not handled in switch, 5"); } MarkedIdentification mi; for(int j=0; jPos(el); int elnum = (pos >= 0) ? (*markedsurfelts_num[el[0]])[pos] : -1; switch (el.GetType()) { case TRIG: case TRIG6: { if(elnum >= 0) mtris.Append(mtris_old[elnum]); else { MarkedTri mt; BTDefineMarkedTri (el, edgenumber, mt); mtris.Append (mt); (*testout) << "(new) "; } (*testout) << "mtri " << mtris.Last(); break; } case QUAD: case QUAD6: { if(elnum >= 0) mquads.Append(mquads_old[elnum]); else { MarkedQuad mt; BTDefineMarkedQuad (el, edgenumber, mt); mquads.Append (mt); } break; } } */ } /* for(int i=0; i * quality_loss) const { PrintMessage(1,"Mesh bisection"); PushStatus("Mesh bisection"); static int timer = NgProfiler::CreateTimer ("Bisect"); static int timer1 = NgProfiler::CreateTimer ("Bisect 1"); static int timer1a = NgProfiler::CreateTimer ("Bisect 1a"); static int timer1b = NgProfiler::CreateTimer ("Bisect 1b"); static int timer2 = NgProfiler::CreateTimer ("Bisect 2"); static int timer2a = NgProfiler::CreateTimer ("Bisect 2a"); static int timer2b = NgProfiler::CreateTimer ("Bisect 2b"); // static int timer2c = NgProfiler::CreateTimer ("Bisect 2c"); static int timer3 = NgProfiler::CreateTimer ("Bisect 3"); static int timer3a = NgProfiler::CreateTimer ("Bisect 3a"); static int timer3b = NgProfiler::CreateTimer ("Bisect 3b"); static int timer_bisecttet = NgProfiler::CreateTimer ("Bisect tets"); static int timer_bisecttrig = NgProfiler::CreateTimer ("Bisect trigs"); static int timer_bisectsegms = NgProfiler::CreateTimer ("Bisect segms"); NgProfiler::RegionTimer reg1 (timer); (*opt.tracer)("Bisect", false); NgProfiler::StartTimer (timer1); NgProfiler::StartTimer (timer1a); static int localizetimer = NgProfiler::CreateTimer("localize edgepoints"); NgProfiler::RegionTimer * loct = new NgProfiler::RegionTimer(localizetimer); LocalizeEdgePoints(mesh); delete loct; Array< Array* > idmaps; for(int i=1; i<=mesh.GetIdentifications().GetMaxNr(); i++) { if(mesh.GetIdentifications().GetType(i) == Identifications::PERIODIC) { idmaps.Append(new Array); mesh.GetIdentifications().GetMap(i,*idmaps.Last(),true); } } string refelementinfofileread = ""; string refelementinfofilewrite = ""; if(opt.refinementfilename) { ifstream inf(opt.refinementfilename); string st; inf >> st; if(st == "refinementinfo") { while(inf) { while(inf && st != "markedelementsfile") inf >> st; if(inf) inf >> st; if(st == "read" && inf) ReadEnclString(inf,refelementinfofileread,'\"'); else if(st == "write" && inf) ReadEnclString(inf,refelementinfofilewrite,'\"'); } } inf.close(); } if (mesh.mglevels == 1 || idmaps.Size() > 0) BisectTetsCopyMesh(mesh, NULL, opt, idmaps, refelementinfofileread); mesh.ComputeNVertices(); int np = mesh.GetNV(); mesh.SetNP(np); // int ne = mesh.GetNE(); // int nse = mesh.GetNSE(); // int i, j, l; // int initnp = np; // int maxsteps = 3; mesh.mglevels++; /* if (opt.refinementfilename || opt.usemarkedelements) maxsteps = 3; */ if (opt.refine_p) { int ne = mesh.GetNE(); int nse = mesh.GetNSE(); int ox,oy,oz; for (ElementIndex ei = 0; ei < ne; ei++) if (mesh[ei].TestRefinementFlag()) { mesh[ei].GetOrder(ox,oy,oz); mesh[ei].SetOrder (ox+1,oy+1,oz+1); if (mesh[ei].TestStrongRefinementFlag()) mesh[ei].SetOrder (ox+2,oy+2,oz+2); } for (SurfaceElementIndex sei = 0; sei < nse; sei++) if (mesh[sei].TestRefinementFlag()) { mesh[sei].GetOrder(ox,oy); mesh[sei].SetOrder(ox+1,oy+1); if (mesh[sei].TestStrongRefinementFlag()) mesh[sei].SetOrder(ox+2,oy+2); } #ifndef SABINE //Nachbarelemente mit ordx,ordy,ordz Array v_order (mesh.GetNP()); v_order = 0; for (ElementIndex ei = 0; ei < ne; ei++) for (int j = 0; j < mesh[ei].GetNP(); j++) if (mesh[ei].GetOrder() > v_order[mesh[ei][j]]) v_order[mesh[ei][j]] = mesh[ei].GetOrder(); for (SurfaceElementIndex sei = 0; sei < nse; sei++) for (int j = 0; j < mesh[sei].GetNP(); j++) if (mesh[sei].GetOrder() > v_order[mesh[sei][j]]) v_order[mesh[sei][j]] = mesh[sei].GetOrder(); for (ElementIndex ei = 0; ei < ne; ei++) for (int j = 0; j < mesh[ei].GetNP(); j++) if (mesh[ei].GetOrder() < v_order[mesh[ei][j]]-1) mesh[ei].SetOrder(v_order[mesh[ei][j]]-1); for (SurfaceElementIndex sei = 0; sei < nse; sei++) for (int j = 0; j < mesh[sei].GetNP(); j++) if (mesh[sei].GetOrder() < v_order[mesh[sei][j]]-1) mesh[sei].SetOrder(v_order[mesh[sei][j]]-1); #endif PopStatus(); return; } // INDEX_2_HASHTABLE cutedges(10 + 5 * (mtets.Size()+mprisms.Size()+mtris.Size()+mquads.Size())); INDEX_2_CLOSED_HASHTABLE cutedges(10 + 9 * (mtets.Size()+mprisms.Size()+mtris.Size()+mquads.Size())); bool noprojection = false; NgProfiler::StopTimer (timer1a); for (int l = 1; l <= 1; l++) { int marked = 0; if (opt.refinementfilename) { ifstream inf(opt.refinementfilename); PrintMessage(3,"load refinementinfo from file ",opt.refinementfilename); string st; inf >> st; if(st == "refinementinfo") // new version { for(int i=1; i<=mtets.Size(); i++) mtets.Elem(i).marked = 0; for(int i=1; i<=mprisms.Size(); i++) mprisms.Elem(i).marked = 0; for(int i=1; i<=mtris.Size(); i++) mtris.Elem(i).marked = 0; for(int i=1; i<=mquads.Size(); i++) mquads.Elem(i).marked = 0; for(int i=1; i<=mprisms.Size(); i++) mids.Elem(i).marked = 0; inf >> st; while(inf) { if(st[0] == '#') { inf.ignore(10000,'\n'); inf >> st; } else if(st == "markedelementsfile") { inf >> st; ReadEnclString(inf,st,'\"'); inf >> st; } else if(st == "noprojection") { noprojection = true; inf >> st; } else if(st == "refine") { inf >> st; if(st == "elements") { inf >> st; bool isint = true; for(string::size_type ii=0; isint && ii> st; isint = true; for(string::size_type ii=0; isint && ii> bounds[i]; int cnt = 0; for(ElementIndex ei = 0; ei < mesh.GetNE(); ei++) { const Element & el = mesh[ei]; // Point<3> center(0,0,0); for(int i=0; i 0) marked = 1; inf >> st; } else { throw NgException("something wrong with refinementinfo file"); } } } } else { inf.close(); inf.open(opt.refinementfilename); char ch; for (int i = 1; i <= mtets.Size(); i++) { inf >> ch; if(!inf) throw NgException("something wrong with refinementinfo file (old format)"); mtets.Elem(i).marked = (ch == '1'); } marked = 1; } inf.close(); } else if (opt.usemarkedelements) { int cntm = 0; // all in one ! if (mprisms.Size()) { int cnttet = 0; int cntprism = 0; for (int i = 1; i <= mesh.GetNE(); i++) { if (mesh.VolumeElement(i).GetType() == TET || mesh.VolumeElement(i).GetType() == TET10) { cnttet++; mtets.Elem(cnttet).marked = 3 * mesh.VolumeElement(i).TestRefinementFlag(); if (mtets.Elem(cnttet).marked) cntm++; } else { cntprism++; mprisms.Elem(cntprism).marked = 2 * mesh.VolumeElement(i).TestRefinementFlag(); if (mprisms.Elem(cntprism).marked) cntm++; } } } else for (int i = 1; i <= mtets.Size(); i++) { mtets.Elem(i).marked = 3 * mesh.VolumeElement(i).TestRefinementFlag(); if (mtets.Elem(i).marked) cntm++; } // (*testout) << "mtets = " << mtets << endl; /* for (i = 1; i <= mtris.Size(); i++) mtris.Elem(i).marked = 0; for (i = 1; i <= mquads.Size(); i++) mquads.Elem(i).marked = 0; */ if (printmessage_importance>0) { ostringstream str; str << "marked elements: " << cntm; PrintMessage(4,str.str()); } int cnttrig = 0; int cntquad = 0; for (int i = 1; i <= mesh.GetNSE(); i++) { if (mesh.SurfaceElement(i).GetType() == TRIG || mesh.SurfaceElement(i).GetType() == TRIG6) { cnttrig++; mtris.Elem(cnttrig).marked = mesh.SurfaceElement(i).TestRefinementFlag() ? 2 : 0; // mtris.Elem(cnttrig).marked = 0; if (mtris.Elem(cnttrig).marked) cntm++; } else { cntquad++; // 2d: marked=2, 3d prisms: marked=1 mquads.Elem(cntquad).marked = mesh.SurfaceElement(i).TestRefinementFlag() ? 4-mesh.GetDimension() : 0 ; // mquads.Elem(cntquad).marked = 0; if (mquads.Elem(cntquad).marked) cntm++; } } if (printmessage_importance>0) { ostringstream str; str << "with surface-elements: " << cntm; PrintMessage(4,str.str()); } // he/sz: das wird oben schon richtig gemacht. // hier sind die quads vergessen! /* if (mesh.GetDimension() == 2) { cntm = 0; for (i = 1; i <= mtris.Size(); i++) { mtris.Elem(i).marked = 2 * mesh.SurfaceElement(i).TestRefinementFlag(); // mtris.Elem(i).marked = 2; if (mtris.Elem(i).marked) cntm++; } if (!cntm) { for (i = 1; i <= mtris.Size(); i++) { mtris.Elem(i).marked = 2; cntm++; } } cout << "trigs: " << mtris.Size() << " "; cout << "marked: " << cntm << endl; } */ marked = (cntm > 0); } else { marked = BTMarkTets (mtets, mprisms, mesh); } if (!marked) break; //(*testout) << "mtets " << mtets << endl; if (opt.refine_p) { PrintMessage(3,"refine p"); for (int i = 1; i <= mtets.Size(); i++) mtets.Elem(i).incorder = mtets.Elem(i).marked ? 1 : 0; for (int i = 1; i <= mtets.Size(); i++) if (mtets.Elem(i).incorder) mtets.Elem(i).marked = 0; for (int i = 1; i <= mprisms.Size(); i++) mprisms.Elem(i).incorder = mprisms.Elem(i).marked ? 1 : 0; for (int i = 1; i <= mprisms.Size(); i++) if (mprisms.Elem(i).incorder) mprisms.Elem(i).marked = 0; for (int i = 1; i <= mtris.Size(); i++) mtris.Elem(i).incorder = mtris.Elem(i).marked ? 1 : 0; for (int i = 1; i <= mtris.Size(); i++) { if (mtris.Elem(i).incorder) mtris.Elem(i).marked = 0; } } if (opt.refine_hp) { PrintMessage(3,"refine hp"); BitArray singv(np); singv.Clear(); if (mesh.GetDimension() == 3) { for (int i = 1; i <= mesh.GetNSeg(); i++) { const Segment & seg = mesh.LineSegment(i); singv.Set (seg[0]); singv.Set (seg[1]); } /* for ( i=1; i<= mesh.GetNSE(); i++) { const Element2d & sel = mesh.SurfaceElement(i); for(int j=1; j<=sel.GetNP(); j++) singv.Set(sel.PNum(j)); } */ } else { // vertices with 2 different bnds Array bndind(np); bndind = 0; for (int i = 1; i <= mesh.GetNSeg(); i++) { const Segment & seg = mesh.LineSegment(i); for (int j = 0; j < 2; j++) { int pi = (j == 0) ? seg[0] : seg[1]; if (bndind.Elem(pi) == 0) bndind.Elem(pi) = seg.edgenr; else if (bndind.Elem(pi) != seg.edgenr) singv.Set (pi); } } } for (int i = 1; i <= mtets.Size(); i++) mtets.Elem(i).incorder = 1; for (int i = 1; i <= mtets.Size(); i++) { if (!mtets.Elem(i).marked) mtets.Elem(i).incorder = 0; for (int j = 0; j < 4; j++) if (singv.Test (mtets.Elem(i).pnums[j])) mtets.Elem(i).incorder = 0; } for (int i = 1; i <= mtets.Size(); i++) if (mtets.Elem(i).incorder) mtets.Elem(i).marked = 0; for (int i = 1; i <= mprisms.Size(); i++) mprisms.Elem(i).incorder = 1; for (int i = 1; i <= mprisms.Size(); i++) { if (!mprisms.Elem(i).marked) mprisms.Elem(i).incorder = 0; for (int j = 0; j < 6; j++) if (singv.Test (mprisms.Elem(i).pnums[j])) mprisms.Elem(i).incorder = 0; } for (int i = 1; i <= mprisms.Size(); i++) if (mprisms.Elem(i).incorder) mprisms.Elem(i).marked = 0; for (int i = 1; i <= mtris.Size(); i++) mtris.Elem(i).incorder = 1; for (int i = 1; i <= mtris.Size(); i++) { if (!mtris.Elem(i).marked) mtris.Elem(i).incorder = 0; for (int j = 0; j < 3; j++) if (singv.Test (mtris.Elem(i).pnums[j])) mtris.Elem(i).incorder = 0; } for (int i = 1; i <= mtris.Size(); i++) { if (mtris.Elem(i).incorder) mtris.Elem(i).marked = 0; } } int hangingvol, hangingsurf, hangingedge; //cout << "write?" << endl; //string yn; //cin >> yn; (*testout) << "refine volume elements" << endl; do { // refine volume elements NgProfiler::StartTimer (timer_bisecttet); (*opt.tracer)("bisecttet", false); int nel = mtets.Size(); for (int i = 1; i <= nel; i++) if (mtets.Elem(i).marked) { MarkedTet oldtet = mtets.Get(i); INDEX_2 edge(oldtet.pnums[oldtet.tetedge1], oldtet.pnums[oldtet.tetedge2]); edge.Sort(); PointIndex newp; if (cutedges.Used (edge)) { newp = cutedges.Get(edge); } else { Point<3> npt = Center (mesh.Point (edge.I1()), mesh.Point (edge.I2())); newp = mesh.AddPoint (npt); cutedges.Set (edge, newp); } MarkedTet newtet1, newtet2; BTBisectTet (oldtet, newp, newtet1, newtet2); mtets.Elem(i) = newtet1; mtets.Append (newtet2); mesh.mlparentelement.Append (i); } NgProfiler::StopTimer (timer_bisecttet); (*opt.tracer)("bisecttet", true); int npr = mprisms.Size(); for (int i = 1; i <= npr; i++) if (mprisms.Elem(i).marked) { MarkedPrism oldprism; MarkedPrism newprism1, newprism2; PointIndex newp1, newp2; oldprism = mprisms.Get(i); int pi1 = 0; if (pi1 == oldprism.markededge) pi1++; int pi2 = 3-pi1-oldprism.markededge; INDEX_2 edge1(oldprism.pnums[pi1], oldprism.pnums[pi2]); INDEX_2 edge2(oldprism.pnums[pi1+3], oldprism.pnums[pi2+3]); edge1.Sort(); edge2.Sort(); if (cutedges.Used (edge1)) newp1 = cutedges.Get(edge1); else { Point<3> npt = Center (mesh.Point (edge1.I1()), mesh.Point (edge1.I2())); newp1 = mesh.AddPoint (npt); cutedges.Set (edge1, newp1); } if (cutedges.Used (edge2)) newp2 = cutedges.Get(edge2); else { Point<3> npt = Center (mesh.Point (edge2.I1()), mesh.Point (edge2.I2())); newp2 = mesh.AddPoint (npt); cutedges.Set (edge2, newp2); } BTBisectPrism (oldprism, newp1, newp2, newprism1, newprism2); //if(yn == "y") // (*testout) << "bisected prism " << oldprism << "and got " << newprism1 << "and " << newprism2 << endl; mprisms.Elem(i) = newprism1; mprisms.Append (newprism2); } int nid = mids.Size(); for (int i = 1; i <= nid; i++) if (mids.Elem(i).marked) { MarkedIdentification oldid,newid1,newid2; Array newp; oldid = mids.Get(i); Array edges; edges.Append(INDEX_2(oldid.pnums[oldid.markededge], oldid.pnums[(oldid.markededge+1)%oldid.np])); edges.Append(INDEX_2(oldid.pnums[oldid.markededge + oldid.np], oldid.pnums[(oldid.markededge+1)%oldid.np + oldid.np])); if(oldid.np == 4) { edges.Append(INDEX_2(oldid.pnums[(oldid.markededge+2)%oldid.np], oldid.pnums[(oldid.markededge+3)%oldid.np])); edges.Append(INDEX_2(oldid.pnums[(oldid.markededge+2)%oldid.np + oldid.np], oldid.pnums[(oldid.markededge+3)%oldid.np + oldid.np])); } for (int j = 0; j < edges.Size(); j++) { edges[j].Sort(); if(cutedges.Used(edges[j])) newp.Append(cutedges.Get(edges[j])); else { Point<3> npt = Center (mesh.Point (edges[j].I1()), mesh.Point (edges[j].I2())); newp.Append(mesh.AddPoint(npt)); cutedges.Set(edges[j],newp[j]); } } BTBisectIdentification(oldid,newp,newid1,newid2); mids.Elem(i) = newid1; mids.Append(newid2); } //IdentifyCutEdges(mesh, cutedges); (*opt.tracer)("mark elements", false); hangingvol = MarkHangingTets (mtets, cutedges, opt.task_manager) + MarkHangingPrisms (mprisms, cutedges) + MarkHangingIdentifications (mids, cutedges); (*opt.tracer)("mark elements", true); size_t nsel = mtris.Size(); NgProfiler::StartTimer (timer_bisecttrig); for (size_t i = 0; i < nsel; i++) if (mtris[i].marked) { MarkedTri newtri1, newtri2; PointIndex newp; MarkedTri oldtri = mtris[i]; PointIndex oldpi1 = oldtri.pnums[(oldtri.markededge+1)%3]; PointIndex oldpi2 = oldtri.pnums[(oldtri.markededge+2)%3]; INDEX_2 edge(oldpi1, oldpi2); edge.Sort(); if (cutedges.Used (edge)) { newp = cutedges.Get(edge); } else { Point<3> npt = Center (mesh.Point (edge.I1()), mesh.Point (edge.I2())); newp = mesh.AddPoint (npt); cutedges.Set (edge, newp); } int si = mesh.GetFaceDescriptor (oldtri.surfid).SurfNr(); PointGeomInfo npgi; if (mesh[newp].Type() != EDGEPOINT) PointBetween (mesh.Point (oldpi1), mesh.Point (oldpi2), 0.5, si, oldtri.pgeominfo[(oldtri.markededge+1)%3], oldtri.pgeominfo[(oldtri.markededge+2)%3], mesh.Point (newp), npgi); BTBisectTri (oldtri, newp, npgi, newtri1, newtri2); mtris[i] = newtri1; mtris.Append (newtri2); mesh.mlparentsurfaceelement.Append (i+1); } NgProfiler::StopTimer (timer_bisecttrig); int nquad = mquads.Size(); for (int i = 1; i <= nquad; i++) if (mquads.Elem(i).marked) { MarkedQuad oldquad; MarkedQuad newquad1, newquad2; PointIndex newp1, newp2; oldquad = mquads.Get(i); /* INDEX_2 edge1(oldquad.pnums[0], oldquad.pnums[1]); INDEX_2 edge2(oldquad.pnums[2], oldquad.pnums[3]); */ INDEX_2 edge1, edge2; PointGeomInfo pgi11, pgi12, pgi21, pgi22; if (oldquad.markededge==0 || oldquad.markededge==2) { edge1.I1()=oldquad.pnums[0]; pgi11=oldquad.pgeominfo[0]; edge1.I2()=oldquad.pnums[1]; pgi12=oldquad.pgeominfo[1]; edge2.I1()=oldquad.pnums[2]; pgi21=oldquad.pgeominfo[2]; edge2.I2()=oldquad.pnums[3]; pgi22=oldquad.pgeominfo[3]; } else // 3 || 1 { edge1.I1()=oldquad.pnums[0]; pgi11=oldquad.pgeominfo[0]; edge1.I2()=oldquad.pnums[2]; pgi12=oldquad.pgeominfo[2]; edge2.I1()=oldquad.pnums[1]; pgi21=oldquad.pgeominfo[1]; edge2.I2()=oldquad.pnums[3]; pgi22=oldquad.pgeominfo[3]; } edge1.Sort(); edge2.Sort(); if (cutedges.Used (edge1)) { newp1 = cutedges.Get(edge1); } else { Point<3> np1 = Center (mesh.Point (edge1.I1()), mesh.Point (edge1.I2())); newp1 = mesh.AddPoint (np1); cutedges.Set (edge1, newp1); } if (cutedges.Used (edge2)) { newp2 = cutedges.Get(edge2); } else { Point<3> np2 = Center (mesh.Point (edge2.I1()), mesh.Point (edge2.I2())); newp2 = mesh.AddPoint (np2); cutedges.Set (edge2, newp2); } PointGeomInfo npgi1, npgi2; int si = mesh.GetFaceDescriptor (oldquad.surfid).SurfNr(); // geom->GetSurface(si)->Project (mesh.Point(newp1)); // geom->GetSurface(si)->Project (mesh.Point(newp2)); // (*testout) // cerr << "project point 1 " << newp1 << " old: " << mesh.Point(newp1); PointBetween (mesh.Point (edge1.I1()), mesh.Point (edge1.I2()), 0.5, si, pgi11, pgi12, mesh.Point (newp1), npgi1); // (*testout) // cerr << " new: " << mesh.Point(newp1) << endl; // cerr << "project point 2 " << newp2 << " old: " << mesh.Point(newp2); PointBetween (mesh.Point (edge2.I1()), mesh.Point (edge2.I2()), 0.5, si, pgi21, pgi22, mesh.Point (newp2), npgi2); // cerr << " new: " << mesh.Point(newp2) << endl; BTBisectQuad (oldquad, newp1, npgi1, newp2, npgi2, newquad1, newquad2); mquads.Elem(i) = newquad1; mquads.Append (newquad2); } NgProfiler::StartTimer (timer1b); hangingsurf = MarkHangingTris (mtris, cutedges, opt.task_manager) + MarkHangingQuads (mquads, cutedges); hangingedge = 0; NgProfiler::StopTimer (timer1b); NgProfiler::StartTimer (timer_bisectsegms); int nseg = mesh.GetNSeg (); for (int i = 1; i <= nseg; i++) { Segment & seg = mesh.LineSegment (i); INDEX_2 edge(seg[0], seg[1]); edge.Sort(); if (cutedges.Used (edge)) { hangingedge = 1; Segment nseg1 = seg; Segment nseg2 = seg; int newpi = cutedges.Get(edge); nseg1[1] = newpi; nseg2[0] = newpi; EdgePointGeomInfo newepgi; // // cerr << "move edgepoint " << newpi << " from " << mesh.Point(newpi); PointBetween (mesh.Point (seg[0]), mesh.Point (seg[1]), 0.5, seg.surfnr1, seg.surfnr2, seg.epgeominfo[0], seg.epgeominfo[1], mesh.Point (newpi), newepgi); // cerr << " to " << mesh.Point (newpi) << endl; nseg1.epgeominfo[1] = newepgi; nseg2.epgeominfo[0] = newepgi; mesh.LineSegment (i) = nseg1; mesh.AddSegment (nseg2); } } NgProfiler::StopTimer (timer_bisectsegms); } while (hangingvol || hangingsurf || hangingedge); /* if (printmessage_importance>0) { ostringstream strstr; strstr << mtets.Size() << " tets" << endl << mtris.Size() << " trigs" << endl; if (mprisms.Size()) { strstr << mprisms.Size() << " prisms" << endl << mquads.Size() << " quads" << endl; } strstr << mesh.GetNP() << " points"; PrintMessage(4,strstr.str()); } */ PrintMessage (4, mtets.Size(), " tets"); PrintMessage (4, mtris.Size(), " trigs"); if (mprisms.Size()) { PrintMessage (4, mprisms.Size(), " prisms"); PrintMessage (4, mquads.Size(), " quads"); } PrintMessage (4, mesh.GetNP(), " points"); } NgProfiler::StopTimer (timer1); // (*testout) << "mtets = " << mtets << endl; if (opt.refine_hp) { // Array v_order (mesh.GetNP()); v_order = 0; if (mesh.GetDimension() == 3) { for (int i = 1; i <= mtets.Size(); i++) if (mtets.Elem(i).incorder) mtets.Elem(i).order++; for (int i = 0; i < mtets.Size(); i++) for (int j = 0; j < 4; j++) if (int(mtets[i].order) > v_order.Elem(mtets[i].pnums[j])) v_order.Elem(mtets[i].pnums[j]) = mtets[i].order; for (int i = 0; i < mtets.Size(); i++) for (int j = 0; j < 4; j++) if (int(mtets[i].order) < v_order.Elem(mtets[i].pnums[j])-1) mtets[i].order = v_order.Elem(mtets[i].pnums[j])-1; } else { for (int i = 1; i <= mtris.Size(); i++) if (mtris.Elem(i).incorder) { mtris.Elem(i).order++; } for (int i = 0; i < mtris.Size(); i++) for (int j = 0; j < 3; j++) if (int(mtris[i].order) > v_order.Elem(mtris[i].pnums[j])) v_order.Elem(mtris[i].pnums[j]) = mtris[i].order; for (int i = 0; i < mtris.Size(); i++) { for (int j = 0; j < 3; j++) if (int(mtris[i].order) < v_order.Elem(mtris[i].pnums[j])-1) mtris[i].order = v_order.Elem(mtris[i].pnums[j])-1; } } } NgProfiler::StartTimer (timer2); NgProfiler::StartTimer (timer2a); mtets.SetAllocSize (mtets.Size()); mprisms.SetAllocSize (mprisms.Size()); mids.SetAllocSize (mids.Size()); mtris.SetAllocSize (mtris.Size()); mquads.SetAllocSize (mquads.Size()); (*opt.tracer)("copy tets", false); mesh.ClearVolumeElements(); mesh.VolumeElements().SetAllocSize (mtets.Size()+mprisms.Size()); mesh.VolumeElements().SetSize(mtets.Size()); /* for (int i = 1; i <= mtets.Size(); i++) { Element el(TET); el.SetIndex (mtets.Get(i).matindex); for (int j = 1; j <= 4; j++) el.PNum(j) = mtets.Get(i).pnums[j-1]; el.SetOrder (mtets.Get(i).order); mesh.AddVolumeElement (el); } */ ParallelForRange (opt.task_manager, mtets.Size(), [&] (size_t begin, size_t end) { for (size_t i = begin; i < end; i++) { Element el(TET); auto & tet = mtets[i]; el.SetIndex (tet.matindex); el.SetOrder (tet.order); for (int j = 0; j < 4; j++) el[j] = tet.pnums[j]; mesh.SetVolumeElement (ElementIndex(i), el); } }); (*opt.tracer)("copy tets", true); for (int i = 1; i <= mprisms.Size(); i++) { Element el(PRISM); el.SetIndex (mprisms.Get(i).matindex); for (int j = 1; j <= 6; j++) el.PNum(j) = mprisms.Get(i).pnums[j-1]; el.SetOrder (mprisms.Get(i).order); // degenerated prism ? static const int map1[] = { 3, 2, 5, 6, 1 }; static const int map2[] = { 1, 3, 6, 4, 2 }; static const int map3[] = { 2, 1, 4, 5, 3 }; const int * map = NULL; int deg1 = 0, deg2 = 0, deg3 = 0; // int deg = 0; if (el.PNum(1) == el.PNum(4)) { map = map1; deg1 = 1; } if (el.PNum(2) == el.PNum(5)) { map = map2; deg2 = 1; } if (el.PNum(3) == el.PNum(6)) { map = map3; deg3 = 1; } switch (deg1+deg2+deg3) { case 1: { for (int j = 1; j <= 5; j++) el.PNum(j) = mprisms.Get(i).pnums[map[j-1]-1]; el.SetType (PYRAMID); break; } case 2: { static const int tetmap1[] = { 1, 2, 3, 4 }; static const int tetmap2[] = { 2, 3, 1, 5 }; static const int tetmap3[] = { 3, 1, 2, 6 }; if (!deg1) map = tetmap1; if (!deg2) map = tetmap2; if (!deg3) map = tetmap3; for (int j = 1; j <= 4; j++) el.PNum(j) = mprisms.Get(i).pnums[map[j-1]-1]; /* if (!deg1) el.PNum(4) = el.PNum(4); if (!deg2) el.PNum(4) = el.PNum(5); if (!deg3) el.PNum(4) = el.PNum(6); */ el.SetType(TET); break; } default: ; } mesh.AddVolumeElement (el); } mesh.ClearSurfaceElements(); mesh.SurfaceElements().SetAllocSize (mtris.Size()+mquads.Size()); NgProfiler::StopTimer (timer2a); NgProfiler::StartTimer (timer2b); /* for (auto & trig : mtris) { Element2d el(TRIG); el.SetIndex (trig.surfid); el.SetOrder (trig.order); for (int j = 0; j < 3; j++) { el[j] = trig.pnums[j]; el.GeomInfoPi(j+1) = trig.pgeominfo[j]; } mesh.AddSurfaceElement (el); } */ mesh.SurfaceElements().SetSize(mtris.Size()); // for (size_t i = 0; i < mtris.Size(); i++) ParallelForRange (opt.task_manager, mtris.Size(), [&] (size_t begin, size_t end) { for (size_t i = begin; i < end; i++) { Element2d el(TRIG); auto & trig = mtris[i]; el.SetIndex (trig.surfid); el.SetOrder (trig.order); for (int j = 0; j < 3; j++) { el[j] = trig.pnums[j]; el.GeomInfoPi(j+1) = trig.pgeominfo[j]; } mesh.SetSurfaceElement (SurfaceElementIndex(i), el); } }); mesh.RebuildSurfaceElementLists(); for (int i = 1; i <= mquads.Size(); i++) { Element2d el(QUAD); el.SetIndex (mquads.Get(i).surfid); for (int j = 1; j <= 4; j++) el.PNum(j) = mquads.Get(i).pnums[j-1]; Swap (el.PNum(3), el.PNum(4)); mesh.AddSurfaceElement (el); } NgProfiler::StopTimer (timer2b); // write multilevel hierarchy to mesh: np = mesh.GetNP(); mesh.mlbetweennodes.SetSize(np); if (mesh.mglevels <= 2) { PrintMessage(4,"RESETTING mlbetweennodes"); for (int i = 1; i <= np; i++) { mesh.mlbetweennodes.Elem(i).I1() = 0; mesh.mlbetweennodes.Elem(i).I2() = 0; } } /* for (i = 1; i <= cutedges.GetNBags(); i++) for (j = 1; j <= cutedges.GetBagSize(i); j++) { INDEX_2 edge; int newpi; cutedges.GetData (i, j, edge, newpi); mesh.mlbetweennodes.Elem(newpi) = edge; } */ BitArray isnewpoint(np); isnewpoint.Clear(); for (int i = 0; i < cutedges.Size(); i++) if (cutedges.UsedPos0(i)) { INDEX_2 edge; PointIndex newpi; cutedges.GetData0 (i, edge, newpi); isnewpoint.Set(newpi); mesh.mlbetweennodes.Elem(newpi) = edge; } /* mesh.PrintMemInfo (cout); cout << "tets "; mtets.PrintMemInfo (cout); cout << "prims "; mprisms.PrintMemInfo (cout); cout << "tris "; mtris.PrintMemInfo (cout); cout << "quads "; mquads.PrintMemInfo (cout); cout << "cutedges "; cutedges.PrintMemInfo (cout); */ /* // find connected nodes (close nodes) TABLE conto(np); for (i = 1; i <= mprisms.Size(); i++) for (j = 1; j <= 6; j++) { int n1 = mprisms.Get(i).pnums[j-1]; int n2 = mprisms.Get(i).pnums[(j+2)%6]; // if (n1 != n2) { int found = 0; for (k = 1; k <= conto.EntrySize(n1); k++) if (conto.Get(n1, k) == n2) { found = 1; break; } if (!found) conto.Add (n1, n2); } } mesh.connectedtonode.SetSize(np); for (i = 1; i <= np; i++) mesh.connectedtonode.Elem(i) = 0; // (*testout) << "connection table: " << endl; // for (i = 1; i <= np; i++) // { // (*testout) << "node " << i << ": "; // for (j = 1; j <= conto.EntrySize(i); j++) // (*testout) << conto.Get(i, j) << " "; // (*testout) << endl; // } for (i = 1; i <= np; i++) if (mesh.connectedtonode.Elem(i) == 0) { mesh.connectedtonode.Elem(i) = i; ConnectToNodeRec (i, i, conto, mesh.connectedtonode); } */ // mesh.BuildConnectedNodes(); mesh.ComputeNVertices(); (*opt.tracer)("call RebuildSurfElList", false); mesh.RebuildSurfaceElementLists(); (*opt.tracer)("call RebuildSurfElList", true); // update identification tables for (int i = 1; i <= mesh.GetIdentifications().GetMaxNr(); i++) { Array identmap; mesh.GetIdentifications().GetMap (i, identmap); /* for (j = 1; j <= cutedges.GetNBags(); j++) for (k = 1; k <= cutedges.GetBagSize(j); k++) { INDEX_2 i2; int newpi; cutedges.GetData (j, k, i2, newpi); INDEX_2 oi2(identmap.Get(i2.I1()), identmap.Get(i2.I2())); oi2.Sort(); if (cutedges.Used (oi2)) { int onewpi = cutedges.Get(oi2); mesh.GetIdentifications().Add (newpi, onewpi, i); } } */ for (int j = 0; j < cutedges.Size(); j++) if (cutedges.UsedPos0(j)) { INDEX_2 i2; PointIndex newpi; cutedges.GetData0 (j, i2, newpi); INDEX_2 oi2(identmap.Get(i2.I1()), identmap.Get(i2.I2())); oi2.Sort(); if (cutedges.Used (oi2)) { PointIndex onewpi = cutedges.Get(oi2); mesh.GetIdentifications().Add (newpi, onewpi, i); } } } (*opt.tracer)("Bisect", true); // Repair works only for tets! bool do_repair = mesh.PureTetMesh (); do_repair = false; // JS, March 2009: multigrid crashes //if(mesh.mglevels == 3) // noprojection = true; //noprojection = true; if(noprojection) { do_repair = false; for(int ii=1; ii<=mesh.GetNP(); ii++) { if(isnewpoint.Test(ii) && mesh.mlbetweennodes[ii][0] > 0) { mesh.Point(ii) = Center(mesh.Point(mesh.mlbetweennodes[ii][0]), mesh.Point(mesh.mlbetweennodes[ii][1])); } } } // Check/Repair static bool repaired_once; if(mesh.mglevels == 1) repaired_once = false; //mesh.Save("before.vol"); static int reptimer = NgProfiler::CreateTimer("check/repair"); NgProfiler::RegionTimer * regt(NULL); regt = new NgProfiler::RegionTimer(reptimer); Array bad_elts; Array pure_badness; if(do_repair || quality_loss != NULL) { pure_badness.SetSize(mesh.GetNP()+2); GetPureBadness(mesh,pure_badness,isnewpoint); } if(do_repair) // by Markus W { const double max_worsening = 1; const bool uselocalworsening = false; // bool repaired = false; Validate(mesh,bad_elts,pure_badness,max_worsening,uselocalworsening); if (printmessage_importance>0) { ostringstream strstr; for(int ii=0; ii 0) { clock_t t1(clock()); // update id-maps int j=0; for(int i=1; i<=mesh.GetIdentifications().GetMaxNr(); i++) { if(mesh.GetIdentifications().GetType(i) == Identifications::PERIODIC) { mesh.GetIdentifications().GetMap(i,*idmaps[j],true); j++; } } // do the repair try { RepairBisection(mesh,bad_elts,isnewpoint,*this, pure_badness, max_worsening,uselocalworsening, idmaps); // repaired = true; repaired_once = true; } catch(NgException & ex) { PrintMessage(1,string("Problem: ") + ex.What()); } if (printmessage_importance>0) { ostringstream strstr; strstr << "Time for Repair: " << double(clock() - t1)/double(CLOCKS_PER_SEC) << endl << "bad elements after repair: " << bad_elts << endl; PrintMessage(1,strstr.str()); } if(quality_loss != NULL) Validate(mesh,bad_elts,pure_badness,1e100,uselocalworsening,quality_loss); if(idmaps.Size() == 0) UpdateEdgeMarks(mesh,idmaps); /* if(1==1) UpdateEdgeMarks(mesh,idmaps); else mesh.mglevels = 1; */ //mesh.ImproveMesh(); } } delete regt; for(int i=0; i & p1, const Point<3> & p2, double secpoint, int surfi, const PointGeomInfo & gi1, const PointGeomInfo & gi2, Point<3> & newp, PointGeomInfo & newgi) const { newp = p1+secpoint*(p2-p1); } void Refinement :: PointBetween (const Point<3> & p1, const Point<3> & p2, double secpoint, int surfi1, int surfi2, const EdgePointGeomInfo & ap1, const EdgePointGeomInfo & ap2, Point<3> & newp, EdgePointGeomInfo & newgi) const { //cout << "base class edge point between" << endl; newp = p1+secpoint*(p2-p1); } Vec<3> Refinement :: GetTangent (const Point<3> & p, int surfi1, int surfi2, const EdgePointGeomInfo & ap1) const { cerr << "Refinement::GetTangent not overloaded" << endl; return Vec<3> (0,0,0); } Vec<3> Refinement :: GetNormal (const Point<3> & p, int surfi1, const PointGeomInfo & gi) const { cerr << "Refinement::GetNormal not overloaded" << endl; return Vec<3> (0,0,0); } void Refinement :: ProjectToSurface (Point<3> & p, int surfi) const { if (printmessage_importance>0) cerr << "Refinement :: ProjectToSurface ERROR: no geometry set" << endl; }; void Refinement :: ProjectToEdge (Point<3> & p, int surfi1, int surfi2, const EdgePointGeomInfo & egi) const { cerr << "Refinement::ProjectToEdge not overloaded" << endl; } } netgen-6.2.1804/libsrc/meshing/secondorder.cpp0000644000175000017500000002644413272137567017742 0ustar kurtkurt #include #include "meshing.hpp" namespace netgen { void Refinement :: MakeSecondOrder (Mesh & mesh) const { const_cast (*this).MakeSecondOrder(mesh); } void Refinement :: MakeSecondOrder (Mesh & mesh) { /* Berlin, 2014: if we have curved surface elements, keep them ! */ mesh.ComputeNVertices(); // mesh.SetNP(mesh.GetNV()); mesh.SetNP(mesh.GetNP()); // setup multilevel-table INDEX_2_HASHTABLE between(mesh.GetNP() + 5); for (SurfaceElementIndex sei = 0; sei < mesh.GetNSE(); sei++) { const Element2d & el = mesh[sei]; static int betw_trig[3][3] = { { 1, 2, 3 }, { 0, 2, 4 }, { 0, 1, 5 } }; static int betw_quad6[2][3] = { { 0, 1, 4 }, { 3, 2, 5 } }; static int betw_quad8[4][3] = { { 0, 1, 4 }, { 3, 2, 5 }, { 0, 3, 6 }, { 1, 2, 7 } }; int onp = 0; int (*betw)[3] = NULL; switch (el.GetType()) { case TRIG6: { betw = betw_trig; onp = 3; break; } case QUAD6: { betw = betw_quad6; onp = 4; break; } case QUAD8: { betw = betw_quad8; onp = 4; break; } default: ; } if (betw) for (int j = 0; j < el.GetNP()-onp; j++) { int pi1 = el[betw[j][0]]; int pi2 = el[betw[j][1]]; INDEX_2 i2 = INDEX_2::Sort (pi1, pi2); between.Set (i2, el[onp+j]); } } bool thinlayers = 0; for (ElementIndex ei = 0; ei < mesh.GetNE(); ei++) if (mesh[ei].GetType() == PRISM || mesh[ei].GetType() == PRISM12) thinlayers = 1; int nseg = mesh.GetNSeg(); for (SegmentIndex si = 0; si < nseg; si++) { Segment & el = mesh.LineSegment(si); INDEX_2 i2 = INDEX_2::Sort (el[0], el[1]); if (between.Used(i2)) el[2] = between.Get(i2); else { Point<3> pb; EdgePointGeomInfo ngi; PointBetween (mesh.Point (el[0]), mesh.Point (el[1]), 0.5, el.surfnr1, el.surfnr2, el.epgeominfo[0], el.epgeominfo[1], pb, ngi); el[2] = mesh.AddPoint (pb, mesh.Point(el[0]).GetLayer(), EDGEPOINT); between.Set (i2, el[2]); } } // refine surface elements for (SurfaceElementIndex sei = 0; sei < mesh.GetNSE(); sei++) { int j; const Element2d & el = mesh.SurfaceElement(sei); int onp(0); Element2d newel(TRIG); newel.SetIndex (el.GetIndex()); static int betw_trig[3][3] = { { 1, 2, 3 }, { 0, 2, 4 }, { 0, 1, 5 } }; static int betw_quad6[2][3] = { { 0, 1, 4 }, { 3, 2, 5 } }; static int betw_quad8[4][3] = { { 0, 1, 4 }, { 3, 2, 5 }, { 0, 3, 6 }, { 1, 2, 7 } }; int (*betw)[3] = NULL; switch (el.GetType()) { case TRIG: case TRIG6: { betw = betw_trig; newel.SetType (TRIG6); onp = 3; break; } case QUAD: case QUAD6: case QUAD8: { if (thinlayers) { betw = betw_quad6; newel.SetType (QUAD6); } else { betw = betw_quad8; newel.SetType (QUAD8); } onp = 4; break; } default: PrintSysError ("Unhandled element in secondorder:", int(el.GetType())); } for (j = 0; j < onp; j++) newel[j] = el[j]; int nnp = newel.GetNP(); for (j = 0; j < nnp-onp; j++) { int pi1 = newel[betw[j][0]]; int pi2 = newel[betw[j][1]]; INDEX_2 i2 = INDEX_2::Sort (pi1, pi2); if (between.Used(i2)) newel[onp+j] = between.Get(i2); else { Point<3> pb; PointGeomInfo newgi; PointBetween (mesh.Point (pi1), mesh.Point (pi2), 0.5, mesh.GetFaceDescriptor(el.GetIndex ()).SurfNr(), el.GeomInfoPi (betw[j][0]+1), el.GeomInfoPi (betw[j][1]+1), pb, newgi); newel[onp+j] = mesh.AddPoint (pb, mesh.Point(pi1).GetLayer(), SURFACEPOINT); between.Set (i2, newel[onp+j]); } } mesh.SurfaceElement(sei) = newel; } // int i, j; // refine volume elements for (int i = 1; i <= mesh.GetNE(); i++) { const Element & el = mesh.VolumeElement(i); int onp = 0; Element newel(TET); newel.SetIndex (el.GetIndex()); static int betw_tet[6][3] = { { 0, 1, 4 }, { 0, 2, 5 }, { 0, 3, 6 }, { 1, 2, 7 }, { 1, 3, 8 }, { 2, 3, 9 } }; static int betw_prism[6][3] = { { 0, 2, 6 }, { 0, 1, 7 }, { 1, 2, 8 }, { 3, 5, 9 }, { 3, 4, 10 }, { 4, 5, 11 }, }; int (*betw)[3] = NULL; switch (el.GetType()) { case TET: case TET10: { betw = betw_tet; newel.SetType (TET10); onp = 4; break; } case PRISM: case PRISM12: { betw = betw_prism; newel.SetType (PRISM12); onp = 6; break; } default: PrintSysError ("MakeSecondOrder, illegal vol type ", int(el.GetType())); } for (int j = 1; j <= onp; j++) newel.PNum(j) = el.PNum(j); int nnp = newel.GetNP(); for (int j = 0; j < nnp-onp; j++) { INDEX_2 i2(newel[betw[j][0]], newel[betw[j][1]]); i2.Sort(); if (between.Used(i2)) newel.PNum(onp+1+j) = between.Get(i2); else { newel.PNum(onp+1+j) = mesh.AddPoint (Center (mesh.Point(i2.I1()), mesh.Point(i2.I2())), mesh.Point(i2.I1()).GetLayer(), INNERPOINT); between.Set (i2, newel.PNum(onp+1+j)); } } mesh.VolumeElement (i) = newel; } // makes problems after linear mesh refinement, since // 2nd order identifications are not removed // update identification tables for (int i = 1; i <= mesh.GetIdentifications().GetMaxNr(); i++) { Array identmap; mesh.GetIdentifications().GetMap (i, identmap); for (INDEX_2_HASHTABLE::Iterator it = between.Begin(); it != between.End(); it++) { INDEX_2 i2; PointIndex newpi; between.GetData (it, i2, newpi); INDEX_2 oi2(identmap.Get(i2.I1()), identmap.Get(i2.I2())); oi2.Sort(); if (between.Used (oi2)) { PointIndex onewpi = between.Get(oi2); mesh.GetIdentifications().Add (newpi, onewpi, i); } } /* for (int j = 1; j <= between.GetNBags(); j++) for (int k = 1; k <= between.GetBagSize(j); k++) { INDEX_2 i2; int newpi; between.GetData (j, k, i2, newpi); INDEX_2 oi2(identmap.Get(i2.I1()), identmap.Get(i2.I2())); oi2.Sort(); if (between.Used (oi2)) { int onewpi = between.Get(oi2); mesh.GetIdentifications().Add (newpi, onewpi, i); } } */ } // mesh.mglevels++; int oldsize = mesh.mlbetweennodes.Size(); mesh.mlbetweennodes.SetSize(mesh.GetNP()); for (int i = oldsize; i < mesh.GetNP(); i++) mesh.mlbetweennodes[i] = INDEX_2(0,0); /* for (i = 1; i <= between.GetNBags(); i++) for (j = 1; j <= between.GetBagSize(i); j++) { INDEX_2 oldp; int newp; between.GetData (i, j, oldp, newp); mesh.mlbetweennodes.Elem(newp) = oldp; } */ for (INDEX_2_HASHTABLE::Iterator it = between.Begin(); it != between.End(); it++) { mesh.mlbetweennodes[between.GetData (it)] = between.GetHash(it); } mesh.ComputeNVertices(); mesh.RebuildSurfaceElementLists(); // ValidateSecondOrder (mesh); } void Refinement :: ValidateSecondOrder (Mesh & mesh) { PrintMessage (3, "Validate mesh"); int np = mesh.GetNP(); int ne = mesh.GetNE(); // int i, j; Array parents(np); for (int i = 1; i <= np; i++) parents.Elem(i) = INDEX_2(0,0); for (int i = 1; i <= ne; i++) { const Element & el = mesh.VolumeElement(i); if (el.GetType() == TET10) { static int betweentab[6][3] = { { 1, 2, 5 }, { 1, 3, 6 }, { 1, 4, 7 }, { 2, 3, 8 }, { 2, 4, 9 }, { 3, 4, 10 } }; for (int j = 0; j < 6; j++) { int f1 = el.PNum (betweentab[j][0]); int f2 = el.PNum (betweentab[j][1]); int son = el.PNum (betweentab[j][2]); parents.Elem(son).I1() = f1; parents.Elem(son).I2() = f2; } } } ValidateRefinedMesh (mesh, parents); } void Refinement :: ValidateRefinedMesh (Mesh & mesh, Array & parents) { // int i, j, k; // homotopy method int ne = mesh.GetNE(); int cnttrials = 100; int wrongels = 0; for (int i = 1; i <= ne; i++) if (mesh.VolumeElement(i).CalcJacobianBadness (mesh.Points()) > 1e10) { wrongels++; mesh.VolumeElement(i).flags.badel = 1; } else mesh.VolumeElement(i).flags.badel = 0; double facok = 0; double factry; BitArray illegalels(ne); illegalels.Clear(); if (wrongels) { cout << "WARNING: " << wrongels << " illegal element(s) found" << endl; int np = mesh.GetNP(); Array > should(np); Array > can(np); for (int i = 1; i <= np; i++) { should.Elem(i) = can.Elem(i) = mesh.Point(i); } for (int i = 1; i <= parents.Size(); i++) { if (parents.Get(i).I1()) can.Elem(i) = Center (can.Elem(parents.Get(i).I1()), can.Elem(parents.Get(i).I2())); } BitArray boundp(np); boundp.Clear(); for (int i = 1; i <= mesh.GetNSE(); i++) { const Element2d & sel = mesh.SurfaceElement(i); for (int j = 1; j <= sel.GetNP(); j++) boundp.Set(sel.PNum(j)); } (*testout) << "bpoints:" << endl; for (int i = 1; i <= np; i++) if (boundp.Test(i)) (*testout) << i << endl; double lam = 0.5; while (facok < 1-1e-8 && cnttrials > 0) { lam *= 4; if (lam > 2) lam = 2; do { // cout << "trials: " << cnttrials << endl; lam *= 0.5; cnttrials--; cout << "lam = " << lam << endl; factry = lam + (1-lam) * facok; cout << "trying: " << factry << endl; for (int i = 1; i <= np; i++) if (boundp.Test(i)) { for (int j = 0; j < 3; j++) mesh.Point(i)(j) = lam * should.Get(i)(j) + (1-lam) * can.Get(i)(j); } else mesh.Point(i) = Point<3> (can.Get(i)); // (*testout) << "bad els: " << endl; wrongels = 0; for (int i = 1; i <= ne; i++) { if (!illegalels.Test(i) && mesh.VolumeElement(i). CalcJacobianBadness(mesh.Points()) > 1e10) { wrongels++; Element & el = mesh.VolumeElement(i); el.flags.badel = 1; if (lam < 1e-4) illegalels.Set(i); /* (*testout) << i << ": "; for (j = 1; j <= el.GetNP(); j++) (*testout) << el.PNum(j) << " "; (*testout) << endl; */ } else mesh.VolumeElement(i).flags.badel = 0; } cout << "wrongels = " << wrongels << endl; } while (wrongels && cnttrials > 0); mesh.CalcSurfacesOfNode(); MeshingParameters dummymp; mesh.ImproveMeshJacobian (dummymp, OPT_WORSTCASE); facok = factry; for (int i = 1; i <= np; i++) can.Elem(i) = mesh.Point(i); } } for (int i = 1; i <= ne; i++) { if (illegalels.Test(i)) { cout << "illegal element: " << i << endl; mesh.VolumeElement(i).flags.badel = 1; } else mesh.VolumeElement(i).flags.badel = 0; } /* if (cnttrials <= 0) { cerr << "ERROR: Sorry, illegal elements:" << endl; } */ } } netgen-6.2.1804/libsrc/meshing/meshing3.hpp0000644000175000017500000000433513272137567017150 0ustar kurtkurt#ifndef FILE_MESHING3 #define FILE_MESHING3 enum MESHING3_RESULT { MESHING3_OK = 0, MESHING3_GIVEUP = 1, MESHING3_NEGVOL = 2, MESHING3_OUTERSTEPSEXCEEDED = 3, MESHING3_TERMINATE = 4, MESHING3_BADSURFACEMESH = 5 }; /// 3d volume mesh generation class Meshing3 { /// current state of front AdFront3 * adfront; /// 3d generation rules Array rules; /// counts how often a rule is used Array ruleused, canuse, foundmap; /// describes, why a rule is not applied Array problems; /// tolerance criterion double tolfak; public: /// Meshing3 (const string & rulefilename); /// Meshing3 (const char ** rulep); /// virtual ~Meshing3 (); /// void LoadRules (const char * filename, const char ** prules); /// MESHING3_RESULT GenerateMesh (Mesh & mesh, const MeshingParameters & mp); /// int ApplyRules (Array & lpoints, Array & allowpoint, Array & lfaces, INDEX lfacesplit, INDEX_2_HASHTABLE & connectedpairs, Array & elements, Array & delfaces, int tolerance, double sloppy, int rotind1, float & retminerr); /// PointIndex AddPoint (const Point3d & p, PointIndex globind); /// void AddBoundaryElement (const Element2d & elem); /// void AddBoundaryElement (const MiniElement2d & elem); /// int AddConnectedPair (const INDEX_2 & pair); /// void BlockFill (Mesh & mesh, double gh); /// void BlockFillLocalH (Mesh & mesh, const MeshingParameters & mp); /// uses points of adfront, and puts new elements into mesh void Delaunay (Mesh & mesh, int domainnr, const MeshingParameters & mp); /// friend class PlotVolMesh; /// friend void TestRules (); }; /// status of mesh generation class MeshingStat3d { public: /// MeshingStat3d (); /// int cntsucc; /// int cnttrials; /// int cntelem; /// int nff; /// int qualclass; /// double vol0; /// double vol; /// double h; /// int problemindex; }; /* template extern int FindInnerPoint (POINTArray & grouppoints, FACEArray & groupfaces, Point3d & p); */ #endif netgen-6.2.1804/libsrc/meshing/meshfunc.hpp0000644000175000017500000000210713272137567017236 0ustar kurtkurt#ifndef FILE_MESHFUNC #define FILE_MESHFUNC /**************************************************************************/ /* File: meshfunc.hpp */ /* Author: Johannes Gerstmayr, Joachim Schoeberl */ /* Date: 26. Jan. 98 */ /**************************************************************************/ /* Functions for mesh-generations strategies */ class Mesh; // class CSGeometry; /// Build tet-mesh MESHING3_RESULT MeshVolume (MeshingParameters & mp, Mesh& mesh3d); /// Build mixed-element mesh // MESHING3_RESULT MeshMixedVolume (MeshingParameters & mp, Mesh& mesh3d); /// Optimize tet-mesh MESHING3_RESULT OptimizeVolume (MeshingParameters & mp, Mesh& mesh3d); // const CSGeometry * geometry = NULL); void RemoveIllegalElements (Mesh & mesh3d); enum MESHING_STEP { MESHCONST_ANALYSE = 1, MESHCONST_MESHEDGES = 2, MESHCONST_MESHSURFACE = 3, MESHCONST_OPTSURFACE = 4, MESHCONST_MESHVOLUME = 5, MESHCONST_OPTVOLUME = 6 }; #endif netgen-6.2.1804/libsrc/meshing/improve2.hpp0000644000175000017500000000541413272137567017175 0ustar kurtkurt#ifndef FILE_IMPROVE2 #define FILE_IMPROVE2 /// class MeshOptimize2d { int faceindex; int improveedges; double metricweight; int writestatus; public: /// MeshOptimize2d (); virtual ~MeshOptimize2d() { ; } /// void ImproveMesh (Mesh & mesh2d, const MeshingParameters & mp); void ImproveMeshJacobian (Mesh & mesh2d, const MeshingParameters & mp); void ImproveVolumeMesh (Mesh & mesh); void ProjectBoundaryPoints(Array & surfaceindex, const Array* > & from, Array* > & dest); void EdgeSwapping (Mesh & mesh, int usemetric); void CombineImprove (Mesh & mesh); void GenericImprove (Mesh & mesh); void SetFaceIndex (int fi) { faceindex = fi; } void SetImproveEdges (int ie) { improveedges = ie; } void SetMetricWeight (double mw) { metricweight = mw; } void SetWriteStatus (int ws) { writestatus = ws; } /// virtual void SelectSurfaceOfPoint (const Point<3> & p, const PointGeomInfo & gi); /// virtual void ProjectPoint (INDEX /* surfind */, Point<3> & /* p */) const { }; /// project point, use gi as initial value, and compute new gi virtual int ProjectPointGI (INDEX surfind, Point<3> & p, PointGeomInfo & gi) const { ProjectPoint (surfind, p); return CalcPointGeomInfo (surfind, gi, p); } /// virtual void ProjectPoint2 (INDEX /* surfind */, INDEX /* surfind2 */, Point<3> & /* p */) const { }; /// liefert zu einem 3d-Punkt die geominfo (Dreieck) und liefert 1, wenn erfolgreich, /// 0, wenn nicht (Punkt ausserhalb von chart) virtual int CalcPointGeomInfo(PointGeomInfo& gi, const Point<3> & /*p3*/) const { gi.trignum = 1; return 1;}; virtual int CalcPointGeomInfo(int /* surfind */, PointGeomInfo& gi, const Point<3> & p3) const { return CalcPointGeomInfo (gi, p3); } /// virtual void GetNormalVector(INDEX surfind, const Point<3> & p, PointGeomInfo & gi, Vec<3> & n) const; virtual void GetNormalVector(INDEX surfind, const Point<3> & p, Vec<3> & n) const; void CheckMeshApproximation (Mesh & mesh); /// friend class Opti2SurfaceMinFunction; /// friend class Opti2EdgeMinFunction; /// friend double Opti2FunctionValueGrad (const Vector & x, Vector & grad); /// friend double Opti2EdgeFunctionValueGrad (const Vector & x, Vector & grad); }; extern void CalcTriangleBadness (double x2, double x3, double y3, double metricweight, double h, double & badness, double & g1x, double & g1y); extern double CalcTriangleBadness (const Point<3> & p1, const Point<3> & p2, const Point<3> & p3, double metricweight, double h); extern double CalcTriangleBadness (const Point<3> & p1, const Point<3> & p2, const Point<3> & p3, const Vec<3> & n, double metricweight, double h); #endif netgen-6.2.1804/libsrc/meshing/bcfunctions.cpp0000644000175000017500000003640013272137567017741 0ustar kurtkurt #include #include #include "bcfunctions.hpp" namespace netgen { // Default colour to be used for boundary condition number "0" #define DEFAULT_R 0.0 #define DEFAULT_G 1.0 #define DEFAULT_B 0.0 // Boundary condition number to use if a face does not have a // colour assigned to it, or if the colour is the above defined // default colour #define DEFAULT_BCNUM 1 // Default tolerance for colour matching (using Euclidean distance) #define DEFAULT_EPS 2.5e-05 /*! Philippose - 11/07/2009 Function to check if two RGB colours are equal Note#1: Currently uses unweighted Euclidean Distance for colour matching. Note#2: The tolerance used for deciding whether two colours match is defined as "eps" and is currently 2.5e-5 (for square of distance) */ bool ColourMatch(Vec3d col1, Vec3d col2, double eps) { if(eps <= 0.0) eps = DEFAULT_EPS; bool colmatch = false; if(Dist2(col1,col2) < eps) colmatch = true; return colmatch; } /*! Philippose - 11/07/2009 Function to create a list of all the unique colours available in a given mesh */ void GetFaceColours(Mesh & mesh, Array & face_colours) { face_colours.SetSize(1); face_colours.Elem(1) = mesh.GetFaceDescriptor(1).SurfColour(); for(int i = 1; i <= mesh.GetNFD(); i++) { Vec3d face_colour = mesh.GetFaceDescriptor(i).SurfColour(); bool col_found = false; for(int j = 1; j <= face_colours.Size(); j++) { if(ColourMatch(face_colours.Elem(j),face_colour)) { col_found = true; break; } } if(!col_found) face_colours.Append(face_colour); } if(printmessage_importance >= 3) { cout << endl << "-------- Face Colours --------" << endl; for( int i = 1; i <= face_colours.Size(); i++) { cout << face_colours.Elem(i) << endl; } cout << "------------------------------" << endl; } } /*! Philippose - 11/07/2009 Assign boundary condition numbers based on a user defined colour profile file. The default profile file is "netgen.ocf" If the mesh contains colours not defined in the profile, netgen automatically starts assigning each new colour a new boundary condition number starting from the highest boundary condition number specified in the profile file. */ void AutoColourAlg_UserProfile(Mesh & mesh, ifstream & ocf) { char ocf_inp[100]; bool header_found = false; // Number of colour specifications in the // user profile file int numentries = 0; while((ocf.good()) && (!header_found)) { ocf >> ocf_inp; if(strcmp(ocf_inp,"boundary_colours") == 0) header_found = true; } if(!header_found) { ocf.close(); throw NgException("AutoColourAlg_UserProfile: Invalid or empty Boundary Colour Profile file\n"); return; } // Read in the number of entries from file ocf >> numentries; if(numentries > 0) { if(!ocf.good()) { ocf.close(); throw NgException("AutoColourAlg_UserProfile: Invalid or empty Boundary Colour Profile file\n"); return; } PrintMessage(3, "Number of colour entries: ", numentries); } else { ocf.close(); PrintMessage(3, "AutoColourAlg_UserProfile: No Boundary Colour entries found.... no changes made!"); return; } // Arrays to hold the specified RGB colour triplets as well // as the associated boundary condition number Array bc_colours(numentries); Array bc_num(numentries); Array bc_used(numentries); // Actually read in the data from the file for(int i = 1; i <= numentries; i++) { int bcnum; // double col_red, col_green, col_blue; ocf >> bcnum; // Boundary condition number DEFAULT_BCNUM is reserved for // faces which have the default colour Green (0.0,1.0,0.0) // To prevent confusion, no boundary numbery below this default // are permitted if(bcnum < (DEFAULT_BCNUM + 1)) bcnum = DEFAULT_BCNUM+1; bc_num.Elem(i) = bcnum; bc_used.Elem(i) = false; ocf >> bc_colours.Elem(i).X() >> bc_colours.Elem(i).Y() >> bc_colours.Elem(i).Z(); if(!ocf.good()) { ocf.close(); throw NgException("Boundary Colour file error: Number of entries do not match specified list size!!\n"); return; } // Bound checking of the values // The RGB values should be between 0.0 and 1.0 if(bc_colours.Elem(bcnum).X() < 0.0) bc_colours.Elem(bcnum).X() = 0.0; if(bc_colours.Elem(bcnum).X() > 1.0) bc_colours.Elem(bcnum).X() = 1.0; if(bc_colours.Elem(bcnum).Y() < 0.0) bc_colours.Elem(bcnum).X() = 0.0; if(bc_colours.Elem(bcnum).Y() > 1.0) bc_colours.Elem(bcnum).X() = 1.0; if(bc_colours.Elem(bcnum).Z() < 0.0) bc_colours.Elem(bcnum).X() = 0.0; if(bc_colours.Elem(bcnum).Z() > 1.0) bc_colours.Elem(bcnum).X() = 1.0; } PrintMessage(3, "Successfully loaded Boundary Colour Profile file...."); ocf.close(); // Find the highest boundary condition number in the list // All colours in the geometry which are not specified in the // list will be given boundary condition numbers higher than this // number int max_bcnum = DEFAULT_BCNUM; for(int i = 1; i <= bc_num.Size();i++) { if(bc_num.Elem(i) > max_bcnum) max_bcnum = bc_num.Elem(i); } PrintMessage(3, "Highest boundary number in list = ",max_bcnum); Array all_colours; // Extract all the colours to see how many there are GetFaceColours(mesh,all_colours); PrintMessage(3,"\nNumber of colours defined in Mesh: ", all_colours.Size()); if(all_colours.Size() == 0) { PrintMessage(3,"No colour data detected in Mesh... no changes made!"); return; } int nfd = mesh.GetNFD(); for(int face_index = 1; face_index <= nfd; face_index++) { // Temporary container for individual face colours Vec3d face_colour; // Get the colour of the face being currently processed face_colour = mesh.GetFaceDescriptor(face_index).SurfColour(); if(!ColourMatch(face_colour,Vec3d(DEFAULT_R,DEFAULT_G,DEFAULT_B))) { // Boolean variable to check if the boundary condition was applied // or not... not applied would imply that the colour of the face // does not exist in the list of colours in the profile file bool bc_assigned = false; for(int col_index = 1; col_index <= bc_colours.Size(); col_index++) { if((ColourMatch(face_colour,bc_colours.Elem(col_index))) && (!bc_assigned)) { mesh.GetFaceDescriptor(face_index).SetBCProperty(bc_num.Elem(col_index)); bc_used.Elem(col_index) = true; bc_assigned = true; break; } } // If the colour was not found in the list, add it to the list, and assign // the next free boundary condition number to it if(!bc_assigned) { max_bcnum++; bc_num.Append(max_bcnum); bc_colours.Append(face_colour); bc_used.Append(true); mesh.GetFaceDescriptor(face_index).SetBCProperty(max_bcnum); } } else { // Set the boundary condition number to the default one mesh.GetFaceDescriptor(face_index).SetBCProperty(DEFAULT_BCNUM); } } // User Information of the results of the operation Vec3d ref_colour(0.0,1.0,0.0); PrintMessage(3,"Colour based Boundary Condition Property details:"); for(int bc_index = 0; bc_index <= bc_num.Size(); bc_index++) { if(bc_index > 0) ref_colour = bc_colours.Elem(bc_index); if(bc_index == 0) { PrintMessage(3, "BC Property: ",DEFAULT_BCNUM); PrintMessage(3, " RGB Face Colour = ",ref_colour,"","\n"); } else if(bc_used.Elem(bc_index)) { PrintMessage(3, "BC Property: ",bc_num.Elem(bc_index)); PrintMessage(3, " RGB Face Colour = ",ref_colour,"","\n"); } } } /*! Philippose - 11/07/2009 Assign boundary condition numbers based on the colours assigned to each face in the mesh using an automated algorithm. The particular algorithm used has been briefly explained in the header file "occauxfunctions.hpp" */ void AutoColourAlg_Sorted(Mesh & mesh) { Array all_colours; Array faces_sorted; Array colours_sorted; // Extract all the colours to see how many there are GetFaceColours(mesh,all_colours); // Delete the default colour from the list since it will be accounted // for automatically for(int i = 1; i <= all_colours.Size(); i++) { if(ColourMatch(all_colours.Elem(i),Vec3d(DEFAULT_R,DEFAULT_G,DEFAULT_B))) { all_colours.DeleteElement(i); break; } } PrintMessage(3,"\nNumber of colours defined in Mesh: ", all_colours.Size()); if(all_colours.Size() == 0) { PrintMessage(3,"No colour data detected in Mesh... no changes made!"); return; } // One more slot than the number of colours are required, to // account for individual faces which have no colour data // assigned to them in the CAD software faces_sorted.SetSize(all_colours.Size()+1); colours_sorted.SetSize(all_colours.Size()+1); faces_sorted = 0; // Slave Array to identify the colours the faces were assigned to, // after the bubble sort routine to sort the automatic boundary // identifiers according to the number of surface mesh elements // of a given colour for(int i = 0; i <= all_colours.Size(); i++) colours_sorted[i] = i; // Used to hold the number of surface elements without any OCC // colour definition int no_colour_faces = 0; // Index in the faces array assigned to faces without any // or the default colour definition int no_colour_index = 0; int nfd = mesh.GetNFD(); // Extract the number of surface elements having a given colour // And save this number into an array for later sorting for(int face_index = 1; face_index <= nfd; face_index++) { Array se_face; mesh.GetSurfaceElementsOfFace(face_index, se_face); Vec3d face_colour; face_colour = mesh.GetFaceDescriptor(face_index).SurfColour(); if(!ColourMatch(face_colour,Vec3d(DEFAULT_R,DEFAULT_G,DEFAULT_B))) { for(int i = 1; i <= all_colours.Size(); i++) { if(ColourMatch(face_colour, all_colours.Elem(i))) { faces_sorted[i] = faces_sorted[i] + se_face.Size(); } } } else { // Add the number of surface elements without any colour // definition separately no_colour_faces = no_colour_faces + se_face.Size(); } } // Sort the face colour indices according to the number of surface // mesh elements which have a specific colour BubbleSort(faces_sorted,colours_sorted); // Now update the array position assigned for surface elements // without any colour definition with the number of elements faces_sorted[no_colour_index] = no_colour_faces; // Now actually assign the BC Property to the respective faces for(int face_index = 1; face_index <= nfd; face_index++) { Vec3d face_colour; face_colour = mesh.GetFaceDescriptor(face_index).SurfColour(); if(!ColourMatch(face_colour,Vec3d(DEFAULT_R,DEFAULT_G,DEFAULT_B))) { for(int i = 0; i < colours_sorted.Size(); i++) { Vec3d ref_colour; if(i != no_colour_index) ref_colour = all_colours.Elem(colours_sorted[i]); if(ColourMatch(face_colour, ref_colour)) { mesh.GetFaceDescriptor(face_index).SetBCProperty(i + DEFAULT_BCNUM); } } } else { mesh.GetFaceDescriptor(face_index).SetBCProperty(DEFAULT_BCNUM); } PrintMessage(4,"Face number: ",face_index," ; BC Property = ",mesh.GetFaceDescriptor(face_index).BCProperty()); } // User Information of the results of the operation Vec3d ref_colour(0.0,1.0,0.0); PrintMessage(3,"Colour based Boundary Condition Property details:"); for(int i = 0; i < faces_sorted.Size(); i++) { if(colours_sorted[i] > 0) ref_colour = all_colours.Elem(colours_sorted[i]); PrintMessage(3, "BC Property: ",i + DEFAULT_BCNUM); PrintMessage(3, " Nr. of Surface Elements = ", faces_sorted[i]); PrintMessage(3, " Colour Index = ", colours_sorted[i]); PrintMessage(3, " RGB Face Colour = ",ref_colour,"","\n"); } } /*! Philippose - 13/07/2009 Main function implementing automated assignment of Boundary Condition numbers based on face colours This functionality is currently implemtented at the mesh level, and hence allows colour based assignment of boundary conditions for any geometry type within netgen which supports face colours */ void AutoColourBcProps(Mesh & mesh, const char * bccolourfile) { // Go directly to the alternate algorithm if no colour profile file was specified if(!bccolourfile) { PrintMessage(1,"AutoColourBcProps: Using Automatic Colour based boundary property assignment algorithm"); AutoColourAlg_Sorted(mesh); } else { ifstream ocf(bccolourfile); // If there was an error opening the Colour profile file, jump to the alternate // algorithm after printing a message if(!ocf) { PrintMessage(1,"AutoColourBcProps: Error loading Boundary Colour Profile file ", bccolourfile, " ....","Switching to Automatic Assignment algorithm!"); AutoColourAlg_Sorted(mesh); } // If the file opens successfully, call the function which assigns boundary conditions // based on the colour profile file else { PrintMessage(1, "AutoColourBcProps: Using Boundary Colour Profile file: "); PrintMessage(1, " ", bccolourfile); AutoColourAlg_UserProfile(mesh, ocf); // Make sure the file is closed before exiting the function if(ocf.is_open()) { ocf.close(); } } } } } netgen-6.2.1804/libsrc/meshing/findip2.hpp0000644000175000017500000000420213272137567016757 0ustar kurtkurt// find inner point template inline int FindInnerPoint2 (POINTArray & points, FACEArray & faces, Point3d & p) { static int timer = NgProfiler::CreateTimer ("FindInnerPoint2"); NgProfiler::RegionTimer reg (timer); Array a; Array c; Mat<3> m, inv; Vec<3> rs, x, pmin; int nf = faces.Size(); a.SetSize (nf); c.SetSize (nf); for (int i = 0; i < nf; i++) { Point3d p1 = points.Get(faces[i][0]); a[i] = Cross (points.Get(faces[i][1]) - p1, points.Get(faces[i][2]) - p1); a[i] /= a[i].Length(); c[i] = - (a[i].X() * p1.X() + a[i].Y() * p1.Y() + a[i].Z() * p1.Z()); } x = 0; double hmax = 0; for (int i = 0; i < nf; i++) { const Element2d & el = faces[i]; for (int j = 1; j <= 3; j++) { double hi = Dist (points.Get(el.PNumMod(j)), points.Get(el.PNumMod(j+1))); if (hi > hmax) hmax = hi; } } double fmin = 0; for (int i1 = 1; i1 <= nf; i1++) for (int i2 = i1+1; i2 <= nf; i2++) for (int i3 = i2+1; i3 <= nf; i3++) for (int i4 = i3+1; i4 <= nf; i4++) { m(0, 0) = a.Get(i1).X() - a.Get(i2).X(); m(0, 1) = a.Get(i1).Y() - a.Get(i2).Y(); m(0, 2) = a.Get(i1).Z() - a.Get(i2).Z(); rs(0) = c.Get(i2) - c.Get(i1); m(1, 0) = a.Get(i1).X() - a.Get(i3).X(); m(1, 1) = a.Get(i1).Y() - a.Get(i3).Y(); m(1, 2) = a.Get(i1).Z() - a.Get(i3).Z(); rs(1) = c.Get(i3) - c.Get(i1); m(2, 0) = a.Get(i1).X() - a.Get(i4).X(); m(2, 1) = a.Get(i1).Y() - a.Get(i4).Y(); m(2, 2) = a.Get(i1).Z() - a.Get(i4).Z(); rs(2) = c.Get(i4) - c.Get(i1); if (fabs (Det (m)) > 1e-10) { CalcInverse (m, inv); x = inv * rs; double f = -1e10; for (int i = 0; i < nf; i++) { double hd = x(0) * a[i].X() + x(1) * a[i].Y() + x(2) * a[i].Z() + c[i]; if (hd > f) f = hd; if (hd > fmin) break; } if (f < fmin) { fmin = f; pmin = x; } } } p = Point3d (pmin(0), pmin(1), pmin(2)); (*testout) << "fmin = " << fmin << endl; return (fmin < -1e-3 * hmax); } netgen-6.2.1804/libsrc/meshing/topology.hpp0000644000175000017500000003477413272137567017321 0ustar kurtkurt#ifndef TOPOLOGY #define TOPOLOGY /**************************************************************************/ /* File: topology.hh */ /* Author: Joachim Schoeberl */ /* Date: 27. Apr. 01 */ /**************************************************************************/ /* Mesh topology (Elements, Faces, Edges, Vertices */ namespace netgen { struct T_EDGE { // int orient:1; int nr; // 0-based }; struct T_FACE { // int forient:3; int fnr; // 0-based }; template struct FixArray { T vals[S]; T & operator[] (size_t i) { return vals[i]; } T operator[] (size_t i) const { return vals[i]; } }; class MeshTopology { const Mesh * mesh; bool buildedges; bool buildfaces; Array edge2vert; Array face2vert; /* Array edges; Array faces; Array surfedges; */ Array> edges; Array> faces; Array> surfedges; Array segedges; Array surffaces; Array surf2volelement; Array face2surfel; TABLE vert2element; TABLE vert2surfelement; TABLE vert2segment; TABLE vert2pointelement; int timestamp; public: int GetNSurfedges() const {return surfedges.Size();} MeshTopology () = default; MeshTopology (const MeshTopology & top) = default; MeshTopology (MeshTopology && top) = default; MeshTopology (const Mesh & amesh); ~MeshTopology (); MeshTopology & operator= (const MeshTopology & top) = default; MeshTopology & operator= (MeshTopology && top) = default; void SetBuildEdges (bool be) { buildedges = be; } void SetBuildFaces (bool bf) { buildfaces = bf; } bool HasEdges () const { return buildedges; } bool HasFaces () const { return buildfaces; } void Update(TaskManager tm = &DummyTaskManager, Tracer tracer = &DummyTracer); int GetNEdges () const { return edge2vert.Size(); } int GetNFaces () const { return face2vert.Size(); } static inline short int GetNVertices (ELEMENT_TYPE et); static inline short int GetNPoints (ELEMENT_TYPE et); static inline short int GetNEdges (ELEMENT_TYPE et); static inline short int GetNFaces (ELEMENT_TYPE et); static const Point3d * GetVertices (ELEMENT_TYPE et); inline static const ELEMENT_EDGE * GetEdges1 (ELEMENT_TYPE et); inline static const ELEMENT_EDGE * GetEdges0 (ELEMENT_TYPE et); inline static const ELEMENT_FACE * GetFaces1 (ELEMENT_TYPE et); inline static const ELEMENT_FACE * GetFaces0 (ELEMENT_TYPE et); int GetSegmentEdge (int segnr) const { return segedges[segnr-1].nr+1; } int GetEdge (SegmentIndex segnr) const { return segedges[segnr].nr; } void GetSegmentEdge (int segnr, int & enr, int & orient) const { enr = segedges.Get(segnr).nr+1; // orient = segedges.Get(segnr).orient; orient = GetSegmentEdgeOrientation(segnr); } void GetElementEdges (int elnr, Array & edges) const; void GetElementFaces (int elnr, Array & faces, bool withorientation = false) const; void GetElementEdgeOrientations (int elnr, Array & eorient) const; void GetElementFaceOrientations (int elnr, Array & forient) const; int GetElementEdges (int elnr, int * edges, int * orient) const; int GetElementFaces (int elnr, int * faces, int * orient) const; int GetElementEdgeOrientation (int elnr, int locedgenr) const; // old style int GetElementFaceOrientation (int elnr, int locfacenr) const; // old style int GetSurfaceElementEdgeOrientation (int elnr, int locedgenr) const; // old style int GetSurfaceElementFaceOrientation2 (int elnr) const; // old style int GetSegmentEdgeOrientation (int elnr) const; // old style void GetFaceVertices (int fnr, Array & vertices) const; void GetFaceVertices (int fnr, int * vertices) const; void GetEdgeVertices (int enr, int & v1, int & v2) const; void GetEdgeVertices (int enr, PointIndex & v1, PointIndex & v2) const; const int * GetEdgeVerticesPtr (int enr) const { return &edge2vert[enr][0]; } const int * GetFaceVerticesPtr (int fnr) const { return &face2vert[fnr][0]; } void GetFaceEdges (int fnr, Array & edges, bool withorientation = false) const; ELEMENT_TYPE GetFaceType (int fnr) const { return (face2vert.Get(fnr)[3] == 0) ? TRIG : QUAD; } void GetSurfaceElementEdges (int elnr, Array & edges) const; int GetSurfaceElementFace (int elnr) const; void GetSurfaceElementEdgeOrientations (int elnr, Array & eorient) const; int GetSurfaceElementFaceOrientation (int elnr) const; void GetEdges (SurfaceElementIndex elnr, Array & edges) const; int GetFace (SurfaceElementIndex elnr) const { return surffaces[elnr].fnr; } int GetSurfaceElementEdges (int elnr, int * edges, int * orient) const; const T_EDGE * GetElementEdgesPtr (int elnr) const { return &edges[elnr][0]; } const T_EDGE * GetSurfaceElementEdgesPtr (int selnr) const { return &surfedges[selnr][0]; } const T_EDGE * GetSegmentElementEdgesPtr (int selnr) const { return &segedges[selnr]; } const T_FACE * GetElementFacesPtr (int elnr) const { return &faces[elnr][0]; } const T_FACE * GetSurfaceElementFacesPtr (int selnr) const { return &surffaces[selnr]; } void GetSurface2VolumeElement (int selnr, int & elnr1, int & elnr2) const { elnr1 = surf2volelement.Get(selnr)[0]; elnr2 = surf2volelement.Get(selnr)[1]; } int GetFace2SurfaceElement (int fnr) const { return face2surfel[fnr-1]; } void GetVertexElements (int vnr, Array & elements) const; FlatArray GetVertexElements (int vnr) const { return vert2element[vnr]; } void GetVertexSurfaceElements( int vnr, Array& elements ) const; FlatArray GetVertexSurfaceElements (int vnr) const { return vert2surfelement[vnr]; } FlatArray GetVertexSegments (int vnr) const { return vert2segment[vnr]; } FlatArray GetVertexPointElements (int vnr) const { return vert2pointelement[vnr]; } int GetVerticesEdge ( int v1, int v2) const; void GetSegmentVolumeElements ( int segnr, Array & els ) const; void GetSegmentSurfaceElements ( int segnr, Array & els ) const; }; inline short int MeshTopology :: GetNVertices (ELEMENT_TYPE et) { switch (et) { case SEGMENT: case SEGMENT3: return 2; case TRIG: case TRIG6: return 3; case QUAD: case QUAD6: case QUAD8: return 4; case TET: case TET10: return 4; case PYRAMID: return 5; case PRISM: case PRISM12: return 6; case HEX: return 8; // default: // cerr << "Ng_ME_GetNVertices, illegal element type " << et << endl; } return 0; } inline short int MeshTopology :: GetNPoints (ELEMENT_TYPE et) { switch (et) { case SEGMENT: return 2; case SEGMENT3: return 3; case TRIG: return 3; case TRIG6: return 6; case QUAD: case QUAD6: case QUAD8: return 4; case TET: return 4; case TET10: return 10; case PYRAMID: return 5; case PRISM: case PRISM12: return 6; case HEX: return 8; // default: // cerr << "Ng_ME_GetNVertices, illegal element type " << et << endl; } return 0; } inline short int MeshTopology :: GetNEdges (ELEMENT_TYPE et) { __assume(et >= SEGMENT && et <= HEX); switch (et) { case SEGMENT: case SEGMENT3: return 1; case TRIG: case TRIG6: return 3; case QUAD: case QUAD6: case QUAD8: return 4; case TET: case TET10: return 6; case PYRAMID: return 8; case PRISM: case PRISM12: return 9; case HEX: return 12; default: return 0; // default: // cerr << "Ng_ME_GetNEdges, illegal element type " << et << endl; } // return 0; } inline short int MeshTopology :: GetNFaces (ELEMENT_TYPE et) { __assume(et >= SEGMENT && et <= HEX); switch (et) { case SEGMENT: case SEGMENT3: return 0; case TRIG: case TRIG6: return 1; case QUAD: case QUAD6: case QUAD8: return 1; case TET: case TET10: return 4; case PYRAMID: return 5; case PRISM: case PRISM12: return 5; case HEX: return 6; default: return -99; // default: // cerr << "Ng_ME_GetNVertices, illegal element type " << et << endl; } } const ELEMENT_EDGE * MeshTopology :: GetEdges1 (ELEMENT_TYPE et) { static ELEMENT_EDGE segm_edges[1] = { { 1, 2 }}; static ELEMENT_EDGE trig_edges[3] = { { 3, 1 }, { 2, 3 }, { 1, 2 }}; static ELEMENT_EDGE quad_edges[4] = { { 1, 2 }, { 3, 4 }, { 4, 1 }, { 2, 3 }}; static ELEMENT_EDGE tet_edges[6] = { { 4, 1 }, { 4, 2 }, { 4, 3 }, { 1, 2 }, { 1, 3 }, { 2, 3 }}; static ELEMENT_EDGE prism_edges[9] = { { 3, 1 }, { 1, 2 }, { 3, 2 }, { 6, 4 }, { 4, 5 }, { 6, 5 }, { 3, 6 }, { 1, 4 }, { 2, 5 }}; static ELEMENT_EDGE pyramid_edges[8] = { { 1, 2 }, { 2, 3 }, { 1, 4 }, { 4, 3 }, { 1, 5 }, { 2, 5 }, { 3, 5 }, { 4, 5 }}; static ELEMENT_EDGE hex_edges[12] = { { 1, 2 }, { 3, 4 }, { 4, 1 }, { 2, 3 }, { 5, 6 }, { 7, 8 }, { 8, 5 }, { 6, 7 }, { 1, 5 }, { 2, 6 }, { 3, 7 }, { 4, 8 }, }; switch (et) { case SEGMENT: case SEGMENT3: return segm_edges; case TRIG: case TRIG6: return trig_edges; case QUAD: case QUAD6: case QUAD8: return quad_edges; case TET: case TET10: return tet_edges; case PYRAMID: return pyramid_edges; case PRISM: case PRISM12: return prism_edges; case HEX: return hex_edges; // default: // cerr << "Ng_ME_GetEdges, illegal element type " << et << endl; } return 0; } const ELEMENT_EDGE * MeshTopology :: GetEdges0 (ELEMENT_TYPE et) { static ELEMENT_EDGE segm_edges[1] = { { 0, 1 }}; static ELEMENT_EDGE trig_edges[3] = { { 2, 0 }, { 1, 2 }, { 0, 1 }}; static ELEMENT_EDGE quad_edges[4] = { { 0, 1 }, { 2, 3 }, { 3, 0 }, { 1, 2 }}; static ELEMENT_EDGE tet_edges[6] = { { 3, 0 }, { 3, 1 }, { 3, 2 }, { 0, 1 }, { 0, 2 }, { 1, 2 }}; static ELEMENT_EDGE prism_edges[9] = { { 2, 0 }, { 0, 1 }, { 2, 1 }, { 5, 3 }, { 3, 4 }, { 5, 4 }, { 2, 5 }, { 0, 3 }, { 1, 4 }}; static ELEMENT_EDGE pyramid_edges[8] = { { 0, 1 }, { 1, 2 }, { 0, 3 }, { 3, 2 }, { 0, 4 }, { 1, 4 }, { 2, 4 }, { 3, 4 }}; static ELEMENT_EDGE hex_edges[12] = { { 0, 1 }, { 2, 3 }, { 3, 0 }, { 1, 2 }, { 4, 5 }, { 6, 7 }, { 7, 4 }, { 5, 6 }, { 0, 4 }, { 1, 5 }, { 2, 6 }, { 3, 7 }, }; switch (et) { case SEGMENT: case SEGMENT3: return segm_edges; case TRIG: case TRIG6: return trig_edges; case QUAD: case QUAD6: case QUAD8: return quad_edges; case TET: case TET10: return tet_edges; case PYRAMID: return pyramid_edges; case PRISM: case PRISM12: return prism_edges; case HEX: return hex_edges; // default: // cerr << "Ng_ME_GetEdges, illegal element type " << et << endl; } return 0; } inline const ELEMENT_FACE * MeshTopology :: GetFaces1 (ELEMENT_TYPE et) { static const ELEMENT_FACE trig_faces[1] = { { 1, 2, 3, 0 } }; static const ELEMENT_FACE quad_faces[1] = { { 1, 2, 3, 4 } }; static const ELEMENT_FACE tet_faces[4] = { { 4, 2, 3, 0 }, { 4, 3, 1, 0 }, { 4, 1, 2, 0 }, { 1, 3, 2, 0 } }; static const ELEMENT_FACE prism_faces[5] = { { 1, 3, 2, 0 }, { 4, 5, 6, 0 }, { 3, 1, 4, 6 }, { 1, 2, 5, 4 }, { 2, 3, 6, 5 } }; static const ELEMENT_FACE pyramid_faces[5] = { { 1, 2, 5, 0 }, { 2, 3, 5, 0 }, { 3, 4, 5, 0 }, { 4, 1, 5, 0 }, { 1, 4, 3, 2 } }; static const ELEMENT_FACE hex_faces[6] = { { 1, 4, 3, 2 }, { 5, 6, 7, 8 }, { 1, 2, 6, 5 }, { 2, 3, 7, 6 }, { 3, 4, 8, 7 }, { 4, 1, 5, 8 } }; switch (et) { case TRIG: case TRIG6: return trig_faces; case QUAD: case QUAD6: case QUAD8: return quad_faces; case TET: case TET10: return tet_faces; case PRISM: case PRISM12: return prism_faces; case PYRAMID: return pyramid_faces; case SEGMENT: case SEGMENT3: case HEX: return hex_faces; // default: // cerr << "Ng_ME_GetVertices, illegal element type " << et << endl; } return 0; } inline const ELEMENT_FACE * MeshTopology :: GetFaces0 (ELEMENT_TYPE et) { static const ELEMENT_FACE trig_faces[1] = { { 0, 1, 2, -1 } }; static const ELEMENT_FACE quad_faces[1] = { { 0, 1, 2, 3 } }; static const ELEMENT_FACE tet_faces[4] = { { 3, 1, 2, -1 }, { 3, 2, 0, -1 }, { 3, 0, 1, -1 }, { 0, 2, 1, -1 } }; static const ELEMENT_FACE prism_faces[5] = { { 0, 2, 1, -1 }, { 3, 4, 5, -1 }, { 2, 0, 3, 5 }, { 0, 1, 4, 3 }, { 1, 2, 5, 4 } }; static const ELEMENT_FACE pyramid_faces[5] = { { 0, 1, 4, -1 }, { 1, 2, 4, -1 }, { 2, 3, 4, -1 }, { 3, 0, 4, -1 }, { 0, 3, 2, 1 } }; static const ELEMENT_FACE hex_faces[6] = { { 0, 3, 2, 1 }, { 4, 5, 6, 7 }, { 0, 1, 5, 4 }, { 1, 2, 6, 5 }, { 2, 3, 7, 6 }, { 3, 0, 4, 7 } }; switch (et) { case TRIG: case TRIG6: return trig_faces; case QUAD: case QUAD6: case QUAD8: return quad_faces; case TET: case TET10: return tet_faces; case PRISM: case PRISM12: return prism_faces; case PYRAMID: return pyramid_faces; case SEGMENT: case SEGMENT3: case HEX: return hex_faces; // default: // cerr << "Ng_ME_GetVertices, illegal element type " << et << endl; } return 0; } } #endif netgen-6.2.1804/libsrc/meshing/validate.hpp0000644000175000017500000000132013272137567017213 0ustar kurtkurt#ifndef VALIDATE_HPP #define VALIDATE_HPP namespace netgen { void GetPureBadness(Mesh & mesh, Array & pure_badness, const BitArray & isnewpoint); double Validate(const Mesh & mesh, Array & bad_elements, const Array & pure_badness, double max_worsening, const bool uselocalworsening, Array * quality_loss = NULL); void RepairBisection(Mesh & mesh, Array & bad_elements, const BitArray & isnewpoint, const Refinement & refinement, const Array & pure_badness, double max_worsening, const bool uselocalworsening, const Array< Array* > & idmaps); } #endif // VALIDATE_HPP netgen-6.2.1804/libsrc/meshing/clusters.cpp0000644000175000017500000002335213272137567017272 0ustar kurtkurt#include #include "meshing.hpp" namespace netgen { AnisotropicClusters :: AnisotropicClusters (const Mesh & amesh) : mesh(amesh) { ; } AnisotropicClusters :: ~AnisotropicClusters () { ; } void AnisotropicClusters :: Update(TaskManager tm, Tracer tracer) { static int timer = NgProfiler::CreateTimer ("clusters"); static int timer1 = NgProfiler::CreateTimer ("clusters1"); static int timer2 = NgProfiler::CreateTimer ("clusters2"); static int timer3 = NgProfiler::CreateTimer ("clusters3"); NgProfiler::RegionTimer reg (timer); const MeshTopology & top = mesh.GetTopology(); bool hasedges = top.HasEdges(); bool hasfaces = top.HasFaces(); if (!hasedges || !hasfaces) return; if (id == 0) PrintMessage (3, "Update clusters"); nv = mesh.GetNV(); ned = top.GetNEdges(); nfa = top.GetNFaces(); ne = mesh.GetNE(); int nse = mesh.GetNSE(); cluster_reps.SetSize (nv+ned+nfa+ne); cluster_reps = -1; Array llist (nv+ned+nfa+ne); llist = 0; Array nnums, ednums, fanums; int changed; NgProfiler::StartTimer(timer1); /* for (int i = 1; i <= ne; i++) { const Element & el = mesh.VolumeElement(i); ELEMENT_TYPE typ = el.GetType(); top.GetElementEdges (i, ednums); top.GetElementFaces (i, fanums); int elnv = top.GetNVertices (typ); int elned = ednums.Size(); int elnfa = fanums.Size(); nnums.SetSize(elnv+elned+elnfa+1); for (int j = 1; j <= elnv; j++) nnums.Elem(j) = el.PNum(j); for (int j = 1; j <= elned; j++) nnums.Elem(elnv+j) = nv+ednums.Elem(j); for (int j = 1; j <= elnfa; j++) nnums.Elem(elnv+elned+j) = nv+ned+fanums.Elem(j); nnums.Elem(elnv+elned+elnfa+1) = nv+ned+nfa+i; for (int j = 0; j < nnums.Size(); j++) cluster_reps.Elem(nnums[j]) = nnums[j]; } */ ParallelForRange (tm, ne, [&] (size_t begin, size_t end) { Array nnums, ednums, fanums; for (int i = begin+1; i <= end; i++) { const Element & el = mesh.VolumeElement(i); ELEMENT_TYPE typ = el.GetType(); top.GetElementEdges (i, ednums); top.GetElementFaces (i, fanums); int elnv = top.GetNVertices (typ); int elned = ednums.Size(); int elnfa = fanums.Size(); nnums.SetSize(elnv+elned+elnfa+1); for (int j = 1; j <= elnv; j++) nnums.Elem(j) = el.PNum(j)+1-PointIndex::BASE; for (int j = 1; j <= elned; j++) nnums.Elem(elnv+j) = nv+ednums.Elem(j); for (int j = 1; j <= elnfa; j++) nnums.Elem(elnv+elned+j) = nv+ned+fanums.Elem(j); nnums.Elem(elnv+elned+elnfa+1) = nv+ned+nfa+i; for (int j = 0; j < nnums.Size(); j++) cluster_reps.Elem(nnums[j]) = nnums[j]; } }); NgProfiler::StopTimer(timer1); NgProfiler::StartTimer(timer2); /* for (int i = 1; i <= nse; i++) { const Element2d & el = mesh.SurfaceElement(i); ELEMENT_TYPE typ = el.GetType(); top.GetSurfaceElementEdges (i, ednums); int fanum = top.GetSurfaceElementFace (i); int elnv = top.GetNVertices (typ); int elned = ednums.Size(); nnums.SetSize(elnv+elned+1); for (int j = 1; j <= elnv; j++) nnums.Elem(j) = el.PNum(j)+1-PointIndex::BASE; for (int j = 1; j <= elned; j++) nnums.Elem(elnv+j) = nv+ednums.Elem(j); nnums.Elem(elnv+elned+1) = fanum; for (int j = 0; j < nnums.Size(); j++) cluster_reps.Elem(nnums[j]) = nnums[j]; } */ ParallelForRange (tm, nse, [&] (size_t begin, size_t end) { ArrayMem nnums, ednums; for (int i = begin+1; i <= end; i++) { const Element2d & el = mesh.SurfaceElement(i); ELEMENT_TYPE typ = el.GetType(); top.GetSurfaceElementEdges (i, ednums); int fanum = top.GetSurfaceElementFace (i); int elnv = top.GetNVertices (typ); int elned = ednums.Size(); nnums.SetSize(elnv+elned+1); for (int j = 1; j <= elnv; j++) nnums.Elem(j) = el.PNum(j)+1-PointIndex::BASE; for (int j = 1; j <= elned; j++) nnums.Elem(elnv+j) = nv+ednums.Elem(j); nnums.Elem(elnv+elned+1) = fanum; for (int j = 0; j < nnums.Size(); j++) cluster_reps.Elem(nnums[j]) = nnums[j]; } }); NgProfiler::StopTimer(timer2); NgProfiler::StartTimer(timer3); static const int hex_cluster[] = { 1, 2, 3, 4, 1, 2, 3, 4, 5, 6, 7, 8, 5, 6, 7, 8, 1, 2, 3, 4, 9, 9, 5, 8, 6, 7, 9 }; static const int prism_cluster[] = { 1, 2, 3, 1, 2, 3, 4, 5, 6, 4, 5, 6, 3, 1, 2, 7, 7, 4, 5, 6, 7 }; static const int pyramid_cluster[] = { 1, 2, 2, 1, 3, 4, 2, 1, 4, 6, 5, 5, 6, 7, 5, 7, 6, 4, 7 }; static const int tet_cluster14[] = { 1, 2, 3, 1, 1, 4, 5, 4, 5, 6, 7, 5, 4, 7, 7 }; static const int tet_cluster12[] = { 1, 1, 2, 3, 4, 4, 5, 1, 6, 6, 7, 7, 4, 6, 7 }; static const int tet_cluster13[] = { 1, 2, 1, 3, 4, 6, 4, 5, 1, 5, 7, 4, 7, 5, 7 }; static const int tet_cluster23[] = { 2, 1, 1, 3, 6, 5, 5, 4, 4, 1, 5, 7, 7, 4, 7 }; static const int tet_cluster24[] = { 2, 1, 3, 1, 4, 1, 5, 4, 6, 5, 5, 7, 4, 7, 7 }; static const int tet_cluster34[] = { 2, 3, 1, 1, 4, 5, 1, 6, 4, 5, 5, 4, 7, 7, 7 }; int cnt = 0; do { (*tracer) ("update cluster, identify", false); cnt++; changed = 0; for (int i = 1; i <= ne; i++) { const Element & el = mesh.VolumeElement(i); ELEMENT_TYPE typ = el.GetType(); const int * clustertab = NULL; switch (typ) { case PRISM: case PRISM12: clustertab = prism_cluster; break; case HEX: clustertab = hex_cluster; break; case PYRAMID: clustertab = pyramid_cluster; break; case TET: case TET10: if (cluster_reps.Get(el.PNum(1)+1-PointIndex::BASE) == cluster_reps.Get(el.PNum(2)+1-PointIndex::BASE)) clustertab = tet_cluster12; else if (cluster_reps.Get(el.PNum(1)+1-PointIndex::BASE) == cluster_reps.Get(el.PNum(3)+1-PointIndex::BASE)) clustertab = tet_cluster13; else if (cluster_reps.Get(el.PNum(1)+1-PointIndex::BASE) == cluster_reps.Get(el.PNum(4)+1-PointIndex::BASE)) clustertab = tet_cluster14; else if (cluster_reps.Get(el.PNum(2)+1-PointIndex::BASE) == cluster_reps.Get(el.PNum(3)+1-PointIndex::BASE)) clustertab = tet_cluster23; else if (cluster_reps.Get(el.PNum(2)+1-PointIndex::BASE) == cluster_reps.Get(el.PNum(4)+1-PointIndex::BASE)) clustertab = tet_cluster24; else if (cluster_reps.Get(el.PNum(3)+1-PointIndex::BASE) == cluster_reps.Get(el.PNum(4)+1-PointIndex::BASE)) clustertab = tet_cluster34; else clustertab = NULL; break; default: clustertab = NULL; } if (clustertab) { top.GetElementEdges (i, ednums); top.GetElementFaces (i, fanums); int elnv = top.GetNVertices (typ); int elned = ednums.Size(); int elnfa = fanums.Size(); nnums.SetSize(elnv+elned+elnfa+1); for (int j = 1; j <= elnv; j++) nnums.Elem(j) = el.PNum(j)+1-PointIndex::BASE; for (int j = 1; j <= elned; j++) nnums.Elem(elnv+j) = nv+ednums.Elem(j); for (int j = 1; j <= elnfa; j++) nnums.Elem(elnv+elned+j) = nv+ned+fanums.Elem(j); nnums.Elem(elnv+elned+elnfa+1) = nv+ned+nfa+i; for (int j = 0; j < nnums.Size(); j++) for (int k = 0; k < j; k++) if (clustertab[j] == clustertab[k]) { int jj = nnums[j]; int kk = nnums[k]; if (cluster_reps.Get(kk) < cluster_reps.Get(jj)) swap (jj,kk); if (cluster_reps.Get(jj) < cluster_reps.Get(kk)) { /* cluster_reps.Elem(kk) = cluster_reps.Get(jj); changed = 1; */ int rep = cluster_reps.Get(jj); int next = cluster_reps.Get(kk); do { int cur = next; next = llist.Elem(next); cluster_reps.Elem(cur) = rep; llist.Elem(cur) = llist.Elem(rep); llist.Elem(rep) = cur; } while (next); changed = 1; } } } /* if (clustertab) { if (typ == PYRAMID) (*testout) << "pyramid"; else if (typ == PRISM || typ == PRISM12) (*testout) << "prism"; else if (typ == TET || typ == TET10) (*testout) << "tet"; else (*testout) << "unknown type" << endl; (*testout) << ", nnums = "; for (j = 0; j < nnums.Size(); j++) (*testout) << "node " << j << " = " << nnums[j] << ", rep = " << cluster_reps.Get(nnums[j]) << endl; } */ } (*tracer) ("update cluster, identify", true); } while (changed); NgProfiler::StopTimer(timer3); /* (*testout) << "cluster reps:" << endl; for (i = 1; i <= cluster_reps.Size(); i++) { (*testout) << i << ": "; if (i <= nv) (*testout) << "v" << i << " "; else if (i <= nv+ned) (*testout) << "e" << i-nv << " "; else if (i <= nv+ned+nfa) (*testout) << "f" << i-nv-ned << " "; else (*testout) << "c" << i-nv-ned-nfa << " "; (*testout) << cluster_reps.Get(i) << endl; } */ } } netgen-6.2.1804/libsrc/meshing/parser2.cpp0000644000175000017500000002712613272137567017007 0ustar kurtkurt#include #include "meshing.hpp" #ifdef WIN32 #define COMMASIGN ':' #else #define COMMASIGN ',' #endif namespace netgen { void LoadMatrixLine (istream & ist, DenseMatrix & m, int line) { char ch; int pnum; float f; ist >> ch; while (ch != '}') { ist.putback (ch); ist >> f; ist >> ch; ist >> pnum; if (ch == 'x' || ch == 'X') m.Elem(line, 2 * pnum - 1) = f; if (ch == 'y' || ch == 'Y') m.Elem(line, 2 * pnum) = f; ist >> ch; if (ch == COMMASIGN) ist >> ch; } } void netrule :: LoadRule (istream & ist) { char buf[256]; char ch; Point2d p; INDEX_2 lin; int i, j; DenseMatrix tempoldutonewu(20, 20), tempoldutofreearea(20, 20), tempoldutofreearealimit(20, 20); tempoldutonewu = 0; tempoldutofreearea = 0; tempoldutofreearealimit = 0; noldp = 0; noldl = 0; ist.get (buf, sizeof(buf), '"'); ist.get (ch); ist.get (buf, sizeof(buf), '"'); ist.get (ch); // if(name != NULL) delete [] name; name = new char[strlen (buf) + 1]; strcpy (name, buf); //(*testout) << "name " << name << endl; // (*mycout) << "Rule " << name << " found." << endl; do { ist >> buf; //(*testout) << "buf " << buf << endl; if (strcmp (buf, "quality") == 0) { ist >> quality; } else if (strcmp (buf, "mappoints") == 0) { ist >> ch; while (ch == '(') { ist >> p.X(); ist >> ch; // ',' ist >> p.Y(); ist >> ch; // ')' points.Append (p); noldp++; tolerances.SetSize (noldp); tolerances.Elem(noldp).f1 = 1.0; tolerances.Elem(noldp).f2 = 0; tolerances.Elem(noldp).f3 = 1.0; ist >> ch; while (ch != ';') { if (ch == '{') { ist >> tolerances.Elem(noldp).f1; ist >> ch; // ',' ist >> tolerances.Elem(noldp).f2; ist >> ch; // ',' ist >> tolerances.Elem(noldp).f3; ist >> ch; // '}' } else if (ch == 'd') { // delpoints.Append (noldp); ist >> ch; // 'e' ist >> ch; // 'l' } ist >> ch; } ist >> ch; } ist.putback (ch); } else if (strcmp (buf, "maplines") == 0) { ist >> ch; while (ch == '(') { ist >> lin.I1(); ist >> ch; // ',' ist >> lin.I2(); ist >> ch; // ')' //(*testout) << "read line " << lin.I1() << " " << lin.I2() << endl; lines.Append (lin); linevecs.Append (points.Get(lin.I2()) - points.Get(lin.I1())); noldl++; linetolerances.SetSize (noldl); linetolerances.Elem(noldl).f1 = 0; linetolerances.Elem(noldl).f2 = 0; linetolerances.Elem(noldl).f3 = 0; //(*testout) << "mapl1" << endl; ist >> ch; while (ch != ';') { //(*testout) << "working on character \""<> linetolerances.Elem(noldl).f1; ist >> ch; // ',' ist >> linetolerances.Elem(noldl).f2; ist >> ch; // ',' ist >> linetolerances.Elem(noldl).f3; ist >> ch; // '}' } else if (ch == 'd') { dellines.Append (noldl); ist >> ch; // 'e' ist >> ch; // 'l' //(*testout) << "read del" << endl; } ist >> ch; //(*testout) << "read character \""<> ch; //(*testout) << "read next character \""<> ch; while (ch == '(') { ist >> p.X(); ist >> ch; // ',' ist >> p.Y(); ist >> ch; // ')' points.Append (p); ist >> ch; while (ch != ';') { if (ch == '{') { LoadMatrixLine (ist, tempoldutonewu, 2 * (points.Size()-noldp) - 1); ist >> ch; // '{' LoadMatrixLine (ist, tempoldutonewu, 2 * (points.Size()-noldp)); } ist >> ch; } ist >> ch; } ist.putback (ch); } else if (strcmp (buf, "newlines") == 0) { ist >> ch; while (ch == '(') { ist >> lin.I1(); ist >> ch; // ',' ist >> lin.I2(); ist >> ch; // ')' lines.Append (lin); linevecs.Append (points.Get(lin.I2()) - points.Get(lin.I1())); ist >> ch; while (ch != ';') { ist >> ch; } ist >> ch; } ist.putback (ch); } else if (strcmp (buf, "freearea") == 0) { ist >> ch; while (ch == '(') { ist >> p.X(); ist >> ch; // ',' ist >> p.Y(); ist >> ch; // ')' freezone.Append (p); freezonelimit.Append (p); ist >> ch; while (ch != ';') { if (ch == '{') { LoadMatrixLine (ist, tempoldutofreearea, 2 * freezone.Size() - 1); ist >> ch; // '{' LoadMatrixLine (ist, tempoldutofreearea, 2 * freezone.Size()); } ist >> ch; } ist >> ch; } for (i = 1; i <= tempoldutofreearealimit.Height(); i++) for (j = 1; j <= tempoldutofreearealimit.Width(); j++) tempoldutofreearealimit.Elem(i,j) = tempoldutofreearea.Elem(i,j); ist.putback (ch); } else if (strcmp (buf, "freearea2") == 0) { ist >> ch; int freepi = 0; tempoldutofreearealimit = 0; while (ch == '(') { freepi++; ist >> p.X(); ist >> ch; // ',' ist >> p.Y(); ist >> ch; // ')' freezonelimit.Elem(freepi) = p; ist >> ch; while (ch != ';') { if (ch == '{') { LoadMatrixLine (ist, tempoldutofreearealimit, 2 * freepi - 1); ist >> ch; // '{' LoadMatrixLine (ist, tempoldutofreearealimit, 2 * freepi); } ist >> ch; } ist >> ch; } ist.putback (ch); } else if (strcmp (buf, "elements") == 0) { ist >> ch; while (ch == '(') { elements.Append (Element2d(TRIG)); ist >> elements.Last().PNum(1); ist >> ch; // ',' if (ch == COMMASIGN) { ist >> elements.Last().PNum(2); ist >> ch; // ',' } if (ch == COMMASIGN) { ist >> elements.Last().PNum(3); ist >> ch; // ',' } if (ch == COMMASIGN) { elements.Last().SetType (QUAD); ist >> elements.Last().PNum(4); ist >> ch; // ',' // const Element2d & el = elements.Last(); /* orientations.Append (threeint(el.PNum(1), el.PNum(2), el.PNum(3))); orientations.Append (threeint(el.PNum(2), el.PNum(3), el.PNum(4))); orientations.Append (threeint(el.PNum(3), el.PNum(4), el.PNum(1))); orientations.Append (threeint(el.PNum(4), el.PNum(1), el.PNum(2))); */ } ist >> ch; while (ch != ';') { ist >> ch; } ist >> ch; } ist.putback (ch); } else if (strcmp (buf, "orientations") == 0) { ist >> ch; while (ch == '(') { // threeint a = threeint(); orientations.Append (threeint()); ist >> orientations.Last().i1; ist >> ch; // ',' ist >> orientations.Last().i2; ist >> ch; // ',' ist >> orientations.Last().i3; ist >> ch; // ',' ist >> ch; while (ch != ';') { ist >> ch; } ist >> ch; } ist.putback (ch); } else if (strcmp (buf, "endrule") != 0) { PrintSysError ("Parser error, unknown token ", buf); } } while (!ist.eof() && strcmp (buf, "endrule") != 0); oldutonewu.SetSize (2 * (points.Size() - noldp), 2 * noldp); oldutofreearea.SetSize (2 * freezone.Size(), 2 * noldp); oldutofreearealimit.SetSize (2 * freezone.Size(), 2 * noldp); for (i = 1; i <= oldutonewu.Height(); i++) for (j = 1; j <= oldutonewu.Width(); j++) oldutonewu.Elem(i, j) = tempoldutonewu.Elem(i, j); for (i = 1; i <= oldutofreearea.Height(); i++) for (j = 1; j <= oldutofreearea.Width(); j++) oldutofreearea.Elem(i, j) = tempoldutofreearea.Elem(i, j); for (i = 1; i <= oldutofreearea.Height(); i++) for (j = 1; j <= oldutofreearea.Width(); j++) oldutofreearealimit.Elem(i, j) = tempoldutofreearealimit.Elem(i, j); freesetinequ.SetSize (freezone.Size()); { char ok; int minn; Array pnearness (noldp); for (i = 1; i <= pnearness.Size(); i++) pnearness.Elem(i) = 1000; for (j = 1; j <= 2; j++) pnearness.Elem(GetPointNr (1, j)) = 0; do { ok = 1; for (i = 1; i <= noldl; i++) { minn = 1000; for (j = 1; j <= 2; j++) minn = min2 (minn, pnearness.Get(GetPointNr (i, j))); for (j = 1; j <= 2; j++) if (pnearness.Get(GetPointNr (i, j)) > minn+1) { ok = 0; pnearness.Elem(GetPointNr (i, j)) = minn+1; } } } while (!ok); lnearness.SetSize (noldl); for (i = 1; i <= noldl; i++) { lnearness.Elem(i) = 0; for (j = 1; j <= 2; j++) lnearness.Elem(i) += pnearness.Get(GetPointNr (i, j)); } } oldutofreearea_i.SetSize (10); freezone_i.SetSize (10); for (i = 0; i < oldutofreearea_i.Size(); i++) { double lam1 = 1.0/(i+1); oldutofreearea_i[i] = new DenseMatrix (oldutofreearea.Height(), oldutofreearea.Width()); DenseMatrix & mati = *oldutofreearea_i[i]; for (j = 0; j < oldutofreearea.Height(); j++) for (int k = 0; k < oldutofreearea.Width(); k++) mati(j,k) = lam1 * oldutofreearea(j,k) + (1 - lam1) * oldutofreearealimit(j,k); freezone_i[i] = new Array (freezone.Size()); Array & fzi = *freezone_i[i]; for (int j = 0; j < freezone.Size(); j++) fzi[j] = freezonelimit[j] + lam1 * (freezone[j] - freezonelimit[j]); } } extern const char * triarules[]; extern const char * quadrules[]; void Meshing2 :: LoadRules (const char * filename, bool quad) { char buf[256]; istream * ist; //char *tr1 = NULL; string tr1; /* ifstream ist (filename); if (!ist.good()) { cerr << "Rule description file " << filename << " not found" << endl; exit (1); } */ if (filename) { // (*mycout) << "rule-filename = " << filename << endl; ist = new ifstream (filename); } else { /* connect tetrules to one string */ const char ** hcp; // if (!mparam.quad) if (!quad) { hcp = triarules; PrintMessage (3, "load internal triangle rules"); } else { hcp = quadrules; PrintMessage (3, "load internal quad rules"); // LoadRules ("rules/quad.rls"); } size_t len = 0; while (*hcp) { // (*testout) << "POS2 *hcp " << *hcp << endl; len += strlen (*hcp); hcp++; } //tr1 = new char[len+1]; //tr1[0] = 0; tr1.reserve(len+1); // if (!mparam.quad) if (!quad) hcp = triarules; else hcp = quadrules; //char * tt1 = tr1; while (*hcp) { //strcat (tt1, *hcp); //tt1 += strlen (*hcp); tr1.append(*hcp); hcp++; } #ifdef WIN32 // VC++ 2005 workaround for(string::size_type i=0; igood()) { cerr << "Rule description file " << filename << " not found" << endl; delete ist; exit (1); } while (!ist->eof()) { buf[0] = 0; (*ist) >> buf; if (strcmp (buf, "rule") == 0) { //(*testout) << "found rule" << endl; netrule * rule = new netrule; //(*testout) << "fr1" << endl; rule -> LoadRule(*ist); //(*testout) << "fr2" << endl; rules.Append (rule); } //(*testout) << "loop" << endl; } //(*testout) << "POS3" << endl; delete ist; //delete [] tr1; } } netgen-6.2.1804/libsrc/meshing/hpref_trig.hpp0000644000175000017500000003027013272137567017561 0ustar kurtkurt // HP_TRIG int reftrig_splitedges[][3] = { { 0, 0, 0 } }; HPREF_ELEMENT_TYPE reftrig_newelstypes[] = { HP_TRIG, HP_NONE, }; int reftrig_newels[][8] = { { 1, 2, 3 }, }; HPRef_Struct reftrig = { HP_TRIG, reftrig_splitedges, 0, 0, reftrig_newelstypes, reftrig_newels }; // HP_TRIG_SINGCORNER int reftrig_singcorner_splitedges[][3] = { { 1, 2, 4 }, { 1, 3, 5 }, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE reftrig_singcorner_newelstypes[] = { HP_TRIG_SINGCORNER, HP_QUAD, HP_NONE, }; int reftrig_singcorner_newels[][8] = { { 1, 4, 5 }, { 2, 3, 5, 4 }, }; HPRef_Struct reftrig_singcorner = { HP_TRIG, reftrig_singcorner_splitedges, 0, 0, reftrig_singcorner_newelstypes, reftrig_singcorner_newels }; /* // HP_TRIG_SINGCORNER, trigs only int reftrig_singcorner_splitedges[][3] = { { 1, 2, 4 }, { 1, 3, 5 }, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE reftrig_singcorner_newelstypes[] = { HP_TRIG_SINGCORNER, HP_TRIG, HP_TRIG, HP_NONE, }; int reftrig_singcorner_newels[][8] = { { 1, 4, 5 }, { 4, 2, 5 }, { 5, 2, 3 }, }; HPRef_Struct reftrig_singcorner = { HP_TRIG, reftrig_singcorner_splitedges, 0, 0, reftrig_singcorner_newelstypes, reftrig_singcorner_newels }; */ // HP_TRIG_SINGCORNER12 int reftrig_singcorner12_splitedges[][3] = { { 1, 2, 4 }, { 1, 3, 5 }, { 2, 1, 6 }, { 2, 3, 7 }, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE reftrig_singcorner12_newelstypes[] = { HP_TRIG_SINGCORNER, HP_TRIG_SINGCORNER, HP_QUAD, HP_TRIG, HP_NONE, }; int reftrig_singcorner12_newels[][8] = { { 1, 4, 5 }, { 2, 7, 6 }, { 4, 6, 7, 5 }, { 5, 7, 3 }, }; HPRef_Struct reftrig_singcorner12 = { HP_TRIG, reftrig_singcorner12_splitedges, 0, 0, reftrig_singcorner12_newelstypes, reftrig_singcorner12_newels }; // HP_TRIG_SINGCORNER123_2D int reftrig_singcorner123_2D_splitedges[][3] = { { 1, 2, 4 }, { 1, 3, 5 }, { 2, 1, 6 }, { 2, 3, 7 }, { 3, 1, 8 }, { 3, 2, 9 }, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE reftrig_singcorner123_2D_newelstypes[] = { HP_TRIG_SINGCORNER, HP_TRIG_SINGCORNER, HP_TRIG_SINGCORNER, HP_QUAD, HP_QUAD, HP_NONE, }; int reftrig_singcorner123_2D_newels[][8] = { { 1, 4, 5 }, { 2, 7, 6 }, { 3, 8, 9 }, { 4, 6, 8, 5 }, { 6, 7, 9, 8 }, }; HPRef_Struct reftrig_singcorner123_2D = { HP_TRIG, reftrig_singcorner123_2D_splitedges, 0, 0, reftrig_singcorner123_2D_newelstypes, reftrig_singcorner123_2D_newels }; // HP_TRIG_SINGCORNER123 int reftrig_singcorner123_splitedges[][3] = { { 1, 2, 4 }, { 1, 3, 5 }, { 2, 1, 6 }, { 2, 3, 7 }, { 3, 1, 8 }, { 3, 2, 9 }, { 0, 0, 0 } }; int reftrig_singcorner123_splitfaces[][4] = { { 1, 2, 3, 10 }, { 2, 3, 1, 11 }, { 3, 1, 2, 12 }, { 0, 0, 0, 0 } }; HPREF_ELEMENT_TYPE reftrig_singcorner123_newelstypes[] = { HP_DUMMY_QUAD_SINGCORNER, HP_DUMMY_QUAD_SINGCORNER, HP_DUMMY_QUAD_SINGCORNER, // HP_TRIG_SINGCORNER, // HP_TRIG, // HP_TRIG_SINGCORNER, // HP_TRIG, // HP_TRIG_SINGCORNER, // HP_TRIG, HP_QUAD, HP_QUAD, HP_QUAD, HP_TRIG, HP_NONE, }; int reftrig_singcorner123_newels[][8] = { { 1, 4, 10, 5 }, { 2, 7, 11, 6 }, { 3, 8, 12, 9 }, // { 1, 4, 5 }, // { 5, 4, 10 }, // { 2, 7, 6 }, // { 6, 7, 11 }, // { 3, 8, 9 }, // { 8, 12, 9 }, { 4, 6, 11, 10 }, { 7, 9, 12, 11 }, { 8, 5, 10, 12 }, { 10, 11, 12 }, }; HPRef_Struct reftrig_singcorner123 = { HP_TRIG, reftrig_singcorner123_splitedges, reftrig_singcorner123_splitfaces, 0, reftrig_singcorner123_newelstypes, reftrig_singcorner123_newels }; // HP_TRIG_SINGEDGE int reftrig_singedge_splitedges[][3] = { { 2, 3, 4 }, { 1, 3, 5 }, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE reftrig_singedge_newelstypes[] = { HP_TRIG, HP_QUAD_SINGEDGE, HP_NONE, }; int reftrig_singedge_newels[][8] = { { 4, 3, 5 }, { 1, 2, 4, 5 }, }; HPRef_Struct reftrig_singedge = { HP_TRIG, reftrig_singedge_splitedges, 0, 0, reftrig_singedge_newelstypes, reftrig_singedge_newels }; // HP_TRIG_SINGEDGECORNER1 int reftrig_singedgecorner1_splitedges[][3] = { { 1, 2, 6 }, { 1, 3, 5 }, { 2, 3, 4 }, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE reftrig_singedgecorner1_newelstypes[] = { HP_TRIG_SINGEDGECORNER1, HP_QUAD_SINGEDGE, HP_TRIG, HP_NONE, }; int reftrig_singedgecorner1_newels[][8] = { { 1, 6, 5 }, { 6, 2, 4, 5 }, { 5, 4, 3 }, }; HPRef_Struct reftrig_singedgecorner1 = { HP_TRIG, reftrig_singedgecorner1_splitedges, 0, 0, reftrig_singedgecorner1_newelstypes, reftrig_singedgecorner1_newels }; // HP_TRIG_SINGEDGECORNER2 int reftrig_singedgecorner2_splitedges[][3] = { { 2, 1, 6 }, { 1, 3, 5 }, { 2, 3, 4 }, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE reftrig_singedgecorner2_newelstypes[] = { HP_TRIG_SINGEDGECORNER2, HP_QUAD_SINGEDGE, HP_TRIG, HP_NONE, }; int reftrig_singedgecorner2_newels[][8] = { { 6, 2, 4}, { 1, 6, 4, 5 }, { 5, 4, 3 }, }; HPRef_Struct reftrig_singedgecorner2 = { HP_TRIG, reftrig_singedgecorner2_splitedges, 0, 0, reftrig_singedgecorner2_newelstypes, reftrig_singedgecorner2_newels }; // HP_TRIG_SINGEDGECORNER12 int reftrig_singedgecorner12_splitedges[][3] = { { 1, 2, 4 }, { 1, 3, 5 }, { 2, 1, 6 }, { 2, 3, 7 }, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE reftrig_singedgecorner12_newelstypes[] = { HP_TRIG_SINGEDGECORNER1, HP_TRIG_SINGEDGECORNER2, HP_QUAD_SINGEDGE, HP_TRIG, HP_NONE, }; int reftrig_singedgecorner12_newels[][8] = { { 1, 4, 5 }, { 6, 2, 7 }, { 4, 6, 7, 5 }, { 5, 7, 3 }, }; HPRef_Struct reftrig_singedgecorner12 = { HP_TRIG, reftrig_singedgecorner12_splitedges, 0, 0, reftrig_singedgecorner12_newelstypes, reftrig_singedgecorner12_newels }; // HP_TRIG_SINGEDGECORNER3 int reftrig_singedgecorner3_splitedges[][3] = { { 1, 3, 4 }, { 3, 1, 5 }, { 2, 3, 6 }, { 3, 2, 7 }, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE reftrig_singedgecorner3_newelstypes[] = { HP_QUAD_SINGEDGE, HP_QUAD, HP_TRIG_SINGCORNER, HP_NONE, }; int reftrig_singedgecorner3_newels[][8] = { { 1, 2, 6, 4 }, { 4, 6, 7, 5 }, { 3, 5, 7 }, }; HPRef_Struct reftrig_singedgecorner3 = { HP_TRIG, reftrig_singedgecorner3_splitedges, 0, 0, reftrig_singedgecorner3_newelstypes, reftrig_singedgecorner3_newels }; // HP_TRIG_SINGEDGECORNER13 int reftrig_singedgecorner13_splitedges[][3] = { { 1, 2, 4 }, { 1, 3, 5 }, { 2, 3, 6 }, { 3, 1, 7 }, { 3, 2, 8 }, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE reftrig_singedgecorner13_newelstypes[] = { HP_TRIG_SINGEDGECORNER1, HP_QUAD_SINGEDGE, HP_QUAD, HP_TRIG_SINGCORNER, HP_NONE, }; int reftrig_singedgecorner13_newels[][8] = { { 1, 4, 5 }, { 4, 2, 6, 5 }, { 5, 6, 8, 7 }, { 3, 7, 8 }, }; HPRef_Struct reftrig_singedgecorner13 = { HP_TRIG, reftrig_singedgecorner13_splitedges, 0, 0, reftrig_singedgecorner13_newelstypes, reftrig_singedgecorner13_newels }; // HP_TRIG_SINGEDGECORNER23 int reftrig_singedgecorner23_splitedges[][3] = { { 1, 3, 4 }, { 2, 1, 5 }, { 2, 3, 6 }, { 3, 1, 7 }, { 3, 2, 8 }, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE reftrig_singedgecorner23_newelstypes[] = { HP_TRIG_SINGEDGECORNER2, HP_QUAD_SINGEDGE, HP_QUAD, HP_TRIG_SINGCORNER, HP_NONE, }; int reftrig_singedgecorner23_newels[][8] = { { 5, 2, 6 }, { 1, 5, 6, 4 }, { 4, 6, 8, 7 }, { 3, 7, 8 }, }; HPRef_Struct reftrig_singedgecorner23 = { HP_TRIG, reftrig_singedgecorner23_splitedges, 0, 0, reftrig_singedgecorner23_newelstypes, reftrig_singedgecorner23_newels }; // HP_TRIG_SINGEDGECORNER123 int reftrig_singedgecorner123_splitedges[][3] = { { 1, 2, 4 }, { 1, 3, 5 }, { 2, 1, 6 }, { 2, 3, 7 }, { 3, 1, 8 }, { 3, 2, 9 }, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE reftrig_singedgecorner123_newelstypes[] = { HP_TRIG_SINGEDGECORNER1, HP_TRIG_SINGEDGECORNER2, HP_QUAD_SINGEDGE, HP_QUAD, HP_TRIG_SINGCORNER, HP_NONE, }; int reftrig_singedgecorner123_newels[][8] = { { 1, 4, 5 }, { 6, 2, 7 }, { 4, 6, 7, 5 }, { 5, 7, 9, 8 }, { 3, 8, 9 }, }; HPRef_Struct reftrig_singedgecorner123 = { HP_TRIG, reftrig_singedgecorner123_splitedges, 0, 0, reftrig_singedgecorner123_newelstypes, reftrig_singedgecorner123_newels }; // HP_TRIG_SINGEDGES int reftrig_singedges_splitedges[][3] = { { 1, 2, 4 }, { 1, 3, 5 }, { 2, 3, 6 }, { 3, 2, 7 }, { 0, 0, 0 } }; int reftrig_singedges_splitfaces[][4] = { { 1, 2, 3, 8 }, { 0, 0, 0, 0 } }; HPREF_ELEMENT_TYPE reftrig_singedges_newelstypes[] = { // HP_QUAD_2E, HP_TRIG_SINGEDGECORNER1, HP_TRIG_SINGEDGECORNER2, HP_QUAD_SINGEDGE, HP_QUAD_SINGEDGE, HP_TRIG, HP_NONE, }; int reftrig_singedges_newels[][8] = { // { 1, 4, 8, 5 }, { 1, 4, 8 }, { 5, 1, 8 }, { 4, 2, 6, 8 }, { 3, 5, 8, 7 }, { 6, 7, 8 }, }; HPRef_Struct reftrig_singedges = { HP_TRIG, reftrig_singedges_splitedges, reftrig_singedges_splitfaces, 0, reftrig_singedges_newelstypes, reftrig_singedges_newels }; // HP_TRIG_SINGEDGES2 int reftrig_singedges2_splitedges[][3] = { { 1, 2, 4 }, { 1, 3, 5 }, { 2, 1, 6 }, { 2, 3, 7 }, { 3, 2, 8 }, { 0, 0, 0 } }; int reftrig_singedges2_splitfaces[][4] = { { 1, 2, 3, 9 }, { 0, 0, 0, 0 } }; HPREF_ELEMENT_TYPE reftrig_singedges2_newelstypes[] = { // HP_QUAD_2E, HP_TRIG_SINGEDGECORNER1, HP_TRIG_SINGEDGECORNER2, HP_QUAD_SINGEDGE, HP_QUAD_SINGEDGE, HP_TRIG_SINGEDGECORNER2, HP_TRIG, HP_NONE, }; int reftrig_singedges2_newels[][8] = { // { 1, 4, 9, 5 }, { 1, 4, 9 }, { 5, 1, 9 }, { 4, 6, 7, 9 }, { 3, 5, 9, 8 }, { 6, 2, 7 }, { 7, 8, 9 }, }; HPRef_Struct reftrig_singedges2 = { HP_TRIG, reftrig_singedges2_splitedges, reftrig_singedges2_splitfaces, 0, reftrig_singedges2_newelstypes, reftrig_singedges2_newels }; // HP_TRIG_SINGEDGES3 int reftrig_singedges3_splitedges[][3] = { { 1, 2, 4 }, { 1, 3, 5 }, { 2, 3, 6 }, { 3, 1, 7 }, { 3, 2, 8 }, { 0, 0, 0 } }; int reftrig_singedges3_splitfaces[][4] = { { 1, 2, 3, 9 }, { 0, 0, 0, 0 } }; HPREF_ELEMENT_TYPE reftrig_singedges3_newelstypes[] = { // HP_QUAD_2E, HP_TRIG_SINGEDGECORNER1, HP_TRIG_SINGEDGECORNER2, HP_QUAD_SINGEDGE, HP_QUAD_SINGEDGE, HP_TRIG_SINGEDGECORNER1, HP_TRIG, HP_NONE, }; int reftrig_singedges3_newels[][8] = { // { 1, 4, 9, 5 }, { 1, 4, 9 }, { 5, 1, 9 }, { 4, 2, 6, 9 }, { 7, 5, 9, 8 }, { 3, 7, 8 }, { 6, 8, 9 }, }; HPRef_Struct reftrig_singedges3 = { HP_TRIG, reftrig_singedges3_splitedges, reftrig_singedges3_splitfaces, 0, reftrig_singedges3_newelstypes, reftrig_singedges3_newels }; // HP_TRIG_SINGEDGES23 int reftrig_singedges23_splitedges[][3] = { { 1, 2, 4 }, { 1, 3, 5 }, { 2, 1, 6 }, { 2, 3, 7 }, { 3, 1, 8 }, { 3, 2, 9 }, { 0, 0, 0 } }; int reftrig_singedges23_splitfaces[][4] = { { 1, 2, 3, 10 }, { 0, 0, 0, 0 } }; HPREF_ELEMENT_TYPE reftrig_singedges23_newelstypes[] = { // HP_QUAD_2E, HP_TRIG_SINGEDGECORNER1, HP_TRIG_SINGEDGECORNER2, HP_QUAD_SINGEDGE, HP_QUAD_SINGEDGE, HP_TRIG_SINGEDGECORNER2, HP_TRIG_SINGEDGECORNER1, HP_TRIG, HP_NONE, }; int reftrig_singedges23_newels[][8] = { // { 1, 4, 10, 5 }, { 1 , 4, 10 }, { 5, 1, 10 }, { 4, 6, 7, 10 }, { 8, 5, 10, 9 }, { 6, 2, 7 }, { 3, 8, 9 }, { 7, 9, 10 }, }; HPRef_Struct reftrig_singedges23 = { HP_TRIG, reftrig_singedges23_splitedges, reftrig_singedges23_splitfaces, 0, reftrig_singedges23_newelstypes, reftrig_singedges23_newels }; // HP_TRIG_3SINGEDGES int reftrig_3singedges_splitedges[][3] = { { 1, 2, 4 }, { 2, 1, 5 }, { 2, 3, 6 }, { 3, 2, 7 }, { 3, 1, 8 }, { 1, 3, 9 }, { 0, 0, 0 } }; int reftrig_3singedges_splitfaces[][4] = { { 1, 2, 3, 10 }, { 2, 3, 1, 11 }, { 3, 1, 2, 12 }, { 0, 0, 0, 0 } }; HPREF_ELEMENT_TYPE reftrig_3singedges_newelstypes[] = { HP_TRIG, HP_QUAD_SINGEDGE, HP_QUAD_SINGEDGE, HP_QUAD_SINGEDGE, HP_TRIG_SINGEDGECORNER1, HP_TRIG_SINGEDGECORNER2, HP_TRIG_SINGEDGECORNER1, HP_TRIG_SINGEDGECORNER2, HP_TRIG_SINGEDGECORNER1, HP_TRIG_SINGEDGECORNER2, HP_NONE, }; int reftrig_3singedges_newels[][8] = { { 10, 11, 12 }, { 4, 5, 11, 10 }, { 6, 7, 12, 11 }, { 8, 9, 10, 12 }, { 1, 4, 10 }, { 9, 1, 10 }, { 2, 6, 11 }, { 5, 2, 11 }, { 3, 8, 12 }, { 7, 3, 12 }, }; HPRef_Struct reftrig_3singedges = { HP_TRIG, reftrig_3singedges_splitedges, reftrig_3singedges_splitfaces, 0, reftrig_3singedges_newelstypes, reftrig_3singedges_newels }; netgen-6.2.1804/libsrc/meshing/ruler3.cpp0000644000175000017500000006740413272137567016650 0ustar kurtkurt#include #include "meshing.hpp" namespace netgen { extern double minother; extern double minwithoutother; static double CalcElementBadness (const Array & points, const Element & elem) { double vol, l, l4, l5, l6; if (elem.GetNP() != 4) { if (elem.GetNP() == 5) { double z = points[elem.PNum(5)].Z(); if (z > -1e-8) return 1e8; return (-1 / z) - z; // - 2; } return 0; } Vec3d v1 = points[elem.PNum(2)] - points[elem.PNum(1)]; Vec3d v2 = points[elem.PNum(3)] - points[elem.PNum(1)]; Vec3d v3 = points[elem.PNum(4)] - points[elem.PNum(1)]; vol = - (Cross (v1, v2) * v3); l4 = Dist (points[elem.PNum(2)], points[elem.PNum(3)]); l5 = Dist (points[elem.PNum(2)], points[elem.PNum(4)]); l6 = Dist (points[elem.PNum(3)], points[elem.PNum(4)]); l = v1.Length() + v2.Length() + v3.Length() + l4 + l5 + l6; // testout << "vol = " << vol << " l = " << l << endl; if (vol < 1e-8) return 1e10; // (*testout) << "l^3/vol = " << (l*l*l / vol) << endl; double err = pow (l*l*l/vol, 1.0/3.0) / 12; return err; } int Meshing3 :: ApplyRules ( Array & lpoints, // in: local points, out: old+new local points Array & allowpoint, // in: 2 .. it is allowed to use pointi, 1..will be allowed later, 0..no means Array & lfaces, // in: local faces, out: old+new local faces INDEX lfacesplit, // for local faces in outer radius INDEX_2_HASHTABLE & connectedpairs, // connected pairs for prism-meshing Array & elements, // out: new elements Array & delfaces, // out: face indices of faces to delete int tolerance, // quality class: 1 best double sloppy, // quality strength int rotind1, // how to rotate base element float & retminerr // element error ) { NgProfiler::RegionTimer regtot(97); float err, minerr, teterr, minteterr; char ok, found, hc; // vnetrule * rule; Vector oldu, newu, newu1, newu2, allp; Vec3d ui; Point3d np; const MiniElement2d * locface = NULL; int loktestmode; Array pused; // point is already mapped, number of uses Array fused; // face is already mapped Array pmap; // map of reference point to local point Array pfixed; // point mapped by face-map Array fmapi; // face in reference is mapped to face nr ... Array fmapr; // face in reference is rotated to map Array transfreezone; // transformed free-zone INDEX_2_CLOSED_HASHTABLE ledges(100); // edges in local environment Array tempnewpoints; Array tempnewfaces; Array tempdelfaces; Array tempelements; Array triboxes; // bounding boxes of local faces Array pnearness; Array fnearness; static int cnt = 0; cnt++; delfaces.SetSize (0); elements.SetSize (0); // determine topological distance of faces and points to // base element pnearness.SetSize (lpoints.Size()); fnearness.SetSize (lfacesplit); pnearness = INT_MAX/10; for (PointIndex pi : lfaces[0].PNums()) pnearness[pi] = 0; NgProfiler::RegionTimer reg2(98); NgProfiler::StartTimer (90); for (int loop = 0; loop < 2; loop++) { for (int i = 0; i < lfacesplit; i++) { const MiniElement2d & hface = lfaces[i]; int minn = INT_MAX-1; for (PointIndex pi : hface.PNums()) { int hi = pnearness[pi]; if (hi < minn) minn = hi; } if (minn < INT_MAX/10) for (PointIndex pi : hface.PNums()) if (pnearness[pi] > minn+1) pnearness[pi] = minn+1; } for (int i = 1; i <= connectedpairs.GetNBags(); i++) for (int j = 1; j <= connectedpairs.GetBagSize(i); j++) { INDEX_2 edge; int val; connectedpairs.GetData (i, j, edge, val); if (pnearness[edge.I1()] > pnearness[edge.I2()] + 1) pnearness[edge.I1()] = pnearness[edge.I2()] + 1; if (pnearness[edge.I2()] > pnearness[edge.I1()] + 1) pnearness[edge.I2()] = pnearness[edge.I1()] + 1; } } for (int i : fnearness.Range()) { int sum = 0; for (PointIndex pi : lfaces[i].PNums()) sum += pnearness[pi]; fnearness[i] = sum; } NgProfiler::StopTimer (90); NgProfiler::StartTimer (91); // find bounding boxes of faces triboxes.SetSize (lfaces.Size()); // for (int i = 0; i < lfaces.Size(); i++) for (auto i : lfaces.Range()) { const MiniElement2d & face = lfaces[i]; triboxes[i].SetPoint (lpoints[face[0]]); for (int j = 1; j < face.GetNP(); j++) triboxes[i].AddPoint (lpoints[face[j]]); } NgProfiler::StopTimer (91); NgProfiler::StartTimer (92); bool useedges = false; for (int ri = 0; ri < rules.Size(); ri++) if (rules[ri]->GetNEd()) useedges = true; if (useedges) { ledges.SetSize (5 * lfacesplit); for (int j = 0; j < lfacesplit; j++) // if (fnearness[j] <= 5) { const MiniElement2d & face = lfaces[j]; int newp, oldp; newp = face[face.GetNP()-1]; for (int k = 0; k < face.GetNP(); k++) { oldp = newp; newp = face[k]; ledges.Set (INDEX_2::Sort(oldp, newp), 1); } } } NgProfiler::StopTimer (92); NgProfiler::RegionTimer reg3(99); pused.SetSize (lpoints.Size()); fused.SetSize (lfaces.Size()); found = 0; minerr = tolfak * tolerance * tolerance; minteterr = sloppy * tolerance; if (testmode) (*testout) << "cnt = " << cnt << " class = " << tolerance << endl; // impossible, if no rule can be applied at any tolerance class bool impossible = 1; // check each rule: for (int ri = 1; ri <= rules.Size(); ri++) { int base = (lfaces[0].GetNP() == 3) ? 100 : 200; NgProfiler::RegionTimer regx1(base); NgProfiler::RegionTimer regx(base+ri); // sprintf (problems.Elem(ri), ""); *problems.Elem(ri) = '\0'; vnetrule * rule = rules.Get(ri); if (rule->GetNP(1) != lfaces[0].GetNP()) continue; if (rule->GetQuality() > tolerance) { if (rule->GetQuality() < 100) impossible = 0; if (testmode) sprintf (problems.Elem(ri), "Quality not ok"); continue; } if (testmode) sprintf (problems.Elem(ri), "no mapping found"); loktestmode = testmode || rule->TestFlag ('t') || tolerance > 5; if (loktestmode) (*testout) << "Rule " << ri << " = " << rule->Name() << endl; pmap.SetSize (rule->GetNP()); fmapi.SetSize (rule->GetNF()); fmapr.SetSize (rule->GetNF()); fused = 0; pused = 0; for (auto & p : pmap) p.Invalidate(); fmapi = 0; for (int i : fmapr.Range()) fmapr[i] = rule->GetNP(i+1); fused[0] = 1; fmapi[0] = 1; fmapr[0] = rotind1; for (int j = 1; j <= lfaces[0].GetNP(); j++) { PointIndex locpi = lfaces[0].PNumMod (j+rotind1); pmap.Set (rule->GetPointNr (1, j), locpi); pused[locpi]++; } /* map all faces nfok .. first nfok-1 faces are mapped properly */ int nfok = 2; NgProfiler::RegionTimer regfa(300); NgProfiler::RegionTimer regx2(base+50+ri); while (nfok >= 2) { if (nfok <= rule->GetNOldF()) { // not all faces mapped ok = 0; int locfi = fmapi.Get(nfok); int locfr = fmapr.Get(nfok); int actfnp = rule->GetNP(nfok); while (!ok) { locfr++; if (locfr == actfnp + 1) { locfr = 1; locfi++; if (locfi > lfacesplit) break; } if (fnearness.Get(locfi) > rule->GetFNearness (nfok) || fused.Get(locfi) || actfnp != lfaces.Get(locfi).GetNP() ) { // face not feasible in any rotation locfr = actfnp; } else { ok = 1; locface = &lfaces.Get(locfi); // reference point already mapped differently ? for (int j = 1; j <= actfnp && ok; j++) { PointIndex locpi = pmap.Get(rule->GetPointNr (nfok, j)); if (locpi.IsValid() && locpi != locface->PNumMod(j+locfr)) ok = 0; } // local point already used or point outside tolerance ? for (int j = 1; j <= actfnp && ok; j++) { int refpi = rule->GetPointNr (nfok, j); if (!pmap.Get(refpi).IsValid()) { PointIndex locpi = locface->PNumMod (j + locfr); if (pused[locpi]) ok = 0; else { const Point3d & lp = lpoints[locpi]; const Point3d & rp = rule->GetPoint(refpi); if ( Dist2 (lp, rp) * rule->PointDistFactor(refpi) > minerr) { impossible = 0; ok = 0; } } } } } } if (ok) { // map face nfok fmapi.Set (nfok, locfi); fmapr.Set (nfok, locfr); fused.Set (locfi, 1); for (int j = 1; j <= rule->GetNP (nfok); j++) { PointIndex locpi = locface->PNumMod(j+locfr); if (rule->GetPointNr (nfok, j) <= 3 && pmap.Get(rule->GetPointNr(nfok, j)) != locpi) (*testout) << "change face1 point, mark1" << endl; pmap.Set(rule->GetPointNr (nfok, j), locpi); pused[locpi]++; } nfok++; } else { // backtrack one face fmapi.Set (nfok, 0); fmapr.Set (nfok, rule->GetNP(nfok)); nfok--; fused.Set (fmapi.Get(nfok), 0); for (int j = 1; j <= rule->GetNP (nfok); j++) { int refpi = rule->GetPointNr (nfok, j); pused[pmap.Get(refpi)]--; if (pused[pmap.Get(refpi)] == 0) { // pmap.Set(refpi, 0); pmap.Elem(refpi).Invalidate(); } } } } else { NgProfiler::RegionTimer regfb(301); // all faces are mapped // now map all isolated points: if (loktestmode) { (*testout) << "Faces Ok" << endl; sprintf (problems.Elem(ri), "Faces Ok"); } int npok = 1; int incnpok = 1; pfixed.SetSize (pmap.Size()); /* for (int i = 1; i <= pmap.Size(); i++) pfixed.Set(i, (pmap.Get(i) != 0) ); */ for (int i : pmap.Range()) pfixed[i] = pmap[i].IsValid(); while (npok >= 1) { if (npok <= rule->GetNOldP()) { if (pfixed.Get(npok)) { if (incnpok) npok++; else npok--; } else { PointIndex locpi = pmap.Elem(npok); ok = 0; if (locpi.IsValid()) pused[locpi]--; while (!ok && locpi < lpoints.Size()-1+PointIndex::BASE) { ok = 1; locpi++; if (pused[locpi] || pnearness[locpi] > rule->GetPNearness(npok)) { ok = 0; } else if (allowpoint[locpi] != 2) { ok = 0; if (allowpoint[locpi] == 1) impossible = 0; } else { const Point3d & lp = lpoints[locpi]; const Point3d & rp = rule->GetPoint(npok); if ( Dist2 (lp, rp) * rule->PointDistFactor(npok) > minerr) { ok = 0; impossible = 0; } } } if (ok) { pmap.Set (npok, locpi); if (npok <= 3) (*testout) << "set face1 point, mark3" << endl; pused[locpi]++; npok++; incnpok = 1; } else { // pmap.Set (npok, 0); pmap.Elem(npok).Invalidate(); if (npok <= 3) (*testout) << "set face1 point, mark4" << endl; npok--; incnpok = 0; } } } else { NgProfiler::RegionTimer regfa2(302); // all points are mapped if (loktestmode) { (*testout) << "Mapping found!!: Rule " << rule->Name() << endl; for (auto pi : pmap) (*testout) << pi << " "; (*testout) << endl; sprintf (problems.Elem(ri), "mapping found"); (*testout) << rule->GetNP(1) << " = " << lfaces.Get(1).GetNP() << endl; } ok = 1; // check mapedges: for (int i = 1; i <= rule->GetNEd(); i++) { INDEX_2 in2(pmap.Get(rule->GetEdge(i).i1), pmap.Get(rule->GetEdge(i).i2)); in2.Sort(); if (!ledges.Used (in2)) ok = 0; } // check prism edges: for (int i = 1; i <= rule->GetNE(); i++) { const Element & el = rule->GetElement (i); if (el.GetType() == PRISM) { for (int j = 1; j <= 3; j++) { INDEX_2 in2(pmap.Get(el.PNum(j)), pmap.Get(el.PNum(j+3))); in2.Sort(); if (!connectedpairs.Used (in2)) ok = 0; } } if (el.GetType() == PYRAMID) { if (loktestmode) (*testout) << "map pyramid, rule = " << rule->Name() << endl; for (int j = 1; j <= 2; j++) { INDEX_2 in2; if (j == 1) { in2.I1() = pmap.Get(el.PNum(2)); in2.I2() = pmap.Get(el.PNum(3)); } else { in2.I1() = pmap.Get(el.PNum(1)); in2.I2() = pmap.Get(el.PNum(4)); } in2.Sort(); if (!connectedpairs.Used (in2)) { ok = 0; if (loktestmode) (*testout) << "no pair" << endl; } } } } for (int i = rule->GetNOldF() + 1; i <= rule->GetNF(); i++) fmapi.Set(i, 0); if (ok) { foundmap.Elem(ri)++; } // deviation of existing points oldu.SetSize (3 * rule->GetNOldP()); newu.SetSize (3 * (rule->GetNP() - rule->GetNOldP())); allp.SetSize (3 * rule->GetNP()); for (int i = 1; i <= rule->GetNOldP(); i++) { const Point3d & lp = lpoints[pmap.Get(i)]; const Point3d & rp = rule->GetPoint(i); oldu (3*i-3) = lp.X()-rp.X(); oldu (3*i-2) = lp.Y()-rp.Y(); oldu (3*i-1) = lp.Z()-rp.Z(); allp (3*i-3) = lp.X(); allp (3*i-2) = lp.Y(); allp (3*i-1) = lp.Z(); } if (rule->GetNP() > rule->GetNOldP()) { newu.SetSize (rule->GetOldUToNewU().Height()); rule->GetOldUToNewU().Mult (oldu, newu); } // int idiff = 3 * (rule->GetNP()-rule->GetNOldP()); int idiff = 3 * rule->GetNOldP(); for (int i = rule->GetNOldP()+1; i <= rule->GetNP(); i++) { const Point3d & rp = rule->GetPoint(i); allp (3*i-3) = rp.X() + newu(3*i-3 - idiff); allp (3*i-2) = rp.Y() + newu(3*i-2 - idiff); allp (3*i-1) = rp.Z() + newu(3*i-1 - idiff); } rule->SetFreeZoneTransformation (allp, tolerance + int(sloppy)); if (!rule->ConvexFreeZone()) { ok = 0; sprintf (problems.Elem(ri), "Freezone not convex"); if (loktestmode) (*testout) << "Freezone not convex" << endl; } if (loktestmode) { const Array & fz = rule->GetTransFreeZone(); (*testout) << "Freezone: " << endl; for (int i = 1; i <= fz.Size(); i++) (*testout) << fz.Get(i) << endl; } // check freezone: for (int i = 1; i <= lpoints.Size(); i++) { if ( !pused.Get(i) ) { const Point3d & lp = lpoints.Get(i); if (rule->fzbox.IsIn (lp)) { if (rule->IsInFreeZone(lp)) { if (loktestmode) { (*testout) << "Point " << i << " in Freezone" << endl; sprintf (problems.Elem(ri), "locpoint %d in Freezone", i); } ok = 0; break; } } } } for (int i = 1; i <= lfaces.Size() && ok; i++) { static Array lpi(4); if (!fused.Get(i)) { int triin; const MiniElement2d & lfacei = lfaces.Get(i); if (!triboxes.Elem(i).Intersect (rule->fzbox)) triin = 0; else { int li, lj; for (li = 1; li <= lfacei.GetNP(); li++) { int lpii = 0; PointIndex pi = lfacei.PNum(li); for (lj = 1; lj <= rule->GetNOldP(); lj++) if (pmap.Get(lj) == pi) lpii = lj; lpi.Elem(li) = lpii; } if (lfacei.GetNP() == 3) { triin = rule->IsTriangleInFreeZone ( lpoints[lfacei.PNum(1)], lpoints[lfacei.PNum(2)], lpoints[lfacei.PNum(3)], lpi, 1 ); } else { triin = rule->IsQuadInFreeZone ( lpoints[lfacei.PNum(1)], lpoints[lfacei.PNum(2)], lpoints[lfacei.PNum(3)], lpoints[lfacei.PNum(4)], lpi, 1 ); } } if (triin == -1) { ok = 0; } if (triin == 1) { #ifdef TEST_JS ok = 0; if (loktestmode) { (*testout) << "El with " << lfaces.Get(i).GetNP() << " points in freezone: " << lfaces.Get(i).PNum(1) << " - " << lfaces.Get(i).PNum(2) << " - " << lfaces.Get(i).PNum(3) << " - " << lfaces.Get(i).PNum(4) << endl; for (int lj = 1; lj <= lfaces.Get(i).GetNP(); lj++) (*testout) << lpoints[lfaces.Get(i).PNum(lj)] << " "; (*testout) << endl; sprintf (problems.Elem(ri), "triangle (%d, %d, %d) in Freezone", lfaces.Get(i).PNum(1), lfaces.Get(i).PNum(2), lfaces.Get(i).PNum(3)); } #else if (loktestmode) { if (lfacei.GetNP() == 3) { (*testout) << "Triangle in freezone: " << lfacei.PNum(1) << " - " << lfacei.PNum(2) << " - " << lfacei.PNum(3) << ", or " << lpoints[lfacei.PNum(1)] << " - " << lpoints[lfacei.PNum(2)] << " - " << lpoints[lfacei.PNum(3)] << endl; (*testout) << "lpi = " << lpi.Get(1) << ", " << lpi.Get(2) << ", " << lpi.Get(3) << endl; } else (*testout) << "Quad in freezone: " << lfacei.PNum(1) << " - " << lfacei.PNum(2) << " - " << lfacei.PNum(3) << " - " << lfacei.PNum(4) << ", or " << lpoints[lfacei.PNum(1)] << " - " << lpoints[lfacei.PNum(2)] << " - " << lpoints[lfacei.PNum(3)] << " - " << lpoints[lfacei.PNum(4)] << endl; sprintf (problems.Elem(ri), "triangle (%d, %d, %d) in Freezone", int(lfaces.Get(i).PNum(1)), int(lfaces.Get(i).PNum(2)), int(lfaces.Get(i).PNum(3))); } hc = 0; for (int k = rule->GetNOldF() + 1; k <= rule->GetNF(); k++) { if (rule->GetPointNr(k, 1) <= rule->GetNOldP() && rule->GetPointNr(k, 2) <= rule->GetNOldP() && rule->GetPointNr(k, 3) <= rule->GetNOldP()) { for (int j = 1; j <= 3; j++) if (lfaces.Get(i).PNumMod(j ) == pmap.Get(rule->GetPointNr(k, 1)) && lfaces.Get(i).PNumMod(j+1) == pmap.Get(rule->GetPointNr(k, 3)) && lfaces.Get(i).PNumMod(j+2) == pmap.Get(rule->GetPointNr(k, 2))) { fmapi.Elem(k) = i; hc = 1; // (*testout) << "found from other side: " // << rule->Name() // << " ( " << pmap.Get (rule->GetPointNr(k, 1)) // << " - " << pmap.Get (rule->GetPointNr(k, 2)) // << " - " << pmap.Get (rule->GetPointNr(k, 3)) << " ) " // << endl; strcpy (problems.Elem(ri), "other"); } } } if (!hc) { if (loktestmode) { (*testout) << "Triangle in freezone: " << lfaces.Get(i).PNum(1) << " - " << lfaces.Get(i).PNum(2) << " - " << lfaces.Get(i).PNum(3) << endl; sprintf (problems.Elem(ri), "triangle (%d, %d, %d) in Freezone", int (lfaces.Get(i).PNum(1)), int (lfaces.Get(i).PNum(2)), int (lfaces.Get(i).PNum(3))); } ok = 0; } #endif } } } if (ok) { err = 0; for (int i = 1; i <= rule->GetNOldP(); i++) { double hf = rule->CalcPointDist (i, lpoints[pmap.Get(i)]); if (hf > err) err = hf; } if (loktestmode) { (*testout) << "Rule ok" << endl; sprintf (problems.Elem(ri), "Rule ok, err = %f", err); } // newu = rule->GetOldUToNewU() * oldu; // set new points: int oldnp = rule->GetNOldP(); int noldlp = lpoints.Size(); int noldlf = lfaces.Size(); for (int i = oldnp + 1; i <= rule->GetNP(); i++) { np = rule->GetPoint(i); np.X() += newu (3 * (i-oldnp) - 3); np.Y() += newu (3 * (i-oldnp) - 2); np.Z() += newu (3 * (i-oldnp) - 1); lpoints.Append (np); pmap.Elem(i) = lpoints.Size()-1+PointIndex::BASE; } // Set new Faces: for (int i = rule->GetNOldF() + 1; i <= rule->GetNF(); i++) if (!fmapi.Get(i)) { MiniElement2d nface(rule->GetNP(i)); for (int j = 1; j <= nface.GetNP(); j++) nface.PNum(j) = pmap.Get(rule->GetPointNr (i, j)); lfaces.Append (nface); } // Delete old Faces: for (int i = 1; i <= rule->GetNDelF(); i++) delfaces.Append (fmapi.Get(rule->GetDelFace(i))); for (int i = rule->GetNOldF()+1; i <= rule->GetNF(); i++) if (fmapi.Get(i)) { delfaces.Append (fmapi.Get(i)); fmapi.Elem(i) = 0; } // check orientation for (int i = 1; i <= rule->GetNO() && ok; i++) { const fourint * fouri; fouri = &rule->GetOrientation(i); Vec3d v1 (lpoints[pmap.Get(fouri->i1)], lpoints[pmap.Get(fouri->i2)]); Vec3d v2 (lpoints[pmap.Get(fouri->i1)], lpoints[pmap.Get(fouri->i3)]); Vec3d v3 (lpoints[pmap.Get(fouri->i1)], lpoints[pmap.Get(fouri->i4)]); Vec3d n; Cross (v1, v2, n); //if (n * v3 >= -1e-7*n.Length()*v3.Length()) // OR -1e-7??? if (n * v3 >= -1e-9) { if (loktestmode) { sprintf (problems.Elem(ri), "Orientation wrong"); (*testout) << "Orientation wrong ("<< n*v3 << ")" << endl; } ok = 0; } } // new points in free-zone ? for (int i = rule->GetNOldP() + 1; i <= rule->GetNP() && ok; i++) if (!rule->IsInFreeZone (lpoints.Get(pmap.Get(i)))) { if (loktestmode) { (*testout) << "Newpoint " << lpoints.Get(pmap.Get(i)) << " outside convex hull" << endl; sprintf (problems.Elem(ri), "newpoint outside convex hull"); } ok = 0; } // insert new elements for (int i = 1; i <= rule->GetNE(); i++) { elements.Append (rule->GetElement(i)); for (int j = 1; j <= elements.Get(i).NP(); j++) elements.Elem(i).PNum(j) = pmap.Get(elements.Get(i).PNum(j)); } // Calculate Element badness teterr = 0; for (int i = 1; i <= elements.Size(); i++) { double hf = CalcElementBadness (lpoints, elements.Get(i)); if (hf > teterr) teterr = hf; } /* // keine gute Erfahrung am 25.1.2000, js if (ok && teterr < 100 && (rule->TestFlag('b') || tolerance > 10) ) { (*mycout) << "Reset teterr " << rule->Name() << " err = " << teterr << endl; teterr = 1; } */ // compare edgelength if (rule->TestFlag('l')) { double oldlen = 0; double newlen = 0; for (int i = 1; i <= rule->GetNDelF(); i++) { const Element2d & face = rule->GetFace (rule->GetDelFace(i)); for (int j = 1; j <= 3; j++) { const Point3d & p1 = lpoints[pmap.Get(face.PNumMod(j))]; const Point3d & p2 = lpoints[pmap.Get(face.PNumMod(j+1))]; oldlen += Dist(p1, p2); } } for (int i = rule->GetNOldF()+1; i <= rule->GetNF(); i++) { const Element2d & face = rule->GetFace (i); for (int j = 1; j <= 3; j++) { const Point3d & p1 = lpoints[pmap.Get(face.PNumMod(j))]; const Point3d & p2 = lpoints[pmap.Get(face.PNumMod(j+1))]; newlen += Dist(p1, p2); } } if (oldlen < newlen) { ok = 0; if (loktestmode) sprintf (problems.Elem(ri), "oldlen < newlen"); } } if (loktestmode) (*testout) << "ok = " << int(ok) << "teterr = " << teterr << "minteterr = " << minteterr << endl; if (ok && teterr < tolerance) { canuse.Elem(ri) ++; /* (*testout) << "can use rule " << rule->Name() << ", err = " << teterr << endl; for (i = 1; i <= pmap.Size(); i++) (*testout) << pmap.Get(i) << " "; (*testout) << endl; */ if (strcmp (problems.Elem(ri), "other") == 0) { if (teterr < minother) minother = teterr; } else { if (teterr < minwithoutother) minwithoutother = teterr; } } if (teterr > minteterr) impossible = 0; if (ok && teterr < minteterr) { if (loktestmode) (*testout) << "use rule" << endl; found = ri; minteterr = teterr; if (testmode) { for (int i = 1; i <= rule->GetNOldP(); i++) { (*testout) << "P" << i << ": Ref: " << rule->GetPoint (i) << " is: " << lpoints.Get(pmap.Get(i)) << endl; } } tempnewpoints.SetSize (0); for (int i = noldlp+1; i <= lpoints.Size(); i++) tempnewpoints.Append (lpoints.Get(i)); tempnewfaces.SetSize (0); for (int i = noldlf+1; i <= lfaces.Size(); i++) tempnewfaces.Append (lfaces.Get(i)); tempdelfaces.SetSize (0); for (int i = 1; i <= delfaces.Size(); i++) tempdelfaces.Append (delfaces.Get(i)); tempelements.SetSize (0); for (int i = 1; i <= elements.Size(); i++) tempelements.Append (elements.Get(i)); } lpoints.SetSize (noldlp); lfaces.SetSize (noldlf); delfaces.SetSize (0); elements.SetSize (0); } npok = rule->GetNOldP(); incnpok = 0; } } nfok = rule->GetNOldF(); for (int j = 1; j <= rule->GetNP (nfok); j++) { int refpi = rule->GetPointNr (nfok, j); pused[pmap.Get(refpi)]--; if (pused[pmap.Get(refpi)] == 0) pmap.Elem(refpi).Invalidate(); } } } if (loktestmode) (*testout) << "end rule" << endl; } if (found) { /* for (i = 1; i <= tempnewpoints.Size(); i++) lpoints.Append (tempnewpoints.Get(i)); */ for (Point3d p : tempnewpoints) lpoints.Append(p); /* for (i = 1; i <= tempnewfaces.Size(); i++) if (tempnewfaces.Get(i).PNum(1)) lfaces.Append (tempnewfaces.Get(i)); */ for (int i : tempnewfaces.Range()) if (tempnewfaces[i].PNum(1).IsValid()) lfaces.Append (tempnewfaces[i]); /* for (i = 1; i <= tempdelfaces.Size(); i++) delfaces.Append (tempdelfaces.Get(i)); */ for (int i : tempdelfaces.Range()) delfaces.Append (tempdelfaces[i]); /* for (i = 1; i <= tempelements.Size(); i++) elements.Append (tempelements.Get(i)); */ for (int i : tempelements.Range()) elements.Append (tempelements[i]); } retminerr = minerr; if (impossible && found == 0) return -1; return found; } } netgen-6.2.1804/libsrc/meshing/parser3.cpp0000644000175000017500000005261113272137567017005 0ustar kurtkurt#include #include "meshing.hpp" #ifdef WIN32 #define COMMASIGN ':' #else #define COMMASIGN ',' #endif namespace netgen { extern const char * tetrules[]; void LoadVMatrixLine (istream & ist, DenseMatrix & m, int line) { char ch; int pnum; float f; ist >> ch; while (ch != '}') { ist.putback (ch); ist >> f; ist >> ch; ist >> pnum; if (ch == 'x' || ch == 'X') m.Elem(line, 3 * pnum - 2) = f; if (ch == 'y' || ch == 'Y') m.Elem(line, 3 * pnum - 1) = f; if (ch == 'z' || ch == 'Z') m.Elem(line, 3 * pnum ) = f; if (ch == 'p' || ch == 'P') { m.Elem(line , 3 * pnum-2) = f; m.Elem(line+1, 3 * pnum-1) = f; m.Elem(line+2, 3 * pnum ) = f; } ist >> ch; if (ch == COMMASIGN) ist >> ch; } } int vnetrule :: NeighbourTrianglePoint (const threeint & t1, const threeint & t2) const { Array tr1(3); Array tr2(3); tr1.Elem(1)=t1.i1; tr1.Elem(2)=t1.i2; tr1.Elem(3)=t1.i3; tr2.Elem(1)=t2.i1; tr2.Elem(2)=t2.i2; tr2.Elem(3)=t2.i3; int ret=0; for (int i=1; i<=3; i++) { for (int j=1; j<=3; j++) { if ((tr1.Get(i)==tr2.Get(j) && tr1.Get((i%3)+1)==tr2.Get((j%3)+1)) || (tr1.Get(i)==tr2.Get((j%3)+1) && tr1.Get((i%3)+1)==tr2.Get(j))) {ret = tr2.Get((j+1)%3+1);} } } return ret; } void vnetrule :: LoadRule (istream & ist) { char buf[256]; char ch, ok; Point3d p; Element2d face(TRIG); int i, j, i1, i2, i3, fs, ii, ii1, ii2, ii3; twoint edge; DenseMatrix tempoldutonewu(30, 20), tempoldutofreezone(30, 20), tempoldutofreezonelimit(30, 20), tfz(20, 20), tfzl(20, 20); tempoldutonewu = 0; tempoldutofreezone = 0; tfz = 0; tfzl = 0; noldp = 0; noldf = 0; ist.get (buf, sizeof(buf), '"'); ist.get (ch); ist.get (buf, sizeof(buf), '"'); ist.get (ch); delete [] name; name = new char[strlen (buf) + 1]; strcpy (name, buf); // (*mycout) << "Rule " << name << " found." << endl; do { ist >> buf; if (strcmp (buf, "quality") == 0) { ist >> quality; } else if (strcmp (buf, "flags") == 0) { ist >> ch; while (ch != ';') { flags.Append (ch); ist >> ch; } } else if (strcmp (buf, "mappoints") == 0) { ist >> ch; while (ch == '(') { ist >> p.X(); ist >> ch; // ',' ist >> p.Y(); ist >> ch; // ',' ist >> p.Z(); ist >> ch; // ')' points.Append (p); noldp++; tolerances.SetSize (noldp); tolerances.Elem(noldp) = 1; ist >> ch; while (ch != ';') { if (ch == '{') { ist >> tolerances.Elem(noldp); ist >> ch; // '}' } ist >> ch; } ist >> ch; } ist.putback (ch); } else if (strcmp (buf, "mapfaces") == 0) { ist >> ch; while (ch == '(') { face.SetType(TRIG); ist >> face.PNum(1); ist >> ch; // ',' ist >> face.PNum(2); ist >> ch; // ',' ist >> face.PNum(3); ist >> ch; // ')' or ',' if (ch == COMMASIGN) { face.SetType(QUAD); ist >> face.PNum(4); ist >> ch; // ')' } faces.Append (face); noldf++; ist >> ch; while (ch != ';') { if (ch == 'd') { delfaces.Append (noldf); ist >> ch; // 'e' ist >> ch; // 'l' } ist >> ch; } ist >> ch; } ist.putback (ch); } else if (strcmp (buf, "mapedges") == 0) { ist >> ch; while (ch == '(') { ist >> edge.i1; ist >> ch; // ',' ist >> edge.i2; ist >> ch; // ')' edges.Append (edge); ist >> ch; while (ch != ';') { ist >> ch; } ist >> ch; } ist.putback (ch); } else if (strcmp (buf, "newpoints") == 0) { ist >> ch; while (ch == '(') { ist >> p.X(); ist >> ch; // ',' ist >> p.Y(); ist >> ch; // ',' ist >> p.Z(); ist >> ch; // ')' points.Append (p); ist >> ch; while (ch != ';') { if (ch == '{') { LoadVMatrixLine (ist, tempoldutonewu, 3 * (points.Size()-noldp) - 2); ist >> ch; // '{' LoadVMatrixLine (ist, tempoldutonewu, 3 * (points.Size()-noldp) - 1); ist >> ch; // '{' LoadVMatrixLine (ist, tempoldutonewu, 3 * (points.Size()-noldp) ); } ist >> ch; } ist >> ch; } ist.putback (ch); } else if (strcmp (buf, "newfaces") == 0) { ist >> ch; while (ch == '(') { face.SetType(TRIG); ist >> face.PNum(1); ist >> ch; // ',' ist >> face.PNum(2); ist >> ch; // ',' ist >> face.PNum(3); ist >> ch; // ')' or ',' if (ch == COMMASIGN) { face.SetType(QUAD); ist >> face.PNum(4); ist >> ch; // ')' } faces.Append (face); ist >> ch; while (ch != ';') { ist >> ch; } ist >> ch; } ist.putback (ch); } else if (strcmp (buf, "freezone") == 0) { ist >> ch; while (ch == '(') { ist >> p.X(); ist >> ch; // ',' ist >> p.Y(); ist >> ch; // ',' ist >> p.Z(); ist >> ch; // ')' freezone.Append (p); ist >> ch; while (ch != ';') { if (ch == '{') { LoadVMatrixLine (ist, tempoldutofreezone, 3 * freezone.Size() - 2); ist >> ch; // '{' LoadVMatrixLine (ist, tempoldutofreezone, 3 * freezone.Size() - 1); ist >> ch; // '{' LoadVMatrixLine (ist, tempoldutofreezone, 3 * freezone.Size() ); } ist >> ch; } ist >> ch; } ist.putback (ch); } else if (strcmp (buf, "freezone2") == 0) { int k, nfp; nfp = 0; ist >> ch; DenseMatrix hm1(3, 50), hm2(50, 50), hm3(50, 50); hm3 = 0; while (ch == '{') { hm1 = 0; nfp++; LoadVMatrixLine (ist, hm1, 1); for (i = 1; i <= points.Size(); i++) tfz.Elem(nfp, i) = hm1.Get(1, 3*i-2); p.X() = p.Y() = p.Z() = 0; for (i = 1; i <= points.Size(); i++) { p.X() += hm1.Get(1, 3*i-2) * points.Get(i).X(); p.Y() += hm1.Get(1, 3*i-2) * points.Get(i).Y(); p.Z() += hm1.Get(1, 3*i-2) * points.Get(i).Z(); } freezone.Append (p); freezonelimit.Append (p); hm2 = 0; for (i = 1; i <= 3 * noldp; i++) hm2.Elem(i, i) = 1; for (i = 1; i <= 3 * noldp; i++) for (j = 1; j <= 3 * (points.Size() - noldp); j++) hm2.Elem(j + 3 * noldp, i) = tempoldutonewu.Get(j, i); for (i = 1; i <= 3; i++) for (j = 1; j <= 3 * noldp; j++) { double sum = 0; for (k = 1; k <= 3 * points.Size(); k++) sum += hm1.Get(i, k) * hm2.Get(k, j); hm3.Elem(i + 3 * (nfp-1), j) = sum; } // (*testout) << "freepoint: " << p << endl; while (ch != ';') ist >> ch; ist >> ch; } tfzl = tfz; tempoldutofreezone = hm3; tempoldutofreezonelimit = hm3; ist.putback(ch); } else if (strcmp (buf, "freezonelimit") == 0) { int k, nfp; nfp = 0; ist >> ch; DenseMatrix hm1(3, 50), hm2(50, 50), hm3(50, 50); hm3 = 0; while (ch == '{') { hm1 = 0; nfp++; LoadVMatrixLine (ist, hm1, 1); for (i = 1; i <= points.Size(); i++) tfzl.Elem(nfp, i) = hm1.Get(1, 3*i-2); p.X() = p.Y() = p.Z() = 0; for (i = 1; i <= points.Size(); i++) { p.X() += hm1.Get(1, 3*i-2) * points.Get(i).X(); p.Y() += hm1.Get(1, 3*i-2) * points.Get(i).Y(); p.Z() += hm1.Get(1, 3*i-2) * points.Get(i).Z(); } freezonelimit.Elem(nfp) = p; hm2 = 0; for (i = 1; i <= 3 * noldp; i++) hm2.Elem(i, i) = 1; for (i = 1; i <= 3 * noldp; i++) for (j = 1; j <= 3 * (points.Size() - noldp); j++) hm2.Elem(j + 3 * noldp, i) = tempoldutonewu.Get(j, i); for (i = 1; i <= 3; i++) for (j = 1; j <= 3 * noldp; j++) { double sum = 0; for (k = 1; k <= 3 * points.Size(); k++) sum += hm1.Get(i, k) * hm2.Get(k, j); hm3.Elem(i + 3 * (nfp-1), j) = sum; } // (*testout) << "freepoint: " << p << endl; while (ch != ';') ist >> ch; ist >> ch; } tempoldutofreezonelimit = hm3; ist.putback(ch); } else if (strcmp (buf, "freeset") == 0) { freesets.Append (new Array); ist >> ch; while (ch != ';') { ist.putback (ch); ist >> i; freesets.Last()->Append(i); ist >> ch; } } else if (strcmp (buf, "elements") == 0) { ist >> ch; while (ch == '(') { elements.Append (Element(TET)); // elements.Last().SetNP(1); ist >> elements.Last().PNum(1); ist >> ch; // ',' if (ch == COMMASIGN) { // elements.Last().SetNP(2); ist >> elements.Last().PNum(2); ist >> ch; // ',' } if (ch == COMMASIGN) { // elements.Last().SetNP(3); ist >> elements.Last().PNum(3); ist >> ch; // ',' } if (ch == COMMASIGN) { // elements.Last().SetNP(4); elements.Last().SetType(TET); ist >> elements.Last().PNum(4); ist >> ch; // ',' } if (ch == COMMASIGN) { // elements.Last().SetNP(5); elements.Last().SetType(PYRAMID); ist >> elements.Last().PNum(5); ist >> ch; // ',' } if (ch == COMMASIGN) { // elements.Last().SetNP(6); elements.Last().SetType(PRISM); ist >> elements.Last().PNum(6); ist >> ch; // ',' } if (ch == COMMASIGN) { // elements.Last().SetNP(6); elements.Last().SetType(HEX); ist >> elements.Last().PNum(7); ist >> ch; // ',' } if (ch == COMMASIGN) { // elements.Last().SetNP(6); elements.Last().SetType(HEX); ist >> elements.Last().PNum(8); ist >> ch; // ',' } /* orientations.Append (fourint()); orientations.Last().i1 = elements.Last().PNum(1); orientations.Last().i2 = elements.Last().PNum(2); orientations.Last().i3 = elements.Last().PNum(3); orientations.Last().i4 = elements.Last().PNum(4); */ ist >> ch; while (ch != ';') { ist >> ch; } ist >> ch; } ist.putback (ch); } else if (strcmp (buf, "orientations") == 0) { ist >> ch; while (ch == '(') { // fourint a = fourint(); orientations.Append (fourint()); ist >> orientations.Last().i1; ist >> ch; // ',' ist >> orientations.Last().i2; ist >> ch; // ',' ist >> orientations.Last().i3; ist >> ch; // ',' ist >> orientations.Last().i4; ist >> ch; // ',' ist >> ch; while (ch != ';') { ist >> ch; } ist >> ch; } ist.putback (ch); } else if (strcmp (buf, "endrule") != 0) { PrintSysError ("Parser3d, unknown token " , buf); } } while (!ist.eof() && strcmp (buf, "endrule") != 0); // (*testout) << endl; // (*testout) << Name() << endl; // (*testout) << "no1 = " << GetNO() << endl; oldutonewu.SetSize (3 * (points.Size() - noldp), 3 * noldp); oldutonewu = 0; for (i = 1; i <= oldutonewu.Height(); i++) for (j = 1; j <= oldutonewu.Width(); j++) oldutonewu.Elem(i, j) = tempoldutonewu.Elem(i, j); /* oldutofreezone = new SparseMatrixFlex (3 * freezone.Size(), 3 * noldp); oldutofreezonelimit = new SparseMatrixFlex (3 * freezone.Size(), 3 * noldp); oldutofreezone -> SetSymmetric(0); oldutofreezonelimit -> SetSymmetric(0); */ /* oldutofreezone = new DenseMatrix (3 * freezone.Size(), 3 * noldp); oldutofreezonelimit = new DenseMatrix (3 * freezone.Size(), 3 * noldp); for (i = 1; i <= oldutofreezone->Height(); i++) for (j = 1; j <= oldutofreezone->Width(); j++) // if (j == 4 || j >= 7) { if (tempoldutofreezone.Elem(i, j)) (*oldutofreezone)(i, j) = tempoldutofreezone(i, j); if (tempoldutofreezonelimit.Elem(i, j)) (*oldutofreezonelimit)(i, j) = tempoldutofreezonelimit(i, j); } */ oldutofreezone = new DenseMatrix (freezone.Size(), points.Size()); oldutofreezonelimit = new DenseMatrix (freezone.Size(), points.Size()); // oldutofreezone = new SparseMatrixFlex (freezone.Size(), points.Size()); // oldutofreezonelimit = new SparseMatrixFlex (freezone.Size(), points.Size()); for (i = 1; i <= freezone.Size(); i++) for (j = 1; j <= points.Size(); j++) { if (tfz.Elem(i, j)) (*oldutofreezone).Elem(i, j) = tfz.Elem(i, j); if (tfzl.Elem(i, j)) (*oldutofreezonelimit).Elem(i, j) = tfzl.Elem(i, j); } /* (*testout) << "Rule " << Name() << endl; (*testout) << "oldutofreezone = " << (*oldutofreezone) << endl; (*testout) << "oldutofreezonelimit = " << (*oldutofreezonelimit) << endl; */ freezonepi.SetSize (freezone.Size()); for (i = 1; i <= freezonepi.Size(); i++) freezonepi.Elem(i) = 0; for (i = 1; i <= freezone.Size(); i++) for (j = 1; j <= noldp; j++) if (Dist (freezone.Get(i), points.Get(j)) < 1e-8) freezonepi.Elem(i) = j; for (i = 1; i <= elements.Size(); i++) { if (elements.Elem(i).GetNP() == 4) { orientations.Append (fourint()); orientations.Last().i1 = elements.Get(i).PNum(1); orientations.Last().i2 = elements.Get(i).PNum(2); orientations.Last().i3 = elements.Get(i).PNum(3); orientations.Last().i4 = elements.Get(i).PNum(4); } if (elements.Elem(i).GetNP() == 5) { orientations.Append (fourint()); orientations.Last().i1 = elements.Get(i).PNum(1); orientations.Last().i2 = elements.Get(i).PNum(2); orientations.Last().i3 = elements.Get(i).PNum(3); orientations.Last().i4 = elements.Get(i).PNum(5); orientations.Append (fourint()); orientations.Last().i1 = elements.Get(i).PNum(1); orientations.Last().i2 = elements.Get(i).PNum(3); orientations.Last().i3 = elements.Get(i).PNum(4); orientations.Last().i4 = elements.Get(i).PNum(5); } } if (freesets.Size() == 0) { freesets.Append (new Array); for (i = 1; i <= freezone.Size(); i++) freesets.Elem(1)->Append(i); } // testout << "Freezone: " << endl; // for (i = 1; i <= freezone.Size(); i++) // (*testout) << "freepoint: " << freezone.Get(i) << endl; Vector vp(points.Size()), vfp(freezone.Size()); if (quality < 100) { for (int i = 1; i <= 3; i++) { for (int j = 1; j <= points.Size(); j++) vp(j-1) = points.Get(j).X(i); oldutofreezone->Mult(vp, vfp); for (int j = 1; j <= freezone.Size(); j++) freezone.Elem(j).X(i) = vfp(j-1); } // for (i = 1; i <= freezone.Size(); i++) // (*testout) << "freepoint: " << freezone.Get(i) << endl; } for (fs = 1; fs <= freesets.Size(); fs++) { freefaces.Append (new Array); Array & freeset = *freesets.Elem(fs); Array & freesetfaces = *freefaces.Last(); for (ii1 = 1; ii1 <= freeset.Size(); ii1++) for (ii2 = 1; ii2 <= freeset.Size(); ii2++) for (ii3 = 1; ii3 <= freeset.Size(); ii3++) if (ii1 < ii2 && ii1 < ii3 && ii2 != ii3) { i1 = freeset.Get(ii1); i2 = freeset.Get(ii2); i3 = freeset.Get(ii3); Vec3d v1, v2, n; v1 = freezone.Get(i3) - freezone.Get(i1); v2 = freezone.Get(i2) - freezone.Get(i1); n = Cross (v1, v2); n /= n.Length(); // (*testout) << "i1,2,3 = " << i1 << ", " << i2 << ", " << i3 << endl; // (*testout) << "v1 = " << v1 << " v2 = " << v2 << " n = " << n << endl; ok = 1; for (ii = 1; ii <= freeset.Size(); ii++) { i = freeset.Get(ii); // (*testout) << "i = " << i << endl; if (i != i1 && i != i2 && i != i3) if ( (freezone.Get(i) - freezone.Get(i1)) * n < 0 ) ok = 0; } if (ok) { freesetfaces.Append (threeint()); freesetfaces.Last().i1 = i1; freesetfaces.Last().i2 = i2; freesetfaces.Last().i3 = i3; } } } for (fs = 1; fs <= freesets.Size(); fs++) { freefaceinequ.Append (new DenseMatrix (freefaces.Get(fs)->Size(), 4)); } { int minn; // Array pnearness (noldp); pnearness.SetSize (noldp); for (i = 1; i <= pnearness.Size(); i++) pnearness.Elem(i) = INT_MAX/10; for (j = 1; j <= GetNP(1); j++) pnearness.Elem(GetPointNr (1, j)) = 0; do { ok = 1; for (i = 1; i <= noldf; i++) { minn = INT_MAX/10; for (j = 1; j <= GetNP(i); j++) minn = min2 (minn, pnearness.Get(GetPointNr (i, j))); for (j = 1; j <= GetNP(i); j++) if (pnearness.Get(GetPointNr (i, j)) > minn+1) { ok = 0; pnearness.Elem(GetPointNr (i, j)) = minn+1; } } for (i = 1; i <= edges.Size(); i++) { int pi1 = edges.Get(i).i1; int pi2 = edges.Get(i).i2; if (pnearness.Get(pi1) > pnearness.Get(pi2)+1) { ok = 0; pnearness.Elem(pi1) = pnearness.Get(pi2)+1; } if (pnearness.Get(pi2) > pnearness.Get(pi1)+1) { ok = 0; pnearness.Elem(pi2) = pnearness.Get(pi1)+1; } } for (i = 1; i <= elements.Size(); i++) if (elements.Get(i).GetNP() == 6) // prism rule { for (j = 1; j <= 3; j++) { int pi1 = elements.Get(i).PNum(j); int pi2 = elements.Get(i).PNum(j+3); if (pnearness.Get(pi1) > pnearness.Get(pi2)+1) { ok = 0; pnearness.Elem(pi1) = pnearness.Get(pi2)+1; } if (pnearness.Get(pi2) > pnearness.Get(pi1)+1) { ok = 0; pnearness.Elem(pi2) = pnearness.Get(pi1)+1; } } } } while (!ok); maxpnearness = 0; for (i = 1; i <= pnearness.Size(); i++) maxpnearness = max2 (maxpnearness, pnearness.Get(i)); fnearness.SetSize (noldf); for (i = 1; i <= noldf; i++) { fnearness.Elem(i) = 0; for (j = 1; j <= GetNP(i); j++) fnearness.Elem(i) += pnearness.Get(GetPointNr (i, j)); } // (*testout) << "rule " << name << ", pnear = " << pnearness << endl; } //Table of edges: for (fs = 1; fs <= freesets.Size(); fs++) { freeedges.Append (new Array); // Array & freeset = *freesets.Get(fs); Array & freesetedges = *freeedges.Last(); Array & freesetfaces = *freefaces.Get(fs); int k,l; INDEX ind; for (k = 1; k <= freesetfaces.Size(); k++) { // threeint tr = freesetfaces.Get(k); for (l = k+1; l <= freesetfaces.Size(); l++) { ind = NeighbourTrianglePoint(freesetfaces.Get(k), freesetfaces.Get(l)); if (!ind) continue; INDEX_3 f1(freesetfaces.Get(k).i1, freesetfaces.Get(k).i2, freesetfaces.Get(k).i3); INDEX_3 f2(freesetfaces.Get(l).i1, freesetfaces.Get(l).i2, freesetfaces.Get(l).i3); INDEX_2 ed(0, 0); for (int f11 = 1; f11 <= 3; f11++) for (int f12 = 1; f12 <= 3; f12++) if (f11 != f12) for (int f21 = 1; f21 <= 3; f21++) for (int f22 = 1; f22 <= 3; f22++) if (f1.I(f11) == f2.I(f21) && f1.I(f12) == f2.I(f22)) { ed.I(1) = f1.I(f11); ed.I(2) = f1.I(f12); } // (*testout) << "ed = " << ed.I(1) << "-" << ed.I(2) << endl; // (*testout) << "ind = " << ind << " ed = " << ed << endl; for (int eli = 1; eli <= GetNOldF(); eli++) { if (GetNP(eli) == 4) { for (int elr = 1; elr <= 4; elr++) { if (GetPointNrMod (eli, elr) == ed.I(1) && GetPointNrMod (eli, elr+2) == ed.I(2)) { /* (*testout) << "ed is diagonal of rectangle" << endl; (*testout) << "ed = " << ed.I(1) << "-" << ed.I(2) << endl; (*testout) << "ind = " << ind << endl; */ ind = 0; } } } } if (ind) { /* (*testout) << "new edge from face " << k << " = (" << freesetfaces.Get(k).i1 << ", " << freesetfaces.Get(k).i2 << ", " << freesetfaces.Get(k).i3 << "), point " << ind << endl; */ freesetedges.Append(twoint(k,ind)); } } } } } void Meshing3 :: LoadRules (const char * filename, const char ** prules) { char buf[256]; istream * ist; char *tr1 = NULL; if (filename) { PrintMessage (3, "rule-filename = ", filename); ist = new ifstream (filename); } else { /* connect tetrules to one string */ PrintMessage (3, "Use internal rules"); if (!prules) prules = tetrules; const char ** hcp = prules; size_t len = 0; while (*hcp) { len += strlen (*hcp); hcp++; } tr1 = new char[len+1]; tr1[0] = 0; hcp = prules; // tetrules; char * tt1 = tr1; while (*hcp) { strcat (tt1, *hcp); tt1 += strlen (*hcp); hcp++; } #ifdef WIN32 // VC++ 2005 workaround for(size_t i=0; igood()) { cerr << "Rule description file " << filename << " not found" << endl; delete ist; exit (1); } while (!ist->eof()) { buf[0] = 0; (*ist) >> buf; if (strcmp (buf, "rule") == 0) { vnetrule * rule = new vnetrule; rule -> LoadRule(*ist); rules.Append (rule); if (!rule->TestOk()) { PrintSysError ("Parser3d: Rule ", rules.Size(), " not ok"); exit (1); } } else if (strcmp (buf, "tolfak") == 0) { (*ist) >> tolfak; } } delete ist; delete [] tr1; } } netgen-6.2.1804/libsrc/meshing/smoothing2.cpp0000644000175000017500000006357613272137567017533 0ustar kurtkurt#include #include "meshing.hpp" #include namespace netgen { static const double c_trig = 0.14433756; // sqrt(3.0) / 12 static const double c_trig4 = 0.57735026; // sqrt(3.0) / 3 inline double CalcTriangleBadness (double x2, double x3, double y3, double metricweight, double h) { // badness = sqrt(3.0) / 12 * (\sum l_i^2) / area - 1 // p1 = (0, 0), p2 = (x2, 0), p3 = (x3, y3); double cir_2 = (x2*x2 + x3*x3 + y3*y3 - x2*x3); double area = x2 * y3; if (area <= 1e-24 * cir_2) return 1e10; double badness = c_trig4 * cir_2 / area - 1; if (metricweight > 0) { // add: metricweight * (area / h^2 + h^2 / area - 2) double areahh = area / (h * h); badness += metricweight * (areahh + 1 / areahh - 2); } return badness; } inline void CalcTriangleBadness (double x2, double x3, double y3, double metricweight, double h, double & badness, double & g1x, double & g1y) { // old: badness = sqrt(3.0) /36 * circumference^2 / area - 1 // badness = sqrt(3.0) / 12 * (\sum l_i^2) / area - 1 // p1 = (0, 0), p2 = (x2, 0), p3 = (x3, y3); double cir_2 = 2* (x2*x2 + x3*x3 + y3*y3 - x2*x3); double area = 0.5 * x2 * y3; if (area <= 1e-24 * cir_2) { g1x = 0; g1y = 0; badness = 1e10; return; } badness = c_trig * cir_2 / area - 1; double c1 = -2 * c_trig / area; double c2 = 0.5 * c_trig * cir_2 / (area * area); g1x = c1 * (x2 + x3) + c2 * y3; g1y = c1 * (y3) + c2 * (x2-x3); if (metricweight > 0) { // area = (x2 - x1) * (y3 - y1) - (x3 - x1) * (y2 - y1); // add: metricweight * (area / h^2 + h^2 / area - 2) area = x2 * y3; double dareax1 = -y3; double dareay1 = x3 - x2; double areahh = area / (h * h); double fac = metricweight * (areahh - 1 / areahh) / area; badness += metricweight * (areahh + 1 / areahh - 2); g1x += fac * dareax1; g1y += fac * dareay1; } } double CalcTriangleBadness (const Point<3> & p1, const Point<3> & p2, const Point<3> & p3, double metricweight, double h) { // badness = sqrt(3.0) / 12 * (\sum l_i^2) / area - 1 Vec<3> e12 = p2-p1; Vec<3> e13 = p3-p1; Vec<3> e23 = p3-p2; double cir_2 = e12.Length2() + e13.Length2() + e23.Length2(); double area = 0.5 * Cross (e12, e13).Length(); if (area <= 1e-24 * cir_2) return 1e10; double badness = c_trig * cir_2 / area - 1; if (metricweight > 0) { // add: metricweight * (area / h^2 + h^2 / area - 2) area *= 2; // optimum for (2 area) is h^2 double areahh = area / (h * h); badness += metricweight * (areahh + 1 / areahh - 2); } return badness; } double CalcTriangleBadnessGrad (const Point<3> & p1, const Point<3> & p2, const Point<3> & p3, Vec<3> & gradp1, double metricweight, double h) { // badness = sqrt(3.0) / 12 * (\sum l_i^2) / area - 1 Vec<3> e12 = p2-p1; Vec<3> e13 = p3-p1; Vec<3> e23 = p3-p2; double cir_2 = e12.Length2() + e13.Length2() + e23.Length2(); Vec<3> varea = Cross(e12, e13); double area = 0.5 * varea.Length(); Vec<3> dcir_2 = (-2) * (e12+e13); Vec<3> darea = (0.25/area) * Cross (p2-p3, varea); if (area <= 1e-24 * cir_2) { gradp1 = 0; return 1e10; } double badness = c_trig * cir_2 / area - 1; gradp1 = c_trig * (1.0/area * dcir_2 - cir_2 / (area*area) * darea); if (metricweight > 0) { // add: metricweight * (area / h^2 + h^2 / area - 2) area *= 2; // optimum for (2 area) is h^2 double areahh = area / (h * h); badness += metricweight * (areahh + 1 / areahh - 2); gradp1 += (2*metricweight * (1/(h*h) - (h*h)/(area*area))) * darea; } return badness; } double CalcTriangleBadness (const Point<3> & p1, const Point<3> & p2, const Point<3> & p3, const Vec<3> & n, double metricweight, double h) { Vec<3> v1 = p2-p1; Vec<3> v2 = p3-p1; Vec<3> e1 = v1; Vec<3> e2 = v2; e1 -= (e1 * n) * n; e1 /= (e1.Length() + 1e-24); e2 = Cross (n, e1); return CalcTriangleBadness ( (e1 * v1), (e1 * v2), (e2 * v2), metricweight, h); } class Opti2dLocalData { public: const MeshOptimize2d * meshthis; MeshPoint sp1; PointGeomInfo gi1; Vec<3> normal, t1, t2; Array locelements; Array locrots; Array lochs; Array > loc_pnts2, loc_pnts3; // static int locerr2; double locmetricweight; double loch; int surfi, surfi2; int uselocalh; public: Opti2dLocalData () { locmetricweight = 0; } }; class Opti2SurfaceMinFunction : public MinFunction { const Mesh & mesh; Opti2dLocalData & ld; public: Opti2SurfaceMinFunction (const Mesh & amesh, Opti2dLocalData & ald) : mesh(amesh), ld(ald) { } ; virtual double Func (const Vector & x) const { Vec<3> n; double badness = 0; ld.meshthis -> GetNormalVector (ld.surfi, ld.sp1, ld.gi1, n); Point<3> pp1 = ld.sp1 + x(0) * ld.t1 + x(1) * ld.t2; for (int j = 0; j < ld.locelements.Size(); j++) { Vec<3> e1 = ld.loc_pnts2[j] - pp1; Vec<3> e2 = ld.loc_pnts3[j] - pp1; if (ld.uselocalh) ld.loch = ld.lochs[j]; if (Determinant(e1, e2, n) > 1e-8 * ld.loch * ld.loch) { badness += CalcTriangleBadness (pp1, ld.loc_pnts2[j], ld.loc_pnts3[j], ld.locmetricweight, ld.loch); } else { badness += 1e8; } } return badness; } virtual double FuncGrad (const Vector & x, Vector & g) const { Vec<3> vgrad; Point<3> pp1; vgrad = 0; double badness = 0; pp1 = ld.sp1 + x(0) * ld.t1 + x(1) * ld.t2; for (int j = 0; j < ld.locelements.Size(); j++) { Vec<3> e1 = ld.loc_pnts2[j] - pp1; Vec<3> e2 = ld.loc_pnts3[j] - pp1; if (ld.uselocalh) ld.loch = ld.lochs[j]; if (Determinant(e1, e2, ld.normal) > 1e-8 * ld.loch * ld.loch) { Vec<3> hgrad; badness += CalcTriangleBadnessGrad (pp1, ld.loc_pnts2[j], ld.loc_pnts3[j], hgrad, ld.locmetricweight, ld.loch); vgrad += hgrad; } else { badness += 1e8; } } g(0) = ld.t1 * vgrad; g(1) = ld.t2 * vgrad; return badness; } virtual double FuncDeriv (const Vector & x, const Vector & dir, double & deriv) const { deriv = 0; double badness = 0; Point<3> pp1 = ld.sp1 + x(0) * ld.t1 + x(1) * ld.t2; Vec<3> dir3d = dir(0) * ld.t1 + dir(1) * ld.t2; for (int j = 0; j < ld.locelements.Size(); j++) { Vec<3> e1 = ld.loc_pnts2[j] - pp1; Vec<3> e2 = ld.loc_pnts3[j] - pp1; if (ld.uselocalh) ld.loch = ld.lochs[j]; if (Determinant(e1, e2, ld.normal) > 1e-8 * ld.loch * ld.loch) { Vec<3> hgrad; badness += CalcTriangleBadnessGrad (pp1, ld.loc_pnts2[j], ld.loc_pnts3[j], hgrad, ld.locmetricweight, ld.loch); deriv += dir3d * hgrad; } else { badness += 1e8; } } // cout << "deriv = " << deriv << " =?= "; return badness; /* static int timer = NgProfiler::CreateTimer ("opti2surface - deriv"); NgProfiler::RegionTimer reg (timer); double eps = 1e-6; Vector xr(2), xl(2); xr = x; xl = x; for (int i = 0; i < 2; i++) { xr(i) = x(i) + eps * dir(i); xl(i) = x(i) - eps * dir(i); } deriv = (Func (xr) - Func(xl) ) / (2*eps); cout << deriv << endl; return Func(x); */ } virtual double XXFuncGrad (const Vector & x, Vector & g) const; virtual double XXFuncDeriv (const Vector & x, const Vector & dir, double & deriv) const; }; /* double Opti2SurfaceMinFunction :: Func (const Vector & x) const { static int timer = NgProfiler::CreateTimer ("opti2surface - func"); NgProfiler::RegionTimer reg (timer); Vector g(x.Size()); return FuncGrad (x, g); } */ double Opti2SurfaceMinFunction :: XXFuncGrad (const Vector & x, Vector & grad) const { // static int timer = NgProfiler::CreateTimer ("opti2surface - funcgrad"); // NgProfiler::RegionTimer reg (timer); Vec<3> n, vgrad; Point<3> pp1; vgrad = 0; double badness = 0; ld.meshthis -> GetNormalVector (ld.surfi, ld.sp1, ld.gi1, n); pp1 = ld.sp1 + x(0) * ld.t1 + x(1) * ld.t2; // meshthis -> ProjectPoint (surfi, pp1); // meshthis -> GetNormalVector (surfi, pp1, n); for (int j = 0; j < ld.locelements.Size(); j++) { double g1x, g1y, hbadness; Vec<3> e1 = ld.loc_pnts2[j] - pp1; Vec<3> e2 = ld.loc_pnts3[j] - pp1; if (ld.uselocalh) ld.loch = ld.lochs[j]; double e1l = e1.Length(); if (Determinant(e1, e2, n) > 1e-8 * e1l * e2.Length()) { e1 /= e1l; double e1e2 = e1 * e2; e2 -= e1e2 * e1; double e2l = e2.Length(); CalcTriangleBadness ( e1l, e1e2, e2l, ld.locmetricweight, ld.loch, hbadness, g1x, g1y); badness += hbadness; vgrad += g1x * e1 + (g1y/e2l) * e2; } else { // (*testout) << "very very bad badness" << endl; badness += 1e8; } } // vgrad -= (vgrad * n) * n; grad(0) = vgrad * ld.t1; grad(1) = vgrad * ld.t2; return badness; } double Opti2SurfaceMinFunction :: XXFuncDeriv (const Vector & x, const Vector & dir, double & deriv) const { // static int timer = NgProfiler::CreateTimer ("opti2surface - funcderiv"); // NgProfiler::RegionTimer reg (timer); Vec<3> n, vgrad; Point<3> pp1; vgrad = 0; double badness = 0; ld.meshthis -> GetNormalVector (ld.surfi, ld.sp1, ld.gi1, n); pp1 = ld.sp1 + x(0) * ld.t1 + x(1) * ld.t2; for (int j = 0; j < ld.locelements.Size(); j++) { double g1x, g1y, hbadness; /* int roti = ld.locrots[j]; const Element2d & bel = mesh[ld.locelements[j]]; Vec<3> e1 = mesh[bel.PNumMod(roti + 1)] - pp1; Vec<3> e2 = mesh[bel.PNumMod(roti + 2)] - pp1; */ Vec<3> e1 = ld.loc_pnts2[j] - pp1; Vec<3> e2 = ld.loc_pnts3[j] - pp1; if (ld.uselocalh) ld.loch = ld.lochs[j]; double e1l = e1.Length(); if (Determinant(e1, e2, n) > 1e-8 * e1l * e2.Length()) { e1 /= e1l; double e1e2 = e1 * e2; e2 -= e1e2 * e1; double e2l = e2.Length(); CalcTriangleBadness ( e1l, e1e2, e2l, ld.locmetricweight, ld.loch, hbadness, g1x, g1y); badness += hbadness; vgrad += g1x * e1 + (g1y / e2l) * e2; } else { // (*testout) << "very very bad badness" << endl; badness += 1e8; } } // vgrad -= (vgrad * n) * n; deriv = dir(0) * (vgrad*ld.t1) + dir(1) * (vgrad*ld.t2); return badness; } class Opti2EdgeMinFunction : public MinFunction { const Mesh & mesh; Opti2dLocalData & ld; public: Opti2EdgeMinFunction (const Mesh & amesh, Opti2dLocalData & ald) : mesh(amesh), ld(ald) { } ; virtual double FuncGrad (const Vector & x, Vector & g) const; virtual double Func (const Vector & x) const; }; double Opti2EdgeMinFunction :: Func (const Vector & x) const { Vector g(x.Size()); return FuncGrad (x, g); } double Opti2EdgeMinFunction :: FuncGrad (const Vector & x, Vector & grad) const { int j, rot; Vec<3> n1, n2, v1, v2, e1, e2, vgrad; Point<3> pp1; Vec<2> g1; double badness, hbadness; vgrad = 0.0; badness = 0; pp1 = ld.sp1 + x(0) * ld.t1; ld.meshthis -> ProjectPoint2 (ld.surfi, ld.surfi2, pp1); for (j = 0; j < ld.locelements.Size(); j++) { rot = ld.locrots[j]; const Element2d & bel = mesh[ld.locelements[j]]; v1 = mesh[bel.PNumMod(rot + 1)] - pp1; v2 = mesh[bel.PNumMod(rot + 2)] - pp1; e1 = v1; e2 = v2; e1 /= e1.Length(); e2 -= (e1 * e2) * e1; e2 /= e2.Length(); if (ld.uselocalh) ld.loch = ld.lochs[j]; CalcTriangleBadness ( (e1 * v1), (e1 * v2), (e2 * v2), ld.locmetricweight, ld.loch, hbadness, g1(0), g1(1)); badness += hbadness; vgrad += g1(0) * e1 + g1(1) * e2; } ld.meshthis -> GetNormalVector (ld.surfi, pp1, n1); ld.meshthis -> GetNormalVector (ld.surfi2, pp1, n2); v1 = Cross (n1, n2); v1.Normalize(); grad(0) = (vgrad * v1) * (ld.t1 * v1); return badness; } class Opti2SurfaceMinFunctionJacobian : public MinFunction { const Mesh & mesh; Opti2dLocalData & ld; public: Opti2SurfaceMinFunctionJacobian (const Mesh & amesh, Opti2dLocalData & ald) : mesh(amesh), ld(ald) { } ; virtual double FuncGrad (const Vector & x, Vector & g) const; virtual double FuncDeriv (const Vector & x, const Vector & dir, double & deriv) const; virtual double Func (const Vector & x) const; }; double Opti2SurfaceMinFunctionJacobian :: Func (const Vector & x) const { Vector g(x.Size()); return FuncGrad (x, g); } double Opti2SurfaceMinFunctionJacobian :: FuncGrad (const Vector & x, Vector & grad) const { // from 2d: int lpi, gpi; Vec<3> n, vgrad; Point<3> pp1; Vec2d g1, vdir; double badness, hbad, hderiv; vgrad = 0; badness = 0; ld.meshthis -> GetNormalVector (ld.surfi, ld.sp1, ld.gi1, n); pp1 = ld.sp1 + x(0) * ld.t1 + x(1) * ld.t2; // meshthis -> ProjectPoint (surfi, pp1); // meshthis -> GetNormalVector (surfi, pp1, n); static Array pts2d; pts2d.SetSize(mesh.GetNP()); grad = 0; for (int j = 1; j <= ld.locelements.Size(); j++) { lpi = ld.locrots.Get(j); const Element2d & bel = mesh[ld.locelements.Get(j)]; gpi = bel.PNum(lpi); for (int k = 1; k <= bel.GetNP(); k++) { PointIndex pi = bel.PNum(k); pts2d.Elem(pi) = Point2d (ld.t1 * (mesh.Point(pi) - ld.sp1), ld.t2 * (mesh.Point(pi) - ld.sp1)); } pts2d.Elem(gpi) = Point2d (x(0), x(1)); for (int k = 1; k <= 2; k++) { if (k == 1) vdir = Vec2d (1, 0); else vdir = Vec2d (0, 1); hbad = bel. CalcJacobianBadnessDirDeriv (pts2d, lpi, vdir, hderiv); grad(k-1) += hderiv; if (k == 1) badness += hbad; } } /* vgrad.Add (-(vgrad * n), n); grad.Elem(1) = vgrad * t1; grad.Elem(2) = vgrad * t2; */ return badness; } double Opti2SurfaceMinFunctionJacobian :: FuncDeriv (const Vector & x, const Vector & dir, double & deriv) const { // from 2d: int j, k, lpi, gpi; Vec<3> n, vgrad; Point<3> pp1; Vec2d g1, vdir; double badness, hbad, hderiv; vgrad = 0; badness = 0; ld.meshthis -> GetNormalVector (ld.surfi, ld.sp1, ld.gi1, n); // pp1 = sp1; // pp1.Add2 (x.Get(1), t1, x.Get(2), t2); pp1 = ld.sp1 + x(0) * ld.t1 + x(1) * ld.t2; static Array pts2d; pts2d.SetSize(mesh.GetNP()); deriv = 0; for (j = 1; j <= ld.locelements.Size(); j++) { lpi = ld.locrots.Get(j); const Element2d & bel = mesh[ld.locelements.Get(j)]; gpi = bel.PNum(lpi); for (k = 1; k <= bel.GetNP(); k++) { PointIndex pi = bel.PNum(k); pts2d.Elem(pi) = Point2d (ld.t1 * (mesh.Point(pi) - ld.sp1), ld.t2 * (mesh.Point(pi) - ld.sp1)); } pts2d.Elem(gpi) = Point2d (x(0), x(1)); vdir = Vec2d (dir(0), dir(1)); hbad = bel. CalcJacobianBadnessDirDeriv (pts2d, lpi, vdir, hderiv); deriv += hderiv; badness += hbad; } return badness; } MeshOptimize2d dummy; MeshOptimize2d :: MeshOptimize2d () { SetFaceIndex (0); SetImproveEdges (0); SetMetricWeight (0); SetWriteStatus (1); } void MeshOptimize2d :: SelectSurfaceOfPoint (const Point<3> & p, const PointGeomInfo & gi) { ; } void MeshOptimize2d :: ImproveMesh (Mesh & mesh, const MeshingParameters & mp) { if (!faceindex) { PrintMessage (3, "Smoothing"); for (faceindex = 1; faceindex <= mesh.GetNFD(); faceindex++) { ImproveMesh (mesh, mp); if (multithread.terminate) throw NgException ("Meshing stopped"); } faceindex = 0; return; } static int timer = NgProfiler::CreateTimer ("MeshSmoothing 2D"); static int timer1 = NgProfiler::CreateTimer ("MeshSmoothing 2D start"); static int timer2 = NgProfiler::CreateTimer ("MeshSmoothing 2D - BFGS"); NgProfiler::RegionTimer reg (timer); NgProfiler::StartTimer (timer1); CheckMeshApproximation (mesh); Opti2dLocalData ld; Array seia; mesh.GetSurfaceElementsOfFace (faceindex, seia); bool mixed = 0; for (int i = 0; i < seia.Size(); i++) if (mesh[seia[i]].GetNP() != 3) { mixed = 1; break; } Vector x(2); Array savepoints(mesh.GetNP()); ld.uselocalh = mp.uselocalh; Array compress(mesh.GetNP()); Array icompress; for (int i = 0; i < seia.Size(); i++) { const Element2d & el = mesh[seia[i]]; for (int j = 0; j < el.GetNP(); j++) compress[el[j]] = -1; } for (int i = 0; i < seia.Size(); i++) { const Element2d & el = mesh[seia[i]]; for (int j = 0; j < el.GetNP(); j++) if (compress[el[j]] == -1) { compress[el[j]] = icompress.Size(); icompress.Append(el[j]); } } Array cnta(icompress.Size()); cnta = 0; for (int i = 0; i < seia.Size(); i++) { const Element2d & el = mesh[seia[i]]; for (int j = 0; j < el.GetNP(); j++) cnta[compress[el[j]]]++; } TABLE elementsonpoint(cnta); for (int i = 0; i < seia.Size(); i++) { const Element2d & el = mesh[seia[i]]; for (int j = 0; j < el.GetNP(); j++) elementsonpoint.Add (compress[el[j]], seia[i]); } /* Array nelementsonpoint(mesh.GetNP()); nelementsonpoint = 0; for (int i = 0; i < seia.Size(); i++) { const Element2d & el = mesh[seia[i]]; for (int j = 0; j < el.GetNP(); j++) nelementsonpoint[el[j]]++; } TABLE elementsonpoint(nelementsonpoint); for (int i = 0; i < seia.Size(); i++) { const Element2d & el = mesh[seia[i]]; for (int j = 0; j < el.GetNP(); j++) elementsonpoint.Add (el[j], seia[i]); } */ ld.loch = mp.maxh; ld.locmetricweight = metricweight; ld.meshthis = this; Opti2SurfaceMinFunction surfminf(mesh, ld); Opti2EdgeMinFunction edgeminf(mesh, ld); Opti2SurfaceMinFunctionJacobian surfminfj(mesh, ld); OptiParameters par; par.maxit_linsearch = 8; par.maxit_bfgs = 5; /* int i, j, k; Vector xedge(1); if (improveedges) for (i = 1; i <= mesh.GetNP(); i++) if (mesh.PointType(i) == EDGEPOINT) { continue; PrintDot (); sp1 = mesh.Point(i); locelements.SetSize(0); locrots.SetSize (0); lochs.SetSize (0); surfi = surfi2 = surfi3 = 0; for (j = 0; j < elementsonpoint[i].Size(); j++) { sei = elementsonpoint[i][j]; const Element2d * bel = &mesh[sei]; if (!surfi) surfi = mesh.GetFaceDescriptor(bel->GetIndex()).SurfNr(); else if (surfi != mesh.GetFaceDescriptor(bel->GetIndex()).SurfNr()) { if (surfi2 != 0 && surfi2 != mesh.GetFaceDescriptor(bel->GetIndex()).SurfNr()) surfi3 = mesh.GetFaceDescriptor(bel->GetIndex()).SurfNr(); else surfi2 = mesh.GetFaceDescriptor(bel->GetIndex()).SurfNr(); } locelements.Append (sei); if (bel->PNum(1) == i) locrots.Append (1); else if (bel->PNum(2) == i) locrots.Append (2); else locrots.Append (3); if (uselocalh) { Point3d pmid = Center (mesh.Point(bel->PNum(1)), mesh.Point(bel->PNum(2)), mesh.Point(bel->PNum(3))); lochs.Append (mesh.GetH(pmid)); } } if (surfi2 && !surfi3) { Vec3d n1, n2; GetNormalVector (surfi, sp1, n1); GetNormalVector (surfi2, sp1, n2); t1 = Cross (n1, n2); xedge = 0; BFGS (xedge, edgeminf, par, 1e-6); mesh.Point(i).X() += xedge.Get(1) * t1.X(); mesh.Point(i).Y() += xedge.Get(1) * t1.Y(); mesh.Point(i).Z() += xedge.Get(1) * t1.Z(); ProjectPoint2 (surfi, surfi2, mesh.Point(i)); } } */ bool printeddot = 0; char plotchar = '.'; int modplot = 1; if (mesh.GetNP() > 1000) { plotchar = '+'; modplot = 100; } if (mesh.GetNP() > 10000) { plotchar = 'o'; modplot = 1000; } if (mesh.GetNP() > 100000) { plotchar = 'O'; modplot = 10000; } int cnt = 0; NgProfiler::StopTimer (timer1); /* for (PointIndex pi = PointIndex::BASE; pi < mesh.GetNP()+PointIndex::BASE; pi++) if (mesh[pi].Type() == SURFACEPOINT) */ for (int hi = 0; hi < icompress.Size(); hi++) { PointIndex pi = icompress[hi]; if (mesh[pi].Type() == SURFACEPOINT) { if (multithread.terminate) throw NgException ("Meshing stopped"); cnt++; if (cnt % modplot == 0 && writestatus) { printeddot = 1; PrintDot (plotchar); } // if (elementsonpoint[pi].Size() == 0) continue; if (elementsonpoint[hi].Size() == 0) continue; ld.sp1 = mesh[pi]; // Element2d & hel = mesh[elementsonpoint[pi][0]]; Element2d & hel = mesh[elementsonpoint[hi][0]]; int hpi = 0; for (int j = 1; j <= hel.GetNP(); j++) if (hel.PNum(j) == pi) { hpi = j; break; } ld.gi1 = hel.GeomInfoPi(hpi); SelectSurfaceOfPoint (ld.sp1, ld.gi1); ld.locelements.SetSize(0); ld.locrots.SetSize (0); ld.lochs.SetSize (0); ld.loc_pnts2.SetSize (0); ld.loc_pnts3.SetSize (0); for (int j = 0; j < elementsonpoint[hi].Size(); j++) { SurfaceElementIndex sei = elementsonpoint[hi][j]; const Element2d & bel = mesh[sei]; ld.surfi = mesh.GetFaceDescriptor(bel.GetIndex()).SurfNr(); ld.locelements.Append (sei); for (int k = 1; k <= bel.GetNP(); k++) if (bel.PNum(k) == pi) { ld.locrots.Append (k); ld.loc_pnts2.Append (mesh[bel.PNumMod(k + 1)]); ld.loc_pnts3.Append (mesh[bel.PNumMod(k + 2)]); break; } if (ld.uselocalh) { Point3d pmid = Center (mesh[bel[0]], mesh[bel[1]], mesh[bel[2]]); ld.lochs.Append (mesh.GetH(pmid)); } } GetNormalVector (ld.surfi, ld.sp1, ld.gi1, ld.normal); ld.t1 = ld.normal.GetNormal (); ld.t2 = Cross (ld.normal, ld.t1); // save points, and project to tangential plane for (int j = 0; j < ld.locelements.Size(); j++) { const Element2d & el = mesh[ld.locelements[j]]; for (int k = 0; k < el.GetNP(); k++) savepoints[el[k]] = mesh[el[k]]; } for (int j = 0; j < ld.locelements.Size(); j++) { const Element2d & el = mesh[ld.locelements[j]]; for (int k = 0; k < el.GetNP(); k++) { PointIndex hhpi = el[k]; double lam = ld.normal * (mesh[hhpi] - ld.sp1); mesh[hhpi] -= lam * ld.normal; } } x = 0; par.typx = 0.3*ld.lochs[0]; NgProfiler::StartTimer (timer2); if (mixed) { BFGS (x, surfminfj, par, 1e-6); } else { BFGS (x, surfminf, par, 1e-6); } NgProfiler::StopTimer (timer2); Point3d origp = mesh[pi]; int loci = 1; double fact = 1; int moveisok = 0; // restore other points for (int j = 0; j < ld.locelements.Size(); j++) { const Element2d & el = mesh[ld.locelements[j]]; for (int k = 0; k < el.GetNP(); k++) { PointIndex hhpi = el[k]; if (hhpi != pi) mesh[hhpi] = savepoints[hhpi]; } } //optimizer loop (if whole distance is not possible, move only a bit!!!!) while (loci <= 5 && !moveisok) { loci ++; /* mesh[pi].X() = origp.X() + (x.Get(1) * t1.X() + x.Get(2) * t2.X())*fact; mesh[pi].Y() = origp.Y() + (x.Get(1) * t1.Y() + x.Get(2) * t2.Y())*fact; mesh[pi].Z() = origp.Z() + (x.Get(1) * t1.Z() + x.Get(2) * t2.Z())*fact; */ Vec<3> hv = x(0) * ld.t1 + x(1) * ld.t2; Point3d hnp = origp + Vec3d (hv); mesh[pi](0) = hnp.X(); mesh[pi](1) = hnp.Y(); mesh[pi](2) = hnp.Z(); fact = fact/2.; // ProjectPoint (surfi, mesh[pi]); // moveisok = CalcPointGeomInfo(surfi, ngi, mesh[pi]); PointGeomInfo ngi; ngi = ld.gi1; moveisok = ProjectPointGI (ld.surfi, mesh[pi], ngi); // point lies on same chart in stlsurface if (moveisok) { for (int j = 0; j < ld.locelements.Size(); j++) mesh[ld.locelements[j]].GeomInfoPi(ld.locrots[j]) = ngi; } else { mesh[pi] = Point<3> (origp); } } } } if (printeddot) PrintDot ('\n'); CheckMeshApproximation (mesh); mesh.SetNextTimeStamp(); } void MeshOptimize2d :: GetNormalVector(INDEX /* surfind */, const Point<3> & p, Vec<3> & nv) const { nv = Vec<3> (0, 0, 1); } void MeshOptimize2d :: GetNormalVector(INDEX surfind, const Point<3> & p, PointGeomInfo & gi, Vec<3> & n) const { GetNormalVector (surfind, p, n); } } netgen-6.2.1804/libsrc/meshing/classifyhpel.hpp0000644000175000017500000014342413272137567020124 0ustar kurtkurtHPREF_ELEMENT_TYPE ClassifyTet(HPRefElement & el, INDEX_2_HASHTABLE & edges, INDEX_2_HASHTABLE & edgepoint_dom, BitArray & cornerpoint, BitArray & edgepoint, INDEX_3_HASHTABLE & faces, INDEX_2_HASHTABLE & face_edges, INDEX_2_HASHTABLE & surf_edges, Array & facepoint) { int ep1(0), ep2(0), ep3(0), ep4(0), cp1(0), cp2(0), cp3(0), cp4(0), fp1, fp2, fp3, fp4; int isedge1(0), isedge2(0), isedge3(0), isedge4(0), isedge5(0), isedge6(0); int isfedge1, isfedge2, isfedge3, isfedge4, isfedge5, isfedge6; int isface1(0), isface2(0), isface3(0), isface4(0); HPREF_ELEMENT_TYPE type = HP_NONE; int debug = 0; for (int j = 0;j < 4; j++) { if (el.pnums[j] == 444) debug++; if (el.pnums[j] == 115) debug++; if (el.pnums[j] == 382) debug++; if (el.pnums[j] == 281) debug++; } if (debug < 4) debug = 0; for (int j = 0; j < 4; j++) for (int k = 0; k < 4; k++) { if (j == k) continue; if (type) break; int pi3 = 0; while (pi3 == j || pi3 == k) pi3++; int pi4 = 6 - j - k - pi3; // preserve orientation int sort[4]; sort[0] = j; sort[1] = k; sort[2] = pi3; sort[3] = pi4; int cnt = 0; for (int jj = 0; jj < 4; jj++) for (int kk = 0; kk < 3; kk++) if (sort[kk] > sort[kk+1]) { cnt++; Swap (sort[kk], sort[kk+1]); } if (cnt % 2 == 1) Swap (pi3, pi4); ep1 = edgepoint.Test (el.pnums[j]); ep2 = edgepoint.Test (el.pnums[k]); ep3 = edgepoint.Test (el.pnums[pi3]); ep4 = edgepoint.Test (el.pnums[pi4]); cp1 = cornerpoint.Test (el.pnums[j]); cp2 = cornerpoint.Test (el.pnums[k]); cp3 = cornerpoint.Test (el.pnums[pi3]); cp4 = cornerpoint.Test (el.pnums[pi4]); isedge1 = edges.Used (INDEX_2::Sort (el.pnums[j], el.pnums[k])); isedge2 = edges.Used (INDEX_2::Sort (el.pnums[j], el.pnums[pi3])); isedge3 = edges.Used (INDEX_2::Sort (el.pnums[j], el.pnums[pi4])); isedge4 = edges.Used (INDEX_2::Sort (el.pnums[k], el.pnums[pi3])); isedge5 = edges.Used (INDEX_2::Sort (el.pnums[k], el.pnums[pi4])); isedge6 = edges.Used (INDEX_2::Sort (el.pnums[pi3], el.pnums[pi4])); if (debug) { cout << "debug" << endl; *testout << "debug" << endl; *testout << "ep = " << ep1 << ep2 << ep3 << ep4 << endl; *testout << "cp = " << cp1 << cp2 << cp3 << cp4 << endl; *testout << "edge = " << isedge1 << isedge2 << isedge3 << isedge4 << isedge5 << isedge6 << endl; } isface1 = isface2 = isface3 = isface4 = 0; for (int l = 0; l < 4; l++) { INDEX_3 i3(0,0,0); switch (l) { case 0: i3.I1() = el.pnums[k]; i3.I1() = el.pnums[pi3]; i3.I1() = el.pnums[pi4]; break; case 1: i3.I1() = el.pnums[j]; i3.I1() = el.pnums[pi3]; i3.I1() = el.pnums[pi4]; break; case 2: i3.I1() = el.pnums[j]; i3.I1() = el.pnums[k]; i3.I1() = el.pnums[pi4]; break; case 3: i3.I1() = el.pnums[j]; i3.I1() = el.pnums[k]; i3.I1() = el.pnums[pi3]; break; } i3.Sort(); if (faces.Used (i3)) { int domnr = faces.Get(i3); if (domnr == -1 || domnr == el.GetIndex()) { switch (l) { case 0: isface1 = 1; break; case 1: isface2 = 1; break; case 2: isface3 = 1; break; case 3: isface4 = 1; break; } } } } /* isface1 = faces.Used (INDEX_3::Sort (el.pnums[k], el.pnums[pi3], el.pnums[pi4])); isface2 = faces.Used (INDEX_3::Sort (el.pnums[j], el.pnums[pi3], el.pnums[pi4])); isface3 = faces.Used (INDEX_3::Sort (el.pnums[j], el.pnums[k], el.pnums[pi4])); isface4 = faces.Used (INDEX_3::Sort (el.pnums[j], el.pnums[k], el.pnums[pi3])); */ isfedge1 = isfedge2 = isfedge3 = isfedge4 = isfedge5 = isfedge6 = 0; for (int l = 0; l < 6; l++) { INDEX_2 i2(0,0); switch (l) { case 0: i2.I1() = el.pnums[j]; i2.I2() = el[k]; break; case 1: i2.I1() = el.pnums[j]; i2.I2() = el.pnums[pi3]; break; case 2: i2.I1() = el.pnums[j]; i2.I2() = el.pnums[pi4]; break; case 3: i2.I1() = el.pnums[k]; i2.I2() = el.pnums[pi3]; break; case 4: i2.I1() = el.pnums[k]; i2.I2() = el.pnums[pi4]; break; case 5: i2.I1() = el.pnums[pi3]; i2.I2() = el.pnums[pi4]; break; } i2.Sort(); if (face_edges.Used (i2)) { int domnr = face_edges.Get(i2); if (domnr == -1 || domnr == el.GetIndex()) { switch (l) { case 0: isfedge1 = 1; break; case 1: isfedge2 = 1; break; case 2: isfedge3 = 1; break; case 3: isfedge4 = 1; break; case 4: isfedge5 = 1; break; case 5: isfedge6 = 1; break; } } } } /* isfedge1 = face_edges.Used (INDEX_2::Sort (el.pnums[j], el.pnums[k])); isfedge2 = face_edges.Used (INDEX_2::Sort (el.pnums[j], el.pnums[pi3])); isfedge3 = face_edges.Used (INDEX_2::Sort (el.pnums[j], el.pnums[pi4])); isfedge4 = face_edges.Used (INDEX_2::Sort (el.pnums[k], el.pnums[pi3])); isfedge5 = face_edges.Used (INDEX_2::Sort (el.pnums[k], el.pnums[pi4])); isfedge6 = face_edges.Used (INDEX_2::Sort (el.pnums[pi3], el.pnums[pi4])); */ fp1 = fp2 = fp3 = fp4 = 0; for (int l = 0; l < 4; l++) { int pti(0); switch (l) { case 0: pti = el.pnums[j]; break; case 1: pti = el.pnums[k]; break; case 2: pti = el.pnums[pi3]; break; case 3: pti = el.pnums[pi4]; break; } int domnr = facepoint[pti]; if (domnr == -1 || domnr == el.GetIndex()) { switch (l) { case 0: fp1 = 1; break; case 1: fp2 = 1; break; case 2: fp3 = 1; break; case 3: fp4 = 1; break; } } } /* fp1 = facepoint[el.pnums[j]] != 0; fp2 = facepoint[el.pnums[k]] != 0; fp3 = facepoint[el.pnums[pi3]] != 0; fp4 = facepoint[el.pnums[pi4]] != 0; */ switch (isface1+isface2+isface3+isface4) { case 0: { isedge1 |= isfedge1; isedge2 |= isfedge2; isedge3 |= isfedge3; isedge4 |= isfedge4; isedge5 |= isfedge5; isedge6 |= isfedge6; ep1 |= fp1; ep2 |= fp2; ep3 |= fp3; ep4 |= fp4; switch (isedge1+isedge2+isedge3+isedge4+isedge5+isedge6) { case 0: { if (!ep1 && !ep2 && !ep3 && !ep4) type = HP_TET; if (ep1 && !ep2 && !ep3 && !ep4) type = HP_TET_0E_1V; if (ep1 && ep2 && !ep3 && !ep4) type = HP_TET_0E_2V; if (ep1 && ep2 && ep3 && !ep4) type = HP_TET_0E_3V; if (ep1 && ep2 && ep3 && ep4) type = HP_TET_0E_4V; break; } case 1: { if (!isedge1) break; if (!cp1 && !cp2 && !ep3 && !ep4) type = HP_TET_1E_0V; if (cp1 && !cp2 && !ep3 && !ep4) type = HP_TET_1E_1VA; if (!cp1 && !cp2 && !ep3 && ep4) type = HP_TET_1E_1VB; if (cp1 && cp2 && !ep3 && !ep4) type = HP_TET_1E_2VA; if (cp1 && !cp2 && ep3 && !ep4) type = HP_TET_1E_2VB; if (cp1 && !cp2 && !ep3 && ep4) type = HP_TET_1E_2VC; if (!cp1 && !cp2 && ep3 && ep4) type = HP_TET_1E_2VD; if (cp1 && cp2 && ep3 && !ep4) type = HP_TET_1E_3VA; if (cp1 && !cp2 && ep3 && ep4) type = HP_TET_1E_3VB; if (cp1 && cp2 && ep3 && ep4) type = HP_TET_1E_4V; break; } case 2: { if (isedge1 && isedge2) { if (!cp2 && !cp3 && !ep4) type = HP_TET_2EA_0V; if (cp2 && !cp3 && !ep4) type = HP_TET_2EA_1VA; if (!cp2 && cp3 && !ep4) type = HP_TET_2EA_1VB; if (!cp2 && !cp3 && ep4) type = HP_TET_2EA_1VC; if (cp2 && cp3 && !ep4) type = HP_TET_2EA_2VA; if (cp2 && !cp3 && ep4) type = HP_TET_2EA_2VB; if (!cp2 && cp3 && ep4) type = HP_TET_2EA_2VC; if (cp2 && cp3 && ep4) type = HP_TET_2EA_3V; } if (isedge1 && isedge6) { if (!cp1 && !cp2 && !cp3 && !cp4) type = HP_TET_2EB_0V; if (cp1 && !cp2 && !cp3 && !cp4) type = HP_TET_2EB_1V; if (cp1 && cp2 && !cp3 && !cp4) type = HP_TET_2EB_2VA; if (cp1 && !cp2 && cp3 && !cp4) type = HP_TET_2EB_2VB; if (cp1 && !cp2 && !cp3 && cp4) type = HP_TET_2EB_2VC; if (cp1 && cp2 && cp3 && !cp4) type = HP_TET_2EB_3V; if (cp1 && cp2 && cp3 && cp4) type = HP_TET_2EB_4V; } break; } case 3: { if (isedge1 && isedge2 && isedge3) { if (!cp2 && !cp3 && !cp4) type = HP_TET_3EA_0V; if (cp2 && !cp3 && !cp4) type = HP_TET_3EA_1V; if (cp2 && cp3 && !cp4) type = HP_TET_3EA_2V; if (cp2 && cp3 && cp4) type = HP_TET_3EA_3V; } if (isedge1 && isedge3 && isedge4) { if (!cp3 && !cp4) type = HP_TET_3EB_0V; if (cp3 && !cp4) type = HP_TET_3EB_1V; if (cp3 && cp4) type = HP_TET_3EB_2V; } if (isedge1 && isedge2 && isedge5) { if (!cp3 && !cp4) type = HP_TET_3EC_0V; if (cp3 && !cp4) type = HP_TET_3EC_1V; if (cp3 && cp4) type = HP_TET_3EC_2V; } break; } } break; } case 1: // one singular face { if (!isface1) break; switch (isfedge1+isfedge2+isfedge3+isedge4+isedge5+isedge6) { case 0: { if (!fp1 && !ep2 && !ep3 && !ep4) type = HP_TET_1F_0E_0V; if (fp1 && !ep2 && !ep3 && !ep4) type = HP_TET_1F_0E_1VB; if (!fp1 && ep2 && !ep3 & !ep4) type = HP_TET_1F_0E_1VA; break; } case 1: { if (isfedge1) { if (!ep1 && !ep3 && !ep4) type = HP_TET_1F_1EA_0V; } if (isedge4) // V1-V3 { if (!ep1 && !cp2 && !cp3 && !ep4) type = HP_TET_1F_1EB_0V; } break; } } break; } case 2: // two singular faces { if (!isface1 || !isface2) break; switch (isfedge1+isedge2+isedge3+isedge4+isedge5) { case 0: { if (!ep1 && !ep2 && !cp3 && !cp4) type = HP_TET_2F_0E_0V; break; } } break; } } if (type != HP_NONE) { int pnums[4]; pnums[0] = el.pnums[j]; pnums[1] = el.pnums[k]; pnums[2] = el.pnums[pi3]; pnums[3] = el.pnums[pi4]; for(k=0;k<4;k++) el.pnums[k] = pnums[k]; break; } } if (debug) cout << "type = " << type << endl; if (type == HP_NONE) { // cnt_undef++; (*testout) << "undefined element" << endl << "cp = " << cp1 << cp2 << cp3 << cp4 << endl << "ep = " << ep1 << ep2 << ep3 << ep4 << endl << "isedge = " << isedge1 << isedge2 << isedge3 << isedge4 << isedge5 << isedge6 << endl << "isface = " << isface1 << isface2 << isface3 << isface4 << endl; cout << "undefined element !!! " << endl; } return(type); } HPREF_ELEMENT_TYPE ClassifyPrism(HPRefElement & el, INDEX_2_HASHTABLE & edges, INDEX_2_HASHTABLE & edgepoint_dom, BitArray & cornerpoint, BitArray & edgepoint, INDEX_3_HASHTABLE & faces, INDEX_2_HASHTABLE & face_edges, INDEX_2_HASHTABLE & surf_edges, Array & facepoint) { HPREF_ELEMENT_TYPE type = HP_NONE; int p[6]; for(int m=1;m<=6;m++) { int point_sing[6]={0,0,0,0,0,0}; int face_sing[5]={0,0,0,0,0}; int edge_sing[9]={0,0,0,0,0,0,0,0,0}; if(m<4) { p[0]= m; p[1]=m%3+1; p[2]=(m%3+1)%3+1; for(int l=3;l<6;l++) p[l]=p[l-3]+3; } else { p[0] = m; p[1]=(m%3+1)%3+4; p[2]=m%3+4; for(int l=3;l<6;l++) p[l]=p[l-3]-3; } for(int j=0;j<6;j++) { if(cornerpoint.Test(el.PNum(p[j]))) { point_sing[p[j]-1]=3;} else if(edgepoint.Test(el.PNum(p[j]))) point_sing[p[j]-1]=2; else if (facepoint[el.PNum(p[j])] == -1 || facepoint[el.PNum(p[j])] == el.GetIndex()) point_sing[p[j]-1] = 1; } const ELEMENT_EDGE * eledges = MeshTopology::GetEdges1 (PRISM); for(int k=0;k<9;k++) { INDEX_2 i2 = INDEX_2 :: Sort(el.PNum(p[eledges[k][0]-1]),el.PNum(p[eledges[k][1]-1])); if (edges.Used(i2)) edge_sing[k] = 2; else edge_sing[k] = face_edges.Used(i2); } const ELEMENT_FACE * elfaces = MeshTopology::GetFaces1 (PRISM); for (int k=0;k<5;k++) { INDEX_3 i3; if(k<2) i3 = INDEX_3::Sort(el.pnums[p[elfaces[k][0]-1]-1], el.pnums[p[elfaces[k][1]-1]-1], el.pnums[p[elfaces[k][2]-1]-1]); else { INDEX_4 i4 = INDEX_4(el.pnums[p[elfaces[k][0]-1]-1], el.pnums[p[elfaces[k][1]-1]-1], el.pnums[p[elfaces[k][2]-1]-1],el.pnums[p[elfaces[k][3]-1]-1]); i4.Sort(); i3 = INDEX_3(i4.I1(), i4.I2(), i4.I3()); } if (faces.Used (i3)) { int domnr = faces.Get(i3); if (domnr == -1 || domnr == el.GetIndex()) face_sing[k] = 1; } } if (face_sing[1] > face_sing[0]) {m=m+2; continue;} //int cp = 0; int qfsing = face_sing[2] + face_sing[3] + face_sing[4]; int tfsing = face_sing[0] + face_sing[1]; int evsing = edge_sing[6] + edge_sing[7] + edge_sing[8]; int ehsing = edge_sing[0] + edge_sing[1] + edge_sing[2] + edge_sing[3] + edge_sing[4] + edge_sing[5]; if (qfsing + tfsing + evsing + ehsing == 0) { type = HP_PRISM; break;} HPREF_ELEMENT_TYPE types[] = {HP_NONE,HP_NONE,HP_NONE}; int fb = (1-face_sing[4])* face_sing[3] * (face_sing[2] + face_sing[3]) + 3*face_sing[4]*face_sing[3]*face_sing[2]; int sve[3] = {edge_sing[7] , edge_sing[8], edge_sing[6]}; if(fb!=qfsing) continue; switch(fb) { case 0: if (evsing == 0 && ehsing==3*tfsing) { types[0] = HP_PRISM; types[1] = HP_PRISM_1FA_0E_0V; types[2] = HP_PRISM_2FA_0E_0V; } if(evsing > 0 && sve[0] == evsing) // 1 vertical edge 1-4 { types[0] = HP_PRISM_SINGEDGE; types[1] = HP_PRISM_1FA_1E_0V; types[2] = HP_PRISM_2FA_1E_0V; } if(sve[0] > 0 && sve[1] > 0 && sve[2] == 0) { types[0] = HP_PRISM_SINGEDGE_V12; types[1] = HP_PRISM_1FA_2E_0V; types[2] = HP_PRISM_2FA_2E_0V; } if(sve[0] > 0 && sve[1] > 0 && sve[2] > 0) { types[0] = HP_PRISM_3E_0V; types[1] = HP_PRISM_1FA_3E_0V; types[2] = HP_PRISM_2FA_3E_0V; if ( edge_sing[0] > 1 && edge_sing[2] > 1 && edge_sing[4] > 1 && edge_sing[5] > 1 && tfsing==0) types[0] = HP_PRISM_3E_4EH; } break; case 1: if(sve[0] <= 1 && sve[1] <= 1) { if(sve[2]==0) { types[0] = HP_PRISM_1FB_0E_0V; types[1] = HP_PRISM_1FA_1FB_0E_0V; types[2] = HP_PRISM_2FA_1FB_0E_0V; } else { types[0] = HP_PRISM_1FB_1EC_0V; types[1] = HP_PRISM_1FA_1FB_1EC_0V; types[2] = HP_PRISM_2FA_1FB_1EC_0V; } } if(sve[0] > 1 && sve[2] >= 1 && sve[1] <= 1) { types[0] = HP_PRISM_1FB_2EB_0V; types[1] = HP_PRISM_1FA_1FB_2EB_0V; types[2] = HP_PRISM_2FA_1FB_2EB_0V; } if(sve[0] > 1 && sve[1] <= 1 && sve[2] == 0) // ea && !eb { types[0] = HP_PRISM_1FB_1EA_0V; types[1] = HP_PRISM_1FA_1FB_1EA_0V; types[2] = HP_PRISM_2FA_1FB_1EA_0V; } if(sve[0] <= 1 && sve[1] > 1 && sve[2] == 0) types[1] = HP_PRISM_1FA_1FB_1EB_0V; if(sve[0] > 1 && sve[1]>1) if(sve[2] == 0) // ea && eb { types[0] = HP_PRISM_1FB_2EA_0V; types[1] = HP_PRISM_1FA_1FB_2EA_0V; types[2] = HP_PRISM_2FA_1FB_2EA_0V; } if(sve[0] <= 1 && sve[1] > 1 && sve[2] >0) types[1] = HP_PRISM_1FA_1FB_2EC_0V; if(sve[0] > 1 && sve[1] > 1 && sve[2] >= 1) //sve[2] can also be a face-edge { types[0] = HP_PRISM_1FB_3E_0V; types[1] = HP_PRISM_1FA_1FB_3E_0V; types[2] = HP_PRISM_2FA_1FB_3E_0V; } break; case 2: if(sve[0] <= 1) cout << " **** WARNING: Edge between to different singular faces should be marked singular " << endl; if(sve[1] <= 1) if(sve[2] <=1) { types[0] = HP_PRISM_2FB_0E_0V; types[1] = HP_PRISM_1FA_2FB_0E_0V; types[2] = HP_PRISM_2FA_2FB_0E_0V; } else { types[0] = HP_PRISM_2FB_1EC_0V; types[1] = HP_PRISM_1FA_2FB_1EC_0V; types[2] = HP_PRISM_2FA_2FB_1EC_0V; } else if(sve[2] <= 1) types[1] = HP_PRISM_1FA_2FB_1EB_0V; else { types[0] = HP_PRISM_2FB_3E_0V; types[1] = HP_PRISM_1FA_2FB_3E_0V; types[2] = HP_PRISM_2FA_2FB_3E_0V; } break; case 3: types[0] = HP_PRISM_3FB_0V; types[1] = HP_PRISM_1FA_3FB_0V; types[2] = HP_PRISM_2FA_3FB_0V; break; } type = types[tfsing]; if(type != HP_NONE) break; } /* *testout << " Prism with pnums " << endl; for(int j=0;j<6;j++) *testout << el.pnums[j] << "\t"; *testout << endl; */ if(type != HP_NONE) { int pnums[6]; for(int j=0;j<6;j++) pnums[j] = el.PNum (p[j]); for(int k=0;k<6;k++) el.pnums[k] = pnums[k]; } /* *testout << " Classified Prism with pnums " << endl; for(int j=0;j<6;j++) *testout << el.pnums[j] << "\t"; *testout << endl; */ return(type); } // #ifdef SABINE HPREF_ELEMENT_TYPE ClassifyTrig(HPRefElement & el, INDEX_2_HASHTABLE & edges, INDEX_2_HASHTABLE & edgepoint_dom, BitArray & cornerpoint, BitArray & edgepoint, INDEX_3_HASHTABLE & faces, INDEX_2_HASHTABLE & face_edges, INDEX_2_HASHTABLE & surf_edges, Array & facepoint, int dim, const FaceDescriptor & fd) { HPREF_ELEMENT_TYPE type = HP_NONE; int pnums[3]; int p[3]; INDEX_3 i3 (el.pnums[0], el.pnums[1], el.pnums[2]); i3.Sort(); bool sing_face = faces.Used (i3); // *testout << " facepoint " << facepoint << endl; // Try all rotations of the trig for (int j=0;j<3;j++) { int point_sing[3] = {0,0,0}; int edge_sing[3] = {0,0,0}; // *testout << " actual rotation of trig points " ; for(int m=0;m<3;m++) { p[m] = (j+m)%3 +1; // local vertex number pnums[m] = el.PNum(p[m]); // global vertex number // *testout << pnums[m] << " \t "; } // *testout << endl ; if(dim == 3) { // face point for(int k=0;k<3;k++) if(!sing_face) { // *testout << " fp [" << k << "] = " << facepoint[pnums[k]] << endl; // *testout << " fd.DomainIn()" << fd.DomainIn() << endl; // *testout << " fd.DomainOut()" << fd.DomainOut() << endl; if( facepoint[pnums[k]] && (facepoint[pnums[k]] ==-1 || facepoint[pnums[k]] == fd.DomainIn() || facepoint[pnums[k]] == fd.DomainOut())) point_sing[p[k]-1] = 1; } // if point is on face_edge in next step sing = 2 /* *testout << " pointsing NACH FACEPOints ... FALLS EDGEPOINT UMSETZEN" ; for (int k=0;k<3;k++) *testout << "\t" << point_sing[p[k]-1] ; *testout << endl; */ } const ELEMENT_EDGE * eledges = MeshTopology::GetEdges1(TRIG); if(dim==3) { for(int k=0;k<3;k++) { int ep1=p[eledges[k][0]-1]; int ep2=p[eledges[k][1]-1]; INDEX_2 i2(el.PNum(ep1),el.PNum(ep2)); if(edges.Used(i2)) { edge_sing[k]=2; point_sing[ep1-1] = 2; point_sing[ep2-1] = 2; } else // face_edge? { i2.Sort(); if(surf_edges.Used(i2) && surf_edges.Get(i2) != fd.SurfNr()+1) // edge not face_edge acc. to surface in which trig lies { if(face_edges.Get(i2)==-1 ||face_edges.Get(i2) == fd.DomainIn() || face_edges.Get(i2) == fd.DomainOut() ) { edge_sing[k]=1; } else { point_sing[ep1-1] = 0; // set to edge_point point_sing[ep2-1] = 0; // set to edge_point } } } /* *testout << " pointsing NACH edges UND FACEEDGES UMSETZEN ... " ; for (int k=0;k<3;k++) *testout << "\t" << point_sing[p[k]-1] ; *testout << endl; */ } } /* *testout << " dim " << dim << endl; *testout << " edgepoint_dom " << edgepoint_dom << endl; */ if(dim==2) { for(int k=0;k<3;k++) { int ep1=p[eledges[k][0]-1]; int ep2=p[eledges[k][1]-1]; INDEX_2 i2(el.PNum(ep1),el.PNum(ep2)); if(edges.Used(i2)) { if(edgepoint_dom.Used(INDEX_2(fd.SurfNr(),pnums[ep1-1])) || edgepoint_dom.Used(INDEX_2(-1,pnums[ep1-1])) || edgepoint_dom.Used(INDEX_2(fd.SurfNr(),pnums[ep2-1])) || edgepoint_dom.Used(INDEX_2(-1,pnums[ep2-1]))) { edge_sing[k]=2; point_sing[ep1-1] = 2; point_sing[ep2-1] = 2; } } } } for(int k=0;k<3;k++) if(edgepoint.Test(pnums[k])) //edgepoint, but not member of sing_edge on trig -> cp { INDEX_2 i2a=INDEX_2::Sort(el.PNum(p[k]), el.PNum(p[(k+1)%3])); INDEX_2 i2b=INDEX_2::Sort(el.PNum(p[k]), el.PNum(p[(k+2)%3])); if(!edges.Used(i2a) && !edges.Used(i2b)) point_sing[p[k]-1] = 3; } for(int k=0;k<3;k++) if(cornerpoint.Test(el.PNum(p[k]))) point_sing[p[k]-1] = 3; *testout << "point_sing = " << point_sing[0] << point_sing[1] << point_sing[2] << endl; if(edge_sing[0] + edge_sing[1] + edge_sing[2] == 0) { int ps = point_sing[0] + point_sing[1] + point_sing[2]; if(ps==0) type = HP_TRIG; else if(point_sing[p[0]-1] && !point_sing[p[1]-1] && !point_sing[p[2]-1]) type = HP_TRIG_SINGCORNER; else if(point_sing[p[0]-1] && point_sing[p[1]-1] && !point_sing[p[2]-1]) type = HP_TRIG_SINGCORNER12; else if(point_sing[p[0]-1] && point_sing[p[1]-1] && point_sing[p[2]-1]) { if(dim==2) type = HP_TRIG_SINGCORNER123_2D; else type = HP_TRIG_SINGCORNER123; } } else if (edge_sing[2] && !edge_sing[0] && !edge_sing[1]) //E[2]=(1,2) { int code = 0; if(point_sing[p[0]-1] > edge_sing[2]) code+=1; if(point_sing[p[1]-1] > edge_sing[2]) code+=2; if(point_sing[p[2]-1]) code+=4; HPREF_ELEMENT_TYPE types[] = { HP_TRIG_SINGEDGE, HP_TRIG_SINGEDGECORNER1, HP_TRIG_SINGEDGECORNER2, HP_TRIG_SINGEDGECORNER12, HP_TRIG_SINGEDGECORNER3, HP_TRIG_SINGEDGECORNER13, HP_TRIG_SINGEDGECORNER23, HP_TRIG_SINGEDGECORNER123, }; type = types[code]; } // E[0] = [0,2], E[1] =[1,2], E[2] = [0,1] else if(edge_sing[2] && !edge_sing[1] && edge_sing[0]) { if(point_sing[p[2]-1] <= edge_sing[0] ) { if(point_sing[p[1]-1]<= edge_sing[2]) type = HP_TRIG_SINGEDGES; else type = HP_TRIG_SINGEDGES2; } else { if(point_sing[p[1]-1]<= edge_sing[2]) type = HP_TRIG_SINGEDGES3; else type = HP_TRIG_SINGEDGES23; } } else if (edge_sing[2] && edge_sing[1] && edge_sing[0]) type = HP_TRIG_3SINGEDGES; // cout << " run for " << j << " gives type " << type << endl; //*testout << " run for " << j << " gives type " << type << endl; if(type!=HP_NONE) break; } *testout << "type = " << type << endl; for(int k=0;k<3;k++) el[k] = pnums[k]; /*if(type != HP_NONE) { cout << " TRIG with pnums " << pnums[0] << "\t" << pnums[1] << "\t" << pnums[2] << endl; cout << " type " << type << endl; } */ return(type); } #ifdef HPREF_OLD HPREF_ELEMENT_TYPE ClassifyTrig(HPRefElement & el, INDEX_2_HASHTABLE & edges, INDEX_2_HASHTABLE & edgepoint_dom, BitArray & cornerpoint, BitArray & edgepoint, INDEX_3_HASHTABLE & faces, INDEX_2_HASHTABLE & face_edges, INDEX_2_HASHTABLE & surf_edges, Array & facepoint, int dim, const FaceDescriptor & fd) { HPREF_ELEMENT_TYPE type = HP_NONE; int pnums[3]; INDEX_3 i3 (el.pnums[0], el.pnums[1], el.pnums[2]); i3.Sort(); bool sing_face = faces.Used (i3); for (int j = 1; j <= 3; j++) { int ep1 = edgepoint.Test (el.PNumMod (j)); int ep2 = edgepoint.Test (el.PNumMod (j+1)); int ep3 = edgepoint.Test (el.PNumMod (j+2)); if (dim == 2) { // JS, Dec 11 ep1 = edgepoint_dom.Used (INDEX_2 (fd.SurfNr(), el.PNumMod(j))) || edgepoint_dom.Used (INDEX_2 (-1, el.PNumMod(j))); ep2 = edgepoint_dom.Used (INDEX_2 (fd.SurfNr(), el.PNumMod(j+1))) || edgepoint_dom.Used (INDEX_2 (-1, el.PNumMod(j+1))); ep3 = edgepoint_dom.Used (INDEX_2 (fd.SurfNr(), el.PNumMod(j+2))) || edgepoint_dom.Used (INDEX_2 (-1, el.PNumMod(j+2))); /* ep1 = edgepoint_dom.Used (INDEX_2 (el.index, el.PNumMod(j))); ep2 = edgepoint_dom.Used (INDEX_2 (el.index, el.PNumMod(j+1))); ep3 = edgepoint_dom.Used (INDEX_2 (el.index, el.PNumMod(j+2))); */ // ep3 = edgepoint_dom.Used (INDEX_2 (mesh.SurfaceElement(i).GetIndex(), el.PNumMod(j+2))); } int cp1 = cornerpoint.Test (el.PNumMod (j)); int cp2 = cornerpoint.Test (el.PNumMod (j+1)); int cp3 = cornerpoint.Test (el.PNumMod (j+2)); ep1 |= cp1; ep2 |= cp2; ep3 |= cp3; // (*testout) << "cp = " << cp1 << cp2 << cp3 << ", ep = " << ep1 << ep2 << ep3 << endl; int p[3] = { el.PNumMod (j), el.PNumMod (j+1), el.PNumMod (j+2)}; if(ep1) { INDEX_2 i2a=INDEX_2::Sort(p[0], p[1]); INDEX_2 i2b=INDEX_2::Sort(p[0], p[2]); if(!edges.Used(i2a) && !edges.Used(i2b)) cp1 = 1; } if(ep2) { INDEX_2 i2a=INDEX_2::Sort(p[1], p[0]); INDEX_2 i2b=INDEX_2::Sort(p[1], p[2]); if(!edges.Used(i2a) && !edges.Used(i2b)) cp2 = 1; } if(ep3) { INDEX_2 i2a=INDEX_2::Sort(p[2], p[0]); INDEX_2 i2b=INDEX_2::Sort(p[2], p[1]); if(!edges.Used(i2a) && !edges.Used(i2b)) cp3= 1; } int isedge1=0, isedge2=0, isedge3=0; if(dim == 3 ) { INDEX_2 i2; i2 = INDEX_2(el.PNumMod (j), el.PNumMod (j+1)); isedge1 = edges.Used (i2); i2.Sort(); if(surf_edges.Used(i2) && surf_edges.Get(i2) != fd.SurfNr()+1 && (face_edges.Get(i2) == -1 || face_edges.Get(i2) == fd.DomainIn() || face_edges.Get(i2) == fd.DomainOut()) ) { isedge1=1; ep1 = 1; ep2=1; } i2 = INDEX_2(el.PNumMod (j+1), el.PNumMod (j+2)); isedge2 = edges.Used (i2); i2.Sort(); if(surf_edges.Used(i2) && surf_edges.Get(i2) != fd.SurfNr()+1 && (face_edges.Get(i2) == -1 || face_edges.Get(i2) == fd.DomainIn() || face_edges.Get(i2) == fd.DomainOut()) ) { isedge2=1; ep2 = 1; ep3=1; } i2 = INDEX_2(el.PNumMod (j+2), el.PNumMod (j+3)); isedge3 = edges.Used (i2); i2.Sort(); if(surf_edges.Used(i2) && surf_edges.Get(i2) != fd.SurfNr()+1 && (face_edges.Get(i2) == -1 || face_edges.Get(i2) == fd.DomainIn() || face_edges.Get(i2) == fd.DomainOut()) ) { isedge3=1; ep1 = 1; ep3=1; } // cout << " isedge " << isedge1 << " \t " << isedge2 << " \t " << isedge3 << endl; if (!sing_face) { /* if (!isedge1) { cp1 |= ep1; cp2 |= ep2; } if (!isedge2) { cp2 |= ep2; cp3 |= ep3; } if (!isedge3) { cp3 |= ep3; cp1 |= ep1; } */ ep1 |= facepoint [el.PNumMod(j)] != 0; ep2 |= facepoint [el.PNumMod(j+1)] != 0; ep3 |= facepoint [el.PNumMod(j+2)] != 0; isedge1 |= face_edges.Used (INDEX_2::Sort (el.PNumMod(j), el.PNumMod(j+1))); isedge2 |= face_edges.Used (INDEX_2::Sort (el.PNumMod(j+1), el.PNumMod(j+2))); isedge3 |= face_edges.Used (INDEX_2::Sort (el.PNumMod(j+2), el.PNumMod(j+3))); } } if(dim ==2) { INDEX_2 i2; i2 = INDEX_2(el.PNumMod (j), el.PNumMod (j+1)); i2.Sort(); isedge1 = edges.Used (i2); if(isedge1) { ep1 = 1; ep2=1; } i2 = INDEX_2(el.PNumMod (j+1), el.PNumMod (j+2)); i2.Sort(); isedge2 = edges.Used (i2); if(isedge2) { ep2 = 1; ep3=1; } i2 = INDEX_2(el.PNumMod (j+2), el.PNumMod (j+3)); i2.Sort(); isedge3 = edges.Used (i2); if(isedge3) { ep1 = 1; ep3=1; } } /* cout << " used " << face_edges.Used (INDEX_2::Sort (el.PNumMod(j), el.PNumMod(j+1))) << endl; cout << " isedge " << isedge1 << " \t " << isedge2 << " \t " << isedge3 << endl; cout << " ep " << ep1 << "\t" << ep2 << " \t " << ep3 << endl; cout << " cp " << cp1 << "\t" << cp2 << " \t " << cp3 << endl; */ if (isedge1 + isedge2 + isedge3 == 0) { if (!ep1 && !ep2 && !ep3) type = HP_TRIG; if (ep1 && !ep2 && !ep3) type = HP_TRIG_SINGCORNER; if (ep1 && ep2 && !ep3) type = HP_TRIG_SINGCORNER12; if (ep1 && ep2 && ep3) { if (dim == 2) type = HP_TRIG_SINGCORNER123_2D; else type = HP_TRIG_SINGCORNER123; } if (type != HP_NONE) { pnums[0] = el.PNumMod (j); pnums[1] = el.PNumMod (j+1); pnums[2] = el.PNumMod (j+2); break; } } if (isedge1 && !isedge2 && !isedge3) { int code = 0; if (cp1) code += 1; if (cp2) code += 2; if (ep3) code += 4; HPREF_ELEMENT_TYPE types[] = { HP_TRIG_SINGEDGE, HP_TRIG_SINGEDGECORNER1, HP_TRIG_SINGEDGECORNER2, HP_TRIG_SINGEDGECORNER12, HP_TRIG_SINGEDGECORNER3, HP_TRIG_SINGEDGECORNER13, HP_TRIG_SINGEDGECORNER23, HP_TRIG_SINGEDGECORNER123, }; type = types[code]; pnums[0] = el.PNumMod (j); pnums[1] = el.PNumMod (j+1); pnums[2] = el.PNumMod (j+2); break; } if (isedge1 && !isedge2 && isedge3) { if (!cp3) { if (!cp2) type = HP_TRIG_SINGEDGES; else type = HP_TRIG_SINGEDGES2; } else { if (!cp2) type = HP_TRIG_SINGEDGES3; else type = HP_TRIG_SINGEDGES23; } pnums[0] = el.PNumMod (j); pnums[1] = el.PNumMod (j+1); pnums[2] = el.PNumMod (j+2); break; } if (isedge1 && isedge2 && isedge3) { type = HP_TRIG_3SINGEDGES; pnums[0] = el.PNumMod (j); pnums[1] = el.PNumMod (j+1); pnums[2] = el.PNumMod (j+2); break; } } for(int k=0;k<3;k++) el[k] = pnums[k]; /*if(type != HP_NONE) { cout << " TRIG with pnums " << pnums[0] << "\t" << pnums[1] << "\t" << pnums[2] << endl; cout << " type " << type << endl; } */ return(type); } #endif HPREF_ELEMENT_TYPE ClassifyQuad(HPRefElement & el, INDEX_2_HASHTABLE & edges, INDEX_2_HASHTABLE & edgepoint_dom, BitArray & cornerpoint, BitArray & edgepoint, INDEX_3_HASHTABLE & faces, INDEX_2_HASHTABLE & face_edges, INDEX_2_HASHTABLE & surf_edges, Array & facepoint, int dim, const FaceDescriptor & fd) { HPREF_ELEMENT_TYPE type = HP_NONE; int ep1(-1), ep2(-1), ep3(-1), ep4(-1), cp1(-1), cp2(-1), cp3(-1), cp4(-1); int isedge1, isedge2, isedge3, isedge4; *testout << "edges = " << edges << endl; for (int j = 1; j <= 4; j++) { ep1 = edgepoint.Test (el.PNumMod (j)); ep2 = edgepoint.Test (el.PNumMod (j+1)); ep3 = edgepoint.Test (el.PNumMod (j+2)); ep4 = edgepoint.Test (el.PNumMod (j+3)); if (dim == 2) { ep1 = edgepoint_dom.Used (INDEX_2 (el.GetIndex(), el.PNumMod(j))); ep2 = edgepoint_dom.Used (INDEX_2 (el.GetIndex(), el.PNumMod(j+1))); ep3 = edgepoint_dom.Used (INDEX_2 (el.GetIndex(), el.PNumMod(j+2))); ep4 = edgepoint_dom.Used (INDEX_2 (el.GetIndex(), el.PNumMod(j+3))); } cp1 = cornerpoint.Test (el.PNumMod (j)); cp2 = cornerpoint.Test (el.PNumMod (j+1)); cp3 = cornerpoint.Test (el.PNumMod (j+2)); cp4 = cornerpoint.Test (el.PNumMod (j+3)); ep1 |= cp1; ep2 |= cp2; ep3 |= cp3; ep4 |= cp4; int p[4] = { el.PNumMod (j), el.PNumMod (j+1), el.PNumMod (j+2), el.PNumMod(j+4)}; //int epp[4] = { ep1, ep2, ep3, ep4}; int cpp[4] = { cp1, cp2, cp3, cp4}; for(int k=0;k<0;k++) { INDEX_2 i2a=INDEX_2::Sort(p[k], p[(k+1)%4]); INDEX_2 i2b=INDEX_2::Sort(p[k], p[(k-1)%4]); if(!edges.Used(i2a) && !edges.Used(i2b)) cpp[k] = 1; } cp1= cpp[0]; cp2=cpp[1]; cp3=cpp[2]; cp4=cpp[3]; if(dim ==3) { INDEX_2 i2; i2 = INDEX_2(el.PNumMod (j), el.PNumMod (j+1)); // i2.Sort(); isedge1 = edges.Used (i2); i2.Sort(); if(surf_edges.Used(i2) && surf_edges.Get(i2) != fd.SurfNr()+1 && (face_edges.Get(i2) == -1 || face_edges.Get(i2) == fd.DomainIn() || face_edges.Get(i2) == fd.DomainOut()) ) { isedge1=1; ep1 = 1; ep2=1; } i2 = INDEX_2(el.PNumMod (j+1), el.PNumMod (j+2)); // i2.Sort(); isedge2 = edges.Used (i2); i2.Sort(); if(surf_edges.Used(i2) && surf_edges.Get(i2) != fd.SurfNr()+1 && (face_edges.Get(i2) == -1 || face_edges.Get(i2) == fd.DomainIn() || face_edges.Get(i2) == fd.DomainOut()) ) { isedge2=1; ep2=1; ep3=1; } i2 = INDEX_2(el.PNumMod (j+2), el.PNumMod (j+3)); // i2.Sort(); isedge3 = edges.Used (i2); i2.Sort(); if(surf_edges.Used(i2) && surf_edges.Get(i2) != fd.SurfNr()+1 && (face_edges.Get(i2) == -1 || face_edges.Get(i2) == fd.DomainIn() || face_edges.Get(i2) == fd.DomainOut()) ) { isedge3=1; ep3=1; ep4=1; } i2 = INDEX_2(el.PNumMod (j+3), el.PNumMod (j+4)); // i2.Sort(); isedge4 = edges.Used (i2); i2.Sort(); if(surf_edges.Used(i2) && surf_edges.Get(i2) != fd.SurfNr()+1 && (face_edges.Get(i2) == -1 || face_edges.Get(i2) == fd.DomainIn() || face_edges.Get(i2) == fd.DomainOut()) ) { isedge4=1; ep4=1; ep1=1; } //MH*********************************************************************************************************** if(ep1) if(edgepoint.Test(p[0])) { INDEX_2 i2a=INDEX_2::Sort(p[0], p[1]); INDEX_2 i2b=INDEX_2::Sort(p[0], p[3]); if(!edges.Used(i2a) && !edges.Used(i2b)) cp1 = 1; } if(ep2) if(edgepoint.Test(p[1])) { INDEX_2 i2a=INDEX_2::Sort(p[0], p[1]); INDEX_2 i2b=INDEX_2::Sort(p[1], p[2]); if(!edges.Used(i2a) && !edges.Used(i2b)) cp2 = 1; } if(ep3) if(edgepoint.Test(p[2])) { INDEX_2 i2a=INDEX_2::Sort(p[2], p[1]); INDEX_2 i2b=INDEX_2::Sort(p[3], p[2]); if(!edges.Used(i2a) && !edges.Used(i2b)) cp3 = 1; } if(ep4) if(edgepoint.Test(p[3])) { INDEX_2 i2a=INDEX_2::Sort(p[0], p[3]); INDEX_2 i2b=INDEX_2::Sort(p[3], p[2]); if(!edges.Used(i2a) && !edges.Used(i2b)) cp4 = 1; } //MH***************************************************************************************************************************** } else { INDEX_2 i2; i2 = INDEX_2(el.PNumMod (j), el.PNumMod (j+1)); i2.Sort(); isedge1 = edges.Used (i2); if(isedge1) { ep1 = 1; ep2=1; } i2 = INDEX_2(el.PNumMod (j+1), el.PNumMod (j+2)); i2.Sort(); isedge2 = edges.Used (i2); if(isedge2) { ep2=1; ep3=1; } i2 = INDEX_2(el.PNumMod (j+2), el.PNumMod (j+3)); i2.Sort(); isedge3 = edges.Used (i2); if(isedge3) { ep3=1; ep4=1; } i2 = INDEX_2(el.PNumMod (j+3), el.PNumMod (j+4)); i2.Sort(); isedge4 = edges.Used (i2); if(isedge4) { ep4=1; ep1=1; } } int sumcp = cp1 + cp2 + cp3 + cp4; int sumep = ep1 + ep2 + ep3 + ep4; int sumedge = isedge1 + isedge2 + isedge3 + isedge4; *testout << "isedge = " << isedge1 << isedge2 << isedge3 << isedge4 << endl; *testout << "iscp = " << cp1 << cp2 << cp3 << cp4 << endl; *testout << "isep = " << ep1 << ep2 << ep3 << ep4 << endl; switch (sumedge) { case 0: { switch (sumep) { case 0: type = HP_QUAD; break; case 1: if (ep1) type = HP_QUAD_SINGCORNER; break; case 2: { if (ep1 && ep2) type = HP_QUAD_0E_2VA; if (ep1 && ep3) type = HP_QUAD_0E_2VB; break; } case 3: if (!ep4) type = HP_QUAD_0E_3V; break; case 4: type = HP_QUAD_0E_4V; break; } break; } case 1: { if (isedge1) { switch (cp1+cp2+ep3+ep4) { case 0: type = HP_QUAD_SINGEDGE; break; case 1: { if (cp1) type = HP_QUAD_1E_1VA; if (cp2) type = HP_QUAD_1E_1VB; if (ep3) type = HP_QUAD_1E_1VC; if (ep4) type = HP_QUAD_1E_1VD; break; } case 2: { if (cp1 && cp2) type = HP_QUAD_1E_2VA; if (cp1 && ep3) type = HP_QUAD_1E_2VB; if (cp1 && ep4) type = HP_QUAD_1E_2VC; if (cp2 && ep3) type = HP_QUAD_1E_2VD; if (cp2 && ep4) type = HP_QUAD_1E_2VE; if (ep3 && ep4) type = HP_QUAD_1E_2VF; break; } case 3: { if (cp1 && cp2 && ep3) type = HP_QUAD_1E_3VA; if (cp1 && cp2 && ep4) type = HP_QUAD_1E_3VB; if (cp1 && ep3 && ep4) type = HP_QUAD_1E_3VC; if (cp2 && ep3 && ep4) type = HP_QUAD_1E_3VD; break; } case 4: { type = HP_QUAD_1E_4V; break; } } } break; } case 2: { if (isedge1 && isedge4) { if (!cp2 && !ep3 && !cp4) type = HP_QUAD_2E; if (cp2 && !ep3 && !cp4) type = HP_QUAD_2E_1VA; if (!cp2 && ep3 && !cp4) type = HP_QUAD_2E_1VB; if (!cp2 && !ep3 && cp4) type = HP_QUAD_2E_1VC; if (cp2 && ep3 && !cp4) type = HP_QUAD_2E_2VA; if (cp2 && !ep3 && cp4) type = HP_QUAD_2E_2VB; if (!cp2 && ep3 && cp4) type = HP_QUAD_2E_2VC; if (cp2 && ep3 && cp4) type = HP_QUAD_2E_3V; } if (isedge1 && isedge3) { switch (sumcp) { case 0: type = HP_QUAD_2EB_0V; break; case 1: { if (cp1) type = HP_QUAD_2EB_1VA; if (cp2) type = HP_QUAD_2EB_1VB; break; } case 2: { if (cp1 && cp2) { type = HP_QUAD_2EB_2VA; } if (cp1 && cp3) { type = HP_QUAD_2EB_2VB; } if (cp1 && cp4) { type = HP_QUAD_2EB_2VC; } if (cp2 && cp4) { type = HP_QUAD_2EB_2VD; } break; } case 3: { if (cp1 && cp2 && cp3) { type = HP_QUAD_2EB_3VA; } if (cp1 && cp2 && cp4) { type = HP_QUAD_2EB_3VB; } break; } case 4: { type = HP_QUAD_2EB_4V; break; } } } break; } case 3: { if (isedge1 && isedge2 && isedge4) { if (!cp3 && !cp4) type = HP_QUAD_3E; if (cp3 && !cp4) type = HP_QUAD_3E_3VA; if (!cp3 && cp4) type = HP_QUAD_3E_3VB; if (cp3 && cp4) type = HP_QUAD_3E_4V; } break; } case 4: { type = HP_QUAD_4E; break; } } if (type != HP_NONE) { int pnums[4]; pnums[0] = el.PNumMod (j); pnums[1] = el.PNumMod (j+1); pnums[2] = el.PNumMod (j+2); pnums[3] = el.PNumMod (j+3); for (int k=0;k<4;k++) el[k] = pnums[k]; /* cout << " QUAD with pnums " << pnums[0] << "\t" << pnums[1] << "\t" << pnums[2] << "\t" << pnums[3] << endl << " of type " << type << endl; */ break; } } if (type == HP_NONE) { (*testout) << "undefined element" << endl << "cp = " << cp1 << cp2 << cp3 << cp4 << endl << "ep = " << ep1 << ep2 << ep3 << ep4 << endl << "isedge = " << isedge1 << isedge2 << isedge3 << isedge4 << endl; } *testout << "quad type = " << type << endl; return type; } HPREF_ELEMENT_TYPE ClassifyHex(HPRefElement & el, INDEX_2_HASHTABLE & edges, INDEX_2_HASHTABLE & edgepoint_dom, BitArray & cornerpoint, BitArray & edgepoint, INDEX_3_HASHTABLE & faces, INDEX_2_HASHTABLE & face_edges, INDEX_2_HASHTABLE & surf_edges, Array & facepoint) { HPREF_ELEMENT_TYPE type = HP_NONE; // implementation only for HP_HEX_1F_0E_0V // HP_HEX_1FA_1FB_0E_0V // HP_HEX // up to now other cases are refine dummies // indices of bot,top-faces combinations int index[6][2] = {{0,1},{1,0},{2,4},{4,2},{3,5},{5,3}}; int p[8]; const ELEMENT_FACE * elfaces = MeshTopology::GetFaces1 (HEX); const ELEMENT_EDGE * eledges = MeshTopology::GetEdges1 (HEX); for(int m=0;m<6 && type == HP_NONE;m++) for(int j=0;j<4 && type == HP_NONE;j++) { int point_sing[8]={0,0,0,0,0,0,0,0}; int face_sing[6] = {0,0,0,0,0,0}; int edge_sing[12] = {0,0,0,0,0,0,0,0,0,0,0,0}; int spoint=0, sface=0, sedge=0; for(int l=0;l<4;l++) { p[l] = elfaces[index[m][0]][(4-j-l)%4]; p[l+4] = elfaces[index[m][1]][(j+l)%4]; } for(int l=0;l<8;l++) if(cornerpoint.Test(el.PNum(p[l]))) { point_sing[p[l]-1]=3; spoint++; } else if(edgepoint.Test(el.PNum(p[l]))) point_sing[p[l]-1]=2; else if (facepoint[el.PNum(p[l])] == -1 || facepoint[el.PNum(p[l])] == el.GetIndex()) point_sing[p[l]-1] = 1; for(int k=0;k<12;k++) { INDEX_2 i2 = INDEX_2 :: Sort(el.PNum(p[eledges[k][0]-1]),el.PNum(p[eledges[k][1]-1])); if (edges.Used(i2)) { edge_sing[k] = 2; sedge++; } else edge_sing[k] = face_edges.Used(i2); } for (int k=0;k<6;k++) { INDEX_3 i3; INDEX_4 i4 = INDEX_4(el.pnums[p[elfaces[k][0]-1]-1], el.pnums[p[elfaces[k][1]-1]-1], el.pnums[p[elfaces[k][2]-1]-1],el.pnums[p[elfaces[k][3]-1]-1]); i4.Sort(); i3 = INDEX_3(i4.I1(), i4.I2(), i4.I3()); if (faces.Used (i3)) { int domnr = faces.Get(i3); if (domnr == -1 || domnr == el.GetIndex()) { face_sing[k] = 1; sface++; } } } if(!sface && !sedge && !spoint) type = HP_HEX; if(!sedge && !spoint) { if(face_sing[0] && face_sing[2] && sface==2) type = HP_HEX_1FA_1FB_0E_0V; if (face_sing[0] && sface==1) type = HP_HEX_1F_0E_0V; } el.type=type; if(type != HP_NONE) { int pnums[8]; for(int l=0;l<8;l++) pnums[l] = el[p[l]-1]; for(int l=0;l<8;l++) el[l] = pnums[l]; /* cout << " HEX with pnums " << pnums[0] << "\t" << pnums[1] << "\t" << pnums[2] << "\t" << pnums[3] << "\t" << pnums[4] << "\t" << pnums[5] << endl << " of type " << type << endl; */ break; } } return (type); } HPREF_ELEMENT_TYPE ClassifySegm(HPRefElement & hpel, INDEX_2_HASHTABLE & edges, INDEX_2_HASHTABLE & edgepoint_dom, BitArray & cornerpoint, BitArray & edgepoint, INDEX_3_HASHTABLE & faces, INDEX_2_HASHTABLE & face_edges, INDEX_2_HASHTABLE & surf_edges, Array & facepoint) { int cp1 = cornerpoint.Test (hpel[0]); int cp2 = cornerpoint.Test (hpel[1]); INDEX_2 i2; i2 = INDEX_2(hpel[0], hpel[1]); i2.Sort(); if (!edges.Used (i2)) { cp1 = edgepoint.Test (hpel[0]); cp2 = edgepoint.Test (hpel[1]); } if(!edges.Used(i2) && !face_edges.Used(i2)) { if(facepoint[hpel[0]]!=0) cp1=1; if(facepoint[hpel[1]]!=0) cp2=1; } if(edges.Used(i2) && !face_edges.Used(i2)) { if(facepoint[hpel[0]]) cp1 = 1; if(facepoint[hpel[1]]) cp2 = 1; } if (!cp1 && !cp2) hpel.type = HP_SEGM; else if (cp1 && !cp2) hpel.type = HP_SEGM_SINGCORNERL; else if (!cp1 && cp2) hpel.type = HP_SEGM_SINGCORNERR; else hpel.type = HP_SEGM_SINGCORNERS; // cout << " SEGM found with " << hpel[0] << " \t" << hpel[1] << endl << " of type " << hpel.type << endl; return(hpel.type) ; } HPREF_ELEMENT_TYPE ClassifyPyramid(HPRefElement & el, INDEX_2_HASHTABLE & edges, INDEX_2_HASHTABLE & edgepoint_dom, BitArray & cornerpoint, BitArray & edgepoint, INDEX_3_HASHTABLE & faces, INDEX_2_HASHTABLE & face_edges, INDEX_2_HASHTABLE & surf_edges, Array & facepoint) { HPREF_ELEMENT_TYPE type = HP_NONE; // implementation only for HP_PYRAMID // HP_PYRAMID_0E_1V // HP_PYRAMID_EDGES // HP_PYRAMID_1FB_0E_1VA // up to now other cases are refine dummies // indices of bot,top-faces combinations // int index[6][2] = {{0,1},{1,0},{2,4},{4,2},{3,5},{5,3}}; const ELEMENT_FACE * elfaces = MeshTopology::GetFaces1 (PYRAMID); const ELEMENT_EDGE * eledges = MeshTopology::GetEdges1 (PYRAMID); int point_sing[5]={0,0,0,0,0}; int face_sing[5] = {0,0,0,0,0}; int edge_sing[8] = {0,0,0,0,0,0,0,0}; int spoint=0, sedge=0, sface=0; for(int m=0;m<4 && type == HP_NONE;m++) { int p[5] = {m%4, m%4+1, m%4+2, m%4+3, 4}; for(int l=0;l<5;l++) { if(cornerpoint.Test(el.pnums[p[l]])) point_sing[l]=3; else if(edgepoint.Test(el.pnums[p[l]])) point_sing[l]=2; else if (facepoint[el.pnums[p[l]]] == -1 || facepoint[el.pnums[p[l]]] == el.GetIndex()) point_sing[l] = 1; spoint += point_sing[l]; } for(int k=0;k<8;k++) { INDEX_2 i2 = INDEX_2 :: Sort(el.pnums[p[eledges[k][0]-1]], el.pnums[p[eledges[k][1]-1]]); if (edges.Used(i2)) edge_sing[k] = 2; else edge_sing[k] = face_edges.Used(i2); sedge += edge_sing[k]; } for (int k=0;k<5;k++) { INDEX_3 i3; INDEX_4 i4 = INDEX_4(el.pnums[p[elfaces[k][0]-1]], el.pnums[p[elfaces[k][1]-1]], el.pnums[p[elfaces[k][2]-1]], el.pnums[p[elfaces[k][3]-1]]); i4.Sort(); i3 = INDEX_3(i4.I1(), i4.I2(), i4.I3()); if (faces.Used (i3)) { int domnr = faces.Get(i3); if (domnr == -1 || domnr == el.GetIndex()) face_sing[k] = 1; } sface +=face_sing[k]; } if(!sface && !spoint && !sedge) return(HP_PYRAMID); if(!sface && !sedge && point_sing[p[0]] == spoint) type = HP_PYRAMID_0E_1V; if(!sface && edge_sing[0] + edge_sing[2] == sedge && spoint == point_sing[0] + point_sing[1] + point_sing[3]) type = HP_PYRAMID_EDGES; if(sface && sface == face_sing[0] && spoint == point_sing[4] + 2) type = HP_PYRAMID_1FB_0E_1VA; if(type != HP_NONE) { int pnums[8]; for(int l=0;l<5;l++) pnums[l] = el[p[l]]; for(int l=0;l<5;l++) el[l] = pnums[l]; el.type=type; break; } } return (type); } netgen-6.2.1804/libsrc/meshing/geomsearch.hpp0000644000175000017500000000362613272137567017552 0ustar kurtkurt#ifndef FILE_GEOMSEARCH #define FILE_GEOMSEARCH /**************************************************************************/ /* File: geomsearch.hh */ /* Author: Johannes Gerstmayr */ /* Date: 19. Nov. 97 */ /**************************************************************************/ class FrontPoint3; class FrontFace; class MiniElement2d; /// class for quick access of 3D-elements; class cannot delete elements, but only append class GeomSearch3d { public: /// GeomSearch3d(); /// virtual ~GeomSearch3d(); /// void Init (Array *pointsi, Array *facesi); ///get elements max extension void ElemMaxExt(Point3d& minp, Point3d& maxp, const MiniElement2d& elem); ///get minimum coordinates of two points ->p2 void MinCoords(const Point3d& p1, Point3d& p2); ///get minimum coordinates of two points ->p2 void MaxCoords(const Point3d& p1, Point3d& p2); ///create a hashtable from an existing array of triangles ///sizei = number of pieces in one direction void Create(); ///add new element to Hashtable void AddElem(const MiniElement2d& elem, INDEX elemnum); ///GetLocal faces in sphere with radius xh and middlepoint p void GetLocals(Array & locfaces, Array & findex, INDEX fstind, const Point3d& p0, double xh); private: Array *faces; // Pointers to Arrays in Adfront Array *points; Array *> hashtable; Point3d minext; //extension of Hashdomain Point3d maxext; Point3d maxextreal; Vec3d elemsize; //size of one Hash-Element threeint size; // size of Hashtable in each direction int reset; int hashcount; }; #endif netgen-6.2.1804/libsrc/meshing/curvedelems.cpp0000644000175000017500000034025513272137567017750 0ustar kurtkurt#include #include "meshing.hpp" #include "../general/autodiff.hpp" namespace netgen { // bool rational = true; static void ComputeGaussRule (int n, Array & xi, Array & wi) { xi.SetSize (n); wi.SetSize (n); int m = (n+1)/2; double p1, p2, p3; double pp, z, z1; for (int i = 1; i <= m; i++) { z = cos ( M_PI * (i - 0.25) / (n + 0.5)); while(1) { p1 = 1; p2 = 0; for (int j = 1; j <= n; j++) { p3 = p2; p2 = p1; p1 = ((2 * j - 1) * z * p2 - (j - 1) * p3) / j; } // p1 is legendre polynomial pp = n * (z*p1-p2) / (z*z - 1); z1 = z; z = z1-p1/pp; if (fabs (z - z1) < 1e-14) break; } xi[i-1] = 0.5 * (1 - z); xi[n-i] = 0.5 * (1 + z); wi[i-1] = wi[n-i] = 1.0 / ( (1 - z * z) * pp * pp); } } // compute edge bubbles up to order n, x \in (-1, 1) template static void CalcEdgeShape (int n, T x, T * shape) { T p1 = x, p2 = -1, p3 = 0; for (int j=2; j<=n; j++) { p3=p2; p2=p1; p1=( (2*j-3) * x * p2 - (j-3) * p3) / j; shape[j-2] = p1; } } template static void CalcEdgeShapeLambda (int n, T x, FUNC func) { T p1(x), p2(-1.0), p3(0.0); for (int j=2; j<=n; j++) { p3=p2; p2=p1; p1=( (2*j-3) * x * p2 - (j-3) * p3) / j; func(j-2, p1); } } template static void CalcEdgeDx (int n, T x, T * dshape) { T p1 = x, p2 = -1, p3 = 0; T p1dx = 1, p2dx = 0, p3dx = 0; for (int j=2; j<=n; j++) { p3=p2; p2=p1; p3dx = p2dx; p2dx = p1dx; p1=( (2*j-3) * x * p2 - (j-3) * p3) / j; p1dx = ( (2*j-3) * (x * p2dx + p2) - (j-3) * p3dx) / j; dshape[j-2] = p1dx; } } template static void CalcEdgeShapeDx (int n, T x, T * shape, T * dshape) { T p1 = x, p2 = -1, p3 = 0; T p1dx = 1, p2dx = 0, p3dx = 0; for (int j=2; j<=n; j++) { p3=p2; p2=p1; p3dx = p2dx; p2dx = p1dx; p1=( (2*j-3) * x * p2 - (j-3) * p3) / j; p1dx = ( (2*j-3) * (x * p2dx + p2) - (j-3) * p3dx) / j; shape[j-2] = p1; dshape[j-2] = p1dx; } } // compute L_i(x/t) * t^i template static void CalcScaledEdgeShape (int n, T x, T t, T * shape) { static bool init = false; static double coefs[100][2]; if (!init) { for (int j = 0; j < 100; j++) { coefs[j][0] = double(2*j+1)/(j+2); coefs[j][1] = -double(j-1)/(j+2); } init = true; } T p1 = x, p2 = -1, p3 = 0; T tt = t*t; for (int j=0; j<=n-2; j++) { p3=p2; p2=p1; p1= coefs[j][0] * x * p2 + coefs[j][1] * tt*p3; // p1=( (2*j+1) * x * p2 - t*t*(j-1) * p3) / (j+2); shape[j] = p1; } } template static void CalcScaledEdgeShapeLambda (int n, T x, T t, FUNC func) { static bool init = false; static double coefs[100][2]; if (!init) { for (int j = 0; j < 100; j++) { coefs[j][0] = double(2*j+1)/(j+2); coefs[j][1] = -double(j-1)/(j+2); } init = true; } T p1(x), p2(-1.0), p3(0.0); T tt = t*t; for (int j=0; j<=n-2; j++) { p3=p2; p2=p1; p1= coefs[j][0] * x * p2 + coefs[j][1] * tt*p3; // p1=( (2*j+1) * x * p2 - t*t*(j-1) * p3) / (j+2); func(j, p1); } } template static void CalcScaledEdgeShapeDxDt (int n, T x, T t, T * dshape) { T p1 = x, p2 = -1, p3 = 0; T p1dx = 1, p1dt = 0; T p2dx = 0, p2dt = 0; T p3dx = 0, p3dt = 0; for (int j=0; j<=n-2; j++) { p3=p2; p3dx=p2dx; p3dt = p2dt; p2=p1; p2dx=p1dx; p2dt = p1dt; p1 = ( (2*j+1) * x * p2 - t*t*(j-1) * p3) / (j+2); p1dx = ( (2*j+1) * (x * p2dx + p2) - t*t*(j-1) * p3dx) / (j+2); p1dt = ( (2*j+1) * x * p2dt - (j-1)* (t*t*p3dt+2*t*p3)) / (j+2); // shape[j] = p1; dshape[DIST*j ] = p1dx; dshape[DIST*j+1] = p1dt; } } template static void LegendrePolynomial (int n, Tx x, Tres * values) { switch (n) { case 0: values[0] = 1; break; case 1: values[0] = 1; values[1] = x; break; default: if (n < 0) return; Tx p1 = 1.0, p2 = 0.0, p3; values[0] = 1.0; for (int j=1; j<=n; j++) { p3 = p2; p2 = p1; p1 = ((2.0*j-1.0)*x*p2 - (j-1.0)*p3) / j; values[j] = p1; } } } template static void ScaledLegendrePolynomial (int n, Tx x, Tt t, Tres * values) { switch (n) { case 0: values[0] = 1.0; break; case 1: values[0] = 1.0; values[1] = x; break; default: if (n < 0) return; Tx p1 = 1.0, p2 = 0.0, p3; values[0] = 1.0; for (int j=1; j<=n; j++) { p3 = p2; p2 = p1; p1 = ((2.0*j-1.0)*x*p2 - t*t*(j-1.0)*p3) / j; values[j] = p1; } } } class RecPol { protected: int maxorder; double *a, *b, *c; public: RecPol (int amaxorder) { maxorder = amaxorder; a = new double[maxorder+1]; b = new double[maxorder+1]; c = new double[maxorder+1]; } ~RecPol () { delete [] a; delete [] b; delete [] c; } template void Evaluate (int n, S x, T * values) { S p1(1.0), p2(0.0), p3; if (n >= 0) p2 = values[0] = 1.0; if (n >= 1) p1 = values[1] = a[0]+b[0]*x; for (int i = 1; i < n; i++) { p3 = p2; p2=p1; p1 = (a[i]+b[i]*x)*p2-c[i]*p3; values[i+1] = p1; } } template void EvaluateScaled (int n, S x, S y, T * values) { S p1(1.0), p2(0.0), p3; if (n >= 0) p2 = values[0] = 1.0; if (n >= 1) p1 = values[1] = a[0]*y+b[0]*x; for (int i = 1; i < n; i++) { p3 = p2; p2=p1; p1 = (a[i]*y+b[i]*x)*p2-c[i]*y*y*p3; values[i+1] = p1; } } template void EvaluateScaledLambda (int n, S x, S y, FUNC func) { S p1(1.0), p2(0.0), p3; if (n >= 0) { p2 = 1.0; func(0, p2); } if (n >= 1) { p1 = a[0]*y+b[0]*x; func(1, p1); } for (int i = 1; i < n; i++) { p3 = p2; p2=p1; p1 = (a[i]*y+b[i]*x)*p2-c[i]*y*y*p3; func(i+1, p1); } } }; class JacobiRecPol : public RecPol { public: JacobiRecPol (int amo, double al, double be) : RecPol (amo) { for (int i = 0; i <= maxorder; i++) { double den = 2*(i+1)*(i+al+be+1)*(2*i+al+be); a[i] = (2*i+al+be+1)*(al*al-be*be) / den; b[i] = (2*i+al+be)*(2*i+al+be+1)*(2*i+al+be+2) / den; c[i] = 2*(i+al)*(i+be)*(2*i+al+be+2) / den; } } }; template inline void JacobiPolynomial (int n, S x, double alpha, double beta, T * values) { S p1 = 1.0, p2 = 0.0, p3; if (n >= 0) p2 = values[0] = 1.0; if (n >= 1) p1 = values[1] = 0.5 * (2*(alpha+1)+(alpha+beta+2)*(x-1)); for (int i = 1; i < n; i++) { p3 = p2; p2=p1; p1 = 1.0 / ( 2 * (i+1) * (i+alpha+beta+1) * (2*i+alpha+beta) ) * ( ( (2*i+alpha+beta+1)*(alpha*alpha-beta*beta) + (2*i+alpha+beta)*(2*i+alpha+beta+1)*(2*i+alpha+beta+2) * x) * p2 - 2*(i+alpha)*(i+beta) * (2*i+alpha+beta+2) * p3 ); values[i+1] = p1; } } template inline void ScaledJacobiPolynomial (int n, S x, St t, double alpha, double beta, T * values) { /* S p1 = 1.0, p2 = 0.0, p3; if (n >= 0) values[0] = 1.0; */ S p1(1.0), p2(0.0), p3; if (n >= 0) p2 = values[0] = 1.0; if (n >= 1) p1 = values[1] = 0.5 * (2*(alpha+1)*t+(alpha+beta+2)*(x-t)); for (int i=1; i < n; i++) { p3 = p2; p2=p1; p1 = 1.0 / ( 2 * (i+1) * (i+alpha+beta+1) * (2*i+alpha+beta) ) * ( ( (2*i+alpha+beta+1)*(alpha*alpha-beta*beta) * t + (2*i+alpha+beta)*(2*i+alpha+beta+1)*(2*i+alpha+beta+2) * x) * p2 - 2*(i+alpha)*(i+beta) * (2*i+alpha+beta+2) * t * t * p3 ); values[i+1] = p1; } } static Array> jacpols2; // compute face bubbles up to order n, 0 < y, y-x < 1, x+y < 1 template static void CalcTrigShape (int n, Tx x, Ty y, Ts * shape) { // cout << "calc trig shape" << endl; if (n < 3) return; Tx hx[50], hy[50*50]; jacpols2[2] -> EvaluateScaled (n-3, x, 1-y, hx); for (int ix = 0; ix <= n-3; ix++) jacpols2[2*ix+5] -> Evaluate (n-3, 2*y-1, hy+50*ix); int ii = 0; Tx bub = (1+x-y)*y*(1-x-y); for (int ix = 0; ix <= n-3; ix++) hx[ix] *= bub; /* for (int iy = 0; iy <= n-3; iy++) for (int ix = 0; ix <= n-3-iy; ix++) shape[ii++] = hx[ix]*hy[iy+50*ix]; */ // change loops: for (int ix = 0; ix <= n-3; ix++) for (int iy = 0; iy <= n-3-ix; iy++) shape[ii++] = hx[ix]*hy[iy+50*ix]; } template static void CalcTrigShapeDxDy (int n, T x, T y, T * dshape) { if (n < 3) return; AutoDiff<2,T> adx(x, 0); AutoDiff<2,T> ady(y, 1); AutoDiff<2,T> res[2000]; CalcTrigShape (n, adx, ady, &res[0]); int ndof = (n-1)*(n-2)/2; for (int i = 0; i < ndof; i++) { dshape[2*i] = res[i].DValue(0); dshape[2*i+1] = res[i].DValue(1); } } // compute face bubbles up to order n, 0 < y, y-x < 1, x+y < 1 template static void CalcScaledTrigShape (int n, Tx x, Ty y, Tt t, Tr * shape) { if (n < 3) return; Tx hx[50], hy[50]; ScaledJacobiPolynomial (n-3, x, t-y, 2, 2, hx); int ii = 0; Tx bub = (t+x-y)*y*(t-x-y); for (int ix = 0; ix <= n-3; ix++) { jacpols2[2*ix+5] -> EvaluateScaled (n-3, 2*y-1, t, hy); for (int iy = 0; iy <= n-3-ix; iy++) shape[ii++] = bub * hx[ix]*hy[iy]; } } template static void CalcScaledTrigShapeLambda (int n, Tx x, Ty y, Tt t, FUNC func) { if (n < 3) return; int ii = 0; Tx bub = (t+x-y)*y*(t-x-y); jacpols2[2]->EvaluateScaledLambda (n-3, x, t-y, [&](int ix, Tx valx) { jacpols2[2*ix+5] -> EvaluateScaledLambda (n-3-ix, 2*y-1, t, [&](int iy, Ty valy) { func(ii++, bub*valx*valy); }); }); } // compute face bubbles up to order n, 0 < y, y-x < 1, x+y < 1 template static void CalcScaledTrigShapeDxDyDt (int n, T x, T y, T t, T * dshape) { /* if (n < 3) return; AutoDiff<3,T> adx(x, 0); AutoDiff<3,T> ady(y, 1); AutoDiff<3,T> adt(t, 2); AutoDiff<3,T> res[2000]; CalcScaledTrigShape (n, adx, ady, adt, &res[0]); int ndof = (n-1)*(n-2)/2; for (int i = 0; i < ndof; i++) { dshape[3*i] = res[i].DValue(0); dshape[3*i+1] = res[i].DValue(1); dshape[3*i+2] = res[i].DValue(2); } */ if (n < 3) return; AutoDiff<3,T> adx(x, 0); AutoDiff<3,T> ady(y, 1); AutoDiff<3,T> adt(t, 2); CalcScaledTrigShapeLambda (n, adx, ady, adt, [&] (int i, AutoDiff<3,T> shape) { dshape[3*i] = shape.DValue(0); dshape[3*i+1] = shape.DValue(1); dshape[3*i+2] = shape.DValue(2); }); } CurvedElements :: CurvedElements (const Mesh & amesh) : mesh (amesh) { order = 1; rational = 0; ishighorder = 0; } CurvedElements :: ~CurvedElements() { jacpols2.SetSize(0); } void CurvedElements :: BuildCurvedElements(const Refinement * ref, int aorder, bool arational) { bool working = (ntasks == 1) || (id > 0); ishighorder = 0; order = 1; #ifdef PARALLEL enum { MPI_TAG_CURVE = MPI_TAG_MESH+20 }; const ParallelMeshTopology & partop = mesh.GetParallelTopology (); MPI_Comm curve_comm; MPI_Comm_dup (MPI_COMM_WORLD, &curve_comm); Array procs; #endif if (working) order = aorder; if (mesh.coarsemesh) { mesh.coarsemesh->GetCurvedElements().BuildCurvedElements (ref, aorder, arational); order = aorder; rational = arational; ishighorder = (order > 1); return; } PrintMessage (1, "Curve elements, order = ", aorder); if (rational) PrintMessage (1, "curved elements with rational splines"); // if (working) const_cast (mesh).UpdateTopology(); const MeshTopology & top = mesh.GetTopology(); rational = arational; Array edgenrs; int nedges = top.GetNEdges(); int nfaces = top.GetNFaces(); edgeorder.SetSize (nedges); faceorder.SetSize (nfaces); edgeorder = 1; faceorder = 1; if (rational) { edgeweight.SetSize (nedges); edgeweight = 1.0; } if (aorder <= 1) { for (ElementIndex ei = 0; ei < mesh.GetNE(); ei++) if (mesh[ei].GetType() == TET10) ishighorder = 1; return; } if (rational) aorder = 2; if (working) { if (mesh.GetDimension() == 3) for (SurfaceElementIndex i = 0; i < mesh.GetNSE(); i++) { top.GetEdges (i, edgenrs); for (int j = 0; j < edgenrs.Size(); j++) edgeorder[edgenrs[j]] = aorder; faceorder[top.GetFace (i)] = aorder; } for (SegmentIndex i = 0; i < mesh.GetNSeg(); i++) edgeorder[top.GetEdge (i)] = aorder; } if (rational) { edgeorder = 2; faceorder = 1; } #ifdef PARALLEL TABLE send_orders(ntasks), recv_orders(ntasks); if (ntasks > 1 && working) { for (int e = 0; e < edgeorder.Size(); e++) { partop.GetDistantEdgeNums (e+1, procs); for (int j = 0; j < procs.Size(); j++) send_orders.Add (procs[j], edgeorder[e]); } for (int f = 0; f < faceorder.Size(); f++) { partop.GetDistantFaceNums (f+1, procs); for (int j = 0; j < procs.Size(); j++) send_orders.Add (procs[j], faceorder[f]); } } MyMPI_ExchangeTable (send_orders, recv_orders, MPI_TAG_CURVE, curve_comm); if (ntasks > 1 && working) { Array cnt(ntasks); cnt = 0; for (int e = 0; e < edgeorder.Size(); e++) { partop.GetDistantEdgeNums (e+1, procs); for (int j = 0; j < procs.Size(); j++) edgeorder[e] = max(edgeorder[e], recv_orders[procs[j]][cnt[procs[j]]++]); } for (int f = 0; f < faceorder.Size(); f++) { partop.GetDistantFaceNums (f+1, procs); for (int j = 0; j < procs.Size(); j++) faceorder[f] = max(faceorder[f], recv_orders[procs[j]][cnt[procs[j]]++]); } } #endif edgecoeffsindex.SetSize (nedges+1); int nd = 0; for (int i = 0; i < nedges; i++) { edgecoeffsindex[i] = nd; nd += max (0, edgeorder[i]-1); } edgecoeffsindex[nedges] = nd; edgecoeffs.SetSize (nd); edgecoeffs = Vec<3> (0,0,0); facecoeffsindex.SetSize (nfaces+1); nd = 0; for (int i = 0; i < nfaces; i++) { facecoeffsindex[i] = nd; if (top.GetFaceType(i+1) == TRIG) nd += max2 (0, (faceorder[i]-1)*(faceorder[i]-2)/2); else nd += max2 (0, sqr(faceorder[i]-1)); } facecoeffsindex[nfaces] = nd; facecoeffs.SetSize (nd); facecoeffs = Vec<3> (0,0,0); if (!ref || aorder <= 1) { order = aorder; return; } Array xi, weight; ComputeGaussRule (aorder+4, xi, weight); // on (0,1) if (!jacpols2.Size()) { jacpols2.SetSize (100); for (int i = 0; i < 100; i++) jacpols2[i] = make_shared (100, i, 2); } PrintMessage (3, "Curving edges"); if (mesh.GetDimension() == 3 || rational) { Array surfnr(nedges); Array gi0(nedges); Array gi1(nedges); surfnr = -1; if (working) for (SurfaceElementIndex i = 0; i < mesh.GetNSE(); i++) { top.GetEdges (i, edgenrs); const Element2d & el = mesh[i]; const ELEMENT_EDGE * edges = MeshTopology::GetEdges0 (el.GetType()); for (int i2 = 0; i2 < edgenrs.Size(); i2++) { // PointIndex pi1 = el[edges[i2][0]]; // PointIndex pi2 = el[edges[i2][1]]; // bool swap = pi1 > pi2; // Point<3> p1 = mesh[pi1]; // Point<3> p2 = mesh[pi2]; // int order1 = edgeorder[edgenrs[i2]]; // int ndof = max (0, order1-1); surfnr[edgenrs[i2]] = mesh.GetFaceDescriptor(el.GetIndex()).SurfNr(); gi0[edgenrs[i2]] = el.GeomInfoPi(edges[i2][0]+1); gi1[edgenrs[i2]] = el.GeomInfoPi(edges[i2][1]+1); } } #ifdef PARALLEL if (ntasks > 1) { // distribute it ... TABLE senddata(ntasks), recvdata(ntasks); if (working) for (int e = 0; e < nedges; e++) { partop.GetDistantEdgeNums (e+1, procs); for (int j = 0; j < procs.Size(); j++) { senddata.Add (procs[j], surfnr[e]); if (surfnr[e] != -1) { senddata.Add (procs[j], gi0[e].trignum); senddata.Add (procs[j], gi0[e].u); senddata.Add (procs[j], gi0[e].v); senddata.Add (procs[j], gi1[e].trignum); senddata.Add (procs[j], gi1[e].u); senddata.Add (procs[j], gi1[e].v); } } } MyMPI_ExchangeTable (senddata, recvdata, MPI_TAG_CURVE, curve_comm); Array cnt(ntasks); cnt = 0; if (working) for (int e = 0; e < nedges; e++) { partop.GetDistantEdgeNums (e+1, procs); for (int j = 0; j < procs.Size(); j++) { int surfnr1 = recvdata[procs[j]][cnt[procs[j]]++]; if (surfnr1 != -1) { surfnr[e] = surfnr1; gi0[e].trignum = int (recvdata[procs[j]][cnt[procs[j]]++]); gi0[e].u = recvdata[procs[j]][cnt[procs[j]]++]; gi0[e].v = recvdata[procs[j]][cnt[procs[j]]++]; gi1[e].trignum = int (recvdata[procs[j]][cnt[procs[j]]++]); gi1[e].u = recvdata[procs[j]][cnt[procs[j]]++]; gi1[e].v = recvdata[procs[j]][cnt[procs[j]]++]; } } } } #endif if (working) for (int e = 0; e < surfnr.Size(); e++) { if (surfnr[e] == -1) continue; SetThreadPercent(double(e)/surfnr.Size()*100.); PointIndex pi1, pi2; top.GetEdgeVertices (e+1, pi1, pi2); bool swap = (pi1 > pi2); Point<3> p1 = mesh[pi1]; Point<3> p2 = mesh[pi2]; int order1 = edgeorder[e]; int ndof = max (0, order1-1); if (rational && order1 >= 2) { Point<3> pm = Center (p1, p2); Vec<3> n1 = ref -> GetNormal (p1, surfnr[e], gi0[e]); Vec<3> n2 = ref -> GetNormal (p2, surfnr[e], gi1[e]); // p3 = pm + alpha1 n1 + alpha2 n2 Mat<2> mat, inv; Vec<2> rhs, sol; mat(0,0) = n1*n1; mat(0,1) = mat(1,0) = n1*n2; mat(1,1) = n2*n2; rhs(0) = n1 * (p1-pm); rhs(1) = n2 * (p2-pm); Point<3> p3; if (fabs (Det (mat)) > 1e-10) { CalcInverse (mat, inv); sol = inv * rhs; p3 = pm + sol(0) * n1 + sol(1) * n2; } else p3 = pm; edgecoeffs[edgecoeffsindex[e]] = Vec<3> (p3); double wold = 1, w = 1, dw = 0.1; double dold = 1e99; while (fabs (dw) > 1e-12) { Vec<3> v05 = 0.25 * Vec<3> (p1) + 0.5*w* Vec<3>(p3) + 0.25 * Vec<3> (p2); v05 /= 1 + (w-1) * 0.5; Point<3> p05 (v05), pp05(v05); ref -> ProjectToSurface (pp05, surfnr[e], gi0[e]); double d = Dist (pp05, p05); if (d < dold) { dold = d; wold = w; w += dw; } else { dw *= -0.7; w = wold + dw; } } edgeweight[e] = w; continue; } Vector shape(ndof); DenseMatrix mat(ndof, ndof), inv(ndof, ndof), rhs(ndof, 3), sol(ndof, 3); rhs = 0.0; mat = 0.0; for (int j = 0; j < xi.Size(); j++) { Point<3> p; Point<3> pp; PointGeomInfo ppgi; if (swap) { p = p1 + xi[j] * (p2-p1); ref -> PointBetween (p1, p2, xi[j], surfnr[e], gi0[e], gi1[e], pp, ppgi); } else { p = p2 + xi[j] * (p1-p2); ref -> PointBetween (p2, p1, xi[j], surfnr[e], gi1[e], gi0[e], pp, ppgi); } Vec<3> dist = pp - p; CalcEdgeShape (order1, 2*xi[j]-1, &shape(0)); for (int k = 0; k < ndof; k++) for (int l = 0; l < ndof; l++) mat(k,l) += weight[j] * shape(k) * shape(l); for (int k = 0; k < ndof; k++) for (int l = 0; l < 3; l++) rhs(k,l) += weight[j] * shape(k) * dist(l); } CalcInverse (mat, inv); Mult (inv, rhs, sol); int first = edgecoeffsindex[e]; for (int j = 0; j < ndof; j++) for (int k = 0; k < 3; k++) edgecoeffs[first+j](k) = sol(j,k); } } Array use_edge(nedges); Array edge_surfnr1(nedges); Array edge_surfnr2(nedges); Array swap_edge(nedges); Array edge_gi0(nedges); Array edge_gi1(nedges); use_edge = 0; if (working) for (SegmentIndex i = 0; i < mesh.GetNSeg(); i++) { const Segment & seg = mesh[i]; int edgenr = top.GetEdge (i); use_edge[edgenr] = 1; edge_surfnr1[edgenr] = seg.surfnr1; edge_surfnr2[edgenr] = seg.surfnr2; edge_gi0[edgenr] = seg.epgeominfo[0]; edge_gi1[edgenr] = seg.epgeominfo[1]; swap_edge[edgenr] = int (seg[0] > seg[1]); } #ifdef PARALLEL if (ntasks > 1) { // distribute it ... TABLE senddata(ntasks), recvdata(ntasks); if (working) for (int e = 0; e < nedges; e++) { partop.GetDistantEdgeNums (e+1, procs); for (int j = 0; j < procs.Size(); j++) { senddata.Add (procs[j], use_edge[e]); if (use_edge[e]) { senddata.Add (procs[j], edge_surfnr1[e]); senddata.Add (procs[j], edge_surfnr2[e]); senddata.Add (procs[j], edge_gi0[e].edgenr); senddata.Add (procs[j], edge_gi0[e].body); senddata.Add (procs[j], edge_gi0[e].dist); senddata.Add (procs[j], edge_gi0[e].u); senddata.Add (procs[j], edge_gi0[e].v); senddata.Add (procs[j], edge_gi1[e].edgenr); senddata.Add (procs[j], edge_gi1[e].body); senddata.Add (procs[j], edge_gi1[e].dist); senddata.Add (procs[j], edge_gi1[e].u); senddata.Add (procs[j], edge_gi1[e].v); senddata.Add (procs[j], swap_edge[e]); } } } MyMPI_ExchangeTable (senddata, recvdata, MPI_TAG_CURVE, curve_comm); Array cnt(ntasks); cnt = 0; if (working) for (int e = 0; e < edge_surfnr1.Size(); e++) { partop.GetDistantEdgeNums (e+1, procs); for (int j = 0; j < procs.Size(); j++) { int get_edge = int(recvdata[procs[j]][cnt[procs[j]]++]); if (get_edge) { use_edge[e] = 1; edge_surfnr1[e] = int (recvdata[procs[j]][cnt[procs[j]]++]); edge_surfnr2[e] = int (recvdata[procs[j]][cnt[procs[j]]++]); edge_gi0[e].edgenr = int (recvdata[procs[j]][cnt[procs[j]]++]); edge_gi0[e].body = int (recvdata[procs[j]][cnt[procs[j]]++]); edge_gi0[e].dist = recvdata[procs[j]][cnt[procs[j]]++]; edge_gi0[e].u = recvdata[procs[j]][cnt[procs[j]]++]; edge_gi0[e].v = recvdata[procs[j]][cnt[procs[j]]++]; edge_gi1[e].edgenr = int (recvdata[procs[j]][cnt[procs[j]]++]); edge_gi1[e].body = int (recvdata[procs[j]][cnt[procs[j]]++]); edge_gi1[e].dist = recvdata[procs[j]][cnt[procs[j]]++]; edge_gi1[e].u = recvdata[procs[j]][cnt[procs[j]]++]; edge_gi1[e].v = recvdata[procs[j]][cnt[procs[j]]++]; swap_edge[e] = recvdata[procs[j]][cnt[procs[j]]++]; } } } } #endif if (working) for (int edgenr = 0; edgenr < use_edge.Size(); edgenr++) { int segnr = edgenr; if (!use_edge[edgenr]) continue; SetThreadPercent(double(edgenr)/edge_surfnr1.Size()*100.); PointIndex pi1, pi2; top.GetEdgeVertices (edgenr+1, pi1, pi2); bool swap = swap_edge[edgenr]; // (pi1 > pi2); if (swap) Swap (pi1, pi2); Point<3> p1 = mesh[pi1]; Point<3> p2 = mesh[pi2]; int order1 = edgeorder[segnr]; int ndof = max (0, order1-1); if (rational) { Vec<3> tau1 = ref -> GetTangent (p1, edge_surfnr2[edgenr], edge_surfnr1[edgenr], edge_gi0[edgenr]); Vec<3> tau2 = ref -> GetTangent (p2, edge_surfnr2[edgenr], edge_surfnr1[edgenr], edge_gi1[edgenr]); // p1 + alpha1 tau1 = p2 + alpha2 tau2; Mat<3,2> mat; Mat<2,3> inv; Vec<3> rhs; Vec<2> sol; for (int j = 0; j < 3; j++) { mat(j,0) = tau1(j); mat(j,1) = -tau2(j); rhs(j) = p2(j)-p1(j); } CalcInverse (mat, inv); sol = inv * rhs; Point<3> p3 = p1+sol(0) * tau1; edgecoeffs[edgecoeffsindex[segnr]] = Vec<3> (p3); double wold = 1, w = 1, dw = 0.1; double dold = 1e99; while (fabs (dw) > 1e-12) { Vec<3> v05 = 0.25 * Vec<3> (p1) + 0.5*w* Vec<3>(p3) + 0.25 * Vec<3> (p2); v05 /= 1 + (w-1) * 0.5; Point<3> p05 (v05), pp05(v05); ref -> ProjectToEdge (pp05, edge_surfnr1[edgenr], edge_surfnr2[edgenr], edge_gi0[edgenr]); double d = Dist (pp05, p05); if (d < dold) { dold = d; wold = w; w += dw; } else { dw *= -0.7; w = wold + dw; } // *testout << "w = " << w << ", dw = " << dw << endl; } // cout << "wopt = " << w << ", dopt = " << dold << endl; edgeweight[segnr] = w; // cout << "p1 = " << p1 << ", tau1 = " << tau1 << ", alpha1 = " << sol(0) << endl; // cout << "p2 = " << p2 << ", tau2 = " << tau2 << ", alpha2 = " << -sol(1) << endl; // cout << "p+alpha tau = " << p1 + sol(0) * tau1 // << " =?= " << p2 +sol(1) * tau2 << endl; } else { Vector shape(ndof); DenseMatrix mat(ndof, ndof), inv(ndof, ndof), rhs(ndof, 3), sol(ndof, 3); rhs = 0.0; mat = 0.0; for (int j = 0; j < xi.Size(); j++) { Point<3> p, pp; EdgePointGeomInfo ppgi; if (swap) { p = p1 + xi[j] * (p2-p1); ref -> PointBetween (p1, p2, xi[j], edge_surfnr2[edgenr], edge_surfnr1[edgenr], edge_gi0[edgenr], edge_gi1[edgenr], pp, ppgi); } else { p = p2 + xi[j] * (p1-p2); ref -> PointBetween (p2, p1, xi[j], edge_surfnr2[edgenr], edge_surfnr1[edgenr], edge_gi1[edgenr], edge_gi0[edgenr], pp, ppgi); } Vec<3> dist = pp - p; CalcEdgeShape (order1, 2*xi[j]-1, &shape(0)); for (int k = 0; k < ndof; k++) for (int l = 0; l < ndof; l++) mat(k,l) += weight[j] * shape(k) * shape(l); for (int k = 0; k < ndof; k++) for (int l = 0; l < 3; l++) rhs(k,l) += weight[j] * shape(k) * dist(l); } CalcInverse (mat, inv); Mult (inv, rhs, sol); int first = edgecoeffsindex[segnr]; for (int j = 0; j < ndof; j++) for (int k = 0; k < 3; k++) edgecoeffs[first+j](k) = sol(j,k); } } PrintMessage (3, "Curving faces"); Array surfnr(nfaces); surfnr = -1; if (working) for (SurfaceElementIndex i = 0; i < mesh.GetNSE(); i++) surfnr[top.GetFace(i)] = mesh.GetFaceDescriptor(mesh[i].GetIndex()).SurfNr(); #ifdef PARALLEL TABLE send_surfnr(ntasks), recv_surfnr(ntasks); if (ntasks > 1 && working) { for (int f = 0; f < nfaces; f++) { partop.GetDistantFaceNums (f+1, procs); for (int j = 0; j < procs.Size(); j++) send_surfnr.Add (procs[j], surfnr[f]); } } MyMPI_ExchangeTable (send_surfnr, recv_surfnr, MPI_TAG_CURVE, curve_comm); if (ntasks > 1 && working) { Array cnt(ntasks); cnt = 0; for (int f = 0; f < nfaces; f++) { partop.GetDistantFaceNums (f+1, procs); for (int j = 0; j < procs.Size(); j++) surfnr[f] = max(surfnr[f], recv_surfnr[procs[j]][cnt[procs[j]]++]); } } #endif if (mesh.GetDimension() == 3 && working) { for (int f = 0; f < nfaces; f++) { int facenr = f; if (surfnr[f] == -1) continue; // if (el.GetType() == TRIG && order >= 3) if (top.GetFaceType(facenr+1) == TRIG && order >= 3) { ArrayMem verts(3); top.GetFaceVertices (facenr+1, verts); int fnums[] = { 0, 1, 2 }; /* if (el[fnums[0]] > el[fnums[1]]) swap (fnums[0], fnums[1]); if (el[fnums[1]] > el[fnums[2]]) swap (fnums[1], fnums[2]); if (el[fnums[0]] > el[fnums[1]]) swap (fnums[0], fnums[1]); */ if (verts[fnums[0]] > verts[fnums[1]]) swap (fnums[0], fnums[1]); if (verts[fnums[1]] > verts[fnums[2]]) swap (fnums[1], fnums[2]); if (verts[fnums[0]] > verts[fnums[1]]) swap (fnums[0], fnums[1]); int order1 = faceorder[facenr]; int ndof = max (0, (order1-1)*(order1-2)/2); Vector shape(ndof), dmat(ndof); MatrixFixWidth<3> rhs(ndof), sol(ndof); rhs = 0.0; dmat = 0.0; int np = sqr(xi.Size()); Array > xia(np); Array > xa(np); for (int jx = 0, jj = 0; jx < xi.Size(); jx++) for (int jy = 0; jy < xi.Size(); jy++, jj++) xia[jj] = Point<2> ((1-xi[jy])*xi[jx], xi[jy]); // CalcMultiPointSurfaceTransformation (&xia, i, &xa, NULL); Array edgenrs; top.GetFaceEdges (facenr+1, edgenrs); for (int k = 0; k < edgenrs.Size(); k++) edgenrs[k]--; for (int jj = 0; jj < np; jj++) { Point<3> pp(0,0,0); double lami[] = { xia[jj](0), xia[jj](1), 1-xia[jj](0)-xia[jj](1)}; for (int k = 0; k < verts.Size(); k++) pp += lami[k] * Vec<3> (mesh.Point(verts[k])); // const ELEMENT_EDGE * edges = MeshTopology::GetEdges0 (TRIG); for (int k = 0; k < edgenrs.Size(); k++) { int eorder = edgeorder[edgenrs[k]]; if (eorder < 2) continue; int first = edgecoeffsindex[edgenrs[k]]; Vector eshape(eorder-1); int vi1, vi2; top.GetEdgeVertices (edgenrs[k]+1, vi1, vi2); if (vi1 > vi2) swap (vi1, vi2); int v1 = -1, v2 = -1; for (int j = 0; j < 3; j++) { if (verts[j] == vi1) v1 = j; if (verts[j] == vi2) v2 = j; } CalcScaledEdgeShape (eorder, lami[v1]-lami[v2], lami[v1]+lami[v2], &eshape(0)); for (int n = 0; n < eshape.Size(); n++) pp += eshape(n) * edgecoeffs[first+n]; } xa[jj] = pp; } for (int jx = 0, jj = 0; jx < xi.Size(); jx++) for (int jy = 0; jy < xi.Size(); jy++, jj++) { double y = xi[jy]; double x = (1-y) * xi[jx]; double lami[] = { x, y, 1-x-y }; double wi = weight[jx]*weight[jy]*(1-y); Point<3> pp = xa[jj]; // ref -> ProjectToSurface (pp, mesh.GetFaceDescriptor(el.GetIndex()).SurfNr()); ref -> ProjectToSurface (pp, surfnr[facenr]); Vec<3> dist = pp-xa[jj]; CalcTrigShape (order1, lami[fnums[1]]-lami[fnums[0]], 1-lami[fnums[1]]-lami[fnums[0]], &shape(0)); for (int k = 0; k < ndof; k++) dmat(k) += wi * shape(k) * shape(k); dist *= wi; for (int k = 0; k < ndof; k++) for (int l = 0; l < 3; l++) rhs(k,l) += shape(k) * dist(l); } for (int i = 0; i < ndof; i++) for (int j = 0; j < 3; j++) sol(i,j) = rhs(i,j) / dmat(i); // Orthogonal basis ! int first = facecoeffsindex[facenr]; for (int j = 0; j < ndof; j++) for (int k = 0; k < 3; k++) facecoeffs[first+j](k) = sol(j,k); } } } // compress edge and face tables int newbase = 0; for (int i = 0; i < edgeorder.Size(); i++) { bool curved = 0; int oldbase = edgecoeffsindex[i]; int nd = edgecoeffsindex[i+1] - edgecoeffsindex[i]; for (int j = 0; j < nd; j++) if (edgecoeffs[oldbase+j].Length() > 1e-12) curved = 1; if (rational) curved = 1; if (curved && newbase != oldbase) for (int j = 0; j < nd; j++) edgecoeffs[newbase+j] = edgecoeffs[oldbase+j]; edgecoeffsindex[i] = newbase; if (!curved) edgeorder[i] = 1; if (curved) newbase += nd; } edgecoeffsindex.Last() = newbase; newbase = 0; for (int i = 0; i < faceorder.Size(); i++) { bool curved = 0; int oldbase = facecoeffsindex[i]; int nd = facecoeffsindex[i+1] - facecoeffsindex[i]; for (int j = 0; j < nd; j++) if (facecoeffs[oldbase+j].Length() > 1e-12) curved = 1; if (curved && newbase != oldbase) for (int j = 0; j < nd; j++) facecoeffs[newbase+j] = facecoeffs[oldbase+j]; facecoeffsindex[i] = newbase; if (!curved) faceorder[i] = 1; if (curved) newbase += nd; } facecoeffsindex.Last() = newbase; if (working) ishighorder = (order > 1); // (*testout) << "edgecoeffs = " << endl << edgecoeffs << endl; // (*testout) << "facecoeffs = " << endl << facecoeffs << endl; #ifdef PARALLEL MPI_Barrier (curve_comm); MPI_Comm_free (&curve_comm); #endif } // *********************** Transform edges ***************************** bool CurvedElements :: IsSegmentCurved (SegmentIndex elnr) const { if (mesh.coarsemesh) { const HPRefElement & hpref_el = (*mesh.hpelements) [mesh[elnr].hp_elnr]; return mesh.coarsemesh->GetCurvedElements().IsSegmentCurved (hpref_el.coarse_elnr); } SegmentInfo info; info.elnr = elnr; info.order = order; info.ndof = info.nv = 2; if (info.order > 1) { const MeshTopology & top = mesh.GetTopology(); info.edgenr = top.GetSegmentEdge (elnr+1)-1; info.ndof += edgeorder[info.edgenr]-1; } return (info.ndof > info.nv); } template void CurvedElements :: CalcSegmentTransformation (T xi, SegmentIndex elnr, Point<3,T> * x, Vec<3,T> * dxdxi, bool * curved) { if (mesh.coarsemesh) { const HPRefElement & hpref_el = (*mesh.hpelements) [mesh[elnr].hp_elnr]; // xi umrechnen T lami[2] = { xi, 1-xi }; T dlami[2] = { 1, -1 }; T coarse_xi = 0; T trans = 0; for (int i = 0; i < 2; i++) { coarse_xi += hpref_el.param[i][0] * lami[i]; trans += hpref_el.param[i][0] * dlami[i]; } mesh.coarsemesh->GetCurvedElements().CalcSegmentTransformation (coarse_xi, hpref_el.coarse_elnr, x, dxdxi, curved); if (dxdxi) *dxdxi *= trans; return; } // TVector shapes, dshapes; // Array > coefs; SegmentInfo info; info.elnr = elnr; info.order = order; info.ndof = info.nv = 2; if (info.order > 1) { const MeshTopology & top = mesh.GetTopology(); info.edgenr = top.GetSegmentEdge (elnr+1)-1; info.ndof += edgeorder[info.edgenr]-1; } ArrayMem,100> coefs(info.ndof); ArrayMem shapes_mem(info.ndof); TFlatVector shapes(info.ndof, &shapes_mem[0]); ArrayMem dshapes_mem(info.ndof); TFlatVector dshapes(info.ndof, &dshapes_mem[0]); CalcElementShapes (info, xi, shapes); GetCoefficients (info, coefs); *x = 0; for (int i = 0; i < shapes.Size(); i++) // *x += shapes(i) * coefs[i]; for (int j = 0; j < 3; j++) (*x)(j) += shapes(i) * coefs[i](j); if (dxdxi) { CalcElementDShapes (info, xi, dshapes); *dxdxi = 0; for (int i = 0; i < shapes.Size(); i++) for (int j = 0; j < 3; j++) (*dxdxi)(j) += dshapes(i) * coefs[i](j); } if (curved) *curved = (info.order > 1); // cout << "Segment, |x| = " << Abs2(Vec<3> (*x) ) << endl; } template void CurvedElements :: CalcElementShapes (SegmentInfo & info, T xi, TFlatVector shapes) const { /* if (rational && info.order == 2) { shapes.SetSize(3); double w = edgeweight[info.edgenr]; shapes(0) = xi*xi; shapes(1) = (1-xi)*(1-xi); shapes(2) = 2*w*xi*(1-xi); shapes *= 1.0 / (1 + (w-1) *2*xi*(1-xi)); return; } */ // shapes.SetSize(info.ndof); shapes(0) = xi; shapes(1) = 1-xi; if (info.order >= 2) { if (mesh[info.elnr][0] > mesh[info.elnr][1]) xi = 1-xi; CalcEdgeShape (edgeorder[info.edgenr], 2*xi-1, &shapes(2)); } } template void CurvedElements :: CalcElementDShapes (SegmentInfo & info, T xi, TFlatVector dshapes) const { /* if (rational && info.order == 2) { dshapes.SetSize(3); double wi = edgeweight[info.edgenr]; double shapes[3]; shapes[0] = xi*xi; shapes[1] = (1-xi)*(1-xi); shapes[2] = 2*wi*xi*(1-xi); double w = 1 + (wi-1) *2*xi*(1-xi); double dw = (wi-1) * (2 - 4*xi); dshapes(0) = 2*xi; dshapes(1) = 2*(xi-1); dshapes(2) = 2*wi*(1-2*xi); for (int j = 0;j < 3; j++) dshapes(j) = dshapes(j) / w - shapes[j] * dw / (w*w); return; } */ // dshapes.SetSize(info.ndof); dshapes = 0; dshapes(0) = 1; dshapes(1) = -1; // int order = edgeorder[info.edgenr]; if (info.order >= 2) { T fac = 2; if (mesh[info.elnr][0] > mesh[info.elnr][1]) { xi = 1-xi; fac *= -1; } CalcEdgeDx (edgeorder[info.edgenr], 2*xi-1, &dshapes(2)); for (int i = 2; i < dshapes.Size(); i++) dshapes(i) *= fac; } // ??? not implemented ???? } void CurvedElements :: GetCoefficients (SegmentInfo & info, Array > & coefs) const { const Segment & el = mesh[info.elnr]; coefs.SetSize(info.ndof); coefs[0] = Vec<3> (mesh[el[0]]); coefs[1] = Vec<3> (mesh[el[1]]); if (info.order >= 2) { int first = edgecoeffsindex[info.edgenr]; int next = edgecoeffsindex[info.edgenr+1]; for (int i = 0; i < next-first; i++) coefs[i+2] = edgecoeffs[first+i]; } } // ********************** Transform surface elements ******************* bool CurvedElements :: IsSurfaceElementCurved (SurfaceElementIndex elnr) const { if (mesh[elnr].GetType() != TRIG) return true; if (!IsHighOrder()) return false; if (mesh.coarsemesh) { const HPRefElement & hpref_el = (*mesh.hpelements) [mesh[elnr].hp_elnr]; return mesh.coarsemesh->GetCurvedElements().IsSurfaceElementCurved (hpref_el.coarse_elnr); } const Element2d & el = mesh[elnr]; ELEMENT_TYPE type = el.GetType(); SurfaceElementInfo info; info.elnr = elnr; info.order = order; switch (type) { case TRIG : info.nv = 3; break; case QUAD : info.nv = 4; break; case TRIG6: return true; default: cerr << "undef element in CalcSurfaceTrafo" << endl; } info.ndof = info.nv; // info.ndof = info.nv = ( (type == TRIG) || (type == TRIG6) ) ? 3 : 4; if (info.order > 1) { const MeshTopology & top = mesh.GetTopology(); top.GetSurfaceElementEdges (elnr+1, info.edgenrs); for (int i = 0; i < info.edgenrs.Size(); i++) info.edgenrs[i]--; info.facenr = top.GetSurfaceElementFace (elnr+1)-1; for (int i = 0; i < info.edgenrs.Size(); i++) info.ndof += edgecoeffsindex[info.edgenrs[i]+1] - edgecoeffsindex[info.edgenrs[i]]; info.ndof += facecoeffsindex[info.facenr+1] - facecoeffsindex[info.facenr]; } return (info.ndof > info.nv); } void CurvedElements :: CalcSurfaceTransformation (Point<2> xi, SurfaceElementIndex elnr, Point<3> * x, Mat<3,2> * dxdxi, bool * curved) { if (mesh.coarsemesh) { const HPRefElement & hpref_el = (*mesh.hpelements) [mesh[elnr].hp_elnr]; // xi umrechnen double lami[4]; FlatVector vlami(4, lami); vlami = 0; mesh[elnr].GetShapeNew (xi, vlami); Mat<2,2> trans; Mat<3,2> dxdxic; if (dxdxi) { MatrixFixWidth<2> dlami(4); dlami = 0; mesh[elnr].GetDShapeNew (xi, dlami); trans = 0; for (int k = 0; k < 2; k++) for (int l = 0; l < 2; l++) for (int i = 0; i < hpref_el.np; i++) trans(l,k) += hpref_el.param[i][l] * dlami(i, k); } Point<2> coarse_xi(0,0); for (int i = 0; i < hpref_el.np; i++) for (int j = 0; j < 2; j++) coarse_xi(j) += hpref_el.param[i][j] * lami[i]; mesh.coarsemesh->GetCurvedElements().CalcSurfaceTransformation (coarse_xi, hpref_el.coarse_elnr, x, &dxdxic, curved); if (dxdxi) *dxdxi = dxdxic * trans; return; } const Element2d & el = mesh[elnr]; ELEMENT_TYPE type = el.GetType(); SurfaceElementInfo info; info.elnr = elnr; info.order = order; switch (type) { case TRIG : info.nv = 3; break; case QUAD : info.nv = 4; break; case TRIG6: info.nv = 6; break; default: cerr << "undef element in CalcSurfaceTrafo" << endl; } info.ndof = info.nv; if (info.order > 1) { const MeshTopology & top = mesh.GetTopology(); top.GetSurfaceElementEdges (elnr+1, info.edgenrs); for (int i = 0; i < info.edgenrs.Size(); i++) info.edgenrs[i]--; info.facenr = top.GetSurfaceElementFace (elnr+1)-1; bool firsttry = true; bool problem = false; while(firsttry || problem) { problem = false; for (int i = 0; !problem && i < info.edgenrs.Size(); i++) { if(info.edgenrs[i]+1 >= edgecoeffsindex.Size()) problem = true; else info.ndof += edgecoeffsindex[info.edgenrs[i]+1] - edgecoeffsindex[info.edgenrs[i]]; } if(info.facenr+1 >= facecoeffsindex.Size()) problem = true; else info.ndof += facecoeffsindex[info.facenr+1] - facecoeffsindex[info.facenr]; if(problem && !firsttry) throw NgException("something wrong with curved elements"); if(problem) BuildCurvedElements(NULL,order,rational); firsttry = false; } } ArrayMem,100> coefs(info.ndof); ArrayMem shapes_mem(info.ndof); TFlatVector shapes(info.ndof, &shapes_mem[0]); ArrayMem dshapes_mem(2*info.ndof); MatrixFixWidth<2> dshapes(info.ndof, &dshapes_mem[0]); CalcElementShapes (info, xi, shapes); GetCoefficients (info, coefs); *x = 0; for (int i = 0; i < coefs.Size(); i++) *x += shapes(i) * coefs[i]; if (dxdxi) { CalcElementDShapes (info, xi, dshapes); *dxdxi = 0; for (int i = 0; i < coefs.Size(); i++) for (int j = 0; j < 3; j++) for (int k = 0; k < 2; k++) (*dxdxi)(j,k) += dshapes(i,k) * coefs[i](j); } if (curved) *curved = (info.ndof > info.nv); } template void CurvedElements :: CalcElementShapes (SurfaceElementInfo & info, const Point<2,T> xi, TFlatVector shapes) const { const Element2d & el = mesh[info.elnr]; // shapes.SetSize(info.ndof); if (rational && info.order >= 2) { // shapes.SetSize(6); T w(1); T lami[3] = { xi(0), xi(1), 1-xi(0)-xi(1) }; for (int j = 0; j < 3; j++) shapes(j) = lami[j] * lami[j]; const ELEMENT_EDGE * edges = MeshTopology::GetEdges1 (TRIG); for (int j = 0; j < 3; j++) { T wi = edgeweight[info.edgenrs[j]]; shapes(j+3) = 2 * wi * lami[edges[j][0]-1] * lami[edges[j][1]-1]; w += (wi-1) * 2 * lami[edges[j][0]-1] * lami[edges[j][1]-1]; } shapes *= 1.0 / w; return; } switch (el.GetType()) { case TRIG: { shapes(0) = xi(0); shapes(1) = xi(1); shapes(2) = 1-xi(0)-xi(1); if (info.order == 1) return; int ii = 3; const ELEMENT_EDGE * edges = MeshTopology::GetEdges0 (TRIG); for (int i = 0; i < 3; i++) { int eorder = edgeorder[info.edgenrs[i]]; if (eorder >= 2) { int vi1 = edges[i][0], vi2 = edges[i][1]; if (el[vi1] > el[vi2]) swap (vi1, vi2); CalcScaledEdgeShape (eorder, shapes(vi1)-shapes(vi2), shapes(vi1)+shapes(vi2), &shapes(ii)); ii += eorder-1; } } int forder = faceorder[info.facenr]; if (forder >= 3) { int fnums[] = { 0, 1, 2 }; if (el[fnums[0]] > el[fnums[1]]) swap (fnums[0], fnums[1]); if (el[fnums[1]] > el[fnums[2]]) swap (fnums[1], fnums[2]); if (el[fnums[0]] > el[fnums[1]]) swap (fnums[0], fnums[1]); CalcTrigShape (forder, shapes(fnums[1])-shapes(fnums[0]), 1-shapes(fnums[1])-shapes(fnums[0]), &shapes(ii)); } break; } case TRIG6: { if (shapes.Size() == 3) { shapes(0) = xi(0); shapes(1) = xi(1); shapes(2) = 1-xi(0)-xi(1); } else { T x = xi(0); T y = xi(1); T lam3 = 1-x-y; shapes(0) = x * (2*x-1); shapes(1) = y * (2*y-1); shapes(2) = lam3 * (2*lam3-1); shapes(3) = 4 * y * lam3; shapes(4) = 4 * x * lam3; shapes(5) = 4 * x * y; } break; } case QUAD: { shapes(0) = (1-xi(0))*(1-xi(1)); shapes(1) = xi(0) *(1-xi(1)); shapes(2) = xi(0) * xi(1) ; shapes(3) = (1-xi(0))* xi(1) ; if (info.order == 1) return; T mu[4] = { 1 - xi(0) + 1 - xi(1), xi(0) + 1 - xi(1), xi(0) + xi(1), 1 - xi(0) + xi(1), }; int ii = 4; const ELEMENT_EDGE * edges = MeshTopology::GetEdges1 (QUAD); for (int i = 0; i < 4; i++) { int eorder = edgeorder[info.edgenrs[i]]; if (eorder >= 2) { int vi1 = edges[i][0]-1, vi2 = edges[i][1]-1; if (el[vi1] > el[vi2]) swap (vi1, vi2); CalcEdgeShape (eorder, mu[vi1]-mu[vi2], &shapes(ii)); T lame = shapes(vi1)+shapes(vi2); for (int j = 0; j < order-1; j++) shapes(ii+j) *= lame; ii += eorder-1; } } for (int i = ii; i < info.ndof; i++) shapes(i) = 0; break; } default: throw NgException("CurvedElements::CalcShape 2d, element type not handled"); }; } template void CurvedElements :: CalcElementDShapes (SurfaceElementInfo & info, const Point<2,T> xi, MatrixFixWidth<2,T> dshapes) const { const Element2d & el = mesh[info.elnr]; ELEMENT_TYPE type = el.GetType(); T lami[4]; dshapes.SetSize(info.ndof); // dshapes = 0; // *testout << "calcelementdshapes, info.ndof = " << info.ndof << endl; if (rational && info.order >= 2) { T w = 1; T dw[2] = { 0, 0 }; lami[0] = xi(0); lami[1] = xi(1); lami[2] = 1-xi(0)-xi(1); T dlami[3][2] = { { 1, 0 }, { 0, 1 }, { -1, -1 }}; T shapes[6]; for (int j = 0; j < 3; j++) { shapes[j] = lami[j] * lami[j]; dshapes(j,0) = 2 * lami[j] * dlami[j][0]; dshapes(j,1) = 2 * lami[j] * dlami[j][1]; } const ELEMENT_EDGE * edges = MeshTopology::GetEdges1 (TRIG); for (int j = 0; j < 3; j++) { T wi = edgeweight[info.edgenrs[j]]; shapes[j+3] = 2 * wi * lami[edges[j][0]-1] * lami[edges[j][1]-1]; for (int k = 0; k < 2; k++) dshapes(j+3,k) = 2*wi* (lami[edges[j][0]-1] * dlami[edges[j][1]-1][k] + lami[edges[j][1]-1] * dlami[edges[j][0]-1][k]); w += (wi-1) * 2 * lami[edges[j][0]-1] * lami[edges[j][1]-1]; for (int k = 0; k < 2; k++) dw[k] += 2*(wi-1) * (lami[edges[j][0]-1] * dlami[edges[j][1]-1][k] + lami[edges[j][1]-1] * dlami[edges[j][0]-1][k]); } // shapes *= 1.0 / w; dshapes *= 1.0 / w; for (int i = 0; i < 6; i++) for (int j = 0; j < 2; j++) dshapes(i,j) -= shapes[i] * dw[j] / (w*w); return; } switch (type) { case TRIG: { dshapes(0,0) = 1; dshapes(0,1) = 0.0; dshapes(1,0) = 0.0; dshapes(1,1) = 1; dshapes(2,0) = -1; dshapes(2,1) = -1; if (info.order == 1) return; // *testout << "info.order = " << info.order << endl; lami[0] = xi(0); lami[1] = xi(1); lami[2] = 1-xi(0)-xi(1); int ii = 3; const ELEMENT_EDGE * edges = MeshTopology::GetEdges1 (TRIG); for (int i = 0; i < 3; i++) { int eorder = edgeorder[info.edgenrs[i]]; if (eorder >= 2) { int vi1 = edges[i][0]-1, vi2 = edges[i][1]-1; if (el[vi1] > el[vi2]) swap (vi1, vi2); CalcScaledEdgeShapeDxDt<2> (eorder, lami[vi1]-lami[vi2], lami[vi1]+lami[vi2], &dshapes(ii,0)); Mat<2,2,T> trans; for (int j = 0; j < 2; j++) { trans(0,j) = dshapes(vi1,j)-dshapes(vi2,j); trans(1,j) = dshapes(vi1,j)+dshapes(vi2,j); } for (int j = 0; j < eorder-1; j++) { T ddx = dshapes(ii+j,0); T ddt = dshapes(ii+j,1); dshapes(ii+j,0) = ddx * trans(0,0) + ddt * trans(1,0); dshapes(ii+j,1) = ddx * trans(0,1) + ddt * trans(1,1); } ii += eorder-1; } } int forder = faceorder[info.facenr]; // *testout << "forder = " << forder << endl; if (forder >= 3) { int fnums[] = { 0, 1, 2 }; if (el[fnums[0]] > el[fnums[1]]) swap (fnums[0], fnums[1]); if (el[fnums[1]] > el[fnums[2]]) swap (fnums[1], fnums[2]); if (el[fnums[0]] > el[fnums[1]]) swap (fnums[0], fnums[1]); CalcTrigShapeDxDy (forder, lami[fnums[1]]-lami[fnums[0]], 1-lami[fnums[1]]-lami[fnums[0]], &dshapes(ii,0)); int nd = (forder-1)*(forder-2)/2; Mat<2,2,T> trans; for (int j = 0; j < 2; j++) { trans(0,j) = dshapes(fnums[1],j)-dshapes(fnums[0],j); trans(1,j) = -dshapes(fnums[1],j)-dshapes(fnums[0],j); } for (int j = 0; j < nd; j++) { T ddx = dshapes(ii+j,0); T ddt = dshapes(ii+j,1); dshapes(ii+j,0) = ddx * trans(0,0) + ddt * trans(1,0); dshapes(ii+j,1) = ddx * trans(0,1) + ddt * trans(1,1); } } break; } case TRIG6: { if (dshapes.Height() == 3) { dshapes = T(0.0); dshapes(0,0) = 1; dshapes(1,1) = 1; dshapes(2,0) = -1; dshapes(2,1) = -1; } else { AutoDiff<2,T> x(xi(0), 0); AutoDiff<2,T> y(xi(1), 1); AutoDiff<2,T> lam3 = 1-x-y; AutoDiff<2,T> shapes[6]; shapes[0] = x * (2*x-1); shapes[1] = y * (2*y-1); shapes[2] = lam3 * (2*lam3-1); shapes[3] = 4 * y * lam3; shapes[4] = 4 * x * lam3; shapes[5] = 4 * x * y; for (int i = 0; i < 6; i++) { dshapes(i,0) = shapes[i].DValue(0); dshapes(i,1) = shapes[i].DValue(1); } } break; } case QUAD: { dshapes(0,0) = -(1-xi(1)); dshapes(0,1) = -(1-xi(0)); dshapes(1,0) = (1-xi(1)); dshapes(1,1) = -xi(0); dshapes(2,0) = xi(1); dshapes(2,1) = xi(0); dshapes(3,0) = -xi(1); dshapes(3,1) = (1-xi(0)); if (info.order == 1) return; T shapes[4] = { (1-xi(0))*(1-xi(1)), xi(0) *(1-xi(1)), xi(0) * xi(1) , (1-xi(0))* xi(1) }; T mu[4] = { 1 - xi(0) + 1 - xi(1), xi(0) + 1 - xi(1), xi(0) + xi(1), 1 - xi(0) + xi(1), }; T dmu[4][2] = { { -1, -1 }, { 1, -1 }, { 1, 1 }, { -1, 1 } }; // double hshapes[20], hdshapes[20]; ArrayMem hshapes(order+1), hdshapes(order+1); int ii = 4; const ELEMENT_EDGE * edges = MeshTopology::GetEdges1 (QUAD); for (int i = 0; i < 4; i++) { int eorder = edgeorder[info.edgenrs[i]]; if (eorder >= 2) { int vi1 = edges[i][0]-1, vi2 = edges[i][1]-1; if (el[vi1] > el[vi2]) swap (vi1, vi2); CalcEdgeShapeDx (eorder, mu[vi1]-mu[vi2], &hshapes[0], &hdshapes[0]); T lame = shapes[vi1]+shapes[vi2]; T dlame[2] = { dshapes(vi1, 0) + dshapes(vi2, 0), dshapes(vi1, 1) + dshapes(vi2, 1) }; for (int j = 0; j < eorder-1; j++) for (int k = 0; k < 2; k++) dshapes(ii+j, k) = lame * hdshapes[j] * (dmu[vi1][k]-dmu[vi2][k]) + dlame[k] * hshapes[j]; ii += eorder-1; } } /* *testout << "quad, dshape = " << endl << dshapes << endl; for (int i = 0; i < 2; i++) { Point<2> xil = xi, xir = xi; Vector shapesl(dshapes.Height()), shapesr(dshapes.Height()); xil(i) -= 1e-6; xir(i) += 1e-6; CalcElementShapes (info, xil, shapesl); CalcElementShapes (info, xir, shapesr); for (int j = 0; j < dshapes.Height(); j++) dshapes(j,i) = 1.0 / 2e-6 * (shapesr(j)-shapesl(j)); } *testout << "quad, num dshape = " << endl << dshapes << endl; */ break; } default: throw NgException("CurvedElements::CalcDShape 2d, element type not handled"); }; } template bool CurvedElements :: EvaluateMapping (SurfaceElementInfo & info, const Point<2,T> xi, Point & mx, Mat & jac) const { const Element2d & el = mesh[info.elnr]; if (rational && info.order >= 2) return false; // not supported AutoDiff<2,T> x(xi(0), 0); AutoDiff<2,T> y(xi(1), 1); AutoDiff<2,T> mapped_x[DIM_SPACE]; for (int i = 0; i < DIM_SPACE; i++) mapped_x[i] = AutoDiff<2,T>(0.0); switch (el.GetType()) { case TRIG: { // if (info.order >= 2) return false; // not yet supported AutoDiff<2,T> lami[4] = { x, y, 1-x-y }; for (int j = 0; j < 3; j++) { Point<3> p = mesh[el[j]]; for (int k = 0; k < DIM_SPACE; k++) mapped_x[k] += p(k) * lami[j]; } if (info.order == 1) break; const ELEMENT_EDGE * edges = MeshTopology::GetEdges1 (TRIG); for (int i = 0; i < 3; i++) { int eorder = edgeorder[info.edgenrs[i]]; if (eorder >= 2) { int first = edgecoeffsindex[info.edgenrs[i]]; int vi1 = edges[i][0]-1, vi2 = edges[i][1]-1; if (el[vi1] > el[vi2]) swap (vi1, vi2); CalcScaledEdgeShapeLambda (eorder, lami[vi1]-lami[vi2], lami[vi1]+lami[vi2], [&](int i, AutoDiff<2,T> shape) { for (int k = 0; k < DIM_SPACE; k++) mapped_x[k] += edgecoeffs[first+i](k) * shape; }); } } int forder = faceorder[info.facenr]; if (forder >= 3) { int first = facecoeffsindex[info.facenr]; int fnums[] = { 0, 1, 2 }; if (el[fnums[0]] > el[fnums[1]]) swap (fnums[0], fnums[1]); if (el[fnums[1]] > el[fnums[2]]) swap (fnums[1], fnums[2]); if (el[fnums[0]] > el[fnums[1]]) swap (fnums[0], fnums[1]); CalcScaledTrigShapeLambda (forder, lami[fnums[1]]-lami[fnums[0]], lami[fnums[2]], AutoDiff<2,T>(1.0), [&](int i, AutoDiff<2,T> shape) { for (int k = 0; k < DIM_SPACE; k++) mapped_x[k] += facecoeffs[first+i](k) * shape; }); } break; } default: return false; } for (int i = 0; i < DIM_SPACE; i++) { mx(i) = mapped_x[i].Value(); for (int j = 0; j < 2; j++) jac(i,j) = mapped_x[i].DValue(j); } return true; } template void CurvedElements :: GetCoefficients (SurfaceElementInfo & info, Array > & coefs) const { const Element2d & el = mesh[info.elnr]; coefs.SetSize (info.ndof); for (int i = 0; i < info.nv; i++) { Point<3> hv = mesh[el[i]]; for (int j = 0; j < DIM_SPACE; j++) coefs[i](j) = hv(j); } if (info.order == 1) return; int ii = info.nv; for (int i = 0; i < info.edgenrs.Size(); i++) { int first = edgecoeffsindex[info.edgenrs[i]]; int next = edgecoeffsindex[info.edgenrs[i]+1]; for (int j = first; j < next; j++, ii++) for (int k = 0; k < DIM_SPACE; k++) coefs[ii](k) = edgecoeffs[j](k); } int first = facecoeffsindex[info.facenr]; int next = facecoeffsindex[info.facenr+1]; for (int j = first; j < next; j++, ii++) for (int k = 0; k < DIM_SPACE; k++) coefs[ii](k) = facecoeffs[j](k); } template void CurvedElements :: GetCoefficients<2> (SurfaceElementInfo & info, Array > & coefs) const; template void CurvedElements :: GetCoefficients<3> (SurfaceElementInfo & info, Array > & coefs) const; // ********************** Transform volume elements ******************* bool CurvedElements :: IsElementCurved (ElementIndex elnr) const { if (mesh[elnr].GetType() != TET) return true; if (mesh.coarsemesh) { const HPRefElement & hpref_el = (*mesh.hpelements) [mesh[elnr].hp_elnr]; return mesh.coarsemesh->GetCurvedElements().IsElementCurved (hpref_el.coarse_elnr); } const Element & el = mesh[elnr]; ELEMENT_TYPE type = el.GetType(); int nfaces = MeshTopology::GetNFaces (type); if (nfaces > 4) { // not a tet const ELEMENT_FACE * faces = MeshTopology::GetFaces0 (type); for (int j = 0; j < nfaces; j++) { if (faces[j][3] != -1) { // a quad face Point<3> pts[4]; for (int k = 0; k < 4; k++) pts[k] = mesh.Point(el[faces[j][k]]); Vec<3> twist = (pts[1] - pts[0]) - (pts[2]-pts[3]); if (twist.Length() > 1e-8 * (pts[1]-pts[0]).Length()) return true; } } } ElementInfo info; info.elnr = elnr; info.order = order; info.ndof = info.nv = MeshTopology::GetNPoints (type); if (info.order > 1) { const MeshTopology & top = mesh.GetTopology(); info.nedges = top.GetElementEdges (elnr+1, info.edgenrs, 0); for (int i = 0; i < info.nedges; i++) info.edgenrs[i]--; info.nfaces = top.GetElementFaces (elnr+1, info.facenrs, 0); for (int i = 0; i < info.nfaces; i++) info.facenrs[i]--; for (int i = 0; i < info.nedges; i++) info.ndof += edgecoeffsindex[info.edgenrs[i]+1] - edgecoeffsindex[info.edgenrs[i]]; for (int i = 0; i < info.nfaces; i++) info.ndof += facecoeffsindex[info.facenrs[i]+1] - facecoeffsindex[info.facenrs[i]]; } return (info.ndof > info.nv); } bool CurvedElements :: IsElementHighOrder (ElementIndex elnr) const { if (mesh.coarsemesh) { const HPRefElement & hpref_el = (*mesh.hpelements) [mesh[elnr].hp_elnr]; return mesh.coarsemesh->GetCurvedElements().IsElementHighOrder (hpref_el.coarse_elnr); } const Element & el = mesh[elnr]; ELEMENT_TYPE type = el.GetType(); ElementInfo info; info.elnr = elnr; info.order = order; info.ndof = info.nv = MeshTopology::GetNPoints (type); if (info.order > 1) { const MeshTopology & top = mesh.GetTopology(); info.nedges = top.GetElementEdges (elnr+1, info.edgenrs, 0); for (int i = 0; i < info.nedges; i++) info.edgenrs[i]--; info.nfaces = top.GetElementFaces (elnr+1, info.facenrs, 0); for (int i = 0; i < info.nfaces; i++) info.facenrs[i]--; for (int i = 0; i < info.nedges; i++) if (edgecoeffsindex[info.edgenrs[i]+1] > edgecoeffsindex[info.edgenrs[i]]) return true; for (int i = 0; i < info.nfaces; i++) if (facecoeffsindex[info.facenrs[i]+1] > facecoeffsindex[info.facenrs[i]]) return true; } return false; } void CurvedElements :: CalcElementTransformation (Point<3> xi, ElementIndex elnr, Point<3> * x, Mat<3,3> * dxdxi, // bool * curved, void * buffer, bool valid) { if (mesh.coarsemesh) { const HPRefElement & hpref_el = (*mesh.hpelements) [mesh[elnr].hp_elnr]; // xi umrechnen double lami[8]; FlatVector vlami(8, lami); vlami = 0; mesh[elnr].GetShapeNew (xi, vlami); Mat<3,3> trans, dxdxic; if (dxdxi) { MatrixFixWidth<3> dlami(8); dlami = 0; mesh[elnr].GetDShapeNew (xi, dlami); trans = 0; for (int k = 0; k < 3; k++) for (int l = 0; l < 3; l++) for (int i = 0; i < hpref_el.np; i++) trans(l,k) += hpref_el.param[i][l] * dlami(i, k); } Point<3> coarse_xi(0,0,0); for (int i = 0; i < hpref_el.np; i++) for (int j = 0; j < 3; j++) coarse_xi(j) += hpref_el.param[i][j] * lami[i]; mesh.coarsemesh->GetCurvedElements().CalcElementTransformation (coarse_xi, hpref_el.coarse_elnr, x, &dxdxic /* , curved */); if (dxdxi) *dxdxi = dxdxic * trans; return; } const Element & el = mesh[elnr]; ELEMENT_TYPE type = el.GetType(); ElementInfo hinfo; ElementInfo & info = (buffer) ? *static_cast (buffer) : hinfo; if (!valid) { info.elnr = elnr; info.order = order; info.ndof = info.nv = MeshTopology::GetNPoints (type); if (info.order > 1) { const MeshTopology & top = mesh.GetTopology(); info.nedges = top.GetElementEdges (elnr+1, info.edgenrs, 0); for (int i = 0; i < info.nedges; i++) info.edgenrs[i]--; info.nfaces = top.GetElementFaces (elnr+1, info.facenrs, 0); for (int i = 0; i < info.nfaces; i++) info.facenrs[i]--; for (int i = 0; i < info.nedges; i++) info.ndof += edgecoeffsindex[info.edgenrs[i]+1] - edgecoeffsindex[info.edgenrs[i]]; for (int i = 0; i < info.nfaces; i++) info.ndof += facecoeffsindex[info.facenrs[i]+1] - facecoeffsindex[info.facenrs[i]]; } } ArrayMem mem(info.ndof); TFlatVector shapes(info.ndof, &mem[0]); ArrayMem dshapes_mem(info.ndof*3); MatrixFixWidth<3> dshapes(info.ndof, &dshapes_mem[0]); CalcElementShapes (info, xi, shapes); Vec<3> * coefs = (info.ndof <= 10) ? &info.hcoefs[0] : new Vec<3> [info.ndof]; if (info.ndof > 10 || !valid) GetCoefficients (info, coefs); if (x) { *x = 0; for (int i = 0; i < shapes.Size(); i++) *x += shapes(i) * coefs[i]; } if (dxdxi) { if (valid && info.order == 1 && info.nv == 4) // a linear tet { *dxdxi = info.hdxdxi; } else { CalcElementDShapes (info, xi, dshapes); *dxdxi = 0; for (int i = 0; i < shapes.Size(); i++) for (int j = 0; j < 3; j++) for (int k = 0; k < 3; k++) (*dxdxi)(j,k) += dshapes(i,k) * coefs[i](j); info.hdxdxi = *dxdxi; } } // *testout << "curved_elements, dshapes = " << endl << dshapes << endl; // if (curved) *curved = (info.ndof > info.nv); if (info.ndof > 10) delete [] coefs; } template void CurvedElements :: CalcElementShapes (ElementInfo & info, Point<3,T> xi, TFlatVector shapes) const { const Element & el = mesh[info.elnr]; if (rational && info.order >= 2) { // shapes.SetSize(10); T w = 1; T lami[4] = { xi(0), xi(1), xi(2), 1-xi(0)-xi(1)-xi(2) }; for (int j = 0; j < 4; j++) shapes(j) = lami[j] * lami[j]; const ELEMENT_EDGE * edges = MeshTopology::GetEdges1 (TET); for (int j = 0; j < 6; j++) { double wi = edgeweight[info.edgenrs[j]]; shapes(j+4) = 2 * wi * lami[edges[j][0]-1] * lami[edges[j][1]-1]; w += (wi-1) * 2 * lami[edges[j][0]-1] * lami[edges[j][1]-1]; } shapes *= 1.0 / w; return; } // shapes.SetSize(info.ndof); switch (el.GetType()) { case TET: { shapes(0) = xi(0); shapes(1) = xi(1); shapes(2) = xi(2); shapes(3) = 1-xi(0)-xi(1)-xi(2); if (info.order == 1) return; int ii = 4; const ELEMENT_EDGE * edges = MeshTopology::GetEdges1 (TET); for (int i = 0; i < 6; i++) { int eorder = edgeorder[info.edgenrs[i]]; if (eorder >= 2) { int vi1 = edges[i][0]-1, vi2 = edges[i][1]-1; if (el[vi1] > el[vi2]) swap (vi1, vi2); CalcScaledEdgeShape (eorder, shapes(vi1)-shapes(vi2), shapes(vi1)+shapes(vi2), &shapes(ii)); ii += eorder-1; } } const ELEMENT_FACE * faces = MeshTopology::GetFaces1 (TET); for (int i = 0; i < 4; i++) { int forder = faceorder[info.facenrs[i]]; if (forder >= 3) { int fnums[] = { faces[i][0]-1, faces[i][1]-1, faces[i][2]-1 }; if (el[fnums[0]] > el[fnums[1]]) swap (fnums[0], fnums[1]); if (el[fnums[1]] > el[fnums[2]]) swap (fnums[1], fnums[2]); if (el[fnums[0]] > el[fnums[1]]) swap (fnums[0], fnums[1]); CalcScaledTrigShape (forder, shapes(fnums[1])-shapes(fnums[0]), shapes(fnums[2]), shapes(fnums[0])+shapes(fnums[1])+shapes(fnums[2]), &shapes(ii)); ii += (forder-1)*(forder-2)/2; } } break; } case TET10: { T x = xi(0); T y = xi(1); T z = xi(2); T lam4 = 1 - x - y - z; /* shapes(0) = xi(0); shapes(1) = xi(1); shapes(2) = xi(2); shapes(3) = 1-xi(0)-xi(1)-xi(2); */ shapes(0) = 2 * x * x - x; shapes(1) = 2 * y * y - y; shapes(2) = 2 * z * z - z; shapes(3) = 2 * lam4 * lam4 - lam4; shapes(4) = 4 * x * y; shapes(5) = 4 * x * z; shapes(6) = 4 * x * lam4; shapes(7) = 4 * y * z; shapes(8) = 4 * y * lam4; shapes(9) = 4 * z * lam4; break; } case PRISM: { T lami[6] = { xi(0), xi(1), 1-xi(0)-xi(1), xi(0), xi(1), 1-xi(0)-xi(1) }; T lamiz[6] = { 1-xi(2), 1-xi(2), 1-xi(2), xi(2), xi(2), xi(2) }; for (int i = 0; i < 6; i++) shapes(i) = lami[i] * lamiz[i]; for (int i = 6; i < info.ndof; i++) shapes(i) = 0; if (info.order == 1) return; int ii = 6; const ELEMENT_EDGE * edges = MeshTopology::GetEdges1 (PRISM); for (int i = 0; i < 6; i++) // horizontal edges { int eorder = edgeorder[info.edgenrs[i]]; if (eorder >= 2) { int vi1 = edges[i][0]-1, vi2 = edges[i][1]-1; if (el[vi1] > el[vi2]) swap (vi1, vi2); CalcScaledEdgeShape (eorder, lami[vi1]-lami[vi2], lami[vi1]+lami[vi2], &shapes(ii)); T facz = (i < 3) ? (1-xi(2)) : xi(2); for (int j = 0; j < eorder-1; j++) shapes(ii+j) *= facz; ii += eorder-1; } } for (int i = 6; i < 9; i++) // vertical edges { int eorder = edgeorder[info.edgenrs[i]]; if (eorder >= 2) { int vi1 = edges[i][0]-1, vi2 = edges[i][1]-1; if (el[vi1] > el[vi2]) swap (vi1, vi2); T bubz = lamiz[vi1]*lamiz[vi2]; T polyz = lamiz[vi1] - lamiz[vi2]; T bubxy = lami[vi1]; for (int j = 0; j < eorder-1; j++) { shapes(ii+j) = bubxy * bubz; bubz *= polyz; } ii += eorder-1; } } // FACE SHAPES const ELEMENT_FACE * faces = MeshTopology::GetFaces1 (PRISM); for (int i = 0; i < 2; i++) { int forder = faceorder[info.facenrs[i]]; if ( forder < 3 ) continue; int fav[3] = { faces[i][0]-1, faces[i][1]-1, faces[i][2]-1 }; if(el[fav[0]] > el[fav[1]]) swap(fav[0],fav[1]); if(el[fav[1]] > el[fav[2]]) swap(fav[1],fav[2]); if(el[fav[0]] > el[fav[1]]) swap(fav[0],fav[1]); CalcTrigShape (forder, lami[fav[2]]-lami[fav[1]], lami[fav[0]], &shapes(ii)); int ndf = (forder+1)*(forder+2)/2 - 3 - 3*(forder-1); for ( int j = 0; j < ndf; j++ ) shapes(ii+j) *= lamiz[fav[1]]; ii += ndf; } break; } case PYRAMID: { shapes = 0.0; T x = xi(0); T y = xi(1); T z = xi(2); // if (z == 1.) z = 1-1e-10; z *= (1-1e-12); shapes[0] = (1-z-x)*(1-z-y) / (1-z); shapes[1] = x*(1-z-y) / (1-z); shapes[2] = x*y / (1-z); shapes[3] = (1-z-x)*y / (1-z); shapes[4] = z; if (info.order == 1) return; T sigma[4] = { sigma[0] = ( (1-z-x) + (1-z-y) ), sigma[1] = ( x + (1-z-y) ), sigma[2] = ( x + y ), sigma[3] = ( (1-z-x) + y ), }; int ii = 5; const ELEMENT_EDGE * edges = MeshTopology::GetEdges1 (PYRAMID); for (int i = 0; i < 4; i++) // horizontal edges { int eorder = edgeorder[info.edgenrs[i]]; if (eorder >= 2) { int vi1 = (edges[i][0]-1), vi2 = (edges[i][1]-1); if (el[vi1] > el[vi2]) swap (vi1, vi2); CalcScaledEdgeShape (eorder, sigma[vi1]-sigma[vi2], 1-z, &shapes(ii)); T fac = (shapes[vi1]+shapes[vi2]) / (1-z); for (int j = 0; j < eorder-1; j++) shapes(ii+j) *= fac; ii += eorder-1; } } break; } case HEX: { shapes = 0.0; T x = xi(0); T y = xi(1); T z = xi(2); shapes[0] = (1-x)*(1-y)*(1-z); shapes[1] = x *(1-y)*(1-z); shapes[2] = x * y *(1-z); shapes[3] = (1-x)* y *(1-z); shapes[4] = (1-x)*(1-y)*(z); shapes[5] = x *(1-y)*(z); shapes[6] = x * y *(z); shapes[7] = (1-x)* y *(z); if (info.order == 1) return; T mu[8] = { (1-x)+(1-y)+(1-z), x +(1-y)+(1-z), x + y +(1-z), (1-x)+ y +(1-z), (1-x)+(1-y)+(z), x +(1-y)+(z), x + y +(z), (1-x)+ y +(z), }; int ii = 8; const ELEMENT_EDGE * edges = MeshTopology::GetEdges1 (HEX); for (int i = 0; i < 8; i++) { int eorder = edgeorder[info.edgenrs[i]]; if (eorder >= 2) { int vi1 = edges[i][0]-1, vi2 = edges[i][1]-1; if (el[vi1] > el[vi2]) swap (vi1, vi2); CalcEdgeShape (eorder, mu[vi1]-mu[vi2], &shapes(ii)); T lame = shapes(vi1)+shapes(vi2); for (int j = 0; j < order-1; j++) shapes(ii+j) *= lame; ii += eorder-1; } } break; } default: throw NgException("CurvedElements::CalcShape 3d, element type not handled"); }; } template void CurvedElements :: CalcElementDShapes (ElementInfo & info, const Point<3,T> xi, MatrixFixWidth<3,T> dshapes) const { // static int timer = NgProfiler::CreateTimer ("calcelementdshapes"); const Element & el = mesh[info.elnr]; // dshapes.SetSize(info.ndof); if ( (long int)(&dshapes(0,0)) % alignof(T) != 0) throw NgException ("alignment problem"); if (dshapes.Height() != info.ndof) throw NgException ("wrong height"); if (rational && info.order >= 2) { T w = 1; T dw[3] = { 0, 0, 0 }; T lami[4] = { xi(0), xi(1), xi(2), 1-xi(0)-xi(1)-xi(2) }; T dlami[4][3] = { { 1, 0, 0 }, { 0, 1, 0 }, { 0, 0, 1 }, { -1, -1, -1 }}; T shapes[10]; for (int j = 0; j < 4; j++) { shapes[j] = lami[j] * lami[j]; dshapes(j,0) = 2 * lami[j] * dlami[j][0]; dshapes(j,1) = 2 * lami[j] * dlami[j][1]; dshapes(j,2) = 2 * lami[j] * dlami[j][2]; } const ELEMENT_EDGE * edges = MeshTopology::GetEdges1 (TET); for (int j = 0; j < 6; j++) { T wi = edgeweight[info.edgenrs[j]]; shapes[j+4] = 2 * wi * lami[edges[j][0]-1] * lami[edges[j][1]-1]; for (int k = 0; k < 3; k++) dshapes(j+4,k) = 2*wi* (lami[edges[j][0]-1] * dlami[edges[j][1]-1][k] + lami[edges[j][1]-1] * dlami[edges[j][0]-1][k]); w += (wi-1) * 2 * lami[edges[j][0]-1] * lami[edges[j][1]-1]; for (int k = 0; k < 3; k++) dw[k] += 2*(wi-1) * (lami[edges[j][0]-1] * dlami[edges[j][1]-1][k] + lami[edges[j][1]-1] * dlami[edges[j][0]-1][k]); } // shapes *= 1.0 / w; dshapes *= 1.0 / w; for (int i = 0; i < 10; i++) for (int j = 0; j < 3; j++) dshapes(i,j) -= shapes[i] * dw[j] / (w*w); return; } /* if (typeid(T) == typeid(SIMD)) { if (el.GetType() == HEX) dshapes = T(0.0); return; } */ switch (el.GetType()) { case TET: { // if (typeid(T) == typeid(SIMD)) return; dshapes = T(0.0); dshapes(0,0) = 1; dshapes(1,1) = 1; dshapes(2,2) = 1; dshapes(3,0) = -1; dshapes(3,1) = -1; dshapes(3,2) = -1; if (info.order == 1) return; T lami[] = { xi(0), xi(1), xi(2), 1-xi(0)-xi(1)-xi(2) }; int ii = 4; const ELEMENT_EDGE * edges = MeshTopology::GetEdges1 (TET); for (int i = 0; i < 6; i++) { int eorder = edgeorder[info.edgenrs[i]]; if (eorder >= 2) { int vi1 = edges[i][0]-1, vi2 = edges[i][1]-1; if (el[vi1] > el[vi2]) swap (vi1, vi2); CalcScaledEdgeShapeDxDt<3> (eorder, lami[vi1]-lami[vi2], lami[vi1]+lami[vi2], &dshapes(ii,0)); Mat<2,3,T> trans; for (int j = 0; j < 3; j++) { trans(0,j) = dshapes(vi1,j)-dshapes(vi2,j); trans(1,j) = dshapes(vi1,j)+dshapes(vi2,j); } for (int j = 0; j < order-1; j++) { T ddx = dshapes(ii+j,0); T ddt = dshapes(ii+j,1); dshapes(ii+j,0) = ddx * trans(0,0) + ddt * trans(1,0); dshapes(ii+j,1) = ddx * trans(0,1) + ddt * trans(1,1); dshapes(ii+j,2) = ddx * trans(0,2) + ddt * trans(1,2); } ii += eorder-1; } } const ELEMENT_FACE * faces = MeshTopology::GetFaces1 (TET); for (int i = 0; i < 4; i++) { int forder = faceorder[info.facenrs[i]]; if (forder >= 3) { int fnums[] = { faces[i][0]-1, faces[i][1]-1, faces[i][2]-1 }; if (el[fnums[0]] > el[fnums[1]]) swap (fnums[0], fnums[1]); if (el[fnums[1]] > el[fnums[2]]) swap (fnums[1], fnums[2]); if (el[fnums[0]] > el[fnums[1]]) swap (fnums[0], fnums[1]); CalcScaledTrigShapeDxDyDt (forder, lami[fnums[1]]-lami[fnums[0]], lami[fnums[2]], lami[fnums[0]]+lami[fnums[1]]+lami[fnums[2]], &dshapes(ii,0)); Mat<3,3,T> trans; for (int j = 0; j < 3; j++) { trans(0,j) = dshapes(fnums[1],j)-dshapes(fnums[0],j); trans(1,j) = dshapes(fnums[2],j); trans(2,j) = dshapes(fnums[0],j)+dshapes(fnums[1],j)+dshapes(fnums[2],j); } int nfd = (forder-1)*(forder-2)/2; for (int j = 0; j < nfd; j++) { T ddx = dshapes(ii+j,0); T ddy = dshapes(ii+j,1); T ddt = dshapes(ii+j,2); dshapes(ii+j,0) = ddx * trans(0,0) + ddy * trans(1,0) + ddt * trans(2,0); dshapes(ii+j,1) = ddx * trans(0,1) + ddy * trans(1,1) + ddt * trans(2,1); dshapes(ii+j,2) = ddx * trans(0,2) + ddy * trans(1,2) + ddt * trans(2,2); } ii += nfd; } } break; } case TET10: { // if (typeid(T) == typeid(SIMD)) return; if (dshapes.Height() == 4) { dshapes = T(0.0); dshapes(0,0) = 1; dshapes(1,1) = 1; dshapes(2,2) = 1; dshapes(3,0) = -1; dshapes(3,1) = -1; dshapes(3,2) = -1; } else { AutoDiff<3,T> x(xi(0), 0); AutoDiff<3,T> y(xi(1), 1); AutoDiff<3,T> z(xi(2), 2); AutoDiff<3,T> lam4 = 1-x-y-z; AutoDiff<3,T> shapes[10]; shapes[0] = 2 * x * x - x; shapes[1] = 2 * y * y - y; shapes[2] = 2 * z * z - z; shapes[3] = 2 * lam4 * lam4 - lam4; shapes[4] = 4 * x * y; shapes[5] = 4 * x * z; shapes[6] = 4 * x * lam4; shapes[7] = 4 * y * z; shapes[8] = 4 * y * lam4; shapes[9] = 4 * z * lam4; for (int i = 0; i < 10; i++) { dshapes(i,0) = shapes[i].DValue(0); dshapes(i,1) = shapes[i].DValue(1); dshapes(i,2) = shapes[i].DValue(2); } } break; break; } case PRISM: { T lami[6] = { xi(0), xi(1), 1-xi(0)-xi(1), xi(0), xi(1), 1-xi(0)-xi(1) }; T lamiz[6] = { 1-xi(2), 1-xi(2), 1-xi(2), xi(2), xi(2), xi(2) }; T dlamiz[6] = { -1, -1, -1, 1, 1, 1 }; T dlami[6][2] = { { 1, 0, }, { 0, 1, }, { -1, -1 }, { 1, 0, }, { 0, 1, }, { -1, -1 } }; for (int i = 0; i < 6; i++) { // shapes(i) = lami[i%3] * ( (i < 3) ? (1-xi(2)) : xi(2) ); dshapes(i,0) = dlami[i%3][0] * ( (i < 3) ? (1-xi(2)) : xi(2) ); dshapes(i,1) = dlami[i%3][1] * ( (i < 3) ? (1-xi(2)) : xi(2) ); dshapes(i,2) = lami[i%3] * ( (i < 3) ? -1 : 1 ); } int ii = 6; if (info.order == 1) return; const ELEMENT_EDGE * edges = MeshTopology::GetEdges1 (PRISM); for (int i = 0; i < 6; i++) // horizontal edges { int order = edgeorder[info.edgenrs[i]]; if (order >= 2) { int vi1 = (edges[i][0]-1), vi2 = (edges[i][1]-1); if (el[vi1] > el[vi2]) swap (vi1, vi2); vi1 = vi1 % 3; vi2 = vi2 % 3; ArrayMem shapei_mem(order+1); TFlatVector shapei(order+1, &shapei_mem[0]); CalcScaledEdgeShapeDxDt<3> (order, lami[vi1]-lami[vi2], lami[vi1]+lami[vi2], &dshapes(ii,0) ); CalcScaledEdgeShape(order, lami[vi1]-lami[vi2], lami[vi1]+lami[vi2], &shapei(0) ); Mat<2,2,T> trans; for (int j = 0; j < 2; j++) { trans(0,j) = dlami[vi1][j]-dlami[vi2][j]; trans(1,j) = dlami[vi1][j]+dlami[vi2][j]; } for (int j = 0; j < order-1; j++) { T ddx = dshapes(ii+j,0); T ddt = dshapes(ii+j,1); dshapes(ii+j,0) = ddx * trans(0,0) + ddt * trans(1,0); dshapes(ii+j,1) = ddx * trans(0,1) + ddt * trans(1,1); } T facz = (i < 3) ? (1-xi(2)) : xi(2); T dfacz = (i < 3) ? (-1) : 1; for (int j = 0; j < order-1; j++) { dshapes(ii+j,0) *= facz; dshapes(ii+j,1) *= facz; dshapes(ii+j,2) = shapei(j) * dfacz; } ii += order-1; } } // if (typeid(T) == typeid(SIMD)) return; for (int i = 6; i < 9; i++) // vertical edges { int eorder = edgeorder[info.edgenrs[i]]; if (eorder >= 2) { int vi1 = (edges[i][0]-1), vi2 = (edges[i][1]-1); if (el[vi1] > el[vi2]) swap (vi1, vi2); T bubz = lamiz[vi1] * lamiz[vi2]; T dbubz = dlamiz[vi1]*lamiz[vi2] + lamiz[vi1]*dlamiz[vi2]; T polyz = lamiz[vi1] - lamiz[vi2]; T dpolyz = dlamiz[vi1] - dlamiz[vi2]; T bubxy = lami[(vi1)%3]; T dbubxydx = dlami[(vi1)%3][0]; T dbubxydy = dlami[(vi1)%3][1]; for (int j = 0; j < eorder-1; j++) { dshapes(ii+j,0) = dbubxydx * bubz; dshapes(ii+j,1) = dbubxydy * bubz; dshapes(ii+j,2) = bubxy * dbubz; dbubz = bubz * dpolyz + dbubz * polyz; bubz *= polyz; } ii += eorder-1; } } if (info.order == 2) return; // FACE SHAPES const ELEMENT_FACE * faces = MeshTopology::GetFaces1 (PRISM); for (int i = 0; i < 2; i++) { int forder = faceorder[info.facenrs[i]]; if ( forder < 3 ) continue; int ndf = (forder+1)*(forder+2)/2 - 3 - 3*(forder-1); int fav[3] = { faces[i][0]-1, faces[i][1]-1, faces[i][2]-1 }; if(el[fav[0]] > el[fav[1]]) swap(fav[0],fav[1]); if(el[fav[1]] > el[fav[2]]) swap(fav[1],fav[2]); if(el[fav[0]] > el[fav[1]]) swap(fav[0],fav[1]); ArrayMem dshapei_mem(ndf); ArrayMem shapei_mem(ndf); MatrixFixWidth<2,T> dshapei(ndf, &dshapei_mem[0]); TFlatVector shapei(ndf, &shapei_mem[0]); CalcTrigShapeDxDy (forder, lami[fav[2]]-lami[fav[1]], lami[fav[0]], &dshapei(0,0)); CalcTrigShape (forder, lami[fav[2]]-lami[fav[1]], lami[fav[0]], &shapei(0)); Mat<2,2,T> trans; for (int j = 0; j < 2; j++) { trans(0,j) = dlami[fav[2]][j]-dlami[fav[1]][j]; trans(1,j) = dlami[fav[0]][j]; } for (int j = 0; j < ndf; j++) { // double ddx = dshapes(ii+j,0); // double ddt = dshapes(ii+j,1); T ddx = dshapei(j,0); T ddt = dshapei(j,1); dshapes(ii+j,0) = ddx * trans(0,0) + ddt * trans(1,0); dshapes(ii+j,1) = ddx * trans(0,1) + ddt * trans(1,1); } for ( int j = 0; j < ndf; j++ ) { dshapes(ii+j,0) *= lamiz[fav[1]]; dshapes(ii+j,1) *= lamiz[fav[1]]; dshapes(ii+j,2) = shapei(j) * dlamiz[fav[1]]; } ii += ndf; } break; } case PYRAMID: { // if (typeid(T) == typeid(SIMD)) return; dshapes = T(0.0); T x = xi(0); T y = xi(1); T z = xi(2); // if (z == 1.) z = 1-1e-10; z *= 1-1e-12; T z1 = 1-z; T z2 = z1*z1; dshapes(0,0) = -(z1-y)/z1; dshapes(0,1) = -(z1-x)/z1; dshapes(0,2) = ((x+y+2*z-2)*z1+(z1-y)*(z1-x))/z2; dshapes(1,0) = (z1-y)/z1; dshapes(1,1) = -x/z1; dshapes(1,2) = (-x*z1+x*(z1-y))/z2; dshapes(2,0) = y/z1; dshapes(2,1) = x/z1; dshapes(2,2) = x*y/z2; dshapes(3,0) = -y/z1; dshapes(3,1) = (z1-x)/z1; dshapes(3,2) = (-y*z1+y*(z1-x))/z2; dshapes(4,0) = 0; dshapes(4,1) = 0; dshapes(4,2) = 1; if (info.order == 1) return; int ii = 5; const ELEMENT_EDGE * edges = MeshTopology::GetEdges1 (PYRAMID); // if (z == 1.) z = 1-1e-10; z *= 1-1e-12; T shapes[5]; shapes[0] = (1-z-x)*(1-z-y) / (1-z); shapes[1] = x*(1-z-y) / (1-z); shapes[2] = x*y / (1-z); shapes[3] = (1-z-x)*y / (1-z); shapes[4] = z; T sigma[4] = { ( (1-z-x) + (1-z-y) ), ( x + (1-z-y) ), ( x + y ), ( (1-z-x) + y ), }; T dsigma[4][3] = { { -1, -1, -2 }, { 1, -1, -1 }, { 1, 1, 0 }, { -1, 1, -1 } }; T dz[3] = { 0, 0, 1 }; for (int i = 0; i < 4; i++) // horizontal edges { int eorder = edgeorder[info.edgenrs[i]]; if (eorder >= 2) { int vi1 = (edges[i][0]-1), vi2 = (edges[i][1]-1); if (el[vi1] > el[vi2]) swap (vi1, vi2); ArrayMem shapei_mem(eorder+1); TFlatVector shapei(eorder+1,&shapei_mem[0]); CalcScaledEdgeShapeDxDt<3> (eorder, sigma[vi1]-sigma[vi2], 1-z, &dshapes(ii,0) ); CalcScaledEdgeShape(eorder, sigma[vi1]-sigma[vi2], 1-z, &shapei(0) ); T fac = (shapes[vi1]+shapes[vi2]) / (1-z); T dfac[3]; for (int k = 0; k < 3; k++) dfac[k] = ( (dshapes(vi1,k)+dshapes(vi2,k)) * (1-z) - (shapes[vi1]+shapes[vi2]) *(-dshapes(4,k)) ) / sqr(1-z); for (int j = 0; j < eorder-1; j++) { T ddx = dshapes(ii+j,0); T ddt = dshapes(ii+j,1); for (int k = 0; k < 3; k++) dshapes(ii+j,k) = fac * (ddx * (dsigma[vi1][k]-dsigma[vi2][k]) - ddt*dz[k]) + dfac[k] * shapei(j); } ii += eorder-1; } } break; } case HEX: { // if (typeid(T) == typeid(SIMD)) return; // NgProfiler::StartTimer(timer); T x = xi(0); T y = xi(1); T z = xi(2); // shapes[0] = (1-x)*(1-y)*(1-z); dshapes(0,0) = - (1-y)*(1-z); dshapes(0,1) = (1-x) * (-1) * (1-z); dshapes(0,2) = (1-x) * (1-y) * (-1); // shapes[1] = x *(1-y)*(1-z); dshapes(1,0) = (1-y)*(1-z); dshapes(1,1) = -x * (1-z); dshapes(1,2) = -x * (1-y); // shapes[2] = x * y *(1-z); dshapes(2,0) = y * (1-z); dshapes(2,1) = x * (1-z); dshapes(2,2) = -x * y; // shapes[3] = (1-x)* y *(1-z); dshapes(3,0) = -y * (1-z); dshapes(3,1) = (1-x) * (1-z); dshapes(3,2) = -(1-x) * y; // shapes[4] = (1-x)*(1-y)*z; dshapes(4,0) = - (1-y)*z; dshapes(4,1) = (1-x) * (-1) * z; dshapes(4,2) = (1-x) * (1-y) * 1; // shapes[5] = x *(1-y)*z; dshapes(5,0) = (1-y)*z; dshapes(5,1) = -x * z; dshapes(5,2) = x * (1-y); // shapes[6] = x * y *z; dshapes(6,0) = y * z; dshapes(6,1) = x * z; dshapes(6,2) = x * y; // shapes[7] = (1-x)* y *z; dshapes(7,0) = -y * z; dshapes(7,1) = (1-x) * z; dshapes(7,2) = (1-x) * y; // NgProfiler::StopTimer(timer); if (info.order == 1) return; T shapes[8] = { (1-x)*(1-y)*(1-z), x *(1-y)*(1-z), x * y *(1-z), (1-x)* y *(1-z), (1-x)*(1-y)*(z), x *(1-y)*(z), x * y *(z), (1-x)* y *(z), }; T mu[8] = { (1-x)+(1-y)+(1-z), x +(1-y)+(1-z), x + y +(1-z), (1-x)+ y +(1-z), (1-x)+(1-y)+(z), x +(1-y)+(z), x + y +(z), (1-x)+ y +(z) }; T dmu[8][3] = { { -1, -1, -1 }, { 1, -1, -1 }, { 1, 1, -1 }, { -1, 1, -1 }, { -1, -1, 1 }, { 1, -1, 1 }, { 1, 1, 1 }, { -1, 1, 1 } }; ArrayMem hshapes(order+1), hdshapes(order+1); int ii = 8; const ELEMENT_EDGE * edges = MeshTopology::GetEdges1 (HEX); for (int i = 0; i < 8; i++) { int eorder = edgeorder[info.edgenrs[i]]; if (eorder >= 2) { int vi1 = edges[i][0]-1, vi2 = edges[i][1]-1; if (el[vi1] > el[vi2]) swap (vi1, vi2); CalcEdgeShapeDx (eorder, mu[vi1]-mu[vi2], &hshapes[0], &hdshapes[0]); T lame = shapes[vi1]+shapes[vi2]; T dlame[3] = { dshapes(vi1, 0) + dshapes(vi2, 0), dshapes(vi1, 1) + dshapes(vi2, 1), dshapes(vi1, 2) + dshapes(vi2, 2) }; for (int j = 0; j < eorder-1; j++) for (int k = 0; k < 3; k++) dshapes(ii+j, k) = lame * hdshapes[j] * (dmu[vi1][k]-dmu[vi2][k]) + dlame[k] * hshapes[j]; ii += eorder-1; } } /* *testout << "quad, dshape = " << endl << dshapes << endl; for (int i = 0; i < 2; i++) { Point<2> xil = xi, xir = xi; Vector shapesl(dshapes.Height()), shapesr(dshapes.Height()); xil(i) -= 1e-6; xir(i) += 1e-6; CalcElementShapes (info, xil, shapesl); CalcElementShapes (info, xir, shapesr); for (int j = 0; j < dshapes.Height(); j++) dshapes(j,i) = 1.0 / 2e-6 * (shapesr(j)-shapesl(j)); } *testout << "quad, num dshape = " << endl << dshapes << endl; */ break; break; } default: throw NgException("CurvedElements::CalcDShape 3d, element type not handled"); } /* DenseMatrix dshapes2 (info.ndof, 3); Vector shapesl(info.ndof); Vector shapesr(info.ndof); double eps = 1e-6; for (int i = 0; i < 3; i++) { Point<3> xl = xi; Point<3> xr = xi; xl(i) -= eps; xr(i) += eps; CalcElementShapes (info, xl, shapesl); CalcElementShapes (info, xr, shapesr); for (int j = 0; j < info.ndof; j++) dshapes2(j,i) = (shapesr(j)-shapesl(j)) / (2*eps); } (*testout) << "dshapes = " << endl << dshapes << endl; (*testout) << "dshapes2 = " << endl << dshapes2 << endl; dshapes2 -= dshapes; (*testout) << "diff = " << endl << dshapes2 << endl; */ } // extern int mappingvar; template bool CurvedElements :: EvaluateMapping (ElementInfo & info, Point<3,T> xi, Point<3,T> & mx, Mat<3,3,T> & jac) const { const Element & el = mesh[info.elnr]; if (rational && info.order >= 2) return false; // not supported AutoDiff<3,T> x(xi(0), 0); AutoDiff<3,T> y(xi(1), 1); AutoDiff<3,T> z(xi(2), 2); AutoDiff<3,T> mapped_x[3] = { T(0.0), T(0.0), T(0.0) } ; switch (el.GetType()) { case TET: { // if (info.order >= 2) return false; // not yet supported AutoDiff<3,T> lami[4] = { x, y, z, 1-x-y-z }; for (int j = 0; j < 4; j++) { Point<3> p = mesh[el[j]]; for (int k = 0; k < 3; k++) mapped_x[k] += p(k) * lami[j]; } if (info.order == 1) break; const ELEMENT_EDGE * edges = MeshTopology::GetEdges1 (TET); for (int i = 0; i < 6; i++) { int eorder = edgeorder[info.edgenrs[i]]; if (eorder >= 2) { int first = edgecoeffsindex[info.edgenrs[i]]; int vi1 = edges[i][0]-1, vi2 = edges[i][1]-1; if (el[vi1] > el[vi2]) swap (vi1, vi2); CalcScaledEdgeShapeLambda (eorder, lami[vi1]-lami[vi2], lami[vi1]+lami[vi2], [&](int i, AutoDiff<3,T> shape) { Vec<3> coef = edgecoeffs[first+i]; for (int k = 0; k < 3; k++) mapped_x[k] += coef(k) * shape; }); } } const ELEMENT_FACE * faces = MeshTopology::GetFaces1 (TET); for (int i = 0; i < 4; i++) { int forder = faceorder[info.facenrs[i]]; if (forder >= 3) { int first = facecoeffsindex[info.facenrs[i]]; int fnums[] = { faces[i][0]-1, faces[i][1]-1, faces[i][2]-1 }; if (el[fnums[0]] > el[fnums[1]]) swap (fnums[0], fnums[1]); if (el[fnums[1]] > el[fnums[2]]) swap (fnums[1], fnums[2]); if (el[fnums[0]] > el[fnums[1]]) swap (fnums[0], fnums[1]); CalcScaledTrigShapeLambda (forder, lami[fnums[1]]-lami[fnums[0]], lami[fnums[2]], lami[fnums[0]]+lami[fnums[1]]+lami[fnums[2]], [&](int i, AutoDiff<3,T> shape) { Vec<3> coef = facecoeffs[first+i]; for (int k = 0; k < 3; k++) mapped_x[k] += coef(k) * shape; }); } } break; } case HEX: { if (info.order >= 2) return false; // not yet supported AutoDiff<3,T> lami[8] = { (1-x)*(1-y)*(1-z), ( x)*(1-y)*(1-z), ( x)* y *(1-z), (1-x)* y *(1-z), (1-x)*(1-y)*(z), ( x)*(1-y)*(z), ( x)* y *(z), (1-x)* y *(z) }; for (int j = 0; j < 8; j++) { Point<3> p = mesh[el[j]]; for (int k = 0; k < 3; k++) mapped_x[k] += p(k) * lami[j]; } if (info.order == 1) break; AutoDiff<3,T> mu[8] = { (1-x)+(1-y)+(1-z), x +(1-y)+(1-z), x + y +(1-z), (1-x)+ y +(1-z), (1-x)+(1-y)+(z), x +(1-y)+(z), x + y +(z), (1-x)+ y +(z), }; // int ii = 8; const ELEMENT_EDGE * edges = MeshTopology::GetEdges1 (HEX); for (int i = 0; i < 8; i++) { int eorder = edgeorder[info.edgenrs[i]]; if (eorder >= 2) { int first = edgecoeffsindex[info.edgenrs[i]]; int vi1 = edges[i][0]-1, vi2 = edges[i][1]-1; if (el[vi1] > el[vi2]) swap (vi1, vi2); AutoDiff<3,T> lame = lami[vi1]+lami[vi2]; CalcEdgeShapeLambda (eorder, mu[vi1]-mu[vi2], [&](int i, AutoDiff<3,T> shape) { Vec<3> coef = edgecoeffs[first+i]; for (int k = 0; k < 3; k++) mapped_x[k] += coef(k) * (lame*shape); }); } } break; } default: return false; } for (int i = 0; i < 3; i++) { mx(i) = mapped_x[i].Value(); for (int j = 0; j < 3; j++) jac(i,j) = mapped_x[i].DValue(j); } return true; } void CurvedElements :: GetCoefficients (ElementInfo & info, Vec<3> * coefs) const { const Element & el = mesh[info.elnr]; for (int i = 0; i < info.nv; i++) coefs[i] = Vec<3> (mesh[el[i]]); if (info.order == 1) return; int ii = info.nv; for (int i = 0; i < info.nedges; i++) { int first = edgecoeffsindex[info.edgenrs[i]]; int next = edgecoeffsindex[info.edgenrs[i]+1]; for (int j = first; j < next; j++, ii++) coefs[ii] = edgecoeffs[j]; } for (int i = 0; i < info.nfaces; i++) { int first = facecoeffsindex[info.facenrs[i]]; int next = facecoeffsindex[info.facenrs[i]+1]; for (int j = first; j < next; j++, ii++) coefs[ii] = facecoeffs[j]; } } /* void CurvedElements :: CalcMultiPointSegmentTransformation (Array * xi, SegmentIndex segnr, Array > * x, Array > * dxdxi) { ; } */ template void CurvedElements :: CalcMultiPointSegmentTransformation (SegmentIndex elnr, int n, const T * xi, size_t sxi, T * x, size_t sx, T * dxdxi, size_t sdxdxi) { for (int ip = 0; ip < n; ip++) { Point<3,T> xg; Vec<3,T> dx; // mesh->GetCurvedElements(). CalcSegmentTransformation (xi[ip*sxi], elnr, &xg, &dx); if (x) for (int i = 0; i < DIM_SPACE; i++) x[ip*sx+i] = xg(i); if (dxdxi) for (int i=0; i (SegmentIndex elnr, int npts, const double * xi, size_t sxi, double * x, size_t sx, double * dxdxi, size_t sdxdxi); template void CurvedElements :: CalcMultiPointSegmentTransformation<3> (SegmentIndex elnr, int npts, const double * xi, size_t sxi, double * x, size_t sx, double * dxdxi, size_t sdxdxi); template void CurvedElements :: CalcMultiPointSegmentTransformation<2> (SegmentIndex elnr, int npts, const SIMD * xi, size_t sxi, SIMD * x, size_t sx, SIMD * dxdxi, size_t sdxdxi); template void CurvedElements :: CalcMultiPointSegmentTransformation<3> (SegmentIndex elnr, int npts, const SIMD * xi, size_t sxi, SIMD * x, size_t sx, SIMD * dxdxi, size_t sdxdxi); template void CurvedElements :: CalcSegmentTransformation (double xi, SegmentIndex elnr, Point<3,double> * x, Vec<3,double> * dxdxi, bool * curved); void CurvedElements :: CalcMultiPointSurfaceTransformation (Array< Point<2> > * xi, SurfaceElementIndex elnr, Array< Point<3> > * x, Array< Mat<3,2> > * dxdxi) { double * px = (x) ? &(*x)[0](0) : NULL; double * pdxdxi = (dxdxi) ? &(*dxdxi)[0](0) : NULL; CalcMultiPointSurfaceTransformation <3> (elnr, xi->Size(), &(*xi)[0](0), 2, px, 3, pdxdxi, 6); } template void CurvedElements :: CalcMultiPointSurfaceTransformation (SurfaceElementIndex elnr, int npts, const T * xi, size_t sxi, T * x, size_t sx, T * dxdxi, size_t sdxdxi) { if (mesh.coarsemesh) { const HPRefElement & hpref_el = (*mesh.hpelements) [mesh[elnr].hp_elnr]; // xi umrechnen T lami[4]; TFlatVector vlami(4, lami); ArrayMem, 50> coarse_xi (npts); for (int pi = 0; pi < npts; pi++) { vlami = 0; Point<2,T> hxi(xi[pi*sxi], xi[pi*sxi+1]); mesh[elnr].GetShapeNew ( hxi, vlami); Point<2,T> cxi(0,0); for (int i = 0; i < hpref_el.np; i++) for (int j = 0; j < 2; j++) cxi(j) += hpref_el.param[i][j] * lami[i]; coarse_xi[pi] = cxi; } mesh.coarsemesh->GetCurvedElements(). CalcMultiPointSurfaceTransformation (hpref_el.coarse_elnr, npts, &coarse_xi[0](0), &coarse_xi[1](0)-&coarse_xi[0](0), x, sx, dxdxi, sdxdxi); // Mat<3,2> dxdxic; if (dxdxi) { T mem_dlami[8]; // avoid alignment problems if T is SIMD MatrixFixWidth<2,T> dlami(4, mem_dlami); dlami = T(0.0); for (int pi = 0; pi < npts; pi++) { Point<2,T> hxi(xi[pi*sxi], xi[pi*sxi+1]); mesh[elnr].GetDShapeNew ( hxi, dlami); Mat<2,2,T> trans; trans = 0; for (int k = 0; k < 2; k++) for (int l = 0; l < 2; l++) for (int i = 0; i < hpref_el.np; i++) trans(l,k) += hpref_el.param[i][l] * dlami(i, k); Mat hdxdxic, hdxdxi; for (int k = 0; k < 2*DIM_SPACE; k++) hdxdxic(k) = dxdxi[pi*sdxdxi+k]; hdxdxi = hdxdxic * trans; for (int k = 0; k < 2*DIM_SPACE; k++) dxdxi[pi*sdxdxi+k] = hdxdxi(k); // dxdxic = (*dxdxi)[pi]; // (*dxdxi)[pi] = dxdxic * trans; } } return; } const Element2d & el = mesh[elnr]; ELEMENT_TYPE type = el.GetType(); SurfaceElementInfo info; info.elnr = elnr; info.order = order; switch (type) { case TRIG : info.nv = 3; break; case QUAD : info.nv = 4; break; case TRIG6: info.nv = 6; break; default: cerr << "undef element in CalcMultPointSurfaceTrao" << endl; } info.ndof = info.nv; // if (info.order > 1) // { // const MeshTopology & top = mesh.GetTopology(); // top.GetSurfaceElementEdges (elnr+1, info.edgenrs); // for (int i = 0; i < info.edgenrs.Size(); i++) // info.edgenrs[i]--; // info.facenr = top.GetSurfaceElementFace (elnr+1)-1; // for (int i = 0; i < info.edgenrs.Size(); i++) // info.ndof += edgecoeffsindex[info.edgenrs[i]+1] - edgecoeffsindex[info.edgenrs[i]]; // info.ndof += facecoeffsindex[info.facenr+1] - facecoeffsindex[info.facenr]; // } // Michael Woopen: THESE FOLLOWING LINES ARE COPIED FROM CurvedElements::CalcSurfaceTransformation if (info.order > 1) { const MeshTopology & top = mesh.GetTopology(); top.GetSurfaceElementEdges (elnr+1, info.edgenrs); for (int i = 0; i < info.edgenrs.Size(); i++) info.edgenrs[i]--; info.facenr = top.GetSurfaceElementFace (elnr+1)-1; bool firsttry = true; bool problem = false; while(firsttry || problem) { problem = false; for (int i = 0; !problem && i < info.edgenrs.Size(); i++) { if(info.edgenrs[i]+1 >= edgecoeffsindex.Size()) problem = true; else info.ndof += edgecoeffsindex[info.edgenrs[i]+1] - edgecoeffsindex[info.edgenrs[i]]; } if(info.facenr+1 >= facecoeffsindex.Size()) problem = true; else info.ndof += facecoeffsindex[info.facenr+1] - facecoeffsindex[info.facenr]; if(problem && !firsttry) throw NgException("something wrong with curved elements"); if(problem) BuildCurvedElements(NULL,order,rational); firsttry = false; } } bool ok = true; for (int i = 0; i < npts; i++) { Point<2,T> _xi(xi[i*sxi], xi[i*sxi+1]); Point _x; Mat _dxdxi; if (!EvaluateMapping (info, _xi, _x, _dxdxi)) { ok = false; break; } // *testout << "x = " << _x << ", dxdxi = " << _dxdxi << endl; if (x) for (int j = 0; j < DIM_SPACE; j++) x[i*sx+j] = _x[j]; if (dxdxi) for (int j = 0; j < DIM_SPACE; j++) for (int k = 0; k < 2; k++) dxdxi[i*sdxdxi+2*j+k] = _dxdxi(j,k); } if (ok) return; // THESE LAST LINES ARE COPIED FROM CurvedElements::CalcSurfaceTransformation ArrayMem,100> coefs(info.ndof); GetCoefficients (info, coefs); ArrayMem shapes_mem(info.ndof); TFlatVector shapes(info.ndof, &shapes_mem[0]); ArrayMem dshapes_mem(info.ndof*2); MatrixFixWidth<2,T> dshapes(info.ndof,&shapes_mem[0]); if (x) { if (info.order == 1 && type == TRIG) { for (int j = 0; j < npts; j++) { Point<2,T> vxi(xi[j*sxi], xi[j*sxi+1]); Point val; for (int k = 0; k < DIM_SPACE; k++) val(k) = coefs[2](k) + (coefs[0](k)-coefs[2](k)) * vxi(0) + (coefs[1](k)-coefs[2](k)) * vxi(1); /* (coefs[2]); val += (coefs[0]-coefs[2]) * vxi(0); val += (coefs[1]-coefs[2]) * vxi(1); */ for (int k = 0; k < DIM_SPACE; k++) x[j*sx+k] = val(k); } } else for (int j = 0; j < npts; j++) { Point<2,T> vxi(xi[j*sxi], xi[j*sxi+1]); CalcElementShapes (info, vxi, shapes); Point val = T(0.0); for (int i = 0; i < coefs.Size(); i++) for (int k = 0; k < DIM_SPACE; k++) val(k) += shapes(i) * coefs[i](k); for (int k = 0; k < DIM_SPACE; k++) x[j*sx+k] = val(k); } } if (dxdxi) { if (info.order == 1 && type == TRIG) { Point<2,T> xij(xi[0], xi[1]); CalcElementDShapes (info, xij, dshapes); Mat<3,2,T> dxdxij; dxdxij = 0.0; for (int i = 0; i < coefs.Size(); i++) for (int j = 0; j < DIM_SPACE; j++) for (int k = 0; k < 2; k++) dxdxij(j,k) += dshapes(i,k) * coefs[i](j); for (int ip = 0; ip < npts; ip++) for (int j = 0; j < DIM_SPACE; j++) for (int k = 0; k < 2; k++) dxdxi[ip*sdxdxi+2*j+k] = dxdxij(j,k); } else { for (int j = 0; j < npts; j++) { Point<2,T> vxi(xi[j*sxi], xi[j*sxi+1]); CalcElementDShapes (info, vxi, dshapes); Mat ds; ds = 0.0; for (int i = 0; i < coefs.Size(); i++) for (int j = 0; j < DIM_SPACE; j++) for (int k = 0; k < 2; k++) ds(j,k) += dshapes(i,k) * coefs[i](j); // (*dxdxi)[ip] = ds; for (int k = 0; k < 2*DIM_SPACE; k++) dxdxi[j*sdxdxi+k] = ds(k); } } } } template void CurvedElements :: CalcMultiPointSurfaceTransformation<2> (SurfaceElementIndex elnr, int npts, const double * xi, size_t sxi, double * x, size_t sx, double * dxdxi, size_t sdxdxi); template void CurvedElements :: CalcMultiPointSurfaceTransformation<3> (SurfaceElementIndex elnr, int npts, const double * xi, size_t sxi, double * x, size_t sx, double * dxdxi, size_t sdxdxi); template void CurvedElements :: CalcMultiPointSurfaceTransformation<2> (SurfaceElementIndex elnr, int npts, const SIMD * xi, size_t sxi, SIMD * x, size_t sx, SIMD * dxdxi, size_t sdxdxi); template void CurvedElements :: CalcMultiPointSurfaceTransformation<3> (SurfaceElementIndex elnr, int npts, const SIMD * xi, size_t sxi, SIMD * x, size_t sx, SIMD * dxdxi, size_t sdxdxi); void CurvedElements :: CalcMultiPointElementTransformation (Array< Point<3> > * xi, ElementIndex elnr, Array< Point<3> > * x, Array< Mat<3,3> > * dxdxi) { double * px = (x) ? &(*x)[0](0) : NULL; double * pdxdxi = (dxdxi) ? &(*dxdxi)[0](0) : NULL; CalcMultiPointElementTransformation (elnr, xi->Size(), &(*xi)[0](0), 3, px, 3, pdxdxi, 9); return; #ifdef OLD if (mesh.coarsemesh) { const HPRefElement & hpref_el = (*mesh.hpelements) [mesh[elnr].hp_elnr]; // xi umrechnen double lami[8]; FlatVector vlami(8, lami); ArrayMem, 50> coarse_xi (xi->Size()); for (int pi = 0; pi < xi->Size(); pi++) { vlami = 0; mesh[elnr].GetShapeNew ( (*xi)[pi], vlami); Point<3> cxi(0,0,0); for (int i = 0; i < hpref_el.np; i++) for (int j = 0; j < 3; j++) cxi(j) += hpref_el.param[i][j] * lami[i]; coarse_xi[pi] = cxi; } mesh.coarsemesh->GetCurvedElements(). CalcMultiPointElementTransformation (&coarse_xi, hpref_el.coarse_elnr, x, dxdxi); Mat<3,3> trans, dxdxic; if (dxdxi) { MatrixFixWidth<3> dlami(8); dlami = 0; for (int pi = 0; pi < xi->Size(); pi++) { mesh[elnr].GetDShapeNew ( (*xi)[pi], dlami); trans = 0; for (int k = 0; k < 3; k++) for (int l = 0; l < 3; l++) for (int i = 0; i < hpref_el.np; i++) trans(l,k) += hpref_el.param[i][l] * dlami(i, k); dxdxic = (*dxdxi)[pi]; (*dxdxi)[pi] = dxdxic * trans; } } return; } Vector shapes; MatrixFixWidth<3> dshapes; const Element & el = mesh[elnr]; ELEMENT_TYPE type = el.GetType(); ElementInfo info; info.elnr = elnr; info.order = order; info.ndof = info.nv = MeshTopology::GetNPoints (type); if (info.order > 1) { const MeshTopology & top = mesh.GetTopology(); info.nedges = top.GetElementEdges (elnr+1, info.edgenrs, 0); for (int i = 0; i < info.nedges; i++) info.edgenrs[i]--; info.nfaces = top.GetElementFaces (elnr+1, info.facenrs, 0); for (int i = 0; i < info.nfaces; i++) info.facenrs[i]--; for (int i = 0; i < info.nedges; i++) info.ndof += edgecoeffsindex[info.edgenrs[i]+1] - edgecoeffsindex[info.edgenrs[i]]; for (int i = 0; i < info.nfaces; i++) info.ndof += facecoeffsindex[info.facenrs[i]+1] - facecoeffsindex[info.facenrs[i]]; // info.ndof += facecoeffsindex[info.facenr+1] - facecoeffsindex[info.facenr]; } Array > coefs(info.ndof); GetCoefficients (info, &coefs[0]); if (x) { for (int j = 0; j < xi->Size(); j++) { CalcElementShapes (info, (*xi)[j], shapes); (*x)[j] = 0; for (int i = 0; i < coefs.Size(); i++) (*x)[j] += shapes(i) * coefs[i]; } } if (dxdxi) { if (info.order == 1 && type == TET) { if (xi->Size() > 0) { CalcElementDShapes (info, (*xi)[0], dshapes); Mat<3,3> ds; ds = 0; for (int i = 0; i < coefs.Size(); i++) for (int j = 0; j < 3; j++) for (int k = 0; k < 3; k++) ds(j,k) += dshapes(i,k) * coefs[i](j); for (int ip = 0; ip < xi->Size(); ip++) (*dxdxi)[ip] = ds; } } else for (int ip = 0; ip < xi->Size(); ip++) { CalcElementDShapes (info, (*xi)[ip], dshapes); Mat<3,3> ds; ds = 0; for (int i = 0; i < coefs.Size(); i++) for (int j = 0; j < 3; j++) for (int k = 0; k < 3; k++) ds(j,k) += dshapes(i,k) * coefs[i](j); (*dxdxi)[ip] = ds; } } #endif } // extern int multipointtrafovar; template void CurvedElements :: CalcMultiPointElementTransformation (ElementIndex elnr, int n, const T * xi, size_t sxi, T * x, size_t sx, T * dxdxi, size_t sdxdxi) { // multipointtrafovar++; /* static int timer = NgProfiler::CreateTimer ("calcmultipointelementtrafo"); static int timer1 = NgProfiler::CreateTimer ("calcmultipointelementtrafo 1"); static int timer2 = NgProfiler::CreateTimer ("calcmultipointelementtrafo 2"); static int timer3 = NgProfiler::CreateTimer ("calcmultipointelementtrafo 3"); static int timer4 = NgProfiler::CreateTimer ("calcmultipointelementtrafo 4"); static int timer5 = NgProfiler::CreateTimer ("calcmultipointelementtrafo 5"); NgProfiler::RegionTimer reg(timer); */ // NgProfiler::StartTimer (timer); // NgProfiler::StartTimer (timer1); if (mesh.coarsemesh) { const HPRefElement & hpref_el = (*mesh.hpelements) [mesh[elnr].hp_elnr]; // xi umrechnen T lami[8]; TFlatVector vlami(8, &lami[0]); ArrayMem coarse_xi (3*n); for (int pi = 0; pi < n; pi++) { vlami = 0; Point<3,T> pxi; for (int j = 0; j < 3; j++) pxi(j) = xi[pi*sxi+j]; mesh[elnr].GetShapeNew (pxi, vlami); Point<3,T> cxi(0,0,0); for (int i = 0; i < hpref_el.np; i++) for (int j = 0; j < 3; j++) cxi(j) += hpref_el.param[i][j] * lami[i]; for (int j = 0; j < 3; j++) coarse_xi[3*pi+j] = cxi(j); } mesh.coarsemesh->GetCurvedElements(). CalcMultiPointElementTransformation (hpref_el.coarse_elnr, n, &coarse_xi[0], 3, x, sx, dxdxi, sdxdxi); Mat<3,3,T> trans, dxdxic; if (dxdxi) { MatrixFixWidth<3,T> dlami(8); dlami = T(0); for (int pi = 0; pi < n; pi++) { Point<3,T> pxi; for (int j = 0; j < 3; j++) pxi(j) = xi[pi*sxi+j]; mesh[elnr].GetDShapeNew (pxi, dlami); trans = 0; for (int k = 0; k < 3; k++) for (int l = 0; l < 3; l++) for (int i = 0; i < hpref_el.np; i++) trans(l,k) += hpref_el.param[i][l] * dlami(i, k); Mat<3,3,T> mat_dxdxic, mat_dxdxi; for (int j = 0; j < 3; j++) for (int k = 0; k < 3; k++) mat_dxdxic(j,k) = dxdxi[pi*sdxdxi+3*j+k]; mat_dxdxi = mat_dxdxic * trans; for (int j = 0; j < 3; j++) for (int k = 0; k < 3; k++) dxdxi[pi*sdxdxi+3*j+k] = mat_dxdxi(j,k); // dxdxic = (*dxdxi)[pi]; // (*dxdxi)[pi] = dxdxic * trans; } } return; } // NgProfiler::StopTimer (timer1); // NgProfiler::StartTimer (timer2); const Element & el = mesh[elnr]; ELEMENT_TYPE type = el.GetType(); ElementInfo info; info.elnr = elnr; info.order = order; info.ndof = info.nv = MeshTopology::GetNPoints (type); if (info.order > 1) { const MeshTopology & top = mesh.GetTopology(); info.nedges = top.GetElementEdges (elnr+1, info.edgenrs, 0); for (int i = 0; i < info.nedges; i++) info.edgenrs[i]--; info.nfaces = top.GetElementFaces (elnr+1, info.facenrs, 0); for (int i = 0; i < info.nfaces; i++) info.facenrs[i]--; for (int i = 0; i < info.nedges; i++) info.ndof += edgecoeffsindex[info.edgenrs[i]+1] - edgecoeffsindex[info.edgenrs[i]]; for (int i = 0; i < info.nfaces; i++) info.ndof += facecoeffsindex[info.facenrs[i]+1] - facecoeffsindex[info.facenrs[i]]; // info.ndof += facecoeffsindex[info.facenr+1] - facecoeffsindex[info.facenr]; } // NgProfiler::StopTimer (timer2); // NgProfiler::StartTimer (timer3); bool ok = true; for (int i = 0; i < n; i++) { Point<3,T> _xi(xi[i*sxi], xi[i*sxi+1], xi[i*sxi+2]); Point<3,T> _x; Mat<3,3,T> _dxdxi; if (!EvaluateMapping (info, _xi, _x, _dxdxi)) { ok = false; break; } // cout << "x = " << _x << ", dxdxi = " << _dxdxi << endl; if (x) for (int j = 0; j < 3; j++) x[i*sx+j] = _x[j]; if (dxdxi) for (int j = 0; j < 3; j++) for (int k = 0; k < 3; k++) dxdxi[i*sdxdxi+3*j+k] = _dxdxi(j,k); } if (ok) return; ArrayMem,100> coefs(info.ndof); ArrayMem shapes_mem(info.ndof); TFlatVector shapes(info.ndof, &shapes_mem[0]); ArrayMem dshapes_mem(3*info.ndof); MatrixFixWidth<3,T> dshapes(info.ndof, &dshapes_mem[0]); // NgProfiler::StopTimer (timer3); // NgProfiler::StartTimer (timer4); GetCoefficients (info, &coefs[0]); if (x) { for (int j = 0; j < n; j++) { Point<3,T> xij, xj; for (int k = 0; k < 3; k++) xij(k) = xi[j*sxi+k]; CalcElementShapes (info, xij, shapes); xj = T(0.0); for (int i = 0; i < coefs.Size(); i++) for (int k = 0; k < 3; k++) xj(k) += shapes(i) * coefs[i](k); // cout << "old, xj = " << xj << endl; for (int k = 0; k < 3; k++) x[j*sx+k] = xj(k); } } // NgProfiler::StopTimer (timer4); // NgProfiler::StartTimer (timer5); if (dxdxi) { if (info.order == 1 && type == TET) { if (n > 0) { Point<3,T> xij; for (int k = 0; k < 3; k++) xij(k) = xi[k]; CalcElementDShapes (info, xij, dshapes); Mat<3,3,T> dxdxij; dxdxij = 0.0; for (int i = 0; i < coefs.Size(); i++) for (int j = 0; j < 3; j++) for (int k = 0; k < 3; k++) dxdxij(j,k) += dshapes(i,k) * coefs[i](j); for (int ip = 0; ip < n; ip++) for (int j = 0; j < 3; j++) for (int k = 0; k < 3; k++) dxdxi[ip*sdxdxi+3*j+k] = dxdxij(j,k); } } else { for (int ip = 0; ip < n; ip++) { Point<3,T> xij; for (int k = 0; k < 3; k++) xij(k) = xi[ip*sxi+k]; CalcElementDShapes (info, xij, dshapes); Mat<3,3,T> dxdxij; dxdxij = 0.0; for (int i = 0; i < coefs.Size(); i++) for (int j = 0; j < 3; j++) for (int k = 0; k < 3; k++) dxdxij(j,k) += dshapes(i,k) * coefs[i](j); // cout << "old, jac = " << dxdxij << endl; for (int j = 0; j < 3; j++) for (int k = 0; k < 3; k++) dxdxi[ip*sdxdxi+3*j+k] = dxdxij(j,k); /* T dxdxi00 = T(0.0); T dxdxi01 = T(0.0); T dxdxi02 = T(0.0); T dxdxi10 = T(0.0); T dxdxi11 = T(0.0); T dxdxi12 = T(0.0); T dxdxi20 = T(0.0); T dxdxi21 = T(0.0); T dxdxi22 = T(0.0); for (int i = 0; i < coefs.Size(); i++) { T ds0 = dshapes(i,0); T ds1 = dshapes(i,1); T ds2 = dshapes(i,2); T cf0 = coefs[i](0); T cf1 = coefs[i](1); T cf2 = coefs[i](2); dxdxi00 += ds0*cf0; dxdxi01 += ds1*cf0; dxdxi02 += ds2*cf0; dxdxi10 += ds0*cf1; dxdxi11 += ds1*cf1; dxdxi12 += ds2*cf1; dxdxi20 += ds0*cf2; dxdxi21 += ds1*cf2; dxdxi22 += ds2*cf2; } dxdxi[ip*sdxdxi+3*0+0] = dxdxi00; dxdxi[ip*sdxdxi+3*0+1] = dxdxi01; dxdxi[ip*sdxdxi+3*0+2] = dxdxi02; dxdxi[ip*sdxdxi+3*1+0] = dxdxi10; dxdxi[ip*sdxdxi+3*1+1] = dxdxi11; dxdxi[ip*sdxdxi+3*1+2] = dxdxi12; dxdxi[ip*sdxdxi+3*2+0] = dxdxi20; dxdxi[ip*sdxdxi+3*2+1] = dxdxi21; dxdxi[ip*sdxdxi+3*2+2] = dxdxi22; */ } } } // NgProfiler::StopTimer (timer5); // NgProfiler::StopTimer (timer); } template void CurvedElements :: CalcMultiPointElementTransformation (ElementIndex elnr, int n, const double * xi, size_t sxi, double * x, size_t sx, double * dxdxi, size_t sdxdxi); template void CurvedElements :: CalcMultiPointElementTransformation (ElementIndex elnr, int n, const SIMD * xi, size_t sxi, SIMD * x, size_t sx, SIMD * dxdxi, size_t sdxdxi); }; netgen-6.2.1804/libsrc/meshing/meshtype.cpp0000644000175000017500000017707713272137567017302 0ustar kurtkurt#include #include "meshing.hpp" namespace netgen { int MultiPointGeomInfo :: AddPointGeomInfo (const PointGeomInfo & gi) { for (int k = 0; k < cnt; k++) if (mgi[k].trignum == gi.trignum) return 0; if (cnt < MULTIPOINTGEOMINFO_MAX) { mgi[cnt] = gi; cnt++; return 0; } throw NgException ("Please report error: MPGI Size too small\n"); } #ifdef PARALLEL MPI_Datatype MeshPoint :: MyGetMPIType ( ) { static MPI_Datatype type = NULL; static MPI_Datatype htype = NULL; if (!type) { MeshPoint hp; int blocklen[] = { 3, 1, 1 }; MPI_Aint displ[] = { (char*)&hp.x[0] - (char*)&hp, (char*)&hp.layer - (char*)&hp, (char*)&hp.singular - (char*)&hp }; MPI_Datatype types[] = { MPI_DOUBLE, MPI_INT, MPI_DOUBLE }; *testout << "displ = " << displ[0] << ", " << displ[1] << ", " << displ[2] << endl; *testout << "sizeof = " << sizeof (MeshPoint) << endl; MPI_Type_create_struct (3, blocklen, displ, types, &htype); MPI_Type_commit ( &htype ); MPI_Aint lb, ext; MPI_Type_get_extent (htype, &lb, &ext); *testout << "lb = " << lb << endl; *testout << "ext = " << ext << endl; ext = sizeof (MeshPoint); MPI_Type_create_resized (htype, lb, ext, &type); MPI_Type_commit ( &type ); } return type; } #endif Segment :: Segment() : is_curved(false) { pnums[0] = -1; pnums[1] = -1; edgenr = -1; singedge_left = 0.; singedge_right = 0.; seginfo = 0; si = -1; domin = -1; domout = -1; tlosurf = -1; surfnr1 = -1; surfnr2 = -1; pnums[2] = -1; meshdocval = 0; /* geominfo[0].trignum=-1; geominfo[1].trignum=-1; epgeominfo[0].edgenr = 1; epgeominfo[0].dist = 0; epgeominfo[1].edgenr = 1; epgeominfo[1].dist = 0; */ bcname = nullptr; } Segment::Segment (const Segment & other) : edgenr(other.edgenr), singedge_left(other.singedge_left), singedge_right(other.singedge_right), seginfo(other.seginfo), si(other.si), domin(other.domin), domout(other.domout), tlosurf(other.tlosurf), geominfo(), surfnr1(other.surfnr1), surfnr2(other.surfnr2), epgeominfo(), meshdocval(other.meshdocval), is_curved(other.is_curved), hp_elnr(other.hp_elnr) { for (int j = 0; j < 3; j++) pnums[j] = other.pnums[j]; geominfo[0] = other.geominfo[0]; geominfo[1] = other.geominfo[1]; epgeominfo[0] = other.epgeominfo[0]; epgeominfo[1] = other.epgeominfo[1]; bcname = other.bcname; } Segment& Segment::operator=(const Segment & other) { if (&other != this) { pnums[0] = other[0]; pnums[1] = other[1]; edgenr = other.edgenr; singedge_left = other.singedge_left; singedge_right = other.singedge_right; seginfo = other.seginfo; si = other.si; domin = other.domin; domout = other.domout; tlosurf = other.tlosurf; geominfo[0] = other.geominfo[0]; geominfo[1] = other.geominfo[1]; surfnr1 = other.surfnr1; surfnr2 = other.surfnr2; epgeominfo[0] = other.epgeominfo[0]; epgeominfo[1] = other.epgeominfo[1]; pnums[2] = other.pnums[2]; meshdocval = other.meshdocval; hp_elnr = other.hp_elnr; bcname = other.bcname; is_curved = other.is_curved; } return *this; } ngstd::Archive & Segment :: DoArchive (ngstd::Archive & ar) { return ar & pnums[0] & pnums[1] & pnums[2] & edgenr & singedge_left & singedge_right & si & cd2i & domin & domout & tlosurf & surfnr1 & surfnr2 & bcname; } ostream & operator<<(ostream & s, const Segment & seg) { s << seg[0] << "(gi=" << seg.geominfo[0].trignum << ") - " << seg[1] << "(gi=" << seg.geominfo[1].trignum << ")" << " domin = " << seg.domin << ", domout = " << seg.domout << " si = " << seg.si << ", edgenr = " << seg.edgenr; return s; } /* Element2d :: Element2d () { for (int i = 0; i < ELEMENT2D_MAXPOINTS; i++) { pnum[i] = 0; geominfo[i].trignum = 0; } np = 3; index = 0; badel = 0; deleted = 0; visible = 1; typ = TRIG; orderx = ordery = 1; refflag = 1; strongrefflag = false; is_curved = false; } */ Element2d :: Element2d (int anp) { for (int i = 0; i < ELEMENT2D_MAXPOINTS; i++) { pnum[i] = 0; geominfo[i].trignum = 0; } np = anp; index = 0; badel = 0; deleted = 0; visible = 1; switch (np) { case 3: typ = TRIG; break; case 4: typ = QUAD; break; case 6: typ = TRIG6; break; case 8: typ = QUAD8; break; } orderx = ordery = 1; refflag = 1; strongrefflag = false; is_curved = (np >= 4); // false; } Element2d :: Element2d (ELEMENT_TYPE atyp) { for (int i = 0; i < ELEMENT2D_MAXPOINTS; i++) { pnum[i] = 0; geominfo[i].trignum = 0; } SetType (atyp); index = 0; badel = 0; deleted = 0; visible = 1; orderx = ordery = 1; refflag = 1; strongrefflag = false; is_curved = (np >= 4); // false; } Element2d :: Element2d (int pi1, int pi2, int pi3) { pnum[0] = pi1; pnum[1] = pi2; pnum[2] = pi3; np = 3; typ = TRIG; pnum[3] = 0; pnum[4] = 0; pnum[5] = 0; for (int i = 0; i < ELEMENT2D_MAXPOINTS; i++) geominfo[i].trignum = 0; index = 0; badel = 0; refflag = 1; strongrefflag = false; deleted = 0; visible = 1; orderx = ordery = 1; is_curved = false; } Element2d :: Element2d (int pi1, int pi2, int pi3, int pi4) { pnum[0] = pi1; pnum[1] = pi2; pnum[2] = pi3; pnum[3] = pi4; np = 4; typ = QUAD; pnum[4] = 0; pnum[5] = 0; for (int i = 0; i < ELEMENT2D_MAXPOINTS; i++) geominfo[i].trignum = 0; index = 0; badel = 0; refflag = 1; strongrefflag = false; deleted = 0; visible = 1; orderx = ordery = 1; is_curved = true; } /* void Element2d :: SetType (ELEMENT_TYPE atyp) { typ = atyp; switch (typ) { case TRIG: np = 3; break; case QUAD: np = 4; break; case TRIG6: np = 6; break; case QUAD6: np = 6; break; default: PrintSysError ("Element2d::SetType, illegal type ", typ); } } */ void Element2d :: GetBox (const T_POINTS & points, Box3d & box) const { box.SetPoint (points.Get(pnum[0])); for (unsigned i = 1; i < np; i++) box.AddPoint (points.Get(pnum[i])); } bool Element2d :: operator==(const Element2d & el2) const { bool retval = (el2.GetNP() == np); for(int i= 0; retval && i ipdtrig; Array ipdquad; int Element2d :: GetNIP () const { int nip; switch (np) { case 3: nip = 1; break; case 4: nip = 4; break; default: nip = 0; break; } return nip; } void Element2d :: GetIntegrationPoint (int ip, Point2d & p, double & weight) const { static double eltriqp[1][3] = { { 1.0/3.0, 1.0/3.0, 0.5 } }; static double elquadqp[4][3] = { { 0, 0, 0.25 }, { 0, 1, 0.25 }, { 1, 0, 0.25 }, { 1, 1, 0.25 } }; double * pp = 0; switch (typ) { case TRIG: pp = &eltriqp[0][0]; break; case QUAD: pp = &elquadqp[ip-1][0]; break; default: PrintSysError ("Element2d::GetIntegrationPoint, illegal type ", int(typ)); } p.X() = pp[0]; p.Y() = pp[1]; weight = pp[2]; } void Element2d :: GetTransformation (int ip, const Array & points, DenseMatrix & trans) const { int np = GetNP(); DenseMatrix pmat(2, np), dshape(2, np); pmat.SetSize (2, np); dshape.SetSize (2, np); Point2d p; double w; GetPointMatrix (points, pmat); GetIntegrationPoint (ip, p, w); GetDShape (p, dshape); CalcABt (pmat, dshape, trans); /* (*testout) << "p = " << p << endl << "pmat = " << pmat << endl << "dshape = " << dshape << endl << "tans = " << trans << endl; */ } void Element2d :: GetTransformation (int ip, class DenseMatrix & pmat, class DenseMatrix & trans) const { // int np = GetNP(); #ifdef DEBUG if (pmat.Width() != np || pmat.Height() != 2) { (*testout) << "GetTransofrmation: pmat doesn't fit" << endl; return; } #endif ComputeIntegrationPointData (); DenseMatrix * dshapep = NULL; switch (typ) { case TRIG: dshapep = &ipdtrig.Get(ip)->dshape; break; case QUAD: dshapep = &ipdquad.Get(ip)->dshape; break; default: PrintSysError ("Element2d::GetTransformation, illegal type ", int(typ)); } CalcABt (pmat, *dshapep, trans); } void Element2d :: GetShape (const Point2d & p, Vector & shape) const { if (shape.Size() != GetNP()) { cerr << "Element::GetShape: Length not fitting" << endl; return; } switch (typ) { case TRIG: shape(0) = 1 - p.X() - p.Y(); shape(1) = p.X(); shape(2) = p.Y(); break; case QUAD: shape(0) = (1-p.X()) * (1-p.Y()); shape(1) = p.X() * (1-p.Y()); shape(2) = p.X() * p.Y(); shape(3) = (1-p.X()) * p.Y(); break; default: PrintSysError ("Element2d::GetShape, illegal type ", int(typ)); } } void Element2d :: GetShapeNew (const Point<2> & p, FlatVector & shape) const { switch (typ) { case TRIG: { shape(0) = p(0); shape(1) = p(1); shape(2) = 1-p(0)-p(1); break; } case QUAD: { shape(0) = (1-p(0))*(1-p(1)); shape(1) = p(0) *(1-p(1)); shape(2) = p(0) * p(1) ; shape(3) = (1-p(0))* p(1) ; break; } default: throw NgException ("illegal element type in GetShapeNew"); } } template void Element2d :: GetShapeNew (const Point<2,T> & p, TFlatVector shape) const { switch (typ) { case TRIG: { shape(0) = p(0); shape(1) = p(1); shape(2) = 1-p(0)-p(1); break; } case QUAD: { shape(0) = (1-p(0))*(1-p(1)); shape(1) = p(0) *(1-p(1)); shape(2) = p(0) * p(1) ; shape(3) = (1-p(0))* p(1) ; break; } default: throw NgException ("illegal element type in GetShapeNew"); } } void Element2d :: GetDShape (const Point2d & p, DenseMatrix & dshape) const { #ifdef DEBUG if (dshape.Height() != 2 || dshape.Width() != np) { PrintSysError ("Element::DShape: Sizes don't fit"); return; } #endif switch (typ) { case TRIG: dshape.Elem(1, 1) = -1; dshape.Elem(1, 2) = 1; dshape.Elem(1, 3) = 0; dshape.Elem(2, 1) = -1; dshape.Elem(2, 2) = 0; dshape.Elem(2, 3) = 1; break; case QUAD: dshape.Elem(1, 1) = -(1-p.Y()); dshape.Elem(1, 2) = (1-p.Y()); dshape.Elem(1, 3) = p.Y(); dshape.Elem(1, 4) = -p.Y(); dshape.Elem(2, 1) = -(1-p.X()); dshape.Elem(2, 2) = -p.X(); dshape.Elem(2, 3) = p.X(); dshape.Elem(2, 4) = (1-p.X()); break; default: PrintSysError ("Element2d::GetDShape, illegal type ", int(typ)); } } template void Element2d :: GetDShapeNew (const Point<2,T> & p, MatrixFixWidth<2,T> & dshape) const { switch (typ) { case TRIG: { dshape = T(0.0); dshape(0,0) = 1; dshape(1,1) = 1; dshape(2,0) = -1; dshape(2,1) = -1; break; } case QUAD: { dshape(0,0) = -(1-p(1)); dshape(0,1) = -(1-p(0)); dshape(1,0) = (1-p(1)); dshape(1,1) = -p(0); dshape(2,0) = p(1); dshape(2,1) = p(0); dshape(3,0) = -p(1); dshape(3,1) = (1-p(0)); break; } default: throw NgException ("illegal element type in GetDShapeNew"); } } void Element2d :: GetPointMatrix (const Array & points, DenseMatrix & pmat) const { int np = GetNP(); #ifdef DEBUG if (pmat.Width() != np || pmat.Height() != 2) { cerr << "Element::GetPointMatrix: sizes don't fit" << endl; return; } #endif for (int i = 1; i <= np; i++) { const Point2d & p = points.Get(PNum(i)); pmat.Elem(1, i) = p.X(); pmat.Elem(2, i) = p.Y(); } } double Element2d :: CalcJacobianBadness (const Array & points) const { int i, j; int nip = GetNIP(); DenseMatrix trans(2,2); DenseMatrix pmat; pmat.SetSize (2, GetNP()); GetPointMatrix (points, pmat); double err = 0; for (i = 1; i <= nip; i++) { GetTransformation (i, pmat, trans); // Frobenius norm double frob = 0; for (j = 1; j <= 4; j++) frob += sqr (trans.Get(j)); frob = sqrt (frob); frob /= 2; double det = trans.Det(); if (det <= 0) err += 1e12; else err += frob * frob / det; } err /= nip; return err; } static const int qip_table[4][4] = { { 0, 1, 0, 3 }, { 0, 1, 1, 2 }, { 3, 2, 0, 3 }, { 3, 2, 1, 2 } }; double Element2d :: CalcJacobianBadnessDirDeriv (const Array & points, int pi, Vec2d & dir, double & dd) const { if (typ == QUAD) { Mat<2,2> trans, dtrans; Mat<2,4> vmat, pmat; for (int j = 0; j < 4; j++) { const Point2d & p = points.Get( (*this)[j] ); pmat(0, j) = p.X(); pmat(1, j) = p.Y(); } vmat = 0.0; vmat(0, pi-1) = dir.X(); vmat(1, pi-1) = dir.Y(); double err = 0; dd = 0; for (int i = 0; i < 4; i++) { int ix1 = qip_table[i][0]; int ix2 = qip_table[i][1]; int iy1 = qip_table[i][2]; int iy2 = qip_table[i][3]; trans(0,0) = pmat(0, ix2) - pmat(0,ix1); trans(1,0) = pmat(1, ix2) - pmat(1,ix1); trans(0,1) = pmat(0, iy2) - pmat(0,iy1); trans(1,1) = pmat(1, iy2) - pmat(1,iy1); double det = trans(0,0)*trans(1,1)-trans(1,0)*trans(0,1); if (det <= 0) { dd = 0; return 1e12; } dtrans(0,0) = vmat(0, ix2) - vmat(0,ix1); dtrans(1,0) = vmat(1, ix2) - vmat(1,ix1); dtrans(0,1) = vmat(0, iy2) - vmat(0,iy1); dtrans(1,1) = vmat(1, iy2) - vmat(1,iy1); // Frobenius norm double frob = 0; for (int j = 0; j < 4; j++) frob += sqr (trans(j)); frob = sqrt (frob); double dfrob = 0; for (int j = 0; j < 4; j++) dfrob += trans(j) * dtrans(j); dfrob = dfrob / frob; frob /= 2; dfrob /= 2; // ddet = \sum_j det (m_j) with m_j = trans, except col j = dtrans double ddet = dtrans(0,0) * trans(1,1) - trans(0,1) * dtrans(1,0) + trans(0,0) * dtrans(1,1) - dtrans(0,1) * trans(1,0); err += frob * frob / det; dd += (2 * frob * dfrob * det - frob * frob * ddet) / (det * det); } err /= 4; dd /= 4; return err; } int nip = GetNIP(); DenseMatrix trans(2,2), dtrans(2,2); DenseMatrix pmat, vmat; pmat.SetSize (2, GetNP()); vmat.SetSize (2, GetNP()); GetPointMatrix (points, pmat); vmat = 0.0; vmat.Elem(1, pi) = dir.X(); vmat.Elem(2, pi) = dir.Y(); double err = 0; dd = 0; for (int i = 1; i <= nip; i++) { GetTransformation (i, pmat, trans); GetTransformation (i, vmat, dtrans); // Frobenius norm double frob = 0; for (int j = 1; j <= 4; j++) frob += sqr (trans.Get(j)); frob = sqrt (frob); double dfrob = 0; for (int j = 1; j <= 4; j++) dfrob += trans.Get(j) * dtrans.Get(j); dfrob = dfrob / frob; frob /= 2; dfrob /= 2; double det = trans(0,0)*trans(1,1)-trans(1,0)*trans(0,1); // ddet = \sum_j det (m_j) with m_j = trans, except col j = dtrans double ddet = dtrans(0,0) * trans(1,1) - trans(0,1) * dtrans(1,0) + trans(0,0) * dtrans(1,1) - dtrans(0,1) * trans(1,0); if (det <= 0) err += 1e12; else { err += frob * frob / det; dd += (2 * frob * dfrob * det - frob * frob * ddet) / (det * det); } } err /= nip; dd /= nip; return err; } double Element2d :: CalcJacobianBadness (const T_POINTS & points, const Vec<3> & n) const { int i, j; int nip = GetNIP(); DenseMatrix trans(2,2); DenseMatrix pmat; pmat.SetSize (2, GetNP()); Vec<3> t1, t2; t1 = n.GetNormal(); t2 = Cross (n, t1); for (i = 1; i <= GetNP(); i++) { Point3d p = points.Get(PNum(i)); pmat.Elem(1, i) = p.X() * t1(0) + p.Y() * t1(1) + p.Z() * t1(2); pmat.Elem(2, i) = p.X() * t2(0) + p.Y() * t2(1) + p.Z() * t2(2); } double err = 0; for (i = 1; i <= nip; i++) { GetTransformation (i, pmat, trans); // Frobenius norm double frob = 0; for (j = 1; j <= 4; j++) frob += sqr (trans.Get(j)); frob = sqrt (frob); frob /= 2; double det = trans.Det(); if (det <= 0) err += 1e12; else err += frob * frob / det; } err /= nip; return err; } void Element2d :: ComputeIntegrationPointData () const { switch (np) { case 3: if (ipdtrig.Size()) return; break; case 4: if (ipdquad.Size()) return; break; } for (int i = 1; i <= GetNIP(); i++) { IntegrationPointData * ipd = new IntegrationPointData; Point2d hp; GetIntegrationPoint (i, hp, ipd->weight); ipd->p(0) = hp.X(); ipd->p(1) = hp.Y(); ipd->p(2) = 0; ipd->shape.SetSize(GetNP()); ipd->dshape.SetSize(2, GetNP()); GetShape (hp, ipd->shape); GetDShape (hp, ipd->dshape); switch (np) { case 3: ipdtrig.Append (ipd); break; case 4: ipdquad.Append (ipd); break; } } } ostream & operator<<(ostream & s, const Element0d & el) { s << el.pnum << ", index = " << el.index; return s; } ostream & operator<<(ostream & s, const Element2d & el) { s << "np = " << el.GetNP(); for (int j = 1; j <= el.GetNP(); j++) s << " " << el.PNum(j); return s; } ostream & operator<<(ostream & s, const Element & el) { s << "np = " << el.GetNP(); for (int j = 0; j < el.GetNP(); j++) s << " " << int(el[j]); return s; } /* Element :: Element () { typ = TET; np = 4; for (int i = 0; i < ELEMENT_MAXPOINTS; i++) pnum[i] = 0; index = 0; flags.marked = 1; flags.badel = 0; flags.reverse = 0; flags.illegal = 0; flags.illegal_valid = 0; flags.badness_valid = 0; flags.refflag = 1; flags.strongrefflag = false; flags.deleted = 0; flags.fixed = 0; orderx = ordery = orderz = 1; is_curved = false; #ifdef PARALLEL partitionNumber = -1; #endif } */ Element :: Element (int anp) { np = anp; int i; for (i = 0; i < ELEMENT_MAXPOINTS; i++) pnum[i] = 0; index = 0; flags.marked = 1; flags.badel = 0; flags.reverse = 0; flags.illegal = 0; flags.illegal_valid = 0; flags.badness_valid = 0; flags.refflag = 1; flags.strongrefflag = false; flags.deleted = 0; flags.fixed = 0; switch (np) { case 4: typ = TET; break; case 5: typ = PYRAMID; break; case 6: typ = PRISM; break; case 8: typ = HEX; break; case 10: typ = TET10; break; default: cerr << "Element::Element: unknown element with " << np << " points" << endl; } orderx = ordery = orderz = 1; is_curved = typ != TET; // false; } void Element :: SetOrder (const int aorder) { orderx = aorder; ordery = aorder; orderz = aorder; } void Element :: SetOrder (const int ox, const int oy, const int oz) { orderx = ox; ordery = oy; orderz = oz; } Element :: Element (ELEMENT_TYPE type) { SetType (type); int i; for (i = 0; i < ELEMENT_MAXPOINTS; i++) pnum[i] = 0; index = 0; flags.marked = 1; flags.badel = 0; flags.reverse = 0; flags.illegal = 0; flags.illegal_valid = 0; flags.badness_valid = 0; flags.refflag = 1; flags.strongrefflag = false; flags.deleted = 0; flags.fixed = 0; orderx = ordery = orderz = 1; is_curved = typ != TET; // false; #ifdef PARALLEL partitionNumber = -1; #endif } /* Element & Element :: operator= (const Element & el2) { typ = el2.typ; np = el2.np; for (int i = 0; i < ELEMENT_MAXPOINTS; i++) pnum[i] = el2.pnum[i]; index = el2.index; flags = el2.flags; orderx = el2.orderx; ordery = el2.ordery; orderz = el2.orderz; hp_elnr = el2.hp_elnr; flags = el2.flags; is_curved = el2.is_curved; return *this; } */ void Element :: SetNP (int anp) { np = anp; switch (np) { case 4: typ = TET; break; case 5: typ = PYRAMID; break; case 6: typ = PRISM; break; case 8: typ = HEX; break; case 10: typ = TET10; break; // default: break; cerr << "Element::SetNP unknown element with " << np << " points" << endl; } } void Element :: SetType (ELEMENT_TYPE atyp) { typ = atyp; switch (atyp) { case TET: np = 4; break; case PYRAMID: np = 5; break; case PRISM: np = 6; break; case HEX: np = 8; break; case TET10: np = 10; break; case PRISM12: np = 12; break; default: break; cerr << "Element::SetType unknown type " << int(typ) << endl; } } void Element :: Invert() { switch (GetNP()) { case 4: { Swap (PNum(3), PNum(4)); break; } case 5: { Swap (PNum(1), PNum(4)); Swap (PNum(2), PNum(3)); break; } case 6: { Swap (PNum(1), PNum(4)); Swap (PNum(2), PNum(5)); Swap (PNum(3), PNum(6)); break; } } } void Element :: Print (ostream & ost) const { ost << np << " Points: "; for (int i = 1; i <= np; i++) ost << pnum[i-1] << " " << endl; } void Element :: GetBox (const T_POINTS & points, Box3d & box) const { box.SetPoint (points.Get(PNum(1))); box.AddPoint (points.Get(PNum(2))); box.AddPoint (points.Get(PNum(3))); box.AddPoint (points.Get(PNum(4))); } double Element :: Volume (const T_POINTS & points) const { Vec<3> v1 = points.Get(PNum(2)) - points.Get(PNum(1)); Vec<3> v2 = points.Get(PNum(3)) - points.Get(PNum(1)); Vec<3> v3 = points.Get(PNum(4)) - points.Get(PNum(1)); return -(Cross (v1, v2) * v3) / 6; } void Element :: GetFace2 (int i, Element2d & face) const { static const int tetfaces[][5] = { { 3, 2, 3, 4, 0 }, { 3, 3, 1, 4, 0 }, { 3, 1, 2, 4, 0 }, { 3, 2, 1, 3, 0 } }; static const int tet10faces[][7] = { { 3, 2, 3, 4, 10, 9, 8 }, { 3, 3, 1, 4, 7, 10, 6 }, { 3, 1, 2, 4, 9, 7, 5 }, { 3, 2, 1, 3, 6, 8, 5 } }; static const int pyramidfaces[][5] = { { 4, 1, 4, 3, 2 }, { 3, 1, 2, 5, 0 }, { 3, 2, 3, 5, 0 }, { 3, 3, 4, 5, 0 }, { 3, 4, 1, 5, 0 } }; static const int prismfaces[][5] = { { 3, 1, 3, 2, 0 }, { 3, 4, 5, 6, 0 }, { 4, 1, 2, 5, 4 }, { 4, 2, 3, 6, 5 }, { 4, 3, 1, 4, 6 } }; static const int hexfaces[][5] = { { 4, 4, 3, 2, 1 }, { 4, 3, 7, 6, 2 }, { 4, 7, 8, 5, 6 }, { 4, 8, 4, 1, 5 }, { 4, 1, 2, 6, 5 }, { 4, 3, 4, 8, 7 } }; switch (np) { case 4: // tet { face.SetType(TRIG); for (int j = 1; j <= 3; j++) face.PNum(j) = PNum(tetfaces[i-1][j]); break; } case 10: // tet10 { face.SetType(TRIG6); for (int j = 1; j <= 6; j++) face.PNum(j) = PNum(tet10faces[i-1][j]); break; } case 5: // pyramid { // face.SetNP(pyramidfaces[i-1][0]); face.SetType ( (i == 1) ? QUAD : TRIG); for (int j = 1; j <= face.GetNP(); j++) face.PNum(j) = PNum(pyramidfaces[i-1][j]); break; } case 6: // prism { // face.SetNP(prismfaces[i-1][0]); face.SetType ( (i >= 3) ? QUAD : TRIG); for (int j = 1; j <= face.GetNP(); j++) face.PNum(j) = PNum(prismfaces[i-1][j]); break; } case 8: { face.SetType(QUAD); for (int j = 1; j <= 4; j++) face.PNum(j) = PNum(hexfaces[i-1][j]); break; } } } void Element :: GetTets (Array & locels) const { GetTetsLocal (locels); int i, j; for (i = 1; i <= locels.Size(); i++) for (j = 1; j <= 4; j++) locels.Elem(i).PNum(j) = PNum ( locels.Elem(i).PNum(j) ); } void Element :: GetTetsLocal (Array & locels) const { int i, j; locels.SetSize(0); switch (GetType()) { case TET: { int linels[1][4] = { { 1, 2, 3, 4 }, }; for (i = 0; i < 1; i++) { Element tet(4); for (j = 1; j <= 4; j++) tet.PNum(j) = linels[i][j-1]; locels.Append (tet); } break; } case TET10: { int linels[8][4] = { { 1, 5, 6, 7 }, { 5, 2, 8, 9 }, { 6, 8, 3, 10 }, { 7, 9, 10, 4 }, { 5, 6, 7, 9 }, { 5, 6, 9, 8 }, { 6, 7, 9, 10 }, { 6, 8, 10, 9 } }; for (i = 0; i < 8; i++) { Element tet(4); for (j = 1; j <= 4; j++) tet.PNum(j) = linels[i][j-1]; locels.Append (tet); } break; } case PYRAMID: { int linels[2][4] = { { 1, 2, 3, 5 }, { 1, 3, 4, 5 } }; for (i = 0; i < 2; i++) { Element tet(4); for (j = 1; j <= 4; j++) tet.PNum(j) = linels[i][j-1]; locels.Append (tet); } break; } case PRISM: case PRISM12: { int linels[3][4] = { { 1, 2, 3, 4 }, { 4, 2, 3, 5 }, { 6, 5, 4, 3 } }; for (i = 0; i < 3; i++) { Element tet(4); for (j = 0; j < 4; j++) tet[j] = linels[i][j]; locels.Append (tet); } break; } case HEX: { int linels[6][4] = { { 1, 7, 2, 3 }, { 1, 7, 3, 4 }, { 1, 7, 4, 8 }, { 1, 7, 8, 5 }, { 1, 7, 5, 6 }, { 1, 7, 6, 2 } }; for (i = 0; i < 6; i++) { Element tet(4); for (j = 0; j < 4; j++) tet[j] = linels[i][j]; locels.Append (tet); } break; } default: { cerr << "GetTetsLocal not implemented for el with " << GetNP() << " nodes" << endl; } } } bool Element :: operator==(const Element & el2) const { bool retval = (el2.GetNP() == np); for(int i= 0; retval && i & points) const { const static double tetpoints[4][3] = { { 0, 0, 0 }, { 1, 0, 0 }, { 0, 1, 0 }, { 0, 0, 1 }}; const static double prismpoints[6][3] = { { 0, 0, 0 }, { 1, 0, 0 }, { 0, 1, 0 }, { 0, 0, 1 }, { 1, 0, 1 }, { 0, 1, 1 } }; const static double pyramidpoints[6][3] = { { 0, 0, 0 }, { 1, 0, 0 }, { 1, 1, 0 }, { 0, 1, 0 }, { 0, 0, 1 } }; const static double tet10points[10][3] = { { 0, 0, 0 }, { 1, 0, 0 }, { 0, 1, 0 }, { 0, 0, 1 }, { 0.5, 0, 0 }, { 0, 0.5, 0 }, { 0, 0, 0.5 }, { 0.5, 0.5, 0 }, { 0.5, 0, 0.5 }, { 0, 0.5, 0.5 } }; const static double hexpoints[8][3] = { { 0, 0, 0 }, { 1, 0, 0 }, { 1, 1, 0 }, { 0, 1, 0 }, { 0, 0, 1 }, { 1, 0, 1 }, { 1, 1, 1 }, { 0, 1, 1 } }; int np, i; const double (*pp)[3]; switch (GetType()) { case TET: { np = 4; pp = tetpoints; break; } case PRISM: case PRISM12: { np = 6; pp = prismpoints; break; } case TET10: { np = 10; pp = tet10points; break; } case PYRAMID: { np = 5; pp = pyramidpoints; break; } case HEX: { np = 8; pp = hexpoints; break; } default: { cout << "GetNodesLocal not impelemented for element " << GetType() << endl; np = 0; } } points.SetSize(0); for (i = 0; i < np; i++) points.Append (Point3d (pp[i][0], pp[i][1], pp[i][2])); } #endif void Element :: GetNodesLocalNew (Array > & points) const { const static double tetpoints[4][3] = { { 1, 0, 0 }, { 0, 1, 0 }, { 0, 0, 1 }, { 0, 0, 0 } }; const static double prismpoints[6][3] = { { 1, 0, 0 }, { 0, 1, 0 }, { 0, 0, 0 }, { 1, 0, 1 }, { 0, 1, 1 }, { 0, 0, 1 } }; const static double pyramidpoints[6][3] = { { 0, 0, 0 }, { 1, 0, 0 }, { 1, 1, 0 }, { 0, 1, 0 }, { 0, 0, 1 } }; const static double tet10points[10][3] = { { 0, 0, 0 }, { 1, 0, 0 }, { 0, 1, 0 }, { 0, 0, 1 }, { 0.5, 0, 0 }, { 0, 0.5, 0 }, { 0, 0, 0.5 }, { 0.5, 0.5, 0 }, { 0.5, 0, 0.5 }, { 0, 0.5, 0.5 } }; const static double hexpoints[8][3] = { { 0, 0, 0 }, { 1, 0, 0 }, { 1, 1, 0 }, { 0, 1, 0 }, { 0, 0, 1 }, { 1, 0, 1 }, { 1, 1, 1 }, { 0, 1, 1 } }; int np, i; const double (*pp)[3]; switch (GetType()) { case TET: { np = 4; pp = tetpoints; break; } case PRISM: case PRISM12: { np = 6; pp = prismpoints; break; } case TET10: { np = 10; pp = tet10points; break; } case PYRAMID: { np = 5; pp = pyramidpoints; break; } case HEX: { np = 8; pp = hexpoints; break; } default: { cout << "GetNodesLocal not impelemented for element " << GetType() << endl; np = 0; pp = NULL; } } points.SetSize(0); for (i = 0; i < np; i++) points.Append (Point<3> (pp[i][0], pp[i][1], pp[i][2])); } void Element :: GetSurfaceTriangles (Array & surftrigs) const { static int tet4trigs[][3] = { { 2, 3, 4 }, { 3, 1, 4 }, { 1, 2, 4 }, { 2, 1, 3 } }; static int tet10trigs[][3] = { { 2, 8, 9 }, { 3, 10, 8}, { 4, 9, 10 }, { 9, 8, 10 }, { 3, 6, 10 }, { 1, 7, 6 }, { 4, 10, 7 }, { 6, 7, 10 }, { 1, 5, 7 }, { 2, 9, 5 }, { 4, 7, 9 }, { 5, 9, 7 }, { 1, 6, 5 }, { 2, 5, 8 }, { 3, 8, 6 }, { 5, 6, 8 } }; static int pyramidtrigs[][3] = { { 1, 3, 2 }, { 1, 4, 3 }, { 1, 2, 5 }, { 2, 3, 5 }, { 3, 4, 5 }, { 4, 1, 5 } }; static int prismtrigs[][3] = { { 1, 3, 2 }, { 4, 5, 6 }, { 1, 2, 4 }, { 4, 2, 5 }, { 2, 3, 5 }, { 5, 3, 6 }, { 3, 1, 6 }, { 6, 1, 4 } }; static int hextrigs[][3] = { { 1, 3, 2 }, { 1, 4, 3 }, { 5, 6, 7 }, { 5, 7, 8 }, { 1, 2, 6 }, { 1, 6, 5 }, { 2, 3, 7 }, { 2, 7, 6 }, { 3, 4, 8 }, { 3, 8, 7 }, { 4, 1, 8 }, { 1, 5, 8 } }; int j; int nf; int (*fp)[3]; switch (GetType()) { case TET: { nf = 4; fp = tet4trigs; break; } case PYRAMID: { nf = 6; fp = pyramidtrigs; break; } case PRISM: case PRISM12: { nf = 8; fp = prismtrigs; break; } case TET10: { nf = 16; fp = tet10trigs; break; } case HEX: { nf = 12; fp = hextrigs; break; } default: { nf = 0; fp = NULL; } } surftrigs.SetSize (nf); for (j = 0; j < nf; j++) { surftrigs.Elem(j+1) = Element2d(TRIG); surftrigs.Elem(j+1).PNum(1) = fp[j][0]; surftrigs.Elem(j+1).PNum(2) = fp[j][1]; surftrigs.Elem(j+1).PNum(3) = fp[j][2]; } } Array< shared_ptr < IntegrationPointData > > ipdtet; Array< shared_ptr < IntegrationPointData > > ipdtet10; int Element :: GetNIP () const { int nip; switch (typ) { case TET: nip = 1; break; case TET10: nip = 8; break; default: nip = 0; break; } return nip; } void Element :: GetIntegrationPoint (int ip, Point<3> & p, double & weight) const { static double eltetqp[1][4] = { { 0.25, 0.25, 0.25, 1.0/6.0 } }; static double eltet10qp[8][4] = { { 0.585410196624969, 0.138196601125011, 0.138196601125011, 1.0/24.0 }, { 0.138196601125011, 0.585410196624969, 0.138196601125011, 1.0/24.0 }, { 0.138196601125011, 0.138196601125011, 0.585410196624969, 1.0/24.0 }, { 0.138196601125011, 0.138196601125011, 0.138196601125011, 1.0/24.0 }, { 1, 0, 0, 1 }, { 0, 1, 0, 1 }, { 0, 0, 1, 1 }, { 0, 0, 0, 1 }, }; double * pp = NULL; switch (typ) { case TET: pp = &eltetqp[0][0]; break; case TET10: pp = &eltet10qp[ip-1][0]; break; default: throw NgException ("illegal element shape in GetIntegrationPoint"); } p(0) = pp[0]; p(1) = pp[1]; p(2) = pp[2]; weight = pp[3]; } void Element :: GetTransformation (int ip, const T_POINTS & points, DenseMatrix & trans) const { int np = GetNP(); DenseMatrix pmat(3, np), dshape(3, np); pmat.SetSize (3, np); dshape.SetSize (3, np); Point<3> p; double w; GetPointMatrix (points, pmat); GetIntegrationPoint (ip, p, w); GetDShape (p, dshape); CalcABt (pmat, dshape, trans); /* (*testout) << "p = " << p << endl << "pmat = " << pmat << endl << "dshape = " << dshape << endl << "tans = " << trans << endl; */ } void Element :: GetTransformation (int ip, class DenseMatrix & pmat, class DenseMatrix & trans) const { int np = GetNP(); if (pmat.Width() != np || pmat.Height() != 3) { (*testout) << "GetTransofrmation: pmat doesn't fit" << endl; return; } ComputeIntegrationPointData (); DenseMatrix * dshapep = 0; switch (GetType()) { case TET: dshapep = &ipdtet.Get(ip)->dshape; break; case TET10: dshapep = &ipdtet10.Get(ip)->dshape; break; default: PrintSysError ("Element::GetTransformation, illegal type ", int(typ)); } CalcABt (pmat, *dshapep, trans); } void Element :: GetShape (const Point<3> & hp, Vector & shape) const { Point3d p = hp; if (shape.Size() != GetNP()) { cerr << "Element::GetShape: Length not fitting" << endl; return; } switch (typ) { case TET: { shape(0) = 1 - p.X() - p.Y() - p.Z(); shape(1) = p.X(); shape(2) = p.Y(); shape(3) = p.Z(); break; } case TET10: { double lam1 = 1 - p.X() - p.Y() - p.Z(); double lam2 = p.X(); double lam3 = p.Y(); double lam4 = p.Z(); shape(4) = 4 * lam1 * lam2; shape(5) = 4 * lam1 * lam3; shape(6) = 4 * lam1 * lam4; shape(7) = 4 * lam2 * lam3; shape(8) = 4 * lam2 * lam4; shape(9) = 4 * lam3 * lam4; shape(0) = lam1 - 0.5 * (shape(4) + shape(5) + shape(6)); shape(1) = lam2 - 0.5 * (shape(4) + shape(7) + shape(8)); shape(2) = lam3 - 0.5 * (shape(5) + shape(7) + shape(9)); shape(3) = lam4 - 0.5 * (shape(6) + shape(8) + shape(9)); break; } case PRISM: { Point<3> hp = p; shape(0) = hp(0) * (1-hp(2)); shape(1) = hp(1) * (1-hp(2)); shape(2) = (1-hp(0)-hp(1)) * (1-hp(2)); shape(3) = hp(0) * hp(2); shape(4) = hp(1) * hp(2); shape(5) = (1-hp(0)-hp(1)) * hp(2); break; } case HEX: { Point<3> hp = p; shape(0) = (1-hp(0))*(1-hp(1))*(1-hp(2)); shape(1) = ( hp(0))*(1-hp(1))*(1-hp(2)); shape(2) = ( hp(0))*( hp(1))*(1-hp(2)); shape(3) = (1-hp(0))*( hp(1))*(1-hp(2)); shape(4) = (1-hp(0))*(1-hp(1))*( hp(2)); shape(5) = ( hp(0))*(1-hp(1))*( hp(2)); shape(6) = ( hp(0))*( hp(1))*( hp(2)); shape(7) = (1-hp(0))*( hp(1))*( hp(2)); break; } default: throw NgException("Element :: GetShape not implemented for that element"); } } template void Element :: GetShapeNew (const Point<3,T> & p, TFlatVector shape) const { /* if (shape.Size() < GetNP()) { cerr << "Element::GetShape: Length not fitting" << endl; return; } */ switch (typ) { case TET: { shape(0) = p(0); shape(1) = p(1); shape(2) = p(2); shape(3) = 1-p(0)-p(1)-p(2); break; } case TET10: { T lam1 = p(0); T lam2 = p(1); T lam3 = p(2); T lam4 = 1-p(0)-p(1)-p(2); shape(0) = 2 * lam1 * (lam1-0.5); shape(1) = 2 * lam2 * (lam2-0.5); shape(2) = 2 * lam3 * (lam3-0.5); shape(3) = 2 * lam4 * (lam4-0.5); shape(4) = 4 * lam1 * lam2; shape(5) = 4 * lam1 * lam3; shape(6) = 4 * lam1 * lam4; shape(7) = 4 * lam2 * lam3; shape(8) = 4 * lam2 * lam4; shape(9) = 4 * lam3 * lam4; break; } case PYRAMID: { T noz = 1-p(2); // if (noz == 0.0) noz = 1e-10; noz += T(1e-12); T xi = p(0) / noz; T eta = p(1) / noz; shape(0) = (1-xi)*(1-eta) * (noz); shape(1) = ( xi)*(1-eta) * (noz); shape(2) = ( xi)*( eta) * (noz); shape(3) = (1-xi)*( eta) * (noz); shape(4) = p(2); break; } case PRISM: { shape(0) = p(0) * (1-p(2)); shape(1) = p(1) * (1-p(2)); shape(2) = (1-p(0)-p(1)) * (1-p(2)); shape(3) = p(0) * p(2); shape(4) = p(1) * p(2); shape(5) = (1-p(0)-p(1)) * p(2); break; } case HEX: { shape(0) = (1-p(0))*(1-p(1))*(1-p(2)); shape(1) = ( p(0))*(1-p(1))*(1-p(2)); shape(2) = ( p(0))*( p(1))*(1-p(2)); shape(3) = (1-p(0))*( p(1))*(1-p(2)); shape(4) = (1-p(0))*(1-p(1))*( p(2)); shape(5) = ( p(0))*(1-p(1))*( p(2)); shape(6) = ( p(0))*( p(1))*( p(2)); shape(7) = (1-p(0))*( p(1))*( p(2)); break; } default: throw NgException("Element :: GetNewShape not implemented for that element"); } } void Element :: GetDShape (const Point<3> & hp, DenseMatrix & dshape) const { Point3d p = hp; int np = GetNP(); if (dshape.Height() != 3 || dshape.Width() != np) { cerr << "Element::DShape: Sizes don't fit" << endl; return; } double eps = 1e-6; Vector shaper(np), shapel(np); for (int i = 1; i <= 3; i++) { Point3d pr(p), pl(p); pr.X(i) += eps; pl.X(i) -= eps; GetShape (pr, shaper); GetShape (pl, shapel); for (int j = 0; j < np; j++) dshape(i-1, j) = (shaper(j) - shapel(j)) / (2 * eps); } } template void Element :: GetDShapeNew (const Point<3,T> & p, MatrixFixWidth<3,T> & dshape) const { switch (typ) { case TET: { dshape = T(0.0); dshape(0,0) = 1; dshape(1,1) = 1; dshape(2,2) = 1; dshape(3,0) = -1; dshape(3,1) = -1; dshape(3,2) = -1; break; } case PRISM: { dshape = T(0.0); dshape(0,0) = 1-p(2); dshape(0,2) = -p(0); dshape(1,1) = 1-p(2); dshape(1,2) = -p(1); dshape(2,0) = -(1-p(2)); dshape(2,1) = -(1-p(2)); dshape(2,2) = -(1-p(0)-p(1)); dshape(3,0) = p(2); dshape(3,2) = p(0); dshape(4,1) = p(2); dshape(4,2) = p(1); dshape(5,0) = -p(2); dshape(5,1) = -p(2); dshape(5,2) = 1-p(0)-p(1); break; } default: { int np = GetNP(); double eps = 1e-6; ArrayMem mem(2*np); TFlatVector shaper(np, &mem[0]); TFlatVector shapel(np, &mem[np]); // Vector shaper(np), shapel(np); for (int i = 0; i < 3; i++) { Point<3,T> pr(p), pl(p); pr(i) += eps; pl(i) -= eps; GetShapeNew (pr, shaper); GetShapeNew (pl, shapel); for (int j = 0; j < np; j++) dshape(j, i) = (shaper(j) - shapel(j)) / (2 * eps); } } } } template void Element2d :: GetShapeNew (const Point<2,double> & p, TFlatVector shape) const; template void Element2d :: GetShapeNew (const Point<2,SIMD> & p, TFlatVector> shape) const; template void Element2d::GetDShapeNew (const Point<2> &, MatrixFixWidth<2> &) const; template void Element2d::GetDShapeNew> (const Point<2,SIMD> &, MatrixFixWidth<2,SIMD> &) const; template void Element :: GetShapeNew (const Point<3,double> & p, TFlatVector shape) const; template void Element :: GetShapeNew (const Point<3,SIMD> & p, TFlatVector> shape) const; template void Element::GetDShapeNew (const Point<3> &, MatrixFixWidth<3> &) const; template void Element::GetDShapeNew> (const Point<3,SIMD> &, MatrixFixWidth<3,SIMD> &) const; void Element :: GetPointMatrix (const T_POINTS & points, DenseMatrix & pmat) const { int np = GetNP(); for (int i = 1; i <= np; i++) { const Point3d & p = points.Get(PNum(i)); pmat.Elem(1, i) = p.X(); pmat.Elem(2, i) = p.Y(); pmat.Elem(3, i) = p.Z(); } } double Element :: CalcJacobianBadness (const T_POINTS & points) const { int nip = GetNIP(); DenseMatrix trans(3,3); DenseMatrix pmat; pmat.SetSize (3, GetNP()); GetPointMatrix (points, pmat); double err = 0; for (int i = 1; i <= nip; i++) { GetTransformation (i, pmat, trans); // Frobenius norm double frob = 0; for (int j = 1; j <= 9; j++) frob += sqr (trans.Get(j)); frob = sqrt (frob); frob /= 3; double det = -trans.Det(); if (det <= 0) err += 1e12; else err += frob * frob * frob / det; } err /= nip; return err; } double Element :: CalcJacobianBadnessDirDeriv (const T_POINTS & points, int pi, Vec<3> & dir, double & dd) const { int i, j, k; int nip = GetNIP(); DenseMatrix trans(3,3), dtrans(3,3), hmat(3,3); DenseMatrix pmat, vmat; pmat.SetSize (3, GetNP()); vmat.SetSize (3, GetNP()); GetPointMatrix (points, pmat); for (i = 1; i <= np; i++) for (j = 1; j <= 3; j++) vmat.Elem(j, i) = 0; for (j = 1; j <= 3; j++) vmat.Elem(j, pi) = dir(j-1); double err = 0; dd = 0; for (i = 1; i <= nip; i++) { GetTransformation (i, pmat, trans); GetTransformation (i, vmat, dtrans); // Frobenius norm double frob = 0; for (j = 1; j <= 9; j++) frob += sqr (trans.Get(j)); frob = sqrt (frob); double dfrob = 0; for (j = 1; j <= 9; j++) dfrob += trans.Get(j) * dtrans.Get(j); dfrob = dfrob / frob; frob /= 3; dfrob /= 3; double det = trans.Det(); double ddet = 0; for (j = 1; j <= 3; j++) { hmat = trans; for (k = 1; k <= 3; k++) hmat.Elem(k, j) = dtrans.Get(k, j); ddet += hmat.Det(); } det *= -1; ddet *= -1; if (det <= 0) err += 1e12; else { err += frob * frob * frob / det; dd += (3 * frob * frob * dfrob * det - frob * frob * frob * ddet) / (det * det); } } err /= nip; dd /= nip; return err; } double Element :: CalcJacobianBadnessGradient (const T_POINTS & points, int pi, Vec<3> & grad) const { int nip = GetNIP(); DenseMatrix trans(3,3), dtrans(3,3), hmat(3,3); DenseMatrix pmat, vmat; pmat.SetSize (3, GetNP()); vmat.SetSize (3, GetNP()); GetPointMatrix (points, pmat); for (int i = 1; i <= np; i++) for (int j = 1; j <= 3; j++) vmat.Elem(j, i) = 0; for (int j = 1; j <= 3; j++) vmat.Elem(j, pi) = 1.; double err = 0; double dfrob[3]; grad = 0; for (int i = 1; i <= nip; i++) { GetTransformation (i, pmat, trans); GetTransformation (i, vmat, dtrans); // Frobenius norm double frob = 0; for (int j = 1; j <= 9; j++) frob += sqr (trans.Get(j)); frob = sqrt (frob); for(int k = 0; k<3; k++) { dfrob[k] = 0; for (int j = 1; j <= 3; j++) dfrob[k] += trans.Get(k+1,j) * dtrans.Get(k+1,j); dfrob[k] = dfrob[k] / (3.*frob); } frob /= 3; double det = trans.Det(); double ddet[3]; // = 0; for(int k=1; k<=3; k++) { int km1 = (k > 1) ? (k-1) : 3; int kp1 = (k < 3) ? (k+1) : 1; ddet[k-1] = 0; for(int j=1; j<=3; j++) { int jm1 = (j > 1) ? (j-1) : 3; int jp1 = (j < 3) ? (j+1) : 1; ddet[k-1] += (-1.)* dtrans.Get(k,j) * ( trans.Get(km1,jm1)*trans.Get(kp1,jp1) - trans.Get(km1,jp1)*trans.Get(kp1,jm1) ); } } det *= -1; if (det <= 0) err += 1e12; else { err += frob * frob * frob / det; double fac = (frob * frob)/(det * det); for(int j=0; j<3; j++) grad(j) += fac * (3 * dfrob[j] * det - frob * ddet[j]); } } err /= nip; grad *= 1./nip; return err; } void Element :: ComputeIntegrationPointData () const { switch (GetType()) { case TET: if (ipdtet.Size()) return; break; case TET10: if (ipdtet10.Size()) return; break; default: PrintSysError ("Element::ComputeIntegrationPoint, illegal type ", int(typ)); } switch (GetType()) { case TET: ipdtet.SetSize(GetNIP()); break; case TET10: ipdtet10.SetSize(GetNIP()); break; default: PrintSysError ("Element::ComputeIntegrationPoint, illegal type2 ", int(typ)); } for (int i = 1; i <= GetNIP(); i++) { IntegrationPointData * ipd = new IntegrationPointData; GetIntegrationPoint (i, ipd->p, ipd->weight); ipd->shape.SetSize(GetNP()); ipd->dshape.SetSize(3, GetNP()); GetShape (ipd->p, ipd->shape); GetDShape (ipd->p, ipd->dshape); switch (GetType()) { case TET: ipdtet.Elem(i).reset(ipd); break; case TET10: ipdtet10.Elem(i).reset(ipd); break; default: PrintSysError ("Element::ComputeIntegrationPoint(2), illegal type ", int(typ)); } } } FaceDescriptor :: FaceDescriptor() { surfnr = domin = domout = bcprop = 0; domin_singular = domout_singular = 0.; // Philippose - 06/07/2009 // Initialise surface colour surfcolour = Vec3d(0.0,1.0,0.0); tlosurf = -1; // bcname = 0; firstelement = -1; } FaceDescriptor :: FaceDescriptor(const FaceDescriptor& other) : surfnr(other.surfnr), domin(other.domin), domout(other.domout), tlosurf(other.tlosurf), bcprop(other.bcprop), surfcolour(other.surfcolour), bcname(other.bcname), domin_singular(other.domin_singular), domout_singular(other.domout_singular) { firstelement = -1; } FaceDescriptor :: FaceDescriptor(int surfnri, int domini, int domouti, int tlosurfi) { surfnr = surfnri; domin = domini; domout = domouti; // Philippose - 06/07/2009 // Initialise surface colour surfcolour = Vec3d(0.0,1.0,0.0); tlosurf = tlosurfi; bcprop = surfnri; domin_singular = domout_singular = 0.; // bcname = 0; firstelement = -1; } FaceDescriptor :: FaceDescriptor(const Segment & seg) { surfnr = seg.si; domin = seg.domin+1; domout = seg.domout+1; // Philippose - 06/07/2009 // Initialise surface colour surfcolour = Vec3d(0.0,1.0,0.0); tlosurf = seg.tlosurf+1; bcprop = 0; domin_singular = domout_singular = 0.; // bcname = 0; firstelement = -1; } int FaceDescriptor :: SegmentFits (const Segment & seg) { return surfnr == seg.si && domin == seg.domin+1 && domout == seg.domout+1 && tlosurf == seg.tlosurf+1; } string FaceDescriptor :: default_bcname = "default"; /* const string & FaceDescriptor :: GetBCName () const { static string defaultstring = "default"; if (bcname) return *bcname; return defaultstring; } */ void FaceDescriptor :: SetBCName (string * bcn) { if (bcn) bcname = bcn; else bcn = &default_bcname; } ngstd::Archive & FaceDescriptor :: DoArchive (ngstd::Archive & ar) { return ar & surfnr & domin & domout & tlosurf & bcprop & surfcolour.X() & surfcolour.Y() & surfcolour.Z() & bcname & domin_singular & domout_singular ; // don't need: firstelement } ostream & operator<<(ostream & s, const FaceDescriptor & fd) { s << "surfnr = " << fd.SurfNr() << ", domin = " << fd.DomainIn() << ", domout = " << fd.DomainOut() << ", tlosurf = " << fd.TLOSurface() << ", bcprop = " << fd.BCProperty() << ", bcname = " << fd.GetBCName() << ", domin_sing = " << fd.DomainInSingular() << ", domout_sing = " << fd.DomainOutSingular() << ", colour = " << fd.SurfColour(); return s; } Identifications :: Identifications (Mesh & amesh) : mesh(amesh), identifiedpoints(100), identifiedpoints_nr(100) { // identifiedpoints = new INDEX_2_HASHTABLE(100); // identifiedpoints_nr = new INDEX_3_HASHTABLE(100); maxidentnr = 0; } Identifications :: ~Identifications () { ; // delete identifiedpoints; // delete identifiedpoints_nr; } void Identifications :: Delete () { identifiedpoints.DeleteData(); identifiedpoints_nr.DeleteData(); /* delete identifiedpoints; identifiedpoints = new INDEX_2_HASHTABLE(100); delete identifiedpoints_nr; identifiedpoints_nr = new INDEX_3_HASHTABLE(100); */ maxidentnr = 0; } ngstd::Archive & Identifications :: DoArchive (ngstd::Archive & ar) { ar & maxidentnr; ar & identifiedpoints & identifiedpoints_nr; ar & idpoints_table; if (ar.Output()) { size_t s = type.Size(); ar & s; for (auto & t : type) ar & (unsigned char&)(t); } else { size_t s; ar & s; type.SetSize(s); for (auto & t : type) ar & (unsigned char&)(t); } return ar; } void Identifications :: Add (PointIndex pi1, PointIndex pi2, int identnr) { // (*testout) << "Identification::Add, pi1 = " << pi1 << ", pi2 = " << pi2 << ", identnr = " << identnr << endl; INDEX_2 pair (pi1, pi2); identifiedpoints.Set (pair, identnr); INDEX_3 tripl (pi1, pi2, identnr); identifiedpoints_nr.Set (tripl, 1); if (identnr > maxidentnr) maxidentnr = identnr; if (identnr+1 > idpoints_table.Size()) idpoints_table.ChangeSize (identnr+1); idpoints_table.Add (identnr, pair); // timestamp = NextTimeStamp(); } int Identifications :: Get (PointIndex pi1, PointIndex pi2) const { INDEX_2 pair(pi1, pi2); if (identifiedpoints.Used (pair)) return identifiedpoints.Get(pair); else return 0; } bool Identifications :: Get (PointIndex pi1, PointIndex pi2, int nr) const { INDEX_3 tripl(pi1, pi2, nr); if (identifiedpoints_nr.Used (tripl)) return 1; else return 0; } int Identifications :: GetSymmetric (PointIndex pi1, PointIndex pi2) const { INDEX_2 pair(pi1, pi2); if (identifiedpoints.Used (pair)) return identifiedpoints.Get(pair); pair = INDEX_2 (pi2, pi1); if (identifiedpoints.Used (pair)) return identifiedpoints.Get(pair); return 0; } void Identifications :: GetMap (int identnr, Array & identmap, bool symmetric) const { identmap.SetSize (mesh.GetNP()); identmap = 0; if (identnr) for (int i = 0; i < idpoints_table[identnr].Size(); i++) { INDEX_2 pair = idpoints_table[identnr][i]; identmap[pair.I1()] = pair.I2(); if(symmetric) identmap[pair.I2()] = pair.I1(); } else { cout << "getmap, identnr = " << identnr << endl; for (int i = 1; i <= identifiedpoints_nr.GetNBags(); i++) for (int j = 1; j <= identifiedpoints_nr.GetBagSize(i); j++) { INDEX_3 i3; int dummy; identifiedpoints_nr.GetData (i, j, i3, dummy); if (i3.I3() == identnr || !identnr) { identmap.Elem(i3.I1()) = i3.I2(); if(symmetric) identmap.Elem(i3.I2()) = i3.I1(); } } } } void Identifications :: GetPairs (int identnr, Array & identpairs) const { identpairs.SetSize(0); if (identnr == 0) for (int i = 1; i <= identifiedpoints.GetNBags(); i++) for (int j = 1; j <= identifiedpoints.GetBagSize(i); j++) { INDEX_2 i2; int nr; identifiedpoints.GetData (i, j, i2, nr); identpairs.Append (i2); } else for (int i = 1; i <= identifiedpoints_nr.GetNBags(); i++) for (int j = 1; j <= identifiedpoints_nr.GetBagSize(i); j++) { INDEX_3 i3; int dummy; identifiedpoints_nr.GetData (i, j, i3 , dummy); if (i3.I3() == identnr) identpairs.Append (INDEX_2(i3.I1(), i3.I2())); } } void Identifications :: SetMaxPointNr (int maxpnum) { for (int i = 1; i <= identifiedpoints.GetNBags(); i++) for (int j = 1; j <= identifiedpoints.GetBagSize(i); j++) { INDEX_2 i2; int nr; identifiedpoints.GetData (i, j, i2, nr); if (i2.I1() > maxpnum || i2.I2() > maxpnum) { i2.I1() = i2.I2() = -1; identifiedpoints.SetData (i, j, i2, -1); } } } void Identifications :: Print (ostream & ost) const { ost << "Identifications:" << endl; ost << "pairs: " << endl << identifiedpoints << endl; ost << "pairs and nr: " << endl << identifiedpoints_nr << endl; ost << "table: " << endl << idpoints_table << endl; } MeshingParameters :: MeshingParameters () { // optimize3d = "cmdmustm"; //optimize3d = "cmdmstm"; // optsteps3d = 3; // optimize2d = "smsmsmSmSmSm"; // optsteps2d = 3; // opterrpow = 2; // blockfill = 1; // filldist = 0.1; // safety = 5; // relinnersafety = 3; // uselocalh = 1; // grading = 0.3; // delaunay = 1; // maxh = 1e10; // minh = 0; // meshsizefilename = NULL; // startinsurface = 0; // checkoverlap = 1; // checkoverlappingboundary = 1; // checkchartboundary = 1; // curvaturesafety = 2; // segmentsperedge = 1; // parthread = 0; // elsizeweight = 0.2; // giveuptol2d = 200; // giveuptol = 10; // maxoutersteps = 10; // starshapeclass = 5; // baseelnp = 0; // sloppy = 1; // badellimit = 175; // check_impossible = 0; // secondorder = 0; } void MeshingParameters :: Print (ostream & ost) const { ost << "Meshing parameters: " << endl << "optimize3d = " << optimize3d << endl << "optsteps3d = " << optsteps3d << endl << " optimize2d = " << optimize2d << endl << " optsteps2d = " << optsteps2d << endl << " opterrpow = " << opterrpow << endl << " blockfill = " << blockfill << endl << " filldist = " << filldist << endl << " safety = " << safety << endl << " relinnersafety = " << relinnersafety << endl << " uselocalh = " << uselocalh << endl << " grading = " << grading << endl << " delaunay = " << delaunay << endl << " maxh = " << maxh << endl << " meshsizefilename = " << meshsizefilename << endl << " startinsurface = " << startinsurface << endl << " checkoverlap = " << checkoverlap << endl << " checkchartboundary = " << checkchartboundary << endl << " curvaturesafety = " << curvaturesafety << endl << " segmentsperedge = " << segmentsperedge << endl << " parthread = " << parthread << endl << " elsizeweight = " << elsizeweight << endl << " giveuptol2d = " << giveuptol2d << endl << " giveuptol = " << giveuptol << endl << " maxoutersteps = " << maxoutersteps << endl << " starshapeclass = " << starshapeclass << endl << " baseelnp = " << baseelnp << endl << " sloppy = " << sloppy << endl << " badellimit = " << badellimit << endl << " secondorder = " << secondorder << endl << " elementorder = " << elementorder << endl << " quad = " << quad << endl << " inverttets = " << inverttets << endl << " inverttrigs = " << inverttrigs << endl; } /* void MeshingParameters :: CopyFrom(const MeshingParameters & other) { //strcpy(optimize3d,other.optimize3d); optimize3d = other.optimize3d; optsteps3d = other.optsteps3d; //strcpy(optimize2d,other.optimize2d); optimize2d = other.optimize2d; optsteps2d = other.optsteps2d; opterrpow = other.opterrpow; blockfill = other.blockfill; filldist = other.filldist; safety = other.safety; relinnersafety = other.relinnersafety; uselocalh = other.uselocalh; grading = other.grading; delaunay = other.delaunay; maxh = other.maxh; //strcpy(const_cast(meshsizefilename), other.meshsizefilename); //const_cast(meshsizefilename) = other.meshsizefilename; //??? meshsizefilename = other.meshsizefilename; startinsurface = other.startinsurface; checkoverlap = other.checkoverlap; checkoverlappingboundary = other.checkoverlappingboundary; checkchartboundary = other.checkchartboundary; curvaturesafety = other.curvaturesafety; segmentsperedge = other.segmentsperedge; parthread = other.parthread; elsizeweight = other.elsizeweight; giveuptol2d = other.giveuptol2d; giveuptol = other.giveuptol; maxoutersteps = other.maxoutersteps; starshapeclass = other.starshapeclass; baseelnp = other.baseelnp; sloppy = other.sloppy; badellimit = other.badellimit; secondorder = other.secondorder; elementorder = other.elementorder; quad = other.quad; inverttets = other.inverttets; inverttrigs = other.inverttrigs; } */ DebugParameters :: DebugParameters () { slowchecks = 0; haltsuccess = 0; haltnosuccess = 0; haltlargequalclass = 0; haltsegment = 0; haltsegmentp1 = 0; haltsegmentp2 = 0; }; } netgen-6.2.1804/libsrc/meshing/ruler2.cpp0000644000175000017500000003752313272137567016646 0ustar kurtkurt#include #include "meshing.hpp" namespace netgen { static double CalcElementBadness (const Array & points, const Element2d & elem) { // badness = sqrt(3) /36 * circumference^2 / area - 1 + // h / li + li / h - 2 Vec2d v12, v13, v23; double l12, l13, l23, cir, area; static const double c = sqrt(3.0) / 36; v12 = points.Get(elem.PNum(2)) - points.Get(elem.PNum(1)); v13 = points.Get(elem.PNum(3)) - points.Get(elem.PNum(1)); v23 = points.Get(elem.PNum(3)) - points.Get(elem.PNum(2)); l12 = v12.Length(); l13 = v13.Length(); l23 = v23.Length(); cir = l12 + l13 + l23; area = 0.5 * (v12.X() * v13.Y() - v12.Y() * v13.X()); if (area < 1e-6) { return 1e8; } if (testmode) { (*testout) << "l = " << l12 << " + " << l13 << " + " << l23 << " = " << cir << ", area = " << area << endl; (*testout) << "shapeerr = " << 10 * (c * cir * cir / area - 1) << endl << "sizeerr = " << 1/l12 + l12 + 1/l13 + l13 + 1/l23 + l23 - 6 << endl; } return 10 * (c * cir * cir / area - 1) + 1/l12 + l12 + 1/l13 + l13 + 1/l23 + l23 - 6; } int Meshing2 ::ApplyRules (Array & lpoints, Array & legalpoints, int maxlegalpoint, Array & llines1, int maxlegalline, Array & elements, Array & dellines, int tolerance, const MeshingParameters & mp) { static int timer = NgProfiler::CreateTimer ("meshing2::ApplyRules"); NgProfiler::RegionTimer reg (timer); double maxerr = 0.5 + 0.3 * tolerance; double minelerr = 2 + 0.5 * tolerance * tolerance; int noldlp = lpoints.Size(); int noldll = llines1.Size(); ArrayMem pused(maxlegalpoint), lused(maxlegalline); ArrayMem pnearness(noldlp), lnearness(llines1.Size()); ArrayMem pmap, pfixed, lmap; ArrayMem tempnewpoints; ArrayMem tempnewlines; ArrayMem tempdellines; ArrayMem tempelements; elements.SetSize (0); dellines.SetSize (0); testmode = debugparam.debugoutput; #ifdef LOCDEBUG int loctestmode = testmode; if (loctestmode) { (*testout) << endl << endl << "Check new environment" << endl; (*testout) << "tolerance = " << tolerance << endl; for (int i = 1; i <= lpoints.Size(); i++) (*testout) << "P" << i << " = " << lpoints.Get(i) << endl; (*testout) << endl; for (int i = 1; i <= llines1.Size(); i++) (*testout) << "(" << llines1.Get(i).I1() << "-" << llines1.Get(i).I2() << ")" << endl; } #endif // check every rule int found = 0; // rule number pnearness = 1000; for (int j = 0; j < 2; j++) pnearness.Set(llines1[0][j], 0); enum { MAX_NEARNESS = 3 }; for (int cnt = 0; cnt < MAX_NEARNESS; cnt++) { bool ok = true; for (int i = 0; i < maxlegalline; i++) { const INDEX_2 & hline = llines1[i]; int minn = min2 (pnearness.Get(hline[0]), pnearness.Get(hline[1])); for (int j = 0; j < 2; j++) if (pnearness.Get(hline[j]) > minn+1) { ok = false; pnearness.Set(hline[j], minn+1); } } if (!ok) break; } for (int i = 0; i < maxlegalline; i++) lnearness[i] = pnearness.Get(llines1[i][0]) + pnearness.Get(llines1[i][1]); // resort lines after lnearness Array llines(llines1.Size()); Array sortlines(llines1.Size()); int lnearness_class[MAX_NEARNESS]; for (int j = 0; j < MAX_NEARNESS; j++) lnearness_class[j] = 0; for (int i = 0; i < maxlegalline; i++) if (lnearness[i] < MAX_NEARNESS) lnearness_class[lnearness[i]]++; int cumm = 0; for (int j = 0; j < MAX_NEARNESS; j++) { int hcnt = lnearness_class[j]; lnearness_class[j] = cumm; cumm += hcnt; } for (int i = 0; i < maxlegalline; i++) if (lnearness[i] < MAX_NEARNESS) { llines[lnearness_class[lnearness[i]]] = llines1[i]; sortlines[lnearness_class[lnearness[i]]] = i+1; lnearness_class[lnearness[i]]++; } else { llines[cumm] = llines1[i]; sortlines[cumm] = i+1; cumm++; } for (int i = maxlegalline; i < llines1.Size(); i++) { llines[cumm] = llines1[i]; sortlines[cumm] = i+1; cumm++; } for (int i = 0; i < maxlegalline; i++) lnearness[i] = pnearness.Get(llines[i][0]) + pnearness.Get(llines[i][1]); static bool firsttime = true; // static int timers[100]; // static int timers2[100]; // static int timers3[100]; if (firsttime) { /* for (int ri = 0; ri < rules.Size(); ri++) timers[ri] = NgProfiler::CreateTimer (string("netrule ")+rules[ri]->Name()); for (int ri = 0; ri < rules.Size(); ri++) timers2[ri] = NgProfiler::CreateTimer (string("netrule,mapped ")+rules[ri]->Name()); for (int ri = 0; ri < rules.Size(); ri++) timers3[ri] = NgProfiler::CreateTimer (string("netrule,lines mapped ")+rules[ri]->Name()); */ firsttime = false; } lused = 0; pused = 0; static int timer1 = NgProfiler::CreateTimer ("meshing2::ApplyRules 1"); NgProfiler::RegionTimer reg1 (timer1); for (int ri = 1; ri <= rules.Size(); ri++) { // NgProfiler::RegionTimer reg(timers[ri-1]); netrule * rule = rules.Get(ri); #ifdef LOCDEBUG if (loctestmode) (*testout) << "Rule " << rule->Name() << endl; #endif if (rule->GetQuality() > tolerance) continue; pmap.SetSize (rule->GetNP()); lmap.SetSize (rule->GetNL()); pmap = 0; lmap = 0; lused[0] = 1; lmap[0] = 1; for (int j = 0; j < 2; j++) { pmap.Elem(rule->GetLine(1)[j]) = llines[0][j]; pused.Elem(llines[0][j])++; } int nlok = 2; bool ok = false; while (nlok >= 2) { if (nlok <= rule->GetNOldL()) { ok = 0; int maxline = (rule->GetLNearness(nlok) < MAX_NEARNESS) ? lnearness_class[rule->GetLNearness(nlok)] : maxlegalline; // int maxline = maxlegalline; while (!ok && lmap.Get(nlok) < maxline) { lmap.Elem(nlok)++; int locli = lmap.Get(nlok); if (lnearness.Get(locli) > rule->GetLNearness (nlok) ) continue; if (lused.Get(locli)) continue; ok = 1; INDEX_2 loclin = llines.Get(locli); Vec2d linevec = lpoints.Get(loclin.I2()) - lpoints.Get(loclin.I1()); if (rule->CalcLineError (nlok, linevec) > maxerr) { ok = 0; #ifdef LOCDEBUG if(loctestmode) (*testout) << "not ok pos1" << endl; #endif continue; } for (int j = 0; j < 2; j++) { int refpi = rule->GetLine(nlok)[j]; if (pmap.Get(refpi) != 0) { if (pmap.Get(refpi) != loclin[j]) { ok = 0; #ifdef LOCDEBUG if(loctestmode) (*testout) << "not ok pos2" << endl; #endif break; } } else { if (rule->CalcPointDist (refpi, lpoints.Get(loclin[j])) > maxerr || !legalpoints.Get(loclin[j]) || pused.Get(loclin[j])) { ok = 0; #ifdef LOCDEBUG if(loctestmode) { (*testout) << "nok pos3" << endl; //if(rule->CalcPointDist (refpi, lpoints.Get(loclin[j])) > maxerr) //(*testout) << "r1" << endl; //if(!legalpoints.Get(loclin[j])) //(*testout) << "r2 legalpoints " << legalpoints << " loclin " << loclin << " j " << j << endl; //if(pused.Get(loclin[j])) //(*testout) << "r3" << endl; } #endif break; } } } } if (ok) { int locli = lmap.Get(nlok); INDEX_2 loclin = llines.Get(locli); lused.Elem (locli) = 1; for (int j = 0; j < 2; j++) { pmap.Set(rule->GetLine (nlok)[j], loclin[j]); pused.Elem(loclin[j])++; } nlok++; } else { lmap.Elem(nlok) = 0; nlok--; lused.Elem (lmap.Get(nlok)) = 0; for (int j = 0; j < 2; j++) { pused.Elem(llines.Get(lmap.Get(nlok))[j]) --; if (! pused.Get (llines.Get (lmap.Get (nlok))[j])) pmap.Set (rule->GetLine (nlok)[j], 0); } } } else { // NgProfiler::RegionTimer reg(timers3[ri-1]); // all lines are mapped !! // map also all points: int npok = 1; int incnpok = 1; pfixed.SetSize (pmap.Size()); for (int i = 0; i < pmap.Size(); i++) pfixed[i] = (pmap[i] >= 1); while (npok >= 1) { if (npok <= rule->GetNOldP()) { if (pfixed.Get(npok)) { if (incnpok) npok++; else npok--; } else { ok = 0; if (pmap.Get(npok)) pused.Elem(pmap.Get(npok))--; while (!ok && pmap.Get(npok) < maxlegalpoint) { ok = 1; pmap.Elem(npok)++; if (pused.Get(pmap.Get(npok))) { ok = 0; } else { if (rule->CalcPointDist (npok, lpoints.Get(pmap.Get(npok))) > maxerr || !legalpoints.Get(pmap.Get(npok))) ok = 0; } } if (ok) { pused.Elem(pmap.Get(npok))++; npok++; incnpok = 1; } else { pmap.Elem(npok) = 0; npok--; incnpok = 0; } } } else { // NgProfiler::RegionTimer reg(timers2[ri-1]); npok = rule->GetNOldP(); incnpok = 0; if (ok) foundmap.Elem(ri)++; #ifdef LOCDEBUG if (loctestmode) (*testout) << "lines and points mapped" << endl; #endif ok = 1; // check orientations for (int i = 1; i <= rule->GetNOrientations(); i++) { if (CW (lpoints.Get(pmap.Get(rule->GetOrientation(i).i1)), lpoints.Get(pmap.Get(rule->GetOrientation(i).i2)), lpoints.Get(pmap.Get(rule->GetOrientation(i).i3))) ) { ok = 0; #ifdef LOCDEBUG if (loctestmode) (*testout) << "Orientation " << i << " not ok" << endl; #endif break; } } if (!ok) continue; Vector oldu (2 * rule->GetNOldP()); for (int i = 1; i <= rule->GetNOldP(); i++) { Vec2d ui(rule->GetPoint(i), lpoints.Get(pmap.Get(i))); oldu (2*i-2) = ui.X(); oldu (2*i-1) = ui.Y(); } rule -> SetFreeZoneTransformation (oldu, tolerance); if (!ok) continue; if (!rule->ConvexFreeZone()) { ok = 0; #ifdef LOCDEBUG if (loctestmode) (*testout) << "freezone not convex" << endl; #endif /* static int cnt = 0; cnt++; if (cnt % 100 == 0) { cout << "freezone not convex, cnt = " << cnt << "; rule = " << rule->Name() << endl; (*testout) << "freezone not convex, cnt = " << cnt << "; rule = " << rule->Name() << endl; (*testout) << "tol = " << tolerance << endl; (*testout) << "maxerr = " << maxerr << "; minerr = " << minelerr << endl; (*testout) << "freezone = " << rule->GetTransFreeZone() << endl; } */ } // check freezone: if (!ok) continue; for (int i = 1; i <= maxlegalpoint && ok; i++) { if ( !pused.Get(i) && rule->IsInFreeZone (lpoints.Get(i)) ) { ok = 0; #ifdef LOCDEBUG if (loctestmode) (*testout) << "Point " << i << " in freezone" << endl; #endif break; } } if (!ok) continue; for (int i = maxlegalpoint+1; i <= lpoints.Size(); i++) { if ( rule->IsInFreeZone (lpoints.Get(i)) ) { ok = 0; #ifdef LOCDEBUG if (loctestmode) (*testout) << "Point " << i << " in freezone" << endl; #endif break; } } if (!ok) continue; for (int i = 1; i <= maxlegalline; i++) { if (!lused.Get(i) && rule->IsLineInFreeZone (lpoints.Get(llines.Get(i).I1()), lpoints.Get(llines.Get(i).I2()))) { ok = 0; #ifdef LOCDEBUG if (loctestmode) (*testout) << "line " << llines.Get(i).I1() << "-" << llines.Get(i).I2() << " in freezone" << endl; #endif break; } } if (!ok) continue; for (int i = maxlegalline+1; i <= llines.Size(); i++) { if (rule->IsLineInFreeZone (lpoints.Get(llines.Get(i).I1()), lpoints.Get(llines.Get(i).I2()))) { ok = 0; #ifdef LOCDEBUG if (loctestmode) (*testout) << "line " << llines.Get(i).I1() << "-" << llines.Get(i).I2() << " in freezone" << endl; #endif break; } } /* // check orientations for (i = 1; i <= rule->GetNOrientations() && ok; i++) { if (CW (lpoints.Get(pmap.Get(rule->GetOrientation(i).i1)), lpoints.Get(pmap.Get(rule->GetOrientation(i).i2)), lpoints.Get(pmap.Get(rule->GetOrientation(i).i3))) ) { ok = 0; if (loctestmode) (*testout) << "Orientation " << i << " not ok" << endl; } } */ if (!ok) continue; #ifdef LOCDEBUG if (loctestmode) (*testout) << "rule ok" << endl; #endif // Setze neue Punkte: if (rule->GetNOldP() < rule->GetNP()) { Vector newu(rule->GetOldUToNewU().Height()); rule->GetOldUToNewU().Mult (oldu, newu); int oldnp = rule->GetNOldP(); for (int i = oldnp + 1; i <= rule->GetNP(); i++) { Point2d np = rule->GetPoint(i); np.X() += newu (2 * (i-oldnp) - 2); np.Y() += newu (2 * (i-oldnp) - 1); lpoints.Append (np); pmap.Elem(i) = lpoints.Size(); } } // Setze neue Linien: for (int i = rule->GetNOldL() + 1; i <= rule->GetNL(); i++) { llines.Append (INDEX_2 (pmap.Get(rule->GetLine (i)[0]), pmap.Get(rule->GetLine (i)[1]))); } // delete old lines: for (int i = 1; i <= rule->GetNDelL(); i++) dellines.Append (sortlines.Elem (lmap.Get(rule->GetDelLine(i)))); // dellines.Append (lmap.Get(rule->GetDelLine(i)))); // dellines.Append (lmap.Elem(rule->GetDelLines())); // lmap[rule->GetDelLines()]; // insert new elements: for (int i = 1; i <= rule->GetNE(); i++) { elements.Append (rule->GetElement(i)); for (int j = 1; j <= elements.Get(i).GetNP(); j++) elements.Elem(i).PNum(j) = pmap.Get(elements.Get(i).PNum(j)); } double elerr = 0; for (int i = 1; i <= elements.Size(); i++) { double hf; if (!mp.quad) hf = CalcElementBadness (lpoints, elements.Get(i)); else hf = elements.Get(i).CalcJacobianBadness (lpoints) * 5; #ifdef LOCDEBUG if (loctestmode) (*testout) << "r " << rule->Name() << "bad = " << hf << endl; #endif if (hf > elerr) elerr = hf; } #ifdef LOCDEBUG if (loctestmode) (*testout) << "error = " << elerr; #endif canuse.Elem(ri) ++; if (elerr < 0.99*minelerr) { #ifdef LOCDEBUG if (loctestmode) { (*testout) << "rule = " << rule->Name() << endl; (*testout) << "class = " << tolerance << endl; (*testout) << "lpoints: " << endl; for (int i = 1; i <= lpoints.Size(); i++) (*testout) << lpoints.Get(i) << endl; (*testout) << "llines: " << endl; for (int i = 1; i <= llines.Size(); i++) (*testout) << llines.Get(i).I1() << " " << llines.Get(i).I2() << endl; (*testout) << "Freezone: "; for (int i = 1; i <= rule -> GetTransFreeZone().Size(); i++) (*testout) << rule->GetTransFreeZone().Get(i) << endl; } #endif minelerr = elerr; found = ri; tempnewpoints = lpoints.Range (noldlp, lpoints.Size()); tempnewlines = llines.Range (noldll, llines.Size()); tempdellines = dellines; tempelements = elements; } lpoints.SetSize (noldlp); llines.SetSize (noldll); dellines.SetSize (0); elements.SetSize (0); ok = 0; } } nlok = rule->GetNOldL(); lused.Set (lmap.Get(nlok), 0); for (int j = 1; j <= 2; j++) { int refpi = rule->GetPointNr (nlok, j); pused.Elem(pmap.Get(refpi))--; if (pused.Get(pmap.Get(refpi)) == 0) pmap.Set(refpi, 0); } } } } if (found) { lpoints.Append (tempnewpoints); llines1.Append (tempnewlines); dellines.Append (tempdellines); elements.Append (tempelements); } return found; } } netgen-6.2.1804/libsrc/meshing/msghandler.cpp0000644000175000017500000001246413272137567017554 0ustar kurtkurt//File for handling warnings, errors, messages #include namespace netgen { int printmessage_importance = 5; int printwarnings = 1; int printerrors = 1; int printdots = 1; int printfnstart = 0; // extern void Ng_PrintDest(const MyStr& s); extern void Ng_PrintDest(const char * s); //the dots for progression of program void PrintDot(char ch) { // if (printdots) if (printmessage_importance >= 4) { char st[2]; st[0] = ch; st[1] = 0; Ng_PrintDest(st); } } void PrintMessage(int importance, const MyStr& s1, const MyStr& s2) { if (importance <= printmessage_importance) { Ng_PrintDest(MyStr(" ")+s1+s2+MyStr("\n")); } } void PrintMessage(int importance, const MyStr& s1, const MyStr& s2, const MyStr& s3, const MyStr& s4) { if (importance <= printmessage_importance) { Ng_PrintDest(MyStr(" ")+s1+s2+s3+s4+MyStr("\n")); } } void PrintMessage(int importance, const MyStr& s1, const MyStr& s2, const MyStr& s3, const MyStr& s4, const MyStr& s5, const MyStr& s6, const MyStr& s7, const MyStr& s8) { if (importance <= printmessage_importance) { Ng_PrintDest(MyStr(" ")+s1+s2+s3+s4+s5+s6+s7+s8+MyStr("\n")); } } void PrintMessageCR(int importance, const MyStr& s1, const MyStr& s2, const MyStr& s3, const MyStr& s4, const MyStr& s5, const MyStr& s6, const MyStr& s7, const MyStr& s8) { if (importance <= printmessage_importance) { Ng_PrintDest(MyStr(" ")+s1+s2+s3+s4+s5+s6+s7+s8+MyStr("\r")); } } void PrintFnStart(const MyStr& s1, const MyStr& s2, const MyStr& s3, const MyStr& s4, const MyStr& s5, const MyStr& s6, const MyStr& s7, const MyStr& s8) { if (printfnstart) Ng_PrintDest(MyStr(" Start Function: ")+s1+s2+s3+s4+s5+s6+s7+s8+MyStr("\n")); } void PrintWarning(const MyStr& s1, const MyStr& s2, const MyStr& s3, const MyStr& s4, const MyStr& s5, const MyStr& s6, const MyStr& s7, const MyStr& s8) { if (printwarnings) Ng_PrintDest(MyStr(" WARNING: ")+s1+s2+s3+s4+s5+s6+s7+s8+MyStr("\n")); } void PrintError(const MyStr& s1, const MyStr& s2, const MyStr& s3, const MyStr& s4, const MyStr& s5, const MyStr& s6, const MyStr& s7, const MyStr& s8) { if (printerrors) Ng_PrintDest(MyStr(" ERROR: ")+s1+s2+s3+s4+s5+s6+s7+s8+MyStr("\n")); } void PrintFileError(const MyStr& s1, const MyStr& s2, const MyStr& s3, const MyStr& s4, const MyStr& s5, const MyStr& s6, const MyStr& s7, const MyStr& s8) { if (printerrors) Ng_PrintDest(MyStr(" FILE ERROR: ")+s1+s2+s3+s4+s5+s6+s7+s8+MyStr("\n")); } void PrintUserError(const MyStr& s1, const MyStr& s2, const MyStr& s3, const MyStr& s4, const MyStr& s5, const MyStr& s6, const MyStr& s7, const MyStr& s8) { Ng_PrintDest(MyStr(" USER ERROR: ")+s1+s2+s3+s4+s5+s6+s7+s8+MyStr("\n")); } void PrintSysError(const MyStr& s1, const MyStr& s2, const MyStr& s3, const MyStr& s4, const MyStr& s5, const MyStr& s6, const MyStr& s7, const MyStr& s8) { if (printerrors) Ng_PrintDest(MyStr(" SYSTEM ERROR: ")+s1+s2+s3+s4+s5+s6+s7+s8+MyStr("\n")); } void PrintTime(const MyStr& s1, const MyStr& s2, const MyStr& s3, const MyStr& s4, const MyStr& s5, const MyStr& s6, const MyStr& s7, const MyStr& s8) { if (printmessage_importance >= 3) Ng_PrintDest(MyStr(" Time = ")+s1+s2+s3+s4+s5+s6+s7+s8+MyStr("\n")); } static Array msgstatus_stack(0); static Array threadpercent_stack(0); static MyStr msgstatus = ""; void ResetStatus() { SetStatMsg("idle"); for (int i = 0; i < msgstatus_stack.Size(); i++) delete msgstatus_stack[i]; msgstatus_stack.SetSize(0); threadpercent_stack.SetSize(0); // multithread.task = ""; multithread.percent = 100.; } void PushStatus(const MyStr& s) { msgstatus_stack.Append(new MyStr (s)); SetStatMsg(s); threadpercent_stack.Append(0); } void PushStatusF(const MyStr& s) { msgstatus_stack.Append(new MyStr (s)); SetStatMsg(s); threadpercent_stack.Append(0); PrintFnStart(s); } void PopStatus() { if (msgstatus_stack.Size()) { if (msgstatus_stack.Size() > 1) // SetStatMsg (*msgstatus_stack.Last()); SetStatMsg (*msgstatus_stack[msgstatus_stack.Size()-2]); else SetStatMsg (""); delete msgstatus_stack.Last(); msgstatus_stack.DeleteLast(); threadpercent_stack.DeleteLast(); if(threadpercent_stack.Size() > 0) multithread.percent = threadpercent_stack.Last(); else multithread.percent = 100.; } else { PrintSysError("PopStatus failed"); } } /* void SetStatMsgF(const MyStr& s) { PrintFnStart(s); SetStatMsg(s); } */ void SetStatMsg(const MyStr& s) { msgstatus = s; multithread.task = msgstatus.c_str(); } void SetThreadPercent(double percent) { multithread.percent = percent; if(threadpercent_stack.Size() > 0) threadpercent_stack.Last() = percent; } void GetStatus(MyStr & s, double & percentage) { if(threadpercent_stack.Size() > 0) percentage = threadpercent_stack.Last(); else percentage = multithread.percent; if ( msgstatus_stack.Size() ) s = *msgstatus_stack.Last(); else s = "idle"; } /* #ifdef SMALLLIB #define SMALLLIBORNOTCL #endif #ifdef NOTCL #define SMALLLIBORNOTCL #endif #ifdef SMALLLIBORNOTCL void Ng_PrintDest(const char * s){cout << s < #include "meshing.hpp" namespace netgen { GeomSearch3d :: GeomSearch3d() { size.i1 = 0; size.i2 = 0; size.i3 = 0; }; GeomSearch3d :: ~GeomSearch3d() { //delete old Hashtable: if (size.i1 != 0) { for (int i = 0; i < size.i1*size.i2*size.i3; i++) delete hashtable[i]; } } void GeomSearch3d :: Init (Array *pointsi, Array *facesi) { points = pointsi; faces = facesi; size.i1 = 0; size.i2 = 0; size.i3 = 0; reset = 1; hashcount = 1; } void GeomSearch3d :: ElemMaxExt(Point3d& minp, Point3d& maxp, const MiniElement2d& elem) { maxp.X()=(*points)[elem.PNum(1)].P()(0); maxp.Y()=(*points)[elem.PNum(1)].P()(1); maxp.Z()=(*points)[elem.PNum(1)].P()(2); minp.X()=(*points)[elem.PNum(1)].P()(0); minp.Y()=(*points)[elem.PNum(1)].P()(1); minp.Z()=(*points)[elem.PNum(1)].P()(2); for (int i=2; i <= 3; i++) { maxp.X()=max2((*points)[elem.PNum(i)].P()(0),maxp.X()); maxp.Y()=max2((*points)[elem.PNum(i)].P()(1),maxp.Y()); maxp.Z()=max2((*points)[elem.PNum(i)].P()(2),maxp.Z()); minp.X()=min2((*points)[elem.PNum(i)].P()(0),minp.X()); minp.Y()=min2((*points)[elem.PNum(i)].P()(1),minp.Y()); minp.Z()=min2((*points)[elem.PNum(i)].P()(2),minp.Z()); } } void GeomSearch3d :: MinCoords(const Point3d& p1, Point3d& p2) { p2.X()=min2(p1.X(),p2.X()); p2.Y()=min2(p1.Y(),p2.Y()); p2.Z()=min2(p1.Z(),p2.Z()); } void GeomSearch3d :: MaxCoords(const Point3d& p1, Point3d& p2) { p2.X()=max2(p1.X(),p2.X()); p2.Y()=max2(p1.Y(),p2.Y()); p2.Z()=max2(p1.Z(),p2.Z()); } void GeomSearch3d :: Create() { INDEX i,j,k; if (reset) { const double hashelemsizefactor = 4; reset = 0; /* minext=Point3d(MAXDOUBLE, MAXDOUBLE, MAXDOUBLE); maxext=Point3d(MINDOUBLE, MINDOUBLE, MINDOUBLE); */ ElemMaxExt(minext, maxext, faces->Get(1).Face()); Point3d maxp, minp; Vec3d midext(0,0,0); //get max Extension of Frontfaces for (i = 1; i <= faces->Size(); i++) { ElemMaxExt(minp, maxp, faces->Get(i).Face()); MinCoords(minp, minext); MaxCoords(maxp, maxext); midext+=maxp-minp; } maxextreal = maxext; maxext = maxext + 1e-4 * (maxext - minext); midext*=1./faces->Size(); Vec3d boxext = maxext - minext; //delete old Hashtable: if (size.i1 != 0) { for (i = 1; i <= size.i1*size.i2*size.i3; i++) { delete hashtable.Get(i); } } size.i1 = int (boxext.X()/midext.X()/hashelemsizefactor+1); size.i2 = int (boxext.Y()/midext.Y()/hashelemsizefactor+1); size.i3 = int (boxext.Z()/midext.Z()/hashelemsizefactor+1); // PrintMessage (5, "hashsizes = ", size.i1, ", ", size.i2, ", ", size.i3); elemsize.X()=boxext.X()/size.i1; elemsize.Y()=boxext.Y()/size.i2; elemsize.Z()=boxext.Z()/size.i3; //create Hasharrays: hashtable.SetSize(size.i1*size.i2*size.i3); for (i = 1; i <= size.i1; i++) { for (j = 1; j <= size.i2; j++) { for (k = 1; k <= size.i3; k++) { INDEX ind=i+(j-1)*size.i1+(k-1)*size.i2*size.i1; hashtable.Elem(ind) = new Array (); } } } } else { //Clear all Hash-Arrays for (i = 1; i <= size.i1; i++) { for (j = 1; j <= size.i2; j++) { for (k = 1; k <= size.i3; k++) { INDEX ind=i+(j-1)*size.i1+(k-1)*size.i2*size.i1; hashtable.Elem(ind)->SetSize(0); } } } } //Faces in Hashtable einfuegen: for (i = 1; i <= faces->Size(); i++) { AddElem(faces->Get(i).Face(),i); } } void GeomSearch3d :: AddElem(const MiniElement2d& elem, INDEX elemnum) { Point3d minp, maxp; ElemMaxExt(minp, maxp, elem); int sx = int ((minp.X()-minext.X())/elemsize.X()+1.); int ex = int ((maxp.X()-minext.X())/elemsize.X()+1.); int sy = int ((minp.Y()-minext.Y())/elemsize.Y()+1.); int ey = int ((maxp.Y()-minext.Y())/elemsize.Y()+1.); int sz = int ((minp.Z()-minext.Z())/elemsize.Z()+1.); int ez = int ((maxp.Z()-minext.Z())/elemsize.Z()+1.); for (int ix = sx; ix <= ex; ix++) for (int iy = sy; iy <= ey; iy++) for (int iz = sz; iz <= ez; iz++) { INDEX ind=ix+(iy-1)*size.i1+(iz-1)*size.i2*size.i1; if (ind < 1 || ind > size.i1 * size.i2 * size.i3) { cerr << "Illegal hash-position"; cerr << "Position: " << ix << "," << iy << "," << iz << endl; throw NgException ("Illegal position in Geomsearch"); } hashtable.Elem(ind)->Append(elemnum); } } void GeomSearch3d :: GetLocals(Array & locfaces, Array & findex, INDEX fstind, const Point3d& p0, double xh) { hashcount++; Point3d minp, maxp, midp; minp=p0-Vec3d(xh,xh,xh); //lay cube over sphere maxp=p0+Vec3d(xh,xh,xh); MaxCoords(minext,minp); //cube may not be out of hash-region MinCoords(maxextreal,maxp); int cluster = faces->Get(fstind).Cluster(); int sx = int((minp.X()-minext.X())/elemsize.X()+1.); int ex = int((maxp.X()-minext.X())/elemsize.X()+1.); int sy = int((minp.Y()-minext.Y())/elemsize.Y()+1.); int ey = int((maxp.Y()-minext.Y())/elemsize.Y()+1.); int sz = int((minp.Z()-minext.Z())/elemsize.Z()+1.); int ez = int((maxp.Z()-minext.Z())/elemsize.Z()+1.); int ix,iy,iz,i,k; int cnt1 = 0; // test, how efficient hashtable is int cnt2 = 0; int cnt3 = 0; for (ix = sx; ix <= ex; ix++) { for (iy = sy; iy <= ey; iy++) { for (iz = sz; iz <= ez; iz++) { INDEX ind=ix+(iy-1)*size.i1+(iz-1)*size.i2*size.i1; //go through all elements in one hash area const Array & area = *hashtable.Elem(ind); for (k = 1; k <= area.Size(); k++) { cnt2++; i = area.Get(k); if (faces->Get(i).Cluster() == cluster && faces->Get(i).Valid() && faces->Get(i).HashValue() != hashcount && i != fstind) { cnt1++; const MiniElement2d & face = faces->Get(i).Face(); const Point3d & p1 = (*points)[face.PNum(1)].P(); const Point3d & p2 = (*points)[face.PNum(2)].P(); const Point3d & p3 = (*points)[face.PNum(3)].P(); midp = Center (p1, p2, p3); // if (Dist2 (midp, p0) <= xh*xh) if((Dist2 (p1, p0) <= xh*xh) || (Dist2 (p2, p0) <= xh*xh) || (Dist2 (p3, p0) <= xh*xh) || (Dist2 (midp, p0) <= xh*xh) ) // by Jochen Wild { cnt3++; locfaces.Append(faces->Get(i).Face()); findex.Append(i); faces->Elem(i).SetHashValue(hashcount); } } } } } } /* if (faces->Size() != 0 && hashcount % 200 == 0) { (*mycout) << "n.o.f= " << faces->Size(); (*mycout) << ", n.o.lf= " << locfaces.Size(); (*mycout) << ", hashf= " << (double)cnt2/(double)faces->Size(); (*mycout) << " (" << (double)cnt1/(double)faces->Size(); (*mycout) << ", " << (double)cnt3/(double)faces->Size() << ")" << endl; } */ } } netgen-6.2.1804/libsrc/meshing/netrule2.cpp0000644000175000017500000001173413272137567017167 0ustar kurtkurt#include #include "meshing.hpp" namespace netgen { netrule :: netrule () { name = new char[1]; name[0] = char(0); quality = 0; } netrule :: ~netrule() { delete [] name; for(int i = 0; i < oldutofreearea_i.Size(); i++) delete oldutofreearea_i[i]; for(int i = 0; i < freezone_i.Size(); i++) delete freezone_i[i]; } void netrule :: SetFreeZoneTransformation (const Vector & devp, int tolclass) { double lam1 = 1.0/tolclass; double lam2 = 1.-lam1; double mem1[100], mem2[100], mem3[100]; int vs = oldutofreearea.Height(); FlatVector devfree(vs, mem1); int fzs = freezone.Size(); transfreezone.SetSize (fzs); if (tolclass <= oldutofreearea_i.Size()) { oldutofreearea_i[tolclass-1] -> Mult (devp, devfree); Array & fzi = *freezone_i[tolclass-1]; for (int i = 0; i < fzs; i++) { transfreezone[i].X() = fzi[i].X() + devfree[2*i]; transfreezone[i].Y() = fzi[i].Y() + devfree[2*i+1]; } } else { FlatVector devfree1(vs, mem2); FlatVector devfree2(vs, mem3); oldutofreearea.Mult (devp, devfree1); oldutofreearealimit.Mult (devp, devfree2); devfree.Set2 (lam1, devfree1, lam2, devfree2); for (int i = 0; i < fzs; i++) { transfreezone[i].X() = lam1 * freezone[i].X() + lam2 * freezonelimit[i].X() + devfree[2*i]; transfreezone[i].Y() = lam1 * freezone[i].Y() + lam2 * freezonelimit[i].Y() + devfree[2*i+1]; } } if (fzs > 0) { fzmaxx = fzminx = transfreezone[0].X(); fzmaxy = fzminy = transfreezone[0].Y(); } for (int i = 1; i < fzs; i++) { if (transfreezone[i].X() > fzmaxx) fzmaxx = transfreezone[i].X(); if (transfreezone[i].X() < fzminx) fzminx = transfreezone[i].X(); if (transfreezone[i].Y() > fzmaxy) fzmaxy = transfreezone[i].Y(); if (transfreezone[i].Y() < fzminy) fzminy = transfreezone[i].Y(); } for (int i = 0; i < fzs; i++) { Point2d p1 = transfreezone[i]; Point2d p2 = transfreezone[(i+1) % fzs]; Vec2d vn (p2.Y() - p1.Y(), p1.X() - p2.X()); double len2 = vn.Length2(); if (len2 < 1e-10) { freesetinequ(i, 0) = 0; freesetinequ(i, 1) = 0; freesetinequ(i, 2) = -1; } else { vn /= sqrt (len2); // scaling necessary ? freesetinequ(i,0) = vn.X(); freesetinequ(i,1) = vn.Y(); freesetinequ(i,2) = -(p1.X() * vn.X() + p1.Y() * vn.Y()); } } } /* int netrule :: IsInFreeZone2 (const Point2d & p) const { for (int i = 0; i < transfreezone.Size(); i++) { if (freesetinequ(i, 0) * p.X() + freesetinequ(i, 1) * p.Y() + freesetinequ(i, 2) > 0) return 0; } return 1; } */ int netrule :: IsLineInFreeZone2 (const Point2d & p1, const Point2d & p2) const { if ( (p1.X() > fzmaxx && p2.X() > fzmaxx) || (p1.X() < fzminx && p2.X() < fzminx) || (p1.Y() > fzmaxy && p2.Y() > fzmaxy) || (p1.Y() < fzminy && p2.Y() < fzminy) ) return 0; for (int i = 1; i <= transfreezone.Size(); i++) { if (freesetinequ.Get(i, 1) * p1.X() + freesetinequ.Get(i, 2) * p1.Y() + freesetinequ.Get(i, 3) > -1e-8 && // -1e-6 freesetinequ.Get(i, 1) * p2.X() + freesetinequ.Get(i, 2) * p2.Y() + freesetinequ.Get(i, 3) > -1e-8 // -1e-6 ) return 0; } double nx = (p2.Y() - p1.Y()); double ny = -(p2.X() - p1.X()); double nl = sqrt (nx * nx + ny * ny); if (nl > 1e-8) { nx /= nl; ny /= nl; double c = - (p1.X() * nx + p1.Y() * ny); bool allleft = true; bool allright = true; for (int i = 1; i <= transfreezone.Size(); i++) { bool left = transfreezone.Get(i).X() * nx + transfreezone.Get(i).Y() * ny + c < 1e-7; bool right = transfreezone.Get(i).X() * nx + transfreezone.Get(i).Y() * ny + c > -1e-7; if (!left) allleft = false; if (!right) allright = false; } if (allleft || allright) return false; } return true; } int netrule :: ConvexFreeZone () const { int n = transfreezone.Size(); for (int i = 1; i <= n; i++) { const bool counterclockwise = CCW (transfreezone.Get(i), transfreezone.Get(i % n + 1), transfreezone.Get( (i+1) % n + 1 ), 1e-7); //(*testout) << "ccw " << counterclockwise << endl << " p1 " << transfreezone.Get(i) << " p2 " << transfreezone.Get(i % n + 1) // << " p3 " << transfreezone.Get( (i+1) % n + 1 ) << endl; if (!counterclockwise ) return 0; } return 1; } /* float netrule :: CalcPointDist (int pi, const Point2d & p) const { float dx = p.X() - points.Get(pi).X(); float dy = p.Y() - points.Get(pi).Y(); const threefloat * tf = &tolerances.Get(pi); return tf->f1 * dx * dx + tf->f2 * dx * dy + tf->f3 * dy * dy; } */ float netrule :: CalcLineError (int li, const Vec2d & v) const { float dx = v.X() - linevecs.Get(li).X(); float dy = v.Y() - linevecs.Get(li).Y(); const threefloat * ltf = &linetolerances.Get(li); return ltf->f1 * dx * dx + ltf->f2 * dx * dy + ltf->f3 * dy * dy; } /* int GetNRules () { return rules.Size(); } */ } netgen-6.2.1804/libsrc/meshing/meshing.hpp0000644000175000017500000000204313272137567017057 0ustar kurtkurt#ifndef FILE_MESHING #define FILE_MESHING #include "../include/myadt.hpp" #include "../include/gprim.hpp" #include "../include/linalg.hpp" #include "../include/opti.hpp" namespace netgen { // extern int printmessage_importance; // class CSGeometry; class NetgenGeometry; } #include "msghandler.hpp" #include "meshtype.hpp" #include "localh.hpp" #include "topology.hpp" #include "meshclass.hpp" #include "global.hpp" namespace netgen { #include "meshtool.hpp" #include "ruler2.hpp" #include "adfront2.hpp" #include "meshing2.hpp" #include "improve2.hpp" #include "geomsearch.hpp" #include "adfront3.hpp" #include "ruler3.hpp" #define _INCLUDE_MORE #include "meshing3.hpp" #include "improve3.hpp" #include "findip.hpp" #include "findip2.hpp" #include "curvedelems.hpp" #include "clusters.hpp" #include "meshfunc.hpp" #include "bisect.hpp" #include "hprefinement.hpp" #include "boundarylayer.hpp" #include "specials.hpp" } #include "validate.hpp" #include "basegeom.hpp" #ifdef PARALLEL #include "paralleltop.hpp" #endif #endif netgen-6.2.1804/libsrc/meshing/hprefinement.hpp0000644000175000017500000002022213272137567020110 0ustar kurtkurt#ifndef FILE_HPREFINEMENT #define FILE_HPREFINEMENT /**************************************************************************/ /* File: hprefinement.hh */ /* Author: Joachim Schoeberl */ /* Date: 27. Oct. 2000 */ /**************************************************************************/ /* HP Refinement */ enum HPREF_ELEMENT_TYPE { HP_NONE=0, HP_SEGM = 1, HP_SEGM_SINGCORNERL, HP_SEGM_SINGCORNERR, HP_SEGM_SINGCORNERS, HP_TRIG = 10, HP_TRIG_SINGCORNER, HP_TRIG_SINGCORNER12, HP_TRIG_SINGCORNER123, HP_TRIG_SINGCORNER123_2D, // not rotational symmetric HP_TRIG_SINGEDGE = 20, HP_TRIG_SINGEDGECORNER1, // E = 100, V = 100 HP_TRIG_SINGEDGECORNER2, // E = 100, V = 010 HP_TRIG_SINGEDGECORNER12, // E = 100, V = 110 HP_TRIG_SINGEDGECORNER3, HP_TRIG_SINGEDGECORNER13, HP_TRIG_SINGEDGECORNER23, HP_TRIG_SINGEDGECORNER123, HP_TRIG_SINGEDGES = 30, HP_TRIG_SINGEDGES2, HP_TRIG_SINGEDGES3, HP_TRIG_SINGEDGES23, HP_TRIG_3SINGEDGES = 40, HP_QUAD = 50, HP_QUAD_SINGCORNER, HP_DUMMY_QUAD_SINGCORNER, HP_QUAD_SINGEDGE, HP_QUAD_0E_2VA, // V = 1100 HP_QUAD_0E_2VB, // V = 1010 HP_QUAD_0E_3V, HP_QUAD_0E_4V, // one edge: marked edge is always edge from vertex 1 to vertex 2 (E = 1000) HP_QUAD_1E_1VA, // vertex on beginning of edge: V = 1000 HP_QUAD_1E_1VB, // vertex on end of edge: V = 0100 HP_QUAD_1E_1VC, // V = 0010 HP_QUAD_1E_1VD, // V = 0001 HP_QUAD_1E_2VA, // V = 1100 HP_QUAD_1E_2VB, // V = 1010 HP_QUAD_1E_2VC, // V = 1001 HP_QUAD_1E_2VD, // V = 0110 HP_QUAD_1E_2VE, // V = 0101 HP_QUAD_1E_2VF, // V = 0011 HP_QUAD_1E_3VA, // V = 1110 HP_QUAD_1E_3VB, // V = 1101 HP_QUAD_1E_3VC, // V = 1011 HP_QUAD_1E_3VD, // V = 0111 HP_QUAD_1E_4V, // V = 1111 HP_QUAD_2E, // E = 1001, V = 1000 HP_QUAD_2E_1VA, // E = 1001, V = 1100 HP_QUAD_2E_1VB, // E = 1001, V = 1010 HP_QUAD_2E_1VC, // E = 1001, V = 1001 HP_QUAD_2E_2VA, // E = 1001, V = 1110 HP_QUAD_2E_2VB, // E = 1001, V = 1101 HP_QUAD_2E_2VC, // E = 1001, V = 1011 HP_QUAD_2E_3V, // E = 1001, V = 1111 HP_QUAD_2EB_0V, // E = 1010, V = 0000 HP_QUAD_2EB_1VA, // E = 1010, V = 1000 HP_QUAD_2EB_1VB, // E = 1010, V = 0100 HP_QUAD_2EB_2VA, // E = 1010, V = 1100 HP_QUAD_2EB_2VB, // E = 1010, V = 1010 HP_QUAD_2EB_2VC, // E = 1010, V = 1001 HP_QUAD_2EB_2VD, // E = 1010, V = 0101 HP_QUAD_2EB_3VA, // E = 1010, V = 1110 HP_QUAD_2EB_3VB, // E = 1010, V = 1101 HP_QUAD_2EB_4V, HP_QUAD_3E, // E = 1101, V = 1100 HP_QUAD_3E_3VA, // E = 1101, V = 1110 HP_QUAD_3E_3VB, // E = 1101, V = 1101 HP_QUAD_3E_4V, // E = 1101, V = 1111 HP_QUAD_4E, HP_TET = 100, // no singular vertex/edge HP_TET_0E_1V, // V1 HP_TET_0E_2V, // V1,2 HP_TET_0E_3V, // V1,2,3 HP_TET_0E_4V, // V1,2,3,4 HP_TET_1E_0V = 200, // E1-2 HP_TET_1E_1VA, // V1 HP_TET_1E_1VB, // V3 HP_TET_1E_2VA, // V1,2 HP_TET_1E_2VB, // V1,3 HP_TET_1E_2VC, // V1,4 HP_TET_1E_2VD, // V3,4 HP_TET_1E_3VA, // V1,2,3 HP_TET_1E_3VB, // V1,3,4 HP_TET_1E_4V, // V1,2,3,4 // 2 connected edges, additionally marked Vs HP_TET_2EA_0V = 220, // E1-2, E1-3 HP_TET_2EA_1VA, // V2 HP_TET_2EA_1VB, // V3 HP_TET_2EA_1VC, // V4 HP_TET_2EA_2VA, // V2,3 HP_TET_2EA_2VB, // V2,4 HP_TET_2EA_2VC, // V3,4 HP_TET_2EA_3V, // V2,3,4 // 2 opposite edges HP_TET_2EB_0V = 230, // E1-2, E3-4 HP_TET_2EB_1V, // V1 HP_TET_2EB_2VA, // V1,2 HP_TET_2EB_2VB, // V1,3 HP_TET_2EB_2VC, // V1,4 HP_TET_2EB_3V, // V1,2,3 HP_TET_2EB_4V, // V1,2,3,4 HP_TET_3EA_0V = 400, // E1-2, E1-3, E1-4, 3 edges connected HP_TET_3EA_1V, // V2 HP_TET_3EA_2V, // V2,3 HP_TET_3EA_3V, // V2,3,4 HP_TET_3EB_0V = 420, // E1-2, E1-4, E2-3 3 edges chain HP_TET_3EB_1V, // HP_TET_3EB_2V, // HP_TET_3EC_0V = 430, // 3 edges chain, alter HP_TET_3EC_1V, // 3 edges chain, alter HP_TET_3EC_2V, // 3 edges chain, alter HP_TET_1F_0E_0V = 500, // 1 singular face HP_TET_1F_0E_1VA, // 1 sing vertex in face (V2) HP_TET_1F_0E_1VB, // 1 sing vertex not in face (V1) HP_TET_1F_1EA_0V, // 1 sing edge not in face HP_TET_1F_1EB_0V, // 1 sing edge in face HP_TET_2F_0E_0V = 600, // 2 singular faces HP_PRISM = 1000, HP_PRISM_SINGEDGE, HP_PRISM_SINGEDGE_V12, HP_PRISM_SINGEDGE_H1, HP_PRISM_SINGEDGE_H12, HP_PRISM_1FA_0E_0V, // 1 singular trig face HP_PRISM_2FA_0E_0V, // 2 singular trig faces HP_PRISM_1FB_0E_0V, // 1 singular quad face 1-2-4-5 HP_PRISM_1FB_1EA_0V, // 1 singular quad face, edge is 1-2 HP_PRISM_1FA_1E_0V, HP_PRISM_2FA_1E_0V, HP_PRISM_1FA_1FB_0E_0V, HP_PRISM_2FA_1FB_0E_0V, HP_PRISM_1FA_1FB_1EA_0V, HP_PRISM_1FA_1FB_1EB_0V, HP_PRISM_2FA_1FB_1EA_0V, HP_PRISM_1FB_1EC_0V, HP_PRISM_1FA_1FB_1EC_0V, HP_PRISM_2FA_1FB_1EC_0V, HP_PRISM_1FB_2EA_0V, HP_PRISM_1FA_1FB_2EA_0V, HP_PRISM_2FA_1FB_2EA_0V, HP_PRISM_1FB_2EB_0V, HP_PRISM_1FA_1FB_2EB_0V, HP_PRISM_1FA_1FB_2EC_0V, HP_PRISM_2FA_1FB_2EB_0V, HP_PRISM_1FB_3E_0V, HP_PRISM_1FA_1FB_3E_0V, HP_PRISM_2FA_1FB_3E_0V, HP_PRISM_2FB_0E_0V, HP_PRISM_1FA_2FB_0E_0V, HP_PRISM_2FA_2FB_0E_0V, HP_PRISM_2FB_1EC_0V, HP_PRISM_1FA_2FB_1EC_0V, HP_PRISM_1FA_2FB_1EB_0V, HP_PRISM_2FA_2FB_1EC_0V, HP_PRISM_2FB_3E_0V, HP_PRISM_1FA_2FB_3E_0V, HP_PRISM_2FA_2FB_3E_0V, HP_PRISM_1FA_2E_0V, HP_PRISM_2FA_2E_0V, HP_PRISM_3E_0V, HP_PRISM_1FA_3E_0V, HP_PRISM_2FA_3E_0V, HP_PRISM_3FB_0V, HP_PRISM_1FA_3FB_0V, HP_PRISM_2FA_3FB_0V, HP_PRISM_3E_4EH, /* HP_PRISM_1FB_1EA_0V, // 1 singular quad face, edge is 1-4 HP_PRISM_1FB_1EB_0V, // 1 singular quad face, edge is 2-5 HP_PRISM_2F_0E_0V, // 2 singular quad faces */ HP_PYRAMID = 2000, HP_PYRAMID_0E_1V, HP_PYRAMID_EDGES, HP_PYRAMID_1FB_0E_1VA, // 1 trig face, top vertex HP_HEX = 3000, HP_HEX_0E_1V, HP_HEX_1E_1V, HP_HEX_1E_0V, HP_HEX_3E_0V, HP_HEX_1F_0E_0V, HP_HEX_1FA_1FB_0E_0V }; struct HPRef_Struct { HPREF_ELEMENT_TYPE geom; int (*splitedges)[3]; int (*splitfaces)[4]; int (*splitelements)[5]; HPREF_ELEMENT_TYPE * neweltypes; int (*newels)[8]; }; class HPRefElement { private: void Reset(void); public: HPRefElement (); HPRefElement(Element & el); HPRefElement(Element2d & el); HPRefElement(Segment & el); HPRefElement(HPRefElement & el); void SetType( HPREF_ELEMENT_TYPE t); // HPRefElement(HPRefElement & el, HPREF_ELEMENT_TYPE t); /* HPRefElement(HPRefElement & el, HPREF_ELEMENT_TYPE t) { type = t; HPRef_Struct * hprs = Get_HPRef_Struct(t); for (int i=0; igeom) { case HP_SEGM: np=2; sing_edge_left=0; sing_edge_right=0; break; case HP_QUAD: np=4; break; case HP_TRIG: np=3; break; case HP_HEX: np=8; break; case HP_PRISM: np=6; break; case HP_TET: np=4; break; case HP_PYRAMID: np=5; break; } index = el.index; levelx = el.levelx; levely = el.levely; levelz = el.levelz; type = el.type; coarse_elnr = el.coarse_elnr; singedge_left = el.singedge_left; singedge_right = el.singedge_left; } */ HPREF_ELEMENT_TYPE type; PointIndex pnums[8]; double param[8][3]; int index; int levelx; int levely; int levelz; int np; int coarse_elnr; int domin, domout; // he: needed for segment!! in 3d there should be surf1, surf2!! // int coarse_hpelnr; PointIndex & operator[](int i) { return(pnums[i]);} PointIndex & PNumMod(int i) { return pnums[(i-1) % np]; }; PointIndex & PNum(int i) {return pnums[(i-1)]; }; int GetIndex () const { return index; }; double singedge_left, singedge_right; // EdgePointGeomInfo epgeominfo[2]; }; DLL_HEADER extern void HPRefinement (Mesh & mesh, Refinement * ref, int levels, double fac1=0.125, bool setorders=true, bool ref_level = false); #endif netgen-6.2.1804/libsrc/meshing/bcfunctions.hpp0000644000175000017500000000423513272137567017747 0ustar kurtkurt#ifndef FILE_BCFUNCTIONS #define FILE_BCFUNCTIONS // Philippose - 14/03/2009 // Auxiliary functions for OCC Geometry // Use this file and the corresponding ".cpp" // file to add miscellaneous functionality // to the OpenCascade Geometry support in Netgen namespace netgen { /*! \brief Automatically assign boundary conditions for meshes This function allows the boundary condition numbers of a mesh created in Netgen to be automatically assigned based on the colours of each face. Currently, two algorithms are utilised to assign the BC Properties: 1. Automatic assignment using a user defined colour profile file which defines which RGB colours are to be assigned to which BC Property number - A default profile file exists in the Netgen folder called "netgen.ocf" 2. The second algorithm uses the following automated algorithm: - Extract all the colours present in the mesh - Use colour index 0 (zero) for all faces with no colour defined - Calculate the number of faces of the surface mesh for each colour - Sort the number of surface elements in ascending order, with the colour indices as a slave - Use the indices of the sorted array as the BC property number Example: If there are 3 colours, present in the mesh and the number of surface elements for each colour are: - Colour 0: 8500 - Colour 1: 120 - Colour 2: 2200 - Colour 3: 575 The above is sorted in ascending order and assigned as BC Properties: - BC Prop 0: 120 : Colour 1 - BC Prop 1: 575 : Colour 3 - BC Prop 2: 2200 : Colour 2 - BC Prop 3: 8500 : Colour 0 (no colour defined) */ //extern void OCCAutoColourBcProps(Mesh & mesh, OCCGeometry & occgeometry, const char *occcolourfile); extern DLL_HEADER void AutoColourBcProps(Mesh & mesh, const char *bccolourfile); extern DLL_HEADER void GetFaceColours(Mesh & mesh, Array & face_colours); extern DLL_HEADER bool ColourMatch(Vec3d col1, Vec3d col2, double eps = 2.5e-05); } #endif netgen-6.2.1804/libsrc/meshing/findip.hpp0000644000175000017500000000776313272137567016714 0ustar kurtkurt// find inner point inline void Minimize (const Array & a, const Array & c, int * act, Vec<3> & x, double & f, int * sol) { int act1[4]; Mat<3> m, inv; Vec<3> rs, xmax, center; f = 1e99; for (int j = 0; j < 5; j++) { for (int hk = 0, k = 0; hk < 4; hk++) { if (hk == j) k++; act1[hk] = act[k]; k++; } for (int k = 0; k < 3; k++) { m(k, 0) = a[act1[0]].X() - a[act1[k+1]].X(); m(k, 1) = a[act1[0]].Y() - a[act1[k+1]].Y(); m(k, 2) = a[act1[0]].Z() - a[act1[k+1]].Z(); rs(k) = c[act1[k+1]] - c[act1[0]]; } /* (*testout) << "act1 = " << act1[0] << " " << act1[1] << " " << act1[2] << " " << act1[3] << endl; (*testout) << "Det = " << Det(m) << endl; */ if (fabs (Det (m)) > 1e-10) { CalcInverse (m, inv); xmax = inv * rs; double fmax = -1e10; for (int k = 0; k < 5; k++) { double hd = xmax(0) * a[act[k]].X() + xmax(1) * a[act[k]].Y() + xmax(2) * a[act[k]].Z() + c[act[k]]; if (hd > fmax) fmax = hd; } if (fmax < f) { f = fmax; x = xmax; for (int k = 0; k < 4; k++) sol[k] = act1[k]; } } } } template inline int FindInnerPoint (POINTArray & points, FACEArray & faces, Point3d & p) { static int timer = NgProfiler::CreateTimer ("FindInnerPoint"); NgProfiler::RegionTimer reg (timer); Array a; Array c; Mat<3> m, inv; Vec<3> rs, x = 0.0, center; double f; int nf = faces.Size(); // minimize_x max_i a_i x + c_i a.SetSize (nf+4); c.SetSize (nf+4); for (int i = 0; i < nf; i++) { Point3d p1 = points.Get(faces[i][0]); a[i] = Cross (points.Get(faces[i][1]) - p1, points.Get(faces[i][2]) - p1); a[i] /= a[i].Length(); c[i] = - (a[i].X() * p1.X() + a[i].Y() * p1.Y() + a[i].Z() * p1.Z()); } /* center = 0; for (int i = 0; i < points.Size(); i++) center += Vec<3> (points[i]); center /= points.Size(); */ center = 0; for (int i = 0; i < faces.Size(); i++) for (int j = 0; j < 3; j++) center += Vec<3> (points.Get(faces[i][j])); center /= (3*faces.Size()); // (*testout) << "center = " << center << endl; double hmax = 0; for (int i = 0; i < nf; i++) { // const Element2d & el = faces[i]; // (*testout) << "el[" << i << "] = " << el << endl; for (int j = 1; j <= 3; j++) { double hi = Dist (points.Get(faces[i].PNumMod(j)), points.Get(faces[i].PNumMod(j+1))); if (hi > hmax) hmax = hi; } } // (*testout) << "hmax = " << hmax << endl; a[nf] = Vec<3> (1, 0, 0); c[nf] = -center(0) - hmax; a[nf+1] = Vec<3> (0, 1, 0); c[nf+1] = -center(1) - hmax; a[nf+2] = Vec<3> (0, 0, 1); c[nf+2] = -center(2) - hmax; a[nf+3] = Vec<3> (-1, -1, -1); c[nf+3] = center(0)+center(1)+center(2)-3*hmax; /* (*testout) << "findip, a now = " << endl << a << endl; (*testout) << "findip, c now = " << endl << c << endl; */ int act[5] = { 0, nf, nf+1, nf+2, nf+3 }; int sol[4]; while (1) { /* (*testout) << "try "; for (int j = 0; j < 5; j++) (*testout) << act[j] << " "; */ Minimize (a, c, act, x, f, sol); /* (*testout) << endl << "sol = "; for (int j = 0; j < 4; j++) (*testout) << sol[j] << " "; (*testout) << " fmin = " << f << endl; */ for (int j = 0; j < 4; j++) act[j] = sol[j]; bool found = 0; double maxval = f; for (int j = 0; j < nf; j++) { double val = x(0) * a[j].X() + x(1) * a[j].Y() + x(2) * a[j].Z() + c[j]; if (val > maxval + hmax * 1e-6) { found = 1; maxval = val; act[4] = j; } } // (*testout) << "maxval = " << maxval << endl; if (!found) break; } // cout << "converged, f = " << f << endl; p = Point3d (x(0), x(1), x(2)); // (*testout) << "findip, f = " << f << ", hmax = " << hmax << endl; return (f < -1e-5 * hmax); } netgen-6.2.1804/libsrc/meshing/ruler2.hpp0000644000175000017500000000731413272137567016646 0ustar kurtkurt#ifndef FILE_NETRULE #define FILE_NETRULE /// class netrule { private: /// typedef struct tf { float f1, f2, f3; } threefloat; class threeint { public: int i1, i2, i3; threeint() { } threeint(int ai1, int ai2, int ai3) { i1 = ai1; i2 = ai2; i3 = ai3; } }; /// int quality; /// char * name; /// Array points; /// Array lines; /// Array freezone, freezonelimit; /// Array*> freezone_i; /// Array transfreezone; /// Array dellines; /// Array elements; /// Array tolerances, linetolerances; /// Array orientations; /// DenseMatrix oldutonewu, oldutofreearea, oldutofreearealimit; /// Array oldutofreearea_i; /// MatrixFixWidth<3> freesetinequ; /// Array linevecs; /// int noldp, noldl; /// float fzminx, fzmaxx, fzminy, fzmaxy; /// topological distance of line to base element Array lnearness; public: /// netrule (); /// ~netrule(); /// int GetNP () const { return points.Size(); } /// int GetNL () const { return lines.Size(); } /// int GetNE () const { return elements.Size(); } /// int GetNOldP () const { return noldp; } /// int GetNOldL () const { return noldl; } /// int GetNDelL () const { return dellines.Size(); } /// int GetNOrientations () const { return orientations.Size(); } /// int GetQuality () const { return quality; } /// int GetLNearness (int li) const { return lnearness.Get(li); } /// const Point2d & GetPoint (int i) const { return points.Get(i); } /// const INDEX_2 & GetLine (int i) const { return lines.Get(i); } /// const Element2d & GetElement (int i) const { return elements.Get(i); } /// const threeint & GetOrientation (int i) const { return orientations.Get(i); } /// int GetDelLine (int i) const { return dellines.Get(i); } /// const Array & GetDelLines() const { return dellines; } /// void GetFreeZone (Array & afreearea); /// double CalcPointDist (int pi, const Point2d & p) const { double dx = p.X() - points.Get(pi).X(); double dy = p.Y() - points.Get(pi).Y(); const threefloat * tfp = &tolerances.Get(pi); return tfp->f1 * dx * dx + tfp->f2 * dx * dy + tfp->f3 * dy * dy; } /// float CalcLineError (int li, const Vec2d & v) const; /// void SetFreeZoneTransformation (const Vector & u, int tolclass); /// bool IsInFreeZone (const Point2d & p) const { if (p.X() < fzminx || p.X() > fzmaxx || p.Y() < fzminy || p.Y() > fzmaxy) return 0; for (int i = 0; i < transfreezone.Size(); i++) { if (freesetinequ(i, 0) * p.X() + freesetinequ(i, 1) * p.Y() + freesetinequ(i, 2) > 0) return 0; } return 1; } /// int IsLineInFreeZone (const Point2d & p1, const Point2d & p2) const { if ( (p1.X() > fzmaxx && p2.X() > fzmaxx) || (p1.X() < fzminx && p2.X() < fzminx) || (p1.Y() > fzmaxy && p2.Y() > fzmaxy) || (p1.Y() < fzminy && p2.Y() < fzminy) ) return 0; return IsLineInFreeZone2 (p1, p2); } /// int IsLineInFreeZone2 (const Point2d & p1, const Point2d & p2) const; /// int ConvexFreeZone () const; /// const Array & GetTransFreeZone () { return transfreezone; } /// int GetPointNr (int ln, int endp) const { return lines.Get(ln).I(endp); } /// const DenseMatrix & GetOldUToNewU () const { return oldutonewu; } /// const DenseMatrix & GetOldUToFreeArea () const { return oldutofreearea; } /// const char * Name () const { return name; } /// void LoadRule (istream & ist); }; /** Draws 2D rules. Visual testing of 2D meshing rules */ extern void DrawRules (); #endif netgen-6.2.1804/libsrc/meshing/meshtool.cpp0000644000175000017500000004771413272137567017270 0ustar kurtkurt#include #include "meshing.hpp" #include #include namespace netgen { int CheckSurfaceMesh (const Mesh & mesh) { PrintMessage (3, "Check Surface mesh"); int nf = mesh.GetNSE(); INDEX_2_HASHTABLE edges(nf+2); int i, j; INDEX_2 i2; int cnt1 = 0, cnt2 = 0; for (i = 1; i <= nf; i++) for (j = 1; j <= 3; j++) { i2.I1() = mesh.SurfaceElement(i).PNumMod(j); i2.I2() = mesh.SurfaceElement(i).PNumMod(j+1); if (edges.Used(i2)) { int hi; hi = edges.Get(i2); if (hi != 1) PrintSysError ("CheckSurfaceMesh, hi = ", hi); edges.Set(i2, 2); cnt2++; } else { Swap (i2.I1(), i2.I2()); edges.Set(i2, 1); cnt1++; } } if (cnt1 != cnt2) { PrintUserError ("Surface mesh not consistent"); // MyBeep(2); // (*mycout) << "cnt1 = " << cnt1 << " cnt2 = " << cnt2 << endl; return 0; } return 1; } int CheckSurfaceMesh2 (const Mesh & mesh) { int i, j, k; const Point<3> *tri1[3], *tri2[3]; for (i = 1; i <= mesh.GetNOpenElements(); i++) { PrintDot (); for (j = 1; j < i; j++) { for (k = 1; k <= 3; k++) { tri1[k-1] = &mesh.Point (mesh.OpenElement(i).PNum(k)); tri2[k-1] = &mesh.Point (mesh.OpenElement(j).PNum(k)); } if (IntersectTriangleTriangle (&tri1[0], &tri2[0])) { PrintSysError ("Surface elements are intersecting"); (*testout) << "Intersecting: " << endl; for (k = 0; k <= 2; k++) (*testout) << *tri1[k] << " "; (*testout) << endl; for (k = 0; k <= 2; k++) (*testout) << *tri2[k] << " "; (*testout) << endl; } } } return 0; } static double TriangleQualityInst (const Point3d & p1, const Point3d & p2, const Point3d & p3) { // quality 0 (worst) .. 1 (optimal) Vec3d v1, v2, v3; double s1, s2, s3; double an1, an2, an3; v1 = p2 - p1; v2 = p3 - p1; v3 = p3 - p2; an1 = Angle (v1, v2); v1 *= -1; an2 = Angle (v1, v3); an3 = Angle (v2, v3); s1 = sin (an1/2); s2 = sin (an2/2); s3 = sin (an3/2); return 8 * s1 * s2 * s3; } void MeshQuality2d (const Mesh & mesh) { int ncl = 20, cl; Array incl(ncl); INDEX i; SurfaceElementIndex sei; double qual; incl = 0; for (sei = 0; sei < mesh.GetNSE(); sei++) { qual = TriangleQualityInst (mesh[mesh[sei][0]], mesh[mesh[sei][1]], mesh[mesh[sei][2]]); cl = int ( (ncl-1e-3) * qual ) + 1; incl.Elem(cl)++; } (*testout) << endl << endl; (*testout) << "Points: " << mesh.GetNP() << endl; (*testout) << "Surface Elements: " << mesh.GetNSE() << endl; (*testout) << endl; (*testout) << "Elements in qualityclasses:" << endl; // (*testout).precision(2); (*testout) << setprecision(2); for (i = 1; i <= ncl; i++) { (*testout) << setw(4) << double (i-1)/ncl << " - " << setw(4) << double (i) / ncl << ": " << incl.Get(i) << endl; } } static double TetElementQuality (const Point3d & p1, const Point3d & p2, const Point3d & p3, const Point3d & p4) { double vol, l, l4, l5, l6; Vec3d v1 = p2 - p1; Vec3d v2 = p3 - p1; Vec3d v3 = p4 - p1; vol = fabs ((Cross (v1, v2) * v3)) / 6; l4 = Dist (p2, p3); l5 = Dist (p2, p4); l6 = Dist (p3, p4); l = v1.Length() + v2.Length() + v3.Length() + l4 + l5 + l6; if (vol <= 1e-8 * l * l * l) return 1e-10; return vol/(l*l*l) * 1832.82; // 6^4 * sqrt(2) } // static double teterrpow = 2; double CalcTetBadness (const Point3d & p1, const Point3d & p2, const Point3d & p3, const Point3d & p4, double h, const MeshingParameters & mp) { double vol, l, ll, lll, ll1, ll2, ll3, ll4, ll5, ll6; double err; Vec3d v1 (p1, p2); Vec3d v2 (p1, p3); Vec3d v3 (p1, p4); vol = Determinant (v1, v2, v3) * (-0.166666666666666); ll1 = v1.Length2(); ll2 = v2.Length2(); ll3 = v3.Length2(); ll4 = Dist2 (p2, p3); ll5 = Dist2 (p2, p4); ll6 = Dist2 (p3, p4); ll = ll1 + ll2 + ll3 + ll4 + ll5 + ll6; l = sqrt (ll); lll = l * ll; if (vol <= 1e-24 * lll) return 1e24; err = 0.0080187537 * lll / vol; // sqrt(216) / (6^4 * sqrt(2)) if (h > 0) err += ll / (h * h) + h * h * ( 1 / ll1 + 1 / ll2 + 1 / ll3 + 1 / ll4 + 1 / ll5 + 1 / ll6 ) - 12; double teterrpow = mp.opterrpow; if(teterrpow < 1) teterrpow = 1; if (teterrpow == 1) return err; if (teterrpow == 2) return err*err; return pow (err, teterrpow); } double CalcTetBadnessGrad (const Point3d & p1, const Point3d & p2, const Point3d & p3, const Point3d & p4, double h, int pi, Vec<3> & grad, const MeshingParameters & mp) { double vol, l, ll, lll; double err; const Point3d *pp1, *pp2, *pp3, *pp4; pp1 = &p1; pp2 = &p2; pp3 = &p3; pp4 = &p4; switch (pi) { case 2: { swap (pp1, pp2); swap (pp3, pp4); break; } case 3: { swap (pp1, pp3); swap (pp2, pp4); break; } case 4: { swap (pp1, pp4); swap (pp3, pp2); break; } } Vec3d v1 (*pp1, *pp2); Vec3d v2 (*pp1, *pp3); Vec3d v3 (*pp1, *pp4); Vec3d v4 (*pp2, *pp3); Vec3d v5 (*pp2, *pp4); Vec3d v6 (*pp3, *pp4); vol = Determinant (v1, v2, v3) * (-0.166666666666666); Vec3d gradvol; Cross (v5, v4, gradvol); gradvol *= (-1.0/6.0); double ll1 = v1.Length2(); double ll2 = v2.Length2(); double ll3 = v3.Length2(); double ll4 = v4.Length2(); double ll5 = v5.Length2(); double ll6 = v6.Length2(); ll = ll1 + ll2 + ll3 + ll4 + ll5 + ll6; l = sqrt (ll); lll = l * ll; if (vol <= 1e-24 * lll) { grad = Vec3d (0, 0, 0); return 1e24; } Vec3d gradll1 (*pp2, *pp1); Vec3d gradll2 (*pp3, *pp1); Vec3d gradll3 (*pp4, *pp1); gradll1 *= 2; gradll2 *= 2; gradll3 *= 2; Vec3d gradll (gradll1); gradll += gradll2; gradll += gradll3; /* Vec3d gradll; gradll = v1+v2+v3; gradll *= -2; */ err = 0.0080187537 * lll / vol; gradll *= (0.0080187537 * 1.5 * l / vol); Vec3d graderr(gradll); gradvol *= ( -0.0080187537 * lll / (vol * vol) ); graderr += gradvol; if (h > 0) { /* Vec3d gradll1 (*pp2, *pp1); Vec3d gradll2 (*pp3, *pp1); Vec3d gradll3 (*pp4, *pp1); gradll1 *= 2; gradll2 *= 2; gradll3 *= 2; */ err += ll / (h*h) + h*h * ( 1 / ll1 + 1 / ll2 + 1 / ll3 + 1 / ll4 + 1 / ll5 + 1 / ll6 ) - 12; graderr += (1/(h*h) - h*h/(ll1*ll1)) * gradll1; graderr += (1/(h*h) - h*h/(ll2*ll2)) * gradll2; graderr += (1/(h*h) - h*h/(ll3*ll3)) * gradll3; } double errpow; double teterrpow = mp.opterrpow; if(teterrpow < 1) teterrpow = 1; if (teterrpow == 1) { errpow = err; grad = graderr; } else if (teterrpow == 2) { errpow = err*err; grad = (2 * err) * graderr; } else { errpow = pow (err, teterrpow); grad = (teterrpow * errpow / err) * graderr; } return errpow; } /* double CalcTetBadness (const Point3d & p1, const Point3d & p2, const Point3d & p3, const Point3d & p4, double h) { double vol, l; double err; Vec3d v1 (p1, p2); Vec3d v2 (p1, p3); Vec3d v3 (p1, p4); vol = -Determinant (v1, v2, v3) / 6; double l1 = v1.Length(); double l2 = v2.Length(); double l3 = v3.Length(); double l4 = Dist (p2, p3); double l5 = Dist (p2, p4); double l6 = Dist (p3, p4); l = l1 + l2 + l3 + l4 + l5 + l6; // just for timing // l += 1e-40 * CalcTetBadnessNew (p1, p2, p3, p4, h); if (vol <= 1e-24 * l * l * l) { return 1e24; } err = (l*l*l) / (1832.82 * vol); // 6^4 * sqrt(2) if (h > 0) err += l / h + h * (1 / l1 + 1/l2 + 1/l3 + 1/l4 + 1/l5 + 1/l6) - 12; return pow (err, teterrpow); } double CalcTetBadnessGrad (const Point3d & p1, const Point3d & p2, const Point3d & p3, const Point3d & p4, double h, int pi, Vec3d & grad) { double vol, l; double err; const Point3d *pp1, *pp2, *pp3, *pp4; pp1 = &p1; pp2 = &p2; pp3 = &p3; pp4 = &p4; switch (pi) { case 2: { swap (pp1, pp2); swap (pp3, pp4); break; } case 3: { swap (pp1, pp3); swap (pp2, pp4); break; } case 4: { swap (pp1, pp4); swap (pp3, pp2); break; } } Vec3d v1 (*pp1, *pp2); Vec3d v2 (*pp1, *pp3); Vec3d v3 (*pp1, *pp4); Vec3d v4 (*pp2, *pp3); Vec3d v5 (*pp2, *pp4); Vec3d v6 (*pp3, *pp4); // Vec3d n; // Cross (v1, v2, n); // vol = - (n * v3) / 6; vol = -Determinant (v1, v2, v3) / 6; Vec3d gradvol; Cross (v5, v4, gradvol); gradvol *= (-1.0/6.0); double l1 = v1.Length(); double l2 = v2.Length(); double l3 = v3.Length(); double l4 = v4.Length(); double l5 = v5.Length(); double l6 = v6.Length(); l = l1 + l2 + l3 +l4 + l5 + l6; Vec3d gradl1 (*pp2, *pp1); Vec3d gradl2 (*pp3, *pp1); Vec3d gradl3 (*pp4, *pp1); gradl1 /= l1; gradl2 /= l2; gradl3 /= l3; Vec3d gradl (gradl1); gradl += gradl2; gradl += gradl3; if (vol <= 1e-24 * l * l * l) { grad = Vec3d (0, 0, 0); return 1e24; } double c1 = 1.0 / 1832.82; // 6^4 * sqrt(2) err = c1 * (l*l*l) / vol; gradl *= (c1 * 3 * l * l / vol); Vec3d graderr(gradl); gradvol *= ( -c1 * l * l * l / (vol * vol) ); graderr+= gradvol; if (h > 0) { err += l / h + h * ( 1 / l1 + 1 / l2 + 1 / l3 + 1 / l4 + 1 / l5 + 1 / l6 ) - 12; graderr += (1/h - h/(l1*l1)) * gradl1; graderr += (1/h - h/(l2*l2)) * gradl2; graderr += (1/h - h/(l3*l3)) * gradl3; cout << "?"; } double errpow = pow (err, teterrpow); grad = (teterrpow * errpow / err) * graderr; return errpow; } */ /* double CalcVolume (const Array & points, const Element & el) { Vec3d v1 = points.Get(el.PNum(2)) - points.Get(el.PNum(1)); Vec3d v2 = points.Get(el.PNum(3)) - points.Get(el.PNum(1)); Vec3d v3 = points.Get(el.PNum(4)) - points.Get(el.PNum(1)); return -(Cross (v1, v2) * v3) / 6; } */ double CalcVolume (const Array & points, const Array & elements) { double vol; Vec3d v1, v2, v3; vol = 0; for (int i = 0; i < elements.Size(); i++) { v1 = points.Get(elements[i][1]) - points.Get(elements[i][0]); v2 = points.Get(elements[i][2]) - points.Get(elements[i][0]); v3 = points.Get(elements[i][3]) - points.Get(elements[i][0]); vol -= (Cross (v1, v2) * v3) / 6; } return vol; } void MeshQuality3d (const Mesh & mesh, Array * inclass) { int ncl = 20; signed int cl; Array incl(ncl); INDEX i; double qual; double sum = 0; int nontet = 0; for (i = 1; i <= incl.Size(); i++) incl.Elem(i) = 0; for (ElementIndex ei = 0; ei < mesh.GetNE(); ei++) { if (mesh[ei].GetType() != TET) { nontet++; continue; } qual = TetElementQuality (mesh.Point(mesh[ei][0]), mesh.Point(mesh[ei][1]), mesh.Point(mesh[ei][2]), mesh.Point(mesh[ei][3])); if (qual > 1) qual = 1; cl = int (ncl * qual ) + 1; if (cl < 1) cl = 1; if (cl > ncl) cl = ncl; incl.Elem(cl)++; if (inclass) (*inclass)[ei] = cl; sum += 1/qual; } (*testout) << endl << endl; (*testout) << "Points: " << mesh.GetNP() << endl; (*testout) << "Volume Elements: " << mesh.GetNE() << endl; if (nontet) (*testout) << nontet << " non tetrahedral elements" << endl; (*testout) << endl; (*testout) << "Volume elements in qualityclasses:" << endl; (*testout) << setprecision(2); for (i = 1; i <= ncl; i++) { (*testout) << setw(4) << double (i-1)/ncl << " - " << setw(4) << double (i) / ncl << ": " << incl.Get(i) << endl; } (*testout) << "total error: " << sum << endl; } void SaveEdges (const Mesh & mesh, const char * geomfile, double h, char * filename) { ofstream of (filename); int i; const Segment * seg; of << "edges" << endl; of << geomfile << endl; of << h << endl; of << mesh.GetNP() << endl; for (i = 1; i <= mesh.GetNP(); i++) of << mesh.Point(i)(0) << " " << mesh.Point(i)(1) << " " << mesh.Point(i)(2) << "\n"; of << 2 * mesh.GetNSeg() << endl; for (i = 1; i <= mesh.GetNSeg(); i++) { seg = &mesh.LineSegment(i); of << (*seg)[1] << " " << (*seg)[0] << " " << seg->si << "\n"; } } void SaveSurfaceMesh (const Mesh & mesh, double h, char * filename) { INDEX i; ofstream outfile(filename); outfile << "surfacemesh" << endl; outfile << h << endl; outfile << mesh.GetNP() << endl; for (i = 1; i <= mesh.GetNP(); i++) outfile << mesh.Point(i)(0) << " " << mesh.Point(i)(1) << " " << mesh.Point(i)(2) << endl; outfile << mesh.GetNSE() << endl; for (i = 1; i <= mesh.GetNSE(); i++) { const Element2d & el = mesh.SurfaceElement(i); if (mesh.GetFaceDescriptor(el.GetIndex()).DomainOut() == 0) outfile << mesh.SurfaceElement(i).PNum(1) << " " << mesh.SurfaceElement(i).PNum(2) << " " << mesh.SurfaceElement(i).PNum(3) << endl; if (mesh.GetFaceDescriptor(el.GetIndex()).DomainIn() == 0) outfile << mesh.SurfaceElement(i).PNum(1) << " " << mesh.SurfaceElement(i).PNum(3) << " " << mesh.SurfaceElement(i).PNum(2) << endl; } } #ifdef OLD void Save2DMesh ( const Mesh & mesh2d, const Array * splines, ostream & outfile) { int i, j; outfile.precision (6); outfile << "areamesh2" << endl; outfile << endl; outfile << mesh2d.GetNSeg() << endl; for (i = 1; i <= mesh2d.GetNSeg(); i++) outfile << mesh2d.LineSegment(i).si << " " << mesh2d.LineSegment(i)[0] << " " << mesh2d.LineSegment(i)[1] << " " << endl; outfile << mesh2d.GetNSE() << endl; for (i = 1; i <= mesh2d.GetNSE(); i++) { outfile << mesh2d.SurfaceElement(i).GetIndex() << " "; outfile << mesh2d.SurfaceElement(i).GetNP() << " "; for (j = 1; j <= mesh2d.SurfaceElement(i).GetNP(); j++) outfile << mesh2d.SurfaceElement(i).PNum(j) << " "; outfile << endl; } outfile << mesh2d.GetNP() << endl; for (i = 1; i <= mesh2d.GetNP(); i++) outfile << mesh2d.Point(i).X() << " " << mesh2d.Point(i).Y() << endl; if (splines) { outfile << splines->Size() << endl; for (i = 1; i <= splines->Size(); i++) splines->Get(i) -> PrintCoeff (outfile); } else outfile << "0" << endl; } #endif void SaveVolumeMesh (const Mesh & mesh, const NetgenGeometry & geometry, char * filename) { INDEX i; ofstream outfile(filename); outfile << "volumemesh" << endl; outfile << mesh.GetNSE() << endl; for (i = 1; i <= mesh.GetNSE(); i++) { if (mesh.SurfaceElement(i).GetIndex()) outfile << mesh.GetFaceDescriptor(mesh.SurfaceElement(i).GetIndex ()).SurfNr() << "\t"; else outfile << "0" << "\t"; outfile << mesh.SurfaceElement(i)[0] << " " << mesh.SurfaceElement(i)[1] << " " << mesh.SurfaceElement(i)[2] << endl; } outfile << mesh.GetNE() << endl; for (ElementIndex ei = 0; ei < mesh.GetNE(); ei++) outfile << mesh[ei].GetIndex() << "\t" << mesh[ei][0] << " " << mesh[ei][1] << " " << mesh[ei][2] << " " << mesh[ei][3] << endl; outfile << mesh.GetNP() << endl; for (i = 1; i <= mesh.GetNP(); i++) outfile << mesh.Point(i)(0) << " " << mesh.Point(i)(1) << " " << mesh.Point(i)(2) << endl; #ifdef SOLIDGEOM outfile << geometry.GetNSurf() << endl; for (i = 1; i <= geometry.GetNSurf(); i++) geometry.GetSurface(i) -> Print (outfile); #endif } int CheckCode () { return 1; /* char st[100]; ifstream ist("pw"); if (!ist.good()) return 0; ist >> st; if (strcmp (st, "JKULinz") == 0) return 1; return 0; */ } /* ******************** CheckMesh ******************************* */ /// Checks, whether mesh contains a valid 3d mesh int CheckMesh3D (const Mesh & mesh) { INDEX_3_HASHTABLE faceused(mesh.GetNE()/3); INDEX i; int j, k, l; INDEX_3 i3; int ok = 1; ElementIndex ei; for (i = 1; i <= mesh.GetNSE(); i++) { const Element2d & el = mesh.SurfaceElement(i); if (mesh.GetFaceDescriptor(el.GetIndex()).DomainIn() == 0 || mesh.GetFaceDescriptor(el.GetIndex()).DomainOut() == 0) { for (j = 1; j <= 3; j++) i3.I(j) = el.PNum(j); i3.Sort(); faceused.Set (i3, 1); } } for (ei = 0; ei < mesh.GetNE(); ei++) { const Element & el = mesh[ei]; for (j = 1; j <= 4; j++) { l = 0; for (k = 1; k <= 4; k++) { if (j != k) { l++; i3.I(l) = el.PNum(k); } } i3.Sort(); if (faceused.Used(i3)) faceused.Set(i3, faceused.Get(i3)+1); else faceused.Set (i3, 1); } } for (i = 1; i <= mesh.GetNSE(); i++) { const Element2d & el = mesh.SurfaceElement(i); for (j = 1; j <= 3; j++) i3.I(j) = el.PNum(j); i3.Sort(); k = faceused.Get (i3); if (k != 2) { ok = 0; (*testout) << "face " << i << " with points " << i3.I1() << "-" << i3.I2() << "-" << i3.I3() << " has " << k << " elements" << endl; } } for (ei = 0; ei < mesh.GetNE(); ei++) { const Element & el = mesh[ei]; for (j = 1; j <= 4; j++) { l = 0; for (k = 1; k <= 4; k++) { if (j != k) { l++; i3.I(l) = el.PNum(k); } } i3.Sort(); k = faceused.Get(i3); if (k != 2) { ok = 0; (*testout) << "element " << ei << " with face " << i3.I1() << "-" << i3.I2() << "-" << i3.I3() << " has " << k << " elements" << endl; } } } /* for (i = 1; i <= faceused.GetNBags(); i++) for (j = 1; j <= faceused.GetBagSize(i); j++) { faceused.GetData(i, j, i3, k); if (k != 2) { (*testout) << "Face: " << i3.I1() << "-" << i3.I2() << "-" << i3.I3() << " has " << k << " Faces " << endl; cerr << "Face Error" << endl; ok = 0; } } */ if (!ok) { (*testout) << "surfelements: " << endl; for (i = 1; i <= mesh.GetNSE(); i++) { const Element2d & el = mesh.SurfaceElement(i); (*testout) << setw(5) << i << ":" << setw(6) << el.GetIndex() << setw(6) << el.PNum(1) << setw(4) << el.PNum(2) << setw(4) << el.PNum(3) << endl; } (*testout) << "volelements: " << endl; for (ei = 0; ei < mesh.GetNE(); ei++) { const Element & el = mesh[ei]; (*testout) << setw(5) << i << ":" << setw(6) << el.GetIndex() << setw(6) << el[0] << setw(4) << el[1] << setw(4) << el[2] << setw(4) << el[3] << endl; } } return ok; } void RemoveProblem (Mesh & mesh, int domainnr) { int i, j, k; mesh.FindOpenElements(domainnr); int np = mesh.GetNP(); BitArrayChar ppoints(np); // int ndom = mesh.GetNDomains(); PrintMessage (3, "Elements before Remove: ", mesh.GetNE()); // for (k = 1; k <= ndom; k++) k = domainnr; { ppoints.Clear(); for (i = 1; i <= mesh.GetNOpenElements(); i++) { const Element2d & sel = mesh.OpenElement(i); if (sel.GetIndex() == k) { for (j = 1; j <= sel.GetNP(); j++) ppoints.Set (sel.PNum(j)); } } for (ElementIndex ei = 0; ei < mesh.GetNE(); ei++) { const Element & el = mesh[ei]; if (el.GetIndex() == k) { int todel = 0; for (j = 0; j < el.GetNP(); j++) if (ppoints.Test (el[j])) todel = 1; if (el.GetNP() != 4) todel = 0; if (todel) { mesh[ei].Delete(); // ei--; } } } } mesh.Compress(); PrintMessage (3, "Elements after Remove: ", mesh.GetNE()); } } netgen-6.2.1804/libsrc/meshing/specials.hpp0000644000175000017500000000035413272137567017233 0ustar kurtkurt#ifndef FILE_SPECIALS #define FILE_SPECIALS /* Very special implementations .. */ /// DLL_HEADER extern void CutOffAndCombine (Mesh & mesh, const Mesh & othermesh); DLL_HEADER extern void HelmholtzMesh (Mesh & mesh); #endif netgen-6.2.1804/libsrc/meshing/improve2gen.cpp0000644000175000017500000002644713272137567017673 0ustar kurtkurt#include #include "meshing.hpp" #include namespace netgen { class ImprovementRule { public: Array oldels; Array newels; Array deledges; Array incelsonnode; Array reused; int bonus; int onp; }; void MeshOptimize2d :: GenericImprove (Mesh & mesh) { if (!faceindex) { if (writestatus) PrintMessage (3, "Generic Improve"); for (faceindex = 1; faceindex <= mesh.GetNFD(); faceindex++) GenericImprove (mesh); faceindex = 0; } // int j, k, l, ri; int np = mesh.GetNP(); int ne = mesh.GetNSE(); // SurfaceElementIndex sei; // for (SurfaceElementIndex sei = 0; sei < ne; sei++) // { // const Element2d & el = mesh[sei]; // (*testout) << "element " << sei << ": " < rules; Array elmap; Array elrot; Array pmap; Array pgi; int surfnr = mesh.GetFaceDescriptor (faceindex).SurfNr(); ImprovementRule * r1; // 2 triangles to quad r1 = new ImprovementRule; r1->oldels.Append (Element2d (1, 2, 3)); r1->oldels.Append (Element2d (3, 2, 4)); r1->newels.Append (Element2d (1, 2, 4, 3)); r1->deledges.Append (INDEX_2 (2,3)); r1->onp = 4; r1->bonus = 2; rules.Append (r1); // 2 quad to 1 quad r1 = new ImprovementRule; r1->oldels.Append (Element2d (1, 2, 3, 4)); r1->oldels.Append (Element2d (4, 3, 2, 5)); r1->newels.Append (Element2d (1, 2, 5, 4)); r1->deledges.Append (INDEX_2 (2, 3)); r1->deledges.Append (INDEX_2 (3, 4)); r1->onp = 5; r1->bonus = 0; rules.Append (r1); // swap quads r1 = new ImprovementRule; r1->oldels.Append (Element2d (1, 2, 3, 4)); r1->oldels.Append (Element2d (3, 2, 5, 6)); r1->newels.Append (Element2d (1, 6, 3, 4)); r1->newels.Append (Element2d (1, 2, 5, 6)); r1->deledges.Append (INDEX_2 (2, 3)); r1->onp = 6; r1->bonus = 0; rules.Append (r1); // three quads to 2 r1 = new ImprovementRule; r1->oldels.Append (Element2d (1, 2, 3, 4)); r1->oldels.Append (Element2d (2, 5, 6, 3)); r1->oldels.Append (Element2d (3, 6, 7, 4)); r1->newels.Append (Element2d (1, 2, 5, 4)); r1->newels.Append (Element2d (4, 5, 6, 7)); r1->deledges.Append (INDEX_2 (2, 3)); r1->deledges.Append (INDEX_2 (3, 4)); r1->deledges.Append (INDEX_2 (3, 6)); r1->onp = 7; r1->bonus = -1; rules.Append (r1); // quad + 2 connected trigs to quad r1 = new ImprovementRule; r1->oldels.Append (Element2d (1, 2, 3, 4)); r1->oldels.Append (Element2d (2, 5, 3)); r1->oldels.Append (Element2d (3, 5, 4)); r1->newels.Append (Element2d (1, 2, 5, 4)); r1->deledges.Append (INDEX_2 (2, 3)); r1->deledges.Append (INDEX_2 (3, 4)); r1->deledges.Append (INDEX_2 (3, 5)); r1->onp = 5; r1->bonus = 0; rules.Append (r1); // quad + 2 non-connected trigs to quad (a and b) r1 = new ImprovementRule; r1->oldels.Append (Element2d (1, 2, 3, 4)); r1->oldels.Append (Element2d (2, 6, 3)); r1->oldels.Append (Element2d (1, 4, 5)); r1->newels.Append (Element2d (1, 3, 4, 5)); r1->newels.Append (Element2d (1, 2, 6, 3)); r1->deledges.Append (INDEX_2 (1, 4)); r1->deledges.Append (INDEX_2 (2, 3)); r1->onp = 6; r1->bonus = 0; rules.Append (r1); r1 = new ImprovementRule; r1->oldels.Append (Element2d (1, 2, 3, 4)); r1->oldels.Append (Element2d (2, 6, 3)); r1->oldels.Append (Element2d (1, 4, 5)); r1->newels.Append (Element2d (1, 2, 4, 5)); r1->newels.Append (Element2d (4, 2, 6, 3)); r1->deledges.Append (INDEX_2 (1, 4)); r1->deledges.Append (INDEX_2 (2, 3)); r1->onp = 6; r1->bonus = 0; rules.Append (r1); // two quad + trig -> one quad + trig r1 = new ImprovementRule; r1->oldels.Append (Element2d (1, 2, 3, 4)); r1->oldels.Append (Element2d (2, 5, 6, 3)); r1->oldels.Append (Element2d (4, 3, 6)); r1->newels.Append (Element2d (1, 2, 6, 4)); r1->newels.Append (Element2d (2, 5, 6)); r1->deledges.Append (INDEX_2 (2, 3)); r1->deledges.Append (INDEX_2 (3, 4)); r1->deledges.Append (INDEX_2 (3, 6)); r1->onp = 6; r1->bonus = -1; rules.Append (r1); // swap quad + trig (a and b) r1 = new ImprovementRule; r1->oldels.Append (Element2d (1, 2, 3, 4)); r1->oldels.Append (Element2d (2, 5, 3)); r1->newels.Append (Element2d (2, 5, 3, 4)); r1->newels.Append (Element2d (1, 2, 4)); r1->deledges.Append (INDEX_2 (2, 3)); r1->onp = 5; r1->bonus = 0; rules.Append (r1); r1 = new ImprovementRule; r1->oldels.Append (Element2d (1, 2, 3, 4)); r1->oldels.Append (Element2d (2, 5, 3)); r1->newels.Append (Element2d (1, 2, 5, 3)); r1->newels.Append (Element2d (1, 3, 4)); r1->deledges.Append (INDEX_2 (2, 3)); r1->onp = 5; r1->bonus = 0; rules.Append (r1); // 2 quads to quad + 2 trigs r1 = new ImprovementRule; r1->oldels.Append (Element2d (1, 2, 3, 4)); r1->oldels.Append (Element2d (3, 2, 5, 6)); r1->newels.Append (Element2d (1, 5, 6, 4)); r1->newels.Append (Element2d (1, 2, 5)); r1->newels.Append (Element2d (4, 6, 3)); r1->deledges.Append (INDEX_2 (2, 3)); r1->onp = 6; r1->bonus = 0; // rules.Append (r1); Array mapped(rules.Size()); Array used(rules.Size()); used = 0; mapped = 0; for (int ri = 0; ri < rules.Size(); ri++) { ImprovementRule & rule = *rules[ri]; rule.incelsonnode.SetSize (rule.onp); rule.reused.SetSize (rule.onp); for (int j = 1; j <= rule.onp; j++) { rule.incelsonnode.Elem(j) = 0; rule.reused.Elem(j) = 0; } for (int j = 1; j <= rule.oldels.Size(); j++) { const Element2d & el = rule.oldels.Elem(j); for (int k = 1; k <= el.GetNP(); k++) rule.incelsonnode.Elem(el.PNum(k))--; } for (int j = 1; j <= rule.newels.Size(); j++) { const Element2d & el = rule.newels.Elem(j); for (int k = 1; k <= el.GetNP(); k++) { rule.incelsonnode.Elem(el.PNum(k))++; rule.reused.Elem(el.PNum(k)) = 1; } } } TABLE elonnode(np); Array nelonnode(np); TABLE nbels(ne); nelonnode = -4; for (SurfaceElementIndex sei = 0; sei < ne; sei++) { const Element2d & el = mesh[sei]; if (el.GetIndex() == faceindex && !el.IsDeleted()) { for (int j = 0; j < el.GetNP(); j++) elonnode.Add (el[j], sei); } if(!el.IsDeleted()) { for (int j = 0; j < el.GetNP(); j++) nelonnode[el[j]]++; } } for (SurfaceElementIndex sei = 0; sei < ne; sei++) { const Element2d & el = mesh[sei]; if (el.GetIndex() == faceindex && !el.IsDeleted()) { for (int j = 0; j < el.GetNP(); j++) { for (int k = 0; k < elonnode[el[j]].Size(); k++) { int nbel = elonnode[el[j]] [k]; bool inuse = false; for (int l = 0; l < nbels[sei].Size(); l++) if (nbels[sei][l] == nbel) inuse = true; if (!inuse) nbels.Add (sei, nbel); } } } } for (int ri = 0; ri < rules.Size(); ri++) { const ImprovementRule & rule = *rules[ri]; elmap.SetSize (rule.oldels.Size()); elrot.SetSize (rule.oldels.Size()); pmap.SetSize (rule.onp); pgi.SetSize (rule.onp); for (SurfaceElementIndex sei = 0; sei < ne; sei++) { if (multithread.terminate) break; if (mesh[sei].IsDeleted()) continue; elmap[0] = sei; FlatArray neighbours = nbels[sei]; for (elrot[0] = 0; elrot[0] < mesh[sei].GetNP(); elrot[0]++) { const Element2d & el0 = mesh[sei]; const Element2d & rel0 = rule.oldels[0]; if (el0.GetIndex() != faceindex) continue; if (el0.IsDeleted()) continue; if (el0.GetNP() != rel0.GetNP()) continue; pmap = PointIndex (-1); for (int k = 0; k < el0.GetNP(); k++) { pmap.Elem(rel0[k]) = el0.PNumMod(k+elrot[0]+1); pgi.Elem(rel0[k]) = el0.GeomInfoPiMod(k+elrot[0]+1); } ok = 1; for (int i = 1; i < elmap.Size(); i++) { // try to find a mapping for reference-element i const Element2d & rel = rule.oldels[i]; bool possible = 0; for (elmap[i] = 0; elmap[i] < neighbours.Size(); elmap[i]++) { const Element2d & el = mesh[neighbours[elmap[i]]]; if (el.IsDeleted()) continue; if (el.GetNP() != rel.GetNP()) continue; for (elrot[i] = 0; elrot[i] < rel.GetNP(); elrot[i]++) { possible = 1; for (int k = 0; k < rel.GetNP(); k++) if (pmap.Elem(rel[k]) != -1 && pmap.Elem(rel[k]) != el.PNumMod (k+elrot[i]+1)) possible = 0; if (possible) { for (int k = 0; k < el.GetNP(); k++) { pmap.Elem(rel[k]) = el.PNumMod(k+elrot[i]+1); pgi.Elem(rel[k]) = el.GeomInfoPiMod(k+elrot[i]+1); } break; } } if (possible) break; } if (!possible) { ok = 0; break; } elmap[i] = neighbours[elmap[i]]; } for(int i=0; ok && i olddef) continue; // calc metric badness double bad1 = 0, bad2 = 0; Vec<3> n; SelectSurfaceOfPoint (mesh.Point(pmap.Get(1)), pgi.Get(1)); GetNormalVector (surfnr, mesh.Point(pmap.Get(1)), pgi.Elem(1), n); for (int j = 1; j <= rule.oldels.Size(); j++) bad1 += mesh.SurfaceElement(elmap.Get(j)).CalcJacobianBadness (mesh.Points(), n); // check new element: for (int j = 1; j <= rule.newels.Size(); j++) { const Element2d & rnel = rule.newels.Get(j); Element2d nel(rnel.GetNP()); for (int k = 1; k <= rnel.GetNP(); k++) nel.PNum(k) = pmap.Get(rnel.PNum(k)); bad2 += nel.CalcJacobianBadness (mesh.Points(), n); } if (bad2 > 1e3) continue; if (newdef == olddef && bad2 > bad1) continue; // generate new element: for (int j = 1; j <= rule.newels.Size(); j++) { const Element2d & rnel = rule.newels.Get(j); Element2d nel(rnel.GetNP()); nel.SetIndex (faceindex); for (int k = 1; k <= rnel.GetNP(); k++) { nel.PNum(k) = pmap.Get(rnel.PNum(k)); nel.GeomInfoPi(k) = pgi.Get(rnel.PNum(k)); } mesh.AddSurfaceElement(nel); } for (int j = 0; j < rule.oldels.Size(); j++) mesh.DeleteSurfaceElement ( elmap[j] ); for (int j = 1; j <= pmap.Size(); j++) nelonnode[pmap.Get(j)] += rule.incelsonnode.Get(j); used[ri]++; } } } mesh.Compress(); for (int ri = 0; ri < rules.Size(); ri++) { PrintMessage (5, "rule ", ri+1, " ", mapped[ri], "/", used[ri], " mapped/used"); } } } netgen-6.2.1804/libsrc/meshing/hpref_pyramid.hpp0000644000175000017500000000425613272137567020266 0ustar kurtkurt // HP_PYRAMID int refpyramid_splitedges[][3] = { { 0, 0, 0 } }; HPREF_ELEMENT_TYPE refpyramid_newelstypes[] = { HP_PYRAMID, HP_NONE, }; int refpyramid_newels[][8] = { { 1, 2, 3, 4, 5 } }; HPRef_Struct refpyramid = { HP_PYRAMID, refpyramid_splitedges, 0, 0, refpyramid_newelstypes, refpyramid_newels }; // singular point 1 // HP_PYRAMID_0E_1V int refpyramid_0e_1v_splitedges[][3] = { { 0, 0, 0 } }; HPREF_ELEMENT_TYPE refpyramid_0e_1v_newelstypes[] = { HP_TET_0E_1V, HP_TET, HP_NONE, }; int refpyramid_0e_1v_newels[][8] = { { 1, 2, 4, 5 }, { 2, 3, 4, 5 }, }; HPRef_Struct refpyramid_0e_1v = { HP_PYRAMID, refpyramid_0e_1v_splitedges, 0, 0, refpyramid_0e_1v_newelstypes, refpyramid_0e_1v_newels }; // singular edges 1-2 1-4 singular point 1 // HP_PYRAMID_EDGES int refpyramid_edges_splitedges[][3] = { { 0, 0, 0 } }; HPREF_ELEMENT_TYPE refpyramid_edges_newelstypes[] = { HP_TET_1E_1VA, HP_TET_1E_1VA, HP_NONE, }; int refpyramid_edges_newels[][8] = { { 1, 2, 3, 5 }, { 1, 4, 5, 3 }, }; HPRef_Struct refpyramid_edges = { HP_PYRAMID, refpyramid_edges_splitedges, 0, 0, refpyramid_edges_newelstypes, refpyramid_edges_newels }; // singular face 1-2-5 singular point 5 // HP_PYRAMID_1FB_0E_1VA int refpyramid_1fb_0e_1va_splitedges[][3] = { { 1, 4, 6 }, { 2, 3, 7 }, { 5, 1, 8 }, { 5, 2, 9 }, { 5, 3, 10 }, { 5, 4, 11 }, { 0, 0, 0 }, }; HPREF_ELEMENT_TYPE refpyramid_1fb_0e_1va_newelstypes[] = { HP_HEX_1F_0E_0V, HP_PYRAMID_1FB_0E_1VA, HP_PRISM, HP_NONE, }; int refpyramid_1fb_0e_1va_newels[][8] = { { 1, 8, 9, 2, 6, 11, 10, 7 }, { 8, 9, 10, 11, 5 }, { 3, 7, 10, 4, 6, 11 } }; HPRef_Struct refpyramid_1fb_0e_1va = { HP_PYRAMID, refpyramid_1fb_0e_1va_splitedges, 0, 0, refpyramid_1fb_0e_1va_newelstypes, refpyramid_1fb_0e_1va_newels }; netgen-6.2.1804/libsrc/meshing/meshclass.hpp0000644000175000017500000006153513272137567017422 0ustar kurtkurt#ifndef MESHCLASS #define MESHCLASS /**************************************************************************/ /* File: meshclass.hpp */ /* Author: Joachim Schoeberl */ /* Date: 20. Nov. 99 */ /**************************************************************************/ /* The mesh class */ namespace netgen { enum resthtype { RESTRICTH_FACE, RESTRICTH_EDGE, RESTRICTH_SURFACEELEMENT, RESTRICTH_POINT, RESTRICTH_SEGMENT }; class HPRefElement; /// 2d/3d mesh class Mesh { public: typedef ::netgen::T_POINTS T_POINTS; typedef Array T_VOLELEMENTS; // typedef Array T_SURFELEMENTS; typedef Array T_SURFELEMENTS; private: /// point coordinates T_POINTS points; /// line-segments at edges Array segments; /// surface elements, 2d-inner elements T_SURFELEMENTS surfelements; /// volume elements T_VOLELEMENTS volelements; /// points will be fixed forever Array lockedpoints; /// surface indices at boundary nodes // TABLE surfacesonnode; /// boundary edges (1..normal bedge, 2..segment) INDEX_2_CLOSED_HASHTABLE * boundaryedges; /// INDEX_2_CLOSED_HASHTABLE * segmentht; /// INDEX_3_CLOSED_HASHTABLE * surfelementht; /// faces of rest-solid Array openelements; /// open segmenets for surface meshing Array opensegments; /** Representation of local mesh-size h */ LocalH * lochfunc; /// double hglob; /// double hmin; /// Array maxhdomain; /** the face-index of the surface element maps into this table. */ Array facedecoding; /** the edge-index of the line element maps into this table. */ Array edgedecoding; /// sub-domain materials Array materials; /// labels for boundary conditions Array bcnames; /// labels for co dim 2 bboundary conditions Array cd2names; /// Periodic surface, close surface, etc. identifications Identifications * ident; /// number of vertices (if < 0, use np) int numvertices; /// geometric search tree for interval intersection search BoxTree<3> * elementsearchtree; /// time stamp for tree mutable int elementsearchtreets; /// element -> face, element -> edge etc ... MeshTopology topology; /// methods for high order elements class CurvedElements * curvedelems; /// nodes identified by close points class AnisotropicClusters * clusters; /// space dimension (2 or 3) int dimension; /// changed by every minor modification (addpoint, ...) int timestamp; /// changed after finishing global algorithm (improve, ...) int majortimestamp; /// mesh access semaphors. NgMutex mutex; /// mesh access semaphors. NgMutex majormutex; SYMBOLTABLE< Array* > userdata_int; SYMBOLTABLE< Array* > userdata_double; mutable Array< Point3d > pointcurves; mutable Array pointcurves_startpoint; mutable Array pointcurves_red,pointcurves_green,pointcurves_blue; /// start element for point search (GetElementOfPoint) mutable int ps_startelement; #ifdef PARALLEL /// connection to parallel meshes class ParallelMeshTopology * paralleltop; #endif shared_ptr geometry; private: void BuildBoundaryEdges(void); public: bool PointContainedIn2DElement(const Point3d & p, double lami[3], const int element, bool consider3D = false) const; bool PointContainedIn3DElement(const Point3d & p, double lami[3], const int element) const; bool PointContainedIn3DElementOld(const Point3d & p, double lami[3], const int element) const; public: // store coarse mesh before hp-refinement Array * hpelements; Mesh * coarsemesh; /// number of refinement levels int mglevels; /// refinement hierarchy Array,PointIndex::BASE> mlbetweennodes; /// parent element of volume element Array mlparentelement; /// parent element of surface element Array mlparentsurfaceelement; /// DLL_HEADER Mesh(); /// DLL_HEADER ~Mesh(); Mesh & operator= (const Mesh & mesh2); /// DLL_HEADER void DeleteMesh(); /// void ClearSurfaceElements(); /// DLL_HEADER void ClearVolumeElements() { volelements.SetSize(0); timestamp = NextTimeStamp(); } /// DLL_HEADER void ClearSegments() { segments.SetSize(0); timestamp = NextTimeStamp(); } /// bool TestOk () const; void SetAllocSize(int nnodes, int nsegs, int nsel, int nel); DLL_HEADER PointIndex AddPoint (const Point3d & p, int layer = 1); DLL_HEADER PointIndex AddPoint (const Point3d & p, int layer, POINTTYPE type); int GetNP () const { return points.Size(); } // [[deprecated("Use Point(PointIndex) instead of int !")]] MeshPoint & Point(int i) { return points.Elem(i); } MeshPoint & Point(PointIndex pi) { return points[pi]; } // [[deprecated("Use Point(PointIndex) instead of int !")]] const MeshPoint & Point(int i) const { return points.Get(i); } const MeshPoint & Point(PointIndex pi) const { return points[pi]; } const MeshPoint & operator[] (PointIndex pi) const { return points[pi]; } MeshPoint & operator[] (PointIndex pi) { return points[pi]; } const T_POINTS & Points() const { return points; } T_POINTS & Points() { return points; } DLL_HEADER SegmentIndex AddSegment (const Segment & s); void DeleteSegment (int segnr) { segments.Elem(segnr)[0].Invalidate(); segments.Elem(segnr)[1].Invalidate(); } /* void FullDeleteSegment (int segnr) // von wem ist das ??? { segments.Delete(segnr-PointIndex::BASE); } */ int GetNSeg () const { return segments.Size(); } // [[deprecated("Use LineSegment(SegmentIndex) instead of int !")]] Segment & LineSegment(int i) { return segments.Elem(i); } // [[deprecated("Use LineSegment(SegmentIndex) instead of int !")]] const Segment & LineSegment(int i) const { return segments.Get(i); } Segment & LineSegment(SegmentIndex si) { return segments[si]; } const Segment & LineSegment(SegmentIndex si) const { return segments[si]; } const Segment & operator[] (SegmentIndex si) const { return segments[si]; } Segment & operator[] (SegmentIndex si) { return segments[si]; } /* const Array & LineSegments() const { return segments; } Array & LineSegments() { return segments; } */ const auto & LineSegments() const { return segments; } auto & LineSegments() { return segments; } Array pointelements; // only via python interface DLL_HEADER SurfaceElementIndex AddSurfaceElement (const Element2d & el); // write to pre-allocated container, thread-safe DLL_HEADER void SetSurfaceElement (SurfaceElementIndex sei, const Element2d & el); // [[deprecated("Use DeleteSurfaceElement(SurfaceElementIndex) instead of int !")]] void DeleteSurfaceElement (int eli) { surfelements.Elem(eli).Delete(); surfelements.Elem(eli).PNum(1).Invalidate(); surfelements.Elem(eli).PNum(2).Invalidate(); surfelements.Elem(eli).PNum(3).Invalidate(); timestamp = NextTimeStamp(); } void DeleteSurfaceElement (SurfaceElementIndex eli) { for (auto & p : surfelements[eli].PNums()) p.Invalidate(); surfelements[eli].Delete(); timestamp = NextTimeStamp(); } int GetNSE () const { return surfelements.Size(); } // [[deprecated("Use SurfaceElement(SurfaceElementIndex) instead of int !")]] Element2d & SurfaceElement(int i) { return surfelements.Elem(i); } // [[deprecated("Use SurfaceElement(SurfaceElementIndex) instead of int !")]] const Element2d & SurfaceElement(int i) const { return surfelements.Get(i); } Element2d & SurfaceElement(SurfaceElementIndex i) { return surfelements[i]; } const Element2d & SurfaceElement(SurfaceElementIndex i) const { return surfelements[i]; } const Element2d & operator[] (SurfaceElementIndex ei) const { return surfelements[ei]; } Element2d & operator[] (SurfaceElementIndex ei) { return surfelements[ei]; } const T_SURFELEMENTS & SurfaceElements() const { return surfelements; } T_SURFELEMENTS & SurfaceElements() { return surfelements; } DLL_HEADER void RebuildSurfaceElementLists (); DLL_HEADER void GetSurfaceElementsOfFace (int facenr, Array & sei) const; DLL_HEADER ElementIndex AddVolumeElement (const Element & el); // write to pre-allocated container, thread-safe DLL_HEADER void SetVolumeElement (ElementIndex sei, const Element & el); int GetNE () const { return volelements.Size(); } // [[deprecated("Use VolumeElement(ElementIndex) instead of int !")]] Element & VolumeElement(int i) { return volelements.Elem(i); } // [[deprecated("Use VolumeElement(ElementIndex) instead of int !")]] const Element & VolumeElement(int i) const { return volelements.Get(i); } Element & VolumeElement(ElementIndex i) { return volelements[i]; } const Element & VolumeElement(ElementIndex i) const { return volelements[i]; } const Element & operator[] (ElementIndex ei) const { return volelements[ei]; } Element & operator[] (ElementIndex ei) { return volelements[ei]; } ELEMENTTYPE ElementType (ElementIndex i) const { return (volelements[i].flags.fixed) ? FIXEDELEMENT : FREEELEMENT; } const auto & VolumeElements() const { return volelements; } auto & VolumeElements() { return volelements; } /// DLL_HEADER double ElementError (int eli, const MeshingParameters & mp) const; /// DLL_HEADER void AddLockedPoint (PointIndex pi); /// void ClearLockedPoints (); const auto & LockedPoints() const { return lockedpoints; } /// Returns number of domains DLL_HEADER int GetNDomains() const; /// int GetDimension() const { return dimension; } void SetDimension (int dim) { dimension = dim; } /// sets internal tables DLL_HEADER void CalcSurfacesOfNode (); /// additional (temporarily) fix points void FixPoints (const BitArray & fixpoints); /** finds elements without neighbour and boundary elements without inner element. Results are stored in openelements. if dom == 0, all sub-domains, else subdomain dom */ DLL_HEADER void FindOpenElements (int dom = 0); /** finds segments without surface element, and surface elements without neighbours. store in opensegmentsy */ DLL_HEADER void FindOpenSegments (int surfnr = 0); /** remove one layer of surface elements */ DLL_HEADER void RemoveOneLayerSurfaceElements (); int GetNOpenSegments () { return opensegments.Size(); } const Segment & GetOpenSegment (int nr) { return opensegments.Get(nr); } /** Checks overlap of boundary return == 1, iff overlap */ DLL_HEADER int CheckOverlappingBoundary (); /** Checks consistent boundary return == 0, everything ok */ DLL_HEADER int CheckConsistentBoundary () const; /* checks element orientation */ DLL_HEADER int CheckVolumeMesh () const; /** finds average h of surface surfnr if surfnr > 0, else of all surfaces. */ DLL_HEADER double AverageH (int surfnr = 0) const; /// Calculates localh DLL_HEADER void CalcLocalH (double grading); /// DLL_HEADER void SetLocalH (netgen::Point<3> pmin, netgen::Point<3> pmax, double grading); /// DLL_HEADER void RestrictLocalH (const Point3d & p, double hloc); /// DLL_HEADER void RestrictLocalHLine (const Point3d & p1, const Point3d & p2, double hloc); /// number of elements per radius DLL_HEADER void CalcLocalHFromSurfaceCurvature(double grading, double elperr); /// DLL_HEADER void CalcLocalHFromPointDistances(double grading); /// DLL_HEADER void RestrictLocalH (resthtype rht, int nr, double loch); /// DLL_HEADER void LoadLocalMeshSize (const string & meshsizefilename); /// DLL_HEADER void SetGlobalH (double h); /// DLL_HEADER void SetMinimalH (double h); /// DLL_HEADER double MaxHDomain (int dom) const; /// DLL_HEADER void SetMaxHDomain (const Array & mhd); /// DLL_HEADER double GetH (const Point3d & p) const; /// double GetMinH (const Point3d & pmin, const Point3d & pmax); /// bool HasLocalHFunction () { return lochfunc != nullptr; } /// LocalH & LocalHFunction () { return * lochfunc; } /// bool LocalHFunctionGenerated(void) const { return (lochfunc != NULL); } /// Find bounding box DLL_HEADER void GetBox (Point3d & pmin, Point3d & pmax, int dom = -1) const; /// Find bounding box of points of typ ptyp or less DLL_HEADER void GetBox (Point3d & pmin, Point3d & pmax, POINTTYPE ptyp ) const; /// int GetNOpenElements() const { return openelements.Size(); } /// const Element2d & OpenElement(int i) const { return openelements.Get(i); } /// are also quads open elements bool HasOpenQuads () const; /// split into connected pieces DLL_HEADER void SplitIntoParts (); /// DLL_HEADER void SplitSeparatedFaces (); /// Refines mesh and projects points to true surface // void Refine (int levels, const CSGeometry * geom); bool BoundaryEdge (PointIndex pi1, PointIndex pi2) const { if(!boundaryedges) const_cast(this)->BuildBoundaryEdges(); INDEX_2 i2 (pi1, pi2); i2.Sort(); return boundaryedges->Used (i2); } bool IsSegment (PointIndex pi1, PointIndex pi2) const { INDEX_2 i2 (pi1, pi2); i2.Sort(); return segmentht->Used (i2); } SegmentIndex SegmentNr (PointIndex pi1, PointIndex pi2) const { INDEX_2 i2 (pi1, pi2); i2.Sort(); return segmentht->Get (i2); } /** Remove unused points. etc. */ DLL_HEADER void Compress (); /// first vertex has lowest index void OrderElements(); /// DLL_HEADER void Save (ostream & outfile) const; /// DLL_HEADER void Load (istream & infile); /// DLL_HEADER void Merge (istream & infile, const int surfindex_offset = 0); /// DLL_HEADER void Save (const string & filename) const; /// DLL_HEADER void Load (const string & filename); /// DLL_HEADER void Merge (const string & filename, const int surfindex_offset = 0); DLL_HEADER void DoArchive (ngstd::Archive & archive); /// DLL_HEADER void ImproveMesh (const MeshingParameters & mp, OPTIMIZEGOAL goal = OPT_QUALITY); /// void ImproveMeshJacobian (const MeshingParameters & mp, OPTIMIZEGOAL goal = OPT_QUALITY, const BitArray * usepoint = NULL); /// void ImproveMeshJacobianOnSurface (const MeshingParameters & mp, const BitArray & usepoint, const Array< Vec<3>* > & nv, OPTIMIZEGOAL goal = OPT_QUALITY, const Array< Array* > * idmaps = NULL); /** free nodes in environment of openelements for optimiztion */ void FreeOpenElementsEnvironment (int layers); /// bool LegalTet (Element & el) const { if (el.IllegalValid()) return !el.Illegal(); return LegalTet2 (el); } /// bool LegalTet2 (Element & el) const; /// bool LegalTrig (const Element2d & el) const; /** if values non-null, return values in 4-double array: triangle angles min/max, tetangles min/max if null, output results on cout */ DLL_HEADER void CalcMinMaxAngle (double badellimit, double * retvalues = NULL); /* Marks elements which are dangerous to refine return: number of illegal elements */ DLL_HEADER int MarkIllegalElements (); /// orient surface mesh, for one sub-domain only DLL_HEADER void SurfaceMeshOrientation (); /// convert mixed element mesh to tet-mesh DLL_HEADER void Split2Tets(); /// build box-search tree DLL_HEADER void BuildElementSearchTree (); void SetPointSearchStartElement(const int el) const {ps_startelement = el;} /// gives element of point, barycentric coordinates int GetElementOfPoint (const netgen::Point<3> & p, double * lami, bool build_searchtree = 0, const int index = -1, const bool allowindex = true) const; int GetElementOfPoint (const netgen::Point<3> & p, double * lami, const Array * const indices, bool build_searchtree = 0, const bool allowindex = true) const; int GetSurfaceElementOfPoint (const netgen::Point<3> & p, double * lami, bool build_searchtree = 0, const int index = -1, const bool allowindex = true) const; int GetSurfaceElementOfPoint (const netgen::Point<3> & p, double * lami, const Array * const indices, bool build_searchtree = 0, const bool allowindex = true) const; /// give list of vol elements which are int the box(p1,p2) void GetIntersectingVolEls(const Point3d& p1, const Point3d& p2, Array & locels) const; /// int AddFaceDescriptor(const FaceDescriptor& fd) { facedecoding.Append(fd); return facedecoding.Size(); } int AddEdgeDescriptor(const EdgeDescriptor & fd) { edgedecoding.Append(fd); return edgedecoding.Size() - 1; } /// DLL_HEADER void SetMaterial (int domnr, const string & mat); /// DLL_HEADER const string & GetMaterial (int domnr) const; DLL_HEADER static string defaultmat; const string * GetMaterialPtr (int domnr) const // 1-based { return domnr <= materials.Size() ? materials.Get(domnr) : &defaultmat; } DLL_HEADER void SetNBCNames ( int nbcn ); DLL_HEADER void SetBCName ( int bcnr, const string & abcname ); DLL_HEADER const string & GetBCName ( int bcnr ) const; DLL_HEADER void SetNCD2Names (int ncd2n); DLL_HEADER void SetCD2Name (int cd2nr, const string & abcname); DLL_HEADER const string & GetCD2Name (int cd2nr ) const; DLL_HEADER static string cd2_default_name; string * GetCD2NamePtr (int cd2nr ) const { if (cd2nr < cd2names.Size() && cd2names[cd2nr]) return cd2names[cd2nr]; return &cd2_default_name; } size_t GetNCD2Names() const { return cd2names.Size(); } DLL_HEADER static string default_bc; string * GetBCNamePtr (int bcnr) const { return (bcnr < bcnames.Size() && bcnames[bcnr]) ? bcnames[bcnr] : &default_bc; } /// void ClearFaceDescriptors() { facedecoding.SetSize(0); } /// int GetNFD () const { return facedecoding.Size(); } const FaceDescriptor & GetFaceDescriptor (int i) const { return facedecoding.Get(i); } const EdgeDescriptor & GetEdgeDescriptor (int i) const { return edgedecoding[i]; } /// FaceDescriptor & GetFaceDescriptor (int i) { return facedecoding.Elem(i); } // #ifdef NONE // /* // Identify points pi1 and pi2, due to // identification nr identnr // */ // void AddIdentification (int pi1, int pi2, int identnr); // int GetIdentification (int pi1, int pi2) const; // int GetIdentificationSym (int pi1, int pi2) const; // /// // INDEX_2_HASHTABLE & GetIdentifiedPoints () // { // return *identifiedpoints; // } // /// // void GetIdentificationMap (int identnr, Array & identmap) const; // /// // void GetIdentificationPairs (int identnr, Array & identpairs) const; // /// // int GetMaxIdentificationNr () const // { // return maxidentnr; // } // #endif /// return periodic, close surface etc. identifications Identifications & GetIdentifications () { return *ident; } /// return periodic, close surface etc. identifications const Identifications & GetIdentifications () const { return *ident; } /// bool HasIdentifications() const { return ident != nullptr; } void InitPointCurve(double red = 1, double green = 0, double blue = 0) const; void AddPointCurvePoint(const Point3d & pt) const; int GetNumPointCurves(void) const; int GetNumPointsOfPointCurve(int curve) const; Point3d & GetPointCurvePoint(int curve, int n) const; void GetPointCurveColor(int curve, double & red, double & green, double & blue) const; /// find number of vertices void ComputeNVertices (); /// number of vertices (no edge-midpoints) int GetNV () const; /// remove edge points void SetNP (int np); DLL_HEADER bool PureTrigMesh (int faceindex = 0) const; DLL_HEADER bool PureTetMesh () const; const MeshTopology & GetTopology () const { return topology; } DLL_HEADER void UpdateTopology (TaskManager tm = &DummyTaskManager, Tracer tracer = &DummyTracer); class CurvedElements & GetCurvedElements () const { return *curvedelems; } DLL_HEADER void BuildCurvedElements (const class Refinement * ref, int aorder, bool arational = false); DLL_HEADER void BuildCurvedElements (int aorder); const class AnisotropicClusters & GetClusters () const { return *clusters; } class CSurfaceArea { const Mesh & mesh; bool valid; double area; public: CSurfaceArea (const Mesh & amesh) : mesh(amesh), valid(false) { ; } void Add (const Element2d & sel) { if (sel.GetNP() == 3) area += Cross ( mesh[sel[1]]-mesh[sel[0]], mesh[sel[2]]-mesh[sel[0]] ).Length() / 2; else area += Cross (Vec3d (mesh[sel.PNum(1)], mesh[sel.PNum(3)]), Vec3d (mesh[sel.PNum(1)], mesh[sel.PNum(4)])).Length() / 2;; } void ReCalc () { area = 0; for (SurfaceElementIndex sei = 0; sei < mesh.GetNSE(); sei++) Add (mesh[sei]); valid = true; } operator double () const { return area; } bool Valid() const { return valid; } }; CSurfaceArea surfarea; CSurfaceArea & SurfaceArea() { return surfarea; } const CSurfaceArea & SurfaceArea() const { return surfarea; } int GetTimeStamp() const { return timestamp; } void SetNextTimeStamp() { timestamp = NextTimeStamp(); } int GetMajorTimeStamp() const { return majortimestamp; } void SetNextMajorTimeStamp() { majortimestamp = timestamp = NextTimeStamp(); } /// return mutex NgMutex & Mutex () { return mutex; } NgMutex & MajorMutex () { return majormutex; } shared_ptr GetGeometry() const { return geometry; } void SetGeometry (shared_ptr geom) { geometry = geom; } /// void SetUserData(const char * id, Array & data); /// bool GetUserData(const char * id, Array & data, int shift = 0) const; /// void SetUserData(const char * id, Array & data); /// bool GetUserData(const char * id, Array & data, int shift = 0) const; /// friend void OptimizeRestart (Mesh & mesh3d); /// void PrintMemInfo (ostream & ost) const; /// friend class Meshing3; enum GEOM_TYPE { NO_GEOM = 0, GEOM_2D = 1, GEOM_CSG = 10, GEOM_STL = 11, GEOM_OCC = 12, GEOM_ACIS = 13 }; GEOM_TYPE geomtype; #ifdef PARALLEL /// returns parallel topology class ParallelMeshTopology & GetParallelTopology () const { return *paralleltop; } /// distributes the master-mesh to local meshes void Distribute (); void Distribute (Array & volume_weights, Array & surface_weights, Array & segment_weights); /// find connection to parallel meshes // void FindExchangePoints () ; // void FindExchangeEdges (); // void FindExchangeFaces (); /// use metis to decompose master mesh void ParallelMetis (); // Array & neloc ); void ParallelMetis (Array & volume_weights, Array & surface_weights, Array & segment_weights); void PartHybridMesh (); // Array & neloc ); void PartDualHybridMesh (); // Array & neloc ); void PartDualHybridMesh2D (); // ( Array & neloc ); /// send mesh from master to local procs void SendRecvMesh (); /// send mesh to parallel machine, keep global mesh at master void SendMesh ( ) const; // Mesh * mastermesh, Array & neloc) const; /// loads a mesh sent from master processor void ReceiveParallelMesh (); #endif }; inline ostream& operator<<(ostream& ost, const Mesh& mesh) { ost << "mesh: " << endl; mesh.Save(ost); return ost; } } #endif netgen-6.2.1804/libsrc/meshing/boundarylayer.hpp0000644000175000017500000000112013272137567020300 0ustar kurtkurt#ifndef FILE_BOUNDARYLAYER #define FILE_BOUNDARYLAYER /// DLL_HEADER extern void InsertVirtualBoundaryLayer (Mesh & mesh); /// Create a typical prismatic boundary layer on the given /// surfaces class BoundaryLayerParameters { public: // parameters by Philippose .. Array surfid; Array heights; Array new_matnrs; int prismlayers = 1; int bulk_matnr = 1; int new_matnr = 1; double hfirst = 0.01; double growthfactor = 1; bool optimize = true; }; DLL_HEADER extern void GenerateBoundaryLayer (Mesh & mesh, BoundaryLayerParameters & blp); #endif netgen-6.2.1804/libsrc/meshing/adfront3.hpp0000644000175000017500000001414613272137567017154 0ustar kurtkurt#ifndef FILE_ADFRONT3 #define FILE_ADFRONT3 /**************************************************************************/ /* File: adfront3.hh */ /* Author: Joachim Schoeberl */ /* Date: 01. Okt. 95 */ /**************************************************************************/ /* Advancing front class for volume meshing */ /// Point in advancing front class FrontPoint3 { /// coordinates Point<3> p; /// global node index PointIndex globalindex; /// number of faces connected to point int nfacetopoint; /// distance to original boundary int frontnr; /// int cluster; public: /// FrontPoint3 (); /// FrontPoint3 (const Point<3> & ap, PointIndex agi); /// const Point<3> & P () const { return p; } /// PointIndex GlobalIndex () const { return globalindex; } /// void AddFace () { nfacetopoint++; } /// if last face is removed, then point is invalidated void RemoveFace() { nfacetopoint--; if (nfacetopoint == 0) nfacetopoint = -1; } /// bool Valid () const { return nfacetopoint >= 0; } /// void DecFrontNr (int afrontnr) { if (frontnr > afrontnr) frontnr = afrontnr; } /// int FrontNr () const { return frontnr; } /// friend class AdFront3; }; class MiniElement2d { protected: int np; PointIndex pnum[4]; // can be global or local nums bool deleted; public: MiniElement2d () { np = 3; deleted = 0; } MiniElement2d (int anp) { np = anp; deleted = 0; } int GetNP() const { return np; } PointIndex & operator[] (int i) { return pnum[i]; } const PointIndex operator[] (int i) const { return pnum[i]; } const PointIndex PNum (int i) const { return pnum[i-1]; } PointIndex & PNum (int i) { return pnum[i-1]; } const PointIndex PNumMod (int i) const { return pnum[(i-1)%np]; } auto PNums() const { return FlatArray (np, &pnum[0]); } void Delete () { deleted = true; for (PointIndex & p : pnum) p.Invalidate(); } bool IsDeleted () const { return deleted; } }; inline ostream & operator<<(ostream & s, const MiniElement2d & el) { s << "np = " << el.GetNP(); for (int j = 0; j < el.GetNP(); j++) s << " " << el[j]; return s; } /// Face in advancing front class FrontFace { private: /// MiniElement2d f; /// int qualclass; /// char oldfront; /// int hashvalue; /// int cluster; public: /// FrontFace (); /// FrontFace (const MiniElement2d & af); /// const MiniElement2d & Face () const { return f; } /// int QualClass () const { return qualclass; } /// void IncrementQualClass () { qualclass++; } /// void ResetQualClass () { if (qualclass > 1) { qualclass = 1; oldfront = 0; } } /// bool Valid () const { return !f.IsDeleted(); } /// void Invalidate (); /// int HashValue() const { return hashvalue; } /// void SetHashValue(int hv) { hashvalue = hv; } /// friend class AdFront3; int Cluster () const { return cluster; } }; /// Advancing front, 3D. class AdFront3 { /// Array points; /// Array faces; /// Array delpointl; /// which points are connected to pi ? TABLE * connectedpairs; /// number of total front faces; int nff; /// number of quads in front int nff4; /// double vol; /// GeomSearch3d hashtable; /// int hashon; /// int hashcreated; /// counter for rebuilding internal tables int rebuildcounter; /// last base element int lasti; /// minimal selection-value of baseelements int minval; Array invpindex; Array pingroup; /// class BoxTree<3> * facetree; public: /// AdFront3 (); /// ~AdFront3 (); /// void GetPoints (Array > & apoints) const; /// int GetNP() const { return points.Size(); } /// const Point<3> & GetPoint (PointIndex pi) const { return points[pi].P(); } /// int GetNF() const { return nff; } /// const MiniElement2d & GetFace (int i) const { return faces.Get(i).Face(); } /// void Print () const; /// bool Empty () const { return nff == 0; } /// bool Empty (int elnp) const { if (elnp == 4) return (nff4 == 0); return (nff - nff4 == 0); } /// int SelectBaseElement (); /// void CreateTrees (); /// void GetIntersectingFaces (const Point<3> & pmin, const Point<3> & pmax, Array & ifaces) const; /// void GetFaceBoundingBox (int i, Box3d & box) const; /// int GetLocals (int baseelement, Array & locpoints, Array & locfaces, // local index Array & pindex, Array & findex, INDEX_2_HASHTABLE & connectedpairs, float xh, float relh, INDEX& facesplit); /// void GetGroup (int fi, Array & grouppoints, Array & groupelements, Array & pindex, Array & findex); /// void DeleteFace (INDEX fi); /// PointIndex AddPoint (const Point<3> & p, PointIndex globind); /// INDEX AddFace (const MiniElement2d & e); /// INDEX AddConnectedPair (const INDEX_2 & pair); /// void IncrementClass (INDEX fi) { faces.Elem(fi).IncrementQualClass(); } /// void ResetClass (INDEX fi) { faces.Elem(fi).ResetQualClass(); } /// void SetStartFront (int baseelnp = 0); /// is Point p inside Surface ? bool Inside (const Point<3> & p) const; /// both points on same side ? int SameSide (const Point<3> & lp1, const Point<3> & lp2, const Array * testfaces = NULL) const; /// PointIndex GetGlobalIndex (PointIndex pi) const { return points[pi].GlobalIndex(); } /// double Volume () const { return vol; } private: void RebuildInternalTables(); }; #endif netgen-6.2.1804/libsrc/meshing/improve3.cpp0000644000175000017500000020616513272137567017177 0ustar kurtkurt#include #include "meshing.hpp" #ifdef SOLIDGEOM #include #endif #include namespace netgen { /* Combine two points to one. Set new point into the center, if both are inner points. Connect inner point to boundary point, if one point is inner point. */ void MeshOptimize3d :: CombineImprove (Mesh & mesh, OPTIMIZEGOAL goal) { int np = mesh.GetNP(); int ne = mesh.GetNE(); TABLE elementsonnode(np); Array hasonepi, hasbothpi; Array oneperr; Array elerrs (ne); PrintMessage (3, "CombineImprove"); (*testout) << "Start CombineImprove" << "\n"; // mesh.CalcSurfacesOfNode (); const char * savetask = multithread.task; multithread.task = "Combine Improve"; double totalbad = 0; for (ElementIndex ei = 0; ei < ne; ei++) { if(mesh.GetDimension()==3 && mp.only3D_domain_nr && mp.only3D_domain_nr != mesh.VolumeElement(ei).GetIndex()) continue; double elerr = CalcBad (mesh.Points(), mesh[ei], 0); totalbad += elerr; elerrs[ei] = elerr; } if (goal == OPT_QUALITY) { totalbad = CalcTotalBad (mesh.Points(), mesh.VolumeElements()); (*testout) << "Total badness = " << totalbad << endl; PrintMessage (5, "Total badness = ", totalbad); } for (ElementIndex ei = 0; ei < ne; ei++) if (!mesh[ei].IsDeleted()) for (int j = 0; j < mesh[ei].GetNP(); j++) elementsonnode.Add (mesh[ei][j], ei); INDEX_2_HASHTABLE edgetested (np+1); int cnt = 0; for (ElementIndex ei = 0; ei < ne; ei++) { if(mesh.GetDimension()==3 && mp.only3D_domain_nr && mp.only3D_domain_nr != mesh.VolumeElement(ei).GetIndex()) continue; if (multithread.terminate) break; multithread.percent = 100.0 * (ei+1) / ne; if (mesh.ElementType(ei) == FIXEDELEMENT) continue; for (int j = 0; j < 6; j++) { Element & elemi = mesh[ei]; if (elemi.IsDeleted()) continue; static const int tetedges[6][2] = { { 0, 1 }, { 0, 2 }, { 0, 3 }, { 1, 2 }, { 1, 3 }, { 2, 3 } }; PointIndex pi1 = elemi[tetedges[j][0]]; PointIndex pi2 = elemi[tetedges[j][1]]; if (pi2 < pi1) Swap (pi1, pi2); INDEX_2 si2 (pi1, pi2); si2.Sort(); if (edgetested.Used (si2)) continue; edgetested.Set (si2, 1); // hasonepoint.SetSize(0); // hasbothpoints.SetSize(0); hasonepi.SetSize(0); hasbothpi.SetSize(0); FlatArray row1 = elementsonnode[pi1]; for (int k = 0; k < row1.Size(); k++) { Element & elem = mesh[row1[k]]; if (elem.IsDeleted()) continue; if (elem[0] == pi2 || elem[1] == pi2 || elem[2] == pi2 || elem[3] == pi2) { hasbothpi.Append (row1[k]); } else { hasonepi.Append (row1[k]); } } FlatArray row2 = elementsonnode[pi2]; for (int k = 0; k < row2.Size(); k++) { Element & elem = mesh[row2[k]]; if (elem.IsDeleted()) continue; if (elem[0] == pi1 || elem[1] == pi1 || elem[2] == pi1 || elem[3] == pi1) ; else { hasonepi.Append (row2[k]); } } double bad1 = 0; for (int k = 0; k < hasonepi.Size(); k++) bad1 += elerrs[hasonepi[k]]; for (int k = 0; k < hasbothpi.Size(); k++) bad1 += elerrs[hasbothpi[k]]; MeshPoint p1 = mesh[pi1]; MeshPoint p2 = mesh[pi2]; // if (mesh.PointType(pi2) != INNERPOINT) if (p2.Type() != INNERPOINT) continue; MeshPoint pnew; // if (mesh.PointType(pi1) != INNERPOINT) if (p1.Type() != INNERPOINT) pnew = p1; else pnew = Center (p1, p2); mesh[pi1] = pnew; mesh[pi2] = pnew; oneperr.SetSize (hasonepi.Size()); double bad2 = 0; for (int k = 0; k < hasonepi.Size(); k++) { const Element & elem = mesh[hasonepi[k]]; double err = CalcBad (mesh.Points(), elem, 0); // CalcTetBadness (mesh[elem[0]], mesh[elem[1]], // mesh[elem[2]], mesh[elem[3]], 0, mparam); bad2 += err; oneperr[k] = err; } mesh[pi1] = p1; mesh[pi2] = p2; // if (mesh.PointType(pi1) != INNERPOINT) if (p1.Type() != INNERPOINT) { for (int k = 0; k < hasonepi.Size(); k++) { Element & elem = mesh[hasonepi[k]]; int l; for (l = 0; l < 4; l++) if (elem[l] == pi2) { elem[l] = pi1; break; } elem.flags.illegal_valid = 0; if (!mesh.LegalTet(elem)) bad2 += 1e4; if (l < 4) { elem.flags.illegal_valid = 0; elem[l] = pi2; } } } if (bad2 / hasonepi.Size() < bad1 / (hasonepi.Size()+hasbothpi.Size())) { mesh[pi1] = pnew; cnt++; FlatArray row = elementsonnode[pi2]; for (int k = 0; k < row.Size(); k++) { Element & elem = mesh[row[k]]; if (elem.IsDeleted()) continue; elementsonnode.Add (pi1, row[k]); for (int l = 0; l < elem.GetNP(); l++) if (elem[l] == pi2) elem[l] = pi1; elem.flags.illegal_valid = 0; if (!mesh.LegalTet (elem)) (*testout) << "illegal tet " << elementsonnode[pi2][k] << endl; } for (int k = 0; k < hasonepi.Size(); k++) elerrs[hasonepi[k]] = oneperr[k]; for (int k = 0; k < hasbothpi.Size(); k++) { mesh[hasbothpi[k]].flags.illegal_valid = 0; mesh[hasbothpi[k]].Delete(); } } } } mesh.Compress(); mesh.MarkIllegalElements(); PrintMessage (5, cnt, " elements combined"); (*testout) << "CombineImprove done" << "\n"; totalbad = 0; for (ElementIndex ei = 0; ei < mesh.GetNE(); ei++) if(!(mesh.GetDimension()==3 && mp.only3D_domain_nr && mp.only3D_domain_nr != mesh.VolumeElement(ei).GetIndex())) totalbad += CalcBad (mesh.Points(), mesh[ei], 0); if (goal == OPT_QUALITY) { totalbad = CalcTotalBad (mesh.Points(), mesh.VolumeElements()); (*testout) << "Total badness = " << totalbad << endl; int cntill = 0; for (ElementIndex ei = 0; ei < ne; ei++) if(!(mesh.GetDimension()==3 && mp.only3D_domain_nr && mp.only3D_domain_nr != mesh.VolumeElement(ei).GetIndex())) if (!mesh.LegalTet (mesh[ei])) cntill++; PrintMessage (5, cntill, " illegal tets"); } multithread.task = savetask; } /* Mesh improvement by edge splitting. If mesh quality is improved by inserting a node into an inner edge, the edge is split into two parts. */ void MeshOptimize3d :: SplitImprove (Mesh & mesh, OPTIMIZEGOAL goal) { double bad1, bad2, badmax, badlimit; int cnt = 0; int np = mesh.GetNP(); int ne = mesh.GetNE(); TABLE elementsonnode(np); Array hasbothpoints; BitArray origpoint(np+1), boundp(np+1); // big enough for 0 and 1-based origpoint.Set(); Array elerrs(ne); BitArray illegaltet(ne); illegaltet.Clear(); const char * savetask = multithread.task; multithread.task = "Split Improve"; PrintMessage (3, "SplitImprove"); (*testout) << "start SplitImprove" << "\n"; Array locfaces; INDEX_2_HASHTABLE edgetested (np); bad1 = 0; badmax = 0; for (ElementIndex ei = 0; ei < ne; ei++) { if(mp.only3D_domain_nr && mp.only3D_domain_nr != mesh.VolumeElement(ei).GetIndex()) continue; elerrs[ei] = CalcBad (mesh.Points(), mesh[ei], 0); bad1 += elerrs[ei]; if (elerrs[ei] > badmax) badmax = elerrs[ei]; } PrintMessage (5, "badmax = ", badmax); badlimit = 0.5 * badmax; boundp.Clear(); for (auto & el : mesh.SurfaceElements()) for (PointIndex pi : el.PNums()) boundp.Set (pi); if (goal == OPT_QUALITY) { bad1 = CalcTotalBad (mesh.Points(), mesh.VolumeElements()); (*testout) << "Total badness = " << bad1 << endl; } for (ElementIndex ei : mesh.VolumeElements().Range()) for (PointIndex pi : mesh[ei].PNums()) elementsonnode.Add (pi, ei); mesh.MarkIllegalElements(); if (goal == OPT_QUALITY || goal == OPT_LEGAL) { int cntill = 0; for (ElementIndex ei = 0; ei < ne; ei++) { // if (!LegalTet (volelements.Get(i))) if (mesh[ei].flags.illegal) { cntill++; illegaltet.Set (ei); } } } for (ElementIndex ei : mesh.VolumeElements().Range()) { Element & elem = mesh[ei]; if(mp.only3D_domain_nr && mp.only3D_domain_nr != elem.GetIndex()) continue; if (multithread.terminate) break; multithread.percent = 100.0 * (ei+1) / ne; bool ltestmode = 0; if (elerrs[ei] < badlimit && !illegaltet.Test(ei)) continue; if ((goal == OPT_LEGAL) && !illegaltet.Test(ei) && CalcBad (mesh.Points(), elem, 0) < 1e3) continue; if (ltestmode) { (*testout) << "test el " << ei << endl; for (int j = 0; j < 4; j++) (*testout) << elem[j] << " "; (*testout) << endl; } for (int j = 0; j < 6; j++) { static const int tetedges[6][2] = { { 0, 1 }, { 0, 2 }, { 0, 3 }, { 1, 2 }, { 1, 3 }, { 2, 3 } }; PointIndex pi1 = elem[tetedges[j][0]]; PointIndex pi2 = elem[tetedges[j][1]]; if (pi2 < pi1) Swap (pi1, pi2); if (pi2 >= elementsonnode.Size()+PointIndex::BASE) continue; // old number of points if (!origpoint.Test(pi1) || !origpoint.Test(pi2)) continue; INDEX_2 i2(pi1, pi2); i2.Sort(); if (mesh.BoundaryEdge (pi1, pi2)) continue; if (edgetested.Used (i2) && !illegaltet.Test(ei)) continue; edgetested.Set (i2, 1); hasbothpoints.SetSize (0); /* for (int k = 1; k <= elementsonnode.EntrySize(pi1); k++) { ElementIndex elnr = elementsonnode.Get(pi1, k); */ for (ElementIndex ei : elementsonnode[pi1]) { Element & el = mesh[ei]; bool has1 = el.PNums().Contains(pi1); bool has2 = el.PNums().Contains(pi2); if (has1 && has2) if (!hasbothpoints.Contains (ei)) hasbothpoints.Append (ei); } bad1 = 0; for (ElementIndex ei : hasbothpoints) bad1 += CalcBad (mesh.Points(), mesh[ei], 0); bool puretet = 1; for (ElementIndex ei : hasbothpoints) if (mesh[ei].GetType() != TET) puretet = 0; if (!puretet) continue; Point3d p1 = mesh[pi1]; Point3d p2 = mesh[pi2]; /* pnew = Center (p1, p2); points.Elem(pi1) = pnew; bad2 = 0; for (k = 1; k <= hasbothpoints.Size(); k++) bad2 += CalcBad (points, volelements.Get(hasbothpoints.Get(k)), 0); points.Elem(pi1) = p1; points.Elem(pi2) = pnew; for (k = 1; k <= hasbothpoints.Size(); k++) bad2 += CalcBad (points, volelements.Get(hasbothpoints.Get(k)), 0); points.Elem(pi2) = p2; */ locfaces.SetSize (0); for (ElementIndex ei : hasbothpoints) { const Element & el = mesh[ei]; for (int l = 0; l < 4; l++) if (el[l] == pi1 || el[l] == pi2) { INDEX_3 i3; Element2d face(TRIG); el.GetFace (l+1, face); for (int kk = 1; kk <= 3; kk++) i3.I(kk) = face.PNum(kk); locfaces.Append (i3); } } PointFunction1 pf (mesh.Points(), locfaces, mp, -1); OptiParameters par; par.maxit_linsearch = 50; par.maxit_bfgs = 20; Point3d pnew = Center (p1, p2); Vector px(3); px(0) = pnew.X(); px(1) = pnew.Y(); px(2) = pnew.Z(); if (elerrs[ei] > 0.1 * badmax) BFGS (px, pf, par); bad2 = pf.Func (px); pnew.X() = px(0); pnew.Y() = px(1); pnew.Z() = px(2); PointIndex hpinew = mesh.AddPoint (pnew); // ptyps.Append (INNERPOINT); for (int k = 0; k < hasbothpoints.Size(); k++) { Element & oldel = mesh[hasbothpoints[k]]; Element newel1 = oldel; Element newel2 = oldel; oldel.flags.illegal_valid = 0; newel1.flags.illegal_valid = 0; newel2.flags.illegal_valid = 0; for (int l = 0; l < 4; l++) { if (newel1[l] == pi2) newel1[l] = hpinew; if (newel2[l] == pi1) newel2[l] = hpinew; } if (!mesh.LegalTet (oldel)) bad1 += 1e6; if (!mesh.LegalTet (newel1)) bad2 += 1e6; if (!mesh.LegalTet (newel2)) bad2 += 1e6; } // mesh.PointTypes().DeleteLast(); mesh.Points().DeleteLast(); if (bad2 < bad1) /* (bad1 > 1e4 && boundp.Test(pi1) && boundp.Test(pi2)) */ { cnt++; PointIndex pinew = mesh.AddPoint (pnew); for (ElementIndex ei : hasbothpoints) { Element & oldel = mesh[ei]; Element newel = oldel; newel.flags.illegal_valid = 0; oldel.flags.illegal_valid = 0; for (int l = 0; l < 4; l++) { origpoint.Clear (oldel[l]); if (oldel[l] == pi2) oldel[l] = pinew; if (newel[l] == pi1) newel[l] = pinew; } mesh.AddVolumeElement (newel); } j = 10; // end j-loop } } } mesh.Compress(); PrintMessage (5, cnt, " splits performed"); (*testout) << "Splitt - Improve done" << "\n"; if (goal == OPT_QUALITY) { bad1 = CalcTotalBad (mesh.Points(), mesh.VolumeElements()); (*testout) << "Total badness = " << bad1 << endl; int cntill = 0; ne = mesh.GetNE(); for (ElementIndex ei = 0; ei < ne; ei++) if (!mesh.LegalTet (mesh[ei])) cntill++; // cout << cntill << " illegal tets" << endl; } multithread.task = savetask; } void MeshOptimize3d :: SwapImprove (Mesh & mesh, OPTIMIZEGOAL goal, const BitArray * working_elements) { PointIndex pi3(0), pi4(0), pi5(0), pi6(0); int cnt = 0; Element el21(TET), el22(TET), el31(TET), el32(TET), el33(TET); Element el1(TET), el2(TET), el3(TET), el4(TET); Element el1b(TET), el2b(TET), el3b(TET), el4b(TET); double bad1, bad2, bad3; int np = mesh.GetNP(); int ne = mesh.GetNE(); // contains at least all elements at node TABLE elementsonnode(np); Array hasbothpoints; PrintMessage (3, "SwapImprove "); (*testout) << "\n" << "Start SwapImprove" << endl; const char * savetask = multithread.task; multithread.task = "Swap Improve"; // mesh.CalcSurfacesOfNode (); INDEX_3_HASHTABLE faces(mesh.GetNOpenElements()/3 + 2); if (goal == OPT_CONFORM) { for (int i = 1; i <= mesh.GetNOpenElements(); i++) { const Element2d & hel = mesh.OpenElement(i); INDEX_3 face(hel[0], hel[1], hel[2]); face.Sort(); faces.Set (face, 1); } } // Calculate total badness if (goal == OPT_QUALITY) { bad1 = CalcTotalBad (mesh.Points(), mesh.VolumeElements()); (*testout) << "Total badness = " << bad1 << endl; } // find elements on node for (ElementIndex ei = 0; ei < ne; ei++) for (PointIndex pi : mesh[ei].PNums()) elementsonnode.Add (pi, ei); /* for (int j = 0; j < mesh[ei].GetNP(); j++) elementsonnode.Add (mesh[ei][j], ei); */ // INDEX_2_HASHTABLE edgeused(2 * ne + 5); INDEX_2_CLOSED_HASHTABLE edgeused(12 * ne + 5); for (ElementIndex ei = 0; ei < ne; ei++) { if (multithread.terminate) break; if (mp.only3D_domain_nr && mp.only3D_domain_nr != mesh.VolumeElement(ei).GetIndex()) continue; multithread.percent = 100.0 * (ei+1) / ne; if ((mesh.ElementType(ei)) == FIXEDELEMENT) continue; if(working_elements && ei < working_elements->Size() && !working_elements->Test(ei)) continue; if (mesh[ei].IsDeleted()) continue; if ((goal == OPT_LEGAL) && mesh.LegalTet (mesh[ei]) && CalcBad (mesh.Points(), mesh[ei], 0) < 1e3) continue; // int onlybedges = 1; for (int j = 0; j < 6; j++) { // loop over edges const Element & elemi = mesh[ei]; if (elemi.IsDeleted()) continue; int mattyp = elemi.GetIndex(); static const int tetedges[6][2] = { { 0, 1 }, { 0, 2 }, { 0, 3 }, { 1, 2 }, { 1, 3 }, { 2, 3 } }; PointIndex pi1 = elemi[tetedges[j][0]]; PointIndex pi2 = elemi[tetedges[j][1]]; if (pi2 < pi1) Swap (pi1, pi2); if (mesh.BoundaryEdge (pi1, pi2)) continue; INDEX_2 i2 (pi1, pi2); i2.Sort(); if (edgeused.Used(i2)) continue; edgeused.Set (i2, 1); hasbothpoints.SetSize (0); for (int k = 0; k < elementsonnode[pi1].Size(); k++) { bool has1 = 0, has2 = 0; ElementIndex elnr = elementsonnode[pi1][k]; const Element & elem = mesh[elnr]; if (elem.IsDeleted()) continue; for (int l = 0; l < elem.GetNP(); l++) { if (elem[l] == pi1) has1 = 1; if (elem[l] == pi2) has2 = 1; } if (has1 && has2) { // only once if (hasbothpoints.Contains (elnr)) has1 = false; if (has1) { hasbothpoints.Append (elnr); } } } bool puretet = true; for (ElementIndex ei : hasbothpoints) if (mesh[ei].GetType () != TET) puretet = false; if (!puretet) continue; int nsuround = hasbothpoints.Size(); if ( nsuround == 3 ) { Element & elem = mesh[hasbothpoints[0]]; for (int l = 0; l < 4; l++) if (elem[l] != pi1 && elem[l] != pi2) { pi4 = pi3; pi3 = elem[l]; } el31[0] = pi1; el31[1] = pi2; el31[2] = pi3; el31[3] = pi4; el31.SetIndex (mattyp); if (WrongOrientation (mesh.Points(), el31)) { Swap (pi3, pi4); el31[2] = pi3; el31[3] = pi4; } pi5 = 0; for (int k = 0; k < 3; k++) // JS, 201212 { const Element & elemk = mesh[hasbothpoints[k]]; bool has1 = false; for (int l = 0; l < 4; l++) if (elemk[l] == pi4) has1 = true; if (has1) { for (int l = 0; l < 4; l++) if (elemk[l] != pi1 && elemk[l] != pi2 && elemk[l] != pi4) pi5 = elemk[l]; } } if (!pi5.IsValid()) throw NgException("Illegal state observed in SwapImprove"); el32[0] = pi1; el32[1] = pi2; el32[2] = pi4; el32[3] = pi5; el32.SetIndex (mattyp); el33[0] = pi1; el33[1] = pi2; el33[2] = pi5; el33[3] = pi3; el33.SetIndex (mattyp); elementsonnode.Add (pi4, hasbothpoints[1]); elementsonnode.Add (pi3, hasbothpoints[2]); bad1 = CalcBad (mesh.Points(), el31, 0) + CalcBad (mesh.Points(), el32, 0) + CalcBad (mesh.Points(), el33, 0); el31.flags.illegal_valid = 0; el32.flags.illegal_valid = 0; el33.flags.illegal_valid = 0; if (!mesh.LegalTet(el31) || !mesh.LegalTet(el32) || !mesh.LegalTet(el33)) bad1 += 1e4; el21[0] = pi3; el21[1] = pi4; el21[2] = pi5; el21[3] = pi2; el21.SetIndex (mattyp); el22[0] = pi5; el22[1] = pi4; el22[2] = pi3; el22[3] = pi1; el22.SetIndex (mattyp); bad2 = CalcBad (mesh.Points(), el21, 0) + CalcBad (mesh.Points(), el22, 0); el21.flags.illegal_valid = 0; el22.flags.illegal_valid = 0; if (!mesh.LegalTet(el21) || !mesh.LegalTet(el22)) bad2 += 1e4; if (goal == OPT_CONFORM && bad2 < 1e4) { INDEX_3 face(pi3, pi4, pi5); face.Sort(); if (faces.Used(face)) { // (*testout) << "3->2 swap, could improve conformity, bad1 = " << bad1 // << ", bad2 = " << bad2 << endl; if (bad2 < 1e4) bad1 = 2 * bad2; } /* else { INDEX_2 hi1(pi3, pi4); hi1.Sort(); INDEX_2 hi2(pi3, pi5); hi2.Sort(); INDEX_2 hi3(pi4, pi5); hi3.Sort(); if (boundaryedges->Used (hi1) || boundaryedges->Used (hi2) || boundaryedges->Used (hi3) ) bad1 = 2 * bad2; } */ } if (bad2 < bad1) { // (*mycout) << "3->2 " << flush; // (*testout) << "3->2 conversion" << endl; cnt++; /* (*testout) << "3->2 swap, old els = " << endl << mesh[hasbothpoints[0]] << endl << mesh[hasbothpoints[1]] << endl << mesh[hasbothpoints[2]] << endl << "new els = " << endl << el21 << endl << el22 << endl; */ el21.flags.illegal_valid = 0; el22.flags.illegal_valid = 0; mesh[hasbothpoints[0]] = el21; mesh[hasbothpoints[1]] = el22; for (int l = 0; l < 4; l++) mesh[hasbothpoints[2]][l].Invalidate(); mesh[hasbothpoints[2]].Delete(); for (int k = 0; k < 2; k++) for (int l = 0; l < 4; l++) elementsonnode.Add (mesh[hasbothpoints[k]][l], hasbothpoints[k]); } } if (nsuround == 4) { const Element & elem1 = mesh[hasbothpoints[0]]; for (int l = 0; l < 4; l++) if (elem1[l] != pi1 && elem1[l] != pi2) { pi4 = pi3; pi3 = elem1[l]; } el1[0] = pi1; el1[1] = pi2; el1[2] = pi3; el1[3] = pi4; el1.SetIndex (mattyp); if (WrongOrientation (mesh.Points(), el1)) { Swap (pi3, pi4); el1[2] = pi3; el1[3] = pi4; } pi5.Invalidate(); for (int k = 0; k < 4; k++) { const Element & elem = mesh[hasbothpoints[k]]; bool has1 = elem.PNums().Contains(pi4); if (has1) { for (int l = 0; l < 4; l++) if (elem[l] != pi1 && elem[l] != pi2 && elem[l] != pi4) pi5 = elem[l]; } } pi6.Invalidate(); for (int k = 0; k < 4; k++) { const Element & elem = mesh[hasbothpoints[k]]; bool has1 = elem.PNums().Contains(pi3); if (has1) { for (int l = 0; l < 4; l++) if (elem[l] != pi1 && elem[l] != pi2 && elem[l] != pi3) pi6 = elem[l]; } } /* INDEX_2 i22(pi3, pi5); i22.Sort(); INDEX_2 i23(pi4, pi6); i23.Sort(); */ el1[0] = pi1; el1[1] = pi2; el1[2] = pi3; el1[3] = pi4; el1.SetIndex (mattyp); el2[0] = pi1; el2[1] = pi2; el2[2] = pi4; el2[3] = pi5; el2.SetIndex (mattyp); el3[0] = pi1; el3[1] = pi2; el3[2] = pi5; el3[3] = pi6; el3.SetIndex (mattyp); el4[0] = pi1; el4[1] = pi2; el4[2] = pi6; el4[3] = pi3; el4.SetIndex (mattyp); // elementsonnode.Add (pi4, hasbothpoints.Elem(2)); // elementsonnode.Add (pi3, hasbothpoints.Elem(3)); bad1 = CalcBad (mesh.Points(), el1, 0) + CalcBad (mesh.Points(), el2, 0) + CalcBad (mesh.Points(), el3, 0) + CalcBad (mesh.Points(), el4, 0); el1.flags.illegal_valid = 0; el2.flags.illegal_valid = 0; el3.flags.illegal_valid = 0; el4.flags.illegal_valid = 0; if (goal != OPT_CONFORM) { if (!mesh.LegalTet(el1) || !mesh.LegalTet(el2) || !mesh.LegalTet(el3) || !mesh.LegalTet(el4)) bad1 += 1e4; } el1[0] = pi3; el1[1] = pi5; el1[2] = pi2; el1[3] = pi4; el1.SetIndex (mattyp); el2[0] = pi3; el2[1] = pi5; el2[2] = pi4; el2[3] = pi1; el2.SetIndex (mattyp); el3[0] = pi3; el3[1] = pi5; el3[2] = pi1; el3[3] = pi6; el3.SetIndex (mattyp); el4[0] = pi3; el4[1] = pi5; el4[2] = pi6; el4[3] = pi2; el4.SetIndex (mattyp); bad2 = CalcBad (mesh.Points(), el1, 0) + CalcBad (mesh.Points(), el2, 0) + CalcBad (mesh.Points(), el3, 0) + CalcBad (mesh.Points(), el4, 0); el1.flags.illegal_valid = 0; el2.flags.illegal_valid = 0; el3.flags.illegal_valid = 0; el4.flags.illegal_valid = 0; if (goal != OPT_CONFORM) { if (!mesh.LegalTet(el1) || !mesh.LegalTet(el2) || !mesh.LegalTet(el3) || !mesh.LegalTet(el4)) bad2 += 1e4; } el1b[0] = pi4; el1b[1] = pi6; el1b[2] = pi3; el1b[3] = pi2; el1b.SetIndex (mattyp); el2b[0] = pi4; el2b[1] = pi6; el2b[2] = pi2; el2b[3] = pi5; el2b.SetIndex (mattyp); el3b[0] = pi4; el3b[1] = pi6; el3b[2] = pi5; el3b[3] = pi1; el3b.SetIndex (mattyp); el4b[0] = pi4; el4b[1] = pi6; el4b[2] = pi1; el4b[3] = pi3; el4b.SetIndex (mattyp); bad3 = CalcBad (mesh.Points(), el1b, 0) + CalcBad (mesh.Points(), el2b, 0) + CalcBad (mesh.Points(), el3b, 0) + CalcBad (mesh.Points(), el4b, 0); el1b.flags.illegal_valid = 0; el2b.flags.illegal_valid = 0; el3b.flags.illegal_valid = 0; el4b.flags.illegal_valid = 0; if (goal != OPT_CONFORM) { if (!mesh.LegalTet(el1b) || !mesh.LegalTet(el2b) || !mesh.LegalTet(el3b) || !mesh.LegalTet(el4b)) bad3 += 1e4; } /* int swap2 = (bad2 < bad1) && (bad2 < bad3); int swap3 = !swap2 && (bad3 < bad1); if ( ((bad2 < 10 * bad1) || (bad2 < 1e6)) && mesh.BoundaryEdge (pi3, pi5)) swap2 = 1; else if ( ((bad3 < 10 * bad1) || (bad3 < 1e6)) && mesh.BoundaryEdge (pi4, pi6)) { swap3 = 1; swap2 = 0; } */ bool swap2, swap3; if (goal != OPT_CONFORM) { swap2 = (bad2 < bad1) && (bad2 < bad3); swap3 = !swap2 && (bad3 < bad1); } else { if (mesh.BoundaryEdge (pi3, pi5)) bad2 /= 1e6; if (mesh.BoundaryEdge (pi4, pi6)) bad3 /= 1e6; swap2 = (bad2 < bad1) && (bad2 < bad3); swap3 = !swap2 && (bad3 < bad1); } if (swap2 || swap3) { // (*mycout) << "4->4 " << flush; cnt++; // (*testout) << "4->4 conversion" << "\n"; /* (*testout) << "bad1 = " << bad1 << " bad2 = " << bad2 << " bad3 = " << bad3 << "\n"; (*testout) << "Points: " << pi1 << " " << pi2 << " " << pi3 << " " << pi4 << " " << pi5 << " " << pi6 << "\n"; (*testout) << "Elements: " << hasbothpoints.Get(1) << " " << hasbothpoints.Get(2) << " " << hasbothpoints.Get(3) << " " << hasbothpoints.Get(4) << " " << "\n"; */ /* { int i1, j1; for (i1 = 1; i1 <= 4; i1++) { for (j1 = 1; j1 <= 4; j1++) (*testout) << volelements.Get(hasbothpoints.Get(i1)).PNum(j1) << " "; (*testout) << "\n"; } } */ } if (swap2) { // (*mycout) << "bad1 = " << bad1 << " bad2 = " << bad2 << "\n"; /* (*testout) << "4->4 swap A, old els = " << endl << mesh[hasbothpoints[0]] << endl << mesh[hasbothpoints[1]] << endl << mesh[hasbothpoints[2]] << endl << mesh[hasbothpoints[3]] << endl << "new els = " << endl << el1 << endl << el2 << endl << el3 << endl << el4 << endl; */ el1.flags.illegal_valid = 0; el2.flags.illegal_valid = 0; el3.flags.illegal_valid = 0; el4.flags.illegal_valid = 0; mesh[hasbothpoints[0]] = el1; mesh[hasbothpoints[1]] = el2; mesh[hasbothpoints[2]] = el3; mesh[hasbothpoints[3]] = el4; for (int k = 0; k < 4; k++) for (int l = 0; l < 4; l++) elementsonnode.Add (mesh[hasbothpoints[k]][l], hasbothpoints[k]); } else if (swap3) { // (*mycout) << "bad1 = " << bad1 << " bad3 = " << bad3 << "\n"; el1b.flags.illegal_valid = 0; el2b.flags.illegal_valid = 0; el3b.flags.illegal_valid = 0; el4b.flags.illegal_valid = 0; /* (*testout) << "4->4 swap A, old els = " << endl << mesh[hasbothpoints[0]] << endl << mesh[hasbothpoints[1]] << endl << mesh[hasbothpoints[2]] << endl << mesh[hasbothpoints[3]] << endl << "new els = " << endl << el1b << endl << el2b << endl << el3b << endl << el4b << endl; */ mesh[hasbothpoints[0]] = el1b; mesh[hasbothpoints[1]] = el2b; mesh[hasbothpoints[2]] = el3b; mesh[hasbothpoints[3]] = el4b; for (int k = 0; k < 4; k++) for (int l = 0; l < 4; l++) elementsonnode.Add (mesh[hasbothpoints[k]][l], hasbothpoints[k]); } } if (nsuround >= 5) { Element hel(TET); ArrayMem suroundpts(nsuround); ArrayMem tetused(nsuround); Element & elem = mesh[hasbothpoints[0]]; for (int l = 0; l < 4; l++) if (elem[l] != pi1 && elem[l] != pi2) { pi4 = pi3; pi3 = elem[l]; } hel[0] = pi1; hel[1] = pi2; hel[2] = pi3; hel[3] = pi4; hel.SetIndex (mattyp); if (WrongOrientation (mesh.Points(), hel)) { Swap (pi3, pi4); hel[2] = pi3; hel[3] = pi4; } // suroundpts.SetSize (nsuround); suroundpts = -17; suroundpts[0] = pi3; suroundpts[1] = pi4; tetused = false; tetused[0] = true; for (int l = 2; l < nsuround; l++) { PointIndex oldpi = suroundpts[l-1]; PointIndex newpi; newpi.Invalidate(); for (int k = 0; k < nsuround && !newpi.IsValid(); k++) if (!tetused[k]) { const Element & nel = mesh[hasbothpoints[k]]; for (int k2 = 0; k2 < 4 && !newpi.IsValid(); k2++) if (nel[k2] == oldpi) { newpi = nel[0] + nel[1] + nel[2] + nel[3] - pi1 - pi2 - oldpi; tetused[k] = true; suroundpts[l] = newpi; } } } bad1 = 0; for (int k = 0; k < nsuround; k++) { hel[0] = pi1; hel[1] = pi2; hel[2] = suroundpts[k]; hel[3] = suroundpts[(k+1) % nsuround]; hel.SetIndex (mattyp); bad1 += CalcBad (mesh.Points(), hel, 0); } // (*testout) << "nsuround = " << nsuround << " bad1 = " << bad1 << endl; int bestl = -1; int confface = -1; int confedge = -1; double badopt = bad1; for (int l = 0; l < nsuround; l++) { bad2 = 0; for (int k = l+1; k <= nsuround + l - 2; k++) { hel[0] = suroundpts[l]; hel[1] = suroundpts[k % nsuround]; hel[2] = suroundpts[(k+1) % nsuround]; hel[3] = pi2; bad2 += CalcBad (mesh.Points(), hel, 0); hel.flags.illegal_valid = 0; if (!mesh.LegalTet(hel)) bad2 += 1e4; hel[2] = suroundpts[k % nsuround]; hel[1] = suroundpts[(k+1) % nsuround]; hel[3] = pi1; bad2 += CalcBad (mesh.Points(), hel, 0); hel.flags.illegal_valid = 0; if (!mesh.LegalTet(hel)) bad2 += 1e4; } // (*testout) << "bad2," << l << " = " << bad2 << endl; if ( bad2 < badopt ) { bestl = l; badopt = bad2; } if (goal == OPT_CONFORM) // (bad2 <= 100 * bad1 || bad2 <= 1e6)) { bool nottoobad = (bad2 <= bad1) || (bad2 <= 100 * bad1 && bad2 <= 1e18) || (bad2 <= 1e8); for (int k = l+1; k <= nsuround + l - 2; k++) { INDEX_3 hi3(suroundpts[l], suroundpts[k % nsuround], suroundpts[(k+1) % nsuround]); hi3.Sort(); if (faces.Used(hi3)) { // (*testout) << "could improve face conformity, bad1 = " << bad1 // << ", bad 2 = " << bad2 << ", nottoobad = " << nottoobad << endl; if (nottoobad) confface = l; } } for (int k = l+2; k <= nsuround+l-2; k++) { if (mesh.BoundaryEdge (suroundpts[l], suroundpts[k % nsuround])) { /* *testout << "could improve edge conformity, bad1 = " << bad1 << ", bad 2 = " << bad2 << ", nottoobad = " << nottoobad << endl; */ if (nottoobad) confedge = l; } } } } if (confedge != -1) bestl = confedge; if (confface != -1) bestl = confface; if (bestl != -1) { // (*mycout) << nsuround << "->" << 2 * (nsuround-2) << " " << flush; cnt++; for (int k = bestl+1; k <= nsuround + bestl - 2; k++) { int k1; hel[0] = suroundpts[bestl]; hel[1] = suroundpts[k % nsuround]; hel[2] = suroundpts[(k+1) % nsuround]; hel[3] = pi2; hel.flags.illegal_valid = 0; /* (*testout) << nsuround << "-swap, new el,top = " << hel << endl; */ mesh.AddVolumeElement (hel); for (k1 = 0; k1 < 4; k1++) elementsonnode.Add (hel[k1], mesh.GetNE()-1); hel[2] = suroundpts[k % nsuround]; hel[1] = suroundpts[(k+1) % nsuround]; hel[3] = pi1; /* (*testout) << nsuround << "-swap, new el,bot = " << hel << endl; */ mesh.AddVolumeElement (hel); for (k1 = 0; k1 < 4; k1++) elementsonnode.Add (hel[k1], mesh.GetNE()-1); } for (int k = 0; k < nsuround; k++) { Element & rel = mesh[hasbothpoints[k]]; /* (*testout) << nsuround << "-swap, old el = " << rel << endl; */ rel.Delete(); for (int k1 = 0; k1 < 4; k1++) rel[k1].Invalidate(); } } } } /* if (onlybedges) { (*testout) << "bad tet: " << volelements.Get(i)[0] << volelements.Get(i)[1] << volelements.Get(i)[2] << volelements.Get(i)[3] << "\n"; if (!mesh.LegalTet (volelements.Get(i))) cerr << "Illegal tet" << "\n"; } */ } // (*mycout) << endl; /* cout << "edgeused: "; edgeused.PrintMemInfo(cout); */ PrintMessage (5, cnt, " swaps performed"); mesh.Compress (); /* if (goal == OPT_QUALITY) { bad1 = CalcTotalBad (mesh.Points(), mesh.VolumeElements()); // (*testout) << "Total badness = " << bad1 << endl; } */ /* for (i = 1; i <= GetNE(); i++) if (volelements.Get(i)[0]) if (!mesh.LegalTet (volelements.Get(i))) { cout << "detected illegal tet, 2" << endl; (*testout) << "detected illegal tet1: " << i << endl; } */ multithread.task = savetask; } void MeshOptimize3d :: SwapImproveSurface (Mesh & mesh, OPTIMIZEGOAL goal, const BitArray * working_elements, const Array< Array* > * idmaps) { Array< Array* > locidmaps; const Array< Array* > * used_idmaps; if(idmaps) used_idmaps = idmaps; else { used_idmaps = &locidmaps; for(int i=1; i<=mesh.GetIdentifications().GetMaxNr(); i++) { if(mesh.GetIdentifications().GetType(i) == Identifications::PERIODIC) { locidmaps.Append(new Array); mesh.GetIdentifications().GetMap(i,*locidmaps.Last(),true); } } } PointIndex pi1, pi2, pi3, pi4, pi5, pi6; PointIndex pi1other, pi2other; int cnt = 0; //double bad1, bad2, bad3, sbad; double bad1, sbad; double h; int np = mesh.GetNP(); int ne = mesh.GetNE(); int nse = mesh.GetNSE(); int mattype, othermattype; // contains at least all elements at node TABLE elementsonnode(np); TABLE surfaceelementsonnode(np); TABLE surfaceindicesonnode(np); Array hasbothpoints; Array hasbothpointsother; PrintMessage (3, "SwapImproveSurface "); (*testout) << "\n" << "Start SwapImproveSurface" << endl; const char * savetask = multithread.task; multithread.task = "Swap Improve Surface"; // find elements on node for (ElementIndex ei = 0; ei < ne; ei++) for (int j = 0; j < mesh[ei].GetNP(); j++) elementsonnode.Add (mesh[ei][j], ei); for (SurfaceElementIndex sei = 0; sei < nse; sei++) for(int j=0; j edgeused(2 * ne + 5); INDEX_2_CLOSED_HASHTABLE edgeused(12 * ne + 5); for (ElementIndex ei = 0; ei < ne; ei++) { if (multithread.terminate) break; multithread.percent = 100.0 * (ei+1) / ne; if (mesh.ElementType(ei) == FIXEDELEMENT) continue; if(working_elements && ei < working_elements->Size() && !working_elements->Test(ei)) continue; if (mesh[ei].IsDeleted()) continue; if ((goal == OPT_LEGAL) && mesh.LegalTet (mesh[ei]) && CalcBad (mesh.Points(), mesh[ei], 0) < 1e3) continue; const Element & elemi = mesh[ei]; //Element elemi = mesh[ei]; if (elemi.IsDeleted()) continue; mattype = elemi.GetIndex(); bool swapped = false; for (int j = 0; !swapped && j < 6; j++) { // loop over edges static const int tetedges[6][2] = { { 0, 1 }, { 0, 2 }, { 0, 3 }, { 1, 2 }, { 1, 3 }, { 2, 3 } }; pi1 = elemi[tetedges[j][0]]; pi2 = elemi[tetedges[j][1]]; if (pi2 < pi1) Swap (pi1, pi2); bool found = false; for(int k=0; !found && kSize(); k++) { if(pi2 < (*used_idmaps)[k]->Size() + PointIndex::BASE) { pi1other = (*(*used_idmaps)[k])[pi1]; pi2other = (*(*used_idmaps)[k])[pi2]; found = (pi1other != 0 && pi2other != 0 && pi1other != pi1 && pi2other != pi2); if(found) idnum = k; } } if(found) periodic = true; else { periodic = false; pi1other = pi1; pi2other = pi2; } if (!mesh.BoundaryEdge (pi1, pi2) || mesh.IsSegment(pi1, pi2)) continue; othermattype = -1; INDEX_2 i2 (pi1, pi2); i2.Sort(); if (edgeused.Used(i2)) continue; edgeused.Set (i2, 1); if(periodic) { i2.I1() = pi1other; i2.I2() = pi2other; i2.Sort(); edgeused.Set(i2,1); } hasbothpoints.SetSize (0); hasbothpointsother.SetSize (0); for (int k = 0; k < elementsonnode[pi1].Size(); k++) { bool has1 = false, has2 = false; ElementIndex elnr = elementsonnode[pi1][k]; const Element & elem = mesh[elnr]; if (elem.IsDeleted()) continue; for (int l = 0; l < elem.GetNP(); l++) { if (elem[l] == pi1) has1 = true; if (elem[l] == pi2) has2 = true; } if (has1 && has2) { if(othermattype == -1 && elem.GetIndex() != mattype) othermattype = elem.GetIndex(); if(elem.GetIndex() == mattype) { // only once for (int l = 0; l < hasbothpoints.Size(); l++) if (hasbothpoints[l] == elnr) has1 = 0; if (has1) hasbothpoints.Append (elnr); } else if(elem.GetIndex() == othermattype) { // only once for (int l = 0; l < hasbothpointsother.Size(); l++) if (hasbothpointsother[l] == elnr) has1 = 0; if (has1) hasbothpointsother.Append (elnr); } else { cout << "problem with domain indices" << endl; (*testout) << "problem: mattype = " << mattype << ", othermattype = " << othermattype << " elem " << elem << " mt " << elem.GetIndex() << endl << " pi1 " << pi1 << " pi2 " << pi2 << endl; (*testout) << "hasbothpoints:" << endl; for(int ii=0; ii < hasbothpoints.Size(); ii++) (*testout) << mesh[hasbothpoints[ii]] << endl; (*testout) << "hasbothpointsother:" << endl; for(int ii=0; ii < hasbothpointsother.Size(); ii++) (*testout) << mesh[hasbothpointsother[ii]] << endl; } } } if(hasbothpointsother.Size() > 0 && periodic) throw NgException("SwapImproveSurface: Assumption about interface/periodicity wrong!"); if(periodic) { for (int k = 0; k < elementsonnode[pi1other].Size(); k++) { bool has1 = false, has2 = false; ElementIndex elnr = elementsonnode[pi1other][k]; const Element & elem = mesh[elnr]; if (elem.IsDeleted()) continue; for (int l = 0; l < elem.GetNP(); l++) { if (elem[l] == pi1other) has1 = true; if (elem[l] == pi2other) has2 = true; } if (has1 && has2) { if(othermattype == -1) othermattype = elem.GetIndex(); // only once for (int l = 0; l < hasbothpointsother.Size(); l++) if (hasbothpointsother[l] == elnr) has1 = 0; if (has1) hasbothpointsother.Append (elnr); } } } //for(k=0; k v1 = mesh[sp1]-mesh[pi1], v2 = mesh[sp2]-mesh[pi1], v3 = mesh[sp1]-mesh[pi2], v4 = mesh[sp2]-mesh[pi2]; double vol = 0.5*(Cross(v1,v2).Length() + Cross(v3,v4).Length()); h = sqrt(vol); h = 0; sbad = CalcTriangleBadness (mesh[pi1],mesh[pi2],mesh[sp1],0,0) + CalcTriangleBadness (mesh[pi2],mesh[pi1],mesh[sp2],0,0); bool puretet = true; for (int k = 0; puretet && k < hasbothpoints.Size(); k++) if (mesh[hasbothpoints[k]].GetType () != TET) puretet = false; for (int k = 0; puretet && k < hasbothpointsother.Size(); k++) if (mesh[hasbothpointsother[k]].GetType () != TET) puretet = false; if (!puretet) continue; int nsuround = hasbothpoints.Size(); int nsuroundother = hasbothpointsother.Size(); Array < int > outerpoints(nsuround+1); outerpoints[0] = sp1; for(int i=0; i 0) (*testout) << mesh[hasbothpoints[ii]][jj] << " between " << mesh.mlbetweennodes[mesh[hasbothpoints[ii]][jj]][0] << " and " << mesh.mlbetweennodes[mesh[hasbothpoints[ii]][jj]][1] << endl; } (*testout) << "outerpoints: " << outerpoints << endl; (*testout) << "sel1 " << mesh[sel1] << endl << "sel2 " << mesh[sel2] << endl; for(int ii=0; ii<3; ii++) { if(mesh.mlbetweennodes[mesh[sel1][ii]][0] > 0) (*testout) << mesh[sel1][ii] << " between " << mesh.mlbetweennodes[mesh[sel1][ii]][0] << " and " << mesh.mlbetweennodes[mesh[sel1][ii]][1] << endl; if(mesh.mlbetweennodes[mesh[sel2][ii]][0] > 0) (*testout) << mesh[sel2][ii] << " between " << mesh.mlbetweennodes[mesh[sel2][ii]][0] << " and " << mesh.mlbetweennodes[mesh[sel2][ii]][1] << endl; } } Array < int > outerpointsother; if(nsuroundother > 0) { outerpointsother.SetSize(nsuroundother+1); outerpointsother[0] = sp2other; } for(int i=0; i 0 && outerpointsother[nsuroundother] != sp1other) { cerr << "OJE OJE OJE (other)" << endl; (*testout) << "OJE OJE OJE (other)" << endl; (*testout) << "pi1 " << pi1 << " pi2 " << pi2 << " sp1 " << sp1 << " sp2 " << sp2 << endl; (*testout) << "hasbothpoints: " << endl; for(int ii=0; ii < hasbothpoints.Size(); ii++) { (*testout) << mesh[hasbothpoints[ii]] << endl; for(int jj=0; jj 0) (*testout) << mesh[hasbothpoints[ii]][jj] << " between " << mesh.mlbetweennodes[mesh[hasbothpoints[ii]][jj]][0] << " and " << mesh.mlbetweennodes[mesh[hasbothpoints[ii]][jj]][1] << endl; } (*testout) << "outerpoints: " << outerpoints << endl; (*testout) << "sel1 " << mesh[sel1] << endl << "sel2 " << mesh[sel2] << endl; for(int ii=0; ii<3; ii++) { if(mesh.mlbetweennodes[mesh[sel1][ii]][0] > 0) (*testout) << mesh[sel1][ii] << " between " << mesh.mlbetweennodes[mesh[sel1][ii]][0] << " and " << mesh.mlbetweennodes[mesh[sel1][ii]][1] << endl; if(mesh.mlbetweennodes[mesh[sel2][ii]][0] > 0) (*testout) << mesh[sel2][ii] << " between " << mesh.mlbetweennodes[mesh[sel2][ii]][0] << " and " << mesh.mlbetweennodes[mesh[sel2][ii]][1] << endl; } (*testout) << "pi1other " << pi1other << " pi2other " << pi2other << " sp1other " << sp1other << " sp2other " << sp2other << endl; (*testout) << "hasbothpointsother: " << endl; for(int ii=0; ii < hasbothpointsother.Size(); ii++) { (*testout) << mesh[hasbothpointsother[ii]] << endl; for(int jj=0; jj 0) (*testout) << mesh[hasbothpointsother[ii]][jj] << " between " << mesh.mlbetweennodes[mesh[hasbothpointsother[ii]][jj]][0] << " and " << mesh.mlbetweennodes[mesh[hasbothpointsother[ii]][jj]][1] << endl; } (*testout) << "outerpoints: " << outerpointsother << endl; (*testout) << "sel1other " << mesh[sel1other] << endl << "sel2other " << mesh[sel2other] << endl; for(int ii=0; ii<3; ii++) { if(mesh.mlbetweennodes[mesh[sel1other][ii]][0] > 0) (*testout) << mesh[sel1other][ii] << " between " << mesh.mlbetweennodes[mesh[sel1other][ii]][0] << " and " << mesh.mlbetweennodes[mesh[sel1other][ii]][1] << endl; if(mesh.mlbetweennodes[mesh[sel2other][ii]][0] > 0) (*testout) << mesh[sel2other][ii] << " between " << mesh.mlbetweennodes[mesh[sel2other][ii]][0] << " and " << mesh.mlbetweennodes[mesh[sel2other][ii]][1] << endl; } } bad1=0; for(int i=0; i * > newelts(startpoints); Array < Array < Element* > * > neweltsother(startpointsother); double minbad = 1e50, minbadother = 1e50, currbad; int minpos = -1, minposother = -1; //(*testout) << "pi1 " << pi1 << " pi2 " << pi2 << " outerpoints " << outerpoints << endl; for(int i=0; i(2*(nsuround-1)); for(int jj=0; jjSize(); jj++) wrongorientation = wrongorientation && WrongOrientation(mesh.Points(), *(*newelts[i])[jj]); currbad = 0; for(int jj=0; jjSize(); jj++) { if(wrongorientation) Swap((*(*newelts[i])[jj])[2],(*(*newelts[i])[jj])[3]); // not two new faces on same surface Array face_index; for(int k = 0; kSize()); if(currbad < minbad) { minbad = currbad; minpos = i; } } if(startpointsother == 0) minbadother = 0; for(int i=0; i(2*(nsuroundother)); for(int jj=0; jjSize(); jj++) wrongorientation = wrongorientation && WrongOrientation(mesh.Points(), *(*neweltsother[i])[jj]); currbad = 0; for(int jj=0; jjSize(); jj++) { if(wrongorientation) Swap((*(*neweltsother[i])[jj])[2],(*(*neweltsother[i])[jj])[3]); currbad += CalcBad(mesh.Points(),*(*neweltsother[i])[jj],h); } //currbad /= double(neweltsother[i]->Size()); if(currbad < minbadother) { minbadother = currbad; minposother = i; } } //(*testout) << "minbad " << minbad << " bad1 " << bad1 << endl; double sbadnew = CalcTriangleBadness (mesh[pi1],mesh[sp2],mesh[sp1],0,0) + CalcTriangleBadness (mesh[pi2],mesh[sp1],mesh[sp2],0,0); int denom = newelts[minpos]->Size(); if(minposother >= 0) denom += neweltsother[minposother]->Size(); if((minbad+minbadother)/double(denom) < bad1 && sbadnew < sbad) { cnt++; swapped = true; int start1 = -1; for(int l=0; l<3; l++) if(mesh[sel1][l] == pi1) start1 = l; if(mesh[sel1][(start1+1)%3] == pi2) { mesh[sel1][0] = pi1; mesh[sel1][1] = sp2; mesh[sel1][2] = sp1; mesh[sel2][0] = pi2; mesh[sel2][1] = sp1; mesh[sel2][2] = sp2; } else { mesh[sel1][0] = pi2; mesh[sel1][1] = sp2; mesh[sel1][2] = sp1; mesh[sel2][0] = pi1; mesh[sel2][1] = sp1; mesh[sel2][2] = sp2; } //(*testout) << "changed surface element " << sel1 << " to " << mesh[sel1] << ", " << sel2 << " to " << mesh[sel2] << endl; for(int l=0; l<3; l++) { surfaceelementsonnode.Add(mesh[sel1][l],sel1); surfaceelementsonnode.Add(mesh[sel2][l],sel2); } if(periodic) { start1 = -1; for(int l=0; l<3; l++) if(mesh[sel1other][l] == pi1other) start1 = l; //(*testout) << "changed surface elements " << mesh[sel1other] << " and " << mesh[sel2other] << endl; if(mesh[sel1other][(start1+1)%3] == pi2other) { mesh[sel1other][0] = pi1other; mesh[sel1other][1] = sp2other; mesh[sel1other][2] = sp1other; mesh[sel2other][0] = pi2other; mesh[sel2other][1] = sp1other; mesh[sel2other][2] = sp2other; //(*testout) << " with rule 1" << endl; } else { mesh[sel1other][0] = pi2other; mesh[sel1other][1] = sp2other; mesh[sel1other][2] = sp1other; mesh[sel2other][0] = pi1other; mesh[sel2other][1] = sp1other; mesh[sel2other][2] = sp2other; //(*testout) << " with rule 2" << endl; } //(*testout) << " to " << mesh[sel1other] << " and " << mesh[sel2other] << endl; //(*testout) << " and surface element " << sel1other << " to " << mesh[sel1other] << ", " << sel2other << " to " << mesh[sel2other] << endl; for(int l=0; l<3; l++) { surfaceelementsonnode.Add(mesh[sel1other][l],sel1other); surfaceelementsonnode.Add(mesh[sel2other][l],sel2other); } } for(int i=0; i 0) { for(int i=0; iSize(); jj++) delete (*newelts[i])[jj]; delete newelts[i]; } for(int i=0; iSize(); jj++) delete (*neweltsother[i])[jj]; delete neweltsother[i]; } } } PrintMessage (5, cnt, " swaps performed"); for(int i=0; i 3 conversion */ void MeshOptimize3d :: SwapImprove2 (Mesh & mesh, OPTIMIZEGOAL goal) { PointIndex pi1(0), pi2(0), pi3(0), pi4(0), pi5(0); Element el21(TET), el22(TET), el31(TET), el32(TET), el33(TET); int cnt = 0; double bad1, bad2; int np = mesh.GetNP(); int ne = mesh.GetNE(); int nse = mesh.GetNSE(); if (goal == OPT_CONFORM) return; // contains at least all elements at node TABLE elementsonnode(np); TABLE belementsonnode(np); PrintMessage (3, "SwapImprove2 "); (*testout) << "\n" << "Start SwapImprove2" << "\n"; // TestOk(); /* CalcSurfacesOfNode (); for (i = 1; i <= GetNE(); i++) if (volelements.Get(i)[0]) if (!mesh.LegalTet (volelements.Get(i))) { cout << "detected illegal tet, 1" << endl; (*testout) << "detected illegal tet1: " << i << endl; } */ // Calculate total badness bad1 = CalcTotalBad (mesh.Points(), mesh.VolumeElements()); (*testout) << "Total badness = " << bad1 << endl; // cout << "tot bad = " << bad1 << endl; // find elements on node for (ElementIndex ei = 0; ei < ne; ei++) for (int j = 0; j < mesh[ei].GetNP(); j++) elementsonnode.Add (mesh[ei][j], ei); for (SurfaceElementIndex sei = 0; sei < nse; sei++) for (int j = 0; j < 3; j++) belementsonnode.Add (mesh[sei][j], sei); for (ElementIndex eli1 = 0; eli1 < ne; eli1++) { if (multithread.terminate) break; if (mesh.ElementType (eli1) == FIXEDELEMENT) continue; if (mesh[eli1].GetType() != TET) continue; if ((goal == OPT_LEGAL) && mesh.LegalTet (mesh[eli1]) && CalcBad (mesh.Points(), mesh[eli1], 0) < 1e3) continue; if(mesh.GetDimension()==3 && mp.only3D_domain_nr && mp.only3D_domain_nr != mesh.VolumeElement(eli1).GetIndex()) continue; // cout << "eli = " << eli1 << endl; // (*testout) << "swapimp2, eli = " << eli1 << "; el = " << mesh[eli1] << endl; for (int j = 0; j < 4; j++) { // loop over faces Element & elem = mesh[eli1]; // if (elem[0] < PointIndex::BASE) continue; if (elem.IsDeleted()) continue; int mattyp = elem.GetIndex(); switch (j) { case 0: pi1 = elem.PNum(1); pi2 = elem.PNum(2); pi3 = elem.PNum(3); pi4 = elem.PNum(4); break; case 1: pi1 = elem.PNum(1); pi2 = elem.PNum(4); pi3 = elem.PNum(2); pi4 = elem.PNum(3); break; case 2: pi1 = elem.PNum(1); pi2 = elem.PNum(3); pi3 = elem.PNum(4); pi4 = elem.PNum(2); break; case 3: pi1 = elem.PNum(2); pi2 = elem.PNum(4); pi3 = elem.PNum(3); pi4 = elem.PNum(1); break; } bool bface = 0; for (int k = 0; k < belementsonnode[pi1].Size(); k++) { const Element2d & bel = mesh[belementsonnode[pi1][k]]; bool bface1 = 1; for (int l = 0; l < 3; l++) if (bel[l] != pi1 && bel[l] != pi2 && bel[l] != pi3) { bface1 = 0; break; } if (bface1) { bface = 1; break; } } if (bface) continue; FlatArray row = elementsonnode[pi1]; for (int k = 0; k < row.Size(); k++) { ElementIndex eli2 = row[k]; // cout << "\rei1 = " << eli1 << ", pi1 = " << pi1 << ", k = " << k << ", ei2 = " << eli2 // << ", getne = " << mesh.GetNE(); if ( eli1 != eli2 ) { Element & elem2 = mesh[eli2]; if (elem2.IsDeleted()) continue; if (elem2.GetType() != TET) continue; int comnodes=0; for (int l = 1; l <= 4; l++) if (elem2.PNum(l) == pi1 || elem2.PNum(l) == pi2 || elem2.PNum(l) == pi3) { comnodes++; } else { pi5 = elem2.PNum(l); } if (comnodes == 3) { bad1 = CalcBad (mesh.Points(), elem, 0) + CalcBad (mesh.Points(), elem2, 0); if (!mesh.LegalTet(elem) || !mesh.LegalTet(elem2)) bad1 += 1e4; el31.PNum(1) = pi1; el31.PNum(2) = pi2; el31.PNum(3) = pi5; el31.PNum(4) = pi4; el31.SetIndex (mattyp); el32.PNum(1) = pi2; el32.PNum(2) = pi3; el32.PNum(3) = pi5; el32.PNum(4) = pi4; el32.SetIndex (mattyp); el33.PNum(1) = pi3; el33.PNum(2) = pi1; el33.PNum(3) = pi5; el33.PNum(4) = pi4; el33.SetIndex (mattyp); bad2 = CalcBad (mesh.Points(), el31, 0) + CalcBad (mesh.Points(), el32, 0) + CalcBad (mesh.Points(), el33, 0); el31.flags.illegal_valid = 0; el32.flags.illegal_valid = 0; el33.flags.illegal_valid = 0; if (!mesh.LegalTet(el31) || !mesh.LegalTet(el32) || !mesh.LegalTet(el33)) bad2 += 1e4; bool do_swap = (bad2 < bad1); if ( ((bad2 < 1e6) || (bad2 < 10 * bad1)) && mesh.BoundaryEdge (pi4, pi5)) do_swap = 1; if (do_swap) { // cout << "do swap, eli1 = " << eli1 << "; eli2 = " << eli2 << endl; // (*mycout) << "2->3 " << flush; cnt++; el31.flags.illegal_valid = 0; el32.flags.illegal_valid = 0; el33.flags.illegal_valid = 0; mesh[eli1] = el31; mesh[eli2] = el32; ElementIndex neli = mesh.AddVolumeElement (el33); /* if (!LegalTet(el31) || !LegalTet(el32) || !LegalTet(el33)) { cout << "Swap to illegal tets !!!" << endl; } */ // cout << "neli = " << neli << endl; for (int l = 0; l < 4; l++) { elementsonnode.Add (el31[l], eli1); elementsonnode.Add (el32[l], eli2); elementsonnode.Add (el33[l], neli); } break; } } } } } } PrintMessage (5, cnt, " swaps performed"); /* CalcSurfacesOfNode (); for (i = 1; i <= GetNE(); i++) if (volelements.Get(i).PNum(1)) if (!LegalTet (volelements.Get(i))) { cout << "detected illegal tet, 2" << endl; (*testout) << "detected illegal tet2: " << i << endl; } */ bad1 = CalcTotalBad (mesh.Points(), mesh.VolumeElements()); (*testout) << "Total badness = " << bad1 << endl; (*testout) << "swapimprove2 done" << "\n"; // (*mycout) << "Vol = " << CalcVolume (points, volelements) << "\n"; } /* void Mesh :: SwapImprove2 (OPTIMIZEGOAL goal) { int i, j; int eli1, eli2; int mattyp; Element el31(4), el32(4), el33(4); double bad1, bad2; INDEX_3_HASHTABLE elsonface (GetNE()); (*mycout) << "SwapImprove2 " << endl; (*testout) << "\n" << "Start SwapImprove2" << "\n"; // Calculate total badness if (goal == OPT_QUALITY) { double bad1 = CalcTotalBad (points, volelements); (*testout) << "Total badness = " << bad1 << endl; } // find elements on node Element2d face; for (i = 1; i <= GetNE(); i++) if ( (i > eltyps.Size()) || (eltyps.Get(i) != FIXEDELEMENT) ) { const Element & el = VolumeElement(i); if (!el.PNum(1)) continue; for (j = 1; j <= 4; j++) { el.GetFace (j, face); INDEX_3 i3 (face.PNum(1), face.PNum(2), face.PNum(3)); i3.Sort(); int bnr, posnr; if (!elsonface.PositionCreate (i3, bnr, posnr)) { INDEX_2 i2; elsonface.GetData (bnr, posnr, i3, i2); i2.I2() = i; elsonface.SetData (bnr, posnr, i3, i2); } else { INDEX_2 i2 (i, 0); elsonface.SetData (bnr, posnr, i3, i2); } // if (elsonface.Used (i3)) // { // INDEX_2 i2 = elsonface.Get(i3); // i2.I2() = i; // elsonface.Set (i3, i2); // } // else // { // INDEX_2 i2 (i, 0); // elsonface.Set (i3, i2); // } } } BitArray original(GetNE()); original.Set(); for (i = 1; i <= GetNSE(); i++) { const Element2d & sface = SurfaceElement(i); INDEX_3 i3 (sface.PNum(1), sface.PNum(2), sface.PNum(3)); i3.Sort(); INDEX_2 i2(0,0); elsonface.Set (i3, i2); } for (i = 1; i <= elsonface.GetNBags(); i++) for (j = 1; j <= elsonface.GetBagSize(i); j++) { INDEX_3 i3; INDEX_2 i2; elsonface.GetData (i, j, i3, i2); int eli1 = i2.I1(); int eli2 = i2.I2(); if (eli1 && eli2 && original.Test(eli1) && original.Test(eli2) ) { Element & elem = volelements.Elem(eli1); Element & elem2 = volelements.Elem(eli2); int pi1 = i3.I1(); int pi2 = i3.I2(); int pi3 = i3.I3(); int pi4 = elem.PNum(1) + elem.PNum(2) + elem.PNum(3) + elem.PNum(4) - pi1 - pi2 - pi3; int pi5 = elem2.PNum(1) + elem2.PNum(2) + elem2.PNum(3) + elem2.PNum(4) - pi1 - pi2 - pi3; el31.PNum(1) = pi1; el31.PNum(2) = pi2; el31.PNum(3) = pi3; el31.PNum(4) = pi4; el31.SetIndex (mattyp); if (WrongOrientation (points, el31)) swap (pi1, pi2); bad1 = CalcBad (points, elem, 0) + CalcBad (points, elem2, 0); // if (!LegalTet(elem) || !LegalTet(elem2)) // bad1 += 1e4; el31.PNum(1) = pi1; el31.PNum(2) = pi2; el31.PNum(3) = pi5; el31.PNum(4) = pi4; el31.SetIndex (mattyp); el32.PNum(1) = pi2; el32.PNum(2) = pi3; el32.PNum(3) = pi5; el32.PNum(4) = pi4; el32.SetIndex (mattyp); el33.PNum(1) = pi3; el33.PNum(2) = pi1; el33.PNum(3) = pi5; el33.PNum(4) = pi4; el33.SetIndex (mattyp); bad2 = CalcBad (points, el31, 0) + CalcBad (points, el32, 0) + CalcBad (points, el33, 0); // if (!LegalTet(el31) || !LegalTet(el32) || // !LegalTet(el33)) // bad2 += 1e4; int swap = (bad2 < bad1); INDEX_2 hi2b(pi4, pi5); hi2b.Sort(); if ( ((bad2 < 1e6) || (bad2 < 10 * bad1)) && boundaryedges->Used (hi2b) ) swap = 1; if (swap) { (*mycout) << "2->3 " << flush; volelements.Elem(eli1) = el31; volelements.Elem(eli2) = el32; volelements.Append (el33); original.Clear (eli1); original.Clear (eli2); } } } (*mycout) << endl; if (goal == OPT_QUALITY) { bad1 = CalcTotalBad (points, volelements); (*testout) << "Total badness = " << bad1 << endl; } // FindOpenElements (); (*testout) << "swapimprove2 done" << "\n"; } */ } netgen-6.2.1804/libsrc/meshing/specials.cpp0000644000175000017500000000744313272137567017234 0ustar kurtkurt#include #include "meshing.hpp" namespace netgen { // A special function for Hermann Landes, Erlangen void CutOffAndCombine (Mesh & mesh, const Mesh & othermesh) { int i, j; int nse = othermesh.GetNSE(); int onp = othermesh.GetNP(); int ne = mesh.GetNE(); PrintMessage (1, "other mesh has ", othermesh.GetNP(), " points, ", othermesh.GetNSE(), " surface elements."); Array otherbounds(nse); Box3d otherbox; double maxh = 0; for (i = 1; i <= nse; i++) { const Element2d & sel = othermesh.SurfaceElement(i); sel.GetBox(othermesh.Points(), otherbounds.Elem(i)); double loch = othermesh.GetH (othermesh.Point (sel.PNum(1))); otherbounds.Elem(i).Increase(loch); if (loch > maxh) maxh = loch; } otherbox.SetPoint (othermesh.Point(1)); for (i = 1; i <= othermesh.GetNP(); i++) otherbox.AddPoint (othermesh.Point(i)); otherbox.Increase (maxh); for (i = 1; i <= ne; i++) { Box3d box; int remove = 0; const Element & el = mesh.VolumeElement(i); el.GetBox(mesh.Points(), box); if (i % 10000 == 0) cout << "+" << flush; if (box.Intersect(otherbox)) { for (j = 1; j <= nse && !remove; j++) if (box.Intersect(otherbounds.Get(j))) remove = 1; } if (remove) mesh.VolumeElement(i).Delete(); } cout << endl; BitArray connected(mesh.GetNP()); connected.Clear(); for (i = 1; i <= mesh.GetNSE(); i++) { const Element2d & el = mesh.SurfaceElement(i); for (j = 1; j <= 3; j++) connected.Set(el.PNum(j)); } bool changed; do { changed = 0; for (i = 1; i <= mesh.GetNE(); i++) { const Element & el = mesh.VolumeElement(i); int has = 0, hasnot = 0; if (el[0]) { for (j = 0; j < 4; j++) { if (connected.Test(el[j])) has = 1; else hasnot = 1; } if (has && hasnot) { changed = 1; for (j = 0; j < 4; j++) connected.Set (el[j]); } } } cout << "." << flush; } while (changed); cout << endl; for (i = 1; i <= mesh.GetNE(); i++) { const Element & el = mesh.VolumeElement(i); int hasnot = 0; if (el[0]) { for (j = 0; j < 4; j++) { if (!connected.Test(el[j])) hasnot = 1; } if (hasnot) mesh.VolumeElement(i).Delete(); } } mesh.Compress(); mesh.FindOpenElements(); BitArray locked(mesh.GetNP()); locked.Set(); for (i = 1; i <= mesh.GetNOpenElements(); i++) for (j = 1; j <= 3; j++) locked.Clear (mesh.OpenElement(i).PNum(j)); for (PointIndex i (1); i <= locked.Size(); i++) if (locked.Test(i)) { mesh.AddLockedPoint (i); } Array pmat(onp); for (i = 1; i <= onp; i++) pmat.Elem(i) = mesh.AddPoint (othermesh.Point(i)); int fnum = mesh.AddFaceDescriptor (FaceDescriptor(0,0,1,0)); for (i = 1; i <= othermesh.GetNSE(); i++) { Element2d tri = othermesh.SurfaceElement(i); for (j = 1; j <= 3; j++) tri.PNum(j) = pmat.Get(tri.PNum(j)); tri.SetIndex(fnum); mesh.AddSurfaceElement (tri); } for (i = 1; i <= onp; i++) mesh.AddLockedPoint (pmat.Elem(i)); mesh.CalcSurfacesOfNode(); mesh.CalcLocalH(0.3); } void HelmholtzMesh (Mesh & mesh) { int i; double ri, ra, rinf; cout << "ri = "; cin >> ri; cout << "ra = "; cin >> ra; cout << "rinf = "; cin >> rinf; double det = ri * ra * rinf - ri * ri * rinf; double a = (ri - rinf) / det; double b = (ri*ri - ra * rinf) / det; for (i = 1; i <= mesh.GetNP(); i++) { Point<3> & p = mesh.Point(i); double rold = sqrt (sqr(p(0)) + sqr(p(1)) + sqr(p(2))); if (rold < ri) continue; double rnew = 1 / (a * rold - b); double fac = rnew / rold; p(0) *= fac; p(1) *= fac; p(2) *= fac; } } } netgen-6.2.1804/libsrc/meshing/hpref_tet.hpp0000644000175000017500000014164513272137567017421 0ustar kurtkurt // HP_TET int reftet_splitedges[][3] = { { 0, 0, 0 } }; HPREF_ELEMENT_TYPE reftet_newelstypes[] = { HP_TET, HP_NONE, }; int reftet_newels[][8] = { { 1, 2, 3, 4 }, }; HPRef_Struct reftet = { HP_TET, reftet_splitedges, 0, 0, reftet_newelstypes, reftet_newels }; /* *********** Tet - Refinement - 0 edges *************** */ // HP_TET_0E_1V int reftet_0e_1v_splitedges[][3] = { { 1, 2, 5 }, { 1, 3, 6 }, { 1, 4, 7 }, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE reftet_0e_1v_newelstypes[] = { HP_TET_0E_1V, HP_PRISM, HP_NONE, }; int reftet_0e_1v_newels[][8] = { { 1, 5, 6, 7 }, { 5, 6, 7, 2, 3, 4 } }; HPRef_Struct reftet_0e_1v = { HP_TET, reftet_0e_1v_splitedges, 0, 0, reftet_0e_1v_newelstypes, reftet_0e_1v_newels }; // HP_TET_0E_2V int reftet_0e_2v_splitedges[][3] = { { 1, 2, 5 }, { 1, 3, 6 }, { 1, 4, 7 }, { 2, 1, 8 }, { 2, 3, 9 }, { 2, 4, 10 }, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE reftet_0e_2v_newelstypes[] = { HP_TET_0E_1V, HP_TET_0E_1V, HP_PRISM, HP_PRISM, HP_NONE, }; int reftet_0e_2v_newels[][8] = { { 1, 5, 6, 7 }, { 2, 10, 9, 8 }, { 5, 6, 7, 8, 9, 10 }, { 4, 10, 7, 3, 9, 6 }, }; HPRef_Struct reftet_0e_2v = { HP_TET, reftet_0e_2v_splitedges, 0, 0, reftet_0e_2v_newelstypes, reftet_0e_2v_newels }; // HP_TET_0E_3V int reftet_0e_3v_splitedges[][3] = { { 1, 2, 5 }, { 1, 3, 6 }, { 1, 4, 7 }, { 2, 1, 8 }, { 2, 3, 9 }, { 2, 4, 10 }, { 3, 1, 11 }, { 3, 2, 12 }, { 3, 4, 13 }, { 0, 0, 0 } }; int reftet_0e_3v_splitfaces[][4] = { { 1, 2, 3, 14 }, { 2, 3, 1, 15 }, { 3, 1, 2, 16 }, { 0, 0, 0, 0 }, }; HPREF_ELEMENT_TYPE reftet_0e_3v_newelstypes[] = { HP_PYRAMID_0E_1V, HP_PYRAMID_0E_1V, HP_PYRAMID_0E_1V, HP_PRISM, HP_PRISM, HP_PRISM, HP_PRISM, HP_TET, HP_NONE, }; int reftet_0e_3v_newels[][8] = { { 1, 5, 14, 6, 7 }, { 2, 9, 15, 8, 10 }, { 3, 11, 16, 12, 13 }, { 5, 14, 7, 8, 15, 10 }, { 9, 15, 10, 12, 16, 13 }, { 6, 7, 14, 11, 13, 16 }, { 14, 15, 16, 7, 10, 13 }, { 7, 10, 13, 4 } }; HPRef_Struct reftet_0e_3v = { HP_TET, reftet_0e_3v_splitedges, reftet_0e_3v_splitfaces, 0, reftet_0e_3v_newelstypes, reftet_0e_3v_newels }; // HP_TET_0E_4V int reftet_0e_4v_splitedges[][3] = { { 1, 2, 5 }, { 1, 3, 6 }, { 1, 4, 7 }, { 2, 1, 8 }, { 2, 3, 9 }, { 2, 4, 10 }, { 3, 1, 11 }, { 3, 2, 12 }, { 3, 4, 13 }, { 4, 1, 14 }, { 4, 2, 15 }, { 4, 3, 16 }, { 0, 0, 0 } }; int reftet_0e_4v_splitfaces[][4] = { { 1, 2, 3, 17 }, { 1, 2, 4, 18 }, { 1, 3, 4, 19 }, { 2, 1, 3, 20 }, { 2, 1, 4, 21 }, { 2, 3, 4, 22 }, { 3, 1, 2, 23 }, { 3, 1, 4, 24 }, { 3, 2, 4, 25 }, { 4, 1, 2, 26 }, { 4, 1, 3, 27 }, { 4, 2, 3, 28 }, { 0, 0, 0, 0 }, }; int reftet_0e_4v_splitelements[][5] = { { 1, 2, 3, 4, 29 }, { 2, 3, 4, 1, 30 }, { 3, 4, 1, 2, 31 }, { 4, 1, 2, 3, 32 }, { 0 }, }; HPREF_ELEMENT_TYPE reftet_0e_4v_newelstypes[] = { HP_HEX_0E_1V, HP_HEX_0E_1V, HP_HEX_0E_1V, HP_HEX_0E_1V, HP_PRISM, HP_PRISM, HP_PRISM, HP_PRISM, HP_PRISM, HP_PRISM, HP_PRISM, HP_PRISM, HP_PRISM, HP_PRISM, HP_PRISM, HP_PRISM, HP_PRISM, HP_PRISM, HP_PRISM, HP_PRISM, HP_TET, HP_NONE, }; int reftet_0e_4v_newels[][8] = { { 1, 5, 17, 6, 7, 18, 29, 19 }, { 2, 9, 20, 8, 10, 22, 30, 21 }, { 3, 11, 23, 12, 13, 24, 31, 25 }, { 4, 15, 26, 14, 16, 28, 32, 27 }, { 5, 17, 18, 8, 20, 21 }, { 18, 17, 29, 21, 20, 30 }, { 6, 19, 17, 11, 24, 23 }, { 17, 19, 29, 23, 24, 31 }, { 7, 18, 19, 14, 26, 27 }, { 19, 18, 29, 27, 26, 32 }, { 9, 20, 22, 12, 23, 25 }, { 22, 20, 30, 25, 23, 31 }, { 10, 22, 21, 15, 28, 26 }, { 21, 22, 30, 26, 28, 32 }, { 13, 24, 25, 16, 27, 28 }, { 25, 24, 31, 28, 27, 32 }, { 17, 20, 23, 29, 30, 31 }, { 18, 26, 21, 29, 32, 30 }, { 19, 24, 27, 29, 31, 32 }, { 22, 28, 25, 30, 32, 31 }, { 29, 30, 31, 32 }, }; HPRef_Struct reftet_0e_4v = { HP_TET, reftet_0e_4v_splitedges, reftet_0e_4v_splitfaces, reftet_0e_4v_splitelements, reftet_0e_4v_newelstypes, reftet_0e_4v_newels }; /* *********** Tet - Refinement - 1 edge *************** */ // HP_TET_1E_0V int reftet_1e_0v_splitedges[][3] = { { 1, 3, 5 }, { 1, 4, 6 }, { 2, 3, 7 }, { 2, 4, 8 }, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE reftet_1e_0v_newelstypes[] = { HP_PRISM_SINGEDGE, HP_PRISM, HP_NONE, }; int reftet_1e_0v_newels[][8] = { { 1, 5, 6, 2, 7, 8 }, { 7, 3, 5, 8, 4, 6 } }; HPRef_Struct reftet_1e_0v = { HP_TET, reftet_1e_0v_splitedges, 0, 0, reftet_1e_0v_newelstypes, reftet_1e_0v_newels }; // HP_TET_1E_1VA int reftet_1e_1va_splitedges[][3] = { { 1, 3, 5 }, { 1, 4, 6 }, { 2, 3, 7 }, { 2, 4, 8 }, { 1, 2, 9 }, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE reftet_1e_1va_newelstypes[] = { HP_TET_1E_1VA, HP_PRISM_SINGEDGE, HP_PRISM, HP_NONE, }; int reftet_1e_1va_newels[][8] = { { 1, 9, 5, 6 }, { 9, 5, 6, 2, 7, 8 }, { 7, 3, 5, 8, 4, 6 } }; HPRef_Struct reftet_1e_1va = { HP_TET, reftet_1e_1va_splitedges, 0, 0, reftet_1e_1va_newelstypes, reftet_1e_1va_newels }; // HP_TET_1E_1VB int reftet_1e_1vb_splitedges[][3] = { { 1, 3, 5 }, { 1, 4, 6 }, { 2, 3, 7 }, { 2, 4, 8 }, { 4, 1, 9 }, { 4, 2, 10 }, { 4, 3, 11 }, { 0, 0, 0 } }; int reftet_1e_1vb_splitelements[][5] = { { 4, 1, 2, 3, 12 }, { 0 } }; HPREF_ELEMENT_TYPE reftet_1e_1vb_newelstypes[] = { HP_PRISM_SINGEDGE, HP_TET_0E_1V, HP_PYRAMID, HP_TET, HP_PYRAMID, HP_TET, HP_PYRAMID, HP_TET, HP_PYRAMID, HP_TET, HP_NONE, }; int reftet_1e_1vb_newels[][8] = { { 1, 5, 6, 2, 7, 8 }, { 4, 11, 10, 9 }, { 7, 8, 10, 11, 12 }, { 3, 7, 11, 12 }, { 5, 11, 9, 6, 12 }, { 5, 3, 11, 12 }, { 6, 9, 10, 8, 12 }, { 5, 7, 3, 12 }, { 5, 6, 8, 7, 12 }, { 9, 11, 10, 12 } }; HPRef_Struct reftet_1e_1vb = { HP_TET, reftet_1e_1vb_splitedges, 0, reftet_1e_1vb_splitelements, reftet_1e_1vb_newelstypes, reftet_1e_1vb_newels }; // HP_TET_1E_2VA int reftet_1e_2va_splitedges[][3] = { { 1, 2, 5 }, { 1, 3, 6 }, { 1, 4, 7 }, { 2, 1, 8 }, { 2, 3, 9 }, { 2, 4, 10 }, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE reftet_1e_2va_newelstypes[] = { HP_TET_1E_1VA, HP_TET_1E_1VA, HP_PRISM_SINGEDGE, HP_PRISM, HP_NONE, }; int reftet_1e_2va_newels[][8] = { { 1, 5, 6, 7 }, { 2, 8, 10, 9 }, { 5, 6, 7, 8, 9, 10 }, { 4, 10, 7, 3, 9, 6 }, }; HPRef_Struct reftet_1e_2va = { HP_TET, reftet_1e_2va_splitedges, 0, 0, reftet_1e_2va_newelstypes, reftet_1e_2va_newels }; // HP_TET_1E_2VB int reftet_1e_2vb_splitedges[][3] = { { 1, 2, 5 }, { 1, 3, 6 }, { 1, 4, 7 }, { 2, 3, 8 }, { 2, 4, 9 }, { 3, 1, 10 }, { 3, 2, 11 }, { 3, 4, 12 }, { 0, 0, 0 } }; int reftet_1e_2vb_splitelements[][5] = { { 3, 4, 1, 2, 13 }, { 0 } }; HPREF_ELEMENT_TYPE reftet_1e_2vb_newelstypes[] = { HP_TET_1E_1VA, HP_PRISM_SINGEDGE, HP_TET_0E_1V, HP_PYRAMID, HP_TET, HP_PYRAMID, HP_TET, HP_PYRAMID, HP_TET, HP_PYRAMID, HP_TET, HP_NONE, }; int reftet_1e_2vb_newels[][8] = { { 1, 5, 6, 7 }, { 5, 6, 7, 2, 8, 9 }, { 3, 10, 11, 12 }, { 8, 9, 12, 11, 13 }, { 4, 12, 9, 13 }, { 6, 10, 12, 7, 13 }, { 4, 7, 12, 13 }, { 6, 8, 11, 10, 13 }, { 4, 9, 7, 13 }, { 6, 7, 9, 8, 13 }, { 10, 11, 12, 13 }, }; HPRef_Struct reftet_1e_2vb = { HP_TET, reftet_1e_2vb_splitedges, 0, reftet_1e_2vb_splitelements, reftet_1e_2vb_newelstypes, reftet_1e_2vb_newels }; // HP_TET_1E_2VC int reftet_1e_2vc_splitedges[][3] = { { 1, 2, 5 }, { 1, 3, 6 }, { 1, 4, 7 }, { 2, 3, 8 }, { 2, 4, 9 }, { 4, 1, 10 }, { 4, 2, 11 }, { 4, 3, 12 }, { 0, 0, 0 } }; int reftet_1e_2vc_splitelements[][5] = { { 4, 1, 2, 3, 13 }, { 0 } }; HPREF_ELEMENT_TYPE reftet_1e_2vc_newelstypes[] = { HP_TET_1E_1VA, HP_PRISM_SINGEDGE, HP_TET_0E_1V, HP_PYRAMID, HP_TET, HP_PYRAMID, HP_TET, HP_PYRAMID, HP_TET, HP_PYRAMID, HP_TET, HP_NONE, }; int reftet_1e_2vc_newels[][8] = { { 1, 5, 6, 7 }, { 5, 6, 7, 2, 8, 9 }, { 4, 11, 10, 12 }, { 8, 9, 11, 12, 13 }, { 3, 8, 12, 13 }, { 7, 6, 12, 10, 13 }, { 3, 12, 6, 13 }, { 9, 7, 10, 11, 13 }, { 3, 6, 8, 13 }, { 6, 7, 9, 8, 13 }, { 10, 12, 11, 13 } }; HPRef_Struct reftet_1e_2vc = { HP_TET, reftet_1e_2vc_splitedges, 0, reftet_1e_2vc_splitelements, reftet_1e_2vc_newelstypes, reftet_1e_2vc_newels }; /* // HP_TET_1E_2VD int reftet_1e_2vd_splitedges[][3] = { { 1, 3, 5 }, { 1, 4, 6 }, { 2, 3, 7 }, { 2, 4, 8 }, { 3, 1, 9 }, { 3, 2, 10 }, { 3, 4, 11 }, { 4, 1, 12 }, { 4, 2, 13 }, { 4, 3, 14 }, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE reftet_1e_2vd_newelstypes[] = { HP_PRISM_SINGEDGE, HP_TET_0E_1V, HP_TET_0E_1V, HP_PRISM, HP_HEX, HP_NONE, }; int reftet_1e_2vd_newels[][8] = { { 1, 5, 6, 2, 7, 8 }, { 4, 13, 12, 14 }, { 3, 10, 11, 9 }, { 14, 13, 12, 11, 10, 9 }, { 6, 12, 13, 8, 5, 9, 10, 7 }, }; HPRef_Struct reftet_1e_2vd = { HP_TET, reftet_1e_2vd_splitedges, 0, 0, reftet_1e_2vd_newelstypes, reftet_1e_2vd_newels }; */ // HP_TET_1E_2VD, // 1 v on edge int reftet_1e_2vd_splitedges[][3] = { // { 1, 2, 5 }, { 1, 3, 6 }, { 1, 4, 7 }, // { 2, 1, 8 }, { 2, 3, 9 }, { 2, 4, 10 }, { 3, 1, 11 }, { 3, 2, 12 }, { 3, 4, 13 }, { 4, 1, 14 }, { 4, 2, 15 }, { 4, 3, 16 }, { 0, 0, 0 } }; int reftet_1e_2vd_splitfaces[][4] = { { 1, 3, 4, 19 }, { 2, 3, 4, 22 }, { 3, 1, 4, 24 }, { 3, 2, 4, 25 }, { 4, 1, 3, 27 }, { 4, 2, 3, 28 }, { 0, 0, 0, 0 } }; HPREF_ELEMENT_TYPE reftet_1e_2vd_newelstypes[] = { HP_PRISM_SINGEDGE, HP_TET_0E_1V, HP_TET_0E_1V, HP_PRISM, HP_HEX, HP_PYRAMID, HP_HEX, HP_PYRAMID, HP_PRISM, HP_PRISM, HP_NONE, }; int reftet_1e_2vd_newels[][8] = { { 1, 6, 7, 2, 9, 10 }, { 3, 11, 12, 13 }, { 4, 16, 15, 14 }, { 7, 6, 19, 10, 9, 22 }, { 7, 19, 27, 14, 10, 22, 28, 15 }, { 14, 15, 28, 27, 16 }, { 9, 6, 19, 22, 12, 11, 24, 25 }, { 12, 11, 24, 25, 13 }, { 19, 24, 27, 22, 25, 28 }, { 16, 28, 27, 13, 25, 24 } }; HPRef_Struct reftet_1e_2vd = { HP_TET, reftet_1e_2vd_splitedges, reftet_1e_2vd_splitfaces, 0, reftet_1e_2vd_newelstypes, reftet_1e_2vd_newels }; // HP_TET_1E_3VA int reftet_1e_3va_splitedges[][3] = { { 1, 2, 5 }, { 1, 3, 6 }, { 1, 4, 7 }, { 2, 1, 8 }, { 2, 3, 9 }, { 2, 4, 10 }, { 3, 1, 11 }, { 3, 2, 12 }, { 3, 4, 13 }, { 0, 0, 0 } }; int reftet_1e_3va_splitelements[][5] = { { 1, 2, 3, 4, 14 }, { 0 } }; HPREF_ELEMENT_TYPE reftet_1e_3va_newelstypes[] = { HP_PRISM_SINGEDGE, HP_TET_1E_1VA, HP_TET_1E_1VA, HP_TET_0E_1V, HP_PYRAMID, HP_TET, HP_PYRAMID, HP_TET, HP_PYRAMID, HP_TET, HP_PYRAMID, HP_TET, HP_NONE, }; int reftet_1e_3va_newels[][8] = { { 5, 6, 7, 8, 9, 10 }, { 1, 5, 6, 7 }, { 2, 8, 10, 9 }, { 3, 11, 12, 13 }, { 6, 7, 10, 9, 14 }, { 4, 10, 7, 14 }, { 9, 10, 13, 12, 14 }, { 4, 13, 10, 14 }, { 6, 11, 13, 7, 14 }, { 4, 7, 13, 14 }, { 6, 11, 12, 9, 14 }, { 11, 13, 12, 14 }, }; HPRef_Struct reftet_1e_3va = { HP_TET, reftet_1e_3va_splitedges, 0, reftet_1e_3va_splitelements, reftet_1e_3va_newelstypes, reftet_1e_3va_newels }; // HP_TET_1E_3VB, // 1 v on edge int reftet_1e_3vb_splitedges[][3] = { { 1, 2, 5 }, { 1, 3, 6 }, { 1, 4, 7 }, // { 2, 1, 8 }, { 2, 3, 9 }, { 2, 4, 10 }, { 3, 1, 11 }, { 3, 2, 12 }, { 3, 4, 13 }, { 4, 1, 14 }, { 4, 2, 15 }, { 4, 3, 16 }, { 0, 0, 0 } }; int reftet_1e_3vb_splitfaces[][4] = { { 1, 3, 4, 19 }, { 2, 3, 4, 22 }, { 3, 1, 4, 24 }, { 3, 2, 4, 25 }, { 4, 1, 3, 27 }, { 4, 2, 3, 28 }, { 0, 0, 0, 0 } }; HPREF_ELEMENT_TYPE reftet_1e_3vb_newelstypes[] = { HP_TET_1E_1VA, HP_PRISM_SINGEDGE, HP_TET_0E_1V, HP_TET_0E_1V, HP_PRISM, HP_HEX, HP_PYRAMID, HP_HEX, HP_PYRAMID, HP_PRISM, HP_PRISM, HP_NONE, }; int reftet_1e_3vb_newels[][8] = { { 1, 5, 6, 7 }, { 5, 6, 7, 2, 9, 10 }, { 3, 11, 12, 13 }, { 4, 16, 15, 14 }, { 7, 6, 19, 10, 9, 22 }, { 7, 19, 27, 14, 10, 22, 28, 15 }, { 14, 15, 28, 27, 16 }, { 9, 6, 19, 22, 12, 11, 24, 25 }, { 12, 11, 24, 25, 13 }, { 19, 24, 27, 22, 25, 28 }, { 16, 28, 27, 13, 25, 24 } }; HPRef_Struct reftet_1e_3vb = { HP_TET, reftet_1e_3vb_splitedges, reftet_1e_3vb_splitfaces, 0, reftet_1e_3vb_newelstypes, reftet_1e_3vb_newels }; /* // HP_TET_1E_4V int reftet_1e_4v_splitedges[][3] = { { 1, 2, 5 }, { 1, 3, 6 }, { 1, 4, 7 }, { 2, 1, 8 }, { 2, 3, 9 }, { 2, 4, 10 }, { 3, 1, 11 }, { 3, 2, 12 }, { 3, 4, 13 }, { 4, 1, 14 }, { 4, 2, 15 }, { 4, 3, 16 }, { 0, 0, 0 } }; int reftet_1e_4v_splitfaces[][4] = { { 1, 2, 3, 17 }, { 1, 2, 4, 18 }, { 1, 3, 4, 19 }, { 2, 1, 3, 20 }, { 2, 1, 4, 21 }, { 2, 3, 4, 22 }, { 3, 1, 2, 23 }, { 3, 1, 4, 24 }, { 3, 2, 4, 25 }, { 4, 1, 2, 26 }, { 4, 1, 3, 27 }, { 4, 2, 3, 28 }, { 0, 0, 0, 0 }, }; int reftet_1e_4v_splitelements[][5] = { { 1, 2, 3, 4, 29 }, { 2, 3, 4, 1, 30 }, { 3, 4, 1, 2, 31 }, { 4, 1, 2, 3, 32 }, { 0 }, }; HPREF_ELEMENT_TYPE reftet_1e_4v_newelstypes[] = { HP_HEX_1E_1V, HP_HEX_1E_1V, HP_HEX_0E_1V, HP_HEX_0E_1V, HP_PRISM_SINGEDGE, HP_PRISM, HP_PRISM, HP_PRISM, HP_PRISM, HP_PRISM, HP_PRISM, HP_PRISM, HP_PRISM, HP_PRISM, HP_PRISM, HP_PRISM, HP_PRISM, HP_PRISM, HP_PRISM, HP_PRISM, HP_TET, HP_NONE, }; int reftet_1e_4v_newels[][8] = { { 1, 5, 17, 6, 7, 18, 29, 19 }, // { 2, 9, 20, 8, 10, 22, 30, 21 }, { 2, 8, 21, 10, 9, 20, 30, 22 }, { 3, 11, 23, 12, 13, 24, 31, 25 }, { 4, 15, 26, 14, 16, 28, 32, 27 }, { 5, 17, 18, 8, 20, 21 }, { 18, 17, 29, 21, 20, 30 }, { 6, 19, 17, 11, 24, 23 }, { 17, 19, 29, 23, 24, 31 }, { 7, 18, 19, 14, 26, 27 }, { 19, 18, 29, 27, 26, 32 }, { 9, 20, 22, 12, 23, 25 }, { 22, 20, 30, 25, 23, 31 }, { 10, 22, 21, 15, 28, 26 }, { 21, 22, 30, 26, 28, 32 }, { 13, 24, 25, 16, 27, 28 }, { 25, 24, 31, 28, 27, 32 }, { 17, 20, 23, 29, 30, 31 }, { 18, 26, 21, 29, 32, 30 }, { 19, 24, 27, 29, 31, 32 }, { 22, 28, 25, 30, 32, 31 }, { 29, 30, 31, 32 }, }; HPRef_Struct reftet_1e_4v = { HP_TET, reftet_1e_4v_splitedges, reftet_1e_4v_splitfaces, reftet_1e_4v_splitelements, reftet_1e_4v_newelstypes, reftet_1e_4v_newels }; */ // HP_TET_1E_4V int reftet_1e_4v_splitedges[][3] = { { 1, 2, 5 }, { 1, 3, 6 }, { 1, 4, 7 }, { 2, 1, 8 }, { 2, 3, 9 }, { 2, 4, 10 }, { 3, 1, 11 }, { 3, 2, 12 }, { 3, 4, 13 }, { 4, 1, 14 }, { 4, 2, 15 }, { 4, 3, 16 }, { 0, 0, 0 } }; int reftet_1e_4v_splitfaces[][4] = { { 1, 3, 4, 17 }, { 2, 3, 4, 18 }, { 3, 1, 4, 19 }, { 3, 2, 4, 20 }, { 4, 1, 3, 21 }, { 4, 2, 3, 22 }, { 0, 0, 0, 0 }, }; HPREF_ELEMENT_TYPE reftet_1e_4v_newelstypes[] = { HP_TET_1E_1VA, HP_TET_1E_1VA, // HP_TET_1E_1VA, // HP_TET_1E_1VA, HP_PRISM_SINGEDGE, HP_PRISM, HP_HEX, HP_HEX, HP_PRISM, HP_PRISM, HP_PYRAMID, HP_TET_0E_1V, HP_PYRAMID, HP_TET_0E_1V, HP_NONE, }; int reftet_1e_4v_newels[][8] = { { 1, 5, 6, 7 }, { 2, 8, 10, 9 }, { 5, 6, 7, 8, 9, 10 }, { 7, 6, 17, 10, 9, 18 }, { 7, 10, 18, 17, 14, 15, 22, 21 }, { 9, 6, 17, 18, 12, 11, 19, 20 }, { 17, 19, 21, 18, 20, 22 }, { 16, 22, 21, 13, 20, 19 }, { 14, 15, 22, 21, 16 }, { 4, 14, 16, 15 }, { 12, 11, 19, 20, 13 }, { 3, 11, 12, 13 }, { 1, 5, 17, 6, 7, 18, 29, 19 }, // { 2, 9, 20, 8, 10, 22, 30, 21 }, { 2, 8, 21, 10, 9, 20, 30, 22 }, { 3, 11, 23, 12, 13, 24, 31, 25 }, { 4, 15, 26, 14, 16, 28, 32, 27 }, { 5, 17, 18, 8, 20, 21 }, { 18, 17, 29, 21, 20, 30 }, { 6, 19, 17, 11, 24, 23 }, { 17, 19, 29, 23, 24, 31 }, { 7, 18, 19, 14, 26, 27 }, { 19, 18, 29, 27, 26, 32 }, { 9, 20, 22, 12, 23, 25 }, { 22, 20, 30, 25, 23, 31 }, { 10, 22, 21, 15, 28, 26 }, { 21, 22, 30, 26, 28, 32 }, { 13, 24, 25, 16, 27, 28 }, { 25, 24, 31, 28, 27, 32 }, { 17, 20, 23, 29, 30, 31 }, { 18, 26, 21, 29, 32, 30 }, { 19, 24, 27, 29, 31, 32 }, { 22, 28, 25, 30, 32, 31 }, { 29, 30, 31, 32 }, }; HPRef_Struct reftet_1e_4v = { HP_TET, reftet_1e_4v_splitedges, reftet_1e_4v_splitfaces, 0, reftet_1e_4v_newelstypes, reftet_1e_4v_newels }; // HP_TET_2EA_0V, // 2 edges connected int reftet_2ea_0v_splitedges[][3] = { { 1, 2, 5 }, { 1, 3, 6 }, { 1, 4, 7 }, { 2, 3, 9 }, { 2, 4, 10 }, { 3, 2, 12 }, { 3, 4, 13 }, { 0, 0, 0 } }; int reftet_2ea_0v_splitfaces[][4] = { { 1, 2, 3, 17 }, { 0, 0, 0, 0 } }; HPREF_ELEMENT_TYPE reftet_2ea_0v_newelstypes[] = { HP_PYRAMID_EDGES, HP_PRISM_SINGEDGE, HP_PRISM_SINGEDGE, HP_PRISM, HP_TET, HP_NONE, }; int reftet_2ea_0v_newels[][8] = { { 1, 5, 17, 6, 7 }, { 5, 17, 7, 2, 9, 10 }, { 6, 7, 17, 3, 13, 12 }, { 17, 9, 12, 7, 10, 13 }, { 7, 10, 13, 4 }, }; HPRef_Struct reftet_2ea_0v = { HP_TET, reftet_2ea_0v_splitedges, reftet_2ea_0v_splitfaces, 0, reftet_2ea_0v_newelstypes, reftet_2ea_0v_newels }; // HP_TET_2EA_1VA, // 2 edges connected int reftet_2ea_1va_splitedges[][3] = { { 1, 2, 5 }, { 1, 3, 6 }, { 1, 4, 7 }, { 2, 1, 8 }, { 2, 3, 9 }, { 2, 4, 10 }, { 3, 2, 12 }, { 3, 4, 13 }, { 0, 0, 0 } }; int reftet_2ea_1va_splitfaces[][4] = { { 1, 2, 3, 17 }, { 0, 0, 0, 0 } }; HPREF_ELEMENT_TYPE reftet_2ea_1va_newelstypes[] = { HP_PYRAMID_EDGES, HP_PRISM_SINGEDGE, HP_TET_1E_1VA, HP_PRISM_SINGEDGE, HP_PRISM, HP_TET, HP_NONE, }; int reftet_2ea_1va_newels[][8] = { { 1, 5, 17, 6, 7 }, { 5, 17, 7, 8, 9, 10 }, { 2, 8, 10, 9 }, { 6, 7, 17, 3, 13, 12 }, { 17, 9, 12, 7, 10, 13 }, { 7, 10, 13, 4 }, }; HPRef_Struct reftet_2ea_1va = { HP_TET, reftet_2ea_1va_splitedges, reftet_2ea_1va_splitfaces, 0, reftet_2ea_1va_newelstypes, reftet_2ea_1va_newels }; // HP_TET_2EA_1VB, int reftet_2ea_1vb_splitedges[][3] = { { 1, 2, 5 }, { 1, 3, 6 }, { 1, 4, 7 }, { 2, 3, 9 }, { 2, 4, 10 }, { 3, 1, 11 }, { 3, 2, 12 }, { 3, 4, 13 }, { 0, 0, 0 } }; int reftet_2ea_1vb_splitfaces[][4] = { { 1, 2, 3, 17 }, { 0, 0, 0, 0 } }; HPREF_ELEMENT_TYPE reftet_2ea_1vb_newelstypes[] = { HP_PYRAMID_EDGES, HP_TET_1E_1VA, HP_PRISM_SINGEDGE, HP_PRISM_SINGEDGE, HP_PRISM, HP_TET, HP_NONE, }; int reftet_2ea_1vb_newels[][8] = { { 1, 5, 17, 6, 7 }, { 3, 11, 12, 13 }, { 5, 17, 7, 2, 9, 10 }, { 6, 7, 17, 11, 13, 12 }, { 17, 9, 12, 7, 10, 13 }, { 7, 10, 13, 4 }, }; HPRef_Struct reftet_2ea_1vb = { HP_TET, reftet_2ea_1vb_splitedges, reftet_2ea_1vb_splitfaces, 0, reftet_2ea_1vb_newelstypes, reftet_2ea_1vb_newels }; // HP_TET_2EA_1VC, // 2 edges connected int reftet_2ea_1vc_splitedges[][3] = { { 1, 2, 5 }, { 1, 3, 6 }, { 1, 4, 7 }, // { 2, 1, 8 }, { 2, 3, 9 }, { 2, 4, 10 }, { 3, 1, 11 }, { 3, 2, 12 }, { 3, 4, 13 }, { 4, 1, 14 }, { 4, 2, 15 }, { 4, 3, 16 }, { 0, 0, 0 } }; int reftet_2ea_1vc_splitfaces[][4] = { { 1, 2, 3, 17 }, { 2, 3, 4, 18 }, { 3, 4, 2, 19 }, { 4, 2, 3, 20 }, { 0, 0, 0, 0 } }; int reftet_2ea_1vc_splitelements[][5] = { { 1, 2, 3, 4, 21 }, { 0, 0, 0, 0 } }; HPREF_ELEMENT_TYPE reftet_2ea_1vc_newelstypes[] = { HP_PYRAMID_EDGES, // HP_TET_1E_1VA, HP_TET_0E_1V, HP_PRISM_SINGEDGE, HP_PRISM_SINGEDGE, HP_TET, HP_TET, HP_TET, HP_TET, HP_PYRAMID, HP_PYRAMID, HP_PYRAMID, HP_PYRAMID, HP_PYRAMID, HP_TET, HP_PYRAMID, HP_PYRAMID, HP_TET, // HP_PRISM, // HP_PRISM, HP_NONE, }; int reftet_2ea_1vc_newels[][8] = { { 1, 5, 17, 6, 7 }, // { 3, 11, 12, 13 }, { 4, 15, 14, 16 }, { 5, 17, 7, 2, 9, 10 }, { 6, 7, 17, 3, 13, 12 }, { 9, 10, 18, 21 }, { 13, 12, 19, 21 }, { 15, 16, 20, 21 }, { 18, 20, 19, 21 }, { 10, 15, 20, 18, 21 }, { 13, 19, 20, 16, 21 }, { 9, 18, 19, 12, 21 }, { 7, 13, 16, 14, 21 }, { 7, 14, 15, 10, 21 }, { 9, 12, 17, 21 }, { 7, 10, 9, 17, 21 }, { 7, 17, 12, 13, 21 }, { 14, 16, 15, 21 }, // { 17, 9, 12, 7, 10, 13 }, // { 7, 10, 13, 14, 15, 16 }, }; HPRef_Struct reftet_2ea_1vc = { HP_TET, reftet_2ea_1vc_splitedges, reftet_2ea_1vc_splitfaces, reftet_2ea_1vc_splitelements, reftet_2ea_1vc_newelstypes, reftet_2ea_1vc_newels }; // HP_TET_2EA_2VA, int reftet_2ea_2va_splitedges[][3] = { { 1, 2, 5 }, { 1, 3, 6 }, { 1, 4, 7 }, { 2, 1, 8 }, { 2, 3, 9 }, { 2, 4, 10 }, { 3, 1, 11 }, { 3, 2, 12 }, { 3, 4, 13 }, { 0, 0, 0 } }; int reftet_2ea_2va_splitfaces[][4] = { { 1, 2, 3, 17 }, { 0, 0, 0, 0 } }; HPREF_ELEMENT_TYPE reftet_2ea_2va_newelstypes[] = { HP_PYRAMID_EDGES, HP_TET_1E_1VA, HP_TET_1E_1VA, HP_PRISM_SINGEDGE, HP_PRISM_SINGEDGE, HP_PRISM, HP_TET, HP_NONE, }; int reftet_2ea_2va_newels[][8] = { { 1, 5, 17, 6, 7 }, { 3, 11, 12, 13 }, { 2, 8, 10, 9 }, { 5, 17, 7, 8, 9, 10 }, { 6, 7, 17, 11, 13, 12 }, { 17, 9, 12, 7, 10, 13 }, { 7, 10, 13, 4 }, }; HPRef_Struct reftet_2ea_2va = { HP_TET, reftet_2ea_2va_splitedges, reftet_2ea_2va_splitfaces, 0, reftet_2ea_2va_newelstypes, reftet_2ea_2va_newels }; // HP_TET_2EA_2VB, // 2 edges connected int reftet_2ea_2vb_splitedges[][3] = { { 1, 2, 5 }, { 1, 3, 6 }, { 1, 4, 7 }, { 2, 1, 8 }, { 2, 3, 9 }, { 2, 4, 10 }, // { 3, 1, 11 }, { 3, 2, 12 }, { 3, 4, 13 }, { 4, 1, 14 }, { 4, 2, 15 }, { 4, 3, 16 }, { 0, 0, 0 } }; int reftet_2ea_2vb_splitfaces[][4] = { { 1, 2, 3, 17 }, { 2, 3, 4, 18 }, { 3, 4, 2, 19 }, { 4, 2, 3, 20 }, { 0, 0, 0, 0 } }; int reftet_2ea_2vb_splitelements[][5] = { { 1, 2, 3, 4, 21 }, { 0, 0, 0, 0 } }; HPREF_ELEMENT_TYPE reftet_2ea_2vb_newelstypes[] = { HP_PYRAMID_EDGES, HP_TET_1E_1VA, // HP_TET_1E_1VA, HP_TET_0E_1V, HP_PRISM_SINGEDGE, HP_PRISM_SINGEDGE, HP_TET, HP_TET, HP_TET, HP_TET, HP_PYRAMID, HP_PYRAMID, HP_PYRAMID, HP_PYRAMID, HP_PYRAMID, HP_TET, HP_PYRAMID, HP_PYRAMID, HP_TET, // HP_PRISM, // HP_PRISM, HP_NONE, }; int reftet_2ea_2vb_newels[][8] = { { 1, 5, 17, 6, 7 }, { 2, 8, 10, 9 }, // { 3, 11, 12, 13 }, { 4, 15, 14, 16 }, { 5, 17, 7, 8, 9, 10 }, { 6, 7, 17, 3, 13, 12 }, { 9, 10, 18, 21 }, { 13, 12, 19, 21 }, { 15, 16, 20, 21 }, { 18, 20, 19, 21 }, { 10, 15, 20, 18, 21 }, { 13, 19, 20, 16, 21 }, { 9, 18, 19, 12, 21 }, { 7, 13, 16, 14, 21 }, { 7, 14, 15, 10, 21 }, { 9, 12, 17, 21 }, { 7, 10, 9, 17, 21 }, { 7, 17, 12, 13, 21 }, { 14, 16, 15, 21 }, // { 17, 9, 12, 7, 10, 13 }, // { 7, 10, 13, 14, 15, 16 }, }; HPRef_Struct reftet_2ea_2vb = { HP_TET, reftet_2ea_2vb_splitedges, reftet_2ea_2vb_splitfaces, reftet_2ea_2vb_splitelements, reftet_2ea_2vb_newelstypes, reftet_2ea_2vb_newels }; // HP_TET_2EA_2VC, // 2 edges connected int reftet_2ea_2vc_splitedges[][3] = { { 1, 2, 5 }, { 1, 3, 6 }, { 1, 4, 7 }, // { 2, 1, 8 }, { 2, 3, 9 }, { 2, 4, 10 }, { 3, 1, 11 }, { 3, 2, 12 }, { 3, 4, 13 }, { 4, 1, 14 }, { 4, 2, 15 }, { 4, 3, 16 }, { 0, 0, 0 } }; int reftet_2ea_2vc_splitfaces[][4] = { { 1, 2, 3, 17 }, { 2, 3, 4, 18 }, { 3, 4, 2, 19 }, { 4, 2, 3, 20 }, { 0, 0, 0, 0 } }; int reftet_2ea_2vc_splitelements[][5] = { { 1, 2, 3, 4, 21 }, { 0, 0, 0, 0 } }; HPREF_ELEMENT_TYPE reftet_2ea_2vc_newelstypes[] = { HP_PYRAMID_EDGES, HP_TET_1E_1VA, // HP_TET_1E_1VA, HP_TET_0E_1V, HP_PRISM_SINGEDGE, HP_PRISM_SINGEDGE, HP_TET, HP_TET, HP_TET, HP_TET, HP_PYRAMID, HP_PYRAMID, HP_PYRAMID, HP_PYRAMID, HP_PYRAMID, HP_TET, HP_PYRAMID, HP_PYRAMID, HP_TET, // HP_PRISM, // HP_PRISM, HP_NONE, }; int reftet_2ea_2vc_newels[][8] = { { 1, 5, 17, 6, 7 }, // { 2, 8, 10, 9 }, { 3, 11, 12, 13 }, { 4, 15, 14, 16 }, { 5, 17, 7, 2, 9, 10 }, { 6, 7, 17, 11, 13, 12 }, { 9, 10, 18, 21 }, { 13, 12, 19, 21 }, { 15, 16, 20, 21 }, { 18, 20, 19, 21 }, { 10, 15, 20, 18, 21 }, { 13, 19, 20, 16, 21 }, { 9, 18, 19, 12, 21 }, { 7, 13, 16, 14, 21 }, { 7, 14, 15, 10, 21 }, { 9, 12, 17, 21 }, { 7, 10, 9, 17, 21 }, { 7, 17, 12, 13, 21 }, { 14, 16, 15, 21 }, // { 17, 9, 12, 7, 10, 13 }, // { 7, 10, 13, 14, 15, 16 }, }; HPRef_Struct reftet_2ea_2vc = { HP_TET, reftet_2ea_2vc_splitedges, reftet_2ea_2vc_splitfaces, reftet_2ea_2vc_splitelements, reftet_2ea_2vc_newelstypes, reftet_2ea_2vc_newels }; // HP_TET_2EA_3V, // 2 edges connected int reftet_2ea_3v_splitedges[][3] = { { 1, 2, 5 }, { 1, 3, 6 }, { 1, 4, 7 }, { 2, 1, 8 }, { 2, 3, 9 }, { 2, 4, 10 }, { 3, 1, 11 }, { 3, 2, 12 }, { 3, 4, 13 }, { 4, 1, 14 }, { 4, 2, 15 }, { 4, 3, 16 }, { 0, 0, 0 } }; int reftet_2ea_3v_splitfaces[][4] = { { 1, 2, 3, 17 }, { 2, 3, 4, 18 }, { 3, 4, 2, 19 }, { 4, 2, 3, 20 }, { 0, 0, 0, 0 } }; int reftet_2ea_3v_splitelements[][5] = { { 1, 2, 3, 4, 21 }, { 0, 0, 0, 0 } }; HPREF_ELEMENT_TYPE reftet_2ea_3v_newelstypes[] = { HP_PYRAMID_EDGES, HP_TET_1E_1VA, HP_TET_1E_1VA, HP_TET_0E_1V, HP_PRISM_SINGEDGE, HP_PRISM_SINGEDGE, HP_TET, HP_TET, HP_TET, HP_TET, HP_PYRAMID, HP_PYRAMID, HP_PYRAMID, HP_PYRAMID, HP_PYRAMID, HP_TET, HP_PYRAMID, HP_PYRAMID, HP_TET, // HP_PRISM, // HP_PRISM, HP_NONE, }; int reftet_2ea_3v_newels[][8] = { { 1, 5, 17, 6, 7 }, { 2, 8, 10, 9 }, { 3, 11, 12, 13 }, { 4, 15, 14, 16 }, { 5, 17, 7, 8, 9, 10 }, { 6, 7, 17, 11, 13, 12 }, { 9, 10, 18, 21 }, { 13, 12, 19, 21 }, { 15, 16, 20, 21 }, { 18, 20, 19, 21 }, { 10, 15, 20, 18, 21 }, { 13, 19, 20, 16, 21 }, { 9, 18, 19, 12, 21 }, { 7, 13, 16, 14, 21 }, { 7, 14, 15, 10, 21 }, { 9, 12, 17, 21 }, { 7, 10, 9, 17, 21 }, { 7, 17, 12, 13, 21 }, { 14, 16, 15, 21 }, // { 17, 9, 12, 7, 10, 13 }, // { 7, 10, 13, 14, 15, 16 }, }; HPRef_Struct reftet_2ea_3v = { HP_TET, reftet_2ea_3v_splitedges, reftet_2ea_3v_splitfaces, reftet_2ea_3v_splitelements, reftet_2ea_3v_newelstypes, reftet_2ea_3v_newels }; // HP_TET_2EB_0V, // 2 opposite edges int reftet_2eb_0v_splitedges[][3] = { { 1, 3, 5 }, { 1, 4, 6 }, { 2, 3, 7 }, { 2, 4, 8 }, { 3, 1, 9 }, { 3, 2, 10 }, { 4, 1, 11 }, { 4, 2, 12 }, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE reftet_2eb_0v_newelstypes[] = { HP_PRISM_SINGEDGE, HP_PRISM_SINGEDGE, HP_HEX, HP_NONE, }; int reftet_2eb_0v_newels[][8] = { { 1, 5, 6, 2, 7, 8 }, { 3, 9, 10, 4, 11, 12 }, { 6, 11, 12, 8, 5, 9, 10, 7 }, }; HPRef_Struct reftet_2eb_0v = { HP_TET, reftet_2eb_0v_splitedges, 0, 0, reftet_2eb_0v_newelstypes, reftet_2eb_0v_newels }; // HP_TET_2EB_1V, // V1 // HP_TET_2EB_1V, // 2 opposite edges, V1 int reftet_2eb_1v_splitedges[][3] = { { 1, 2, 5 }, { 1, 3, 6 }, { 1, 4, 7 }, { 2, 1, 8 }, { 2, 3, 9 }, { 2, 4, 10 }, { 3, 1, 11 }, { 3, 2, 12 }, { 3, 4, 13 }, { 4, 1, 14 }, { 4, 2, 15 }, { 4, 3, 16 }, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE reftet_2eb_1v_newelstypes[] = { HP_PRISM_SINGEDGE, HP_PRISM_SINGEDGE, HP_TET_1E_1VA, // HP_TET_1E_1VA, // HP_TET_1E_1VA, // HP_TET_1E_1VA, HP_HEX, HP_NONE, }; int reftet_2eb_1v_newels[][8] = { { 5, 6, 7, 2, 9, 10 }, { 4, 15, 14, 3, 12, 11 }, { 1, 5, 6, 7 }, // { 2, 8, 10, 9 }, // { 3, 13, 11, 12 }, // { 4, 16, 15, 14 }, { 7, 14, 15, 10, 6, 11, 12, 9 } }; HPRef_Struct reftet_2eb_1v = { HP_TET, reftet_2eb_1v_splitedges, 0, 0, reftet_2eb_1v_newelstypes, reftet_2eb_1v_newels }; // HP_TET_2EB_2VA, // 2 opposite edges, V1,2 int reftet_2eb_2va_splitedges[][3] = { { 1, 2, 5 }, { 1, 3, 6 }, { 1, 4, 7 }, { 2, 1, 8 }, { 2, 3, 9 }, { 2, 4, 10 }, { 3, 1, 11 }, { 3, 2, 12 }, { 3, 4, 13 }, { 4, 1, 14 }, { 4, 2, 15 }, { 4, 3, 16 }, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE reftet_2eb_2va_newelstypes[] = { HP_PRISM_SINGEDGE, HP_PRISM_SINGEDGE, HP_TET_1E_1VA, HP_TET_1E_1VA, // HP_TET_1E_1VA, // HP_TET_1E_1VA, HP_HEX, HP_NONE, }; int reftet_2eb_2va_newels[][8] = { { 5, 6, 7, 8, 9, 10 }, { 4, 15, 14, 3, 12, 11 }, { 1, 5, 6, 7 }, { 2, 8, 10, 9 }, // { 3, 13, 11, 12 }, // { 4, 16, 15, 14 }, { 7, 14, 15, 10, 6, 11, 12, 9 } }; HPRef_Struct reftet_2eb_2va = { HP_TET, reftet_2eb_2va_splitedges, 0, 0, reftet_2eb_2va_newelstypes, reftet_2eb_2va_newels }; // HP_TET_2EB_2VB, // V1,3 int reftet_2eb_2vb_splitedges[][3] = { { 1, 2, 5 }, { 1, 3, 6 }, { 1, 4, 7 }, { 2, 1, 8 }, { 2, 3, 9 }, { 2, 4, 10 }, { 3, 1, 11 }, { 3, 2, 12 }, { 3, 4, 13 }, { 4, 1, 14 }, { 4, 2, 15 }, { 4, 3, 16 }, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE reftet_2eb_2vb_newelstypes[] = { HP_PRISM_SINGEDGE, HP_PRISM_SINGEDGE, HP_TET_1E_1VA, // HP_TET_1E_1VA, HP_TET_1E_1VA, // HP_TET_1E_1VA, HP_HEX, HP_NONE, }; int reftet_2eb_2vb_newels[][8] = { { 5, 6, 7, 2, 9, 10 }, { 4, 15, 14, 13, 12, 11 }, { 1, 5, 6, 7 }, // { 2, 8, 10, 9 }, { 3, 13, 11, 12 }, // { 4, 16, 15, 14 }, { 7, 14, 15, 10, 6, 11, 12, 9 } }; HPRef_Struct reftet_2eb_2vb = { HP_TET, reftet_2eb_2vb_splitedges, 0, 0, reftet_2eb_2vb_newelstypes, reftet_2eb_2vb_newels }; // HP_TET_2EB_2VC, // V1,4 int reftet_2eb_2vc_splitedges[][3] = { { 1, 2, 5 }, { 1, 3, 6 }, { 1, 4, 7 }, { 2, 1, 8 }, { 2, 3, 9 }, { 2, 4, 10 }, { 3, 1, 11 }, { 3, 2, 12 }, { 3, 4, 13 }, { 4, 1, 14 }, { 4, 2, 15 }, { 4, 3, 16 }, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE reftet_2eb_2vc_newelstypes[] = { HP_PRISM_SINGEDGE, HP_PRISM_SINGEDGE, HP_TET_1E_1VA, // HP_TET_1E_1VA, // HP_TET_1E_1VA, HP_TET_1E_1VA, HP_HEX, HP_NONE, }; int reftet_2eb_2vc_newels[][8] = { { 5, 6, 7, 2, 9, 10 }, { 16, 15, 14, 3, 12, 11 }, { 1, 5, 6, 7 }, // { 2, 8, 10, 9 }, // { 3, 13, 11, 12 }, { 4, 16, 15, 14 }, { 7, 14, 15, 10, 6, 11, 12, 9 } }; HPRef_Struct reftet_2eb_2vc = { HP_TET, reftet_2eb_2vc_splitedges, 0, 0, reftet_2eb_2vc_newelstypes, reftet_2eb_2vc_newels }; // HP_TET_2EB_3V, // V1,2,3 int reftet_2eb_3v_splitedges[][3] = { { 1, 2, 5 }, { 1, 3, 6 }, { 1, 4, 7 }, { 2, 1, 8 }, { 2, 3, 9 }, { 2, 4, 10 }, { 3, 1, 11 }, { 3, 2, 12 }, { 3, 4, 13 }, { 4, 1, 14 }, { 4, 2, 15 }, { 4, 3, 16 }, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE reftet_2eb_3v_newelstypes[] = { HP_PRISM_SINGEDGE, HP_PRISM_SINGEDGE, HP_TET_1E_1VA, HP_TET_1E_1VA, HP_TET_1E_1VA, // HP_TET_1E_1VA, HP_HEX, HP_NONE, }; int reftet_2eb_3v_newels[][8] = { { 5, 6, 7, 8, 9, 10 }, { 4, 15, 14, 13, 12, 11 }, { 1, 5, 6, 7 }, { 2, 8, 10, 9 }, { 3, 13, 11, 12 }, // { 4, 16, 15, 14 }, { 7, 14, 15, 10, 6, 11, 12, 9 } }; HPRef_Struct reftet_2eb_3v = { HP_TET, reftet_2eb_3v_splitedges, 0, 0, reftet_2eb_3v_newelstypes, reftet_2eb_3v_newels }; // HP_TET_2EB_4V, // 2 opposite edges int reftet_2eb_4v_splitedges[][3] = { { 1, 2, 5 }, { 1, 3, 6 }, { 1, 4, 7 }, { 2, 1, 8 }, { 2, 3, 9 }, { 2, 4, 10 }, { 3, 1, 11 }, { 3, 2, 12 }, { 3, 4, 13 }, { 4, 1, 14 }, { 4, 2, 15 }, { 4, 3, 16 }, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE reftet_2eb_4v_newelstypes[] = { HP_PRISM_SINGEDGE, HP_PRISM_SINGEDGE, HP_TET_1E_1VA, HP_TET_1E_1VA, HP_TET_1E_1VA, HP_TET_1E_1VA, HP_HEX, HP_NONE, }; int reftet_2eb_4v_newels[][8] = { { 5, 6, 7, 8, 9, 10 }, { 16, 15, 14, 13, 12, 11 }, { 1, 5, 6, 7 }, { 2, 8, 10, 9 }, { 3, 13, 11, 12 }, { 4, 16, 15, 14 }, { 7, 14, 15, 10, 6, 11, 12, 9 } }; HPRef_Struct reftet_2eb_4v = { HP_TET, reftet_2eb_4v_splitedges, 0, 0, reftet_2eb_4v_newelstypes, reftet_2eb_4v_newels }; // HP_TET_3EA_0V, int reftet_3ea_0v_splitedges[][3] = { { 1, 2, 5 }, { 1, 3, 6 }, { 1, 4, 7 }, { 2, 3, 8 }, { 2, 4, 9 }, { 3, 2, 10 }, { 3, 4, 11 }, { 4, 2, 12 }, { 4, 3, 13 }, { 0, 0, 0 } }; int reftet_3ea_0v_splitfaces[][4] = { { 1, 2, 3, 14 }, { 1, 2, 4, 15 }, { 1, 3, 4, 16 }, { 2, 3, 4, 17 }, { 3, 4, 2, 18 }, { 4, 2, 3, 19 }, { 0, 0, 0, 0 } }; int reftet_3ea_0v_splitelements[][5] = { { 1, 2, 3, 4, 20 }, { 0 }, }; HPREF_ELEMENT_TYPE reftet_3ea_0v_newelstypes[] = { HP_HEX_3E_0V, HP_HEX_1E_0V, HP_HEX_1E_0V, HP_HEX_1E_0V, HP_PRISM, HP_PRISM, HP_PRISM, HP_TET, HP_NONE, }; int reftet_3ea_0v_newels[][8] = { { 1, 5, 14, 6, 7, 15, 20, 16 }, { 5, 2, 8, 14, 15, 9, 17, 20 }, { 3, 6, 14, 10, 11, 16, 20, 18 }, { 7, 4, 12, 15, 16, 13, 19, 20 }, { 11, 13, 16, 18, 19, 20 }, { 15, 12, 9, 20, 19, 17 }, { 8, 10, 14, 17, 18, 20 }, { 20, 17, 18, 19 }, }; HPRef_Struct reftet_3ea_0v = { HP_TET, reftet_3ea_0v_splitedges, reftet_3ea_0v_splitfaces, reftet_3ea_0v_splitelements, reftet_3ea_0v_newelstypes, reftet_3ea_0v_newels }; // HP_TET_3EA_1V, int reftet_3ea_1v_splitedges[][3] = { { 1, 2, 5 }, { 1, 3, 6 }, { 1, 4, 7 }, { 2, 3, 8 }, { 2, 4, 9 }, { 3, 2, 10 }, { 3, 4, 11 }, { 4, 2, 12 }, { 4, 3, 13 }, { 2, 1, 21 }, { 3, 1, 22 }, { 4, 1, 23 }, { 0, 0, 0 } }; int reftet_3ea_1v_splitfaces[][4] = { { 1, 2, 3, 14 }, { 1, 2, 4, 15 }, { 1, 3, 4, 16 }, { 2, 3, 4, 17 }, { 3, 4, 2, 18 }, { 4, 2, 3, 19 }, { 0, 0, 0, 0 } }; int reftet_3ea_1v_splitelements[][5] = { { 1, 2, 3, 4, 20 }, { 0 }, }; HPREF_ELEMENT_TYPE reftet_3ea_1v_newelstypes[] = { HP_HEX_3E_0V, HP_TET_1E_1VA, HP_PRISM_SINGEDGE, HP_PRISM, // HP_TET_1E_1VA, HP_PRISM_SINGEDGE, HP_PRISM, // HP_TET_1E_1VA, HP_PRISM_SINGEDGE, HP_PRISM, HP_PRISM, HP_PRISM, HP_PRISM, HP_TET, HP_NONE, }; int reftet_3ea_1v_newels[][8] = { { 1, 5, 14, 6, 7, 15, 20, 16 }, { 2, 21, 9, 8 }, { 5, 14, 15, 21, 8, 9 }, { 15, 14, 20, 9, 8, 17 }, // { 3, 22, 10, 11 }, // { 6, 16, 14, 22, 11, 10 }, { 6, 16, 14, 3, 11, 10 }, { 14, 16, 20, 10, 11, 18 }, // { 4, 23, 13, 12 }, // { 7, 15, 16, 23, 12, 13 }, { 7, 15, 16, 4, 12, 13 }, { 16, 15, 20, 13, 12, 19 }, { 11, 13, 16, 18, 19, 20 }, { 15, 12, 9, 20, 19, 17 }, { 8, 10, 14, 17, 18, 20 }, { 20, 17, 18, 19 }, }; HPRef_Struct reftet_3ea_1v = { HP_TET, reftet_3ea_1v_splitedges, reftet_3ea_1v_splitfaces, reftet_3ea_1v_splitelements, reftet_3ea_1v_newelstypes, reftet_3ea_1v_newels }; // HP_TET_3EA_2V, int reftet_3ea_2v_splitedges[][3] = { { 1, 2, 5 }, { 1, 3, 6 }, { 1, 4, 7 }, { 2, 3, 8 }, { 2, 4, 9 }, { 3, 2, 10 }, { 3, 4, 11 }, { 4, 2, 12 }, { 4, 3, 13 }, { 2, 1, 21 }, { 3, 1, 22 }, { 4, 1, 23 }, { 0, 0, 0 } }; int reftet_3ea_2v_splitfaces[][4] = { { 1, 2, 3, 14 }, { 1, 2, 4, 15 }, { 1, 3, 4, 16 }, { 2, 3, 4, 17 }, { 3, 4, 2, 18 }, { 4, 2, 3, 19 }, { 0, 0, 0, 0 } }; int reftet_3ea_2v_splitelements[][5] = { { 1, 2, 3, 4, 20 }, { 0 }, }; HPREF_ELEMENT_TYPE reftet_3ea_2v_newelstypes[] = { HP_HEX_3E_0V, HP_TET_1E_1VA, HP_PRISM_SINGEDGE, HP_PRISM, HP_TET_1E_1VA, HP_PRISM_SINGEDGE, HP_PRISM, // HP_TET_1E_1VA, HP_PRISM_SINGEDGE, HP_PRISM, HP_PRISM, HP_PRISM, HP_PRISM, HP_TET, HP_NONE, }; int reftet_3ea_2v_newels[][8] = { { 1, 5, 14, 6, 7, 15, 20, 16 }, { 2, 21, 9, 8 }, { 5, 14, 15, 21, 8, 9 }, { 15, 14, 20, 9, 8, 17 }, { 3, 22, 10, 11 }, { 6, 16, 14, 22, 11, 10 }, { 14, 16, 20, 10, 11, 18 }, // { 4, 23, 13, 12 }, { 7, 15, 16, 4, 12, 13 }, { 16, 15, 20, 13, 12, 19 }, { 11, 13, 16, 18, 19, 20 }, { 15, 12, 9, 20, 19, 17 }, { 8, 10, 14, 17, 18, 20 }, { 20, 17, 18, 19 }, }; HPRef_Struct reftet_3ea_2v = { HP_TET, reftet_3ea_2v_splitedges, reftet_3ea_2v_splitfaces, reftet_3ea_2v_splitelements, reftet_3ea_2v_newelstypes, reftet_3ea_2v_newels }; // HP_TET_3EA_3V, int reftet_3ea_3v_splitedges[][3] = { { 1, 2, 5 }, { 1, 3, 6 }, { 1, 4, 7 }, { 2, 3, 8 }, { 2, 4, 9 }, { 3, 2, 10 }, { 3, 4, 11 }, { 4, 2, 12 }, { 4, 3, 13 }, { 2, 1, 21 }, { 3, 1, 22 }, { 4, 1, 23 }, { 0, 0, 0 } }; int reftet_3ea_3v_splitfaces[][4] = { { 1, 2, 3, 14 }, { 1, 2, 4, 15 }, { 1, 3, 4, 16 }, { 2, 3, 4, 17 }, { 3, 4, 2, 18 }, { 4, 2, 3, 19 }, { 0, 0, 0, 0 } }; int reftet_3ea_3v_splitelements[][5] = { { 1, 2, 3, 4, 20 }, { 0 }, }; HPREF_ELEMENT_TYPE reftet_3ea_3v_newelstypes[] = { HP_HEX_3E_0V, HP_TET_1E_1VA, HP_PRISM_SINGEDGE, HP_PRISM, HP_TET_1E_1VA, HP_PRISM_SINGEDGE, HP_PRISM, HP_TET_1E_1VA, HP_PRISM_SINGEDGE, HP_PRISM, HP_PRISM, HP_PRISM, HP_PRISM, HP_TET, HP_NONE, }; int reftet_3ea_3v_newels[][8] = { { 1, 5, 14, 6, 7, 15, 20, 16 }, { 2, 21, 9, 8 }, { 5, 14, 15, 21, 8, 9 }, { 15, 14, 20, 9, 8, 17 }, { 3, 22, 10, 11 }, { 6, 16, 14, 22, 11, 10 }, { 14, 16, 20, 10, 11, 18 }, { 4, 23, 13, 12 }, { 7, 15, 16, 23, 12, 13 }, { 16, 15, 20, 13, 12, 19 }, { 11, 13, 16, 18, 19, 20 }, { 15, 12, 9, 20, 19, 17 }, { 8, 10, 14, 17, 18, 20 }, { 20, 17, 18, 19 }, }; HPRef_Struct reftet_3ea_3v = { HP_TET, reftet_3ea_3v_splitedges, reftet_3ea_3v_splitfaces, reftet_3ea_3v_splitelements, reftet_3ea_3v_newelstypes, reftet_3ea_3v_newels }; // HP_TET_3EV_0V, int reftet_3eb_0v_splitedges[][3] = { { 1, 2, 5 }, { 1, 3, 6 }, { 1, 4, 7 }, { 2, 1, 8 }, { 2, 3, 9 }, { 2, 4, 10 }, { 3, 1, 11 }, // { 3, 2, 12 }, { 3, 4, 13 }, // { 4, 1, 14 }, { 4, 2, 15 }, { 4, 3, 16 }, { 0, 0, 0 } }; int reftet_3eb_0v_splitfaces[][4] = { { 1, 2, 4, 17 }, { 2, 1, 3, 18 }, { 0, 0, 0, 0 } }; int reftet_3eb_0v_splitelements[][5] = { { 1, 2, 3, 4, 20 }, { 0 }, }; HPREF_ELEMENT_TYPE reftet_3eb_0v_newelstypes[] = { HP_PYRAMID_EDGES, HP_PYRAMID_EDGES, // HP_TET_1E_1VA, // HP_TET_1E_1VA, HP_PRISM_SINGEDGE, HP_PRISM_SINGEDGE, HP_PRISM_SINGEDGE, HP_PYRAMID, HP_PYRAMID, HP_TET, HP_TET, HP_PYRAMID, HP_PYRAMID, HP_PYRAMID, HP_NONE, }; int reftet_3eb_0v_newels[][8] = { { 1, 7, 17, 5, 6 }, { 2, 9, 18, 8, 10 }, // { 3, 12, 13, 11 }, // { 4, 14, 16, 15 }, { 5, 6, 17, 8, 18, 10 }, { 7, 17, 6, 4, 15, 16 }, { 9, 18, 10, 3, 11, 13 }, { 10, 15, 16, 13, 20 }, { 6, 11, 13, 16, 20 }, { 10, 17, 15, 20 }, { 6, 18, 11, 20 }, { 6, 17, 10, 18, 20 }, { 6, 16, 15, 17, 20 }, { 18, 10, 13, 11, 20 }, }; HPRef_Struct reftet_3eb_0v = { HP_TET, reftet_3eb_0v_splitedges, reftet_3eb_0v_splitfaces, reftet_3eb_0v_splitelements, reftet_3eb_0v_newelstypes, reftet_3eb_0v_newels }; // HP_TET_3EV_1V, int reftet_3eb_1v_splitedges[][3] = { { 1, 2, 5 }, { 1, 3, 6 }, { 1, 4, 7 }, { 2, 1, 8 }, { 2, 3, 9 }, { 2, 4, 10 }, { 3, 1, 11 }, { 3, 2, 12 }, { 3, 4, 13 }, // { 4, 1, 14 }, { 4, 2, 15 }, { 4, 3, 16 }, { 0, 0, 0 } }; int reftet_3eb_1v_splitfaces[][4] = { { 1, 2, 4, 17 }, { 2, 1, 3, 18 }, { 0, 0, 0, 0 } }; int reftet_3eb_1v_splitelements[][5] = { { 1, 2, 3, 4, 20 }, { 0 }, }; HPREF_ELEMENT_TYPE reftet_3eb_1v_newelstypes[] = { HP_PYRAMID_EDGES, HP_PYRAMID_EDGES, HP_TET_1E_1VA, // HP_TET_1E_1VA, HP_PRISM_SINGEDGE, HP_PRISM_SINGEDGE, HP_PRISM_SINGEDGE, HP_PYRAMID, HP_PYRAMID, HP_TET, HP_TET, HP_PYRAMID, HP_PYRAMID, HP_PYRAMID, HP_NONE, }; int reftet_3eb_1v_newels[][8] = { { 1, 7, 17, 5, 6 }, { 2, 9, 18, 8, 10 }, { 3, 12, 13, 11 }, // { 4, 14, 16, 15 }, { 5, 6, 17, 8, 18, 10 }, { 7, 17, 6, 4, 15, 16 }, { 9, 18, 10, 12, 11, 13 }, { 10, 15, 16, 13, 20 }, { 6, 11, 13, 16, 20 }, { 10, 17, 15, 20 }, { 6, 18, 11, 20 }, { 6, 17, 10, 18, 20 }, { 6, 16, 15, 17, 20 }, { 18, 10, 13, 11, 20 }, }; HPRef_Struct reftet_3eb_1v = { HP_TET, reftet_3eb_1v_splitedges, reftet_3eb_1v_splitfaces, reftet_3eb_1v_splitelements, reftet_3eb_1v_newelstypes, reftet_3eb_1v_newels }; // HP_TET_3EV_2V, int reftet_3eb_2v_splitedges[][3] = { { 1, 2, 5 }, { 1, 3, 6 }, { 1, 4, 7 }, { 2, 1, 8 }, { 2, 3, 9 }, { 2, 4, 10 }, { 3, 1, 11 }, { 3, 2, 12 }, { 3, 4, 13 }, { 4, 1, 14 }, { 4, 2, 15 }, { 4, 3, 16 }, { 0, 0, 0 } }; int reftet_3eb_2v_splitfaces[][4] = { { 1, 2, 4, 17 }, { 2, 1, 3, 18 }, { 0, 0, 0, 0 } }; int reftet_3eb_2v_splitelements[][5] = { { 1, 2, 3, 4, 20 }, { 0 }, }; HPREF_ELEMENT_TYPE reftet_3eb_2v_newelstypes[] = { HP_PYRAMID_EDGES, HP_PYRAMID_EDGES, HP_TET_1E_1VA, HP_TET_1E_1VA, HP_PRISM_SINGEDGE, HP_PRISM_SINGEDGE, HP_PRISM_SINGEDGE, HP_PYRAMID, HP_PYRAMID, HP_TET, HP_TET, HP_PYRAMID, HP_PYRAMID, HP_PYRAMID, HP_NONE, }; int reftet_3eb_2v_newels[][8] = { { 1, 7, 17, 5, 6 }, { 2, 9, 18, 8, 10 }, { 3, 12, 13, 11 }, { 4, 14, 16, 15 }, { 5, 6, 17, 8, 18, 10 }, { 7, 17, 6, 14, 15, 16 }, { 9, 18, 10, 12, 11, 13 }, { 10, 15, 16, 13, 20 }, { 6, 11, 13, 16, 20 }, { 10, 17, 15, 20 }, { 6, 18, 11, 20 }, { 6, 17, 10, 18, 20 }, { 6, 16, 15, 17, 20 }, { 18, 10, 13, 11, 20 }, }; HPRef_Struct reftet_3eb_2v = { HP_TET, reftet_3eb_2v_splitedges, reftet_3eb_2v_splitfaces, reftet_3eb_2v_splitelements, reftet_3eb_2v_newelstypes, reftet_3eb_2v_newels }; // HP_TET_3EC_0V, int reftet_3ec_0v_splitedges[][3] = { { 1, 2, 5 }, { 1, 3, 6 }, { 1, 4, 7 }, { 2, 1, 8 }, { 2, 3, 9 }, { 2, 4, 10 }, // { 3, 1, 11 }, { 3, 2, 12 }, { 3, 4, 13 }, { 4, 1, 14 }, // { 4, 2, 15 }, { 4, 3, 16 }, { 0, 0, 0 } }; int reftet_3ec_0v_splitfaces[][4] = { { 1, 2, 3, 17 }, { 2, 1, 4, 18 }, { 0, 0, 0, 0 } }; int reftet_3ec_0v_splitelements[][5] = { { 1, 2, 3, 4, 20 }, { 0 }, }; HPREF_ELEMENT_TYPE reftet_3ec_0v_newelstypes[] = { HP_PYRAMID_EDGES, HP_PYRAMID_EDGES, // HP_TET_1E_1VA, // HP_TET_1E_1VA, HP_PRISM_SINGEDGE, HP_PRISM_SINGEDGE, HP_PRISM_SINGEDGE, HP_PYRAMID, HP_PYRAMID, HP_TET, HP_TET, HP_PYRAMID, HP_PYRAMID, HP_PYRAMID, HP_NONE, }; int reftet_3ec_0v_newels[][8] = { { 1, 5, 17, 6, 7 }, { 2, 8, 18, 10, 9 }, // { 3, 11, 12, 13 }, // { 4, 15, 14, 16 }, { 5, 17, 7, 8, 9, 18 }, { 6, 7, 17, 3, 13, 12 }, { 10, 9, 18, 4, 16, 14 }, { 9, 16, 13, 12, 20 }, { 7, 13, 16, 14, 20 }, { 7, 14, 18, 20 }, { 9, 12, 17, 20 }, { 17, 7, 18, 9, 20 }, { 7, 17, 12, 13, 20 }, { 9, 18, 14, 16, 20 }, }; HPRef_Struct reftet_3ec_0v = { HP_TET, reftet_3ec_0v_splitedges, reftet_3ec_0v_splitfaces, reftet_3ec_0v_splitelements, reftet_3ec_0v_newelstypes, reftet_3ec_0v_newels }; // HP_TET_3EC_1V, int reftet_3ec_1v_splitedges[][3] = { { 1, 2, 5 }, { 1, 3, 6 }, { 1, 4, 7 }, { 2, 1, 8 }, { 2, 3, 9 }, { 2, 4, 10 }, { 3, 1, 11 }, { 3, 2, 12 }, { 3, 4, 13 }, { 4, 1, 14 }, // { 4, 2, 15 }, { 4, 3, 16 }, { 0, 0, 0 } }; int reftet_3ec_1v_splitfaces[][4] = { { 1, 2, 3, 17 }, { 2, 1, 4, 18 }, { 0, 0, 0, 0 } }; int reftet_3ec_1v_splitelements[][5] = { { 1, 2, 3, 4, 20 }, { 0 }, }; HPREF_ELEMENT_TYPE reftet_3ec_1v_newelstypes[] = { HP_PYRAMID_EDGES, HP_PYRAMID_EDGES, HP_TET_1E_1VA, // HP_TET_1E_1VA, HP_PRISM_SINGEDGE, HP_PRISM_SINGEDGE, HP_PRISM_SINGEDGE, HP_PYRAMID, HP_PYRAMID, HP_TET, HP_TET, HP_PYRAMID, HP_PYRAMID, HP_PYRAMID, HP_NONE, }; int reftet_3ec_1v_newels[][8] = { { 1, 5, 17, 6, 7 }, { 2, 8, 18, 10, 9 }, { 3, 11, 12, 13 }, // { 4, 15, 14, 16 }, { 5, 17, 7, 8, 9, 18 }, { 6, 7, 17, 11, 13, 12 }, { 10, 9, 18, 4, 16, 14 }, { 9, 16, 13, 12, 20 }, { 7, 13, 16, 14, 20 }, { 7, 14, 18, 20 }, { 9, 12, 17, 20 }, { 17, 7, 18, 9, 20 }, { 7, 17, 12, 13, 20 }, { 9, 18, 14, 16, 20 }, }; HPRef_Struct reftet_3ec_1v = { HP_TET, reftet_3ec_1v_splitedges, reftet_3ec_1v_splitfaces, reftet_3ec_1v_splitelements, reftet_3ec_1v_newelstypes, reftet_3ec_1v_newels }; // HP_TET_3EC_2V, int reftet_3ec_2v_splitedges[][3] = { { 1, 2, 5 }, { 1, 3, 6 }, { 1, 4, 7 }, { 2, 1, 8 }, { 2, 3, 9 }, { 2, 4, 10 }, { 3, 1, 11 }, { 3, 2, 12 }, { 3, 4, 13 }, { 4, 1, 14 }, { 4, 2, 15 }, { 4, 3, 16 }, { 0, 0, 0 } }; int reftet_3ec_2v_splitfaces[][4] = { { 1, 2, 3, 17 }, { 2, 1, 4, 18 }, { 0, 0, 0, 0 } }; int reftet_3ec_2v_splitelements[][5] = { { 1, 2, 3, 4, 20 }, { 0 }, }; HPREF_ELEMENT_TYPE reftet_3ec_2v_newelstypes[] = { HP_PYRAMID_EDGES, HP_PYRAMID_EDGES, HP_TET_1E_1VA, HP_TET_1E_1VA, HP_PRISM_SINGEDGE, HP_PRISM_SINGEDGE, HP_PRISM_SINGEDGE, HP_PYRAMID, HP_PYRAMID, HP_TET, HP_TET, HP_PYRAMID, HP_PYRAMID, HP_PYRAMID, HP_NONE, }; int reftet_3ec_2v_newels[][8] = { { 1, 5, 17, 6, 7 }, { 2, 8, 18, 10, 9 }, { 3, 11, 12, 13 }, { 4, 15, 14, 16 }, { 5, 17, 7, 8, 9, 18 }, { 6, 7, 17, 11, 13, 12 }, { 10, 9, 18, 15, 16, 14 }, { 9, 16, 13, 12, 20 }, { 7, 13, 16, 14, 20 }, { 7, 14, 18, 20 }, { 9, 12, 17, 20 }, { 17, 7, 18, 9, 20 }, { 7, 17, 12, 13, 20 }, { 9, 18, 14, 16, 20 }, }; HPRef_Struct reftet_3ec_2v = { HP_TET, reftet_3ec_2v_splitedges, reftet_3ec_2v_splitfaces, reftet_3ec_2v_splitelements, reftet_3ec_2v_newelstypes, reftet_3ec_2v_newels }; /* ************************ 1 singular face ******************** */ // HP_TET_1F_0E_0V int reftet_1f_0e_0v_splitedges[][3] = { { 2, 1, 5 }, { 3, 1, 6 }, { 4, 1, 7 }, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE reftet_1f_0e_0v_newelstypes[] = { HP_PRISM_1FA_0E_0V, HP_TET, HP_NONE, }; int reftet_1f_0e_0v_newels[][8] = { { 3, 2, 4, 6, 5, 7 }, { 5, 7, 6, 1 } }; HPRef_Struct reftet_1f_0e_0v = { HP_TET, reftet_1f_0e_0v_splitedges, 0, 0, reftet_1f_0e_0v_newelstypes, reftet_1f_0e_0v_newels }; // HP_TET_1F_0E_1VA ... singular vertex in face int reftet_1f_0e_1va_splitedges[][3] = { { 2, 1, 5 }, { 2, 3, 6 }, { 2, 4, 7 }, { 3, 1, 8 }, { 4, 1, 9 }, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE reftet_1f_0e_1va_newelstypes[] = { HP_HEX_1F_0E_0V, HP_TET_1F_0E_1VA, HP_TET, HP_NONE, }; int reftet_1f_0e_1va_newels[][8] = { { 3, 6, 7, 4, 8, 5, 5, 9 }, { 5, 2, 6, 7 }, { 5, 9, 8, 1 }, }; HPRef_Struct reftet_1f_0e_1va = { HP_TET, reftet_1f_0e_1va_splitedges, 0, 0, reftet_1f_0e_1va_newelstypes, reftet_1f_0e_1va_newels }; // HP_TET_1F_0E_1VB ... singular vertex not in face int reftet_1f_0e_1vb_splitedges[][3] = { { 1, 2, 5 }, { 1, 3, 6 }, { 1, 4, 7 }, { 2, 1, 8 }, { 3, 1, 9 }, { 4, 1, 10 }, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE reftet_1f_0e_1vb_newelstypes[] = { HP_PRISM_1FA_0E_0V, HP_PRISM, HP_TET_0E_1V, HP_NONE, }; int reftet_1f_0e_1vb_newels[][8] = { { 2, 4, 3, 8, 10, 9 }, { 8, 10, 9, 5, 7, 6 }, { 1, 5, 6, 7 }, }; HPRef_Struct reftet_1f_0e_1vb = { HP_TET, reftet_1f_0e_1vb_splitedges, 0, 0, reftet_1f_0e_1vb_newelstypes, reftet_1f_0e_1vb_newels }; // HP_TET_1F_1EA_0V ... sing edge is 1..2 int reftet_1f_1ea_0v_splitedges[][3] = { { 1, 3, 5 }, { 1, 4, 6 }, { 2, 1, 7 }, { 2, 3, 8 }, { 2, 4, 9 }, { 3, 1, 10 }, { 4, 1, 11 }, { 0, 0, 0 } }; int reftet_1f_1ea_0v_splitfaces[][4] = { { 2, 1, 3, 12 }, { 2, 1, 4, 13 }, { 0, 0, 0, 0 } }; HPREF_ELEMENT_TYPE reftet_1f_1ea_0v_newelstypes[] = { HP_HEX_1F_0E_0V, // HP_PRISM, HP_PYRAMID_1FB_0E_1VA, HP_TET_1E_1VA, HP_PRISM_SINGEDGE, HP_PRISM, HP_NONE, }; int reftet_1f_1ea_0v_newels[][8] = { { 3, 8, 9, 4, 10, 12, 13, 11 }, // { 2, 9, 8, 7, 13, 12 }, { 8, 9, 13, 12, 2 }, { 2, 7, 13, 12 }, { 7, 13, 12, 1, 6, 5 }, { 6, 11, 13, 5, 10, 12 } }; HPRef_Struct reftet_1f_1ea_0v = { HP_TET, reftet_1f_1ea_0v_splitedges, reftet_1f_1ea_0v_splitfaces, 0, reftet_1f_1ea_0v_newelstypes, reftet_1f_1ea_0v_newels }; // HP_TET_1F_1EB_0V singular edge in face, edge is 2-3 int reftet_1f_1eb_0v_splitedges[][3] = { { 2, 1, 5 }, { 2, 4, 6 }, { 3, 1, 7 }, { 3, 4, 8 }, { 4, 1, 9 }, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE reftet_1f_1eb_0v_newelstypes[] = { HP_PRISM_1FB_1EA_0V, HP_PRISM_1FA_0E_0V, HP_TET, HP_NONE, }; int reftet_1f_1eb_0v_newels[][8] = { // { 2, 5, 6, 3, 7, 8 }, { 3, 8, 7, 2, 6, 5 }, { 6, 4, 8, 5, 9, 7 }, { 5, 9, 7, 1} }; HPRef_Struct reftet_1f_1eb_0v = { HP_TET, reftet_1f_1eb_0v_splitedges, 0, 0, reftet_1f_1eb_0v_newelstypes, reftet_1f_1eb_0v_newels }; /* ************************ 2 singular faces ******************** */ // HP_TET_2F_0E_0V int reftet_2f_0e_0v_splitedges[][3] = { { 1, 2, 5 }, { 2, 1, 6 }, { 3, 1, 7 }, { 3, 2, 8 }, { 4, 1, 9 }, { 4, 2, 10 }, { 0, 0, 0 } }; int reftet_2f_0e_0v_splitfaces[][4] = { { 3, 1, 2, 11 }, { 4, 1, 2, 12 }, { 0, 0, 0, 0 } }; HPREF_ELEMENT_TYPE reftet_2f_0e_0v_newelstypes[] = { HP_PRISM_1FA_0E_0V, HP_PRISM_1FA_0E_0V, HP_PRISM_1FB_1EA_0V, HP_PRISM_1FB_1EA_0V, HP_TET, HP_NONE, }; int reftet_2f_0e_0v_newels[][8] = { { 2, 10, 8, 6, 12, 11 }, { 1, 7, 9, 5, 11, 12 }, // { 3, 11, 8, 4, 12, 10 }, { 4, 10, 12, 3, 8, 11 }, { 3, 7, 11, 4, 9, 12 }, { 5, 6, 11, 12 } }; HPRef_Struct reftet_2f_0e_0v = { HP_TET, reftet_2f_0e_0v_splitedges, reftet_2f_0e_0v_splitfaces, 0, reftet_2f_0e_0v_newelstypes, reftet_2f_0e_0v_newels }; netgen-6.2.1804/libsrc/meshing/curvedelems.hpp0000644000175000017500000001676613272137567017764 0ustar kurtkurt#ifndef CURVEDELEMS #define CURVEDELEMS /**************************************************************************/ /* File: curvedelems.hpp */ /* Author: Robert Gaisbauer (first version) */ /* redesign by Joachim Schoeberl */ /* Date: 27. Sep. 02, Feb 2006 */ /**************************************************************************/ class Refinement; class CurvedElements { const Mesh & mesh; Array edgeorder; Array faceorder; Array edgecoeffsindex; Array facecoeffsindex; Array< Vec<3> > edgecoeffs; Array< Vec<3> > facecoeffs; Array< double > edgeweight; // for rational 2nd order splines int order; bool rational; bool ishighorder; public: DLL_HEADER CurvedElements (const Mesh & amesh); DLL_HEADER ~CurvedElements(); // bool IsHighOrder() const { return order > 1; } bool IsHighOrder() const { return ishighorder; } // void SetHighOrder (int aorder) { order=aorder; } void SetIsHighOrder (bool ho) { ishighorder = ho; } DLL_HEADER void BuildCurvedElements(const Refinement * ref, int aorder, bool arational = false); int GetOrder () { return order; } bool IsSegmentCurved (SegmentIndex segnr) const; bool IsSurfaceElementCurved (SurfaceElementIndex sei) const; bool IsElementCurved (ElementIndex ei) const; bool IsElementHighOrder (ElementIndex ei) const; void CalcSegmentTransformation (double xi, SegmentIndex segnr, Point<3> & x) { CalcSegmentTransformation (xi, segnr, &x, NULL); }; void CalcSegmentTransformation (double xi, SegmentIndex segnr, Vec<3> & dxdxi) { CalcSegmentTransformation (xi, segnr, NULL, &dxdxi); }; void CalcSegmentTransformation (double xi, SegmentIndex segnr, Point<3> & x, Vec<3> & dxdxi) { CalcSegmentTransformation (xi, segnr, &x, &dxdxi, NULL); }; void CalcSegmentTransformation (double xi, SegmentIndex segnr, Point<3> & x, Vec<3> & dxdxi, bool & curved) { CalcSegmentTransformation (xi, segnr, &x, &dxdxi, &curved); }; void CalcSurfaceTransformation (const Point<2> & xi, SurfaceElementIndex elnr, Point<3> & x) { CalcSurfaceTransformation (xi, elnr, &x, NULL); }; void CalcSurfaceTransformation (const Point<2> & xi, SurfaceElementIndex elnr, Mat<3,2> & dxdxi) { CalcSurfaceTransformation (xi, elnr, NULL, &dxdxi); }; void CalcSurfaceTransformation (const Point<2> & xi, SurfaceElementIndex elnr, Point<3> & x, Mat<3,2> & dxdxi) { CalcSurfaceTransformation (xi, elnr, &x, &dxdxi, NULL); }; void CalcSurfaceTransformation (const Point<2> & xi, SurfaceElementIndex elnr, Point<3> & x, Mat<3,2> & dxdxi, bool & curved) { CalcSurfaceTransformation (xi, elnr, &x, &dxdxi, &curved); }; void CalcElementTransformation (const Point<3> & xi, ElementIndex elnr, Point<3> & x) { CalcElementTransformation (xi, elnr, &x, NULL); }; void CalcElementTransformation (const Point<3> & xi, ElementIndex elnr, Mat<3,3> & dxdxi) { CalcElementTransformation (xi, elnr, NULL, &dxdxi); }; void CalcElementTransformation (const Point<3> & xi, ElementIndex elnr, Point<3> & x, Mat<3,3> & dxdxi) { CalcElementTransformation (xi, elnr, &x, &dxdxi /* , NULL */ ); }; void CalcElementTransformation (const Point<3> & xi, ElementIndex elnr, Point<3> & x, Mat<3,3> & dxdxi, void * buffer, bool valid) { CalcElementTransformation (xi, elnr, &x, &dxdxi, /* NULL, */ buffer, valid ); }; // void CalcElementTransformation (const Point<3> & xi, ElementIndex elnr, // Point<3> & x, Mat<3,3> & dxdxi) // , bool & curved) // { CalcElementTransformation (xi, elnr, &x, &dxdxi /* , &curved * ); } /* void CalcMultiPointSegmentTransformation (Array * xi, SegmentIndex segnr, Array > * x, Array > * dxdxi); */ template void CalcMultiPointSegmentTransformation (SegmentIndex elnr, int n, const T * xi, size_t sxi, T * x, size_t sx, T * dxdxi, size_t sdxdxi); void CalcMultiPointSurfaceTransformation (Array< Point<2> > * xi, SurfaceElementIndex elnr, Array< Point<3> > * x, Array< Mat<3,2> > * dxdxi); template void CalcMultiPointSurfaceTransformation (SurfaceElementIndex elnr, int n, const T * xi, size_t sxi, T * x, size_t sx, T * dxdxi, size_t sdxdxi); void CalcMultiPointElementTransformation (Array< Point<3> > * xi, ElementIndex elnr, Array< Point<3> > * x, Array< Mat<3,3> > * dxdxi); template void CalcMultiPointElementTransformation (ElementIndex elnr, int n, const T * xi, size_t sxi, T * x, size_t sx, T * dxdxi, size_t sdxdxi); private: template void CalcSegmentTransformation (T xi, SegmentIndex segnr, Point<3,T> * x = NULL, Vec<3,T> * dxdxi = NULL, bool * curved = NULL); void CalcSurfaceTransformation (Point<2> xi, SurfaceElementIndex elnr, Point<3> * x = NULL, Mat<3,2> * dxdxi = NULL, bool * curved = NULL); void CalcElementTransformation (Point<3> xi, ElementIndex elnr, Point<3> * x = NULL, Mat<3,3> * dxdxi = NULL, // bool * curved = NULL, void * buffer = NULL, bool valid = 0); class SegmentInfo { public: SegmentIndex elnr; int order; int nv; int ndof; int edgenr; }; template void CalcElementShapes (SegmentInfo & elnr, T xi, TFlatVector shapes) const; void GetCoefficients (SegmentInfo & elnr, Array > & coefs) const; template void CalcElementDShapes (SegmentInfo & elnr, T xi, TFlatVector dshapes) const; class ElementInfo { public: ElementIndex elnr; int order; int nv; int ndof; int nedges; int nfaces; int edgenrs[12]; int facenrs[6]; Mat<3> hdxdxi; Vec<3> hcoefs[10]; // enough for second order tets }; template void CalcElementShapes (ElementInfo & info, Point<3,T> xi, TFlatVector shapes) const; void GetCoefficients (ElementInfo & info, Vec<3> * coefs) const; template void CalcElementDShapes (ElementInfo & info, const Point<3,T> xi, MatrixFixWidth<3,T> dshapes) const; template bool EvaluateMapping (ElementInfo & info, const Point<3,T> xi, Point<3,T> & x, Mat<3,3,T> & jac) const; class SurfaceElementInfo { public: SurfaceElementIndex elnr; int order; int nv; int ndof; ArrayMem edgenrs; int facenr; }; template void CalcElementShapes (SurfaceElementInfo & elinfo, const Point<2,T> xi, TFlatVector shapes) const; template void GetCoefficients (SurfaceElementInfo & elinfo, Array > & coefs) const; template void CalcElementDShapes (SurfaceElementInfo & elinfo, const Point<2,T> xi, MatrixFixWidth<2,T> dshapes) const; template bool EvaluateMapping (SurfaceElementInfo & info, const Point<2,T> xi, Point & x, Mat & jac) const; }; #endif netgen-6.2.1804/libsrc/meshing/hpref_quad.hpp0000644000175000017500000007554513272137567017564 0ustar kurtkurt// HP_QUAD int refquad_splitedges[][3] = { { 0, 0, 0 } }; HPREF_ELEMENT_TYPE refquad_newelstypes[] = { HP_QUAD, HP_NONE, }; int refquad_newels[][8] = { { 1, 2, 3, 4 }, }; HPRef_Struct refquad = { HP_QUAD, refquad_splitedges, 0, 0, refquad_newelstypes, refquad_newels }; // HP_QUAD_SINGCORNER int refquad_singcorner_splitedges[][3] = { { 1, 2, 5 }, { 1, 4, 6 }, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE refquad_singcorner_newelstypes[] = { HP_TRIG_SINGCORNER, HP_QUAD, HP_TRIG, HP_NONE, }; int refquad_singcorner_newels[][8] = { { 1, 5, 6 }, { 2, 4, 6, 5 }, { 2, 3, 4 }, }; HPRef_Struct refquad_singcorner = { HP_QUAD, refquad_singcorner_splitedges, 0, 0, refquad_singcorner_newelstypes, refquad_singcorner_newels }; // HP_DUMMY_QUAD_SINGCORNER int refdummyquad_singcorner_splitedges[][3] = { { 0, 0, 0 } }; HPREF_ELEMENT_TYPE refdummyquad_singcorner_newelstypes[] = { HP_TRIG_SINGCORNER, HP_TRIG, HP_NONE, }; int refdummyquad_singcorner_newels[][8] = { { 1, 2, 4 }, { 4, 2, 3 }, }; HPRef_Struct refdummyquad_singcorner = { HP_QUAD, refdummyquad_singcorner_splitedges, 0, 0, refdummyquad_singcorner_newelstypes, refdummyquad_singcorner_newels }; // HP_QUAD_SINGEDGE int refquad_singedge_splitedges[][3] = { { 1, 4, 5 }, { 2, 3, 6 }, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE refquad_singedge_newelstypes[] = { HP_QUAD_SINGEDGE, HP_QUAD, HP_NONE, }; int refquad_singedge_newels[][8] = { { 1, 2, 6, 5 }, { 5, 6, 3, 4 }, }; HPRef_Struct refquad_singedge = { HP_QUAD, refquad_singedge_splitedges, 0, 0, refquad_singedge_newelstypes, refquad_singedge_newels }; // HP_QUAD_0E_2VA int refquad_0e_2va_splitedges[][3] = { { 1, 2, 5 }, { 1, 4, 6 }, { 2, 1, 7 }, { 2, 3, 8 }, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE refquad_0e_2va_newelstypes[] = { HP_TRIG_SINGCORNER, HP_TRIG_SINGCORNER, HP_QUAD, HP_QUAD, HP_NONE, }; int refquad_0e_2va_newels[][8] = { { 1, 5, 6 }, { 2, 8, 7 }, { 5, 7, 8, 6 }, { 6, 8, 3, 4 }, }; HPRef_Struct refquad_0e_2va = { HP_QUAD, refquad_0e_2va_splitedges, 0, 0, refquad_0e_2va_newelstypes, refquad_0e_2va_newels }; // HP_QUAD_0E_2VB int refquad_0e_2vb_splitedges[][3] = { { 1, 2, 5 }, { 1, 4, 6 }, { 3, 4, 7 }, { 3, 2, 8 }, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE refquad_0e_2vb_newelstypes[] = { HP_TRIG_SINGCORNER, HP_TRIG_SINGCORNER, HP_QUAD, HP_QUAD, HP_NONE, }; int refquad_0e_2vb_newels[][8] = { { 1, 5, 6 }, { 3, 7, 8 }, { 5, 2, 4, 6 }, { 2, 8, 7, 4 }, }; HPRef_Struct refquad_0e_2vb = { HP_QUAD, refquad_0e_2vb_splitedges, 0, 0, refquad_0e_2vb_newelstypes, refquad_0e_2vb_newels }; // HP_QUAD_0E_3V int refquad_0e_3v_splitedges[][3] = { { 1, 2, 5 }, { 1, 4, 6 }, { 2, 1, 7 }, { 2, 3, 8 }, { 3, 2, 9 }, { 3, 4, 10 }, { 0, 0, 0 } }; int refquad_0e_3v_splitfaces[][4] = { { 2, 3, 1, 14 }, { 0, 0, 0, 0 }, }; HPREF_ELEMENT_TYPE refquad_0e_3v_newelstypes[] = { HP_TRIG_SINGCORNER, HP_DUMMY_QUAD_SINGCORNER, HP_TRIG_SINGCORNER, HP_QUAD, HP_QUAD, HP_QUAD, HP_NONE, }; int refquad_0e_3v_newels[][8] = { { 1, 5, 6 }, { 2, 8, 14, 7 }, { 3, 10, 9 }, { 5, 7, 14, 6 }, { 8, 9, 10, 14 }, { 6, 14, 10, 4 }, }; HPRef_Struct refquad_0e_3v = { HP_QUAD, refquad_0e_3v_splitedges, refquad_0e_3v_splitfaces, 0, refquad_0e_3v_newelstypes, refquad_0e_3v_newels }; // HP_QUAD_0E_4V int refquad_0e_4v_splitedges[][3] = { { 1, 2, 5 }, { 1, 4, 6 }, { 2, 1, 7 }, { 2, 3, 8 }, { 3, 2, 9 }, { 3, 4, 10 }, { 4, 1, 11 }, { 4, 3, 12 }, { 0, 0, 0 } }; int refquad_0e_4v_splitfaces[][4] = { { 1, 2, 4, 13 }, { 2, 3, 1, 14 }, { 3, 4, 2, 15 }, { 4, 1, 3, 16 }, { 0, 0, 0, 0 }, }; HPREF_ELEMENT_TYPE refquad_0e_4v_newelstypes[] = { HP_DUMMY_QUAD_SINGCORNER, HP_DUMMY_QUAD_SINGCORNER, HP_DUMMY_QUAD_SINGCORNER, HP_DUMMY_QUAD_SINGCORNER, HP_QUAD, HP_QUAD, HP_QUAD, HP_QUAD, HP_QUAD, HP_NONE, }; int refquad_0e_4v_newels[][8] = { { 1, 5, 13, 6 }, { 2, 8, 14, 7 }, { 3, 10, 15, 9 }, { 4, 11, 16, 12 }, { 5, 7, 14, 13 }, { 8, 9, 15, 14 }, { 10, 12, 16, 15 }, { 11, 6, 13, 16 }, { 13, 14, 15, 16 } }; HPRef_Struct refquad_0e_4v = { HP_QUAD, refquad_0e_4v_splitedges, refquad_0e_4v_splitfaces, 0, refquad_0e_4v_newelstypes, refquad_0e_4v_newels }; // HP_QUAD_1E_1VA int refquad_1e_1va_splitedges[][3] = { { 1, 4, 5 }, { 2, 3, 6 }, { 1, 2, 7 }, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE refquad_1e_1va_newelstypes[] = { HP_QUAD_SINGEDGE, HP_QUAD, HP_TRIG_SINGEDGECORNER1, HP_NONE, }; int refquad_1e_1va_newels[][8] = { { 7, 2, 6, 5 }, { 5, 6, 3, 4 }, { 1, 7, 5 }, }; HPRef_Struct refquad_1e_1va = { HP_QUAD, refquad_1e_1va_splitedges, 0, 0, refquad_1e_1va_newelstypes, refquad_1e_1va_newels }; // HP_QUAD_1E_1VB int refquad_1e_1vb_splitedges[][3] = { { 1, 4, 5 }, { 2, 3, 6 }, { 2, 1, 7 }, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE refquad_1e_1vb_newelstypes[] = { HP_QUAD_SINGEDGE, HP_QUAD, HP_TRIG_SINGEDGECORNER2, HP_NONE, }; int refquad_1e_1vb_newels[][8] = { { 1, 7, 6, 5 }, { 5, 6, 3, 4 }, { 7, 2, 6 }, }; HPRef_Struct refquad_1e_1vb = { HP_QUAD, refquad_1e_1vb_splitedges, 0, 0, refquad_1e_1vb_newelstypes, refquad_1e_1vb_newels }; // HP_QUAD_1E_1VC int refquad_1e_1vc_splitedges[][3] = { { 1, 4, 5 }, { 2, 3, 6 }, { 3, 2, 7 }, { 3, 4, 8 }, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE refquad_1e_1vc_newelstypes[] = { HP_QUAD_SINGEDGE, HP_TRIG, HP_QUAD, HP_TRIG_SINGCORNER, HP_NONE, }; int refquad_1e_1vc_newels[][8] = { { 1, 2, 6, 5 }, { 5, 6, 4 }, { 4, 6, 7, 8 }, { 3, 8, 7 } }; HPRef_Struct refquad_1e_1vc = { HP_QUAD, refquad_1e_1vc_splitedges, 0, 0, refquad_1e_1vc_newelstypes, refquad_1e_1vc_newels }; // HP_QUAD_1E_1VD int refquad_1e_1vd_splitedges[][3] = { { 1, 4, 5 }, { 2, 3, 6 }, { 4, 1, 7 }, { 4, 3, 8 }, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE refquad_1e_1vd_newelstypes[] = { HP_QUAD_SINGEDGE, HP_TRIG, HP_QUAD, HP_TRIG_SINGCORNER, HP_NONE, }; int refquad_1e_1vd_newels[][8] = { { 1, 2, 6, 5 }, { 5, 6, 3 }, { 5, 3, 8, 7 }, { 4, 7, 8 } }; HPRef_Struct refquad_1e_1vd = { HP_QUAD, refquad_1e_1vd_splitedges, 0, 0, refquad_1e_1vd_newelstypes, refquad_1e_1vd_newels }; // HP_QUAD_1E_2VA int refquad_1e_2va_splitedges[][3] = { { 1, 4, 5 }, { 2, 3, 6 }, { 1, 2, 7 }, { 2, 1, 8 }, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE refquad_1e_2va_newelstypes[] = { HP_QUAD_SINGEDGE, HP_QUAD, HP_TRIG_SINGEDGECORNER1, HP_TRIG_SINGEDGECORNER2, HP_NONE, }; int refquad_1e_2va_newels[][8] = { { 7, 8, 6, 5 }, { 5, 6, 3, 4 }, { 1, 7, 5 }, { 8, 2, 6 } }; HPRef_Struct refquad_1e_2va = { HP_QUAD, refquad_1e_2va_splitedges, 0, 0, refquad_1e_2va_newelstypes, refquad_1e_2va_newels }; // HP_QUAD_1E_2VB int refquad_1e_2vb_splitedges[][3] = { { 1, 4, 5 }, { 2, 3, 6 }, { 1, 2, 7 }, { 3, 2, 8 }, { 3, 4, 9 }, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE refquad_1e_2vb_newelstypes[] = { HP_QUAD_SINGEDGE, HP_TRIG_SINGEDGECORNER1, HP_TRIG, HP_QUAD, HP_TRIG_SINGCORNER, HP_NONE, }; int refquad_1e_2vb_newels[][8] = { { 7, 2, 6, 5 }, { 1, 7, 5 }, { 5, 6, 4 }, { 4, 6, 8, 9 }, { 3, 9, 8 } }; HPRef_Struct refquad_1e_2vb = { HP_QUAD, refquad_1e_2vb_splitedges, 0, 0, refquad_1e_2vb_newelstypes, refquad_1e_2vb_newels }; // HP_QUAD_1E_2VC int refquad_1e_2vc_splitedges[][3] = { { 1, 4, 5 }, { 2, 3, 6 }, { 1, 2, 7 }, { 4, 1, 8 }, { 4, 3, 9 }, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE refquad_1e_2vc_newelstypes[] = { HP_QUAD_SINGEDGE, HP_TRIG_SINGEDGECORNER1, HP_TRIG, HP_QUAD, HP_TRIG_SINGCORNER, HP_NONE, }; int refquad_1e_2vc_newels[][8] = { { 7, 2, 6, 5 }, { 1, 7, 5 }, { 5, 6, 3 }, { 5, 3, 9, 8 }, { 4, 8, 9 } }; HPRef_Struct refquad_1e_2vc = { HP_QUAD, refquad_1e_2vc_splitedges, 0, 0, refquad_1e_2vc_newelstypes, refquad_1e_2vc_newels }; // HP_QUAD_1E_2VD int refquad_1e_2vd_splitedges[][3] = { { 1, 4, 5 }, { 2, 3, 6 }, { 2, 1, 7 }, { 3, 2, 8 }, { 3, 4, 9 }, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE refquad_1e_2vd_newelstypes[] = { HP_QUAD_SINGEDGE, HP_TRIG_SINGEDGECORNER2, HP_TRIG, HP_QUAD, HP_TRIG_SINGCORNER, HP_NONE, }; int refquad_1e_2vd_newels[][8] = { { 1, 7, 6, 5 }, { 7, 2, 6 }, { 5, 6, 4 }, { 4, 6, 8, 9 }, { 3, 9, 8 } }; HPRef_Struct refquad_1e_2vd = { HP_QUAD, refquad_1e_2vd_splitedges, 0, 0, refquad_1e_2vd_newelstypes, refquad_1e_2vd_newels }; // HP_QUAD_1E_2VE int refquad_1e_2ve_splitedges[][3] = { { 1, 4, 5 }, { 2, 3, 6 }, { 2, 1, 7 }, { 4, 1, 8 }, { 4, 3, 9 }, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE refquad_1e_2ve_newelstypes[] = { HP_QUAD_SINGEDGE, HP_TRIG_SINGEDGECORNER2, HP_TRIG, HP_QUAD, HP_TRIG_SINGCORNER, HP_NONE, }; int refquad_1e_2ve_newels[][8] = { { 1, 7, 6, 5 }, { 7, 2, 6 }, { 5, 6, 3 }, { 5, 3, 9, 8 }, { 4, 8, 9 } }; HPRef_Struct refquad_1e_2ve = { HP_QUAD, refquad_1e_2ve_splitedges, 0, 0, refquad_1e_2ve_newelstypes, refquad_1e_2ve_newels }; // HP_QUAD_1E_2VF int refquad_1e_2vf_splitedges[][3] = { { 1, 4, 5 }, { 2, 3, 6 }, { 4, 1, 7 }, { 4, 3, 8 }, { 3, 2, 9 }, { 3, 4, 10 }, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE refquad_1e_2vf_newelstypes[] = { HP_QUAD_SINGEDGE, HP_QUAD, HP_QUAD, HP_TRIG_SINGCORNER, HP_TRIG_SINGCORNER, HP_NONE, }; int refquad_1e_2vf_newels[][8] = { { 1, 2, 6, 5 }, { 5, 6, 9, 7 }, { 7, 9, 10, 8 }, { 4, 7, 8 }, { 3, 10, 9 }, }; HPRef_Struct refquad_1e_2vf = { HP_QUAD, refquad_1e_2vf_splitedges, 0, 0, refquad_1e_2vf_newelstypes, refquad_1e_2vf_newels }; // HP_QUAD_1E_3VA int refquad_1e_3va_splitedges[][3] = { { 1, 4, 5 }, { 2, 3, 6 }, { 1, 2, 7 }, { 2, 1, 8 }, { 3, 2, 9 }, { 3, 4, 10 }, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE refquad_1e_3va_newelstypes[] = { HP_TRIG_SINGEDGECORNER1, HP_TRIG_SINGEDGECORNER2, HP_TRIG_SINGCORNER, HP_QUAD_SINGEDGE, HP_QUAD, HP_TRIG, HP_NONE, }; int refquad_1e_3va_newels[][8] = { { 1, 7, 5 }, { 8, 2, 6 }, { 3, 10, 9 }, { 7, 8, 6, 5 }, { 4, 6, 9, 10 }, { 5, 6, 4 } }; HPRef_Struct refquad_1e_3va = { HP_QUAD, refquad_1e_3va_splitedges, 0, 0, refquad_1e_3va_newelstypes, refquad_1e_3va_newels }; // HP_QUAD_1E_3VB int refquad_1e_3vb_splitedges[][3] = { { 1, 4, 5 }, { 2, 3, 6 }, { 1, 2, 7 }, { 2, 1, 8 }, { 4, 1, 9 }, { 4, 3, 10 }, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE refquad_1e_3vb_newelstypes[] = { HP_TRIG_SINGEDGECORNER1, HP_TRIG_SINGEDGECORNER2, HP_TRIG_SINGCORNER, HP_QUAD_SINGEDGE, HP_QUAD, HP_TRIG, HP_NONE, }; int refquad_1e_3vb_newels[][8] = { { 1, 7, 5 }, { 8, 2, 6 }, { 4, 9, 10 }, { 7, 8, 6, 5 }, { 5, 3, 10, 9 }, { 5, 6, 3 } }; HPRef_Struct refquad_1e_3vb = { HP_QUAD, refquad_1e_3vb_splitedges, 0, 0, refquad_1e_3vb_newelstypes, refquad_1e_3vb_newels }; // HP_QUAD_1E_3VC int refquad_1e_3vc_splitedges[][3] = { { 1, 4, 5 }, { 2, 3, 6 }, { 1, 2, 7 }, { 3, 2, 8 }, { 3, 4, 9 }, { 4, 3, 10 }, { 4, 1, 11 }, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE refquad_1e_3vc_newelstypes[] = { HP_TRIG_SINGEDGECORNER1, HP_TRIG_SINGCORNER, HP_TRIG_SINGCORNER, HP_QUAD_SINGEDGE, HP_QUAD, HP_QUAD, HP_NONE, }; int refquad_1e_3vc_newels[][8] = { { 1, 7, 5 }, { 3, 9, 8 }, { 4, 11, 10 }, { 7, 2, 6, 5 }, { 5, 6, 8, 11 }, { 11, 8, 9, 10 } }; HPRef_Struct refquad_1e_3vc = { HP_QUAD, refquad_1e_3vc_splitedges, 0, 0, refquad_1e_3vc_newelstypes, refquad_1e_3vc_newels }; // HP_QUAD_1E_3VD int refquad_1e_3vd_splitedges[][3] = { { 1, 4, 5 }, { 2, 3, 6 }, { 2, 1, 7 }, { 3, 2, 8 }, { 3, 4, 9 }, { 4, 3, 10 }, { 4, 1, 11 }, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE refquad_1e_3vd_newelstypes[] = { HP_TRIG_SINGEDGECORNER2, HP_TRIG_SINGCORNER, HP_TRIG_SINGCORNER, HP_QUAD_SINGEDGE, HP_QUAD, HP_QUAD, HP_NONE, }; int refquad_1e_3vd_newels[][8] = { { 7, 2, 6 }, { 3, 9, 8 }, { 4, 11, 10 }, { 1, 7, 6, 5 }, { 5, 6, 8, 11 }, { 11, 8, 9, 10 } }; HPRef_Struct refquad_1e_3vd = { HP_QUAD, refquad_1e_3vd_splitedges, 0, 0, refquad_1e_3vd_newelstypes, refquad_1e_3vd_newels }; // HP_QUAD_1E_4V int refquad_1e_4v_splitedges[][3] = { { 1, 4, 5 }, { 2, 3, 6 }, { 1, 2, 7 }, { 2, 1, 8 }, { 4, 1, 9 }, { 3, 2, 10 }, { 4, 3, 11 }, { 3, 4, 12 }, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE refquad_1e_4v_newelstypes[] = { HP_TRIG_SINGEDGECORNER1, HP_TRIG_SINGEDGECORNER2, HP_TRIG_SINGCORNER, HP_TRIG_SINGCORNER, HP_QUAD_SINGEDGE, HP_QUAD, HP_QUAD, HP_NONE, }; int refquad_1e_4v_newels[][8] = { { 1, 7, 5 }, { 8, 2, 6 }, { 3, 12, 10 }, { 4, 9, 11 }, { 7, 8, 6, 5 }, { 5, 6, 10, 9 }, { 9, 10, 12, 11 } }; HPRef_Struct refquad_1e_4v = { HP_QUAD, refquad_1e_4v_splitedges, 0, 0, refquad_1e_4v_newelstypes, refquad_1e_4v_newels }; //////////////////////////////////////////////////////////////////////////////// // HP_QUAD_2E int refquad_2e_splitedges[][3] = { { 1, 2, 5 }, { 1, 4, 6 }, { 2, 3, 7 }, { 4, 3, 8 }, { 0, 0, 0 } }; int refquad_2e_splitfaces[][4] = { { 1, 2, 4, 9 }, { 0, 0, 0, 0 }, }; /* HPREF_ELEMENT_TYPE refquad_2e_newelstypes[] = { HP_TRIG_SINGEDGECORNER1, HP_TRIG_SINGEDGECORNER2, HP_QUAD_SINGEDGE, HP_QUAD_SINGEDGE, HP_QUAD, HP_NONE, }; int refquad_2e_newels[][8] = { { 1, 5, 9 }, { 6, 1, 9 }, { 5, 2, 7, 9 }, { 4, 6, 9, 8 }, { 9, 7, 3, 8 }, }; */ // SZ refine to 4 quads HPREF_ELEMENT_TYPE refquad_2e_newelstypes[] = { HP_QUAD_2E, HP_QUAD_SINGEDGE, HP_QUAD_SINGEDGE, HP_QUAD, HP_NONE, }; int refquad_2e_newels[][8] = { { 1, 5, 9, 6 }, { 5, 2, 7, 9 }, { 4, 6, 9, 8 }, { 9, 7, 3, 8 }, }; HPRef_Struct refquad_2e = { HP_QUAD, refquad_2e_splitedges, refquad_2e_splitfaces, 0, refquad_2e_newelstypes, refquad_2e_newels }; // HP_QUAD_2E_1VA int refquad_2e_1va_splitedges[][3] = { { 1, 2, 5 }, { 1, 4, 6 }, { 2, 3, 7 }, { 4, 3, 8 }, { 2, 1, 10 }, { 0, 0, 0 } }; int refquad_2e_1va_splitfaces[][4] = { { 1, 2, 4, 9 }, { 0, 0, 0, 0 }, }; /* HPREF_ELEMENT_TYPE refquad_2e_1va_newelstypes[] = { HP_TRIG_SINGEDGECORNER1, HP_TRIG_SINGEDGECORNER2, HP_QUAD_SINGEDGE, HP_QUAD_SINGEDGE, HP_QUAD, HP_TRIG_SINGEDGECORNER2, HP_NONE, }; int refquad_2e_1va_newels[][8] = { { 1, 5, 9 }, { 6, 1, 9 }, { 5, 10, 7, 9 }, { 4, 6, 9, 8 }, { 9, 7, 3, 8 }, { 10, 2, 7 }, }; */ // SZ Quad_2e refinement HPREF_ELEMENT_TYPE refquad_2e_1va_newelstypes[] = { HP_QUAD_2E, HP_QUAD_SINGEDGE, HP_QUAD_SINGEDGE, HP_QUAD, HP_TRIG_SINGEDGECORNER2, HP_NONE, }; int refquad_2e_1va_newels[][8] = { { 1, 5, 9, 6 }, { 5, 10, 7, 9 }, { 4, 6, 9, 8 }, { 9, 7, 3, 8 }, { 10, 2, 7 }, }; HPRef_Struct refquad_2e_1va = { HP_QUAD, refquad_2e_1va_splitedges, refquad_2e_1va_splitfaces, 0, refquad_2e_1va_newelstypes, refquad_2e_1va_newels }; // HP_QUAD_2E_1VB int refquad_2e_1vb_splitedges[][3] = { { 1, 2, 5 }, { 1, 4, 6 }, { 2, 3, 7 }, { 4, 3, 8 }, { 3, 2, 10 }, { 3, 4, 11 }, { 0, 0, 0 } }; int refquad_2e_1vb_splitfaces[][4] = { { 1, 2, 4, 9 }, { 0, 0, 0, 0 }, }; HPREF_ELEMENT_TYPE refquad_2e_1vb_newelstypes[] = { // HP_TRIG_SINGEDGECORNER1, // HP_TRIG_SINGEDGECORNER2, // SZ QUAD_2E HP_QUAD_2E, HP_QUAD_SINGEDGE, HP_QUAD_SINGEDGE, HP_TRIG, HP_QUAD, HP_TRIG_SINGCORNER, HP_NONE, }; int refquad_2e_1vb_newels[][8] = { //{ 1, 5, 9 }, //{ 6, 1, 9 }, { 1, 5, 9, 6 }, { 5, 2, 7, 9 }, { 4, 6, 9, 8 }, { 7, 8, 9 }, { 8, 7, 10, 11 }, { 3, 11, 10 } }; HPRef_Struct refquad_2e_1vb = { HP_QUAD, refquad_2e_1vb_splitedges, refquad_2e_1vb_splitfaces, 0, refquad_2e_1vb_newelstypes, refquad_2e_1vb_newels } ; // HP_QUAD_2E_1VC int refquad_2e_1vc_splitedges[][3] = { { 1, 2, 5 }, { 1, 4, 6 }, { 2, 3, 7 }, { 4, 1, 8 }, { 4, 3, 9 }, { 0, 0, 0 } }; int refquad_2e_1vc_splitfaces[][4] = { { 1, 2, 4, 10 }, { 0, 0, 0, 0 }, }; HPREF_ELEMENT_TYPE refquad_2e_1vc_newelstypes[] = { // HP_TRIG_SINGEDGECORNER1, // HP_TRIG_SINGEDGECORNER2, HP_QUAD_2E, HP_TRIG_SINGEDGECORNER1, HP_QUAD_SINGEDGE, HP_QUAD_SINGEDGE, HP_QUAD, HP_NONE, }; int refquad_2e_1vc_newels[][8] = { //{ 1, 5, 10 }, //{ 6, 1, 10 }, { 1, 5, 10, 6}, { 4, 8, 9 }, { 5, 2, 7, 10 }, { 8, 6, 10, 9 }, { 10, 7, 3, 9 }, }; HPRef_Struct refquad_2e_1vc = { HP_QUAD, refquad_2e_1vc_splitedges, refquad_2e_1vc_splitfaces, 0, refquad_2e_1vc_newelstypes, refquad_2e_1vc_newels }; // HP_QUAD_2E_2VA int refquad_2e_2va_splitedges[][3] = { { 1, 2, 5 }, { 1, 4, 6 }, { 2, 3, 7 }, { 4, 3, 8 }, { 3, 2, 10 }, { 3, 4, 11 }, { 2, 1, 12 }, { 0, 0, 0 } }; int refquad_2e_2va_splitfaces[][4] = { { 1, 2, 4, 9 }, { 0, 0, 0, 0 }, }; HPREF_ELEMENT_TYPE refquad_2e_2va_newelstypes[] = { //HP_TRIG_SINGEDGECORNER1, //HP_TRIG_SINGEDGECORNER2, HP_QUAD_2E, HP_QUAD_SINGEDGE, HP_QUAD_SINGEDGE, HP_TRIG, HP_QUAD, HP_TRIG_SINGCORNER, HP_TRIG_SINGEDGECORNER2, HP_NONE, }; int refquad_2e_2va_newels[][8] = { // { 1, 5, 9 }, // { 6, 1, 9 }, { 1, 5, 9, 6 }, { 5, 12, 7, 9 }, { 4, 6, 9, 8 }, { 7, 8, 9 }, { 8, 7, 10, 11 }, { 3, 11, 10 }, { 12, 2, 7 } }; HPRef_Struct refquad_2e_2va = { HP_QUAD, refquad_2e_2va_splitedges, refquad_2e_2va_splitfaces, 0, refquad_2e_2va_newelstypes, refquad_2e_2va_newels }; // HP_QUAD_2E_2VB int refquad_2e_2vb_splitedges[][3] = { { 1, 2, 5 }, { 1, 4, 6 }, { 2, 1, 7 }, { 2, 3, 8 }, { 4, 1, 9 }, { 4, 3, 10 }, { 0, 0, 0 } }; int refquad_2e_2vb_splitfaces[][4] = { { 1, 2, 4, 11 }, { 0, 0, 0, 0 }, }; HPREF_ELEMENT_TYPE refquad_2e_2vb_newelstypes[] = { // HP_TRIG_SINGEDGECORNER1, // HP_TRIG_SINGEDGECORNER2, HP_QUAD_2E, HP_TRIG_SINGEDGECORNER1, HP_TRIG_SINGEDGECORNER2, HP_QUAD_SINGEDGE, HP_QUAD_SINGEDGE, HP_QUAD, HP_NONE, }; int refquad_2e_2vb_newels[][8] = { //{ 1, 5, 11 }, //{ 6, 1, 11 }, { 1, 5, 11, 6 }, { 4, 9, 10 }, { 7, 2, 8 }, { 5, 7, 8, 11 }, { 9, 6, 11, 10 }, { 3, 10, 11, 8 }, }; HPRef_Struct refquad_2e_2vb = { HP_QUAD, refquad_2e_2vb_splitedges, refquad_2e_2vb_splitfaces, 0, refquad_2e_2vb_newelstypes, refquad_2e_2vb_newels }; // HP_QUAD_2E_2VC int refquad_2e_2vc_splitedges[][3] = { { 1, 2, 5 }, { 1, 4, 6 }, { 2, 3, 7 }, { 4, 3, 8 }, { 3, 2, 10 }, { 3, 4, 11 }, { 4, 1, 12 }, { 0, 0, 0 } }; int refquad_2e_2vc_splitfaces[][4] = { { 1, 2, 4, 9 }, { 0, 0, 0, 0 }, }; HPREF_ELEMENT_TYPE refquad_2e_2vc_newelstypes[] = { // HP_TRIG_SINGEDGECORNER1, // HP_TRIG_SINGEDGECORNER2, HP_QUAD_2E, HP_QUAD_SINGEDGE, HP_QUAD_SINGEDGE, HP_TRIG, HP_QUAD, HP_TRIG_SINGCORNER, HP_TRIG_SINGEDGECORNER1, //SZ (vorher: SINGEDGECORNER2) HP_NONE, }; int refquad_2e_2vc_newels[][8] = { { 1, 5, 9 }, { 6, 1, 9 }, { 5, 2, 7, 9 }, { 12, 6, 9, 8 }, { 7, 8, 9 }, { 8, 7, 10, 11 }, { 3, 11, 10 }, { 4, 12, 8 } }; HPRef_Struct refquad_2e_2vc = { HP_QUAD, refquad_2e_2vc_splitedges, refquad_2e_2vc_splitfaces, 0, refquad_2e_2vc_newelstypes, refquad_2e_2vc_newels }; // HP_QUAD_2E_3V int refquad_2e_3v_splitedges[][3] = { { 1, 2, 5 }, { 1, 4, 6 }, { 2, 3, 7 }, { 4, 3, 8 }, { 3, 2, 10 }, { 3, 4, 11 }, { 2, 1, 12 }, { 4, 1, 13 }, { 0, 0, 0 } }; int refquad_2e_3v_splitfaces[][4] = { { 1, 2, 4, 9 }, { 0, 0, 0, 0 }, }; HPREF_ELEMENT_TYPE refquad_2e_3v_newelstypes[] = { // HP_TRIG_SINGEDGECORNER1, // HP_TRIG_SINGEDGECORNER2, HP_QUAD_2E, HP_QUAD_SINGEDGE, HP_QUAD_SINGEDGE, HP_TRIG, HP_QUAD, HP_TRIG_SINGCORNER, HP_TRIG_SINGEDGECORNER2, HP_TRIG_SINGEDGECORNER1, HP_NONE, }; int refquad_2e_3v_newels[][8] = { //{ 1, 5, 9 }, //{ 6, 1, 9 }, { 1, 5, 9, 6 }, { 5, 12, 7, 9 }, { 13, 6, 9, 8 }, { 7, 8, 9 }, { 8, 7, 10, 11 }, { 3, 11, 10 }, { 12, 2, 7 }, { 4, 13, 8 } }; HPRef_Struct refquad_2e_3v = { HP_QUAD, refquad_2e_3v_splitedges, refquad_2e_3v_splitfaces, 0, refquad_2e_3v_newelstypes, refquad_2e_3v_newels }; // HP_QUAD_2EB_0V int refquad_2eb_0v_splitedges[][3] = { { 1, 4, 5 }, { 2, 3, 6 }, { 3, 2, 7 }, { 4, 1, 8 }, { 0, 0, 0 } }; int refquad_2eb_0v_splitfaces[][4] = { { 0, 0, 0, 0 }, }; HPREF_ELEMENT_TYPE refquad_2eb_0v_newelstypes[] = { HP_QUAD_SINGEDGE, HP_QUAD_SINGEDGE, HP_QUAD, HP_NONE, }; int refquad_2eb_0v_newels[][8] = { { 1, 2, 6, 5 }, { 3, 4, 8, 7 }, { 5, 6, 7, 8 } }; HPRef_Struct refquad_2eb_0v = { HP_QUAD, refquad_2eb_0v_splitedges, refquad_2eb_0v_splitfaces, 0, refquad_2eb_0v_newelstypes, refquad_2eb_0v_newels }; // HP_QUAD_2EB_1VA int refquad_2eb_1va_splitedges[][3] = { { 1, 4, 5 }, { 2, 3, 6 }, { 3, 2, 7 }, { 4, 1, 8 }, { 1, 2, 9 }, { 0, 0, 0 } }; int refquad_2eb_1va_splitfaces[][4] = { { 0, 0, 0, 0 }, }; HPREF_ELEMENT_TYPE refquad_2eb_1va_newelstypes[] = { HP_QUAD_SINGEDGE, HP_QUAD_SINGEDGE, HP_TRIG_SINGEDGECORNER1, HP_QUAD, HP_NONE, }; int refquad_2eb_1va_newels[][8] = { { 9, 2, 6, 5 }, { 3, 4, 8, 7 }, { 1, 9, 5 }, { 5, 6, 7, 8 } }; HPRef_Struct refquad_2eb_1va = { HP_QUAD, refquad_2eb_1va_splitedges, refquad_2eb_1va_splitfaces, 0, refquad_2eb_1va_newelstypes, refquad_2eb_1va_newels }; // HP_QUAD_2EB_1VB int refquad_2eb_1vb_splitedges[][3] = { { 1, 4, 5 }, { 2, 3, 6 }, { 3, 2, 7 }, { 4, 1, 8 }, { 2, 1, 9 }, { 0, 0, 0 } }; int refquad_2eb_1vb_splitfaces[][4] = { { 0, 0, 0, 0 }, }; HPREF_ELEMENT_TYPE refquad_2eb_1vb_newelstypes[] = { HP_QUAD_SINGEDGE, HP_QUAD_SINGEDGE, HP_TRIG_SINGEDGECORNER2, HP_QUAD, HP_NONE, }; int refquad_2eb_1vb_newels[][8] = { { 1, 9, 6, 5 }, { 3, 4, 8, 7 }, { 9, 2, 6 }, { 5, 6, 7, 8 } }; HPRef_Struct refquad_2eb_1vb = { HP_QUAD, refquad_2eb_1vb_splitedges, refquad_2eb_1vb_splitfaces, 0, refquad_2eb_1vb_newelstypes, refquad_2eb_1vb_newels }; // HP_QUAD_2EB_2VA int refquad_2eb_2va_splitedges[][3] = { { 1, 4, 5 }, { 2, 3, 6 }, { 3, 2, 7 }, { 4, 1, 8 }, { 1, 2, 9 }, { 2, 1, 10 }, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE refquad_2eb_2va_newelstypes[] = { HP_QUAD_SINGEDGE, HP_QUAD_SINGEDGE, HP_TRIG_SINGEDGECORNER1, HP_TRIG_SINGEDGECORNER2, HP_QUAD, HP_NONE, }; int refquad_2eb_2va_newels[][8] = { { 9, 10, 6, 5 }, { 3, 4, 8, 7 }, { 1, 9, 5 }, { 10, 2, 6 }, { 5, 6, 7, 8 } }; HPRef_Struct refquad_2eb_2va = { HP_QUAD, refquad_2eb_2va_splitedges, 0, 0, refquad_2eb_2va_newelstypes, refquad_2eb_2va_newels }; // HP_QUAD_2EB_2VB int refquad_2eb_2vb_splitedges[][3] = { { 1, 4, 5 }, { 2, 3, 6 }, { 3, 2, 7 }, { 4, 1, 8 }, { 1, 2, 9 }, { 3, 4, 10 }, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE refquad_2eb_2vb_newelstypes[] = { HP_QUAD_SINGEDGE, HP_QUAD_SINGEDGE, HP_TRIG_SINGEDGECORNER1, HP_TRIG_SINGEDGECORNER1, HP_QUAD, HP_NONE, }; int refquad_2eb_2vb_newels[][8] = { { 9, 2, 6, 5 }, { 10, 4, 8, 7 }, { 1, 9, 5 }, { 3, 10, 7 }, { 5, 6, 7, 8 } }; HPRef_Struct refquad_2eb_2vb = { HP_QUAD, refquad_2eb_2vb_splitedges, 0, 0, refquad_2eb_2vb_newelstypes, refquad_2eb_2vb_newels }; // HP_QUAD_2EB_2VC int refquad_2eb_2vc_splitedges[][3] = { { 1, 4, 5 }, { 2, 3, 6 }, { 3, 2, 7 }, { 4, 1, 8 }, { 1, 2, 9 }, { 4, 3, 10 }, { 0, 0, 0 } }; int refquad_2eb_2vc_splitfaces[][4] = { { 0, 0, 0, 0 }, }; HPREF_ELEMENT_TYPE refquad_2eb_2vc_newelstypes[] = { HP_QUAD_SINGEDGE, HP_QUAD_SINGEDGE, HP_TRIG_SINGEDGECORNER1, HP_TRIG_SINGEDGECORNER2, HP_QUAD, HP_NONE, }; int refquad_2eb_2vc_newels[][8] = { { 9, 2, 6, 5 }, { 3, 10, 8, 7 }, { 1, 9, 5 }, { 10, 4, 8 }, { 5, 6, 7, 8 } }; HPRef_Struct refquad_2eb_2vc = { HP_QUAD, refquad_2eb_2vc_splitedges, refquad_2eb_2vc_splitfaces, 0, refquad_2eb_2vc_newelstypes, refquad_2eb_2vc_newels }; // HP_QUAD_2EB_2VD int refquad_2eb_2vd_splitedges[][3] = { { 1, 4, 5 }, { 2, 3, 6 }, { 3, 2, 7 }, { 4, 1, 8 }, { 2, 1, 9 }, { 4, 3, 10 }, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE refquad_2eb_2vd_newelstypes[] = { HP_QUAD_SINGEDGE, HP_QUAD_SINGEDGE, HP_TRIG_SINGEDGECORNER2, HP_TRIG_SINGEDGECORNER2, HP_QUAD, HP_NONE, }; int refquad_2eb_2vd_newels[][8] = { { 1, 9, 6, 5 }, { 3, 10, 8, 7 }, { 9, 2, 6 }, { 10, 4, 8 }, { 5, 6, 7, 8 } }; HPRef_Struct refquad_2eb_2vd = { HP_QUAD, refquad_2eb_2vd_splitedges, 0, 0, refquad_2eb_2vd_newelstypes, refquad_2eb_2vd_newels }; // HP_QUAD_2EB_3VA int refquad_2eb_3va_splitedges[][3] = { { 1, 4, 5 }, { 2, 3, 6 }, { 1, 2, 7 }, { 2, 1, 8 }, { 3, 2, 9 }, { 4, 1, 10 }, { 3, 4, 11 }, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE refquad_2eb_3va_newelstypes[] = { HP_TRIG_SINGEDGECORNER1, HP_TRIG_SINGEDGECORNER2, HP_TRIG_SINGEDGECORNER1, HP_QUAD_SINGEDGE, HP_QUAD_SINGEDGE, HP_QUAD, HP_NONE, }; int refquad_2eb_3va_newels[][8] = { { 1, 7, 5 }, { 8, 2, 6 }, { 3, 11, 9}, { 7, 8, 6, 5 }, { 11, 4, 10, 9 }, { 5, 6, 9, 10 } }; HPRef_Struct refquad_2eb_3va = { HP_QUAD, refquad_2eb_3va_splitedges, 0, 0, refquad_2eb_3va_newelstypes, refquad_2eb_3va_newels }; // HP_QUAD_2EB_3VB int refquad_2eb_3vb_splitedges[][3] = { { 1, 4, 5 }, { 2, 3, 6 }, { 1, 2, 7 }, { 2, 1, 8 }, { 3, 2, 9 }, { 4, 1, 10 }, { 4, 3, 11 }, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE refquad_2eb_3vb_newelstypes[] = { HP_TRIG_SINGEDGECORNER1, HP_TRIG_SINGEDGECORNER2, HP_TRIG_SINGEDGECORNER2, HP_QUAD_SINGEDGE, HP_QUAD_SINGEDGE, HP_QUAD, HP_NONE, }; int refquad_2eb_3vb_newels[][8] = { { 1, 7, 5 }, { 8, 2, 6 }, { 11, 4, 10 }, { 7, 8, 6, 5 }, { 3, 11, 10, 9 }, { 5, 6, 9, 10 } }; HPRef_Struct refquad_2eb_3vb = { HP_QUAD, refquad_2eb_3vb_splitedges, 0, 0, refquad_2eb_3vb_newelstypes, refquad_2eb_3vb_newels }; // HP_QUAD_2EB_4V int refquad_2eb_4v_splitedges[][3] = { { 1, 4, 5 }, { 2, 3, 6 }, { 3, 2, 7 }, { 4, 1, 8 }, { 1, 2, 9 }, { 2, 1, 10 }, { 3, 4, 11 }, { 4, 3, 12 }, { 0, 0, 0 } }; int refquad_2eb_4v_splitfaces[][4] = { { 0, 0, 0, 0 }, }; HPREF_ELEMENT_TYPE refquad_2eb_4v_newelstypes[] = { HP_QUAD_SINGEDGE, HP_QUAD_SINGEDGE, HP_QUAD, HP_TRIG_SINGEDGECORNER1, HP_TRIG_SINGEDGECORNER2, HP_TRIG_SINGEDGECORNER1, HP_TRIG_SINGEDGECORNER2, HP_NONE, }; int refquad_2eb_4v_newels[][8] = { { 9, 10, 6, 5 }, { 11, 12, 8, 7 }, { 5, 6, 7, 8 }, { 1, 9, 5 }, { 10, 2, 6 }, { 3, 11, 7 }, { 12, 4, 8 }, }; HPRef_Struct refquad_2eb_4v = { HP_QUAD, refquad_2eb_4v_splitedges, refquad_2eb_4v_splitfaces, 0, refquad_2eb_4v_newelstypes, refquad_2eb_4v_newels }; // HP_QUAD_3E int refquad_3e_splitedges[][3] = { { 1, 2, 5 }, { 1, 4, 6 }, { 2, 1, 7 }, { 2, 3, 8 }, { 3, 4, 10 }, { 4, 3, 12 }, { 0, 0, 0 } }; int refquad_3e_splitfaces[][4] = { { 1, 2, 4, 13 }, { 2, 3, 1, 14 }, { 0, 0, 0, 0 }, }; HPREF_ELEMENT_TYPE refquad_3e_newelstypes[] = { HP_QUAD_2E, HP_QUAD_2E, // HP_TRIG_SINGEDGECORNER1, // HP_TRIG_SINGEDGECORNER2, // HP_TRIG_SINGEDGECORNER2, // HP_TRIG_SINGEDGECORNER1, HP_QUAD_SINGEDGE, HP_QUAD_SINGEDGE, HP_QUAD_SINGEDGE, HP_QUAD, HP_NONE, }; int refquad_3e_newels[][8] = { // { 1, 5, 13 }, // { 6, 1, 13 }, // { 7, 2, 14 }, // { 2, 8, 14 }, { 1, 5, 13, 6 }, { 2, 8, 14, 7 }, { 5, 7, 14, 13 }, { 8, 3, 10, 14 }, { 4, 6, 13, 12 }, { 13, 14, 10, 12 } }; HPRef_Struct refquad_3e = { HP_QUAD, refquad_3e_splitedges, refquad_3e_splitfaces, 0, refquad_3e_newelstypes, refquad_3e_newels }; // HP_QUAD_3E_3VA int refquad_3e_3va_splitedges[][3] = { { 1, 2, 5 }, { 1, 4, 6 }, { 2, 1, 7 }, { 2, 3, 8 }, { 3, 4, 10 }, { 3, 2, 11 }, { 4, 3, 12 }, { 0, 0, 0 } }; int refquad_3e_3va_splitfaces[][4] = { { 1, 2, 4, 13 }, { 2, 3, 1, 14 }, { 0, 0, 0, 0 }, }; HPREF_ELEMENT_TYPE refquad_3e_3va_newelstypes[] = { HP_QUAD_2E, HP_QUAD_2E, // HP_TRIG_SINGEDGECORNER1, // HP_TRIG_SINGEDGECORNER2, // HP_TRIG_SINGEDGECORNER2, // HP_TRIG_SINGEDGECORNER1, HP_TRIG_SINGEDGECORNER2, HP_QUAD_SINGEDGE, HP_QUAD_SINGEDGE, HP_QUAD_SINGEDGE, HP_QUAD, HP_NONE, }; int refquad_3e_3va_newels[][8] = { // { 1, 5, 13 }, // { 6, 1, 13 }, // { 7, 2, 14 }, // { 2, 8, 14 }, { 1, 5, 13, 6 }, { 2, 8, 14, 7 }, { 11, 3, 10 }, { 5, 7, 14, 13 }, { 8, 11, 10, 14 }, { 4, 6, 13, 12 }, { 13, 14, 10, 12 } }; HPRef_Struct refquad_3e_3va = { HP_QUAD, refquad_3e_3va_splitedges, refquad_3e_3va_splitfaces, 0, refquad_3e_3va_newelstypes, refquad_3e_3va_newels }; // HP_QUAD_3E_3VB int refquad_3e_3vb_splitedges[][3] = { { 1, 2, 5 }, { 1, 4, 6 }, { 2, 1, 7 }, { 2, 3, 8 }, { 3, 4, 10 }, { 4, 1, 11 }, { 4, 3, 12 }, { 0, 0, 0 } }; int refquad_3e_3vb_splitfaces[][4] = { { 1, 2, 4, 13 }, { 2, 3, 1, 14 }, { 0, 0, 0, 0 }, }; HPREF_ELEMENT_TYPE refquad_3e_3vb_newelstypes[] = { HP_QUAD_2E, HP_QUAD_2E, // HP_TRIG_SINGEDGECORNER1, // HP_TRIG_SINGEDGECORNER2, // HP_TRIG_SINGEDGECORNER2, // HP_TRIG_SINGEDGECORNER1, HP_TRIG_SINGEDGECORNER1, HP_QUAD_SINGEDGE, HP_QUAD_SINGEDGE, HP_QUAD_SINGEDGE, HP_QUAD, HP_NONE, }; int refquad_3e_3vb_newels[][8] = { // { 1, 5, 13 }, // { 6, 1, 13 }, // { 7, 2, 14 }, // { 2, 8, 14 }, { 1, 5, 13, 6 }, { 2, 8, 14, 7 }, { 4, 11, 12 }, { 5, 7, 14, 13 }, { 8, 3, 10, 14 }, { 11, 6, 13, 12 }, { 13, 14, 10, 12 } }; HPRef_Struct refquad_3e_3vb = { HP_QUAD, refquad_3e_3vb_splitedges, refquad_3e_3vb_splitfaces, 0, refquad_3e_3vb_newelstypes, refquad_3e_3vb_newels }; // HP_QUAD_3E_4V int refquad_3e_4v_splitedges[][3] = { { 1, 2, 5 }, { 1, 4, 6 }, { 2, 1, 7 }, { 2, 3, 8 }, { 3, 4, 10 }, { 3, 2, 11 }, { 4, 3, 12 }, { 4, 1, 15 }, { 0, 0, 0 } }; int refquad_3e_4v_splitfaces[][4] = { { 1, 2, 4, 13 }, { 2, 3, 1, 14 }, { 0, 0, 0, 0 }, }; HPREF_ELEMENT_TYPE refquad_3e_4v_newelstypes[] = { HP_QUAD_2E, HP_QUAD_2E, // HP_TRIG_SINGEDGECORNER1, // HP_TRIG_SINGEDGECORNER2, // HP_TRIG_SINGEDGECORNER2, // HP_TRIG_SINGEDGECORNER1, HP_TRIG_SINGEDGECORNER2, HP_TRIG_SINGEDGECORNER1, HP_QUAD_SINGEDGE, HP_QUAD_SINGEDGE, HP_QUAD_SINGEDGE, HP_QUAD, HP_NONE, }; int refquad_3e_4v_newels[][8] = { // { 1, 5, 13 }, // { 6, 1, 13 }, // { 7, 2, 14 }, // { 2, 8, 14 }, { 1, 5, 13, 6 }, { 2, 8, 14, 7 }, { 11, 3, 10 }, { 4, 15, 12 }, { 5, 7, 14, 13 }, { 8, 11, 10, 14 }, { 15, 6, 13, 12 }, { 13, 14, 10, 12 } }; HPRef_Struct refquad_3e_4v = { HP_QUAD, refquad_3e_4v_splitedges, refquad_3e_4v_splitfaces, 0, refquad_3e_4v_newelstypes, refquad_3e_4v_newels }; // HP_QUAD_4E int refquad_4e_splitedges[][3] = { { 1, 2, 5 }, { 1, 4, 6 }, { 2, 1, 7 }, { 2, 3, 8 }, { 3, 2, 9 }, { 3, 4, 10 }, { 4, 1, 11 }, { 4, 3, 12 }, { 0, 0, 0 } }; int refquad_4e_splitfaces[][4] = { { 1, 2, 4, 13 }, { 2, 3, 1, 14 }, { 3, 4, 2, 15 }, { 4, 1, 3, 16 }, { 0, 0, 0, 0 }, }; HPREF_ELEMENT_TYPE refquad_4e_newelstypes[] = { HP_QUAD_2E, HP_QUAD_2E, HP_QUAD_2E, HP_QUAD_2E, HP_QUAD_SINGEDGE, HP_QUAD_SINGEDGE, HP_QUAD_SINGEDGE, HP_QUAD_SINGEDGE, HP_QUAD, HP_NONE, }; int refquad_4e_newels[][8] = { { 1, 5, 13, 6 }, { 2, 8, 14, 7 }, { 3, 10, 15, 9 }, { 4, 11, 16, 12 }, { 5, 7, 14, 13 }, { 8, 9, 15, 14 }, { 10, 12, 16, 15 }, { 11, 6, 13, 16 }, { 13, 14, 15, 16 } }; HPRef_Struct refquad_4e = { HP_QUAD, refquad_4e_splitedges, refquad_4e_splitfaces, 0, refquad_4e_newelstypes, refquad_4e_newels }; netgen-6.2.1804/libsrc/meshing/prism2rls_2.cpp0000644000175000017500000001544113272137567017604 0ustar kurtkurtnamespace netgen { const char * prismrules2[] = { "tolfak 0.5\n",\ "\n",\ "rule \"prism on quad\"\n",\ "\n",\ "quality 1\n",\ "\n",\ "mappoints\n",\ "(0, 0, 0);\n",\ "(1, 0, 0);\n",\ "(1, 1, 0);\n",\ "(0, 1, 0);\n",\ "(0.5, 0, -0.86);\n",\ "(0.5, 1, -0.86);\n",\ "\n",\ "mapfaces\n",\ "(1, 2, 3, 4) del;\n",\ "(1, 5, 2) del;\n",\ "(4, 3, 6) del;\n",\ "\n",\ "newpoints\n",\ "\n",\ "newfaces\n",\ "(5, 2, 3, 6);\n",\ "(1, 5, 6, 4);\n",\ "\n",\ "elements\n",\ "(1, 5, 2, 4, 6, 3);\n",\ "\n",\ "orientations\n",\ "(1, 2, 3, 5);\n",\ "(1, 3, 4, 6);\n",\ "\n",\ "freezone2\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 1 P5 };\n",\ "{ 1 P6 };\n",\ "{ 0.3 P1, -0.1 P2, -0.1 P3, 0.3 P4, 0.3 P5, 0.3 P6 };\n",\ "{ -0.1 P1, 0.3 P2, 0.3 P3, -0.1 P4, 0.3 P5, 0.3 P6 };\n",\ "\n",\ "freezonelimit\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 1 P5 };\n",\ "{ 1 P6 };\n",\ "{ 0.25 P1, 0 P2, 0 P3, 0.25 P4, 0.25 P5, 0.25 P6 };\n",\ "{ 0 P1, 0.25 P2, 0.25 P3, 0 P4, 0.25 P5, 0.25 P6 };\n",\ "\n",\ "\n",\ "endrule\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "rule \"prism on quad, one trig\"\n",\ "\n",\ "quality 2\n",\ "\n",\ "mappoints\n",\ "(0, 0, 0);\n",\ "(1, 0, 0);\n",\ "(1, 1, 0);\n",\ "(0, 1, 0);\n",\ "(0.5, 0, -0.86);\n",\ "(0.5, 1, -0.86);\n",\ "\n",\ "mapfaces\n",\ "(1, 2, 3, 4) del;\n",\ "(1, 5, 2) del;\n",\ "\n",\ "newpoints\n",\ "\n",\ "newfaces\n",\ "(5, 2, 3, 6);\n",\ "(1, 5, 6, 4);\n",\ "(4, 6, 3);\n",\ "\n",\ "elements\n",\ "(1, 5, 2, 4, 6, 3);\n",\ "\n",\ "orientations\n",\ "(1, 2, 3, 5);\n",\ "(1, 3, 4, 6);\n",\ "\n",\ "freezone2\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 1 P5 };\n",\ "{ 1 P6 };\n",\ "{ 0.3 P1, -0.1 P2, -0.1 P3, 0.3 P4, 0.3 P5, 0.3 P6 };\n",\ "{ -0.1 P1, 0.3 P2, 0.3 P3, -0.1 P4, 0.3 P5, 0.3 P6 };\n",\ "\n",\ "freezonelimit\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 1 P5 };\n",\ "{ 1 P6 };\n",\ "{ 0.25 P1, 0 P2, 0 P3, 0.25 P4, 0.25 P5, 0.25 P6 };\n",\ "{ 0 P1, 0.25 P2, 0.25 P3, 0 P4, 0.25 P5, 0.25 P6 };\n",\ "\n",\ "\n",\ "endrule\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "rule \"prism on 2 quad\"\n",\ "\n",\ "quality 1\n",\ "\n",\ "mappoints\n",\ "(0, 0, 0);\n",\ "(1, 0, 0);\n",\ "(1, 1, 0);\n",\ "(0, 1, 0);\n",\ "(0.5, 0, -0.86);\n",\ "(0.5, 1, -0.86);\n",\ "\n",\ "mapfaces\n",\ "(1, 2, 3, 4) del;\n",\ "(2, 5, 6, 3) del;\n",\ "(1, 5, 2) del;\n",\ "(4, 3, 6) del;\n",\ "\n",\ "newpoints\n",\ "\n",\ "newfaces\n",\ "(1, 5, 6, 4);\n",\ "\n",\ "elements\n",\ "(1, 5, 2, 4, 6, 3);\n",\ "\n",\ "freezone2\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 1 P5 };\n",\ "{ 1 P6 };\n",\ "{ 0.3 P1, -0.1 P2, -0.1 P3, 0.3 P4, 0.3 P5, 0.3 P6 };\n",\ "\n",\ "freezonelimit\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 1 P5 };\n",\ "{ 1 P6 };\n",\ "{ 0.25 P1, 0 P2, 0 P3, 0.25 P4, 0.25 P5, 0.25 P6 };\n",\ "\n",\ "freeset\n",\ "1 2 4 5 6 7;\n",\ "\n",\ "freeset\n",\ "2 3 4 6;\n",\ "\n",\ "\n",\ "endrule\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "rule \"prism on 2 quad, one trig\"\n",\ "\n",\ "quality 2\n",\ "\n",\ "mappoints\n",\ "(0, 0, 0);\n",\ "(1, 0, 0);\n",\ "(1, 1, 0);\n",\ "(0, 1, 0);\n",\ "(0.5, 0, -0.86);\n",\ "(0.5, 1, -0.86);\n",\ "\n",\ "mapfaces\n",\ "(1, 2, 3, 4) del;\n",\ "(2, 5, 6, 3) del;\n",\ "(1, 5, 2) del;\n",\ "\n",\ "newpoints\n",\ "\n",\ "newfaces\n",\ "(1, 5, 6, 4);\n",\ "(4, 6, 3);\n",\ "\n",\ "elements\n",\ "(1, 5, 2, 4, 6, 3);\n",\ "\n",\ "freezone2\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 1 P5 };\n",\ "{ 1 P6 };\n",\ "{ 0.3 P1, -0.1 P2, -0.1 P3, 0.3 P4, 0.3 P5, 0.3 P6 };\n",\ "\n",\ "freezonelimit\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 1 P5 };\n",\ "{ 1 P6 };\n",\ "{ 0.25 P1, 0 P2, 0 P3, 0.25 P4, 0.25 P5, 0.25 P6 };\n",\ "\n",\ "freeset\n",\ "1 2 4 5 6 7;\n",\ "\n",\ "freeset\n",\ "2 3 4 6;\n",\ "\n",\ "\n",\ "endrule\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "rule \"prism on 2 quada\"\n",\ "\n",\ "quality 1\n",\ "\n",\ "mappoints\n",\ "(0, 0, 0);\n",\ "(1, 0, 0);\n",\ "(1, 1, 0);\n",\ "(0, 1, 0);\n",\ "(0.5, 0, -0.86);\n",\ "(0.5, 1, -0.86);\n",\ "\n",\ "mapfaces\n",\ "(1, 2, 3, 4) del;\n",\ "(5, 1, 4, 6) del;\n",\ "(1, 5, 2) del;\n",\ "(4, 3, 6) del;\n",\ "\n",\ "newpoints\n",\ "\n",\ "newfaces\n",\ "(5, 2, 3, 6);\n",\ "\n",\ "elements\n",\ "(1, 5, 2, 4, 6, 3);\n",\ "\n",\ "freezone2\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 1 P5 };\n",\ "{ 1 P6 };\n",\ "{ -0.1 P1, 0.3 P2, 0.3 P3, -0.1 P4, 0.3 P5, 0.3 P6 };\n",\ "\n",\ "freezonelimit\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 1 P5 };\n",\ "{ 1 P6 };\n",\ "{ 0 P1, 0.25 P2, 0.25 P3, 0 P4, 0.25 P5, 0.25 P6 };\n",\ "\n",\ "freeset\n",\ "1 2 3 5 6 7;\n",\ "\n",\ "freeset\n",\ "1 3 4 6;\n",\ "\n",\ "\n",\ "endrule\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "rule \"fill prism\"\n",\ "\n",\ "quality 1\n",\ "\n",\ "mappoints\n",\ "(0, 0, 0);\n",\ "(1, 0, 0);\n",\ "(1, 1, 0);\n",\ "(0, 1, 0);\n",\ "(0.5, 0, -0.86);\n",\ "(0.5, 1, -0.86);\n",\ "\n",\ "mapfaces\n",\ "(1, 2, 3, 4) del;\n",\ "(2, 5, 6, 3) del;\n",\ "(5, 1, 4, 6) del;\n",\ "(1, 5, 2) del;\n",\ "(4, 3, 6) del;\n",\ "\n",\ "newpoints\n",\ "\n",\ "newfaces\n",\ "\n",\ "\n",\ "elements\n",\ "(1, 5, 2, 4, 6, 3);\n",\ "\n",\ "freezone2\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 1 P5 };\n",\ "{ 1 P6 };\n",\ "\n",\ "freeset\n",\ "1 2 4 5;\n",\ "\n",\ "freeset\n",\ "2 3 4 6;\n",\ "\n",\ "endrule\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "rule \"prism on 3 quad, one trig\"\n",\ "\n",\ "quality 2\n",\ "\n",\ "mappoints\n",\ "(0, 0, 0);\n",\ "(1, 0, 0);\n",\ "(1, 1, 0);\n",\ "(0, 1, 0);\n",\ "(0.5, 0, -0.86);\n",\ "(0.5, 1, -0.86);\n",\ "\n",\ "mapfaces\n",\ "(1, 2, 3, 4) del;\n",\ "(2, 5, 6, 3) del;\n",\ "(5, 1, 4, 6) del;\n",\ "(1, 5, 2) del;\n",\ "\n",\ "newpoints\n",\ "\n",\ "newfaces\n",\ "(4, 6, 3);\n",\ "\n",\ "\n",\ "elements\n",\ "(1, 5, 2, 4, 6, 3);\n",\ "\n",\ "freezone2\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 1 P5 };\n",\ "{ 1 P6 };\n",\ "\n",\ "freeset\n",\ "1 2 4 5;\n",\ "\n",\ "freeset\n",\ "2 3 4 6;\n",\ "\n",\ "endrule\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "rule \"flat prism\"\n",\ "\n",\ "quality 1\n",\ "\n",\ "mappoints\n",\ "(0, 0, 0);\n",\ "(1, 0, 0);\n",\ "(0.5, 0.866, 0);\n",\ "(0, 0, -1);\n",\ "(1, 0, -1);\n",\ "(0.5, 0.866, -1);\n",\ "\n",\ "\n",\ "mapfaces\n",\ "(1, 2, 3) del;\n",\ "(5, 4, 6) del;\n",\ "\n",\ "newpoints\n",\ "\n",\ "newfaces\n",\ "(1, 2, 4);\n",\ "(4, 2, 5);\n",\ "(2, 3, 5);\n",\ "(5, 3, 6);\n",\ "(3, 1, 6);\n",\ "(6, 1, 4);\n",\ "\n",\ "\n",\ "\n",\ "elements\n",\ "(1, 2, 3, 5, 4, 6);\n",\ "\n",\ "freezone2\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P5 };\n",\ "{ 1 P6 };\n",\ "endrule\n",\ "\n",\ 0}; } netgen-6.2.1804/libsrc/meshing/adfront3.cpp0000644000175000017500000004435313272137567017152 0ustar kurtkurt#include #include "meshing.hpp" /* ********************** FrontPoint ********************** */ namespace netgen { FrontPoint3 :: FrontPoint3 () { globalindex.Invalidate(); // = -1; nfacetopoint = 0; frontnr = 1000; cluster = 0; } FrontPoint3 :: FrontPoint3 (const Point<3> & ap, PointIndex agi) { p = ap; globalindex = agi; nfacetopoint = 0; frontnr = 1000; cluster = 0; } /* ********************** FrontFace ********************** */ FrontFace :: FrontFace () { qualclass = 1; oldfront = 0; hashvalue = 0; cluster = 0; } FrontFace :: FrontFace (const MiniElement2d & af) { f = af; oldfront = 0; qualclass = 1; hashvalue = 0; } void FrontFace :: Invalidate () { f.Delete(); oldfront = 0; qualclass = 1000; } /* ********************** AddFront ********************** */ AdFront3 :: AdFront3 () { nff = 0; nff4 = 0; vol = 0; hashon = 1; hashcreated = 0; if (hashon) hashtable.Init(&points, &faces); facetree = NULL; connectedpairs = NULL; rebuildcounter = -1; lasti = 0; minval = -1; } AdFront3 :: ~AdFront3 () { delete facetree; delete connectedpairs; } void AdFront3 :: GetPoints (Array > & apoints) const { for (PointIndex pi = points.Begin(); pi < points.End(); pi++) apoints.Append (points[pi].P()); } PointIndex AdFront3 :: AddPoint (const Point<3> & p, PointIndex globind) { if (delpointl.Size()) { PointIndex pi = delpointl.Last(); delpointl.DeleteLast (); points[pi] = FrontPoint3 (p, globind); return pi; } else { points.Append (FrontPoint3 (p, globind)); return --points.End(); // return points.Size()-1+PointIndex::BASE; } } INDEX AdFront3 :: AddFace (const MiniElement2d & aface) { int i, minfn; nff++; for (i = 0; i < aface.GetNP(); i++) points[aface[i]].AddFace(); const Point3d & p1 = points[aface[0]].P(); const Point3d & p2 = points[aface[1]].P(); const Point3d & p3 = points[aface[2]].P(); vol += 1.0/6.0 * (p1.X() + p2.X() + p3.X()) * ( (p2.Y() - p1.Y()) * (p3.Z() - p1.Z()) - (p2.Z() - p1.Z()) * (p3.Y() - p1.Y()) ); if (aface.GetNP() == 4) { nff4++; const Point3d & p4 = points[aface[3]].P(); vol += 1.0/6.0 * (p1.X() + p3.X() + p4.X()) * ( (p3.Y() - p1.Y()) * (p4.Z() - p1.Z()) - (p3.Z() - p1.Z()) * (p4.Y() - p1.Y()) ); } minfn = 1000; for (i = 0; i < aface.GetNP(); i++) { int fpn = points[aface[i]].FrontNr(); if (i == 0 || fpn < minfn) minfn = fpn; } int cluster = 0; for (i = 1; i <= aface.GetNP(); i++) { if (points[aface.PNum(i)].cluster) cluster = points[aface.PNum(i)].cluster; } for (i = 1; i <= aface.GetNP(); i++) points[aface.PNum(i)].cluster = cluster; for (i = 1; i <= aface.GetNP(); i++) points[aface.PNum(i)].DecFrontNr (minfn+1); faces.Append(FrontFace (aface)); int nfn = faces.Size(); faces.Elem(nfn).cluster = cluster; if (hashon && hashcreated) hashtable.AddElem(aface, nfn); return nfn; } void AdFront3 :: DeleteFace (INDEX fi) { nff--; for (int i = 1; i <= faces.Get(fi).Face().GetNP(); i++) { PointIndex pi = faces.Get(fi).Face().PNum(i); points[pi].RemoveFace(); if (!points[pi].Valid()) delpointl.Append (pi); } const MiniElement2d & face = faces.Get(fi).Face(); const Point3d & p1 = points[face.PNum(1)].P(); const Point3d & p2 = points[face.PNum(2)].P(); const Point3d & p3 = points[face.PNum(3)].P(); vol -= 1.0/6.0 * (p1.X() + p2.X() + p3.X()) * ( (p2.Y() - p1.Y()) * (p3.Z() - p1.Z()) - (p2.Z() - p1.Z()) * (p3.Y() - p1.Y()) ); if (face.GetNP() == 4) { const Point3d & p4 = points[face.PNum(4)].P(); vol -= 1.0/6.0 * (p1.X() + p3.X() + p4.X()) * ( (p3.Y() - p1.Y()) * (p4.Z() - p1.Z()) - (p3.Z() - p1.Z()) * (p4.Y() - p1.Y()) ); nff4--; } faces.Elem(fi).Invalidate(); } INDEX AdFront3 :: AddConnectedPair (const INDEX_2 & apair) { if (!connectedpairs) connectedpairs = new TABLE (GetNP()); connectedpairs->Add (apair.I1(), apair.I2()); connectedpairs->Add (apair.I2(), apair.I1()); return 0; } void AdFront3 :: CreateTrees () { int i, j; PointIndex pi; Point3d pmin, pmax; for (pi = PointIndex::BASE; pi < GetNP()+PointIndex::BASE; pi++) { const Point<3> & p = GetPoint(pi); if (pi == PointIndex::BASE) { pmin = p; pmax = p; } else { pmin.SetToMin (p); pmax.SetToMax (p); } } pmax = pmax + 0.5 * (pmax - pmin); pmin = pmin + 0.5 * (pmin - pmax); delete facetree; facetree = new BoxTree<3> (pmin, pmax); for (i = 1; i <= GetNF(); i++) { const MiniElement2d & el = GetFace(i); pmin = GetPoint (el[0]); pmax = pmin; for (j = 1; j < 3; j++) { const Point<3> & p = GetPoint (el[j]); pmin.SetToMin (p); pmax.SetToMax (p); } pmax = pmax + 0.01 * (pmax - pmin); pmin = pmin + 0.01 * (pmin - pmax); // (*testout) << "insert " << i << ": " << pmin << " - " << pmax << "\n"; facetree -> Insert (pmin, pmax, i); } } void AdFront3 :: GetIntersectingFaces (const Point<3> & pmin, const Point<3> & pmax, Array & ifaces) const { facetree -> GetIntersecting (pmin, pmax, ifaces); } void AdFront3 :: GetFaceBoundingBox (int i, Box3d & box) const { const FrontFace & face = faces.Get(i); box.SetPoint (points[face.f[0]].p); box.AddPoint (points[face.f[1]].p); box.AddPoint (points[face.f[2]].p); } void AdFront3 :: RebuildInternalTables () { static int timer_a = NgProfiler::CreateTimer ("Adfront3::RebuildInternal A"); static int timer_b = NgProfiler::CreateTimer ("Adfront3::RebuildInternal B"); static int timer_c = NgProfiler::CreateTimer ("Adfront3::RebuildInternal C"); static int timer_d = NgProfiler::CreateTimer ("Adfront3::RebuildInternal D"); NgProfiler::StartTimer (timer_a); int hi = 0; for (int i = 1; i <= faces.Size(); i++) if (faces.Get(i).Valid()) { hi++; if (hi < i) faces.Elem(hi) = faces.Get(i); } faces.SetSize (nff); int np = points.Size(); for (PointIndex pi = points.Begin(); pi < points.End(); pi++) points[pi].cluster = pi; NgProfiler::StopTimer (timer_a); NgProfiler::StartTimer (timer_b); int change; do { change = 0; for (int i = 1; i <= faces.Size(); i++) { const MiniElement2d & el = faces.Get(i).Face(); int mini = points[el.PNum(1)].cluster; int maxi = mini; for (int j = 2; j <= 3; j++) { int ci = points[el.PNum(j)].cluster; if (ci < mini) mini = ci; if (ci > maxi) maxi = ci; } if (mini < maxi) { change = 1; for (int j = 1; j <= 3; j++) points[el.PNum(j)].cluster = mini; } } } while (change); NgProfiler::StopTimer (timer_b); NgProfiler::StartTimer (timer_c); BitArrayChar usecl(np); usecl.Clear(); for (int i = 1; i <= faces.Size(); i++) { usecl.Set (points[faces.Get(i).Face().PNum(1)].cluster); faces.Elem(i).cluster = points[faces.Get(i).Face().PNum(1)].cluster; } int cntcl = 0; for (int i = PointIndex::BASE; i < np+PointIndex::BASE; i++) if (usecl.Test(i)) cntcl++; Array clvol (np); clvol = 0.0; for (int i = 1; i <= faces.Size(); i++) { const MiniElement2d & face = faces.Get(i).Face(); const Point3d p1 = points[face.PNum(1)].P(); const Point3d p2 = points[face.PNum(2)].P(); const Point3d p3 = points[face.PNum(3)].P(); double vi = 1.0/6.0 * (p1.X() + p2.X() + p3.X()) * ( (p2.Y() - p1.Y()) * (p3.Z() - p1.Z()) - (p2.Z() - p1.Z()) * (p3.Y() - p1.Y()) ); if (face.GetNP() == 4) { const Point3d p4 = points[face.PNum(4)].P(); vi += 1.0/6.0 * (p1.X() + p3.X() + p4.X()) * ( (p3.Y() - p1.Y()) * (p4.Z() - p1.Z()) - (p3.Z() - p1.Z()) * (p4.Y() - p1.Y()) ); } clvol[faces.Get(i).cluster] += vi; } NgProfiler::StopTimer (timer_c); NgProfiler::StartTimer (timer_d); int negvol = 0; for (int i = PointIndex::BASE; i < clvol.Size()+PointIndex::BASE; i++) { if (clvol[i] < 0) negvol = 1; } if (negvol) { for (int i = 1; i <= faces.Size(); i++) faces.Elem(i).cluster = 1; for (PointIndex pi = points.Begin(); pi < points.End(); pi++) points[pi].cluster = 1; } if (hashon) hashtable.Create(); NgProfiler::StopTimer (timer_d); } int AdFront3 :: SelectBaseElement () { int i, hi, fstind; /* static int minval = -1; static int lasti = 0; static int counter = 0; */ if (rebuildcounter <= 0) { RebuildInternalTables(); rebuildcounter = nff / 10 + 1; lasti = 0; } rebuildcounter--; /* if (faces.Size() > 2 * nff) { // compress facelist RebuildInternalTables (); lasti = 0; } */ fstind = 0; for (i = lasti+1; i <= faces.Size() && !fstind; i++) if (faces.Elem(i).Valid()) { hi = faces.Get(i).QualClass() + points[faces.Get(i).Face().PNum(1)].FrontNr() + points[faces.Get(i).Face().PNum(2)].FrontNr() + points[faces.Get(i).Face().PNum(3)].FrontNr(); if (hi <= minval) { minval = hi; fstind = i; lasti = fstind; } } if (!fstind) { minval = INT_MAX; for (i = 1; i <= faces.Size(); i++) if (faces.Elem(i).Valid()) { hi = faces.Get(i).QualClass() + points[faces.Get(i).Face().PNum(1)].FrontNr() + points[faces.Get(i).Face().PNum(2)].FrontNr() + points[faces.Get(i).Face().PNum(3)].FrontNr(); if (hi <= minval) { minval = hi; fstind = i; lasti = 0; } } } return fstind; } int AdFront3 :: GetLocals (int fstind, Array & locpoints, Array & locfaces, // local index Array & pindex, Array & findex, INDEX_2_HASHTABLE & getconnectedpairs, float xh, float relh, INDEX& facesplit) { // static int timer = NgProfiler::CreateTimer ("AdFront3::GetLocals"); // NgProfiler::RegionTimer reg (timer); if (hashon && faces.Size() < 500) { hashon=0; } if (hashon && !hashcreated) { hashtable.Create(); hashcreated=1; } INDEX i, j; PointIndex pstind; Point3d midp, p0; // static Array invpindex; Array locfaces2; //all local faces in radius xh Array locfaces3; // all faces in outer radius relh Array findex2; locfaces2.SetSize(0); locfaces3.SetSize(0); findex2.SetSize(0); int cluster = faces.Get(fstind).cluster; pstind = faces.Get(fstind).Face().PNum(1); p0 = points[pstind].P(); locfaces2.Append(faces.Get(fstind).Face()); findex2.Append(fstind); Box3d b1 (p0 - Vec3d(xh, xh, xh), p0 + Vec3d (xh, xh, xh)); if (hashon) { hashtable.GetLocals(locfaces2, findex2, fstind, p0, xh); } else { for (i = 1; i <= faces.Size(); i++) { const MiniElement2d & face = faces.Get(i).Face(); if (faces.Get(i).cluster == cluster && faces.Get(i).Valid() && i != fstind) { Box3d b2; b2.SetPoint (points[face[0]].P()); b2.AddPoint (points[face[1]].P()); b2.AddPoint (points[face[2]].P()); if (b1.Intersect (b2)) { locfaces2.Append(faces.Get(i).Face()); findex2.Append(i); } } } } //local faces for inner radius: for (i = 1; i <= locfaces2.Size(); i++) { const MiniElement2d & face = locfaces2.Get(i); const Point3d & p1 = points[face[0]].P(); const Point3d & p2 = points[face[1]].P(); const Point3d & p3 = points[face[2]].P(); midp = Center (p1, p2, p3); if (Dist2 (midp, p0) <= relh * relh || i == 1) { locfaces.Append(locfaces2.Get(i)); findex.Append(findex2.Get(i)); } else locfaces3.Append (i); } facesplit=locfaces.Size(); //local faces for outer radius: for (i = 1; i <= locfaces3.Size(); i++) { locfaces.Append (locfaces2.Get(locfaces3.Get(i))); findex.Append (findex2.Get(locfaces3.Get(i))); } invpindex.SetSize (points.Size()); for (i = 1; i <= locfaces.Size(); i++) for (j = 1; j <= locfaces.Get(i).GetNP(); j++) { PointIndex pi = locfaces.Get(i).PNum(j); invpindex[pi] = -1; } for (i = 1; i <= locfaces.Size(); i++) { for (j = 1; j <= locfaces.Get(i).GetNP(); j++) { PointIndex pi = locfaces.Get(i).PNum(j); if (invpindex[pi] == -1) { pindex.Append (pi); locpoints.Append (points[pi].P()); invpindex[pi] = pindex.Size()-1+PointIndex::BASE; } // locfaces.Elem(i).PNum(j) = locpoints.Append (points[pi].P()); // } // else locfaces.Elem(i).PNum(j) = invpindex[pi]; } } if (connectedpairs) { for (i = 1; i <= locpoints.Size(); i++) { int pind = pindex.Get(i); if (pind >= 1 && pind <= connectedpairs->Size ()) { for (j = 1; j <= connectedpairs->EntrySize(pind); j++) { int oi = connectedpairs->Get(pind, j); int other = invpindex.Get(oi); if (other >= 1 && other <= pindex.Size() && pindex.Get(other) == oi) { // INDEX_2 coned(i, other); // coned.Sort(); // (*testout) << "connected: " << locpoints.Get(i) << "-" << locpoints.Get(other) << endl; getconnectedpairs.Set (INDEX_2::Sort (i, other), 1); } } } } } /* // add isolated points for (i = 1; i <= points.Size(); i++) if (points.Elem(i).Valid() && Dist (points.Elem(i).P(), p0) <= xh) { if (!invpindex.Get(i)) { locpoints.Append (points.Get(i).P()); pindex.Append (i); invpindex.Elem(i) = pindex.Size(); } } */ return faces.Get(fstind).QualClass(); } // returns all points connected with fi void AdFront3 :: GetGroup (int fi, Array & grouppoints, Array & groupelements, Array & pindex, Array & findex) { // static Array pingroup; int changed; pingroup.SetSize(points.Size()); pingroup = 0; for (int j = 1; j <= 3; j++) pingroup.Elem (faces.Get(fi).Face().PNum(j)) = 1; do { changed = 0; /* for (i = 1; i <= faces.Size(); i++) if (faces.Get(i).Valid()) { const MiniElement2d & face = faces.Get(i).Face(); int fused = 0; for (j = 1; j <= 3; j++) if (pingroup.Elem(face.PNum(j))) fused++; if (fused >= 2) for (j = 1; j <= 3; j++) if (!pingroup.Elem(face.PNum(j))) { pingroup.Elem(face.PNum(j)) = 1; changed = 1; } } */ for (auto & f : faces) if (f.Valid()) { const MiniElement2d & face = f.Face(); int fused = 0; for (int j = 1; j <= 3; j++) if (pingroup.Elem(face.PNum(j))) fused++; if (fused >= 2) for (int j = 1; j <= 3; j++) if (!pingroup.Elem(face.PNum(j))) { pingroup.Elem(face.PNum(j)) = 1; changed = 1; } } } while (changed); invpindex.SetSize (points.Size()); // for (PointIndex pi = points.Begin(); pi < points.End(); pi++) for (PointIndex pi : points.Range()) if (points[pi].Valid()) { grouppoints.Append (points[pi].P()); pindex.Append (pi); invpindex[pi] = pindex.Size(); } for (int i = 1; i <= faces.Size(); i++) if (faces.Get(i).Valid()) { int fused = 0; for (int j = 1; j <= 3; j++) if (pingroup.Get(faces.Get(i).Face().PNum(j))) fused++; if (fused >= 2) { groupelements.Append (faces.Get(i).Face()); findex.Append (i); } } /* for (int i = 1; i <= groupelements.Size(); i++) for (int j = 1; j <= 3; j++) { groupelements.Elem(i).PNum(j) = invpindex.Get(groupelements.Elem(i).PNum(j)); } */ for (auto & e : groupelements) for (int j = 1; j <= 3; j++) e.PNum(j) = invpindex.Get(e.PNum(j)); } void AdFront3 :: SetStartFront (int /* baseelnp */) { for (INDEX i = 1; i <= faces.Size(); i++) if (faces.Get(i).Valid()) { const MiniElement2d & face = faces.Get(i).Face(); for (int j = 1; j <= 3; j++) points[face.PNum(j)].DecFrontNr(0); } /* if (baseelnp) { for (i = 1; i <= faces.Size(); i++) if (faces.Get(i).Valid() && faces.Get(i).Face().GetNP() != baseelnp) faces.Elem(i).qualclass = 1000; } */ } bool AdFront3 :: Inside (const Point<3> & p) const { int cnt; Vec3d n, v1, v2; DenseMatrix a(3), ainv(3); Vector b(3), u(3); // random numbers: n.X() = 0.123871; n.Y() = 0.15432; n.Z() = -0.43989; cnt = 0; for (int i = 1; i <= faces.Size(); i++) if (faces.Get(i).Valid()) { const Point<3> & p1 = points[faces.Get(i).Face().PNum(1)].P(); const Point<3> & p2 = points[faces.Get(i).Face().PNum(2)].P(); const Point<3> & p3 = points[faces.Get(i).Face().PNum(3)].P(); v1 = p2 - p1; v2 = p3 - p1; a(0, 0) = v1.X(); a(1, 0) = v1.Y(); a(2, 0) = v1.Z(); a(0, 1) = v2.X(); a(1, 1) = v2.Y(); a(2, 1) = v2.Z(); a(0, 2) = -n.X(); a(1, 2) = -n.Y(); a(2, 2) = -n.Z(); b(0) = p(0) - p1(0); b(1) = p(1) - p1(1); b(2) = p(2) - p1(2); CalcInverse (a, ainv); ainv.Mult (b, u); if (u(0) >= 0 && u(1) >= 0 && u(0)+u(1) <= 1 && u(2) > 0) { cnt++; } } return ((cnt % 2) != 0); } int AdFront3 :: SameSide (const Point<3> & lp1, const Point<3> & lp2, const Array * testfaces) const { const Point<3> *line[2]; line[0] = &lp1; line[1] = &lp2; Point3d pmin(lp1); Point3d pmax(lp1); pmin.SetToMin (lp2); pmax.SetToMax (lp2); ArrayMem aprif; aprif.SetSize(0); if (!testfaces) facetree->GetIntersecting (pmin, pmax, aprif); else for (int i = 1; i <= testfaces->Size(); i++) aprif.Append (testfaces->Get(i)); int cnt = 0; for (int ii = 1; ii <= aprif.Size(); ii++) { int i = aprif.Get(ii); if (faces.Get(i).Valid()) { const Point<3> *tri[3]; tri[0] = &points[faces.Get(i).Face().PNum(1)].P(); tri[1] = &points[faces.Get(i).Face().PNum(2)].P(); tri[2] = &points[faces.Get(i).Face().PNum(3)].P(); if (IntersectTriangleLine (&tri[0], &line[0])) cnt++; } } return ((cnt+1) % 2); } } netgen-6.2.1804/libsrc/meshing/parallelmesh.cpp0000644000175000017500000011563313272137567020103 0ustar kurtkurt#ifdef PARALLEL #include #include "paralleltop.hpp" // #define METIS4 #ifdef METIS namespace metis { extern "C" { #include #if METIS_VER_MAJOR >= 5 #define METIS5 typedef idx_t idxtype; #else #define METIS4 typedef idxtype idx_t; #endif } } using namespace metis; #endif namespace netgen { template <> inline MPI_Datatype MyGetMPIType ( ) { return MPI_INT; } void Mesh :: SendRecvMesh () { if (id == 0) PrintMessage (1, "Send/Receive mesh"); { // distribute global information int nelglob, nseglob, nvglob; if (id == 0) { paralleltop -> SetNV (GetNV()); paralleltop -> SetNE (GetNE()); paralleltop -> SetNSegm (GetNSeg()); paralleltop -> SetNSE (GetNSE()); nelglob = GetNE(); nseglob = GetNSE(); nvglob = GetNV(); } MyMPI_Bcast (dimension); MyMPI_Bcast (nelglob); MyMPI_Bcast (nseglob); MyMPI_Bcast (nvglob); } { // distribute number of local elements if (id == 0) { Array num_els_on_proc(ntasks); num_els_on_proc = 0; for (ElementIndex ei = 0; ei < GetNE(); ei++) num_els_on_proc[(*this)[ei].GetPartition()]++; MPI_Scatter (&num_els_on_proc[0], 1, MPI_INT, MPI_IN_PLACE, -1, MPI_INT, 0, MPI_COMM_WORLD); } else { int nelloc; MPI_Scatter (NULL, 0, MPI_INT, &nelloc, 1, MPI_INT, 0, MPI_COMM_WORLD); paralleltop -> SetNE (nelloc); } } if (id == 0) SendMesh (); else ReceiveParallelMesh(); paralleltop -> UpdateCoarseGrid(); } void Mesh :: SendMesh () const { Array sendrequests; PrintMessage ( 3, "Sending vertices"); Array num_els_on_proc(ntasks); num_els_on_proc = 0; for (ElementIndex ei = 0; ei < GetNE(); ei++) num_els_on_proc[(*this)[ei].GetPartition()]++; TABLE els_of_proc (num_els_on_proc); for (ElementIndex ei = 0; ei < GetNE(); ei++) els_of_proc.Add ( (*this)[ei].GetPartition(), ei); Array num_sels_on_proc(ntasks); num_sels_on_proc = 0; for (SurfaceElementIndex ei = 0; ei < GetNSE(); ei++) num_sels_on_proc[(*this)[ei].GetPartition()]++; TABLE sels_of_proc (num_sels_on_proc); for (SurfaceElementIndex ei = 0; ei < GetNSE(); ei++) sels_of_proc.Add ( (*this)[ei].GetPartition(), ei); Array num_segs_on_proc(ntasks); num_segs_on_proc = 0; for (SegmentIndex ei = 0; ei < GetNSeg(); ei++) num_segs_on_proc[(*this)[ei].GetPartition()]++; TABLE segs_of_proc (num_segs_on_proc); for (SegmentIndex ei = 0; ei < GetNSeg(); ei++) segs_of_proc.Add ( (*this)[ei].GetPartition(), ei); Array vert_flag (GetNV()); Array num_procs_on_vert (GetNV()); Array num_verts_on_proc (ntasks); num_verts_on_proc = 0; num_procs_on_vert = 0; vert_flag = -1; for (int dest = 1; dest < ntasks; dest++) { FlatArray els = els_of_proc[dest]; for (int hi = 0; hi < els.Size(); hi++) { const Element & el = (*this) [ els[hi] ]; for (int i = 0; i < el.GetNP(); i++) { PointIndex epi = el[i]; if (vert_flag[epi] < dest) { vert_flag[epi] = dest; num_verts_on_proc[dest]++; num_procs_on_vert[epi]++; paralleltop -> SetDistantPNum (dest, epi); } } } FlatArray sels = sels_of_proc[dest]; for (int hi = 0; hi < sels.Size(); hi++) { const Element2d & el = (*this) [ sels[hi] ]; for (int i = 0; i < el.GetNP(); i++) { PointIndex epi = el[i]; if (vert_flag[epi] < dest) { vert_flag[epi] = dest; num_verts_on_proc[dest]++; num_procs_on_vert[epi]++; paralleltop -> SetDistantPNum (dest, epi); } } } FlatArray segs = segs_of_proc[dest]; for (int hi = 0; hi < segs.Size(); hi++) { const Segment & el = (*this) [segs[hi]]; for (int i = 0; i < 2; i++) { PointIndex epi = el[i]; if (vert_flag[epi] < dest) { vert_flag[epi] = dest; num_verts_on_proc[dest]++; num_procs_on_vert[epi]++; paralleltop -> SetDistantPNum (dest, epi); } } } } TABLE verts_of_proc (num_verts_on_proc); TABLE procs_of_vert (num_procs_on_vert); TABLE loc_num_of_vert (num_procs_on_vert); vert_flag = -1; for (int dest = 1; dest < ntasks; dest++) { FlatArray els = els_of_proc[dest]; for (int hi = 0; hi < els.Size(); hi++) { const Element & el = (*this) [ els[hi] ]; for (int i = 0; i < el.GetNP(); i++) { PointIndex epi = el[i]; if (vert_flag[epi] < dest) { vert_flag[epi] = dest; procs_of_vert.Add (epi, dest); } } } FlatArray sels = sels_of_proc[dest]; for (int hi = 0; hi < sels.Size(); hi++) { const Element2d & el = (*this) [ sels[hi] ]; for (int i = 0; i < el.GetNP(); i++) { PointIndex epi = el[i]; if (vert_flag[epi] < dest) { vert_flag[epi] = dest; procs_of_vert.Add (epi, dest); } } } FlatArray segs = segs_of_proc[dest]; for (int hi = 0; hi < segs.Size(); hi++) { const Segment & el = (*this) [ segs[hi] ]; for (int i = 0; i < 2; i++) { PointIndex epi = el[i]; if (vert_flag[epi] < dest) { vert_flag[epi] = dest; procs_of_vert.Add (epi, dest); } } } } for (int vert = 1; vert <= GetNP(); vert++ ) { FlatArray procs = procs_of_vert[vert]; for (int j = 0; j < procs.Size(); j++) { int dest = procs[j]; verts_of_proc.Add (dest, vert); loc_num_of_vert.Add (vert, verts_of_proc[dest].Size()); } } for (int dest = 1; dest < ntasks; dest++) { FlatArray verts = verts_of_proc[dest]; sendrequests.Append (MyMPI_ISend (verts, dest, MPI_TAG_MESH+1)); MPI_Datatype mptype = MeshPoint::MyGetMPIType(); int numv = verts.Size(); MPI_Datatype newtype; Array blocklen (numv); blocklen = 1; MPI_Type_indexed (numv, &blocklen[0], reinterpret_cast (&verts[0]), mptype, &newtype); MPI_Type_commit (&newtype); MPI_Request request; MPI_Isend( &points[0], 1, newtype, dest, MPI_TAG_MESH+1, MPI_COMM_WORLD, &request); sendrequests.Append (request); } Array num_distpnums(ntasks); num_distpnums = 0; for (int vert = 1; vert <= GetNP(); vert++) { FlatArray procs = procs_of_vert[vert]; for (int j = 0; j < procs.Size(); j++) num_distpnums[procs[j]] += 3 * (procs.Size()-1); } TABLE distpnums (num_distpnums); for (int vert = 1; vert <= GetNP(); vert++) { FlatArray procs = procs_of_vert[vert]; for (int j = 0; j < procs.Size(); j++) for (int k = 0; k < procs.Size(); k++) if (j != k) { distpnums.Add (procs[j], loc_num_of_vert[vert][j]); distpnums.Add (procs[j], procs_of_vert[vert][k]); distpnums.Add (procs[j], loc_num_of_vert[vert][k]); } } for ( int dest = 1; dest < ntasks; dest ++ ) sendrequests.Append (MyMPI_ISend (distpnums[dest], dest, MPI_TAG_MESH+1)); PrintMessage ( 3, "Sending elements" ); Array elarraysize (ntasks); elarraysize = 0; for ( int ei = 1; ei <= GetNE(); ei++) { const Element & el = VolumeElement (ei); int dest = el.GetPartition(); elarraysize[dest] += 3 + el.GetNP(); } TABLE elementarrays(elarraysize); for (int ei = 1; ei <= GetNE(); ei++) { const Element & el = VolumeElement (ei); int dest = el.GetPartition(); elementarrays.Add (dest, ei); elementarrays.Add (dest, el.GetIndex()); elementarrays.Add (dest, el.GetNP()); for (int i = 0; i < el.GetNP(); i++) elementarrays.Add (dest, el[i]); } for (int dest = 1; dest < ntasks; dest ++ ) sendrequests.Append (MyMPI_ISend (elementarrays[dest], dest, MPI_TAG_MESH+2)); PrintMessage ( 3, "Sending Face Descriptors" ); Array fddata (6 * GetNFD()); for (int fdi = 1; fdi <= GetNFD(); fdi++) { fddata[6*fdi-6] = GetFaceDescriptor(fdi).SurfNr(); fddata[6*fdi-5] = GetFaceDescriptor(fdi).DomainIn(); fddata[6*fdi-4] = GetFaceDescriptor(fdi).DomainOut(); fddata[6*fdi-3] = GetFaceDescriptor(fdi).BCProperty(); fddata[6*fdi-2] = GetFaceDescriptor(fdi).domin_singular; fddata[6*fdi-1] = GetFaceDescriptor(fdi).domout_singular; } for (int dest = 1; dest < ntasks; dest++) sendrequests.Append (MyMPI_ISend (fddata, dest, MPI_TAG_MESH+3)); PrintMessage ( 3, "Sending Surface elements" ); Array nlocsel(ntasks), bufsize(ntasks); nlocsel = 0; bufsize = 1; for (int sei = 1; sei <= GetNSE(); sei++ ) { const Element2d & sel = SurfaceElement (sei); int dest = sel.GetPartition(); nlocsel[dest] ++; bufsize[dest] += 4 + 2*sel.GetNP(); } TABLE selbuf(bufsize); for (int dest = 1; dest < ntasks; dest++ ) selbuf.Add (dest, nlocsel[dest]); for (int sei = 1; sei <= GetNSE(); sei ++ ) { const Element2d & sel = SurfaceElement (sei); int dest = sel.GetPartition(); selbuf.Add (dest, sei); selbuf.Add (dest, sel.GetIndex()); // selbuf.Add (dest, 0); selbuf.Add (dest, sel.GetNP()); for ( int ii = 1; ii <= sel.GetNP(); ii++) { selbuf.Add (dest, sel.PNum(ii)); selbuf.Add (dest, sel.GeomInfoPi(ii).trignum); } } for (int dest = 1; dest < ntasks; dest++) sendrequests.Append (MyMPI_ISend(selbuf[dest], dest, MPI_TAG_MESH+4)); PrintMessage ( 3, "Sending Edge Segments"); Array nloc(ntasks); nloc = 0; bufsize = 1; for (int i = 1; i <= GetNSeg(); i++ ) { const Segment & seg = LineSegment (i); int dest = seg.GetPartition(); nloc[dest] ++; bufsize[dest] += 14; } TABLE segm_buf(bufsize); /* for (int dest = 1; dest < ntasks; dest++ ) segm_buf.Add (dest, nloc[dest]); */ for (int i = 1; i <= GetNSeg(); i++ ) { const Segment & seg = LineSegment (i); int dest = seg.GetPartition(); segm_buf.Add (dest, i); segm_buf.Add (dest, seg.si); segm_buf.Add (dest, seg.pnums[0]); segm_buf.Add (dest, seg.pnums[1]); segm_buf.Add (dest, seg.geominfo[0].trignum); segm_buf.Add (dest, seg.geominfo[1].trignum); segm_buf.Add (dest, seg.surfnr1); segm_buf.Add (dest, seg.surfnr2); segm_buf.Add (dest, seg.edgenr); segm_buf.Add (dest, seg.epgeominfo[0].dist); segm_buf.Add (dest, seg.epgeominfo[1].edgenr); segm_buf.Add (dest, seg.epgeominfo[1].dist); segm_buf.Add (dest, seg.singedge_right); segm_buf.Add (dest, seg.singedge_left); } for (int dest = 1; dest < ntasks; dest++) sendrequests.Append (MyMPI_ISend(segm_buf[dest], dest, MPI_TAG_MESH+5)); /* Array nlocseg(ntasks), segi(ntasks); for ( int i = 0; i < ntasks; i++) { nlocseg[i] = 0; bufsize[i] = 0; segi[i] = 0; } for (int segi = 1; segi <= GetNSeg(); segi ++ ) { Array volels; const MeshTopology & topol = GetTopology(); topol . GetSegmentSurfaceElements ( segi, volels ); for (int j = 0; j < volels.Size(); j++) { int ei = volels[j]; if ( ei > 0 && ei <= GetNSE() ) { const Element2d & el = SurfaceElement (ei); int dest = el.GetPartition(); nlocseg[dest] ++; bufsize[dest] += 14; } } } TABLE segmbuf(bufsize); for ( int ls=1; ls <= GetNSeg(); ls++) { Array volels; GetTopology().GetSegmentSurfaceElements ( ls, volels ); const Segment & seg = LineSegment (ls); for (int j = 0; j < volels.Size(); j++) { int ei = volels[j]; if ( ei > 0 && ei <= GetNSE() ) { const Element2d & el = SurfaceElement (ei); int dest = el.GetPartition(); if ( dest > 0 ) { segmbuf.Add (dest, ls); segmbuf.Add (dest, seg.si); segmbuf.Add (dest, seg.pnums[0]); segmbuf.Add (dest, seg.pnums[1]); segmbuf.Add (dest, seg.geominfo[0].trignum); segmbuf.Add (dest, seg.geominfo[1].trignum); segmbuf.Add (dest, seg.surfnr1); segmbuf.Add (dest, seg.surfnr2); segmbuf.Add (dest, seg.edgenr); segmbuf.Add (dest, seg.epgeominfo[0].dist); segmbuf.Add (dest, seg.epgeominfo[1].edgenr); segmbuf.Add (dest, seg.epgeominfo[1].dist); segmbuf.Add (dest, seg.singedge_right); segmbuf.Add (dest, seg.singedge_left); segi[dest] += 14; } // paralleltop -> SetDistantSegm ( dest, ls, int ( segi[dest] / 14 ) ); } } } for ( int dest = 1; dest < ntasks; dest++) sendrequests.Append (MyMPI_ISend(segmbuf[dest], dest, MPI_TAG_MESH+5)); */ PrintMessage ( 3, "now wait ..."); MPI_Waitall (sendrequests.Size(), &sendrequests[0], MPI_STATUS_IGNORE); PrintMessage ( 3, "Sending domain+bc - names"); sendrequests.SetSize(6*(ntasks-1)); /** Send bc-names **/ int nbcs = bcnames.Size(); Array bcname_sizes(nbcs); int tot_bcsize = 0; for(int k=0;ksize(); tot_bcsize += bcname_sizes[k]; } char compiled_bcnames[tot_bcsize]; tot_bcsize = 0; for(int k=0;k(1, &nbcs), k, MPI_TAG_MESH+6); sendrequests[6*(k-1)+1] = MyMPI_ISend(bcname_sizes, k, MPI_TAG_MESH+6); (void) MPI_Isend(compiled_bcnames, tot_bcsize, MPI_CHAR, k, MPI_TAG_MESH+6, MPI_COMM_WORLD, &sendrequests[6*(k-1)+2]); } /** Send mat-names **/ int nmats = materials.Size(); Array mat_sizes(nmats); int tot_matsize = 0; for(int k=0;ksize(); tot_matsize += mat_sizes[k]; } char compiled_mats[tot_matsize]; tot_matsize = 0; for(int k=0;k(1, &nmats), k, MPI_TAG_MESH+6); sendrequests[6*(k-1)+4] = MyMPI_ISend(mat_sizes, k, MPI_TAG_MESH+6); (void) MPI_Isend(compiled_mats, tot_matsize, MPI_CHAR, k, MPI_TAG_MESH+6, MPI_COMM_WORLD, &sendrequests[6*(k-1)+5]); } /* now wait ... **/ PrintMessage( 3, "now wait for domain+bc - names"); MPI_Waitall (sendrequests.Size(), &sendrequests[0], MPI_STATUS_IGNORE); PrintMessage( 3, "send mesh complete"); MPI_Barrier(MPI_COMM_WORLD); } // slaves receive the mesh from the master void Mesh :: ReceiveParallelMesh ( ) { int timer = NgProfiler::CreateTimer ("ReceiveParallelMesh"); int timer_pts = NgProfiler::CreateTimer ("Receive points"); int timer_els = NgProfiler::CreateTimer ("Receive elements"); int timer_sels = NgProfiler::CreateTimer ("Receive surface elements"); NgProfiler::RegionTimer reg(timer); // string st; // receive vertices NgProfiler::StartTimer (timer_pts); Array verts; MyMPI_Recv (verts, 0, MPI_TAG_MESH+1); int numvert = verts.Size(); paralleltop -> SetNV (numvert); // INDEX_CLOSED_HASHTABLE glob2loc_vert_ht (3*numvert+1); INDEX_HASHTABLE glob2loc_vert_ht (3*numvert+1); for (int vert = 0; vert < numvert; vert++) { int globvert = verts[vert]; paralleltop->SetLoc2Glob_Vert ( vert+1, globvert ); glob2loc_vert_ht.Set (globvert, vert+1); } for (int i = 0; i < numvert; i++) AddPoint (netgen::Point<3> (0,0,0)); MPI_Datatype mptype = MeshPoint::MyGetMPIType(); MPI_Status status; MPI_Recv( &points[1], numvert, mptype, 0, MPI_TAG_MESH+1, MPI_COMM_WORLD, &status); Array dist_pnums; MyMPI_Recv (dist_pnums, 0, MPI_TAG_MESH+1); for (int hi = 0; hi < dist_pnums.Size(); hi += 3) paralleltop -> SetDistantPNum (dist_pnums[hi+1], dist_pnums[hi]); // , dist_pnums[hi+2]); NgProfiler::StopTimer (timer_pts); *testout << "got " << numvert << " vertices" << endl; { Element el; Array elarray; MyMPI_Recv (elarray, 0, MPI_TAG_MESH+2); NgProfiler::RegionTimer reg(timer_els); for (int ind = 0, elnum = 1; ind < elarray.Size(); elnum++) { paralleltop->SetLoc2Glob_VolEl ( elnum, elarray[ind++]); el.SetIndex(elarray[ind++]); el.SetNP(elarray[ind++]); for ( int j = 0; j < el.GetNP(); j++) el[j] = glob2loc_vert_ht.Get (elarray[ind++]); AddVolumeElement (el); } } { Array fddata; MyMPI_Recv (fddata, 0, MPI_TAG_MESH+3); for (int i = 0; i < fddata.Size(); i += 6) { int faceind = AddFaceDescriptor (FaceDescriptor(int(fddata[i]), int(fddata[i+1]), int(fddata[i+2]), 0)); GetFaceDescriptor(faceind).SetBCProperty (int(fddata[i+3])); GetFaceDescriptor(faceind).domin_singular = fddata[i+4]; GetFaceDescriptor(faceind).domout_singular = fddata[i+5]; } } { NgProfiler::RegionTimer reg(timer_sels); Array selbuf; MyMPI_Recv ( selbuf, 0, MPI_TAG_MESH+4); int ii = 0; int sel = 0; int nlocsel = selbuf[ii++]; paralleltop -> SetNSE ( nlocsel ); while (ii < selbuf.Size()-1) { int globsel = selbuf[ii++]; int faceind = selbuf[ii++]; //bool isghost = selbuf[ii++]; int nep = selbuf[ii++]; Element2d tri(nep); tri.SetIndex(faceind); for(int j = 1; j <= nep; j++) { tri.PNum(j) = glob2loc_vert_ht.Get (selbuf[ii++]); tri.GeomInfoPi(j).trignum = selbuf[ii++]; } paralleltop->SetLoc2Glob_SurfEl ( sel+1, globsel ); AddSurfaceElement (tri); sel ++; } } { Array segmbuf; MyMPI_Recv ( segmbuf, 0, MPI_TAG_MESH+5); Segment seg; int globsegi; int ii = 0; int segi = 1; int nsegloc = int ( segmbuf.Size() / 14 ) ; paralleltop -> SetNSegm ( nsegloc ); while ( ii < segmbuf.Size() ) { globsegi = int (segmbuf[ii++]); seg.si = int (segmbuf[ii++]); seg.pnums[0] = glob2loc_vert_ht.Get (int(segmbuf[ii++])); seg.pnums[1] = glob2loc_vert_ht.Get (int(segmbuf[ii++])); seg.geominfo[0].trignum = int( segmbuf[ii++] ); seg.geominfo[1].trignum = int ( segmbuf[ii++]); seg.surfnr1 = int ( segmbuf[ii++]); seg.surfnr2 = int ( segmbuf[ii++]); seg.edgenr = int ( segmbuf[ii++]); seg.epgeominfo[0].dist = segmbuf[ii++]; seg.epgeominfo[1].edgenr = int (segmbuf[ii++]); seg.epgeominfo[1].dist = segmbuf[ii++]; seg.singedge_left = segmbuf[ii++]; seg.singedge_right = segmbuf[ii++]; seg.epgeominfo[0].edgenr = seg.epgeominfo[1].edgenr; seg.domin = seg.surfnr1; seg.domout = seg.surfnr2; if ( seg.pnums[0] >0 && seg.pnums[1] > 0 ) { paralleltop-> SetLoc2Glob_Segm ( segi, globsegi ); AddSegment (seg); segi++; } } } /** Recv bc-names **/ int nbcs; MyMPI_Recv(nbcs, 0, MPI_TAG_MESH+6); Array bcs(nbcs); MyMPI_Recv(bcs, 0, MPI_TAG_MESH+6); int size_bc = 0; for(int k=0;k matsz(nmats); MyMPI_Recv(matsz, 0, MPI_TAG_MESH+6); int size_mats = 0; for(int k=0;k Update(); // paralleltop -> UpdateCoarseGrid(); SetNextMajorTimeStamp(); } // distribute the mesh to the slave processors // call it only for the master ! void Mesh :: Distribute () { MPI_Comm_size(MPI_COMM_WORLD, &ntasks); MPI_Comm_rank(MPI_COMM_WORLD, &id); if (id != 0 || ntasks == 1 ) return; #ifdef METIS ParallelMetis (); #else for (ElementIndex ei = 0; ei < GetNE(); ei++) (*this)[ei].SetPartition(ntasks * ei/GetNE() + 1); #endif /* for (ElementIndex ei = 0; ei < GetNE(); ei++) *testout << "el(" << ei << ") is in part " << (*this)[ei].GetPartition() << endl; for (SurfaceElementIndex ei = 0; ei < GetNSE(); ei++) *testout << "sel(" << int(ei) << ") is in part " << (*this)[ei].GetPartition() << endl; */ // MyMPI_SendCmd ("mesh"); SendRecvMesh (); } #ifdef METIS5 void Mesh :: ParallelMetis ( ) { PrintMessage (3, "call metis 5 ..."); int timer = NgProfiler::CreateTimer ("Mesh::Partition"); NgProfiler::RegionTimer reg(timer); idx_t ne = GetNE() + GetNSE() + GetNSeg(); idx_t nn = GetNP(); Array eptr, eind; for (int i = 0; i < GetNE(); i++) { eptr.Append (eind.Size()); const Element & el = VolumeElement(i+1); for (int j = 0; j < el.GetNP(); j++) eind.Append (el[j]-1); } for (int i = 0; i < GetNSE(); i++) { eptr.Append (eind.Size()); const Element2d & el = SurfaceElement(i+1); for (int j = 0; j < el.GetNP(); j++) eind.Append (el[j]-1); } for (int i = 0; i < GetNSeg(); i++) { eptr.Append (eind.Size()); const Segment & el = LineSegment(i+1); eind.Append (el[0]-1); eind.Append (el[1]-1); } eptr.Append (eind.Size()); Array epart(ne), npart(nn); idxtype nparts = ntasks-1; idxtype edgecut; idxtype ncommon = 3; METIS_PartMeshDual (&ne, &nn, &eptr[0], &eind[0], NULL, NULL, &ncommon, &nparts, NULL, NULL, &edgecut, &epart[0], &npart[0]); /* METIS_PartMeshNodal (&ne, &nn, &eptr[0], &eind[0], NULL, NULL, &nparts, NULL, NULL, &edgecut, &epart[0], &npart[0]); */ PrintMessage (3, "metis complete"); // cout << "done" << endl; for (int i = 0; i < GetNE(); i++) VolumeElement(i+1).SetPartition(epart[i] + 1); for (int i = 0; i < GetNSE(); i++) SurfaceElement(i+1).SetPartition(epart[i+GetNE()] + 1); for (int i = 0; i < GetNSeg(); i++) LineSegment(i+1).SetPartition(epart[i+GetNE()+GetNSE()] + 1); if (GetDimension() == 3) { // surface elements attached to volume elements Array boundarypoints (GetNP()); boundarypoints = false; for (SurfaceElementIndex sei = 0; sei < GetNSE(); sei++) { const Element2d & el = (*this)[sei]; for (int j = 0; j < el.GetNP(); j++) boundarypoints[el[j]] = true; } // Build Pnt2Element table, boundary points only Array cnt(GetNP()); cnt = 0; for (ElementIndex ei = 0; ei < GetNE(); ei++) { const Element & el = (*this)[ei]; for (int j = 0; j < el.GetNP(); j++) if (boundarypoints[el[j]]) cnt[el[j]]++; } TABLE pnt2el(cnt); cnt = 0; for (ElementIndex ei = 0; ei < GetNE(); ei++) { const Element & el = (*this)[ei]; for (int j = 0; j < el.GetNP(); j++) if (boundarypoints[el[j]]) pnt2el.Add (el[j], ei); } for (SurfaceElementIndex sei = 0; sei < GetNSE(); sei++) { Element2d & sel = (*this)[sei]; PointIndex pi1 = sel[0]; FlatArray els = pnt2el[pi1]; sel.SetPartition (-1); for (int j = 0; j < els.Size(); j++) { const Element & el = (*this)[els[j]]; bool hasall = true; for (int k = 0; k < sel.GetNP(); k++) { bool haspi = false; for (int l = 0; l < el.GetNP(); l++) if (sel[k] == el[l]) haspi = true; if (!haspi) hasall = false; } if (hasall) { sel.SetPartition (el.GetPartition()); break; } } if (sel.GetPartition() == -1) cerr << "no volume element found" << endl; } for (SegmentIndex si = 0; si < GetNSeg(); si++) { Segment & sel = (*this)[si]; PointIndex pi1 = sel[0]; FlatArray els = pnt2el[pi1]; sel.SetPartition (-1); for (int j = 0; j < els.Size(); j++) { const Element & el = (*this)[els[j]]; bool haspi[9] = { false }; // max surfnp for (int k = 0; k < 2; k++) for (int l = 0; l < el.GetNP(); l++) if (sel[k] == el[l]) haspi[k] = true; bool hasall = true; for (int k = 0; k < sel.GetNP(); k++) if (!haspi[k]) hasall = false; if (hasall) { sel.SetPartition (el.GetPartition()); break; } } if (sel.GetPartition() == -1) cerr << "no volume element found" << endl; } } } #endif //========================== weights ================================================================= // distribute the mesh to the slave processors // call it only for the master ! void Mesh :: Distribute (Array & volume_weights , Array & surface_weights, Array & segment_weights) { MPI_Comm_size(MPI_COMM_WORLD, &ntasks); MPI_Comm_rank(MPI_COMM_WORLD, &id); if (id != 0 || ntasks == 1 ) return; #ifdef METIS ParallelMetis (volume_weights, surface_weights, segment_weights); #else for (ElementIndex ei = 0; ei < GetNE(); ei++) (*this)[ei].SetPartition(ntasks * ei/GetNE() + 1); #endif /* for (ElementIndex ei = 0; ei < GetNE(); ei++) *testout << "el(" << ei << ") is in part " << (*this)[ei].GetPartition() << endl; for (SurfaceElementIndex ei = 0; ei < GetNSE(); ei++) *testout << "sel(" << int(ei) << ") is in part " << (*this)[ei].GetPartition() << endl; */ // MyMPI_SendCmd ("mesh"); SendRecvMesh (); } #ifdef METIS5 void Mesh :: ParallelMetis (Array & volume_weights , Array & surface_weights, Array & segment_weights) { PrintMessage (3, "call metis 5 with weights ..."); // cout << "segment_weights " << segment_weights << endl; // cout << "surface_weights " << surface_weights << endl; // cout << "volume_weights " << volume_weights << endl; int timer = NgProfiler::CreateTimer ("Mesh::Partition"); NgProfiler::RegionTimer reg(timer); idx_t ne = GetNE() + GetNSE() + GetNSeg(); idx_t nn = GetNP(); Array eptr, eind , nwgt; for (int i = 0; i < GetNE(); i++) { eptr.Append (eind.Size()); const Element & el = VolumeElement(i+1); int ind = el.GetIndex(); if (volume_weights.Size() epart(ne), npart(nn); idxtype nparts = ntasks-1; idxtype edgecut; idxtype ncommon = 3; METIS_PartMeshDual (&ne, &nn, &eptr[0], &eind[0], &nwgt[0], NULL, &ncommon, &nparts, NULL, NULL, &edgecut, &epart[0], &npart[0]); /* METIS_PartMeshNodal (&ne, &nn, &eptr[0], &eind[0], NULL, NULL, &nparts, NULL, NULL, &edgecut, &epart[0], &npart[0]); */ PrintMessage (3, "metis complete"); // cout << "done" << endl; for (int i = 0; i < GetNE(); i++) VolumeElement(i+1).SetPartition(epart[i] + 1); for (int i = 0; i < GetNSE(); i++) SurfaceElement(i+1).SetPartition(epart[i+GetNE()] + 1); for (int i = 0; i < GetNSeg(); i++) LineSegment(i+1).SetPartition(epart[i+GetNE()+GetNSE()] + 1); } #endif //=========================================================================================== #ifdef METIS4 void Mesh :: ParallelMetis ( ) { int timer = NgProfiler::CreateTimer ("Mesh::Partition"); NgProfiler::RegionTimer reg(timer); PrintMessage (3, "Metis called"); if (GetDimension() == 2) { PartDualHybridMesh2D ( ); // neloc ); return; } idx_t ne = GetNE(); idx_t nn = GetNP(); if (ntasks <= 2 || ne <= 1) { if (ntasks == 1) return; for (int i=1; i<=ne; i++) VolumeElement(i).SetPartition(1); for (int i=1; i<=GetNSE(); i++) SurfaceElement(i).SetPartition(1); return; } bool uniform_els = true; ELEMENT_TYPE elementtype = TET; for (int el = 1; el <= GetNE(); el++) if (VolumeElement(el).GetType() != elementtype) { uniform_els = false; break; } if (!uniform_els) { PartHybridMesh (); } else { // uniform (TET) mesh, JS int npe = VolumeElement(1).GetNP(); Array elmnts(ne*npe); int etype; if (elementtype == TET) etype = 2; else if (elementtype == HEX) etype = 3; for (int i=1; i<=ne; i++) for (int j=1; j<=npe; j++) elmnts[(i-1)*npe+(j-1)] = VolumeElement(i).PNum(j)-1; int numflag = 0; int nparts = ntasks-1; int ncommon = 3; int edgecut; Array epart(ne), npart(nn); // if ( ntasks == 1 ) // { // (*this) = *mastermesh; // nparts = 4; // metis :: METIS_PartMeshDual (&ne, &nn, elmnts, &etype, &numflag, &nparts, // &edgecut, epart, npart); // cout << "done" << endl; // cout << "edge-cut: " << edgecut << ", balance: " << metis :: ComputeElementBalance(ne, nparts, epart) << endl; // for (int i=1; i<=ne; i++) // { // mastermesh->VolumeElement(i).SetPartition(epart[i-1]); // } // return; // } int timermetis = NgProfiler::CreateTimer ("Metis itself"); NgProfiler::StartTimer (timermetis); #ifdef METIS4 cout << "call metis(4)_PartMeshDual ... " << flush; METIS_PartMeshDual (&ne, &nn, &elmnts[0], &etype, &numflag, &nparts, &edgecut, &epart[0], &npart[0]); #else cout << "call metis(5)_PartMeshDual ... " << endl; // idx_t options[METIS_NOPTIONS]; Array eptr(ne+1); for (int j = 0; j < ne+1; j++) eptr[j] = 4*j; METIS_PartMeshDual (&ne, &nn, &eptr[0], &elmnts[0], NULL, NULL, &ncommon, &nparts, NULL, NULL, &edgecut, &epart[0], &npart[0]); #endif NgProfiler::StopTimer (timermetis); cout << "complete" << endl; #ifdef METIS4 cout << "edge-cut: " << edgecut << ", balance: " << ComputeElementBalance(ne, nparts, &epart[0]) << endl; #endif // partition numbering by metis : 0 ... ntasks - 1 // we want: 1 ... ntasks for (int i=1; i<=ne; i++) VolumeElement(i).SetPartition(epart[i-1] + 1); } for (int sei = 1; sei <= GetNSE(); sei++ ) { int ei1, ei2; GetTopology().GetSurface2VolumeElement (sei, ei1, ei2); Element2d & sel = SurfaceElement (sei); for (int j = 0; j < 2; j++) { int ei = (j == 0) ? ei1 : ei2; if ( ei > 0 && ei <= GetNE() ) { sel.SetPartition (VolumeElement(ei).GetPartition()); break; } } } } #endif void Mesh :: PartHybridMesh () { #ifdef METIS int ne = GetNE(); int nn = GetNP(); int nedges = topology.GetNEdges(); idxtype *xadj, * adjacency, *v_weights = NULL, *e_weights = NULL; int weightflag = 0; int numflag = 0; int nparts = ntasks - 1; int options[5]; options[0] = 0; int edgecut; idxtype * part; xadj = new idxtype[nn+1]; part = new idxtype[nn]; Array cnt(nn+1); cnt = 0; for ( int edge = 1; edge <= nedges; edge++ ) { int v1, v2; topology.GetEdgeVertices ( edge, v1, v2); cnt[v1-1] ++; cnt[v2-1] ++; } xadj[0] = 0; for ( int n = 1; n <= nn; n++ ) { xadj[n] = idxtype(xadj[n-1] + cnt[n-1]); } adjacency = new idxtype[xadj[nn]]; cnt = 0; for ( int edge = 1; edge <= nedges; edge++ ) { int v1, v2; topology.GetEdgeVertices ( edge, v1, v2); adjacency[ xadj[v1-1] + cnt[v1-1] ] = v2-1; adjacency[ xadj[v2-1] + cnt[v2-1] ] = v1-1; cnt[v1-1]++; cnt[v2-1]++; } for ( int vert = 0; vert < nn; vert++ ) { FlatArray array ( cnt[vert], &adjacency[ xadj[vert] ] ); BubbleSort(array); } #ifdef METIS4 METIS_PartGraphKway ( &nn, xadj, adjacency, v_weights, e_weights, &weightflag, &numflag, &nparts, options, &edgecut, part ); #else cout << "currently not supported (metis5), A" << endl; #endif Array nodesinpart(ntasks); for ( int el = 1; el <= ne; el++ ) { Element & volel = VolumeElement(el); nodesinpart = 0; int el_np = volel.GetNP(); int partition = 0; for ( int i = 0; i < el_np; i++ ) nodesinpart[ part[volel[i]-1]+1 ] ++; for ( int i = 1; i < ntasks; i++ ) if ( nodesinpart[i] > nodesinpart[partition] ) partition = i; volel.SetPartition(partition); } delete [] xadj; delete [] part; delete [] adjacency; #else cout << "parthybridmesh not available" << endl; #endif } void Mesh :: PartDualHybridMesh ( ) // Array & neloc ) { #ifdef METIS int ne = GetNE(); // int nn = GetNP(); // int nedges = topology->GetNEdges(); int nfaces = topology.GetNFaces(); idxtype *xadj, * adjacency, *v_weights = NULL, *e_weights = NULL; int weightflag = 0; // int numflag = 0; int nparts = ntasks - 1; int options[5]; options[0] = 0; int edgecut; idxtype * part; Array facevolels1(nfaces), facevolels2(nfaces); facevolels1 = -1; facevolels2 = -1; Array elfaces; xadj = new idxtype[ne+1]; part = new idxtype[ne]; Array cnt(ne+1); cnt = 0; for ( int el=1; el <= ne; el++ ) { Element volel = VolumeElement(el); topology.GetElementFaces(el, elfaces); for ( int i = 0; i < elfaces.Size(); i++ ) { if ( facevolels1[elfaces[i]-1] == -1 ) facevolels1[elfaces[i]-1] = el; else { facevolels2[elfaces[i]-1] = el; cnt[facevolels1[elfaces[i]-1]-1]++; cnt[facevolels2[elfaces[i]-1]-1]++; } } } xadj[0] = 0; for ( int n = 1; n <= ne; n++ ) { xadj[n] = idxtype(xadj[n-1] + cnt[n-1]); } adjacency = new idxtype[xadj[ne]]; cnt = 0; for ( int face = 1; face <= nfaces; face++ ) { int e1, e2; e1 = facevolels1[face-1]; e2 = facevolels2[face-1]; if ( e2 == -1 ) continue; adjacency[ xadj[e1-1] + cnt[e1-1] ] = e2-1; adjacency[ xadj[e2-1] + cnt[e2-1] ] = e1-1; cnt[e1-1]++; cnt[e2-1]++; } for ( int el = 0; el < ne; el++ ) { FlatArray array ( cnt[el], &adjacency[ xadj[el] ] ); BubbleSort(array); } int timermetis = NgProfiler::CreateTimer ("Metis itself"); NgProfiler::StartTimer (timermetis); #ifdef METIS4 METIS_PartGraphKway ( &ne, xadj, adjacency, v_weights, e_weights, &weightflag, &numflag, &nparts, options, &edgecut, part ); #else cout << "currently not supported (metis5), B" << endl; #endif NgProfiler::StopTimer (timermetis); Array nodesinpart(ntasks); for ( int el = 1; el <= ne; el++ ) { // Element & volel = VolumeElement(el); nodesinpart = 0; VolumeElement(el).SetPartition(part[el-1 ] + 1); } /* for ( int i=1; i<=ne; i++) { neloc[ VolumeElement(i).GetPartition() ] ++; } */ delete [] xadj; delete [] part; delete [] adjacency; #else cout << "partdualmesh not available" << endl; #endif } void Mesh :: PartDualHybridMesh2D ( ) { #ifdef METIS idxtype ne = GetNSE(); int nv = GetNV(); Array xadj(ne+1); Array adjacency(ne*4); // first, build the vertex 2 element table: Array cnt(nv); cnt = 0; for (SurfaceElementIndex sei = 0; sei < GetNSE(); sei++) for (int j = 0; j < (*this)[sei].GetNP(); j++) cnt[ (*this)[sei][j] ] ++; TABLE vert2els(cnt); for (SurfaceElementIndex sei = 0; sei < GetNSE(); sei++) for (int j = 0; j < (*this)[sei].GetNP(); j++) vert2els.Add ((*this)[sei][j], sei); // find all neighbour elements int cntnb = 0; Array marks(ne); // to visit each neighbour just once marks = -1; for (SurfaceElementIndex sei = 0; sei < ne; sei++) { xadj[sei] = cntnb; for (int j = 0; j < (*this)[sei].GetNP(); j++) { PointIndex vnr = (*this)[sei][j]; // all elements with at least one common vertex for (int k = 0; k < vert2els[vnr].Size(); k++) { SurfaceElementIndex sei2 = vert2els[vnr][k]; if (sei == sei2) continue; if (marks[sei2] == sei) continue; // neighbour, if two common vertices int common = 0; for (int m1 = 0; m1 < (*this)[sei].GetNP(); m1++) for (int m2 = 0; m2 < (*this)[sei2].GetNP(); m2++) if ( (*this)[sei][m1] == (*this)[sei2][m2]) common++; if (common >= 2) { marks[sei2] = sei; // mark as visited adjacency[cntnb++] = sei2; } } } } xadj[ne] = cntnb; idxtype *v_weights = NULL, *e_weights = NULL; idxtype weightflag = 0; // int numflag = 0; idxtype nparts = ntasks - 1; idxtype edgecut; Array part(ne); for ( int el = 0; el < ne; el++ ) BubbleSort (adjacency.Range (xadj[el], xadj[el+1])); #ifdef METIS4 int options[5]; options[0] = 0; METIS_PartGraphKway ( &ne, &xadj[0], &adjacency[0], v_weights, e_weights, &weightflag, &numflag, &nparts, options, &edgecut, &part[0] ); #else idx_t ncon = 1; METIS_PartGraphKway ( &ne, &ncon, &xadj[0], &adjacency[0], v_weights, NULL, e_weights, &nparts, NULL, NULL, NULL, &edgecut, &part[0] ); #endif for (SurfaceElementIndex sei = 0; sei < ne; sei++) (*this) [sei].SetPartition (part[sei]+1); #else cout << "partdualmesh not available" << endl; #endif } } #endif netgen-6.2.1804/libsrc/meshing/basegeom.cpp0000644000175000017500000000234413272137567017206 0ustar kurtkurt#include #include "meshing.hpp" namespace netgen { DLL_HEADER GeometryRegisterArray geometryregister; //DLL_HEADER Array geometryregister; GeometryRegister :: ~GeometryRegister() { ; } int NetgenGeometry :: GenerateMesh (shared_ptr & mesh, MeshingParameters & mparam) { if (!mesh) return 1; if (mparam.perfstepsstart <= MESHCONST_MESHVOLUME) { multithread.task = "Volume meshing"; MESHING3_RESULT res = MeshVolume (mparam, *mesh); if (res != MESHING3_OK) return 1; if (multithread.terminate) return 0; RemoveIllegalElements (*mesh); if (multithread.terminate) return 0; MeshQuality3d (*mesh); } if (multithread.terminate || mparam.perfstepsend <= MESHCONST_MESHVOLUME) return 0; if (mparam.perfstepsstart <= MESHCONST_OPTVOLUME) { multithread.task = "Volume optimization"; OptimizeVolume (mparam, *mesh); if (multithread.terminate) return 0; } return 0; } const Refinement & NetgenGeometry :: GetRefinement () const { return *new Refinement;; } void NetgenGeometry :: Save (string filename) const { throw NgException("Cannot save geometry - no geometry available"); } } netgen-6.2.1804/libsrc/meshing/meshclass.cpp0000644000175000017500000047377713272137567017434 0ustar kurtkurt#include #include #include "meshing.hpp" namespace netgen { static mutex buildsearchtree_mutex; Mesh :: Mesh () : topology(*this), surfarea(*this) { // volelements.SetName ("vol elements"); // surfelements.SetName ("surf elements"); // points.SetName ("meshpoints"); boundaryedges = NULL; surfelementht = NULL; segmentht = NULL; lochfunc = NULL; mglevels = 1; elementsearchtree = NULL; elementsearchtreets = NextTimeStamp(); majortimestamp = timestamp = NextTimeStamp(); hglob = 1e10; hmin = 0; numvertices = -1; dimension = 3; // topology = new MeshTopology (*this); curvedelems = new CurvedElements (*this); clusters = new AnisotropicClusters (*this); ident = new Identifications (*this); hpelements = NULL; coarsemesh = NULL; ps_startelement = 0; geomtype = NO_GEOM; bcnames.SetSize(0); cd2names.SetSize(0); #ifdef PARALLEL paralleltop = new ParallelMeshTopology (*this); #endif } Mesh :: ~Mesh() { // cout << "******************** deleting Mesh **********" << endl; delete lochfunc; delete boundaryedges; delete surfelementht; delete segmentht; delete curvedelems; delete clusters; // delete topology; delete ident; delete elementsearchtree; delete coarsemesh; delete hpelements; for (int i = 0; i < materials.Size(); i++) delete materials[i]; for(int i = 0; i < userdata_int.Size(); i++) delete userdata_int[i]; for(int i = 0; i < userdata_double.Size(); i++) delete userdata_double[i]; for (int i = 0; i < bcnames.Size(); i++ ) delete bcnames[i]; for (int i = 0; i < cd2names.Size(); i++) delete cd2names[i]; #ifdef PARALLEL delete paralleltop; #endif } Mesh & Mesh :: operator= (const Mesh & mesh2) { points = mesh2.points; // eltyps = mesh2.eltyps; segments = mesh2.segments; surfelements = mesh2.surfelements; volelements = mesh2.volelements; lockedpoints = mesh2.lockedpoints; facedecoding = mesh2.facedecoding; dimension = mesh2.dimension; bcnames.SetSize( mesh2.bcnames.Size() ); for ( int i = 0; i < mesh2.bcnames.Size(); i++ ) if ( mesh2.bcnames[i] ) bcnames[i] = new string ( *mesh2.bcnames[i] ); else bcnames[i] = 0; cd2names.SetSize(mesh2.cd2names.Size()); for (int i=0; i < mesh2.cd2names.Size(); i++) if (mesh2.cd2names[i]) cd2names[i] = new string(*mesh2.cd2names[i]); else cd2names[i] = 0; return *this; } void Mesh :: DeleteMesh() { NgLock lock(mutex); lock.Lock(); points.SetSize(0); segments.SetSize(0); surfelements.SetSize(0); volelements.SetSize(0); lockedpoints.SetSize(0); // surfacesonnode.SetSize(0); delete boundaryedges; boundaryedges = NULL; openelements.SetSize(0); facedecoding.SetSize(0); delete ident; ident = new Identifications (*this); // delete topology; // topology = new MeshTopology (*this); topology = MeshTopology (*this); delete curvedelems; curvedelems = new CurvedElements (*this); delete clusters; clusters = new AnisotropicClusters (*this); for ( int i = 0; i < bcnames.Size(); i++ ) if ( bcnames[i] ) delete bcnames[i]; for (int i= 0; i< cd2names.Size(); i++) if (cd2names[i]) delete cd2names[i]; #ifdef PARALLEL delete paralleltop; paralleltop = new ParallelMeshTopology (*this); #endif lock.UnLock(); timestamp = NextTimeStamp(); } void Mesh :: ClearSurfaceElements() { surfelements.SetSize(0); for (int i = 0; i < facedecoding.Size(); i++) facedecoding[i].firstelement = -1; timestamp = NextTimeStamp(); } PointIndex Mesh :: AddPoint (const Point3d & p, int layer) { return AddPoint (p, layer, INNERPOINT); /* NgLock lock(mutex); lock.Lock(); timestamp = NextTimeStamp(); PointIndex pi = points.End(); points.Append ( MeshPoint (p, layer, INNERPOINT) ); lock.UnLock(); return pi; */ } PointIndex Mesh :: AddPoint (const Point3d & p, int layer, POINTTYPE type) { NgLock lock(mutex); lock.Lock(); timestamp = NextTimeStamp(); PointIndex pi = points.End(); points.Append ( MeshPoint (p, layer, type) ); lock.UnLock(); return pi; } /* #ifdef PARALLEL PointIndex Mesh :: AddPoint (const Point3d & p, bool isghost, int layer) { NgLock lock(mutex); lock.Lock(); timestamp = NextTimeStamp(); PointIndex pi = points.Size() + PointIndex::BASE; points.Append ( MeshPoint (p, layer, INNERPOINT) ); lock.UnLock(); return pi; } PointIndex Mesh :: AddPoint (const Point3d & p, bool isghost, int layer, POINTTYPE type) { NgLock lock(mutex); lock.Lock(); timestamp = NextTimeStamp(); PointIndex pi = points.Size() + PointIndex::BASE; points.Append ( MeshPoint (p, layer, type) ); lock.UnLock(); return pi; } #endif */ SegmentIndex Mesh :: AddSegment (const Segment & s) { NgLock lock(mutex); lock.Lock(); timestamp = NextTimeStamp(); int maxn = max2 (s[0], s[1]); maxn += 1-PointIndex::BASE; /* if (maxn > ptyps.Size()) { int maxo = ptyps.Size(); ptyps.SetSize (maxn); for (int i = maxo; i < maxn; i++) ptyps[i] = INNERPOINT; } if (ptyps[s[0]] > EDGEPOINT) ptyps[s[0]] = EDGEPOINT; if (ptyps[s[1]] > EDGEPOINT) ptyps[s[1]] = EDGEPOINT; */ if (maxn <= points.Size()) { if (points[s[0]].Type() > EDGEPOINT) points[s[0]].SetType (EDGEPOINT); if (points[s[1]].Type() > EDGEPOINT) points[s[1]].SetType (EDGEPOINT); } /* else { cerr << "edge points nrs > points.Size" << endl; } */ SegmentIndex si = segments.Size(); segments.Append (s); lock.UnLock(); return si; } SurfaceElementIndex Mesh :: AddSurfaceElement (const Element2d & el) { NgLock lock(mutex); lock.Lock(); timestamp = NextTimeStamp(); int maxn = el[0]; for (int i = 1; i < el.GetNP(); i++) if (el[i] > maxn) maxn = el[i]; maxn += 1-PointIndex::BASE; /* if (maxn > ptyps.Size()) { int maxo = ptyps.Size(); ptyps.SetSize (maxn); for (i = maxo+PointIndex::BASE; i < maxn+PointIndex::BASE; i++) ptyps[i] = INNERPOINT; } */ if (maxn <= points.Size()) { for (int i = 0; i < el.GetNP(); i++) if (points[el[i]].Type() > SURFACEPOINT) points[el[i]].SetType(SURFACEPOINT); } /* else { cerr << "surf points nrs > points.Size" << endl; } */ SurfaceElementIndex si = surfelements.Size(); surfelements.Append (el); if (el.index > facedecoding.Size()) cerr << "has no facedecoding: fd.size = " << facedecoding.Size() << ", ind = " << el.index << endl; surfelements.Last().next = facedecoding[el.index-1].firstelement; facedecoding[el.index-1].firstelement = si; if (SurfaceArea().Valid()) SurfaceArea().Add (el); lock.UnLock(); return si; } void Mesh :: SetSurfaceElement (SurfaceElementIndex sei, const Element2d & el) { int maxn = el[0]; for (int i = 1; i < el.GetNP(); i++) if (el[i] > maxn) maxn = el[i]; maxn += 1-PointIndex::BASE; if (maxn <= points.Size()) { for (int i = 0; i < el.GetNP(); i++) if (points[el[i]].Type() > SURFACEPOINT) points[el[i]].SetType(SURFACEPOINT); } surfelements[sei] = el; if (el.index > facedecoding.Size()) cerr << "has no facedecoding: fd.size = " << facedecoding.Size() << ", ind = " << el.index << endl; // add lock-free to list ... slow, call RebuildSurfaceElementLists later /* surfelements[sei].next = facedecoding[el.index-1].firstelement; auto & head = reinterpret_cast&> (facedecoding[el.index-1].firstelement); while (!head.compare_exchange_weak (surfelements[sei].next, sei)) ; */ /* if (SurfaceArea().Valid()) SurfaceArea().Add (el); */ } ElementIndex Mesh :: AddVolumeElement (const Element & el) { NgLock lock(mutex); lock.Lock(); int maxn = el[0]; for (int i = 1; i < el.GetNP(); i++) if (el[i] > maxn) maxn = el[i]; maxn += 1-PointIndex::BASE; /* if (maxn > ptyps.Size()) { int maxo = ptyps.Size(); ptyps.SetSize (maxn); for (i = maxo+PointIndex::BASE; i < maxn+PointIndex::BASE; i++) ptyps[i] = INNERPOINT; } */ /* if (maxn > points.Size()) { cerr << "add vol element before point" << endl; } */ int ve = volelements.Size(); volelements.Append (el); volelements.Last().flags.illegal_valid = 0; // while (volelements.Size() > eltyps.Size()) // eltyps.Append (FREEELEMENT); timestamp = NextTimeStamp(); lock.UnLock(); return ve; } void Mesh :: SetVolumeElement (ElementIndex ei, const Element & el) { /* int maxn = el[0]; for (int i = 1; i < el.GetNP(); i++) if (el[i] > maxn) maxn = el[i]; maxn += 1-PointIndex::BASE; */ volelements[ei] = el; volelements.Last().flags.illegal_valid = 0; } void Mesh :: Save (const string & filename) const { ostream * outfile; if (filename.find(".vol.gz")!=string::npos) outfile = new ogzstream(filename.c_str()); else if (filename.find(".vol")!=string::npos) outfile = new ofstream(filename.c_str()); else outfile = new ogzstream((filename+".vol.gz").c_str()); Save(*outfile); delete outfile; } void Mesh :: Save (ostream & outfile) const { int i, j; double scale = 1; // globflags.GetNumFlag ("scale", 1); int inverttets = 0; // globflags.GetDefineFlag ("inverttets"); int invertsurf = 0; // globflags.GetDefineFlag ("invertsurfacemesh"); outfile << "mesh3d" << "\n"; outfile << "dimension\n" << GetDimension() << "\n"; outfile << "geomtype\n" << int(geomtype) << "\n"; outfile << "\n"; outfile << "# surfnr bcnr domin domout np p1 p2 p3" << "\n"; switch (geomtype) { case GEOM_STL: outfile << "surfaceelementsgi" << "\n"; break; case GEOM_OCC: case GEOM_ACIS: outfile << "surfaceelementsuv" << "\n"; break; default: outfile << "surfaceelements" << "\n"; } outfile << GetNSE() << "\n"; SurfaceElementIndex sei; for (sei = 0; sei < GetNSE(); sei++) { if ((*this)[sei].GetIndex()) { outfile << " " << GetFaceDescriptor((*this)[sei].GetIndex ()).SurfNr()+1; outfile << " " << GetFaceDescriptor((*this)[sei].GetIndex ()).BCProperty(); outfile << " " << GetFaceDescriptor((*this)[sei].GetIndex ()).DomainIn(); outfile << " " << GetFaceDescriptor((*this)[sei].GetIndex ()).DomainOut(); } else outfile << " 0 0 0"; Element2d sel = (*this)[sei]; if (invertsurf) sel.Invert(); outfile << " " << sel.GetNP(); for (j = 0; j < sel.GetNP(); j++) outfile << " " << sel[j]; switch (geomtype) { case GEOM_STL: for (j = 1; j <= sel.GetNP(); j++) outfile << " " << sel.GeomInfoPi(j).trignum; break; case GEOM_OCC: case GEOM_ACIS: for (j = 1; j <= sel.GetNP(); j++) { outfile << " " << sel.GeomInfoPi(j).u; outfile << " " << sel.GeomInfoPi(j).v; } break; default: ; } outfile << "\n"; } outfile << "\n" << "\n"; outfile << "# matnr np p1 p2 p3 p4" << "\n"; outfile << "volumeelements" << "\n"; outfile << GetNE() << "\n"; for (ElementIndex ei = 0; ei < GetNE(); ei++) { outfile << (*this)[ei].GetIndex(); outfile << " " << (*this)[ei].GetNP(); Element el = (*this)[ei]; if (inverttets) el.Invert(); for (j = 0; j < el.GetNP(); j++) outfile << " " << el[j]; outfile << "\n"; } outfile << "\n" << "\n"; // outfile << " surf1 surf2 p1 p2" << "\n"; outfile << "# surfid 0 p1 p2 trignum1 trignum2 domin/surfnr1 domout/surfnr2 ednr1 dist1 ednr2 dist2 \n"; outfile << "edgesegmentsgi2" << "\n"; outfile << GetNSeg() << "\n"; for (i = 1; i <= GetNSeg(); i++) { const Segment & seg = LineSegment (i); outfile.width(8); outfile << seg.si; // 2D: bc number, 3D: wievielte Kante outfile.width(8); outfile << 0; outfile.width(8); outfile << seg[0]; outfile.width(8); outfile << seg[1]; outfile << " "; outfile.width(8); outfile << seg.geominfo[0].trignum; // stl dreiecke outfile << " "; outfile.width(8); outfile << seg.geominfo[1].trignum; // << endl; // stl dreieck if (dimension == 3) { outfile << " "; outfile.width(8); outfile << seg.surfnr1+1; outfile << " "; outfile.width(8); outfile << seg.surfnr2+1; } else { outfile << " "; outfile.width(8); outfile << seg.domin; outfile << " "; outfile.width(8); outfile << seg.domout; } outfile << " "; outfile.width(8); outfile << seg.edgenr; outfile << " "; outfile.width(12); outfile.precision(16); outfile << seg.epgeominfo[0].dist; // splineparameter (2D) outfile << " "; outfile.width(8); outfile.precision(16); outfile << seg.epgeominfo[1].edgenr; // geometry dependent outfile << " "; outfile.width(12); outfile << seg.epgeominfo[1].dist; outfile << "\n"; } outfile << "\n" << "\n"; outfile << "# X Y Z" << "\n"; outfile << "points" << "\n"; outfile << GetNP() << "\n"; outfile.precision(16); outfile.setf (ios::fixed, ios::floatfield); outfile.setf (ios::showpoint); PointIndex pi; for (pi = PointIndex::BASE; pi < GetNP()+PointIndex::BASE; pi++) { outfile.width(22); outfile << (*this)[pi](0)/scale << " "; outfile.width(22); outfile << (*this)[pi](1)/scale << " "; outfile.width(22); outfile << (*this)[pi](2)/scale << "\n"; } if (ident -> GetMaxNr() > 0) { outfile << "identifications\n"; Array identpairs; int cnt = 0; for (i = 1; i <= ident -> GetMaxNr(); i++) { ident -> GetPairs (i, identpairs); cnt += identpairs.Size(); } outfile << cnt << "\n"; for (i = 1; i <= ident -> GetMaxNr(); i++) { ident -> GetPairs (i, identpairs); for (j = 1; j <= identpairs.Size(); j++) { outfile.width (8); outfile << identpairs.Get(j).I1(); outfile.width (8); outfile << identpairs.Get(j).I2(); outfile.width (8); outfile << i << "\n"; } } outfile << "identificationtypes\n"; outfile << ident -> GetMaxNr() << "\n"; for (i = 1; i <= ident -> GetMaxNr(); i++) { int type = ident -> GetType(i); outfile << " " << type; } outfile << "\n"; } int cntmat = 0; for (i = 1; i <= materials.Size(); i++) if (materials.Get(i) && materials.Get(i)->length()) cntmat++; if (cntmat) { outfile << "materials" << endl; outfile << cntmat << endl; for (i = 1; i <= materials.Size(); i++) if (materials.Get(i) && materials.Get(i)->length()) outfile << i << " " << *materials.Get(i) << endl; } int cntbcnames = 0; for ( int ii = 0; ii < bcnames.Size(); ii++ ) if ( bcnames[ii] ) cntbcnames++; if ( cntbcnames ) { outfile << "\n\nbcnames" << endl << bcnames.Size() << endl; for ( i = 0; i < bcnames.Size(); i++ ) outfile << i+1 << "\t" << GetBCName(i) << endl; outfile << endl << endl; } int cntcd2names = 0; for (int ii = 0; ii=1.) cnt_sing++; if (cnt_sing) { outfile << "singular_points" << endl << cnt_sing << endl; for (PointIndex pi = points.Begin(); pi < points.End(); pi++) if ((*this)[pi].Singularity()>=1.) outfile << int(pi) << "\t" << (*this)[pi].Singularity() << endl; } cnt_sing = 0; for (SegmentIndex si = 0; si < GetNSeg(); si++) if ( segments[si].singedge_left ) cnt_sing++; if (cnt_sing) { outfile << "singular_edge_left" << endl << cnt_sing << endl; for (SegmentIndex si = 0; si < GetNSeg(); si++) if ( segments[si].singedge_left ) outfile << int(si) << "\t" << segments[si].singedge_left << endl; } cnt_sing = 0; for (SegmentIndex si = 0; si < GetNSeg(); si++) if ( segments[si].singedge_right ) cnt_sing++; if (cnt_sing) { outfile << "singular_edge_right" << endl << cnt_sing << endl; for (SegmentIndex si = 0; si < GetNSeg(); si++) if ( segments[si].singedge_right ) outfile << int(si) << "\t" << segments[si].singedge_right << endl; } cnt_sing = 0; for (SurfaceElementIndex sei = 0; sei < GetNSE(); sei++) if ( GetFaceDescriptor ((*this)[sei].GetIndex()).domin_singular) cnt_sing++; if (cnt_sing) { outfile << "singular_face_inside" << endl << cnt_sing << endl; for (SurfaceElementIndex sei = 0; sei < GetNSE(); sei++) if ( GetFaceDescriptor ((*this)[sei].GetIndex()).domin_singular) outfile << int(sei) << "\t" << GetFaceDescriptor ((*this)[sei].GetIndex()).domin_singular << endl; } cnt_sing = 0; for (SurfaceElementIndex sei = 0; sei < GetNSE(); sei++) if ( GetFaceDescriptor ((*this)[sei].GetIndex()).domout_singular) cnt_sing++; if (cnt_sing) { outfile << "singular_face_outside" << endl << cnt_sing << endl; for (SurfaceElementIndex sei = 0; sei < GetNSE(); sei++) if ( GetFaceDescriptor ((*this)[sei].GetIndex()).domout_singular) outfile << int(sei) << "\t" << GetFaceDescriptor ((*this)[sei].GetIndex()).domout_singular << endl; } // Philippose - 09/07/2009 // Add mesh face colours to Netgen Vol file format // The colours are saved in RGB triplets int cnt_facedesc = GetNFD(); if (cnt_facedesc) { outfile << endl << endl << "# Surfnr Red Green Blue" << endl; outfile << "face_colours" << endl << cnt_facedesc << endl; outfile.precision(8); outfile.setf(ios::fixed, ios::floatfield); outfile.setf(ios::showpoint); for(i = 1; i <= cnt_facedesc; i++) { outfile.width(8); outfile << GetFaceDescriptor(i).SurfNr()+1 << " "; outfile.width(12); outfile << GetFaceDescriptor(i).SurfColour().X() << " "; outfile.width(12); outfile << GetFaceDescriptor(i).SurfColour().Y() << " "; outfile.width(12); outfile << GetFaceDescriptor(i).SurfColour().Z(); outfile << endl; } } outfile << endl << endl << "endmesh" << endl << endl; if (geometry) geometry -> SaveToMeshFile (outfile); } void Mesh :: Load (const string & filename) { cout << "filename = " << filename << endl; istream * infile = NULL; if (filename.find(".vol.gz") != string::npos) infile = new igzstream (filename.c_str()); else infile = new ifstream (filename.c_str()); // ifstream infile(filename.c_str()); if (! (infile -> good()) ) throw NgException ("mesh file not found"); Load(*infile); delete infile; } void Mesh :: Load (istream & infile) { if (! (infile.good()) ) { cout << "cannot load mesh" << endl; throw NgException ("mesh file not found"); } char str[100]; int i, n; double scale = 1; // globflags.GetNumFlag ("scale", 1); int inverttets = 0; // globflags.GetDefineFlag ("inverttets"); int invertsurf = 0; // globflags.GetDefineFlag ("invertsurfacemesh"); facedecoding.SetSize(0); bool endmesh = false; while (infile.good() && !endmesh) { infile >> str; if (strcmp (str, "dimension") == 0) { infile >> dimension; } if (strcmp (str, "geomtype") == 0) { int hi; infile >> hi; geomtype = GEOM_TYPE(hi); } if (strcmp (str, "surfaceelements") == 0 || strcmp (str, "surfaceelementsgi")==0 || strcmp (str, "surfaceelementsuv") == 0) { infile >> n; PrintMessage (3, n, " surface elements"); bool geominfo = strcmp (str, "surfaceelementsgi") == 0; bool uv = strcmp (str, "surfaceelementsuv") == 0; for (i = 1; i <= n; i++) { int surfnr, bcp, domin, domout, nep, faceind = 0; infile >> surfnr >> bcp >> domin >> domout; surfnr--; bool invert_el = false; /* if (domin == 0) { invert_el = true; Swap (domin, domout); } */ for (int j = 1; j <= facedecoding.Size(); j++) if (GetFaceDescriptor(j).SurfNr() == surfnr && GetFaceDescriptor(j).BCProperty() == bcp && GetFaceDescriptor(j).DomainIn() == domin && GetFaceDescriptor(j).DomainOut() == domout) faceind = j; // if (facedecoding.Size()) faceind = 1; // for timing if (!faceind) { faceind = AddFaceDescriptor (FaceDescriptor(surfnr, domin, domout, 0)); GetFaceDescriptor(faceind).SetBCProperty (bcp); } infile >> nep; if (!nep) nep = 3; Element2d tri(nep); tri.SetIndex(faceind); for (int j = 1; j <= nep; j++) infile >> tri.PNum(j); if (geominfo) for (int j = 1; j <= nep; j++) infile >> tri.GeomInfoPi(j).trignum; if (uv) for (int j = 1; j <= nep; j++) infile >> tri.GeomInfoPi(j).u >> tri.GeomInfoPi(j).v; if (invertsurf) tri.Invert(); if (invert_el) tri.Invert(); AddSurfaceElement (tri); } } if (strcmp (str, "volumeelements") == 0) { infile >> n; PrintMessage (3, n, " volume elements"); for (i = 1; i <= n; i++) { Element el(TET); int hi, nep; infile >> hi; if (hi == 0) hi = 1; el.SetIndex(hi); infile >> nep; el.SetNP(nep); el.SetCurved (nep != 4); for (int j = 0; j < nep; j++) infile >> (int&)(el[j]); if (inverttets) el.Invert(); AddVolumeElement (el); } } if (strcmp (str, "edgesegments") == 0) { infile >> n; for (i = 1; i <= n; i++) { Segment seg; int hi; infile >> seg.si >> hi >> seg[0] >> seg[1]; AddSegment (seg); } } if (strcmp (str, "edgesegmentsgi") == 0) { infile >> n; for (i = 1; i <= n; i++) { Segment seg; int hi; infile >> seg.si >> hi >> seg[0] >> seg[1] >> seg.geominfo[0].trignum >> seg.geominfo[1].trignum; AddSegment (seg); } } if (strcmp (str, "edgesegmentsgi2") == 0) { int a; infile >> a; n=a; PrintMessage (3, n, " curve elements"); for (i = 1; i <= n; i++) { Segment seg; int hi; infile >> seg.si >> hi >> seg[0] >> seg[1] >> seg.geominfo[0].trignum >> seg.geominfo[1].trignum >> seg.surfnr1 >> seg.surfnr2 >> seg.edgenr >> seg.epgeominfo[0].dist >> seg.epgeominfo[1].edgenr >> seg.epgeominfo[1].dist; seg.epgeominfo[0].edgenr = seg.epgeominfo[1].edgenr; seg.domin = seg.surfnr1; seg.domout = seg.surfnr2; seg.surfnr1--; seg.surfnr2--; AddSegment (seg); } } if (strcmp (str, "points") == 0) { infile >> n; PrintMessage (3, n, " points"); for (i = 1; i <= n; i++) { Point3d p; infile >> p.X() >> p.Y() >> p.Z(); p.X() *= scale; p.Y() *= scale; p.Z() *= scale; AddPoint (p); } PrintMessage (3, n, " points done"); } if (strcmp (str, "identifications") == 0) { infile >> n; PrintMessage (3, n, " identifications"); for (i = 1; i <= n; i++) { PointIndex pi1, pi2; int ind; infile >> pi1 >> pi2 >> ind; ident -> Add (pi1, pi2, ind); } } if (strcmp (str, "identificationtypes") == 0) { infile >> n; PrintMessage (3, n, " identificationtypes"); for (i = 1; i <= n; i++) { int type; infile >> type; ident -> SetType(i,Identifications::ID_TYPE(type)); } } if (strcmp (str, "materials") == 0) { infile >> n; for (i = 1; i <= n; i++) { int nr; string mat; infile >> nr >> mat; SetMaterial (nr, mat.c_str()); } } if ( strcmp (str, "bcnames" ) == 0 ) { infile >> n; Array bcnrs(n); SetNBCNames(n); for ( i = 1; i <= n; i++ ) { string nextbcname; infile >> bcnrs[i-1] >> nextbcname; bcnames[bcnrs[i-1]-1] = new string(nextbcname); } if ( GetDimension() == 2 ) { for (i = 1; i <= GetNSeg(); i++) { Segment & seg = LineSegment (i); if ( seg.si <= n ) seg.SetBCName (bcnames[seg.si-1]); else seg.SetBCName(0); } } else { for (SurfaceElementIndex sei = 0; sei < GetNSE(); sei++) { if ((*this)[sei].GetIndex()) { int bcp = GetFaceDescriptor((*this)[sei].GetIndex ()).BCProperty(); if ( bcp <= n ) GetFaceDescriptor((*this)[sei].GetIndex ()).SetBCName(bcnames[bcp-1]); else GetFaceDescriptor((*this)[sei].GetIndex ()).SetBCName(0); } } } } if ( strcmp (str, "cd2names" ) == 0) { infile >> n; Array cd2nrs(n); SetNCD2Names(n); for( i=1; i<=n; i++) { string nextcd2name; infile >> cd2nrs[i-1] >> nextcd2name; cd2names[cd2nrs[i-1]-1] = new string(nextcd2name); } if (GetDimension() == 2) { throw NgException("co dim 2 elements not implemented for dimension 2"); } else { for (i = 1; i<= GetNSeg(); i++) { Segment & seg = LineSegment(i); if ( seg.cd2i <= n ) seg.SetBCName (cd2names[seg.edgenr-1]); else seg.SetBCName(0); } } } if (strcmp (str, "singular_points") == 0) { infile >> n; for (i = 1; i <= n; i++) { PointIndex pi; double s; infile >> pi; infile >> s; (*this)[pi].Singularity (s); } } if (strcmp (str, "singular_edge_left") == 0) { infile >> n; for (i = 1; i <= n; i++) { SegmentIndex si; double s; infile >> si; infile >> s; (*this)[si].singedge_left = s; } } if (strcmp (str, "singular_edge_right") == 0) { infile >> n; for (i = 1; i <= n; i++) { SegmentIndex si; double s; infile >> si; infile >> s; (*this)[si].singedge_right = s; } } if (strcmp (str, "singular_face_inside") == 0) { infile >> n; for (i = 1; i <= n; i++) { SurfaceElementIndex sei; double s; infile >> sei; infile >> s; GetFaceDescriptor((*this)[sei].GetIndex()).domin_singular = s; } } if (strcmp (str, "singular_face_outside") == 0) { infile >> n; for (i = 1; i <= n; i++) { SurfaceElementIndex sei; double s; infile >> sei; infile >> s; GetFaceDescriptor((*this)[sei].GetIndex()).domout_singular = s; } } // Philippose - 09/07/2009 // Add mesh face colours to Netgen Vol file format // The colours are read in as RGB triplets if (strcmp (str, "face_colours") == 0) { int cnt_facedesc = GetNFD(); infile >> n; if(n == cnt_facedesc) { for(i = 1; i <= n; i++) { int surfnr = 0; Vec3d surfcolour(0.0,1.0,0.0); infile >> surfnr >> surfcolour.X() >> surfcolour.Y() >> surfcolour.Z(); surfnr--; if(surfnr > 0) { for(int facedesc = 1; facedesc <= cnt_facedesc; facedesc++) { if(surfnr == GetFaceDescriptor(facedesc).SurfNr()) { GetFaceDescriptor(facedesc).SetSurfColour(surfcolour); } } } } } } if (strcmp (str, "endmesh") == 0) endmesh = true; strcpy (str, ""); } CalcSurfacesOfNode (); if (ntasks == 1) // sequential run only { topology.Update(); clusters -> Update(); } SetNextMajorTimeStamp(); // PrintMemInfo (cout); } void Mesh :: DoArchive (ngstd::Archive & archive) { archive & dimension; archive & points; archive & surfelements; archive & volelements; archive & segments; archive & facedecoding; archive & materials & bcnames & cd2names; archive & *ident; if (archive.Input()) { RebuildSurfaceElementLists(); CalcSurfacesOfNode (); if (ntasks == 1) // sequential run only { topology.Update(); clusters -> Update(); } SetNextMajorTimeStamp(); } } void Mesh :: Merge (const string & filename, const int surfindex_offset) { ifstream infile(filename.c_str()); if (!infile.good()) throw NgException ("mesh file not found"); Merge(infile,surfindex_offset); } void Mesh :: Merge (istream & infile, const int surfindex_offset) { char str[100]; int i, n; int inverttets = 0; // globflags.GetDefineFlag ("inverttets"); int oldnp = GetNP(); int oldne = GetNSeg(); int oldnd = GetNDomains(); for(SurfaceElementIndex si = 0; si < GetNSE(); si++) for(int j=1; j<=(*this)[si].GetNP(); j++) (*this)[si].GeomInfoPi(j).trignum = -1; int max_surfnr = 0; for (i = 1; i <= GetNFD(); i++) max_surfnr = max2 (max_surfnr, GetFaceDescriptor(i).SurfNr()); max_surfnr++; if(max_surfnr < surfindex_offset) max_surfnr = surfindex_offset; bool endmesh = false; while (infile.good() && !endmesh) { infile >> str; if (strcmp (str, "surfaceelementsgi") == 0 || strcmp (str, "surfaceelements") == 0) { infile >> n; PrintMessage (3, n, " surface elements"); for (i = 1; i <= n; i++) { int j; int surfnr, bcp, domin, domout, nep, faceind = 0; infile >> surfnr >> bcp >> domin >> domout; surfnr--; if(domin > 0) domin += oldnd; if(domout > 0) domout += oldnd; surfnr += max_surfnr; for (j = 1; j <= facedecoding.Size(); j++) if (GetFaceDescriptor(j).SurfNr() == surfnr && GetFaceDescriptor(j).BCProperty() == bcp && GetFaceDescriptor(j).DomainIn() == domin && GetFaceDescriptor(j).DomainOut() == domout) faceind = j; if (!faceind) { faceind = AddFaceDescriptor (FaceDescriptor(surfnr, domin, domout, 0)); if(GetDimension() == 2) bcp++; GetFaceDescriptor(faceind).SetBCProperty (bcp); } infile >> nep; if (!nep) nep = 3; Element2d tri(nep); tri.SetIndex(faceind); for (j = 1; j <= nep; j++) { infile >> tri.PNum(j); tri.PNum(j) = tri.PNum(j) + oldnp; } if (strcmp (str, "surfaceelementsgi") == 0) for (j = 1; j <= nep; j++) { infile >> tri.GeomInfoPi(j).trignum; tri.GeomInfoPi(j).trignum = -1; } AddSurfaceElement (tri); } } if (strcmp (str, "edgesegments") == 0) { infile >> n; for (i = 1; i <= n; i++) { Segment seg; int hi; infile >> seg.si >> hi >> seg[0] >> seg[1]; seg[0] = seg[0] + oldnp; seg[1] = seg[1] + oldnp; AddSegment (seg); } } if (strcmp (str, "edgesegmentsgi") == 0) { infile >> n; for (i = 1; i <= n; i++) { Segment seg; int hi; infile >> seg.si >> hi >> seg[0] >> seg[1] >> seg.geominfo[0].trignum >> seg.geominfo[1].trignum; seg[0] = seg[0] + oldnp; seg[1] = seg[1] + oldnp; AddSegment (seg); } } if (strcmp (str, "edgesegmentsgi2") == 0) { infile >> n; PrintMessage (3, n, " curve elements"); for (i = 1; i <= n; i++) { Segment seg; int hi; infile >> seg.si >> hi >> seg[0] >> seg[1] >> seg.geominfo[0].trignum >> seg.geominfo[1].trignum >> seg.surfnr1 >> seg.surfnr2 >> seg.edgenr >> seg.epgeominfo[0].dist >> seg.epgeominfo[1].edgenr >> seg.epgeominfo[1].dist; seg.epgeominfo[0].edgenr = seg.epgeominfo[1].edgenr; seg.surfnr1--; seg.surfnr2--; if(seg.surfnr1 >= 0) seg.surfnr1 = seg.surfnr1 + max_surfnr; if(seg.surfnr2 >= 0) seg.surfnr2 = seg.surfnr2 + max_surfnr; seg[0] = seg[0] +oldnp; seg[1] = seg[1] +oldnp; *testout << "old edgenr: " << seg.edgenr << endl; seg.edgenr = seg.edgenr + oldne; *testout << "new edgenr: " << seg.edgenr << endl; seg.epgeominfo[1].edgenr = seg.epgeominfo[1].edgenr + oldne; AddSegment (seg); } } if (strcmp (str, "volumeelements") == 0) { infile >> n; PrintMessage (3, n, " volume elements"); for (i = 1; i <= n; i++) { Element el(TET); int hi, nep; infile >> hi; if (hi == 0) hi = 1; el.SetIndex(hi+oldnd); infile >> nep; el.SetNP(nep); for (int j = 0; j < nep; j++) { infile >> (int&)(el[j]); el[j] = el[j]+oldnp; } if (inverttets) el.Invert(); AddVolumeElement (el); } } if (strcmp (str, "points") == 0) { infile >> n; PrintMessage (3, n, " points"); for (i = 1; i <= n; i++) { Point3d p; infile >> p.X() >> p.Y() >> p.Z(); AddPoint (p); } } if (strcmp (str, "endmesh") == 0) { endmesh = true; } if (strcmp (str, "materials") == 0) { infile >> n; for (i = 1; i <= n; i++) { int nr; string mat; infile >> nr >> mat; SetMaterial (nr+oldnd, mat.c_str()); } } strcpy (str, ""); } CalcSurfacesOfNode (); topology.Update(); clusters -> Update(); SetNextMajorTimeStamp(); } bool Mesh :: TestOk () const { for (ElementIndex ei = 0; ei < volelements.Size(); ei++) { for (int j = 0; j < 4; j++) if ( (*this)[ei][j] <= PointIndex::BASE-1) { (*testout) << "El " << ei << " has 0 nodes: "; for (int k = 0; k < 4; k++) (*testout) << (*this)[ei][k]; break; } } CheckMesh3D (*this); return 1; } void Mesh :: SetAllocSize(int nnodes, int nsegs, int nsel, int nel) { points.SetAllocSize(nnodes); segments.SetAllocSize(nsegs); surfelements.SetAllocSize(nsel); volelements.SetAllocSize(nel); } void Mesh :: BuildBoundaryEdges(void) { delete boundaryedges; boundaryedges = new INDEX_2_CLOSED_HASHTABLE (3 * (GetNSE() + GetNOpenElements()) + GetNSeg() + 1); for (SurfaceElementIndex sei = 0; sei < GetNSE(); sei++) { const Element2d & sel = surfelements[sei]; if (sel.IsDeleted()) continue; // int si = sel.GetIndex(); if (sel.GetNP() <= 4) for (int j = 0; j < sel.GetNP(); j++) { INDEX_2 i2; i2.I1() = sel.PNumMod(j+1); i2.I2() = sel.PNumMod(j+2); i2.Sort(); boundaryedges->Set (i2, 1); } else if (sel.GetType()==TRIG6) { for (int j = 0; j < 3; j++) { INDEX_2 i2; i2.I1() = sel[j]; i2.I2() = sel[(j+1)%3]; i2.Sort(); boundaryedges->Set (i2, 1); } } else cerr << "illegal element for buildboundaryedges" << endl; } for (int i = 0; i < openelements.Size(); i++) { const Element2d & sel = openelements[i]; for (int j = 0; j < sel.GetNP(); j++) { INDEX_2 i2; i2.I1() = sel.PNumMod(j+1); i2.I2() = sel.PNumMod(j+2); i2.Sort(); boundaryedges->Set (i2, 1); points[sel[j]].SetType(FIXEDPOINT); } } for (int i = 0; i < GetNSeg(); i++) { const Segment & seg = segments[i]; INDEX_2 i2(seg[0], seg[1]); i2.Sort(); boundaryedges -> Set (i2, 2); //segmentht -> Set (i2, i); } } void Mesh :: CalcSurfacesOfNode () { // surfacesonnode.SetSize (GetNP()); TABLE surfacesonnode(GetNP()); delete boundaryedges; boundaryedges = NULL; delete surfelementht; surfelementht = nullptr; delete segmentht; /* surfelementht = new INDEX_3_HASHTABLE (GetNSE()/4 + 1); segmentht = new INDEX_2_HASHTABLE (GetNSeg() + 1); */ if (dimension == 3) surfelementht = new INDEX_3_CLOSED_HASHTABLE (3*GetNSE() + 1); segmentht = new INDEX_2_CLOSED_HASHTABLE (3*GetNSeg() + 1); if (dimension == 3) for (SurfaceElementIndex sei = 0; sei < GetNSE(); sei++) { const Element2d & sel = surfelements[sei]; if (sel.IsDeleted()) continue; int si = sel.GetIndex(); for (int j = 0; j < sel.GetNP(); j++) { PointIndex pi = sel[j]; if (!surfacesonnode[pi].Contains(si)) surfacesonnode.Add (pi, si); /* bool found = 0; for (int k = 0; k < surfacesonnode[pi].Size(); k++) if (surfacesonnode[pi][k] == si) { found = 1; break; } if (!found) surfacesonnode.Add (pi, si); */ } } /* for (sei = 0; sei < GetNSE(); sei++) { const Element2d & sel = surfelements[sei]; if (sel.IsDeleted()) continue; INDEX_3 i3; i3.I1() = sel.PNum(1); i3.I2() = sel.PNum(2); i3.I3() = sel.PNum(3); i3.Sort(); surfelementht -> PrepareSet (i3); } surfelementht -> AllocateElements(); */ if (dimension==3) for (SurfaceElementIndex sei = 0; sei < GetNSE(); sei++) { const Element2d & sel = surfelements[sei]; if (sel.IsDeleted()) continue; INDEX_3 i3; i3.I1() = sel.PNum(1); i3.I2() = sel.PNum(2); i3.I3() = sel.PNum(3); i3.Sort(); surfelementht -> Set (i3, sei); // war das wichtig ??? sel.GetIndex()); } // int np = GetNP(); if (dimension == 3) { for (PointIndex pi = points.Begin(); pi < points.End(); pi++) points[pi].SetType (INNERPOINT); if (GetNFD() == 0) { for (SurfaceElementIndex sei = 0; sei < GetNSE(); sei++) { const Element2d & sel = surfelements[sei]; if (sel.IsDeleted()) continue; for (int j = 0; j < sel.GetNP(); j++) { PointIndex pi = SurfaceElement(sei)[j]; points[pi].SetType(FIXEDPOINT); } } } else { for (SurfaceElementIndex sei = 0; sei < GetNSE(); sei++) { const Element2d & sel = surfelements[sei]; if (sel.IsDeleted()) continue; for (int j = 0; j < sel.GetNP(); j++) { PointIndex pi = sel[j]; int ns = surfacesonnode[pi].Size(); if (ns == 1) points[pi].SetType(SURFACEPOINT); if (ns == 2) points[pi].SetType(EDGEPOINT); if (ns >= 3) points[pi].SetType(FIXEDPOINT); } } } } for (int i = 0; i < segments.Size(); i++) { const Segment & seg = segments[i]; for (int j = 1; j <= 2; j++) { PointIndex hi = (j == 1) ? seg[0] : seg[1]; if (points[hi].Type() == INNERPOINT || points[hi].Type() == SURFACEPOINT) points[hi].SetType(EDGEPOINT); } } for (int i = 0; i < lockedpoints.Size(); i++) points[lockedpoints[i]].SetType(FIXEDPOINT); /* for (i = 0; i < openelements.Size(); i++) { const Element2d & sel = openelements[i]; for (j = 0; j < sel.GetNP(); j++) { INDEX_2 i2; i2.I1() = sel.PNumMod(j+1); i2.I2() = sel.PNumMod(j+2); i2.Sort(); boundaryedges->Set (i2, 1); points[sel[j]].SetType(FIXEDPOINT); } } */ // eltyps.SetSize (GetNE()); // eltyps = FREEELEMENT; for (int i = 0; i < GetNSeg(); i++) { const Segment & seg = segments[i]; INDEX_2 i2(seg[0], seg[1]); i2.Sort(); //boundaryedges -> Set (i2, 2); segmentht -> Set (i2, i); } } void Mesh :: FixPoints (const BitArray & fixpoints) { if (fixpoints.Size() != GetNP()) { cerr << "Mesh::FixPoints: sizes don't fit" << endl; return; } int np = GetNP(); for (int i = 1; i <= np; i++) if (fixpoints.Test(i)) { points.Elem(i).SetType (FIXEDPOINT); } } void Mesh :: FindOpenElements (int dom) { static int timer = NgProfiler::CreateTimer ("Mesh::FindOpenElements"); NgProfiler::RegionTimer reg (timer); int np = GetNP(); int ne = GetNE(); int nse = GetNSE(); Array numonpoint(np); numonpoint = 0; for (ElementIndex ei = 0; ei < ne; ei++) { const Element & el = (*this)[ei]; if (dom == 0 || dom == el.GetIndex()) { if (el.GetNP() == 4) { INDEX_4 i4(el[0], el[1], el[2], el[3]); i4.Sort(); numonpoint[i4.I1()]++; numonpoint[i4.I2()]++; } else for (int j = 0; j < el.GetNP(); j++) numonpoint[el[j]]++; } } TABLE elsonpoint(numonpoint); for (ElementIndex ei = 0; ei < ne; ei++) { const Element & el = (*this)[ei]; if (dom == 0 || dom == el.GetIndex()) { if (el.GetNP() == 4) { INDEX_4 i4(el[0], el[1], el[2], el[3]); i4.Sort(); elsonpoint.Add (i4.I1(), ei); elsonpoint.Add (i4.I2(), ei); } else for (int j = 0; j < el.GetNP(); j++) elsonpoint.Add (el[j], ei); } } Array hasface(GetNFD()); int i; for (i = 1; i <= GetNFD(); i++) { int domin = GetFaceDescriptor(i).DomainIn(); int domout = GetFaceDescriptor(i).DomainOut(); hasface[i] = ( dom == 0 && (domin != 0 || domout != 0) ) || ( dom != 0 && (domin == dom || domout == dom) ); } numonpoint = 0; for (SurfaceElementIndex sii = 0; sii < nse; sii++) { int ind = surfelements[sii].GetIndex(); /* if ( GetFaceDescriptor(ind).DomainIn() && (dom == 0 || dom == GetFaceDescriptor(ind).DomainIn()) || GetFaceDescriptor(ind).DomainOut() && (dom == 0 || dom == GetFaceDescriptor(ind).DomainOut()) ) */ if (hasface[ind]) { /* Element2d hel = surfelements[i]; hel.NormalizeNumbering(); numonpoint[hel[0]]++; */ const Element2d & hel = surfelements[sii]; int mini = 0; for (int j = 1; j < hel.GetNP(); j++) if (hel[j] < hel[mini]) mini = j; numonpoint[hel[mini]]++; } } TABLE selsonpoint(numonpoint); for (SurfaceElementIndex sii = 0; sii < nse; sii++) { int ind = surfelements[sii].GetIndex(); /* if ( GetFaceDescriptor(ind).DomainIn() && (dom == 0 || dom == GetFaceDescriptor(ind).DomainIn()) || GetFaceDescriptor(ind).DomainOut() && (dom == 0 || dom == GetFaceDescriptor(ind).DomainOut()) ) */ if (hasface[ind]) { /* Element2d hel = surfelements[i]; hel.NormalizeNumbering(); selsonpoint.Add (hel[0], i); */ const Element2d & hel = surfelements[sii]; int mini = 0; for (int j = 1; j < hel.GetNP(); j++) if (hel[j] < hel[mini]) mini = j; selsonpoint.Add (hel[mini], sii); } } int ii; PointIndex pi; SurfaceElementIndex sei; // Element2d hel; INDEX_3_CLOSED_HASHTABLE faceht(100); openelements.SetSize(0); for (PointIndex pi = points.Begin(); pi < points.End(); pi++) if (selsonpoint[pi].Size()+elsonpoint[pi].Size()) { faceht.SetSize (2 * selsonpoint[pi].Size() + 4 * elsonpoint[pi].Size()); FlatArray row = selsonpoint[pi]; for (ii = 0; ii < row.Size(); ii++) { Element2d hel = SurfaceElement(row[ii]); if (hel.GetType() == TRIG6) hel.SetType(TRIG); int ind = hel.GetIndex(); if (GetFaceDescriptor(ind).DomainIn() && (dom == 0 || dom == GetFaceDescriptor(ind).DomainIn()) ) { hel.NormalizeNumbering(); if (hel.PNum(1) == pi) { INDEX_3 i3(hel[0], hel[1], hel[2]); INDEX_2 i2 (GetFaceDescriptor(ind).DomainIn(), (hel.GetNP() == 3) ? PointIndex (PointIndex::BASE-1) : hel.PNum(4)); faceht.Set (i3, i2); } } if (GetFaceDescriptor(ind).DomainOut() && (dom == 0 || dom == GetFaceDescriptor(ind).DomainOut()) ) { hel.Invert(); hel.NormalizeNumbering(); if (hel.PNum(1) == pi) { INDEX_3 i3(hel[0], hel[1], hel[2]); INDEX_2 i2 (GetFaceDescriptor(ind).DomainOut(), (hel.GetNP() == 3) ? PointIndex (PointIndex::BASE-1) : hel.PNum(4)); faceht.Set (i3, i2); } } } FlatArray rowel = elsonpoint[pi]; for (ii = 0; ii < rowel.Size(); ii++) { const Element & el = VolumeElement(rowel[ii]); if (dom == 0 || el.GetIndex() == dom) { for (int j = 1; j <= el.GetNFaces(); j++) { Element2d hel(TRIG); el.GetFace (j, hel); hel.Invert(); hel.NormalizeNumbering(); if (hel[0] == pi) { INDEX_3 i3(hel[0], hel[1], hel[2]); if (faceht.Used (i3)) { INDEX_2 i2 = faceht.Get(i3); if (i2.I1() == el.GetIndex()) { i2.I1() = PointIndex::BASE-1; faceht.Set (i3, i2); } else { if (i2.I1() == 0) { PrintSysError ("more elements on face"); (*testout) << "more elements on face!!!" << endl; (*testout) << "el = " << el << endl; (*testout) << "hel = " << hel << endl; (*testout) << "face = " << i3 << endl; (*testout) << "points = " << endl; for (int jj = 1; jj <= 3; jj++) (*testout) << "p = " << Point(i3.I(jj)) << endl; } } } else { hel.Invert(); hel.NormalizeNumbering(); INDEX_3 i3(hel[0], hel[1], hel[2]); INDEX_2 i2(el.GetIndex(), (hel.GetNP() == 3) ? PointIndex (PointIndex::BASE-1) : hel[3]); faceht.Set (i3, i2); } } } } } for (int i = 0; i < faceht.Size(); i++) if (faceht.UsedPos (i)) { INDEX_3 i3; INDEX_2 i2; faceht.GetData (i, i3, i2); if (i2.I1() != PointIndex::BASE-1) { // Element2d tri; // tri.SetType ( (i2.I2() == PointIndex::BASE-1) ? TRIG : QUAD); Element2d tri ( (i2.I2() == PointIndex::BASE-1) ? TRIG : QUAD); for (int l = 0; l < 3; l++) tri[l] = i3.I(l+1); tri.PNum(4) = i2.I2(); tri.SetIndex (i2.I1()); // tri.Invert(); openelements.Append (tri); } } } int cnt3 = 0; for (i = 0; i < openelements.Size(); i++) if (openelements[i].GetNP() == 3) cnt3++; int cnt4 = openelements.Size() - cnt3; MyStr treequad; if (cnt4) treequad = MyStr(" (") + MyStr(cnt3) + MyStr (" + ") + MyStr(cnt4) + MyStr(")"); PrintMessage (5, openelements.Size(), treequad, " open elements"); BuildBoundaryEdges(); for (int i = 1; i <= openelements.Size(); i++) { const Element2d & sel = openelements.Get(i); if (boundaryedges) for (int j = 1; j <= sel.GetNP(); j++) { INDEX_2 i2; i2.I1() = sel.PNumMod(j); i2.I2() = sel.PNumMod(j+1); i2.Sort(); boundaryedges->Set (i2, 1); } for (int j = 1; j <= 3; j++) { PointIndex pi = sel.PNum(j); if (pi < points.End()) points[pi].SetType (FIXEDPOINT); } } /* for (i = 1; i <= GetNSeg(); i++) { const Segment & seg = LineSegment(i); INDEX_2 i2(seg[0], seg[1]); i2.Sort(); if (!boundaryedges->Used (i2)) cerr << "WARNING: no boundedge, but seg edge: " << i2 << endl; boundaryedges -> Set (i2, 2); segmentht -> Set (i2, i-1); } */ } bool Mesh :: HasOpenQuads () const { int no = GetNOpenElements(); for (int i = 0; i < no; i++) if (openelements[i].GetNP() == 4) return true; return false; } void Mesh :: FindOpenSegments (int surfnr) { // int i, j, k; // new version, general elements // hash index: pnum1-2 // hash data : surfnr, surfel-nr (pos) or segment nr(neg) INDEX_2_HASHTABLE faceht(4 * GetNSE()+GetNSeg()+1); PrintMessage (5, "Test Opensegments"); for (int i = 1; i <= GetNSeg(); i++) { const Segment & seg = LineSegment (i); if (surfnr == 0 || seg.si == surfnr) { INDEX_2 key(seg[0], seg[1]); INDEX_2 data(seg.si, -i); if (faceht.Used (key)) { cerr << "ERROR: Segment " << seg << " already used" << endl; (*testout) << "ERROR: Segment " << seg << " already used" << endl; } faceht.Set (key, data); } } for (int i = 1; i <= GetNSeg(); i++) { const Segment & seg = LineSegment (i); if (surfnr == 0 || seg.si == surfnr) { INDEX_2 key(seg[1], seg[0]); if (!faceht.Used(key)) { cerr << "ERROR: Segment " << seg << " brother not used" << endl; (*testout) << "ERROR: Segment " << seg << " brother not used" << endl; } } } // bool buggy = false; // ofstream bout("buggy.out"); for (int i = 1; i <= GetNSE(); i++) { const Element2d & el = SurfaceElement(i); if (el.IsDeleted()) continue; if (surfnr == 0 || el.GetIndex() == surfnr) { for (int j = 1; j <= el.GetNP(); j++) { INDEX_2 seg (el.PNumMod(j), el.PNumMod(j+1)); INDEX_2 data; if (seg.I1() < PointIndex::BASE || seg.I2() < PointIndex::BASE) cerr << "seg = " << seg << endl; if (faceht.Used(seg)) { data = faceht.Get(seg); if (data.I1() == el.GetIndex()) { data.I1() = 0; faceht.Set (seg, data); } else { // buggy = true; PrintWarning ("hash table si not fitting for segment: ", seg.I1(), "-", seg.I2(), " other = ", data.I2()); // cout << "me: index = " << el.GetIndex() << ", el = " << el << endl; /* bout << "has index = " << seg << endl; bout << "hash value = " << faceht.HashValue (seg) << endl; if (data.I2() > 0) { int io = data.I2(); cout << "other trig: index = " << SurfaceElement(io).GetIndex() << ", el = " << SurfaceElement(io) << endl; } else { cout << "other seg " << -data.I2() << ", si = " << data.I1() << endl; } bout << "me: index = " << el.GetIndex() << ", el = " << el << endl; if (data.I2() > 0) { int io = data.I2(); bout << "other trig: index = " << SurfaceElement(io).GetIndex() << ", el = " << SurfaceElement(io) << endl; } else { bout << "other seg " << -data.I2() << ", si = " << data.I1() << endl; } */ } } else { Swap (seg.I1(), seg.I2()); data.I1() = el.GetIndex(); data.I2() = i; faceht.Set (seg, data); } } } } /* if (buggy) { for (int i = 1; i <= GetNSeg(); i++) bout << "seg" << i << " " << LineSegment(i) << endl; for (int i = 1; i <= GetNSE(); i++) bout << "sel" << i << " " << SurfaceElement(i) << " ind = " << SurfaceElement(i).GetIndex() << endl; bout << "hashtable: " << endl; for (int j = 1; j <= faceht.GetNBags(); j++) { bout << "bag " << j << ":" << endl; for (int k = 1; k <= faceht.GetBagSize(j); k++) { INDEX_2 i2, data; faceht.GetData (j, k, i2, data); bout << "key = " << i2 << ", data = " << data << endl; } } exit(1); } */ (*testout) << "open segments: " << endl; opensegments.SetSize(0); for (int i = 1; i <= faceht.GetNBags(); i++) for (int j = 1; j <= faceht.GetBagSize(i); j++) { INDEX_2 i2; INDEX_2 data; faceht.GetData (i, j, i2, data); if (data.I1()) // surfnr { Segment seg; seg[0] = i2.I1(); seg[1] = i2.I2(); seg.si = data.I1(); // find geomdata: if (data.I2() > 0) { // segment due to triangle const Element2d & el = SurfaceElement (data.I2()); for (int k = 1; k <= el.GetNP(); k++) { if (seg[0] == el.PNum(k)) seg.geominfo[0] = el.GeomInfoPi(k); if (seg[1] == el.PNum(k)) seg.geominfo[1] = el.GeomInfoPi(k); } (*testout) << "trig seg: "; } else { // segment due to line const Segment & lseg = LineSegment (-data.I2()); seg.geominfo[0] = lseg.geominfo[0]; seg.geominfo[1] = lseg.geominfo[1]; (*testout) << "line seg: "; } (*testout) << seg[0] << " - " << seg[1] << " len = " << Dist (Point(seg[0]), Point(seg[1])) << endl; opensegments.Append (seg); if (seg.geominfo[0].trignum <= 0 || seg.geominfo[1].trignum <= 0) { (*testout) << "Problem with open segment: " << seg << endl; } } } PrintMessage (3, opensegments.Size(), " open segments found"); (*testout) << opensegments.Size() << " open segments found" << endl; /* ptyps.SetSize (GetNP()); for (i = 1; i <= ptyps.Size(); i++) ptyps.Elem(i) = SURFACEPOINT; for (i = 1; i <= GetNSeg(); i++) { const Segment & seg = LineSegment (i); ptyps.Elem(seg[0]) = EDGEPOINT; ptyps.Elem(seg[1]) = EDGEPOINT; } for (i = 1; i <= GetNOpenSegments(); i++) { const Segment & seg = GetOpenSegment (i); ptyps.Elem(seg[0]) = EDGEPOINT; ptyps.Elem(seg[1]) = EDGEPOINT; } */ for (int i = 1; i <= points.Size(); i++) points.Elem(i).SetType(SURFACEPOINT); for (int i = 1; i <= GetNSeg(); i++) { const Segment & seg = LineSegment (i); points[seg[0]].SetType(EDGEPOINT); points[seg[1]].SetType(EDGEPOINT); } for (int i = 1; i <= GetNOpenSegments(); i++) { const Segment & seg = GetOpenSegment (i); points[seg[0]].SetType (EDGEPOINT); points[seg[1]].SetType (EDGEPOINT); } /* for (i = 1; i <= openelements.Size(); i++) { const Element2d & sel = openelements.Get(i); if (boundaryedges) for (j = 1; j <= sel.GetNP(); j++) { INDEX_2 i2; i2.I1() = sel.PNumMod(j); i2.I2() = sel.PNumMod(j+1); i2.Sort(); boundaryedges->Set (i2, 1); } for (j = 1; j <= 3; j++) { int pi = sel.PNum(j); if (pi <= ptyps.Size()) ptyps.Elem(pi) = FIXEDPOINT; } } */ } void Mesh :: RemoveOneLayerSurfaceElements () { int np = GetNP(); FindOpenSegments(); BitArray frontpoints(np+1); // for 0- and 1-based frontpoints.Clear(); for (int i = 1; i <= GetNOpenSegments(); i++) { const Segment & seg = GetOpenSegment(i); frontpoints.Set (seg[0]); frontpoints.Set (seg[1]); } for (int i = 1; i <= GetNSE(); i++) { Element2d & sel = surfelements.Elem(i); bool remove = false; for (int j = 1; j <= sel.GetNP(); j++) if (frontpoints.Test(sel.PNum(j))) remove = true; if (remove) sel.PNum(1).Invalidate(); } for (int i = surfelements.Size(); i >= 1; i--) { if (!surfelements.Elem(i).PNum(1).IsValid()) { surfelements.Elem(i) = surfelements.Last(); surfelements.DeleteLast(); } } RebuildSurfaceElementLists (); /* for (int i = 0; i < facedecoding.Size(); i++) facedecoding[i].firstelement = -1; for (int i = surfelements.Size()-1; i >= 0; i--) { int ind = surfelements[i].GetIndex(); surfelements[i].next = facedecoding[ind-1].firstelement; facedecoding[ind-1].firstelement = i; } */ timestamp = NextTimeStamp(); // Compress(); } void Mesh :: FreeOpenElementsEnvironment (int layers) { int i, j, k; PointIndex pi; const int large = 9999; Array dist(GetNP()); dist = large; for (int i = 1; i <= GetNOpenElements(); i++) { const Element2d & face = OpenElement(i); for (j = 0; j < face.GetNP(); j++) dist[face[j]] = 1; } for (k = 1; k <= layers; k++) for (i = 1; i <= GetNE(); i++) { const Element & el = VolumeElement(i); if (el[0] == -1 || el.IsDeleted()) continue; int elmin = large; for (j = 0; j < el.GetNP(); j++) if (dist[el[j]] < elmin) elmin = dist[el[j]]; if (elmin < large) { for (j = 0; j < el.GetNP(); j++) if (dist[el[j]] > elmin+1) dist[el[j]] = elmin+1; } } int cntfree = 0; for (i = 1; i <= GetNE(); i++) { Element & el = VolumeElement(i); if (el[0] == -1 || el.IsDeleted()) continue; int elmin = large; for (j = 0; j < el.GetNP(); j++) if (dist[el[j]] < elmin) elmin = dist[el[j]]; el.flags.fixed = elmin > layers; // eltyps.Elem(i) = (elmin <= layers) ? // FREEELEMENT : FIXEDELEMENT; if (elmin <= layers) cntfree++; } PrintMessage (5, "free: ", cntfree, ", fixed: ", GetNE()-cntfree); (*testout) << "free: " << cntfree << ", fixed: " << GetNE()-cntfree << endl; for (pi = PointIndex::BASE; pi < GetNP()+PointIndex::BASE; pi++) { if (dist[pi] > layers+1) points[pi].SetType(FIXEDPOINT); } } void Mesh :: SetLocalH (netgen::Point<3> pmin, netgen::Point<3> pmax, double grading) { using netgen::Point; Point<3> c = Center (pmin, pmax); double d = max3 (pmax(0)-pmin(0), pmax(1)-pmin(1), pmax(2)-pmin(2)); d /= 2; Point<3> pmin2 = c - Vec<3> (d, d, d); Point<3> pmax2 = c + Vec<3> (d, d, d); delete lochfunc; lochfunc = new LocalH (pmin2, pmax2, grading, dimension); } void Mesh :: RestrictLocalH (const Point3d & p, double hloc) { if(hloc < hmin) hloc = hmin; //cout << "restrict h in " << p << " to " << hloc << endl; if (!lochfunc) { PrintWarning("RestrictLocalH called, creating mesh-size tree"); Point3d boxmin, boxmax; GetBox (boxmin, boxmax); SetLocalH (boxmin, boxmax, 0.8); } lochfunc -> SetH (p, hloc); } void Mesh :: RestrictLocalHLine (const Point3d & p1, const Point3d & p2, double hloc) { if(hloc < hmin) hloc = hmin; // cout << "restrict h along " << p1 << " - " << p2 << " to " << hloc << endl; int i; int steps = int (Dist (p1, p2) / hloc) + 2; Vec3d v(p1, p2); for (i = 0; i <= steps; i++) { Point3d p = p1 + (double(i)/double(steps) * v); RestrictLocalH (p, hloc); } } void Mesh :: SetMinimalH (double h) { hmin = h; } void Mesh :: SetGlobalH (double h) { hglob = h; } double Mesh :: MaxHDomain (int dom) const { if (maxhdomain.Size()) return maxhdomain.Get(dom); else return 1e10; } void Mesh :: SetMaxHDomain (const Array & mhd) { maxhdomain.SetSize(mhd.Size()); for (int i = 1; i <= mhd.Size(); i++) maxhdomain.Elem(i) = mhd.Get(i); } double Mesh :: GetH (const Point3d & p) const { double hmin = hglob; if (lochfunc) { double hl = lochfunc->GetH (p); if (hl < hglob) hmin = hl; } return hmin; } double Mesh :: GetMinH (const Point3d & pmin, const Point3d & pmax) { double hmin = hglob; if (lochfunc) { double hl = lochfunc->GetMinH (pmin, pmax); if (hl < hmin) hmin = hl; } return hmin; } double Mesh :: AverageH (int surfnr) const { int i, j, n; double hi, hsum; double maxh = 0, minh = 1e10; hsum = 0; n = 0; for (i = 1; i <= GetNSE(); i++) { const Element2d & el = SurfaceElement(i); if (surfnr == 0 || el.GetIndex() == surfnr) { for (j = 1; j <= 3; j++) { hi = Dist (Point (el.PNumMod(j)), Point (el.PNumMod(j+1))); hsum += hi; if (hi > maxh) maxh = hi; if (hi < minh) minh = hi; n++; } } } PrintMessage (5, "minh = ", minh, " avh = ", (hsum/n), " maxh = ", maxh); return (hsum / n); } void Mesh :: CalcLocalH (double grading) { if (!lochfunc) { Point3d pmin, pmax; GetBox (pmin, pmax); // SetLocalH (pmin, pmax, mparam.grading); SetLocalH (pmin, pmax, grading); } PrintMessage (3, "CalcLocalH: ", GetNP(), " Points ", GetNE(), " Elements ", GetNSE(), " Surface Elements"); for (int i = 0; i < GetNSE(); i++) { const Element2d & el = surfelements[i]; int j; if (el.GetNP() == 3) { double hel = -1; for (j = 1; j <= 3; j++) { const Point3d & p1 = points[el.PNumMod(j)]; const Point3d & p2 = points[el.PNumMod(j+1)]; /* INDEX_2 i21(el.PNumMod(j), el.PNumMod(j+1)); INDEX_2 i22(el.PNumMod(j+1), el.PNumMod(j)); if (! identifiedpoints->Used (i21) && ! identifiedpoints->Used (i22) ) */ if (!ident -> UsedSymmetric (el.PNumMod(j), el.PNumMod(j+1))) { double hedge = Dist (p1, p2); if (hedge > hel) hel = hedge; // lochfunc->SetH (Center (p1, p2), 2 * Dist (p1, p2)); // (*testout) << "trigseth, p1,2 = " << el.PNumMod(j) << ", " << el.PNumMod(j+1) // << " h = " << (2 * Dist(p1, p2)) << endl; } } if (hel > 0) { const Point3d & p1 = points[el.PNum(1)]; const Point3d & p2 = points[el.PNum(2)]; const Point3d & p3 = points[el.PNum(3)]; lochfunc->SetH (Center (p1, p2, p3), hel); } } else { { const Point3d & p1 = points[el.PNum(1)]; const Point3d & p2 = points[el.PNum(2)]; lochfunc->SetH (Center (p1, p2), 2 * Dist (p1, p2)); } { const Point3d & p1 = points[el.PNum(3)]; const Point3d & p2 = points[el.PNum(4)]; lochfunc->SetH (Center (p1, p2), 2 * Dist (p1, p2)); } } } for (int i = 0; i < GetNSeg(); i++) { const Segment & seg = segments[i]; const Point3d & p1 = points[seg[0]]; const Point3d & p2 = points[seg[1]]; /* INDEX_2 i21(seg[0], seg[1]); INDEX_2 i22(seg[1], seg[0]); if (identifiedpoints) if (!identifiedpoints->Used (i21) && !identifiedpoints->Used (i22)) */ if (!ident -> UsedSymmetric (seg[0], seg[1])) { lochfunc->SetH (Center (p1, p2), Dist (p1, p2)); } } /* cerr << "do vol" << endl; for (i = 1; i <= GetNE(); i++) { const Element & el = VolumeElement(i); if (el.GetType() == TET) { int j, k; for (j = 2; j <= 4; j++) for (k = 1; k < j; k++) { const Point3d & p1 = Point (el.PNum(j)); const Point3d & p2 = Point (el.PNum(k)); lochfunc->SetH (Center (p1, p2), 2 * Dist (p1, p2)); (*testout) << "set vol h to " << (2 * Dist (p1, p2)) << endl; } } } */ /* const char * meshsizefilename = globflags.GetStringFlag ("meshsize", NULL); if (meshsizefilename) { ifstream msf(meshsizefilename); if (msf) { int nmsp; msf >> nmsp; for (i = 1; i <= nmsp; i++) { Point3d pi; double hi; msf >> pi.X() >> pi.Y() >> pi.Z(); msf >> hi; lochfunc->SetH (pi, hi); } } } */ // lochfunc -> Convexify(); // lochfunc -> PrintMemInfo (cout); } void Mesh :: CalcLocalHFromPointDistances(double grading) { PrintMessage (3, "Calculating local h from point distances"); if (!lochfunc) { Point3d pmin, pmax; GetBox (pmin, pmax); // SetLocalH (pmin, pmax, mparam.grading); SetLocalH (pmin, pmax, grading); } PointIndex i,j; double hl; for (i = PointIndex::BASE; i < GetNP()+PointIndex::BASE; i++) { for(j=i+1; j edges(3 * GetNP() + 2); INDEX_2_HASHTABLE bedges(GetNSeg() + 2); int i, j; for (i = 1; i <= GetNSeg(); i++) { const Segment & seg = LineSegment(i); INDEX_2 i2(seg[0], seg[1]); i2.Sort(); bedges.Set (i2, 1); } for (i = 1; i <= GetNSE(); i++) { const Element2d & sel = SurfaceElement(i); if (!sel.PNum(1)) continue; for (j = 1; j <= 3; j++) { INDEX_2 i2(sel.PNumMod(j), sel.PNumMod(j+1)); i2.Sort(); if (bedges.Used(i2)) continue; if (edges.Used(i2)) { int other = edges.Get(i2); const Element2d & elother = SurfaceElement(other); int pi3 = 1; while ( (sel.PNum(pi3) == i2.I1()) || (sel.PNum(pi3) == i2.I2())) pi3++; pi3 = sel.PNum(pi3); int pi4 = 1; while ( (elother.PNum(pi4) == i2.I1()) || (elother.PNum(pi4) == i2.I2())) pi4++; pi4 = elother.PNum(pi4); double rad = ComputeCylinderRadius (Point (i2.I1()), Point (i2.I2()), Point (pi3), Point (pi4)); RestrictLocalHLine (Point(i2.I1()), Point(i2.I2()), rad/elperr); /* (*testout) << "pi1,2, 3, 4 = " << i2.I1() << ", " << i2.I2() << ", " << pi3 << ", " << pi4 << " p1 = " << Point(i2.I1()) << ", p2 = " << Point(i2.I2()) // << ", p3 = " << Point(pi3) // << ", p4 = " << Point(pi4) << ", rad = " << rad << endl; */ } else edges.Set (i2, i); } } // Restrict h due to line segments for (i = 1; i <= GetNSeg(); i++) { const Segment & seg = LineSegment(i); const Point3d & p1 = Point(seg[0]); const Point3d & p2 = Point(seg[1]); RestrictLocalH (Center (p1, p2), Dist (p1, p2)); } /* int i, j; int np = GetNP(); int nseg = GetNSeg(); int nse = GetNSE(); Array normals(np); BitArray linepoint(np); linepoint.Clear(); for (i = 1; i <= nseg; i++) { linepoint.Set (LineSegment(i)[0]); linepoint.Set (LineSegment(i)[1]); } for (i = 1; i <= np; i++) normals.Elem(i) = Vec3d(0,0,0); for (i = 1; i <= nse; i++) { Element2d & el = SurfaceElement(i); Vec3d nf = Cross (Vec3d (Point (el.PNum(1)), Point(el.PNum(2))), Vec3d (Point (el.PNum(1)), Point(el.PNum(3)))); for (j = 1; j <= 3; j++) normals.Elem(el.PNum(j)) += nf; } for (i = 1; i <= np; i++) normals.Elem(i) /= (1e-12 + normals.Elem(i).Length()); for (i = 1; i <= nse; i++) { Element2d & el = SurfaceElement(i); Vec3d nf = Cross (Vec3d (Point (el.PNum(1)), Point(el.PNum(2))), Vec3d (Point (el.PNum(1)), Point(el.PNum(3)))); nf /= nf.Length(); Point3d c = Center (Point(el.PNum(1)), Point(el.PNum(2)), Point(el.PNum(3))); for (j = 1; j <= 3; j++) { if (!linepoint.Test (el.PNum(j))) { double dist = Dist (c, Point(el.PNum(j))); double dn = (nf - normals.Get(el.PNum(j))).Length(); RestrictLocalH (Point(el.PNum(j)), dist / (dn+1e-12) /elperr); } } } */ } void Mesh :: RestrictLocalH (resthtype rht, int nr, double loch) { int i; switch (rht) { case RESTRICTH_FACE: { for (i = 1; i <= GetNSE(); i++) { const Element2d & sel = SurfaceElement(i); if (sel.GetIndex() == nr) RestrictLocalH (RESTRICTH_SURFACEELEMENT, i, loch); } break; } case RESTRICTH_EDGE: { for (i = 1; i <= GetNSeg(); i++) { const Segment & seg = LineSegment(i); if (seg.edgenr == nr) RestrictLocalH (RESTRICTH_SEGMENT, i, loch); } break; } case RESTRICTH_POINT: { RestrictLocalH (Point (nr), loch); break; } case RESTRICTH_SURFACEELEMENT: { const Element2d & sel = SurfaceElement(nr); Point3d p = Center (Point(sel.PNum(1)), Point(sel.PNum(2)), Point(sel.PNum(3))); RestrictLocalH (p, loch); break; } case RESTRICTH_SEGMENT: { const Segment & seg = LineSegment(nr); RestrictLocalHLine (Point (seg[0]), Point(seg[1]), loch); break; } } } void Mesh :: LoadLocalMeshSize (const string & meshsizefilename) { // Philippose - 10/03/2009 // Improve error checking when loading and reading // the local mesh size file if (meshsizefilename.empty()) return; ifstream msf(meshsizefilename.c_str()); // Philippose - 09/03/2009 // Adding print message information in case the specified // does not exist, or does not load successfully due to // other reasons such as access rights, etc... if (!msf) { PrintMessage(3, "Error loading mesh size file: ", meshsizefilename, "....","Skipping!"); return; } PrintMessage (3, "Load local mesh-size file: ", meshsizefilename); int nmsp = 0; int nmsl = 0; msf >> nmsp; if(!msf.good()) throw NgException ("Mesh-size file error: No points found\n"); if(nmsp > 0) PrintMessage (4, "Number of mesh-size restriction points: ", nmsp); for (int i = 0; i < nmsp; i++) { Point3d pi; double hi; msf >> pi.X() >> pi.Y() >> pi.Z(); msf >> hi; if (!msf.good()) throw NgException ("Mesh-size file error: Number of points don't match specified list size\n"); RestrictLocalH (pi, hi); } msf >> nmsl; if(!msf.good()) throw NgException ("Mesh-size file error: No line definitions found\n"); if(nmsl > 0) PrintMessage (4, "Number of mesh-size restriction lines: ", nmsl); for (int i = 0; i < nmsl; i++) { Point3d p1, p2; double hi; msf >> p1.X() >> p1.Y() >> p1.Z(); msf >> p2.X() >> p2.Y() >> p2.Z(); msf >> hi; if (!msf.good()) throw NgException ("Mesh-size file error: Number of line definitions don't match specified list size\n"); RestrictLocalHLine (p1, p2, hi); } msf.close(); } void Mesh :: GetBox (Point3d & pmin, Point3d & pmax, int dom) const { if (points.Size() == 0) { pmin = pmax = Point3d(0,0,0); return; } if (dom <= 0) { pmin = Point3d (1e10, 1e10, 1e10); pmax = Point3d (-1e10, -1e10, -1e10); for (PointIndex pi = points.Begin(); pi < points.End(); pi++) { pmin.SetToMin ( (*this) [pi] ); pmax.SetToMax ( (*this) [pi] ); } } else { int j, nse = GetNSE(); SurfaceElementIndex sei; pmin = Point3d (1e10, 1e10, 1e10); pmax = Point3d (-1e10, -1e10, -1e10); for (sei = 0; sei < nse; sei++) { const Element2d & el = (*this)[sei]; if (el.IsDeleted() ) continue; if (dom == -1 || el.GetIndex() == dom) { for (j = 0; j < 3; j++) { pmin.SetToMin ( (*this) [el[j]] ); pmax.SetToMax ( (*this) [el[j]] ); } } } } if (pmin.X() > 0.5e10) { pmin = pmax = Point3d(0,0,0); } } void Mesh :: GetBox (Point3d & pmin, Point3d & pmax, POINTTYPE ptyp) const { if (points.Size() == 0) { pmin = pmax = Point3d(0,0,0); return; } pmin = Point3d (1e10, 1e10, 1e10); pmax = Point3d (-1e10, -1e10, -1e10); for (PointIndex pi = points.Begin(); pi < points.End(); pi++) if (points[pi].Type() <= ptyp) { pmin.SetToMin ( (*this) [pi] ); pmax.SetToMax ( (*this) [pi] ); } } double Mesh :: ElementError (int eli, const MeshingParameters & mp) const { const Element & el = volelements.Get(eli); return CalcTetBadness (points.Get(el[0]), points.Get(el[1]), points.Get(el[2]), points.Get(el[3]), -1, mp); } void Mesh :: AddLockedPoint (PointIndex pi) { lockedpoints.Append (pi); } void Mesh :: ClearLockedPoints () { lockedpoints.SetSize (0); } void Mesh :: Compress () { Array op2np(GetNP()); Array hpoints; BitArrayChar pused(GetNP()); /* (*testout) << "volels: " << endl; for (i = 1; i <= volelements.Size(); i++) { for (j = 1; j <= volelements.Get(i).GetNP(); j++) (*testout) << volelements.Get(i).PNum(j) << " "; (*testout) << endl; } (*testout) << "np: " << GetNP() << endl; */ for (int i = 0; i < volelements.Size(); i++) if (volelements[i][0] <= PointIndex::BASE-1 || volelements[i].IsDeleted()) { volelements.Delete(i); i--; } for (int i = 0; i < surfelements.Size(); i++) if (surfelements[i].IsDeleted()) { surfelements.Delete(i); i--; } for (int i = 0; i < segments.Size(); i++) if (segments[i][0] <= PointIndex::BASE-1) { segments.Delete(i); i--; } for(int i=0; i < segments.Size(); i++) if(segments[i].edgenr < 0) segments.Delete(i--); pused.Clear(); for (int i = 0; i < volelements.Size(); i++) { const Element & el = volelements[i]; for (int j = 0; j < el.GetNP(); j++) pused.Set (el[j]); } for (int i = 0; i < surfelements.Size(); i++) { const Element2d & el = surfelements[i]; for (int j = 0; j < el.GetNP(); j++) pused.Set (el[j]); } for (int i = 0; i < segments.Size(); i++) { const Segment & seg = segments[i]; pused.Set (seg[0]); pused.Set (seg[1]); } for (int i = 0; i < openelements.Size(); i++) { const Element2d & el = openelements[i]; for (int j = 0; j < el.GetNP(); j++) pused.Set(el[j]); } for (int i = 0; i < lockedpoints.Size(); i++) pused.Set (lockedpoints[i]); /* // compress points doesn't work for identified points ! if (identifiedpoints) { for (i = 1; i <= identifiedpoints->GetNBags(); i++) if (identifiedpoints->GetBagSize(i)) { pused.Set (); break; } } */ // pused.Set(); int npi = PointIndex::BASE-1; for (PointIndex pi = points.Begin(); pi < points.End(); pi++) if (pused.Test(pi)) { npi++; op2np[pi] = npi; hpoints.Append (points[pi]); } else op2np[pi] = -1; points.SetSize(0); for (int i = 0; i < hpoints.Size(); i++) points.Append (hpoints[i]); for (int i = 1; i <= volelements.Size(); i++) { Element & el = VolumeElement(i); for (int j = 0; j < el.GetNP(); j++) el[j] = op2np[el[j]]; } for (int i = 1; i <= surfelements.Size(); i++) { Element2d & el = SurfaceElement(i); for (int j = 0; j < el.GetNP(); j++) el[j] = op2np[el[j]]; } for (int i = 0; i < segments.Size(); i++) { Segment & seg = segments[i]; seg[0] = op2np[seg[0]]; seg[1] = op2np[seg[1]]; } for (int i = 1; i <= openelements.Size(); i++) { Element2d & el = openelements.Elem(i); for (int j = 0; j < el.GetNP(); j++) el[j] = op2np[el[j]]; } for (int i = 0; i < lockedpoints.Size(); i++) lockedpoints[i] = op2np[lockedpoints[i]]; for (int i = 0; i < facedecoding.Size(); i++) facedecoding[i].firstelement = -1; for (int i = surfelements.Size()-1; i >= 0; i--) { int ind = surfelements[i].GetIndex(); surfelements[i].next = facedecoding[ind-1].firstelement; facedecoding[ind-1].firstelement = i; } CalcSurfacesOfNode(); // FindOpenElements(); timestamp = NextTimeStamp(); } void Mesh :: OrderElements() { for (auto & el : surfelements) { if (el.GetType() == TRIG) while (el[0] > el[1] || el[0] > el[2]) { // rotate element auto hp = el[0]; el[0] = el[1]; el[1] = el[2]; el[2] = hp; auto hgi = el.GeomInfoPi(1); el.GeomInfoPi(1) = el.GeomInfoPi(2); el.GeomInfoPi(2) = el.GeomInfoPi(3); el.GeomInfoPi(3) = hgi; } } for (auto & el : volelements) if (el.GetType() == TET) { // lowest index first ... int mini = 0; for (int i = 1; i < 4; i++) if (el[i] < el[mini]) mini = i; if (mini != 0) { // swap 0 with mini, and the other two ... int i3 = -1, i4 = -1; for (int i = 1; i < 4; i++) if (i != mini) { i4 = i3; i3 = i; } swap (el[0], el[mini]); swap (el[i3], el[i4]); } while (el[1] > el[2] || el[1] > el[3]) { // rotate element to move second index to second position auto hp = el[1]; el[1] = el[2]; el[2] = el[3]; el[3] = hp; } } } int Mesh :: CheckConsistentBoundary () const { int nf = GetNOpenElements(); INDEX_2_HASHTABLE edges(nf+2); INDEX_2 i2, i2s, edge; int err = 0; for (int i = 1; i <= nf; i++) { const Element2d & sel = OpenElement(i); for (int j = 1; j <= sel.GetNP(); j++) { i2.I1() = sel.PNumMod(j); i2.I2() = sel.PNumMod(j+1); int sign = (i2.I2() > i2.I1()) ? 1 : -1; i2.Sort(); if (!edges.Used (i2)) edges.Set (i2, 0); edges.Set (i2, edges.Get(i2) + sign); } } for (int i = 1; i <= edges.GetNBags(); i++) for (int j = 1; j <= edges.GetBagSize(i); j++) { int cnt = 0; edges.GetData (i, j, i2, cnt); if (cnt) { PrintError ("Edge ", i2.I1() , " - ", i2.I2(), " multiple times in surface mesh"); (*testout) << "Edge " << i2 << " multiple times in surface mesh" << endl; i2s = i2; i2s.Sort(); for (int k = 1; k <= nf; k++) { const Element2d & sel = OpenElement(k); for (int l = 1; l <= sel.GetNP(); l++) { edge.I1() = sel.PNumMod(l); edge.I2() = sel.PNumMod(l+1); edge.Sort(); if (edge == i2s) (*testout) << "edge of element " << sel << endl; } } err = 2; } } return err; } int Mesh :: CheckOverlappingBoundary () { int i, j, k; Point3d pmin, pmax; GetBox (pmin, pmax); BoxTree<3> setree(pmin, pmax); Array inters; bool overlap = 0; bool incons_layers = 0; for (i = 1; i <= GetNSE(); i++) SurfaceElement(i).badel = 0; for (i = 1; i <= GetNSE(); i++) { const Element2d & tri = SurfaceElement(i); Point3d tpmin (Point(tri[0])); Point3d tpmax (tpmin); for (k = 1; k < tri.GetNP(); k++) { tpmin.SetToMin (Point (tri[k])); tpmax.SetToMax (Point (tri[k])); } Vec3d diag(tpmin, tpmax); tpmax = tpmax + 0.1 * diag; tpmin = tpmin - 0.1 * diag; setree.Insert (tpmin, tpmax, i); } for (i = 1; i <= GetNSE(); i++) { const Element2d & tri = SurfaceElement(i); Point3d tpmin (Point(tri[0])); Point3d tpmax (tpmin); for (k = 1; k < tri.GetNP(); k++) { tpmin.SetToMin (Point (tri[k])); tpmax.SetToMax (Point (tri[k])); } setree.GetIntersecting (tpmin, tpmax, inters); for (j = 1; j <= inters.Size(); j++) { const Element2d & tri2 = SurfaceElement(inters.Get(j)); if ( (*this)[tri[0]].GetLayer() != (*this)[tri2[0]].GetLayer()) continue; if ( (*this)[tri[0]].GetLayer() != (*this)[tri[1]].GetLayer() || (*this)[tri[0]].GetLayer() != (*this)[tri[2]].GetLayer()) { incons_layers = 1; cout << "inconsistent layers in triangle" << endl; } const netgen::Point<3> *trip1[3], *trip2[3]; for (k = 1; k <= 3; k++) { trip1[k-1] = &Point (tri.PNum(k)); trip2[k-1] = &Point (tri2.PNum(k)); } if (IntersectTriangleTriangle (&trip1[0], &trip2[0])) { overlap = 1; PrintWarning ("Intersecting elements " ,i, " and ", inters.Get(j)); (*testout) << "Intersecting: " << endl; (*testout) << "openelement " << i << " with open element " << inters.Get(j) << endl; cout << "el1 = " << tri << endl; cout << "el2 = " << tri2 << endl; cout << "layer1 = " << (*this)[tri[0]].GetLayer() << endl; cout << "layer2 = " << (*this)[tri2[0]].GetLayer() << endl; for (k = 1; k <= 3; k++) (*testout) << tri.PNum(k) << " "; (*testout) << endl; for (k = 1; k <= 3; k++) (*testout) << tri2.PNum(k) << " "; (*testout) << endl; for (k = 0; k <= 2; k++) (*testout) << *trip1[k] << " "; (*testout) << endl; for (k = 0; k <= 2; k++) (*testout) << *trip2[k] << " "; (*testout) << endl; (*testout) << "Face1 = " << GetFaceDescriptor(tri.GetIndex()) << endl; (*testout) << "Face1 = " << GetFaceDescriptor(tri2.GetIndex()) << endl; /* INDEX_3 i3(tri.PNum(1), tri.PNum(2), tri.PNum(3)); i3.Sort(); for (k = 1; k <= GetNSE(); k++) { const Element2d & el2 = SurfaceElement(k); INDEX_3 i3b(el2.PNum(1), el2.PNum(2), el2.PNum(3)); i3b.Sort(); if (i3 == i3b) { SurfaceElement(k).badel = 1; } } */ SurfaceElement(i).badel = 1; SurfaceElement(inters.Get(j)).badel = 1; } } } // bug 'fix' if (incons_layers) overlap = 0; return overlap; } int Mesh :: CheckVolumeMesh () const { PrintMessage (3, "Checking volume mesh"); int ne = GetNE(); DenseMatrix dtrans(3,3); int i, j; PrintMessage (5, "elements: ", ne); for (i = 1; i <= ne; i++) { Element & el = (Element&) VolumeElement(i); el.flags.badel = 0; int nip = el.GetNIP(); for (j = 1; j <= nip; j++) { el.GetTransformation (j, Points(), dtrans); double det = dtrans.Det(); if (det > 0) { PrintError ("Element ", i , " has wrong orientation"); el.flags.badel = 1; } } } return 0; } bool Mesh :: LegalTrig (const Element2d & el) const { return 1; if ( /* hp */ 1) // needed for old, simple hp-refinement { // trigs with 2 or more segments are illegal int i; int nseg = 0; if (!segmentht) { cerr << "no segmentht allocated" << endl; return 0; } // Point3d cp(0.5, 0.5, 0.5); for (i = 1; i <= 3; i++) { INDEX_2 i2(el.PNumMod (i), el.PNumMod (i+1)); i2.Sort(); if (segmentht -> Used (i2)) nseg++; } if (nseg >= 2) return 0; } return 1; } /// bool Mesh :: LegalTet2 (Element & el) const { // static int timer1 = NgProfiler::CreateTimer ("Legaltet2"); // Test, whether 4 points have a common surface plus // at least 4 edges at the boundary if(!boundaryedges) const_cast(this)->BuildBoundaryEdges(); // non-tets are always legal if (el.GetType() != TET) { el.SetLegal (1); return 1; } POINTTYPE pointtype[4]; for(int i = 0; i < 4; i++) pointtype[i] = (*this)[el[i]].Type(); // element has at least 2 inner points ---> legal int cnti = 0; for (int j = 0; j < 4; j++) if ( pointtype[j] == INNERPOINT) { cnti++; if (cnti >= 2) { el.SetLegal (1); return 1; } } // which faces are boundary faces ? int bface[4]; for (int i = 0; i < 4; i++) { bface[i] = surfelementht->Used (INDEX_3::Sort(el[gftetfacesa[i][0]], el[gftetfacesa[i][1]], el[gftetfacesa[i][2]])); } int bedge[4][4]; int segedge[4][4]; static const int pi3map[4][4] = { { -1, 2, 1, 1 }, { 2, -1, 0, 0 }, { 1, 0, -1, 0 }, { 1, 0, 0, -1 } }; static const int pi4map[4][4] = { { -1, 3, 3, 2 }, { 3, -1, 3, 2 }, { 3, 3, -1, 1 }, { 2, 2, 1, -1 } }; for (int i = 0; i < 4; i++) for (int j = 0; j < i; j++) { bool sege = false, be = false; int pos = boundaryedges -> Position0(INDEX_2::Sort(el[i], el[j])); if (pos != -1) { be = true; if (boundaryedges -> GetData0(pos) == 2) sege = true; } segedge[j][i] = segedge[i][j] = sege; bedge[j][i] = bedge[i][j] = be; } // two boundary faces and no edge is illegal for (int i = 0; i < 3; i++) for (int j = i+1; j < 4; j++) { if (bface[i] && bface[j]) if (!segedge[pi3map[i][j]][pi4map[i][j]]) { // 2 boundary faces withoud edge in between el.SetLegal (0); return 0; } } // three boundary edges meeting in a Surface point for (int i = 0; i < 4; i++) { if ( pointtype[i] == SURFACEPOINT) { bool alledges = 1; for (int j = 0; j < 4; j++) if (j != i && !bedge[i][j]) { alledges = 0; break; } if (alledges) { // cout << "tet illegal due to unmarked node" << endl; el.SetLegal (0); return 0; } } } for (int fnr = 0; fnr < 4; fnr++) if (!bface[fnr]) for (int i = 0; i < 4; i++) if (i != fnr) { int pi1 = pi3map[i][fnr]; int pi2 = pi4map[i][fnr]; if ( pointtype[i] == SURFACEPOINT) { // two connected edges on surface, but no face if (bedge[i][pi1] && bedge[i][pi2]) { el.SetLegal (0); return 0; } } if ( pointtype[i] == EDGEPOINT) { // connected surface edge and edge edge, but no face if ( (bedge[i][pi1] && segedge[i][pi2]) || (bedge[i][pi2] && segedge[i][pi1]) ) { el.SetLegal (0); return 0; } } } el.SetLegal (1); return 1; } int Mesh :: GetNDomains() const { int ndom = 0; for (int k = 0; k < facedecoding.Size(); k++) { if (facedecoding[k].DomainIn() > ndom) ndom = facedecoding[k].DomainIn(); if (facedecoding[k].DomainOut() > ndom) ndom = facedecoding[k].DomainOut(); } return ndom; } void Mesh :: SurfaceMeshOrientation () { int i, j; int nse = GetNSE(); BitArray used(nse); used.Clear(); INDEX_2_HASHTABLE edges(nse+1); bool haschanged = 0; const Element2d & tri = SurfaceElement(1); for (j = 1; j <= 3; j++) { INDEX_2 i2(tri.PNumMod(j), tri.PNumMod(j+1)); edges.Set (i2, 1); } used.Set(1); bool unused; do { bool changed; do { changed = 0; for (i = 1; i <= nse; i++) if (!used.Test(i)) { Element2d & el = surfelements.Elem(i); int found = 0, foundrev = 0; for (j = 1; j <= 3; j++) { INDEX_2 i2(el.PNumMod(j), el.PNumMod(j+1)); if (edges.Used(i2)) foundrev = 1; swap (i2.I1(), i2.I2()); if (edges.Used(i2)) found = 1; } if (found || foundrev) { if (foundrev) swap (el.PNum(2), el.PNum(3)); changed = 1; for (j = 1; j <= 3; j++) { INDEX_2 i2(el.PNumMod(j), el.PNumMod(j+1)); edges.Set (i2, 1); } used.Set (i); } } if (changed) haschanged = 1; } while (changed); unused = 0; for (i = 1; i <= nse; i++) if (!used.Test(i)) { unused = 1; const Element2d & tri = SurfaceElement(i); for (j = 1; j <= 3; j++) { INDEX_2 i2(tri.PNumMod(j), tri.PNumMod(j+1)); edges.Set (i2, 1); } used.Set(i); break; } } while (unused); if (haschanged) timestamp = NextTimeStamp(); } void Mesh :: Split2Tets() { PrintMessage (1, "Split To Tets"); bool has_prisms = 0; int oldne = GetNE(); for (int i = 1; i <= oldne; i++) { Element el = VolumeElement(i); if (el.GetType() == PRISM) { // prism, to 3 tets // make minimal node to node 1 int minpi=0; PointIndex minpnum; minpnum = GetNP() + 1; for (int j = 1; j <= 6; j++) { if (el.PNum(j) < minpnum) { minpnum = el.PNum(j); minpi = j; } } if (minpi >= 4) { for (int j = 1; j <= 3; j++) swap (el.PNum(j), el.PNum(j+3)); minpi -= 3; } while (minpi > 1) { int hi = 0; for (int j = 0; j <= 3; j+= 3) { hi = el.PNum(1+j); el.PNum(1+j) = el.PNum(2+j); el.PNum(2+j) = el.PNum(3+j); el.PNum(3+j) = hi; } minpi--; } /* version 1: edge from pi2 to pi6, version 2: edge from pi3 to pi5, */ static const int ntets[2][12] = { { 1, 4, 5, 6, 1, 2, 3, 6, 1, 2, 5, 6 }, { 1, 4, 5, 6, 1, 2, 3, 5, 3, 1, 5, 6 } }; const int * min2pi; if (min2 (el.PNum(2), el.PNum(6)) < min2 (el.PNum(3), el.PNum(5))) { min2pi = &ntets[0][0]; // (*testout) << "version 1 "; } else { min2pi = &ntets[1][0]; // (*testout) << "version 2 "; } int firsttet = 1; for (int j = 1; j <= 3; j++) { Element nel(TET); for (int k = 1; k <= 4; k++) nel.PNum(k) = el.PNum(min2pi[4 * j + k - 5]); nel.SetIndex (el.GetIndex()); int legal = 1; for (int k = 1; k <= 3; k++) for (int l = k+1; l <= 4; l++) if (nel.PNum(k) == nel.PNum(l)) legal = 0; // (*testout) << nel << " "; if (legal) { if (firsttet) { VolumeElement(i) = nel; firsttet = 0; } else { AddVolumeElement(nel); } } } if (firsttet) cout << "no legal"; (*testout) << endl; } else if (el.GetType() == HEX) { // hex to A) 2 prisms or B) to 5 tets // make minimal node to node 1 int minpi=0; PointIndex minpnum; minpnum = GetNP() + 1; for (int j = 1; j <= 8; j++) { if (el.PNum(j) < minpnum) { minpnum = el.PNum(j); minpi = j; } } if (minpi >= 5) { for (int j = 1; j <= 4; j++) swap (el.PNum(j), el.PNum(j+4)); minpi -= 4; } while (minpi > 1) { int hi = 0; for (int j = 0; j <= 4; j+= 4) { hi = el.PNum(1+j); el.PNum(1+j) = el.PNum(2+j); el.PNum(2+j) = el.PNum(3+j); el.PNum(3+j) = el.PNum(4+j); el.PNum(4+j) = hi; } minpi--; } static const int to_prisms[3][12] = { { 0, 1, 2, 4, 5, 6, 0, 2, 3, 4, 6, 7 }, { 0, 1, 5, 3, 2, 6, 0, 5, 4, 3, 6, 7 }, { 0, 7, 4, 1, 6, 5, 0, 3, 7, 1, 2, 6 }, }; const int * min2pi = 0; if (min2 (el[4], el[6]) < min2 (el[5], el[7])) min2pi = &to_prisms[0][0]; else if (min2 (el[3], el[6]) < min2 (el[2], el[7])) min2pi = &to_prisms[1][0]; else if (min2 (el[1], el[6]) < min2 (el[2], el[5])) min2pi = &to_prisms[2][0]; if (min2pi) { has_prisms = 1; for (int j = 0; j < 2; j++) { Element nel(PRISM); for (int k = 0; k < 6; k++) nel[k] = el[min2pi[6*j + k]]; nel.SetIndex (el.GetIndex()); if (j == 0) VolumeElement(i) = nel; else AddVolumeElement(nel); } } else { // split to 5 tets static const int to_tets[20] = { 1, 2, 0, 5, 3, 0, 2, 7, 4, 5, 7, 0, 6, 7, 5, 2, 0, 2, 7, 5 }; for (int j = 0; j < 5; j++) { Element nel(TET); for (int k = 0; k < 4; k++) nel[k] = el[to_tets[4*j + k]]; nel.SetIndex (el.GetIndex()); if (j == 0) VolumeElement(i) = nel; else AddVolumeElement(nel); } } } else if (el.GetType() == PYRAMID) { // pyramid, to 2 tets // cout << "pyramid: " << el << endl; static const int ntets[2][8] = { { 1, 2, 3, 5, 1, 3, 4, 5 }, { 1, 2, 4, 5, 4, 2, 3, 5 }}; const int * min2pi; if (min2 (el[0], el[2]) < min2 (el[1], el[3])) min2pi = &ntets[0][0]; else min2pi = &ntets[1][0]; bool firsttet = 1; for (int j = 0; j < 2; j++) { Element nel(TET); for (int k = 0; k < 4; k++) nel[k] = el[min2pi[4*j + k]-1]; nel.SetIndex (el.GetIndex()); // cout << "pyramid-tet: " << nel << endl; bool legal = 1; for (int k = 0; k < 3; k++) for (int l = k+1; l < 4; l++) if (nel[k] == nel[l]) legal = 0; if (legal) { (*testout) << nel << " "; if (firsttet) VolumeElement(i) = nel; else AddVolumeElement(nel); firsttet = 0; } } if (firsttet) cout << "no legal"; (*testout) << endl; } } int oldnse = GetNSE(); for (int i = 1; i <= oldnse; i++) { Element2d el = SurfaceElement(i); if (el.GetNP() == 4) { (*testout) << "split el: " << el << " to "; static const int ntris[2][6] = { { 1, 2, 3, 1, 3, 4 }, { 1, 2, 4, 4, 2, 3 }}; const int * min2pi; if (min2 (el.PNum(1), el.PNum(3)) < min2 (el.PNum(2), el.PNum(4))) min2pi = &ntris[0][0]; else min2pi = &ntris[1][0]; for (int j = 0; j <6; j++) (*testout) << min2pi[j] << " "; int firsttri = 1; for (int j = 1; j <= 2; j++) { Element2d nel(3); for (int k = 1; k <= 3; k++) nel.PNum(k) = el.PNum(min2pi[3 * j + k - 4]); nel.SetIndex (el.GetIndex()); int legal = 1; for (int k = 1; k <= 2; k++) for (int l = k+1; l <= 3; l++) if (nel.PNum(k) == nel.PNum(l)) legal = 0; if (legal) { (*testout) << nel << " "; if (firsttri) { SurfaceElement(i) = nel; firsttri = 0; } else { AddSurfaceElement(nel); } } } (*testout) << endl; } } if (has_prisms) Split2Tets(); else { for (int i = 1; i <= GetNE(); i++) { Element & el = VolumeElement(i); const Point3d & p1 = Point (el.PNum(1)); const Point3d & p2 = Point (el.PNum(2)); const Point3d & p3 = Point (el.PNum(3)); const Point3d & p4 = Point (el.PNum(4)); double vol = (Vec3d (p1, p2) * Cross (Vec3d (p1, p3), Vec3d(p1, p4))); if (vol > 0) swap (el.PNum(3), el.PNum(4)); } UpdateTopology(); timestamp = NextTimeStamp(); } RebuildSurfaceElementLists(); } void Mesh :: BuildElementSearchTree () { if (elementsearchtreets == GetTimeStamp()) return; { std::lock_guard guard(buildsearchtree_mutex); if (elementsearchtreets != GetTimeStamp()) { NgLock lock(mutex); lock.Lock(); PrintMessage (4, "Rebuild element searchtree"); delete elementsearchtree; elementsearchtree = NULL; int ne = (dimension == 2) ? GetNSE() : GetNE(); if (ne) { if (dimension == 2) { Box<3> box (Box<3>::EMPTY_BOX); for (SurfaceElementIndex sei = 0; sei < ne; sei++) box.Add (points[surfelements[sei].PNums()]); box.Increase (1.01 * box.Diam()); elementsearchtree = new BoxTree<3> (box); for (SurfaceElementIndex sei = 0; sei < ne; sei++) { box.Set (points[surfelements[sei].PNums()]); elementsearchtree -> Insert (box, sei+1); } } else { Box<3> box (Box<3>::EMPTY_BOX); for (ElementIndex ei = 0; ei < ne; ei++) box.Add (points[volelements[ei].PNums()]); box.Increase (1.01 * box.Diam()); elementsearchtree = new BoxTree<3> (box); for (ElementIndex ei = 0; ei < ne; ei++) { box.Set (points[volelements[ei].PNums()]); elementsearchtree -> Insert (box, ei+1); } } elementsearchtreets = GetTimeStamp(); } } } } int SolveLinearSystemLS (const Vec3d & col1, const Vec3d & col2, const Vec3d & rhs, Vec2d & sol) { double a11 = col1 * col1; double a12 = col1 * col2; double a22 = col2 * col2; double det = a11 * a22 - a12 * a12; if (det*det <= 1e-24 * a11 * a22) { sol = Vec2d (0, 0); return 1; } Vec2d aTrhs; aTrhs.X() = col1*rhs; aTrhs.Y() = col2*rhs; sol.X() = ( a22 * aTrhs.X() - a12 * aTrhs.Y()) / det; sol.Y() = (-a12 * aTrhs.X() + a11 * aTrhs.Y()) / det; return 0; } bool Mesh :: PointContainedIn2DElement(const Point3d & p, double lami[3], const int element, bool consider3D) const { Vec3d col1, col2, col3; Vec3d rhs, sol; const double eps = 1e-6; Array loctrigs; //SZ if(SurfaceElement(element).GetType()==QUAD) { const Element2d & el = SurfaceElement(element); const Point3d & p1 = Point(el.PNum(1)); const Point3d & p2 = Point(el.PNum(2)); const Point3d & p3 = Point(el.PNum(3)); const Point3d & p4 = Point(el.PNum(4)); // Coefficients of Bilinear Mapping from Ref-Elem to global Elem // X = a + b x + c y + d x y Vec3d a = p1; Vec3d b = p2 - a; Vec3d c = p4 - a; Vec3d d = p3 - a - b - c; double dxb = d.X()*b.Y()-d.Y()*b.X(); double dxc = d.X()*c.Y()-d.Y()*c.X(); double dxa = d.X()*a.Y()-d.Y()*a.X(); double dxp = d.X()*p.Y()-d.Y()*p.X(); double c0,c1,c2; // ,rt; lami[2]=0.; double eps = 1.E-12; Vec3d dp13 = p3-p1; Vec3d dp24 = p4-p2; double d1 = dp13.Length2(); double d2 = dp24.Length2(); // if(fabs(d.X()) <= eps && fabs(d.Y())<= eps) //if (d.Length2() < sqr(eps)) if (d.Length2() < sqr(eps)*d1 && d.Length2() < sqr(eps)*d2) { //Solve Linear System Vec2d sol; SolveLinearSystemLS (b, c, p-a, sol); lami[0] = sol.X(); lami[1] = sol.Y(); if(lami[1]<=1.+eps && lami[1]>=0.-eps && lami[0]<=1.+eps && lami[0]>=0.-eps) return true; /* lami[0]=(c.Y()*(p.X()-a.X())-c.X()*(p.Y()-a.Y()))/ (b.X()*c.Y() -b.Y()*c.X()); lami[1]=(-b.Y()*(p.X()-a.X())+b.X()*(p.Y()-a.Y()))/ (b.X()*c.Y() -b.Y()*c.X()); */ } else if(fabs(dxb) <= eps*fabs(dxc)) { lami[1] = (dxp-dxa)/dxc; if(fabs(b.X()+d.X()*lami[1])>=fabs(b.Y()+d.Y()*lami[1])) lami[0] = (p.X()-a.X() - c.X()*lami[1])/(b.X()+d.X()*lami[1]); else lami[0] = (p.Y()-a.Y() - c.Y()*lami[1])/(b.Y()+d.Y()*lami[1]); if(lami[1]<=1.+eps && lami[1]>=0.-eps && lami[0]<=1.+eps && lami[0]>=0.-eps) return true; } else if(fabs(dxc) <= eps*fabs(dxb)) { lami[0] = (dxp-dxa)/dxb; if(fabs(c.X()+d.X()*lami[0])>=fabs(c.Y()+d.Y()*lami[0])) lami[1] = (p.X()-a.X() - b.X()*lami[0])/(c.X()+d.X()*lami[0]); else lami[1] = (p.Y()-a.Y() - b.Y()*lami[0])/(c.Y()+d.Y()*lami[0]); if(lami[1]<=1.+eps && lami[1]>=0.-eps && lami[0]<=1.+eps && lami[0]>=0.-eps) return true; } else //Solve quadratic equation { c2 = -d.X()*dxb; c1 = b.X()*dxc - c.X()*dxb + d.X()*(dxp-dxa); c0 = c.X()*(dxp-dxa) + (a.X()-p.X())*dxc; double rt = c1*c1 - 4*c2*c0; if (rt < 0.) return false; lami[1] = (-c1 + sqrt(rt))/2/c2; if(lami[1]<=1.+eps && lami[1]>=0.-eps) { lami[0] = (dxp - dxa -dxb*lami[1])/dxc; if(lami[0]<=1.+eps && lami[0]>=0.-eps) return true; } lami[1] = (-c1 - sqrt(rt))/2/c2; lami[0] = (dxp - dxa -dxb*lami[1])/dxc; if(lami[1]<=1.+eps && lami[1]>=0.-eps && lami[0]<=1.+eps && lami[0]>=0.-eps) return true; c2 = d.Y()*dxb; c1 = b.Y()*dxc - c.Y()*dxb + d.Y()*(dxp-dxa); c0 = c.Y()*(dxp -dxa) + (a.Y()-p.Y())*dxc; rt = c1*c1 - 4*c2*c0; if (rt < 0.) return false; lami[1] = (-c1 + sqrt(rt))/2/c2; if(lami[1]<=1.+eps && lami[1]>=0.-eps) { lami[0] = (dxp - dxa -dxb*lami[1])/dxc; if(lami[0]<=1.+eps && lami[0]>=0.-eps) return true; } lami[1] = (-c1 - sqrt(rt))/2/c2; lami[0] = (dxp - dxa -dxb*lami[1])/dxc; if(lami[1]<=1.+eps && lami[1]>=0.-eps && lami[0]<=1.+eps && lami[0]>=0.-eps) return true; c2 = -d.X()*dxc; c1 = -b.X()*dxc + c.X()*dxb + d.X()*(dxp-dxa); c0 = b.X()*(dxp -dxa) + (a.X()-p.X())*dxb; rt = c1*c1 - 4*c2*c0; if (rt < 0.) return false; lami[1] = (-c1 + sqrt(rt))/2/c2; if(lami[1]<=1.+eps && lami[1]>=0.-eps) { lami[0] = (dxp - dxa -dxc*lami[1])/dxb; if(lami[0]<=1.+eps && lami[0]>=0.-eps) return true; } lami[1] = (-c1 - sqrt(rt))/2/c2; lami[0] = (dxp - dxa -dxc*lami[1])/dxb; if(lami[1]<=1.+eps && lami[1]>=0.-eps && lami[0]<=1.+eps && lami[0]>=0.-eps) return true; } //cout << "lam0,1 = " << lami[0] << ", " << lami[1] << endl; /*if( lami[0] <= 1.+eps && lami[0] >= -eps && lami[1]<=1.+eps && lami[1]>=-eps) { if(consider3D) { Vec3d n = Cross(b,c); lami[2] = 0; for(int i=1; i<=3; i++) lami[2] +=(p.X(i)-a.X(i)-lami[0]*b.X(i)-lami[1]*c.X(i)) * n.X(i); if(lami[2] >= -eps && lami[2] <= eps) return true; } else return true; }*/ return false; } else { // SurfaceElement(element).GetTets (loctets); loctrigs.SetSize(1); loctrigs.Elem(1) = SurfaceElement(element); for (int j = 1; j <= loctrigs.Size(); j++) { const Element2d & el = loctrigs.Get(j); const Point3d & p1 = Point(el.PNum(1)); const Point3d & p2 = Point(el.PNum(2)); const Point3d & p3 = Point(el.PNum(3)); /* Box3d box; box.SetPoint (p1); box.AddPoint (p2); box.AddPoint (p3); box.AddPoint (p4); if (!box.IsIn (p)) continue; */ col1 = p2-p1; col2 = p3-p1; col3 = Cross(col1,col2); //col3 = Vec3d(0, 0, 1); rhs = p - p1; // int retval = SolveLinearSystem (col1, col2, col3, rhs, sol); //(*testout) << "retval " << retval << endl; //(*testout) << "col1 " << col1 << " col2 " << col2 << " col3 " << col3 << " rhs " << rhs << endl; //(*testout) << "sol " << sol << endl; if (sol.X() >= -eps && sol.Y() >= -eps && sol.X() + sol.Y() <= 1+eps) { if(!consider3D || (sol.Z() >= -eps && sol.Z() <= eps)) { lami[0] = sol.X(); lami[1] = sol.Y(); lami[2] = sol.Z(); return true; } } } } return false; } bool Mesh :: PointContainedIn3DElement(const Point3d & p, double lami[3], const int element) const { //bool oldresult = PointContainedIn3DElementOld(p,lami,element); //(*testout) << "old result: " << oldresult // << " lam " << lami[0] << " " << lami[1] << " " << lami[2] << endl; //if(!curvedelems->IsElementCurved(element-1)) // return PointContainedIn3DElementOld(p,lami,element); const double eps = 1.e-4; const Element & el = VolumeElement(element); netgen::Point<3> lam = 0.0; if (el.GetType() == TET || el.GetType() == TET10) { lam = 0.25; } else if (el.GetType() == PRISM) { lam(0) = 0.33; lam(1) = 0.33; lam(2) = 0.5; } else if (el.GetType() == PYRAMID) { lam(0) = 0.4; lam(1) = 0.4; lam(2) = 0.2; } else if (el.GetType() == HEX) { lam = 0.5; } Vec<3> deltalam,rhs; netgen::Point<3> x; Mat<3,3> Jac,Jact; double delta=1; bool retval; int i = 0; const int maxits = 30; while(delta > 1e-16 && iCalcElementTransformation(lam,element-1,x,Jac); rhs = p-x; Jac.Solve(rhs,deltalam); lam += deltalam; delta = deltalam.Length2(); i++; //(*testout) << "pcie i " << i << " delta " << delta << " p " << p << " x " << x << " lam " << lam << endl; //<< "Jac " << Jac << endl; } if(i==maxits) return false; for(i=0; i<3; i++) lami[i] = lam(i); if (el.GetType() == TET || el.GetType() == TET10) { retval = (lam(0) > -eps && lam(1) > -eps && lam(2) > -eps && lam(0) + lam(1) + lam(2) < 1+eps); } else if (el.GetType() == PRISM) { retval = (lam(0) > -eps && lam(1) > -eps && lam(2) > -eps && lam(2) < 1+eps && lam(0) + lam(1) < 1+eps); } else if (el.GetType() == PYRAMID) { retval = (lam(0) > -eps && lam(1) > -eps && lam(2) > -eps && lam(0) + lam(2) < 1+eps && lam(1) + lam(2) < 1+eps); } else if (el.GetType() == HEX) { retval = (lam(0) > -eps && lam(0) < 1+eps && lam(1) > -eps && lam(1) < 1+eps && lam(2) > -eps && lam(2) < 1+eps); } else throw NgException("Da haun i wos vagessn"); return retval; } bool Mesh :: PointContainedIn3DElementOld(const Point3d & p, double lami[3], const int element) const { Vec3d col1, col2, col3; Vec3d rhs, sol; const double eps = 1.e-4; Array loctets; VolumeElement(element).GetTets (loctets); for (int j = 1; j <= loctets.Size(); j++) { const Element & el = loctets.Get(j); const Point3d & p1 = Point(el.PNum(1)); const Point3d & p2 = Point(el.PNum(2)); const Point3d & p3 = Point(el.PNum(3)); const Point3d & p4 = Point(el.PNum(4)); Box3d box; box.SetPoint (p1); box.AddPoint (p2); box.AddPoint (p3); box.AddPoint (p4); if (!box.IsIn (p)) continue; col1 = p2-p1; col2 = p3-p1; col3 = p4-p1; rhs = p - p1; SolveLinearSystem (col1, col2, col3, rhs, sol); if (sol.X() >= -eps && sol.Y() >= -eps && sol.Z() >= -eps && sol.X() + sol.Y() + sol.Z() <= 1+eps) { Array loctetsloc; Array > pointsloc; VolumeElement(element).GetTetsLocal (loctetsloc); VolumeElement(element).GetNodesLocalNew (pointsloc); const Element & le = loctetsloc.Get(j); Point3d pp = pointsloc.Get(le.PNum(1)) + sol.X() * Vec3d (pointsloc.Get(le.PNum(1)), pointsloc.Get(le.PNum(2))) + sol.Y() * Vec3d (pointsloc.Get(le.PNum(1)), pointsloc.Get(le.PNum(3))) + sol.Z() * Vec3d (pointsloc.Get(le.PNum(1)), pointsloc.Get(le.PNum(4))) ; lami[0] = pp.X(); lami[1] = pp.Y(); lami[2] = pp.Z(); return true; } } return false; } int Mesh :: GetElementOfPoint (const netgen::Point<3> & p, double lami[3], bool build_searchtree, const int index, const bool allowindex) const { if(index != -1) { Array dummy(1); dummy[0] = index; return GetElementOfPoint(p,lami,&dummy,build_searchtree,allowindex); } else return GetElementOfPoint(p,lami,NULL,build_searchtree,allowindex); } int Mesh :: GetElementOfPoint (const netgen::Point<3> & p, double lami[3], const Array * const indices, bool build_searchtree, const bool allowindex) const { const double pointtol = 1e-12; netgen::Point<3> pmin = p - Vec<3> (pointtol, pointtol, pointtol); netgen::Point<3> pmax = p + Vec<3> (pointtol, pointtol, pointtol); if (dimension == 2) { int ne; int ps_startelement = 0; // disable global buffering if(ps_startelement != 0 && ps_startelement <= GetNSE() && PointContainedIn2DElement(p,lami,ps_startelement)) return ps_startelement; Array locels; if (elementsearchtree || build_searchtree) { // update if necessary: const_cast(*this).BuildElementSearchTree (); elementsearchtree->GetIntersecting (pmin, pmax, locels); ne = locels.Size(); } else ne = GetNSE(); for (int i = 1; i <= ne; i++) { int ii; if (elementsearchtree) ii = locels.Get(i); else ii = i; if(ii == ps_startelement) continue; if(indices != NULL && indices->Size() > 0) { bool contained = indices->Contains(SurfaceElement(ii).GetIndex()); if((allowindex && !contained) || (!allowindex && contained)) continue; } if(PointContainedIn2DElement(p,lami,ii)) return ii; } return 0; } else { int ps_startelement = 0; // disable global buffering // int i, j; int ne; if(ps_startelement != 0 && PointContainedIn3DElement(p,lami,ps_startelement)) return ps_startelement; Array locels; if (elementsearchtree || build_searchtree) { // update if necessary: const_cast(*this).BuildElementSearchTree (); elementsearchtree->GetIntersecting (pmin, pmax, locels); ne = locels.Size(); } else ne = GetNE(); for (int i = 1; i <= ne; i++) { int ii; if (elementsearchtree) ii = locels.Get(i); else ii = i; if(ii == ps_startelement) continue; if(indices != NULL && indices->Size() > 0) { bool contained = indices->Contains(VolumeElement(ii).GetIndex()); if((allowindex && !contained) || (!allowindex && contained)) continue; } if(PointContainedIn3DElement(p,lami,ii)) { ps_startelement = ii; return ii; } } // Not found, try uncurved variant: for (int i = 1; i <= ne; i++) { int ii; if (elementsearchtree) ii = locels.Get(i); else ii = i; if(indices != NULL && indices->Size() > 0) { bool contained = indices->Contains(VolumeElement(ii).GetIndex()); if((allowindex && !contained) || (!allowindex && contained)) continue; } if(PointContainedIn3DElementOld(p,lami,ii)) { ps_startelement = ii; (*testout) << "WARNING: found element of point " << p <<" only for uncurved mesh" << endl; return ii; } } return 0; } } int Mesh :: GetSurfaceElementOfPoint (const netgen::Point<3> & p, double lami[3], bool build_searchtree, const int index, const bool allowindex) const { if(index != -1) { Array dummy(1); dummy[0] = index; return GetSurfaceElementOfPoint(p,lami,&dummy,build_searchtree,allowindex); } else return GetSurfaceElementOfPoint(p,lami,NULL,build_searchtree,allowindex); } int Mesh :: GetSurfaceElementOfPoint (const netgen::Point<3> & p, double lami[3], const Array * const indices, bool build_searchtree, const bool allowindex) const { if (dimension == 2) { throw NgException("GetSurfaceElementOfPoint not yet implemented for 2D meshes"); } else { double vlam[3]; int velement = GetElementOfPoint(p,vlam,NULL,build_searchtree,allowindex); //(*testout) << "p " << p << endl; //(*testout) << "velement " << velement << endl; Array faces; topology.GetElementFaces(velement,faces); //(*testout) << "faces " << faces << endl; for(int i=0; iSize() != 0) { if(indices->Contains(SurfaceElement(faces[i]).GetIndex()) && PointContainedIn2DElement(p,lami,faces[i],true)) return faces[i]; } else { if(PointContainedIn2DElement(p,lami,faces[i],true)) { //(*testout) << "found point " << p << " in sel " << faces[i] // << ", lam " << lami[0] << ", " << lami[1] << ", " << lami[2] << endl; return faces[i]; } } } Array faces2; topology.GetElementFaces(velement,faces2); /* cout << "no matching surf element" << endl << "p = " << p << endl << "faces-orig = " << faces2 << endl << "faces = " << faces << endl << ", vol el = " << velement << ", vlam = " << vlam[0] << "," << vlam[1] << "," << vlam[2] << endl; */ } return 0; } void Mesh::GetIntersectingVolEls(const Point3d& p1, const Point3d& p2, Array & locels) const { elementsearchtree->GetIntersecting (p1, p2, locels); } void Mesh :: SplitIntoParts() { int i, j, dom; int ne = GetNE(); int np = GetNP(); int nse = GetNSE(); BitArray surfused(nse); BitArray pused (np); surfused.Clear(); dom = 0; while (1) { int cntd = 1; dom++; pused.Clear(); int found = 0; for (i = 1; i <= nse; i++) if (!surfused.Test(i)) { SurfaceElement(i).SetIndex (dom); for (j = 1; j <= 3; j++) pused.Set (SurfaceElement(i).PNum(j)); found = 1; cntd = 1; surfused.Set(i); break; } if (!found) break; int change; do { change = 0; for (i = 1; i <= nse; i++) { int is = 0, isnot = 0; for (j = 1; j <= 3; j++) if (pused.Test(SurfaceElement(i).PNum(j))) is = 1; else isnot = 1; if (is && isnot) { change = 1; for (j = 1; j <= 3; j++) pused.Set (SurfaceElement(i).PNum(j)); } if (is) { if (!surfused.Test(i)) { surfused.Set(i); SurfaceElement(i).SetIndex (dom); cntd++; } } } for (i = 1; i <= ne; i++) { int is = 0, isnot = 0; for (j = 1; j <= 4; j++) if (pused.Test(VolumeElement(i).PNum(j))) is = 1; else isnot = 1; if (is && isnot) { change = 1; for (j = 1; j <= 4; j++) pused.Set (VolumeElement(i).PNum(j)); } if (is) { VolumeElement(i).SetIndex (dom); } } } while (change); PrintMessage (3, "domain ", dom, " has ", cntd, " surfaceelements"); } /* facedecoding.SetSize (dom); for (i = 1; i <= dom; i++) { facedecoding.Elem(i).surfnr = 0; facedecoding.Elem(i).domin = i; facedecoding.Elem(i).domout = 0; } */ ClearFaceDescriptors(); for (i = 1; i <= dom; i++) AddFaceDescriptor (FaceDescriptor (0, i, 0, 0)); CalcSurfacesOfNode(); timestamp = NextTimeStamp(); } void Mesh :: SplitSeparatedFaces () { PrintMessage (3, "SplitSeparateFaces"); int fdi; int np = GetNP(); BitArray usedp(np); Array els_of_face; fdi = 1; while (fdi <= GetNFD()) { GetSurfaceElementsOfFace (fdi, els_of_face); if (els_of_face.Size() == 0) continue; SurfaceElementIndex firstel = els_of_face[0]; usedp.Clear(); for (int j = 1; j <= SurfaceElement(firstel).GetNP(); j++) usedp.Set (SurfaceElement(firstel).PNum(j)); bool changed; do { changed = false; for (int i = 0; i < els_of_face.Size(); i++) { const Element2d & el = SurfaceElement(els_of_face[i]); bool has = 0; bool hasno = 0; for (int j = 0; j < el.GetNP(); j++) { if (usedp.Test(el[j])) has = true; else hasno = true; } if (has && hasno) changed = true; if (has) for (int j = 0; j < el.GetNP(); j++) usedp.Set (el[j]); } } while (changed); int nface = 0; for (int i = 0; i < els_of_face.Size(); i++) { Element2d & el = SurfaceElement(els_of_face[i]); int hasno = 0; for (int j = 1; j <= el.GetNP(); j++) if (!usedp.Test(el.PNum(j))) hasno = 1; if (hasno) { if (!nface) { FaceDescriptor nfd = GetFaceDescriptor(fdi); nface = AddFaceDescriptor (nfd); } el.SetIndex (nface); } } // reconnect list if (nface) { facedecoding[nface-1].firstelement = -1; facedecoding[fdi-1].firstelement = -1; for (int i = 0; i < els_of_face.Size(); i++) { int ind = SurfaceElement(els_of_face[i]).GetIndex(); SurfaceElement(els_of_face[i]).next = facedecoding[ind-1].firstelement; facedecoding[ind-1].firstelement = els_of_face[i]; } } fdi++; } /* fdi = 1; while (fdi <= GetNFD()) { int firstel = 0; for (int i = 1; i <= GetNSE(); i++) if (SurfaceElement(i).GetIndex() == fdi) { firstel = i; break; } if (!firstel) continue; usedp.Clear(); for (int j = 1; j <= SurfaceElement(firstel).GetNP(); j++) usedp.Set (SurfaceElement(firstel).PNum(j)); int changed; do { changed = 0; for (int i = 1; i <= GetNSE(); i++) { const Element2d & el = SurfaceElement(i); if (el.GetIndex() != fdi) continue; int has = 0; int hasno = 0; for (int j = 1; j <= el.GetNP(); j++) { if (usedp.Test(el.PNum(j))) has = 1; else hasno = 1; } if (has && hasno) changed = 1; if (has) for (int j = 1; j <= el.GetNP(); j++) usedp.Set (el.PNum(j)); } } while (changed); int nface = 0; for (int i = 1; i <= GetNSE(); i++) { Element2d & el = SurfaceElement(i); if (el.GetIndex() != fdi) continue; int hasno = 0; for (int j = 1; j <= el.GetNP(); j++) { if (!usedp.Test(el.PNum(j))) hasno = 1; } if (hasno) { if (!nface) { FaceDescriptor nfd = GetFaceDescriptor(fdi); nface = AddFaceDescriptor (nfd); } el.SetIndex (nface); } } fdi++; } */ } void Mesh :: RebuildSurfaceElementLists () { for (int i = 0; i < facedecoding.Size(); i++) facedecoding[i].firstelement = -1; for (int i = surfelements.Size()-1; i >= 0; i--) { int ind = surfelements[i].GetIndex(); surfelements[i].next = facedecoding[ind-1].firstelement; facedecoding[ind-1].firstelement = i; } } void Mesh :: GetSurfaceElementsOfFace (int facenr, Array & sei) const { static int timer = NgProfiler::CreateTimer ("GetSurfaceElementsOfFace"); NgProfiler::RegionTimer reg (timer); /* sei.SetSize (0); for (SurfaceElementIndex i = 0; i < GetNSE(); i++) { if ( (*this)[i].GetIndex () == facenr && (*this)[i][0] >= PointIndex::BASE && !(*this)[i].IsDeleted() ) { sei.Append (i); } } */ /* Philippose - 01/10/2009 Commented out the following lines, and activated the originally commented out lines above because of a bug which causes corruption of the variable "facedecoding" when a mesh is converted to second order */ // int size1 = sei.Size(); sei.SetSize(0); SurfaceElementIndex si = facedecoding[facenr-1].firstelement; while (si != -1) { if ( (*this)[si].GetIndex () == facenr && (*this)[si][0] >= PointIndex::BASE && !(*this)[si].IsDeleted() ) { sei.Append (si); } si = (*this)[si].next; } /* // *testout << "with list = " << endl << sei << endl; if (size1 != sei.Size()) { cout << "size mismatch" << endl; exit(1); } */ } void Mesh :: CalcMinMaxAngle (double badellimit, double * retvalues) { int i, j; int lpi1, lpi2, lpi3, lpi4; double phimax = 0, phimin = 10; double facephimax = 0, facephimin = 10; int illegaltets = 0, negativetets = 0, badtets = 0; for (i = 1; i <= GetNE(); i++) { int badel = 0; Element & el = VolumeElement(i); if (el.GetType() != TET) { VolumeElement(i).flags.badel = 0; continue; } if (el.Volume(Points()) < 0) { badel = 1; negativetets++; } if (!LegalTet (el)) { badel = 1; illegaltets++; (*testout) << "illegal tet: " << i << " "; for (j = 1; j <= el.GetNP(); j++) (*testout) << el.PNum(j) << " "; (*testout) << endl; } // angles between faces for (lpi1 = 1; lpi1 <= 3; lpi1++) for (lpi2 = lpi1+1; lpi2 <= 4; lpi2++) { lpi3 = 1; while (lpi3 == lpi1 || lpi3 == lpi2) lpi3++; lpi4 = 10 - lpi1 - lpi2 - lpi3; const Point3d & p1 = Point (el.PNum(lpi1)); const Point3d & p2 = Point (el.PNum(lpi2)); const Point3d & p3 = Point (el.PNum(lpi3)); const Point3d & p4 = Point (el.PNum(lpi4)); Vec3d n(p1, p2); n /= n.Length(); Vec3d v1(p1, p3); Vec3d v2(p1, p4); v1 -= (n * v1) * n; v2 -= (n * v2) * n; double cosphi = (v1 * v2) / (v1.Length() * v2.Length()); double phi = acos (cosphi); if (phi > phimax) phimax = phi; if (phi < phimin) phimin = phi; if ((180/M_PI) * phi > badellimit) badel = 1; } // angles in faces for (j = 1; j <= 4; j++) { Element2d face(TRIG); el.GetFace (j, face); for (lpi1 = 1; lpi1 <= 3; lpi1++) { lpi2 = lpi1 % 3 + 1; lpi3 = lpi2 % 3 + 1; const Point3d & p1 = Point (el.PNum(lpi1)); const Point3d & p2 = Point (el.PNum(lpi2)); const Point3d & p3 = Point (el.PNum(lpi3)); Vec3d v1(p1, p2); Vec3d v2(p1, p3); double cosphi = (v1 * v2) / (v1.Length() * v2.Length()); double phi = acos (cosphi); if (phi > facephimax) facephimax = phi; if (phi < facephimin) facephimin = phi; if ((180/M_PI) * phi > badellimit) badel = 1; } } VolumeElement(i).flags.badel = badel; if (badel) badtets++; } if (!GetNE()) { phimin = phimax = facephimin = facephimax = 0; } if (!retvalues) { PrintMessage (1, ""); PrintMessage (1, "between planes: phimin = ", (180/M_PI) * phimin, " phimax = ", (180/M_PI) *phimax); PrintMessage (1, "inside planes: phimin = ", (180/M_PI) * facephimin, " phimax = ", (180/M_PI) * facephimax); PrintMessage (1, ""); } else { retvalues[0] = (180/M_PI) * facephimin; retvalues[1] = (180/M_PI) * facephimax; retvalues[2] = (180/M_PI) * phimin; retvalues[3] = (180/M_PI) * phimax; } PrintMessage (3, "negative tets: ", negativetets); PrintMessage (3, "illegal tets: ", illegaltets); PrintMessage (3, "bad tets: ", badtets); } int Mesh :: MarkIllegalElements () { int cnt = 0; for (auto & el : VolumeElements()) if (!LegalTet (el)) cnt++; return cnt; } // #ifdef NONE // void Mesh :: AddIdentification (int pi1, int pi2, int identnr) // { // INDEX_2 pair(pi1, pi2); // // pair.Sort(); // identifiedpoints->Set (pair, identnr); // if (identnr > maxidentnr) // maxidentnr = identnr; // timestamp = NextTimeStamp(); // } // int Mesh :: GetIdentification (int pi1, int pi2) const // { // INDEX_2 pair(pi1, pi2); // if (identifiedpoints->Used (pair)) // return identifiedpoints->Get(pair); // else // return 0; // } // int Mesh :: GetIdentificationSym (int pi1, int pi2) const // { // INDEX_2 pair(pi1, pi2); // if (identifiedpoints->Used (pair)) // return identifiedpoints->Get(pair); // pair = INDEX_2 (pi2, pi1); // if (identifiedpoints->Used (pair)) // return identifiedpoints->Get(pair); // return 0; // } // void Mesh :: GetIdentificationMap (int identnr, Array & identmap) const // { // int i, j; // identmap.SetSize (GetNP()); // for (i = 1; i <= identmap.Size(); i++) // identmap.Elem(i) = 0; // for (i = 1; i <= identifiedpoints->GetNBags(); i++) // for (j = 1; j <= identifiedpoints->GetBagSize(i); j++) // { // INDEX_2 i2; // int nr; // identifiedpoints->GetData (i, j, i2, nr); // if (nr == identnr) // { // identmap.Elem(i2.I1()) = i2.I2(); // } // } // } // void Mesh :: GetIdentificationPairs (int identnr, Array & identpairs) const // { // int i, j; // identpairs.SetSize(0); // for (i = 1; i <= identifiedpoints->GetNBags(); i++) // for (j = 1; j <= identifiedpoints->GetBagSize(i); j++) // { // INDEX_2 i2; // int nr; // identifiedpoints->GetData (i, j, i2, nr); // if (identnr == 0 || nr == identnr) // identpairs.Append (i2); // } // } // #endif void Mesh :: InitPointCurve(double red, double green, double blue) const { pointcurves_startpoint.Append(pointcurves.Size()); pointcurves_red.Append(red); pointcurves_green.Append(green); pointcurves_blue.Append(blue); } void Mesh :: AddPointCurvePoint(const Point3d & pt) const { pointcurves.Append(pt); } int Mesh :: GetNumPointCurves(void) const { return pointcurves_startpoint.Size(); } int Mesh :: GetNumPointsOfPointCurve(int curve) const { if(curve == pointcurves_startpoint.Size()-1) return (pointcurves.Size() - pointcurves_startpoint.Last()); else return (pointcurves_startpoint[curve+1]-pointcurves_startpoint[curve]); } Point3d & Mesh :: GetPointCurvePoint(int curve, int n) const { return pointcurves[pointcurves_startpoint[curve]+n]; } void Mesh :: GetPointCurveColor(int curve, double & red, double & green, double & blue) const { red = pointcurves_red[curve]; green = pointcurves_green[curve]; blue = pointcurves_blue[curve]; } void Mesh :: ComputeNVertices () { int i, j, nv; int ne = GetNE(); // int nse = GetNSE(); numvertices = 0; for (i = 1; i <= ne; i++) { const Element & el = VolumeElement(i); nv = el.GetNV(); for (j = 0; j < nv; j++) if (el[j] > numvertices) numvertices = el[j]; } /* for (i = 1; i <= nse; i++) { const Element2d & el = SurfaceElement(i); nv = el.GetNV(); for (j = 1; j <= nv; j++) if (el.PNum(j) > numvertices) numvertices = el.PNum(j); } */ for (auto & el : SurfaceElements()) for (PointIndex v : el.Vertices()) if (v > numvertices) numvertices = v; numvertices += 1- PointIndex::BASE; } int Mesh :: GetNV () const { if (numvertices < 0) return GetNP(); else return numvertices; } void Mesh :: SetNP (int np) { points.SetSize(np); // ptyps.SetSize(np); int mlold = mlbetweennodes.Size(); mlbetweennodes.SetSize(np); if (np > mlold) for (int i = mlold+PointIndex::BASE; i < np+PointIndex::BASE; i++) { mlbetweennodes[i].I1() = PointIndex::BASE-1; mlbetweennodes[i].I2() = PointIndex::BASE-1; } GetIdentifications().SetMaxPointNr (np + PointIndex::BASE-1); } /* void Mesh :: BuildConnectedNodes () { if (PureTetMesh()) { connectedtonode.SetSize(0); return; } int i, j, k; int np = GetNP(); int ne = GetNE(); TABLE conto(np); for (i = 1; i <= ne; i++) { const Element & el = VolumeElement(i); if (el.GetType() == PRISM) { for (j = 1; j <= 6; j++) { int n1 = el.PNum (j); int n2 = el.PNum ((j+2)%6+1); // if (n1 != n2) { int found = 0; for (k = 1; k <= conto.EntrySize(n1); k++) if (conto.Get(n1, k) == n2) { found = 1; break; } if (!found) conto.Add (n1, n2); } } } else if (el.GetType() == PYRAMID) { for (j = 1; j <= 4; j++) { int n1, n2; switch (j) { case 1: n1 = 1; n2 = 4; break; case 2: n1 = 4; n2 = 1; break; case 3: n1 = 2; n2 = 3; break; case 4: n1 = 3; n2 = 2; break; } int found = 0; for (k = 1; k <= conto.EntrySize(n1); k++) if (conto.Get(n1, k) == n2) { found = 1; break; } if (!found) conto.Add (n1, n2); } } } connectedtonode.SetSize(np); for (i = 1; i <= np; i++) connectedtonode.Elem(i) = 0; for (i = 1; i <= np; i++) if (connectedtonode.Elem(i) == 0) { connectedtonode.Elem(i) = i; ConnectToNodeRec (i, i, conto); } } void Mesh :: ConnectToNodeRec (int node, int tonode, const TABLE & conto) { int i, n2; // (*testout) << "connect " << node << " to " << tonode << endl; for (i = 1; i <= conto.EntrySize(node); i++) { n2 = conto.Get(node, i); if (!connectedtonode.Get(n2)) { connectedtonode.Elem(n2) = tonode; ConnectToNodeRec (n2, tonode, conto); } } } */ bool Mesh :: PureTrigMesh (int faceindex) const { // if (!faceindex) return !mparam.quad; if (!faceindex) { for (int i = 1; i <= GetNSE(); i++) if (SurfaceElement(i).GetNP() != 3) return false; return true; } for (int i = 1; i <= GetNSE(); i++) if (SurfaceElement(i).GetIndex() == faceindex && SurfaceElement(i).GetNP() != 3) return false; return true; } bool Mesh :: PureTetMesh () const { for (ElementIndex ei = 0; ei < GetNE(); ei++) if (VolumeElement(ei).GetNP() != 4) return 0; return 1; } void Mesh :: UpdateTopology (TaskManager tm, Tracer tracer) { topology.Update(tm, tracer); (*tracer)("call update clusters", false); clusters->Update(tm, tracer); (*tracer)("call update clusters", true); #ifdef PARALLEL if (paralleltop) { paralleltop->Reset(); paralleltop->UpdateCoarseGrid(); } #endif } void Mesh :: BuildCurvedElements (const Refinement * ref, int aorder, bool arational) { GetCurvedElements().BuildCurvedElements (ref, aorder, arational); for (SegmentIndex seg = 0; seg < GetNSeg(); seg++) (*this)[seg].SetCurved (GetCurvedElements().IsSegmentCurved (seg)); for (SurfaceElementIndex sei = 0; sei < GetNSE(); sei++) (*this)[sei].SetCurved (GetCurvedElements().IsSurfaceElementCurved (sei)); for (ElementIndex ei = 0; ei < GetNE(); ei++) (*this)[ei].SetCurved (GetCurvedElements().IsElementCurved (ei)); SetNextMajorTimeStamp(); } void Mesh :: BuildCurvedElements (int aorder) { if (!GetGeometry()) throw NgException ("don't have a geometry for mesh curving"); GetCurvedElements().BuildCurvedElements (&GetGeometry()->GetRefinement(), aorder, false); for (SegmentIndex seg = 0; seg < GetNSeg(); seg++) (*this)[seg].SetCurved (GetCurvedElements().IsSegmentCurved (seg)); for (SurfaceElementIndex sei = 0; sei < GetNSE(); sei++) (*this)[sei].SetCurved (GetCurvedElements().IsSurfaceElementCurved (sei)); for (ElementIndex ei = 0; ei < GetNE(); ei++) (*this)[ei].SetCurved (GetCurvedElements().IsElementCurved (ei)); SetNextMajorTimeStamp(); } void Mesh :: SetMaterial (int domnr, const string & mat) { if (domnr > materials.Size()) { int olds = materials.Size(); materials.SetSize (domnr); for (int i = olds; i < domnr-1; i++) materials[i] = new string("default"); } /* materials.Elem(domnr) = new char[strlen(mat)+1]; strcpy (materials.Elem(domnr), mat); */ materials.Elem(domnr) = new string(mat); } string Mesh :: defaultmat = "default"; const string & Mesh :: GetMaterial (int domnr) const { if (domnr <= materials.Size()) return *materials.Get(domnr); static string emptystring("default"); return emptystring; } void Mesh ::SetNBCNames ( int nbcn ) { if ( bcnames.Size() ) for ( int i = 0; i < bcnames.Size(); i++) if ( bcnames[i] ) delete bcnames[i]; bcnames.SetSize(nbcn); bcnames = 0; } void Mesh ::SetBCName ( int bcnr, const string & abcname ) { if (bcnr >= bcnames.Size()) { int oldsize = bcnames.Size(); bcnames.SetSize (bcnr+1); // keeps contents for (int i = oldsize; i <= bcnr; i++) bcnames[i] = nullptr; } if ( bcnames[bcnr] ) delete bcnames[bcnr]; if ( abcname != "default" ) bcnames[bcnr] = new string ( abcname ); else bcnames[bcnr] = nullptr; for (auto & fd : facedecoding) if (fd.BCProperty() <= bcnames.Size()) fd.SetBCName (bcnames[fd.BCProperty()-1]); } const string & Mesh ::GetBCName ( int bcnr ) const { static string defaultstring = "default"; if ( !bcnames.Size() ) return defaultstring; if (bcnr < 0 || bcnr >= bcnames.Size()) throw NgException ("illegal bc-number"); if ( bcnames[bcnr] ) return *bcnames[bcnr]; else return defaultstring; } void Mesh :: SetNCD2Names( int ncd2n ) { if (cd2names.Size()) for(int i=0; i= cd2names.Size()) { int oldsize = cd2names.Size(); cd2names.SetSize(cd2nr+1); for(int i= oldsize; i<= cd2nr; i++) cd2names[i] = nullptr; } //if (cd2names[cd2nr]) delete cd2names[cd2nr]; if (abcname != "default") cd2names[cd2nr] = new string(abcname); else cd2names[cd2nr] = nullptr; } string Mesh :: cd2_default_name = "default"; string Mesh :: default_bc = "default"; const string & Mesh :: GetCD2Name (int cd2nr) const { static string defaultstring = "default"; if (!cd2names.Size()) return defaultstring; if (cd2nr < 0 || cd2nr >= cd2names.Size()) return defaultstring; if (cd2names[cd2nr]) return *cd2names[cd2nr]; else return defaultstring; } void Mesh :: SetUserData(const char * id, Array & data) { if(userdata_int.Used(id)) delete userdata_int.Get(id); Array * newdata = new Array(data); userdata_int.Set(id,newdata); } bool Mesh :: GetUserData(const char * id, Array & data, int shift) const { if(userdata_int.Used(id)) { if(data.Size() < (*userdata_int.Get(id)).Size()+shift) data.SetSize((*userdata_int.Get(id)).Size()+shift); for(int i=0; i<(*userdata_int.Get(id)).Size(); i++) data[i+shift] = (*userdata_int.Get(id))[i]; return true; } else { data.SetSize(0); return false; } } void Mesh :: SetUserData(const char * id, Array & data) { if(userdata_double.Used(id)) delete userdata_double.Get(id); Array * newdata = new Array(data); userdata_double.Set(id,newdata); } bool Mesh :: GetUserData(const char * id, Array & data, int shift) const { if(userdata_double.Used(id)) { if(data.Size() < (*userdata_double.Get(id)).Size()+shift) data.SetSize((*userdata_double.Get(id)).Size()+shift); for(int i=0; i<(*userdata_double.Get(id)).Size(); i++) data[i+shift] = (*userdata_double.Get(id))[i]; return true; } else { data.SetSize(0); return false; } } void Mesh :: PrintMemInfo (ostream & ost) const { ost << "Mesh Mem:" << endl; ost << GetNP() << " Points, of size " << sizeof (Point3d) << " + " << sizeof(POINTTYPE) << " = " << GetNP() * (sizeof (Point3d) + sizeof(POINTTYPE)) << endl; ost << GetNSE() << " Surface elements, of size " << sizeof (Element2d) << " = " << GetNSE() * sizeof(Element2d) << endl; ost << GetNE() << " Volume elements, of size " << sizeof (Element) << " = " << GetNE() * sizeof(Element) << endl; // ost << "surfs on node:"; // surfacesonnode.PrintMemInfo (cout); ost << "boundaryedges: "; if (boundaryedges) boundaryedges->PrintMemInfo (cout); ost << "surfelementht: "; if (surfelementht) surfelementht->PrintMemInfo (cout); } } netgen-6.2.1804/libsrc/meshing/delaunay2d.cpp0000644000175000017500000002575413272137567017466 0ustar kurtkurt#include #include "meshing.hpp" // not yet working .... namespace netgen { class DelaunayTrig { PointIndex pnums[3]; Point<3> c; double r; double rad2; public: DelaunayTrig () { ; } DelaunayTrig (int p1, int p2, int p3) { pnums[0] = p1; pnums[1] = p2; pnums[2] = p3; } PointIndex & operator[] (int j) { return pnums[j]; } const PointIndex & operator[] (int j) const { return pnums[j]; } void CalcCenter (Mesh & mesh) { Point<3> p1 = mesh[pnums[0]]; Point<3> p2 = mesh[pnums[1]]; Point<3> p3 = mesh[pnums[2]]; Vec<3> v1 = p2-p1; Vec<3> v2 = p3-p1; Mat<2,2> mat, inv; mat(0,0) = v1*v1; mat(0,1) = v1*v2; mat(1,0) = v2*v1; mat(1,1) = v2*v2; Vec<2> rhs, sol; rhs(0) = 0.5 * v1*v1; rhs(1) = 0.5 * v2*v2; CalcInverse (mat, inv); sol = inv * rhs; c = p1 + sol(0) * v1 + sol(1) * v2; rad2 = Dist2(c, p1); r = sqrt(rad2); } Point<3> Center() const { return c; } double Radius2() const { return rad2; } Box<3> BoundingBox() const { return Box<3> (c-Vec<3>(r,r,0.1), c+Vec<3>(r,r,0.1)); } }; ostream & operator<< (ostream & ost, DelaunayTrig trig) { ost << trig[0] << "-" << trig[1] << "-" << trig[2] << endl; return ost; } void Meshing2 :: BlockFillLocalH (Mesh & mesh, const MeshingParameters & mp) { static int timer = NgProfiler::CreateTimer ("Meshing2::BlockFill"); static int timer1 = NgProfiler::CreateTimer ("Meshing2::BlockFill 1"); static int timer2 = NgProfiler::CreateTimer ("Meshing2::BlockFill 2"); static int timer3 = NgProfiler::CreateTimer ("Meshing2::BlockFill 3"); static int timer4 = NgProfiler::CreateTimer ("Meshing2::BlockFill 4"); NgProfiler::RegionTimer reg (timer); NgProfiler::StartTimer (timer1); double filldist = mp.filldist; cout << "blockfill local h" << endl; cout << "rel filldist = " << filldist << endl; PrintMessage (3, "blockfill local h"); Array > npoints; // adfront -> CreateTrees(); Box<3> bbox ( Box<3>::EMPTY_BOX ); double maxh = 0; for (int i = 0; i < adfront->GetNFL(); i++) { const FrontLine & line = adfront->GetLine (i); const Point<3> & p1 = adfront->GetPoint(line.L().I1()); const Point<3> & p2 = adfront->GetPoint(line.L().I2()); maxh = max (maxh, Dist (p1, p2)); bbox.Add (p1); bbox.Add (p2); } cout << "bbox = " << bbox << endl; // Point<3> mpc = bbox.Center(); bbox.Increase (bbox.Diam()/2); Box<3> meshbox = bbox; NgProfiler::StopTimer (timer1); NgProfiler::StartTimer (timer2); LocalH loch2 (bbox, 1, 2); if (mp.maxh < maxh) maxh = mp.maxh; bool changed; do { mesh.LocalHFunction().ClearFlags(); for (int i = 0; i < adfront->GetNFL(); i++) { const FrontLine & line = adfront->GetLine(i); Box<3> bbox (adfront->GetPoint (line.L().I1())); bbox.Add (adfront->GetPoint (line.L().I2())); double filld = filldist * bbox.Diam(); bbox.Increase (filld); mesh.LocalHFunction().CutBoundary (bbox); } mesh.LocalHFunction().FindInnerBoxes (adfront, NULL); npoints.SetSize(0); mesh.LocalHFunction().GetInnerPoints (npoints); changed = false; for (int i = 0; i < npoints.Size(); i++) { if (mesh.LocalHFunction().GetH(npoints[i]) > 1.2 * maxh) { mesh.LocalHFunction().SetH (npoints[i], maxh); changed = true; } } } while (changed); NgProfiler::StopTimer (timer2); NgProfiler::StartTimer (timer3); if (debugparam.slowchecks) (*testout) << "Blockfill with points: " << endl; *testout << "loch = " << mesh.LocalHFunction() << endl; *testout << "npoints = " << endl << npoints << endl; for (int i = 1; i <= npoints.Size(); i++) { if (meshbox.IsIn (npoints.Get(i))) { PointIndex gpnum = mesh.AddPoint (npoints.Get(i)); adfront->AddPoint (npoints.Get(i), gpnum); if (debugparam.slowchecks) { (*testout) << npoints.Get(i) << endl; Point<2> p2d (npoints.Get(i)(0), npoints.Get(i)(1)); if (!adfront->Inside(p2d)) { cout << "add outside point" << endl; (*testout) << "outside" << endl; } } } } NgProfiler::StopTimer (timer3); NgProfiler::StartTimer (timer4); // find outer points loch2.ClearFlags(); for (int i = 0; i < adfront->GetNFL(); i++) { const FrontLine & line = adfront->GetLine(i); Box<3> bbox (adfront->GetPoint (line.L().I1())); bbox.Add (adfront->GetPoint (line.L().I2())); loch2.SetH (bbox.Center(), bbox.Diam()); } for (int i = 0; i < adfront->GetNFL(); i++) { const FrontLine & line = adfront->GetLine(i); Box<3> bbox (adfront->GetPoint (line.L().I1())); bbox.Add (adfront->GetPoint (line.L().I2())); bbox.Increase (filldist * bbox.Diam()); loch2.CutBoundary (bbox); } loch2.FindInnerBoxes (adfront, NULL); // outer points : smooth mesh-grading npoints.SetSize(0); loch2.GetOuterPoints (npoints); for (int i = 1; i <= npoints.Size(); i++) { if (meshbox.IsIn (npoints.Get(i))) { PointIndex gpnum = mesh.AddPoint (npoints.Get(i)); adfront->AddPoint (npoints.Get(i), gpnum); } } NgProfiler::StopTimer (timer4); } void Meshing2 :: Delaunay (Mesh & mesh, int domainnr, const MeshingParameters & mp) { static int timer = NgProfiler::CreateTimer ("Meshing2::Delaunay - total"); static int timerstart = NgProfiler::CreateTimer ("Meshing2::Delaunay - start"); static int timerfinish = NgProfiler::CreateTimer ("Meshing2::Delaunay - finish"); static int timer1 = NgProfiler::CreateTimer ("Meshing2::Delaunay - incremental"); static int timer1a = NgProfiler::CreateTimer ("Meshing2::Delaunay - incremental a"); static int timer1b = NgProfiler::CreateTimer ("Meshing2::Delaunay - incremental b"); static int timer1c = NgProfiler::CreateTimer ("Meshing2::Delaunay - incremental c"); static int timer1d = NgProfiler::CreateTimer ("Meshing2::Delaunay - incremental d"); NgProfiler::RegionTimer reg (timer); cout << "2D Delaunay meshing (in progress)" << endl; BlockFillLocalH (mesh, mp); NgProfiler::StartTimer (timerstart); // do the delaunay // face bounding box: Box<3> bbox (Box<3>::EMPTY_BOX); for (int i = 0; i < adfront->GetNFL(); i++) { const FrontLine & line = adfront->GetLine(i); bbox.Add (Point<3> (adfront->GetPoint (line.L()[0]))); bbox.Add (Point<3> (adfront->GetPoint (line.L()[1]))); } for (int i = 0; i < mesh.LockedPoints().Size(); i++) bbox.Add (mesh.Point (mesh.LockedPoints()[i])); cout << "bbox = " << bbox << endl; // external point Vec<3> vdiag = bbox.PMax()-bbox.PMin(); auto old_points = mesh.Points().Range(); DelaunayTrig startel; startel[0] = mesh.AddPoint (bbox.PMin() + Vec<3> (-8*vdiag(0), -8*vdiag(1), 0)); startel[1] = mesh.AddPoint (bbox.PMin() + Vec<3> (+8*vdiag(0), -8*vdiag(1), 0)); startel[2] = mesh.AddPoint (bbox.PMin() + Vec<3> (0, 8*vdiag(1), 0)); Box<3> hbox; hbox.Set (mesh[startel[0]]); hbox.Add (mesh[startel[1]]); hbox.Add (mesh[startel[2]]); Point<3> hp = mesh[startel[0]]; hp(2) = 1; hbox.Add (hp); hp(2) = -1; hbox.Add (hp); BoxTree<3> searchtree(hbox); Array tempels; startel.CalcCenter (mesh); tempels.Append (startel); searchtree.Insert(startel.BoundingBox(), 0); Array closeels; Array intersecting; Array edges; // reorder points Array mixed(old_points.Size()); int prims[] = { 11, 13, 17, 19, 23, 29, 31, 37 }; int prim; { int i = 0; while (old_points.Size() % prims[i] == 0) i++; prim = prims[i]; } for (PointIndex pi : old_points) mixed[pi] = PointIndex ( (prim * pi) % old_points.Size() + PointIndex::BASE ); NgProfiler::StopTimer (timerstart); NgProfiler::StartTimer (timer1); for (PointIndex i1 : old_points) { PointIndex i = mixed[i1]; NgProfiler::StartTimer (timer1a); Point<3> newp = mesh[i]; intersecting.SetSize(0); edges.SetSize(0); searchtree.GetIntersecting (newp, newp, closeels); // for (int jj = 0; jj < closeels.Size(); jj++) // for (int j = 0; j < tempels.Size(); j++) for (int j : closeels) { if (tempels[j][0] < 0) continue; Point<3> c = tempels[j].Center(); double r2 = tempels[j].Radius2(); bool inside = Dist2(mesh[i], c) < r2; if (inside) intersecting.Append (j); } NgProfiler::StopTimer (timer1a); NgProfiler::StartTimer (timer1b); // find outer edges for (auto j : intersecting) { const DelaunayTrig & trig = tempels[j]; for (int k = 0; k < 3; k++) { int p1 = trig[k]; int p2 = trig[(k+1)%3]; INDEX_2 edge(p1,p2); edge.Sort(); bool found = false; for (int l = 0; l < edges.Size(); l++) if (edges[l] == edge) { edges.Delete(l); found = true; break; } if (!found) edges.Append (edge); } } NgProfiler::StopTimer (timer1b); NgProfiler::StartTimer (timer1c); /* for (int j = intersecting.Size()-1; j >= 0; j--) tempels.Delete (intersecting[j]); */ for (int j : intersecting) { searchtree.DeleteElement (j); tempels[j][0] = -1; tempels[j][1] = -1; tempels[j][2] = -1; } NgProfiler::StopTimer (timer1c); NgProfiler::StartTimer (timer1d); for (auto edge : edges) { DelaunayTrig trig (edge[0], edge[1], i); trig.CalcCenter (mesh); tempels.Append (trig); searchtree.Insert(trig.BoundingBox(), tempels.Size()-1); } NgProfiler::StopTimer (timer1d); } NgProfiler::StopTimer (timer1); NgProfiler::StartTimer (timerfinish); for (DelaunayTrig & trig : tempels) { if (trig[0] < 0) continue; Point<3> c = Center (mesh[trig[0]], mesh[trig[1]], mesh[trig[2]]); if (!adfront->Inside (Point<2> (c(0),c(1)))) continue; Vec<3> n = Cross (mesh[trig[1]]-mesh[trig[0]], mesh[trig[2]]-mesh[trig[0]]); if (n(2) < 0) Swap (trig[1], trig[2]); Element2d el(trig[0], trig[1], trig[2]); el.SetIndex (domainnr); mesh.AddSurfaceElement (el); } for (PointIndex pi : mesh.Points().Range()) *testout << pi << ": " << mesh[pi].Type() << endl; NgProfiler::StopTimer (timerfinish); } } netgen-6.2.1804/libsrc/meshing/smoothing3.cpp0000644000175000017500000011226113272137567017516 0ustar kurtkurt#include #include "meshing.hpp" #ifdef SOLIDGEOM #include #endif #include namespace netgen { double MinFunctionSum :: Func (const Vector & x) const { double retval = 0; for(int i=0; iFunc(x); return retval; } void MinFunctionSum :: Grad (const Vector & x, Vector & g) const { g = 0.; VectorMem<3> gi; for(int i=0; iGrad(x,gi); for(int j=0; j gi; for(int i=0; iFuncGrad(x,gi); for(int j=0; jFuncDeriv(x,dir,derivi); deriv += derivi; } return retval; } double MinFunctionSum :: GradStopping (const Vector & x) const { double minfs(0), mini; for(int i=0; iGradStopping(x); if(i==0 || mini < minfs) minfs = mini; } return minfs; } void MinFunctionSum :: AddFunction(MinFunction & fun) { functions.Append(&fun); } const MinFunction & MinFunctionSum :: Function(int i) const { return *functions[i]; } MinFunction & MinFunctionSum :: Function(int i) { return *functions[i]; } PointFunction1 :: PointFunction1 (Mesh::T_POINTS & apoints, const Array & afaces, const MeshingParameters & amp, double ah) : points(apoints), faces(afaces), mp(amp) { h = ah; } double PointFunction1 :: Func (const Vector & vp) const { double badness = 0; Point<3> pp(vp(0), vp(1), vp(2)); for (int j = 0; j < faces.Size(); j++) { const INDEX_3 & el = faces[j]; double bad = CalcTetBadness (points[PointIndex (el.I1())], points[PointIndex (el.I3())], points[PointIndex (el.I2())], pp, 0, mp); badness += bad; } return badness; } double PointFunction1 :: FuncDeriv (const Vector & x, const Vector & dir, double & deriv) const { VectorMem<3> hx; const double eps = 1e-6; double dirlen = dir.L2Norm(); if (dirlen < 1e-14) { deriv = 0; return Func(x); } hx.Set(1, x); hx.Add(eps * h / dirlen, dir); double fr = Func (hx); hx.Set(1, x); hx.Add(-eps * h / dirlen, dir); double fl = Func (hx); deriv = (fr - fl) / (2 * eps * h) * dirlen; return Func(x); } double PointFunction1 :: FuncGrad (const Vector & x, Vector & g) const { VectorMem<3> hx; double eps = 1e-6; hx = x; for (int i = 0; i < 3; i++) { hx(i) = x(i) + eps * h; double fr = Func (hx); hx(i) = x(i) - eps * h; double fl = Func (hx); hx(i) = x(i); g(i) = (fr - fl) / (2 * eps * h); } return Func(x); } double PointFunction1 :: GradStopping (const Vector & x) const { double f = Func(x); return 1e-8 * f * f; } /* Cheap Functional depending of inner point inside triangular surface */ // is it used ???? class CheapPointFunction1 : public MinFunction { Mesh::T_POINTS & points; const Array & faces; DenseMatrix m; double h; public: CheapPointFunction1 (Mesh::T_POINTS & apoints, const Array & afaces, double ah); virtual double Func (const Vector & x) const; virtual double FuncGrad (const Vector & x, Vector & g) const; }; CheapPointFunction1 :: CheapPointFunction1 (Mesh::T_POINTS & apoints, const Array & afaces, double ah) : points(apoints), faces(afaces) { h = ah; int nf = faces.Size(); m.SetSize (nf, 4); for (int i = 1; i <= nf; i++) { const Point3d & p1 = points[PointIndex(faces.Get(i).I1())]; const Point3d & p2 = points[PointIndex(faces.Get(i).I2())]; const Point3d & p3 = points[PointIndex(faces.Get(i).I3())]; Vec3d v1 (p1, p2); Vec3d v2 (p1, p3); Vec3d n; Cross (v1, v2, n); n /= n.Length(); m.Elem(i, 1) = n.X(); m.Elem(i, 2) = n.Y(); m.Elem(i, 3) = n.Z(); m.Elem(i, 4) = - (n.X() * p1.X() + n.Y() * p1.Y() + n.Z() * p1.Z()); } } double CheapPointFunction1 :: Func (const Vector & vp) const { /* int j; double badness = 0; Point3d pp(vp.Get(1), vp.Get(2), vp.Get(3)); for (j = 1; j <= faces.Size(); j++) { const INDEX_3 & el = faces.Get(j); double bad = CalcTetBadness (points.Get(el.I1()), points.Get(el.I3()), points.Get(el.I2()), pp, 0); badness += bad; } */ int i; double badness = 0; VectorMem<4> hv; Vector res(m.Height()); for (i = 0;i < 3; i++) hv(i) = vp(i); hv(3) = 1; m.Mult (hv, res); for (i = 1; i <= res.Size(); i++) { if (res(i-1) < 1e-10) badness += 1e24; else badness += 1 / res(i-1); } return badness; } double CheapPointFunction1 :: FuncGrad (const Vector & x, Vector & g) const { VectorMem<3> hx; double eps = 1e-6; hx = x; for (int i = 0; i < 3; i++) { hx(i) = x(i) + eps * h; double fr = Func (hx); hx(i) = x(i) - eps * h; double fl = Func (hx); hx(i) = x(i); g(i) = (fr - fl) / (2 * eps * h); } return Func(x); } /* ************* PointFunction **************************** */ class PointFunction { public: Mesh::T_POINTS & points; const Mesh::T_VOLELEMENTS & elements; TABLE elementsonpoint; const MeshingParameters & mp; PointIndex actpind; double h; public: PointFunction (Mesh::T_POINTS & apoints, const Mesh::T_VOLELEMENTS & aelements, const MeshingParameters & amp); virtual ~PointFunction () { ; } virtual void SetPointIndex (PointIndex aactpind); void SetLocalH (double ah) { h = ah; } double GetLocalH () const { return h; } virtual double PointFunctionValue (const Point<3> & pp) const; virtual double PointFunctionValueGrad (const Point<3> & pp, Vec<3> & grad) const; virtual double PointFunctionValueDeriv (const Point<3> & pp, const Vec<3> & dir, double & deriv) const; int MovePointToInner (); }; PointFunction :: PointFunction (Mesh::T_POINTS & apoints, const Mesh::T_VOLELEMENTS & aelements, const MeshingParameters & amp) : points(apoints), elements(aelements), elementsonpoint(apoints.Size()), mp(amp) { for (int i = 0; i < elements.Size(); i++) if (elements[i].NP() == 4) for (int j = 0; j < elements[i].NP(); j++) elementsonpoint.Add (elements[i][j], i); } void PointFunction :: SetPointIndex (PointIndex aactpind) { actpind = aactpind; } double PointFunction :: PointFunctionValue (const Point<3> & pp) const { double badness; Point<3> hp; badness = 0; hp = points[actpind]; points[actpind] = Point<3> (pp); for (int j = 0; j < elementsonpoint[actpind].Size(); j++) { const Element & el = elements[elementsonpoint[actpind][j]]; badness += CalcTetBadness (points[el[0]], points[el[1]], points[el[2]], points[el[3]], -1, mp); } points[actpind] = Point<3> (hp); return badness; } double PointFunction :: PointFunctionValueGrad (const Point<3> & pp, Vec<3> & grad) const { double f = 0; Point<3> hp = points[actpind]; Vec<3> vgradi, vgrad(0,0,0); points[actpind] = Point<3> (pp); for (int j = 0; j < elementsonpoint[actpind].Size(); j++) { const Element & el = elements[elementsonpoint[actpind][j]]; for (int k = 0; k < 4; k++) if (el[k] == actpind) { f += CalcTetBadnessGrad (points[el[0]], points[el[1]], points[el[2]], points[el[3]], -1, k+1, vgradi, mp); vgrad += vgradi; } } points[actpind] = Point<3> (hp); grad = vgrad; return f; } double PointFunction :: PointFunctionValueDeriv (const Point<3> & pp, const Vec<3> & dir, double & deriv) const { Vec<3> vgradi, vgrad(0,0,0); Point<3> hp = points[actpind]; points[actpind] = pp; double f = 0; for (int j = 0; j < elementsonpoint[actpind].Size(); j++) { const Element & el = elements[elementsonpoint[actpind][j]]; for (int k = 1; k <= 4; k++) if (el.PNum(k) == actpind) { f += CalcTetBadnessGrad (points[el.PNum(1)], points[el.PNum(2)], points[el.PNum(3)], points[el.PNum(4)], -1, k, vgradi, mp); vgrad += vgradi; } } points[actpind] = Point<3> (hp); deriv = dir * vgrad; return f; } int PointFunction :: MovePointToInner () { // try point movement Array faces; for (int j = 0; j < elementsonpoint[actpind].Size(); j++) { const Element & el = elements[elementsonpoint[actpind][j]]; for (int k = 1; k <= 4; k++) if (el.PNum(k) == actpind) { Element2d face(TRIG); el.GetFace (k, face); Swap (face.PNum(2), face.PNum(3)); faces.Append (face); } } Point3d hp; int hi = FindInnerPoint (points, faces, hp); if (hi) { // cout << "inner point found" << endl; points[actpind] = Point<3> (hp); } else ; // cout << "no inner point found" << endl; /* Point3d hp2; int hi2 = FindInnerPoint (points, faces, hp2); if (hi2) { cout << "new: inner point found" << endl; } else cout << "new: no inner point found" << endl; (*testout) << "hi(orig) = " << hi << ", hi(new) = " << hi2; if (hi != hi2) (*testout) << "hi different" << endl; */ return hi; } class CheapPointFunction : public PointFunction { DenseMatrix m; public: CheapPointFunction (Mesh::T_POINTS & apoints, const Mesh::T_VOLELEMENTS & aelements, const MeshingParameters & amp); virtual void SetPointIndex (PointIndex aactpind); virtual double PointFunctionValue (const Point<3> & pp) const; virtual double PointFunctionValueGrad (const Point<3> & pp, Vec<3> & grad) const; }; CheapPointFunction :: CheapPointFunction (Mesh::T_POINTS & apoints, const Mesh::T_VOLELEMENTS & aelements, const MeshingParameters & amp) : PointFunction (apoints, aelements, amp) { ; } void CheapPointFunction :: SetPointIndex (PointIndex aactpind) { actpind = aactpind; int ne = elementsonpoint[actpind].Size(); int i, j; PointIndex pi1, pi2, pi3; m.SetSize (ne, 4); for (i = 0; i < ne; i++) { pi1 = 0; pi2 = 0; pi3 = 0; const Element & el = elements[elementsonpoint[actpind][i]]; for (j = 1; j <= 4; j++) if (el.PNum(j) != actpind) { pi3 = pi2; pi2 = pi1; pi1 = el.PNum(j); } const Point3d & p1 = points[pi1]; Vec3d v1 (p1, points[pi2]); Vec3d v2 (p1, points[pi3]); Vec3d n; Cross (v1, v2, n); n /= n.Length(); Vec3d v (p1, points[actpind]); double c = v * n; if (c < 0) n *= -1; // n is inner normal m.Elem(i+1, 1) = n.X(); m.Elem(i+1, 2) = n.Y(); m.Elem(i+1, 3) = n.Z(); m.Elem(i+1, 4) = - (n.X() * p1.X() + n.Y() * p1.Y() + n.Z() * p1.Z()); } } double CheapPointFunction :: PointFunctionValue (const Point<3> & pp) const { VectorMem<4> p4; Vector di; int n = m.Height(); p4(0) = pp(0); p4(1) = pp(1); p4(2) = pp(2); p4(3) = 1; di.SetSize (n); m.Mult (p4, di); double sum = 0; for (int i = 0; i < n; i++) { if (di(i) > 0) sum += 1 / di(i); else return 1e16; } return sum; } double CheapPointFunction :: PointFunctionValueGrad (const Point<3> & pp, Vec<3> & grad) const { VectorMem<4> p4; Vector di; int n = m.Height(); p4(0) = pp(0); p4(1) = pp(1); p4(2) = pp(2); p4(3) = 1; di.SetSize (n); m.Mult (p4, di); double sum = 0; grad = 0; for (int i = 0; i < n; i++) { if (di(i) > 0) { double idi = 1 / di(i); sum += idi; grad(0) -= idi * idi * m(i, 0); grad(1) -= idi * idi * m(i, 1); grad(2) -= idi * idi * m(i, 2); } else { return 1e16; } } return sum; } class Opti3FreeMinFunction : public MinFunction { const PointFunction & pf; Point<3> sp1; public: Opti3FreeMinFunction (const PointFunction & apf); void SetPoint (const Point<3> & asp1) { sp1 = asp1; } virtual double Func (const Vector & x) const; virtual double FuncGrad (const Vector & x, Vector & g) const; virtual double FuncDeriv (const Vector & x, const Vector & dir, double & deriv) const; virtual double GradStopping (const Vector & x) const; virtual void ApproximateHesse (const Vector & x, DenseMatrix & hesse) const; }; Opti3FreeMinFunction :: Opti3FreeMinFunction (const PointFunction & apf) : pf(apf) { ; } double Opti3FreeMinFunction :: Func (const Vector & x) const { Point<3> pp; for (int j = 0; j < 3; j++) pp(j) = sp1(j) + x(j); return pf.PointFunctionValue (pp); } double Opti3FreeMinFunction :: FuncGrad (const Vector & x, Vector & grad) const { Vec<3> vgrad; Point<3> pp; for (int j = 0; j < 3; j++) pp(j) = sp1(j) + x(j); double val = pf.PointFunctionValueGrad (pp, vgrad); for (int j = 0; j < 3; j++) grad(j) = vgrad(j); return val; } double Opti3FreeMinFunction :: FuncDeriv (const Vector & x, const Vector & dir, double & deriv) const { Point<3> pp; for (int j = 0; j < 3; j++) pp(j) = sp1(j) + x(j); Vec<3> vdir; for (int j = 0; j < 3; j++) vdir(j) = dir(j); return pf.PointFunctionValueDeriv (pp, vdir, deriv); } double Opti3FreeMinFunction :: GradStopping (const Vector & x) const { double f = Func(x); return 1e-3 * f / pf.GetLocalH(); } void Opti3FreeMinFunction :: ApproximateHesse (const Vector & x, DenseMatrix & hesse) const { int n = x.Size(); Vector hx; hx.SetSize(n); double eps = 1e-8; double f, f11, f22; //, f12, f21 f = Func(x); for (int i = 1; i <= n; i++) { for (int j = 1; j < i; j++) { /* hx = x; hx.Elem(i) = x.Get(i) + eps; hx.Elem(j) = x.Get(j) + eps; f11 = Func(hx); hx.Elem(i) = x.Get(i) + eps; hx.Elem(j) = x.Get(j) - eps; f12 = Func(hx); hx.Elem(i) = x.Get(i) - eps; hx.Elem(j) = x.Get(j) + eps; f21 = Func(hx); hx.Elem(i) = x.Get(i) - eps; hx.Elem(j) = x.Get(j) - eps; f22 = Func(hx); */ hesse.Elem(i, j) = hesse.Elem(j, i) = 0; // (f11 + f22 - f12 - f21) / (2 * eps * eps); } hx = x; hx(i-1) = x(i-1) + eps; f11 = Func(hx); hx(i-1) = x(i-1) - eps; f22 = Func(hx); hesse.Elem(i, i) = (f11 + f22 - 2 * f) / (eps * eps) + 1e-12; } } #ifdef SOLIDGEOM class Opti3SurfaceMinFunction : public MinFunction { const PointFunction & pf; Point3d sp1; const Surface * surf; Vec3d t1, t2; public: Opti3SurfaceMinFunction (const PointFunction & apf); void SetPoint (const Surface * asurf, const Point3d & asp1); void CalcNewPoint (const Vector & x, Point3d & np) const; virtual double Func (const Vector & x) const; virtual double FuncGrad (const Vector & x, Vector & g) const; }; Opti3SurfaceMinFunction :: Opti3SurfaceMinFunction (const PointFunction & apf) : MinFunction(), pf(apf) { ; } void Opti3SurfaceMinFunction :: SetPoint (const Surface * asurf, const Point3d & asp1) { Vec3d n; sp1 = asp1; surf = asurf; Vec<3> hn; surf -> GetNormalVector (sp1, hn); n = hn; n.GetNormal (t1); t1 /= t1.Length(); t2 = Cross (n, t1); } void Opti3SurfaceMinFunction :: CalcNewPoint (const Vector & x, Point3d & np) const { np.X() = sp1.X() + x.Get(1) * t1.X() + x.Get(2) * t2.X(); np.Y() = sp1.Y() + x.Get(1) * t1.Y() + x.Get(2) * t2.Y(); np.Z() = sp1.Z() + x.Get(1) * t1.Z() + x.Get(2) * t2.Z(); Point<3> hnp = np; surf -> Project (hnp); np = hnp; } double Opti3SurfaceMinFunction :: Func (const Vector & x) const { Point3d pp1; CalcNewPoint (x, pp1); return pf.PointFunctionValue (pp1); } double Opti3SurfaceMinFunction :: FuncGrad (const Vector & x, Vector & grad) const { Vec3d n, vgrad; Point3d pp1; VectorMem<3> freegrad; CalcNewPoint (x, pp1); double badness = pf.PointFunctionValueGrad (pp1, freegrad); vgrad.X() = freegrad.Get(1); vgrad.Y() = freegrad.Get(2); vgrad.Z() = freegrad.Get(3); Vec<3> hn; surf -> GetNormalVector (pp1, hn); n = hn; vgrad -= (vgrad * n) * n; grad.Elem(1) = vgrad * t1; grad.Elem(2) = vgrad * t2; return badness; } #endif #ifdef SOLIDGEOM class Opti3EdgeMinFunction : public MinFunction { const PointFunction & pf; Point3d sp1; const Surface *surf1, *surf2; Vec3d t1; public: Opti3EdgeMinFunction (const PointFunction & apf); void SetPoint (const Surface * asurf1, const Surface * asurf2, const Point3d & asp1); void CalcNewPoint (const Vector & x, Point3d & np) const; virtual double FuncGrad (const Vector & x, Vector & g) const; virtual double Func (const Vector & x) const; }; Opti3EdgeMinFunction :: Opti3EdgeMinFunction (const PointFunction & apf) : MinFunction(), pf(apf) { ; } void Opti3EdgeMinFunction :: SetPoint (const Surface * asurf1, const Surface * asurf2, const Point3d & asp1) { Vec3d n1, n2; sp1 = asp1; surf1 = asurf1; surf2 = asurf2; Vec<3> hn1, hn2; surf1 -> GetNormalVector (sp1, hn1); surf2 -> GetNormalVector (sp1, hn2); n1 = hn1; n2 = hn2; t1 = Cross (n1, n2); } void Opti3EdgeMinFunction :: CalcNewPoint (const Vector & x, Point3d & np) const { np.X() = sp1.X() + x.Get(1) * t1.X(); np.Y() = sp1.Y() + x.Get(1) * t1.Y(); np.Z() = sp1.Z() + x.Get(1) * t1.Z(); Point<3> hnp = np; ProjectToEdge (surf1, surf2, hnp); np = hnp; } double Opti3EdgeMinFunction :: Func (const Vector & x) const { Vector g(x.Size()); return FuncGrad (x, g); } double Opti3EdgeMinFunction :: FuncGrad (const Vector & x, Vector & grad) const { Vec3d n1, n2, v1, vgrad; Point3d pp1; double badness; VectorMem<3> freegrad; CalcNewPoint (x, pp1); badness = pf.PointFunctionValueGrad (pp1, freegrad); vgrad.X() = freegrad.Get(1); vgrad.Y() = freegrad.Get(2); vgrad.Z() = freegrad.Get(3); Vec<3> hn1, hn2; surf1 -> GetNormalVector (pp1, hn1); surf2 -> GetNormalVector (pp1, hn2); n1 = hn1; n2 = hn2; v1 = Cross (n1, n2); v1 /= v1.Length(); grad.Elem(1) = (vgrad * v1) * (t1 * v1); return badness; } #endif double CalcTotalBad (const Mesh::T_POINTS & points, const Mesh::T_VOLELEMENTS & elements, const MeshingParameters & mp) { double sum = 0; double elbad; tets_in_qualclass.SetSize(20); tets_in_qualclass = 0; double teterrpow = mp.opterrpow; for (int i = 1; i <= elements.Size(); i++) { elbad = pow (max2(CalcBad (points, elements.Get(i), 0, mp),1e-10), 1/teterrpow); int qualclass = int (20 / elbad + 1); if (qualclass < 1) qualclass = 1; if (qualclass > 20) qualclass = 20; tets_in_qualclass.Elem(qualclass)++; sum += elbad; } return sum; } int WrongOrientation (const Mesh::T_POINTS & points, const Element & el) { const Point3d & p1 = points[el.PNum(1)]; const Point3d & p2 = points[el.PNum(2)]; const Point3d & p3 = points[el.PNum(3)]; const Point3d & p4 = points[el.PNum(4)]; Vec3d v1(p1, p2); Vec3d v2(p1, p3); Vec3d v3(p1, p4); Vec3d n; Cross (v1, v2, n); double vol = n * v3; return (vol > 0); } /* ************* JacobianPointFunction **************************** */ // class JacobianPointFunction : public MinFunction // { // public: // Mesh::T_POINTS & points; // const Mesh::T_VOLELEMENTS & elements; // TABLE elementsonpoint; // PointIndex actpind; // public: // JacobianPointFunction (Mesh::T_POINTS & apoints, // const Mesh::T_VOLELEMENTS & aelements); // virtual void SetPointIndex (PointIndex aactpind); // virtual double Func (const Vector & x) const; // virtual double FuncGrad (const Vector & x, Vector & g) const; // virtual double FuncDeriv (const Vector & x, const Vector & dir, double & deriv) const; // }; JacobianPointFunction :: JacobianPointFunction (Mesh::T_POINTS & apoints, const Mesh::T_VOLELEMENTS & aelements) : points(apoints), elements(aelements), elementsonpoint(apoints.Size()) { INDEX i; int j; for (i = 1; i <= elements.Size(); i++) { for (j = 1; j <= elements.Get(i).NP(); j++) elementsonpoint.Add1 (elements.Get(i).PNum(j), i); } onplane = false; } void JacobianPointFunction :: SetPointIndex (PointIndex aactpind) { actpind = aactpind; } double JacobianPointFunction :: Func (const Vector & v) const { int j; double badness = 0; Point<3> hp = points.Elem(actpind); points.Elem(actpind) = hp + Vec<3> (v(0), v(1), v(2)); if(onplane) points.Elem(actpind) -= (v(0)*nv(0)+v(1)*nv(1)+v(2)*nv(2)) * nv; for (j = 1; j <= elementsonpoint.EntrySize(actpind); j++) { int eli = elementsonpoint.Get(actpind, j); badness += elements.Get(eli).CalcJacobianBadness (points); } points.Elem(actpind) = hp; return badness; } double JacobianPointFunction :: FuncGrad (const Vector & x, Vector & g) const { int j, k; int lpi; double badness = 0;//, hbad; Point<3> hp = points.Elem(actpind); points.Elem(actpind) = hp + Vec<3> (x(0), x(1), x(2)); if(onplane) points.Elem(actpind) -= (x(0)*nv(0)+x(1)*nv(1)+x(2)*nv(2)) * nv; Vec<3> hderiv; //Vec3d vdir; g.SetSize(3); g = 0; for (j = 1; j <= elementsonpoint.EntrySize(actpind); j++) { int eli = elementsonpoint.Get(actpind, j); const Element & el = elements.Get(eli); lpi = 0; for (k = 1; k <= el.GetNP(); k++) if (el.PNum(k) == actpind) lpi = k; if (!lpi) cerr << "loc point not found" << endl; badness += elements.Get(eli). CalcJacobianBadnessGradient (points, lpi, hderiv); for(k=0; k<3; k++) g(k) += hderiv(k); /* for (k = 1; k <= 3; k++) { vdir = Vec3d(0,0,0); vdir.X(k) = 1; hbad = elements.Get(eli). CalcJacobianBadnessDirDeriv (points, lpi, vdir, hderiv); //(*testout) << "hderiv " << k << ": " << hderiv << endl; g.Elem(k) += hderiv; if (k == 1) badness += hbad; } */ } if(onplane) { double scal = nv(0)*g(0) + nv(1)*g(1) + nv(2)*g(2); g(0) -= scal*nv(0); g(1) -= scal*nv(1); g(2) -= scal*nv(2); } //(*testout) << "g = " << g << endl; points.Elem(actpind) = hp; return badness; } double JacobianPointFunction :: FuncDeriv (const Vector & x, const Vector & dir, double & deriv) const { int j, k; int lpi; double badness = 0; Point<3> hp = points.Elem(actpind); points.Elem(actpind) = Point<3> (hp + Vec3d (x(0), x(1), x(2))); if(onplane) points.Elem(actpind) -= (Vec3d (x(0), x(1), x(2))*nv) * nv; double hderiv; deriv = 0; Vec<3> vdir(dir(0), dir(1), dir(2)); if(onplane) { double scal = vdir * nv; vdir -= scal*nv; } for (j = 1; j <= elementsonpoint.EntrySize(actpind); j++) { int eli = elementsonpoint.Get(actpind, j); const Element & el = elements.Get(eli); lpi = 0; for (k = 1; k <= el.GetNP(); k++) if (el.PNum(k) == actpind) lpi = k; if (!lpi) cerr << "loc point not found" << endl; badness += elements.Get(eli). CalcJacobianBadnessDirDeriv (points, lpi, vdir, hderiv); deriv += hderiv; } points.Elem(actpind) = hp; return badness; } #ifdef SOLIDGEOMxxxx void Mesh :: ImproveMesh (const CSG eometry & geometry, OPTIMIZEGOAL goal) { INDEX i, eli; int j; int typ = 1; if (!&geometry || geometry.GetNSurf() == 0) { ImproveMesh (goal); return; } const char * savetask = multithread.task; multithread.task = "Smooth Mesh"; TABLE surfelementsonpoint(points.Size()); Vector x(3), xsurf(2), xedge(1); int surf, surf1, surf2, surf3; int uselocalh = mparam.uselocalh; (*testout) << setprecision(8); (*testout) << "Improve Mesh" << "\n"; PrintMessage (3, "ImproveMesh"); // (*mycout) << "Vol = " << CalcVolume (points, volelements) << endl; for (i = 1; i <= surfelements.Size(); i++) for (j = 1; j <= 3; j++) surfelementsonpoint.Add1 (surfelements.Get(i).PNum(j), i); PointFunction * pf; if (typ == 1) pf = new PointFunction(points, volelements); else pf = new CheapPointFunction(points, volelements); // pf->SetLocalH (h); Opti3FreeMinFunction freeminf(*pf); Opti3SurfaceMinFunction surfminf(*pf); Opti3EdgeMinFunction edgeminf(*pf); OptiParameters par; par.maxit_linsearch = 20; par.maxit_bfgs = 20; int printmod = 1; char printdot = '.'; if (points.Size() > 1000) { printmod = 10; printdot = '+'; } if (points.Size() > 10000) { printmod = 100; printdot = '*'; } for (i = 1; i <= points.Size(); i++) { // if (ptyps.Get(i) == FIXEDPOINT) continue; if (ptyps.Get(i) != INNERPOINT) continue; if (multithread.terminate) throw NgException ("Meshing stopped"); /* if (multithread.terminate) break; */ multithread.percent = 100.0 * i /points.Size(); /* if (points.Size() < 1000) PrintDot (); else if (i % 10 == 0) PrintDot ('+'); */ if (i % printmod == 0) PrintDot (printdot); // (*testout) << "Now point " << i << "\n"; // (*testout) << "Old: " << points.Get(i) << "\n"; pf->SetPointIndex (i); // if (uselocalh) { double lh = GetH (points.Get(i)); pf->SetLocalH (GetH (points.Get(i))); par.typx = lh / 10; // (*testout) << "lh(" << points.Get(i) << ") = " << lh << "\n"; } surf1 = surf2 = surf3 = 0; for (j = 1; j <= surfelementsonpoint.EntrySize(i); j++) { eli = surfelementsonpoint.Get(i, j); int surfi = surfelements.Get(eli).GetIndex(); if (surfi) { surf = GetFaceDescriptor(surfi).SurfNr(); if (!surf1) surf1 = surf; else if (surf1 != surf) { if (!surf2) surf2 = surf; else if (surf2 != surf) surf3 = surf; } } else { surf1 = surf2 = surf3 = 1; // simulates corner point } } if (surf2 && !surf3) { // (*testout) << "On Edge" << "\n"; /* xedge = 0; edgeminf.SetPoint (geometry.GetSurface(surf1), geometry.GetSurface(surf2), points.Elem(i)); BFGS (xedge, edgeminf, par); edgeminf.CalcNewPoint (xedge, points.Elem(i)); */ } if (surf1 && !surf2) { // (*testout) << "In Surface" << "\n"; /* xsurf = 0; surfminf.SetPoint (geometry.GetSurface(surf1), points.Get(i)); BFGS (xsurf, surfminf, par); surfminf.CalcNewPoint (xsurf, points.Elem(i)); */ } if (!surf1) { // (*testout) << "In Volume" << "\n"; x = 0; freeminf.SetPoint (points.Elem(i)); // par.typx = BFGS (x, freeminf, par); points.Elem(i).X() += x.Get(1); points.Elem(i).Y() += x.Get(2); points.Elem(i).Z() += x.Get(3); } // (*testout) << "New Point: " << points.Elem(i) << "\n" << "\n"; } PrintDot ('\n'); // (*mycout) << "Vol = " << CalcVolume (points, volelements) << endl; multithread.task = savetask; } #endif void Mesh :: ImproveMesh (const MeshingParameters & mp, OPTIMIZEGOAL goal) { int typ = 1; (*testout) << "Improve Mesh" << "\n"; PrintMessage (3, "ImproveMesh"); int np = GetNP(); int ne = GetNE(); Array perrs(np); perrs = 1.0; double bad1 = 0; double badmax = 0; if (goal == OPT_QUALITY) { for (int i = 1; i <= ne; i++) { const Element & el = VolumeElement(i); if (el.GetType() != TET) continue; double hbad = CalcBad (points, el, 0, mp); for (int j = 0; j < 4; j++) perrs[el[j]] += hbad; bad1 += hbad; } for (int i = perrs.Begin(); i < perrs.End(); i++) if (perrs[i] > badmax) badmax = perrs[i]; badmax = 0; } if (goal == OPT_QUALITY) { bad1 = CalcTotalBad (points, volelements, mp); (*testout) << "Total badness = " << bad1 << endl; PrintMessage (5, "Total badness = ", bad1); } Vector x(3); (*testout) << setprecision(8); //int uselocalh = mparam.uselocalh; PointFunction * pf; if (typ == 1) pf = new PointFunction(points, volelements, mp); else pf = new CheapPointFunction(points, volelements, mp); // pf->SetLocalH (h); Opti3FreeMinFunction freeminf(*pf); OptiParameters par; par.maxit_linsearch = 20; par.maxit_bfgs = 20; Array pointh (points.Size()); if(lochfunc) { for (PointIndex pi : points.Range()) pointh[pi] = GetH(points[pi]); } else { pointh = 0; for (Element & el : VolumeElements()) { double h = pow(el.Volume(points),1./3.); for (PointIndex pi : el.PNums()) if (h > pointh[pi]) pointh[pi] = h; } } int printmod = 1; char printdot = '.'; if (points.Size() > 1000) { printmod = 10; printdot = '+'; } if (points.Size() > 10000) { printmod = 100; printdot = '*'; } const char * savetask = multithread.task; multithread.task = "Smooth Mesh"; for (PointIndex pi : points.Range()) if ( (*this)[pi].Type() == INNERPOINT && perrs[pi] > 0.01 * badmax) { if (multithread.terminate) throw NgException ("Meshing stopped"); multithread.percent = 100.0 * (pi+1-PointIndex::BASE) / points.Size(); if ( (pi+1-PointIndex::BASE) % printmod == 0) PrintDot (printdot); double lh = pointh[pi]; pf->SetLocalH (lh); par.typx = lh; freeminf.SetPoint (points[pi]); pf->SetPointIndex (pi); x = 0; int pok; pok = freeminf.Func (x) < 1e10; if (!pok) { pok = pf->MovePointToInner (); freeminf.SetPoint (points[pi]); pf->SetPointIndex (pi); } if (pok) { //*testout << "start BFGS, pok" << endl; BFGS (x, freeminf, par); //*testout << "BFGS complete, pok" << endl; points[pi](0) += x(0); points[pi](1) += x(1); points[pi](2) += x(2); } } PrintDot ('\n'); delete pf; multithread.task = savetask; if (goal == OPT_QUALITY) { bad1 = CalcTotalBad (points, volelements, mp); (*testout) << "Total badness = " << bad1 << endl; PrintMessage (5, "Total badness = ", bad1); } } // Improve Condition number of Jacobian, any elements void Mesh :: ImproveMeshJacobian (const MeshingParameters & mp, OPTIMIZEGOAL goal, const BitArray * usepoint) { int i, j; (*testout) << "Improve Mesh Jacobian" << "\n"; PrintMessage (3, "ImproveMesh Jacobian"); int np = GetNP(); int ne = GetNE(); Vector x(3); (*testout) << setprecision(8); JacobianPointFunction pf(points, volelements); OptiParameters par; par.maxit_linsearch = 20; par.maxit_bfgs = 20; BitArray badnodes(np); badnodes.Clear(); for (i = 1; i <= ne; i++) { const Element & el = VolumeElement(i); double bad = el.CalcJacobianBadness (Points()); if (bad > 1) for (j = 1; j <= el.GetNP(); j++) badnodes.Set (el.PNum(j)); } Array pointh (points.Size()); if(lochfunc) { for(i = 1; i<=points.Size(); i++) pointh[i] = GetH(points.Get(i)); } else { pointh = 0; for(i=0; i pointh[el.PNum(j)]) pointh[el.PNum(j)] = h; } } const char * savetask = multithread.task; multithread.task = "Smooth Mesh Jacobian"; for (PointIndex pi = points.Begin(); i < points.End(); pi++) { if ((*this)[pi].Type() != INNERPOINT) continue; if(usepoint && !usepoint->Test(i)) continue; //(*testout) << "improvejac, p = " << i << endl; if (goal == OPT_WORSTCASE && !badnodes.Test(i)) continue; // (*testout) << "smooth p " << i << endl; /* if (multithread.terminate) break; */ if (multithread.terminate) throw NgException ("Meshing stopped"); multithread.percent = 100.0 * i / points.Size(); if (points.Size() < 1000) PrintDot (); else if (i % 10 == 0) PrintDot ('+'); double lh = pointh[i]; par.typx = lh; pf.SetPointIndex (pi); x = 0; int pok = (pf.Func (x) < 1e10); if (pok) { //*testout << "start BFGS, Jacobian" << endl; BFGS (x, pf, par); //*testout << "end BFGS, Jacobian" << endl; points.Elem(i)(0) += x(0); points.Elem(i)(1) += x(1); points.Elem(i)(2) += x(2); } else { cout << "el not ok" << endl; } } PrintDot ('\n'); multithread.task = savetask; } // Improve Condition number of Jacobian, any elements void Mesh :: ImproveMeshJacobianOnSurface (const MeshingParameters & mp, const BitArray & usepoint, const Array< Vec<3>* > & nv, OPTIMIZEGOAL goal, const Array< Array* > * idmaps) { int i, j; (*testout) << "Improve Mesh Jacobian" << "\n"; PrintMessage (3, "ImproveMesh Jacobian"); int np = GetNP(); int ne = GetNE(); Vector x(3); (*testout).precision(8); JacobianPointFunction pf(points, volelements); Array< Array* > locidmaps; const Array< Array* > * used_idmaps; if(idmaps) used_idmaps = idmaps; else { used_idmaps = &locidmaps; for(i=1; i<=GetIdentifications().GetMaxNr(); i++) { if(GetIdentifications().GetType(i) == Identifications::PERIODIC) { locidmaps.Append(new Array); GetIdentifications().GetMap(i,*locidmaps.Last(),true); } } } bool usesum = (used_idmaps->Size() > 0); MinFunctionSum pf_sum; JacobianPointFunction * pf2ptr = NULL; if(usesum) { pf2ptr = new JacobianPointFunction(points, volelements); pf_sum.AddFunction(pf); pf_sum.AddFunction(*pf2ptr); } OptiParameters par; par.maxit_linsearch = 20; par.maxit_bfgs = 20; BitArray badnodes(np); badnodes.Clear(); for (i = 1; i <= ne; i++) { const Element & el = VolumeElement(i); double bad = el.CalcJacobianBadness (Points()); if (bad > 1) for (j = 1; j <= el.GetNP(); j++) badnodes.Set (el.PNum(j)); } Array pointh (points.Size()); if(lochfunc) { for(i=1; i<=points.Size(); i++) pointh[i] = GetH(points.Get(i)); } else { pointh = 0; for(i=0; i pointh[el.PNum(j)]) pointh[el.PNum(j)] = h; } } const char * savetask = multithread.task; multithread.task = "Smooth Mesh Jacobian"; for (PointIndex pi = points.Begin(); pi <= points.End(); pi++) if ( usepoint.Test(i) ) { //(*testout) << "improvejac, p = " << i << endl; if (goal == OPT_WORSTCASE && !badnodes.Test(i)) continue; // (*testout) << "smooth p " << i << endl; /* if (multithread.terminate) break; */ if (multithread.terminate) throw NgException ("Meshing stopped"); multithread.percent = 100.0 * i / points.Size(); if (points.Size() < 1000) PrintDot (); else if (i % 10 == 0) PrintDot ('+'); double lh = pointh[i];//GetH(points.Get(i)); par.typx = lh; pf.SetPointIndex (pi); PointIndex brother (-1); if(usesum) { for(j=0; brother == -1 && jSize(); j++) { if(i < (*used_idmaps)[j]->Size() + PointIndex::BASE) { brother = (*(*used_idmaps)[j])[i]; if(brother == i || brother == 0) brother = -1; } } if(brother >= i) { pf2ptr->SetPointIndex(brother); pf2ptr->SetNV(*nv[brother-1]); } } if(usesum && brother < i) continue; //pf.UnSetNV(); x = 0; //(*testout) << "before " << pf.Func(x); pf.SetNV(*nv[i-1]); x = 0; int pok = (brother == -1) ? (pf.Func (x) < 1e10) : (pf_sum.Func (x) < 1e10); if (pok) { if(brother == -1) BFGS (x, pf, par); else BFGS (x, pf_sum, par); for(j=0; j<3; j++) points.Elem(i)(j) += x(j);// - scal*nv[i-1].X(j); if(brother != -1) for(j=0; j<3; j++) points.Elem(brother)(j) += x(j);// - scal*nv[brother-1].X(j); } else { cout << "el not ok" << endl; (*testout) << "el not ok" << endl << " func " << ((brother == -1) ? pf.Func(x) : pf_sum.Func (x)) << endl; if(brother != -1) (*testout) << " func1 " << pf.Func(x) << endl << " func2 " << pf2ptr->Func(x) << endl; } } PrintDot ('\n'); delete pf2ptr; for(i=0; i* > * idmaps = NULL); void SwapImprove2 (Mesh & mesh, OPTIMIZEGOAL goal = OPT_QUALITY); double CalcBad (const Mesh::T_POINTS & points, const Element & elem, double h) { if (elem.GetType() == TET) return CalcTetBadness (points[elem[0]], points[elem[1]], points[elem[2]], points[elem[3]], h, mp); return 0; } double CalcTotalBad (const Mesh::T_POINTS & points, const Mesh::T_VOLELEMENTS & elements) { return netgen::CalcTotalBad (points, elements, mp); } }; inline double CalcBad (const Mesh::T_POINTS & points, const Element & elem, double h, const MeshingParameters & mp) { if (elem.GetType() == TET) return CalcTetBadness (points[elem[0]], points[elem[1]], points[elem[2]], points[elem[3]], h, mp); return 0; } extern int WrongOrientation (const Mesh::T_POINTS & points, const Element & el); /* Functional depending of inner point inside triangular surface */ class MinFunctionSum : public MinFunction { protected: Array functions; public: virtual double Func (const Vector & x) const; virtual void Grad (const Vector & x, Vector & g) const; virtual double FuncGrad (const Vector & x, Vector & g) const; virtual double FuncDeriv (const Vector & x, const Vector & dir, double & deriv) const; virtual double GradStopping (const Vector & x) const; void AddFunction(MinFunction & fun); const MinFunction & Function(int i) const; MinFunction & Function(int i); }; class PointFunction1 : public MinFunction { Mesh::T_POINTS & points; const Array & faces; const MeshingParameters & mp; double h; public: PointFunction1 (Mesh::T_POINTS & apoints, const Array & afaces, const MeshingParameters & amp, double ah); virtual double Func (const Vector & x) const; virtual double FuncDeriv (const Vector & x, const Vector & dir, double & deriv) const; virtual double FuncGrad (const Vector & x, Vector & g) const; virtual double GradStopping (const Vector & x) const; }; class JacobianPointFunction : public MinFunction { public: Mesh::T_POINTS & points; const Mesh::T_VOLELEMENTS & elements; TABLE elementsonpoint; PointIndex actpind; bool onplane; Vec<3> nv; public: JacobianPointFunction (Mesh::T_POINTS & apoints, const Mesh::T_VOLELEMENTS & aelements); virtual ~JacobianPointFunction () { ; } virtual void SetPointIndex (PointIndex aactpind); virtual double Func (const Vector & x) const; virtual double FuncGrad (const Vector & x, Vector & g) const; virtual double FuncDeriv (const Vector & x, const Vector & dir, double & deriv) const; inline void SetNV(const Vec<3> & anv) {nv = anv; onplane = true;} inline void UnSetNV(void) {onplane = false;} }; #endif netgen-6.2.1804/libsrc/meshing/meshfunc.cpp0000644000175000017500000004344113272137567017237 0ustar kurtkurt#include #include "meshing.hpp" namespace netgen { extern const char * tetrules[]; // extern const char * tetrules2[]; extern const char * prismrules2[]; extern const char * pyramidrules[]; extern const char * pyramidrules2[]; extern const char * hexrules[]; // extern double teterrpow; MESHING3_RESULT MeshVolume (MeshingParameters & mp, Mesh& mesh3d) { int oldne; int meshed; Array connectednodes; if (!mesh3d.HasLocalHFunction()) mesh3d.CalcLocalH(mp.grading); mesh3d.Compress(); // mesh3d.PrintMemInfo (cout); if (mp.checkoverlappingboundary) if (mesh3d.CheckOverlappingBoundary()) throw NgException ("Stop meshing since boundary mesh is overlapping"); int nonconsist = 0; for (int k = 1; k <= mesh3d.GetNDomains(); k++) { if(mp.only3D_domain_nr && mp.only3D_domain_nr !=k) continue; PrintMessage (3, "Check subdomain ", k, " / ", mesh3d.GetNDomains()); mesh3d.FindOpenElements(k); /* bool res = mesh3d.CheckOverlappingBoundary(); if (res) { PrintError ("Surface is overlapping !!"); nonconsist = 1; } */ bool res = (mesh3d.CheckConsistentBoundary() != 0); if (res) { PrintError ("Surface mesh not consistent"); nonconsist = 1; } } if (nonconsist) { PrintError ("Stop meshing since surface mesh not consistent"); throw NgException ("Stop meshing since surface mesh not consistent"); } double globmaxh = mp.maxh; for (int k = 1; k <= mesh3d.GetNDomains(); k++) { if(mp.only3D_domain_nr && mp.only3D_domain_nr !=k) continue; if (multithread.terminate) break; PrintMessage (2, ""); PrintMessage (1, "Meshing subdomain ", k, " of ", mesh3d.GetNDomains()); (*testout) << "Meshing subdomain " << k << endl; mp.maxh = min2 (globmaxh, mesh3d.MaxHDomain(k)); mesh3d.CalcSurfacesOfNode(); mesh3d.FindOpenElements(k); if (!mesh3d.GetNOpenElements()) continue; Box<3> domain_bbox( Box<3>::EMPTY_BOX ); for (SurfaceElementIndex sei = 0; sei < mesh3d.GetNSE(); sei++) { const Element2d & el = mesh3d[sei]; if (el.IsDeleted() ) continue; if (mesh3d.GetFaceDescriptor(el.GetIndex()).DomainIn() == k || mesh3d.GetFaceDescriptor(el.GetIndex()).DomainOut() == k) for (int j = 0; j < el.GetNP(); j++) domain_bbox.Add (mesh3d[el[j]]); } domain_bbox.Increase (0.01 * domain_bbox.Diam()); for (int qstep = 0; qstep <= 3; qstep++) // for (int qstep = 0; qstep <= 0; qstep++) // for hex-filling { if (qstep == 0 && !mp.try_hexes) continue; // cout << "openquads = " << mesh3d.HasOpenQuads() << endl; if (mesh3d.HasOpenQuads()) { string rulefile = ngdir; const char ** rulep = NULL; switch (qstep) { case 0: rulefile = "/Users/joachim/gitlab/netgen/rules/hexa.rls"; rulep = hexrules; break; case 1: rulefile += "/rules/prisms2.rls"; rulep = prismrules2; break; case 2: // connect pyramid to triangle rulefile += "/rules/pyramids2.rls"; rulep = pyramidrules2; break; case 3: // connect to vis-a-vis point rulefile += "/rules/pyramids.rls"; rulep = pyramidrules; break; } // Meshing3 meshing(rulefile); Meshing3 meshing(rulep); MeshingParameters mpquad = mp; mpquad.giveuptol = 15; mpquad.baseelnp = 4; mpquad.starshapeclass = 1000; mpquad.check_impossible = qstep == 1; // for prisms only (air domain in trafo) for (PointIndex pi = mesh3d.Points().Begin(); pi < mesh3d.Points().End(); pi++) meshing.AddPoint (mesh3d[pi], pi); mesh3d.GetIdentifications().GetPairs (0, connectednodes); for (int i = 1; i <= connectednodes.Size(); i++) meshing.AddConnectedPair (connectednodes.Get(i)); for (int i = 1; i <= mesh3d.GetNOpenElements(); i++) { Element2d hel = mesh3d.OpenElement(i); meshing.AddBoundaryElement (hel); } oldne = mesh3d.GetNE(); meshing.GenerateMesh (mesh3d, mpquad); for (int i = oldne + 1; i <= mesh3d.GetNE(); i++) mesh3d.VolumeElement(i).SetIndex (k); (*testout) << "mesh has " << mesh3d.GetNE() << " prism/pyramid elements" << endl; mesh3d.FindOpenElements(k); } } if (mesh3d.HasOpenQuads()) { PrintSysError ("mesh has still open quads"); throw NgException ("Stop meshing since too many attempts"); // return MESHING3_GIVEUP; } if (mp.delaunay && mesh3d.GetNOpenElements()) { Meshing3 meshing((const char**)NULL); mesh3d.FindOpenElements(k); /* for (PointIndex pi = mesh3d.Points().Begin(); pi < mesh3d.Points().End(); pi++) meshing.AddPoint (mesh3d[pi], pi); */ for (PointIndex pi : mesh3d.Points().Range()) meshing.AddPoint (mesh3d[pi], pi); for (int i = 1; i <= mesh3d.GetNOpenElements(); i++) meshing.AddBoundaryElement (mesh3d.OpenElement(i)); oldne = mesh3d.GetNE(); meshing.Delaunay (mesh3d, k, mp); for (int i = oldne + 1; i <= mesh3d.GetNE(); i++) mesh3d.VolumeElement(i).SetIndex (k); PrintMessage (3, mesh3d.GetNP(), " points, ", mesh3d.GetNE(), " elements"); } int cntsteps = 0; if (mesh3d.GetNOpenElements()) do { if (multithread.terminate) break; mesh3d.FindOpenElements(k); PrintMessage (5, mesh3d.GetNOpenElements(), " open faces"); cntsteps++; if (cntsteps > mp.maxoutersteps) throw NgException ("Stop meshing since too many attempts"); string rulefile = ngdir + "/tetra.rls"; PrintMessage (1, "start tetmeshing"); // Meshing3 meshing(rulefile); Meshing3 meshing(tetrules); Array glob2loc(mesh3d.GetNP()); glob2loc = -1; for (PointIndex pi = mesh3d.Points().Begin(); pi < mesh3d.Points().End(); pi++) if (domain_bbox.IsIn (mesh3d[pi])) glob2loc[pi] = meshing.AddPoint (mesh3d[pi], pi); for (int i = 1; i <= mesh3d.GetNOpenElements(); i++) { Element2d hel = mesh3d.OpenElement(i); for (int j = 0; j < hel.GetNP(); j++) hel[j] = glob2loc[hel[j]]; meshing.AddBoundaryElement (hel); // meshing.AddBoundaryElement (mesh3d.OpenElement(i)); } oldne = mesh3d.GetNE(); mp.giveuptol = 15 + 10 * cntsteps; mp.sloppy = 5; meshing.GenerateMesh (mesh3d, mp); for (ElementIndex ei = oldne; ei < mesh3d.GetNE(); ei++) mesh3d[ei].SetIndex (k); mesh3d.CalcSurfacesOfNode(); mesh3d.FindOpenElements(k); // teterrpow = 2; if (mesh3d.GetNOpenElements() != 0) { meshed = 0; PrintMessage (5, mesh3d.GetNOpenElements(), " open faces found"); MeshOptimize3d optmesh(mp); const char * optstr = "mcmstmcmstmcmstmcm"; for (size_t j = 1; j <= strlen(optstr); j++) { mesh3d.CalcSurfacesOfNode(); mesh3d.FreeOpenElementsEnvironment(2); mesh3d.CalcSurfacesOfNode(); switch (optstr[j-1]) { case 'c': optmesh.CombineImprove(mesh3d, OPT_REST); break; case 'd': optmesh.SplitImprove(mesh3d, OPT_REST); break; case 's': optmesh.SwapImprove(mesh3d, OPT_REST); break; case 't': optmesh.SwapImprove2(mesh3d, OPT_REST); break; case 'm': mesh3d.ImproveMesh(mp, OPT_REST); break; } } mesh3d.FindOpenElements(k); PrintMessage (3, "Call remove problem"); RemoveProblem (mesh3d, k); mesh3d.FindOpenElements(k); } else { meshed = 1; PrintMessage (1, "Success !"); } } while (!meshed); PrintMessage (1, mesh3d.GetNP(), " points, ", mesh3d.GetNE(), " elements"); } mp.maxh = globmaxh; MeshQuality3d (mesh3d); return MESHING3_OK; } /* MESHING3_RESULT MeshVolumeOld (MeshingParameters & mp, Mesh& mesh3d) { int i, k, oldne; int meshed; int cntsteps; PlotStatistics3d * pstat; if (globflags.GetNumFlag("silentflag", 1) <= 2) pstat = new XPlotStatistics3d; else pstat = new TerminalPlotStatistics3d; cntsteps = 0; do { cntsteps++; if (cntsteps > mp.maxoutersteps) { return MESHING3_OUTERSTEPSEXCEEDED; } int noldp = mesh3d.GetNP(); if ( (cntsteps == 1) && globflags.GetDefineFlag ("delaunay")) { cntsteps ++; mesh3d.CalcSurfacesOfNode(); for (k = 1; k <= mesh3d.GetNDomains(); k++) { Meshing3 meshing(NULL, pstat); mesh3d.FindOpenElements(k); for (i = 1; i <= noldp; i++) meshing.AddPoint (mesh3d.Point(i), i); for (i = 1; i <= mesh3d.GetNOpenElements(); i++) { if (mesh3d.OpenElement(i).GetIndex() == k) meshing.AddBoundaryElement (mesh3d.OpenElement(i)); } oldne = mesh3d.GetNE(); if (globflags.GetDefineFlag ("blockfill")) { if (!globflags.GetDefineFlag ("localh")) meshing.BlockFill (mesh3d, mp.h * globflags.GetNumFlag ("relblockfillh", 1)); else meshing.BlockFillLocalH (mesh3d); } MeshingParameters mpd; meshing.Delaunay (mesh3d, mpd); for (i = oldne + 1; i <= mesh3d.GetNE(); i++) mesh3d.VolumeElement(i).SetIndex (k); } } noldp = mesh3d.GetNP(); mesh3d.CalcSurfacesOfNode(); mesh3d.FindOpenElements(); for (k = 1; k <= mesh3d.GetNDomains(); k++) { Meshing3 meshing(globflags.GetStringFlag ("rules3d", NULL), pstat); Point3d pmin, pmax; mesh3d.GetBox (pmin, pmax, k); rot.SetCenter (Center (pmin, pmax)); for (i = 1; i <= noldp; i++) meshing.AddPoint (mesh3d.Point(i), i); for (i = 1; i <= mesh3d.GetNOpenElements(); i++) { if (mesh3d.OpenElement(i).GetIndex() == k) meshing.AddBoundaryElement (mesh3d.OpenElement(i)); } oldne = mesh3d.GetNE(); if ( (cntsteps == 1) && globflags.GetDefineFlag ("blockfill")) { if (!globflags.GetDefineFlag ("localh")) { meshing.BlockFill (mesh3d, mp.h * globflags.GetNumFlag ("relblockfillh", 1)); } else { meshing.BlockFillLocalH (mesh3d); } } mp.giveuptol = int(globflags.GetNumFlag ("giveuptol", 15)); meshing.GenerateMesh (mesh3d, mp); for (i = oldne + 1; i <= mesh3d.GetNE(); i++) mesh3d.VolumeElement(i).SetIndex (k); } mesh3d.CalcSurfacesOfNode(); mesh3d.FindOpenElements(); teterrpow = 2; if (mesh3d.GetNOpenElements() != 0) { meshed = 0; (*mycout) << "Open elements found, old" << endl; const char * optstr = "mcmcmcmcm"; int j; for (j = 1; j <= strlen(optstr); j++) switch (optstr[j-1]) { case 'c': mesh3d.CombineImprove(); break; case 'd': mesh3d.SplitImprove(); break; case 's': mesh3d.SwapImprove(); break; case 'm': mesh3d.ImproveMesh(2); break; } (*mycout) << "Call remove" << endl; RemoveProblem (mesh3d); (*mycout) << "Problem removed" << endl; } else meshed = 1; } while (!meshed); MeshQuality3d (mesh3d); return MESHING3_OK; } */ /* MESHING3_RESULT MeshMixedVolume(MeshingParameters & mp, Mesh& mesh3d) { int i, j; MESHING3_RESULT res; Point3d pmin, pmax; mp.giveuptol = 10; mp.baseelnp = 4; mp.starshapeclass = 100; // TerminalPlotStatistics3d pstat; Meshing3 meshing1("pyramids.rls"); for (i = 1; i <= mesh3d.GetNP(); i++) meshing1.AddPoint (mesh3d.Point(i), i); mesh3d.FindOpenElements(); for (i = 1; i <= mesh3d.GetNOpenElements(); i++) if (mesh3d.OpenElement(i).GetIndex() == 1) meshing1.AddBoundaryElement (mesh3d.OpenElement(i)); res = meshing1.GenerateMesh (mesh3d, mp); mesh3d.GetBox (pmin, pmax); PrintMessage (1, "Mesh pyramids, res = ", res); if (res) exit (1); for (i = 1; i <= mesh3d.GetNE(); i++) mesh3d.VolumeElement(i).SetIndex (1); // do delaunay mp.baseelnp = 0; mp.starshapeclass = 5; Meshing3 meshing2(NULL); for (i = 1; i <= mesh3d.GetNP(); i++) meshing2.AddPoint (mesh3d.Point(i), i); mesh3d.FindOpenElements(); for (i = 1; i <= mesh3d.GetNOpenElements(); i++) if (mesh3d.OpenElement(i).GetIndex() == 1) meshing2.AddBoundaryElement (mesh3d.OpenElement(i)); MeshingParameters mpd; meshing2.Delaunay (mesh3d, mpd); for (i = 1; i <= mesh3d.GetNE(); i++) mesh3d.VolumeElement(i).SetIndex (1); mp.baseelnp = 0; mp.giveuptol = 10; for (int trials = 1; trials <= 50; trials++) { if (multithread.terminate) return MESHING3_TERMINATE; Meshing3 meshing3("tetra.rls"); for (i = 1; i <= mesh3d.GetNP(); i++) meshing3.AddPoint (mesh3d.Point(i), i); mesh3d.FindOpenElements(); for (i = 1; i <= mesh3d.GetNOpenElements(); i++) if (mesh3d.OpenElement(i).GetIndex() == 1) meshing3.AddBoundaryElement (mesh3d.OpenElement(i)); if (trials > 1) CheckSurfaceMesh2 (mesh3d); res = meshing3.GenerateMesh (mesh3d, mp); for (i = 1; i <= mesh3d.GetNE(); i++) mesh3d.VolumeElement(i).SetIndex (1); if (res == 0) break; for (i = 1; i <= mesh3d.GetNE(); i++) { const Element & el = mesh3d.VolumeElement(i); if (el.GetNP() != 4) { for (j = 1; j <= el.GetNP(); j++) mesh3d.AddLockedPoint (el.PNum(j)); } } mesh3d.CalcSurfacesOfNode(); mesh3d.FindOpenElements(); MeshOptimize3d optmesh; teterrpow = 2; const char * optstr = "mcmcmcmcm"; for (j = 1; j <= strlen(optstr); j++) switch (optstr[j-1]) { case 'c': optmesh.CombineImprove(mesh3d, OPT_REST); break; case 'd': optmesh.SplitImprove(mesh3d); break; case 's': optmesh.SwapImprove(mesh3d); break; case 'm': mesh3d.ImproveMesh(); break; } RemoveProblem (mesh3d); } PrintMessage (1, "Meshing tets, res = ", res); if (res) { mesh3d.FindOpenElements(); PrintSysError (1, "Open elements: ", mesh3d.GetNOpenElements()); exit (1); } for (i = 1; i <= mesh3d.GetNE(); i++) { const Element & el = mesh3d.VolumeElement(i); if (el.GetNP() != 4) { for (j = 1; j <= el.GetNP(); j++) mesh3d.AddLockedPoint (el.PNum(j)); } } mesh3d.CalcSurfacesOfNode(); mesh3d.FindOpenElements(); MeshOptimize3d optmesh; teterrpow = 2; const char * optstr = "mcmcmcmcm"; for (j = 1; j <= strlen(optstr); j++) switch (optstr[j-1]) { case 'c': optmesh.CombineImprove(mesh3d, OPT_REST); break; case 'd': optmesh.SplitImprove(mesh3d); break; case 's': optmesh.SwapImprove(mesh3d); break; case 'm': mesh3d.ImproveMesh(); break; } return MESHING3_OK; } */ MESHING3_RESULT OptimizeVolume (MeshingParameters & mp, Mesh & mesh3d) // const CSGeometry * geometry) { int i; PrintMessage (1, "Volume Optimization"); /* if (!mesh3d.PureTetMesh()) return MESHING3_OK; */ // (*mycout) << "optstring = " << mp.optimize3d << endl; /* const char * optstr = globflags.GetStringFlag ("optimize3d", "cmh"); int optsteps = int (globflags.GetNumFlag ("optsteps3d", 2)); */ mesh3d.CalcSurfacesOfNode(); for (i = 1; i <= mp.optsteps3d; i++) { if (multithread.terminate) break; MeshOptimize3d optmesh(mp); // teterrpow = mp.opterrpow; // for (size_t j = 1; j <= strlen(mp.optimize3d); j++) for (size_t j = 1; j <= mp.optimize3d.length(); j++) { if (multithread.terminate) break; switch (mp.optimize3d[j-1]) { case 'c': optmesh.CombineImprove(mesh3d, OPT_REST); break; case 'd': optmesh.SplitImprove(mesh3d); break; case 's': optmesh.SwapImprove(mesh3d); break; // case 'u': optmesh.SwapImproveSurface(mesh3d); break; case 't': optmesh.SwapImprove2(mesh3d); break; #ifdef SOLIDGEOM case 'm': mesh3d.ImproveMesh(*geometry); break; case 'M': mesh3d.ImproveMesh(*geometry); break; #else case 'm': mesh3d.ImproveMesh(mp); break; case 'M': mesh3d.ImproveMesh(mp); break; #endif case 'j': mesh3d.ImproveMeshJacobian(mp); break; } } mesh3d.mglevels = 1; MeshQuality3d (mesh3d); } return MESHING3_OK; } void RemoveIllegalElements (Mesh & mesh3d) { int it = 10; int nillegal, oldn; PrintMessage (1, "Remove Illegal Elements"); // return, if non-pure tet-mesh /* if (!mesh3d.PureTetMesh()) return; */ mesh3d.CalcSurfacesOfNode(); nillegal = mesh3d.MarkIllegalElements(); MeshingParameters dummymp; MeshOptimize3d optmesh(dummymp); while (nillegal && (it--) > 0) { if (multithread.terminate) break; PrintMessage (5, nillegal, " illegal tets"); optmesh.SplitImprove (mesh3d, OPT_LEGAL); mesh3d.MarkIllegalElements(); // test optmesh.SwapImprove (mesh3d, OPT_LEGAL); mesh3d.MarkIllegalElements(); // test optmesh.SwapImprove2 (mesh3d, OPT_LEGAL); oldn = nillegal; nillegal = mesh3d.MarkIllegalElements(); if (oldn != nillegal) it = 10; } PrintMessage (5, nillegal, " illegal tets"); } } netgen-6.2.1804/libsrc/meshing/improve2.cpp0000644000175000017500000004566413272137567017203 0ustar kurtkurt#include #include "meshing.hpp" #include #ifndef SMALLLIB //#ifndef NOTCL //#include //#endif #endif namespace netgen { class Neighbour { int nr[3]; int orient[3]; public: Neighbour () { ; } void SetNr (int side, int anr) { nr[side] = anr; } int GetNr (int side) { return nr[side]; } void SetOrientation (int side, int aorient) { orient[side] = aorient; } int GetOrientation (int side) { return orient[side]; } /* void SetNr1 (int side, int anr) { nr[side-1] = anr; } int GetNr1 (int side) { return nr[side-1]; } void SetOrientation1 (int side, int aorient) { orient[side-1] = aorient; } int GetOrientation1 (int side) { return orient[side-1]; } */ }; class trionedge { public: int tnr; int sidenr; trionedge () { tnr = 0; sidenr = 0; } trionedge (int atnr, int asidenr) { tnr = atnr; sidenr = asidenr; } }; void MeshOptimize2d :: EdgeSwapping (Mesh & mesh, int usemetric) { if (!faceindex) { if (usemetric) PrintMessage (3, "Edgeswapping, metric"); else PrintMessage (3, "Edgeswapping, topological"); for (faceindex = 1; faceindex <= mesh.GetNFD(); faceindex++) { EdgeSwapping (mesh, usemetric); if (multithread.terminate) throw NgException ("Meshing stopped"); } faceindex = 0; mesh.CalcSurfacesOfNode(); return; } static int timer = NgProfiler::CreateTimer ("EdgeSwapping 2D"); NgProfiler::RegionTimer reg1 (timer); static int timerstart = NgProfiler::CreateTimer ("EdgeSwapping 2D start"); NgProfiler::StartTimer (timerstart); Array seia; mesh.GetSurfaceElementsOfFace (faceindex, seia); for (int i = 0; i < seia.Size(); i++) if (mesh[seia[i]].GetNP() != 3) { GenericImprove (mesh); return; } int surfnr = mesh.GetFaceDescriptor (faceindex).SurfNr(); Array neighbors(mesh.GetNSE()); INDEX_2_HASHTABLE other(seia.Size() + 2); Array swapped(mesh.GetNSE()); Array pdef(mesh.GetNP()); Array pangle(mesh.GetNP()); // int e; // double d; // Vec3d nv1, nv2; // double loch(-1); static const double minangle[] = { 0, 1.481, 2.565, 3.627, 4.683, 5.736, 7, 9 }; for (int i = 0; i < seia.Size(); i++) { const Element2d & sel = mesh[seia[i]]; for (int j = 0; j < 3; j++) pangle[sel[j]] = 0.0; } // pangle = 0; for (int i = 0; i < seia.Size(); i++) { const Element2d & sel = mesh[seia[i]]; for (int j = 0; j < 3; j++) { POINTTYPE typ = mesh[sel[j]].Type(); if (typ == FIXEDPOINT || typ == EDGEPOINT) { pangle[sel[j]] += Angle (mesh[sel[(j+1)%3]] - mesh[sel[j]], mesh[sel[(j+2)%3]] - mesh[sel[j]]); } } } // for (PointIndex pi = PointIndex::BASE; // pi < mesh.GetNP()+PointIndex::BASE; pi++) // pdef = 0; for (int i = 0; i < seia.Size(); i++) { const Element2d & sel = mesh[seia[i]]; for (int j = 0; j < 3; j++) { PointIndex pi = sel[j]; if (mesh[pi].Type() == INNERPOINT || mesh[pi].Type() == SURFACEPOINT) pdef[pi] = -6; else for (int j = 0; j < 8; j++) if (pangle[pi] >= minangle[j]) pdef[pi] = -1-j; } } for (int i = 0; i < seia.Size(); i++) { const Element2d & sel = mesh[seia[i]]; for (int j = 0; j < 3; j++) pdef[sel[j]]++; } for (int i = 0; i < seia.Size(); i++) { for (int j = 0; j < 3; j++) { neighbors[seia[i]].SetNr (j, -1); neighbors[seia[i]].SetOrientation (j, 0); } } /* Array normals(mesh.GetNP()); for (i = 1; i <= mesh.GetNSE(); i++) { Element2d & hel = mesh.SurfaceElement(i); if (hel.GetIndex() == faceindex) for (k = 1; k <= 3; k++) { int pi = hel.PNum(k); SelectSurfaceOfPoint (mesh.Point(pi), hel.GeomInfoPi(k)); int surfi = mesh.GetFaceDescriptor(faceindex).SurfNr(); GetNormalVector (surfi, mesh.Point(pi), normals.Elem(pi)); normals.Elem(pi) /= normals.Elem(pi).Length(); } } */ for (int i = 0; i < seia.Size(); i++) { const Element2d & sel = mesh[seia[i]]; for (int j = 0; j < 3; j++) { PointIndex pi1 = sel.PNumMod(j+2); PointIndex pi2 = sel.PNumMod(j+3); // double loch = mesh.GetH(mesh[pi1]); INDEX_2 edge(pi1, pi2); edge.Sort(); if (mesh.IsSegment (pi1, pi2)) continue; /* if (segments.Used (edge)) continue; */ INDEX_2 ii2 (pi1, pi2); if (other.Used (ii2)) { // INDEX_2 i2s(ii2); // i2s.Sort(); int i2 = other.Get(ii2).tnr; int j2 = other.Get(ii2).sidenr; neighbors[seia[i]].SetNr (j, i2); neighbors[seia[i]].SetOrientation (j, j2); neighbors[i2].SetNr (j2, seia[i]); neighbors[i2].SetOrientation (j2, j); } else { other.Set (INDEX_2 (pi2, pi1), trionedge (seia[i], j)); } } } for (int i = 0; i < seia.Size(); i++) swapped[seia[i]] = 0; NgProfiler::StopTimer (timerstart); int t = 4; int done = 0; while (!done && t >= 2) { for (int i = 0; i < seia.Size(); i++) { SurfaceElementIndex t1 = seia[i]; if (mesh[t1].IsDeleted()) continue; if (mesh[t1].GetIndex() != faceindex) continue; if (multithread.terminate) throw NgException ("Meshing stopped"); for (int o1 = 0; o1 < 3; o1++) { bool should; SurfaceElementIndex t2 = neighbors[t1].GetNr (o1); int o2 = neighbors[t1].GetOrientation (o1); if (t2 == -1) continue; if (swapped[t1] || swapped[t2]) continue; PointIndex pi1 = mesh[t1].PNumMod(o1+1+1); PointIndex pi2 = mesh[t1].PNumMod(o1+1+2); PointIndex pi3 = mesh[t1].PNumMod(o1+1); PointIndex pi4 = mesh[t2].PNumMod(o2+1); PointGeomInfo gi1 = mesh[t1].GeomInfoPiMod(o1+1+1); PointGeomInfo gi2 = mesh[t1].GeomInfoPiMod(o1+1+2); PointGeomInfo gi3 = mesh[t1].GeomInfoPiMod(o1+1); PointGeomInfo gi4 = mesh[t2].GeomInfoPiMod(o2+1); bool allowswap = true; Vec<3> auxvec1 = mesh[pi3]-mesh[pi4]; Vec<3> auxvec2 = mesh[pi1]-mesh[pi4]; allowswap = allowswap && fabs(1.-(auxvec1*auxvec2)/(auxvec1.Length()*auxvec2.Length())) > 1e-4; if(!allowswap) continue; // normal of new Vec<3> nv1 = Cross (auxvec1, auxvec2); auxvec1 = mesh.Point(pi4)-mesh.Point(pi3); auxvec2 = mesh.Point(pi2)-mesh.Point(pi3); allowswap = allowswap && fabs(1.-(auxvec1*auxvec2)/(auxvec1.Length()*auxvec2.Length())) > 1e-4; if(!allowswap) continue; Vec<3> nv2 = Cross (auxvec1, auxvec2); // normals of original Vec<3> nv3 = Cross (mesh[pi1]-mesh[pi4], mesh[pi2]-mesh[pi4]); Vec<3> nv4 = Cross (mesh[pi2]-mesh[pi3], mesh[pi1]-mesh[pi3]); nv3 *= -1; nv4 *= -1; nv3.Normalize(); nv4.Normalize(); nv1.Normalize(); nv2.Normalize(); Vec<3> nvp3, nvp4; SelectSurfaceOfPoint (mesh.Point(pi3), gi3); GetNormalVector (surfnr, mesh.Point(pi3), gi3, nvp3); nvp3.Normalize(); SelectSurfaceOfPoint (mesh.Point(pi4), gi4); GetNormalVector (surfnr, mesh.Point(pi4), gi4, nvp4); nvp4.Normalize(); double critval = cos (M_PI / 6); // 30 degree allowswap = allowswap && (nv1 * nvp3 > critval) && (nv1 * nvp4 > critval) && (nv2 * nvp3 > critval) && (nv2 * nvp4 > critval) && (nvp3 * nv3 > critval) && (nvp4 * nv4 > critval); double horder = Dist (mesh.Point(pi1), mesh.Point(pi2)); if ( // nv1 * nv2 >= 0 && nv1.Length() > 1e-3 * horder * horder && nv2.Length() > 1e-3 * horder * horder && allowswap ) { if (!usemetric) { int e = pdef[pi1] + pdef[pi2] - pdef[pi3] - pdef[pi4]; double d = Dist2 (mesh.Point(pi1), mesh.Point(pi2)) - Dist2 (mesh.Point(pi3), mesh.Point(pi4)); should = e >= t && (e > 2 || d > 0); } else { double loch = mesh.GetH(mesh[pi1]); should = CalcTriangleBadness (mesh.Point(pi4), mesh.Point(pi3), mesh.Point(pi1), metricweight, loch) + CalcTriangleBadness (mesh.Point(pi3), mesh.Point(pi4), mesh.Point(pi2), metricweight, loch) < CalcTriangleBadness (mesh.Point(pi1), mesh.Point(pi2), mesh.Point(pi3), metricweight, loch) + CalcTriangleBadness (mesh.Point(pi2), mesh.Point(pi1), mesh.Point(pi4), metricweight, loch); } if (allowswap) { Element2d sw1 (pi4, pi3, pi1); Element2d sw2 (pi3, pi4, pi2); int legal1 = mesh.LegalTrig (mesh.SurfaceElement (t1)) + mesh.LegalTrig (mesh.SurfaceElement (t2)); int legal2 = mesh.LegalTrig (sw1) + mesh.LegalTrig (sw2); if (legal1 < legal2) should = 1; if (legal2 < legal1) should = 0; } if (should) { // do swapping ! done = 1; mesh[t1].PNum(1) = pi1; mesh[t1].PNum(2) = pi4; mesh[t1].PNum(3) = pi3; mesh[t2].PNum(1) = pi2; mesh[t2].PNum(2) = pi3; mesh[t2].PNum(3) = pi4; mesh[t1].GeomInfoPi(1) = gi1; mesh[t1].GeomInfoPi(2) = gi4; mesh[t1].GeomInfoPi(3) = gi3; mesh[t2].GeomInfoPi(1) = gi2; mesh[t2].GeomInfoPi(2) = gi3; mesh[t2].GeomInfoPi(3) = gi4; pdef[pi1]--; pdef[pi2]--; pdef[pi3]++; pdef[pi4]++; swapped[t1] = 1; swapped[t2] = 1; } } } } t--; } mesh.SetNextTimeStamp(); } void MeshOptimize2d :: CombineImprove (Mesh & mesh) { if (!faceindex) { PrintMessage (3, "Combine improve"); for (faceindex = 1; faceindex <= mesh.GetNFD(); faceindex++) { CombineImprove (mesh); if (multithread.terminate) throw NgException ("Meshing stopped"); } faceindex = 0; return; } static int timer = NgProfiler::CreateTimer ("Combineimprove 2D"); NgProfiler::RegionTimer reg (timer); static int timerstart = NgProfiler::CreateTimer ("Combineimprove 2D start"); NgProfiler::StartTimer (timerstart); static int timerstart1 = NgProfiler::CreateTimer ("Combineimprove 2D start1"); NgProfiler::StartTimer (timerstart1); // int i, j, k, l; // PointIndex pi; // SurfaceElementIndex sei; Array seia; mesh.GetSurfaceElementsOfFace (faceindex, seia); for (int i = 0; i < seia.Size(); i++) if (mesh[seia[i]].GetNP() != 3) return; int surfnr = 0; if (faceindex) surfnr = mesh.GetFaceDescriptor (faceindex).SurfNr(); // PointIndex pi1, pi2; // MeshPoint p1, p2, pnew; double bad1, bad2; Vec<3> nv; int np = mesh.GetNP(); //int nse = mesh.GetNSE(); TABLE elementsonnode(np); Array hasonepi, hasbothpi; for (int i = 0; i < seia.Size(); i++) { Element2d & el = mesh[seia[i]]; for (int j = 0; j < el.GetNP(); j++) elementsonnode.Add (el[j], seia[i]); } Array fixed(np); fixed = false; NgProfiler::StopTimer (timerstart1); /* for (SegmentIndex si = 0; si < mesh.GetNSeg(); si++) { INDEX_2 i2(mesh[si][0], mesh[si][1]); fixed[i2.I1()] = true; fixed[i2.I2()] = true; } */ for (int i = 0; i < seia.Size(); i++) { Element2d & sel = mesh[seia[i]]; for (int j = 0; j < sel.GetNP(); j++) { PointIndex pi1 = sel.PNumMod(j+2); PointIndex pi2 = sel.PNumMod(j+3); if (mesh.IsSegment (pi1, pi2)) { fixed[pi1] = true; fixed[pi2] = true; } } } for(int i = 0; i < mesh.LockedPoints().Size(); i++) fixed[mesh.LockedPoints()[i]] = true; Array,PointIndex::BASE> normals(np); for (PointIndex pi = mesh.Points().Begin(); pi < mesh.Points().End(); pi++) { if (elementsonnode[pi].Size()) { Element2d & hel = mesh[elementsonnode[pi][0]]; for (int k = 0; k < 3; k++) if (hel[k] == pi) { SelectSurfaceOfPoint (mesh[pi], hel.GeomInfoPi(k+1)); GetNormalVector (surfnr, mesh[pi], hel.GeomInfoPi(k+1), normals[pi]); break; } } } NgProfiler::StopTimer (timerstart); for (int i = 0; i < seia.Size(); i++) { SurfaceElementIndex sei = seia[i]; Element2d & elem = mesh[sei]; if (elem.IsDeleted()) continue; for (int j = 0; j < 3; j++) { PointIndex pi1 = elem[j]; PointIndex pi2 = elem[(j+1) % 3]; if (pi1 < PointIndex::BASE || pi2 < PointIndex::BASE) continue; /* INDEX_2 i2(pi1, pi2); i2.Sort(); if (segmentht.Used(i2)) continue; */ bool debugflag = 0; if (debugflag) { (*testout) << "Combineimprove, face = " << faceindex << "pi1 = " << pi1 << " pi2 = " << pi2 << endl; } /* // save version: if (fixed.Get(pi1) || fixed.Get(pi2)) continue; if (pi2 < pi1) swap (pi1, pi2); */ // more general if (fixed[pi2]) Swap (pi1, pi2); if (fixed[pi2]) continue; double loch = mesh.GetH (mesh[pi1]); INDEX_2 si2 (pi1, pi2); si2.Sort(); /* if (edgetested.Used (si2)) continue; edgetested.Set (si2, 1); */ hasonepi.SetSize(0); hasbothpi.SetSize(0); for (int k = 0; k < elementsonnode[pi1].Size(); k++) { const Element2d & el2 = mesh[elementsonnode[pi1][k]]; if (el2.IsDeleted()) continue; if (el2[0] == pi2 || el2[1] == pi2 || el2[2] == pi2) { hasbothpi.Append (elementsonnode[pi1][k]); nv = Cross (Vec3d (mesh[el2[0]], mesh[el2[1]]), Vec3d (mesh[el2[0]], mesh[el2[2]])); } else { hasonepi.Append (elementsonnode[pi1][k]); } } Element2d & hel = mesh[hasbothpi[0]]; for (int k = 0; k < 3; k++) if (hel[k] == pi1) { SelectSurfaceOfPoint (mesh[pi1], hel.GeomInfoPi(k+1)); GetNormalVector (surfnr, mesh[pi1], hel.GeomInfoPi(k+1), nv); break; } // nv = normals.Get(pi1); for (int k = 0; k < elementsonnode[pi2].Size(); k++) { const Element2d & el2 = mesh[elementsonnode[pi2][k]]; if (el2.IsDeleted()) continue; if (el2[0] == pi1 || el2[1] == pi1 || el2[2] == pi1) ; else hasonepi.Append (elementsonnode[pi2][k]); } bad1 = 0; int illegal1 = 0, illegal2 = 0; for (int k = 0; k < hasonepi.Size(); k++) { const Element2d & el = mesh[hasonepi[k]]; bad1 += CalcTriangleBadness (mesh[el[0]], mesh[el[1]], mesh[el[2]], nv, -1, loch); illegal1 += 1-mesh.LegalTrig(el); } for (int k = 0; k < hasbothpi.Size(); k++) { const Element2d & el = mesh[hasbothpi[k]]; bad1 += CalcTriangleBadness (mesh[el[0]], mesh[el[1]], mesh[el[2]], nv, -1, loch); illegal1 += 1-mesh.LegalTrig(el); } bad1 /= (hasonepi.Size()+hasbothpi.Size()); MeshPoint p1 = mesh[pi1]; MeshPoint p2 = mesh[pi2]; MeshPoint pnew = p1; mesh[pi1] = pnew; mesh[pi2] = pnew; bad2 = 0; for (int k = 0; k < hasonepi.Size(); k++) { Element2d & el = mesh[hasonepi[k]]; double err = CalcTriangleBadness (mesh[el[0]], mesh[el[1]], mesh[el[2]], nv, -1, loch); bad2 += err; Vec<3> hnv = Cross (Vec3d (mesh[el[0]], mesh[el[1]]), Vec3d (mesh[el[0]], mesh[el[2]])); if (hnv * nv < 0) bad2 += 1e10; for (int l = 0; l < 3; l++) if ( (normals[el[l]] * nv) < 0.5) bad2 += 1e10; illegal2 += 1-mesh.LegalTrig(el); } bad2 /= hasonepi.Size(); mesh[pi1] = p1; mesh[pi2] = p2; if (debugflag) { (*testout) << "bad1 = " << bad1 << ", bad2 = " << bad2 << endl; } bool should = (bad2 < bad1 && bad2 < 1e4); if (bad2 < 1e4) { if (illegal1 > illegal2) should = 1; if (illegal2 > illegal1) should = 0; } if (should) { /* (*testout) << "combine !" << endl; (*testout) << "bad1 = " << bad1 << ", bad2 = " << bad2 << endl; (*testout) << "illegal1 = " << illegal1 << ", illegal2 = " << illegal2 << endl; (*testout) << "loch = " << loch << endl; */ mesh[pi1] = pnew; PointGeomInfo gi; // bool gi_set(false); Element2d *el1p(NULL); int l = 0; while(mesh[elementsonnode[pi1][l]].IsDeleted() && lGetNP(); l++) if ((*el1p)[l] == pi1) { gi = el1p->GeomInfoPi (l+1); // gi_set = true; } // (*testout) << "Connect point " << pi2 << " to " << pi1 << "\n"; for (int k = 0; k < elementsonnode[pi2].Size(); k++) { Element2d & el = mesh[elementsonnode[pi2][k]]; if(el.IsDeleted()) continue; elementsonnode.Add (pi1, elementsonnode[pi2][k]); bool haspi1 = 0; for (l = 0; l < el.GetNP(); l++) if (el[l] == pi1) haspi1 = 1; if (haspi1) continue; for (int l = 0; l < el.GetNP(); l++) { if (el[l] == pi2) { el[l] = pi1; el.GeomInfoPi (l+1) = gi; } fixed[el[l]] = true; } } /* for (k = 0; k < hasbothpi.Size(); k++) { cout << mesh[hasbothpi[k]] << endl; for (l = 0; l < 3; l++) cout << mesh[mesh[hasbothpi[k]][l]] << " "; cout << endl; } */ for (int k = 0; k < hasbothpi.Size(); k++) { mesh[hasbothpi[k]].Delete(); /* for (l = 0; l < 4; l++) mesh[hasbothpi[k]][l] = PointIndex::BASE-1; */ } } } } // mesh.Compress(); mesh.SetNextTimeStamp(); } void MeshOptimize2d :: CheckMeshApproximation (Mesh & mesh) { // Check angles between elements and normals at corners /* int i, j; int ne = mesh.GetNSE(); int surfnr; Vec3d n, ng; Array ngs(3); (*mycout) << "Check Surface Approximation" << endl; (*testout) << "Check Surface Approximation" << endl; for (i = 1; i <= ne; i++) { const Element2d & el = mesh.SurfaceElement(i); surfnr = mesh.GetFaceDescriptor (el.GetIndex()).SurfNr(); Vec3d n = Cross (mesh.Point (el.PNum(1)) - mesh.Point (el.PNum(2)), mesh.Point (el.PNum(1)) - mesh.Point (el.PNum(3))); n /= n.Length(); for (j = 1; j <= el.GetNP(); j++) { SelectSurfaceOfPoint (mesh.Point(el.PNum(j)), el.GeomInfoPi(j)); GetNormalVector (surfnr, mesh.Point(el.PNum(j)), ng); ng /= ng.Length(); ngs.Elem(j) = ng; double angle = (180.0 / M_PI) * Angle (n, ng); if (angle > 60) { (*testout) << "el " << i << " node " << el.PNum(j) << "has angle = " << angle << endl; } } for (j = 1; j <= 3; j++) { double angle = (180.0 / M_PI) * Angle (ngs.Get(j), ngs.Get(j%3+1)); if (angle > 60) { (*testout) << "el " << i << " node-node " << ngs.Get(j) << " - " << ngs.Get(j%3+1) << " has angle = " << angle << endl; } } } */ } } netgen-6.2.1804/libsrc/meshing/smoothing2.5.cpp0000644000175000017500000001202213272137567017652 0ustar kurtkurt#include #include "meshing.hpp" #include namespace netgen { void MeshOptimize2d :: ProjectBoundaryPoints(Array & surfaceindex, const Array* > & from, Array* > & dest) { for(int i=0; i= 0) { *dest[i] = *from[i]; ProjectPoint(surfaceindex[i],*dest[i]); } } } void MeshOptimize2d :: ImproveVolumeMesh (Mesh & mesh) { if (!faceindex) { PrintMessage (3, "Smoothing"); for (faceindex = 1; faceindex <= mesh.GetNFD(); faceindex++) { ImproveVolumeMesh (mesh); if (multithread.terminate) throw NgException ("Meshing stopped"); } faceindex = 0; return; } static int timer = NgProfiler::CreateTimer ("MeshSmoothing 2D"); NgProfiler::RegionTimer reg (timer); CheckMeshApproximation (mesh); int i, j, k; SurfaceElementIndex sei; Array seia; mesh.GetSurfaceElementsOfFace (faceindex, seia); /* bool mixed = 0; for (i = 0; i < seia.Size(); i++) if (mesh[seia[i]].GetNP() != 3) { mixed = 1; break; } */ int loci; double fact; bool moveisok; PointGeomInfo ngi; Point<3> origp; Vector x(3); Array savepoints(mesh.GetNP()); Array nelementsonpoint(mesh.GetNP()); nelementsonpoint = 0; for (i = 0; i < seia.Size(); i++) { const Element2d & el = mesh[seia[i]]; for (j = 0; j < el.GetNP(); j++) nelementsonpoint[el[j]]++; } TABLE elementsonpoint(nelementsonpoint); for (i = 0; i < seia.Size(); i++) { const Element2d & el = mesh[seia[i]]; for (j = 0; j < el.GetNP(); j++) elementsonpoint.Add (el[j], seia[i]); } JacobianPointFunction pf(mesh.Points(),mesh.VolumeElements()); // Opti2SurfaceMinFunction surfminf(mesh); // Opti2EdgeMinFunction edgeminf(mesh); // Opti2SurfaceMinFunctionJacobian surfminfj(mesh); OptiParameters par; par.maxit_linsearch = 8; par.maxit_bfgs = 5; int np = mesh.GetNP(); int ne = mesh.GetNE(); BitArray badnodes(np); badnodes.Clear(); for (i = 1; i <= ne; i++) { const Element & el = mesh.VolumeElement(i); double bad = el.CalcJacobianBadness (mesh.Points()); if (bad > 1) for (j = 1; j <= el.GetNP(); j++) badnodes.Set (el.PNum(j)); } bool printeddot = 0; char plotchar = '.'; int modplot = 1; if (mesh.GetNP() > 1000) { plotchar = '+'; modplot = 10; } if (mesh.GetNP() > 10000) { plotchar = 'o'; modplot = 100; } int cnt = 0; Array locelements(0); Array locrots(0); for (PointIndex pi = mesh.Points().Begin(); pi < mesh.Points().End(); pi++) { if (mesh[pi].Type() != SURFACEPOINT) continue; if (multithread.terminate) throw NgException ("Meshing stopped"); int surfi(-1); if(elementsonpoint[pi].Size() == 0) continue; Element2d & hel = mesh[elementsonpoint[pi][0]]; if(hel.GetIndex() != faceindex) continue; cnt++; if (cnt % modplot == 0 && writestatus) { printeddot = 1; PrintDot (plotchar); } int hpi = 0; for (j = 1; j <= hel.GetNP(); j++) if (hel.PNum(j) == pi) { hpi = j; break; } PointGeomInfo gi1 = hel.GeomInfoPi(hpi); locelements.SetSize(0); locrots.SetSize (0); for (j = 0; j < elementsonpoint[pi].Size(); j++) { sei = elementsonpoint[pi][j]; const Element2d & bel = mesh[sei]; surfi = mesh.GetFaceDescriptor(bel.GetIndex()).SurfNr(); locelements.Append (sei); for (k = 1; k <= bel.GetNP(); k++) if (bel.PNum(k) == pi) { locrots.Append (k); break; } } double lh = mesh.GetH(mesh.Point(pi)); par.typx = lh; pf.SetPointIndex(pi); x = 0; bool pok = (pf.Func (x) < 1e10); if (pok) { BFGS (x, pf, par); origp = mesh[pi]; loci = 1; fact = 1; moveisok = false; //optimizer loop (if whole distance is not possible, move only a bit!!!!) while (loci <= 5 && !moveisok) { loci ++; mesh[pi](0) = origp(0) + x(0)*fact; mesh[pi](1) = origp(1) + x(1)*fact; mesh[pi](2) = origp(2) + x(2)*fact; fact = fact/2.; //cout << "origp " << origp << " newp " << mesh[pi]; ngi = gi1; moveisok = (ProjectPointGI (surfi, mesh[pi], ngi) != 0); //cout << " projected " << mesh[pi] << endl; // point lies on same chart in stlsurface if (moveisok) { for (j = 0; j < locelements.Size(); j++) mesh[locelements[j]].GeomInfoPi(locrots[j]) = ngi; //cout << "moved " << origp << " to " << mesh[pi] << endl; } else { mesh[pi] = origp; } } } else { cout << "el not ok (point " << pi << ": " << mesh[pi] << ")" << endl; } } if (printeddot) PrintDot ('\n'); CheckMeshApproximation (mesh); mesh.SetNextTimeStamp(); } } netgen-6.2.1804/libsrc/meshing/refine.cpp0000644000175000017500000005137213272137567016701 0ustar kurtkurt#include #include "meshing.hpp" namespace netgen { void Refinement :: Refine (Mesh & mesh) const { const_cast (*this).Refine(mesh); } void Refinement :: Refine (Mesh & mesh) { PrintMessage (3, "Refine mesh"); if (ntasks > 1 && id == 0) return; // reduce 2nd order mesh.ComputeNVertices(); mesh.SetNP(mesh.GetNV()); if (mesh.mlbetweennodes.Size() < mesh.GetNV()) { mesh.mlbetweennodes.SetSize(mesh.GetNV()); mesh.mlbetweennodes = INDEX_2(PointIndex::BASE-1,PointIndex::BASE-1); } INDEX_2_HASHTABLE between(mesh.GetNP() + 5); // new version with consistent ordering across sub-domains Array parents; for (SegmentIndex si = 0; si < mesh.GetNSeg(); si++) { const Segment & el = mesh[si]; INDEX_2 i2 = INDEX_2::Sort(el[0], el[1]); if (!between.Used(i2)) { between.Set (i2, 0); parents.Append(i2); } } for (SurfaceElementIndex sei = 0; sei < mesh.GetNSE(); sei++) { const Element2d & el = mesh[sei]; switch (el.GetType()) { case TRIG: case TRIG6: { static int betw[3][3] = { { 1, 2, 3 }, { 0, 2, 4 }, { 0, 1, 5 } }; for (int j = 0; j < 3; j++) { auto i2 = PointIndices<2>::Sort(el[betw[j][0]],el[betw[j][1]]); if (!between.Used(i2)) { between.Set (i2, 0); parents.Append(i2); } } break; } default: throw NgException ("currently refinement for quad-elements is not supported"); } } for (ElementIndex ei = 0; ei < mesh.GetNE(); ei++) { const Element & el = mesh[ei]; switch (el.GetType()) { case TET: case TET10: { static int betw[6][3] = { { 1, 2, 5 }, { 1, 3, 6 }, { 1, 4, 7 }, { 2, 3, 8 }, { 2, 4, 9 }, { 3, 4, 10 } }; for (int j = 0; j < 6; j++) { INDEX_2 i2 = INDEX_2::Sort(el.PNum(betw[j][0]),el.PNum(betw[j][1])); if (!between.Used(i2)) { between.Set (i2, 0); parents.Append(i2); } } break; } default: throw NgException ("currently refinement for non-tet elements is not supported"); } } PrintMessage (5, "have points"); Array par_nr(parents.Size()); for (int i = 0; i < par_nr.Size(); i++) par_nr[i] = i; QuickSort (parents, par_nr); mesh.mlbetweennodes.SetSize(mesh.GetNV()+parents.Size()); for (int i = 0; i < parents.Size(); i++) { between.Set (parents[i], mesh.GetNV()+i+PointIndex::BASE); mesh.mlbetweennodes[mesh.GetNV()+i+PointIndex::BASE] = parents[i]; } mesh.SetNP(mesh.GetNV() + parents.Size()); Array pointset(mesh.GetNP()); pointset = false; PrintMessage (5, "sorting complete"); // refine edges Array epgi; int oldns = mesh.GetNSeg(); for (SegmentIndex si = 0; si < oldns; si++) { const Segment & el = mesh.LineSegment(si); INDEX_2 i2 = INDEX_2::Sort(el[0], el[1]); PointIndex pinew = between.Get(i2); EdgePointGeomInfo ngi; if (pointset[pinew]) { // pinew = between.Get(i2); ngi = epgi[pinew]; } else { pointset[pinew] = true; Point<3> pnew; PointBetween (mesh.Point (el[0]), mesh.Point (el[1]), 0.5, el.surfnr1, el.surfnr2, el.epgeominfo[0], el.epgeominfo[1], pnew, ngi); // pinew = mesh.AddPoint (pnew); mesh.Point(pinew) = pnew; // between.Set (i2, pinew); if (pinew >= epgi.Size()+PointIndex::BASE) epgi.SetSize (pinew+1-PointIndex::BASE); epgi[pinew] = ngi; } Segment ns1 = el; Segment ns2 = el; ns1[1] = pinew; ns1.epgeominfo[1] = ngi; ns2[0] = pinew; ns2.epgeominfo[0] = ngi; mesh.LineSegment(si) = ns1; mesh.AddSegment (ns2); } PrintMessage (5, "have 1d elements"); // refine surface elements Array surfgi (8*mesh.GetNP()); for (int i = PointIndex::BASE; i < surfgi.Size()+PointIndex::BASE; i++) surfgi[i].trignum = -1; int oldnf = mesh.GetNSE(); for (SurfaceElementIndex sei = 0; sei < oldnf; sei++) { const Element2d & el = mesh.SurfaceElement(sei); switch (el.GetType()) { case TRIG: case TRIG6: { ArrayMem pnums(6); ArrayMem pgis(6); static int betw[3][3] = { { 2, 3, 4 }, { 1, 3, 5 }, { 1, 2, 6 } }; for (int j = 1; j <= 3; j++) { pnums.Elem(j) = el.PNum(j); pgis.Elem(j) = el.GeomInfoPi(j); } for (int j = 0; j < 3; j++) { PointIndex pi1 = pnums.Elem(betw[j][0]); PointIndex pi2 = pnums.Elem(betw[j][1]); INDEX_2 i2 (pi1, pi2); i2.Sort(); Point<3> pb; PointGeomInfo pgi; PointBetween (mesh.Point (pi1), mesh.Point (pi2), 0.5, mesh.GetFaceDescriptor(el.GetIndex ()).SurfNr(), el.GeomInfoPi (betw[j][0]), el.GeomInfoPi (betw[j][1]), pb, pgi); pgis.Elem(4+j) = pgi; PointIndex pinew = between.Get(i2); pnums.Elem(4+j) = pinew; if (!pointset[pinew]) { pointset[pinew] = true; mesh.Point(pinew) = pb; } /* if (between.Used(i2)) pnums.Elem(4+j) = between.Get(i2); else { pnums.Elem(4+j) = mesh.AddPoint (pb); between.Set (i2, pnums.Get(4+j)); } */ if (surfgi.Size() < pnums.Elem(4+j)) surfgi.SetSize (pnums.Elem(4+j)); surfgi.Elem(pnums.Elem(4+j)) = pgis.Elem(4+j); } static int reftab[4][3] = { { 1, 6, 5 }, { 2, 4, 6 }, { 3, 5, 4 }, { 6, 4, 5 } }; int ind = el.GetIndex(); for (int j = 0; j < 4; j++) { Element2d nel(TRIG); for (int k = 1; k <= 3; k++) { nel.PNum(k) = pnums.Get(reftab[j][k-1]); nel.GeomInfoPi(k) = pgis.Get(reftab[j][k-1]); } nel.SetIndex(ind); if (j == 0) mesh.SurfaceElement(sei) = nel; else mesh.AddSurfaceElement(nel); } break; } case QUAD: case QUAD6: case QUAD8: { ArrayMem pnums(9); ArrayMem pgis(9); static int betw[5][3] = { { 1, 2, 5 }, { 2, 3, 6 }, { 3, 4, 7 }, { 1, 4, 8 }, { 5, 7, 9 } }; for (int j = 1; j <= 4; j++) { pnums.Elem(j) = el.PNum(j); pgis.Elem(j) = el.GeomInfoPi(j); } for (int j = 0; j < 5; j++) { int pi1 = pnums.Elem(betw[j][0]); int pi2 = pnums.Elem(betw[j][1]); INDEX_2 i2 (pi1, pi2); i2.Sort(); if (between.Used(i2)) { pnums.Elem(5+j) = between.Get(i2); pgis.Elem(5+j) = surfgi.Get(pnums.Elem(4+j)); } else { Point<3> pb; PointBetween (mesh.Point (pi1), mesh.Point (pi2), 0.5, mesh.GetFaceDescriptor(el.GetIndex ()).SurfNr(), el.GeomInfoPi (betw[j][0]), el.GeomInfoPi (betw[j][1]), pb, pgis.Elem(5+j)); pnums.Elem(5+j) = mesh.AddPoint (pb); between.Set (i2, pnums.Get(5+j)); if (surfgi.Size() < pnums.Elem(5+j)) surfgi.SetSize (pnums.Elem(5+j)); surfgi.Elem(pnums.Elem(5+j)) = pgis.Elem(5+j); } } static int reftab[4][4] = { { 1, 5, 9, 8 }, { 5, 2, 6, 9 }, { 8, 9, 7, 4 }, { 9, 6, 3, 7 } }; int ind = el.GetIndex(); for (int j = 0; j < 4; j++) { Element2d nel(QUAD); for (int k = 1; k <= 4; k++) { nel.PNum(k) = pnums.Get(reftab[j][k-1]); nel.GeomInfoPi(k) = pgis.Get(reftab[j][k-1]); } nel.SetIndex(ind); if (j == 0) mesh.SurfaceElement(sei) = nel; else mesh.AddSurfaceElement(nel); } break; } default: PrintSysError ("Refine: undefined surface element type ", int(el.GetType())); } } PrintMessage (5, "have 2d elements"); // cout << "id = " << id << ", ne = " << mesh.GetNE() << endl; // refine volume elements int oldne = mesh.GetNE(); mesh.VolumeElements().SetAllocSize(8*oldne); for (ElementIndex ei = 0; ei < oldne; ei++) { const Element & el = mesh.VolumeElement(ei); switch (el.GetType()) { case TET: case TET10: { ArrayMem pnums(10); static int betw[6][3] = { { 1, 2, 5 }, { 1, 3, 6 }, { 1, 4, 7 }, { 2, 3, 8 }, { 2, 4, 9 }, { 3, 4, 10 } }; int elrev = el.flags.reverse; for (int j = 1; j <= 4; j++) pnums.Elem(j) = el.PNum(j); if (elrev) swap (pnums.Elem(3), pnums.Elem(4)); for (int j = 0; j < 6; j++) { PointIndex pi1 = pnums.Get(betw[j][0]); PointIndex pi2 = pnums.Get(betw[j][1]); INDEX_2 i2 (pi1, pi2); i2.Sort(); /* if (between.Used(i2)) pnums.Elem(5+j) = between.Get(i2); else { pnums.Elem(5+j) = mesh.AddPoint (Center (mesh.Point(i2.I1()), mesh.Point(i2.I2()))); between.Set (i2, pnums.Elem(5+j)); } */ PointIndex pinew = between.Get(i2); pnums.Elem(j+5) = pinew; if (!pointset[pinew]) { pointset[pinew] = true; mesh.Point(pinew) = Center(mesh.Point(pi1), mesh.Point(pi2)); } } static int reftab[8][4] = { { 1, 5, 6, 7 }, { 5, 2, 8, 9 }, { 6, 8, 3, 10 }, { 7, 9, 10, 4 }, { 5, 6, 7, 9 }, { 5, 6, 9, 8 }, { 6, 7, 9, 10 }, { 6, 8, 10, 9 } }; /* { { 1, 5, 6, 7 }, { 5, 2, 8, 9 }, { 6, 8, 3, 10 }, { 7, 9, 10, 4 }, { 5, 6, 7, 9 }, { 5, 6, 8, 9 }, { 6, 7, 9, 10 }, { 6, 8, 9, 10 } }; */ static bool reverse[8] = { false, false, false, false, false, true, false, true }; int ind = el.GetIndex(); for (int j = 0; j < 8; j++) { Element nel(TET); for (int k = 1; k <= 4; k++) nel.PNum(k) = pnums.Get(reftab[j][k-1]); nel.SetIndex(ind); nel.flags.reverse = reverse[j]; if (elrev) { nel.flags.reverse = !nel.flags.reverse; swap (nel.PNum(3), nel.PNum(4)); } if (j == 0) mesh.VolumeElement(ei) = nel; else mesh.AddVolumeElement (nel); } break; } case HEX: { ArrayMem pnums(27); static int betw[13][3] = { { 1, 2, 9 }, { 3, 4, 10 }, { 4, 1, 11 }, { 2, 3, 12 }, { 5, 6, 13 }, { 7, 8, 14 }, { 8, 5, 15 }, { 6, 7, 16 }, { 1, 5, 17 }, { 2, 6, 18 }, { 3, 7, 19 }, { 4, 8, 20 }, { 2, 8, 21 }, }; /* static int fbetw[12][3] = { { 1, 3, 22 }, { 2, 4, 22 }, { 5, 7, 23 }, { 6, 8, 23 }, { 1, 6, 24 }, { 2, 5, 24 }, { 2, 7, 25 }, { 3, 6, 25 }, { 3, 8, 26 }, { 4, 7, 26 }, { 1, 8, 27 }, { 4, 5, 27 }, }; */ // updated by anonymous supporter, donations please to Karo W. static int fbetw[12][3] = { { 11, 12, 22 }, { 9, 10, 22 }, { 13, 14, 23 }, { 15, 16, 23 }, { 9, 13, 24 }, { 17, 18, 24 }, { 12, 16, 25 }, { 18, 19, 25 }, { 19, 20, 26 }, { 10, 14, 26 }, { 11, 15, 27 }, { 17, 20, 27 }, }; pnums = PointIndex(-1); for (int j = 1; j <= 8; j++) pnums.Elem(j) = el.PNum(j); for (int j = 0; j < 13; j++) { INDEX_2 i2; i2.I1() = pnums.Get(betw[j][0]); i2.I2() = pnums.Get(betw[j][1]); i2.Sort(); if (between.Used(i2)) pnums.Elem(9+j) = between.Get(i2); else { pnums.Elem(9+j) = mesh.AddPoint (Center (mesh.Point(i2.I1()), mesh.Point(i2.I2()))); between.Set (i2, pnums.Elem(9+j)); } } for (int j = 0; j < 6; j++) { INDEX_2 i2a, i2b; i2a.I1() = pnums.Get(fbetw[2*j][0]); i2a.I2() = pnums.Get(fbetw[2*j][1]); i2a.Sort(); i2b.I1() = pnums.Get(fbetw[2*j+1][0]); i2b.I2() = pnums.Get(fbetw[2*j+1][1]); i2b.Sort(); if (between.Used(i2a)) pnums.Elem(22+j) = between.Get(i2a); else if (between.Used(i2b)) pnums.Elem(22+j) = between.Get(i2b); else { pnums.Elem(22+j) = mesh.AddPoint (Center (mesh.Point(i2a.I1()), mesh.Point(i2a.I2()))); between.Set (i2a, pnums.Elem(22+j)); } } static int reftab[8][8] = { { 1, 9, 22, 11, 17, 24, 21, 27 }, { 9, 2, 12, 22, 24, 18, 25, 21 }, { 11, 22, 10, 4, 27, 21, 26, 20}, { 22, 12, 3, 10, 21, 25, 19, 26}, { 17, 24, 21, 27, 5, 13, 23, 15}, { 24, 18, 25, 21, 13, 6, 16, 23}, { 27, 21, 26, 20, 15, 23, 14, 8}, { 21, 25, 19, 26, 23, 16, 7, 14} }; int ind = el.GetIndex(); for (int j = 0; j < 8; j++) { Element nel(HEX); for (int k = 1; k <= 8; k++) nel.PNum(k) = pnums.Get(reftab[j][k-1]); nel.SetIndex(ind); if (j == 0) mesh.VolumeElement(ei) = nel; else mesh.AddVolumeElement (nel); } break; } case PRISM: { ArrayMem pnums(18); static int betw[9][3] = { { 3, 1, 7 }, { 1, 2, 8 }, { 3, 2, 9 }, { 6, 4, 10 }, { 4, 5, 11 }, { 6, 5, 12 }, { 1, 4, 13 }, { 3, 6, 14 }, { 2, 5, 15 }, }; // he: 15.jul 08, old version is wrong // produces double points ad quad faces and inconsistent mesh // static int fbetw[6][3] = // { { 1, 6, 16 }, // { 3, 4, 16 }, // { 1, 5, 17 }, // { 2, 4, 17 }, // { 2, 6, 18 }, // { 3, 5, 18 }, // }; static int fbetw[6][3] = { { 7, 10, 16 }, { 14, 13, 16 }, { 11, 8, 17 }, { 13, 15, 17 }, { 12, 9, 18 }, { 14, 15, 18 }, }; //int elrev = el.flags.reverse; pnums = PointIndex(-1); for (int j = 1; j <= 6; j++) pnums.Elem(j) = el.PNum(j); // if (elrev) // swap (pnums.Elem(3), pnums.Elem(4)); for (int j = 0; j < 9; j++) { INDEX_2 i2; i2.I1() = pnums.Get(betw[j][0]); i2.I2() = pnums.Get(betw[j][1]); i2.Sort(); if (between.Used(i2)) pnums.Elem(7+j) = between.Get(i2); else { pnums.Elem(7+j) = mesh.AddPoint (Center (mesh.Point(i2.I1()), mesh.Point(i2.I2()))); between.Set (i2, pnums.Elem(7+j)); } } for (int j = 0; j < 3; j++) { INDEX_2 i2a, i2b; i2a.I1() = pnums.Get(fbetw[2*j][0]); i2a.I2() = pnums.Get(fbetw[2*j][1]); i2a.Sort(); i2b.I1() = pnums.Get(fbetw[2*j+1][0]); i2b.I2() = pnums.Get(fbetw[2*j+1][1]); i2b.Sort(); if (between.Used(i2a)) pnums.Elem(16+j) = between.Get(i2a); else if (between.Used(i2b)) pnums.Elem(16+j) = between.Get(i2b); else { pnums.Elem(16+j) = mesh.AddPoint (Center (mesh.Point(i2a.I1()), mesh.Point(i2a.I2()))); between.Set (i2a, pnums.Elem(16+j)); } } static int reftab[8][6] = { { 1, 8, 7, 13, 17, 16 }, { 7, 8, 9, 16, 17, 18 }, { 7, 9, 3, 16, 18, 14 }, { 8, 2, 9, 17, 15, 18 }, { 13, 17, 16, 4, 11, 10 }, { 16, 17, 18, 10, 11, 12 }, { 16, 18, 14, 10, 12, 6 }, { 17, 15, 18, 11, 5, 12 } }; int ind = el.GetIndex(); for (int j = 0; j < 8; j++) { Element nel(PRISM); for (int k = 1; k <= 6; k++) nel.PNum(k) = pnums.Get(reftab[j][k-1]); nel.SetIndex(ind); //nel.flags.reverse = reverse[j]; //if (elrev) // { //nel.flags.reverse = 1 - nel.flags.reverse; //swap (nel.PNum(3), nel.PNum(4)); if (j == 0) mesh.VolumeElement(ei) = nel; else mesh.AddVolumeElement (nel); } break; } default: PrintSysError ("Refine: undefined volume element type ", int(el.GetType())); } } // update identification tables for (int i = 1; i <= mesh.GetIdentifications().GetMaxNr(); i++) { Array identmap; mesh.GetIdentifications().GetMap (i, identmap); for (int j = 1; j <= between.GetNBags(); j++) for (int k = 1; k <= between.GetBagSize(j); k++) { INDEX_2 i2; PointIndex newpi; between.GetData (j, k, i2, newpi); INDEX_2 oi2(identmap.Get(i2.I1()), identmap.Get(i2.I2())); oi2.Sort(); if (between.Used (oi2)) { PointIndex onewpi = between.Get(oi2); mesh.GetIdentifications().Add (newpi, onewpi, i); } } } PrintMessage (5, "have 3d elements"); mesh.ComputeNVertices(); mesh.RebuildSurfaceElementLists(); PrintMessage (5, "mesh updates complete"); return; int cnttrials = 10; int wrongels = 0; for (int i = 1; i <= mesh.GetNE(); i++) if (mesh.VolumeElement(i).Volume(mesh.Points()) < 0) { wrongels++; mesh.VolumeElement(i).flags.badel = 1; } else mesh.VolumeElement(i).flags.badel = 0; if (wrongels) { cout << "WARNING: " << wrongels << " with wrong orientation found" << endl; int np = mesh.GetNP(); Array > should(np); Array > can(np); for (int i = 1; i <= np; i++) { should.Elem(i) = can.Elem(i) = mesh.Point(i); } for (int i = 1; i <= between.GetNBags(); i++) for (int j = 1; j <= between.GetBagSize(i); j++) { INDEX_2 parent; PointIndex child; between.GetData (i, j, parent, child); can.Elem(child) = Center (can.Elem(parent.I1()), can.Elem(parent.I2())); } BitArray boundp(np); boundp.Clear(); for (auto & sel : mesh.SurfaceElements()) for (auto pi : sel.PNums()) boundp.Set(pi); double lam = 0.5; while (lam < 0.9 && cnttrials > 0) { lam = 2; do { lam *= 0.5; cnttrials--; cout << "lam = " << lam << endl; for (int i = 1; i <= np; i++) if (boundp.Test(i)) { for (int j = 0; j < 3; j++) mesh.Point(i)(j) = lam * should.Get(i)(j) + (1-lam) * can.Get(i)(j); } else mesh.Point(i) = can.Get(i); BitArray free (mesh.GetNP()), fhelp(mesh.GetNP()); free.Clear(); for (int i = 1; i <= mesh.GetNE(); i++) { const Element & el = mesh.VolumeElement(i); if (el.Volume(mesh.Points()) < 0) for (int j = 1; j <= el.GetNP(); j++) free.Set (el.PNum(j)); } for (int k = 1; k <= 3; k++) { fhelp.Clear(); for (int i = 1; i <= mesh.GetNE(); i++) { const Element & el = mesh.VolumeElement(i); int freeel = 0; for (int j = 1; j <= el.GetNP(); j++) if (free.Test(el.PNum(j))) freeel = 1; if (freeel) for (int j = 1; j <= el.GetNP(); j++) fhelp.Set (el.PNum(j)); } free.Or (fhelp); } (*testout) << "smooth points: " << endl; for (int i = 1; i <= free.Size(); i++) if (free.Test(i)) (*testout) << "p " << i << endl; (*testout) << "surf points: " << endl; for (auto & sel : mesh.SurfaceElements()) for (auto pi : sel.PNums()) (*testout) << pi << endl; mesh.CalcSurfacesOfNode(); free.Invert(); mesh.FixPoints (free); MeshingParameters dummymp; mesh.ImproveMesh (dummymp, OPT_REST); wrongels = 0; for (int i = 1; i <= mesh.GetNE(); i++) { if (mesh.VolumeElement(i).Volume(mesh.Points()) < 0) { wrongels++; mesh.VolumeElement(i).flags.badel = 1; (*testout) << "wrong el: "; for (int j = 1; j <= 4; j++) (*testout) << mesh.VolumeElement(i).PNum(j) << " "; (*testout) << endl; } else mesh.VolumeElement(i).flags.badel = 0; } cout << "wrongels = " << wrongels << endl; } while (wrongels && cnttrials > 0); for (int i = 1; i <= np; i++) can.Elem(i) = mesh.Point(i); } } if (cnttrials <= 0) { cerr << "ERROR: Sorry, reverted elements" << endl; } mesh.ComputeNVertices(); } } netgen-6.2.1804/libsrc/meshing/pyramidrls.cpp0000644000175000017500000001003713272137567017610 0ustar kurtkurtnamespace netgen { const char * pyramidrules[] = { "tolfak 0.5\n",\ "\n",\ "rule \"Pyramid on quad\"\n",\ "\n",\ "quality 100\n",\ "\n",\ "mappoints\n",\ "(0, 0, 0);\n",\ "(1, 0, 0);\n",\ "(1, 1, 0);\n",\ "(0, 1, 0);\n",\ "\n",\ "mapfaces\n",\ "(1, 2, 3, 4) del;\n",\ "\n",\ "newpoints\n",\ "(0.5, 0.5, -0.5) \n",\ " { 0.25 X1, 0.25 X2, 0.25 X3, 0.25 X4 } \n",\ " { 0.25 Y1, 0.25 Y2, 0.25 Y3, 0.25 Y4 } { };\n",\ "\n",\ "newfaces\n",\ "(1, 2, 5);\n",\ "(2, 3, 5);\n",\ "(3, 4, 5);\n",\ "(4, 1, 5);\n",\ "\n",\ "elements\n",\ "(1, 2, 3, 4, 5);\n",\ "\n",\ "freezone2\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 1.4 P5, -0.1 P1, -0.1 P2, -0.1 P3, -0.1 P4 };\n",\ "\n",\ "freezonelimit\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 1 P5 };\n",\ "\n",\ "freeset\n",\ "1 2 3 5;\n",\ "\n",\ "freeset\n",\ "1 3 4 5;\n",\ "\n",\ "endrule\n",\ "\n",\ "\n",\ "rule \"small Pyramid on quad\"\n",\ "\n",\ "quality 100\n",\ "\n",\ "mappoints\n",\ "(0, 0, 0);\n",\ "(1, 0, 0);\n",\ "(1, 1, 0);\n",\ "(0, 1, 0);\n",\ "\n",\ "mapfaces\n",\ "(1, 2, 3, 4) del;\n",\ "\n",\ "newpoints\n",\ "(0.5, 0.5, -0.1 )\n",\ " { 0.25 X1, 0.25 X2, 0.25 X3, 0.25 X4 } \n",\ " { 0.25 Y1, 0.25 Y2, 0.25 Y3, 0.25 Y4 } { };\n",\ "\n",\ "newfaces\n",\ "(1, 2, 5);\n",\ "(2, 3, 5);\n",\ "(3, 4, 5);\n",\ "(4, 1, 5);\n",\ "\n",\ "elements\n",\ "(1, 2, 3, 4, 5);\n",\ "\n",\ "freezone2\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 1.4 P5, -0.1 P1, -0.1 P2, -0.1 P3, -0.1 P4 };\n",\ "\n",\ "freezonelimit\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 1 P5 };\n",\ "\n",\ "freeset\n",\ "1 2 3 5;\n",\ "\n",\ "freeset\n",\ "1 3 4 5;\n",\ "\n",\ "endrule\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "rule \"connect pyramid\"\n",\ "\n",\ "quality 1\n",\ "\n",\ "mappoints\n",\ "(0, 0, 0);\n",\ "(1, 0, 0);\n",\ "(1, 1, 0);\n",\ "(0, 1, 0);\n",\ "(0.5, 0.5, -0.5);\n",\ "\n",\ "mapfaces\n",\ "(1, 2, 3, 4) del;\n",\ "\n",\ "newpoints\n",\ "\n",\ "newfaces\n",\ "(1, 2, 5);\n",\ "(2, 3, 5);\n",\ "(3, 4, 5);\n",\ "(4, 1, 5);\n",\ "\n",\ "elements\n",\ "(1, 2, 3, 4, 5);\n",\ "\n",\ "freezone2\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 1 P5 };\n",\ "\n",\ "freeset\n",\ "1 2 3 5;\n",\ "\n",\ "freeset\n",\ "1 3 4 5;\n",\ "\n",\ "endrule\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "rule \"pyramid with one trig\"\n",\ "\n",\ "quality 1\n",\ "\n",\ "mappoints\n",\ "(0, 0, 0);\n",\ "(1, 0, 0);\n",\ "(1, 1, 0);\n",\ "(0, 1, 0);\n",\ "(0.5, 0.5, -0.5);\n",\ "\n",\ "mapfaces\n",\ "(1, 2, 3, 4) del;\n",\ "(2, 1, 5) del;\n",\ "\n",\ "newpoints\n",\ "\n",\ "newfaces\n",\ "(2, 3, 5);\n",\ "(3, 4, 5);\n",\ "(4, 1, 5);\n",\ "\n",\ "elements\n",\ "(1, 2, 3, 4, 5);\n",\ "\n",\ "freezone2\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 1 P5 };\n",\ "{ 0.34 P2, 0.34 P3, 0.34 P5, -0.02 P1 };\n",\ "{ 0.34 P3, 0.34 P4, 0.34 P5, -0.02 P1 };\n",\ "{ 0.34 P1, 0.34 P4, 0.34 P5, -0.02 P3 };\n",\ "\n",\ "freezonelimit\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 1 P5 };\n",\ "{ 0.333 P2, 0.333 P3, 0.334 P5, 0 P1 };\n",\ "{ 0.333 P3, 0.333 P4, 0.334 P5, 0 P1 };\n",\ "{ 0.333 P1, 0.333 P4, 0.334 P5, 0 P3 };\n",\ "\n",\ "orientations\n",\ "(1, 2, 3, 5);\n",\ "(1, 3, 4, 5);\n",\ "\n",\ "\n",\ "freeset\n",\ "1 2 3 5;\n",\ "freeset\n",\ "1 3 4 5;\n",\ "freeset\n",\ "2 3 5 6;\n",\ "freeset\n",\ "3 4 5 7;\n",\ "freeset \n",\ "1 4 5 8;\n",\ "endrule\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "rule \"pyramid with two trig\"\n",\ "\n",\ "quality 1\n",\ "\n",\ "mappoints\n",\ "(0, 0, 0);\n",\ "(1, 0, 0);\n",\ "(1, 1, 0);\n",\ "(0, 1, 0);\n",\ "(0.5, 0.5, -0.5);\n",\ "\n",\ "mapfaces\n",\ "(1, 2, 3, 4) del;\n",\ "(2, 1, 5) del;\n",\ "(3, 2, 5) del;\n",\ "newpoints\n",\ "\n",\ "newfaces\n",\ "(3, 4, 5);\n",\ "(4, 1, 5);\n",\ "\n",\ "elements\n",\ "(1, 2, 3, 4, 5);\n",\ "\n",\ "freezone2\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 1 P5 };\n",\ "\n",\ "freeset\n",\ "1 2 3 5;\n",\ "\n",\ "freeset\n",\ "1 3 4 5;\n",\ "\n",\ "endrule\n",\ "\n",\ "\n",\ "\n",\ "\n",\ 0}; } netgen-6.2.1804/libsrc/meshing/hpref_segm.hpp0000644000175000017500000000355413272137567017554 0ustar kurtkurt // HP_SEGM int refsegm_splitedges[][3] = { { 0, 0, 0 } }; HPREF_ELEMENT_TYPE refsegm_newelstypes[] = { HP_SEGM, HP_NONE, }; int refsegm_newels[][8] = { { 1, 2 }, }; HPRef_Struct refsegm = { HP_SEGM, refsegm_splitedges, 0, 0, refsegm_newelstypes, refsegm_newels }; // HP_SEGM_SINGCORNERL = 2, int refsegm_scl_splitedges[][3] = { { 1, 2, 3 }, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE refsegm_scl_newelstypes[] = { HP_SEGM_SINGCORNERL, HP_SEGM, HP_NONE, }; int refsegm_scl_newels[][8] = { { 1, 3 }, { 3, 2 }, { 0, 0 }, }; HPRef_Struct refsegm_scl = { HP_SEGM, refsegm_scl_splitedges, 0, 0, refsegm_scl_newelstypes, refsegm_scl_newels }; // HP_SEGM_SINGCORNERR int refsegm_scr_splitedges[][3] = { { 2, 1, 3 }, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE refsegm_scr_newelstypes[] = { HP_SEGM, HP_SEGM_SINGCORNERR, HP_NONE, }; int refsegm_scr_newels[][8] = { { 1, 3 }, { 3, 2 }, { 0, 0 }, }; HPRef_Struct refsegm_scr = { HP_SEGM, refsegm_scr_splitedges, 0, 0, refsegm_scr_newelstypes, refsegm_scr_newels }; // HP_SEGM_SINGCORNERS = 3, int refsegm_sc2_splitedges[][3] = { { 1, 2, 3 }, { 2, 1, 4 }, { 0, 0, 0 } }; HPREF_ELEMENT_TYPE refsegm_sc2_newelstypes[] = { HP_SEGM_SINGCORNERL, HP_SEGM_SINGCORNERR, HP_SEGM, HP_NONE, }; int refsegm_sc2_newels[][8] = { { 1, 3 }, { 4, 2 }, { 3, 4 }, { 0, 0 }, }; HPRef_Struct refsegm_sc2 = { HP_SEGM, refsegm_sc2_splitedges, 0, 0, refsegm_sc2_newelstypes, refsegm_sc2_newels }; netgen-6.2.1804/libsrc/meshing/validate.cpp0000644000175000017500000003465613272137567017230 0ustar kurtkurt #include #include "meshing.hpp" namespace netgen { void GetPureBadness(Mesh & mesh, Array & pure_badness, const BitArray & isnewpoint) { //const int ne = mesh.GetNE(); const int np = mesh.GetNP(); pure_badness.SetSize(np+PointIndex::BASE+1); pure_badness = -1; Array< Point<3>* > backup(np); for(int i=0; i(mesh.Point(i+1)); if(isnewpoint.Test(i+PointIndex::BASE) && mesh.mlbetweennodes[i+PointIndex::BASE][0] > 0) { mesh.Point(i+1) = Center(mesh.Point(mesh.mlbetweennodes[i+PointIndex::BASE][0]), mesh.Point(mesh.mlbetweennodes[i+PointIndex::BASE][1])); } } for (ElementIndex i = 0; i < mesh.GetNE(); i++) { double bad = mesh[i].CalcJacobianBadness (mesh.Points()); for(int j=0; j pure_badness[mesh[i][j]]) pure_badness[mesh[i][j]] = bad; // save maximum if(bad > pure_badness.Last()) pure_badness.Last() = bad; } for(int i=0; i & bad_elements, const Array & pure_badness, double max_worsening, const bool uselocalworsening, Array * quality_loss) { PrintMessage(3,"!!!! Validating !!!!"); //if(max_worsening > 0) // (*testout) << "badness " << counter++ << endl; bad_elements.SetSize(0); double loc_pure_badness = -1; if(!uselocalworsening) loc_pure_badness = pure_badness.Last(); // maximum is saved at last position double worsening = -1; ElementIndex ind; if(quality_loss != NULL) quality_loss->SetSize(mesh.GetNE()); for (ElementIndex i = 0; i < mesh.GetNE(); i++) { if(uselocalworsening) { loc_pure_badness = -1; for(int j=0; j loc_pure_badness) loc_pure_badness = pure_badness[mesh[i][j]]; } double bad = mesh[i].CalcJacobianBadness (mesh.Points()); if (bad > 1e10 || (max_worsening > 0 && bad > loc_pure_badness*max_worsening)) bad_elements.Append(i); if(max_worsening > 0) { double actw = bad/loc_pure_badness; if(quality_loss != NULL) (*quality_loss)[i] = actw; if(actw > worsening) { worsening = actw; ind = i; } } } return worsening; } void GetWorkingArea(BitArray & working_elements, BitArray & working_points, const Mesh & mesh, const Array & bad_elements, const int width) { working_elements.Clear(); working_points.Clear(); for(int i=0; i & bad_elements, const BitArray & isnewpoint, const Refinement & refinement, const Array & pure_badness, double max_worsening, const bool uselocalworsening, const Array< Array* > & idmaps) { ostringstream ostrstr; const int maxtrials = 100; //bool doit; //cout << "DOIT: " << flush; //cin >> doit; int ne = mesh.GetNE(); int np = mesh.GetNP(); int numbadneighbours = 3; const int numtopimprove = 3; PrintMessage(1,"repairing"); PushStatus("Repair Bisection"); Array* > should(np); Array* > can(np); Array* > nv(np); for(int i=0; i; should[i] = new Point<3>; can[i] = new Point<3>; } BitArray isboundarypoint(np),isedgepoint(np); isboundarypoint.Clear(); isedgepoint.Clear(); for(int i = 1; i <= mesh.GetNSeg(); i++) { const Segment & seg = mesh.LineSegment(i); isedgepoint.Set(seg[0]); isedgepoint.Set(seg[1]); } Array surfaceindex(np); surfaceindex = -1; for (int i = 1; i <= mesh.GetNSE(); i++) { const Element2d & sel = mesh.SurfaceElement(i); for (int j = 1; j <= sel.GetNP(); j++) if(!isedgepoint.Test(sel.PNum(j))) { isboundarypoint.Set(sel.PNum(j)); surfaceindex[sel.PNum(j) - PointIndex::BASE] = mesh.GetFaceDescriptor(sel.GetIndex()).SurfNr(); } } Validate(mesh,bad_elements,pure_badness, ((uselocalworsening) ? (0.8*(max_worsening-1.) + 1.) : (0.1*(max_worsening-1.) + 1.)), uselocalworsening); // -> larger working area BitArray working_elements(ne); BitArray working_points(np); GetWorkingArea(working_elements,working_points,mesh,bad_elements,numbadneighbours); //working_elements.Set(); //working_points.Set(); ostrstr.str(""); ostrstr << "worsening: " << Validate(mesh,bad_elements,pure_badness,max_worsening,uselocalworsening); PrintMessage(4,ostrstr.str()); int auxnum=0; for(int i=1; i<=np; i++) if(working_points.Test(i)) auxnum++; ostrstr.str(""); ostrstr << "Percentage working points: " << 100.*double(auxnum)/np; PrintMessage(5,ostrstr.str()); BitArray isworkingboundary(np); for(int i=1; i<=np; i++) if(working_points.Test(i) && isboundarypoint.Test(i)) isworkingboundary.Set(i); else isworkingboundary.Clear(i); for(int i=0; i 0) *can[i] = Center(*can[mesh.mlbetweennodes[i+PointIndex::BASE][0]-PointIndex::BASE], *can[mesh.mlbetweennodes[i+PointIndex::BASE][1]-PointIndex::BASE]); else *can[i] = mesh.Point(i+1); } int cnttrials = 1; double lamedge = 0.5; double lamface = 0.5; double facokedge = 0; double facokface = 0; double factryedge; double factryface = 0; double oldlamedge,oldlamface; MeshOptimize2d * optimizer2d = refinement.Get2dOptimizer(); if(!optimizer2d) { cerr << "No 2D Optimizer!" << endl; return; } while ((facokedge < 1.-1e-8 || facokface < 1.-1e-8) && cnttrials < maxtrials && multithread.terminate != 1) { (*testout) << " facokedge " << facokedge << " facokface " << facokface << " cnttrials " << cnttrials << endl << " perc. " << 95. * max2( min2(facokedge,facokface), double(cnttrials)/double(maxtrials)) << endl; SetThreadPercent(95. * max2( min2(facokedge,facokface), double(cnttrials)/double(maxtrials))); ostrstr.str(""); ostrstr << "max. worsening " << max_worsening; PrintMessage(5,ostrstr.str()); oldlamedge = lamedge; lamedge *= 6; if (lamedge > 2) lamedge = 2; if(1==1 || facokedge < 1.-1e-8) { for(int i=0; i(0,0,0); for (int i = 1; i <= mesh.GetNSE(); i++) { const Element2d & sel = mesh.SurfaceElement(i); Vec<3> auxvec = Cross(mesh.Point(sel.PNum(2))-mesh.Point(sel.PNum(1)), mesh.Point(sel.PNum(3))-mesh.Point(sel.PNum(1))); auxvec.Normalize(); for (int j = 1; j <= sel.GetNP(); j++) if(!isedgepoint.Test(sel.PNum(j))) *nv[sel.PNum(j) - PointIndex::BASE] += auxvec; } for(int i=0; iNormalize(); do // move edges { lamedge *= 0.5; cnttrials++; if(cnttrials % 10 == 0) max_worsening *= 1.1; factryedge = lamedge + (1.-lamedge) * facokedge; ostrstr.str(""); ostrstr << "lamedge = " << lamedge << ", trying: " << factryedge; PrintMessage(5,ostrstr.str()); for (int i = 1; i <= np; i++) { if (isedgepoint.Test(i)) { for (int j = 0; j < 3; j++) mesh.Point(i)(j) = lamedge * (*should.Get(i))(j) + (1.-lamedge) * (*can.Get(i))(j); } else mesh.Point(i) = *can.Get(i); } if(facokedge < 1.-1e-8) { ostrstr.str(""); ostrstr << "worsening: " << Validate(mesh,bad_elements,pure_badness,max_worsening,uselocalworsening); PrintMessage(5,ostrstr.str()); } else Validate(mesh,bad_elements,pure_badness,-1,uselocalworsening); ostrstr.str(""); ostrstr << bad_elements.Size() << " bad elements"; PrintMessage(5,ostrstr.str()); } while (bad_elements.Size() > 0 && cnttrials < maxtrials && multithread.terminate != 1); } if(cnttrials < maxtrials && multithread.terminate != 1) { facokedge = factryedge; // smooth faces mesh.CalcSurfacesOfNode(); MeshingParameters dummymp; mesh.ImproveMeshJacobianOnSurface(dummymp,isworkingboundary,nv,OPT_QUALITY, &idmaps); for (int i = 1; i <= np; i++) *can.Elem(i) = mesh.Point(i); if(optimizer2d) optimizer2d->ProjectBoundaryPoints(surfaceindex,can,should); } oldlamface = lamface; lamface *= 6; if (lamface > 2) lamface = 2; if(cnttrials < maxtrials && multithread.terminate != 1) { do // move faces { lamface *= 0.5; cnttrials++; if(cnttrials % 10 == 0) max_worsening *= 1.1; factryface = lamface + (1.-lamface) * facokface; ostrstr.str(""); ostrstr << "lamface = " << lamface << ", trying: " << factryface; PrintMessage(5,ostrstr.str()); for (int i = 1; i <= np; i++) { if (isboundarypoint.Test(i)) { for (int j = 0; j < 3; j++) mesh.Point(i)(j) = lamface * (*should.Get(i))(j) + (1.-lamface) * (*can.Get(i))(j); } else mesh.Point(i) = *can.Get(i); } ostrstr.str(""); ostrstr << "worsening: " << Validate(mesh,bad_elements,pure_badness,max_worsening,uselocalworsening); PrintMessage(5,ostrstr.str()); ostrstr.str(""); ostrstr << bad_elements.Size() << " bad elements"; PrintMessage(5,ostrstr.str()); } while (bad_elements.Size() > 0 && cnttrials < maxtrials && multithread.terminate != 1); } if(cnttrials < maxtrials && multithread.terminate != 1) { facokface = factryface; // smooth interior mesh.CalcSurfacesOfNode(); MeshingParameters dummymp; mesh.ImproveMeshJacobian (dummymp, OPT_QUALITY,&working_points); //mesh.ImproveMeshJacobian (OPT_WORSTCASE,&working_points); for (int i = 1; i <= np; i++) *can.Elem(i) = mesh.Point(i); } //! if((facokedge < 1.-1e-8 || facokface < 1.-1e-8) && cnttrials < maxtrials && multithread.terminate != 1) { MeshingParameters dummymp; MeshOptimize3d optmesh(dummymp); for(int i=0; iProjectBoundaryPoints(surfaceindex,can,should); for (int i = 1; i <= np; i++) if(isboundarypoint.Test(i)) for(int j=1; j<=3; j++) mesh.Point(i).X(j) = should.Get(i).X(j); } */ if(cnttrials == maxtrials) { for (int i = 1; i <= np; i++) mesh.Point(i) = *should.Get(i); Validate(mesh,bad_elements,pure_badness,max_worsening,uselocalworsening); for(int i=0; i #include "meshing.hpp" namespace netgen { double minother; double minwithoutother; MeshingStat3d :: MeshingStat3d () { cntsucc = cnttrials = cntelem = qualclass = 0; vol0 = h = 1; problemindex = 1; } Meshing3 :: Meshing3 (const string & rulefilename) { tolfak = 1; LoadRules (rulefilename.c_str(), NULL); adfront = new AdFront3; problems.SetSize (rules.Size()); foundmap.SetSize (rules.Size()); canuse.SetSize (rules.Size()); ruleused.SetSize (rules.Size()); for (int i = 1; i <= rules.Size(); i++) { problems.Elem(i) = new char[255]; foundmap.Elem(i) = 0; canuse.Elem(i) = 0; ruleused.Elem(i) = 0; } } Meshing3 :: Meshing3 (const char ** rulep) { tolfak = 1; LoadRules (NULL, rulep); adfront = new AdFront3; problems.SetSize (rules.Size()); foundmap.SetSize (rules.Size()); canuse.SetSize (rules.Size()); ruleused.SetSize (rules.Size()); for (int i = 0; i < rules.Size(); i++) { problems[i] = new char[255]; foundmap[i] = 0; canuse[i] = 0; ruleused[i] = 0; } } Meshing3 :: ~Meshing3 () { delete adfront; for (int i = 0; i < rules.Size(); i++) { delete [] problems[i]; delete rules[i]; } } /* // was war das ???? static double CalcLocH (const Array & locpoints, const Array & locfaces, double h) { return h; int i, j; double hi, h1, d, dn, sum, weight, wi; Point3d p0, pc; Vec3d n, v1, v2; p0.X() = p0.Y() = p0.Z() = 0; for (j = 1; j <= 3; j++) { p0.X() += locpoints.Get(locfaces.Get(1).PNum(j)).X(); p0.Y() += locpoints.Get(locfaces.Get(1).PNum(j)).Y(); p0.Z() += locpoints.Get(locfaces.Get(1).PNum(j)).Z(); } p0.X() /= 3; p0.Y() /= 3; p0.Z() /= 3; v1 = locpoints.Get(locfaces.Get(1).PNum(2)) - locpoints.Get(locfaces.Get(1).PNum(1)); v2 = locpoints.Get(locfaces.Get(1).PNum(3)) - locpoints.Get(locfaces.Get(1).PNum(1)); h1 = v1.Length(); n = Cross (v2, v1); n /= n.Length(); sum = 0; weight = 0; for(int i = 1; i <= locfaces.Size(); i++) { pc.X() = pc.Y() = pc.Z() = 0; for (j = 1; j <= 3; j++) { pc.X() += locpoints.Get(locfaces.Get(i).PNum(j)).X(); pc.Y() += locpoints.Get(locfaces.Get(i).PNum(j)).Y(); pc.Z() += locpoints.Get(locfaces.Get(i).PNum(j)).Z(); } pc.X() /= 3; pc.Y() /= 3; pc.Z() /= 3; d = Dist (p0, pc); dn = n * (pc - p0); hi = Dist (locpoints.Get(locfaces.Get(i).PNum(1)), locpoints.Get(locfaces.Get(i).PNum(2))); if (dn > -0.2 * h1) { wi = 1 / (h1 + d); wi *= wi; } else wi = 0; sum += hi * wi; weight += wi; } return sum/weight; } */ PointIndex Meshing3 :: AddPoint (const Point3d & p, PointIndex globind) { return adfront -> AddPoint (p, globind); } void Meshing3 :: AddBoundaryElement (const Element2d & elem) { MiniElement2d mini(elem.GetNP()); for (int j = 0; j < elem.GetNP(); j++) mini[j] = elem[j]; adfront -> AddFace(mini); } void Meshing3 :: AddBoundaryElement (const MiniElement2d & elem) { adfront -> AddFace(elem); } int Meshing3 :: AddConnectedPair (const INDEX_2 & apair) { return adfront -> AddConnectedPair (apair); } MESHING3_RESULT Meshing3 :: GenerateMesh (Mesh & mesh, const MeshingParameters & mp) { static int meshing3_timer = NgProfiler::CreateTimer ("Meshing3::GenerateMesh"); static int meshing3_timer_a = NgProfiler::CreateTimer ("Meshing3::GenerateMesh a"); static int meshing3_timer_b = NgProfiler::CreateTimer ("Meshing3::GenerateMesh b"); static int meshing3_timer_c = NgProfiler::CreateTimer ("Meshing3::GenerateMesh c"); static int meshing3_timer_d = NgProfiler::CreateTimer ("Meshing3::GenerateMesh d"); NgProfiler::RegionTimer reg (meshing3_timer); Array locpoints; // local points Array locfaces; // local faces Array pindex; // mapping from local to front point numbering Array allowpoint; // point is allowed ? Array findex; // mapping from local to front face numbering //INDEX_2_HASHTABLE connectedpairs(100); // connecgted pairs for prism meshing Array plainpoints; // points in reference coordinates Array delpoints, delfaces; // points and lines to be deleted Array locelements; // new generated elements int j, oldnp, oldnf; int found; referencetransform trans; int rotind; Point3d inp; float err; INDEX locfacesplit; //index for faces in outer area bool loktestmode = false; int uselocalh = mp.uselocalh; // int giveuptol = mp.giveuptol; // MeshingStat3d stat; // statistics int plotstat_oldne = -1; // for star-shaped domain meshing Array grouppoints; Array groupfaces; Array grouppindex; Array groupfindex; float minerr; int hasfound; double tetvol; // int giveup = 0; Array tempnewpoints; Array tempnewfaces; Array tempdelfaces; Array templocelements; stat.h = mp.maxh; adfront->SetStartFront (mp.baseelnp); found = 0; stat.vol0 = adfront -> Volume(); tetvol = 0; stat.qualclass = 1; while (1) { if (multithread.terminate) throw NgException ("Meshing stopped"); // break if advancing front is empty if (!mp.baseelnp && adfront->Empty()) break; // break, if advancing front has no elements with // mp.baseelnp nodes if (mp.baseelnp && adfront->Empty (mp.baseelnp)) break; locpoints.SetSize(0); locfaces.SetSize(0); locelements.SetSize(0); pindex.SetSize(0); findex.SetSize(0); INDEX_2_HASHTABLE connectedpairs(100); // connected pairs for prism meshing // select base-element (will be locface[1]) // and get local environment of radius (safety * h) int baseelem = adfront -> SelectBaseElement (); if (mp.baseelnp && adfront->GetFace (baseelem).GetNP() != mp.baseelnp) { adfront->IncrementClass (baseelem); continue; } const MiniElement2d & bel = adfront->GetFace (baseelem); const Point3d & p1 = adfront->GetPoint (bel[0]); const Point3d & p2 = adfront->GetPoint (bel[1]); const Point3d & p3 = adfront->GetPoint (bel[2]); // (*testout) << endl << "base = " << bel << endl; Point3d pmid = Center (p1, p2, p3); double his = (Dist (p1, p2) + Dist(p1, p3) + Dist(p2, p3)) / 3; double hshould; hshould = mesh.GetH (pmid); if (adfront->GetFace (baseelem).GetNP() == 4) hshould = max2 (his, hshould); double hmax = (his > hshould) ? his : hshould; // qualclass should come from baseelem !!!!! double hinner = hmax * (1 + stat.qualclass); double houter = hmax * (1 + 2 * stat.qualclass); NgProfiler::StartTimer (meshing3_timer_a); stat.qualclass = adfront -> GetLocals (baseelem, locpoints, locfaces, pindex, findex, connectedpairs, houter, hinner, locfacesplit); NgProfiler::StopTimer (meshing3_timer_a); // (*testout) << "locfaces = " << endl << locfaces << endl; //loktestmode = 1; testmode = loktestmode; //changed // loktestmode = testmode = (adfront->GetFace (baseelem).GetNP() == 4) && (rules.Size() == 5); loktestmode = stat.qualclass > 5; if (loktestmode) { (*testout) << "baseel = " << baseelem << ", ind = " << findex.Get(1) << endl; int pi1 = pindex[locfaces[0].PNum(1)]; int pi2 = pindex[locfaces[0].PNum(2)]; int pi3 = pindex[locfaces[0].PNum(3)]; (*testout) << "pi = " << pi1 << ", " << pi2 << ", " << pi3 << endl; } if (testmode) { (*testout) << "baseelem = " << baseelem << " qualclass = " << stat.qualclass << endl; (*testout) << "locpoints = " << endl << locpoints << endl; (*testout) << "connected = " << endl << connectedpairs << endl; } // loch = CalcLocH (locpoints, locfaces, h); stat.nff = adfront->GetNF(); stat.vol = adfront->Volume(); if (stat.vol < 0) break; oldnp = locpoints.Size(); oldnf = locfaces.Size(); allowpoint.SetSize(locpoints.Size()); if (uselocalh && stat.qualclass <= 3) for(int i = 1; i <= allowpoint.Size(); i++) { allowpoint.Elem(i) = (mesh.GetH (locpoints.Get(i)) > 0.4 * hshould / mp.sloppy) ? 2 : 1; } else allowpoint = 2; if (stat.qualclass >= mp.starshapeclass && mp.baseelnp != 4) { NgProfiler::RegionTimer reg1 (meshing3_timer_b); // star-shaped domain removing grouppoints.SetSize (0); groupfaces.SetSize (0); grouppindex.SetSize (0); groupfindex.SetSize (0); adfront -> GetGroup (findex[0], grouppoints, groupfaces, grouppindex, groupfindex); bool onlytri = 1; for (auto i : groupfaces.Range()) if (groupfaces[i].GetNP() != 3) onlytri = 0; if (onlytri && groupfaces.Size() <= 20 + 2*stat.qualclass && FindInnerPoint (grouppoints, groupfaces, inp)) { (*testout) << "inner point found" << endl; for(int i = 1; i <= groupfaces.Size(); i++) adfront -> DeleteFace (groupfindex.Get(i)); for(int i = 1; i <= groupfaces.Size(); i++) for (j = 1; j <= locfaces.Size(); j++) if (findex.Get(j) == groupfindex.Get(i)) delfaces.Append (j); delfaces.SetSize (0); INDEX npi; Element newel(TET); npi = mesh.AddPoint (inp); newel.SetNP(4); newel.PNum(4) = npi; for(int i = 1; i <= groupfaces.Size(); i++) { for (j = 1; j <= 3; j++) { newel.PNum(j) = adfront->GetGlobalIndex (grouppindex.Get(groupfaces.Get(i).PNum(j))); } mesh.AddVolumeElement (newel); } continue; } } found = 0; hasfound = 0; minerr = 1e6; // int optother = 0; /* for(int i = 1; i <= locfaces.Size(); i++) { (*testout) << "Face " << i << ": "; for (j = 1; j <= locfaces.Get(i).GetNP(); j++) (*testout) << pindex.Get(locfaces.Get(i).PNum(j)) << " "; (*testout) << endl; } for(int i = 1; i <= locpoints.Size(); i++) { (*testout) << "p" << i << ", gi = " << pindex.Get(i) << " = " << locpoints.Get(i) << endl; } */ minother = 1e10; minwithoutother = 1e10; bool impossible = 1; for (rotind = 1; rotind <= locfaces[0].GetNP(); rotind++) { // set transformatino to reference coordinates if (locfaces[0].GetNP() == 3) { trans.Set (locpoints[locfaces[0].PNumMod(1+rotind)], locpoints[locfaces[0].PNumMod(2+rotind)], locpoints[locfaces[0].PNumMod(3+rotind)], hshould); } else { trans.Set (locpoints[locfaces[0].PNumMod(1+rotind)], locpoints[locfaces[0].PNumMod(2+rotind)], locpoints[locfaces[0].PNumMod(4+rotind)], hshould); } // trans.ToPlain (locpoints, plainpoints); plainpoints.SetSize (locpoints.Size()); for (auto i : locpoints.Range()) trans.ToPlain (locpoints[i], plainpoints[i]); for (auto i : allowpoint.Range()) if (plainpoints[i].Z() > 0) allowpoint[i] = false; stat.cnttrials++; if (stat.cnttrials % 100 == 0) { (*testout) << "\n"; for(int i = 1; i <= canuse.Size(); i++) { (*testout) << foundmap.Get(i) << "/" << canuse.Get(i) << "/" << ruleused.Get(i) << " map/can/use rule " << rules.Get(i)->Name() << "\n"; } (*testout) << endl; } NgProfiler::StartTimer (meshing3_timer_c); found = ApplyRules (plainpoints, allowpoint, locfaces, locfacesplit, connectedpairs, locelements, delfaces, stat.qualclass, mp.sloppy, rotind, err); if (found >= 0) impossible = 0; if (found < 0) found = 0; NgProfiler::StopTimer (meshing3_timer_c); if (!found) loktestmode = 0; NgProfiler::RegionTimer reg2 (meshing3_timer_d); if (loktestmode) { (*testout) << "plainpoints = " << endl << plainpoints << endl; (*testout) << "Applyrules found " << found << endl; } if (found) stat.cntsucc++; locpoints.SetSize (plainpoints.Size()); for (int i = oldnp+1; i <= plainpoints.Size(); i++) trans.FromPlain (plainpoints.Elem(i), locpoints.Elem(i)); // avoid meshing from large to small mesh-size if (uselocalh && found && stat.qualclass <= 3) { for (int i = 1; i <= locelements.Size(); i++) { Point3d pmin = locpoints[locelements.Get(i).PNum(1)]; Point3d pmax = pmin; for (j = 2; j <= 4; j++) { const Point3d & hp = locpoints[locelements.Get(i).PNum(j)]; pmin.SetToMin (hp); pmax.SetToMax (hp); } if (mesh.GetMinH (pmin, pmax) < 0.4 * hshould / mp.sloppy) found = 0; } } if (found) { for (int i = 1; i <= locelements.Size(); i++) for (int j = 1; j <= 4; j++) { const Point3d & hp = locpoints[locelements.Get(i).PNum(j)]; if (Dist (hp, pmid) > hinner) found = 0; } } if (found) ruleused.Elem(found)++; // plotstat->Plot(stat); if (stat.cntelem != plotstat_oldne) { plotstat_oldne = stat.cntelem; PrintMessageCR (5, "El: ", stat.cntelem, // << " trials: " << stat.cnttrials " faces: ", stat.nff, " vol = ", float(100 * stat.vol / stat.vol0)); multithread.percent = 100 - 100.0 * stat.vol / stat.vol0; } if (found && (!hasfound || err < minerr) ) { if (testmode) { (*testout) << "found is active, 3" << endl; for(int i = 1; i <= plainpoints.Size(); i++) { (*testout) << "p"; if (i <= pindex.Size()) (*testout) << pindex.Get(i) << ": "; else (*testout) << "new: "; (*testout) << plainpoints.Get(i) << endl; } } hasfound = found; minerr = err; tempnewpoints.SetSize (0); for(int i = oldnp+1; i <= locpoints.Size(); i++) tempnewpoints.Append (locpoints.Get(i)); tempnewfaces.SetSize (0); for(int i = oldnf+1; i <= locfaces.Size(); i++) tempnewfaces.Append (locfaces.Get(i)); tempdelfaces.SetSize (0); for(int i = 1; i <= delfaces.Size(); i++) tempdelfaces.Append (delfaces.Get(i)); templocelements.SetSize (0); for(int i = 1; i <= locelements.Size(); i++) templocelements.Append (locelements.Get(i)); /* optother = strcmp (problems[found], "other") == 0; */ } locpoints.SetSize (oldnp); locfaces.SetSize (oldnf); delfaces.SetSize (0); locelements.SetSize (0); } if (hasfound) { /* if (optother) (*testout) << "Other is optimal" << endl; if (minother < minwithoutother) { (*testout) << "Other is better, " << minother << " less " << minwithoutother << endl; } */ for(int i = 1; i <= tempnewpoints.Size(); i++) locpoints.Append (tempnewpoints.Get(i)); for(int i = 1; i <= tempnewfaces.Size(); i++) locfaces.Append (tempnewfaces.Get(i)); for(int i = 1; i <= tempdelfaces.Size(); i++) delfaces.Append (tempdelfaces.Get(i)); for(int i = 1; i <= templocelements.Size(); i++) locelements.Append (templocelements.Get(i)); if (loktestmode) { (*testout) << "apply rule" << endl; for(int i = 1; i <= locpoints.Size(); i++) { (*testout) << "p"; if (i <= pindex.Size()) (*testout) << pindex.Get(i) << ": "; else (*testout) << "new: "; (*testout) << locpoints.Get(i) << endl; } } pindex.SetSize(locpoints.Size()); for (int i = oldnp+1; i <= locpoints.Size(); i++) { PointIndex globind = mesh.AddPoint (locpoints.Get(i)); pindex.Elem(i) = adfront -> AddPoint (locpoints.Get(i), globind); } for (int i = 1; i <= locelements.Size(); i++) { Point3d * hp1, * hp2, * hp3, * hp4; hp1 = &locpoints[locelements.Get(i).PNum(1)]; hp2 = &locpoints[locelements.Get(i).PNum(2)]; hp3 = &locpoints[locelements.Get(i).PNum(3)]; hp4 = &locpoints[locelements.Get(i).PNum(4)]; tetvol += (1.0 / 6.0) * ( Cross ( *hp2 - *hp1, *hp3 - *hp1) * (*hp4 - *hp1) ); for (j = 1; j <= locelements.Get(i).NP(); j++) locelements.Elem(i).PNum(j) = adfront -> GetGlobalIndex (pindex[locelements.Get(i).PNum(j)]); mesh.AddVolumeElement (locelements.Get(i)); stat.cntelem++; } for(int i = oldnf+1; i <= locfaces.Size(); i++) { for (j = 1; j <= locfaces.Get(i).GetNP(); j++) locfaces.Elem(i).PNum(j) = pindex[locfaces.Get(i).PNum(j)]; // (*testout) << "add face " << locfaces.Get(i) << endl; adfront->AddFace (locfaces.Get(i)); } for(int i = 1; i <= delfaces.Size(); i++) adfront->DeleteFace (findex.Get(delfaces.Get(i))); } else { adfront->IncrementClass (findex.Get(1)); if (impossible && mp.check_impossible) { (*testout) << "skip face since it is impossible" << endl; for (j = 0; j < 100; j++) adfront->IncrementClass (findex.Get(1)); } } locelements.SetSize (0); delpoints.SetSize(0); delfaces.SetSize(0); if (stat.qualclass >= mp.giveuptol) break; } PrintMessage (5, ""); // line feed after statistics for(int i = 1; i <= ruleused.Size(); i++) (*testout) << setw(4) << ruleused.Get(i) << " times used rule " << rules.Get(i) -> Name() << endl; if (!mp.baseelnp && adfront->Empty()) return MESHING3_OK; if (mp.baseelnp && adfront->Empty (mp.baseelnp)) return MESHING3_OK; if (stat.vol < -1e-15) return MESHING3_NEGVOL; return MESHING3_NEGVOL; } enum blocktyp { BLOCKUNDEF, BLOCKINNER, BLOCKBOUND, BLOCKOUTER }; void Meshing3 :: BlockFill (Mesh & mesh, double gh) { PrintMessage (3, "Block-filling called (obsolete) "); int i, j(0), i1, i2, i3, j1, j2, j3; int n1, n2, n3, n, min1, min2, min3, max1, max2, max3; int changed, filled; double xmin(0), xmax(0), ymin(0), ymax(0), zmin(0), zmax(0); double xminb, xmaxb, yminb, ymaxb, zminb, zmaxb; //double rad = 0.7 * gh; for(int i = 1; i <= adfront->GetNP(); i++) { const Point3d & p = adfront->GetPoint(PointIndex(i)); if (i == 1) { xmin = xmax = p.X(); ymin = ymax = p.Y(); zmin = zmax = p.Z(); } else { if (p.X() < xmin) xmin = p.X(); if (p.X() > xmax) xmax = p.X(); if (p.Y() < ymin) ymin = p.Y(); if (p.Y() > ymax) ymax = p.Y(); if (p.Z() < zmin) zmin = p.Z(); if (p.Z() > zmax) zmax = p.Z(); } } xmin -= 5 * gh; ymin -= 5 * gh; zmin -= 5 * gh; n1 = int ((xmax-xmin) / gh + 5); n2 = int ((ymax-ymin) / gh + 5); n3 = int ((zmax-zmin) / gh + 5); n = n1 * n2 * n3; PrintMessage (5, "n1 = ", n1, " n2 = ", n2, " n3 = ", n3); Array inner(n); Array pointnr(n); Array frontpointnr(n); // initialize inner to 1 for(int i = 1; i <= n; i++) inner.Elem(i) = BLOCKUNDEF; // set blocks cutting surfaces to 0 for(int i = 1; i <= adfront->GetNF(); i++) { const MiniElement2d & el = adfront->GetFace(i); xminb = xmax; xmaxb = xmin; yminb = ymax; ymaxb = ymin; zminb = zmax; zmaxb = zmin; for (j = 1; j <= 3; j++) { const Point3d & p = adfront->GetPoint (el.PNum(j)); if (p.X() < xminb) xminb = p.X(); if (p.X() > xmaxb) xmaxb = p.X(); if (p.Y() < yminb) yminb = p.Y(); if (p.Y() > ymaxb) ymaxb = p.Y(); if (p.Z() < zminb) zminb = p.Z(); if (p.Z() > zmaxb) zmaxb = p.Z(); } double filldist = 0.2; // globflags.GetNumFlag ("filldist", 0.4); xminb -= filldist * gh; xmaxb += filldist * gh; yminb -= filldist * gh; ymaxb += filldist * gh; zminb -= filldist * gh; zmaxb += filldist * gh; min1 = int ((xminb - xmin) / gh) + 1; max1 = int ((xmaxb - xmin) / gh) + 1; min2 = int ((yminb - ymin) / gh) + 1; max2 = int ((ymaxb - ymin) / gh) + 1; min3 = int ((zminb - zmin) / gh) + 1; max3 = int ((zmaxb - zmin) / gh) + 1; for (i1 = min1; i1 <= max1; i1++) for (i2 = min2; i2 <= max2; i2++) for (i3 = min3; i3 <= max3; i3++) inner.Elem(i3 + (i2-1) * n3 + (i1-1) * n2 * n3) = BLOCKBOUND; } while (1) { int undefi = 0; Point3d undefp; for (i1 = 1; i1 <= n1 && !undefi; i1++) for (i2 = 1; i2 <= n2 && !undefi; i2++) for (i3 = 1; i3 <= n3 && !undefi; i3++) { i = i3 + (i2-1) * n3 + (i1-1) * n2 * n3; if (inner.Elem(i) == BLOCKUNDEF) { undefi = i; undefp.X() = xmin + (i1-0.5) * gh; undefp.Y() = ymin + (i2-0.5) * gh; undefp.Z() = zmin + (i3-0.5) * gh; } } if (!undefi) break; // PrintMessage (5, "Test point: ", undefp); if (adfront -> Inside (undefp)) { // (*mycout) << "inner" << endl; inner.Elem(undefi) = BLOCKINNER; } else { // (*mycout) << "outer" << endl; inner.Elem(undefi) = BLOCKOUTER; } do { changed = 0; for (i1 = 1; i1 <= n1; i1++) for (i2 = 1; i2 <= n2; i2++) for (i3 = 1; i3 <= n3; i3++) { i = i3 + (i2-1) * n3 + (i1-1) * n2 * n3; for (int k = 1; k <= 3; k++) { switch (k) { case 1: j = i + n2 * n3; break; case 2: j = i + n3; break; case 3: j = i + 1; break; } if (j > n1 * n2 * n3) continue; if (inner.Elem(i) == BLOCKOUTER && inner.Elem(j) == BLOCKUNDEF) { changed = 1; inner.Elem(j) = BLOCKOUTER; } if (inner.Elem(j) == BLOCKOUTER && inner.Elem(i) == BLOCKUNDEF) { changed = 1; inner.Elem(i) = BLOCKOUTER; } if (inner.Elem(i) == BLOCKINNER && inner.Elem(j) == BLOCKUNDEF) { changed = 1; inner.Elem(j) = BLOCKINNER; } if (inner.Elem(j) == BLOCKINNER && inner.Elem(i) == BLOCKUNDEF) { changed = 1; inner.Elem(i) = BLOCKINNER; } } } } while (changed); } filled = 0; for(int i = 1; i <= n; i++) if (inner.Elem(i) == BLOCKINNER) { filled++; } PrintMessage (5, "Filled blocks: ", filled); for(int i = 1; i <= n; i++) { pointnr.Elem(i) = 0; frontpointnr.Elem(i) = 0; } for (i1 = 1; i1 <= n1-1; i1++) for (i2 = 1; i2 <= n2-1; i2++) for (i3 = 1; i3 <= n3-1; i3++) { i = i3 + (i2-1) * n3 + (i1-1) * n2 * n3; if (inner.Elem(i) == BLOCKINNER) { for (j1 = i1; j1 <= i1+1; j1++) for (j2 = i2; j2 <= i2+1; j2++) for (j3 = i3; j3 <= i3+1; j3++) { j = j3 + (j2-1) * n3 + (j1-1) * n2 * n3; if (pointnr.Get(j) == 0) { Point3d hp(xmin + (j1-1) * gh, ymin + (j2-1) * gh, zmin + (j3-1) * gh); pointnr.Elem(j) = mesh.AddPoint (hp); frontpointnr.Elem(j) = AddPoint (hp, pointnr.Elem(j)); } } } } for (i1 = 2; i1 <= n1-1; i1++) for (i2 = 2; i2 <= n2-1; i2++) for (i3 = 2; i3 <= n3-1; i3++) { i = i3 + (i2-1) * n3 + (i1-1) * n2 * n3; if (inner.Elem(i) == BLOCKINNER) { int pn[9]; pn[1] = pointnr.Get(i); pn[2] = pointnr.Get(i+1); pn[3] = pointnr.Get(i+n3); pn[4] = pointnr.Get(i+n3+1); pn[5] = pointnr.Get(i+n2*n3); pn[6] = pointnr.Get(i+n2*n3+1); pn[7] = pointnr.Get(i+n2*n3+n3); pn[8] = pointnr.Get(i+n2*n3+n3+1); static int elind[][4] = { { 1, 8, 2, 4 }, { 1, 8, 4, 3 }, { 1, 8, 3, 7 }, { 1, 8, 7, 5 }, { 1, 8, 5, 6 }, { 1, 8, 6, 2 } }; for (j = 1; j <= 6; j++) { Element el(4); for (int k = 1; k <= 4; k++) el.PNum(k) = pn[elind[j-1][k-1]]; mesh.AddVolumeElement (el); } } } for (i1 = 2; i1 <= n1-1; i1++) for (i2 = 2; i2 <= n2-1; i2++) for (i3 = 2; i3 <= n3-1; i3++) { i = i3 + (i2-1) * n3 + (i1-1) * n2 * n3; if (inner.Elem(i) == BLOCKINNER) { int pi1(0), pi2(0), pi3(0), pi4(0); int pn1 = frontpointnr.Get(i); int pn2 = frontpointnr.Get(i+1); int pn3 = frontpointnr.Get(i+n3); int pn4 = frontpointnr.Get(i+n3+1); int pn5 = frontpointnr.Get(i+n2*n3); int pn6 = frontpointnr.Get(i+n2*n3+1); int pn7 = frontpointnr.Get(i+n2*n3+n3); int pn8 = frontpointnr.Get(i+n2*n3+n3+1); for (int k = 1; k <= 6; k++) { switch (k) { case 1: // j3 = i3+1 j = i + 1; pi1 = pn2; pi2 = pn6; pi3 = pn4; pi4 = pn8; break; case 2: // j3 = i3-1 j = i - 1; pi1 = pn1; pi2 = pn3; pi3 = pn5; pi4 = pn7; break; case 3: // j2 = i2+1 j = i + n3; pi1 = pn3; pi2 = pn4; pi3 = pn7; pi4 = pn8; break; case 4: // j2 = i2-1 j = i - n3; pi1 = pn1; pi2 = pn5; pi3 = pn2; pi4 = pn6; break; case 5: // j1 = i1+1 j = i + n3*n2; pi1 = pn5; pi2 = pn7; pi3 = pn6; pi4 = pn8; break; case 6: // j1 = i1-1 j = i - n3*n2; pi1 = pn1; pi2 = pn2; pi3 = pn3; pi4 = pn4; break; } if (inner.Get(j) == BLOCKBOUND) { MiniElement2d face; face.PNum(1) = pi4; face.PNum(2) = pi1; face.PNum(3) = pi3; AddBoundaryElement (face); face.PNum(1) = pi1; face.PNum(2) = pi4; face.PNum(3) = pi2; AddBoundaryElement (face); } } } } } /* static const AdFront3 * locadfront; static int TestInner (const Point3d & p) { return locadfront->Inside (p); } static int TestSameSide (const Point3d & p1, const Point3d & p2) { return locadfront->SameSide (p1, p2); } */ void Meshing3 :: BlockFillLocalH (Mesh & mesh, const MeshingParameters & mp) { double filldist = mp.filldist; (*testout) << "blockfill local h" << endl; (*testout) << "rel filldist = " << filldist << endl; PrintMessage (3, "blockfill local h"); Array > npoints; adfront -> CreateTrees(); Box<3> bbox ( Box<3>::EMPTY_BOX ); double maxh = 0; for (int i = 1; i <= adfront->GetNF(); i++) { const MiniElement2d & el = adfront->GetFace(i); for (int j = 1; j <= 3; j++) { const Point3d & p1 = adfront->GetPoint (el.PNumMod(j)); const Point3d & p2 = adfront->GetPoint (el.PNumMod(j+1)); double hi = Dist (p1, p2); if (hi > maxh) maxh = hi; bbox.Add (p1); } } Point3d mpmin = bbox.PMin(); Point3d mpmax = bbox.PMax(); Point3d mpc = Center (mpmin, mpmax); double d = max3(mpmax.X()-mpmin.X(), mpmax.Y()-mpmin.Y(), mpmax.Z()-mpmin.Z()) / 2; mpmin = mpc - Vec3d (d, d, d); mpmax = mpc + Vec3d (d, d, d); Box3d meshbox (mpmin, mpmax); LocalH loch2 (mpmin, mpmax, 1); if (mp.maxh < maxh) maxh = mp.maxh; bool changed; do { mesh.LocalHFunction().ClearFlags(); for (int i = 1; i <= adfront->GetNF(); i++) { const MiniElement2d & el = adfront->GetFace(i); Box<3> bbox (adfront->GetPoint (el[0])); bbox.Add (adfront->GetPoint (el[1])); bbox.Add (adfront->GetPoint (el[2])); double filld = filldist * bbox.Diam(); bbox.Increase (filld); mesh.LocalHFunction().CutBoundary (bbox); // .PMin(), bbox.PMax()); } // locadfront = adfront; mesh.LocalHFunction().FindInnerBoxes (adfront, NULL); npoints.SetSize(0); mesh.LocalHFunction().GetInnerPoints (npoints); changed = false; for (int i = 1; i <= npoints.Size(); i++) { if (mesh.LocalHFunction().GetH(npoints.Get(i)) > 1.5 * maxh) { mesh.LocalHFunction().SetH (npoints.Get(i), maxh); changed = true; } } } while (changed); if (debugparam.slowchecks) (*testout) << "Blockfill with points: " << endl; for (int i = 1; i <= npoints.Size(); i++) { if (meshbox.IsIn (npoints.Get(i))) { PointIndex gpnum = mesh.AddPoint (npoints.Get(i)); adfront->AddPoint (npoints.Get(i), gpnum); if (debugparam.slowchecks) { (*testout) << npoints.Get(i) << endl; if (!adfront->Inside(npoints.Get(i))) { cout << "add outside point" << endl; (*testout) << "outside" << endl; } } } } // find outer points loch2.ClearFlags(); for (int i = 1; i <= adfront->GetNF(); i++) { const MiniElement2d & el = adfront->GetFace(i); Point3d pmin = adfront->GetPoint (el.PNum(1)); Point3d pmax = pmin; for (int j = 2; j <= 3; j++) { const Point3d & p = adfront->GetPoint (el.PNum(j)); pmin.SetToMin (p); pmax.SetToMax (p); } loch2.SetH (Center (pmin, pmax), Dist (pmin, pmax)); } for (int i = 1; i <= adfront->GetNF(); i++) { const MiniElement2d & el = adfront->GetFace(i); Point3d pmin = adfront->GetPoint (el.PNum(1)); Point3d pmax = pmin; for (int j = 2; j <= 3; j++) { const Point3d & p = adfront->GetPoint (el.PNum(j)); pmin.SetToMin (p); pmax.SetToMax (p); } double filld = filldist * Dist (pmin, pmax); pmin = pmin - Vec3d (filld, filld, filld); pmax = pmax + Vec3d (filld, filld, filld); // loch2.CutBoundary (pmin, pmax); loch2.CutBoundary (Box<3> (pmin, pmax)); // pmin, pmax); } // locadfront = adfront; loch2.FindInnerBoxes (adfront, NULL); npoints.SetSize(0); loch2.GetOuterPoints (npoints); for (int i = 1; i <= npoints.Size(); i++) { if (meshbox.IsIn (npoints.Get(i))) { PointIndex gpnum = mesh.AddPoint (npoints.Get(i)); adfront->AddPoint (npoints.Get(i), gpnum); } } } } netgen-6.2.1804/libsrc/meshing/paralleltop.cpp0000644000175000017500000004441213272137567017745 0ustar kurtkurt#ifdef PARALLEL #include #include "paralleltop.hpp" namespace netgen { ParallelMeshTopology :: ParallelMeshTopology (const Mesh & amesh) : mesh(amesh) { is_updated = false; } ParallelMeshTopology :: ~ParallelMeshTopology () { ; } void ParallelMeshTopology :: Reset () { *testout << "ParallelMeshTopology::Reset" << endl; if ( ntasks == 1 ) return; int ned = mesh.GetTopology().GetNEdges(); int nfa = mesh.GetTopology().GetNFaces(); if (glob_edge.Size() != ned) { glob_edge.SetSize(ned); glob_face.SetSize(nfa); glob_edge = -1; glob_face = -1; loc2distedge.ChangeSize (ned); loc2distface.ChangeSize (nfa); } if (glob_vert.Size() != mesh.GetNV()) { SetNV(mesh.GetNV()); SetNE(mesh.GetNE()); } } void ParallelMeshTopology :: Print() const { ; } void ParallelMeshTopology :: SetDistantFaceNum (int dest, int locnum) { for ( int i = 0; i < loc2distface[locnum-1].Size(); i+=1 ) if ( loc2distface[locnum-1][i] == dest ) return; loc2distface.Add(locnum-1, dest); } void ParallelMeshTopology :: SetDistantPNum (int dest, int locnum) { for ( int i = 0; i < loc2distvert[locnum-1].Size(); i+=1 ) if ( loc2distvert[locnum-1][i] == dest ) return; loc2distvert.Add (locnum-1, dest); } void ParallelMeshTopology :: SetDistantEdgeNum (int dest, int locnum) { for ( int i = 0; i < loc2distedge[locnum-1].Size(); i+=1 ) if ( loc2distedge[locnum-1][i] == dest ) return; loc2distedge.Add (locnum-1, dest); } void ParallelMeshTopology :: SetNV (int anv) { glob_vert.SetSize(anv); glob_vert = -1; loc2distvert.ChangeSize (anv); } void ParallelMeshTopology :: SetNE ( int ane ) { glob_el.SetSize (ane); glob_el = -1; } void ParallelMeshTopology :: SetNSE ( int anse ) { glob_surfel.SetSize(anse); glob_surfel = -1; } void ParallelMeshTopology :: SetNSegm ( int anseg ) { glob_segm.SetSize (anseg); glob_segm = -1; } void ParallelMeshTopology :: UpdateCoarseGridGlobal () { // cout << "updatecoarsegridglobal called" << endl; if (id == 0) PrintMessage ( 3, "UPDATE GLOBAL COARSEGRID STARTS" ); int timer = NgProfiler::CreateTimer ("UpdateCoarseGridGlobal"); NgProfiler::RegionTimer reg(timer); *testout << "ParallelMeshTopology :: UpdateCoarseGridGlobal" << endl; const MeshTopology & topology = mesh.GetTopology(); if ( id == 0 ) { Array*> sendarrays(ntasks); for (int dest = 1; dest < ntasks; dest++) sendarrays[dest] = new Array; Array edges, faces; for (int el = 1; el <= mesh.GetNE(); el++) { topology.GetElementFaces (el, faces); topology.GetElementEdges (el, edges); const Element & volel = mesh.VolumeElement (el); Array & sendarray = *sendarrays[volel.GetPartition()]; for ( int i = 0; i < edges.Size(); i++ ) sendarray.Append (edges[i]); for ( int i = 0; i < faces.Size(); i++ ) sendarray.Append (faces[i]); } for (int el = 1; el <= mesh.GetNSE(); el++) { topology.GetSurfaceElementEdges (el, edges); const Element2d & surfel = mesh.SurfaceElement (el); Array & sendarray = *sendarrays[surfel.GetPartition()]; for ( int i = 0; i < edges.Size(); i++ ) sendarray.Append (edges[i]); sendarray.Append (topology.GetSurfaceElementFace (el)); } Array sendrequests; for (int dest = 1; dest < ntasks; dest++) sendrequests.Append (MyMPI_ISend (*sendarrays[dest], dest, MPI_TAG_MESH+10)); MPI_Waitall (sendrequests.Size(), &sendrequests[0], MPI_STATUS_IGNORE); for (int dest = 1; dest < ntasks; dest++) delete sendarrays[dest]; } else { Array recvarray; MyMPI_Recv (recvarray, 0, MPI_TAG_MESH+10); int ii = 0; Array faces, edges; for (int volel = 1; volel <= mesh.GetNE(); volel++) { topology.GetElementEdges ( volel, edges); for ( int i = 0; i < edges.Size(); i++) SetLoc2Glob_Edge ( edges[i], recvarray[ii++]); topology.GetElementFaces( volel, faces); for ( int i = 0; i < faces.Size(); i++) SetLoc2Glob_Face ( faces[i], recvarray[ii++]); } for (int surfel = 1; surfel <= mesh.GetNSE(); surfel++) { topology.GetSurfaceElementEdges (surfel, edges); for (int i = 0; i < edges.Size(); i++) SetLoc2Glob_Edge (edges[i], recvarray[ii++]); int face = topology.GetSurfaceElementFace (surfel); SetLoc2Glob_Face ( face, recvarray[ii++]); } } is_updated = true; } void ParallelMeshTopology :: UpdateCoarseGrid () { // cout << "UpdateCoarseGrid" << endl; // if (is_updated) return; Reset(); static int timer = NgProfiler::CreateTimer ("UpdateCoarseGrid"); NgProfiler::RegionTimer reg(timer); (*testout) << "UPDATE COARSE GRID PARALLEL TOPOLOGY " << endl; if (id == 0) PrintMessage (1, "update parallel topology"); // UpdateCoarseGridGlobal(); // MPI_Barrier (MPI_COMM_WORLD); MPI_Group MPI_GROUP_WORLD; MPI_Group MPI_LocalGroup; MPI_Comm MPI_LocalComm; int process_ranks[] = { 0 }; MPI_Comm_group (MPI_COMM_WORLD, &MPI_GROUP_WORLD); MPI_Group_excl (MPI_GROUP_WORLD, 1, process_ranks, &MPI_LocalGroup); MPI_Comm_create (MPI_COMM_WORLD, MPI_LocalGroup, &MPI_LocalComm); if (id == 0) return; const MeshTopology & topology = mesh.GetTopology(); Array cnt_send(ntasks-1); // update new vertices after mesh-refinement if (mesh.mlbetweennodes.Size() > 0) { // cout << "UpdateCoarseGrid - vertices" << endl; int newnv = mesh.mlbetweennodes.Size(); loc2distvert.ChangeSize(mesh.mlbetweennodes.Size()); /* for (PointIndex pi = PointIndex::BASE; pi < newnv+PointIndex::BASE; pi++) { PointIndex v1 = mesh.mlbetweennodes[pi][0]; PointIndex v2 = mesh.mlbetweennodes[pi][1]; if (mesh.mlbetweennodes[pi][0] != PointIndex::BASE-1) for (int dest = 1; dest < ntasks; dest++) if (IsExchangeVert (dest, v1) && IsExchangeVert (dest, v2)) SetDistantPNum(dest, pi); } */ bool changed = true; while (changed) { changed = false; // build exchange vertices cnt_send = 0; for (PointIndex pi : mesh.Points().Range()) for (int dist : GetDistantPNums(pi-PointIndex::BASE)) cnt_send[dist-1]++; TABLE dest2vert(cnt_send); for (PointIndex pi : mesh.Points().Range()) for (int dist : GetDistantPNums(pi-PointIndex::BASE)) dest2vert.Add (dist-1, pi); for (PointIndex pi = PointIndex::BASE; pi < newnv+PointIndex::BASE; pi++) { PointIndex v1 = mesh.mlbetweennodes[pi][0]; PointIndex v2 = mesh.mlbetweennodes[pi][1]; if (mesh.mlbetweennodes[pi][0] != PointIndex::BASE-1) // for (int dest = 1; dest < ntasks; dest++) for (int dest : GetDistantPNums(v1-PointIndex::BASE)) if (IsExchangeVert (dest, v1) && IsExchangeVert (dest, v2)) cnt_send[dest-1]++; } TABLE dest2pair(cnt_send); // for (int dest = 1; dest < ntasks; dest++) for (PointIndex pi = PointIndex::BASE; pi < newnv+PointIndex::BASE; pi++) { PointIndex v1 = mesh.mlbetweennodes[pi][0]; PointIndex v2 = mesh.mlbetweennodes[pi][1]; if (mesh.mlbetweennodes[pi][0] != PointIndex::BASE-1) for (int dest : GetDistantPNums(v1-PointIndex::BASE)) if (IsExchangeVert (dest, v1) && IsExchangeVert (dest, v2)) dest2pair.Add (dest-1, pi); } cnt_send = 0; int v1, v2; for (PointIndex pi = PointIndex::BASE; pi < newnv+PointIndex::BASE; pi++) { PointIndex v1 = mesh.mlbetweennodes[pi][0]; PointIndex v2 = mesh.mlbetweennodes[pi][1]; if (mesh.mlbetweennodes[pi][0] != PointIndex::BASE-1) for (int dest : GetDistantPNums(v1-PointIndex::BASE)) if (IsExchangeVert(dest, v2)) cnt_send[dest-1]+=2; } TABLE send_verts(cnt_send); Array loc2exchange(mesh.GetNV()); for (int dest = 1; dest < ntasks; dest++) if (dest != id) { loc2exchange = -1; int cnt = 0; /* for (PointIndex pi : mesh.Points().Range()) if (IsExchangeVert(dest, pi)) loc2exchange[pi] = cnt++; */ for (PointIndex pi : dest2vert[dest-1]) loc2exchange[pi] = cnt++; // for (PointIndex pi = PointIndex::BASE; pi < newnv+PointIndex::BASE; pi++) for (PointIndex pi : dest2pair[dest-1]) { PointIndex v1 = mesh.mlbetweennodes[pi][0]; PointIndex v2 = mesh.mlbetweennodes[pi][1]; if (mesh.mlbetweennodes[pi][0] != PointIndex::BASE-1) if (IsExchangeVert (dest, v1) && IsExchangeVert (dest, v2)) { send_verts.Add (dest-1, loc2exchange[v1]); send_verts.Add (dest-1, loc2exchange[v2]); } } } TABLE recv_verts(ntasks-1); MyMPI_ExchangeTable (send_verts, recv_verts, MPI_TAG_MESH+9, MPI_LocalComm); for (int dest = 1; dest < ntasks; dest++) if (dest != id) { loc2exchange = -1; int cnt = 0; /* for (PointIndex pi : mesh.Points().Range()) if (IsExchangeVert(dest, pi)) loc2exchange[pi] = cnt++; */ for (PointIndex pi : dest2vert[dest-1]) loc2exchange[pi] = cnt++; FlatArray recvarray = recv_verts[dest-1]; for (int ii = 0; ii < recvarray.Size(); ii+=2) for (PointIndex pi : dest2pair[dest-1]) // for (PointIndex pi = PointIndex::BASE; pi < newnv+PointIndex::BASE; pi++) { PointIndex v1 = mesh.mlbetweennodes[pi][0]; PointIndex v2 = mesh.mlbetweennodes[pi][1]; if (mesh.mlbetweennodes[pi][0] != PointIndex::BASE-1) { INDEX_2 re(recvarray[ii], recvarray[ii+1]); INDEX_2 es(loc2exchange[v1], loc2exchange[v2]); if (es == re && !IsExchangeVert(dest, pi)) { SetDistantPNum(dest, pi); changed = true; } } } } } } Array sendarray, recvarray; // cout << "UpdateCoarseGrid - edges" << endl; // static int timerv = NgProfiler::CreateTimer ("UpdateCoarseGrid - ex vertices"); static int timere = NgProfiler::CreateTimer ("UpdateCoarseGrid - ex edges"); static int timerf = NgProfiler::CreateTimer ("UpdateCoarseGrid - ex faces"); NgProfiler::StartTimer (timere); int nfa = topology . GetNFaces(); int ned = topology . GetNEdges(); // build exchange vertices cnt_send = 0; for (PointIndex pi : mesh.Points().Range()) for (int dist : GetDistantPNums(pi-PointIndex::BASE)) cnt_send[dist-1]++; TABLE dest2vert(cnt_send); for (PointIndex pi : mesh.Points().Range()) for (int dist : GetDistantPNums(pi-PointIndex::BASE)) dest2vert.Add (dist-1, pi); // exchange edges cnt_send = 0; int v1, v2; for (int edge = 1; edge <= ned; edge++) { topology.GetEdgeVertices (edge, v1, v2); for (int dest = 1; dest < ntasks; dest++) if (IsExchangeVert (dest, v1) && IsExchangeVert (dest, v2)) cnt_send[dest-1]+=1; } TABLE dest2edge(cnt_send); for (int & v : cnt_send) v *= 2; TABLE send_edges(cnt_send); for (int edge = 1; edge <= ned; edge++) { topology.GetEdgeVertices (edge, v1, v2); for (int dest = 1; dest < ntasks; dest++) if (IsExchangeVert (dest, v1) && IsExchangeVert (dest, v2)) dest2edge.Add (dest-1, edge); } Array loc2exchange(mesh.GetNV()); for (int dest = 1; dest < ntasks; dest++) { loc2exchange = -1; int cnt = 0; for (PointIndex pi : dest2vert[dest-1]) loc2exchange[pi] = cnt++; for (int edge : dest2edge[dest-1]) { topology.GetEdgeVertices (edge, v1, v2); if (IsExchangeVert (dest, v1) && IsExchangeVert (dest, v2)) { send_edges.Add (dest-1, loc2exchange[v1]); send_edges.Add (dest-1, loc2exchange[v2]); } } } // cout << "UpdateCoarseGrid - edges mpi-exchange" << endl; TABLE recv_edges(ntasks-1); MyMPI_ExchangeTable (send_edges, recv_edges, MPI_TAG_MESH+9, MPI_LocalComm); // cout << "UpdateCoarseGrid - edges mpi-exchange done" << endl; /* for (int dest = 1; dest < ntasks; dest++) { auto ex2loc = dest2vert[dest-1]; FlatArray recvarray = recv_edges[dest-1]; for (int ii = 0; ii < recvarray.Size(); ii+=2) for (int edge : dest2edge[dest-1]) { topology.GetEdgeVertices (edge, v1, v2); INDEX_2 re(ex2loc[recvarray[ii]], ex2loc[recvarray[ii+1]]); INDEX_2 es(v1, v2); if (es == re) SetDistantEdgeNum(dest, edge); } } */ for (int dest = 1; dest < ntasks; dest++) { auto ex2loc = dest2vert[dest-1]; if (ex2loc.Size() == 0) continue; INDEX_2_CLOSED_HASHTABLE vert2edge(2*dest2edge[dest-1].Size()+10); for (int edge : dest2edge[dest-1]) { topology.GetEdgeVertices (edge, v1, v2); vert2edge.Set(INDEX_2(v1,v2), edge); } FlatArray recvarray = recv_edges[dest-1]; for (int ii = 0; ii < recvarray.Size(); ii+=2) { INDEX_2 re(ex2loc[recvarray[ii]], ex2loc[recvarray[ii+1]]); if (vert2edge.Used(re)) SetDistantEdgeNum(dest, vert2edge.Get(re)); } } NgProfiler::StopTimer (timere); // MPI_Barrier (MPI_LocalComm); // cout << "UpdateCoarseGrid - faces" << endl; if (mesh.GetDimension() == 3) { NgProfiler::StartTimer (timerf); Array verts; // exchange faces cnt_send = 0; for (int face = 1; face <= nfa; face++) { topology.GetFaceVertices (face, verts); for (int dest = 1; dest < ntasks; dest++) if (dest != id) if (IsExchangeVert (dest, verts[0]) && IsExchangeVert (dest, verts[1]) && IsExchangeVert (dest, verts[2])) cnt_send[dest-1]++; } TABLE dest2face(cnt_send); for (int face = 1; face <= nfa; face++) { topology.GetFaceVertices (face, verts); for (int dest = 1; dest < ntasks; dest++) if (dest != id) if (IsExchangeVert (dest, verts[0]) && IsExchangeVert (dest, verts[1]) && IsExchangeVert (dest, verts[2])) dest2face.Add(dest-1, face); } for (int & c : cnt_send) c*=3; TABLE send_faces(cnt_send); Array loc2exchange(mesh.GetNV()); for (int dest = 1; dest < ntasks; dest++) if (dest != id) { /* loc2exchange = -1; int cnt = 0; for (PointIndex pi : mesh.Points().Range()) if (IsExchangeVert(dest, pi)) loc2exchange[pi] = cnt++; */ if (dest2vert[dest-1].Size() == 0) continue; loc2exchange = -1; int cnt = 0; for (PointIndex pi : dest2vert[dest-1]) loc2exchange[pi] = cnt++; for (int face : dest2face[dest-1]) { topology.GetFaceVertices (face, verts); if (IsExchangeVert (dest, verts[0]) && IsExchangeVert (dest, verts[1]) && IsExchangeVert (dest, verts[2])) { send_faces.Add (dest-1, loc2exchange[verts[0]]); send_faces.Add (dest-1, loc2exchange[verts[1]]); send_faces.Add (dest-1, loc2exchange[verts[2]]); } } } // cout << "UpdateCoarseGrid - faces mpi-exchange" << endl; TABLE recv_faces(ntasks-1); MyMPI_ExchangeTable (send_faces, recv_faces, MPI_TAG_MESH+9, MPI_LocalComm); // cout << "UpdateCoarseGrid - faces mpi-exchange done" << endl; /* for (int dest = 1; dest < ntasks; dest++) if (dest != id) { loc2exchange = -1; int cnt = 0; for (PointIndex pi : dest2vert[dest-1]) loc2exchange[pi] = cnt++; FlatArray recvarray = recv_faces[dest-1]; for (int ii = 0; ii < recvarray.Size(); ii+=3) for (int face : dest2face[dest-1]) { topology.GetFaceVertices (face, verts); INDEX_3 re(recvarray[ii], recvarray[ii+1], recvarray[ii+2]); INDEX_3 es(loc2exchange[verts[0]], loc2exchange[verts[1]], loc2exchange[verts[2]]); if (es == re) SetDistantFaceNum(dest, face); } } */ for (int dest = 1; dest < ntasks; dest++) { auto ex2loc = dest2vert[dest-1]; if (ex2loc.Size() == 0) continue; INDEX_3_CLOSED_HASHTABLE vert2face(2*dest2face[dest-1].Size()+10); for (int face : dest2face[dest-1]) { topology.GetFaceVertices (face, verts); vert2face.Set(INDEX_3(verts[0], verts[1], verts[2]), face); } FlatArray recvarray = recv_faces[dest-1]; for (int ii = 0; ii < recvarray.Size(); ii+=3) { INDEX_3 re(ex2loc[recvarray[ii]], ex2loc[recvarray[ii+1]], ex2loc[recvarray[ii+2]]); if (vert2face.Used(re)) SetDistantFaceNum(dest, vert2face.Get(re)); } } /* Array glob2loc; int maxface = 0; for (int face = 1; face <= nfa; face++) maxface = max (maxface, GetGlobalFaceNum (face)); // glob2loc.SetSize (nfaglob); glob2loc.SetSize (maxface); glob2loc = -1; for (int loc = 1; loc <= nfa; loc++) glob2loc[GetGlobalFaceNum(loc)] = loc; cnt_send = 0; Array verts; for (int face = 1; face <= nfa; face++) { topology.GetFaceVertices (face, verts); for (int dest = 1; dest < ntasks; dest++) if (IsExchangeVert (dest, verts[0]) && IsExchangeVert (dest, verts[1]) && IsExchangeVert (dest, verts[2])) { cnt_send[dest-1]+=2; } } TABLE send_faces(cnt_send); for (int face = 1; face <= nfa; face++) { topology.GetFaceVertices (face, verts); for (int dest = 1; dest < ntasks; dest++) { if (IsExchangeVert (dest, verts[0]) && IsExchangeVert (dest, verts[1]) && IsExchangeVert (dest, verts[2])) { send_faces.Add (dest-1, GetGlobalFaceNum(face)); send_faces.Add (dest-1, face); } } } TABLE recv_faces(ntasks-1); MyMPI_ExchangeTable (send_faces, recv_faces, MPI_TAG_MESH+8, MPI_LocalComm); for (int sender = 1; sender < ntasks; sender ++) if (id != sender) { FlatArray recvarray = recv_faces[sender-1]; for (int ii = 0; ii < recvarray.Size(); ) { int globf = recvarray[ii++]; int distf = recvarray[ii++]; if (globf <= maxface) { int locf = glob2loc[globf]; if (locf != -1) SetDistantFaceNum (sender, locf); } } } */ NgProfiler::StopTimer (timerf); } // cout << "UpdateCoarseGrid - done" << endl; is_updated = true; } } #endif netgen-6.2.1804/libsrc/meshing/meshtype.hpp0000644000175000017500000011462313272137567017273 0ustar kurtkurt#ifndef MESHTYPE #define MESHTYPE /**************************************************************************/ /* File: meshtype.hpp */ /* Author: Joachim Schoeberl */ /* Date: 01. Okt. 95 */ /**************************************************************************/ namespace netgen { /* Classes for NETGEN */ enum ELEMENT_TYPE : unsigned char { SEGMENT = 1, SEGMENT3 = 2, TRIG = 10, QUAD=11, TRIG6 = 12, QUAD6 = 13, QUAD8 = 14, TET = 20, TET10 = 21, PYRAMID = 22, PRISM = 23, PRISM12 = 24, HEX = 25 }; /* typedef int ELEMENT_EDGE[2]; // initial point, end point typedef int ELEMENT_FACE[4]; // points, last one is -1 for trig */ struct ELEMENT_EDGE { int vals[2]; int & operator[] (size_t i) { return vals[i]; } int operator[] (size_t i) const { return vals[i]; } }; struct ELEMENT_FACE { int vals[4]; int & operator[] (size_t i) { return vals[i]; } int operator[] (size_t i) const { return vals[i]; } }; #define ELEMENT_MAXPOINTS 12 #define ELEMENT2D_MAXPOINTS 8 enum POINTTYPE { FIXEDPOINT = 1, EDGEPOINT = 2, SURFACEPOINT = 3, INNERPOINT = 4 }; enum ELEMENTTYPE { FREEELEMENT, FIXEDELEMENT }; enum OPTIMIZEGOAL { OPT_QUALITY, OPT_CONFORM, OPT_REST, OPT_WORSTCASE, OPT_LEGAL }; extern DLL_HEADER size_t timestamp; inline size_t GetTimeStamp() { return timestamp; } inline size_t NextTimeStamp() { timestamp++; return timestamp; } /* extern DLL_HEADER int GetTimeStamp(); extern DLL_HEADER int NextTimeStamp(); */ class PointGeomInfo { public: int trignum; // for STL Meshing double u, v; // for OCC Meshing PointGeomInfo () = default; // : trignum(-1), u(0), v(0) { ; } PointGeomInfo (const PointGeomInfo&) = default; PointGeomInfo (PointGeomInfo &&) = default; PointGeomInfo & operator= (const PointGeomInfo&) = default; PointGeomInfo & operator= (PointGeomInfo&&) = default; }; inline ostream & operator<< (ostream & ost, const PointGeomInfo & gi) { return (ost << gi.trignum << " " << gi.u << " " << gi.v); } inline istream & operator>> (istream & ist, PointGeomInfo & gi) { return (ist >> gi.trignum >> gi.u >> gi.v); } #define MULTIPOINTGEOMINFO_MAX 100 class MultiPointGeomInfo { int cnt; PointGeomInfo mgi[MULTIPOINTGEOMINFO_MAX]; public: MultiPointGeomInfo () { cnt = 0; } int AddPointGeomInfo (const PointGeomInfo & gi); void Init () { cnt = 0; } void DeleteAll () { cnt = 0; } int GetNPGI () const { return cnt; } const PointGeomInfo & GetPGI (int i) const { return mgi[i-1]; } }; class EdgePointGeomInfo { public: int edgenr; int body; // for ACIS double dist; // for 2d meshing double u, v; // for OCC Meshing public: EdgePointGeomInfo () : edgenr(0), body(0), dist(0.0), u(0.0), v(0.0) { ; } EdgePointGeomInfo & operator= (const EdgePointGeomInfo & gi2) { edgenr = gi2.edgenr; body = gi2.body; dist = gi2.dist; u = gi2.u; v = gi2.v; return *this; } }; inline ostream & operator<< (ostream & ost, const EdgePointGeomInfo & gi) { ost << "epgi: edgnr=" << gi.edgenr << ", dist=" << gi.dist; return ost; } class PointIndex { int i; public: PointIndex () = default; PointIndex (const PointIndex&) = default; PointIndex (PointIndex &&) = default; PointIndex & operator= (const PointIndex&) = default; PointIndex & operator= (PointIndex&&) = default; PointIndex (int ai) : i(ai) { ; } // PointIndex & operator= (const PointIndex &ai) { i = ai.i; return *this; } operator int () const { return i; } PointIndex operator++ (int) { PointIndex hi(*this); i++; return hi; } PointIndex operator-- (int) { PointIndex hi(*this); i--; return hi; } PointIndex operator++ () { i++; return *this; } PointIndex operator-- () { i--; return *this; } void Invalidate() { i = PointIndex::BASE-1; } bool IsValid() const { return i != PointIndex::BASE-1; } #ifdef BASE0 enum { BASE = 0 }; #else enum { BASE = 1 }; #endif ngstd::Archive & DoArchive (ngstd::Archive & ar) { return ar & i; } }; inline ngstd::Archive & operator & (ngstd::Archive & archive, PointIndex & mp) { return mp.DoArchive(archive); } inline istream & operator>> (istream & ist, PointIndex & pi) { int i; ist >> i; pi = PointIndex(i); return ist; } inline ostream & operator<< (ostream & ost, const PointIndex & pi) { return (ost << int(pi)); } template class PointIndices; template <> class PointIndices<2> : public INDEX_2 { public: PointIndices () = default; PointIndices (INDEX_2 i2) : INDEX_2(i2) { ; } PointIndices (PointIndex i1, PointIndex i2) : INDEX_2(i1,i2) { ; } PointIndex operator[] (int i) const { return PointIndex(INDEX_2::operator[](i)); } PointIndex & operator[] (int i) { return reinterpret_cast(INDEX_2::operator[](i)); } static PointIndices Sort(PointIndex i1, PointIndex i2) { return INDEX_2::Sort(i1, i2); } }; class ElementIndex { int i; public: ElementIndex () { ; } ElementIndex (int ai) : i(ai) { ; } ElementIndex & operator= (const ElementIndex & ai) { i = ai.i; return *this; } ElementIndex & operator= (int ai) { i = ai; return *this; } operator int () const { return i; } ElementIndex operator++ (int) { return ElementIndex(i++); } ElementIndex operator-- (int) { return ElementIndex(i--); } ElementIndex & operator++ () { ++i; return *this; } ElementIndex & operator-- () { --i; return *this; } }; inline istream & operator>> (istream & ist, ElementIndex & pi) { int i; ist >> i; pi = i; return ist; } inline ostream & operator<< (ostream & ost, const ElementIndex & pi) { return (ost << int(pi)); } class SurfaceElementIndex { int i; public: SurfaceElementIndex () = default; SurfaceElementIndex (int ai) : i(ai) { ; } /* SurfaceElementIndex & operator= (const SurfaceElementIndex & ai) { i = ai.i; return *this; } */ SurfaceElementIndex & operator= (const SurfaceElementIndex & ai) = default; SurfaceElementIndex & operator= (int ai) { i = ai; return *this; } operator int () const { return i; } SurfaceElementIndex operator++ (int) { SurfaceElementIndex hi(*this); i++; return hi; } SurfaceElementIndex operator-- (int) { SurfaceElementIndex hi(*this); i--; return hi; } SurfaceElementIndex & operator++ () { ++i; return *this; } SurfaceElementIndex & operator-- () { --i; return *this; } SurfaceElementIndex & operator+= (int inc) { i+=inc; return *this; } ngstd::Archive & DoArchive (ngstd::Archive & ar) { return ar & i; } }; inline ngstd::Archive & operator & (ngstd::Archive & archive, SurfaceElementIndex & mp) { return mp.DoArchive(archive); } inline istream & operator>> (istream & ist, SurfaceElementIndex & pi) { int i; ist >> i; pi = i; return ist; } inline ostream & operator<< (ostream & ost, const SurfaceElementIndex & pi) { return (ost << int(pi)); } class SegmentIndex { int i; public: SegmentIndex () { ; } SegmentIndex (int ai) : i(ai) { ; } SegmentIndex & operator= (const SegmentIndex & ai) { i = ai.i; return *this; } SegmentIndex & operator= (int ai) { i = ai; return *this; } operator int () const { return i; } SegmentIndex & operator++ (int) { i++; return *this; } SegmentIndex & operator-- (int) { i--; return *this; } }; inline istream & operator>> (istream & ist, SegmentIndex & pi) { int i; ist >> i; pi = i; return ist; } inline ostream & operator<< (ostream & ost, const SegmentIndex & pi) { return (ost << int(pi)); } /** Point in the mesh. Contains layer (a new feature in 4.3 for overlapping meshes. */ class MeshPoint : public Point<3> { int layer; double singular; // singular factor for hp-refinement POINTTYPE type; public: MeshPoint () { ; } MeshPoint (const Point<3> & ap, int alayer = 1, POINTTYPE apt = INNERPOINT) : Point<3> (ap), layer(alayer), singular(0.),type(apt) { ; } void SetPoint (const Point<3> & ap) { Point<3>::operator= (ap); layer = 0; singular = 0; } void Scale(double factor) { *testout << "before: " << x[0] << endl; x[0] *= factor; x[1] *= factor; x[2] *= factor; *testout << "after: " << x[0] << endl;} int GetLayer() const { return layer; } POINTTYPE Type() const { return type; } void SetType(POINTTYPE at) { type = at; } double Singularity() const { return singular; } void Singularity(double s) { singular = s; } bool IsSingular() const { return (singular != 0.0); } #ifdef PARALLEL static MPI_Datatype MyGetMPIType ( ); #endif ngstd::Archive & DoArchive (ngstd::Archive & ar) { ar & x[0] & x[1] & x[2] & layer & singular; ar & (unsigned char&)(type); return ar; } }; inline ngstd::Archive & operator & (ngstd::Archive & archive, MeshPoint & mp) { return mp.DoArchive(archive); } inline ostream & operator<<(ostream & s, const MeshPoint & pt) { return (s << Point<3> (pt)); } typedef Array T_POINTS; /** Triangle element for surface mesh generation. */ class Element2d { /// point numbers PointIndex pnum[ELEMENT2D_MAXPOINTS]; /// geom info of points PointGeomInfo geominfo[ELEMENT2D_MAXPOINTS]; /// surface nr short int index; /// ELEMENT_TYPE typ; /// number of points unsigned int np:4; bool badel:1; bool refflag:1; // marked for refinement bool strongrefflag:1; bool deleted:1; // element is deleted // Philippose - 08 August 2010 // Set a new property for each element, to // control whether it is visible or not bool visible:1; // element visible bool is_curved:1; // element is (high order) curved /// order for hp-FEM unsigned int orderx:6; unsigned int ordery:6; #ifdef PARALLEL int partitionNumber; #endif /// a linked list for all segments in the same face SurfaceElementIndex next; public: /// Element2d () = default; Element2d (const Element2d &) = default; Element2d (Element2d &&) = default; Element2d & operator= (const Element2d &) = default; Element2d & operator= (Element2d &&) = default; /// DLL_HEADER Element2d (int anp); /// DLL_HEADER Element2d (ELEMENT_TYPE type); /// DLL_HEADER Element2d (int pi1, int pi2, int pi3); /// DLL_HEADER Element2d (int pi1, int pi2, int pi3, int pi4); /// ELEMENT_TYPE GetType () const { return typ; } /// void SetType (ELEMENT_TYPE atyp) { typ = atyp; switch (typ) { case TRIG: np = 3; break; case QUAD: np = 4; break; case TRIG6: np = 6; break; case QUAD6: np = 6; break; case QUAD8: np = 8; break; default: PrintSysError ("Element2d::SetType, illegal type ", int(typ)); } is_curved = (np >= 4); } /// int GetNP() const { return np; } /// int GetNV() const { if (typ == TRIG || typ == TRIG6) return 3; else { #ifdef DEBUG if (typ != QUAD && typ != QUAD6 && typ != QUAD8) PrintSysError ("element2d::GetNV not implemented for typ", typ); #endif return 4; } /* switch (typ) { case TRIG: case TRIG6: return 3; case QUAD: case QUAD8: case QUAD6: return 4; default: #ifdef DEBUG PrintSysError ("element2d::GetNV not implemented for typ", typ) #endif ; } return np; */ } /// PointIndex & operator[] (int i) { return pnum[i]; } /// const PointIndex & operator[] (int i) const { return pnum[i]; } FlatArray PNums () const { return FlatArray (np, &pnum[0]); } FlatArray PNums () { return FlatArray (np, &pnum[0]); } auto Vertices() const { return FlatArray (GetNV(), &pnum[0]); } /// PointIndex & PNum (int i) { return pnum[i-1]; } /// const PointIndex & PNum (int i) const { return pnum[i-1]; } /// PointIndex & PNumMod (int i) { return pnum[(i-1) % np]; } /// const PointIndex & PNumMod (int i) const { return pnum[(i-1) % np]; } /// /// PointGeomInfo & GeomInfoPi (int i) { return geominfo[i-1]; } /// const PointGeomInfo & GeomInfoPi (int i) const { return geominfo[i-1]; } /// PointGeomInfo & GeomInfoPiMod (int i) { return geominfo[(i-1) % np]; } /// const PointGeomInfo & GeomInfoPiMod (int i) const { return geominfo[(i-1) % np]; } ngstd::Archive & DoArchive (ngstd::Archive & ar) { short _np, _typ; bool _curved, _vis, _deleted; if (ar.Output()) { _np = np; _typ = typ; _curved = is_curved; _vis = visible; _deleted = deleted; } ar & _np & _typ & index & _curved & _vis & _deleted; // ar & next; don't need if (ar.Input()) { np = _np; typ = ELEMENT_TYPE(_typ); is_curved = _curved; visible = _vis; deleted = _deleted; } for (size_t i = 0; i < np; i++) ar & pnum[i]; return ar; } void SetIndex (int si) { index = si; } /// int GetIndex () const { return index; } int GetOrder () const { return orderx; } void SetOrder (int aorder) { orderx = ordery = aorder; } void GetOrder (int & ox, int & oy) const { ox = orderx, oy =ordery;}; void GetOrder (int & ox, int & oy, int & oz) const { ox = orderx; oy = ordery; oz=0; } void SetOrder (int ox, int oy, int /* oz */) { orderx = ox; ordery = oy;} void SetOrder (int ox, int oy) { orderx = ox; ordery = oy;} /// void GetBox (const T_POINTS & points, Box3d & box) const; /// invert orientation inline void Invert (); /// void Invert2 (); /// first point number is smallest inline void NormalizeNumbering (); /// void NormalizeNumbering2 (); bool BadElement() const { return badel; } // friend ostream & operator<<(ostream & s, const Element2d & el); friend class Mesh; /// get number of 'integration points' int GetNIP () const; void GetIntegrationPoint (int ip, Point2d & p, double & weight) const; void GetTransformation (int ip, const Array & points, class DenseMatrix & trans) const; void GetTransformation (int ip, class DenseMatrix & pmat, class DenseMatrix & trans) const; void GetShape (const Point2d & p, class Vector & shape) const; void GetShapeNew (const Point<2> & p, class FlatVector & shape) const; template void GetShapeNew (const Point<2,T> & p, TFlatVector shape) const; /// matrix 2 * np void GetDShape (const Point2d & p, class DenseMatrix & dshape) const; template void GetDShapeNew (const Point<2,T> & p, class MatrixFixWidth<2,T> & dshape) const; /// matrix 2 * np void GetPointMatrix (const Array & points, class DenseMatrix & pmat) const; void ComputeIntegrationPointData () const; double CalcJacobianBadness (const Array & points) const; double CalcJacobianBadness (const T_POINTS & points, const Vec<3> & n) const; double CalcJacobianBadnessDirDeriv (const Array & points, int pi, Vec2d & dir, double & dd) const; void Delete () { deleted = 1; for (PointIndex & p : pnum) p.Invalidate(); } bool IsDeleted () const { #ifdef DEBUG if (pnum[0] < PointIndex::BASE && !deleted) cerr << "Surfelement has illegal pnum, but not marked as deleted" << endl; #endif return deleted; } // Philippose - 08 August 2010 // Access functions for the new property: visible void Visible(bool vis = 1) { visible = vis; } bool IsVisible () const { return visible; } void SetRefinementFlag (bool rflag = 1) { refflag = rflag; } bool TestRefinementFlag () const { return refflag; } void SetStrongRefinementFlag (bool rflag = 1) { strongrefflag = rflag; } bool TestStrongRefinementFlag () const { return strongrefflag; } bool IsCurved () const { return is_curved; } void SetCurved (bool acurved) { is_curved = acurved; } SurfaceElementIndex NextElement() { return next; } bool operator==(const Element2d & el2) const; int HasFace(const Element2d& el) const; /// int meshdocval; /// int hp_elnr; #ifdef PARALLEL int GetPartition () const { return partitionNumber; } void SetPartition (int nr) { partitionNumber = nr; }; #endif }; inline ngstd::Archive & operator & (ngstd::Archive & archive, Element2d & mp) { return mp.DoArchive(archive); } ostream & operator<<(ostream & s, const Element2d & el); class IntegrationPointData { public: Point<3> p; double weight; Vector shape; DenseMatrix dshape; }; /** Volume element */ class Element { private: /// point numbers PointIndex pnum[ELEMENT_MAXPOINTS]; /// ELEMENT_TYPE typ; /// number of points (4..tet, 5..pyramid, 6..prism, 8..hex, 10..quad tet, 12..quad prism) int np:5; /// class flagstruct { public: bool marked:1; // marked for refinement bool badel:1; // angles worse then limit bool reverse:1; // for refinement a la Bey bool illegal:1; // illegal, will be split or swapped bool illegal_valid:1; // is illegal-flag valid ? bool badness_valid:1; // is badness valid ? bool refflag:1; // mark element for refinement bool strongrefflag:1; bool deleted:1; // element is deleted, will be removed from array bool fixed:1; // don't change element in optimization }; /// sub-domain index short int index; /// order for hp-FEM unsigned int orderx:6; unsigned int ordery:6; unsigned int orderz:6; /* unsigned int levelx:6; unsigned int levely:6; unsigned int levelz:6; */ /// stored shape-badness of element float badness; bool is_curved:1; // element is (high order) curved #ifdef PARALLEL /// number of partition for parallel computation int partitionNumber; #endif public: flagstruct flags; /// DLL_HEADER Element () = default; Element (const Element &) = default; Element (Element &&) = default; Element & operator= (const Element &) = default; Element & operator= (Element &&) = default; /// Element (int anp); /// Element (ELEMENT_TYPE type); /// // Element & operator= (const Element & el2); /// void SetNP (int anp); /// void SetType (ELEMENT_TYPE atyp); /// int GetNP () const { return np; } /// uint8_t GetNV() const { __assume(typ >= TET && typ <= HEX); switch (typ) { case TET: case TET10: return 4; case PRISM12: case PRISM: return 6; case PYRAMID: return 5; case HEX: return 8; default: // not a 3D element #ifdef DEBUG PrintSysError ("Element3d::GetNV not implemented for typ ", typ); #endif __assume(false); return -1; } } bool operator==(const Element & el2) const; // old style: int NP () const { return np; } /// ELEMENT_TYPE GetType () const { return typ; } /// PointIndex & operator[] (int i) { return pnum[i]; } /// const PointIndex & operator[] (int i) const { return pnum[i]; } FlatArray PNums () const { return FlatArray (np, &pnum[0]); } /// PointIndex & PNum (int i) { return pnum[i-1]; } /// const PointIndex & PNum (int i) const { return pnum[i-1]; } /// PointIndex & PNumMod (int i) { return pnum[(i-1) % np]; } /// const PointIndex & PNumMod (int i) const { return pnum[(i-1) % np]; } ngstd::Archive & DoArchive (ngstd::Archive & ar) { short _np, _typ; if (ar.Output()) { _np = np; _typ = typ; } ar & _np & _typ & index; if (ar.Input()) { np = _np; typ = ELEMENT_TYPE(_typ); } for (size_t i = 0; i < np; i++) ar & pnum[i]; return ar; } /// void SetIndex (int si) { index = si; } /// int GetIndex () const { return index; } int GetOrder () const { return orderx; } void SetOrder (const int aorder) ; void GetOrder (int & ox, int & oy, int & oz) const { ox = orderx; oy = ordery; oz = orderz; } void SetOrder (const int ox, const int oy, const int oz); // void GetLevel (int & ox, int & oy, int & oz) const { ox = levelx; oy = levely; oz = levelz; } // void SetLevel (int ox, int oy, int oz) { levelx = ox; levely = oy; levelz = oz; } /// void GetBox (const T_POINTS & points, Box3d & box) const; /// Calculates Volume of element double Volume (const T_POINTS & points) const; /// DLL_HEADER void Print (ostream & ost) const; /// int GetNFaces () const { switch (typ) { case TET: case TET10: return 4; case PYRAMID: return 5; case PRISM: case PRISM12: return 5; case HEX: return 6; default: #ifdef DEBUG PrintSysError ("element3d::GetNFaces not implemented for typ", typ) #endif ; } return 0; } /// inline void GetFace (int i, Element2d & face) const; /// void GetFace2 (int i, Element2d & face) const; /// void Invert (); /// split into 4 node tets void GetTets (Array & locels) const; /// split into 4 node tets, local point nrs void GetTetsLocal (Array & locels) const; /// returns coordinates of nodes // void GetNodesLocal (Array > & points) const; void GetNodesLocalNew (Array > & points) const; /// split surface into 3 node trigs void GetSurfaceTriangles (Array & surftrigs) const; /// get number of 'integration points' int GetNIP () const; void GetIntegrationPoint (int ip, Point<3> & p, double & weight) const; void GetTransformation (int ip, const T_POINTS & points, class DenseMatrix & trans) const; void GetTransformation (int ip, class DenseMatrix & pmat, class DenseMatrix & trans) const; void GetShape (const Point<3> & p, class Vector & shape) const; // void GetShapeNew (const Point<3> & p, class FlatVector & shape) const; template void GetShapeNew (const Point<3,T> & p, TFlatVector shape) const; /// matrix 2 * np void GetDShape (const Point<3> & p, class DenseMatrix & dshape) const; template void GetDShapeNew (const Point<3,T> & p, class MatrixFixWidth<3,T> & dshape) const; /// matrix 3 * np void GetPointMatrix (const T_POINTS & points, class DenseMatrix & pmat) const; void ComputeIntegrationPointData () const; double CalcJacobianBadness (const T_POINTS & points) const; double CalcJacobianBadnessDirDeriv (const T_POINTS & points, int pi, Vec<3> & dir, double & dd) const; double CalcJacobianBadnessGradient (const T_POINTS & points, int pi, Vec<3> & grad) const; /// // friend ostream & operator<<(ostream & s, const Element & el); void SetRefinementFlag (bool rflag = 1) { flags.refflag = rflag; } int TestRefinementFlag () const { return flags.refflag; } void SetStrongRefinementFlag (bool rflag = 1) { flags.strongrefflag = rflag; } int TestStrongRefinementFlag () const { return flags.strongrefflag; } int Illegal () const { return flags.illegal; } int IllegalValid () const { return flags.illegal_valid; } void SetIllegal (int aillegal) { flags.illegal = aillegal ? 1 : 0; flags.illegal_valid = 1; } void SetLegal (int alegal) { flags.illegal = alegal ? 0 : 1; flags.illegal_valid = 1; } void Delete () { flags.deleted = 1; } bool IsDeleted () const { #ifdef DEBUG if (pnum[0] < PointIndex::BASE && !flags.deleted) cerr << "Volelement has illegal pnum, but not marked as deleted" << endl; #endif return flags.deleted; } bool IsCurved () const { return is_curved; } void SetCurved (bool acurved) { is_curved = acurved; } #ifdef PARALLEL int GetPartition () const { return partitionNumber; } void SetPartition (int nr) { partitionNumber = nr; }; #else int GetPartition () const { return 0; } #endif int hp_elnr; }; inline ngstd::Archive & operator & (ngstd::Archive & archive, Element & mp) { return mp.DoArchive(archive); } ostream & operator<<(ostream & s, const Element & el); /** Edge segment. */ class Segment { public: /// DLL_HEADER Segment(); DLL_HEADER Segment (const Segment& other); ~Segment() { ; } // friend ostream & operator<<(ostream & s, const Segment & seg); PointIndex pnums[3]; // p1, p2, pmid int edgenr; /// double singedge_left; double singedge_right; /// 0.. not first segment of segs, 1..first of class, 2..first of class, inverse unsigned int seginfo:2; /// surface decoding index int si; /// co dim 2 deconding index int cd2i; /// domain number inner side int domin; /// domain number outer side int domout; /// top-level object number of surface int tlosurf; /// PointGeomInfo geominfo[2]; /// surfaces describing edge int surfnr1, surfnr2; /// EdgePointGeomInfo epgeominfo[2]; /// // int pmid; // for second order /// int meshdocval; #ifdef PARALLEL /// number of partition for parallel computation int partitionNumber; #endif private: string* bcname; bool is_curved; public: /* PointIndex operator[] (int i) const { return (i == 0) ? p1 : p2; } PointIndex & operator[] (int i) { return (i == 0) ? p1 : p2; } */ Segment& operator=(const Segment & other); int hp_elnr; void SetBCName ( string * abcname ) { bcname = abcname; } string * BCNamePtr () { return bcname; } const string * BCNamePtr () const { return bcname; } const string & GetBCName () const { static string defaultstring = "default"; if (! bcname ) return defaultstring; return *bcname; } int GetNP() const { return (pnums[2] < 0) ? 2 : 3; } ELEMENT_TYPE GetType() const { return (pnums[2] < 0) ? SEGMENT : SEGMENT3; } PointIndex & operator[] (int i) { return pnums[i]; } const PointIndex & operator[] (int i) const { return pnums[i]; } bool IsCurved () const { return is_curved; } void SetCurved (bool acurved) { is_curved = acurved; } #ifdef PARALLEL int GetPartition () const { return partitionNumber; } void SetPartition (int nr) { partitionNumber = nr; }; #else int GetPartition () const { return 0; } #endif ngstd::Archive & DoArchive (ngstd::Archive & ar); }; inline ngstd::Archive & operator & (ngstd::Archive & archive, Segment & mp) { return mp.DoArchive(archive); } ostream & operator<<(ostream & s, const Segment & seg); class Element0d { public: PointIndex pnum; int index; Element0d () = default; Element0d (PointIndex _pnum, int _index) : pnum(_pnum), index(_index) { ; } }; ostream & operator<<(ostream & s, const Element0d & el); // class Surface; // class FaceDescriptor; /// class FaceDescriptor { /// which surface, 0 if not available int surfnr; /// domain nr inside int domin; /// domain nr outside int domout; /// top level object number of surface int tlosurf; /// boundary condition property int bcprop; // Philippose - 06/07/2009 // Add capability to store surface colours along with // other face data /// surface colour (Default: R=0.0 ; G=1.0 ; B=0.0) Vec3d surfcolour; /// static string default_bcname; string * bcname = &default_bcname; /// root of linked list SurfaceElementIndex firstelement; double domin_singular; double domout_singular; public: DLL_HEADER FaceDescriptor(); DLL_HEADER FaceDescriptor(int surfnri, int domini, int domouti, int tlosurfi); DLL_HEADER FaceDescriptor(const Segment & seg); DLL_HEADER FaceDescriptor(const FaceDescriptor& other); DLL_HEADER ~FaceDescriptor() { ; } DLL_HEADER int SegmentFits (const Segment & seg); int SurfNr () const { return surfnr; } int DomainIn () const { return domin; } int DomainOut () const { return domout; } int TLOSurface () const { return tlosurf; } int BCProperty () const { return bcprop; } double DomainInSingular() const { return domin_singular; } double DomainOutSingular() const { return domout_singular; } // Philippose - 06/07/2009 // Get Surface colour Vec3d SurfColour () const { return surfcolour; } DLL_HEADER const string & GetBCName () const { return *bcname; } // string * BCNamePtr () { return bcname; } // const string * BCNamePtr () const { return bcname; } void SetSurfNr (int sn) { surfnr = sn; } void SetDomainIn (int di) { domin = di; } void SetDomainOut (int dom) { domout = dom; } void SetBCProperty (int bc) { bcprop = bc; } void SetBCName (string * bcn); // { bcname = bcn; } // Philippose - 06/07/2009 // Set the surface colour void SetSurfColour (Vec3d colour) { surfcolour = colour; } void SetDomainInSingular (double v) { domin_singular = v; } void SetDomainOutSingular (double v) { domout_singular = v; } SurfaceElementIndex FirstElement() { return firstelement; } // friend ostream & operator<<(ostream & s, const FaceDescriptor & fd); friend class Mesh; ngstd::Archive & DoArchive (ngstd::Archive & ar); }; inline ngstd::Archive & operator & (ngstd::Archive & archive, FaceDescriptor & mp) { return mp.DoArchive(archive); } ostream & operator<< (ostream & s, const FaceDescriptor & fd); class EdgeDescriptor { int tlosurf; int surfnr[2]; public: EdgeDescriptor () : tlosurf(-1) { surfnr[0] = surfnr[1] = -1; } int SurfNr (int i) const { return surfnr[i]; } void SetSurfNr (int i, int nr) { surfnr[i] = nr; } int TLOSurface() const { return tlosurf; } void SetTLOSurface (int nr) { tlosurf = nr; } }; class DLL_HEADER MeshingParameters { public: /** 3d optimization strategy: // m .. move nodes // M .. move nodes, cheap functional // s .. swap faces // c .. combine elements // d .. divide elements // p .. plot, no pause // P .. plot, Pause // h .. Histogramm, no pause // H .. Histogramm, pause */ string optimize3d = "cmdmustm"; /// number of 3d optimization steps int optsteps3d = 3; /** 2d optimization strategy: // s .. swap, opt 6 lines/node // S .. swap, optimal elements // m .. move nodes // p .. plot, no pause // P .. plot, pause // c .. combine **/ string optimize2d = "smsmsmSmSmSm"; /// number of 2d optimization steps int optsteps2d = 3; /// power of error (to approximate max err optimization) double opterrpow = 2; /// do block filling ? int blockfill = 1; /// block filling up to distance double filldist = 0.1; /// radius of local environment (times h) double safety = 5; /// radius of active environment (times h) double relinnersafety = 3; /// use local h ? int uselocalh = 1; /// grading for local h double grading = 0.3; /// use delaunay meshing int delaunay = 1; /// maximal mesh size double maxh = 1e10; /// minimal mesh size double minh = 0.0; /// file for meshsize string meshsizefilename = ""; /// start surfacemeshing from everywhere in surface int startinsurface = 0; /// check overlapping surfaces (debug) int checkoverlap = 1; /// check overlapping surface mesh before volume meshing int checkoverlappingboundary = 1; /// check chart boundary (sometimes too restrictive) int checkchartboundary = 1; /// safety factor for curvatures (elements per radius) double curvaturesafety = 2; /// minimal number of segments per edge double segmentsperedge = 1; /// use parallel threads int parthread = 0; /// weight of element size w.r.t element shape double elsizeweight = 0.2; /// init with default values /// start at step int perfstepsstart = 0; /// end at step int perfstepsend = 6; /// from mp3: /// give up quality class, 2d meshing int giveuptol2d = 200; /// give up quality class, 3d meshing int giveuptol = 10; /// maximal outer steps int maxoutersteps = 10; /// class starting star-shape filling int starshapeclass = 5; /// if non-zero, baseelement must have baseelnp points int baseelnp = 0; /// quality tolerances are handled less careful int sloppy = 1; /// limit for max element angle (150-180) double badellimit = 175; bool check_impossible = 0; int only3D_domain_nr = 0; /// int secondorder = 0; /// high order element curvature int elementorder = 1; /// quad-dominated surface meshing int quad = 0; /// bool try_hexes = false; /// int inverttets = 0; /// int inverttrigs = 0; /// int autozrefine = 0; /// MeshingParameters (); /// MeshingParameters (const MeshingParameters & mp2) = default; MeshingParameters (MeshingParameters && mp2) = default; MeshingParameters & operator= (const MeshingParameters & mp2) = default; MeshingParameters & operator= (MeshingParameters && mp2) = default; /// void Print (ostream & ost) const; /// // void CopyFrom(const MeshingParameters & other); class MeshSizePoint { public: Point<3> pnt; double h; MeshSizePoint (Point<3> _pnt, double _h) : pnt(_pnt), h(_h) { ; } MeshSizePoint () = default; MeshSizePoint (const MeshSizePoint &) = default; MeshSizePoint (MeshSizePoint &&) = default; MeshSizePoint & operator= (const MeshSizePoint &) = default; MeshSizePoint & operator= (MeshSizePoint &&) = default; }; Array meshsize_points; void (*render_function)(bool) = NULL; void Render(bool blocking = false) { if (render_function) (*render_function)(blocking); } }; inline ostream & operator<< (ostream & ost, const MeshingParameters & mp) { mp.Print (ost); return ost; } class DebugParameters { public: /// int debugoutput; /// use slow checks int slowchecks; /// int haltsuccess; /// int haltnosuccess; /// int haltlargequalclass; /// int haltsegment; /// int haltnode; /// int haltsegmentp1; /// int haltsegmentp2; /// int haltexistingline; /// int haltoverlap; /// int haltface; /// int haltfacenr; /// DebugParameters (); }; inline void Element2d :: Invert() { if (typ == TRIG) Swap (PNum(2), PNum(3)); else Invert2(); } inline void Element2d :: NormalizeNumbering () { if (GetNP() == 3) { if (PNum(1) < PNum(2) && PNum(1) < PNum(3)) return; else { if (PNum(2) < PNum(3)) { PointIndex pi1 = PNum(2); PNum(2) = PNum(3); PNum(3) = PNum(1); PNum(1) = pi1; } else { PointIndex pi1 = PNum(3); PNum(3) = PNum(2); PNum(2) = PNum(1); PNum(1) = pi1; } } } else NormalizeNumbering2(); } static const int gftetfacesa[4][3] = { { 1, 2, 3 }, { 2, 0, 3 }, { 0, 1, 3 }, { 1, 0, 2 } }; inline void Element :: GetFace (int i, Element2d & face) const { if (typ == TET) { face.SetType(TRIG); face[0] = pnum[gftetfacesa[i-1][0]]; face[1] = pnum[gftetfacesa[i-1][1]]; face[2] = pnum[gftetfacesa[i-1][2]]; } else GetFace2 (i, face); } /** Identification of periodic surfaces, close surfaces, etc. */ class Identifications { public: enum ID_TYPE : unsigned char { UNDEFINED = 1, PERIODIC = 2, CLOSESURFACES = 3, CLOSEEDGES = 4}; private: class Mesh & mesh; /// identify points (thin layers, periodic b.c.) INDEX_2_HASHTABLE identifiedpoints; /// the same, with info about the id-nr INDEX_3_HASHTABLE identifiedpoints_nr; /// sorted by identification nr TABLE idpoints_table; Array type; /// number of identifications (or, actually used identifications ?) int maxidentnr; public: /// DLL_HEADER Identifications (class Mesh & amesh); /// DLL_HEADER ~Identifications (); DLL_HEADER void Delete (); /* Identify points pi1 and pi2, due to identification nr identnr */ DLL_HEADER void Add (PointIndex pi1, PointIndex pi2, int identnr); int Get (PointIndex pi1, PointIndex pi2) const; int GetSymmetric (PointIndex pi1, PointIndex pi2) const; bool Get (PointIndex pi1, PointIndex pi2, int identnr) const; bool GetSymmetric (PointIndex pi1, PointIndex pi2, int identnr) const; // bool HasIdentifiedPoints() const { return identifiedpoints != nullptr; } /// INDEX_2_HASHTABLE & GetIdentifiedPoints () { return identifiedpoints; } bool Used (PointIndex pi1, PointIndex pi2) { return identifiedpoints.Used (INDEX_2 (pi1, pi2)); } bool UsedSymmetric (PointIndex pi1, PointIndex pi2) { return identifiedpoints.Used (INDEX_2 (pi1, pi2)) || identifiedpoints.Used (INDEX_2 (pi2, pi1)); } /// void GetMap (int identnr, Array & identmap, bool symmetric = false) const; /// ID_TYPE GetType(int identnr) const { if(identnr <= type.Size()) return type[identnr-1]; else return UNDEFINED; } void SetType(int identnr, ID_TYPE t) { while(type.Size() < identnr) type.Append(UNDEFINED); type[identnr-1] = t; } /// void GetPairs (int identnr, Array & identpairs) const; /// int GetMaxNr () const { return maxidentnr; } /// remove secondorder void SetMaxPointNr (int maxpnum); DLL_HEADER void Print (ostream & ost) const; ngstd::Archive & DoArchive (ngstd::Archive & ar); }; inline ngstd::Archive & operator & (ngstd::Archive & archive, Identifications & mp) { return mp.DoArchive(archive); } } #endif netgen-6.2.1804/libsrc/meshing/localh.cpp0000644000175000017500000004505013272137567016667 0ustar kurtkurt#include #include "meshing.hpp" namespace netgen { GradingBox :: GradingBox (const double * ax1, const double * ax2) { h2 = 0.5 * (ax2[0] - ax1[0]); for (int i = 0; i < 3; i++) xmid[i] = 0.5 * (ax1[i] + ax2[i]); for (int i = 0; i < 8; i++) childs[i] = NULL; father = NULL; flags.cutboundary = 0; flags.isinner = 0; flags.oldcell = 0; flags.pinner = 0; hopt = 2 * h2; } BlockAllocator GradingBox :: ball(sizeof (GradingBox)); void * GradingBox :: operator new(size_t) { return ball.Alloc(); } void GradingBox :: operator delete (void * p) { ball.Free (p); } void GradingBox :: DeleteChilds() { for (int i = 0; i < 8; i++) if (childs[i]) { childs[i]->DeleteChilds(); delete childs[i]; childs[i] = NULL; } } LocalH :: LocalH (Point<3> pmin, Point<3> pmax, double agrading, int adimension) : dimension(adimension) { double x1[3], x2[3]; double hmax; boundingbox = Box<3> (pmin, pmax); grading = agrading; // a small enlargement, non-regular points double val = 0.0879; for (int i = 0; i < dimension; i++) { x1[i] = (1 + val * (i+1)) * pmin(i) - val * (i+1) * pmax(i); x2[i] = 1.1 * pmax(i) - 0.1 * pmin(i); } for (int i = dimension; i < 3; i++) x1[i] = x2[i] = 0; hmax = x2[0] - x1[0]; for (int i = 1; i < dimension; i++) hmax = max2(x2[i]-x1[i], hmax); for (int i = 0; i < dimension; i++) x2[i] = x1[i] + hmax; root = new GradingBox (x1, x2); boxes.Append (root); } LocalH :: ~LocalH () { root->DeleteChilds(); delete root; } void LocalH :: Delete () { root->DeleteChilds(); } void LocalH :: SetH (Point<3> p, double h) { if (dimension == 2) { if (fabs (p(0) - root->xmid[0]) > root->h2 || fabs (p(1) - root->xmid[1]) > root->h2) return; if (GetH(p) <= 1.2 * h) return; GradingBox * box = root; GradingBox * nbox = root; GradingBox * ngb; int childnr; double x1[3], x2[3]; while (nbox) { box = nbox; childnr = 0; if (p(0) > box->xmid[0]) childnr += 1; if (p(1) > box->xmid[1]) childnr += 2; nbox = box->childs[childnr]; }; while (2 * box->h2 > h) { childnr = 0; if (p(0) > box->xmid[0]) childnr += 1; if (p(1) > box->xmid[1]) childnr += 2; double h2 = box->h2; if (childnr & 1) { x1[0] = box->xmid[0]; x2[0] = x1[0]+h2; // box->x2[0]; } else { x2[0] = box->xmid[0]; x1[0] = x2[0]-h2; // box->x1[0]; } if (childnr & 2) { x1[1] = box->xmid[1]; x2[1] = x1[1]+h2; // box->x2[1]; } else { x2[1] = box->xmid[1]; x1[1] = x2[1]-h2; // box->x1[1]; } x1[2] = x2[2] = 0; ngb = new GradingBox (x1, x2); box->childs[childnr] = ngb; ngb->father = box; boxes.Append (ngb); box = box->childs[childnr]; } box->hopt = h; double hbox = 2 * box->h2; // box->x2[0] - box->x1[0]; double hnp = h + grading * hbox; Point<3> np; for (int i = 0; i < 2; i++) { np = p; np(i) = p(i) + hbox; SetH (np, hnp); np(i) = p(i) - hbox; SetH (np, hnp); } } else { if (fabs (p(0) - root->xmid[0]) > root->h2 || fabs (p(1) - root->xmid[1]) > root->h2 || fabs (p(2) - root->xmid[2]) > root->h2) return; if (GetH(p) <= 1.2 * h) return; GradingBox * box = root; GradingBox * nbox = root; GradingBox * ngb; int childnr; double x1[3], x2[3]; while (nbox) { box = nbox; childnr = 0; if (p(0) > box->xmid[0]) childnr += 1; if (p(1) > box->xmid[1]) childnr += 2; if (p(2) > box->xmid[2]) childnr += 4; nbox = box->childs[childnr]; }; while (2 * box->h2 > h) { childnr = 0; if (p(0) > box->xmid[0]) childnr += 1; if (p(1) > box->xmid[1]) childnr += 2; if (p(2) > box->xmid[2]) childnr += 4; double h2 = box->h2; if (childnr & 1) { x1[0] = box->xmid[0]; x2[0] = x1[0]+h2; // box->x2[0]; } else { x2[0] = box->xmid[0]; x1[0] = x2[0]-h2; // box->x1[0]; } if (childnr & 2) { x1[1] = box->xmid[1]; x2[1] = x1[1]+h2; // box->x2[1]; } else { x2[1] = box->xmid[1]; x1[1] = x2[1]-h2; // box->x1[1]; } if (childnr & 4) { x1[2] = box->xmid[2]; x2[2] = x1[2]+h2; // box->x2[2]; } else { x2[2] = box->xmid[2]; x1[2] = x2[2]-h2; // box->x1[2]; } ngb = new GradingBox (x1, x2); box->childs[childnr] = ngb; ngb->father = box; boxes.Append (ngb); box = box->childs[childnr]; } box->hopt = h; double hbox = 2 * box->h2; // box->x2[0] - box->x1[0]; double hnp = h + grading * hbox; Point<3> np; for (int i = 0; i < 3; i++) { np = p; np(i) = p(i) + hbox; SetH (np, hnp); np(i) = p(i) - hbox; SetH (np, hnp); } } } double LocalH :: GetH (Point<3> x) const { const GradingBox * box = root; if (dimension == 2) { while (1) { int childnr = 0; if (x(0) > box->xmid[0]) childnr += 1; if (x(1) > box->xmid[1]) childnr += 2; if (box->childs[childnr]) box = box->childs[childnr]; else return box->hopt; } } else { while (1) { int childnr = 0; if (x(0) > box->xmid[0]) childnr += 1; if (x(1) > box->xmid[1]) childnr += 2; if (x(2) > box->xmid[2]) childnr += 4; if (box->childs[childnr]) box = box->childs[childnr]; else return box->hopt; } } } /// minimal h in box (pmin, pmax) double LocalH :: GetMinH (Point<3> pmin, Point<3> pmax) const { Point<3> pmin2, pmax2; for (int j = 0; j < 3; j++) if (pmin(j) < pmax(j)) { pmin2(j) = pmin(j); pmax2(j) = pmax(j); } else { pmin2(j) = pmax(j); pmax2(j) = pmin(j); } return GetMinHRec (pmin2, pmax2, root); } double LocalH :: GetMinHRec (const Point3d & pmin, const Point3d & pmax, const GradingBox * box) const { if (dimension == 2) { double h2 = box->h2; if (pmax.X() < box->xmid[0]-h2 || pmin.X() > box->xmid[0]+h2 || pmax.Y() < box->xmid[1]-h2 || pmin.Y() > box->xmid[1]+h2) return 1e8; double hmin = 2 * box->h2; // box->x2[0] - box->x1[0]; for (int i = 0; i < 8; i++) if (box->childs[i]) hmin = min2 (hmin, GetMinHRec (pmin, pmax, box->childs[i])); return hmin; } else { double h2 = box->h2; if (pmax.X() < box->xmid[0]-h2 || pmin.X() > box->xmid[0]+h2 || pmax.Y() < box->xmid[1]-h2 || pmin.Y() > box->xmid[1]+h2 || pmax.Z() < box->xmid[2]-h2 || pmin.Z() > box->xmid[2]+h2) return 1e8; double hmin = 2 * box->h2; // box->x2[0] - box->x1[0]; for (int i = 0; i < 8; i++) if (box->childs[i]) hmin = min2 (hmin, GetMinHRec (pmin, pmax, box->childs[i])); return hmin; } } void LocalH :: CutBoundaryRec (const Point3d & pmin, const Point3d & pmax, GradingBox * box) { double h2 = box->h2; if (dimension == 2) { if (pmax.X() < box->xmid[0]-h2 || pmin.X() > box->xmid[0]+h2 || pmax.Y() < box->xmid[1]-h2 || pmin.Y() > box->xmid[1]+h2) return; } else { if (pmax.X() < box->xmid[0]-h2 || pmin.X() > box->xmid[0]+h2 || pmax.Y() < box->xmid[1]-h2 || pmin.Y() > box->xmid[1]+h2 || pmax.Z() < box->xmid[2]-h2 || pmin.Z() > box->xmid[2]+h2) return; } box->flags.cutboundary = 1; for (int i = 0; i < 8; i++) if (box->childs[i]) CutBoundaryRec (pmin, pmax, box->childs[i]); } void LocalH :: FindInnerBoxes (AdFront3 * adfront, int (*testinner)(const Point3d & p1)) { static int timer = NgProfiler::CreateTimer ("LocalH::FindInnerBoxes"); NgProfiler::RegionTimer reg (timer); int nf = adfront->GetNF(); for (int i = 0; i < boxes.Size(); i++) boxes[i] -> flags.isinner = 0; root->flags.isinner = 0; Point3d rpmid(root->xmid[0], root->xmid[1], root->xmid[2]); Vec3d rv(root->h2, root->h2, root->h2); Point3d rx2 = rpmid + rv; // Point3d rx1 = rpmid - rv; root->flags.pinner = !adfront->SameSide (rpmid, rx2); if (testinner) (*testout) << "inner = " << root->flags.pinner << " =?= " << testinner(Point3d(root->xmid[0], root->xmid[1], root->xmid[2])) << endl; Array faceinds(nf); Array faceboxes(nf); for (int i = 1; i <= nf; i++) { faceinds.Elem(i) = i; adfront->GetFaceBoundingBox(i, faceboxes.Elem(i)); } for (int i = 0; i < 8; i++) FindInnerBoxesRec2 (root->childs[i], adfront, faceboxes, faceinds, nf); } void LocalH :: FindInnerBoxesRec2 (GradingBox * box, class AdFront3 * adfront, Array & faceboxes, Array & faceinds, int nfinbox) { if (!box) return; GradingBox * father = box -> father; Point3d c(box->xmid[0], box->xmid[1], box->xmid[2]); Vec3d v(box->h2, box->h2, box->h2); Box3d boxc(c-v, c+v); Point3d fc(father->xmid[0], father->xmid[1], father->xmid[2]); Vec3d fv(father->h2, father->h2, father->h2); Box3d fboxc(fc-fv, fc+fv); Box3d boxcfc(c,fc); ArrayMem faceused; ArrayMem faceused2; ArrayMem facenotused; /* faceused.SetSize(0); facenotused.SetSize(0); faceused2.SetSize(0); */ for (int j = 1; j <= nfinbox; j++) { // adfront->GetFaceBoundingBox (faceinds.Get(j), facebox); const Box3d & facebox = faceboxes.Get(faceinds.Get(j)); if (boxc.Intersect (facebox)) faceused.Append(faceinds.Get(j)); else facenotused.Append(faceinds.Get(j)); if (boxcfc.Intersect (facebox)) faceused2.Append (faceinds.Get(j)); } for (int j = 1; j <= faceused.Size(); j++) faceinds.Elem(j) = faceused.Get(j); for (int j = 1; j <= facenotused.Size(); j++) faceinds.Elem(j+faceused.Size()) = facenotused.Get(j); if (!father->flags.cutboundary) { box->flags.isinner = father->flags.isinner; box->flags.pinner = father->flags.pinner; } else { Point3d cf(father->xmid[0], father->xmid[1], father->xmid[2]); if (father->flags.isinner) box->flags.pinner = 1; else { if (adfront->SameSide (c, cf, &faceused2)) box->flags.pinner = father->flags.pinner; else box->flags.pinner = 1 - father->flags.pinner; } if (box->flags.cutboundary) box->flags.isinner = 0; else box->flags.isinner = box->flags.pinner; } // cout << "faceused: " << faceused.Size() << ", " << faceused2.Size() << ", " << facenotused.Size() << endl; int nf = faceused.Size(); for (int i = 0; i < 8; i++) FindInnerBoxesRec2 (box->childs[i], adfront, faceboxes, faceinds, nf); } void LocalH :: FindInnerBoxesRec ( int (*inner)(const Point3d & p), GradingBox * box) { if (box->flags.cutboundary) { for (int i = 0; i < 8; i++) if (box->childs[i]) FindInnerBoxesRec (inner, box->childs[i]); } else { if (inner (box->PMid())) SetInnerBoxesRec (box); } } void LocalH :: FindInnerBoxes (AdFront2 * adfront, int (*testinner)(const Point<2> & p1)) { static int timer = NgProfiler::CreateTimer ("LocalH::FindInnerBoxes 2d"); NgProfiler::RegionTimer reg (timer); for (int i = 0; i < boxes.Size(); i++) boxes[i] -> flags.isinner = 0; root->flags.isinner = 0; Point<2> rpmid(root->xmid[0], root->xmid[1]); // , root->xmid[2]); Vec<2> rv(root->h2, root->h2); Point<2> rx2 = rpmid + rv; // Point<2> rx1 = rpmid - rv; root->flags.pinner = !adfront->SameSide (rpmid, rx2); if (testinner) (*testout) << "inner = " << root->flags.pinner << " =?= " << testinner(rpmid) << endl; int nf = adfront->GetNFL(); Array faceinds(nf); Array > faceboxes(nf); for (int i = 0; i < nf; i++) { faceinds[i] = i; // adfront->GetFaceBoundingBox(i, faceboxes.Elem(i)); const FrontLine & line = adfront->GetLine(i); faceboxes[i].Set (adfront->GetPoint (line.L().I1())); faceboxes[i].Add (adfront->GetPoint (line.L().I2())); } for (int i = 0; i < 8; i++) FindInnerBoxesRec2 (root->childs[i], adfront, faceboxes, faceinds, nf); } void LocalH :: FindInnerBoxesRec2 (GradingBox * box, class AdFront2 * adfront, Array > & faceboxes, Array & faceinds, int nfinbox) { if (!box) return; GradingBox * father = box -> father; Point3d c(box->xmid[0], box->xmid[1], 0); // box->xmid[2]); Vec3d v(box->h2, box->h2, box->h2); Box3d boxc(c-v, c+v); Point3d fc(father->xmid[0], father->xmid[1], 0); // father->xmid[2]); Vec3d fv(father->h2, father->h2, father->h2); Box3d fboxc(fc-fv, fc+fv); Box3d boxcfc(c,fc); ArrayMem faceused; ArrayMem faceused2; ArrayMem facenotused; for (int j = 0; j < nfinbox; j++) { // adfront->GetFaceBoundingBox (faceinds.Get(j), facebox); const Box3d & facebox = faceboxes[faceinds[j]]; if (boxc.Intersect (facebox)) faceused.Append(faceinds[j]); else facenotused.Append(faceinds[j]); if (boxcfc.Intersect (facebox)) faceused2.Append (faceinds[j]); } for (int j = 0; j < faceused.Size(); j++) faceinds[j] = faceused[j]; for (int j = 0; j < facenotused.Size(); j++) faceinds[j+faceused.Size()] = facenotused[j]; if (!father->flags.cutboundary) { box->flags.isinner = father->flags.isinner; box->flags.pinner = father->flags.pinner; } else { Point3d cf(father->xmid[0], father->xmid[1], father->xmid[2]); if (father->flags.isinner) { box->flags.pinner = 1; } else { Point<2> c2d (c.X(), c.Y()); Point<2> cf2d (cf.X(), cf.Y()); bool sameside = adfront->SameSide (c2d, cf2d, &faceused2); if (sameside) box->flags.pinner = father->flags.pinner; else box->flags.pinner = 1 - father->flags.pinner; } if (box->flags.cutboundary) box->flags.isinner = 0; else box->flags.isinner = box->flags.pinner; } // cout << "faceused: " << faceused.Size() << ", " << faceused2.Size() << ", " << facenotused.Size() << endl; int nf = faceused.Size(); for (int i = 0; i < 8; i++) FindInnerBoxesRec2 (box->childs[i], adfront, faceboxes, faceinds, nf); } void LocalH :: FindInnerBoxesRec ( int (*inner)(const Point<2> & p), GradingBox * box) { if (box->flags.cutboundary) { for (int i = 0; i < 8; i++) if (box->childs[i]) FindInnerBoxesRec (inner, box->childs[i]); } else { Point<2> p2d(box->PMid()(0), box->PMid()(1)); if (inner (p2d)) SetInnerBoxesRec (box); } } void LocalH :: SetInnerBoxesRec (GradingBox * box) { box->flags.isinner = 1; for (int i = 0; i < 8; i++) if (box->childs[i]) ClearFlagsRec (box->childs[i]); } void LocalH :: ClearFlagsRec (GradingBox * box) { box->flags.cutboundary = 0; box->flags.isinner = 0; for (int i = 0; i < 8; i++) if (box->childs[i]) ClearFlagsRec (box->childs[i]); } void LocalH :: WidenRefinement () { for (int i = 0; i < boxes.Size(); i++) { double h = boxes[i]->hopt; Point3d c = boxes[i]->PMid(); for (int i1 = -1; i1 <= 1; i1++) for (int i2 = -1; i2 <= 1; i2++) for (int i3 = -1; i3 <= 1; i3++) SetH (Point3d (c.X() + i1 * h, c.Y() + i2 * h, c.Z() + i3 * h), 1.001 * h); } } void LocalH :: GetInnerPoints (Array > & points) { if (dimension == 2) { for (int i = 0; i < boxes.Size(); i++) if (boxes[i] -> flags.isinner && boxes[i] -> HasChilds()) points.Append ( boxes[i] -> PMid() ); } else { for (int i = 0; i < boxes.Size(); i++) if (boxes[i] -> flags.isinner) points.Append ( boxes[i] -> PMid() ); } } void LocalH :: GetOuterPoints (Array > & points) { for (int i = 0; i < boxes.Size(); i++) if (!boxes[i]->flags.isinner && !boxes[i]->flags.cutboundary) points.Append ( boxes[i] -> PMid()); } void LocalH :: Convexify () { ConvexifyRec (root); } void LocalH :: ConvexifyRec (GradingBox * box) { Point<3> center = box -> PMid(); double size = 2 * box->h2; // box->x2[0] - box->x1[0]; double dx = 0.6 * size; double maxh = box->hopt; for (int i = 0; i < 3; i++) { Point<3> hp = center; hp(i) += dx; maxh = max2 (maxh, GetH(hp)); hp(i) = center(i)-dx; maxh = max2 (maxh, GetH(hp)); } if (maxh < 0.95 * box->hopt) SetH (center, maxh); for (int i = 0; i < 8; i++) if (box->childs[i]) ConvexifyRec (box->childs[i]); } void LocalH :: PrintMemInfo (ostream & ost) const { ost << "LocalH: " << boxes.Size() << " boxes of " << sizeof(GradingBox) << " bytes = " << boxes.Size()*sizeof(GradingBox) << " bytes" << endl; } } netgen-6.2.1804/libsrc/meshing/CMakeLists.txt0000644000175000017500000000400013272137567017447 0ustar kurtkurtadd_definitions(-DNGINTERFACE_EXPORTS) if(NOT WIN32) set(mesh_object_libs $ $ $ ) endif(NOT WIN32) add_library(mesh ${NG_LIB_TYPE} adfront2.cpp adfront3.cpp bisect.cpp boundarylayer.cpp clusters.cpp curvedelems.cpp delaunay.cpp delaunay2d.cpp geomsearch.cpp global.cpp hprefinement.cpp improve2.cpp improve2gen.cpp improve3.cpp localh.cpp meshclass.cpp meshfunc.cpp meshfunc2d.cpp meshing2.cpp meshing3.cpp meshtool.cpp meshtype.cpp msghandler.cpp netrule2.cpp netrule3.cpp parser2.cpp parser3.cpp prism2rls.cpp pyramid2rls.cpp pyramidrls.cpp quadrls.cpp refine.cpp ruler2.cpp ruler3.cpp secondorder.cpp smoothing2.5.cpp smoothing2.cpp smoothing3.cpp specials.cpp tetrarls.cpp topology.cpp triarls.cpp validate.cpp bcfunctions.cpp parallelmesh.cpp paralleltop.cpp paralleltop.hpp basegeom.cpp python_mesh.cpp hexarls.cpp ../../ng/onetcl.cpp ${mesh_object_libs} ) if(APPLE) set_target_properties( mesh PROPERTIES SUFFIX ".so") endif(APPLE) if(NOT WIN32) target_link_libraries( mesh ${ZLIB_LIBRARIES} ${MPI_CXX_LIBRARIES} ${PYTHON_LIBRARIES} ${METIS_LIBRARY}) install( TARGETS mesh ${NG_INSTALL_DIR}) endif(NOT WIN32) install(FILES adfront2.hpp adfront3.hpp basegeom.hpp bcfunctions.hpp bisect.hpp boundarylayer.hpp classifyhpel.hpp clusters.hpp curvedelems.hpp findip2.hpp findip.hpp geomsearch.hpp global.hpp hpref_hex.hpp hprefinement.hpp hpref_prism.hpp hpref_pyramid.hpp hpref_quad.hpp hpref_segm.hpp hpref_tet.hpp hpref_trig.hpp improve2.hpp improve3.hpp localh.hpp meshclass.hpp meshfunc.hpp meshing2.hpp meshing3.hpp meshing.hpp meshtool.hpp meshtype.hpp msghandler.hpp paralleltop.hpp ruler2.hpp ruler3.hpp specials.hpp topology.hpp validate.hpp DESTINATION ${NG_INSTALL_DIR_INCLUDE}/meshing COMPONENT netgen_devel ) netgen-6.2.1804/libsrc/meshing/pyramid2rls.cpp0000644000175000017500000001124013272137567017667 0ustar kurtkurtnamespace netgen { const char * pyramidrules2[] = { "tolfak 0.5\n",\ "\n",\ "rule \"Pyramid on quad\"\n",\ "\n",\ "quality 100\n",\ "\n",\ "mappoints\n",\ "(0, 0, 0);\n",\ "(1, 0, 0);\n",\ "(1, 1, 0);\n",\ "(0, 1, 0);\n",\ "\n",\ "mapfaces\n",\ "(1, 2, 3, 4) del;\n",\ "\n",\ "newpoints\n",\ "(0.5, 0.5, -0.5) \n",\ " { 0.25 X1, 0.25 X2, 0.25 X3, 0.25 X4 } \n",\ " { 0.25 Y1, 0.25 Y2, 0.25 Y3, 0.25 Y4 } { };\n",\ "\n",\ "newfaces\n",\ "(1, 2, 5);\n",\ "(2, 3, 5);\n",\ "(3, 4, 5);\n",\ "(4, 1, 5);\n",\ "\n",\ "elements\n",\ "(1, 2, 3, 4, 5);\n",\ "\n",\ "freezone2\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 1.4 P5, -0.1 P1, -0.1 P2, -0.1 P3, -0.1 P4 };\n",\ "\n",\ "freezonelimit\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 1 P5 };\n",\ "\n",\ "freeset\n",\ "1 2 3 5;\n",\ "\n",\ "freeset\n",\ "1 3 4 5;\n",\ "\n",\ "endrule\n",\ "\n",\ "\n",\ "rule \"small Pyramid on quad\"\n",\ "\n",\ "quality 100\n",\ "\n",\ "mappoints\n",\ "(0, 0, 0);\n",\ "(1, 0, 0);\n",\ "(1, 1, 0);\n",\ "(0, 1, 0);\n",\ "\n",\ "mapfaces\n",\ "(1, 2, 3, 4) del;\n",\ "\n",\ "newpoints\n",\ "(0.5, 0.5, -0.1 )\n",\ " { 0.25 X1, 0.25 X2, 0.25 X3, 0.25 X4 } \n",\ " { 0.25 Y1, 0.25 Y2, 0.25 Y3, 0.25 Y4 } { };\n",\ "\n",\ "newfaces\n",\ "(1, 2, 5);\n",\ "(2, 3, 5);\n",\ "(3, 4, 5);\n",\ "(4, 1, 5);\n",\ "\n",\ "elements\n",\ "(1, 2, 3, 4, 5);\n",\ "\n",\ "freezone2\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 1.4 P5, -0.1 P1, -0.1 P2, -0.1 P3, -0.1 P4 };\n",\ "\n",\ "freezonelimit\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 1 P5 };\n",\ "\n",\ "freeset\n",\ "1 2 3 5;\n",\ "\n",\ "freeset\n",\ "1 3 4 5;\n",\ "\n",\ "endrule\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "rule \"connect pyramid\"\n",\ "\n",\ "quality 100\n",\ "\n",\ "mappoints\n",\ "(0, 0, 0);\n",\ "(1, 0, 0);\n",\ "(1, 1, 0);\n",\ "(0, 1, 0);\n",\ "(0.5, 0.5, -0.5);\n",\ "\n",\ "mapfaces\n",\ "(1, 2, 3, 4) del;\n",\ "\n",\ "newpoints\n",\ "\n",\ "newfaces\n",\ "(1, 2, 5);\n",\ "(2, 3, 5);\n",\ "(3, 4, 5);\n",\ "(4, 1, 5);\n",\ "\n",\ "elements\n",\ "(1, 2, 3, 4, 5);\n",\ "\n",\ "freezone2\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 1 P5 };\n",\ "\n",\ "freeset\n",\ "1 2 3 5;\n",\ "\n",\ "freeset\n",\ "1 3 4 5;\n",\ "\n",\ "endrule\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "rule \"pyramid with one trig\"\n",\ "\n",\ "quality 1\n",\ "\n",\ "mappoints\n",\ "(0, 0, 0);\n",\ "(1, 0, 0);\n",\ "(1, 1, 0);\n",\ "(0, 1, 0);\n",\ "(0.5, 0.5, -0.5);\n",\ "\n",\ "mapfaces\n",\ "(1, 2, 3, 4) del;\n",\ "(2, 1, 5) del;\n",\ "\n",\ "newpoints\n",\ "\n",\ "newfaces\n",\ "(2, 3, 5);\n",\ "(3, 4, 5);\n",\ "(4, 1, 5);\n",\ "\n",\ "elements\n",\ "(1, 2, 3, 4, 5);\n",\ "\n",\ "freezone2\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 1 P5 };\n",\ "{ 0.34 P2, 0.34 P3, 0.34 P5, -0.02 P1 };\n",\ "{ 0.34 P3, 0.34 P4, 0.34 P5, -0.02 P1 };\n",\ "{ 0.34 P1, 0.34 P4, 0.34 P5, -0.02 P2 };\n",\ "\n",\ "freezonelimit\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 1 P5 };\n",\ "{ 0.333 P2, 0.333 P3, 0.334 P5, 0 P1 };\n",\ "{ 0.333 P3, 0.333 P4, 0.334 P5, 0 P1 };\n",\ "{ 0.333 P1, 0.333 P4, 0.334 P5, 0 P2 };\n",\ "\n",\ "orientations\n",\ "(1, 2, 3, 5);\n",\ "(1, 3, 4, 5);\n",\ "\n",\ "\n",\ "freeset\n",\ "1 2 3 5;\n",\ "freeset\n",\ "1 3 4 5;\n",\ "freeset\n",\ "2 3 5 6;\n",\ "freeset\n",\ "3 4 5 7;\n",\ "freeset \n",\ "1 4 5 8;\n",\ "endrule\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "rule \"pyramid with two trig\"\n",\ "\n",\ "quality 1\n",\ "\n",\ "mappoints\n",\ "(0, 0, 0);\n",\ "(1, 0, 0);\n",\ "(1, 1, 0);\n",\ "(0, 1, 0);\n",\ "(0.5, 0.5, -0.5);\n",\ "\n",\ "mapfaces\n",\ "(1, 2, 3, 4) del;\n",\ "(2, 1, 5) del;\n",\ "(3, 2, 5) del;\n",\ "newpoints\n",\ "\n",\ "newfaces\n",\ "(3, 4, 5);\n",\ "(4, 1, 5);\n",\ "\n",\ "elements\n",\ "(1, 2, 3, 4, 5);\n",\ "\n",\ "freezone2\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 1 P5 };\n",\ "\n",\ "freeset\n",\ "1 2 3 5;\n",\ "\n",\ "freeset\n",\ "1 3 4 5;\n",\ "\n",\ "endrule\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "rule \"pyramid with two trig, left\"\n",\ "\n",\ "quality 1\n",\ "\n",\ "mappoints\n",\ "(0, 0, 0);\n",\ "(1, 0, 0);\n",\ "(1, 1, 0);\n",\ "(0, 1, 0);\n",\ "(0.5, 0.5, -0.5);\n",\ "\n",\ "mapfaces\n",\ "(1, 2, 3, 4) del;\n",\ "(2, 1, 5) del;\n",\ "(1, 4, 5) del;\n",\ "newpoints\n",\ "\n",\ "newfaces\n",\ "(3, 4, 5);\n",\ "(2, 3, 5);\n",\ "\n",\ "elements\n",\ "(1, 2, 3, 4, 5);\n",\ "\n",\ "freezone2\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 1 P5 };\n",\ "\n",\ "freeset\n",\ "1 2 3 5;\n",\ "\n",\ "freeset\n",\ "1 3 4 5;\n",\ "\n",\ "endrule\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ 0}; } netgen-6.2.1804/libsrc/meshing/meshtool.hpp0000644000175000017500000000362213272137567017263 0ustar kurtkurt#ifndef FILE_MESHTOOL #define FILE_MESHTOOL /// extern void MeshQuality2d (const Mesh & mesh); /// extern void MeshQuality3d (const Mesh & mesh, Array * inclass = NULL); /// extern void SaveEdges (const Mesh & mesh, const char * geomfile, double h, char * filename); /// extern void SaveSurfaceMesh (const Mesh & mesh, double h, char * filename); /* /// extern void Save2DMesh ( const Mesh & mesh2d, const Array * splines, ostream & outfile); */ class Surface; /// extern void SaveVolumeMesh ( const Array & points, const Array & elements, const Array & volelements, const Array & surfaces, char * filename); /// void SaveVolumeMesh (const Mesh & mesh, const class NetgenGeometry & geometry, char * filename); /// extern int CheckCode (); /// extern double CalcTetBadness (const Point3d & p1, const Point3d & p2, const Point3d & p3, const Point3d & p4, double h, const MeshingParameters & mp); /// extern double CalcTetBadnessGrad (const Point3d & p1, const Point3d & p2, const Point3d & p3, const Point3d & p4, double h, int pi, Vec<3> & grad, const MeshingParameters & mp); /** Calculates volume of an element. The volume of the tetrahedron el is computed */ // extern double CalcVolume (const Array & points, // const Element & el); /** The total volume of all elements is computed. This function calculates the volume of the mesh */ extern double CalcVolume (const Array & points, const Array & elements); /// extern int CheckSurfaceMesh (const Mesh & mesh); /// extern int CheckSurfaceMesh2 (const Mesh & mesh); /// extern int CheckMesh3D (const Mesh & mesh); /// extern void RemoveProblem (Mesh & mesh, int domainnr); #endif netgen-6.2.1804/libsrc/meshing/localh.hpp0000644000175000017500000001072613272137567016676 0ustar kurtkurt#ifndef LOCALH #define LOCALH /**************************************************************************/ /* File: localh.hh */ /* Author: Joachim Schoeberl */ /* Date: 29. Jan. 97 */ /**************************************************************************/ namespace netgen { /// box for grading class GradingBox { /// xmid float xmid[3]; /// half edgelength float h2; /// GradingBox * childs[8]; /// GradingBox * father; /// double hopt; /// public: struct { unsigned int cutboundary:1; unsigned int isinner:1; unsigned int oldcell:1; unsigned int pinner:1; } flags; /// GradingBox (const double * ax1, const double * ax2); /// void DeleteChilds(); /// Point<3> PMid() const { return Point<3> (xmid[0], xmid[1], xmid[2]); } double H2() const { return h2; } bool HasChilds() const { for (int i = 0; i < 8; i++) if (childs[i]) return true; return false; } friend class LocalH; static BlockAllocator ball; void * operator new(size_t); void operator delete (void *); }; /** Control of 3D mesh grading */ class LocalH { /// GradingBox * root; /// double grading; /// Array boxes; /// Box<3> boundingbox; /// octree or quadtree int dimension; public: /// LocalH (Point<3> pmin, Point<3> pmax, double grading, int adimension = 3); /// LocalH (const Box<3> & box, double grading, int adimension = 3) : LocalH (box.PMin(), box.PMax(), grading, adimension) { ; } /// ~LocalH(); /// void Delete(); /// void SetGrading (double agrading) { grading = agrading; } /// void SetH (Point<3> x, double h); /// double GetH (Point<3> x) const; /// minimal h in box (pmin, pmax) double GetMinH (Point<3> pmin, Point<3> pmax) const; /// mark boxes intersecting with boundary-box // void CutBoundary (const Point3d & pmin, const Point3d & pmax) // { CutBoundaryRec (pmin, pmax, root); } void CutBoundary (const Box<3> & box) { CutBoundaryRec (box.PMin(), box.PMax(), root); } /// find inner boxes void FindInnerBoxes (class AdFront3 * adfront, int (*testinner)(const Point3d & p1)); void FindInnerBoxes (class AdFront2 * adfront, int (*testinner)(const Point<2> & p1)); /// clears all flags void ClearFlags () { ClearFlagsRec(root); } /// widen refinement zone void WidenRefinement (); /// get points in inner elements void GetInnerPoints (Array > & points); /// get points in outer closure void GetOuterPoints (Array > & points); /// void Convexify (); /// int GetNBoxes () { return boxes.Size(); } const Box<3> & GetBoundingBox () const { return boundingbox; } /// void PrintMemInfo (ostream & ost) const; private: /// double GetMinHRec (const Point3d & pmin, const Point3d & pmax, const GradingBox * box) const; /// void CutBoundaryRec (const Point3d & pmin, const Point3d & pmax, GradingBox * box); /// void FindInnerBoxesRec ( int (*inner)(const Point3d & p), GradingBox * box); /// void FindInnerBoxesRec2 (GradingBox * box, class AdFront3 * adfront, Array & faceboxes, Array & finds, int nfinbox); void FindInnerBoxesRec ( int (*inner)(const Point<2> & p), GradingBox * box); /// void FindInnerBoxesRec2 (GradingBox * box, class AdFront2 * adfront, Array > & faceboxes, Array & finds, int nfinbox); /// void SetInnerBoxesRec (GradingBox * box); /// void ClearFlagsRec (GradingBox * box); /// void ConvexifyRec (GradingBox * box); friend ostream & operator<< (ostream & ost, const LocalH & loch); }; inline ostream & operator<< (ostream & ost, const GradingBox & box) { ost << "gradbox, pmid = " << box.PMid() << ", h2 = " << box.H2() << " cutbound = " << box.flags.cutboundary << " isinner = " << box.flags.isinner << endl; return ost; } inline ostream & operator<< (ostream & ost, const LocalH & loch) { for (int i = 0; i < loch.boxes.Size(); i++) ost << "box[" << i << "] = " << *(loch.boxes[i]); return ost; } } #endif netgen-6.2.1804/libsrc/meshing/global.hpp0000644000175000017500000000272213272137567016671 0ustar kurtkurt#ifndef FILE_GLOBAL #define FILE_GLOBAL /**************************************************************************/ /* File: global.hh */ /* Author: Joachim Schoeberl */ /* Date: 01. Okt. 95 */ /**************************************************************************/ /* global functions and variables */ namespace netgen { /// DLL_HEADER extern double GetTime (); DLL_HEADER extern void ResetTime (); /// DLL_HEADER extern int testmode; /// calling parameters // extern Flags parameters; // extern DLL_HEADER MeshingParameters mparam; DLL_HEADER extern Array tets_in_qualclass; DLL_HEADER extern mutex tcl_todo_mutex; class DLL_HEADER multithreadt { public: int pause; int testmode; int redraw; int drawing; int terminate; int running; double percent; const char * task; bool demorunning; string * tcl_todo = new string(""); // tcl commands set from parallel thread multithreadt(); }; DLL_HEADER extern volatile multithreadt multithread; DLL_HEADER extern string ngdir; DLL_HEADER extern DebugParameters debugparam; DLL_HEADER extern bool verbose; DLL_HEADER extern int h_argc; DLL_HEADER extern char ** h_argv; DLL_HEADER extern weak_ptr global_mesh; DLL_HEADER void SetGlobalMesh (shared_ptr m); } #endif netgen-6.2.1804/libsrc/meshing/prism2rls.cpp0000644000175000017500000001567413272137567017373 0ustar kurtkurtnamespace netgen { const char * prismrules2[] = { "tolfak 0.5\n",\ "\n",\ "rule \"prism on quad\"\n",\ "\n",\ "quality 1\n",\ "\n",\ "mappoints\n",\ "(0, 0, 0);\n",\ "(1, 0, 0);\n",\ "(1, 1, 0);\n",\ "(0, 1, 0);\n",\ "(0.5, 0, -0.86);\n",\ "(0.5, 1, -0.86);\n",\ "\n",\ "mapfaces\n",\ "(1, 2, 3, 4) del;\n",\ "(1, 5, 2) del;\n",\ "(4, 3, 6) del;\n",\ "\n",\ "newpoints\n",\ "\n",\ "newfaces\n",\ "(5, 2, 3, 6);\n",\ "(1, 5, 6, 4);\n",\ "\n",\ "elements\n",\ "(1, 5, 2, 4, 6, 3);\n",\ "\n",\ "orientations\n",\ "(1, 2, 3, 5);\n",\ "(1, 3, 4, 6);\n",\ "\n",\ "freezone2\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 1 P5 };\n",\ "{ 1 P6 };\n",\ "{ 0.3 P1, -0.1 P2, -0.1 P3, 0.3 P4, 0.3 P5, 0.3 P6 };\n",\ "{ -0.1 P1, 0.3 P2, 0.3 P3, -0.1 P4, 0.3 P5, 0.3 P6 };\n",\ "\n",\ "freezonelimit\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 1 P5 };\n",\ "{ 1 P6 };\n",\ "{ 0.25 P1, 0 P2, 0 P3, 0.25 P4, 0.25 P5, 0.25 P6 };\n",\ "{ 0 P1, 0.25 P2, 0.25 P3, 0 P4, 0.25 P5, 0.25 P6 };\n",\ "\n",\ "freeset\n",\ "1 2 4 5 6 7;\n",\ "\n",\ "freeset\n",\ "2 3 4 5 6 8;\n",\ "\n",\ "endrule\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "rule \"prism on quad, one trig\"\n",\ "\n",\ "quality 2\n",\ "\n",\ "mappoints\n",\ "(0, 0, 0);\n",\ "(1, 0, 0);\n",\ "(1, 1, 0);\n",\ "(0, 1, 0);\n",\ "(0.5, 0, -0.86);\n",\ "(0.5, 1, -0.86);\n",\ "\n",\ "mapfaces\n",\ "(1, 2, 3, 4) del;\n",\ "(1, 5, 2) del;\n",\ "\n",\ "newpoints\n",\ "\n",\ "newfaces\n",\ "(5, 2, 3, 6);\n",\ "(1, 5, 6, 4);\n",\ "(4, 6, 3);\n",\ "\n",\ "elements\n",\ "(1, 5, 2, 4, 6, 3);\n",\ "\n",\ "orientations\n",\ "(1, 2, 3, 5);\n",\ "(1, 3, 4, 6);\n",\ "\n",\ "freezone2\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 1 P5 };\n",\ "{ 1 P6 };\n",\ "{ 0.3 P1, -0.1 P2, -0.1 P3, 0.3 P4, 0.3 P5, 0.3 P6 };\n",\ "{ -0.1 P1, 0.3 P2, 0.3 P3, -0.1 P4, 0.3 P5, 0.3 P6 };\n",\ "\n",\ "freezonelimit\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 1 P5 };\n",\ "{ 1 P6 };\n",\ "{ 0.25 P1, 0 P2, 0 P3, 0.25 P4, 0.25 P5, 0.25 P6 };\n",\ "{ 0 P1, 0.25 P2, 0.25 P3, 0 P4, 0.25 P5, 0.25 P6 };\n",\ "\n",\ "freeset\n",\ "1 2 4 5 6 7;\n",\ "\n",\ "freeset\n",\ "2 3 4 5 6 8;\n",\ "\n",\ "\n",\ "endrule\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "rule \"prism on 2 quad\"\n",\ "\n",\ "quality 1\n",\ "\n",\ "mappoints\n",\ "(0, 0, 0);\n",\ "(1, 0, 0);\n",\ "(1, 1, 0);\n",\ "(0, 1, 0);\n",\ "(0.5, 0, -0.86);\n",\ "(0.5, 1, -0.86);\n",\ "\n",\ "mapfaces\n",\ "(1, 2, 3, 4) del;\n",\ "(2, 5, 6, 3) del;\n",\ "(1, 5, 2) del;\n",\ "(4, 3, 6) del;\n",\ "\n",\ "newpoints\n",\ "\n",\ "newfaces\n",\ "(1, 5, 6, 4);\n",\ "\n",\ "elements\n",\ "(1, 5, 2, 4, 6, 3);\n",\ "\n",\ "freezone2\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 1 P5 };\n",\ "{ 1 P6 };\n",\ "{ 0.3 P1, -0.1 P2, -0.1 P3, 0.3 P4, 0.3 P5, 0.3 P6 };\n",\ "\n",\ "freezonelimit\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 1 P5 };\n",\ "{ 1 P6 };\n",\ "{ 0.25 P1, 0 P2, 0 P3, 0.25 P4, 0.25 P5, 0.25 P6 };\n",\ "\n",\ "freeset\n",\ "1 2 4 5 6 7;\n",\ "\n",\ "freeset\n",\ "2 3 4 6;\n",\ "\n",\ "\n",\ "endrule\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "rule \"prism on 2 quad, one trig\"\n",\ "\n",\ "quality 2\n",\ "\n",\ "mappoints\n",\ "(0, 0, 0);\n",\ "(1, 0, 0);\n",\ "(1, 1, 0);\n",\ "(0, 1, 0);\n",\ "(0.5, 0, -0.86);\n",\ "(0.5, 1, -0.86);\n",\ "\n",\ "mapfaces\n",\ "(1, 2, 3, 4) del;\n",\ "(2, 5, 6, 3) del;\n",\ "(1, 5, 2) del;\n",\ "\n",\ "newpoints\n",\ "\n",\ "newfaces\n",\ "(1, 5, 6, 4);\n",\ "(4, 6, 3);\n",\ "\n",\ "elements\n",\ "(1, 5, 2, 4, 6, 3);\n",\ "\n",\ "freezone2\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 1 P5 };\n",\ "{ 1 P6 };\n",\ "{ 0.3 P1, -0.1 P2, -0.1 P3, 0.3 P4, 0.3 P5, 0.3 P6 };\n",\ "\n",\ "freezonelimit\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 1 P5 };\n",\ "{ 1 P6 };\n",\ "{ 0.25 P1, 0 P2, 0 P3, 0.25 P4, 0.25 P5, 0.25 P6 };\n",\ "\n",\ "freeset\n",\ "1 2 4 5 6 7;\n",\ "\n",\ "freeset\n",\ "2 3 4 6;\n",\ "\n",\ "\n",\ "endrule\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "rule \"prism on 2 quada\"\n",\ "\n",\ "quality 1\n",\ "\n",\ "mappoints\n",\ "(0, 0, 0);\n",\ "(1, 0, 0);\n",\ "(1, 1, 0);\n",\ "(0, 1, 0);\n",\ "(0.5, 0, -0.86);\n",\ "(0.5, 1, -0.86);\n",\ "\n",\ "mapfaces\n",\ "(1, 2, 3, 4) del;\n",\ "(5, 1, 4, 6) del;\n",\ "(1, 5, 2) del;\n",\ "(4, 3, 6) del;\n",\ "\n",\ "newpoints\n",\ "\n",\ "newfaces\n",\ "(5, 2, 3, 6);\n",\ "\n",\ "elements\n",\ "(1, 5, 2, 4, 6, 3);\n",\ "\n",\ "freezone2\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 1 P5 };\n",\ "{ 1 P6 };\n",\ "{ -0.1 P1, 0.3 P2, 0.3 P3, -0.1 P4, 0.3 P5, 0.3 P6 };\n",\ "\n",\ "freezonelimit\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 1 P5 };\n",\ "{ 1 P6 };\n",\ "{ 0 P1, 0.25 P2, 0.25 P3, 0 P4, 0.25 P5, 0.25 P6 };\n",\ "\n",\ "freeset\n",\ "1 2 3 5 6 7;\n",\ "\n",\ "freeset\n",\ "1 3 4 6;\n",\ "\n",\ "\n",\ "endrule\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "rule \"fill prism\"\n",\ "\n",\ "quality 1\n",\ "\n",\ "mappoints\n",\ "(0, 0, 0);\n",\ "(1, 0, 0);\n",\ "(1, 1, 0);\n",\ "(0, 1, 0);\n",\ "(0.5, 0, -0.86);\n",\ "(0.5, 1, -0.86);\n",\ "\n",\ "mapfaces\n",\ "(1, 2, 3, 4) del;\n",\ "(2, 5, 6, 3) del;\n",\ "(5, 1, 4, 6) del;\n",\ "(1, 5, 2) del;\n",\ "(4, 3, 6) del;\n",\ "\n",\ "newpoints\n",\ "\n",\ "newfaces\n",\ "\n",\ "\n",\ "elements\n",\ "(1, 5, 2, 4, 6, 3);\n",\ "\n",\ "freezone2\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 1 P5 };\n",\ "{ 1 P6 };\n",\ "\n",\ "freeset\n",\ "1 2 4 5;\n",\ "\n",\ "freeset\n",\ "2 3 4 6;\n",\ "\n",\ "endrule\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "rule \"prism on 3 quad, one trig\"\n",\ "\n",\ "quality 2\n",\ "\n",\ "mappoints\n",\ "(0, 0, 0);\n",\ "(1, 0, 0);\n",\ "(1, 1, 0);\n",\ "(0, 1, 0);\n",\ "(0.5, 0, -0.86);\n",\ "(0.5, 1, -0.86);\n",\ "\n",\ "mapfaces\n",\ "(1, 2, 3, 4) del;\n",\ "(2, 5, 6, 3) del;\n",\ "(5, 1, 4, 6) del;\n",\ "(1, 5, 2) del;\n",\ "\n",\ "newpoints\n",\ "\n",\ "newfaces\n",\ "(4, 6, 3);\n",\ "\n",\ "\n",\ "elements\n",\ "(1, 5, 2, 4, 6, 3);\n",\ "\n",\ "freezone2\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 1 P5 };\n",\ "{ 1 P6 };\n",\ "\n",\ "freeset\n",\ "1 2 4 5;\n",\ "\n",\ "freeset\n",\ "2 3 4 6;\n",\ "\n",\ "endrule\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "rule \"flat prism\"\n",\ "\n",\ "quality 100\n",\ "\n",\ "mappoints\n",\ "(0, 0, 0);\n",\ "(1, 0, 0);\n",\ "(0.5, 0.866, 0);\n",\ "(0, 0, -1);\n",\ "(1, 0, -1);\n",\ "(0.5, 0.866, -1);\n",\ "\n",\ "\n",\ "mapfaces\n",\ "(1, 2, 3) del;\n",\ "(5, 4, 6) del;\n",\ "\n",\ "newpoints\n",\ "\n",\ "newfaces\n",\ "(1, 2, 4);\n",\ "(4, 2, 5);\n",\ "(2, 3, 5);\n",\ "(5, 3, 6);\n",\ "(3, 1, 6);\n",\ "(6, 1, 4);\n",\ "\n",\ "\n",\ "\n",\ "elements\n",\ "(1, 2, 3, 5, 4, 6);\n",\ "\n",\ "freezone2\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P5 };\n",\ "{ 1 P6 };\n",\ "endrule\n",\ "\n",\ 0}; } netgen-6.2.1804/libsrc/meshing/python_mesh.cpp0000644000175000017500000010173513272137567017765 0ustar kurtkurt#ifdef NG_PYTHON #include <../general/ngpython.hpp> #include #include "meshing.hpp" // #include // #include #include <../interface/writeuser.hpp> using namespace netgen; extern const char *ngscript[]; namespace netgen { extern bool netgen_executable_started; extern shared_ptr ng_geometry; } template void ExportArray (py::module &m) { using TA = Array; string name = string("Array_") + typeid(T).name(); py::class_>(m, name.c_str()) .def ("__len__", [] ( Array &self ) { return self.Size(); } ) .def ("__getitem__", FunctionPointer ([](Array & self, TIND i) -> T& { if (i < BASE || i >= BASE+self.Size()) throw py::index_error(); return self[i]; }), py::return_value_policy::reference) .def("__iter__", [] ( TA & self) { return py::make_iterator (self.begin(),self.end()); }, py::keep_alive<0,1>()) // keep array alive while iterator is used ; } void TranslateException (const NgException & ex) { string err = string("Netgen exception: ")+ex.What(); PyErr_SetString(PyExc_RuntimeError, err.c_str()); } static Transformation<3> global_trafo(Vec<3> (0,0,0)); DLL_HEADER void ExportNetgenMeshing(py::module &m) { py::register_exception(m, "NgException"); m.attr("_netgen_executable_started") = py::cast(netgen::netgen_executable_started); string script; const char ** hcp = ngscript; while (*hcp) script += *hcp++; m.attr("_ngscript") = py::cast(script); py::class_(m, "NGDummyArgument") .def("__bool__", []( NGDummyArgument &self ) { return false; } ) ; py::class_> (m, "Point2d") .def(py::init()) .def ("__str__", &ToString>) .def(py::self-py::self) .def(py::self+Vec<2>()) .def(py::self-Vec<2>()) ; py::class_> (m, "Point3d") .def(py::init()) .def ("__str__", &ToString>) .def(py::self-py::self) .def(py::self+Vec<3>()) .def(py::self-Vec<3>()) ; m.def ("Pnt", FunctionPointer ([](double x, double y, double z) { return global_trafo(Point<3>(x,y,z)); })); m.def ("Pnt", FunctionPointer ([](double x, double y) { return Point<2>(x,y); })); /* // duplicated functions ???? m.def ("Pnt", FunctionPointer ([](double x, double y, double z) { return Point<3>(x,y,z); })); m.def ("Pnt", FunctionPointer ([](double x, double y) { return Point<2>(x,y); })); */ py::class_> (m, "Vec2d") .def(py::init()) .def ("__str__", &ToString>) .def(py::self+py::self) .def(py::self-py::self) .def(-py::self) .def(double()*py::self) .def("Norm", &Vec<2>::Length) ; py::class_> (m, "Vec3d") .def(py::init()) .def ("__str__", &ToString>) .def(py::self+py::self) .def(py::self-py::self) .def(-py::self) .def(double()*py::self) .def("Norm", &Vec<3>::Length) ; m.def ("Vec", FunctionPointer ([] (double x, double y, double z) { return global_trafo(Vec<3>(x,y,z)); })); m.def ("Vec", FunctionPointer ([] (double x, double y) { return Vec<2>(x,y); })); py::class_> (m, "Trafo") .def(py::init>()) .def("__call__", [] (Transformation<3> trafo, Point<3> p) { return trafo(p); }) ; m.def ("SetTransformation", FunctionPointer ([](int dir, double angle) { if (dir > 0) global_trafo.SetAxisRotation (dir, angle*M_PI/180); else global_trafo = Transformation<3> (Vec<3>(0,0,0)); }), py::arg("dir")=int(0), py::arg("angle")=int(0)); py::class_(m, "PointId") .def(py::init()) .def("__repr__", &ToString) .def("__str__", &ToString) .def_property_readonly("nr", &PointIndex::operator int) .def("__eq__" , FunctionPointer( [](PointIndex &self, PointIndex &other) { return static_cast(self)==static_cast(other); }) ) .def("__hash__" , FunctionPointer( [](PointIndex &self ) { return static_cast(self); }) ) ; py::class_(m, "ElementId3D") .def(py::init()) .def("__repr__", &ToString) .def("__str__", &ToString) .def_property_readonly("nr", &ElementIndex::operator int) .def("__eq__" , FunctionPointer( [](ElementIndex &self, ElementIndex &other) { return static_cast(self)==static_cast(other); }) ) .def("__hash__" , FunctionPointer( [](ElementIndex &self ) { return static_cast(self); }) ) ; py::class_(m, "ElementId2D") .def(py::init()) .def("__repr__", &ToString) .def("__str__", &ToString) .def_property_readonly("nr", &SurfaceElementIndex::operator int) .def("__eq__" , FunctionPointer( [](SurfaceElementIndex &self, SurfaceElementIndex &other) { return static_cast(self)==static_cast(other); }) ) .def("__hash__" , FunctionPointer( [](SurfaceElementIndex &self ) { return static_cast(self); }) ) ; py::class_(m, "ElementId1D") .def(py::init()) .def("__repr__", &ToString) .def("__str__", &ToString) .def_property_readonly("nr", &SegmentIndex::operator int) .def("__eq__" , FunctionPointer( [](SegmentIndex &self, SegmentIndex &other) { return static_cast(self)==static_cast(other); }) ) .def("__hash__" , FunctionPointer( [](SegmentIndex &self ) { return static_cast(self); }) ) ; /* py::class_> ("Point") .def(py::init()) ; */ py::class_> */ >(m, "MeshPoint") .def(py::init>()) .def("__str__", &ToString) .def("__repr__", &ToString) .def_property_readonly("p", FunctionPointer([](const MeshPoint & self) { py::list l; l.append ( py::cast(self[0]) ); l.append ( py::cast(self[1]) ); l.append ( py::cast(self[2]) ); return py::tuple(l); })) .def("__getitem__", FunctionPointer([](const MeshPoint & self, int index) { if(index<0 || index>2) throw py::index_error(); return self[index]; })) .def("__setitem__", FunctionPointer([](MeshPoint & self, int index, double val) { if(index<0 || index>2) throw py::index_error(); self(index) = val; })) ; py::class_(m, "Element3D") .def(py::init([](int index, py::list vertices) { Element * newel = nullptr; if (py::len(vertices) == 4) { newel = new Element(TET); for (int i = 0; i < 4; i++) (*newel)[i] = py::extract(vertices[i])(); newel->SetIndex(index); } else if (py::len(vertices) == 5) { newel = new Element(PYRAMID); for (int i = 0; i < 5; i++) (*newel)[i] = py::extract(vertices[i])(); newel->SetIndex(index); } else if (py::len(vertices) == 6) { newel = new Element(PRISM); for (int i = 0; i < 6; i++) (*newel)[i] = py::extract(vertices[i])(); newel->SetIndex(index); } else if (py::len(vertices) == 8) { newel = new Element(HEX); for (int i = 0; i < 8; i++) (*newel)[i] = py::extract(vertices[i])(); newel->SetIndex(index); } else throw NgException ("cannot create element"); return newel; }), py::arg("index")=1,py::arg("vertices"), "create volume element" ) .def("__repr__", &ToString) .def_property("index", &Element::GetIndex, &Element::SetIndex) .def_property_readonly("vertices", FunctionPointer ([](const Element & self) -> py::list { py::list li; for (int i = 0; i < self.GetNV(); i++) li.append (py::cast(self[i])); return li; })) .def_property_readonly("points", FunctionPointer ([](const Element & self) -> py::list { py::list li; for (int i = 0; i < self.GetNP(); i++) li.append (py::cast(self[i])); return li; })) ; py::class_(m, "Element2D") .def(py::init ([](int index, py::list vertices) { Element2d * newel = nullptr; if (py::len(vertices) == 3) { newel = new Element2d(TRIG); for (int i = 0; i < 3; i++) (*newel)[i] = py::extract(vertices[i])(); newel->SetIndex(index); } else if (py::len(vertices) == 4) { newel = new Element2d(QUAD); for (int i = 0; i < 4; i++) (*newel)[i] = py::extract(vertices[i])(); newel->SetIndex(index); } else if (py::len(vertices) == 6) { newel = new Element2d(TRIG6); for(int i = 0; i<6; i++) (*newel)[i] = py::extract(vertices[i])(); newel->SetIndex(index); } else throw NgException("Inconsistent number of vertices in Element2D"); return newel; }), py::arg("index")=1,py::arg("vertices"), "create surface element" ) .def_property("index", &Element2d::GetIndex, &Element2d::SetIndex) .def_property_readonly("vertices", FunctionPointer([](const Element2d & self) -> py::list { py::list li; for (int i = 0; i < self.GetNV(); i++) li.append(py::cast(self[i])); return li; })) .def_property_readonly("points", FunctionPointer ([](const Element2d & self) -> py::list { py::list li; for (int i = 0; i < self.GetNP(); i++) li.append (py::cast(self[i])); return li; })) ; py::class_(m, "Element1D") .def(py::init([](py::list vertices, py::list surfaces, int index, int edgenr) { Segment * newel = new Segment(); for (int i = 0; i < 2; i++) (*newel)[i] = py::extract(vertices[i])(); newel -> si = index; newel -> edgenr = edgenr; newel -> epgeominfo[0].edgenr = edgenr; newel -> epgeominfo[1].edgenr = edgenr; // needed for codim2 in 3d newel -> edgenr = index; if (len(surfaces)) { newel->surfnr1 = py::extract(surfaces[0])(); newel->surfnr2 = py::extract(surfaces[1])(); } return newel; }), py::arg("vertices"), py::arg("surfaces")=py::list(), py::arg("index")=1, py::arg("edgenr")=1, "create segment element" ) .def("__repr__", &ToString) .def_property_readonly("vertices", FunctionPointer ([](const Segment & self) -> py::list { py::list li; for (int i = 0; i < 2; i++) li.append (py::cast(self[i])); return li; })) .def_property_readonly("points", FunctionPointer ([](const Segment & self) -> py::list { py::list li; for (int i = 0; i < self.GetNP(); i++) li.append (py::cast(self[i])); return li; })) .def_property_readonly("surfaces", FunctionPointer ([](const Segment & self) -> py::list { py::list li; li.append (py::cast(self.surfnr1)); li.append (py::cast(self.surfnr2)); return li; })) .def_property_readonly("index", FunctionPointer([](const Segment &self) -> size_t { return self.si; })) .def_property_readonly("edgenr", FunctionPointer([](const Segment & self) -> size_t { return self.edgenr; })) ; py::class_(m, "Element0D") .def(py::init([](PointIndex vertex, int index) { Element0d * instance = new Element0d; instance->pnum = vertex; instance->index = index; return instance; }), py::arg("vertex"), py::arg("index")=1, "create point element" ) .def("__repr__", &ToString) .def_property_readonly("vertices", FunctionPointer ([](const Element0d & self) -> py::list { py::list li; li.append (py::cast(self.pnum)); return li; })) ; py::class_(m, "FaceDescriptor") .def(py::init()) .def(py::init([](int surfnr, int domin, int domout, int bc) { FaceDescriptor * instance = new FaceDescriptor(); instance->SetSurfNr(surfnr); instance->SetDomainIn(domin); instance->SetDomainOut(domout); instance->SetBCProperty(bc); return instance; }), py::arg("surfnr")=1, py::arg("domin")=1, py::arg("domout")=py::int_(0), py::arg("bc")=py::int_(0), "create facedescriptor") .def("__str__", &ToString) .def("__repr__", &ToString) .def_property("surfnr", &FaceDescriptor::SurfNr, &FaceDescriptor::SetSurfNr) .def_property("domin", &FaceDescriptor::DomainIn, &FaceDescriptor::SetDomainIn) .def_property("domout", &FaceDescriptor::DomainOut, &FaceDescriptor::SetDomainOut) .def_property("bc", &FaceDescriptor::BCProperty, &FaceDescriptor::SetBCProperty) .def_property("bcname", [](FaceDescriptor & self) -> string { return self.GetBCName(); }, [](FaceDescriptor & self, string name) { self.SetBCName(new string(name)); } // memleak ) .def("SetSurfaceColor", [](FaceDescriptor & self, py::list color ) { Vec3d c; c.X() = py::extract(color[0])(); c.Y() = py::extract(color[1])(); c.Z() = py::extract(color[2])(); self.SetSurfColour(c); }) ; ExportArray(m); ExportArray(m); ExportArray(m); ExportArray(m); ExportArray(m); ExportArray(m); py::implicitly_convertible< int, PointIndex>(); py::class_> (m, "NetgenGeometry", py::dynamic_attr()) ; py::class_>(m, "Mesh") // .def(py::init<>("create empty mesh")) .def(py::init( [] (int dim) { auto mesh = make_shared(); mesh -> SetDimension(dim); SetGlobalMesh(mesh); // for visualization mesh -> SetGeometry (make_shared()); return mesh; } ), py::arg("dim")=3 ) /* .def("__init__", [](Mesh *instance, int dim) { new (instance) Mesh(); instance->SetDimension(dim); }, py::arg("dim")=3 ) */ .def("__str__", &ToString) .def("Load", FunctionPointer ([](Mesh & self, const string & filename) { istream * infile; #ifdef PARALLEL MPI_Comm_rank(MPI_COMM_WORLD, &id); MPI_Comm_size(MPI_COMM_WORLD, &ntasks); char* buf = nullptr; int strs = 0; if(id==0) { #endif if (filename.find(".vol.gz") != string::npos) infile = new igzstream (filename.c_str()); else infile = new ifstream (filename.c_str()); // ifstream input(filename); #ifdef PARALLEL //still inside id==0-bracket... self.Load(*infile); self.Distribute(); /** Copy the rest of the file into a string (for geometry) **/ stringstream geom_part; geom_part << infile->rdbuf(); string geom_part_string = geom_part.str(); strs = geom_part_string.size(); buf = new char[strs]; memcpy(buf, geom_part_string.c_str(), strs*sizeof(char)); } else { self.SendRecvMesh(); } /** Scatter the geometry-string **/ MPI_Bcast(&strs, 1, MPI_INT, 0, MPI_COMM_WORLD); if(id!=0) buf = new char[strs]; MPI_Bcast(buf, strs, MPI_CHAR, 0, MPI_COMM_WORLD); if(id==0) delete infile; infile = new istringstream(string((const char*)buf, (size_t)strs)); delete[] buf; #else self.Load(*infile); #endif for (int i = 0; i < geometryregister.Size(); i++) { NetgenGeometry * hgeom = geometryregister[i]->LoadFromMeshFile (*infile); if (hgeom) { ng_geometry.reset (hgeom); self.SetGeometry(ng_geometry); break; } } if (!ng_geometry) ng_geometry = make_shared(); self.SetGeometry(ng_geometry); delete infile; }),py::call_guard()) // static_cast(&Mesh::Load)) .def("Save", static_cast(&Mesh::Save),py::call_guard()) .def("Export", [] (Mesh & self, string filename, string format) { if (WriteUserFormat (format, self, /* *self.GetGeometry(), */ filename)) { string err = string ("nothing known about format")+format; Array names, extensions; RegisterUserFormats (names, extensions); err += "\navailable formats are:\n"; for (auto name : names) err += string("'") + name + "'\n"; throw NgException (err); } }, py::arg("filename"), py::arg("format"),py::call_guard()) .def_property("dim", &Mesh::GetDimension, &Mesh::SetDimension) .def("Elements3D", static_cast&(Mesh::*)()> (&Mesh::VolumeElements), py::return_value_policy::reference) .def("Elements2D", static_cast&(Mesh::*)()> (&Mesh::SurfaceElements), py::return_value_policy::reference) .def("Elements1D", static_cast&(Mesh::*)()> (&Mesh::LineSegments), py::return_value_policy::reference) .def("Elements0D", FunctionPointer([] (Mesh & self) -> Array& { return self.pointelements; } ), py::return_value_policy::reference) .def("Points", static_cast (&Mesh::Points), py::return_value_policy::reference) .def("FaceDescriptor", static_cast (&Mesh::GetFaceDescriptor), py::return_value_policy::reference) .def("GetNFaceDescriptors", &Mesh::GetNFD) .def("GetNCD2Names", &Mesh::GetNCD2Names) .def("__getitem__", FunctionPointer ([](const Mesh & self, PointIndex pi) { return self[pi]; })) .def ("Add", FunctionPointer ([](Mesh & self, MeshPoint p) { return self.AddPoint (Point3d(p)); })) .def ("Add", FunctionPointer ([](Mesh & self, const Element & el) { return self.AddVolumeElement (el); })) .def ("Add", FunctionPointer ([](Mesh & self, const Element2d & el) { return self.AddSurfaceElement (el); })) .def ("Add", FunctionPointer ([](Mesh & self, const Segment & el) { return self.AddSegment (el); })) .def ("Add", FunctionPointer ([](Mesh & self, const Element0d & el) { return self.pointelements.Append (el); })) .def ("Add", FunctionPointer ([](Mesh & self, const FaceDescriptor & fd) { return self.AddFaceDescriptor (fd); })) .def ("DeleteSurfaceElement", FunctionPointer ([](Mesh & self, SurfaceElementIndex i) { return self.DeleteSurfaceElement (i); })) .def ("Compress", FunctionPointer ([](Mesh & self) { return self.Compress (); }),py::call_guard()) .def ("SetBCName", &Mesh::SetBCName) .def ("GetBCName", FunctionPointer([](Mesh & self, int bc)->string { return self.GetBCName(bc); })) .def ("SetMaterial", &Mesh::SetMaterial) .def ("GetMaterial", FunctionPointer([](Mesh & self, int domnr) { return string(self.GetMaterial(domnr)); })) .def ("GetCD2Name", &Mesh::GetCD2Name) .def("SetCD2Name", &Mesh::SetCD2Name) .def ("AddPointIdentification", [](Mesh & self, py::object pindex1, py::object pindex2, int identnr, int type) { if(py::extract(pindex1).check() && py::extract(pindex2).check()) { self.GetIdentifications().Add (py::extract(pindex1)(), py::extract(pindex2)(), identnr); self.GetIdentifications().SetType(identnr, Identifications::ID_TYPE(type)); // type = 2 ... periodic } }, //py::default_call_policies(), py::arg("pid1"), py::arg("pid2"), py::arg("identnr"), py::arg("type")) .def ("CalcLocalH", &Mesh::CalcLocalH) .def ("SetMaxHDomain", [] (Mesh& self, py::list maxhlist) { Array maxh; for(auto el : maxhlist) maxh.Append(py::cast(el)); self.SetMaxHDomain(maxh); }) .def ("GenerateVolumeMesh", [](Mesh & self, py::object pymp) { cout << "generate vol mesh" << endl; MeshingParameters mp; { py::gil_scoped_acquire acquire; if (py::extract(pymp).check()) mp = py::extract(pymp)(); else { mp.optsteps3d = 5; } } MeshVolume (mp, self); OptimizeVolume (mp, self); }, py::arg("mp")=NGDummyArgument(),py::call_guard()) .def ("OptimizeVolumeMesh", FunctionPointer ([](Mesh & self) { MeshingParameters mp; mp.optsteps3d = 5; OptimizeVolume (mp, self); }),py::call_guard()) .def ("Refine", FunctionPointer ([](Mesh & self) { if (self.GetGeometry()) self.GetGeometry()->GetRefinement().Refine(self); else Refinement().Refine(self); }),py::call_guard()) .def ("SecondOrder", FunctionPointer ([](Mesh & self) { if (self.GetGeometry()) self.GetGeometry()->GetRefinement().MakeSecondOrder(self); else Refinement().MakeSecondOrder(self); })) .def ("GetGeometry", [] (Mesh& self) { return self.GetGeometry(); }) .def ("SetGeometry", [](Mesh & self, shared_ptr geo) { self.SetGeometry(geo); }) /* .def ("SetGeometry", FunctionPointer ([](Mesh & self, shared_ptr geo) { self.SetGeometry(geo); })) */ .def ("BuildSearchTree", &Mesh::BuildElementSearchTree,py::call_guard()) .def ("BoundaryLayer", FunctionPointer ([](Mesh & self, int bc, py::list thicknesses, int volnr, py::list materials) { int n = py::len(thicknesses); BoundaryLayerParameters blp; for (int i = 1; i <= self.GetNFD(); i++) if (self.GetFaceDescriptor(i).BCProperty() == bc) blp.surfid.Append (i); cout << "add layer at surfaces: " << blp.surfid << endl; blp.prismlayers = n; blp.growthfactor = 1.0; // find max domain nr int maxind = 0; for (ElementIndex ei = 0; ei < self.GetNE(); ei++) maxind = max (maxind, self[ei].GetIndex()); cout << "maxind = " << maxind << endl; for ( int i=0; i(thicknesses[i])()) ; blp.new_matnrs.Append( maxind+1+i ); self.SetMaterial (maxind+1+i, py::extract(materials[i])().c_str()); } blp.bulk_matnr = volnr; GenerateBoundaryLayer (self, blp); } )) .def ("BoundaryLayer", FunctionPointer ([](Mesh & self, int bc, double thickness, int volnr, string material) { BoundaryLayerParameters blp; for (int i = 1; i <= self.GetNFD(); i++) if (self.GetFaceDescriptor(i).BCProperty() == bc) blp.surfid.Append (i); cout << "add layer at surfaces: " << blp.surfid << endl; blp.prismlayers = 1; blp.hfirst = thickness; blp.growthfactor = 1.0; // find max domain nr int maxind = 0; for (ElementIndex ei = 0; ei < self.GetNE(); ei++) maxind = max (maxind, self[ei].GetIndex()); cout << "maxind = " << maxind << endl; self.SetMaterial (maxind+1, material.c_str()); blp.new_matnr = maxind+1; blp.bulk_matnr = volnr; GenerateBoundaryLayer (self, blp); } )) .def ("EnableTable", [] (Mesh & self, string name, bool set) { if (name == "edges") const_cast(self.GetTopology()).SetBuildEdges(set); if (name == "faces") const_cast(self.GetTopology()).SetBuildFaces(set); }, py::arg("name"), py::arg("set")=true) .def ("Scale", FunctionPointer([](Mesh & self, double factor) { for(auto i = 0; i(m,"MeshingStep") .value("MESHEDGES",MESHCONST_MESHEDGES) .value("MESHSURFACE",MESHCONST_OPTSURFACE) .value("MESHVOLUME",MESHCONST_OPTVOLUME) ; typedef MeshingParameters MP; py::class_ (m, "MeshingParameters") .def(py::init<>()) .def(py::init([](double maxh, bool quad_dominated, int optsteps2d, int optsteps3d, MESHING_STEP perfstepsend, int only3D_domain, const string & meshsizefilename, double grading, double curvaturesafety, double segmentsperedge) { MP * instance = new MeshingParameters; instance->maxh = maxh; instance->quad = int(quad_dominated); instance->optsteps2d = optsteps2d; instance->optsteps3d = optsteps3d; instance->only3D_domain_nr = only3D_domain; instance->perfstepsend = perfstepsend; instance->meshsizefilename = meshsizefilename; instance->grading = grading; instance->curvaturesafety = curvaturesafety; instance->segmentsperedge = segmentsperedge; return instance; }), py::arg("maxh")=1000, py::arg("quad_dominated")=false, py::arg("optsteps2d") = 3, py::arg("optsteps3d") = 3, py::arg("perfstepsend") = MESHCONST_OPTVOLUME, py::arg("only3D_domain") = 0, py::arg("meshsizefilename") = "", py::arg("grading")=0.3, py::arg("curvaturesafety")=2, py::arg("segmentsperedge")=1, "create meshing parameters" ) .def("__str__", &ToString) .def_property("maxh", FunctionPointer ([](const MP & mp ) { return mp.maxh; }), FunctionPointer ([](MP & mp, double maxh) { return mp.maxh = maxh; })) .def("RestrictH", FunctionPointer ([](MP & mp, double x, double y, double z, double h) { mp.meshsize_points.Append ( MeshingParameters::MeshSizePoint (Point<3> (x,y,z), h)); }), py::arg("x"), py::arg("y"), py::arg("z"), py::arg("h") ) ; m.def("SetTestoutFile", FunctionPointer ([] (const string & filename) { delete testout; testout = new ofstream (filename); })); m.def("SetMessageImportance", FunctionPointer ([] (int importance) { int old = printmessage_importance; printmessage_importance = importance; return old; })); } PYBIND11_MODULE(libmesh, m) { ExportNetgenMeshing(m); } #endif netgen-6.2.1804/libsrc/meshing/meshfunc2d.cpp0000644000175000017500000000244013272137567017457 0ustar kurtkurt#include #include "meshing.hpp" namespace netgen { DLL_HEADER void Optimize2d (Mesh & mesh, MeshingParameters & mp) { static int timer = NgProfiler::CreateTimer ("optimize2d"); NgProfiler::RegionTimer reg(timer); mesh.CalcSurfacesOfNode(); const char * optstr = mp.optimize2d.c_str(); int optsteps = mp.optsteps2d; for (int i = 1; i <= optsteps; i++) for (size_t j = 1; j <= strlen(optstr); j++) { if (multithread.terminate) break; switch (optstr[j-1]) { case 's': { // topological swap MeshOptimize2d meshopt; meshopt.SetMetricWeight (mp.elsizeweight); meshopt.EdgeSwapping (mesh, 0); break; } case 'S': { // metric swap MeshOptimize2d meshopt; meshopt.SetMetricWeight (mp.elsizeweight); meshopt.EdgeSwapping (mesh, 1); break; } case 'm': { MeshOptimize2d meshopt; meshopt.SetMetricWeight (mp.elsizeweight); meshopt.ImproveMesh(mesh, mp); break; } case 'c': { MeshOptimize2d meshopt; meshopt.SetMetricWeight (mp.elsizeweight); meshopt.CombineImprove(mesh); break; } default: cerr << "Optimization code " << optstr[j-1] << " not defined" << endl; } } } } netgen-6.2.1804/libsrc/meshing/ruler3.hpp0000644000175000017500000001272313272137567016647 0ustar kurtkurt#ifndef FILE_RULER3 #define FILE_RULER3 /** 3D element generation rule. */ class vnetrule { private: /// rule is applicable for quality classes above this value int quality; /// name of rule char * name; /// point coordinates in reference position Array points; /// old and new faces in reference numbering Array faces; /// additional edges of rule Array edges; /// points of freezone in reference coordinates Array freezone; /// points of freezone in reference coordinates if tolcalss to infty Array freezonelimit; /// point index, if point equal to mappoint, otherwise 0 Array freezonepi; /// faces of each convex part of freezone Array*> freefaces; /// set of points of each convex part of freezone Array*> freesets; /// points of transformed freezone Array transfreezone; /// edges of each convex part of freezone Array*> freeedges; /// face numbers to be deleted Array delfaces; /// elements to be generated Array elements; /// tolerances for points and faces (used ??) Array tolerances, linetolerances; /// transformation matrix DenseMatrix oldutonewu; /// transformation matrix: deviation old point to dev. freezone DenseMatrix * oldutofreezone; /** transformation matrix: deviation old point to dev. freezone, quality class to infinity */ DenseMatrix * oldutofreezonelimit; // can be deleted: // BaseMatrix *outf, *outfl; /** a point is outside of convex part of freezone, iff mat * (point, 1) >= 0 for each component (correct ?) */ Array freefaceinequ; /// Array orientations; /** flags specified in rule-description file: t .. test rule */ Array flags; /** topological distance of face to base element non-connected: > 100 (??) */ Array fnearness; Array pnearness; int maxpnearness; /// number of old points in rule int noldp; /// number of new poitns in rule int noldf; /// box containing free-zone public: // double fzminx, fzmaxx, fzminy, fzmaxy, fzminz, fzmaxz; Box3d fzbox; public: /// vnetrule (); /// ~vnetrule (); /// int GetNP () const { return points.Size(); } /// int GetNF () const { return faces.Size(); } /// int GetNE () const { return elements.Size(); } /// int GetNO () const { return orientations.Size(); } /// int GetNEd () const { return edges.Size(); } /// int GetNOldP () const { return noldp; } /// int GetNOldF () const { return noldf; } /// int GetNDelF () const { return delfaces.Size(); } /// int GetQuality () const { return quality; } /// int GetFNearness (int fi) const { return fnearness.Get(fi); } /// int GetPNearness (int pi) const { return pnearness.Get(pi); } /// int GetMaxPNearness () const { return maxpnearness; } /// const Point3d & GetPoint (int i) const { return points.Get(i); } /// const Element2d & GetFace (int i) const { return faces.Get(i); } /// const Element & GetElement (int i) const { return elements.Get(i); } /// const twoint & GetEdge (int i) const { return edges.Get(i); } /// int GetDelFace (int i) const { return delfaces.Get(i); } /// int IsDelFace (int fn) const; /// float CalcPointDist (int pi, const Point3d & p) const; /// double PointDistFactor (int pi) const { return tolerances.Get(pi); } /// void SetFreeZoneTransformation (const Vector & allp, int tolclass); /// int IsInFreeZone (const Point3d & p) const; /** 0 not in free-zone 1 in free-zone -1 maybe */ int IsTriangleInFreeZone (const Point3d & p1, const Point3d & p2, const Point3d & p3, const Array & pi, int newone); /// int IsQuadInFreeZone (const Point3d & p1, const Point3d & p2, const Point3d & p3, const Point3d & p4, const Array & pi, int newone); /// int IsTriangleInFreeSet (const Point3d & p1, const Point3d & p2, const Point3d & p3, int fs, const Array & pi, int newone); /// int IsQuadInFreeSet (const Point3d & p1, const Point3d & p2, const Point3d & p3, const Point3d & p4, int fs, const Array & pi, int newone); /// int ConvexFreeZone () const; /// if t1 and t2 are neighbourtriangles, NTP returns the opposite Point of t1 in t2 int NeighbourTrianglePoint (const threeint & t1, const threeint & t2) const; /// const Point3d & GetTransFreeZone (int i) { return transfreezone.Get(i); } /// int GetNP (int fn) const { return faces.Get(fn).GetNP(); } /// int GetPointNr (int fn, int endp) const { return faces.Get(fn).PNum(endp); } /// int GetPointNrMod (int fn, int endp) const { return faces.Get(fn).PNumMod(endp); } /// const fourint & GetOrientation (int i) { return orientations.Get(i); } /// int TestFlag (char flag) const; /// const DenseMatrix & GetOldUToNewU () const { return oldutonewu; } // // const DenseMatrix & GetOldUToFreeZone () const { return oldutofreezone; } // // const DenseMatrix & GetOldUToFreeZoneLimit () const // { return oldutofreezonelimit; } /// const char * Name () const { return name; } /// void LoadRule (istream & ist); /// const Array & GetTransFreeZone () { return transfreezone; } /// int TestOk () const; /// friend void TestRules (); /// // friend void Plot3DRule (const ROT3D & r, char key); }; #endif netgen-6.2.1804/libsrc/meshing/hexarls.cpp0000644000175000017500000000757213272137567017102 0ustar kurtkurtnamespace netgen { const char * hexrules[] = { "rule \"Hexa left-right-top\"\n",\ "\n",\ "quality 1\n",\ "\n",\ "flags t;\n",\ "\n",\ "mappoints\n",\ "(0, 0, 0);\n",\ "(1, 0, 0) { 1 } ;\n",\ "(1, 1, 0) { 1 } ;\n",\ "(0, 1, 0) { 1 } ;\n",\ "(0, 0, 1) { 1 } ;\n",\ "(1, 0, 1) { 1 } ;\n",\ "(1, 1, 1) { 1 } ;\n",\ "(0, 1, 1) { 1 } ;\n",\ "\n",\ "mapfaces\n",\ "(4, 3, 2, 1) del;\n",\ "(3, 7, 6, 2) del;\n",\ "(7, 8, 5, 6) del;\n",\ "(8, 4, 1, 5) del;\n",\ "\n",\ "newpoints\n",\ "\n",\ "newfaces\n",\ "(5, 6, 2, 1);\n",\ "(7, 8, 4, 3);\n",\ "\n",\ "elements\n",\ "(4, 3, 2, 1, 8, 7, 6, 5);\n",\ "\n",\ "freezone2\n",\ "{ 1 P5 };\n",\ "{ 1 P6 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 0.3 P1, 0.3 P2, 0.3 P5, 0.3 P6, -0.05 P3, -0.05 P4, -0.05 P7, -0.05 P8 };\n",\ "{ 0.3 P3, 0.3 P4, 0.3 P7, 0.3 P8, -0.05 P1, -0.05 P2, -0.05 P5, -0.05 P6 };\n",\ "\n",\ "freezonelimit\n",\ "{ 1 P5 };\n",\ "{ 1 P6 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 0.25 P1, 0.25 P2, 0.25 P5, 0.25 P6, -0.0 P3, -0.0 P4, -0.0 P7, -0.0 P8 };\n",\ "{ 0.25 P3, 0.25 P4, 0.25 P7, 0.25 P8, -0.0 P1, -0.0 P1, -0.0 P5, -0.0 P6 };\n",\ "\n",\ "\n",\ "endrule\n",\ "\n",\ "\n",\ "\n",\ "rule \"Hexa left-right-top (10)\"\n",\ "\n",\ "quality 10\n",\ "\n",\ "flags t;\n",\ "\n",\ "mappoints\n",\ "(0, 0, 0);\n",\ "(1, 0, 0) { 1 } ;\n",\ "(1, 1, 0) { 1 } ;\n",\ "(0, 1, 0) { 1 } ;\n",\ "(0, 0, 1) { 1 } ;\n",\ "(1, 0, 1) { 1 } ;\n",\ "(1, 1, 1) { 1 } ;\n",\ "(0, 1, 1) { 1 } ;\n",\ "\n",\ "mapfaces\n",\ "(4, 3, 2, 1) del;\n",\ "(3, 7, 6, 2) del;\n",\ "(7, 8, 5, 6) del;\n",\ "(8, 4, 1, 5) del;\n",\ "\n",\ "newpoints\n",\ "\n",\ "newfaces\n",\ "(5, 6, 2, 1);\n",\ "(7, 8, 4, 3);\n",\ "\n",\ "elements\n",\ "(4, 3, 2, 1, 8, 7, 6, 5);\n",\ "\n",\ "freezone2\n",\ "{ 1 P5 };\n",\ "{ 1 P6 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 0.251 P1, 0.251 P2, 0.251 P5, 0.251 P6, -0.05 P3, -0.001 P4, -0.001 P7, -0.001 P8 };\n",\ "{ 0.251 P3, 0.251 P4, 0.251 P7, 0.251 P8, -0.05 P1, -0.001 P2, -0.001 P5, -0.001 P6 };\n",\ "\n",\ "freezonelimit\n",\ "{ 1 P5 };\n",\ "{ 1 P6 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 0.25 P1, 0.25 P2, 0.25 P5, 0.25 P6, -0.0 P3, -0.0 P4, -0.0 P7, -0.0 P8 };\n",\ "{ 0.25 P3, 0.25 P4, 0.25 P7, 0.25 P8, -0.0 P1, -0.0 P1, -0.0 P5, -0.0 P6 };\n",\ "\n",\ "\n",\ "endrule\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "rule \"Hexa left-right-top-front\"\n",\ "\n",\ "quality 1\n",\ "\n",\ "flags t;\n",\ "\n",\ "mappoints\n",\ "(0, 0, 0);\n",\ "(1, 0, 0) { 1 } ;\n",\ "(1, 1, 0) { 1 } ;\n",\ "(0, 1, 0) { 1 } ;\n",\ "(0, 0, 1) { 1 } ;\n",\ "(1, 0, 1) { 1 } ;\n",\ "(1, 1, 1) { 1 } ;\n",\ "(0, 1, 1) { 1 } ;\n",\ "\n",\ "mapfaces\n",\ "(4, 3, 2, 1) del;\n",\ "(3, 7, 6, 2) del;\n",\ "(7, 8, 5, 6) del;\n",\ "(8, 4, 1, 5) del;\n",\ "(1, 2, 6, 5) del;\n",\ "newpoints\n",\ "\n",\ "newfaces\n",\ "(7, 8, 4, 3);\n",\ "\n",\ "elements\n",\ "(4, 3, 2, 1, 8, 7, 6, 5);\n",\ "\n",\ "freezone2\n",\ "{ 1 P5 };\n",\ "{ 1 P6 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 0.3 P3, 0.3 P4, 0.3 P7, 0.3 P8, -0.05 P1, -0.05 P2, -0.05 P5, -0.05 P6 };\n",\ "\n",\ "freezonelimit\n",\ "{ 1 P5 };\n",\ "{ 1 P6 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 0.25 P3, 0.25 P4, 0.25 P7, 0.25 P8, -0.0 P1, -0.0 P1, -0.0 P5, -0.0 P6 };\n",\ "\n",\ "\n",\ "endrule\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "rule \"Hexa fill\"\n",\ "\n",\ "quality 1\n",\ "\n",\ "flags t;\n",\ "\n",\ "mappoints\n",\ "(0, 0, 0);\n",\ "(1, 0, 0) { 1 } ;\n",\ "(1, 1, 0) { 1 } ;\n",\ "(0, 1, 0) { 1 } ;\n",\ "(0, 0, 1) { 1 } ;\n",\ "(1, 0, 1) { 1 } ;\n",\ "(1, 1, 1) { 1 } ;\n",\ "(0, 1, 1) { 1 } ;\n",\ "\n",\ "mapfaces\n",\ "(4, 3, 2, 1) del;\n",\ "(3, 7, 6, 2) del;\n",\ "(7, 8, 5, 6) del;\n",\ "(8, 4, 1, 5) del;\n",\ "(1, 2, 6, 5) del;\n",\ "(3, 4, 8, 7) del;\n",\ "\n",\ "newpoints\n",\ "\n",\ "newfaces\n",\ "\n",\ "elements\n",\ "(4, 3, 2, 1, 8, 7, 6, 5);\n",\ "\n",\ "freezone2\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P5 };\n",\ "{ 1 P3 };\n",\ "\n",\ "\n",\ "endrule\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ 0}; } netgen-6.2.1804/libsrc/meshing/netrule3.cpp0000644000175000017500000005764413272137567017202 0ustar kurtkurt#include #include "meshing.hpp" namespace netgen { vnetrule :: vnetrule () { name = new char[1]; name[0] = char(0); quality = 0; } vnetrule :: ~vnetrule () { // if (strlen(name)) delete [] name; for (int i = 1; i <= freefaces.Size(); i++) delete freefaces.Elem(i); for (int i = 1; i <= freesets.Size(); i++) delete freesets.Elem(i); for (int i = 1; i <= freeedges.Size(); i++) delete freeedges.Elem(i); for (int i = 1; i <= freefaceinequ.Size(); i++) delete freefaceinequ.Elem(i); delete oldutofreezone; delete oldutofreezonelimit; } int vnetrule :: TestFlag (char flag) const { for (int i = 1; i <= flags.Size(); i++) if (flags.Get(i) == flag) return 1; return 0; } void vnetrule :: SetFreeZoneTransformation (const Vector & allp, int tolclass) { int i, j; // double nx, ny, nz, v1x, v1y, v1z, v2x, v2y, v2z; double nl; const threeint * ti; int fs; double lam1 = 1.0/(2 * tolclass - 1); double lam2 = 1-lam1; transfreezone.SetSize (freezone.Size()); int np = points.Size(); int nfp = freezone.Size(); Vector vp(np), vfp1(nfp), vfp2(nfp); for (i = 1; i <= 3; i++) { for (j = 1; j <= np; j++) vp(j-1) = allp(i+3*j-3-1); oldutofreezone->Mult (vp, vfp1); oldutofreezonelimit->Mult (vp, vfp2); vfp1 *= lam1; vfp1.Add (lam2, vfp2); for (j = 1; j <= nfp; j++) transfreezone.Elem(j).X(i) = vfp1(j-1); } // MARK(setfz2); fzbox.SetPoint (transfreezone.Elem(1)); for (i = 2; i <= freezone.Size(); i++) fzbox.AddPoint (transfreezone.Elem(i)); // MARK(setfz3); for (fs = 1; fs <= freesets.Size(); fs++) { Array & freesetfaces = *freefaces.Get(fs); DenseMatrix & freesetinequ = *freefaceinequ.Get(fs); for (i = 1; i <= freesetfaces.Size(); i++) { ti = &freesetfaces.Get(i); const Point3d & p1 = transfreezone.Get(ti->i1); const Point3d & p2 = transfreezone.Get(ti->i2); const Point3d & p3 = transfreezone.Get(ti->i3); Vec3d v1(p1, p2); Vec3d v2(p1, p3); Vec3d n; Cross (v1, v2, n); nl = n.Length(); if (nl < 1e-10) { freesetinequ.Set(1, 1, 0); freesetinequ.Set(1, 2, 0); freesetinequ.Set(1, 3, 0); freesetinequ.Set(1, 4, -1); } else { // n /= nl; freesetinequ.Set(i, 1, n.X()/nl); freesetinequ.Set(i, 2, n.Y()/nl); freesetinequ.Set(i, 3, n.Z()/nl); freesetinequ.Set(i, 4, -(p1.X() * n.X() + p1.Y() * n.Y() + p1.Z() * n.Z()) / nl); } } } /* (*testout) << "Transformed freezone: " << endl; for (i = 1; i <= transfreezone.Size(); i++) (*testout) << transfreezone.Get(i) << " "; (*testout) << endl; */ } int vnetrule :: ConvexFreeZone () const { int i, j, k, fs; // (*mycout) << "Convex free zone...\n"; int ret1=1; // int ret2=1; for (fs = 1; fs <= freesets.Size(); fs++) { const DenseMatrix & freesetinequ = *freefaceinequ.Get(fs); // const Array & freeset = *freesets.Get(fs); const Array & freesetedges = *freeedges.Get(fs); // const Array & freesetfaces = *freefaces.Get(fs); for (i = 1; i <= freesetedges.Size(); i++) { j = freesetedges.Get(i).i1; //triangle j with opposite point k k = freesetedges.Get(i).i2; if ( freesetinequ.Get(j, 1) * transfreezone.Get(k).X() + freesetinequ.Get(j, 2) * transfreezone.Get(k).Y() + freesetinequ.Get(j, 3) * transfreezone.Get(k).Z() + freesetinequ.Get(j, 4) > 0 ) { ret1=0; } } } return ret1; } int vnetrule :: IsInFreeZone (const Point3d & p) const { int i, fs; char inthis; for (fs = 1; fs <= freesets.Size(); fs++) { inthis = 1; Array & freesetfaces = *freefaces.Get(fs); DenseMatrix & freesetinequ = *freefaceinequ.Get(fs); for (i = 1; i <= freesetfaces.Size() && inthis; i++) { if (freesetinequ.Get(i, 1) * p.X() + freesetinequ.Get(i, 2) * p.Y() + freesetinequ.Get(i, 3) * p.Z() + freesetinequ.Get(i, 4) > 0) inthis = 0; } if (inthis) return 1; } return 0; } int vnetrule :: IsTriangleInFreeZone (const Point3d & p1, const Point3d & p2, const Point3d & p3, const Array & pi, int newone) { int fs; int infreeset, cannot = 0; ArrayMem pfi(3), pfi2(3); // convert from local index to freeset index int i, j; for (i = 1; i <= 3; i++) { pfi.Elem(i) = 0; if (pi.Get(i)) { for (j = 1; j <= freezonepi.Size(); j++) if (freezonepi.Get(j) == pi.Get(i)) pfi.Elem(i) = j; } } for (fs = 1; fs <= freesets.Size(); fs++) { const Array & freeseti = *freesets.Get(fs); for (i = 1; i <= 3; i++) { pfi2.Elem(i) = 0; for (j = 1; j <= freeseti.Size(); j++) if (pfi.Get(i) == freeseti.Get(j)) pfi2.Elem(i) = pfi.Get(i); } infreeset = IsTriangleInFreeSet(p1, p2, p3, fs, pfi2, newone); if (infreeset == 1) return 1; if (infreeset == -1) cannot = -1; } return cannot; } int vnetrule :: IsTriangleInFreeSet (const Point3d & p1, const Point3d & p2, const Point3d & p3, int fs, const Array & pi, int newone) { int i, ii; Vec3d n; int allleft, allright; int hos1, hos2, hos3, os1, os2, os3; double hf, lam1, lam2, f, c1, c2, alpha; double v1n, v2n, h11, h12, h22, dflam1, dflam2; double lam1old, lam2old, fold; double hpx, hpy, hpz, v1x, v1y, v1z, v2x, v2y, v2z; int act1, act2, act3, it; int cntout; Array activefaces; int isin; // MARK(triinfz); Array & freesetfaces = *freefaces.Get(fs); DenseMatrix & freesetinequ = *freefaceinequ.Get(fs); int cnt = 0; for (i = 1; i <= 3; i++) if (pi.Get(i)) cnt++; /* (*testout) << "trig in free set : " << p1 << " - " << p2 << " - " << p3 << endl; (*testout) << "common points: " << cnt << endl; */ if (!newone) cnt = 0; if (cnt == 1) { // MARK(triinfz1); int upi = 0, lpiu = 0; for (i = 1; i <= 3; i++) if (pi.Get(i)) { upi = i; lpiu = pi.Get(i); } Vec3d v1, v2; switch (upi) { case 1: { v1 = p2 - p1; v2 = p3 - p1; break; } case 2: { v1 = p3 - p2; v2 = p1 - p2; break; } case 3: { v1 = p1 - p3; v2 = p2 - p3; break; } } v1 /= v1.Length(); v2 /= v2.Length(); Cross (v1, v2, n); n /= n.Length(); // (*testout) << "Test new: " << endl; for (i = 1; i <= freesetfaces.Size(); i++) { if ( (freesetfaces.Get(i).i1 == lpiu) || (freesetfaces.Get(i).i2 == lpiu) || (freesetfaces.Get(i).i3 == lpiu) ) { // freeface has point Vec3d a (freesetinequ.Get(i, 1), freesetinequ.Get(i, 2), freesetinequ.Get(i, 3)); // if (1 - fabs (a * n) < 1e-8 ) // continue; Vec3d an; Cross (a, n, an); double lan = an.Length(); if (lan < 1e-10) continue; an /= lan; int out1 = (a * v1) > 0; int out2 = (a * v2) > 0; // (*testout) << "out1, out2 = " << out1 << ", " << out2 << endl; if (out1 && out2) return 0; if (!out1 && !out2) continue; // if ( ( (an * v1) < 0) && ( (an * v2) < 0) ) // falsch !!!! // an *= -1; // solve an = lam1 v1 + lam2 v2 double vii11 = v1 * v1; double vii12 = v1 * v2; double vii22 = v2 * v2; double det = vii11 * vii22 - vii12 * vii12; if ( fabs (det) < 1e-10 ) continue; double rs1 = an * v1; double rs2 = an * v2; double lambda1 = rs1 * vii22 - rs2 * vii12; double lambda2 = rs2 * vii11 - rs1 * vii12; if (fabs (lambda1) > fabs (lambda2)) { if (lambda1 < 0) an *= -1; } else { if (lambda2 < 0) an *= -1; } if (lambda1 * lambda2 < 0 && 0) { if (fabs (lambda1) > 1e-14 && fabs (lambda2) > 1e-14) { // (*mycout) << "lambda1 lambda2 < 0" << endl; (*testout) << "lambdai different" << endl; (*testout) << "v1 = " << v1 << endl; (*testout) << "v2 = " << v2 << endl; (*testout) << "n = " << n << endl; (*testout) << "a = " << a << endl; (*testout) << "an = " << an << endl; (*testout) << "a * v1 = " << (a * v1) << endl; (*testout) << "a * v2 = " << (a * v2) << endl; (*testout) << "an * v1 = " << (an * v1) << endl; (*testout) << "an * v2 = " << (an * v2) << endl; (*testout) << "vii = " << vii11 << ", " << vii12 << ", " << vii22 << endl; (*testout) << "lambdai = " << lambda1 << ", " << lambda2 << endl; (*testout) << "rs = " << rs1 << ", " << rs2 << endl; continue; } } if (out1) v1 = an; else v2 = an; } } return 1; /* (*testout) << "overlap trig " << p1 << p2 << p3 << endl; (*testout) << "upi = " << upi << endl; (*testout) << "v1 = " << v1 << " v2 = " << v2 << endl; */ switch (upi) { case 1: { v1 = p2 - p1; v2 = p3 - p1; break; } case 2: { v1 = p3 - p2; v2 = p1 - p2; break; } case 3: { v1 = p1 - p3; v2 = p2 - p3; break; } } v1 /= v1.Length(); v2 /= v2.Length(); Cross (v1, v2, n); n /= n.Length(); // (*testout) << "orig v1, v2 = " << v1 << ", " << v2 << endl; for (i = 1; i <= freesetfaces.Size(); i++) { if ( (freesetfaces.Get(i).i1 == lpiu) || (freesetfaces.Get(i).i2 == lpiu) || (freesetfaces.Get(i).i3 == lpiu) ) { /* (*testout) << "v1, v2, now = " << v1 << ", " << v2 << endl; // freeface has point (*testout) << "freesetface: " << freesetfaces.Get(i).i1 << " " << freesetfaces.Get(i).i2 << " " << freesetfaces.Get(i).i3 << " "; */ Vec3d a (freesetinequ.Get(i, 1), freesetinequ.Get(i, 2), freesetinequ.Get(i, 3)); // (*testout) << "a = " << a << endl; Vec3d an; Cross (a, n, an); double lan = an.Length(); // (*testout) << "an = " << an << endl; if (lan < 1e-10) continue; an /= lan; // (*testout) << "a*v1 = " << (a*v1) << " a*v2 = " << (a*v2) << endl; int out1 = (a * v1) > 0; // int out2 = (a * v2) > 0; // (*testout) << "out1, 2 = " << out1 << ", " << out2 << endl; double vii11 = v1 * v1; double vii12 = v1 * v2; double vii22 = v2 * v2; double det = vii11 * vii22 - vii12 * vii12; if ( fabs (det) < 1e-10 ) continue; double rs1 = an * v1; double rs2 = an * v2; double lambda1 = rs1 * vii22 - rs2 * vii12; double lambda2 = rs2 * vii11 - rs1 * vii12; // (*testout) << "lambda1, lambda2 = " << lambda1 << ", " << lambda2 << endl; if (fabs (lambda1) > fabs (lambda2)) { if (lambda1 < 0) an *= -1; } else { if (lambda2 < 0) an *= -1; } if (lambda1 * lambda2 < 0) { if (fabs (lambda1) > 1e-14 && fabs (lambda2) > 1e-14) { // (*mycout) << "lambda1 lambda2 < 0" << endl; (*testout) << "lambdai different" << endl; (*testout) << "v1 = " << v1 << endl; (*testout) << "v2 = " << v2 << endl; (*testout) << "n = " << n << endl; (*testout) << "a = " << a << endl; (*testout) << "an = " << an << endl; (*testout) << "a * v1 = " << (a * v1) << endl; (*testout) << "a * v2 = " << (a * v2) << endl; (*testout) << "an * v1 = " << (an * v1) << endl; (*testout) << "an * v2 = " << (an * v2) << endl; (*testout) << "vii = " << vii11 << ", " << vii12 << ", " << vii22 << endl; (*testout) << "lambdai = " << lambda1 << ", " << lambda2 << endl; (*testout) << "rs = " << rs1 << ", " << rs2 << endl; continue; } } if (out1) v1 = an; else v2 = an; } } return 1; } if (cnt == 2) { // (*testout) << "tripoitns: " << p1 << " " << p2 << " " << p3 << endl; // MARK(triinfz2); int pi1 = 0, pi2 = 0, pi3 = 0; Vec3d a1, a2; // outer normals Vec3d trivec; // vector from common edge to third point of triangle for (i = 1; i <= 3; i++) if (pi.Get(i)) { pi2 = pi1; pi1 = pi.Get(i); } else pi3 = i; switch (pi3) { case 1: trivec = (p1 - p2); break; case 2: trivec = (p2 - p3); break; case 3: trivec = (p3 - p2); break; } Array lpi(freezonepi.Size()); for (i = 1; i <= lpi.Size(); i++) lpi.Elem(i) = 0; lpi.Elem(pi1) = 1; lpi.Elem(pi2) = 1; int ff1 = 0, ff2 = 0; for (i = 1; i <= freesetfaces.Size(); i++) { if (lpi.Get(freesetfaces.Get(i).i1) + lpi.Get(freesetfaces.Get(i).i2) + lpi.Get(freesetfaces.Get(i).i3) == 2) { ff2 = ff1; ff1 = i; } } if (ff2 == 0) return 1; a1 = Vec3d (freesetinequ.Get(ff1, 1), freesetinequ.Get(ff1, 2), freesetinequ.Get(ff1, 3)); a2 = Vec3d (freesetinequ.Get(ff2, 1), freesetinequ.Get(ff2, 2), freesetinequ.Get(ff2, 3)); if ( ( (a1 * trivec) > 0) || ( (a2 * trivec) > 0)) return 0; return 1; } if (cnt == 3) { // MARK(triinfz3); Array lpi(freezonepi.Size()); for (i = 1; i <= lpi.Size(); i++) lpi.Elem(i) = 0; for (i = 1; i <= 3; i++) lpi.Elem(pi.Get(i)) = 1; for (i = 1; i <= freesetfaces.Size(); i++) { if (lpi.Get(freesetfaces.Get(i).i1) + lpi.Get(freesetfaces.Get(i).i2) + lpi.Get(freesetfaces.Get(i).i3) == 3) { return 0; } } return 1; } // MARK(triinfz0); os1 = os2 = os3 = 0; activefaces.SetSize(0); // is point inside ? for (i = 1; i <= freesetfaces.Size(); i++) { hos1 = freesetinequ.Get(i, 1) * p1.X() + freesetinequ.Get(i, 2) * p1.Y() + freesetinequ.Get(i, 3) * p1.Z() + freesetinequ.Get(i, 4) > -1E-5; hos2 = freesetinequ.Get(i, 1) * p2.X() + freesetinequ.Get(i, 2) * p2.Y() + freesetinequ.Get(i, 3) * p2.Z() + freesetinequ.Get(i, 4) > -1E-5; hos3 = freesetinequ.Get(i, 1) * p3.X() + freesetinequ.Get(i, 2) * p3.Y() + freesetinequ.Get(i, 3) * p3.Z() + freesetinequ.Get(i, 4) > -1E-5; if (hos1 && hos2 && hos3) return 0; if (hos1) os1 = 1; if (hos2) os2 = 1; if (hos3) os3 = 1; if (hos1 || hos2 || hos3) activefaces.Append (i); } if (!os1 || !os2 || !os3) return 1; v1x = p2.X() - p1.X(); v1y = p2.Y() - p1.Y(); v1z = p2.Z() - p1.Z(); v2x = p3.X() - p1.X(); v2y = p3.Y() - p1.Y(); v2z = p3.Z() - p1.Z(); n.X() = v1y * v2z - v1z * v2y; n.Y() = v1z * v2x - v1x * v2z; n.Z() = v1x * v2y - v1y * v2x; n /= n.Length(); allleft = allright = 1; for (i = 1; i <= transfreezone.Size() && (allleft || allright); i++) { const Point3d & p = transfreezone.Get(i); float scal = (p.X() - p1.X()) * n.X() + (p.Y() - p1.Y()) * n.Y() + (p.Z() - p1.Z()) * n.Z(); if ( scal > 1E-8 ) allleft = 0; if ( scal < -1E-8 ) allright = 0; } if (allleft || allright) return 0; lam1old = lam2old = lam1 = lam2 = 1.0 / 3.0; // testout << endl << endl << "Start minimizing" << endl; it = 0; int minit; minit = 1000; fold = 1E10; while (1) { it++; if (it > 1000) return -1; if (lam1 < 0) lam1 = 0; if (lam2 < 0) lam2 = 0; if (lam1 + lam2 > 1) lam1 = 1 - lam2; if (it > minit) { (*testout) << "it = " << it << endl; (*testout) << "lam1/2 = " << lam1 << " " << lam2 << endl; } hpx = p1.X() + lam1 * v1x + lam2 * v2x; hpy = p1.Y() + lam1 * v1y + lam2 * v2y; hpz = p1.Z() + lam1 * v1z + lam2 * v2z; f = 0; h11 = h12 = h22 = dflam1 = dflam2 = 0; cntout = 0; isin = 1; for (i = 1; i <= activefaces.Size(); i++) { ii = activefaces.Get(i); hf = freesetinequ.Get(ii, 1) * hpx + freesetinequ.Get(ii, 2) * hpy + freesetinequ.Get(ii, 3) * hpz + freesetinequ.Get(ii, 4); if (hf > -1E-7) isin = 0; hf += 1E-4; if (hf > 0) { f += hf * hf; v1n = freesetinequ.Get(ii, 1) * v1x + freesetinequ.Get(ii, 2) * v1y + freesetinequ.Get(ii, 3) * v1z; v2n = freesetinequ.Get(ii, 1) * v2x + freesetinequ.Get(ii, 2) * v2y + freesetinequ.Get(ii, 3) * v2z; h11 += 2 * v1n * v1n; h12 += 2 * v1n * v2n; h22 += 2 * v2n * v2n; dflam1 += 2 * hf * v1n; dflam2 += 2 * hf * v2n; cntout++; } } if (isin) return 1; if (it > minit) { (*testout) << "f = " << f << " dfdlam = " << dflam1 << " " << dflam2 << endl; (*testout) << "h = " << h11 << " " << h12 << " " << h22 << endl; (*testout) << "active: " << cntout << endl; (*testout) << "lam1-lam1old = " << (lam1 - lam1old) << endl; (*testout) << "lam2-lam2old = " << (lam2 - lam2old) << endl; } if (f >= fold) { lam1 = 0.100000000000000 * lam1 + 0.9000000000000000 * lam1old; lam2 = 0.100000000000000 * lam2 + 0.9000000000000000 * lam2old; } else { lam1old = lam1; lam2old = lam2; fold = f; if (f < 1E-9) return 1; h11 += 1E-10; h22 += 1E-10; c1 = - ( h22 * dflam1 - h12 * dflam2) / (h11 * h22 - h12 * h12); c2 = - (-h12 * dflam1 + h11 * dflam2) / (h11 * h22 - h12 * h12); alpha = 1; if (it > minit) (*testout) << "c1/2 = " << c1 << " " << c2 << endl; act1 = lam1 <= 1E-6 && c1 <= 0; act2 = lam2 <= 1E-6 && c2 <= 0; act3 = lam1 + lam2 >= 1 - 1E-6 && c1 + c2 >= 0; if (it > minit) (*testout) << "act1,2,3 = " << act1 << act2 << act3 << endl; if ( (act1 && act2) || (act1 && act3) || (act2 && act3) ) return 0; if (act1) { c1 = 0; c2 = - dflam2 / h22; } if (act2) { c1 = - dflam1 / h11; c2 = 0; } if (act3) { c1 = - (dflam1 - dflam2) / (h11 + h22 - 2 * h12); c2 = -c1; } if (it > minit) (*testout) << "c1/2 now = " << c1 << " " << c2 << endl; if (f > 100 * sqrt (sqr (c1) + sqr (c2))) return 0; if (lam1 + alpha * c1 < 0 && !act1) alpha = -lam1 / c1; if (lam2 + alpha * c2 < 0 && !act2) alpha = -lam2 / c2; if (lam1 + lam2 + alpha * (c1 + c2) > 1 && !act3) alpha = (1 - lam1 - lam2) / (c1 + c2); if (it > minit) (*testout) << "alpha = " << alpha << endl; lam1 += alpha * c1; lam2 += alpha * c2; } } } int vnetrule :: IsQuadInFreeZone (const Point3d & p1, const Point3d & p2, const Point3d & p3, const Point3d & p4, const Array & pi, int newone) { int fs; int infreeset, cannot = 0; ArrayMem pfi(4), pfi2(4); // convert from local index to freeset index int i, j; for (i = 1; i <= 4; i++) { pfi.Elem(i) = 0; if (pi.Get(i)) { for (j = 1; j <= freezonepi.Size(); j++) if (freezonepi.Get(j) == pi.Get(i)) pfi.Elem(i) = j; } } for (fs = 1; fs <= freesets.Size(); fs++) { const Array & freeseti = *freesets.Get(fs); for (i = 1; i <= 4; i++) { pfi2.Elem(i) = 0; for (j = 1; j <= freeseti.Size(); j++) if (pfi.Get(i) == freeseti.Get(j)) pfi2.Elem(i) = pfi.Get(i); } infreeset = IsQuadInFreeSet(p1, p2, p3, p4, fs, pfi2, newone); if (infreeset == 1) return 1; if (infreeset == -1) cannot = -1; } return cannot; } int vnetrule :: IsQuadInFreeSet (const Point3d & p1, const Point3d & p2, const Point3d & p3, const Point3d & p4, int fs, const Array & pi, int newone) { int i; int cnt = 0; for (i = 1; i <= 4; i++) if (pi.Get(i)) cnt++; /* (*testout) << "test quad in freeset: " << p1 << " - " << p2 << " - " << p3 << " - " << p4 << endl; (*testout) << "pi = "; for (i = 1; i <= pi.Size(); i++) (*testout) << pi.Get(i) << " "; (*testout) << endl; (*testout) << "cnt = " << cnt << endl; */ if (cnt == 4) { return 1; } if (cnt == 3) { return 1; } ArrayMem pi3(3); int res; pi3.Elem(1) = pi.Get(1); pi3.Elem(2) = pi.Get(2); pi3.Elem(3) = pi.Get(3); res = IsTriangleInFreeSet (p1, p2, p3, fs, pi3, newone); if (res) return res; pi3.Elem(1) = pi.Get(2); pi3.Elem(2) = pi.Get(3); pi3.Elem(3) = pi.Get(4); res = IsTriangleInFreeSet (p2, p3, p4, fs, pi3, newone); if (res) return res; pi3.Elem(1) = pi.Get(3); pi3.Elem(2) = pi.Get(4); pi3.Elem(3) = pi.Get(1); res = IsTriangleInFreeSet (p3, p4, p1, fs, pi3, newone); if (res) return res; pi3.Elem(1) = pi.Get(4); pi3.Elem(2) = pi.Get(1); pi3.Elem(3) = pi.Get(2); res = IsTriangleInFreeSet (p4, p1, p2, fs, pi3, newone); return res; } float vnetrule :: CalcPointDist (int pi, const Point3d & p) const { float dx = p.X() - points.Get(pi).X(); float dy = p.Y() - points.Get(pi).Y(); float dz = p.Z() - points.Get(pi).Z(); // const threefloat * tf = &tolerances.Get(pi); // return tf->f1 * dx * dx + tf->f2 * dx * dy + tf->f3 * dy * dy; return tolerances.Get(pi) * (dx * dx + dy * dy + dz * dz); } int vnetrule :: TestOk () const { Array cntpused(points.Size()); Array edge1, edge2; Array delf(faces.Size()); int i, j, k; int pi1, pi2; int found; for (i = 1; i <= cntpused.Size(); i++) cntpused.Elem(i) = 0; for (i = 1; i <= faces.Size(); i++) delf.Elem(i) = 0; for (i = 1; i <= delfaces.Size(); i++) delf.Elem(delfaces.Get(i)) = 1; for (i = 1; i <= faces.Size(); i++) if (delf.Get(i) || i > noldf) for (j = 1; j <= faces.Get(i).GetNP(); j++) cntpused.Elem(faces.Get(i).PNum(j))++; for (i = 1; i <= cntpused.Size(); i++) if (cntpused.Get(i) > 0 && cntpused.Get(i) < 2) { return 0; } // (*testout) << endl; for (i = 1; i <= faces.Size(); i++) { // (*testout) << "face " << i << endl; for (j = 1; j <= faces.Get(i).GetNP(); j++) { pi1 = 0; pi2 = 0; if (delf.Get(i)) { pi1 = faces.Get(i).PNumMod(j); pi2 = faces.Get(i).PNumMod(j+1); } if (i > noldf) { pi1 = faces.Get(i).PNumMod(j+1); pi2 = faces.Get(i).PNumMod(j); } found = 0; if (pi1) { for (k = 1; k <= edge1.Size(); k++) if (edge1.Get(k) == pi1 && edge2.Get(k) == pi2) { found = 1; edge1.DeleteElement(k); edge2.DeleteElement(k); k--; // (*testout) << "Del edge " << pi1 << "-" << pi2 << endl; } if (!found) { edge1.Append (pi2); edge2.Append (pi1); // (*testout) << "Add edge " << pi1 << "-" << pi2 << endl; } } } } if (edge1.Size() > 0) { return 0; } /* cntpused.SetSize(freezone.Size()); for (i = 1; i <= cntpused.Size(); i++) cntpused[i] = 0; for (i = 1; i <= freefaces.Size(); i++) { cntpused[freefaces[i].i1]++; cntpused[freefaces[i].i2]++; cntpused[freefaces[i].i3]++; } for (i = 1; i <= cntpused.Size(); i++) if (cntpused[i] < 3) { (*mycout) << "Fall 3" << endl; return 0; } for (i = 1; i <= freefaces.Size(); i++) { for (j = 1; j <= 3; j++) { if (j == 1) { pi1 = freefaces[i].i1; pi2 = freefaces[i].i2; } if (j == 2) { pi1 = freefaces[i].i2; pi2 = freefaces[i].i3; } if (j == 3) { pi1 = freefaces[i].i3; pi2 = freefaces[i].i1; } found = 0; for (k = 1; k <= edge1.Size(); k++) if (edge1[k] == pi1 && edge2[k] == pi2) { found = 1; edge1.DeleteElement(k); edge2.DeleteElement(k); k--; } if (!found) { edge1.Append (pi2); edge2.Append (pi1); } } } if (edge1.Size() > 0) { (*mycout) << "Fall 4" << endl; return 0; } */ return 1; } int vnetrule :: IsDelFace (int fn) const { int i; for (i = 1; i <= GetNDelF(); i++) if (GetDelFace(i) == fn) return 1; return 0; } } netgen-6.2.1804/libsrc/meshing/tetrarls.cpp0000644000175000017500000006426013272137567017271 0ustar kurtkurtnamespace netgen { const char * tetrules[] = { "tolfak 0.5\n",\ "\n",\ "rule \"Free Tetrahedron\"\n",\ "\n",\ "quality 1\n",\ "\n",\ "mappoints\n",\ "(0, 0, 0);\n",\ "(1, 0, 0);\n",\ "(0.5, 0.866, 0);\n",\ "\n",\ "mapfaces\n",\ "(1, 2, 3) del;\n",\ "\n",\ "newpoints\n",\ "(0.5, 0.288, -0.816)\n",\ " { 0.333 X1, 0.333 X2, 0.333 X3 }\n",\ " { 0.333 Y1, 0.333 Y2, 0.333 Y3 } { };\n",\ "\n",\ "newfaces\n",\ "(4, 1, 2);\n",\ "(4, 2, 3);\n",\ "(4, 3, 1);\n",\ "\n",\ "elements\n",\ "(1, 2, 3, 4);\n",\ "\n",\ "freezone2\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1.6 P4, -0.2 P1, -0.2 P2, -0.2 P3 };\n",\ "{ -0.5 P1, 0.5 P2, 0.5 P3, 0.5 P4 };\n",\ "{ 0.5 P1, -0.5 P2, 0.5 P3, 0.5 P4 };\n",\ "{ 0.5 P1, 0.5 P2, -0.5 P3, 0.5 P4 };\n",\ "endrule\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "rule \"Tetrahedron 60\"\n",\ "\n",\ "quality 1\n",\ "\n",\ "flags c;\n",\ "\n",\ "mappoints\n",\ "(0, 0, 0);\n",\ "(1, 0, 0) { 0.5 } ;\n",\ "(0.5, 0.866, 0) { 0.5 };\n",\ "(0.5, 0.288, -0.816) { 0.5 };\n",\ "\n",\ "mapfaces\n",\ "(1, 2, 3) del;\n",\ "(1, 4, 2) del;\n",\ "\n",\ "newpoints\n",\ "\n",\ "newfaces\n",\ "(1, 4, 3);\n",\ "(4, 2, 3);\n",\ "\n",\ "elements\n",\ "(1, 2, 3, 4);\n",\ "\n",\ "freezone2\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ -0.35 P1, 0.45 P2, 0.45 P3, 0.45 P4 };\n",\ "{ 0.45 P1, -0.35 P2, 0.45 P3, 0.45 P4 };\n",\ "{ -0.05 P1, -0.05 P2, 0.7 P3, 0.4 P4 };\n",\ "\n",\ "\n",\ "freezonelimit\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 0.3333 P2, 0.3333 P3, 0.3334 P4 };\n",\ "{ 0.3333 P1, 0.3333 P3, 0.3334 P4 };\n",\ "{ 0.65 P3, 0.35 P4 };\n",\ "endrule\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "rule \"Tetrahedron 60 with edge(1)\"\n",\ "\n",\ "quality 1\n",\ "\n",\ "flags c;\n",\ "\n",\ "mappoints\n",\ "(0, 0, 0);\n",\ "(1, 0, 0) { 0.8 };\n",\ "(0.5, 0.866, 0) { 0.8 };\n",\ "(0.5, 0.288, -0.816) { 0.8 };\n",\ "\n",\ "mapfaces\n",\ "(1, 2, 3) del;\n",\ "(1, 4, 2) del;\n",\ "\n",\ "mapedges\n",\ "(3, 4);\n",\ "\n",\ "newpoints\n",\ "\n",\ "newfaces\n",\ "(1, 4, 3);\n",\ "(4, 2, 3);\n",\ "\n",\ "elements\n",\ "(1, 2, 3, 4);\n",\ "\n",\ "\n",\ "freezone2\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 0.4 P1, 0.4 P4, 0.4 P3, -0.2 P2 };\n",\ "{ 0.4 P2, 0.4 P4, 0.4 P3, -0.2 P1 };\n",\ "\n",\ "freezonelimit\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 0.3333 P1, 0.3333 P4, 0.3334 P3 };\n",\ "{ 0.3333 P2, 0.3333 P4, 0.3334 P3 };\n",\ "endrule\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "rule \"Tetrahedron Vis a Vis Point (1)\"\n",\ "\n",\ "quality 100\n",\ "\n",\ "mappoints\n",\ "(0, 0, 0);\n",\ "(1, 0, 0) { 0.5 };\n",\ "(0.5, 0.866, 0) { 0.5 };\n",\ "(0.5, 0.288, -0.816) { 0.5 };\n",\ "\n",\ "mapfaces\n",\ "(1, 2, 3) del;\n",\ "\n",\ "newpoints\n",\ "\n",\ "newfaces\n",\ "(4, 3, 1);\n",\ "(4, 2, 3);\n",\ "(4, 1, 2);\n",\ "\n",\ "elements\n",\ "(1, 2, 3, 4);\n",\ "\n",\ "freezone2\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ -0.5 P1, 0.5 P2, 0.5 P3, 0.5 P4 };\n",\ "{ 0.5 P1, -0.5 P2, 0.5 P3, 0.5 P4 };\n",\ "{ 0.5 P1, 0.5 P2, -0.5 P3, 0.5 P4 };\n",\ "{ 0.8 P1, -0.1 P2, -0.1 P3, 0.4 P4 };\n",\ "{ -0.1 P1, 0.8 P2, -0.1 P3, 0.4 P4 };\n",\ "{ -0.1 P1, -0.1 P2, 0.8 P3, 0.4 P4 };\n",\ "\n",\ "freezonelimit\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 0.3333 P2, 0.3333 P3, 0.3334 P4 };\n",\ "{ 0.3333 P1, 0.3333 P3, 0.3334 P4 };\n",\ "{ 0.3333 P1, 0.3333 P2, 0.3334 P4 };\n",\ "{ 0.7 P1, 0.3 P4 };\n",\ "{ 0.7 P2, 0.3 P4 };\n",\ "{ 0.7 P3, 0.3 P4 };\n",\ "endrule\n",\ "\n",\ "\n",\ "\n",\ "rule \"Tetrahedron Vis a Vis Point with edge(1)\"\n",\ "\n",\ "quality 1\n",\ "\n",\ "\n",\ "\n",\ "mappoints\n",\ "(0, 0, 0);\n",\ "(1, 0, 0) { 0.5 };\n",\ "(0.5, 0.866, 0) { 0.5 };\n",\ "(0.5, 0.288, -0.816) { 0.5 };\n",\ "\n",\ "mapfaces\n",\ "(1, 2, 3) del;\n",\ "\n",\ "mapedges\n",\ "(1, 4);\n",\ "\n",\ "newpoints\n",\ "\n",\ "newfaces\n",\ "(4, 3, 1);\n",\ "(4, 2, 3);\n",\ "(4, 1, 2);\n",\ "\n",\ "elements\n",\ "(1, 2, 3, 4);\n",\ "\n",\ "\n",\ "freezone2\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ -0.35 P1, 0.45 P2, 0.45 P3, 0.45 P4 };\n",\ "{ 0.45 P1, -0.35 P2, 0.45 P3, 0.45 P4 };\n",\ "{ 0.45 P1, 0.45 P2, -0.35 P3, 0.45 P4 };\n",\ "{ -0.05 P1, 0.7 P2, -0.05 P3, 0.4 P4 };\n",\ "{ -0.05 P1, -0.05 P2, 0.7 P3, 0.4 P4 };\n",\ "\n",\ "freezonelimit\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 0.3333 P2, 0.3333 P3, 0.3334 P4 };\n",\ "{ 0.3333 P1, 0.3333 P3, 0.3334 P4 };\n",\ "{ 0.3333 P1, 0.3333 P2, 0.3334 P4 };\n",\ "{ 0.65 P2, 0.35 P4 };\n",\ "{ 0.65 P3, 0.35 P4 };\n",\ "endrule\n",\ "\n",\ "\n",\ "\n",\ "rule \"Tetrahedron Vis a Vis Point with 2 edges (1)\"\n",\ "\n",\ "quality 1\n",\ "\n",\ "mappoints\n",\ "(0, 0, 0);\n",\ "(1, 0, 0) { 0.5 };\n",\ "(0.5, 0.866, 0) { 0.5 };\n",\ "(0.5, 0.288, -0.816) { 0.5 };\n",\ "\n",\ "mapfaces\n",\ "(1, 2, 3) del;\n",\ "\n",\ "mapedges\n",\ "(1, 4);\n",\ "(2, 4);\n",\ "\n",\ "newpoints\n",\ "\n",\ "newfaces\n",\ "(4, 3, 1);\n",\ "(4, 2, 3);\n",\ "(4, 1, 2);\n",\ "\n",\ "elements\n",\ "(1, 2, 3, 4);\n",\ "\n",\ "\n",\ "freezone2\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ -0.35 P1, 0.45 P2, 0.45 P3, 0.45 P4 };\n",\ "{ 0.45 P1, -0.35 P2, 0.45 P3, 0.45 P4 };\n",\ "{ 0.45 P1, 0.45 P2, -0.35 P3, 0.45 P4 };\n",\ "{ -0.05 P1, -0.05 P2, 0.7 P3, 0.4 P4 };\n",\ "\n",\ "freezonelimit\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 0.3333 P2, 0.3333 P3, 0.3334 P4 };\n",\ "{ 0.3333 P1, 0.3333 P3, 0.3334 P4 };\n",\ "{ 0.3333 P1, 0.3333 P2, 0.3334 P4 };\n",\ "{ 0.65 P3, 0.35 P4 };\n",\ "endrule\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "rule \"Tetrahedron Vis a Vis Point with 3 edges (1)\"\n",\ "\n",\ "quality 1\n",\ "\n",\ "mappoints\n",\ "(0, 0, 0);\n",\ "(1, 0, 0) { 0.5 };\n",\ "(0.5, 0.866, 0) { 0.5 };\n",\ "(0.5, 0.288, -0.816) { 0.5 };\n",\ "\n",\ "mapfaces\n",\ "(1, 2, 3) del;\n",\ "\n",\ "mapedges\n",\ "(1, 4);\n",\ "(2, 4);\n",\ "(3, 4);\n",\ "\n",\ "newpoints\n",\ "\n",\ "newfaces\n",\ "(4, 3, 1);\n",\ "(4, 2, 3);\n",\ "(4, 1, 2);\n",\ "\n",\ "elements\n",\ "(1, 2, 3, 4);\n",\ "\n",\ "\n",\ "freezone2\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ -0.35 P1, 0.45 P2, 0.45 P3, 0.45 P4 };\n",\ "{ 0.45 P1, -0.35 P2, 0.45 P3, 0.45 P4 };\n",\ "{ 0.45 P1, 0.45 P2, -0.35 P3, 0.45 P4 };\n",\ "\n",\ "freezonelimit\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 0.3333 P2, 0.3333 P3, 0.3334 P4 };\n",\ "{ 0.3333 P1, 0.3333 P3, 0.3334 P4 };\n",\ "{ 0.3333 P1, 0.3333 P2, 0.3334 P4 };\n",\ "endrule\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "rule \"Tetrahedron Vis a Vis Triangle (1)\"\n",\ "\n",\ "quality 100\n",\ "\n",\ "mappoints\n",\ "(0, 0, 0);\n",\ "(1, 0, 0) { 0.5 };\n",\ "(0.5, 0.866, 0) { 0.5 };\n",\ "(0, 0, -0.816) { 0.5 };\n",\ "(1, 0, -0.816) { 0.5 };\n",\ "(0.5, 0.866, -0.816) { 0.5 };\n",\ "\n",\ "mapfaces\n",\ "(1, 2, 3) del;\n",\ "(4, 6, 5) del;\n",\ "\n",\ "newpoints\n",\ "\n",\ "newfaces\n",\ "(1, 2, 4);\n",\ "(2, 5, 4);\n",\ "(2, 3, 6);\n",\ "(2, 6, 5);\n",\ "(3, 1, 4);\n",\ "(3, 4, 6);\n",\ "\n",\ "\n",\ "elements\n",\ "(1, 2, 3, 4);\n",\ "(4, 2, 3, 6);\n",\ "(4, 2, 6, 5);\n",\ "\n",\ "freezone2\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 1 P5 };\n",\ "{ 1 P6 };\n",\ "{ -0.2 P1, 0.35 P2, 0.35 P3, -0.2 P4, 0.35 P5, 0.35 P6 };\n",\ "{ 0.35 P1, -0.2 P2, 0.35 P3, 0.35 P4, -0.2 P5, 0.35 P6 };\n",\ "{ 0.35 P1, 0.35 P2, -0.2 P3, 0.35 P4, 0.35 P5, -0.2 P6 };\n",\ "endrule\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "rule \"Octaeder 1\"\n",\ "\n",\ "quality 100\n",\ "\n",\ "mappoints\n",\ "(0, 0, 0);\n",\ "(1, 0, 0) { 0.95 };\n",\ "(0.5, 0.866, 0) { 0.95 };\n",\ "(0.5, -0.288, -0.816) { 0.5 };\n",\ "\n",\ "mapfaces\n",\ "(1, 2, 3) del;\n",\ "(1, 4, 2) del;\n",\ "\n",\ "newpoints\n",\ "(1, 0.578, -0.816) { 0.5 X3, 0.5 X4 } { 0.5 Y3, 0.5 Y4} { 0.5 Z3, 0.5 Z4 };\n",\ "(0, 0.578, -0.816) { 0.5 X3, 0.5 X4 } { 0.5 Y3, 0.5 Y4} { 0.5 Z3, 0.5 Z4 };\n",\ "\n",\ "newfaces\n",\ "(2, 3, 5);\n",\ "(3, 1, 6);\n",\ "(3, 6, 5);\n",\ "(2, 5, 4);\n",\ "(1, 4, 6);\n",\ "(4, 5, 6);\n",\ "\n",\ "elements\n",\ "(3, 4, 1, 2);\n",\ "(3, 4, 2, 5);\n",\ "(3, 4, 5, 6);\n",\ "(3, 4, 6, 1);\n",\ "\n",\ "freezone\n",\ "(0, 0, 0);\n",\ "(1, 0, 0) { 1 X2 } { } { };\n",\ "(0.5, 0.866, 0) { 1 X3 } { 1 Y3 } { };\n",\ "(0.5, -0.288, -0.816) { 1 X4 } { 1 Y4 } { 1 Z4 };\n",\ "(-0.5, 1, -1.5) { 0.5 X3, 0.5 X4 } { 0.5 Y3, 0.5 Y4 } { 1 Z4 };\n",\ "( 1.5, 1, -1.5) { 0.5 X3, 0.5 X4 } { 0.5 Y3, 0.5 Y4 } { 1 Z4 };\n",\ "\n",\ "endrule\n",\ "\n",\ "\n",\ "\n",\ "rule \"Octaeder 2\"\n",\ "\n",\ "quality 100\n",\ "\n",\ "mappoints\n",\ "(0, 0, 0);\n",\ "(1, 0, 0) { 0.95 };\n",\ "(0.5, 0.866, 0) { 0.95 };\n",\ "(0.5, -0.288, -0.816) { 0.5 };\n",\ "(1, 0.578, -0.816) { 0.5 };\n",\ "\n",\ "mapfaces\n",\ "(1, 2, 3) del;\n",\ "(1, 4, 2) del;\n",\ "\n",\ "newpoints\n",\ "(0, 0.578, -0.816) { 0.5 X3, 0.5 X4 } { 0.5 Y3, 0.5 Y4} { 0.5 Z3, 0.5 Z4 };\n",\ "\n",\ "newfaces\n",\ "(2, 3, 5);\n",\ "(3, 1, 6);\n",\ "(3, 6, 5);\n",\ "(2, 5, 4);\n",\ "(1, 4, 6);\n",\ "(4, 5, 6);\n",\ "\n",\ "elements\n",\ "(3, 4, 1, 2);\n",\ "(3, 4, 2, 5);\n",\ "(3, 4, 5, 6);\n",\ "(3, 4, 6, 1);\n",\ "\n",\ "freezone\n",\ "(0, 0, 0);\n",\ "(1, 0, 0) { 1 X2 } { } { };\n",\ "(0.5, 0.866, 0) { 1 X3 } { 1 Y3 } { };\n",\ "(0.5, -0.288, -0.816) { 1 X4 } { 1 Y4 } { 1 Z4 };\n",\ "(1, 0.578, -0.816) { 1 X5 } { 1 Y5 } { 1 Z5 };\n",\ "\n",\ "(0.9, 0.097, -0.544) { 0.333 X2, 0.333 X4, 0.333 X5 }\n",\ " { 0.333 Y2, 0.333 Y4, 0.333 Y5 }\n",\ " { 0.333 Z2, 0.333 Z4, 0.333 Z5 };\n",\ "(0.9, 0.481, -0.272) { 0.333 X2, 0.333 X3, 0.333 X5 }\n",\ " { 0.333 Y2, 0.333 Y3, 0.333 Y5 }\n",\ " { 0.333 Z2, 0.333 Z3, 0.333 Z5 };\n",\ "\n",\ "(-0.5, 1, -1.5) { 0.5 X3, 0.5 X4 } { 0.5 Y3, 0.5 Y4 } { 0.5 Z4, 0.5 Z5 };\n",\ "\n",\ "endrule\n",\ "\n",\ "\n",\ "rule \"Octaeder 2a\"\n",\ "\n",\ "\n",\ "quality 100\n",\ "\n",\ "mappoints\n",\ "(0, 0, 0);\n",\ "(1, 0, 0) { 0.95 };\n",\ "(0.5, 0.866, 0) { 0.95 };\n",\ "(0.5, -0.288, -0.816) { 0.5 };\n",\ "(1, 0.578, -0.816) { 0.5 };\n",\ "\n",\ "mapfaces\n",\ "(1, 2, 3) del;\n",\ "(3, 2, 5) del;\n",\ "\n",\ "newpoints\n",\ "(0, 0.578, -0.816)\n",\ " { -1 X2, 1 X3, 1 X4 }\n",\ " { -1 Y2, 1 Y3, 1 Y4 }\n",\ " { -1 Z2, 1 Z3, 1 Z4 };\n",\ "\n",\ "newfaces\n",\ "(1, 2, 4);\n",\ "(3, 1, 6);\n",\ "(3, 6, 5);\n",\ "(2, 5, 4);\n",\ "(1, 4, 6);\n",\ "(4, 5, 6);\n",\ "\n",\ "elements\n",\ "(3, 4, 1, 2);\n",\ "(3, 4, 2, 5);\n",\ "(3, 4, 5, 6);\n",\ "(3, 4, 6, 1);\n",\ "\n",\ "freezone\n",\ "(0, 0, 0);\n",\ "(1, 0, 0) { 1 X2 } { } { };\n",\ "(0.5, 0.866, 0) { 1 X3 } { 1 Y3 } { };\n",\ "(0.5, -0.288, -0.816) { 1 X4 } { 1 Y4 } { 1 Z4 };\n",\ "(1, 0.578, -0.816) { 1 X5 } { 1 Y5 } { 1 Z5 };\n",\ "\n",\ "(0.9, 0.097, -0.544) { 0.333 X2, 0.333 X4, 0.333 X5 }\n",\ " { 0.333 Y2, 0.333 Y4, 0.333 Y5 }\n",\ " { 0.333 Z2, 0.333 Z4, 0.333 Z5 };\n",\ "\n",\ "(0.5, -0.097, -0.272) { 0.333 X2, 0.333 X4, 0.333 X1 }\n",\ " { 0.333 Y2, 0.333 Y4, 0.333 Y1 }\n",\ " { 0.333 Z2, 0.333 Z4, 0.333 Z1 };\n",\ "\n",\ "(-0.5, 1, -1.5) { 0.5 X3, 0.5 X4 } { 0.5 Y3, 0.5 Y4 } { 0.5 Z4, 0.5 Z5 };\n",\ "\n",\ "endrule\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "rule \"Pyramid 1\"\n",\ "\n",\ "quality 100\n",\ "\n",\ "mappoints\n",\ "(0, 0, 0);\n",\ "(1, 0, 0) { 1 };\n",\ "(0.5, 0.866, 0) { 1 };\n",\ "(0.5, -0.288, -0.816) { 1 };\n",\ "\n",\ "mapfaces\n",\ "(1, 2, 3) del;\n",\ "(1, 4, 2) del;\n",\ "\n",\ "newpoints\n",\ "(1, 0.578, -0.816) { 0.5 X3, 0.5 X4 } { 0.5 Y3, 0.5 Y4} { 0.5 Z3, 0.5 Z4 };\n",\ "\n",\ "newfaces\n",\ "(1, 4, 3);\n",\ "(2, 3, 5);\n",\ "(2, 5, 4);\n",\ "(4, 5, 3);\n",\ "\n",\ "elements\n",\ "(1, 2, 3, 4);\n",\ "(4, 2, 3, 5);\n",\ "\n",\ "\n",\ "freezone\n",\ "(0, 0, 0);\n",\ "(1, 0, 0) { 1 X2 } { } { };\n",\ "(0.5, 0.866, 0) { 1 X3 } { 1 Y3 } { };\n",\ "(0.5, -0.288, -0.816) { 1 X4 } { 1 Y4 } { 1 Z4 };\n",\ "(0, 1, -1) { 0.5 X3, 0.5 X4 } { 1 Y3 } { 1 Z4 };\n",\ "(1.5, 1, -1.5) { 0.5 X3, 0.5 X4 } { 0.5 Y3, 0.5 Y4} { 0.5 Z3, 0.5 Z4 };\n",\ "\n",\ "endrule\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "rule \"Tetrahedron 2 times 60\"\n",\ "\n",\ "quality 1\n",\ "\n",\ "mappoints\n",\ "(0, 0, 0);\n",\ "(1, 0, 0) { 0.3 };\n",\ "(0.5, 0.866, 0) { 0.3 };\n",\ "(0.5, 0.288, -0.816) { 0.3 };\n",\ "\n",\ "mapfaces\n",\ "(1, 2, 3) del;\n",\ "(1, 4, 2) del;\n",\ "(2, 4, 3) del;\n",\ "\n",\ "newpoints\n",\ "\n",\ "newfaces\n",\ "(1, 4, 3);\n",\ "\n",\ "elements\n",\ "(1, 2, 3, 4);\n",\ "\n",\ "freezone2\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 0.4 P1, 0.4 P4, 0.4 P3, -0.2 P2 };\n",\ "\n",\ "freezonelimit\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 0.3333 P1, 0.3333 P3, 0.3334 P4 };\n",\ "endrule\n",\ "\n",\ "\n",\ "\n",\ "rule \"Fill Tetrahedron (1)\"\n",\ "\n",\ "quality 1\n",\ "\n",\ "mappoints\n",\ "(0, 0, 0);\n",\ "(1, 0, 0) { 0.2 };\n",\ "(0.5, 0.866, 0) { 0.2 };\n",\ "(0.5, 0.288, -0.816) { 0.2 };\n",\ "\n",\ "mapfaces\n",\ "(1, 2, 3) del;\n",\ "(1, 4, 2) del;\n",\ "(2, 4, 3) del;\n",\ "(3, 4, 1) del;\n",\ "\n",\ "newpoints\n",\ "\n",\ "newfaces\n",\ "\n",\ "elements\n",\ "(1, 2, 3, 4);\n",\ "\n",\ "freezone2\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "endrule\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "rule \"Tetrahedron 120 (1)\"\n",\ "\n",\ "quality 1\n",\ "\n",\ "mappoints\n",\ "(0, 0, 0);\n",\ "(1, 0, 0) { 1 };\n",\ "(0.5, 0.866, 0) { 1 };\n",\ "(0.5, -0.674, -0.544) { 1 };\n",\ "\n",\ "mapfaces\n",\ "(1, 2, 3) del;\n",\ "(1, 4, 2) del;\n",\ "\n",\ "newpoints\n",\ "(0.5, 0.288, -0.816)\n",\ " { -0.5 X1, -0.5 X2, 1 X3, 1 X4 }\n",\ " { -0.5 Y1, -0.5 Y2, 1 Y3, 1 Y4}\n",\ " { -0.5 Z1, -0.5 Z2, 1 Z3, 1 Z4};\n",\ "\n",\ "newfaces\n",\ "(1, 5, 3);\n",\ "(3, 5, 2);\n",\ "(1, 4, 5);\n",\ "(2, 5, 4);\n",\ "\n",\ "elements\n",\ "(1, 2, 3, 5);\n",\ "(1, 4, 2, 5);\n",\ "\n",\ "\n",\ "freezone2\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 1.3 P5, -0.3 P1 };\n",\ "{ 1.3 P5, -0.3 P2 };\n",\ "\n",\ "freezonelimit\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 1 P5 };\n",\ "{ 1 P5 };\n",\ "endrule\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "rule \"Tetrahedron 2 times 120 (1)\"\n",\ "\n",\ "quality 100\n",\ "\n",\ "mappoints\n",\ "(0, 0, 0);\n",\ "(1, 0, 0) { 1 };\n",\ "(0.5, 0.866, 0) { 1 };\n",\ "(0.5, -0.674, -0.544) { 0.8 };\n",\ "(1.334, 0.77, -0.544) { 0.8 };\n",\ "\n",\ "mapfaces\n",\ "(1, 2, 3) del;\n",\ "(1, 4, 2) del;\n",\ "(3, 2, 5) del;\n",\ "\n",\ "newpoints\n",\ "(0.5, 0.288, -0.816) { 0.25 X1, -0.5 X2, 0.25 X3, 0.5 X4, 0.5 X5 }\n",\ " { 0.25 Y1, -0.5 Y2, 0.25 Y3, 0.5 Y4, 0.5 Y5 }\n",\ " { 0.25 Z1, -0.5 Z2, 0.25 Z3, 0.5 Z4, 0.5 Z5 };\n",\ "\n",\ "newfaces\n",\ "(6, 3, 1);\n",\ "(6, 1, 4);\n",\ "(6, 4, 2);\n",\ "(6, 2, 5);\n",\ "(6, 5, 3);\n",\ "\n",\ "elements\n",\ "(1, 2, 3, 6);\n",\ "(1, 4, 2, 6);\n",\ "(2, 5, 3, 6);\n",\ "\n",\ "freezone2\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 1 P5 };\n",\ "{ 1.4 P6, -0.4 P2 };\n",\ "{ 1.4 P6, -0.4 P1 };\n",\ "{ 1.4 P6, -0.4 P3 };\n",\ "endrule\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "rule \"four Tetrahedron non convex (4)\"\n",\ "\n",\ "quality 4\n",\ "flags l;\n",\ "\n",\ "mappoints\n",\ "(0, 0, 0);\n",\ "(1, 0, 0) { 0.1 };\n",\ "(0.5, 1, 0) { 0.1 };\n",\ "(0.5, 0, -1) { 0.1 };\n",\ "(0.5, 0.3, -0.3) { 0.1 };\n",\ "\n",\ "mapfaces\n",\ "(1, 2, 3) del;\n",\ "(1, 4, 2) del;\n",\ "(1, 5, 4) del;\n",\ "(1, 3, 5) del;\n",\ "\n",\ "\n",\ "newpoints\n",\ "(0.5, 0.1, -0.1)\n",\ " { 0.333 X1, 0.333 X2, 0.334 X5 }\n",\ " { 0.333 Y1, 0.333 Y2, 0.334 Y5 }\n",\ " { 0.333 Z1, 0.333 Z2, 0.334 Z5 };\n",\ "\n",\ "newfaces\n",\ "(6, 2, 3) del;\n",\ "(6, 4, 2) del;\n",\ "(6, 5, 4) del;\n",\ "(6, 3, 5) del;\n",\ "\n",\ "\n",\ "elements\n",\ "(1, 2, 3, 6);\n",\ "(1, 4, 2, 6);\n",\ "(1, 5, 4, 6);\n",\ "(1, 3, 5, 6);\n",\ "\n",\ "\n",\ "freezone2\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 1 P5 };\n",\ "{ 1.5 P6, -0.5 P1 };\n",\ "\n",\ "freezonelimit\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 1 P5 };\n",\ "{ 1 P6 };\n",\ "\n",\ "\n",\ "\n",\ "freeset\n",\ "1 6 2 3;\n",\ "\n",\ "freeset\n",\ "1 6 3 5;\n",\ "\n",\ "freeset\n",\ "1 6 5 4;\n",\ "\n",\ "freeset\n",\ "1 6 4 2;\n",\ "\n",\ "endrule\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "rule \"five Tetrahedron non convex (4)\"\n",\ "\n",\ "quality 4\n",\ "flags l;\n",\ "\n",\ "mappoints\n",\ "(0, 0, 0);\n",\ "(1, 0, 0) { 0.5 };\n",\ "(0.5, 1, 0) { 0.5 };\n",\ "(0, 0.8, -0.2) { 0.5 };\n",\ "(0, 0.2, -0.8) { 0.5 };\n",\ "(0.5, 0, -1) { 0.5 };\n",\ "\n",\ "\n",\ "mapfaces\n",\ "(1, 2, 3) del;\n",\ "(1, 3, 4) del;\n",\ "(1, 4, 5) del;\n",\ "(1, 5, 6) del;\n",\ "(1, 6, 2) del;\n",\ "\n",\ "newpoints\n",\ "(0.1, 0.1, -0.1)\n",\ " { 0.75 X1, 0.05 X2, 0.05 X3, 0.05 X4, 0.05 X5, 0.05 X6 }\n",\ " { 0.75 Y1, 0.05 Y2, 0.05 Y3, 0.05 Y4, 0.05 Y5, 0.05 Y6 }\n",\ " { 0.75 Z1, 0.05 Z2, 0.05 Z3, 0.05 Z4, 0.05 Z5, 0.05 Z6 };\n",\ "\n",\ "newfaces\n",\ "(7, 2, 3);\n",\ "(7, 3, 4);\n",\ "(7, 4, 5);\n",\ "(7, 5, 6);\n",\ "(7, 6, 2);\n",\ "\n",\ "\n",\ "elements\n",\ "(1, 2, 3, 7);\n",\ "(1, 3, 4, 7);\n",\ "(1, 4, 5, 7);\n",\ "(1, 5, 6, 7);\n",\ "(1, 6, 2, 7);\n",\ "\n",\ "\n",\ "freezone2\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 1 P5 };\n",\ "{ 1 P6 };\n",\ "{ 1.5 P7, -0.5 P1 };\n",\ "\n",\ "freezonelimit\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 1 P5 };\n",\ "{ 1 P6 };\n",\ "{ 1 P7 };\n",\ "\n",\ "\n",\ "\n",\ "freeset\n",\ "1 7 2 3;\n",\ "\n",\ "freeset\n",\ "1 7 3 4;\n",\ "\n",\ "freeset\n",\ "1 7 4 5;\n",\ "\n",\ "freeset\n",\ "1 7 5 6;\n",\ "\n",\ "freeset\n",\ "1 7 6 2;\n",\ "\n",\ "endrule\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "rule \"four Tetrahedron non convex (6)\"\n",\ "\n",\ "quality 6\n",\ "flags l;\n",\ "\n",\ "mappoints\n",\ "(0, 0, 0);\n",\ "(1, 0, 0) { 0.5 };\n",\ "(0.5, 1, 0) { 0.5 };\n",\ "(0.5, 0, -1) { 0.5 };\n",\ "(0.5, 0.3, -0.3) { 0.5 };\n",\ "\n",\ "mapfaces\n",\ "(1, 2, 3) del;\n",\ "(1, 4, 2) del;\n",\ "(1, 5, 4) del;\n",\ "(1, 3, 5) del;\n",\ "\n",\ "\n",\ "newpoints\n",\ "(0.095, 0.003, -0.003)\n",\ " { 0.9 X1, 0.09 X2, 0.01 X5 }\n",\ " { 0.9 Y1, 0.09 Y2, 0.01 Y5 }\n",\ " { 0.9 Z1, 0.09 Z2, 0.01 Z5 };\n",\ "\n",\ "newfaces\n",\ "(6, 2, 3) del;\n",\ "(6, 4, 2) del;\n",\ "(6, 5, 4) del;\n",\ "(6, 3, 5) del;\n",\ "\n",\ "\n",\ "elements\n",\ "(1, 2, 3, 6);\n",\ "(1, 4, 2, 6);\n",\ "(1, 5, 4, 6);\n",\ "(1, 3, 5, 6);\n",\ "\n",\ "\n",\ "freezone2\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 1 P5 };\n",\ "{ 1.499 P6, -0.5 P1, 0.001 P2 };\n",\ "\n",\ "freezonelimit\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 1 P5 };\n",\ "{ 1 P6 };\n",\ "\n",\ "\n",\ "\n",\ "freeset\n",\ "1 6 2 3;\n",\ "\n",\ "freeset\n",\ "1 6 3 5;\n",\ "\n",\ "freeset\n",\ "1 6 5 4;\n",\ "\n",\ "freeset\n",\ "1 6 4 2;\n",\ "\n",\ "endrule\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "rule \"four Tetrahedron non convex (6)\"\n",\ "\n",\ "quality 100\n",\ "\n",\ "\n",\ "mappoints\n",\ "(0, 0, 0);\n",\ "(1, 0, 0) { 0.5 };\n",\ "(0.5, 1, 0) { 0.5 };\n",\ "(0.5, 0, -1) { 0.5 };\n",\ "(0.5, 0.4, -0.4) { 0.5 };\n",\ "\n",\ "mapfaces\n",\ "(1, 2, 3) del;\n",\ "(1, 4, 2) del;\n",\ "(4, 5, 2) del;\n",\ "(5, 3, 2) del;\n",\ "\n",\ "newpoints\n",\ "(0.925, 0.02, -0.02)\n",\ " { 0.05 X1, 0.9 X2, 0.05 X5 }\n",\ " { 0.05 Y1, 0.9 Y2, 0.05 Y5 }\n",\ " { 0.05 Z1, 0.9 Z2, 0.05 Z5 };\n",\ "\n",\ "newfaces\n",\ "(3, 1, 6);\n",\ "(1, 4, 6);\n",\ "(4, 5, 6);\n",\ "(5, 3, 6);\n",\ "\n",\ "elements\n",\ "(3, 1, 2, 6);\n",\ "(1, 4, 2, 6);\n",\ "(4, 5, 2, 6);\n",\ "(5, 3, 2, 6);\n",\ "\n",\ "orientations\n",\ "(3, 1, 2, 5);\n",\ "(1, 4, 2, 5);\n",\ "(2, 4, 5, 1);\n",\ "(3, 2, 5, 1);\n",\ "(5, 4, 2, 3);\n",\ "\n",\ "freezone2\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 1 P5 };\n",\ "{ 1.5 P6, -0.5 P2 };\n",\ "\n",\ "freezonelimit\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 1 P5 };\n",\ "{ 1 P6 };\n",\ "\n",\ "freeset\n",\ "3 1 2 6;\n",\ "\n",\ "freeset\n",\ "1 4 2 6;\n",\ "\n",\ "freeset\n",\ "4 5 2 6;\n",\ "\n",\ "freeset\n",\ "5 3 2 6;\n",\ "\n",\ "endrule\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "rule \"three Tetrahedron non convex (4)\"\n",\ "\n",\ "quality 4\n",\ "flags l;\n",\ "\n",\ "mappoints\n",\ "(0, 0, 0);\n",\ "(1, 0, 0) { 0.5 };\n",\ "(0.5, 1, 0) { 0.5 };\n",\ "(0.5, 0, -1) { 0.5 };\n",\ "\n",\ "mapfaces\n",\ "(1, 2, 3) del;\n",\ "(1, 4, 2) del;\n",\ "(1, 3, 4) del;\n",\ "\n",\ "newpoints\n",\ "(0.5, 0.25, -0.25)\n",\ " { 0.25 X1, 0.25 X2, 0.25 X3, 0.25 X4 }\n",\ " { 0.25 Y1, 0.25 Y2, 0.25 Y3, 0.25 Y4 }\n",\ " { 0.25 Z1, 0.25 Z2, 0.25 Z3, 0.25 Z4 };\n",\ "\n",\ "newfaces\n",\ "(5, 2, 3);\n",\ "(5, 4, 2);\n",\ "(5, 3, 4);\n",\ "\n",\ "elements\n",\ "(2, 3, 1, 5);\n",\ "(3, 4, 1, 5);\n",\ "(4, 2, 1, 5;\n",\ "\n",\ "orientations\n",\ "(1, 2, 4, 3);\n",\ "\n",\ "freezone2\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 1.5 P5, -0.5 P1 };\n",\ "\n",\ "freezonelimit\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 1 P5 };\n",\ "\n",\ "freeset\n",\ "1 2 3 5;\n",\ "\n",\ "freeset\n",\ "1 3 4 5;\n",\ "\n",\ "freeset\n",\ "1 4 2 5;\n",\ "\n",\ "endrule\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "rule \"three Tetrahedron non convex (6)\"\n",\ "\n",\ "quality 100\n",\ "\n",\ "\n",\ "mappoints\n",\ "(0, 0, 0);\n",\ "(1, 0, 0) { 0.5 };\n",\ "(0.5, 1, 0) { 0.5 };\n",\ "(0.5, 0, -1) { 0.5 };\n",\ "\n",\ "mapfaces\n",\ "(1, 2, 3) del;\n",\ "(1, 4, 2) del;\n",\ "(1, 3, 4) del;\n",\ "\n",\ "newpoints\n",\ "(0.2, 0.1, -0.1)\n",\ " { 0.7 X1, 0.1 X2, 0.1 X3, 0.1 X4 }\n",\ " { 0.7 Y1, 0.1 Y2, 0.1 Y3, 0.1 Y4 }\n",\ " { 0.7 Z1, 0.1 Z2, 0.1 Z3, 0.1 Z4 };\n",\ "\n",\ "newfaces\n",\ "(5, 2, 3);\n",\ "(5, 4, 2);\n",\ "(5, 3, 4);\n",\ "\n",\ "elements\n",\ "(2, 3, 1, 5);\n",\ "(3, 4, 1, 5);\n",\ "(4, 2, 1, 5;\n",\ "\n",\ "orientations\n",\ "(1, 2, 3, 4);\n",\ "\n",\ "freezone2\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 1.5 P5, -0.5 P1 };\n",\ "\n",\ "freezonelimit\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 1 P5 };\n",\ "\n",\ "freeset\n",\ "1 2 3 5;\n",\ "\n",\ "freeset\n",\ "1 3 4 5;\n",\ "\n",\ "freeset\n",\ "1 4 2 5;\n",\ "\n",\ "endrule\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "rule \"four Tetrahedron non convex (6)\"\n",\ "\n",\ "quality 100\n",\ "\n",\ "\n",\ "mappoints\n",\ "(0, 0, 0);\n",\ "(1, 0, 0) { 0.5 };\n",\ "(0.5, 1, 0) { 0.5 };\n",\ "(0.5, 0, -1) { 0.5 };\n",\ "(0.5, 0.4, -0.4) { 0.5 };\n",\ "\n",\ "mapfaces\n",\ "(1, 2, 3) del;\n",\ "(1, 4, 2) del;\n",\ "(4, 5, 2) del;\n",\ "(5, 3, 2) del;\n",\ "\n",\ "newpoints\n",\ "(0.7, 0.08, -0.08) { 0.6 X2, 0.2 X5 } { 0.2 Y5 } { 0.2 Z5 };\n",\ "\n",\ "newfaces\n",\ "(3, 1, 6);\n",\ "(1, 4, 6);\n",\ "(4, 5, 6);\n",\ "(5, 3, 6);\n",\ "\n",\ "elements\n",\ "(3, 1, 2, 6);\n",\ "(1, 4, 2, 6);\n",\ "(4, 5, 2, 6);\n",\ "(5, 3, 2, 6);\n",\ "\n",\ "\n",\ "orientations\n",\ "(3, 1, 2, 5);\n",\ "(5, 1, 2, 4);\n",\ "\n",\ "freezone\n",\ "(0, 0, 0);\n",\ "(1, 0, 0) { 1 X2 } { } { };\n",\ "(0.5, 1, 0) { 1 X3 } { 1 Y3 } { };\n",\ "(0.5, 0, -1) { 1 X4 } { 1 Y4 } { 1 Z4 };\n",\ "(0.5, 0.4, -0.4) { 1 X5 } { 1 Y5 } { 1 Z5 };\n",\ "(0.55, 0.12, -0.12) { 0.4 X2, 0.3 X5 } { 0.3 Y5 } { 0.3 Z5 };\n",\ "\n",\ "freeset\n",\ "3 1 2 6;\n",\ "\n",\ "freeset\n",\ "1 4 2 6;\n",\ "\n",\ "freeset\n",\ "4 5 2 6;\n",\ "\n",\ "freeset\n",\ "5 3 2 6;\n",\ "\n",\ "endrule\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "rule \"Tetrahedron 2 in 60 (12)\"\n",\ "\n",\ "quality 100\n",\ "\n",\ "mappoints\n",\ "(0, 0, 0);\n",\ "(1, 0, 0) { 0.5 };\n",\ "(0.5, 1, 0) { 0.5 };\n",\ "(0.5, 0, -1) { 0.5 };\n",\ "\n",\ "mapfaces\n",\ "(1, 2, 3) del;\n",\ "(1, 4, 2) del;\n",\ "\n",\ "newpoints\n",\ "(0.5, 0.1, -0.1)\n",\ " { 0.4 X1, 0.4 X2, 0.1 X3, 0.1 X4 }\n",\ " { 0.4 Y1, 0.4 Y2, 0.1 Y3, 0.1 Y4 }\n",\ " { 0.4 Z1, 0.4 Z2, 0.1 Z3, 0.1 Z4 };\n",\ "\n",\ "newfaces\n",\ "(5, 2, 3);\n",\ "(5, 3, 1);\n",\ "(5, 4, 2);\n",\ "(5, 1, 4);\n",\ "\n",\ "elements\n",\ "(1, 2, 3, 5);\n",\ "(1, 2, 5, 4);\n",\ "\n",\ "freezone2\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 1.5 P5, -0.25 P1, -0.25 P2 };\n",\ "\n",\ "freezonelimit\n",\ "{ 1 P1 };\n",\ "{ 1 P2 };\n",\ "{ 1 P3 };\n",\ "{ 1 P4 };\n",\ "{ 1 P5 };\n",\ "\n",\ "freeset\n",\ "1 2 3 5;\n",\ "\n",\ "freeset\n",\ "1 2 4 5;\n",\ "\n",\ "endrule\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "rule \"Tetrahedron 120, but more than 180 (13)\"\n",\ "\n",\ "quality 100\n",\ "\n",\ "mappoints\n",\ "(0, 0, 0);\n",\ "(1, 0, 0) { 1 };\n",\ "(0.5, 0.866, 0) { 1 };\n",\ "(0.5, -0.866, 0) { 1 };\n",\ "\n",\ "mapfaces\n",\ "(1, 2, 3) del;\n",\ "(1, 4, 2);\n",\ "\n",\ "newpoints\n",\ "(0.5, 0, -0.3) { 0.5 X3, 0.5 X4 } { 0.5 Y3, 0.5 Y4} { 0.5 Z3, 0.5 Z4 };\n",\ "\n",\ "newfaces\n",\ "(1, 5, 3);\n",\ "(3, 5, 2);\n",\ "(2, 5, 1);\n",\ "\n",\ "elements\n",\ "(1, 2, 3, 5);\n",\ "\n",\ "\n",\ "freezone\n",\ "(0, 0, 0);\n",\ "(1, 0, 0) { 1 X2 } { } { };\n",\ "(0.5, 0.866, 0) { 1 X3 } { 1 Y3 } { };\n",\ "(0.5, -0.1, -0.4) { 0.5 X3, 0.5 X4 } { 0.5 Y3, 0.5 Y4} { 0.5 Z3, 0.5 Z4 };\n",\ "\n",\ "endrule\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "\n",\ "rule \"Free Tetrahedron (14)\"\n",\ "\n",\ "quality 100\n",\ "\n",\ "mappoints\n",\ "(0, 0, 0);\n",\ "(1, 0, 0) { 1.0 };\n",\ "(0.5, 0.866, 0) { 1.0 };\n",\ "\n",\ "mapfaces\n",\ "(1, 2, 3) del;\n",\ "\n",\ "newpoints\n",\ "(0.5, 0.288, -0.2) { 0.333 X2, 0.333 X3 } { 0.333 Y3 } { };\n",\ "\n",\ "newfaces\n",\ "(4, 1, 2);\n",\ "(4, 2, 3);\n",\ "(4, 3, 1);\n",\ "\n",\ "elements\n",\ "(1, 2, 3, 4);\n",\ "\n",\ "freezone\n",\ "(0, 0, 0);\n",\ "(1, 0, 0) { 1 X2 } { } { };\n",\ "(0.5, 0.866, 0) { 1 X3 } { 1 Y3 } { };\n",\ "(0.5, 0.288, -0.25) { 0.333 X2, 0.333 X3 } { 0.333 Y3 } { };\n",\ "\n",\ "endrule\n",\ "\n",\ "\n",\ "\n",\ "rule \"Free Tetrahedron (15)\"\n",\ "\n",\ "quality 100\n",\ "\n",\ "mappoints\n",\ "(0, 0, 0);\n",\ "(1, 0, 0) { 1.0 };\n",\ "(0.5, 0.866, 0) { 1.0 };\n",\ "\n",\ "mapfaces\n",\ "(1, 2, 3) del;\n",\ "\n",\ "newpoints\n",\ "(0.5, 0.288, -0.1) { 0.333 X2, 0.333 X3 } { 0.333 Y3 } { };\n",\ "\n",\ "newfaces\n",\ "(4, 1, 2);\n",\ "(4, 2, 3);\n",\ "(4, 3, 1);\n",\ "\n",\ "elements\n",\ "(1, 2, 3, 4);\n",\ "\n",\ "freezone\n",\ "(0, 0, 0);\n",\ "(1, 0, 0) { 1 X2 } { } { };\n",\ "(0.5, 0.866, 0) { 1 X3 } { 1 Y3 } { };\n",\ "(0.5, 0.288, -0.15) { 0.333 X2, 0.333 X3 } { 0.333 Y3 } { };\n",\ "\n",\ "endrule\n", 0}; } netgen-6.2.1804/libsrc/meshing/basegeom.hpp0000644000175000017500000000306613272137567017215 0ustar kurtkurt#ifndef FILE_BASEGEOM #define FILE_BASEGEOM /**************************************************************************/ /* File: basegeom.hpp */ /* Author: Joachim Schoeberl */ /* Date: 23. Aug. 09 */ /**************************************************************************/ struct Tcl_Interp; namespace netgen { class DLL_HEADER NetgenGeometry { public: virtual ~NetgenGeometry () { ; } virtual int GenerateMesh (shared_ptr & mesh, MeshingParameters & mparam); virtual const Refinement & GetRefinement () const; virtual void Save (string filename) const; virtual void SaveToMeshFile (ostream & /* ost */) const { ; } }; class DLL_HEADER GeometryRegister { public: virtual ~GeometryRegister(); virtual NetgenGeometry * Load (string filename) const = 0; virtual NetgenGeometry * LoadFromMeshFile (istream & /* ist */) const { return NULL; } virtual class VisualScene * GetVisualScene (const NetgenGeometry * /* geom */) const { return NULL; } virtual void SetParameters (Tcl_Interp * /* interp */) { ; } }; class DLL_HEADER GeometryRegisterArray : public Array { public: virtual ~GeometryRegisterArray() { for (int i = 0; i < Size(); i++) delete (*this)[i]; } }; // extern DLL_HEADER Array geometryregister; extern DLL_HEADER GeometryRegisterArray geometryregister; } #endif netgen-6.2.1804/libsrc/interface/0000755000175000017500000000000013272137567015223 5ustar kurtkurtnetgen-6.2.1804/libsrc/interface/nginterface.cpp0000644000175000017500000013624313272137567020225 0ustar kurtkurt#include #include #include #ifdef SOCKETS #include "../sockets/sockets.hpp" #endif #include "nginterface.h" // #include "../visualization/soldata.hpp" // #include namespace netgen { DLL_HEADER MeshingParameters mparam; } static std::thread meshingthread; void RunParallel ( void * (*fun)(void *), void * in) { bool parthread = netgen::mparam.parthread; #ifdef PARALLEL int provided; MPI_Query_thread(&provided); if (provided < 3) if (netgen::ntasks > 1) parthread = false; // cout << "runparallel = " << parthread << endl; #endif if (parthread) { meshingthread = std::thread(fun, in); meshingthread.detach(); } else fun (in); } #include "writeuser.hpp" namespace netgen { extern shared_ptr mesh; extern shared_ptr ng_geometry; extern Tcl_Interp * tcl_interp; #ifdef SOCKETS extern AutoPtr clientsocket; //extern Array< AutoPtr < ServerInfo > > servers; extern Array< ServerInfo* > servers; #endif } using namespace netgen; void Ng_LoadGeometry (const char * filename) { // he: if filename is empty, return // can be used to reset geometry if (!filename || strcmp(filename,"")==0) { ng_geometry.reset (new NetgenGeometry()); return; } for (int i = 0; i < geometryregister.Size(); i++) { NetgenGeometry * hgeom = geometryregister[i]->Load (filename); if (hgeom) { ng_geometry.reset (hgeom); mesh.reset(); return; } } // if (id == 0) cerr << "cannot load geometry '" << filename << "'" << ", id = " << id << endl; } void Ng_LoadMeshFromStream ( istream & input ) { mesh.reset (new Mesh()); mesh -> Load(input); SetGlobalMesh (mesh); for (int i = 0; i < geometryregister.Size(); i++) { NetgenGeometry * hgeom = geometryregister[i]->LoadFromMeshFile (input); if (hgeom) { ng_geometry.reset (hgeom); break; } } if (!ng_geometry) ng_geometry = make_shared(); mesh->SetGeometry (ng_geometry); } void Ng_LoadMesh (const char * filename) { { ifstream infile(filename); if(!infile.good()) throw NgException(string("Error opening file ") + filename); } #ifdef PARALLEL MPI_Comm_size(MPI_COMM_WORLD, &ntasks); MPI_Comm_rank(MPI_COMM_WORLD, &id); if (id == 0) { #endif if ( string(filename).find(".vol") == string::npos ) /* if ( (strlen (filename) > 4) && strcmp (filename + (strlen (filename)-4), ".vol") != 0 ) */ { mesh.reset (new Mesh()); ReadFile(*mesh,filename); //mesh->SetGlobalH (mparam.maxh); //mesh->CalcLocalH(); return; } string fn(filename); istream * infile; if (fn.substr (fn.length()-3, 3) == ".gz") infile = new igzstream (filename); else infile = new ifstream (filename); Ng_LoadMeshFromStream(*infile); delete infile; #ifdef PARALLEL if (ntasks > 1) { char * weightsfilename = new char [strlen(filename)+1]; strcpy (weightsfilename, filename); weightsfilename[strlen (weightsfilename)-3] = 'w'; weightsfilename[strlen (weightsfilename)-2] = 'e'; weightsfilename[strlen (weightsfilename)-1] = 'i'; ifstream weightsfile(weightsfilename); delete [] weightsfilename; if (!(weightsfile.good())) { // cout << "regular distribute" << endl; mesh -> Distribute(); } else { char str[20]; bool endfile = false; int n, dummy; Array segment_weights; Array surface_weights; Array volume_weights; while (weightsfile.good() && !endfile) { weightsfile >> str; if (strcmp (str, "edgeweights") == 0) { weightsfile >> n; segment_weights.SetSize(n); for (int i = 0; i < n; i++) weightsfile >> dummy >> segment_weights[i]; } if (strcmp (str, "surfaceweights") == 0) { weightsfile >> n; surface_weights.SetSize(n); for (int i=0; i> dummy >> surface_weights[i]; } if (strcmp (str, "volumeweights") == 0) { weightsfile >> n; volume_weights.SetSize(n); for (int i=0; i> dummy >> volume_weights[i]; } if (strcmp (str, "endfile") == 0) endfile = true; } mesh -> Distribute(volume_weights, surface_weights, segment_weights); } } } else { mesh.reset (new Mesh()); // vssolution.SetMesh(mesh); // vsmesh.SetMesh(mesh); SetGlobalMesh (mesh); mesh->SendRecvMesh(); } #endif } void Ng_LoadMeshFromString (const char * mesh_as_string) { istringstream instream(mesh_as_string); Ng_LoadMeshFromStream(instream); } int Ng_GetDimension () { return (mesh) ? mesh->GetDimension() : -1; } int Ng_GetNP () { return (mesh) ? mesh->GetNP() : 0; } int Ng_GetNV () { return (mesh) ? mesh->GetNV() : 0; } int Ng_GetNE () { if(!mesh) return 0; if (mesh->GetDimension() == 3) return mesh->GetNE(); else return mesh->GetNSE(); } int Ng_GetNSE () { if(!mesh) return 0; if (mesh->GetDimension() == 3) return mesh->GetNSE(); else return mesh->GetNSeg(); } void Ng_GetPoint (int pi, double * p) { if (pi < 1 || pi > mesh->GetNP()) { if (printmessage_importance>0) cout << "Ng_GetPoint: illegal point " << pi << endl; return; } const Point3d & hp = mesh->Point (pi); p[0] = hp.X(); p[1] = hp.Y(); if (mesh->GetDimension() == 3) p[2] = hp.Z(); } NG_ELEMENT_TYPE Ng_GetElement (int ei, int * epi, int * np) { if (mesh->GetDimension() == 3) { int i; const Element & el = mesh->VolumeElement (ei); for (i = 0; i < el.GetNP(); i++) epi[i] = el.PNum(i+1); if (np) *np = el.GetNP(); if (el.GetType() == PRISM) { // degenerated prism, (should be obsolete) const int map1[] = { 3, 2, 5, 6, 1 }; const int map2[] = { 1, 3, 6, 4, 2 }; const int map3[] = { 2, 1, 4, 5, 3 }; const int * map = NULL; int deg1 = 0, deg2 = 0, deg3 = 0; //int deg = 0; if (el.PNum(1) == el.PNum(4)) { map = map1; deg1 = 1; } if (el.PNum(2) == el.PNum(5)) { map = map2; deg2 = 1; } if (el.PNum(3) == el.PNum(6)) { map = map3; deg3 = 1; } switch (deg1+deg2+deg3) { { case 1: if (printmessage_importance>0) cout << "degenerated prism found, deg = 1" << endl; for (i = 0; i < 5; i++) epi[i] = el.PNum (map[i]); if (np) *np = 5; return NG_PYRAMID; break; } case 2: { if (printmessage_importance>0) cout << "degenerated prism found, deg = 2" << endl; if (!deg1) epi[3] = el.PNum(4); if (!deg2) epi[3] = el.PNum(5); if (!deg3) epi[3] = el.PNum(6); if (np) *np = 4; return NG_TET; break; } default: ; } } return NG_ELEMENT_TYPE (el.GetType()); } else { const Element2d & el = mesh->SurfaceElement (ei); for (int i = 0; i < el.GetNP(); i++) epi[i] = el.PNum(i+1); if (np) *np = el.GetNP(); return NG_ELEMENT_TYPE (el.GetType()); } // should not occur return NG_TET; } NG_ELEMENT_TYPE Ng_GetElementType (int ei) { if (mesh->GetDimension() == 3) { return NG_ELEMENT_TYPE (mesh->VolumeElement (ei).GetType()); } else { const Element2d & el = mesh->SurfaceElement (ei); switch (el.GetNP()) { case 3: return NG_TRIG; case 4: return NG_QUAD; case 6: return NG_TRIG6; } } // should not occur return NG_TET; } int Ng_GetElementIndex (int ei) { if (mesh->GetDimension() == 3) return mesh->VolumeElement(ei).GetIndex(); else { int ind = mesh->SurfaceElement(ei).GetIndex(); ind = mesh->GetFaceDescriptor(ind).BCProperty(); return ind; } } void Ng_SetElementIndex(const int ei, const int index) { mesh->VolumeElement(ei).SetIndex(index); } const char * Ng_GetElementMaterial (int ei) { static char empty[] = ""; if (mesh->GetDimension() == 3) { int ind = mesh->VolumeElement(ei).GetIndex(); // cout << "ind = " << ind << endl; const string * mat = mesh->GetMaterialPtr (ind); if (mat) // return const_cast (mat); return mat->c_str(); else return empty; } // add astrid else { int ind = mesh->SurfaceElement(ei).GetIndex(); ind = mesh->GetFaceDescriptor(ind).BCProperty(); const string * mat = mesh->GetMaterialPtr ( ind ); if (mat) return mat->c_str(); else return empty; } return 0; } const char * Ng_GetDomainMaterial (int dom) { static char empty[] = ""; // astrid if ( 1 ) // mesh->GetDimension() == 3) { const string * mat = mesh->GetMaterialPtr(dom); if (mat) return mat->c_str(); else return empty; } return 0; } int Ng_GetUserDataSize (char * id) { Array da; mesh->GetUserData (id, da); return da.Size(); } void Ng_GetUserData (char * id, double * data) { Array da; mesh->GetUserData (id, da); for (int i = 0; i < da.Size(); i++) data[i] = da[i]; } NG_ELEMENT_TYPE Ng_GetSurfaceElement (int ei, int * epi, int * np) { if (mesh->GetDimension() == 3) { const Element2d & el = mesh->SurfaceElement (ei); for (int i = 0; i < el.GetNP(); i++) epi[i] = el[i]; if (np) *np = el.GetNP(); return NG_ELEMENT_TYPE (el.GetType()); } else { const Segment & seg = mesh->LineSegment (ei); if (seg[2] < 0) { epi[0] = seg[0]; epi[1] = seg[1]; if (np) *np = 2; return NG_SEGM; } else { epi[0] = seg[0]; epi[1] = seg[1]; epi[2] = seg[2]; if (np) *np = 3; return NG_SEGM3; } } return NG_TRIG; } int Ng_GetSurfaceElementIndex (int ei) { if (mesh->GetDimension() == 3) return mesh->GetFaceDescriptor(mesh->SurfaceElement(ei).GetIndex()).BCProperty(); else return mesh->LineSegment(ei).si; } int Ng_GetSurfaceElementSurfaceNumber (int ei) { if (mesh->GetDimension() == 3) return mesh->GetFaceDescriptor(mesh->SurfaceElement(ei).GetIndex()).SurfNr(); else return mesh->LineSegment(ei).si; } int Ng_GetSurfaceElementFDNumber (int ei) { if (mesh->GetDimension() == 3) return mesh->SurfaceElement(ei).GetIndex(); else return -1; } char * Ng_GetSurfaceElementBCName (int ei) { if ( mesh->GetDimension() == 3 ) return const_cast(mesh->GetFaceDescriptor(mesh->SurfaceElement(ei).GetIndex()).GetBCName().c_str()); else return const_cast(mesh->LineSegment(ei).GetBCName().c_str()); } // Inefficient (but maybe safer) version: //void Ng_GetSurfaceElementBCName (int ei, char * name) //{ // if ( mesh->GetDimension() == 3 ) // strcpy(name,mesh->GetFaceDescriptor(mesh->SurfaceElement(ei).GetIndex()).GetBCName().c_str()); // else // strcpy(name,mesh->LineSegment(ei).GetBCName().c_str()); //} char * Ng_GetBCNumBCName (int bcnr) { return const_cast(mesh->GetBCName(bcnr).c_str()); } char * Ng_GetCD2NumCD2Name (int cd2nr) { return const_cast(mesh->GetCD2Name(cd2nr).c_str()); } // Inefficient (but maybe safer) version: //void Ng_GetBCNumBCName (int bcnr, char * name) //{ // strcpy(name,mesh->GetBCName(bcnr).c_str()); //} /* void Ng_GetNormalVector (int sei, int locpi, double * nv) { nv[0] = 0; nv[1] = 0; nv[2] = 1; if (mesh->GetDimension() == 3) { Vec<3> n; Point<3> p; p = mesh->Point (mesh->SurfaceElement(sei).PNum(locpi)); int surfi = mesh->GetFaceDescriptor(mesh->SurfaceElement(sei).GetIndex()).SurfNr(); (*testout) << "surfi = " << surfi << endl; #ifdef OCCGEOMETRYxxx OCCGeometry * occgeometry = dynamic_cast (ng_geometry); if (occgeometry) { PointGeomInfo gi = mesh->SurfaceElement(sei).GeomInfoPi(locpi); occgeometry->GetSurface (surfi).GetNormalVector(p, gi, n); nv[0] = n(0); nv[1] = n(1); nv[2] = n(2); } #endif CSGeometry * geometry = dynamic_cast (ng_geometry.get()); if (geometry) { n = geometry->GetSurface (surfi) -> GetNormalVector(p); nv[0] = n(0); nv[1] = n(1); nv[2] = n(2); } } } */ void Ng_SetPointSearchStartElement(const int el) { mesh->SetPointSearchStartElement(el); } int Ng_FindElementOfPoint (double * p, double * lami, int build_searchtree, const int * const indices, const int numind) { Array * dummy(NULL); int ind = -1; if(indices != NULL) { dummy = new Array(numind); for(int i=0; iGetDimension() == 3) { Point3d p3d(p[0], p[1], p[2]); ind = mesh->GetElementOfPoint(p3d, lami, dummy, build_searchtree != 0); } else { double lam3[3]; Point3d p2d(p[0], p[1], 0); ind = mesh->GetElementOfPoint(p2d, lam3, dummy, build_searchtree != 0); if (ind > 0) { if(mesh->SurfaceElement(ind).GetType()==QUAD) { lami[0] = lam3[0]; lami[1] = lam3[1]; } else { lami[0] = 1-lam3[0]-lam3[1]; lami[1] = lam3[0]; } } } delete dummy; return ind; } int Ng_FindSurfaceElementOfPoint (double * p, double * lami, int build_searchtree, const int * const indices, const int numind) { Array * dummy(NULL); int ind = -1; if(indices != NULL) { dummy = new Array(numind); for(int i=0; iGetDimension() == 3) { Point3d p3d(p[0], p[1], p[2]); ind = mesh->GetSurfaceElementOfPoint(p3d, lami, dummy, build_searchtree != 0); } else { //throw NgException("FindSurfaceElementOfPoint for 2D meshes not yet implemented"); cerr << "FindSurfaceElementOfPoint for 2D meshes not yet implemented" << endl; } delete dummy; return ind; } int Ng_IsElementCurved (int ei) { switch (mesh->GetDimension()) { case 1: return mesh->GetCurvedElements().IsSegmentCurved (ei-1); case 2: return mesh->GetCurvedElements().IsSurfaceElementCurved (ei-1); case 3: return mesh->GetCurvedElements().IsElementCurved (ei-1); } return 0; /* if (mesh->GetDimension() == 2) return mesh->GetCurvedElements().IsSurfaceElementCurved (ei-1); else return mesh->GetCurvedElements().IsElementCurved (ei-1); */ } int Ng_IsSurfaceElementCurved (int sei) { if (mesh->GetDimension() == 2) return mesh->GetCurvedElements().IsSegmentCurved (sei-1); else return mesh->GetCurvedElements().IsSurfaceElementCurved (sei-1); } void Ng_GetElementTransformation (int ei, const double * xi, double * x, double * dxdxi) { if (mesh->GetDimension() == 2) { Point<2> xl(xi[0], xi[1]); Point<3> xg; Mat<3,2> dx; mesh->GetCurvedElements().CalcSurfaceTransformation (xl, ei-1, xg, dx); if (x) { for (int i = 0; i < 2; i++) x[i] = xg(i); } if (dxdxi) { for (int i=0; i<2; i++) { dxdxi[2*i] = dx(i,0); dxdxi[2*i+1] = dx(i,1); } } } else { Point<3> xl(xi[0], xi[1], xi[2]); Point<3> xg; Mat<3,3> dx; mesh->GetCurvedElements().CalcElementTransformation (xl, ei-1, xg, dx); if (x) { for (int i = 0; i < 3; i++) x[i] = xg(i); } if (dxdxi) { for (int i=0; i<3; i++) { dxdxi[3*i] = dx(i,0); dxdxi[3*i+1] = dx(i,1); dxdxi[3*i+2] = dx(i,2); } } } } void Ng_GetMultiElementTransformation (int ei, int n, const double * xi, size_t sxi, double * x, size_t sx, double * dxdxi, size_t sdxdxi) { if (mesh->GetDimension() == 2) mesh->GetCurvedElements().CalcMultiPointSurfaceTransformation<2> (ei-1, n, xi, sxi, x, sx, dxdxi, sdxdxi); else mesh->GetCurvedElements().CalcMultiPointElementTransformation (ei-1, n, xi, sxi, x, sx, dxdxi, sdxdxi); } void Ng_GetSurfaceElementTransformation (int sei, const double * xi, double * x, double * dxdxi) { if (mesh->GetDimension() == 2) { Point<3> xg; Vec<3> dx; mesh->GetCurvedElements().CalcSegmentTransformation (xi[0], sei-1, xg, dx); if (x) for (int i = 0; i < 2; i++) x[i] = xg(i); if (dxdxi) for (int i=0; i<2; i++) dxdxi[i] = dx(i); } else { Point<2> xl(xi[0], xi[1]); Point<3> xg; Mat<3,2> dx; mesh->GetCurvedElements().CalcSurfaceTransformation (xl, sei-1, xg, dx); for (int i=0; i<3; i++) { if (x) x[i] = xg(i); if (dxdxi) { dxdxi[2*i] = dx(i,0); dxdxi[2*i+1] = dx(i,1); } } } } int Ng_GetSegmentIndex (int ei) { const Segment & seg = mesh->LineSegment (ei); return seg.edgenr; } NG_ELEMENT_TYPE Ng_GetSegment (int ei, int * epi, int * np) { const Segment & seg = mesh->LineSegment (ei); epi[0] = seg[0]; epi[1] = seg[1]; if (seg[2] < 0) { if (np) *np = 2; return NG_SEGM; } else { epi[2] = seg[2]; if (np) *np = 3; return NG_SEGM3; } } void Ng_GetSurfaceElementNeighbouringDomains(const int selnr, int & in, int & out) { if ( mesh->GetDimension() == 3 ) { in = mesh->GetFaceDescriptor(mesh->SurfaceElement(selnr).GetIndex()).DomainIn(); out = mesh->GetFaceDescriptor(mesh->SurfaceElement(selnr).GetIndex()).DomainOut(); } else { in = mesh -> LineSegment(selnr) . domin; out = mesh -> LineSegment(selnr) . domout; } } #ifdef PARALLEL // gibt anzahl an distant pnums zurueck // * pnums entspricht ARRAY int NgPar_GetDistantNodeNums ( int nodetype, int locnum, int * distnums ) { int size = NgPar_GetNDistantNodeNums (nodetype, locnum); locnum++; switch ( nodetype ) { case 0: mesh->GetParallelTopology().GetDistantPNums( locnum, distnums ); break; case 1: mesh->GetParallelTopology().GetDistantEdgeNums( locnum, distnums ); break; case 2: mesh->GetParallelTopology().GetDistantFaceNums( locnum, distnums ); break; case 3: // mesh->GetParallelTopology().GetDistantElNums( locnum, distnums ); break; default: cerr << "NgPar_GetDistantNodeNums() Unknown nodetype " << nodetype << endl; size = -1; } return size; } int NgPar_GetNDistantNodeNums ( int nodetype, int locnum ) { locnum++; switch ( nodetype ) { case 0: return mesh->GetParallelTopology().GetNDistantPNums (locnum); case 1: return mesh->GetParallelTopology().GetNDistantEdgeNums (locnum); case 2: return mesh->GetParallelTopology().GetNDistantFaceNums(locnum ); case 3: return 0; } return -1; } int NgPar_GetGlobalNodeNum (int nodetype, int locnum) { locnum++; switch (nodetype) { case 0: return mesh->GetParallelTopology().GetGlobalPNum (locnum)-1; case 1: return mesh->GetParallelTopology().GetGlobalEdgeNum (locnum)-1; case 2: return mesh->GetParallelTopology().GetGlobalFaceNum (locnum)-1; case 3: return mesh->GetParallelTopology().GetGlobalElNum (locnum)-1; } return -1; } #endif void Ng_SetRefinementFlag (int ei, int flag) { if (mesh->GetDimension() == 3) { mesh->VolumeElement(ei).SetRefinementFlag (flag != 0); mesh->VolumeElement(ei).SetStrongRefinementFlag (flag >= 10); } else { mesh->SurfaceElement(ei).SetRefinementFlag (flag != 0); mesh->SurfaceElement(ei).SetStrongRefinementFlag (flag >= 10); } } void Ng_SetSurfaceRefinementFlag (int ei, int flag) { if (mesh->GetDimension() == 3) { mesh->SurfaceElement(ei).SetRefinementFlag (flag != 0); mesh->SurfaceElement(ei).SetStrongRefinementFlag (flag >= 10); } } void Ng_Refine (NG_REFINEMENT_TYPE reftype) { NgLock meshlock (mesh->MajorMutex(), 1); BisectionOptions biopt; biopt.usemarkedelements = 1; biopt.refine_p = 0; biopt.refine_hp = 0; if (reftype == NG_REFINE_P) biopt.refine_p = 1; if (reftype == NG_REFINE_HP) biopt.refine_hp = 1; const Refinement & ref = mesh->GetGeometry()->GetRefinement(); // Refinement * ref; MeshOptimize2d * opt = NULL; /* if (geometry2d) ref = new Refinement2d(*geometry2d); else if (stlgeometry) ref = new RefinementSTLGeometry(*stlgeometry); #ifdef OCCGEOMETRY else if (occgeometry) ref = new OCCRefinementSurfaces (*occgeometry); #endif #ifdef ACIS else if (acisgeometry) { ref = new ACISRefinementSurfaces (*acisgeometry); opt = new ACISMeshOptimize2dSurfaces(*acisgeometry); ref->Set2dOptimizer(opt); } #endif else if (geometry && mesh->GetDimension() == 3) { ref = new RefinementSurfaces(*geometry); opt = new MeshOptimize2dSurfaces(*geometry); ref->Set2dOptimizer(opt); } else { ref = new Refinement(); } */ ref.Bisect (*mesh, biopt); mesh -> UpdateTopology(); mesh -> GetCurvedElements().SetIsHighOrder (false); // mesh -> GetCurvedElements().BuildCurvedElements (ref, mparam.elementorder); // delete ref; delete opt; } void Ng_SecondOrder () { const_cast (mesh->GetGeometry()->GetRefinement()).MakeSecondOrder(*mesh); /* if (stlgeometry) { RefinementSTLGeometry ref (*stlgeometry); ref.MakeSecondOrder (*mesh); } else if (geometry2d) { Refinement2d ref (*geometry2d); ref.MakeSecondOrder (*mesh); } else if (geometry && mesh->GetDimension() == 3) { RefinementSurfaces ref (*geometry); ref.MakeSecondOrder (*mesh); } else { if (printmessage_importance>0) cout << "no geom" << endl; Refinement ref; ref.MakeSecondOrder (*mesh); } */ mesh -> UpdateTopology(); } /* void Ng_HPRefinement (int levels) { Refinement * ref; if (stlgeometry) ref = new RefinementSTLGeometry (*stlgeometry); else if (geometry2d) ref = new Refinement2d (*geometry2d); else ref = new RefinementSurfaces (*geometry); HPRefinement (*mesh, ref, levels); } void Ng_HPRefinement (int levels, double parameter) { Refinement * ref; if (stlgeometry) ref = new RefinementSTLGeometry (*stlgeometry); else if (geometry2d) ref = new Refinement2d (*geometry2d); else ref = new RefinementSurfaces (*geometry); HPRefinement (*mesh, ref, levels, parameter); } */ void Ng_HPRefinement (int levels, double parameter, bool setorders, bool ref_level) { NgLock meshlock (mesh->MajorMutex(), true); Refinement & ref = const_cast (mesh->GetGeometry()->GetRefinement()); HPRefinement (*mesh, &ref, levels, parameter, setorders, ref_level); /* Refinement * ref; if (stlgeometry) ref = new RefinementSTLGeometry (*stlgeometry); else if (geometry2d) ref = new Refinement2d (*geometry2d); else ref = new RefinementSurfaces (*geometry); HPRefinement (*mesh, ref, levels, parameter, setorders, ref_level); */ } void Ng_HighOrder (int order, bool rational) { NgLock meshlock (mesh->MajorMutex(), true); /* mesh -> GetCurvedElements().BuildCurvedElements (&const_cast (ng_geometry -> GetRefinement()), order, rational); */ /* if (!mesh->GetGeometry()) throw NgException ("don't have a geometry for mesh curving"); mesh->BuildCurvedElements (&const_cast (mesh->GetGeometry()->GetRefinement()), order, rational); mesh -> SetNextMajorTimeStamp(); */ mesh->BuildCurvedElements(order); } int Ng_ME_GetNVertices (NG_ELEMENT_TYPE et) { switch (et) { case NG_SEGM: case NG_SEGM3: return 2; case NG_TRIG: case NG_TRIG6: return 3; case NG_QUAD: return 4; case NG_TET: case NG_TET10: return 4; case NG_PYRAMID: return 5; case NG_PRISM: case NG_PRISM12: return 6; case NG_HEX: return 8; default: cerr << "Ng_ME_GetNVertices, illegal element type " << et << endl; } return 0; } int Ng_ME_GetNEdges (NG_ELEMENT_TYPE et) { switch (et) { case NG_SEGM: case NG_SEGM3: return 1; case NG_TRIG: case NG_TRIG6: return 3; case NG_QUAD: return 4; case NG_TET: case NG_TET10: return 6; case NG_PYRAMID: return 8; case NG_PRISM: case NG_PRISM12: return 9; case NG_HEX: return 12; default: cerr << "Ng_ME_GetNEdges, illegal element type " << et << endl; } return 0; } int Ng_ME_GetNFaces (NG_ELEMENT_TYPE et) { switch (et) { case NG_SEGM: case NG_SEGM3: return 0; case NG_TRIG: case NG_TRIG6: return 1; case NG_QUAD: case NG_QUAD6: return 1; case NG_TET: case NG_TET10: return 4; case NG_PYRAMID: return 5; case NG_PRISM: case NG_PRISM12: return 5; case NG_HEX: return 6; default: cerr << "Ng_ME_GetNVertices, illegal element type " << et << endl; } return 0; } const NG_POINT * Ng_ME_GetVertices (NG_ELEMENT_TYPE et) { static double segm_points [][3] = { { 1, 0, 0 }, { 0, 0, 0 } }; static double trig_points [][3] = { { 1, 0, 0 }, { 0, 1, 0 }, { 0, 0, 0 } }; static double quad_points [][3] = { { 0, 0, 0 }, { 1, 0, 0 }, { 1, 1, 0 }, { 0, 1, 0 } }; static double tet_points [][3] = { { 1, 0, 0 }, { 0, 1, 0 }, { 0, 0, 1 }, { 0, 0, 0 } }; static double pyramid_points [][3] = { { 0, 0, 0 }, { 1, 0, 0 }, { 1, 1, 0 }, { 0, 1, 0 }, { 0, 0, 1-1e-7 }, }; static double prism_points[][3] = { { 1, 0, 0 }, { 0, 1, 0 }, { 0, 0, 0 }, { 1, 0, 1 }, { 0, 1, 1 }, { 0, 0, 1 } }; switch (et) { case NG_SEGM: case NG_SEGM3: return segm_points; case NG_TRIG: case NG_TRIG6: return trig_points; case NG_QUAD: case NG_QUAD6: return quad_points; case NG_TET: case NG_TET10: return tet_points; case NG_PYRAMID: return pyramid_points; case NG_PRISM: case NG_PRISM12: return prism_points; case NG_HEX: default: cerr << "Ng_ME_GetVertices, illegal element type " << et << endl; } return 0; } const NG_EDGE * Ng_ME_GetEdges (NG_ELEMENT_TYPE et) { static int segm_edges[1][2] = { { 1, 2 }}; static int trig_edges[3][2] = { { 3, 1 }, { 3, 2 }, { 1, 2 }}; static int quad_edges[4][2] = { { 1, 2 }, { 4, 3 }, { 1, 4 }, { 2, 3 }}; static int tet_edges[6][2] = { { 4, 1 }, { 4, 2 }, { 4, 3 }, { 1, 2 }, { 1, 3 }, { 2, 3 }}; static int prism_edges[9][2] = { { 3, 1 }, { 1, 2 }, { 3, 2 }, { 6, 4 }, { 4, 5 }, { 6, 5 }, { 3, 6 }, { 1, 4 }, { 2, 5 }}; static int pyramid_edges[8][2] = { { 1, 2 }, { 2, 3 }, { 1, 4 }, { 4, 3 }, { 1, 5 }, { 2, 5 }, { 3, 5 }, { 4, 5 }}; switch (et) { case NG_SEGM: case NG_SEGM3: return segm_edges; case NG_TRIG: case NG_TRIG6: return trig_edges; case NG_QUAD: case NG_QUAD6: return quad_edges; case NG_TET: case NG_TET10: return tet_edges; case NG_PYRAMID: return pyramid_edges; case NG_PRISM: case NG_PRISM12: return prism_edges; case NG_HEX: default: cerr << "Ng_ME_GetEdges, illegal element type " << et << endl; } return 0; } const NG_FACE * Ng_ME_GetFaces (NG_ELEMENT_TYPE et) { static int tet_faces[4][4] = { { 4, 2, 3, 0 }, { 4, 1, 3, 0 }, { 4, 1, 2, 0 }, { 1, 2, 3, 0 } }; static int prism_faces[5][4] = { { 1, 2, 3, 0 }, { 4, 5, 6, 0 }, { 3, 1, 4, 6 }, { 1, 2, 5, 4 }, { 2, 3, 6, 5 } }; static int pyramid_faces[5][4] = { { 1, 2, 5, 0 }, { 2, 3, 5, 0 }, { 3, 4, 5, 0 }, { 4, 1, 5, 0 }, { 1, 2, 3, 4 } }; static int trig_faces[1][4] = { { 1, 2, 3, 0 }, }; switch (et) { case NG_TET: case NG_TET10: return tet_faces; case NG_PRISM: case NG_PRISM12: return prism_faces; case NG_PYRAMID: return pyramid_faces; case NG_SEGM: case NG_SEGM3: case NG_TRIG: case NG_TRIG6: return trig_faces; case NG_QUAD: case NG_HEX: default: cerr << "Ng_ME_GetFaces, illegal element type " << et << endl; } return 0; } void Ng_UpdateTopology() { if (mesh) mesh -> UpdateTopology(); } Ng_Mesh Ng_SelectMesh (Ng_Mesh newmesh) { Mesh * hmesh = mesh.get(); mesh.reset((Mesh*)newmesh); return hmesh; } int Ng_GetNEdges() { return mesh->GetTopology().GetNEdges(); } int Ng_GetNFaces() { return mesh->GetTopology().GetNFaces(); } int Ng_GetElement_Edges (int elnr, int * edges, int * orient) { const MeshTopology & topology = mesh->GetTopology(); if (mesh->GetDimension() == 3) return topology.GetElementEdges (elnr, edges, orient); else return topology.GetSurfaceElementEdges (elnr, edges, orient); } int Ng_GetElement_Faces (int elnr, int * faces, int * orient) { const MeshTopology & topology = mesh->GetTopology(); if (mesh->GetDimension() == 3) return topology.GetElementFaces (elnr, faces, orient); else { faces[0] = elnr; if (orient) orient[0] = 0; return 1; } } int Ng_GetSurfaceElement_Edges (int elnr, int * edges, int * orient) { const MeshTopology & topology = mesh->GetTopology(); if (mesh->GetDimension() == 3) return topology.GetSurfaceElementEdges (elnr, edges, orient); else { if (orient) topology.GetSegmentEdge(elnr, edges[0], orient[0]); else edges[0] = topology.GetSegmentEdge(elnr); } return 1; /* int i, ned; const MeshTopology & topology = mesh->GetTopology(); Array ia; topology.GetSurfaceElementEdges (elnr, ia); ned = ia.Size(); for (i = 1; i <= ned; i++) edges[i-1] = ia.Get(i); if (orient) { topology.GetSurfaceElementEdgeOrientations (elnr, ia); for (i = 1; i <= ned; i++) orient[i-1] = ia.Get(i); } return ned; */ } int Ng_GetSurfaceElement_Face (int selnr, int * orient) { if (mesh->GetDimension() == 3) { const MeshTopology & topology = mesh->GetTopology(); if (orient) *orient = topology.GetSurfaceElementFaceOrientation (selnr); return topology.GetSurfaceElementFace (selnr); } return -1; } int Ng_GetFace_Vertices (int fnr, int * vert) { const MeshTopology & topology = mesh->GetTopology(); ArrayMem ia; topology.GetFaceVertices (fnr, ia); for (int i = 0; i < ia.Size(); i++) vert[i] = ia[i]; // cout << "face verts = " << ia << endl; return ia.Size(); } int Ng_GetFace_Edges (int fnr, int * edge) { const MeshTopology & topology = mesh->GetTopology(); ArrayMem ia; topology.GetFaceEdges (fnr, ia); for (int i = 0; i < ia.Size(); i++) edge[i] = ia[i]; return ia.Size(); } void Ng_GetEdge_Vertices (int ednr, int * vert) { const MeshTopology & topology = mesh->GetTopology(); topology.GetEdgeVertices (ednr, vert[0], vert[1]); } int Ng_GetNVertexElements (int vnr) { switch (mesh->GetDimension()) { case 3: return mesh->GetTopology().GetVertexElements(vnr).Size(); case 2: return mesh->GetTopology().GetVertexSurfaceElements(vnr).Size(); case 1: return mesh->GetTopology().GetVertexSegments(vnr).Size(); /* { int cnt = 0; for (SegmentIndex i = 0; i < mesh->GetNSeg(); i++) if ( ((*mesh)[i][0] == vnr) || ((*mesh)[i][1] == vnr) ) cnt++; return cnt; } */ default: cerr << "error: mesh->GetDimension() gives " << mesh->GetDimension() << endl; return 0; } } void Ng_GetVertexElements (int vnr, int * els) { switch (mesh->GetDimension()) { case 3: { FlatArray ia = mesh->GetTopology().GetVertexElements(vnr); for (int i = 0; i < ia.Size(); i++) els[i] = ia[i]+1; break; } case 2: { FlatArray ia = mesh->GetTopology().GetVertexSurfaceElements(vnr); for (int i = 0; i < ia.Size(); i++) els[i] = ia[i]+1; break; } case 1: { FlatArray ia = mesh->GetTopology().GetVertexSegments(vnr); for (int i = 0; i < ia.Size(); i++) els[i] = ia[i]+1; break; /* int cnt = 0; for (SegmentIndex i = 0; i < mesh->GetNSeg(); i++) if ( ((*mesh)[i][0] == vnr) || ((*mesh)[i][1] == vnr) ) els[cnt++] = i+1; break; */ } } } int Ng_GetElementOrder (int enr) { if (mesh->GetDimension() == 3) return mesh->VolumeElement(enr).GetOrder(); else return mesh->SurfaceElement(enr).GetOrder(); } void Ng_GetElementOrders (int enr, int * ox, int * oy, int * oz) { if (mesh->GetDimension() == 3) mesh->VolumeElement(enr).GetOrder(*ox, *oy, *oz); else mesh->SurfaceElement(enr).GetOrder(*ox, *oy, *oz); } void Ng_SetElementOrder (int enr, int order) { if (mesh->GetDimension() == 3) return mesh->VolumeElement(enr).SetOrder(order); else return mesh->SurfaceElement(enr).SetOrder(order); } void Ng_SetElementOrders (int enr, int ox, int oy, int oz) { if (mesh->GetDimension() == 3) mesh->VolumeElement(enr).SetOrder(ox, oy, oz); else mesh->SurfaceElement(enr).SetOrder(ox, oy); } int Ng_GetSurfaceElementOrder (int enr) { return mesh->SurfaceElement(enr).GetOrder(); } //HERBERT: falsche Anzahl von Argumenten //void Ng_GetSurfaceElementOrders (int enr, int * ox, int * oy, int * oz) void Ng_GetSurfaceElementOrders (int enr, int * ox, int * oy) { int d; mesh->SurfaceElement(enr).GetOrder(*ox, *oy, d); } void Ng_SetSurfaceElementOrder (int enr, int order) { return mesh->SurfaceElement(enr).SetOrder(order); } void Ng_SetSurfaceElementOrders (int enr, int ox, int oy) { mesh->SurfaceElement(enr).SetOrder(ox, oy); } int Ng_GetNLevels () { return (mesh) ? mesh->mglevels : 0; } void Ng_GetParentNodes (int ni, int * parents) { if (ni <= mesh->mlbetweennodes.Size()) { parents[0] = mesh->mlbetweennodes.Get(ni).I1(); parents[1] = mesh->mlbetweennodes.Get(ni).I2(); } else parents[0] = parents[1] = 0; } int Ng_GetParentElement (int ei) { if (mesh->GetDimension() == 3) { if (ei <= mesh->mlparentelement.Size()) return mesh->mlparentelement.Get(ei); } else { if (ei <= mesh->mlparentsurfaceelement.Size()) return mesh->mlparentsurfaceelement.Get(ei); } return 0; } int Ng_GetParentSElement (int ei) { if (mesh->GetDimension() == 3) { if (ei <= mesh->mlparentsurfaceelement.Size()) return mesh->mlparentsurfaceelement.Get(ei); } else { return 0; } return 0; } int Ng_GetClusterRepVertex (int pi) { return mesh->GetClusters().GetVertexRepresentant(pi); } int Ng_GetClusterRepEdge (int pi) { return mesh->GetClusters().GetEdgeRepresentant(pi); } int Ng_GetClusterRepFace (int pi) { return mesh->GetClusters().GetFaceRepresentant(pi); } int Ng_GetClusterRepElement (int pi) { return mesh->GetClusters().GetElementRepresentant(pi); } int Ng_GetNPeriodicVertices (int idnr) { Array apairs; mesh->GetIdentifications().GetPairs (idnr, apairs); return apairs.Size(); } // pairs should be an integer array of 2*npairs void Ng_GetPeriodicVertices (int idnr, int * pairs) { Array apairs; mesh->GetIdentifications().GetPairs (idnr, apairs); for (int i = 0; i < apairs.Size(); i++) { pairs[2*i] = apairs[i].I1(); pairs[2*i+1] = apairs[i].I2(); } } int Ng_GetNPeriodicEdges (int idnr) { Array map; //const MeshTopology & top = mesh->GetTopology(); int nse = mesh->GetNSeg(); int cnt = 0; // for (int id = 1; id <= mesh->GetIdentifications().GetMaxNr(); id++) { mesh->GetIdentifications().GetMap(idnr, map); //(*testout) << "ident-map " << id << ":" << endl << map << endl; for (SegmentIndex si = 0; si < nse; si++) { PointIndex other1 = PointIndex (map[(*mesh)[si][0]]); PointIndex other2 = PointIndex (map[(*mesh)[si][1]]); // (*testout) << "seg = " << (*mesh)[si] << "; other = " // << other1 << "-" << other2 << endl; if (other1 && other2 && mesh->IsSegment (other1, other2)) { cnt++; } } } return cnt; } void Ng_GetPeriodicEdges (int idnr, int * pairs) { Array map; const MeshTopology & top = mesh->GetTopology(); int nse = mesh->GetNSeg(); int cnt = 0; // for (int id = 1; id <= mesh->GetIdentifications().GetMaxNr(); id++) { mesh->GetIdentifications().GetMap(idnr, map); //(*testout) << "map = " << map << endl; for (SegmentIndex si = 0; si < nse; si++) { PointIndex other1 = PointIndex (map[(*mesh)[si][0]]); PointIndex other2 = PointIndex (map[(*mesh)[si][1]]); if (other1 && other2 && mesh->IsSegment (other1, other2)) { SegmentIndex otherseg = mesh->SegmentNr (other1, other2); pairs[cnt++] = top.GetSegmentEdge (si+1); pairs[cnt++] = top.GetSegmentEdge (otherseg+1); } } } } void Ng_PushStatus (const char * str) { PushStatus (MyStr (str)); } void Ng_PopStatus () { PopStatus (); } void Ng_SetThreadPercentage (double percent) { SetThreadPercent (percent); } void Ng_GetStatus (char ** str, double & percent) { MyStr s; GetStatus(s,percent); *str = new char[s.Length()+1]; strcpy(*str,s.c_str()); } void Ng_SetTerminate(void) { multithread.terminate = 1; } void Ng_UnSetTerminate(void) { multithread.terminate = 0; } int Ng_ShouldTerminate(void) { return multithread.terminate; } void Ng_SetRunning(int flag) { multithread.running = flag; } int Ng_IsRunning() { return multithread.running; } ///// Added by Roman Stainko .... int Ng_GetVertex_Elements( int vnr, int* elems ) { const MeshTopology& topology = mesh->GetTopology(); ArrayMem indexArray; topology.GetVertexElements( vnr, indexArray ); for( int i=0; iGetDimension()) { case 3: { const MeshTopology& topology = mesh->GetTopology(); ArrayMem indexArray; topology.GetVertexSurfaceElements( vnr, indexArray ); for( int i=0; iGetNSeg(); i++) if ( ((*mesh)[i][0] == vnr) || ((*mesh)[i][1] == vnr) ) elems[cnt++] = i+1; return cnt; } case 1: { int cnt = 0; for (int i = 0; i < mesh->pointelements.Size(); i++) if (mesh->pointelements[i].pnum == vnr) elems[cnt++] = i+1; return cnt; } } return 0; } ///// Added by Roman Stainko .... int Ng_GetVertex_NElements( int vnr ) { const MeshTopology& topology = mesh->GetTopology(); ArrayMem indexArray; topology.GetVertexElements( vnr, indexArray ); return indexArray.Size(); } ///// Added by Roman Stainko .... int Ng_GetVertex_NSurfaceElements( int vnr ) { switch (mesh->GetDimension()) { case 3: { const MeshTopology& topology = mesh->GetTopology(); ArrayMem indexArray; topology.GetVertexSurfaceElements( vnr, indexArray ); return indexArray.Size(); } case 2: { int cnt = 0; for (SegmentIndex i = 0; i < mesh->GetNSeg(); i++) if ( ((*mesh)[i][0] == vnr) || ((*mesh)[i][1] == vnr) ) cnt++; return cnt; } } return 0; } #ifdef SOCKETS int Ng_SocketClientOpen( const int port, const char * host ) { try { if(host) clientsocket.Reset(new ClientSocket(port,host)); else clientsocket.Reset(new ClientSocket(port)); } catch( SocketException e) { cerr << e.Description() << endl; return 0; } return 1; } void Ng_SocketClientWrite( const char * write, char** reply) { string output = write; (*clientsocket) << output; string sreply; (*clientsocket) >> sreply; *reply = new char[sreply.size()+1]; strcpy(*reply,sreply.c_str()); } void Ng_SocketClientClose ( void ) { clientsocket.Reset(NULL); } void Ng_SocketClientGetServerHost ( const int number, char ** host ) { *host = new char[servers[number]->host.size()+1]; strcpy(*host,servers[number]->host.c_str()); } void Ng_SocketClientGetServerPort ( const int number, int * port ) { *port = servers[number]->port; } void Ng_SocketClientGetServerClientID ( const int number, int * id ) { *id = servers[number]->clientid; } #endif // SOCKETS #ifdef PARALLEL void Ng_SetElementPartition ( const int elnr, const int part ) { mesh->VolumeElement(elnr+1).SetPartition(part); } int Ng_GetElementPartition ( const int elnr ) { return mesh->VolumeElement(elnr+1).GetPartition(); } #endif void Ng_InitPointCurve(double red, double green, double blue) { mesh->InitPointCurve(red, green, blue); } void Ng_AddPointCurvePoint(const double * point) { Point3d pt; pt.X() = point[0]; pt.Y() = point[1]; pt.Z() = point[2]; mesh->AddPointCurvePoint(pt); } void Ng_SaveMesh ( const char * meshfile ) { mesh -> Save(string(meshfile)); } int Ng_Bisect_WithInfo ( const char * refinementfile, double ** qualityloss, int * qualityloss_size ) { BisectionOptions biopt; biopt.outfilename = NULL; // "ngfepp.vol"; biopt.femcode = "fepp"; biopt.refinementfilename = refinementfile; Refinement * ref = const_cast (&mesh->GetGeometry()->GetRefinement()); MeshOptimize2d * opt = NULL; /* if (stlgeometry) ref = new RefinementSTLGeometry(*stlgeometry); #ifdef OCCGEOMETRY else if (occgeometry) ref = new OCCRefinementSurfaces (*occgeometry); #endif #ifdef ACIS else if (acisgeometry) { ref = new ACISRefinementSurfaces(*acisgeometry); opt = new ACISMeshOptimize2dSurfaces(*acisgeometry); ref->Set2dOptimizer(opt); } #endif else { ref = new RefinementSurfaces(*geometry); opt = new MeshOptimize2dSurfaces(*geometry); ref->Set2dOptimizer(opt); } */ #ifdef ACIS if (acisgeometry) { // ref = new ACISRefinementSurfaces(*acisgeometry); opt = new ACISMeshOptimize2dSurfaces(*acisgeometry); ref->Set2dOptimizer(opt); } else #endif { // ref = new RefinementSurfaces(*geometry); /* // joachim, oct 2014 CSGeometry * geometry = dynamic_cast (ng_geometry.get()); if (geometry) { opt = new MeshOptimize2dSurfaces(*geometry); ref->Set2dOptimizer(opt); } */ } if(!mesh->LocalHFunctionGenerated()) mesh->CalcLocalH(mparam.grading); mesh->LocalHFunction().SetGrading (mparam.grading); Array * qualityloss_arr = NULL; if(qualityloss != NULL) qualityloss_arr = new Array; ref -> Bisect (*mesh, biopt, qualityloss_arr); int retval = 0; if(qualityloss != NULL) { *qualityloss = new double[qualityloss_arr->Size()+1]; for(int i = 0; iSize(); i++) (*qualityloss)[i+1] = (*qualityloss_arr)[i]; retval = qualityloss_arr->Size(); delete qualityloss_arr; } mesh -> UpdateTopology(); mesh -> GetCurvedElements().BuildCurvedElements (ref, mparam.elementorder); multithread.running = 0; delete ref; delete opt; return retval; } void Ng_Bisect ( const char * refinementfile ) { Ng_Bisect_WithInfo( refinementfile, NULL, NULL ); } /* number of nodes of type nt nt = 0 is Vertex nt = 1 is Edge nt = 2 is Face nt = 3 is Cell */ int Ng_GetNNodes (int nt) { switch (nt) { case 0: return mesh -> GetNV(); case 1: return mesh->GetTopology().GetNEdges(); case 2: return mesh->GetTopology().GetNFaces(); case 3: return mesh -> GetNE(); } return -1; } int Ng_GetClosureNodes (int nt, int nodenr, int nodeset, int * nodes) { switch (nt) { case 3: // The closure of a cell { int cnt = 0; if (nodeset & 1) // Vertices { const Element & el = (*mesh)[ElementIndex(nodenr)]; for (int i = 0; i < el.GetNP(); i++) { nodes[cnt++] = 0; nodes[cnt++] = el[i] - PointIndex::BASE; } } if (nodeset & 2) // Edges { int edges[12]; int ned; ned = mesh->GetTopology().GetElementEdges (nodenr+1, edges, 0); for (int i = 0; i < ned; i++) { nodes[cnt++] = 1; nodes[cnt++] = edges[i]-1; } } if (nodeset & 4) // Faces { int faces[12]; int nfa; nfa = mesh->GetTopology().GetElementFaces (nodenr+1, faces, 0); for (int i = 0; i < nfa; i++) { nodes[cnt++] = 2; nodes[cnt++] = faces[i]-1; } } if (nodeset & 8) // Cell { nodes[cnt++] = 3; nodes[cnt++] = nodenr; } return cnt/2; } default: { cerr << "GetClosureNodes not implemented for Nodetype " << nt << endl; } } return 0; } int Ng_GetNElements (int dim) { switch (dim) { case 0: return mesh -> GetNV(); case 1: return mesh -> GetNSeg(); case 2: return mesh -> GetNSE(); case 3: return mesh -> GetNE(); } return -1; } /* closure nodes of element nodeset is bit-coded, bit 0 includes Vertices, bit 1 edges, etc E.g., nodeset = 6 includes edge and face nodes nodes is pair of integers (nodetype, nodenr) return value is number of nodes */ int Ng_GetElementClosureNodes (int dim, int elementnr, int nodeset, int * nodes) { switch (dim) { case 3: // The closure of a volume element = CELL { return Ng_GetClosureNodes (3, elementnr, nodeset, nodes); } case 2: { int cnt = 0; if (nodeset & 1) // Vertices { const Element2d & el = (*mesh)[SurfaceElementIndex(elementnr)]; for (int i = 0; i < el.GetNP(); i++) { nodes[cnt++] = 0; nodes[cnt++] = el[i] - PointIndex::BASE; } } if (nodeset & 2) // Edges { int edges[12]; int ned; ned = mesh->GetTopology().GetSurfaceElementEdges (elementnr+1, edges, 0); for (int i = 0; i < ned; i++) { nodes[cnt++] = 1; nodes[cnt++] = edges[i]-1; } } if (nodeset & 4) // Faces { int face = mesh->GetTopology().GetSurfaceElementFace (elementnr+1); nodes[cnt++] = 2; nodes[cnt++] = face-1; } return cnt/2; } default: { cerr << "GetClosureNodes not implemented for Element of dimension " << dim << endl; } } return 0; } void Ng_GetArgs (int & argc, char ** &argv) { argc = h_argc; argv = h_argv; } void LinkFunction () { Ng_Redraw(); } void Ng_TclCmd(string cmd) { lock_guard guard(tcl_todo_mutex); *(multithread.tcl_todo) += cmd; } netgen-6.2.1804/libsrc/interface/readtetmesh.cpp0000644000175000017500000006201313272137567020236 0ustar kurtkurt // // Read CST file format // #include #include #include #include #include #include namespace netgen { #include "writeuser.hpp" void ReadTETFormat (Mesh & mesh, const string & hfilename) { const char * filename = hfilename.c_str(); cout << "Reading .tet mesh" << endl; ifstream in (filename); int inputsection = 0; bool done = false; char ch; string str; string version; int unitcode; double tolerance; double dS1, dS2, alphaDeg, x3D, y3D, z3D; int nelts,nfaces,nedges,nnodes; int nperiodicmasternodes,ncornerperiodicmasternodes,ncubicperiodicmasternodes; int nperiodicmasteredges,ncornerperiodicmasteredges; int nperiodicmasterfaces; int nodeid,type,pid; int dummyint; int modelverts,modeledges,modelfaces,modelcells; Point3d p; int numObj3D,numObj2D,numObj1D,numObj0D; // bool nullstarted; Array eldom; int minId3D = -1, minId2D = -1; int maxId3D(-1), maxId2D(-1), maxId1D(-1), maxId0D(-1); Array *> segmentdata; Array tris; Array userdata_int; // just save data for 1:1 output Array userdata_double; Array point_pids; Array tetfacedata; Array uid_to_group_3D, uid_to_group_2D, uid_to_group_1D, uid_to_group_0D; while(!done) { // skip "//" comment bool comment = true; while(comment) { ch = in.get(); while(ch == ' ' || ch == '\n' || ch == '\t' || ch =='\r') ch = in.get(); if(ch != '/') { comment = false; in.putback(ch); } else { ch = in.get(); if(ch != '/') { comment = false; in.putback(ch); in.putback('/'); } else { in.ignore(10000,'\n'); } } } switch(inputsection) { case 0: // version number in >> version; cout << "Version number " << version << endl; if(version != "1.1" && version != "2" && version != "2.0") { cerr << "WARNING: import only tested for versions 1.1 and 2" << endl; //done = true; } userdata_double.Append(atof(version.c_str())); break; case 1: // unit code (1=CM 2=MM 3=M 4=MIC 5=NM 6=FT 7=IN 8=MIL) in >> unitcode; cout << "unit code " << unitcode << endl; userdata_int.Append(unitcode); break; case 2: // Geometric coord "zero" tolerance threshold in >> tolerance; cout << "tolerance " << tolerance << endl; userdata_double.Append(tolerance); break; case 3: // Periodic UnitCell dS1 , dS2 , alphaDeg in >> dS1 >> dS2 >> alphaDeg; userdata_double.Append(dS1); userdata_double.Append(dS2); userdata_double.Append(alphaDeg); break; case 4: // Periodic UnitCell origin in global coords (x3D,y3D,z3D) in >> x3D >> y3D >> z3D; userdata_double.Append(x3D); userdata_double.Append(y3D); userdata_double.Append(z3D); break; case 5: // Model entity count: Vertices, Edges, Faces, Cells (Version 2) in >> modelverts >> modeledges >> modelfaces >> modelcells; userdata_int.Append(modelverts); userdata_int.Append(modeledges); userdata_int.Append(modelfaces); userdata_int.Append(modelcells); break; case 6: // Topological mesh-entity counts (#elements,#faces,#edges,#nodes) in >> nelts >> nfaces >> nedges >> nnodes; cout << nelts << " elements, " << nfaces << " faces, " << nedges << " edges, " << nnodes << " nodes" << endl; mesh.SetAllocSize(nnodes,2*nedges,nfaces,nelts); break; case 7: // NodeID, X, Y, Z, Type (0=Reg 1=PMaster 2=PSlave 3=CPMaster 4=CPSlave), PID: { cout << "read nodes" << endl; for(int i=0; i> nodeid >> p.X() >> p.Y() >> p.Z() >> type >> pid; mesh.AddPoint(p); point_pids.Append(pid); if(pid > maxId0D) maxId0D = pid; //(*testout) << "point " << p << " type " << type << " mastersexist " << mastersexist << endl; } } break; case 8: // Number of Periodic Master Nodes in >> nperiodicmasternodes; break; case 9: // MasterNodeID, SlaveNodeID, TranslCode (1=dS1 2=dS2 3=dS1+dS2) for(int i=0; i> dummyint; in >> dummyint; } break; case 10: // Number of Corner Periodic Master Nodes in >> ncornerperiodicmasternodes; break; case 11: // MasterNodeID, 3-SlaveNodeID's, 3-TranslCodes (1=dS1 2=dS2 3=dS1+dS2) for(int i=0; i> dummyint; for(int j=0; j<3; j++) in >> dummyint; } break; case 12: // Number of Cubic Periodic Master Nodes in >> ncubicperiodicmasternodes; break; case 13: //MasterNodeID, 7-SlaveNodeID's, TranslCodes for(int i=0; i> dummyint; for(int j=0; j<7; j++) in >> dummyint; } break; case 14: // EdgeID, NodeID0, NodeID1, Type (0=Reg 1=PMaster 2=PSlave 3=CPMaster 4=CPSlave), PID cout << "read edges" << endl; // nullstarted = false; segmentdata.SetSize(nedges); for(int i=0; i(7); *segmentdata[i] = -1; in >> dummyint; in >> (*segmentdata[i])[0] >> (*segmentdata[i])[1]; in >> type; in >> (*segmentdata[i])[2]; if((*segmentdata[i])[2] > maxId1D) maxId1D = (*segmentdata[i])[2]; } break; case 15: // Number of Periodic Master Edges in >> nperiodicmasteredges; break; case 16: // MasterEdgeID, SlaveEdgeID, TranslCode (1=dS1 2=dS2 3=dS1+dS2) for(int i=0; i> dummyint >> dummyint >> dummyint; break; case 17: // Number of Corner Periodic Master Edges in >> ncornerperiodicmasteredges; break; case 18: // MasterEdgeID, 3 SlaveEdgeID's, 3 TranslCode (1=dS1 2=dS2 3=dS1+dS2) for(int i=0; i> dummyint; for(int j=0; j<3; j++) in >> dummyint; for(int j=0; j<3; j++) in >> dummyint; } break; case 19: // FaceID, EdgeID0, EdgeID1, EdgeID2, FaceType (0=Reg 1=PMaster 2=PSlave), PID { //Segment seg; int segnum_ng[3]; bool neg[3]; cout << "read faces" << endl; // nullstarted = false; for(int i=0; i> trinum; for(int j=0; j<3; j++) { in >> segnum; neg[j] = (segnum<0); if(!neg[j]) segnum_ng[j] = segnum-1; else segnum_ng[j] = -segnum-1; if(neg[j]) tris.Last()->PNum(j+1) = (*segmentdata[segnum_ng[j]])[1]; else tris.Last()->PNum(j+1) = (*segmentdata[segnum_ng[j]])[0]; tris.Last()->GeomInfoPi(j+1).trignum = trinum; } in >> type; int faceid; in >> faceid; if(faceid > maxId2D) maxId2D = faceid; if(i==0 || faceid < minId2D) minId2D = faceid; tris.Last()->SetIndex(faceid); if(faceid > 0) { //if(nullstarted) // { // cout << "Faces: Assumption about index 0 wrong (face"<> nperiodicmasterfaces; break; case 21: // MasterFaceID, SlaveFaceID, TranslCode (1=dS1 2=dS2) { Vec<3> randomvec(-1.32834,3.82399,0.5429151); int maxtransl = -1; for(int i=0; i nodes1(3),nodes2(3); Array sortval1(3),sortval2(3); in >> tri1 >> tri2 >> transl; if(transl > maxtransl) maxtransl = transl; for(int j=0; j<3; j++) { nodes1[j] = tris[tri1-1]->PNum(j+1); sortval1[j] = Vec<3>(mesh[nodes1[j]])*randomvec; nodes2[j] = tris[tri2-1]->PNum(j+1); sortval2[j] = Vec<3>(mesh[nodes2[j]])*randomvec; } BubbleSort(sortval1,nodes1); BubbleSort(sortval2,nodes2); for(int j=0; j<3; j++) mesh.GetIdentifications().Add(nodes1[j],nodes2[j],transl); } for(int i=1; i<= maxtransl; i++) mesh.GetIdentifications().SetType(i,Identifications::PERIODIC); } break; case 22: // ElemID, FaceID0, FaceID1, FaceID2, FaceID3, PID { cout << "read elements (1)" << endl; //SurfaceElementIndex surf[4]; bool neg[4]; int elemid; int domain; eldom.SetSize(nelts); for(int i=0; i> elemid; for(int j=0; j<4;j++) { in >> dummyint; neg[j] = (dummyint < 0); if(neg[j]) tetfacedata.Append(-dummyint-1); //surf[j] = -dummyint-1; else tetfacedata.Append(dummyint-1); tetfacedata.Append(((neg[j]) ? 1 : 0)); //surf[j] = dummyint-1; } in >> domain; eldom[i] = domain; tetfacedata.Append(domain); if(i==0 || domain < minId3D) minId3D = domain; if(domain > maxId3D) maxId3D = domain; // for(int j=0; j<4; j++) // { // if(mesh.GetNSE() <= surf[j]) // continue; // int faceind = 0; // for(int k=1; k<=mesh.GetNFD(); k++) // { // if(mesh.GetFaceDescriptor(k).SurfNr() == mesh[surf[j]].GetIndex()) // faceind = k; // } // if(faceind) // { // if(neg[j]) // mesh.GetFaceDescriptor(faceind).SetDomainOut(domain); // else // mesh.GetFaceDescriptor(faceind).SetDomainIn(domain); // } // else // { // if(neg[j]) // faceind = mesh.AddFaceDescriptor(FaceDescriptor(mesh[surf[j]].GetIndex(),0,domain,0)); // else // faceind = mesh.AddFaceDescriptor(FaceDescriptor(mesh[surf[j]].GetIndex(),domain,0,0)); // mesh.GetFaceDescriptor(faceind).SetBCProperty(mesh[surf[j]].GetIndex()); // } // } } cout << endl; // Array indextodescriptor(maxId2D+1); // for(int i=1; i<=mesh.GetNFD(); i++) // indextodescriptor[mesh.GetFaceDescriptor(i).SurfNr()] = i; // for(SurfaceElementIndex i=0; i> dummyint; for(int j=1; j<=4; j++) in >> el.PNum(j); swap(el.PNum(1),el.PNum(2)); el.SetIndex(eldom[i]); mesh.AddVolumeElement(el); } } break; case 24: // Physical Object counts (#Obj3D,#Obj2D,#Obj1D,#Obj0D) { in >> numObj3D; userdata_int.Append(numObj3D); in >> numObj2D; userdata_int.Append(numObj2D); in >> numObj1D; userdata_int.Append(numObj1D); in >> numObj0D; userdata_int.Append(numObj0D); } break; case 25: // Number of Ports (Ports are a subset of Object2D list) { in >> dummyint; //userdata_int.Append(dummyint); } break; case 26: // Object3D GroupID, #Elems ElemID List { uid_to_group_3D.SetSize(maxId3D+1); uid_to_group_3D = -1; for(int i=0; i> groupid; (*testout) << "3d groupid " << groupid << endl; //userdata_int.Append(groupid); int nelems; in >> nelems; //userdata_int.Append(nelems); for(int j=0; j> dummyint; (*testout) << "read " << dummyint << endl; //userdata_int.Append(dummyint); if(dummyint < 0) dummyint *= -1; uid_to_group_3D[eldom[dummyint-1]] = groupid; } } } break; case 27: // Object2D GroupID, #Faces FaceID List { Array ports; //int totnum = 0; uid_to_group_2D.SetSize(maxId2D+1); uid_to_group_2D = -1; for(int i=0; i> groupid; (*testout) << "2d groupid " << groupid << endl; //userdata_int.Append(groupid); int nelems; in >> nelems; //userdata_int.Append(nelems); for(int j=0; j> dummyint; char port; while((port = in.get()) == ' ') ; (*testout) << "read " << dummyint << endl; if(dummyint < 0) dummyint *= -1; int uid = tris[dummyint-1]->GetIndex(); if(port == 'P' || port == 'p') { if(!ports.Contains(uid)) ports.Append(uid); } else in.putback(port); //userdata_int.Append(dummyint); uid_to_group_2D[uid] = groupid; (*testout) << "setting " << uid << endl; //totnum++; } } mesh.SetUserData("TETmesh:ports",ports); } break; case 28: // Object1D GroupID, #Edges EdgeID List { uid_to_group_1D.SetSize(maxId1D+1); uid_to_group_1D = -1; for(int i=0; i> groupid; //userdata_int.Append(groupid); int nelems; in >> nelems; //userdata_int.Append(nelems); for(int j=0; j> dummyint; //userdata_int.Append(dummyint); if(dummyint < 0) dummyint *= -1; uid_to_group_1D[(*segmentdata[dummyint-1])[2]] = groupid; } } } break; case 29: // Object0D GroupID, #Nodes NodeID List { uid_to_group_0D.SetSize(maxId0D+1); uid_to_group_0D = -1; for(int i=0; i> groupid; //userdata_int.Append(groupid); int nelems; in >> nelems; //userdata_int.Append(nelems); for(int j=0; j> dummyint; //userdata_int.Append(dummyint); if(dummyint < 0) dummyint *= -1; uid_to_group_0D[point_pids[dummyint-1]] = groupid; } } } break; default: done = true; } if(inputsection == 4 && version == "1.1") inputsection++; inputsection++; } in.close(); mesh.SetUserData("TETmesh:double",userdata_double); userdata_int.Append(minId2D); userdata_int.Append(minId3D); mesh.SetUserData("TETmesh:int",userdata_int); //if(version == "1.1") mesh.SetUserData("TETmesh:point_id",point_pids); mesh.SetUserData("TETmesh:uid_to_group_3D",uid_to_group_3D); mesh.SetUserData("TETmesh:uid_to_group_2D",uid_to_group_2D); mesh.SetUserData("TETmesh:uid_to_group_1D",uid_to_group_1D); mesh.SetUserData("TETmesh:uid_to_group_0D",uid_to_group_0D); Array surfindices(tris.Size()); surfindices = -1; for(int i=0; iGetIndex() > 0) surfindices[i] = mesh.AddSurfaceElement(*tris[i]); } else { if(tris[i]->GetIndex() > 0 && tris[i]->GetIndex() < minId3D) { tris[i]->SetIndex(tris[i]->GetIndex()-minId2D+1); surfindices[i] = mesh.AddSurfaceElement(*tris[i]); } } delete tris[i]; } mesh.ClearFaceDescriptors(); if(atof(version.c_str()) <= 1.999999) for(int i = 1; i <= maxId2D; i++) mesh.AddFaceDescriptor(FaceDescriptor(i,0,0,0)); else for(int i=minId2D; i indextodescriptor(maxId2D+1); // for(int i=1; i<=mesh.GetNFD(); i++) // indextodescriptor[mesh.GetFaceDescriptor(i).SurfNr()] = i; // for(SurfaceElementIndex i=0; i 0) || (atof(version.c_str()) > 1.999999 && (*segmentdata[i])[2] > 0 && (*segmentdata[i])[2] < minId2D)) { seg[0] = (*segmentdata[i])[0]; seg[1] = (*segmentdata[i])[1]; seg.edgenr = (*segmentdata[i])[2]; seg.epgeominfo[0].edgenr = (*segmentdata[i])[2]; seg.epgeominfo[1].edgenr = (*segmentdata[i])[2]; seg.si = (*segmentdata[i])[3]-minId2D+1; seg.surfnr1 = -1;//(*segmentdata[i])[3]; seg.surfnr2 = -1;//(*segmentdata[i])[4]; seg.geominfo[0].trignum = (*segmentdata[i])[5]; seg.geominfo[1].trignum = (*segmentdata[i])[5]; mesh.AddSegment(seg); seg[0] = (*segmentdata[i])[1]; seg[1] = (*segmentdata[i])[0]; seg.si = (*segmentdata[i])[4]-minId2D+1; seg.surfnr1 = -1;//(*segmentdata[i])[3]; seg.surfnr2 = -1;//(*segmentdata[i])[4]; seg.geominfo[0].trignum = (*segmentdata[i])[6]; seg.geominfo[1].trignum = (*segmentdata[i])[6]; mesh.AddSegment(seg); } delete segmentdata[i]; } /* for(int i=mesh.GetNSeg(); i>=1; i--) if(mesh.LineSegment(i).epgeominfo[0].edgenr == 0 || mesh.LineSegment(i).epgeominfo[1].edgenr == 0) mesh.FullDeleteSegment(i); */ mesh.CalcSurfacesOfNode(); } } netgen-6.2.1804/libsrc/interface/writeuser.cpp0000644000175000017500000005740313272137567017771 0ustar kurtkurt// // Write user dependent output file // #include #include #include #include #include #include #include "writeuser.hpp" namespace netgen { extern MeshingParameters mparam; void RegisterUserFormats (Array & names, Array & extensions) { const char *types[] = { "Neutral Format", ".mesh", "Surface Mesh Format", ".mesh" , "DIFFPACK Format", ".mesh", "TecPlot Format", ".mesh", "Tochnog Format", ".mesh", "Abaqus Format", ".mesh", "Fluent Format", ".mesh", "Permas Format", ".mesh", "FEAP Format", ".mesh", "Elmer Format", "*", "STL Format", ".stl", "STL Extended Format", ".stl", "VRML Format", ".*", "Gmsh Format", ".gmsh", "Gmsh2 Format", ".gmsh2", "OpenFOAM 1.5+ Format", "*", "OpenFOAM 1.5+ Compressed", "*", "JCMwave Format", ".jcm", "TET Format", ".tet", // { "Chemnitz Format" }, 0 }; for (int i = 0; types[2*i]; i++) { names.Append (types[2*i]); extensions.Append (types[2*i+1]); } } bool WriteUserFormat (const string & format, const Mesh & mesh, const string & filename) { // cout << "write user &hgeom = " << &hgeom << endl; // const CSGeometry & geom = *dynamic_cast (&hgeom); const CSGeometry & geom = *dynamic_pointer_cast (mesh.GetGeometry()); PrintMessage (1, "Export mesh to file ", filename, ", format is ", format); if (format == "Neutral Format") WriteNeutralFormat (mesh, geom, filename); else if (format == "Surface Mesh Format") WriteSurfaceFormat (mesh, filename); else if (format == "DIFFPACK Format") WriteDiffPackFormat (mesh, geom, filename); else if (format == "Tochnog Format") WriteTochnogFormat (mesh, filename); else if (format == "TecPlot Format") cerr << "ERROR: TecPlot format currently out of order" << endl; // WriteTecPlotFormat (mesh, geom, filename); else if (format == "Abaqus Format") WriteAbaqusFormat (mesh, filename); else if (format == "Fluent Format") WriteFluentFormat (mesh, filename); else if (format == "Permas Format") WritePermasFormat (mesh, filename); else if (format == "FEAP Format") WriteFEAPFormat (mesh, filename); else if (format == "Elmer Format") WriteElmerFormat (mesh, filename); else if (format == "STL Format") WriteSTLFormat (mesh, filename); // Philippose - 16 August 2010 // Added additional STL Export in which // each face of the geometry is treated // as a separate "solid" entity else if (format == "STL Extended Format") WriteSTLExtFormat (mesh, filename); else if (format == "VRML Format") WriteVRMLFormat (mesh, 1, filename); else if (format == "Fepp Format") WriteFEPPFormat (mesh, geom, filename); else if (format == "EdgeElement Format") WriteEdgeElementFormat (mesh, geom, filename); else if (format == "Chemnitz Format") WriteUserChemnitz (mesh, filename); else if (format == "Gmsh Format") WriteGmshFormat (mesh, geom, filename); // Philippose - 29/01/2009 // Added Gmsh v2.xx Mesh export capability else if (format == "Gmsh2 Format") WriteGmsh2Format (mesh, geom, filename); // Philippose - 25/10/2009 // Added OpenFOAM 1.5+ Mesh export capability else if (format == "OpenFOAM 1.5+ Format") WriteOpenFOAM15xFormat (mesh, filename, false); else if (format == "OpenFOAM 1.5+ Compressed") WriteOpenFOAM15xFormat (mesh, filename, true); else if (format == "JCMwave Format") WriteJCMFormat (mesh, geom, filename); #ifdef OLIVER else if (format == "TET Format") WriteTETFormat( mesh, filename);//, "High Frequency" ); #endif else { return 1; } return 0; } /* * Neutral mesh format * points, elements, surface elements */ void WriteNeutralFormat (const Mesh & mesh, const NetgenGeometry & geom, const string & filename) { cout << "write neutral, new" << endl; int np = mesh.GetNP(); int ne = mesh.GetNE(); int nse = mesh.GetNSE(); int nseg = mesh.GetNSeg(); int i, j; int inverttets = mparam.inverttets; int invertsurf = mparam.inverttrigs; ofstream outfile (filename.c_str()); outfile.precision(6); outfile.setf (ios::fixed, ios::floatfield); outfile.setf (ios::showpoint); outfile << np << "\n"; for (i = 1; i <= np; i++) { const Point3d & p = mesh.Point(i); outfile.width(10); outfile << p.X() << " "; outfile.width(9); outfile << p.Y() << " "; if (mesh.GetDimension() == 3) { outfile.width(9); outfile << p.Z(); } outfile << "\n"; } if (mesh.GetDimension() == 3) { outfile << ne << "\n"; for (i = 1; i <= ne; i++) { Element el = mesh.VolumeElement(i); if (inverttets) el.Invert(); outfile.width(4); outfile << el.GetIndex() << " "; for (j = 1; j <= el.GetNP(); j++) { outfile << " "; outfile.width(8); outfile << el.PNum(j); } outfile << "\n"; } } outfile << nse << "\n"; for (i = 1; i <= nse; i++) { Element2d el = mesh.SurfaceElement(i); if (invertsurf) el.Invert(); outfile.width(4); outfile << mesh.GetFaceDescriptor (el.GetIndex()).BCProperty() << " "; for (j = 1; j <= el.GetNP(); j++) { outfile << " "; outfile.width(8); outfile << el.PNum(j); } outfile << "\n"; } if (mesh.GetDimension() == 2) { outfile << nseg << "\n"; for (int i = 1; i <= nseg; i++) { const Segment & seg = mesh.LineSegment(i); outfile.width(4); outfile << seg.si << " "; for (int j = 0; j < seg.GetNP(); j++) { outfile << " "; outfile.width(8); outfile << seg[j]; } /* outfile << " "; outfile.width(8); outfile << seg[0]; outfile << " "; outfile.width(8); outfile << seg[1]; if (seg[2] != -1) { outfile.width(8); outfile << seg[2]; } */ outfile << "\n"; } } } void WriteSurfaceFormat (const Mesh & mesh, const string & filename) { // surface mesh int i, j; cout << "Write Surface Mesh" << endl; ofstream outfile (filename.c_str()); outfile << "surfacemesh" << endl; outfile << mesh.GetNP() << endl; for (i = 1; i <= mesh.GetNP(); i++) { for (j = 0; j < 3; j++) { outfile.width(10); outfile << mesh.Point(i)(j) << " "; } outfile << endl; } outfile << mesh.GetNSE() << endl; for (i = 1; i <= mesh.GetNSE(); i++) { for (j = 1; j <= 3; j++) { outfile.width(8); outfile << mesh.SurfaceElement(i).PNum(j); } outfile << endl; } } /* * save surface mesh as STL file */ void WriteSTLFormat (const Mesh & mesh, const string & filename) { cout << "\nWrite STL Surface Mesh" << endl; ostream *outfile; if(filename.substr(filename.length()-3,3) == ".gz") outfile = new ogzstream(filename.c_str()); else outfile = new ofstream(filename.c_str()); int i; outfile->precision(10); *outfile << "solid" << endl; for (i = 1; i <= mesh.GetNSE(); i++) { *outfile << "facet normal "; const Point3d& p1 = mesh.Point(mesh.SurfaceElement(i).PNum(1)); const Point3d& p2 = mesh.Point(mesh.SurfaceElement(i).PNum(2)); const Point3d& p3 = mesh.Point(mesh.SurfaceElement(i).PNum(3)); Vec3d normal = Cross(p2-p1,p3-p1); if (normal.Length() != 0) { normal /= (normal.Length()); } *outfile << normal.X() << " " << normal.Y() << " " << normal.Z() << "\n"; *outfile << "outer loop\n"; *outfile << "vertex " << p1.X() << " " << p1.Y() << " " << p1.Z() << "\n"; *outfile << "vertex " << p2.X() << " " << p2.Y() << " " << p2.Z() << "\n"; *outfile << "vertex " << p3.X() << " " << p3.Y() << " " << p3.Z() << "\n"; *outfile << "endloop\n"; *outfile << "endfacet\n"; } *outfile << "endsolid" << endl; } /* * Philippose - 16 August 2010 * Save surface mesh as STL file * with a separate solid definition * for each face * - This helps in splitting up the * STL into named boundary faces * when using a third-party mesher */ void WriteSTLExtFormat (const Mesh & mesh, const string & filename) { cout << "\nWrite STL Surface Mesh (with separated boundary faces)" << endl; ostream *outfile; if(filename.substr(filename.length()-3,3) == ".gz") outfile = new ogzstream(filename.c_str()); else outfile = new ofstream(filename.c_str()); outfile->precision(10); int numBCs = 0; Array faceBCs; TABLE faceBCMapping; faceBCs.SetSize(mesh.GetNFD()); faceBCMapping.SetSize(mesh.GetNFD()); faceBCs = -1; // Collect the BC numbers used in the mesh for(int faceNr = 1; faceNr <= mesh.GetNFD(); faceNr++) { int bcNum = mesh.GetFaceDescriptor(faceNr).BCProperty(); if(faceBCs.Pos(bcNum) < 0) { numBCs++; faceBCs.Set(numBCs,bcNum); faceBCMapping.Add1(numBCs,faceNr); } else { faceBCMapping.Add1(faceBCs.Pos(bcNum)+1,faceNr); } } faceBCs.SetSize(numBCs); faceBCMapping.ChangeSize(numBCs); // Now actually write the data to file for(int bcInd = 1; bcInd <= faceBCs.Size(); bcInd++) { *outfile << "solid Boundary_" << faceBCs.Elem(bcInd) << "\n"; for(int faceNr = 1;faceNr <= faceBCMapping.EntrySize(bcInd); faceNr++) { Array faceSei; mesh.GetSurfaceElementsOfFace(faceBCMapping.Get(bcInd,faceNr),faceSei); for (int i = 0; i < faceSei.Size(); i++) { *outfile << "facet normal "; const Point3d& p1 = mesh.Point(mesh.SurfaceElement(faceSei[i]).PNum(1)); const Point3d& p2 = mesh.Point(mesh.SurfaceElement(faceSei[i]).PNum(2)); const Point3d& p3 = mesh.Point(mesh.SurfaceElement(faceSei[i]).PNum(3)); Vec3d normal = Cross(p2-p1,p3-p1); if (normal.Length() != 0) { normal /= (normal.Length()); } *outfile << normal.X() << " " << normal.Y() << " " << normal.Z() << "\n"; *outfile << "outer loop\n"; *outfile << "vertex " << p1.X() << " " << p1.Y() << " " << p1.Z() << "\n"; *outfile << "vertex " << p2.X() << " " << p2.Y() << " " << p2.Z() << "\n"; *outfile << "vertex " << p3.X() << " " << p3.Y() << " " << p3.Z() << "\n"; *outfile << "endloop\n"; *outfile << "endfacet\n"; } } *outfile << "endsolid Boundary_" << faceBCs.Elem(bcInd) << "\n"; } } /* * * write surface mesh as VRML file * */ void WriteVRMLFormat (const Mesh & mesh, bool faces, const string & filename) { if (faces) { // Output in VRML, IndexedFaceSet is used // Bartosz Sawicki int np = mesh.GetNP(); int nse = mesh.GetNSE(); int i, j; ofstream outfile (filename.c_str()); outfile.precision(6); outfile.setf (ios::fixed, ios::floatfield); outfile.setf (ios::showpoint); outfile << "#VRML V2.0 utf8 \n" "Background {\n" " skyColor [1 1 1]\n" " groundColor [1 1 1]\n" "}\n" "Group{ children [\n" "Shape{ \n" "appearance Appearance { material Material { }} \n" "geometry IndexedFaceSet { \n" "coord Coordinate { point [ \n"; for (i = 1; i <= np; i++) { const Point3d & p = mesh.Point(i); outfile.width(10); outfile << p.X() << " "; outfile << p.Y() << " "; outfile << p.Z() << " \n"; } outfile << " ] } \n" "coordIndex [ \n"; for (i = 1; i <= nse; i++) { const Element2d & el = mesh.SurfaceElement(i); for (j = 1; j <= 3; j++) { outfile.width(8); outfile << el.PNum(j)-1; } outfile << " -1 \n"; } outfile << " ] \n"; //define number and RGB definitions of colors outfile << "color Color { color [1 0 0, 0 1 0, 0 0 1, 1 1 0]} \n" "colorIndex [\n"; for (i = 1; i <= nse; i++) { outfile << mesh.GetFaceDescriptor(mesh.SurfaceElement(i).GetIndex ()).BCProperty(); outfile << endl; } outfile << " ] \n" "colorPerVertex FALSE \n" "creaseAngle 0 \n" "solid FALSE \n" "ccw FALSE \n" "convex TRUE \n" "} } # end of Shape\n" "] }\n"; } /* end of VRMLFACES */ else { // Output in VRML, IndexedLineSet is used // Bartosz Sawicki int np = mesh.GetNP(); int nse = mesh.GetNSE(); int i, j; ofstream outfile (filename.c_str()); outfile.precision(6); outfile.setf (ios::fixed, ios::floatfield); outfile.setf (ios::showpoint); outfile << "#VRML V2.0 utf8 \n" "Background {\n" " skyColor [1 1 1]\n" " groundColor [1 1 1]\n" "}\n" "Group{ children [\n" "Shape{ \n" "appearance Appearance { material Material { }} \n" "geometry IndexedLineSet { \n" "coord Coordinate { point [ \n"; for (i = 1; i <= np; i++) { const Point3d & p = mesh.Point(i); outfile.width(10); outfile << p.X() << " "; outfile << p.Y() << " "; outfile << p.Z() << " \n"; } outfile << " ] } \n" "coordIndex [ \n"; for (i = 1; i <= nse; i++) { const Element2d & el = mesh.SurfaceElement(i); for (j = 1; j <= 3; j++) { outfile.width(8); outfile << el.PNum(j)-1; } outfile.width(8); outfile << el.PNum(1)-1; outfile << " -1 \n"; } outfile << " ] \n"; /* Uncomment if you want color mesh outfile << "color Color { color [1 1 1, 0 1 0, 0 0 1, 1 1 0]} \n" "colorIndex [\n"; for (i = 1; i <= nse; i++) { outfile << mesh.GetFaceDescriptor(mesh.SurfaceElement(i).GetIndex ()).BCProperty(); outfile << endl; } outfile << " ] \n" */ outfile << "colorPerVertex FALSE \n" "} } #end of Shape\n" "] } \n"; } } /* * FEPP .. a finite element package developed at University Linz, Austria */ void WriteFEPPFormat (const Mesh & mesh, const NetgenGeometry & geom, const string & filename) { ofstream outfile (filename.c_str()); if (mesh.GetDimension() == 3) { // output for FEPP int np = mesh.GetNP(); int ne = mesh.GetNE(); int nse = mesh.GetNSE(); // int ns = mesh.GetNFD(); int i, j; outfile.precision(5); outfile.setf (ios::fixed, ios::floatfield); outfile.setf (ios::showpoint); outfile << "volumemesh4" << endl; outfile << nse << endl; for (i = 1; i <= nse; i++) { const Element2d & el = mesh.SurfaceElement(i); // int facenr = mesh.facedecoding.Get(el.GetIndex()).surfnr; outfile.width(4); outfile << el.GetIndex() << " "; outfile.width(4); // outfile << mesh.GetFaceDescriptor(el.GetIndex()).BCProperty() << " "; outfile << mesh.GetFaceDescriptor(el.GetIndex()).BCProperty() << " "; outfile.width(4); outfile << el.GetNP() << " "; for (j = 1; j <= el.GetNP(); j++) { outfile.width(8); outfile << el.PNum(j); } outfile << "\n"; } outfile << ne << "\n"; for (i = 1; i <= ne; i++) { const Element & el = mesh.VolumeElement(i); outfile.width(4); outfile << el.GetIndex() << " "; outfile.width(4); outfile << el.GetNP() << " "; for (j = 1; j <= el.GetNP(); j++) { outfile.width(8); outfile << el.PNum(j); } outfile << "\n"; } outfile << np << "\n"; for (i = 1; i <= np; i++) { const Point3d & p = mesh.Point(i); outfile.width(10); outfile << p.X() << " "; outfile.width(9); outfile << p.Y() << " "; outfile.width(9); outfile << p.Z() << "\n"; } /* if (typ == WRITE_FEPPML) { int nbn = mesh.mlbetweennodes.Size(); outfile << nbn << "\n"; for (i = 1; i <= nbn; i++) outfile << mesh.mlbetweennodes.Get(i).I1() << " " << mesh.mlbetweennodes.Get(i).I2() << "\n"; // int ncon = mesh.connectedtonode.Size(); // outfile << ncon << "\n"; // for (i = 1; i <= ncon; i++) // outfile << i << " " << mesh.connectedtonode.Get(i) << endl; } */ /* // write CSG surfaces if (&geom && geom.GetNSurf() >= ns) { outfile << ns << endl; for (i = 1; i <= ns; i++) geom.GetSurface(mesh.GetFaceDescriptor(i).SurfNr())->Print(outfile); } else */ outfile << "0" << endl; } else { // 2D fepp format ; /* extern SplineGeometry2d * geometry2d; if (geometry2d) Save2DMesh (mesh, &geometry2d->GetSplines(), outfile); else Save2DMesh (mesh, 0, outfile); */ } } /* * Edge element mesh format * points, elements, edges */ void WriteEdgeElementFormat (const Mesh & mesh, const NetgenGeometry & geom, const string & filename) { cout << "write edge element format" << endl; const MeshTopology * top = &mesh.GetTopology(); int npoints = mesh.GetNP(); int nelements = mesh.GetNE(); int nsurfelem = mesh.GetNSE(); int nedges = top->GetNEdges(); int i, j; int inverttets = mparam.inverttets; int invertsurf = mparam.inverttrigs; Array edges; ofstream outfile (filename.c_str()); outfile.precision(6); outfile.setf (ios::fixed, ios::floatfield); outfile.setf (ios::showpoint); // vertices with coordinates outfile << npoints << "\n"; for (i = 1; i <= npoints; i++) { const Point3d & p = mesh.Point(i); outfile.width(10); outfile << p.X() << " "; outfile.width(9); outfile << p.Y() << " "; outfile.width(9); outfile << p.Z() << "\n"; } // element - edge - list outfile << nelements << " " << nedges << "\n"; for (i = 1; i <= nelements; i++) { Element el = mesh.VolumeElement(i); if (inverttets) el.Invert(); outfile.width(4); outfile << el.GetIndex() << " "; outfile.width(8); outfile << el.GetNP(); for (j = 1; j <= el.GetNP(); j++) { outfile << " "; outfile.width(8); outfile << el.PNum(j); } top->GetElementEdges(i,edges); outfile << endl << " "; outfile.width(8); outfile << edges.Size(); for (j=1; j <= edges.Size(); j++) { outfile << " "; outfile.width(8); outfile << edges[j-1]; } outfile << "\n"; // orientation: top->GetElementEdgeOrientations(i,edges); outfile << " "; for (j=1; j <= edges.Size(); j++) { outfile << " "; outfile.width(8); outfile << edges[j-1]; } outfile << "\n"; } // surface element - edge - list (with boundary conditions) outfile << nsurfelem << "\n"; for (i = 1; i <= nsurfelem; i++) { Element2d el = mesh.SurfaceElement(i); if (invertsurf) el.Invert(); outfile.width(4); outfile << mesh.GetFaceDescriptor (el.GetIndex()).BCProperty() << " "; outfile.width(8); outfile << el.GetNP(); for (j = 1; j <= el.GetNP(); j++) { outfile << " "; outfile.width(8); outfile << el.PNum(j); } top->GetSurfaceElementEdges(i,edges); outfile << endl << " "; outfile.width(8); outfile << edges.Size(); for (j=1; j <= edges.Size(); j++) { outfile << " "; outfile.width(8); outfile << edges[j-1]; } outfile << "\n"; } int v1, v2; // edge - vertex - list outfile << nedges << "\n"; for (i=1; i <= nedges; i++) { top->GetEdgeVertices(i,v1,v2); outfile.width(4); outfile << v1; outfile << " "; outfile.width(8); outfile << v2 << endl; } } #ifdef OLDSTYLE_WRITE void WriteFile (int typ, const Mesh & mesh, const CSGeometry & geom, const char * filename, const char * geomfile, double h) { int inverttets = mparam.inverttets; int invertsurf = mparam.inverttrigs; if (typ == WRITE_EDGEELEMENT) { // write edge element file // Peter Harscher, ETHZ cout << "Write Edge-Element Format" << endl; ofstream outfile (filename); int i, j; int ned; // hash table representing edges; INDEX_2_HASHTABLE edgeht(mesh.GetNP()); // list of edges Array edgelist; // edge (point) on boundary ? BitArray bedge, bpoint(mesh.GetNP()); static int eledges[6][2] = { { 1, 2 } , { 1, 3 } , { 1, 4 }, { 2, 3 } , { 2, 4 } , { 3, 4 } }; // fill hashtable (point1, point2) ----> edgenr for (i = 1; i <= mesh.GetNE(); i++) { const Element & el = mesh.VolumeElement (i); INDEX_2 edge; for (j = 1; j <= 6; j++) { edge.I1() = el.PNum (eledges[j-1][0]); edge.I2() = el.PNum (eledges[j-1][1]); edge.Sort(); if (!edgeht.Used (edge)) { edgelist.Append (edge); edgeht.Set (edge, edgelist.Size()); } } } // set bedges, bpoints bedge.SetSize (edgelist.Size()); bedge.Clear(); bpoint.Clear(); for (i = 1; i <= mesh.GetNSE(); i++) { const Element2d & sel = mesh.SurfaceElement(i); for (j = 1; j <= 3; j++) { bpoint.Set (sel.PNum(j)); INDEX_2 edge; edge.I1() = sel.PNum(j); edge.I2() = sel.PNum(j%3+1); edge.Sort(); bedge.Set (edgeht.Get (edge)); } } outfile << mesh.GetNE() << endl; // write element ---> point for (i = 1; i <= mesh.GetNE(); i++) { const Element & el = mesh.VolumeElement(i); outfile.width(8); outfile << i; for (j = 1; j <= 4; j++) { outfile.width(8); outfile << el.PNum(j); } outfile << endl; } // write element ---> edge for (i = 1; i <= mesh.GetNE(); i++) { const Element & el = mesh.VolumeElement (i); INDEX_2 edge; for (j = 1; j <= 6; j++) { edge.I1() = el.PNum (eledges[j-1][0]); edge.I2() = el.PNum (eledges[j-1][1]); edge.Sort(); outfile.width(8); outfile << edgeht.Get (edge); } outfile << endl; } // write points outfile << mesh.GetNP() << endl; outfile.precision (6); for (i = 1; i <= mesh.GetNP(); i++) { const Point3d & p = mesh.Point(i); for (j = 1; j <= 3; j++) { outfile.width(8); outfile << p.X(j); } outfile << " " << (bpoint.Test(i) ? "1" : 0) << endl; } // write edges outfile << edgelist.Size() << endl; for (i = 1; i <= edgelist.Size(); i++) { outfile.width(8); outfile << edgelist.Get(i).I1(); outfile.width(8); outfile << edgelist.Get(i).I2(); outfile << " " << (bedge.Test(i) ? "1" : "0") << endl; } } } #endif } netgen-6.2.1804/libsrc/interface/writeOpenFOAM15x.cpp0000644000175000017500000006600013272137567020706 0ustar kurtkurt/*! \file writeOpenFOAM15x.cpp * \brief Export Netgen Mesh in the OpenFOAM 1.5+ File format * \author Philippose Rajan * \date 25 October 2009 * * This function extends the export capabilities of * Netgen to include the OpenFOAM 1.5+ File Format. * * The OpenFOAM 1.5+ mesh format consists of a set of 5 files * which together define the mesh points, faces, cells and * boundary conditions. * * The files are: * 1. points -> A list of the point co-ordinates * 2. faces -> A list of the faces with format (pnt_ind1 pnt_ind2 .... pnt_ind) * 3. owner -> The owner cell of each face * 4. neighbour -> The neighbour cell of each face * 5. boundary -> The set of boundaries with name, start face, and num. of faces * * For a detailed description of the format, refer to the following link: * http://openfoamwiki.net/index.php/Write_OpenFOAM_meshes * */ #include #include #include #include #include #include namespace netgen { #include "writeuser.hpp" extern MeshingParameters mparam; // Global arrays used to maintain the owner, neighbour and face lists // so that they are accessible across functions static Array owner_facelist; static Array owner_celllist; static Array neighbour_celllist; static Array surfelem_bclist; static Array surfelem_lists; static void WriteOpenFOAM15xBanner(ostream * outfile) { static char FOAMversion[4] = "1.5"; static char spaces[40]; memset(spaces, ' ', 40); spaces[38 - strlen(FOAMversion)] = '\0'; *outfile << "/*--------------------------------*- C++ -*----------------------------------*\\\n"; *outfile << "| ========= | |\n" "| \\\\ / F ield | OpenFOAM: The Open Source CFD Toolbox |\n" "| \\\\ / O peration | Version: " << FOAMversion << spaces << "|\n" "| \\\\ / A nd | Web: http://www.OpenFOAM.org |\n" "| \\\\/ M anipulation | |\n" "\\*---------------------------------------------------------------------------*/\n"; } static void WriteOpenFOAM15xDividerStart(ostream * outfile) { *outfile << "// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //\n"; } static void WriteOpenFOAM15xDividerEnd(ostream * outfile) { *outfile << "// ************************************************************************* //\n"; } static bool BuildOwnerNeighbourLists (const Mesh & mesh) { // Clear all the arrays owner_facelist.DeleteAll(); owner_celllist.DeleteAll(); neighbour_celllist.DeleteAll(); surfelem_bclist.DeleteAll(); surfelem_lists.DeleteAll(); const MeshTopology& meshtopo = mesh.GetTopology(); // Update the mesh topology structures const_cast (meshtopo).SetBuildEdges(true); const_cast (meshtopo).SetBuildFaces(true); const_cast (meshtopo).Update(); // Extract important mesh metrics int ne = mesh.GetNE(); int nse = mesh.GetNSE(); int totfaces = meshtopo.GetNFaces(); // Preset the size of the arrays to speed up future operations // Number of internal faces = total faces - num. of surface faces owner_facelist.SetSize(totfaces - nse); owner_celllist.SetSize(totfaces - nse); neighbour_celllist.SetSize(totfaces - nse); surfelem_bclist.SetSize(nse); surfelem_lists.SetSize(nse); // Initialise arrays to zero if required neighbour_celllist = 0; // Array used to keep track of Faces which have already been // processed and added to the Owner list... In addition, also the // location where the face appears in the Owner list is also stored // to speed up creation of the Neighbour list Array ownerfaces(totfaces); ownerfaces = 0; // Array to hold the set of local faces of each volume element // while running through the set of volume elements // NOTE: The size is set automatically by the Netgen topology function Array locfaces; // Secondary indices used to independently advance the owner // and boundary condition arrays within the main loop int owner_ind = 1; int bc_ind = 1; // Loop through all the volume elements for(int elind = 1; elind <= ne; elind++) { // Extract the current volume element // const Element & el = mesh.VolumeElement(elind); // Get the face numbers of the faces of the current volume element // The values returned are given a sign depending on the orientation // of the faces. This is used while writing the faces file, to // determine whether or not to invert the face triangle before writing // it to file meshtopo.GetElementFaces(elind,locfaces,true); // Loop through the faces for(int i = 1; i <= locfaces.Size(); i++) { // The absolute value of a face number (because the faces // returned by the GetElementFaces function prepend it // with a sign depending on the face orientation) int absfacenr = abs(locfaces.Elem(i)); // If the face already exists in the owner list, add // the current cell into the neighbour list, in the // same location where the face appears in the owner list int owner_face = ownerfaces.Elem(absfacenr); if(owner_face) { neighbour_celllist.Elem(owner_face) = elind; // From this point on, the code within this "if" block // basically sorts the order of the Neighbour cells (along // with the faces list) in ascending order. // The approach used is..... to traverse the owner and neighbour cell lists // up and down, and sort the neighbour cells of a given owner cell // as the list evolves. // NOTE: A value of "zero" in the neighbour list implies that // the neighbour has not been found yet, so the "zero" locations need // to be skipped while sorting in ascending order int curr_owner = owner_celllist.Elem(owner_face); int peek_loc = owner_face - 1; int new_loc = owner_face; // Traversing upwards in the list while((owner_celllist.Elem(peek_loc) == curr_owner) && (peek_loc >= 1)) { if((neighbour_celllist.Elem(peek_loc) != 0) && (neighbour_celllist.Elem(new_loc) < neighbour_celllist.Elem(peek_loc))) { Swap(neighbour_celllist.Elem(new_loc),neighbour_celllist.Elem(peek_loc)); Swap(owner_facelist.Elem(new_loc),owner_facelist.Elem(peek_loc)); new_loc = peek_loc; } peek_loc--; } peek_loc = owner_face + 1; // Traversing downwards in the list while((owner_celllist.Elem(peek_loc) == curr_owner) && (peek_loc <= owner_ind)) { if((neighbour_celllist.Elem(peek_loc) != 0) && (neighbour_celllist.Elem(new_loc) > neighbour_celllist.Elem(peek_loc))) { Swap(neighbour_celllist.Elem(new_loc),neighbour_celllist.Elem(peek_loc)); Swap(owner_facelist.Elem(new_loc),owner_facelist.Elem(peek_loc)); new_loc = peek_loc; } peek_loc++; } continue; } // Check if the face is a surface element (boundary face) // if not, add the current volume element and the corresponding face into // the owner list int surfelem = meshtopo.GetFace2SurfaceElement(absfacenr); if(!surfelem) { // If it is a new face which has not been listed before, // add the current cell into the owner list, and save // the index location to be used later by the neighbour list owner_celllist.Elem(owner_ind) = elind; owner_facelist.Elem(owner_ind) = locfaces.Elem(i); // Update the array to indicate that the face is already processed ownerfaces.Elem(absfacenr) = owner_ind; owner_ind++; } // If the face is a boundary face, extract the boundary condition number of the // face, and append that along with the face number and the current cell // into the various surface elements lists else { Element2d sel = mesh.SurfaceElement(surfelem); surfelem_bclist.Elem(bc_ind) = mesh.GetFaceDescriptor(sel.GetIndex()).BCProperty(); surfelem_lists.Elem(bc_ind) = INDEX_2(locfaces.Elem(i),elind); bc_ind++; } } } // This correction is required in cases where the mesh has been "uniform refined".... for // some reason, the number of faces reported by Netgen is higher than the actual number // of faces in the mesh owner_facelist.SetSize(owner_ind-1); owner_celllist.SetSize(owner_ind-1); neighbour_celllist.SetSize(owner_ind-1); // Sort the list of surface elements in ascending order of boundary condition number // also sort the cell list in the same manner QuickSort(surfelem_bclist,surfelem_lists); /* // Debugging output to a file ofstream dbg("OpenFOAMDebug.log"); dbg << " ------- Boundary List -------- \n"; for(int i = 1; i <= surfelem_bclist.Size(); i++) { dbg << "bc = " << surfelem_bclist.Elem(i) << " : face = " << surfelem_lists.Elem(i).I1() << " : cell = " << surfelem_lists.Elem(i).I2() << "\n"; } dbg << "\n ------- Owner / Face / Neighbour List ------- \n"; for(int i = 1; i <= owner_celllist.Size(); i++) { dbg << "Ind:" << i << " :: (" << owner_celllist.Elem(i) << " " << owner_facelist.Elem(i) << " " << neighbour_celllist.Elem(i) << ")\n"; } dbg.close(); */ return(false); } static void WriteNeighbourFile (ostream * outfile) { // Write the OpenFOAM standard banner and dividers, etc... WriteOpenFOAM15xBanner(outfile); *outfile << "FoamFile \n" << "{ \n" << " version 2.0; \n" << " format ascii; \n" << " class labelList; \n" << " note \"Mesh generated and converted using NETGEN-" << PACKAGE_VERSION << "\"; \n" << " location \"constant\\polyMesh\"; \n" << " object neighbour; \n" << "} \n"; WriteOpenFOAM15xDividerStart(outfile); *outfile << "\n\n"; int nneighbours = neighbour_celllist.Size(); *outfile << nneighbours << "\n"; *outfile << "(\n"; // Write the neighbour cells to file for(int i = 1; i <= neighbour_celllist.Size(); i++) { *outfile << neighbour_celllist.Elem(i) - 1 << "\n"; } *outfile << ")\n\n"; WriteOpenFOAM15xDividerEnd(outfile); } static void WriteOwnerFile (ostream * outfile) { // Write the OpenFOAM standard banner and dividers, etc... WriteOpenFOAM15xBanner(outfile); *outfile << "FoamFile \n" << "{ \n" << " version 2.0; \n" << " format ascii; \n" << " class labelList; \n" << " note \"Mesh generated and converted using NETGEN-" << PACKAGE_VERSION << "\"; \n" << " location \"constant\\polyMesh\"; \n" << " object owner; \n" << "} \n"; WriteOpenFOAM15xDividerStart(outfile); *outfile << "\n\n"; int nowners = owner_celllist.Size() + surfelem_lists.Size(); *outfile << nowners << "\n"; *outfile << "(\n"; // Write the owners of the internal cells to file for(int i = 1; i <= owner_celllist.Size(); i++) { *outfile << owner_celllist.Elem(i) - 1 << "\n"; } // Write the owners of the boundary cells to file // (Written in order of ascending boundary condition numbers) for(int i = 1; i <= surfelem_lists.Size(); i++) { *outfile << surfelem_lists.Elem(i).I2() - 1 << "\n"; } *outfile << ")\n\n"; WriteOpenFOAM15xDividerEnd(outfile); } static void WriteFacesFile (ostream * outfile, const Mesh & mesh) { const MeshTopology& meshtopo = mesh.GetTopology(); // Write the OpenFOAM standard banner and dividers, etc... WriteOpenFOAM15xBanner(outfile); *outfile << "FoamFile \n" << "{ \n" << " version 2.0; \n" << " format ascii; \n" << " class faceList; \n" << " note \"Mesh generated and converted using NETGEN-" << PACKAGE_VERSION << "\"; \n" << " location \"constant\\polyMesh\"; \n" << " object faces; \n" << "} \n"; WriteOpenFOAM15xDividerStart(outfile); *outfile << "\n\n"; int nfaces = owner_facelist.Size() + surfelem_lists.Size(); *outfile << nfaces << "\n"; *outfile << "(\n"; // Array to hold the indices of the points of each face to // flip if required Array facepnts; // Write the faces in the order specified in the owners lists of the // internal cells and the boundary cells for(int i = 1; i <= owner_facelist.Size(); i++) { int face_w_orientation = owner_facelist.Elem(i); int facenr = abs(face_w_orientation); meshtopo.GetFaceVertices(facenr,facepnts); // Get the orientation of the face, and invert it if required // Since the faces already have the orientation "embedded" into // them by means of the prepended sign, only this needs to be // checked for... if(face_w_orientation > 0) { int tmppnts = 0; if(facepnts.Size() == 4) { tmppnts = facepnts.Elem(1); facepnts.Elem(1) = facepnts.Elem(2); facepnts.Elem(2) = tmppnts; tmppnts = facepnts.Elem(3); facepnts.Elem(3) = facepnts.Elem(4); facepnts.Elem(4) = tmppnts; } else if(facepnts.Size() == 3) { tmppnts = facepnts.Elem(1); facepnts.Elem(1) = facepnts.Elem(3); facepnts.Elem(3) = tmppnts; } } *outfile << facepnts.Size(); *outfile << "("; for(int j = 1; j <= facepnts.Size(); j++) { *outfile << facepnts.Elem(j)-1; if(j != facepnts.Size()) *outfile << " "; } *outfile << ")\n"; } // Now append the faces of the surface elements (written in // ascending order of boundary condition number) also into // the faces file for(int i = 1; i <= surfelem_lists.Size(); i++) { int face_w_orientation = surfelem_lists.Elem(i).I1(); int facenr = abs(face_w_orientation); meshtopo.GetFaceVertices(facenr,facepnts); // Get the orientation of the face, and invert it if required if(face_w_orientation > 0) { int tmppnts = 0; if(facepnts.Size() == 4) { tmppnts = facepnts.Elem(1); facepnts.Elem(1) = facepnts.Elem(2); facepnts.Elem(2) = tmppnts; tmppnts = facepnts.Elem(3); facepnts.Elem(3) = facepnts.Elem(4); facepnts.Elem(4) = tmppnts; } else if(facepnts.Size() == 3) { tmppnts = facepnts.Elem(1); facepnts.Elem(1) = facepnts.Elem(3); facepnts.Elem(3) = tmppnts; } } *outfile << facepnts.Size(); *outfile << "("; for(int j = 1; j <= facepnts.Size(); j++) { *outfile << facepnts.Elem(j)-1; if(j != facepnts.Size()) *outfile << " "; } *outfile << ")\n"; } *outfile << ")\n\n"; WriteOpenFOAM15xDividerEnd(outfile); } static void WritePointsFile (ostream * outfile, const Mesh & mesh) { int np = mesh.GetNP(); // Write the OpenFOAM standard banner and dividers, etc... WriteOpenFOAM15xBanner(outfile); *outfile << "FoamFile \n" << "{ \n" << " version 2.0; \n" << " format ascii; \n" << " class vectorField; \n" << " note \"Mesh generated and converted using NETGEN-" << PACKAGE_VERSION << "\"; \n" << " location \"constant\\polyMesh\"; \n" << " object points; \n" << "} \n"; WriteOpenFOAM15xDividerStart(outfile); *outfile << "\n\n"; // Number of points in the following list *outfile << np << "\n"; outfile->precision(6); outfile->setf (ios::fixed, ios::floatfield); outfile->setf (ios::showpoint); // Coordinate list starts here *outfile << "(\n"; for(int i = 1; i <= np; i++) { const Point3d & p = mesh.Point(i); // Write coordinates to file *outfile << "("; *outfile << p.X() << " "; *outfile << p.Y() << " "; *outfile << p.Z(); *outfile << ")\n"; } *outfile << ")\n\n"; WriteOpenFOAM15xDividerEnd(outfile); } static void WriteBoundaryFile (ostream * outfile) { // Write the OpenFOAM standard banner and dividers, etc... WriteOpenFOAM15xBanner(outfile); *outfile << "FoamFile \n" << "{ \n" << " version 2.0; \n" << " format ascii; \n" << " class polyBoundaryMesh; \n" << " note \"Mesh generated and converted using NETGEN-" << PACKAGE_VERSION << "\"; \n" << " location \"constant\\polyMesh\"; \n" << " object boundary; \n" << "} \n"; WriteOpenFOAM15xDividerStart(outfile); *outfile << "\n"; Array bcarray; int ind = 1; // Since the boundary conditions are already sorted in ascending // order, the last element will give the maximum number of possible // boundary condition entries int bcmax = surfelem_bclist.Elem(surfelem_bclist.Size()); bcarray.SetSize(bcmax+1); bcarray.Elem(ind) = INDEX_3(surfelem_bclist.Elem(1),1,0); for(int i = 2; i <= surfelem_bclist.Size(); i++) { if(surfelem_bclist.Elem(i) == bcarray.Elem(ind).I1()) { bcarray.Elem(ind).I2() = bcarray.Elem(ind).I2()+1; } else { ind++; bcarray.Elem(ind) = INDEX_3(surfelem_bclist.Elem(i),1,i-1); } } bcarray.SetSize(ind); *outfile << bcarray.Size() << "\n"; *outfile << "(\n"; int startface = 0; for(int i = 1; i <= bcarray.Size(); i++) { startface = owner_celllist.Size() + bcarray.Elem(i).I3(); *outfile << " patch" << bcarray.Elem(i).I1() << "\n" << " {\n" << " type patch;\n" << " physicalType patch;\n" << " nFaces " << bcarray.Elem(i).I2() << ";\n" << " startFace " << startface << ";\n" << " }\n"; } *outfile << ")\n\n"; WriteOpenFOAM15xDividerEnd(outfile); } void WriteOpenFOAM15xFormat (const Mesh & mesh, const string & casename, const bool compressed) { bool error = false; char casefiles[256]; // Make sure that the mesh data has been updated const_cast (mesh).Compress(); const_cast (mesh).CalcSurfacesOfNode(); const_cast (mesh).RebuildSurfaceElementLists(); const_cast (mesh).BuildElementSearchTree(); int np = mesh.GetNP(); int nse = mesh.GetNSE(); int ne = mesh.GetNE(); cout << "Write OpenFOAM 1.5+ Mesh Files....\n"; // Abort if there are no points, surface elements or volume elements if((np <= 0) || (ne <= 0) || (nse <= 0)) { cout << "Export Error: Invalid mesh.... Aborting!\n"; return; } // OpenFOAM only supports linear meshes! if(mparam.secondorder || mesh.GetCurvedElements().IsHighOrder()) { cout << "Export Error: OpenFOAM 1.5+ does not support non-linear elements.... Aborting!\n"; return; } if(( (mesh.SurfaceElement(nse/2).GetType() != TRIG) && (mesh.SurfaceElement(nse/2).GetType() != QUAD) ) || (mesh.VolumeElement(ne/2).GetType() == TET10) || (mesh.VolumeElement(ne/2).GetType() == PRISM12)) { cout << "Export Error: OpenFOAM 1.5+ does not support non-linear elements.... Aborting!\n"; return; } cout << "Writing OpenFOAM 1.5+ Mesh files to case: " << casename << "\n"; // Create the case directory if it does not already exist // NOTE: This needs to be improved for the Linux variant....!!! #ifdef WIN32 char casedir[256]; sprintf(casedir, "mkdir %s\\constant\\polyMesh", casename.c_str()); system(casedir); #else char casedir[256]; mkdir(casename.c_str(), S_IRWXU|S_IRWXG); sprintf(casedir, "%s/constant", casename.c_str()); mkdir(casedir, S_IRWXU|S_IRWXG); sprintf(casedir, "%s/constant/polyMesh", casename.c_str()); mkdir(casedir, S_IRWXU|S_IRWXG); #endif // Open handles to the five required mesh files // points // faces // owner // neighbour // boundary ostream *outfile_pnts; ostream *outfile_faces; ostream *outfile_own; ostream *outfile_nei; ostream *outfile_bnd; if(compressed) { sprintf(casefiles, "%s/constant/polyMesh/points.gz", casename.c_str()); outfile_pnts = new ogzstream(casefiles); } else { sprintf(casefiles, "%s/constant/polyMesh/points", casename.c_str()); outfile_pnts = new ofstream(casefiles); } if(compressed) { sprintf(casefiles, "%s/constant/polyMesh/faces.gz", casename.c_str()); outfile_faces = new ogzstream(casefiles); } else { sprintf(casefiles, "%s/constant/polyMesh/faces", casename.c_str()); outfile_faces = new ofstream(casefiles); } if(compressed) { sprintf(casefiles, "%s/constant/polyMesh/owner.gz", casename.c_str()); outfile_own = new ogzstream(casefiles); } else { sprintf(casefiles, "%s/constant/polyMesh/owner", casename.c_str()); outfile_own = new ofstream(casefiles); } if(compressed) { sprintf(casefiles, "%s/constant/polyMesh/neighbour.gz", casename.c_str()); outfile_nei = new ogzstream(casefiles); } else { sprintf(casefiles, "%s/constant/polyMesh/neighbour", casename.c_str()); outfile_nei = new ofstream(casefiles); } // Note... the boundary file is not compressed sprintf(casefiles, "%s/constant/polyMesh/boundary", casename.c_str()); outfile_bnd = new ofstream(casefiles); ResetTime(); // Build the owner, neighbour, faces and boundary lists // from the Netgen mesh cout << "\nBuilding Owner, Neighbour and Face Lists: "; error = BuildOwnerNeighbourLists(mesh); cout << "Done! (Time Elapsed = " << GetTime() << " sec)\n"; // Write the "owner" file if(outfile_own->good() && !error) { cout << "Writing the owner file: "; WriteOwnerFile(outfile_own); delete outfile_own; cout << "Done! (Time Elapsed = " << GetTime() << " sec)\n"; } else { cout << "Export Error: Error creating file: owner.... Aborting\n"; error = true; } // Write the "neighbour" file if(outfile_nei->good() && !error) { cout << "Writing the neighbour file: "; WriteNeighbourFile(outfile_nei); delete outfile_nei; cout << "Done! (Time Elapsed = " << GetTime() << " sec)\n"; } else { cout << "Export Error: Error creating file: neighbour.... Aborting\n"; error = true; } // Write the "faces" file if(outfile_faces->good() && !error) { cout << "Writing the faces file: "; WriteFacesFile(outfile_faces, mesh); delete outfile_faces; cout << "Done! (Time Elapsed = " << GetTime() << " sec)\n"; } else { cout << "Export Error: Error creating file: faces.... Aborting\n"; error = true; } // Write the "points" file if(outfile_pnts->good() && !error) { cout << "Writing the points file: "; WritePointsFile(outfile_pnts,mesh); delete outfile_pnts; cout << "Done! (Time Elapsed = " << GetTime() << " sec)\n"; } else { cout << "Export Error: Error creating file: points.... Aborting\n"; error = true; } // Write the "boundary" file if(outfile_bnd->good() && !error) { cout << "Writing the boundary file: "; WriteBoundaryFile(outfile_bnd); delete outfile_bnd; cout << "Done! (Time Elapsed = " << GetTime() << " sec)\n"; } else { cout << "Export Error: Error creating file: boundary.... Aborting\n"; error = true; } if(!error) { cout << "OpenFOAM 1.5+ Export successfully completed (Time elapsed = " << GetTime() << " sec) !\n"; } else { cout << "Error in OpenFOAM 1.5+ Export.... Aborted!\n"; } } } netgen-6.2.1804/libsrc/interface/writepermas.cpp0000644000175000017500000001544413272137567020301 0ustar kurtkurt// // Write Permas file // for Intes GmbH, Stuttgart // #include #include #include #include #include #include using namespace std; #include "writeuser.hpp" namespace netgen { // Forward declarations (don't know, where to define them, sorry) int addComponent(string &strComp, string &strSitu, ofstream &out); // This should be the new function to export a PERMAS file void WritePermasFormat (const Mesh &mesh, const string &filename, string &strComp, string &strSitu) { ofstream outfile (filename.c_str()); addComponent(strComp, strSitu, outfile); WritePermasFormat ( mesh, filename); } void WritePermasFormat (const Mesh &mesh, const string &filename) { string strComp, strSitu; ofstream outfile (filename.c_str()); outfile.precision(8); strSitu = strComp = ""; if (addComponent(strComp, strSitu, outfile) == 1) { printf("Error while exporting PERMAS dat!\n"); return; } int np = mesh.GetNP(); int ne = mesh.GetNE(); int nse = mesh.GetNSE(); int i, j, k; if (ne == 0) { // pure surface mesh cout << "\nWrite Permas Surface Mesh" << endl; int elnr = 0; for (j = 1; j <= 2; j++) { int nelp(0); switch (j) { case 1: nelp = 3; outfile << "$ELEMENT TYPE = TRIA3 ESET = ALLQUAD" << endl; break; case 2: nelp = 4; outfile << "$ELEMENT TYPE = QUAD4 ESET = ALLQUAD" << endl; break; } for (i = 1; i <= nse; i++) { const Element2d & el = mesh.SurfaceElement(i); if (el.GetNP() != nelp) continue; elnr++; outfile << elnr << " "; for (k = 1; k <= nelp; k++) outfile << " " << el.PNum(k); outfile << endl; } } } else { cout << "\nWrite Permas Volume Mesh" << endl; int secondorder = (mesh.VolumeElement(1).GetNP() == 10); if (!secondorder) { outfile << "$ELEMENT TYPE = TET4 ESET = ALLTET" << endl; for (i = 1; i <= ne; i++) { const Element & el = mesh.VolumeElement(i); outfile << i << " " << el.PNum(1) << " " << el.PNum(2) << " " << el.PNum(3) << " " << el.PNum(4) << endl; } } else { outfile << "$ELEMENT TYPE = TET10 ESET = ALLTET" << endl; for (i = 1; i <= ne; i++) { const Element & el = mesh.VolumeElement(i); outfile << i << " " << el.PNum(1) << " " << el.PNum(5) << " " << el.PNum(2) << " " << el.PNum(8) << " " << el.PNum(3) << " " << el.PNum(6) << endl << "& " << " " << el.PNum(7) << " " << el.PNum(9) << " " << el.PNum(10) << " " << el.PNum(4) << endl; } } outfile << endl << endl; outfile << "$SURFACE GEO SURFID = 1 SFSET = ALLSUR" << endl; for (i = 1; i <= nse; i++) { const Element2d & el = mesh.SurfaceElement(i); if (el.GetNP() == 3) outfile << "STRIA3" << " " << el.PNum(1) << " " << el.PNum(2) << " " << el.PNum(3) << endl; } for (i = 1; i <= nse; i++) { const Element2d & el = mesh.SurfaceElement(i); if (el.GetNP() == 4) outfile << "SQUAD4" << " " << el.PNum(1) << " " << el.PNum(2) << " " << el.PNum(3) << " " << el.PNum(4) << endl; } for (i = 1; i <= nse; i++) { const Element2d & el = mesh.SurfaceElement(i); if (el.GetNP() == 6) outfile << "STRIA6" << " " << el.PNum(1) << " " << el.PNum(4) << " " << el.PNum(2) << " " << el.PNum(5) << " " << el.PNum(3) << " " << el.PNum(6) << endl; } } outfile << endl << endl; outfile << "$COOR NSET = ALLNODES" << endl; outfile.precision(6); outfile.setf (ios::fixed, ios::floatfield); outfile.setf (ios::showpoint); for (i = 1; i <= np; i++) { outfile << i << " "; outfile << mesh.Point(i)(0) << " "; outfile << mesh.Point(i)(1) << " "; outfile << mesh.Point(i)(2) << "\n"; } } ////////////////////////////////////////////////////////////////////////////////// // \brief Writes PERMAS configuration header into export file // Returns >0 in case of errors // \par string &strComp : Reference to component description // \par string &strComp : Reference to situation description ////////////////////////////////////////////////////////////////////////////////// int addComponent(string &strComp, string &strSitu, ofstream &out) { if (strComp.size() > 12 || strSitu > 12) return 1; if (0 == strComp.size()) strComp = "KOMPO1"; if (0 == strSitu.size()) strSitu = "SIT1"; // Writing description header of configuration out << "$ENTER COMPONENT NAME = " << strComp << " DOFTYPE = DISP MATH" << endl << endl; out << " $SITUATION NAME = " << strSitu << endl; out << " $END SITUATION" << endl << endl; out << " $STRUCTURE" << endl; return 0; } } netgen-6.2.1804/libsrc/interface/wuchemnitz.cpp0000644000175000017500000001717113272137567020133 0ustar kurtkurt// Write Chemnitz file format #include #include #include #include #include namespace netgen { class POINT3D { public: POINT3D () { }; double x, y, z; }; class VOLELEMENT { public: int domnr, p1, p2, p3, p4; int faces[4]; VOLELEMENT () { for (int i = 0; i < 4; i++) faces[i] = 0; } }; class SURFELEMENT { public: SURFELEMENT () { }; int snr, p1, p2, p3; }; class FACE { public: int p1, p2, p3; int edges[3]; FACE () { for (int i = 0; i < 3; i++) edges[i] = 0; } }; class EDGE { public: EDGE () { }; int p1, p2; }; static Array points; static Array volelements; static Array surfelements; static Array faces; static Array edges; void ReadFile (char * filename) { int i, n; ifstream infile(filename); char reco[100]; infile >> reco; // file format recognition infile >> n; // number of surface elements cout << n << " Surface elements" << endl; for (i = 1; i <= n; i++) { SURFELEMENT sel; infile >> sel.snr >> sel.p1 >> sel.p2 >> sel.p3; surfelements.Append (sel); } infile >> n; // number of volume elements cout << n << " Volume elements" << endl; for (i = 1; i <= n; i++) { VOLELEMENT el; infile >> el.p1 >> el.p2 >> el.p3 >> el.p4; volelements.Append (el); } infile >> n; // number of points cout << n << " Points" << endl; for (i = 1; i <= n; i++) { POINT3D p; infile >> p.x >> p.y >> p.z; points.Append (p); } } void ReadFileMesh (const Mesh & mesh) { int i, n; n = mesh.GetNSE(); // number of surface elements cout << n << " Surface elements" << endl; for (i = 1; i <= n; i++) { SURFELEMENT sel; const Element2d & el = mesh.SurfaceElement(i); sel.snr = el.GetIndex(); sel.p1 = el.PNum(1); sel.p2 = el.PNum(2); sel.p3 = el.PNum(3); surfelements.Append (sel); } n = mesh.GetNE(); // number of volume elements cout << n << " Volume elements" << endl; for (i = 1; i <= n; i++) { VOLELEMENT el; const Element & nel = mesh.VolumeElement(i); el.p1 = nel.PNum(1); el.p2 = nel.PNum(2); el.p3 = nel.PNum(3); el.p4 = nel.PNum(4); // infile >> el.p1 >> el.p2 >> el.p3 >> el.p4; volelements.Append (el); } n = mesh.GetNP(); // number of points cout << n << " Points" << endl; for (i = 1; i <= n; i++) { POINT3D p; Point3d mp = mesh.Point(i); p.x = mp.X(); p.y = mp.Y(); p.z = mp.Z(); // infile >> p.x >> p.y >> p.z; points.Append (p); } } void Convert () { int i, j, facei, edgei; INDEX_3 i3; INDEX_2 i2; INDEX_3_HASHTABLE faceindex(volelements.Size()/5 + 1); INDEX_2_HASHTABLE edgeindex(volelements.Size()/5 + 1); for (i = 1; i <= volelements.Size(); i++) { for (j = 1; j <= 4; j++) { switch (j) { case 1: i3.I1() = volelements.Get(i).p2; i3.I2() = volelements.Get(i).p3; i3.I3() = volelements.Get(i).p4; break; case 2: i3.I1() = volelements.Get(i).p1; i3.I2() = volelements.Get(i).p3; i3.I3() = volelements.Get(i).p4; break; case 3: i3.I1() = volelements.Get(i).p1; i3.I2() = volelements.Get(i).p2; i3.I3() = volelements.Get(i).p4; break; case 4: i3.I1() = volelements.Get(i).p1; i3.I2() = volelements.Get(i).p2; i3.I3() = volelements.Get(i).p3; break; default: i3.I1()=i3.I2()=i3.I3()=0; } i3.Sort(); if (faceindex.Used (i3)) facei = faceindex.Get(i3); else { FACE fa; fa.p1 = i3.I1(); fa.p2 = i3.I2(); fa.p3 = i3.I3(); faces.Append (fa); facei = faces.Size(); faceindex.Set (i3, facei); } volelements.Elem(i).faces[j-1] = facei; } } for (i = 1; i <= faces.Size(); i++) { for (j = 1; j <= 3; j++) { switch (j) { case 1: i2.I1() = faces.Get(i).p2; i2.I2() = faces.Get(i).p3; break; case 2: i2.I1() = faces.Get(i).p1; i2.I2() = faces.Get(i).p3; break; case 3: i2.I1() = faces.Get(i).p1; i2.I2() = faces.Get(i).p2; break; default: i2.I1()=i2.I2()=0; } if (i2.I1() > i2.I2()) swap (i2.I1(), i2.I2()); if (edgeindex.Used (i2)) edgei = edgeindex.Get(i2); else { EDGE ed; ed.p1 = i2.I1(); ed.p2 = i2.I2(); edges.Append (ed); edgei = edges.Size(); edgeindex.Set (i2, edgei); } faces.Elem(i).edges[j-1] = edgei; } } } void WriteFile (ostream & outfile) { int i; outfile << "#VERSION: 1.0" << endl << "#PROGRAM: NETGEN" << endl << "#EQN_TYPE: POISSON" << endl << "#DIMENSION: 3D" << endl << "#DEG_OF_FREE: 1" << endl << "#DESCRIPTION: I don't know" << endl << "##RENUM: not done" << endl << "#USER: Kleinzen" << endl << "DATE: 10.06.1996" << endl; outfile << "#HEADER: 8" << endl << points.Size() << " " << edges.Size() << " " << faces.Size() << " " << volelements.Size() << " 0 0 0 0" << endl; outfile << "#VERTEX: " << points.Size() << endl; for (i = 1; i <= points.Size(); i++) outfile << " " << i << " " << points.Get(i).x << " " << points.Get(i).y << " " << points.Get(i).z << endl; outfile << "#EDGE: " << edges.Size() << endl; for (i = 1; i <= edges.Size(); i++) outfile << " " << i << " 1 " << edges.Get(i).p1 << " " << edges.Get(i).p2 << " 0" << endl; outfile << "#FACE: " << faces.Size() << endl; for (i = 1; i <= faces.Size(); i++) outfile << " " << i << " 1 3 " << faces.Get(i).edges[0] << " " << faces.Get(i).edges[1] << " " << faces.Get(i).edges[2] << endl; outfile << "#SOLID: " << volelements.Size() << endl; for (i = 1; i <= volelements.Size(); i++) outfile << " " << i << " 1 4 " << volelements.Get(i).faces[0] << " " << volelements.Get(i).faces[1] << " " << volelements.Get(i).faces[2] << " " << volelements.Get(i).faces[3] << endl; outfile << "#END_OF_DATA" << endl; } void WriteUserChemnitz (const Mesh & mesh, const string & filename) { ofstream outfile (filename.c_str()); ReadFileMesh (mesh); Convert (); WriteFile (outfile); cout << "Wrote Chemnitz standard file" << endl; } } netgen-6.2.1804/libsrc/interface/writedolfin.cpp0000644000175000017500000000344513272137567020263 0ustar kurtkurt// // Write dolfin file // // by // Kent-Andre Mardal #include #include #include #include #include namespace netgen { #include "writeuser.hpp" void WriteDolfinFormat (const Mesh & mesh, const string & filename) { cout << "start writing dolfin export" << endl; int np = mesh.GetNP(); int ne = mesh.GetNE(); // int nse = mesh.GetNSE(); int nsd = mesh.GetDimension(); // int invertsurf = mparam.inverttrigs; // int i, j; ofstream outfile (filename.c_str()); // char str[100]; outfile.precision(8); outfile.setf (ios::fixed, ios::floatfield); outfile.setf (ios::showpoint); if ( nsd == 3) { outfile << "" <"<" <"<"<"<"<"<"<"<"< & names, Array & extensions); extern bool DLL_HEADER WriteUserFormat (const string & format, const Mesh & mesh, // const NetgenGeometry & geom, const string & filename); } #endif netgen-6.2.1804/libsrc/interface/writetochnog.cpp0000644000175000017500000000420713272137567020446 0ustar kurtkurt// // Write Tochnog file // // by // // Andreas Seltmann // email: A.Seltmann@lsw.uni-heidelberg.de // #include #include #include #include #include namespace netgen { #include "writeuser.hpp" void WriteTochnogFormat (const Mesh & mesh, const string & filename) { cout << "\nWrite Tochnog Volume Mesh" << endl; ofstream outfile (filename.c_str()); outfile << "(Nodes and Elements generated with NETGEN" << endl; outfile << " " << filename << ")" << endl; outfile.precision(8); outfile << "(Nodes)" << endl; int np = mesh.GetNP(); int ne = mesh.GetNE(); int i, j; for (i = 1; i <= np; i++) { outfile << "node " << " " << i << " "; outfile << mesh.Point(i)(0) << " "; outfile << mesh.Point(i)(1) << " "; outfile << mesh.Point(i)(2) << "\n"; } int elemcnt = 0; //element counter int finished = 0; int indcnt = 1; //index counter while (!finished) { int actcnt = 0; const Element & el1 = mesh.VolumeElement(1); int non = el1.GetNP(); if (non == 4) { outfile << "(Elements, type=-tet4)" << endl; } else { cout << "unsupported Element type!!!" << endl; } for (i = 1; i <= ne; i++) { const Element & el = mesh.VolumeElement(i); if (el.GetIndex() == indcnt) { actcnt++; if (el.GetNP() != non) { cout << "different element-types in a subdomain are not possible!!!" << endl; continue; } elemcnt++; outfile << "element " << elemcnt << " -tet4 "; if (non == 4) { outfile << el.PNum(1) << " "; outfile << el.PNum(2) << " "; outfile << el.PNum(4) << " "; outfile << el.PNum(3) << "\n"; } else { cout << "unsupported Element type!!!" << endl; for (j = 1; j <= el.GetNP(); j++) { outfile << el.PNum(j); if (j != el.GetNP()) outfile << ", "; } outfile << "\n"; } } } indcnt++; if (elemcnt == ne) {finished = 1; cout << "all elements found by Index!" << endl;} if (actcnt == 0) {finished = 1;} } cout << "done" << endl; } } netgen-6.2.1804/libsrc/interface/writegmsh2.cpp0000644000175000017500000002056613272137567020033 0ustar kurtkurt/*! \file writegmsh2.cpp * \brief Export Netgen Mesh in the GMSH v2.xx File format * \author Philippose Rajan * \date 02 November 2008 * * This function extends the export capabilities of * Netgen to include the GMSH v2.xx File Format. * * Current features of this function include: * * 1. Exports Triangles, Quadrangles and Tetrahedra \n * 2. Supports upto second order elements of each type * */ #include #include #include #include #include namespace netgen { #include "writeuser.hpp" extern MeshingParameters mparam; // Mapping of entities from Netgen definitions to GMSH definitions enum GMSH_ELEMENTS {GMSH_TRIG = 2, GMSH_TRIG6 = 9, GMSH_QUAD = 3, GMSH_QUAD8 = 16, GMSH_TET = 4, GMSH_TET10 = 11}; const int triGmsh[7] = {0,1,2,3,6,4,5}; const int quadGmsh[9] = {0,1,2,3,4,5,8,6,7}; const int tetGmsh[11] = {0,1,2,3,4,5,8,6,7,10,9}; /*! GMSH v2.xx mesh format export function * * This function extends the export capabilities of * Netgen to include the GMSH v2.xx File Format. * * Current features of this function include: * * 1. Exports Triangles, Quadrangles and Tetrahedra \n * 2. Supports upto second order elements of each type * */ void WriteGmsh2Format (const Mesh & mesh, const NetgenGeometry & geom, const string & filename) { ofstream outfile (filename.c_str()); outfile.precision(6); outfile.setf (ios::fixed, ios::floatfield); outfile.setf (ios::showpoint); int np = mesh.GetNP(); /// number of points in mesh int ne = mesh.GetNE(); /// number of 3D elements in mesh int nse = mesh.GetNSE(); /// number of surface elements (BC) int i, j, k, l; /* * 3D section : Volume elements (currently only tetrahedra) */ if ((ne > 0) && (mesh.VolumeElement(1).GetNP() <= 10) && (mesh.SurfaceElement(1).GetNP() <= 6)) { cout << "Write GMSH v2.xx Format \n"; cout << "The GMSH v2.xx export is currently available for elements upto 2nd Order\n" << endl; int inverttets = mparam.inverttets; int invertsurf = mparam.inverttrigs; /// Prepare GMSH 2.0 file (See GMSH 2.0 Documentation) outfile << "$MeshFormat\n"; outfile << (float)2.0 << " " << (int)0 << " " << (int)sizeof(double) << "\n"; outfile << "$EndMeshFormat\n"; /// Write nodes outfile << "$Nodes\n"; outfile << np << "\n"; for (i = 1; i <= np; i++) { const Point3d & p = mesh.Point(i); outfile << i << " "; /// node number outfile << p.X() << " "; outfile << p.Y() << " "; outfile << p.Z() << "\n"; } outfile << "$EndNodes\n"; /// write elements (both, surface elements and volume elements) outfile << "$Elements\n"; outfile << ne + nse << "\n"; //// number of elements + number of surfaces BC for (i = 1; i <= nse; i++) { int elType = 0; Element2d el = mesh.SurfaceElement(i); if(invertsurf) el.Invert(); if(el.GetNP() == 3) elType = GMSH_TRIG; //// GMSH Type for a 3 node triangle if(el.GetNP() == 6) elType = GMSH_TRIG6; //// GMSH Type for a 6 node triangle if(elType == 0) { cout << " Invalid surface element type for Gmsh 2.0 3D-Mesh Export Format !\n"; return; } outfile << i; outfile << " "; outfile << elType; outfile << " "; outfile << "2"; //// Number of tags (2 => Physical and elementary entities) outfile << " "; outfile << mesh.GetFaceDescriptor (el.GetIndex()).BCProperty() << " "; /// that means that physical entity = elementary entity (arbitrary approach) outfile << mesh.GetFaceDescriptor (el.GetIndex()).BCProperty() << " "; for (j = 1; j <= el.GetNP(); j++) { outfile << " "; outfile << el.PNum(triGmsh[j]); } outfile << "\n"; } for (i = 1; i <= ne; i++) { int elType = 0; Element el = mesh.VolumeElement(i); if (inverttets) el.Invert(); if(el.GetNP() == 4) elType = GMSH_TET; //// GMSH Element type for 4 node tetrahedron if(el.GetNP() == 10) elType = GMSH_TET10; //// GMSH Element type for 10 node tetrahedron if(elType == 0) { cout << " Invalid volume element type for Gmsh 2.0 3D-Mesh Export Format !\n"; return; } outfile << nse + i; //// element number (Remember to add on surface elements) outfile << " "; outfile << elType; outfile << " "; outfile << "2"; //// Number of tags (2 => Physical and elementary entities) outfile << " "; outfile << 100000 + el.GetIndex(); /// that means that physical entity = elementary entity (arbitrary approach) outfile << " "; outfile << 100000 + el.GetIndex(); /// volume number outfile << " "; for (j = 1; j <= el.GetNP(); j++) { outfile << " "; outfile << el.PNum(tetGmsh[j]); } outfile << "\n"; } outfile << "$EndElements\n"; } /* * End of 3D section */ /* * 2D section : available for triangles and quadrangles * upto 2nd Order */ else if(ne == 0) /// means that there's no 3D element { cout << "\n Write Gmsh v2.xx Surface Mesh (triangle and/or quadrangles upto 2nd Order)" << endl; /// Prepare GMSH 2.0 file (See GMSH 2.0 Documentation) outfile << "$MeshFormat\n"; outfile << (float)2.0 << " " << (int)0 << " " << (int)sizeof(double) << "\n"; outfile << "$EndMeshFormat\n"; /// Write nodes outfile << "$Nodes\n"; outfile << np << "\n"; for (i = 1; i <= np; i++) { const Point3d & p = mesh.Point(i); outfile << i << " "; /// node number outfile << p.X() << " "; outfile << p.Y() << " "; outfile << p.Z() << "\n"; } outfile << "$EndNodes\n"; /// write triangles & quadrangles outfile << "$Elements\n"; outfile << nse << "\n"; for (k = 1; k <= nse; k++) { int elType = 0; const Element2d & el = mesh.SurfaceElement(k); if(el.GetNP() == 3) elType = GMSH_TRIG; //// GMSH Type for a 3 node triangle if(el.GetNP() == 6) elType = GMSH_TRIG6; //// GMSH Type for a 6 node triangle if(el.GetNP() == 4) elType = GMSH_QUAD; //// GMSH Type for a 4 node quadrangle if(el.GetNP() == 8) elType = GMSH_QUAD8; //// GMSH Type for an 8 node quadrangle if(elType == 0) { cout << " Invalid surface element type for Gmsh 2.0 2D-Mesh Export Format !\n"; return; } outfile << k; outfile << " "; outfile << elType; outfile << " "; outfile << "2"; outfile << " "; outfile << mesh.GetFaceDescriptor (el.GetIndex()).BCProperty() << " "; /// that means that physical entity = elementary entity (arbitrary approach) outfile << mesh.GetFaceDescriptor (el.GetIndex()).BCProperty() << " "; for (l = 1; l <= el.GetNP(); l++) { outfile << " "; if((elType == GMSH_TRIG) || (elType == GMSH_TRIG6)) { outfile << el.PNum(triGmsh[l]); } else if((elType == GMSH_QUAD) || (elType == GMSH_QUAD8)) { outfile << el.PNum(quadGmsh[l]); } } outfile << "\n"; } outfile << "$EndElements\n"; } /* * End of 2D section */ else { cout << " Invalid element type for Gmsh v2.xx Export Format !\n"; } } // End: WriteGmsh2Format } // End: namespace netgen netgen-6.2.1804/libsrc/interface/writefluent.cpp0000644000175000017500000001044313272137567020301 0ustar kurtkurt// // Write Fluent file // Johannes Gerstmayr, University Linz // #include #include #include #include #include namespace netgen { #include "writeuser.hpp" void WriteFluentFormat (const Mesh & mesh, const string & filename) { cout << "start writing fluent export" << endl; int np = mesh.GetNP(); int ne = mesh.GetNE(); int nse = mesh.GetNSE(); int i, j; ofstream outfile (filename.c_str()); char str[100]; outfile.precision(6); //outfile.setf (ios::fixed, ios::floatfield); //outfile.setf (ios::showpoint); outfile << "(0 \"Exported file from NETGEN \")" << endl; outfile << "(0 \"Dimension:\")" << endl; outfile << "(2 3)" << endl << endl; outfile << "(0 \"Nodes:\")" << endl; //number of nodes: sprintf(str,"(10 (0 1 %x 1))",np); //hexadecimal!!! outfile << str << endl; //nodes of zone 1: sprintf(str,"(10 (7 1 %x 1)(",np); //hexadecimal!!! outfile << str << endl; for (i = 1; i <= np; i++) { const Point3d & p = mesh.Point(i); //outfile.width(10); outfile << p.X() << " "; outfile << p.Y() << " "; outfile << p.Z() << "\n"; } outfile << "))" << endl << endl; //write faces with elements outfile << "(0 \"Faces:\")" << endl; Element2d face, face2; int i2, j2; Array surfaceelp; Array surfaceeli; Array locels; //no cells=no tets //no faces=2*tets int noverbface = 2*ne-nse/2; sprintf(str,"(13 (0 1 %x 0))",(noverbface+nse)); //hexadecimal!!! outfile << str << endl; sprintf(str,"(13 (4 1 %x 2 3)(",noverbface); //hexadecimal!!! outfile << str << endl; const_cast (mesh).BuildElementSearchTree(); for (i = 1; i <= ne; i++) { if (ne > 2000) { if (i%2000 == 0) { cout << (double)i/(double)ne*100. << "%" << endl; } } Element el = mesh.VolumeElement(i); //if (inverttets) // el.Invert(); //outfile << el.GetIndex() << " "; if (el.GetNP() != 4) {cout << "only tet-meshes supported in write fluent!" << endl;} //faces: Box3d box; el.GetBox(mesh.Points(), box); box.IncreaseRel(1e-6); mesh.GetIntersectingVolEls(box.PMin(),box.PMax(),locels); int nel = locels.Size(); int locind; //cout << "nel=" << nel << endl; for (j = 1; j <= el.GetNFaces(); j++) { el.GetFace(j, face); face.Invert(); int eli2 = 0; int stopsig = 0; for (i2 = 1; i2 <= nel; i2++) { locind = locels.Get(i2); //cout << " locind=" << locind << endl; Element el2 = mesh.VolumeElement(locind); //if (inverttets) // el2.Invert(); for (j2 = 1; j2 <= el2.GetNFaces(); j2++) { el2.GetFace(j2, face2); if (face2.HasFace(face)) {eli2 = locind; stopsig = 1; break;} } if (stopsig) break; } if (eli2==i) cout << "error in WRITE_FLUENT!!!" << endl; if (eli2 > i) //don't write faces two times! { //i: left cell, eli: right cell outfile << hex << face.PNum(2) << " " << hex << face.PNum(1) << " " << hex << face.PNum(3) << " " << hex << i << " " << hex << eli2 << "\n"; } if (eli2 == 0) { surfaceelp.Append(INDEX_3(face.PNum(2),face.PNum(1),face.PNum(3))); surfaceeli.Append(i); } } } outfile << "))" << endl; sprintf(str,"(13 (2 %x %x 3 3)(",(noverbface+1),noverbface+nse); //hexadecimal!!! outfile << str << endl; for (i = 1; i <= surfaceelp.Size(); i++) { outfile << hex << surfaceelp.Get(i).I1() << " " << hex << surfaceelp.Get(i).I2() << " " << hex << surfaceelp.Get(i).I3() << " " << hex << surfaceeli.Get(i) << " " << 0 << "\n"; } outfile << "))" << endl << endl; outfile << "(0 \"Cells:\")" << endl; sprintf(str,"(12 (0 1 %x 0))",ne); //hexadecimal!!! outfile << str << endl; sprintf(str,"(12 (1 1 %x 1 2))",ne); //hexadecimal!!! outfile << str << endl << endl; outfile << "(0 \"Zones:\")\n" << "(45 (1 fluid fluid)())\n" // << "(45 (2 velocity-inlet velocity_inlet.1)())\n" // << "(45 (3 pressure-outlet pressure_outlet.2)())\n" << "(45 (2 wall wall)())\n" << "(45 (4 interior default-interior)())\n" << endl; cout << "done" << endl; } } netgen-6.2.1804/libsrc/interface/writeabaqus.cpp0000644000175000017500000001261613272137567020264 0ustar kurtkurt// // Write Abaqus file // // #include #include #include #include #include namespace netgen { #include "writeuser.hpp" void WriteAbaqusFormat (const Mesh & mesh, const string & filename) { cout << "\nWrite Abaqus Volume Mesh" << endl; ofstream outfile (filename.c_str()); outfile << "*Heading" << endl; outfile << " " << filename << endl; outfile.precision(8); outfile << "*Node" << endl; int np = mesh.GetNP(); int ne = mesh.GetNE(); int i, j, k; for (i = 1; i <= np; i++) { outfile << i << ", "; outfile << mesh.Point(i)(0) << ", "; outfile << mesh.Point(i)(1) << ", "; outfile << mesh.Point(i)(2) << "\n"; } int elemcnt = 0; //element counter int finished = 0; int indcnt = 1; //index counter while (!finished) { int actcnt = 0; const Element & el1 = mesh.VolumeElement(1); int non = el1.GetNP(); if (non == 4) { outfile << "*Element, type=C3D4, ELSET=PART" << indcnt << endl; } else if (non == 10) { outfile << "*Element, type=C3D10, ELSET=PART" << indcnt << endl; } else { cout << "unsupported Element type!!!" << endl; } for (i = 1; i <= ne; i++) { const Element & el = mesh.VolumeElement(i); if (el.GetIndex() == indcnt) { actcnt++; if (el.GetNP() != non) { cout << "different element-types in a subdomain are not possible!!!" << endl; continue; } elemcnt++; outfile << elemcnt << ", "; if (non == 4) { outfile << el.PNum(1) << ", "; outfile << el.PNum(2) << ", "; outfile << el.PNum(4) << ", "; outfile << el.PNum(3) << "\n"; } else if (non == 10) { outfile << el.PNum(1) << ", "; outfile << el.PNum(2) << ", "; outfile << el.PNum(4) << ", "; outfile << el.PNum(3) << ", "; outfile << el.PNum(5) << ", "; outfile << el.PNum(9) << ", "; outfile << el.PNum(7) << ", " << "\n"; outfile << el.PNum(6) << ", "; outfile << el.PNum(8) << ", "; outfile << el.PNum(10) << "\n"; } else { cout << "unsupported Element type!!!" << endl; for (j = 1; j <= el.GetNP(); j++) { outfile << el.PNum(j); if (j != el.GetNP()) outfile << ", "; } outfile << "\n"; } } } indcnt++; if (elemcnt == ne) {finished = 1; cout << "all elements found by Index!" << endl;} if (actcnt == 0) {finished = 1;} } if (mesh.GetIdentifications().GetMaxNr()) { // periodic identification, implementation for // Helmut J. Boehm, TU Vienna char cfilename[255]; strcpy (cfilename, filename.c_str()); char mpcfilename[255]; strcpy (mpcfilename, cfilename); size_t len = strlen (cfilename); if (len >= 4 && (strcmp (mpcfilename+len-4, ".inp") == 0)) strcpy (mpcfilename+len-4, ".mpc"); else strcat (mpcfilename, ".mpc"); ofstream mpc (mpcfilename); int masternode(0); Array pairs; BitArray master(np), help(np); master.Set(); for (i = 1; i <= 3; i++) { mesh.GetIdentifications().GetPairs (i, pairs); help.Clear(); for (j = 1; j <= pairs.Size(); j++) { help.Set (pairs.Get(j).I1()); } master.And (help); } for (i = 1; i <= np; i++) if (master.Test(i)) masternode = i; cout << "masternode = " << masternode << " = " << mesh.Point(masternode) << endl; Array slaves(3); for (i = 1; i <= 3; i++) { mesh.GetIdentifications().GetPairs (i, pairs); for (j = 1; j <= pairs.Size(); j++) { if (pairs.Get(j).I1() == masternode) slaves.Elem(i) = pairs.Get(j).I2(); } cout << "slave(" << i << ") = " << slaves.Get(i) << " = " << mesh.Point(slaves.Get(i)) << endl; } outfile << "**\n" << "*NSET,NSET=CTENODS\n" << slaves.Get(1) << ", " << slaves.Get(2) << ", " << slaves.Get(3) << endl; outfile << "**\n" << "**POINT_fixed\n" << "**\n" << "*BOUNDARY, OP=NEW\n"; for (j = 1; j <= 3; j++) outfile << masternode << ", " << j << ",, 0.\n"; outfile << "**\n" << "*BOUNDARY, OP=NEW\n"; for (j = 1; j <= 3; j++) { Vec3d v(mesh.Point(masternode), mesh.Point(slaves.Get(j))); double vlen = v.Length(); int dir = 0; if (fabs (v.X()) > 0.9 * vlen) dir = 2; if (fabs (v.Y()) > 0.9 * vlen) dir = 3; if (fabs (v.Z()) > 0.9 * vlen) dir = 1; if (!dir) cout << "ERROR: Problem with rigid body constraints" << endl; outfile << slaves.Get(j) << ", " << dir << ",, 0.\n"; } outfile << "**\n" << "*EQUATION, INPUT=" << mpcfilename << endl; BitArray eliminated(np); eliminated.Clear(); for (i = 1; i <= mesh.GetIdentifications().GetMaxNr(); i++) { mesh.GetIdentifications().GetPairs (i, pairs); if (!pairs.Size()) continue; for (j = 1; j <= pairs.Size(); j++) if (pairs.Get(j).I1() != masternode && !eliminated.Test(pairs.Get(j).I2())) { eliminated.Set (pairs.Get(j).I2()); for (k = 1; k <= 3; k++) { mpc << "4" << "\n"; mpc << pairs.Get(j).I2() << "," << k << ", -1.0, "; mpc << pairs.Get(j).I1() << "," << k << ", 1.0, "; mpc << slaves.Get(i) << "," << k << ", 1.0, "; mpc << masternode << "," << k << ", -1.0 \n"; } } } } cout << "done" << endl; } } netgen-6.2.1804/libsrc/interface/writegmsh.cpp0000644000175000017500000001322413272137567017742 0ustar kurtkurt/************************************* * Write Gmsh file * First issue the 04/26/2004 by Paul CARRICO (paul.carrico@free.fr) * At the moment, the GMSH format is available for * linear tetrahedron elements i.e. in 3D * (based on Neutral Format) * * Second issue the 05/05/2004 by Paul CARRICO * Thanks to Joachim Schoeberl for the correction of a minor bug * the 2 initial Gmsh Format (i.e. volume format and surface format) are group together) * in only one file **************************************/ #include #include #include #include #include namespace netgen { #include "writeuser.hpp" extern MeshingParameters mparam; /* * GMSH mesh format * points, elements, surface elements and physical entities */ void WriteGmshFormat (const Mesh & mesh, const NetgenGeometry & geom, const string & filename) { ofstream outfile (filename.c_str()); outfile.precision(6); outfile.setf (ios::fixed, ios::floatfield); outfile.setf (ios::showpoint); int np = mesh.GetNP(); /// number of point int ne = mesh.GetNE(); /// number of element int nse = mesh.GetNSE(); /// number of surface element (BC) int i, j, k, l; /* * 3D section : Linear volume elements (only tetrahedra) */ if (ne > 0 && mesh.VolumeElement(1).GetNP() == 4) { cout << "Write GMSH Format \n"; cout << "The GMSH format is available for linear tetrahedron elements only in 3D\n" << endl; int inverttets = mparam.inverttets; int invertsurf = mparam.inverttrigs; /// Write nodes outfile << "$NOD\n"; outfile << np << "\n"; for (i = 1; i <= np; i++) { const Point3d & p = mesh.Point(i); outfile << i << " "; /// node number outfile << p.X() << " "; outfile << p.Y() << " "; outfile << p.Z() << "\n"; } outfile << "$ENDNOD\n"; /// write elements outfile << "$ELM\n"; outfile << ne + nse << "\n"; //// number of elements + number of surfaces BC for (i = 1; i <= nse; i++) { Element2d el = mesh.SurfaceElement(i); if (invertsurf) el.Invert(); outfile << i; outfile << " "; outfile << "2"; outfile << " "; outfile << mesh.GetFaceDescriptor (el.GetIndex()).BCProperty() << " "; /// that means that physical entity = elementary entity (arbitrary approach) outfile << mesh.GetFaceDescriptor (el.GetIndex()).BCProperty() << " "; outfile << "3"; outfile << " "; for (j = 1; j <= el.GetNP(); j++) { outfile << " "; outfile << el.PNum(j); } outfile << "\n"; } for (i = 1; i <= ne; i++) { Element el = mesh.VolumeElement(i); if (inverttets) el.Invert(); outfile << nse + i; /// element number outfile << " "; outfile << "4"; /// element type i.e. Tetraedron == 4 outfile << " "; outfile << 100000 + el.GetIndex(); /// that means that physical entity = elementary entity (arbitrary approach) outfile << " "; outfile << 100000 + el.GetIndex(); /// volume number outfile << " "; outfile << "4"; /// number of nodes i.e. 4 for a tetrahedron for (j = 1; j <= el.GetNP(); j++) { outfile << " "; outfile << el.PNum(j); } outfile << "\n"; } outfile << "$ENDELM\n"; } /* * End of 3D section */ /* * 2D section : available for triangles and quadrangles */ else if (ne == 0) /// means that there's no 3D element { cout << "\n Write Gmsh Surface Mesh (triangle and/or quadrangles)" << endl; /// Write nodes outfile << "$NOD\n"; outfile << np << "\n"; for (i = 1; i <= np; i++) { const Point3d & p = mesh.Point(i); outfile << i << " "; /// node number outfile << p.X() << " "; outfile << p.Y() << " "; outfile << p.Z() << "\n"; } outfile << "$ENDNOD\n"; /// write triangles & quadrangles outfile << "$ELM\n"; outfile << nse << "\n"; for (k = 1; k <= nse; k++) { const Element2d & el = mesh.SurfaceElement(k); outfile << k; outfile << " "; outfile << (el.GetNP()-1); // 2 for a triangle and 3 for a quadrangle outfile << " "; outfile << mesh.GetFaceDescriptor (el.GetIndex()).BCProperty() << " "; /// that means that physical entity = elementary entity (arbitrary approach) outfile << mesh.GetFaceDescriptor (el.GetIndex()).BCProperty() << " "; outfile << (el.GetNP()); // number of node per surfacic element outfile << " "; for (l = 1; l <= el.GetNP(); l++) { outfile << " "; outfile << el.PNum(l); } outfile << "\n"; } outfile << "$ENDELM$ \n"; } /* * End of 2D section */ else { cout << " Invalid element type for Gmsh volume Format !\n"; } } } netgen-6.2.1804/libsrc/interface/writejcm.cpp0000644000175000017500000003127613272137567017564 0ustar kurtkurt// // Write JCMwave file // 07.07.2005, Sven Burger, ZIB Berlin // #include #include #include #include #include #include namespace netgen { #include "writeuser.hpp" void WriteJCMFormat (const Mesh & mesh, const NetgenGeometry & geom, const string & filename) { if (mesh.GetDimension() != 3) { cout <<"\n Error: Dimension 3 only supported by this output format!"< identmap1, identmap2, identmap3; mesh.GetIdentifications().GetMap(1, identmap1); mesh.GetIdentifications().GetMap(2, identmap2); mesh.GetIdentifications().GetMap(3, identmap3); // number of volume elements int ne = mesh.GetNE(); int ntets = 0; int nprisms = 0; for (i = 1; i <= ne; i++) { Element el = mesh.VolumeElement(i); if (el.GetNP() == 4) { ntets++; // Check that no two points on a tetrahedron are identified with each other for (j = 1; j <= 4; j++) for (jj = 1; jj <=4; jj++) { if (identmap1.Elem(el.PNum(j)) == el.PNum(jj)) { cout << "\n Error: two points on a tetrahedron identified (1) with each other" << "\n REFINE MESH !" << endl; return; } if (identmap2.Elem(el.PNum(j)) == el.PNum(jj)) { cout << "\n Error: two points on a tetrahedron identified (2) with each other" << "\n REFINE MESH !" << endl; return; } if (identmap3.Elem(el.PNum(j)) == el.PNum(jj)) { cout << "\n Error: two points on a tetrahedron identified (3) with each other" << "\n REFINE MESH !" << endl; return; } } } else if (el.GetNP() == 6) nprisms++; } if ( ne != (ntets+nprisms)) { cout<< "\n Error in determining number of volume elements!\n" << "\n Prisms and tetrahedra only implemented in the JCMwave format!\n"< 0) cout << " Please note: Boundaries at infinity have to carry the bc-attribute '-bc=" << bc_at_infinity <<"'."< pointsOnTetras; pointsOnTetras.SetSize (mesh.GetNP()); pointsOnTetras = 0; for (i = 1; i <= ne; i++) { Element el = mesh.VolumeElement(i); if (el.GetNP() == 4) { for (j = 1; j <= 4; j++) pointsOnTetras.Set(int (el.PNum(j)),1); } } // number of boundary triangles and boundary quadrilaterals for (i = 1; i <= nse; i++) { Element2d el = mesh.SurfaceElement(i); if (el.GetNP() == 3 && ( mesh.GetFaceDescriptor (el.GetIndex()).DomainIn()==0 || mesh.GetFaceDescriptor (el.GetIndex()).DomainOut()==0 ) ) nbtri++; else if (el.GetNP() == 4 && ( mesh.GetFaceDescriptor (el.GetIndex()).DomainIn()==0 || mesh.GetFaceDescriptor (el.GetIndex()).DomainOut()==0 ) ) nbquad++; } ofstream outfile (filename.c_str()); outfile.precision(6); outfile.setf (ios::fixed, ios::floatfield); outfile.setf (ios::showpoint); outfile << "/* \n"; outfile << "__BLOBTYPE__=Grid\n"; outfile << "__OWNER__=JCMwave\n"; outfile << "SpaceDim=3\n"; outfile << "ManifoldDim=3\n"; outfile << "NRefinementSteps=0\n"; outfile << "NPoints="<NTetrahedra="<NPrisms="<NBoundaryTriangles="<NBoundaryQuadrilaterals="< & p = mesh.Point(i); outfile << i << "\n"; outfile << p(0) << "e-6\n"; outfile << p(1) << "e-6\n"; outfile << p(2) << "e-6\n\n"; } outfile << "\n"; outfile << "# Tetrahedra\n"; counter = 0; for (i = 1; i <= ne; i++) { Element el = mesh.VolumeElement(i); if (el.GetNP() == 4) { counter++; dx1 = mesh.Point(el.PNum(2))(0) - mesh.Point(el.PNum(1))(0); dx2 = mesh.Point(el.PNum(3))(0) - mesh.Point(el.PNum(1))(0); dx3 = mesh.Point(el.PNum(4))(0) - mesh.Point(el.PNum(1))(0); dy1 = mesh.Point(el.PNum(2))(1) - mesh.Point(el.PNum(1))(1); dy2 = mesh.Point(el.PNum(3))(1) - mesh.Point(el.PNum(1))(1); dy3 = mesh.Point(el.PNum(4))(1) - mesh.Point(el.PNum(1))(1); dz1 = mesh.Point(el.PNum(2))(2) - mesh.Point(el.PNum(1))(2); dz2 = mesh.Point(el.PNum(3))(2) - mesh.Point(el.PNum(1))(2); dz3 = mesh.Point(el.PNum(4))(2) - mesh.Point(el.PNum(1))(2); vol = (dy1*dz2-dz1*dy2)*dx3 + (dz1*dx2-dx1*dz2)*dy3 + (dx1*dy2-dy1*dx2)*dz3; if ( vol > 0 ) for (j = 1; j <= 4; j++) outfile << el.PNum(j)<<"\n"; else { for (j = 2; j >= 1; j--) outfile << el.PNum(j)<<"\n"; for (j = 3; j <= 4; j++) outfile << el.PNum(j)<<"\n"; } outfile << el.GetIndex() << "\n\n"; } } if ( counter != ntets) { cout<< "\n Error in determining number of tetras!\n"< 0) for (j = 1; j <= 6; j++) outfile << el.PNum(j)<<"\n"; else { for (j = 3; j >= 1; j--) outfile << el.PNum(j)<<"\n"; for (j = 6; j >= 4; j--) outfile << el.PNum(j)<<"\n"; } } else if ( pointsOnTetras.Get(el.PNum(4)) && pointsOnTetras.Get(el.PNum(5)) && pointsOnTetras.Get(el.PNum(6)) ) { if ( vol < 0 ) { for (j = 4; j <= 6; j++) outfile << el.PNum(j)<<"\n"; for (j = 1; j <= 3; j++) outfile << el.PNum(j)<<"\n"; } else { for (j = 6; j >= 4; j--) outfile << el.PNum(j)<<"\n"; for (j = 3; j >= 1; j--) outfile << el.PNum(j)<<"\n"; } } else { cout << "\n Error in determining prism point numbering!\n"<= 5 ) jj = jj - 4; outfile << el.PNum(jj)<<"\n"; } outfile << mesh.GetFaceDescriptor (el.GetIndex()).BCProperty() << "\n"; if (mesh.GetFaceDescriptor (el.GetIndex()).BCProperty() == bc_at_infinity) { outfile << "-2\n\n"; cout << "\nWarning: Quadrilateral at infinity found (this should not occur)!"<= 5 ) jj = jj - 4; outfile << identmap1.Elem(el.PNum(jj))<<"\n"; } outfile << "\n"; } else if ( identmap2.Elem(el.PNum(1)) && identmap2.Elem(el.PNum(2)) && identmap2.Elem(el.PNum(3)) && identmap2.Elem(el.PNum(4)) ) { outfile << "-1\n"; for (j = 1; j <= 4; j++) { jj = j + ct; if ( jj >= 5 ) jj = jj - 4; outfile << identmap2.Elem(el.PNum(jj))<<"\n"; } outfile << "\n"; } else if ( identmap3.Elem(el.PNum(1)) && identmap3.Elem(el.PNum(2)) && identmap3.Elem(el.PNum(3)) && identmap3.Elem(el.PNum(4)) ) { outfile << "-1\n"; for (j = 1; j <= 4; j++) { jj = j + ct; if ( jj >= 5 ) jj = jj - 4; outfile << identmap3.Elem(el.PNum(jj))<<"\n"; } outfile << "\n"; } else outfile << "1\n\n"; } } cout << " JCMwave grid file written." << endl; } } netgen-6.2.1804/libsrc/interface/writeelmer.cpp0000644000175000017500000000551213272137567020111 0ustar kurtkurt // // Write Elmer file // // #include #include #include #include #include #include #include "writeuser.hpp" namespace netgen { extern MeshingParameters mparam; void WriteElmerFormat (const Mesh &mesh, const string &filename) { cout << "write elmer mesh files" << endl; int np = mesh.GetNP(); int ne = mesh.GetNE(); int nse = mesh.GetNSE(); int i, j; char str[200]; int inverttets = mparam.inverttets; int invertsurf = mparam.inverttrigs; #ifdef WIN32 char a[256]; sprintf( a, "mkdir %s", filename.c_str() ); system( a ); #else // int rc = mkdir(filename.c_str(), S_IRWXU|S_IRWXG); #endif sprintf( str, "%s/mesh.header", filename.c_str() ); ofstream outfile_h(str); sprintf( str, "%s/mesh.nodes", filename.c_str() ); ofstream outfile_n(str); sprintf( str, "%s/mesh.elements", filename.c_str() ); ofstream outfile_e(str); sprintf( str, "%s/mesh.boundary", filename.c_str() ); ofstream outfile_b(str); // fill hashtable INDEX_3_HASHTABLE face2volelement(ne); for (i = 1; i <= ne; i++) { const Element & el = mesh.VolumeElement(i); INDEX_3 i3; int k, l; for (j = 1; j <= 4; j++) // loop over faces of tet { l = 0; for (k = 1; k <= 4; k++) if (k != j) { l++; i3.I(l) = el.PNum(k); } i3.Sort(); face2volelement.Set (i3, i); } } // outfile.precision(6); // outfile.setf (ios::fixed, ios::floatfield); // outfile.setf (ios::showpoint); outfile_h << np << " " << ne << " " << nse << "\n"; outfile_h << "2" << "\n"; outfile_h << "303 " << nse << "\n"; outfile_h << "504 " << ne << "\n"; for (i = 1; i <= np; i++) { const Point3d & p = mesh.Point(i); outfile_n << i << " -1 "; outfile_n << p.X() << " "; outfile_n << p.Y() << " "; outfile_n << p.Z() << "\n"; } for (i = 1; i <= ne; i++) { Element el = mesh.VolumeElement(i); if (inverttets) el.Invert(); sprintf( str, "5%02d", (int)el.GetNP() ); outfile_e << i << " " << el.GetIndex() << " " << str << " "; for (j = 1; j <= el.GetNP(); j++) { outfile_e << " "; outfile_e << el.PNum(j); } outfile_e << "\n"; } for (i = 1; i <= nse; i++) { Element2d el = mesh.SurfaceElement(i); if (invertsurf) el.Invert(); sprintf( str, "3%02d", (int)el.GetNP() ); { INDEX_3 i3; for (j = 1; j <= 3; j++) i3.I(j) = el.PNum(j); i3.Sort(); int elind = face2volelement.Get(i3); outfile_b << i << " " << mesh.GetFaceDescriptor(el.GetIndex()).BCProperty() << " " << elind << " 0 " << str << " "; } for (j = 1; j <= el.GetNP(); j++) { outfile_b << " "; outfile_b << el.PNum(j); } outfile_b << "\n"; } } } netgen-6.2.1804/libsrc/interface/writediffpack.cpp0000644000175000017500000002114113272137567020550 0ustar kurtkurt// // Write diffpack file // // by // Bartosz Sawicki // extended by // Jacques Lechelle // #include #include #include #include #include namespace netgen { #include "writeuser.hpp" void WriteDiffPackFormat (const Mesh & mesh, const NetgenGeometry & geom, const string & filename) { // double scale = globflags.GetNumFlag ("scale", 1); double scale = 1; ofstream outfile(filename.c_str()); outfile.precision(14); if (mesh.GetDimension() == 3) { // Output compatible to Diffpack grid format // Bartosz Sawicki int np = mesh.GetNP(); int ne = mesh.GetNE(); int nse = mesh.GetNSE(); Array BIname; Array BCsinpoint; int i, j, k, l; outfile.precision(6); outfile.setf (ios::fixed, ios::floatfield); outfile.setf (ios::showpoint); const Element & eldummy = mesh.VolumeElement((int)1); outfile << "\n\n" "Finite element mesh (GridFE):\n\n" " Number of space dim. = 3\n" " Number of elements = " << ne << "\n" " Number of nodes = " << np << "\n\n" " All elements are of the same type : dpTRUE\n" " Max number of nodes in an element: "<< eldummy.GetNP() << "\n" " Only one subdomain : dpFALSE\n" " Lattice data ? 0\n\n\n\n"; for (i = 1; i <= nse; i++) { int BI=mesh.GetFaceDescriptor(mesh.SurfaceElement(i).GetIndex()).BCProperty(); int nbi=BIname.Size(); int found=0; for (j = 1; j <= nbi; j++) if(BI == BIname.Get(j)) found = 1; if( ! found ) BIname.Append(BI); } outfile << " " << BIname.Size() << " Boundary indicators: "; for (i =1 ; i <= BIname.Size(); i++) outfile << BIname.Get(i) << " "; outfile << "\n\n\n"; outfile << " Nodal coordinates and nodal boundary indicators,\n" " the columns contain:\n" " - node number\n" " - coordinates\n" " - no of boundary indicators that are set (ON)\n" " - the boundary indicators that are set (ON) if any.\n" "#\n"; // setup point-to-surfaceelement table TABLE point2sel(np); for (SurfaceElementIndex sei = 0; sei < nse; sei++) { const Element2d & el = mesh[sei]; for (int j = 0; j < el.GetNP(); j++) point2sel.Add (el[j], sei); } for (i = 1; i <= np; i++) { const Point3d & p = mesh.Point(i); outfile.width(12); outfile << i << " ("; outfile.width(16); outfile << p.X()/scale << ", "; outfile.width(16); outfile << p.Y()/scale << ", "; outfile.width(16); outfile << p.Z()/scale << ") "; if(mesh[PointIndex(i)].Type() != INNERPOINT) { BCsinpoint.DeleteAll(); /* for (j = 1; j <= nse; j++) */ FlatArray sels = point2sel[i]; for (int jj = 0; jj < sels.Size(); jj++) { for (k = 1; k <= mesh[sels[jj]].GetNP(); k++) { if(mesh[sels[jj]].PNum(k)==i) { int BC=mesh.GetFaceDescriptor(mesh[sels[jj]].GetIndex()).BCProperty(); int nbcsp=BCsinpoint.Size(); int found = 0; for (l = 1; l <= nbcsp; l++) if(BC == BCsinpoint.Get(l)) found = 1; if( ! found ) BCsinpoint.Append(BC); } } } int nbcsp = BCsinpoint.Size(); outfile << "[" << nbcsp << "] "; for (j = 1; j <= nbcsp; j++) outfile << BCsinpoint.Get(j) << " "; outfile << "\n"; } else outfile << "[0]\n"; } outfile << "\n" " Element types and connectivity\n" " the columns contain:\n" " - element number\n" " - element type\n" " - subdomain number\n" " - the global node numbers of the nodes in the element.\n" "#\n"; for (i = 1; i <= ne; i++) { const Element & el = mesh.VolumeElement(i); outfile.width(5); if(el.GetNP()==4) outfile << i << " ElmT4n3D "; else outfile << i << " ElmT10n3D "; outfile.width(4); outfile << el.GetIndex() << " "; if(el.GetNP()==10) { outfile.width(8); outfile << el.PNum(1); outfile.width(8); outfile << el.PNum(3); outfile.width(8); outfile << el.PNum(2); outfile.width(8); outfile << el.PNum(4); outfile.width(8); outfile << el.PNum(6); outfile.width(8); outfile << el.PNum(8); outfile.width(8); outfile << el.PNum(5); outfile.width(8); outfile << el.PNum(7); outfile.width(8); outfile << el.PNum(10); outfile.width(8); outfile << el.PNum(9); } else { outfile.width(8); outfile << el.PNum(1); outfile.width(8); outfile << el.PNum(3); outfile.width(8); outfile << el.PNum(2); outfile.width(8); outfile << el.PNum(4); } outfile << "\n"; } } /* Diffpack */ else { // Output compatible to Diffpack grid format 2D int np = mesh.GetNP(); //int ne = mesh.GetNE(); int nse = mesh.GetNSE(); Array BIname; Array BCsinpoint; int i, j, k, l; outfile.precision(6); outfile.setf (ios::fixed, ios::floatfield); outfile.setf (ios::showpoint); const Element2d & eldummy = mesh.SurfaceElement((int)1); outfile << "\n\n" "Finite element mesh (GridFE):\n\n" " Number of space dim. = 2\n" " Number of elements = " << nse << "\n" " Number of nodes = " << np << "\n\n" " All elements are of the same type : dpTRUE\n" " Max number of nodes in an element: "< #include #include #include #include namespace netgen { extern MeshingParameters mparam; #include "writeuser.hpp" void WriteFEAPFormat (const Mesh & mesh, const string & filename) { // Feap format by A. Rieger // rieger@ibnm.uni-hannover.de int inverttets = mparam.inverttets; //int invertsurf = mparam.inverttrigs; int i, j; double scale = 1; // globflags.GetNumFlag ("scale", 1); ofstream outfile(filename.c_str()); outfile << "feap" << "\n"; outfile << mesh.GetNP(); outfile << ","; outfile << mesh.GetNE(); outfile << ","; outfile << "1,3,3,4" << "\n" << "\n"; outfile << "!numnp,numel,nummat,ndm,ndf,nen"; outfile << "\n"; outfile << "\n" << "\n"; outfile << "!node,, X Y Z" << "\n"; outfile << "COOR" << "\n"; outfile.precision(4); outfile.setf (ios::fixed, ios::floatfield); outfile.setf (ios::showpoint); for (i = 1; i <= mesh.GetNP(); i++) { outfile.width(5); outfile << i; outfile << ",,"; outfile.width(10); outfile << mesh.Point(i)(0)/scale << " "; outfile.width(10); outfile << mesh.Point(i)(1)/scale << " "; outfile.width(10); outfile << mesh.Point(i)(2)/scale << "\n"; } outfile << "\n" << "\n"; outfile << "!elm,,mat, n1 n2 n3 n4" << "\n"; outfile << "ELEM" << "\n"; for (i = 1; i <= mesh.GetNE(); i++) { Element el = mesh.VolumeElement(i); if (inverttets) el.Invert(); outfile.width(5); outfile << i; outfile << ",,"; outfile << el.GetIndex(); outfile << ","; for (j = 1; j <= el.NP(); j++) { outfile.width(8); outfile << el.PNum(j); } outfile << "\n"; } outfile << "\n" << "\n"; /* //outfile << "SLOA" << "\n"; //outfile << "2,3,3" << "\n"; //outfile << GetNSE() << "\n"; outfile << "selm" << "\n" << GetNSE() << "\n"; for (i = 1; i <= GetNSE(); i++) { if (SurfaceElement(i).GetIndex()) { outfile.width(8); outfile << facedecoding.Get(SurfaceElement(i).GetIndex ()).surfnr; //outfile.width(8); //outfile << facedecoding.Get(SurfaceElement(i).GetIndex ()).domin; //outfile.width(8); //outfile << facedecoding.Get(SurfaceElement(i).GetIndex ()).domout; } else outfile << " 0 0 0"; Element2d sel = SurfaceElement(i); if (invertsurf) sel.Invert(); //outfile.width(8); //outfile << sel.GetNP(); //if (facedecoding.Get(SurfaceElement(i).GetIndex ()).surfnr == 4) //{ for (j = 1; j <= sel.GetNP(); j++) { outfile.width(8); outfile << sel.PNum(j); } //outfile.width(8); //outfile << "0.0"; //outfile.width(8); //outfile << "0.0"; //outfile.width(8); //outfile << "1.0" << "\n"; //} outfile << "\n"; //outfile << endl; } */ // BEGIN CONTACT OUTPUT /* int masterindex, slaveindex; cout << "Master Surface index = "; cin >> masterindex; cout << "Slave Surface index = "; cin >> slaveindex; // CONTACT SURFACE 1 outfile << "\n"; outfile << "\n"; outfile << "surface,1" << "\n";; outfile.width(6); outfile << "tria" << "\n";; outfile.width(13); outfile << "facet" << "\n";; zz = 0; for (i = 1; i <= mesh.GetNSE(); i++) { Element2d sel = mesh.SurfaceElement(i); if (invertsurf) sel.Invert(); if (mesh.GetFaceDescriptor(sel.GetIndex ()).BCProperty() == masterindex) { zz++; outfile.width(14); outfile << zz; outfile << ",,"; for (j = 1; j <= sel.GetNP(); j++) { outfile << sel.PNum(j); outfile << ","; } outfile << "\n"; } } // CONTACT SURFACE 2 outfile << "\n"; outfile << "\n"; outfile << "surface,2" << "\n";; outfile.width(6); outfile << "tria" << "\n";; outfile.width(13); outfile << "facet" << "\n";; zz = 0; for (i = 1; i <= mesh.GetNSE(); i++) { Element2d sel = mesh.SurfaceElement(i); if (invertsurf) sel.Invert(); if (mesh.GetFaceDescriptor(sel.GetIndex ()).BCProperty() == slaveindex) { zz++; outfile.width(14); outfile << zz; outfile << ",,"; for (j = 1; j <= sel.GetNP(); j++) { outfile << sel.PNum(j); outfile << ","; } outfile << "\n"; } } outfile << "\n"; outfile << "\n"; */ // END CONTACT OUTPUT cout << "done" << endl; } } netgen-6.2.1804/libsrc/interface/nginterface_v2.cpp0000644000175000017500000007054613272137567020637 0ustar kurtkurt#include #ifdef SOCKETS #include "../sockets/sockets.hpp" #endif #include "nginterface.h" #include "nginterface_v2.hpp" // #include #include "writeuser.hpp" namespace netgen { extern shared_ptr mesh; } namespace netgen { #define NGX_INLINE #include "nginterface_v2_impl.hpp" shared_ptr Ngx_Mesh :: SelectMesh () const { shared_ptr hmesh = netgen::mesh; netgen::mesh = mesh; SetGlobalMesh (mesh); return hmesh; } Ngx_Mesh :: Ngx_Mesh (shared_ptr amesh) { if (amesh) mesh = amesh; else mesh = netgen::mesh; } Ngx_Mesh * LoadMesh (const string & filename) { netgen::mesh.reset(); Ng_LoadMesh (filename.c_str()); return new Ngx_Mesh (netgen::mesh); } void Ngx_Mesh :: LoadMesh (const string & filename) { netgen::mesh.reset(); Ng_LoadMesh (filename.c_str()); // mesh = move(netgen::mesh); mesh = netgen::mesh; } void Ngx_Mesh :: LoadMesh (istream & ist) { netgen::mesh = make_shared(); netgen::mesh -> Load (ist); // mesh = move(netgen::mesh); mesh = netgen::mesh; SetGlobalMesh (mesh); } void Ngx_Mesh :: SaveMesh (ostream & ost) const { mesh -> Save (ost); } void Ngx_Mesh :: DoArchive (ngstd::Archive & archive) { if (archive.Input()) mesh = make_shared(); mesh->DoArchive(archive); if (archive.Input()) { netgen::mesh = mesh; SetGlobalMesh (mesh); } /* if (archive.Output()) { stringstream str; SaveMesh (str); string st = str.str(); archive & st; } else { string st; archive & st; stringstream str(st); LoadMesh (str); } */ } void Ngx_Mesh :: UpdateTopology () { if (mesh) mesh -> UpdateTopology(); } /* Ngx_Mesh :: Ngx_Mesh (Mesh * amesh) : mesh(amesh) { ; } */ Ngx_Mesh :: ~Ngx_Mesh () { // causes crashes when global variable netgen::mesh is destructed // before visualization data if (mesh == netgen::mesh) netgen::mesh = nullptr; } int Ngx_Mesh :: GetDimension() const { return mesh -> GetDimension(); } int Ngx_Mesh :: GetNLevels() const { return mesh -> mglevels; } int Ngx_Mesh :: GetNElements (int dim) const { switch (dim) { case 0: return mesh -> pointelements.Size(); case 1: return mesh -> GetNSeg(); case 2: return mesh -> GetNSE(); case 3: return mesh -> GetNE(); } return -1; } int Ngx_Mesh :: GetNNodes (int nt) const { switch (nt) { case 0: return mesh -> GetNV(); case 1: return mesh->GetTopology().GetNEdges(); case 2: return mesh->GetTopology().GetNFaces(); case 3: return mesh -> GetNE(); } return -1; } /* Ng_Point Ngx_Mesh :: GetPoint (int nr) const { return Ng_Point (&mesh->Point(nr + PointIndex::BASE)(0)); } */ /* template <> DLL_HEADER Ng_Element Ngx_Mesh :: GetElement<0> (int nr) const { const Element0d & el = mesh->pointelements[nr]; Ng_Element ret; ret.type = NG_PNT; ret.index = el.index; ret.points.num = 1; ret.points.ptr = (int*)&el.pnum; ret.vertices.num = 1; ret.vertices.ptr = (int*)&el.pnum; ret.edges.num = 0; ret.edges.ptr = NULL; ret.faces.num = 0; ret.faces.ptr = NULL; return ret; } */ /* template <> DLL_HEADER Ng_Element Ngx_Mesh :: GetElement<1> (int nr) const { const Segment & el = mesh->LineSegment (SegmentIndex(nr)); Ng_Element ret; ret.type = NG_ELEMENT_TYPE(el.GetType()); ret.points.num = el.GetNP(); ret.points.ptr = (int*)&(el[0]); ret.vertices.num = 2; ret.vertices.ptr = (int*)&(el[0]); ret.edges.num = 1; ret.edges.ptr = mesh->GetTopology().GetSegmentElementEdgesPtr (nr); ret.faces.num = 0; ret.faces.ptr = NULL; return ret; } template <> DLL_HEADER Ng_Element Ngx_Mesh :: GetElement<2> (int nr) const { const Element2d & el = mesh->SurfaceElement (SurfaceElementIndex (nr)); Ng_Element ret; ret.type = NG_ELEMENT_TYPE(el.GetType()); ret.points.num = el.GetNP(); ret.points.ptr = (int*)&el[0]; ret.vertices.num = el.GetNV(); ret.vertices.ptr = (int*)&(el[0]); ret.edges.num = MeshTopology::GetNEdges (el.GetType()); ret.edges.ptr = mesh->GetTopology().GetSurfaceElementEdgesPtr (nr); ret.faces.num = MeshTopology::GetNFaces (el.GetType()); ret.faces.ptr = mesh->GetTopology().GetSurfaceElementFacesPtr (nr); return ret; } template <> DLL_HEADER Ng_Element Ngx_Mesh :: GetElement<3> (int nr) const { const Element & el = mesh->VolumeElement (ElementIndex (nr)); Ng_Element ret; ret.type = NG_ELEMENT_TYPE(el.GetType()); ret.points.num = el.GetNP(); ret.points.ptr = (int*)&el[0]; ret.vertices.num = el.GetNV(); ret.vertices.ptr = (int*)&(el[0]); ret.edges.num = MeshTopology::GetNEdges (el.GetType()); ret.edges.ptr = mesh->GetTopology().GetElementEdgesPtr (nr); ret.faces.num = MeshTopology::GetNFaces (el.GetType()); ret.faces.ptr = mesh->GetTopology().GetElementFacesPtr (nr); return ret; } */ /* template <> DLL_HEADER int Ngx_Mesh :: GetElementIndex<0> (int nr) const { return 0; } template <> DLL_HEADER int Ngx_Mesh :: GetElementIndex<1> (int nr) const { return (*mesh)[SegmentIndex(nr)].si; } template <> DLL_HEADER int Ngx_Mesh :: GetElementIndex<2> (int nr) const { int ind = (*mesh)[SurfaceElementIndex(nr)].GetIndex(); return mesh->GetFaceDescriptor(ind).BCProperty(); } template <> DLL_HEADER int Ngx_Mesh :: GetElementIndex<3> (int nr) const { return (*mesh)[ElementIndex(nr)].GetIndex(); } */ /* DLL_HEADER Ng_Point Ng_GetPoint (int nr) { Ng_Point ret; ret.pt = &mesh->Point(nr + PointIndex::BASE)(0); return ret; } template <> DLL_HEADER int Ng_GetElementIndex<1> (int nr) { return (*mesh)[SegmentIndex(nr)].si; } template <> DLL_HEADER int Ng_GetElementIndex<2> (int nr) { int ind = (*mesh)[SurfaceElementIndex(nr)].GetIndex(); return mesh->GetFaceDescriptor(ind).BCProperty(); } template <> DLL_HEADER int Ng_GetElementIndex<3> (int nr) { return (*mesh)[ElementIndex(nr)].GetIndex(); } template <> int DLL_HEADER Ng_GetNElements<0> () { return 0; } template <> int DLL_HEADER Ng_GetNElements<1> () { return mesh->GetNSeg(); } template <> DLL_HEADER int Ng_GetNElements<2> () { return mesh->GetNSE(); } template <> DLL_HEADER int Ng_GetNElements<3> () { return mesh->GetNE(); } template <> DLL_HEADER Ng_Element Ng_GetElement<0> (int nr) { cout << "Netgen does not support 0-D elements" << endl; Ng_Element ret; return ret; } template <> DLL_HEADER Ng_Element Ng_GetElement<1> (int nr) { const Segment & el = mesh->LineSegment (SegmentIndex(nr)); Ng_Element ret; ret.type = NG_ELEMENT_TYPE(el.GetType()); ret.points.num = el.GetNP(); ret.points.ptr = (int*)&(el[0]); ret.vertices.num = 2; ret.vertices.ptr = (int*)&(el[0]); ret.edges.num = 1; ret.edges.ptr = mesh->GetTopology().GetSegmentElementEdgesPtr (nr); ret.faces.num = 0; ret.faces.ptr = NULL; return ret; } template <> DLL_HEADER Ng_Element Ng_GetElement<2> (int nr) { const Element2d & el = mesh->SurfaceElement (SurfaceElementIndex (nr)); Ng_Element ret; ret.type = NG_ELEMENT_TYPE(el.GetType()); ret.points.num = el.GetNP(); ret.points.ptr = (int*)&el[0]; ret.vertices.num = el.GetNV(); ret.vertices.ptr = (int*)&(el[0]); ret.edges.num = MeshTopology::GetNEdges (el.GetType()); ret.edges.ptr = mesh->GetTopology().GetSurfaceElementEdgesPtr (nr); ret.faces.num = MeshTopology::GetNFaces (el.GetType()); ret.faces.ptr = mesh->GetTopology().GetSurfaceElementFacesPtr (nr); return ret; } template <> DLL_HEADER Ng_Element Ng_GetElement<3> (int nr) { const Element & el = mesh->VolumeElement (ElementIndex (nr)); Ng_Element ret; ret.type = NG_ELEMENT_TYPE(el.GetType()); ret.points.num = el.GetNP(); ret.points.ptr = (int*)&el[0]; ret.vertices.num = el.GetNV(); ret.vertices.ptr = (int*)&(el[0]); ret.edges.num = MeshTopology::GetNEdges (el.GetType()); ret.edges.ptr = mesh->GetTopology().GetElementEdgesPtr (nr); ret.faces.num = MeshTopology::GetNFaces (el.GetType()); ret.faces.ptr = mesh->GetTopology().GetElementFacesPtr (nr); return ret; } */ template <> DLL_HEADER void Ngx_Mesh :: ElementTransformation<3,3> (int elnr, const double * xi, double * x, double * dxdxi) const { Point<3> xl(xi[0], xi[1], xi[2]); Point<3> xg; Mat<3,3> dx; mesh->GetCurvedElements().CalcElementTransformation (xl, elnr, xg, dx); if (x) for (int i = 0; i < 3; i++) x[i] = xg(i); if (dxdxi) for (int i=0; i<3; i++) { dxdxi[3*i] = dx(i,0); dxdxi[3*i+1] = dx(i,1); dxdxi[3*i+2] = dx(i,2); } } template <> DLL_HEADER void Ngx_Mesh :: ElementTransformation<2,3> (int elnr, const double * xi, double * x, double * dxdxi) const { Point<2> xl(xi[0], xi[1]); Point<3> xg; Mat<3,2> dx; mesh->GetCurvedElements().CalcSurfaceTransformation (xl, elnr, xg, dx); if (x) for (int i = 0; i < 3; i++) x[i] = xg(i); if (dxdxi) for (int i=0; i<3; i++) { dxdxi[2*i] = dx(i,0); dxdxi[2*i+1] = dx(i,1); } } template <> DLL_HEADER void Ngx_Mesh :: ElementTransformation<1,3> (int elnr, const double * xi, double * x, double * dxdxi) const { Point<3> xg; Vec<3> dx; mesh->GetCurvedElements().CalcSegmentTransformation(xi[0],elnr,xg,dx); if(x) for(int i=0;i<3;i++) x[i] = xg(i); if(dxdxi) for(int i=0;i<3;i++) dxdxi[i] = dx(i); } template <> DLL_HEADER void Ngx_Mesh :: ElementTransformation<0,3> (int elnr, const double * xi, double * x, double * dxdxi) const { PointIndex pi = mesh->pointelements[elnr].pnum; Point<3> xg = mesh->Point(pi); if (x) for(int i=0;i<3;i++) x[i] = xg(i); } template <> DLL_HEADER void Ngx_Mesh :: ElementTransformation<2,2> (int elnr, const double * xi, double * x, double * dxdxi) const { Point<2> xl(xi[0], xi[1]); Point<3> xg; Mat<3,2> dx; mesh->GetCurvedElements().CalcSurfaceTransformation (xl, elnr, xg, dx); if (x) for (int i = 0; i < 2; i++) x[i] = xg(i); if (dxdxi) for (int i=0; i<2; i++) { dxdxi[2*i] = dx(i,0); dxdxi[2*i+1] = dx(i,1); } } template <> DLL_HEADER void Ngx_Mesh :: ElementTransformation<1,2> (int elnr, const double * xi, double * x, double * dxdxi) const { Point<3> xg; Vec<3> dx; mesh->GetCurvedElements().CalcSegmentTransformation (xi[0], elnr, xg, dx); if (x) for (int i = 0; i < 2; i++) x[i] = xg(i); if (dxdxi) for (int i=0; i < 2; i++) dxdxi[i] = dx(i); } template <> DLL_HEADER void Ngx_Mesh :: ElementTransformation<1,1> (int elnr, const double * xi, double * x, double * dxdxi) const { Point<3> xg; Vec<3> dx; mesh->GetCurvedElements().CalcSegmentTransformation (xi[0], elnr, xg, dx); if (x) x[0] = xg(0); if (dxdxi) dxdxi[0] = dx(0); } template <> DLL_HEADER void Ngx_Mesh :: ElementTransformation<0,2> (int elnr, const double *xi, double * x, double * dxdxi) const { PointIndex pnum = mesh->pointelements[elnr].pnum; if (x) for (int i = 0; i< 2; i++) x[i] = (*mesh)[pnum](i); } template <> DLL_HEADER void Ngx_Mesh :: ElementTransformation<0,1> (int elnr, const double * xi, double * x, double * dxdxi) const { PointIndex pnum = mesh->pointelements[elnr].pnum; if (x) x[0] = (*mesh)[pnum](0); // if (dxdxi) dxdxi[0] = 0; // Jacobi-matrix is 1 x 0 !!! } template <> DLL_HEADER void Ngx_Mesh :: MultiElementTransformation<3,3> (int elnr, int npts, const double * xi, size_t sxi, double * x, size_t sx, double * dxdxi, size_t sdxdxi) const { mesh->GetCurvedElements().CalcMultiPointElementTransformation (elnr, npts, xi, sxi, x, sx, dxdxi, sdxdxi); } template <> DLL_HEADER void Ngx_Mesh :: MultiElementTransformation<2,2> (int elnr, int npts, const double * xi, size_t sxi, double * x, size_t sx, double * dxdxi, size_t sdxdxi) const { mesh->GetCurvedElements().CalcMultiPointSurfaceTransformation<2> (elnr, npts, xi, sxi, x, sx, dxdxi, sdxdxi); } template <> DLL_HEADER void Ngx_Mesh :: MultiElementTransformation<2,3> (int elnr, int npts, const double * xi, size_t sxi, double * x, size_t sx, double * dxdxi, size_t sdxdxi) const { mesh->GetCurvedElements().CalcMultiPointSurfaceTransformation<3> (elnr, npts, xi, sxi, x, sx, dxdxi, sdxdxi); } template <> DLL_HEADER void Ngx_Mesh :: MultiElementTransformation<1,3> (int elnr, int npts, const double * xi, size_t sxi, double * x, size_t sx, double * dxdxi, size_t sdxdxi) const { mesh->GetCurvedElements().CalcMultiPointSegmentTransformation<3> (elnr, npts, xi, sxi, x, sx, dxdxi, sdxdxi); } template <> DLL_HEADER void Ngx_Mesh :: MultiElementTransformation<0,3> (int elnr, int npts, const double * xi, size_t sxi, double * x, size_t sx, double * dxdxi, size_t sdxdxi) const { for (int i = 0; i < npts; i++) ElementTransformation<0,3> (elnr, xi+i*sxi, x+i*sx, dxdxi+i*sdxdxi); } template <> DLL_HEADER void Ngx_Mesh :: MultiElementTransformation<1,2> (int elnr, int npts, const double * xi, size_t sxi, double * x, size_t sx, double * dxdxi, size_t sdxdxi) const { mesh->GetCurvedElements().CalcMultiPointSegmentTransformation<2> (elnr, npts, xi, sxi, x, sx, dxdxi, sdxdxi); } template <> DLL_HEADER void Ngx_Mesh :: MultiElementTransformation<1,1> (int elnr, int npts, const double * xi, size_t sxi, double * x, size_t sx, double * dxdxi, size_t sdxdxi) const { for (int i = 0; i < npts; i++) ElementTransformation<1,1> (elnr, xi + i*sxi, x+i*sx, dxdxi+i*sdxdxi); } template <> DLL_HEADER void Ngx_Mesh :: MultiElementTransformation<0,2> (int elnr, int npts, const double * xi, size_t sxi, double * x, size_t sx, double * dxdxi, size_t sdxdxi) const { for (int i = 0; i < npts; i++) ElementTransformation<0,2> (elnr, xi + i*sxi, x+i*sx, dxdxi+i*sdxdxi); } template <> DLL_HEADER void Ngx_Mesh :: MultiElementTransformation<0,1> (int elnr, int npts, const double * xi, size_t sxi, double * x, size_t sx, double * dxdxi, size_t sdxdxi) const { for (int i = 0; i < npts; i++) ElementTransformation<0,1> (elnr, xi + i*sxi, x+i*sx, dxdxi+i*sdxdxi); } void Ngx_Mesh :: GetParentNodes (int ni, int * parents) const { ni++; if (ni <= mesh->mlbetweennodes.Size()) { parents[0] = mesh->mlbetweennodes.Get(ni).I1()-1; parents[1] = mesh->mlbetweennodes.Get(ni).I2()-1; } else parents[0] = parents[1] = -1; } int Ngx_Mesh :: GetParentElement (int ei) const { ei++; if (mesh->GetDimension() == 3) { if (ei <= mesh->mlparentelement.Size()) return mesh->mlparentelement.Get(ei)-1; } else { if (ei <= mesh->mlparentsurfaceelement.Size()) return mesh->mlparentsurfaceelement.Get(ei)-1; } return -1; } int Ngx_Mesh :: GetParentSElement (int ei) const { ei++; if (mesh->GetDimension() == 3) { if (ei <= mesh->mlparentsurfaceelement.Size()) return mesh->mlparentsurfaceelement.Get(ei)-1; } else { return -1; } return -1; } #ifdef __SSE__ #include template<> DLL_HEADER void Ngx_Mesh :: MultiElementTransformation<1,1> (int elnr, int npts, const tAVXd * xi, size_t sxi, tAVXd * x, size_t sx, tAVXd * dxdxi, size_t sdxdxi) const { cout << "multi-eltrafo simd called, 1,1,simd" << endl; } template<> DLL_HEADER void Ngx_Mesh :: MultiElementTransformation<2,2> (int elnr, int npts, const tAVXd * xi, size_t sxi, tAVXd * x, size_t sx, tAVXd * dxdxi, size_t sdxdxi) const { mesh->GetCurvedElements().CalcMultiPointSurfaceTransformation<2> (elnr, npts, reinterpret_cast*> (xi), sxi, reinterpret_cast*> (x), sx, reinterpret_cast*> (dxdxi), sdxdxi); /* for (int i = 0; i < npts; i++) { double hxi[4][2]; double hx[4][2]; double hdxdxi[4][4]; for (int j = 0; j < 4; j++) for (int k = 0; k < 2; k++) hxi[j][k] = ((double*)&(xi[k]))[j]; MultiElementTransformation<2,2> (elnr, 4, &hxi[0][0], 2, &hx[0][0], 2, &hdxdxi[0][0], 4); for (int j = 0; j < 4; j++) for (int k = 0; k < 2; k++) ((double*)&(x[k]))[j] = hx[j][k]; for (int j = 0; j < 4; j++) for (int k = 0; k < 4; k++) ((double*)&(dxdxi[k]))[j] = hdxdxi[j][k]; xi += sxi; x += sx; dxdxi += sdxdxi; } */ } template<> DLL_HEADER void Ngx_Mesh :: MultiElementTransformation<3,3> (int elnr, int npts, const tAVXd * xi, size_t sxi, tAVXd * x, size_t sx, tAVXd * dxdxi, size_t sdxdxi) const { mesh->GetCurvedElements().CalcMultiPointElementTransformation (elnr, npts, reinterpret_cast*> (xi), sxi, reinterpret_cast*> (x), sx, reinterpret_cast*> (dxdxi), sdxdxi); /* for (int i = 0; i < npts; i++) { double hxi[4][3]; double hx[4][3]; double hdxdxi[4][9]; for (int j = 0; j < 4; j++) for (int k = 0; k < 3; k++) hxi[j][k] = ((double*)&(xi[k]))[j]; MultiElementTransformation<3,3> (elnr, 4, &hxi[0][0], 3, &hx[0][0], 3, &hdxdxi[0][0], 9); for (int j = 0; j < 4; j++) for (int k = 0; k < 3; k++) ((double*)&(x[k]))[j] = hx[j][k]; for (int j = 0; j < 4; j++) for (int k = 0; k < 9; k++) ((double*)&(dxdxi[k]))[j] = hdxdxi[j][k]; xi += sxi; x += sx; dxdxi += sdxdxi; } */ } template<> DLL_HEADER void Ngx_Mesh :: MultiElementTransformation<0,2> (int elnr, int npts, const tAVXd *xi, size_t sxi, tAVXd * x, size_t sx, tAVXd * dxdxi, size_t sdxdxi) const { cout << "MultiElementtransformation<0,2> simd not implemented" << endl; } template<> DLL_HEADER void Ngx_Mesh :: MultiElementTransformation<0,1> (int elnr, int npts, const tAVXd * xi, size_t sxi, tAVXd * x, size_t sx, tAVXd * dxdxi, size_t sdxdxi) const { cout << "multi-eltrafo simd called, 0,1,simd" << endl; } template<> DLL_HEADER void Ngx_Mesh :: MultiElementTransformation<1,3> (int elnr, int npts, const tAVXd * xi, size_t sxi, tAVXd * x, size_t sx, tAVXd * dxdxi, size_t sdxdxi) const { mesh->GetCurvedElements().CalcMultiPointSegmentTransformation<3> (elnr, npts, reinterpret_cast*> (xi), sxi, reinterpret_cast*> (x), sx, reinterpret_cast*> (dxdxi), sdxdxi); /* double hxi[4][1]; double hx[4][3]; double hdxdxi[4][3]; for (int j = 0; j<4;j++) hxi[j][0] = ((double*)&(xi[0]))[j]; MultiElementTransformation<1,3> (elnr, 4, &hxi[0][0], 1, &hx[0][0], 3, &hdxdxi[0][0],3); for(int j=0; j<4; j++) for(int k=0; k<3; k++) ((double*)&(x[k]))[j] = hx[j][k]; for(int j=0; j< 4; j++) for (int k = 0; k<3; k++) ((double*) & (dxdxi[k]))[j] = hdxdxi[j][k]; xi += sxi; x += sx; dxdxi += sdxdxi; */ } template<> DLL_HEADER void Ngx_Mesh :: MultiElementTransformation<1,2> (int elnr, int npts, const tAVXd * xi, size_t sxi, tAVXd * x, size_t sx, tAVXd * dxdxi, size_t sdxdxi) const { mesh->GetCurvedElements().CalcMultiPointSegmentTransformation<2> (elnr, npts, reinterpret_cast*> (xi), sxi, reinterpret_cast*> (x), sx, reinterpret_cast*> (dxdxi), sdxdxi); /* for (int i = 0; i < npts; i++) { double hxi[4][1]; double hx[4][2]; double hdxdxi[4][2]; for (int j = 0; j < 4; j++) for (int k = 0; k < 1; k++) hxi[j][k] = ((double*)&(xi[k]))[j]; MultiElementTransformation<1,2> (elnr, 4, &hxi[0][0], 1, &hx[0][0], 2, &hdxdxi[0][0], 2); for (int j = 0; j < 4; j++) for (int k = 0; k < 2; k++) ((double*)&(x[k]))[j] = hx[j][k]; for (int j = 0; j < 4; j++) for (int k = 0; k < 2; k++) ((double*)&(dxdxi[k]))[j] = hdxdxi[j][k]; xi += sxi; x += sx; dxdxi += sdxdxi; } */ } template<> DLL_HEADER void Ngx_Mesh :: MultiElementTransformation<2,3> (int elnr, int npts, const tAVXd * xi, size_t sxi, tAVXd * x, size_t sx, tAVXd * dxdxi, size_t sdxdxi) const { mesh->GetCurvedElements().CalcMultiPointSurfaceTransformation<3> (elnr, npts, reinterpret_cast*> (xi), sxi, reinterpret_cast*> (x), sx, reinterpret_cast*> (dxdxi), sdxdxi); /* for (int i = 0; i < npts; i++) { double hxi[4][2]; double hx[4][3]; double hdxdxi[4][6]; for (int j = 0; j < 4; j++) for (int k = 0; k < 2; k++) hxi[j][k] = ((double*)&(xi[k]))[j]; MultiElementTransformation<2,3> (elnr, 4, &hxi[0][0], 2, &hx[0][0], 3, &hdxdxi[0][0], 6); for (int j = 0; j < 4; j++) for (int k = 0; k < 3; k++) ((double*)&(x[k]))[j] = hx[j][k]; for (int j = 0; j < 4; j++) for (int k = 0; k < 6; k++) ((double*)&(dxdxi[k]))[j] = hdxdxi[j][k]; xi += sxi; x += sx; dxdxi += sdxdxi; } */ } template<> DLL_HEADER void Ngx_Mesh :: MultiElementTransformation<0,3> (int elnr, int npts, const tAVXd * xi, size_t sxi, tAVXd * x, size_t sx, tAVXd * dxdxi, size_t sdxdxi) const { for (int i = 0; i < npts; i++) { double hxi[4][1]; double hx[4][3]; for (int j = 0; j < 4; j++) for (int k = 0; k < 1; k++) hxi[j][k] = ((double*)&(xi[k]))[j]; MultiElementTransformation<0,3> (elnr, 4, &hxi[0][0], 2, &hx[0][0], 3, (double*)nullptr, 0); for (int j = 0; j < 4; j++) for (int k = 0; k < 3; k++) ((double*)&(x[k]))[j] = hx[j][k]; xi += sxi; x += sx; dxdxi += sdxdxi; } } #endif template <> DLL_HEADER int Ngx_Mesh :: FindElementOfPoint <1> (double * hp, double * lami, bool build_searchtree, int * const indices, int numind) const { if (mesh->GetDimension() != 1) throw NgException("FindElementOfPoint<1> called for multidim mesh"); Point<3> p(hp[0], 0,0); for (SegmentIndex si = 0; si < mesh->GetNSeg(); si++) { auto & seg = (*mesh)[si]; Point<3> p1 = (*mesh)[seg[0]]; Point<3> p2 = (*mesh)[seg[1]]; double lam = (p(0)-p1(0)) / (p2(0)-p1(0)); if (lam >= -1e-10 && lam <= 1+1e-10) { lami[0] = 1-lam; return si; } } return -1; } template <> DLL_HEADER int Ngx_Mesh :: FindElementOfPoint <2> (double * p, double * lami, bool build_searchtree, int * const indices, int numind) const { Array dummy(numind); for (int i = 0; i < numind; i++) dummy[i] = indices[i]+1; double lam3[3]; int ind; if (mesh->GetDimension() == 2) { Point<3> p2d(p[0], p[1], 0); ind = mesh->GetElementOfPoint(p2d, lam3, &dummy, build_searchtree); } else { Point3d p3d(p[0], p[1], p[2]); ind = mesh->GetSurfaceElementOfPoint(p3d, lam3, &dummy, build_searchtree); } if (ind > 0) { if(mesh->SurfaceElement(ind).GetType()==QUAD) { lami[0] = lam3[0]; lami[1] = lam3[1]; } else { lami[0] = 1-lam3[0]-lam3[1]; lami[1] = lam3[0]; } } return ind-1; } template <> DLL_HEADER int Ngx_Mesh :: FindElementOfPoint <3> (double * p, double * lami, bool build_searchtree, int * const indices, int numind) const { Array dummy(numind); for (int i = 0; i < numind; i++) dummy[i] = indices[i]+1; Point<3> p3d(p[0], p[1], p[2]); int ind = mesh->GetElementOfPoint(p3d, lami, &dummy, build_searchtree); return ind-1; } void Ngx_Mesh :: Curve (int order) { NgLock meshlock (mesh->MajorMutex(), true); mesh->BuildCurvedElements(order); } void Ngx_Mesh :: Refine (NG_REFINEMENT_TYPE reftype, void (*task_manager)(function), Tracer tracer) { NgLock meshlock (mesh->MajorMutex(), 1); BisectionOptions biopt; biopt.usemarkedelements = 1; biopt.refine_p = 0; biopt.refine_hp = 0; if (reftype == NG_REFINE_P) biopt.refine_p = 1; if (reftype == NG_REFINE_HP) biopt.refine_hp = 1; biopt.task_manager = task_manager; biopt.tracer = tracer; const Refinement & ref = mesh->GetGeometry()->GetRefinement(); ref.Bisect (*mesh, biopt); (*tracer)("call updatetop", false); mesh -> UpdateTopology(task_manager, tracer); (*tracer)("call updatetop", true); mesh -> GetCurvedElements().SetIsHighOrder (false); } #ifdef PARALLEL std::tuple Ngx_Mesh :: GetDistantProcs (int nodetype, int locnum) const { switch (nodetype) { case 0: { FlatArray dn = mesh->GetParallelTopology().GetDistantPNums(locnum); return std::tuple(dn.Size(), &dn[0]); } case 1: { FlatArray dn = mesh->GetParallelTopology().GetDistantEdgeNums(locnum); return std::tuple(dn.Size(), &dn[0]); } case 2: { FlatArray dn = mesh->GetParallelTopology().GetDistantFaceNums(locnum); return std::tuple(dn.Size(), &dn[0]); } default: return std::tuple(0,nullptr); } } #endif } int link_it_nginterface_v2; netgen-6.2.1804/libsrc/interface/writetecplot.cpp0000644000175000017500000000507513272137567020463 0ustar kurtkurt// // // TECPLOT file by Jawor Georgiew // #include #include #include #include #include namespace netgen { #include "writeuser.hpp" void WriteTecPlotFormat (const Mesh & mesh, const CSGeometry & geom, const string & filename) { INDEX i; int j, k, e, z; Vec<3> n; INDEX np = mesh.GetNP(); INDEX ne = mesh.GetNE(); INDEX nse = mesh.GetNSE(); Array sn(np); ofstream outfile(filename.c_str()); outfile << "TITLE=\" " << filename << "\"" << endl; // fill hashtable INDEX_3_HASHTABLE face2volelement(ne); for (i = 1; i <= ne; i++) { const Element & el = mesh.VolumeElement(i); INDEX_3 i3; int l; for (j = 1; j <= 4; j++) // loop over faces of tet { l = 0; for (k = 1; k <= 4; k++) if (k != j) { l++; i3.I(l) = el.PNum(k); } i3.Sort(); face2volelement.Set (i3, i); } } for (j = 1; j <= geom.GetNSurf(); j++) /* Flaeche Nummer j */ { for (i = 1; i <= np; i++) sn.Elem(i) = 0; e = 0; for (i = 1; i <= nse; i++) { const Element2d & el = mesh.SurfaceElement(i); if (j == mesh.GetFaceDescriptor (el.GetIndex ()).SurfNr()) { for (k = 1; k <= 3; k++) sn.Elem(el.PNum(k)) = 1; e++; /* e= Anzahl der neuen Elemente */ } } z = 0; for (i = 1; i <= np; i++) if (sn.Elem(i) == 1) sn.Elem(i) = ++z; outfile << "ZONE T=\" Surface " << j << " \", N=" << z << ", E=" << e << ", ET=TRIANGLE, F=FEPOINT" << endl; for (i = 1; i <= np; i++) if (sn.Elem(i) != 0) { n = geom.GetSurface(j) -> GetNormalVector ( mesh.Point(i) ); outfile << mesh.Point(i)(0) << " " /* Knoten Koordinaten */ << mesh.Point(i)(1) << " " << mesh.Point(i)(2) << " " << n(0) << " " << n(1) << " " << n(2) << " " << i << endl; } for (i = 1; i <= nse; i++) { const Element2d & el = mesh.SurfaceElement(i); if (j == mesh.GetFaceDescriptor(el.GetIndex ()).SurfNr()) /* FlaechenKnoten (3) */ outfile << sn.Get(el.PNum(1)) << " " << sn.Get(el.PNum(2)) << " " << sn.Get(el.PNum(3)) << endl; /// Hier soll noch die Ausgabe der Nummer des angrenzenden /// Vol.elements erfolgen ! for (k = 1; k <= nse; k++) { const Element2d & sel = mesh.SurfaceElement(k); INDEX_3 i3; for (j = 1; j <= 3; j++) i3.I(j) = sel.PNum(j); i3.Sort(); //int elind = face2volelement.Get(i3); } } } } } netgen-6.2.1804/libsrc/interface/writetet.cpp0000644000175000017500000006556613272137567017620 0ustar kurtkurt #include #include #include #include #include #include namespace netgen { #include "writeuser.hpp" void WriteTETFormat (const Mesh & mesh, const string & filename)//, const string& problemType ) { string problemType = ""; if(!mesh.PureTetMesh()) throw NgException("Can only export pure tet mesh in this format"); cout << "starting .tet export to file " << filename << endl; Array point_ids,edge_ids,face_ids; Array elnum(mesh.GetNE()); elnum = -1; Array userdata_int; Array userdata_double; Array ports; Array uid_to_group_3D, uid_to_group_2D, uid_to_group_1D, uid_to_group_0D; int pos_int = 0; int pos_double = 0; bool haveuserdata = (mesh.GetUserData("TETmesh:double",userdata_double) && mesh.GetUserData("TETmesh:int",userdata_int) && mesh.GetUserData("TETmesh:ports",ports) && mesh.GetUserData("TETmesh:point_id",point_ids,PointIndex::BASE) && mesh.GetUserData("TETmesh:uid_to_group_3D",uid_to_group_3D) && mesh.GetUserData("TETmesh:uid_to_group_2D",uid_to_group_2D) && mesh.GetUserData("TETmesh:uid_to_group_1D",uid_to_group_1D) && mesh.GetUserData("TETmesh:uid_to_group_0D",uid_to_group_0D)); int version,subversion; if(haveuserdata) { version = int(userdata_double[0]); subversion = int(10*(userdata_double[0] - version)); pos_double++; } else { version = 2; subversion = 0; } if(version >= 2) { // test if ids are disjunct, if not version 2.0 not possible int maxbc(-1),mindomain(-1); for(ElementIndex i=0; i maxbc) maxbc = mesh.GetFaceDescriptor(i).BCProperty(); if(maxbc >= mindomain) { cout << "WARNING: writing version " << version << "." << subversion << " tetfile not possible, "; version = 1; subversion = 1; cout << "using version " << version << "." << subversion << endl; } } int startsize = point_ids.Size(); point_ids.SetSize(mesh.GetNP()+1); for(int i=startsize; i edgenumbers(6*mesh.GetNE()+3*mesh.GetNSE());; INDEX_3_CLOSED_HASHTABLE facenumbers(4*mesh.GetNE()+mesh.GetNSE()); Array edge2node; Array face2edge; Array element2face; int numelems(0),numfaces(0),numedges(0),numnodes(0); for(SegmentIndex si = 0; si < mesh.GetNSeg(); si++) { const Segment & seg = mesh[si]; INDEX_2 i2(seg[0],seg[1]); i2.Sort(); if(edgenumbers.Used(i2)) continue; numedges++; edgenumbers.Set(i2,numedges); edge2node.Append(i2); edge_ids.Append(seg.edgenr); if(point_ids[seg[0]] == -1) point_ids[seg[0]] = (version >= 2) ? seg.edgenr : 0; if(point_ids[seg[1]] == -1) point_ids[seg[1]] = (version >= 2) ? seg.edgenr : 0; } for(SurfaceElementIndex si = 0; si < mesh.GetNSE(); si++) { if(mesh[si].IsDeleted()) continue; const Element2d & elem = mesh[si]; numfaces++; INDEX_3 i3(elem[0], elem[1], elem[2]); int min = i3[0]; int minpos = 0; for(int j=1; j<3; j++) if(i3[j] < min) { min = i3[j]; minpos = j; } if(minpos == 1) { int aux = i3[0]; i3[0] = i3[1]; i3[1] = i3[2]; i3[2] = aux; } else if(minpos == 2) { int aux = i3[0]; i3[0] = i3[2]; i3[2] = i3[1]; i3[1] = aux; } facenumbers.Set(i3,numfaces); int bc = mesh.GetFaceDescriptor(elem.GetIndex()).BCProperty(); face_ids.Append(bc); for(int j=0; j<3; j++) if(point_ids[elem[j]] == -1) point_ids[elem[j]] = (version >= 2) ? bc : 0; INDEX_2 i2a,i2b; INDEX_3 f_to_n; for(int j=0; j<3; j++) { i2a = INDEX_2(i3[j],i3[(j+1)%3]); i2b[0] = i2a[1]; i2b[1] = i2a[0]; if(edgenumbers.Used(i2a)) f_to_n[j] = edgenumbers.Get(i2a); else if(edgenumbers.Used(i2b)) f_to_n[j] = -edgenumbers.Get(i2b); else { numedges++; edgenumbers.Set(i2a,numedges); edge2node.Append(i2a); f_to_n[j] = numedges; if(version >= 2) edge_ids.Append(bc); else edge_ids.Append(0); } } face2edge.Append(f_to_n); } for(ElementIndex ei = 0; ei < mesh.GetNE(); ei++) { const Element & el = mesh[ei]; if(el.IsDeleted()) continue; numelems++; elnum[ei] = numelems; static int tetfaces[4][3] = { { 0, 2, 1 }, { 0, 1, 3 }, { 1, 2, 3 }, { 2, 0, 3 } }; for(int j=0; j<4; j++) if(point_ids[el[j]] == -1) point_ids[el[j]] = (version >= 2) ? el.GetIndex() : 0; INDEX_4 e_to_f; for(int i = 0; i < 4; i++) { INDEX_3 i3a(el[tetfaces[i][0]],el[tetfaces[i][1]],el[tetfaces[i][2]]); int min = i3a[0]; int minpos = 0; for(int j=1; j<3; j++) if(i3a[j] < min) { min = i3a[j]; minpos = j; } if(minpos == 1) { int aux = i3a[0]; i3a[0] = i3a[1]; i3a[1] = i3a[2]; i3a[2] = aux; } else if(minpos == 2) { int aux = i3a[0]; i3a[0] = i3a[2]; i3a[2] = i3a[1]; i3a[1] = aux; } INDEX_3 i3b(i3a[0],i3a[2],i3a[1]); if(facenumbers.Used(i3a)) e_to_f[i] = facenumbers.Get(i3a); else if(facenumbers.Used(i3b)) e_to_f[i] = -facenumbers.Get(i3b); else { numfaces++; facenumbers.Set(i3a,numfaces); e_to_f[i] = numfaces; if(version >= 2) face_ids.Append(el.GetIndex()); else face_ids.Append(0); INDEX_2 i2a,i2b; INDEX_3 f_to_n; for(int j=0; j<3; j++) { i2a = INDEX_2(i3a[j],i3a[(j+1)%3]); i2b[0] = i2a[1]; i2b[1] = i2a[0]; if(edgenumbers.Used(i2a)) f_to_n[j] = edgenumbers.Get(i2a); else if(edgenumbers.Used(i2b)) f_to_n[j] = -edgenumbers.Get(i2b); else { numedges++; edgenumbers.Set(i2a,numedges); edge2node.Append(i2a); f_to_n[j] = numedges; if(version >= 2) edge_ids.Append(el.GetIndex()); else edge_ids.Append(0); } } face2edge.Append(f_to_n); } } element2face.Append(e_to_f); } ofstream outfile(filename.c_str()); outfile.precision(16); int unitcode; double tolerance; double dS1,dS2, alphaDeg; double x3D,y3D,z3D; int modelverts(0), modeledges(0), modelfaces(0), modelcells(0); int numObj0D,numObj1D,numObj2D,numObj3D; int numports = ports.Size(); Array nodenum(point_ids.Size()+1); nodenum = -1; numnodes = 0; for(int i=0; i* > idmaps; for(int i=1; i<=mesh.GetIdentifications().GetMaxNr(); i++) { if(mesh.GetIdentifications().GetType(i) == Identifications::PERIODIC) { idmaps.Append(new Array); mesh.GetIdentifications().GetMap(i,*idmaps.Last(),true); } } Array id_num,id_type; Array< Array *> id_groups; // sst 2008-03-12: Write problem class... { std::string block; block = "// CST Tetrahedral "; block += !problemType.empty() ? problemType : "High Frequency"; block += " Mesh, Version no.:\n"; size_t size = block.size()-3; block += "// "; block.append( size, '^' ); block += "\n"; outfile << block << version << "." << subversion << "\n\n"; } outfile << "// User Units Code (1=CM 2=MM 3=M 4=MIC 5=NM 6=FT 7=IN 8=MIL):\n" \ << "// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" \ << unitcode << "\n\n" \ << "// Geometric coord \"zero\" tolerance threshold:\n" \ << "// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" \ << tolerance << "\n\n" \ << "// Periodic UnitCell dS1 , dS2 , alphaDeg:\n" \ << "// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" \ << dS1 << " " << dS2 << " " << alphaDeg <<"\n\n" \ << "// Periodic UnitCell origin in global coords (x3D,y3D,z3D):\n" \ << "// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" \ << x3D << " " << y3D << " " << z3D << "\n" << endl; if(version == 2) { outfile << "// Model entity count: Vertices, Edges, Faces, Cells:\n" \ << "// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" \ << modelverts << " " << modeledges << " " << modelfaces << " " << modelcells << endl << endl; } outfile << "// Topological mesh-entity counts (#elements,#faces,#edges,#nodes):\n" \ << "// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n"; outfile << numelems << " " << numfaces << " " << numedges << " " << numnodes << endl << endl; outfile << "// NodeID, X, Y, Z, Type (0=Reg 1=PMaster 2=PSlave 3=CPMaster 4=CPSlave), "<< uidpid <<":\n" \ << "// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n"; id_num.SetSize(mesh.GetNP()+1); id_type.SetSize(mesh.GetNP()+1); id_num = 0; id_type = 0; int n2,n4,n8; n2 = n4 = n8 = 0; for(int i=PointIndex::BASE; i group; group.Append(i); for(int j=0; j 1) { id_groups.Append(new Array(group)); if(group.Size() == 2) { id_type[i] = 1; id_type[group[1]] = 2; n2++; } else if(group.Size() == 4) { id_type[i] = 3; for(int j=1; jSize() != 2) continue; for(int j=0; jSize(); j++) outfile << nodenum[(*id_groups[i])[j]] << " "; for(int j=1; jSize(); j++) outfile << id_num[(*id_groups[i])[j]] << " "; outfile << "\n"; delete id_groups[i]; id_groups[i] = NULL; } outfile << endl; outfile << "// Number of Corner Periodic Master Nodes:\n" \ << "// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" \ << n4 << "\n" \ << "\n" \ << "// MasterNodeID, 3-SlaveNodeID's, 3-TranslCodes (1=dS1 2=dS2 3=dS1+dS2):\n" \ << "// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n"; for(int i=0; iSize() != 4) continue; for(int j=0; jSize(); j++) outfile << nodenum[(*id_groups[i])[j]] << " "; for(int j=1; jSize(); j++) { outfile << id_num[(*id_groups[i])[j]] << " "; } outfile << "\n"; delete id_groups[i]; id_groups[i] = NULL; } outfile << endl; outfile << "// Number of Cubic Periodic Master Nodes:\n" \ << "// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" \ << n8 << "\n" \ << "\n" \ << "// MasterNodeID, 7-SlaveNodeID's, TranslCodes:\n" \ << "// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n"; for(int i=0; iSize() != 8) continue; for(int j=0; jSize(); j++) outfile << nodenum[(*id_groups[i])[j]] << " "; for(int j=1; jSize(); j++) outfile << id_num[(*id_groups[i])[j]] << " "; outfile << "\n"; delete id_groups[i]; id_groups[i] = NULL; } outfile << endl; outfile << "// EdgeID, NodeID0, NodeID1, Type (0=Reg 1=PMaster 2=PSlave 3=CPMaster 4=CPSlave), "<* > vertex_to_edge(mesh.GetNP()+1); for(int i=0; i<=mesh.GetNP(); i++) vertex_to_edge[i] = new Array; Array< Array* > idmaps_edge(idmaps.Size()); for(int i=0; i(numedges); (*idmaps_edge[i]) = 0; } Array possible; for(int i=0; i 0) { cerr << "ERROR: too many possible edge identifications" << endl; (*testout) << "ERROR: too many possible edge identifications" << endl << "*vertex_to_edge["<Append(i+1); vertex_to_edge[v[1]]->Append(i+1); } for(int i=0; i group; group.Append(i); for(int j=0; j 1) { id_num[i] = 1; id_groups.Append(new Array(group)); if(group.Size() == 2) { id_type[i] = 1; id_type[group[1]] = 2; n2++; } else if(group.Size() == 4) { id_type[i] = 3; for(int j=1; j group; group.Append(i); for(int j=0; j 1) { id_num[i] = 1; id_groups.Append(new Array(group)); if(group.Size() == 2) { id_type[i] = 1; id_type[group[1]] = 2; n2++; } else if(group.Size() == 4) { id_type[i] = 3; for(int j=1; jSize() != 2) continue; for(int j=0; jSize(); j++) outfile << (*id_groups[i])[j] << " "; for(int j=1; jSize(); j++) outfile << id_num[(*id_groups[i])[j]] << " "; outfile << "\n"; delete id_groups[i]; id_groups[i] = NULL; } outfile << endl; outfile << "// Number of Corner Periodic Master Edges:\n" \ << "// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n"\ << n4 << "\n" \ << "\n"\ << "// MasterEdgeID, 3 SlaveEdgeID's, 3 TranslCode (1=dS1 2=dS2 3=dS1+dS2):\n"\ << "// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n"; for(int i=0; iSize() != 4) continue; for(int j=0; jSize(); j++) outfile << (*id_groups[i])[j] << " "; for(int j=1; jSize(); j++) outfile << id_num[(*id_groups[i])[j]] << " "; outfile << "\n"; delete id_groups[i]; id_groups[i] = NULL; } outfile << endl; outfile << "// FaceID, EdgeID0, EdgeID1, EdgeID2, FaceType (0=Reg 1=PMaster 2=PSlave), "<* > edge_to_face(numedges+1); for(int i=0; i; for(int i=0; iSetSize(numfaces); (*idmaps[i]) = 0; } for(int i=0; i 0) cerr << "ERROR: too many possible face identifications" << endl; } } edge_to_face[abs(face2edge[i][0])]->Append(i+1); edge_to_face[abs(face2edge[i][1])]->Append(i+1); edge_to_face[abs(face2edge[i][2])]->Append(i+1); } for(int i=0; i group; group.Append(i); for(int j=0; j 1) { id_num[i] = -1; id_groups.Append(new Array(group)); if(group.Size() == 2) n2++; else cerr << "ERROR: face identification group size = " << group.Size() << endl; } } for(int i=0; iSize() != 2) continue; for(int j=0; jSize(); j++) outfile << (*id_groups[i])[j] << " "; for(int j=1; jSize(); j++) outfile << id_num[(*id_groups[i])[j]] << " "; outfile << "\n"; delete id_groups[i]; } outfile << endl; outfile << "// ElemID, FaceID0, FaceID1, FaceID2, FaceID3, "<= 0) { outfile << elnum[i] << " "; for(int j=0; j<4; j++) outfile << element2face[elnum[i]-1][j] << " "; outfile << mesh[i].GetIndex() << "\n"; } } outfile << endl; outfile << "// ElemID, NodeID0, NodeID1, NodeID2, NodeID3:\n" \ << "// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n"; for(ElementIndex i=0; i= 0) outfile << elnum[i] << " " << nodenum[mesh[i][1]] << " " << nodenum[mesh[i][0]] << " " << nodenum[mesh[i][2]] << " " << nodenum[mesh[i][3]] << "\n"; } outfile << endl; outfile << "// Physical Object counts (#Obj3D,#Obj2D,#Obj1D,#Obj0D):\n" << "// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" << " "<< numObj3D << " " << numObj2D << " " << numObj1D << " " << numObj0D << "\n" \ << "\n" \ << "// Number of Ports (Ports are a subset of Object2D list):\n" \ << "// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" \ << numports << "\n" \ << endl; Array< Array * > groups; int maxg = -1; for(int i = 0; i maxg) maxg = uid_to_group_3D[i]; for(int i = 0; i maxg) maxg = uid_to_group_2D[i]; for(int i = 0; i maxg) maxg = uid_to_group_1D[i]; for(int i = 0; i maxg) maxg = uid_to_group_0D[i]; groups.SetSize(maxg+1); for(int i=0; i; for(ElementIndex i=0; i= 0) groups[uid_to_group_3D[mesh[i].GetIndex()]]->Append(i+1); outfile << "// Object3D GroupID, #Elems ElemID List:\n" \ << "// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n"; for(int i=0; iSize() << "\n"; for(int j=0; jSize(); j++) outfile << (*groups[i])[j] << "\n"; } for(int i=0; iSetSize(0); for(int i=0; i= 0) groups[uid_to_group_2D[face_ids[i]]]->Append(i+1); outfile << "// Object2D GroupID, #Faces FaceID List:\n" \ << "// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n"; for(int i=0; iSize() << "\n"; for(int j=0; jSize(); j++) { outfile << (*groups[i])[j]; if(ports.Contains(face_ids[(*groups[i])[j]-1])) outfile << " P"; outfile << "\n"; } } outfile << endl; for(int i=0; iSetSize(0); for(int i=0; i= 0) groups[uid_to_group_1D[edge_ids[i]]]->Append(i+1); outfile << "// Object1D GroupID, #Edges EdgeID List:\n" \ << "// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n"; for(int i=0; iSize() << "\n"; for(int j=0; jSize(); j++) outfile << (*groups[i])[j] << "\n"; } outfile << endl; for(int i=0; iSetSize(0); for(PointIndex i = mesh.Points().Begin(); i < mesh.Points().End(); i++) { if(i-PointIndex::BASE < point_ids.Size()) { if(uid_to_group_0D[point_ids[i]] >= 0) groups[uid_to_group_0D[point_ids[i]]]->Append(i+1-PointIndex::BASE); } else groups[uid_to_group_0D[0]]->Append(i+1-PointIndex::BASE); } outfile << "// Object0D GroupID, #Nodes NodeID List:\n" \ << "// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n"; for(int i=0; iSize() << "\n"; for(int j=0; jSize(); j++) outfile << (*groups[i])[j] << "\n"; } outfile << endl; for(int i=0; i #include #include #include #include #include namespace netgen { #include "writeuser.hpp" bool ReadLine (istream & in, string & buf) { do { buf = ""; while (in.good()) { char ch = in.get(); if (ch == '\n') break; if (ch == '\r') break; if (ch == '\\') { // while (iswhite (ch = in.get() ) ch = in.get(); // '\n' CR ch = in.get(); // '\n' LF } else buf += ch; } } while (in.good() && (buf == "" || buf[0] == '#')); return in.good(); } class LoadType { public: int id; string name; string placement; string valuetype; Array places; }; void ReadFNFFormat (Mesh & mesh, const string & filename) { ifstream fin (filename.c_str()); string buf; mesh.SetDimension (3); while (ReadLine (fin, buf)) { stringstream sbuf(buf); string start_sect, token; char ch; sbuf >> start_sect; if (start_sect == "%START_SECT") { sbuf >> ch >> token; if (token == "HEADER") { while (1) { ReadLine (fin, buf); stringstream sbuf(buf); string token; sbuf >> token; if (token == "%TITLE") { char ch; string name; sbuf >> ch >> name; cout << "Title: " << name << endl; } else if (token == "%STATISTICS") { ; } else if (token == "%END_SECT") { break; } else { cout << "SECTION HEADER, unknown field: " << buf << endl; } } } else if (token == "ELEM_TYPES") { while (1) { ReadLine (fin, buf); stringstream sbuf(buf); string token; sbuf >> token; if (token == "%ELEM_TYPE") { int nr; string def; char ch; sbuf >> nr >> def >> ch; if (def == "DEF") { string classname, type; sbuf >> classname >> type; if (classname != "SOLID" || type != "TETRA") cerr << "Element not supported: " << buf << endl; } } else if (token == "%END_SECT") { break; } else { cout << "SECTION ELEM_TYPE, unknown field: " << buf << endl; } } } else if (token == "COORD_SYSTEMS") { while (1) { ReadLine (fin, buf); stringstream sbuf(buf); string token; sbuf >> token; if (token == "%END_SECT") { break; } else { // cout << "COORD_SYSTEMS, unknown field: " << buf << endl; } } } else if (token == "MATERIALS") { *testout << "parse materials" << endl; Array young_modulus, poisson_ratio, mass_density; while (1) { ReadLine (fin, buf); stringstream sbuf(buf); string token; sbuf >> token; if (token == "%MATERIAL") { int nr; string prop; char ch; double val; sbuf >> nr >> prop >> ch; if (prop == "DEF") { ; } else { sbuf >> val; *testout << "prop = " << prop << ", val = " << val << endl; if (prop == "YOUNG_MODULUS") young_modulus.Append (val); else if (prop == "POISSON_RATIO") poisson_ratio.Append (val); else if (prop == "MASS_DENSITY") mass_density.Append (val); } } else if (token == "%END_SECT") { mesh.SetUserData ("YOUNG_MODULUS", young_modulus); mesh.SetUserData ("POISSON_RATIO", poisson_ratio); mesh.SetUserData ("MASS_DENSITY", mass_density); *testout << "young = " << young_modulus << endl; *testout << "poisson = " << poisson_ratio << endl; break; } else { cout << "SECTION MATERIALS, unknown field: " << buf << endl; } } } else if (token == "MESH") { while (1) { ReadLine (fin, buf); stringstream sbuf(buf); string token; sbuf >> token; if (token == "%NODE") { string st; char ch; int nr, ks_id; double x,y,z; sbuf >> nr >> st >> ch >> x >> y >> z >> ks_id; mesh.AddPoint (Point3d (x,y,z) ); } else if (token == "%ELEM") { string elemid, def; char ch; int elnr, typid, matid; string propid; sbuf >> elnr >> def >> ch; sbuf >> typid >> matid >> propid; Array pnums; while (1) { int pn; sbuf >> pn; if (!sbuf.good()) break; pnums.Append (pn); } int pe2ng [] = { 0, 1, 2, 3, 4, 7, 5, 6, 8, 9 }; Element el(pnums.Size()); for (int j = 0; j < pnums.Size(); j++) el[pe2ng[j]] = pnums[j]; el.SetIndex (matid); mesh.AddVolumeElement (el); } else if (token == "%END_SECT") { break; } else { cout << "SECTION MESH, unknown: " << buf << endl; } } } else if (token == "MESH_TOPOLOGY") { while (1) { ReadLine (fin, buf); stringstream sbuf(buf); string token, kw; int nr; char ch; sbuf >> token; if (token == "%EDGE") { sbuf >> nr >> kw >> ch; if (kw == "NODES") { Array enums; while (1) { int en; sbuf >> en; if (!sbuf.good()) break; enums.Append (en); } for (int j = 0; j+2 < enums.Size(); j+=2) { Segment seg; seg[0] = enums[j]; seg[1] = enums[j+2]; seg[2] = enums[j+1]; seg.edgenr = nr; mesh.AddSegment (seg); } } } else if (token == "%SURFACE") { sbuf >> nr >> kw >> ch; if (kw == "FACES") { Array fnums; while (1) { int fn; sbuf >> fn; if (!sbuf.good()) break; fnums.Append (fn); } FaceDescriptor fd(-1, -1, -1, -1); fd.SetBCProperty (nr); *testout << "add fd " << mesh.GetNFD() << ", nr = " << nr << endl; mesh.AddFaceDescriptor (fd); for (int j = 0; j < fnums.Size(); j += 2) { int elnr = fnums[j]; int fnr = fnums[j+1]; const Element & el = mesh.VolumeElement (elnr); Element2d el2d; el.GetFace (fnr, el2d); el2d.SetIndex (nr); mesh.AddSurfaceElement (el2d); } } } else if (token == "%END_SECT") { break; } else { cout << "SECTION MESH, unknown: " << buf << endl; } } } else if (token == "LOADS") { Array loadtypes; while (1) { ReadLine (fin, buf); stringstream sbuf(buf); string token; sbuf >> token; if (token == "%LOAD_TYPE") { string def; char ch; LoadType * lt = new LoadType; sbuf >> lt->id >> def >> ch >> lt->name >> lt->placement >> lt->valuetype; if (lt->name == "DISPLACEMENT") cout << "loadtype DISPLACEMENT found" << endl; if (lt->placement != "FACE" && lt->placement != "EDGE" && lt->placement != "NODE") cout << "unsupported placement " << lt->placement << endl; loadtypes.Append (lt); } else if (token == "%LOAD") { int id; string def; char ch; int placement; int load_type_id, con_case_id; sbuf >> id >> def >> ch; if (def == "DEF") { sbuf >> load_type_id >> con_case_id; } if (def == "VAL") { sbuf >> placement; for (int i = 0; i < loadtypes.Size(); i++) if (load_type_id == loadtypes[i]->id) loadtypes[i]->places.Append (placement); } } else if (token == "%END_SECT") { for (int i = 0; i < loadtypes.Size(); i++) { if (loadtypes[i]->placement == "FACE" && loadtypes[i]->name == "DISPLACEMENT") { mesh.SetUserData ("CONSTRAINT_DISP_FACE", loadtypes[i]->places); cout << "constrained faces: " << loadtypes[i]->places << endl; } if (loadtypes[i]->placement == "EDGE" && loadtypes[i]->name == "DISPLACEMENT") { mesh.SetUserData ("CONSTRAINT_DISP_EDGE", loadtypes[i]->places); cout << "constrained edges: " << loadtypes[i]->places << endl; } if (loadtypes[i]->placement == "NODE" && loadtypes[i]->name == "DISPLACEMENT") { mesh.SetUserData ("CONSTRAINT_DISP_NODE", loadtypes[i]->places); cout << "constrained nodes: " << loadtypes[i]->places << endl; } } break; } else { cout << "SECTION LOADS, unknown field: " << buf << endl; } } } else { cout << "unknown section " << token << endl; } } else cout << "parse line: (" << buf << ")" << endl; } } } netgen-6.2.1804/libsrc/interface/readuser.cpp0000644000175000017500000002435413272137567017551 0ustar kurtkurt// // Read user dependent output file // #include #include #include #include #include #include "writeuser.hpp" namespace netgen { void ReadFile (Mesh & mesh, const string & hfilename) { cout << "Read User File" << endl; const char * filename = hfilename.c_str(); char reco[100]; int np, nbe; // ".surf" - mesh if ( (strlen (filename) > 5) && strcmp (&filename[strlen (filename)-5], ".surf") == 0 ) { cout << "Surface file" << endl; ifstream in (filename); in >> reco; in >> np; for (int i = 1; i <= np; i++) { Point3d p; in >> p.X() >> p.Y() >> p.Z(); p.Z() *= 10; mesh.AddPoint (p); } mesh.ClearFaceDescriptors(); mesh.AddFaceDescriptor (FaceDescriptor(0,1,0,0)); in >> nbe; // int invert = globflags.GetDefineFlag ("invertsurfacemesh"); for (int i = 1; i <= nbe; i++) { Element2d el; el.SetIndex(1); for (int j = 1; j <= 3; j++) { in >> el.PNum(j); // el.PNum(j)++; if (el.PNum(j) < PointIndex(1) || el.PNum(j) > PointIndex(np)) { cerr << "Point Number " << el.PNum(j) << " out of range 1..." << np << endl; return; } } /* if (invert) swap (el.PNum(2), el.PNum(3)); */ mesh.AddSurfaceElement (el); } cout << "points: " << np << " faces: " << nbe << endl; } if ( (strlen (filename) > 4) && strcmp (&filename[strlen (filename)-4], ".unv") == 0 ) { char reco[100]; // int invert; ifstream in(filename); mesh.ClearFaceDescriptors(); mesh.AddFaceDescriptor (FaceDescriptor(0,1,0,0)); while (in.good()) { in >> reco; cout << "reco = " << reco << endl; if (strcmp (reco, "2411") == 0) { cout << "nodes found" << endl; while (1) { int pi, hi; Point<3> p; in >> pi; if (pi == -1) break; in >> hi >> hi >> hi; in >> p(0) >> p(1) >> p(2); cout << "p(" << pi << ") = " << p << endl; mesh.AddPoint (p); } cout << "read " << mesh.GetNP() << " points" << endl; } if (strcmp (reco, "2412") == 0) { cout << "elements found" << endl; while (1) { int label, fe_id, phys_prop, mat_prop, color, nnodes; int nodes[100]; int hi; in >> label; if (label == -1) break; in >> fe_id >> phys_prop >> mat_prop >> color >> nnodes; cout << "fe_id = " << fe_id << " col = " << color << ", nnodes = " << nnodes << endl; if (fe_id >= 11 && fe_id <= 32) in >> hi >> hi >> hi; for (int j = 0; j < nnodes; j++) in >> nodes[j]; switch (fe_id) { case 41: { Element2d el (TRIG); el.SetIndex (1); for (int j = 0; j < nnodes; j++) el[j] = nodes[j]; mesh.AddSurfaceElement (el); break; } case 111: { Element el (TET); el.SetIndex (1); for (int j = 0; j < nnodes; j++) el[j] = nodes[j]; mesh.AddVolumeElement (el); break; } } } } } Point3d pmin, pmax; mesh.GetBox (pmin, pmax); cout << "bounding-box = " << pmin << "-" << pmax << endl; } // fepp format2d: if ( (strlen (filename) > 7) && strcmp (&filename[strlen (filename)-7], ".mesh2d") == 0 ) { cout << "Reading FEPP2D Mesh" << endl; char buf[100]; int np, ne, nseg, i, j; ifstream in (filename); in >> buf; in >> nseg; for (i = 1; i <= nseg; i++) { int bound, p1, p2; in >> bound >> p1 >> p2; // forget them } in >> ne; for (i = 1; i <= ne; i++) { int mat, nelp; in >> mat >> nelp; Element2d el (nelp == 3 ? TRIG : QUAD); el.SetIndex (mat); for (j = 1; j <= nelp; j++) in >> el.PNum(j); mesh.AddSurfaceElement (el); } in >> np; for (i = 1; i <= np; i++) { Point3d p(0,0,0); in >> p.X() >> p.Y(); mesh.AddPoint (p); } } else if ( (strlen (filename) > 5) && strcmp (&filename[strlen (filename)-5], ".mesh") == 0 ) { cout << "Reading Neutral Format" << endl; int np, ne, nse, i, j; ifstream in (filename); in >> np; if (in.good()) { // file starts with an integer for (i = 1; i <= np; i++) { Point3d p(0,0,0); in >> p.X() >> p.Y() >> p.Z(); mesh.AddPoint (p); } in >> ne; for (i = 1; i <= ne; i++) { int mat; in >> mat; Element el (4); el.SetIndex (mat); for (j = 1; j <= 4; j++) in >> el.PNum(j); mesh.AddVolumeElement (el); } mesh.AddFaceDescriptor (FaceDescriptor (1, 1, 0, 0)); int nfd = 1; in >> nse; for (i = 1; i <= nse; i++) { int mat; // , nelp; in >> mat; Element2d el (TRIG); el.SetIndex (mat); while(nfd> el.PNum(j); mesh.AddSurfaceElement (el); } } else { char buf[100]; in.clear(); do { in >> buf; cout << "buf = " << buf << endl; if (strcmp (buf, "points") == 0) { in >> np; cout << "np = " << np << endl; } } while (in.good()); } } if ( (strlen (filename) > 4) && strcmp (&filename[strlen (filename)-4], ".emt") == 0 ) { ifstream inemt (filename); string pktfile = filename; int len = strlen (filename); pktfile[len-3] = 'p'; pktfile[len-2] = 'k'; pktfile[len-1] = 't'; cout << "pktfile = " << pktfile << endl; int np, nse, i; int bcprop; ifstream inpkt (pktfile.c_str()); inpkt >> np; Array values(np); for (i = 1; i <= np; i++) { Point3d p(0,0,0); inpkt >> p.X() >> p.Y() >> p.Z() >> bcprop >> values.Elem(i); mesh.AddPoint (p); } mesh.ClearFaceDescriptors(); mesh.AddFaceDescriptor (FaceDescriptor(0,1,0,0)); mesh.GetFaceDescriptor(1).SetBCProperty (1); mesh.AddFaceDescriptor (FaceDescriptor(0,1,0,0)); mesh.GetFaceDescriptor(2).SetBCProperty (2); mesh.AddFaceDescriptor (FaceDescriptor(0,1,0,0)); mesh.GetFaceDescriptor(3).SetBCProperty (3); mesh.AddFaceDescriptor (FaceDescriptor(0,1,0,0)); mesh.GetFaceDescriptor(4).SetBCProperty (4); mesh.AddFaceDescriptor (FaceDescriptor(0,1,0,0)); mesh.GetFaceDescriptor(5).SetBCProperty (5); int p1, p2, p3; double value; inemt >> nse; for (i = 1; i <= nse; i++) { inemt >> p1 >> p2 >> p3 >> bcprop >> value; if (bcprop < 1 || bcprop > 4) cerr << "bcprop out of range, bcprop = " << bcprop << endl; p1++; p2++; p3++; if (p1 < 1 || p1 > np || p2 < 1 || p2 > np || p3 < 1 || p3 > np) { cout << "p1 = " << p1 << " p2 = " << p2 << " p3 = " << p3 << endl; } if (i > 110354) Swap (p2, p3); if (mesh.Point(p1)(0) < 0.25) Swap (p2,p3); Element2d el(TRIG); if (bcprop == 1) { if (values.Get(p1) < -69999) el.SetIndex(1); else el.SetIndex(2); } else el.SetIndex(3); el.PNum(1) = p1; el.PNum(2) = p2; el.PNum(3) = p3; mesh.AddSurfaceElement (el); } ifstream incyl ("ngusers/guenter/cylinder.surf"); int npcyl, nsecyl; incyl >> npcyl; cout << "npcyl = " << npcyl << endl; for (i = 1; i <= npcyl; i++) { Point3d p(0,0,0); incyl >> p.X() >> p.Y() >> p.Z(); mesh.AddPoint (p); } incyl >> nsecyl; cout << "nsecyl = " << nsecyl << endl; for (i = 1; i <= nsecyl; i++) { incyl >> p1 >> p2 >> p3; p1 += np; p2 += np; p3 += np; Element2d el(TRIG); el.SetIndex(5); el.PNum(1) = p1; el.PNum(2) = p2; el.PNum(3) = p3; mesh.AddSurfaceElement (el); } } // .tet mesh if ( (strlen (filename) > 4) && strcmp (&filename[strlen (filename)-4], ".tet") == 0 ) { ReadTETFormat (mesh, filename); } // .fnf mesh (FNF - PE neutral format) if ( (strlen (filename) > 4) && strcmp (&filename[strlen (filename)-4], ".fnf") == 0 ) { ReadFNFFormat (mesh, filename); } } } netgen-6.2.1804/libsrc/interface/CMakeLists.txt0000644000175000017500000000142213272137567017762 0ustar kurtkurtadd_definitions(-DNGINTERFACE_EXPORTS) add_library(interface ${NG_LIB_TYPE} nginterface.cpp nginterface_v2.cpp read_fnf_mesh.cpp readtetmesh.cpp readuser.cpp writeabaqus.cpp writediffpack.cpp writedolfin.cpp writeelmer.cpp writefeap.cpp writefluent.cpp writegmsh.cpp writejcm.cpp writepermas.cpp writetecplot.cpp writetet.cpp writetochnog.cpp writeuser.cpp wuchemnitz.cpp writegmsh2.cpp writeOpenFOAM15x.cpp ) if(NOT WIN32) target_link_libraries(interface mesh csg geom2d) if(USE_GUI) target_link_libraries(interface visual) endif(USE_GUI) install( TARGETS interface ${NG_INSTALL_DIR}) endif(NOT WIN32) install(FILES writeuser.hpp DESTINATION ${NG_INSTALL_DIR_INCLUDE}/interface COMPONENT netgen_devel ) netgen-6.2.1804/libsrc/visualization/0000755000175000017500000000000013272137567016164 5ustar kurtkurtnetgen-6.2.1804/libsrc/visualization/vssolution.cpp0000644000175000017500000043332213272137567021124 0ustar kurtkurt#include #include #include #include #include // #include #include #include namespace netgen { DLL_HEADER VisualSceneSolution & GetVSSolution() { static VisualSceneSolution vssolution; return vssolution; } // extern shared_ptr mesh; extern VisualSceneMesh vsmesh; void AddUserVisualizationObject (UserVisualizationObject * vis) { // vssolution.AddUserVisualizationObject (vis); GetVSSolution().AddUserVisualizationObject (vis); } VisualSceneSolution :: SolData :: SolData () : data (0), solclass(0) { ; } VisualSceneSolution :: SolData :: ~SolData () { // delete [] name; delete data; delete solclass; } VisualSceneSolution :: VisualSceneSolution () : VisualScene() { // cout << "init VisualSceneSolution" << endl; surfellist = 0; linelist = 0; element1dlist = 0; clipplanelist_scal = 0; clipplanelist_vec = 0; isolinelist = 0; clipplane_isolinelist = 0; surface_vector_list = 0; isosurface_list = 0; fieldlineslist = 0; pointcurvelist = 0; num_fieldlineslists = 0; surfeltimestamp = GetTimeStamp(); surfellinetimestamp = GetTimeStamp(); clipplanetimestamp = GetTimeStamp(); solutiontimestamp = GetTimeStamp(); fieldlinestimestamp = GetTimeStamp(); pointcurve_timestamp = GetTimeStamp(); surface_vector_timestamp = GetTimeStamp(); isosurface_timestamp = GetTimeStamp(); timetimestamp = GetTimeStamp(); // AddVisualizationScene ("solution", &vssolution); } VisualSceneSolution :: ~VisualSceneSolution () { // cout << "exit VisualSceneSolution" << endl; ClearSolutionData(); } /* void VisualSceneSolution :: SetMesh (shared_ptr amesh) { wp_mesh = amesh; } */ void VisualSceneSolution :: AddSolutionData (SolData * sd) { shared_ptr mesh = GetMesh(); NgLock meshlock1 (mesh->MajorMutex(), 1); int funcnr = -1; for (int i = 0; i < soldata.Size(); i++) { // if (strcmp (soldata[i]->name, sd->name) == 0) if (soldata[i]->name == sd->name) { delete soldata[i]; soldata[i] = sd; funcnr = i; break; } } if (funcnr == -1) { soldata.Append (sd); funcnr = soldata.Size()-1; } SolData * nsd = soldata[funcnr]; nsd->size = 0; if (mesh) { switch (nsd->soltype) { case SOL_NODAL: nsd->size = mesh->GetNV(); break; case SOL_ELEMENT: nsd->size = mesh->GetNE(); break; case SOL_SURFACE_ELEMENT: nsd->size = mesh->GetNSE(); break; case SOL_NONCONTINUOUS: { switch (nsd->order) { case 0: nsd->size = mesh->GetNE(); break; case 1: nsd->size = 6 * mesh->GetNE(); break; case 2: nsd->size = 18 * mesh->GetNE(); break; } break; } case SOL_SURFACE_NONCONTINUOUS: { switch (nsd->order) { case 0: nsd->size = mesh->GetNSE(); break; case 1: nsd->size = 4 * mesh->GetNSE(); break; case 2: nsd->size = 9 * mesh->GetNSE(); break; } break; } default: nsd->size = 0; } solutiontimestamp = NextTimeStamp(); } } void VisualSceneSolution :: ClearSolutionData () { for (int i = 0; i < soldata.Size(); i++) delete soldata[i]; soldata.SetSize (0); } void VisualSceneSolution :: UpdateSolutionTimeStamp () { solutiontimestamp = NextTimeStamp(); } VisualSceneSolution::SolData * VisualSceneSolution :: GetSolData (int i) { if (i >= 0 && i < soldata.Size()) return soldata[i]; else return NULL; } void VisualSceneSolution :: SaveSolutionData (const char * filename) { shared_ptr mesh = GetMesh(); PrintMessage (1, "Write solution data to file ", filename); if (strcmp (&filename[strlen(filename)-3], "sol") == 0) { ofstream ost(filename); for (int i = 0; i < soldata.Size(); i++) { const SolData & sol = *soldata[i]; ost << "solution " << sol.name << " -size=" << sol.size << " -components=" << sol.components << " -order=" << sol.order; if (sol.iscomplex) ost << " -complex"; switch (sol.soltype) { case SOL_NODAL: ost << " -type=nodal"; break; case SOL_ELEMENT: ost << " -type=element"; break; case SOL_SURFACE_ELEMENT: ost << " -type=surfaceelement"; break; case SOL_NONCONTINUOUS: ost << " -type=noncontinuous"; break; case SOL_SURFACE_NONCONTINUOUS: ost << " -type=surfacenoncontinuous"; break; default: cerr << "save solution data, case not handeld" << endl; } ost << endl; for (int j = 0; j < sol.size; j++) { for (int k = 0; k < sol.components; k++) ost << sol.data[j*sol.dist+k] << " "; ost << "\n"; } } } if (strcmp (&filename[strlen(filename)-3], "vtk") == 0) { string surf_fn = filename; surf_fn.erase (strlen(filename)-4); surf_fn += "_surf.vtk"; cout << "surface mesh = " << surf_fn << endl; ofstream surf_ost(surf_fn.c_str()); surf_ost << "# vtk DataFile Version 1.0\n" << "NGSolve surface mesh\n" << "ASCII\n" << "DATASET UNSTRUCTURED_GRID\n\n"; surf_ost << "POINTS " << mesh->GetNP() << " float\n"; for (PointIndex pi = PointIndex::BASE; pi < mesh->GetNP()+PointIndex::BASE; pi++) { const MeshPoint & mp = (*mesh)[pi]; surf_ost << mp(0) << " " << mp(1) << " " << mp(2) << "\n"; } int cntverts = 0; for (SurfaceElementIndex sei = 0; sei < mesh->GetNSE(); sei++) cntverts += 1 + (*mesh)[sei].GetNP(); surf_ost << "\nCELLS " << mesh->GetNSE() << " " << cntverts << "\n"; for (SurfaceElementIndex sei = 0; sei < mesh->GetNSE(); sei++) { const Element2d & el = (*mesh)[sei]; surf_ost << el.GetNP(); for (int j = 0; j < el.GetNP(); j++) surf_ost << " " << el[j] - PointIndex::BASE; surf_ost << "\n"; } surf_ost << "\nCELL_TYPES " << mesh->GetNSE() << "\n"; for (SurfaceElementIndex sei = 0; sei < mesh->GetNSE(); sei++) { const Element2d & el = (*mesh)[sei]; switch (el.GetType()) { case QUAD: surf_ost << 9; break; case TRIG: surf_ost << 5; break; default: cerr << "not implemented 2378" << endl; } surf_ost << "\n"; } ofstream ost(filename); ost << "# vtk DataFile Version 1.0\n" << "NGSolve solution\n" << "ASCII\n" << "DATASET UNSTRUCTURED_GRID\n\n"; ost << "POINTS " << mesh->GetNP() << " float\n"; for (PointIndex pi = PointIndex::BASE; pi < mesh->GetNP()+PointIndex::BASE; pi++) { const MeshPoint & mp = (*mesh)[pi]; ost << mp(0) << " " << mp(1) << " " << mp(2) << "\n"; } cntverts = 0; for (ElementIndex ei = 0; ei < mesh->GetNE(); ei++) cntverts += 1 + (*mesh)[ei].GetNP(); ost << "\nCELLS " << mesh->GetNE() << " " << cntverts << "\n"; for (ElementIndex ei = 0; ei < mesh->GetNE(); ei++) { const Element & el = (*mesh)[ei]; ost << el.GetNP(); for (int j = 0; j < el.GetNP(); j++) ost << " " << el[j] - PointIndex::BASE; ost << "\n"; } ost << "\nCELL_TYPES " << mesh->GetNE() << "\n"; for (ElementIndex ei = 0; ei < mesh->GetNE(); ei++) { const Element & el = (*mesh)[ei]; switch (el.GetType()) { case TET: ost << 10; break; default: cerr << "not implemented 67324" << endl; } ost << "\n"; } ost << "CELL_DATA " << mesh->GetNE() << "\n"; for (int i = 0; i < soldata.Size(); i++) { ost << "VECTORS bfield float\n"; SolutionData & sol = *(soldata[i] -> solclass); double values[3]; for (int elnr = 0; elnr < mesh->GetNE(); elnr++) { sol.GetValue (elnr, 0.25, 0.25, 0.25, values); ost << values[0] << " " << values[1] << " " << values[2] << "\n"; } } /* ost << "POINT_DATA " << mesh->GetNP() << "\n"; for (int i = 0; i < soldata.Size(); i++) { ost << "VECTORS bfield float\n"; SolutionData & sol = *(soldata[i] -> solclass); for (PointIndex pi = PointIndex::BASE; pi < mesh->GetNP()+PointIndex::BASE; pi++) { double values[3], sumvalues[3] = { 0, 0, 0 }; FlatArray els = mesh->GetTopology().GetVertexElements(pi); for (int j = 0; j < els.Size(); j++) { sol.GetValue (els[j]-1, 0.25, 0.25, 0.25, values); for (int k = 0; k < 3; k++) sumvalues[k] += values[k]; } for (int k = 0; k < 3; k++) sumvalues[k] /= els.Size(); ost << sumvalues[0] << " " << sumvalues[1] << " " << sumvalues[2] << "\n"; } } */ } } void VisualSceneSolution :: DrawScene () { try { shared_ptr mesh = GetMesh(); if (!mesh) { VisualScene::DrawScene(); return; } // static NgLock mem_lock(mem_mutex); // mem_lock.Lock(); NgLock meshlock1 (mesh->MajorMutex(), true); NgLock meshlock (mesh->Mutex(), true); BuildScene(); CreateTexture (numtexturecols, lineartexture, 0.5, GL_MODULATE); glClearColor(backcolor, backcolor, backcolor, 1); // glClearColor(backcolor, backcolor, backcolor, 0); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); SetLight(); glPushMatrix(); glMultMatrixd (transformationmat); glMatrixMode (GL_MODELVIEW); glPolygonMode (GL_FRONT_AND_BACK, GL_FILL); glPolygonOffset (1, 1); glEnable (GL_POLYGON_OFFSET_FILL); glEnable (GL_COLOR_MATERIAL); if (usetexture) { SetTextureMode (usetexture); glMatrixMode (GL_TEXTURE); glLoadIdentity(); if (usetexture == 1) { double hmax = maxval; double hmin = minval; if (invcolor) Swap (hmax, hmin); if (fabs (hmax - hmin) > 1e-30) glScaled (1.0 / (hmin - hmax), 0, 0); else glScaled (1e30, 0, 0); glTranslatef (-hmax, 0, 0); } else { glTranslatef (0.5, 0, 0); glRotatef(360 * netgen::GetVSSolution().time, 0, 0, -1); if (fabs (maxval) > 1e-10) glScalef(0.5/maxval, 0.5/maxval, 0.5/maxval); else glScalef (1e10, 1e10, 1e10); } glMatrixMode (GL_MODELVIEW); } if (vispar.drawfilledtrigs || vispar.drawtetsdomain > 0 || vispar.drawdomainsurf > 0) { // Change for Martin: // orig: SetClippingPlane (); glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA); // glEnable(GL_BLEND); glDisable(GL_BLEND); glCallList (surfellist); #ifdef USE_BUFFERS static int timer = NgProfiler::CreateTimer ("Solution::drawing - DrawSurfaceElements VBO"); NgProfiler::StartTimer(timer); glEnableClientState(GL_VERTEX_ARRAY); glEnableClientState(GL_NORMAL_ARRAY); glEnableClientState(GL_TEXTURE_COORD_ARRAY); glDrawElements(GL_TRIANGLES, surfel_vbo_size, GL_UNSIGNED_INT, 0); glDisableClientState(GL_VERTEX_ARRAY); glDisableClientState(GL_NORMAL_ARRAY); glDisableClientState(GL_TEXTURE_COORD_ARRAY); NgProfiler::StopTimer(timer); #endif glDisable(GL_BLEND); /* // transparent test ... glColor4f (1, 0, 0, 0.1); glEnable (GL_COLOR_MATERIAL); glDepthFunc(GL_GREATER); glDepthMask(GL_FALSE); // glBlendFunc(GL_ONE_MINUS_DST_ALPHA,GL_DST_ALPHA); glBlendFunc(GL_ONE_MINUS_SRC_ALPHA,GL_SRC_ALPHA); glCallList (surfellist); glDisable(GL_BLEND); glDepthFunc(GL_LEQUAL); glDepthMask(GL_TRUE); glCallList (surfellist); // end test ... */ glCallList (surface_vector_list); glDisable(GL_CLIP_PLANE0); } if (showclipsolution) { if (clipsolution == 1) { // Martin // orig: glCallList (clipplanelist_scal); // transparent experiments // see http://wiki.delphigl.com/index.php/Blenden /* glColor4f (1, 1, 1, 0.5); glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA); glEnable(GL_BLEND); glEnable(GL_COLOR); glDepthFunc(GL_GREATER); glDepthMask(GL_FALSE); glCallList (clipplanelist_scal); glDepthFunc(GL_LEQUAL); glDepthMask(GL_TRUE); glCallList (clipplanelist_scal); glDisable(GL_BLEND); */ /* // latest transparent version ... glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA); glEnable(GL_BLEND); glEnable(GL_DEPTH_TEST); // CreateTexture (numtexturecols, lineartexture, 0.25, GL_MODULATE); // glCallList (clipplanelist_scal); glEnable(GL_BLEND); // glDisable(GL_DEPTH_TEST); // CreateTexture (numtexturecols, lineartexture, 0.25, GL_MODULATE); glCallList (clipplanelist_scal); // glDepthFunc(GL_LEQUAL); // glDepthMask(GL_TRUE); // glCallList (clipplanelist_scal); glEnable(GL_DEPTH_TEST); glDisable(GL_BLEND); */ // end test } if (clipsolution == 2) { // glDisable(GL_DEPTH_TEST); glCallList (clipplanelist_vec); // glEnable(GL_DEPTH_TEST); } } if (draw_fieldlines) { SetClippingPlane(); if (num_fieldlineslists <= 1) glCallList (fieldlineslist); else { // animated int start = int (time / 10 * num_fieldlineslists); for (int ln = 0; ln < 10; ln++) { int nr = fieldlineslist + (start + ln) % num_fieldlineslists; glCallList (nr); } } glDisable(GL_CLIP_PLANE0); } if(drawpointcurves) { glCallList(pointcurvelist); } glMatrixMode (GL_TEXTURE); glLoadIdentity(); glMatrixMode (GL_MODELVIEW); glDisable (GL_TEXTURE_1D); glDisable (GL_TEXTURE_2D); glDisable (GL_POLYGON_OFFSET_FILL); glDisable (GL_COLOR_MATERIAL); if (draw_isosurface) glCallList (isosurface_list); GLfloat matcol0[] = { 0, 0, 0, 1 }; glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, matcol0); glMaterialfv(GL_FRONT_AND_BACK, GL_EMISSION, matcol0); glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, matcol0); glPolygonMode (GL_FRONT_AND_BACK, GL_LINE); glLineWidth (1.0f); glColor3f (0.0f, 0.0f, 0.0f); glDisable (GL_LINE_SMOOTH); if (vispar.drawedges) { glCallList (element1dlist); } if (vispar.drawoutline && !numisolines) { SetClippingPlane (); glDepthMask(GL_FALSE); glCallList (linelist); glDepthMask(GL_TRUE); glDisable(GL_CLIP_PLANE0); } if (numisolines) { SetClippingPlane (); glCallList (isolinelist); glDisable(GL_CLIP_PLANE0); glCallList (clipplane_isolinelist); } // user visualization for (int i = 0; i < user_vis.Size(); i++) user_vis[i] -> Draw(); glPopMatrix(); glDisable(GL_CLIP_PLANE0); DrawColorBar (minval, maxval, logscale, lineartexture); if (vispar.drawcoordinatecross) DrawCoordinateCross (); DrawNetgenLogo (); glFinish(); // delete lock; // mem_lock.UnLock(); } catch (bad_weak_ptr e) { // cout << "don't have a mesh to visualize" << endl; VisualScene::DrawScene(); } } /* void VisualSceneSolution :: RealVec3d (const double * values, Vec3d & v, bool iscomplex, bool imag) { if (!iscomplex) { v.X() = values[0]; v.Y() = values[1]; v.Z() = values[2]; } else { if (!imag) { v.X() = values[0]; v.Y() = values[2]; v.Z() = values[4]; } else { v.X() = values[1]; v.Y() = values[3]; v.Z() = values[5]; } } } */ Vec<3> VisualSceneSolution :: RealVec3d (const double * values, bool iscomplex, bool imag) { Vec<3> v; if (!iscomplex) { for (int j = 0; j < 3; j++) v(j) = values[j]; } else { if (!imag) { for (int j = 0; j < 3; j++) v(j) = values[2*j]; } else { for (int j = 0; j < 3; j++) v(j) = values[2*j+1]; } } return v; } void VisualSceneSolution :: RealVec3d (const double * values, Vec3d & v, bool iscomplex, double phaser, double phasei) { if (!iscomplex) { v.X() = values[0]; v.Y() = values[1]; v.Z() = values[2]; } else { for (int i = 0; i < 3; i++) v.X(i+1) = phaser * values[2*i] + phasei * values[2*i+1]; } } void VisualSceneSolution :: BuildScene (int zoomall) { try { shared_ptr mesh = GetMesh(); if (!mesh) { VisualScene::BuildScene (zoomall); return; } /* if (!cone_list) { cone_list = glGenLists (1); glNewList (cone_list, GL_COMPILE); DrawCone (Point<3> (0,0,0), Point<3> (0,0,1), 0.4); glEndList(); } */ // vispar.colormeshsize = 1; // recalc clipping plane SetClippingPlane (); glDisable(GL_CLIP_PLANE0); SolData * sol = NULL; SolData * vsol = NULL; if (scalfunction != -1) sol = soldata[scalfunction]; if (vecfunction != -1) vsol = soldata[vecfunction]; if (mesh->GetTimeStamp () > solutiontimestamp) { sol = NULL; vsol = NULL; } if (sol && sol->solclass) sol->solclass->SetMultiDimComponent (multidimcomponent); if (vsol && vsol->solclass) vsol->solclass->SetMultiDimComponent (multidimcomponent); if (!autoscale || (!sol && !vsol) ) { minval = mminval; maxval = mmaxval; } else { if (mesh->GetTimeStamp () > surfeltimestamp || vispar.clipping.timestamp > clipplanetimestamp || solutiontimestamp > surfeltimestamp) { GetMinMax (scalfunction, scalcomp, minval, maxval); } } if (mesh->GetTimeStamp() > surfeltimestamp || solutiontimestamp > surfeltimestamp || zoomall) { if (mesh->GetTimeStamp() > surfeltimestamp || zoomall) { // mesh has changed Point3d pmin, pmax; static double oldrad = 0; mesh->GetBox (pmin, pmax, -1); center = Center (pmin, pmax); rad = 0.5 * Dist (pmin, pmax); glEnable (GL_NORMALIZE); if (rad > 1.5 * oldrad || mesh->GetMajorTimeStamp() > surfeltimestamp || zoomall) { CalcTransformationMatrices(); oldrad = rad; } } DrawSurfaceElements(); surfeltimestamp = max2 (solutiontimestamp, mesh->GetTimeStamp()); } if (mesh->GetTimeStamp() > surfellinetimestamp || subdivision_timestamp > surfellinetimestamp || (deform && solutiontimestamp > surfellinetimestamp) || zoomall) { DrawSurfaceElementLines(); surfellinetimestamp = max2 (solutiontimestamp, mesh->GetTimeStamp()); } if (vispar.drawedges) Draw1DElements(); if (mesh->GetTimeStamp() > surface_vector_timestamp || solutiontimestamp > surface_vector_timestamp || zoomall) { if (surface_vector_list) glDeleteLists (surface_vector_list, 1); surface_vector_list = glGenLists (1); glNewList (surface_vector_list, GL_COMPILE); glEnable (GL_NORMALIZE); DrawSurfaceVectors(); glEndList (); surface_vector_timestamp = max2 (mesh->GetTimeStamp(), solutiontimestamp); } if (clipplanetimestamp < vispar.clipping.timestamp || clipplanetimestamp < solutiontimestamp) { // cout << "clipsolution = " << clipsolution << endl; if (vispar.clipping.enable && clipsolution == 2) { mesh->Mutex().unlock(); mesh->BuildElementSearchTree(); mesh->Mutex().lock(); } if (vispar.clipping.enable && clipsolution == 1 && sol) DrawClipPlaneTrigs (); if (clipplanelist_vec) glDeleteLists (clipplanelist_vec, 1); clipplanelist_vec = glGenLists (1); glNewList (clipplanelist_vec, GL_COMPILE); if (vispar.clipping.enable && clipsolution == 2 && vsol) { SetTextureMode (usetexture); if (autoscale) GetMinMax (vecfunction, 0, minval, maxval); Array cpp; GetClippingPlaneGrid (cpp); for (int i = 0; i < cpp.Size(); i++) { const ClipPlanePoint & p = cpp[i]; double values[6]; Vec3d v; bool drawelem = GetValues (vsol, p.elnr, p.lami(0), p.lami(1), p.lami(2), values); // RealVec3d (values, v, vsol->iscomplex, imag_part); v = RealVec3d (values, vsol->iscomplex, imag_part); double val = v.Length(); if (drawelem && val > 1e-10 * maxval) { v *= (rad / val / gridsize * 0.5); SetOpenGlColor (val); DrawCone (p.p, p.p+v, rad / gridsize * 0.2); } } } glEndList (); } if (mesh->GetTimeStamp() > isosurface_timestamp || solutiontimestamp > isosurface_timestamp || zoomall) { if (isosurface_list) glDeleteLists (isosurface_list, 1); isosurface_list = glGenLists (1); glNewList (isosurface_list, GL_COMPILE); glEnable (GL_NORMALIZE); DrawIsoSurface(sol, vsol, scalcomp); glEndList (); isosurface_timestamp = max2 (mesh->GetTimeStamp(), solutiontimestamp); } if(mesh->GetTimeStamp() > pointcurve_timestamp || solutiontimestamp > pointcurve_timestamp) { if(pointcurvelist) glDeleteLists(pointcurvelist,1); if(mesh->GetNumPointCurves() > 0) { pointcurvelist = glGenLists(1); glNewList(pointcurvelist,GL_COMPILE); //glColor3f (1.0f, 0.f, 0.f); for(int i=0; iGetNumPointCurves(); i++) { Box3d box; box.SetPoint(mesh->GetPointCurvePoint(i,0)); for(int j=1; jGetNumPointsOfPointCurve(i); j++) box.AddPoint(mesh->GetPointCurvePoint(i,j)); double diam = box.CalcDiam(); double thick = min2(0.1*diam, 0.001*rad); double red,green,blue; mesh->GetPointCurveColor(i,red,green,blue); glColor3f (red, green, blue); for(int j=0; jGetNumPointsOfPointCurve(i)-1; j++) { DrawCylinder(mesh->GetPointCurvePoint(i,j), mesh->GetPointCurvePoint(i,j+1), thick); } } glEndList(); } } if ( numisolines && (clipplanetimestamp < vispar.clipping.timestamp || clipplanetimestamp < solutiontimestamp) ) { if (isolinelist) glDeleteLists (isolinelist, 1); isolinelist = glGenLists (1); glNewList (isolinelist, GL_COMPILE); Point<3> points[1100]; double values[1100]; int nse = mesh->GetNSE(); CurvedElements & curv = mesh->GetCurvedElements(); if (sol) { glBegin (GL_LINES); for (SurfaceElementIndex sei = 0; sei < nse; sei++) { const Element2d & el = (*mesh)[sei]; bool curved = curv.IsHighOrder(); // && curv.IsSurfaceElementCurved(sei); if (el.GetType() == TRIG || el.GetType() == TRIG6) { Point<3> lp1, lp2, lp3; if (!curved) { GetPointDeformation (el[0]-1, lp1); GetPointDeformation (el[1]-1, lp2); GetPointDeformation (el[2]-1, lp3); } int n = 1 << subdivisions; int ii = 0; int ix, iy; for (iy = 0; iy <= n; iy++) for (ix = 0; ix <= n-iy; ix++) { double x = double(ix) / n; double y = double(iy) / n; // TODO: consider return value (bool: draw/don't draw element) GetSurfValue (sol, sei, -1, x, y, scalcomp, values[ii]); Point<2> xref(x,y); if (curved) mesh->GetCurvedElements(). CalcSurfaceTransformation (xref, sei, points[ii]); else points[ii] = lp3 + x * (lp1-lp3) + y * (lp2-lp3); if (deform) { points[ii] += GetSurfDeformation (sei, -1, x, y); } ii++; } ii = 0; for (iy = 0; iy < n; iy++, ii++) for (ix = 0; ix < n-iy; ix++, ii++) { int index[] = { ii, ii+1, ii+n-iy+1, ii+1, ii+n-iy+2, ii+n-iy+1 }; DrawIsoLines (points[index[0]], points[index[1]], points[index[2]], values[index[0]], values[index[1]], values[index[2]]); if (ix < n-iy-1) DrawIsoLines (points[index[3]], points[index[4]], points[index[5]], values[index[3]], values[index[4]], values[index[5]]); } } if (el.GetType() == QUAD || el.GetType() == QUAD6 || el.GetType() == QUAD8 ) { Point<3> lpi[4]; Vec<3> vx = 0.0, vy = 0.0, vtwist = 0.0, def; if (!curved) { for (int j = 0; j < 4; j++) GetPointDeformation (el[j]-1, lpi[j]); vx = lpi[1]-lpi[0]; vy = lpi[3]-lpi[0]; vtwist = (lpi[0]-lpi[1]) + (lpi[2]-lpi[3]); } int n = 1 << subdivisions; int ix, iy, ii = 0; for (iy = 0; iy <= n; iy++) for (ix = 0; ix <= n; ix++, ii++) { double x = double(ix) / n; double y = double(iy) / n; // TODO: consider return value (bool: draw/don't draw element) GetSurfValue (sol, sei, -1, x, y, scalcomp, values[ii]); Point<2> xref(x,y); if (curved) mesh->GetCurvedElements(). CalcSurfaceTransformation (xref, sei, points[ii]); else points[ii] = lpi[0] + x * vx + y * vy + x*y * vtwist; if (deform) points[ii] += GetSurfDeformation (sei, -1, x, y); } ii = 0; for (iy = 0; iy < n; iy++, ii++) for (ix = 0; ix < n; ix++, ii++) { DrawIsoLines (points[ii], points[ii+1], points[ii+n+1], values[ii], values[ii+1], values[ii+n+1]); DrawIsoLines (points[ii+1], points[ii+n+2], points[ii+n+1], values[ii+1], values[ii+n+2], values[ii+n+1]); } } } glEnd(); } glEndList (); if (clipplane_isolinelist) glDeleteLists (clipplane_isolinelist, 1); if (vispar.clipping.enable && clipsolution == 1 && sol) { clipplane_isolinelist = glGenLists (1); glNewList (clipplane_isolinelist, GL_COMPILE); Array cpt; Array pts; GetClippingPlaneTrigs (cpt, pts); bool drawelem; glNormal3d (-clipplane[0], -clipplane[1], -clipplane[2]); if (numisolines) for (int i = 0; i < cpt.Size(); i++) { const ClipPlaneTrig & trig = cpt[i]; double vali[3]; for (int j = 0; j < 3; j++) { Point<3> lami = pts[trig.points[j].pnr].lami; drawelem = GetValue (sol, trig.elnr, lami(0), lami(1), lami(2), scalcomp, vali[j]); } if ( drawelem ) DrawIsoLines (pts[trig.points[0].pnr].p, pts[trig.points[1].pnr].p, pts[trig.points[2].pnr].p, // trig.points[1].p, // trig.points[2].p, vali[0], vali[1], vali[2]); } glEndList (); } glEnd(); } clipplanetimestamp = max2 (vispar.clipping.timestamp, solutiontimestamp); } catch (bad_weak_ptr e) { PrintMessage (3, "vssolution::buildscene: don't have a mesh to visualize"); VisualScene::BuildScene (zoomall); } } void VisualSceneSolution :: Draw1DElements () { shared_ptr mesh = GetMesh(); if (element1dlist) glDeleteLists (element1dlist, 1); element1dlist = glGenLists (1); glNewList (element1dlist, GL_COMPILE); int npt = (1 << subdivisions) + 1; Array pref(npt), values(npt); Array > points(npt); const SolData * sol = NULL; if (scalfunction != -1) sol = soldata[scalfunction]; const SolData * vsol = NULL; if (deform && vecfunction != -1) vsol = soldata[vecfunction]; int ncomp = 0; if (sol) ncomp = sol->components; if (vsol) ncomp = vsol->components; Array mvalues(ncomp); for (int i = 0; i < npt; i++) pref[i] = double(i) / (npt-1); for (SegmentIndex i = 0; i < mesh -> GetNSeg(); i++) { // mesh->GetCurvedElements(). // CalcMultiPointSegmentTransformation (&pref, i, &points, NULL); // const Segment & seg = mesh -> LineSegment(i); for (int j = 0; j < npt; j++) mesh->GetCurvedElements(). CalcSegmentTransformation (pref[j], i, points[j]); if (vsol) { for (int j = 0; j < npt; j++) { vsol->solclass->GetSegmentValue (i, pref[j], &mvalues[0]); // values[j] = ExtractValue (sol, scalcomp, &mvalues[0]); points[j](0) += scaledeform * mvalues[0]; points[j](1) += scaledeform * mvalues[1]; } } else if (sol) { for (int j = 0; j < npt; j++) { sol->solclass->GetSegmentValue (i, pref[j], &mvalues[0]); values[j] = ExtractValue (sol, scalcomp, &mvalues[0]); points[j](1) += scaledeform * values[j]; } } glBegin (GL_LINE_STRIP); for (int i = 0; i < npt; i++) glVertex3dv (points[i]); glEnd(); } glEndList (); } void VisualSceneSolution :: DrawSurfaceElements () { shared_ptr mesh = GetMesh(); static int timer = NgProfiler::CreateTimer ("Solution::DrawSurfaceElements"); static int timerstart = NgProfiler::CreateTimer ("Solution::DrawSurfaceElements start"); static int timerloops = NgProfiler::CreateTimer ("Solution::DrawSurfaceElements loops"); static int timerlist = NgProfiler::CreateTimer ("Solution::DrawSurfaceElements list"); static int timerbuffer = NgProfiler::CreateTimer ("Solution::DrawSurfaceElements buffer"); static int timer1 = NgProfiler::CreateTimer ("Solution::DrawSurfaceElements 1"); static int timer1a = NgProfiler::CreateTimer ("Solution::DrawSurfaceElements 1a"); static int timer1b = NgProfiler::CreateTimer ("Solution::DrawSurfaceElements 1b"); static int timer1c = NgProfiler::CreateTimer ("Solution::DrawSurfaceElements 1c"); static int timer2 = NgProfiler::CreateTimer ("Solution::DrawSurfaceElements 2"); static int timer2a = NgProfiler::CreateTimer ("Solution::DrawSurfaceElements 2a"); static int timer2b = NgProfiler::CreateTimer ("Solution::DrawSurfaceElements 2b"); NgProfiler::RegionTimer reg (timer); #ifdef PARALLELGL if (id == 0 && ntasks > 1) { InitParallelGL(); par_surfellists.SetSize (ntasks); MyMPI_SendCmd ("redraw"); MyMPI_SendCmd ("solsurfellist"); for ( int dest = 1; dest < ntasks; dest++ ) MyMPI_Recv (par_surfellists[dest], dest, MPI_TAG_VIS); if (surfellist) glDeleteLists (surfellist, 1); surfellist = glGenLists (1); glNewList (surfellist, GL_COMPILE); for ( int dest = 1; dest < ntasks; dest++ ) glCallList (par_surfellists[dest]); glEndList(); return; } #endif NgProfiler::StartTimer(timerstart); if (surfellist) glDeleteLists (surfellist, 1); surfellist = glGenLists (1); glNewList (surfellist, GL_COMPILE); const SolData * sol = NULL; if (scalfunction != -1) sol = soldata[scalfunction]; if (mesh->GetTimeStamp () > solutiontimestamp) sol = NULL; if (sol && sol->solclass) sol->solclass->SetMultiDimComponent (multidimcomponent); glLineWidth (1.0f); GLfloat col_grey[] = { 0.6f, 0.6f, 0.6f, 1.0f }; glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, col_grey); int nse = mesh->GetNSE(); SetTextureMode (usetexture); CurvedElements & curv = mesh->GetCurvedElements(); int n = 1 << subdivisions; int npt = sqr(n+1); Array > pref (npt); Array > points (npt); Array > dxdxis (npt); Array > nvs(npt); Array values(npt); Array mvalues(npt); int sol_comp = (sol && sol->draw_surface) ? sol->components : 0; Array> > simd_pref ( (npt+SIMD::Size()-1)/SIMD::Size() ); Array> > simd_points ( (npt+SIMD::Size()-1)/SIMD::Size() ); Array> > simd_dxdxis ( (npt+SIMD::Size()-1)/SIMD::Size() ); Array> > simd_nvs( (npt+SIMD::Size()-1)/SIMD::Size() ); Array> simd_values( (npt+SIMD::Size()-1)/SIMD::Size() * sol_comp); // Array> glob_pnts; // Array> glob_nvs; // Array glob_values; if (sol && sol->draw_surface) mvalues.SetSize (npt * sol->components); Array > valuesc(npt); #ifdef USE_BUFFERS if (has_surfel_vbo) glDeleteBuffers (4, &surfel_vbo[0]); glGenBuffers (4, &surfel_vbo[0]); has_surfel_vbo = true; glBindBuffer (GL_ARRAY_BUFFER, surfel_vbo[0]); glBufferData (GL_ARRAY_BUFFER, nse*npt*sizeof(Point<3,double>), NULL, GL_STATIC_DRAW); glVertexPointer(3, GL_DOUBLE, 0, 0); // glEnableClientState(GL_VERTEX_ARRAY); glBindBuffer (GL_ARRAY_BUFFER, surfel_vbo[1]); glBufferData (GL_ARRAY_BUFFER, nse*npt*sizeof(Vec<3,double>), NULL, GL_STATIC_DRAW); // glEnableClientState(GL_NORMAL_ARRAY); glNormalPointer(GL_DOUBLE, 0, 0); // glEnableClientState(GL_TEXTURE_COORD_ARRAY); glBindBuffer (GL_ARRAY_BUFFER, surfel_vbo[2]); glBufferData (GL_ARRAY_BUFFER, nse*npt*sizeof(double), NULL, GL_STATIC_DRAW); glTexCoordPointer(1, GL_DOUBLE, 0, 0); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, surfel_vbo[3]); glBufferData(GL_ELEMENT_ARRAY_BUFFER, nse*npt*6*sizeof(int), NULL, GL_STATIC_DRAW); surfel_vbo_size = 0; #endif NgProfiler::StopTimer(timerstart); for (SurfaceElementIndex sei = 0; sei < nse; sei++) { const Element2d & el = (*mesh)[sei]; if (vispar.drawdomainsurf > 0) { if (mesh->GetDimension() == 3) { if (vispar.drawdomainsurf != mesh->GetFaceDescriptor(el.GetIndex()).DomainIn() && vispar.drawdomainsurf != mesh->GetFaceDescriptor(el.GetIndex()).DomainOut()) continue; } else { if (el.GetIndex() != vispar.drawdomainsurf) continue; } } if ( el.GetType() == QUAD || el.GetType() == QUAD6 ) { bool curved = curv.IsSurfaceElementCurved (sei); for (int iy = 0, ii = 0; iy <= n; iy++) for (int ix = 0; ix <= n; ix++, ii++) pref[ii] = Point<2> (double(ix)/n, double(iy)/n); int npt = (n+1)*(n+1); if (curved) { for (int ii = 0; ii < npt; ii++) { Point<2> xref = pref[ii]; mesh->GetCurvedElements(). CalcSurfaceTransformation (xref, sei, points[ii], dxdxis[ii]); nvs[ii] = Cross (dxdxis[ii].Col(0), dxdxis[ii].Col(1)); nvs[ii].Normalize(); } } else { Point<3> lpi[4]; Vec<3> vx, vy, vtwist; for (int k = 0; k < 4; k++) GetPointDeformation (el[k]-1, lpi[k]); vx = lpi[1]-lpi[0]; vy = lpi[3]-lpi[0]; vtwist = (lpi[0]-lpi[1]) + (lpi[2]-lpi[3]); for (int ii = 0; ii < npt; ii++) { double x = pref[ii](0); double y = pref[ii](1); points[ii] = lpi[0] + x * vx + y * vy + x*y * vtwist; for (int j = 0; j < 3; j++) { dxdxis[ii](j,0) = vx(j) + y*vtwist(j); dxdxis[ii](j,1) = vy(j) + x*vtwist(j); } } Vec<3> nv = Cross (vx, vy); nv.Normalize(); for (int ii = 0; ii < npt; ii++) nvs[ii] = nv; } bool drawelem = false; /* if (sol && sol->draw_surface) { if (usetexture == 2) for (int ii = 0; ii < npt; ii++) drawelem = GetSurfValueComplex (sol, sei, -1, pref[ii](0), pref[ii](1), scalcomp, valuesc[ii]); else for (int ii = 0; ii < npt; ii++) drawelem = GetSurfValue (sol, sei, -1, pref[ii](0), pref[ii](1), scalcomp, values[ii]); } */ if (sol && sol->draw_surface) { drawelem = GetMultiSurfValues (sol, sei, -1, npt, &pref[0](0), &pref[1](0)-&pref[0](0), &points[0](0), &points[1](0)-&points[0](0), &dxdxis[0](0), &dxdxis[1](0)-&dxdxis[0](0), &mvalues[0], sol->components); if (usetexture == 2) for (int ii = 0; ii < npt; ii++) valuesc[ii] = ExtractValueComplex(sol, scalcomp, &mvalues[ii*sol->components]); else for (int ii = 0; ii < npt; ii++) values[ii] = ExtractValue(sol, scalcomp, &mvalues[ii*sol->components]); } if (deform) for (int ii = 0; ii < npt; ii++) points[ii] += GetSurfDeformation (sei, -1, pref[ii](0), pref[ii](1)); int save_usetexture = usetexture; if (!drawelem) { usetexture = 0; SetTextureMode (0); } int ii = 0; glBegin (GL_QUADS); for (int iy = 0; iy < n; iy++, ii++) for (int ix = 0; ix < n; ix++, ii++) { int index[] = { ii, ii+1, ii+n+2, ii+n+1 }; for (int j = 0; j < 4; j++) { if (drawelem) { if (usetexture != 2) SetOpenGlColor (values[index[j]]); else glTexCoord2f ( valuesc[index[j]].real(), valuesc[index[j]].imag() ); } else glColor4fv (col_grey); glNormal3dv (nvs[index[j]]); glVertex3dv (points[index[j]]); } } glEnd(); if (!drawelem && (usetexture != save_usetexture)) { usetexture = save_usetexture; SetTextureMode (usetexture); } } } n = 1 << subdivisions; double invn = 1.0 / n; npt = (n+1)*(n+2)/2; NgProfiler::StartTimer(timerloops); size_t base_pi = 0; for (int iy = 0, ii = 0; iy <= n; iy++) for (int ix = 0; ix <= n-iy; ix++, ii++) pref[ii] = Point<2> (ix*invn, iy*invn); constexpr size_t simd_size = SIMD::Size(); size_t simd_npt = (npt+simd_size-1)/simd_size; for (size_t i = 0; i < simd_npt; i++) { simd_pref[i](0) = [&] (size_t j) { size_t ii = i*simd_size+j; return (ii < npt) ? pref[ii](0) : 0; }; simd_pref[i](1) = [&] (size_t j) { size_t ii = i*simd_size+j; return (ii < npt) ? pref[ii](1) : 0; }; } Array ind_reftrig; for (int iy = 0, ii = 0; iy < n; iy++,ii++) for (int ix = 0; ix < n-iy; ix++, ii++) { int nv = (ix+iy+1 < n) ? 6 : 3; int ind[] = { ii, ii+1, ii+n-iy+1, ii+n-iy+1, ii+1, ii+n-iy+2 }; for (int j = 0; j < nv; j++) ind_reftrig.Append (ind[j]); } Array glob_ind; glob_ind.SetSize(ind_reftrig.Size()); for(SurfaceElementIndex sei = 0; sei < nse; sei++) { const Element2d & el = (*mesh)[sei]; // if (el.GetIndex() <= 1) continue; if(vispar.drawdomainsurf > 0) { if (mesh->GetDimension() == 3) { if (vispar.drawdomainsurf != mesh->GetFaceDescriptor(el.GetIndex()).DomainIn() && vispar.drawdomainsurf != mesh->GetFaceDescriptor(el.GetIndex()).DomainOut()) continue; } else { if (el.GetIndex() != vispar.drawdomainsurf) continue; } } if ( el.GetType() == TRIG || el.GetType() == TRIG6 ) { NgProfiler::StartTimer(timer1); #ifdef __AVX_try_it_out__ // NgProfiler::StartTimer(timer1a); bool curved = curv.IsSurfaceElementCurved(sei); if (curved) { mesh->GetCurvedElements(). CalcMultiPointSurfaceTransformation<3> (sei, simd_npt, &simd_pref[0](0), 2, &simd_points[0](0), 3, &simd_dxdxis[0](0,0), 6); for (size_t ii = 0; ii < simd_npt; ii++) simd_nvs[ii] = Cross (simd_dxdxis[ii].Col(0), simd_dxdxis[ii].Col(1)).Normalize(); } else { Point<3,SIMD> p1 = mesh->Point (el[0]); Point<3,SIMD> p2 = mesh->Point (el[1]); Point<3,SIMD> p3 = mesh->Point (el[2]); Vec<3,SIMD> vx = p1-p3; Vec<3,SIMD> vy = p2-p3; for (size_t ii = 0; ii < simd_npt; ii++) { simd_points[ii] = p3 + simd_pref[ii](0) * vx + simd_pref[ii](1) * vy; for (size_t j = 0; j < 3; j++) { simd_dxdxis[ii](j,0) = vx(j); simd_dxdxis[ii](j,1) = vy(j); } } Vec<3,SIMD> nv = Cross (vx, vy).Normalize(); for (size_t ii = 0; ii < simd_npt; ii++) simd_nvs[ii] = nv; } bool drawelem = false; if (sol && sol->draw_surface) { // NgProfiler::StopTimer(timer1a); // NgProfiler::StartTimer(timer1b); drawelem = sol->solclass->GetMultiSurfValue (sei, -1, simd_npt, &simd_pref[0](0).Data(), &simd_points[0](0).Data(), &simd_dxdxis[0](0).Data(), &simd_values[0].Data()); // NgProfiler::StopTimer(timer1b); // NgProfiler::StartTimer(timer1c); for (size_t j = 0; j < sol->components; j++) for (size_t i = 0; i < npt; i++) mvalues[i*sol->components+j] = ((double*)&simd_values[j*simd_npt])[i]; if (usetexture == 2) for (int ii = 0; ii < npt; ii++) valuesc[ii] = ExtractValueComplex(sol, scalcomp, &mvalues[ii*sol->components]); else for (int ii = 0; ii < npt; ii++) values[ii] = ExtractValue(sol, scalcomp, &mvalues[ii*sol->components]); } for (size_t i = 0; i < npt; i++) { size_t ii = i/4; size_t r = i%4; for (int j = 0; j < 2; j++) pref[i](j) = simd_pref[ii](j)[r]; for (int j = 0; j < 3; j++) points[i](j) = simd_points[ii](j)[r]; for (int j = 0; j < 3; j++) nvs[i](j) = simd_nvs[ii](j)[r]; } if (deform) for (int ii = 0; ii < npt; ii++) points[ii] += GetSurfDeformation (sei, -1, pref[ii](0), pref[ii](1)); // NgProfiler::StopTimer(timer1c); #else bool curved = curv.IsSurfaceElementCurved(sei); for (int iy = 0, ii = 0; iy <= n; iy++) for (int ix = 0; ix <= n-iy; ix++, ii++) pref[ii] = Point<2> (ix*invn, iy*invn); if (curved) { mesh->GetCurvedElements(). CalcMultiPointSurfaceTransformation (&pref, sei, &points, &dxdxis); for (int ii = 0; ii < npt; ii++) nvs[ii] = Cross (dxdxis[ii].Col(0), dxdxis[ii].Col(1)).Normalize(); } else { Point<3> p1 = mesh->Point (el[0]); Point<3> p2 = mesh->Point (el[1]); Point<3> p3 = mesh->Point (el[2]); Vec<3> vx = p1-p3; Vec<3> vy = p2-p3; for (int ii = 0; ii < npt; ii++) { points[ii] = p3 + pref[ii](0) * vx + pref[ii](1) * vy; for (int j = 0; j < 3; j++) { dxdxis[ii](j,0) = vx(j); dxdxis[ii](j,1) = vy(j); } } Vec<3> nv = Cross (vx, vy).Normalize(); for (int ii = 0; ii < npt; ii++) nvs[ii] = nv; } bool drawelem = false; if (sol && sol->draw_surface) { drawelem = GetMultiSurfValues (sol, sei, -1, npt, &pref[0](0), &pref[1](0)-&pref[0](0), &points[0](0), &points[1](0)-&points[0](0), &dxdxis[0](0), &dxdxis[1](0)-&dxdxis[0](0), &mvalues[0], sol->components); if (usetexture == 2) for (int ii = 0; ii < npt; ii++) valuesc[ii] = ExtractValueComplex(sol, scalcomp, &mvalues[ii*sol->components]); else for (int ii = 0; ii < npt; ii++) values[ii] = ExtractValue(sol, scalcomp, &mvalues[ii*sol->components]); } if (deform) for (int ii = 0; ii < npt; ii++) points[ii] += GetSurfDeformation (sei, -1, pref[ii](0), pref[ii](1)); #endif NgProfiler::StopTimer(timer1); int save_usetexture = usetexture; if (!drawelem) { usetexture = 0; SetTextureMode (usetexture); } NgProfiler::StartTimer(timer2); #ifdef USE_BUFFERS if (drawelem && usetexture == 1 && !logscale) { glBindBuffer (GL_ARRAY_BUFFER, surfel_vbo[0]); glBufferSubData (GL_ARRAY_BUFFER, base_pi*sizeof(Point<3,double>), npt*sizeof(Point<3,double>), &points[0][0]); glBindBuffer (GL_ARRAY_BUFFER, surfel_vbo[1]); glBufferSubData (GL_ARRAY_BUFFER, base_pi*sizeof(Vec<3,double>), npt*sizeof(Vec<3,double>), &nvs[0][0]); glBindBuffer (GL_ARRAY_BUFFER, surfel_vbo[2]); glBufferSubData (GL_ARRAY_BUFFER, base_pi*sizeof(double), npt*sizeof(double), &values[0]); for (size_t i = 0; i < ind_reftrig.Size(); i++) glob_ind[i] = base_pi+ind_reftrig[i]; glBindBuffer (GL_ELEMENT_ARRAY_BUFFER, surfel_vbo[3]); glBufferSubData (GL_ELEMENT_ARRAY_BUFFER, surfel_vbo_size*sizeof(int), ind_reftrig.Size()*sizeof(int), &glob_ind[0]); surfel_vbo_size += ind_reftrig.Size(); base_pi += npt; } else #endif for (int iy = 0, ii = 0; iy < n; iy++) { glBegin (GL_TRIANGLE_STRIP); for (int ix = 0; ix <= n-iy; ix++, ii++) for (int k = 0; k < 2; k++) { if (ix+iy+k > n) continue; int hi = (k == 0) ? ii : ii+n-iy+1; if (drawelem) { if (usetexture != 2) SetOpenGlColor (values[hi]); else glTexCoord2f ( valuesc[hi].real(), valuesc[hi].imag() ); } else glColor4fv (col_grey); glNormal3dv (nvs[hi]); glVertex3dv (points[hi]); } glEnd(); } NgProfiler::StopTimer(timer2); if (!drawelem && (usetexture != save_usetexture)) { usetexture = save_usetexture; SetTextureMode (usetexture); } } } NgProfiler::StopTimer(timerloops); NgProfiler::StartTimer(timerbuffer); // glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, surfel_vbo[3]); // glBufferData(GL_ELEMENT_ARRAY_BUFFER, glob_ind.Size()*sizeof(int), &glob_ind[0], GL_STATIC_DRAW); // surfel_vbo_size = glob_ind.Size(); NgProfiler::StopTimer(timerbuffer); // glDrawElements(GL_TRIANGLES, surfel_vbo_size, GL_UNSIGNED_INT, 0); // glDrawElements(GL_TRIANGLES, glob_ind.Size(), GL_UNSIGNED_INT, &glob_ind[0]); // glDisableClientState(GL_VERTEX_ARRAY); // glDisableClientState(GL_NORMAL_ARRAY); // glDisableClientState(GL_TEXTURE_COORD_ARRAY); // glDeleteBuffers (1, &IndexVBOID); // glDeleteBuffers (4, &vboId[0]); NgProfiler::StartTimer(timerlist); glEndList (); NgProfiler::StopTimer(timerlist); #ifdef PARALLELGL glFinish(); if (id > 0) MyMPI_Send (surfellist, 0, MPI_TAG_VIS); #endif } void VisualSceneSolution :: DrawSurfaceElementLines () { shared_ptr mesh = GetMesh(); #ifdef PARALLELGL if (id == 0 && ntasks > 1) { InitParallelGL(); par_surfellists.SetSize (ntasks); MyMPI_SendCmd ("redraw"); MyMPI_SendCmd ("solsurfellinelist"); for ( int dest = 1; dest < ntasks; dest++ ) MyMPI_Recv (par_surfellists[dest], dest, MPI_TAG_VIS); if (linelist) glDeleteLists (linelist, 1); linelist = glGenLists (1); glNewList (linelist, GL_COMPILE); for ( int dest = 1; dest < ntasks; dest++ ) glCallList (par_surfellists[dest]); glEndList(); return; } #endif if (linelist) glDeleteLists (linelist, 1); linelist = glGenLists (1); glNewList (linelist, GL_COMPILE); glLineWidth (1.0f); int nse = mesh->GetNSE(); CurvedElements & curv = mesh->GetCurvedElements(); int n = 1 << subdivisions; ArrayMem, 65> ptsloc(n+1); ArrayMem, 65> ptsglob(n+1); double trigpts[3][2] = { { 0, 0 }, { 0, 1 }, { 1, 0} }; double trigvecs[3][2] = { { 1, 0 }, { 0, -1 }, { -1, 1} }; double quadpts[4][2] = { { 0, 0 }, { 1, 1 }, { 0, 1}, { 1, 0 } }; double quadvecs[4][2] = { { 1, 0 }, { -1, 0}, { 0, -1}, { 0, 1 } }; for (SurfaceElementIndex sei = 0; sei < nse; sei++) { Element2d & el = (*mesh)[sei]; int nv = (el.GetType() == TRIG || el.GetType() == TRIG6) ? 3 : 4; for (int k = 0; k < nv; k++) { Point<2> p0; Vec<2> vtau; if (nv == 3) { p0 = Point<2>(trigpts[k][0], trigpts[k][1]); vtau = Vec<2>(trigvecs[k][0], trigvecs[k][1]); } else { p0 = Point<2>(quadpts[k][0], quadpts[k][1]); vtau = Vec<2>(quadvecs[k][0], quadvecs[k][1]); } glBegin (GL_LINE_STRIP); for (int ix = 0; ix <= n; ix++) ptsloc[ix] = p0 + (double(ix) / n) * vtau; curv.CalcMultiPointSurfaceTransformation (&ptsloc, sei, &ptsglob, 0); for (int ix = 0; ix <= n; ix++) { if (deform) ptsglob[ix] += GetSurfDeformation (sei, k, ptsloc[ix](0), ptsloc[ix](1)); glVertex3dv (ptsglob[ix]); } glEnd (); } } glEndList (); #ifdef PARALLELGL glFinish(); if (id > 0) MyMPI_Send (linelist, 0, MPI_TAG_VIS); #endif } void VisualSceneSolution :: DrawIsoSurface(const SolData * sol, const SolData * vsol, int comp) { shared_ptr mesh = GetMesh(); if (!draw_isosurface) return; if (!sol) return; SetTextureMode (0); glColor3d (1.0, 0, 0); glEnable (GL_COLOR_MATERIAL); glBegin (GL_TRIANGLES); int ne = mesh->GetNE(); const int edgei[6][2] = { { 0, 1 }, { 0, 2 }, { 0, 3 }, { 1, 2 }, { 1, 3 }, { 2, 3 } }; double edgelam[6]; Point<3> edgep[6]; Vec<3> normp[6]; double nodevali[4]; int cntce; int cpe1 = 0, cpe2 = 0, cpe3 = 0; int n = 1 << subdivisions; int n3 = (n+1)*(n+1)*(n+1); Array > grid(n3); Array > locgrid(n3); Array > trans(n3); Array val1(n3*sol->components); Array > grads1(n3); Array compress(n3); MatrixFixWidth<3> pointmat(8); grads1 = Vec<3> (0.0); for (ElementIndex ei = 0; ei < ne; ei++) { // if(vispar.clipdomain > 0 && vispar.clipdomain != (*mesh)[ei].GetIndex()) continue; // if(vispar.donotclipdomain > 0 && vispar.donotclipdomain == (*mesh)[ei].GetIndex()) continue; ELEMENT_TYPE type = (*mesh)[ei].GetType(); if (type == HEX || type == PRISM || type == TET || type == PYRAMID) { const Element & el = (*mesh)[ei]; int ii = 0; int cnt_valid = 0; for (int ix = 0; ix <= n; ix++) for (int iy = 0; iy <= n; iy++) for (int iz = 0; iz <= n; iz++, ii++) { Point<3> ploc; compress[ii] = ii; switch (type) { case PRISM: if (ix+iy <= n) { ploc = Point<3> (double(ix) / n, double(iy) / n, double(iz) / n); compress[ii] = cnt_valid; cnt_valid++; } else compress[ii] = -1; break; case TET: if (ix+iy+iz <= n) { ploc = Point<3> (double(ix) / n, double(iy) / n, double(iz) / n); compress[ii] = cnt_valid; cnt_valid++; } else compress[ii] = -1; break; case HEX: ploc = Point<3> (double(ix) / n, double(iy) / n, double(iz) / n); break; case PYRAMID: ploc = Point<3> (double(ix) / n * (1-double(iz)/n), double(iy) / n * (1-double(iz)/n), double(iz)/n); break; default: cerr << "case not implementd 878234" << endl; ploc = 0.0; } if (compress[ii] != -1) locgrid[compress[ii]] = ploc; } if (type != TET && type != PRISM) cnt_valid = n3; if (mesh->GetCurvedElements().IsHighOrder() || 1) { mesh->GetCurvedElements(). CalcMultiPointElementTransformation (&locgrid, ei, &grid, &trans); } else { Vector shape(el.GetNP()); for (int k = 0; k < el.GetNP(); k++) for (int j = 0; j < 3; j++) pointmat(k,j) = (*mesh)[el[k]](j); for (int i = 0; i < cnt_valid; i++) { el.GetShapeNew (locgrid[i], shape); Point<3> pglob; for (int j = 0; j < 3; j++) { pglob(j) = 0; for (int k = 0; k < el.GetNP(); k++) pglob(j) += shape(k) * pointmat(k,j); } grid[i] = pglob; } } bool has_pos = 0, has_neg = 0; GetMultiValues( sol, ei, -1, n3, &locgrid[0](0), &locgrid[1](0)-&locgrid[0](0), &grid[0](0), &grid[1](0)-&grid[0](0), &trans[0](0), &trans[1](0)-&trans[0](0), &val1[0], sol->components); for (int i = 0; i < cnt_valid; i++) { // GetValue (sol, ei, &locgrid[i](0), &grid[i](0), &trans[i](0), comp, val[i]); // val[i] -= minval; val1[sol->components*i+comp-1] -= minval; // if (vsol) // GetValues (vsol, ei, &locgrid[i](0), &grid[i](0), &trans[i](0), &grads[i](0)); // grads[i] *= -1; if (val1[i*sol->components+comp-1] > 0) has_pos = 1; else has_neg = 1; // if (val[i] > 0) // has_pos = 1; // else // has_neg = 1; } if (!has_pos || !has_neg) continue; if (vsol) { GetMultiValues(vsol, ei, -1, n3, &locgrid[0](0), &locgrid[1](0)-&locgrid[0](0), &grid[0](0), &grid[1](0)-&grid[0](0), &trans[0](0), &trans[1](0)-&trans[0](0), &grads1[0](0), vsol->components); // for (int i = 0; i < cnt_valid; i++) // grads1[i*sol->components+comp-1] *= -1; for (int i = 0; i < cnt_valid; i++) grads1[i] *= -1; } for (int ix = 0; ix < n; ix++) for (int iy = 0; iy < n; iy++) for (int iz = 0; iz < n; iz++) { int base = iz + (n+1)*iy + (n+1)*(n+1)*ix; int pi[8] = { base, base+(n+1)*(n+1), base+(n+1)*(n+1)+(n+1), base+(n+1), base+1, base+(n+1)*(n+1)+1, base+(n+1)*(n+1)+(n+1)+1, base+(n+1)+1 }; for (int j = 0; j < 8; j++) pi[j] = compress[pi[j]]; int tets[6][4] = { { 1, 2, 4, 5 }, { 4, 5, 2, 8 }, { 2, 8, 5, 6 }, { 2, 3, 4, 8 }, { 2, 3, 8, 6 }, { 3, 8, 6, 7 } }; for (int ii = 0; ii < 6; ii++) { int teti[4]; for (int k = 0; k < 4; k++) teti[k] = pi[tets[ii][k]-1]; bool is_valid = 1; for (int j = 0; j < 4; j++) if (teti[j] == -1) is_valid = 0; if (!is_valid) continue; // for (int j = 0; j < 4; j++) // nodevali[j] = val[teti[j]]; for (int j = 0; j < 4; j++) nodevali[j] = val1[sol->components*teti[j]+comp-1]; cntce = 0; for (int j = 0; j < 6; j++) { int lpi1 = edgei[j][0]; int lpi2 = edgei[j][1]; if ( (nodevali[lpi1] > 0) != (nodevali[lpi2] > 0) ) { Point<3> p1 = grid[teti[lpi1]]; Point<3> p2 = grid[teti[lpi2]]; edgelam[j] = nodevali[lpi2] / (nodevali[lpi2] - nodevali[lpi1]); edgep[j] = grid[teti[lpi1]] + (1-edgelam[j]) * (grid[teti[lpi2]]-grid[teti[lpi1]]); // normp[j] = grads[teti[lpi1]] + (1-edgelam[j]) * (grads[teti[lpi2]]-grads[teti[lpi1]]); normp[j] = grads1[teti[lpi1]] + (1-edgelam[j]) * (grads1[teti[lpi2]]-grads1[teti[lpi1]]); // normp[j] = grads1[sol->components*teti[lpi1]+comp-1] + (1-edgelam[j]) * (grads1[sol->components*teti[lpi2]+comp-1]-grads1[sol->components*teti[lpi1]+comp-1]); cntce++; cpe3 = cpe2; cpe2 = cpe1; cpe1 = j; if (cntce >= 3) { if (!vsol) { Point<3> points[3]; points[0] = edgep[cpe1]; points[1] = edgep[cpe2]; points[2] = edgep[cpe3]; Vec<3> normal = Cross (points[2]-points[0], points[1]-points[0]); if ( ( (normal * (p2-p1)) > 0 ) == ( nodevali[lpi1] < 0) ) normal *= -1; glNormal3dv (normal); glVertex3dv (points[0]); glVertex3dv (points[1]); glVertex3dv (points[2]); } else { glNormal3dv (normp[cpe1]); glVertex3dv (edgep[cpe1]); glNormal3dv (normp[cpe2]); glVertex3dv (edgep[cpe2]); glNormal3dv (normp[cpe3]); glVertex3dv (edgep[cpe3]); } } } } } } } } glEnd(); } void VisualSceneSolution :: DrawTrigSurfaceVectors(const Array< Point<3> > & lp, const Point<3> & pmin, const Point<3> & pmax, const int sei, const SolData * vsol) { shared_ptr mesh = GetMesh(); int dir,dir1,dir2; double s,t; Vec<3> n = Cross (lp[1]-lp[0], lp[2]-lp[0]); Vec<3> na (fabs (n(0)), fabs(n(1)), fabs(n(2))); if (na(0) > na(1) && na(0) > na(2)) dir = 1; else if (na(1) > na(2)) dir = 2; else dir = 3; dir1 = (dir % 3) + 1; dir2 = (dir1 % 3) + 1; Point<2> p2d[3]; int k; for (k = 0; k < 3; k++) { p2d[k] = Point<2> ((lp[k](dir1-1) - pmin(dir1-1)) / (2*rad), (lp[k](dir2-1) - pmin(dir2-1)) / (2*rad)); } double minx2d, maxx2d, miny2d, maxy2d; minx2d = maxx2d = p2d[0](0); miny2d = maxy2d = p2d[0](1); for (k = 1; k < 3; k++) { minx2d = min2 (minx2d, p2d[k](0)); maxx2d = max2 (maxx2d, p2d[k](0)); miny2d = min2 (miny2d, p2d[k](1)); maxy2d = max2 (maxy2d, p2d[k](1)); } double mat11 = p2d[1](0) - p2d[0](0); double mat21 = p2d[1](1) - p2d[0](1); double mat12 = p2d[2](0) - p2d[0](0); double mat22 = p2d[2](1) - p2d[0](1); double det = mat11*mat22-mat21*mat12; double inv11 = mat22/det; double inv21 = -mat21/det; double inv12 = -mat12/det; double inv22 = mat11/det; // cout << "drawsurfacevectors. xoffset = " << xoffset << ", yoffset = "; // cout << yoffset << endl; for (s = xoffset/gridsize; s <= 1+xoffset/gridsize; s += 1.0 / gridsize) if (s >= minx2d && s <= maxx2d) for (t = yoffset/gridsize; t <= 1+yoffset/gridsize; t += 1.0 / gridsize) if (t >= miny2d && t <= maxy2d) { double lam1 = inv11 * (s - p2d[0](0)) + inv12 * (t-p2d[0](1)); double lam2 = inv21 * (s - p2d[0](0)) + inv22 * (t-p2d[0](1)); if (lam1 >= 0 && lam2 >= 0 && lam1+lam2 <= 1) { Point<3> cp; for (k = 0; k < 3; k++) cp(k) = lp[0](k) + lam1 * (lp[1](k)-lp[0](k)) + lam2 * (lp[2](k)-lp[0](k)); Point<2> xref(lam1, lam2); if (mesh->GetCurvedElements().IsHighOrder()) mesh->GetCurvedElements(). CalcSurfaceTransformation (xref, sei, cp); Vec<3> v; double values[6]; bool drawelem = GetSurfValues (vsol, sei, -1, lam1, lam2, values); if (!vsol->iscomplex) for (k = 0; k < 3; k++) v(k) = values[k]; else { if (!imag_part) for (k = 0; k < 3; k++) v(k) = values[2*k]; else for (k = 0; k < 3; k++) v(k) = values[2*k+1]; } if (mesh->GetDimension() == 2) if ( (!vsol->iscomplex && vsol->components != 3) || (vsol->iscomplex && vsol->components != 6) ) v(2) = 0; double val = v.Length(); SetOpenGlColor (val); // (val, minval, maxval, logscale); // change JS if (val > 1e-10 * maxval) v *= (rad / val / gridsize * 0.5); else drawelem = 0; if ( drawelem ) DrawCone (cp, cp+4*v, 0.8*rad / gridsize); } } } void VisualSceneSolution :: DrawSurfaceVectors () { shared_ptr mesh = GetMesh(); SurfaceElementIndex sei; const SolData * vsol = NULL; // bool drawelem; if (vecfunction != -1) vsol = soldata[vecfunction]; if (mesh->GetTimeStamp () > solutiontimestamp) vsol = NULL; if (!vsol) return; Point<3> pmin = center - Vec3d (rad, rad, rad); Point<3> pmax = center - Vec3d (rad, rad, rad); // glColor3d (1.0, 1.0, 1.0); // glPolygonMode (GL_FRONT_AND_BACK, GL_FILL); if (vsol->draw_surface && showsurfacesolution) { int nse = mesh->GetNSE(); for (sei = 0; sei < nse; sei++) { const Element2d & el = (*mesh)[sei]; if (el.GetType() == TRIG || el.GetType() == TRIG6) { Array< Point<3> > lp(3); lp[0] = mesh->Point(el[2]); lp[1] = mesh->Point(el[0]); lp[2] = mesh->Point(el[1]); DrawTrigSurfaceVectors(lp,pmin,pmax,sei,vsol); /* Vec<3> n = Cross (lp[1]-lp[0], lp[2]-lp[0]); Vec<3> na (fabs (n(0)), fabs(n(1)), fabs(n(2))); if (na(0) > na(1) && na(0) > na(2)) dir = 1; else if (na(1) > na(2)) dir = 2; else dir = 3; dir1 = (dir % 3) + 1; dir2 = (dir1 % 3) + 1; for (k = 0; k < 3; k++) { p2d[k] = Point<2> ((lp[k](dir1-1) - pmin(dir1-1)) / (2*rad), (lp[k](dir2-1) - pmin(dir2-1)) / (2*rad)); } double minx2d, maxx2d, miny2d, maxy2d; minx2d = maxx2d = p2d[0](0); miny2d = maxy2d = p2d[0](1); for (k = 1; k < 3; k++) { minx2d = min2 (minx2d, p2d[k](0)); maxx2d = max2 (maxx2d, p2d[k](0)); miny2d = min2 (miny2d, p2d[k](1)); maxy2d = max2 (maxy2d, p2d[k](1)); } double mat11 = p2d[1](0) - p2d[0](0); double mat21 = p2d[1](1) - p2d[0](1); double mat12 = p2d[2](0) - p2d[0](0); double mat22 = p2d[2](1) - p2d[0](1); double det = mat11*mat22-mat21*mat12; double inv11 = mat22/det; double inv21 = -mat21/det; double inv12 = -mat12/det; double inv22 = mat11/det; // cout << "drawsurfacevectors. xoffset = " << xoffset << ", yoffset = "; // cout << yoffset << endl; for (s = xoffset/gridsize; s <= 1+xoffset/gridsize; s += 1.0 / gridsize) if (s >= minx2d && s <= maxx2d) for (t = yoffset/gridsize; t <= 1+yoffset/gridsize; t += 1.0 / gridsize) if (t >= miny2d && t <= maxy2d) { double lam1 = inv11 * (s - p2d[0](0)) + inv12 * (t-p2d[0](1)); double lam2 = inv21 * (s - p2d[0](0)) + inv22 * (t-p2d[0](1)); if (lam1 >= 0 && lam2 >= 0 && lam1+lam2 <= 1) { Point<3> cp; for (k = 0; k < 3; k++) cp(k) = lp[0](k) + lam1 * (lp[1](k)-lp[0](k)) + lam2 * (lp[2](k)-lp[0](k)); Vec<3> v; double values[6]; drawelem = GetSurfValues (vsol, sei, lam1, lam2, values); if (!vsol->iscomplex) for (k = 0; k < 3; k++) v(k) = values[k]; else { if (!imag_part) for (k = 0; k < 3; k++) v(k) = values[2*k]; else for (k = 0; k < 3; k++) v(k) = values[2*k+1]; } if (mesh->GetDimension() == 2) if ( (!vsol->iscomplex && vsol->components != 3) || (vsol->iscomplex && vsol->components != 6) ) v(2) = 0; double val = v.Length(); SetOpenGlColor (val, minval, maxval, logscale); if (val > 1e-10 * maxval) v *= (rad / val / gridsize * 0.5); else drawelem = 0; // "drawelem": added 07.04.2004 (FB) if ( drawelem ) DrawCone (cp, cp+4*v, 0.8*rad / gridsize); } } */ } else if (el.GetType() == QUAD) { /* Array < Point<3> > lp(3); lp[0] = mesh->Point(el[0]); lp[1] = mesh->Point(el[1]); lp[2] = mesh->Point(el[2]); DrawTrigSurfaceVectors(lp,pmin,pmax,sei,vsol); lp[0] = mesh->Point(el[0]); lp[1] = mesh->Point(el[2]); lp[2] = mesh->Point(el[3]); DrawTrigSurfaceVectors(lp,pmin,pmax,sei,vsol); */ Point<3> lp[4]; Point<2> p2d[4]; for (int k = 0; k < 4; k++) lp[k] = mesh->Point (el[k]); Vec<3> n = Cross (lp[1]-lp[0], lp[2]-lp[0]); Vec<3> na (fabs (n(0)), fabs(n(1)), fabs(n(2))); int dir, dir1, dir2; if (na(0) > na(1) && na(0) > na(2)) dir = 1; else if (na(1) > na(2)) dir = 2; else dir = 3; dir1 = (dir % 3) + 1; dir2 = (dir1 % 3) + 1; for (int k = 0; k < 4; k++) { p2d[k] = Point<2> ((lp[k](dir1-1) - pmin(dir1-1)) / (2*rad), (lp[k](dir2-1) - pmin(dir2-1)) / (2*rad)); } double minx2d, maxx2d, miny2d, maxy2d; minx2d = maxx2d = p2d[0](0); miny2d = maxy2d = p2d[0](1); for (int k = 1; k < 4; k++) { minx2d = min2 (minx2d, p2d[k](0)); maxx2d = max2 (maxx2d, p2d[k](0)); miny2d = min2 (miny2d, p2d[k](1)); maxy2d = max2 (maxy2d, p2d[k](1)); } for (double s = xoffset/gridsize; s <= 1+xoffset/gridsize; s += 1.0 / gridsize) if (s >= minx2d && s <= maxx2d) for (double t = yoffset/gridsize; t <= 1+yoffset/gridsize; t += 1.0 / gridsize) if (t >= miny2d && t <= maxy2d) { double lami[3]; Point3d p3d(2*rad*s+pmin(0), 2*rad*t+pmin(1),0); if (mesh->PointContainedIn2DElement (p3d, lami, sei+1)) { Point<3> cp = p3d; double lam1 = lami[0]; double lam2 = lami[1]; //for (k = 0; k < 3; k++) //cp(k) = lp[0](k) + //lam1 * (lp[1](k)-lp[0](k)) + //lam2 * (lp[2](k)-lp[0](k)); Vec<3> v; double values[6]; bool drawelem = GetSurfValues (vsol, sei, -1, lam1, lam2, values); (*testout) << "sei " << sei << " lam1 " << lam1 << " lam2 " << lam2 << " drawelem " << drawelem << endl; if (!vsol->iscomplex) for (int k = 0; k < 3; k++) v(k) = values[k]; else { if (!imag_part) for (int k = 0; k < 3; k++) v(k) = values[2*k]; else for (int k = 0; k < 3; k++) v(k) = values[2*k+1]; } if (mesh->GetDimension() == 2) if ( (!vsol->iscomplex && vsol->components != 3) || (vsol->iscomplex && vsol->components != 6) ) v(2) = 0; double val = v.Length(); SetOpenGlColor (val); // , minval, maxval, logscale); july 09 (*testout) << "v " << v << endl; if (val > 1e-10 * maxval) v *= (rad / val / gridsize * 0.5); (*testout) << "v " << v << endl; if ( drawelem ) { DrawCone (cp, cp+4*v, 0.8*rad / gridsize); (*testout) << "cp " << cp << " rad " << rad << " gridsize " << gridsize << endl; } } } } } } } void VisualSceneSolution :: DrawIsoLines (const Point<3> & p1, const Point<3> & p2, const Point<3> & p3, double val1, double val2, double val3) { DrawIsoLines2 (p1, p2, p1, p3, val1, val2, val1, val3); // , minval, maxval, n); DrawIsoLines2 (p2, p1, p2, p3, val2, val1, val2, val3); // , minval, maxval, n); DrawIsoLines2 (p3, p1, p3, p2, val3, val1, val3, val2); // , minval, maxval, n); } void VisualSceneSolution :: DrawIsoLines2 (const Point<3> & hp1, const Point<3> & hp2, const Point<3> & hp3, const Point<3> & hp4, double val1, double val2, double val3, double val4) { int n = numisolines; Point<3> p1, p2, p3, p4; if (val1 < val2) { p1 = hp1; p2 = hp2; } else { p1 = hp2; p2 = hp1; swap (val1, val2); } if (val3 < val4) { p3 = hp3; p4 = hp4; } else { p3 = hp4; p4 = hp3; swap (val3, val4); } val2 += 1e-10; val4 += 1e-10; double fac = (maxval-minval) / n; double idelta1 = 1.0 / (val2 - val1); double idelta2 = 1.0 / (val4 - val3); int mini = int ((max2 (val1, val3) - minval) / fac); int maxi = int ((min2 (val2, val4) - minval) / fac); if (mini < 0) mini = 0; if (maxi > n-1) maxi = n-1; for (int i = mini; i <= maxi; i++) { double val = minval + i * fac; double lam1 = (val - val1) * idelta1; double lam2 = (val - val3) * idelta2; if (lam1 >= 0 && lam1 <= 1 && lam2 >= 0 && lam2 <= 1) { Point<3> lp1 = p1 + lam1 * (p2-p1); Point<3> lp2 = p3 + lam2 * (p4-p3); glVertex3dv (lp1 ); glVertex3dv (lp2 ); // glVertex3dv (lp2 ); // better ? // glVertex3dv (lp1 ); } } } void VisualSceneSolution :: GetMinMax (int funcnr, int comp, double & minv, double & maxv) const { shared_ptr mesh = GetMesh(); static int timer1 = NgProfiler::CreateTimer ("getminmax, vol"); static int timer2 = NgProfiler::CreateTimer ("getminmax, surf"); #ifdef PARALLEL if (id == 0) { MyMPI_SendCmd ("redraw"); MyMPI_SendCmd ("getminmax"); } MyMPI_Bcast (funcnr); MyMPI_Bcast (comp); #endif // double val; // bool considerElem; bool hasit = false; #ifdef max #undef max #endif minv = numeric_limits::max(); maxv = -numeric_limits::max(); if ((ntasks == 1) || (id > 0)) if (funcnr != -1) { const SolData * sol = soldata[funcnr]; if (sol->draw_volume) { NgProfiler::RegionTimer reg1 (timer1); int ne = mesh->GetNE(); mutex min_mutex; mutex max_mutex; ParallelFor(0, ne, [&] (int first, int next) { double minv_local = numeric_limits::max(); double maxv_local = -numeric_limits::max(); for (int i=first; i maxv_local) maxv_local = val; if (val < minv_local) minv_local = val; hasit = true; } } if(minv_local < minv) { lock_guard guard(min_mutex); if(minv_local < minv) minv = minv_local; } if(maxv_local > maxv) { lock_guard guard(max_mutex); if(maxv_local > maxv) maxv = maxv_local; } }); } if (sol->draw_surface) { NgProfiler::RegionTimer reg2 (timer2); int nse = mesh->GetNSE(); for (int i = 0; i < nse; i++) { ELEMENT_TYPE type = mesh->SurfaceElement(i+1).GetType(); double val; bool considerElem = (type == QUAD) ? GetSurfValue (sol, i, -1, 0.5, 0.5, comp, val) : GetSurfValue (sol, i, -1, 0.3333333, 0.3333333, comp, val); if (considerElem) { if (val > maxv) maxv = val; if (val < minv) minv = val; hasit = true; } } } } if (minv == maxv) maxv = minv+1e-6; if (!hasit) { minv = 0; maxv = 1; } #ifdef PARALLEL if ((ntasks > 1) && (id == 0)) { minv = 1e99; maxv = -1e99; } double hmin, hmax; MPI_Reduce (&minv, &hmin, 1, MPI_DOUBLE, MPI_MIN, 0, MPI_COMM_WORLD); MPI_Reduce (&maxv, &hmax, 1, MPI_DOUBLE, MPI_MAX, 0, MPI_COMM_WORLD); minv = hmin; maxv = hmax; #endif } bool VisualSceneSolution :: GetValues (const SolData * data, ElementIndex elnr, double lam1, double lam2, double lam3, double * values) const { bool ok = false; switch (data->soltype) { case SOL_VIRTUALFUNCTION: { ok = data->solclass->GetValue (elnr, lam1, lam2, lam3, values); break; } default: { for (int i = 0; i < data->components; i++) ok = GetValue (data, elnr, lam1, lam2, lam3, i+1, values[i]); } } return ok; } bool VisualSceneSolution :: GetValues (const SolData * data, ElementIndex elnr, const double xref[], const double x[], const double dxdxref[], double * values) const { bool ok = false; switch (data->soltype) { case SOL_VIRTUALFUNCTION: { ok = data->solclass->GetValue (elnr, xref, x, dxdxref, values); break; } default: { for (int i = 0; i < data->components; i++) ok = GetValue (data, elnr, xref[0], xref[1], xref[2], i+1, values[i]); } } return ok; } bool VisualSceneSolution :: GetValue (const SolData * data, ElementIndex elnr, const double xref[], const double x[], const double dxdxref[], int comp, double & val) const { shared_ptr mesh = GetMesh(); double lam1 = xref[0]; double lam2 = xref[1]; double lam3 = xref[2]; val = 0; bool ok = 0; if (comp == 0) { ArrayMem values(data->components); ok = GetValues (data, elnr, xref, x, dxdxref, &values[0]); val = ExtractValue (data, 0, &values[0]); return ok; } switch (data->soltype) { case SOL_VIRTUALFUNCTION: { double values[20]; ok = data->solclass->GetValue (elnr, xref, x, dxdxref, values); val = values[comp-1]; return ok; } case SOL_NODAL: { const Element & el = (*mesh)[elnr]; double lami[8] = { 0.0 }; int np = 0; switch (el.GetType()) { case TET: case TET10: { lami[1] = lam1; lami[2] = lam2; lami[3] = lam3; lami[0] = 1-lam1-lam2-lam3; np = 4; break; } case PRISM: case PRISM12: { lami[0] = (1-lam3) * (1-lam1-lam2); lami[1] = (1-lam3) * lam1; lami[2] = (1-lam3) * lam2; lami[3] = (lam3) * (1-lam1-lam2); lami[4] = (lam3) * lam1; lami[5] = (lam3) * lam2; np = 6; break; } default: cerr << "case not implementd 23523" << endl; } for (int i = 0; i < np; i++) val += lami[i] * data->data[(el[i]-1) * data->dist + comp-1]; return 1; } case SOL_ELEMENT: { val = data->data[elnr * data->dist + comp-1]; return 1; } case SOL_SURFACE_ELEMENT: return 0; case SOL_NONCONTINUOUS: { const Element & el = (*mesh)[elnr]; double lami[8] = { 0.0 }; int np = 0; switch (el.GetType()) { case TET: case TET10: { lami[1] = lam1; lami[2] = lam2; lami[3] = lam3; lami[0] = 1-lam1-lam2-lam3; np = 4; break; } case PRISM: case PRISM12: { lami[0] = (1-lam3) * (1-lam1-lam2); lami[1] = (1-lam3) * lam1; lami[2] = (1-lam3) * lam2; lami[3] = (lam3) * (1-lam1-lam2); lami[4] = (lam3) * lam1; lami[5] = (lam3) * lam2; np = 6; break; } case PYRAMID: { if (lam3 > 1-1e-5) { lami[0] = lami[1] = lami[2] = lami[3] = 0; lami[4] = 1; } else { double x0 = lam1 / (1-lam3); double y0 = lam2 / (1-lam3); lami[0] = (1-x0) * (1-y0) * (1-lam3); lami[1] = ( x0) * (1-y0) * (1-lam3); lami[2] = ( x0) * ( y0) * (1-lam3); lami[3] = (1-x0) * ( y0) * (1-lam3); lami[4] = lam3; np = 5; } break; } default: np = 0; } int base; if (data->order == 1) base = 6 * elnr; else base = 10 * elnr; for (int i = 0; i < np; i++) val += lami[i] * data->data[(base+i) * data->dist + comp-1]; return 1; } case SOL_MARKED_ELEMENTS: { val = (*mesh)[elnr].TestRefinementFlag(); return 1; } case SOL_ELEMENT_ORDER: { val = (*mesh)[elnr].GetOrder(); return 1; } default: cerr << "case not handled 7234" << endl; } return 0; } bool VisualSceneSolution :: GetValue (const SolData * data, ElementIndex elnr, double lam1, double lam2, double lam3, int comp, double & val) const { shared_ptr mesh = GetMesh(); val = 0; bool ok = 0; if (comp == 0) { ArrayMem values(data->components); ok = GetValues (data, elnr, lam1, lam2, lam3, &values[0]); val = ExtractValue (data, 0, &values[0]); return ok; } switch (data->soltype) { case SOL_VIRTUALFUNCTION: { val = 0.0; double values[20]; ok = data->solclass->GetValue (elnr, lam1, lam2, lam3, values); val = values[comp-1]; return ok; } case SOL_NODAL: { const Element & el = (*mesh)[elnr]; double lami[8] = { 0.0 }; int np = 0; switch (el.GetType()) { case TET: case TET10: { lami[1] = lam1; lami[2] = lam2; lami[3] = lam3; lami[0] = 1-lam1-lam2-lam3; np = 4; break; } case PRISM: case PRISM12: { lami[0] = (1-lam3) * (1-lam1-lam2); lami[1] = (1-lam3) * lam1; lami[2] = (1-lam3) * lam2; lami[3] = (lam3) * (1-lam1-lam2); lami[4] = (lam3) * lam1; lami[5] = (lam3) * lam2; np = 6; break; } default: cerr << "case not implemented 234324" << endl; } for (int i = 0; i < np; i++) val += lami[i] * data->data[(el[i]-1) * data->dist + comp-1]; return 1; } case SOL_ELEMENT: { val = data->data[elnr * data->dist + comp-1]; return 1; } case SOL_SURFACE_ELEMENT: return 0; case SOL_NONCONTINUOUS: { const Element & el = (*mesh)[elnr]; double lami[8] = { 0.0 }; int np = 0; switch (el.GetType()) { case TET: case TET10: { lami[1] = lam1; lami[2] = lam2; lami[3] = lam3; lami[0] = 1-lam1-lam2-lam3; np = 4; break; } case PRISM: case PRISM12: { lami[0] = (1-lam3) * (1-lam1-lam2); lami[1] = (1-lam3) * lam1; lami[2] = (1-lam3) * lam2; lami[3] = (lam3) * (1-lam1-lam2); lami[4] = (lam3) * lam1; lami[5] = (lam3) * lam2; np = 6; break; } case PYRAMID: { if (lam3 > 1-1e-5) { lami[0] = lami[1] = lami[2] = lami[3] = 0; lami[4] = 1; } else { double x0 = lam1 / (1-lam3); double y0 = lam2 / (1-lam3); lami[0] = (1-x0) * (1-y0) * (1-lam3); lami[1] = ( x0) * (1-y0) * (1-lam3); lami[2] = ( x0) * ( y0) * (1-lam3); lami[3] = (1-x0) * ( y0) * (1-lam3); lami[4] = lam3; np = 5; } break; } default: np = 0; } int base; if (data->order == 1) base = 6 * elnr; else base = 10 * elnr; for (int i = 0; i < np; i++) val += lami[i] * data->data[(base+i) * data->dist + comp-1]; return 1; } case SOL_MARKED_ELEMENTS: { val = (*mesh)[elnr].TestRefinementFlag(); return 1; } case SOL_ELEMENT_ORDER: { val = (*mesh)[elnr].GetOrder(); return 1; } default: cerr << "case not implemented 234234" << endl; } return 0; } bool VisualSceneSolution :: GetValueComplex (const SolData * data, ElementIndex elnr, double lam1, double lam2, double lam3, int comp, complex & val) const { shared_ptr mesh = GetMesh(); val = 0.0; bool ok = 0; switch (data->soltype) { case SOL_VIRTUALFUNCTION: { double values[20]; ok = data->solclass->GetValue (elnr, lam1, lam2, lam3, values); val = complex (values[comp-1], values[comp]); return ok; } default: cerr << "case not handled 234234" << endl; } return 0; } bool VisualSceneSolution :: GetMultiValues (const SolData * data, ElementIndex elnr, int facetnr, int npt, const double * xref, int sxref, const double * x, int sx, const double * dxdxref, int sdxdxref, double * val, int sval) const { bool drawelem = false; if (data->soltype == SOL_VIRTUALFUNCTION) drawelem = data->solclass->GetMultiValue(elnr, facetnr, npt, xref, sxref, x, sx, dxdxref, sdxdxref, val, sval); else for (int i = 0; i < npt; i++) drawelem = GetValues (data, elnr, xref+i*sxref, x+i*sx, dxdxref+i*sdxdxref, val+i*sval); return drawelem; } bool VisualSceneSolution :: GetSurfValues (const SolData * data, SurfaceElementIndex selnr, int facetnr, double lam1, double lam2, double * values) const { bool ok = false; switch (data->soltype) { case SOL_VIRTUALFUNCTION: { ok = data->solclass->GetSurfValue (selnr, facetnr, lam1, lam2, values); // ok = 1; // values[0] = 1.0; break; } default: { for (int i = 0; i < data->components; i++) ok = GetSurfValue (data, selnr, facetnr, lam1, lam2, i+1, values[i]); } } return ok; } bool VisualSceneSolution :: GetSurfValues (const SolData * data, SurfaceElementIndex selnr, int facetnr, const double xref[], const double x[], const double dxdxref[], double * values) const { bool ok = false; switch (data->soltype) { case SOL_VIRTUALFUNCTION: { ok = data->solclass->GetSurfValue (selnr, facetnr, xref, x, dxdxref, values); break; } default: { for (int i = 0; i < data->components; i++) ok = GetSurfValue (data, selnr, facetnr, xref[0], xref[1], i+1, values[i]); } } return ok; } bool VisualSceneSolution :: GetMultiSurfValues (const SolData * data, SurfaceElementIndex elnr, int facetnr, int npt, const double * xref, int sxref, const double * x, int sx, const double * dxdxref, int sdxdxref, double * val, int sval) const { bool drawelem = false; if (data->soltype == SOL_VIRTUALFUNCTION) drawelem = data->solclass->GetMultiSurfValue(elnr, facetnr, npt, xref, sxref, x, sx, dxdxref, sdxdxref, val, sval); else for (int i = 0; i < npt; i++) drawelem = GetSurfValues (data, elnr, facetnr, xref+i*sxref, x+i*sx, dxdxref+i*sdxdxref, val+i*sval); return drawelem; } double VisualSceneSolution :: ExtractValue (const SolData * data, int comp, double * values) const { double val = 0; if (comp == 0) { switch (evalfunc) { case FUNC_ABS: { for (int ci = 0; ci < data->components; ci++) val += sqr (values[ci]); val = sqrt (val); break; } case FUNC_ABS_TENSOR: { int d = 0; switch (data->components) { case 1: d = 1; break; case 3: d = 2; break; case 6: d = 3; break; } for (int ci = 0; ci < d; ci++) val += sqr (values[ci]); for (int ci = d; ci < data->components; ci++) val += 2*sqr (values[ci]); val = sqrt (val); break; } case FUNC_MISES: { int d = 0; switch(data->components) { case 1: d = 1; break; case 3: d = 2; break; case 6: d = 3; break; } int ci; double trace = 0.; for (ci = 0; ci < d; ci++) trace += 1./3.*(values[ci]); for (ci = 0; ci < d; ci++) val += sqr (values[ci]-trace); for (ci = d; ci < data->components; ci++) val += 2.*sqr (values[ci]); val = sqrt (val); break; } case FUNC_MAIN: { int d = 0; switch(data->components) { case 1: d = 1; break; case 3: d = 2; break; case 6: d = 3; break; } Mat<3,3> m ; Vec<3> ev; int ci; for (ci = 0; ci < d; ci++) m(ci,ci) = (values[ci]); m(0,1) = m(1,0) = values[3]; m(0,2) = m(2,0) = values[4]; m(1,2) = m(2,1) = values[5]; EigenValues (m, ev); double help; for (int i=0; i abs(ev(j-1)) ) { help = ev(j); ev(j) = ev(j-1); ev(j-1) = help; } } } val = (ev(0)); break; } } return val; } return values[comp-1]; } complex VisualSceneSolution :: ExtractValueComplex (const SolData * data, int comp, double * values) const { if (!data->iscomplex) return values[comp-1]; else return complex (values[comp-1], values[comp]); } bool VisualSceneSolution :: GetSurfValueComplex (const SolData * data, SurfaceElementIndex selnr, int facetnr, double lam1, double lam2, int comp, complex & val) const { switch (data->soltype) { case SOL_VIRTUALFUNCTION: { ArrayMem values(data->components); bool ok; ok = data->solclass->GetSurfValue (selnr, facetnr, lam1, lam2, &values[0]); if (ok) { if (!data->iscomplex) val = values[comp-1]; else val = complex (values[comp-1], values[comp]); } return ok; } default: cerr << "case not implementd 6565" << endl; } return 0; } bool VisualSceneSolution :: GetSurfValue (const SolData * data, SurfaceElementIndex selnr, int facetnr, double lam1, double lam2, int comp, double & val) const { bool ok; if (comp == 0) { val = 0; ArrayMem values(data->components); ok = GetSurfValues (data, selnr, facetnr, lam1, lam2, &values[0]); val = ExtractValue (data, 0, &values[0]); return ok; } switch (data->soltype) { case SOL_VIRTUALFUNCTION: { ArrayMem values(data->components); bool ok; ok = data->solclass->GetSurfValue (selnr, facetnr, lam1, lam2, &values[0]); if (ok) { if (!data->iscomplex) val = values[comp-1]; else { // cout << "time = " << time << ", cos = " << cos(time) << endl; // old version: val = values[comp-1]*cos(3*time) + values[comp]*sin(3*time); // SZ: Sept 06 if(comp%2==0) val = values[comp-1]*cos(3*time) - values[comp-2]*sin(3*time); else val = values[comp-1]*cos(3*time) + values[comp]*sin(3*time); } } return ok; } case SOL_NODAL: { shared_ptr mesh = GetMesh(); const Element2d & el = (*mesh)[selnr]; double lami[8]; int np, i; val = 0; double lam3 = 1-lam1-lam2; switch (el.GetType()) { case TRIG: /* lami[0] = lam3; lami[1] = lam1; lami[2] = lam2; */ lami[0] = lam1; lami[1] = lam2; lami[2] = lam3; np = 3; break; case TRIG6: /* lami[0] = lam3*(2*lam3-1); lami[1] = lam1*(2*lam1-1); lami[2] = lam2*(2*lam2-1); */ // hierarchical basis: lami[0] = lam3; lami[1] = lam1; lami[2] = lam2; lami[3] = 4*lam1*lam2; lami[4] = 4*lam2*lam3; lami[5] = 4*lam1*lam3; np = 6; break; case QUAD: case QUAD6: lami[0] = (1-lam1)*(1-lam2); lami[1] = lam1 * (1-lam2); lami[2] = lam1 * lam2; lami[3] = (1-lam1) * lam2; np = 4; break; default: np = 0; } for (i = 0; i < np; i++) val += lami[i] * data->data[(el[i]-1) * data->dist + comp-1]; return 1; } case SOL_ELEMENT: { shared_ptr mesh = GetMesh(); int el1, el2; mesh->GetTopology().GetSurface2VolumeElement (selnr+1, el1, el2); el1--; val = data->data[el1 * data->dist+comp-1]; return 1; } case SOL_NONCONTINUOUS: { val = 0; // ????? return 0; } case SOL_SURFACE_ELEMENT: { val = data->data[selnr * data->dist + comp-1]; return 1; } case SOL_SURFACE_NONCONTINUOUS: { shared_ptr mesh = GetMesh(); const Element2d & el = (*mesh)[selnr]; double lami[8]; int np = 0; val = 0; int order = data->order; switch (order) { case 0: return data->data[selnr * data->dist + comp-1]; case 1: { switch (el.GetType()) { case TRIG: case TRIG6: { lami[1] = lam1; lami[2] = lam2; lami[0] = 1-lam1-lam2; np = 3; break; } default: cerr << "case not implementd 2342" << endl; } break; } case 2: { switch (el.GetType()) { case TRIG: { lami[1] = lam1; lami[2] = lam2; lami[0] = 1-lam1-lam2; np = 3; break; } case TRIG6: { double lam3 = 1-lam1-lam2; lami[1] = 2*lam1 * (lam1-0.5); lami[2] = 2*lam2 * (lam2-0.5); lami[0] = 2*lam3 * (lam3-0.5); lami[3] = 4*lam1*lam2; lami[4] = 4*lam2*lam3; lami[5] = 4*lam1*lam3; np = 6; break; } default: cerr << "case not implemented 8712" << endl; } break; } } int base; if (order == 1) base = 4 * selnr; else base = 9 * selnr; for (int i = 0; i < np; i++) val += lami[i] * data->data[(base+i) * data->dist + comp-1]; return 1; } case SOL_MARKED_ELEMENTS: { shared_ptr mesh = GetMesh(); val = (*mesh)[selnr].TestRefinementFlag(); return 1; } case SOL_ELEMENT_ORDER: { shared_ptr mesh = GetMesh(); val = (*mesh)[selnr].GetOrder(); return 1; } } return 0; } bool VisualSceneSolution :: GetSurfValue (const SolData * data, SurfaceElementIndex selnr, int facetnr, const double xref[], const double x[], const double dxdxref[], int comp, double & val) const { shared_ptr mesh = GetMesh(); double lam1 = xref[0], lam2 = xref[1]; bool ok; if (comp == 0) { val = 0; ArrayMem values(data->components); ok = GetSurfValues (data, selnr, facetnr, xref, x, dxdxref, &values[0]); val = ExtractValue (data, 0, &values[0]); return ok; } switch (data->soltype) { case SOL_VIRTUALFUNCTION: { ArrayMem values(data->components); bool ok; // ok = data->solclass->GetSurfValue (selnr, lam1, lam2, &values[0]); // cout << "data->solclass = " << flush << data->solclass << endl; ok = data->solclass->GetSurfValue (selnr, facetnr, xref, x, dxdxref, &values[0]); // ok = 1; // values[0] = 1.0; if (ok) { if (!data->iscomplex) val = values[comp-1]; else { // cout << "time = " << time << ", cos = " << cos(time) << endl; // old version: val = values[comp-1]*cos(3*time) + values[comp]*sin(3*time); // SZ: Sept 06 if(comp%2==0) val = values[comp-1]*cos(3*time) - values[comp-2]*sin(3*time); else val = values[comp-1]*cos(3*time) + values[comp]*sin(3*time); } } return ok; } case SOL_NODAL: { const Element2d & el = (*mesh)[selnr]; double lami[8]; int np, i; val = 0; double lam3 = 1-lam1-lam2; switch (el.GetType()) { case TRIG: /* lami[0] = lam3; lami[1] = lam1; lami[2] = lam2; */ lami[0] = lam1; lami[1] = lam2; lami[2] = lam3; np = 3; break; case TRIG6: /* lami[0] = lam3*(2*lam3-1); lami[1] = lam1*(2*lam1-1); lami[2] = lam2*(2*lam2-1); */ // hierarchical basis: lami[0] = lam3; lami[1] = lam1; lami[2] = lam2; lami[3] = 4*lam1*lam2; lami[4] = 4*lam2*lam3; lami[5] = 4*lam1*lam3; np = 6; break; case QUAD: case QUAD6: lami[0] = (1-lam1)*(1-lam2); lami[1] = lam1 * (1-lam2); lami[2] = lam1 * lam2; lami[3] = (1-lam1) * lam2; np = 4; break; default: np = 0; } for (i = 0; i < np; i++) val += lami[i] * data->data[(el[i]-1) * data->dist + comp-1]; return 1; } case SOL_ELEMENT: { int el1, el2; mesh->GetTopology().GetSurface2VolumeElement (selnr+1, el1, el2); el1--; val = data->data[el1 * data->dist+comp-1]; return 1; } case SOL_NONCONTINUOUS: { val = 0; // ????? return 0; } case SOL_SURFACE_ELEMENT: { val = data->data[selnr * data->dist + comp-1]; return 1; } case SOL_SURFACE_NONCONTINUOUS: { const Element2d & el = (*mesh)[selnr]; double lami[8] = { 0.0 }; int np = 0; val = 0; int order = data->order; switch (order) { case 0: return data->data[selnr * data->dist + comp-1]; case 1: { switch (el.GetType()) { case TRIG: case TRIG6: { lami[1] = lam1; lami[2] = lam2; lami[0] = 1-lam1-lam2; np = 3; break; } default: cerr << "case not impl 234234" << endl; } break; } case 2: { switch (el.GetType()) { case TRIG: { lami[1] = lam1; lami[2] = lam2; lami[0] = 1-lam1-lam2; np = 3; break; } case TRIG6: { double lam3 = 1-lam1-lam2; lami[1] = 2*lam1 * (lam1-0.5); lami[2] = 2*lam2 * (lam2-0.5); lami[0] = 2*lam3 * (lam3-0.5); lami[3] = 4*lam1*lam2; lami[4] = 4*lam2*lam3; lami[5] = 4*lam1*lam3; np = 6; break; } default: cerr << "case not implented 3234" << endl; } break; } } int base; if (order == 1) base = 4 * selnr; else base = 9 * selnr; for (int i = 0; i < np; i++) val += lami[i] * data->data[(base+i) * data->dist + comp-1]; return 1; } case SOL_MARKED_ELEMENTS: { val = (*mesh)[selnr].TestRefinementFlag(); return 1; } case SOL_ELEMENT_ORDER: { val = (*mesh)[selnr].GetOrder(); return 1; } } return 0; } Vec<3> VisualSceneSolution :: GetDeformation (ElementIndex elnr, const Point<3> & p) const { Vec<3> def; if (deform && vecfunction != -1) { GetValues (soldata[vecfunction], elnr, p(0), p(1), p(2), &def(0)); def *= scaledeform; if (soldata[vecfunction]->components == 2) def(2) = 0; } else def = 0; return def; } Vec<3> VisualSceneSolution :: GetSurfDeformation (SurfaceElementIndex elnr, int facetnr, double lam1, double lam2) const { shared_ptr mesh = GetMesh(); Vec<3> def; if (deform && vecfunction != -1) { // GetSurfValues (soldata[vecfunction], elnr, facetnr, lam1, lam2, &def(0)); double values[6]; GetSurfValues (soldata[vecfunction], elnr, facetnr, lam1, lam2, values); def = RealVec3d (values, soldata[vecfunction]->iscomplex, imag_part); def *= scaledeform; if (soldata[vecfunction]->components == 2) def(2) = 0; } else if (deform && scalfunction != -1 && mesh->GetDimension()==2) { // he: allow for 3d plots of 2d surfaces: usage: turn deformation on def = 0; GetSurfValue (soldata[scalfunction], elnr, facetnr, lam1, lam2, scalcomp, def(2)); def *= scaledeform; } else def = 0; return def; } void VisualSceneSolution :: GetPointDeformation (int pnum, Point<3> & p, SurfaceElementIndex elnr) const { shared_ptr mesh = GetMesh(); p = mesh->Point (pnum+1); if (deform && vecfunction != -1) { const SolData * vsol = soldata[vecfunction]; Vec<3> v(0,0,0); if (vsol->soltype == SOL_NODAL) { v = Vec3d(vsol->data[pnum * vsol->dist], vsol->data[pnum * vsol->dist+1], vsol->data[pnum * vsol->dist+2]); } else if (vsol->soltype == SOL_SURFACE_NONCONTINUOUS) { const Element2d & el = (*mesh)[elnr]; for (int j = 0; j < el.GetNP(); j++) if (el[j] == pnum+1) { int base = (4*elnr+j-1) * vsol->dist; v = Vec3d(vsol->data[base], vsol->data[base+1], vsol->data[base+2]); } } if (vsol->dist == 2) v(2) = 0; v *= scaledeform; p += v; } } void VisualSceneSolution :: GetClippingPlaneTrigs (Array & trigs, Array & pts) { shared_ptr mesh = GetMesh(); static int timer_vals = NgProfiler::CreateTimer ("ClipPlaneTrigs - vertex values"); static int timer1 = NgProfiler::CreateTimer ("ClipPlaneTrigs1"); // static int timer1a = NgProfiler::CreateTimer ("ClipPlaneTrigs1a"); // static int timer2 = NgProfiler::CreateTimer ("ClipPlaneTrigs2"); static int timer3 = NgProfiler::CreateTimer ("ClipPlaneTrigs3"); static int timer4 = NgProfiler::CreateTimer ("ClipPlaneTrigs4"); static int timer4b = NgProfiler::CreateTimer ("ClipPlaneTrigs4b"); NgProfiler::RegionTimer reg1 (timer1); int ne = mesh->GetNE(); const int edgei[6][2] = { { 0, 1 }, { 0, 2 }, { 0, 3 }, { 1, 2 }, { 1, 3 }, { 2, 3 } }; double edgelam[6]; // Point<3> edgep[6]; double nodevali[4]; int cntce; int cpe1 = 0, cpe2 = 0, cpe3 = 0; // Array loctets; // Array loctetsloc; // Array > pointsloc; int n = 1 << subdivisions; int n3 = (n+1)*(n+1)*(n+1); Array > grid(n3); Array > locgrid(n3); Array > trans(n3); Array val(n3); Array locposval(n3); Array compress(n3); NgProfiler::StartTimer (timer_vals); Array vertval(mesh->GetNV()); Array posval(mesh->GetNV()); for (PointIndex pi = vertval.Begin(); pi < vertval.End(); pi++) { Point<3> vert = (*mesh)[pi]; vertval[pi] = vert(0) * clipplane[0] + vert(1) * clipplane[1] + vert(2) * clipplane[2] + clipplane[3]; posval[pi] = vertval[pi] > 0; } NgProfiler::StopTimer (timer_vals); INDEX_2_CLOSED_HASHTABLE edges(8*n3); // point nr of edge for (ElementIndex ei = 0; ei < ne; ei++) { // NgProfiler::RegionTimer reg1a (timer1a); int first_point_of_element = pts.Size(); locgrid.SetSize(n3); if(vispar.clipdomain > 0 && vispar.clipdomain != (*mesh)[ei].GetIndex()) continue; if(vispar.donotclipdomain > 0 && vispar.donotclipdomain == (*mesh)[ei].GetIndex()) continue; ELEMENT_TYPE type = (*mesh)[ei].GetType(); if (type == HEX || type == PRISM || type == TET || type == TET10 || type == PYRAMID) { const Element & el = (*mesh)[ei]; int ii = 0; int cnt_valid = 0; // NgProfiler::StartTimer (timer2); if (!mesh->GetCurvedElements().IsElementHighOrder(ei)) { bool has_pos = 0, has_neg = 0; for (int i = 0; i < el.GetNP(); i++) if (posval[el[i]]) has_pos = 1; else has_neg = 1; if (!has_pos || !has_neg) { // NgProfiler::StopTimer (timer2); continue; } } if (type == TET || type == TET10) { for (int ix = 0; ix <= n; ix++) for (int iy = 0; iy <= n; iy++) for (int iz = 0; iz <= n; iz++, ii++) { if (ix+iy+iz <= n) { compress[ii] = cnt_valid; locgrid[cnt_valid] = Point<3> (double(ix) / n, double(iy) / n, double(iz) / n); cnt_valid++; } else compress[ii] = -1; } } else for (int ix = 0; ix <= n; ix++) for (int iy = 0; iy <= n; iy++) for (int iz = 0; iz <= n; iz++, ii++) { Point<3> ploc; compress[ii] = ii; switch (type) { case PRISM: if (ix+iy <= n) { ploc = Point<3> (double(ix) / n, double(iy) / n, double(iz) / n); compress[ii] = cnt_valid; cnt_valid++; } else compress[ii] = -1; break; case HEX: ploc = Point<3> (double(ix) / n, double(iy) / n, double(iz) / n); break; case PYRAMID: ploc = Point<3> (double(ix) / n * (1-double(iz)/n), double(iy) / n * (1-double(iz)/n), double(iz)/n); if (iz == n) ploc = Point<3> (0,0,1-1e-8); break; default: cerr << "clip plane trigs not implemented" << endl; ploc = Point<3> (0,0,0); } if (compress[ii] != -1) locgrid[compress[ii]] = ploc; } if (type != TET && type != TET10 && type != PRISM) cnt_valid = n3; locgrid.SetSize(cnt_valid); // NgProfiler::StopTimer (timer2); // NgProfiler::RegionTimer reg4(timer4); if (mesh->GetCurvedElements().IsHighOrder()) { NgProfiler::RegionTimer reg4(timer4); mesh->GetCurvedElements(). CalcMultiPointElementTransformation (&locgrid, ei, &grid, 0); } else { NgProfiler::RegionTimer reg4(timer4b); Vector shape(el.GetNP()); MatrixFixWidth<3> pointmat(el.GetNP()); for (int k = 0; k < el.GetNP(); k++) for (int j = 0; j < 3; j++) pointmat(k,j) = (*mesh)[el[k]](j); for (int i = 0; i < cnt_valid; i++) { el.GetShapeNew (locgrid[i], shape); Point<3> pglob; for (int j = 0; j < 3; j++) { pglob(j) = 0; for (int k = 0; k < el.GetNP(); k++) pglob(j) += shape(k) * pointmat(k,j); } grid[i] = pglob; } } NgProfiler::RegionTimer reg3(timer3); bool has_pos = false, all_pos = true; for (int i = 0; i < cnt_valid; i++) { val[i] = grid[i](0) * clipplane[0] + grid[i](1) * clipplane[1] + grid[i](2) * clipplane[2] + clipplane[3]; locposval[i] = val[i] > 0; has_pos |= locposval[i]; all_pos &= locposval[i]; // if (val[i] > 0) has_pos = 1; else has_neg = 1; } // if (!has_pos || !has_neg) continue; if (!has_pos || all_pos) continue; edges.DeleteData(); for (int ix = 0; ix < n; ix++) for (int iy = 0; iy < n; iy++) for (int iz = 0; iz < n; iz++) { int base = iz + (n+1)*iy + (n+1)*(n+1)*ix; int pi[8] = { base, base+(n+1)*(n+1), base+(n+1)*(n+1)+(n+1), base+(n+1), base+1, base+(n+1)*(n+1)+1, base+(n+1)*(n+1)+(n+1)+1, base+(n+1)+1 }; for (int j = 0; j < 8; j++) pi[j] = compress[pi[j]]; bool has_pos = false, all_pos = true; for (int j = 0; j < 8; j++) if (pi[j] != -1) { has_pos |= locposval[pi[j]]; all_pos &= locposval[pi[j]]; } if (!has_pos || all_pos) continue; const int tets[6][4] = { { 1, 2, 4, 5 }, { 4, 5, 2, 8 }, { 2, 8, 5, 6 }, { 2, 3, 4, 8 }, { 2, 3, 8, 6 }, { 3, 8, 6, 7 } }; for (int ii = 0; ii < 6; ii++) { int teti[4]; for (int k = 0; k < 4; k++) teti[k] = pi[tets[ii][k]-1]; bool is_valid = true; for (int j = 0; j < 4; j++) is_valid &= (teti[j] != -1); if (!is_valid) continue; bool has_pos = false, all_pos = true; for (int j = 0; j < 4; j++) { has_pos |= locposval[teti[j]]; all_pos &= locposval[teti[j]]; } if (!has_pos || all_pos) continue; for (int j = 0; j < 4; j++) nodevali[j] = val[teti[j]]; cntce = 0; for (int j = 0; j < 6; j++) { int lpi1 = edgei[j][0]; int lpi2 = edgei[j][1]; if ( (nodevali[lpi1] > 0) != (nodevali[lpi2] > 0) ) { cntce++; cpe3 = cpe2; cpe2 = cpe1; cpe1 = j; if (cntce >= 3) { ClipPlaneTrig cpt; cpt.elnr = ei; for (int k = 0; k < 3; k++) { int ednr; switch (k) { case 0: ednr = cpe1; break; case 1: ednr = cpe2; break; case 2: ednr = cpe3; break; } int pi1 = edgei[ednr][0]; int pi2 = edgei[ednr][1]; int pnr = -1; INDEX_2 pair (teti[pi1], teti[pi2]); pair.Sort(); if (edges.Used(pair)) pnr = edges.Get(pair); else { ClipPlanePoint cppt; cppt.elnr = ei; edgelam[ednr] = nodevali[pi2] / (nodevali[pi2] - nodevali[pi1]); Point<3> gp1 = grid[teti[pi1]]; Point<3> gp2 = grid[teti[pi2]]; cppt.p = gp2 + edgelam[ednr] * (gp1-gp2); Point<3> p1 = locgrid[teti[pi1]]; Point<3> p2 = locgrid[teti[pi2]]; cppt.lami = p2 + edgelam[ednr] * (p1-p2); pts.Append (cppt); pnr = pts.Size()-1; edges.Set (pair, pnr); } cpt.points[k].pnr = pnr; cpt.points[k].locpnr = pnr-first_point_of_element; } trigs.Append (cpt); } } } } } } else { // other elements not supported (JS, June 2007) continue; // return; } } } void VisualSceneSolution :: GetClippingPlaneGrid (Array & pts) { shared_ptr mesh = GetMesh(); Vec3d n(clipplane[0], clipplane[1], clipplane[2]); double mu = -clipplane[3] / n.Length2(); Point3d p(mu*n.X(), mu * n.Y(), mu * n.Z()); // n /= n.Length(); n.Normalize(); Vec3d t1, t2; n.GetNormal (t1); t2 = Cross (n, t1); double xi1, xi2; double xi1mid = (center - p) * t1; double xi2mid = (center - p) * t2; pts.SetSize(0); for (xi1 = xi1mid-rad+xoffset/gridsize; xi1 <= xi1mid+rad+xoffset/gridsize; xi1 += rad / gridsize) for (xi2 = xi2mid-rad+yoffset/gridsize; xi2 <= xi2mid+rad+yoffset/gridsize; xi2 += rad / gridsize) { Point3d hp = p + xi1 * t1 + xi2 * t2; int cindex(-1); bool allowindex(true); if(vispar.clipdomain > 0) { cindex = vispar.clipdomain; } else if(vispar.donotclipdomain > 0) { allowindex = false; cindex = vispar.donotclipdomain; } double lami[3]; int elnr = mesh->GetElementOfPoint (hp, lami,0,cindex,allowindex)-1; if (elnr != -1) { ClipPlanePoint cpp; cpp.p = hp; cpp.elnr = elnr; cpp.lami(0) = lami[0]; cpp.lami(1) = lami[1]; cpp.lami(2) = lami[2]; pts.Append (cpp); } } }; void VisualSceneSolution :: DrawClipPlaneTrigs () { shared_ptr mesh = GetMesh(); #ifdef PARALLELGL if (id == 0 && ntasks > 1) { InitParallelGL(); Array parlists (ntasks); MyMPI_SendCmd ("redraw"); MyMPI_SendCmd ("clipplanetrigs"); for ( int dest = 1; dest < ntasks; dest++ ) MyMPI_Recv (parlists[dest], dest, MPI_TAG_VIS); if (clipplanelist_scal) glDeleteLists (clipplanelist_scal, 1); clipplanelist_scal = glGenLists (1); glNewList (clipplanelist_scal, GL_COMPILE); for ( int dest = 1; dest < ntasks; dest++ ) glCallList (parlists[dest]); glEndList(); return; } #endif if (clipplanelist_scal) glDeleteLists (clipplanelist_scal, 1); clipplanelist_scal = glGenLists (1); glNewList (clipplanelist_scal, GL_COMPILE); Array trigs; Array points; GetClippingPlaneTrigs (trigs, points); glNormal3d (-clipplane[0], -clipplane[1], -clipplane[2]); glColor3d (1.0, 1.0, 1.0); SetTextureMode (usetexture); SolData * sol = NULL; if (scalfunction != -1) sol = soldata[scalfunction]; if (sol -> draw_volume) { glBegin (GL_TRIANGLES); int maxlpnr = 0; for (int i = 0; i < trigs.Size(); i++) for (int j = 0; j < 3; j++) maxlpnr = max2 (maxlpnr, trigs[i].points[j].locpnr); Array vals(maxlpnr+1); Array > valsc(maxlpnr+1); Array elnrs(maxlpnr+1); Array trigok(maxlpnr+1); Array > locpoints(maxlpnr+1); Array > globpoints(maxlpnr+1); Array > jacobi(maxlpnr+1); Array mvalues( (maxlpnr+1) * sol->components); trigok = false; elnrs = -1; Point<3> p[3]; // double val[3]; // complex valc[3]; int lastelnr = -1; int nlp = -1; bool ok = false; for (int i = 0; i < trigs.Size(); i++) { const ClipPlaneTrig & trig = trigs[i]; if (trig.elnr != lastelnr) { lastelnr = trig.elnr; nlp = -1; for (int ii = i; ii < trigs.Size(); ii++) { if (trigs[ii].elnr != trig.elnr) break; for (int j = 0; j < 3; j++) nlp = max (nlp, trigs[ii].points[j].locpnr); } nlp++; locpoints.SetSize (nlp); for (int ii = i; ii < trigs.Size(); ii++) { if (trigs[ii].elnr != trig.elnr) break; for (int j = 0; j < 3; j++) locpoints[trigs[ii].points[j].locpnr] = points[trigs[ii].points[j].pnr].lami; } mesh->GetCurvedElements(). CalcMultiPointElementTransformation (&locpoints, trig.elnr, &globpoints, &jacobi); bool drawelem = GetMultiValues (sol, trig.elnr, -1, nlp, &locpoints[0](0), &locpoints[1](0)-&locpoints[0](0), &globpoints[0](0), &globpoints[1](0)-&globpoints[0](0), &jacobi[0](0), &jacobi[1](0)-&jacobi[0](0), &mvalues[0], sol->components); // cout << "have multivalues, comps = " << sol->components << endl; // if (!drawelem) ok = false; ok = drawelem; if (usetexture != 2 || !sol->iscomplex) for (int ii = 0; ii < nlp; ii++) vals[ii] = ExtractValue(sol, scalcomp, &mvalues[ii*sol->components]); else for (int ii = 0; ii < nlp; ii++) valsc[ii] = complex (mvalues[ii*sol->components + scalcomp-1], mvalues[ii*sol->components + scalcomp]); } if(ok) for(int j=0; j<3; j++) { if (usetexture != 2 || !sol->iscomplex) SetOpenGlColor (vals[trig.points[j].locpnr]); else glTexCoord2f ( valsc[trig.points[j].locpnr].real(), valsc[trig.points[j].locpnr].imag() ); p[j] = points[trig.points[j].pnr].p; if (deform) { Point<3> ploc = points[trig.points[j].pnr].lami; p[j] += GetDeformation (trig.elnr, ploc); } glVertex3dv (p[j]); } } glEnd(); } glEndList (); #ifdef PARALLELGL glFinish(); if (id > 0) MyMPI_Send (clipplanelist_scal, 0, MPI_TAG_VIS); #endif } void VisualSceneSolution :: SetOpenGlColor(double val) { if (usetexture == 1 && !logscale) { glTexCoord1f ( val ); return; } double valmin = minval; double valmax = maxval; double value; if (!logscale) value = (val - valmin) / (valmax - valmin); else { if (valmax <= 0) valmax = 1; if (valmin <= 0) valmin = 1e-4 * valmax; value = (log(fabs(val)) - log(valmin)) / (log(valmax) - log(valmin)); } if (!invcolor) value = 1 - value; if (value > 1) value = 1; if (value < 0) value = 0; value *= 4; static const double colp[][3] = { { 1, 0, 0 }, { 1, 1, 0 }, { 0, 1, 0 }, { 0, 1, 1 }, { 0, 0, 1 }, { 1, 0, 1 }, { 1, 0, 0 }, }; int i = int(value); double r = value - i; GLdouble col[3]; for (int j = 0; j < 3; j++) col[j] = (1-r) * colp[i][j] + r * colp[i+1][j]; glColor3dv (col); } void VisualSceneSolution :: SetTextureMode (int texturemode) const { switch (texturemode) { case 0: glDisable (GL_TEXTURE_1D); glDisable (GL_TEXTURE_2D); break; case 1: glEnable (GL_TEXTURE_1D); glDisable (GL_TEXTURE_2D); glColor3d (1.0, 1.0, 1.0); break; case 2: glDisable (GL_TEXTURE_1D); glEnable (GL_TEXTURE_2D); glColor3d (1.0, 1.0, 1.0); break; } } void VisualSceneSolution :: DrawCone (const Point<3> & p1, const Point<3> & p2, double r) { int n = 10, i; Vec<3> p1p2 = p2 - p1; p1p2.Normalize(); Vec<3> p2p1 = -p1p2; Vec<3> t1 = p1p2.GetNormal(); Vec<3> t2 = Cross (p1p2, t1); Point<3> oldp = p1 + r * t1; Vec<3> oldn = t1; Point<3> p; Vec<3> normal; Mat<2> rotmat; Vec<2> cs, newcs; cs(0) = 1; cs(1) = 0; rotmat(0,0) = rotmat(1,1) = cos(2*M_PI/n); rotmat(1,0) = sin(2*M_PI/n); rotmat(0,1) = -rotmat(1,0); glBegin (GL_TRIANGLES); for (i = 1; i <= n; i++) { /* phi = 2 * M_PI * i / n; normal = cos(phi) * t1 + sin(phi) * t2; */ newcs = rotmat * cs; cs = newcs; normal = cs(0) * t1 + cs(1) * t2; p = p1 + r * normal; // cone glNormal3dv (normal); glVertex3dv (p); glVertex3dv (p2); glNormal3dv (oldn); glVertex3dv (oldp); // base-circle glNormal3dv (p2p1); glVertex3dv (p); glVertex3dv (p1); glVertex3dv (oldp); oldp = p; oldn = normal; } glEnd (); } void VisualSceneSolution :: DrawCylinder (const Point<3> & p1, const Point<3> & p2, double r) { int n = 10, i; Vec<3> p1p2 = p2 - p1; p1p2.Normalize(); // Vec<3> p2p1 = -p1p2; Vec<3> t1 = p1p2.GetNormal(); Vec<3> t2 = Cross (p1p2, t1); Point<3> oldhp1 = p1 + r * t1; Point<3> oldhp2 = p2 + r * t1; Vec<3> oldn = t1; Point<3> hp1, hp2; Vec<3> normal; Mat<2> rotmat; Vec<2> cs, newcs; cs(0) = 1; cs(1) = 0; rotmat(0,0) = rotmat(1,1) = cos(2*M_PI/n); rotmat(1,0) = sin(2*M_PI/n); rotmat(0,1) = -rotmat(1,0); glBegin (GL_QUADS); for (i = 1; i <= n; i++) { newcs = rotmat * cs; cs = newcs; normal = cs(0) * t1 + cs(1) * t2; hp1 = p1 + r * normal; hp2 = p2 + r * normal; // cylinder glNormal3dv (normal); glVertex3dv (hp1); glVertex3dv (hp2); glVertex3dv (oldhp2); glVertex3dv (oldhp1); oldhp1 = hp1; oldhp2 = hp2; oldn = normal; } glEnd (); } void VisualSceneSolution :: MouseDblClick (int px, int py) { vsmesh.SetClippingPlane(); // vsmesh.BuildFilledList(); vsmesh.MouseDblClick(px,py); } #ifdef PARALLELGL void VisualSceneSolution :: Broadcast () { MPI_Datatype type; int blocklen[] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1 }; MPI_Aint displ[] = { (char*)&usetexture - (char*)this, (char*)&clipsolution - (char*)this, (char*)&scalfunction - (char*)this, (char*)&scalcomp - (char*)this, (char*)&vecfunction - (char*)this, (char*)&gridsize - (char*)this, (char*)&autoscale - (char*)this, (char*)&logscale - (char*)this, (char*)&minval - (char*)this, (char*)&maxval - (char*)this, (char*)&numisolines - (char*)this, (char*)&subdivisions - (char*)this, (char*)&evalfunc - (char*)this, (char*)&clipplane[0] - (char*)this, (char*)&multidimcomponent - (char*)this, (char*)&deform - (char*)this, (char*)&scaledeform - (char*)this }; MPI_Datatype types[] = { MPI_INT, MPI_INT, MPI_INT, MPI_INT, MPI_INT, MPI_INT, MPI_INT, MPI_INT, MPI_DOUBLE, MPI_DOUBLE, MPI_INT, MPI_INT, MPI_INT, MPI_DOUBLE, MPI_INT, MPI_INT, MPI_DOUBLE }; MPI_Type_create_struct (17, blocklen, displ, types, &type); MPI_Type_commit ( &type ); MPI_Bcast (this, 1, type, 0, MPI_COMM_WORLD); MPI_Type_free (&type); } #endif } #include "../include/nginterface.h" void Ng_ClearSolutionData () { #ifdef OPENGL // if (nodisplay) return; // netgen::vssolution.ClearSolutionData(); netgen::GetVSSolution().ClearSolutionData(); #endif } void Ng_InitSolutionData (Ng_SolutionData * soldata) { // soldata -> name = NULL; soldata -> data = NULL; soldata -> components = 1; soldata -> dist = 1; soldata -> order = 1; soldata -> iscomplex = 0; soldata -> draw_surface = 1; soldata -> draw_volume = 1; soldata -> soltype = NG_SOLUTION_NODAL; soldata -> solclass = 0; } void Ng_SetSolutionData (Ng_SolutionData * soldata) { #ifdef OPENGL // if (nodisplay) return; // vssolution.ClearSolutionData (); netgen::VisualSceneSolution::SolData * vss = new netgen::VisualSceneSolution::SolData; // vss->name = new char[strlen (soldata->name)+1]; // strcpy (vss->name, soldata->name); vss->name = soldata->name; vss->data = soldata->data; vss->components = soldata->components; vss->dist = soldata->dist; vss->order = soldata->order; vss->iscomplex = bool(soldata->iscomplex); vss->draw_surface = soldata->draw_surface; vss->draw_volume = soldata->draw_volume; vss->soltype = netgen::VisualSceneSolution::SolType (soldata->soltype); vss->solclass = soldata->solclass; // netgen::vssolution.AddSolutionData (vss); netgen::GetVSSolution().AddSolutionData (vss); #endif } namespace netgen { extern void Render (bool blocking); } void Ng_Redraw (bool blocking) { #ifdef OPENGL //netgen::vssolution.UpdateSolutionTimeStamp(); netgen::GetVSSolution().UpdateSolutionTimeStamp(); netgen::Render(blocking); #endif } #ifdef OPENGL #ifdef WIN32 void (*glBindBuffer) (GLenum a, GLuint b); void (*glDeleteBuffers) (GLsizei a, const GLuint *b); void (*glGenBuffers) (GLsizei a, GLuint *b); void (*glBufferData) (GLenum a, GLsizeiptr b, const GLvoid *c, GLenum d); void (*glBufferSubData) (GLenum a, GLintptr b, GLsizeiptr c, const GLvoid *d); DLL_HEADER void LoadOpenGLFunctionPointers() { #ifdef USE_BUFFERS glBindBuffer = (decltype(glBindBuffer)) wglGetProcAddress("glBindBuffer"); glBufferSubData = (decltype(glBufferSubData)) wglGetProcAddress("glBufferSubData"); glBufferData = (decltype(glBufferData)) wglGetProcAddress("glBufferData"); glDeleteBuffers = (decltype(glDeleteBuffers)) wglGetProcAddress("glDeleteBuffers"); glGenBuffers = (decltype(glGenBuffers)) wglGetProcAddress("glGenBuffers"); if(!glBindBuffer) throw std::runtime_error("Could not load OpenGL functions!"); #endif } #else // WIN32 DLL_HEADER void LoadOpenGLFunctionPointers() { } #endif // WIN32 #endif // OPENGL netgen-6.2.1804/libsrc/visualization/soldata.hpp0000644000175000017500000000714713272137567020335 0ustar kurtkurt#ifndef FILE_SOLDATA #define FILE_SOLDATA namespace netgen { using namespace std; /* #if defined __AVX512F__ typedef __m512 tAVX; typedef __m512d tAVXd; #elif defined __AVX__ typedef __m256 tAVX; typedef __m256d tAVXd; #endif */ class SolutionData { protected: string name; int components; bool iscomplex; int multidimcomponent; public: SolutionData (const string & aname, int acomponents = 1, bool aiscomplex = 0) : name(aname), components(acomponents), iscomplex(aiscomplex) { ; } virtual ~SolutionData () { ; } int GetComponents() { return components; } bool IsComplex() { return iscomplex; } virtual bool GetValue (int /* elnr */, double /* lam1 */, double /* lam2 */, double /* lam3 */, double * /* values */) { return false; } virtual bool GetValue (int selnr, const double xref[], const double x[], const double dxdxref[], double * values) { return GetValue (selnr, xref[0], xref[1], xref[2], values); } virtual bool GetMultiValue (int elnr, int facetnr, int npts, const double * xref, int sxref, const double * x, int sx, const double * dxdxref, int sdxdxref, double * values, int svalues) { bool res = false; for (int i = 0; i < npts; i++) res = GetValue (elnr, &xref[i*sxref], &x[i*sx], &dxdxref[i*sdxdxref], &values[i*svalues]); return res; } virtual bool GetSurfValue (int /* selnr */, int facetnr, double /* lam1 */, double /* lam2 */, double * /* values */) { return false; } virtual bool GetSurfValue (int selnr, int facetnr, const double xref[], const double x[], const double dxdxref[], double * values) { return GetSurfValue (selnr, facetnr, xref[0], xref[1], values); } virtual bool GetMultiSurfValue (int selnr, int facetnr, int npts, const double * xref, int sxref, const double * x, int sx, const double * dxdxref, int sdxdxref, double * values, int svalues) { bool res = false; for (int i = 0; i < npts; i++) res = GetSurfValue (selnr, facetnr, &xref[i*sxref], &x[i*sx], &dxdxref[i*sdxdxref], &values[i*svalues]); return res; } #ifdef __SSE__ virtual bool GetMultiSurfValue (size_t selnr, size_t facetnr, size_t npts, const tAVXd * xref, const tAVXd * x, const tAVXd * dxdxref, tAVXd * values) { cerr << "GetMultiSurfVaue not overloaded for SIMD" << endl; return false; } #endif virtual bool GetSegmentValue (int segnr, double xref, double * values) { return false; } virtual int GetNumMultiDimComponents () { return 1; } virtual void SetMultiDimComponent (int mc) { if (mc >= GetNumMultiDimComponents()) mc = GetNumMultiDimComponents()-1; if (mc < 0) mc = 0; multidimcomponent = mc; } }; class DLL_HEADER MouseEventHandler { public: virtual void DblClick (int elnr, double x, double y, double z) = 0; }; class DLL_HEADER UserVisualizationObject { public: virtual void Draw () = 0; }; } #endif netgen-6.2.1804/libsrc/visualization/mvdraw.hpp0000644000175000017500000001315313272137567020200 0ustar kurtkurt#ifndef FILE_MVDRAW #define FILE_MVDRAW namespace netgen { class VisualScene { protected: static DLL_HEADER Point3d center; static DLL_HEADER double rad; static double lookatmat[16]; static double transmat[16]; static double rotmat[16]; static double centermat[16]; static DLL_HEADER double transformationmat[16]; GLdouble clipplane[4]; int changeval; static DLL_HEADER GLdouble backcolor; static int DLL_HEADER selface; static int selelement; static PointIndex DLL_HEADER selpoint; static PointIndex selpoint2; static int locpi; static int DLL_HEADER seledge; static int selecttimestamp; public: static int viewport[4]; static GLuint coltexname; static int ntexcols; int invcolor; public: DLL_HEADER VisualScene (); DLL_HEADER virtual ~VisualScene(); DLL_HEADER virtual void BuildScene (int zoomall = 0); DLL_HEADER virtual void DrawScene (); DLL_HEADER void CalcTransformationMatrices(); DLL_HEADER void StandardRotation (const char * dir); DLL_HEADER void ArbitraryRotation (const Array & alpha, const Array & vec); DLL_HEADER void ArbitraryRotation (const double alpha, const Vec3d & vec); DLL_HEADER void MouseMove(int oldx, int oldy, int newx, int newy, char mode); DLL_HEADER void LookAt (const Point<3> & cam, const Point<3> & obj, const Point<3> & camup); DLL_HEADER void SetClippingPlane (); DLL_HEADER virtual void MouseDblClick (int px, int py); DLL_HEADER void SetLight (); static void SetBackGroundColor (double col) { backcolor = col; } DLL_HEADER void CreateTexture (int ncols, int linear, double alpha, int typ); DLL_HEADER void DrawColorBar (double minval, double maxval, int logscale = 0, bool linear = 1); DLL_HEADER void DrawCoordinateCross (); DLL_HEADER void DrawNetgenLogo (); DLL_HEADER void SetOpenGlColor(double val, double valmin, double valmax, int logscale = 0); #ifdef PARALLELGL DLL_HEADER void InitParallelGL (); DLL_HEADER void Broadcast (); #endif }; DLL_HEADER extern void MyOpenGLText (const char * text); DLL_HEADER extern void Set_OpenGLText_Callback ( void (*fun) (const char * text) ); class VisualSceneSurfaceMeshing : public VisualScene { public: VisualSceneSurfaceMeshing (); virtual ~VisualSceneSurfaceMeshing (); virtual void BuildScene (int zoomall = 0); virtual void DrawScene (); }; class VisualSceneMesh : public VisualScene { int filledlist; int linelist; int edgelist; int pointnumberlist; int tetlist; int prismlist; int pyramidlist; int hexlist; int badellist; int identifiedlist; int domainsurflist; int vstimestamp;//, selecttimestamp; int filledtimestamp; int linetimestamp; int edgetimestamp; int pointnumbertimestamp; int tettimestamp; int prismtimestamp; int pyramidtimestamp; int hextimestamp; int badeltimestamp; int identifiedtimestamp; int domainsurftimestamp; #ifdef PARALLELGL Array par_linelists; Array par_filledlists; #endif MouseEventHandler * user_me_handler; NgLock *lock; // int selface, selelement; // int selpoint, selpoint2, locpi; // int seledge; double minh, maxh; // for meshsize coloring // weak_ptr wp_mesh; public: DLL_HEADER VisualSceneMesh (); DLL_HEADER virtual ~VisualSceneMesh (); DLL_HEADER virtual void BuildScene (int zoomall = 0); DLL_HEADER virtual void DrawScene (); DLL_HEADER virtual void MouseDblClick (int px, int py); // void SetMesh (shared_ptr mesh) { wp_mesh = mesh; } // shared_ptr GetMesh () { return shared_ptr(wp_mesh); } shared_ptr GetMesh () const { return shared_ptr(global_mesh); } void SetMouseEventHandler (MouseEventHandler * handler) { user_me_handler = handler; } DLL_HEADER int SelectedFace () const { return selface; } DLL_HEADER void SetSelectedFace (int asf); // { selface = asf; selecttimestamp = GetTimeStamp(); } DLL_HEADER int SelectedEdge () const { return seledge; } DLL_HEADER int SelectedElement () const { return selelement; } DLL_HEADER int SelectedPoint () const { return selpoint; } void BuildFilledList (bool names); // private: void BuildLineList(); void BuildEdgeList(); void BuildPointNumberList(); void BuildTetList(); void BuildPrismList(); void BuildPyramidList(); void BuildHexList(); void BuildBadelList(); void BuildIdentifiedList(); void BuildDomainSurfList(); }; DLL_HEADER extern VisualSceneMesh vsmesh; class DLL_HEADER VisualSceneSpecPoints : public VisualScene { public: VisualSceneSpecPoints (); virtual ~VisualSceneSpecPoints (); virtual void BuildScene (int zoomall = 0); virtual void DrawScene (); double len; }; // extern struct Tcl_Interp * hinterp; extern void AddVisualizationScene (const string & name, VisualScene * vs); void MouseDblClickSelect (const int px, const int py, const GLdouble * clipplane, const GLdouble backcolor, const double * transformationmat, const Point3d & center, const double rad, const int displaylist, int & selelement, int & selface, int & seledge, PointIndex & selpoint, PointIndex & selpoint2, int & locpi); } #endif netgen-6.2.1804/libsrc/visualization/stlmeshing.cpp0000644000175000017500000006650313272137567021057 0ustar kurtkurt#include #include #include #include #include #ifndef NOTCL #include #endif namespace netgen { /* //mmm #include "stlgeom/modeller.hpp" */ /* *********************** Draw STL Geometry **************** */ extern STLGeometry * stlgeometry; extern AutoPtr mesh; #ifdef OPENGL // #include "../../ngtcltk/mvdraw.hpp" VisualSceneSTLMeshing :: VisualSceneSTLMeshing () : VisualScene() { selecttrig = 0; nodeofseltrig = 1; stlgeometry->SetSelectTrig(selecttrig); stlgeometry->SetNodeOfSelTrig(nodeofseltrig); } VisualSceneSTLMeshing :: ~VisualSceneSTLMeshing () { ; } void VisualSceneSTLMeshing :: DrawScene () { int i, j, k; if (changeval != stlgeometry->GetNT()) BuildScene(); changeval = stlgeometry->GetNT(); int colormeshsize = vispar.colormeshsize; double hmin = 0.0, hmax = 1.0; if (colormeshsize) { hmax = -1E50; hmin = +1E50; double ms; for (i = 1; i <= stlgeometry->GetNP(); i++) { ms = mesh->GetH (stlgeometry->GetPoint(i)); hmin = min2(hmin,ms); hmax = max2(hmax,ms); } //hmax = mparam.maxh; //hmin = mesh->GetMinH (stlgeometry->GetBoundingBox().PMin(), // stlgeometry->GetBoundingBox().PMax()); if (hmin == 0) hmin = 0.1 * hmax; //hmax *= 1.1; } glClearColor(backcolor, backcolor, backcolor, 1.0); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); SetLight(); glPushMatrix(); glMultMatrixf (transformationmat); SetClippingPlane (); glShadeModel (GL_SMOOTH); glDisable (GL_COLOR_MATERIAL); glPolygonMode (GL_FRONT_AND_BACK, GL_FILL); glEnable (GL_BLEND); glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); float mat_spec_col[] = { 1, 1, 1, 1 }; glMaterialfv (GL_FRONT_AND_BACK, GL_SPECULAR, mat_spec_col); double shine = vispar.shininess; // double transp = vispar.transp; glMaterialf (GL_FRONT_AND_BACK, GL_SHININESS, shine); glLogicOp (GL_COPY); float mat_colred[] = { 0.9f, 0.0f, 0.0f, 1.0f }; float mat_colgreen[] = { 0.0f, 0.9f, 0.0f, 1.0f }; float mat_colblue[] = { 0.1f, 0.1f, 1.0f, 1.0f }; float mat_colbluegreen[] = { 0.1f, 0.5f, 0.9f, 1.0f }; // float mat_colpink[] = { 1.0f, 0.1f, 0.5f, 1.0f }; float mat_colviolet[] = { 1.0f, 0.1f, 1.0f, 1.0f }; float mat_colbrown[] = { 0.8f, 0.6f, 0.1f, 1.0f }; // float mat_colorange[] = { 0.9f, 0.7f, 0.1f, 1.0f }; // float mat_colturquis[] = { 0.0f, 1.0f, 0.8f, 1.0f }; float mat_colgrey[] = { 0.3f, 0.3f, 0.3f, 1.0f }; float mat_collred[] = { 1.0f, 0.5f, 0.5f, 1.0f }; float mat_collgreen[] = { 0.2f, 1.9f, 0.2f, 1.0f }; float mat_collbrown[] = { 1.0f, 0.8f, 0.3f, 1.0f }; float mat_collgrey[] = { 0.8f, 0.8f, 0.8f, 1.0f }; // float mat_colmgrey[] = { 0.4f, 0.4f, 0.4f, 1.0f }; float mat_colstlbody[] = { 0.0f, 0.0f, 0.8f, 1.0f }; float mat_colseltrig[] = { 0.7f, 0.7f, 0.3f, 1.0f }; float mat_colseledge[] = { 0.7f, 0.7f, 1.0f, 1.0f }; glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_colblue); float pgoff = 0.5f; glPolygonOffset (pgoff*1, pgoff*1); glEnable (GL_POLYGON_OFFSET_FILL); glEnable (GL_NORMALIZE); /* { //mmm //test modeller Modeller model; //MoZylinder z1(Point3d(0,0,0),Vec3d(100,0,0),20,0.01); //model.Add(&z1); //MoZylinder z2(Point3d(50,50,0),Vec3d(0,-100,0),20,0.01); //model.Add(&z2); MoZylinder z1(Point3d(0,0,0),Vec3d(100,0,0),20,0.01); MoZylinder z2(Point3d(50,50,0),Vec3d(0,-100,0),20,0.01); MoCombine cb1(&z1,&z2); model.Add(&cb1); Array trigs; model.GetTriangles(trigs); int i, k; glBegin (GL_TRIANGLES); for (i = 1; i <= trigs.Size(); i++) { const MoTriangle & tria = trigs.Get(i); glNormal3f (tria.normal.X(), tria.normal.Y(), tria.normal.Z()); for (k = 0; k < 3; k++) { glVertex3f (tria.pts[k].X(), tria.pts[k].Y(), tria.pts[k].Z()); } } glEnd (); } */ if (!stlgeometry->trigsconverted) { glBegin (GL_TRIANGLES); for (j = 1; j <= stlgeometry -> GetNT(); j++) { /* if (j % 10 == seltria) glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_colred); */ const Vec3d & n = stlgeometry->GetTriangle(j).Normal(); glNormal3f (n.X(), n.Y(), n.Z()); /* const STLReadTriangle & tria = stlgeometry -> GetReadTriangle(j); glNormal3f (tria.normal.X(), tria.normal.Y(), tria.normal.Z()); */ for (k = 1; k <= 3; k++) { const Point3d & tp = stlgeometry->GetPoint(stlgeometry->GetTriangle(j).PNum(k)); glVertex3f (tp.X(), tp.Y(), tp.Z()); } /* if (j%10 == seltria) glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_colblue); */ } glEnd (); glDisable (GL_POLYGON_OFFSET_FILL); int showtrias = vispar.stlshowtrias; if (showtrias) { float mat_coll[] = { 0.2f, 0.2f, 0.2f, 1.f }; glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_coll); glPolygonMode (GL_FRONT_AND_BACK, GL_LINE); glEnable (GL_NORMALIZE); glBegin (GL_TRIANGLES); for (j = 1; j <= stlgeometry -> GetNT(); j++) { const Vec3d & n = stlgeometry->GetTriangle(j).Normal(); glNormal3f (n.X(), n.Y(), n.Z()); /* const STLReadTriangle & tria = stlgeometry -> GetReadTriangle(j); glNormal3f (tria.normal.X(), tria.normal.Y(), tria.normal.Z()); */ for (k = 1; k <= 3; k++) { const Point3d & tp = stlgeometry->GetPoint(stlgeometry->GetTriangle(j).PNum(k)); glVertex3f (tp.X(), tp.Y(), tp.Z()); } /* for (k = 0; k < 3; k++) { glVertex3f (tria.pts[k].X(), tria.pts[k].Y(), tria.pts[k].Z()); } */ } glEnd (); } } else { int showfilledtrias = vispar.stlshowfilledtrias; //(*mycout) << "in " << showfilledtrias << ", NT=" << stlgeometry -> GetNT() << endl; int chartnumber; if (vispar.stlshowmarktrias) chartnumber = vispar.stlchartnumber + vispar.stlchartnumberoffset; else chartnumber = stlgeometry->GetMeshChartNr(); if (showfilledtrias) { glPolygonMode (GL_FRONT_AND_BACK, GL_FILL); if (colormeshsize) glEnable (GL_COLOR_MATERIAL); glPolygonOffset (pgoff*4, pgoff*4); glEnable (GL_POLYGON_OFFSET_FILL); glEnable (GL_NORMALIZE); glBegin (GL_TRIANGLES); int selt = stlgeometry -> GetSelectTrig(); if (stldoctor.selectmode != 0) {selt = 0; } //do not show selected triangle!!!! glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_colstlbody); for (j = 1; j <= stlgeometry -> GetNT(); j++) { if (stldoctor.showvicinity && !stlgeometry->Vicinity(j)) {continue;} if (j == selt) { glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_colseltrig); } else if (j == selt+1) { glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_colstlbody); } const STLTriangle& st = stlgeometry -> GetTriangle(j); const Vec3d & n = stlgeometry->GetTriangle(j).Normal(); glNormal3f (n.X(), n.Y(), n.Z()); /* const STLReadTriangle& tria = stlgeometry -> GetReadTriangle(j); glNormal3f (tria.normal.X(), tria.normal.Y(), tria.normal.Z()); */ for (k = 0; k < 3; k++) { const Point3d & p = stlgeometry->GetPoint(st[k]); if (colormeshsize) { SetOpenGlColor (mesh->GetH (p), hmin, hmax, 1); } glVertex3f (p.X(), p.Y(), p.Z()); } } glEnd (); } int foundseltrig = stlgeometry -> GetSelectTrig(); if (foundseltrig == 0 || foundseltrig > stlgeometry->GetNT() || (stldoctor.showvicinity && !stlgeometry->Vicinity(foundseltrig))) {foundseltrig = 0;} if (foundseltrig) { glPolygonOffset (pgoff*0, 0); glEnable (GL_POLYGON_OFFSET_FILL); //glDisable (GL_POLYGON_OFFSET_FILL); glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_colseledge); glPolygonMode (GL_FRONT_AND_BACK, GL_LINE); glEnable (GL_NORMALIZE); if (stldoctor.selectmode == 2) { //point const STLTriangle& st = stlgeometry -> GetTriangle(foundseltrig); const Point3d & p1 = stlgeometry->GetPoint(st[0]); const Point3d & p2 = stlgeometry->GetPoint(st[1]); const Point3d & p3 = stlgeometry->GetPoint(st[2]); double cs = (Dist(p1,p2)+Dist(p2,p3)+Dist(p3,p1))/100.; const Point3d & p = stlgeometry->GetPoint(st[nodeofseltrig-1]); glLineWidth (4); glBegin (GL_LINES); glVertex3f(p.X()+cs, p.Y()+cs, p.Z()+cs); glVertex3f(p.X()-cs, p.Y()-cs, p.Z()-cs); glVertex3f(p.X()-cs, p.Y()+cs, p.Z()+cs); glVertex3f(p.X()+cs, p.Y()-cs, p.Z()-cs); glVertex3f(p.X()-cs, p.Y()+cs, p.Z()+cs); glVertex3f(p.X()+cs, p.Y()-cs, p.Z()-cs); glVertex3f(p.X()+cs, p.Y()-cs, p.Z()+cs); glVertex3f(p.X()-cs, p.Y()+cs, p.Z()-cs); glEnd (); glLineWidth (1); } else if (stldoctor.selectmode == 1 || stldoctor.selectmode == 3 || stldoctor.selectmode == 4) { //multiedge const Array& me = stlgeometry->SelectedMultiEdge(); if (stlgeometry->GetSelectTrig() > 0 && stlgeometry->GetSelectTrig() <= stlgeometry->GetNT() && me.Size()) { int en = stlgeometry->EdgeDataList().GetEdgeNum(me.Get(1).i1,me.Get(1).i2); int status = stlgeometry->EdgeDataList().Get(en).GetStatus(); switch (status) { case ED_CONFIRMED: glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_collgreen); break; case ED_CANDIDATE: glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_collbrown); break; case ED_EXCLUDED: glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_collred); break; } glLineWidth (2); glBegin (GL_LINES); for (j = 1; j <= me.Size(); j++) { Point3d p1 = stlgeometry->GetPoint(me.Get(j).i1); Point3d p2 = stlgeometry->GetPoint(me.Get(j).i2); glVertex3f(p1.X(), p1.Y(), p1.Z()); glVertex3f(p2.X(), p2.Y(), p2.Z()); } glEnd (); glLineWidth (1); } } } int showmarktrias = vispar.stlshowmarktrias || vispar.stlshowactivechart; if (stldoctor.showmarkedtrigs) { //(*mycout) << "marked" << endl; glPolygonMode (GL_FRONT_AND_BACK, GL_LINE); //GL_LINE glPolygonOffset (pgoff*1, pgoff*1); glEnable (GL_POLYGON_OFFSET_FILL); glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_colbluegreen); glEnable (GL_NORMALIZE); glBegin (GL_TRIANGLES); for (j = 1; j <= stlgeometry -> GetNT(); j++) { if (stldoctor.showvicinity && !stlgeometry->Vicinity(j)) {continue;} if (!stlgeometry->IsMarkedTrig(j)) {continue;} const STLTriangle& st = stlgeometry -> GetTriangle(j); const Vec3d & n = stlgeometry->GetTriangle(j).Normal(); glNormal3f (n.X(), n.Y(), n.Z()); /* const STLReadTriangle& tria = stlgeometry -> GetReadTriangle(j); glNormal3f (tria.normal.X(), tria.normal.Y(), tria.normal.Z()); */ for (k = 0; k < 3; k++) { const Point3d & p = stlgeometry->GetPoint(st[k]); glVertex3f (p.X(), p.Y(), p.Z()); } } glEnd (); //show OpenSegments on original geometry glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_colviolet); glPolygonMode (GL_FRONT_AND_BACK, GL_LINE); glPolygonOffset (pgoff*1, 1); glEnable (GL_NORMALIZE); glBegin (GL_LINES); if (stlgeometry->GetNMarkedSegs()) { Point<3> p1,p2; for (j = 1; j <= stlgeometry -> GetNMarkedSegs(); j++) { stlgeometry->GetMarkedSeg(j,p1,p2); glVertex3dv(&p1(0)); glVertex3dv(&p2(0)); } } glEnd (); } if (stldoctor.showfaces) { int facenumber = vispar.stlchartnumber + vispar.stlchartnumberoffset; glPolygonMode (GL_FRONT_AND_BACK, GL_FILL); glPolygonOffset (pgoff*3, 3); glEnable (GL_POLYGON_OFFSET_FILL); glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_collgrey); glEnable (GL_NORMALIZE); glBegin (GL_TRIANGLES); for (j = 1; j <= stlgeometry -> GetNT(); j++) { if (stldoctor.showvicinity && !stlgeometry->Vicinity(j)) {continue;} //(*mycout) << " facenum = " << stlgeometry->GetTriangle(j).GetFaceNum() << " "; if (stlgeometry->GetTriangle(j).GetFaceNum() != facenumber) {continue;} const STLTriangle& st = stlgeometry -> GetTriangle(j); const Vec3d & n = stlgeometry->GetTriangle(j).Normal(); glNormal3f (n.X(), n.Y(), n.Z()); /* const STLReadTriangle& tria = stlgeometry -> GetReadTriangle(j); glNormal3f (tria.normal.X(), tria.normal.Y(), tria.normal.Z()); */ for (k = 0; k < 3; k++) { Point3d p = stlgeometry->GetPoint(st[k]); glVertex3f (p.X(), p.Y(), p.Z()); } } glEnd (); } if (showmarktrias && stlgeometry->AtlasMade()) { glPolygonMode (GL_FRONT_AND_BACK, GL_FILL); glPolygonOffset (pgoff*3, 3); glEnable (GL_POLYGON_OFFSET_FILL); glBegin (GL_TRIANGLES); if (chartnumber >= 1 && chartnumber <= stlgeometry->GetNOCharts()) { glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_colbrown); const STLChart& chart = stlgeometry->GetChart(chartnumber); for (j = 1; j <= chart.GetNChartT(); j++) { /* if (j == charttrignumber) {glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_colred);} else {glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_colbrown);} */ const STLTriangle& st = stlgeometry -> GetTriangle(chart.GetChartTrig(j)); const Vec3d & n = stlgeometry->GetTriangle(chart.GetChartTrig(j)).Normal(); glNormal3f (n.X(), n.Y(), n.Z()); /* const STLReadTriangle& tria = stlgeometry -> GetReadTriangle(chart.GetChartTrig(j)); glNormal3f (tria.normal.X(), tria.normal.Y(), tria.normal.Z()); */ for (k = 0; k < 3; k++) { glVertex3f (stlgeometry->GetPoint(st[k])(0), stlgeometry->GetPoint(st[k])(1), stlgeometry->GetPoint(st[k])(2)); } } glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_colgreen); for (j = 1; j <= chart.GetNOuterT(); j++) { const STLTriangle& st = stlgeometry -> GetTriangle(chart.GetOuterTrig(j)); const Vec3d & n = stlgeometry->GetTriangle(chart.GetOuterTrig(j)).Normal(); glNormal3f (n.X(), n.Y(), n.Z()); /* const STLReadTriangle& tria = stlgeometry -> GetReadTriangle(chart.GetOuterTrig(j)); glNormal3f (tria.normal.X(), tria.normal.Y(), tria.normal.Z()); */ for (k = 0; k < 3; k++) { glVertex3f (stlgeometry->GetPoint(st[k])(0), stlgeometry->GetPoint(st[k])(1), stlgeometry->GetPoint(st[k])(2)); } } } glEnd (); } int showtrias = vispar.stlshowtrias; if (showtrias) { glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_colgrey); glPolygonMode (GL_FRONT_AND_BACK, GL_LINE); glPolygonOffset (pgoff*2, 2); glEnable (GL_POLYGON_OFFSET_FILL); glEnable (GL_NORMALIZE); glBegin (GL_TRIANGLES); for (j = 1; j <= stlgeometry -> GetNT(); j++) { if (stldoctor.showvicinity && !stlgeometry->Vicinity(j)) {continue;} const STLTriangle& st = stlgeometry -> GetTriangle(j); const Vec3d & n = stlgeometry->GetTriangle(j).Normal(); glNormal3f (n.X(), n.Y(), n.Z()); /* const STLReadTriangle& tria = stlgeometry -> GetReadTriangle(j); glNormal3f (tria.normal.X(), tria.normal.Y(), tria.normal.Z()); */ for (k = 0; k < 3; k++) { glVertex3f (stlgeometry->GetPoint(st[k])(0), stlgeometry->GetPoint(st[k])(1), stlgeometry->GetPoint(st[k])(2)); } } glEnd (); } int showedges = vispar.stlshowedges; if (showedges) { glPolygonOffset (pgoff*1, 1); glEnable (GL_POLYGON_OFFSET_FILL); //glDisable (GL_POLYGON_OFFSET_FILL); glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_colgreen); glPolygonMode (GL_FRONT_AND_BACK, GL_LINE); glEnable (GL_NORMALIZE); glBegin (GL_LINES); /* if (stldoctor.useexternaledges) { glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_colorange); for (j = 1; j <= stlgeometry -> NOExternalEdges(); j++) { twoint v = stlgeometry->GetExternalEdge(j); Point3d p1 = stlgeometry->GetPoint(v.i1); Point3d p2 = stlgeometry->GetPoint(v.i2); Vec3d n1 = stlgeometry->GetNormal(v.i1); Vec3d n2 = stlgeometry->GetNormal(v.i2); glNormal3f(n1.X(), n1.Y(), n1.Z()); glVertex3f(p1.X(), p1.Y(), p1.Z()); glNormal3f(n2.X(), n2.Y(), n2.Z()); glVertex3f(p2.X(), p2.Y(), p2.Z()); } } */ if (!stlgeometry->meshlines.Size() || !stldoctor.drawmeshededges) { /* for (j = 1; j <= stlgeometry -> GetNE(); j++) { STLEdge v = stlgeometry->GetEdge(j); Point3d p1 = stlgeometry->GetPoint(v.pts[0]); Point3d p2 = stlgeometry->GetPoint(v.pts[1]); Vec3d n1 = stlgeometry->GetNormal(v.pts[0]); Vec3d n2 = stlgeometry->GetNormal(v.pts[1]); glNormal3f(n1.X(), n1.Y(), n1.Z()); glVertex3f(p1.X(), p1.Y(), p1.Z()); glNormal3f(n2.X(), n2.Y(), n2.Z()); glVertex3f(p2.X(), p2.Y(), p2.Z()); } */ const STLEdgeDataList& ed = stlgeometry->EdgeDataList(); for (i = 1; i <= ed.Size(); i++) { if (ed.Get(i).GetStatus() != ED_UNDEFINED) { switch (ed.Get(i).GetStatus()) { case ED_CONFIRMED: glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_colgreen); break; case ED_CANDIDATE: glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_colbrown); break; case ED_EXCLUDED: glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_colred); break; } if (ed.Get(i).GetStatus() == ED_EXCLUDED && !stldoctor.showexcluded) continue; Point3d p1 = stlgeometry->GetPoint(ed.Get(i).PNum(1)); Point3d p2 = stlgeometry->GetPoint(ed.Get(i).PNum(2)); glVertex3f(p1.X(), p1.Y(), p1.Z()); glVertex3f(p2.X(), p2.Y(), p2.Z()); } } } /* else if (stlgeometry->meshlines.Size() == 0) { for (j = 1; j <= stlgeometry->GetNLines(); j++) { STLLine* line = stlgeometry->GetLine(j); int pn1, pn2; for (int k = 1; k <= line->NP()-1; k++) { pn1 = line->PNum(k); pn2 = line->PNum(k+1); Point3d p1 = stlgeometry->GetPoint(pn1); Point3d p2 = stlgeometry->GetPoint(pn2); Vec3d n1 = stlgeometry->GetNormal(pn1); Vec3d n2 = stlgeometry->GetNormal(pn2); glNormal3f(n1.X(), n1.Y(), n1.Z()); glVertex3f(p1.X(), p1.Y(), p1.Z()); glNormal3f(n2.X(), n2.Y(), n2.Z()); glVertex3f(p2.X(), p2.Y(), p2.Z()); } } } */ else if (stlgeometry->meshlines.Size() != 0) { glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_colgreen); for (j = 1; j <= stlgeometry->meshlines.Size(); j++) { STLLine* line = stlgeometry->meshlines.Get(j); int pn1, pn2; for (int k = 1; k <= line->NP()-1; k++) { pn1 = line->PNum(k); pn2 = line->PNum(k+1); Point3d p1 = stlgeometry->meshpoints.Get(pn1); Point3d p2 = stlgeometry->meshpoints.Get(pn2); glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_colgreen); glVertex3f(p1.X(), p1.Y(), p1.Z()); glVertex3f(p2.X(), p2.Y(), p2.Z()); glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_colred); double cs = 0.02*Dist(p1,p2); glVertex3f(p1.X()+cs, p1.Y()+cs, p1.Z()+cs); glVertex3f(p1.X()-cs, p1.Y()-cs, p1.Z()-cs); glVertex3f(p2.X()+cs, p2.Y()+cs, p2.Z()+cs); glVertex3f(p2.X()-cs, p2.Y()-cs, p2.Z()-cs); glVertex3f(p1.X()-cs, p1.Y()+cs, p1.Z()+cs); glVertex3f(p1.X()+cs, p1.Y()-cs, p1.Z()-cs); glVertex3f(p2.X()-cs, p2.Y()+cs, p2.Z()+cs); glVertex3f(p2.X()+cs, p2.Y()-cs, p2.Z()-cs); } } } glEnd (); } if (stldoctor.showedgecornerpoints && stlgeometry->LineEndPointsSet()) { glPointSize (5); glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_colred); glBegin (GL_POINTS); for (i = 1; i <= stlgeometry->GetNP(); i++) { if (stlgeometry->IsLineEndPoint(i)) { const Point3d p = stlgeometry->GetPoint(i); glVertex3f (p.X(), p.Y(), p.Z()); } } glEnd(); } } glPopMatrix(); if (vispar.colormeshsize) DrawColorBar (hmin, hmax, 1); glFinish(); } void VisualSceneSTLMeshing :: BuildScene (int zoomall) { if (selecttrig && zoomall == 2) center = stlgeometry -> GetPoint ( stlgeometry->GetTriangle(selecttrig).PNum(nodeofseltrig)); else center = stlgeometry -> GetBoundingBox().Center(); rad = stlgeometry -> GetBoundingBox().Diam() / 2; CalcTransformationMatrices(); } void VisualSceneSTLMeshing :: MouseDblClick (int px, int py) { // (*mycout) << "dblclick: " << px << " - " << py << endl; int i, j, k, hits; // select surface triangle by mouse click GLuint selbuf[10000]; glSelectBuffer (10000, selbuf); glRenderMode (GL_SELECT); GLint viewport[4]; glGetIntegerv (GL_VIEWPORT, viewport); /* (*mycout) << "viewport = " << viewport[0] << " " << viewport[1] << " " << viewport[2] << " " << viewport[3] << endl; */ glMatrixMode (GL_PROJECTION); glPushMatrix(); GLdouble projmat[16]; glGetDoublev (GL_PROJECTION_MATRIX, projmat); glLoadIdentity(); gluPickMatrix (px, viewport[3] - py, 1, 1, viewport); glMultMatrixd (projmat); glClearColor(backcolor, backcolor, backcolor, 1.0); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glMatrixMode (GL_MODELVIEW); glPushMatrix(); glMultMatrixf (transformationmat); glInitNames(); glPushName (1); glEnable (GL_POLYGON_OFFSET_FILL); for (j = 1; j <= stlgeometry -> GetNT(); j++) { if (stldoctor.showvicinity && !stlgeometry->Vicinity(j)) {continue;} const STLTriangle& st = stlgeometry -> GetTriangle(j); //const STLReadTriangle& tria = stlgeometry -> GetReadTriangle(j); //glNormal3f (tria.normal.X(), tria.normal.Y(), tria.normal.Z()); if (stldoctor.selectmode == 0) { glLoadName (j); glBegin (GL_TRIANGLES); for (k = 0; k < 3; k++) { Point3d p = stlgeometry->GetPoint(st[k]); glVertex3f (p.X(), p.Y(), p.Z()); } glEnd (); } else if (stldoctor.selectmode == 1 || stldoctor.selectmode == 3 || stldoctor.selectmode == 4) { Point3d pm = Center(stlgeometry->GetPoint(st[0]), stlgeometry->GetPoint(st[1]), stlgeometry->GetPoint(st[2])); for (k = 0; k < 3; k++) { glLoadName (j*3+k-2); glBegin (GL_TRIANGLES); Point3d p1 = stlgeometry->GetPoint(st[k]); Point3d p2 = stlgeometry->GetPoint(st[(k+1)%3]); glVertex3f (p1.X(), p1.Y(), p1.Z()); glVertex3f (p2.X(), p2.Y(), p2.Z()); glVertex3f (pm.X(), pm.Y(), pm.Z()); glEnd (); } } else { Point3d pm1 = Center(stlgeometry->GetPoint(st[0]), stlgeometry->GetPoint(st[1])); Point3d pm2 = Center(stlgeometry->GetPoint(st[1]), stlgeometry->GetPoint(st[2])); Point3d pm3 = Center(stlgeometry->GetPoint(st[2]), stlgeometry->GetPoint(st[0])); Point3d p1 = stlgeometry->GetPoint(st[0]); Point3d p2 = stlgeometry->GetPoint(st[1]); Point3d p3 = stlgeometry->GetPoint(st[2]); glLoadName (j*4-3); glBegin (GL_TRIANGLES); glVertex3f (p1.X(), p1.Y(), p1.Z()); glVertex3f (pm1.X(), pm1.Y(), pm1.Z()); glVertex3f (pm3.X(), pm3.Y(), pm3.Z()); glEnd (); glLoadName (j*4-2); glBegin (GL_TRIANGLES); glVertex3f (p2.X(), p2.Y(), p2.Z()); glVertex3f (pm2.X(), pm2.Y(), pm2.Z()); glVertex3f (pm1.X(), pm1.Y(), pm1.Z()); glEnd (); glLoadName (j*4-1); glBegin (GL_TRIANGLES); glVertex3f (p3.X(), p3.Y(), p3.Z()); glVertex3f (pm3.X(), pm3.Y(), pm3.Z()); glVertex3f (pm2.X(), pm2.Y(), pm2.Z()); glEnd (); glLoadName (j*4); glBegin (GL_TRIANGLES); glVertex3f (pm1.X(), pm1.Y(), pm1.Z()); glVertex3f (pm2.X(), pm2.Y(), pm2.Z()); glVertex3f (pm3.X(), pm3.Y(), pm3.Z()); glEnd (); } } glPopName(); glMatrixMode (GL_PROJECTION); glPopMatrix(); glMatrixMode (GL_MODELVIEW); glPopMatrix(); glFlush(); hits = glRenderMode (GL_RENDER); // (*mycout) << "hits = " << hits << endl; //int minrec = -1; int minname = 0; GLuint mindepth = 0; for (i = 0; i < hits; i++) { int curname = selbuf[4*i+3]; GLuint curdepth = selbuf[4*i+1]; /* (*mycout) << selbuf[4*i] << " " << selbuf[4*i+1] << " " << selbuf[4*i+2] << " " << selbuf[4*i+3] << endl; */ if (curname && (curdepth < mindepth || !minname)) { //minrec = i; mindepth = curdepth; minname = curname; } } if (!minname) {return;} if (stldoctor.selectmode == 0) { int oldtrig = selecttrig; selecttrig = minname; if (selecttrig == oldtrig) nodeofseltrig = (nodeofseltrig % 3) + 1; else nodeofseltrig = 1; stlgeometry->SetSelectTrig(selecttrig); stlgeometry->SetNodeOfSelTrig(nodeofseltrig); stlgeometry->PrintSelectInfo(); } else if (stldoctor.selectmode == 1 || stldoctor.selectmode == 3 || stldoctor.selectmode == 4) { selecttrig = (minname-1) / 3 + 1; nodeofseltrig = minname-selecttrig*3+3; stlgeometry->SetSelectTrig(selecttrig); stlgeometry->SetNodeOfSelTrig(nodeofseltrig); stlgeometry->PrintSelectInfo(); if (stldoctor.selectmode == 1) { stlgeometry->BuildSelectedEdge(twoint(stlgeometry->GetTriangle(selecttrig).PNumMod(nodeofseltrig), stlgeometry->GetTriangle(selecttrig).PNumMod(nodeofseltrig+1))); } if (stldoctor.selectmode == 3) { stlgeometry->BuildSelectedMultiEdge(twoint(stlgeometry->GetTriangle(selecttrig).PNumMod(nodeofseltrig), stlgeometry->GetTriangle(selecttrig).PNumMod(nodeofseltrig+1))); } else if (stldoctor.selectmode == 4) { stlgeometry->BuildSelectedCluster(twoint(stlgeometry->GetTriangle(selecttrig).PNumMod(nodeofseltrig), stlgeometry->GetTriangle(selecttrig).PNumMod(nodeofseltrig+1))); } switch (stldoctor.edgeselectmode) { case 1: stlgeometry->STLDoctorUndefinedEdge(); break; case 2: stlgeometry->STLDoctorConfirmEdge(); break; case 3: stlgeometry->STLDoctorCandidateEdge(); break; case 4: stlgeometry->STLDoctorExcludeEdge(); break; default: break; } } else if (stldoctor.selectmode == 2) { selecttrig = (minname-1) / 4 + 1; nodeofseltrig = minname-selecttrig*4+4; if (nodeofseltrig == 4) {nodeofseltrig = 1;} stlgeometry->SetSelectTrig(selecttrig); stlgeometry->SetNodeOfSelTrig(nodeofseltrig); stlgeometry->PrintSelectInfo(); } if (stldoctor.showtouchedtrigchart && stlgeometry->AtlasMade() && stlgeometry->GetSelectTrig()) { vispar.stlchartnumber = stlgeometry->GetChartNr(stlgeometry->GetSelectTrig()); vispar.stlchartnumberoffset = 0; } } VisualSceneSTLMeshing vsstlmeshing; #endif } netgen-6.2.1804/libsrc/visualization/visualpkg.cpp0000644000175000017500000004021013272137567020672 0ustar kurtkurt#include // #include #include #include #include #include #include // #include #include #include namespace netgen { /* */ int Ng_Vis_Set (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { auto & vssolution = netgen::GetVSSolution(); if (argc >= 2) { if (strcmp (argv[1], "parameters") == 0) { vssolution.imag_part = atoi (Tcl_GetVar (interp, "::visoptions.imaginary", TCL_GLOBAL_ONLY)); vssolution.usetexture = atoi (Tcl_GetVar (interp, "::visoptions.usetexture", TCL_GLOBAL_ONLY)); if (atoi (Tcl_GetVar (interp, "::visoptions.redrawperiodic", TCL_GLOBAL_ONLY))) vssolution.usetexture = 2; vssolution.invcolor = atoi (Tcl_GetVar (interp, "::visoptions.invcolor", TCL_GLOBAL_ONLY)); vssolution.clipsolution = 0; if (strcmp (Tcl_GetVar (interp, "::visoptions.clipsolution", TCL_GLOBAL_ONLY), "scal") == 0) vssolution.clipsolution = 1; if (strcmp (Tcl_GetVar (interp, "::visoptions.clipsolution", TCL_GLOBAL_ONLY), "vec") == 0) vssolution.clipsolution = 2; tcl_const char * scalname = Tcl_GetVar (interp, "::visoptions.scalfunction", TCL_GLOBAL_ONLY); tcl_const char * vecname = Tcl_GetVar (interp, "::visoptions.vecfunction", TCL_GLOBAL_ONLY); tcl_const char * fieldlines_vecname = Tcl_GetVar (interp, "::visoptions.fieldlinesvecfunction", TCL_GLOBAL_ONLY); vssolution.scalfunction = -1; vssolution.vecfunction = -1; vssolution.fieldlines_vecfunction = -1; int pointpos; // SZ const char * pch = strchr(scalname,':'); pointpos = int(pch-scalname+1); for (int i = 0; i < vssolution.soldata.Size(); i++) { if ( (strlen (vssolution.soldata[i]->name.c_str()) == size_t(pointpos-1)) && (strncmp (vssolution.soldata[i]->name.c_str(), scalname, pointpos-1) == 0) ) { vssolution.scalfunction = i; vssolution.scalcomp = atoi (scalname + pointpos); if ( vssolution.scalcomp > vssolution.soldata[i]->components ) vssolution.scalcomp = 1; char newscalname[100]; for ( int ii = 0; ii < pointpos; ii++ ) newscalname[ii] = scalname[ii]; newscalname[pointpos] = ':'; sprintf (newscalname+pointpos, "%i", vssolution.scalcomp); if (strcmp (scalname, newscalname) != 0) Tcl_SetVar ( interp, "::visoptions.scalfunction", newscalname, TCL_GLOBAL_ONLY ); scalname = Tcl_GetVar (interp, "::visoptions.scalfunction", TCL_GLOBAL_ONLY); } if (strcmp (vssolution.soldata[i]->name.c_str(), vecname) == 0) vssolution.vecfunction = i; if (strcmp (vssolution.soldata[i]->name.c_str(), fieldlines_vecname) == 0) vssolution.fieldlines_vecfunction = i; } if(vssolution.fieldlines_vecfunction != -1 && vssolution.vecfunction == -1) { //cout << "WARNING: Setting vector function in Visualization toolbox to value from Fieldlines toolbox!" << endl; vssolution.vecfunction = vssolution.fieldlines_vecfunction; } // reset visoptions.scalfunction and visoptions.vecfunction if not avialable if ( vssolution.scalfunction == -1 && strcmp (scalname, "none") != 0) Tcl_SetVar ( interp, "::visoptions.scalfunction", "none", TCL_GLOBAL_ONLY ); if ( vssolution.vecfunction == -1 && strcmp (vecname, "none") != 0) Tcl_SetVar ( interp, "::visoptions.vecfunction", "none", TCL_GLOBAL_ONLY ); tcl_const char * evalname = Tcl_GetVar (interp, "::visoptions.evaluate", TCL_GLOBAL_ONLY); if (strcmp(evalname, "abs") == 0) vssolution.evalfunc = VisualSceneSolution::FUNC_ABS; if (strcmp(evalname, "abstens") == 0) vssolution.evalfunc = VisualSceneSolution::FUNC_ABS_TENSOR; if (strcmp(evalname, "mises") == 0) vssolution.evalfunc = VisualSceneSolution::FUNC_MISES; if (strcmp(evalname, "main") == 0) vssolution.evalfunc = VisualSceneSolution::FUNC_MAIN; vssolution.gridsize = atoi (Tcl_GetVar (interp, "::visoptions.gridsize", TCL_GLOBAL_ONLY)); vssolution.xoffset = atof (Tcl_GetVar (interp, "::visoptions.xoffset", TCL_GLOBAL_ONLY)); // cout << "x-offset:" << vssolution.xoffset << endl; vssolution.yoffset = atof (Tcl_GetVar (interp, "::visoptions.yoffset", TCL_GLOBAL_ONLY)); vssolution.autoscale = atoi (Tcl_GetVar (interp, "::visoptions.autoscale", TCL_GLOBAL_ONLY)); /* vssolution.linear_colors = atoi (Tcl_GetVar (interp, "::visoptions.lineartexture", TCL_GLOBAL_ONLY)); */ vssolution.logscale = atoi (Tcl_GetVar (interp, "::visoptions.logscale", TCL_GLOBAL_ONLY)); vssolution.mminval = atof (Tcl_GetVar (interp, "::visoptions.mminval", TCL_GLOBAL_ONLY)); vssolution.mmaxval = atof (Tcl_GetVar (interp, "::visoptions.mmaxval", TCL_GLOBAL_ONLY)); vssolution.showclipsolution = atoi (Tcl_GetVar (interp, "::visoptions.showclipsolution", TCL_GLOBAL_ONLY)); vssolution.showsurfacesolution = atoi (Tcl_GetVar (interp, "::visoptions.showsurfacesolution", TCL_GLOBAL_ONLY)); vssolution.lineartexture = atoi (Tcl_GetVar (interp, "::visoptions.lineartexture", TCL_GLOBAL_ONLY)); vssolution.numtexturecols = atoi (Tcl_GetVar (interp, "::visoptions.numtexturecols", TCL_GLOBAL_ONLY)); vssolution.multidimcomponent = atoi (Tcl_GetVar (interp, "::visoptions.multidimcomponent", TCL_GLOBAL_ONLY)); vssolution.drawpointcurves = atoi (Tcl_GetVar (interp, "::visoptions.drawpointcurves", TCL_GLOBAL_ONLY)); vssolution.draw_fieldlines = atoi (Tcl_GetVar (interp, "::visoptions.drawfieldlines", TCL_GLOBAL_ONLY)); vssolution.num_fieldlines = atoi (Tcl_GetVar (interp, "::visoptions.numfieldlines", TCL_GLOBAL_ONLY)); vssolution.fieldlines_randomstart = atoi (Tcl_GetVar (interp, "::visoptions.fieldlinesrandomstart", TCL_GLOBAL_ONLY)); vssolution.fieldlines_reltolerance = atof (Tcl_GetVar (interp, "::visoptions.fieldlinestolerance", TCL_GLOBAL_ONLY)); if (strcmp (Tcl_GetVar (interp, "::visoptions.fieldlinesrktype", TCL_GLOBAL_ONLY), "euler") == 0) vssolution.fieldlines_rktype = 0; else if (strcmp (Tcl_GetVar (interp, "::visoptions.fieldlinesrktype", TCL_GLOBAL_ONLY), "eulercauchy") == 0) vssolution.fieldlines_rktype = 1; else if (strcmp (Tcl_GetVar (interp, "::visoptions.fieldlinesrktype", TCL_GLOBAL_ONLY), "simpson") == 0) vssolution.fieldlines_rktype = 2; else if (strcmp (Tcl_GetVar (interp, "::visoptions.fieldlinesrktype", TCL_GLOBAL_ONLY), "crungekutta") == 0) vssolution.fieldlines_rktype = 3; vssolution.fieldlines_rellength = atof (Tcl_GetVar (interp, "::visoptions.fieldlineslength", TCL_GLOBAL_ONLY)); vssolution.fieldlines_maxpoints = atoi (Tcl_GetVar (interp, "::visoptions.fieldlinesmaxpoints", TCL_GLOBAL_ONLY)); vssolution.fieldlines_relthickness = atof (Tcl_GetVar (interp, "::visoptions.fieldlinesthickness", TCL_GLOBAL_ONLY)); vssolution.fieldlines_fixedphase = (atoi (Tcl_GetVar (interp, "::visoptions.fieldlinesonlyonephase", TCL_GLOBAL_ONLY)) != 0); if(vssolution.fieldlines_fixedphase) vssolution.fieldlines_phase = atof (Tcl_GetVar (interp, "::visoptions.fieldlinesphase", TCL_GLOBAL_ONLY)); if (strcmp (Tcl_GetVar (interp, "::visoptions.fieldlinesstartarea", TCL_GLOBAL_ONLY), "box") == 0) vssolution.fieldlines_startarea = 0; else if (strcmp (Tcl_GetVar (interp, "::visoptions.fieldlinesstartarea", TCL_GLOBAL_ONLY), "file") == 0) vssolution.fieldlines_startarea = 1; else if (strcmp (Tcl_GetVar (interp, "::visoptions.fieldlinesstartarea", TCL_GLOBAL_ONLY), "face") == 0) vssolution.fieldlines_startarea = 2; if (vssolution.fieldlines_startarea == 0) { vssolution.fieldlines_startarea_parameter.SetSize(6); vssolution.fieldlines_startarea_parameter[0] = atof (Tcl_GetVar (interp, "::visoptions.fieldlinesstartareap1x", TCL_GLOBAL_ONLY)); vssolution.fieldlines_startarea_parameter[1] = atof (Tcl_GetVar (interp, "::visoptions.fieldlinesstartareap1y", TCL_GLOBAL_ONLY)); vssolution.fieldlines_startarea_parameter[2] = atof (Tcl_GetVar (interp, "::visoptions.fieldlinesstartareap1z", TCL_GLOBAL_ONLY)); vssolution.fieldlines_startarea_parameter[3] = atof (Tcl_GetVar (interp, "::visoptions.fieldlinesstartareap2x", TCL_GLOBAL_ONLY)); vssolution.fieldlines_startarea_parameter[4] = atof (Tcl_GetVar (interp, "::visoptions.fieldlinesstartareap2y", TCL_GLOBAL_ONLY)); vssolution.fieldlines_startarea_parameter[5] = atof (Tcl_GetVar (interp, "::visoptions.fieldlinesstartareap2z", TCL_GLOBAL_ONLY)); } else if (vssolution.fieldlines_startarea == 1) { vssolution.fieldlines_filename = Tcl_GetVar (interp, "::visoptions.fieldlinesfilename", TCL_GLOBAL_ONLY); } else if (vssolution.fieldlines_startarea == 2) { vssolution.fieldlines_startface = atoi (Tcl_GetVar (interp, "::visoptions.fieldlinesstartface", TCL_GLOBAL_ONLY)); } vssolution.deform = atoi (Tcl_GetVar (interp, "::visoptions.deformation", TCL_GLOBAL_ONLY)); vssolution.scaledeform = atof (Tcl_GetVar (interp, "::visoptions.scaledeform1", TCL_GLOBAL_ONLY)) * atof (Tcl_GetVar (interp, "::visoptions.scaledeform2", TCL_GLOBAL_ONLY)); if (atoi (Tcl_GetVar (interp, "::visoptions.isolines", TCL_GLOBAL_ONLY))) vssolution.numisolines = atoi (Tcl_GetVar (interp, "::visoptions.numiso", TCL_GLOBAL_ONLY)); else vssolution.numisolines = 0; vssolution.draw_isosurface = atoi (Tcl_GetVar (interp, "::visoptions.isosurf", TCL_GLOBAL_ONLY)); vssolution.SetSubdivision(atoi (Tcl_GetVar (interp, "::visoptions.subdivisions", TCL_GLOBAL_ONLY))); vssolution.UpdateSolutionTimeStamp(); } if (strcmp (argv[1], "parametersrange") == 0) { vssolution.invcolor = atoi (Tcl_GetVar (interp, "::visoptions.invcolor", TCL_GLOBAL_ONLY)); vssolution.mminval = atof (Tcl_GetVar (interp, "::visoptions.mminval", TCL_GLOBAL_ONLY)); vssolution.mmaxval = atof (Tcl_GetVar (interp, "::visoptions.mmaxval", TCL_GLOBAL_ONLY)); vssolution.lineartexture = atoi (Tcl_GetVar (interp, "::visoptions.lineartexture", TCL_GLOBAL_ONLY)); vssolution.numtexturecols = atoi (Tcl_GetVar (interp, "::visoptions.numtexturecols", TCL_GLOBAL_ONLY)); if (vssolution.usetexture == 0 || vssolution.logscale) vssolution.UpdateSolutionTimeStamp(); } if (argc >= 3 && strcmp (argv[1], "time") == 0) { vssolution.time = double (atoi (argv[2])) / 1000; vssolution.timetimestamp = NextTimeStamp(); cout << "\rtime = " << vssolution.time << " " << flush; } } vsmesh.SetClippingPlane (); // for computing parameters vssolution.SetClippingPlane (); // for computing parameters glDisable(GL_CLIP_PLANE0); #ifdef PARALLELGL vsmesh.Broadcast (); #endif return TCL_OK; } int Ng_Vis_Field (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { int i; char buf[1000]; buf[0] = 0; auto & vssolution = netgen::GetVSSolution(); if (argc >= 2) { if (strcmp (argv[1], "setfield") == 0) { if (argc < 3) return TCL_ERROR; for (i = 0; i < vssolution.GetNSolData(); i++) if (strcmp (vssolution.GetSolData(i)->name.c_str(), argv[2]) == 0) { cout << "found soldata " << i << endl; } } if (strcmp (argv[1], "getnfieldnames") == 0) { sprintf (buf, "%d", vssolution.GetNSolData()); } if (strcmp (argv[1], "getfieldname") == 0) { sprintf (buf, "%s", vssolution.GetSolData(atoi(argv[2])-1)->name.c_str()); } if (strcmp (argv[1], "iscomplex") == 0) { sprintf (buf, "%d", vssolution.GetSolData(atoi(argv[2])-1)->iscomplex); } if (strcmp (argv[1], "getfieldcomponents") == 0) { sprintf (buf, "%d", vssolution.GetSolData(atoi(argv[2])-1)->components); } if (strcmp (argv[1], "getfieldnames") == 0) { for (i = 0; i < vssolution.GetNSolData(); i++) { strcat (buf, vssolution.GetSolData(i)->name.c_str()); strcat (buf, " "); } strcat (buf, "var1 var2 var3"); Tcl_SetResult (interp, buf, TCL_STATIC); } if (strcmp (argv[1], "setcomponent") == 0) { cout << "set component " << argv[2] << endl; } if (strcmp (argv[1], "getactivefield") == 0) { sprintf (buf, "1"); } if (strcmp (argv[1], "getdimension") == 0) { auto mesh = vssolution.GetMesh(); sprintf (buf, "%d", mesh->GetDimension()); } } Tcl_SetResult (interp, buf, TCL_STATIC); return TCL_OK; } VisualSceneMeshDoctor vsmeshdoc; DLL_HEADER extern shared_ptr mesh; int Ng_MeshDoctor(ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { cout << "Mesh Doctor:" << endl; int i; for (i = 0; i < argc; i++) cout << argv[i] << " "; cout << endl; meshdoctor.active = atoi(Tcl_GetVar(interp, "::meshdoctor.active", 0)); if (argc >= 2) { if (strcmp(argv[1], "markedgedist") == 0) { vsmeshdoc.SetMarkEdgeDist(atoi(argv[2])); } if (strcmp(argv[1], "deletemarkedsegments") == 0) { for (i = 1; i <= mesh->GetNSeg(); i++) if (vsmeshdoc.IsSegmentMarked(i)) mesh->DeleteSegment(i); // for (i = 1; i <= mesh->GetNSE(); i++) // mesh->SurfaceElement(i).SetIndex (1); mesh->Compress(); } } vsmeshdoc.UpdateTables(); vsmeshdoc.BuildScene(); return TCL_OK; } extern "C" int Ng_Vis_Init (Tcl_Interp * interp); int Ng_Vis_Init (Tcl_Interp * interp) { Tcl_CreateCommand (interp, "Ng_Vis_Set", Ng_Vis_Set, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_Vis_Field", Ng_Vis_Field, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); return TCL_OK; } } netgen-6.2.1804/libsrc/visualization/vispar.hpp0000644000175000017500000000412013272137567020176 0ustar kurtkurt#ifndef FILE_VISPAR #define FILE_VISPAR namespace netgen { class VisualizationParameters { public: double lightamb; double lightdiff; double lightspec; double shininess; double transp; int locviewer; char selectvisual[20]; int showstltrias; /* Vec3d clipnormal; double clipdist; int clipenable; int clipplanetimestamp; */ class Clipping { public: Vec3d normal; double dist; double dist2; int enable; int timestamp; bool operator== (Clipping & clip2) { return (normal == clip2.normal) && (dist == clip2.dist) && // (dist2 == clip2.dist2) && (enable == clip2.enable); } }; Clipping clipping; int colormeshsize; int drawfilledtrigs; int drawbadels; int drawoutline; int drawedges; int subdivisions; int drawprisms; int drawpyramids; int drawhexes; double shrink; int drawidentified; int drawpointnumbers; int drawedgenumbers; int drawfacenumbers; int drawelementnumbers; int drawdomainsurf; int drawtets; int drawtetsdomain; int clipdomain; int donotclipdomain; int drawededges; int drawedpoints; int drawedpointnrs; int drawedtangents; int drawededgenrs; int drawmetispartition; int drawcurveproj; int drawcurveprojedge; PointIndex centerpoint; int drawelement; // stl: int stlshowtrias; int stlshowfilledtrias; int stlshowedges; int stlshowmarktrias; int stlshowactivechart; int stlchartnumber; int stlchartnumberoffset; // occ: int occshowvolumenr; bool occshowsurfaces; bool occshowedges; bool occvisproblemfaces; bool occzoomtohighlightedentity; double occdeflection; // ACIS bool ACISshowfaces; bool ACISshowedges; int ACISshowsolidnr; int ACISshowsolidnr2; bool whitebackground; int stereo; bool usedispllists; bool drawcoordinatecross; bool drawcolorbar; bool drawnetgenlogo; bool use_center_coords; double centerx,centery,centerz; bool drawspecpoint; double specpointx,specpointy,specpointz; public: VisualizationParameters(); }; DLL_HEADER extern VisualizationParameters vispar; } #endif netgen-6.2.1804/libsrc/visualization/mvdraw.cpp0000644000175000017500000004632313272137567020200 0ustar kurtkurt#include #include #include #include // #include #ifndef WIN32 #define GLX_GLXEXT_LEGACY #include #include #include /* for XA_RGB_DEFAULT_MAP atom */ // #include // for parallel GL ??? #endif namespace netgen { DLL_HEADER Point3d VisualScene :: center; DLL_HEADER double VisualScene :: rad; DLL_HEADER GLdouble VisualScene :: backcolor; /* #if TOGL_MAJOR_VERSION!=2 GLuint VisualScene :: fontbase = 0; #else Tcl_Obj * VisualScene :: fontbase = NULL; Togl * VisualScene :: globtogl; #endif */ void (*opengl_text_function)(const char * text) = NULL; void Set_OpenGLText_Callback ( void (*fun) (const char * text) ) { opengl_text_function = fun; } void MyOpenGLText (const char * text) { if (opengl_text_function) (*opengl_text_function) (text); // cout << "MyOpenGLText: " << text << endl; } // texture for color decoding // GLubyte * VisualScene :: colortexture = NULL; GLuint VisualScene :: coltexname = 1; int VisualScene :: ntexcols = -1; double VisualScene :: lookatmat[16]; double VisualScene :: transmat[16]; double VisualScene :: rotmat[16]; double VisualScene :: centermat[16]; double VisualScene :: transformationmat[16]; int VisualScene :: selface; int VisualScene :: selelement; PointIndex VisualScene :: selpoint; PointIndex VisualScene :: selpoint2; int VisualScene :: locpi; int VisualScene :: seledge; int VisualScene :: selecttimestamp; int VisualScene :: viewport[4]; VisualizationParameters :: VisualizationParameters() { lightamb = 0.3; lightdiff = 0.7; lightspec = 1; shininess = 50; transp = 0.3; locviewer = 0; showstltrias = 0; centerpoint = 0; usedispllists = 1; strcpy (selectvisual, "cross"); use_center_coords = false; }; VisualizationParameters vispar; double dist = 0; // double dist = 6; // vorher: pnear = 2; // double pnear = 0.1; // double pfar = 10; VisualScene :: VisualScene () { changeval = -1; backcolor = 0; } VisualScene :: ~VisualScene() { ; } extern DLL_HEADER void Render(bool blocking); DLL_HEADER void Render (bool blocking) { if (blocking && multithread.running) { multithread.redraw = 2; while (multithread.redraw == 2) ; } else multithread.redraw = 1; } void VisualScene :: BuildScene (int zoomall) { center = Point3d (0,0,0); rad = 1; CalcTransformationMatrices(); glEnable(GL_DEPTH_TEST); glDisable (GL_DITHER); GLfloat ambvals[] = { 0.4f, 0.4f, 0.4f, 1.0f }; GLfloat diffvals[] = { 0.5f, 0.5f, 0.5f, 1.0f }; GLfloat specvals[] = { 0.7f, 0.7f, 0.7f, 1.0f }; glLightfv(GL_LIGHT0, GL_AMBIENT, ambvals); glLightfv(GL_LIGHT0, GL_DIFFUSE, diffvals); glLightfv(GL_LIGHT0, GL_SPECULAR, specvals); GLfloat light_position[] = { 1, 3, 3, 0 }; glLightfv(GL_LIGHT0, GL_POSITION, light_position); glLightModeli (GL_LIGHT_MODEL_TWO_SIDE, 0); glEnable(GL_LIGHTING); glEnable(GL_LIGHT0); } void VisualScene :: DrawScene () { if (changeval == -1) BuildScene(); changeval = 0; glClearColor(backcolor, backcolor, backcolor, 1.0); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glEnable (GL_COLOR_MATERIAL); glColor3f (1.0f, 1.0f, 1.0f); glLineWidth (1.0f); DrawCoordinateCross (); DrawNetgenLogo (); glFinish(); } void VisualScene :: CalcTransformationMatrices() { // prepare model view matrix glPushMatrix(); glLoadIdentity(); gluLookAt (0, 0, 6, 0, 0, 0, 0, 1, 0); glGetDoublev (GL_MODELVIEW_MATRIX, lookatmat); glLoadIdentity(); glTranslatef(0.0f, 0.0f, -dist); glGetDoublev (GL_MODELVIEW_MATRIX, transmat); glLoadIdentity(); glGetDoublev (GL_MODELVIEW_MATRIX, rotmat); glScaled (1/rad, 1/rad, 1/rad); glTranslated (-center.X(), -center.Y(), -center.Z()); glGetDoublev (GL_MODELVIEW_MATRIX, centermat); glLoadIdentity(); glMultMatrixd (lookatmat); glMultMatrixd (transmat); glMultMatrixd (rotmat); glMultMatrixd (centermat); glGetDoublev (GL_MODELVIEW_MATRIX, transformationmat); glPopMatrix(); } void VisualScene :: ArbitraryRotation (const Array & alpha, const Array & vec) { glPushMatrix(); glLoadIdentity(); for(int i=0; i a(1); a[0] = alpha; Array v(1); v[0] = vec; ArbitraryRotation(a,v); } void VisualScene :: StandardRotation (const char * dir) { glPushMatrix(); glLoadIdentity(); if (strcmp (dir, "xy") == 0) ; else if (strcmp (dir, "yx") == 0) glRotatef(180.0, 1.0f, 1.0f, 0.0f); else if (strcmp (dir, "xz") == 0) glRotatef(-90.0, 1.0f, 0.0f, 0.0f); else if (strcmp (dir, "zx") == 0) { glRotatef(180.0, 1.0f, 1.0f, 0.0f); glRotatef(-90.0, 1.0f, 0.0f, 0.0f); } else if (strcmp (dir, "yz") == 0) { glRotatef(-90.0, 0.0f, 0.0f, 1.0f); glRotatef(-90.0, 0.0f, 1.0f, 0.0f); } else if (strcmp (dir, "zy") == 0) glRotatef(90.0, 0.0f, 1.0f, 0.0f); glGetDoublev (GL_MODELVIEW_MATRIX, rotmat); glLoadIdentity(); glMultMatrixd (lookatmat); glMultMatrixd (transmat); glMultMatrixd (rotmat); glMultMatrixd (centermat); glGetDoublev (GL_MODELVIEW_MATRIX, transformationmat); glPopMatrix(); } void VisualScene :: MouseMove(int oldx, int oldy, int newx, int newy, char mode) { int deltax = newx - oldx; int deltay = newy - oldy; glPushMatrix(); glLoadIdentity (); switch (mode) { case 'r': { glRotatef(float(deltax)/2, 0.0f, 1.0f, 0.0f); glRotatef(float(deltay)/2, 1.0f, 0.0f, 0.0f); glMultMatrixd (rotmat); glGetDoublev (GL_MODELVIEW_MATRIX, rotmat); break; } case 'm': { GLdouble projmat[16], modelviewmat[16]; GLint viewport[4]; glGetDoublev (GL_PROJECTION_MATRIX, projmat); glGetDoublev (GL_MODELVIEW_MATRIX, modelviewmat); glGetIntegerv (GL_VIEWPORT, viewport); // vorher pvz1/2 = 0 GLdouble pvx1 = 0, pvy1 = 0, pvz1 = 0.99; // 0.95; GLdouble pvx2 = deltax, pvy2 = -deltay, pvz2 = 0.99; // 0.95; GLdouble px1, py1, pz1; GLdouble px2, py2, pz2; gluUnProject (pvx1, pvy1, pvz1, modelviewmat, projmat, viewport, &px1, &py1, &pz1); gluUnProject (pvx2, pvy2, pvz2, modelviewmat, projmat, viewport, &px2, &py2, &pz2); /* gluUnProject (oldx, oldy, 1, modelviewmat, projmat, viewport, &px1, &py1, &pz1); gluUnProject (newx, newy, 1, modelviewmat, projmat, viewport, &px2, &py2, &pz2); */ /* cout << "pv1 = " << pvx1 << ", " << pvy1 << ", " << pvz1 << endl; cout << "p1 = " << px1 << ", " << py1 << ", " << pz1 << endl; */ glTranslated (px2-px1, py2-py1, pz2-pz1); glMultMatrixd (transmat); glGetDoublev (GL_MODELVIEW_MATRIX, transmat); break; } case 'z': { // glTranslatef(0.0f, 0.0f, -dist); // cout << "deltay = " << deltay << endl; // cout << "float_bug = " << (float(deltay)/100) << endl; gives wrong result with icc 9.0.021 glScaled (exp (double (-deltay)/100), exp (double (-deltay)/100), exp (double (-deltay)/100)); // glTranslatef(0.0f, 0.0f, dist); glMultMatrixd (transmat); glGetDoublev (GL_MODELVIEW_MATRIX, transmat); break; } } glLoadIdentity(); glMultMatrixd (lookatmat); glMultMatrixd (transmat); glMultMatrixd (rotmat); glMultMatrixd (centermat); glGetDoublev (GL_MODELVIEW_MATRIX, transformationmat); glPopMatrix(); } void VisualScene :: LookAt (const Point<3> & cam, const Point<3> & obj, const Point<3> & camup) { glPushMatrix(); glLoadIdentity (); gluLookAt (cam(0), cam(1), cam(2), obj(0), obj(1), obj(2), camup(0), camup(1), camup(2)); glMultMatrixd (centermat); glGetDoublev (GL_MODELVIEW_MATRIX, transformationmat); glPopMatrix(); } void VisualScene :: SetClippingPlane () { if (vispar.clipping.enable) { Vec3d n = vispar.clipping.normal; n /= (n.Length()+1e-10); clipplane[0] = n.X(); clipplane[1] = n.Y(); clipplane[2] = n.Z(); clipplane[3] = -(Vec3d(center) * n) + rad * vispar.clipping.dist; double clipplane2[4]; clipplane2[0] = n.X(); clipplane2[1] = n.Y(); clipplane2[2] = n.Z(); clipplane2[3] = -(Vec3d(center) * n) + rad * (vispar.clipping.dist + vispar.clipping.dist2); glClipPlane(GL_CLIP_PLANE0, clipplane2); glEnable(GL_CLIP_PLANE0); } else glDisable (GL_CLIP_PLANE0); } void VisualScene :: MouseDblClick (int /* px */, int /* py */) { ; } void VisualScene :: SetLight() { GLfloat vals[3]; double lightamb = vispar.lightamb; vals[0] = vals[1] = vals[2] = lightamb; glLightfv(GL_LIGHT0, GL_AMBIENT, vals); double lightdiff = vispar.lightdiff; vals[0] = vals[1] = vals[2] = lightdiff; glLightfv(GL_LIGHT0, GL_DIFFUSE, vals); double lightspec = vispar.lightspec; vals[0] = vals[1] = vals[2] = lightspec; glLightfv(GL_LIGHT0, GL_SPECULAR, vals); glMaterialf (GL_FRONT_AND_BACK, GL_SHININESS, vispar.shininess); glLightModeli (GL_LIGHT_MODEL_LOCAL_VIEWER, vispar.locviewer); float mat_spec_col[] = { 1, 1, 1, 1 }; glMaterialfv (GL_FRONT_AND_BACK, GL_SPECULAR, mat_spec_col); glEnable (GL_LIGHTING); glEnable (GL_LIGHT0); } void VisualScene :: SetOpenGlColor(double val, double valmin, double valmax, int logscale) { double value; if (!logscale) value = (val - valmin) / (valmax - valmin); else { if (valmax <= 0) valmax = 1; if (valmin <= 0) valmin = 1e-4 * valmax; value = (log(fabs(val)) - log(valmin)) / (log(valmax) - log(valmin)); } if (!invcolor) value = 1 - value; glTexCoord1f ( 0.998 * value + 0.001); // glTexCoord1f ( val ); glTexCoord2f ( 0.998 * value + 0.001, 1.5); // glTexCoord1f ( value ); if (value > 1) value = 1; if (value < 0) value = 0; value *= 4; static const double colp[][3] = { { 1, 0, 0 }, { 1, 1, 0 }, { 0, 1, 0 }, { 0, 1, 1 }, { 0, 0, 1 }, // { 1, 0, 1 }, // { 1, 0, 0 }, }; int i = int(value); double r = value - i; GLdouble col[3]; for (int j = 0; j < 3; j++) col[j] = (1-r) * colp[i][j] + r * colp[i+1][j]; glColor3d (col[0], col[1], col[2]); } void VisualScene :: CreateTexture (int ncols, int linear, double alpha, int typ) { if (linear) ncols = 32; else ncols = 8; if (ntexcols != ncols) { ntexcols = ncols; GLubyte colortexture[4*32]; const double colp[][3] = { { 1, 0, 0 }, { 1, 1, 0 }, { 0, 1, 0 }, { 0, 1, 1 }, { 0, 0, 1 }, }; for (int i = 0; i < ncols; i++) { double value = 4.0 * i / (ncols-1); int iv = int(value); double r = value - iv; GLdouble col[3]; if(r > 1e-3) for (int j = 0; j < 3; j++) col[j] = (1.-r) * colp[iv][j] + r * colp[iv+1][j]; else for (int j = 0; j < 3; j++) col[j] = colp[iv][j]; colortexture[4*i] = GLubyte (255 * col[0]); colortexture[4*i+1] = GLubyte (255 * col[1]); colortexture[4*i+2] = GLubyte (255 * col[2]); colortexture[4*i+3] = GLubyte(255*alpha); } // glPixelStorei (GL_UNPACK_ALIGNMENT, 1); glTexImage1D (GL_TEXTURE_1D, 0, 4, ncols, 0, GL_RGBA, GL_UNSIGNED_BYTE, colortexture); glTexImage2D (GL_TEXTURE_2D, 0, 4, ncols, 1, 0, GL_RGBA, GL_UNSIGNED_BYTE, colortexture); glTexEnvi (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, typ); // DECAL or MODULATE GLfloat bcol[] = { 1, 1, 1, 1.0 }; glTexParameterfv (GL_TEXTURE_1D, GL_TEXTURE_BORDER_COLOR, bcol); glTexParameteri (GL_TEXTURE_1D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameterfv (GL_TEXTURE_2D, GL_TEXTURE_BORDER_COLOR, bcol); glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); if (linear) { glTexParameteri (GL_TEXTURE_1D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri (GL_TEXTURE_1D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); } else { glTexParameteri (GL_TEXTURE_1D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri (GL_TEXTURE_1D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); } } } void VisualScene :: DrawColorBar (double minval, double maxval, int logscale, bool linear) { if (!vispar.drawcolorbar) return; CreateTexture (8, linear, 1, GL_DECAL); if (logscale && maxval <= 0) maxval = 1; if (logscale && minval <= 0) minval = 1e-4 * maxval; double minx = -1; double maxx = 1; double miny = 0.75; double maxy = 0.8; glDisable (GL_LIGHTING); glEnable (GL_COLOR_MATERIAL); glEnable (GL_TEXTURE_1D); glNormal3d (0, 0, 1); glPolygonMode (GL_FRONT_AND_BACK, GL_FILL); glDisable (GL_DEPTH_TEST); glBegin (GL_QUAD_STRIP); for (double x = minx; x <= maxx; x += (maxx - minx) / 50) { SetOpenGlColor (x, minx, maxx); glVertex3d (x, miny, -5); glVertex3d (x, maxy, -5); } glEnd(); glDisable (GL_TEXTURE_1D); glEnable (GL_COLOR_MATERIAL); GLfloat textcol[3] = { GLfloat(1 - backcolor), GLfloat(1 - backcolor), GLfloat(1 - backcolor) }; glColor3fv (textcol); glPushAttrib (GL_LIST_BIT); // glListBase (fontbase); char buf[20]; for (int i = 0; i <= 4; i++) { double x = minx + i * (maxx-minx) / 4; glRasterPos3d (x, 0.7,-5); double val; if (logscale) val = minval * pow (maxval / minval, i / 4.0); else val = minval + i * (maxval-minval) / 4; sprintf (buf, "%8.3e", val); // glCallLists (GLsizei(strlen (buf)), GL_UNSIGNED_BYTE, buf); MyOpenGLText (buf); } glPopAttrib (); glEnable (GL_DEPTH_TEST); } void VisualScene :: DrawCoordinateCross () { if (!vispar.drawcoordinatecross) return; glDisable (GL_DEPTH_TEST); glMatrixMode (GL_PROJECTION); glPushMatrix(); glLoadIdentity(); glMatrixMode (GL_MODELVIEW); glPushMatrix(); glLoadIdentity(); GLint viewport[4]; glGetIntegerv (GL_VIEWPORT, viewport); glTranslatef (-1, -1, 0.0); glScalef (40.0 / viewport[2], 40.0 / viewport[3], 1); glTranslatef (2.0, 2.0, 0.0); glMultMatrixd (rotmat); glEnable (GL_COLOR_MATERIAL); glDisable (GL_LIGHTING); glPolygonMode (GL_FRONT_AND_BACK, GL_LINE); GLfloat textcol[3] = { GLfloat(1 - backcolor), GLfloat(1 - backcolor), GLfloat(1 - backcolor) }; glColor3fv (textcol); glLineWidth (1.0f); double len = 1; glBegin(GL_LINES); glVertex3d (0, 0, 0); glVertex3d (len, 0, 0); glVertex3d (0.0f, 0.0f, 0.0f); glVertex3d (0.0f, len, 0.0f); glVertex3d (0.0f, 0.0f, 0.0f); glVertex3d (0.0f, 0.0f, len); glEnd (); glPushAttrib (GL_LIST_BIT); // glListBase (fontbase); char buf[20]; glRasterPos3d (len, 0.0f, 0.0f); sprintf (buf, "x"); // glCallLists (GLsizei(strlen (buf)), GL_UNSIGNED_BYTE, buf); MyOpenGLText (buf); glRasterPos3d (0.0f, len, 0.0f); sprintf (buf, "y"); // glCallLists (GLsizei(strlen (buf)), GL_UNSIGNED_BYTE, buf); MyOpenGLText (buf); glRasterPos3d (0.0f, 0.0f, len); sprintf (buf, "z"); // glCallLists (GLsizei(strlen (buf)), GL_UNSIGNED_BYTE, buf); MyOpenGLText (buf); glPopAttrib (); glEnable (GL_LIGHTING); glMatrixMode (GL_PROJECTION); glPopMatrix(); glMatrixMode (GL_MODELVIEW); glPopMatrix(); glEnable (GL_DEPTH_TEST); } void VisualScene :: DrawNetgenLogo () { if (!vispar.drawnetgenlogo) return; glDisable (GL_DEPTH_TEST); glMatrixMode (GL_PROJECTION); glPushMatrix(); glLoadIdentity(); glMatrixMode (GL_MODELVIEW); glPushMatrix(); glLoadIdentity(); GLint viewport[4]; glGetIntegerv (GL_VIEWPORT, viewport); glTranslatef (1, -1, 0.0); glScalef (40.0 / viewport[2], 40.0 / viewport[3], 1); glTranslatef (-7.0, 2.0, 0.0); glDisable (GL_CLIP_PLANE0); glDisable (GL_LIGHTING); glEnable (GL_COLOR_MATERIAL); GLfloat textcol[3] = { GLfloat(1 - backcolor), GLfloat(1 - backcolor), GLfloat(1 - backcolor) }; glColor3fv (textcol); glLineWidth (1.0f); glPushAttrib (GL_LIST_BIT); // glListBase (fontbase); char buf[] = "Netgen " PACKAGE_VERSION; glRasterPos3d (0.0f, 0.0f, 0.0f); // glCallLists (GLsizei(strlen (buf)), GL_UNSIGNED_BYTE, buf); MyOpenGLText (buf); glPopAttrib (); glEnable (GL_LIGHTING); glMatrixMode (GL_PROJECTION); glPopMatrix(); glMatrixMode (GL_MODELVIEW); glPopMatrix(); glEnable (GL_DEPTH_TEST); } #ifdef PARALLELGL void VisualScene :: InitParallelGL () { static int init = 0; if (!init) { init = 1; if (id == 0) { string displname; Display * dpy = glXGetCurrentDisplay(); GLXDrawable drawable = glXGetCurrentDrawable(); GLXContext ctx = glXGetCurrentContext(); GLXContextID xid = glXGetContextIDEXT (ctx); displname = XDisplayName (0); if( glXIsDirect ( dpy, ctx ) ) cout << "WARNING: direct rendering enabled; this might break mpi-parallel netgen (especially if X-forwarding is used! (to disable, change -indirect to true in ng/drawing.tcl)" << endl; /* cout << "Init Parallel GL" << endl; cout << "DisplayName = " << displname << endl; cout << "current display = " << dpy << endl; cout << "current drawable = " << drawable << endl; cout << "current context = " << ctx << endl; cout << "contextid = " << xid << endl; cout << "isdirect = " << glXIsDirect ( dpy, ctx ) << endl; cout << "extensionstring = " << glXQueryExtensionsString( dpy, 0 ) << endl; */ MyMPI_SendCmd ("redraw"); MyMPI_SendCmd ("init"); for (int dest = 1; dest < ntasks; dest++) { MyMPI_Send (displname, dest, MPI_TAG_VIS); MyMPI_Send (int (drawable), dest, MPI_TAG_VIS); MyMPI_Send (int (xid), dest, MPI_TAG_VIS); } } } } void VisualScene :: Broadcast () { if (ntasks == 1) return; if (id == 0) { /* for (int dest = 1; dest < ntasks; dest++) { MyMPI_Send ("redraw", dest, MPI_TAG_CMD); MyMPI_Send ("broadcast", dest, MPI_TAG_VIS); } */ MyMPI_SendCmd ("redraw"); MyMPI_SendCmd ("broadcast"); } MyMPI_Bcast (selface); netgen::GetVSSolution().Broadcast (); } #endif } netgen-6.2.1804/libsrc/visualization/importsolution.cpp0000644000175000017500000000601513272137567022001 0ustar kurtkurt// // Read solution file // #include #include #include #include #include #include namespace netgen { extern shared_ptr mesh; DLL_HEADER void ImportSolution2 (const char * filename) { ifstream inf (filename); char buf[100], name[1000]; int i, size, comps, order; bool iscomplex; const char * type; Flags flags; while (1) { buf[0] = 0; inf >> buf; if (strcmp (buf, "solution") == 0) { inf >> name; inf >> buf[0]; flags.DeleteFlags (); while (buf[0] == '-') { inf >> buf[1]; inf.putback (buf[1]); if (!isalpha (buf[1])) { break; } inf >> (buf+1); flags.SetCommandLineFlag (buf); buf[0] = 0; inf >> buf[0]; } inf.putback (buf[0]); (*testout) << "Flags: " << endl; flags.PrintFlags (*testout); (*testout) << "done" << endl; size = int(flags.GetNumFlag ("size", mesh->GetNP())); // Ng_GetNP())); comps = int(flags.GetNumFlag ("components", 1)); type = flags.GetStringFlag ("type", "nodal"); order = int(flags.GetNumFlag ("order", 1)); iscomplex = flags.GetDefineFlag ("complex"); double * sol = new double[size*comps]; (*testout) << "import solution " << name << " size = " << size << " comps = " << comps << " order = " << order << endl; for (i = 0; i < size*comps; i++) { inf >> sol[i]; // (*testout) << "sol: " << sol[i] << endl; } Ng_SolutionData soldata; Ng_InitSolutionData (&soldata); soldata.name = name; soldata.data = sol; soldata.dist = comps; soldata.components = comps; soldata.order = order; soldata.iscomplex = iscomplex; soldata.soltype = NG_SOLUTION_NODAL; soldata.draw_surface = 1; soldata.draw_volume = 1; if (strcmp (type, "element") == 0) { soldata.soltype = NG_SOLUTION_ELEMENT; soldata.draw_surface = 0; } if (strcmp (type, "surfaceelement") == 0) { soldata.soltype = NG_SOLUTION_SURFACE_ELEMENT; soldata.draw_volume = 0; } if (strcmp (type, "noncontinuous") == 0) soldata.soltype = NG_SOLUTION_NONCONTINUOUS; if (strcmp (type, "surfacenoncontinuous") == 0) soldata.soltype = NG_SOLUTION_SURFACE_NONCONTINUOUS; Ng_SetSolutionData (&soldata); } else { // cout << "kw = (" << buf << ")" << endl; (*testout) << "kw = (" << buf << ")" << endl; break; } } /* struct Ng_SolutionData { char * name; // name of gridfunction double * data; // solution values int components; // used components in solution vector int dist; // num of doubles per entry (alignment!) Ng_SolutionType soltype; // type of solution function }; // initialize solution data with default arguments void Ng_InitSolutionData (Ng_SolutionData * soldata); // set solution data void Ng_SetSolutionData (Ng_SolutionData * soldata); */ } } netgen-6.2.1804/libsrc/visualization/meshdoc.hpp0000644000175000017500000000142613272137567020322 0ustar kurtkurtnamespace netgen { class VisualSceneMeshDoctor : public VisualScene { int filledlist; int outlinelist; int edgelist; int selelement, locpi; int selpoint, selpoint2; // for edgemarking: Array edgedist; int markedgedist; public: DLL_HEADER VisualSceneMeshDoctor (); DLL_HEADER virtual ~VisualSceneMeshDoctor (); DLL_HEADER virtual void BuildScene (int zoomall = 0); DLL_HEADER virtual void DrawScene (); DLL_HEADER virtual void MouseDblClick (int px, int py); DLL_HEADER void SetMarkEdgeDist (int dist); DLL_HEADER void ClickElement (int elnr); DLL_HEADER void UpdateTables (); DLL_HEADER int IsSegmentMarked (int segnr) const; }; class MeshDoctorParameters { public: int active; }; DLL_HEADER extern MeshDoctorParameters meshdoctor; } netgen-6.2.1804/libsrc/visualization/meshdoc.cpp0000644000175000017500000002756413272137567020330 0ustar kurtkurt#ifndef NOTCL #include #include // #include "incvis.hpp" #include #include namespace netgen { // #include "meshdoc.hpp" MeshDoctorParameters meshdoctor; DLL_HEADER extern shared_ptr mesh; VisualSceneMeshDoctor :: VisualSceneMeshDoctor () : VisualScene() { filledlist = 0; outlinelist = 0; edgelist = 0; selelement = 0; locpi = 1; selpoint = 0; selpoint2 = 0; markedgedist = 1; UpdateTables (); } VisualSceneMeshDoctor :: ~VisualSceneMeshDoctor () { ; } void VisualSceneMeshDoctor :: DrawScene () { if (!mesh) return; int hchval = mesh->GetNP() + mesh->GetNE() + mesh->GetNSE(); if (changeval != hchval) { changeval = hchval; BuildScene(); } glClearColor(backcolor, backcolor, backcolor, 1.0); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glEnable (GL_COLOR_MATERIAL); glColor3f (1.0f, 1.0f, 1.0f); glLineWidth (1.0f); SetLight(); glPushMatrix(); glMultMatrixd (transformationmat); glInitNames (); glPushName (0); glPolygonOffset (1, 1); glEnable (GL_POLYGON_OFFSET_FILL); SetClippingPlane (); if (vispar.drawfilledtrigs) glCallList (filledlist); glDisable (GL_POLYGON_OFFSET_FILL); if (vispar.drawoutline) glCallList (outlinelist); glPolygonOffset (-1, -1); glEnable (GL_POLYGON_OFFSET_LINE); if (vispar.drawedges) glCallList (edgelist); glDisable (GL_POLYGON_OFFSET_LINE); glPopName(); if (selpoint > 0 && selpoint <= mesh->GetNP()) { GLfloat matcolblue[] = { 0, 0, 1, 1 }; glPointSize (10); glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, matcolblue); glBegin (GL_POINTS); const Point3d p = mesh->Point(selpoint); glVertex3f (p.X(), p.Y(), p.Z()); glEnd(); } glDisable(GL_CLIP_PLANE0); glPopMatrix(); glFinish(); } void VisualSceneMeshDoctor :: BuildScene (int zoomall) { int i, j; if (zoomall) { Point3d pmin, pmax; mesh->GetBox (pmin, pmax, -1); if (vispar.centerpoint) center = mesh->Point (vispar.centerpoint); else center = Center (pmin, pmax); rad = 0.5 * Dist (pmin, pmax); glEnable (GL_NORMALIZE); CalcTransformationMatrices(); } if (filledlist) { glDeleteLists (filledlist, 1); glDeleteLists (outlinelist, 1); glDeleteLists (edgelist, 1); } filledlist = glGenLists (1); glNewList (filledlist, GL_COMPILE); glPolygonMode (GL_FRONT_AND_BACK, GL_FILL); glLineWidth (1.0f); glDisable (GL_COLOR_MATERIAL); for (i = 1; i <= mesh->GetNSE(); i++) { glLoadName (i); // copy to be thread-safe Element2d el = mesh->SurfaceElement (i); int drawel = 1; for (j = 1; j <= el.GetNP(); j++) { if (!el.PNum(j)) drawel = 0; } if (!drawel) continue; GLfloat matcol[] = { 0, 1, 0, 1 }; GLfloat matcolsel[] = { 1, 0, 0, 1 }; if (i == selelement) glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, matcolsel); else glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, matcol); if (el.GetNP() == 3) { glBegin (GL_TRIANGLES); const Point3d & lp1 = mesh->Point (el.PNum(1)); const Point3d & lp2 = mesh->Point (el.PNum(2)); const Point3d & lp3 = mesh->Point (el.PNum(3)); Vec3d n = Cross (Vec3d (lp1, lp2), Vec3d (lp1, lp3)); n /= (n.Length()+1e-12); glNormal3d (n.X(), n.Y(), n.Z()); if (!vispar.colormeshsize) { glVertex3d (lp1.X(), lp1.Y(), lp1.Z()); glVertex3d (lp2.X(), lp2.Y(), lp2.Z()); glVertex3d (lp3.X(), lp3.Y(), lp3.Z()); } else { double h1 = mesh->GetH (lp1); double h2 = mesh->GetH (lp2); double h3 = mesh->GetH (lp3); SetOpenGlColor (h1, 0.1, 10); glVertex3d (lp1.X(), lp1.Y(), lp1.Z()); SetOpenGlColor (h2, 0.1, 10); glVertex3d (lp2.X(), lp2.Y(), lp2.Z()); SetOpenGlColor (h3, 0.1, 10); glVertex3d (lp3.X(), lp3.Y(), lp3.Z()); } glEnd(); } else if (el.GetNP() == 4) { glBegin (GL_QUADS); const Point3d & lp1 = mesh->Point (el.PNum(1)); const Point3d & lp2 = mesh->Point (el.PNum(2)); const Point3d & lp3 = mesh->Point (el.PNum(4)); const Point3d & lp4 = mesh->Point (el.PNum(3)); Vec3d n = Cross (Vec3d (lp1, lp2), Vec3d (lp1, Center (lp3, lp4))); n /= (n.Length()+1e-12); glNormal3d (n.X(), n.Y(), n.Z()); glVertex3d (lp1.X(), lp1.Y(), lp1.Z()); glVertex3d (lp2.X(), lp2.Y(), lp2.Z()); glVertex3d (lp4.X(), lp4.Y(), lp4.Z()); glVertex3d (lp3.X(), lp3.Y(), lp3.Z()); glEnd(); } else if (el.GetNP() == 6) { glBegin (GL_TRIANGLES); static int trigs[4][3] = { { 1, 6, 5 }, { 2, 4, 6 }, { 3, 5, 4 }, { 4, 5, 6 } }; for (j = 0; j < 4; j++) { const Point3d & lp1 = mesh->Point (el.PNum(trigs[j][0])); const Point3d & lp2 = mesh->Point (el.PNum(trigs[j][1])); const Point3d & lp3 = mesh->Point (el.PNum(trigs[j][2])); Vec3d n = Cross (Vec3d (lp1, lp2), Vec3d (lp1, lp3)); n /= (n.Length() + 1e-12); glNormal3d (n.X(), n.Y(), n.Z()); glVertex3d (lp1.X(), lp1.Y(), lp1.Z()); glVertex3d (lp2.X(), lp2.Y(), lp2.Z()); glVertex3d (lp3.X(), lp3.Y(), lp3.Z()); } glEnd(); } } glLoadName (0); glEndList (); outlinelist = glGenLists (1); glNewList (outlinelist, GL_COMPILE); glLineWidth (1.0f); glPolygonMode (GL_FRONT_AND_BACK, GL_LINE); glColor3f (0.0f, 0.0f, 0.0f); glEnable (GL_COLOR_MATERIAL); for (i = 1; i <= mesh->GetNSE(); i++) { Element2d el = mesh->SurfaceElement(i); int drawel = 1; for (j = 1; j <= el.GetNP(); j++) { if (!el.PNum(j)) drawel = 0; } if (!drawel) continue; if (el.GetNP() == 3) { glBegin (GL_TRIANGLES); const Point3d & lp1 = mesh->Point (el.PNum(1)); const Point3d & lp2 = mesh->Point (el.PNum(2)); const Point3d & lp3 = mesh->Point (el.PNum(3)); Vec3d n = Cross (Vec3d (lp1, lp2), Vec3d (lp1, lp3)); n /= (n.Length() + 1e-12); glNormal3d (n.X(), n.Y(), n.Z()); glVertex3d (lp1.X(), lp1.Y(), lp1.Z()); glVertex3d (lp2.X(), lp2.Y(), lp2.Z()); glVertex3d (lp3.X(), lp3.Y(), lp3.Z()); glEnd(); } else if (el.GetNP() == 4) { glBegin (GL_QUADS); const Point3d & lp1 = mesh->Point (el.PNum(1)); const Point3d & lp2 = mesh->Point (el.PNum(2)); const Point3d & lp3 = mesh->Point (el.PNum(4)); const Point3d & lp4 = mesh->Point (el.PNum(3)); Vec3d n = Cross (Vec3d (lp1, lp2), Vec3d (lp1, Center (lp3, lp4))); n /= (n.Length() + 1e-12); glNormal3d (n.X(), n.Y(), n.Z()); glVertex3d (lp1.X(), lp1.Y(), lp1.Z()); glVertex3d (lp2.X(), lp2.Y(), lp2.Z()); glVertex3d (lp4.X(), lp4.Y(), lp4.Z()); glVertex3d (lp3.X(), lp3.Y(), lp3.Z()); glEnd(); } else if (el.GetNP() == 6) { glBegin (GL_LINES); const Point3d & lp1 = mesh->Point (el.PNum(1)); const Point3d & lp2 = mesh->Point (el.PNum(2)); const Point3d & lp3 = mesh->Point (el.PNum(3)); const Point3d & lp4 = mesh->Point (el.PNum(4)); const Point3d & lp5 = mesh->Point (el.PNum(5)); const Point3d & lp6 = mesh->Point (el.PNum(6)); Vec3d n = Cross (Vec3d (lp1, lp2), Vec3d (lp1, lp3)); n /= (n.Length()+1e-12); glNormal3d (n.X(), n.Y(), n.Z()); glVertex3d (lp1.X(), lp1.Y(), lp1.Z()); glVertex3d (lp6.X(), lp6.Y(), lp6.Z()); glVertex3d (lp2.X(), lp2.Y(), lp2.Z()); glVertex3d (lp6.X(), lp6.Y(), lp6.Z()); glVertex3d (lp1.X(), lp1.Y(), lp1.Z()); glVertex3d (lp5.X(), lp5.Y(), lp5.Z()); glVertex3d (lp3.X(), lp3.Y(), lp3.Z()); glVertex3d (lp5.X(), lp5.Y(), lp5.Z()); glVertex3d (lp2.X(), lp2.Y(), lp2.Z()); glVertex3d (lp4.X(), lp4.Y(), lp4.Z()); glVertex3d (lp3.X(), lp3.Y(), lp3.Z()); glVertex3d (lp4.X(), lp4.Y(), lp4.Z()); glEnd(); } } glLoadName (0); glEndList (); edgelist = glGenLists (1); glNewList (edgelist, GL_COMPILE); glDisable (GL_COLOR_MATERIAL); GLfloat matcoledge[] = { 0, 0, 1, 1 }; GLfloat matcolseledge[] = { 1, 0, 1, 1 }; glLineWidth (2.0f); for (i = 1; i <= mesh->GetNSeg(); i++) { const Segment & seg = mesh->LineSegment(i); const Point3d & p1 = mesh->Point(seg[0]); const Point3d & p2 = mesh->Point(seg[1]); if (edgedist.Get(seg[0]) <= markedgedist && edgedist.Get(seg[1]) <= markedgedist) { glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, matcolseledge); glLineWidth (4.0f); } else { glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, matcoledge); glLineWidth (2.0f); } glBegin (GL_LINES); glVertex3f (p1.X(), p1.Y(), p1.Z()); glVertex3f (p2.X(), p2.Y(), p2.Z()); glEnd(); } glLineWidth (1.0f); glEndList (); } void VisualSceneMeshDoctor :: MouseDblClick (int px, int py) { cout << "dblclick: " << px << " - " << py << endl; int i, hits; // select surface triangle by mouse click GLuint selbuf[10000]; glSelectBuffer (10000, selbuf); glRenderMode (GL_SELECT); GLint viewport[4]; glGetIntegerv (GL_VIEWPORT, viewport); glMatrixMode (GL_PROJECTION); glPushMatrix(); GLdouble projmat[16]; glGetDoublev (GL_PROJECTION_MATRIX, projmat); glLoadIdentity(); gluPickMatrix (px, viewport[3] - py, 1, 1, viewport); glMultMatrixd (projmat); glClearColor(backcolor, backcolor, backcolor, 1.0); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glMatrixMode (GL_MODELVIEW); glPushMatrix(); glMultMatrixd (transformationmat); glInitNames(); glPushName (1); glPolygonOffset (1, 1); glEnable (GL_POLYGON_OFFSET_FILL); glCallList (filledlist); glDisable (GL_POLYGON_OFFSET_FILL); glPopName(); glMatrixMode (GL_PROJECTION); glPopMatrix(); glMatrixMode (GL_MODELVIEW); glPopMatrix(); glFlush(); hits = glRenderMode (GL_RENDER); cout << "hits = " << hits << endl; int minname = 0; GLuint mindepth = 0; for (i = 0; i < hits; i++) { int curname = selbuf[4*i+3]; GLuint curdepth = selbuf[4*i+1]; if (curname && (curdepth < mindepth || !minname)) { mindepth = curdepth; minname = curname; } } cout << "clicked element: " << minname << endl; ClickElement (minname); BuildScene (); } void VisualSceneMeshDoctor :: SetMarkEdgeDist (int dist) { markedgedist = dist; BuildScene(); } void VisualSceneMeshDoctor :: ClickElement (int elnr) { selelement = elnr; int oldlocpi = locpi; locpi = locpi % 3 + 1; if (selelement > 0 && selelement <= mesh->GetNSE()) { selpoint = mesh->SurfaceElement(selelement).PNum(locpi); selpoint2 = mesh->SurfaceElement(selelement).PNum(oldlocpi); cout << "selpts = " << selpoint << ", " << selpoint2 << endl; } UpdateTables(); } void VisualSceneMeshDoctor :: UpdateTables () { if (!mesh) return; edgedist.SetSize(mesh->GetNP()); int i, changed; for (i = 1; i <= mesh->GetNP(); i++) edgedist.Elem(i) = 10000; for (i = 1; i <= mesh->GetNSeg(); i++) { const Segment & seg = mesh->LineSegment(i); if ( (seg[0] == selpoint && seg[1] == selpoint2) || (seg[1] == selpoint && seg[0] == selpoint2) ) { edgedist.Elem(selpoint) = 1; edgedist.Elem(selpoint2) = 1; } } do { changed = 0; for (i = 1; i <= mesh->GetNSeg(); i++) { const Segment & seg = mesh->LineSegment(i); int edist = min2 (edgedist.Get(seg[0]), edgedist.Get(seg[1])); edist++; if (edgedist.Get(seg[0]) > edist) { edgedist.Elem(seg[0]) = edist; changed = 1; } if (edgedist.Get(seg[1]) > edist) { edgedist.Elem(seg[1]) = edist; changed = 1; } } } while (changed); } int VisualSceneMeshDoctor :: IsSegmentMarked (int segnr) const { const Segment & seg = mesh->LineSegment(segnr); return (edgedist.Get(seg[0]) <= markedgedist && edgedist.Get(seg[1]) <= markedgedist); } } #endif // NOTCL netgen-6.2.1804/libsrc/visualization/vssolution.hpp0000644000175000017500000002577013272137567021135 0ustar kurtkurt#ifndef FILE_VSSOLUTION #define FILE_VSSOLUTION typedef void * ClientData; struct Tcl_Interp; namespace netgen { DLL_HEADER extern void ImportSolution (const char * filename); class FieldLineCalc; extern int Ng_Vis_Set (ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]); class DLL_HEADER VisualSceneSolution : public VisualScene { friend class FieldLineCalc; class ClipPlaneTrig { public: struct ps { int pnr, locpnr; }; ps points[3]; ElementIndex elnr; }; class ClipPlanePoint { public: ElementIndex elnr; Point<3> lami; Point<3> p; }; #ifndef WIN32 // use OpenGL vertex buffers from OpenGL 2.x // not supported by some drivers on windows // try on your own responsibility #define USE_BUFFERS #endif #ifdef USE_BUFFERS bool has_surfel_vbo = false; GLuint surfel_vbo[4]; // size_t surfel_vbo_size; #endif int surfellist; int linelist; int element1dlist; int clipplanelist_scal; int clipplanelist_vec; int isolinelist; int clipplane_isolinelist; int surface_vector_list; // int cone_list; int isosurface_list; int pointcurvelist; bool draw_fieldlines; bool drawpointcurves; bool draw_isosurface; int num_fieldlines; bool fieldlines_randomstart; int fieldlineslist; int num_fieldlineslists; int fieldlines_startarea; Array fieldlines_startarea_parameter; int fieldlines_startface; string fieldlines_filename; double fieldlines_reltolerance; int fieldlines_rktype; double fieldlines_rellength; double fieldlines_relthickness; int fieldlines_vecfunction; bool fieldlines_fixedphase; float fieldlines_phase; int fieldlines_maxpoints; int surfeltimestamp, clipplanetimestamp, solutiontimestamp; int surfellinetimestamp; int fieldlinestimestamp, surface_vector_timestamp; int pointcurve_timestamp; int isosurface_timestamp; int subdivision_timestamp; int timetimestamp; double minval, maxval; NgLock *lock; #ifdef PARALLELGL Array par_linelists; Array par_surfellists; #endif Array user_vis; public: enum EvalFunc { FUNC_ABS = 1, FUNC_ABS_TENSOR = 2, FUNC_MISES = 3, FUNC_MAIN = 4 }; int evalfunc; enum SolType { SOL_NODAL = 1, SOL_ELEMENT = 2, SOL_SURFACE_ELEMENT = 3, SOL_NONCONTINUOUS = 4, SOL_SURFACE_NONCONTINUOUS = 5, SOL_VIRTUALFUNCTION = 6, SOL_MARKED_ELEMENTS = 10, SOL_ELEMENT_ORDER = 11, }; class SolData { public: SolData (); ~SolData (); string name; double * data; int components; int dist; int order; bool iscomplex; bool draw_volume; bool draw_surface; SolType soltype; SolutionData * solclass; // internal variables: int size; }; Array soldata; int usetexture; // 0..no, 1..1D texture (standard), 2..2D-texture (complex) int clipsolution; // 0..no, 1..scal, 2..vec int scalfunction, scalcomp, vecfunction; int gridsize; double xoffset, yoffset; int autoscale, logscale; double mminval, mmaxval; int numisolines; int subdivisions; bool showclipsolution; bool showsurfacesolution; bool lineartexture; int numtexturecols; int multidimcomponent; // bool fieldlineplot; double time; int deform; double scaledeform; bool imag_part; private: void BuildFieldLinesFromFile(Array & startpoints); void BuildFieldLinesFromFace(Array & startpoints); void BuildFieldLinesFromBox(Array & startpoints); void BuildFieldLinesFromLine(Array & startpoints); // weak_ptr wp_mesh; public: VisualSceneSolution (); virtual ~VisualSceneSolution (); virtual void BuildScene (int zoomall = 0); virtual void DrawScene (); virtual void MouseDblClick (int px, int py); // void SetMesh (shared_ptr amesh); // shared_ptr GetMesh () { return shared_ptr(wp_mesh); } shared_ptr GetMesh () const { return shared_ptr(global_mesh); } void BuildFieldLinesPlot (); void AddSolutionData (SolData * soldata); void ClearSolutionData (); void UpdateSolutionTimeStamp (); SolData * GetSolData (int i); int GetNSolData () { return soldata.Size(); } void SaveSolutionData (const char * filename); /* static void RealVec3d (const double * values, Vec3d & v, bool iscomplex, bool imag); */ static Vec<3> RealVec3d (const double * values, bool iscomplex, bool imag); static void RealVec3d (const double * values, Vec3d & v, bool iscomplex, double phaser, double phasei); void SetSubdivision (int sd) { subdivisions = sd; subdivision_timestamp = solutiontimestamp = NextTimeStamp(); } void GetMinMax (int funcnr, int comp, double & minv, double & maxv) const; void AddUserVisualizationObject (UserVisualizationObject * vis) { user_vis.Append (vis); } private: void GetClippingPlaneTrigs (Array & trigs, Array & pts); void GetClippingPlaneGrid (Array & pts); void DrawCone (const Point<3> & p1, const Point<3> & p2, double r); void DrawCylinder (const Point<3> & p1, const Point<3> & p2, double r); // Get Function Value, local coordinates lam1, lam2, lam3, bool GetValue (const SolData * data, ElementIndex elnr, double lam1, double lam2, double lam3, int comp, double & val) const; bool GetValue (const SolData * data, ElementIndex elnr, const double xref[], const double x[], const double dxdxref[], int comp, double & val) const; bool GetValueComplex (const SolData * data, ElementIndex elnr, double lam1, double lam2, double lam3, int comp, complex & val) const; bool GetValues (const SolData * data, ElementIndex elnr, double lam1, double lam2, double lam3, double * values) const; bool GetValues (const SolData * data, ElementIndex elnr, const double xref[], const double x[], const double dxdxref[], double * values) const; bool GetMultiValues (const SolData * data, ElementIndex elnr, int facetnr, int npt, const double * xref, int sxref, const double * x, int sx, const double * dxdxref, int sdxdxref, double * val, int sval) const; bool GetSurfValue (const SolData * data, SurfaceElementIndex elnr, int facetnr, double lam1, double lam2, int comp, double & val) const; bool GetSurfValue (const SolData * data, SurfaceElementIndex elnr, int facetnr, const double xref[], const double x[], const double dxdxref[], int comp, double & val) const; bool GetSurfValueComplex (const SolData * data, SurfaceElementIndex elnr, int facetnr, double lam1, double lam2, int comp, complex & val) const; bool GetSurfValues (const SolData * data, SurfaceElementIndex elnr, int facetnr, double lam1, double lam2, double * values) const; bool GetSurfValues (const SolData * data, SurfaceElementIndex elnr, int facetnr, const double xref[], const double x[], const double dxdxref[], double * values) const; bool GetMultiSurfValues (const SolData * data, SurfaceElementIndex elnr, int facetnr, int npt, const double * xref, int sxref, const double * x, int sx, const double * dxdxref, int sdxdxref, double * val, int sval) const; double ExtractValue (const SolData * data, int comp, double * values) const; complex ExtractValueComplex (const SolData * data, int comp, double * values) const; Vec<3> GetDeformation (ElementIndex elnr, const Point<3> & p) const; Vec<3> GetSurfDeformation (SurfaceElementIndex selnr, int facetnr, double lam1, double lam2) const; void GetPointDeformation (int pnum, Point<3> & p, SurfaceElementIndex elnr = -1) const; public: /// draw elements (build lists) void DrawSurfaceElements (); void DrawSurfaceElementLines (); void Draw1DElements(); void DrawSurfaceVectors (); void DrawTrigSurfaceVectors(const Array< Point<3> > & lp, const Point<3> & pmin, const Point<3> & pmax, const int sei, const SolData * vsol); void DrawIsoSurface(const SolData * sol, const SolData * grad, int comp); void DrawIsoLines (const Point<3> & p1, const Point<3> & p2, const Point<3> & p3, double val1, double val2, double val3); // draw isolines between lines (p1,p2) and (p3,p4) void DrawIsoLines2 (const Point<3> & p1, const Point<3> & p2, const Point<3> & p3, const Point<3> & p4, double val1, double val2, double val3, double val4); void DrawClipPlaneTrigs (); // const SolData * sol, int comp); void SetOpenGlColor(double val); // 0 .. non, 1 .. scalar, 2 .. complex void SetTextureMode (int texturemode) const; friend int Ng_Vis_Set (ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]); #ifdef PARALLELGL void Broadcast (); #endif }; class RKStepper { private: Array c,b; TABLE *a; int steps; int order; double tolerance; Array K; int stepcount; double h; double startt; double startt_bak; Point3d startval; Point3d startval_bak; bool adaptive; int adrun; Point3d valh; int notrestarted; public: ~RKStepper(); RKStepper(int type = 0); void SetTolerance(const double tol){tolerance = tol;} void StartNextValCalc(const Point3d & astartval, const double astartt, const double ah, const bool aadaptive = false); bool GetNextData(Point3d & val, double & t, double & ah); bool FeedNextF(const Vec3d & f); }; class FieldLineCalc { private: const Mesh & mesh; VisualSceneSolution & vss; const VisualSceneSolution::SolData * vsol; RKStepper stepper; double maxlength; int maxpoints; int direction; Point3d pmin, pmax; double rad; double phaser, phasei; double critical_value; bool randomized; double thickness; public: FieldLineCalc(const Mesh & amesh, VisualSceneSolution & avss, const VisualSceneSolution::SolData * solution, const double rel_length, const int amaxpoints = -1, const double rel_thickness = -1, const double rel_tolerance = -1, const int rk_type = 0, const int adirection = 0); void SetPhase(const double real, const double imag) { phaser = real; phasei = imag; } void SetCriticalValue(const double val) { critical_value = val; } void Randomized(void) { randomized = true; } void NotRandomized(void) { randomized = false; } void Calc(const Point3d & startpoint, Array & points, Array & vals, Array & drawelems, Array & dirstart); void GenerateFieldLines(Array & potential_startpoints, const int numlines, const int gllist, const double minval, const double maxval, const int logscale, double phaser, double phasei); }; // DLL_HEADER extern VisualSceneSolution vssolution; DLL_HEADER extern VisualSceneSolution & GetVSSolution(); } #endif netgen-6.2.1804/libsrc/visualization/vsfieldlines.cpp0000644000175000017500000004305713272137567021370 0ustar kurtkurt#ifndef NOTCL #include #include #include #include #include #include #include namespace netgen { // extern shared_ptr mesh; RKStepper :: ~RKStepper() { delete a; } RKStepper :: RKStepper(int type) : a(NULL), tolerance(1e100) { notrestarted = 0; if (type == 0) // explicit Euler { c.SetSize(1); c[0] = 0; b.SetSize(1); b[0] = 1; steps = order = 1; } else if (type == 1) // Euler-Cauchy { c.SetSize(2); c[0] = 0; c[1] = 0.5; b.SetSize(2); b[0] = 0; b[1] = 1; Array size(2); size[0] = 0; size[1] = 1; a = new TABLE(size); a->Set(2,1,0.5); // Set, Get: 1-based! steps = order = 2; } else if (type == 2) // Simpson { c.SetSize(3); c[0] = 0; c[1] = 1; c[2] = 0.5; b.SetSize(3); b[0] = b[1] = 1./6.; b[2] = 2./3.; Array size(3); size[0] = 0; size[1] = 1; size[2] = 2; a = new TABLE(size); a->Set(2,1,1); a->Set(3,1,0.25); a->Set(3,2,0.25); steps = order = 3; } else if (type == 3) // classical Runge-Kutta { c.SetSize(4); c[0] = 0; c[1] = c[2] = 0.5; c[3] = 1; b.SetSize(4); b[0] = b[3] = 1./6.; b[1] = b[2] = 1./3.; Array size(4); size[0] = 0; size[1] = 1; size[2] = 2; size[3] = 3; a = new TABLE(size); a->Set(2,1,0.5); a->Set(3,1,0); a->Set(3,2,0.5); a->Set(4,1,0); a->Set(4,2,0); a->Set(4,3,1); steps = order = 4; } K.SetSize(steps); } void RKStepper :: StartNextValCalc(const Point3d & astartval, const double astartt, const double ah, const bool aadaptive) { //cout << "Starting RK-Step with h=" << ah << endl; stepcount = 0; h = ah; startt = astartt; startval = astartval; adaptive = aadaptive; adrun = 0; } bool RKStepper :: GetNextData(Point3d & val, double & t, double & ah) { bool finished(false); //cout << "stepcount " << stepcount << endl; if(stepcount <= steps) { t = startt + c[stepcount-1]*h; val = startval; for(int i=0; iGet(stepcount,i+1) * K[i]; } if(stepcount == steps) { val = startval; for(int i=0; i 1.3) fac = 1.3; if(fac < 1 || notrestarted >= 2) ah = 2.*h * fac; if(err < tolerance) { finished = true; notrestarted++; //(*testout) << "finished RK-Step, new h=" << ah << " tolerance " << tolerance << " err " << err << endl; } else { //ah *= 0.9; notrestarted = 0; //(*testout) << "restarting h " << 2.*h << " ah " << ah << " tolerance " << tolerance << " err " << err << endl; StartNextValCalc(startval_bak,startt_bak, ah, adaptive); } } } else { t = startt + h; finished = true; } } if(stepcount == 0) { t = startt + c[stepcount]*h; val = startval; for(int i=0; iGet(stepcount,i) * K[i]; } return finished; } bool RKStepper :: FeedNextF(const Vec3d & f) { K[stepcount] = f; stepcount++; return true; } void FieldLineCalc :: GenerateFieldLines(Array & potential_startpoints, const int numlines, const int gllist, const double minval, const double maxval, const int logscale, double phaser, double phasei) { Array points; Array values; Array drawelems; Array dirstart; if(vsol -> iscomplex) SetPhase(phaser,phasei); double crit = 1.0; if(randomized) { double sum = 0; double lami[3]; double values[6]; Vec3d v; for(int i=0; iiscomplex, phaser, phasei); sum += v.Length(); } crit = sum/double(numlines); } int calculated = 0; cout << endl; for(int i=0; i= numlines) break; Calc(potential_startpoints[i],points,values,drawelems,dirstart); bool usable = false; for(int j=1; j 0) ? rel_length : 0.5; maxlength *= 2.*rad; thickness = (rel_thickness > 0) ? rel_thickness : 0.0015; thickness *= 2.*rad; double auxtolerance = (rel_tolerance > 0) ? rel_tolerance : 1.5e-3; auxtolerance *= 2.*rad; stepper.SetTolerance(auxtolerance); direction = adirection; maxpoints = amaxpoints; if(direction == 0) { maxlength *= 0.5; maxpoints /= 2; } phaser = 1; phasei = 0; critical_value = -1; randomized = false; } void FieldLineCalc :: Calc(const Point3d & startpoint, Array & points, Array & vals, Array & drawelems, Array & dirstart) { double lami[3], startlami[3]; double values[6]; double dummyt(0); Vec3d v; Vec3d startv; Point3d newp; double h; double startval; bool startdraw; bool drawelem = false; int elnr; for (int i=0; i<6; i++) values[i]=0.0; for (int i=0; i<3; i++) lami[i]=0.0; for (int i=0; i<3; i++) startlami[i]=0.0; points.SetSize(0); vals.SetSize(0); drawelems.SetSize(0); dirstart.SetSize(0); dirstart.Append(0); int startelnr = mesh.GetElementOfPoint(startpoint,startlami,true) - 1; (*testout) << "p = " << startpoint << "; elnr = " << startelnr << endl; if (startelnr == -1) return; mesh.SetPointSearchStartElement(startelnr); if (mesh.GetDimension()==3) startdraw = vss.GetValues ( vsol, startelnr, startlami[0], startlami[1], startlami[2], values); else startdraw = vss.GetSurfValues ( vsol, startelnr, -1, startlami[0], startlami[1], values); VisualSceneSolution::RealVec3d ( values, startv, vsol->iscomplex, phaser, phasei); startval = startv.Length(); if(critical_value > 0 && fabs(startval) < critical_value) return; //cout << "p = " << startpoint << "; elnr = " << startelnr << endl; for(int dir = 1; dir >= -1; dir -= 2) { if(dir*direction < 0) continue; points.Append(startpoint); vals.Append(startval); drawelems.Append(startdraw); h = 0.001*rad/startval; // otherwise no nice lines; should be made accessible from outside v = startv; if(dir == -1) v *= -1.; elnr = startelnr; lami[0] = startlami[0]; lami[1] = startlami[1]; lami[2] = startlami[2]; for(double length = 0; length < maxlength; length += h*vals.Last()) { if(v.Length() < 1e-12*rad) { (*testout) << "Current fieldlinecalculation came to a stillstand at " << points.Last() << endl; break; } stepper.StartNextValCalc(points.Last(),dummyt,h,true); stepper.FeedNextF(v); while(!stepper.GetNextData(newp,dummyt,h) && elnr != -1) { elnr = mesh.GetElementOfPoint(newp,lami,true) - 1; if(elnr != -1) { mesh.SetPointSearchStartElement(elnr); if (mesh.GetDimension()==3) drawelem = vss.GetValues (vsol, elnr, lami[0], lami[1], lami[2], values); else drawelem = vss.GetSurfValues (vsol, elnr, -1, lami[0], lami[1], values); VisualSceneSolution::RealVec3d (values, v, vsol->iscomplex, phaser, phasei); if(dir == -1) v *= -1.; stepper.FeedNextF(v); } } if (elnr == -1) { //cout << "direction " < 1) (*testout) << "Points in current fieldline: " << points.Size() << ", current position: " << newp << endl; if(maxpoints > 0 && points.Size() >= maxpoints) { break; } //cout << "length " << length << " h " << h << " vals.Last() " << vals.Last() << " maxlength " << maxlength << endl; } dirstart.Append(points.Size()); } } void VisualSceneSolution :: BuildFieldLinesFromBox(Array & startpoints) { shared_ptr mesh = GetMesh(); if (!mesh) return; if(fieldlines_startarea_parameter[0] > fieldlines_startarea_parameter[3] || fieldlines_startarea_parameter[1] > fieldlines_startarea_parameter[4] || fieldlines_startarea_parameter[2] > fieldlines_startarea_parameter[5]) { Point3d pmin, pmax; mesh->GetBox (pmin, pmax); fieldlines_startarea_parameter[0] = pmin.X(); fieldlines_startarea_parameter[1] = pmin.Y(); fieldlines_startarea_parameter[2] = pmin.Z(); fieldlines_startarea_parameter[3] = pmax.X(); fieldlines_startarea_parameter[4] = pmax.Y(); fieldlines_startarea_parameter[5] = pmax.Z(); } for (int i = 1; i <= startpoints.Size(); i++) { Point3d p (fieldlines_startarea_parameter[0] + double (rand()) / RAND_MAX * (fieldlines_startarea_parameter[3]-fieldlines_startarea_parameter[0]), fieldlines_startarea_parameter[1] + double (rand()) / RAND_MAX * (fieldlines_startarea_parameter[4]-fieldlines_startarea_parameter[1]), fieldlines_startarea_parameter[2] + double (rand()) / RAND_MAX * (fieldlines_startarea_parameter[5]-fieldlines_startarea_parameter[2])); startpoints[i-1] = p; } } void VisualSceneSolution :: BuildFieldLinesFromLine(Array & startpoints) { shared_ptr mesh = GetMesh(); if (!mesh) return; for (int i = 1; i <= startpoints.Size(); i++) { double s = double (rand()) / RAND_MAX; Point3d p (fieldlines_startarea_parameter[0] + s * (fieldlines_startarea_parameter[3]-fieldlines_startarea_parameter[0]), fieldlines_startarea_parameter[1] + s * (fieldlines_startarea_parameter[4]-fieldlines_startarea_parameter[1]), fieldlines_startarea_parameter[2] + s * (fieldlines_startarea_parameter[5]-fieldlines_startarea_parameter[2])); startpoints[i-1] = p; } } void VisualSceneSolution :: BuildFieldLinesFromFile(Array & startpoints) { shared_ptr mesh = GetMesh(); if (!mesh) return; ifstream * infile; infile = new ifstream(fieldlines_filename.c_str()); //cout << "reading from file " << fieldlines_filename << endl; int numpoints = 0; string keyword; double dparam; int iparam; while(infile->good()) { (*infile) >> keyword; if(keyword == "point") numpoints++; else if(keyword == "line" || keyword == "box") { for(int i=0; i<6; i++) (*infile) >> dparam; (*infile) >> iparam; numpoints += iparam; } } delete infile; //cout << numpoints << " startpoints" << endl; startpoints.SetSize(numpoints); infile = new ifstream(fieldlines_filename.c_str()); numpoints = 0; while(infile->good()) { (*infile) >> keyword; if (keyword == "point") { (*infile) >> startpoints[numpoints].X(); (*infile) >> startpoints[numpoints].Y(); (*infile) >> startpoints[numpoints].Z(); numpoints++; } else if (keyword == "line" || keyword == "box") { for(int i=0; i<6; i++) (*infile) >> fieldlines_startarea_parameter[i]; (*infile) >> iparam; Array auxpoints(iparam); if (keyword == "box") BuildFieldLinesFromBox(auxpoints); else if (keyword == "line") BuildFieldLinesFromLine(auxpoints); for(int i=0; i & startpoints) { shared_ptr mesh = GetMesh(); if (!mesh) return; Array elements_2d; //cout << "fieldlines_startface " << fieldlines_startface << endl; mesh->GetSurfaceElementsOfFace(fieldlines_startface,elements_2d); if(elements_2d.Size() == 0) { cerr << "No Elements on selected face (?)" << endl; return; } Vec3d v1,v2,cross; double area = 0; int i; for(i=0; iSurfaceElement(elements_2d[i]); v1 = mesh->Point(elem[1]) - mesh->Point(elem[0]); v2 = mesh->Point(elem[2]) - mesh->Point(elem[0]); cross = Cross(v1,v2); area += cross.Length(); if(elem.GetNV() == 4) { v1 = mesh->Point(elem[2]) - mesh->Point(elem[0]); v2 = mesh->Point(elem[3]) - mesh->Point(elem[0]); cross = Cross(v1,v2); area += cross.Length(); } } int startpointsp = 0; i = 0; while(startpointsp < startpoints.Size()) { const Element2d & elem = mesh->SurfaceElement(elements_2d[i]); int numtri = (elem.GetNV() == 3) ? 1 : 2; for(int tri = 0; startpointsp < startpoints.Size() && triPoint(elem[1]) - mesh->Point(elem[0]); v2 = mesh->Point(elem[2]) - mesh->Point(elem[0]); cross = Cross(v1,v2); } else if(tri == 1) { v1 = mesh->Point(elem[2]) - mesh->Point(elem[0]); v2 = mesh->Point(elem[3]) - mesh->Point(elem[0]); cross = Cross(v1,v2); } double thisarea = cross.Length(); int numloc = int(startpoints.Size()*thisarea/area); if(double (rand()) / RAND_MAX < startpoints.Size()*thisarea/area - numloc) numloc++; for(int j=0; startpointsp < startpoints.Size() && j 1) { s = 1.-s; t = 1.-t; } startpoints[startpointsp] = mesh->Point(elem[0]) + s*v1 +t*v2; startpointsp++; } } i++; if(i == elements_2d.Size()) i = 0; } } void VisualSceneSolution :: BuildFieldLinesPlot () { shared_ptr mesh = GetMesh(); if (!mesh) return; if (fieldlinestimestamp >= solutiontimestamp) return; fieldlinestimestamp = solutiontimestamp; if (fieldlineslist) glDeleteLists (fieldlineslist, num_fieldlineslists); if (vecfunction == -1) return; const SolData * vsol = soldata[fieldlines_vecfunction]; num_fieldlineslists = (vsol -> iscomplex && !fieldlines_fixedphase) ? 100 : 1; FieldLineCalc linecalc(*mesh,*this,vsol, fieldlines_rellength,fieldlines_maxpoints,fieldlines_relthickness,fieldlines_reltolerance,fieldlines_rktype); if(fieldlines_randomstart) linecalc.Randomized(); fieldlineslist = glGenLists (num_fieldlineslists); int num_startpoints = num_fieldlines / num_fieldlineslists; if (num_fieldlines % num_fieldlineslists != 0) num_startpoints++; if(fieldlines_randomstart) num_startpoints *= 10; Array startpoints(num_startpoints); for (int ln = 0; ln < num_fieldlineslists; ln++) { if(fieldlines_startarea == 0) BuildFieldLinesFromBox(startpoints); else if(fieldlines_startarea == 1) BuildFieldLinesFromFile(startpoints); else if(fieldlines_startarea == 2) BuildFieldLinesFromFace(startpoints); double phi; if(vsol -> iscomplex) { if(fieldlines_fixedphase) phi = fieldlines_phase; else phi = 2*M_PI*ln / num_fieldlineslists; } else phi = 0; cout << "phi = " << phi << endl; double phaser = cos(phi), phasei = sin(phi); glNewList(fieldlineslist+ln, GL_COMPILE); SetTextureMode (usetexture); linecalc.GenerateFieldLines(startpoints,num_fieldlines / num_fieldlineslists+1, fieldlineslist+ln,minval,maxval,logscale,phaser,phasei); glEndList (); } } } #endif // NOTCL netgen-6.2.1804/libsrc/visualization/visual_dummy.cpp0000644000175000017500000000042613272137567021410 0ustar kurtkurt#include #include #include "../include/nginterface.h" void Ng_ClearSolutionData () { ; } void Ng_InitSolutionData (Ng_SolutionData * soldata) { ; } void Ng_SetSolutionData (Ng_SolutionData * soldata) { ; } void Ng_Redraw (bool blocking) { ; } netgen-6.2.1804/libsrc/visualization/CMakeLists.txt0000644000175000017500000000132413272137567020724 0ustar kurtkurtadd_definitions(-DNGINTERFACE_EXPORTS) install(FILES soldata.hpp DESTINATION ${NG_INSTALL_DIR_INCLUDE} COMPONENT netgen_devel ) if(USE_GUI) set( LIB_VISUAL_SOURCES meshdoc.cpp mvdraw.cpp vsfieldlines.cpp vsmesh.cpp vssolution.cpp importsolution.cpp ) else(USE_GUI) set( LIB_VISUAL_SOURCES visual_dummy.cpp ) endif(USE_GUI) add_library(visual ${NG_LIB_TYPE} ${LIB_VISUAL_SOURCES}) if(NOT WIN32) target_link_libraries( visual ${PYTHON_LIBRARIES} ${MPI_CXX_LIBRARIES} ${OPENGL_LIBRARIES} ) install( TARGETS visual ${NG_INSTALL_DIR}) endif(NOT WIN32) install(FILES meshdoc.hpp mvdraw.hpp vispar.hpp visual.hpp vssolution.hpp DESTINATION ${NG_INSTALL_DIR_INCLUDE}/visualization COMPONENT netgen_devel ) netgen-6.2.1804/libsrc/visualization/visual.hpp0000644000175000017500000000125113272137567020177 0ustar kurtkurt#ifndef FILE_VISUAL #define FILE_VISUAL /* *************************************************************************/ /* File: visual.hpp */ /* Author: Joachim Schoeberl */ /* Date: 02. Dec. 01 */ /* *************************************************************************/ /* Visualization */ #ifdef PARALLEL #define PARALLELGL #endif #include "../include/incopengl.hpp" #include "vispar.hpp" #include "soldata.hpp" #include "mvdraw.hpp" #include #include "vssolution.hpp" #include "meshdoc.hpp" #endif netgen-6.2.1804/libsrc/visualization/vsmesh.cpp0000644000175000017500000024543713272137567020214 0ustar kurtkurt#include #include #include // #include #ifdef STLGEOM #include #endif // #include #include namespace netgen { // extern shared_ptr mesh; extern NetgenGeometry * ng_geometry; VisualSceneMesh vsmesh; VisualSceneMesh :: VisualSceneMesh () : VisualScene() { filledlist = 0; linelist = 0; edgelist = 0; badellist = 0; tetlist = 0; prismlist = 0; hexlist = 0; pyramidlist = 0; identifiedlist = 0; pointnumberlist = 0; domainsurflist = 0; vstimestamp = -1; // GetTimeStamp(); selecttimestamp = -1; // GetTimeStamp(); filledtimestamp = -1; // GetTimeStamp(); linetimestamp = -1; // GetTimeStamp(); edgetimestamp = -1; // GetTimeStamp(); pointnumbertimestamp = -1; // GetTimeStamp(); tettimestamp = -1; // GetTimeStamp(); prismtimestamp = -1; // GetTimeStamp(); hextimestamp = -1; // GetTimeStamp(); pyramidtimestamp = -1; // GetTimeStamp(); badeltimestamp = -1; // GetTimeStamp(); identifiedtimestamp = -1; // GetTimeStamp(); domainsurftimestamp = -1; // GetTimeStamp(); selface = -1; selelement = -1; locpi = 1; selpoint = -1; selpoint2 = -1; seledge = -1; minh = 0.0; maxh = 0.0; user_me_handler = NULL; } VisualSceneMesh :: ~VisualSceneMesh () { ; } void VisualSceneMesh :: DrawScene () { try { shared_ptr mesh = GetMesh(); if (!mesh) { VisualScene::DrawScene(); return; } lock = NULL; static int timer = NgProfiler::CreateTimer ("VSMesh::DrawScene"); NgProfiler::RegionTimer reg (timer); BuildScene(); glEnable(GL_DEPTH_TEST); glClearColor(backcolor, backcolor, backcolor, 1.0); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glEnable (GL_COLOR_MATERIAL); glColor3f (1.0f, 1.0f, 1.0f); glLineWidth (1.0f); SetLight(); glPushMatrix(); glMultMatrixd (transformationmat); GLdouble projmat[16]; // brauchen wir das ? glGetDoublev (GL_PROJECTION_MATRIX, projmat); #ifdef PARALLEL glEnable (GL_BLEND); glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); #endif glInitNames (); glPushName (0); // glEnable (GL_LINE_SMOOTH); // glEnable (GL_BLEND); // glEnable (GL_POLYGON_SMOOTH); // glDisable (GL_DEPTH_TEST); // glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // glHint (GL_LINE_SMOOTH_HINT, GL_DONT_CARE); glDisable (GL_COLOR_MATERIAL); GLfloat matcol0[] = { 0, 0, 0, 1 }; GLfloat matcol1[] = { 1, 1, 1, 1 }; GLfloat matcolf[] = { 0, 1, 0, 1 }; GLfloat matcolb[] = { 0.5, 0, 0, 1 }; // GLfloat matcolblue[] = { 0, 0, 1, 1 }; glMatrixMode (GL_MODELVIEW); glMaterialfv(GL_FRONT, GL_EMISSION, matcol0); glMaterialfv(GL_BACK, GL_EMISSION, matcol0); glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, matcol1); glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, matcolf); glMaterialfv(GL_BACK, GL_AMBIENT_AND_DIFFUSE, matcolb); glPolygonMode (GL_FRONT_AND_BACK, GL_FILL); // glPolygonOffset (1,10); glPolygonOffset (2,2); glEnable (GL_POLYGON_OFFSET_FILL); SetClippingPlane (); if (vispar.drawfilledtrigs) { if (filledtimestamp < mesh->GetTimeStamp () || filledtimestamp < selecttimestamp) { BuildFilledList (false); } #ifdef PARALLELGL if (ntasks > 1 && vispar.drawtetsdomain > 0 && vispar.drawtetsdomain < ntasks) glCallList (par_filledlists[vispar.drawtetsdomain]); else #endif glCallList (filledlist); } if (vispar.drawbadels) glCallList (badellist); if (vispar.drawprisms) { BuildPrismList (); glCallList (prismlist); } if (vispar.drawpyramids) { BuildPyramidList (); glCallList (pyramidlist); } if (vispar.drawhexes) { BuildHexList (); glCallList (hexlist); } if (vispar.drawtets) { BuildTetList (); glCallList (tetlist); } if (vispar.drawdomainsurf) { BuildDomainSurfList(); glCallList (domainsurflist); } glDisable (GL_POLYGON_OFFSET_FILL); // draw lines glMatrixMode (GL_MODELVIEW); glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, matcol0); glMaterialfv(GL_FRONT_AND_BACK, GL_EMISSION, matcol0); glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, matcol0); glPolygonMode (GL_FRONT_AND_BACK, GL_LINE); glLineWidth (1.0f); glColor3f (0.0f, 0.0f, 0.0f); glDisable (GL_LINE_SMOOTH); if (vispar.drawoutline) { glPolygonOffset (1, 1); glEnable (GL_POLYGON_OFFSET_LINE); if (linetimestamp < mesh->GetTimeStamp ()) BuildLineList (); #ifdef PARALLELGL if (ntasks > 1 && vispar.drawtetsdomain > 0 && vispar.drawtetsdomain < ntasks) glCallList (par_linelists[vispar.drawtetsdomain]); else #endif glCallList (linelist); glDisable (GL_POLYGON_OFFSET_LINE); } if (vispar.drawidentified) { glPolygonOffset (1, -1); glEnable (GL_POLYGON_OFFSET_LINE); glCallList (identifiedlist); glDisable (GL_POLYGON_OFFSET_LINE); } if (vispar.drawpointnumbers || vispar.drawedgenumbers || vispar.drawfacenumbers || vispar.drawelementnumbers) glCallList (pointnumberlist); glPopName(); if (vispar.drawedges) { BuildEdgeList(); glCallList (edgelist); } if (selpoint > 0 && selpoint <= mesh->GetNP()) { /* glPointSize (3.0); glColor3d (0, 0, 1); glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, matcolblue); glBegin (GL_POINTS); const Point3d p = mesh->Point(selpoint); glVertex3f (p.X(), p.Y(), p.Z()); glEnd(); */ glColor3d (0, 0, 1); static GLubyte cross[] = { 0xc6, 0xee, 0x7c, 0x38, 0x7c, 0xee, 0xc6 }; glPixelStorei(GL_UNPACK_ALIGNMENT, 1); glDisable (GL_COLOR_MATERIAL); glDisable (GL_LIGHTING); glDisable (GL_CLIP_PLANE0); const Point3d p = mesh->Point(selpoint); glRasterPos3d (p.X(), p.Y(), p.Z()); glBitmap (7, 7, 3, 3, 0, 0, &cross[0]); } glDisable(GL_CLIP_PLANE0); glPopMatrix(); if (vispar.colormeshsize) DrawColorBar (minh, maxh, 1); DrawCoordinateCross (); DrawNetgenLogo (); if (lock) { lock -> UnLock(); delete lock; lock = NULL; } glFinish(); } catch (bad_weak_ptr e) { // cout << "don't have a mesh to visualize" << endl; VisualScene::DrawScene(); } } void VisualSceneMesh :: BuildScene (int zoomall) { try { shared_ptr mesh = GetMesh(); if (!mesh) { VisualScene::BuildScene (zoomall); return; } if (!lock) { lock = new NgLock (mesh->Mutex()); lock -> Lock(); } static int timer = NgProfiler::CreateTimer ("VSMesh::BuildScene"); NgProfiler::RegionTimer reg (timer); Point3d pmin, pmax; static double oldrad = 0; Array faces; int meshtimestamp = mesh->GetTimeStamp(); if (meshtimestamp > vstimestamp || zoomall) { if (mesh->GetDimension() == 2) { // works in NGSolve, mesh view mesh->GetBox (pmin, pmax); } else { // otherwise strange zooms douring mesh generation mesh->GetBox (pmin, pmax, SURFACEPOINT); } if (vispar.use_center_coords && zoomall == 2) { center.X() = vispar.centerx; center.Y() = vispar.centery; center.Z() = vispar.centerz; } else if (selpoint >= 1 && zoomall == 2) center = mesh->Point (selpoint); else if (vispar.centerpoint >= 1 && zoomall == 2) center = mesh->Point (vispar.centerpoint); else center = Center (pmin, pmax); rad = 0.5 * Dist (pmin, pmax); if(rad == 0) rad = 1e-6; if (rad > 1.2 * oldrad || mesh->GetMajorTimeStamp() > vstimestamp || zoomall) { CalcTransformationMatrices(); oldrad = rad; } } glEnable (GL_NORMALIZE); if (pointnumberlist) { glDeleteLists (pointnumberlist, 1); pointnumberlist = 0; } if (badellist) { glDeleteLists (badellist, 1); badellist = 0; } /* if (prismlist) { glDeleteLists (prismlist, 1); prismlist = 0; } if (pyramidlist) { glDeleteLists (pyramidlist, 1); pyramidlist = 0; } if (hexlist) { glDeleteLists (hexlist, 1); hexlist = 0; } */ if (identifiedlist) { glDeleteLists (identifiedlist, 1); identifiedlist = 0; } pointnumberlist = glGenLists (1); glNewList (pointnumberlist, GL_COMPILE); if (vispar.drawpointnumbers || vispar.drawedgenumbers || vispar.drawfacenumbers || vispar.drawelementnumbers) { // glEnable (GL_COLOR_MATERIAL); GLfloat textcol[3] = { float(1-backcolor), float(1-backcolor), float(1-backcolor) }; glColor3fv (textcol); glNormal3d (0, 0, 1); glPushAttrib (GL_LIST_BIT); // glListBase (fontbase); char buf[30]; if (vispar.drawpointnumbers) for (PointIndex pi : mesh->Points().Range()) { const Point3d & p = mesh->Point(pi); glRasterPos3d (p.X(), p.Y(), p.Z()); sprintf (buf, "%d", int(pi)); // glCallLists (strlen (buf), GL_UNSIGNED_BYTE, buf); MyOpenGLText (buf); } if (vispar.drawedgenumbers) { /* for (SegmentIndex i = 0; i < mesh->GetNSeg(); i++) { const Segment & seg = (*mesh)[i]; const Point3d & p1 = mesh->Point(seg[0]); const Point3d & p2 = mesh->Point(seg[1]); const Point3d p = Center (p1, p2); glRasterPos3d (p.X(), p.Y(), p.Z()); sprintf (buf, "%d", seg.edgenr); glCallLists (strlen (buf), GL_UNSIGNED_BYTE, buf); } */ const MeshTopology & top = mesh->GetTopology(); for (int i = 1; i <= top.GetNEdges(); i++) { int v1, v2; top.GetEdgeVertices (i, v1, v2); const Point3d & p1 = mesh->Point(v1); const Point3d & p2 = mesh->Point(v2); const Point3d p = Center (p1, p2); glRasterPos3d (p.X(), p.Y(), p.Z()); sprintf (buf, "%d", i); // glCallLists (strlen (buf), GL_UNSIGNED_BYTE, buf); MyOpenGLText (buf); } } if (vispar.drawfacenumbers) { const MeshTopology & top = mesh->GetTopology(); Array v; for (int i = 1; i <= top.GetNFaces(); i++) { top.GetFaceVertices (i, v); const Point3d & p1 = mesh->Point(v.Elem(1)); const Point3d & p2 = mesh->Point(v.Elem(2)); const Point3d & p3 = mesh->Point(v.Elem(3)); Point3d p; if (v.Elem(4) == 0) { p = Center (p1, p2, p3); } else { const Point3d & p4 = mesh->Point(v.Elem(4)); Point3d hp1 = Center (p1, p2); Point3d hp2 = Center (p3, p4); p = Center (hp1, hp2); } glRasterPos3d (p.X(), p.Y(), p.Z()); sprintf (buf, "%d", i); // glCallLists (strlen (buf), GL_UNSIGNED_BYTE, buf); MyOpenGLText (buf); } } if (vispar.drawelementnumbers) { Array v; for (int i = 1; i <= mesh->GetNE(); i++) { // const ELEMENTTYPE & eltype = mesh->ElementType(i); Array pnums; Point3d p; const Element & el = mesh->VolumeElement (i); if ( ! el.PNum(5)) // eltype == TET ) { pnums.SetSize(4); for( int j = 0; j < pnums.Size(); j++) pnums[j] = mesh->VolumeElement(i).PNum(j+1); const Point3d & p1 = mesh->Point(pnums[0]); const Point3d & p2 = mesh->Point(pnums[1]); const Point3d & p3 = mesh->Point(pnums[2]); const Point3d & p4 = mesh->Point(pnums[3]); p = Center (p1, p2, p3, p4); } else if ( ! el.PNum(6)) // eltype == PYRAMID { pnums.SetSize(5); for( int j = 0; j < pnums.Size(); j++) pnums[j] = mesh->VolumeElement(i).PNum(j+1); const Point3d & p1 = mesh->Point(pnums[0]); const Point3d & p2 = mesh->Point(pnums[1]); const Point3d & p3 = mesh->Point(pnums[2]); const Point3d & p4 = mesh->Point(pnums[3]); const Point3d & p5 = mesh->Point(pnums[4]); p.X() = 0.3 * p5.X() + 0.7 * Center ( Center(p1, p3) , Center(p2, p4) ) . X(); p.Y() = 0.3 * p5.Y() + 0.7 * Center ( Center(p1, p3) , Center(p2, p4) ) . Y(); p.Z() = 0.3 * p5.Z() + 0.7 * Center ( Center(p1, p3) , Center(p2, p4) ) . Z(); } else if ( ! el.PNum(7) ) // eltype == PRISM { pnums.SetSize(6); for( int j = 0; j < pnums.Size(); j++) pnums[j] = mesh->VolumeElement(i).PNum(j+1); const Point3d & p1 = mesh->Point(pnums[0]); const Point3d & p2 = mesh->Point(pnums[1]); const Point3d & p3 = mesh->Point(pnums[2]); const Point3d & p11 = mesh->Point(pnums[3]); const Point3d & p12 = mesh->Point(pnums[4]); const Point3d & p13 = mesh->Point(pnums[5]); p = Center ( Center (p1, p2, p3) , Center(p11, p12, p13) ) ; } else if (! el.PNum(9) ) // eltype == HEX { pnums.SetSize(8); for( int j = 0; j < pnums.Size(); j++) pnums[j] = mesh->VolumeElement(i).PNum(j+1); const Point3d & p1 = mesh->Point(pnums[0]); const Point3d & p2 = mesh->Point(pnums[1]); const Point3d & p3 = mesh->Point(pnums[2]); const Point3d & p4 = mesh->Point(pnums[3]); const Point3d & p5 = mesh->Point(pnums[4]); const Point3d & p6 = mesh->Point(pnums[5]); const Point3d & p7 = mesh->Point(pnums[6]); const Point3d & p8 = mesh->Point(pnums[7]); p = Center ( Center ( Center(p1, p3), Center(p2, p4) ) , Center( Center(p5, p7) , Center(p6, p8 ) ) ); } glRasterPos3d (p.X(), p.Y(), p.Z()); sprintf (buf, "%d", i); // glCallLists (strlen (buf), GL_UNSIGNED_BYTE, buf); MyOpenGLText (buf); } } glPopAttrib (); // glDisable (GL_COLOR_MATERIAL); } glEndList (); badellist = glGenLists (1); glNewList (badellist, GL_COMPILE); if (vispar.drawbadels) { // SetClippingPlane (); static float badelcol[] = { 1.0f, 0.0f, 1.0f, 1.0f }; glLineWidth (1.0f); for (int i = 1; i <= mesh->GetNE(); i++) { if (mesh->VolumeElement(i).flags.badel || mesh->VolumeElement(i).flags.illegal || (i == vispar.drawelement)) { // copy to be thread-safe Element el = mesh->VolumeElement (i); el.GetSurfaceTriangles (faces); glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, badelcol); // if ( (el.GetNP() == 4) || (el.GetNP() == 10)) if (el.PNum(1)) { glBegin (GL_TRIANGLES); for (int j = 1; j <= faces.Size(); j++) { Element2d & face = faces.Elem(j); const Point3d & lp1 = mesh->Point (el.PNum(face.PNum(1))); const Point3d & lp2 = mesh->Point (el.PNum(face.PNum(2))); const Point3d & lp3 = mesh->Point (el.PNum(face.PNum(3))); Vec3d n = Cross (Vec3d (lp1, lp2), Vec3d (lp1, lp3)); n /= (n.Length()+1e-12); glNormal3d (n.X(), n.Y(), n.Z()); glVertex3d (lp1.X(), lp1.Y(), lp1.Z()); glVertex3d (lp2.X(), lp2.Y(), lp2.Z()); glVertex3d (lp3.X(), lp3.Y(), lp3.Z()); } glEnd(); } } } for (ElementIndex ei : mesh->VolumeElements().Range()) { if (mesh->VolumeElement(ei).flags.badel) { // copy to be thread-safe Element el = mesh->VolumeElement (ei); if ( (el.GetNP() == 4) || (el.GetNP() == 10)) { glBegin (GL_LINES); glVertex3d (0,0,0); const Point3d & p = mesh->Point(el.PNum(1)); glVertex3d (p.X(), p.Y(), p.Z()); glEnd(); } } } for (int i = 1; i <= mesh->GetNE(); i++) { Element el = mesh->VolumeElement (i); int hascp = 0; for (int j = 1; j <= el.GetNP(); j++) if (el.PNum(j) == vispar.centerpoint) hascp = 1; if (hascp) { (*testout) << "draw el " << i << " : "; for (int j = 1; j <= el.GetNP(); j++) (*testout) << el.PNum(j) << " "; (*testout) << endl; if (el.GetNP() == 4) { int et[6][2] = { { 1, 2 }, { 1, 3 }, { 1, 4 }, { 2, 3 }, { 2, 4 }, { 3, 4 } } ; for (int j = 0; j < 6; j++) { glBegin (GL_LINES); const Point3d & p1 = mesh->Point (el.PNum(et[j][0])); const Point3d & p2 = mesh->Point (el.PNum(et[j][1])); glVertex3d (p1.X(), p1.Y(), p1.Z()); glVertex3d (p2.X(), p2.Y(), p2.Z()); glEnd (); } } if (el.GetNP() == 10) { int et[12][2] = { { 1, 5 }, { 2, 5 }, { 1, 6 }, { 3, 6 }, { 1, 7 }, { 4, 7 }, { 2, 8 }, { 3, 8 }, { 2, 9 }, { 4, 9 }, { 3, 10 }, { 4, 10 } }; for (int j = 0; j < 12; j++) { glBegin (GL_LINES); const Point3d & p1 = mesh->Point (el.PNum(et[j][0])); const Point3d & p2 = mesh->Point (el.PNum(et[j][1])); glVertex3d (p1.X(), p1.Y(), p1.Z()); glVertex3d (p2.X(), p2.Y(), p2.Z()); glEnd (); } } } } for (SurfaceElementIndex sei : mesh->SurfaceElements().Range()) { Element2d el = mesh->SurfaceElement(sei); // copy to be thread-safe if (!el.BadElement()) continue; bool drawel = true; for (int j = 1; j <= el.GetNP(); j++) if (!el.PNum(j).IsValid()) drawel = false; if (!drawel) continue; // cout << int (el.GetType()) << " " << flush; switch (el.GetType()) { case TRIG: { glBegin (GL_TRIANGLES); Point3d lp1 = mesh->Point (el.PNum(1)); Point3d lp2 = mesh->Point (el.PNum(2)); Point3d lp3 = mesh->Point (el.PNum(3)); Vec3d n = Cross (Vec3d (lp1, lp2), Vec3d (lp1, lp3)); n /= (n.Length() + 1e-12); glNormal3dv (&n.X()); glVertex3dv (&lp1.X()); glVertex3dv (&lp2.X()); glVertex3dv (&lp3.X()); glEnd(); break; } case QUAD: { glBegin (GL_QUADS); const Point3d & lp1 = mesh->Point (el.PNum(1)); const Point3d & lp2 = mesh->Point (el.PNum(2)); const Point3d & lp3 = mesh->Point (el.PNum(4)); const Point3d & lp4 = mesh->Point (el.PNum(3)); Vec3d n = Cross (Vec3d (lp1, lp2), Vec3d (lp1, Center (lp3, lp4))); n /= (n.Length() + 1e-12); glNormal3d (n.X(), n.Y(), n.Z()); glVertex3d (lp1.X(), lp1.Y(), lp1.Z()); glVertex3d (lp2.X(), lp2.Y(), lp2.Z()); glVertex3d (lp4.X(), lp4.Y(), lp4.Z()); glVertex3d (lp3.X(), lp3.Y(), lp3.Z()); glEnd(); break; } case TRIG6: { int lines[6][2] = { { 1, 6 }, { 2, 6 }, { 1, 5 }, { 3, 5 }, { 2, 4 }, { 3, 4 } }; glBegin (GL_LINES); for (int j = 0; j < 6; j++) { glVertex3dv ( mesh->Point (el.PNum(lines[j][0])) ); glVertex3dv ( mesh->Point (el.PNum(lines[j][0])) ); } glEnd(); break; } case QUAD6: { int lines[6][2] = { { 1, 5 }, { 2, 5 }, { 3, 6 }, { 4, 6 }, { 1, 4 }, { 2, 3 } }; glBegin (GL_LINES); for (int j = 0; j < 6; j++) { const Point3d & lp1 = mesh->Point (el.PNum(lines[j][0])); const Point3d & lp2 = mesh->Point (el.PNum(lines[j][1])); glVertex3d (lp1.X(), lp1.Y(), lp1.Z()); glVertex3d (lp2.X(), lp2.Y(), lp2.Z()); } glEnd (); break; } default: PrintSysError ("Cannot draw surface element of type ", int(el.GetType())); } } glLoadName (0); } glEndList (); if (1) { identifiedlist = glGenLists (1); glNewList (identifiedlist, GL_COMPILE); GLfloat identifiedcol[] = { 1, 0, 1, 1 }; glLineWidth (3); // for (i = 1; i <= mesh->GetNSeg(); i++) if (mesh -> HasIdentifications() ) { // if (mesh->GetIdentifications().HasIdentifiedPoints()) { INDEX_2_HASHTABLE & idpts = mesh->GetIdentifications().GetIdentifiedPoints(); for (int i = 1; i <= idpts.GetNBags(); i++) for (int j = 1; j <= idpts.GetBagSize(i); j++) { INDEX_2 pts; int val; idpts.GetData (i, j, pts, val); const Point3d & p1 = mesh->Point(pts.I1()); const Point3d & p2 = mesh->Point(pts.I2()); glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, identifiedcol); glBegin (GL_LINES); glVertex3f (p1.X(), p1.Y(), p1.Z()); glVertex3f (p2.X(), p2.Y(), p2.Z()); glEnd(); } } } glEndList (); } if (lock) { lock -> UnLock(); delete lock; lock = NULL; } vstimestamp = meshtimestamp; } catch (bad_weak_ptr e) { PrintMessage (3, "vsmesh::buildscene: don't have a mesh to visualize"); VisualScene::BuildScene (zoomall); } } void VisualSceneMesh :: BuildFilledList (bool names) { shared_ptr mesh = GetMesh(); static int timer = NgProfiler::CreateTimer ("Mesh::BuildFilledList"); NgProfiler::RegionTimer reg (timer); #ifdef PARALLELGL if (id == 0 && ntasks > 1) { InitParallelGL(); par_filledlists.SetSize (ntasks); MyMPI_SendCmd ("redraw"); MyMPI_SendCmd ("filledlist"); for ( int dest = 1; dest < ntasks; dest++ ) MyMPI_Recv (par_filledlists[dest], dest, MPI_TAG_VIS); if (filledlist) glDeleteLists (filledlist, 1); filledlist = glGenLists (1); glNewList (filledlist, GL_COMPILE); for ( int dest = 1; dest < ntasks; dest++ ) glCallList (par_filledlists[dest]); glEndList(); filledtimestamp = NextTimeStamp(); return; } #endif if (!lock) { lock = new NgLock (mesh->Mutex()); lock -> Lock(); } filledtimestamp = NextTimeStamp(); if (filledlist) glDeleteLists (filledlist, 1); filledlist = glGenLists (1); glNewList (filledlist, GL_COMPILE); #ifdef STLGEOM STLGeometry * stlgeometry = dynamic_cast (ng_geometry); bool checkvicinity = (stlgeometry != NULL) && stldoctor.showvicinity; #endif glEnable (GL_NORMALIZE); glLineWidth (1.0f); Vector locms; if (vispar.colormeshsize) { glEnable (GL_COLOR_MATERIAL); glShadeModel (GL_SMOOTH); locms.SetSize (mesh->GetNP()); maxh = -1; minh = 1e99; for (int i = 1; i <= locms.Size(); i++) { Point3d p = mesh->Point(i); locms(i-1) = mesh->GetH (p); if (locms(i-1) > maxh) maxh = locms(i-1); if (locms(i-1) < minh) minh = locms(i-1); } if (!locms.Size()) { minh = 1; maxh = 10; } } else glDisable (GL_COLOR_MATERIAL); GLfloat matcol[] = { 0, 1, 0, 1 }; GLfloat matcolsel[] = { 1, 0, 0, 1 }; GLint rendermode; glGetIntegerv (GL_RENDER_MODE, &rendermode); CurvedElements & curv = mesh->GetCurvedElements(); int hoplotn = 1 << vispar.subdivisions; Array seia; for (int faceindex = 1; faceindex <= mesh->GetNFD(); faceindex++) { mesh->GetSurfaceElementsOfFace (faceindex, seia); // Philippose - 06/07/2009 // Modified the colour system to integrate the face colours into // the mesh data structure, rather than limit it to the OCC geometry // structure... allows other geometry types to use face colours too matcol[0] = mesh->GetFaceDescriptor(faceindex).SurfColour().X(); matcol[1] = mesh->GetFaceDescriptor(faceindex).SurfColour().Y(); matcol[2] = mesh->GetFaceDescriptor(faceindex).SurfColour().Z(); matcol[3] = 1.0; if (faceindex == selface) glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, matcolsel); else glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, matcol); for (int hi = 0; hi < seia.Size(); hi++) { SurfaceElementIndex sei = seia[hi]; const Element2d & el = (*mesh)[sei]; bool drawel = (!el.IsDeleted() & el.IsVisible()); #ifdef STLGEOM if (checkvicinity) for (int j = 0; j < el.GetNP(); j++) if (!stlgeometry->Vicinity(el.GeomInfoPi(j+1).trignum)) drawel = 0; #endif if (!drawel) continue; if (names) glLoadName (sei+1); switch (el.GetType()) { case TRIG: { if (curv.IsHighOrder()) // && curv.IsSurfaceElementCurved(sei)) { if (hoplotn > 128) hoplotn = 128; Point<3> xa[129]; Vec<3> na[129]; for (int i = 0; i < hoplotn; i++) { glBegin (GL_TRIANGLE_STRIP); for (int j = 0; j <= hoplotn-i; j++) for (int k = 0; k < 2; k++) { if (j == hoplotn-i && k == 1) continue; if (i > 0 && k == 0) { glNormal3dv (na[j]); glVertex3dv (xa[j]); continue; } Point<2> xref (double(j) / hoplotn, double(i+k) / hoplotn); Point<3> xglob; Mat<3,2> dxdxi; Vec<3> dx, dy, n; curv.CalcSurfaceTransformation (xref, sei, xglob, dxdxi); for (int i = 0; i < 3; i++) { dx(i) = dxdxi(i,0); dy(i) = dxdxi(i,1); } n = Cross (dx, dy); glNormal3dv (n); glVertex3dv (xglob); if (k == 1) { na[j] = n; xa[j] = xglob; } } glEnd(); } } else // not high order { glBegin (GL_TRIANGLES); const Point<3> & lp0 = (*mesh) [el[0]]; const Point<3> & lp1 = (*mesh) [el[1]]; const Point<3> & lp2 = (*mesh) [el[2]]; Vec<3> n = Cross (lp1-lp0, lp2-lp0).Normalize(); glNormal3dv (n); for (int j = 0; j < 3; j++) { if (vispar.colormeshsize) SetOpenGlColor (locms(el[0]-1), minh, maxh, 0); glVertex3dv ( (*mesh)[el[j]] ); } glEnd(); } break; } case QUAD: { if (curv.IsHighOrder()) // && curv.IsSurfaceElementCurved(sei)) { Point<2> xr[4]; Point<3> xg; Vec<3> dx, dy, n; glBegin (GL_QUADS); for (int i = 0; i < hoplotn; i++) for (int j = 0; j < hoplotn; j++) { xr[0](0) = (double) i/hoplotn; xr[0](1) = (double) j/hoplotn; xr[1](0) = (double)(i+1)/hoplotn; xr[1](1) = (double) j/hoplotn; xr[2](0) = (double)(i+1)/hoplotn; xr[2](1) = (double)(j+1)/hoplotn; xr[3](0) = (double) i/hoplotn; xr[3](1) = (double)(j+1)/hoplotn; for (int l=0; l<4; l++) { Mat<3,2> dxdxi; curv.CalcSurfaceTransformation (xr[l], sei, xg, dxdxi); for (int i = 0; i < 3; i++) { dx(i) = dxdxi(i,0); dy(i) = dxdxi(i,1); } n = Cross (dx, dy); n.Normalize(); glNormal3d (n(0), n(1), n(2)); glVertex3d (xg(0), xg(1), xg(2)); } } glEnd(); } else // not high order { glBegin (GL_QUADS); const Point<3> & lp1 = mesh->Point (el.PNum(1)); const Point<3> & lp2 = mesh->Point (el.PNum(2)); const Point<3> & lp3 = mesh->Point (el.PNum(4)); const Point<3> & lp4 = mesh->Point (el.PNum(3)); Vec<3> n = Cross (lp2-lp1, Center (lp3, lp4)-lp1); n.Normalize(); glNormal3dv (n); glVertex3dv (lp1); glVertex3dv (lp2); glVertex3dv (lp4); glVertex3dv (lp3); glEnd (); } break; } case TRIG6: { glBegin (GL_TRIANGLES); static int trigs[4][3] = { { 1, 6, 5 }, { 2, 4, 6 }, { 3, 5, 4 }, { 4, 5, 6 } }; for (int j = 0; j < 4; j++) { const Point<3> & lp1 = mesh->Point (el.PNum(trigs[j][0])); const Point<3> & lp2 = mesh->Point (el.PNum(trigs[j][1])); const Point<3> & lp3 = mesh->Point (el.PNum(trigs[j][2])); // Vec3d n = Cross (Vec3d (lp1, lp2), Vec3d (lp1, lp3)); Vec<3> n = Cross (lp2-lp1, lp3-lp1); glNormal3dv (n); glVertex3dv (lp1); glVertex3dv (lp2); glVertex3dv (lp3); } glEnd(); break; } case QUAD6: { glBegin (GL_QUADS); static int quads[2][4] = { { 1, 5, 6, 4 }, { 5, 2, 3, 6 } }; for (int j = 0; j < 2; j++) { Point3d lp1 = mesh->Point (el.PNum(quads[j][0])); Point3d lp2 = mesh->Point (el.PNum(quads[j][1])); Point3d lp3 = mesh->Point (el.PNum(quads[j][2])); Point3d lp4 = mesh->Point (el.PNum(quads[j][3])); Vec3d n = Cross (Vec3d (lp1, lp2), Vec3d (lp1, lp3)); n /= (n.Length() + 1e-12); glNormal3dv (&n.X()); glVertex3dv (&lp1.X()); glVertex3dv (&lp2.X()); glVertex3dv (&lp3.X()); glVertex3dv (&lp4.X()); } glEnd(); break; } case QUAD8: { glBegin (GL_TRIANGLES); static int boundary[] = { 1, 5, 2, 8, 3, 6, 4, 7, 1 }; Point3d c(0,0,0); for (int j = 0; j < 4; j++) { const Point3d & hp = mesh->Point (el[j]); c.X() -= 0.25 * hp.X(); c.Y() -= 0.25 * hp.Y(); c.Z() -= 0.25 * hp.Z(); } for (int j = 4; j < 8; j++) { const Point3d & hp = mesh->Point (el[j]); c.X() += 0.5 * hp.X(); c.Y() += 0.5 * hp.Y(); c.Z() += 0.5 * hp.Z(); } for (int j = 0; j < 8; j++) { Point3d lp1 = mesh->Point (el.PNum(boundary[j])); Point3d lp2 = mesh->Point (el.PNum(boundary[j+1])); Vec3d n = Cross (Vec3d (c, lp1), Vec3d (c, lp2)); n /= (n.Length() + 1e-12); glNormal3dv (&n.X()); glVertex3dv (&lp1.X()); glVertex3dv (&lp2.X()); glVertex3dv (&c.X()); } glEnd(); break; } default: PrintSysError ("Cannot draw (2) surface element of type ", int(el.GetType())); } } } glLoadName (0); glEndList (); #ifdef PARALLELGL glFinish(); if (id > 0) MyMPI_Send (filledlist, 0, MPI_TAG_VIS); #endif } void VisualSceneMesh :: BuildLineList() { shared_ptr mesh = GetMesh(); static int timer = NgProfiler::CreateTimer ("Mesh::BuildLineList"); NgProfiler::RegionTimer reg (timer); #ifdef PARALLELGL if (id == 0 && ntasks > 1) { InitParallelGL(); par_linelists.SetSize (ntasks); MyMPI_SendCmd ("redraw"); MyMPI_SendCmd ("linelist"); for ( int dest = 1; dest < ntasks; dest++ ) MyMPI_Recv (par_linelists[dest], dest, MPI_TAG_VIS); if (linelist) glDeleteLists (linelist, 1); linelist = glGenLists (1); glNewList (linelist, GL_COMPILE); for ( int dest = 1; dest < ntasks; dest++ ) glCallList (par_linelists[dest]); glEndList(); linetimestamp = NextTimeStamp(); return; } #endif if (!lock) { lock = new NgLock (mesh->Mutex()); lock -> Lock(); } linetimestamp = NextTimeStamp(); #ifdef STLGEOM STLGeometry * stlgeometry = dynamic_cast (ng_geometry); bool checkvicinity = (stlgeometry != NULL) && stldoctor.showvicinity; #endif if (linelist) glDeleteLists (linelist, 1); linelist = glGenLists (1); glNewList (linelist, GL_COMPILE); // cout << "linelist = " << linelist << endl; glLineWidth (1.0f); int hoplotn = 1 << vispar.subdivisions; // PrintMessage (3, "nse = ", mesh->GetNSE()); for (SurfaceElementIndex sei = 0; sei < mesh->GetNSE(); sei++) { const Element2d & el = (*mesh)[sei]; bool drawel = (!el.IsDeleted() & el.IsVisible()); #ifdef STLGEOM if (checkvicinity) for (int j = 0; j < el.GetNP(); j++) if (!stlgeometry->Vicinity(el.GeomInfoPi(j+1).trignum)) drawel = 0; #endif if (!drawel) continue; switch (el.GetType()) { case TRIG: { CurvedElements & curv = mesh->GetCurvedElements(); if (curv.IsHighOrder()) // && curv.IsSurfaceElementCurved(sei)) { Point<3> xg; glBegin (GL_LINE_LOOP); for (int i = 0; i < hoplotn; i++) { Point<2> xr (double(i) / hoplotn, 0); curv.CalcSurfaceTransformation (xr, sei, xg); glVertex3dv (xg); } for (int i = 0; i < hoplotn; i++) { Point<2> xr (double(hoplotn-i) / hoplotn, double(i)/hoplotn); curv.CalcSurfaceTransformation (xr, sei, xg); glVertex3dv (xg); } for (int i = 0; i < hoplotn; i++) { Point<2> xr (0, double(hoplotn-i) / hoplotn); curv.CalcSurfaceTransformation (xr, sei, xg); glVertex3dv (xg); } glEnd(); } else { glBegin (GL_TRIANGLES); for (int j = 0; j < 3; j++) glVertex3dv ( (*mesh) [el[j]] ); /* const Point<3> & lp0 = (*mesh) [el[0]]; const Point<3> & lp1 = (*mesh) [el[1]]; const Point<3> & lp2 = (*mesh) [el[2]]; glVertex3dv (lp0); glVertex3dv (lp1); glVertex3dv (lp2); */ glEnd(); } break; } case QUAD: { CurvedElements & curv = mesh->GetCurvedElements(); if (curv.IsHighOrder()) // && curv.IsSurfaceElementCurved(sei)) { Point<2> xr; Point<3> xg; glBegin (GL_LINE_STRIP); for (int side = 0; side < 4; side++) { for (int i = 0; i <= hoplotn; i++) { switch (side) { case 0: xr(0) = (double) i/hoplotn; xr(1) = 0.; break; case 1: xr(0) = 1.; xr(1) = (double) i/hoplotn; break; case 2: xr(0) = (double) (hoplotn-i)/hoplotn; xr(1) = 1.; break; case 3: xr(0) = 0.; xr(1) = (double) (hoplotn-i)/hoplotn; break; } curv.CalcSurfaceTransformation (xr, sei, xg); glVertex3d (xg(0), xg(1), xg(2)); } } glEnd(); } else { glBegin (GL_QUADS); const Point3d & lp1 = mesh->Point (el.PNum(1)); const Point3d & lp2 = mesh->Point (el.PNum(2)); const Point3d & lp3 = mesh->Point (el.PNum(4)); const Point3d & lp4 = mesh->Point (el.PNum(3)); Vec3d n = Cross (Vec3d (lp1, lp2), Vec3d (lp1, Center (lp3, lp4))); glNormal3d (n.X(), n.Y(), n.Z()); glVertex3d (lp1.X(), lp1.Y(), lp1.Z()); glVertex3d (lp2.X(), lp2.Y(), lp2.Z()); glVertex3d (lp4.X(), lp4.Y(), lp4.Z()); glVertex3d (lp3.X(), lp3.Y(), lp3.Z()); glEnd(); } break; } case TRIG6: { int lines[6][2] = { { 1, 6 }, { 2, 6 }, { 1, 5 }, { 3, 5 }, { 2, 4 }, { 3, 4 } }; glBegin (GL_LINES); for (int j = 0; j < 6; j++) { const Point3d & lp1 = mesh->Point (el.PNum(lines[j][0])); const Point3d & lp2 = mesh->Point (el.PNum(lines[j][1])); glVertex3d (lp1.X(), lp1.Y(), lp1.Z()); glVertex3d (lp2.X(), lp2.Y(), lp2.Z()); } glEnd(); break; } case QUAD6: { int lines[6][2] = { { 1, 5 }, { 2, 5 }, { 3, 6 }, { 4, 6 }, { 1, 4 }, { 2, 3 } }; glBegin (GL_LINES); for (int j = 0; j < 6; j++) { const Point3d & lp1 = mesh->Point (el.PNum(lines[j][0])); const Point3d & lp2 = mesh->Point (el.PNum(lines[j][1])); glVertex3d (lp1.X(), lp1.Y(), lp1.Z()); glVertex3d (lp2.X(), lp2.Y(), lp2.Z()); } glEnd (); break; } case QUAD8: { int lines[8][2] = { { 1, 5 }, { 2, 5 }, { 3, 6 }, { 4, 6 }, { 1, 7 }, { 4, 7 }, { 2, 8 }, { 3, 8 } }; glBegin (GL_LINES); for (int j = 0; j < 8; j++) { const Point3d & lp1 = mesh->Point (el.PNum(lines[j][0])); const Point3d & lp2 = mesh->Point (el.PNum(lines[j][1])); glVertex3d (lp1.X(), lp1.Y(), lp1.Z()); glVertex3d (lp2.X(), lp2.Y(), lp2.Z()); } glEnd (); break; } default: PrintSysError ("Cannot draw (4) surface element of type ", int(el.GetType())); } } glEndList (); #ifdef PARALLELGL glFinish(); if (id > 0) MyMPI_Send (linelist, 0, MPI_TAG_VIS); #endif } void VisualSceneMesh :: BuildEdgeList() { shared_ptr mesh = GetMesh(); if (!lock) { lock = new NgLock (mesh->Mutex()); lock -> Lock(); } if (edgetimestamp > mesh->GetTimeStamp () && vispar.drawtetsdomain == 0 && vispar.shrink == 1) return; edgetimestamp = NextTimeStamp(); if (edgelist) glDeleteLists (edgelist, 1); edgelist = glGenLists (1); glNewList (edgelist, GL_COMPILE); GLfloat matcoledge[] = { 0, 0, 1, 1 }; GLfloat matcolsingedge[] = { 1, 0, 1, 1 }; glEnable (GL_POLYGON_OFFSET_LINE); glPolygonOffset (1, -1); glEnable (GL_COLOR_MATERIAL); glDisable (GL_LIGHTING); for (int i = 1; i <= mesh->GetNSeg(); i++) { const Segment & seg = mesh->LineSegment(i); #ifdef PARALLEL if (ntasks > 1 && vispar.drawtetsdomain && (vispar.drawtetsdomain != seg.GetPartition())) continue; #endif const Point3d & p1 = (*mesh)[seg[0]]; const Point3d & p2 = (*mesh)[seg[1]]; if (seg.singedge_left || seg.singedge_right) glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, matcolsingedge); else glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, matcoledge); if (seg.singedge_left || seg.singedge_right) glColor3fv (matcolsingedge); else glColor3fv (matcoledge); if (seg.edgenr == seledge) glLineWidth(5); else glLineWidth(2); if (mesh->GetCurvedElements().IsHighOrder()) { int hoplotn = 1 << vispar.subdivisions; // mesh->GetCurvedElements().GetNVisualSubsecs(); Point<3> x; glBegin (GL_LINE_STRIP); for (int j = 0; j <= hoplotn; j++) { mesh->GetCurvedElements().CalcSegmentTransformation ((double) j/hoplotn, i-1, x); glVertex3d (x(0), x(1), x(2)); /* cout << "x = " << x(0) << ", " << x(1) << ", " << x(2) << ", norm = 1+" << sqrt(x(0)*x(0)+x(1)*x(1))-1 << ", phi = " << atan2(x(1), x(0))/M_PI << endl; */ } glEnd(); } else { glBegin (GL_LINES); Point<3> hp1 = p1; Point<3> hp2 = p2; Point<3> c = Center(p1, p2); if (vispar.shrink < 1) { hp1 = c + vispar.shrink * (hp1 - c); hp2 = c + vispar.shrink * (hp2 - c); } glVertex3dv (hp1); glVertex3dv (hp2); // p2.X(), p2.Y(), p2.Z()); glEnd(); } } glLineWidth (2); glDisable (GL_POLYGON_OFFSET_LINE); glDisable (GL_COLOR_MATERIAL); glEnable (GL_LIGHTING); glEndList(); } void VisualSceneMesh :: BuildPointNumberList() { ; } // Bernstein Pol B_{n,i}(x) = n! / i! / (n-i)! (1-x)^{n-i} x^i static inline double Bernstein (int n, int i, double x) { double val = 1; for (int j = 1; j <= i; j++) val *= x; for (int j = 1; j <= n-i; j++) val *= (1-x) * (j+i) / j; return val; } void ToBernstein (int order, Point<3> * pts, int stride) { static DenseMatrix mat, inv; static Vector vec1, vec2; if (mat.Height () != order+1) { mat.SetSize (order+1); inv.SetSize (order+1); vec1.SetSize (order+1); vec2.SetSize (order+1); for (int i = 0; i <= order; i++) { double x = double(i) / order; for (int j = 0; j <= order; j++) mat(i,j) = Bernstein (order, j, x); } CalcInverse (mat, inv); } for (int i = 0; i < 3; i++) { for (int j = 0; j <= order; j++) vec1(j) = pts[j*stride](i); inv.Mult (vec1, vec2); for (int j = 0; j <= order; j++) pts[j*stride](i) = vec2(j); } } void VisualSceneMesh :: BuildTetList() { shared_ptr mesh = GetMesh(); if (tettimestamp > mesh->GetTimeStamp () && tettimestamp > vispar.clipping.timestamp ) return; if (!lock) { lock = new NgLock (mesh->Mutex()); lock -> Lock(); } tettimestamp = NextTimeStamp(); if (tetlist) glDeleteLists (tetlist, 1); tetlist = glGenLists (1); glNewList (tetlist, GL_COMPILE); Vector locms; // Philippose - 16/02/2010 // Add Mesh size based coloring of // meshes also for the volume elements if (vispar.colormeshsize) { glEnable (GL_COLOR_MATERIAL); locms.SetSize (mesh->GetNP()); maxh = -1; minh = 1e99; for (int i = 1; i <= locms.Size(); i++) { Point3d p = mesh->Point(i); locms(i-1) = mesh->GetH (p); if (locms(i-1) > maxh) maxh = locms(i-1); if (locms(i-1) < minh) minh = locms(i-1); } if (!locms.Size()) { minh = 1; maxh = 10; } } else glDisable (GL_COLOR_MATERIAL); Array faces; BitArray shownode(mesh->GetNP()); if (vispar.clipping.enable) { shownode.Clear(); for (int i = 1; i <= shownode.Size(); i++) { Point<3> p = mesh->Point(i); double val = p[0] * clipplane[0] + p[1] * clipplane[1] + p[2] * clipplane[2] + clipplane[3]; if (val > 0) shownode.Set (i); } } else shownode.Set(); static float tetcols[][4] = { { 1.0f, 1.0f, 0.0f, 1.0f }, { 1.0f, 0.0f, 0.0f, 1.0f }, { 0.0f, 1.0f, 0.0f, 1.0f }, { 0.0f, 0.0f, 1.0f, 1.0f } /* { 1.0f, 1.0f, 0.0f, 0.3f }, { 1.0f, 0.0f, 0.0f, 0.3f }, { 0.0f, 1.0f, 0.0f, 0.3f }, { 0.0f, 0.0f, 1.0f, 0.3f } */ }; CurvedElements & curv = mesh->GetCurvedElements(); if (!curv.IsHighOrder()) glShadeModel (GL_FLAT); else glShadeModel (GL_SMOOTH); int hoplotn = max (2, 1 << vispar.subdivisions); for (ElementIndex ei = 0; ei < mesh->GetNE(); ei++) { if (vispar.drawtetsdomain > 0) { int tetid = vispar.drawmetispartition ? (*mesh)[ei].GetPartition() : (*mesh)[ei].GetIndex(); if (vispar.drawtetsdomain != tetid) continue; } const Element & el = (*mesh)[ei]; if ((el.GetType() == TET || el.GetType() == TET10) && !el.IsDeleted()) { bool drawtet = 1; for (int j = 0; j < 4; j++) if (!shownode.Test(el[j])) drawtet = 0; if (!drawtet) continue; int ind = el.GetIndex() % 4; if (vispar.drawmetispartition && el.GetPartition()!=-1) ind = el.GetPartition() % 4; glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, tetcols[ind]); if (curv.IsHighOrder()) // && curv.IsElementCurved(ei)) { const ELEMENT_FACE * faces = MeshTopology :: GetFaces1 (TET); const Point3d * vertices = MeshTopology :: GetVertices (TET); /* Point<3> grid[11][11]; Point<3> fpts[3]; int order = vispar.subdivisions+1; for (int trig = 0; trig < 4; trig++) { for (int j = 0; j < 3; j++) fpts[j] = vertices[faces[trig][j]-1]; static Point<3> c(0.25, 0.25, 0.25); if (vispar.shrink < 1) for (int j = 0; j < 3; j++) fpts[j] += (1-vispar.shrink) * (c-fpts[j]); for (int ix = 0; ix <= order; ix++) for (int iy = 0; iy <= order; iy++) { double lami[3] = { (1-double(ix)/order) * (1-double(iy)/order), ( double(ix)/order) * (1-double(iy)/order), double(iy)/order }; Point<3> xl; for (int l = 0; l < 3; l++) xl(l) = lami[0] * fpts[0](l) + lami[1] * fpts[1](l) + lami[2] * fpts[2](l); curv.CalcElementTransformation (xl, i-1, grid[ix][iy]); } for (int j = 0; j <= order; j++) ToBernstein (order, &grid[j][0], &grid[0][1]-&grid[0][0]); for (int j = 0; j <= order; j++) ToBernstein (order, &grid[0][j], &grid[1][0]-&grid[0][0]); glMap2d(GL_MAP2_VERTEX_3, 0.0, 1.0, &grid[0][1](0)-&grid[0][0](0), order+1, 0.0, 1.0, &grid[1][0](0)-&grid[0][0](0), order+1, &grid[0][0](0)); glEnable(GL_MAP2_VERTEX_3); glEnable(GL_AUTO_NORMAL); glMapGrid2f(8, 0.0, 0.999, 8, 0.0, 1.0); glEvalMesh2(GL_FILL, 0, 8, 0, 8); glDisable (GL_AUTO_NORMAL); glDisable (GL_MAP2_VERTEX_3); } */ int order = curv.GetOrder(); Array > ploc ( (order+1)*(order+1) ); Array > pglob ( (order+1)*(order+1) ); Point<3> fpts[3]; for (int trig = 0; trig < 4; trig++) { for (int j = 0; j < 3; j++) fpts[j] = vertices[faces[trig][j]-1]; static Point<3> c(0.25, 0.25, 0.25); if (vispar.shrink < 1) for (int j = 0; j < 3; j++) fpts[j] += (1-vispar.shrink) * (c-fpts[j]); for (int ix = 0, ii = 0; ix <= order; ix++) for (int iy = 0; iy <= order; iy++, ii++) { double lami[3] = { (1-double(ix)/order) * (1-double(iy)/order), ( double(ix)/order) * (1-double(iy)/order), double(iy)/order }; Point<3> xl; for (int l = 0; l < 3; l++) xl(l) = lami[0] * fpts[0](l) + lami[1] * fpts[1](l) + lami[2] * fpts[2](l); ploc[ii] = xl; } curv.CalcMultiPointElementTransformation (&ploc, ei, &pglob, 0); Point<3> grid[11][11]; for (int ix = 0, ii = 0; ix <= order; ix++) for (int iy = 0; iy <= order; iy++, ii++) grid[ix][iy] = pglob[ii]; for (int j = 0; j <= order; j++) ToBernstein (order, &grid[j][0], &grid[0][1]-&grid[0][0]); for (int j = 0; j <= order; j++) ToBernstein (order, &grid[0][j], &grid[1][0]-&grid[0][0]); glMap2d(GL_MAP2_VERTEX_3, 0.0, 1.0, &grid[0][1](0)-&grid[0][0](0), order+1, 0.0, 1.0, &grid[1][0](0)-&grid[0][0](0), order+1, &grid[0][0](0)); glEnable(GL_MAP2_VERTEX_3); glEnable(GL_AUTO_NORMAL); glMapGrid2f(hoplotn, 0.0, 0.9999f, hoplotn, 0.0, 1.0); glEvalMesh2(GL_FILL, 0, hoplotn, 0, hoplotn); glDisable (GL_AUTO_NORMAL); glDisable (GL_MAP2_VERTEX_3); } } else // Not High Order { Point<3> pts[4]; for (int j = 0; j < 4; j++) pts[j] = (*mesh)[el[j]]; if (vispar.shrink < 1) { Point<3> c = Center (pts[0], pts[1], pts[2], pts[3]); for (int j = 0; j < 4; j++) pts[j] = c + vispar.shrink * (pts[j]-c); } Vec<3> n; // Philippose - 16/02/2010 // Add Mesh size based coloring of // meshes also for the volume elements if(vispar.colormeshsize) { glBegin (GL_TRIANGLE_STRIP); n = Cross (pts[1]-pts[0], pts[2]-pts[0]); glNormal3dv (n); SetOpenGlColor (locms(el[0]-1), minh, maxh, 0); glVertex3dv (pts[0]); SetOpenGlColor (locms(el[1]-1), minh, maxh, 0); glVertex3dv (pts[1]); SetOpenGlColor (locms(el[2]-1), minh, maxh, 0); glVertex3dv (pts[2]); n = Cross (pts[3]-pts[1], pts[2]-pts[1]); glNormal3dv (n); SetOpenGlColor (locms(el[3]-1), minh, maxh, 0); glVertex3dv (pts[3]); n = Cross (pts[3]-pts[2], pts[0]-pts[2]); glNormal3dv (n); SetOpenGlColor (locms(el[0]-1), minh, maxh, 0); glVertex3dv (pts[0]); n = Cross (pts[1]-pts[3], pts[0]-pts[3]); glNormal3dv (n); SetOpenGlColor (locms(el[1]-1), minh, maxh, 0); glVertex3dv (pts[1]); glEnd(); } else // Do not color mesh based on mesh size { GLubyte ind[4][3] = { { 0,1,2 }, { 3,1,0 }, { 1,3,2 }, { 2,3,0 } }; glEnableClientState(GL_VERTEX_ARRAY); glVertexPointer(3, GL_DOUBLE, 0, &pts[0](0)); for (int j = 0; j < 4; j++) { glNormal3dv (Cross (pts[ind[j][1]]-pts[ind[j][0]], pts[ind[j][2]]-pts[ind[j][0]])); glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_BYTE, &ind[j][0]); } glDisableClientState(GL_VERTEX_ARRAY); /* glBegin (GL_TRIANGLE_STRIP); glNormal3dv (Cross (pts[1]-pts[0], pts[2]-pts[0])); glVertex3dv (pts[0]); glVertex3dv (pts[1]); glVertex3dv (pts[2]); glNormal3dv (Cross (pts[3]-pts[1], pts[2]-pts[1])); glVertex3dv (pts[3]); glNormal3dv (Cross (pts[3]-pts[2], pts[0]-pts[2])); glVertex3dv (pts[0]); glNormal3dv (Cross (pts[1]-pts[3], pts[0]-pts[3])); glVertex3dv (pts[1]); glEnd(); */ } } } } glEndList (); } void VisualSceneMesh :: BuildPrismList() { shared_ptr mesh = GetMesh(); if (prismtimestamp > mesh->GetTimeStamp () && prismtimestamp > vispar.clipping.timestamp ) return; if (!lock) { lock = new NgLock (mesh->Mutex()); lock -> Lock(); } prismtimestamp = NextTimeStamp(); if (prismlist) glDeleteLists (prismlist, 1); prismlist = glGenLists (1); glNewList (prismlist, GL_COMPILE); static float prismcol[] = { 0.0f, 1.0f, 1.0f, 1.0f }; glLineWidth (1.0f); Array faces; glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, prismcol); for (ElementIndex ei = 0; ei < mesh->GetNE(); ei++) { const Element & el = (*mesh)[ei]; if (el.GetType() == PRISM && !el.IsDeleted()) { int j; int i = ei + 1; CurvedElements & curv = mesh->GetCurvedElements(); if (curv.IsHighOrder()) // && curv.IsElementCurved(ei)) { const ELEMENT_FACE * faces = MeshTopology :: GetFaces1 (PRISM); const Point3d * vertices = MeshTopology :: GetVertices (PRISM); Point<3> grid[11][11]; Point<3> fpts[4]; int order = vispar.subdivisions+1; for (int trig = 0; trig < 2; trig++) { for (int j = 0; j < 3; j++) fpts[j] = vertices[faces[trig][j]-1]; static Point<3> c(1.0/3.0, 1.0/3.0, 0.5); if (vispar.shrink < 1) for (int j = 0; j < 3; j++) fpts[j] += (1-vispar.shrink) * (c-fpts[j]); for (int ix = 0; ix <= order; ix++) for (int iy = 0; iy <= order; iy++) { double lami[3] = { (1-double(ix)/order) * (1-double(iy)/order), ( double(ix)/order) * (1-double(iy)/order), double(iy)/order }; Point<3> xl; for (int l = 0; l < 3; l++) xl(l) = lami[0] * fpts[0](l) + lami[1] * fpts[1](l) + lami[2] * fpts[2](l); curv.CalcElementTransformation (xl, i-1, grid[ix][iy]); } for (int j = 0; j <= order; j++) ToBernstein (order, &grid[j][0], &grid[0][1]-&grid[0][0]); for (int j = 0; j <= order; j++) ToBernstein (order, &grid[0][j], &grid[1][0]-&grid[0][0]); glMap2d(GL_MAP2_VERTEX_3, 0.0, 1.0, &grid[0][1](0)-&grid[0][0](0), order+1, 0.0, 1.0, &grid[1][0](0)-&grid[0][0](0), order+1, &grid[0][0](0)); glEnable(GL_MAP2_VERTEX_3); glEnable(GL_AUTO_NORMAL); glMapGrid2f(8, 0.0, 0.999f, 8, 0.0, 1.0); glEvalMesh2(GL_FILL, 0, 8, 0, 8); glDisable (GL_AUTO_NORMAL); glDisable (GL_MAP2_VERTEX_3); } for (int quad = 2; quad < 5; quad++) { for (int j = 0; j < 4; j++) fpts[j] = vertices[faces[quad][j]-1]; static Point<3> c(1.0/3.0, 1.0/3.0, 0.5); if (vispar.shrink < 1) for (int j = 0; j < 4; j++) fpts[j] += (1-vispar.shrink) * (c-fpts[j]); for (int ix = 0; ix <= order; ix++) for (int iy = 0; iy <= order; iy++) { double lami[4] = { (1-double(ix)/order) * (1-double(iy)/order), ( double(ix)/order) * (1-double(iy)/order), ( double(ix)/order) * ( double(iy)/order), (1-double(ix)/order) * ( double(iy)/order) }; Point<3> xl; for (int l = 0; l < 3; l++) xl(l) = lami[0] * fpts[0](l) + lami[1] * fpts[1](l) + lami[2] * fpts[2](l) + lami[3] * fpts[3](l); curv.CalcElementTransformation (xl, ei, grid[ix][iy]); } for (int j = 0; j <= order; j++) ToBernstein (order, &grid[j][0], &grid[0][1]-&grid[0][0]); for (int j = 0; j <= order; j++) ToBernstein (order, &grid[0][j], &grid[1][0]-&grid[0][0]); glMap2d(GL_MAP2_VERTEX_3, 0.0, 1.0, &grid[0][1](0)-&grid[0][0](0), order+1, 0.0, 1.0, &grid[1][0](0)-&grid[0][0](0), order+1, &grid[0][0](0)); glEnable(GL_MAP2_VERTEX_3); glEnable(GL_AUTO_NORMAL); glMapGrid2f(8, 0.0, 1.0, 8, 0.0, 1.0); glEvalMesh2(GL_FILL, 0, 8, 0, 8); glDisable (GL_AUTO_NORMAL); glDisable (GL_MAP2_VERTEX_3); } /* int hoplotn = 1 << vispar.subdivisions; // int hoplotn = curv.GetNVisualSubsecs(); const Point3d * facepoint = MeshTopology :: GetVertices (TRIG); const ELEMENT_FACE * elface = MeshTopology :: GetFaces(TRIG); glBegin (GL_TRIANGLES); for (int trig = 0; trig<2; trig++) { Vec<3> x0,x1,d0,d1; x0 = facepoint[1] - facepoint[2]; x1 = facepoint[0] - facepoint[2]; x0.Normalize(); x1.Normalize(); if (trig == 1) swap (x0,x1); Point<3> xr[3]; Point<3> xg; Vec<3> dx, dy, dz, n; for (int i1 = 0; i1 < hoplotn; i1++) for (int j1 = 0; j1 < hoplotn-i1; j1++) for (int k = 0; k < 2; k++) { if (k == 0) { xr[0](0) = (double) i1/hoplotn; xr[0](1) = (double) j1/hoplotn; xr[1](0) = (double)(i1+1)/hoplotn; xr[1](1) = (double) j1/hoplotn; xr[2](0) = (double) i1/hoplotn; xr[2](1) = (double)(j1+1)/hoplotn; } else { if (j1 == hoplotn-i1-1) continue; xr[0](0) = (double)(i1+1)/hoplotn; xr[0](1) = (double) j1/hoplotn; xr[1](0) = (double)(i1+1)/hoplotn; xr[1](1) = (double)(j1+1)/hoplotn; xr[2](0) = (double) i1/hoplotn; xr[2](1) = (double)(j1+1)/hoplotn; }; for (int l=0; l<3; l++) { Mat<3,3> dxdxi; xr[l](2) = (double) trig; curv.CalcElementTransformation (xr[l], i-1, xg, dxdxi); for (int i = 0; i < 3; i++) { dx(i) = dxdxi(i,0); dy(i) = dxdxi(i,1); dz(i) = dxdxi(i,2); } Vec<3> d0 = x0(0)*dx + x0(1)*dy + x0(2)*dz; Vec<3> d1 = x1(0)*dx + x1(1)*dy + x1(2)*dz; n = Cross (d1, d0); glNormal3d (n(0), n(1), n(2)); glVertex3d (xg(0), xg(1), xg(2)); } } } glEnd (); glBegin (GL_QUADS); for (int quad = 0; quad<3; quad++) { const Point3d * facepoint = MeshTopology :: GetVertices (PRISM); Vec<3> x0,x1; int xyz; switch (quad) { case 0: x0 = facepoint[5] - facepoint[2]; x1 = facepoint[0] - facepoint[2]; xyz = 0; break; case 1: x0 = facepoint[4] - facepoint[0]; x1 = facepoint[1] - facepoint[0]; xyz = 0; break; case 2: x0 = facepoint[1] - facepoint[2]; x1 = facepoint[5] - facepoint[2]; xyz = 1; break; } x0.Normalize(); x1.Normalize(); swap (x0,x1); Point<3> xr[4]; Point<3> xg; Vec<3> dx, dy, dz, n; for (int i1 = 0; i1 < hoplotn; i1++) for (int j1 = 0; j1 < hoplotn; j1++) { xr[0](xyz) = (double) i1/hoplotn; xr[0](2) = (double) j1/hoplotn; xr[1](xyz) = (double)(i1+1)/hoplotn; xr[1](2) = (double) j1/hoplotn; xr[2](xyz) = (double)(i1+1)/hoplotn; xr[2](2) = (double)(j1+1)/hoplotn; xr[3](xyz) = (double) i1/hoplotn; xr[3](2) = (double)(j1+1)/hoplotn; for (int l=0; l<4; l++) { switch (quad) { case 0: xr[l](1) = 0; break; case 1: xr[l](1) = 1-xr[l](0); break; case 2: xr[l](0) = 0; break; } Mat<3,3> dxdxi; curv.CalcElementTransformation (xr[l], i-1, xg, dxdxi); for (int i = 0; i < 3; i++) { dx(i) = dxdxi(i,0); dy(i) = dxdxi(i,1); dz(i) = dxdxi(i,2); } Vec<3> d0 = x0(0)*dx + x0(1)*dy + x0(2)*dz; Vec<3> d1 = x1(0)*dx + x1(1)*dy + x1(2)*dz; n = Cross (d1, d0); glNormal3d (n(0), n(1), n(2)); glVertex3d (xg(0), xg(1), xg(2)); } } } glEnd (); */ } else { Point3d c(0,0,0); if (vispar.shrink < 1) { for (j = 1; j <= 6; j++) { Point3d p = mesh->Point(el.PNum(j)); c.X() += p.X() / 6; c.Y() += p.Y() / 6; c.Z() += p.Z() / 6; } } el.GetSurfaceTriangles (faces); glBegin (GL_TRIANGLES); for (j = 1; j <= faces.Size(); j++) { Element2d & face = faces.Elem(j); Point3d lp1 = mesh->Point (el.PNum(face.PNum(1))); Point3d lp2 = mesh->Point (el.PNum(face.PNum(2))); Point3d lp3 = mesh->Point (el.PNum(face.PNum(3))); Vec3d n = Cross (Vec3d (lp1, lp3), Vec3d (lp1, lp2)); n /= (n.Length()+1e-12); glNormal3d (n.X(), n.Y(), n.Z()); if (vispar.shrink < 1) { lp1 = c + vispar.shrink * (lp1 - c); lp2 = c + vispar.shrink * (lp2 - c); lp3 = c + vispar.shrink * (lp3 - c); } glVertex3d (lp1.X(), lp1.Y(), lp1.Z()); glVertex3d (lp2.X(), lp2.Y(), lp2.Z()); glVertex3d (lp3.X(), lp3.Y(), lp3.Z()); } glEnd(); } } } glEndList (); } void VisualSceneMesh :: BuildHexList() { shared_ptr mesh = GetMesh(); if (hextimestamp > mesh->GetTimeStamp () && hextimestamp > vispar.clipping.timestamp ) return; if (!lock) { lock = new NgLock (mesh->Mutex()); lock -> Lock(); } hextimestamp = NextTimeStamp(); if (hexlist) glDeleteLists (hexlist, 1); hexlist = glGenLists (1); glNewList (hexlist, GL_COMPILE); static float hexcol[] = { 1.0f, 1.0f, 0.0f, 1.0f }; glLineWidth (1.0f); glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, hexcol); Array faces; // int hoplotn = 1 << vispar.subdivisions; for (ElementIndex ei = 0; ei < mesh->GetNE(); ei++) { const Element & el = (*mesh)[ei]; if (el.GetType() == HEX && !el.IsDeleted()) { CurvedElements & curv = mesh->GetCurvedElements(); if (curv.IsHighOrder()) // && curv.IsElementCurved(ei)) { /* // classical glBegin (GL_QUADS); const ELEMENT_FACE * faces = MeshTopology :: GetFaces (HEX); const Point3d * vertices = MeshTopology :: GetVertices (HEX); Point<3> grid[33][33]; Vec<3> gridn[33][33]; Point<3> fpts[4]; for (int quad = 0; quad<6; quad++) { for (int j = 0; j < 4; j++) fpts[j] = vertices[faces[quad][j]-1]; static Point<3> c(0.5, 0.5, 0.5); if (vispar.shrink < 1) for (int j = 0; j < 4; j++) fpts[j] += (1-vispar.shrink) * (c-fpts[j]); Vec<3> taux = fpts[1]-fpts[0]; Vec<3> tauy = fpts[3]-fpts[0]; for (int ix = 0; ix <= hoplotn; ix++) for (int iy = 0; iy <= hoplotn; iy++) { Point<3> xl; Mat<3,3> dxdxi; double lami[4] = { (1-double(ix)/hoplotn) * (1-double(iy)/hoplotn), ( double(ix)/hoplotn) * (1-double(iy)/hoplotn), ( double(ix)/hoplotn) * ( double(iy)/hoplotn), (1-double(ix)/hoplotn) * ( double(iy)/hoplotn) }; for (int l = 0; l < 3; l++) xl(l) = lami[0] * fpts[0](l) + lami[1] * fpts[1](l) + lami[2] * fpts[2](l) + lami[3] * fpts[3](l); curv.CalcElementTransformation (xl, ei, grid[ix][iy], dxdxi); Vec<3> gtaux = dxdxi * taux; Vec<3> gtauy = dxdxi * tauy; gridn[ix][iy] = Cross (gtauy, gtaux).Normalize(); } for (int ix = 0; ix < hoplotn; ix++) for (int iy = 0; iy < hoplotn; iy++) { glNormal3dv (gridn[ix][iy]); glVertex3dv (grid[ix][iy]); glNormal3dv (gridn[ix+1][iy]); glVertex3dv (grid[ix+1][iy]); glNormal3dv (gridn[ix+1][iy+1]); glVertex3dv (grid[ix+1][iy+1]); glNormal3dv (gridn[ix][iy+1]); glVertex3dv (grid[ix][iy+1]); } } glEnd (); */ const ELEMENT_FACE * faces = MeshTopology :: GetFaces1 (HEX); const Point3d * vertices = MeshTopology :: GetVertices (HEX); Point<3> grid[11][11]; Point<3> fpts[4]; int order = vispar.subdivisions+1; for (int quad = 0; quad<6; quad++) { for (int j = 0; j < 4; j++) fpts[j] = vertices[faces[quad][j]-1]; static Point<3> c(0.5, 0.5, 0.5); if (vispar.shrink < 1) for (int j = 0; j < 4; j++) fpts[j] += (1-vispar.shrink) * (c-fpts[j]); for (int ix = 0; ix <= order; ix++) for (int iy = 0; iy <= order; iy++) { double lami[4] = { (1-double(ix)/order) * (1-double(iy)/order), ( double(ix)/order) * (1-double(iy)/order), ( double(ix)/order) * ( double(iy)/order), (1-double(ix)/order) * ( double(iy)/order) }; Point<3> xl; for (int l = 0; l < 3; l++) xl(l) = lami[0] * fpts[0](l) + lami[1] * fpts[1](l) + lami[2] * fpts[2](l) + lami[3] * fpts[3](l); curv.CalcElementTransformation (xl, ei, grid[ix][iy]); } for (int j = 0; j <= order; j++) ToBernstein (order, &grid[j][0], &grid[0][1]-&grid[0][0]); for (int j = 0; j <= order; j++) ToBernstein (order, &grid[0][j], &grid[1][0]-&grid[0][0]); glMap2d(GL_MAP2_VERTEX_3, 0.0, 1.0, &grid[0][1](0)-&grid[0][0](0), order+1, 0.0, 1.0, &grid[1][0](0)-&grid[0][0](0), order+1, &grid[0][0](0)); glEnable(GL_MAP2_VERTEX_3); glEnable(GL_AUTO_NORMAL); glMapGrid2f(8, 0.0, 1.0, 8, 0.0, 1.0); glEvalMesh2(GL_FILL, 0, 8, 0, 8); glDisable (GL_AUTO_NORMAL); glDisable (GL_MAP2_VERTEX_3); } } else { Point3d c(0,0,0); if (vispar.shrink < 1) { for (int j = 1; j <= 8; j++) { Point3d p = mesh->Point(el.PNum(j)); c.X() += p.X(); c.Y() += p.Y(); c.Z() += p.Z(); } c.X() /= 8; c.Y() /= 8; c.Z() /= 8; } glBegin (GL_TRIANGLES); el.GetSurfaceTriangles (faces); for (int j = 1; j <= faces.Size(); j++) { Element2d & face = faces.Elem(j); Point<3> lp1 = mesh->Point (el.PNum(face.PNum(1))); Point<3> lp2 = mesh->Point (el.PNum(face.PNum(2))); Point<3> lp3 = mesh->Point (el.PNum(face.PNum(3))); Vec<3> n = Cross (lp3-lp1, lp2-lp1); n.Normalize(); glNormal3dv (n); if (vispar.shrink < 1) { lp1 = c + vispar.shrink * (lp1 - c); lp2 = c + vispar.shrink * (lp2 - c); lp3 = c + vispar.shrink * (lp3 - c); } glVertex3dv (lp1); glVertex3dv (lp2); glVertex3dv (lp3); } glEnd(); } } } glEndList (); } void VisualSceneMesh :: BuildPyramidList() { shared_ptr mesh = GetMesh(); if (pyramidtimestamp > mesh->GetTimeStamp () && pyramidtimestamp > vispar.clipping.timestamp ) return; if (!lock) { lock = new NgLock (mesh->Mutex()); lock -> Lock(); } pyramidtimestamp = NextTimeStamp(); if (pyramidlist) glDeleteLists (pyramidlist, 1); pyramidlist = glGenLists (1); glNewList (pyramidlist, GL_COMPILE); static float pyramidcol[] = { 1.0f, 0.0f, 1.0f, 1.0f }; glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, pyramidcol); glLineWidth (1.0f); Array faces; for (ElementIndex ei = 0; ei < mesh->GetNE(); ei++) { const Element & el = (*mesh)[ei]; if (el.GetType() == PYRAMID && !el.IsDeleted()) { int i = ei + 1; CurvedElements & curv = mesh->GetCurvedElements(); if (curv.IsHighOrder()) // && curv.IsElementCurved(ei)) { const ELEMENT_FACE * faces = MeshTopology :: GetFaces1 (PYRAMID); const Point3d * vertices = MeshTopology :: GetVertices (PYRAMID); Point<3> grid[11][11]; Point<3> fpts[4]; int order = vispar.subdivisions+1; for (int trig = 0; trig < 4; trig++) { for (int j = 0; j < 3; j++) fpts[j] = vertices[faces[trig][j]-1]; static Point<3> c(0.375, 0.375, 0.25); if (vispar.shrink < 1) for (int j = 0; j < 3; j++) fpts[j] += (1-vispar.shrink) * (c-fpts[j]); for (int ix = 0; ix <= order; ix++) for (int iy = 0; iy <= order; iy++) { double lami[3] = { (1-double(ix)/order) * (1-double(iy)/order), ( double(ix)/order) * (1-double(iy)/order), double(iy)/order }; Point<3> xl; for (int l = 0; l < 3; l++) xl(l) = lami[0] * fpts[0](l) + lami[1] * fpts[1](l) + lami[2] * fpts[2](l); curv.CalcElementTransformation (xl, i-1, grid[ix][iy]); } for (int j = 0; j <= order; j++) ToBernstein (order, &grid[j][0], &grid[0][1]-&grid[0][0]); for (int j = 0; j <= order; j++) ToBernstein (order, &grid[0][j], &grid[1][0]-&grid[0][0]); glMap2d(GL_MAP2_VERTEX_3, 0.0, 1.0, &grid[0][1](0)-&grid[0][0](0), order+1, 0.0, 1.0, &grid[1][0](0)-&grid[0][0](0), order+1, &grid[0][0](0)); glEnable(GL_MAP2_VERTEX_3); glEnable(GL_AUTO_NORMAL); glMapGrid2f(8, 0.0, 0.999f, 8, 0.0, 1.0); glEvalMesh2(GL_FILL, 0, 8, 0, 8); glDisable (GL_AUTO_NORMAL); glDisable (GL_MAP2_VERTEX_3); } for (int quad = 4; quad < 5; quad++) { for (int j = 0; j < 4; j++) fpts[j] = vertices[faces[quad][j]-1]; static Point<3> c(0.375, 0.375, 0.25); if (vispar.shrink < 1) for (int j = 0; j < 4; j++) fpts[j] += (1-vispar.shrink) * (c-fpts[j]); for (int ix = 0; ix <= order; ix++) for (int iy = 0; iy <= order; iy++) { double lami[4] = { (1-double(ix)/order) * (1-double(iy)/order), ( double(ix)/order) * (1-double(iy)/order), ( double(ix)/order) * ( double(iy)/order), (1-double(ix)/order) * ( double(iy)/order) }; Point<3> xl; for (int l = 0; l < 3; l++) xl(l) = lami[0] * fpts[0](l) + lami[1] * fpts[1](l) + lami[2] * fpts[2](l) + lami[3] * fpts[3](l); curv.CalcElementTransformation (xl, ei, grid[ix][iy]); } for (int j = 0; j <= order; j++) ToBernstein (order, &grid[j][0], &grid[0][1]-&grid[0][0]); for (int j = 0; j <= order; j++) ToBernstein (order, &grid[0][j], &grid[1][0]-&grid[0][0]); glMap2d(GL_MAP2_VERTEX_3, 0.0, 1.0, &grid[0][1](0)-&grid[0][0](0), order+1, 0.0, 1.0, &grid[1][0](0)-&grid[0][0](0), order+1, &grid[0][0](0)); glEnable(GL_MAP2_VERTEX_3); glEnable(GL_AUTO_NORMAL); glMapGrid2f(8, 0.0, 1.0, 8, 0.0, 1.0); glEvalMesh2(GL_FILL, 0, 8, 0, 8); glDisable (GL_AUTO_NORMAL); glDisable (GL_MAP2_VERTEX_3); } /* int hoplotn = 1 << vispar.subdivisions; const ELEMENT_FACE * faces = MeshTopology :: GetFaces (PYRAMID); const Point3d * vertices = MeshTopology :: GetVertices (PYRAMID); Point<3> grid[33][33]; Vec<3> gridn[33][33]; glBegin (GL_TRIANGLES); for (int trig = 0; trig < 4; trig++) { Point<3> p0 = vertices[faces[trig][0]-1]; Point<3> p1 = vertices[faces[trig][1]-1]; Point<3> p2 = vertices[faces[trig][2]-1]; if (vispar.shrink < 1) { static Point<3> c(0.375, 0.375, 0.25); p0 = c + vispar.shrink * (p0 - c); p1 = c + vispar.shrink * (p1 - c); p2 = c + vispar.shrink * (p2 - c); } Vec<3> taux = p0-p2; Vec<3> tauy = p1-p2; Vec<3> gtaux, gtauy; Point<3> xl; Mat<3,3> dxdxi; for (int ix = 0; ix <= hoplotn; ix++) for (int iy = 0; iy <= hoplotn-ix; iy++) { for (int l = 0; l < 3; l++) xl(l) = (1-double(ix+iy)/hoplotn) * p2(l) + (double(ix)/hoplotn) * p0(l) + (double(iy)/hoplotn) * p1(l); curv.CalcElementTransformation (xl, i-1, grid[ix][iy], dxdxi); gtaux = dxdxi * taux; gtauy = dxdxi * tauy; gridn[ix][iy] = Cross (gtauy, gtaux).Normalize(); } for (int ix = 0; ix < hoplotn; ix++) for (int iy = 0; iy < hoplotn-ix; iy++) { glNormal3dv (gridn[ix][iy]); glVertex3dv (grid[ix][iy]); glNormal3dv (gridn[ix+1][iy]); glVertex3dv (grid[ix+1][iy]); glNormal3dv (gridn[ix][iy+1]); glVertex3dv (grid[ix][iy+1]); if (iy < hoplotn-ix-1) { glNormal3dv (gridn[ix][iy+1]); glVertex3dv (grid[ix][iy+1]); glNormal3dv (gridn[ix+1][iy]); glVertex3dv (grid[ix+1][iy]); glNormal3dv (gridn[ix+1][iy+1]); glVertex3dv (grid[ix+1][iy+1]); } } } glEnd (); glBegin (GL_QUADS); for (int quad = 4; quad < 5; quad++) { Point<3> p0 = vertices[faces[quad][0]-1]; Point<3> p1 = vertices[faces[quad][1]-1]; Point<3> p2 = vertices[faces[quad][2]-1]; Point<3> p3 = vertices[faces[quad][3]-1]; if (vispar.shrink < 1) { static Point<3> c(0.375, 0.375, 0.25); p0 = c + vispar.shrink * (p0 - c); p1 = c + vispar.shrink * (p1 - c); p2 = c + vispar.shrink * (p2 - c); p3 = c + vispar.shrink * (p3 - c); } Vec<3> taux = p1-p0; Vec<3> tauy = p3-p0; Vec<3> gtaux, gtauy; Point<3> xl, xg; Mat<3,3> dxdxi; for (int ix = 0; ix <= hoplotn; ix++) for (int iy = 0; iy <= hoplotn; iy++) { Point<3> xl; for (int l = 0; l < 3; l++) xl(l) = (1-double(ix)/hoplotn)*(1-double(iy)/hoplotn) * p0(l) + ( double(ix)/hoplotn)*(1-double(iy)/hoplotn) * p1(l) + ( double(ix)/hoplotn)*( double(iy)/hoplotn) * p2(l) + (1-double(ix)/hoplotn)*( double(iy)/hoplotn) * p3(l); curv.CalcElementTransformation (xl, i-1, grid[ix][iy], dxdxi); gtaux = dxdxi * taux; gtauy = dxdxi * tauy; gridn[ix][iy] = Cross (gtauy, gtaux).Normalize(); } for (int ix = 0; ix < hoplotn; ix++) for (int iy = 0; iy < hoplotn; iy++) { glNormal3dv (gridn[ix][iy]); glVertex3dv (grid[ix][iy]); glNormal3dv (gridn[ix+1][iy]); glVertex3dv (grid[ix+1][iy]); glNormal3dv (gridn[ix+1][iy+1]); glVertex3dv (grid[ix+1][iy+1]); glNormal3dv (gridn[ix][iy+1]); glVertex3dv (grid[ix][iy+1]); } } glEnd (); */ } else { Point3d c(0,0,0); if (vispar.shrink < 1) { for (int j = 1; j <= 5; j++) { Point3d p = mesh->Point(el.PNum(j)); c.X() += p.X() / 5; c.Y() += p.Y() / 5; c.Z() += p.Z() / 5; } } el.GetSurfaceTriangles (faces); if (el.PNum(1)) { glBegin (GL_TRIANGLES); for (int j = 1; j <= faces.Size(); j++) { Element2d & face = faces.Elem(j); Point3d lp1 = mesh->Point (el.PNum(face.PNum(1))); Point3d lp2 = mesh->Point (el.PNum(face.PNum(2))); Point3d lp3 = mesh->Point (el.PNum(face.PNum(3))); Vec3d n = Cross (Vec3d (lp1, lp2), Vec3d (lp1, lp3)); n /= (n.Length()+1e-12); n *= -1; glNormal3d (n.X(), n.Y(), n.Z()); if (vispar.shrink < 1) { lp1 = c + vispar.shrink * (lp1 - c); lp2 = c + vispar.shrink * (lp2 - c); lp3 = c + vispar.shrink * (lp3 - c); } glVertex3d (lp1.X(), lp1.Y(), lp1.Z()); glVertex3d (lp2.X(), lp2.Y(), lp2.Z()); glVertex3d (lp3.X(), lp3.Y(), lp3.Z()); } glEnd(); } } } } glEndList (); } void VisualSceneMesh :: BuildBadelList() { ; } void VisualSceneMesh :: BuildIdentifiedList() { ; } void VisualSceneMesh :: BuildDomainSurfList() { shared_ptr mesh = GetMesh(); if (domainsurflist) glDeleteLists (domainsurflist, 1); domainsurflist = glGenLists (1); glNewList (domainsurflist, GL_COMPILE); int i, j; glLineWidth (1.0f); glDisable (GL_COLOR_MATERIAL); for (i = 1; i <= mesh->GetNSE(); i++) { Element2d el = mesh->SurfaceElement (i); int drawel = 1; for (j = 1; j <= el.GetNP(); j++) { if (!el.PNum(j)) drawel = 0; } if (!drawel) continue; if (el.GetIndex() < 1 || el.GetIndex() > mesh->GetNFD()) continue; int domin = mesh->GetFaceDescriptor(el.GetIndex()).DomainIn(); int domout = mesh->GetFaceDescriptor(el.GetIndex()).DomainOut(); int fac; if (domin == vispar.drawdomainsurf) fac = 1; else if (domout == vispar.drawdomainsurf) fac = -1; else continue; GLfloat matcol[] = { 1, 0, 0, 1 }; glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, matcol); if (el.GetNP() == 3) { glBegin (GL_TRIANGLES); const Point3d & lp1 = mesh->Point (el.PNum(1)); const Point3d & lp2 = mesh->Point (el.PNum(2)); const Point3d & lp3 = mesh->Point (el.PNum(3)); Vec3d n = Cross (Vec3d (lp1, lp2), Vec3d (lp1, lp3)); n /= ( fac * (n.Length()+1e-12)); glNormal3d (n.X(), n.Y(), n.Z()); if (!vispar.colormeshsize) { glVertex3d (lp1.X(), lp1.Y(), lp1.Z()); glVertex3d (lp2.X(), lp2.Y(), lp2.Z()); glVertex3d (lp3.X(), lp3.Y(), lp3.Z()); } glEnd(); } else if (el.GetNP() == 4) { glBegin (GL_QUADS); const Point3d & lp1 = mesh->Point (el.PNum(1)); const Point3d & lp2 = mesh->Point (el.PNum(2)); const Point3d & lp3 = mesh->Point (el.PNum(4)); const Point3d & lp4 = mesh->Point (el.PNum(3)); Vec3d n = Cross (Vec3d (lp1, lp2), Vec3d (lp1, Center (lp3, lp4))); n /= (fac * (n.Length()+1e-12)); glNormal3d (n.X(), n.Y(), n.Z()); glVertex3d (lp1.X(), lp1.Y(), lp1.Z()); glVertex3d (lp2.X(), lp2.Y(), lp2.Z()); glVertex3d (lp4.X(), lp4.Y(), lp4.Z()); glVertex3d (lp3.X(), lp3.Y(), lp3.Z()); glEnd(); } else if (el.GetNP() == 6) { glBegin (GL_TRIANGLES); static int trigs[4][3] = { { 1, 6, 5 }, { 2, 4, 6 }, { 3, 5, 4 }, { 4, 5, 6 } }; for (j = 0; j < 4; j++) { const Point3d & lp1 = mesh->Point (el.PNum(trigs[j][0])); const Point3d & lp2 = mesh->Point (el.PNum(trigs[j][1])); const Point3d & lp3 = mesh->Point (el.PNum(trigs[j][2])); Vec3d n = Cross (Vec3d (lp1, lp2), Vec3d (lp1, lp3)); n /= (fac * (n.Length() + 1e-12)); glNormal3d (n.X(), n.Y(), n.Z()); glVertex3d (lp1.X(), lp1.Y(), lp1.Z()); glVertex3d (lp2.X(), lp2.Y(), lp2.Z()); glVertex3d (lp3.X(), lp3.Y(), lp3.Z()); } glEnd(); } } glEndList (); } void VisualSceneMesh :: MouseDblClick (int px, int py) { shared_ptr mesh = GetMesh(); BuildFilledList (true); MouseDblClickSelect(px,py,clipplane,backcolor,transformationmat,center,rad, filledlist,selelement,selface,seledge,selpoint,selpoint2,locpi); GLdouble /* modelview[16], */ projection[16]; GLint viewport[4]; GLdouble result[3]; glGetDoublev(GL_PROJECTION_MATRIX, &projection[0]); glGetIntegerv(GL_VIEWPORT, &viewport[0]); int hy = viewport[3]-py; GLfloat pz; // cout << "x, y = " << px << ", " << hy << endl; glReadPixels (px, hy, 1, 1, GL_DEPTH_COMPONENT, GL_FLOAT, &pz); cout << "pz = " << pz << endl; gluUnProject(px, hy, pz, transformationmat, projection, viewport, &result[0], &result[1], &result[2]); if (pz < 1.0) cout << "point : " << result[0] << ", " << result[1] << ", " << result[2] << endl; if (user_me_handler && pz < 1.0) { if (selelement != -1) user_me_handler -> DblClick (selelement-1, result[0], result[1], result[2]); } selecttimestamp = NextTimeStamp(); if(lock) { lock->UnLock(); delete lock; lock = NULL; } /* int i, hits; // select surface triangle by mouse click GLuint selbuf[10000]; glSelectBuffer (10000, selbuf); glRenderMode (GL_SELECT); GLint viewport[4]; glGetIntegerv (GL_VIEWPORT, viewport); glMatrixMode (GL_PROJECTION); glPushMatrix(); GLdouble projmat[16]; glGetDoublev (GL_PROJECTION_MATRIX, projmat); glLoadIdentity(); gluPickMatrix (px, viewport[3] - py, 1, 1, viewport); glMultMatrixd (projmat); glClearColor(backcolor, backcolor, backcolor, 1.0); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glMatrixMode (GL_MODELVIEW); glPushMatrix(); glMultMatrixf (transformationmat); // SetClippingPlane(); glInitNames(); glPushName (1); glPolygonOffset (1, 1); glEnable (GL_POLYGON_OFFSET_FILL); glDisable(GL_CLIP_PLANE0); if (vispar.clipenable) { Vec<3> n(clipplane[0], clipplane[1], clipplane[2]); double len = Abs(n); double mu = -clipplane[3] / (len*len); Point<3> p (mu * n); n /= len; Vec<3> t1 = n.GetNormal (); Vec<3> t2 = Cross (n, t1); double xi1mid = (center - p) * t1; double xi2mid = (center - p) * t2; glLoadName (0); glBegin (GL_QUADS); glVertex3dv (p + (xi1mid-rad) * t1 + (xi2mid-rad) * t2); glVertex3dv (p + (xi1mid+rad) * t1 + (xi2mid-rad) * t2); glVertex3dv (p + (xi1mid+rad) * t1 + (xi2mid+rad) * t2); glVertex3dv (p + (xi1mid-rad) * t1 + (xi2mid+rad) * t2); glEnd (); } // SetClippingPlane(); glCallList (filledlist); glDisable (GL_POLYGON_OFFSET_FILL); glPopName(); glMatrixMode (GL_PROJECTION); glPopMatrix(); glMatrixMode (GL_MODELVIEW); glPopMatrix(); glFlush(); hits = glRenderMode (GL_RENDER); // cout << "hits = " << hits << endl; int minname = 0; GLuint mindepth = 0; // find clippingplane GLuint clipdepth = 0; // GLuint(-1); for (i = 0; i < hits; i++) { int curname = selbuf[4*i+3]; if (!curname) clipdepth = selbuf[4*i+1]; } for (i = 0; i < hits; i++) { int curname = selbuf[4*i+3]; GLuint curdepth = selbuf[4*i+1]; if (curname && (curdepth > clipdepth) && (curdepth < mindepth || !minname)) { mindepth = curdepth; minname = curname; } } seledge = -1; if (minname) { const Element2d & sel = mesh->SurfaceElement(minname); cout << "select element " << minname << " on face " << sel.GetIndex() << endl; cout << "Nodes: "; for (i = 1; i <= sel.GetNP(); i++) cout << sel.PNum(i) << " "; cout << endl; selelement = minname; selface = mesh->SurfaceElement(minname).GetIndex(); locpi = (locpi % sel.GetNP()) + 1; selpoint2 = selpoint; selpoint = sel.PNum(locpi); cout << "selected point " << selpoint << ", pos = " << mesh->Point (selpoint) << endl; for (i = 1; i <= mesh->GetNSeg(); i++) { const Segment & seg = mesh->LineSegment(i); if (seg[0] == selpoint && seg[1] == selpoint2 || seg[1] == selpoint && seg[0] == selpoint2) { seledge = seg.edgenr; cout << "seledge = " << seledge << endl; } } } else { selface = -1; selelement = -1; selpoint = -1; selpoint2 = -1; } glDisable(GL_CLIP_PLANE0); selecttimestamp = NextTimeStamp(); */ } void MouseDblClickSelect (const int px, const int py, const GLdouble * clipplane, const GLdouble backcolor, const double * transformationmat, const Point3d & center, const double rad, const int displaylist, int & selelement, int & selface, int & seledge, PointIndex & selpoint, PointIndex & selpoint2, int & locpi) { auto mesh = vsmesh.GetMesh(); int i, hits; // select surface triangle by mouse click GLuint selbuf[10000]; glSelectBuffer (10000, selbuf); glRenderMode (GL_SELECT); GLint viewport[4]; glGetIntegerv (GL_VIEWPORT, viewport); glMatrixMode (GL_PROJECTION); glPushMatrix(); GLdouble projmat[16]; glGetDoublev (GL_PROJECTION_MATRIX, projmat); glLoadIdentity(); gluPickMatrix (px, viewport[3] - py, 1, 1, viewport); glMultMatrixd (projmat); glClearColor(backcolor, backcolor, backcolor, 1.0); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glMatrixMode (GL_MODELVIEW); glPushMatrix(); glMultMatrixd (transformationmat); // SetClippingPlane(); glInitNames(); glPushName (1); glPolygonOffset (1, 1); glEnable (GL_POLYGON_OFFSET_FILL); glDisable(GL_CLIP_PLANE0); if (vispar.clipping.enable) { Vec<3> n(clipplane[0], clipplane[1], clipplane[2]); double len = Abs(n); double mu = -clipplane[3] / (len*len); Point<3> p (mu * n); n /= len; Vec<3> t1 = n.GetNormal (); Vec<3> t2 = Cross (n, t1); double xi1mid = (center - p) * t1; double xi2mid = (center - p) * t2; glLoadName (0); glBegin (GL_QUADS); glVertex3dv (p + (xi1mid-rad) * t1 + (xi2mid-rad) * t2); glVertex3dv (p + (xi1mid+rad) * t1 + (xi2mid-rad) * t2); glVertex3dv (p + (xi1mid+rad) * t1 + (xi2mid+rad) * t2); glVertex3dv (p + (xi1mid-rad) * t1 + (xi2mid+rad) * t2); glEnd (); } // SetClippingPlane(); glCallList (displaylist); glDisable (GL_POLYGON_OFFSET_FILL); glPopName(); glMatrixMode (GL_PROJECTION); glPopMatrix(); glMatrixMode (GL_MODELVIEW); glPopMatrix(); glFlush(); hits = glRenderMode (GL_RENDER); //cout << "hits = " << hits << endl; int minname = 0; GLuint mindepth = 0; // find clippingplane GLuint clipdepth = 0; // GLuint(-1); for (i = 0; i < hits; i++) { int curname = selbuf[4*i+3]; if (!curname) clipdepth = selbuf[4*i+1]; } for (i = 0; i < hits; i++) { int curname = selbuf[4*i+3]; GLuint curdepth = selbuf[4*i+1]; /* cout << selbuf[4*i] << " " << selbuf[4*i+1] << " " << selbuf[4*i+2] << " " << selbuf[4*i+3] << endl; */ if (curname && (curdepth > clipdepth) && (curdepth < mindepth || !minname)) { mindepth = curdepth; minname = curname; } } seledge = -1; if (minname) { const Element2d & sel = mesh->SurfaceElement(minname); cout << "select element " << minname << " on face " << sel.GetIndex() << endl; cout << "Nodes: "; for (i = 1; i <= sel.GetNP(); i++) cout << sel.PNum(i) << " "; cout << endl; selelement = minname; selface = mesh->SurfaceElement(minname).GetIndex(); locpi = (locpi % sel.GetNP()) + 1; selpoint2 = selpoint; selpoint = sel.PNum(locpi); cout << "selected point " << selpoint << ", pos = " << mesh->Point (selpoint) << endl; for (i = 1; i <= mesh->GetNSeg(); i++) { const Segment & seg = mesh->LineSegment(i); if ( (seg[0] == selpoint && seg[1] == selpoint2) || (seg[1] == selpoint && seg[0] == selpoint2) ) { seledge = seg.edgenr; cout << "seledge = " << seledge << endl; } } } else { selface = -1; selelement = -1; selpoint = -1; selpoint2 = -1; } glDisable(GL_CLIP_PLANE0); #ifdef PARALLELGL vsmesh.Broadcast (); #endif } void VisualSceneMesh :: SetSelectedFace (int asf) { selface = asf; selecttimestamp = NextTimeStamp(); } } #ifdef NG_PYTHON #include <../general/ngpython.hpp> DLL_HEADER void ExportMeshVis(py::module &m) { using namespace netgen; vispar.drawcolorbar = true; vispar.drawnetgenlogo = true; vispar.drawcoordinatecross = true; vispar.drawfilledtrigs = true; vispar.drawdomainsurf = true; vispar.drawhexes = true; vispar.drawtets = true; vispar.drawprisms = true; vispar.drawoutline = true; py::class_> (m, "VisualSceneMesh") .def("Draw", &VisualSceneMesh::DrawScene) ; m.def("VS", FunctionPointer ([](shared_ptr mesh) { auto vs = make_shared(); // vs->SetMesh(mesh); SetGlobalMesh (mesh); return vs; })); m.def("MouseMove", FunctionPointer ([](VisualSceneMesh &vsmesh, int oldx, int oldy, int newx, int newy, char mode) { vsmesh.MouseMove(oldx, oldy, newx, newy, mode); })); m.def("SelectFace", FunctionPointer ([] (int facenr) { vsmesh.SetSelectedFace(facenr); })); m.def("GetGlobalMesh", FunctionPointer ([] () { return vsmesh.GetMesh(); })); } // BOOST_PYTHON_MODULE(libvisual) // { // ExportMeshVis(); // } #endif netgen-6.2.1804/libsrc/visualization/vsocc.cpp0000644000175000017500000004753213272137567020020 0ustar kurtkurt#ifndef NOTCL #ifdef OCCGEOMETRY #include #include #include #include #include "TopoDS_Shape.hxx" #include "TopoDS_Vertex.hxx" #include "TopExp_Explorer.hxx" #include "BRep_Tool.hxx" #include "TopoDS.hxx" #include "gp_Pnt.hxx" #include "Geom_Curve.hxx" #include "Poly_Triangulation.hxx" #include "Poly_Array1OfTriangle.hxx" #include "TColgp_Array1OfPnt2d.hxx" #include "Poly_Triangle.hxx" #include "Poly_Polygon3D.hxx" #include "Poly_PolygonOnTriangulation.hxx" #include namespace netgen { extern OCCGeometry * occgeometry; /* *********************** Draw OCC Geometry **************** */ VisualSceneOCCGeometry :: VisualSceneOCCGeometry () : VisualScene() { trilists.SetSize(0); linelists.SetSize(1); } VisualSceneOCCGeometry :: ~VisualSceneOCCGeometry () { ; } void VisualSceneOCCGeometry :: DrawScene () { if ( occgeometry->changed ) { BuildScene(); occgeometry -> changed = 0; } glClearColor(backcolor, backcolor, backcolor, 1.0); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); SetLight(); glPushMatrix(); glMultMatrixf (transformationmat); glShadeModel (GL_SMOOTH); glDisable (GL_COLOR_MATERIAL); glPolygonMode (GL_FRONT_AND_BACK, GL_FILL); glEnable (GL_BLEND); glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // glEnable (GL_LIGHTING); double shine = vispar.shininess; // double transp = vispar.transp; glMaterialf (GL_FRONT_AND_BACK, GL_SHININESS, shine); glLogicOp (GL_COPY); glEnable (GL_NORMALIZE); float mat_col[] = { 0.2f, 0.2f, 0.8f, 1.0f}; glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_col); glPolygonOffset (1, 1); glEnable (GL_POLYGON_OFFSET_FILL); // Philippose - 30/01/2009 // Added clipping planes to Geometry view SetClippingPlane(); GLfloat matcoledge[] = { 0, 0, 1, 1}; GLfloat matcolhiedge[] = { 1, 0, 0, 1}; glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, matcoledge); glLineWidth (1.0f); if (vispar.occshowedges) glCallList (linelists.Get(1)); if (vispar.occshowsurfaces) glCallList (trilists.Get(1)); glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, matcolhiedge); glLineWidth (5.0f); if (vispar.occshowedges) glCallList (linelists.Get(2)); for (int i = 1; i <= occgeometry->vmap.Extent(); i++) if (occgeometry->vvispar[i-1].IsHighlighted()) { glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, matcolhiedge); glLineWidth (5.0f); glBegin (GL_LINES); gp_Pnt p = BRep_Tool::Pnt(TopoDS::Vertex(occgeometry->vmap(i))); double d = rad/100; glVertex3f (p.X()-d, p.Y(), p.Z()); glVertex3f (p.X()+d, p.Y(), p.Z()); glVertex3f (p.X(), p.Y()-d, p.Z()); glVertex3f (p.X(), p.Y()+d, p.Z()); glVertex3f (p.X(), p.Y(), p.Z()-d); glVertex3f (p.X(), p.Y(), p.Z()+d); glEnd(); } glDisable (GL_POLYGON_OFFSET_FILL); glPopMatrix(); // DrawCoordinateCross (); // DrawNetgenLogo (); glFinish(); glDisable (GL_POLYGON_OFFSET_FILL); } /* void VisualSceneOCCGeometry :: BuildScene (int zoomall) { int i = 0, j, k; TopExp_Explorer ex, ex_edge; if (vispar.occvisproblemfaces || (occgeometry -> changed != 2)) { Box<3> bb = occgeometry -> GetBoundingBox(); center = bb.Center(); rad = bb.Diam() / 2; if (vispar.occvisproblemfaces) { for (i = 1; i <= occgeometry->fmap.Extent(); i++) if (occgeometry->facemeshstatus[i-1] == -1) { GProp_GProps system; BRepGProp::LinearProperties(occgeometry->fmap(i), system); gp_Pnt pnt = system.CentreOfMass(); center = Point<3> (pnt.X(), pnt.Y(), pnt.Z()); cout << "Setting center to mid of face " << i << " = " << center << endl; } } CalcTransformationMatrices(); } for (i = 1; i <= linelists.Size(); i++) glDeleteLists (linelists.Elem(i), 1); linelists.SetSize(0); linelists.Append (glGenLists (1)); glNewList (linelists.Last(), GL_COMPILE); i = 0; for (ex_edge.Init(occgeometry -> shape, TopAbs_EDGE); ex_edge.More(); ex_edge.Next()) { if (BRep_Tool::Degenerated(TopoDS::Edge(ex_edge.Current()))) continue; i++; TopoDS_Edge edge = TopoDS::Edge(ex_edge.Current()); Handle(Poly_PolygonOnTriangulation) aEdgePoly; Handle(Poly_Triangulation) T; TopLoc_Location aEdgeLoc; BRep_Tool::PolygonOnTriangulation(edge, aEdgePoly, T, aEdgeLoc); if(aEdgePoly.IsNull()) { cout << "cannot visualize edge " << i << endl; continue; } glBegin (GL_LINE_STRIP); int nbnodes = aEdgePoly -> NbNodes(); for (j = 1; j <= nbnodes; j++) { gp_Pnt p = (T -> Nodes())(aEdgePoly->Nodes()(j)).Transformed(aEdgeLoc); glVertex3f (p.X(), p.Y(), p.Z()); } glEnd (); } glEndList (); for (i = 1; i <= trilists.Size(); i++) glDeleteLists (trilists.Elem(i), 1); trilists.SetSize(0); trilists.Append (glGenLists (1)); glNewList (trilists.Last(), GL_COMPILE); i = 0; TopExp_Explorer exp0, exp1, exp2, exp3; int shapenr = 0; for (exp0.Init(occgeometry -> shape, TopAbs_SOLID); exp0.More(); exp0.Next()) { shapenr++; if (vispar.occshowvolumenr != 0 && vispar.occshowvolumenr != shapenr) continue; float mat_col[4]; mat_col[3] = 1; switch (shapenr) { case 1: mat_col[0] = 0.2; mat_col[1] = 0.2; mat_col[2] = 0.8; break; case 2: mat_col[0] = 0.8; mat_col[1] = 0.2; mat_col[2] = 0.8; break; case 3: mat_col[0] = 0.2; mat_col[1] = 0.8; mat_col[2] = 0.8; break; case 4: mat_col[0] = 0.8; mat_col[1] = 0.2; mat_col[2] = 0.2; break; case 5: mat_col[0] = 0.8; mat_col[1] = 0.8; mat_col[2] = 0.8; break; case 6: mat_col[0] = 0.6; mat_col[1] = 0.6; mat_col[2] = 0.6; break; case 7: mat_col[0] = 0.2; mat_col[1] = 0.8; mat_col[2] = 0.2; break; case 8: mat_col[0] = 0.8; mat_col[1] = 0.8; mat_col[2] = 0.2; break; default: // mat_col[0] = 1-(1.0/double(shapenr)); // mat_col[1] = 0.5; mat_col[0] = 0.5+double((shapenr*shapenr*shapenr*shapenr) % 10)/20.0; mat_col[1] = 0.5+double(int(shapenr*shapenr*shapenr*shapenr*sin(double(shapenr))) % 10)/20.0; mat_col[2] = 0.5+double((shapenr*shapenr*shapenr) % 10)/20.0; } glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_col); for (exp1.Init(exp0.Current(), TopAbs_SHELL); exp1.More(); exp1.Next()) for (exp2.Init(exp1.Current().Composed(exp0.Current().Orientation()), TopAbs_FACE); exp2.More(); exp2.Next()) { TopoDS_Face face = TopoDS::Face (exp2.Current().Composed(exp1.Current().Orientation())); i = occgeometry->fmap.FindIndex(face); TopLoc_Location loc; Handle(Geom_Surface) surf = BRep_Tool::Surface (face); BRepAdaptor_Surface sf(face, Standard_False); BRepLProp_SLProps prop(sf, 1, 1e-5); Handle(Poly_Triangulation) triangulation = BRep_Tool::Triangulation (face, loc); if (triangulation.IsNull()) { cout << "cannot visualize face " << i << endl; continue; } if (vispar.occvisproblemfaces) { switch (occgeometry->facemeshstatus[i-1]) { case 0: mat_col[0] = 0.2; mat_col[1] = 0.2; mat_col[2] = 0.8; break; case 1: mat_col[0] = 0.2; mat_col[1] = 0.8; mat_col[2] = 0.2; break; case -1: mat_col[0] = 0.8; mat_col[1] = 0.2; mat_col[2] = 0.2; break; } glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_col); } glBegin (GL_TRIANGLES); int ntriangles = triangulation -> NbTriangles(); for (j = 1; j <= ntriangles; j++) { Poly_Triangle triangle = (triangulation -> Triangles())(j); for (k = 1; k <= 3; k++) { gp_Pnt2d uv = (triangulation -> UVNodes())(triangle(k)); gp_Pnt pnt; gp_Vec du, dv; prop.SetParameters (uv.X(), uv.Y()); surf->D0 (uv.X(), uv.Y(), pnt); gp_Vec n; if (prop.IsNormalDefined()) n = prop.Normal(); else n = gp_Vec (0,0,0); if (face.Orientation() == TopAbs_REVERSED) n *= -1; glNormal3f (n.X(), n.Y(), n.Z()); glVertex3f (pnt.X(), pnt.Y(), pnt.Z()); } } glEnd (); } } glEndList (); } */ void VisualSceneOCCGeometry :: BuildScene (int zoomall) { if (occgeometry -> changed == OCCGEOMETRYVISUALIZATIONFULLCHANGE) { occgeometry -> BuildVisualizationMesh (vispar.occdeflection); center = occgeometry -> Center(); rad = occgeometry -> GetBoundingBox().Diam() / 2; if (vispar.occzoomtohighlightedentity) { bool hilite = false; bool hiliteonepoint = false; Bnd_Box bb; for (int i = 1; i <= occgeometry->fmap.Extent(); i++) if (occgeometry->fvispar[i-1].IsHighlighted()) { hilite = true; BRepBndLib::Add (occgeometry->fmap(i), bb); } for (int i = 1; i <= occgeometry->emap.Extent(); i++) if (occgeometry->evispar[i-1].IsHighlighted()) { hilite = true; BRepBndLib::Add (occgeometry->emap(i), bb); } for (int i = 1; i <= occgeometry->vmap.Extent(); i++) if (occgeometry->vvispar[i-1].IsHighlighted()) { hiliteonepoint = true; BRepBndLib::Add (occgeometry->vmap(i), bb); } if (hilite || hiliteonepoint) { double x1,y1,z1,x2,y2,z2; bb.Get (x1,y1,z1,x2,y2,z2); Point<3> p1 = Point<3> (x1,y1,z1); Point<3> p2 = Point<3> (x2,y2,z2); Box<3> boundingbox(p1,p2); center = boundingbox.Center(); if (hiliteonepoint) rad = occgeometry -> GetBoundingBox().Diam() / 100; else rad = boundingbox.Diam() / 2; } } CalcTransformationMatrices(); } // Clear lists for (int i = 1; i <= linelists.Size(); i++) glDeleteLists (linelists.Elem(i), 1); linelists.SetSize(0); for (int i = 1; i <= trilists.Size(); i++) glDeleteLists (trilists.Elem(i), 1); trilists.SetSize(0); // Total wireframe linelists.Append (glGenLists (1)); glNewList (linelists.Last(), GL_COMPILE); for (int i = 1; i <= occgeometry->emap.Extent(); i++) { TopoDS_Edge edge = TopoDS::Edge(occgeometry->emap(i)); if (BRep_Tool::Degenerated(edge)) continue; if (occgeometry->evispar[i-1].IsHighlighted()) continue; Handle(Poly_PolygonOnTriangulation) aEdgePoly; Handle(Poly_Triangulation) T; TopLoc_Location aEdgeLoc; BRep_Tool::PolygonOnTriangulation(edge, aEdgePoly, T, aEdgeLoc); if(aEdgePoly.IsNull()) { (*testout) << "visualizing edge " << occgeometry->emap.FindIndex (edge) << " without using the occ visualization triangulation" << endl; double s0, s1; Handle(Geom_Curve) c = BRep_Tool::Curve(edge, s0, s1); glBegin (GL_LINE_STRIP); for (int i = 0; i<=50; i++) { gp_Pnt p = c->Value (s0 + i*(s1-s0)/50.0); glVertex3f (p.X(),p.Y(),p.Z()); } glEnd (); continue; } int nbnodes = aEdgePoly -> NbNodes(); glBegin (GL_LINE_STRIP); for (int j = 1; j <= nbnodes; j++) { gp_Pnt p = (T -> Nodes())(aEdgePoly->Nodes()(j)).Transformed(aEdgeLoc); glVertex3f (p.X(), p.Y(), p.Z()); } glEnd (); } glEndList (); // Highlighted edge list linelists.Append (glGenLists (1)); glNewList (linelists.Last(), GL_COMPILE); for (int i = 1; i <= occgeometry->emap.Extent(); i++) if (occgeometry->evispar[i-1].IsHighlighted()) { TopoDS_Edge edge = TopoDS::Edge(occgeometry->emap(i)); if (BRep_Tool::Degenerated(edge)) continue; Handle(Poly_PolygonOnTriangulation) aEdgePoly; Handle(Poly_Triangulation) T; TopLoc_Location aEdgeLoc; BRep_Tool::PolygonOnTriangulation(edge, aEdgePoly, T, aEdgeLoc); if(aEdgePoly.IsNull()) { (*testout) << "visualizing edge " << occgeometry->emap.FindIndex (edge) << " without using the occ visualization triangulation" << endl; double s0, s1; Handle(Geom_Curve) c = BRep_Tool::Curve(edge, s0, s1); glBegin (GL_LINE_STRIP); for (int i = 0; i<=50; i++) { gp_Pnt p = c->Value (s0 + i*(s1-s0)/50.0); glVertex3f (p.X(),p.Y(),p.Z()); } glEnd (); continue; } int nbnodes = aEdgePoly -> NbNodes(); glBegin (GL_LINE_STRIP); for (int j = 1; j <= nbnodes; j++) { gp_Pnt p = (T -> Nodes())(aEdgePoly->Nodes()(j)).Transformed(aEdgeLoc); glVertex3f (p.X(), p.Y(), p.Z()); } glEnd (); } glEndList (); // display faces trilists.Append (glGenLists (1)); glNewList (trilists.Last(), GL_COMPILE); for (int i = 1; i <= occgeometry->fmap.Extent(); i++) { if (!occgeometry->fvispar[i-1].IsVisible()) continue; glLoadName (i); float mat_col[4]; mat_col[3] = 1; TopoDS_Face face = TopoDS::Face(occgeometry->fmap(i)); if (!occgeometry->fvispar[i-1].IsHighlighted()) { // Philippose - 30/01/2009 // OpenCascade XDE Support Quantity_Color face_colour; // Philippose - 23/02/2009 // Check to see if colours have been extracted first!! // Forum bug-fox (Jean-Yves - 23/02/2009) if(!(occgeometry->face_colours.IsNull()) && (occgeometry->face_colours->GetColor(face,XCAFDoc_ColorSurf,face_colour))) { mat_col[0] = face_colour.Red(); mat_col[1] = face_colour.Green(); mat_col[2] = face_colour.Blue(); } else { mat_col[0] = 0.0; mat_col[1] = 1.0; mat_col[2] = 0.0; } } else { mat_col[0] = 0.8; mat_col[1] = 0.2; mat_col[2] = 0.2; } glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_col); TopLoc_Location loc; Handle(Geom_Surface) surf = BRep_Tool::Surface (face); BRepAdaptor_Surface sf(face, Standard_False); BRepLProp_SLProps prop(sf, 1, 1e-5); Handle(Poly_Triangulation) triangulation = BRep_Tool::Triangulation (face, loc); if (triangulation.IsNull()) { cout << "cannot visualize face " << i << endl; occgeometry->fvispar[i-1].SetNotDrawable(); continue; } gp_Pnt2d uv; gp_Pnt pnt; gp_Vec n; glBegin (GL_TRIANGLES); int ntriangles = triangulation -> NbTriangles(); for (int j = 1; j <= ntriangles; j++) { Poly_Triangle triangle = (triangulation -> Triangles())(j); gp_Pnt p[3]; for (int k = 1; k <= 3; k++) p[k-1] = (triangulation -> Nodes())(triangle(k)).Transformed(loc); for (int k = 1; k <= 3; k++) { uv = (triangulation -> UVNodes())(triangle(k)); prop.SetParameters (uv.X(), uv.Y()); // surf->D0 (uv.X(), uv.Y(), pnt); if (prop.IsNormalDefined()) n = prop.Normal(); else { (*testout) << "Visualization of face " << i << ": Normal vector not defined" << endl; // n = gp_Vec (0,0,0); gp_Vec a(p[0],p[1]); gp_Vec b(p[0],p[2]); n = b^a; } if (face.Orientation() == TopAbs_REVERSED) n *= -1; glNormal3f (n.X(), n.Y(), n.Z()); glVertex3f (p[k-1].X(), p[k-1].Y(), p[k-1].Z()); } } glEnd (); } glEndList (); } void SelectFaceInOCCDialogTree (int facenr); void VisualSceneOCCGeometry :: MouseDblClick (int px, int py) { int hits; // select surface triangle by mouse click GLuint selbuf[10000]; glSelectBuffer (10000, selbuf); glRenderMode (GL_SELECT); GLint viewport[4]; glGetIntegerv (GL_VIEWPORT, viewport); glMatrixMode (GL_PROJECTION); glPushMatrix(); GLdouble projmat[16]; glGetDoublev (GL_PROJECTION_MATRIX, projmat); glLoadIdentity(); gluPickMatrix (px, viewport[3] - py, 1, 1, viewport); glMultMatrixd (projmat); glClearColor(backcolor, backcolor, backcolor, 1.0); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glMatrixMode (GL_MODELVIEW); glPushMatrix(); glMultMatrixf (transformationmat); glInitNames(); glPushName (1); glPolygonOffset (1, 1); glEnable (GL_POLYGON_OFFSET_FILL); glDisable(GL_CLIP_PLANE0); // Philippose - 30/01/2009 // Enable clipping planes for Selection mode in OCC Geometry if (vispar.clipenable) { Vec<3> n(clipplane[0], clipplane[1], clipplane[2]); double len = Abs(n); double mu = -clipplane[3] / (len*len); Point<3> p (mu * n); n /= len; Vec<3> t1 = n.GetNormal (); Vec<3> t2 = Cross (n, t1); double xi1mid = (center - p) * t1; double xi2mid = (center - p) * t2; glLoadName (0); glBegin (GL_QUADS); glVertex3dv (p + (xi1mid-rad) * t1 + (xi2mid-rad) * t2); glVertex3dv (p + (xi1mid+rad) * t1 + (xi2mid-rad) * t2); glVertex3dv (p + (xi1mid+rad) * t1 + (xi2mid+rad) * t2); glVertex3dv (p + (xi1mid-rad) * t1 + (xi2mid+rad) * t2); glEnd (); } glCallList (trilists.Get(1)); glDisable (GL_POLYGON_OFFSET_FILL); glPopName(); glMatrixMode (GL_PROJECTION); glPopMatrix(); glMatrixMode (GL_MODELVIEW); glPopMatrix(); glFlush(); hits = glRenderMode (GL_RENDER); int minname = 0; GLuint mindepth = 0; // find clippingplane GLuint clipdepth = 0; // GLuint(-1); for (int i = 0; i < hits; i++) { int curname = selbuf[4*i+3]; if (!curname) clipdepth = selbuf[4*i+1]; } for (int i = 0; i < hits; i++) { int curname = selbuf[4*i+3]; GLuint curdepth = selbuf[4*i+1]; if (curname && (curdepth> clipdepth) && (curdepth < mindepth || !minname)) { mindepth = curdepth; minname = curname; } } occgeometry->LowLightAll(); if (minname) { occgeometry->fvispar[minname-1].Highlight(); if (vispar.occzoomtohighlightedentity) occgeometry->changed = OCCGEOMETRYVISUALIZATIONFULLCHANGE; else occgeometry->changed = OCCGEOMETRYVISUALIZATIONHALFCHANGE; cout << "Selected face: " << minname << endl; } else { occgeometry->changed = OCCGEOMETRYVISUALIZATIONHALFCHANGE; } glDisable(GL_CLIP_PLANE0); SelectFaceInOCCDialogTree (minname); // Philippose - 30/01/2009 // Set the currently selected face in the array // for local face mesh size definition occgeometry->SetSelectedFace(minname); // selecttimestamp = NextTimeStamp(); } } #endif #endif // NOTCL netgen-6.2.1804/libsrc/general/0000755000175000017500000000000013272137567014700 5ustar kurtkurtnetgen-6.2.1804/libsrc/general/mpi_interface.cpp0000644000175000017500000000225513272137567020215 0ustar kurtkurt/**************************************************************************/ /* File: mpi_interface.cpp */ /* Author: Joachim Schoeberl */ /* Date: 04. Apr. 97 */ /**************************************************************************/ #include #include namespace netgen { #ifdef PARALLEL void MyMPI_SendCmd (const char * cmd) { int ntasks; MPI_Comm_size(MPI_COMM_WORLD, &ntasks); if(ntasks==1) return; for (int dest = 1; dest < ntasks; dest++) MPI_Send( (void*)cmd, (strlen(cmd)+1), MPI_CHAR, dest, MPI_TAG_CMD, MPI_COMM_WORLD); } string MyMPI_RecvCmd () { MPI_Status status; int flag; int size_of_msg = -1; MPI_Probe(0, MPI_TAG_CMD, MPI_COMM_WORLD, &status); MPI_Get_count(&status, MPI_CHAR, &size_of_msg); //char* buf = (char*)malloc(size_of_msg*sizeof(char)); char buf[100000]; //1MB should be enough... MPI_Recv( &buf, size_of_msg, MPI_CHAR, 0, MPI_TAG_CMD, MPI_COMM_WORLD, &status); return string(buf); } #endif } netgen-6.2.1804/libsrc/general/seti.hpp0000644000175000017500000000163113272137567016356 0ustar kurtkurt#ifndef FILE_SETI #define FILE_SETI /**************************************************************************/ /* File: seti.hh */ /* Author: Joachim Schoeberl */ /* Date: 20. Mar. 98 */ /**************************************************************************/ namespace netgen { /** Set of Integers */ class IndexSet { Array set; BitArray flags; public: IndexSet (int maxind); ~IndexSet (); /// increase range to maxind void SetMaxIndex (int maxind); int IsIn (int ind) const { return flags.Test (ind); } void Add (int ind) { if (!flags.Test(ind)) { set.Append (ind); flags.Set (ind); } } void Del (int ind); void Clear (); const Array & GetArray() { return set; } }; } #endif netgen-6.2.1804/libsrc/general/mystring.cpp0000644000175000017500000002047213272137567017265 0ustar kurtkurt //************************************************************** // // filename: mystring.cpp // // project: doctoral thesis // // author: Dipl.-Ing. Gerstmayr Johannes // // generated: 20.12.98 // last change: 20.12.98 // description: implementation for strings // remarks: // //************************************************************** // string class #include #include #include #include namespace netgen { void ReadEnclString(istream & in, string & str, const char encl) { char currchar; str = ""; in.get(currchar); while(in && (currchar == ' ' || currchar == '\t' || currchar == '\n') ) in.get(currchar); if(currchar == encl) { in.get(currchar); while(in && currchar != encl) { str += currchar; in.get(currchar); } } else { in.putback(currchar); in >> str; } } void DefaultStringErrHandler() { cerr << "Error : string operation out of range\n" << flush; } void (*MyStr::ErrHandler)() = DefaultStringErrHandler; /* MyStr::MyStr() { length = 0; str = shortstr; str[0] = 0; } */ MyStr::MyStr(const char *s) { length = unsigned(strlen(s)); if (length > SHORTLEN) str = new char[length + 1]; else str = shortstr; strcpy(str, s); } /* MyStr::MyStr(char s) { length = 1; str = shortstr; str[0] = s; str[1] = (char)0; } */ MyStr::MyStr(const MyStr& s) { length = s.length; if (length > SHORTLEN) str = new char[length + 1]; else str = shortstr; strcpy(str, s.str); } MyStr::MyStr(int i) { char buffer[32]; sprintf(buffer, "%d", i); length = unsigned(strlen(buffer)); if (length > SHORTLEN) str = new char[length + 1]; else str = shortstr; strcpy(str, buffer); } /* MyStr::MyStr(unsigned int i) { char buffer[32]; sprintf(buffer, "%d", i); length = unsigned(strlen(buffer)); if (length > SHORTLEN) str = new char[length + 1]; else str = shortstr; strcpy(str, buffer); } */ MyStr::MyStr(void * p) { char buffer[32]; sprintf(buffer, "%p", p); length = unsigned(strlen(buffer)); if (length > SHORTLEN) str = new char[length + 1]; else str = shortstr; strcpy(str, buffer); } /* MyStr::MyStr(long l) { char buffer[32]; sprintf(buffer, "%ld", l); length = unsigned(strlen(buffer)); if (length > SHORTLEN) str = new char[length + 1]; else str = shortstr; strcpy(str, buffer); } */ MyStr::MyStr(size_t l) { char buffer[32]; sprintf(buffer, "%ld", l); length = unsigned(strlen(buffer)); if (length > SHORTLEN) str = new char[length + 1]; else str = shortstr; strcpy(str, buffer); } MyStr::MyStr(double d) { char buffer[32]; //if (fabs(d) < 1E-100) {d = 0;} sprintf(buffer, "%g", d); length = unsigned(strlen(buffer)); if (length > SHORTLEN) str = new char[length + 1]; else str = shortstr; strcpy(str, buffer); } MyStr::MyStr(const Point3d& p) { char buffer[80]; //if (fabs(d) < 1E-100) {d = 0;} sprintf(buffer, "[%g, %g, %g]", p.X(), p.Y(), p.Z()); length = unsigned(strlen(buffer)); if (length > SHORTLEN) str = new char[length + 1]; else str = shortstr; strcpy(str, buffer); } MyStr::MyStr(const Vec3d& p) { char buffer[80]; //if (fabs(d) < 1E-100) {d = 0;} sprintf(buffer, "[%g, %g, %g]", p.X(), p.Y(), p.Z()); length = unsigned(strlen(buffer)); if (length > SHORTLEN) str = new char[length + 1]; else str = shortstr; strcpy(str, buffer); } MyStr::MyStr(unsigned n, int) { length = n; if (length > SHORTLEN) str = new char[length + 1]; else str = shortstr; str[n] = 0; } MyStr::MyStr(const string & st) { length = unsigned(st.length()); if (length > SHORTLEN) str = new char[length + 1]; else str = shortstr; strcpy (str, st.c_str()); } MyStr MyStr::Left(unsigned r) { if(r > length) { MyStr::ErrHandler(); MyStr s; return s; } else { MyStr tmp(r, 0); strncpy(tmp.str, str, r); return tmp; } } MyStr MyStr::Right(unsigned l) { if(l > length) { MyStr::ErrHandler(); MyStr s; return s; } else { MyStr tmp(l, 0); strncpy(tmp.str, str + length - l, l); return tmp; } } MyStr& MyStr::InsertAt(unsigned pos, const MyStr& s) { if(pos > length) { MyStr::ErrHandler(); return *this; } int newLength = length + s.length; char *tmp = new char[newLength + 1]; strncpy(tmp, str, pos); strcpy(tmp + pos, s.str); strcpy(tmp + pos + s.length, str + pos); if (length > SHORTLEN) delete [] str; length = newLength; if (length > SHORTLEN) str = tmp; else { strcpy (shortstr, tmp); delete [] tmp; str = shortstr; } return *this; } MyStr &MyStr::WriteAt(unsigned pos, const MyStr& s) { if(pos > length) { MyStr::ErrHandler(); return *this; } unsigned n = length - pos; if(s.length < n) n = s.length; strncpy(str + pos, s.str, n); return *this; } void MyStr::ConvertTextToExcel() { /* for (int i = 0; i < Length(); i++) { if ((*this)[i]==',') {(*this)[i] = ';';} else if ((*this)[i]=='.') {(*this)[i] = ',';} } */ } void MyStr::ConvertExcelToText() { /* for (int i = 0; i < Length(); i++) { if ((*this)[i]==',') {(*this)[i] = '.';} else if ((*this)[i]==';') {(*this)[i] = ',';} } */ } MyStr& MyStr::operator = (const MyStr& s) { if (length > SHORTLEN) delete [] str; length = s.length; if (length > SHORTLEN) str = new char[length + 1]; else str = shortstr; strcpy(str, s.str); return *this; } MyStr operator + (const MyStr& s1, const MyStr& s2) { MyStr tmp(s1.length + s2.length, 0); if (s1.length != 0) strcpy(tmp.str, s1.str); if (s2.length != 0) strcpy(tmp.str + s1.length, s2.str); return tmp; } void MyStr::operator += (const MyStr& s) { if (length+s.length <= SHORTLEN) { if (s.length != 0) strcpy(shortstr + length, s.str); } else { char *tmp = new char[length + s.length + 1]; if (length != 0) strcpy(tmp, str); if (s.length != 0) strcpy(tmp + length, s.str); if (length > SHORTLEN) delete [] str; length += s.length; str = tmp; } } char& MyStr::operator [] (unsigned n) { static char dummy; if(n < length) return str[n]; else { MyStr::ErrHandler(); return dummy; } } char MyStr::operator [] (unsigned n) const { static char dummy; if(n < length) return str[n]; else { MyStr::ErrHandler(); return dummy; } } MyStr MyStr::operator () (unsigned l, unsigned r) { if((l > r) || (r > length)) { MyStr::ErrHandler(); MyStr s; return s; } else { int n = r - l + 1; MyStr tmp(n, 0); strncpy(tmp.str, str + 1, n); return tmp; } } string MyStr::cpp_string(void) const { string aux(str,length); return aux; } /* istream& operator >> (istream& is, MyStr& s) { const int buflen = 1000; char buffer[buflen+1]; int end = 0; s = ""; MyStr str; while (!end) { is.get(buffer, buflen); str = MyStr(buffer); s += str; if (is.peek() == EOF) {end = 1;} } return is; } */ /* #ifdef __borland ::ifstream& operator >> (::ifstream& is, MyStr& s) // wb { // wb const int buflen = 1000; // wb char buffer[buflen+1]; // wb // wb int end = 0; // wb s = ""; // wb MyStr str; // wb // wb while (!end) // wb { // wb is.get(buffer, buflen); // wb str = MyStr(buffer); // wb s += str; // wb if (is.peek() == EOF) {end = 1;} // wb } // wb // wb return is; // wb } #endif */ } netgen-6.2.1804/libsrc/general/symbolta.hpp0000644000175000017500000000654513272137567017255 0ustar kurtkurt#ifndef FILE_SYMBOLTA #define FILE_SYMBOLTA /**************************************************************************/ /* File: symbolta.hh */ /* Author: Joachim Schoeberl */ /* Date: 01. Jun. 95 */ /**************************************************************************/ namespace netgen { /** Base class for the generic SYMBOLTABLE. An array of identifiers is maintained. */ class DLL_HEADER BASE_SYMBOLTABLE { protected: /// identifiers Array names; public: /// Constructor BASE_SYMBOLTABLE (); /// ~BASE_SYMBOLTABLE (); /// void DelNames (); /// Index of symbol name, returns 0 if not used. int Index (const char * name) const; }; /** Abstract data type Symbol Table. To a string an value of the generic type T is associated. The string is not copied into the symbol table class! */ template class SYMBOLTABLE : public BASE_SYMBOLTABLE { private: /// Associated data Array data; public: /// Creates a symboltable inline SYMBOLTABLE (); /// Returns size of symboltable inline INDEX Size() const; /// Returns reference to element, error if not used inline T & Elem (const char * name); /// Returns reference to i-th element inline T & Elem (int i) { return data.Elem(i); } /// Returns element, error if not used inline const T & Get (const char * name) const; /// Returns i-th element inline const T & Get (int i) const; /// Returns name of i-th element inline const char* GetName (int i) const; /// Associates el to the string name, overrides if name is used inline void Set (const char * name, const T & el); /// Checks whether name is used inline bool Used (const char * name) const; /// Deletes symboltable inline void DeleteAll (); inline T & operator[] (int i) { return data[i]; } inline const T & operator[] (int i) const { return data[i]; } private: /// Prevents from copying symboltable by pointer assignment SYMBOLTABLE & operator= (SYMBOLTABLE &); }; template inline SYMBOLTABLE :: SYMBOLTABLE () { ; } template inline INDEX SYMBOLTABLE :: Size() const { return data.Size(); } template inline T & SYMBOLTABLE :: Elem (const char * name) { int i = Index (name); if (i) return data.Elem (i); else return data.Elem(1); } template inline const T & SYMBOLTABLE :: Get (const char * name) const { int i; i = Index (name); if (i) return data.Get(i); else return data.Get(1); } template inline const T & SYMBOLTABLE :: Get (int i) const { return data.Get(i); } template inline const char* SYMBOLTABLE :: GetName (int i) const { return names.Get(i); } template inline void SYMBOLTABLE :: Set (const char * name, const T & el) { int i; i = Index (name); if (i) data.Set(i, el); else { data.Append (el); char * hname = new char [strlen (name) + 1]; strcpy (hname, name); names.Append (hname); } } template inline bool SYMBOLTABLE :: Used (const char * name) const { return (Index(name)) ? true : false; } template inline void SYMBOLTABLE :: DeleteAll () { DelNames(); data.DeleteAll(); } } #endif netgen-6.2.1804/libsrc/general/array.hpp0000644000175000017500000004166013272137567016536 0ustar kurtkurt#ifndef FILE_Array #define FILE_Array /**************************************************************************/ /* File: array.hpp */ /* Author: Joachim Schoeberl */ /* Date: 01. Jun. 95 */ /**************************************************************************/ namespace netgen { // template class IndirectArray; template class IndirectArray; template class ArrayRangeIterator { TSIZE ind; public: ArrayRangeIterator (TSIZE ai) : ind(ai) { ; } ArrayRangeIterator operator++ (int) { return ind++; } ArrayRangeIterator operator++ () { return ++ind; } TSIZE operator*() const { return ind; } bool operator != (ArrayRangeIterator d2) { return ind != d2.ind; } }; /// a range of integers template class T_Range { T first, next; public: T_Range (T f, T n) : first(f), next(n) {;} T Size() const { return next-first; } T operator[] (T i) const { return first+i; } bool Contains (T i) const { return ((i >= first) && (i < next)); } ArrayRangeIterator begin() const { return first; } ArrayRangeIterator end() const { return next; } }; template class FlatArray; template class ArrayIterator { FlatArray ar; TIND ind; public: ArrayIterator (FlatArray aar, TIND ai) : ar(aar), ind(ai) { ; } ArrayIterator operator++ (int) { return ArrayIterator(ar, ind++); } ArrayIterator operator++ () { return ArrayIterator(ar, ++ind); } T operator*() const { return ar[ind]; } T & operator*() { return ar[ind]; } bool operator != (ArrayIterator d2) { return ind != d2.ind; } bool operator == (ArrayIterator d2) { return ind == d2.ind; } }; /** A simple array container. Array represented by size and data-pointer. No memory allocation and deallocation, must be provided by user. Helper functions for printing. Optional range check by macro RANGE_CHECK */ template class FlatArray { protected: /// the size size_t size; /// the data T * data; public: typedef T TELEM; /// provide size and memory FlatArray (size_t asize, T * adata) : size(asize), data(adata) { ; } /// the size size_t Size() const { return size; } ArrayIterator begin() const { return ArrayIterator (*this, BASE); } ArrayIterator end() const { return ArrayIterator (*this, BASE+size); } TIND Begin() const { return TIND(BASE); } TIND End() const { return TIND(size+BASE); } T_Range Range() const { return T_Range(BASE, size+BASE); } /// Access array. BASE-based T & operator[] (TIND i) const { #ifdef DEBUG if (i-BASE < 0 || i-BASE >= size) cout << "array<" << typeid(T).name() << "> out of range, i = " << i << ", s = " << size << endl; #endif return data[i-BASE]; } template IndirectArray > operator[] (const FlatArray & ia) const { return IndirectArray > (*this, ia); } /// Access array, one-based (old fashioned) T & Elem (int i) { #ifdef DEBUG if (i < 1 || i > size) cout << "Array<" << typeid(T).name() << ">::Elem out of range, i = " << i << ", s = " << size << endl; #endif return ((T*)data)[i-1]; } /// Access array, one-based (old fashioned) const T & Get (int i) const { #ifdef DEBUG if (i < 1 || i > size) cout << "Array<" << typeid(T).name() << ">::Get out of range, i = " << i << ", s = " << size << endl; #endif return ((const T*)data)[i-1]; } /// Access array, one-based (old fashioned) void Set (int i, const T & el) { #ifdef DEBUG if (i < 1 || i > size) cout << "Array<" << typeid(T).name() << ">::Set out of range, i = " << i << ", s = " << size << endl; #endif ((T*)data)[i-1] = el; } /// access first element T & First () const { return data[0]; } /// access last element. check by macro CHECK_RANGE T & Last () const { return data[size-1]; } /// Fill array with value val FlatArray & operator= (const T & val) { for (int i = 0; i < size; i++) data[i] = val; return *this; } /// takes range starting from position start of end-start elements const FlatArray Range (TIND start, TIND end) { return FlatArray (end-start, data+start); } /// first position of element elem, returns -1 if element not contained in array TIND Pos(const T & elem) const { TIND pos = -1; for(TIND i=0; pos==-1 && i < this->size; i++) if(elem == data[i]) pos = i; return pos; } /// does the array contain element elem ? bool Contains(const T & elem) const { return ( Pos(elem) >= 0 ); } }; // print array template inline ostream & operator<< (ostream & s, const FlatArray & a) { for (TIND i = a.Begin(); i < a.End(); i++) s << i << ": " << a[i] << endl; return s; } /** Dynamic array container. Array is an automatically increasing array container. The allocated memory doubles on overflow. Either the container takes care of memory allocation and deallocation, or the user provides one block of data. */ template class Array : public FlatArray { protected: using FlatArray::size; using FlatArray::data; /// physical size of array size_t allocsize; /// memory is responsibility of container bool ownmem; public: /// Generate array of logical and physical size asize explicit Array() : FlatArray (0, NULL) { allocsize = 0; ownmem = 1; } explicit Array(size_t asize) : FlatArray (asize, new T[asize]) { allocsize = asize; ownmem = 1; } /// Generate array in user data Array(TIND asize, T* adata) : FlatArray (asize, adata) { allocsize = asize; ownmem = 0; } /// array copy explicit Array (const Array & a2) : FlatArray (a2.Size(), a2.Size() ? new T[a2.Size()] : 0) { allocsize = size; ownmem = 1; for (TIND i = BASE; i < size+BASE; i++) (*this)[i] = a2[i]; } /// array move Array (Array && a2) : FlatArray (a2.size, a2.data), allocsize(a2.allocsize), ownmem(a2.ownmem) { a2.size = 0; a2.data = nullptr; a2.allocsize = 0; a2.ownmem = false; } /// if responsible, deletes memory ~Array() { if (ownmem) delete [] data; } /// Change logical size. If necessary, do reallocation. Keeps contents. void SetSize(size_t nsize) { if (nsize > allocsize) ReSize (nsize); size = nsize; } /// Change physical size. Keeps logical size. Keeps contents. void SetAllocSize (size_t nallocsize) { if (nallocsize > allocsize) ReSize (nallocsize); } /// Add element at end of array. reallocation if necessary. void Append (const T & el) { if (size == allocsize) ReSize (size+1); data[size] = el; size++; // return size; } template void Append (FlatArray a2) { if (size+a2.Size() > allocsize) ReSize (size+a2.Size()); for (int i = 0; i < a2.Size(); i++) data[size+i] = a2[i+B2]; size += a2.Size(); } /// Delete element i (0-based). Move last element to position i. void Delete (TIND i) { #ifdef CHECK_Array_RANGE RangeCheck (i+1); #endif data[i] = std::move(data[size-1]); size--; // DeleteElement (i+1); } /// Delete element i (1-based). Move last element to position i. void DeleteElement (TIND i) { #ifdef CHECK_Array_RANGE RangeCheck (i); #endif data[i-1] = std::move(data[size-1]); size--; } /// Delete last element. void DeleteLast () { size--; } /// Deallocate memory void DeleteAll () { if (ownmem) delete [] data; data = 0; size = allocsize = 0; } /// Fill array with val Array & operator= (const T & val) { FlatArray::operator= (val); return *this; } /// array copy Array & operator= (const Array & a2) { SetSize (a2.Size()); for (TIND i (BASE); i < size+BASE; i++) (*this)[i] = a2[i]; return *this; } /// array copy Array & operator= (const FlatArray & a2) { SetSize (a2.Size()); for (TIND i = BASE; i < size+BASE; i++) (*this)[i] = a2[i]; return *this; } Array & operator= (Array && a2) { Swap (data, a2.data); Swap (size, a2.size); Swap (allocsize, a2.allocsize); Swap (ownmem, a2.ownmem); return *this; } private: /// resize array, at least to size minsize. copy contents void ReSize (size_t minsize) { size_t nsize = 2 * allocsize; if (nsize < minsize) nsize = minsize; if (data) { T * p = new T[nsize]; size_t mins = (nsize < size) ? nsize : size; // memcpy (p, data, mins * sizeof(T)); #if defined(__GNUG__) && __GNUC__ < 5 && !defined(__clang__) for (size_t i = 0; i < mins; i++) p[i] = move(data[i]); #else if (std::is_trivially_copyable::value) memcpy (p, data, sizeof(T)*mins); else for (size_t i = 0; i < mins; i++) p[i] = move(data[i]); #endif if (ownmem) delete [] data; ownmem = 1; data = p; } else { data = new T[nsize]; ownmem = 1; } allocsize = nsize; } }; template class ArrayMem : public Array { using Array::size; using Array::data; using Array::ownmem; T mem[S]; // Intel C++ calls dummy constructor // char mem[S*sizeof(T)]; // double mem[(S*sizeof(T)+7) / 8]; public: /// Generate array of logical and physical size asize explicit ArrayMem(size_t asize = 0) : Array (S, static_cast (static_cast(&mem[0]))) { size = asize; if (asize > S) { data = new T[asize]; ownmem = 1; } // SetSize (asize); } ArrayMem & operator= (const T & val) { Array::operator= (val); return *this; } /// array copy ArrayMem & operator= (const FlatArray & a2) { this->SetSize (a2.Size()); for (size_t i = 0; i < size; i++) (*this)[i] = a2[i]; return *this; } }; /* template class IndirectArray { const FlatArray & array; const FlatArray & ia; public: IndirectArray (const FlatArray & aa, const FlatArray & aia) : array(aa), ia(aia) { ; } int Size() const { return ia.Size(); } const T & operator[] (int i) const { return array[ia[i]]; } }; */ template class IndirectArray { const TA1 & array; const TA2 & ia; public: IndirectArray (const TA1 & aa, const TA2 & aia) : array(aa), ia(aia) { ; } int Size() const { return ia.Size(); } int Begin() const { return ia.Begin(); } int End() const { return ia.End(); } const typename TA1::TELEM & operator[] (int i) const { return array[ia[i]]; } }; template inline ostream & operator<< (ostream & s, const IndirectArray & ia) { for (int i = ia.Begin(); i < ia.End(); i++) s << i << ": " << ia[i] << endl; return s; } /* /// template class MoveableArray { int size; int allocsize; DynamicMem data; public: MoveableArray() { size = allocsize = 0; data.SetName ("MoveableArray"); } MoveableArray(int asize) : size(asize), allocsize(asize), data(asize) { ; } ~MoveableArray () { ; } int Size() const { return size; } void SetSize(int nsize) { if (nsize > allocsize) { data.ReAlloc (nsize); allocsize = nsize; } size = nsize; } void SetAllocSize (int nallocsize) { data.ReAlloc (nallocsize); allocsize = nallocsize; } /// T & operator[] (int i) { return ((T*)data)[i-BASE]; } /// const T & operator[] (int i) const { return ((const T*)data)[i-BASE]; } /// T & Elem (int i) { return ((T*)data)[i-1]; } /// const T & Get (int i) const { return ((const T*)data)[i-1]; } /// void Set (int i, const T & el) { ((T*)data)[i-1] = el; } /// T & Last () { return ((T*)data)[size-1]; } /// const T & Last () const { return ((const T*)data)[size-1]; } /// int Append (const T & el) { if (size == allocsize) { SetAllocSize (2*allocsize+1); } ((T*)data)[size] = el; size++; return size; } /// void Delete (int i) { DeleteElement (i+1); } /// void DeleteElement (int i) { ((T*)data)[i-1] = ((T*)data)[size-1]; size--; } /// void DeleteLast () { size--; } /// void DeleteAll () { size = allocsize = 0; data.Free(); } /// void PrintMemInfo (ostream & ost) const { ost << Size() << " elements of size " << sizeof(T) << " = " << Size() * sizeof(T) << endl; } MoveableArray & operator= (const T & el) { for (int i = 0; i < size; i++) ((T*)data)[i] = el; return *this; } MoveableArray & Copy (const MoveableArray & a2) { SetSize (a2.Size()); for (int i = 0; i < this->size; i++) data[i] = a2.data[i]; return *this; } /// array copy MoveableArray & operator= (const MoveableArray & a2) { return Copy(a2); } void SetName (const char * aname) { data.SetName(aname); } private: /// //MoveableArray & operator= (MoveableArray &); //??? /// //MoveableArray (const MoveableArray &); //??? }; template inline ostream & operator<< (ostream & ost, MoveableArray & a) { for (int i = 0; i < a.Size(); i++) ost << i << ": " << a[i] << endl; return ost; } */ /// bubble sort array template inline void BubbleSort (const FlatArray & data) { for (int i = 0; i < data.Size(); i++) for (int j = i+1; j < data.Size(); j++) if (data[i] > data[j]) { T hv = data[i]; data[i] = data[j]; data[j] = hv; } } /// bubble sort array template inline void BubbleSort (FlatArray & data, FlatArray & slave) { for (int i = 0; i < data.Size(); i++) for (int j = i+1; j < data.Size(); j++) if (data[i] > data[j]) { T hv = data[i]; data[i] = data[j]; data[j] = hv; S hvs = slave[i]; slave[i] = slave[j]; slave[j] = hvs; } } template void QuickSortRec (FlatArray & data, FlatArray & slave, int left, int right) { int i = left; int j = right; T midval = data[(left+right)/2]; do { while (data[i] < midval) i++; while (midval < data[j]) j--; if (i <= j) { Swap (data[i], data[j]); Swap (slave[i], slave[j]); i++; j--; } } while (i <= j); if (left < j) QuickSortRec (data, slave, left, j); if (i < right) QuickSortRec (data, slave, i, right); } template void QuickSort (FlatArray & data, FlatArray & slave) { if (data.Size() > 1) QuickSortRec (data, slave, 0, data.Size()-1); } template void Intersection (const FlatArray & in1, const FlatArray & in2, Array & out) { out.SetSize(0); for(int i=0; i void Intersection (const FlatArray & in1, const FlatArray & in2, const FlatArray & in3, Array & out) { out.SetSize(0); for(int i=0; i ngstd::Archive & operator & (ngstd::Archive & archive, Array & a) { if (archive.Output()) archive << a.Size(); else { size_t size; archive & size; a.SetSize (size); } /* for (auto & ai : a) archive & ai; */ archive.Do (&a[BASE], a.Size()); return archive; } } #endif netgen-6.2.1804/libsrc/general/flags.hpp0000644000175000017500000000575613272137567016522 0ustar kurtkurt#ifndef FILE_FLAGS #define FILE_FLAGS /**************************************************************************/ /* File: flags.hh */ /* Author: Joachim Schoeberl */ /* Date: 10. Oct. 96 */ /**************************************************************************/ namespace netgen { /** Flag - Table. A flag table maintains string variables, numerical variables and boolean flags. */ class Flags { /// SYMBOLTABLE strflags; /// SYMBOLTABLE numflags; /// SYMBOLTABLE defflags; /// SYMBOLTABLE*> strlistflags; /// SYMBOLTABLE*> numlistflags; public: /// DLL_HEADER Flags (); /// DLL_HEADER ~Flags (); /// Deletes all flags DLL_HEADER void DeleteFlags (); /// Sets string flag, overwrite if exists DLL_HEADER void SetFlag (const char * name, const char * val); /// Sets numerical flag, overwrite if exists DLL_HEADER void SetFlag (const char * name, double val); /// Sets boolean flag DLL_HEADER void SetFlag (const char * name); /// Sets string arary flag DLL_HEADER void SetFlag (const char * name, const Array & val); /// Sets double array flag DLL_HEADER void SetFlag (const char * name, const Array & val); /// Save flags to file DLL_HEADER void SaveFlags (const char * filename) const; /// write flags to stream DLL_HEADER void PrintFlags (ostream & ost) const; /// Load flags from file DLL_HEADER void LoadFlags (const char * filename); /// set flag of form -name=hello -val=0.5 -defined DLL_HEADER void SetCommandLineFlag (const char * st); /// Returns string flag, default value if not exists DLL_HEADER const char * GetStringFlag (const char * name, const char * def) const; /// Returns numerical flag, default value if not exists DLL_HEADER double GetNumFlag (const char * name, double def) const; /// Returns address of numerical flag, null if not exists DLL_HEADER const double * GetNumFlagPtr (const char * name) const; /// Returns address of numerical flag, null if not exists DLL_HEADER double * GetNumFlagPtr (const char * name); /// Returns boolean flag DLL_HEADER bool GetDefineFlag (const char * name) const; /// Returns string list flag, empty array if not exist DLL_HEADER const Array & GetStringListFlag (const char * name) const; /// Returns num list flag, empty array if not exist DLL_HEADER const Array & GetNumListFlag (const char * name) const; /// Test, if string flag is defined DLL_HEADER bool StringFlagDefined (const char * name) const; /// Test, if num flag is defined DLL_HEADER bool NumFlagDefined (const char * name) const; /// Test, if string list flag is defined DLL_HEADER bool StringListFlagDefined (const char * name) const; /// Test, if num list flag is defined DLL_HEADER bool NumListFlagDefined (const char * name) const; }; } #endif netgen-6.2.1804/libsrc/general/table.hpp0000644000175000017500000001403313272137567016501 0ustar kurtkurt#ifndef FILE_TABLE #define FILE_TABLE /**************************************************************************/ /* File: table.hpp */ /* Author: Joachim Schoeberl */ /* Date: 01. Jun. 95 */ /**************************************************************************/ namespace netgen { /// Base class to generic class TABLE. class BASE_TABLE { protected: /// class linestruct { public: /// int size; /// int maxsize; /// void * col; }; /// Array data; char * oneblock; public: /// BASE_TABLE (BASE_TABLE && table2) : data(move(table2.data)), oneblock(table2.oneblock) { table2.oneblock = nullptr; } BASE_TABLE (int size); /// BASE_TABLE (const FlatArray & entrysizes, int elemsize); /// ~BASE_TABLE (); BASE_TABLE & operator= (BASE_TABLE && table2) { data = move(table2.data); Swap (oneblock, table2.oneblock); return *this; } /// void SetSize (int size); /// void ChangeSize (int size); /// increment size of entry i by one, i is 0-based void IncSize (int i, int elsize) { if (data[i].size < data[i].maxsize) data[i].size++; else IncSize2 (i, elsize); } void SetEntrySize (int i, int newsize, int elsize) { if (newsize < data[i].maxsize) data[i].size = newsize; else SetEntrySize2 (i, newsize, elsize); } /// void IncSize2 (int i, int elsize); void SetEntrySize2 (int i, int newsize, int elsize); // void DecSize (int i); /// void AllocateElementsOneBlock (int elemsize); size_t AllocatedElements () const; size_t UsedElements () const; void SetElementSizesToMaxSizes (); ngstd::Archive & DoArchive (ngstd::Archive & ar, int elemsize); }; /** Abstract data type TABLE. To an integer i in the range from 1 to size a set of elements of the generic type T is associated. */ template class TABLE : public BASE_TABLE { public: /// Creates table. inline TABLE () : BASE_TABLE(0) { ; } /// Creates table of size size inline TABLE (int size) : BASE_TABLE (size) { ; } /// Creates fixed maximal element size table inline TABLE (const FlatArray & entrysizes) : BASE_TABLE (FlatArray (entrysizes.Size(), const_cast(&entrysizes[BASE])), sizeof(T)) { ; } /// Changes Size of table to size, deletes data inline void SetSize (int size) { BASE_TABLE::SetSize (size); } /// Changes Size of table to size, keep data inline void ChangeSize (int size) { BASE_TABLE::ChangeSize (size); } /// Inserts element acont into row i, BASE-based. Does not test if already used. inline void Add (int i, const T & acont) { IncSize (i-BASE, sizeof (T)); ((T*)data[i-BASE].col)[data[i-BASE].size-1] = acont; } /// Inserts element acont into row i, 1-based. Does not test if already used. inline void Add1 (int i, const T & acont) { IncSize (i-1, sizeof (T)); ((T*)data.Elem(i).col)[data.Elem(i).size-1] = acont; } /// void IncSizePrepare (int i) { data[i-BASE].maxsize++; } /// Inserts element acont into row i. BASE-based. Does not test if already used, assumes to have enough memory inline void AddSave (int i, const T & acont) { ((T*)data[i-BASE].col)[data[i-BASE].size] = acont; data[i-BASE].size++; } inline void ParallelAdd (int i, const T & acont) { auto oldval = AsAtomic (data[i-BASE].size)++; ((T*)data[i-BASE].col)[oldval] = acont; } /// Inserts element acont into row i. 1-based. Does not test if already used, assumes to have mem inline void AddSave1 (int i, const T & acont) { ((T*)data.Elem(i).col)[data.Elem(i).size] = acont; data.Elem(i).size++; } /// Inserts element acont into row i. Does not test if already used. inline void AddEmpty (int i) { IncSize (i-BASE, sizeof (T)); } /** Set the nr-th element in the i-th row to acont. Does not check for overflow. */ inline void Set (int i, int nr, const T & acont) { ((T*)data.Get(i).col)[nr-1] = acont; } /** Returns the nr-th element in the i-th row. Does not check for overflow. */ inline const T & Get (int i, int nr) const { return ((T*)data.Get(i).col)[nr-1]; } /** Returns pointer to the first element in row i. */ inline const T * GetLine (int i) const { return ((const T*)data.Get(i).col); } /// Returns size of the table. inline int Size () const { return data.Size(); } /// Returns size of the i-th row. inline int EntrySize (int i) const { return data.Get(i).size; } /* inline void DecEntrySize (int i) { DecSize(i); } */ void AllocateElementsOneBlock () { BASE_TABLE::AllocateElementsOneBlock (sizeof(T)); } inline void PrintMemInfo (ostream & ost) const { int els = AllocatedElements(); ost << "table: allocaed " << els << " a " << sizeof(T) << " Byts = " << els * sizeof(T) << " bytes in " << Size() << " bags." << " used: " << UsedElements() << endl; } /// Access entry. FlatArray operator[] (int i) const { #ifdef DEBUG if (i-BASE < 0 || i-BASE >= data.Size()) cout << "table out of range, i = " << i << ", s = " << data.Size() << endl; #endif return FlatArray (data[i-BASE].size, (T*)data[i-BASE].col); } ngstd::Archive & DoArchive (ngstd::Archive & ar) { return BASE_TABLE::DoArchive(ar, sizeof(T)); } }; template inline ngstd::Archive & operator & (ngstd::Archive & archive, TABLE & mp) { return mp.DoArchive(archive); } template inline ostream & operator<< (ostream & ost, const TABLE & table) { for (int i = BASE; i < table.Size()+BASE; i++) { ost << i << ": "; FlatArray row = table[i]; ost << "(" << row.Size() << ") "; for (int j = 0; j < row.Size(); j++) ost << row[j] << " "; ost << endl; } return ost; } } #endif netgen-6.2.1804/libsrc/general/profiler.hpp0000644000175000017500000000376313272137567017244 0ustar kurtkurt#ifndef FILE_NG_PROFILER #define FILE_NG_PROFILER /**************************************************************************/ /* File: profiler.hpp */ /* Author: Joachim Schoeberl */ /* Date: 5. Jan. 2005 */ /**************************************************************************/ #ifdef VTRACE #include "vt_user.h" #else #define VT_USER_START(n) #define VT_USER_END(n) #define VT_TRACER(n) #endif // #define USE_TSC #ifdef USE_TSC #include // for __rdtsc() CPU time step counter #endif namespace netgen { class NgProfiler { enum { SIZE = 1000 }; static long int tottimes[SIZE]; static long int starttimes[SIZE]; static long int counts[SIZE]; static string names[SIZE]; static int usedcounter[SIZE]; int total_timer; public: NgProfiler(); ~NgProfiler(); static int CreateTimer (const string & name); #ifndef USE_TSC static void StartTimer (int nr) { starttimes[nr] = clock(); counts[nr]++; // VT_USER_START (const_cast (names[nr].c_str())); VT_USER_START ( (char * const) (names[nr].c_str())); } static void StopTimer (int nr) { tottimes[nr] += clock()-starttimes[nr]; VT_USER_END (const_cast (names[nr].c_str())); } #else static void StartTimer (int nr) { starttimes[nr] = __rdtsc(); counts[nr]++; // VT_USER_START (const_cast (names[nr].c_str())); // VT_USER_START ( (char * const) (names[nr].c_str())); } static void StopTimer (int nr) { tottimes[nr] += __rdtsc()-starttimes[nr]; VT_USER_END (const_cast (names[nr].c_str())); } #endif //static void Print (ostream & ost); static void Print (FILE * prof); static void ClearTimers (); class RegionTimer { int nr; public: RegionTimer (int anr) : nr(anr) { StartTimer (nr); } ~RegionTimer () { StopTimer (nr); } }; }; } #endif netgen-6.2.1804/libsrc/general/array.cpp0000644000175000017500000000311713272137567016524 0ustar kurtkurt#ifndef FILE_NGSTD_ArrayCPP #define FILE_NGSTD_ArrayCPP // necessary for SGI ???? /**************************************************************************/ /* File: array.cpp */ /* Author: Joachim Schoeberl */ /* Date: 01. Jun. 95 */ /**************************************************************************/ /* Abstract data type Array */ #include #include #include namespace netgen { //using namespace netgen; #ifdef NONE void BASE_Array :: ReSize (int minsize, int elementsize) { cout << "resize, minsize = " << minsize << endl; if (inc == -1) throw Exception ("Try to resize fixed size array"); void * p; int nsize = (inc) ? allocsize + inc : 2 * allocsize; if (nsize < minsize) nsize = minsize; if (data) { p = new char [nsize * elementsize]; int mins = (nsize < actsize) ? nsize : actsize; memcpy (p, data, mins * elementsize); delete [] static_cast (data); data = p; } else { data = new char[nsize * elementsize]; } allocsize = nsize; cout << "resize done" << endl; } void BASE_Array :: RangeCheck (int i) const { if (i < 0 || i >= actsize) throw ArrayRangeException (); } void BASE_Array :: CheckNonEmpty () const { if (!actsize) { throw Exception ("Array should not be empty"); // cerr << "Array souldn't be empty"; } } #endif } #endif netgen-6.2.1804/libsrc/general/autodiff.hpp0000644000175000017500000001714013272137567017215 0ustar kurtkurt#ifndef FILE_AUTODIFF #define FILE_AUTODIFF /**************************************************************************/ /* File: autodiff.hpp */ /* Author: Joachim Schoeberl */ /* Date: 24. Oct. 02 */ /**************************************************************************/ // Automatic differentiation datatype /** Datatype for automatic differentiation. Contains function value and D derivatives. Algebraic operations are overloaded by using product-rule etc. etc. **/ template class AutoDiff { SCAL val; SCAL dval[D]; public: typedef AutoDiff TELEM; typedef SCAL TSCAL; /// elements are undefined AutoDiff () throw() { }; // { val = 0; for (int i = 0; i < D; i++) dval[i] = 0; } // ! /// copy constructor AutoDiff (const AutoDiff & ad2) throw() { val = ad2.val; for (int i = 0; i < D; i++) dval[i] = ad2.dval[i]; } /// initial object with constant value AutoDiff (SCAL aval) throw() { val = aval; for (int i = 0; i < D; i++) dval[i] = 0; } /// init object with (val, e_diffindex) AutoDiff (SCAL aval, int diffindex) throw() { val = aval; for (int i = 0; i < D; i++) dval[i] = 0; dval[diffindex] = 1; } /// assign constant value AutoDiff & operator= (SCAL aval) throw() { val = aval; for (int i = 0; i < D; i++) dval[i] = 0; return *this; } /// returns value SCAL Value() const throw() { return val; } /// returns partial derivative SCAL DValue (int i) const throw() { return dval[i]; } /// access value SCAL & Value() throw() { return val; } /// accesses partial derivative SCAL & DValue (int i) throw() { return dval[i]; } /// AutoDiff & operator+= (const AutoDiff & y) throw() { val += y.val; for (int i = 0; i < D; i++) dval[i] += y.dval[i]; return *this; } /// AutoDiff & operator-= (const AutoDiff & y) throw() { val -= y.val; for (int i = 0; i < D; i++) dval[i] -= y.dval[i]; return *this; } /// AutoDiff & operator*= (const AutoDiff & y) throw() { for (int i = 0; i < D; i++) { // dval[i] *= y.val; // dval[i] += val * y.dval[i]; dval[i] = dval[i] * y.val + val * y.dval[i]; } val *= y.val; return *this; } /// AutoDiff & operator*= (const SCAL & y) throw() { val *= y; for (int i = 0; i < D; i++) dval[i] *= y; return *this; } /// AutoDiff & operator/= (const SCAL & y) throw() { SCAL iy = 1.0 / y; val *= iy; for (int i = 0; i < D; i++) dval[i] *= iy; return *this; } /// bool operator== (SCAL val2) throw() { return val == val2; } /// bool operator!= (SCAL val2) throw() { return val != val2; } /// bool operator< (SCAL val2) throw() { return val < val2; } /// bool operator> (SCAL val2) throw() { return val > val2; } }; //@{ AutoDiff helper functions. /// prints AutoDiff template inline ostream & operator<< (ostream & ost, const AutoDiff & x) { ost << x.Value() << ", D = "; for (int i = 0; i < D; i++) ost << x.DValue(i) << " "; return ost; } /// AutoDiff plus AutoDiff template inline AutoDiff operator+ (const AutoDiff & x, const AutoDiff & y) throw() { AutoDiff res; res.Value () = x.Value()+y.Value(); // AutoDiff res(x.Value()+y.Value()); for (int i = 0; i < D; i++) res.DValue(i) = x.DValue(i) + y.DValue(i); return res; } /// AutoDiff minus AutoDiff template inline AutoDiff operator- (const AutoDiff & x, const AutoDiff & y) throw() { AutoDiff res; res.Value() = x.Value()-y.Value(); // AutoDiff res (x.Value()-y.Value()); for (int i = 0; i < D; i++) res.DValue(i) = x.DValue(i) - y.DValue(i); return res; } /// double plus AutoDiff template inline AutoDiff operator+ (double x, const AutoDiff & y) throw() { AutoDiff res; res.Value() = x+y.Value(); for (int i = 0; i < D; i++) res.DValue(i) = y.DValue(i); return res; } /// AutoDiff plus double template inline AutoDiff operator+ (const AutoDiff & y, double x) throw() { AutoDiff res; res.Value() = x+y.Value(); for (int i = 0; i < D; i++) res.DValue(i) = y.DValue(i); return res; } /// minus AutoDiff template inline AutoDiff operator- (const AutoDiff & x) throw() { AutoDiff res; res.Value() = -x.Value(); for (int i = 0; i < D; i++) res.DValue(i) = -x.DValue(i); return res; } /// AutoDiff minus double template inline AutoDiff operator- (const AutoDiff & x, double y) throw() { AutoDiff res; res.Value() = x.Value()-y; for (int i = 0; i < D; i++) res.DValue(i) = x.DValue(i); return res; } /// template inline AutoDiff operator- (double x, const AutoDiff & y) throw() { AutoDiff res; res.Value() = x-y.Value(); for (int i = 0; i < D; i++) res.DValue(i) = -y.DValue(i); return res; } /// double times AutoDiff template inline AutoDiff operator* (double x, const AutoDiff & y) throw() { AutoDiff res; res.Value() = x*y.Value(); for (int i = 0; i < D; i++) res.DValue(i) = x*y.DValue(i); return res; } /// AutoDiff times double template inline AutoDiff operator* (const AutoDiff & y, double x) throw() { AutoDiff res; res.Value() = x*y.Value(); for (int i = 0; i < D; i++) res.DValue(i) = x*y.DValue(i); return res; } /// AutoDiff times AutoDiff template inline AutoDiff operator* (const AutoDiff & x, const AutoDiff & y) throw() { AutoDiff res; SCAL hx = x.Value(); SCAL hy = y.Value(); res.Value() = hx*hy; for (int i = 0; i < D; i++) res.DValue(i) = hx*y.DValue(i) + hy*x.DValue(i); return res; } /// AutoDiff times AutoDiff template inline AutoDiff sqr (const AutoDiff & x) throw() { AutoDiff res; SCAL hx = x.Value(); res.Value() = hx*hx; hx *= 2; for (int i = 0; i < D; i++) res.DValue(i) = hx*x.DValue(i); return res; } /// Inverse of AutoDiff template inline AutoDiff Inv (const AutoDiff & x) { AutoDiff res(1.0 / x.Value()); for (int i = 0; i < D; i++) res.DValue(i) = -x.DValue(i) / (x.Value() * x.Value()); return res; } /// AutoDiff div AutoDiff template inline AutoDiff operator/ (const AutoDiff & x, const AutoDiff & y) { return x * Inv (y); } /// AutoDiff div double template inline AutoDiff operator/ (const AutoDiff & x, double y) { return (1/y) * x; } /// double div AutoDiff template inline AutoDiff operator/ (double x, const AutoDiff & y) { return x * Inv(y); } template inline AutoDiff fabs (const AutoDiff & x) { double abs = fabs (x.Value()); AutoDiff res( abs ); if (abs != 0.0) for (int i = 0; i < D; i++) res.DValue(i) = x.DValue(i) / abs; else for (int i = 0; i < D; i++) res.DValue(i) = 0.0; return res; } //@} #endif netgen-6.2.1804/libsrc/general/seti.cpp0000644000175000017500000000174313272137567016355 0ustar kurtkurt#include #include namespace netgen { //using namespace netgen; IndexSet :: IndexSet (int maxind) { SetMaxIndex (maxind); } IndexSet :: ~IndexSet () { Clear(); } void IndexSet :: SetMaxIndex (int maxind) { if (maxind > flags.Size()) { flags.SetSize (2 * maxind); flags.Clear(); } } /* int IndexSet :: IsIn (int ind) const { return flags.Test (ind); } */ /* void IndexSet :: Add (int ind) { if (ind > flags.Size()) { cerr << "out of range" << endl; exit (1); } if (!flags.Test(ind)) { set.Append (ind); flags.Set (ind); } } */ void IndexSet :: Del (int ind) { for (int i = 1; i <= set.Size(); i++) if (set.Get(i) == ind) { set.DeleteElement (ind); break; } flags.Clear (ind); } void IndexSet :: Clear () { for (int i = 1; i <= set.Size(); i++) flags.Clear (set.Get(i)); set.SetSize (0); } } netgen-6.2.1804/libsrc/general/parthreads.hpp0000644000175000017500000000534013272137567017550 0ustar kurtkurt#ifndef FILE_PARTHREADS #define FILE_PARTHREADS /**************************************************************************/ /* File: parthreads.hh */ /* Author: Joachim Schoeberl */ /* Date: 22. Nov. 2000 */ /**************************************************************************/ /* Parallel thread, Mutex, */ #include namespace netgen { #ifdef NO_PARALLEL_THREADS class NgMutex { }; class NgLock { public: NgLock (NgMutex & mut, bool lock = 0) { ; } void Lock () { ; } void UnLock () { ; } }; #else typedef std::mutex NgMutex; class NgLock { NgMutex & mut; bool locked; public: NgLock (NgMutex & ngmut, bool lock = false) : mut (ngmut) { if (lock) mut.lock(); locked = lock; }; ~NgLock() { if (locked) mut.unlock(); } void Lock () { mut.lock(); locked = true; } void UnLock () { mut.unlock(); locked = false; } /* int TryLock () { return mut.try_lock(); } */ }; #endif // Simple ParallelFor function to replace OpenMP template void ParallelFor( int first, int next, const TFunc & f ) { int nthreads = thread::hardware_concurrency(); thread * threads = new thread[nthreads]; for (int i=0; i inline atomic & AsAtomic (T & d) { return reinterpret_cast&> (d); } typedef void (*TaskManager)(std::function); typedef void (*Tracer)(string, bool); // false .. start, true .. stop inline void DummyTaskManager (std::function func) { func(0,2); func(1,2); } inline void DummyTracer (string, bool) { ; } template inline void ParallelFor (TaskManager tm, size_t n, FUNC func) { (*tm) ([n,func] (size_t nr, size_t nums) { size_t begin = nr*n / nums; size_t end = (nr+1)*n / nums; for (size_t i = begin; i < end; i++) func(i); }); } template inline void ParallelForRange (TaskManager tm, size_t n, FUNC func) { (*tm) ([n,func] (size_t nr, size_t nums) { size_t begin = nr*n / nums; size_t end = (nr+1)*n / nums; func(begin, end); }); } } #endif netgen-6.2.1804/libsrc/general/sort.hpp0000644000175000017500000000200413272137567016374 0ustar kurtkurt#ifndef FILE_SORT #define FILE_SORT /**************************************************************************/ /* File: sort.hh */ /* Author: Joachim Schoeberl */ /* Date: 07. Jan. 00 */ /**************************************************************************/ namespace netgen { // order(i) is sorted index of element i extern void Sort (const Array & values, Array & order); extern void QuickSort (const Array & values, Array & order); template inline void BubbleSort (int size, T * data) { T hv; for (int i = 0; i < size; i++) for (int j = i+1; j < size; j++) if (data[i] > data[j]) { hv = data[i]; data[i] = data[j]; data[j] = hv; } } template inline void BubbleSort (Array & data) { if(data.Size() > 0) BubbleSort (data.Size(), &data[data.Begin()]); } } #endif netgen-6.2.1804/libsrc/general/parthreads.cpp0000644000175000017500000000132513272137567017542 0ustar kurtkurt/**************************************************************************/ /* File: parthreads.cpp */ /* Author: Joachim Schoeberl */ /* Date: 01. Jun. 95 */ /**************************************************************************/ #include #include /* namespace netgen { using namespace netgen; #ifdef WIN32 NgLock :: NgLock (NgMutex & mut) : sl(&mut.cs) { ; } void NgLock :: Lock () { sl.Lock(); } void NgLock :: UnLock () { sl.Unlock(); } #else #endif } */ netgen-6.2.1804/libsrc/general/ngpython.hpp0000644000175000017500000000263213272137567017262 0ustar kurtkurt#ifdef NG_PYTHON #include #include namespace py = pybind11; #include #include namespace PYBIND11_NAMESPACE { template bool CheckCast( py::handle obj ) { try{ obj.cast(); return true; } catch (py::cast_error &e) { return false; } } template struct extract { py::handle obj; extract( py::handle aobj ) : obj(aobj) {} bool check() { return CheckCast(obj); } T operator()() { return obj.cast(); } }; } struct NGDummyArgument {}; inline void NOOP_Deleter(void *) { ; } namespace netgen { ////////////////////////////////////////////////////////////////////// // Lambda to function pointer conversion template struct function_traits : public function_traits {}; template struct function_traits { typedef ReturnType (*pointer)(Args...); typedef ReturnType return_type; }; template typename function_traits::pointer FunctionPointer (const Function& lambda) { return static_cast::pointer>(lambda); } template inline std::string ToString (const T& t) { std::stringstream ss; ss << t; return ss.str(); } } #endif netgen-6.2.1804/libsrc/general/profiler.cpp0000644000175000017500000000575713272137567017244 0ustar kurtkurt/**************************************************************************/ /* File: profiler.cpp */ /* Author: Joachim Schoeberl */ /* Date: 19. Apr. 2002 */ /**************************************************************************/ #include namespace netgen { //using namespace netgen; long int NgProfiler::tottimes[SIZE]; long int NgProfiler::starttimes[SIZE]; long int NgProfiler::counts[SIZE]; string NgProfiler::names[SIZE]; int NgProfiler::usedcounter[SIZE]; NgProfiler :: NgProfiler() { for (int i = 0; i < SIZE; i++) { tottimes[i] = 0; usedcounter[i] = 0; } total_timer = CreateTimer ("total CPU time"); StartTimer (total_timer); } NgProfiler :: ~NgProfiler() { #ifndef PARALLEL StopTimer (total_timer); #endif //ofstream prof; //prof.open("ng.prof"); // ofstream-constructor may be called after STL-stuff is destructed, // which leads to an "order of destruction"-problem, // thus we use the C-variant: if (getenv ("NGPROFILE")) { char filename[100]; #ifdef PARALLEL sprintf (filename, "netgen.prof.%d", id); #else sprintf (filename, "netgen.prof"); #endif if (id == 0) printf ("write profile to file netgen.prof\n"); FILE *prof = fopen(filename,"w"); Print (prof); fclose(prof); } } // void NgProfiler :: Print (ostream & prof) // { // for (int i = 0; i < SIZE; i++) // if (counts[i] != 0 || usedcounter[i] != 0) // { // prof.setf (ios::fixed, ios::floatfield); // prof.setf (ios::showpoint); // prof // << "job " << setw(3) << i // << "calls " << setw(8) << counts[i] // << ", time " << setprecision(2) << setw(6) << double(tottimes[i]) / CLOCKS_PER_SEC << " sec"; // if (usedcounter[i]) // prof << " " << names[i]; // else // prof << " " << i; // prof << endl; // } // } void NgProfiler :: Print (FILE * prof) { for (int i = 0; i < SIZE; i++) if (counts[i] != 0 || usedcounter[i] != 0) { //fprintf(prof,"job %3i calls %8i, time %6.2f sec",i,counts[i],double(tottimes[i]) / CLOCKS_PER_SEC); #ifndef USE_TSC fprintf(prof,"calls %8li, time %6.2f sec",counts[i],double(tottimes[i]) / CLOCKS_PER_SEC); #else fprintf(prof,"calls %8li, time %6.2f sec",counts[i],double(tottimes[i]) / 2.7e9); #endif if(usedcounter[i]) fprintf(prof," %s",names[i].c_str()); else fprintf(prof," %i",i); fprintf(prof,"\n"); } } int NgProfiler :: CreateTimer (const string & name) { for (int i = SIZE-1; i > 0; i--) if(names[i] == name) return i; for (int i = SIZE-1; i > 0; i--) if (!usedcounter[i]) { usedcounter[i] = 1; names[i] = name; return i; } return -1; } void NgProfiler :: ClearTimers () { for (int i = 0; i < SIZE; i++) { tottimes[i] = 0; counts[i] = 0; } } NgProfiler prof; } netgen-6.2.1804/libsrc/general/mpi_interface.hpp0000644000175000017500000002127013272137567020220 0ustar kurtkurt#ifndef FILE_PARALLEL #define FILE_PARALLEL #ifdef VTRACE #include "vt_user.h" #else #define VT_USER_START(n) #define VT_USER_END(n) #define VT_TRACER(n) #endif namespace netgen { extern DLL_HEADER int id, ntasks; #ifdef PARALLEL enum { MPI_TAG_CMD = 110 }; enum { MPI_TAG_MESH = 210 }; enum { MPI_TAG_VIS = 310 }; extern MPI_Comm mesh_comm; template MPI_Datatype MyGetMPIType ( ) { cerr << "ERROR in GetMPIType() -- no type found" << endl;return 0; } template <> inline MPI_Datatype MyGetMPIType ( ) { return MPI_INT; } template <> inline MPI_Datatype MyGetMPIType ( ) { return MPI_DOUBLE; } inline void MyMPI_Send (int i, int dest, int tag) { int hi = i; MPI_Send( &hi, 1, MPI_INT, dest, tag, MPI_COMM_WORLD); } inline void MyMPI_Recv (int & i, int src, int tag) { MPI_Status status; MPI_Recv( &i, 1, MPI_INT, src, tag, MPI_COMM_WORLD, &status); } inline void MyMPI_Send (const string & s, int dest, int tag) { MPI_Send( const_cast (s.c_str()), s.length(), MPI_CHAR, dest, tag, MPI_COMM_WORLD); } inline void MyMPI_Recv (string & s, int src, int tag) { MPI_Status status; int len; MPI_Probe (src, tag, MPI_COMM_WORLD, &status); MPI_Get_count (&status, MPI_CHAR, &len); s.assign (len, ' '); MPI_Recv( &s[0], len, MPI_CHAR, src, tag, MPI_COMM_WORLD, &status); } template inline void MyMPI_Send (FlatArray s, int dest, int tag) { MPI_Send( &s.First(), s.Size(), MyGetMPIType(), dest, tag, MPI_COMM_WORLD); } template inline void MyMPI_Recv ( FlatArray s, int src, int tag) { MPI_Status status; MPI_Recv( &s.First(), s.Size(), MyGetMPIType(), src, tag, MPI_COMM_WORLD, &status); } template inline void MyMPI_Recv ( Array & s, int src, int tag) { MPI_Status status; int len; MPI_Probe (src, tag, MPI_COMM_WORLD, &status); MPI_Get_count (&status, MyGetMPIType(), &len); s.SetSize (len); MPI_Recv( &s.First(), len, MyGetMPIType(), src, tag, MPI_COMM_WORLD, &status); } template inline int MyMPI_Recv ( Array & s, int tag) { MPI_Status status; int len; MPI_Probe (MPI_ANY_SOURCE, tag, MPI_COMM_WORLD, &status); int src = status.MPI_SOURCE; MPI_Get_count (&status, MyGetMPIType(), &len); s.SetSize (len); MPI_Recv( &s.First(), len, MyGetMPIType(), src, tag, MPI_COMM_WORLD, &status); return src; } /* template inline void MyMPI_ISend (FlatArray s, int dest, int tag, MPI_Request & request) { MPI_Isend( &s.First(), s.Size(), MyGetMPIType(), dest, tag, MPI_COMM_WORLD, & request); } template inline void MyMPI_IRecv (FlatArray s, int dest, int tag, MPI_Request & request) { MPI_Irecv( &s.First(), s.Size(), MyGetMPIType(), dest, tag, MPI_COMM_WORLD, & request); } */ template inline MPI_Request MyMPI_ISend (FlatArray s, int dest, int tag, MPI_Comm comm = MPI_COMM_WORLD) { MPI_Request request; MPI_Isend( &s.First(), s.Size(), MyGetMPIType(), dest, tag, comm, &request); return request; } template inline MPI_Request MyMPI_IRecv (FlatArray s, int dest, int tag, MPI_Comm comm = MPI_COMM_WORLD) { MPI_Request request; MPI_Irecv( &s.First(), s.Size(), MyGetMPIType(), dest, tag, comm, &request); return request; } /* template inline void MyMPI_ISend (FlatArray s, int dest, int tag) { MPI_Request request; MPI_Isend( &s.First(), s.Size(), MyGetMPIType(), dest, tag, MPI_COMM_WORLD, &request); MPI_Request_free (&request); } template inline void MyMPI_IRecv (FlatArray s, int dest, int tag) { MPI_Request request; MPI_Irecv( &s.First(), s.Size(), MyGetMPIType(), dest, tag, MPI_COMM_WORLD, &request); MPI_Request_free (&request); } */ /* send a table entry to each of the processes in the group ... receive-table entries will be set */ /* template inline void MyMPI_ExchangeTable (TABLE & send_data, TABLE & recv_data, int tag, MPI_Comm comm = MPI_COMM_WORLD) { int ntasks, rank; MPI_Comm_size(comm, &ntasks); MPI_Comm_rank(comm, &rank); Array requests; for (int dest = 0; dest < ntasks; dest++) if (dest != rank) requests.Append (MyMPI_ISend (send_data[dest], dest, tag, comm)); for (int i = 0; i < ntasks-1; i++) { MPI_Status status; MPI_Probe (MPI_ANY_SOURCE, tag, comm, &status); int size, src = status.MPI_SOURCE; MPI_Get_count (&status, MPI_INT, &size); recv_data.SetEntrySize (src, size, sizeof(T)); requests.Append (MyMPI_IRecv (recv_data[src], src, tag, comm)); } MPI_Barrier (comm); MPI_Waitall (requests.Size(), &requests[0], MPI_STATUS_IGNORE); } */ template inline void MyMPI_ExchangeTable (TABLE & send_data, TABLE & recv_data, int tag, MPI_Comm comm = MPI_COMM_WORLD) { int ntasks, rank; MPI_Comm_size(comm, &ntasks); MPI_Comm_rank(comm, &rank); Array send_sizes(ntasks); Array recv_sizes(ntasks); for (int i = 0; i < ntasks; i++) send_sizes[i] = send_data[i].Size(); MPI_Alltoall (&send_sizes[0], 1, MPI_INT, &recv_sizes[0], 1, MPI_INT, comm); // in-place is buggy ! // MPI_Alltoall (MPI_IN_PLACE, 1, MPI_INT, // &recv_sizes[0], 1, MPI_INT, comm); for (int i = 0; i < ntasks; i++) recv_data.SetEntrySize (i, recv_sizes[i], sizeof(T)); Array requests; for (int dest = 0; dest < ntasks; dest++) if (dest != rank && send_data[dest].Size()) requests.Append (MyMPI_ISend (send_data[dest], dest, tag, comm)); for (int dest = 0; dest < ntasks; dest++) if (dest != rank && recv_data[dest].Size()) requests.Append (MyMPI_IRecv (recv_data[dest], dest, tag, comm)); // MPI_Barrier (comm); MPI_Waitall (requests.Size(), &requests[0], MPI_STATUS_IGNORE); } extern void MyMPI_SendCmd (const char * cmd); extern string MyMPI_RecvCmd (); template inline void MyMPI_Bcast (T & s, MPI_Comm comm = MPI_COMM_WORLD) { MPI_Bcast (&s, 1, MyGetMPIType(), 0, comm); } template inline void MyMPI_Bcast (Array & s, MPI_Comm comm = MPI_COMM_WORLD) { int size = s.Size(); MyMPI_Bcast (size, comm); if (id != 0) s.SetSize (size); MPI_Bcast (&s[0], size, MyGetMPIType(), 0, comm); } template inline void MyMPI_Bcast (Array & s, int root, MPI_Comm comm = MPI_COMM_WORLD) { int id; MPI_Comm_rank(comm, &id); int size = s.Size(); MPI_Bcast (&size, 1, MPI_INT, root, comm); if (id != root) s.SetSize (size); if ( !size ) return; MPI_Bcast (&s[0], size, MyGetMPIType(), root, comm); } template inline void MyMPI_Allgather (const T & send, FlatArray recv, MPI_Comm comm) { MPI_Allgather( const_cast (&send), 1, MyGetMPIType(), &recv[0], 1, MyGetMPIType(), comm); } template inline void MyMPI_Alltoall (FlatArray send, FlatArray recv, MPI_Comm comm) { MPI_Alltoall( &send[0], 1, MyGetMPIType(), &recv[0], 1, MyGetMPIType(), comm); } // template // inline void MyMPI_Alltoall_Block (FlatArray send, FlatArray recv, int blocklen, MPI_Comm comm) // { // MPI_Alltoall( &send[0], blocklen, MyGetMPIType(), &recv[0], blocklen, MyGetMPIType(), comm); // } /* inline void MyMPI_Send ( int *& s, int len, int dest, int tag) { int hlen = len; MPI_Send( &hlen, 1, MPI_INT, dest, tag, MPI_COMM_WORLD); MPI_Send( s, len, MPI_INT, dest, tag, MPI_COMM_WORLD); } inline void MyMPI_Recv ( int *& s, int & len, int src, int tag) { MPI_Status status; MPI_Recv( &len, 1, MPI_INT, src, tag, MPI_COMM_WORLD, &status); if ( s ) delete [] s; s = new int [len]; MPI_Recv( s, len, MPI_INT, src, tag, MPI_COMM_WORLD, &status); } inline void MyMPI_Send ( double * s, int len, int dest, int tag) { MPI_Send( &len, 1, MPI_INT, dest, tag, MPI_COMM_WORLD); MPI_Send( s, len, MPI_DOUBLE, dest, tag, MPI_COMM_WORLD); } inline void MyMPI_Recv ( double *& s, int & len, int src, int tag) { MPI_Status status; MPI_Recv( &len, 1, MPI_INT, src, tag, MPI_COMM_WORLD, &status); if ( s ) delete [] s; s = new double [len]; MPI_Recv( s, len, MPI_DOUBLE, src, tag, MPI_COMM_WORLD, &status); } */ #endif // PARALLEL } #endif netgen-6.2.1804/libsrc/general/bitarray.hpp0000644000175000017500000000732413272137567017234 0ustar kurtkurt#ifndef FILE_BitArray #define FILE_BitArray /**************************************************************************/ /* File: bitarray.hpp */ /* Author: Joachim Schoeberl */ /* Date: 01. Jun. 95 */ /**************************************************************************/ #include namespace netgen { /** data type BitArray BitArray is a compressed array of Boolean information. By Set and Clear the whole array or one bit can be set or reset, respectively. Test returns the state of the occurring bit. No range checking is done. index ranges from 0 to size-1 */ class BitArray { INDEX size; unsigned char * data; public: BitArray (); /// BitArray (INDEX asize); /// ~BitArray (); /// void SetSize (INDEX asize); /// INDEX Size () const { return size; } /// void Set (); /// void Set (INDEX i) { data[Addr(i)] |= Mask(i); } void Clear (); void Clear (INDEX i) { data[Addr(i)] &= ~Mask(i); } bool Test (INDEX i) const { return (data[i / CHAR_BIT] & (char(1) << (i % CHAR_BIT) ) ) ? true : false; } /// void Invert (); /// void And (const BitArray & ba2); /// void Or (const BitArray & ba2); private: /// inline unsigned char Mask (INDEX i) const { return char(1) << (i % CHAR_BIT); } /// inline INDEX Addr (INDEX i) const { return (i / CHAR_BIT); } /// BitArray & operator= (BitArray &); /// BitArray (const BitArray &); }; // print bitarray inline ostream & operator<< (ostream & s, const BitArray & a) { for (int i = 1; i <= a.Size(); i++) { s << int (a.Test(i)); if (i % 40 == 0) s << "\n"; } if (a.Size() % 40 != 0) s << "\n"; return s; } /* inline INDEX BitArray :: Size () const { return size; } inline unsigned char BitArray :: Mask (INDEX i) const { return char(1) << (i % CHAR_BIT); } inline INDEX BitArray :: Addr (INDEX i) const { return (i / CHAR_BIT); } inline void BitArray :: Set (INDEX i) { data[Addr(i)] |= Mask(i); } inline void BitArray :: Clear (INDEX i) { data[Addr(i)] &= ~Mask(i); } inline int BitArray :: Test (INDEX i) const { return (data[i / CHAR_BIT] & (char(1) << (i % CHAR_BIT) ) ) ? 1 : 0; } */ /** data type BitArrayChar BitArray is an array of Boolean information. By Set and Clear the whole array or one bit can be set or reset, respectively. Test returns the state of the occurring bit. No range checking is done. */ template class BitArrayChar { /// Array data; public: /// BitArrayChar () { ; } /// BitArrayChar (int asize) : data(asize) { ; } /// ~BitArrayChar () { ; } /// void SetSize (int asize) { data.SetSize(asize); } /// inline int Size () const { return data.Size(); } /// void Set (); /// inline void Set (int i) { data[i] = 1; } /// void Clear (); /// inline void Clear (int i) { data[i] = 0; } /// inline int Test (int i) const { return data[i]; } /// void Invert (); /// void And (const BitArrayChar & ba2); /// void Or (const BitArrayChar & ba2); private: /// copy bitarray is not supported BitArrayChar & operator= (BitArrayChar &) { return *this; } /// copy bitarray is not supported BitArrayChar (const BitArrayChar &) { ; } }; template inline ostream & operator<< (ostream & s, const BitArrayChar & a) { for (int i = BASE; i < a.Size()+BASE; i++) { s << a.Test(i); if ( (i-BASE) % 40 == 39) s << "\n"; } if (a.Size() % 40 != 0) s << "\n"; return s; } } #endif netgen-6.2.1804/libsrc/general/hashtabl.cpp0000644000175000017500000001427413272137567017202 0ustar kurtkurt/**************************************************************************/ /* File: hashtabl.cpp */ /* Author: Joachim Schoeberl */ /* Date: 01. Jun. 95 */ /**************************************************************************/ /* Abstract data type HASHTABLE */ #include #include #include namespace netgen { //using namespace netgen; void INDEX_4 :: Sort () { if (i[0] > i[1]) Swap (i[0], i[1]); if (i[2] > i[3]) Swap (i[2], i[3]); if (i[0] > i[2]) Swap (i[0], i[2]); if (i[1] > i[3]) Swap (i[1], i[3]); if (i[1] > i[2]) Swap (i[1], i[2]); } void INDEX_4Q :: Sort () { if (min2 (i[1], i[2]) < min2 (i[0], i[3])) { Swap (i[0], i[1]); Swap (i[2], i[3]);} if (i[3] < i[0]) { Swap (i[0], i[3]); Swap (i[1], i[2]);} if (i[3] < i[1]) { Swap (i[1], i[3]); } } ostream & operator<<(ostream & s, const INDEX_2 & i2) { return s << i2.I1() << ", " << i2.I2(); } ostream & operator<<(ostream & s, const INDEX_3 & i3) { return s << i3.I1() << ", " << i3.I2() << ", " << i3.I3(); } ostream & operator<<(ostream & s, const INDEX_4 & i4) { return s << i4.I1() << ", " << i4.I2() << ", " << i4.I3() << ", " << i4.I4(); } ostream & operator<<(ostream & s, const INDEX_4Q & i4) { return s << i4.I1() << ", " << i4.I2() << ", " << i4.I3() << ", " << i4.I4(); } int BASE_INDEX_HASHTABLE :: Position (int bnr, const INDEX & ind) const { for (int i = 1; i <= hash.EntrySize (bnr); i++) if (hash.Get(bnr, i) == ind) return i; return 0; } /* int BASE_INDEX_2_HASHTABLE :: Position (int bnr, const INDEX_2 & ind) const { int i; for (i = 1; i <= hash.EntrySize (bnr); i++) if (hash.Get(bnr, i) == ind) return i; return 0; } */ void BASE_INDEX_2_HASHTABLE :: PrintStat (ostream & ost) const { int n = hash.Size(); int i; int sumn = 0, sumnn = 0; for (i = 1; i <= n; i++) { sumn += hash.EntrySize(i); sumnn += sqr (hash.EntrySize(i)); } ost << "Hashtable: " << endl << "size : " << n << endl << "elements per row : " << (double(sumn) / double(n)) << endl << "av. access time : " << (sumn ? (double (sumnn) / double(sumn)) : 0) << endl; } /* int BASE_INDEX_3_HASHTABLE :: Position (int bnr, const INDEX_3 & ind) const { int i; const INDEX_3 * pi = &hash.Get(bnr, 1); int n = hash.EntrySize(bnr); for (i = 1; i <= n; ++i, ++pi) { if (*pi == ind) return i; } return 0; } */ BASE_INDEX_CLOSED_HASHTABLE :: BASE_INDEX_CLOSED_HASHTABLE (int size) : hash(size) { // hash.SetName ("index-hashtable, hash"); invalid = -1; for (int i = 1; i <= size; i++) hash.Elem(i) = invalid; } void BASE_INDEX_CLOSED_HASHTABLE :: BaseSetSize (int size) { hash.SetSize(size); for (int i = 1; i <= size; i++) hash.Elem(i) = invalid; } int BASE_INDEX_CLOSED_HASHTABLE :: Position2 (const INDEX & ind) const { int i = HashValue(ind); while (1) { i++; if (i > hash.Size()) i = 1; if (hash.Get(i) == ind) return i; if (hash.Get(i) == invalid) return 0; } } int BASE_INDEX_CLOSED_HASHTABLE :: PositionCreate2 (const INDEX & ind, int & apos) { int i = HashValue(ind); int startpos = i; while (1) { i++; if (i > hash.Size()) i = 1; if (hash.Get(i) == ind) { apos = i; return 0; } if (hash.Get(i) == invalid) { hash.Elem(i) = ind; apos = i; return 1; } if (i == startpos) throw NgException ("Try to set new element in full closed hashtable"); } } int BASE_INDEX_CLOSED_HASHTABLE :: UsedElements () const { int n = hash.Size(); int cnt = 0; for (int i = 1; i <= n; i++) if (hash.Get(i) != invalid) cnt++; return cnt; } BASE_INDEX_2_CLOSED_HASHTABLE :: BASE_INDEX_2_CLOSED_HASHTABLE (size_t size) : hash(RoundUp2(size)) { size = hash.Size(); mask = size-1; // hash.SetName ("i2-hashtable, hash"); invalid = -1; for (size_t i = 0; i < size; i++) hash[i].I1() = invalid; } void BASE_INDEX_2_CLOSED_HASHTABLE :: BaseSetSize (int size) { size = RoundUp2 (size); mask = size-1; hash.SetSize(size); for (size_t i = 0; i < size; i++) hash[i].I1() = invalid; } int BASE_INDEX_2_CLOSED_HASHTABLE :: Position2 (const INDEX_2 & ind) const { int i = HashValue(ind); while (1) { i++; if (i > hash.Size()) i = 1; if (hash.Get(i) == ind) return i; if (hash.Get(i).I1() == invalid) return 0; } } bool BASE_INDEX_2_CLOSED_HASHTABLE :: PositionCreate2 (const INDEX_2 & ind, int & apos) { int i = HashValue(ind); int startpos = i; while (1) { /* i++; if (i > hash.Size()) i = 1; */ i = (i+1) % hash.Size(); if (hash[i] == ind) { apos = i; return false; } if (hash[i].I1() == invalid) { hash[i] = ind; apos = i; return true; } if (i == startpos) throw NgException ("Try to set new element in full closed hashtable"); } } int BASE_INDEX_2_CLOSED_HASHTABLE :: UsedElements () const { int n = hash.Size(); int cnt = 0; for (int i = 1; i <= n; i++) if (hash.Get(i).I1() != invalid) cnt++; return cnt; } void BASE_INDEX_3_CLOSED_HASHTABLE :: BaseSetSize (int size) { size = RoundUp2 (size); mask = size-1; hash.SetSize(size); for (int i = 0; i < size; i++) hash[i].I1() = invalid; } bool BASE_INDEX_3_CLOSED_HASHTABLE :: PositionCreate2 (const INDEX_3 & ind, int & apos) { int i = HashValue(ind); int startpos = i; while (1) { /* i++; if (i >= hash.Size()) i = 0; */ i = (i+1) % hash.Size(); if (hash[i] == ind) { apos = i; return false; } if (hash[i].I1() == invalid) { hash[i] = ind; apos = i; return true; } if (i == startpos) throw NgException ("Try to set new element in full closed hashtable"); } } } netgen-6.2.1804/libsrc/general/ngexception.cpp0000644000175000017500000000127513272137567017734 0ustar kurtkurt/**************************************************************************/ /* File: ngexception.cpp */ /* Author: Joachim Schoeberl */ /* Date: 16. Jan. 02 */ /**************************************************************************/ #include namespace netgen { //using namespace netgen; NgException :: NgException (const string & s) : m_what(s) { ; } NgException :: ~NgException () { ; } /// append string to description void NgException :: Append (const string & s) { m_what += s; } } netgen-6.2.1804/libsrc/general/sort.cpp0000644000175000017500000000321713272137567016376 0ustar kurtkurt/**************************************************************************/ /* File: sort.cc */ /* Author: Joachim Schoeberl */ /* Date: 07. Jan. 00 */ /**************************************************************************/ /* Sorting */ #include #include #include namespace netgen { void Sort (const Array & values, Array & order) { int n = values.Size(); int i, j; order.SetSize (n); for (i = 1; i <= n; i++) order.Elem(i) = i; for (i = 1; i <= n-1; i++) for (j = 1; j <= n-1; j++) if (values.Get(order.Elem(j)) > values.Get(order.Elem(j+1))) { Swap (order.Elem(j), order.Elem(j+1)); } } void QuickSortRec (const Array & values, Array & order, int left, int right) { int i, j; double midval; i = left; j = right; midval = values.Get(order.Get((i+j)/2)); do { while (values.Get(order.Get(i)) < midval) i++; while (midval < values.Get(order.Get(j))) j--; if (i <= j) { Swap (order.Elem(i), order.Elem(j)); i++; j--; } } while (i <= j); if (left < j) QuickSortRec (values, order, left, j); if (i < right) QuickSortRec (values, order, i, right); } void QuickSort (const Array & values, Array & order) { int i, n = values.Size(); order.SetSize (n); for (i = 1; i <= n; i++) order.Elem(i) = i; QuickSortRec (values, order, 1, order.Size()); } } netgen-6.2.1804/libsrc/general/symbolta.cpp0000644000175000017500000000206713272137567017243 0ustar kurtkurt/**************************************************************************/ /* File: symbolta.cc */ /* Author: Joachim Schoeberl */ /* Date: 01. Jun. 95 */ /**************************************************************************/ /* Abstract data type Symbol Table */ #include #include #ifndef FILE_SYMBOLTABLECC #define FILE_SYMBOLTABLECC // necessary for SGI ???? namespace netgen { //using namespace netgen; BASE_SYMBOLTABLE :: BASE_SYMBOLTABLE () { ; } BASE_SYMBOLTABLE :: ~BASE_SYMBOLTABLE() { DelNames(); } void BASE_SYMBOLTABLE :: DelNames() { for (int i = 0; i < names.Size(); i++) delete [] names[i]; names.SetSize (0); } int BASE_SYMBOLTABLE :: Index (const char * name) const { if (!name) return 0; for (int i = 0; i < names.Size(); i++) if (strcmp (names[i], name) == 0) return i+1; return 0; } } #endif netgen-6.2.1804/libsrc/general/spbita2d.cpp0000644000175000017500000000557113272137567017124 0ustar kurtkurt/**************************************************************************/ /* File: spbita2d.cpp */ /* Author: Joachim Schoeberl */ /* Date: 01. Jun. 95 */ /**************************************************************************/ /* Implementation of sparse 2 dimensional bitarray */ #include #include namespace netgen { //using namespace netgen; SPARSE_BIT_Array_2D :: SPARSE_BIT_Array_2D (int ah, int aw) { lines = NULL; SetSize (ah, aw); } SPARSE_BIT_Array_2D :: ~SPARSE_BIT_Array_2D () { DeleteElements (); delete lines; } void SPARSE_BIT_Array_2D :: SetSize (int ah, int aw) { DeleteElements(); if (lines) { delete lines; lines = NULL; } if (!aw) aw = ah; height = ah; width = aw; if (!ah) return; lines = new linestruct[ah]; if (lines) { for (int i = 0; i < ah; i++) { lines[i].size = 0; lines[i].maxsize = 0; lines[i].col = NULL; } } else { height = width = 0; MyError ("SPARSE_Array::SetSize: Out of memory"); } } void SPARSE_BIT_Array_2D :: DeleteElements () { if (lines) { for (int i = 0; i < height; i++) { if (lines[i].col) { delete [] lines[i].col; lines[i].col = NULL; lines[i].size = 0; lines[i].maxsize = 0; } } } } int SPARSE_BIT_Array_2D :: Test (int i, int j) const { int k, max, *col; if (!lines) return 0; if (i < 1 || i > height) return 0; col = lines[i-1].col; max = lines[i-1].size; for (k = 0; k < max; k++, col++) if (*col == j) return 1; return 0; } void SPARSE_BIT_Array_2D :: Set(int i, int j) { int k, max, *col; i--; col = lines[i].col; max = lines[i].size; for (k = 0; k < max; k++, col++) if (*col == j) return; if (lines[i].size) { if (lines[i].size == lines[i].maxsize) { col = new int[lines[i].maxsize+2]; if (col) { lines[i].maxsize += 2; memcpy (col, lines[i].col, sizeof (int) * lines[i].size); delete [] lines[i].col; lines[i].col = col; } else { MyError ("SPARSE_BIT_Array::Set: Out of mem 1"); return; } } else col = lines[i].col; if (col) { k = lines[i].size-1; while (k >= 0 && col[k] > j) { col[k+1] = col[k]; k--; } k++; lines[i].size++; col[k] = j; return; } else { MyError ("SPARSE_Array::Set: Out of memory 2"); } } else { lines[i].col = new int[4]; if (lines[i].col) { lines[i].maxsize = 4; lines[i].size = 1; lines[i].col[0] = j; return; } else { MyError ("SparseMatrix::Elem: Out of memory 3"); } } } } netgen-6.2.1804/libsrc/general/mystring.hpp0000644000175000017500000001130213272137567017262 0ustar kurtkurt //************************************************************** // // filename: mystring.h // // project: doctoral thesis, program smart // // author: Dipl.-Ing. Gerstmayr Johannes // // generated: 20.12.98 // last change: 20.12.98 // description: base class for strings // remarks: string with n characters has // 0..n-1 characters and at pos n a 0 // //************************************************************** #ifndef MYSTRING__H #define MYSTRING__H namespace netgen { class Point3d; class Vec3d; // extract string str which is enclosed by the given character encl from a given string in void ReadEnclString(istream & in, string & str, const char encl); class MyStr; DLL_HEADER MyStr operator + (const MyStr &, const MyStr &); DLL_HEADER int operator == (const MyStr &, const MyStr &); DLL_HEADER int operator < (const MyStr &, const MyStr &); DLL_HEADER int operator <= (const MyStr &, const MyStr &); DLL_HEADER int operator > (const MyStr &, const MyStr &); DLL_HEADER int operator >= (const MyStr &, const MyStr &); DLL_HEADER int operator != (const MyStr &, const MyStr &); DLL_HEADER ostream& operator << (ostream &, const MyStr &); DLL_HEADER istream& operator >> (istream &, MyStr &); class DLL_HEADER MyStr { public: MyStr(); MyStr(const char *); MyStr(char); MyStr(const MyStr &); MyStr(int); MyStr(size_t); MyStr(void *); // MyStr(long); // MyStr(unsigned long); MyStr(double); MyStr(const Point3d& p); MyStr(const Vec3d& p); MyStr(const string & st); ~MyStr(); MyStr Left(unsigned); MyStr Right(unsigned); MyStr& InsertAt(unsigned, const MyStr &); MyStr& WriteAt(unsigned, const MyStr &); unsigned Length() const; int Find(const char); int Find(const char *); int Find(const MyStr &); MyStr& operator = (const MyStr &); DLL_HEADER friend MyStr operator + (const MyStr &, const MyStr &); void operator += (const MyStr &); char* c_str(); string cpp_string(void) const; //change every ',' -> ';', '.' -> ',' void ConvertTextToExcel(); //change every ','->'.', ';'->',' void ConvertExcelToText(); MyStr operator () (unsigned, unsigned); operator int(); operator double(); operator long(); operator char *(); char& operator [] (unsigned int); char operator [] (unsigned int) const; DLL_HEADER friend int operator == (const MyStr &, const MyStr &); DLL_HEADER friend int operator < (const MyStr &, const MyStr &); DLL_HEADER friend int operator <= (const MyStr &, const MyStr &); DLL_HEADER friend int operator > (const MyStr &, const MyStr &); DLL_HEADER friend int operator >= (const MyStr &, const MyStr &); DLL_HEADER friend int operator != (const MyStr &, const MyStr &); DLL_HEADER friend ostream& operator << (ostream &, const MyStr &); DLL_HEADER friend istream& operator >> (istream &, MyStr &); static void SetToErrHandler(void (*)()); private: MyStr(unsigned, int); char *str; unsigned length; enum { SHORTLEN = 24 }; char shortstr[SHORTLEN+1]; static void(*ErrHandler)(); }; inline MyStr::MyStr() { length = 0; str = shortstr; str[0] = 0; } inline MyStr::MyStr(char s) { length = 1; str = shortstr; str[0] = s; str[1] = (char)0; } inline MyStr::~MyStr() { if (length > SHORTLEN) delete [] str; } inline unsigned MyStr::Length() const { return length; } inline int MyStr::Find(const char c) { char *pos = strchr(str, int(c)); return pos ? int(pos - str) : -1; } inline int MyStr::Find(const MyStr &s) { char *pos = strstr(str, s.str); return pos ? int(pos - str) : -1; } inline int MyStr::Find(const char *s) { char *pos = strstr(str, s); return pos ? int(pos - str) : -1; } inline MyStr::operator int() { return atoi(str); } inline MyStr::operator double() { return atof(str); } inline MyStr::operator long() { return atol(str); } inline MyStr::operator char *() { return str; } inline char* MyStr::c_str() { return str; } inline int operator == (const MyStr &s1, const MyStr& s2) { return strcmp(s1.str, s2.str) == 0; } inline int operator < (const MyStr &s1, const MyStr& s2) { return strcmp(s1.str, s2.str) < 0; } inline int operator <= (const MyStr &s1, const MyStr& s2) { return strcmp(s1.str, s2.str) <= 0; } inline int operator > (const MyStr &s1, const MyStr& s2) { return strcmp(s1.str, s2.str) > 0; } inline int operator >= (const MyStr &s1, const MyStr& s2) { return strcmp(s1.str, s2.str) >= 0; } inline int operator != (const MyStr &s1, const MyStr& s2) { return !(s1 == s2); } inline ostream& operator << (ostream& os, const MyStr& s) { return os << s.str; } inline void MyStr::SetToErrHandler(void (*Handler)()) { ErrHandler = Handler; }; } #endif netgen-6.2.1804/libsrc/general/table.cpp0000644000175000017500000001220613272137567016474 0ustar kurtkurt/**************************************************************************/ /* File: table.cpp */ /* Author: Joachim Schoeberl */ /* Date: 01. Jun. 95 */ /**************************************************************************/ /* Abstract data type TABLE */ #include #include namespace netgen { //using namespace netgen; BASE_TABLE :: BASE_TABLE (int size) : data(size) { for (int i = 0; i < size; i++) { data[i].maxsize = 0; data[i].size = 0; data[i].col = NULL; } oneblock = NULL; } BASE_TABLE :: BASE_TABLE (const FlatArray & entrysizes, int elemsize) : data(entrysizes.Size()) { size_t cnt = 0; size_t n = entrysizes.Size(); for (size_t i = 0; i < n; i++) cnt += entrysizes[i]; oneblock = new char[elemsize * cnt]; // mem_total_alloc_table += elemsize * cnt; cnt = 0; for (size_t i = 0; i < n; i++) { data[i].maxsize = entrysizes[i]; data[i].size = 0; data[i].col = &oneblock[elemsize * cnt]; cnt += entrysizes[i]; } } BASE_TABLE :: ~BASE_TABLE () { if (oneblock) delete [] oneblock; else { for (int i = 0; i < data.Size(); i++) delete [] (char*)data[i].col; } } void BASE_TABLE :: SetSize (int size) { for (int i = 0; i < data.Size(); i++) delete [] (char*)data[i].col; data.SetSize(size); for (int i = 0; i < size; i++) { data[i].maxsize = 0; data[i].size = 0; data[i].col = NULL; } } void BASE_TABLE :: ChangeSize (int size) { int oldsize = data.Size(); if (size == oldsize) return; if (size < oldsize) for (int i = size; i < oldsize; i++) delete [] (char*)data[i].col; data.SetSize(size); for (int i = oldsize; i < size; i++) { data[i].maxsize = 0; data[i].size = 0; data[i].col = NULL; } } void BASE_TABLE :: IncSize2 (int i, int elsize) { #ifdef DEBUG if (i < 0 || i >= data.Size()) { MyError ("BASE_TABLE::Inc: Out of range"); return; } #endif linestruct & line = data[i]; if (line.size == line.maxsize) { void * p = new char [(line.maxsize+5) * elsize]; memcpy (p, line.col, line.maxsize * elsize); delete [] (char*)line.col; line.col = p; line.maxsize += 5; } line.size++; } void BASE_TABLE :: SetEntrySize2 (int i, int newsize, int elsize) { linestruct & line = data[i]; if (newsize > line.maxsize) { void * p = new char [newsize * elsize]; memcpy (p, line.col, min2 (newsize, line.size) * elsize); delete [] (char*)line.col; line.col = p; } line.size = newsize; } /* void BASE_TABLE :: DecSize (int i) { #ifdef DEBUG if (i < 0 || i >= data.Size()) { MyError ("BASE_TABLE::Dec: Out of range"); return; } #endif linestruct & line = data[i]; #ifdef DEBUG if (line.size == 0) { MyError ("BASE_TABLE::Dec: EntrySize < 0"); return; } #endif line.size--; } */ void BASE_TABLE :: AllocateElementsOneBlock (int elemsize) { size_t cnt = 0; size_t n = data.Size(); for (size_t i = 0; i < n; i++) cnt += data[i].maxsize; oneblock = new char[elemsize * cnt]; cnt = 0; for (size_t i = 0; i < n; i++) { data[i].size = 0; data[i].col = &oneblock[elemsize * cnt]; cnt += data[i].maxsize; } } size_t BASE_TABLE :: AllocatedElements () const { size_t els = 0; for (size_t i = 0; i < data.Size(); i++) els += data[i].maxsize; return els; } size_t BASE_TABLE :: UsedElements () const { size_t els = 0; for (size_t i = 0; i < data.Size(); i++) els += data[i].size; return els; } void BASE_TABLE :: SetElementSizesToMaxSizes () { for (int i = 0; i < data.Size(); i++) data[i].size = data[i].maxsize; } ngstd::Archive & BASE_TABLE :: DoArchive (ngstd::Archive & ar, int elemsize) { if (ar.Output()) { size_t entries = 0, size = data.Size(); for (size_t i = 0; i < data.Size(); i++) entries += data[i].size; ar & size & entries; for (size_t i = 0; i < data.Size(); i++) { ar & data[i].size; ar.Do ((unsigned char*)data[i].col, data[i].size*elemsize); /* for (size_t j = 0; j < data[i].size*elemsize; j++) ar & ((unsigned char*) data[i].col)[j]; cout << "write " << data[i].size*elemsize << " chars" << endl; */ } } else { size_t entries, size; ar & size & entries; data.SetSize(size); oneblock = new char [entries*elemsize]; size_t cnt = 0; for (size_t i = 0; i < size; i++) { ar & data[i].size; data[i].col = oneblock+cnt; data[i].maxsize = data[i].size; ar.Do ((unsigned char*)(oneblock+cnt), data[i].size*elemsize); cnt += data[i].size*elemsize; } } return ar; } } netgen-6.2.1804/libsrc/general/ngexception.hpp0000644000175000017500000000174413272137567017742 0ustar kurtkurt#ifndef FILE_NGEXCEPTION #define FILE_NGEXCEPTION /**************************************************************************/ /* File: ngexception.hpp */ /* Author: Joachim Schoeberl */ /* Date: 16. Jan. 2002 */ /**************************************************************************/ namespace netgen { /// Base class for all ng exceptions class NgException : public std::exception { /// verbal description of exception string m_what; public: /// DLL_HEADER NgException (const string & s); /// DLL_HEADER virtual ~NgException (); /// append string to description DLL_HEADER void Append (const string & s); // void Append (const char * s); /// verbal description of exception const string & What() const { return m_what; } virtual const char* what() const noexcept override { return m_what.c_str(); } }; } #endif netgen-6.2.1804/libsrc/general/optmem.hpp0000644000175000017500000000211113272137567016705 0ustar kurtkurt#ifndef FILE_OPTMEM #define FILE_OPTMEM /**************************************************************************/ /* File: optmem.hh */ /* Author: Joachim Schoeberl */ /* Date: 04. Apr. 97 */ /**************************************************************************/ namespace netgen { /** Optimized Memory allocation classes */ class BlockAllocator { private: /// unsigned size, blocks; /// void * freelist; /// Array bablocks; public: /// BlockAllocator (unsigned asize, unsigned ablocks = 100); /// ~BlockAllocator (); /// void * Alloc (); /* { if (!freelist) Alloc2(); void * p = freelist; // freelist = *(void**)freelist; freelist = *static_cast (freelist); return p; } */ /// void Free (void * p); /* { if (!bablocks.Size()) return; *(void**)p = freelist; freelist = p; } */ private: // void Alloc2 (); }; } #endif netgen-6.2.1804/libsrc/general/template.hpp0000644000175000017500000002012213272137567017221 0ustar kurtkurt#ifndef FILE_TEMPLATE #define FILE_TEMPLATE /**************************************************************************/ /* File: template.hh */ /* Author: Joachim Schoeberl */ /* Date: 01. Jun. 95 */ /**************************************************************************/ namespace netgen { /* templates, global types, defines and variables */ /// The following value may be adapted to the hardware ! #ifndef CLOCKS_PER_SEC #define CLOCKS_PER_SEC 1000000 #endif // #include /** output stream for testing. testout is opened by main */ DLL_HEADER extern ostream * testout; /** use instead of cout */ DLL_HEADER extern ostream * mycout; /** error output stream */ DLL_HEADER extern ostream * myerr; /** Error messages display. Error messages are displayed by this function */ DLL_HEADER extern void MyError (const char * ch); /** Rings the bell. Produces nr beeps. */ DLL_HEADER extern void MyBeep (int nr = 1); template inline void Swap (T & a, T & b) { T temp = a; a = b; b = temp; } /* template inline void swap (T & a, T & b) { T temp = a; a = b; b = temp; } */ /** INDEX is a typedef for (at least) 4-byte integer */ typedef int INDEX; /** BOOL is a typedef for boolean variables */ // typedef int BOOL; typedef int ELIND; typedef int PIND; class twoint { public: /// int i1, i2; /// twoint() {}; /// twoint(int ii1, int ii2) {i1 = ii1; i2 = ii2;} friend int operator== (const twoint& t1, const twoint& t2); /// void Swap() {int x = i1; i1 = i2; i2 = x;} void Sort() {if (i1 > i2) {Swap();}} }; inline int operator== (const twoint& t1, const twoint& t2) { return t1.i1 == t2.i1 && t1.i2 == t2.i2; } class threeint { public: /// int i1, i2, i3; /// threeint() {}; /// threeint(int ii1, int ii2, int ii3) {i1 = ii1; i2 = ii2; i3 = ii3;} }; /// class twodouble { public: /// double d1, d2; /// twodouble() {d1 = 0; d2 = 0;}; /// twodouble(double id1, double id2) {d1 = id1; d2 = id2;} /// void Swap() {double x = d1; d1 = d2; d2 = x;} }; class fourint { public: int i1, i2, i3, i4; fourint() {}; }; /// class INDEX_2; ostream & operator<<(ostream & s, const INDEX_2 & i2); class INDEX_2 { /// INDEX i[2]; public: /// INDEX_2 () { } /// INDEX_2 (INDEX ai1, INDEX ai2) { i[0] = ai1; i[1] = ai2; } /// INDEX_2 (const INDEX_2 & in2) { i[0] = in2.i[0]; i[1] = in2.i[1]; } /// int operator== (const INDEX_2 & in2) const { return i[0] == in2.i[0] && i[1] == in2.i[1]; } /// INDEX_2 Sort () { if (i[0] > i[1]) { INDEX hi = i[0]; i[0] = i[1]; i[1] = hi; } return *this; } static INDEX_2 Sort (int i1, int i2) { if (i1 > i2) return INDEX_2 (i2,i1); else return INDEX_2 (i1,i2); } /// INDEX & I1 () { return i[0]; } /// INDEX & I2 () { return i[1]; } /// INDEX & I (int j) { return i[j-1]; } /// const INDEX & I1 () const { return i[0]; } /// const INDEX & I2 () const { return i[1]; } /// const INDEX & I (int j) const { return i[j-1]; } /// int & operator[] (int j) { return i[j]; } /// const int & operator[] (int j) const { return i[j]; } /// friend ostream & operator<<(ostream & s, const INDEX_2 & i2); }; inline INDEX_2 Sort (const INDEX_2 & i2) { INDEX_2 tmp = i2; tmp.Sort(); return tmp; } inline bool operator< (const INDEX_2 ia, const INDEX_2 ib) { if (ia[0] < ib[0]) return true; if (ia[0] > ib[0]) return false; if (ia[1] < ib[1]) return true; return false; } /// class INDEX_3 { /// INDEX i[3]; public: /// INDEX_3 () { } /// INDEX_3 (INDEX ai1, INDEX ai2, INDEX ai3) { i[0] = ai1; i[1] = ai2; i[2] = ai3; } /// INDEX_3 (const INDEX_3 & in2) { i[0] = in2.i[0]; i[1] = in2.i[1]; i[2] = in2.i[2]; } static INDEX_3 Sort (INDEX_3 i3) { return i3.Sort(); } static INDEX_3 Sort (int i1, int i2, int i3) { if (i1 > i2) Swap (i1, i2); if (i2 > i3) Swap (i2, i3); if (i1 > i2) Swap (i1, i2); return INDEX_3 (i1, i2, i3); } INDEX_3 Sort () { if (i[0] > i[1]) Swap (i[0], i[1]); if (i[1] > i[2]) Swap (i[1], i[2]); if (i[0] > i[1]) Swap (i[0], i[1]); return *this; } int operator== (const INDEX_3 & in2) const { return i[0] == in2.i[0] && i[1] == in2.i[1] && i[2] == in2.i[2];} /// INDEX & I1 () { return i[0]; } /// INDEX & I2 () { return i[1]; } /// INDEX & I3 () { return i[2]; } /// INDEX & I (int j) { return i[j-1]; } /// const INDEX & I1 () const { return i[0]; } /// const INDEX & I2 () const { return i[1]; } /// const INDEX & I3 () const { return i[2]; } /// const INDEX & I (int j) const { return i[j-1]; } /// int & operator[] (int j) { return i[j]; } /// const int & operator[] (int j) const { return i[j]; } /// friend ostream & operator<<(ostream & s, const INDEX_3 & i3); }; /// class INDEX_4 { /// INDEX i[4]; public: /// INDEX_4 () { } /// INDEX_4 (INDEX ai1, INDEX ai2, INDEX ai3, INDEX ai4) { i[0] = ai1; i[1] = ai2; i[2] = ai3; i[3] = ai4; } /// INDEX_4 (const INDEX_4 & in2) { i[0] = in2.i[0]; i[1] = in2.i[1]; i[2] = in2.i[2]; i[3] = in2.i[3]; } /// void Sort (); /// int operator== (const INDEX_4 & in2) const { return i[0] == in2.i[0] && i[1] == in2.i[1] && i[2] == in2.i[2] && i[3] == in2.i[3]; } /// INDEX & I1 () { return i[0]; } /// INDEX & I2 () { return i[1]; } /// INDEX & I3 () { return i[2]; } /// INDEX & I4 () { return i[3]; } /// INDEX & I (int j) { return i[j-1]; } /// const INDEX & I1 () const { return i[0]; } /// const INDEX & I2 () const { return i[1]; } /// const INDEX & I3 () const { return i[2]; } /// const INDEX & I4 () const { return i[3]; } /// const INDEX & I (int j) const { return i[j-1]; } /// int & operator[] (int j) { return i[j]; } /// const int & operator[] (int j) const { return i[j]; } /// friend ostream & operator<<(ostream & s, const INDEX_4 & i4); }; /// The sort preserves quads !!! class INDEX_4Q { /// INDEX i[4]; public: /// INDEX_4Q () { } /// INDEX_4Q (INDEX ai1, INDEX ai2, INDEX ai3, INDEX ai4) { i[0] = ai1; i[1] = ai2; i[2] = ai3; i[3] = ai4; } /// INDEX_4Q (const INDEX_4Q & in2) { i[0] = in2.i[0]; i[1] = in2.i[1]; i[2] = in2.i[2]; i[3] = in2.i[3]; } /// void Sort (); /// int operator== (const INDEX_4Q & in2) const { return i[0] == in2.i[0] && i[1] == in2.i[1] && i[2] == in2.i[2] && i[3] == in2.i[3]; } /// INDEX & I1 () { return i[0]; } /// INDEX & I2 () { return i[1]; } /// INDEX & I3 () { return i[2]; } /// INDEX & I4 () { return i[3]; } /// INDEX & I (int j) { return i[j-1]; } /// const INDEX & I1 () const { return i[0]; } /// const INDEX & I2 () const { return i[1]; } /// const INDEX & I3 () const { return i[2]; } /// const INDEX & I4 () const { return i[3]; } /// const INDEX & I (int j) const { return i[j-1]; } /// friend ostream & operator<<(ostream & s, const INDEX_4Q & i4); }; inline bool operator< (const INDEX_4 & a, const INDEX_4 & b) { for (int j = 0; j < 4; j++) { if (a[j] < b[j]) return true; if (a[j] > b[j]) return false; } return false; } /// template inline T min2 (T a, T b) { /// return (a < b) ? a : b; } /// template inline T max2 (T a, T b) { /// return (a > b) ? a : b; } /// template inline T min3 (T a, T b, T c) { /// return (a < b) ? (a < c) ? a : c : (b < c) ? b : c; } /// template inline T max3 (T a, T b, T c) { /// return (a > b) ? ((a > c) ? a : c) : ((b > c) ? b : c); } /// /// template inline int sgn (T a) { return (a > 0) ? 1 : ( ( a < 0) ? -1 : 0 ); } /// template inline T sqr (const T a) { return a * a; } /// template inline T pow3 (const T a) { return a * a * a; } /* template void BubbleSort (int size, T * data); template void MergeSort (int size, T * data, T * help); */ } #endif netgen-6.2.1804/libsrc/general/archive_base.hpp0000644000175000017500000000676213272137567020037 0ustar kurtkurt#ifndef NGS_ARCHIVE_BASE #define NGS_ARCHIVE_BASE // copied from netgen #include #include namespace ngstd { class Archive { bool is_output; public: Archive (bool ais_output) : is_output(ais_output) { ; } virtual ~Archive() { ; } bool Output () { return is_output; } bool Input () { return !is_output; } virtual Archive & operator & (double & d) = 0; virtual Archive & operator & (int & i) = 0; virtual Archive & operator & (long & i) = 0; virtual Archive & operator & (size_t & i) = 0; virtual Archive & operator & (short & i) = 0; virtual Archive & operator & (unsigned char & i) = 0; virtual Archive & operator & (bool & b) = 0; virtual Archive & operator & (string & str) = 0; virtual Archive & operator & (char *& str) = 0; template Archive & Do (T * data, size_t n) { for (size_t j = 0; j < n; j++) { (*this) & data[j]; }; return *this; }; virtual Archive & Do (double * d, size_t n) { for (size_t j = 0; j < n; j++) { (*this) & d[j]; }; return *this; }; virtual Archive & Do (int * i, size_t n) { for (size_t j = 0; j < n; j++) { (*this) & i[j]; }; return *this; }; virtual Archive & Do (long * i, size_t n) { for (size_t j = 0; j < n; j++) { (*this) & i[j]; }; return *this; }; virtual Archive & Do (size_t * i, size_t n) { for (size_t j = 0; j < n; j++) { (*this) & i[j]; }; return *this; }; virtual Archive & Do (short * i, size_t n) { for (size_t j = 0; j < n; j++) { (*this) & i[j]; }; return *this; }; virtual Archive & Do (unsigned char * i, size_t n) { for (size_t j = 0; j < n; j++) { (*this) & i[j]; }; return *this; }; virtual Archive & Do (bool * b, size_t n) { for (size_t j = 0; j < n; j++) { (*this) & b[j]; }; return *this; }; // nvirtual Archive & Do (string * str, size_t n) // { for (size_t j = 0; j < n; j++) { (*this) & str[j]; }; return *this; }; // virtual Archive & operator & (char *& str) = 0; // archive a pointer ... int cnt = 0; std::map ptr2nr; std::vector nr2ptr; /* // necessary for msvc ??? Archive & operator& (string* & ps) { return operator& (ps); } */ template Archive & operator& (T *& p) { if (Output()) { if (!p) { int m2 = -2; (*this) & m2; return *this; } auto pos = ptr2nr.find( (void*) p); if (pos == ptr2nr.end()) { ptr2nr[p] = cnt; int m1 = -1; (*this) & m1; cnt++; (*this) & (*p); } else { (*this) & pos->second; } } else { int nr; (*this) & nr; // cout << "in, got nr " << nr << endl; if (nr == -2) { p = nullptr; } else if (nr == -1) { p = new T; // cout << "create new ptr, p = " << p << endl; (*this) & *p; nr2ptr.push_back(p); } else { p = (T*)nr2ptr[nr]; // cout << "reuse ptr " << nr << ": " << p << endl; } } return *this; } template Archive & operator << (const T & t) { T ht(t); (*this) & ht; return *this; } }; } #endif netgen-6.2.1804/libsrc/general/stack.hpp0000644000175000017500000000317413272137567016523 0ustar kurtkurt#ifndef FILE_STACK #define FILE_STACK /*****************************************************************************/ /* File: stack.hh */ /* Author: Wolfram Muehlhuber */ /* Date: September 98 */ /*****************************************************************************/ /* Stack class, based on a resizable array */ // #include "array.hpp" namespace netgen { /// template class STACK { public: /// inline STACK (INDEX asize = 0, INDEX ainc = 0); /// inline ~STACK (); /// inline void Push (const T & el); /// inline T & Pop (); /// const inline T & Top () const; /// inline int IsEmpty () const; /// inline void MakeEmpty (); private: /// Array elems; /// INDEX size; }; /* Stack class, based on a resizable array */ template inline STACK :: STACK (INDEX asize, INDEX ainc) : elems(asize, ainc) { size = 0; } template inline STACK :: ~STACK () { ; } template inline void STACK :: Push (const T & el) { if (size < elems.Size()) elems.Elem(++size) = el; else { elems.Append(el); size++; } } template inline T & STACK :: Pop () { return elems.Elem(size--); } template const inline T & STACK :: Top () const { return elems.Get(size); } template inline int STACK :: IsEmpty () const { return (size == 0); } template inline void STACK :: MakeEmpty () { size = 0; } } #endif netgen-6.2.1804/libsrc/general/flags.cpp0000644000175000017500000001533613272137567016510 0ustar kurtkurt/**************************************************************************/ /* File: flags.cc */ /* Author: Joachim Schoeberl */ /* Date: 10. Oct. 96 */ /**************************************************************************/ /* Datatype Flags */ #include #include namespace netgen { //using namespace netgen; Flags :: Flags () { ; } Flags :: ~Flags () { DeleteFlags (); } void Flags :: DeleteFlags () { for (int i = 0; i < strflags.Size(); i++) delete [] strflags[i]; for (int i = 0; i < numlistflags.Size(); i++) delete numlistflags[i]; strflags.DeleteAll(); numflags.DeleteAll(); defflags.DeleteAll(); strlistflags.DeleteAll(); numlistflags.DeleteAll(); } void Flags :: SetFlag (const char * name, const char * val) { char * hval = new char[strlen (val) + 1]; strcpy (hval, val); strflags.Set (name, hval); } void Flags :: SetFlag (const char * name, double val) { numflags.Set (name, val); } void Flags :: SetFlag (const char * name) { defflags.Set (name, 1); } void Flags :: SetFlag (const char * name, const Array & val) { Array * strarray = new Array; for (int i = 1; i <= val.Size(); i++) { strarray->Append (new char[strlen(val.Get(i))+1]); strcpy (strarray->Last(), val.Get(i)); } strlistflags.Set (name, strarray); } void Flags :: SetFlag (const char * name, const Array & val) { Array * numarray = new Array; for (int i = 1; i <= val.Size(); i++) numarray->Append (val.Get(i)); numlistflags.Set (name, numarray); } const char * Flags :: GetStringFlag (const char * name, const char * def) const { if (strflags.Used (name)) return strflags.Get(name); else return def; } double Flags :: GetNumFlag (const char * name, double def) const { if (numflags.Used (name)) return numflags.Get(name); else return def; } const double * Flags :: GetNumFlagPtr (const char * name) const { if (numflags.Used (name)) return & ((SYMBOLTABLE&)numflags).Elem(name); else return NULL; } double * Flags :: GetNumFlagPtr (const char * name) { if (numflags.Used (name)) return & ((SYMBOLTABLE&)numflags).Elem(name); else return NULL; } bool Flags :: GetDefineFlag (const char * name) const { return defflags.Used (name); } const Array & Flags :: GetStringListFlag (const char * name) const { if (strlistflags.Used (name)) return *strlistflags.Get(name); else { static Array dummy_array(0); return dummy_array; } } const Array & Flags ::GetNumListFlag (const char * name) const { if (numlistflags.Used (name)) return *numlistflags.Get(name); else { static Array dummy_array(0); return dummy_array; } } bool Flags :: StringFlagDefined (const char * name) const { return strflags.Used (name); } bool Flags :: NumFlagDefined (const char * name) const { return numflags.Used (name); } bool Flags :: StringListFlagDefined (const char * name) const { return strlistflags.Used (name); } bool Flags :: NumListFlagDefined (const char * name) const { return numlistflags.Used (name); } void Flags :: SaveFlags (const char * filename) const { int i; ofstream outfile (filename); for (i = 1; i <= strflags.Size(); i++) outfile << strflags.GetName(i) << " = " << strflags.Get(i) << endl; for (i = 1; i <= numflags.Size(); i++) outfile << numflags.GetName(i) << " = " << numflags.Get(i) << endl; for (i = 1; i <= defflags.Size(); i++) outfile << defflags.GetName(i) << endl; } void Flags :: PrintFlags (ostream & ost) const { int i; for (i = 1; i <= strflags.Size(); i++) ost << strflags.GetName(i) << " = " << strflags.Get(i) << endl; for (i = 1; i <= numflags.Size(); i++) ost << numflags.GetName(i) << " = " << numflags.Get(i) << endl; for (i = 1; i <= defflags.Size(); i++) ost << defflags.GetName(i) << endl; } void Flags :: LoadFlags (const char * filename) { char name[100], str[100]; char ch; double val; ifstream infile(filename); // (*logout) << "Load flags from " << filename << endl << endl; while (infile.good()) { infile >> name; if (strlen (name) == 0) break; if (name[0] == '/' && name[1] == '/') { // (*logout) << "comment: "; ch = 0; while (ch != '\n' && infile.good()) { ch = infile.get(); // (*logout) << ch; } continue; } // (*logout) << name; ch = 0; infile >> ch; if (ch != '=') { // (*logout) << endl; infile.putback (ch); SetFlag (name); } else { infile >> val; if (!infile.good()) { infile.clear(); infile >> str; SetFlag (name, str); // (*logout) << " = " << str << endl; } else { SetFlag (name, val); // (*logout) << " = " << val << endl; } } } // (*logout) << endl; } void Flags :: SetCommandLineFlag (const char * st) { // cout << "clflag = " << st << endl; istringstream inst( (char *)st); // istrstream defined with char * (not const char * ?????) char name[100]; double val; if (st[0] != '-') { cerr << "flag must start with '-'" << endl; return; } const char * pos = strchr (st, '='); if (!pos) { // (cout) << "Add def flag: " << st+1 << endl; SetFlag (st+1); } else { // cout << "pos = " << pos << endl; strncpy (name, st+1, (pos-st)-1); name[pos-st-1] = 0; // cout << "name = " << name << endl; pos++; char * endptr = NULL; val = strtod (pos, &endptr); // cout << "val = " << val << endl; if (endptr == pos) { // (cout) << "Add String Flag: " << name << " = " << pos << endl; SetFlag (name, pos); } else { // (cout) << "Add Num Flag: " << name << " = " << val << endl; SetFlag (name, val); } } /* inst >> name; (*mycout) << "name = " << name << endl; ch = 0; inst >> ch; if (ch != '=') { SetFlag (name); } else { inst >> val; if (!inst.good()) { inst.clear(); inst >> str; SetFlag (name, str); (*mycout) << "str = " << str << endl; } else { SetFlag (name, val); (*mycout) << "val = " << val << endl; } } */ } } netgen-6.2.1804/libsrc/general/bitarray.cpp0000644000175000017500000000440713272137567017226 0ustar kurtkurt/**************************************************************************/ /* File: bitarray.cc */ /* Autho: Joachim Schoeberl */ /* Date: 01. Jun. 95 */ /**************************************************************************/ /* data type BitArray */ #include #include namespace netgen { //using namespace netgen; BitArray :: BitArray () { size = 0; data = NULL; } BitArray :: BitArray (int asize) { size = 0; data = NULL; SetSize (asize); } BitArray :: ~BitArray () { delete [] data; } void BitArray :: SetSize (int asize) { if (size == asize) return; delete [] data; size = asize; data = new unsigned char [Addr (size)+1]; } void BitArray :: Set () { if (!size) return; for (int i = 0; i <= Addr (size); i++) data[i] = UCHAR_MAX; } void BitArray :: Clear () { if (!size) return; for (int i = 0; i <= Addr (size); i++) data[i] = 0; } void BitArray :: Invert () { if (!size) return; for (int i = 0; i <= Addr (size); i++) data[i] ^= 255; } void BitArray :: And (const BitArray & ba2) { if (!size) return; for (int i = 0; i <= Addr (size); i++) data[i] &= ba2.data[i]; } void BitArray :: Or (const BitArray & ba2) { if (!size) return; for (int i = 0; i <= Addr (size); i++) data[i] |= ba2.data[i]; } template void BitArrayChar :: Set () { data = 1; } template void BitArrayChar :: Clear () { data = 0; } template void BitArrayChar :: Invert () { for (int i = BASE; i < data.Size()+BASE; i++) data[i] = 1 - data[i]; } template void BitArrayChar :: And (const BitArrayChar & ba2) { for (int i = BASE; i < data.Size()+BASE; i++) data[i] &= ba2.data[i]; } template void BitArrayChar :: Or (const BitArrayChar & ba2) { for (int i = BASE; i < data.Size()+BASE; i++) data[i] |= ba2.data[i]; } template class BitArrayChar<0>; template class BitArrayChar<1>; } netgen-6.2.1804/libsrc/general/myadt.hpp0000644000175000017500000000215113272137567016526 0ustar kurtkurt#ifndef FILE_MYADT #define FILE_MYADT /**************************************************************************/ /* File: myadt.hpp */ /* Author: Joachim Schoeberl */ /* Date: 01. Jun. 95 */ /**************************************************************************/ /* include for all abstract data types */ #include "../include/mystdlib.h" #include "../include/mydefs.hpp" #include "ngexception.hpp" #include "parthreads.hpp" // #include "moveablemem.hpp" #include "dynamicmem.hpp" #include "archive_base.hpp" #include "template.hpp" #include "array.hpp" #include "table.hpp" #include "hashtabl.hpp" #include "symbolta.hpp" #include "bitarray.hpp" #include "flags.hpp" #include "spbita2d.hpp" #include "seti.hpp" #include "optmem.hpp" #include "autoptr.hpp" #include "sort.hpp" #include "stack.hpp" #include "mystring.hpp" #include "profiler.hpp" #include "mpi_interface.hpp" #include "netgenout.hpp" #include "gzstream.h" #include "ngsimd.hpp" #endif netgen-6.2.1804/libsrc/general/hashtabl.hpp0000644000175000017500000007427313272137567017214 0ustar kurtkurt#ifndef FILE_HASHTABL #define FILE_HASHTABL /**************************************************************************/ /* File: hashtabl.hh */ /* Author: Joachim Schoeberl */ /* Date: 01. Jun. 95 */ /**************************************************************************/ namespace netgen { /** Abstract data type HASHTABLE. Hash is done by one INDEX */ class BASE_INDEX_HASHTABLE { protected: /// keys are stored in this table TABLE hash; public: /// BASE_INDEX_HASHTABLE (int size) : hash (size) { }; protected: /// int HashValue (const INDEX & ind) const { return ind % hash.Size() + 1; } /// int Position (int bnr, const INDEX & ind) const; }; /// template class INDEX_HASHTABLE : private BASE_INDEX_HASHTABLE { /// TABLE cont; public: /// inline INDEX_HASHTABLE (int size); /// inline void Set (const INDEX & hash, const T & acont); /// inline const T & Get (const INDEX & ahash) const; /// inline bool Used (const INDEX & ahash) const; /// inline int GetNBags () const; /// inline int GetBagSize (int bnr) const; /// inline void GetData (int bnr, int colnr, INDEX & ahash, T & acont) const; /// inline void PrintMemInfo (ostream & ost) const; }; /// class BASE_INDEX_2_HASHTABLE { protected: /// TABLE hash; public: /// BASE_INDEX_2_HASHTABLE () { ; } BASE_INDEX_2_HASHTABLE (int size) : hash (size) { }; /// void PrintStat (ostream & ost) const; void BaseSetSize(int s) {hash.SetSize(s);} //protected: /// int HashValue (const INDEX_2 & ind) const { return (ind.I1() + ind.I2()) % hash.Size() + 1; } /// int Position (int bnr, const INDEX_2 & ind) const { for (int i = 1; i <= hash.EntrySize (bnr); i++) if (hash.Get(bnr, i) == ind) return i; return 0; } }; /// template class INDEX_2_HASHTABLE : public BASE_INDEX_2_HASHTABLE { /// TABLE cont; public: /// INDEX_2_HASHTABLE () { ; } INDEX_2_HASHTABLE (int size) : BASE_INDEX_2_HASHTABLE (size), cont(size) { ; } /// void SetSize(int s) { cont.SetSize(s); BaseSetSize(s); } /// void Set (const INDEX_2 & ahash, const T & acont) { int bnr = HashValue (ahash); int pos = Position (bnr, ahash); if (pos) cont.Set (bnr, pos, acont); else { hash.Add1 (bnr, ahash); cont.Add1 (bnr, acont); } } /// const T & Get (const INDEX_2 & ahash) const { int bnr = HashValue (ahash); int pos = Position (bnr, ahash); return cont.Get (bnr, pos); } /// bool Used (const INDEX_2 & ahash) const { return Position (HashValue (ahash), ahash) > 0; } /// int GetNBags () const { return cont.Size(); } /// int GetBagSize (int bnr) const { return cont.EntrySize (bnr); } /// void GetData (int bnr, int colnr, INDEX_2 & ahash, T & acont) const { ahash = hash.Get(bnr, colnr); acont = cont.Get(bnr, colnr); } /// void SetData (int bnr, int colnr, const INDEX_2 & ahash, const T & acont) { hash.Set(bnr, colnr, ahash); cont.Set(bnr, colnr, acont); } /// void PrintMemInfo (ostream & ost) const { ost << "Hash: " << endl; hash.PrintMemInfo (ost); ost << "Cont: " << endl; cont.PrintMemInfo (ost); } void DeleteData () { int n = hash.Size(); hash.SetSize (n); cont.SetSize (n); } class Iterator { const INDEX_2_HASHTABLE & ht; int bagnr, pos; public: Iterator (const INDEX_2_HASHTABLE & aht, int abagnr, int apos) : ht(aht), bagnr(abagnr), pos(apos) { ; } int BagNr() const { return bagnr; } int Pos() const { return pos; } void operator++ (int) { // cout << "begin Operator ++: bagnr = " << bagnr << " - pos = " << pos << endl; pos++; while (bagnr < ht.GetNBags() && pos == ht.GetBagSize(bagnr+1)) { pos = 0; bagnr++; } // cout << "end Operator ++: bagnr = " << bagnr << " - pos = " << pos << endl; } bool operator != (int i) const { return bagnr != i; } }; Iterator Begin () const { Iterator it(*this, 0, -1); it++; return it; } int End() const { return GetNBags(); } void GetData (const Iterator & it, INDEX_2 & ahash, T & acont) const { ahash = hash[it.BagNr()][it.Pos()]; acont = cont[it.BagNr()][it.Pos()]; } const INDEX_2 & GetHash (const Iterator & it) const { return hash[it.BagNr()][it.Pos()]; } const T & GetData (const Iterator & it) const { return cont[it.BagNr()][it.Pos()]; } ngstd::Archive & DoArchive (ngstd::Archive & ar) { ar & hash & cont; return ar; } }; template inline ngstd::Archive & operator & (ngstd::Archive & archive, INDEX_2_HASHTABLE & mp) { return mp.DoArchive(archive); } template inline ostream & operator<< (ostream & ost, const INDEX_2_HASHTABLE & ht) { for (typename INDEX_2_HASHTABLE::Iterator it = ht.Begin(); it != ht.End(); it++) { ost << ht.GetHash(it) << ": " << ht.GetData(it) << endl; } return ost; } /// class BASE_INDEX_3_HASHTABLE { protected: /// TABLE hash; public: /// BASE_INDEX_3_HASHTABLE () { ; } BASE_INDEX_3_HASHTABLE (int size) : hash (size) { }; protected: /// int HashValue (const INDEX_3 & ind) const { return (ind.I1() + ind.I2() + ind.I3()) % hash.Size() + 1; } /// int Position (int bnr, const INDEX_3 & ind) const { const INDEX_3 * pi = &hash.Get(bnr, 1); int n = hash.EntrySize(bnr); for (int i = 1; i <= n; ++i, ++pi) { if (*pi == ind) return i; } return 0; } }; /// template class INDEX_3_HASHTABLE : private BASE_INDEX_3_HASHTABLE { /// TABLE cont; public: /// inline INDEX_3_HASHTABLE () { ; } inline INDEX_3_HASHTABLE (int size); /// inline void Set (const INDEX_3 & ahash, const T & acont); /// inline const T & Get (const INDEX_3 & ahash) const; /// inline bool Used (const INDEX_3 & ahash) const; /// inline int GetNBags () const; /// inline int GetBagSize (int bnr) const; /// inline void SetData (int bnr, int colnr, const INDEX_3 & ahash, const T & acont); /// inline void GetData (int bnr, int colnr, INDEX_3 & ahash, T & acont) const; /// returns position, if not existing, will create (create == return 1) inline int PositionCreate (const INDEX_3 & ahash, int & bnr, int & colnr); /// inline void SetSize (int size); /// inline void PrepareSet (const INDEX_3 & ahash); /// inline void AllocateElements (); /// inline void PrintMemInfo (ostream & ost) const; /// inline void DeleteData (); class Iterator { const INDEX_3_HASHTABLE & ht; int bagnr, pos; public: Iterator (const INDEX_3_HASHTABLE & aht, int abagnr, int apos) : ht(aht), bagnr(abagnr), pos(apos) { ; } int BagNr() const { return bagnr; } int Pos() const { return pos; } void operator++ (int) { // cout << "begin Operator ++: bagnr = " << bagnr << " - pos = " << pos << endl; pos++; while (bagnr < ht.GetNBags() && pos == ht.GetBagSize(bagnr+1)) { pos = 0; bagnr++; } // cout << "end Operator ++: bagnr = " << bagnr << " - pos = " << pos << endl; } bool operator != (int i) const { return bagnr != i; } }; Iterator Begin () const { Iterator it(*this, 0, -1); it++; return it; } int End() const { return GetNBags(); } void GetData (const Iterator & it, INDEX_3 & ahash, T & acont) const { ahash = hash[it.BagNr()][it.Pos()]; acont = cont[it.BagNr()][it.Pos()]; } const INDEX_3 & GetHash (const Iterator & it) const { return hash[it.BagNr()][it.Pos()]; } const T & GetData (const Iterator & it) const { return cont[it.BagNr()][it.Pos()]; } ngstd::Archive & DoArchive (ngstd::Archive & ar) { ar & hash & cont; return ar; } }; template inline ngstd::Archive & operator & (ngstd::Archive & archive, INDEX_3_HASHTABLE & mp) { return mp.DoArchive(archive); } template inline ostream & operator<< (ostream & ost, const INDEX_3_HASHTABLE & ht) { for (typename INDEX_3_HASHTABLE::Iterator it = ht.Begin(); it != ht.End(); it++) { ost << ht.GetHash(it) << ": " << ht.GetData(it) << endl; } return ost; } /// Closed Hashing HT class BASE_INDEX_CLOSED_HASHTABLE { protected: /// // MoveableArray hash; Array hash; /// int invalid; public: /// BASE_INDEX_CLOSED_HASHTABLE (int size); int Size() const { return hash.Size(); } int UsedPos (int pos) const { return ! (hash.Get(pos) == invalid); } int UsedElements () const; /// int HashValue (const INDEX & ind) const { return (3*ind) % hash.Size() + 1; } int Position (const INDEX & ind) const { int i = HashValue(ind); while (1) { if (hash.Get(i) == ind) return i; if (hash.Get(i) == invalid) return 0; i++; if (i > hash.Size()) i = 1; } } int CalcPositionCosts (const INDEX & ind) const { int i = HashValue(ind); int costs = 1; while (1) { if (hash.Get(i) == ind) return costs; if (hash.Get(i) == invalid) return costs; i++; if (i > hash.Size()) i = 1; costs++; } } // returns 1, if new position is created int PositionCreate (const INDEX & ind, int & apos) { int i = HashValue (ind); if (hash.Get(i) == ind) { apos = i; return 0; } if (hash.Get(i) == invalid) { hash.Elem(i) = ind; apos = i; return 1; } return PositionCreate2 (ind, apos); } protected: int Position2 (const INDEX & ind) const; int PositionCreate2 (const INDEX & ind, int & apos); void BaseSetSize (int asize); }; template class INDEX_CLOSED_HASHTABLE : public BASE_INDEX_CLOSED_HASHTABLE { /// // MoveableArray cont; Array cont; public: /// INDEX_CLOSED_HASHTABLE (int size) : BASE_INDEX_CLOSED_HASHTABLE(size), cont(size) { ; // cont.SetName ("ind-hashtable, contents"); } void Set (const INDEX & ahash, const T & acont) { int pos; PositionCreate (ahash, pos); hash.Elem(pos) = ahash; cont.Elem(pos) = acont; } const T & Get (const INDEX & ahash) const { int pos = Position (ahash); return cont.Get(pos); } /// bool Used (const INDEX & ahash) const { int pos = Position (ahash); return (pos != 0); } /// inline void SetData (int pos, const INDEX & ahash, const T & acont) { hash.Elem(pos) = ahash; cont.Elem(pos) = acont; } /// void GetData (int pos, INDEX & ahash, T & acont) const { ahash = hash.Get(pos); acont = cont.Get(pos); } /// inline void SetData (int pos, const T & acont) { cont.Elem(pos) = acont; } /// void GetData (int pos, T & acont) const { acont = cont.Get(pos); } /// const T & GetData (int pos) { return cont.Get(pos); } /// inline void SetSize (int size) { BaseSetSize(size); cont.SetSize(size); } /// inline void DeleteData () { SetSize (cont.Size()); } void SetName (const char * aname) { // cont.SetName(aname); // hash.SetName(aname); } }; inline size_t RoundUp2 (size_t i) { size_t res = 1; while (res < i) res *= 2; // hope it will never be too large return res; } /// Closed Hashing HT class BASE_INDEX_2_CLOSED_HASHTABLE { protected: /// // MoveableArray hash; Array hash; /// int invalid; size_t mask; public: /// BASE_INDEX_2_CLOSED_HASHTABLE (size_t size); int Size() const { return hash.Size(); } bool UsedPos0 (int pos) const { return ! (hash[pos].I1() == invalid); } int UsedElements () const; /// int HashValue (const INDEX_2 & ind) const { // return (ind.I1() + 71 * ind.I2()) % hash.Size() + 1; return (ind.I1() + 71 * ind.I2()) & mask; } int Position0 (const INDEX_2 & ind) const { int i = HashValue(ind); while (1) { if (hash[i] == ind) return i; if (hash[i].I1() == invalid) return -1; i = (i+1) & mask; /* i++; if (i > hash.Size()) i = 1; */ } } // returns 1, if new position is created bool PositionCreate0 (const INDEX_2 & ind, int & apos) { int i = HashValue (ind); if (hash[i] == ind) { apos = i; return false; } if (hash[i].I1() == invalid) { hash[i] = ind; apos = i; return true; } return PositionCreate2 (ind, apos); } protected: /// int Position2 (const INDEX_2 & ind) const; bool PositionCreate2 (const INDEX_2 & ind, int & apos); void BaseSetSize (int asize); }; template class INDEX_2_CLOSED_HASHTABLE : public BASE_INDEX_2_CLOSED_HASHTABLE { Array cont; public: INDEX_2_CLOSED_HASHTABLE (size_t size) : BASE_INDEX_2_CLOSED_HASHTABLE(size), cont(RoundUp2(size)) { ; } void Set (const INDEX_2 & ahash, const T & acont) { int pos; PositionCreate0 (ahash, pos); hash[pos] = ahash; cont[pos] = acont; } const T & Get (const INDEX_2 & ahash) const { int pos = Position0 (ahash); return cont[pos]; } inline bool Used (const INDEX_2 & ahash) const { int pos = Position0 (ahash); return (pos != -1); } inline void SetData0 (int pos, const INDEX_2 & ahash, const T & acont) { hash[pos] = ahash; cont[pos] = acont; } /// inline void GetData0 (int pos, INDEX_2 & ahash, T & acont) const { ahash = hash[pos]; acont = cont[pos]; } inline void SetData0 (int pos, const T & acont) { cont[pos] = acont; } inline void GetData0 (int pos, T & acont) const { acont = cont[pos]; } /// const T & GetData0 (int pos) { return cont[pos]; } /// inline void SetSize (size_t size) { BaseSetSize(size); cont.SetSize(RoundUp2(size)); } /// inline void PrintMemInfo (ostream & ost) const; /// inline void DeleteData () { SetSize (cont.Size()); } void SetName (const char * aname) { ; // cont.SetName(aname); // hash.SetName(aname); } }; template inline ostream & operator<< (ostream & ost, const INDEX_2_CLOSED_HASHTABLE & ht) { for (int i = 0; i < ht.Size(); i++) if (ht.UsedPos(i)) { INDEX_2 hash; T data; ht.GetData0 (i, hash, data); ost << "hash = " << hash << ", data = " << data << endl; } return ost; } class BASE_INDEX_3_CLOSED_HASHTABLE { protected: Array hash; int invalid; size_t mask; protected: BASE_INDEX_3_CLOSED_HASHTABLE (size_t size) : hash(RoundUp2(size)) { // cout << "orig size = " << size // << ", roundup size = " << hash.Size(); size = hash.Size(); mask = size-1; // cout << "mask = " << mask << endl; invalid = -1; for (size_t i = 0; i < size; i++) hash[i].I1() = invalid; } public: int Size() const { return hash.Size(); } bool UsedPos (int pos) const { return ! (hash[pos].I1() == invalid); } int UsedElements () const { int n = hash.Size(); int cnt = 0; for (int i = 0; i < n; i++) if (hash[i].I1() != invalid) cnt++; return cnt; } int HashValue (const INDEX_3 & ind) const { // return (ind.I1() + 15 * ind.I2() + 41 * ind.I3()) % hash.Size(); return (ind.I1() + 15 * ind.I2() + 41 * ind.I3()) & mask; } int Position (const INDEX_3 & ind) const { int i = HashValue(ind); while (1) { if (hash[i] == ind) return i; if (hash[i].I1() == invalid) return -1; // i = (i+1) % hash.Size(); i = (i+1) & mask; } } int Costs (const INDEX_3 & ind) const { int i = HashValue(ind); int c = 1; while (1) { if (hash[i] == ind) return c; if (hash[i].I1() == invalid) return c; // i = (i+1) % hash.Size(); i = (i+1) & mask; c++; } } // returns true, if new position is created bool PositionCreate (const INDEX_3 & ind, int & apos) { int i = HashValue (ind); if (hash[i] == ind) { apos = i; return false; } if (hash[i].I1() == invalid) { hash[i] = ind; apos = i; return true; } return PositionCreate2 (ind, apos); } void DeleteData() { size_t size = hash.Size(); for (size_t i = 0; i < size; i++) hash[i].I1() = invalid; } protected: bool PositionCreate2 (const INDEX_3 & ind, int & apos); void BaseSetSize (int asize); }; template class INDEX_3_CLOSED_HASHTABLE : public BASE_INDEX_3_CLOSED_HASHTABLE { // MoveableArray cont; Array cont; public: INDEX_3_CLOSED_HASHTABLE (int size) : BASE_INDEX_3_CLOSED_HASHTABLE(size), cont(RoundUp2(size)) { ; //cont.SetName ("i3-hashtable, contents"); } void Set (const INDEX_3 & ahash, const T & acont) { int pos; PositionCreate (ahash, pos); hash[pos] = ahash; cont[pos] = acont; } const T & Get (const INDEX_3 & ahash) const { return cont[Position (ahash)]; } bool Used (const INDEX_3 & ahash) const { return (Position (ahash) != -1); } void SetData (int pos, const INDEX_3 & ahash, const T & acont) { hash[pos] = ahash; cont[pos] = acont; } void GetData (int pos, INDEX_3 & ahash, T & acont) const { ahash = hash[pos]; acont = cont[pos]; } void SetData (int pos, const T & acont) { cont[pos] = acont; } void GetData (int pos, T & acont) const { acont = cont[pos]; } const T & GetData (int pos) const { return cont[pos]; } void SetSize (int size) { BaseSetSize(size); cont.SetSize(hash.Size()); } void PrintMemInfo (ostream & ost) const { cout << "Hashtable: " << Size() << " entries of size " << sizeof(INDEX_3) << " + " << sizeof(T) << " = " << Size() * (sizeof(INDEX_3) + sizeof(T)) << " bytes" << endl; } void DeleteData () { SetSize (cont.Size()); } void SetName (const char * aname) { ; // cont.SetName(aname); // hash.SetName(aname); } }; template inline ostream & operator<< (ostream & ost, const INDEX_3_CLOSED_HASHTABLE & ht) { for (int i = 0; i < ht.Size(); i++) if (ht.UsedPos(i)) { INDEX_3 hash; T data; ht.GetData (i, hash, data); ost << "hash = " << hash << ", data = " << data << endl; } return ost; } template inline INDEX_3_HASHTABLE :: INDEX_3_HASHTABLE (int size) : BASE_INDEX_3_HASHTABLE (size), cont(size) { ; } template inline int INDEX_3_HASHTABLE :: PositionCreate (const INDEX_3 & ahash, int & bnr, int & colnr) { bnr = HashValue (ahash); colnr = Position (bnr, ahash); if (!colnr) { hash.Add (bnr, ahash); cont.AddEmpty (bnr); colnr = cont.EntrySize (bnr); return 1; } return 0; } template inline void INDEX_3_HASHTABLE :: Set (const INDEX_3 & ahash, const T & acont) { int bnr = HashValue (ahash); int pos = Position (bnr, ahash); if (pos) cont.Set (bnr, pos, acont); else { hash.Add1 (bnr, ahash); cont.Add1 (bnr, acont); } } template inline const T & INDEX_3_HASHTABLE :: Get (const INDEX_3 & ahash) const { int bnr = HashValue (ahash); int pos = Position (bnr, ahash); return cont.Get (bnr, pos); } template inline bool INDEX_3_HASHTABLE :: Used (const INDEX_3 & ahash) const { return (Position (HashValue (ahash), ahash)) ? 1 : 0; } template inline int INDEX_3_HASHTABLE :: GetNBags () const { return cont.Size(); } template inline int INDEX_3_HASHTABLE :: GetBagSize (int bnr) const { return cont.EntrySize (bnr); } template inline void INDEX_3_HASHTABLE :: GetData (int bnr, int colnr, INDEX_3 & ahash, T & acont) const { ahash = hash.Get(bnr, colnr); acont = cont.Get(bnr, colnr); } template inline void INDEX_3_HASHTABLE :: SetData (int bnr, int colnr, const INDEX_3 & ahash, const T & acont) { hash.Set(bnr, colnr, ahash); cont.Set(bnr, colnr, acont); } template inline void INDEX_3_HASHTABLE :: SetSize (int size) { hash.SetSize (size); cont.SetSize (size); } template inline void INDEX_3_HASHTABLE :: DeleteData () { int n = hash.Size(); hash.SetSize (n); cont.SetSize (n); } template inline void INDEX_3_HASHTABLE :: PrepareSet (const INDEX_3 & ahash) { int bnr = HashValue (ahash); hash.IncSizePrepare (bnr-1); cont.IncSizePrepare (bnr-1); } template inline void INDEX_3_HASHTABLE :: AllocateElements () { hash.AllocateElementsOneBlock(); cont.AllocateElementsOneBlock(); } template inline void INDEX_3_HASHTABLE :: PrintMemInfo (ostream & ost) const { ost << "Hash: " << endl; hash.PrintMemInfo (ost); ost << "Cont: " << endl; cont.PrintMemInfo (ost); } template inline INDEX_HASHTABLE :: INDEX_HASHTABLE (int size) : BASE_INDEX_HASHTABLE (size), cont(size) { ; } template inline void INDEX_HASHTABLE :: Set (const INDEX & ahash, const T & acont) { int bnr = HashValue (ahash); int pos = Position (bnr, ahash); if (pos) cont.Set (bnr, pos, acont); else { hash.Add (bnr, ahash); cont.Add (bnr, acont); } } template inline const T & INDEX_HASHTABLE :: Get (const INDEX & ahash) const { int bnr = HashValue (ahash); int pos = Position (bnr, ahash); return cont.Get (bnr, pos); } template inline bool INDEX_HASHTABLE :: Used (const INDEX & ahash) const { return (Position (HashValue (ahash), ahash)) ? 1 : 0; } template inline int INDEX_HASHTABLE :: GetNBags () const { return hash.Size(); } template inline int INDEX_HASHTABLE :: GetBagSize (int bnr) const { return hash.EntrySize(bnr); } template inline void INDEX_HASHTABLE :: GetData (int bnr, int colnr, INDEX & ahash, T & acont) const { ahash = hash.Get(bnr, colnr); acont = cont.Get(bnr, colnr); } template inline void INDEX_HASHTABLE :: PrintMemInfo (ostream & ost) const { ost << "Hash: " << endl; hash.PrintMemInfo (ost); ost << "Cont: " << endl; cont.PrintMemInfo (ost); } /* *********** Closed Hashing ************************* */ template inline void INDEX_2_CLOSED_HASHTABLE :: PrintMemInfo (ostream & ost) const { cout << "Hashtable: " << Size() << " entries of size " << sizeof(INDEX_2) << " + " << sizeof(T) << " = " << Size() * (sizeof(INDEX_2) + sizeof(T)) << " bytes." << " Used els: " << UsedElements() << endl; } /* template inline INDEX_3_CLOSED_HASHTABLE :: INDEX_3_CLOSED_HASHTABLE (int size) : BASE_INDEX_3_CLOSED_HASHTABLE(size), cont(size) { cont.SetName ("i3-hashtable, contents"); } template inline void INDEX_3_CLOSED_HASHTABLE :: Set (const INDEX_3 & ahash, const T & acont) { int pos; PositionCreate (ahash, pos); hash.Elem(pos) = ahash; cont.Elem(pos) = acont; } template inline const T & INDEX_3_CLOSED_HASHTABLE :: Get (const INDEX_3 & ahash) const { int pos = Position (ahash); return cont[pos]; } template inline bool INDEX_3_CLOSED_HASHTABLE :: Used (const INDEX_3 & ahash) const { int pos = Position (ahash); return (pos != 0); } template inline void INDEX_3_CLOSED_HASHTABLE :: SetData (int pos, const INDEX_3 & ahash, const T & acont) { hash.Elem(pos) = ahash; cont.Elem(pos) = acont; } template inline void INDEX_3_CLOSED_HASHTABLE :: GetData (int pos, INDEX_3 & ahash, T & acont) const { ahash = hash.Get(pos); acont = cont.Get(pos); } template inline void INDEX_3_CLOSED_HASHTABLE :: SetData (int pos, const T & acont) { cont.Elem(pos) = acont; } template inline void INDEX_3_CLOSED_HASHTABLE :: GetData (int pos, T & acont) const { acont = cont.Get(pos); } template inline const T & INDEX_3_CLOSED_HASHTABLE :: GetData (int pos) const { return cont.Get(pos); } template inline void INDEX_3_CLOSED_HASHTABLE :: SetSize (int size) { BaseSetSize(size); cont.SetSize(size); } template inline void INDEX_3_CLOSED_HASHTABLE :: PrintMemInfo (ostream & ost) const { cout << "Hashtable: " << Size() << " entries of size " << sizeof(INDEX_3) << " + " << sizeof(T) << " = " << Size() * (sizeof(INDEX_3) + sizeof(T)) << " bytes" << endl; } */ inline void SetInvalid (INDEX & i) { i = -1; } inline bool IsInvalid (INDEX i) { return i == -1; } inline size_t HashValue (INDEX i, size_t size) { return (113*size_t(i)) % size; } inline void SetInvalid (INDEX_2 & i2) { i2[0] = -1; } inline bool IsInvalid (INDEX_2 i2) { return i2[0] == -1; } inline size_t HashValue (INDEX_2 i2, size_t size) { return (113*size_t(i2[0])+size_t(i2[1])) % size; } /** A closed hash-table. All information is stored in one fixed array. The array should be allocated with the double size of the expected number of entries. */ template class ClosedHashTable { protected: /// size_t size; /// size_t used; /// Array hash; /// Array cont; public: /// ClosedHashTable (size_t asize = 128) : size(asize), used(0), hash(asize), cont(asize) { for (auto & v : hash) SetInvalid(v); } ClosedHashTable (ClosedHashTable && ht2) = default; // who needs that ? ClosedHashTable (FlatArray _hash, FlatArray _cont) : size(_hash.Size()), used(0), hash(_hash.Size(), _hash.Addr(0)), cont(_cont.Size(), _cont.Addr(0)) { for (auto & v : hash) SetInvalid(v); } ClosedHashTable & operator= (ClosedHashTable && ht2) = default; /// size_t Size() const { return size; } /// is position used bool UsedPos (size_t pos) const { return ! (IsInvalid(hash[pos])); } /// number of used elements size_t UsedElements () const { return used; /* size_t cnt = 0; for (size_t i = 0; i < size; i++) if (hash[i] != invalid) cnt++; return cnt; */ } size_t Position (const T_HASH ind) const { size_t i = HashValue(ind, size); while (1) { if (hash[i] == ind) return i; if (IsInvalid(hash[i])) return size_t(-1); i++; if (i >= size) i = 0; } } void DoubleSize() { ClosedHashTable tmp(2*Size()); for (auto both : *this) tmp[both.first] = both.second; *this = move(tmp); } // returns true if new position is created bool PositionCreate (const T_HASH ind, size_t & apos) { if (UsedElements()*2 > Size()) DoubleSize(); size_t i = HashValue (ind, size); while (1) { if (IsInvalid(hash[i])) { hash[i] = ind; apos = i; used++; return true; } if (hash[i] == ind) { apos = i; return false; } i++; if (i >= size) i = 0; } } /// void Set (const T_HASH & ahash, const T & acont) { size_t pos; PositionCreate (ahash, pos); hash[pos] = ahash; cont[pos] = acont; } /// const T & Get (const T_HASH & ahash) const { size_t pos = Position (ahash); if (pos == size_t(-1)) throw Exception (string("illegal key: ") + ToString(ahash) ); return cont[pos]; } /// bool Used (const T_HASH & ahash) const { return (Position (ahash) != size_t(-1)); } void SetData (size_t pos, const T_HASH & ahash, const T & acont) { hash[pos] = ahash; cont[pos] = acont; } void GetData (size_t pos, T_HASH & ahash, T & acont) const { ahash = hash[pos]; acont = cont[pos]; } void SetData (size_t pos, const T & acont) { cont[pos] = acont; } void GetData (size_t pos, T & acont) const { acont = cont[pos]; } pair GetBoth (size_t pos) const { return pair (hash[pos], cont[pos]); } const T & operator[] (T_HASH key) const { return Get(key); } T & operator[] (T_HASH key) { size_t pos; PositionCreate(key, pos); return cont[pos]; } void SetSize (size_t asize) { size = asize; hash.Alloc(size); cont.Alloc(size); // for (size_t i = 0; i < size; i++) // hash[i] = invalid; // hash = T_HASH(invalid); for (auto & v : hash) SetInvalid(v); } void Delete (T_HASH key) { size_t pos = Position(key); if (pos == size_t(-1)) return; SetInvalid (hash[pos]); used--; while (1) { size_t nextpos = pos+1; if (nextpos == size) nextpos = 0; if (IsInvalid(hash[nextpos])) break; auto key = hash[nextpos]; auto val = cont[nextpos]; SetInvalid (hash[nextpos]); used--; Set (key, val); pos = nextpos; } } class Iterator { const ClosedHashTable & tab; size_t nr; public: Iterator (const ClosedHashTable & _tab, size_t _nr) : tab(_tab), nr(_nr) { while (nr < tab.Size() && !tab.UsedPos(nr)) nr++; } Iterator & operator++() { nr++; while (nr < tab.Size() && !tab.UsedPos(nr)) nr++; return *this; } bool operator!= (const Iterator & it2) { return nr != it2.nr; } auto operator* () const { T_HASH hash; T val; tab.GetData(nr, hash,val); return std::make_pair(hash,val); } }; Iterator begin() const { return Iterator(*this, 0); } Iterator end() const { return Iterator(*this, Size()); } }; template ostream & operator<< (ostream & ost, const ClosedHashTable & tab) { for (size_t i = 0; i < tab.Size(); i++) if (tab.UsedPos(i)) { T_HASH key; T val; tab.GetData (i, key, val); ost << key << ": " << val << ", "; } return ost; } } #endif netgen-6.2.1804/libsrc/general/optmem.cpp0000644000175000017500000000353113272137567016707 0ustar kurtkurt/**************************************************************************/ /* File: optmem.cpp */ /* Author: Joachim Schoeberl */ /* Date: 04. Apr. 97 */ /**************************************************************************/ /* Abstract data type Array */ #include #include namespace netgen { static mutex block_allocator_mutex; BlockAllocator :: BlockAllocator (unsigned asize, unsigned ablocks) : bablocks (0) { if (asize < sizeof(void*)) asize = sizeof(void*); size = asize; blocks = ablocks; freelist = NULL; } BlockAllocator :: ~BlockAllocator () { // cout << "****************** delete BlockAllocator " << endl; for (int i = 0; i < bablocks.Size(); i++) delete [] bablocks[i]; bablocks.SetSize(0); } void * BlockAllocator :: Alloc () { void * p; { lock_guard guard(block_allocator_mutex); // return new char[size]; if (!freelist) { // cout << "freelist = " << freelist << endl; // cout << "BlockAlloc: " << size*blocks << endl; char * hcp = new char [size * blocks]; bablocks.Append (hcp); bablocks.Last() = hcp; for (unsigned i = 0; i < blocks-1; i++) *(void**)&(hcp[i * size]) = &(hcp[ (i+1) * size]); *(void**)&(hcp[(blocks-1)*size]) = NULL; freelist = hcp; } p = freelist; freelist = *(void**)freelist; } return p; } void BlockAllocator :: Free (void * p) { { lock_guard guard(block_allocator_mutex); if (bablocks.Size()) { *(void**)p = freelist; freelist = p; } } } } netgen-6.2.1804/libsrc/general/autoptr.hpp0000644000175000017500000000170113272137567017106 0ustar kurtkurt#ifndef FILE_AUTOPTR #define FILE_AUTOPTR /**************************************************************************/ /* File: autoptr.hpp */ /* Author: STL, Joachim Schoeberl */ /* Date: 29. Dec. 02 */ /**************************************************************************/ namespace netgen { /* template class AutoPtr { private: T * ptr; public: typedef T* pT; explicit AutoPtr (T * p = 0) { ptr = p; } ~AutoPtr () { delete ptr; } T & operator*() const { return *ptr; } T* operator->() const { return ptr; } T *& Ptr() { return ptr; } T * Ptr() const { return ptr; } void Reset(T * p = 0) { if (p != ptr) { delete ptr; ptr = p; } } operator bool () { return ptr != 0; } private: AutoPtr (AutoPtr &) { ; } AutoPtr & operator= (AutoPtr &) { ; } }; */ } #endif netgen-6.2.1804/libsrc/general/ngsimd.hpp0000644000175000017500000006766713272137567016720 0ustar kurtkurt#ifndef FILE_NGSIMD #define FILE_NGSIMD /**************************************************************************/ /* File: ngsimd.hpp */ /* Author: Joachim Schoeberl */ /* Date: 25. Mar. 16 */ /**************************************************************************/ #include #include #include #include #include #include #ifdef WIN32 #ifndef AVX_OPERATORS_DEFINED #define AVX_OPERATORS_DEFINED NG_INLINE __m128d operator- (__m128d a) { return _mm_xor_pd(a, _mm_set1_pd(-0.0)); } NG_INLINE __m128d operator+ (__m128d a, __m128d b) { return _mm_add_pd(a,b); } NG_INLINE __m128d operator- (__m128d a, __m128d b) { return _mm_sub_pd(a,b); } NG_INLINE __m128d operator* (__m128d a, __m128d b) { return _mm_mul_pd(a,b); } NG_INLINE __m128d operator/ (__m128d a, __m128d b) { return _mm_div_pd(a,b); } NG_INLINE __m128d operator* (double a, __m128d b) { return _mm_set1_pd(a)*b; } NG_INLINE __m128d operator* (__m128d b, double a) { return _mm_set1_pd(a)*b; } NG_INLINE __m128d operator+= (__m128d &a, __m128d b) { return a = a+b; } NG_INLINE __m128d operator-= (__m128d &a, __m128d b) { return a = a-b; } NG_INLINE __m128d operator*= (__m128d &a, __m128d b) { return a = a*b; } NG_INLINE __m128d operator/= (__m128d &a, __m128d b) { return a = a/b; } NG_INLINE __m256d operator- (__m256d a) { return _mm256_xor_pd(a, _mm256_set1_pd(-0.0)); } NG_INLINE __m256d operator+ (__m256d a, __m256d b) { return _mm256_add_pd(a,b); } NG_INLINE __m256d operator- (__m256d a, __m256d b) { return _mm256_sub_pd(a,b); } NG_INLINE __m256d operator* (__m256d a, __m256d b) { return _mm256_mul_pd(a,b); } NG_INLINE __m256d operator/ (__m256d a, __m256d b) { return _mm256_div_pd(a,b); } NG_INLINE __m256d operator* (double a, __m256d b) { return _mm256_set1_pd(a)*b; } NG_INLINE __m256d operator* (__m256d b, double a) { return _mm256_set1_pd(a)*b; } NG_INLINE __m256d operator+= (__m256d &a, __m256d b) { return a = a+b; } NG_INLINE __m256d operator-= (__m256d &a, __m256d b) { return a = a-b; } NG_INLINE __m256d operator*= (__m256d &a, __m256d b) { return a = a*b; } NG_INLINE __m256d operator/= (__m256d &a, __m256d b) { return a = a/b; } #endif #endif namespace ngsimd { // MSVC does not define SSE. It's always present on 64bit cpus #if (defined(_M_AMD64) || defined(_M_X64) || defined(__AVX__)) #ifndef __SSE__ #define __SSE__ #endif #ifndef __SSE2__ #define __SSE2__ #endif #endif constexpr int GetDefaultSIMDSize() { #if defined __AVX512F__ return 8; #elif defined __AVX__ return 4; #elif defined __SSE__ return 2; #else return 1; #endif } #if defined __AVX512F__ typedef __m512 tAVX; typedef __m512d tAVXd; #elif defined __AVX__ typedef __m256 tAVX; typedef __m256d tAVXd; #elif defined __SSE__ typedef __m128 tAVX; typedef __m128d tAVXd; #endif template class SIMD; template struct has_call_operator { template static std::true_type check( decltype( sizeof(&C::operator() )) ) { return std::true_type(); } template static std::false_type check(...) { return std::false_type(); } typedef decltype( check(sizeof(char)) ) type; static constexpr type value = type(); }; template // a*b+c NG_INLINE auto FMA(T1 a, T2 b, T3 c) { return a*b+c; } template::value, int>::type = 0> NG_INLINE SIMD operator+ (T a, SIMD b) { return SIMD(a) + b; } template::value, int>::type = 0> NG_INLINE SIMD operator- (T a, SIMD b) { return SIMD(a) - b; } template::value, int>::type = 0> NG_INLINE SIMD operator* (T a, SIMD b) { return SIMD(a) * b; } template::value, int>::type = 0> NG_INLINE SIMD operator/ (T a, SIMD b) { return SIMD(a) / b; } template::value, int>::type = 0> NG_INLINE SIMD operator+ (SIMD a, T b) { return a + SIMD(b); } template::value, int>::type = 0> NG_INLINE SIMD operator- (SIMD a, T b) { return a - SIMD(b); } template::value, int>::type = 0> NG_INLINE SIMD operator* (SIMD a, T b) { return a * SIMD(b); } template::value, int>::type = 0> NG_INLINE SIMD operator/ (SIMD a, T b) { return a / SIMD(b); } #ifdef __AVX__ template class AlignedAlloc { protected: static void * aligned_malloc(size_t s) { // Assume 16 byte alignment of standard library if(alignof(T)<=16) return malloc(s); else return _mm_malloc(s, alignof(T)); } static void aligned_free(void *p) { if(alignof(T)<=16) free(p); else _mm_free(p); } public: void * operator new (size_t s, void *p) { return p; } void * operator new (size_t s) { return aligned_malloc(s); } void * operator new[] (size_t s) { return aligned_malloc(s); } void operator delete (void * p) { aligned_free(p); } void operator delete[] (void * p) { aligned_free(p); } }; #else // it's only a dummy without AVX template class AlignedAlloc { ; }; #endif using std::sqrt; using std::fabs; class ExceptionNOSIMD : public std::runtime_error { public: using std::runtime_error::runtime_error; std::string What() { return what(); } }; using std::exp; template NG_INLINE SIMD exp (SIMD a) { return SIMD([&](int i)->double { return exp(a[i]); } ); } using std::log; template NG_INLINE SIMD log (SIMD a) { return SIMD([&](int i)->double { return log(a[i]); } ); } using std::pow; template NG_INLINE SIMD pow (SIMD a, double x) { return SIMD([&](int i)->double { return pow(a[i],x); } ); } using std::sin; template NG_INLINE SIMD sin (SIMD a) { return SIMD([&](int i)->double { return sin(a[i]); } ); } using std::cos; template NG_INLINE SIMD cos (SIMD a) { return SIMD([&](int i)->double { return cos(a[i]); } ); } using std::tan; template NG_INLINE SIMD tan (SIMD a) { return SIMD([&](int i)->double { return tan(a[i]); } ); } using std::atan; template NG_INLINE SIMD atan (SIMD a) { return SIMD([&](int i)->double { return atan(a[i]); } ); } ///////////////////////////////////////////////////////////////////////////// // SIMD width 1 (in case no AVX support is available) ///////////////////////////////////////////////////////////////////////////// template<> class SIMD { double data; public: static constexpr int Size() { return 1; } SIMD () = default; SIMD (const SIMD &) = default; SIMD & operator= (const SIMD &) = default; // only called if T has a call operator of appropriate type template>::value, int>::type = 0> SIMD (const T & func) { data = func(0); } // only called if T is arithmetic (integral or floating point types) template::value, int>::type = 0> SIMD (const T & val) { data = val; } SIMD (double const * p) { data = *p; } NG_INLINE operator double() const { return data; } NG_INLINE double operator[] (int i) const { return ((double*)(&data))[i]; } NG_INLINE double Data() const { return data; } NG_INLINE double & Data() { return data; } NG_INLINE SIMD &operator+= (SIMD b) { data+=b.Data(); return *this; } NG_INLINE SIMD &operator-= (SIMD b) { data-=b.Data(); return *this; } NG_INLINE SIMD &operator*= (SIMD b) { data*=b.Data(); return *this; } NG_INLINE SIMD &operator/= (SIMD b) { data/=b.Data(); return *this; } }; NG_INLINE SIMD operator+ (SIMD a, SIMD b) { return a.Data()+b.Data(); } NG_INLINE SIMD operator- (SIMD a, SIMD b) { return a.Data()-b.Data(); } NG_INLINE SIMD operator- (SIMD a) { return -a.Data(); } NG_INLINE SIMD operator* (SIMD a, SIMD b) { return a.Data()*b.Data(); } NG_INLINE SIMD operator/ (SIMD a, SIMD b) { return a.Data()/b.Data(); } NG_INLINE SIMD sqrt (SIMD a) { return std::sqrt(a.Data()); } NG_INLINE SIMD floor (SIMD a) { return std::floor(a.Data()); } NG_INLINE SIMD ceil (SIMD a) { return std::ceil(a.Data()); } NG_INLINE SIMD fabs (SIMD a) { return std::fabs(a.Data()); } NG_INLINE SIMD L2Norm2 (SIMD a) { return a.Data()*a.Data(); } NG_INLINE SIMD Trans (SIMD a) { return a; } NG_INLINE SIMD IfPos (SIMD a, SIMD b, SIMD c) { return (a.Data() > 0) ? b : c; } NG_INLINE double HSum (SIMD sd) { return sd.Data(); } NG_INLINE auto HSum (SIMD sd1, SIMD sd2) { return std::make_tuple(sd1.Data(), sd2.Data()); } NG_INLINE auto HSum (SIMD sd1, SIMD sd2, SIMD sd3, SIMD sd4) { return std::make_tuple(sd1.Data(), sd2.Data(), sd3.Data(), sd4.Data()); } ///////////////////////////////////////////////////////////////////////////// // SSE - Simd width 2 ///////////////////////////////////////////////////////////////////////////// #ifdef __SSE__ template<> class alignas(16) SIMD // : public AlignedAlloc> { __m128d data; public: static constexpr int Size() { return 2; } SIMD () = default; SIMD (const SIMD &) = default; SIMD & operator= (const SIMD &) = default; SIMD (__m128d adata) : data(adata) { ; } // only called if T has a call operator of appropriate type template>::value, int>::type = 0> SIMD (const T & func) { data = _mm_set_pd(func(1), func(0)); } // only called if T is arithmetic (integral or floating point types) template::value, int>::type = 0> SIMD (const T & val) { data = _mm_set1_pd(val); } SIMD (double const * p) { data = _mm_loadu_pd(p); } NG_INLINE operator __m128d() const { return data; } NG_INLINE double operator[] (int i) const { return ((double*)(&data))[i]; } NG_INLINE double& operator[] (int i) { return ((double*)(&data))[i]; } NG_INLINE __m128d Data() const { return data; } NG_INLINE __m128d & Data() { return data; } // NG_INLINE operator std::tuple () // { return std::tuple((*this)[0], (*this)[1], (*this)[2], (*this)[3]); } NG_INLINE SIMD &operator+= (SIMD b) { data+=b.Data(); return *this; } NG_INLINE SIMD &operator-= (SIMD b) { data-=b.Data(); return *this; } NG_INLINE SIMD &operator*= (SIMD b) { data*=b.Data(); return *this; } NG_INLINE SIMD &operator/= (SIMD b) { data/=b.Data(); return *this; } }; NG_INLINE SIMD operator+ (SIMD a, SIMD b) { return a.Data()+b.Data(); } NG_INLINE SIMD operator- (SIMD a, SIMD b) { return a.Data()-b.Data(); } NG_INLINE SIMD operator- (SIMD a) { return -a.Data(); } NG_INLINE SIMD operator* (SIMD a, SIMD b) { return a.Data()*b.Data(); } NG_INLINE SIMD operator/ (SIMD a, SIMD b) { return a.Data()/b.Data(); } /* NG_INLINE SIMD sqrt (SIMD a) { return _mm256_sqrt_pd(a.Data()); } NG_INLINE SIMD floor (SIMD a) { return _mm256_floor_pd(a.Data()); } NG_INLINE SIMD ceil (SIMD a) { return _mm256_ceil_pd(a.Data()); } NG_INLINE SIMD fabs (SIMD a) { return _mm256_max_pd(a.Data(), -a.Data()); } NG_INLINE SIMD L2Norm2 (SIMD a) { return a.Data()*a.Data(); } NG_INLINE SIMD Trans (SIMD a) { return a; } NG_INLINE SIMD IfPos (SIMD a, SIMD b, SIMD c) { auto cp = _mm256_cmp_pd (a.Data(), _mm256_setzero_pd(), _CMP_GT_OS); return _mm256_blendv_pd(c.Data(), b.Data(), cp); } NG_INLINE double HSum (SIMD sd) { __m128d hv = _mm_add_pd (_mm256_extractf128_pd(sd.Data(),0), _mm256_extractf128_pd(sd.Data(),1)); return _mm_cvtsd_f64 (_mm_hadd_pd (hv, hv)); } NG_INLINE auto HSum (SIMD sd1, SIMD sd2) { __m256d hv = _mm256_hadd_pd(sd1.Data(), sd2.Data()); __m128d hv2 = _mm_add_pd (_mm256_extractf128_pd(hv,0), _mm256_extractf128_pd(hv,1)); return std::make_tuple(_mm_cvtsd_f64 (hv2), _mm_cvtsd_f64(_mm_shuffle_pd (hv2, hv2, 3))); } NG_INLINE auto HSum (SIMD v1, SIMD v2, SIMD v3, SIMD v4) { __m256d hsum1 = _mm256_hadd_pd (v1.Data(), v2.Data()); __m256d hsum2 = _mm256_hadd_pd (v3.Data(), v4.Data()); __m256d hsum = _mm256_add_pd (_mm256_permute2f128_pd (hsum1, hsum2, 1+2*16), _mm256_blend_pd (hsum1, hsum2, 12)); return SIMD(hsum); } */ #endif // __SSE__ ///////////////////////////////////////////////////////////////////////////// // AVX - Simd width 4 ///////////////////////////////////////////////////////////////////////////// #ifdef __AVX__ template<> class alignas(32) SIMD : public AlignedAlloc> { __m256d data; public: static constexpr int Size() { return 4; } SIMD () = default; SIMD (const SIMD &) = default; SIMD & operator= (const SIMD &) = default; SIMD (__m256d adata) : data(adata) { ; } // only called if T has a call operator of appropriate type template>::value, int>::type = 0> SIMD (const T & func) { data = _mm256_set_pd(func(3), func(2), func(1), func(0)); } // only called if T is arithmetic (integral or floating point types) template::value, int>::type = 0> SIMD (const T & val) { data = _mm256_set1_pd(val); } SIMD (double const * p) { data = _mm256_loadu_pd(p); } NG_INLINE operator __m256d() const { return data; } NG_INLINE double operator[] (int i) const { return ((double*)(&data))[i]; } NG_INLINE double& operator[] (int i) { return ((double*)(&data))[i]; } NG_INLINE __m256d Data() const { return data; } NG_INLINE __m256d & Data() { return data; } NG_INLINE operator std::tuple () { return std::tuple((*this)[0], (*this)[1], (*this)[2], (*this)[3]); } NG_INLINE SIMD &operator+= (SIMD b) { data+=b.Data(); return *this; } NG_INLINE SIMD &operator-= (SIMD b) { data-=b.Data(); return *this; } NG_INLINE SIMD &operator*= (SIMD b) { data*=b.Data(); return *this; } NG_INLINE SIMD &operator/= (SIMD b) { data/=b.Data(); return *this; } }; NG_INLINE SIMD operator+ (SIMD a, SIMD b) { return a.Data()+b.Data(); } NG_INLINE SIMD operator- (SIMD a, SIMD b) { return a.Data()-b.Data(); } NG_INLINE SIMD operator- (SIMD a) { return -a.Data(); } NG_INLINE SIMD operator* (SIMD a, SIMD b) { return a.Data()*b.Data(); } NG_INLINE SIMD operator/ (SIMD a, SIMD b) { return a.Data()/b.Data(); } NG_INLINE SIMD sqrt (SIMD a) { return _mm256_sqrt_pd(a.Data()); } NG_INLINE SIMD floor (SIMD a) { return _mm256_floor_pd(a.Data()); } NG_INLINE SIMD ceil (SIMD a) { return _mm256_ceil_pd(a.Data()); } NG_INLINE SIMD fabs (SIMD a) { return _mm256_max_pd(a.Data(), -a.Data()); } NG_INLINE SIMD L2Norm2 (SIMD a) { return a.Data()*a.Data(); } NG_INLINE SIMD Trans (SIMD a) { return a; } NG_INLINE SIMD IfPos (SIMD a, SIMD b, SIMD c) { auto cp = _mm256_cmp_pd (a.Data(), _mm256_setzero_pd(), _CMP_GT_OS); return _mm256_blendv_pd(c.Data(), b.Data(), cp); } NG_INLINE double HSum (SIMD sd) { __m128d hv = _mm_add_pd (_mm256_extractf128_pd(sd.Data(),0), _mm256_extractf128_pd(sd.Data(),1)); return _mm_cvtsd_f64 (_mm_hadd_pd (hv, hv)); } NG_INLINE auto HSum (SIMD sd1, SIMD sd2) { __m256d hv = _mm256_hadd_pd(sd1.Data(), sd2.Data()); __m128d hv2 = _mm_add_pd (_mm256_extractf128_pd(hv,0), _mm256_extractf128_pd(hv,1)); return std::make_tuple(_mm_cvtsd_f64 (hv2), _mm_cvtsd_f64(_mm_shuffle_pd (hv2, hv2, 3))); } NG_INLINE auto HSum (SIMD v1, SIMD v2, SIMD v3, SIMD v4) { __m256d hsum1 = _mm256_hadd_pd (v1.Data(), v2.Data()); __m256d hsum2 = _mm256_hadd_pd (v3.Data(), v4.Data()); __m256d hsum = _mm256_add_pd (_mm256_permute2f128_pd (hsum1, hsum2, 1+2*16), _mm256_blend_pd (hsum1, hsum2, 12)); return SIMD(hsum); } #endif // __AVX__ ///////////////////////////////////////////////////////////////////////////// // AVX512 - Simd width 8 ///////////////////////////////////////////////////////////////////////////// #ifdef __AVX512F__ template<> class alignas(64) SIMD : public AlignedAlloc> { __m512d data; public: static constexpr int Size() { return 8; } SIMD () = default; SIMD (const SIMD &) = default; SIMD & operator= (const SIMD &) = default; SIMD (__m512d adata) : data(adata) { ; } // only called if T has a call operator of appropriate type template>::value, int>::type = 0> SIMD (const T & func) { data = _mm512_set_pd(func(7), func(6), func(5), func(4), func(3), func(2), func(1), func(0)); } // only called if T is arithmetic (integral or floating point types) template::value, int>::type = 0> SIMD (const T & val) { data = _mm512_set1_pd(val); } SIMD (double const * p) { data = _mm512_loadu_pd(p); } NG_INLINE operator __m512d() const { return data; } NG_INLINE double operator[] (int i) const { return ((double*)(&data))[i]; } NG_INLINE __m512d Data() const { return data; } NG_INLINE __m512d & Data() { return data; } NG_INLINE SIMD &operator+= (SIMD b) { data+=b.Data(); return *this; } NG_INLINE SIMD &operator-= (SIMD b) { data-=b.Data(); return *this; } NG_INLINE SIMD &operator*= (SIMD b) { data*=b.Data(); return *this; } NG_INLINE SIMD &operator/= (SIMD b) { data/=b.Data(); return *this; } }; NG_INLINE SIMD operator- (SIMD a) { return _mm512_sub_pd(_mm512_setzero_pd(), a.Data()); } NG_INLINE SIMD operator+ (SIMD a, SIMD b) { return _mm512_add_pd(a.Data(),b.Data()); } NG_INLINE SIMD operator- (SIMD a, SIMD b) { return _mm512_sub_pd(a.Data(),b.Data()); } NG_INLINE SIMD operator* (SIMD a, SIMD b) { return _mm512_mul_pd(a.Data(),b.Data()); } NG_INLINE SIMD operator/ (SIMD a, SIMD b) { return _mm512_div_pd(a.Data(),b.Data()); } NG_INLINE SIMD sqrt (SIMD a) { return _mm512_sqrt_pd(a.Data()); } NG_INLINE SIMD floor (SIMD a) { return _mm512_floor_pd(a.Data()); } NG_INLINE SIMD ceil (SIMD a) { return _mm512_ceil_pd(a.Data()); } NG_INLINE SIMD fabs (SIMD a) { return _mm512_max_pd(a.Data(), -a.Data()); } NG_INLINE SIMD L2Norm2 (SIMD a) { return a.Data()*a.Data(); } NG_INLINE SIMD Trans (SIMD a) { return a; } NG_INLINE SIMD IfPos (SIMD a, SIMD b, SIMD c) { auto cp = _mm512_cmp_pd_mask (a.Data(), _mm512_setzero_pd(), _MM_CMPINT_GT); return _mm512_mask_blend_pd(cp, c.Data(), b.Data()); } template<> NG_INLINE auto FMA (SIMD a, SIMD b, SIMD c) { return _mm512_fmadd_pd (a.Data(), b.Data(), c.Data()); } NG_INLINE double HSum (SIMD sd) { SIMD low = _mm512_extractf64x4_pd(sd.Data(),0); SIMD high = _mm512_extractf64x4_pd(sd.Data(),1); return HSum(low)+HSum(high); } NG_INLINE auto HSum (SIMD sd1, SIMD sd2) { return std::make_tuple(HSum(sd1), HSum(sd2)); } NG_INLINE SIMD HSum (SIMD v1, SIMD v2, SIMD v3, SIMD v4) { SIMD high1 = _mm512_extractf64x4_pd(v1.Data(),1); SIMD high2 = _mm512_extractf64x4_pd(v2.Data(),1); SIMD high3 = _mm512_extractf64x4_pd(v3.Data(),1); SIMD high4 = _mm512_extractf64x4_pd(v4.Data(),1); SIMD low1 = _mm512_extractf64x4_pd(v1.Data(),0); SIMD low2 = _mm512_extractf64x4_pd(v2.Data(),0); SIMD low3 = _mm512_extractf64x4_pd(v3.Data(),0); SIMD low4 = _mm512_extractf64x4_pd(v4.Data(),0); return HSum(low1,low2,low3,low4) + HSum(high1,high2,high3,high4); } #endif // __AVX512F__ //////////////////////////////////////////////////////////////////////////////// // MultiSIMD - Multiple SIMD values in one struct using head-tail implementation //////////////////////////////////////////////////////////////////////////////// template class MultiSIMD : public AlignedAlloc> { SIMD head; MultiSIMD tail; public: MultiSIMD () = default; MultiSIMD (const MultiSIMD & ) = default; MultiSIMD (T v) : head(v), tail(v) { ; } MultiSIMD (SIMD _head, MultiSIMD _tail) : head(_head), tail(_tail) { ; } SIMD Head() const { return head; } MultiSIMD Tail() const { return tail; } SIMD & Head() { return head; } MultiSIMD & Tail() { return tail; } template SIMD Get() const { return NR==0 ? head : tail.template Get(); } template SIMD & Get() { return NR==0 ? head : tail.template Get(); } auto MakeTuple() { return std::tuple_cat(std::tuple&> (head), tail.MakeTuple()); } // not yet possible for MSVC // operator auto () { return MakeTuple(); } }; template class MultiSIMD<2,T> : public AlignedAlloc> { SIMD v0, v1; public: MultiSIMD () = default; MultiSIMD (const MultiSIMD & ) = default; MultiSIMD (T v) : v0(v), v1(v) { ; } MultiSIMD (SIMD _v0, SIMD _v1) : v0(_v0), v1(_v1) { ; } SIMD Head() const { return v0; } SIMD Tail() const { return v1; } SIMD & Head() { return v0; } SIMD & Tail() { return v1; } template SIMD Get() const { return NR==0 ? v0 : v1; } template SIMD & Get() { return NR==0 ? v0 : v1; } auto MakeTuple() { return std::tuple&, SIMD&> (v0, v1); } operator std::tuple&, SIMD&>() { return MakeTuple(); } }; template NG_INLINE MultiSIMD operator+ (MultiSIMD a, MultiSIMD b) { return MultiSIMD (a.Head()+b.Head(), a.Tail()+b.Tail()); } template NG_INLINE MultiSIMD operator+ (double a, MultiSIMD b) { return MultiSIMD (a+b.Head(), a+b.Tail()); } template NG_INLINE MultiSIMD operator+ (MultiSIMD b, double a) { return MultiSIMD (a+b.Head(), a+b.Tail()); } template NG_INLINE MultiSIMD operator- (MultiSIMD a, MultiSIMD b) { return MultiSIMD (a.Head()-b.Head(), a.Tail()-b.Tail()); } template NG_INLINE MultiSIMD operator- (double a, MultiSIMD b) { return MultiSIMD (a-b.Head(), a-b.Tail()); } template NG_INLINE MultiSIMD operator- (MultiSIMD b, double a) { return MultiSIMD (b.Head()-a, b.Tail()-a); } template NG_INLINE MultiSIMD operator- (MultiSIMD a) { return MultiSIMD (-a.Head(), -a.Tail()); } template NG_INLINE MultiSIMD operator* (MultiSIMD a, MultiSIMD b) { return MultiSIMD (a.Head()*b.Head(), a.Tail()*b.Tail()); } template NG_INLINE MultiSIMD operator/ (MultiSIMD a, MultiSIMD b) { return MultiSIMD (a.Head()/b.Head(), a.Tail()/b.Tail()); } template NG_INLINE MultiSIMD operator* (double a, MultiSIMD b) { return MultiSIMD ( a*b.Head(), a*b.Tail()); } template NG_INLINE MultiSIMD operator* (MultiSIMD b, double a) { return MultiSIMD ( a*b.Head(), a*b.Tail()); } template NG_INLINE MultiSIMD & operator+= (MultiSIMD & a, MultiSIMD b) { a.Head()+=b.Head(); a.Tail()+=b.Tail(); return a; } template NG_INLINE MultiSIMD operator-= (MultiSIMD & a, double b) { a.Head()-=b; a.Tail()-=b; return a; } template NG_INLINE MultiSIMD operator-= (MultiSIMD & a, MultiSIMD b) { a.Head()-=b.Head(); a.Tail()-=b.Tail(); return a; } template NG_INLINE MultiSIMD & operator*= (MultiSIMD & a, MultiSIMD b) { a.Head()*=b.Head(); a.Tail()*=b.Tail(); return a; } template NG_INLINE MultiSIMD & operator*= (MultiSIMD & a, double b) { a.Head()*=b; a.Tail()*=b; return a; } // NG_INLINE MultiSIMD operator/= (MultiSIMD & a, MultiSIMD b) { return a.Data()/=b.Data(); } NG_INLINE SIMD HVSum (SIMD a) { return a; } template NG_INLINE SIMD HVSum (MultiSIMD a) { return a.Head() + HVSum(a.Tail()); } template NG_INLINE double HSum (MultiSIMD a) { return HSum(HVSum(a)); } template NG_INLINE auto HSum (MultiSIMD a, MultiSIMD b) { return HSum(HVSum(a), HVSum(b)); } template std::ostream & operator<< (std::ostream & ost, MultiSIMD multi) { ost << multi.Head() << " " << multi.Tail(); return ost; } template std::ostream & operator<< (std::ostream & ost, SIMD simd) { ost << simd[0]; for (int i = 1; i < simd.Size(); i++) ost << " " << simd[i]; return ost; } } namespace netgen { using namespace ngsimd; } #endif netgen-6.2.1804/libsrc/general/CMakeLists.txt0000644000175000017500000000161713272137567017445 0ustar kurtkurtadd_definitions(-DNGINTERFACE_EXPORTS) add_library(gen OBJECT array.cpp bitarray.cpp dynamicmem.cpp flags.cpp hashtabl.cpp mystring.cpp ngexception.cpp optmem.cpp parthreads.cpp profiler.cpp seti.cpp sort.cpp spbita2d.cpp symbolta.cpp table.cpp mpi_interface.cpp gzstream.cpp ) set_target_properties( gen PROPERTIES POSITION_INDEPENDENT_CODE ON ) install( FILES ngexception.hpp DESTINATION ${NG_INSTALL_DIR_INCLUDE} COMPONENT netgen_devel ) install(FILES archive_base.hpp array.hpp autodiff.hpp autoptr.hpp bitarray.hpp dynamicmem.hpp flags.hpp hashtabl.hpp mpi_interface.hpp myadt.hpp ngsimd.hpp mystring.hpp netgenout.hpp ngexception.hpp ngpython.hpp optmem.hpp parthreads.hpp profiler.hpp seti.hpp sort.hpp spbita2d.hpp stack.hpp symbolta.hpp table.hpp template.hpp gzstream.h DESTINATION ${NG_INSTALL_DIR_INCLUDE}/general COMPONENT netgen_devel ) netgen-6.2.1804/libsrc/general/spbita2d.hpp0000644000175000017500000000233313272137567017122 0ustar kurtkurt#ifndef FILE_SPBITA2D #define FILE_SPBITA2D /**************************************************************************/ /* File: spbita2d.hh */ /* Author: Joachim Schoeberl */ /* Date: 01. Jun. 95 */ /**************************************************************************/ /** Implementation of sparse 2 dimensional bitarray */ namespace netgen { class SPARSE_BIT_Array_2D { class linestruct { public: INDEX size; INDEX maxsize; INDEX * col; }; /// linestruct * lines; /// INDEX height, width; public: /// SPARSE_BIT_Array_2D (INDEX ah = 0, INDEX aw = 0); /// ~SPARSE_BIT_Array_2D (); /// void SetSize (INDEX ah, INDEX aw = 0); /// void DeleteElements (); /// int Get (INDEX i, INDEX j) const; /// INDEX Height () const { return height; } /// INDEX Width () const { return width; } /// void Set (INDEX i, INDEX j); /// int Test (INDEX i, INDEX j) const; /// INDEX BitsInLine (INDEX i) const { return lines[i-1].size; } /// INDEX GetIndex (INDEX i, INDEX nr) const { return lines[i-1].col[nr-1]; } }; } #endif netgen-6.2.1804/libsrc/general/dynamicmem.hpp0000644000175000017500000000360713272137567017542 0ustar kurtkurt#ifndef FILE_DYNAMICMEM #define FILE_DYNAMICMEM /**************************************************************************/ /* File: dynamicmem.hpp */ /* Author: Joachim Schoeberl */ /* Date: 12. Feb. 2003 */ /**************************************************************************/ namespace netgen { class BaseDynamicMem { private: static BaseDynamicMem *first, *last; BaseDynamicMem *prev, *next; size_t size; char * ptr; char * name; protected: BaseDynamicMem (); ~BaseDynamicMem (); void Alloc (size_t s); void ReAlloc (size_t s); void Free (); // char * Ptr() { return ptr; } char * Ptr() const { return ptr; } void Swap (BaseDynamicMem & m2); public: void SetName (const char * aname); static void Print (); static void GetUsed (int nr, char * ch); }; template class DynamicMem : public BaseDynamicMem { public: DynamicMem () : BaseDynamicMem () { ; } DynamicMem (size_t s) : BaseDynamicMem () { Alloc (s); } void Alloc (size_t s) { BaseDynamicMem::Alloc (sizeof(T) * s); } void ReAlloc (size_t s) { BaseDynamicMem::ReAlloc (sizeof(T) * s); } void Free () { BaseDynamicMem::Free (); } /* const T * Ptr() const { return reinterpret_cast (BaseDynamicMem::Ptr()); } */ const T * Ptr() { return reinterpret_cast (BaseDynamicMem::Ptr()); } /* operator const T* () const { return reinterpret_cast (BaseDynamicMem::Ptr()); } */ operator T* () const { return reinterpret_cast (BaseDynamicMem::Ptr()); } void Swap (DynamicMem & m2) { BaseDynamicMem::Swap (m2); } protected: DynamicMem (const DynamicMem & m); DynamicMem & operator= (const DynamicMem & m); }; } #endif netgen-6.2.1804/libsrc/general/netgenout.hpp0000644000175000017500000000635613272137567017433 0ustar kurtkurt#ifndef NETGEN_OUT_STREAM_HPP__ #define NETGEN_OUT_STREAM_HPP__ // #include // #include // #include namespace netgen { #ifdef PARALLEL extern int id; extern int ntasks; #endif DLL_HEADER extern int printmessage_importance; DLL_HEADER extern int printdots; class Imp { int importance; public: Imp () : importance(0) { ; } Imp ( int aimportance ) : importance(aimportance) { ; } int GetImp () const { return importance; } }; class Proc { int proc; public: Proc () : proc(0) { ; } Proc ( int aproc ) : proc(aproc) { ; } int GetProc () const { return proc; } }; class Procs { const netgen::FlatArray procs; public: Procs ( const netgen::FlatArray & aprocs ) : procs (aprocs) { ; } const netgen::FlatArray & GetProcs () const { return procs; } }; class NetgenOutStream { ostream * out; bool print; bool printheader; public: NetgenOutStream() : out(&std::cout), print(1), printheader(1) { ; } NetgenOutStream(ostream * aout, Imp imp ) : out(aout), printheader(1) { if ( netgen::printmessage_importance >= imp.GetImp() ) print = true; else print = false; } NetgenOutStream(ostream * aout, Proc proc ) : out(aout), printheader(1) { #ifdef PARALLEL if ( netgen::id == proc.GetProc() ) print = true; else print = false; #else if ( 0 == proc.GetProc() ) print = true; else print = false; #endif } NetgenOutStream(ostream * aout, Procs & procs ) : out(aout), printheader(1) { #ifdef PARALLEL if ( procs.GetProcs().Contains(netgen::id) ) print = true; else print = false; #else if ( procs.GetProcs().Contains(0) ) print = true; else print = false; #endif } ostream & OStream () { return *out; } template NetgenOutStream & operator<< (T & var) { if ( print ) { #ifdef PARALLEL if ( printheader ) { *out << "proc " << netgen::id << ": "; printheader = false; } #endif *out << var; } return (*this); } NetgenOutStream& operator<< (ostream& ( *pf )(ostream&)) { if ( print ) *out << (*pf) ; return (*this); } NetgenOutStream& operator<< (ios& ( *pf )(ios&)) { if ( print) *out << (*pf) ; printheader = 1; return (*this); } NetgenOutStream& operator<< (ios_base& ( *pf )(ios_base&)) { if (print ) *out << (*pf) ; return (*this); } }; /* NetgenOutStream operator<< ( ostream & ost, Imp imp ); NetgenOutStream operator<< ( ostream & ost, Proc proc ); NetgenOutStream operator<< ( ostream & ost, Procs & procs ); */ inline NetgenOutStream operator<< ( ostream & ost, Imp imp ) { return ( NetgenOutStream ( &ost, imp ) ); } inline NetgenOutStream operator<< ( ostream & ost, Proc proc ) { return ( NetgenOutStream ( &ost, proc ) ); } inline NetgenOutStream operator<< ( ostream & ost, Procs & procs ) { return ( NetgenOutStream ( &ost, procs ) ); } // { // return ( NetgenOutStream ( &ost, imp.GetImp() ) ); // } // template // NetgenOutStream& operator<< (NetgenOutStream& out, T c ) // { // out.OStream() << c << endl; // return out; // } } #endif netgen-6.2.1804/libsrc/general/dynamicmem.cpp0000644000175000017500000000766313272137567017543 0ustar kurtkurt#include using namespace std; namespace netgen { BaseDynamicMem * BaseDynamicMem::first = 0; BaseDynamicMem * BaseDynamicMem::last = 0; BaseDynamicMem :: BaseDynamicMem () { prev = last; next = 0; if (last) last->next = this; last = this; if (!first) first = this; size = 0; ptr = 0; name = 0; } BaseDynamicMem :: ~BaseDynamicMem () { Free(); if (next) next->prev = prev; else last = prev; if (prev) prev->next = next; else first = next; delete [] name; } void BaseDynamicMem :: SetName (const char * aname) { delete [] name; name = NULL; if (aname) { name = new char[strlen(aname)+1]; strcpy (name, aname); } } void BaseDynamicMem :: Alloc (size_t s) { size = s; ptr = new char[s]; if (!ptr) { cerr << "BaseynamicMem, cannot allocate " << s << " bytes" << endl; Print (); throw ("BaseDynamicMem::Alloc: out of memory"); } // ptr = (char*)malloc (s); // ptr = (char*) _mm_malloc (s,16); } void BaseDynamicMem :: ReAlloc (size_t s) { if (size == s) return; char * old = ptr; ptr = new char[s]; if (!ptr) { cerr << "BaseynamicMem, cannot Reallocate " << s << " bytes" << endl; Print (); throw ("BaseDynamicMem::Alloc: out of memory"); } // ptr = (char*)malloc(s); // ptr = (char*) _mm_malloc (s,16); memmove (ptr, old, (s < size) ? s : size); delete [] old; // free (old); // _mm_free (old); size = s; } void BaseDynamicMem :: Free () { delete [] ptr; // free (ptr); // _mm_free (ptr); ptr = 0; } void BaseDynamicMem :: Swap (BaseDynamicMem & m2) { size_t hi; char * cp; hi = size; size = m2.size; m2.size = hi; cp = ptr; ptr = m2.ptr; m2.ptr = cp; cp = name; name = m2.name; m2.name = cp; } void BaseDynamicMem :: Print () { cout << "****************** Dynamic Mem Report ****************" << endl; BaseDynamicMem * p = first; size_t mem = 0; int cnt = 0; while (p) { mem += p->size; cnt++; cout << setw(10) << p->size << " Bytes"; cout << ", addr = " << (void*)p->ptr; if (p->name) cout << " in block " << p->name; cout << endl; p = p->next; } if (mem > 100000000) cout << "memory in dynamic memory: " << mem/1048576 << " MB" << endl; else if (mem > 100000) cout << "memory in dynamic memory: " << mem/1024 << " kB" << endl; else cout << "memory in dynamic memory: " << mem << " Bytes" << endl; cout << "number of blocks: " << cnt << endl; // cout << "******************************************************" << endl; } #ifdef __INTEL_COMPILER #pragma warning(push) #pragma warning(disable:1684) #endif void BaseDynamicMem :: GetUsed (int nr, char * ch) { BaseDynamicMem * p = first; for (int i = 0; i < nr; i++) ch[i] = '0'; while (p) { long unsigned hptr = (long unsigned) (p->ptr); // uintptr_t hptr = reinterpret_cast(p->ptr); //?? hptr /= (1024*1024); hptr /= (4096/nr); size_t blocks = p->size / (1024*1024); blocks /= (4096/nr); // cout << "ptr = " << (void*)(p->ptr) << ", size = " << p->size << ", hptr = " << hptr << " blocks = " << blocks << endl; for (size_t i = 0; i <= blocks; i++) ch[hptr+i] = '1'; p = p->next; } { /* BaseMoveableMem * pm = BaseMoveableMem::first; while (pm) { long unsigned hptr = (long unsigned) pm->ptr; // uintptr_t hptr = reinterpret_cast(pm->ptr); hptr /= (1024*1024); hptr /= (4096/nr); size_t blocks = pm->size / (1024*1024); blocks /= (4096/nr); // cout << "moveable, ptr = " << (void*)(pm->ptr) << ", size = " << pm->size << ", hptr = " << hptr << " blocks = " << blocks << endl; for (size_t i = 0; i <= blocks; i++) ch[hptr+i] = '1'; pm = pm->next; } */ } } #ifdef __INTEL_COMPILER #pragma warning(pop) #endif } netgen-6.2.1804/libsrc/general/gzstream.h0000644000175000017500000001104713272137567016710 0ustar kurtkurt// ============================================================================ // gzstream, C++ iostream classes wrapping the zlib compression library. // Copyright (C) 2001 Deepak Bandyopadhyay, Lutz Kettner // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // ============================================================================ // // File : gzstream.h // Revision : $Revision: 1.5 $ // Revision_date : $Date: 2002/04/26 23:30:15 $ // Author(s) : Deepak Bandyopadhyay, Lutz Kettner // // Standard streambuf implementation following Nicolai Josuttis, "The // Standard C++ Library". // ============================================================================ #ifndef GZSTREAM_H #define GZSTREAM_H 1 // standard C++ with new header file names and std:: namespace #include #include #include #ifdef GZSTREAM_NAMESPACE namespace GZSTREAM_NAMESPACE { #endif // ---------------------------------------------------------------------------- // Internal classes to implement gzstream. See below for user classes. // ---------------------------------------------------------------------------- class gzstreambuf : public std::streambuf { private: static const int bufferSize = 47+256; // size of data buff // totals 512 bytes under g++ for igzstream at the end. gzFile file; // file handle for compressed file char buffer[bufferSize]; // data buffer char opened; // open/close state of stream int mode; // I/O mode int flush_buffer(); public: gzstreambuf() : opened(0) { setp( buffer, buffer + (bufferSize-1)); setg( buffer + 4, // beginning of putback area buffer + 4, // read position buffer + 4); // end position // ASSERT: both input & output capabilities will not be used together } int is_open() { return opened; } gzstreambuf* open( const char* name, int open_mode); gzstreambuf* close(); ~gzstreambuf() { close(); } virtual int overflow( int c = EOF); virtual int underflow(); virtual int sync(); }; class gzstreambase : virtual public std::ios { protected: gzstreambuf buf; public: gzstreambase() { init(&buf); } DLL_HEADER gzstreambase( const char* name, int open_mode); DLL_HEADER ~gzstreambase(); void open( const char* name, int open_mode); void close(); gzstreambuf* rdbuf() { return &buf; } }; // ---------------------------------------------------------------------------- // User classes. Use igzstream and ogzstream analogously to ifstream and // ofstream respectively. They read and write files based on the gz* // function interface of the zlib. Files are compatible with gzip compression. // ---------------------------------------------------------------------------- class DLL_HEADER igzstream : public gzstreambase, public std::istream { public: igzstream() : std::istream( &buf) {} igzstream( const char* name, int open_mode = std::ios::in) : gzstreambase( name, open_mode), std::istream( &buf) {} gzstreambuf* rdbuf() { return gzstreambase::rdbuf(); } void open( const char* name, int open_mode = std::ios::in) { gzstreambase::open( name, open_mode); } }; class DLL_HEADER ogzstream : public gzstreambase, public std::ostream { public: ogzstream() : std::ostream( &buf) {} ogzstream( const char* name, int mode = std::ios::out) : gzstreambase( name, mode), std::ostream( &buf) {} gzstreambuf* rdbuf() { return gzstreambase::rdbuf(); } void open( const char* name, int open_mode = std::ios::out) { gzstreambase::open( name, open_mode); } }; #ifdef GZSTREAM_NAMESPACE } // namespace GZSTREAM_NAMESPACE #endif #endif // GZSTREAM_H // ============================================================================ // EOF // netgen-6.2.1804/libsrc/general/gzstream.cpp0000644000175000017500000001202613272137567017241 0ustar kurtkurt// ============================================================================ // gzstream, C++ iostream classes wrapping the zlib compression library. // Copyright (C) 2001 Deepak Bandyopadhyay, Lutz Kettner // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // ============================================================================ // // File : gzstream.C // Revision : $Revision: 1.7 $ // Revision_date : $Date: 2003/01/08 14:41:27 $ // Author(s) : Deepak Bandyopadhyay, Lutz Kettner // // Standard streambuf implementation following Nicolai Josuttis, "The // Standard C++ Library". // ============================================================================ #include #include //#include "gzstream.h" //#include //#include // for memcpy #ifdef GZSTREAM_NAMESPACE namespace GZSTREAM_NAMESPACE { #endif // ---------------------------------------------------------------------------- // Internal classes to implement gzstream. See header file for user classes. // ---------------------------------------------------------------------------- // -------------------------------------- // class gzstreambuf: // -------------------------------------- gzstreambuf* gzstreambuf::open( const char* name, int open_mode) { if ( is_open()) return (gzstreambuf*)0; mode = open_mode; // no append nor read/write mode if ((mode & std::ios::ate) || (mode & std::ios::app) || ((mode & std::ios::in) && (mode & std::ios::out))) return (gzstreambuf*)0; char fmode[10]; char* fmodeptr = fmode; if ( mode & std::ios::in) *fmodeptr++ = 'r'; else if ( mode & std::ios::out) *fmodeptr++ = 'w'; *fmodeptr++ = 'b'; *fmodeptr = '\0'; file = gzopen( name, fmode); if (file == 0) return (gzstreambuf*)0; opened = 1; return this; } gzstreambuf * gzstreambuf::close() { if ( is_open()) { sync(); opened = 0; if ( gzclose( file) == Z_OK) return this; } return (gzstreambuf*)0; } int gzstreambuf::underflow() { // used for input buffer only if ( gptr() && ( gptr() < egptr())) return * reinterpret_cast( gptr()); if ( ! (mode & std::ios::in) || ! opened) return EOF; // Josuttis' implementation of inbuf int n_putback = gptr() - eback(); if ( n_putback > 4) n_putback = 4; memcpy( buffer + (4 - n_putback), gptr() - n_putback, n_putback); int num = gzread( file, buffer+4, bufferSize-4); if (num <= 0) // ERROR or EOF return EOF; // reset buffer pointers setg( buffer + (4 - n_putback), // beginning of putback area buffer + 4, // read position buffer + 4 + num); // end of buffer // return next character return * reinterpret_cast( gptr()); } int gzstreambuf::flush_buffer() { // Separate the writing of the buffer from overflow() and // sync() operation. int w = pptr() - pbase(); if ( gzwrite( file, pbase(), w) != w) return EOF; pbump( -w); return w; } int gzstreambuf::overflow( int c) { // used for output buffer only if ( ! ( mode & std::ios::out) || ! opened) return EOF; if (c != EOF) { *pptr() = c; pbump(1); } if ( flush_buffer() == EOF) return EOF; return c; } int gzstreambuf::sync() { // Changed to use flush_buffer() instead of overflow( EOF) // which caused improper behavior with std::endl and flush(), // bug reported by Vincent Ricard. if ( pptr() && pptr() > pbase()) { if ( flush_buffer() == EOF) return -1; } return 0; } // -------------------------------------- // class gzstreambase: // -------------------------------------- gzstreambase::gzstreambase( const char* name, int mode) { init( &buf); open( name, mode); } gzstreambase::~gzstreambase() { buf.close(); } void gzstreambase::open( const char* name, int open_mode) { if ( ! buf.open( name, open_mode)) clear( rdstate() | std::ios::badbit); } void gzstreambase::close() { if ( buf.is_open()) if ( ! buf.close()) clear( rdstate() | std::ios::badbit); } #ifdef GZSTREAM_NAMESPACE } // namespace GZSTREAM_NAMESPACE #endif // ============================================================================ // EOF // netgen-6.2.1804/libsrc/occ/0000755000175000017500000000000013272137567014027 5ustar kurtkurtnetgen-6.2.1804/libsrc/occ/Partition_Loop3d.hxx0000644000175000017500000000444713272137567017762 0ustar kurtkurt// GEOM PARTITION : partition algorithm // // Copyright (C) 2003 CEA/DEN, EDF R&D // // // // File : Partition_Loop3d.hxx // Module : GEOM #ifndef _Partition_Loop3d_HeaderFile #define _Partition_Loop3d_HeaderFile #ifndef _TopTools_ListOfShape_HeaderFile #include #endif #ifndef _TopTools_IndexedDataMapOfShapeListOfShape_HeaderFile #include #endif #ifndef _Standard_Boolean_HeaderFile #include #endif #ifndef _Standard_Real_HeaderFile #include #endif #ifndef _Standard_Version_HeaderFile #include #endif #if OCC_VERSION_HEX < 0x070000 #else #include #include #include #endif class TopoDS_Shape; #if OCC_VERSION_HEX < 0x070000 class TopTools_ListOfShape; class TopTools_MapOfOrientedShape; #endif class TopoDS_Edge; class TopoDS_Face; class gp_Vec; #ifndef _Standard_HeaderFile #include #endif #ifndef _Standard_Macro_HeaderFile #include #endif class Partition_Loop3d { public: void* operator new(size_t,void* anAddress) { return anAddress; } void* operator new(size_t size) { return Standard::Allocate(size); } void operator delete(void *anAddress) { if (anAddress) Standard::Free((Standard_Address&)anAddress); } // Methods PUBLIC // Partition_Loop3d(); void AddConstFaces(const TopoDS_Shape& S) ; void AddSectionFaces(const TopoDS_Shape& S) ; const TopTools_ListOfShape& MakeShells(const TopTools_MapOfOrientedShape& AvoidFacesMap) ; static Standard_Boolean IsInside(const TopoDS_Edge& E,const TopoDS_Face& F1,const TopoDS_Face& F2,const Standard_Boolean CountDot,Standard_Real& Dot,Standard_Boolean& GoodOri) ; static gp_Vec Normal(const TopoDS_Edge& E,const TopoDS_Face& F) ; protected: // Methods PROTECTED // // Fields PROTECTED // private: // Methods PRIVATE // // Fields PRIVATE // TopTools_ListOfShape myNewShells; TopTools_ListOfShape myFaces; TopTools_IndexedDataMapOfShapeListOfShape myEFMap; }; // other Inline functions and methods (like "C++: function call" methods) // #endif netgen-6.2.1804/libsrc/occ/Partition_Inter2d.cxx0000644000175000017500000005543013272137567020122 0ustar kurtkurt#ifdef OCCGEOMETRY // GEOM PARTITION : partition algorithm // // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R& D, LEG, PRINCIPIA R& D, BUREAU VERITAS // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org // // // // File : Partition_Inter2d.cxx // Author : Benedicte MARTIN // Module : GEOM // $Header: /cvs/netgen/netgen/libsrc/occ/Partition_Inter2d.cxx,v 1.5 2008/03/31 14:20:28 wabro Exp $ //using namespace std; #include "Partition_Inter2d.ixx" #include "utilities.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef DEB static Standard_Boolean TestEdges = 0; static Standard_Integer NbF2d = 0; static Standard_Integer NbE2d = 0; #endif //======================================================================= //function : getOtherShape //purpose : //======================================================================= static TopoDS_Shape getOtherShape(const TopoDS_Shape& theS, const TopTools_ListOfShape& theSList) { TopTools_ListIteratorOfListOfShape anIt( theSList ); for ( ; anIt.More(); anIt.Next() ) if (!theS.IsSame( anIt.Value() )) return anIt.Value(); return TopoDS_Shape(); } //======================================================================= //function : findVOnE //purpose : on theE, find a vertex close to theV, such that an edge // passing through it is an itersection of theF1 and theF2. // theE intersects theE2 at theV //======================================================================= static Standard_Boolean findVOnE(const TopoDS_Vertex & theV, const TopoDS_Edge& theE, const TopoDS_Edge& theE2, const TopoDS_Shape& theF1, const TopoDS_Shape& theF2, const Handle(BRepAlgo_AsDes)& theAsDes, TopoDS_Vertex & theFoundV) { Standard_Real MinDist2 = ::RealLast(); gp_Pnt P; // check all vertices on theE const TopTools_ListOfShape& aVList = theAsDes->Descendant( theE ); TopTools_ListIteratorOfListOfShape anIt( aVList ); if (anIt.More()) P = BRep_Tool::Pnt( theV ); for ( ; anIt.More(); anIt.Next() ) { // check by distance TopoDS_Vertex & V = TopoDS::Vertex( anIt.Value() ); Standard_Real dist2 = P.SquareDistance( BRep_Tool::Pnt( V )); if (dist2 < MinDist2) MinDist2 = dist2; else continue; // V is a candidate if among edges passing through V there is one // which is an intersection of theF1 and theF2 TopTools_ListIteratorOfListOfShape anEIt( theAsDes->Ascendant( V )); Standard_Boolean isOk = Standard_False; for ( ; !isOk && anEIt.More(); anEIt.Next() ) { const TopoDS_Shape & E2 = anEIt.Value(); if ( theE2.IsSame( E2 )) continue; const TopTools_ListOfShape & aFList = theAsDes->Ascendant( E2 ); if (aFList.IsEmpty()) continue; if ( theF1.IsSame( aFList.First() )) isOk = theF2.IsSame( aFList.Last() ); else isOk = theF2.IsSame( aFList.First() ) && theF1.IsSame( aFList.Last() ); } if (isOk) theFoundV = V; } if (theFoundV.IsNull()) return Standard_False; // check that MinDist2 is not too large Standard_Real f, l; TopLoc_Location L; Handle(Geom_Curve) aCurve = BRep_Tool::Curve( theE, L, f, l ); gp_Pnt P1 = aCurve->Value( f ); gp_Pnt P2 = aCurve->Value( 0.3 * f + 0.7 * l ); //gp_Pnt P2 = aCurve->Value( 0.5 * ( f + l )); if (MinDist2 > P1.SquareDistance( P2 )) return Standard_False; #ifdef DEB MESSAGE("findVOnE: found MinDist = " << sqrt (MinDist2)); #endif return Standard_True; } //======================================================================= //function : AddVonE //purpose : Put V in AsDes as intersection of E1 and E2. // Check that vertex equal to V already exists on one // of edges, in such a case, V is not added but // existing vertex is updated to be on E1 and E2 and // is returned insead of V. //======================================================================= TopoDS_Vertex Partition_Inter2d::AddVonE(const TopoDS_Vertex& theV, const TopoDS_Edge& E1, const TopoDS_Edge& E2, const Handle(BRepAlgo_AsDes)& AsDes, const TopoDS_Face& theF) { //------------------------------------------------------------- // test if the points of intersection already exist. If not, // add as descendants of the edges. // nb: theses points are only vertices of intersection. //------------------------------------------------------------- const TopTools_ListOfShape& VOnE1 = AsDes->Descendant(E1); const TopTools_ListOfShape& VOnE2 = AsDes->Descendant(E2); gp_Pnt P1,P2; TopoDS_Vertex V1,V2; TopTools_ListIteratorOfListOfShape it; BRep_Builder B; TopAbs_Orientation O1,O2; Standard_Real U1,U2; Standard_Real Tol,Tol1,Tol2; Standard_Boolean OnE1,OnE2; TopoDS_Vertex V = theV; U1 = BRep_Tool::Parameter(V,E1); U2 = BRep_Tool::Parameter(V,E2); O1 = V.Orientation(); O2 = O1; P1 = BRep_Tool::Pnt(V); Tol = BRep_Tool::Tolerance( V ); OnE1 = OnE2 = Standard_False; //----------------------------------------------------------------- // Search if the point of intersection is a vertex of E1. //----------------------------------------------------------------- for (it.Initialize(VOnE1); it.More(); it.Next()) { const TopoDS_Vertex& CV = TopoDS::Vertex( it.Value() ); if (V.IsSame( CV )) { V1 = V; OnE1 = Standard_True; break; } P2 = BRep_Tool::Pnt( CV ); Tol1 = 1.1*(Tol + BRep_Tool::Tolerance( CV )); if (P1.SquareDistance(P2) <= Tol1*Tol1) { V = CV; V1 = V; OnE1 = Standard_True; break; } } if (OnE1) { //----------------------------------------------------------------- // Search if the vertex found is still on E2. //----------------------------------------------------------------- for (it.Initialize(VOnE2); it.More(); it.Next()) { if (V.IsSame( it.Value() )) { OnE2 = Standard_True; V2 = V; break; } } } if (!OnE2) { for (it.Initialize(VOnE2); it.More(); it.Next()) { //----------------------------------------------------------------- // Search if the point of intersection is a vertex of E2. //----------------------------------------------------------------- const TopoDS_Vertex& CV = TopoDS::Vertex( it.Value() ); P2 = BRep_Tool::Pnt( CV ); Tol2 = 1.1*(Tol + BRep_Tool::Tolerance( CV )); if (P1.SquareDistance(P2) <= Tol2*Tol2) { V = CV; V2 = V; OnE2 = Standard_True; break; } } } if (!OnE1 && !OnE2 && !theF.IsNull()) { // if 3 faces intersects each others, 3 new edges on them must pass // through one vertex but real intersection points of each // pair of edges are sometimes more far than a tolerance. // Try to analitically find vertices that E1 and E2 must pass trough TopoDS_Shape F1 = getOtherShape( theF, AsDes->Ascendant( E1 )); TopoDS_Shape F2 = getOtherShape( theF, AsDes->Ascendant( E2 )); if (!F1.IsNull() && !F2.IsNull() && !F1.IsSame( F2 )) { OnE1 = findVOnE ( theV, E1, E2, F1, F2, AsDes, V1 ); OnE2 = findVOnE ( theV, E2, E1, F1, F2, AsDes, V2 ); if (OnE2) V = V2; if (OnE1) V = V1; } } if (OnE1 && OnE2) { if (!V1.IsSame(V2)) { // replace V1 with V2 on all edges V1 is on Standard_Real UV1; TopoDS_Edge EWE1; TopoDS_Vertex VI; const TopTools_ListOfShape& EdgeWithV1 = AsDes->Ascendant(V1); for (it.Initialize(EdgeWithV1); it.More(); it.Next()) { EWE1 = TopoDS::Edge(it.Value()); VI = V1; VI.Orientation(TopAbs_INTERNAL); UV1 = BRep_Tool::Parameter(VI,EWE1); VI = V2; VI.Orientation(TopAbs_INTERNAL); B.UpdateVertex( VI, UV1, EWE1, GetTolerance( VI, UV1, EWE1, AsDes)); } AsDes->Replace(V1,V2); V = V2; } } // add existing vertices instead of new ones if (!OnE1) { if (OnE2) { V.Orientation(TopAbs_INTERNAL); B.UpdateVertex (V, U1, E1, GetTolerance( V, U1, E1, AsDes)); } V.Orientation(O1); AsDes->Add(E1,V); } if (!OnE2) { if (OnE1) { V.Orientation(TopAbs_INTERNAL); B.UpdateVertex (V, U2, E2, GetTolerance( V, U2, E2, AsDes )); } V.Orientation(O2); AsDes->Add(E2,V); } return V; } //======================================================================= //function : FindEndVertex //purpose : Returns a vertex from having parameter on // closest to or . is True if // found vertex is closer to . returns parameter // difference. //======================================================================= TopoDS_Vertex Partition_Inter2d::FindEndVertex(const TopTools_ListOfShape& LV, const Standard_Real f, const Standard_Real l, const TopoDS_Edge& E, Standard_Boolean& isFirst, Standard_Real& minDU) { TopoDS_Vertex endV; Standard_Real U, endU, min; minDU = 1.e10; TopTools_ListIteratorOfListOfShape it; it.Initialize(LV); for (; it.More(); it.Next()) { const TopoDS_Vertex& v = TopoDS::Vertex(it.Value()); U = BRep_Tool::Parameter(v, E); min = Min( Abs(U-f), Abs(U-l) ); if (min < minDU) { endV = v; endU = U; minDU = min; } } if (Abs(endU-f) < Abs(endU-l)) isFirst = Standard_True; else isFirst = Standard_False; return endV; } //======================================================================= //function : treatClosed //purpose : add second vertex to closed edge. Vertex is one of //======================================================================= static void treatClosed (const TopoDS_Edge& E1, const Standard_Real f, const Standard_Real l, TopTools_ListOfShape& LV1, TopTools_ListOfShape& /*LV2*/) { Standard_Boolean isFirst=0; Standard_Real minDU = 1.e10; TopoDS_Vertex endV; endV = Partition_Inter2d::FindEndVertex(LV1, f,l, E1, isFirst,minDU); if (minDU > Precision::PConfusion()) return; // not end point Standard_Real newU; if (isFirst) newU = f + (l - f); else newU = l - (l - f); // update end parameter BRep_Builder B; endV.Orientation(TopAbs_INTERNAL); B.UpdateVertex(endV,newU,E1,BRep_Tool::Tolerance(endV)); } //======================================================================= //function : EdgesPartition //purpose : //======================================================================= static void EdgesPartition(const TopoDS_Face& F, const TopoDS_Edge& E1, const TopoDS_Edge& E2, const Handle(BRepAlgo_AsDes)& AsDes, const TopTools_MapOfShape& NewEdges, const Standard_Boolean WithOri) { Standard_Real f[3],l[3]; Standard_Real MilTol2; Standard_Real Tol = Max (BRep_Tool::Tolerance(E1), BRep_Tool::Tolerance(E2)); MilTol2 = Tol * Tol * 10; BRep_Tool::Range(E1, f[1], l[1]); BRep_Tool::Range(E2, f[2], l[2]); BRepAdaptor_Curve CE1(E1,F); BRepAdaptor_Curve CE2(E2,F); TopoDS_Edge EI[3]; EI[1] = E1; EI[2] = E2; TopTools_ListOfShape LV1; // new vertices at intersections on E1 TopTools_ListOfShape LV2; // ... on E2 BRep_Builder B; // if E1 and E2 are results of intersection of F and two connex faces then // no need to intersect edges, they can contact by vertices only // (encounted an exception in TopOpeBRep_EdgesIntersector in such a case) Standard_Boolean intersect = Standard_True; TopTools_IndexedMapOfShape ME; TopExp::MapShapes(F, TopAbs_EDGE, ME); if (!ME.Contains(E1) && ! ME.Contains(E2)) { // if E1 and E2 are new on F TopoDS_Shape F1, F2; const TopTools_ListOfShape& LF1 = AsDes->Ascendant( E1 ); F1 = F.IsSame( LF1.First() ) ? LF1.Last() : LF1.First(); const TopTools_ListOfShape& LF2 = AsDes->Ascendant( E2 ); F2 = F.IsSame( LF2.First() ) ? LF2.Last() : LF2.First(); if (!F.IsSame(F2) && !F.IsSame(F1) ) { TopExp_Explorer exp(F2, TopAbs_EDGE); TopExp::MapShapes(F1, TopAbs_EDGE, ME); for (; exp.More(); exp.Next()) { if (ME.Contains( exp.Current())) { intersect = Standard_False; break; } } } } if (intersect) { //------------------------------------------------------ // compute the points of Intersection in 2D //----------------------------------------------------- // i.e. fill LV1 and LV2 TopOpeBRep_EdgesIntersector EInter; EInter.SetFaces(F,F); Standard_Real TolDub = 1.e-7; EInter.ForceTolerances(TolDub,TolDub); Standard_Boolean reducesegments = Standard_False; EInter.Perform (E1,E2,reducesegments); Standard_Boolean rejectreducedsegmentpoints = Standard_False; EInter.InitPoint(rejectreducedsegmentpoints); for ( ; EInter.MorePoint(); EInter.NextPoint() ) { const TopOpeBRep_Point2d& P2D = EInter.Point(); const gp_Pnt& P = P2D.Value(); TopoDS_Vertex V = BRepLib_MakeVertex(P); //------------------------- // control the point found. //------------------------- gp_Pnt P1 = CE1.Value(P2D.Parameter(1)); gp_Pnt P2 = CE2.Value(P2D.Parameter(2)); Standard_Real sqd1 = P1.SquareDistance(P); Standard_Real sqd2 = P2.SquareDistance(P); if (sqd1 > MilTol2 || sqd2 > MilTol2 ) continue; // add a new vertex to the both edges Standard_Real toler = Max( Tol, sqrt( Max( sqd1, sqd2 ))); Standard_Integer i; for (i = 1; i <= 2; i++) { Standard_Real U = P2D.Parameter(i); V.Orientation(TopAbs_INTERNAL); B.UpdateVertex( V,U,EI[i], toler); TopAbs_Orientation OO = TopAbs_REVERSED; if (WithOri) { if (P2D.IsVertex(i)) OO = P2D.Vertex(i).Orientation(); else if (P2D.Transition(i).Before() == TopAbs_OUT) { OO = TopAbs_FORWARD; } V.Orientation(OO); if (i == 1) LV1.Append(V); else LV2.Append(V); } } } } // if (intersect) //---------------------------------- // Test the extremities of the edges. //---------------------------------- // add to LV* vertices for vertex-vertex closeness Standard_Real U1,U2; Standard_Real TolConf2, TolConf; TopoDS_Vertex V1[2],V2[2]; TopExp::Vertices(E1,V1[0],V1[1]); TopExp::Vertices(E2,V2[0],V2[1]); Standard_Integer i,j,k; for (j = 0; j < 2; j++) { if (V1[j].IsNull()) continue; for ( k = 0; k < 2; k++) { if (V2[k].IsNull()) continue; gp_Pnt P1 = BRep_Tool::Pnt(V1[j]); gp_Pnt P2 = BRep_Tool::Pnt(V2[k]); TolConf = BRep_Tool::Tolerance(V1[j]) + BRep_Tool::Tolerance(V2[k]); TolConf = Max (Tol, TolConf); TolConf2 = TolConf * TolConf; if (!intersect) TolConf2 *= 100; Standard_Real SqDist = P1.SquareDistance(P2); if (SqDist <= TolConf2) { TopoDS_Vertex V = BRepLib_MakeVertex(P1); V.Orientation(TopAbs_INTERNAL); U1 = (j == 0) ? f[1] : l[1]; U2 = (k == 0) ? f[2] : l[2]; B.UpdateVertex(V,U1,E1,TolConf); B.UpdateVertex(V,U2,E2,TolConf); LV1.Prepend(V.Oriented(V1[j].Orientation())); LV2.Prepend(V.Oriented(V2[k].Orientation())); } } } Standard_Boolean AffichPurge = Standard_False; if ( LV1.IsEmpty()) return; //---------------------------------- // Purge of all the vertices. //---------------------------------- // remove one of close vertices TopTools_ListIteratorOfListOfShape it1LV1,it1LV2,it2LV1; gp_Pnt P1,P2; Standard_Boolean Purge = Standard_True; while (Purge) { i = 1; Purge = Standard_False; for (it1LV1.Initialize(LV1),it1LV2.Initialize(LV2); it1LV1.More(); it1LV1.Next(),it1LV2.Next()) { j = 1; it2LV1.Initialize(LV1); while (j < i) { const TopoDS_Vertex& VE1 = TopoDS::Vertex(it1LV1.Value()); const TopoDS_Vertex& VE2 = TopoDS::Vertex(it2LV1.Value()); Standard_Real Tol1 = BRep_Tool::Tolerance( VE1 ); Standard_Real Tol2 = BRep_Tool::Tolerance( VE2 ); P1 = BRep_Tool::Pnt( VE1 ); P2 = BRep_Tool::Pnt( VE2 ); if (P1.IsEqual(P2, Tol1 + Tol2)) { LV1.Remove(it1LV1); LV2.Remove(it1LV2); Purge = Standard_True; break; } j++; it2LV1.Next(); } if (Purge) break; i++; } } // care of new closed edges, they always intersect with seam at end if (V1[0].IsSame( V1[1] ) && NewEdges.Contains(E1) ) treatClosed (E1, f[1], l[1], LV1, LV2); if (V2[0].IsSame( V2[1] ) && NewEdges.Contains(E2) ) treatClosed (E2, f[2], l[2], LV2, LV1); //---------------- // Stocking vertex //---------------- for ( it1LV1.Initialize( LV1 ); it1LV1.More(); it1LV1.Next()) Partition_Inter2d::AddVonE (TopoDS::Vertex( it1LV1.Value()), E1, E2, AsDes, F); } //======================================================================= //function : CompletPart2d //purpose : Computes the intersections between the edges stored // is AsDes as descendants of . Intersections is computed // between two edges if one of them is bound in NewEdges. //======================================================================= void Partition_Inter2d::CompletPart2d (const Handle(BRepAlgo_AsDes)& AsDes, const TopoDS_Face& F, const TopTools_MapOfShape& NewEdges) { #ifdef DEB NbF2d++; NbE2d = 0; #endif //Do not intersect the edges of a face TopTools_IndexedMapOfShape EdgesOfFace; TopExp::MapShapes( F, TopAbs_EDGE , EdgesOfFace); //------------------------------------------------------------------- // compute the intersection2D on the faces touched by the intersection3D //------------------------------------------------------------------- TopTools_ListIteratorOfListOfShape it1LE ; TopTools_ListIteratorOfListOfShape it2LE ; //----------------------------------------------- // Intersection edge-edge. //----------------------------------------------- const TopTools_ListOfShape& LE = AsDes->Descendant(F); TopoDS_Vertex V1,V2; Standard_Integer j, i = 1; TopoDS_Face FF = F; FF.Orientation(TopAbs_FORWARD); for ( it1LE.Initialize(LE) ; it1LE.More(); it1LE.Next()) { const TopoDS_Edge& E1 = TopoDS::Edge(it1LE.Value()); j = 1; it2LE.Initialize(LE); while (j < i && it2LE.More()) { const TopoDS_Edge& E2 = TopoDS::Edge(it2LE.Value()); //---------------------------------------------------------- // Intersections of the new edges obtained by intersection // between them and with the restrictions edges //---------------------------------------------------------- if ( (!EdgesOfFace.Contains(E1) || !EdgesOfFace.Contains(E2)) && (NewEdges.Contains(E1) || NewEdges.Contains(E2)) ) { EdgesPartition(FF,E1,E2,AsDes,NewEdges,Standard_True); } it2LE.Next(); j++; } i++; } } //======================================================================= //function : GetTolerance //purpose : Returns tolerance theV must have atfer its // addition to theE with theU parameter. theAsDes is // used to find pcurves of theE //======================================================================= Standard_Real Partition_Inter2d::GetTolerance (const TopoDS_Vertex & theV, const Standard_Real theU, const TopoDS_Edge & theE, const Handle(BRepAlgo_AsDes)& theAsDes) { Standard_Real aTol = BRep_Tool::Tolerance( theV ); gp_Pnt aPnt = BRep_Tool::Pnt( theV ); // check point on 3D curve Standard_Real f,l; Handle(Geom_Curve) C = BRep_Tool::Curve( theE, f, l ); if (!C.IsNull()) aTol = Max ( aTol, aPnt.Distance( C->Value( theU ))); // check points on pcurves const TopTools_ListOfShape& aFList = theAsDes->Ascendant( theE ); TopTools_ListIteratorOfListOfShape aFIt( aFList ); for ( ; aFIt.More(); aFIt.Next() ) { const TopoDS_Face& F = TopoDS::Face( aFIt.Value() ); Handle(Geom2d_Curve) pcurve = BRep_Tool::CurveOnSurface( theE, F, f, l ); if (!pcurve.IsNull()) { gp_Pnt2d aPnt2d = pcurve->Value( theU ); TopLoc_Location L; Handle(Geom_Surface) S = BRep_Tool::Surface( F, L ); gp_Pnt aPntOnS = S->Value( aPnt2d.X(), aPnt2d.Y() ); if (!L.IsIdentity()) aPntOnS.Transform( L.Transformation() ); aTol = Max ( aTol, aPnt.Distance( aPntOnS )); } } return aTol; } #endif netgen-6.2.1804/libsrc/occ/Partition_Spliter.jxx0000644000175000017500000000260313272137567020236 0ustar kurtkurt// GEOM PARTITION : partition algorithm // // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org // // // // File : Partition_Spliter.jxx // Module : GEOM #ifndef _BRepAlgo_AsDes_HeaderFile #include #endif #ifndef _TopoDS_Shape_HeaderFile #include #endif #ifndef _TopTools_ListOfShape_HeaderFile #include #endif #ifndef _TopoDS_Edge_HeaderFile #include #endif #ifndef _Partition_Spliter_HeaderFile #include "Partition_Spliter.hxx" #endif netgen-6.2.1804/libsrc/occ/occgenmesh.cpp0000644000175000017500000013450313272137567016654 0ustar kurtkurt#ifdef OCCGEOMETRY #include #include #include namespace netgen { #include "occmeshsurf.hpp" #define TCL_OK 0 #define TCL_ERROR 1 #define DIVIDEEDGESECTIONS 1000 #define IGNORECURVELENGTH 1e-4 #define VSMALL 1e-10 DLL_HEADER bool merge_solids = 1; // can you please explain what you intend to compute here (JS) !!! double Line :: Dist (Line l) { Vec<3> n = p1-p0; Vec<3> q = l.p1-l.p0; double nq = n*q; Point<3> p = p0 + 0.5*n; double lambda = (p-l.p0)*n / (nq + VSMALL); if (lambda >= 0 && lambda <= 1) { double d = (p-l.p0-lambda*q).Length(); // if (d < 1e-3) d = 1e99; return d; } else return 1e99; } double Line :: Length () { return (p1-p0).Length(); } inline Point<3> occ2ng (const gp_Pnt & p) { return Point<3> (p.X(), p.Y(), p.Z()); } double ComputeH (double kappa) { double hret; kappa *= mparam.curvaturesafety; if (mparam.maxh * kappa < 1) hret = mparam.maxh; else hret = 1 / (kappa + VSMALL); if (mparam.maxh < hret) hret = mparam.maxh; return (hret); } void RestrictHTriangle (gp_Pnt2d & par0, gp_Pnt2d & par1, gp_Pnt2d & par2, BRepLProp_SLProps * prop, Mesh & mesh, int depth, double h = 0) { int ls = -1; gp_Pnt pnt0,pnt1,pnt2; prop->SetParameters (par0.X(), par0.Y()); pnt0 = prop->Value(); prop->SetParameters (par1.X(), par1.Y()); pnt1 = prop->Value(); prop->SetParameters (par2.X(), par2.Y()); pnt2 = prop->Value(); double aux; double maxside = pnt0.Distance(pnt1); ls = 2; aux = pnt1.Distance(pnt2); if(aux > maxside) { maxside = aux; ls = 0; } aux = pnt2.Distance(pnt0); if(aux > maxside) { maxside = aux; ls = 1; } gp_Pnt2d parmid; parmid.SetX( (par0.X()+par1.X()+par2.X()) / 3 ); parmid.SetY( (par0.Y()+par1.Y()+par2.Y()) / 3 ); if (depth%3 == 0) { double curvature = 0; prop->SetParameters (parmid.X(), parmid.Y()); if (!prop->IsCurvatureDefined()) { (*testout) << "curvature not defined!" << endl; return; } curvature = max(fabs(prop->MinCurvature()), fabs(prop->MaxCurvature())); prop->SetParameters (par0.X(), par0.Y()); if (!prop->IsCurvatureDefined()) { (*testout) << "curvature not defined!" << endl; return; } curvature = max(curvature,max(fabs(prop->MinCurvature()), fabs(prop->MaxCurvature()))); prop->SetParameters (par1.X(), par1.Y()); if (!prop->IsCurvatureDefined()) { (*testout) << "curvature not defined!" << endl; return; } curvature = max(curvature,max(fabs(prop->MinCurvature()), fabs(prop->MaxCurvature()))); prop->SetParameters (par2.X(), par2.Y()); if (!prop->IsCurvatureDefined()) { (*testout) << "curvature not defined!" << endl; return; } curvature = max(curvature,max(fabs(prop->MinCurvature()), fabs(prop->MaxCurvature()))); //(*testout) << "curvature " << curvature << endl; if (curvature < 1e-3) { //(*testout) << "curvature too small (" << curvature << ")!" << endl; return; // return war bis 10.2.05 auskommentiert } h = ComputeH (curvature+1e-10); if(h < 1e-4*maxside) return; if (h > 30) return; } if (h < maxside && depth < 10) { //cout << "\r h " << h << flush; gp_Pnt2d pm; //cout << "h " << h << " maxside " << maxside << " depth " << depth << endl; //cout << "par0 " << par0.X() << " " << par0.Y() //<< " par1 " << par1.X() << " " << par1.Y() // << " par2 " << par2.X() << " " << par2.Y()<< endl; if(ls == 0) { pm.SetX(0.5*(par1.X()+par2.X())); pm.SetY(0.5*(par1.Y()+par2.Y())); RestrictHTriangle(pm, par2, par0, prop, mesh, depth+1, h); RestrictHTriangle(pm, par0, par1, prop, mesh, depth+1, h); } else if(ls == 1) { pm.SetX(0.5*(par0.X()+par2.X())); pm.SetY(0.5*(par0.Y()+par2.Y())); RestrictHTriangle(pm, par1, par2, prop, mesh, depth+1, h); RestrictHTriangle(pm, par0, par1, prop, mesh, depth+1, h); } else if(ls == 2) { pm.SetX(0.5*(par0.X()+par1.X())); pm.SetY(0.5*(par0.Y()+par1.Y())); RestrictHTriangle(pm, par1, par2, prop, mesh, depth+1, h); RestrictHTriangle(pm, par2, par0, prop, mesh, depth+1, h); } } else { gp_Pnt pnt; Point3d p3d; prop->SetParameters (parmid.X(), parmid.Y()); pnt = prop->Value(); p3d = Point3d(pnt.X(), pnt.Y(), pnt.Z()); mesh.RestrictLocalH (p3d, h); p3d = Point3d(pnt0.X(), pnt0.Y(), pnt0.Z()); mesh.RestrictLocalH (p3d, h); p3d = Point3d(pnt1.X(), pnt1.Y(), pnt1.Z()); mesh.RestrictLocalH (p3d, h); p3d = Point3d(pnt2.X(), pnt2.Y(), pnt2.Z()); mesh.RestrictLocalH (p3d, h); //(*testout) << "p = " << p3d << ", h = " << h << ", maxside = " << maxside << endl; } } void DivideEdge (TopoDS_Edge & edge, Array & ps, Array & params, Mesh & mesh) { double s0, s1; double maxh = mparam.maxh; int nsubedges = 1; gp_Pnt pnt, oldpnt; double svalue[DIVIDEEDGESECTIONS]; GProp_GProps system; BRepGProp::LinearProperties(edge, system); double L = system.Mass(); Handle(Geom_Curve) c = BRep_Tool::Curve(edge, s0, s1); double hvalue[DIVIDEEDGESECTIONS+1]; hvalue[0] = 0; pnt = c->Value(s0); double olddist = 0; double dist = 0; int tmpVal = (int)(DIVIDEEDGESECTIONS); for (int i = 1; i <= tmpVal; i++) { oldpnt = pnt; pnt = c->Value(s0+(i/double(DIVIDEEDGESECTIONS))*(s1-s0)); hvalue[i] = hvalue[i-1] + 1.0/mesh.GetH(Point3d(pnt.X(), pnt.Y(), pnt.Z()))* pnt.Distance(oldpnt); //(*testout) << "mesh.GetH(Point3d(pnt.X(), pnt.Y(), pnt.Z())) " << mesh.GetH(Point3d(pnt.X(), pnt.Y(), pnt.Z())) // << " pnt.Distance(oldpnt) " << pnt.Distance(oldpnt) << endl; olddist = dist; dist = pnt.Distance(oldpnt); } // nsubedges = int(ceil(hvalue[DIVIDEEDGESECTIONS])); nsubedges = max (1, int(floor(hvalue[DIVIDEEDGESECTIONS]+0.5))); ps.SetSize(nsubedges-1); params.SetSize(nsubedges+1); int i = 1; int i1 = 0; do { if (hvalue[i1]/hvalue[DIVIDEEDGESECTIONS]*nsubedges >= i) { params[i] = s0+(i1/double(DIVIDEEDGESECTIONS))*(s1-s0); pnt = c->Value(params[i]); ps[i-1] = MeshPoint (Point3d(pnt.X(), pnt.Y(), pnt.Z())); i++; } i1++; if (i1 > DIVIDEEDGESECTIONS) { nsubedges = i; ps.SetSize(nsubedges-1); params.SetSize(nsubedges+1); cout << "divide edge: local h too small" << endl; } } while (i < nsubedges); params[0] = s0; params[nsubedges] = s1; if (params[nsubedges] <= params[nsubedges-1]) { cout << "CORRECTED" << endl; ps.SetSize (nsubedges-2); params.SetSize (nsubedges); params[nsubedges] = s1; } } void OCCFindEdges (OCCGeometry & geom, Mesh & mesh) { const char * savetask = multithread.task; multithread.task = "Edge meshing"; (*testout) << "edge meshing" << endl; int nvertices = geom.vmap.Extent(); int nedges = geom.emap.Extent(); (*testout) << "nvertices = " << nvertices << endl; (*testout) << "nedges = " << nedges << endl; double eps = 1e-6 * geom.GetBoundingBox().Diam(); for (int i = 1; i <= nvertices; i++) { gp_Pnt pnt = BRep_Tool::Pnt (TopoDS::Vertex(geom.vmap(i))); MeshPoint mp( Point<3>(pnt.X(), pnt.Y(), pnt.Z()) ); bool exists = 0; if (merge_solids) for (PointIndex pi = 1; pi <= mesh.GetNP(); pi++) if ( Dist2 (mesh[pi], Point<3>(mp)) < eps*eps) { exists = 1; break; } if (!exists) mesh.AddPoint (mp); } (*testout) << "different vertices = " << mesh.GetNP() << endl; int first_ep = mesh.GetNP()+1; Array face2solid[2]; for (int i = 0; i<2; i++) { face2solid[i].SetSize (geom.fmap.Extent()); face2solid[i] = 0; } int solidnr = 0; for (TopExp_Explorer exp0(geom.shape, TopAbs_SOLID); exp0.More(); exp0.Next()) { solidnr++; for (TopExp_Explorer exp1(exp0.Current(), TopAbs_FACE); exp1.More(); exp1.Next()) { TopoDS_Face face = TopoDS::Face(exp1.Current()); int facenr = geom.fmap.FindIndex(face); if (face2solid[0][facenr-1] == 0) face2solid[0][facenr-1] = solidnr; else face2solid[1][facenr-1] = solidnr; } } int total = 0; for (int i3 = 1; i3 <= geom.fmap.Extent(); i3++) for (TopExp_Explorer exp2(geom.fmap(i3), TopAbs_WIRE); exp2.More(); exp2.Next()) for (TopExp_Explorer exp3(exp2.Current(), TopAbs_EDGE); exp3.More(); exp3.Next()) total++; int facenr = 0; int edgenr = 0; (*testout) << "faces = " << geom.fmap.Extent() << endl; int curr = 0; for (int i3 = 1; i3 <= geom.fmap.Extent(); i3++) { TopoDS_Face face = TopoDS::Face(geom.fmap(i3)); facenr = geom.fmap.FindIndex (face); // sollte doch immer == i3 sein ??? JS int solidnr0 = face2solid[0][i3-1]; int solidnr1 = face2solid[1][i3-1]; /* auskommentiert am 3.3.05 von robert for (exp2.Init (geom.somap(solidnr0), TopAbs_FACE); exp2.More(); exp2.Next()) { TopoDS_Face face2 = TopoDS::Face(exp2.Current()); if (geom.fmap.FindIndex(face2) == facenr) { // if (face.Orientation() != face2.Orientation()) swap (solidnr0, solidnr1); } } */ mesh.AddFaceDescriptor (FaceDescriptor(facenr, solidnr0, solidnr1, 0)); // Philippose - 06/07/2009 // Add the face colour to the mesh data Quantity_Color face_colour; if(!(geom.face_colours.IsNull()) && (geom.face_colours->GetColor(face,XCAFDoc_ColorSurf,face_colour))) { mesh.GetFaceDescriptor(facenr).SetSurfColour(Vec3d(face_colour.Red(),face_colour.Green(),face_colour.Blue())); } else { mesh.GetFaceDescriptor(facenr).SetSurfColour(Vec3d(0.0,1.0,0.0)); } if(geom.fnames.Size()>=facenr) mesh.GetFaceDescriptor(facenr).SetBCName(&geom.fnames[facenr-1]); mesh.GetFaceDescriptor(facenr).SetBCProperty(facenr); // ACHTUNG! STIMMT NICHT ALLGEMEIN (RG) Handle(Geom_Surface) occface = BRep_Tool::Surface(face); for (TopExp_Explorer exp2 (face, TopAbs_WIRE); exp2.More(); exp2.Next()) { TopoDS_Shape wire = exp2.Current(); for (TopExp_Explorer exp3 (wire, TopAbs_EDGE); exp3.More(); exp3.Next()) { curr++; (*testout) << "edge nr " << curr << endl; multithread.percent = 100 * curr / double (total); if (multithread.terminate) return; TopoDS_Edge edge = TopoDS::Edge (exp3.Current()); if (BRep_Tool::Degenerated(edge)) { //(*testout) << "ignoring degenerated edge" << endl; continue; } if (geom.vmap.FindIndex(TopExp::FirstVertex (edge)) == geom.vmap.FindIndex(TopExp::LastVertex (edge))) { GProp_GProps system; BRepGProp::LinearProperties(edge, system); if (system.Mass() < eps) { cout << "ignoring edge " << geom.emap.FindIndex (edge) << ". closed edge with length < " << eps << endl; continue; } } Handle(Geom2d_Curve) cof; double s0, s1; cof = BRep_Tool::CurveOnSurface (edge, face, s0, s1); int geomedgenr = geom.emap.FindIndex(edge); Array mp; Array params; DivideEdge (edge, mp, params, mesh); Array pnums; pnums.SetSize (mp.Size()+2); if (!merge_solids) { pnums[0] = geom.vmap.FindIndex (TopExp::FirstVertex (edge)); pnums[pnums.Size()-1] = geom.vmap.FindIndex (TopExp::LastVertex (edge)); } else { Point<3> fp = occ2ng (BRep_Tool::Pnt (TopExp::FirstVertex (edge))); Point<3> lp = occ2ng (BRep_Tool::Pnt (TopExp::LastVertex (edge))); pnums[0] = -1; pnums.Last() = -1; for (PointIndex pi = 1; pi < first_ep; pi++) { if (Dist2 (mesh[pi], fp) < eps*eps) pnums[0] = pi; if (Dist2 (mesh[pi], lp) < eps*eps) pnums.Last() = pi; } } for (int i = 1; i <= mp.Size(); i++) { bool exists = 0; int j; for (j = first_ep; j <= mesh.GetNP(); j++) if ((mesh.Point(j)-Point<3>(mp[i-1])).Length() < eps) { exists = 1; break; } if (exists) pnums[i] = j; else { mesh.AddPoint (mp[i-1]); (*testout) << "add meshpoint " << mp[i-1] << endl; pnums[i] = mesh.GetNP(); } } (*testout) << "NP = " << mesh.GetNP() << endl; //(*testout) << pnums[pnums.Size()-1] << endl; for (int i = 1; i <= mp.Size()+1; i++) { edgenr++; Segment seg; seg[0] = pnums[i-1]; seg[1] = pnums[i]; seg.edgenr = edgenr; seg.si = facenr; seg.epgeominfo[0].dist = params[i-1]; seg.epgeominfo[1].dist = params[i]; seg.epgeominfo[0].edgenr = geomedgenr; seg.epgeominfo[1].edgenr = geomedgenr; gp_Pnt2d p2d; p2d = cof->Value(params[i-1]); // if (i == 1) p2d = cof->Value(s0); seg.epgeominfo[0].u = p2d.X(); seg.epgeominfo[0].v = p2d.Y(); p2d = cof->Value(params[i]); // if (i == mp.Size()+1) p2d = cof -> Value(s1); seg.epgeominfo[1].u = p2d.X(); seg.epgeominfo[1].v = p2d.Y(); /* if (occface->IsUPeriodic()) { cout << "U Periodic" << endl; if (fabs(seg.epgeominfo[1].u-seg.epgeominfo[0].u) > fabs(seg.epgeominfo[1].u- (seg.epgeominfo[0].u-occface->UPeriod()))) seg.epgeominfo[0].u = p2d.X()+occface->UPeriod(); if (fabs(seg.epgeominfo[1].u-seg.epgeominfo[0].u) > fabs(seg.epgeominfo[1].u- (seg.epgeominfo[0].u+occface->UPeriod()))) seg.epgeominfo[0].u = p2d.X()-occface->UPeriod(); } if (occface->IsVPeriodic()) { cout << "V Periodic" << endl; if (fabs(seg.epgeominfo[1].v-seg.epgeominfo[0].v) > fabs(seg.epgeominfo[1].v- (seg.epgeominfo[0].v-occface->VPeriod()))) seg.epgeominfo[0].v = p2d.Y()+occface->VPeriod(); if (fabs(seg.epgeominfo[1].v-seg.epgeominfo[0].v) > fabs(seg.epgeominfo[1].v- (seg.epgeominfo[0].v+occface->VPeriod()))) seg.epgeominfo[0].v = p2d.Y()-occface->VPeriod(); } */ if (edge.Orientation() == TopAbs_REVERSED) { swap (seg[0], seg[1]); swap (seg.epgeominfo[0].dist, seg.epgeominfo[1].dist); swap (seg.epgeominfo[0].u, seg.epgeominfo[1].u); swap (seg.epgeominfo[0].v, seg.epgeominfo[1].v); } mesh.AddSegment (seg); //edgesegments[geomedgenr-1]->Append(mesh.GetNSeg()); } } } } // for(i=1; i<=mesh.GetNSeg(); i++) // (*testout) << "edge " << mesh.LineSegment(i).edgenr << " face " << mesh.LineSegment(i).si // << " p1 " << mesh.LineSegment(i)[0] << " p2 " << mesh.LineSegment(i)[1] << endl; // exit(10); mesh.CalcSurfacesOfNode(); multithread.task = savetask; } void OCCMeshSurface (OCCGeometry & geom, Mesh & mesh, int perfstepsend) { int i, j, k; int changed; const char * savetask = multithread.task; multithread.task = "Surface meshing"; geom.facemeshstatus = 0; int noldp = mesh.GetNP(); double starttime = GetTime(); Array glob2loc(noldp); //int projecttype = PARAMETERSPACE; int projecttype = PARAMETERSPACE; int notrys = 1; int surfmesherror = 0; for (k = 1; k <= mesh.GetNFD(); k++) { if(1==0 && !geom.fvispar[k-1].IsDrawable()) { (*testout) << "ignoring face " << k << endl; cout << "ignoring face " << k << endl; continue; } (*testout) << "mesh face " << k << endl; multithread.percent = 100 * k / (mesh.GetNFD() + VSMALL); geom.facemeshstatus[k-1] = -1; /* if (k != 42) { cout << "skipped" << endl; continue; } */ FaceDescriptor & fd = mesh.GetFaceDescriptor(k); int oldnf = mesh.GetNSE(); Box<3> bb = geom.GetBoundingBox(); // int projecttype = PLANESPACE; Meshing2OCCSurfaces meshing(TopoDS::Face(geom.fmap(k)), bb, projecttype); if (meshing.GetProjectionType() == PLANESPACE) PrintMessage (2, "Face ", k, " / ", mesh.GetNFD(), " (plane space projection)"); else PrintMessage (2, "Face ", k, " / ", mesh.GetNFD(), " (parameter space projection)"); if (surfmesherror) cout << "Surface meshing error occurred before (in " << surfmesherror << " faces)" << endl; // Meshing2OCCSurfaces meshing(f2, bb); meshing.SetStartTime (starttime); //(*testout) << "Face " << k << endl << endl; if (meshing.GetProjectionType() == PLANESPACE) { int cntp = 0; glob2loc = 0; for (i = 1; i <= mesh.GetNSeg(); i++) { Segment & seg = mesh.LineSegment(i); if (seg.si == k) { for (j = 1; j <= 2; j++) { int pi = (j == 1) ? seg[0] : seg[1]; if (!glob2loc.Get(pi)) { meshing.AddPoint (mesh.Point(pi), pi); cntp++; glob2loc.Elem(pi) = cntp; } } } } for (i = 1; i <= mesh.GetNSeg(); i++) { Segment & seg = mesh.LineSegment(i); if (seg.si == k) { PointGeomInfo gi0, gi1; gi0.trignum = gi1.trignum = k; gi0.u = seg.epgeominfo[0].u; gi0.v = seg.epgeominfo[0].v; gi1.u = seg.epgeominfo[1].u; gi1.v = seg.epgeominfo[1].v; meshing.AddBoundaryElement (glob2loc.Get(seg[0]), glob2loc.Get(seg[1]), gi0, gi1); //(*testout) << gi0.u << " " << gi0.v << endl; //(*testout) << gi1.u << " " << gi1.v << endl; } } } else { int cntp = 0; for (i = 1; i <= mesh.GetNSeg(); i++) if (mesh.LineSegment(i).si == k) cntp+=2; Array< PointGeomInfo > gis; gis.SetAllocSize (cntp); gis.SetSize (0); for (i = 1; i <= mesh.GetNSeg(); i++) { Segment & seg = mesh.LineSegment(i); if (seg.si == k) { PointGeomInfo gi0, gi1; gi0.trignum = gi1.trignum = k; gi0.u = seg.epgeominfo[0].u; gi0.v = seg.epgeominfo[0].v; gi1.u = seg.epgeominfo[1].u; gi1.v = seg.epgeominfo[1].v; int locpnum[2] = {0, 0}; for (j = 0; j < 2; j++) { PointGeomInfo gi = (j == 0) ? gi0 : gi1; int l; for (l = 0; l < gis.Size() && locpnum[j] == 0; l++) { double dist = sqr (gis[l].u-gi.u)+sqr(gis[l].v-gi.v); if (dist < 1e-10) locpnum[j] = l+1; } if (locpnum[j] == 0) { int pi = (j == 0) ? seg[0] : seg[1]; meshing.AddPoint (mesh.Point(pi), pi); gis.SetSize (gis.Size()+1); gis[l] = gi; locpnum[j] = l+1; } } meshing.AddBoundaryElement (locpnum[0], locpnum[1], gi0, gi1); //(*testout) << gi0.u << " " << gi0.v << endl; //(*testout) << gi1.u << " " << gi1.v << endl; } } } // Philippose - 15/01/2009 double maxh = geom.face_maxh[k-1]; //double maxh = mparam.maxh; mparam.checkoverlap = 0; // int noldpoints = mesh->GetNP(); int noldsurfel = mesh.GetNSE(); GProp_GProps sprops; BRepGProp::SurfaceProperties(TopoDS::Face(geom.fmap(k)),sprops); meshing.SetMaxArea(2.*sprops.Mass()); MESHING2_RESULT res; try { res = meshing.GenerateMesh (mesh, mparam, maxh, k); } catch (SingularMatrixException) { (*myerr) << "Singular Matrix" << endl; res = MESHING2_GIVEUP; } catch (UVBoundsException) { (*myerr) << "UV bounds exceeded" << endl; res = MESHING2_GIVEUP; } projecttype = PARAMETERSPACE; if (res != MESHING2_OK) { if (notrys == 1) { for (int i = noldsurfel+1; i <= mesh.GetNSE(); i++) mesh.DeleteSurfaceElement (i); mesh.Compress(); cout << "retry Surface " << k << endl; k--; projecttype*=-1; notrys++; continue; } else { geom.facemeshstatus[k-1] = -1; PrintError ("Problem in Surface mesh generation"); surfmesherror++; // throw NgException ("Problem in Surface mesh generation"); } } else { geom.facemeshstatus[k-1] = 1; } notrys = 1; for (i = oldnf+1; i <= mesh.GetNSE(); i++) mesh.SurfaceElement(i).SetIndex (k); } // ofstream problemfile("occmesh.rep"); // problemfile << "SURFACEMESHING" << endl << endl; if (surfmesherror) { cout << "WARNING! NOT ALL FACES HAVE BEEN MESHED" << endl; cout << "SURFACE MESHING ERROR OCCURRED IN " << surfmesherror << " FACES:" << endl; for (int i = 1; i <= geom.fmap.Extent(); i++) if (geom.facemeshstatus[i-1] == -1) { cout << "Face " << i << endl; // problemfile << "problem with face " << i << endl; // problemfile << "vertices: " << endl; TopExp_Explorer exp0,exp1,exp2; for ( exp0.Init(TopoDS::Face (geom.fmap(i)), TopAbs_WIRE); exp0.More(); exp0.Next() ) { TopoDS_Wire wire = TopoDS::Wire(exp0.Current()); for ( exp1.Init(wire,TopAbs_EDGE); exp1.More(); exp1.Next() ) { TopoDS_Edge edge = TopoDS::Edge(exp1.Current()); for ( exp2.Init(edge,TopAbs_VERTEX); exp2.More(); exp2.Next() ) { TopoDS_Vertex vertex = TopoDS::Vertex(exp2.Current()); gp_Pnt point = BRep_Tool::Pnt(vertex); // problemfile << point.X() << " " << point.Y() << " " << point.Z() << endl; } } } // problemfile << endl; } cout << endl << endl; cout << "for more information open IGES/STEP Topology Explorer" << endl; // problemfile.close(); throw NgException ("Problem in Surface mesh generation"); } else { // problemfile << "OK" << endl << endl; // problemfile.close(); } if (multithread.terminate || perfstepsend < MESHCONST_OPTSURFACE) return; multithread.task = "Optimizing surface"; static int timer_opt2d = NgProfiler::CreateTimer ("Optimization 2D"); NgProfiler::StartTimer (timer_opt2d); for (k = 1; k <= mesh.GetNFD(); k++) { // if (k != 42) continue; // if (k != 36) continue; // (*testout) << "optimize face " << k << endl; multithread.percent = 100 * k / (mesh.GetNFD() + VSMALL); FaceDescriptor & fd = mesh.GetFaceDescriptor(k); PrintMessage (1, "Optimize Surface ", k); for (i = 1; i <= mparam.optsteps2d; i++) { // (*testout) << "optstep " << i << endl; if (multithread.terminate) return; { MeshOptimize2dOCCSurfaces meshopt(geom); meshopt.SetFaceIndex (k); meshopt.SetImproveEdges (0); meshopt.SetMetricWeight (mparam.elsizeweight); //meshopt.SetMetricWeight (0.2); meshopt.SetWriteStatus (0); // (*testout) << "EdgeSwapping (mesh, (i > mparam.optsteps2d/2))" << endl; meshopt.EdgeSwapping (mesh, (i > mparam.optsteps2d/2)); } if (multithread.terminate) return; { MeshOptimize2dOCCSurfaces meshopt(geom); meshopt.SetFaceIndex (k); meshopt.SetImproveEdges (0); //meshopt.SetMetricWeight (0.2); meshopt.SetMetricWeight (mparam.elsizeweight); meshopt.SetWriteStatus (0); // (*testout) << "ImproveMesh (mesh)" << endl; meshopt.ImproveMesh (mesh, mparam); } { MeshOptimize2dOCCSurfaces meshopt(geom); meshopt.SetFaceIndex (k); meshopt.SetImproveEdges (0); //meshopt.SetMetricWeight (0.2); meshopt.SetMetricWeight (mparam.elsizeweight); meshopt.SetWriteStatus (0); // (*testout) << "CombineImprove (mesh)" << endl; meshopt.CombineImprove (mesh); } if (multithread.terminate) return; { MeshOptimize2dOCCSurfaces meshopt(geom); meshopt.SetFaceIndex (k); meshopt.SetImproveEdges (0); //meshopt.SetMetricWeight (0.2); meshopt.SetMetricWeight (mparam.elsizeweight); meshopt.SetWriteStatus (0); // (*testout) << "ImproveMesh (mesh)" << endl; meshopt.ImproveMesh (mesh, mparam); } } } mesh.CalcSurfacesOfNode(); mesh.Compress(); NgProfiler::StopTimer (timer_opt2d); multithread.task = savetask; // Gerhard BEGIN for(int i = 0; i maxhdom; maxhdom.SetSize (geom.NrSolids()); maxhdom = mparam.maxh; mesh.SetMaxHDomain (maxhdom); Box<3> bb = geom.GetBoundingBox(); bb.Increase (bb.Diam()/10); mesh.SetLocalH (bb.PMin(), bb.PMax(), 0.5); if (mparam.uselocalh) { const char * savetask = multithread.task; multithread.percent = 0; mesh.SetLocalH (bb.PMin(), bb.PMax(), mparam.grading); int nedges = geom.emap.Extent(); double mincurvelength = IGNORECURVELENGTH; double maxedgelen = 0; double minedgelen = 1e99; if(occparam.resthminedgelenenable) { mincurvelength = occparam.resthminedgelen; if(mincurvelength < IGNORECURVELENGTH) mincurvelength = IGNORECURVELENGTH; } multithread.task = "Setting local mesh size (elements per edge)"; // setting elements per edge for (int i = 1; i <= nedges && !multithread.terminate; i++) { TopoDS_Edge e = TopoDS::Edge (geom.emap(i)); multithread.percent = 100 * (i-1)/double(nedges); if (BRep_Tool::Degenerated(e)) continue; GProp_GProps system; BRepGProp::LinearProperties(e, system); double len = system.Mass(); if (len < mincurvelength) { (*testout) << "ignored" << endl; continue; } double localh = len/mparam.segmentsperedge; double s0, s1; // Philippose - 23/01/2009 // Find all the parent faces of a given edge // and limit the mesh size of the edge based on the // mesh size limit of the face TopTools_IndexedDataMapOfShapeListOfShape edge_face_map; edge_face_map.Clear(); TopExp::MapShapesAndAncestors(geom.shape, TopAbs_EDGE, TopAbs_FACE, edge_face_map); const TopTools_ListOfShape& parent_faces = edge_face_map.FindFromKey(e); TopTools_ListIteratorOfListOfShape parent_face_list; for(parent_face_list.Initialize(parent_faces); parent_face_list.More(); parent_face_list.Next()) { TopoDS_Face parent_face = TopoDS::Face(parent_face_list.Value()); int face_index = geom.fmap.FindIndex(parent_face); if(face_index >= 1) localh = min(localh,geom.face_maxh[face_index - 1]); } Handle(Geom_Curve) c = BRep_Tool::Curve(e, s0, s1); maxedgelen = max (maxedgelen, len); minedgelen = min (minedgelen, len); // Philippose - 23/01/2009 // Modified the calculation of maxj, because the // method used so far always results in maxj = 2, // which causes the localh to be set only at the // starting, mid and end of the edge. // Old Algorithm: // int maxj = 2 * (int) ceil (localh/len); int maxj = max((int) ceil(len/localh), 2); for (int j = 0; j <= maxj; j++) { gp_Pnt pnt = c->Value (s0+double(j)/maxj*(s1-s0)); mesh.RestrictLocalH (Point3d(pnt.X(), pnt.Y(), pnt.Z()), localh); } } multithread.task = "Setting local mesh size (edge curvature)"; // setting edge curvature int nsections = 20; for (int i = 1; i <= nedges && !multithread.terminate; i++) { double maxcur = 0; multithread.percent = 100 * (i-1)/double(nedges); TopoDS_Edge edge = TopoDS::Edge (geom.emap(i)); if (BRep_Tool::Degenerated(edge)) continue; double s0, s1; Handle(Geom_Curve) c = BRep_Tool::Curve(edge, s0, s1); BRepAdaptor_Curve brepc(edge); BRepLProp_CLProps prop(brepc, 2, 1e-5); for (int j = 1; j <= nsections; j++) { double s = s0 + j/(double) nsections * (s1-s0); prop.SetParameter (s); double curvature = prop.Curvature(); if(curvature> maxcur) maxcur = curvature; if (curvature >= 1e99) continue; gp_Pnt pnt = c->Value (s); mesh.RestrictLocalH (Point3d(pnt.X(), pnt.Y(), pnt.Z()), ComputeH (fabs(curvature))); } // (*testout) << "edge " << i << " max. curvature: " << maxcur << endl; } multithread.task = "Setting local mesh size (face curvature)"; // setting face curvature int nfaces = geom.fmap.Extent(); for (int i = 1; i <= nfaces && !multithread.terminate; i++) { multithread.percent = 100 * (i-1)/double(nfaces); TopoDS_Face face = TopoDS::Face(geom.fmap(i)); TopLoc_Location loc; Handle(Geom_Surface) surf = BRep_Tool::Surface (face); Handle(Poly_Triangulation) triangulation = BRep_Tool::Triangulation (face, loc); if (triangulation.IsNull()) { BRepTools::Clean (geom.shape); BRepMesh_IncrementalMesh (geom.shape, 0.01, true); triangulation = BRep_Tool::Triangulation (face, loc); } BRepAdaptor_Surface sf(face, Standard_True); BRepLProp_SLProps prop(sf, 2, 1e-5); int ntriangles = triangulation -> NbTriangles(); for (int j = 1; j <= ntriangles; j++) { gp_Pnt p[3]; gp_Pnt2d par[3]; for (int k = 1; k <=3; k++) { int n = triangulation->Triangles()(j)(k); p[k-1] = triangulation->Nodes()(n).Transformed(loc); par[k-1] = triangulation->UVNodes()(n); } //double maxside = 0; //maxside = max (maxside, p[0].Distance(p[1])); //maxside = max (maxside, p[0].Distance(p[2])); //maxside = max (maxside, p[1].Distance(p[2])); //cout << "\rFace " << i << " pos11 ntriangles " << ntriangles << " maxside " << maxside << flush; RestrictHTriangle (par[0], par[1], par[2], &prop, mesh, 0); //cout << "\rFace " << i << " pos12 ntriangles " << ntriangles << flush; } } // setting close edges if (occparam.resthcloseedgeenable) { multithread.task = "Setting local mesh size (close edges)"; int sections = 100; Array lines(sections*nedges); BoxTree<3> * searchtree = new BoxTree<3> (bb.PMin(), bb.PMax()); int nlines = 0; for (int i = 1; i <= nedges && !multithread.terminate; i++) { TopoDS_Edge edge = TopoDS::Edge (geom.emap(i)); if (BRep_Tool::Degenerated(edge)) continue; double s0, s1; Handle(Geom_Curve) c = BRep_Tool::Curve(edge, s0, s1); BRepAdaptor_Curve brepc(edge); BRepLProp_CLProps prop(brepc, 1, 1e-5); prop.SetParameter (s0); gp_Vec d0 = prop.D1().Normalized(); double s_start = s0; int count = 0; for (int j = 1; j <= sections; j++) { double s = s0 + (s1-s0)*(double)j/(double)sections; prop.SetParameter (s); gp_Vec d1 = prop.D1().Normalized(); double cosalpha = fabs(d0*d1); if ((j == sections) || (cosalpha < cos(10.0/180.0*M_PI))) { count++; gp_Pnt p0 = c->Value (s_start); gp_Pnt p1 = c->Value (s); lines[nlines].p0 = Point<3> (p0.X(), p0.Y(), p0.Z()); lines[nlines].p1 = Point<3> (p1.X(), p1.Y(), p1.Z()); Box3d box; box.SetPoint (Point3d(lines[nlines].p0)); box.AddPoint (Point3d(lines[nlines].p1)); searchtree->Insert (box.PMin(), box.PMax(), nlines+1); nlines++; s_start = s; d0 = d1; } } } Array linenums; for (int i = 0; i < nlines; i++) { multithread.percent = (100*i)/double(nlines); Line & line = lines[i]; Box3d box; box.SetPoint (Point3d(line.p0)); box.AddPoint (Point3d(line.p1)); double maxhline = max (mesh.GetH(box.PMin()), mesh.GetH(box.PMax())); box.Increase(maxhline); double mindist = 1e99; linenums.SetSize(0); searchtree->GetIntersecting(box.PMin(),box.PMax(),linenums); for (int j = 0; j < linenums.Size(); j++) { int num = linenums[j]-1; if (i == num) continue; if ((line.p0-lines[num].p0).Length2() < 1e-15) continue; if ((line.p0-lines[num].p1).Length2() < 1e-15) continue; if ((line.p1-lines[num].p0).Length2() < 1e-15) continue; if ((line.p1-lines[num].p1).Length2() < 1e-15) continue; mindist = min (mindist, line.Dist(lines[num])); } mindist /= (occparam.resthcloseedgefac + VSMALL); if (mindist < 1e-3) { (*testout) << "extremely small local h: " << mindist << " --> setting to 1e-3" << endl; (*testout) << "somewhere near " << line.p0 << " - " << line.p1 << endl; mindist = 1e-3; } mesh.RestrictLocalHLine(line.p0, line.p1, mindist); } } multithread.task = savetask; } // Philippose - 09/03/2009 // Added the capability to load the mesh size from a // file also for OpenCascade Geometry // Note: // ** If the "uselocalh" option is ticked in // the "mesh options...insider" menu, the mesh // size will be further modified by the topology // analysis routines. // ** To use the mesh size file as the sole source // for defining the mesh size, uncheck the "uselocalh" // option. mesh.LoadLocalMeshSize (mparam.meshsizefilename); } int OCCGenerateMesh (OCCGeometry & geom, shared_ptr & mesh, MeshingParameters & mparam) { multithread.percent = 0; if (mparam.perfstepsstart <= MESHCONST_ANALYSE) { if(mesh.get() == nullptr) mesh = make_shared(); mesh->geomtype = Mesh::GEOM_OCC; OCCSetLocalMeshSize(geom,*mesh); } if (multithread.terminate || mparam.perfstepsend <= MESHCONST_ANALYSE) return TCL_OK; if (mparam.perfstepsstart <= MESHCONST_MESHEDGES) { OCCFindEdges (geom, *mesh); /* cout << "Removing redundant points" << endl; int i, j; int np = mesh->GetNP(); Array equalto; equalto.SetSize (np); equalto = 0; for (i = 1; i <= np; i++) { for (j = i+1; j <= np; j++) { if (!equalto[j-1] && (Dist2 (mesh->Point(i), mesh->Point(j)) < 1e-12)) equalto[j-1] = i; } } for (i = 1; i <= np; i++) if (equalto[i-1]) { cout << "Point " << i << " is equal to Point " << equalto[i-1] << endl; for (j = 1; j <= mesh->GetNSeg(); j++) { Segment & seg = mesh->LineSegment(j); if (seg[0] == i) seg[0] = equalto[i-1]; if (seg[1] == i) seg[1] = equalto[i-1]; } } cout << "Removing degenerated segments" << endl; for (j = 1; j <= mesh->GetNSeg(); j++) { Segment & seg = mesh->LineSegment(j); if (seg[0] == seg[1]) { mesh->DeleteSegment(j); cout << "Deleting Segment " << j << endl; } } mesh->Compress(); */ /* for (int i = 1; i <= geom.fmap.Extent(); i++) { Handle(Geom_Surface) hf1 = BRep_Tool::Surface(TopoDS::Face(geom.fmap(i))); for (int j = i+1; j <= geom.fmap.Extent(); j++) { Handle(Geom_Surface) hf2 = BRep_Tool::Surface(TopoDS::Face(geom.fmap(j))); if (hf1 == hf2) cout << "face " << i << " and face " << j << " lie on same surface" << endl; } } */ #ifdef LOG_STREAM (*logout) << "Edges meshed" << endl << "time = " << GetTime() << " sec" << endl << "points: " << mesh->GetNP() << endl; #endif } if (multithread.terminate || mparam.perfstepsend <= MESHCONST_MESHEDGES) return TCL_OK; if (mparam.perfstepsstart <= MESHCONST_MESHSURFACE) { OCCMeshSurface (geom, *mesh, mparam.perfstepsend); if (multithread.terminate) return TCL_OK; #ifdef LOG_STREAM (*logout) << "Surfaces meshed" << endl << "time = " << GetTime() << " sec" << endl << "points: " << mesh->GetNP() << endl; #endif #ifdef STAT_STREAM (*statout) << mesh->GetNSeg() << " & " << mesh->GetNSE() << " & - &" << GetTime() << " & " << endl; #endif // MeshQuality2d (*mesh); mesh->CalcSurfacesOfNode(); } if (multithread.terminate || mparam.perfstepsend <= MESHCONST_OPTSURFACE) return TCL_OK; if (mparam.perfstepsstart <= MESHCONST_MESHVOLUME) { multithread.task = "Volume meshing"; MESHING3_RESULT res = MeshVolume (mparam, *mesh); /* ofstream problemfile("occmesh.rep",ios_base::app); problemfile << "VOLUMEMESHING" << endl << endl; if(res != MESHING3_OK) problemfile << "ERROR" << endl << endl; else problemfile << "OK" << endl << mesh->GetNE() << " elements" << endl << endl; problemfile.close(); */ if (res != MESHING3_OK) return TCL_ERROR; if (multithread.terminate) return TCL_OK; RemoveIllegalElements (*mesh); if (multithread.terminate) return TCL_OK; MeshQuality3d (*mesh); #ifdef STAT_STREAM (*statout) << GetTime() << " & "; #endif #ifdef LOG_STREAM (*logout) << "Volume meshed" << endl << "time = " << GetTime() << " sec" << endl << "points: " << mesh->GetNP() << endl; #endif } if (multithread.terminate || mparam.perfstepsend <= MESHCONST_MESHVOLUME) return TCL_OK; if (mparam.perfstepsstart <= MESHCONST_OPTVOLUME) { multithread.task = "Volume optimization"; OptimizeVolume (mparam, *mesh); if (multithread.terminate) return TCL_OK; #ifdef STAT_STREAM (*statout) << GetTime() << " & " << mesh->GetNE() << " & " << mesh->GetNP() << " " << '\\' << '\\' << " \\" << "hline" << endl; #endif #ifdef LOG_STREAM (*logout) << "Volume optimized" << endl << "time = " << GetTime() << " sec" << endl << "points: " << mesh->GetNP() << endl; #endif // cout << "Optimization complete" << endl; } (*testout) << "NP: " << mesh->GetNP() << endl; for (int i = 1; i <= mesh->GetNP(); i++) (*testout) << mesh->Point(i) << endl; (*testout) << endl << "NSegments: " << mesh->GetNSeg() << endl; for (int i = 1; i <= mesh->GetNSeg(); i++) (*testout) << mesh->LineSegment(i) << endl; for (int i = 0; i < mesh->GetNDomains(); i++) if(geom.snames.Size()) mesh->SetMaterial( i+1, geom.snames[i] ); return TCL_OK; } } #endif netgen-6.2.1804/libsrc/occ/python_occ.cpp0000644000175000017500000000431213272137567016700 0ustar kurtkurt#ifdef NG_PYTHON #ifdef OCCGEOMETRY #include <../general/ngpython.hpp> #include #include using namespace netgen; namespace netgen { extern std::shared_ptr ng_geometry; } DLL_HEADER void ExportNgOCC(py::module &m) { py::class_, NetgenGeometry> (m, "OCCGeometry", R"raw_string(Use LoadOCCGeometry to load the geometry from a *.step file.)raw_string") .def(py::init<>()) .def("Heal",[](OCCGeometry & self, double tolerance, bool fixsmalledges, bool fixspotstripfaces, bool sewfaces, bool makesolids, bool splitpartitions) { self.tolerance = tolerance; self.fixsmalledges = fixsmalledges; self.fixspotstripfaces = fixspotstripfaces; self.sewfaces = sewfaces; self.makesolids = makesolids; self.splitpartitions = splitpartitions; self.HealGeometry(); self.BuildFMap(); },py::arg("tolerance")=1e-3, py::arg("fixsmalledges")=true, py::arg("fixspotstripfaces")=true, py::arg("sewfaces")=true, py::arg("makesolids")=true, py::arg("splitpartitions")=false,R"raw_string(Heal the OCCGeometry.)raw_string",py::call_guard()) ; m.def("LoadOCCGeometry",FunctionPointer([] (const string & filename) { cout << "load OCC geometry"; ifstream ist(filename); OCCGeometry * instance = new OCCGeometry(); instance = LoadOCC_STEP(filename.c_str()); return shared_ptr(instance, NOOP_Deleter); }),py::call_guard()); m.def("GenerateMesh", FunctionPointer([] (shared_ptr geo, MeshingParameters ¶m) { auto mesh = make_shared(); SetGlobalMesh(mesh); mesh->SetGeometry(geo); ng_geometry = geo; try { geo->GenerateMesh(mesh,param); } catch (NgException ex) { cout << "Caught NgException: " << ex.What() << endl; } return mesh; }),py::call_guard()) ; } PYBIND11_MODULE(libNgOCC, m) { ExportNgOCC(m); } #endif // OCCGEOMETRY #endif // NG_PYTHON netgen-6.2.1804/libsrc/occ/vsocc.hpp0000644000175000017500000000161313272137567015656 0ustar kurtkurt#ifndef FILE_VSOCC #define FILE_VSOCC /**************************************************************************/ /* File: vsocc.hpp */ /* Author: Joachim Schoeberl */ /* Date: 05. Jan. 2011 */ /**************************************************************************/ namespace netgen { class VisualSceneOCCGeometry : public VisualScene { Array trilists; Array linelists; int selsurf; class OCCGeometry * occgeometry; public: VisualSceneOCCGeometry (); virtual ~VisualSceneOCCGeometry (); void SetGeometry (class OCCGeometry * ageom) { occgeometry = ageom; } virtual void BuildScene (int zoomall = 0); virtual void DrawScene (); virtual void MouseDblClick (int px, int py); }; } #endif netgen-6.2.1804/libsrc/occ/Partition_Loop3d.ixx0000644000175000017500000000027013272137567017751 0ustar kurtkurt// GEOM PARTITION : partition algorithm // // Copyright (C) 2003 CEA/DEN, EDF R&D // // // // File : Partition_Loop3d.ixx // Module : GEOM #include "Partition_Loop3d.jxx" netgen-6.2.1804/libsrc/occ/Partition_Inter3d.cxx0000644000175000017500000007071113272137567020122 0ustar kurtkurt#ifdef OCCGEOMETRY // GEOM PARTITION : partition algorithm // // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org // // // // File : Partition_Inter3d.cxx // Author : Benedicte MARTIN // Module : GEOM // $Header: /cvs/netgen/netgen/libsrc/occ/Partition_Inter3d.cxx,v 1.6 2008/03/31 14:20:28 wabro Exp $ //using namespace std; #include #include "Partition_Inter2d.hxx" #include "Partition_Inter3d.ixx" #include "utilities.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef DEB #include #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include //======================================================================= //function : Partition_Inter3d //purpose : //======================================================================= Partition_Inter3d::Partition_Inter3d() { } //======================================================================= //function : Partition_Inter3d //purpose : //======================================================================= Partition_Inter3d::Partition_Inter3d(const Handle(BRepAlgo_AsDes)& AsDes) :myAsDes(AsDes) { mySectionEdgesAD = new BRepAlgo_AsDes; } //======================================================================= //function : CompletPart3d //purpose : FaceShapeMap is just to know the shape a face belongs to //======================================================================= void Partition_Inter3d::CompletPart3d(const TopTools_ListOfShape& SetOfFaces1, const TopTools_DataMapOfShapeShape& FaceShapeMap) { if (myAsDes.IsNull()) myAsDes = new BRepAlgo_AsDes; TopTools_ListIteratorOfListOfShape it; //--------------------------------------------------------------- // Construction of bounding boxes. //--------------------------------------------------------------- BRep_Builder B; TopoDS_Compound CompOS; B.MakeCompound(CompOS); for (it.Initialize(SetOfFaces1); it.More(); it.Next()) B.Add(CompOS, it.Value()); TopOpeBRepTool_BoxSort BOS; BOS.AddBoxesMakeCOB(CompOS,TopAbs_FACE); for (it.Initialize(SetOfFaces1); it.More(); it.Next()) { TopoDS_Face F1 = TopoDS::Face(it.Value()); // avoid intersecting faces of one shape TopoDS_Shape S1; if (FaceShapeMap.IsBound(F1)) S1 = FaceShapeMap.Find(F1); // to filter faces sharing an edge TopTools_IndexedMapOfShape EM; TopExp::MapShapes( F1, TopAbs_EDGE, EM); TColStd_ListIteratorOfListOfInteger itLI = BOS.Compare(F1); for (; itLI.More(); itLI.Next()) { TopoDS_Face F2 = TopoDS::Face(BOS.TouchedShape(itLI)); if (F1.IsSame(F2) || IsDone(F1,F2)) continue; TopoDS_Shape S2; if (FaceShapeMap.IsBound(F2)) S2 = FaceShapeMap.Find(F2); if (!S1.IsNull() && S1.IsSame(S2)) continue; // descendants of one shape TopExp_Explorer expE (F2, TopAbs_EDGE); for ( ; expE.More(); expE.Next()) if (EM.Contains( expE.Current() )) break; if (expE.More()) { // faces have a common edge, check if they are a tool and a face // generated by the tool in another shape; in that case they are // to be intersected TopLoc_Location L1, L2; Handle(Geom_Surface) S1 = BRep_Tool::Surface( F1, L1 ); Handle(Geom_Surface) S2 = BRep_Tool::Surface( F2, L2 ); if ( S1 != S2 || L1 != L2 ) continue; } F1.Orientation(TopAbs_FORWARD); F2.Orientation(TopAbs_FORWARD); FacesPartition(F1,F2); } // mark as modified a face which has at least one new edge if (!myAsDes->HasDescendant( F1 )) continue; TopTools_ListIteratorOfListOfShape itE (myAsDes->Descendant( F1 )); for ( ; itE.More(); itE.Next()) { if (myNewEdges.Contains( itE.Value())) { myTouched.Add( F1 ); break; } } } } //======================================================================= //function : PutInBounds //purpose : //======================================================================= static void PutInBounds (const TopoDS_Face& F, const TopoDS_Edge& E, Handle(Geom2d_Curve)& C2d) { Standard_Real umin,umax,vmin,vmax; Standard_Real f,l; BRep_Tool::Range(E,f,l); TopLoc_Location L; // Recup S avec la location pour eviter la copie. Handle (Geom_Surface) S = BRep_Tool::Surface(F,L); if (S->IsKind(STANDARD_TYPE(Geom_RectangularTrimmedSurface))) { S = (*(Handle_Geom_RectangularTrimmedSurface*)&S)->BasisSurface(); } if (!S->IsUPeriodic() && !S->IsVPeriodic()) return; BRepTools::UVBounds(F,umin,umax,vmin,vmax); gp_Pnt2d Pf = C2d->Value(f); gp_Pnt2d Pl = C2d->Value(l); const Standard_Real Um = 0.34*f + 0.66*l; gp_Pnt2d Pm = C2d->Value( Um ); // sometimes on shpere, pcurve is out of domain by V though S is // UPeriodic, sometimes it is in domain but nonetheless it has // wrong position. // Check pcurve position by 3D point if (S->IsKind(STANDARD_TYPE( Geom_SphericalSurface ))) { // get point on the surface gp_Pnt Ps = S->Value( Pm.X(), Pm.Y() ); // get point on the edge Handle(Geom_Curve) C = BRep_Tool::Curve( E, f, l ); gp_Pnt Pc = C->Value( Um ); // compare points Standard_Real TolE = BRep_Tool::Tolerance( E ); if ( Pc.SquareDistance( Ps ) * 0.95 < TolE * TolE ) return; // OK // find good UV for Pc: project Pc on S GeomAdaptor_Surface SA (S); Extrema_ExtPS anExtPS (Pc, SA, SA.UResolution( TolE ), SA.VResolution( TolE )); if (anExtPS.IsDone()) { Standard_Integer i, nbExt = anExtPS.NbExt(); Extrema_POnSurf aPOnSurf; for (i = 1; i <= nbExt; ++i ) // if (anExtPS.Value( i ) <= TolE) // V6.3 if (anExtPS.SquareDistance( i ) <= TolE) // V6.5 { aPOnSurf = anExtPS.Point( i ); break; } if (i <= nbExt) { // a point found Standard_Real u, v; aPOnSurf.Parameter( u, v ); gp_Pnt2d aGoodPm ( u, v ); C2d->Translate( Pm , aGoodPm ); } } } //--------------- // Recadre en U. //--------------- if (S->IsUPeriodic()) { Standard_Real period = S->UPeriod(); Standard_Real eps = period*1.e-6; Standard_Real minC = Min(Pf.X(),Pl.X()); minC = Min(minC,Pm.X()); Standard_Real maxC = Max(Pf.X(),Pl.X()); maxC = Max(maxC,Pm.X()); Standard_Real du = 0.; if (minC< umin - eps) { du = (int((umin - minC)/period) + 1)*period; } if (minC > umax + eps) { du = -(int((minC - umax)/period) + 1)*period; } if (du != 0) { gp_Vec2d T1(du,0.); C2d->Translate(T1); minC += du; maxC += du; } // Ajuste au mieux la courbe dans le domaine. if (maxC > umax +100*eps) { Standard_Real d1 = maxC - umax; Standard_Real d2 = umin - minC + period; if (d2 < d1) du =-period; if ( du != 0.) { gp_Vec2d T2(du,0.); C2d->Translate(T2); } } } //------------------ // Recadre en V. //------------------ if (S->IsVPeriodic()) { Standard_Real period = S->VPeriod(); Standard_Real eps = period*1.e-6; Standard_Real minC = Min(Pf.Y(),Pl.Y()); minC = Min(minC,Pm.Y()); Standard_Real maxC = Max(Pf.Y(),Pl.Y()); maxC = Max(maxC,Pm.Y()); Standard_Real dv = 0.; if (minC< vmin - eps) { dv = (int((vmin - minC)/period) + 1)*period; } if (minC > vmax + eps) { dv = -(int((minC - vmax)/period) + 1)*period; } if (dv != 0) { gp_Vec2d T1(0.,dv); C2d->Translate(T1); minC += dv; maxC += dv; } // Ajuste au mieux la courbe dans le domaine. if (maxC > vmax +100*eps) { Standard_Real d1 = maxC - vmax; Standard_Real d2 = vmin - minC + period; if (d2 < d1) dv =-period; if ( dv != 0.) { gp_Vec2d T2(0.,dv); C2d->Translate(T2); } } } } //======================================================================= //function : Inter3D //purpose : //======================================================================= void Partition_Inter3d::Inter3D(const TopoDS_Face& F1, const TopoDS_Face& F2, TopTools_ListOfShape& L) { BRep_Builder B; // fill the data Structure Handle(TopOpeBRepDS_HDataStructure) DatStr = new TopOpeBRepDS_HDataStructure(); TopOpeBRep_DSFiller DSFiller; DSFiller.Insert(F1,F2,DatStr); // define the GeomTool used by the DSFiller : // compute BSpline of degree 1 on intersection curves. Standard_Real tol3dAPPROX = 1e-7; Standard_Real tol2dAPPROX = 1e-7; TopOpeBRepTool_GeomTool GT2 (TopOpeBRepTool_APPROX); GT2.SetTolerances(tol3dAPPROX,tol2dAPPROX); TopOpeBRepDS_BuildTool BT(GT2); // Perform Section TopOpeBRepBuild_Builder TopB(BT); TopB.Perform(DatStr); // =============== // Store new edges // =============== L.Clear(); TopOpeBRepDS_CurveExplorer cex(DatStr->DS()); for (; cex.More(); cex.Next()) { const TopOpeBRepDS_Curve& CDS = cex.Curve(); Standard_Integer ic = cex.Index(); Handle(Geom2d_Curve) pc1 = CDS.Curve1(); Handle(Geom2d_Curve) pc2 = CDS.Curve2(); TopTools_ListIteratorOfListOfShape itLE = TopB.NewEdges(ic); while (itLE.More()) { TopoDS_Edge E = TopoDS::Edge(itLE.Value()); PutInBounds (F1,E,pc1); PutInBounds (F2,E,pc2); B.UpdateEdge (E,pc1,F1,0.); B.UpdateEdge (E,pc2,F2,0.); L.Append (E); itLE.Next(); if (itLE.More()) { pc1 = Handle(Geom2d_Curve)::DownCast(pc1->Copy()); pc2 = Handle(Geom2d_Curve)::DownCast(pc2->Copy()); } } } // ======================== // store same domain faces // ======================== if ( DatStr->HasSameDomain( F1 )) { TopTools_ListOfShape emptyList; if (!mySameDomainFM.IsBound(F1)) mySameDomainFM.Bind(F1,emptyList); if (!mySameDomainFM.IsBound(F2)) mySameDomainFM.Bind(F2,emptyList); mySameDomainFM(F1).Append(F2); mySameDomainFM(F2).Append(F1); } // ==================== // Store section edges // ==================== const TopOpeBRepDS_DataStructure& DS = DatStr->DS(); Standard_Integer j,i,nse = DS.NbSectionEdges(); if (nse == 0) return; TopoDS_Vertex V, sdeV1, sdeV2; TopTools_MapOfShape MV; TopTools_ListOfShape LSE; // list of section edges TopoDS_Face dummyF; for (i = 1; i <= nse; i++) { const TopoDS_Edge & se = DS.SectionEdge(i); if (! TopB.IsSplit(se,TopAbs_ON)) continue; LSE.Append( se ); // add vertices where section edges interferes with other // edges as its descendant in myAsDes TopoDS_Edge sde, oe; // same domain, other edge if (DatStr->HasSameDomain(se)) { sde = TopoDS::Edge( DatStr->SameDomain(se).Value() ); TopExp::Vertices( sde, sdeV1, sdeV2); } TColStd_MapOfInteger MIV; // indices of added edges TopOpeBRepDS_PointIterator itP (DS.ShapeInterferences( se )); itP.SupportKind( TopOpeBRepDS_EDGE ); // loop on intersections of se for (; itP.More(); itP.Next()) { oe = TopoDS::Edge( DS.Shape( itP.Support())); if (itP.IsVertex()) { // there is a vertex at intersection if ( !MIV.Add( itP.Current() )) continue; V = TopoDS::Vertex( DS.Shape( itP.Current())); if ( !sde.IsNull() && (V.IsSame(sdeV1) || V.IsSame(sdeV2)) ) oe = sde; V = ReplaceSameDomainV( V , oe ); V.Orientation( TopAbs_INTERNAL); B.UpdateVertex( V, itP.Parameter(), se, 0.); // AddVonE() sets real U } else { // create a new vertex at the intersection point const TopOpeBRepDS_Point& DSP = DS.Point( itP.Current()); V = BRepLib_MakeVertex( DSP.Point() ); V.Orientation( TopAbs_INTERNAL); B.UpdateVertex( V, itP.Parameter(), se, DSP.Tolerance()); // make V be on the other edge TopOpeBRepDS_PointIterator itOP (DS.ShapeInterferences( oe )); for (; itOP.More(); itOP.Next()) { const TopOpeBRepDS_Point& ODSP = DS.Point( itOP.Current()); if ( DSP.IsEqual (ODSP)) { B.UpdateVertex( V, itOP.Parameter(), TopoDS::Edge(oe), ODSP.Tolerance()); break; } } } // add V on the both intersecting edges TopoDS_Vertex addedV = Partition_Inter2d::AddVonE( V,se,oe,myAsDes,dummyF); if (!addedV.IsSame( V )) mySameDomainVM.Bind (V, addedV); // equal vertex is already there MV.Add( addedV ); // to ease storage of vertices of ON splits } } // add section edge to the face it intersects and find // splits ON that do not have same domain pair TopB.SplitSectionEdges(); // let TopB find ON splits TopTools_MapOfShape SPM; // map of ON splits TopTools_IndexedMapOfShape ME[2]; TopExp::MapShapes( F1, TopAbs_EDGE, ME[1]); TopExp::MapShapes( F2, TopAbs_EDGE, ME[0]); TopTools_ListIteratorOfListOfShape itSP, itLSE (LSE); while ( itLSE.More() ) { TopoDS_Edge se = TopoDS::Edge( itLSE.Value() ); // move itLSE to the next se Standard_Integer ancRank = DS.AncestorRank(se); if (ME[ancRank-1].Contains( se )) { LSE.Remove( itLSE ); // se is an edge of face it intersects continue; } else { itLSE.Next(); } const TopoDS_Face& F = (ancRank == 1) ? F2 : F1; // add se to face but dont add twice TopTools_ListIteratorOfListOfShape itE( myAsDes->Descendant( F )); if (myAsDes->HasDescendant( F )) { for ( ; itE.More(); itE.Next()) if (se.IsSame( itE.Value() )) break; } if (!itE.More()) { myAsDes->Add( F, se ); // check se pcurve on F Standard_Real tol, f,l, umin=1e100, umax=-1e100; Handle(Geom2d_Curve) pc = BRep_Tool::CurveOnSurface( se, F, f,l); if (pc.IsNull()) { itSP.Initialize( TopB.Splits(se,TopAbs_ON) ); for ( ; itSP.More(); itSP.Next()) { const TopoDS_Edge& E = TopoDS::Edge ( itSP.Value()); BRep_Tool::Range(E, f, l); umin = Min( umin, f); umax = Max( umax, l); } Handle(Geom_Curve) C3d = BRep_Tool::Curve( se, f, l); if (umin < umax) // sometimes umin == umax for closed edge C3d = new Geom_TrimmedCurve( C3d, umin, umax); pc = TopOpeBRepTool_CurveTool::MakePCurveOnFace (F,C3d,tol); if (pc.IsNull()) { MESSAGE (" CANNOT BUILD PCURVE "); } B.UpdateEdge( se, pc, F, tol); } } // to detect splits that do not have same domain pair // ie which split a face into parts and not pass by its boundary itSP.Initialize( TopB.Splits(se,TopAbs_ON) ); for ( ; itSP.More(); itSP.Next()) { const TopoDS_Shape& SP = itSP.Value(); if (!SPM.Add( SP )) SPM.Remove( SP ); } } // store vertices of ON splits and bind section edges to faces for (itLSE.Initialize (LSE); itLSE.More(); itLSE.Next()) { const TopoDS_Shape& se = itLSE.Value(); Standard_Integer ancRank = DS.AncestorRank(se); TopoDS_Face F = (ancRank == 1) ? F2 : F1; // add vertices of ON splits which have no same domain pair Standard_Boolean added = Standard_False; itSP.Initialize( TopB.Splits(se,TopAbs_ON) ); for ( ; itSP.More(); itSP.Next()) { if (!SPM.Contains( itSP.Value() )) continue; const TopoDS_Edge& S = TopoDS::Edge ( itSP.Value()); added = Standard_True; mySectionEdgesAD->Add( F, se ); TopoDS_Vertex VS[2]; TopExp::Vertices (S, VS[0], VS[1]); for (j=0; j<2; ++j) { if (mySameDomainVM.IsBound( VS[j] )) VS[j] = TopoDS::Vertex( mySameDomainVM( VS[j] )); if ( !MV.Contains( VS[j] )) { // find equal vertex on se - point interference gp_Pnt P1 = BRep_Tool::Pnt( VS[j] ); TopTools_ListIteratorOfListOfShape itV( myAsDes->Descendant(se) ); for (; itV.More(); itV.Next()) { V = TopoDS::Vertex( itV.Value() ); if ( V.IsSame( VS[j] )) break; gp_Pnt P2 = BRep_Tool::Pnt( V ); if (P1.IsEqual( P2, Precision::Confusion())) { mySameDomainVM.Bind (VS[j], V); VS[j] = V; break; } } if (!itV.More()) // no interferences with edges myAsDes->Add( se, VS[j]); } // add ends of ON splits to F in order to detect later // if a split is on face in IsSplitOn() mySectionEdgesAD->Add( F, VS[j]); } // in the descendants of F, first go ends of an ON split and // then a split itself mySectionEdgesAD->Add( F, S ); } if (!added) mySectionEdgesAD->Add( F, se ); myNewEdges.Add( se ); } } //======================================================================= //function : FacesPartition //purpose : //======================================================================= void Partition_Inter3d::FacesPartition(const TopoDS_Face& F1, const TopoDS_Face& F2) //(const TopTools_DataMapOfShapeListOfShape& /*SetOfFaces2*/) { TopTools_ListOfShape LInt; Inter3D (F1,F2,LInt); StorePart3d (F1,F2,LInt); } //======================================================================= //function : SetDone //purpose : //======================================================================= void Partition_Inter3d::SetDone(const TopoDS_Face& F1, const TopoDS_Face& F2) { if (!myDone.IsBound(F1)) { TopTools_ListOfShape emptyList; myDone.Bind(F1,emptyList); } myDone(F1).Append(F2); if (!myDone.IsBound(F2)) { TopTools_ListOfShape emptyList; myDone.Bind(F2,emptyList); } myDone(F2).Append(F1); } //======================================================================= //function : IsDone //purpose : //======================================================================= Standard_Boolean Partition_Inter3d::IsDone(const TopoDS_Face& F1, const TopoDS_Face& F2) const { if (myDone.IsBound(F1)) { TopTools_ListIteratorOfListOfShape it (myDone(F1)); for (; it.More(); it.Next()) { if (it.Value().IsSame(F2)) return Standard_True; } } return Standard_False; } //======================================================================= //function : StorePart3d //purpose : //======================================================================= void Partition_Inter3d::StorePart3d(const TopoDS_Face& F1, const TopoDS_Face& F2, const TopTools_ListOfShape& LInt) { if (!LInt.IsEmpty()) { myAsDes->Add( F1,LInt); myAsDes->Add( F2,LInt); TopTools_ListIteratorOfListOfShape it(LInt); for (; it.More(); it.Next()) { TopoDS_Edge E = TopoDS::Edge(it.Value()); BRep_Builder B; B.SameParameter(E,Standard_False); BRepLib::SameParameter(E,1.0e-7); myNewEdges.Add(E); } } SetDone(F1,F2); } //======================================================================= //function : TouchedFaces //purpose : //======================================================================= TopTools_MapOfShape& Partition_Inter3d::TouchedFaces() { return myTouched; } //======================================================================= //function : AsDes //purpose : //======================================================================= Handle_BRepAlgo_AsDes Partition_Inter3d::AsDes() const { return myAsDes; } //======================================================================= //function : NewEdges //purpose : //======================================================================= TopTools_MapOfShape& Partition_Inter3d::NewEdges() { return myNewEdges; } //======================================================================= //function : Affiche //purpose : //======================================================================= void Partition_Inter3d::Affiche(const TopTools_ListOfShape& SetOfFaces) const { #ifdef DEB char PSection[1024]; char *section=PSection; Standard_Integer i = 0; Standard_Real j=1; TopTools_ListOfShape aList; TopTools_ListIteratorOfListOfShape it; for (it.Initialize(SetOfFaces); it.More(); it.Next()) { const TopoDS_Shape& OS = it.Value(); aList=myAsDes->Descendant(OS); MESSAGE ( " the number of items stored in the list " << j << " : " << aList.Extent() ) j++; TopTools_ListIteratorOfListOfShape itaList; for (itaList.Initialize(aList); itaList.More(); itaList.Next()) { const TopoDS_Shape& SS = itaList.Value(); i++; sprintf(PSection,"section_%d",i); DBRep::Set(section,SS); } } #endif } //======================================================================= //function : SameDomain //purpose : //======================================================================= const TopTools_ListOfShape& Partition_Inter3d::SameDomain(const TopoDS_Face& F) const { if (mySameDomainFM.IsBound( F )) return mySameDomainFM (F); static TopTools_ListOfShape emptyList; return emptyList; } //======================================================================= //function : HasSameDomainF //purpose : Return true if F has same domain faces //======================================================================= Standard_Boolean Partition_Inter3d::HasSameDomainF(const TopoDS_Shape& F) const { return mySameDomainFM.IsBound( F ); } //======================================================================= //function : IsSameDomain //purpose : Return true if F1 and F2 are same domain faces //======================================================================= Standard_Boolean Partition_Inter3d::IsSameDomainF(const TopoDS_Shape& F1, const TopoDS_Shape& F2) const { if (mySameDomainFM.IsBound( F1 )) { TopTools_ListIteratorOfListOfShape it (mySameDomainFM( F1 )); for (; it.More(); it.Next()) if (F2.IsSame( it.Value())) return Standard_True; } return F1.IsSame( F2 ); } //======================================================================= //function : ReplaceSameDomainV //purpose : return same domain vertex of V if it was replaced // and make this vertex to be on E too, else return V //======================================================================= TopoDS_Vertex Partition_Inter3d::ReplaceSameDomainV(const TopoDS_Vertex& V, const TopoDS_Edge& E) const { TopoDS_Vertex SDV = V; if (mySameDomainVM.IsBound( V )) { TopoDS_Vertex V1,V2; TopExp::Vertices(E,V1,V2); Standard_Boolean isClosed = V1.IsSame( V2 ) && V.IsSame(V1); SDV = TopoDS::Vertex( mySameDomainVM(V) ); Standard_Real tol = BRep_Tool::Tolerance( V ); BRep_Builder B; SDV.Orientation( V.Orientation()); if (isClosed) { Standard_Real f, l; BRep_Tool::Range (E, f, l); Standard_Boolean isFirst = IsEqual( BRep_Tool::Parameter(V,E), f ); B.UpdateVertex(SDV, (isFirst ? f : l), E, tol); SDV.Reverse(); B.UpdateVertex(SDV, (isFirst ? l : f), E, tol); } else B.UpdateVertex (SDV, BRep_Tool::Parameter(V,E), E, tol); } return SDV; } //======================================================================= //function : SectionEdgesAD //purpose : //======================================================================= Handle_BRepAlgo_AsDes Partition_Inter3d::SectionEdgesAD() const { return mySectionEdgesAD; } //======================================================================= //function : IsSectionEdge //purpose : return True if E is an edge of a face and it // intersects an other face //======================================================================= Standard_Boolean Partition_Inter3d::IsSectionEdge(const TopoDS_Edge& E) const { return mySectionEdgesAD->HasAscendant(E); } //======================================================================= //function : HasSectionEdge //purpose : return True if an edge of F intersects an other // face or F is intersected by edge of an other face //======================================================================= Standard_Boolean Partition_Inter3d::HasSectionEdge(const TopoDS_Face& F) const { return mySectionEdgesAD->HasDescendant(F); } //======================================================================= //function : IsSplitOn //purpose : return True if NewE is split of OldE on F //======================================================================= Standard_Boolean Partition_Inter3d::IsSplitOn(const TopoDS_Edge& NewE, const TopoDS_Edge& OldE, const TopoDS_Face& F) const { if (! mySectionEdgesAD->HasDescendant(F)) return Standard_False; TopTools_ListIteratorOfListOfShape itE ( mySectionEdgesAD->Descendant(F) ); for ( ; itE.More(); itE.Next()) { if ( itE.Value().ShapeType() != TopAbs_EDGE || ! OldE.IsSame ( itE.Value() )) continue; // an edge encountered, its vertices and a split come next itE.Next(); if (!itE.More()) break; const TopoDS_Shape& V3 = itE.Value(); if (V3.ShapeType() != TopAbs_VERTEX) continue; itE.Next(); if (!itE.More()) break; const TopoDS_Shape& V4 = itE.Value(); if (V4.ShapeType() != TopAbs_VERTEX) continue; TopoDS_Vertex V1, V2; TopExp::Vertices( OldE, V1, V2); if ( V1.IsSame(V2) && (V1.IsSame(V3) || V1.IsSame(V4)) ) { // closed old edge; use the split for the test itE.Next(); if (!itE.More()) break; const TopoDS_Edge& split = TopoDS::Edge( itE.Value() ); // check distance at middle point of NewE Standard_Real f1,l1, f2,l2; Handle(Geom2d_Curve) PC1 = BRep_Tool::CurveOnSurface( split, F ,f1,l1); if (!PC1.IsNull()) { Handle(Geom2d_Curve) PC2 = BRep_Tool::CurveOnSurface(NewE, F ,f2,l2); gp_Pnt2d P = PC2->Value( 0.5*(f2+l2) ); Geom2dAPI_ProjectPointOnCurve proj (P, PC1, f1, l1); if (proj.NbPoints() && proj.LowerDistance() <= Precision::Confusion()) return Standard_True; } else { Handle(Geom_Curve) C1 = BRep_Tool::Curve( split ,f1,l1); Handle(Geom_Curve) C2 = BRep_Tool::Curve( NewE ,f2,l2); gp_Pnt P = C2->Value( 0.5*(f2+l2) ); GeomAPI_ProjectPointOnCurve proj (P, C1, f1, l1); if (proj.NbPoints() && proj.LowerDistance() <= Precision::Confusion()) return Standard_True; } } else { Standard_Real u3 = BRep_Tool::Parameter( TopoDS::Vertex(V3), OldE); Standard_Real u4 = BRep_Tool::Parameter( TopoDS::Vertex(V4), OldE); Standard_Real f,l, u; BRep_Tool::Range( NewE, f,l); u = 0.5*(f+l); f = Min(u3,u4); l = Max(u3,u4); if (u <= l && u >= f) return Standard_True; } } return Standard_False; } //======================================================================= //function : SectionEdgeFaces //purpose : return faces cut by section edge //======================================================================= const TopTools_ListOfShape& Partition_Inter3d::SectionEdgeFaces(const TopoDS_Edge& SecE) const { return mySectionEdgesAD->Ascendant( SecE ); } #endif netgen-6.2.1804/libsrc/occ/Partition_Inter2d.jxx0000644000175000017500000000310413272137567020120 0ustar kurtkurt// GEOM PARTITION : partition algorithm // // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org // // // // File : Partition_Inter2d.jxx // Module : GEOM #include // netgen headers #ifndef _BRepAlgo_AsDes_HeaderFile #include #endif #ifndef _TopoDS_Face_HeaderFile #include #endif #ifndef _TopTools_MapOfShape_HeaderFile #include #endif #ifndef _TopoDS_Vertex_HeaderFile #include #endif #ifndef _TopTools_ListOfShape_HeaderFile #include #endif #ifndef _TopoDS_Edge_HeaderFile #include #endif #ifndef _Partition_Inter2d_HeaderFile #include "Partition_Inter2d.hxx" #endif netgen-6.2.1804/libsrc/occ/occgeom.hpp0000644000175000017500000003072513272137567016163 0ustar kurtkurt#ifndef FILE_OCCGEOM #define FILE_OCCGEOM /* *************************************************************************/ /* File: occgeom.hpp */ /* Author: Robert Gaisbauer */ /* Date: 26. May 03 */ /* *************************************************************************/ #ifdef OCCGEOMETRY #include #include "BRep_Tool.hxx" #include "Geom_Curve.hxx" #include "Geom2d_Curve.hxx" #include "Geom_Surface.hxx" #include "GeomAPI_ProjectPointOnSurf.hxx" #include "GeomAPI_ProjectPointOnCurve.hxx" #include "BRepTools.hxx" #include "TopExp.hxx" #include "BRepBuilderAPI_MakeVertex.hxx" #include "BRepBuilderAPI_MakeShell.hxx" #include "BRepBuilderAPI_MakeSolid.hxx" #include "BRepOffsetAPI_Sewing.hxx" #include "BRepLProp_SLProps.hxx" #include "BRepAdaptor_Surface.hxx" #include "Poly_Triangulation.hxx" #include "Poly_Array1OfTriangle.hxx" #include "TColgp_Array1OfPnt2d.hxx" #include "Poly_Triangle.hxx" #include "GProp_GProps.hxx" #include "BRepGProp.hxx" #include "Geom_Surface.hxx" #include "TopExp.hxx" #include "gp_Pnt.hxx" #include "TopoDS.hxx" #include "TopoDS_Solid.hxx" #include "TopExp_Explorer.hxx" #include "TopTools_ListIteratorOfListOfShape.hxx" #include "BRep_Tool.hxx" #include "Geom_Curve.hxx" #include "Geom2d_Curve.hxx" #include "Geom_Surface.hxx" #include "GeomAPI_ProjectPointOnSurf.hxx" #include "GeomAPI_ProjectPointOnCurve.hxx" #include "TopoDS_Wire.hxx" #include "BRepTools_WireExplorer.hxx" #include "BRepTools.hxx" #include "TopTools_IndexedMapOfShape.hxx" #include "TopExp.hxx" #include "BRepBuilderAPI_MakeVertex.hxx" #include "BRepBuilderAPI_MakeShell.hxx" #include "BRepBuilderAPI_MakeSolid.hxx" #include "BRepOffsetAPI_Sewing.hxx" #include "BRepLProp_CLProps.hxx" #include "BRepLProp_SLProps.hxx" #include "BRepAdaptor_Surface.hxx" #include "BRepAdaptor_Curve.hxx" #include "Poly_Triangulation.hxx" #include "Poly_Array1OfTriangle.hxx" #include "TColgp_Array1OfPnt2d.hxx" #include "Poly_Triangle.hxx" #include "GProp_GProps.hxx" #include "BRepGProp.hxx" #include "TopoDS_Shape.hxx" #include "TopoDS_Face.hxx" #include "IGESToBRep_Reader.hxx" #include "Interface_Static.hxx" #include "GeomAPI_ExtremaCurveCurve.hxx" #include "Standard_ErrorHandler.hxx" #include "Standard_Failure.hxx" #include "ShapeUpgrade_ShellSewing.hxx" #include "ShapeFix_Shape.hxx" #include "ShapeFix_Wireframe.hxx" #include "BRepMesh.hxx" #include "BRepMesh_IncrementalMesh.hxx" #include "BRepBndLib.hxx" #include "Bnd_Box.hxx" #include "ShapeAnalysis.hxx" #include "ShapeBuild_ReShape.hxx" // Philippose - 29/01/2009 // OpenCascade XDE Support // Include support for OpenCascade XDE Features #include "TDocStd_Document.hxx" #include "Quantity_Color.hxx" #include "XCAFApp_Application.hxx" #include "XCAFDoc_ShapeTool.hxx" #include "XCAFDoc_Color.hxx" #include "XCAFDoc_ColorTool.hxx" #include "XCAFDoc_ColorType.hxx" #include "XCAFDoc_LayerTool.hxx" #include "XCAFDoc_DimTolTool.hxx" #include "XCAFDoc_MaterialTool.hxx" #include "XCAFDoc_DocumentTool.hxx" #include "TDF_Label.hxx" #include "TDF_LabelSequence.hxx" #include "STEPCAFControl_Reader.hxx" #include "STEPCAFControl_Writer.hxx" #include "IGESCAFControl_Reader.hxx" #include "IGESCAFControl_Writer.hxx" #include "IGESControl_Reader.hxx" #include "STEPControl_Reader.hxx" #include "IGESControl_Writer.hxx" #include "STEPControl_Writer.hxx" #include "StlAPI_Writer.hxx" #include "STEPControl_StepModelType.hxx" namespace netgen { #include "occmeshsurf.hpp" extern DLL_HEADER MeshingParameters mparam; #define PROJECTION_TOLERANCE 1e-10 #define ENTITYISVISIBLE 1 #define ENTITYISHIGHLIGHTED 2 #define ENTITYISDRAWABLE 4 #define OCCGEOMETRYVISUALIZATIONNOCHANGE 0 #define OCCGEOMETRYVISUALIZATIONFULLCHANGE 1 // Compute transformation matrices and redraw #define OCCGEOMETRYVISUALIZATIONHALFCHANGE 2 // Redraw class EntityVisualizationCode { int code; public: EntityVisualizationCode() { code = ENTITYISVISIBLE + !ENTITYISHIGHLIGHTED + ENTITYISDRAWABLE;} int IsVisible () { return code & ENTITYISVISIBLE;} int IsHighlighted () { return code & ENTITYISHIGHLIGHTED;} int IsDrawable () { return code & ENTITYISDRAWABLE;} void Show () { code |= ENTITYISVISIBLE;} void Hide () { code &= ~ENTITYISVISIBLE;} void Highlight () { code |= ENTITYISHIGHLIGHTED;} void Lowlight () { code &= ~ENTITYISHIGHLIGHTED;} void SetDrawable () { code |= ENTITYISDRAWABLE;} void SetNotDrawable () { code &= ~ENTITYISDRAWABLE;} }; class Line { public: Point<3> p0, p1; double Dist (Line l); double Length (); }; inline double Det3 (double a00, double a01, double a02, double a10, double a11, double a12, double a20, double a21, double a22) { return a00*a11*a22 + a01*a12*a20 + a10*a21*a02 - a20*a11*a02 - a10*a01*a22 - a21*a12*a00; } class OCCGeometry : public NetgenGeometry { Point<3> center; public: TopoDS_Shape shape; TopTools_IndexedMapOfShape fmap, emap, vmap, somap, shmap, wmap; Array fsingular, esingular, vsingular; Box<3> boundingbox; Array fnames, enames, snames; // Philippose - 29/01/2009 // OpenCascade XDE Support // XCAF Handle to make the face colours available to the rest of // the system Handle_XCAFDoc_ColorTool face_colours; mutable int changed; Array facemeshstatus; // Philippose - 15/01/2009 // Maximum mesh size for a given face // (Used to explicitly define mesh size limits on individual faces) Array face_maxh; // Philippose - 14/01/2010 // Boolean array to detect whether a face has been explicitly modified // by the user or not Array face_maxh_modified; // Philippose - 15/01/2009 // Indicates which faces have been selected by the user in geometry mode // (Currently handles only selection of one face at a time, but an array would // help to extend this to multiple faces) Array face_sel_status; Array fvispar, evispar, vvispar; double tolerance; bool fixsmalledges; bool fixspotstripfaces; bool sewfaces; bool makesolids; bool splitpartitions; OCCGeometry() { somap.Clear(); shmap.Clear(); fmap.Clear(); wmap.Clear(); emap.Clear(); vmap.Clear(); } DLL_HEADER virtual void Save (string filename) const; DLL_HEADER void BuildFMap(); Box<3> GetBoundingBox() { return boundingbox;} int NrSolids() { return somap.Extent();} // Philippose - 17/01/2009 // Total number of faces in the geometry int NrFaces() { return fmap.Extent();} void SetCenter() { center = boundingbox.Center();} Point<3> Center() { return center;} void Project (int surfi, Point<3> & p) const; bool FastProject (int surfi, Point<3> & ap, double& u, double& v) const; OCCSurface GetSurface (int surfi) { cout << "OCCGeometry::GetSurface using PLANESPACE" << endl; return OCCSurface (TopoDS::Face(fmap(surfi)), PLANESPACE); } DLL_HEADER void CalcBoundingBox (); DLL_HEADER void BuildVisualizationMesh (double deflection); void RecursiveTopologyTree (const TopoDS_Shape & sh, stringstream & str, TopAbs_ShapeEnum l, bool free, const char * lname); DLL_HEADER void GetTopologyTree (stringstream & str); DLL_HEADER void PrintNrShapes (); DLL_HEADER void CheckIrregularEntities (stringstream & str); DLL_HEADER void SewFaces(); DLL_HEADER void MakeSolid(); DLL_HEADER void HealGeometry(); // Philippose - 15/01/2009 // Sets the maximum mesh size for a given face // (Note: Local mesh size limited by the global max mesh size) void SetFaceMaxH(int facenr, double faceh) { if((facenr> 0) && (facenr <= fmap.Extent())) { face_maxh[facenr-1] = min(mparam.maxh,faceh); // Philippose - 14/01/2010 // If the face maxh is greater than or equal to the // current global maximum, then identify the face as // not explicitly controlled by the user any more if(faceh >= mparam.maxh) { face_maxh_modified[facenr-1] = 0; } else { face_maxh_modified[facenr-1] = 1; } } } // Philippose - 15/01/2009 // Returns the local mesh size of a given face double GetFaceMaxH(int facenr) { if((facenr> 0) && (facenr <= fmap.Extent())) { return face_maxh[facenr-1]; } else { return 0.0; } } // Philippose - 14/01/2010 // Returns the flag whether the given face // has a mesh size controlled by the user or not bool GetFaceMaxhModified(int facenr) { return face_maxh_modified[facenr-1]; } // Philippose - 17/01/2009 // Returns the index of the currently selected face int SelectedFace() { int i; for(i = 1; i <= fmap.Extent(); i++) { if(face_sel_status[i-1]) { return i; } } return 0; } // Philippose - 17/01/2009 // Sets the currently selected face void SetSelectedFace(int facenr) { face_sel_status = 0; if((facenr >= 1) && (facenr <= fmap.Extent())) { face_sel_status[facenr-1] = 1; } } void LowLightAll() { for (int i = 1; i <= fmap.Extent(); i++) fvispar[i-1].Lowlight(); for (int i = 1; i <= emap.Extent(); i++) evispar[i-1].Lowlight(); for (int i = 1; i <= vmap.Extent(); i++) vvispar[i-1].Lowlight(); } DLL_HEADER void GetUnmeshedFaceInfo (stringstream & str); DLL_HEADER void GetNotDrawableFaces (stringstream & str); DLL_HEADER bool ErrorInSurfaceMeshing (); // void WriteOCC_STL(char * filename); DLL_HEADER virtual int GenerateMesh (shared_ptr & mesh, MeshingParameters & mparam); DLL_HEADER virtual const Refinement & GetRefinement () const; }; class DLL_HEADER OCCParameters { public: /// Factor for meshing close edges double resthcloseedgefac; /// Enable / Disable detection of close edges int resthcloseedgeenable; /// Minimum edge length to be used for dividing edges to mesh points double resthminedgelen; /// Enable / Disable use of the minimum edge length (by default use 1e-4) int resthminedgelenenable; /*! Default Constructor for the OpenCascade Mesh generation parameter set */ OCCParameters(); /*! Dump all the OpenCascade specific meshing parameters to console */ void Print (ostream & ost) const; }; void PrintContents (OCCGeometry * geom); DLL_HEADER OCCGeometry * LoadOCC_IGES (const char * filename); DLL_HEADER OCCGeometry * LoadOCC_STEP (const char * filename); DLL_HEADER OCCGeometry * LoadOCC_BREP (const char * filename); DLL_HEADER extern OCCParameters occparam; // Philippose - 31.09.2009 // External access to the mesh generation functions within the OCC // subsystem (Not sure if this is the best way to implement this....!!) DLL_HEADER extern int OCCGenerateMesh (OCCGeometry & occgeometry, shared_ptr & mesh, MeshingParameters & mparam); DLL_HEADER extern void OCCSetLocalMeshSize(OCCGeometry & geom, Mesh & mesh); DLL_HEADER extern void OCCMeshSurface (OCCGeometry & geom, Mesh & mesh, int perfstepsend); DLL_HEADER extern void OCCFindEdges (OCCGeometry & geom, Mesh & mesh); } #endif #endif netgen-6.2.1804/libsrc/occ/Partition_Loop.jxx0000644000175000017500000000262413272137567017530 0ustar kurtkurt// GEOM PARTITION : partition algorithm // // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org // // // // File : Partition_Loop.jxx // Module : GEOM #ifndef _TopoDS_Face_HeaderFile #include #endif #ifndef _TopoDS_Edge_HeaderFile #include #endif #ifndef _TopTools_ListOfShape_HeaderFile #include #endif #ifndef _TopTools_DataMapOfShapeShape_HeaderFile #include #endif #ifndef _Partition_Loop_HeaderFile #include "Partition_Loop.hxx" #endif netgen-6.2.1804/libsrc/occ/occmeshsurf.cpp0000644000175000017500000004136213272137567017062 0ustar kurtkurt#ifdef OCCGEOMETRY #include #include #include #include #include namespace netgen { #include "occmeshsurf.hpp" bool glob_testout(false); void OCCSurface :: GetNormalVector (const Point<3> & p, const PointGeomInfo & geominfo, Vec<3> & n) const { gp_Pnt pnt; gp_Vec du, dv; /* double gu = geominfo.u; double gv = geominfo.v; if (fabs (gu) < 1e-3) gu = 0; if (fabs (gv) < 1e-3) gv = 0; occface->D1(gu,gv,pnt,du,dv); */ /* occface->D1(geominfo.u,geominfo.v,pnt,du,dv); n = Cross (Vec<3>(du.X(), du.Y(), du.Z()), Vec<3>(dv.X(), dv.Y(), dv.Z())); n.Normalize(); */ GeomLProp_SLProps lprop(occface,geominfo.u,geominfo.v,1,1e-5); double setu=geominfo.u,setv=geominfo.v; if(lprop.D1U().Magnitude() < 1e-5 || lprop.D1V().Magnitude() < 1e-5) { double ustep = 0.01*(umax-umin); double vstep = 0.01*(vmax-vmin); n=0; while(setu < umax && (lprop.D1U().Magnitude() < 1e-5 || lprop.D1V().Magnitude() < 1e-5)) setu += ustep; if(setu < umax) { lprop.SetParameters(setu,setv); n(0)+=lprop.Normal().X(); n(1)+=lprop.Normal().Y(); n(2)+=lprop.Normal().Z(); } setu = geominfo.u; while(setu > umin && (lprop.D1U().Magnitude() < 1e-5 || lprop.D1V().Magnitude() < 1e-5)) setu -= ustep; if(setu > umin) { lprop.SetParameters(setu,setv); n(0)+=lprop.Normal().X(); n(1)+=lprop.Normal().Y(); n(2)+=lprop.Normal().Z(); } setu = geominfo.u; while(setv < vmax && (lprop.D1U().Magnitude() < 1e-5 || lprop.D1V().Magnitude() < 1e-5)) setv += ustep; if(setv < vmax) { lprop.SetParameters(setu,setv); n(0)+=lprop.Normal().X(); n(1)+=lprop.Normal().Y(); n(2)+=lprop.Normal().Z(); } setv = geominfo.v; while(setv > vmin && (lprop.D1U().Magnitude() < 1e-5 || lprop.D1V().Magnitude() < 1e-5)) setv -= ustep; if(setv > vmin) { lprop.SetParameters(setu,setv); n(0)+=lprop.Normal().X(); n(1)+=lprop.Normal().Y(); n(2)+=lprop.Normal().Z(); } setv = geominfo.v; n.Normalize(); } else { n(0)=lprop.Normal().X(); n(1)=lprop.Normal().Y(); n(2)=lprop.Normal().Z(); } if(glob_testout) { (*testout) << "u " << geominfo.u << " v " << geominfo.v << " du " << lprop.D1U().X() << " "<< lprop.D1U().Y() << " "<< lprop.D1U().Z() << " dv " << lprop.D1V().X() << " "<< lprop.D1V().Y() << " "<< lprop.D1V().Z() << endl; } if (orient == TopAbs_REVERSED) n = -1*n; // (*testout) << "GetNormalVector" << endl; } void OCCSurface :: DefineTangentialPlane (const Point<3> & ap1, const PointGeomInfo & geominfo1, const Point<3> & ap2, const PointGeomInfo & geominfo2) { if (projecttype == PLANESPACE) { p1 = ap1; p2 = ap2; //cout << "p1 = " << p1 << endl; //cout << "p2 = " << p2 << endl; GetNormalVector (p1, geominfo1, ez); ex = p2 - p1; ex -= (ex * ez) * ez; ex.Normalize(); ey = Cross (ez, ex); GetNormalVector (p2, geominfo2, n2); nmid = 0.5*(n2+ez); ez = nmid; ez.Normalize(); ex = (p2 - p1).Normalize(); ez -= (ez * ex) * ex; ez.Normalize(); ey = Cross (ez, ex); nmid = ez; //cout << "ex " << ex << " ey " << ey << " ez " << ez << endl; } else { if ( (geominfo1.u < umin) || (geominfo1.u > umax) || (geominfo2.u < umin) || (geominfo2.u > umax) || (geominfo1.v < vmin) || (geominfo1.v > vmax) || (geominfo2.v < vmin) || (geominfo2.v > vmax) ) throw UVBoundsException(); p1 = ap1; p2 = ap2; psp1 = Point<2>(geominfo1.u, geominfo1.v); psp2 = Point<2>(geominfo2.u, geominfo2.v); Vec<3> n; GetNormalVector (p1, geominfo1, n); gp_Pnt pnt; gp_Vec du, dv; occface->D1 (geominfo1.u, geominfo1.v, pnt, du, dv); DenseMatrix D1(3,2), D1T(2,3), DDTinv(2,2); D1(0,0) = du.X(); D1(1,0) = du.Y(); D1(2,0) = du.Z(); D1(0,1) = dv.X(); D1(1,1) = dv.Y(); D1(2,1) = dv.Z(); /* (*testout) << "DefineTangentialPlane" << endl << "---------------------" << endl; (*testout) << "D1 = " << endl << D1 << endl; */ Transpose (D1, D1T); DenseMatrix D1TD1(3,3); D1TD1 = D1T*D1; if (D1TD1.Det() == 0) throw SingularMatrixException(); CalcInverse (D1TD1, DDTinv); DenseMatrix Y(3,2); Vec<3> y1 = (ap2-ap1).Normalize(); Vec<3> y2 = Cross(n, y1).Normalize(); for (int i = 0; i < 3; i++) { Y(i,0) = y1(i); Y(i,1) = y2(i); } DenseMatrix A(2,2); A = DDTinv * D1T * Y; DenseMatrix Ainv(2,2); if (A.Det() == 0) throw SingularMatrixException(); CalcInverse (A, Ainv); for (int i = 0; i < 2; i++) for (int j = 0; j < 2; j++) { Amat(i,j) = A(i,j); Amatinv(i,j) = Ainv(i,j); } Vec<2> temp = Amatinv * (psp2-psp1); double r = temp.Length(); // double alpha = -acos (temp(0)/r); double alpha = -atan2 (temp(1),temp(0)); DenseMatrix R(2,2); R(0,0) = cos (alpha); R(1,0) = -sin (alpha); R(0,1) = sin (alpha); R(1,1) = cos (alpha); A = A*R; if (A.Det() == 0) throw SingularMatrixException(); CalcInverse (A, Ainv); for (int i = 0; i < 2; i++) for (int j = 0; j < 2; j++) { Amat(i,j) = A(i,j); Amatinv(i,j) = Ainv(i,j); } temp = Amatinv * (psp2-psp1); }; } void OCCSurface :: ToPlane (const Point<3> & p3d, const PointGeomInfo & geominfo, Point<2> & pplane, double h, int & zone) const { if (projecttype == PLANESPACE) { Vec<3> p1p, n; GetNormalVector (p3d, geominfo, n); p1p = p3d - p1; pplane(0) = (p1p * ex) / h; pplane(1) = (p1p * ey) / h; if (n * nmid < 0) zone = -1; else zone = 0; /* if(zone == -1) { (*testout) << "zone = -1 for " << p3d << " 2D: " << pplane << " n " << n << " nmid " << nmid << endl; glob_testout = true; GetNormalVector (p3d, geominfo, n); glob_testout = false; } */ } else { pplane = Point<2>(geominfo.u, geominfo.v); // (*testout) << "(u,v) = " << geominfo.u << ", " << geominfo.v << endl; pplane = Point<2> (1/h * (Amatinv * (pplane-psp1))); // pplane = Point<2> (h * (Amatinv * (pplane-psp1))); // pplane = Point<2> (1/h * ((pplane-psp1))); zone = 0; }; } void OCCSurface :: FromPlane (const Point<2> & pplane, Point<3> & p3d, PointGeomInfo & gi, double h) { if (projecttype == PLANESPACE) { // cout << "2d : " << pplane << endl; p3d = p1 + (h * pplane(0)) * ex + (h * pplane(1)) * ey; // cout << "3d : " << p3d << endl; Project (p3d, gi); // cout << "proj : " << p3d << endl; } else { // Point<2> pspnew = Point<2>(1/h * (Amat * Vec<2>(pplane)) + Vec<2>(psp1)); Point<2> pspnew = Point<2>(h * (Amat * Vec<2>(pplane)) + Vec<2>(psp1)); // Point<2> pspnew = Point<2>(h * (Vec<2>(pplane)) + Vec<2>(psp1)); gi.u = pspnew(0); gi.v = pspnew(1); gi.trignum = 1; gp_Pnt val = occface->Value (gi.u, gi.v); p3d = Point<3> (val.X(), val.Y(), val.Z()); }; } void OCCSurface :: Project (Point<3> & p, PointGeomInfo & gi) { // static int cnt = 0; // if (cnt++ % 1000 == 0) cout << "********************************************** OCCSurfce :: Project, cnt = " << cnt << endl; gp_Pnt pnt(p(0), p(1), p(2)); //(*testout) << "pnt = " << pnt.X() << ", " << pnt.Y() << ", " << pnt.Z() << endl; /* GeomAPI_ProjectPointOnSurf proj(pnt, occface, umin, umax, vmin, vmax); if (!proj.NbPoints()) { cout << "Project Point on Surface FAIL" << endl; throw UVBoundsException(); } */ /* cout << "NP = " << proj.NbPoints() << endl; for (int i = 1; i <= proj.NbPoints(); i++) { gp_Pnt pnt2 = proj.Point(i); Point<3> p2 = Point<3> (pnt2.X(), pnt2.Y(), pnt2.Z()); cout << i << ". p = " << p2 << ", dist = " << (p2-p).Length() << endl; } */ /* pnt = proj.NearestPoint(); proj.LowerDistanceParameters (gi.u, gi.v); */ double u,v; Handle( ShapeAnalysis_Surface ) su = new ShapeAnalysis_Surface( occface ); gp_Pnt2d suval = su->ValueOfUV ( pnt, BRep_Tool::Tolerance( topods_face ) ); suval.Coord( u, v); pnt = occface->Value( u, v ); //(*testout) << "pnt(proj) = " << pnt.X() << ", " << pnt.Y() << ", " << pnt.Z() << endl; gi.u = u; gi.v = v; gi.trignum = 1; p = Point<3> (pnt.X(), pnt.Y(), pnt.Z()); } Meshing2OCCSurfaces :: Meshing2OCCSurfaces (const TopoDS_Shape & asurf, const Box<3> & abb, int aprojecttype) : Meshing2(mparam, Box<3>(abb.PMin(), abb.PMax())), surface(TopoDS::Face(asurf), aprojecttype) { ; } void Meshing2OCCSurfaces :: DefineTransformation (const Point3d & p1, const Point3d & p2, const PointGeomInfo * geominfo1, const PointGeomInfo * geominfo2) { ((OCCSurface&)surface).DefineTangentialPlane (p1, *geominfo1, p2, *geominfo2); } void Meshing2OCCSurfaces :: TransformToPlain (const Point3d & locpoint, const MultiPointGeomInfo & geominfo, Point2d & planepoint, double h, int & zone) { Point<2> hp; surface.ToPlane (locpoint, geominfo.GetPGI(1), hp, h, zone); planepoint.X() = hp(0); planepoint.Y() = hp(1); } int Meshing2OCCSurfaces :: TransformFromPlain (Point2d & planepoint, Point3d & locpoint, PointGeomInfo & gi, double h) { Point<3> hp; Point<2> hp2 (planepoint.X(), planepoint.Y()); surface.FromPlane (hp2, hp, gi, h); locpoint = hp; return 0; } double Meshing2OCCSurfaces :: CalcLocalH (const Point3d & p, double gh) const { return gh; } MeshOptimize2dOCCSurfaces :: MeshOptimize2dOCCSurfaces (const OCCGeometry & ageometry) : MeshOptimize2d(), geometry(ageometry) { ; } void MeshOptimize2dOCCSurfaces :: ProjectPoint (INDEX surfind, Point<3> & p) const { geometry.Project (surfind, p); } int MeshOptimize2dOCCSurfaces :: ProjectPointGI (INDEX surfind, Point<3> & p, PointGeomInfo & gi) const { double u = gi.u; double v = gi.v; Point<3> hp = p; if (geometry.FastProject (surfind, hp, u, v)) { p = hp; return 1; } ProjectPoint (surfind, p); return CalcPointGeomInfo (surfind, gi, p); } void MeshOptimize2dOCCSurfaces :: ProjectPoint2 (INDEX surfind, INDEX surfind2, Point<3> & p) const { TopExp_Explorer exp0, exp1; bool done = false; Handle(Geom_Curve) c; for (exp0.Init(geometry.fmap(surfind), TopAbs_EDGE); !done && exp0.More(); exp0.Next()) for (exp1.Init(geometry.fmap(surfind2), TopAbs_EDGE); !done && exp1.More(); exp1.Next()) { if (TopoDS::Edge(exp0.Current()).IsSame(TopoDS::Edge(exp1.Current()))) { done = true; double s0, s1; c = BRep_Tool::Curve(TopoDS::Edge(exp0.Current()), s0, s1); } } gp_Pnt pnt(p(0), p(1), p(2)); GeomAPI_ProjectPointOnCurve proj(pnt, c); pnt = proj.NearestPoint(); p(0) = pnt.X(); p(1) = pnt.Y(); p(2) = pnt.Z(); } void MeshOptimize2dOCCSurfaces :: GetNormalVector(INDEX surfind, const Point<3> & p, PointGeomInfo & geominfo, Vec<3> & n) const { gp_Pnt pnt; gp_Vec du, dv; Handle(Geom_Surface) occface; occface = BRep_Tool::Surface(TopoDS::Face(geometry.fmap(surfind))); occface->D1(geominfo.u,geominfo.v,pnt,du,dv); n = Cross (Vec<3>(du.X(), du.Y(), du.Z()), Vec<3>(dv.X(), dv.Y(), dv.Z())); n.Normalize(); if (geometry.fmap(surfind).Orientation() == TopAbs_REVERSED) n = -1*n; // GetNormalVector (surfind, p, n); } void MeshOptimize2dOCCSurfaces :: GetNormalVector(INDEX surfind, const Point<3> & p, Vec<3> & n) const { // static int cnt = 0; // if (cnt++ % 1000 == 0) cout << "GetNV cnt = " << cnt << endl; Standard_Real u,v; gp_Pnt pnt(p(0), p(1), p(2)); Handle(Geom_Surface) occface; occface = BRep_Tool::Surface(TopoDS::Face(geometry.fmap(surfind))); /* GeomAPI_ProjectPointOnSurf proj(pnt, occface); if (proj.NbPoints() < 1) { cout << "ERROR: OCCSurface :: GetNormalVector: GeomAPI_ProjectPointOnSurf failed!" << endl; cout << p << endl; return; } proj.LowerDistanceParameters (u, v); */ Handle( ShapeAnalysis_Surface ) su = new ShapeAnalysis_Surface( occface ); gp_Pnt2d suval = su->ValueOfUV ( pnt, BRep_Tool::Tolerance( TopoDS::Face(geometry.fmap(surfind)) ) ); suval.Coord( u, v); pnt = occface->Value( u, v ); gp_Vec du, dv; occface->D1(u,v,pnt,du,dv); /* if (!occface->IsCNu (1) || !occface->IsCNv (1)) (*testout) << "SurfOpt: Differentiation FAIL" << endl; */ n = Cross (Vec3d(du.X(), du.Y(), du.Z()), Vec3d(dv.X(), dv.Y(), dv.Z())); n.Normalize(); if (geometry.fmap(surfind).Orientation() == TopAbs_REVERSED) n = -1*n; } int MeshOptimize2dOCCSurfaces :: CalcPointGeomInfo(int surfind, PointGeomInfo& gi, const Point<3> & p) const { Standard_Real u,v; gp_Pnt pnt(p(0), p(1), p(2)); Handle(Geom_Surface) occface; occface = BRep_Tool::Surface(TopoDS::Face(geometry.fmap(surfind))); /* GeomAPI_ProjectPointOnSurf proj(pnt, occface); if (proj.NbPoints() < 1) { cout << "ERROR: OCCSurface :: GetNormalVector: GeomAPI_ProjectPointOnSurf failed!" << endl; cout << p << endl; return 0; } proj.LowerDistanceParameters (u, v); */ Handle( ShapeAnalysis_Surface ) su = new ShapeAnalysis_Surface( occface ); gp_Pnt2d suval = su->ValueOfUV ( pnt, BRep_Tool::Tolerance( TopoDS::Face(geometry.fmap(surfind)) ) ); suval.Coord( u, v); //pnt = occface->Value( u, v ); gi.u = u; gi.v = v; return 1; } OCCRefinementSurfaces :: OCCRefinementSurfaces (const OCCGeometry & ageometry) : Refinement(), geometry(ageometry) { ; } OCCRefinementSurfaces :: ~OCCRefinementSurfaces () { ; } /* inline double Det3 (double a00, double a01, double a02, double a10, double a11, double a12, double a20, double a21, double a22) { return a00*a11*a22 + a01*a12*a20 + a10*a21*a02 - a20*a11*a02 - a10*a01*a22 - a21*a12*a00; } bool ProjectToSurface (gp_Pnt & p, Handle(Geom_Surface) surface, double& u, double& v) { gp_Pnt x = surface->Value (u,v); if (p.SquareDistance(x) <= sqr(PROJECTION_TOLERANCE)) return true; gp_Vec du, dv; surface->D1(u,v,x,du,dv); int count = 0; gp_Pnt xold; gp_Vec n; double det, lambda, mu; do { count++; n = du^dv; det = Det3 (n.X(), du.X(), dv.X(), n.Y(), du.Y(), dv.Y(), n.Z(), du.Z(), dv.Z()); if (det < 1e-15) return false; lambda = Det3 (n.X(), p.X()-x.X(), dv.X(), n.Y(), p.Y()-x.Y(), dv.Y(), n.Z(), p.Z()-x.Z(), dv.Z())/det; mu = Det3 (n.X(), du.X(), p.X()-x.X(), n.Y(), du.Y(), p.Y()-x.Y(), n.Z(), du.Z(), p.Z()-x.Z())/det; u += lambda; v += mu; xold = x; surface->D1(u,v,x,du,dv); } while (xold.SquareDistance(x) > sqr(PROJECTION_TOLERANCE) || count > 50); if (count > 50) return false; p = x; return true; } */ void OCCRefinementSurfaces :: PointBetween (const Point<3> & p1, const Point<3> & p2, double secpoint, int surfi, const PointGeomInfo & gi1, const PointGeomInfo & gi2, Point<3> & newp, PointGeomInfo & newgi) const { Point<3> hnewp; hnewp = p1+secpoint*(p2-p1); if (surfi > 0) { double u = gi1.u+secpoint*(gi2.u-gi1.u); double v = gi1.v+secpoint*(gi2.v-gi1.v); if (!geometry.FastProject (surfi, hnewp, u, v)) { // cout << "Fast projection to surface fails! Using OCC projection" << endl; geometry.Project (surfi, hnewp); } newgi.trignum = 1; newgi.u = u; newgi.v = v; } newp = hnewp; } void OCCRefinementSurfaces :: PointBetween (const Point<3> & p1, const Point<3> & p2, double secpoint, int surfi1, int surfi2, const EdgePointGeomInfo & ap1, const EdgePointGeomInfo & ap2, Point<3> & newp, EdgePointGeomInfo & newgi) const { double s0, s1; Point<3> hnewp = p1+secpoint*(p2-p1); gp_Pnt pnt(hnewp(0), hnewp(1), hnewp(2)); GeomAPI_ProjectPointOnCurve proj(pnt, BRep_Tool::Curve(TopoDS::Edge(geometry.emap(ap1.edgenr)), s0, s1)); pnt = proj.NearestPoint(); hnewp = Point<3> (pnt.X(), pnt.Y(), pnt.Z()); newp = hnewp; newgi = ap1; }; void OCCRefinementSurfaces :: ProjectToSurface (Point<3> & p, int surfi) const { if (surfi > 0) geometry.Project (surfi, p); }; void OCCRefinementSurfaces :: ProjectToSurface (Point<3> & p, int surfi, PointGeomInfo & gi) const { if (surfi > 0) if (!geometry.FastProject (surfi, p, gi.u, gi.v)) { cout << "Fast projection to surface fails! Using OCC projection" << endl; geometry.Project (surfi, p); } }; } #endif netgen-6.2.1804/libsrc/occ/Partition_Loop.hxx0000644000175000017500000000546013272137567017527 0ustar kurtkurt// GEOM PARTITION : partition algorithm // // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org // // // // File : Partition_Loop.hxx // Module : GEOM #ifndef _Partition_Loop_HeaderFile #define _Partition_Loop_HeaderFile #ifndef _TopoDS_Face_HeaderFile #include #endif #ifndef _TopTools_ListOfShape_HeaderFile #include #endif #ifndef _TopTools_DataMapOfShapeListOfShape_HeaderFile #include #endif #ifndef _Standard_Version_HeaderFile #include #endif class TopoDS_Face; class TopoDS_Edge; #if OCC_VERSION_HEX < 0x070000 class TopTools_ListOfShape; #endif #ifndef _Standard_HeaderFile #include #endif #ifndef _Standard_Macro_HeaderFile #include #endif class Partition_Loop { public: inline void* operator new(size_t,void* anAddress) { return anAddress; } inline void* operator new(size_t size) { return Standard::Allocate(size); } inline void operator delete(void *anAddress) { if (anAddress) Standard::Free((Standard_Address&)anAddress); } // inline void operator delete(void *anAddress, size_t size) // { // if (anAddress) Standard::Free((Standard_Address&)anAddress,size); // } // Methods PUBLIC // Partition_Loop(); void Init(const TopoDS_Face& F) ; void AddConstEdge(const TopoDS_Edge& E) ; void Perform() ; const TopTools_ListOfShape& NewWires() const; void WiresToFaces() ; const TopTools_ListOfShape& NewFaces() const; protected: // Methods PROTECTED // // Fields PROTECTED // private: // Methods PRIVATE // // Fields PRIVATE // TopoDS_Face myFace; TopTools_ListOfShape myConstEdges; TopTools_ListOfShape myNewWires; TopTools_ListOfShape myNewFaces; }; // other inline functions and methods (like "C++: function call" methods) // #endif netgen-6.2.1804/libsrc/occ/Partition_Inter3d.hxx0000644000175000017500000001064413272137567020126 0ustar kurtkurt// GEOM PARTITION : partition algorithm // // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org // // // // File : Partition_Inter3d.hxx // Module : GEOM #ifndef _Partition_Inter3d_HeaderFile #define _Partition_Inter3d_HeaderFile #ifndef _Standard_Version_HeaderFile #include #endif #if OCC_VERSION_HEX < 0x070000 #ifndef _Handle_BRepAlgo_AsDes_HeaderFile #include #endif #else #include #include #endif #ifndef _TopTools_DataMapOfShapeListOfShape_HeaderFile #include #endif #ifndef _TopTools_MapOfShape_HeaderFile #include #endif #ifndef _TopTools_DataMapOfShapeShape_HeaderFile #include #endif #ifndef _Standard_Boolean_HeaderFile #include #endif #if OCC_VERSION_HEX < 0x070000 class TopTools_ListOfShape; class TopTools_DataMapOfShapeShape; class TopTools_MapOfShape; #endif class BRepAlgo_AsDes; class TopoDS_Face; class TopoDS_Shape; class TopoDS_Vertex; class TopoDS_Edge; #ifndef _Standard_HeaderFile #include #endif #ifndef _Standard_Macro_HeaderFile #include #endif class Partition_Inter3d { public: void* operator new(size_t,void* anAddress) { return anAddress; } void* operator new(size_t size) { return Standard::Allocate(size); } void operator delete(void *anAddress) { if (anAddress) Standard::Free((Standard_Address&)anAddress); } // Methods PUBLIC // Partition_Inter3d(); Partition_Inter3d(const Handle(BRepAlgo_AsDes)& AsDes); void CompletPart3d(const TopTools_ListOfShape& SetOfFaces1,const TopTools_DataMapOfShapeShape& FaceShapeMap) ; void FacesPartition(const TopoDS_Face& F1,const TopoDS_Face& F2) ; Standard_Boolean IsDone(const TopoDS_Face& F1,const TopoDS_Face& F2) const; TopTools_MapOfShape& TouchedFaces() ; Handle_BRepAlgo_AsDes AsDes() const; TopTools_MapOfShape& NewEdges() ; Standard_Boolean HasSameDomainF(const TopoDS_Shape& F) const; Standard_Boolean IsSameDomainF(const TopoDS_Shape& F1,const TopoDS_Shape& F2) const; const TopTools_ListOfShape& SameDomain(const TopoDS_Face& F) const; TopoDS_Vertex ReplaceSameDomainV(const TopoDS_Vertex& V,const TopoDS_Edge& E) const; Handle_BRepAlgo_AsDes SectionEdgesAD() const; Standard_Boolean IsSectionEdge(const TopoDS_Edge& E) const; Standard_Boolean HasSectionEdge(const TopoDS_Face& F) const; Standard_Boolean IsSplitOn(const TopoDS_Edge& NewE,const TopoDS_Edge& OldE,const TopoDS_Face& F) const; const TopTools_ListOfShape& SectionEdgeFaces(const TopoDS_Edge& SecE) const; protected: // Methods PROTECTED // // Fields PROTECTED // private: // Methods PRIVATE // void Inter3D(const TopoDS_Face& F1,const TopoDS_Face& F2,TopTools_ListOfShape& LInt) ; void StorePart3d(const TopoDS_Face& F1,const TopoDS_Face& F2,const TopTools_ListOfShape& LInt1) ; void SetDone(const TopoDS_Face& F1,const TopoDS_Face& F2) ; void Affiche(const TopTools_ListOfShape& SetOfFaces) const; // Fields PRIVATE // Handle_BRepAlgo_AsDes myAsDes; TopTools_DataMapOfShapeListOfShape myDone; TopTools_MapOfShape myTouched; TopTools_MapOfShape myNewEdges; Handle_BRepAlgo_AsDes mySectionEdgesAD; TopTools_DataMapOfShapeListOfShape mySameDomainFM; TopTools_DataMapOfShapeShape mySameDomainVM; }; // other Inline functions and methods (like "C++: function call" methods) // #endif netgen-6.2.1804/libsrc/occ/Partition_Inter2d.ixx0000644000175000017500000000211413272137567020117 0ustar kurtkurt// GEOM PARTITION : partition algorithm // // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org // // // // File : Partition_Inter2d.ixx // Module : GEOM #include #include "Partition_Inter2d.jxx" netgen-6.2.1804/libsrc/occ/Partition_Loop3d.jxx0000644000175000017500000000122513272137567017753 0ustar kurtkurt// GEOM PARTITION : partition algorithm // // Copyright (C) 2003 CEA/DEN, EDF R&D // // // // File : Partition_Loop3d.jxx // Module : GEOM #ifndef _TopoDS_Shape_HeaderFile #include #endif #ifndef _TopTools_ListOfShape_HeaderFile #include #endif #ifndef _TopTools_MapOfOrientedShape_HeaderFile #include #endif #ifndef _TopoDS_Edge_HeaderFile #include #endif #ifndef _TopoDS_Face_HeaderFile #include #endif #ifndef _gp_Vec_HeaderFile #include #endif #ifndef _Partition_Loop3d_HeaderFile #include "Partition_Loop3d.hxx" #endif netgen-6.2.1804/libsrc/occ/Partition_Loop2d.cxx0000644000175000017500000011063113272137567017745 0ustar kurtkurt#ifdef OCCGEOMETRY // GEOM PARTITION : partition algorithm // // Copyright (C) 2003 CEA/DEN, EDF R& D // // // // File : Partition_Loop2d.cxx // Author : Benedicte MARTIN // Module : GEOM // $Header: /cvs/netgen/netgen/libsrc/occ/Partition_Loop2d.cxx,v 1.6 2008/03/31 14:20:28 wabro Exp $ //using namespace std; #include #include "Partition_Loop2d.ixx" #include "utilities.h" #include #include #include #include #include // #include // V6.3 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include // V6.5 #include #include #include #include #include #include #include #include #include #include #include #include #include #define PI 3.14159265358979323846 //======================================================================= //function : Partition_Loop2d //purpose : //======================================================================= Partition_Loop2d::Partition_Loop2d() { } //======================================================================= //function : Init //purpose : Init with the set of edges must have // pcurves on . //======================================================================= void Partition_Loop2d::Init(const TopoDS_Face& F) { myConstEdges.Clear(); myNewWires .Clear(); myNewFaces .Clear(); myFace = F; myFaceOri = myFace.Orientation(); myFace.Orientation( TopAbs_FORWARD ); } //======================================================================= //function : AddConstEdge //purpose : Add as unique edge in the result. //======================================================================= void Partition_Loop2d::AddConstEdge (const TopoDS_Edge& E) { #ifdef DEB Standard_Real f,l; Handle(Geom2d_Curve) pc = BRep_Tool::CurveOnSurface( E, myFace, f,l); if (pc.IsNull()) { INFOS( "AddConstEdge(): EDGE W/O PCURVE on FACE"); } else #endif { myConstEdges.Append(E); } } void Partition_Loop2d::AddSectionEdge (const TopoDS_Edge& E) { #ifdef DEB Standard_Real f,l; Handle(Geom2d_Curve) pc = BRep_Tool::CurveOnSurface( E, myFace, f,l); if (pc.IsNull()) pc = BRep_Tool::CurveOnSurface( E, myFace, f,l); gp_Vec2d Tg1; gp_Pnt2d PC; pc->D1(0.5*(f+l), PC, Tg1); if (Tg1.Magnitude() <= gp::Resolution()) { MESSAGE (""); } if (pc.IsNull()) { INFOS( "AddConstEdge(): EDGE W/O PCURVE on FACE"); } else #endif { myConstEdges.Append(E); myConstEdges.Append(E.Reversed()); mySectionEdges.Add( E ); } } //======================================================================= //function : preciseU //purpose : find u such that the 3D point on theE is just out of tolerance // of theV //======================================================================= static Standard_Real preciseU (const BRepAdaptor_Surface& theSurf, const TopoDS_Edge& theE, const TopoDS_Vertex& theV, const Handle(Geom2d_Curve)& theC, const Standard_Boolean theFirstEnd) { Standard_Boolean isForward = ( theE.Orientation () == TopAbs_FORWARD ); if (theFirstEnd) isForward = !isForward; // find the first point in 2d and 3d Standard_Real f,l; BRep_Tool::Range( theE, f, l ); Standard_Real u0 = isForward ? l : f; gp_Pnt2d aP2d0 = theC->Value( u0 ); gp_Pnt aPnt0 = theSurf.Value( aP2d0.X(), aP2d0.Y() ); // shift in 2d and 3d Standard_Real du = ( l - f ) / 100, du3d = 0; if (isForward) du = -du; // target parameter Standard_Real u; while (du3d < ::RealSmall()) { // u for test u = u0 + du; du *= 10; // for the next iteration: increase du until du3d is large enough // find out how u is far from u0 in 3D gp_Pnt2d aP2d = theC->Value( u ); gp_Pnt aPnt = theSurf.Value( aP2d.X(), aP2d.Y() ); du3d = aPnt0.Distance( aPnt ); } // find u such that the 3D point is just out of tolerance of theV Standard_Real tolV = BRep_Tool::Tolerance( theV ) + Precision::Confusion(); u = u0 + du * tolV / du3d; // check that u is within the range if ( isForward ? (u < f) : (u > l) ) u = u0 + du; return u; } //======================================================================= //function : SelectEdge //purpose : Find in the list the edge connected with by // the vertex . // is removed from the list. If is in // with the same orientation, it's removed from the list //======================================================================= static Standard_Boolean SelectEdge(const BRepAdaptor_Surface& Surf, const TopoDS_Edge& CE, const TopoDS_Vertex& CV, TopoDS_Edge& NE, const TopTools_ListOfShape& LE) { NE.Nullify(); if (LE.Extent() > 1) { //-------------------------------------------------------------- // Several possible edges. // - Test the edge difference of CE //-------------------------------------------------------------- TopoDS_Face FForward = Surf.Face(); TopoDS_Edge aPrevNE; gp_Vec2d CTg1, Tg1, CTg2, Tg2; gp_Pnt2d PC, P; Standard_Real f, l; Handle(Geom2d_Curve) Cc, C; Cc = BRep_Tool::CurveOnSurface(CE,FForward,f,l); Standard_Boolean isForward = ( CE.Orientation () == TopAbs_FORWARD ); Standard_Real uc, u, du = Precision::PConfusion(); uc = isForward ? ( l - du ) : ( f + du ); Cc->D1(uc, PC, CTg1); if (!isForward) CTg1.Reverse(); Standard_Real anglemin = 3 * M_PI, tolAng = 1.e-8; // select an edge whose first derivative is most left of CTg1 // ie an angle between Tg1 and CTg1 is least TopTools_ListIteratorOfListOfShape itl; for ( itl.Initialize(LE); itl.More(); itl.Next()) { const TopoDS_Edge& E = TopoDS::Edge(itl.Value()); if (E.IsSame(CE)) continue; if (! CV.IsSame( TopExp::FirstVertex( E, Standard_True ))) continue; isForward = ( E.Orientation () == TopAbs_FORWARD ); // get E curve C = BRep_Tool::CurveOnSurface(E,FForward,f,l); // get the first derivative Tg1 u = isForward ? ( f + du ) : ( l - du ); C->D1(u, P, Tg1); if (!isForward) Tg1.Reverse(); // -PI < angle < PI Standard_Real angle = Tg1.Angle(CTg1); if (M_PI - Abs(angle) <= tolAng) { // an angle is too close to PI; assure that an angle sign really // reflects an edge position: +PI - an edge is worst, // -PI - an edge is best. u = preciseU( Surf, CE, CV, Cc, Standard_False); gp_Vec2d CTg; Cc->D1(u, PC, CTg); if (CE.Orientation() == TopAbs_REVERSED) CTg.Reverse(); u = preciseU( Surf, E, CV, C, Standard_True); C->D1(u, P, Tg1); if (!isForward) Tg1.Reverse(); angle = Tg1.Angle(CTg); } Standard_Boolean isClose = ( Abs( angle - anglemin ) <= tolAng ); if (angle <= anglemin) { if (isClose) aPrevNE = NE; else aPrevNE.Nullify(); anglemin = angle ; NE = E; } else if (isClose) aPrevNE = E; } if (!aPrevNE.IsNull()) { // select one of close edges, the most left one. Cc = BRep_Tool::CurveOnSurface( NE, FForward, f, l ); uc = preciseU( Surf, NE, CV, Cc, Standard_True); Cc->D1(uc, PC, CTg1); if (NE.Orientation() != TopAbs_FORWARD) CTg1.Reverse(); u = preciseU( Surf, aPrevNE, CV, C, Standard_True); C->D1(u, P, Tg1); if (aPrevNE.Orientation() != TopAbs_FORWARD) Tg1.Reverse(); if ( Tg1.Angle(CTg1) < 0) NE = aPrevNE; } } else if (LE.Extent() == 1) { NE = TopoDS::Edge(LE.First()); } else { return Standard_False; } return !NE.IsNull(); } //======================================================================= //function : SamePnt2d //purpose : //======================================================================= static Standard_Boolean SamePnt2d(const TopoDS_Vertex& V1, const TopoDS_Edge& E1, const TopoDS_Vertex& V2, const TopoDS_Edge& E2, const TopoDS_Face& F) { Standard_Real f1,f2,l1,l2; Handle(Geom2d_Curve) C1 = BRep_Tool::CurveOnSurface(E1,F,f1,l1); Handle(Geom2d_Curve) C2 = BRep_Tool::CurveOnSurface(E2,F,f2,l2); gp_Pnt2d P1 = C1->Value( BRep_Tool::Parameter(V1,E1)); gp_Pnt2d P2 = C2->Value( BRep_Tool::Parameter(V2,E2)); Standard_Real Tol = 100 * BRep_Tool::Tolerance(V1); Standard_Real Dist = P1.Distance(P2); return Dist < Tol; } //======================================================================= //function : StoreInMVE //purpose : //======================================================================= static void StoreInMVE (const TopoDS_Face& /*F*/, TopoDS_Edge& E, TopTools_DataMapOfShapeListOfShape& MVE ) { TopoDS_Vertex V1, V2; TopTools_ListOfShape Empty; TopExp::Vertices(E,V1,V2); if (!MVE.IsBound(V1)) { MVE.Bind(V1,Empty); } MVE(V1).Append(E); if (!MVE.IsBound(V2)) { MVE.Bind(V2,Empty); } MVE(V2).Append(E); } //======================================================================= //function : RemoveFromMVE //purpose : //======================================================================= static void RemoveFromMVE(const TopoDS_Edge& E, TopTools_DataMapOfShapeListOfShape& MVE) { TopTools_ListIteratorOfListOfShape itl; TopoDS_Vertex V1,V2; TopExp::Vertices (E,V1,V2); if (MVE.IsBound(V1)) for ( itl.Initialize(MVE(V1)); itl.More(); itl.Next()) { if (itl.Value().IsEqual(E)) { MVE(V1).Remove(itl); break; } } if (MVE.IsBound(V2)) for ( itl.Initialize(MVE(V2)); itl.More(); itl.Next()) { if (itl.Value().IsEqual(E)) { MVE(V2).Remove(itl); break; } } } //======================================================================= //function : addConnected //purpose : add to all edges reachable from //======================================================================= static void addConnected(const TopoDS_Shape& E, TopTools_MapOfShape& EM, TopTools_MapOfShape& VM, const TopTools_DataMapOfShapeListOfShape& MVE) { // Loop on vertices of E TopoDS_Iterator itV ( E ); for ( ; itV.More(); itV.Next()) { if ( ! VM.Add ( itV.Value() )) continue; // Loop on edges sharing V TopTools_ListIteratorOfListOfShape itE( MVE( itV.Value() ) ); for (; itE.More(); itE.Next()) { if ( EM.Add( itE.Value() )) addConnected ( itE.Value(), EM, VM, MVE ); } } } //======================================================================= //function : canPassToOld //purpose : //======================================================================= // static Standard_Boolean canPassToOld (const TopoDS_Shape& V, // TopTools_MapOfShape& UsedShapesMap, // const TopTools_DataMapOfShapeListOfShape& MVE, // const TopTools_MapOfShape& SectionEdgesMap) // { // TopTools_ListIteratorOfListOfShape itE( MVE(V) ); // // Loop on edges sharing V // for (; itE.More(); itE.Next()) { // if ( !UsedShapesMap.Add( itE.Value() )) // continue; // already checked // if ( !SectionEdgesMap.Contains( itE.Value() )) // return Standard_True; // WE PASSED // TopoDS_Iterator itV( itE.Value() ); // // Loop on vertices of an edge // for (; itV.More(); itV.Next()) { // if ( !UsedShapesMap.Add( itV.Value() )) // continue; // already checked // else // return canPassToOld( itV.Value(), UsedShapesMap, MVE, SectionEdgesMap); // } // } // return Standard_False; // } //======================================================================= //function : MakeDegenAndSelect //purpose : Find parameter of intersection of with and // select an edge with its parameter closest to found one. // Return new degenerated edge trimming by found parameters //======================================================================= static TopoDS_Edge MakeDegenAndSelect(const TopoDS_Edge& CE, const TopoDS_Vertex& CV, TopoDS_Edge& NE, TopTools_SequenceOfShape& EdgesSeq, TColStd_SequenceOfReal& USeq, const TopoDS_Edge& DE) { if (EdgesSeq.Length() < 3) { if (CE == EdgesSeq.First()) NE = TopoDS::Edge( EdgesSeq.Last() ); else NE = TopoDS::Edge( EdgesSeq.First() ); return DE; } // find parameter on DE where it intersects CE Standard_Real U1; Standard_Integer i, nb = EdgesSeq.Length(); for (i=1; i<= nb; ++i) { if (CE == EdgesSeq(i)) { U1 = USeq(i); break; } } // select NE with param closest to U1 thus finding U2 for a new degen edge Standard_Real U2, dU, dUmin = 1.e100; Standard_Boolean isReversed = ( DE.Orientation() == TopAbs_REVERSED ); for (i=1; i<= nb; ++i) { dU = USeq(i) - U1; if (isReversed ? (dU > 0) : (dU < 0)) continue; dU = Abs( dU ); if ( dU > dUmin || IsEqual( dU, 0.)) continue; const TopoDS_Edge& E = TopoDS::Edge ( EdgesSeq(i) ); if ( ! CV.IsSame( TopExp::FirstVertex( E , Standard_True ))) continue; NE = E; dUmin = dU + Epsilon(dU); U2 = USeq(i); } // make a new degenerated edge TopoDS_Edge NewDegen = TopoDS::Edge ( DE.EmptyCopied() ); Standard_Real Tol = BRep_Tool::Tolerance( CV ); TopoDS_Vertex V = CV; BRep_Builder B; V.Orientation( NewDegen.Orientation() ); B.UpdateVertex( V, U1, NewDegen, Tol); B.Add ( NewDegen , V ); V.Reverse(); B.UpdateVertex( V, U2, NewDegen, Tol); B.Add ( NewDegen , V ); return NewDegen; } //======================================================================= //function : prepareDegen //purpose : Intersect with edges bound to its vertex in // and store intersection parameter on in // as well as the edges them-self in . // Bind to vertex of in //======================================================================= static void prepareDegen (const TopoDS_Edge& DegEdge, const TopoDS_Face& F, const TopTools_DataMapOfShapeListOfShape& MVE, TopTools_SequenceOfShape& EdgesSeq, TColStd_SequenceOfReal& USeq, TopTools_DataMapOfShapeInteger& MVDEI, const Standard_Integer DegEdgeIndex) { const TopoDS_Vertex& V = TopExp::FirstVertex ( DegEdge ); MVDEI.Bind ( V, DegEdgeIndex ); const TopTools_ListOfShape& EdgesList = MVE ( V ); // if only 2 edges come to degenerated one, no pb in selection and // no need to intersect them, just simulate asked data Standard_Boolean doIntersect = ( EdgesList.Extent() > 2 ); BRepAdaptor_Curve2d DC, C; Geom2dInt_GInter InterCC; Standard_Real Tol = Precision::PConfusion(); if ( doIntersect ) DC.Initialize( DegEdge, F ); // avoid intersecting twice the same edge // BRepOffset_DataMapOfShapeReal EUMap ( EdgesList.Extent() ); // V6.3 TopTools_DataMapOfShapeReal EUMap ( EdgesList.Extent() ); // V6.5 Standard_Real U, f, l; BRep_Tool::Range (DegEdge, f, l); TopTools_ListIteratorOfListOfShape itE (EdgesList); for (; itE.More(); itE.Next()) { const TopoDS_Edge& E = TopoDS::Edge ( itE.Value() ); if ( !doIntersect) { U = 0.; // it won't be used } else if ( BRep_Tool::IsClosed( E, F )) { // seam edge: select U among f and l Standard_Boolean first = Standard_True; if ( V.IsSame ( TopExp::FirstVertex( E, Standard_True ) )) first = Standard_False; if ( DegEdge.Orientation() == TopAbs_REVERSED ) first = !first; U = first ? f : l; } else if ( EUMap.IsBound( E ) ) { // same edge already bound U = EUMap( E ); } else { // intersect 2d curves C.Initialize( E, F ); InterCC.Perform ( DC, C , Tol, Tol ); if (! InterCC.IsDone() || InterCC.NbPoints() == 0) { MESSAGE ( "NO 2d INTERSECTION ON DEGENERATED EDGE" ); continue; } // hope there is only one point of intersection U = InterCC.Point( 1 ).ParamOnFirst(); } USeq.Append ( U ); EdgesSeq.Append ( E ); } } //======================================================================= //function : Perform //purpose : Make loops. //======================================================================= void Partition_Loop2d::Perform() { Standard_Integer NbConstEdges = myConstEdges.Extent(); TopTools_DataMapOfShapeListOfShape MVE(NbConstEdges) , MVE2(NbConstEdges); TopTools_DataMapIteratorOfDataMapOfShapeListOfShape Mapit; TopTools_ListIteratorOfListOfShape itl; TopoDS_Vertex V1,V2; BRepAdaptor_Surface Surface ( myFace, Standard_False ); // degenerated edges and parameters of their 2d intersection with other edges TopoDS_Edge DE [2]; TopTools_SequenceOfShape SEID [2]; // seq of edges intersecting degenerated TColStd_SequenceOfReal SeqU [2]; // n-th U corresponds to n-th edge in SEID TopTools_DataMapOfShapeInteger MVDEI(2); // map vertex - degenerated edge index Standard_Integer iDeg = 0; // index of degenerated edge [0,1] //--------------------------------------------------------- // Construction map vertex => edges, find degenerated edges //--------------------------------------------------------- for (itl.Initialize(myConstEdges); itl.More(); itl.Next()) { TopoDS_Edge& E = TopoDS::Edge(itl.Value()); if ( BRep_Tool::Degenerated( E )) { if (DE[0].IsNull()) DE[0] = E; else DE[1] = E; } else StoreInMVE(myFace,E,MVE); } // fill data for degenerated edges if ( ! DE[0].IsNull() ) prepareDegen ( DE[0], myFace, MVE, SEID[0], SeqU[0], MVDEI, 0); if ( ! DE[1].IsNull() ) prepareDegen ( DE[1], myFace, MVE, SEID[1], SeqU[1], MVDEI, 1); // to detect internal wires Standard_Boolean isInternCW = 0; MVE2 = MVE; //------------------------------ // Construction of all the wires //------------------------------ // first, we collect wire edges in WEL list looking for same edges that // will be then removed possibly exploding a wire into parts; // second, build wire(s) while (!MVE.IsEmpty()) { TopoDS_Vertex VF,CV; TopoDS_Edge CE,NE,EF; TopoDS_Wire NW; BRep_Builder B; Standard_Boolean End = Standard_False; TopTools_ListOfShape WEL; Mapit.Initialize(MVE); if (Mapit.Value().IsEmpty()) { MVE.UnBind(Mapit.Key()); continue; } // EF first edge. EF = CE = TopoDS::Edge(Mapit.Value().First()); // VF first vertex VF = TopExp::FirstVertex( CE, Standard_True); isInternCW = Standard_True; TopTools_MapOfShape addedEM (NbConstEdges); // map of edges added to WEL TopTools_MapOfShape doubleEM (NbConstEdges); // edges encountered twice in WEL //------------------------------- // Construction of a wire. //------------------------------- while (!End) { // only a seam is allowed twice in a wire, the others should be removed if (addedEM.Add ( CE ) || BRep_Tool::IsClosed( CE, myFace ) ) WEL.Append( CE ); else { doubleEM.Add( CE ); RemoveFromMVE (CE,MVE2); TopoDS_Edge CERev = CE; CERev.Reverse(); RemoveFromMVE (CERev,MVE2); } RemoveFromMVE (CE,MVE); CV = TopExp::LastVertex( CE, Standard_True); if (isInternCW && !mySectionEdges.Contains(CE)) // wire is internal if all edges are section ones isInternCW = Standard_False; if (MVDEI.IsBound( CV )) { // CE comes to the degeneration iDeg = MVDEI( CV ); TopoDS_Edge NewDegen; NewDegen = MakeDegenAndSelect( CE, CV, NE, SEID[iDeg], SeqU[iDeg], DE[iDeg]); WEL.Append( NewDegen ); CE = NE; End = CV.IsSame( VF ); continue; } //-------------- // stop test //-------------- if (MVE(CV).IsEmpty()) { End=Standard_True; MVE.UnBind(CV); } else if (CV.IsSame(VF) && SamePnt2d(CV,CE, VF,EF, myFace) ) { End = Standard_True; } else { //---------------------------- // select new current edge //---------------------------- if (! SelectEdge (Surface,CE,CV,NE,MVE(CV))) { MESSAGE ( " NOT CLOSED WIRE " ); End=Standard_True; } else CE = NE; } } // while ( !End ) // WEL is built, built wire(s) itl.Initialize( WEL ); if ( doubleEM.IsEmpty()) { // no double edges B.MakeWire( NW ); for (; itl.More(); itl.Next()) B.Add ( NW, itl.Value()); if (isInternCW) myInternalWL.Append(NW); else myNewWires.Append (NW); } else { // remove double and degenerated edges from WEL while (itl.More()) { const TopoDS_Edge& E = TopoDS::Edge ( itl.Value() ); if ( doubleEM.Contains( E ) || BRep_Tool::Degenerated( E )) WEL.Remove( itl ); else itl.Next(); } if ( WEL.IsEmpty()) continue; // remove double edges from SEID and SeqU Standard_Integer i,j; for (j=0; j<2; ++j) { for (i=1; i<=SEID[j].Length(); ++i) { if (doubleEM.Contains( SEID[j].Value(i))) { SEID[j].Remove( i ); SeqU[j].Remove( i-- ); } } } // removal of double edges can explode a wire into parts, // make new wires of them. // A Loop like previous one but without 2d check while ( !WEL.IsEmpty() ) { CE = TopoDS::Edge( WEL.First() ); WEL.RemoveFirst(); B.MakeWire( NW ); VF = TopExp::FirstVertex ( CE, Standard_True); End = Standard_False; while ( !End) { B.Add( NW, CE ); CV = TopExp::LastVertex ( CE, Standard_True); if (MVDEI.IsBound( CV )) { // CE comes to the degeneration iDeg = MVDEI( CV ); TopoDS_Edge NewDegen; NewDegen = MakeDegenAndSelect( CE, CV, NE, SEID[iDeg], SeqU[iDeg], DE[iDeg]); B.Add( NW, NewDegen ); End = CV.IsSame( VF ); CE = NE; if (!NE.IsNull()) { // remove NE from WEL for (itl.Initialize( WEL ); itl.More(); itl.Next()) if ( NE == itl.Value()) { WEL.Remove( itl ); break; } } } // end degeneration else { if (CV.IsSame( VF )) { End = Standard_True; continue; } // edges in WEL most often are well ordered // so try to iterate until the End Standard_Boolean add = Standard_False; itl.Initialize(WEL); while ( itl.More() && !End) { NE = TopoDS::Edge( itl.Value() ); if ( CV.IsSame( TopExp::FirstVertex( NE, Standard_True ))) { WEL.Remove( itl ); if (add) B.Add( NW, CE ); CE = NE; add = Standard_True; CV = TopExp::LastVertex( CE, Standard_True); if (MVDEI.IsBound( CV ) || CV.IsSame( VF )) break; } else itl.Next(); } if (!add) End = Standard_True; } } // !End myInternalWL.Append( NW ); } } // end building new wire(s) from WEL } // end Loop on MVE // all wires are built // ============================================================ // select really internal wires i.e. those from which we can`t // pass to an old (not section) edge // ============================================================ Standard_Integer nbIW = myInternalWL.Extent(); if (nbIW == 0) return; if ( myNewWires.Extent() != 1 && nbIW > 1) { TopTools_MapOfShape outerEM (NbConstEdges); // edges connected to non-section ones TopTools_MapOfShape visitedVM (NbConstEdges); for ( itl.Initialize( myConstEdges ); itl.More(); itl.Next()) { if ( ! mySectionEdges.Contains( itl.Value() )) addConnected (itl.Value(), outerEM, visitedVM, MVE2); } // if an edge of a wire is in , the wire is not internal TopExp_Explorer expIWE; TopTools_ListIteratorOfListOfShape itIW ( myInternalWL ); while (itIW.More()) { expIWE.Init ( itIW.Value() , TopAbs_EDGE ); if ( outerEM.Contains( expIWE.Current() )) { myNewWires.Append ( itIW.Value() ); myInternalWL.Remove( itIW ); // == itIW.Next() } else itIW.Next(); } } } //======================================================================= //function : isHole //purpose : //======================================================================= static Standard_Boolean isHole (const TopoDS_Wire& W, const TopoDS_Face& F) { BRep_Builder B; TopoDS_Shape newFace = F.EmptyCopied(); B.Add(newFace,W.Oriented(TopAbs_FORWARD)); BRepTopAdaptor_FClass2d classif (TopoDS::Face(newFace), Precision::PConfusion()); return (classif.PerformInfinitePoint() == TopAbs_IN); } //======================================================================= //function : IsInside //purpose : check if W1 is inside W2. Suppose W2 is not a hole !!!! //======================================================================= static Standard_Boolean isInside(const TopoDS_Face& F, const TopoDS_Wire& W1, const TopoDS_Wire& W2) { // make a face with wire W2 BRep_Builder B; TopoDS_Shape aLocalShape = F.EmptyCopied(); TopoDS_Face newFace = TopoDS::Face(aLocalShape); B.Add(newFace,W2); // get any 2d point of W1 TopExp_Explorer exp(W1,TopAbs_EDGE); if (BRep_Tool::Degenerated( TopoDS::Edge( exp.Current() ))) exp.Next(); const TopoDS_Edge& e = TopoDS::Edge(exp.Current()); Standard_Real f,l; Handle(Geom2d_Curve) C2d = BRep_Tool::CurveOnSurface(e,F,f,l); gp_Pnt2d pt2d(C2d->Value( 0.5 * ( f + l ))); BRepTopAdaptor_FClass2d classif(newFace,Precision::PConfusion()); return (classif.Perform(pt2d) == TopAbs_IN); } //======================================================================= //function : NewWires //purpose : Returns the list of wires performed. // can be an empty list. //======================================================================= const TopTools_ListOfShape& Partition_Loop2d::NewWires() const { return myNewWires; } //======================================================================= //function : NewFaces //purpose : Returns the list of faces. //Warning : The method as to be called before. // can be an empty list. //======================================================================= const TopTools_ListOfShape& Partition_Loop2d::NewFaces() const { return myNewFaces; } //======================================================================= //function : findEqual //purpose : move wires form to pairs of wires build of the // same edges //======================================================================= static void findEqual (TopTools_ListOfShape& WL, TopTools_DataMapOfShapeShape& EqWM, const TopoDS_Face& F) { TopTools_ListIteratorOfListOfShape it1, it2; Standard_Integer i,j; TColStd_MapOfInteger IndMap; for (it1.Initialize(WL), i=1; it1.More(); it1.Next(), i++) { if (IndMap.Contains(i)) continue; const TopoDS_Wire& Wire1 = TopoDS::Wire( it1.Value()); for (it2.Initialize(WL), j=1; it2.More(); it2.Next(), j++) { if (j <= i || IndMap.Contains(j)) continue; TopTools_IndexedMapOfShape EdgesMap; TopExp::MapShapes (Wire1, TopAbs_EDGE, EdgesMap); const TopoDS_Shape& Wire2 = it2.Value(); TopoDS_Iterator itE ( Wire2); for (; itE.More(); itE.Next()) { if ( !EdgesMap.Contains( itE.Value()) ) break; } if (!itE.More()) { // all edges are same if (isHole( Wire1, F)) { EqWM.Bind ( Wire1, Wire2 ); } else { EqWM.Bind ( Wire2, Wire1 ); } IndMap.Add(i); IndMap.Add(j); break; } } } // clear WL it1.Initialize(WL); i=1; while (it1.More()) { if (IndMap.Contains(i)) WL.Remove(it1); // next node becomes current and with Next() we would miss it else it1.Next(); i++; } } //======================================================================= //function : classify //purpose : bind to a wire a list of internal wires //======================================================================= static void classify(const TopTools_DataMapOfShapeShape& EqWM, BRepAlgo_AsDes& OuterInner, const TopoDS_Face& F) { TopTools_DataMapIteratorOfDataMapOfShapeShape it1, it2; for (it1.Initialize(EqWM); it1.More(); it1.Next()) { // find next after it1.Value() for (it2.Initialize(EqWM); it2.More(); it2.Next()) if (it1.Value().IsSame( it2.Value() )) { it2.Next(); break; } for ( ; it2.More(); it2.Next()) { const TopoDS_Wire& Wire1 = TopoDS::Wire( it1.Value() ); const TopoDS_Wire& Wire2 = TopoDS::Wire( it2.Value() ); if (isInside(F, Wire1, Wire2)) OuterInner.Add (Wire2, Wire1); else if (isInside(F, Wire2, Wire1)) OuterInner.Add (Wire1, Wire2); } } } //======================================================================= //function : WiresToFaces //purpose : Build faces from the wires result. // serves to find original edge by new // one.
contains edges resulting from face // intersections //======================================================================= void Partition_Loop2d::WiresToFaces(const BRepAlgo_Image& ) { Standard_Integer nbW = myNewWires.Extent() + myInternalWL.Extent(); if (nbW==0) return; BRepAlgo_FaceRestrictor FR; FR.Init (myFace,Standard_False); // FaceRestrictor is instable in rather simple cases // (ex. a single face of bellecoque.brep splited by 10 planes: // sometimes 1-2 faces are missing ). // So we use it as less as possible: no holes -> make faces by hands // are there holes in myFace ? Standard_Boolean hasOldHoles = Standard_False; TopoDS_Iterator itOldW (myFace); if ( itOldW.More()) { const TopoDS_Wire& FirstOldWire = TopoDS::Wire( itOldW.Value() ); itOldW.Next(); hasOldHoles = itOldW.More() || isHole( FirstOldWire, myFace); } if (myInternalWL.IsEmpty() && !hasOldHoles) { // each wire bounds one face BRep_Builder B; TopTools_ListIteratorOfListOfShape itNW (myNewWires); for (; itNW.More(); itNW.Next()) { TopoDS_Face NF = TopoDS::Face ( myFace.EmptyCopied() ); B.Add ( NF, itNW.Value() ); NF.Orientation( myFaceOri); myNewFaces.Append ( NF ); } return; } // FaceRestrictor can't classify wires build on all the same edges // and gives incorrect result in such cases (ex. a plane cut into 2 parts by cylinder) // We must make faces of equal wires separately. One of equal wires makes a // hole in a face and should come together with outer wires of face. // The other of a wires pair bounds a face that may have holes in turn. // Find equal wires among internal wires TopTools_DataMapOfShapeShape EqWM; // key is a hole part of a pair of equal wires findEqual (myInternalWL, EqWM, myFace); if (!EqWM.IsEmpty()) { // there are equal wires if (hasOldHoles) myInternalWL.Append( myNewWires ); // an old wire can be inside an equal wire // classify equal wire pairs BRepAlgo_AsDes OuterInner; classify (EqWM,OuterInner,myFace); // make face of most internal of equal wires and its inner wires while ( !EqWM.IsEmpty()) { TopTools_ListOfShape prevHolesL; // list of hole-part of previous most internal equal wires // find most internal wires among pairs (key - hole, value - outer part) TopTools_DataMapIteratorOfDataMapOfShapeShape it(EqWM); Standard_Integer nbEqW = EqWM.Extent(); // protection against infinite loop for ( ; it.More(); it.Next()) { TopoDS_Wire outerW = TopoDS::Wire ( it.Value() ); if ( OuterInner.HasDescendant( outerW ) && // has internal ! OuterInner.Descendant( outerW ).IsEmpty() ) continue; FR.Add( outerW ); // add internal wires that are inside of outerW TopTools_ListIteratorOfListOfShape itIW (myInternalWL); while ( itIW.More()) { TopoDS_Wire IW = TopoDS::Wire ( itIW.Value() ); if ( isInside (myFace, IW, outerW)) { FR.Add (IW); myInternalWL.Remove( itIW ); // == itIW.Next() !!! } else itIW.Next(); } // the hole-part of current pair of equal wires will be in the next new face prevHolesL.Append ( it.Key() ); } // Loop on map of equal pairs searching for innermost wires // make faces FR.Perform(); if (FR.IsDone()) { for (; FR.More(); FR.Next()) myNewFaces.Append(FR.Current()); } FR.Clear(); // add hole-parts to FaceRestrictor, // remove them from the EqWM, // remove found wires as internal of resting classified wires Standard_Boolean clearOuterInner = ( prevHolesL.Extent() < EqWM.Extent() ); TopTools_ListIteratorOfListOfShape itPrev (prevHolesL); for (; itPrev.More(); itPrev.Next()) { TopoDS_Wire& Hole = TopoDS::Wire ( itPrev.Value() ); FR.Add ( Hole ); if (clearOuterInner) { const TopoDS_Wire& outerW = TopoDS::Wire ( EqWM.Find( Hole ) ); // Loop on wires including outerW TopTools_ListIteratorOfListOfShape itO( OuterInner.Ascendant( outerW )); for (; itO.More(); itO.Next()) { TopTools_ListOfShape& innerL = OuterInner.ChangeDescendant( itO.Value() ); TopTools_ListIteratorOfListOfShape itI (innerL); // Loop on internal wires of current including wire for (; itI.More(); itI.Next()) if ( outerW.IsSame( itI.Value() )) { innerL.Remove( itI ); break; } } } EqWM.UnBind ( Hole ); } if (nbEqW == EqWM.Extent()) { // error: pb with wires classification #ifdef DEB MESSAGE("Partition_Loop2d::WiresToFaces(), pb with wires classification"); #endif break; } } // while (!EqWM.IsEmpty) } // if !EqWM.IsEmpty() myNewWires.Append ( myInternalWL ); TopTools_ListIteratorOfListOfShape itW (myNewWires); for (; itW.More(); itW.Next()) { TopoDS_Wire& W = TopoDS::Wire ( itW.Value() ); FR.Add(W); } FR.Perform(); for (; FR.IsDone() && FR.More(); FR.Next()) myNewFaces.Append(FR.Current()); TopTools_ListIteratorOfListOfShape itNF (myNewFaces); for (; itNF.More(); itNF.Next()) itNF.Value().Orientation( myFaceOri ); } #endif netgen-6.2.1804/libsrc/occ/Partition_Spliter.hxx0000644000175000017500000000765613272137567020251 0ustar kurtkurt// GEOM PARTITION : partition algorithm // // Copyright (C) 2003 CEA/DEN, EDF R&D // // // // File : Partition_Spliter.hxx // Module : GEOM #ifndef _Partition_Spliter_HeaderFile #define _Partition_Spliter_HeaderFile #ifndef _Standard_Version_HeaderFile #include #endif #ifndef _TopAbs_ShapeEnum_HeaderFile #include #endif #ifndef _TopoDS_Compound_HeaderFile #include #endif #ifndef _BRep_Builder_HeaderFile #include #endif #ifndef _TopTools_ListOfShape_HeaderFile #include #endif #ifndef _TopTools_MapOfShape_HeaderFile #include #endif #ifndef _TopTools_DataMapOfShapeShape_HeaderFile #include #endif #if OCC_VERSION_HEX < 0x070000 #ifndef _Handle_BRepAlgo_AsDes_HeaderFile #include #endif #else #include #include #endif #ifndef _BRepAlgo_Image_HeaderFile #include #endif #ifndef _Partition_Inter3d_HeaderFile #include "Partition_Inter3d.hxx" #endif #ifndef _TopTools_MapOfOrientedShape_HeaderFile #include #endif #ifndef _Standard_Boolean_HeaderFile #include #endif class BRepAlgo_AsDes; class TopoDS_Shape; #if OCC_VERSION_HEX < 0x070000 class TopTools_ListOfShape; #endif class TopoDS_Edge; #ifndef _Standard_HeaderFile #include #endif #ifndef _Standard_Macro_HeaderFile #include #endif class Partition_Spliter { public: void* operator new(size_t,void* anAddress) { return anAddress; } void* operator new(size_t size) { return Standard::Allocate(size); } void operator delete(void *anAddress) { if (anAddress) Standard::Free((Standard_Address&)anAddress); } // Methods PUBLIC // Partition_Spliter(); void AddShape(const TopoDS_Shape& S) ; void AddTool(const TopoDS_Shape& S) ; void Compute(const TopAbs_ShapeEnum Limit = TopAbs_SHAPE) ; void KeepShapesInside(const TopoDS_Shape& S) ; void RemoveShapesInside(const TopoDS_Shape& S) ; TopoDS_Shape Shape() const; void Clear() ; protected: // Methods PROTECTED // // Fields PROTECTED // private: // Methods PRIVATE // void MakeSolids(const TopoDS_Shape& Solid,TopTools_ListOfShape& Shells) ; void MakeShells(const TopoDS_Shape& S,TopTools_ListOfShape& NS) ; TopoDS_Shape MakeFaces(const TopoDS_Shape& S) ; void MakeEdges(const TopoDS_Edge& E,const TopTools_ListOfShape& VOnE,TopTools_ListOfShape& NE) const; TopoDS_Shape FindFacesInside(const TopoDS_Shape& S,const Standard_Boolean CheckClosed = Standard_False,const Standard_Boolean All = Standard_False) ; Standard_Boolean CheckTool(const TopoDS_Shape& S) ; void MergeEqualEdges(const TopTools_ListOfShape& LE) ; static Standard_Boolean IsInside(const TopoDS_Shape& S1,const TopoDS_Shape& S2) ; TopoDS_Shape GetOriginalShape(const TopoDS_Shape& aShape) const; void FindToolsToReconstruct() ; // Fields PRIVATE // TopAbs_ShapeEnum myDoneStep; TopoDS_Compound myShape; BRep_Builder myBuilder; TopTools_ListOfShape myListShapes; TopTools_MapOfShape myMapFaces; TopTools_MapOfShape myMapTools; TopTools_MapOfShape myEqualEdges; TopTools_MapOfShape myNewSection; TopTools_MapOfShape myClosedShapes; TopTools_MapOfShape mySharedFaces; TopTools_MapOfShape myWrappingSolid; TopTools_DataMapOfShapeShape myFaceShapeMap; TopTools_DataMapOfShapeShape myInternalFaces; TopTools_DataMapOfShapeShape myIntNotClFaces; Handle_BRepAlgo_AsDes myAsDes; BRepAlgo_Image myImagesFaces; BRepAlgo_Image myImagesEdges; BRepAlgo_Image myImageShape; Partition_Inter3d myInter3d; TopTools_MapOfOrientedShape myAddedFacesMap; }; // other Inline functions and methods (like "C++: function call" methods) // #endif netgen-6.2.1804/libsrc/occ/occconstruction.cpp0000644000175000017500000000760713272137567017764 0ustar kurtkurt #ifdef OCCGEOMETRY #include #include #include "ShapeAnalysis_ShapeTolerance.hxx" #include "ShapeAnalysis_ShapeContents.hxx" #include "ShapeAnalysis_CheckSmallFace.hxx" #include "ShapeAnalysis_DataMapOfShapeListOfReal.hxx" #include "BRepAlgoAPI_Fuse.hxx" #include "BRepCheck_Analyzer.hxx" #include "BRepLib.hxx" #include "ShapeBuild_ReShape.hxx" #include "ShapeFix.hxx" #include "ShapeFix_FixSmallFace.hxx" #include "Partition_Spliter.hxx" //#include "VrmlAPI.hxx" //#include "StlAPI.hxx" #include #include #include #include // #include #include #include #include #include #include #include //#include #include #include namespace netgen { void OCCConstructGeometry (OCCGeometry & geom) { #ifdef NOTHING cout << "OCC construction" << endl; BRep_Builder builder; BRepPrimAPI_MakeBox mbox(gp_Pnt(-10e5, -15e5, 0), gp_Pnt(20e5, 15e5, 10e5)); /* TopoDS_Shape air = TopoDS_Solid (mbox); air = BRepAlgoAPI_Cut (air, geom.somap(1)); air = BRepAlgoAPI_Cut (air, geom.somap(2)); air = BRepAlgoAPI_Cut (air, geom.somap(3)); air = BRepAlgoAPI_Cut (air, geom.somap(4)); air = BRepAlgoAPI_Cut (air, geom.somap(5)); air = BRepAlgoAPI_Cut (air, geom.somap(6)); air = BRepAlgoAPI_Cut (air, geom.somap(7)); // air = BRepAlgoAPI_Cut (air, geom.somap(8)); air = BRepAlgoAPI_Cut (air, geom.somap(9)); // air = BRepAlgoAPI_Cut (air, geom.somap(10)); */ /* BRepOffsetAPI_MakeOffsetShape dom8plus (geom.somap(8), 1e4, 1e-6); BRepOffsetAPI_MakeOffsetShape dom6plus (geom.somap(6), 1e4, 1e-6); dom8plus.Build(); ShapeFix_Shape fixshape(dom8plus.Shape()); fixshape.Perform(); ShapeFix_Shape fix_dom2(geom.somap(2)); fix_dom2.Perform(); BRepAlgoAPI_Cut dom2m8(fix_dom2.Shape(), fixshape.Shape()); ShapeFix_Shape fix_dom2m8 (dom2m8); fix_dom2m8.Perform(); builder.Add (geom.shape, BRepAlgoAPI_Cut (BRepAlgoAPI_Cut (geom.somap(2), dom6plus), dom8plus)); // builder.Add (geom.shape, fix_dom2m8.Shape()); // builder.Add (geom.shape, fixshape.Shape()); */ TopoDS_Shape my_fuse; int cnt = 0; for (TopExp_Explorer exp_solid(geom.shape, TopAbs_SOLID); exp_solid.More(); exp_solid.Next()) { if (cnt == 0) my_fuse = exp_solid.Current(); else { cout << "fuse, cnt = " << cnt << endl; if (cnt != 7 && cnt != 9) my_fuse = BRepAlgoAPI_Fuse (my_fuse, exp_solid.Current()); } cnt++; } builder.Add (geom.shape, my_fuse); /* ShapeUpgrade_ShellSewing ss; ss.ApplySewing(geom.shape,1e5); */ /* BRepAlgo_Sewing sewing(1.e5); int cnt = 0; for (TopExp_Explorer exp_solid(geom.shape, TopAbs_SOLID); exp_solid.More(); exp_solid.Next()) { cout << "swe, cnt = " << cnt << endl; if (cnt != 7 && cnt != 9) sewing.Add (exp_solid.Current()); cnt++; } sewing.Perform(); builder.Add (geom.shape, sewing.SewedShape()); */ /* cout << "build air domain" << endl; TopoDS_Shape air = BRepAlgoAPI_Cut (TopoDS_Solid (mbox), my_fuse); cnt = 0; for (TopExp_Explorer exp_solid(geom.shape, TopAbs_SOLID); exp_solid.More(); exp_solid.Next()) { cout << "section, cnt = " << cnt << endl; if (cnt == 7) { builder.Add (geom.shape, BRepAlgoAPI_Section (air, exp_solid.Current())); } cnt++; } */ // builder.Add (geom.shape, air); for (int i = 1; i <= 10; i++) builder.Remove (geom.shape, geom.somap(i)); geom.BuildFMap(); geom.BuildVisualizationMesh(); geom.changed = 1; #endif } } #endif netgen-6.2.1804/libsrc/occ/Partition_Loop.cxx0000644000175000017500000003256313272137567017526 0ustar kurtkurt#ifdef OCCGEOMETRY // GEOM PARTITION : partition algorithm // // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org // // // // File : Partition_Loop.cxx // Author : Benedicte MARTIN // Module : GEOM // $Header: /cvs/netgen/netgen/libsrc/occ/Partition_Loop.cxx,v 1.6 2008/03/31 14:20:28 wabro Exp $ //using namespace std; #include #include #include "Partition_Loop.ixx" #include "utilities.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include static char* name = new char[100]; static int nbe = 0; #ifdef WIN32 #define M_PI 3.14159265358979323846 #endif //======================================================================= //function : Partition_Loop //purpose : //======================================================================= Partition_Loop::Partition_Loop() { } //======================================================================= //function : Init //purpose : //======================================================================= void Partition_Loop::Init(const TopoDS_Face& F) { myConstEdges.Clear(); myNewWires .Clear(); myNewFaces .Clear(); myFace = F; } //======================================================================= //function : AddConstEdge //purpose : //======================================================================= void Partition_Loop::AddConstEdge (const TopoDS_Edge& E) { myConstEdges.Append(E); } //======================================================================= //function : FindDelta //purpose : //======================================================================= static Standard_Real FindDelta(TopTools_ListOfShape& LE, const TopoDS_Face& F) { Standard_Real dist, f, l; Standard_Real d = Precision::Infinite(); TopTools_ListIteratorOfListOfShape itl; for ( itl.Initialize(LE); itl.More(); itl.Next()) { const TopoDS_Edge& E = TopoDS::Edge(itl.Value()); Handle(Geom2d_Curve) C = BRep_Tool::CurveOnSurface(E,F,f,l); gp_Pnt2d p = C->Value(f); gp_Pnt2d pp = C->Value(l); Standard_Real d1 = p.Distance(pp); if (d1 connected by the vertex in the list . // Is erased of the list. If is too in the list // with the same orientation, it's erased of the list //======================================================================= static Standard_Boolean SelectEdge(const TopoDS_Face& F, const TopoDS_Edge& CE, const TopoDS_Vertex& CV, TopoDS_Edge& NE, TopTools_ListOfShape& LE) { TopTools_ListIteratorOfListOfShape itl; NE.Nullify(); for ( itl.Initialize(LE); itl.More(); itl.Next()) { if (itl.Value().IsEqual(CE)) { LE.Remove(itl); break; } } if (LE.Extent() > 1) { //-------------------------------------------------------------- // Several possible edges. // - Test the edge difference of CE //-------------------------------------------------------------- Standard_Real cf, cl, f, l; TopoDS_Face FForward = F; Handle(Geom2d_Curve) Cc, C; FForward.Orientation(TopAbs_FORWARD); Cc = BRep_Tool::CurveOnSurface(CE,FForward,cf,cl); Standard_Real dist,distmin = 100*BRep_Tool::Tolerance(CV); Standard_Real uc,u; if (CE.Orientation () == TopAbs_FORWARD) uc = cl; else uc = cf; gp_Pnt2d P2,PV = Cc->Value(uc); Standard_Real delta = FindDelta(LE,FForward); for ( itl.Initialize(LE); itl.More(); itl.Next()) { const TopoDS_Edge& E = TopoDS::Edge(itl.Value()); if (!E.IsSame(CE)) { C = BRep_Tool::CurveOnSurface(E,FForward,f,l); if (E.Orientation () == TopAbs_FORWARD) u = f; else u = l; P2 = C->Value(u); dist = PV.Distance(P2); if (dist <= distmin){ distmin = dist; } } } Standard_Real anglemax = - M_PI; TopoDS_Edge SelectedEdge; for ( itl.Initialize(LE); itl.More(); itl.Next()) { const TopoDS_Edge& E = TopoDS::Edge(itl.Value()); if (!E.IsSame(CE)) { C = BRep_Tool::CurveOnSurface(E,FForward,f,l); if (E.Orientation () == TopAbs_FORWARD) u = f; else u = l; P2 = C->Value(u); dist = PV.Distance(P2); if (dist <= distmin + (1./3)*delta){ gp_Pnt2d PC, P; gp_Vec2d CTg1, CTg2, Tg1, Tg2; Cc->D2(uc, PC, CTg1, CTg2); C->D2(u, P, Tg1, Tg2); Standard_Real angle; if (CE.Orientation () == TopAbs_REVERSED && E.Orientation () == TopAbs_FORWARD) { angle = CTg1.Angle(Tg1.Reversed()); } else if (CE.Orientation () == TopAbs_FORWARD && E.Orientation () == TopAbs_REVERSED) { angle = (CTg1.Reversed()).Angle(Tg1); } else if (CE.Orientation () == TopAbs_REVERSED && E.Orientation () == TopAbs_REVERSED) { angle = CTg1.Angle(Tg1); } else if (CE.Orientation () == TopAbs_FORWARD && E.Orientation () == TopAbs_FORWARD) { angle = (CTg1.Reversed()).Angle(Tg1.Reversed()); } if (angle >= anglemax) { anglemax = angle ; SelectedEdge = E; } } } } for ( itl.Initialize(LE); itl.More(); itl.Next()) { const TopoDS_Edge& E = TopoDS::Edge(itl.Value()); if (E.IsEqual(SelectedEdge)) { NE = TopoDS::Edge(E); LE.Remove(itl); break; } } } else if (LE.Extent() == 1) { NE = TopoDS::Edge(LE.First()); LE.RemoveFirst(); } else { return Standard_False; } return Standard_True; } //======================================================================= //function : SamePnt2d //purpose : //======================================================================= static Standard_Boolean SamePnt2d(TopoDS_Vertex V, TopoDS_Edge& E1, TopoDS_Edge& E2, TopoDS_Face& F) { Standard_Real f1,f2,l1,l2; gp_Pnt2d P1,P2; TopoDS_Shape aLocalF = F.Oriented(TopAbs_FORWARD); TopoDS_Face FF = TopoDS::Face(aLocalF); Handle(Geom2d_Curve) C1 = BRep_Tool::CurveOnSurface(E1,FF,f1,l1); Handle(Geom2d_Curve) C2 = BRep_Tool::CurveOnSurface(E2,FF,f2,l2); if (E1.Orientation () == TopAbs_FORWARD) P1 = C1->Value(f1); else P1 = C1->Value(l1); if (E2.Orientation () == TopAbs_FORWARD) P2 = C2->Value(l2); else P2 = C2->Value(f2); Standard_Real Tol = 100*BRep_Tool::Tolerance(V); Standard_Real Dist = P1.Distance(P2); return Dist < Tol; } //======================================================================= //function : PurgeNewEdges //purpose : //======================================================================= static void PurgeNewEdges(TopTools_ListOfShape& ConstEdges, const TopTools_MapOfOrientedShape& UsedEdges) { TopTools_ListIteratorOfListOfShape it(ConstEdges); while ( it.More()) { const TopoDS_Shape& NE = it.Value(); if (!UsedEdges.Contains(NE)) { ConstEdges.Remove(it); } else { it.Next(); } } } //======================================================================= //function : StoreInMVE //purpose : //======================================================================= static void StoreInMVE (const TopoDS_Face& F, TopoDS_Edge& E, TopTools_DataMapOfShapeListOfShape& MVE ) { TopoDS_Vertex V1, V2; TopTools_ListOfShape Empty; TopExp::Vertices(E,V1,V2); if (!MVE.IsBound(V1)) { MVE.Bind(V1,Empty); } MVE(V1).Append(E); if (!MVE.IsBound(V2)) { MVE.Bind(V2,Empty); } MVE(V2).Append(E); } //======================================================================= //function : Perform //purpose : //======================================================================= void Partition_Loop::Perform() { TopTools_DataMapOfShapeListOfShape MVE; TopTools_DataMapIteratorOfDataMapOfShapeListOfShape Mapit, Mapit1; TopTools_ListIteratorOfListOfShape itl; TopoDS_Vertex V1,V2; //----------------------------------- // Construction map vertex => edges //----------------------------------- for (itl.Initialize(myConstEdges); itl.More(); itl.Next()) { TopoDS_Edge& E = TopoDS::Edge(itl.Value()); StoreInMVE(myFace,E,MVE); } //---------------------------------------------- // Construction of all the wires and of all the new faces. //---------------------------------------------- TopTools_MapOfOrientedShape UsedEdges; while (!MVE.IsEmpty()) { TopoDS_Vertex VF,CV; TopoDS_Edge CE,NE,EF; TopoDS_Wire NW; BRep_Builder B; Standard_Boolean End= Standard_False; B.MakeWire(NW); //-------------------------------- // EF first edge. //-------------------------------- Mapit.Initialize(MVE); EF = CE = TopoDS::Edge(Mapit.Value().First()); TopExp::Vertices(CE,V1,V2); //-------------------------------- // VF first vertex //-------------------------------- if (CE.Orientation() == TopAbs_FORWARD) { CV = VF = V1; } else { CV = VF = V2; } if (!MVE.IsBound(CV)) continue; for ( itl.Initialize(MVE(CV)); itl.More(); itl.Next()) { if (itl.Value().IsEqual(CE)) { MVE(CV).Remove(itl); break; } } int i = 0; while (!End) { //------------------------------- // Construction of a wire. //------------------------------- TopExp::Vertices(CE,V1,V2); if (!CV.IsSame(V1)) CV = V1; else CV = V2; B.Add (NW,CE); UsedEdges.Add(CE); //-------------- // stop test //-------------- if (!MVE.IsBound(CV) || MVE(CV).IsEmpty() || CV.IsSame(VF) ) { if (CV.IsSame(VF)) { if (MVE(CV).Extent() == 1 ) MVE.UnBind(CV); else { for ( itl.Initialize(MVE(CV)); itl.More(); itl.Next()) { if (itl.Value().IsEqual(CE)) { MVE(CV).Remove(itl); break; } } } } End=Standard_True; } //-------------- // select edge //-------------- else { Standard_Boolean find = SelectEdge(myFace,CE,CV,NE,MVE(CV)); if (find) { CE=NE; if (MVE(CV).IsEmpty()) MVE.UnBind(CV); if (CE.IsNull() ) { MESSAGE ( " CE is NULL !!! " ) End=Standard_True; } } else { MESSAGE ( " edge doesn't exist " ) End=Standard_True; } } } //----------------------------- // Test if the wire is closed //----------------------------- if (VF.IsSame(CV) && SamePnt2d(VF,EF,CE,myFace)) { } else{ MESSAGE ( "wire not closed" ) } myNewWires.Append (NW); } PurgeNewEdges(myConstEdges,UsedEdges); } //======================================================================= //function : NewWires //purpose : //======================================================================= const TopTools_ListOfShape& Partition_Loop::NewWires() const { return myNewWires; } //======================================================================= //function : NewFaces //purpose : //======================================================================= const TopTools_ListOfShape& Partition_Loop::NewFaces() const { return myNewFaces; } //======================================================================= //function : WiresToFaces //purpose : //======================================================================= void Partition_Loop::WiresToFaces() { if (!myNewWires.IsEmpty()) { BRepAlgo_FaceRestrictor FR; TopAbs_Orientation OriF = myFace.Orientation(); TopoDS_Shape aLocalS = myFace.Oriented(TopAbs_FORWARD); FR.Init (TopoDS::Face(aLocalS),Standard_False); TopTools_ListIteratorOfListOfShape it(myNewWires); for (; it.More(); it.Next()) { FR.Add(TopoDS::Wire(it.Value())); } FR.Perform(); if (FR.IsDone()) { for (; FR.More(); FR.Next()) { myNewFaces.Append(FR.Current().Oriented(OriF)); } } } } #endif netgen-6.2.1804/libsrc/occ/Partition_Loop2d.ixx0000644000175000017500000000027013272137567017750 0ustar kurtkurt// GEOM PARTITION : partition algorithm // // Copyright (C) 2003 CEA/DEN, EDF R&D // // // // File : Partition_Loop2d.ixx // Module : GEOM #include "Partition_Loop2d.jxx" netgen-6.2.1804/libsrc/occ/Partition_Inter3d.ixx0000644000175000017500000000207113272137567020122 0ustar kurtkurt// GEOM PARTITION : partition algorithm // // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org // // // // File : Partition_Inter3d.ixx // Module : GEOM #include "Partition_Inter3d.jxx" netgen-6.2.1804/libsrc/occ/Partition_Loop2d.hxx0000644000175000017500000000377513272137567017764 0ustar kurtkurt// GEOM PARTITION : partition algorithm // // Copyright (C) 2003 CEA/DEN, EDF R&D // // // // File : Partition_Loop2d.hxx // Module : GEOM #ifndef _Partition_Loop2d_HeaderFile #define _Partition_Loop2d_HeaderFile #ifndef _TopoDS_Face_HeaderFile #include #endif #ifndef _TopAbs_Orientation_HeaderFile #include #endif #ifndef _TopTools_ListOfShape_HeaderFile #include #endif #ifndef _TopTools_MapOfShape_HeaderFile #include #endif #ifndef _Standard_Version_HeaderFile #include #endif class TopoDS_Face; class TopoDS_Edge; #if OCC_VERSION_HEX < 0x070000 class TopTools_ListOfShape; #endif class BRepAlgo_Image; #ifndef _Standard_HeaderFile #include #endif #ifndef _Standard_Macro_HeaderFile #include #endif class Partition_Loop2d { public: void* operator new(size_t,void* anAddress) { return anAddress; } void* operator new(size_t size) { return Standard::Allocate(size); } void operator delete(void *anAddress) { if (anAddress) Standard::Free((Standard_Address&)anAddress); } // Methods PUBLIC // Partition_Loop2d(); void Init(const TopoDS_Face& F) ; void AddConstEdge(const TopoDS_Edge& E) ; void AddSectionEdge(const TopoDS_Edge& E) ; void Perform() ; const TopTools_ListOfShape& NewWires() const; void WiresToFaces(const BRepAlgo_Image& EdgeImage) ; const TopTools_ListOfShape& NewFaces() const; protected: // Methods PROTECTED // // Fields PROTECTED // private: // Methods PRIVATE // // Fields PRIVATE // TopoDS_Face myFace; TopAbs_Orientation myFaceOri; TopTools_ListOfShape myConstEdges; TopTools_ListOfShape myNewWires; TopTools_ListOfShape myNewFaces; TopTools_ListOfShape myInternalWL; TopTools_MapOfShape mySectionEdges; }; // other Inline functions and methods (like "C++: function call" methods) // #endif netgen-6.2.1804/libsrc/occ/Partition_Spliter.cxx0000644000175000017500000021013413272137567020227 0ustar kurtkurt#ifdef OCCGEOMETRY // GEOM PARTITION : partition algorithm // // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org // // // // File : Partition_Spliter.cxx // Author : Benedicte MARTIN // Module : GEOM // $Header: /cvs/netgen/netgen/libsrc/occ/Partition_Spliter.cxx,v 1.7 2008/03/31 14:20:28 wabro Exp $ //using namespace std; #include #include "Partition_Inter2d.hxx" #include "Partition_Inter3d.hxx" #include "Partition_Loop2d.hxx" #include "Partition_Loop3d.hxx" #include "Partition_Spliter.ixx" #include "utilities.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef DEB //# define PART_PERF #endif #ifdef PART_PERF # include #endif //======================================================================= //function : isClosed //purpose : check id a shape is closed, ie is a solid or a closed shell //======================================================================= static Standard_Boolean isClosed(const TopoDS_Shape& theShape) { Standard_Boolean isClosed = (theShape.ShapeType() == TopAbs_SOLID); if (!isClosed && theShape.ShapeType() == TopAbs_SHELL) { TopTools_IndexedDataMapOfShapeListOfShape MEF; TopExp::MapShapesAndAncestors(theShape, TopAbs_EDGE, TopAbs_FACE, MEF); for (Standard_Integer i=1; isClosed && i<=MEF.Extent(); ++i) isClosed = ( MEF(i).Extent() != 1 ); } return isClosed; } //======================================================================= //function : Partition_Spliter //purpose : constructor //======================================================================= Partition_Spliter::Partition_Spliter() { myAsDes = new BRepAlgo_AsDes; Clear(); } //======================================================================= //function : AddTool //purpose : add cutting tool that will _NOT_ be in result //======================================================================= void Partition_Spliter::AddTool(const TopoDS_Shape& S) { if (S.ShapeType() < TopAbs_SOLID) { // compound or compsolid TopoDS_Iterator it (S); for (; it.More(); it.Next()) { AddTool( it.Value()); myFaceShapeMap.Bind( it.Value(), S ); // to know compound by shape } return; } for (TopExp_Explorer exp(S,TopAbs_FACE); exp.More(); exp.Next()) { myMapTools.Add(exp.Current()); myFaceShapeMap.Bind( exp.Current(), S ); } if (isClosed( S )) myClosedShapes.Add( S ); } //======================================================================= //function : AddShape //purpose : add object Shape to be splited //======================================================================= void Partition_Spliter::AddShape(const TopoDS_Shape& S) { if (S.ShapeType() < TopAbs_SOLID) { // compound or compsolid TopoDS_Iterator it (S); for (; it.More(); it.Next()) { AddShape( it.Value()); myFaceShapeMap.Bind( it.Value(), S ); // to know compound by shape } return; } TopExp_Explorer exp(S,TopAbs_FACE); if (!exp.More()) { // do not split edges and vertices //myBuilder.Add( myShape, S ); return; } Standard_Integer nbFacesBefore = myMapFaces.Extent(); // not to add twice the same S for (; exp.More(); exp.Next()) { const TopoDS_Shape & aFace = exp.Current(); if ( ! myFaceShapeMap.IsBound( aFace )) // keep shape of tool face added as object myFaceShapeMap.Bind( aFace, S ); if (myMapFaces.Add( aFace )) myImagesFaces.SetRoot( aFace ); } if (nbFacesBefore == myMapFaces.Extent()) return; // solids must be processed before all if (S.ShapeType() == TopAbs_SOLID) myListShapes.Prepend(S); else myListShapes.Append(S); if (isClosed( S )) myClosedShapes.Add( S ); } //======================================================================= //function : Shape //purpose : return resulting compound //======================================================================= TopoDS_Shape Partition_Spliter::Shape() const { return myShape; } //======================================================================= //function : Clear //purpose : clear fields //======================================================================= void Partition_Spliter::Clear() { myDoneStep = TopAbs_SHAPE; myListShapes.Clear(); myMapFaces.Clear(); myMapTools.Clear(); myEqualEdges.Clear(); myNewSection.Clear(); myClosedShapes.Clear(); mySharedFaces.Clear(); myWrappingSolid.Clear(); myFaceShapeMap.Clear(); myInternalFaces.Clear(); myIntNotClFaces.Clear(); myAsDes->Clear(); myImagesFaces.Clear(); myImagesEdges.Clear(); myImageShape.Clear(); // myInter3d = Partition_Inter3d(myAsDes); Partition_Inter3d hinter3d (myAsDes); myInter3d = hinter3d; myAddedFacesMap.Clear(); } //======================================================================= //function : Compute //purpose : produce a result //======================================================================= void Partition_Spliter::Compute(const TopAbs_ShapeEnum Limit) { if ((Limit != TopAbs_SHAPE && myDoneStep == Limit) || (Limit == TopAbs_SHAPE && myDoneStep == TopAbs_SOLID)) return; myBuilder.MakeCompound( myShape ); TopTools_MapIteratorOfMapOfShape it; TopTools_ListIteratorOfListOfShape itl; TopExp_Explorer exp; #ifdef PART_PERF OSD_Chronometer aCron; #endif if (myDoneStep > TopAbs_VERTEX) { TopTools_ListOfShape aListFaces; aListFaces = myImagesFaces.Roots(); for (it.Initialize(myMapTools); it.More(); it.Next()) aListFaces.Append(it.Key()); #ifdef PART_PERF aCron.Start(); #endif //----------------------------------------------- // Intersection between faces //----------------------------------------------- // result is in myAsDes as a map Face - list of new edges; // special care is done for section edges, same domain faces and vertices: // data about them is inside myInter3d myInter3d.CompletPart3d(aListFaces, myFaceShapeMap); #ifdef PART_PERF MESSAGE("+++ CompletPart3d()"); aCron.Show( cout ); aCron.Reset(); aCron.Start(); #endif //----------------------------------------------- // Intersection of edges //----------------------------------------------- // add tool faces which must be reconstructed to myMapFaces too FindToolsToReconstruct(); #ifdef PART_PERF MESSAGE("+++ FindToolsToReconstruct()"); aCron.Show( cout ); aCron.Reset(); aCron.Start(); #endif // add existing vertices to edges of object faces in myAsDes TopTools_MapOfShape DoneEM; for ( it.Initialize(myMapFaces); it.More(); it.Next()) { const TopoDS_Shape& F = it.Key(); TopoDS_Face FForward = TopoDS::Face(F.Oriented(TopAbs_FORWARD)); for (exp.Init(FForward,TopAbs_EDGE); exp.More(); exp.Next()) { const TopoDS_Edge& E = TopoDS::Edge( exp.Current() ); myAsDes->Add(FForward,E); if (DoneEM.Add(E)) { TopoDS_Iterator itV(E); for (; itV.More(); itV.Next()) { const TopoDS_Vertex& V = TopoDS::Vertex( itV.Value()); myAsDes->Add(E, myInter3d.ReplaceSameDomainV( V, E )); } } } } // intersect edges that are descendants of a face in myAsDes TopTools_MapOfShape& Modif = myInter3d.TouchedFaces(); for ( it.Initialize(Modif); it.More(); it.Next()) { const TopoDS_Face& F = TopoDS::Face(it.Key()); Partition_Inter2d::CompletPart2d (myAsDes, F, myInter3d.NewEdges()); } // now myAsDes contains also new vertices made at edge intersection as // descendant of edges both new and old myDoneStep = TopAbs_VERTEX; #ifdef PART_PERF MESSAGE("+++ CompletPart2d()"); aCron.Show( cout ); aCron.Reset(); aCron.Start(); #endif } // if (myDoneStep > TopAbs_VERTEX) if (Limit == TopAbs_VERTEX) { // add new vertices to myShape for ( it.Initialize( myInter3d.NewEdges() ); it.More(); it.Next()) { if (! myAsDes->HasDescendant( it.Key() )) continue; itl.Initialize( myAsDes->Descendant( it.Key() )); for (; itl.More(); itl.Next()) myBuilder.Add ( myShape, itl.Value() ); } return; } if (myDoneStep > TopAbs_EDGE) { //----------------------------------------------- //----------------------------------------------- // ------- Reconstruction of all the edges.------ //----------------------------------------------- //----------------------------------------------- // ============== // cut new edges // ============== TopTools_ListOfShape LSE; // all edge splits for ( it.Initialize(myInter3d.NewEdges()); it.More(); it.Next()) { TopoDS_Vertex V1,V2; TopoDS_Edge EE = TopoDS::Edge(it.Key()); TopTools_ListOfShape aListV, aListF; aListV = myAsDes->Descendant(EE); // intersection vertices aListF = myAsDes->Ascendant(EE); // intersected faces if (aListV.IsEmpty()) continue; // new edge does not intersect any other edge // Add end vertices to new edges only if // one face is Tool and the other is Shape Standard_Boolean isTool1 = ! myMapFaces.Contains( aListF.First() ); Standard_Boolean isTool2 = ! myMapFaces.Contains( aListF.Last() ); if (isTool1 || isTool2) { TopExp::Vertices(EE,V1,V2); Standard_Real Tol = Max (BRep_Tool::Tolerance( V1 ), BRep_Tool::Tolerance( V2 )); gp_Pnt P1 = BRep_Tool::Pnt(V1); gp_Pnt P2 = BRep_Tool::Pnt(V2); Standard_Boolean AddV1 = Standard_True; Standard_Boolean AddV2 = Standard_True; // add only if there is no intersection at end vertex for (itl.Initialize(aListV); itl.More(); itl.Next()) { const TopoDS_Vertex& Ve = TopoDS::Vertex(itl.Value()) ; Standard_Real Tol2 = Max ( Tol, BRep_Tool::Tolerance( Ve )); Tol2 *= Tol2; gp_Pnt P = BRep_Tool::Pnt(Ve); if (AddV1 && P.SquareDistance(P1) <= Tol2) AddV1 = Standard_False; if (AddV2 && P.SquareDistance(P2) <= Tol2) AddV2 = Standard_False; } if (AddV1) { aListV.Append(V1); myAsDes->Add(EE,V1); } if (AddV2) { aListV.Append(V2); myAsDes->Add(EE,V2); } } // cut new edges Standard_Integer NbV=aListV.Extent() ; if (NbV>1 || (NbV==1 && V1.IsSame(V2)) ) { TopTools_ListOfShape LNE; MakeEdges (EE,aListV, LNE); myImagesEdges.Bind(EE,LNE); LSE.Append( LNE ); } } // ============== // cut old edges // ============== for ( it.Initialize(myMapFaces); it.More(); it.Next()) { for (exp.Init( it.Key(), TopAbs_EDGE); exp.More(); exp.Next()) { const TopoDS_Edge& EE = TopoDS::Edge( exp.Current() ); if ( myImagesEdges.HasImage( EE )) continue; TopTools_ListOfShape LNE; const TopTools_ListOfShape& aListVV = myAsDes->Descendant(EE); MakeEdges (EE, aListVV, LNE); myImagesEdges.Bind(EE,LNE); LSE.Append( LNE ); } } #ifdef PART_PERF MESSAGE("+++ Cut Edges"); aCron.Show( cout ); aCron.Reset(); aCron.Start(); #endif // process same domain section edges MergeEqualEdges( LSE ); myDoneStep = TopAbs_EDGE; #ifdef PART_PERF MESSAGE("+++ MergeEqualEdges()"); aCron.Show( cout ); aCron.Reset(); aCron.Start(); #endif } // if (myDoneStep > TopAbs_EDGE) if (Limit == TopAbs_EDGE) { // add splits of old edges TopTools_ListIteratorOfListOfShape itNE; for (itl.Initialize( myListShapes );itl.More();itl.Next()) { if (myMapTools.Contains( itl.Value() )) continue; // skip tool faces for ( exp.Init( itl.Value(), TopAbs_EDGE ); exp.More(); exp.Next()) { itNE.Initialize( myImagesEdges.Image( exp.Current() )); for ( ; itNE.More(); itNE.Next()) myBuilder.Add ( myShape, itNE.Value() ); } } // add splits of new edges for ( it.Initialize( myInter3d.NewEdges() ); it.More(); it.Next()) { itNE.Initialize( myImagesEdges.Image( it.Key() )); for (; itNE.More(); itNE.Next()) myBuilder.Add ( myShape, itNE.Value() ); } return; } //----------------------------------------------- // split faces //----------------------------------------------- if (myDoneStep > TopAbs_FACE) { for (itl.Initialize(myListShapes);itl.More();itl.Next()) { TopoDS_Shape FacesComp = MakeFaces ( itl.Value()); // there is a cunning here: myImagesFaces keeps faces made by Loop2d // but some of them may be replaced with splits of same domain face // and myImageShape keeps ultimate result myImageShape.Bind( itl.Value(), FacesComp ); } myDoneStep = TopAbs_FACE; #ifdef PART_PERF MESSAGE("+++ MakeFaces()"); aCron.Show( cout ); aCron.Reset(); aCron.Start(); #endif } if (Limit == TopAbs_WIRE || Limit == TopAbs_FACE) { for (itl.Initialize(myListShapes);itl.More();itl.Next()) { if ( myMapTools.Contains( itl.Value() )) continue; // no result needed for a tool face const TopoDS_Shape& FacesComp = myImageShape.Image( itl.Value() ).First(); for ( exp.Init( FacesComp, Limit); exp.More(); exp.Next()) myBuilder.Add ( myShape, exp.Current()); } return; } //----------------------------------------------- // split and add solids and shells //----------------------------------------------- Standard_Boolean makeSolids = (Limit == TopAbs_SHAPE || Limit < TopAbs_SHELL); for (itl.Initialize(myListShapes);itl.More();itl.Next()) { const TopoDS_Shape & S = itl.Value(); if (S.ShapeType() > TopAbs_SHELL) continue; TopTools_ListOfShape NSL; // new shape list MakeShells (S , NSL); if (makeSolids && S.ShapeType() == TopAbs_SOLID ) MakeSolids( S, NSL ); // store new shells or solids TopTools_ListIteratorOfListOfShape itNSL (NSL); for ( ; itNSL.More(); itNSL.Next()) myBuilder.Add (myShape, itNSL.Value()); } #ifdef PART_PERF MESSAGE("+++ MakeShells()"); aCron.Show( cout ); #endif //----------------------------------------------- // add split faces //----------------------------------------------- for (itl.Initialize(myListShapes);itl.More();itl.Next()) { const TopoDS_Shape & S = itl.Value(); if (S.ShapeType() != TopAbs_FACE || myMapTools.Contains( S )) continue; TopoDS_Iterator itS( myImageShape.Image(S).First() ); for (; itS.More(); itS.Next()) if (! myAddedFacesMap.Contains( itS.Value() )) myBuilder.Add (myShape, itS.Value()); } myDoneStep = makeSolids ? TopAbs_SOLID : TopAbs_SHELL; } //======================================================================= //function : MakeSolids //purpose : make solids out of Shells //======================================================================= void Partition_Spliter::MakeSolids(const TopoDS_Shape & theSolid, TopTools_ListOfShape & theShellList) { // for a solid wrapping other shells or solids without intersection, // it is necessary to find shells making holes in it TopTools_ListOfShape aNewSolids; // result TopTools_ListOfShape aHoleShells; TopoDS_Shape anInfinitePointShape; Standard_Boolean isWrapping = myWrappingSolid.Contains( theSolid ); if (!isWrapping && !theShellList.IsEmpty()) { // check if theSolid initially has internal shells TopoDS_Iterator aShellExp (theSolid); aShellExp.Next(); isWrapping = aShellExp.More(); } TopTools_ListIteratorOfListOfShape aShellIt(theShellList); for ( ; aShellIt.More(); aShellIt.Next()) { const TopoDS_Shape & aShell = aShellIt.Value(); // check if a shell is a hole if (isWrapping && IsInside (anInfinitePointShape, aShell)) aHoleShells.Append( aShell ); else { // make a solid from a shell TopoDS_Solid Solid; myBuilder.MakeSolid( Solid ); myBuilder.Add (Solid, aShell); aNewSolids.Append (Solid); } } // find an outer shell most close to each hole shell TopTools_DataMapOfShapeShape aInOutMap; for (aShellIt.Initialize( aHoleShells ); aShellIt.More(); aShellIt.Next()) { const TopoDS_Shape & aHole = aShellIt.Value(); TopTools_ListIteratorOfListOfShape aSolisIt (aNewSolids); for ( ; aSolisIt.More(); aSolisIt.Next()) { const TopoDS_Shape & aSolid = aSolisIt.Value(); if (! IsInside( aHole, aSolid )) continue; if ( aInOutMap.IsBound (aHole)) { const TopoDS_Shape & aSolid2 = aInOutMap( aHole ); if ( IsInside( aSolid, aSolid2 )) { aInOutMap.UnBind( aHole ); aInOutMap.Bind ( aHole, aSolid ); } } else aInOutMap.Bind ( aHole, aSolid ); } // add aHole to a solid if (aInOutMap.IsBound( aHole )) myBuilder.Add ( aInOutMap( aHole ), aHole ); } theShellList.Clear(); theShellList.Append( aNewSolids ); } //======================================================================= //function : FindFacesInside //purpose : return compound of faces of other shapes that are // inside . // is an object shape. // makes avoid faces that do not form a // closed shell // makes return already added faces //======================================================================= TopoDS_Shape Partition_Spliter::FindFacesInside(const TopoDS_Shape& theShape, const Standard_Boolean CheckClosed, const Standard_Boolean All) { // ================================================ // check if internal faces have been already found // ================================================ TopExp_Explorer expl; if (myInternalFaces.IsBound( theShape )) { TopoDS_Shape aIntFComp = myInternalFaces.Find ( theShape ); TopoDS_Shape aIntRemFComp = myIntNotClFaces.Find ( theShape ); expl.Init( aIntRemFComp, TopAbs_FACE); if (CheckClosed || !expl.More()) return aIntFComp; TopoDS_Compound C; myBuilder.MakeCompound( C ); // add removed faces for (; expl.More(); expl.Next()) myBuilder.Add( C, expl.Current() ); // add good internal faces for (expl.Init( aIntFComp, TopAbs_FACE); expl.More(); expl.Next()) myBuilder.Add( C, expl.Current() ); return C; } // =================================== // get data for internal faces search // =================================== // compound of split faces of theShape const TopoDS_Shape& CSF = myImageShape.Image(theShape).First(); TopTools_MapOfShape MSE, MFP; TopTools_DataMapOfShapeListOfShape DMSEFP; TopTools_MapIteratorOfMapOfShape itm; TopTools_ListOfShape EmptyL; // MSE filling: map of new section edges of CSF for (expl.Init(CSF,TopAbs_EDGE); expl.More(); expl.Next()) { const TopoDS_Shape & resE = expl.Current() ; if (myNewSection.Contains( resE )) // only new edges MSE.Add(resE); } // DMEF: map edge of CSF - faces of CSF TopTools_IndexedDataMapOfShapeListOfShape DMEF; TopExp::MapShapesAndAncestors(CSF, TopAbs_EDGE, TopAbs_FACE, DMEF); // Fill // 1. MFP - a map of faces to process: map of resulting faces except // those of theShape; we`ll add to C those of them which are inside CSF // 2. DMSEFP - edge of MSE => faces of MFP TopTools_ListIteratorOfListOfShape itl; for (itl.Initialize(myListShapes);itl.More();itl.Next()) { const TopoDS_Shape& aShape = itl.Value(); if ( theShape.IsSame( aShape )) continue; // fill maps // iterate on split faces of aShape TopoDS_Iterator itF ( myImageShape.Image(aShape).First() ); for ( ; itF.More(); itF.Next()) { const TopoDS_Shape& sf = itF.Value(); MFP.Add(sf); // iterate on edges of split faces of aShape, // add to DMSEFP edges that are new for (expl.Init( sf, TopAbs_EDGE ); expl.More(); expl.Next()) { TopoDS_Shape se = expl.Current(); if ( MSE.Contains(se)) {// section edge if (!DMSEFP.IsBound(se)) DMSEFP.Bind(se,EmptyL); DMSEFP(se).Append(sf); } } } } // add tool faces having section edges on faces of theShape to MFP and DMSEFP; // such tool faces need not to be reconstructed and so they are not in myListShapes for (itm.Initialize(myMapTools); itm.More(); itm.Next()) { const TopoDS_Shape & aToolFace = itm.Key(); if (myMapFaces.Contains( aToolFace )) continue; MFP.Add(aToolFace); for (expl.Init( aToolFace, TopAbs_EDGE ); expl.More(); expl.Next()) { TopoDS_Shape se = expl.Current(); if ( MSE.Contains( se )) {// section edge if (!DMSEFP.IsBound( se )) DMSEFP.Bind( se, EmptyL ); DMSEFP( se ).Append( aToolFace ); } } } // =========================== // find faces inside theShape // =========================== Standard_Boolean skipAlreadyAdded = Standard_False; Standard_Boolean GoodOri, inside; Standard_Real dot; TopTools_ListOfShape KeepFaces; TopTools_DataMapIteratorOfDataMapOfShapeListOfShape Mapit; // iterate on section edges, check faces of other shapes // sharing section edges and put internal faces to KeepFaces for (Mapit.Initialize(DMSEFP); Mapit.More() ; Mapit.Next() ) { // a new edge of theShape const TopoDS_Edge& E = TopoDS::Edge (Mapit.Key()); // an original edge of which E is a split const TopoDS_Edge& OrigE = TopoDS::Edge ( myImagesEdges.Root( E )); // does OrigE itself splits a face Standard_Boolean isSectionE = myInter3d.IsSectionEdge ( OrigE ); // split faces of other shapes sharing E TopTools_ListOfShape& LSF = DMSEFP.ChangeFind(E); itl.Initialize( LSF ); while (itl.More()) { // a split faces of other shape TopoDS_Face aFace1 = TopoDS::Face(itl.Value()); // remove aFace1 form DMSEFP and MFP LSF.Remove( itl ); // == itl.Next(); if (!MFP.Remove( aFace1 )) continue; // was not is MFP ( i.e already checked) // check if aFace1 was already added to 2 shells if (!All && myAddedFacesMap.Contains( aFace1 ) && myAddedFacesMap.Contains( aFace1.Reversed() )) { skipAlreadyAdded = Standard_True; continue; } // find another face which originates from the same face as aFace1: // usually aFace2 is internal if aFace1 is not and vice versa TopoDS_Shape anOrigFace = aFace1; if (myImagesFaces.IsImage(aFace1)) anOrigFace = myImagesFaces.Root(aFace1); TopoDS_Shape aFace2; if ( !isSectionE ) { while (itl.More()) { aFace2 = itl.Value(); if (!MFP.Contains( aFace2 )) { LSF.Remove( itl ); continue; } if (anOrigFace.IsSame( myImagesFaces.Root( aFace2 ))) break; itl.Next(); } if (itl.More()) { // aFace2 found, remove it from maps LSF.Remove( itl ); MFP.Remove(aFace2); } else aFace2.Nullify(); itl.Initialize( LSF ); } // check that anOrigFace is not same domain with CSF faces it intersects const TopTools_ListOfShape& FL = DMEF.FindFromKey(E); //faces of CSF sharing E const TopoDS_Shape& origF1 = myImagesFaces.Root(FL.First()); const TopoDS_Shape& origF2 = myImagesFaces.Root(FL.Last()); Standard_Boolean sameDom1 = anOrigFace.IsSame( origF1 ); Standard_Boolean sameDom2 = anOrigFace.IsSame( origF2 ); if (!(sameDom1 || sameDom2) && myInter3d.HasSameDomainF( anOrigFace )) { sameDom1 = myInter3d.IsSameDomainF( anOrigFace, origF1); if (origF1 == origF2) sameDom2 = sameDom1; else myInter3d.IsSameDomainF( anOrigFace, origF2); } if (sameDom1 && sameDom2) continue; if ((sameDom1 || sameDom2)) { inside = Partition_Loop3d::IsInside (E, TopoDS::Face(FL.First()), TopoDS::Face(FL.Last()), 1, dot, GoodOri); if (inside || (dot + Precision::Angular() >= 1.0)) continue; // E is convex between origF1 and origF2 or they are tangent } // keep one of found faces //face of CSF sharing E const TopoDS_Shape& aShapeFace = sameDom1 ? FL.Last() : FL.First(); // analyse aFace1 state inside = Partition_Loop3d::IsInside (E, TopoDS::Face(aShapeFace), aFace1, 1, dot, GoodOri); if (inside && isSectionE) { // aFace1 must be tested with both adjacent faces of CSF const TopoDS_Shape& aShapeFace2 = sameDom1 ? FL.First() : FL.Last(); if (aShapeFace2 != aShapeFace) inside = Partition_Loop3d::IsInside (E, TopoDS::Face(aShapeFace2), aFace1, 1, dot, GoodOri); } // store internal face if (inside) KeepFaces.Append(aFace1); else if (!aFace2.IsNull()) { if (dot + Precision::Angular() >= 1.0) { // aFace2 state is not clear, it will be analysed alone, // put it back to the maps MFP.Add( aFace2 ); LSF.Append( aFace2 ); } else KeepFaces.Append(aFace2); } } } // =================================================== // add not distributed faces connected with KeepFaces // =================================================== // ultimate list of internal faces TopTools_ListOfShape KeptFaces; // add to MFP unsplit tool faces as well, they may be connected with // tool faces interfering with theShape for ( itm.Initialize(myMapTools); itm.More(); itm.Next() ) { const TopoDS_Shape& aToolFace = itm.Key(); if (!myImageShape.HasImage(aToolFace)) MFP.Add (aToolFace); } if (MFP.IsEmpty()) KeptFaces.Append (KeepFaces); while (!KeepFaces.IsEmpty()) { // KeepEdges : map of edges of faces kept last time TopTools_IndexedMapOfShape KeepEdges; for ( itl.Initialize(KeepFaces); itl.More(); itl.Next() ) { TopExp::MapShapes( itl.Value(), TopAbs_EDGE, KeepEdges); KeptFaces.Append( itl.Value() ); } KeepFaces.Clear(); // keep faces connected with already kept faces by KeepEdges for ( itm.Initialize(MFP); itm.More(); itm.Next() ) { const TopoDS_Shape& FP = itm.Key(); for (expl.Init(FP,TopAbs_EDGE); expl.More(); expl.Next()) { const TopoDS_Shape& se = expl.Current(); if (!MSE.Contains(se) && KeepEdges.Contains(se) ) { KeepFaces.Append(FP); MFP.Remove(FP); break; } } } } // =============================================================== // here MFP contains faces outer of theShape and those of shapes // which do not interfere with theShape at all and between which // there may be those wrapped by theShape and whose faces may be // needed to be returned as well // =============================================================== Standard_Boolean isSolid = (theShape.ShapeType() == TopAbs_SOLID); if (All || isSolid) // All is for sub-result removal { // loop on not used faces; checked faces will be removed from MFP // during the loop for ( itm.Initialize( MFP ); itm.More(); itm.Next() ) { const TopoDS_Shape & aFace = itm.Key(); // a shape which aFace originates from TopoDS_Shape anOrigShape = GetOriginalShape( aFace ); // find out if all split faces of anOrigShape are not in MFP // and by the way remove them from MFP Standard_Boolean isAllOut = Standard_True; TopoDS_Shape aSplitFaces = anOrigShape; if (myImageShape.HasImage(anOrigShape)) aSplitFaces = myImageShape.Image(anOrigShape).First(); TopTools_ListOfShape aSplitFaceL; // faces candidate to be kept for (expl.Init( aSplitFaces, TopAbs_FACE ); expl.More(); expl.Next()) { const TopoDS_Shape & aSpFace = expl.Current(); // a tool face which became object has image but the whole tool shape has not if (myImageShape.HasImage( aSpFace )) { TopExp_Explorer exF (myImageShape.Image( aSpFace ).First(), TopAbs_FACE ); for ( ; exF.More(); exF.Next() ) { aSplitFaceL.Append( exF.Current() ); if ( ! MFP.Remove( exF.Current() ) && isAllOut ) // a shared face might be removed from MFP during a prev loop isAllOut = mySharedFaces.Contains( exF.Current() ); } } else { aSplitFaceL.Append( aSpFace ); if ( ! MFP.Remove( aSpFace ) && isAllOut) // a shared face might be removed from MFP during a prev loop isAllOut = mySharedFaces.Contains( aSpFace ); } } itm.Initialize( MFP ); // iterate remaining faces if ( !isAllOut ) continue; // classify anOrigShape against theShape if (IsInside (anOrigShape, theShape)) { if (isSolid && myClosedShapes.Contains( anOrigShape )) // to make a special care at solid reconstruction myWrappingSolid.Add ( theShape ); // keep faces of an internal shape anOrigShape KeptFaces.Append( aSplitFaceL ); } } } // ==================================================== // check if kept faces form a shell without free edges // ==================================================== DMEF.Clear(); // edge - kept faces MFP.Clear(); // reuse it for wrong faces if (CheckClosed) { for (itl.Initialize(KeptFaces); itl.More(); itl.Next() ) TopExp::MapShapesAndAncestors(itl.Value(), TopAbs_EDGE, TopAbs_FACE, DMEF); Standard_Integer i, nb = DMEF.Extent(); Standard_Boolean isClosed = Standard_False; while (!isClosed) { isClosed = Standard_True; for (i=1; isClosed && i<=nb; ++i) { const TopoDS_Shape& E = DMEF.FindKey( i ); if (! BRep_Tool::Degenerated( TopoDS::Edge( E )) && ! MSE.Contains( E )) isClosed = ( DMEF(i).Extent() != 1 ); } if (!isClosed) { const TopoDS_Shape& F = DMEF.FindFromIndex( i-1 ).First(); // bad face MFP.Add( F ); // remove bad face from DMEF for (expl.Init( F, TopAbs_EDGE); expl.More(); expl.Next()) { const TopoDS_Shape& E = expl.Current(); TopTools_ListOfShape& FL = DMEF.ChangeFromKey( E ); for (itl.Initialize( FL ); itl.More(); itl.Next() ) { if ( F.IsSame( itl.Value() )) { FL.Remove( itl ); break; } } } } } } // ============== // make a result // ============== TopoDS_Compound C; // compound of removed internal faces TopoDS_Compound CNotCl; myBuilder.MakeCompound(C); myBuilder.MakeCompound(CNotCl); // add to compounds for (itl.Initialize(KeptFaces); itl.More(); itl.Next() ) { TopoDS_Shape & aIntFace = itl.Value(); if (! MFP.Contains( aIntFace )) myBuilder.Add( C, aIntFace); else myBuilder.Add( CNotCl, aIntFace); } if (!skipAlreadyAdded && CheckClosed) { myInternalFaces.Bind( theShape, C ); myIntNotClFaces.Bind( theShape, CNotCl ); } return C; } //======================================================================= //function : MakeShell //purpose : split S into compound of shells //======================================================================= void Partition_Spliter::MakeShells(const TopoDS_Shape& S, TopTools_ListOfShape& NS) { Partition_Loop3d ShellMaker; // get compound of split faces of S const TopoDS_Shape& FacesComp = myImageShape.Image(S).First(); ShellMaker.AddConstFaces( FacesComp ); // add split faces inside S if (myClosedShapes.Contains( S )) { TopoDS_Shape InternalFacesComp = FindFacesInside(S, Standard_True); ShellMaker.AddSectionFaces( InternalFacesComp ); } NS = ShellMaker.MakeShells( myAddedFacesMap ); // Add faces added to new shell to myAddedFacesMap: // avoid rebuilding twice commont part of 2 solids. TopTools_ListIteratorOfListOfShape itS(NS); while ( itS.More()) { TopExp_Explorer expF (itS.Value(), TopAbs_FACE); for (; expF.More(); expF.Next()) myAddedFacesMap.Add (expF.Current()); itS.Next(); } } //======================================================================= //function : findEqual //purpose : compare edges of EL1 against edges of EL2, // Result is in EMM binding EL1 edges to list of equal edges. // Edges are considered equall only if they have same vertices. // ==True makes consider same edges as equal // Put in all equal edges //======================================================================= static void findEqual (const TopTools_ListOfShape& EL1, const TopTools_ListOfShape& EL2, const Standard_Boolean addSame, TopTools_DataMapOfShapeListOfShape& EEM, TopTools_MapOfShape& AllEqMap) { // map vertices to edges for EL2 TopTools_DataMapOfShapeListOfShape VEM; TopTools_ListIteratorOfListOfShape itE1, itE2(EL2); TopoDS_Iterator itV; TopTools_ListOfShape emptyL; for (; itE2.More(); itE2.Next()) { for (itV.Initialize( itE2.Value() ); itV.More(); itV.Next()) { const TopoDS_Shape& V = itV.Value(); if (! VEM.IsBound( V ) ) VEM.Bind( V, emptyL); VEM( V ).Append( itE2.Value()); } } gp_Vec D1, D2; gp_Pnt P; Standard_Real f,l,u,tol; Handle(Geom_Curve) C1, C2; Extrema_ExtPC Extrema; TopoDS_Vertex V1, V2, V3, V4; AllEqMap.Clear(); for (itE1.Initialize(EL1); itE1.More(); itE1.Next()) { const TopoDS_Edge& E1 = TopoDS::Edge( itE1.Value()); if (BRep_Tool::Degenerated( E1 ) || AllEqMap.Contains (E1)) continue; TopExp::Vertices( E1, V1, V2 ); if (VEM.IsBound(V1)) itE2.Initialize( VEM(V1) ); for (; itE2.More(); itE2.Next()) { const TopoDS_Edge& E2 = TopoDS::Edge( itE2.Value()); if (BRep_Tool::Degenerated( E2 ) || AllEqMap.Contains (E2)) continue; if (E1.IsSame(E2)) { if (!addSame) continue; } else { TopExp::Vertices( E2, V3, V4); if (!V2.IsSame(V4) && !V2.IsSame(V3)) continue; // E1 and E2 have same vertices // check D1 at end points. C2 = BRep_Tool::Curve( E2, f,l); C1 = BRep_Tool::Curve( E1, f,l); u = BRep_Tool::Parameter(V1,E1); C1->D1(u, P, D1); u = BRep_Tool::Parameter(V1.IsSame(V3) ? V3 : V4, E2); C2->D1(u, P, D2); D1.Normalize(); D2.Normalize(); if (Abs(D1*D2) + Precision::Angular() < 1.0) continue; if (! V1.IsSame(V2)) { u = BRep_Tool::Parameter(V2,E1); C1->D1(u, P, D1); u = BRep_Tool::Parameter(V2.IsSame(V3) ? V3 : V4, E2); C2->D1(u, P, D2); D1.Normalize(); D2.Normalize(); if (Abs(D1*D2) + Precision::Angular() < 1.0) continue; } // check distance at a couple of internal points tol = Max(BRep_Tool::Tolerance(E1), BRep_Tool::Tolerance(E2)); GeomAdaptor_Curve AC1(C1); Extrema.Initialize(AC1,f,l); Standard_Boolean ok = Standard_True, hasMin = Standard_False; BRep_Tool::Range( E2, f, l); Standard_Integer i=1, nbi=3; for (; iValue( f+(l-f)*i/nbi )); Standard_Integer j=1, nbj=Extrema.NbExt(); for (; j<=nbj && ok; ++j) { if (Extrema.IsMin(j)) { hasMin = Standard_True; // ok = Extrema.Value(j) <= tol; // V6.3 ok = Extrema.SquareDistance(j) <= tol; // V6.5 } } } if ( !hasMin || !ok) continue; } // bind E2 to E1 in EEM if (!EEM.IsBound(E1)) { EEM.Bind (E1, emptyL); AllEqMap.Add (E1); } EEM(E1).Append(E2); AllEqMap.Add (E2); } } } //======================================================================= //function : MakeFaces //purpose : split faces of S, return compound of new faces //======================================================================= TopoDS_Shape Partition_Spliter::MakeFaces (const TopoDS_Shape& S) { TopoDS_Compound C; myBuilder.MakeCompound(C); TopTools_ListIteratorOfListOfShape itl, itNE; TopExp_Explorer exp(S,TopAbs_FACE); for (; exp.More(); exp.Next()) { const TopoDS_Face& F = TopoDS::Face(exp.Current()); TopTools_ListOfShape LNF; if (myImagesFaces.HasImage( F )) { myImagesFaces.LastImage( F, LNF ); TopAbs_Orientation oriF = F.Orientation(); for ( itl.Initialize( LNF ); itl.More(); itl.Next()) itl.Value().Orientation( oriF ); } else { Partition_Loop2d loops; loops.Init(F); TopTools_IndexedMapOfShape EM; TopExp::MapShapes( F, TopAbs_EDGE, EM); TopTools_MapOfShape AddedEqualM, EqualSeamM; Standard_Boolean needRebuild = Standard_False; // add splits to loops // LE: old edges + new unsplit edges const TopTools_ListOfShape& LE = myAsDes->Descendant(F); for (itl.Initialize(LE); itl.More(); itl.Next()) { const TopoDS_Edge& E = TopoDS::Edge( itl.Value() ); Standard_Boolean isSectionE = myInter3d.IsSectionEdge(E); Standard_Boolean isNewE = !EM.Contains( E ); // LSE: list of split edges TopTools_ListOfShape LSE; myImagesEdges.LastImage(E,LSE); // splits of E or E itself for (itNE.Initialize(LSE); itNE.More(); itNE.Next()) { TopoDS_Edge NE = TopoDS::Edge( itNE.Value() ); Standard_Boolean isSameE = NE.IsSame ( E ); if ( isNewE || isSectionE || !isSameE) { if (AddedEqualM.Contains( NE )) { // a seam must be twice in a loop if (!BRep_Tool::IsClosed( E, F ) || !EqualSeamM.Add( NE )) continue; } if (isNewE) { if (isSectionE) { if ( ! myInter3d.IsSplitOn( NE, E, F) ) continue; } else { TopoDS_Vertex V1,V2; TopExp::Vertices(NE,V1,V2); const TopTools_ListOfShape& EL1 = myAsDes->Ascendant(V1); const TopTools_ListOfShape& EL2 = myAsDes->Ascendant(V2); if ( EL1.Extent() < 2 && EL2.Extent() < 2 ) continue; } } else { NE.Orientation( E.Orientation()); if (!isSameE) { // orient NE because it may be a split of other edge Standard_Real f,l,u; Handle(Geom_Curve) C3d = BRep_Tool::Curve( E,f,l ); Handle(Geom_Curve) NC3d = BRep_Tool::Curve( NE,f,l); if ( C3d != NC3d) { gp_Vec D1, ND1; gp_Pnt P; TopoDS_Vertex V = TopExp::FirstVertex(NE); u = BRep_Tool::Parameter(V,NE); NC3d->D1 (u, P, ND1); u = BRep_Tool::Parameter(V,E); C3d ->D1 (u, P, D1); if (ND1.Dot(D1) < 0) NE.Reverse(); } } } if (myEqualEdges.Contains( NE )) AddedEqualM.Add( NE ); needRebuild = Standard_True; } if (isNewE || isSectionE) myNewSection.Add( NE ); if (isNewE) loops.AddSectionEdge(NE); else loops.AddConstEdge(NE); } } //------------------- // Build the faces. //------------------- if (needRebuild) { loops.Perform(); loops.WiresToFaces(myImagesEdges); LNF = loops.NewFaces(); myImagesFaces.Bind(F,LNF); // replace the result faces that have already been built // during same domain faces reconstruction done earlier if (myInter3d.HasSameDomainF( F )) { // build map edge to same domain faces: EFM TopTools_IndexedDataMapOfShapeListOfShape EFM; TopTools_MapOfShape SDFM; // avoid doubling itl.Initialize( myInter3d.SameDomain( F )); for (; itl.More(); itl.Next()) { if ( !myImagesFaces.HasImage( itl.Value() )) continue; // loop on splits of a SD face TopTools_ListIteratorOfListOfShape itNF; itNF.Initialize (myImagesFaces.Image( itl.Value() )); for ( ; itNF.More(); itNF.Next()) { TopoDS_Shape SDF = itNF.Value(); if (myImagesFaces.HasImage( SDF )) // already replaced SDF = myImagesFaces.Image( SDF ).First(); if (SDFM.Add (SDF)) TopExp::MapShapesAndAncestors(SDF, TopAbs_EDGE, TopAbs_FACE, EFM); } } // do replace faces in the LNF TopTools_ListOfShape LOF; if ( !EFM.IsEmpty() ) itl.Initialize( LNF ); while (itl.More()) { const TopoDS_Shape& NF = itl.Value(); TopExp_Explorer expE ( NF, TopAbs_EDGE ); const TopoDS_Edge& E = TopoDS::Edge (expE.Current()); if (EFM.Contains( E )) { const TopTools_ListOfShape& SDFL = EFM.FindFromKey( E ); TopoDS_Shape SDF = SDFL.First(); Standard_Boolean GoodOri; Standard_Real dot; Partition_Loop3d::IsInside (E, TopoDS::Face(NF), TopoDS::Face(SDF), 1, dot, GoodOri); if (dot < 0) { // NF and SDF are on different side of E if (SDFL.Extent() == 1) { itl.Next(); continue; } else SDF = SDFL.Last(); // next face must be on the same side } gp_Vec V1 = Partition_Loop3d::Normal( E, TopoDS::Face( NF )); gp_Vec V2 = Partition_Loop3d::Normal( E, TopoDS::Face( SDF )); if (V1*V2 < 0) SDF.Reverse(); if (!myImagesFaces.HasImage( NF )) myImagesFaces.Bind( NF, SDF ); // mySharedFaces is used in FindFacesInside() mySharedFaces.Add( SDF ); LOF.Prepend ( SDF ); LNF.Remove (itl); } else itl.Next(); } LNF.Append (LOF); } } // if (needRebuild) else { LNF.Append( F ); myImagesFaces.Bind(F,LNF); } } // if (myImagesFaces.HasImage( F )) // fill the resulting compound for (itl.Initialize(LNF); itl.More(); itl.Next()) myBuilder.Add ( C, itl.Value()); } // loop on faces of S return C; } //======================================================================= //function : Tri //purpose : //======================================================================= static void Tri(const TopoDS_Edge& E, TopTools_SequenceOfShape& Seq, const Partition_Inter3d & theInter3d) { Standard_Boolean Invert = Standard_True; Standard_Real U1,U2; TopoDS_Vertex V1,V2; while (Invert) { Invert = Standard_False; for ( Standard_Integer i = 1; i < Seq.Length(); i++) { V1 = TopoDS::Vertex(Seq.Value(i)); V2 = TopoDS::Vertex(Seq.Value(i+1)); V1.Orientation(TopAbs_INTERNAL); V2.Orientation(TopAbs_INTERNAL); U1 = BRep_Tool::Parameter(V1,E); U2 = BRep_Tool::Parameter(V2,E); if (IsEqual(U1,U2)) { if (theInter3d.ReplaceSameDomainV( V1, E ).IsSame( V1 )) Seq.Remove(i+1); // remove V2 else Seq.Remove(i); i--; continue; } if (U2 < U1) { Seq.Exchange(i,i+1); Invert = Standard_True; } } } } //======================================================================= //function : MakeEdges //purpose : cut E by vertices VOnE, return list of new edges NE //======================================================================= void Partition_Spliter::MakeEdges (const TopoDS_Edge& E, const TopTools_ListOfShape& VOnE, TopTools_ListOfShape& NE ) const { TopoDS_Edge WE = E; WE.Orientation(TopAbs_FORWARD); Standard_Real U1,U2, f, l; TopoDS_Vertex V1,V2,VF,VL; BRep_Tool::Range(WE,f,l); TopExp::Vertices(WE,VF,VL); if (VOnE.Extent() < 3) { // do not rebuild not cut edge if (( VF.IsSame( VOnE.First() ) && VL.IsSame( VOnE.Last() )) || VL.IsSame( VOnE.First() ) && VF.IsSame( VOnE.Last() ) ) { NE.Append( E ); return; } } TopTools_SequenceOfShape SV; TopTools_ListIteratorOfListOfShape itv(VOnE); TopTools_MapOfOrientedShape VM( VOnE.Extent() ); for (; itv.More(); itv.Next()) if ( VM.Add( itv.Value() )) SV.Append(itv.Value()); Tri( WE, SV, myInter3d ); if (SV.Length() < 3) { // do not rebuild not cut edge if (( VF.IsSame( SV.First() ) && VL.IsSame( SV.Last() )) || VL.IsSame( SV.First() ) && VF.IsSame( SV.Last() ) ) { NE.Append( E ); return; } } Standard_Integer iVer, NbVer = SV.Length(); //---------------------------------------------------------------- // Construction of the new edges . //---------------------------------------------------------------- if (VF.IsSame(VL)) { // closed edge if (NbVer==1) SV.Append( SV.First() ); else if (!SV.First().IsSame(SV.Last())) { Standard_Boolean isFirst=0; Standard_Real minDU = 1.e10; TopoDS_Vertex endV = Partition_Inter2d::FindEndVertex(VOnE, f,l, E, isFirst,minDU); if (endV.IsSame(SV.First())) SV.Append(endV); else if (endV.IsSame(SV.Last())) SV.Prepend(endV); else MESSAGE ("END VERTEX IS IN SEQUNCE MIDDLE"); } NbVer = SV.Length(); } for (iVer=1; iVer < NbVer; iVer++) { V1 = TopoDS::Vertex(SV(iVer)); V2 = TopoDS::Vertex(SV(iVer+1)); TopoDS_Shape NewEdge = WE.EmptyCopied(); V1.Orientation(TopAbs_FORWARD); myBuilder.Add (NewEdge,V1); V2.Orientation(TopAbs_REVERSED); myBuilder.Add (NewEdge,V2); if (iVer==1) U1 = f; else { V1.Orientation(TopAbs_INTERNAL); U1=BRep_Tool::Parameter(V1,WE); } if (iVer+1 == NbVer) U2 = l; else { V2.Orientation(TopAbs_INTERNAL); U2=BRep_Tool::Parameter(V2,WE); } if (Abs(U1-U2) <= Precision::PConfusion()) { MESSAGE( "MakeEdges(), EQUAL PARAMETERS OF DIFFERENT VERTICES"); continue; } TopoDS_Edge EE=TopoDS::Edge(NewEdge); myBuilder.Range (EE,U1,U2); TopoDS_Edge NEdge = TopoDS::Edge(NewEdge); myBuilder.SameParameter(NEdge,Standard_False); Standard_Real tol = 1.0e-2; Standard_Boolean flag = BRep_Tool::SameParameter(NEdge); if (!flag) { BRepLib::SameParameter(NEdge,tol); } NE.Append(NEdge.Oriented(E.Orientation())); } } //======================================================================= //function : MergeEqualEdges //purpose : find equal edges, choose ones to keep and make // them have pcurves on all faces they are shared by //======================================================================= void Partition_Spliter::MergeEqualEdges (const TopTools_ListOfShape& LSE) { // find equal edges // map: edge - equal edges TopTools_DataMapOfShapeListOfShape EEM( LSE.Extent() ); findEqual (LSE, LSE, 0, EEM, myEqualEdges); TopTools_ListOfShape EEL; // list of equal edges TopTools_DataMapIteratorOfDataMapOfShapeListOfShape itM (EEM); for ( ; itM.More(); itM.Next()) { EEL = itM.Value(); EEL.Append( itM.Key() ); // choose an edge to keep, section edges have priority TopoDS_Edge EKeep; TopTools_ListIteratorOfListOfShape itEE (EEL); for (; itEE.More(); itEE.Next()) { EKeep = TopoDS::Edge( itEE.Value() ); const TopoDS_Edge& EKeepOrig = TopoDS::Edge( myImagesEdges.Root( EKeep )); if (myInter3d.IsSectionEdge( EKeepOrig )) break; } // update edge images and build pcurves Standard_Real f,l, tol; for (itEE.Initialize (EEL); itEE.More(); itEE.Next()) { const TopoDS_Edge& E = TopoDS::Edge( itEE.Value() ); if ( E.IsSame( EKeep )) continue; // 1. build pcurves of the kept edge on faces where replaced edges exist const TopoDS_Edge& EReplOrig = TopoDS::Edge( myImagesEdges.Root( E )); TopTools_ListOfShape FL; FL = myAsDes->Ascendant( EReplOrig ); Standard_Integer iFace, iFirstSectionFace = FL.Extent() + 1; // add faces where the replaced edge is a section edge if (myInter3d.IsSectionEdge( EReplOrig )) { TopTools_ListIteratorOfListOfShape seIt; seIt.Initialize( myInter3d.SectionEdgeFaces ( EReplOrig )); for ( ; seIt.More(); seIt.Next()) FL.Append( seIt.Value() ); } // loop on faces TopTools_ListIteratorOfListOfShape itF (FL); for ( iFace = 1 ; itF.More(); itF.Next(), ++iFace ) { const TopoDS_Face& F = TopoDS::Face( itF.Value()); Handle(Geom2d_Curve) pc = BRep_Tool::CurveOnSurface( EKeep, F, f,l); if (pc.IsNull()) { Handle(Geom_Curve) C3d = BRep_Tool::Curve( EKeep, f, l); C3d = new Geom_TrimmedCurve( C3d, f,l); pc = TopOpeBRepTool_CurveTool::MakePCurveOnFace (F,C3d,tol); if (pc.IsNull()) { MESSAGE (" CANNOT BUILD PCURVE "); } myBuilder.UpdateEdge( EKeep, pc, F, tol); } if (iFace >= iFirstSectionFace || !BRep_Tool::IsClosed( EReplOrig, F )) continue; // build the second pcurve for a seam TopoDS_Vertex V = TopExp::FirstVertex( EKeep ); Standard_Real Ukeep = BRep_Tool::Parameter( V, EKeep ); Standard_Real Urepl = BRep_Tool::Parameter( V, E ); TopoDS_Edge EReplRev = E; EReplRev.Reverse(); Handle(Geom2d_Curve) pcRepl1 = BRep_Tool::CurveOnSurface( E, F, f,l); Handle(Geom2d_Curve) pcRepl2 = BRep_Tool::CurveOnSurface( EReplRev, F, f,l); gp_Pnt2d p1r, p2r, pk; p1r = pcRepl1->Value( Urepl ); p2r = pcRepl2->Value( Urepl ); pk = pc->Value( Ukeep ); // suppose that pk is equal to either p1r or p2r Standard_Boolean isUPeriod = ( Abs( p1r.X() - p2r.X() ) > Abs( p1r.Y() - p2r.Y() )); Standard_Boolean is1Equal; if (isUPeriod) is1Equal = ( Abs( p1r.X() - pk.X() ) < Abs( p2r.X() - pk.X() )); else is1Equal = ( Abs( p1r.Y() - pk.Y() ) < Abs( p2r.Y() - pk.Y() )); Handle(Geom2d_Curve) pc2 = Handle(Geom2d_Curve)::DownCast ( pc->Translated( pk, is1Equal ? p2r : p1r ) ); if (E.Orientation() == TopAbs_REVERSED) is1Equal = !is1Equal; if (is1Equal) myBuilder.UpdateEdge( EKeep, pc, pc2, F, tol); else myBuilder.UpdateEdge( EKeep, pc2, pc, F, tol); } // loop on a Faces where a replaced edge exists // 2. update edge images according to replacement if (myImagesEdges.HasImage( E )) myImagesEdges.Remove( E ); myImagesEdges.Bind( E, EKeep ); } // loop on a list of equal edges EEL } // loop on a map of equal edges EEM } //======================================================================= //function : KeepShapesInside //purpose : remove shapes that are outside of S from resul //======================================================================= void Partition_Spliter::KeepShapesInside (const TopoDS_Shape& S) { TopoDS_Iterator it; if (S.ShapeType() < TopAbs_SOLID) { // compound or compsolid for (it.Initialize( S ); it.More(); it.Next()) KeepShapesInside( it.Value()); return; } Standard_Boolean isTool = Standard_False; if (!myImageShape.HasImage( S )) { isTool = CheckTool( S ); if (!isTool) return; } // build map of internal faces TopTools_IndexedMapOfShape MIF; TopoDS_Shape IntFacesComp = FindFacesInside( S, Standard_False, Standard_True); TopExp::MapShapes( IntFacesComp, TopAbs_FACE, MIF ); TopoDS_Compound C; myBuilder.MakeCompound(C); TopAbs_ShapeEnum anInternalShapeType = TopAbs_SHAPE; if (!MIF.IsEmpty()) { // leave in the result only those shapes having a face in MIF for (it.Initialize( myShape ); it.More(); it.Next()) { const TopoDS_Shape & aResShape = it.Value(); TopExp_Explorer expResF( aResShape, TopAbs_FACE ); for (; expResF.More(); expResF.Next()) { if ( MIF.Contains( expResF.Current())) { myBuilder.Add( C, aResShape ); if (aResShape.ShapeType() < anInternalShapeType) anInternalShapeType = aResShape.ShapeType(); break; } } } } // may be S was not split by internal faces then it is missing // in myShape, add it if (!isTool && (anInternalShapeType > TopAbs_SOLID || S.ShapeType() > TopAbs_SOLID)) { TopTools_IndexedMapOfShape MSF; // map of split faces of S TopExp::MapShapes( myImageShape.Image(S).First(), TopAbs_FACE, MSF); // find a shape having all faces in MSF for (it.Initialize( myShape ); it.More(); it.Next()) { TopExp_Explorer expResF( it.Value(), TopAbs_FACE ); for (; expResF.More(); expResF.Next()) { if (! MSF.Contains( expResF.Current())) break; } if (! expResF.More()) { myBuilder.Add( C, it.Value() ); break; } } } myShape = C; } //======================================================================= //function : RemoveShapesInside //purpose : remove shapes that are inside S from resul //======================================================================= void Partition_Spliter::RemoveShapesInside (const TopoDS_Shape& S) { TopoDS_Iterator it; if (S.ShapeType() < TopAbs_SOLID) { // compound or compsolid for (it.Initialize( S ); it.More(); it.Next()) RemoveShapesInside( it.Value()); return; } Standard_Boolean isTool = Standard_False; if (!myImageShape.HasImage( S )) { isTool = CheckTool( S ); if (!isTool) return; } TopoDS_Shape IntFacesComp = FindFacesInside( S, Standard_False, Standard_True); TopTools_IndexedMapOfShape MIF; // map of internal faces TopExp::MapShapes( IntFacesComp, TopAbs_FACE, MIF); if (MIF.IsEmpty()) return; // add to MIF split faces of S if (myImageShape.HasImage(S)) TopExp::MapShapes( myImageShape.Image(S).First(), TopAbs_FACE, MIF); // leave in the result only those shapes not having all face in MIF TopoDS_Compound C; myBuilder.MakeCompound(C); // RMF : faces of removed shapes that encounter once TopTools_MapOfShape RFM; for (it.Initialize( myShape ); it.More(); it.Next()) { TopExp_Explorer expResF( it.Value(), TopAbs_FACE ); for (; expResF.More(); expResF.Next()) if (!MIF.Contains( expResF.Current())) break; if (expResF.More()) // add shape to result myBuilder.Add( C, it.Value() ); else // add faces of a removed shape to RFM for (expResF.ReInit(); expResF.More(); expResF.Next()) { const TopoDS_Shape& F = expResF.Current(); if ( ! RFM.Remove ( F )) RFM.Add( F ); } } if (!isTool) { // rebuild S, it must remain in the result Standard_Boolean isClosed = Standard_False; switch (S.ShapeType()) { case TopAbs_SOLID : isClosed = Standard_True; break; case TopAbs_SHELL: { TopTools_IndexedDataMapOfShapeListOfShape MEF; TopExp::MapShapesAndAncestors(S, TopAbs_EDGE, TopAbs_FACE, MEF); Standard_Integer i; for (i=1; isClosed && i<=MEF.Extent(); ++i) isClosed = ( MEF(i).Extent() != 1 ); break; } default: isClosed = Standard_False; } if (isClosed) { // add to a new shape external faces of removed shapes, ie those in RFM TopoDS_Shell Shell; myBuilder.MakeShell( Shell ); // exclude redundant internal face with edges encounterd only once TopTools_IndexedDataMapOfShapeListOfShape MEF; TopTools_MapIteratorOfMapOfShape itF (RFM); for ( ; itF.More(); itF.Next()) TopExp::MapShapesAndAncestors(itF.Key(), TopAbs_EDGE, TopAbs_FACE, MEF); // add only faces forming a closed shell for (itF.Reset() ; itF.More(); itF.Next()) { TopExp_Explorer expE (itF.Key(), TopAbs_EDGE); for (; expE.More(); expE.Next()) if (MEF.FindFromKey(expE.Current()).Extent() == 1) break; if (!expE.More()) myBuilder.Add( Shell, itF.Key()); } if (S.ShapeType() == TopAbs_SOLID) { TopoDS_Solid Solid; myBuilder.MakeSolid( Solid ); myBuilder.Add (Solid, Shell); myBuilder.Add (C, Solid); } else myBuilder.Add (C, Shell); } else { if (myImageShape.HasImage( S )) { for (it.Initialize( myImageShape.Image(S).First()); it.More(); it.Next()) myBuilder.Add (C, it.Value()); } } } myShape = C; } //======================================================================= //function : CheckTool //purpose : Return True if is a tool shape. Prepare tool // faces of for the search of internal faces. //======================================================================= Standard_Boolean Partition_Spliter::CheckTool(const TopoDS_Shape& S) { // suppose S has not an image Standard_Boolean isTool = Standard_False; TopoDS_Compound C; myBuilder.MakeCompound( C ); TopExp_Explorer expF( S, TopAbs_FACE); for (; expF.More(); expF.Next()) { const TopoDS_Face& F = TopoDS::Face( expF.Current() ); if (myMapTools.Contains( F )) isTool = Standard_True; else continue; if (myImagesFaces.HasImage( F )) { // F has been reconstructed TopAbs_Orientation Fori = F.Orientation(); TopTools_ListOfShape LNF; myImagesFaces.LastImage( F, LNF); TopTools_ListIteratorOfListOfShape itF (LNF); for ( ; itF.More(); itF.Next()) myBuilder.Add( C, itF.Value().Oriented(Fori) ); continue; } Standard_Boolean hasSectionE = myInter3d.HasSectionEdge( F ); Standard_Boolean hasNewE = myAsDes->HasDescendant( F ); if (!hasSectionE && !hasNewE) { // F intersects nothing myBuilder.Add( C, F ); continue; } // make an image for F TopoDS_Face NF = F; NF.Orientation(TopAbs_FORWARD); NF = TopoDS::Face( NF.EmptyCopied() ); // make a copy TopoDS_Wire NW; myBuilder.MakeWire( NW ); // add edges, as less as possible TopTools_ListOfShape NEL; TopTools_ListIteratorOfListOfShape itNE; if (hasSectionE) { // add section edges TopExp_Explorer expE; for ( ; expE.More(); expE.Next()) { if (! myImagesEdges.HasImage( expE.Current() )) continue; myImagesEdges.LastImage( expE.Current(), NEL ); for ( itNE.Initialize( NEL ); itNE.More(); itNE.Next()) myBuilder.Add ( NW, itNE.Value()); } } if (hasNewE) { // add new edges NEL = myAsDes->Descendant( F ); for ( itNE.Initialize( NEL ); itNE.More(); itNE.Next()) { TopTools_ListOfShape SEL; // splits myImagesEdges.LastImage( itNE.Value(), SEL ); TopTools_ListIteratorOfListOfShape itSE (SEL); for ( ; itSE.More(); itSE.Next()) myBuilder.Add ( NW, itSE.Value()); } } myBuilder.Add( NF, NW ); myBuilder.Add (C, NF); NF.Orientation( F.Orientation() ); // NF is most probably invalid myImagesFaces.Bind (F, NF); } if (isTool) myImageShape.Bind (S, C); return isTool; } //======================================================================= //function : IsInside //purpose : Return True if the first vertex of S1 inside S2. // If S1.IsNull(), check infinite point against S2. //======================================================================= Standard_Boolean Partition_Spliter::IsInside (const TopoDS_Shape& theS1, const TopoDS_Shape& theS2) { BRepClass3d_SolidClassifier aClassifier( theS2 ); TopExp_Explorer expl( theS1, TopAbs_VERTEX ); if (!expl.More()) aClassifier.PerformInfinitePoint( ::RealSmall()); else { const TopoDS_Vertex & aVertex = TopoDS::Vertex( expl.Current() ); aClassifier.Perform (BRep_Tool::Pnt( aVertex ), BRep_Tool::Tolerance( aVertex )); } return ( aClassifier.State() == TopAbs_IN ); } //======================================================================= //function : GetOriginalShape //purpose : Return the shape aShape originates from. aShape // should be a face or more complex result shape //======================================================================= TopoDS_Shape Partition_Spliter::GetOriginalShape(const TopoDS_Shape& theShape) const { TopoDS_Shape anOrigShape; TopExp_Explorer expl( theShape, TopAbs_FACE); if (expl.More()) { TopoDS_Shape aFace = expl.Current(); if (myImagesFaces.IsImage( aFace )) aFace = myImagesFaces.Root( aFace ); anOrigShape = myFaceShapeMap.Find( aFace ); } return anOrigShape; } //======================================================================= //function : FindToolsToReconstruct //purpose : find and store as objects tools which interfere // with solids or are inside solids without // an interference //======================================================================= void Partition_Spliter::FindToolsToReconstruct() { if (myMapTools.IsEmpty()) return; Standard_Integer nbFoundTools = 0; // build edge - face map in order to detect interference with section edges TopTools_IndexedDataMapOfShapeListOfShape EFM; TopTools_MapIteratorOfMapOfShape aMapIt; for (aMapIt.Initialize(myMapTools); aMapIt.More(); aMapIt.Next()) TopExp::MapShapesAndAncestors( aMapIt.Key(), TopAbs_EDGE, TopAbs_FACE, EFM); for (aMapIt.Initialize(myMapFaces); aMapIt.More(); aMapIt.Next()) TopExp::MapShapesAndAncestors( aMapIt.Key(), TopAbs_EDGE, TopAbs_FACE, EFM); TopTools_MapOfShape aCurrentSolids, aCheckedShapes; // faces cut by new edges TopTools_MapOfShape & aSectionFaces = myInter3d.TouchedFaces(); // keep solids interfering with each other in aCurrentSolids map // and add tool faces intersecting solids as object shapes TopTools_ListIteratorOfListOfShape itS, itF, itCF, itE; for (itS.Initialize( myListShapes ); itS.More(); itS.Next()) { TopExp_Explorer expSo (itS.Value(), TopAbs_SOLID); for (; expSo.More(); expSo.Next()) { // check if a solid has been already processed const TopoDS_Shape & aSo = expSo.Current(); if (!aCheckedShapes.Add( aSo )) continue; aCurrentSolids.Add( aSo ); // faces to check TopTools_ListOfShape aFacesToCheck; TopExp_Explorer exp( aSo, TopAbs_FACE ); for ( ; exp.More(); exp.Next()) aFacesToCheck.Append ( exp.Current()); // add other shapes interefering with a solid. // iterate faces to check while appending new ones for (itCF.Initialize (aFacesToCheck) ; itCF.More(); itCF.Next()) { const TopoDS_Shape& aCheckFace = itCF.Value(); // if (!aCheckedShapes.Add( aCheckFace )) // continue; // find faces interfering with aCheckFace TopTools_ListOfShape anIntFaces; // ** 1. faces intersecting aCheckFace with creation of new edges on it if ( myAsDes->HasDescendant( aCheckFace )) { // new edges on aCheckFace const TopTools_ListOfShape& NEL = myAsDes->Descendant( aCheckFace ); for (itE.Initialize( NEL); itE.More(); itE.Next()) { const TopoDS_Shape & aNewEdge = itE.Value(); if (!aCheckedShapes.Add( aNewEdge )) continue; // faces interfering by aNewEdge itF.Initialize (myAsDes->Ascendant( aNewEdge )); for (; itF.More(); itF.Next()) if (aCheckFace != itF.Value()) anIntFaces.Append( itF.Value() ); // ** 2. faces having section edge aNewEdge on aFacesToCheck if (EFM.Contains( aNewEdge)) { itF.Initialize ( EFM.FindFromKey (itE.Value())); for (; itF.More(); itF.Next()) if (aCheckFace != itF.Value()) anIntFaces.Append( itF.Value() ); } } } // ** 3. faces cut by edges of aCheckFace TopExp_Explorer expE (aCheckFace, TopAbs_EDGE); for ( ; expE.More(); expE.Next()) { const TopoDS_Shape & aCheckEdge = expE.Current(); if (aCheckedShapes.Add( aCheckEdge ) && myInter3d.IsSectionEdge( TopoDS::Edge( aCheckEdge ))) { itF.Initialize( myInter3d.SectionEdgeFaces( TopoDS::Edge( aCheckEdge ))); for (; itF.More(); itF.Next()) if (aCheckFace != itF.Value()) anIntFaces.Append( itF.Value() ); } } // process faces interfering with aCheckFace and shapes they // belong to for (itF.Initialize (anIntFaces); itF.More(); itF.Next()) { const TopoDS_Shape & F = itF.Value(); if (! aCheckedShapes.Add( F )) continue; Standard_Boolean isTool = myMapTools.Contains( F ); if (isTool && myFaceShapeMap( aCheckFace ).ShapeType() == TopAbs_SOLID ) { // a tool interfering with a solid if (aSectionFaces.Contains( F )) AddShape( F ); ++ nbFoundTools; if (nbFoundTools == myMapTools.Extent()) return; } const TopoDS_Shape & S = myFaceShapeMap( F ); if (aCheckedShapes.Add( S )) { // a new shape interefering with aCurrentSolids is found if (!isTool && S.ShapeType() == TopAbs_SOLID) aCurrentSolids.Add ( S ); // add faces to aFacesToCheck list for ( exp.Init( S, TopAbs_FACE ); exp.More(); exp.Next()) aFacesToCheck.Append ( exp.Current() ); } } } // loop on aFacesToCheck // Here aCurrentSolids contains all solids interfering with each other. // aCheckedShapes contains all faces belonging to shapes included // in or interfering with aCurrentSolids or previously checked solids. // Test if tool faces that do not interefere with other shapes are // wrapped by any of aCurrentSolids TopTools_MapIteratorOfMapOfShape aSolidIt (aCurrentSolids); for ( ; aSolidIt.More(); aSolidIt.Next()) { const TopoDS_Shape & aSolid = aSolidIt.Key(); TopTools_MapOfShape aCheckedTools( myMapTools.Extent() ); TopTools_MapIteratorOfMapOfShape aToolIt (myMapTools); for ( ; aToolIt.More(); aToolIt.Next()) { const TopoDS_Shape & aToolFace = aToolIt.Key(); if (aCheckedShapes.Contains( aToolFace ) || // already found aCheckedTools.Contains( aToolFace )) // checked against aSolid continue; const TopoDS_Shape & aToolShape = myFaceShapeMap( aToolFace ); TopExp_Explorer aToolFaceIt( aToolShape, TopAbs_FACE ); Standard_Boolean isInside = IsInside( aToolShape, aSolid ); for ( ; aToolFaceIt.More(); aToolFaceIt.Next() ) { const TopoDS_Shape & aTool = aToolFaceIt.Current(); aCheckedTools.Add( aTool ); if (isInside) { if (aSectionFaces.Contains( aTool )) AddShape( aTool ); ++ nbFoundTools; if (nbFoundTools == myMapTools.Extent()) return; aCheckedShapes.Add( aTool ); } } } } } // loop on solid shapes } } #endif netgen-6.2.1804/libsrc/occ/Partition_Loop2d.jxx0000644000175000017500000000077713272137567017765 0ustar kurtkurt// GEOM PARTITION : partition algorithm // // Copyright (C) 2003 CEA/DEN, EDF R&D // // // // File : Partition_Loop2d.jxx // Module : GEOM #ifndef _TopoDS_Face_HeaderFile #include #endif #ifndef _TopoDS_Edge_HeaderFile #include #endif #ifndef _TopTools_ListOfShape_HeaderFile #include #endif #ifndef _BRepAlgo_Image_HeaderFile #include #endif #ifndef _Partition_Loop2d_HeaderFile #include "Partition_Loop2d.hxx" #endif netgen-6.2.1804/libsrc/occ/occmeshsurf.hpp0000644000175000017500000001115413272137567017063 0ustar kurtkurt#ifdef OCCGEOMETRY #ifndef FILE_OCCMESHSURF #define FILE_OCCMESHSURF #include "occgeom.hpp" #include "mydefs.hpp" #define PARAMETERSPACE -1 #define PLANESPACE 1 class OCCGeometry; class SingularMatrixException {}; class UVBoundsException {}; class OCCSurface { public: TopoDS_Face topods_face; Handle(Geom_Surface) occface; TopAbs_Orientation orient; int projecttype; protected: Point<3> p1; Point<3> p2; /// in plane, directed p1->p2 Vec<3> ex; /// in plane Vec<3> ey; /// outer normal direction Vec<3> ez; /// normal vector in p2 Vec<3> n2; /// average normal vector Vec<3> nmid; // for transformation to parameter space Point<2> psp1; Point<2> psp2; Vec<2> psex; Vec<2> psey; Mat<2,2> Amat, Amatinv; // UV Bounds double umin, umax, vmin, vmax; public: OCCSurface (const TopoDS_Face & aface, int aprojecttype) { topods_face = aface; occface = BRep_Tool::Surface(topods_face); orient = topods_face.Orientation(); projecttype = aprojecttype; ShapeAnalysis::GetFaceUVBounds (topods_face, umin, umax, vmin, vmax); umin -= fabs(umax-umin)/100.0; vmin -= fabs(vmax-vmin)/100.0; umax += fabs(umax-umin)/100.0; vmax += fabs(vmax-vmin)/100.0; // projecttype = PLANESPACE; /* TopExp_Explorer exp1; exp1.Init (topods_face, TopAbs_WIRE); orient = TopAbs::Compose (orient, exp1.Current().Orientation()); */ }; ~OCCSurface() {}; void Project (Point<3> & p, PointGeomInfo & gi); void GetNormalVector (const Point<3> & p, const PointGeomInfo & geominfo, Vec<3> & n) const; /** Defines tangential plane in ap1. The local x-coordinate axis point to the direction of ap2 */ void DefineTangentialPlane (const Point<3> & ap1, const PointGeomInfo & geominfo1, const Point<3> & ap2, const PointGeomInfo & geominfo2); /// Transforms 3d point p3d to local coordinates pplane void ToPlane (const Point<3> & p3d, const PointGeomInfo & geominfo, Point<2> & pplane, double h, int & zone) const; /// Transforms point pplane in local coordinates to 3d point void FromPlane (const Point<2> & pplane, Point<3> & p3d, PointGeomInfo & gi, double h); }; /// class Meshing2OCCSurfaces : public Meshing2 { /// OCCSurface surface; public: /// Meshing2OCCSurfaces (const TopoDS_Shape & asurf, const Box<3> & aboundingbox, int aprojecttype); /// int GetProjectionType () { return surface.projecttype; } protected: /// virtual void DefineTransformation (const Point3d & p1, const Point3d & p2, const PointGeomInfo * geominfo1, const PointGeomInfo * geominfo2); /// virtual void TransformToPlain (const Point3d & locpoint, const MultiPointGeomInfo & geominfo, Point2d & plainpoint, double h, int & zone); /// virtual int TransformFromPlain (Point2d & plainpoint, Point3d & locpoint, PointGeomInfo & gi, double h); /// virtual double CalcLocalH (const Point3d & p, double gh) const; }; /// class MeshOptimize2dOCCSurfaces : public MeshOptimize2d { /// const OCCGeometry & geometry; public: /// MeshOptimize2dOCCSurfaces (const OCCGeometry & ageometry); /// virtual void ProjectPoint (INDEX surfind, Point<3> & p) const; /// virtual void ProjectPoint2 (INDEX surfind, INDEX surfind2, Point<3> & p) const; /// virtual int ProjectPointGI (INDEX surfind, Point<3> & p, PointGeomInfo & gi) const; /// virtual void GetNormalVector(INDEX surfind, const Point<3> & p, Vec<3> & n) const; /// virtual void GetNormalVector(INDEX surfind, const Point<3> & p, PointGeomInfo & gi, Vec<3> & n) const; virtual int CalcPointGeomInfo(int surfind, PointGeomInfo& gi, const Point<3> & p3) const; }; class OCCGeometry; class DLL_HEADER OCCRefinementSurfaces : public Refinement { const OCCGeometry & geometry; public: OCCRefinementSurfaces (const OCCGeometry & ageometry); virtual ~OCCRefinementSurfaces (); virtual void PointBetween (const Point<3> & p1, const Point<3> & p2, double secpoint, int surfi, const PointGeomInfo & gi1, const PointGeomInfo & gi2, Point<3> & newp, PointGeomInfo & newgi) const; virtual void PointBetween (const Point<3> & p1, const Point<3> & p2, double secpoint, int surfi1, int surfi2, const EdgePointGeomInfo & ap1, const EdgePointGeomInfo & ap2, Point<3> & newp, EdgePointGeomInfo & newgi) const; virtual void ProjectToSurface (Point<3> & p, int surfi) const; virtual void ProjectToSurface (Point<3> & p, int surfi, PointGeomInfo & gi) const; }; #endif #endif netgen-6.2.1804/libsrc/occ/Partition_Inter3d.jxx0000644000175000017500000000330113272137567020120 0ustar kurtkurt// GEOM PARTITION : partition algorithm // // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org // // // // File : Partition_Inter3d.jxx // Module : GEOM #ifndef _BRepAlgo_AsDes_HeaderFile #include #endif #ifndef _TopTools_ListOfShape_HeaderFile #include #endif #ifndef _TopTools_DataMapOfShapeShape_HeaderFile #include #endif #ifndef _TopoDS_Face_HeaderFile #include #endif #ifndef _TopTools_MapOfShape_HeaderFile #include #endif #ifndef _TopoDS_Shape_HeaderFile #include #endif #ifndef _TopoDS_Vertex_HeaderFile #include #endif #ifndef _TopoDS_Edge_HeaderFile #include #endif #ifndef _Partition_Inter3d_HeaderFile #include "Partition_Inter3d.hxx" #endif netgen-6.2.1804/libsrc/occ/CMakeLists.txt0000644000175000017500000000124113272137567016565 0ustar kurtkurtadd_definitions(-DNGINTERFACE_EXPORTS) add_library(occ ${NG_LIB_TYPE} Partition_Inter2d.cxx Partition_Inter3d.cxx Partition_Loop.cxx Partition_Loop2d.cxx Partition_Loop3d.cxx Partition_Spliter.cxx occconstruction.cpp occgenmesh.cpp occgeom.cpp occmeshsurf.cpp python_occ.cpp ) add_library(occvis ${NG_LIB_TYPE} vsocc.cpp) if(NOT WIN32) target_link_libraries( occ ${OCC_LIBRARIES} ${PYTHON_LIBRARIES}) target_link_libraries( occvis occ ) install( TARGETS occ occvis ${NG_INSTALL_DIR}) endif(NOT WIN32) install(FILES occgeom.hpp occmeshsurf.hpp vsocc.hpp DESTINATION ${NG_INSTALL_DIR_INCLUDE}/occ COMPONENT netgen_devel ) netgen-6.2.1804/libsrc/occ/Partition_Spliter.ixx0000644000175000017500000000207113272137567020234 0ustar kurtkurt// GEOM PARTITION : partition algorithm // // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org // // // // File : Partition_Spliter.ixx // Module : GEOM #include "Partition_Spliter.jxx" netgen-6.2.1804/libsrc/occ/Partition_Loop3d.cxx0000644000175000017500000002406013272137567017746 0ustar kurtkurt#ifdef OCCGEOMETRY // GEOM PARTITION : partition algorithm // // Copyright (C) 2003 CEA/DEN, EDF R&D // // // // File : Partition_Loop3d.cxx // Module : GEOM //using namespace std; #include #include "Partition_Loop3d.ixx" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include //======================================================================= //function : Partition_Loop3d //purpose : //======================================================================= Partition_Loop3d::Partition_Loop3d() { } //======================================================================= //function : AddConstFaces //purpose : Add faces of as unique faces in the result. //======================================================================= void Partition_Loop3d::AddConstFaces(const TopoDS_Shape& S) { TopExp_Explorer FaceExp(S, TopAbs_FACE); for (; FaceExp.More(); FaceExp.Next()) myFaces.Append( FaceExp.Current() ); TopExp::MapShapesAndAncestors(S, TopAbs_EDGE, TopAbs_FACE, myEFMap); } //======================================================================= //function : AddSectionFaces //purpose : Add faces of as double faces in the result. //======================================================================= void Partition_Loop3d::AddSectionFaces(const TopoDS_Shape& S) { AddConstFaces( S ); AddConstFaces( S.Reversed() ); } //======================================================================= //function : MakeShells //purpose : Make and return shells. // can contain faces that must not be // added to result shells. //======================================================================= const TopTools_ListOfShape& Partition_Loop3d::MakeShells (const TopTools_MapOfOrientedShape& AvoidFacesMap) { myNewShells.Clear(); BRep_Builder Builder; TopTools_MapOfShape CheckedEdgesMap; TopTools_MapOfOrientedShape AddedFacesMap; TopTools_ListIteratorOfListOfShape itF (myFaces); for (; itF.More(); itF.Next()) { const TopoDS_Shape& FF = itF.Value(); if (AvoidFacesMap.Contains( FF ) || ! AddedFacesMap.Add( FF ) ) continue; // make a new shell TopoDS_Shell Shell; Builder.MakeShell(Shell); Builder.Add(Shell,FF); // clear the maps from shapes added to previous Shell TopTools_MapIteratorOfMapOfShape itEM (CheckedEdgesMap); for (; itEM.More(); itEM.Next()) { TopTools_ListOfShape& FL = myEFMap.ChangeFromKey( itEM.Key()); TopTools_ListIteratorOfListOfShape it (FL); while ( it.More()) { if (AddedFacesMap.Contains( it.Value())) FL.Remove( it ); else it.Next(); } } CheckedEdgesMap.Clear(); // loop on faces added to Shell; add their neighbor faces to Shell and so on TopoDS_Iterator itAddedF (Shell); for (; itAddedF.More(); itAddedF.Next()) { const TopoDS_Face& F = TopoDS::Face (itAddedF.Value()); // loop on edges of F; find a good neighbor face of F by E TopExp_Explorer EdgeExp(F, TopAbs_EDGE); for (; EdgeExp.More(); EdgeExp.Next()) { const TopoDS_Edge& E = TopoDS::Edge( EdgeExp.Current()); if (! CheckedEdgesMap.Add( E )) continue; // candidate faces list const TopTools_ListOfShape& FL = myEFMap.ChangeFromKey(E); if (FL.IsEmpty()) continue; // select one of neighbors TopoDS_Face SelF; if (FL.Extent() == 2) { if (! F.IsSame( FL.First() )) SelF = TopoDS::Face( FL.First() ); else if (!F.IsSame( FL.Last() )) SelF = TopoDS::Face( FL.Last() ); } else { // check if a face already added to Shell shares E TopTools_ListIteratorOfListOfShape it (FL); Standard_Boolean found = Standard_False; for (; !found && it.More(); it.Next()) if (F != it.Value()) found = AddedFacesMap.Contains( it.Value() ); if (found) continue; // select basing on geometrical check Standard_Boolean GoodOri, inside; Standard_Real dot, MaxDot = -100; TopTools_ListOfShape TangFL; // tangent faces for ( it.Initialize( FL ) ; it.More(); it.Next()) { const TopoDS_Face& NeighborF = TopoDS::Face( it.Value()); if (NeighborF.IsSame( F )) continue; inside = Partition_Loop3d::IsInside( E, F, NeighborF, 1, dot, GoodOri); if (!GoodOri) continue; if (!inside) dot = -dot - 3; if (dot < MaxDot) continue; if ( IsEqual( dot, MaxDot)) TangFL.Append(SelF); else TangFL.Clear(); MaxDot = dot; SelF = NeighborF; } if (!TangFL.IsEmpty()) { for (it.Initialize( TangFL ); it.More(); it.Next()) { const TopoDS_Face& NeighborF = TopoDS::Face( it.Value()); if (Partition_Loop3d:: IsInside( E, SelF , NeighborF, 0, dot, GoodOri)) SelF = NeighborF; } } } if (!SelF.IsNull() && AddedFacesMap.Add( SelF ) && !AvoidFacesMap.Contains( SelF )) Builder.Add( Shell, SelF); } // loop on edges of F } // loop on the faces added to Shell // Shell is complete myNewShells.Append( Shell ); } // loop on myFaces // prepare to the next call myFaces.Clear(); myEFMap.Clear(); return myNewShells; } //======================================================================= //function : Normal //purpose : //======================================================================= gp_Vec Partition_Loop3d::Normal(const TopoDS_Edge& E, const TopoDS_Face& F) { gp_Vec Norm, V1, V2; Standard_Real First, Last; gp_Pnt Ps; Handle(Geom2d_Curve) C2d = BRep_Tool::CurveOnSurface (E, F, First, Last); Handle(Geom_Surface) Sf = BRep_Tool::Surface(F); gp_Pnt2d p = C2d->Value( 0.5*(First+Last) ); Sf->D1(p.X(), p.Y(), Ps, V1, V2); Norm = V1.Crossed(V2); if (F.Orientation() == TopAbs_REVERSED ) Norm.Reverse(); return Norm; } //======================================================================= //function : NextNormal //purpose : find normal to F at point a little inside F near the middle of E //warning : E must be properly oriented in F. //======================================================================= static gp_Vec NextNormal(const TopoDS_Edge& E, const TopoDS_Face& F) { Standard_Real First, Last; Handle(Geom2d_Curve) C2d = BRep_Tool::CurveOnSurface (E, F, First, Last); Handle(Geom_Surface) Sf = BRep_Tool::Surface(F); gp_Pnt2d p; gp_Vec2d v; C2d->D1( 0.5*(First+Last), p, v); if (E.Orientation() != F.Orientation()) v.Reverse(); gp_Dir2d dir( -v.Y(), v.X() ); // dir inside F Standard_Real duv = 1e-6; // this is not Ok and may give incorrect result if // resolutionUV of compared faces is very different. To have a good result, //it is necessary to get normal to faces at points equidistant from E in 3D p.SetX( p.X() + dir.X()*duv ); p.SetY( p.Y() + dir.Y()*duv ); gp_Pnt Ps; gp_Vec Norm, V1, V2, VV1, VV2; Sf->D1( p.X(), p.Y(), Ps, V1, V2); Norm = V1.Crossed(V2); if (F.Orientation() == TopAbs_REVERSED ) Norm.Reverse(); return Norm; } //======================================================================= //function : FindEinF //purpose : find E in F //======================================================================= static TopoDS_Edge FindEinF(const TopoDS_Edge& E, const TopoDS_Face& F) { TopExp_Explorer expl (F, TopAbs_EDGE); for (; expl.More(); expl.Next()) if( E.IsSame( expl.Current() )) return TopoDS::Edge(expl.Current()); TopoDS_Edge nullE; return nullE; } //======================================================================= //function : IsInside //purpose : check if is inside by edge . // if , compute : scalar production of // normalized vectors pointing inside faces, and // check if faces are oriented well for sewing //======================================================================= Standard_Boolean Partition_Loop3d::IsInside(const TopoDS_Edge& E, const TopoDS_Face& F1, const TopoDS_Face& F2, const Standard_Boolean CountDot, Standard_Real& Dot, Standard_Boolean& GoodOri) { Standard_Real f, l; gp_Pnt P; gp_Vec Vc1, Vc2, Vin1, Vin2, Nf1, Nf2; Handle(Geom_Curve) Curve = BRep_Tool::Curve(E,f,l); Curve->D1( 0.5*(f + l), P, Vc2); TopoDS_Edge E1, E2 = FindEinF (E, F2); if (E2.Orientation() == TopAbs_REVERSED ) Vc2.Reverse(); Nf1 = Normal(E,F1); Nf2 = Normal(E,F2); Standard_Real sin = Nf1.CrossSquareMagnitude(Nf2) / Nf1.SquareMagnitude() / Nf2.SquareMagnitude(); Standard_Boolean tangent = sin < 0.001; Standard_Boolean inside = 0; if (tangent) { E1 = FindEinF (E, F1); gp_Vec NNf1 = NextNormal(E1,F1); gp_Vec NNf2 = NextNormal(E2,F2); Vin2 = NNf2.Crossed(Vc2); inside = Vin2 * NNf1 < 0; } else { Vin2 = Nf2.Crossed(Vc2); inside = Vin2 * Nf1 < 0; } if (!CountDot) return inside; if (tangent) Vin2 = Nf2.Crossed(Vc2); else E1 = FindEinF (E, F1); Vc1 = Vc2; if (E1.Orientation() != E2.Orientation()) Vc1.Reverse(); Vin1 = Nf1.Crossed(Vc1); if (tangent) { Standard_Real N1N2 = Nf1 * Nf2; GoodOri = (Vin2 * Vin1 < 0) ? N1N2 > 0 : N1N2 < 0; } else { Standard_Real V1N2 = Vin1 * Nf2; GoodOri = ( inside ? V1N2 <= 0 : V1N2 >= 0); } Vin1.Normalize(); Vin2.Normalize(); Dot = Vin2 * Vin1; return inside; } #endif netgen-6.2.1804/libsrc/occ/occgeom.cpp0000644000175000017500000015030113272137567016147 0ustar kurtkurt #ifdef OCCGEOMETRY #include #include #include "ShapeAnalysis_ShapeTolerance.hxx" #include "ShapeAnalysis_ShapeContents.hxx" #include "ShapeAnalysis_CheckSmallFace.hxx" #include "ShapeAnalysis_DataMapOfShapeListOfReal.hxx" #include "ShapeAnalysis_Surface.hxx" #include "BRepCheck_Analyzer.hxx" #include "BRepLib.hxx" #include "ShapeBuild_ReShape.hxx" #include "ShapeFix.hxx" #include "ShapeFix_FixSmallFace.hxx" #include "Partition_Spliter.hxx" #include "BRepAlgoAPI_Fuse.hxx" #include "XSControl_WorkSession.hxx" #include "XSControl_TransferReader.hxx" #include "StepRepr_RepresentationItem.hxx" #ifndef _Standard_Version_HeaderFile #include #endif #if OCC_VERSION_HEX < 0x070000 // pass #elif OCC_VERSION_HEX < 0x070200 #include "StlTransfer.hxx" #include "TopoDS_Iterator.hxx" #else #include "TopoDS_Iterator.hxx" #endif namespace netgen { void STEP_GetEntityName(const TopoDS_Shape & theShape, STEPCAFControl_Reader * aReader, char * acName) { const Handle(XSControl_WorkSession)& theSession = aReader->Reader().WS(); const Handle(XSControl_TransferReader)& aTransferReader = theSession->TransferReader(); Handle(Standard_Transient) anEntity = aTransferReader->EntityFromShapeResult(theShape, 1); if (anEntity.IsNull()) { // as just mapped anEntity = aTransferReader->EntityFromShapeResult (theShape,-1); } if (anEntity.IsNull()) { // as anything anEntity = aTransferReader->EntityFromShapeResult (theShape,4); } if (anEntity.IsNull()) { cout<<"Warning: XSInterVertex_STEPReader::ReadAttributes()\nentity not found"<Name()->ToCString()); } } void OCCGeometry :: PrintNrShapes () { TopExp_Explorer e; int count = 0; for (e.Init(shape, TopAbs_COMPSOLID); e.More(); e.Next()) count++; cout << "CompSolids: " << count << endl; cout << "Solids : " << somap.Extent() << endl; cout << "Shells : " << shmap.Extent() << endl; cout << "Faces : " << fmap.Extent() << endl; cout << "Edges : " << emap.Extent() << endl; cout << "Vertices : " << vmap.Extent() << endl; } void PrintContents (OCCGeometry * geom) { ShapeAnalysis_ShapeContents cont; cont.Clear(); cont.Perform(geom->shape); (*testout) << "OCC CONTENTS" << endl; (*testout) << "============" << endl; (*testout) << "SOLIDS : " << cont.NbSolids() << endl; (*testout) << "SHELLS : " << cont.NbShells() << endl; (*testout) << "FACES : " << cont.NbFaces() << endl; (*testout) << "WIRES : " << cont.NbWires() << endl; (*testout) << "EDGES : " << cont.NbEdges() << endl; (*testout) << "VERTICES : " << cont.NbVertices() << endl; TopExp_Explorer e; int count = 0; for (e.Init(geom->shape, TopAbs_COMPOUND); e.More(); e.Next()) count++; (*testout) << "Compounds: " << count << endl; count = 0; for (e.Init(geom->shape, TopAbs_COMPSOLID); e.More(); e.Next()) count++; (*testout) << "CompSolids: " << count << endl; (*testout) << endl; cout << "Highest entry in topology hierarchy: " << endl; if (count) cout << count << " composite solid(s)" << endl; else if (geom->somap.Extent()) cout << geom->somap.Extent() << " solid(s)" << endl; else if (geom->shmap.Extent()) cout << geom->shmap.Extent() << " shells(s)" << endl; else if (geom->fmap.Extent()) cout << geom->fmap.Extent() << " face(s)" << endl; else if (geom->wmap.Extent()) cout << geom->wmap.Extent() << " wire(s)" << endl; else if (geom->emap.Extent()) cout << geom->emap.Extent() << " edge(s)" << endl; else if (geom->vmap.Extent()) cout << geom->vmap.Extent() << " vertices(s)" << endl; else cout << "no entities" << endl; } void OCCGeometry :: HealGeometry () { int nrc = 0, nrcs = 0, nrso = somap.Extent(), nrsh = shmap.Extent(), nrf = fmap.Extent(), nrw = wmap.Extent(), nre = emap.Extent(), nrv = vmap.Extent(); TopExp_Explorer exp0; TopExp_Explorer exp1; for (exp0.Init(shape, TopAbs_COMPOUND); exp0.More(); exp0.Next()) nrc++; for (exp0.Init(shape, TopAbs_COMPSOLID); exp0.More(); exp0.Next()) nrcs++; double surfacecont = 0; { Handle_ShapeBuild_ReShape rebuild = new ShapeBuild_ReShape; rebuild->Apply(shape); for (exp1.Init (shape, TopAbs_EDGE); exp1.More(); exp1.Next()) { TopoDS_Edge edge = TopoDS::Edge(exp1.Current()); if ( BRep_Tool::Degenerated(edge) ) rebuild->Remove(edge); } shape = rebuild->Apply(shape); } BuildFMap(); for (exp0.Init (shape, TopAbs_FACE); exp0.More(); exp0.Next()) { TopoDS_Face face = TopoDS::Face(exp0.Current()); GProp_GProps system; BRepGProp::SurfaceProperties(face, system); surfacecont += system.Mass(); } cout << "Starting geometry healing procedure (tolerance: " << tolerance << ")" << endl << "-----------------------------------" << endl; { cout << endl << "- repairing faces" << endl; Handle(ShapeFix_Face) sff; Handle_ShapeBuild_ReShape rebuild = new ShapeBuild_ReShape; rebuild->Apply(shape); for (exp0.Init (shape, TopAbs_FACE); exp0.More(); exp0.Next()) { // Variable to hold the colour (if there exists one) of // the current face being processed Quantity_Color face_colour; TopoDS_Face face = TopoDS::Face (exp0.Current()); if(face_colours.IsNull() || (!(face_colours->GetColor(face,XCAFDoc_ColorSurf,face_colour)))) { // Set the default face colour to green (Netgen Standard) // if no colour has been defined for the face face_colour = Quantity_Color(0.0,1.0,0.0,Quantity_TOC_RGB); } sff = new ShapeFix_Face (face); sff->FixAddNaturalBoundMode() = Standard_True; sff->FixSmallAreaWireMode() = Standard_True; sff->Perform(); if(sff->Status(ShapeExtend_DONE1) || sff->Status(ShapeExtend_DONE2) || sff->Status(ShapeExtend_DONE3) || sff->Status(ShapeExtend_DONE4) || sff->Status(ShapeExtend_DONE5)) { cout << "repaired face " << fmap.FindIndex(face) << " "; if(sff->Status(ShapeExtend_DONE1)) cout << "(some wires are fixed)" <Status(ShapeExtend_DONE2)) cout << "(orientation of wires fixed)" <Status(ShapeExtend_DONE3)) cout << "(missing seam added)" <Status(ShapeExtend_DONE4)) cout << "(small area wire removed)" <Status(ShapeExtend_DONE5)) cout << "(natural bounds added)" <Face(); rebuild->Replace(face, newface); } // Set the original colour of the face to the newly created // face (after the healing process) face = TopoDS::Face (exp0.Current()); face_colours->SetColor(face,face_colour,XCAFDoc_ColorSurf); } shape = rebuild->Apply(shape); } { Handle_ShapeBuild_ReShape rebuild = new ShapeBuild_ReShape; rebuild->Apply(shape); for (exp1.Init (shape, TopAbs_EDGE); exp1.More(); exp1.Next()) { TopoDS_Edge edge = TopoDS::Edge(exp1.Current()); if ( BRep_Tool::Degenerated(edge) ) rebuild->Remove(edge); } shape = rebuild->Apply(shape); } if (fixsmalledges) { cout << endl << "- fixing small edges" << endl; Handle(ShapeFix_Wire) sfw; Handle_ShapeBuild_ReShape rebuild = new ShapeBuild_ReShape; rebuild->Apply(shape); for (exp0.Init (shape, TopAbs_FACE); exp0.More(); exp0.Next()) { TopoDS_Face face = TopoDS::Face(exp0.Current()); for (exp1.Init (face, TopAbs_WIRE); exp1.More(); exp1.Next()) { TopoDS_Wire oldwire = TopoDS::Wire(exp1.Current()); sfw = new ShapeFix_Wire (oldwire, face ,tolerance); sfw->ModifyTopologyMode() = Standard_True; sfw->ClosedWireMode() = Standard_True; bool replace = false; replace = sfw->FixReorder() || replace; replace = sfw->FixConnected() || replace; if (sfw->FixSmall (Standard_False, tolerance) && ! (sfw->StatusSmall(ShapeExtend_FAIL1) || sfw->StatusSmall(ShapeExtend_FAIL2) || sfw->StatusSmall(ShapeExtend_FAIL3))) { cout << "Fixed small edge in wire " << wmap.FindIndex (oldwire) << endl; replace = true; } else if (sfw->StatusSmall(ShapeExtend_FAIL1)) cerr << "Failed to fix small edge in wire " << wmap.FindIndex (oldwire) << ", edge cannot be checked (no 3d curve and no pcurve)" << endl; else if (sfw->StatusSmall(ShapeExtend_FAIL2)) cerr << "Failed to fix small edge in wire " << wmap.FindIndex (oldwire) << ", edge is null-length and has different vertives at begin and end, and lockvtx is True or ModifiyTopologyMode is False" << endl; else if (sfw->StatusSmall(ShapeExtend_FAIL3)) cerr << "Failed to fix small edge in wire " << wmap.FindIndex (oldwire) << ", CheckConnected has failed" << endl; replace = sfw->FixEdgeCurves() || replace; replace = sfw->FixDegenerated() || replace; replace = sfw->FixSelfIntersection() || replace; replace = sfw->FixLacking(Standard_True) || replace; if(replace) { TopoDS_Wire newwire = sfw->Wire(); rebuild->Replace(oldwire, newwire); } //delete sfw; sfw = NULL; } } shape = rebuild->Apply(shape); { BuildFMap(); Handle_ShapeBuild_ReShape rebuild = new ShapeBuild_ReShape; rebuild->Apply(shape); for (exp1.Init (shape, TopAbs_EDGE); exp1.More(); exp1.Next()) { TopoDS_Edge edge = TopoDS::Edge(exp1.Current()); if (vmap.FindIndex(TopExp::FirstVertex (edge)) == vmap.FindIndex(TopExp::LastVertex (edge))) { GProp_GProps system; BRepGProp::LinearProperties(edge, system); if (system.Mass() < tolerance) { cout << "removing degenerated edge " << emap.FindIndex(edge) << " from vertex " << vmap.FindIndex(TopExp::FirstVertex (edge)) << " to vertex " << vmap.FindIndex(TopExp::LastVertex (edge)) << endl; rebuild->Remove(edge); } } } shape = rebuild->Apply(shape); //delete rebuild; rebuild = NULL; } { Handle_ShapeBuild_ReShape rebuild = new ShapeBuild_ReShape; rebuild->Apply(shape); for (exp1.Init (shape, TopAbs_EDGE); exp1.More(); exp1.Next()) { TopoDS_Edge edge = TopoDS::Edge(exp1.Current()); if ( BRep_Tool::Degenerated(edge) ) rebuild->Remove(edge); } shape = rebuild->Apply(shape); } Handle(ShapeFix_Wireframe) sfwf = new ShapeFix_Wireframe; sfwf->SetPrecision(tolerance); sfwf->Load (shape); sfwf->ModeDropSmallEdges() = Standard_True; sfwf->SetPrecision(boundingbox.Diam()); if (sfwf->FixWireGaps()) { cout << endl << "- fixing wire gaps" << endl; if (sfwf->StatusWireGaps(ShapeExtend_OK)) cout << "no gaps found" << endl; if (sfwf->StatusWireGaps(ShapeExtend_DONE1)) cout << "some 2D gaps fixed" << endl; if (sfwf->StatusWireGaps(ShapeExtend_DONE2)) cout << "some 3D gaps fixed" << endl; if (sfwf->StatusWireGaps(ShapeExtend_FAIL1)) cout << "failed to fix some 2D gaps" << endl; if (sfwf->StatusWireGaps(ShapeExtend_FAIL2)) cout << "failed to fix some 3D gaps" << endl; } sfwf->SetPrecision(tolerance); { for (exp1.Init (shape, TopAbs_EDGE); exp1.More(); exp1.Next()) { TopoDS_Edge edge = TopoDS::Edge(exp1.Current()); if ( BRep_Tool::Degenerated(edge) ) cout << "degenerated edge at position 4" << endl; } } if (sfwf->FixSmallEdges()) { cout << endl << "- fixing wire frames" << endl; if (sfwf->StatusSmallEdges(ShapeExtend_OK)) cout << "no small edges found" << endl; if (sfwf->StatusSmallEdges(ShapeExtend_DONE1)) cout << "some small edges fixed" << endl; if (sfwf->StatusSmallEdges(ShapeExtend_FAIL1)) cout << "failed to fix some small edges" << endl; } shape = sfwf->Shape(); //delete sfwf; sfwf = NULL; //delete rebuild; rebuild = NULL; } { for (exp1.Init (shape, TopAbs_EDGE); exp1.More(); exp1.Next()) { TopoDS_Edge edge = TopoDS::Edge(exp1.Current()); if ( BRep_Tool::Degenerated(edge) ) cout << "degenerated edge at position 5" << endl; } } if (fixspotstripfaces) { cout << endl << "- fixing spot and strip faces" << endl; Handle(ShapeFix_FixSmallFace) sffsm = new ShapeFix_FixSmallFace(); sffsm -> Init (shape); sffsm -> SetPrecision (tolerance); sffsm -> Perform(); shape = sffsm -> FixShape(); //delete sffsm; sffsm = NULL; } { for (exp1.Init (shape, TopAbs_EDGE); exp1.More(); exp1.Next()) { TopoDS_Edge edge = TopoDS::Edge(exp1.Current()); if ( BRep_Tool::Degenerated(edge) ) cout << "degenerated edge at position 6" << endl; } } if (sewfaces) { cout << endl << "- sewing faces" << endl; BRepOffsetAPI_Sewing sewedObj(tolerance); for (exp0.Init (shape, TopAbs_FACE); exp0.More(); exp0.Next()) { TopoDS_Face face = TopoDS::Face (exp0.Current()); sewedObj.Add (face); } sewedObj.Perform(); if (!sewedObj.SewedShape().IsNull()) shape = sewedObj.SewedShape(); else cout << " not possible"; } { Handle_ShapeBuild_ReShape rebuild = new ShapeBuild_ReShape; rebuild->Apply(shape); for (exp1.Init (shape, TopAbs_EDGE); exp1.More(); exp1.Next()) { TopoDS_Edge edge = TopoDS::Edge(exp1.Current()); if ( BRep_Tool::Degenerated(edge) ) rebuild->Remove(edge); } shape = rebuild->Apply(shape); } if (makesolids) { cout << endl << "- making solids" << endl; BRepBuilderAPI_MakeSolid ms; int count = 0; for (exp0.Init(shape, TopAbs_SHELL); exp0.More(); exp0.Next()) { count++; ms.Add (TopoDS::Shell(exp0.Current())); } if (!count) { cout << " not possible (no shells)" << endl; } else { BRepCheck_Analyzer ba(ms); if (ba.IsValid ()) { Handle(ShapeFix_Shape) sfs = new ShapeFix_Shape; sfs->Init (ms); sfs->SetPrecision(tolerance); sfs->SetMaxTolerance(tolerance); sfs->Perform(); shape = sfs->Shape(); for (exp0.Init(shape, TopAbs_SOLID); exp0.More(); exp0.Next()) { TopoDS_Solid solid = TopoDS::Solid(exp0.Current()); TopoDS_Solid newsolid = solid; BRepLib::OrientClosedSolid (newsolid); Handle_ShapeBuild_ReShape rebuild = new ShapeBuild_ReShape; // rebuild->Apply(shape); rebuild->Replace(solid, newsolid); TopoDS_Shape newshape = rebuild->Apply(shape, TopAbs_COMPSOLID);//, 1); // TopoDS_Shape newshape = rebuild->Apply(shape); shape = newshape; } //delete sfs; sfs = NULL; } else cout << " not possible" << endl; } } if (splitpartitions) { cout << "- running SALOME partition splitter" << endl; TopExp_Explorer e2; Partition_Spliter ps; int count = 0; for (e2.Init (shape, TopAbs_SOLID); e2.More(); e2.Next()) { count++; ps.AddShape (e2.Current()); } ps.Compute(); shape = ps.Shape(); cout << " before: " << count << " solids" << endl; count = 0; for (e2.Init (shape, TopAbs_SOLID); e2.More(); e2.Next()) count++; cout << " after : " << count << " solids" << endl; } BuildFMap(); { for (exp1.Init (shape, TopAbs_EDGE); exp1.More(); exp1.Next()) { TopoDS_Edge edge = TopoDS::Edge(exp1.Current()); if ( BRep_Tool::Degenerated(edge) ) cout << "degenerated edge at position 8" << endl; } } double newsurfacecont = 0; for (exp0.Init (shape, TopAbs_FACE); exp0.More(); exp0.Next()) { TopoDS_Face face = TopoDS::Face(exp0.Current()); GProp_GProps system; BRepGProp::SurfaceProperties(face, system); newsurfacecont += system.Mass(); } int nnrc = 0, nnrcs = 0, nnrso = somap.Extent(), nnrsh = shmap.Extent(), nnrf = fmap.Extent(), nnrw = wmap.Extent(), nnre = emap.Extent(), nnrv = vmap.Extent(); for (exp0.Init(shape, TopAbs_COMPOUND); exp0.More(); exp0.Next()) nnrc++; for (exp0.Init(shape, TopAbs_COMPSOLID); exp0.More(); exp0.Next()) nnrcs++; cout << "-----------------------------------" << endl; cout << "Compounds : " << nnrc << " (" << nrc << ")" << endl; cout << "Composite solids: " << nnrcs << " (" << nrcs << ")" << endl; cout << "Solids : " << nnrso << " (" << nrso << ")" << endl; cout << "Shells : " << nnrsh << " (" << nrsh << ")" << endl; cout << "Wires : " << nnrw << " (" << nrw << ")" << endl; cout << "Faces : " << nnrf << " (" << nrf << ")" << endl; cout << "Edges : " << nnre << " (" << nre << ")" << endl; cout << "Vertices : " << nnrv << " (" << nrv << ")" << endl; cout << endl; cout << "Totol surface area : " << newsurfacecont << " (" << surfacecont << ")" << endl; cout << endl; } void OCCGeometry :: BuildFMap() { somap.Clear(); shmap.Clear(); fmap.Clear(); wmap.Clear(); emap.Clear(); vmap.Clear(); TopExp_Explorer exp0, exp1, exp2, exp3, exp4, exp5; for (exp0.Init(shape, TopAbs_COMPOUND); exp0.More(); exp0.Next()) { TopoDS_Compound compound = TopoDS::Compound (exp0.Current()); (*testout) << "compound" << endl; int i = 0; for (exp1.Init(compound, TopAbs_SHELL); exp1.More(); exp1.Next()) { (*testout) << "shell " << ++i << endl; } } for (exp0.Init(shape, TopAbs_SOLID); exp0.More(); exp0.Next()) { TopoDS_Solid solid = TopoDS::Solid (exp0.Current()); if (somap.FindIndex(solid) < 1) { somap.Add (solid); for (exp1.Init(solid, TopAbs_SHELL); exp1.More(); exp1.Next()) { TopoDS_Shell shell = TopoDS::Shell (exp1.Current()); if (shmap.FindIndex(shell) < 1) { shmap.Add (shell); for (exp2.Init(shell, TopAbs_FACE); exp2.More(); exp2.Next()) { TopoDS_Face face = TopoDS::Face(exp2.Current()); if (fmap.FindIndex(face) < 1) { fmap.Add (face); (*testout) << "face " << fmap.FindIndex(face) << " "; (*testout) << ((face.Orientation() == TopAbs_REVERSED) ? "-" : "+") << ", "; (*testout) << ((exp2.Current().Orientation() == TopAbs_REVERSED) ? "-" : "+") << endl; for (exp3.Init(exp2.Current(), TopAbs_WIRE); exp3.More(); exp3.Next()) { TopoDS_Wire wire = TopoDS::Wire (exp3.Current()); if (wmap.FindIndex(wire) < 1) { wmap.Add (wire); for (exp4.Init(exp3.Current(), TopAbs_EDGE); exp4.More(); exp4.Next()) { TopoDS_Edge edge = TopoDS::Edge(exp4.Current()); if (emap.FindIndex(edge) < 1) { emap.Add (edge); for (exp5.Init(exp4.Current(), TopAbs_VERTEX); exp5.More(); exp5.Next()) { TopoDS_Vertex vertex = TopoDS::Vertex(exp5.Current()); if (vmap.FindIndex(vertex) < 1) vmap.Add (vertex); } } } } } } } } } } } // Free Shells for (exp1.Init(shape, TopAbs_SHELL, TopAbs_SOLID); exp1.More(); exp1.Next()) { TopoDS_Shell shell = TopoDS::Shell(exp1.Current()); if (shmap.FindIndex(shell) < 1) { shmap.Add (shell); (*testout) << "shell " << shmap.FindIndex(shell) << " "; (*testout) << ((shell.Orientation() == TopAbs_REVERSED) ? "-" : "+") << ", "; (*testout) << ((exp1.Current().Orientation() == TopAbs_REVERSED) ? "-" : "+") << endl; for (exp2.Init(shell, TopAbs_FACE); exp2.More(); exp2.Next()) { TopoDS_Face face = TopoDS::Face(exp2.Current()); if (fmap.FindIndex(face) < 1) { fmap.Add (face); for (exp3.Init(face, TopAbs_WIRE); exp3.More(); exp3.Next()) { TopoDS_Wire wire = TopoDS::Wire (exp3.Current()); if (wmap.FindIndex(wire) < 1) { wmap.Add (wire); for (exp4.Init(wire, TopAbs_EDGE); exp4.More(); exp4.Next()) { TopoDS_Edge edge = TopoDS::Edge(exp4.Current()); if (emap.FindIndex(edge) < 1) { emap.Add (edge); for (exp5.Init(edge, TopAbs_VERTEX); exp5.More(); exp5.Next()) { TopoDS_Vertex vertex = TopoDS::Vertex(exp5.Current()); if (vmap.FindIndex(vertex) < 1) vmap.Add (vertex); } } } } } } } } } // Free Faces for (exp2.Init(shape, TopAbs_FACE, TopAbs_SHELL); exp2.More(); exp2.Next()) { TopoDS_Face face = TopoDS::Face(exp2.Current()); if (fmap.FindIndex(face) < 1) { fmap.Add (face); for (exp3.Init(exp2.Current(), TopAbs_WIRE); exp3.More(); exp3.Next()) { TopoDS_Wire wire = TopoDS::Wire (exp3.Current()); if (wmap.FindIndex(wire) < 1) { wmap.Add (wire); for (exp4.Init(exp3.Current(), TopAbs_EDGE); exp4.More(); exp4.Next()) { TopoDS_Edge edge = TopoDS::Edge(exp4.Current()); if (emap.FindIndex(edge) < 1) { emap.Add (edge); for (exp5.Init(exp4.Current(), TopAbs_VERTEX); exp5.More(); exp5.Next()) { TopoDS_Vertex vertex = TopoDS::Vertex(exp5.Current()); if (vmap.FindIndex(vertex) < 1) vmap.Add (vertex); } } } } } } } // Free Wires for (exp3.Init(shape, TopAbs_WIRE, TopAbs_FACE); exp3.More(); exp3.Next()) { TopoDS_Wire wire = TopoDS::Wire (exp3.Current()); if (wmap.FindIndex(wire) < 1) { wmap.Add (wire); for (exp4.Init(exp3.Current(), TopAbs_EDGE); exp4.More(); exp4.Next()) { TopoDS_Edge edge = TopoDS::Edge(exp4.Current()); if (emap.FindIndex(edge) < 1) { emap.Add (edge); for (exp5.Init(exp4.Current(), TopAbs_VERTEX); exp5.More(); exp5.Next()) { TopoDS_Vertex vertex = TopoDS::Vertex(exp5.Current()); if (vmap.FindIndex(vertex) < 1) vmap.Add (vertex); } } } } } // Free Edges for (exp4.Init(shape, TopAbs_EDGE, TopAbs_WIRE); exp4.More(); exp4.Next()) { TopoDS_Edge edge = TopoDS::Edge(exp4.Current()); if (emap.FindIndex(edge) < 1) { emap.Add (edge); for (exp5.Init(exp4.Current(), TopAbs_VERTEX); exp5.More(); exp5.Next()) { TopoDS_Vertex vertex = TopoDS::Vertex(exp5.Current()); if (vmap.FindIndex(vertex) < 1) vmap.Add (vertex); } } } // Free Vertices for (exp5.Init(shape, TopAbs_VERTEX, TopAbs_EDGE); exp5.More(); exp5.Next()) { TopoDS_Vertex vertex = TopoDS::Vertex(exp5.Current()); if (vmap.FindIndex(vertex) < 1) vmap.Add (vertex); } facemeshstatus.DeleteAll(); facemeshstatus.SetSize (fmap.Extent()); facemeshstatus = 0; // Philippose - 15/01/2009 face_maxh.DeleteAll(); face_maxh.SetSize (fmap.Extent()); face_maxh = mparam.maxh; // Philippose - 15/01/2010 face_maxh_modified.DeleteAll(); face_maxh_modified.SetSize(fmap.Extent()); face_maxh_modified = 0; // Philippose - 17/01/2009 face_sel_status.DeleteAll(); face_sel_status.SetSize (fmap.Extent()); face_sel_status = 0; fvispar.SetSize (fmap.Extent()); evispar.SetSize (emap.Extent()); vvispar.SetSize (vmap.Extent()); fsingular.SetSize (fmap.Extent()); esingular.SetSize (emap.Extent()); vsingular.SetSize (vmap.Extent()); fsingular = esingular = vsingular = false; } void OCCGeometry :: SewFaces () { (*testout) << "Trying to sew faces ..." << endl; cout << "Trying to sew faces ..." << flush; BRepOffsetAPI_Sewing sewedObj(1); for (int i = 1; i <= fmap.Extent(); i++) { TopoDS_Face face = TopoDS::Face (fmap(i)); sewedObj.Add (face); } sewedObj.Perform(); if (!sewedObj.SewedShape().IsNull()) { shape = sewedObj.SewedShape(); cout << " done" << endl; } else cout << " not possible"; } void OCCGeometry :: MakeSolid () { TopExp_Explorer exp0; (*testout) << "Trying to build solids ..." << endl; cout << "Trying to build solids ..." << flush; BRepBuilderAPI_MakeSolid ms; int count = 0; for (exp0.Init(shape, TopAbs_SHELL); exp0.More(); exp0.Next()) { count++; ms.Add (TopoDS::Shell(exp0.Current())); } if (!count) { cout << " not possible (no shells)" << endl; return; } BRepCheck_Analyzer ba(ms); if (ba.IsValid ()) { Handle(ShapeFix_Shape) sfs = new ShapeFix_Shape; sfs->Init (ms); sfs->SetPrecision(1e-5); sfs->SetMaxTolerance(1e-5); sfs->Perform(); shape = sfs->Shape(); for (exp0.Init(shape, TopAbs_SOLID); exp0.More(); exp0.Next()) { TopoDS_Solid solid = TopoDS::Solid(exp0.Current()); TopoDS_Solid newsolid = solid; BRepLib::OrientClosedSolid (newsolid); Handle_ShapeBuild_ReShape rebuild = new ShapeBuild_ReShape; rebuild->Replace(solid, newsolid); TopoDS_Shape newshape = rebuild->Apply(shape, TopAbs_SHAPE, 1); shape = newshape; } cout << " done" << endl; } else cout << " not possible" << endl; } void OCCGeometry :: BuildVisualizationMesh (double deflection) { cout << "Preparing visualization (deflection = " << deflection << ") ... " << flush; BRepTools::Clean (shape); // BRepMesh_IncrementalMesh:: BRepMesh_IncrementalMesh (shape, deflection, true); cout << "done" << endl; } void OCCGeometry :: CalcBoundingBox () { Bnd_Box bb; #if OCC_VERSION_HEX < 0x070000 BRepBndLib::Add (shape, bb); #else BRepBndLib::Add ((const TopoDS_Shape) shape, bb,(Standard_Boolean)true); #endif double x1,y1,z1,x2,y2,z2; bb.Get (x1,y1,z1,x2,y2,z2); Point<3> p1 = Point<3> (x1,y1,z1); Point<3> p2 = Point<3> (x2,y2,z2); (*testout) << "Bounding Box = [" << p1 << " - " << p2 << "]" << endl; boundingbox = Box<3> (p1,p2); SetCenter(); } void OCCGeometry :: Project (int surfi, Point<3> & p) const { static int cnt = 0; if (++cnt % 1000 == 0) cout << "Project cnt = " << cnt << endl; gp_Pnt pnt(p(0), p(1), p(2)); double u,v; Handle( Geom_Surface ) thesurf = BRep_Tool::Surface(TopoDS::Face(fmap(surfi))); Handle( ShapeAnalysis_Surface ) su = new ShapeAnalysis_Surface( thesurf ); gp_Pnt2d suval = su->ValueOfUV ( pnt, BRep_Tool::Tolerance( TopoDS::Face(fmap(surfi)) ) ); suval.Coord( u, v); pnt = thesurf->Value( u, v ); p = Point<3> (pnt.X(), pnt.Y(), pnt.Z()); } bool OCCGeometry :: FastProject (int surfi, Point<3> & ap, double& u, double& v) const { gp_Pnt p(ap(0), ap(1), ap(2)); Handle(Geom_Surface) surface = BRep_Tool::Surface(TopoDS::Face(fmap(surfi))); gp_Pnt x = surface->Value (u,v); if (p.SquareDistance(x) <= sqr(PROJECTION_TOLERANCE)) return true; gp_Vec du, dv; surface->D1(u,v,x,du,dv); int count = 0; gp_Pnt xold; gp_Vec n; double det, lambda, mu; do { count++; n = du^dv; det = Det3 (n.X(), du.X(), dv.X(), n.Y(), du.Y(), dv.Y(), n.Z(), du.Z(), dv.Z()); if (det < 1e-15) return false; lambda = Det3 (n.X(), p.X()-x.X(), dv.X(), n.Y(), p.Y()-x.Y(), dv.Y(), n.Z(), p.Z()-x.Z(), dv.Z())/det; mu = Det3 (n.X(), du.X(), p.X()-x.X(), n.Y(), du.Y(), p.Y()-x.Y(), n.Z(), du.Z(), p.Z()-x.Z())/det; u += lambda; v += mu; xold = x; surface->D1(u,v,x,du,dv); } while (xold.SquareDistance(x) > sqr(PROJECTION_TOLERANCE) && count < 50); // (*testout) << "FastProject count: " << count << endl; if (count == 50) return false; ap = Point<3> (x.X(), x.Y(), x.Z()); return true; } // void OCCGeometry :: WriteOCC_STL(char * filename) // { // cout << "writing stl..."; cout.flush(); // StlAPI_Writer writer; // writer.RelativeMode() = Standard_False; // // writer.SetDeflection(0.02); // writer.Write(shape,filename); // // cout << "done" << endl; // } // Philippose - 23/02/2009 /* Special IGES File load function including the ability to extract individual surface colours via the extended OpenCascade XDE and XCAF Feature set. */ OCCGeometry *LoadOCC_IGES(const char *filename) { OCCGeometry *occgeo; occgeo = new OCCGeometry; // Initiate a dummy XCAF Application to handle the IGES XCAF Document static Handle_XCAFApp_Application dummy_app = XCAFApp_Application::GetApplication(); // Create an XCAF Document to contain the IGES file itself Handle_TDocStd_Document iges_doc; // Check if a IGES File is already open under this handle, if so, close it to prevent // Segmentation Faults when trying to create a new document if(dummy_app->NbDocuments() > 0) { dummy_app->GetDocument(1,iges_doc); dummy_app->Close(iges_doc); } dummy_app->NewDocument ("IGES-XCAF",iges_doc); IGESCAFControl_Reader reader; Standard_Integer stat = reader.ReadFile((char*)filename); if(stat != IFSelect_RetDone) { delete occgeo; return NULL; } // Enable transfer of colours reader.SetColorMode(Standard_True); reader.Transfer(iges_doc); // Read in the shape(s) and the colours present in the IGES File Handle_XCAFDoc_ShapeTool iges_shape_contents = XCAFDoc_DocumentTool::ShapeTool(iges_doc->Main()); Handle_XCAFDoc_ColorTool iges_colour_contents = XCAFDoc_DocumentTool::ColorTool(iges_doc->Main()); TDF_LabelSequence iges_shapes; iges_shape_contents->GetShapes(iges_shapes); // List out the available colours in the IGES File as Colour Names TDF_LabelSequence all_colours; iges_colour_contents->GetColors(all_colours); PrintMessage(1,"Number of colours in IGES File: ",all_colours.Length()); for(int i = 1; i <= all_colours.Length(); i++) { Quantity_Color col; stringstream col_rgb; iges_colour_contents->GetColor(all_colours.Value(i),col); col_rgb << " : (" << col.Red() << "," << col.Green() << "," << col.Blue() << ")"; PrintMessage(1, "Colour [", i, "] = ",col.StringName(col.Name()),col_rgb.str()); } // For the IGES Reader, all the shapes can be exported as one compound shape // using the "OneShape" member occgeo->shape = reader.OneShape(); occgeo->face_colours = iges_colour_contents; occgeo->changed = 1; occgeo->BuildFMap(); occgeo->CalcBoundingBox(); PrintContents (occgeo); return occgeo; } // Philippose - 29/01/2009 /* Special STEP File load function including the ability to extract individual surface colours via the extended OpenCascade XDE and XCAF Feature set. */ OCCGeometry * LoadOCC_STEP (const char * filename) { OCCGeometry * occgeo; occgeo = new OCCGeometry; // Initiate a dummy XCAF Application to handle the STEP XCAF Document static Handle_XCAFApp_Application dummy_app = XCAFApp_Application::GetApplication(); // Create an XCAF Document to contain the STEP file itself Handle_TDocStd_Document step_doc; // Check if a STEP File is already open under this handle, if so, close it to prevent // Segmentation Faults when trying to create a new document if(dummy_app->NbDocuments() > 0) { dummy_app->GetDocument(1,step_doc); dummy_app->Close(step_doc); } dummy_app->NewDocument ("STEP-XCAF",step_doc); STEPCAFControl_Reader reader; // Enable transfer of colours reader.SetColorMode(Standard_True); reader.SetNameMode(Standard_True); Standard_Integer stat = reader.ReadFile((char*)filename); if(stat != IFSelect_RetDone) { delete occgeo; return NULL; } reader.Transfer(step_doc); // Read in the shape(s) and the colours present in the STEP File Handle_XCAFDoc_ShapeTool step_shape_contents = XCAFDoc_DocumentTool::ShapeTool(step_doc->Main()); Handle_XCAFDoc_ColorTool step_colour_contents = XCAFDoc_DocumentTool::ColorTool(step_doc->Main()); TDF_LabelSequence step_shapes; step_shape_contents->GetShapes(step_shapes); // List out the available colours in the STEP File as Colour Names TDF_LabelSequence all_colours; step_colour_contents->GetColors(all_colours); PrintMessage(1,"Number of colours in STEP File: ",all_colours.Length()); for(int i = 1; i <= all_colours.Length(); i++) { Quantity_Color col; stringstream col_rgb; step_colour_contents->GetColor(all_colours.Value(i),col); col_rgb << " : (" << col.Red() << "," << col.Green() << "," << col.Blue() << ")"; PrintMessage(1, "Colour [", i, "] = ",col.StringName(col.Name()),col_rgb.str()); } // For the STEP File Reader in OCC, the 1st Shape contains the entire // compound geometry as one shape occgeo->shape = step_shape_contents->GetShape(step_shapes.Value(1)); occgeo->face_colours = step_colour_contents; occgeo->changed = 1; occgeo->BuildFMap(); occgeo->CalcBoundingBox(); PrintContents (occgeo); char * name = new char(50); //string name; STEP_GetEntityName(occgeo->shape,&reader,name); occgeo->snames.Append(name); TopExp_Explorer exp0,exp1; for (exp0.Init(occgeo->shape, TopAbs_FACE); exp0.More(); exp0.Next()) { TopoDS_Face face = TopoDS::Face(exp0.Current()); STEP_GetEntityName(face,&reader,name); occgeo->fnames.Append(name); for (exp1.Init(face, TopAbs_EDGE); exp1.More(); exp1.Next()) { TopoDS_Edge edge = TopoDS::Edge(exp1.Current()); STEP_GetEntityName(edge,&reader,name); occgeo->enames.Append(name); } } // Gerhard BEGIN // cout << "Solid Names: "<snames.Size();i++) // cout << occgeo->snames[i] << endl; // cout << " " <fnames.Size();i++) // cout << occgeo->fnames[i] << endl; // cout << " " <enames.Size();i++) // cout << occgeo->enames[i] << endl; // cout << " " <shape, const_cast (filename),aBuilder); if(!result) { delete occgeo; return NULL; } // Philippose - 23/02/2009 // Fixed a bug in the OpenCascade XDE Colour handling when // opening BREP Files, since BREP Files have no colour data. // Hence, the face_colours Handle needs to be created as a NULL handle. occgeo->face_colours = Handle_XCAFDoc_ColorTool(); occgeo->face_colours.Nullify(); occgeo->changed = 1; occgeo->BuildFMap(); occgeo->CalcBoundingBox(); PrintContents (occgeo); return occgeo; } void OCCGeometry :: Save (string sfilename) const { const char * filename = sfilename.c_str(); if (strlen(filename) < 4) throw NgException ("illegal filename"); if (strcmp (&filename[strlen(filename)-3], "igs") == 0) { IGESControl_Writer writer("millimeters", 1); writer.AddShape (shape); writer.Write (filename); } else if (strcmp (&filename[strlen(filename)-3], "stp") == 0) { STEPControl_Writer writer; writer.Transfer (shape, STEPControl_AsIs); writer.Write (filename); } else if (strcmp (&filename[strlen(filename)-3], "stl") == 0) { StlAPI_Writer writer; writer.ASCIIMode() = Standard_True; writer.Write (shape, filename); } else if (strcmp (&filename[strlen(filename)-4], "stlb") == 0) { StlAPI_Writer writer; writer.ASCIIMode() = Standard_False; writer.Write (shape, filename); } } const char * shapesname[] = {" ", "CompSolids", "Solids", "Shells", "Faces", "Wires", "Edges", "Vertices"}; const char * shapename[] = {" ", "CompSolid", "Solid", "Shell", "Face", "Wire", "Edge", "Vertex"}; const char * orientationstring[] = {"+", "-"}; void OCCGeometry :: RecursiveTopologyTree (const TopoDS_Shape & sh, stringstream & str, TopAbs_ShapeEnum l, bool isfree, const char * lname) { if (l > TopAbs_VERTEX) return; TopExp_Explorer e; int count = 0; int count2 = 0; if (isfree) e.Init(sh, l, TopAbs_ShapeEnum(l-1)); else e.Init(sh, l); for (; e.More(); e.Next()) { count++; stringstream lname2; lname2 << lname << "/" << shapename[l] << count; str << lname2.str() << " "; switch (e.Current().ShapeType()) { case TopAbs_SOLID: count2 = somap.FindIndex(TopoDS::Solid(e.Current())); break; case TopAbs_SHELL: count2 = shmap.FindIndex(TopoDS::Shell(e.Current())); break; case TopAbs_FACE: count2 = fmap.FindIndex(TopoDS::Face(e.Current())); break; case TopAbs_WIRE: count2 = wmap.FindIndex(TopoDS::Wire(e.Current())); break; case TopAbs_EDGE: count2 = emap.FindIndex(TopoDS::Edge(e.Current())); break; case TopAbs_VERTEX: count2 = vmap.FindIndex(TopoDS::Vertex(e.Current())); break; default: cout << "RecursiveTopologyTree: Case " << e.Current().ShapeType() << " not handeled" << endl; } int nrsubshapes = 0; if (l <= TopAbs_WIRE) { TopExp_Explorer e2; for (e2.Init (e.Current(), TopAbs_ShapeEnum (l+1)); e2.More(); e2.Next()) nrsubshapes++; } str << "{" << shapename[l] << " " << count2; if (l <= TopAbs_EDGE) { str << " (" << orientationstring[e.Current().Orientation()]; if (nrsubshapes != 0) str << ", " << nrsubshapes; str << ") } "; } else str << " } "; RecursiveTopologyTree (e.Current(), str, TopAbs_ShapeEnum (l+1), false, (char*)lname2.str().c_str()); } } void OCCGeometry :: GetTopologyTree (stringstream & str) { cout << "Building topology tree ... " << flush; RecursiveTopologyTree (shape, str, TopAbs_COMPSOLID, false, "CompSolids"); RecursiveTopologyTree (shape, str, TopAbs_SOLID, true, "FreeSolids"); RecursiveTopologyTree (shape, str, TopAbs_SHELL, true, "FreeShells"); RecursiveTopologyTree (shape, str, TopAbs_FACE, true, "FreeFaces"); RecursiveTopologyTree (shape, str, TopAbs_WIRE, true, "FreeWires"); RecursiveTopologyTree (shape, str, TopAbs_EDGE, true, "FreeEdges"); RecursiveTopologyTree (shape, str, TopAbs_VERTEX, true, "FreeVertices"); str << flush; // cout << "done" << endl; } void OCCGeometry :: CheckIrregularEntities(stringstream & str) { ShapeAnalysis_CheckSmallFace csm; csm.SetTolerance (1e-6); TopTools_DataMapOfShapeListOfShape mapEdges; ShapeAnalysis_DataMapOfShapeListOfReal mapParam; TopoDS_Compound theAllVert; int spotfaces = 0; int stripsupportfaces = 0; int singlestripfaces = 0; int stripfaces = 0; int facessplitbyvertices = 0; int stretchedpinfaces = 0; int smoothpinfaces = 0; int twistedfaces = 0; // int edgessamebutnotidentified = 0; cout << "checking faces ... " << flush; int i; for (i = 1; i <= fmap.Extent(); i++) { TopoDS_Face face = TopoDS::Face (fmap(i)); TopoDS_Edge e1, e2; if (csm.CheckSpotFace (face)) { if (!spotfaces++) str << "SpotFace {Spot face} "; (*testout) << "Face " << i << " is a spot face" << endl; str << "SpotFace/Face" << i << " "; str << "{Face " << i << " } "; } if (csm.IsStripSupport (face)) { if (!stripsupportfaces++) str << "StripSupportFace {Strip support face} "; (*testout) << "Face " << i << " has strip support" << endl; str << "StripSupportFace/Face" << i << " "; str << "{Face " << i << " } "; } if (csm.CheckSingleStrip(face, e1, e2)) { if (!singlestripfaces++) str << "SingleStripFace {Single strip face} "; (*testout) << "Face " << i << " is a single strip (edge " << emap.FindIndex(e1) << " and edge " << emap.FindIndex(e2) << " are identical)" << endl; str << "SingleStripFace/Face" << i << " "; str << "{Face " << i << " (edge " << emap.FindIndex(e1) << " and edge " << emap.FindIndex(e2) << " are identical)} "; } if (csm.CheckStripFace(face, e1, e2)) { if (!stripfaces++) str << "StripFace {Strip face} "; (*testout) << "Face " << i << " is a strip (edge " << emap.FindIndex(e1) << " and edge " << emap.FindIndex(e2) << " are identical)" << endl; str << "StripFace/Face" << i << " "; str << "{Face " << i << " (edge " << emap.FindIndex(e1) << " and edge " << emap.FindIndex(e2) << " are identical)} "; } if (int count = csm.CheckSplittingVertices(face, mapEdges, mapParam, theAllVert)) { if (!facessplitbyvertices++) str << "FaceSplitByVertices {Face split by vertices} "; (*testout) << "Face " << i << " is split by " << count << " vertex/vertices " << endl; str << "FaceSplitByVertices/Face" << i << " "; str << "{Face " << i << " (split by " << count << "vertex/vertices)} "; } int whatrow, sens; if (int type = csm.CheckPin (face, whatrow, sens)) { if (type == 1) { if (!smoothpinfaces++) str << "SmoothPinFace {Smooth pin face} "; (*testout) << "Face " << i << " is a smooth pin" << endl; str << "SmoothPinFace/Face" << i << " "; str << "{Face " << i << " } "; } else { if (!stretchedpinfaces++) str << "StretchedPinFace {Stretched pin face} "; (*testout) << "Face " << i << " is a stretched pin" << endl; str << "StretchedPinFace/Face" << i << " "; str << "{Face " << i << " } "; } } double paramu, paramv; if (csm.CheckTwisted (face, paramu, paramv)) { if (!twistedfaces++) str << "TwistedFace {Twisted face} "; (*testout) << "Face " << i << " is twisted" << endl; str << "TwistedFace/Face" << i << " "; str << "{Face " << i << " } "; } } cout << "done" << endl; cout << "checking edges ... " << flush; // double dmax; // int cnt = 0; Array edgeLengths; Array order; edgeLengths.SetSize (emap.Extent()); order.SetSize (emap.Extent()); for (i = 1; i <= emap.Extent(); i++) { TopoDS_Edge edge1 = TopoDS::Edge (emap(i)); GProp_GProps system; BRepGProp::LinearProperties(edge1, system); edgeLengths[i-1] = system.Mass(); } Sort (edgeLengths, order); str << "ShortestEdges {Shortest edges} "; for (i = 1; i <= min(20, emap.Extent()); i++) { str << "ShortestEdges/Edge" << i; str << " {Edge " << order[i-1] << " (L=" << edgeLengths[order[i-1]-1] << ")} "; } str << flush; cout << "done" << endl; } void OCCGeometry :: GetUnmeshedFaceInfo (stringstream & str) { for (int i = 1; i <= fmap.Extent(); i++) { if (facemeshstatus[i-1] == -1) str << "Face" << i << " {Face " << i << " } "; } str << flush; } void OCCGeometry :: GetNotDrawableFaces (stringstream & str) { for (int i = 1; i <= fmap.Extent(); i++) { if (!fvispar[i-1].IsDrawable()) str << "Face" << i << " {Face " << i << " } "; } str << flush; } bool OCCGeometry :: ErrorInSurfaceMeshing () { for (int i = 1; i <= fmap.Extent(); i++) if (facemeshstatus[i-1] == -1) return true; return false; } int OCCGeometry :: GenerateMesh (shared_ptr & mesh, MeshingParameters & mparam) { return OCCGenerateMesh (*this, mesh, mparam); } const Refinement & OCCGeometry :: GetRefinement () const { return * new OCCRefinementSurfaces (*this); } OCCParameters :: OCCParameters() { resthcloseedgefac = 1; resthcloseedgeenable = 1; resthminedgelen = 0.001; resthminedgelenenable = 1; } void OCCParameters :: Print(ostream & ost) const { ost << "OCC Parameters:" << endl << "close edges: " << resthcloseedgeenable << ", fac = " << resthcloseedgefac << endl << "minimum edge length: " << resthminedgelenenable << ", min len = " << resthminedgelen << endl; } OCCParameters occparam; } #endif netgen-6.2.1804/libsrc/occ/vsocc.cpp0000644000175000017500000004756713272137567015673 0ustar kurtkurt#ifndef NOTCL #ifdef OCCGEOMETRY #include #include #include #include #include "TopoDS_Shape.hxx" #include "TopoDS_Vertex.hxx" #include "TopExp_Explorer.hxx" #include "BRep_Tool.hxx" #include "TopoDS.hxx" #include "gp_Pnt.hxx" #include "Geom_Curve.hxx" #include "Poly_Triangulation.hxx" #include "Poly_Array1OfTriangle.hxx" #include "TColgp_Array1OfPnt2d.hxx" #include "Poly_Triangle.hxx" #include "Poly_Polygon3D.hxx" #include "Poly_PolygonOnTriangulation.hxx" #include #include "vsocc.hpp" namespace netgen { // extern OCCGeometry * occgeometry; /* *********************** Draw OCC Geometry **************** */ VisualSceneOCCGeometry :: VisualSceneOCCGeometry () : VisualScene() { trilists.SetSize(0); linelists.SetSize(1); } VisualSceneOCCGeometry :: ~VisualSceneOCCGeometry () { ; } void VisualSceneOCCGeometry :: DrawScene () { if ( occgeometry->changed ) { BuildScene(); occgeometry -> changed = 0; } glClearColor(backcolor, backcolor, backcolor, 1.0); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); SetLight(); glPushMatrix(); glMultMatrixd (transformationmat); glShadeModel (GL_SMOOTH); glDisable (GL_COLOR_MATERIAL); glPolygonMode (GL_FRONT_AND_BACK, GL_FILL); glEnable (GL_BLEND); glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // glEnable (GL_LIGHTING); double shine = vispar.shininess; // double transp = vispar.transp; glMaterialf (GL_FRONT_AND_BACK, GL_SHININESS, shine); glLogicOp (GL_COPY); glEnable (GL_NORMALIZE); float mat_col[] = { 0.2f, 0.2f, 0.8f, 1.0f}; glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_col); glPolygonOffset (1, 1); glEnable (GL_POLYGON_OFFSET_FILL); // Philippose - 30/01/2009 // Added clipping planes to Geometry view SetClippingPlane(); GLfloat matcoledge[] = { 0, 0, 1, 1}; GLfloat matcolhiedge[] = { 1, 0, 0, 1}; glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, matcoledge); glLineWidth (1.0f); if (vispar.occshowedges) glCallList (linelists.Get(1)); if (vispar.occshowsurfaces) glCallList (trilists.Get(1)); glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, matcolhiedge); glLineWidth (5.0f); if (vispar.occshowedges) glCallList (linelists.Get(2)); for (int i = 1; i <= occgeometry->vmap.Extent(); i++) if (occgeometry->vvispar[i-1].IsHighlighted()) { glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, matcolhiedge); glLineWidth (5.0f); glBegin (GL_LINES); gp_Pnt p = BRep_Tool::Pnt(TopoDS::Vertex(occgeometry->vmap(i))); double d = rad/100; glVertex3f (p.X()-d, p.Y(), p.Z()); glVertex3f (p.X()+d, p.Y(), p.Z()); glVertex3f (p.X(), p.Y()-d, p.Z()); glVertex3f (p.X(), p.Y()+d, p.Z()); glVertex3f (p.X(), p.Y(), p.Z()-d); glVertex3f (p.X(), p.Y(), p.Z()+d); glEnd(); } glDisable (GL_POLYGON_OFFSET_FILL); glPopMatrix(); // DrawCoordinateCross (); // DrawNetgenLogo (); glFinish(); glDisable (GL_POLYGON_OFFSET_FILL); } /* void VisualSceneOCCGeometry :: BuildScene (int zoomall) { int i = 0, j, k; TopExp_Explorer ex, ex_edge; if (vispar.occvisproblemfaces || (occgeometry -> changed != 2)) { Box<3> bb = occgeometry -> GetBoundingBox(); center = bb.Center(); rad = bb.Diam() / 2; if (vispar.occvisproblemfaces) { for (i = 1; i <= occgeometry->fmap.Extent(); i++) if (occgeometry->facemeshstatus[i-1] == -1) { GProp_GProps system; BRepGProp::LinearProperties(occgeometry->fmap(i), system); gp_Pnt pnt = system.CentreOfMass(); center = Point<3> (pnt.X(), pnt.Y(), pnt.Z()); cout << "Setting center to mid of face " << i << " = " << center << endl; } } CalcTransformationMatrices(); } for (i = 1; i <= linelists.Size(); i++) glDeleteLists (linelists.Elem(i), 1); linelists.SetSize(0); linelists.Append (glGenLists (1)); glNewList (linelists.Last(), GL_COMPILE); i = 0; for (ex_edge.Init(occgeometry -> shape, TopAbs_EDGE); ex_edge.More(); ex_edge.Next()) { if (BRep_Tool::Degenerated(TopoDS::Edge(ex_edge.Current()))) continue; i++; TopoDS_Edge edge = TopoDS::Edge(ex_edge.Current()); Handle(Poly_PolygonOnTriangulation) aEdgePoly; Handle(Poly_Triangulation) T; TopLoc_Location aEdgeLoc; BRep_Tool::PolygonOnTriangulation(edge, aEdgePoly, T, aEdgeLoc); if(aEdgePoly.IsNull()) { cout << "cannot visualize edge " << i << endl; continue; } glBegin (GL_LINE_STRIP); int nbnodes = aEdgePoly -> NbNodes(); for (j = 1; j <= nbnodes; j++) { gp_Pnt p = (T -> Nodes())(aEdgePoly->Nodes()(j)).Transformed(aEdgeLoc); glVertex3f (p.X(), p.Y(), p.Z()); } glEnd (); } glEndList (); for (i = 1; i <= trilists.Size(); i++) glDeleteLists (trilists.Elem(i), 1); trilists.SetSize(0); trilists.Append (glGenLists (1)); glNewList (trilists.Last(), GL_COMPILE); i = 0; TopExp_Explorer exp0, exp1, exp2, exp3; int shapenr = 0; for (exp0.Init(occgeometry -> shape, TopAbs_SOLID); exp0.More(); exp0.Next()) { shapenr++; if (vispar.occshowvolumenr != 0 && vispar.occshowvolumenr != shapenr) continue; float mat_col[4]; mat_col[3] = 1; switch (shapenr) { case 1: mat_col[0] = 0.2; mat_col[1] = 0.2; mat_col[2] = 0.8; break; case 2: mat_col[0] = 0.8; mat_col[1] = 0.2; mat_col[2] = 0.8; break; case 3: mat_col[0] = 0.2; mat_col[1] = 0.8; mat_col[2] = 0.8; break; case 4: mat_col[0] = 0.8; mat_col[1] = 0.2; mat_col[2] = 0.2; break; case 5: mat_col[0] = 0.8; mat_col[1] = 0.8; mat_col[2] = 0.8; break; case 6: mat_col[0] = 0.6; mat_col[1] = 0.6; mat_col[2] = 0.6; break; case 7: mat_col[0] = 0.2; mat_col[1] = 0.8; mat_col[2] = 0.2; break; case 8: mat_col[0] = 0.8; mat_col[1] = 0.8; mat_col[2] = 0.2; break; default: // mat_col[0] = 1-(1.0/double(shapenr)); // mat_col[1] = 0.5; mat_col[0] = 0.5+double((shapenr*shapenr*shapenr*shapenr) % 10)/20.0; mat_col[1] = 0.5+double(int(shapenr*shapenr*shapenr*shapenr*sin(double(shapenr))) % 10)/20.0; mat_col[2] = 0.5+double((shapenr*shapenr*shapenr) % 10)/20.0; } glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_col); for (exp1.Init(exp0.Current(), TopAbs_SHELL); exp1.More(); exp1.Next()) for (exp2.Init(exp1.Current().Composed(exp0.Current().Orientation()), TopAbs_FACE); exp2.More(); exp2.Next()) { TopoDS_Face face = TopoDS::Face (exp2.Current().Composed(exp1.Current().Orientation())); i = occgeometry->fmap.FindIndex(face); TopLoc_Location loc; Handle(Geom_Surface) surf = BRep_Tool::Surface (face); BRepAdaptor_Surface sf(face, Standard_False); BRepLProp_SLProps prop(sf, 1, 1e-5); Handle(Poly_Triangulation) triangulation = BRep_Tool::Triangulation (face, loc); if (triangulation.IsNull()) { cout << "cannot visualize face " << i << endl; continue; } if (vispar.occvisproblemfaces) { switch (occgeometry->facemeshstatus[i-1]) { case 0: mat_col[0] = 0.2; mat_col[1] = 0.2; mat_col[2] = 0.8; break; case 1: mat_col[0] = 0.2; mat_col[1] = 0.8; mat_col[2] = 0.2; break; case -1: mat_col[0] = 0.8; mat_col[1] = 0.2; mat_col[2] = 0.2; break; } glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_col); } glBegin (GL_TRIANGLES); int ntriangles = triangulation -> NbTriangles(); for (j = 1; j <= ntriangles; j++) { Poly_Triangle triangle = (triangulation -> Triangles())(j); for (k = 1; k <= 3; k++) { gp_Pnt2d uv = (triangulation -> UVNodes())(triangle(k)); gp_Pnt pnt; gp_Vec du, dv; prop.SetParameters (uv.X(), uv.Y()); surf->D0 (uv.X(), uv.Y(), pnt); gp_Vec n; if (prop.IsNormalDefined()) n = prop.Normal(); else n = gp_Vec (0,0,0); if (face.Orientation() == TopAbs_REVERSED) n *= -1; glNormal3f (n.X(), n.Y(), n.Z()); glVertex3f (pnt.X(), pnt.Y(), pnt.Z()); } } glEnd (); } } glEndList (); } */ void VisualSceneOCCGeometry :: BuildScene (int zoomall) { if (occgeometry -> changed == OCCGEOMETRYVISUALIZATIONFULLCHANGE) { occgeometry -> BuildVisualizationMesh (vispar.occdeflection); center = occgeometry -> Center(); rad = occgeometry -> GetBoundingBox().Diam() / 2; if (vispar.occzoomtohighlightedentity) { bool hilite = false; bool hiliteonepoint = false; Bnd_Box bb; for (int i = 1; i <= occgeometry->fmap.Extent(); i++) if (occgeometry->fvispar[i-1].IsHighlighted()) { hilite = true; BRepBndLib::Add (occgeometry->fmap(i), bb); } for (int i = 1; i <= occgeometry->emap.Extent(); i++) if (occgeometry->evispar[i-1].IsHighlighted()) { hilite = true; BRepBndLib::Add (occgeometry->emap(i), bb); } for (int i = 1; i <= occgeometry->vmap.Extent(); i++) if (occgeometry->vvispar[i-1].IsHighlighted()) { hiliteonepoint = true; BRepBndLib::Add (occgeometry->vmap(i), bb); } if (hilite || hiliteonepoint) { double x1,y1,z1,x2,y2,z2; bb.Get (x1,y1,z1,x2,y2,z2); Point<3> p1 = Point<3> (x1,y1,z1); Point<3> p2 = Point<3> (x2,y2,z2); Box<3> boundingbox(p1,p2); center = boundingbox.Center(); if (hiliteonepoint) rad = occgeometry -> GetBoundingBox().Diam() / 100; else rad = boundingbox.Diam() / 2; } } CalcTransformationMatrices(); } // Clear lists for (int i = 1; i <= linelists.Size(); i++) glDeleteLists (linelists.Elem(i), 1); linelists.SetSize(0); for (int i = 1; i <= trilists.Size(); i++) glDeleteLists (trilists.Elem(i), 1); trilists.SetSize(0); // Total wireframe linelists.Append (glGenLists (1)); glNewList (linelists.Last(), GL_COMPILE); for (int i = 1; i <= occgeometry->emap.Extent(); i++) { TopoDS_Edge edge = TopoDS::Edge(occgeometry->emap(i)); if (BRep_Tool::Degenerated(edge)) continue; if (occgeometry->evispar[i-1].IsHighlighted()) continue; Handle(Poly_PolygonOnTriangulation) aEdgePoly; Handle(Poly_Triangulation) T; TopLoc_Location aEdgeLoc; BRep_Tool::PolygonOnTriangulation(edge, aEdgePoly, T, aEdgeLoc); if(aEdgePoly.IsNull()) { (*testout) << "visualizing edge " << occgeometry->emap.FindIndex (edge) << " without using the occ visualization triangulation" << endl; double s0, s1; Handle(Geom_Curve) c = BRep_Tool::Curve(edge, s0, s1); glBegin (GL_LINE_STRIP); for (int i = 0; i<=50; i++) { gp_Pnt p = c->Value (s0 + i*(s1-s0)/50.0); glVertex3f (p.X(),p.Y(),p.Z()); } glEnd (); continue; } int nbnodes = aEdgePoly -> NbNodes(); glBegin (GL_LINE_STRIP); for (int j = 1; j <= nbnodes; j++) { gp_Pnt p = (T -> Nodes())(aEdgePoly->Nodes()(j)).Transformed(aEdgeLoc); glVertex3f (p.X(), p.Y(), p.Z()); } glEnd (); } glEndList (); // Highlighted edge list linelists.Append (glGenLists (1)); glNewList (linelists.Last(), GL_COMPILE); for (int i = 1; i <= occgeometry->emap.Extent(); i++) if (occgeometry->evispar[i-1].IsHighlighted()) { TopoDS_Edge edge = TopoDS::Edge(occgeometry->emap(i)); if (BRep_Tool::Degenerated(edge)) continue; Handle(Poly_PolygonOnTriangulation) aEdgePoly; Handle(Poly_Triangulation) T; TopLoc_Location aEdgeLoc; BRep_Tool::PolygonOnTriangulation(edge, aEdgePoly, T, aEdgeLoc); if(aEdgePoly.IsNull()) { (*testout) << "visualizing edge " << occgeometry->emap.FindIndex (edge) << " without using the occ visualization triangulation" << endl; double s0, s1; Handle(Geom_Curve) c = BRep_Tool::Curve(edge, s0, s1); glBegin (GL_LINE_STRIP); for (int i = 0; i<=50; i++) { gp_Pnt p = c->Value (s0 + i*(s1-s0)/50.0); glVertex3f (p.X(),p.Y(),p.Z()); } glEnd (); continue; } int nbnodes = aEdgePoly -> NbNodes(); glBegin (GL_LINE_STRIP); for (int j = 1; j <= nbnodes; j++) { gp_Pnt p = (T -> Nodes())(aEdgePoly->Nodes()(j)).Transformed(aEdgeLoc); glVertex3f (p.X(), p.Y(), p.Z()); } glEnd (); } glEndList (); // display faces trilists.Append (glGenLists (1)); glNewList (trilists.Last(), GL_COMPILE); for (int i = 1; i <= occgeometry->fmap.Extent(); i++) { if (!occgeometry->fvispar[i-1].IsVisible()) continue; glLoadName (i); float mat_col[4]; mat_col[3] = 1; TopoDS_Face face = TopoDS::Face(occgeometry->fmap(i)); if (!occgeometry->fvispar[i-1].IsHighlighted()) { // Philippose - 30/01/2009 // OpenCascade XDE Support Quantity_Color face_colour; // Philippose - 23/02/2009 // Check to see if colours have been extracted first!! // Forum bug-fox (Jean-Yves - 23/02/2009) if(!(occgeometry->face_colours.IsNull()) && (occgeometry->face_colours->GetColor(face,XCAFDoc_ColorSurf,face_colour))) { mat_col[0] = face_colour.Red(); mat_col[1] = face_colour.Green(); mat_col[2] = face_colour.Blue(); } else { mat_col[0] = 0.0; mat_col[1] = 1.0; mat_col[2] = 0.0; } } else { mat_col[0] = 0.8; mat_col[1] = 0.2; mat_col[2] = 0.2; } glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_col); TopLoc_Location loc; Handle(Geom_Surface) surf = BRep_Tool::Surface (face); BRepAdaptor_Surface sf(face, Standard_False); BRepLProp_SLProps prop(sf, 1, 1e-5); Handle(Poly_Triangulation) triangulation = BRep_Tool::Triangulation (face, loc); if (triangulation.IsNull()) { cout << "cannot visualize face " << i << endl; occgeometry->fvispar[i-1].SetNotDrawable(); continue; } gp_Pnt2d uv; gp_Pnt pnt; gp_Vec n; glBegin (GL_TRIANGLES); int ntriangles = triangulation -> NbTriangles(); for (int j = 1; j <= ntriangles; j++) { Poly_Triangle triangle = (triangulation -> Triangles())(j); gp_Pnt p[3]; for (int k = 1; k <= 3; k++) p[k-1] = (triangulation -> Nodes())(triangle(k)).Transformed(loc); for (int k = 1; k <= 3; k++) { uv = (triangulation -> UVNodes())(triangle(k)); prop.SetParameters (uv.X(), uv.Y()); // surf->D0 (uv.X(), uv.Y(), pnt); if (prop.IsNormalDefined()) n = prop.Normal(); else { (*testout) << "Visualization of face " << i << ": Normal vector not defined" << endl; // n = gp_Vec (0,0,0); gp_Vec a(p[0],p[1]); gp_Vec b(p[0],p[2]); n = b^a; } if (face.Orientation() == TopAbs_REVERSED) n *= -1; glNormal3f (n.X(), n.Y(), n.Z()); glVertex3f (p[k-1].X(), p[k-1].Y(), p[k-1].Z()); } } glEnd (); } glEndList (); } void SelectFaceInOCCDialogTree (int facenr); void VisualSceneOCCGeometry :: MouseDblClick (int px, int py) { int hits; // select surface triangle by mouse click GLuint selbuf[10000]; glSelectBuffer (10000, selbuf); glRenderMode (GL_SELECT); GLint viewport[4]; glGetIntegerv (GL_VIEWPORT, viewport); glMatrixMode (GL_PROJECTION); glPushMatrix(); GLdouble projmat[16]; glGetDoublev (GL_PROJECTION_MATRIX, projmat); glLoadIdentity(); gluPickMatrix (px, viewport[3] - py, 1, 1, viewport); glMultMatrixd (projmat); glClearColor(backcolor, backcolor, backcolor, 1.0); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glMatrixMode (GL_MODELVIEW); glPushMatrix(); glMultMatrixd (transformationmat); glInitNames(); glPushName (1); glPolygonOffset (1, 1); glEnable (GL_POLYGON_OFFSET_FILL); glDisable(GL_CLIP_PLANE0); // Philippose - 30/01/2009 // Enable clipping planes for Selection mode in OCC Geometry if (vispar.clipping.enable) { Vec<3> n(clipplane[0], clipplane[1], clipplane[2]); double len = Abs(n); double mu = -clipplane[3] / (len*len); Point<3> p (mu * n); n /= len; Vec<3> t1 = n.GetNormal (); Vec<3> t2 = Cross (n, t1); double xi1mid = (center - p) * t1; double xi2mid = (center - p) * t2; glLoadName (0); glBegin (GL_QUADS); glVertex3dv (p + (xi1mid-rad) * t1 + (xi2mid-rad) * t2); glVertex3dv (p + (xi1mid+rad) * t1 + (xi2mid-rad) * t2); glVertex3dv (p + (xi1mid+rad) * t1 + (xi2mid+rad) * t2); glVertex3dv (p + (xi1mid-rad) * t1 + (xi2mid+rad) * t2); glEnd (); } glCallList (trilists.Get(1)); glDisable (GL_POLYGON_OFFSET_FILL); glPopName(); glMatrixMode (GL_PROJECTION); glPopMatrix(); glMatrixMode (GL_MODELVIEW); glPopMatrix(); glFlush(); hits = glRenderMode (GL_RENDER); int minname = 0; GLuint mindepth = 0; // find clippingplane GLuint clipdepth = 0; // GLuint(-1); for (int i = 0; i < hits; i++) { int curname = selbuf[4*i+3]; if (!curname) clipdepth = selbuf[4*i+1]; } for (int i = 0; i < hits; i++) { int curname = selbuf[4*i+3]; GLuint curdepth = selbuf[4*i+1]; if (curname && (curdepth> clipdepth) && (curdepth < mindepth || !minname)) { mindepth = curdepth; minname = curname; } } occgeometry->LowLightAll(); if (minname) { occgeometry->fvispar[minname-1].Highlight(); if (vispar.occzoomtohighlightedentity) occgeometry->changed = OCCGEOMETRYVISUALIZATIONFULLCHANGE; else occgeometry->changed = OCCGEOMETRYVISUALIZATIONHALFCHANGE; cout << "Selected face: " << minname << endl; } else { occgeometry->changed = OCCGEOMETRYVISUALIZATIONHALFCHANGE; } glDisable(GL_CLIP_PLANE0); SelectFaceInOCCDialogTree (minname); // Philippose - 30/01/2009 // Set the currently selected face in the array // for local face mesh size definition occgeometry->SetSelectedFace(minname); // selecttimestamp = NextTimeStamp(); } } #endif #endif // NOTCL netgen-6.2.1804/libsrc/occ/occpkg.cpp0000644000175000017500000007115113272137567016006 0ustar kurtkurt#ifdef OCCGEOMETRY #include #include #include #include #include #include #include #include #include "../meshing/bcfunctions.hpp" #include "vsocc.hpp" // __declspec(dllimport) void AutoColourBcProps(Mesh & mesh, const char *bccolourfile); // __declspec(dllimport) void GetFaceColours(Mesh & mesh, Array & face_colours); // __declspec(dllimport) bool ColourMatch(Vec3d col1, Vec3d col2, double eps = 2.5e-05); extern "C" int Ng_occ_Init (Tcl_Interp * interp); namespace netgen { extern DLL_HEADER shared_ptr ng_geometry; extern DLL_HEADER shared_ptr mesh; char * err_needsoccgeometry = (char*) "This operation needs an OCC geometry"; extern char * err_needsmesh; extern char * err_jobrunning; class OCCGeometryRegister : public GeometryRegister { public: virtual NetgenGeometry * Load (string filename) const; virtual VisualScene * GetVisualScene (const NetgenGeometry * geom) const; virtual void SetParameters (Tcl_Interp * interp) { occparam.resthcloseedgefac = atof (Tcl_GetVar (interp, "::stloptions.resthcloseedgefac", 0)); occparam.resthcloseedgeenable = atoi (Tcl_GetVar (interp, "::stloptions.resthcloseedgeenable", 0)); occparam.resthminedgelen = atof (Tcl_GetVar (interp, "::stloptions.resthminedgelen", 0)); occparam.resthminedgelenenable = atoi (Tcl_GetVar (interp, "::stloptions.resthminedgelenenable", 0)); } }; int Ng_SetOCCVisParameters (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { #ifdef OCCGEOMETRY int showvolume; OCCGeometry * occgeometry = dynamic_cast (ng_geometry.get()); showvolume = atoi (Tcl_GetVar (interp, "::occoptions.showvolumenr", 0)); if (occgeometry) if (showvolume != vispar.occshowvolumenr) { if (showvolume < 0 || showvolume > occgeometry->NrSolids()) { char buf[20]; sprintf (buf, "%5i", vispar.occshowvolumenr); Tcl_SetVar (interp, "::occoptions.showvolumenr", buf, 0); } else { vispar.occshowvolumenr = showvolume; if (occgeometry) occgeometry -> changed = OCCGEOMETRYVISUALIZATIONHALFCHANGE; } } int temp; temp = atoi (Tcl_GetVar (interp, "::occoptions.visproblemfaces", 0)); if ((bool) temp != vispar.occvisproblemfaces) { vispar.occvisproblemfaces = temp; if (occgeometry) occgeometry -> changed = OCCGEOMETRYVISUALIZATIONHALFCHANGE; } vispar.occshowsurfaces = atoi (Tcl_GetVar (interp, "::occoptions.showsurfaces", 0)); vispar.occshowedges = atoi (Tcl_GetVar (interp, "::occoptions.showedges", 0)); vispar.occzoomtohighlightedentity = atoi (Tcl_GetVar (interp, "::occoptions.zoomtohighlightedentity", 0)); vispar.occdeflection = pow(10.0,-1-atof (Tcl_GetVar (interp, "::occoptions.deflection", 0))); #endif #ifdef ACIS vispar.ACISshowfaces = atoi (Tcl_GetVar (interp, "::occoptions.showsurfaces", 0)); vispar.ACISshowedges = atoi (Tcl_GetVar (interp, "::occoptions.showedges", 0)); vispar.ACISshowsolidnr = atoi (Tcl_GetVar (interp, "::occoptions.showsolidnr", 0)); vispar.ACISshowsolidnr2 = atoi (Tcl_GetVar (interp, "::occoptions.showsolidnr2", 0)); #endif return TCL_OK; } int Ng_GetOCCData (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { #ifdef OCCGEOMETRY OCCGeometry * occgeometry = dynamic_cast (ng_geometry.get()); // static char buf[1000]; // buf[0] = 0; stringstream str; if (argc >= 2) { if (strcmp (argv[1], "getentities") == 0) { if (occgeometry) { occgeometry->GetTopologyTree(str); } } } Tcl_SetResult (interp, (char*)str.str().c_str(), TCL_VOLATILE); #endif return TCL_OK; } int Ng_OCCCommand (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { #ifdef OCCGEOMETRY OCCGeometry * occgeometry = dynamic_cast (ng_geometry.get()); stringstream str; if (argc >= 2) { if (strcmp (argv[1], "isoccgeometryloaded") == 0) { if (occgeometry) str << "1 " << flush; else str << "0 " << flush; Tcl_SetResult (interp, (char*)str.str().c_str(), TCL_VOLATILE); } if (occgeometry) { if (strcmp (argv[1], "buildvisualizationmesh") == 0) { occgeometry->BuildVisualizationMesh(vispar.occdeflection); occgeometry->changed = OCCGEOMETRYVISUALIZATIONHALFCHANGE; } if (strcmp (argv[1], "mesherror") == 0) { if (occgeometry->ErrorInSurfaceMeshing()) str << 1; else str << 0; } if (strcmp (argv[1], "sewfaces") == 0) { cout << "Before operation:" << endl; occgeometry->PrintNrShapes(); occgeometry->SewFaces(); occgeometry->BuildFMap(); cout << endl << "After operation:" << endl; occgeometry->PrintNrShapes(); occgeometry->BuildVisualizationMesh(vispar.occdeflection); occgeometry->changed = OCCGEOMETRYVISUALIZATIONHALFCHANGE; } if (strcmp (argv[1], "makesolid") == 0) { cout << "Before operation:" << endl; occgeometry->PrintNrShapes(); occgeometry->MakeSolid(); occgeometry->BuildFMap(); cout << endl << "After operation:" << endl; occgeometry->PrintNrShapes(); occgeometry->BuildVisualizationMesh(vispar.occdeflection); occgeometry->changed = OCCGEOMETRYVISUALIZATIONHALFCHANGE; } if (strcmp (argv[1], "upgradetopology") == 0) { cout << "Before operation:" << endl; occgeometry->PrintNrShapes(); occgeometry->SewFaces(); occgeometry->MakeSolid(); occgeometry->BuildFMap(); cout << endl << "After operation:" << endl; occgeometry->PrintNrShapes(); occgeometry->BuildVisualizationMesh(vispar.occdeflection); occgeometry->changed = OCCGEOMETRYVISUALIZATIONHALFCHANGE; } if (strcmp (argv[1], "shapehealing") == 0) { occgeometry->tolerance = atof (Tcl_GetVar (interp, "::occoptions.tolerance", 0)); occgeometry->fixsmalledges = atoi (Tcl_GetVar (interp, "::occoptions.fixsmalledges", 0)); occgeometry->fixspotstripfaces = atoi (Tcl_GetVar (interp, "::occoptions.fixspotstripfaces", 0)); occgeometry->sewfaces = atoi (Tcl_GetVar (interp, "::occoptions.sewfaces", 0)); occgeometry->makesolids = atoi (Tcl_GetVar (interp, "::occoptions.makesolids", 0)); occgeometry->splitpartitions = atoi (Tcl_GetVar (interp, "::occoptions.splitpartitions", 0)); // cout << "Before operation:" << endl; // occgeometry->PrintNrShapes(); occgeometry->HealGeometry(); occgeometry->BuildFMap(); // cout << endl << "After operation:" << endl; // occgeometry->PrintNrShapes(); occgeometry->BuildVisualizationMesh(vispar.occdeflection); occgeometry->changed = OCCGEOMETRYVISUALIZATIONHALFCHANGE; } if (strcmp (argv[1], "highlightentity") == 0) { if (strcmp (argv[2], "Face") == 0) { int nr = atoi (argv[3]); occgeometry->LowLightAll(); occgeometry->fvispar[nr-1].Highlight(); if (vispar.occzoomtohighlightedentity) occgeometry->changed = OCCGEOMETRYVISUALIZATIONFULLCHANGE; else occgeometry->changed = OCCGEOMETRYVISUALIZATIONHALFCHANGE; } if (strcmp (argv[2], "Shell") == 0) { int nr = atoi (argv[3]); occgeometry->LowLightAll(); TopExp_Explorer exp; for (exp.Init (occgeometry->shmap(nr), TopAbs_FACE); exp.More(); exp.Next()) { int i = occgeometry->fmap.FindIndex (TopoDS::Face(exp.Current())); occgeometry->fvispar[i-1].Highlight(); } if (vispar.occzoomtohighlightedentity) occgeometry->changed = OCCGEOMETRYVISUALIZATIONFULLCHANGE; else occgeometry->changed = OCCGEOMETRYVISUALIZATIONHALFCHANGE; } if (strcmp (argv[2], "Solid") == 0) { int nr = atoi (argv[3]); occgeometry->LowLightAll(); TopExp_Explorer exp; for (exp.Init (occgeometry->somap(nr), TopAbs_FACE); exp.More(); exp.Next()) { int i = occgeometry->fmap.FindIndex (TopoDS::Face(exp.Current())); occgeometry->fvispar[i-1].Highlight(); } if (vispar.occzoomtohighlightedentity) occgeometry->changed = OCCGEOMETRYVISUALIZATIONFULLCHANGE; else occgeometry->changed = OCCGEOMETRYVISUALIZATIONHALFCHANGE; } /* if (strcmp (argv[2], "CompSolid") == 0) { int nr = atoi (argv[3]); occgeometry->LowLightAll(); TopExp_Explorer exp; for (exp.Init (occgeometry->cmap(nr), TopAbs_FACE); exp.More(); exp.Next()) { int i = occgeometry->fmap.FindIndex (TopoDS::Face(exp.Current())); occgeometry->fvispar[i-1].Highlight(); } occgeometry->changed = OCCGEOMETRYVISUALIZATIONHALFCHANGE; } */ if (strcmp (argv[2], "Edge") == 0) { int nr = atoi (argv[3]); occgeometry->LowLightAll(); occgeometry->evispar[nr-1].Highlight(); if (vispar.occzoomtohighlightedentity) occgeometry->changed = OCCGEOMETRYVISUALIZATIONFULLCHANGE; else occgeometry->changed = OCCGEOMETRYVISUALIZATIONHALFCHANGE; } if (strcmp (argv[2], "Wire") == 0) { int nr = atoi (argv[3]); occgeometry->LowLightAll(); TopExp_Explorer exp; for (exp.Init (occgeometry->wmap(nr), TopAbs_EDGE); exp.More(); exp.Next()) { int i = occgeometry->emap.FindIndex (TopoDS::Edge(exp.Current())); occgeometry->evispar[i-1].Highlight(); } if (vispar.occzoomtohighlightedentity) occgeometry->changed = OCCGEOMETRYVISUALIZATIONFULLCHANGE; else occgeometry->changed = OCCGEOMETRYVISUALIZATIONHALFCHANGE; } if (strcmp (argv[2], "Vertex") == 0) { int nr = atoi (argv[3]); occgeometry->LowLightAll(); occgeometry->vvispar[nr-1].Highlight(); if (vispar.occzoomtohighlightedentity) occgeometry->changed = OCCGEOMETRYVISUALIZATIONFULLCHANGE; else occgeometry->changed = OCCGEOMETRYVISUALIZATIONHALFCHANGE; } } if (strcmp (argv[1], "show") == 0) { int nr = atoi (argv[3]); occgeometry->changed = OCCGEOMETRYVISUALIZATIONHALFCHANGE; if (strcmp (argv[2], "Face") == 0) { occgeometry->fvispar[nr-1].Show(); } if (strcmp (argv[2], "Shell") == 0) { TopExp_Explorer exp; for (exp.Init (occgeometry->shmap(nr), TopAbs_FACE); exp.More(); exp.Next()) { int i = occgeometry->fmap.FindIndex (TopoDS::Face(exp.Current())); occgeometry->fvispar[i-1].Show(); } } if (strcmp (argv[2], "Solid") == 0) { TopExp_Explorer exp; for (exp.Init (occgeometry->somap(nr), TopAbs_FACE); exp.More(); exp.Next()) { int i = occgeometry->fmap.FindIndex (TopoDS::Face(exp.Current())); occgeometry->fvispar[i-1].Show(); } } if (strcmp (argv[2], "Edge") == 0) { occgeometry->evispar[nr-1].Show(); } if (strcmp (argv[2], "Wire") == 0) { TopExp_Explorer exp; for (exp.Init (occgeometry->wmap(nr), TopAbs_EDGE); exp.More(); exp.Next()) { int i = occgeometry->emap.FindIndex (TopoDS::Edge(exp.Current())); occgeometry->evispar[i-1].Show(); } } } if (strcmp (argv[1], "hide") == 0) { int nr = atoi (argv[3]); occgeometry->changed = OCCGEOMETRYVISUALIZATIONHALFCHANGE; if (strcmp (argv[2], "Face") == 0) { occgeometry->fvispar[nr-1].Hide(); } if (strcmp (argv[2], "Shell") == 0) { TopExp_Explorer exp; for (exp.Init (occgeometry->shmap(nr), TopAbs_FACE); exp.More(); exp.Next()) { int i = occgeometry->fmap.FindIndex (TopoDS::Face(exp.Current())); occgeometry->fvispar[i-1].Hide(); } } if (strcmp (argv[2], "Solid") == 0) { TopExp_Explorer exp; for (exp.Init (occgeometry->somap(nr), TopAbs_FACE); exp.More(); exp.Next()) { int i = occgeometry->fmap.FindIndex (TopoDS::Face(exp.Current())); occgeometry->fvispar[i-1].Hide(); } } if (strcmp (argv[2], "Edge") == 0) { occgeometry->evispar[nr-1].Hide(); } if (strcmp (argv[2], "Wire") == 0) { TopExp_Explorer exp; for (exp.Init (occgeometry->wmap(nr), TopAbs_EDGE); exp.More(); exp.Next()) { int i = occgeometry->emap.FindIndex (TopoDS::Edge(exp.Current())); occgeometry->evispar[i-1].Hide(); } } } if (strcmp (argv[1], "findsmallentities") == 0) { stringstream str(""); occgeometry->CheckIrregularEntities(str); Tcl_SetResult (interp, (char*)str.str().c_str(), TCL_VOLATILE); } if (strcmp (argv[1], "getunmeshedfaceinfo") == 0) { occgeometry->GetUnmeshedFaceInfo(str); Tcl_SetResult (interp, (char*)str.str().c_str(), TCL_VOLATILE); } if (strcmp (argv[1], "getnotdrawablefaces") == 0) { occgeometry->GetNotDrawableFaces(str); Tcl_SetResult (interp, (char*)str.str().c_str(), TCL_VOLATILE); } if (strcmp (argv[1], "redrawstatus") == 0) { int i = atoi (argv[2]); occgeometry->changed = i; } if (strcmp (argv[1], "swaporientation") == 0) { IGESControl_Writer writer("millimeters", 1); writer.AddShape (occgeometry->shape); writer.Write ("1.igs"); /* int nr = atoi (argv[3]); // const_cast (occgeometry->fmap(nr)).Reverse(); Handle_ShapeBuild_ReShape rebuild = new ShapeBuild_ReShape; rebuild->Apply(occgeometry->shape); TopoDS_Shape sh; // if (strcmp (argv[2], "CompSolid") == 0) sh = occgeometry->cmap(nr); if (strcmp (argv[2], "Solid") == 0) sh = occgeometry->somap(nr); if (strcmp (argv[2], "Shell") == 0) sh = occgeometry->shmap(nr); if (strcmp (argv[2], "Face") == 0) sh = occgeometry->fmap(nr); if (strcmp (argv[2], "Wire") == 0) sh = occgeometry->wmap(nr); if (strcmp (argv[2], "Edge") == 0) sh = occgeometry->emap(nr); rebuild->Replace(sh, sh.Reversed(), Standard_False); TopoDS_Shape newshape = rebuild->Apply(occgeometry->shape, TopAbs_SHELL, 1); occgeometry->shape = newshape; occgeometry->BuildFMap(); occgeometry->BuildVisualizationMesh(); occgeometry->changed = OCCGEOMETRYVISUALIZATIONHALFCHANGE; */ } if (strcmp (argv[1], "marksingular") == 0) { int nr = atoi (argv[3]); cout << "marking " << argv[2] << " " << nr << endl; char buf[2]; buf[0] = '0'; buf[1] = 0; bool sing = false; if (strcmp (argv[2], "Face") == 0) sing = occgeometry->fsingular[nr-1] = !occgeometry->fsingular[nr-1]; if (strcmp (argv[2], "Edge") == 0) sing = occgeometry->esingular[nr-1] = !occgeometry->esingular[nr-1]; if (strcmp (argv[2], "Vertex") == 0) sing = occgeometry->vsingular[nr-1] = !occgeometry->vsingular[nr-1]; if (sing) buf[0] = '1'; Tcl_SetVar (interp, "::ismarkedsingular", buf, 0); stringstream str; occgeometry->GetTopologyTree (str); char* cstr = (char*)str.str().c_str(); (*testout) << cstr << endl; char helpstr[1000]; while (strchr (cstr, '}')) { strncpy (helpstr, cstr+2, strlen(strchr(cstr+2, '}'))); (*testout) << "***" << cstr << "***" << endl; cstr = strchr (cstr, '}'); } } } } #endif return TCL_OK; } #ifdef OCCGEOMETRY /* void OCCConstructGeometry (OCCGeometry & geom); int Ng_OCCConstruction (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { if (occgeometry) OCCConstructGeometry (*occgeometry); return TCL_OK; } */ #endif // Philippose - 30/01/2009 // TCL interface function for the Local Face Mesh size // definition functionality int Ng_SurfaceMeshSize (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { #ifdef OCCGEOMETRY static char buf[100]; if (argc < 2) { Tcl_SetResult (interp, (char *)"Ng_SurfaceMeshSize needs arguments", TCL_STATIC); return TCL_ERROR; } OCCGeometry * occgeometry = dynamic_cast (ng_geometry.get()); if (!occgeometry) { Tcl_SetResult (interp, (char *)"Ng_SurfaceMeshSize currently supports only OCC (STEP/IGES) Files", TCL_STATIC); return TCL_ERROR; } // Update the face mesh sizes to reflect the global maximum mesh size for(int i = 1; i <= occgeometry->NrFaces(); i++) { if(!occgeometry->GetFaceMaxhModified(i)) { occgeometry->SetFaceMaxH(i, mparam.maxh); } } if (strcmp (argv[1], "setsurfms") == 0) { int facenr = atoi (argv[2]); double surfms = atof (argv[3]); if (occgeometry && facenr >= 1 && facenr <= occgeometry->NrFaces()) occgeometry->SetFaceMaxH(facenr, surfms); } if (strcmp (argv[1], "setall") == 0) { double surfms = atof (argv[2]); if (occgeometry) { int nrFaces = occgeometry->NrFaces(); for (int i = 1; i <= nrFaces; i++) occgeometry->SetFaceMaxH(i, surfms); } } if (strcmp (argv[1], "getsurfms") == 0) { int facenr = atoi (argv[2]); if (occgeometry && facenr >= 1 && facenr <= occgeometry->NrFaces()) { sprintf (buf, "%5.2f", occgeometry->GetFaceMaxH(facenr)); } else { sprintf (buf, "%5.2f", mparam.maxh); } Tcl_SetResult (interp, buf, TCL_STATIC); } if (strcmp (argv[1], "getactive") == 0) { sprintf (buf, "%d", occgeometry->SelectedFace()); Tcl_SetResult (interp, buf, TCL_STATIC); } if (strcmp (argv[1], "setactive") == 0) { int facenr = atoi (argv[2]); if (occgeometry && facenr >= 1 && facenr <= occgeometry->NrFaces()) { occgeometry->SetSelectedFace (facenr); occgeometry->LowLightAll(); occgeometry->fvispar[facenr-1].Highlight(); occgeometry->changed = OCCGEOMETRYVISUALIZATIONHALFCHANGE; } } if (strcmp (argv[1], "getnfd") == 0) { if (occgeometry) sprintf (buf, "%d", occgeometry->NrFaces()); else sprintf (buf, "0"); Tcl_SetResult (interp, buf, TCL_STATIC); } return TCL_OK; #else // No OCCGEOMETRY Tcl_SetResult (interp, (char *)"Ng_SurfaceMeshSize currently supports only OCC (STEP/IGES) Files", TCL_STATIC); return TCL_ERROR; #endif // OCCGEOMETRY } // Philippose - 25/07/2010 // TCL interface function for extracting and eventually // setting or editing the current colours present in the mesh int Ng_CurrentFaceColours (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { if(argc < 1) { Tcl_SetResult (interp, (char *)"Ng_GetCurrentFaceColours needs arguments", TCL_STATIC); return TCL_ERROR; } if(!mesh) { Tcl_SetResult (interp, (char *)"Ng_GetCurrentFaceColours: Valid netgen mesh required...please mesh the Geometry first", TCL_STATIC); return TCL_ERROR; } if(strcmp(argv[1], "getcolours") == 0) { stringstream outVar; Array face_colours; GetFaceColours(*mesh, face_colours); for(int i = 0; i < face_colours.Size();i++) { outVar << "{ " << face_colours[i].X(1) << " " << face_colours[i].X(2) << " " << face_colours[i].X(3) << " } "; } tcl_const char * valuevar = argv[2]; Tcl_SetVar (interp, valuevar, (char*)outVar.str().c_str(), 0); } if(strcmp(argv[1], "showalso") == 0) { Array face_colours; GetFaceColours(*mesh,face_colours); int colourind = atoi (argv[2]); for(int i = 1; i <= mesh->GetNFD(); i++) { Array surfElems; mesh->GetSurfaceElementsOfFace(i,surfElems); if(ColourMatch(face_colours[colourind],mesh->GetFaceDescriptor(i).SurfColour())) { for(int j = 0; j < surfElems.Size(); j++) { mesh->SurfaceElement(surfElems[j]).Visible(1); } } } mesh->SetNextTimeStamp(); } if(strcmp(argv[1], "hidealso") == 0) { Array face_colours; GetFaceColours(*mesh,face_colours); int colourind = atoi (argv[2]); for(int i = 1; i <= mesh->GetNFD(); i++) { Array surfElems; mesh->GetSurfaceElementsOfFace(i,surfElems); if(ColourMatch(face_colours[colourind],mesh->GetFaceDescriptor(i).SurfColour())) { for(int j = 0; j < surfElems.Size(); j++) { mesh->SurfaceElement(surfElems[j]).Visible(0); } } } mesh->SetNextTimeStamp(); } if(strcmp(argv[1], "showonly") == 0) { Array face_colours; GetFaceColours(*mesh,face_colours); int colourind = atoi (argv[2]); for(int i = 1; i <= mesh->GetNFD(); i++) { Array surfElems; mesh->GetSurfaceElementsOfFace(i,surfElems); if(ColourMatch(face_colours[colourind],mesh->GetFaceDescriptor(i).SurfColour())) { for(int j = 0; j < surfElems.Size(); j++) { mesh->SurfaceElement(surfElems[j]).Visible(1); } } else { for(int j = 0; j < surfElems.Size(); j++) { mesh->SurfaceElement(surfElems[j]).Visible(0); } } } mesh->SetNextTimeStamp(); } if(strcmp(argv[1], "hideonly") == 0) { Array face_colours; GetFaceColours(*mesh,face_colours); int colourind = atoi (argv[2]); for(int i = 1; i <= mesh->GetNFD(); i++) { Array surfElems; mesh->GetSurfaceElementsOfFace(i,surfElems); if(ColourMatch(face_colours[colourind],mesh->GetFaceDescriptor(i).SurfColour())) { for(int j = 0; j < surfElems.Size(); j++) { mesh->SurfaceElement(surfElems[j]).Visible(0); } } else { for(int j = 0; j < surfElems.Size(); j++) { mesh->SurfaceElement(surfElems[j]).Visible(1); } } } mesh->SetNextTimeStamp(); } if(strcmp(argv[1], "showall") == 0) { for(int i = 1; i <= mesh->GetNSE(); i++) { mesh->SurfaceElement(i).Visible(1); } mesh->SetNextTimeStamp(); } if(strcmp(argv[1], "hideall") == 0) { for(int i = 1; i <= mesh->GetNSE(); i++) { mesh->SurfaceElement(i).Visible(0); } mesh->SetNextTimeStamp(); } return TCL_OK; } // Philippose - 10/03/2009 // TCL interface function for the Automatic Colour-based // definition of boundary conditions for OCC Geometry int Ng_AutoColourBcProps (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { if(argc < 1) { Tcl_SetResult (interp, (char *)"Ng_AutoColourBcProps needs arguments", TCL_STATIC); return TCL_ERROR; } if(!mesh) { Tcl_SetResult (interp, (char *)"Ng_AutoColourBcProps: Valid netgen mesh required...please mesh the Geometry first", TCL_STATIC); return TCL_ERROR; } if(strcmp(argv[1], "auto") == 0) { AutoColourBcProps(*mesh, 0); } if(strcmp(argv[1], "profile") == 0) { AutoColourBcProps(*mesh, argv[2]); } return TCL_OK; } int Ng_SetOCCParameters (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { OCCGeometryRegister reg; reg.SetParameters (interp); /* occparam.resthcloseedgefac = atof (Tcl_GetVar (interp, "::stloptions.resthcloseedgefac", 0)); occparam.resthcloseedgeenable = atoi (Tcl_GetVar (interp, "::stloptions.resthcloseedgeenable", 0)); */ return TCL_OK; } NetgenGeometry * OCCGeometryRegister :: Load (string filename) const { const char * lgfilename = filename.c_str(); /* if (strcmp (&cfilename[strlen(cfilename)-3], "geo") == 0) { PrintMessage (1, "Load OCCG geometry file ", cfilename); extern OCCGeometry * ParseOCCG (istream & istr); ifstream infile(cfilename); OCCGeometry * hgeom = ParseOCCG (infile); if (!hgeom) throw NgException ("geo-file should start with 'algebraic3d'"); hgeom -> FindIdenticSurfaces(1e-8 * hgeom->MaxSize()); return hgeom; } */ if ((strcmp (&lgfilename[strlen(lgfilename)-4], "iges") == 0) || (strcmp (&lgfilename[strlen(lgfilename)-3], "igs") == 0) || (strcmp (&lgfilename[strlen(lgfilename)-3], "IGS") == 0) || (strcmp (&lgfilename[strlen(lgfilename)-4], "IGES") == 0)) { PrintMessage (1, "Load IGES geometry file ", lgfilename); OCCGeometry * occgeometry = LoadOCC_IGES (lgfilename); return occgeometry; } else if ((strcmp (&lgfilename[strlen(lgfilename)-4], "step") == 0) || (strcmp (&lgfilename[strlen(lgfilename)-3], "stp") == 0) || (strcmp (&lgfilename[strlen(lgfilename)-3], "STP") == 0) || (strcmp (&lgfilename[strlen(lgfilename)-4], "STEP") == 0)) { PrintMessage (1, "Load STEP geometry file ", lgfilename); OCCGeometry * occgeometry = LoadOCC_STEP (lgfilename); return occgeometry; } else if ((strcmp (&lgfilename[strlen(lgfilename)-4], "brep") == 0) || (strcmp (&lgfilename[strlen(lgfilename)-4], "Brep") == 0) || (strcmp (&lgfilename[strlen(lgfilename)-4], "BREP") == 0)) { PrintMessage (1, "Load BREP geometry file ", lgfilename); OCCGeometry * occgeometry = LoadOCC_BREP (lgfilename); return occgeometry; } return NULL; } static VisualSceneOCCGeometry vsoccgeom; VisualScene * OCCGeometryRegister :: GetVisualScene (const NetgenGeometry * geom) const { OCCGeometry * geometry = dynamic_cast (ng_geometry.get()); if (geometry) { vsoccgeom.SetGeometry (geometry); return &vsoccgeom; } return NULL; } } using namespace netgen; int Ng_occ_Init (Tcl_Interp * interp) { geometryregister.Append (new OCCGeometryRegister); Tcl_CreateCommand (interp, "Ng_SetOCCVisParameters", Ng_SetOCCVisParameters, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_GetOCCData", Ng_GetOCCData, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); /* #ifdef OCCGEOMETRY Tcl_CreateCommand (interp, "Ng_OCCConstruction", Ng_OCCConstruction, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); #endif */ Tcl_CreateCommand (interp, "Ng_OCCCommand", Ng_OCCCommand, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_SetOCCParameters", Ng_SetOCCParameters, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); // Philippose - 30/01/2009 // Register the TCL Interface Command for local face mesh size // definition Tcl_CreateCommand (interp, "Ng_SurfaceMeshSize", Ng_SurfaceMeshSize, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_AutoColourBcProps", Ng_AutoColourBcProps, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); // Philippose - 25/07/2010 // Register the TCL Interface Command for handling the face colours // present in the mesh Tcl_CreateCommand(interp, "Ng_CurrentFaceColours", Ng_CurrentFaceColours, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); return TCL_OK; } #endif netgen-6.2.1804/libsrc/occ/Partition_Inter2d.hxx0000644000175000017500000000604013272137567020120 0ustar kurtkurt// GEOM PARTITION : partition algorithm // // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org // // // // File : Partition_Inter2d.hxx // Module : GEOM #ifndef _Partition_Inter2d_HeaderFile #define _Partition_Inter2d_HeaderFile #ifndef _Standard_Version_HeaderFile #include #endif #if OCC_VERSION_HEX < 0x070000 #ifndef _Handle_BRepAlgo_AsDes_HeaderFile #include #endif #else #include #include #endif #ifndef _Standard_Real_HeaderFile #include #endif #ifndef _Standard_Boolean_HeaderFile #include #endif class BRepAlgo_AsDes; class TopoDS_Face; #if OCC_VERSION_HEX < 0x070000 class TopTools_MapOfShape; class TopTools_ListOfShape; #endif class TopoDS_Vertex; class TopoDS_Edge; #ifndef _Standard_HeaderFile #include #endif #ifndef _Standard_Macro_HeaderFile #include #endif class Partition_Inter2d { public: void* operator new(size_t,void* anAddress) { return anAddress; } void* operator new(size_t size) { return Standard::Allocate(size); } void operator delete(void *anAddress) { if (anAddress) Standard::Free((Standard_Address&)anAddress); } // Methods PUBLIC // static void CompletPart2d(const Handle(BRepAlgo_AsDes)& AsDes,const TopoDS_Face& F,const TopTools_MapOfShape& NewEdges) ; static TopoDS_Vertex FindEndVertex(const TopTools_ListOfShape& VertList,const Standard_Real f,const Standard_Real l,const TopoDS_Edge& E,Standard_Boolean& First,Standard_Real& DU) ; static TopoDS_Vertex AddVonE(const TopoDS_Vertex& V,const TopoDS_Edge& E1,const TopoDS_Edge& E2,const Handle(BRepAlgo_AsDes)& AsDes,const TopoDS_Face& F) ; static Standard_Real GetTolerance(const TopoDS_Vertex& theV,const Standard_Real theU,const TopoDS_Edge& theE,const Handle(BRepAlgo_AsDes)& theAsDes) ; protected: // Methods PROTECTED // // Fields PROTECTED // private: // Methods PRIVATE // // Fields PRIVATE // }; // other Inline functions and methods (like "C++: function call" methods) // #endif netgen-6.2.1804/libsrc/occ/Partition_Loop.ixx0000644000175000017500000000206313272137567017524 0ustar kurtkurt// GEOM PARTITION : partition algorithm // // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org // // // // File : Partition_Loop.ixx // Module : GEOM #include "Partition_Loop.jxx" netgen-6.2.1804/libsrc/occ/utilities.h0000644000175000017500000000671013272137567016217 0ustar kurtkurt// SALOME Utils : general SALOME's definitions and tools // // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org // // // // File : utilities.h // Author : Antoine YESSAYAN, Paul RASCLE, EDF // Module : SALOME // $Header: /cvs/netgen/netgen/libsrc/occ/utilities.h,v 1.3 2008/03/31 14:20:28 wabro Exp $ /* --- Definition macros file to print information if _DEBUG_ is defined --- */ #ifndef UTILITIES_H #define UTILITIES_H #include #include #include // #include "SALOME_Log.hxx" /* --- INFOS is always defined (without _DEBUG_): to be used for warnings, with release version --- */ #define INFOS(msg) {SLog->putMessage(*SLog<<__FILE__<<" ["<<__LINE__<<"] : "<putMessage(*SLog<<"---PYSCRIPT--- "<putMessage(\ *SLog<<__FILE__<<" ["<< __LINE__<<"] : "\ << "COMPILED with " << COMPILER \ << ", " << __DATE__ \ << " at " << __TIME__ <putMessage( MYTRACE <putMessage( MYTRACE << #var << "=" << var < #include #if TK_MAJOR_VERSION==8 && TK_MINOR_VERSION>=4 #define tcl_const const #else #define tcl_const #endif netgen-6.2.1804/libsrc/include/mystdlib.h0000644000175000017500000000202113272137567016701 0ustar kurtkurt#ifndef FILE_MYSTDLIB #define FILE_MYSTDLIB #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef PARALLEL // #undef SEEK_SET // #undef SEEK_CUR // #undef SEEK_END #include #include // for usleep (only for parallel) #endif /* #ifdef METIS namespace metis { extern "C" { #include } } #endif */ #ifndef M_PI #define M_PI 3.14159265358979323846 #endif /*** Windows headers ***/ #ifdef _MSC_VER # define WIN32_LEAN_AND_MEAN # ifndef NO_PARALLEL_THREADS # ifdef MSVC_EXPRESS # else # include # include # endif // MSVC_EXPRESS # endif # include # undef WIN32_LEAN_AND_MEAN # include #else // Not using MC VC++ #endif using namespace std; #endif netgen-6.2.1804/libsrc/include/linalg.hpp0000644000175000017500000000004013272137567016657 0ustar kurtkurt#include "../linalg/linalg.hpp" netgen-6.2.1804/libsrc/include/opti.hpp0000644000175000017500000000003613272137567016371 0ustar kurtkurt#include "../linalg/opti.hpp" netgen-6.2.1804/libsrc/include/csg.hpp0000644000175000017500000000003213272137567016166 0ustar kurtkurt#include "../csg/csg.hpp" netgen-6.2.1804/libsrc/include/incopengl.hpp0000644000175000017500000000225413272137567017400 0ustar kurtkurt#ifndef INCOPENGL_HPP___ #define INCOPENGL_HPP___ #define GL_GLEXT_PROTOTYPES #include # if defined(TOGL_AGL) || defined(TOGL_AGL_CLASSIC) || defined(TOGL_NSOPENGL) # include # include # else # include # include # endif #ifdef TOGL_X11 // parallel #define GLX_GLXEXT_PROTOTYPES #include #include #endif #ifdef WIN32 // part of OpenGL 1.2, but not in Microsoft's OpenGL 1.1 header: // GL version should be checked at runtime #define GL_CLAMP_TO_EDGE 0x812F #define GL_ARRAY_BUFFER 0x8892 #define GL_ELEMENT_ARRAY_BUFFER 0x8893 #define GL_STATIC_DRAW 0x88E4 typedef ptrdiff_t GLintptr; typedef ptrdiff_t GLsizeiptr; extern void (*glBindBuffer) (GLenum a, GLuint b); extern void (*glDeleteBuffers) (GLsizei a, const GLuint *b); extern void (*glGenBuffers) (GLsizei a, GLuint *b); extern void (*glBufferData) (GLenum a, GLsizeiptr b, const GLvoid *c, GLenum d); extern void (*glBufferSubData) (GLenum a, GLintptr b, GLsizeiptr c, const GLvoid *d); #endif DLL_HEADER void LoadOpenGLFunctionPointers(); #endif // INCOPENGL_HPP___ netgen-6.2.1804/libsrc/include/mydefs.hpp0000644000175000017500000000274213272137567016713 0ustar kurtkurt#ifndef FILE_MYDEFS #define FILE_MYDEFS /**************************************************************************/ /* File: mydefs.hh */ /* Author: Joachim Schoeberl */ /* Date: 10. Mar. 98 */ /**************************************************************************/ /* defines for graphics, testmodes, ... */ #define PACKAGE_VERSION "6.2-dev" // #define DEBUG #ifdef WIN32 #if NGINTERFACE_EXPORTS || NGLIB_EXPORTS || nglib_EXPORTS #define DLL_HEADER __declspec(dllexport) #else #define DLL_HEADER __declspec(dllimport) #endif #else #if __GNUC__ >= 4 #define DLL_HEADER __attribute__ ((visibility ("default"))) #else #define DLL_HEADER #endif #endif #ifndef __assume #ifdef __GNUC__ #define __assume(cond) if (!(cond)) __builtin_unreachable(); else; #else #define __assume(cond) #endif #endif #ifndef NG_INLINE #ifdef __INTEL_COMPILER #ifdef WIN32 #define NG_INLINE __forceinline inline #else #define NG_INLINE __forceinline inline #endif #else #ifdef __GNUC__ #define NG_INLINE __attribute__ ((__always_inline__)) inline #define VLA #else #define NG_INLINE inline #endif #endif #endif // #define BASE0 // #define DEBUG #define noDEMOVERSION #define noDEVELOP #define noSTEP #define noSOLIDGEOM #define noDEMOAPP #define noMODELLER #define noSTAT_STREAM #define noLOG_STREAM #endif netgen-6.2.1804/libsrc/include/occgeom.hpp0000644000175000017500000000003613272137567017032 0ustar kurtkurt#include "../occ/occgeom.hpp" netgen-6.2.1804/libsrc/include/meshing.hpp0000644000175000017500000000004213272137567017045 0ustar kurtkurt#include <../meshing/meshing.hpp> netgen-6.2.1804/libsrc/include/stlgeom.hpp0000644000175000017500000000004213272137567017065 0ustar kurtkurt#include <../stlgeom/stlgeom.hpp> netgen-6.2.1804/libsrc/include/geometry2d.hpp0000644000175000017500000000004413272137567017476 0ustar kurtkurt#include "../geom2d/geometry2d.hpp" netgen-6.2.1804/libsrc/include/myadt.hpp0000644000175000017500000000004013272137567016527 0ustar kurtkurt#include <../general/myadt.hpp> netgen-6.2.1804/libsrc/include/parallelinterface.hpp0000644000175000017500000000224713272137567021101 0ustar kurtkurtgibt's nicht mehr #ifndef FILE_PARALLELINTERFACE #define FILE_PARALLELINTERFACE #ifdef PARALLEL #ifdef __cplusplus extern "C" { #endif // this interface is 0-base !! int NgPar_GetLoc2Glob_VolEl ( int locnum ); // int NgPar_GetDistantNodeNums ( int nt, int locnum, int * procs, int * distnum); // number on distant processor // gibt anzahl an distant pnums zurueck // * pnums entspricht ARRAY int NgPar_GetDistantNodeNums ( int nodetype, int locnum, int * pnums ); int NgPar_GetNDistantNodeNums ( int nodetype, int locnum ); int NgPar_GetDistantPNum ( int proc, int locnum ) ; int NgPar_GetDistantEdgeNum ( int proc, int locnum ) ; int NgPar_GetDistantFaceNum ( int proc, int locnum ) ; int NgPar_GetDistantElNum ( int proc, int locnum ); bool NgPar_IsExchangeFace ( int fnr ) ; bool NgPar_IsExchangeVert ( int vnum ); bool NgPar_IsExchangeEdge ( int ednum ); bool NgPar_IsExchangeElement ( int elnum ); void NgPar_PrintParallelMeshTopology (); bool NgPar_IsElementInPartition ( int elnum, int dest ); bool NgPar_IsGhostFace ( int facenum ); bool NgPar_IsGhostEdge ( int edgenum ); #ifdef __cplusplus } #endif #endif #endif netgen-6.2.1804/libsrc/include/ngsimd.hpp0000644000175000017500000000004113272137567016673 0ustar kurtkurt#include <../general/ngsimd.hpp> netgen-6.2.1804/libsrc/include/nginterface_v2.hpp0000644000175000017500000001567013272137567020324 0ustar kurtkurt#ifndef NGINTERFACE_V2 #define NGINTERFACE_V2 /**************************************************************************/ /* File: nginterface_v2.hpp */ /* Author: Joachim Schoeberl */ /* Date: May 09 */ /**************************************************************************/ /* C++ interface to Netgen */ namespace netgen { static constexpr int POINTINDEX_BASE = 1; struct T_EDGE2 { // int orient:1; // int nr:31; // 0-based int nr; // 0-based }; struct T_FACE2 { // int orient:3; // int nr:29; // 0-based int nr; // 0-based }; class Ng_Element { class Ng_Points { public: size_t num; const int * ptr; size_t Size() const { return num; } int operator[] (size_t i) const { return ptr[i]-POINTINDEX_BASE; } }; class Ng_Vertices { public: size_t num; const int * ptr; size_t Size() const { return num; } int operator[] (size_t i) const { return ptr[i]-POINTINDEX_BASE; } }; class Ng_Edges { public: size_t num; const T_EDGE2 * ptr; size_t Size() const { return num; } int operator[] (size_t i) const { return ptr[i].nr; } }; class Ng_Faces { public: size_t num; const T_FACE2 * ptr; size_t Size() const { return num; } int operator[] (size_t i) const { return ptr[i].nr; } }; class Ng_Facets { public: size_t num; int base; const int * ptr; size_t Size() const { return num; } int operator[] (size_t i) const { return ptr[i]-base; } }; public: NG_ELEMENT_TYPE type; int index; // material / boundary condition const string * mat; // material / boundary label NG_ELEMENT_TYPE GetType() const { return type; } int GetIndex() const { return index-1; } Ng_Points points; // all points Ng_Vertices vertices; Ng_Edges edges; Ng_Faces faces; Ng_Facets facets; bool is_curved; }; class Ng_Point { double * pt; public: Ng_Point (double * apt) : pt(apt) { ; } double operator[] (size_t i) { return pt[i]; } operator const double * () { return pt; } }; template class Ng_Node; template <> class Ng_Node<0> { class Ng_Elements { public: size_t ne; const int * ptr; size_t Size() const { return ne; } int operator[] (size_t i) const { return ptr[i]; } }; public: Ng_Elements elements; Ng_Elements bnd_elements; }; template <> class Ng_Node<1> { class Ng_Vertices { public: const int * ptr; size_t Size() const { return 2; } int operator[] (size_t i) const { return ptr[i]-POINTINDEX_BASE; } }; public: Ng_Vertices vertices; }; template <> class Ng_Node<2> { class Ng_Vertices { public: size_t nv; const int * ptr; size_t Size() const { return nv; } int operator[] (size_t i) const { return ptr[i]-POINTINDEX_BASE; } }; class Ng_Edges { public: size_t ned; const int * ptr; size_t Size() const { return ned; } int operator[] (size_t i) const { return ptr[i]-1; } }; public: Ng_Vertices vertices; Ng_Edges edges; int surface_el; // -1 if face not on surface }; class Mesh; inline void DummyTaskManager2 (function func) { func(0,1); } inline void DummyTracer2 (string, bool) { ; } class DLL_HEADER Ngx_Mesh { private: shared_ptr mesh; public: // Ngx_Mesh () { ; } // Ngx_Mesh(class Mesh * amesh) : mesh(amesh) { ; } Ngx_Mesh(shared_ptr amesh = NULL); void LoadMesh (const string & filename); void LoadMesh (istream & str); void SaveMesh (ostream & str) const; void UpdateTopology (); void DoArchive (ngstd::Archive & archive); virtual ~Ngx_Mesh(); bool Valid () { return mesh != NULL; } int GetDimension() const; int GetNLevels() const; int GetNElements (int dim) const; int GetNNodes (int nt) const; Ng_Point GetPoint (int nr) const; template Ng_Element GetElement (size_t nr) const; template int GetElementIndex (size_t nr) const; /// material/boundary label of region, template argument is co-dimension template const string & GetMaterialCD (int region_nr) const; /// Curved Elements: /// elnr .. element nr /// xi..... DIM_EL local coordinates /// x ..... DIM_SPACE global coordinates /// dxdxi...DIM_SPACE x DIM_EL Jacobian matrix (row major storage) template void ElementTransformation (int elnr, const double * xi, double * x, double * dxdxi) const; /// Curved Elements: /// elnr .. element nr /// npts .. number of points /// xi..... DIM_EL local coordinates /// sxi ... step xi /// x ..... DIM_SPACE global coordinates /// dxdxi...DIM_SPACE x DIM_EL Jacobian matrix (row major storage) template void MultiElementTransformation (int elnr, int npts, const T * xi, size_t sxi, T * x, size_t sx, T * dxdxi, size_t sdxdxi) const; template const Ng_Node GetNode (int nr) const; template int GetNNodes (); // returns domain numbers of domains next to boundary bnr -> (domin, domout) // 3D only // std::pair GetBoundaryNeighbouringDomains (int bnr); void Curve (int order); void Refine (NG_REFINEMENT_TYPE reftype, void (*taskmanager)(function) = &DummyTaskManager2, void (*tracer)(string, bool) = &DummyTracer2); void GetParentNodes (int ni, int * parents) const; int GetParentElement (int ei) const; int GetParentSElement (int ei) const; // Find element of point, returns local coordinates template int FindElementOfPoint (double * p, double * lami, bool build_searchtrees = false, int * const indices = NULL, int numind = 0) const; #ifdef PARALLEL std::tuple GetDistantProcs (int nodetype, int locnum) const; #endif shared_ptr GetMesh () const { return mesh; } shared_ptr SelectMesh () const; }; DLL_HEADER Ngx_Mesh * LoadMesh (const string & filename); } #ifdef HAVE_NETGEN_SOURCES #include namespace netgen { #ifdef __GNUC__ #define NGX_INLINE __attribute__ ((__always_inline__)) inline #else #define NGX_INLINE inline #endif #include } #endif #endif netgen-6.2.1804/libsrc/include/gprim.hpp0000644000175000017500000000003613272137567016534 0ustar kurtkurt#include "../gprim/gprim.hpp" netgen-6.2.1804/libsrc/include/acisgeom.hpp0000644000175000017500000000006713272137567017211 0ustar kurtkurt#ifdef ACIS #include "../acisgeom/acisgeom.hpp" #endif netgen-6.2.1804/libsrc/include/CMakeLists.txt0000644000175000017500000000072613272137567017453 0ustar kurtkurtinstall(FILES nginterface.h nginterface_v2.hpp mydefs.hpp DESTINATION ${NG_INSTALL_DIR_INCLUDE} COMPONENT netgen_devel) install(FILES acisgeom.hpp csg.hpp geometry2d.hpp gprim.hpp incopengl.hpp inctcl.hpp incvis.hpp linalg.hpp meshing.hpp myadt.hpp mydefs.hpp mystdlib.h nginterface_v2_impl.hpp occgeom.hpp ngsimd.hpp opti.hpp parallel.hpp parallelinterface.hpp stlgeom.hpp visual.hpp DESTINATION ${NG_INSTALL_DIR_INCLUDE}/include COMPONENT netgen_devel ) netgen-6.2.1804/libsrc/include/incvis.hpp0000644000175000017500000000014713272137567016714 0ustar kurtkurt// libraries for User interface: nicht mehr verwendet #include "inctcl.hpp" #include "incopengl.hpp" netgen-6.2.1804/libsrc/include/parallel.hpp0000644000175000017500000000004413272137567017211 0ustar kurtkurt#include "../parallel/parallel.hpp" netgen-6.2.1804/libsrc/include/visual.hpp0000644000175000017500000000004713272137567016723 0ustar kurtkurt#include "../visualization/visual.hpp" netgen-6.2.1804/libsrc/include/nginterface_v2_impl.hpp0000644000175000017500000001671713272137567021350 0ustar kurtkurtNGX_INLINE DLL_HEADER Ng_Point Ngx_Mesh :: GetPoint (int nr) const { return Ng_Point (&mesh->Point(PointIndex(nr+PointIndex::BASE))(0)); } template <> NGX_INLINE DLL_HEADER int Ngx_Mesh :: GetElementIndex<0> (size_t nr) const { return (*mesh).pointelements[nr].index; } template <> NGX_INLINE DLL_HEADER int Ngx_Mesh :: GetElementIndex<1> (size_t nr) const { /* if(mesh->GetDimension()==3) return (*mesh)[SegmentIndex(nr)].edgenr; else return (*mesh)[SegmentIndex(nr)].si; */ if(mesh->GetDimension()==3) return mesh->LineSegments()[nr].edgenr; else return mesh->LineSegments()[nr].si; } template <> NGX_INLINE DLL_HEADER int Ngx_Mesh :: GetElementIndex<2> (size_t nr) const { int ind = (*mesh)[SurfaceElementIndex(nr)].GetIndex(); return mesh->GetFaceDescriptor(ind).BCProperty(); } template <> NGX_INLINE DLL_HEADER int Ngx_Mesh :: GetElementIndex<3> (size_t nr) const { return (*mesh)[ElementIndex(nr)].GetIndex(); } template <> NGX_INLINE DLL_HEADER Ng_Element Ngx_Mesh :: GetElement<0> (size_t nr) const { const Element0d & el = mesh->pointelements[nr]; Ng_Element ret; ret.type = NG_PNT; ret.index = el.index; ret.points.num = 1; ret.points.ptr = (int*)&el.pnum; ret.vertices.num = 1; ret.vertices.ptr = (int*)&el.pnum; ret.edges.num = 0; ret.edges.ptr = NULL; ret.faces.num = 0; ret.faces.ptr = NULL; ret.facets.num = 1; ret.facets.base = 1; ret.facets.ptr = (int*)&el.pnum; return ret; } template <> NGX_INLINE DLL_HEADER Ng_Element Ngx_Mesh :: GetElement<1> (size_t nr) const { // const Segment & el = mesh->LineSegment (SegmentIndex(nr)); const Segment & el = mesh->LineSegments()[nr]; Ng_Element ret; ret.type = NG_ELEMENT_TYPE(el.GetType()); if(mesh->GetDimension()==3) ret.index = el.edgenr; else ret.index = el.si; if (mesh->GetDimension() == 2) ret.mat = mesh->GetBCNamePtr(el.si-1); else { if (mesh->GetDimension() == 3) ret.mat = mesh->GetCD2NamePtr(el.edgenr-1); else ret.mat = mesh->GetMaterialPtr(el.si); } ret.points.num = el.GetNP(); ret.points.ptr = (int*)&(el[0]); ret.vertices.num = 2; ret.vertices.ptr = (int*)&(el[0]); ret.edges.num = 1; ret.edges.ptr = (T_EDGE2*)mesh->GetTopology().GetSegmentElementEdgesPtr (nr); ret.faces.num = 0; ret.faces.ptr = NULL; if (mesh->GetDimension() == 2) { ret.facets.num = 1; ret.facets.base = 0; ret.facets.ptr = (int*)ret.edges.ptr; } else { ret.facets.num = 2; ret.facets.base = 1; ret.facets.ptr = (int*)&(el[0]); } // ret.is_curved = mesh->GetCurvedElements().IsSegmentCurved(nr); ret.is_curved = el.IsCurved(); return ret; } template <> NGX_INLINE DLL_HEADER Ng_Element Ngx_Mesh :: GetElement<2> (size_t nr) const { // const Element2d & el = mesh->SurfaceElement (SurfaceElementIndex (nr)); const Element2d & el = mesh->SurfaceElements()[nr]; Ng_Element ret; ret.type = NG_ELEMENT_TYPE(el.GetType()); const FaceDescriptor & fd = mesh->GetFaceDescriptor(el.GetIndex()); ret.index = fd.BCProperty(); if (mesh->GetDimension() == 3) ret.mat = &fd.GetBCName(); else ret.mat = mesh -> GetMaterialPtr(ret.index); ret.points.num = el.GetNP(); ret.points.ptr = (int*)&el[0]; ret.vertices.num = el.GetNV(); ret.vertices.ptr = (int*)&(el[0]); ret.edges.num = MeshTopology::GetNEdges (el.GetType()); ret.edges.ptr = (T_EDGE2*)mesh->GetTopology().GetSurfaceElementEdgesPtr (nr); ret.faces.num = MeshTopology::GetNFaces (el.GetType()); ret.faces.ptr = (T_FACE2*)mesh->GetTopology().GetSurfaceElementFacesPtr (nr); if (mesh->GetDimension() == 3) { ret.facets.num = ret.faces.num; ret.facets.base = 0; ret.facets.ptr = (int*)ret.faces.ptr; } else { ret.facets.num = ret.edges.num; ret.facets.base = 0; ret.facets.ptr = (int*)ret.edges.ptr; } ret.is_curved = el.IsCurved(); return ret; } template <> NGX_INLINE DLL_HEADER Ng_Element Ngx_Mesh :: GetElement<3> (size_t nr) const { // const Element & el = mesh->VolumeElement (ElementIndex (nr)); const Element & el = mesh->VolumeElements()[nr]; Ng_Element ret; ret.type = NG_ELEMENT_TYPE(el.GetType()); ret.index = el.GetIndex(); ret.mat = mesh -> GetMaterialPtr(ret.index); ret.points.num = el.GetNP(); ret.points.ptr = (int*)&el[0]; ret.vertices.num = el.GetNV(); ret.vertices.ptr = (int*)&(el[0]); ret.edges.num = MeshTopology::GetNEdges (el.GetType()); ret.edges.ptr = (T_EDGE2*)mesh->GetTopology().GetElementEdgesPtr (nr); ret.faces.num = MeshTopology::GetNFaces (el.GetType()); ret.faces.ptr = (T_FACE2*)mesh->GetTopology().GetElementFacesPtr (nr); ret.facets.num = ret.faces.num; ret.facets.base = 0; ret.facets.ptr = (int*)ret.faces.ptr; ret.is_curved = el.IsCurved(); return ret; } template <> NGX_INLINE DLL_HEADER const string & Ngx_Mesh :: GetMaterialCD<0> (int region_nr) const { return mesh->GetMaterial(region_nr+1); } template <> NGX_INLINE DLL_HEADER const string & Ngx_Mesh :: GetMaterialCD<1> (int region_nr) const { return mesh->GetBCName(region_nr); } template <> NGX_INLINE DLL_HEADER const string & Ngx_Mesh :: GetMaterialCD<2> (int region_nr) const { return mesh->GetCD2Name(region_nr); } template <> NGX_INLINE DLL_HEADER const string & Ngx_Mesh :: GetMaterialCD<3> (int region_nr) const { static string def("default"); return def; } template <> NGX_INLINE DLL_HEADER int Ngx_Mesh :: GetNNodes<1> () { return mesh->GetTopology().GetNEdges(); } template <> NGX_INLINE DLL_HEADER int Ngx_Mesh :: GetNNodes<2> () { return mesh->GetTopology().GetNFaces(); } template <> NGX_INLINE DLL_HEADER const Ng_Node<0> Ngx_Mesh :: GetNode<0> (int vnr) const { Ng_Node<0> node; vnr++; switch (mesh->GetDimension()) { case 3: { FlatArray ia = mesh->GetTopology().GetVertexElements(vnr); node.elements.ne = ia.Size(); node.elements.ptr = (int*)&ia[0]; FlatArray bia = mesh->GetTopology().GetVertexSurfaceElements(vnr); node.bnd_elements.ne = bia.Size(); node.bnd_elements.ptr = (int*)&bia[0]; break; } case 2: { FlatArray ia = mesh->GetTopology().GetVertexSurfaceElements(vnr); node.elements.ne = ia.Size(); node.elements.ptr = (int*)&ia[0]; FlatArray bia = mesh->GetTopology().GetVertexSegments(vnr); node.bnd_elements.ne = bia.Size(); node.bnd_elements.ptr = (int*)&bia[0]; break; } case 1: { FlatArray ia = mesh->GetTopology().GetVertexSegments(vnr); node.elements.ne = ia.Size(); node.elements.ptr = (int*)&ia[0]; FlatArray bia = mesh->GetTopology().GetVertexPointElements(vnr); node.bnd_elements.ne = bia.Size(); node.bnd_elements.ptr = (int*)&bia[0]; break; } default: ; } return node; } template <> NGX_INLINE DLL_HEADER const Ng_Node<1> Ngx_Mesh :: GetNode<1> (int nr) const { Ng_Node<1> node; node.vertices.ptr = mesh->GetTopology().GetEdgeVerticesPtr(nr); return node; } template <> NGX_INLINE DLL_HEADER const Ng_Node<2> Ngx_Mesh :: GetNode<2> (int nr) const { Ng_Node<2> node; node.vertices.ptr = mesh->GetTopology().GetFaceVerticesPtr(nr); node.vertices.nv = (node.vertices.ptr[3] == 0) ? 3 : 4; node.surface_el = mesh->GetTopology().GetFace2SurfaceElement (nr+1)-1; return node; } netgen-6.2.1804/libsrc/include/nginterface.h0000644000175000017500000003651113272137567017352 0ustar kurtkurt#ifndef NGINTERFACE #define NGINTERFACE /**************************************************************************/ /* File: nginterface.h */ /* Author: Joachim Schoeberl */ /* Date: 20. Nov. 99 */ /**************************************************************************/ /* Application program interface to Netgen */ #ifdef WIN32 #if NGINTERFACE_EXPORTS || NGLIB_EXPORTS || nglib_EXPORTS #define DLL_HEADER __declspec(dllexport) #else #define DLL_HEADER __declspec(dllimport) #endif #else #if __GNUC__ >= 4 #define DLL_HEADER __attribute__ ((visibility ("default"))) #else #define DLL_HEADER #endif #endif // max number of nodes per element #define NG_ELEMENT_MAXPOINTS 12 // max number of nodes per surface element #define NG_SURFACE_ELEMENT_MAXPOINTS 8 // implemented element types: enum NG_ELEMENT_TYPE { NG_PNT = 0, NG_SEGM = 1, NG_SEGM3 = 2, NG_TRIG = 10, NG_QUAD=11, NG_TRIG6 = 12, NG_QUAD6 = 13, NG_TET = 20, NG_TET10 = 21, NG_PYRAMID = 22, NG_PRISM = 23, NG_PRISM12 = 24, NG_HEX = 25 }; typedef double NG_POINT[3]; // coordinates typedef int NG_EDGE[2]; // initial point, end point typedef int NG_FACE[4]; // points, last one is 0 for trig #ifdef __cplusplus extern "C" { #endif // load geometry from file DLL_HEADER void Ng_LoadGeometry (const char * filename); // load netgen mesh DLL_HEADER void Ng_LoadMesh (const char * filename); // load netgen mesh DLL_HEADER void Ng_LoadMeshFromString (const char * mesh_as_string); // space dimension (2 or 3) DLL_HEADER int Ng_GetDimension (); // number of mesh points DLL_HEADER int Ng_GetNP (); // number of mesh vertices (differs from GetNP for 2nd order elements) DLL_HEADER int Ng_GetNV (); // number of mesh elements DLL_HEADER int Ng_GetNE (); // number of surface triangles DLL_HEADER int Ng_GetNSE (); // Get Point coordintes, index from 1 .. np DLL_HEADER void Ng_GetPoint (int pi, double * p); // Get Element Points DLL_HEADER NG_ELEMENT_TYPE Ng_GetElement (int ei, int * epi, int * np = 0); // Get Element Type DLL_HEADER NG_ELEMENT_TYPE Ng_GetElementType (int ei); // Get sub-domain of element ei DLL_HEADER int Ng_GetElementIndex (int ei); DLL_HEADER void Ng_SetElementIndex(const int ei, const int index); // Get Material of element ei DLL_HEADER const char * Ng_GetElementMaterial (int ei); // Get Material of domain dom DLL_HEADER const char * Ng_GetDomainMaterial (int dom); // Get User Data DLL_HEADER int Ng_GetUserDataSize (char * id); DLL_HEADER void Ng_GetUserData (char * id, double * data); // Get Surface Element Points DLL_HEADER NG_ELEMENT_TYPE Ng_GetSurfaceElement (int ei, int * epi, int * np = 0); // Get Surface Element Type DLL_HEADER NG_ELEMENT_TYPE Ng_GetSurfaceElementType (int ei); // Get Surface Element Index DLL_HEADER int Ng_GetSurfaceElementIndex (int ei); // Get Surface Element Surface Number DLL_HEADER int Ng_GetSurfaceElementSurfaceNumber (int ei); // Get Surface Element Number DLL_HEADER int Ng_GetSurfaceElementFDNumber (int ei); // Get BCName for Surface Element DLL_HEADER char * Ng_GetSurfaceElementBCName (int ei); //void Ng_GetSurfaceElementBCName (int ei, char * name); // Get BCName for bc-number DLL_HEADER char * Ng_GetBCNumBCName (int bcnr); //void Ng_GetBCNumBCName (int bcnr, char * name); // Get BCName for bc-number of co dim 2 DLL_HEADER char * Ng_GetCD2NumCD2Name (int cd2nr); // Get normal vector of surface element node // DLL_HEADER void Ng_GetNormalVector (int sei, int locpi, double * nv); DLL_HEADER void Ng_SetPointSearchStartElement(int el); // Find element of point, returns local coordinates DLL_HEADER int Ng_FindElementOfPoint (double * p, double * lami, int build_searchtrees = 0, const int * const indices = NULL, const int numind = 0); // Find surface element of point, returns local coordinates DLL_HEADER int Ng_FindSurfaceElementOfPoint (double * p, double * lami, int build_searchtrees = 0, const int * const indices = NULL, const int numind = 0); // is element ei curved ? DLL_HEADER int Ng_IsElementCurved (int ei); // is element sei curved ? DLL_HEADER int Ng_IsSurfaceElementCurved (int sei); /// Curved Elements: /// xi..local coordinates /// x ..global coordinates /// dxdxi...D x D Jacobian matrix (row major storage) DLL_HEADER void Ng_GetElementTransformation (int ei, const double * xi, double * x, double * dxdxi); /// buffer must be at least 100 doubles, alignment of double DLL_HEADER void Ng_GetBufferedElementTransformation (int ei, const double * xi, double * x, double * dxdxi, void * buffer, int buffervalid); /// Curved Elements: /// xi..local coordinates /// x ..global coordinates /// dxdxi...D x D-1 Jacobian matrix (row major storage) /// curved ...is element curved ? DLL_HEADER void Ng_GetSurfaceElementTransformation (int sei, const double * xi, double * x, double * dxdxi); /// Curved Elements: /// xi..local coordinates /// sxi..step xi /// x ..global coordinates /// dxdxi...D x D Jacobian matrix (row major storage) DLL_HEADER void Ng_GetMultiElementTransformation (int ei, int n, const double * xi, size_t sxi, double * x, size_t sx, double * dxdxi, size_t sdxdxi); DLL_HEADER int Ng_GetSegmentIndex (int elnr); DLL_HEADER NG_ELEMENT_TYPE Ng_GetSegment (int elnr, int * epi, int * np = 0); // Mark element for refinement DLL_HEADER void Ng_SetRefinementFlag (int ei, int flag); DLL_HEADER void Ng_SetSurfaceRefinementFlag (int sei, int flag); // Do local refinement enum NG_REFINEMENT_TYPE { NG_REFINE_H = 0, NG_REFINE_P = 1, NG_REFINE_HP = 2 }; DLL_HEADER void Ng_Refine (NG_REFINEMENT_TYPE reftype); // Use second order elements DLL_HEADER void Ng_SecondOrder (); DLL_HEADER void Ng_HighOrder (int order, bool rational = false); //void Ng_HPRefinement (int levels, double parameter = 0.125); DLL_HEADER void Ng_HPRefinement (int levels, double parameter = 0.125, bool setorders = true,bool ref_level = false); // void Ng_HPRefinement (int levels); // void Ng_HPRefinement (int levels, double parameter); // Topology and coordinate information of master element: DLL_HEADER int Ng_ME_GetNVertices (NG_ELEMENT_TYPE et); DLL_HEADER int Ng_ME_GetNEdges (NG_ELEMENT_TYPE et); DLL_HEADER int Ng_ME_GetNFaces (NG_ELEMENT_TYPE et); DLL_HEADER const NG_POINT * Ng_ME_GetVertices (NG_ELEMENT_TYPE et); DLL_HEADER const NG_EDGE * Ng_ME_GetEdges (NG_ELEMENT_TYPE et); DLL_HEADER const NG_FACE * Ng_ME_GetFaces (NG_ELEMENT_TYPE et); DLL_HEADER void Ng_UpdateTopology(); DLL_HEADER int Ng_GetNEdges(); DLL_HEADER int Ng_GetNFaces(); DLL_HEADER int Ng_GetElement_Edges (int elnr, int * edges, int * orient = 0); DLL_HEADER int Ng_GetElement_Faces (int elnr, int * faces, int * orient = 0); DLL_HEADER int Ng_GetSurfaceElement_Edges (int selnr, int * edges, int * orient = 0); DLL_HEADER int Ng_GetSurfaceElement_Face (int selnr, int * orient = 0); DLL_HEADER void Ng_GetSurfaceElementNeighbouringDomains(const int selnr, int & in, int & out); DLL_HEADER int Ng_GetFace_Vertices (int fnr, int * vert); DLL_HEADER void Ng_GetEdge_Vertices (int ednr, int * vert); DLL_HEADER int Ng_GetFace_Edges (int fnr, int * edge); DLL_HEADER int Ng_GetNVertexElements (int vnr); DLL_HEADER void Ng_GetVertexElements (int vnr, int * els); DLL_HEADER int Ng_GetElementOrder (int enr); DLL_HEADER void Ng_GetElementOrders (int enr, int * ox, int * oy, int * oz); DLL_HEADER void Ng_SetElementOrder (int enr, int order); DLL_HEADER void Ng_SetElementOrders (int enr, int ox, int oy, int oz); DLL_HEADER int Ng_GetSurfaceElementOrder (int enr); DLL_HEADER void Ng_GetSurfaceElementOrders (int enr, int * ox, int * oy); DLL_HEADER void Ng_SetSurfaceElementOrder (int enr, int order); DLL_HEADER void Ng_SetSurfaceElementOrders (int enr, int ox, int oy); // Multilevel functions: // number of levels: DLL_HEADER int Ng_GetNLevels (); // get two parent nodes (indeed vertices !) of node ni DLL_HEADER void Ng_GetParentNodes (int ni, int * parents); // get parent element (first child has always same number) DLL_HEADER int Ng_GetParentElement (int ei); // get parent surface element (first child has always same number) DLL_HEADER int Ng_GetParentSElement (int ei); // representant of anisotropic cluster DLL_HEADER int Ng_GetClusterRepVertex (int vi); DLL_HEADER int Ng_GetClusterRepEdge (int edi); DLL_HEADER int Ng_GetClusterRepFace (int fai); DLL_HEADER int Ng_GetClusterRepElement (int eli); void Ng_SurfaceElementTransformation (int eli, double x, double y, double * p3d, double * jacobian); #ifdef PARALLEL // the following functions are 0-base !! // number on distant processor // returns pairs (dist_proc, num_on_dist_proc) int NgPar_GetDistantNodeNums ( int nodetype, int locnum, int * pnums ); int NgPar_GetNDistantNodeNums ( int nodetype, int locnum ); int NgPar_GetGlobalNodeNum (int nodetype, int locnum); #endif namespace netgen { // #include "../visualization/soldata.hpp" class SolutionData; class MouseEventHandler; class UserVisualizationObject; } enum Ng_SolutionType { NG_SOLUTION_NODAL = 1, NG_SOLUTION_ELEMENT = 2, NG_SOLUTION_SURFACE_ELEMENT = 3, NG_SOLUTION_NONCONTINUOUS = 4, NG_SOLUTION_SURFACE_NONCONTINUOUS = 5, NG_SOLUTION_VIRTUAL_FUNCTION = 6, NG_SOLUTION_MARKED_ELEMENTS = 10, NG_SOLUTION_ELEMENT_ORDER = 11 }; struct Ng_SolutionData { string name; // name of gridfunction double * data; // solution values int components; // relevant (double) components in solution vector int dist; // # doubles per entry alignment! int iscomplex; // complex vector ? bool draw_surface; bool draw_volume; int order; // order of elements, only partially supported Ng_SolutionType soltype; // type of solution function netgen::SolutionData * solclass; }; // initialize solution data with default arguments DLL_HEADER void Ng_InitSolutionData (Ng_SolutionData * soldata); // set solution data DLL_HEADER void Ng_SetSolutionData (Ng_SolutionData * soldata); /// delete gridfunctions DLL_HEADER void Ng_ClearSolutionData(); // redraw DLL_HEADER void Ng_Redraw(bool blocking = false); /// DLL_HEADER void Ng_TclCmd(string cmd); /// DLL_HEADER void Ng_SetMouseEventHandler (netgen::MouseEventHandler * handler); /// DLL_HEADER void Ng_SetUserVisualizationObject (netgen::UserVisualizationObject * vis); // DLL_HEADER void Ng_SetVisualizationParameter (const char * name, const char * value); // number of periodic vertices DLL_HEADER int Ng_GetNPeriodicVertices (int idnr); // pairs should be an integer array of 2*npairs DLL_HEADER void Ng_GetPeriodicVertices (int idnr, int * pairs); // number of periodic edges DLL_HEADER int Ng_GetNPeriodicEdges (int idnr); // pairs should be an integer array of 2*npairs DLL_HEADER void Ng_GetPeriodicEdges (int idnr, int * pairs); DLL_HEADER void RunParallel ( void * (*fun)(void *), void * in); DLL_HEADER void Ng_PushStatus (const char * str); DLL_HEADER void Ng_PopStatus (); DLL_HEADER void Ng_SetThreadPercentage (double percent); DLL_HEADER void Ng_GetStatus (char ** str, double & percent); DLL_HEADER void Ng_SetTerminate(void); DLL_HEADER void Ng_UnSetTerminate(void); DLL_HEADER int Ng_ShouldTerminate(void); DLL_HEADER void Ng_SetRunning(int flag); DLL_HEADER int Ng_IsRunning(); //// added by Roman Stainko .... DLL_HEADER int Ng_GetVertex_Elements( int vnr, int* elems); DLL_HEADER int Ng_GetVertex_SurfaceElements( int vnr, int* elems ); DLL_HEADER int Ng_GetVertex_NElements( int vnr ); DLL_HEADER int Ng_GetVertex_NSurfaceElements( int vnr ); #ifdef SOCKETS int Ng_SocketClientOpen( const int port, const char * host ); void Ng_SocketClientWrite( const char * write, char ** reply); void Ng_SocketClientClose ( void ); void Ng_SocketClientGetServerHost ( const int number, char ** host ); void Ng_SocketClientGetServerPort ( const int number, int * port ); void Ng_SocketClientGetServerClientID ( const int number, int * id ); #endif DLL_HEADER void Ng_InitPointCurve(double red, double green, double blue); DLL_HEADER void Ng_AddPointCurvePoint(const double * point); #ifdef PARALLEL void Ng_SetElementPartition ( int elnr, int part ); int Ng_GetElementPartition ( int elnr ); #endif DLL_HEADER void Ng_SaveMesh ( const char * meshfile ); DLL_HEADER void Ng_Bisect ( const char * refinementfile ); // if qualityloss is not equal to NULL at input, a (1-based) list of qualitylosses (due to projection) // is saved in *qualityloss, its size is the return value DLL_HEADER int Ng_Bisect_WithInfo ( const char * refinementfile, double ** qualityloss); typedef void * Ng_Mesh; DLL_HEADER Ng_Mesh Ng_SelectMesh (Ng_Mesh mesh); DLL_HEADER void Ng_GetArgs (int & argc, char ** &argv); #ifdef __cplusplus } #endif #endif /* The new node interface ... it is 0-based ! */ extern "C" { /* number of nodes of type nt nt = 0 is Vertex nt = 1 is Edge nt = 2 is Face nt = 3 is Cell */ DLL_HEADER int Ng_GetNNodes (int nt); /* closure nodes of node (nt, nodenr): nodeset is bit-coded, bit 0 includes Vertices, bit 1 edges, etc E.g., nodeset = 6 includes edge and face nodes nodes consists of pairs of integers (nodetype, nodenr) return value is number of nodes */ DLL_HEADER int Ng_GetClosureNodes (int nt, int nodenr, int nodeset, int * nodes); /* number of dim-dimensional elements dim = 3 ... volume elements dim = 2 ... surface elements dim = 1 ... segments dim = 0 ... not available */ DLL_HEADER int Ng_GetNElements (int dim); /* closure nodes of dim-dimensional element elmentnr: nodeset is bit-coded, bit 0 includes Vertices, bit 1 edges, etc E.g., nodeset = 6 includes edge and face nodes nodes consists of pairs of integers (nodetype, nodenr) return value is number of nodes */ DLL_HEADER int Ng_GetElementClosureNodes (int dim, int elementnr, int nodeset, int * nodes); struct Ng_Tcl_Interp; typedef int (Ng_Tcl_CmdProc) (Ng_Tcl_Interp *interp, int argc, const char *argv[]); DLL_HEADER void Ng_Tcl_CreateCommand (Ng_Tcl_Interp * interp, const char * cmdName, Ng_Tcl_CmdProc * proc); void Ng_Tcl_SetResult (Ng_Tcl_Interp * interp, const char * result); } #ifdef __cplusplus #include namespace netgen { DLL_HEADER extern std::ostream * testout; DLL_HEADER extern int printmessage_importance; } #endif netgen-6.2.1804/doc/0000755000175000017500000000000013272137567012552 5ustar kurtkurtnetgen-6.2.1804/doc/pictures/0000755000175000017500000000000013272137567014410 5ustar kurtkurtnetgen-6.2.1804/doc/pictures/menu_special.jpg0000644000175000017500000001264313272137567017564 0ustar kurtkurtJFIFExifMM*C  !"$"$C6"O !1"AQa#Uq$26Bt3Ser45CEFRcds1 ?H&p8o>^vKO.WzZ޷1Bf64>??O,,$Õe[̶X l- ctp{Qr-v9W|d#1,~5E@0e;P3sw/A^WkW5ĵa "o0L(g%_4C vթgVVϻ5㲑H#2ɳ#"FN52 zN`LG#I+\ٺ,tz]gV:a-e0rU+&gDCeT( P1;TVmvK!p]ymU9Q*`Gb8(c/?^&h},,~q=hʯI1$} W8R[|={qÑ KK`@)%"TFَ؇y2 yj,X%m!f̍:RmFmCv~,҃4@! ȌGD2IU[)V ʴl4<ɭU:",( 2A-XMҼ|7_|G3Zhf5.哤֚E}yh4N߀\*s6J+k5Lܠ޺.I_lҙ~f?ӕ$4}~dktQzz:gMQrF, [ΔQZ9gt][Vu9xǓ̇zr)c(eoe*V^rn+BFy\٣jv,Pesv}g>|)+xQ\9Qkp͉k\+DpdbRÀEU!NSNKE5 F8ݵܪFYd9\8幨Ȭyd#z+z/ o,{Ƿp٨!|fJ5X~9UT24jT@\oۿ6Pd2o l|pX[7~d:$YWOX@"=o,92c_4XJHGn0<(n[ Z8!g5w^P/h}Ԏ1^,Enbv.)+םJ=i'@=kȣ:ic>o_abFj(![ؑB/R(Ec]z_ͯr'UpJ?2, 7OI(UO/)w_luFTdVG7K+=],jd&)؁̖L*SbPQhí'­(Ùm]ZkPtDcWnt$ou΁}'p~R6z.Qs+^v0/W6!}0/yGS2g/LM%,gc/d\G$rۚl"dJ;`k9`jP51jRtRQmC[X":4m1k$;'}_9?+ x\ݱ,/PRr,CX~M!θ_/&g9wԊuq3~gӱ:\)jU6Zg tPKیŚ}^ZkU OTpBF4c$kz:Y՟^v.,[qQck;%;- ЄG5ci K~^r4޴ VGVrybIZNa32#󉡎YYu$2te߱6@\sa8 V<NB#I5 u⬬#B'G/X]`Vcr2IIf 0oBK;(ř}^Z[u ~(1 EWFhOPu8Y-PM v&˩a47CH+0^-׳8$֖ I(ǓԮ<37yqb3meV)1FNzҘ*y06o~%yc0ŏ18d[j/H-;P֧U*ȮIaY EB[ʄ;2 һ'4U@6G;o1D|w^c7%z+nݽj kv~ZrkSÄe%!jP[0%whDjY^fafb:ɾ'sl޽[A6SSLF @Eiyz:`}oKY\e\,e(/=Y,"gO;~:ށ.sܻ2s֧g\ƝǗ^?)?'O%( AVEEOeZ\ְ;nܾzpVIIAX C!o*SF@dAfC^SKVAFr\{tm2/{ֶ'װ\a24rhM0ʑMV(iƭ=/TL#wln^l?4oZd1ec# @f36 X*k+-Y:P UFY=<'R‡˓LtCwx=o}SmR9$7B v>*ta}sy/P %szGrETl40$٬̞])j5.V9,f<6SZڥB(WJhV47U"u5WV-$Nޠ9sfG;o1Dݵ{q~n'Wұ?Ѹ*sń6l=XoC{x@mnH|\f`>G8۽͏!Gcx ۾x;}Џ~??}x:ֿ~~88@mvG_wGwo?oaHg'~>N:?pg֟h'!#;_|ď}=i88ow{'o~͐4B~~Cu_Ԟ\}}` ;. H;Ux,Os}S?~?KNA_ppp`~ /8>Hg^XLVlؒ^zx88+netgen-6.2.1804/doc/pictures/menuview.jpg0000644000175000017500000005061213272137567016755 0ustar kurtkurtJFIFa[CC/" E   68%&UV$'(57"#w49EWvx$1qQ!aA ?#pFŖbqo||2wv/78}<>7ʯǿh~aڏt35e)m2mlJVVT ± (,JThF2d;*6,>ud^MM*,.>dfd=>8k2(hᢒ$lY3ϓ87 Pf"+ͯ+Dь/9wNUÚo8kQco+,q&tY)ExNw UXoU}=Y?e{j0To.<,DN*eOlNMXn@ۥ2Wud*Ҵa&.Ku.ڙl_Q<{,7vG|36ɲIOėԛ_f^UV7>L@$9ETm "vg5U˃3̺vRmV'Wp(J U5Qn*mkGURSnf{nfdDZ9*K ݨ2ҙS\RoR ^mjEH \L D( R$Qc)D9dlm6<ƻ%[\]Y jZŒ 29Uo|2-mјV&v¬rn׫y۬vW˔cߑ`ۭcVcO=m.r 2!CR$`q#rVm-f2궼 AeF%slgG* xŚh\*L0$ǙF}/sʯǿjeAдh$/*K ݣʯǿj=Ѡ{,7v*K ݨFB<{,7v ʯǿii+N3lR?WWܑ)^H\=edd;D{Vu+=VFOo+4nT@alӣڬTzZe]e@J !gM/+)0e 8Y88[6RqZZZ+ I!¯`K=/Q9Xd_; H=N8*UEV%ʬe< naHӉZِl&emmy5jh1,ʍk%[f[=9Pl+H,3B$$R`&(C?^=~>?)M^pd h^-siNVqlB'@&Phض'V +4%Ak*ڳWٯSI wB=g֞1u}64444,?QTtiKͣ'GRx%z>֯uL;Q+W&UFB5Ꮖ,4[5(]&~񦇎m8TSDI:= L4ɮC |3~5ؤ_ 7|[XBl֓q%BĈwhBrjF.v}ixmo+|SsP>ղxsau&FfV&:wc_=aenulhX\˪-"p'&S۸@M1mG2z3JRЯwe=DzL' sJ+g1Fy"mK="׭(n78$m[ ۈl͇1?QIج*y*vMPK?[mcꉤk(bV' TZ!ezgp6X1e{Ս5T%6j̤Zq==LMQn$4/ߕZRX鈡+ڱܱ֩|Ҫ0g<2t v^ `pHc S DxѪ'īD杧y;V]Esw*_{?yIl{JǪV;-mb" Jʳ݅]8~x54hѠ4hѠ4hѠ4?fJ^sm?:k.׋~aڏu!Z_O}0G4kff[J[arra 3[[1hVVT ²" (,JThF2d;^ԉZmBMcuT0* PA5x5qk;[s\CY>RYDvHd[ :rG"Hg1jL+Hj szf0chf = 9Bt^њ )gl,WF5+NA+ˍ eQ>ZIBA A<8 ⇥dtxrkٺ2* 媓k=#SGwxB2V"VmzaY(S|֜y:fn#nE=)MĝnZ/68EZ_*m=ր[8`.Da;O4$ ?+jk=qc{;!MBD71PWv*e;WS"@\eXp#*in+.􎂇hy5Sebs9U:53~q`"Q/ǧV@kCn䑚OG6^G%`sgKHfi4th)z"\[b(0Zʷqι@@7hխJ[7C[Tѣ@hѣ@hѣ@hѣ@iKͣ'GM,?QTu.׋]j}=_õB~aڏuUY:e9[X6g+ʭ!|aK$p3ٚ PJ);DqA/wf> 75qEYeܐcͰ6[X]:c Ӭy eΓ ؛Ӯjյ\!R\Hl:Xw@#<zِ CGc_=XHY®WW6[աzrr;U5'she?c7zYeγԮ.9YP v0Ad&j-W3XQ"`1 F9o =;yKlJP8j8/5\rH=ėsobmZ%lWP*utf"rAsVN%4 Mf-JyLYaڡ$ۂHTkf[ޟF6BJ;9rⵊjXxkHY%"<"5rLSM8H[c-ƙDScIH\:W5$زc u0{Q8[sLTOwqc|*"k8'HAl;$˩- p444,?QTtiKͣ'GRx%z>֯uL;Q+W&UFxlŧ[a8)d@!n##l$L)ɅIB16v ֲ>\}Ì!E%!s%V#L mzkq.CQR[ܱ!QiNӗo2W;E:T€k*L3\[E^1C&`U٠S4]ou.$}{[i[+MH$z!ƿkgSzI<^gOIa M PέWF50FxVعݭUഊنN.U*fg`? sA,XKK6XB e)=A6-7A r慬˰_NDm4Mx5{&o@1}wqKʪ%TeY$U~AX-7FLJJ5qҬ BYua`{lwO lZ1N)70.ôrXm9->;z7[N>?SJ2@&=ƌ$^dbw|e׼m䟈wW?dw?T>}X5~z4Nˣ-r"~fdFP4U^<9l),>[u[$jYNDkxmx *P*J|t $K^.wƫ9[-m(M`늅a9;}Ω]B2zV.ba@8AEȹbNdkPωKp<;uh)xd[ t' *̩k&Ǵ ~ P8kHye̬Ùe!V})U0L! Zyvq򭲮֯uL;Q+W&U\EuZY?*Xk Pw1gWCS2wyW}KG݉{s).[:x3e9=$5XOCe{uѰkj B8⮷d1V ;ĤM>b9)"J4Vj$.dRbq]yj.pufXdw6W/ d&MGATQ =̚_ޯ,jp({9Ûʰ*X7aš,3 Cf& # +(_O# \nw.JK!Nb5EL yQQm$lJ KbdHXiUdY*7Nkx(k!2X6>[y뮘ɓºڒ:s)K8.⵵ո.Sb0do1n.Yٗ_rL{+1xi*#Wb@M^EXk~ɱ]=zh ]1sDqXXwyoϬt}a;9nٱ#@WX) HN*en[*sfS9Aҩ=j6Ig&o*lALSpٰ}z&_(0rl Fݑq PĬ][8?w%iVr2[^[g2VnvB>!ͅX/*Gr9R+L(klyhm$h\CþjY0A;tuWd K8VYfѶiSif|cҋ=6SHdQܱ/WCdreT^5m1 Ѫ{dԏ~edKxBŞ2;EY2r涶dW/baO?TI\P79EtUFS yjm0r!RU,=Lb^^@s+t7,P_F93'v`l!cT<DzD˭/*i |ѱfUALiZɪw ppx0$XJ~a/Pjcp$W+1*D^W /YispSqN ls6z"e2#ktk77eL5ug0gu`[1~]c RX9eXT, p=w"de2(u.pDUdwtwE_c)/S)NNS?sxjۀ8-қ5iF^]Y'S'2>9SkjGSw=@*u+\Y/o]e c}z"Y߭FFF/96U6Rh EQԻ^/Iv^{ {ɇj=Wf2kxؓߕԲR{ ]_4zIʙC7I  )TĔZiS,{ҰnlqμMbA,}U#8n32R 5% eً@XNXPaEĔHbR@4$l<[x̾AHdy7ʽ6=ݝST3:m̋VJPlm-bJ'n Il2PFysF%VsG_WFjq:%z\ĨaژuQ#T*ằ AL*$gD#nS:JޞpUMqUEh,̃kIzݬW0\ .q[8 oV==+lK [RjśLp`ך>;K] _T8S*zsL"T ,ZGx+/#m٘UAL$9t2"CyBc=n,o^@ Ad)0EѠ 05Wmmq+"ԯo>W ^􂳁 3) $芎:OFWM'/9R,' ýv@iq\BA9/ DS5Qrth! :aUy6ycxpY{q+FDPDV+0A'U{[,5Oh6&fEIc+)%g#,kl*l$^qȸQrK(v%nO߀$ͨQJYVלXA6ֲ̨Ze#¼pTb4.\RBK &ċ#z>{4k;fhu5aڝ3D9+dahGoA#H7x7ѣFѣFҗeGO*M)yY]^/G{ɇj=ԅj}=_õfY[u[aMr^ڠ Z0ٖ@(24 йrJ,`Id}ۛ|XnͿ{]%>.x:yw7ߎCƘÏ{ w{7d}x=_7t _88{Z![RHtPv@jXq r6OlhY2B++ΪVo/p[^W૾.^Sѹ"O+ 3ne{; 8Bvͥ{)Uz8ĹUo<;uq lIdI#9֋EqĤ .4UȎ*["6,Vә2B[I^Wˏ j+oי6vl.ڥV֣9!KZGڃrYB2e/76EcBmsq|[ʍrj犽ҒT&UB̐(+xh! $ YpL|^( yAx,hu2QmNGz^W 8NS2LdsW=D1XU_[iۖW*xTV~3+֝$Q@e:Ypgwl jwz>Vr*SSTm|yaڦ|e%|yU{}B[>) '^q/uDi?ew/us~&OO^7(D~ ugI%u}cط/&g3,C.cc[pf0qBe6=74eg]/jD3F9B3}Nw>iT$#yiQƜܞސes&$]?xUg߮e >UҜ߈,}E׳ a@)$=̭89XX^(Hcא@ٗbj{#nn pӉQʃ\".\Y]ec\u}n{t6TG]Lx\I;Y}PH3q&tv)zcZ>6C}mfaV9\v>c\* F؂"X:dr )܇7i{*ӓۮ݃Xڮ)dٴԔ݌YcLԥ[۱vC].܎1~er;]8U~50UgnMsΆS`S2(2N%ݧR3 }/dvc_-c䃂H{G2^|dhkl.,K-S7-(C۾6dDߔWa-=LAdJ6aϳP nr"Muy7&П_pJkusQge# ˹KVsTpMc\F|I[5xV1v%Y4] z=Z^WkW[ &_6/ eM9} 4zرxfːs291 U4RP XG*HQ'ݧ =cSn{r,wTBLG=I,ӺpaJtrvc$)װQ΁Cj(ʟ:.P(Q3mlvVKD*ڜ {oYUtffdu;.NL'/fkkf-<#3!T ²%4pIr,JTgɑ2dۛK*MxɅwEAR\AJU'̼^oov˾XWGx7WVG5]RYLdg<4> ߱j^[= \}p_ XU'c!${XZ5~Na{֚,{?^2AĵFCܠeX鲶tFlo R "+!#,\c9]8D(H`V RGBպ*a-E"s9#qme=$+LY8>*7PdQn]ԚOۖmfzYэ ~~&w3a *V՞7Wاtk6W2`,2w"J a1gtX Meem)my55x1+*"`[Y[8kG,(0E$Hر<8qcԕ|A8MB,ujhY-E܎A^TQrKVČ ?r>P#nJAR%KZSy>?VW7Vْ֣jA,oﳕsŊ iV Խ[ aD0娘e=p[):ͷPsS-K$PIX6:\^39 Cʂ FDblxppOTn.cNTLAHIJcܔlͅRJf*TEmO (ؼL^L,˞ė.o'ޣC{'_XdE?ע?҈nmrMIMnNՒd17)5l*R,bT T%p d'h\EFRX96jI@,ĕ**J[ 6SgM\Ņ6Im vGxv=FJ^sm?:m4?fv^xkW&R{X聼%ߑ͑xŝE[kf &XxfdzR0'ɹwrX&4@\4[hdA=K=7={~{"[׹~BۢuR5u[6^8ۖ$JYD<͑g孚8j˖Hh5Y!ϓ}ۣA1,. Z*q-agQфdQ ʺȧ\}{*Fsm'?^ =Z\U{#u:G/Kꂫ`h4cV[alIέN-\~y'{<%n"~|=׿/^i#~Tu7eӘmg9%7,up8!'xza?n-Uw-R33#arra8|3[[1i`XN,KHbR#>L$oH+NwZF:r&{ jY2 Y\=U@]HJ7BJѠ_=>PgZ_HufXir n0B-|6">@0`fD 0u-ČV1o:qw6'U6*ϻ;yاyRw)bPT) ,zѠ"뺮96Q+d&#]4u5 ģZޜ+tYV! |{,E2 3 9ʹLxC9 44,?QTtiKͣ'GRx%z99&VꝞAzE{}7l_~I+{gH_$+0,F:ozE+L \QF︕'k.4~dG5(JCatCZll!owks?8}g&~/~y5~~]O{QF|kb!O GñLh!+jݾ"JMljC;7-Չ$DI)kEUW%:nʑqZX䄅[M]OJVW?/y%JN"GF;<?osp>wxxnM:y`< Ӷ/,qȿhLĊu _ߞ&Y iE>T41ԃ2`گ*b nZ,tQ"ŲDjA -`vJ"4Ǽ9G~^Ǡrk&X9lה|#kLeC%_XOGxqx46iD*t06唃\}{oqˢկ16MIGsюyh-~ꖑUv~TSZG5ӥrP)K3kP4]lQ[MS+UUϕ791mKH/Rg %*jG2VCRvkAdlRP#hH0X-^g6nRbEujp3&d)'w7EzbFokD@"dLdǩy#^wUZ_0wi#kǎWSU*'ڌ|]q|o\ 7cG;9tb=a~A(oy FTo;"2I90gK%0YW`S[X9A1L7\ːpcnۿ2rPs\8O«t1n%a/Z682Jsi53Z}i1om^+'ő|X,'MjS,i=fGb,-9&mPm%QdlgG* xŚh\*L0$ǙF},{1(l]~P}yqד2lk4P8Q}haDж^0 i\}hymxUE Xk4lS2b  'ZB[274hѠ4hѠ4?fJ^sm?:k.׋,,(y#l̀Bc̅6 J&6vDNf qA54s ömnޞRݨdnDܑoNĨ{<\|;[<~}A7Ebql۶<61H{Svʏ/n< ;{opop{8w8y]P^{_6Ls~g^wsw>g|6_E?u7H0#2۷4UgDH"ۗT( t~ɤ>!{mmOJ'֯z^$712lzԹ;u?B-Vڎ5ʓNF?Pc}mH 槔?hƩ>`՝ij澯E+])8$%ʿ-ߐVdKcVJ !Զ$ K TM)Qlf ʿp Py Ue>;]EqmſdH3eG]~.3$x>{>IDogkz'(@͙NodsmY*Zȳ@S0Ŷ_r#Z%dY#i58I,,64꺬ՍNfՃQX] B|3U{o" 2==eJR)iAĈߓ_6=HYj{27=Gd]HS ˴jͫ-JRfWݝkDRvHUQA&J&7w .Ube~r{:mψ3(}h?or_%O ;\Eq-Iԯwp`wtOYWfm( K8,i޺*: \Hoo4˚WvM[Zy]#p+ 1͕_NmeX̵;UE--ϙSxs#d6~Ydm>k&է4lYѱo~}DY[JJ݉9v)(@$ֽYH,uv'3(\gc Ǭ}*< )!Q" vK ٫v#|,??OX¤Parυ'(@G'X,GaI  Q'X,SGoʑg޺OꗾBVY)ң#?1)F-+z| (|,??m d Iol݆`cڪY5:斺6l0 T*G''X,Gaugt ym6e[hM>YZh\99?c < +Լ-gka\X}&zw1}(F qדO|%i w$&`#98<i$_OX9?c  Q'X,]~)&n3|g@z88L Gq$iX9?c < *O(Q !> Q'X,RyB(Qd~rυy> TPYaIiWrpͲs g*ݿ)O>g'Q3Dt?yd5{U9"\jZv)Ldi3 48L4I{{tM"7U >>h;KZifٔ<-{ԦGiWrpͲs 32iV;xydpkywP,F,2F:j6}ywhwyfpy|qiqs-68]c?0e82:`-);鸽":yZkBF1|[ڭc"Yt o%cЁ]ԚGD&snқuG*F@֟w\j]o3gRK` =}s-u+m"NJ"sld1d r*6(p0+7 E[+t;xYgܙ۴ _?o_Qi?W!֯aEQV3G/Vax+D}bEn &n (aEPEPEPEPEPEPK:۫ n# F <:bF@ ZβEsox^I$H(J 3J*nGSEd$'5ڼ 7=i82dP6z "&,ҒREel0`>RJ-4mf[K{F%-bmyo< ]K>(8|XKmIl8S @2lkhֶQiWRF(/0.%@@  F<.Ue)d$}אG5I;A M>k86! $Wh>jZ< 0|l-rAoZPEPEPEPEPEPEPEP_#Կ_>!KЍtafu|4Wv afcɭ?}7ư%? _Y֖g5DԒPsa?:}7Ə}7ƹϴ?v*n:}7Ə}7ƹϴ?v(\?Z?Zk>ϴ?s!ih!ikC| >k>Σ_M__M__v(C| .:}7Ə}7ƹϴ?v(\?Z?Zk>ϴ?s!ih!ikC| RꐤvUQpbϴ?s!ih!ikC| >k>Σ_M__M__v(C| .:}7Ə}7ƹϴ?v(\?Z?Zk>ϴ?s!ih!ikC| >k>ξ .Pʀlgӊ3\_RF8l-(Bj O_%Կ_NvgScIuWEK?kS$wG&2 k~KlI%36#Ez+ LlrTWGɮiNe,yohT9SL|Km\,79&嶈BF3Qfc|Km>lRGf9b)eLud ]/>O~6? lRGf9b)eLud Y`i$F%I p J_OouF^Һ  lQEQECRg쯼jIvgqU(ZnǐFq-h40=U@K,-eAn W- B=CQ@2x2Eu:EwAn6wp61ye@$p;:Z̛[H4{uVdFJ2wdTb 8%QEfjzK_\[] , ˹Z4GO}:ZYٴLҖDdH[[! 8+[ce_1%@"wel +Mϊw_>_>`DmUW'jEP2NdPEPEPEPEP_#Կ_>!KЍtafu">^1"k _#+v[QR0((((((3Vѡ%ƆwHd:̭ K1kO=핶mB)m|ZYyG2ed@]8iEsRx6O N`pdYRM$ p* t}AZ{VH!0--pp%e=mXFB=ZͿfe2AiK.gb䝤 ZE q42HѬU(j LJKbcTĈ\rHMPEPEPEPEPEPEA{{o=ԛ"LdXN@ $$zVYjv F+`  tVdv|X.bWݺ`x 4vShmẂv@dquo_#Կ_>!KЍtafu">^1"kX%]d[irZYI;\}k LW cSp\'Mhɱ d}Əp\'Mhɱ d}Əp\'Mhɱ d}Əp\'Mhɱ d}Əp\'Mhɱ d}Əp\'Mhɱ d}Əp\'Mhɱ d}Əp\'Mhɱ ]hc<\lxL9*I??s'4 Xiv}ͭK,X)Mr#9NcI=K=R8=]cAoGiÐϩǞk4]Z1,lwULӠ$4C\Dw;H l4)˜ ǝog[oh7{~yhe4zke=^*6}hg8@U>!KЍ}Y[Yx32y$_/k3}.J躩g6ixN}[!%ӣF+ⷢ$,"\Nkc2I,VNK;WgD8V(ʞGȢI,D@YW'΋ՔX種;&]N]9ͯ"]d3H :뛞UߡE%EuUߡGm>vQ`Q]om>vQ[ϝX,rTWC%f2G8rRFE^^[B"~ŝ( % ދzB]?¶yVo,dbN6йb Đ ,9*+ vQ`Q]om>vQ[ϝX,rTWC:M~pDͰ3:説.yVm~ x@-ܥssow $ER0sצO@kNO-|vAVeXAR@"j|oB*|Тc*|Уʶ;o(X.`&$7sSk5bKk9V[ GU$hAg?7VLeK-F5/-|:F3>Qꚦ&z}j8UYv5;MUQ*(ӿ פ__/k럔**"UQ_/k2}7?AYEURki 4e?AXfc:G5TNԄ6qH$XiQcUޫ2AXjHal d_cVQZ*Fs־ NӡP47\ؾtcAdh ( iگoS߲Mo㯖뻧|u5~.[=սk3%DCrIl|c/,rYl,.}9U3dѶv`@~}GNuuҴn{KXe pA.o0tVYi X(PNtPEPEAq{ok53IKL03OO25HIRմg9HeLIm܀pv^KEq੖+dՠ{mM!^Ifd9@b 'aY; sYY^* T @$gtQEQEsj, {o\)hr,pcF8 2{]OFkH%-<.cB^~z,| <*vZtv"F7XIႧ&!$eW\zN^\2:I60H㓅(Ӣ ( ( ( ( \_RF_/k3}7?AX^ C[&Z(Q@Q@Q@Q@Q@Q@ З]IYUJ[D8wFF܃+jg$_,7Ot{0R%BB4+ HѕYRǯj6ZR]EmBL@hE[ƬQaJRrryxP8ϱ 2:NdM&2@,I'TY HhӼ=YiS65k"a2"GԘqya@m?ha<>dLErzUִȾź 3+nYYn x+hbH,nnYdM6BVV DQ7u$ř((((((((G??Կ+}sC}KM+D}bEn/h:1W])J|[hmSPˠcVkc&< j?jn;Z+n)Aɹ֊⼛ j?hn)As&< j?h\h+ɹ&.;Z+n)Aɹ֊⼛ j?hn)As&XMwjVJ rկ&Sl-/'-3MW=6/!Pq#^4{JVi!1$j7G#rzZ?A}kGTgE)iH=1੖+dՠ{mM!^Ifd9@b 'aY; ~ _?°b3YZ` XgŠ⼛ j?hn)Aq\h+ɹ&.;Z+n)Aɹ֊⼛ j?hn)As&< j?h\h+ɹ&.;Z+n)Aɹ֊⼛ j?hn)As_/k akaL΂Fy.ğoj?\_RFp:o\V`Wí*v7MD݌):V -(]!N+ LlsWG p%@̅b28=A؂(II!Dydj][N`OjrŮn]ʬHRFr*=J;NOE1EtwF?ȍ4X,sWOϧDo;NOE1EtfI[hPLΑU 19 \ۇGzhw [hi "e`ElZ]b\[ V47bMq,0wF,9+ӿ"7ϧDoc BZwFrYXۣdle`FFxEĵU1zTG6nHfEWxUbB7dU{>t/YO4֫Zg{U>bX3ϥ1]ɩ/xK$GFr`± V=wav39sWOϧDo;NOJ±Q]?v>Ə;}?# k۠yHg,*ORHw$ ;NOE1Ejiڗ{/ٕwvF 2B8uoż),2xbFAGz,9+ӿ"7ϧDoc;}?#wF,9+ӿ"7ϧDoc;}?#wF,&<*#\_RF;vTPg< \_RFp:M+D}bE>JW}gWC0 #O e<">^1"k|Llqz<rYsqkcAԒi$DA6(#Ohچ,Eo C3J1s2[%s[EHZB^GT ߆L, :?vISEQEU KOϬ^3 y_27s1~ucϴyVCTMªOqq>@II b­sre+q )ݳ8xt]U\ͧݚ4[:ЕXMHLe[ZMaYY]=G2gt̪sNIztPEPETu];H[Nm%8<{/$TdM.6An;hЯaעAyqxyt O݃F-zD4ږ[_ɢYa:nHCJȻ풺 ặTT-vy_-Os>TI{C4zMHF8Xq- ,YA{ۦKL`ʠG˹ZFͭEQEQEQEQE>!KЍ}q_#Կ_FvgPo_#+v">^1"k|LQE# ( ( ( ( ( (0|]< c{*L +(z$dŌxOM/noT fUL]xTrO OI*##V` `z+X2xQkuۅ#,F=zLBG4.m] ^C#(&BWjp_*0Z InlA6stJs=(oM_Oyq}Fݪ+\&"H"3!ݕ+ޡoũ?ڼB[l0.aӔsDĒJ6՘ 'xZT3"aV$)#`}(UeovڬJ"2n'$6Tcxa!FOSEQEQEQEQEQEQEQEW/B5|R#]}ٝCȏ׌_|7+N6$zZ2gGT֥9?qCcEa?;:+VAoJ>խ[%sk_dZY(\CZY(VAoJ.:+VAoJ>խ[%ξ>խ[%k_dsk_dZY(\CZY(VAoJ.:G^7-n [8viN䓰;ዷ?jֿ-Sj;흛}0 \.Z5Kc@O~XR</ܸo[$hu$ൊ[włE1$*n)-PA+4çbe_a^O_Lg7'u4{QJvmA3խ[%k_dq\CZY(VAoJ.:+VAoJ>խ[%ξ>խ[%k_dsk_dZY(\CZY(VAoJ.:+VAoJ>խ[%ξ>խ[%k_ds_/k stȡ˔ _'Կ_NvECIuWEK?k ke]1Ktɏ֥e Q4 ȁK \v'2b~_?Mc[kb~_c[kb~_c[kb~_c[kb~_c[kb~_c[kb~_c BZ?ض߹*H4KiDKrBqFz{`f Y8#_Z/R5]\]H@8=)ԮBFMO?ֿ$xrd$ȬN:sŢ[kb~_aX種?ض߹(X種?ض߹(X種?ض߹(X種?ض߹(X種?ض߹(X種?ض߹(X種?ض߹(XyUF!KЍ}sT4ݵ ׊\_RFp:M+D}bE>-r7}Vl-4k\Xp՝i C[&h8kv~Nsqi:tw \ ^'Ѓ*x\MXp.,s=d8Vwd2̧Fҟx%LfMvTӼ@k6,6Ls2>ʑâXޛ>dl,rX0@̽C{ z84VGv1NX+H'su:tQ@5mt˫[ie٧R<WBq{9֬5%Biq1Znreu.Wa\IS'iEsZ|' Wmbζaf*t,g}֛\}Lݢ4ɨ,z?e] !Xv+H wS"nҨ}3VteKOJQ`y" \Xjie\g!ܤII#̽mQEW%{-NPISI#OESmIS'[E`k{wxJ3aCq5 #;ʕ8e2UgR4VxtKg̓ͅN@R1|Hy8 UYKGq.a?)FL*K#r\KceGqr.{˶?̇^1"k|LQE# ( ( ( u7JX.u}cXS$op3>V8Ӭ Z~}GKOXmd7R:iX8US?.pjvޝڭ7&Pm!T *xfYк3'Ό*J` dX1Q$XOgltm#d>sZ>sqh$̂7!'J2 BVfMhN]ZG %!Vve @Ž_j7Tӣo?d]tG*0w&q5;]LowHU{ N8'VԼ%rgtdONKhgQ5eFŜǖ9g)#T9 ҬNgd~"~\Gy?A׵+GKo C6qImda I醩ڞ6ukdS0&R'9:)|'XY͛L K*Ct}w:mI"EsS#rz @%Q@Q@Q@Q@Q@|R#_\W/B5чݙ>Wxݬ/ȏ׌__-lQEHŠ(((kz]_'!S ppHHW]Zɾ' H ʰ  EOEPE@ش)&0yD(DO@STt}2QwK[u+M!Uv'8dO$Č[bF` r@ŒR(O25HIs 6*VJ0[Kk[B h!KЍtafu">^1"k _#+v[QR0(((:C% %.TcP/N|]:yVbJIY敥; we>B-:m_nȳ^YoHHP΅A8'ҹ8[K"Gno*U1*ЮzÏMZi٬񨹌Z cܰwN }+m&/lk$;e 8 :պ(ºe\wұ݇#b٧隍A,:vFFyyak3h^YmJX U/3HY`*yD`dC]&m^8ᵺHgex`]neqo5uTPG R-?첶y3INwiP¿;}~Zi^3\"bdkmw.W=;W"ωtK1VkleO&9A}ґjn1ֳ+jS%KTIkvfA9S"m.`.H=Z++,\$r2rAnhl"7ڮ"LqB@$c' Q[IoՓofN3x8GOq:_Tm7Yh.Cm92XFC u/1u/ֹSF K˽?D[(۪Gh|mH`v8 01ZuXA}}w|K/A ՠ((((G??Կ+}sC}KM+D}bEnG/Vc/ (aEPEPEPEP\:{urx'WAQY[Cb%R;7$Xb#ZQJIoFԣ+%͕Ӯ! 3--P3ߵ-agT5Օ~eoɒ7#dr8'Pޝi43)He7Wl}c>Y{z n#3QX^$&J *>qrF_ۮ~wi8>{\ٌ+gs$9la퟼ւ.R5Ggb,Ė>{mA do)䌲 72]ى+:$V-xm`Hi##y@ qZl#ۚES3;"'b9eA;'lAwMav39sIl_i:Ť/nf0cdىw$~Ul6 _j j#OeıI/66cpldnw:} 4}#i +ʏ G4*Km\\*Gm2W _F2>-El籽{bHoX/n~cs;Y]C7BkEF>1 -bxkKb;x+otv'#tF[MfdRyb\ "iI 1HTŒmQ@Q@Q@Q@Q@Q@|R#_\W/B5чݙ>Wxݬ/ȏ׌__-lQEHŠ(((((( |wIFqd4M,I?6G=\xh5MNdz[- udPg'q `8W{vyD+ ŤJ̠F.Ted4lz㦰dfDtw- PJ6 pLpQ,o2M$cK1N5smaJ0oOѤE\(((((((_/k\_RF0:~ C[?AXe(QEQEQEQEQEQE$Q mN= #$ok&@M^$k+"ƮDW,yo6֡{{}"?**yrHTM?Ək&@W?+͑eIN%W(|jɴy'M?ƀ.jy?F [A6 ɮE*2Z֐} }ۼ7chj( ( ( ( ( ( ( \_RF_/k3vֽYH,uv'3(\gc Ǭ}*< )!Q" vK ٫v#|,??OX¤Parυ'(@G'X,GaI  Q'X,RyB(Qd~rυy> TPYarυ'(@G'X,GaI  o$$h,.FXā1a;QCmOarυzv\]5wEhp=0{U zUݴq>hV0Ȇ>H(IG#}5Z)G'X,Gav45V+=yi$R}:n['Kȵ Z eGr mL9$qrυy> WMVM.YijϖGۍ98:XR -CSK?3R:d L^> y> Q'X,[y{V.:6 SNuC55Tso乙8`xJrg'X,Gaux6Y[Ǭl2Ny*axAԡQ}z%8`'v.O |Խ>y> Q'X,]{+]w_-?IͺKH@T,OS?hmjv'[vq,srF1ϠVWIarυGq7e"VHo!%卺m9-KR[4i=@#F~Ft%(> Q'X,RyB(UG'X,GaI  Q'X,RyB(Qd~rυy> TPYarυ'(@G'X,GaI  RC:y,p?c )E?d?i M5գFsa'ɟ|j/YxtiWrpͲs 36;Z@Ɏ?:M.K6e/)I$H,-B3Dt?yd5/25<.?5Rծg.VHI2ͱ+OZri+lգFsa'ɟSmwS`L2H#9qv&:K;\}ȌAtՃ.HI`WLܵBtRϑ_E<[F[ߊ xGCsqci,go5N5kxpuL+Q{ OB5>+/_O*ð{&xߕ({'!~T_'G=hal0F;WxpuڏaO\o &&$m(峻'IgjZ,:+ui5k1+⩺ԚI.>*ek[XK{4B2F۰;ןhMĘf"fq8B5>+ 8'IU1ɞa/kGU:uԌ^}г@|n#U5cPա<$-X8}g/_O*kGrϹskW.-#&ʅBHl7'GҪ&LȱDDE^+W_'G!~U[b}WD9|+an%X[Ydnxpu+xwO*óf!g [Ф H!wF8/Gtl-|{|lԚj%'=+_#*/bH#]G_N*G/V??*M\3ݚ1MqdĒ\m28PO'To7ɧjw`a^ %ܱP&LΤpp%u&=܌;[K Ue>Je9%?4}~ONcbR9yIFn Ee5)&n^YMe!nlRV-~%gԞx[;drpppAQ\ȇY,IR%; Hf?,2w"R~b2Zլ #!%^Vp~V#c  ",nWYV8X˖*Ե+'DTr#0I#BZD5[f5';ݣ\N~g\G<;`To;ug;Mb=Lj7! 'Tm< 8Kvi5y%@w1cr[iFE vT2BS"fA18$g;?5ƾH7Cφ4ؒ#C)]$˕fe%%;um%e1#Hr)ͬPk -Y&r&NH8կ56bu, $sn^"A]fGOՄeַ"9Ury\on g `L^Y LO$_Mn]F9o_RPZVht7מֵ;>n1gwcO|uk,1\j'm$Lt,zĪZ;]C%f$dAyzԫXo@U's x ^Ak]^)e9/-dMq! FUyp'Ny#KZj|'K.RLln U|~u7kpfBe%XqA"M2[Ʒzt7p.F쇐Lgi%!Zh-CA~=4ldSdvݭJ #apAv ^W|mvp̳fp@)W(aJchװM-ytVi iҌ.eikƋteiclQ %>}uiRd)hRY }^&.`!)muq.d'k{qK 2S*?~H1v@E]FX0 $~UxSXlnXՠx )<\ut?F_(CG]^U@_}תו|s_GA5/  x+D}bELJ.Ş)vԟOz<">^1" /M՗o&*l9/Co7G!e,9/Co7G!e,8<=݌ms?%T󏗭ZsJ6a]ن]~QE%mYh6~5E%mYh6~5E%mYh6~5E%mYj+ZMYte?ݮʊ,9y<%z1 =;`qJ[E !e[E !e[E !e[E !e|Mi4KudєfFHv*(XX.l[ 9*/Co7]mX,r_՗o&Co7]mX,r_՗o&Co7]mX,r_՗o&Co7]mX,r_՗o&Ww~mMs+Q]`((( vB剑K k~o=q@lQGҺ(6~4?V_haX /M՗o&(X /Mj[@,ṞkLnH BE1yaKd'h gۓpk>9KsԮ 4? )|h_#+Y+Wxf |Lkb:+3[6ky*]8j%YjO$Üzq7=R*/Q\ֹ7O&8/FKw;?hlW+LI g6Fǐf9 He'Q (Jl2C69n  4'SɷF-#ά8"\qtW=7WKnoT$iP**"w>w^ahrmHe>eEsQxE9yM"WVH9S-Fm#nYq Rȅ8 #ր4.nzpE;2I,}s# *KB9DlТ <i+ȬH `($~:ѯ|L2͒o6#Ho_,9qfESw.((((((((((((((((( + /kR/&g;ȏ׌_og{_#+Y*e16ݵw%*gVB*rybPXdzSl5~_7"uy j>u{s~%jEnp| 3Ƴ&I*TW|r.Knn"ߺ;go6݊.U~P>V+БFM7[Ύv˰[(;>n߹nzz..»Yʋ%3>eִil]Ao%ӣ6nnlFb3_oNԵ}1XYo܊X"7Pp]jvne*KiE pJ38x PKk>H]E2F`\9۽I x帒wYLjA;$l<) wt̯/fk*f/(`0wfz..»Yʋ%3>e֪Y} {ͶY!"yND3+ԁs@M"$ӑ#Omfȕgf;!%;0H:wVscwmsC*d29ңpnA2XX![ >C Yneg Qs=#W4FK_ݬ?eH$9 u:&Xa.DMepw89'R%,S 4 Alu[xn0`IVwGb ioKG<1tdQ 'Γ o i^iGu,7#iofydA r(l|sEbWL5fH;GH%d*'$'vZ׶xvĞNXfnجO%I$No@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@9?jW@_}{3p_MiKDfw C] \G/WC7pTc[k1bCr9I #Z?H|}^{-=Ą4gӚd֗.R \ @V9TUZwk熦ծ/Z䷇R[ x Ѓ&< IwiAqyZ~=I( WwXF$ಷEw]6xQlHzZBJfBe%XqA"n{q}isޠ.A]u(-{ 6h)}+b5 `I n] 7*!I@%[@֝Xh|o>o.yMg#,Y>,JU Y͌&|?{I)dUv$p9nA:vW֚]Aum&vMѰppÃ#BJfBe%XqA"$((((((((((((((((((g?J9KsԮ 4? )|h_#+Y+Wxf |Lkc\l!HB'=UocmcnV-(q~?>6_"kR_GԶl!1#XУL[s0^S#].xu Gt2T嶳*;+qyax--j[3ipbx8&9R2 #A?1<;]YecQBѯ`[BQ7&/s/g+8]Fh;]t&=&]F_((E%̬)U ʝm SYNۡӣoV5.Jz72Bp7,j(kw:]$YaX@.'24M{y4CHC7ؘ~>cG%+? G+}Oڤlue"̄pl|f\Z-ƣs,lx|d@V( 5c@/"XB II hc|x-$5췚APj!YOݬܓoJW?+)~./sYЭaKKm#$.+@vMkjWY|{-yk#gk4p#y xe.FGۂĈp(k'\F YVY07vH (7=[k/jWN 2Ywm\`LF\PVW1}aii4rH}F;Ww'~ XH$Kų#J)3@qn䷸%U)$r(eu#x SM4 Iq['|ʹe\b' 袊(((((((((((((((((R/&+ /kJ_&{3Wxf ">^1"_l-ͪeah;FA N~aګlI?{Hn̻s`3LMFsW4[)&-~zV_N͒}nhUXyXO͵~\5 ?[ ̺A k$)KyQ,fAkkQ4VgngfLUR|Ro-I sr#S$A! i897N7a J"u{*DpMo+Y]%1)N:|˺E)Oa`ywg \Կ GTZqnۿbpqc85}k lwk!M&}46wx!$TȡԌA;VmI"II.@XY$“]9 GFcgyx(nT̚h&(*db ݧYI$HeJ!PM:Ԗv9ro mX|Ggu}7lMk[BG1'3<']k;eb_r+oM!$1 "|]MS@ڵsܴRZHGUŒ$ǘ6C~0]jEN'j.rpMAxkKoYc]Jdѫel  {k&?hTUBI *^YUNÆs>M+VM1/n.iom"TrF?'eI n+`gGkn$|GxpClPN;1OEKm\++n$GeYK31.B"2uCkz}6r*-dEY@l"6$.ϪHѵ[>8 'sB&ȌDbO1N.usn2sa)5<;Hw6Gev%v/<,6Ӻ]̰DdAe'99 !$2]Z[˧6w?(pc@xD)é\/_̶ieCr4eART{*=wKmcLkE{\ Z/ 0) rFAGleieW 4>ѓ@$ 袊(((((((((((((((R/&+ /kJ_&{3Wxf ">^1"_؎(QEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQE3p_Mw9?jW@_}֔4Lgq?A,x+D}bEt3?L&5QR0((((((((((((((((((((((((g?J9KsԮ 4? )|h_#+Y+Wxf |Lkb:(aEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEP?ڕ|s_GA5p\?iZR3ٝǂG/WC7pW=?A,2tQEHŠ(((((((((((((((((((((((( + /kR/&g;ȏ׌_og{_#+Y*e1袊Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@9?jW@_}{3p_MiKDfw C] \G/WC7pTc[E# ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( (1sԮ 4? g?J9KҗƉ<">^1"ȏ׌_og੗ƶ#*FQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEcp\?i]ڕ|s_GA5/=x+D}bEt3?s C] S/lGET((((((((((((((((((((((((R/&+ /kJ_&{3Wxf ">^1"_؎(QEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQE3p_Mw9?jW@_}֔4Lgq?A,x+D}bEt3?L&5QR0((((((((((((((((((((((((g?J9KsԮ 4? )|h_#+Y+Wxf |Lkb:(aEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEP?ڕ|s_GA5p\?iZR3ٝǂG/WC7pW=?A,2tQEHŠ(((((((((((((((((((((((( + /kR/&g;ȏ׌_og{_#+Y*e1袊Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@9?jW@_}{3p_MiKDfw C] \G/WC7pTc[E# ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( (1sԮ 4? g?J9KҗƉ<">^1"ȏ׌_og੗ƶ#*FQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEcp\?i]ڕ|s_GA5/=x+D}bEt3?s C] S/lGET((((((((((((((((((((((((R/&+ /kJ_&{3Wxf ">^1"_؎(QEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQE3p_Mw9?jW@_}֔4Lgq?A,x+D}bEt3?L&5QR0((((((((((((((((((((((((g?J9KsԮ 4? )|h_#+Y+Wxf |Lkb:(aEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEP?ڕ|s_GA5p\?iZR3ٝǂG/WC7pW=?A,2tQEHŠ(((((((((((((((((((((((( + /kR/&g;ȏ׌_og{_#+Y*e1袊Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@9?jW@_}{3p_MiKDfw C] \G/WC7pTc[E# ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( (1sԮ 4? g?J9KҗƉ<">^1"ȏ׌_og੗ƶ#*FQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEcp\?i]ڕ|s_GA5/=x+D}bE^njkP1lMQWxݩƶ1M?ƶ({$hֿ=i5Ecgk_4?lQ@M?Ək&[P?vAO;ZI逃agk_4?ny??'G}PvAO;ZIM#agk_4?ny??ꡚH`(xɉ9-s@?M?Ək&[P?vAO;ZI{$hֿ=i5Ecgk_4?lQ@M?Ək&[P?vAO;ZI{$hֿ=i5Ecgk_4?lQ@M?Ək&[P?vAO;ZI)v :ZwM#;ZI{$ksTy??0M?Ʒ^1"k _#+v_(Q@Q@Q@OQԓoTtiM2R)[io.@Ի]|E_6 7Vt7I岫b8 3*ذMqz%MNx fWAql"$, v oTxWկBO-YfuTD_x(|'kl K&9_,dV_p^Z\yM}#4;$͌mˮ:̼>a+Siڞ%}JӛOX%)c `Q3z 垿kq%)rLj"oEY2n0c?2h@X'lQEQEQEQEQEQEQEQEQE$UIG@5U4=T{"3Iw^X'n2p*~)[JtL3h )@w(IFVX}Ak~4.R {s3d6rpN9}F mF+HfK&kvWXTJN-UӖ,Z^;2%|eP$eb;Uӯ.mnfm2B#ʜ>M洶Yua0O.@6aX O 2? }$墇+!d(>^}GFM+QD ( ( ( ( &V4? )|h'q?A^$~)Ei.d'.d8ɣ-S&=/^%og9{m_o m(@KoG`W%o-}'^% ^{xxr5? l{ޡ?-o m(3x/B%R'"W%o-aOD*_J^%o9zT ȕv:X@_'r^] ^{h@KoG/[[ =h@KoG/[[ =h@KoG/[[ =1ߜtq=پ\8=پ\T#:)1' ^=*VLmc_X-ae9^>UwoqV{u|qV{u|̞Vl\q߷.qqeZ %-F"Kl+@SoPLVN+8 `69KMj/(4捜ўC4 pkv a\:jǖWKܮhYﯽYﯽ7q2UUܛ'8—E?lG-ϗ, Pdrzy,(ILa'Ad[(7{ɕڍ1RF5+$:KlЫE|q-Q`uK0gհY¯P+pQ02G\AUl.Ul.22Y͵_d2y<*FqzH CY#$iL V}D xmfKV6a8O~7e>Zg#[v[զqV{u|qV{u|/81rlX=^DU_e\=MjhWUikt2cF& ']8K/ƪ|g56ZӽgQIO/:<=#Ʈ‘mn$zeuտXɚ˘|QO^R3z?l ɬiN4ڰ"{9۞R8S.~ˣȗ(|IBqV{u|qV{u|useՓ8ݕHD?4fUq;Ss\ ƢN/*oա$xj Wfpfq/5NJx&,[6gk̅{Kv<8sMēQQ.1eu,1:z^#./ykI ϑY7WcKeغ5 XR: OiɟvIɨm+WYﯽYﯽ0x-@)rf{&eNQ蕌6+Bٕcl9J}Ȕ)&56nF#+~ѹb]Yf2vM}QW^v,Vqp3*֏Pk˓uKU"M-eaz8=پ\8=پ\s:2o+*&HDêY;k1f]Up-љ,AGGc*n2&uCPHjg[7ˇg[7ˌU9kCb> 3=buV]2fzNem?$99 淙_YVNZ(;e|Zu=F_Xqdf^;];Gn7g7G>qG77x fpfq]_7U}J6eipWY ٸذo;;:qKQ!ȹ҈U gд+]HE\P$),87"ݱBvm7B [2eوVn$K"t&+U2}kl@>*}}o*}}opsa dR=~+:"-Y]mGqn9Rvag7ÓIC/0?aZ*Sѣ͏ ;+bΤ,cYt@mDm4ƍé\&2vAR[ gn5=_$@"ք$DO8=پ\8=پ\f3Ǒ TP p5:XՌbLC[0蝖rlihAҽIQ.l:s~.y]b}Fy-|-}ЬKiby!cvL{P6uh)jvT1&h ^nBNo>ʦ)v:c/X4jӷ-!Sk _ʬU]hnK||exi:sf8ݞ!e#ke|O̓֡P5DLsh{,1Qy9DZ;: _NfvM^±ݯ ̞gjj+c^s(kcqo9a_ӟ^ZB-lv!Df޹'EsrJݑQbgy*XY\:Q]vB!W BҟNp!}h>n,noan:PRj )9%QAVsX&˭Ȼ {] R>ܰꆜX6ՎJ Jo[ӔgRaF/nN#gs+\}/M`V=E{*IM"dՕs1Zvgr$JDC2uĔ&|~hɵiGI4P ruiM٨5|+lSu `Kn $$8GVKtձm#vJ>_L.c|aJu(YVs_[d8~qY9DS9qTjyX^0;z-Hdxu)|֮#+j>o$d|R+ۭViNTo~e@WvC!NMͳM8 fcϊlli5\] &h6(VS[<ٹ}G1O|غ!ÛZ>6jFSxqt>m:Fu![l.6$wiU!or;JڼnqU8*!Pps;uT'ڶʼB*40E3UqWjA>O)yG`CclmEOvRӓJF.ɺdlq }SՖ$m,TvdA5Ktٵo7V0j֪⛤)kZ*s?+]K>@>Bn-Qgg.لʤΑ)ĖQUWx>|9Y1[KB(&{FLy&Iq\qhݻR0Di9 n?Lov +^)@$98hi[_=sv0ɏ'3Nq^VSV,l{z1DO,V ~geX]%6Ds}_7O8nPYE}g9T~:sz_*q[Ne^BESENQXیt S@o&)}ޮ@!;h}y}gt՝+utie[Es3_B#O1DZ&v>k1BPށ;t(f jni5vv|߿׵X/<;æ:ę^ysƞҶCٹ:U>ųnLUƺ5N+<:;psW 3 奴g WzG29Ї_Lo}3}gOdzkjrc۶ "#]3X1u&Ik3wN]]\P&Uj{q4nkL9lBZ&J.rhrRmoLoMjҹ46ROs-s-_Lo}3}gORC&Đ'uX-j#1Rd &Fl6pjׁ=iǹ/GםFgzϩ:z̶̶?fxoo/=@ZLs-s-3 fxoo/)h)hCoh3 ݤѶ +Df쁹|H7!*FQQ4B%+ijVF7j'kerTH[AH[C3 fxoo/MF3)%1Ir3f6CB#[++ZENNJ n@BŊ4Sjl̶̶?fxoo/=@ZL M~_&jc:BfM.WĤqX5_%IZv]4rh}JTee<=@ZĘZܟ2+9ٙY,uxxuJ鹭>''tR!@&ki'LKS__ScKckk~T6b"b"+Oo6b"+Oo6tj F=!UA8F}_% :Z?[?˳˳}_LoӹHR9R9Ї_Lo}3}gH󤪙%w n*ϛQ)>bP%$^յNΓW͗I4mi4" >T!)h)hCoh3 G2 G2=@Z>oi'Fd,je,q3Q; i#,nZL1tnc:BMetP=/IRM!Ma_j|M_Fad#re*D"RZ5kcq }W%Iee<=@Z>oi0̶̶?fxoo/=@Zz4nkL9lBZ&J.rhrRmoLoMjҹ46ROɣsXze b64RWv@Fߐ'ucǟ+kzczkVɥٵR(XF}m=M#m#m/fxoo/=@ZLs-s-3 6K47e&s7Vͪ:5Qsk{(m(FtiM߿MAQ4K\"a4)#ѣT{{dolӇr̶̶ T{{dolӇr̶̶ T{{dolӇr̶̶ T{{dolӇr̶̶"CPG=-v-CcSGoY ̯KgWggcokKkSB-˱ɵɳ\؆)/)gи6UZ7ϹtvI]N^N7clT1Ƿnuv,{XzQ&xkckGFfCnMէR9R9Ђv!}Jm&;>6'uqzi+X򸱑!P깉۩F7N|krfq+r?D"9J!/2)h)hp1OqiMb8gr_y>4FJ!/2)h)hp1OqiMb8gr_y>4FJ!/2)h)hp1OqiMb8gr_y>4FJ!/2)h)hp1OqiMb8gr_y>4FJ!/2)h)hp1OqiMb8gr_y>4FJ!/2)h)hp1OqiM6T:(HߤaAmihimi&Φ.&Ɨrmllrr{}ӗ+!~|x{grFGw5\M{Qק}Eӳ4Do.IZWQHz|"E}3}gG _-:ҹ?) Ri4n̦R8B$&cq  㪄lli9;;9*Le (Os-s-_Lo}3}gN\g>s6jLY,9X:q3}ꆥϮM˝:ǠMM˜TD50s-s-3 fxoo/)h)hCoh3 ɣjԲ528(7-_&jH]m:71ɝ!S&ĺ(ĤT)P릑H[AH[C3 fxoo/kn^ 7~8eIx}?7Ү~@ݏ7ee9| Q=*$y#_ Νs+kRMݥNkuPISOez2=@ZWSa鰾֯߅DGOiDB":{O'8o _-W7{{x|m qUՍDL;X1&b[I!RC;ߘ'J;53A(erLs-s-#3 fxoo/)h)hCoh3 G2 G2=@Z>oi09-D_-yeeϙSX۝+gPo::ϢSt/CWy9yH[AH[C!}Jm&;>6;J!/27Wy9yH[AH[C!}Jm&;>6;J!/27Wy9yH[AH[C!}Jm&;>6;J!/27Wy9yH[AH[C!}Jm&~zMOzshhikkkYzzZ:Z{mJMySJ>9w@ANU_@&S[eZz:nMlllFWMHC!mTZi$'&<2צ |$/ꦑnǹ.ӿr["\"wUmVlF8{]_Տ1y5:rƽNV__V 5XKW~M{7nΩksS8lc88'!0=ȆfgcXg34hi208uC03}K5TV4-QZF2 ZyOE3,qcӶvEJتbЄPheMgg|,2mnُ9)lYuF+#, yb=FRlnEt^&/,e9m9GztV_md\IIVm_Fea6^mi>sIq " )@$u:d)deOq v_[I"3DBw$ڜs[WU-lv0٥UI6 gVȤz5;W(|99fSG) mIVيl7ZT|p>cԚ37%aX2LRX!K;>V3{,ҹfHL֨CL]K׵|ēTZO2i\bo9_^k/|y|ªY"ұ|I$ ZDKiÄQ*{pL"77ȟ<1010EXnĊԏ1ʱ(Dg## =OtTz~>&96h±v2ҭr!G'3N)m!=e[\pǚݯy#61P^LэӪ^[r~܅7+H[Nޫt3[ UYHIoxӒoI+ 퇬Ocs˥ ;%=JD"_c*H~7AalnЯ8 dniM˾Ä+t޷E}!Z9&O~Kl9uW9yiڱZͧByxetB1VQo9wz(u#_ ҬZ"Wp 2K>CxUQN޳ ۯ8k ?SUO8ԽMXH ֬m#oaA%2&gqߎ7>!ڼ#yT< z~~?xKO,!M(fGrpǮu-ܙV D7.HRyZ]{(tٜ "䙍/Tmx 7oC Z'J&lk2֞]֕VFڷF$TnZqL5='qBctfrNf)FJ}NRһV8UTp6yuaؒ$i\W#/ޟnټ2@Jb_Q>&ptڂrU7TOsz[.n<2=jS{'8OfV?mNt:rPdr'eTy,("zLa Uո2w,O|nw559ʟ,wVMQTɶiUVN|‘i08ƒ t:nLBYU=NQY%Ž{MUrqԜژ+fOwelL"Eg%%ux3t:) י&qƪgWq%8 CpusRh o4WR1'WGulï+eC4Į+ЗoOe^vlR^ o%1 ǯ稟8E:mA_b?*}z'I׹-T6b%*^seGOOHR?@:=*:KH\gRP\tʘE>CX3[Q[J>װ=YP) :ȸ]o~jִhu1Ѩrg2>iĩk'q~gkZ q*[]f y.cᨦ"r9MƿхECcV27 <ǫmUX5dS;RD_(c5#xCLaAl|1)#bЌLem/>۶%cʭj-V(4ѥq UImF1vҦ⎬EVC%u}mf*Z_,rZ"Βgū,na6o Wnc/կ\%} %erN~=}\|KvJ{ȈDT6yn-zݡ^q5M1!pBwdk[ 76e9zLO>ε/Ӽrl؜"}jA-5?džT-jowd8Rֶõeu7_ |ߧMT\@ikU7F;9W_UD͚q N4LJq)5yϪZFxEO5+C41prܚA$aG^H#+,%fMSԯ2ÆIoAtmFL1Ξ&|\&$ٓgFlE[bkrnj:S|*G7!1'KaYef6ngm EUշÔgdD]xHh$[r: )Y0fʡ'6vGƘEq I>ύ*Uۦ&Xk _B, tG\_y:ǤJi'xU ^),qk>tZcP7Ǐ'xT}4CןOX-ӗٱ$#Ǎhy0$ +F uFU(J>=/j٬i]OpKYϚY'tܒ߬wݻcjb>XW54uqRd҇bB֏us3ksR/R$OArbIL*jeQ o^q:yy}Jcl}qJW+6];l@ժҚ$e9v>ci }A֏GםG}OOYҺZ8}KVn< Z/&lsȠW?Z@ 5?֌:lyҖ,ܤ(4ǤwCsbCVPEChK KMGTnycJא4.x_S\q/Wfz|>Ugs;zr]>߫wѽhvDeq^Hcqߕ9 e%5dW؇UU׎w}$F~ bh%:SJ UgstO"Zp$kO,G‰]ZI2 xzmTN䧔"5r9l :m-5o/6C/8s-d"T:''[5~4g<{ڙ::Z'tYrZ$]D8KBZ:,BfJZ)t|rb'4u7q>:s*˞ _4zu{9__|67uc}qZ}Ŭqt/׆ZwNd,lu |q(xR0j*ŭ%~ϒ{EA+ɴCN>OhE ;t]RvNϗQ/jE5ԟWa]UF1m?Wq<i;8g7G+7mDIثI#ucmز,+l=AW:Tz-?`m ?V% eѴ3W BѓYiȯڪnLv&قөj"Ն0ZrUdA1W@`dobfֱ` >T[kxkIHW`gO%,C Bq'ζ7*umKd 1v#R ܓ\V}f,({p$IX WrpTڟc]:ԨSi"j+YړEbGEې-qR6y°s6裹zSO'4ÅU1 IZG632IS4[ŚDZhZ64l(P]#j&N/bɕN/bӼ$Jx^$wr/_Rr{6\uQX^ZeqW1|2ɼ;˽_eםoY2㭬f:ԄK+{]Z:8a_3uƾct\YQ}?In\^0ǯݛxq4q7s~8;Usn싾][םQΣߏSRMAæZ~fڛM}=~/ďyy=2[_6 pI<)PHRiut:G+NM^xƙ%j hIOZJ{&>I:!nli K )'bHqeM,rڴ%o֜)"ػhfka[ 2ֲ2JaDjڪ,͍4Տ֍25K!QK!L*[ˌ Z{F+X+k 2}k? V$b9201譒7xpl j+xhZtdNgk[ yu/- akX(u*5hxmӍ刞7<1/&g_XA[5}5snCQW]y bnҵ5vGG'D_-y:o&ls  SwD&1*Kf7 B%zhƣLVFX]6RvePk(rG~PM]AT`Qfx׬msB]ZgNY1;vy,˛zYFSUKF5-{Gh${Gh1󱬚^\ZBC-dO}mpVՋϴ6-ʽ96sv?+ņwRػ6uNj|C:2⣠|ߜd4b{ۍLGcq3ؤi'붨:C$c)(&Y\5EWY'wڐnڑ"I]c:$-zGi,KY6SK+f !׈I*x[e*ZdHݫ5džTNM7כH3+l;W#:.71Bh9͟Ԇ\+늢#p9еQ}U!.`-,Pfaűfkhɝ)WLۥVm%/+ue9O_%by|ȉ\f=2YOtKmF/n֕\keI4aٝoVxjNJ1)"nIncI; #n9אd%7mk-Jߑmj`8eۢǒ:/Wcep^oX<("ؒ=Za. ue^`RR[/altn^۵%=L lSm̩j_VDy\ٹ.$>Xk˾+Jo+}_DcXеDuQ!cQ`I$ _"KZ9[VX:l%OQl}kuG审4)O3<۞aWYϊ]a:భ}W%6J4AM3 GUr{RMhvnjZ4iMe*^XO֔I=zža&߿׵X/0`ތɉ# )+Ɲ-X Ye.Y'`@Mߦ0lIk[yюm^(7{1]~5|lޞ״fKG)ݖSw-?#cZ0u_L7fﭙ/vZ~F+Ê9MW_h Yc YfKG)ݖ?./^\Qz)^,m_ ֱq6v'YƜoANmq_୫gi*GGzZ5ٝt 76ϧc ͫ:ْQnebl8Ouր0u_0u_dri[(7{1]~5 7fבֿ7fﭙ/vZ~F+Ê9MW_h Yc YfKG)ݖSw-?#cZym~ym~ْQnebl8Ouր0u_0u_dri[(7{1]~5 7fבֿ7fﭙ/vZ~F+Ê9MW_h Yc YfKG)ݖ;߶TU5zGA6ж)=i8h ?O-_P0u_0u_P;&yX[Ms Z&M^'Ν$.nK,qO4R!@&$: 6Tm:qusZڅG)ݖRzϘ{N)=gt[2_9MW_ri[γkγk̗Sw-?#avZ~F+ƴ%OuqG)ݖa6}la6}l~(7{1]~Qneblk@o:ͯ[o:ͯ[2_9MW_ri[γkγk̗Sw-?#avZ~F+ƴ _%(bz2s$ɉanY/IG%uzX:6з_D}t^'toME>g'[R?4l}٧-=c4姱;uzʗrF;XNZ{h'lRzʗrF;XNZ{h'lRzʗrF;XNZ{h'lRz#h_vlUYt W&ګӞvZ^Gwe.hHޭJeo !ciŠրJ_뷔ydhŠր0ߧ?_&ŠZ~0|oKZ h xaO~Y/Zh5 7Ɇ2SU^0):F%ޕ|IIy1.OJ@ OWL?|eQwr/_R^rK+z#ƪaS.%9.5Uqb]\ ĔJx^$q@ˉNKUz\@@zW'%%(Ļҹ?)<\j&>2SU^0):F%ޕ|IIy1.OJ@ OWL?|eQwr/_R^rK+z#ƪaS.%9.5Uqb]\ ĔJx^$q@ˉNKUz\@@zW'%%(Ļҹ?)<\j&>2SU^0):F%ޕ|IIy1.OJ@ OWL?|eQwr/_R^rK+z#ƪaS.%9.5Uqb]\ ĔJx^$q@ˉNKUz\@@zW'%%(Ļҹ?)<\j&>2SU^0):F%ޕ|IIy1.OJ@ OWL?|eQwr/_R^rK+z#ƪaS.%9.5Uqb]\ ĔJx^$q@ˉNKUz\@@zW'%%(Ļҹ?)<\j&>2SU^0):F%ޕ|IIy1.OJ@ OWL?|eQwr/_R^rK+z#ƪaS.%9.5Uqb]\ ĔJx^$q@ˉNKUz\@@zW'%%(Ļҹ?)<\j&>2SU^0):F%ޕ|IIy1.OJ@ OWL?|eqWD 9WO\JV툪ȭ4X,9vk5ΔIRcnnFkuyR#JPT~E[ 0.s\+rSlVԅΣT,R'yJܝMNWJخ<ʬiL`8pWسea`^b7e*TQ0s奓3H[Z3gbN/4Fgzש7g|8I]G ӻo N{ꮗ::fwK+zb]\ Ĕ.5Uq)q@ˈseͦ_ kbQs3[Uv_J[U삭$ vucc8fzYO"nmr^jx&roIau9;Λ 2~:ug\*oliV+kr,ͱAϴ#9W{ o@ҏni/a>~pݠz~1u/eeG9oiwm٘0l~`>c)+*5G*]uDم>ps 9QP=PlMh: grD8&;CȶVj{Qc3vȢ$m{Gr'﹅J/ܟtlR?EVEv(ʧUc|׍wyU97#nnjtib/yY؃4*TI%G#d^T8Wv:k-]Qܚ*}|lW$n@WNy`zvֹÊg$E4$q//9HR#f kl>C<},V~V S`tzNq*+FU:.okm(˽k 9ٹssSKKa{b`2Wy `fE$.mں h]zbiyq뵱<βy †͢SbdvqsXQkRI[_myrܲP潉X }wYNrLu'fĤ`8KЄдIGGWetE:rӦ"akC"#jϒf.RzPE`G.㡿@;XKaYRK":͝S!늲YBQA^X,lpj),Zޛe(ܤqPszSk]Tu$M7Ej7cYokcJfv%Vǯc:7>0[JWn^(ͪ1q,Yk!y!yƤM 񢜘Ե~A["|QjdtϫkfCzi<b]\ ĔJx^$q@ˉNKUz\@@v,Z*w8uqOciw:FaܫEqwVZ)uX\kF%ޕ|IIy1.OJ@ OWL?|eQwr/_R^rK+z#dQTYLuSc4u56?oOocSgy?kckgkvv9yjtSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm%5ki(H5t5]uvu4mjlrljilmrmmrmlrr ΋g8\NsUA`Re6~u(E7ɬgz^Dw,kb11by玅*ojrl_)|϶\bFtXY~Ȧ$;^ݮ^" S|a[Oc RK2noΨi\|z@XJoy z)acrtPetè%`Μb^_{th(0Lo*j}o^#w-S܎c:oeEmiD&:VGqNNXLb Nq埍أ9bUH4h)n76o IY|`;|"=H%^V'mV<ޤ : r=ރݻ]3mw|5\iKj9!W,zSuZ5eu? W^%%!Vrzղ`qBXRgF$xZ` {ɼųjyQ[|潁+,U^G`Gض_l瞶J6|:C&X4:)m3N 9Kr]ά) %O&_?IuTØX5Eb#Mn-.NMSYZfݳ9n|0һٮrCn޽lZTMjaeUKNPjS.a[8i3oQO!%c^>_/fc;M?tLr}w&]8ko= xdc_De=^b {R_Յ^P|Hjijo7i|4$KX\-Lr WCWh3'w#>'!<+꽆E[SL3JڡYm{[oj BiY53 Y.殓g>,,cӏ1"=S2cդR6 e.C?Zw]kL)YRQZ[Ӽ'T?d2aɅ|N)}#77]Y4YrB׶(D c@ԲjJ`ͫĊ_< s|xHZ.oW om|>>뎥xΕz:&vR>H 攅ŚBb2jP[)<_6 CdoiW6wǪq|k\~+:`0j¡|bZicwelU4{cmjzb-tL.6WQ*F`gY4洅%u[@ڲ\f)LUc\nw&|o'gE8eU~aXQYg>%!mTec2MkO \c-\!/];>1NYf9pk3׍6 Ò#*LUҊ"rqҮT¦hӒ]l6POUթ4)f-VkI!w/%{# b&2w$%_jW}`ѳ!.7Mueh]M "β~*(ߕZvi@HcLQ7/m{Ozy%rZbu4BuL5mH`4խO[Fnv⃜c N{O*/lOIٵ;aT!n'`^N,ՍدGOm IQ\Fm:Lbo|`*ИD,EU3bB,xLkQmn[K4:zۉ;j~^/_pw>~v9q#'9=lTZtS˰";tS!cw<ڃf?!, :(zIF"YydBl<" YQ|3ɝ\QhUa2 qƑ#kqi~-nֆėj;298\o>޲zyTVyZM:G+3‡d>A2.L7Ecku'CqPK kgӀmv8Ed\[#u5i*̛zy+Եe"Ab#Wmb恷z(XB Y- gZ-(ʮXR:$j& l[u8Bi _Fk6G&VǶV3[&qJW /p~*qr~jo7mGMV,:BvP?I|P:Pwk$5"gV\nj%di,vٖ2N6D-fBjLrK+Emf~eXock:*|Y61of-Ԗ-ac,i2]ة wܘ lP[g6,mԑKThn<|=!k[úOw:я::ϩ韬/BFz=Hk$g# <7 iy~g6ۇ}[l ծ}Hqw^lWT-8ɡ<]K2&LR2mI=1wGX= e[!H}#e&;,E}vBQ}PY<ݗX+n͍ýxʯj3͚i#p^ei&cZͳKDn]칒4oEǒ֐3!+tPV5 )#W"kVeތRF\oK"N:bDڝJ"I%%eVn^^@t#Q/^{dIɵ:&OV,Mڧ.TU,ڕB д㵫`(Ot+#g1qeC_$W4YM z. 6$U<_;AdMߕ-e6bTn'!NϻjvPEc}zs#WϗRl7 Z*pڸaAԓnkup+v_ܦZs$Ӑ_87elۡ3]U$pw'ރ.ʙ#ս{OֽYH,uv'3(\gc Ǭ}*< )!Q" vK ٫v#|,??OX¤Parυ'(@G'X,GaI  Q'X,RyB(Qd~rυy> TPYarυ'(@G'X,GaI  o$$h,.FXā1a;QCmOarυzv\]5wEhp=0{U zUݴq>hV0Ȇ>H(IG#}5Z)G'X,Gav45V+=yi$R}:n['Kȵ Z eGr mL9$qrυy> WMVM.YijϖGۍ98:XR -CSK?3R:d L^> y> Q'X,[y{V.:6 SNuC55Tso乙8`xJrg'X,Gaux6Y[Ǭl2Ny*axAԡQ}z%8`'v.O |Խ>y> Q'X,]{+]w_-?IͺKH@T,OS?hmjv'[vq,srF1ϠVWIarυGq7e"VHo!%卺m9-KR[4i=@#F~Ft%(> Q'X,RyB(UG'X,GaI  Q'X,RyB(Qd~rυy> TPYarυ'(@G'X,GaI  RC:y,p?c )E?d?i M5գFsa'ɟ|j/YxtiWrpͲs 36;Z@Ɏ?:M.K6e/)I$H,-B3Dt?yd5/25<.?5Rծg.VHI2ͱ+OZri+lգFsa'ɟSmwS`L2H#9qv&:K;\}ȌAtՃ.HI`WLܵBtRϑ_E<[F[ߊ xGCsqci,go5N5kxpuL+Q{ OB5>+/_O*ð{&xߕ({'!~T_'G=hal0F;W\WV{~0o68댷Aq}sΥ9M>M9 HdQ>7gwOҒ^l.YK2tx:1 67>z7?e ߲vrO6iR+HF˳cFGlVփkm2 \[PXYBHNIͭ_\jLd4* !ܞAJwj,m3"Ʃׯ_'G!~UJ$$7{ +/_O*ð{&xߕ({'!~T>'OT}n^Wk|WQ_U[a{&xߕ({'!~T_'G=R;3Ʈs=Ϳ!!X{{8+ Oֽ ϊ?? ;Hi\r@ )[tTF8&{ ϊ?? }'hJQqXΣcdW_'N#ÿT}f{6y8m6v d5xvC4Uyz>Kakc3dm>U/u!85^ CT^1"Q!UcBjס>me+T$$i‚y<} q M;S[2(Q."y2dVu%|ew y,5e X_r)UO#(wו?1- w_o?5zv̶ʑL7pW$2(uS-I0umbrl.#sd_o?5- =$SS:D:bL",JD1gn&qsOndO I *P}`cue ʷ7q\P?56^68"bM!#:пuh!J19s:*9䍭ҥ} y۬kHDx.mdXYmϙ4w;02rA}~uim[ޛ`Ti$+v2_,@20Zoj~rwlgy5Kk gk"F@!i>;o1ߝFnnݮ՝#/2H'^oh.+k5KM/Q[d)܉s;,m0~e mj~4JuDA5jORF56nY~uƷ-ї,bAGPJX:eo.%oQ%(\5I }uiRd)hRY6}t WIlI%!y=E= 2A;ķ0[]j6[#jZr!8 {`vrt$~y?sQlK_i?ywvlwg89q2SKI.yȪX6 G |:ni˝6y < dql} 4jV_JdU &98?SViŚiYݠݿ<s˻ΪZ嵌![H7n!gRr8%~ Ҥ`ԠW) ُk 8# ] s:F$51ɳl<͒Q~bſuޫsdʯA;WxZL`(PsO3icçڰ/u\ЛAGTVv ĸkN99qoMsa  ᶏ-@>9+;[pAsoq0hGV".pwc;Ϸ䡷`.<)UkwJI ;HE8#WmN >d'k{qK 2S*?~H1v@E]FX0 $~UxSXlnXՠx )<\ut?F_(CG]^U@_}תו|s_GA5/  x+D}bELJ.Ş)vԟOz<">^1" /M՗o&*l9/Co7G!e,9/Co7G!e,8<=݌ms?%T󏗭ZsJ6a]ن]~QE%mYh6~5E%mYh6~5E%mYh6~5E%mYj+ZMYte?ݮʊ,3 2m@'!"J`̄uÜ#Ě&g;ū/Ȭ=ԒJgo&V80\֞G\hϰ?#Di~n`D:?JC[j:mk1Mu٥H(^2H%^Epj0bK6K VI\,rȻpܬ UR@/ :O, qfv1$ +,˴ZWe E"HVNVL)#2[h^+HU⑮n|DD)'r)YK}KŇڊH>Y(o)To튉ؐ\S 4H]&`rc0ǐ-x" apو@ShV]:9?nr#gvBşkc.QEQEQEQEQEQEQEQE3p_Mw9?jW@_}֔4Lgq?A,x+D}bEt3?L&5QR0((((((((|Q A[-/ X}a}Cqsva躝kmmcS '`X+k$R)ۭĨLp4&mÔ2 1'-t{htZǦLҲ꺴sn?ܤd,]1cGwW%!n&Y[[Kk82+Fe=T#㒾6׭=cYM.Q+l]ea!R~zi>'.mn\_jQzJ4:οzWBo$sD˪9Ϡ (-t,g3jܕ%@=Ŭ_ٚ8\\,d/q-v"2翃LEuȘňW?|Q\>/ q|^j{l3Xq!x-^1"_؎(QEQEQEQEQEQEQEQEp*ӼO9Klrp5Ā,{aC&:u-Uȝd;% ewN U$p1n!$$qơU ;W-c{7srnKF*nS4G$ɥ E+Io KK}@o_Qpk[&*\.Z4G$ɥ E %7M/Q -iªEIo KK}@o_Qpk[&*\.Z4G$ɥ E %7M/Q -iªEIo KK}@o_Qpk[&*\.Z4G$ɥ E %7M/Q -iªEIo Ke-sn ܱ78[yT BEcp\?i]ڕ|s_GA5/=x+D}bEt3?s C] S/lGET½oGb[@G8T??[P?Qs=gͯE! Vv=p' \CuaX ?.罷¶(c{g( y>/-6yc[(xҕ,TFp3 w<~oued^ٵ䐢?rI>l䌰X ?.罷¶(c{g( /i3g=܉,0;1f V @87Uj)f}CԮZ%"ɷr~bad8.Os=`\{o]Ү,.-^k#Ki3e t:U,(mAimobv# w䓞a|K=4_JԮK^:Z{ z֐"5U3#1ki _HF7r5 3M,rc%@x N]^7d)=śBzvN@/S@??GVP/_M5褂9-e^1J _taXs=`\{osγ iW74E-Ū&r<,q$Hpa[5]H$ʮʲ$:xau%_??GVX,c`\{o??Xkͮծ-5M|Hݙ]#]ى]I 3iAk l䏩c{g( خj=[S@YAumie-p༌"^88,ł m}{g+Wj&iI5hKep XYj3j47sfI]e@I(uÖK.罷 m}xCTd+{YfeeW6@$ł??GVV9lu&+ X !GE 3,j"$fG6ccfK=vmz(ݐo`b9bcƏQs=E ??GVUֳX)77Qcyhœr7HTolJ(|75}gYymFe|IVh8$s0جX,t??[!<`HIS+/@fthnT"**ʀ8P-QE3p_Mw9?jW@_}֔4Lgq?A,x+D}bEt3?L&5QR0(1+p  U@s*TԀY;n>%PEPd51ϣi߆WOj(eӼ`` q"<;FU`.O¨RQ@Q@AO',Wl3gyS@Q@TҴk [[}BжA2 r=[#Bp Q 72%A=HRQ\wWZ+cKv3 bF0Wk+r} Wúl%֒ܺhvdبu[dwggP>xg#L 6^|Stcai[Oͷ97 @稫[뚯&W6PZiBL\])%i *Ϊ||%?Ϣhrěavm2Jؿ3~vkQ\>FN{ino7Yec[w*4{pCPB?X^N=Czb8/D7R-!XH$;̒tzE\i6e3.ƒ#baWZ-B#a6A#01ҹ ƏmklHcnQ?v*cV|vc>=Ɵ=cd9_w'~ld ֢^_.}mEvY z,xFmHQþU/b-0#pCr g #@ 5-I|M.ϗtfqn@<-wts*agM@過QUѡP;40BL*OC'S@1<H3o@. p2{;TQ@fCS:6fstl;NNNyɭ:(+?hV6T!?y袀 Zvn*;VE 23y5n_jh6ŋ(L[;#5|A =ĂgUG(ʤ lۏIEQEfCS:6fstl;NNNyɩ-t=&OKwo$rn; QW(( + /kR/&g;ȏ׌_og{_#+Y*e1袊Q@Q@Wj7.\J\v܀IpӜ`Š1qBU"}Hd H/Σ MtQEQEQEQEUI4:]N-NK WvGtЩ |=ϭ[*+Nktk S @֩v,hvJCtgivVxݏۤxݷwϮ~[I浂KmD/Ǖ>h!@Ēepe!= KH-`[`9Pry? +2_ [Iq۫"hle芘w Rv*y-j+KOm}9ϙϝ=OXm [h#I?OEG$<#-6e`G0HDCuo%I,2I#C+ v((((((((((( + /kR/&g;ȏ׌_og{_#+Y*e1袊Zoݭ2@d_j ]?Ʃ_3y t+?Q#hYQp?Yã[gS~Y&)fsrkL1Tf"@ GU~ M:{-"ݭ _YBͽ5-2Bgs*Bi(m?Z9id7\fGLWw8O@G%vϢsCo??Q#k>.4?+~~G ]?ƳsCo??Q#k>.4?+~~G ]?ƳsCo??Q#k>.4?+~~G ]?ƳsCo??Q#k>.4?+~~G ]?ƳsCo??Q#k>.4?+~~G ]?ƳsCo??Q#k>.4?+~~G ]?ƳsCo??Q#k>.4?+~~G ]?ƳsCo??Q#k>.4?+~~G ]?ƳsCo??Q#k>.4?+~~GֵѼY4 ̠1\uǝpO@ ES3p_Mw9?jW@_}֔4Lgq?A,x+D}bEt3?L&5QR3,oؚ4_>hX]OېO&:lo&@1ڤy4X,RDi #]"8>pbI4&DYncpOZآ̿k/uB[/I:A'(ҝj,ѻF pHLp<e;6G6qe@êYc16r>f__Q}ƷaX_Q}Ư:ϩ_>! f`2(0bI&WzVKR[]{t`wᶁ/X,kbj?Ͽ>ZzVYjv F+` tX,`bj?Ͽ>[k>)OwwRf^F-+2X,OϿ>G&>2sOw扡wɐ r69D}  ?ؚ4bj?ToN/o4eI%bN >u4X,fbj?Ͽ>Y6^*Ԧ9on%+k,fTfI+ 0 9;]å/]8\Y`n $R4oew! 0H`CQ}ƏMG}ޢMG}?5j/E=Mkcml%3$_ ӍCeG|$ZH&Bn2`a.rXϿ>G&>iZ:e۫7Gq`8$g֭`Ͽ>G&>I-ZIT $3VPuKAioYv8y 9 wD+nl)`MG}?5i,8uK6,vYa0V\.GߡcQ}ƏMG}ޮy.n-P%}Df,q2X,GϿ>G&>A-?_KL\QK4/YxFvGm,#}N O 4MtLcI#,Ͽ>G&>oQE&>ؚ5" B 9EQEӎ&;eY_nꪠjʊG siX\\klKre#fsuf&QEVdҧI%%$ٙI:vR6+N(+3Q4VgngfLUR|N?hEΦ=kղ[DUor$r''icRUq`HT!\[[VluzZ'~2C/'#s%玴k/.4c͈l@.$lOQn䍭y-"IaJI]H#d>$\6-\eR@%H,͍ܔޠcq-= 2]䙁6 "֗ŷ B 9EQEb)NPxLs׳Iw|9B{vn8Z\VT2Kf9LH]vYpF% kQ@6đC8*j((g?J9KsԮ 4? )|h_#+Y+Wxf |Lkb:(aEPEPEPEPEPEPEPXOE%ErZF(!- =(cjjŏz,6rj$E$ 9Q`rlsfx4 6;X^P+y(H nHF!@PJ:Z{iecfIg' HrNōXG[Dę'j( OugFNEI2em J8^o[j -wiv"!-P`@e ;JOQ[oG rcQ$B1/NNjG;[NZ=R5!dIB}P cޢ*j:en#)Z)#lt!FA#"mm㷷"% qUE8%|3tMQ?'Qל4s}jk~SN&iU¢!lH#1l<-ϥKy1co#\PȤ#I%ztbޛhrc5ď`g 3FqcPVG'@%H 2ʰ EOEG,'z`Q@Q@Q@Q@Q@Q@Q@Q@Q@9?jW@_}{3p_MiKDfw C] \G/WC7pTc[E#(_kZ~0ˑp;cU*!?Vn#:אGJ⹭ V? J_OE h(EY4Qp V? J_OE h(EY4Qp V? J_OE h(EY4Qp V? J_OE h*V259 ut<̪jWdַ'ALg/wxb{Ym|L?r#*FEJ_Omy<݆|ؼΧ(h+kUBřj+%Z/' ?*!?VM\.kUBdE%Z/' ?*!?VM\.kUBdE%Z/' ?*!?VM\.kUBdE%Z/' ?*!?VM\.kUBdE%Z/' ?*!?VM\.kUBdE%Z/' ?*!?VM\.kUB;/$(W8bؿ')R/&+ /kJ_&{3Wxf ">^1"_؎(jI7Ub݅8U$yO~t;:;  ~yXV9^Ϥ ouSK*Uym-q,ooU|1ߠd`}'f^ϤQ?E/ >y>߳Vݭ`a73sS4 T+ZM'D)bwa#6~* r.ik ?`I٣?5y`}'f^ϤC{ŧ=&2FXN@ $$ ./l.Kt,vbٻYΥ>y>߳G/?kbԴkIKkh#:c}:,9^Ϥ <~uxlu{m1$hֺVFe@#j/˸Xuͦ]-ۖ(8ffQ?M:ϩ*y>߳] _ZN[\ijDpy֧`}'f^Ϥ֖V7-su  *F]aG-`3-}Gwzvkf.%XcLB7䲕 i,*}'f^Ϥ'D)bwa#6~* r.ik6~tX,r`I٣?5y.YlW-嫫4"[8$|f,(}'f^ϤdItX\п6p\?ӱg ~v31~󲶴UuKʀG"1GCFUA F  _`I٣?5y'ľ zh"y1qXn)$RX,f}'f^ϤKīci%#Eא3*&IPv6Y~]ſ}M-Vi崷-ijſMT-ǂc~aX >y>߳]GoΏ1ߝ /?hO~Z)skvNeRm\u("8a |faㇾ+K!:}-abeXm$)R7 Eğ`Iٮ!*#qUUuKʀG"1GCFUA F Z$$iJ(1sԮ 4? g?J9KҗƉ<">^1"ȏ׌_og੗ƶ#*FQEfCYAWf8Kf(|v`!m:(( S^UZa3f[uX6TF\'8 0]bj};B.kusGmm „W*@Q@^jVi}kմ Fʞ ±m|XX[0ЈdV˦#jBdV CkoI1(HB(v( 'cy,$֦D"ܒLLYK*͒I_qEfCYAWf8Kf(|v`!m:(ԴkS$nF=\Z{/hvoٳb* yuS;+nS쬭DdIKIf'bI%$I$(%~nmGPGq@EY]DI759őEn3<˲R 7: B͆4+EGooE J8PpJ( {C:0BuK(&Ũtut'Fx|74) P/#%YDjRL[OTܨ]Ʒ ;B.kusGmm „W*ES7wqyO@3ldmkO[P=m^>,d.V[X6c<.q>dAڲ=&p ,I'%Y$$I$jz({G>V+G3[^1"ȏ׌_og੗ƶ#*FQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEcp\?i]ڕ|s_GA5/=x+D}bEt3?s C] S/lGET((((((((((((((((((((((((R/&+ /kJ_&{3Wxf ">^1"_؎(QEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQE3p_Mw9?jW@_}֔4Lgq?A,x+D}bEt3?L&5QR0((((((((((((((((((((((((g?J9KsԮ 4? )|h_#+Y+Wxf |Lkb:(aEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEP?ڕ|s_GA5p\?iZR3ٝǂG/WC7pW=?A,2tQEHŠ(((((((((((((((((((((((( + /kR/&g;ȏ׌_og{_#+Y*e1袊Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@9?jW@_}{3p_MiKDfw C] \G/WC7pTc[E# ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( (1sԮ 4? g?J9KҗƉ<">^1"ȏ׌_og੗ƶ#*FQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEcp\?i]ڕ|s_GA5/=x+D}bEt3?s C] S/lGET((((((((((((((((((((((((R/&+ /kJ_&{3Wxf ">^1"_؎(QEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQE3p_Mw9?jW@_}֔4Lgq?AzSm-ABŲI5G_#+v_ֿ=i4gk_4آf?vAO;ZI{$hֿ=i5Ecgk_4?lQ@M?Ək&[ >T{$hֿ=i5Hh@KoG/[[ =h@KoG/[[ =ew|";mܸW%o-ah@KoG/[[ =kʾ9K@KoIq4I-(ZFbdS6M%q9A=䚲?netgen-6.2.1804/doc/pictures/menu_mesh.jpg0000644000175000017500000004403213272137567017075 0ustar kurtkurtJFIFC    $.' ",#(7),01444'9=82<.342C  2!!22222222222222222222222222222222222222222222222222" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?YeuJӼOc4.ϷB!Ԡ`t;t_ވQS? Tcϧҹ-7Kx6; XWVm9-.frΗ*Vr"Pc_KgխVxmU˅gXz_'AP^ja s7K # wfQ\T ԮIrK$cc&_ZM[\ijDq?'A\w"htm2;3\m< Js;$$D޵rv]<*XIYwztW- ȿg9г G+tFN/=͟坊Ӯ K9fxJ ap} ssrڰg}ѽ|/߻s kxB$P$FyV ް?Oy_~ѻv|s9ϻbF}zmsεᣉU !bEy[(fyynh%heRYv #0# yjֱ%԰.[ms֝0uKA3v*ĩs]$n*]-voVdz7|RmC|g>g?&6\t>??yx[T4MGE6 .[+_1#H% '<:+䴱Sk_ٱyP.JI| V8 A≵c kt.D'3d,G,4۠yHg`9IDs+ʑʎX> dLWv-yhca\FC!UAs/ ii5LN|۪J2N6eq ặTT^#X+@wvGUt.:#E  (d*f- ặTT0m{=pLDAV8F`=Z_GIM,0Ӵ@(c}_!7.m]vUյHRլ`bIrݐv dѱbQ\?OǦo?i+Bs  Wvw@wckQss8VQ Ah1`L&ZY ( ^j^o.nl WRNzW=L uh`դ{-j2-99;xb4W^Ŭ_A%;%X'ڤ|ƀ[p0c;o=xJ/mzMͽ:[^6U3B|§bqtW&-ޛ>/NՔq CO6-q X\i5CĖgޢ W+b[qx:Dm vDַ^ڽʫ@Y# r 7cGN~dYmb( OA<e,EPuk}{DmRt!*,p?dAQEQEQEQEQEWOw0ik??GL[wgm̨:z+Pg[zd]Zg[zd]޷?7@iڽvoXaY6  g[zd]޷?7@9OJºSp@ :&ζɿEUζɿ?n2o.-QUn2o.o[ TU_o[ :&W:&ζɿEUζɿ?n2o.-QUn2o.o[ TU_o[ :&W:&ζɿEUζɿ?n2o.-WOo[ _*t\De?hs~ʸ _]7x=& ot2ST&I0\߇v3EOw4fFw&6.R eVTC$85MښrIcB␦ t#9ŋh^&] iqs7$v/\Hޟ2( ׺L:eVd&3z&M 8 ccVAK)UMlne?+8 ?ty%2,c?b\m%1%5~+ Dh83?'<ǯs@mu=B4qge1>vC>;d*XJ5{gyvIbTɈe>wI8 z4m>_o.oX׌yQ8;y'0E:{ q_΂ !bGMc 񡸹N BUݢBI,w$gqzk}KO̶fF`8<Tt 7NB,K3#)s9%bH6Vnmcimmd2y<ր'((((((((;-v5xae*YO|kuZC0g\߇8|?d_4)N*ƪٕ6Dt69"&J2n$*RohZűD &F=Ĉ!GPK}f+kXa0(BfUv32?ߑůl?:-1IpFI a\n2w m ^XuBW GA!J԰vȀpp t2xCLSYӒf] ۞=tڬc\$WNm)]Uarg,ȹ{ry5mIno^%f+".SWDŽ=̹_1b&<}@:h!yP@q'$R+&:]ƃg]Κe58DJ @zwzqZӉEtbF!uV hy`D'3YHʜwҸ֡WM5mj< adfXˌ!eCmKm^jŦ_\j.#evF9}+Ӵ;k :. WF6IՕH@2GKn,k万Mk H l|,ʄ{F:( ( ( ( ( ( ( ( ( w0ic\wm?Zg\߇MgOٮ7[|<Ȇ̷#soWAiOkku;#'I @eHP&-%0F(=~WSǯּ_iγ;5>D cF"7gVVg;:-}y%61\EY)ʤw)Uf puu&ȓ $,ĐI$ 55%68dpN8 dzjM^E 9์HHWhIB*95h^$UZtei# 1Q$Ve6l7:il^sm:Ld[0e  WtNeFU$TF #> 5&7Zt3m7 * A ||SQ`]3~-HYi0Tڌp1׊\;x2k xfPtU[&ኲ袊(((((((+]q;hs~ʳ"4帊RI-XgTBbb~V-y'ӟs~ʼhDž4%űa,Ds]wɈOʃcBwWkZ7QO].bN*ODiiO_4uu~&}24^ J$qلLjbPxn㸷%Ueu# 8 EjwPlY.fXԶ ,@;/[.X;.(#0He 7pVc̹[KǸQkH:Kq2+%v,(T lt4W^(K缰gr" JNf9N(,v?u>]ZKz19A$X~`Q{eŘaie}iZ%ݍVgdH 8=ķwŨ&..C2lGfU!1ڱ.U@FVNgw`ڍ;Z% s3F(˱,xe=j(((((+]q;hs~ʣ'\߇-L?hPx6ƥvRy!?ߖ+5C,{-OyPdGm*$땈(,Cy5wAU,y4B2)!; +/FeڽCBY\PV* H>Qi0|~*MNk=cF]1\Zn\J?뢁I7(KEp&ZhRj&&6 ,ȣޙ1w|嬗6OҬn[.Xqn eĄby,wWuMzEQiF&?rE˩[rme;Lux\m8Ga(#M@UPGʦTpC|aiq}ek" u.|17{L[ԑj-,[foϚ>ǖvwzuǩx?X[]'Cem"[ 9$]C aíy F ,ol#[9#F8PZ((((((+]q;hs~ʣ'\߇%#~֫;o3v=]expv 9VMʿ('%Fڅ=*ό3%xnHDc 2A݌r }巊u'RGMF+xYaA.,W i|m/77Okukg-Rȥ88m5VV@STA }ФV8ߺ@990aErwV^YX ҋ[,KX*(jW8[x,涳+ZR1 #'i(I|Y˫  5E؂3۸;{^Bd06M I$ȹ#(m’ ")\4-,)vDH8_*iq *G*;$U`J6`2A<7V[ʒ*H2AGz(((by^8f#*]'Tdv(Z-B#a6A#01ҧ((+]q;hs~ʨ+Nktk S @֩v,hvJ??y5gyN,זO,Z<<H. 99Euh:\ۼ^2n9mF'}mkyf0wȻva0zW-yxjs<۟h o0e*Y1u:O{C+M{'i ںIFaU&`pCkjVi}kմ Fʞ ©]2-2MN{[|vj$ny 7 w>oR$ԄJb2F `@dW|ʍ2G'/_죰m4ѡT&R JUC0ӓJӥ䰵{WdwM Qy>2Vxaj^B]spmN>`#<W%|JizZ#UiFTܷlOitۛ6WLW+,~7iQ:gi iZv@,0f $@@5.>ocV40ܕnlcqɥjE?<[Ϸ|O\QNUѾV?{@#t$ב[O-Ew|me4o7LC1{݂. Nx t%bM/Kt};NKk;uII9$I$MsCѠg3Jp4W!,'fi`s’j>*GX<==VD#NC2\@M&{m(r$(\ƤߐFSp >^\PIo=qǺyrȁ]ǃhz]#F+BR[#{P$T" $Gk2oh/d`|#hzw傂 hyU syot#b4 #pLqp-Zä2aeFŌ214'rx8ᶀt4UM+QW,;uu#Y 0պ(((+]q;hs~ʰn<'j(˸(գp+hb9~^5*VN0^vS!uG}%VAmiv#+ [N3.g6o41 Fav>_nڏKhnpB|3ȰA"$~T|1q!hs RCPNLi{fG}%tNZ^5QOox$;Dln8U/ iÆfd)"ȻLFB@mVG}%t{+{Y=]&Pz|OV]M {dM1;"8Lv,hz\>-xF'OQ[oG rcQ$B1/NNl_ѻQ{/ 7@Z\rINyuK\ced` (.F0߅ĆӉOb/!O-cp`0[ ݨϽv>_n2|%]1Mzdl>kF];x$şl%kڴl;9p:P7j?e/ݨϽ]&A,WഈD<܁O*UݨϽv>_n-QUwj?e/ݨϽ TU]ڏK7j?e/q;kݨϽ_;†ę rz*\߇),ͲU_9#V\7#U`/^h5_Y{dib-H5|mp CڮS;ǁQLMV >6 .Fr7^Ocsaaomd)1Q>fw6떺fk[^\$` |0Kw0M6&vaKt&]>MnPJf%4KKk .mI+}c% me "W²@=*4Mn IoxdfJ̄ynXO"X$@Ik>!Ԡ`t;t_ވQSVerYښF4UHpg-|-Mxڳ\0a%ƶȹalw׶ns}w'mmM+p9<ҧ8~4fSI ZNq*cc"RHAfKx|kjz^icL )eUf9Te’ SKWΰ}GʛQhyDS@,pkB0V((((((;-v5xae* ǑA'"3C@|ܺ^[A7|K{mgYn[}<1' HӪ8W#m*%}Nbz/m!-3O$LlP#`|r &45uULͪZK7`yv6>_3YToERr@:M6ﮠ@8czvjq_­dP#8#qY1ç<+uk2sFS7RF2+&X k^r5մC a&31JlILPa[qo*K 9#`FApAJhbԴG/qA]Nh&5Dʶ<%f$\*4Acu@#d*~1a"g! -Y>P_ Ũ 23ei$erۤF<@Q@Q@Q@Q@Q@Q@Q@Q@q;k;-voTu$Uz4}6DR[68F&@]DcmEyst&y li 1/a .oڤ)uSjxkuo1$9]nA2hرq([QmfXbw(pHh t.rEsZs:-Xtf"K[/U ؏0/gz wj4_eFSmM~Hnݮ; Ѵ[MbØWoo_ ދkuj~ZTPZe(Cof..B\"TZi0Geu 24I5w@|7䝝/ӥv-),&3-ʙK kQ\&∬~Γ>Ыrn$|V}Hg.b|CHǥm| yb@=|I=igadi=/xS4O$]X!n%hj7X%ӦxVY #8)VtxWek_ y>Hd#;W.|P<7V[ʒ*H2AGz䯵-Fyn(((((?7Z{"76M`?\m?Zg\߇=&Z]}?ln|>|n}jwmt+8µb8?A_7Ҵ'Wv+E \ 1DQTV$:U#<FJӚ-5Fa] 01*zҍ/Kt};NKk;uII9$I$M/?r*m$V.%»#hTʋ>fֆҴ{k R+hq 9ʿoo9G?r3)Fm~od OHbc3%#ܓצUQ_7 TU_*mU#EUQ_7 TU_*mU#EUQ_7 TU_*mU#tvPG{==q@ry[-tU#r.6$ O'voW5xCEK92"(U[|#1],UM'M[*K+3EْV*>Ȁpp t2xCLSYӒf] ۞=tڬc\$WNm)]Uarg,ȹ{ry5mIno^%f+".SWDŽ=̹_1b&<}@6F..'Wdy't,jy#϶zI|Kڵۯ`m[R$i I( IqսWNW/tˆu -h ԩ# V,~[;?R=ByZ"J&R:9Ϫz:C[$K|Y~C=x"&;Ri"i.Qʍ\ Vmӵ=KK6KidS@ޣnbx>k;ZU۲n9*n&]jVVM5"yH)nX>~C[_ڼI#ʸȷeё/FXG[Dę'j( Ou 袊(((((((+]q;hs~ʲ4Mn IoxdfJ̄yu\߇1|#L>@̊NCujLΪڰ!\ q{ok53IKL03On{8!局~aNO88| 6%]A?6FM R߾8uL]ӝ"ӤVhvfGSk|p 7pL΁HHX؀Gz<;k(ɲokqfHdˁB\%r Ýf;7 u7-q;dFabTAy{oa s'K GTAǫ2ǚMQ {hD5k1j>6El$qZKܳ)%f289ngw`ڍ;Z% s3F(˱,xe= rjtZZd2զQ+g-fA(cS1"o= bvDV&#k,dw6?ԓz\5Ƙf VPX%uݰ*(!z){(흴]J{ n`HR3PSSZ٬$mVOpO#x3 7GKX-jOٮ-̈́kQ ƥXom%*hGԼp;O- VG+i27ˍb2#*rF`Lc&n;J+m𮡤gOy%5} g͂%kxL,nMۓnbg 6@B!?zhS; xqEpڗN̺QӂJ-hv}Zrr&[}nֆWXk)^XUI(ی=*.6Vu+iyi>֑MNS!bqs2v֐^QQm yKm^"ATVNڂi,ЎxxQUNrI֠((?O5鶺.mȃ_*)?7U_*(MTo (}7x] S koPġ#8U lj(o ?7UP <.MTQ@&o}7x] QE_*Mw|/Eo ?7UP <.MTQ@&o}7x] QE_*Mw|/Eo ?7UP <.ĺݶ_o3t>Q@netgen-6.2.1804/doc/pictures/menu_view.jpg0000644000175000017500000001731113272137567017113 0ustar kurtkurtJFIFC    $.' ",#(7),01444'9=82<.342C  2!!22222222222222222222222222222222222222222222222222" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?YeuJg'ADUf쎭;ehc21 # Cf? |C{w e ]= [8/ˋ6B33%sEZ?ݘtҴ[kc,N2eqe>P6VB'AG'A^iqQ';X.fBٻt[qmR8[wH*Do"UlpJ 푟Q@ 5t}2Qw HU{ N8'Eε zΐb*̪\mS1gZ헇|MэNmYbȑdV(;]?`1Tկo|;qѸVq0DGk'AG'AQ@y{y{''AG'AQ@y{y{''A\WmB N`!,G8Wc\5{3oTu$UTUӥ#{W|2Qxr̼zպ֠tKŞT0$3>g<Ь 3 &-Tkn!ȱ& |s;vhR)3· nҠ՝#,72H'RWKo{y=-#u7nC 9ûew+;rkһyg719%n?ڦ>~w8ʸAW'7(((( BjkuК=*s~ʣ[Vx쌳̶@/ "N/FԾ#Ӛ[+m,텴 KO6fV`.7Ҁ:Z+·׺;>/.qܪDUjdN2y5jDMo`xRI$H$Ti`vga(O\Gj6đ< Mr#mGv0fZz47P=g?5-ʪ%QR^p@=[.ʱIf~@$DѰ)g~ F(((/j_ Bj7:* R{KX.g:6FTy]Z-FM:_\0;JXy ĜcႝW.5mr%ӣHⶶymș0 [qE˨CkoI1(HB(v!BD!frAf%ܒI=&hׯi0]$$C ܸ r*tsZ7 Rv$q4qD҅bY1G0Q\xl~\^jtanmQt $yPmy9LYUY4N 8Zqv])-lʨqoۜ&qr=ꚇn4`YHijCc#+JJ/PEPEPEP\5{ C^5z UI??G@l#ۚES3;"'b9eA;'l\ivkȑ')8̍0Qݖ` fF]RLh/hadu+A lv ,:?.6I?dWIN1 g8$rpt6#mFKYV]P9$6HJ+-z/uq7_ZB&^˹LKГ3I R/3\Z]C9e1Ʃ$ȪnCIx􋯱[b"Y1PTz(((+uКo!&As~ʣ'\߇O/m JG#nюwSQ:Vۭak{ C`}fe5DyV)PF#IB̓$(kw5eqa5¤RPW;r arNMKKX-m`".NNp9$5ONt.gbn]˶YfM{S\m\y:l}88#8 cKAmV${죸0f5iYm|#>${yL ]  *_Z{{{^\M#G[Gfp[cBXGijrqZ˲KDp_#^ =*sV~:ѯ|L2͒o6#Ho_,9qfESw. ( ( ( o!&/j_ g\߇I7:ɵޝgMoVyZiAw+&2pcueo{?1afE$޿tѰyrTVKz$[ $TI #(NNבt)m{=A5i׌#r;O$cӲ?.0I EQVFM?JovW;ʡv̕cqQiz[6.kpw,~&'Yd6k67 iiO;*c*J)}N[;Xg{g6K 7qڹ.$v6iŲZiNs}hSo,6% *70%sx@IV&Ć!3/&b!yݪ2l## t{;-Bkqfdo4a]wG}ui2q2( A CΙK~ڥ4;s0jĒJ6՘ '2[[Dk$\ynsEUtkFn~wwyOnqiq@7SPBh]ě<ܜjz..»Yʋ%3>e֭EPEPEP\5{ C^5z UI??G@h:}^+Y4 ?+J |`-}O}r:"Z:˻IH HGM|8؏vt~ϲ?h/ic7N1Iۆe p2|rqF O4ɴk::9pJdtY&y];[y=NNK[uw2Gj׺[*#ŎA`q£+\<>UrJ0\@c 3sQxcTO ͦ6q%B{{y!R$d`b ȧ#pj?JխkCNF݋D$V L['Oi O5nuo>aRoH$䞦!334j;w"JFqʫ66Gعy{oa s'K GTAǫ2ǚI'92ڌ䁅%QEQExCP׺M]p^7?PQԓoTtZxrkͨ4*Ʈz)\r\/VǣC5X]u P@10JFA^=WNSL]ZeE㒙2GqD:qN YlZ x84]Ut,m5$Htcv'!/T+T9)U֣}}ooCs H*ȡQ1vs#^pk?+IKq!ݾr&kkihʑDoc+xmm丸"%/$0UE$xB?hrq:sB$[1#q|x' Qi \ݣBѴ~T?!uv1/ 'UF|5H]:9V&EK4rA( {aG{(<3mjlVܔ 2L)VW`dV,Wq!Mk .6zuJyBBZaFB$p} x SGX#k{^R[z9m!ϬX啭ОUH21Đ9#’Ut/j_ Bj7:*9>GWw~G娖I]|f%r1 x -jOZݤzfk=양Gurw'w Q@-=ui6A ,kitqYT:.8V`p>I8+'[ZxTY'<-l̋ d`vqc4vHҬ`j-rdVg1H䏞$F촩gԝo1i1IJZ#?k;U2^EdRcissa<1&@2xֲ5\_ƭ5 9]xU2y8Q]m/^OY]Ep4b * 9"e?7ѼQY_.=sr-\|'+g9+FQ@> ;Vkm-efPw0vQw%nWGH;]Cal`1# ;U 5;|Ew>uG*j JX9ǧ@KExCP׺M]p^7?PQԓoTtk}cBIҾתH\ؼ2䣴{È爷U ]/xT5k&haK``bBUHl/tPoY&m5ѤRCdY K !vɌઆl?F|ej}u?&% 3Mű*yzhOp: 5K]+edaø Jo<`te}bdY.<|AxVl^Qz`vKddm+]2Do1@|Ka+exH2QW#dv$w(T:^qz]76]V9r 嶭gƺe-巏,&Pwav1*"~鮖<3 J )mVi&S ;<*p@|(_ Ύo./ڮa0es a3Fs*ޣZ 9╢6WBN d:*K++}>-mcgĒrY嘒IbI$I&8 Y::ڮ|95TX\AHR 8 ai^%[E-k$?v5V fhV. .PEp PqiAu HxGgtDjێJt'^H=({IN]RFTo 4& g wa>]~)|!_ZIXO4Ov uBP[M.+xF8 K+gY@H{Bf4pQĭ2-Ʋj'EVH)`$LfaM̄$* nEBY@-r$HVܹs> B>uUa]nw}scya"{j{`=XHY{{]? bCae\:a]p$ãu=apP+ʫǢX>C\L+(1$[dɬtUJ\݁wq[ʍlr:;hkovg=5hj(w`k-Jpa!0H+8nгPNpY |$Tt}6v+C $0qoK1%J٦Ap1p4ҦDdߋbyadpȟow! U˦v+?JʁDzDNUWa) xVTbb#PDS#>Ơ˙.L{SbX;8TdK&Q϶ʻ>IǤ7q]N5L a0}J[arr~ 3[[70$8phƒ .$EL#f>SYUgqe!{vwGF:^&q·:S<*s]Y[sE!+ٰ" ݮ L "Ҩi{v>Oy4U&*t楧nv⌿5:]"ONMvv퇹̵BqLNJZax2޳-S)o$2+cZݞ }T0jևu^AmlەjٺU >yy:( DYSl%VM,Pad -qU`iGWnWn-08dpNa3sMjW O0XRcR&)nGW'S uzMq5oln摝wtvs{w1mk];#T;v}gIR\-L”NZ߱NPR"NšITY 33ُU_ OU_ TYh ^!n ^ MfKCyu (YpXBA,<ȉVBvy@zݪp5KYX_F#H/0VECS*;!APTkO[EFh4؉tuZZM8KXVFqdOEa` r[R`u)RqMdYZQĹWjM񁞏?qgJ8|=ۗJQwN)U1%:z,xѕ$[MK&V-HᶽVkА 3 [{T3&hxSK!ADsqJƴnI{7ה*j9גp i"e%Da\GhRAɮ CW.- Ƒd'"H]6\[n[3(1|x( 8 Gq[Ql8MJGeanKx taoZ#*EH0-;3'K6J"QD-h3S|P"lCq\aBEf+MƑ q b{ CƊ|@FfObm|)a%mV=[Sl{vHΝ/;`t]\BzC4`ClyҤ`eˏ:G"{-=Z}fmp-xl-ftUv쳄B <"o)_i|(xu-Y4Q7Rn]/9cAx2O#-7t! [;:ʋs#טֶiA\Sxk6R 9b$]`hvQ&̇Sdܑu_ǁ.챒n"^Kutj}=_aډ.2vFv>RguCWz__sΆt+8;|OcE[20Y̗~_幑t = w2*Y&82*{ԅl]$8k,',JYvA/fE.>zJKq޵x fF Z-$inax4u2lziS %8fq̭i) aNB]lڀe1mb|\.l㼰;ⲭE_$UuQ:L :`.Vq]fb„0v|BލUuuvT · t~gX)佇P¤b+J߼,OݪV1jգ]qZKDxC^='H @$q5kɾr1bt=Y7Wl}2S׻@|Rǘڇ{%CZPq4FRN.NTXV٫#̌ԑ XN,IrJF|&ޑݱF* vTT!=Zh=ao'\хf; y){9͵w'2#FU{C=T u=d,`;M_3*4qqi(NXfuiVyAś z`oM;87+mnEF¹P\km51us"|2zժYV<㜗ӗ-".MV(-̳PV ,L., vCG27qꟵ??^Kfurapͷ{1v{y!ikv#%f>KC%|%I#lIV7Wxf׈]Lc~vwz8_ɿPg:\e?,}TgpI|~ڱ|,*m{>F]yZIrݰܫK0"ga[Ut %Ykl䷗20dJZч7|㍬3xin5fHQ덍BO0šyfeSP#)$Y@$ v]s4פwzw>ʯh=L\jzPNp!ӵ :AxOMr9ϯh{õ;n)}Sc:p@ cTC42|)>Rf܈2زcy~l/ZZsn? _~l/u\nΚg4d?~}2Kcqvw:k͟ѐwh.7Y1Ywc-v鷅3\!c 8Ei0q@lR>yt;b7tiM6~FCߛ?G!Kf;gsn? _~l/u\nΚg4d?~}2Kcqvw:k͟ѐwh.7Y16~FCߛ?G!Kf;gsn? _~l/u\nΨo˲(/\O~l/=s3ݏ}lonloU!vww8vwvx76v8x6|x88<88/0y {õ^.ng2s x"@rTN 2"&ELzXc#n$tĩ-N@'a񍪆Z*u(5Oy;{$hX' Ww6>TB|k'%8ƌȊj6$YOaUzjǠIDpNزJgxlhԄ{HK qx,F x3QTþtr-.t&FW/tw2X } ;КB׹{Gvuz`}۷:K9CckoVpjv5OY5ĬL|y!q[=K0-u۪j{"uB1g4ז?^tR]7Y[78jeGI9d Wv ⎧8J3- m[%p\ 5ݰTe `+ z "E9,XS ؕ?~S6G+shSPn%)gL~^v85]XcE$ZF%560fmxYEHrHYu0d^@ ,d 9 &Q;Dمto3Aƚ1坙rdLK/re+`$Qxᆲ&zlI3D]LYfT8wʆ|aKY-jţ@؆CY6Y LWU)V%[yl"x-@f<1؅|ؽ@kO.89+CgAoI<' +-Ob64CsbpOWNZdH[IlǻbpLVѵ,;sj*g7kj[}SKzGCpv1=xj͟kV?i3Qm>Bt% A ٻMtW6zĺ m&3iجn S8Ur^"eqJm is113IJq=Ddbdږs7x2_32iEo>iިU2u6I`nLaڕv1p/NoR=I@ lIvU#aVcls; (R=ij|Lp^ƚhiiiho˲(/^o˲(/N~3-_L;Yvm>E \}=֙_¬Ycd^Z0BF6$꧅59CFW`j&{õn`TxJb/6#`s[-Дjp{efM馵ʴƟR$RX\bPQ]ٻhE\ aX<'f|G3EIض59dOҌ5\i#l,aR GbF{}qy"/n_A.9tfWcVTs!-3^W@I$F.xIqD#8_f[%"M$s#> e"#5{MK,KYpk#$xCe2ݬR5qj6_,ط>xƀ-%lĜ|Ԕp Eޒhn )/h,W0-L~ĬS`&Icn f>jJڴfrAJK,X 0&~ P@ŷ+jsyeKE·NF}J7D 6 CJAw`04[UNiEخR[Hh/,J^^+~Ŝ){sskd@ u$17p]X1Y5Nf۶=iەW30񇼫 &fӤj(pK.t 47yaRajҘBʐY/U1TB9,o ˲J_+V1d:3NJ/cTe [6RNekdFzZ݊¯`K!!h/'^\yJ6rO[{Ce%^|_y+}`|w_ngB[Qrnɱ*7}oq=[TjةԬcI,v|W5C ڟc^nK\iM4 4@4MM4M4 4@5G~]AXjG~]AXjs_`g,o!I]2=1HR@q~$Q: I5x'杵w4k/>'杵w>'杵w4^Jג>'杵w>'杵w4^Jג>'杵w>'杵w4^Jג>'杵w>'杵w4^Jג>'杵w>'杵w4^Jג>'杵w>'杵w4^Jג>'杵w>'杵w4^Jג>'杵w>'杵w4^Jג>'杵w>'杵w4^Jג>'杵wW6^^*w8{уQƬ3DgJnm ,f?N(bmqibbnetgen-6.2.1804/doc/pictures/menu_refinement.jpg0000644000175000017500000002514213272137567020276 0ustar kurtkurtJFIFC    $.' ",#(7),01444'9=82<.342C  2!!22222222222222222222222222222222222222222222222222" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?YeuJq9"EI:y\=Fu\߇8}}gZI^_%1Qa"D5j.fv؉-,6 ¢p RC%ǐ`Ύ#4RĻdyw9dㇳ[h4h^=y£q~vƕv:!4vZO1AU1a8:/>O~>O~~z iK[mBDr~* +nlsF7I0V_RD,͉VĎ9ȢP>fcr@:/>O~>O~GڴڅId,K=JWI@"v|A1M?O;{)tg"F+{>" р|*nAog{PvH wzͥʏbY*!$Mt^||GEIQTtP||GEIQTtP3MR;$ymc{*m?Z)g\߇qsogks5lpToW điZi-]<Ib24u̬HBtWm-2j+Z11y1tf'37pek@}K-%^~|rF  cTq *G*;$U`J6`2[h(Ѵz2ކv^ 9( f}zvi=35\,y^D(ua'+Ԛ%_̻iJ!3>Vҭ}Oػ}Y+x$AI#62䏛lvZiRچ6(eDl$$Ed+aar-EV`6)ARWˠx4x#Kio2৑n'9#sI]Nj]Σ4Oٝ%" @UI@:( ( ( ( (8?QOB;Y7:*>Uӭg͕aii{BsmC Qi#0Ռ5kKQKi׷֍jI1$Gۅ3. 19nyGNYh|e|,v'CEy~#}Q/mIgFYHk{}Omܧd֘rxVӯ {Tg[xZԁ/DXI =:ԼW7!;wffT~U>R_5ڼ=uNe/7r @rG$P2\kfm`V 5;;m.- K[<$ByeYǖȇ%;+Mk'ht9#A{WckX鍢g%6Ě{kVBB .X;p$ԨKU:H#/n>k%V136yPʪymrDT回/imbAH#h 1ndP #zuxN-u>Z^k8KEɔ*~rz(w0iGm?Z)g\߇I7<7ou;[X[S\-ԗ:Zue@ Iou,g\=/o/ ywVjIi>#*.vl k6լӒHNۮm4F~>}a򟘀z=E+ž}JTLf9@#.K [#֕/7钵ĖגIvQJ><٦SɰwWxTMF=QO#L20ϒ#5,<[KddYm0,hmd8vK#ÿTr;@QU4ᨭ&̭E9(Ŋcsggh@Q@Q@Q@Q@Q@wm?Z(E!U2vQ<=П֠tEhznD$Y-ĐH+6VppJ#pA v$Pġ#5 `ڡt}O ^QEUt}O ^QEUt}O ^QEUt}O ^QEUt}O ^QEUt}O ^QEUt}O ^QEUt}O ^QEUt}O ^Q\"-7Kӡ>tj >lǗXTcʹ'۟GYu=[W*XlVKOֆ|Rʏ<$ GeBCCs:I/a"ٕdٹVf i7zMpg ceCByH85مww(9CĈd mⷎvm((` jp;\]xE_j||mw$2(@qr*F|~}í Olob̒(c}(4ru`2'7:`e涴҂;́aKS {+ȯc|Orǽ`ēXKlb&땺>oL b=E9#'孭:Ŭ-${rY(UP u'$s.|-޿&>z'YB|2EM,_rNW vCUpNR)LXP~n6n 6Np*]%ӠwϾX<2Qv#m`Syx/fWK*LPWj"}ۨ[xDKԯm;>d{6@č9 mMjcOgnXل.bGlmG +f\rz,%hh٭eHJEӕ$*; [\jovng{5)M4{6HI].. 峓NWk,VsYm.xѝ0)nw$ aEsI-#^Z-.lR# sqq5˩|EiuIJT'ǯiEQExae?RY:mo=we9ҭ%|ƆϖSipn$#8զ(||Y[OM[N]qwt֥C0rG~3{@̞ eEi<-ų@L)+޼6SN ( ( (8?QOB;Y7Mѻȍɖ<ь&X\n%ڟs~ʼӬtӍͶm.w<%uh`낮`Vbc;M;S-kWr:KE$mp2p@ wZΟgCc=ہ7Ss1 ɐ79_ 2 ɡuh(&_̑TmǓ ,RDkm - [w4$3*ahd{wBYlgIrK$sͶs8v1$eBJw 8mQ@Q@Q@wm?Z(E!UBUӯ.mnfm2B#ʜ>~*m/Q`N[[ -ȟt,VFUrV# 3xn㸷%Ueu# 8 %qzvVTK-I+p  l->L-YX& 'kq,||M++}vh{KAEpٮs ",rQ,ko%ĩ1)y$($w+?׮+u{{$ u|,B!fPy9=G,rY]Z"yvng..GP :+ҼL- 5Hmun^}:+mȀ`ce&d|+Fz4Wꚝl>Khies]/eQ|vKZ᷆a-Rg)nqdd68tW|QO-d5-29@ \ kvH̽]@*vQ76 |H[j>+̳K4) 2,Eõm%3Nx~!%1[eYʈ?HVO,;pZ3hԨ/).\kyS0jc8$I7Du-mf֗:&ζɿEUζɿ?n2o.-QUn2o.o[ TU_o[ :&W:&ζɿEUζɿ?n2o.9?RxB.( '{MvoWj׶Aw$k lY< ˿*Fp~`ks~ʰt ibN2Ȍ^#}Z2@'c(O[=;>x `U l2(E<ٺpV"Kh^&] iqs7$v/\Hޟ2(𮘚ej0٩H N2{Y`0Si[B@]tJB1 TGb>3<+k~zK2'rrʮ WsI ;n{M*M>/ xXhDe@ʳT<剠1O#Dz4G%c1G74ч[a{0\mg># qqWljm76M Sk=M# O*F0؏B]S Zծ F6 HdAp*Yyshl$ۖFQ3]cI\Iii?`5ϰZ;oٕ9991 K1 C^(z(((((;-xae*K|7p^dV42JH| J ͸;kj*Wo UHj%VYW8ة z3ԭ i3h$AdI"ծ,O[Eg-Erer$Hd>Ӯk֚vyq9w|o.8rlIz` xNkvz@qhG=1*Kc,!іRu;YSLV{ F ;rA[gLE-KtmvG#N#1 A4MCKTrX5қh0J3!`R&1|;hv^ZTP]Cp,\O-M1桩iݻO#w7YivR,[h6\a`dW׆;iuo~˕Z6FBX+ӓ/o"{v13q ,zO}F}yoft4j qlG!G; kzv|lymx A*Aa {o&5ɛbIL˅9ɍ/q\>}JӖ[YK[y)|eQ~H~e65i Կe[tPpd DpŗA@mxGújCeWXbH LNddf';[@Q@Q@Q@Q@wm?Z(E!+5{!+F7$8AO}KxZ QE_o*M/i|7Eo O?7Կ照UP <-?RTQ@&}KxZ QE_o*M/i|7Eo O?7Կ照UP <-?RTQ@&}KxZ QE_o*M/i|7Ekw:ϓ||Fs'Ҋ(netgen-6.2.1804/doc/pictures/viewingoptions_4.jpg0000644000175000017500000011105313272137567020422 0ustar kurtkurtJFIFC    $.' ",#(7),01444'9=82<.342C  2!!222222222222222222222222222222222222222222222222220" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?翚O^E,<(R8q ڤ&7ozp8#ҡ0ֶG vE8OE>ֽYH,uv'3(\gc Ǭ}*< )!Q" vK ٫v#|,??OX¤Parυ'(@G'X,GaI  Q'X,RyB(Qd~rυy> TPYarυ'(@G'X,GanRMkpT7 F֜,tmN$5lY\U7 #mdѸ"HE٢[ (|,??jwڜG=R[EMF3$h<O57"\ɜTH|9_9?c < +N-;P[˅7ZM:(LG'np=z?tɧ[E˦Fj F0Ia֏kH9$rrυy> WM/ᱛ\mOSK[M"DI!v|lA9gkz'?aq$B?.}d'-Y'X,GatUU.5 &$Bʨvռioo Onm?ݐ ;F@=j}!H (|,??St}g¶r;IEjBUB\1fn/oOy4P41휪:Ui$_OX9?c ֖Vˬk)c(f(Hp8ڟmWR֭$c-3K&*0yIarυb FvSt[>ƣjZ#R?9?c < *O(Q ,OX9?c yB #|,??OX¤P (|,??g'SLH/YP#1{Rm-@.3dEi\Xi0ͲgAda+!]rN$?Iq %]n>cEq!0:j.{"|4O&i7;-m`6eGFVGFs>rLMF-Alr:zTQy%4-_k%a(6Ò=} H>D}n73n~+|):=Ŏ;G`ծ|T& )S[T-ʧ`#|a^_Uk|WR&tI'~Wk|WQ_UW^ɞ7{ ##OT}n^Wk|WQ_U[a{&x#r i>"XWd(фy , qk|WQ_UKSCT亞T֢bLZx㕉L0#:minghP$EV A1W_'G!~UڏaϹw{\\f2ـFm/LTwi%G.ګF`F_zB5>+/_O*9%fZ9#7+1<{pA{tgSm{[E9A >7U gC^=,O'Ufmh[X^wZkRcpV%k< 7k|WQ_UhPJ +Q{ OB5>+/_O*^ɞ7{ O{G#F/^R# {!3nK+ȣ'װi??4U7i[r$ivYmW fӴ##^#ÿTi?>y# IfT+lzv|g^G⪶Ǧ:e>tpڡba^͟0E^ CT^1"Q!UcBj::o?5[}WR)-%|t11$?DzԚr2m,/U*‘;kʟ䖐;=;Y͊[sH&IMt+ϒpp:HԤ}Fyf96m|UJ/Y[WXRyl))Es"dx&HL%"Bј8H9k\GʷV[Hn$yYX>Āt0xP]e[c.Xc皛RԯP Q@?α&ah_F4UB<64d3s0#M47\v]9 8=p~W-miŚ[*Ԅ-V?z%,܆np3գg}ke$spDs>70N3i~~#{hkŃ`saIo%)J^{${j]+F+@YmF$ ~UI#=u_f.Bdgd dxAӣŤ%WK6vJT`c<׉=*|UYn)yvqi{rCgfHǫ1Wo_ {4hCD [&ehcĠwnA,6>GQ^I,pGw:,WYԚ;YH-]On?1i pH IJ 'vs$#VŜ*0!UsZU02U{>>lm:0*܆ IdVGeW]n y,FʻddԮKX"+]I 䒑V V{+J#m@f 8p RZE%s>#K6,d g8! +J#m@f 8p D1I+FNqYj:~[/.~9FcP'fܟ&08@I} o>+-quDh>ըeQWz[E !e[E+ %mYh6~5E%emVKb ;ҏCo7]mX,r_՗o&Co7]mX,r_՗o&Co7]mX,q@}ms%T]M#:)Ty??꣢$O4 c}:9>9?@9>9?@9>9?|G3%F*cG^7/G/U(? ?(? oJ4o¬ڃZ UJ>G֟?C$Ywh((((((t(cMOO4KUk]"[X 9.ج(IB9S*=RPXKc2W2 e;V{̏úZddz66-VNrS'^H=(_k:D -6[ gL4[eݳp|Mj3iյ;uFk@JD,a:K{Kwhl6J00GB:vtjZDž"I>wq,i<,K"YX[n"'rIW~M4#2Dd|ɸ `~c= ~%#Ѵ䰙j"v㒘?*GaV-ۭ[WBZ,dcfsQxNDZO 33o-P%7-r9UQR]]-awE,NXCeW,y^sw]3U='M"cS2,d+pI\XkD{oOx *êd rcvS/QJPk5m|2JĦA>R󝦻!BD!frAf%ܒI=&9mSĚ Rlkbo3dxxyR2wN,k^)u B>NMB2U\b"Tp`nҏúZddz66-VNrS'^H=*Ҵ{u jWkB` ^q ]Xg("=?'H'3.$>i+Gۯr~tynO(nO+?w-? -? MɉFYOu-? -? iiRnO(nO*%g7G%g7@ۯr>ۯr۵Kۯr~tynO(nO+?t_k#}YI,mؖfh/$$⻟1ߝc}:?}R>»1ߝL ĕ;y{ _=Wh[4aK@O ?}wxf<u@{ _=Wh[4aK@O ?}wxf<u@{ _=Wh[4aK@O ?}wxfSyLTl|3PqSkӂGַuZ[v7rX[\;a\'?o΀9߶ܴ+"ܴ+"/1ߝc}:~ۯr>ۯr~tynO*)ysdn! N|;iz]?oβ (¾a _-?5ڟ?&E{SUpз*(#_#+Y+Wxf 3lS?FX|\֫# ( ( &?jWbe&UH8 ]~ FR[+$&D-p #9]d٢gZ6B]dQIJ?Z=GxY'Lc,N)h((((((& Y(:KĚb[-lXV5ʁn%'Chrx2-\Üe@nAi\] dϻ'aF$UVfTGPC@k{u%-Le2̟j( 9fMJ/`09SUxt=&!K+|(,v8[P(i֯$m'';]cb: Տ|A[4 d D*P}ӻ'Oa<[oqK RHPF A6/ xz KHt.;k|)gIv J$ѵqiW s?T 'ϖ;F:|x 鮐5Fe!@,,23;gS&/7Kc{ǗɍX[DT4x 6=|q4[R]]-awE,NXjskiH,~zowF+U>b+1-hCtؒ+.83"nB  \TiZtIaj jZ!&o0qހ-=_@'jS }^& #@?*S? c^"PEPEPY:#PZ֬sfa(7_-?5ڟ?&E{SUpз*(#_#+Y+Wxf 3ldh+1dK3;b0zzfGȿZT?(?+Z?(?+Z?(?+Z?(?+Z?(?+Z?(?+Z?(?+Zgui5{K%s0|˞XׯN7RWQ۲,mmOHMNb.}\;Uy%m E"9[Dy`n o_o_űXtF]L3z"X٘FF&O66x%yo cZQ0*꤃}-ĀFzt##Ÿa|?CWxqg b\z0I]vCiGda$Ss3ꯂ Po_o_[_gfeqa<ϘG$K`ېWImEuL[x$+ Ƭ]0RĪ;Fpo_o_zocԥm,a (\,GRCFm_Np^Yq"P΁$'ր/V}7}i2ɴ(&K;AxSj{k7h$/B;eCqUi=r?[xvKwFt?yآ,r 3@ EK_iV6baK{%%VѦ>dѦ_j)'s>??mMs⋩lZ{k'VEv++BA:9=#Z5B\\6I ]6w̨7rFW;hkWB5./ٰW$%(^3EF1@ڠC;hk9DGG"w?ۏ񮾊?m϶n?ƺ(fz[tP?[kW?^MQWw j nTQEzG)WG/WC7pW=?A,gJ؎(QEQEQEQEQEQET6[\ܬa*\?t`ש&_kAg{Ee^::}N|Bá"O%}ɣXUNXx&4+*Hvj_ ]Ů]k:v7 S,knUЖͲa-| Co] Z&F@03;xajS C`y&K4粍 30F}z(sG-6{[{ 9-mNvCp*0oQړ\jZ۠8S RI/!H~owtPhWƫ`Ss[ЫEq۫ _ j:snIoviZO|, F"=̲n1mh[ wF{e2I9hHyY2vG"tBQӯ X3FQWC1&cw yާymb,[lɟvNoƥ7t@^k;x,lugM{+H*@R(;ݷ:5oRROmgdHdfv;B’y᱌z]kF[ѥDԮ"i,7/RӀ }E|h0궫6/d̲,`IDs` Xq,ȓ_6w n na+9{yb;`X>ܟ4x_nH׏v fI'-9\+&NDAMPEPEPEPEPEPEPEP?[kW?^MQWw j nTQEzG)WG/WC7pW=?A,gJ؎(QEQEQEQEQEQEQEVf=վ3J\XuRH@)rӨy-"IaJI]H#r7 7gMԧt1\q5!mܤ k7@֣-ֈl{ ̶[-U lowqWMI4%Mo ۠Hd¶I9hCmht(ϒn,giUxt97ŚomQ]hjV5ʟ5Y]7 ^xg km|?jZxs%ԌEM Lk3d*`+hhzJnd>O7qnڻhqRAiֶ1Zg8UcF `6}y@&^YZ\RD.O.UhC#a9[-xRMK;UIQ -\Pʣp䂥Ҵu89,-^BT^x7>^úͽ[Ct.#f\a Zɱ֑cfW/"[:Fr8ˀ :mD t](Oius-9 Ρʗ9Q't9tȴ4m9!mڵ&0܁Ʊ3u ʳI"Ն6A@WW},,񠵉$"8@Č`T rvz]G_;7|͛wwn"4[Wk;u%Ca3]Ygay pIh3ԭp>U'q?*߆7Z]O(܋pR1`cIBGW_KXh|76e+lf~r6sݒF^sghݏQ iV?7#R憾kݕb(((((((((_-?5ڟ?&E{SUpз*(#_#+Y+Wxf 3lGET((((((((*֖@ՊƟJ7%2onawJ]=k*%NcEWf0\{yh0ϧU&;G,#5-pK* ȫR4D\m^yhն%y-|ˆ&YYȡPHME6#.H]RI>D_r'zy7ٜi`o iͭ2fK!FKnXkm m{.{2C~H2)SpzH4Z[$7HfrpLs5ܤeG71E .S#*Tc]?*Z gGww^$W[[Z[Yw0܏?ݐH_|WMoxV7-kM>-R wy 0υ>g$ȸt[!Kxc X(ϯ-PEPEPEPEPEPEPEPEP?[kW?^MQWw j nTQEzG)WG/WC7pW=?A,gJ؎(QEQEQEQEQEQEQEQRBA>juG1b!ʹ/jQ\ZmF kcRNGv F~fogYV-㳽lmAHZ&\$%]`O@;+$I1m:p בDHS<+$W'yrJw<%q/5onY-Hʾ&6pdiPڢE%{<oV3LCn<*[V?3SOO6Q YQVECi8΋3e$2vz=x+TՎ5\DqI)[@CFIp#gqyR/.!,h"I'YB+L bavvW#Ͷ}:\fWw89Ee$WM[{[)>bdA0 UbU 7e@=?iviEVҋi%I$rĒ<*T 10 ;#'<JXoͨZ / "ŕvYq,~z+k-e=,vGprFp +a6-żsp(u##FyV ހ$((((((((_-?5ڟ?&E{SUpз*(#_#+Y+Wxf 3lGET((((((j:n];(Y$lD'&-T,5?T⳸$HWR 0hR*A2#e`UPjZu!E?*QEA{{o=ԛ"LdXN@ $$TW]Zɾ' H ʰ  EO@Q@CgOG_Llmٿ|Ϳ>c(,mi#Yd9eaqSEGox&Jzz=k[LwsGyr;VH˻?1`hƾu{H-AkH%xerxS1*N$#}%ޠcj+% ,{ Nҝx+3v"yqoo$F pB'i$"s?bY$mV\4rn [2x1Ÿ7Bmxtiz淩4ӳ_y!%9F;CoF‚$.6gmp$3db].]vʷ:(#Y[Ndi$ߧ;4 DN]Na_eGN/ma.fv1]5pArL+[oxgĺS+X⵶2H5 7FAXX`ckYεq_ͤoeeS3y6x$Št}yDLkRHDܹ]ȹF@ 74]6k{svћBW &8H! ƀ㓅(-Z7ɷHR~IU{3zGA|ָ|/6vj6OB#!Qz:]:㏗\Ʃ_ޟM-{FH 2{ʩ@sKuqdm#ش>S6X0;I:Ҭoks%ϗl jEPEPEPEPEPEP?[kW?^MQWw j nTQEzG)WG/WC7pW=?A,gJ؎(QEQEQEQEQEQEQE"y{w\qT{)V 劁? /w6ꭸ–>?JfŦC$q,dFiX,@8OWfbYmZLі>\ł1.Ufms`j?nvAofѢK: 2HQ T<'=Oj+" `+#${g˨ w?1Iqq 4B۵  PkxIy񵕫\KYL_ "Y ixQHƭ۪4vs\FT!`8$*Di5;yd$-D#ӾԴkS$nFx8^Ozʐ٘4{ b+bGy`h'EA:u5SIHZ&!4N7(u;%jt]RaG!zl~0]jEN'j.rpMdxOYW:GJ֍+;61ۍ*$񖝧iSOwoKnY-nJF}ow?;2! k0y hK-ՇyyO5%ءñmn$1@l ax,l Z%/;NL ](J)';U!w5Q]me0D"y]**J'$ m3 0\Bɨo<.yFpHOre![(.g]c$aa6ْvH: yEcLYӢ,-^R͍a99\mkPYHBbE)ܬ0}+u.f7Z} Da"Jkv2ؕlr<2 lU( pp{{ԕ._Et3Nb+y)t^1,4/{ԯb2,D#i&P/D8Jhڜ}&uܨCs3#G$sD˪9Ϡ ((((((((Ww j >*n^y\A4- (H>Wxf ">^1"|L[E# ( ( ( ( ( ( (k$XhVdzťlBb=os^26ZN@ X老`@.oUAqEp#4naQ\H5̩>P)_]۰q-c&a;tS 1ǛG ?hE wtVfͪ_lPq F!Y]bqh6GvGW+k^Gw@|B|A3g6gUg^qm| zejգ^Mr ofy%@AA/ bxݮMhaӒeA+oFEGKUe>ݮW^Z^\i^IJщ"XUJO29TN%9![{3ueisi.{-1Ho%+JvMuuik>k0$ 3wtWUV:y>|]"e8b~̈Cf`CPkWe Qo bso,f@ . PNǺpNO"VI¬RV1ʧRq(!ֹz%,R<"c @L`K$k+ ̏p,v\hښ%w4fs !M(((((((Ww j >*n^y\A4- (H>Wxf ">^1"|L[E# ( ( ( ( ( ( dGFKErV~8uh'>!>IS f.X.̂ 8nR.hf9#żA^@hvj+$[)6<P+|isMbԢ tbm#Pі:+ּA5mf)$TЮmwfe$~\0a= [5ޝ#^=ۋ7P#Pciq^Krt4W5gOf[vZLUCt9VePZT3d6OW<:`dG;XvU|dȊ& 1@I@ ] IAٚ,dpyRH$j;H-ߴB_K:: ۉD*IgSîÇ8NB +e nlV7 T_4f1vuo뗖/t-eI1ds8;T9-'r +OCkQ^LI A $,T/ක;K#TPT,G$%dlo"Eai:BhF(pHʲ$pHtQEQEQEQEQEQEQEOAWT|U"CZ*?h[Q^}U?A,x+D}bEt3?yҶ#*FQEQEQEQEQEQEɣime"/$S ++ֻUĦ?/3 }=5Mn{]o&xd;%U Jt -v$<"9 e2J$ &tb= ֯r$C@]1mg3`v,DdIKIf'bI%$I$uO Ŧc,l|  4McPL~ӣl\m{t| +㷠{=JNenc0d`Bs~̇@`Ρ.&*Ď;[, ?3fŕֳM-%3BrF(O~Waϯҧ2u iz9"0]K?#llNo[BG1'⧢1[z+iw]moG2-Ċ|%`HH 0 s=ށAw ̖y!2;g2#`nW$6qZtPchkw^-Y!LLJc9eI"II.@XY$“]9j4Դ.%M q{P- ~\m,~y>*zWUMirq0ۦ&~FIfcc%h?4jzw6gE\QAO;pӦ{2i[tB Ҁ,EQEQEQEQEQEOAWT|U"CZ*?h[Q^}U?A,x+D}bEt3?yҶ#*FQEQEQEQEQE_i)d,Id y ֺ+*7OS^i܎Om㷶b@709cԓ޼_ҧ-(4絾 +iGr␮nU\FIDH@ʃ@1**Xx[Io/e>DxzCFܡ`+c-IEcrY]O%͛%B$9d]nV m ^#n䷸%U)$r(eu#x 牧^o’􄲸V[-vJ-B!aGG̾EpuuzY ŧ۫#Y va'XΖjoa<0ł0~xwMY[p@h cv6"Qp9c* K>HmI^RX܂U'H̑ vCh#`,(.YZ)XXQq߇En8M.}nDMf+B4Pn7Sh3^ͥ?#xwHDI] *@+N+[RJIЦ,M%,T ˲^xyBxY1#2ďdKh-KlopqW؟ܓ Hyonb 3)3'[Ncnsb۹xJ#c՗jk?E$GK?[Y. I$Ž7KFIGR ea tQEQEQEQEQEQEcE{SUpȷw֯j |EWrUx+D}bEt3?s C] ^|&t袊Q@Q@Q@Q@(⒕NR{n+EVxsgbpGUSKygɷn_k9**;|>9$JY/- o lLgX&Eַ)oye? yb2ǸIdn9f/nOc6׮J?19&K}U.5/-Pd}%I7W O7p;ſ\ًI%̇8p# M g$1kQ.{AeG Oqfo tmC2*ad ,G` RIi0,h1rQX3^6{kuuog!Ѥwly271Lsnڛ^ӡ`%qnD L9PV6ۑ&iSi]Ϸ HHQIv$k?z7v| g8&WhQ8eմhutq#+A,E-Co :f6BD~R0!Xx| ]siF1{Cy #[{pŀ/C-S:dΝ-fCjH҆\FF8vjq_­dP#8#qX7~u;L:7Ki奓,:R P g@75n6#Ͼ2Uq4ґx |;G6o`lPwF|rp9Ÿ5+kN)X`/*8! 5C:u䓼f́*%`=\ ͡]ͭue%YEAsaԙdr6@/kNKcY]G$h.Hy@A嶂끚%4%mR9.eh`W@e[c"~f 9mm 6]}٦iF6ܲ6VFJ!HGR}}{$G'ڼז7^Ba%fCCaW,R[vd^ d:W3^Kp1غYG6%~eH T{}?qVW 8{I/#hRUaʅ3ɷ_^θx/8I< \ĸݵU ʑhu໺SL\fXca$d]%eɖIH3FeZUx"kz䴂@ kt<T bG= ܐ+N^7X*CpT#&vkh wj С@PvvO T *v 1 H%pkЍFtn KX䅞3?4Ey7nq~ A/V %ɻ'*,|wX@ a8@((((((((( ȷw֯j OAWBSȏ׌_og{_#+Y+ϗΕQR0((((((((etZ 8o4(;KZRY@MpgPZ5+2`}CTmMe քܟCWfbYmZLі>\ł1.Ufm珋탘F,FW*q!F* Pco1_O 6kb})UfFYX*NIW.-x hri #4I1t#6?%;x'rhxĚ|4G  8'>3@Q@Q@Q@Q@Q@Q@Q@Q@Q@*n^y\A5G_-?5ڟ?&!QE^ C] \G/WC7pW/+b:(aEPEPEPEPEPEPE(pZ*ƻF<jiqA=6m+g eQGo$jA9}>8lEEr~g/r``s@UZͯHsnۏ)cq_\c}Rnm"3\BrO'eC2*nUbB:J}Ҁ+lZd2GHdfb jq={WtYHMĞPY#ݵ>]@coVַVRHbʊ*f H,;A#p$c$W^ӡ`%qnD L9PV6ې_hnq%/XΊgE_nB 2qPI- T$kv%%Ii2[$e"G <>",Ν-fC:]# eB7=* YcVmBqlzmw"/[(NRln-bheLFG#zU;Mn$yLH ACTCr*ƧwaZ,m0YQBryȼYc&qQij-H7VW*#p\[@n,`[uyfwtU!W'r\ĢIU M+TF]dH&He@Qޠ6I9$ػt k{[iesL6@r$p=GW^ӡ`%qnD L9PV6ې&^i|O#.h,Now֖ o.M AsUf>Oj&/7TO{}8Ǘϝ=G_l؋v?InLB1Ʌ]`<⦧JkˍJ—c#$lPw0IEP\aY'=>ќc鞣֯EPEPEPEPEPEPEP?[kW?^MQWw j nTQEzG)WG/WC7pW=?A,gJ؎(QEQEQEQEQEQEv氮Bݮ>,F_<A[Pf5 h-V @HaU9# /:-vk$/2L##< GaErW~ |SX]j)in(:pRl|'vM^^^{utJ`X<3^Jm('WҮ GFp%˘<v?8nvCjs,w,c-LJ&ROK0(>ugwtVryqʱ'R^fpA3[O \[3YjEK{M|Eu?A8)T rr8-49w=Ņvd֧;P  #h௡B?Cg_ iZ<em$b7˰ǜg8hKY[kzWwWmc!CqwbBs.]G^z}>!ZL 0` MxFeЅ6ښI#Y=L7aA DeTEMN[.$1Qĸ`l냻9Sz޾ϩ@ڶ4ZI- q#/<) \jv$#d-k3YAQ 导1^Z]m3FO<6G,{6ɕ .eIB~SEQEQEQEQEQEQEQEOAWT|U"CZ*?h[Q^}U?A,x+D}bEt3?yҶ#*FQEQEQEQEQEQEQEQ\ǫZZe IErZ4ƏswEUErZ4ƏswEUErZ4ƏswEUErZ4ƏswEUErZ4ƏswEUErZ4ƏswEUErZ4ƏswEUErZ4ƏswEUErZ4ƏswEUErZ4ƏswEDx'R_h%(laFCF԰M$c7E+Av6)V2PP|}'V_8d/(N]gۼ Tb8ە1O˯ixmnXVlZA8/?%ò ( (1U"CZ*?j[kW?^M p>B+9O">^1"ȏ׌_og>_:VtQEHŠ(/YEu'ω<>pvE@yu[EpT bةә~ѽ^ Hgu+Fŋ#j֭tn'ӖKRVKyv);͹Y_schAs{*_t?!U]6rdTm˯IMtHh'y]c!! BOwTP )t.u-&-s62  5Q$ pZ)cewtP%KV5>4\4SKl'I s7M. FMO(W.aSm[ >#Em`G?B?J±Em`G?B?E%#4`G? V#4X,bQ[B?G`Em`G?B?E%#4`G? V#4X,bQ[B?G`Em`G?B?E;A?Jm:AiD?˒s dc-iXT|U"CZzq^ X5UlPrOj@{{~ģ89}z*+r)QEQEOAWT|U"CZ*?h[Q^}U?A,x+D}bEt3?yҶ#*FQEQEQEQEQEQEQESU-"M2 ^PbGuQVKM-MRSM(uNKyh</ cDhjp&\Y/پhﮉ|ɳ^GO7V[D*92<Gj9+MLu:^Z0`?^ۘ/( X+97SfUIb(W=Ex/ʒLG`ƃnA`n_'+$}5tYtHA/4|ƥ&A^ ۡH"H9TPxI$RPEP%}{4qr.K;ĒDr'$"7#l]Vҵx>ӧ]@.TgW0Z5(Kdby^8f#*]'Tdvݣ u푣_6hb@ɵ\4HfEdI ʬA`P UzTx&P]%bws,] KFdBP7FǂH-PEPEPEPEPEP?[kW?^MQWw j nTQEzG)WG/V-¶7Pe3VG/VyҶ1 Fz? Fzآf?$տG$տ[P?$տG$տ[P?$տG$տ[P?$տG$տ[P?$տG$տ[P?$տG$տ[P?$տG$տ[P?$տG$տ[P?$տG$տ[P?$տG$տ[P?$տG$տ[P?$տG$տ[P?$տG$տ[P?$տG$տ[P?$տG$տ[P?$տG$տ[P?$տG$տ[P?$տG$տ[P?$տG$տ[P?$տG$տ[P?$տG$տ[P?$տG$տ[P?$տG$տ[P/jRZD:& p>ս*?jUy\A4 >B+9O">^1"k _#+v|L[QR0((bbHA⢩LϓߠϓߠEv)yd`tKhUhMFwTq>dR:>O~>O~.#K/Z9lc6V&on^sd;>_p qmGVu}"}l]_Y>viFlX #23_? |[&A HЇV*WȮ׷4[<˛&hԓ䞔VGf B噻Zu_?PQ@Q@Q@Q@Q@Q@Q@Q@KBHe?||G\tۍCÏh .5D`NB` \w .Yv\' zQ.tttW9 ?=e(Ÿr˰]Gs}m=yU'=Ÿ}OY9e.h(EU?>xS_,<~#"y^;G퀹?/' 'x@"% qʨ`;TxS_O)A/G,КM^m5[zshdP# 2Ϲh*' zQ.t[EG[mU?>xS_Yv O)A/G'.tttW9 ?=e(Ÿr˰]}OY?>GGEsxS_O)A/G,\' zQ.tttW9 ?=e(Ÿr˰]}OY?>GGEsxS_O)A/G,w7}LG\rsɬO)A/G'] V? J_OS zQ ?=e)r˰]*!?Q V? ª}OY?>EJ_OUBxS_O)A/G,&u \[#8R;+~O)A/G']s zQ ?=e)˰]}OY?>GGEsxS_O)A/G,]OAWXxS_1d:u$_`>c/ ڷI]?netgen-6.2.1804/doc/pictures/menurefinement.jpg0000644000175000017500000003274213272137567020143 0ustar kurtkurtJFIFa[CC"  F   68Wg%&7U$'5#Vf"(4:EH"Q1q! ?vGŅ-b`#߆B,Yss~Vl9s~O/r9y}-%20u&#Z_@, QeYb p)HJ,iƑd|20p_u&>,TwV^*[sf>wRcEthF RnoTعyGg},7"wrn e$Levus[-dXkN9f .Yb˜%N Y'$Q5lQ^Uu5^myEՐ;^䙯eX3W[ޮ^5AXy+d\b"wq|}f9WVP}E)b q5Ye.X9lQ4U \03Dky, 6 qP4=EoZpa!04,S $EGN'ޥđoap [pL{^( {Ay-hu2QmNGz^W 9NS2LdsW< -W[T;3|VU*sEB ,|ڜyR09Z92Dls~jwa-j{Fbq4iWy6kaWf rf1# 6%H TJ2$kftW`.OP'm:U+an֔5J_,X ;+#Tg32\ sWnO^oyfU dmݫc~OsGswg~golu?w^7~t:J؅r-,[Y'}e"G}ı9s)\3&9Է=XMvlaRE~B%ѼqP89Zk֫-o¤,F4PF7of *-OT6UjÒVI5M͒=f/N8и" 49ca2>.LŸ]6M6ʜi/՛ϳ*nᰏfh2(I+Eڲd`{8#ŢLopk]JwtJm4;gԐ# Fs$o.z:EOhfn<},75_o MKC0F5Τ yVw~W +UBz*.K!DT$ZӢ٩qkKv.7)tk͐k;:rT%m"DuJc" DZ=LAn7aqpapy{XoG!y{Xojwbm>BP! 5\7I<@g$,R6C.RK)(L6$CyT֏ԟҏmy[s^oŰ֯ߺW:JVơtl4ovv*" 0PnEY lXވŏ6f96{_ade>{,9^$;Bu^,KNkEY9e'$ن|ggfGH,v0Ja8YCQCasMؤɜLt} /<@|qؼapWq AĹ&hs4%& FF׵wp+H*%KRDQ~8/IL\7BlK9g-o2XL̶궼 AeF--6イKhrXl0d9Ǔ CVt*SS*oY{Ix?Jyua ߥY5=H=6`v-mmell[~a-5C+}lpqȇZP ʶA[Km,_(q50"`,XZl\l8a {(p`X 84jd=a\\lb~۞T c&PRȒǎu r3÷Ee .嵡&Se|Kw=7|UZ.'r,@ODR?D2cKJf#ZzHZ6wyXLPK[V(^1^:Y~ӧI9),?Ǧ_3;We7x/=]ssK,/_2-\&+œeh DR*-" ל"Wf 8y{\ݾlհw\m)X{$b Vhݮ'qGx nCA9xH ! S]5 +FXߊW&T4Zإ]dډ+/*]q̠(TQޗ rŎS)ZZkG%X c~{Y\3 KvJ0ѹyyPTI`$IŲATG/l_%yӗxwk<Խڷ=a=T x !\R~x BN=2ͦoi ooy-}Wfvg@_vq{go|5Ƙ{`S|ٿ+n]¬Ěsmb|!@xǾ!I88885't*kGOG<ޯ7eWɇp&A됮=Ϩ ! x=67Dg=e6hcL' ́o[_+U# *BN{_aS&?Ԧb=׫yD8aCVfD"c&DZI,oqJ8xKc1<q t>\7.,[iA? uC:UR/c .|n ҹ Xk{=88+"ҍ\n5\LN[6-mKA%GZMT XKᤇ^BX`Yuc;s_) ۳c| `<< /xg[e%+pSovT5Rݯ쐠 7!9Yc G,y컝ؽ8Kym:N\K܀{Q3Mظ#/NqɐG":`2u{8J|W^)juSq7m9)H3lhh=e_[AW1 J@PCJyR2?[e%+pSovT5Rݯ쐠 7!9Yc G,yUK_$1u_ty`uL w:am H8 ӇwG0򀥫;K޴ W}zfٛc5~kb[lآGxqpug(6bRX:tNLL@.u׍Ƕnpvj͞L9&Ao6mPR%!'vє=4U;V PN:\(Kv%Ug#Y)i01C9"|~^\~)*yµ5;VU$+uJ*m\rbЁ 9yUD"r/(5=x&eOPu^M=7@0w]RߢJ}8K,<@%. Fܧ1&M=?]=6i qK\M^xgذ&pRK)QOa\` 0 21<nєMiڲPr30KvRVDzBHT6 ܄Af [\s@,J)ǔa)&ڞ= NՌl@k+1iHOm+0)B$a <"q0Q9EG:61emoPn&1kn;-f\XTo+UuUZ,UKzVlPXva5֍J3$V!w[&赪*ٳK/?6 es=tM:deʧC|sYNAMlu)cUƘfkRcC&NvhƙsQHq#Ñ]n.c)^\ou P52ԲJ tcg63A(zYPAȟX9Īh=\ o{΂ɪ\ϱzAq PG9| 2a"+ kf-qk˾v9Z5~5/HyW}fafIkXqK_, ~uTaک>I 9mˌFnRSi]v}J;5q$=nɞ"0:Uh\M,Ve`R 6q\'#?(ojo~wǿЏWPh"/fhCь'#m)iٺ-ramB0 ;2G/9Yw@n2͑sYaQbC"5"z,ҭYkM<.Wyvkhpj xVq`)CEX4 ^׿ep_)*o.z^L x$N^I-7 G:@g*xm=VoBP7&کki[z9jG#k7IIIY͵<R'$Rۦn: Cxj#D׶Z׵ٳu([تZUy*Mؠ_*{ PB.nd5S9<32lY1E4l?T^wzf^ڶ¨VAȂف^%)e)4P$ !y4#cɐK2g* "ÝUL$dvڋ/X:DZvEzUnҨ**y:r -Aݑd]%)T4l?0f[ݵqwѰ}6_jmn&vs ߘ~o￳F;h ݵ[7~a/?7٣a&vjmnw<p4l?0f[ݵqwѰ}6_jmn&vs ߘ~o￳F;h ݵ[7~a/?7٣a&vjmnw<p4l?{O::A q`C^/01敛.y W ϓI3""dʚ[ݵ;~Nx87MhI(qA}j}=0#$+Wɇpm-ShYbU=6/ch[)m0l:|>K)u($@q r>dyvAkٮ\ݎ*ȍfCk,{Q#_ H]SCc"u;=zT:YNmGTJڕ\o?9lUe厪x韘]}1*`nKH8- t.]5x36-9lK8:"+,0yd/~ZǴw!7W>8lַL,q;H.75D:CjY% 6# Tg=,##,\8<4ԫ6=tzofѝ[])Fi)_>0Yv)('7Û#8b8=gh:Ct?9*G_xr7R2 MzFTv֘Y ]SE5ӢAf(FY(53hY0 r|PZn\}BcykUCM7֘ [lc_ 7㪜{Ȧ}h>P±D*?n eߓOcn+In"5Jbnl B0i@y(yaHh 1zɝEn.M+z*\]ekFH1x;: ~Ǜ Π6%z&˧-Ͷ)a!.>ǕN+ 6Y]?4 urӈ/_uhfFTn!FG* Άг8Yb]@YY8#)Hcbm_%Ujz6a^ -r2 Lka[Nl#Vp%88K)AھyEuvˢ1 77e#^W V˧z${TUQX̜Ɣ7خ>ݱ 9EN3yuڽykI6d5JSي\EcY(G]J:^fJZ0ix-x8DOmͺwGUSbi s~@ثfP$ I@uz}dꆑYהGQfŒ/i&Yal6|ŚHtH-`ؽ[lK2Oxgg&@Üexa@7fl㟻ۅ[_~[z1:'Qs+CE1 Tp)j0q}coe-T\3XK Wl[G} ~UJ8ꮱP*}@ag[b*Zu:itaY WHNYgg/*M못k6%uM:\frxBm%X8"1OM|/8sWWo:H̙Mv=ޘzKҤevmB$4ݗQOF@,kה/:$u_M7ٖVVS\6,֨&e$ 8 yb4.\&dC4|1m7ء3 >[l$qw :z3a -UAu1#<95k0ҷ^=SZ?RJ<~Nx8 z^~>wQӿn"@OfN5}4sm:w e{OZyU_u&iS'PpnZvcIXTVF[/Sa˝9e|fLE=$sEPP,>]^F )qSVζUE}iYkӺa@>BzѮFI_9T-UZ'nSRyjwg*Oh;9ACъ@_:P( эR}Y`~雷̕PNJh@ѽG7so;pzF^S-fu9-wkM XEE:[C\,j'5kSܚ9uVPu&K}rGacZՋQ5Z@.ZJo7TZ-VeDEOlz >d\u5i%ϲ`f'4DJݻ;/&Tk[-2`aLk'D7k[y/x?r?dw? 8Ν}͊BQ^t5Wڭjԛ*[ʫWrX^a,<=Amq[>b|9FZTӍi-9y%TRݶ#jƴÚ[ҕ+( VB~fG.<^s%r1 ]5˧IӪ>:6CpsUS뭯A-:B-"m-q* ֛ (\ mUq'Ak5gKumnxygE3 ~L RaxXuTlCI`0{oT=L%"mk:ʀcZo7 $ܐ3(T՚sm$8z5L=r١K*վRX橞*>p{hmӌNjZZ7W'KD#ijT=afP zf, *dUjGg,|k:Ԏz6~r7I{uvV.9[&k6eH PFQl@7ja"FD75l? u:DD"_>7%|ExcTB Zzt({nR{4ǖ]=OzUv^=[q۝G&j\ vQjI-(7y"Ş"U5F Xt d[ ؀ȔZKh:.+vẚUe@adX *v3J]("T"I9R8ѹ5Ah/@JϮDnd2W]i0_=Hu?Oۮ0r̡dbd$L-vl–L"1$M%W9:Zt}fMDZzζinF!eL<{Iֈh%2$X$cHn }ƺomc':m-a$ߒRê?T%$I=O)ZvR˫ `YTϞ21K5qQmN^zn"3]oz XWjh;aOaԜCPG f:A K\omx˪ ]f S~lWs"EkJӂlKjTC\ Ze*ݩ2 ( ^=SZ?RJ<~Nx8 z^~>wø^^=D퍉^z~8\![1Y^$'~luD$rBivMa$g@ص Z͹sv88T.]Aoce)C>ȗ{:ץO[iD, L-ڊrFf6bi[`v.WLA"XꟿZwaJaIί*k*\Ֆì+~WU@,&)oM-&euz&KYMNZXR`U5bqP;@ :AX!yj_(|Uo5ѺܹH8]-Q1=osӒ*1VX {45=ш'-[a88.m`*/YfڹkU􊤏MZ邽i֫0# HN?<[p Z]"VLcOvC`gVCnpPi1%e2eyp,PHNVE+2̫L٫ ,tmњd5) t-nhVFzC%1* nE',-D HXԌ%B_ mͻwRWܕ'wN}ʫU♚'{1ET6O_&i[E.!I3\eWMnG]7|DvQmÖ*i\7\eD]#9QzTLJgT9%銯jo#csnlSV{db02հ|\ zMf X(C\p͸Y`NI$5_kq߇OR.cIi;-d+J=..5%bQB6+mT*=F}c jBvq}}p|(Ay1^5J{'M,H^iO᎒==* J1֊)gȔ,J+q>7/:yKdwI툳o 9{:ڶ6ͲlUnXtgĢP$jP0D1'37F >`Ѷ?s6#hugj6iZݖG_B-li, "5mx **J|t $K^.s>ԇ#V׋}}p|(Ay1^5Zj2*}u|UM=Q 6"EKaKPcZoHళqC9'J3OPݯt0R! wZ"XvF+e^W!dD]3^k\*HRyA,_}}}p x~ pׇ;螩zVY{Ϻ(NHK`#YvFuqAt@1 nzciEiΠKvDr N`)Sï~ ,8R<~bh\I|rE 7go}51^oQlAjm!ê5#&wc|2ҁ lR>;ފ7twuA^) ~=DWn WauB~7JmnH}1}]٘N@6c18[V}}}p x~ pׇAm"ABY9azQ$_(;`Ob"FTp_(-2&(.7z;ct{G߮ϲ5ҕ& Wy+݈r݃TJt|skJ1)@I&|(Ay 7go pׇ x~װUj6).@TmI˸+|cmY%#c9%7'' j;#˛ӜJze7ij-Nu['Wm`DJsJ{q`‘+G͜K䃒,Q>>oϼ5Q>>oϼ*^?ӥ"[h ?2.eg|+ ޽!ĞoVIgnetgen-6.2.1804/doc/pictures/meshingoptions_4.jpg0000644000175000017500000005521313272137567020411 0ustar kurtkurtJFIFC    $.' ",#(7),01444'9=82<.342C  2!!22222222222222222222222222222222222222222222222222=" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?翚O^E,<(R8q ڤ&7ozp8#ҡ0ֶG vE8OE>ֽYH,uv'3(\gc Ǭ}*< )!Q" vK ٫v#|,??OX¤Parυ'(@G'X,GaI  Q'X,RyB(Qd~rυy> TPYarυ'(@G'X,GaI  o$$h,.FXā1a;QCmOarυzv\]5wEhp=0{U zUݴq>hV0Ȇ>H(IG#}5Z)G'X,Gav45V+=yi$R}:n['Kȵ Z eGr mL9$qrυy> WMVM.YijϖGۍ98:XR -CSK?3R:d L^> y> Q'X,[y{V.:6 SNuC55Tso乙8`xJrg'X,Gaux6Y[Ǭl2Ny*axAԡQ}z%8`'v.O |Խ>y> Q'X,]{+]w_-?IͺKH@T,OS?hmjv'[vq,srF1ϠVWIarυGq7e"VHo!%卺m9-KR[4i=@#F~Ft%(> Q'X,RyB(UG'X,GaI  Q'X,RyB(Qd~rυy> TPYarυ'(@G'X,GaI  RC:y,p?c )E?d?i M5գFsa'ɟ|j/YxtiWrpͲs 36;Z@Ɏ?:M.K6e/)I$H,-B3Dt?yd5/25<.?5Rծg.VHI2ͱ+OZri+lգFsa'ɟSmwS`L2H#9qv&:K;\}ȌAtՃ.HI`WLܵBtRϑ_E<[F[ߊ xGCsqci,go5N5kxpuL+Q{ OB5>+/_O*ð{&xߕ({'!~T_'G=hal0F;WxpuڏaO\o &&$m(峻'IgjZ,:+ui5k1+⩺ԚI.>*ek[XK{4B2F۰;ןhMĘf"fq8B5>+ 8'IU1ɞa/kGU:uԌ^}г@|n#U5cPա<$-X8; Joڠ :q?/?]֏`s֯5yqe\2ZGiM nO U5}JMCQ6cTpykԿ/?]^.WSaG+?/?]^.p/d'WXG8tax#_>W^.p ?QvdWd/_O*B5>+; 3aG+?  ϊ?>~Wk|WQ_U[`L+SQ>PyC^']O8:O*~ɞ5u׳mRQX(V~k|WQ_UO)$"E{O"63>H-ۦb0 05k|WQ_U?G;FoRP{H.u $g ϊ?w!wF0ٳvYm,V~)'sī}G>0xK]:[ _%1#i& { OJWxKhn<ӊ?A sW f ik,1\j'm$Lt??kiڝ2yqBw,a+ɓ"(C+kgIow#,NYO|)CFIi} o?Sӵج..e>T^Rdx$ۇB'@ltJIۯDkkcfwy%Tŕ~8@uoᨭo Yu'"qW2!GadR$-;p 3%z|uk%yHIWHC (UU2劆889y-J  oօn3@ bVٍIh9Q$ml>/?kcYXSHdB;fO$Cn9D~^IP$Xܖ~QH*8l. ȪLr p#N} q-M6$H8yWy,I#rYIb |nnveYbhnaB%)sk%o|ɣ܉5k?5kMj؆KI$1\`@'? Ya@5|U\w7Xk+9AnFɎHv nW$D(~c[nA_{sgym=st{VL鵖5S ؒKC :zoiW[-5i-eeG"$7ncò>+G|lh%3}0j?kԬ"֥U;%!tuč=>u5gu5;Oیyin}t WIlI%!y=EKq*WPIY:}`^Aqu*m;}"i 7"AC3VMԬ'ҽI! Y@˘y?sM:b7҉K*H=G+ӵ.c`ќr\LҶ 1@ i^E^@w)! o%ѐ 11rG?h:Rܤ#G0YX 3e#HM ګ+)rXֿuriUJ[S" "z/si6VM9Ti a9c8ֲ"^\F5s^759좓[ђ#5H$uo/Ô~Gず(_1ߝAo/+G{7K?2dHU 0p H#[hΟCR 4HCKr̉˄V r7?ڵۭ3"aeV$)#`}+GItfw ܶ́o$UqRtA|M$n,"2^(WDC 2`e $pHO?^fO@[ZVr]$0]jF1mp"atmmd'"WuG,QA䘧l̝&%;v|9>t`U PA+RO-cu'JGXOy0qݡ%!ΉR_XM倗(A'Q<0p@:KTwҺ*JH$ר )o=#ĈER41$AVC8?"4똤{1m ;~Z:Rܤ#G0YX fO{X++0 ]'F&v`U)muq.܌hz(-m7Ii(a6Ep9=~=Q@#23U$)xZT3"aV$)#`}*OA7@?Ə=?e[^OO"63DH(3rwu8W[Jb~X!L*;J(Wg6DH*;NHD~'޳I41Mڭ3ܹi@d;c9>nz(|)s.5坪[<*xY[20 w!II23xoH]1aR4kD!WkO'p+>gKCV8l6u"B0c&naHc>hu]zm14ڔQu gH-falCNXD9@N|@;+RTӢWVΕmDƒ c1\vʡ7YMu=I%`Ѭ`-G1ڸ[^öhˋ{y"0P~p#;I!zΡ$e7jrIH q ِSj }KO̶fF`8<\>Ku,RAyU΂ّM N>BIx?AzBoC Z! pʻZy8;\61<t5P&-%0F(=~WSǯֹwPյ:/MHlDпL䉛XmRW^LM:#6D]Bێ<o6Pii5A$jm<&BlJ0#`!tff(L#(-wL,q7*PJmM؞{u ȪaU H*=JSMpE4^=6t衚RBn&`[r2TG&?h+MԼ8fӎ$3G,k#ƎJ:Kp8#Lu_Bs}e[浥<~DHlVw6coR%R8=ciZ:[xfKMu Kn# `OL7ay?xY#ab[g6m0,,pp82]{S֦Nlwf6]$іQG#oG|3 KԒ$W?e0~b7('܎>APEPEPEPEPEPEP?ڕ|s_GA5p\?iZR3ٝǂG/WC7pW=?A,2tQEHŠ((((((* }7O˶NPI8@X14FUaPeeT т`@;G'({xlZL\F< sӃ"~~ƧyI9HԻѝ<*XIRPEPEZQ'9qddJ* {YaM]a`:|ǟO{o IhBzpdO^<>=ꛢedI۬fEWx ʬHRGP VT:o?&in/E0 c=jo_jteY}$Th|r2~DӬ人$[$@ $$mZ2F/- ,0Q}:vm92hrGu9=.Y}nzuQrn,Mde B b|A׵+GKo C6qImda IkiOGR@008t]{S֦Nlwf6]$іQG#(((((( + /kR/&g;ȏ׌_og{_#+Y*e1袊Q@Q@Q@Q@Q@Q@fxNWƭ[,זs[3PN8:(D֧n-3^kW72)F,ǹB u{'HARɺ@[w 2GjI鳸8@ukI-f7d8#mr8dz_bKEXgb b,(Hd@ #C8BfNHk`7Q[x^́0X0sFi1DxU|$.Y?8/tD4r0)-Wz\O^1+\} F$\ _8+ז^5n.YIJH<4 3.׈R'Ӯv9]7- BTJ\068{^]Z%lfIV9Z丒gxH$%ǚ2$JIޟDR"tYt,bOnP&byk@[8jZ66Qi)-K:TZͲ+e0,NBfNHk`7Q[x^́0X0sQ@4^=6t衚RBn&`[r2TG&?jWO7Ozw9}("SO n#}䶚 hb'<|cAV G}IխOnB #G"Q@P# 򳶀;Jjv>q;&;TԜp2OVk"&H;fRr Qӭqv~ Ԭ 6SNm*Th|9KlAu{'HARɺ@[w 2GjI@ukI-f7d8#mr8dP=z6-&.fILQ 9??c\Xo/2y-hXK3JRHj!3Eu_Gi\^Y50-/q@UBchP9(ijմvEkxBBt* '>d20TL=Z9P*G%([ REyƷ]jAltS51%wf9>bkPqBVפ" Rծ7-d] H9L @P{ j߉!ӅeF@O\Ŧi7zT)nmbD,]́ m{JΛN)pW1^״-3m ڥxY&%_푆0FA'V4B9#.Kˍ8 Aij+<ɧCkbhB]Fq[Q@Q@Q@ka40Y'ۥhcK >S FT6F[A즂;[1jMۙL!FYR @m~}s>t6Qy[ }I|lg+l6@Q@Q@9?jW@_}{3p_MiKDfw C] \G/WC7pTc[E# ( ( ( ( ( ( ( ( ( ( ( ( ( (!o."vv?L?o-?bMGJWP|}+QB/B//;_}} GA OGA O\Q;_\.uo-?o-?rchGQpk4k5}chEQB/B//;_2^J$R3EZŭ}gt*ٷ v[mt.|ؓF:qjb)T2`c5**xN8rGLfvfqqu6/'T.f7w9~c@ik5'v@_I v\4HªzZ?Zk>ϴ?q\?ZOHۣ#+C| DQUQ)R/&+ /kJ_&{3Wxf ">^1"_؎(QEQEQEQEQEQEG/\.'-[~lPÒrJWhX(;cGCն,1 3y$5Ļ>8 t:;jj.YVi[}*\mArkt4[Ns)VJ_lXhЮv.1@xZYV=qnH$3A Լ֍eeЦ>lp3y Hbeč*2ܑiZ6䄗|kLя-JwNU#kmt2Jt5%TN]7g{ oXkKf)đu(P"M]70' TV[69 u0@A$0"4ǹ+ni糑'(]y% '1X^2Q"pʬBYT Fm;LTp+K$22ItUy 6}LjBm#(N덮ap̤*i(MoOKM'TXf6XU>0 U%T7U,7/Mݦ>'6( ( Ĩ8,aEkkG[g5VVH8;s9.=HH[KL}mԢXq6KzJtP֍eeЦ>lp3y Hbeč*2ܑϤx5=/m4Qa\aT@%T¶HyPTk}ݬ/lA$7D#(%ITň4[]"=*+8ѬrFhdKheu^jVkv[$q1jr$*dA{cp|q^얞l53mRp^gxBzWEU࢙ ?/ϓߠaXhϓߠϓߠc/>O~>O~6? ^1"ȏ׌_og੗ƶ#*FQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEcp\?i]ڕ|s_GA5/=x+D}bEt3?s C] S/lGET((((((((((((((((((((((((R/&+ /kJ_&{3Wxf ">^1"_؎(QEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQE3p_Mw9?jW@_}֔4Lgq?A,x+D}bEt3?L&5QR0((((((((((((((((((((((((g?J9KsԮ 4? )|h_#+Y+Wxf |Lkb:(aEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEP?ڕ|s_GA5p\?iZR3ٝǂG/WC7pW=?A,2tQEHŠ(((((((((((((((((((((((( + /kR/&g;ȏ׌_og{_#+Y*e1袊Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@9?jW@_}{3p_MiKDfw C] \G/WC7pTc[E# ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( (1sԮ 4? g?J9KҗƉ<">^1"ȏ׌_og੗ƶ#*FQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEcp\?i]ڕ|s_GA5/=x+D}bEt3?s C] S/lGET((((((((((((((((((((((((R/&+ /kJ_&{3Wxf ">^1"_؎(QEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQE3p_Mw9?jW@_}֔4Lgq?A,x+D}bEt3?L&5QR0((((((((((((((((((((((((g?J9KsԮ 4? )|h_#+Y+Wxf |Lkb:(aEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEP?ڕ|s_GA5p\?iZR3ٝǂG/WC7pW=?A,2tQEHŠ(((((((((((((((((((((((( + /kR/&g;ȏ׌_og{_#+Y*e1袊Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@9?jW@_}{3p_MiKDfw C] \G/WC7pTc[E# ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( (1sԮ 4? g?J9KҗƉ<">^1"ȏ׌_og੗ƶ#*FQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEcp\?i]ڕ|s_GA5/=x+D}bEt3?s C] S/lGET((((((((((((((((((((((((R/&+ /kJ_&{3Wxf ">^1"_؎(QEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQE3p_Mw9?jW@_}֔4Lgq?A,x+D}bEt3?L&5QR0((((((((((((((((((((((((g?J9KsԮ 4? )|h_#*spT[XeĒjG/VL&5{$hֿ=i5EHk&GvAO(;ZI{$kbֿ=i4gk_4آ1M?ƷL@}'M#;ZI{$ksTy??0M?Ʒ*hu4* gy&gD`c) `~O6zwzyn4 3J"1Dܫp9;[a_UHtI51d#"ۇ0zEXn >lcn]q~eqQX^NI-/Vz,Oczo,[-om,%Hnc0ДH6rcQ|*vq+QDd?(b((((((((( \H?/:j藚EiHۿbn`8={qU#NrjSaGMf9J 1BJ2ǃL[Aryۙ# Eq˓q&? 0_6j5ZC4Y3[¤,BPqm%;m:bّ-3*`9$++0= qsogks5lpTvn5˫ 2yv nϒ<d8x_nH׏v fI'-9\+&NDAMc?2h@X'lQEQEQEQEW|s_GA5_MiKD;ȏ׌_#N.M6tk!9vC ݷgMo m*)7t%4W%o-/c>h@KoG/[[ =zFӋ|M>zFiYFST`P.^f@n en[]miSZz6XQNkNSG}[lyw4[lyw5nǖF&BL>yq9"NC2qj-GdѐS&% &11ƕo[խ Ab]z84 z$kݭh{jTJ5/}ǖSKN-6<;sN-6<;*Tﶰtwyh߾W{{^qoAh9$՞N&.a"LU37+nco|IjWMRsMoEѧNeܐݬ|t}#K+#+JKN {\߲K7T(nͽzzi|y1^jiH𺵘|N-6<;sN-6<;h] (k||DHmW122zFӋ|M>zFh@h[ࣖkBPnWc^% 6ޥ*51GlkZü.kRj\p4g!v=Vf.4ռWjoOе΋6JvQj޹m$ѼӋ|M>zFӋ|M>zFme y S0$NmCiTA#%!I Z,&Z2ഉִ._}NFN-6<;sN-6<;*2zod٭KoNL?뻥rƶEhظYulvAC=G}[lyw52lTu]D@Kw-YZd*ПE-kFzn^on.:! @15Mj:hҩѺeȔiӯV_sfZlm۳j:mtm1q%7aThGek&Uܷz֔.bε짿wM:nztk^>gqoAhMFs*CDN+\ֹ^@ o߼d]븵{_սkT'E,_".NG,+qCiJċVr oe@>VU0}6"&[8i8k7ig|$oŸ߂d}۵q^n;"q*6n^0:lo5i/QWrBGv,).twwt_u:ֶ)pp[~Di,P6;8ۮG{]ew7GqoAhӚqoAh $3\h%rL Z;h݌Qx\KNt 4kT/C$Ӹ]])mar;m4cϞѧ4cϞѬ3Q15;+Vn)֙ 'yEZjѲޛ[۫˹N*,tD@$xH*2B d}k3Z#N4ntnr%tէe\٧V5{vڎk#>wyh y}aImyZ扥%w-޽5 XF)gN5[{^;t׷O[lyw5gDQ) }x}\劐Ǘ5jא?mB*xz5g;-rƵjonf4.]$ra{;Y|FBv< ߶:B^kt\ډejE,֧}6"&؊UӋ|M>zFӋ|M>zF ;#>wyhiž&ǟ=}Niž&ǟ=}X4 f4xҭQz(7 TCoR{][a J5F@@h[ࣖkBPnWc^% 6ޥ*51GlkZü.kRj}guѼӋ|M>zF'^]uz7:4.'vޮޮͫu6jճ +Vޭ* "\Eh$q2\y:,y:hfz.ZNӳn}{\o-ʁCۛ{3ZN9;-N܁6w-'֬[.i]kOr:4cϞѬk857,L{30).y}Q9+{w' vsyV)43*u^Z 7.5^Wv 5KmZm)@4q|Q0Y2<W^%1' (ϋih3Uܶ\Ug /ym&""Riž&ǟ=}Niž&ǟ=}_>qK;8A'k|^$ݭbvQv^'adxHӛGe3+wkwPлJ-ԕsօRډb=WR*מnE6Y][lyw4[lyw5T}{\o-{8kc('دh0&GnMuݛjGgGSoQ{򺫞NM;Ǒ H9 -; [HwBU]::tQgMiٳe:lٲt^1>_}r;i1R}(ҔZB^ڐb{ Q3SKiqdKP(Fy)h+&"{oMz6 ƹwz5"U9G8!MAgex͂yT1-/fȬuo4"5r B\u1 Lb q;{,rD0!Oڈ.G6|M*O1l+/F"m1 ]P' 7W))\ݭ.ߥ4-r cP23@2ڻ$) ȫ:8NZWaCKSDڸV-*f'MqOď7?qIG1 iAdlIy3]X] LV*yi2?:Wa%Jql$D,zbaCJ41 cj= 1km4h(- Lђ"19Sf=㐃^Aַ4,R!4ณ &)`vݝfNQRdlG伱:h!&6c2ٱW!H-k$fd7C寖~$v2J<Ƙxe;J $CbKɝE-2jd<ұU I6LA>RBGc$ߥ1<%Y$zD:LNϖt8c.NC WYW,mwLⰋ:2n}Q@nUC##aCcbBLm#"-(FFP'jccjN"V֖ԩ7 L4SٷoNv ?TX}/'߄]7>l`~K*v@n'p(b)B~IofYc/)kQ3HQt}3 ;o^vKrpL|e s]7WF@EzV\"@״Y]\-شvqCy%ȻM-nmoA0k)5 RmokFֻm#5 m^҃Z~Xֶ*M8K&)ʓdNΖҝ+qb+>wC)/ƂDZ!hJV "zhN+AD ǖ"cLG-sM͂٧"7%a!|C8IR")j$#ἀ uьQ ĸ#u>H,Mф ׇ4#qGtpz~-!^JYQ{ѡRB%\O \,z73Gt8XiPέ*w+L; mҥCr>u&cεv9]Dyֺ+۩'w7t'bj%&Io~rOyTF=% 2{HÔZOŲcA}ń-fe*SSuHMpͭ J61Z"eyo:/X@]En Wݨ@ch`j7`{Irnѡ}% lT:>>_Dޑ%gBG{Zfㆽ=98:/rI)Y$bݬ~GHB(cU HZYJBBQ͘3;I"9>;>;VM":3+C"v1"e-'@DV=y,$w(Ds ~ŭ :ب.Ӊ^lN0dxkEŤWk@e"fLdSx3T,h|1Nlٮ͑ V׸In#EmEτ+Ŭc<_m7K;תr+c%+Vybɹx>(K&,seV6Zdŕ|l:gв k 5"Im:D=RH8&K#8h`(k?I:DnJܝ^Hi" sр ¹ !RgEo>-jmfkX.PSֆ W$ }v1OCΠpv;kF!$l̺5ȱ^,DjFmu-4Z3Xޤb#7z8пFw-/.5nv_G[uk_n@ӓDp軱S0ākY2/nԲ}=֥Q@U9K>C`CJ$X'b:E}7 n8"G?rwѵK#fFgr҉?~1[7k,4y8.% re E9 {5虞d,]JXHtⷘK5G`7X^EvAm͜nusQ41Ryܡ(lCGX7-P(n,|rXO -.(gqkِ%jh8!&؆>B1ƑH}QI{sxUoG !FۚYKO' 63.qN'`iFѸǷE{/ٻj<;Qe+_RYJgΘl|B8##:ciZE(:D̚3山BT6.9 _梻q92WZϋ?qʿbMdȊ0 0dϼBRґ}>$J).ɓY{OK_T|g9Vfk߼.ff%@s(K [0 \("pIm^K/hۑ*J3Ǹg#;2}Z JmceЗoyЫۛ($1Ƞ,pΎq5o{CJQ(P[nya)JEnxoՒH_!NCK% 4)@.gFZ7Me bWW;F vpymQ̓MSpGJуsr6pKLN)y|/+!m)(hz؛|e\usFΠVЁr#f^i0yhͻA4Oɽeבs ő щ ,rE":l|^t_ѝgM+ޖpz^n6]{Q_X]Hڈ-VRDWŝ352*eYIټm_ +zA1Y]s/;!{FI_ˆZQZ+R+1ʳ0^mT%嬬7Q0'-LE3: Sr,Ihw\%3\ϥjaq"`0Ɠ;+0+Jn 4v;;skJdvxFD}=N-]bޝ@@Zڄw{} u5o s/niWdv9G}"u~Hi,ah29)kZ2&Rْy.EcٗGrG0\Z \m8؏G$7!ݚAMsF;@-Q('W)dydg :Lmqp2'Zh ؉[Kډ+Ŭc<_m7K;תr+c%+Vybɹx>( 1OCΠpv;kF!$l̺5ȱ^,DjFmu-4Zv+)EbW]mSrBT=Ġ0u݇ay"_"+~# )) rO8<%.UIzLlޜ ,45"vkhctޒӓ( -i\q1"ֆ$mV@7Q䥯L3g35|Dz,/Ug/l"^_ _)BQ(|(F#,`h ' 3mpYLx[LdM5)Ti~|=xDOJ'h4LӐQ/H pD6SH*x]09s+"a q=,8IO&(.]}DZ0 YD,q@[.ɮr.v٢ӲMӸx@_qGmӺxӍ9v>(';ۍ?=~~1_<aS?<+x_)ޯk̬xY~YK}[2ee,t_+ɐ:R$]лbx`;q`l"Ywsx9f#Ί6ZHexzbwft(yD3`}_d#|Nuz_y6nb2z4JZcGCj.2V$~lF@ċGl*BHԄG!Jޛm2.sodi >I\<k$+Σ4oYd&XIv.r^;ىݝB-4C8ԶᶑPWockz)SDj>;('/=xV\}e1c'2HKA[;"4$zP"ajMԸ+v3mL,3mL,՜9U~Oy^ǝAXr"~{$d1p p;/U2wjXkPW6z)3-ml#,(띇H^o٭ɕ&$ 7!P#@X ,Dt ?=iVK;z5ΚW=-}jl8+w1+\A+5Dt.0 w+Ĝu:-uW`: Zа EiXwmXwmʦD-QNAw҄M{;xX.֤+ ũbkD" IMe2:1T'j53:#B7XZcG`7YJX:b".B@4Vu[";Bmom̧ξLC6[&EғI=;OT+ސb(/ت=RRRW"3ͅQLPwS3[f湯[NţVe֚՛Hm=cwStEo)U•)F#Hso?~G}U7D[ߢU\)JF#Hso?~G}U7D[ߢU\)JF#Hso?~G}U7D[ߢU\)JF#Hso?~G}U7D[ߢU\)JF#HsnhYtc?5kVnn}ڷgYu^u"7~JR0 aC|߱R;ꩺ"7~JR0 aC|߱R;ꩺ"7~JR0 aC|߱R;ꩺ"7~JR0 aC|߱R;ꩺ"7~JR0 aC|߱R;ՎN  _ ,F"RZE6YPR{5PEz^wFwmգ^Zumٷ)FR0!wRF4 @PaGv/a}-lM eݶ6#e;{vObޝvWE#R#H)F"7~nE#R#H)F"7~nE#R#H)F"7~nE#R#H)F"7~ucEH;-B=TVMVT%TvT'Qg^WѮzhקV[vmiJF#H]ԑ/A5#XQ݋n$dj[B}zvmgmm YDݺطnݕ-~H类# F9E#-~H类# F9E#-~H类# F9E#-~H类# F9h[Y[oGab58nf{7G z׸;jz)oۯktEo)U”a4=cwStEo)U”aAH4=cwStEo)U”aAH4=cwUo˧(3$uu.IP2#E!jJX-gxFr];ݞ۲PqmqGn6^se?X5&"d]> 1"[JR}Uԅ|7%G R R R R R RT* [L.i%<{ܘP=lA9d_| 6/4|O#\*it$?^ʜ-JGGԫE3tN51ELc$#Bwo 8@uyx6JdM|]Xј )$HJ42DDںg7wnŜ9~Ŏ2̳xpa~8~8elxxleC.kZ{$IAwP˓Xݎ|9 'wW8^6cߛ~2ڷfkFIEٱ CSlO'd cl."Qa&A`8-l ii6k=lԜARpTWA ĩm (@uBm F؆tβ 12ֶ8ѮD܏ݖ5r% .. JفACd&FYGBRVVM6ƌ#c3k  2FYM"'hRb ,Xe=45R9AHE4dW #:'X1_|#k%0u۴/ԬzˈM&|A'3ɱ,axl{tⰄ\e]7q#7mXۖAE3,ʓRj4D0c,elmF:ek96ͫI#GagV5 6W@ĩXnD2$I4V6Ɔ#qxޤHdGg=Mc$Z]U6 ڀyf})R ,4!(' f@Zr,c$52GLrF9 r<2Ёr^ J")P4M F\)JIo$D`wޙܔUm}ͫ.ҝz[{2ll0^GO _8,0 /棫ac ;H0\H؛v*HhA]ޣy8A}oSO^]'$Bt 73Z[;wipMy><8G>8G>RI!4j(4B2DOD@2XH]}$/1lBҍPbђ$C%hBc1#YY%[jg^ l18l/\pgy0JjkH8p ďC}}8p ďC}}QwQ`911dr<8He׀ <LJonv質PH\8G>8G>PH\8G>8G>PH\8G>8G>PH\8G>8G>PH\8G>8G>Ցre_:~z/Ye֮iٮW4'բ廚5lף^tӷf;v۳m~"W0CjO#b@iG_q]ŊS5;+tpPMƦ%K{M8-ok]M֕.OKẓ'FOeƙG"U)JP)JP*?fQ#VҪ^se?X5&<nm)JUT|7%G!G /I~Qr -BτΉ3 șShJ³T#mNE1!²gkaev|uPb7 ec䒆|f' (-Ƣc]ݿU]cFirLj"c2B@Xfl*¹2ϡ|?iqs a,$0-PIY8lɋ*_'blp%"`0j:F-ǾAgSV9FJs-Nx1'8\D07ICNX1c F<M|xif9I Vpm!|V%>5/W /q-5њ(ALX¢fW I\~רQN҃%a`{_ND0lhMjQ"ia#!ey86e¿J$Uṙ3|8u bˬ $Rfc R?$i`F2~Տ@r5_dll4y@dP0 O,nյ15TJ T#X{-88d̡hX%3K3$H X-o|":FccݮZPГ ka<GdfqG<\\D()gkHYb(']No!)1+dNbk<1MY2JqSOl}6ͷ&l|J[,g9j]c,vB 㱑jQlYY~"-Nʄ X>A髎3P(Mǃ3JM"Ó5Q׉M s@/-`Nvk-{a#n(>8c#;NF+vr!hFpQ`Pm`Dm)eLz4?Au$'b@9+$#w7=U 66>G"1#H'YBKQ*)֜Ƴ3cK䱨{QƸxEB63 *Gk H&%}[;nJPbLl%d~7L7_}fBb&K-0YI&M0N6qu`ЅGmbvFp8xCcv ՄѰ`\ 1px|3*OPqM*a' xj #ݪ8a8Sf07zDNJ$F$2ŐWba1i=Xj'c$Y\qxK>!P d}6 QXA7ziN5s:67(Bqt2/?1NcMߟ|Q&EN⏡2/cXJ12#4N 2|)0CW5&6l8}3/OPԣ'FRLm] NO}mhr9cg18\K v6Ɉ$&\txdG.zd69*{'*t's⏡2/wş} ~ұkcBfo+$ ~g8K`V2mSSchؕP|)h\ 5:X(m&5lc 0_C'a!!°3 \\ji`H{ Cq>6ŖwW}8YƉ}>⏡2/wş} ~ұkcr&Ut5WGSD."叽 /=tߋEu4K6[x?G"B0m =kenȉq+"zMq wX[hsxp֑7'ů\#⏡2/wş} ~ұkcҕRϊ>ȿtiߟ|Q&EJ1cX[JUKϋ>("ѧ~|YGЙ+ưV1am)U/>,LFgBd_4cX5T⏡2/wş} ~ұkcyR !vQ1],LFgy)={yɜGO([JL JBw3 n4n;uoa z ~Wk꺫^]vӺ55R)J)JT?"~DjUKẓ'F;MӺx-)Jb(/ت=RRRRRRRRROgm aLS'u]K`,V!B72Љ!M}ur+\V.T-όjaI" 幼3ֆ8'LaP.)}'ƗbPWV0%U}޼īcfW2-Fq4Wm4ͨaWDŘַf(R (vN5ˁbTIXZdLa*"]u\81|O<( p Jy=/Ĭc%ҝR&os'&OyD%A⒄}bYBbYe ՎL/3ʬ|@YC 1Iuə$-6rMcN.O1EiL@l.}[8.NM$kQa|M 8M"ItnI_:!ԓ[t>c>tq)Q+cPFVB5lQAIŘd W3#T5ݟ>;_c#"mT?]jt ԐzBL6$;Y ZD.P)$5$i NBd KߘZmԽ饍:GiohA]ޣy8A}oSO^]'$Bt 73Z[;wipMy>/ȱ`HYV1JSΠI,mqZo+E#mtoctJ=Hsr|@驅\#_N#_T^G|% cw11f+7wov/;\z16v6;kSjEi\ϳQ8G>jR/ac&|N#(jfBf;j5:71:6;,Ke"dmaup ďC}}8p ďC}}y"-Z`u^zCW\ӳ]hOEw4jٯFvקnZvٷf8D`+$GĀ$)T jvVB M/.JjwEhpZaBw\[*\񪗜GO([J4=y'2^E)JRRUKẓ'FT?"~DjMӺx$;R >ozK*jB^)J)J)J)J)J)J)J)JgVIi6eABY<Ŝ۲k K L.G''Q)cgv5,Ry+* i1 ,7\pGdc`sn7MxL),St8|8tVgێsYkQl* ("c Z["Qc"1]8-r]B~A$#Hцb-يQ;XS Ā~ł|fe )J['^ x.da%9-L+d1Hehq٘P9 ͤ3-{00S轚 |i-"u^ߜ bu!&LlQ| .Okk)+ YmR:BY$Hˤ@&{b9PF6a.: |NL@8^|^.Op,g'Z+GM-Gok~Aq6[:t FAI+%8H``| S(NjY|#"aOQ!;$ o6$Ф0|ZJpczQAI6OPt pz9ޭaiEAdvwq`;L.ͺ&3g4uV=][.N>ރЈ5xYY&=r͊hD@Lmq&(c~փ ;`ȷ ݭ7i{qƱ /$T3R,W1A}  -k]^znmkV7/OڤJ&jb/h;V:B&2:K)X33l!g l:`ϠAMyJpgU95#@8vߜGLHp7XCC$6V%3*qaЎ⏡2/wş} ~ԬcV1a%L#Gb,K\H\8 6i^Wij#N^GD#f#1[--plސs.Be8Z33ȥ;ѩ#Um4b 7uޡq#(d'e[Jp^;dFhue̘N>dm,Bq7d0Y7F0v) Hr6BW d><ȽQd#G18q8|y9a| M;Вq xV\#L4k~|YGЙ;ϊ>ȿtiX5k+Mw{.lI1S&R hzģcgh:K/qV:A'F3k\W3 ̧֌lj)5'~|YGЙ;ϊ>ȿtiX5k Ql{FK%1̳t9f.p"^(KLFנFgy!2㤘cľ '9s!͆aP55Y9S;.L|/)W3icb+O,-H2x.&8\ ܽgBd_4ϋ>("ѥc 13k^:!8Ǟ);zECLn?opy2n.Ae-!922"A3(e?D-IJe.lqnG?)sIXqxSş} ~ӿ>,LFcX+ư7jb3yx:ٷ'CdĘ;=>B';@D'("ѩ={yOfw^rg?fQ#Vҳ+r#РL۱N4v[u}:ח]zMfizMfiz*JRJRU/92ȟQR޳(7Nt iJR(/ت= >ozK*h((((((((Be 2oݜ pȞ/n=}+Hlm<ǃO$rp-ꅉ|/kckޏݹuⅹ7ZZ{7ppJfHl]eF'.-wBO/7D{;$BBDK+1+j+Isz[IShDE cx!"@EXF$PaxXVutc 8;'Vdn]rfI!b M|-ӼGDZg3G S`bSI$`x_6Clh]Wjc5$ϝ-m vJ쀥}h/QUbPFMcp9pkpRqf2( @o!wgHțzZp75$/) NVB2֭de+ T I ICCGrP=1Aw5/~$zicjN[ZoWfƾN(u_[6Wo/4y~|XRj:H^H ;k'~]:.hէʷV^继V;vm?,WG* _̌XĄ; aaBB#[++ZENNJ n@BŊ,r8G>8G>kL쁂F./DH|XMXKoML)GiK$/0I1<~L- QCv&͊858@BC)8 JcdrJ7Gsr`dM R8^q cÀ^$zÀ^$z0>̑LsL6Ep,;NKޤ@Pͅn qCBiP"quv㍋XܝԡFA$VkҸQ+3}$[cĆ,LxXe# Ƈ)po 40ćZ,52㰔wun7EPy` 1e*]p {ĩXnD2$I4V6Ɔ#qxޤHdGg=Mc$Z]U6 ڀyf}sxp ďC}}8p ďC}}Vsmq 1Ehc⑗"AF muX<5#Fw%-7[_aj˩^ތe⹞y8\qS1. WZfN/2g2ܕ48Om cÀ^$zÀ^$zꋌl2uf&ij60^:go*K Z8(XJƨNe:)"o2o/Ca% k$fgb6gDlf\t/-[r.U(t À^$zÀ^$zncgvAtc([VJ1GmÊeRop taO% 6ˬEz\ozK*jB^)J)J)J)J)J)J)J)JP\{mrLB,"RiEK fhB >;p4iK1(6rP=ߪPcuIBqlޤ`7%GMc`g'5x͖K;;(>ٌc8Z9 V5 廑pHS'H6UE͇abic^L!eKp72<|#҄[eiV8+Z["Qc"1]8-r]B~A$#Hцb-يQ;XS Ā~ł|fe )J['^ x.da%9-L+d1Hehq٘P9 ͤ3-{00S轚 |i-"u^ߜ bu!&LlQ| .Okk)+ YmR:BY$Hˤ@&{b9PF6a.: |NL@8^|^.Op,g'Z+GM-Gok~Aq6[:t FAI+%8H``| S(NjY|#"aOQ!;$ o6$Ф0|ZJpczQAI6OPt pz9ޭaiEAdvwq`;L.ͺ&3g4uV=][.N>ރЈ5xYY&C2!Tw=<+R#я~n=>g}oFٛ?,UR8YJh^l^ j4zkS˲{T6 ivA{Xܽ>j*PՈhV"M$uwq"̎Ȳ8 Y]f9J@2<(o~@iPmXi x"gڨjMΝe9gN86_!+hD7 1|=i7ȰASHm ,'ߟ|Q&E^ O(0M&8o G]R#3k fqV"1ĝא|tyrqcXJ1*T&r,c1,tbex[!=A1GJ%ѧHщ, \r"֙==v؊5"4WFߘ=HMJ;(ޏl>ǔrpk%hG~|YGЙ;ϊ>ȿtiX5k r:p׎S|A xQySu#dqq}N H M7BX. 0!Mzߟ|Q&EN⏡2/V1`c³t} ܙthWwo̜w1{4w`_F00K+\/fa1p԰b8WmSd#|kc3X lD(`ZDo.W C,`Iӕcj)3Y4X۔dhXdq>,LFgBd_4cX5JɈ0oHvS7r.H= #LxuVwş} ~ӿ>,LFcX+ưibl+#,k'pV0RCؕXo3̘y6*,LFgBd_4cX5T⏡2/wş} ~ұkcyR !vQ1],LFgy)={yɜGO([JL JBw3 n4n;uoa z ~Wk꺫^]vӺ55R)J)JT?"~DjUKẓ'F;MӺx-)Jb(/ت=RRRRRRR>MSl5@Y)qd.9Kl627j(VC:>:d3=ɯn@:v뒵 ҥYF+.]Hy ؋&h6i&`C.5f`-2 PdлԪ' 94F"c QħVT QZ<6WuW Gl:OHmXTMІ'c U 틯0Թ幎@:xyA藏cgdUP.*Vb~]"%<޺ &:}TLԊ&aE![O _FAo<~Cz423 T@ &;I}f&R| K{~ D\PU1 k- sPZjT mX"0ԏp/i\ RI6b" .`kw%lݥ55ќ# HG8*6$n+~V*/ ϯ 8 ַ|?"V\^O&T mX"0ԏp/i\ RI6b" .`kw%lݥ55ќ# HG8*6$n+~V*/ ϯ 8 ַ|?"V\^O&T yXَ$# @C욜 W3 5>H6E_۟.1hC@ztג k9$FppTm+I&VT_A_q!:Ìn~D&@M@&3Da _7FҸmoED9'\8JۻKkJd$bH|JB쁕CRF&OyPeK߉XړtqFzքٱ7$W=MoU:_z}+gV"Z*NR5)N jzߗmNz5iգWիNݛvaƱ /$fDʜ1Lc8̼#8{`*PmÛun=fܯvvKd8p ďC}}8p ďC}}V'%NHb2b3"˷PCO$5>>FNLR̀h1$%=izmC]#<$Sp^f]fi NsDi4> 1b6&0~]2bnWCH8p ďC}}8p ďC}}Tl6d|#@*Jb*H0qt[Q+xn-(?% M, :ŖKb,[.[dڒ6:B8IBgG~ L(NAXܵ(ԕph'x{ϯx{ϯx{ϯx{ϯx{ϯx{ϯx{ϯx{ϯx{ϯx{ϯx{ϯx{ϯx{ϯx{ϯ5d\EW߱~ދoYhpjvkv hn[5ףn:٫Nݻ6_LerE*cAb@(SaR^b; [(WnkuK5R޳(iSƙG$Qȥ)UJR R yY~DbմGO(IwOt[JRU!G /I~QHQ_T{@)@)@)@)@)@)AY'駌ŕ fGsn˩5/O&3#XxG|ٜ Q7bpVÞa$1fEjW\cu$ai<9GVZc#Pgn0baD%&҃`BNW$ҹބ t4I94)g%,b2 P0ͬ,mNۑѸŎ@|*pG0Pd[ J] ,I,ŢOl04ufE35ڙ>I#`PR"}x>S|fqOGvG\nRŎA&Խ]GhV@ q$d,Y͐IMVW8CX́LE:q*۳s_`(4~דR7I|\}|x^o(>grђ/ILs,]"cq8%m2HL&7/\lsaT MpVNTNi͍$^SMSG r lmFo) $&x?cĉ*ɖUbT`ru!B9o)AyfLx)Ʀ9 YQg6#M7Cr퍣qM?%$DGx%Y2ʬQjCnN hCy2kL6$Ф0|ZJpczQAI6OPt pz9ޭaiEAdvJt"?c_IgHXhhiyn/eȠJBbGxy:GǧEi[ZZ[R^JthQzݽWGc5U#Ŕv(LP@jG;l+Ck@dZՍ궩 ڻXb/)􏏒JX<6죘("ѩX5c0!ݪ+o=t3{.gU12^`h+r!QqXs/G("ѧ~|YGЙ+ưV1am)U/>,LFgBd_4cX5T⏡2/wş} ~ұkcҕRϊ>ȿtiߟ|Q&EJ1cX[JUKϋ>("ѧ~|YGЙ+ưV1am)U/>,LFgBd_4cX5T⏡2/wş} ~ұkcyR !vQ1],LFgy)={yɜGO([JL JBw3 n4n;uoa z ~Wk꺫^]vӺ55R)J)JT?"~DjUKẓ'F;MӺx-)Jb(/ت=RRRRRRRRRf03@;{PL/Hz){cKBj/Y(ϗXj:,8 k_Qݛ(r^m]2sGo^>VZu}:jٳn7Y5|ss?[k?׾;~oc毁uNz>k. uhۊ׾O˝=[uuMc6OKt}_ٟkbܭXjWdځsS;;R4mMmʮommoGnD(e*4ilN=v,[kF;>pN*玕]of]m*|64Iܔ?TA|gN4#/V#X7ؒ3^G `+itpϬf)9@*.!š6 NvMشC0 ,ܺbn\2B4@O8 ly*(տd7A;' Dw^6&SiXO}%̭x&@뎒1RODV8/$&9=]<׌ƴR;r*ҘFqOg0&B+6L1xw S&[AO#1h(#7;#UazR>JOԬ ~*ncot:>ӺLˌ+jZ>~J\e{:3@,!IƻC?fd1eȷhM]LZl4m6/ְ XkC4 %(L, P]dzOd6GS nm< KA6ĤF:E/ ˒I}H$ i|8Zl4:u9Rˑa(=Zz%H唓r|!l _)XEВq6H7bY<Bd,%)Ea cbHccѾsMx˜LkE cY Ll1/r)hgty.@?dDLȲ9IiaQ<, ܞ'蠡 CGYTlozK*h((((((((#ݒCt_6=MlPMޖk7ڂnRSZ%Hn5pd"RbhR)q[n\I޿":zuh{ӷnͱu+6~~_|wO>7go˟1W6?(>:;=o]7A;Di5ێ#\qU Nԗ-+.T1_{0bLAƈІHJQ'a  O`$s$"ű ̤LG#p's5]\Ȁ0Mbb{BIjf lsx}J:!/6;r=!gL&mnHe~#"\XfdMZ1ܒ[>.|HқaJ )TJܓjTʿI#xˎWZ93Jt# 򋰽]SV] &Iɾ|xԍXA =~mnO7 N%ݯIG7F2c0IBqf@WքzqY.icp$"ӓR\'j؊tlOW;,@9sS4MRN79HPY(0Ēr!&y#326) X?¨C(80u# eM $Hǒ B!֙fqO٘ӮqԠ8눱2p;p,"&lm<ڽ4=󜣍 .]q W뙳#LIo01XCaI ^nxRt k5, 62|/6 Vv)AO`[@À0)Zp>Ź"A гDM""MlH3{/Z^Y$Zu֭iӥ7qZrQ(KR%őtDTk'ىۗ AHak\L Œ+pR6񱐭t&'#*t8눱2p;p,"&lm<ڽ4=󜣍 .]q WG7F2c0IBqf@WքzqY.icp$"ӓR\'j؊tlOWaF+`Of IH8X4J$7$?AĎd$X4"yIanf sb6ߠmSyf2C ECL&ho# K#%y$ b1*(H+J)J)J)J)J)J)J)J)JT?"~DjUKẓ'F;MӺx-)Jb(/ت=RRRRRRRR)Ɯ=ON굻1A:klR(pkL豩jM״r@Z*6viPv[.Һ9Sy}#i3aTPC/9r||rףjj6%V,۷fŻ)BvZңjjFTYcBw y♙ڋ1ȑlvl I{~%JO0:`i ◴Q̡Qxx2-X/o%577m$Nѻ׳vm?˭mr+5I*&9oY V-$aN,ߎKAkVRJ^cގR+Xah"fkd9âXĦ~ 0g1<甘p7j0q^<e+2D J02=GoH-3na˜<1z2G&#^FC1"I0bY"X(̧Qȁ\61ae;[++Cc>3]K4D/!NU-Z3r{%^U;OgKLS 9);Gcm,̣3=dI i̵ MӶ9ts?JEsxjtB1r4y+>lMg(+,=?qellj,-A<$|,"c)$R} `:ackb6R*$猧I(02n H..[#G2D2$ Ɇn#L F,*y4H I d).'ag&'Ģ저`$")Cb@aenHYB-/bMA͛g-q̽6JcD5-e3,r \(\б ~*ncot:>ӺLˌ+jZ>~J\e{:3@,!IƻC?LC2~2ON8y |d`$1<|bͯJC:]zˋVY}S lO<M9+.+I1DZ}G,dY S#l!9ȗYw =-EJMϢlMUa}=le25 l J /!4IpGH $ >"*2em:idŔsof> M-ַQy'wĻhHEbh5'(5tqX)aALfh"ɲV/L`3g-JCOעf&ǻ}~ޝ]bcn+J 򋰽]SV] &Iɾ|xԍXA =~mnO7 N%ݯH"dBT >q g+7b\eS{WGk^_cTJ{I"o͉C ͯ qwI4y@2fa/91{FX 7QD&./e׈02E1r?!pct|)GE\S)團'+E1K3ZX(g>E(`,uƚ bA%|lVT1,2'uSs|O3sf~8GyzwrDHʆ=.O$# C:aI6µϧQ"a9%Rllo$u^5%ɞ$ݼy8pZL$RC1BIڶx!^EQFro_*qB ^ȕfY,z@!w0(p7#:9 8 mӱx0xV !JaE짒 Q,ȽA?0ޘKnafmj9jc950COle.#q)#1|P @%r I!G)j .r3?Pc+bRRRRRRRRUKẓ'FT?"~DjMӺx$;R >ozK*jB^)J)J)J)J)J)J)J)J)J)R;AѮe\:UG\=ܔ[gWfy^VsV:YJ |O~6^>ijgm( +asھ~M-վgF-,D*22ߏ"`2Ɏ20ٸLxl@x'XF|q2KwrcSi[Ervb :pQǷ\Tc8pGIKh^/aD\f^RB<)v21Fzԋ Mb 24 BZX4/ ?NUK@؇64l)ÜeK S,KgZTHB#k6/&İ>9HvgXh"diA M^*1[|)0fj:I!XÌ5A Ѧ^12ica/S]# HW^{#n!NmΚ#i!r ^w%,*jIHcw-r"'$8dnE͑,PKHs qdH l`^>>?ETȧ B<ʣgvI݊V=n]fѢLYqo Ǒl/c@rFZcIdۡX:fN!((((((((((R޳(iU/92ȟQt 7Nඔ*B^ڐbJRJRJRJRJRJRJRJRJը@rKR`]tk'E:.hӫɹV^繫N;vKӌ/Ev<5}g[T7V7]cB;:n _MwٻkV7)LBސ  l&rdT]#ر&ӠCU't{'YiE OC/sۙ\r 7ljwGy/iFZ~БE]z[]ӧ^S3]<ƀ8:8,prrpYr+yRŊ]PEۗw^[s L~zT,neD3ˢɗp$zVАjretVƭѕ-dͯ +7$ 5[UkOE(+oN}ogFۻhW;_dgU/yf]XgGg;b"Ʌ.䍆v4N.<rmȤSz "XshGxRGr Ex4Q:1!IT&^E210NZ71AYljB9yeix!a,/bHke#d|)Igv01}NRGO #Lƙall=GKGC7{)1o*uq{:[|e& r3PHzeD1<@+(\bR߱{`|zqE-:D  $)O񉌨"$eQ(lths(NIbgi$b0Eم6g 豣#ۣ;9X҈Im¬Ø{k㻑a,ykyk(q^+YϗRN2q;pGWH]!l=ypȯsu|(f=C``D}zb9Ϊ9@w2 ȲK)$71G߸S㻄 4/:6ڟX?lVvR5A3-)FAQ: iPO<^@np'b"w.jG N,缏e[6$p'xo#];^y #x_;+.lNXΆAeP}O9HHGS<ے WO&$ L%DhFDvLBzs9L$B3Jb3yS b0!eP!#j乜95R0T!#|t}t8V&H}! "tg!8Y>C " wled0e:1pI3*c?$xś^cĆ,.t&->>1qg]3V67$2y|8s^W-]\VcV2 c86X!IJ.@FDCFr?.,3q|&,{[0r B!HIDؚ*z-M Lej3ŴN|_&Bh&I}I17,EfTdˬ&u ɋ)X,|[enLsnOH)v$%(і!kf-LaheÉ_r5KPc'Ϙȱn`L\^5˯`db~BU Sz6 ' 並S90NVJcݤfQ4Q`|PX ==4ŏK唭9#;bXdN v g/YXp3$' {Z]ڞHG3t“mO9;kO:DrJ% I\ƼkKB,a Q(nFu{rp@饧caB‹O%E *U"Yy{2 #a1am;,6<'12(s7p/b"r.j` ]yFRG b јK B>S;d$2/"@\f~WF!4¥)@)@)@)@)@)@)@)@GO([JyY~DbԛtIwO)UR}Uԅ|7%G R R R R R R R R T꽐F@tkW%NUf9Ow%YsGv{WճNc0x;Se16xjFҍ r;Tؿ[[H[tjQrۋRN)-&R)X20:Ȉp CqMxxnGx~ v+;'y&k |Xw+HE̸e  M,s՗"HTifRQFS˲J8&C-1Q dwڱ5˹ǂ! -GMJEVqBlȖsڮR6\w@P;ҳ;82drK>hYrD}I*sm{r۲; >*HkcLG'm(6Mpt}o2,ZKh6ad[TZIw$"ܱf+))F2#Ŗձj81ygr'$zS52¥c>^me)Y$,^$_xdT9DpESx`/ymGX㈼%PjyǼ_¨.3C`*ߓtì,)4@&N6"/c%N;8焬{'3[F1JDZͬsLYwGV9y6jgN^#0k?, a.䔅o?*+\OGYQjl= b}g,aPJA"ȱ2k=$7@BCh)T(5L",=v2x&y^H2H (!P􎌯<^ܽ2쨳qN=JcR%g]?1:tKe\,6}a_6F#z93qic1kK͹-0*keqpXbl^B@TOƄc6aeAAcab&/), դn cJZfhBi[$֚V/smm,-3# %ќCh L=ːe#HP;'9&,\2F.F`ԯ%gԍ\e?Gn ̹>-bx75ďBR9e$OLL3 lAJr?%L}JJI)PU4ۇFtsU#A41SY 'I,t),0 nP DY 0dZ6?|Wʑ )@BzK;-E:E7 9$2'ѩ]JRJRJRJRJRJRJRJRU/92ȟQR޳(7Nt iJR(/ت= >ozK*h((((((((:CMGQtd<|%^=qI4Ɗ*_}S#[^j"qKtzj+3ӓfdW@\C/]yr(-ȿ~ pԸ H]gU]ko]IuY*b,lIqkOtQm ';p#\5;wI8z/fۘy1pݦUB>I3P<#<|ˑ0ϑ`=lV.{yWxcdO_R7Yeoo>WF& bgI_d\{԰:b 3~ 4c$4@$Fha$`9mq:b+l'+l5_do8e6T?fC)p b8g8@Y ?DTGR97jH`ؐYxےnРi}¨ozK*h((((((((((()Hi1 V!i x0X˲AFXՌyBGFWWD\]U&^ܽ2uYQf0-b԰&QcdIͼ&aՠSfآڳYٺ 5|ӠJQ߉^Mpuʁ+ό &ݐx|hBWs < 'cߛ~o=Ͼe[ѿv|Dp#Mfl˥܃œx娬ӭj]esg<؟.6z5$\̛t+qN%vG BeY_ fN{Fؓ4B`D?$s|N&!:w[J! ?/6)ƘY`.?tp >̨''pfxAVEA@4Cu"ᡸ.,J^# Hؾ2YDV;-:FҘk.Ze2Dh XJc]WCyr6.tȘ mx: Fm!J~<%|,Q7]# [cJT"ɇ.1ۄd84#$XLhj~xǦb+A zH$7?p2D9$ֽ,xb%"(a;<# J݇O/ ;fg&(8_dD \Ȩ$g֛$0|ElskJ_,Ej5 %ȹ("IICq}1l%[&X ;5[,ˀF,d\$Vϑ9d$:;^#MP+Mި@Yd#O^hGN^"g >0`fv gw"lr/U:2GY%&e,>!*MGmτaR?Ƙ *pi4XdFA2ݡb;H [|$Xh:fFX B~Cdqǔv56jnnH G@j p;& ,h(eVvW!ȣ,ǑJP`p>bD2#L3UC.s#+>A,"D#Ԇެ!$=Ť*\;pbI <^wP crVJ lc da$ȁp: Xb|8C(rjP'>vWzyy hpY f( 28?@/ 7LpԪIL8`AqdznHJ?Gce'^EeAOIRQ<}EdlZ *Igk_$C9qIo3CzEg<&eSqg|$E7zxrmȰ*.poG0ËM R 2K $)}ۢA<̜' ic4~I'0 My/|,B u2 BAe6EygL`31gs!Oev߂"~쉨 8ARqlUb.`qOl:'-O_4hf|80 Fn!;3GÏOS;Kڟ8uv;, @mւ+ >hc[tȹ g|Y f>2<[!LCEвY&v G|nJrq1.;c*ߚN,ʷ*RT)@)@)@)@)@)@GO([JyY~DbԛtIwO)UR}Uԅ|7%G R R R R R R R R UteHK4,j"ɢ#+ɗ^6ˉYG<\3u.BzAmN^{#` j2B&3i#h|^h Hf2dxT8t??5G\msXIe16ZPΣ?)kaR0fTgp</H8-[ԩphj&fBg $8V1!hq/5 l3N+a3iU)"tI9v팲BI)/ȗHdyzqTEiQ$ %N%3ЮÏӓs4JO&P`I  Y94]6հAe0) Ȉ#GGetx!ql!ӞRHd!E 1bwK ۅՕ:TP=^o$Ȑ%2+fLzq8Pbixlg0C\dEI WNJrNɥ@x/+%Ϥ\"f<Řc>D2/7"%IxՍiƲH,{*i/ŽAC>VɢWd8 'pL<`ӳ۱P ck\֨7qBJ/koFuJFl7FhODaس œ 9%yYpW~Kƣ 4.ׁo!:d%qr $6+:7y2nw{\Gc}畼[u}N? K0cfrG=.\usF?wN:jE=:mٷggfݞͻٷf6ԇS8ܫHsOO{޽¼A+Ofr,uLhR[(FL1Pr4mn@j\jo k{H'"v9"$Ts'Bo\qKy*UK[kM&zvz'SivUoK[ 3+6WUۚښۛV8998,e"RYbW'LhVcg F8Mw0r˓#XXuĊU(pll&J湋kĉ-^ڑٿKۋ8]P̲V?3,w(99=4>J 0ִ*9e;0';U9WeT%Dmh}6l/}j(bɘvB,Y SvƧtb 2)է Y*aM/f:iEV&ikJR(((((R޳(iU/92ȟQt 7Nඔ*B^ڐbJRJRJRJRJRJRJRJRSc'Ȝ}΁cxσp-O,f> pVf]wR \7}5ex<[@O S+c\wjhVD7C3G3yS6d5V;ע MN1XRst&W'2XL$i !;Er9 OlĄdRL ]pH)yC%JϙzxDaaȄYeG 0 8c=$"Ǜ3g m ŦL"Iv>TW'Vd=P2t$̲>>BM2$' q'^s:"U7vg7k {Gr5ߓ[BIXl0 qs(.b |Kq̅t8nju͘cuYՋlfEʑ(6|k|!-M}@d9X.=srK9*.:ąksjMJ ꏱLs+׸:*1v+8rǺ&`Ɨ{'"!Z|]1aѻX(86>:nEήNA(dPb 1bPnDAqdn-oz\|#aX1ƚ}$fSd7fXDuD<= IWXS̱33L*-@D%}acE=(q른$!PK D儍'$@+(0Ɂp`n$>iڵ[!zi/ęS245cSA);F Kg2yPƍa+gjJ,į Ŗ";gr~N,u>cpp9αݩ ,c@z` g̘y}u6G,ndYsWym\>ޛ v €tP_{/j7˖fL_2q ESscwvWͣ2ONkS~`sٜ]k(c y%"Twl' N&@^[rչ nZDc##aCcbBLm#"-(FFP'jccjN"V֖ԩ7 L4SٷoHbCdf_F9N˥6{P͌rbU^r v"AA"(/{sGQd,g_$xpbM7Ȝ/8H2^EyXy9Kf]j5&>"|1a+&5! 2c--cv+&i@6L6CS umoLoMj64%R'z`Kp! {r83|n nZܮ4Iny֮,VjAu|t<sCcikD.(J(9?JvnnO*oaСV{5v"Dޑ[k^k֡X(ud&JI{ ZJ#(jRˉ:71:Ue!IԨajI5bIY1[%ؓqR6>"}գԓ^D4Ӝm<~aJUR^se?X5m*?fQ#Rn&<ҔUHQ_T{R}U)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP*?fQ#VҪ^se?X5&<nm)JUT|7%G!G /I~Q^se?X5m*?fQ#Rn&<ҔUHQ_T{R}U)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP*?fQ#VҪ^se?X5&<nm)JUT|7%G!G /I~Q^se?X5m*?fQ#Rn&<ҔUHQ_T{R}U)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP*?fQ#VҪ^se?X5&<nm)JUT|7%G!G /I~Q^se?X5m*?fQ#Rn&<ҔUHQ_T{R}U)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP*?fQ#VҪ^se?X5&<nm)JUT|7%G!G /I~Q^se?X5m*?fQ#Rn&<ҔUHQ_T{R}U)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP*?fQ#VҪ^se?X5&<nm)JUT|7%G!G /I~Q^se?X5m*?fQ#Rn&<ҔUHQ_T{R}U)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP*?fQ#VҪ^se?X5&<nm)JUT|7%G!G /I~Q^se?X5m*?fQ#Rn&<ҔUHQ_T{R}U)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP)JP*?fQ#VҪ^se?X5&<nm)JUT|7%G!G /I~Q^se?X5m*?fQ#Rn&<ҔUHQ_T{_ٴpX8B C - _7D--(,WrV5vg  ;A^̩]LJgR_82{2o3uV3yKiJ|o3us)q׳)XIV3y-*)q׳) ;A^̥c='XI䶔 ;A^̧82{2Ec='R_82{2o3uV3yKiJ|o3us)q׳)XIV3y-*)q׳) ;A^̥c='XI䶔 ;A^̧82{2Ec='R_82{2o3uV3yKiJ|o3us)q׳)XIV3y-*)q׳) ;A^̥c='XI䶔 ;A^̧82{2Ec='R_82{2o3uV3yKiJ|o3us)q׳)XIV3y-*)q׳) ;A^̥c='XI䶔 ;A^̧82{2Ec='R_82{2o3uV3yKiJ|o3us)q׳)XIV3y-*)q׳) ;A^̥c='XI䶔 ;A^̧82{2Ec='R_82{2o3uV3yKiJ|o3us)q׳)XIV3y-*)q׳) ;A^̥c='XI䶔 ;A^̧82{2Ec='R_82{2o3uV3yKiJ|o3us)q׳)XIV3y-*)q׳) ;A^̥c='XI䶕R޳(82{2YvSM1aDicr s:y[7j=uvO}u꺛fɾI3dtO&R4RRRRRP4;:˨JΧڹ]ί<#_:ÄJ&2~^EZR"*#Uk)/\Nߖ޾Z.hoWgV;}:常ӗ4+!58D`+rN_Ӌ)=9~@ɂ̮_SJ&2~N.+!M8ӗ4+!58D`+rN_Ӌ)=9~A&Oj㯶,Xך-ڳjޝ]sZ}:-۷Nz۳N;6շf͛vEU,!ED^oyo N69ګ^ûS[ʭݳmɵ4F!LrLrJR R R R R R R R R RJ&2~N+!5{(D/(RdkS崠fzrIXItAPB }tԑ '>ݖsF,D< 󐗙Է匏v!57xtV?:RFi [J|*JRJRJRJRJRJRJRJRJRB__fjB__fh>u"kΆW4"hWM0Ț3~#̅)6 ͰN%ezNڜ>P$2|ˬ S.ɋ:`^Om%x7L8P3; +,C;)~#YDMrfT2[)hWy.r(`,0M]D LnIQҰE 3̇>:BT`Ff<&F>z6#in|_;pմJg:83wrU/dϯ%5m)Jg:8uqT>pմ)뻗S9w/9GLbc+DŽ D6TzDszUY'=JR"")(BU)JP)JP)JP)JP)JP)JP)JP)JP)JPBR]Ho~8+_jS%kN(X}.˩j *_;ץ [JTs)/9T>pմ)뻗S9w/9R_K8i_VҔs^sL]ܼK}/V3:a~IB-U1_S:Mϩ-i4yj,[֡&{EzRλyL]ܼ)UJR R R R Rnetgen-6.2.1804/doc/pictures/viewingoptions_3.jpg0000644000175000017500000005154613272137567020433 0ustar kurtkurtJFIFC    $.' ",#(7),01444'9=82<.342C  2!!222222222222222222222222222222222222222222222222220" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?翚O^E,<(R8q ڤ&7ozp8#ҡ0ֶG vE8OE>ֽYH,uv'3(\gc Ǭ}*< )!Q" vK ٫v#|,??OX¤Parυ'(@G'X,GaI  Q'X,RyB(Qd~rυy> TPYarυ'(@G'X,GanRMkpT7 F֜,tmN$5lY\U7 #mdѸ"HE٢[ (|,??jwڜG=R[EMF3$h<O57"\ɜTH|9_9?c < +N-;P[˅7ZM:(LG'np=z?tɧ[E˦Fj F0Ia֏kH9$rrυy> WM/ᱛ\mOSK[M"DI!v|lA9gkz'?aq$B?.}d'-Y'X,GatUU.5 &$Bʨvռioo Onm?ݐ ;F@=j}!H (|,??St}g¶r;IEjBUB\1fn/oOy4P41휪:Ui$_OX9?c ֖Vˬk)c(f(Hp8ڟmWR֭$c-3K&*0yIarυb FvSt[>ƣjZ#R?9?c < *O(Q ,OX9?c yB #|,??OX¤P (|,??g'SLH/YP#1{Rm-@.3dEi\Xi0ͲgAda+!]rN$?Iq %]n>cEq!0:j.{"|4O&i7;-m`6eGFVGFs>rLMF-Alr:zTQy%4-_k%a(6Ò=} H>D}n73n~+|):=Ŏ;G`ծ|T& )S[T-ʧ`#|a^_Uk|WR&tI'~Wk|WQ_UW^ɞ7{ ##OT}n^W^./~G=+⪽.sg5[ku,3y!]p0pՓ-X3]LH_Pi pA$Wp ?R_'KQx^_^_&̑ϠS|a^_Uk|WVWd/_O*B5>+n~W>##OTk|WQvg^+W_'G!~T}n~Wk|WQ_U[`L+Q{ Q'#ÿT}n>WxwO*B<;@'G=y?s\/ڕu(,BZ7χM@OMIgIow#,NYO|)CFIi} o?Sӵج..e>T^Rdx$ۇB'@ltJIۯDkkcfwy%Tŕ~8@uoᨭo Yu'"qW2!GadR$-;p 3%z|uk%yHIWHC (UU2劆889y-J  oօn3@[(k @I78ha9>oCzm5mqc  rxY岪]HL2ۿcRn?-Z6wְXȶRNj7N3#s-9_?jņwk9bg"I;Kg$wy^xI-c)R}~ M(?'|8DPUx @+>?hqa lnč~e֮O<6\\JCI*I<zUT{"Oo5eH%7YvSw2~]̣nc:mzFryS85n=f]N]2=J]ZeE㒙2Gq\-luԦӯWε·F[8ąeYܲYTY x5Z͆<:TAo-vnmd``|y+PH YgԭGPFJl OR^-l|MYoQ<ۣO*ppG= xEuKF9tJK#(ZNX&O=,ڌ7;v+*<7*~S!2&f#5Otw-.aoSzlFФJk6Z\i*KiE pJ38oi?a˩B^W &n@#4q\\]M}uy:oqr# bj]qS3I56'v wyjWNĈF `[3=+֟0W9!bdCXcRs5uTs[#KXx-ƣxR/PNuFٓ-ۃxna:_T a@s7%adR 0[ . ȪLr p#O]FX0 $~U>H7Cφ4ؒ#C)]$˕fe%%񺺪B5u+qwl0F(9}9KV3Xy8to-'+wia{&ax22rÌKV3Xy8]RYo4R1@I66}G<%íȆ&Xԡpc1BppMĿjGodWa"A1V:`zJKQK dԒ4%sŸ{ukk-tUdc( P1mF,D0\y|y<Ԡ7=qXr9޳ncI'HP]UTu' J2bAKR5*P]=Is0/5b"~V#.%RJ+1# G^*T:٭9D/-DŴ!a$#'8?H{{̗ ?nx1nO g~r"k)i!ϖ]+ɉyC ; G{ 39 p1?(Y-|Ceycʷ7\Uc@* BU(0(((?&U]OAWB*(#_#(<9w,Ol H{?A,OgJ /M՗o&*l9/Co7G!e,9/Co7G!e,8<=݌ms?%T󏗭ZsJ6a]ن]~QE%mYh6~5E%mYh<a}V[6(]Qع$0mq޺)v ( ( ( (2&}b ($0^rV Fy˟ ^w4sfݘe8']E?V_? /MuRr_՗o&Co7]mX,rV^ Ү-^ȼph6~5E%mYh6~5E%mYh6~5E%emVKb ;ҏCo7]mX,r_՗o&Co7]mX,r_՗o&Co7]mX,q@}ms%T]M#:)Ty??꣢$O4 c}:9>9?@9>9?@9>9?@9>9?@9>9?@9>9?@9>9?@9>9?@9>9[{щhgl|Guk >T'|h|iO禙}IBz)c72%_[;  ]VCu;oi~dpOI MDͳM:_xIBwnuF1'/G/ZrHc3o/G/Zxf<u@ox^Mox^Mhy}<g?{r4}?{r5h[4և?٣o/G/Zxf<u@ox^Mox^Mhy}<g?{r4}?{r5h[4և?٣o/G/Zxf<u@ox^Mox^Mhy}<g?{r4}?{r5kuYn5lPS'ݖۅ?@ U"CZ*?j[kW?^M p>B+9O">^1"ȏ׌_og>_:V;{{q]rmt$H}%&<hi=.e>d+Tdha) 硶"Iak92\A;RZuŵ六֭IWh[ S9Ҥg;x}.m`]i~TV6OFhоo+Y*`5OEejVqwg,~kILnEXr@kZzM5eo{>6+tI$rw09 WFӅۋTU+X1` ƪybhS;8Đq̠4o_ZłBmV !s0;3t5K4]N bZ-؝Ic=&K# n挀 ;c,` WQ,V=$NWrgNivKmi(@ !qlr9m׈MBױ?:H][ UJb#uSfiϢ@ƫI]S})FEE˩aj..|dx'='M"cS2,d+pI\> ",mdF 8$F Լe>6.*+Y#]4h_j|ʬl 0^!BD!frAf%ܒI=&'t8.FӖktmP4.,z·wOKO6F$BXr,kI9Y;w0Ao7n"ѓL50%J*I4l!so.7yy:dn;PI'TIVhUĊI$MI^nd`[>1/W:Jkv~5yl|ӥ-L#1nWWu^vo6 cC$s4p*d?)Ҵ뫉..,-eX I <$I(OK{Xqc.0 7^z$s,Ы5p$ҕ+4%aۮ$ޟ6$jf$u!dK3o,][J@n#6u$|[$rO5xwC4m9fWKNr2Pz rMkAlQDǜ!SȚ( 8$.TO2IhHwxͰzu =2IJVh7e-Bm T;qqirj+ ..Uvg#<`PGU?է} Dh+;C@|&0<6V4i5 P}sc$T>|}JsM&a8OSS|A^: 3T?1mvܯs ;Or\MMN9m[)i.dbƭ2rO\߇I7:xWANw;V+Vy bmԱ}ŕAeu8e]zU:_=Wq)d,K)P <Wx5[ kT»V4`cU;GW>,[FӍ+"[TY YUT1mwiw[qegnJBA 8U9>zm֥.k+׆9"dئYs@p_JӮ/T*\:g`;Z=IVdo6۠Fs3;zZ|Wuz,Ű3gkW',WFY#VU ?F<<Ҵy=AU Wqp֫t8.FӖktmP4.,zŷ5@5H|?ԡ6Fle9gpTW}Z?CiW>גo:XGO(U`+'t9tȴ4m9!mڵ&0܁7t;LjstڣJq#999=[wki7K[A4ã(C"BNiVVtv$hbDTsi:VcMi[ϻ͸I7NH穨.&=-;VC7<;ZuY9[{ [,.'3(o+fKt~MƵnaQ+l_,> ̨WdCԚV.%»#hTʋ>f֤m`aTgnQq~UqA@M0EjA5ܦ[R fb.u:p}햶KyuZ;,^R4p ~PݥՍX.9l"4es& Cɖ R1qMcF:y~"Ky~"K6]qe |WHAM%\ȧzI|mcawb JRy Wi#AxaK*pܮv4fq)ko!]␓۩i!r/FH~ Vi{]X[%I#Syc?x4.⦫k=#W'׬"FX(ǘ\a@ܻ(\sP-&I9fin9jDGWeiAERۭfsc[98h]+O}G &p.p9>[|)u?϶n?ƏDGSj3\k+3JUL.J&5We9_൶]k[Ko8>冇t;&AJwg's>??m$4Y˻W&գY"[g v2cE9c,"%Fn9RT /hhN}q5@"w?ۏ;_Er϶n?ƏDG]}'s>??muP!hhN}q5@"w?ۏ;_Er϶n?ƏDG]}'s>??muP!hjŧ`8a;y6xؚ ȷw֯j OAWBSȏ׌_og{_#+Y+ϗΕQR0(((((((`[YmܐF+c!@""\@jZ 9╢6WBN d:*bx;u y]جwM[EՒ/tu%292Ǚ s!-ı$AΎrIiA,a &5f `w6mz:]]L2Fi$v2@3( @ɬK,m=R)1K+A%9RGPH`Eh"iGlcc=Y'y噉Ql5[R!rN%`H!qV$t8/ReLW^y v>$7֗Guhcr뎫/#zȼf4Xy'ǝ TQ] ;CkY[°F0#ʧu];H[Nm%8<{v2[pte, AٽOשkKw)ϙ_"X<e޿3`6@r w-Ėot.vcV`͖ 'se-Ktt]c[-×ʅ=Iމfcgo9yjh3IbI9,I$$I$S@Q@Q@Q@Q@Q@Q@Q@Q@Q@*n^y\A5G_-?5ڟ?&!QE^ C] \G/WC7pW/+b:(aEPEPEPEPEPEPEPEPU4;Ҵh$vycqQN?:EeV:ܾ_ٍ6*jmi"Fe]wWC#A pFtNI-]G( i|SsyC6@'sJ#8G"m:O]Qk6K$ G߄CxR~dmaڔQZKXcˌOxo2>p@|3&qgwm=ժiHP>L6s\8"=Wioyi}[]dFH͐87d({ ("]4vQ64Dh$@핣g HFbiO;mFLKsx+0E\] vƀv (7tP,C9 =( ( ( ( ( ( ( ( ( (1U"CZ*?j[kW?^M p>B+9O">^1"ȏ׌_og>_:VtQEHŠ((((((((((((((((((((((( ȷw֯j OAWBSȏ׌_og{_#+Y+ϗΕQR0(((((((((((((((((((((((_-?5ڟ?&E{SUpз*(#_#+Y+Wxf 3lGET(((((((((((((((((((((((Ww j >*n^y\A4- (H>Wxf ">^1"|L[E# ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( (1U"CZ*?j[kW?^M p>B+9O">^1"ȏ׌_og>_:VtQEHŠ((((((((((((((((((((((( ȷw֯j OAWBSȏ׌_og{_#+Y+ϗΕQR0(((((((((((((((((((((((_-?5ڟ?&E{SUpз*(#_#+Y+Wxf 3lGET(((((((((((((((((((((((Ww j >*n^y\A4- (H>Wxf ">^1"|L[E# ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( (1U"CZ*?j[kW?^M p>B+9O">^1"ȏ׌_og>_:VtQEHŠ((((((((((((((((((((((( ȷw֯j OAWBSȏ׌_og{_#+Y+ϗΕQR0(((((((((((((((((((((((_-?5ڟ?&E{SUpз*(#_#+Y+Wxf 3lGET(((((((((((((((((((((((Ww j >*n^y\A4- (H>Wxf ">^1"|L[E# ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( (1U"CZ*?j[kW?^M p>B+9O">^1"ȏ׌_og>_:VtQEHŠ((((((((((((((((((((((( ȷw֯j OAWBSȏ׌_og{_#+Y+ϗΕQR0(((((((((((((((((((((((_-?5ڟ?&E{SUpз*(#_#+Y+Wxf 3lGET(((((((((((((((((((((((Ww j >*n^y\A4- (H>Wxf ">^1"|L[E# ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( (1U"CZ*?j[kW?^M p>B+9O">^1"ȏ׌_og>_:VtQEHŠ((((((((((((((((((((((( ȷw֯j OAWBSȏ׌_og{_#+Y+ϗΕQR0(((((((((((((((((((((((_-?5ڟ?&E{SUpз*(#_#+Y+Wxf 3lGET(((((((((((((((((((((((Ww j >*n^y\A4- (H>Wxf ">^1"|L[E# ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( (1U"CZ*?j[kW?^M p>B+9O">^1"ȏ׌_og>_:VtQEHŠ((((((((((((((((((((((( ȷw֯j OAWBSȏ׌_og{_#+Y+ϗΕQR0(((((((((((((((((((((((_-?5ڟ?&E{SUpз*(#_#+Y+Wxf 3lGET(((((((((((((((((((((((Ww j >*n^y\A4- (H>WxuXV P}3 Wxݯ>_:V?$տG$տ[TbbbbbbbbbbbbbbbbbbbbbbbJ]KH'SY$ۂڷ?^MZ?&TQEzG)WG/Vax+D}bEnן/+`*FQEQE,LV)8]z'AG'A\[/R kWƓMϋyD!Q# aC! xZR}w'ssaҾp8Ҁ6? ך$4H\7N+"ݧCjآ((((((((bbHA⢩Lϓߠϓߠ񽮛qxq-aۦH)Tl!9'AG'A^y\xivwj?ol6Ko<^\BYn6Hρ.Li5񵯇g-=斷*/H`Q˒f*B^?1{y{F}ZDuw#JK:c~40۷۷$Pmƿ,!eʒ3=+J5aؠ((( Uu?^MSȏ׌_3~4Z! IWaAb>pJ.C5cO)A/G'.ú::+Ÿ}OY9e.?>xS_Yv ogb*<XxS_O)A/G,oh*' zR`'zO+p6``]'Tdv$Pġ#8U \j zQ ?=e(`Q|)ۭoXm dR3y5sTŸ}OY9e.h(v? ' zQ.tttW9 ?=e(Ÿe.?>xS_Yv O)A/G']s zQ ?=e(`::+Ÿ}OY9e.?>xS_Yv O)A/G']s zQ ?=e(`::O{(Nz95 ?=e(Ÿr˰]*!?Q V? ª}OY?>.Yv %Z/' ?*!?UOO)A/G'] V? J_OS zQ ?=e(`$w;[g Go9 ?=e(Ÿr˰]}OY?>>Yv O)A/G']s zQ ?=e(`::*?k zU{xZ]:4l'UNBGtV">%{V)?+gnetgen-6.2.1804/doc/pictures/menufile.jpg0000644000175000017500000007152513272137567016730 0ustar kurtkurtJFIFa[CC" Q   67UWw %&g'$8V#(Xe")5:fEHIrtvy'!2Qq"1Aa ?!u!u]]zYwK{wsos~nGłr3p`vdy7}P..6p7ς<osvƮLq4wTtwTt˙_ ys =Fϭ/0@Q_),#\O i߾F vT0F /2<+ƗKLF rqxaEޚ3Lg!U&++&"4JZ:ZF]4$l MFnjOD hI xɆG!.\[*jR`Xd98uYK'^9,J]CQ8jh卮Df5DŽG; uqZl^Uq {u/|[\hhC<)#;&[yQd<&9m|j};Qjlx%Cyěy/)w#1S-+bI!L+XׅjvlTGc{{ocBPb FB ܻFc8-Mi?`B2¦Gok3"s=V[{<$!|a΋l}\Ñ1HpeyYJ Ol\%}XZd+ t䮱 T=]7v=]7v]9ďni5h >rE3p>J90NX ;kBݶ+۬$]!-)J{ 9-282fY6w'ju&W\^*w.}**7K-D]K`5SߏiSߏk$jey j̸f4o0t16ޒfcl>!Fx(Q?bKmAKCp=c<{rW˿I jW`%yԣrд:Aa_/e |Ca #5b}=]7v=]7v>~1G3F>oؐC8`- /p9` LOOI]H+7$$!BClμ0 |4v<2c<7}͆ubƳ<ܵ4=P\=_CGEs0j6w;z@M, RwTtwTte|2< p N@3^PyT[(:<T?>S]&@zuO~>WMݨEQC3\7mNEAoMz ^Æ=HQȏrQlz~fDde I!?bA&jz]9#rނ%Jfm^+1ElH}fsԆFyO |YOWǷ/RTוQHGr 6TtwTtڣ7xdb̅?Uμ(h V UznP__X2o6*wq/4mC *jH<~`-b$Z) 0<3o1ƌxV8vYŵw7G^a{W.=e ۴۵pbO3&m-ЧTج7)Yf3ĉdU#~ ߳*^`-<) ^XV[b`Dq1dy{lCn TP ŗX}Yg爌{op0u7طS/VVq=5^b[(o"úTuRwg.Ԋ;۵s!}W2߀?/ǚX^ݓk ۲oU_;hIa-ihiTYŜ ~DFnNm-+jƫoU >H2zI79@2H[?L<8 >6 <3*+bҰ%d#"FV":-c %g帙GVH'z m(- {*ʯ,cڌpT..3Aљo)rX@"h򢌚zٟ0a ꮃ1Qn܅M jfl#y+*ac5A48[2.87 `XNa1d zɁQq}=4im{vׅtwF78U^˕z\0;'%Yz2Zy@$ pF,hBbr(%EH2־10P 1YY5 -oHo-dD*Th#H2F}8oˏ wTb|O'bڤW[ | uPtvl  Q,akr*V 4@5xf9lmdd {+ %'R @Y]KyU?o@4M^NL^~ iZqkXRo#qPXAT̼Β¿&@5^<~Dvjõ^<~Dvjm{v-A迱̓#AW2!Ϟ[Q_5dSpBo6+״W'`T*k.j KJ}}5vȇ(WLx2MBZ]6#l !Ų_x%`fn}-NTvh3ɳ:ڭoIf\K0I%Ť0*hW+UH4^_܃ckN`$$35ApW)U]LvYþ_+$12D(5ޡ10 E,Zd#3b0'⪺e2Wċ1 ##MbEٓE:do8g#Ey';^"EUݗԪs=2KM}mԕ|Za42Xp2F6qfJCxG}`5"ЋEdrCTϣleW9цl'lj-Wnɗ:)Zַl"E>|0-ˌݑ9GyHP^?ζ?<:_8 ~OW}>ߠ2%+Ÿp18Hn ;3M v BMZ Td\hdȡ&Hm_]3ǖ`Ugǰ2XQXK5IẀ#VH$!6QeZ-+g$"ai KQdTwKIrv6VR`XI%2>6\nf2D\||H0 6 җʅDy8MϜGA֐l a'zG lMȾl]ʖ#rԫ Ce6-0:%l1xfS̎ þb( (W@QGF!O=tz%*$[*lUGfFMc.7cQ>cA>OݚT::h(ygZx/Qpe]O(#s)9i\3$33婌a}xaU#EJ:JS 3!D'5^`ǵ_,@wrݑיFs{l,]׌-F%Hŭ0:,.AX2p/j'݉t {}WPDp\'#~:q#:5Zm2LoV2C1u R)=Tr 5dȌWB@jRRE;70A=[/\p@O^3omҔ0(Q u!' /ϱO馀ihie";T_s5aگe";T_s56D}_ڣ~q0̷iao3THl_2Q-j6VIF߼,0۪ ߜJME^:SGx_E]Z,1wDr)?sJ٩D : GfHE5s(FkQg~ӓqQFLp|\\&!Z= 8L/s7j*Ҏ .5g/NS^kw}8]~6gn79KfeLoG[ w Vjz΁fn_" Sw5x' .I WdclnwւdH OQdǐ$[T XkM`"KY <$Pg4T)l5 u5gV 8Nʼn׻@'آez8F>? peBPG46K~Dox5e"*%[C:yk\M6\ADB9SN܎Lchew㊫x6`Z;###qZ Ќ˥+/+k_F 2ⶆg\0W>M\LJ!G#ʱUުbvo/j<8ڐSH8-2[v5v׸ۂkNJ̙{QqДOqay$zbdٲC\ :`#@ºWY\t =cEQ.z8c_lyYfh5flEĦ!#&xl -R5 QeGD7m>TºI<̑_bmDə"+<'RCOu3=Px̣iߑy9/>;G>"|WPO8GWG뮼]J]q}헟w'>}}ҿqW}9ϼhkܚ12턧?+{Q;i_X~N o*!ٌ"&+Cueas*;Y^Zpn9H1G+4&/`8Se2bIKvHquf[JR]:dһgm yZZ:iihii%.,*>Ը#gsgD/S+cp귶KosxG:e";T_s5aNwq@mH LhWsvNs@[Pvi *r2 5-#t+b]uvr"˱h pXKz!'<2C:~ ]Fx{v;Ѷx67'K⑹6D}_}w9nc({rӱx9aGh*H,}WsR|$͹ezd?}Z2UY5EVMQ9Pn?}Z2N?}Z2JkUrNt6~OV/ӯ6~OV/ҫ9Ug#\5͟գ! ͟գ! FY$MAgh:gh*EVr59Pn?}Z2N?}Z2JkUrNt6~OV/ӯ6~OV/ҫ9Ug#\5͟գ! ͟գ! FY$MAgh:gh*EVr59Pn?}Z2N?}Z2JkUrNt6~OV/ӯ6~OV/ҫ9Ug#\W2߀?/ǚ^?}Z2\AzNz#۞֧ޏ X2l!qn-"&[+gT_N]ɴ۴M^ݢ֚o^{Bj/jVO/qۯe}᷾\c:~/m裷ז[ӵ>q@7B5s*\I;s}M4M4 4'؋ێPzɻeڪf{^?5O|;<`vik}zzc;~j_!r{58/]YHc="G+J1!#oEZ ޼4a8ª?$YGgSgM\MndЏ&طl>f|qq];'ط{}g:OϿS0i2Ic aiGWYeG˃6rR!I1ˬjr ]Fߏ,l8DȠd\ݓQZq23!M&5s&  q &i]X.ZyoGB@W{18eJWx@e ъLy\A [mc=e ʟD[fٗqFFycF؇vs8K(ʾr,5Yk >af/0s O-AI ICؤ y0bN!1[i)0ڧoB|s0)`IM](RVKܭ %(8M4M4 4@WW2Ll8[^ocN ٜ_0l\"w5Ԟy$g3dmĎ'r갰{j|:t2rJ / dKUM5OrD'`w5GKG鵭$a Gg$XZzߌu5^㗵0"'VHS*Jŷӈ~ycJnW"oI:6s: ePנVzpxɰea` H'ئWV0y0ORm/{^ e4`{A&RZ=78ݏO}U|knY]]8 ˏ3RbOu[{CU\K-|׬`|u_N"[ެ #i,dq+FlL&Hy$(^UļWuOe&~Vճ7cǟsw9Q}٪ImpWad"Pʿua7QHNϋU"ԥv)#, Wmz6lE?B۠#H$Ϩ+s"ZRRD6&B]ZWљ-T%< M4M4 4@4MM4U̷$Ojq;U̷$Ojqhx^ݢoY"GH?5oxi迱红{y#[$?O|D7߼?Vq$sև"ݤpi#g<G_Q6H4MN' D 0\V&\)(9p ; t!Ar-䂤Oo} ~;/+*q&,fU.}Mˠ: ))e.Jk]gMAI :PItr)b[]T-ܑ "?ܭi@Vvxb(Fa=36eL&BlJ& @= 0_ 3\&& H#X6=H@)a)wEdTSɽ4|)9-г#t-<|ZXFNܠɓd!7qh FLjymۍUF!]>Z8A8 ŚXM&Lv{&<^NXNb)oo ~ &\K@fu3)/밇o2SI® pu,DnדDVށ -Iⷆŝ%ˡB\e0YW#'k9备ؔCSQmnlǾ^%eee$P 3"̴ߧthiiihie";T_s5aگe";T_s56D}_3V,O2j4:nc,υJ)Kᎍ_V{O ^NW*KF+zj/jR 22R-1lC)3 VTm-e;gnLV Zz1xqa?ee<صUQhsl$Y=F;F2,qS8oɟI#aR͎ Vq SIDS*?D,bb]%a}0"&6UI3:H\_$j20[>z4?b4IGyt udfpڢzdf% `ғ Z{H+wf6&3jk\,C_ { PSWhU}*H^zpD_&%G!'d=̒KQʊzc)Kld{1A{X繁`_(.81b숸G#fM)a5ĠOE.m/p]Ӌ_.>]h/ v0wtM/-<_\Gbm.^9ӔRKg\IgQ/Xw#y:Hb)%G|_G9Qa_LٟTW4{tm^aQZZLÊ[y/;#1gܕBG2=lRܨ-Nd̲ C&j0LE6[ فk._o,ʜgSԥx];$!6޺Bڼ)|?iqvl=5 }6vEpesWh/,f*B<1}΅BNN鿏NMxKU(EUU麨&3]7| F'V.^;BB:\kǨ4͠J [_Gc(|ۍľ&`,8KhXwNďº$6F#Y8d d.̱\ 0`[u-WY(,")ՔWш$E.豾Z=uy?GuwFyy/ R4@4MM4M4 4@5^<~Dvjõ^<~Dvjm{v-A迱&Ʈ;0X8dVc9k{q*d.<+ǔK8L ]s"I(֎72Y ;^Vc)I !sd7 bސ*zӸȮ+$j#>ۃy7rKlJ~f-=ip2dYJ)\>b#i D ?/qc41#t #Cc"<]HK\\2my1_Cias"^e@=@O zxU/r)<<Y^k֚̀0VZ"P5"%093(t3sBH2e ѤGꎢ#iU"T֨#OȆ kVKRX8μ/Nj~Hal-hJLm+IZ[zH_Fi)$F,Vk3/NdMjG{?$0<\ |Vgm42Uw0 |M𚻇Ҿ.g̟$^h}eC< A-yqߚVq-տB}%ߵ!oe8>.Mf婲'V8Qw]D2ݤY#VY[ubZ)Z8ghfW.1 4_gA8Ŕew)Hq 27hƑdOU*ETi#ؚFEziihie";T_s5gm5 yJpn]c~kM۵=0Vº$sJǧ=]d{:%]sc%mNh L۝m\ !';|+,ı" Hboz8ˏ6&e5}}5v1sc$HCfa&jC"yH ±Â|ǥ70ݒ_YG|~(q7w%ZInm_E]=U(nad N)VY%ӓIJzb3oa J:[`4l .2K!L-!NP(w|e{k&D [B*E4[ ѺBy<]:Rb?VׯaztW吃I*ޠV` j+;;a|;iyituw+ս%0tnŔ=[c8> Q ټ/ڜXPRT, =ມ("֓F̍@q>a*[Wƙ]ls9N6kl\C#{!ZY2bw27Y  "#eL |+|E['2k-rfs2 k*A^ %WAWUUEBDQmx6w|'Φ@p+ϗBK ]'ɑKNۀ]u7bPLs+‘vVq-.lT\[ l@ۏ0"|[ [%k? X=+dHP兎c|lh@`t+HGU+'Nn01a)*w3 q"UaT$5T]N'p#;BVS²'[tZѳx_ 0ѥJwHeNQ`Ҳc%o2anLW0]4dJ/ 4u9>Fc.&Oͫw}Mplb+b* @p UD8^U,#f X `-Yqwy\)Y}6Ⱦdc8x ۔W5Qe}wP W ŕ[ s˺ jPs:/7{S"w~iGi[s]xګ61lIq*h#{^ ?vyQ(9J,KEpA^ ?vyQ(9J,KEpA^ ?vyQ(KW2EaO2 Jpg{Sm\dl| U]:OFSiEp(.7kןaNׯ>*9evTLձIeFUs(mqUzׂ^u}y"C*7j|\M=YH)vyQ(z⣟6P7kz[  !6Tv͏[7/a>=HQȏrQlz~fDEp(.7kןaNׯ>*9ev:iEp(.7kןaNׯ>*9ev:iEp(.7kןaNׯ>*9ev:iEp(.7kןaNׯ>*9ev:iEp(.7kןaNׯ>*9ev:iEp(.7kןa\Az"JZoyqd-$Sw?NOע]XQD؏豍W2߀?/ǚKD_-A迱w-Ѿjz0]y5bqEAH7`gC%$nn%`z ?a迱Qym4[sa/a4Ý:~Rٸ:>CR#Mo8x 87IV%njI%7rFQVYG `OC"sqKj/-ATs!V d|Z~at%7me7+K.l V Rf>a*۬Dž`FqjEp/(|-̦Jxa=FI /Ӫ} MEP"%ę5A|6CRsс8ħƔkF9Q\%.9]ȼ98A5HHQ (,!Q3Ә3ienRad^$'h@scU7w1bU{?8il,87-vߡ0Vf4UkmP0nyZEk@ %EfI5l vU{;&|<džYf,TUB VT6ύlŪ3_^'@o /( ]PŪ5<,C ۶ݚGh:#]:vzW :c:cs|?}Q?_:t,t O-N>9vwc.+}C`z~rʷ>RIx5ܤ!tek`Dh葼c s:o!A!v 'ZgE]+ -xdDKm8o&C[O+ cMae1-2ʥ;]yY!uvxc~ EqbNKxYIxcnKHb4dT0ZjzH .8y-/ eG9%O]oŞ.R)Qdx%g:Y^4I{U,Úg|2#)7DžglP e'+&$5ZWLYRųn7pIFuKpx,Iedv.kA!1ˀUȏU,rsnP2q%a$*-oA}5M(:#I'/1f$Q,3Kd$ϭVִLL4pj¾S&m`*jcQzjH=r %.<2QcPoɉ?#j_ Il2-cg(AB=Ґiۅ0H2F>EepNux~YIxc,nH4d+T/mj{H u9- :sߙ(+s=aPJS!Tt~y~yWB9~+=凨zū迱v>Fi_Jj+2QlI<t[Z=md1 ׷+vCȪw+wkkL_EXc LqVKhXe|ս *6?uw)8QJꪹj\ 17 u`6Vx|?r9 a3:wxݰkqkfqگmqķ)i mMf<27"w*Zx˫R_c- x۴“蕰)O4s280 E$@a^*!Fyn%zr:9-,*NɗRwaZȃlj6%oդ ݵܱ 1@4[3: o/GYBW,O "?|?W6'vOpHCryVn4=P2qVR=bīZQUͨ8CN6D(Mgfֳ+<88aD("[F\_cĵ&~&"oH۽_@<\ɑ%}&bŘ4^Y\Qdv mV tS:MOvǣ۫TZ>8 H y#N*Mi H[GfKJ[[Ho` V[ TVn܎Lchew㊫x6`Z;###qZ _%JW{x' {ؿUs僎u+60F0X0is}knt%w6 ~9cFnޒd/*! 2f|0g Ul sr%]yc p6K0D-S؅6>E].3Mteޏ(퉅ymT0m8x]yχ3o!|YK$gd;~KbOM_`L?P pyT:OfBJE;ak㢰 >OE'ڶ 9kf=hF [:hD3}PWcarl+*p5lc8׍@68Zya a{)WyWvgyumu/_`ėno9/Zߓ9bLi.5%}LW֭X1si:|P_-j #S"z8^Jf&`~NoHeG2 썩M];[A(#DEEa9Uxͨsz&Z:j%.io-1m\wl%[Fk o8m '\Dٰۨ M4M4 4@5^<~Dvjõ^<~Dvjm{v-A迱̸ć@|7Ʈ9̨DoqS7 8\dc>Wn}^ce[;K/,D@mha1/FV\^QE2w_ _#?pK$V7O,< s# qHғ,Y%hcHAhCWaeck.`(7HqpGx>` lNPA@+zYŤH79r ļޣēXvdN%"e1YHđ^I>׈wxEQchyh27el5*xLSr?۹=Gw#]:Ϻs::|ǀM%X2a:_Bt5l~ޢ Š BDa~c[>&p 1_YGfZ2I+O=f%KK(;lOD[ ϺEZpȼyKHIEu}]v\'C^B/fM-n͆ %m\p"*c5lt8S@٫%>9OEʫxcUqN$پ]NOq$opurn?.68 eZrhvWyW[s]+Z61T1%l6 N,WDɁKѵ"RaG&rsr*R-Lhp@ŷ=4:%1 ̘E:qYIhNH!j><yv3:ʎ|eORE*d H܅8&F$ILe0|%|HL":CykQ.Yui.UT+dLQ#{ss m[`(Aje@Z'(e5񁾛8rɪy= tN~9lRf&_}Q:s5\UlE _G=1GON okgo>!iDЊu$uCȠ@CO.|mǂ3mЛ馀ihie";T_s5aگe";T_s56D}_ŦbY^}:_]cmǎ\Y_nFc4bv;ɬI1vEl[:<~z'lF wtnXDL.%bHBϒaҶIl7`I78laA2y.5Nĭ*lmGVge^yׇA%.Pfx"D6բAyE[a3[j;bMb% ? @l6shh 5'g95ڨor!Wb#/P0PXꑲ,kM fȑb ƖR?>j1.V~PIu~^r2bsD?"gㅫylI>6E&~GM5o>aAAf._>ǽ㯽R'ϻzܾνKyZb^7cwvAQߟz Ax\m2PVl`m)r^jY>TE\r `Pv[Q rP#/RyBC4yVaZ ٶvs Uw6tH4kqͲkka+ : l[u] ~90Iԃ'y58.ޑK5+̅8"q}l%lyX:o( 0A r"ыXΈjֈ_ZSVrw3qKO%O G xosǞ <5xC<]ۈn0M=WAD|orkI 9F(f.oZuLu8fՂca!x@Ds‚i(x'q}HIOVV eьEsDTFwcb[ޣ-}G3mqzjD;|;أIQM߫NWcLΤό΀)pBA[hC2-Pm̔'ckf,V|*Ts15>aS^$J8&q-atG[+C^B4 #%][f1ep3 X-^fVo%0xpۡEݛS+f=1@1B^YSXAKmx'WI(W#gsO4@2C8 #6Ej&$n Yӯm^DS+n~ jٛcϋ\x(bAcsW0 값&'1CbaFb1 Dp]݋ :dxl6N}M@a~RW+Ll#୸I_SArd)@"{#v7xr̰rU]m~BX7EQXCIb)/!iȾ &|HfSdzE[7\IfbH-4--#$\_ LX3ᆑՈ4*i B$Ϡ'kwz>YR(3N,Vi>59/` BGF_HVnAM\PPMeAE./Fsn_Ie q$L`U_ nO]X.YBҝ'$`>y4#A j}ihiiihǙoHXvǙoHM/n6E5}}5v^}_˷3ls_0u bN']1/-F). lGV.dX&fɜ 73jz|(HkOqmw,7O+t=a{M"f%9O#+Cx]DkdpT\lV{z{-q XMrYF/IQIc0׍(6-0BZ4eYleS҉H;t=} xB6N{Qlx{z@%Ng=b0P/Tw{{Aavsكv3O{6u<.}4SX꼾+R?"#.zqiyituw+Xa3fy UeԕX88rfCi\LTp]:W,U!vFl~O?ɷf:S10#w"#S[{Ub}Q^ M JLӌ $evB3 Z %8 A{0"M'mioXᄽ{B;dOy{|uzN=\莧?4>q<#@gQY+֫#&/9vѺ+᪪ p0p xl;~!v9Pg㉝' |+G6wR@q-=HjRIͫ{zlVI}e~\yXqRw2)ċ)mQ;f1V!P29|2bKBL5zYm:ř+.˄31䓓f)zi`q;. y?XYaX3K~ph eyĥBe[0{@0㙣B~NŃgłi 4(ITE˹=czh̀6@w禚hiii['E8V['E8So ۴M/ndC/D?XQoX*BUD^7&crwr|L0?{WcWku[ޅo'zo ankz~g'O s[M7~JF])Or|L0?Ntw䮔n|Ґo ankz~g'O s[M7~JF])Or|L0?Ntw䮔n|Ґo ankz~g'O s[M7~JF])Or|L0?Ntw䮔n|Ґo ankz~g'O s[M7~JF])Or|L0?Ntw䮔n|Ґo ankz~g'O s[M7~JF])Or|L0?Ntw䮔n|Ґo ankzcv}kSΌ)oy}K2ۏ܈Df=Ҥzx!Gޑkv_ ce";T_s56k .j _E]Z47:%~Ƹ(`9Er*;罵Ͱ$n(Px/ q*:毿Ʈy[<-o?=pϫ@&P4VBbvأ`\RPj6 Zz( 7C-7{HUI5莚KΪ-ZGӘ_3UcJɆǖ/c>QI* R՚`xN{,+0RO܈M`ʌmȶ63ɱxIDHphxBW1kEe`)6q$Ph/k'wᚶqS1LzxpYBp{f}USX ֺutU.$rN p}c~.lDwa}*Y2e<8#|u9u4W8XQll_Sj :23i|3Iɋ?)a%l,:( WSQmOڣ馚['E8V['E8So ۴M/n2KEXݦ!Ny03z= $;[8=[V&!Ι\~#~?4;V_vUuMi~?4yg/FS{߸oM4󵟥y=og7}O;Y_/FS{߸oM4󵟥y=og7}O;Y_/FS{߸oM4󵟥y=og7}O;Y_/FS{߸oM4󵟥y=og7}O;Y_/FS{߸oM4󵟥y=og7}x| GYl3 .^G{}W޳iw7vnetgen-6.2.1804/doc/pictures/menumesh.jpg0000644000175000017500000013630213272137567016740 0ustar kurtkurtJFIFa[CC#"  T W67 %Vw&(U$'#8Ffg"9EGH)DXe5:r!Q!qA1a ?!u!u]]{ !YڲYw{wsos}?.wϧ= XKKi~~K3*w~~~k]alm2e:d|Qg=/N5A}> 75tۊphc&})apw) vIͣ/Q 2:aB!{ahG*KʦڶT0$ǙF}/stgj.`M"8ĥvs*6,Eb70\*bns.cF " q]'W'譼lG7K.G!{{Mv=^k;TJ b@޴LܾJ4;6$&< /ݏyGQYscw2s:=-7<x1oSP͋ Y!}P$E& ,q! G!jN}uO׿VW"[he 63$.cdrc l㭞C%k30Z ~5+ /[M;\P>>Mו%u2gҜxx{$~6@!0yy%A_FQP^Oa[Aாܡ De5H:ْW]|#0:N:o;}qt >[{3~}hs3}>U"ʶ=lhQۚePOAPDCVp3 A0 B}ˮjY˄!Zؠ+u 7~`9o2~Cw [9.j¿bBd-ISo6gWvn %):|]\3lo;%}Obzggm1ߘ];x9@Z*\Xdni`nְh3%Qr+㷗u; #}Ŏ(;mӗ؍s[yde.*r6dFFYv4rco HQo-`S`ܐZ1ׄ(PuO׿Ӻtgk^]=^k;N}{awT{;{Mv So]7׺h6uO׿Ӻtgk^]=^k;N}{awT{;{Mv So]7$Fo*o m)hCFd $-]Dc#ҌD#^_H۪VV27>\}ZVQ AḑsYU`_lQ+s B𣶴)޺]}ڞ`,'*EU аuO׿ӺtgjY)ɧmm55ec"XjE>4"^)Uqݪ;-Mby&:+jAi 4XHfB^4CkZLV׊Ϸd//7;ӗg6 *jH<So]7ڃg}f!E8fh'Ua>Cj[[x#zODuᵌ;9;j7ǬCg3LNQa̛߾UA a! b%4bK0(xez9906/UK]7wT{U'+ ѿ7Ws32x-Yc-;5%vnf"'c[PRXSs8aR$XjlxnȢީgWlVƪ1dx!!r'wݸ4:!euP}P̺*h*)b{*2wۓe3EIfHkNίMa 3;!kyt_rfZI0΁G#.i wR%^ >J<*+)H2zI79@2H[?˜xySV7$2jl6g99} $ ۳s>WtN+qꎐCf赌$Ine*Yiq,@BJjY>cuנ{f ~&$d`,{vǯ j- 9F$UD#۫>>ܔLLˆbIfI6~ľnyIC\JeKPPe%|HL=GUo.Yui.-mK,+cÇo#{ooi8ߕ2T=Q2"2գGlZߟgeۄ1zͺy֗#v"[Ce$Vw.<2 \MZ5^Sͱ,6WZy3Xn3wgJnCئ.pz2;#2<2\]E~eTa4h rJZ|||irHd-̦Jxa=I /} MEP"%ę5A}t6CR`\xd jM[cY'.ImS[ZuqS=|[bfs-a"[(1+I: N--=N/asN z>ENjYWA/wf>d qQlp2NÊ>{( X^X/kz>q'c;cԏǪ03aŬke#drDD%1T& hFC,!A״W0dD購qL3l6 2wGBU[=Qy` DR?a/wH{&=}zvC;GHWr0gԙO5@@jڝ:=$QZ+EjEaQq^`tLʸG|yNZ^;D VݳmLgy1q[JrZLǭ&gyYledzx˭0+ ٕ~xMOg.k=Vor'p,~W".=Qs4ǞwWN*Bj!G7lDžb52`\oҜ1m0/I<ȭ1~ wdvA rBk/_sSΓlx&lV7({M4 4@M4 4@M4 4@M4 4@׆MX Pj:4v/ Ғo@GlB)TLhMG]iei2+aPȓkA[]9Ziƕc ܹRl:+W`O!E'cY#Q(-CI-h줜G8D>hg.<2J{v7^am[{zz~pYo/e{MqLbJ`717PPOU^_6$'. MwBDiKZcZcӭp}5vْdhېn0%׫%I|FUGl/DmqUDke$^u}x=:*6kM l>hӪWq'=JJZ7dz4Qf,:8ą6#K2=0TJ*߀gYNlnwN,c1.y gKqZRls0ts2?;儒ņI>o)0(\*&\m4ei|:{.jlnXYpdq\Ӻ 'Bp{oj}d\Uy;Jֺ oe.$}b\` g Otp28;_%$ZxѴ-ܹFx"lcY܋" Lid`LIn¡Һk _=V%rxZ, hgo ǀY2%_[uB L_Wyay| n.08:?Ħ5P KCx :!͍XUXoHZ006u9d]8627Qmm|NNat(~0w,B..d@mHF:1f =ʁ֐z:M:VOAC?4Iy@4VLLC@nI(h1AEU\5lzU$m2_qqy?Hb;()p.kL|0ky`ppl:D_/ૡR )fWUk-A ۂs7sNP]ݵ O4x#.I8`b+~_lnn4O>39ךּKq:y׀_pk94lbqx_H-iFxߜZNHX;&;g1 #n-~8_ L۠ٴ( "slo1eЧy>[q'cc*kSo>}t&Y U mPlA{?\?\'^9}ɣ l9x\71`!K\!&#9d¶tp= =8$IA&Z=_ޥ[ѹĢ_ j:w>*Oms`@6+l7Cj*0l v=8j ٬VI[$LFٰ~Hz[j!&Fb"c)?=c6DbPfsnlxuWg|LrsGMg!rs{&34;*L> aUU⎿Q4Tw%\EW֛ N#Fy9dnAp *n* mF6OV~漗kėLbJ` ˷OuqwOOUQ~ $')k?RwئD'KF2C!o'ߪ٪.!/u;R \-df܅BxqYbpݎj&y&BBAWzR/Morz\>=q.Իwuޟz~_x o[z hbZ]zw6w#,5;$&Gd;ēXMVr :GL/LsS[QC;-=ia`1G :pV ZQS ePTr]4@M4 4@M4 4@M4 4@M4 4@M4~;:+L4~;:+L5:u?o5ֽ׮-۬eAnZxz?g#{ւ{DPxn{>BO" c6,Z6~ff߰t כ?FCK͟٣!f7lL9X7^l?}/ӯ6~fݳ3c\R܃ȼv/V_S!M@#P74jei ? $/I)\EdM ]y4d?N~2_cvtnَ pOr5by rh];&UށHttI]人QmaM MRRR[ כ?FCK͟٣!f7lLIe"׸gNˠ>fJc:^F㰲ÿxJf7lLߧgWicsߧgWicsNW׺M_ߚsWjByeFb6¬qb#&,2H1z~CMƊC[BnL$-;}Bi=|J-`=UTk֌n4ZHAOck)awy0HLJE XUQ5@ =1-͜aYS˷Fhb(,Q2Ł626M8GUUhٵdcTV8p}it J$ge:YIդESGrsnخ-Li$@÷θS ree`˜!VϦxThW`.]^$Zw.nDPluUNO/H ճ2`5~NjHEm3(=.ʚVӫ)q$l s ͖Nr( 2J~ԫ(@)GK[F<YZވAE"`HnnȜB )i˒xLiL7>ƑCN\ oF/S L'&(U Ҷ-X[9W`(׍PZ'(buq񁾛m!z= ؗ>ZN̎0j3K9㝈kfd$FlO)v e<̀mX[6MN$7+vwcwk^i&#5\V2K7#-@"}Wv*d-dא#qi馚iiiiiiiiiiiKZcZcӭp}5vΖ~933 msi9+DZ> k.er2vgÎ+eee30ɇ-AI Z?o5ֽ 95koO1[&&8t_\g1 #AVBǠ]XV0͕S-oԭF3]BUs[ ńj9h8$%,fe $m0p,\1<8AaGW"ygM z$ Id ;p#%˜HAǼ7ŊمT W Rd6Y^]i^C՟AXKŢ cu48 S)3 wa=䙴Y6%[CEp(zp? ܻe/ ;Tb! v #A;l_oPWn%A©q_T+Gى7hihihihihihih+vu~V7:hvu~V7:jt\5~~~k]I#mNG| [ ƲP< $ *$|s-3BYc7W|ƒS8nBtnM_ߚsWjظ!? s [/'yCdÎ5XFy24/9F%OCn$^mHVJ$#2m#{}iea-mc"pI(ܼ-wR2P1~k>-p|2.Dy;8x$]M\I36B]71í*PW@lήdNK>S#} UО;_.δ?O^Q\I/Û̻)VKMP+*ogWԇcƪL J5ml=8hOXe^"ʺ1&SP2hr7[!+G0Aȴc6$n+I@YɌ bK%d=0>SrEF<0r5-޵7ɂLlO ޥr*FJ 5㮟)r_tW 3C!sVck5]X|!6B~ bR7;_N-b=>f쨞!IfBKL,&z[5YjGi !7Om˺;AS#9׫O >;’,np f+2yXxz<&$bFܞQ>HY 4WFcoQȾ߲Ncoz슮= -Y(Q ?{oR\(+fR*f/kik6f@Cxz u&k@[q6ȼSark`14$ʠib5#wf|'d֠$4cs QG0+sա|9Y_mpm"<ð%xGo7 QD.(? 7iDrߗA$MōMx{6c}βGn)#)'^ИNyP(.஢?'8'''?r:NuЍ,6`` 33$fɦP5 "o,1NXFpa\vWVaɣ 4A>4{"ݚJ埉`pw3[6d$Nj5~y[֋\T|e~wqv_\W=+^ HGtzxqtH G%BF^A$^һKi E-$msL(ʈy}1[tr$Lh\|ym;r+{ܗs; lS2)ȵM@Nؘ</8fعQyb:a>oP6́2̤hDϣ]Dr 158bN5Trj֑,9t lIbV$m<^XJ@"MZ#}l*o2"!/+ UjLY\4_:|M[sMjv> U G4RzӘta~]gCeQ'KذYm 4@M4 4@M4 4@M4 4@M4 4@M4~;:+L4~;:+L5:u?o5ֽjUcM9k̯_ Ɉq ?fneҭ˔U6b 5nCdPnD(c2, X͡Bv4gqSQɼ8lMJ`3[84-6*Fԝzuu +2l]|g*hl T4^L2~X_FMX)}\o8c MP+_r%OVJ{K@PYo/~-ۍĩ 5# 5d Z4We#wPTeb"p5ev^p"I.!Ql-w8n"QĴhԭsA Ȣ;MB:XĿ2$Ĥ%uEAX0oIxHv#]-$>ĥrkt#f=b+++)&Rgeof60 ʤRt8Vw 70'ćה]^$.uZ?o5yI9d۟YO-`"Oݤ~Lb|_6"6̬oU+hϐB:_ `*<|a"mGퟌxseOf5uR8 , s\If[umIEG܍٤܅hDאp'N!PKHTkJ-:$B_[!"fprN[6jky(# BW f XDEFpcx83.&]aGeͯ. sI'{3ڌ>Ld0JxP%_6ʀ3>;__nXXu7>{8+\m=1s>hayBeHO9icu+j(^\4]8D-[ 7m Jj?Le`1(2FEm@>I\B_mB:*_qJ2%(u2 ]Lt=ʚ9.c7pr{[? 8LvPCnLq|&X ttW}y,|۴}!?_uG=!'AǹFnhɎ\㮆?#E7.I xIW4(::yfy#gŰ-ǻ\kXDi5c8&?P6g0Pu97ػ3$3$PaC8slW({ژrGrF{V6xm CȊ2/o+< ;uy93i XWM8m! g"|+EVocۅ`^,VCB1­+~>Y ^63 nh:,owPr 쯔TR /v'}9c=#my7,]Xuj<5a%;̧Zf #2Les=u" HGsGRyϥ-uDK9K9 Zvq'- zfUE+fiH)ΡGy\pG[MrU:q5 `*00s;U՘克MQ2 n+|RM6DKladZ,6V)dⵕ^$$$,",C˓,]~@els<|$Eg% vy"y(6,lN%lxttkBX;JXogLe s;㳘Luun}"y )GK[Nh]Ux.jөcoGUczNw?BݶS { ^^ܠ#}eP9 ꦎ$Lbl9g U!,b*]wwO0W̟z>j<]J5ݗ8ج[| 8c z\AVozM| {}YD 0b1"Qkl10.23>ɧqE'^zfOP{-j8Q6hihihihihih+vu~V7:hvu~V7:jt\5~~~k]{}5v틘@[ԄN}dĬbQu WpFXxU4۵v Y'1nBg P{t(YMVw)P6&?ݯoL}E'" UKPDmѸ ΂1"puBT7jRQ9aP:!WT\~IS¥ƘE?N}5<41YVH[*=ϕ?)CXyD-qbU5RT~՗3!łlp۾i b{S[2ʂYIZ4vbw.|JX1f $r(0p Ģ<ݫa՜ZKK\XZAfS 8\C˷ 9g c٤7`1t<rgȺ_p)8yEL(d!^vu3S׻1oadpX4Q a k]`*-&Zhz@D.s.6NOjnٝH-fbك,zyԳn]Dg,}ʽݎNs{SS,ûrHlNHZ<⫭솈%|1xoO`oB&Rp^x Dty]e CW%5pPq弆*f\:^@j;3=ARp,gǢ1T_8}k˱(oɾgqqĿ`ߑu*!zoU= '}f3ȜIac--FDcaSm$m=ƌ2xkI_cHkQ|l~0~TV&o9#2S Fm 6ʦ%uˁhFf `Vcʢz~?*!N0_U ~CwhىXuKu#2I z YU]m~Wќp]P.9=!-Y 2f*w]o[+њqJ +T@ ~d9ߐ"FO˨o/UƢ8瑸LS}g5x69 MD⡇~CdrM,Ss Ȍ^g)̢őPW+'1*ܑ2+/{8WCb87{Žvy{3i|m]n003q7!o9#e;UdӋǼVB".C3M.᠀yᥬ+c tiiiiiiii Ŀ~_?Κ?~_?Κ: _ߚsWj#ܮ7JvЫ!6S2#MHOxʒ`q@B#nC'6\sxV+cc[Vٞ_KcJGmI HXsoGf|NVL>ȱ $OTeӇ6y@K]~$ WKGKWʘn. [%h4*n%dL&CV`ovҍ2!QCڷɣ+ ۺn Ur%nm=rSqЇMt]4kKȵSrESa^9J6!Wq `kH]UjʎR(8Kd {)lZl8#27▇l0'`\'i"yV" * 1-nfjg=`/q@bNd_HpI'z7R:-1/Vd\(7ׇsx ʇt1+KX4Pе ?yer$ J#$mc.FÒ eSPe;8A 節iZD{!j` QtipcT׭&XBᚶqS1LzxpYBp{f}USXJֺute.$, Ȱ~5%Rq5N/0'qzN(b67¬ӓlk[*ZCʈ{Ev9l8}!Ds{_HZ來g7=.ge3Dj/G'k:ъgQz]]5kWIRH^V`kf@ ,3c=VAOx_r#ܔtٱ7x7[q}?EWǑr/0kczƧ!>[)w(3y!-TWmڑ[nYH&=oQ7 @d{sU{Ivn000هX))Ð#.:2M VCQȯ,η 8*wc[#ҩA+ KN;5l cX! u 2`TA4:TӶ<\;ǔT% -9d+ Hm7b\p FϒBkݭבldI:dٕ{M4 4@M4 4@M4 4@M4 4@M4~;:+L4~;:+L5:u?o5km#O̩ʄ걓9KnCxYěZctKeculn5޴n$lL0*x7YE_jFEap78Gdܣ-gL#hj!@vHˣZB]԰,`WO ʅʤ+"#sYSа(UN6p6o=8&9wVDHc@MMZi(t O~$dJSbJcϑ˱9g{[%'68x@:17Fݱ HQFQϯ%2ᘒYM2߶/JА;Ǫ2@Y&ZhX,zp2Wc^YO"Bn[bhl#8.c(i;sU6iح@2W8ݐS%۪QYxw*" ZϾ&$qNf2rS"4n9dr3F__VckB~|yzF 8,xq $(ww :m"kT QZ"!ezq!+͍kMrywb0B3SI^#{+5qMC_+ZksNAT5e|[KKtZcU5pl8o8M ;z#l9sAgyG5%D=TgO\/==<9ⵞW=xf9lmdd {+ %'R @Y.eh=*sr_B-+DžI:,̙5TBs^[/)k6S8KZ2W=J\XYlf{irWUX㚐N%;$IhżCo%궬wS? x3זY X0ю]NWE>m\'Dz*Y-V mhʪڵ*8[(W>|#h nP]Q.PַA2,kð2Ĩ}gm_RXVOKax-JI)o9w[f劝9o(Kr-R7l-ℙѷ7H؍8WᤑբT["UҺzL;d~WSxFR$Vk~}EWn4J xKז6CZ_RplUm [tZSj :23i|3Iɋ?)a%l,:( 񪮦ڟGGO]+3!40ʌJu5(Q/[jnqdDjDbe:~XW@Bspq'3 t)?y6_S->jYFzsĬ7h/4{ve[ru"cAJ n1c5:ʨ5cU$QC_szea!(Po'ĕSNyBL@dKV]ZK&"ָd0b3LVkH{=}7vCǸ=BU1םޓΈozkozG~hihihihi/ߧgWicsߧgWicsNWڌ:f8|H lDL"Δp 6s+Mg+شBM 軒vo&@[kzM]|2x}5vʠg-n9JC;ql!΃;Qqq$I=w2 Xn`c]}^<8sOeeM6=ZZ, c'9Z`= bIiyituszu5ma嫠˗ssKI*q- ?+eQ aL(DdIܶ+1"r$0FȌiJp . 7{.il%D@!4xp7 Sr a2:&ɒӌC.pI$ ީ:6(KKW.]],1"mQMWS-Ո]dllx4@Pf0d#וR%QUˋeSm[*L ċ#z>gWs<1pϐ8P7 o_5 }/ 66,ɸ/lm`U (!Y^7y*z;˳L/ mdrIg;qY4|">ҵy%+lR]Z8,V9IOz:kܓs/y/Nk^?U}};Ş췽0D-S؅V8GEw6іHw'"^7~GlL/] {KjHmK.PE1þtqʚ]fvdR.;E×ڹvh?"BShgB*)㫛ʻS;ҨIQtȧl4-ptVhV-|lGhg^Ս(o ql.MBs@NY1keuqskƠ@ ӭj=t00ϤJ;H3:涺0bKޏꬢFK7XK!f, {_c%a>vL\xX{(/r_q#S"z8B%30o7wo2#FԦ WWVDEEa9Uxͨsz& h骉dY/G^sLBq':-Rd"EEL ӘD^ %dVf/Y~Cq_čd8=0^SX"ȱcfad:7P&D./yYEL^VG.\0[?z7X`KNiiiiii Ŀ~_?Κ?~_?Κ: _ߚsWj>ɹy` ! iym1YY63% /ȵ!! iuyui.U3gɑ2dۛ]o)EDDUDjDbI>ղV4-hφF옋#Yma ֈZ94l.!CqQG1$HFǝc'˗#{syy`Q n xI0X3%II(gǵ! iKyKi-MlƏ2;{;J_pt'R;3ccvu>F$ċ&uX/Pq)ϗF$N)vD+*@+A.+aUgQ*`nG#MbEٓE:do8g#Ey';^"EUݗԪ3Ǩx07#;ԥgN~5)~þ1f:f7l^P2p/j'݉t {}WPDpܾG5#C}^ITjm3R|%mHɁT!gƨ۫>>ۭ5+m<;|;ԥgN~5)~þ1f:f7l^U2pQ>$(ځ&}5 \/+#/^H.&CcB>/S%,#c }}g:#]9w'~U?/=)Oƥ/8w:wKΙ11f:`x\IKչF2Z`&y@ZIȑzr\IZno SݜOݣ(:j^~5)~þӿJ_ptnَ1JH&O\Gi}eaҶIh$>!Hq-.,TJہ>f~nn bK FShebjFI7^I T24fUUq/"U\Vƶ؋?b=1wKΝDjRc}cvtnَ;Ւؤ L#at6k٢52/:>ۭ5+m<;|;ԥgN~5)~þ1f:f7lXwV٨n.c&`2I-8φP+ƴ|C>5e4j*ՅMY`VWSm5$!22N KU²e!2J|[ DKeդVV)RDgɑ2eF/Q?XlOƥ/8w:f7lL6\nf-SL||H0 @5Q lҔ2EDxMO9Aplz-_'z?qz[ɗl5_TvNq[4FQaEWǏLQӫcf;ԥgN~5)~þ1f:f7l^U2ucqm Es5bdZ^0Xh7h,ogAkEMc"~亸;dNS.KZszx p'BEm\f]_^ZY\;vuk.\sJ_pt'R;3ccvu֥'R;;ԥgLݳm5{ԥgN~5)~þ1f:f7l[kMj^~5)~þӿJ_ptnَ1ZJ_pt'R;3ccvu֥'R;;ԥgLݳm5{ԥg^yNQke"=ս-zd+__g"\/>eloo} 1f:f7lU~;:+L4~;:+L5:uYDD nAkӽhsc~ggo88q_9/u~~~k]xzXf97oYtB#p:_^iHOAr}˄ wSn!], o…rV_?=!rV_?62lɬJ2jC-o6i*C՗:uq_9/uiz՗:uq_9/uiz՗:uq_9/uf98emdw{zx{+0k~ގ'R @ge*sn'd=\WC:՗:Ǵd=\WC:՗:Ǵd=\WC:՗:Ǵd=\WC:՗:Ǵd=\WC:՗:Ǵd=\WC:՗:Ǵd=\WC:՗:Ǵd=\WC:՗:Ǵd=\WC:՗:Ǵd=\WC| mno^ol[nmomnpnmnׅ/ߧgWicsߧgWicsNWڦ >t(DEʔ8he4pWsBϾ2dT;'W.;jkZw5xAQ"e) TVG^d si3vG6i%.;yJ& vaDbWj݋jg-t̏|^w z{c;qO廪˰ki0ĺXIA&@UהUyp l  U$HO6Tױ L; ?D|2 'h< KےA ?(0ҵ욽Lx2=$b\\*i$+\AOg±P.J0ۉxۥ\5E^>P:0DK/aǿ w"XQŶ-3ᡒ 3S߂9^QcC o$N &nP!W diJFUn;WW0rmDQݴEmreVi 1ЙL=q0P3r4 R+1 C&%ms$d8}As 8e1i>6ɫIfLZ/KW2o(P;ՆU;IIrL  B627C=UTxttq"ōhُhihihihihi/ߧgWicsߧgWicsNWڊ ,QAe9>zWSQ =[x$Rx=,3suDWjTGsO[Ü">f> )1|n LwW.H6wtef|P`¾k}sxtzUwb;5IL̜M05Bs)ď^.mҫe7 h+&.̮Y:aAP=uސnfLoi^r1I祛K+D:t7i蠶{&53n2̼F7B95űsqix kzR!QGW_鱉Hf͉qcO4@2C8 #6Ej&$n Yӯm^DS+n~ jٛcϋ_ eF>1U^>Z"ľBב{&h1N1֨u4q*JrL[vlDbm5km+  j ʹY˨`X Zcx(m5B 4@M4 4@M4 4@M4 4@M4 4@M4 4@M4~;:+L4~;:+L5:u?o5ֽjPs˃.H6(L&|QVz9+p/ Nm"y-e&ɖHJ:C*bXT= o- r)z/E[xITWCXF 0KDov/WPOU>v<Ӕم :K p.~UfNuveV27TPC<8W]A)vQ5tTf#˜0`8?VVUیѴ3fh$ `["-5ýx\i8oڗ"-ŵՕ ]^T Ħ#/tUKe ŃPg贎a;Tp]kqy1 kT3Y*|$9ޔ1>/TѰc ڀ浧[VeaVHOUzp=!: kr\1/k|;0KJ*nhg\WN1 ;#!x8c o̘ K0G6g d~]մJ2iPoaAx^OamaSޯN$o?s LRDvj(x2q1PdBxȺ³*F*l"vhihihihihih+vu~V7:hvu~V7:jt\5~~~k]`72T|]#y&WUԝ Y96~Xnx;^#IVG/6 HתzXhR _ߚsWk^ 98d⇝.=$C;!9qdv"nUʓkPooE+NVwpgN!v~\r <JS"2YA2rV*\@Ѧ{SxE~Lx ʯͫ~%@頩sG9tMJ^;bd!"a-dZ1έ7Rrc$.(w{(ѝi@ {a=\-FǸ=B+iލ?\WjStEt]fo&|/!? NY_*4"}XhM@H$' B.fyu2%9Zfo4)tf?630|\{*;']dK#~@A Y~ȕ%^wIQfԵ es |0qI亝 ;δũ-V9ڍ0/< *H< 3Q1݃lBqs9r0[Pc'{˺V{΀ ZNIԄ%ioyJۗ)h*]Xiz8w $pļ~X:Lު}TPm،ƃs0#/iW̓ H{屍ŇmI]C0R2q9Da2߱oK t[Ga7禂ziiiiiiiiiiii Ŀ~_?Κ?~_?Κ: _ߚsWjV<$ξe_Fs\msl" o2۵ >4EKuBJ֧_jAV""ndAgoI6P*;( iNm3pżex6r΅ V)K+<[g*Ɯ\JZd-%r6Z_ۙ_Gt9⵪OKq3*+95m5ҡӎ#F7^I3T4q]`'yU.Pi$' 1CJ?DG;٢˅+3LIA_o#y%`]l=yu7r ۓ8>S-^ey`eÛ=p_lߎ 2 Ŷ!["ݔ#6U,p̶Ng"^R,8/OTG, oR,dB\Tc)8Cv%dL1ӿ qjw>nت s4ٷOE:Sk/8;Behwr-1fLП 8q忆іY+)JG%/lӀр"mEU`(y3sohtIIloUk`Czd˩E<ѯЇd)%y.<*w*Ł1M*L\{>_ND!E{aHd`S䳼!MmFl*2t $ܪǢe{W#UEc΢z Oj &8+is N+őR ͋oCDs3T"ZU*,kldd :S ݽyId/qT"y k>zmYLixh/F{hѷ3 n6aczQoS^]- 1PHpxwƸc3Yvng/K;ᨬ;<7wnkܣȼLdG0;W6=O+\dCBҝIILWlezA ሇHp#b%XJ#̲Kl^O jr1m g&UJށHʠ:Cy~-}r uX;Hɐcyo$ pVL4p1^GnuC8 E$-6yvjxÊydw.̊܄O.k*h}pTKT'ZFJ%1W=/rI| dZve6%=(F7KkN2l"h+H|=\9#ىo->HZ/|yhQe1)B-jDإ5\[qJ*m'4sz!ipRCU=Whsr'\wCzgM~fY (:Sp!8~Fo UnUErd7ܶ]@R1JZ+{% $Bco~f(5Com± *HSZqmד/Vib UF@_.H@JrD vFfjK[j<9}VY3z7J6퟾˨K̶TوTѲdqn6joEp ]GWsA0~\Jlf2QLtGQO$ÍU2Y@btl)\6D3] [LmC! 4sss מ6)V!n`<`t#u JrF*ĦFLB< guJ[A[g^e'Ⓤ6^&YCƪK'%ޜMa* )Ee1hBo4/P{c J.4MЄqo\X:;qTxtѝ;6A~; *Tiexxs9Qh4KelKiox?h:d j.i1Lt![sN^3ޢ^90e_'mrϑ6YfQE}  GH1$2-mTrg2?.57Ö:K-U3KEVbPhU߯&=c 9S}@?YMBF.s-&R@ӗ1X$ݵC2,< m 6PsdV~\*bx:![ ^/۴w%ρmg2qO2lw)59_l=ȁ ;C`Ha;Iuj '~rDTs(JKʋYy{P[{qf:+,_E\C\\P+Upxͳ,9'8+2t 6-㧨UYՌX§&?)$Tq>@Bh4:bVR)W@y-hڣmGMK>IQ>PdsrL}"{iCv$X ˪M44MM44MM44MM44l 5vMۓso߉ǿŷ"? =ݍ-߼s4j&!t udTIal؟r-?zosbⳋ\|s6|ݝЬKZcZcӭp}5vu;/yu[)YYfӹ-a&6R7z.Dm:b8%TŶ_dh7v B;J{no?obR3*|7hQiyqY2E269lc%/[& h'jkA |9eYQ-FdW% pdAy m"X.^A65A#A{P@=)g}b&E6n\PQHUН21}"4WW)F..sZKM',כ+IAxɷݣ1ke{;?}nz})_n|La>1O>⵾}*-6Z4-'IvH]F>_U~Hқr_-{g@u OaAH۰ȺN:J֠paT(/CدM:bV-yhSGMu@Io>Ԭsn4}huW Ī44MM44MM44MM44MT_j[I3q_㓵mG_s&ŝ oA%ڨ۝3o㽻C[{*-n\Dee$ӏۊLoLHvl/YMߗr|`(yޚ Ŀ~_?Κ?~_?Κ:ѮqFQ$SpP1)3GPULo}ߙ3zG_) 4w1NǏ[_jkQo`v<lt79L}˙1.et7;cϬM1.d ;cϧ@|c}>4{7X7@|c}>v<lt{7L}˙`v<lt79L}˙1.et7;cϬM1.d ;cϧ@|c}>4{7X7@|c}>v<lt{7L}˙`v<lt79L}˙1.et7;cϬM1.d ;cϧ@|c}>4{7X7@|c}>v<lt{7L}˙`v<lt79L}˙1.et7;cϬM1.d ;cϧ@|c}>4{7X7@|c}>v<lt{7L}˙`v<l*Opm#𥕻b?d@9S+8mmoq{7L}˙V%1nt1ntָjUYYlb+1џ\Y;SSyፌF6U^do_5;eƖyy{jPo YEa̬1ވҘ}o/Vua6 b*\{}=l6aphn b1=UsNj"r+X^_ɒ"ټ!}x*MZV%$k H֬fƯ*bz|bͩJ׸DD ИOAz>)l܌35nV>;9Ÿ=W+jk{P6pF[9*wÂ+E(.i- Wwȃ`#ۛmquN,<(9\ ;&( e@@O!nR'lYL즙HǵfN~'Rv<ɖ2E4U[ #rZӆ-`NY\,!dP2_Y#yG`g9%T# ct#bd/ ͂] R*;tc5f\ M0LflAYDZ+H2{DItO\( m~!ȂXUX$ZU M44MM44MM44MM44MM44MM4V%1nt1ntָj\ɬn>4'}c{XuWOz_[_/zgX"{njU劲[7rk1E 7w'Cg'הr"A\C/#jޖ1D*jhP=5M>C^5b sl54pJ헴U9&1 Omk \ʅ~VOkHg 61DÜukos—biMeQ&@ VG ^$MI7ÁgOa2[w']Dw7]YCܞzJSGS:׿Pouߌߕc~&>S%2 AIbu)ҮX E11a(lA&&8pSkUuwnz,>AoFk cԧDI(/w1 '׌X`m.死ٮw;ڮOm{{#ÝY~߁7gU2yyޕ.>hbF%\+M}}F-g>CwIT{,WKVn*8qO <7ܙu;Ĺb9b ?yŒ >"& ?wiMfc$;H-eama jLQ0B?Qe eZ΢bvyWeMcgo+Z}6vunX0f򄾇"(Sym/oR(IxCtӉu~I}Z%OŲ%]+ȓVM]G#{+5qMC_+ZksNAT5e|[KKtZcU5pl8o8M ;z#ˆjLQ0B?Qe eZ΢bvyWeMcgo+Z}6v׬հ8juGlK(j Uzkb%=ǧlmM ('{(#^4xV坹&> X6ke-fy~ FJ粰WuJ|jcͥ.IS3`dF^ңhf|{${ׇҺ*Q=H۹.#&*UIjUeMҾY|2m5U9]T^& ,t yхgPҍF;b}=dj1Ht$5!Dڝ6KF6vIыx2KmYM$7$~ -ݺj$̳rBo Yttmʆ2e]w i8%FȻ;jµf\{ jRNLHy˺7,Ty3yB_Cmzm6`o$΍d!Fi຿ $dI+&M4 4@M4 4@M4 4@M4 4@M4 4AXӳ1Gӳ1SZ_jFחdi#3e(VjL۫b*+ rtJ&՜_CSUO]QIvdWڈƇ8N^ GLar.G7BFDj$SdY>1],n P9r d ڈ ǔo(^mtkTe3R3-qZsnYKp&4[+&t{s :3Gq'Gzv^8Fo NG,RvIDЎZ޿UoNҼ78! P4WƟIFnjHhD hI m_ @kFB=yU"]]\U6ղ&m\'Dz*Y-V mhʪڵ*8[(W>|#kwG&20xezD=[ oQwUay%ay1%#l <|2="]B҅W7 yqtג|Ý ^`s%NHJ r,-Z4vŬmy_]H+1/[^[Gۧ i|!I7`B-U6RKUmhqLceD7 HJ Y'ּw&,;8 ų8蠂ƪj~=tG&nt6>z#&*n 6e~07cY=c*U܉ 4@M4 4@M4 4@M4 4@M4 4@M4~;:+L4~;:+L5:u?o5;2LU\˲{0:{>ylgDchlEGCMؘ :|Fgw,;]%>Q4 K toHc]][5*b c:NHD6/3H5>ېn0%@(ĒdNfX H8I>ׄx;Q]hkyhLIelK*ɞ<Ŵ bJLN)^FqL+*hMG6KG؏Skq.~ ZF8"oLjpqÏ5"]-W.3#x/% 7g5&~2@L1+ll!2%-ʘjΠ!eMsʖjTe5~$uuxdmph9L e>$ {@y;ak_W>yH ޱ^V?zKnwW{o^uϐ~I!^| vDЪX KhbS6w[.DLJ o&ZnLP=Fo:"|}ɢΒ nߥM`hVF)ٴIS۳dq\Ӻ 'Bp{oj}d\Uy;Jֺ oe.$} ձNEBKƢAК^P.;0[MlGL ,i̡ ]ےm"KcFMGC,]^;3Sߘ=j F3UɎ&2{fO4$.Y44~WT,3ckg|QlA5Fc DehT A`Jn:KR@ pXl@TJG"Kwiuyui,}\ 'ϟ7VKeWv|4DE:ْW:]P u!'>vD|Ds")3 [{# L9&KC[1 h!%-*'WD'gd_mtY?#'I.VFLø%mӠd=vA_nu!!YyQdגBeU E\KȕwW"؁mejG yB((]Y9Un(G5$ћ#l~؉ʁFWV}~ MJiESHcsJe8$fg8U}p`-?flĺIXD < aSd$ Y-L6;`yz'Cnf늭#^("CǦ(AU]mmplQ -:F/i< 㤖$N)֢+kͱK͡dY+mHܖ.,geDMl! ~irجw\E((ڪ\KȕwT2K і;ЪKY722E ?xӈ?tY=Tŝ,2=fj~,|A#TQm>֮tlhwć@AU~8ˍuŶ>$-3hcQikM{dcɠݣ88XM]5lv Vd ~a=A(+'xjگ&@\Ŧ&kE97d)t 1Y-˅!V\ ЃQzoFWGWꗖW6>Fǝc'˗#{s74MM44MM44MM44MM4V%1nt1ntָjPr2ż L|+0Dq]3{LJaCn<,7رĿYr2uy8_ߚsWj6XX~[ (ũ=0𭷊Tv[KC&Ѵ$ӚK٣%d(PɎ[/^5d>kQ롇0 }& ]_QA5ְ^}TpG.ZnrC),!oGq?yz't;x<5gk\ l*AÑ ݔ9C G ,$f{Ә;%tV:nڶm؍9]ZjI2i<侽 YO߻_^r 9bsr+#ۜ5j/jedȦtNzpFM\В$X̫-Y\sǯ."@+i\?t"*abƻ#q ,h./M\%^jU SKqKDmu8#͸5nrGJi%֞iwŤ䅌Ck{ss%7(iOM ˑ~C%MySW\^OTѮh 6YkѺ`jBi\38J|$sGj7Sd  (TO-a"yZڍ@< La ܃Z q[Eྃ9FC9Ǧ3[ sKe="e({P&Mvvd!ß>,KjgrDayg:B=*ѺI*WؖZc1N胅X |;9sY B六1#l <|2="]B҅W7 yqtג|/6+,)d|\iuQCیy_ds*Un046&2phpvl*`4-xˉ[JGd-hZe5Y"٦VNa)moS Sq8YE/Uxk ۂK<%njGKx;WQkgRW}}@5z\;{Y%d`㢳%@kaaAG@ ݭU U5_ ]tSPj8#dpy{m ;Y<)ZN,fZ[3Ws':ްlwaA ]V5 'DA7 5q̯Ƶzt&%_.xŁn@xw#',]-'׸~yNP>K:^IFDT޿}_i8zG4UGQ䪠0n9Afl9Lt e7`2$SV]_͇32WaW<@&xaO sVo ZD'Җ`+hD E o-G) Ul1)vXIݺju_Rℕ{x5`(e:Ɏv5䶗GW")GP+^=[;nAܞgu˵.~J?c%v[Ob}={P{ׇ8/?&䜥V`/Rj& -KqJ47NZLK |{P3l2 1 =⸿LxUI//UŴ_s0SW^frD!̈́` _ K(`\;537 cւ%Ca4MM44MM4V%1nt1ntux""fzvy{QX~dvdo5_ag\1Fĭkco'R;@&Uއ$/ndZКVlOƥ/8w:wKΫsscunl{Q?XlOƥ/8w:Nyέ͏o9չDjRc}Q?Xl:i:6=Vǻ;wKεc̃r$C=k eI^6 =2z%J[2llOۏ2|~ȻO9չ:6=؍AN^6b %bD)dL_$[ T!UKW.]],]i507H݇[?]Oƥ/8w:Nyέ͏o9չDjRc}Q?Xl:i:6=Vǻ;wKΝDjRc}駜[Oƥ/8w:wKΫsscunl{Q?XlOƥ/8w:Nyέ͏o9չDjRc}Q?Xl:i:6=Vǻ;wKΝDjRc}駜[Oƥ/8w:wKΫsscunl{Q?XlOƥ/8w:Nyέ͏o9չDjRc}Q?Xl:i:6=Vǻ;wKΝDjRc}駜[Oƥ/8w:wKΫsscunl{Q?XlOƥ/8w:Nyέ͏o9չgl [9۶sbYVY3Ϭ+ḱaa]saLǹTIQ6IkXiٿnetgen-6.2.1804/doc/pictures/main_window.jpg0000644000175000017500000007415313272137567017437 0ustar kurtkurtJFIFC    $.' ",#(7),01444'9=82<.342C  2!!22222222222222222222222222222222222222222222222222(" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?5 7yup4O ;2ԎS!{Tⓦm NzT0UHi׫7厮e dGa$*$]ہ#|W5r^~rυy> TPVB#|,??OX¤P (|,??_ٿ?SG2v w:k೼%QX{<Tz{m.SR1oaŴ]BtRϑ_E<[F[ߊ_xCAvwu=,H%GV!~OLVO[NjpFeŚ iWj/ ə?? fO*q4Ln^+W̟Uc?3'Uvg^+W̟Uc?3'G=W_c?3'G!~OLQvdWj/ ə?? fO*ð{&x({W!~OLQ_?2T}n3|aG+ڿ fO*B1@pɞ+{ W_c?3'G!~OLQvdWj/ ə?? fO*ð{&x({W!~OLQ_?2T}n3|aG+ڿ fO*B1@pɞ+{ W_c?3'G!~OLQvdӡKUY-$28GF?L欺^{m*.2#ܙ“Ͻz!~OLQ_?2UJN BKZy>[,l̲bǯzeXD[ UI鏥{!~OLQ_?2TzK8I<}&9/k{J*0|S.ukI mmVv 6gNc?3'G!~OLR{}'}gN#keOK(F~9lvY&.$3byM{W!~OLQ_?2UJ$$+{ W_c?3'G!~OLQvdWj/ ə?? fO*ð{&x({W!~OLQ_?2T}n3|aG+ڿ fO*B1@pɞ+{ W_c?3'G!~OLQvdWj/ ə?? fO*ð{&x({W!~OLQ_?2T}n3|aG+ڿ fO*B1@pɞ+{ S0!X~5%GGz^_?2T̟U MlxȳӂS:$4+ [ N0:ײ̟Uc?3'BS]/ܛܵip+ fO*B1@0Gj}-t8/-?# -N>V*\w;ȃ׌Zj:}[+v3H?V]Qӱ<͙ܥ~׮ӏCҸ%3lbu=jsIkf4/Sp!C*I j:j$:nJL"yTC#`yj7V:ψ4'Xh}>.\IKy#MS:|s9sFaqr$lwl#cd|:o֠>+I o )#6y9n MWQH/u;v .$X,U$ z[IhaRߞH'j(d. !ym.^< pIC$HYA*q Eqpx}Q"y9Eq)x"HA#TŚ,IӔu̶0A*L_܀U2mG[^-ХiRC:4J"f6I*Lgc#M"A4j,ᶎ Xu2d _h̖i%̤y/rM`2N(,Ԟ(nx"|߼h|mP5/mQ<;Vy[إg d}.]B瘭⁕VY$2{2y-H!15]Qӱ<͙ܥ~׮ӏCҹ xPoiVB#{{u2>TVyA-pxK[XyYd1~*+VSmG++[-7yWiuqm Z)v_0y^w9K EqrUcm(ಕ57lxʋKK1ɕFIfp-`@#ö:l{گYmHHф;E `P&P1`G CvHy$|hn%U#p%Z$ T!\@B1$F3#cc4BR^E,CV97+`Bb(x o -ʑ"427pF#A, iuoXg#Z4[ E] j$oM @W,m^gtKe,RM]+⦡}.NexjVVY T%#qWڬI:Х.<e8٣pQOB Q:ZP[:]of8wx9 _u uKtۦAov"JHy 7ˌ(P o1f9; $rB;mڤ+qGsjWڮ-e{y"S"WTJgY5|Y9ZP8NYd p \@Z4;-V<.D{H O=Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@|sxrT94彷kؙG1F~ZMS:|s9sFaqr$lwl#cd|躍ƨvVêiapj "/Qc>q̚O4?[}sG}6^5Ř$b6$mh_k,e{6iʻPyLTmHjPKY7 `yVTAfOJe:뭶6:$G6vl@ k4tg䐂H]fc@?_@ƿEuacSsow_duI\N~v?(?Z פ/yAi_5[_ۏ@]cn?u?٣oԌ ףq /^<xf0 ׭<uTuMUGZ82~PǓ ?ۏ@]cn?uH.CT4<u@ۏ@]cn?u?٣oX_ۏ@]ch[4?GX_ny}<an?u?[xf<u@ۏ@]cn?u?٣oX_ۏ@]cjZ\\Y}Gq /^.zibJhq /^.z[4y} ףq /^<xf0 ׭kke=ǔFϷ#8Ecw-ՅöXRp @ۏ@]cn?uǘoΏ1ߝcn?u?[c}:<~t?GX_ly?X_ۏ@]c?@ۏ@]cn?uǘoΏ1ߝcn?u?[c}:<~t?GX_ly?X_ۏ@]c?@ۏ@]cn?uǘoΏ1ߝcn?u?[c}:<~t?GX_ly?X_ۏ@]c?@ۏ@]cn?uǘoΏ1ߝcn?u?[c}:<~t?GX_ly?X_ۏ@]c?@ۏ@]cn?uǘoΏ1ߝcn?u?[c}:<~t?GX_ly34b>1? ׭<uG?٠ ?.z?sohq /^.z[4y} ףq /^<xf0 ׭<uG?٠ ?.z?sohq /^.zֻSyLTl|3Q5Εou(Eb ףq /^<xf0 ׭<uG?٠ ?.z?sohq /^.z[4y} ףq /^<Rҵ&d,wT99 $hX_ۏ@]ch[4?GX_ny}<an?u?[xf<u@ۏ@]cn?u?٨nS7>0gxΗ>/9S`8R }oO3eO= '󢺰 1D]El".^p"dXS\6[STi渍ddBqXV:)M WvVSxu>R*n0,'²bŜZ=Y\m+9S/8rNщmBD67ڍݡ+`!>! !-)o,34mcSzݞ,d\ @XTr0Bit=&ymKKiZhИfΤ|ĎI}CeW,y^sw]3@??alV??anM,I7pTtß:uOK5x-L#$+oloom f#)d|ow 䮦=+NSS/]],*%u*OaQhzNEcZdX-Wapᶒ냊$s,Ы5p$ҕ+4%aۯ\ik[s]d*@2w8۴o)t=&ymKKiZhИfΤ|ĎI6R$,U(,ij;I'$ qm^O;=5-u+{giFy-IVS`W?Iay^ :pHq0g  C r>m-mm:q628 0OԒhzLbt'>Ǻy||ڽ1zP)|!_ZIXO4Ov ujZx#a7ڌZ(sy-"IaJI]H#AwiڂL):JB$T%6G H$:1HtۉYmڧYXVn!$( S4Oj`/lm, qNH;wCm9TKi @r2O@:vch^XʕFݹǣ>'/Zج/ZܛY*:ogT^a%ȓqokM̂Bg@#;()(z9/,5F(0ĸ#;FO6.g9(eiw>8M*sj$Ҵu89,-^BT^x7>+Nktk S @֩v,hvJNxtFRI-n"y`I@Ed>2[b-Z^#[1.tYRxE0 2#R_zOOO]o 's/mCO 3=-IP;@2QWKY6 YjK#NFK(!C>v'!vGdr!kt)4]f'X٭`lI ;]́dOT׼ OW-{o|O`oE'm 1xRK{l< FK]-݉ffORNkK_#+xNɮy|Llqϖg?-'5oT?-'4+w>ZOkQ3[OWMi+$lO9#v[q*<~T^蚦q&РgUEnIv~[q*<~T+w>ZOhV|?g7@g"ƏEnIv~[q*<~T+w>ZOhV|?g7@g"ƏEnIv~[q*<~T+w>ZOhV|?g7@g"Ɵ9VH22sGz<~Tyo5MFϻKMA20`ϖg~TyoV|?i?7Goʀ8EnIϖg~TyoV|?֬1xc5V8*p-ߕ[q*?+k7Goʀ1OD*_JQ _(?~Tyo*_J?OD-ߕ[q*?+k7Goʀ1OD*_JQ _(?~Tyo*_J?OD-ߕ[q*?+k7Goʀ1OD*_JQ _(?~Tyo*_J?OD-ߕ[q*?+k7Goʀ1OD*_JQ _(?~Tyo*_J?OD-ߕ[q*?+k7Goʀ1OD*_JQ _)x:XʙAЎEmoPi?[]oʏ-ߕqϖg?-'5oPi?[]oʏ-ߕqϖg?-'5oPi?[]oʏ-ߕqϖg?-'5oPi?:Nwiim&``t<]?oʏ-ߕqϖg?-'5oPi?[]oʏ-ߕqϖg?-'5oPi?[]oʏ-ߕqϖg[Xe ZZ[͟1VIl<=t[q*<~T+w>ZOhV|?g7@g"ƏEnIv~[q*<~T+w>ZOhV|?g7@g"ƏEnIv~[q*B8#ހ8?V ,_gm,PZ+c!kWVf57&Wx`\{_#+r?ʹ3Uv(QEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEU)7Rs~ʀ9ȅ׫QGBը?jnM?A\G/WCsfbQR0(((((((((((((((((((((((((((((((((((((((((((((((SoUڥ??s> [Vȅ׫Q]Xܛ_#+r?ʹȏ׌_*V(aEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPT\߇J*<}"^E> [V 17G/WCs C] U/QEHŠ(((((((((((((((((((((((((((((((((((((((((((((((OWjTxD-oZ<}"^EuacSroȏ׌_*">^1"?/_5[hQ@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Rs~ʮ)7ZzxD-oZ,Ʀ C] Ux+D}bEt0_W<&j.E# ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ??]SoP1j(ZzՇYMɼ">^1"?/Wx`\y|Ll]*FQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEJ*T\߇c!kQj+x+D}bEt0_W=?A\ػET(((((((((((((((((((((((((((((((((((((((((((((((*UvO@ǏBը!kWVf57&Wx`\{_#+r?ʹ3Uv(QEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEU)7Rs~ʀ9ȅ׫QGBը?jnM?A\G/WCsfbQR0(((((((((((((((((((((((((((((((((((((((((((((((SoUڥ??s> [Vȅ׫Q]Xܛ_#+r?ʹȏ׌_*V(aEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPT\߇J*<}"^E> [V 17G/WCs C] U/QEHŠ(((((((((((((((((((((((((((((((((((((((((((((((OWjTxD-oZ<}"^EuacSroȏ׌_*">^1"?/_5[hQ@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Rs~ʮ)7ZzxD-oZ,Ʀ C] Ux+D}bEt0_W<&j.E# ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ??]SoP1j(ZzՇYMɼ">^1"?/Wx`\y|Ll]*FQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEJ*T\߇c!kQj+x+D}bEt0_W=?A\ػET(((((((((((((((((((((((((((((((((((((((((((((((*UvO@ǏBը!kWVf57&Wx`\{_#+r?ʹ3Uv(QEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEU)7Rs~ʀ9ȅ׫QGBը?jnM?A\G/WCsfbQR0(((((((((((((((((((((((((((((((((((((((((((((((SoUڥ??s> [Vȅ׫Q]Xܛ_#+r?ʹȏ׌_*V(aEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPT\߇J*<}"^E> [V 17G/WCs C] U/QEHŠ(((((((((((((((((((((((((((((((((((((((((((((((OWjTxD-oZ<}"^EuacSroȏ׌_*">^1"?/_5[hQ@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Rs~ʮ)7ZzxD-oZ,Ʀ C] Ux+D}bEt0_W<&j.E# ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ??]SoP1j(ZzՇYMɼ">^1"?/Wx`\y|Ll]*FQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEJ*T\߇c!kQj+x+D}bEt0_W=?A\ػET(((((((((((((((((((((((((((((((((((((((((((((((*UvO@ǏBը!kWVf57&Wx`\{_#+r?ʹ3Uv(QEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEU)7Rs~ʀ9ȅ׫QGBը?jnM?A\G/WCsfbQR0(((((((((((((((((((((((((((((((((((((((((((((((SoUڥ??s> [Vȅ׫Q]Xܛ_#+r?ʹȏ׌_*V(aEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPT\߇J*<}"^E> [V 17G/WCs C] U/QEHŠ(((((((((((((((((((((((((((((((((((((((((((((((OWjTxD-oZ<}"^EuacSroȏ׌_*">^1"?/_5[hQ@⻖ao#{o%ak#X]B &z}-aom't'is%f`*>6UP@:( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ??]SoP1j(ZzՇYMɼ">^1"?/Wx`\y|Ll]*FQEs~)OG4rȡ]<G7ItkvK˴vJ[dg {GxY {čsV# \ֱkVi֖[.B<),>RQ\b-!A.j&r[ pW{(((((((((((((((((((((((((((((((((((((KKR֢ѬZlmmf7Kr 8b m$GӼq}eYçϩ>gys4! bcrwmz+׼A7tH6k{Mv[H ͜m~/c,ؚɒ$*6>ouW!JbaѾ|-# #ye ʜc,ڥZ^m~Q7%2-#y}#dpQESu(uTY x#Y 0>#x4;W!`/#Ҟfy9,$'aʂF uoż9#`FApA IoS,sٛ(5 IdBK!SS ]/l)a^@$#$օQEJ*T\߇c!kQj+x+D}bEt0_W=?A\ػET(_?1i׷֑)Ie(cxI*~R0#}+?L-֑+sgam{c4'qb\Ǻݕ%uKAy%0 b0 6ɫUOkmm*.Qct\+Xu~]K )<:co6Q43&7#dr2 V( SAˉnM2B!x՘\8 0}`ƥ?T[-/fgPIN% nlc':PpA VG  HB(q((SoUڥ??s> [Vȅ׫Q]Xܛ_#+r?ʹȏ׌_*V(aEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPT\߇J*<}"^E> [V 17G/WCs C[0=k_5[誟iE/#-U>G_hS/}-U>G_hS/}-U>G_hS/}-U>G_hS/}-U>G_hS/}-U>G_hS/}-U>G_hS/}-U>G_hS/}-U>G_hS/}-U>G_hS/}-U>G_hS/}-U>G_hS/}-U>G_hS/}-U>G_hS/}-U>G_hS/}-U>G_hS/}-U>G_hS/}-U>G_hS/}-U>G_hS/}-U>G_hS/}-U>G_hS/}-U>G_hS/}-U>G_hS/}-U>G_hRs~ʝZػ=Ms^> [Vȅ׫Q]Xܛ_#+v ^4Š+jp i#6'CEQErZ[q`Q{<^6<R}yIX DgI|=Ԯw^'bi#cb7:45 [| W>K3ɨ|YI`}M_x5t,4.&G'. .֞PȎFHݼRϠ^).jOcA bb0PYTLaEZrh58 N}B|4nsbN +_i%1ػ `IWdLʍɴd:Z(j:t]r٬rHHQ\ -Hڷl.tgږw4~g*lsIʩ^V8H"XI\-WGn5{I+ȸdչPH#8K z S=AHn#Ic eZ\bR6 ӟ۳A|G$#d ƒM:aAU#8{]_k/{pdEi ʑJa3+! 0t?-Z5{\Is 򼄃J#i#9 Ҋ/ j4Zi4V| 7F㝘Mz\xSEӢk8cMJ9 mˌsSCETtu}"LgXo F]J2TҴ۸u KQ+r-Ԭb88bN2;U~mZ('~DM}mr·wLJ7T mxj۴YI0XZ6-&b%Jg'=*2v#zv:̢i*lm٤hCoBt( (9sÓjwL:,! 8߉d_#V]OY4kH".l<dJ`N>zҴ۸u KQ+r-Ԭb88bN2;U~mZ((((((((((((((((((((((((((((ZzxD-oZ,Ʀ~/ZF[Xom G*p (QVؖwn% ?b?Sas0Kwn% (=,_v_/;s/QE?b?|]A۟Š(`a (KQG,{3X.G,_v_9c9wn% ?b?Q/;s/Q (Xf|]A۟X.Erǰs0Kwn% (=,_v_/;s/QE?b?|]A۟Š(`a (KQG,{3X.G,_v_9c9wn% ?b?Q/;s/Q (Xf|]A۟X.Erǰs0Kwn% (=,_v_/;s/QE?b?|]A۟Š(`a (KQG,{3X.G,_v_9c9wn% ?b?Q/;s/Q (Xf|]A۟X.Erǰs0Kwn% (=,_v_/;s/QE?b?|]A۟Š(`a (KQG,{3X.G,_v_9c9wn% ?b?Q/;s/Q (Xf|]A۟X.Erǰs0Kwn% (=,_v_/;s/QE?b?|]A۟Š(`a (KQG,{3X.G,_v_9c9wn% ?b?Q/;s/Q (Xf|]A۟X.Erǰs0Kwn% (=,_v_/;s/QE?b?|]A۟Š(`a (KQG,{3X.G,_v_9c9wn% ?b?Q/;s/Q (Xf|]A۟X.Erǰs2꺤:}60I8 2# 9+kCXknetgen-6.2.1804/doc/pictures/menu_solve.jpg0000644000175000017500000003104113272137567017265 0ustar kurtkurtJFIFExifMM*C  !"$"$C"F!1A"Q#aq26t$34BSc%CRr&Ub1Q! ?Û2+B2ر)`'V[kwQ"qIt'Unzʙ~:XIVĬ=ñ>ߣ,QZc-҉vXեKzA#>c=~kVfM9+6 Ե d>Ye^`GӉ$+'ZHҖSΪY)M Sjn92{sӎQ{gKwc϶qSodgͷZXe'<>Q4 /:+\>igr3 $:ѺSSa߆nȑy3xje>Bvj"upGAX.db{^;/ ]P' bH'gdիR8Y#ۜK(TnJ {WrKwFGR˹ $=q|'#a52$ߋ #q~&o=#~rY+ʔ,C-uk2nZ_BV4@ۗeo.Ồjej W JYvkBŦG>BW#V=/Z-bM;s8i-۞&rJ#5f-7* eyy0)V+vSpQd'X&,nv8 ^$pO'PcS:;1$5 X)` |"F㯿88#tߏj\r`v F+6"Ćv'QyZ $eUbiNG"0gVhn-x-I:(L+VcШuܵ7J7enX891s~?PцaVyfi$Hfc$KU^촒-jY`$h傳/ϩFX_1^66bEբ ,"ǁ rx~}λ1:anf%۵T*^>6X{40PHA{fcN}@NH1'95ӑϯ|efҝ*Y6pC ew0HU@}uۺS Ւ&Rmin̏Z>s$nWf vtN؀y?NOA=C|n[wz8O\{0F099%CC u$fTi1$4ǵ ŅJ!RT;hZN|в7Ih%ي_^??O~}G3;#Gj4FKoӎ5o(,;!}_õrcrp`1Կ4uFJd1>t->&/XrZlqZNv\124$ʲ'hv4馚ik@Rx׺wԏ~ďMSv?Cߑ~w&y(+x:KQvY> TH{/#6%`1ߩv,̟mF)aa]A*á~#R<Bn{wӱ#;xg1w$wq۟]k3ڳGvY ~H%BG"Yw Aƣ 7Nl)Fӿ*+;~{ D3$jٌHJps=?~;R>ĭ/ͷvqnWyV*8W\eZݕ*w:99'ci eH M#ߎOc?cƀwÿ#Quƛ|mm&^{u$0R묱9PB+91d8O-/l`)d"00ڬGr[Ͽ>zONjREsO9U(˻9T}I'?kr1yrޟjvf؎{oV@/'ÐG Pn n.t<瓓ۖ ;9$v#;{s~8_6pov Fl#9ֽk'ڶy7f[#b8Ki+EbVy/bi· {Y?Fٛvӯ#tyǯsHx=X3O$42DDRHZ##BRT#p=~Zihiv`w: a%OOuSMQt(8^#APq8/1ٿckwf?h͉Vf{|cq^8yUyT: 1XȖ+M yv|uJ;|dL8'=ۜ}훳SݧϏ/vR'< *g/ygyqqvfK%Hx/Ƒ!.|FǬgS-$ xNJ8܎TUV5deN< ́oR PPZkF1HG MV˗Yغ+C,W9 C:ZB rc|;;<m3٭+_[Bc2QO~>yֱW=>o'I~1ҭMta4d4 XG3*% Ȭ' 3o2la|M3^$rCg^8v)h'sS;cfnGQTI˅9nWбQי=~FIoՂmrܯTh5͞XHܰ:1\+FͼsM-LeYL22F$}xqO5fjƳ[/=t&IdFGMk!rT/ gX͏jO\rqݍHc2,trB |߆Wfpx(Om%ň2o@wtS!xT M07|SۇX"^H AF-m2ׯ-I>nB# z4 fEJ͚DѤlRuYyrd7vUnCrGmv8S 88fѭM>ƸijcWy8U}p{mS/j57dW1JHI@qԞx[M˜ Qz38Y#N0?'*dw11YrT0h\ lL=e9 #}eP.n {n-˿nxVqHZBao]Ɇ\'Sakbnð2Ds UV=vط/N5>D4HT*]1<0:px8˵j`Db]|5CQ q)bDn%n{hK8RLSKK*X~$-'f*^G;݇c[HR9$yKU%'H(sF;27 `~C;2:i b44MM44Mwfccuch'];jg (٥}~W]<9AN:=X8l>*#3]נ ӊŽդO/a:rQ۶!VM3Hy,ǰI>cVܘ k5~5{g:+)X㤔p *' -=̾ڷ\eXନgb_`ǐk,F,6k*\~GL/= Cwe[JGD*;Yn;/[dHitבy#e2*CЎ1A[xvݱ >h(P,lBC^V3!匓;Z=)۷G&9γ?_?Mk0y܊W:İVFuY& sbx#sllo%dpՊ˄H-`~ZS7mJJ' tY_ [d*1XET/O_OKts$[Y:UrTf1X+F +"2㧯sUB1y-dVR1.!Tfb@*/*ۅ :g'G%bV%$xUPYPH cuckb?kwfctGLj?C,=7+ 1e "$u~G[an{xB mQ܊q2yy:4o۱CaG:+Bi $?wcXn*R]fjbjVtGHNW[" [%ٍ*QҜccCq-N嬝Zş0yo܉y1i-H>r #-icmdAvYZYeнOWQ #5͗K'Myn:*ԧ-sQ)UXjUUv12xS+mFqԫÎkV[m,"x]l'nQмrH<מ~:e7Ffkar{G)oVbq7S^b=4Kx<)>B; ,Kl5cUv(kSX~;fzX.(aXT>wY X5c1$HΖF[%dR~R8<U$[Ӷw!6~)}yA'z[}xܩn䰶'zSi:<:y>aZW:XZh#ۻ!5TvFY]v@س$E#|ȌUfT}WzwhHg6.^бq,hjDR#ʶEh`CK:Ikf-lKhޚt:Y#zE1G2;۪%-@lM$>`HܰG+?=-ǡKU),DpDRWԨ.^}FJfd748In<4Kx_H$@9 ?hd@ v}6JWei9!9&if,䬓UyGfLukM^6aKNc8V3@XFcǢ>^۳ZI-VHUpʠ{ԍUzE塐}WxD 8TUP@1mtW]Y6{3*Cu.՞Ww9C^hչ @Q՚#bڊ{4*gn@czRE“IZEXt va]$}ߐrؚz*pK$=*`3U]kwxckULcYęxQ֢ 7XY KGvszO~{;vsߏA͛oC;ggdڻknlBQfh Uf.jϩKzXju1c6XSv "|R~L$$==C=L0zGa;s_\wHvqB~ #|7lL)=E$R?X:P#}}/C~^}8x>{_G''AnG܏6'ێߐ\k3Ok/Y9VU' zwQOx,i|@jM%i 2Lei,fǐr.ASq=s[nÃ=suo#n\TY kTe2uDe\Lgut3wO9JhG|zUĐݰD&0Er $nR%۷N߇:Sq$zߟϷ=Vڹ+ XR\5N 5b|0qiڛ<y'b=H~Qs_Gԟ~O=iii:1^\k3O{ժ;1zm[U$dTuF`faD8)d3Q T%GYP2!Vr?|ǞGq߷nC/=ĕq:tS`4+PYZ݊O2d: UJȰ " yG7&E#nۢ^UH`eeVYbZ0QK0Miӡciԣ+KJ R(4j,%$o^ a+gc`ZGc #[ ǎ sxk5[N<bQQ-SʑUXBe%Z?\)MzIѢFE=jSBB? "1x.LfgO#FP<ʖY~`p~`_igkE;{'nцJ ax㣎:GƃWnog#m<7F=}\1b;|~d-9 m$zDa`#(q>[pc+-~:eA´`<Ql;sVzDH ;@d-,97bZW%bA_YR+1ֱ#EAA($2/ Q6݂LDOE VyPʲGtsu U,Bv6زcn ʼn*F$>WIDzW鯩ٗ'˷^5ozQ-@TT(*ǂmWrY̆'-vn+$^c(&S"/nPzzz<~>TcQ/>EkD&b 5,ȅTb;W>Siii:1^\k3N%fmݏ Km,̅⍝C*zIQ@}|8?\rR:a% $㕸wrTn,e3%B,cC5k1u"eSʞ }kd$ϸ/K< 4b6^fVOrO0ŭcrTKZ:X֐a7^bH&$Nw~x9oizT0ʽk{gߣ]kJff[ :ITIv&=r4fKU)^IUf"\fO1Ts&L|BXla+3ر>k¬EX>%O*d$08 _#^$ʨbo\z)y#=d=BOW`hd9\&o-LQm,+xaaw؛*~mJVNF}3=rIgꓩ,$~zߪvl~)㚿+'PĒ$j| M4i 48A4@}M)IV=$Օ 4_netgen-6.2.1804/doc/pictures/solutiondata.jpg0000644000175000017500000013172013272137567017624 0ustar kurtkurtJFIFC    $.' ",#(7),01444'9=82<.342C  2!!22222222222222222222222222222222222222222222222222U" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?5 7yup4O ;2ԎS!{Tⓦm NzT0UHi׫7厮e dGa$*$]ہ#|W5r^~rυy> TPVB#|,??OX¤P (|,??ޖ^Km182t  0> Q'X,]| kdj7jZrI|t<hE2*(KbZkq< (|,?? Q'X,RyB(Qd~rυy> TPYarυ'(@G'X,GaI  Q'X,RyB(Qd~rυy> TPYb mS*_)Ldjky/]]dLL3vuCN@?`O&jQ 2n[R'}'d 3c+2{uq{N6&p LSYsVYDSφrf;+lMT Ӗ17l 0?!>y"\'ҋM 4SOxÈ,tK춇2'gzEs~+)B7zڡ:}gȏ-b-z<#GG4q3'h?4UK=V*r~\+jYT lcZo+ٿ4UxwO*q4Ln^+Wi??4UW^ɞ3{ >WxwO*B<;@'G=;i .Cf @8-ϊ˗Ri6ouViGvyN#ÿTi?kGg|CM,Gd)bqq 1QgSd)$6+jͫlA6w_zB<;@'U-<;{5ն\G ;B#NAJ=>^xU!d e6Ff9_oj]ծOEgs^G⪼vAw7;^˴el'({,g.w]- bu $9gߧ/$ZY%_a-7+Cg>xwO*B<;@'G9'}{T,ua626K|ǡڲ->mY`k4UT/.mkVq7 d89}*9>y^+W]x[V>Oϕaͺt$nnXMX#ÿU[a{&xϕ({>%@̅RU A"<{x-XePòA G=eޤgWi??4UY`r<`C)|m˗n?R[4q+8`q>xwO*B<;@'Ga=!Xtka_;a\OQp# w_#ÿTi?&#nTm4^T?g-rMj\ڢx+D}bEn3 =oo N$)@V5/am_:Ŋ*5/amƥ<,?-HU|j_эKxX[EWƥ<,?-Կ煇 U|j_эKxX[EWƥ<,?-Կ煇 U|j_эKxX[EWƥ<,?-Կ煇 U|j_эKxX[Qދ9%򧕉PcQRnj_v=ޭ]MQbTd X_EN-%zE\!uƥ<,?-Կ煇_M5]7zԺrEu `eڠ!WA.h6%yYcKYMwsG׭H-.OXV(e9c1q:?iog>;|j_эKxX[j$}T6T;x5|;Ar;a ̭oLol~f%I?0X3pCKxX[1  o7@X͵]D7PάƷYD;\9RbX%RB$tK >-R%Rl3].Bl-"Dv&83׎.tcRn+4hn~sJya<G 5Z-G4XohFwLU!9RtcRn8-i|6Gj7ַs]G-G$28G%|FսƩgt""l0 ݸr1Ps;KKxX[1  o7@\薺X2s/Ӈ5tG;xzjVZ 3\S*̡ .GϘ#1  o7F5/amѼQ{(,,w [^]8Cb~pFUcU|j_эKxX[EWƥ<,?-Կ煇 U|j_эKxX[EWƥ<,?-Կ煇 U|j_эKxX[EWƥ<,?-Կ煇 U|j_эKxX[EWƥ<,?-Կ煇 U|j_эKxX[EWƥ<,?-E4 :Ɵmf8~</^Z(#׬֊[wiWK\ׂ]-qKf`*FQ^cǪXii:#k ZfK<+7UnF5v.W%4̽Ԛ=Rr#%Fq"(PQ+w:,w YX]iz@F.|f@EQEQEQEQEQEQEQEQP_6>L|xʮðr{c'"K4.{,YS%w &Р0"Y:Z+)HEM" #wWuo {Y+ݐN,٠YT|!L@];-*omk-wwz,;c^_KX*WPYHgezUSK-quve,aH ((sfa(kVNH?ր+ 2 ,b.|EijpKn#h\=8c񝡅't%MC5ldlbŀ HwkiZSyvP#jp!NTdGx]XH|Q-c`AP*#-:mMhF&Y4]PO_M__M_ U?}7Ə}7ƀ.QTZT4Q/YUfRI( ?iֵd4 Ch2>zh 9>  tx'@>1U&n (g3Y5)]C)dtZiGtXWf7§}'oU6Oe<ƹ<.v@_m4dVҴE7^Fn5WCo=&#u+(Yn 'Đ#go7V\m}n.dV*98WE V? ¹'A#I}chSQHD?chGTP?chGTPbX~p@$κZ?/ A5M QLaEPEP1-Ln *:֏v@_繆sq"id7oRUB Ii+Oq?g\勃֦ayupoF€l Th( v\4Hªz_ϴ?I澚6R2c *I$?chGTP?chGTPUmpZ$Q N<֤<*Z((y?W* [A4iGfl6fhJqK}ki7 i≝C[2VSZYӗW &n7D,ǨBzͳ f+f0F#;wc8j>O~D,ǨBz:/>O~>O~D,ǨBz:/>O~>O~D,ǨBz:/>O~>O~D,ǨBz:/>O~>O~D,ǨBz:/>O~>O~D,ǨBz:/>O~D,ǨBz7D,ǨBz7D,ǨBz7D,ǨBz6(kE'h$ۓ*>O~D,ǨBz:/>O~>O~D,ǨBz:/>O~>O~D,ǨBz:/>O~>O~D,ǨBz:/>O~>O~D,ǨBz:vs94BzD,ǨzBzD,ǨzBzD,Ǩz4I<2C"E*8#?/? /r3F5=>O~D,ǨBz:/>O~>O~D,ǨBz:/>O~>O~D,ǨBz:/>O~>O~D,ǨBz:/>O~4[\"_~g!eN_=@V"_~g!eN_=@Փ?%YӗTosfk:͎:@7GX|e?EwQ-aO|;`ck?Ү3uQE# )$}) zJ*i:ϛY_yX>pq8?֚m]Akm7<rp2ǁ 袊(n] 7*!I@%[@QQ<2 lU( pp{{ԔQEQEQEQQ<6\\JCI*I<zehv7P][IA tl0(z(-o/]AqJHˑzc Ƞ 袊($.u}jT-7i$ƻ bN@9=1Zh_h_M|+h_h_M|+KaZirGiXy$=O4+Ծ#j^5LºƌQO&F_5+IOvO+9K#\ 4袊((((((jZ.q7)mgn'$ɫu *Z݅3,(rx̊B12 wk+=3N"Yu^3"a&5.s~=R]N]9.Q"]$BGP uɧjZOarĭzU yۿhE6uu$wqb2eY$ھ|d@q56BRen"܋u+"Ng_iv֢(sfa(kVNH?րs2\>ἤu$xf]9uo\Z&TmQwb2[DmA+;;q1WgEqzQb Đg!f |Ǚ̻~JS|sjZdA#.HV1"2 Kol(<|b<mr2B?(KzNk֝g A2󌑆>EEeŮmIVI&֦[f  ɶSo):yۭڽ䭳j$ΠbK"9;W$) XR(kK}7ߗg~(((3_khZ9cXTpXޥC(oaI5gkrYj,$PHbX8hI tÕ%I^5Oo;,?eKXv ݲ6T#_ūci=WMm+gψG r efXhο2(<ҵ5Dj֥) -m.Ə;}?#d???6o3G#sf4ϧDo;NOY \ٿi]h]ķl!p''_O \ٿ\ r0gf \HxuF4y?ƪ???6o3G#sf4Hܶ1m`???6o3G#sf4Y:#PZ\ٿF4ֳstlējl1񿌿>zh/^Z+Žyn{]-s^  OϨI-٣/t^f&:Z[M#z{{Xea@{+=wmD@-H_$nJv!Q\cr)J;0=I{;EKY.D% 26BwTYekrm;È2+,?'L(@u4W-wjkmgeG#yeǖʦc1(,9U!uK>o,R0Ax󉃖!29"0\![=Wwwv|z>w$ԼD|zE[-؊bX1rb,Y* mMWx]S $6pv6rdPbOےXpsџ*;+ķV6ؽ̖z1:( T@& 7! o\ZmR6HiZ"<àt4W<(d|s$ U,YrPEs98?:澛⓭j:BX%H$jʾbaT'gcpSErD:䎱X70'<?]+"WAEs#m0 #qQ!8VYԢ(QY*I$wWcŚ(%{ %h<呐:3 QJҬ5-:cwm"G@Sc#`iW McOQIw /B:A]on4kW֒yw6hZNej{erEkhm,D'#&s`؁LY,&]?l9&o%èdq\9\(Qn5M+ j2k!G">ie @pℾ4[;2V[;4n%<Dcn ƪybhS;8Đq̠ i|7w6.0 Ȫq>JpduW+;]A%t_l3Cm&C^h9]2J6DbȑuV 1BQX6"=gv*OxJȕ^OK(Ѱ|\b-#v1shxNSny'uu3sjXp2I@?]+"Qo_ (7tSZG-A66pܚڪ^!~Q@i7Vwoq})9+}JXQ`'>/_#N.3 KEX(@2I=IDүtd1*ċGsRI4EPEPEPEPEPY:#PZ֬sfa(x_[cQGXOG<=?Ү";TQ; 2vN=?ҹ-3JcM1"B<+Sq /^3ur&-y{m`_*V>RH#Ո:-N]N; TvIt׎ $|=T ףq /^53u ʳI"Ն6AT? נ %.9.eYd@e[z>f yq"<;FU`.O¨Yۏ@]cn?uK Ȭ!QU,*J㸻MNYE@ӫscۏ@]cn?u1Z&d֒[t V'#M 1ݦd6m[t `U#MA?GX_Oa]Ս&5KIğBq /^qf<ހ: p !*<T@Ԟt_?\WOM@M_?Dt_?\WOM@M_?s$mn]I}ſ+Hѵ#iDlGp~SO&z{{qFfhi,C=97ix=GS'osItw ռ$ʥ$E `ڰ7WO _+ʲ}E[ נ wzV${akr$4*EBYCdr$zMGIioCm$^K*4yc+s3zq /^.z֪ZuՌ7䷒h݋o$$͟^zO.z? RFӂX{Ev'q1@9f +N[[ QxJ)-An?u?@_A}F=zm|haXͅ iA6đC8*j ףq /^5I-5k{Y,n#WFĠpyFn] ;X%-2B3}blmO9 t:_&z|B:/Юki '^&z|BH׈Uam755#D/3^1"k_7[QR0(((((((((G&=?P!(C ֮zzNyE(%p_=qF%Yk('nmz%~m-vW835)VrWy۠SR4ˋ8a]ļ']UA$2@qw osk2"G,ʬ ,Q;8k&F5oUۤi΂%`US3n$9<*=Gڟ\GF],Ζ֗eE;3$ڏUӥ#{W|2Qxr̼zx|EY5:[P̆tF@ʅn zV-=ԧ1gP򗶞mCHa8$y=I9-SN$:xgX)f$UV5aP`d;H';yRXePWR2#Y6 SEbxH.yB6. d ֆmФ$HY(PYfkbDn(h Hc`N [.]FkZjioqcK*.>ʀY<6 d7B&'(]8ʄ|= FKmi)f@l0yW5xSk>My4Q}3urӱ\; 4 ZvӮ, *#7Y0v ặTTzh/^Z+ŽynzI1uΖ$cRIQx>'|V]-qKfb؏>'|U*FWG؏EWG؏EWG؏EWG؏EWG؏EWG؏EWG؏EWG؏EWG؏EWG؏EWG؏EWG؏[}KO̶fF`8<Qjrk:[L1I#I#G؏Q2&ۑ0r23#G؏i,#9 O''RP 0}NP 0}NP 0}NP 0}NP 0}NP 0}NP 0}NP 0}NP 0}NP 0}NP 0}NP 0V @B,ziVNH?ր\:+2?hrq:sB$[1#q|x'O ռwʡ6 dGހ$[qig9m"c#*Ibx1;v>Fc#(7+#llr9BMsI^ndo\ Fq/;zZ=WNSL]ZeE㒙2Gq@K4PDdD5B/uUŜ-su DJfb7dg,x57a+KF"]Zm"u{U Ms6.ǔ= 4S")ٯB/*A OGA O@(o-?o-?\k4k4rB/՘xȒF@ύ|=u{Hmmg33}uU0[̌zC/ 3߇5n&DNxn-FfZx>B 밯Š+AgdU}7}V¢ ."H{;xy;Ta1yMQݎ箼94gE'˫r a"#UӖ-R6vцFd/y]\+2[kZ\3Eq&Fls!bGU1-46;M"K=FQDr8.eĘ }ዻ5dQw?j0Nc}G2('@>1U|4߿.:?ax'@>1U&n3t[(n~giNѸ_shWskzYIm`kk5p7\u&Y2\#*FrVԭfk>?kjH~k>ϴ?~k>ϴ?~k>i".5TEUT` 벟s~ʚ9u,OB?*w%v B5vJߑ5$^#IiZ8k.<>HZ.# ׬:Hk3L˱6+pJ q+kIioCJ-I?1?<19I4IuV?Z ;a3;ffcIcM!?Q#hYQp ]?ƏJߑ5E mn!8S:끓PiF0((((((((sfa(kVNH?րؚ57%Z/' ?*!?Q`kuR]|h)آ*!?Q V? €6(J_OUB +h(bEG%Z/' آ*!?Q V? €6(J_OUB +h(bEG%Z/' جsfa(7QִJJ̑uX8Ǹ#׬֊>2(x>C( ܭ]ԃ]'o>o*< *邳 '+_7[}T8 D'eC2*nUbB:J}Ҥc~m{T}O T *v 1 H%C;o[v޷7SQ@S..%HK$Q@$I@TP?c>m{U5A{}i=|',x?_z|Ucp{u ȪaU H*=J!Q;o[9''$m0=N`Ojoo>o*z|UMEC;o[v޷7Nn] 7*!I@%[RP?c>m{UivM/M֚d&vʌQ[h_hc>m{TE4Oȯ4)ϗE}S?"Ԗ-3JFXMb2NXI>;o[v޷7\F\k jDii7NS8گX;s zcM3;rI*2I >m{T}(]:]N]2;Wwj)Jg |ǭO !x%IP3!d`28 @ Q;o[' .m𤀼[WrW#c>m{T駆*D;QrHw$ $$TGFl8V8=c>m{U5o>o*z|UR|E o:u̻;䌀d}_n] 7*!I@%[@ Q;o[~m{T}xV-T:eU 1=hxn0`IVwGbTۭ?>>yg۞34c>m{U5FgnݥA3:FXneR: .Omր;o[v޷7Y7qy7v>A][qooJ9ٕԌlG9 m{T}⩿h_hSD/@Q;o[)ϗEltm-ed,z@ ;o[Z٪ 7Q y?{ c@ x[WmL\[ʈG ۆqO8nrIYu rJ`[# H2 yǥy/_[cQGXOG<=?ҭDiEm.@SV]-qKfc'Akc9inN6.: ~]cs$i5,Jc9cagHK&E&T$ν&k~${nl/m->k[Qyj˴/F|YJ|Ap{]F'ǧ.,%.lZ캇ڮy?pЙd0@ pQ`+k:]$<g@5]Fw5Dd -+b0vd°мlmRl Jh"B,'`8 =*i۴]M.fif#$Wxu/Mj- BXd+m1SZ}?N֒Y[+&]UR3F\e nr[i> Lֻg5L|d7L]ىF(@"PtI'$טggUrĪxS(m4,C.m wij$_2Pmݦue+1m;&416[p27ǨW<> Uyoe>9ԥXdP ^x=C<q.P<5/^vrJNf)3 `t{o,Srf|,d270˾@汦ͫjчk()!&UYr$U(x~+#?ۮ,-C*.eion[Q4^ 7W-??7ǨW<> UR|9i~̆Khsހ9MDxPSt{lΡ@O9`ϞAQȚ,W:zh̲)F,RIqȪ%ͷ5-GRe!h| rs ,7^Z}`y@QGX|e?EwQ-_4)`aaTO~Z?ٺ )5G/VqKfc'7W?Ə_֢fOnC ٺ )5Edf07ZPOnC ٺ )5Edf07ZPOnC ٺ )5Edf07ZP̳tfOT<28=2uSh`oO!2EW$$ 60Or8̔GnC kVMtA4K$!82$e6 I±_?uSjޙ+yfг:~&#`U`C)#[ _?uSkZj:n];(Y$lD'&*f07Wm D|O AV`AHA NSӣwUD1`vʓET`oO]+Xs^Qh<7^ RT Y0 ;#U27G4ckojְ&.00NG>Tcϧҋ;{Zki4f07t5aؠ _?uSkZ`oO7W?Ƶ _?uSkZ`oO7W?Ƶ _?uSkZ`oOc^sk%޲o:L승*}A_[cQGXOG<=_#+v">^1"k_7[QR0(((((&OE} ${as D(}ҼP &nVΊ8fs KyZk= pW %[Ө?U֣}}ooCs H*ȡQ1vs#^p5 cvkah$% 9tFn5@&|)$Ϲ#y1$6 ѡxZ 2inKxחWW1,2}Pya CEqmnzU:X{/0M$67I *gbpBq)gQʾɨg}:O9mfܼN0Qe+*X(Qz(Ҽye[f̍T1$c@1 0xNRKx`X*q%t#?&r7)bF^?V^NDW2I6(ZI^5Ll[mueEj,'6Y˺6S`9 ~˵Es tit!yFRk@q-?56I y(Zi6O1A..5Ḕ32+jyty[QEQEQEQEQEQE_[cQGXOG<=_#+v">^1"k_7[QR0(((((Z-ޑ7(&HiS$am-m -GN`͌6Vd̓\eD%cg`xٔ-u{vkm{,,,cLEe(ࢷ SO\Gj6đ< Mr#mGv0fP<=qq]OG 2y .]h&u WC&Noo4uGjYlrI=j6zrDD 5+}bv=U `e1!(UIpC+Kb[kR ^YxR>xXdN]|[h+wa]^K=9 .~F|*UpJz=SEM:hi.V%W;&do~7Py`/-ZڄX-HH.5 HR>RyjX +kwij/SԭhGr0ؽL?@'AG'A\׊,o/<= bZC:,`ZqJG-mqk \ڙ⺹kvNYY>O~>O~7y{˙/ౖR4@6KG,UWZݽܚ$!`7M~C[6cf0co'AG'AQ@y{y{''AG'AQ@y{y{W~.y{y{ < տ.syw:c̛Jǁc[KUYYB#^˕$gzVc2k@5@Q@Q@Q@Q@Q@Q@^1"k _#+v3uQE# ( ( ( ( ( ( ( ( ( ( ( Gy$XHfnԵ$AIm )8 ?J_OUB/xѾ?EG%Z/' Ǎ_ ?J_OUB/xѾ?EG%Z/' Ǎ_ ?J_OUB/xѾ?EG%Z/' Ǎ_ ?J_OUB/xѾ?4;oubN‘[N C:Q-Dx9$`Ir ( ( ( ( ( (>y#׬֊>2(+D}bEnG/VqKf`*FQEQEQEQEQEd뷷erm|P .b@3,1pCC-m.'H0JζI!EFHvE;|;K{XeRG"WR0AP]Zuŵ六֭IWh[ S9Ҁ2` 4_=ťI26pvnۙS[bʌ]WKDyp\VcҴ9u8-Re%¢W^8/zLV5ܦkZ M! u@6~.5,t/:KXGj0x]#ͺ)|ۍ7]͵DklAZociiZؒFv'»Z|Cuo%I,2I#C+ vkL,%Pוj@ЅYwp=B?Ms՞Iw5^)V'z olm5+GLoxã`eOQei..T%RYn>`LH=ݏs@0x}dIovI$ 8Bb~Pcf7mȳ6~I݋WbR hy1vBe$glzV._̻$XTJ>Uң}I&q [I$6@9<(7\,Mbk|9dǔX;8bzn.cK-./tf@fya2eanIaδ7ؼ.C|c_&6LtalmkR06H۷8czjz,ڭ3*yɱ$el 7#ې]4LmJh] i-?4R4 iyq~MeS,bg*e$YA&|qve˷l.n5H|W\Go$<#-6e`G0HU%巖m.I-igBb{:>V-9'Y}}Zls$ί$l&f!0B?%ݿ9޿u.줃a α<)(r^NHch^XʕFݹǣ>Ӵ;Hk}2m+!@ EPEPEPI=ݕQbɜy=3'pLm $ah?MԆ.DE+2r9ϾI7§ d)o q!9+345aج};FMo(((((((矌>zh/^Z+Žyn{OG/Vax+D}bEn&n (aEPEPEPEPEPEPEPEC\Կ GTZqnۿbpqc84~O#ktA|B.{یۛĺ])<4-MJơNp3@V, [=OZ$Lܬo7vP.AS p dߊuYKsw((-H̨B(3ds@xn WS%JGk3$H0 Yn#*Uu6}LmNȒač4;%Ї dw_Xygqۑsnжbd~ x1?'٠ D4%~O񭍑_t[{.q3%0?<~ONҬonte[1iV>#&l?[QEQEQEQEQEQE_[cQGXOG<=_#+v">^1"k_7[QR0(((((((^ [ѐ+RFAtP)Xk}j7FH`VH::yq$0S >Q2fF4Kim~".fG(mcv:( []zVkc=yCv0UC9gqBwxou-F{ŅeFB1XJm }u4P5g :y&7x̖? YvM?zF)!OJH[JH.MnN[t4Pf]i62[jZ-GcVQEQEQEQEQEQE|GX|e?EwQ-iWxݬ/ȏ׌_ET((((((*9h!yP@q'$R*Jq3[ȶTD.3#>0khwחig̉12lwc[ ]4" Sr`N|Ŷݯ+Ԡ7.߳ܵlOݹճ^E_I$6vrZٖb 9ueU98 6H|KA⸒yT1ċ#ga;u-lnomE%0YobbNIR@.'PRK d>XCna*wůvhj&2r͌}CsuB=sIVd`6!>33[:J|zbϥW0A{4YEU|H?(<`sS [Xɩ@iEd"9b ҀCZk:wp<2}6ȱd*sWN[kQxȖeC jjrx|iڲmfXA^<uKqo5 5-u.V -eVIf"4帊RI-XgTBbb~V-y'Ohqijrk:rXL#k;s|y++ .,}t &ˑ#0E9c&y/[NU{kgyrlɖ6'6AݎH*NN-XvdKs2ʡI v CT4hzݍ垥jٴ>R2l!e'T =l$ז7D["9aOa5oRROmgdHdfv;B’RZ-:.l|rB? yyVxmu.X$y$($xsN>QK HkH|008q86aayku3&7#GzP֙[jƓ4X/F96v>C)t+/JK!{EOF[]؜r Qu((ߋ8; kzn!dVΧ!XB7rsHޏyk 3O}RkiKTF?]69r3j3z3ݛSxvˏ1osz`8O[YvڥʹٗkCrbr@eg^1"k _#+v3uQE# ( ( ( ( ( ( ( ( ( (;+n >a&7c8,gk k X^=GeoVf/wG$Hflp2tQ?BY 2쉔h|@;J+ƞg-_/u-ؼdr?8[P]'NߴVOڔ,m\sb1GOӒ?|bidx24l˲&RkHboQm(fo:[Z51CI440s{sll+Ki݉ }5[K{X ]҂ H+SXd}Ŏ%Xl-"g?y-s| HΟz㢏:u?Civ,P!Ǖ";0Wm\ּGmiPZNqx4RΨUF'!XUCWr1@?EtZV)h |Yu  tfw N1Y:N%Ȯ8B9c}FF+ZʱҮPT$$&{ZQ@Q@Q@Q@Q@Q@Q@Q@Q@^1"k _#+v3uQE# ( ( ( ( ( ( ( ( (3tM?Qid+ p*1$ k8* }BCtؒ+.83"nB  \Tw/m:#gtYQ³FG$<.-Inn%` }*eYGqyۏ6d=M|c) =22Syf*`=$V:]qfE,vi+8R,(\Is+{y'[djʹeAl`PO#5%f1 L"oo$І4 8u=${zF6t,Y##ǒ{M\6Vd#b~1% Krs}gRg/hm`vƹ̓Cbm<[jd7Wag -PIq1&‐J.X:k#{o- @#U\s$ nbA3neRJz 6m֨>ŤFgdTx.kwpK.> \k-D}1Ѐ<Ѵo%R\Ij#]#$qJ<[oqK RHPF A ;S-kWr:KE$mp2p@ պ!$$qơU ;TQ@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@^1"k _#+v3uQE# ( ( ( ( ( ( ( ( ( )@$:Yě*2$ĜP.Nvґc=Rk:q{{4w"ȤnV_5bkXflra'sg#*1E-5dk,>xݑ>?(!74L PC,w--+fcC> u:PAmKi"I22sDA| WݥP= O{:&wVMIfz_Z<|3`>F ǐ8 Ђ xJ4quũvP_$(q10ݵey\³o x_QaӸjROu42TiT!\'blO;}jZt9"HB d}KO̶fF`8<Sf{L[$@BdcܬH2piEQEQEQEQEQEQEQEQEQEQEQE|GX|e?EwQ-iWxݬ/ȏ׌_ET(((((((((rI sځ5+U:SCW7ӡ;A=TCk~,.N=Οtn1H.J[;Nvr3Uk:xӚh'Q"$1 ą.xY2W W8+ז^5n.YIJH<4 3/C-:m_nȳ^YoHHP΅A8'Ҵ/~[l$D$!R$!*c ƿ1m۾%SX,[sGuALo@ĭ0@>GEҴ{+m!Id8D/XA$ ,vWLomSFK{췏"4Cus76%wP oBj:wDX$  V5 >s`ƌ`*x3Aqms1bEjpb F6d` /KEQEQEQEQEQEQEQEQEQEQEQE|GX|e?EwQ-iWxݬ/ȏ׌_ET(((((((((eơoqs2ĀFrO`;VWVԝ.[dx?lQ@|LѮ[Ny&NO&ePBSOH?g6o 'MI纾=Bqyo%]e1?x~mmגw?얣:M>u(qţ, +y4z5u榵ճXHڭΟF fr>o(Nm|X jmiԖsKsj'!%%c\0 7ih#w\ah%}mTK(v)VX :((((((((((((矌>zh/^Z+Žyn{OG/Vax+D}bEn&n (aEPEPET}SO]NZeC'A O@(o-?o-?\k4k4rB/B/*A OGA O@(o-?o-?\T s&qYo-?UCԢHmp_mtkO7x|`hNBI" ]ݴK}kI#~̓0u+Fpp3zl- qn#;aM9=:T1ნ2'S@: }_g~} ])"0KleYG'˵!~fxjɧCj*͆g];YH;b%Z9$ztQ%Yn$T%6zI @o-۩҄/ڼ`ǵPBGB3az ր3etğ0X3Iʴ7#g(jw`Gx-֡m֯} !pY8K"8qdAx[[[ywow8𴖗Vr!aI$@4mE]& l紑dde*Iӌ* 8ywumgdnwZ86ݤ9 4{[xb% qȊ`vu4 vx̻ed0vosy S5#1襐CI+75]B+=پu, Ya>C3Qɑ(}^bHccS2,$ !]i+8.×Jշ19ByS9Ҁ2nmRMvei3POI2N7*!IϣpNmѕvY dY#Mst":R_̻$S׎ #^ =*ؽhQE岫PWʼnhu]~PhRI"c 2Yu&w(~nI]Ē/ M/6=_!ihO_M__M_ U?}7Ə}7ƀ.QTZ?ZES!ih!ihO_M__M_ U?}7Ə}7ƀ.QLhI $mё(((/^Z(#׬֊[?AX^ C[/(QEQE#&6fFZ* _5/J.nc]hf8 tsϓߠϓߠw7y'宭aSn#2bKтy&@MTSҼ?gq;2>mKd#chGv|@[QW%q #KiW'¦YӒ{WtT%Fb2/B\u6ڜ*tmaR3fpwG8?[$ 78Vm0$C5. .TO2IhHwxͰzu =2Ih?(_W5uHR鼉ZnFOF&heFmiPqQ단akT K`|mo_ _S[eRd$t*_-%N=+[$ǹ1s ~Gk> !vyw7,++.Add_>O~>O~ۆ@RqTPθzBf3I'pP?_(+.xl./Q>kq,y61AZocM1Na&l byR)##~ϓߠϓߠJO|[ ;Fm{$Yyv8T8J^=.KlU\\,b!J aN;QW\kxIk\* g쓒2qmkΓ5խ.BD";F9# .Xk{y{mErSi7-F!hd'tY=02KTf=kG?69x]K/+#9F1Hl@;>O~j7isG&#N H_\ּGmiPZNqx4RΨUF'!XUCWr1[7Wjܥ2}TA/"3xsOwKFgvPdV* {@j ( ( (>y#׬֊>2(+D}bEnG/VqKf`*FQEQEW?FTys%ŻI4,+ҽ`HԖ, n$ݾFa>q^MG@SA $+u ) A@5iڽvoXaY6  O_?uShܚV.%»#hTʋ>f֣Cao'Ͷ>ќ랧֠`oO7W?ƀ/XXDb3+ aʡUT{(94:]N-NK WvGtЩ |=ϭT`oO7W?ƀ'C`Xt(乕fEm@7 hJ'KIDγۣ.msnC ٺ )4?e?gO;xӊY?ٺ )4f07GnC kQY?ٺ )4f07Cuo%I,2I#C+ v.;PI'TIVhUĊI$GnC [Ӷ\'-v\I\J|{棋E 5`MJ%k;_]7W?Ə_&?jEai\ -3U]y iZ#商61GK| @ ki Q}mrާjD iko"@Q@W=| G^A1tt_?LX.IS޹Wc?_hޮd>85o웉o02>W8 ,sgha 8";8^y8^} (`iѶ3> ZO[*ߞ w]zdsU,t]?MeNm7a=Wn15NwW_\htI.$FԮ  37W?Ə_wiڂL):JB$T%6G H$rzL6e$Ҵ3ۡ1HͽI+AGnC _[DT4x 6=|q5iڽvoXaY6  O_?uShZtajٲ=m a aJtUu}%ƍKy*KTiJ  ˏN:S?uSh`oO )K{XeRG"WR0AT!սI1Z:GjQBPf07&595hR>ă L=z Q[B- EGgj~-QEQEQE|GX|e?EwQ-iWxݬ/ȏ׌_ET((((,b5fݖJOO҇S:??Z[ԭL-쌱b Fr1UXbSG7ZwY]Cswg(*H4elѠ2mx`JiiQiW;i{IA:Feb0NwciZ:e۫7Gq`8$gր/~~~x#3kɵvحLď! Q*O୻\66}x5K[+[ú dH7la،OGXxnsK,$ŽdG?ty_U΋uG{,q!@Ux;y??j]#F+BR[#{P$T" $Gk2oh/d`|#hzw傂 sM?J[t׌ ( dnMOX*nnF۲IiPbG@~~~~_k%XesrYap%RxnɦwKq\>xb-cHU;y9Pp@߹rxO,oo[C 6*ƙ{74ZyD׾NTΑ=HcERTAu?sOm-{{)f ln'QS .H 6f,d?+ 4(4*ëZyw Fp}jCCiQ6'j3sf~~/!mZ'GX:cq-= 2]䙁6j:xOaӦ83G4o $$B%?.{o~~~~'M]Ig{jo-duL] "d|V+^g 1}ecm|09<~~~RR$-bY|#:WNMJ.FH-X1Uj+"ݧCjؠ(((((~2>zh 9> C[?A\R(Q@Q@Q@Q@?Q;=yXm{2ϽSY 6}LjBm#(N덮ap̤~Hc#iCd6w 7֣֠ n=FgFe-(kA6đC8*jOE%ErZF(!- =(cjšD`0J6{8ظ?Q}[?Q}[ \y?x|ʔ`;|W~7mI=4 6;]g]_cbK0 r@5#տ'G#տ'@ _ i Yu6JchfIcCp)l|1:xJKx8dd"zrs#տ'G#տ'@Eo Trf)1ͩrFUL_<^[`=?ީ?Q}[,>5 !s6呔L'ux0fRFWaj}Iܷ&$6r߻81֣֠ O,˥"yi[Ʒ&߽p#+~pdni_y gXc8FE;\!zn!lg֣֠'弓ʝ+ėR2!pQ8\ *`U5 C 4h-F^C$Zae*QT`A$g֣֠ VYi X(PNuEo QEo PRթYIlW0ħ>dlIq{z}j#տ'@u-Uȝd;% ewN U$p1jjvzpSY@m)"#DJBc¿֣֠M""!"k̦m2h!T4nՙpŀt* #\;֣֠ +֣֠¿-6Ŧi ;Gp\y$՚(((((/^Z(#׬֊[']6mNBrA)o83?z7QEJCh?z7Q Š)(vy/[[ ?z7QEA ^QG`%o-Q9o m(@KoE{(vy/[[ ?z7QEA ^QG`%o-Q9o m(@KoE{(vy/[[ ?z7QEA ^QG`%o-Q9o m(@KoE{(vy/[[ ?z7QEA ^QG`%o-Q9o m(@KoE{(vy/[[ ?z7QEA ^QG`%o-Q9o m(@KoE{(vy/[[ ?z7QEA ^QG`%o-Q9o m(@KoE{(vy/[[ ?z7QEA ^QG`=',iOc0;U[vcIE(netgen-6.2.1804/doc/pictures/viewingoptions_6.jpg0000644000175000017500000005313713272137567020434 0ustar kurtkurtJFIFC    $.' ",#(7),01444'9=82<.342C  2!!222222222222222222222222222222222222222222222222220" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?翚O^E,<(R8q ڤ&7ozp8#ҡ0ֶG vE8OE>ֽYH,uv'3(\gc Ǭ}*< )!Q" vK ٫v#|,??OX¤Parυ'(@G'X,GaI  Q'X,RyB(Qd~rυy> TPYarυ'(@G'X,GanRMkpT7 F֜,tmN$5lY\U7 #mdѸ"HE٢[ (|,??jwڜG=R[EMF3$h<O57"\ɜTH|9_9?c < +N-;P[˅7ZM:(LG'np=z?tɧ[E˦Fj F0Ia֏kH9$rrυy> WM/ᱛ\mOSK[M"DI!v|lA9gkz'?aq$B?.}d'-Y'X,GatUU.5 &$Bʨvռioo Onm?ݐ ;F@=j}!H (|,??St}g¶r;IEjBUB\1fn/oOy4P41휪:Ui$_OX9?c ֖Vˬk)c(f(Hp8ڟmWR֭$c-3K&*0yIarυb FvSt[>ƣjZ#R?9?c < *O(Q ,OX9?c yB #|,??OX¤P (|,??g'SLH/YP#1{Rm-@.3dEi\Xi0ͲgAda+!]rN$?Iq %]n>cEq!0:j.{"|4O&i7;-m`6eGFVGFs>rLMF-Alr:zTQy%4-_k%a(6Ò=} H>D}n73n~+|):=Ŏ;G`ծ|T& )S[T-ʧ`#|a^_Uk|WR&tI'~Wk|WQ_UW^ɞ7{ ##OT}n^Wk|WQ_U[a{&x#r i>"XWd(фy , qk|WQ_UKSCT亞T֢bLZx㕉L0#:minghP$EV A1W_'G!~UڏaϹw{\\f2ـFm/LTwi%G.ګF`F_zB5>+/_O*9%fZ9#7+1<{pA{tgSm{[E9A >7U gC^=,O'H|pl?O*kRcpV'OTk|WR{$;4׷7 d$`03`+W_'G!~UA+$/g#aG+?  ϊ?[a{&xߕ({(O?뼟URG8t}nW^./~G=<y^½c ߲q;g^+WxWW3*7OG;g^+Wi??4U[`L`K{˪*GҢk)\f#ÿTi?SыהHmۦRı (5xwO*B<;@'MiyZyᱜA$]s[Enٴ*Hk׿4UxwO*ð{9Hv  ݨ>E)Wi?x/N~ar'\Xvg4QEhAWG/U_xG+Fwe 䎾Uȏ׌_UКΎo?h} p3jUԣd2E _j>6LIm=6%u&=܌;[K Ue>Je9%?4}~ONcbR9yIFn Ee5)&n^YMe!nlRV-~%gԞx[;drpppAQ\ȇY,IR%; Hf?,2w"R~b2Zլ #!%^Vp~V#c  ",nWYV8X˖*Ե+'DTr#0I#BZUoO4 *&LrmM m#WaH$\+>[_E1fʩu!0snUމK7! hZc"I;A\lҫHP,pN<~:W@;˽i H0ʼA9asBlҫHP,pN<~.q O,)gwu$\VHӣXCu,jP8Y F@88z^^_#Ʒ+0^܀|+0= MR% %2HuI{w?ktKKw=*J1J6#zQ "h.o^i}c-˳9vFv^ *d,RU؂+άuج GRxg@]5,&%22quh5Òz^Imn5imdiwWŠr>vB!~UqLgox``",7k9~[դHe>CȭB+9O">^1"c×zȻĎAO C] ^t&t;mYkc6~4?V_hc6~4?V_hc:.G3UO8zի ^w4sfݘe8']EX,r_՗o&Co7]mX,r_՗o&/jOudR[HXޕE%mYh6~5E%mYh6~5E%mYh6~5E%mYh6~5E'u]YmgdqW>iV+0˶pOҺ(X /M՗o&(X /M՗o&(X䬼m\ZՑyo#ciP1zmYkKmYkKmYkKL}YnlteGbÁzhŠ(( sJV $6\Q `}+cU'M#GEIH=F-yftmalNBn/B4M,`RFy" ]Hl@ ܻ:+' &%m%1&z# ϷLPEPEPEPEPEPEPEPEPEP?[kW?^MQWw j nTQEzG)WG/WC7pW=?A,gJ؎(QEQEQEQEQEQEQEQET+i |PVҤn >lcn]q~eqQ@[\ʙ#r0 G]0[,ڌ]^]N䍀#1HZ3`JH9TtB.PY-LCjFP1&GAE_׏c ,0,!cajB=2: 0,K`4cvrAc2H;Eqw4_j+r̨*99;'9$-Gmt-O= Nѷ8mkaېM z-6i{/j2p\ X-܌̣_t{=+6v\oI`3#3mb8&EŦIj.ZeL䏕tQEQEQEQEQEQEQEQEQEOAWT|U"CZ*?h[Q^}U?A,x+D}bEt3?yҶ#*FQEQEQEQEQEQEQEQJ'(*`Vm,`*>\IW }ESUӢ$K|v2]y&rG܁VUhSZkɭk`,P.-Dʻs$+*0F+ A8 麝Z--P@C0"lNFq],uoż,2x䍃+w+Q~;]=uD{k9,[$*~%Ja߇#wo+jSGijm-cq.2"\u?o§KT4sI|RǙ[fs'Tռ1kkky Ķ6*;2:wS\jsȷȖW_@`&S4>V͒nScFF٧*D;QrHw$ 9i#5k0jo{V#cl E'φk˛[@eqVث(e.6<23p%@̅J ;EI@-Eu&5c[d60[\*UXt_Z'Xd̀lCz`u;(((((((((_-?5ڟ?&E{SUpз*(#_#+Y+Wxf 3lGET(((((((*;cg$T* BjJ(HVԮ(D *@}x7Q&fP\L]My9e #nH؞_m|Gx{H.4ck,m}nNg݇v־(եH,ݎ2Lуݳ(hvv:i?/`;$Uqry54iۮgխ 04!,n 2ǵYBWwEph*mvtխ絵:eYdi lM.H|4lڎaZ8>+mn |[EpZhΟiiYK|.bY%pD'$eY^±j0h1CL|ZIs% 䑏1gbQ@>VmOTwTnp4}c7VK= XTM-qKawQ\.qWo̤0$/iEbV-F (u8^)/+I#.s$1?]((((((((( ȷw֯j OAWBSȏ׌_og{_#+Y+ϗΕQR0(((((((5]VM-Eȑ,pqrrEOUӬ%2go$wI=@$ t]Id\\Go4nS;`|vJluKo4}$/]^]Fλ" ,=1cEDP 0.|om: `ʍV)扢G&8z |V^+r/#msKbČb2?-uP=ۅ0]]% )\ʤD2!y̛݃k_AwSZç[Qۡ\yf ZxVHIݑ#2T\%烵 I/.dKc:dD.;rY<ǺΡ_jviMӍ9IncdMUC|3ރsUvkW<2ܢX.>8&2@٤U%wS]fCijgPniLbGlt-Ul~2D=.__D~ilydѹq>'ߩ֑s*Y!xR='lcL;.3B+9O">^1"ȏ׌_og>_:VtQEHŠ(((((((( B#VmlujV)w2G!m'~c o @s}}Zmvq'OoqV濎ͷdl.XE]mE'@ln'QS .H 6f,d?+ x'rBmĎdUKD; v( Z]NOKR!boF qA(H^6YDm閺Y#,`ԆBA@"}B̙L2JeepڍɪW֑MLg[8-by"9CrH k inM#3fiY6grZ6ڹ5q[Iu 9Y +={p["lO_@t>}O? n& #hT;Nノ †"hrc5ď`g 3Fqceo& Gb'r:rcO3moZs&E$*,X@1\e^&66 d~SȨæ2ONbm]r4~=4zj=;A.I1]KɮYHS+1PH\\tQEQEQEQEQEQEQEQEQEcE{SUpȷw֯j |EWrUx+D}bEt3?s C] ^|&t ,̲ZK#OXJî*v@_Opbe7VGv@_P7VGv@_P7VGv@_Ȭv2]\t5Jke7BݝrUw:to?7VU4jzukuM nF9uh_hagi u ??"E$[''qcܚ_7VGv@_P7VGv@_P7VGv@_P7VGv@_P7VGv@_P7VGv@_P erq!ҴH:}G:K$XS@eaG^> 믰7~DDM'nh'jv8`/廻k&eFMg Bp6Oʹ?V#|,?kn WS%JGk3$H0 Yn#*Väi»Cg,`*Xp=h#|,?h?VFsan%UYJ~y 5 X' 7񞀒M Bf_&LfB UderFnF@6U/H ZŰUޣZKJ%ȑXٌ9U>R -(繞ݞQ qi4R(; 2n(k/H Z?UY^uk&8$ *  i;WM:(` Zkug"??U/H ZŹf(ga̒+Yu;Yd8mL ߗr,7m1a1;WddK/H Z?U+pjέ%ri;UIH؝0$ Dd쉖Umc'v@_/Zؠ o?7VV( o?7VV( o?³H,MŦiϼ?fRv8[?%E{SUpȷw֯j |EWrUx+D}bEt3?s C] ^|&tz|\֫ <ۏ@]c#5.z?Z ףq /^5 K$/vO-@Ý eVY נ +{u"@mTP0`8I?翷 נp5ZiICcn?u?@VOX_ۏ@]cEdn?u?@VOX_ۏ@]cEdn?u?@VOX_ۏ@]cEdn?u?@OO5pszǒ\Wpڲbv-gn-˄J11)O _xUjWLѲ\2D~_@eONrl?k禱^=5@?iaok,_cf$nTʤ*]Ő+>R5}eoi67q142H܌##=+^=5G?]_O6ڶ{H%Yc`(`1Y ;?*m<Ŧ_XE(otӥq%U3ޏ?>׮Mc)P׆,.ynYv+4b"|`.7m6uT<hl`H-.|+@T \3U_XJT}] S#ЬFdWZeva;p@̌9^=5G??5KK[QmJ/7b00~Nv<.'յԯɧ\JJ(_a@|'twzk)O*XJT Z̺w7I7%O.xNUNm7Vrk禱^=5@ _"\k6*n^y\A4- (H>Wxf ">^1"|L[E# ( ( ( ( ( ( ( (*Zjuͽ֭8fWh[$a9Sx>ҭט:,Vq]XZYZLc!Y*~qS:O䳈Yy,^w.2x?뛉m8X 7\u7/T}%ٜ;Ip#\:n$oF![{a Dn 0@0 T|)iӷ]ϫ[XAl`i"CYAej1 !זi@ʑ!e@Af!Tsܒ{=v-MΚPSq̫,6$ ߉qƕ[Q",5KSgڀmۭٜ7ca/*d,RU؂(3· nҠ՝#,72H'\ׄkk&ZyT2HgxhCKyNJtVqm{G³[G0# *!;c`3[qo*K 9#`FApAxmm丸"%/$0UE$x/?ZCc<%26ơpnb7d :e[>dz1ڟ$w5lF?xn㸷%Ueu# 8 %yG|1gmouJUTTp adPSNpMqu6{ww|/to͉2(((((((((Ww j >*n^y\A4- (H>Wxf ">^1"|L[E# ( ( ( ( ( ( ( ( ( f'"`eZO\?!@ ;uIO^B!h 2 :RJY5FpZ-pg RS uQEQEQEQEQEQEQEQEQEQEcE{SUpȷw֯j |EWrUx+D}bEt3?s C] ^|&t袊Q@Q@Q@Q@Q@Q@Q@Q@Q@G<\bH%OCnbS_J6/:`QEQEQEQEQEQEQEQEQEQEQEOAWT|U"CZ*?h[Q^}U?A,x+D}bEt3?yҶ#*FQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEcE{SUpȷw֯j |EWrUx+D}bEt3?s C] ^|&t袊Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@*n^y\A5G_-?5ڟ?&!QE^ C] \G/WC7pW/+b:(aEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEP?[kW?^MQWw j nTQEzG)WG/WC7pW=?A,gJ؎(QEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEOAWT|U"CZ*?h[Q^}U?A,x+D}bEt3?yҶ#*FQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEcE{SUpȷw֯j |EWrUx+D}bEt3?s C] ^|&t袊Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@*n^y\A5G_-?5ڟ?&!QE^ C] \G/WC7pW/+b:(aEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEP?[kW?^MQWw j nTQEzG)WG/WC7pW=?A,gJ؎(QEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEOAWT|U"CZ*?h[Q^}U?A,x+D}bEt3?yҶ#*FQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEcE{SUpȷw֯j |EWrUx+D}bEt3?s C] ^|&t袊Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@*n^y\A5G_-?5ڟ?&!QE^ C] \G/WC7pW/+b:(aEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEP?[kW?^MQWw j nTQEzG)WG/WC7pW=?A,gJ؎(QEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEOAWT|U"CZ*?h[Q^}U?A,x+D}bEt3?yҶ#*FQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEcE{SUpȷw֯j |EWrUx+D}bEt3?s C] ^|&t袊Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@*n^y\A5G_-?5ڟ?&!QE^ C] \G/WC7pW/+b:(aEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEP?[kW?^MQWw j nTQEzG)WG/WC7pW=?A,gJ؎(QEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEOAWT|U"CZ*?h[Q^}U?A,x+D}bEt3?yҶ#*FQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEcE{SUpȷw֯j |EWrUx+D}bEhj:,+cpU^ (>?g+D}bEnן/+cj ףj ׭*FcAP[AP[EcAP[AP[EcAP[AP[EcAP[AP[EcAP[AP[EcAP[AP[EcAP[AP[EcAP[AP[EcAP[AP[EcAP[AP[EcAP[AP[EcAP[AP[EcAP[AP[EcAP[AP[EcAP[AP[EcAP[AP[EcAP[AP[EcAP[AP[EcAP[AP[EcAP[AP[EcAP[AP[EcAP[AP[EcAP[AP[Er֥.Oim{r c[ڟ?&U]OAWB*(#_#+v">^1"kϗΕQE# ( ( &+**?:p3#0m.=ϓߠϓߠz|)I&żd0ub|-{qxCE̹i_nvI8I@^|dx~k I.YէXnlQEQEQEQEQEQEQEQET1X QT_QTuM<80J^$F *6rϓߠϓߠ<Үqyo%]e1?x~mmגw6_bVhײI?Xw lPEPEPEPUu?^MZ?&TQEzG)WG/Vp }omyml0 1ZxS_%wК\' zRa}OY?>GGEsxS_O)A/G,w7}LG\rsɬO)A/G'] V? J_OS zQ ?=e)r˰]='Dy|0. p2{;Q [x(bP .A ?=e(Ÿr˰] S[[Uw6E 2)< V? ª}OY?>EJ_OxWEOS zQ ?=e(`::+Ÿ}OY|GGEsxS_O)A/G,\' zQ.tttW9 ?=e(Ÿr˰]}OY?>GGEsxS_O)A/G,\' zQ.tttW9 ?=e(Ÿr˰]Gs}m=yU'=Ÿ}OY9e.h(EU?>xS_,oh*' zQ.t[EG%Z/' ?=e(Ÿr˰]hwPzŻ3#ҷŸ}OY9e.?>xS_,\' zQ.tttW9 ?=e(Ÿr˰]Uy\A5 ?=e*-.skL'RAE :+gнM̎{3netgen-6.2.1804/doc/pictures/viewingoptions_2.jpg0000644000175000017500000011071013272137567020417 0ustar kurtkurtJFIFC    $.' ",#(7),01444'9=82<.342C  2!!222222222222222222222222222222222222222222222222220" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?翚O^E,<(R8q ڤ&7ozp8#ҡ0ֶG vE8OE>ֽYH,uv'3(\gc Ǭ}*< )!Q" vK ٫v#|,??OX¤Parυ'(@G'X,GaI  Q'X,RyB(Qd~rυy> TPYarυ'(@G'X,GanRMkpT7 F֜,tmN$5lY\U7 #mdѸ"HE٢[ (|,??jwڜG=R[EMF3$h<O57"\ɜTH|9_9?c < +N-;P[˅7ZM:(LG'np=z?tɧ[E˦Fj F0Ia֏kH9$rrυy> WM/ᱛ\mOSK[M"DI!v|lA9gkz'?aq$B?.}d'-Y'X,GatUU.5 &$Bʨvռioo Onm?ݐ ;F@=j}!H (|,??St}g¶r;IEjBUB\1fn/oOy4P41휪:Ui$_OX9?c ֖Vˬk)c(f(Hp8ڟmWR֭$c-3K&*0yIarυb FvSt[>ƣjZ#R?9?c < *O(Q ,OX9?c yB #|,??OX¤P (|,??g'SLH/YP#1{Rm-@.3dEi\Xi0ͲgAda+!]rN$?Iq %]n>cEq!0:j.{"|4O&i7;-m`6eGFVGFs>rLMF-Alr:zTQy%4-_k%a(6Ò=} H>D}n73n~+|):=Ŏ;G`ծ|T& )S[T-ʧ`#|a^_Uk|WR&tI'~Wk|WQ_UW^ɞ7{ +j]]<&oq#=Qy-ǹgAJu6׼Ok o%SxUPp x^<T^]F(˙&7 5cu?kݼ/%0mW a zmoia}夷 ۙTۈېzk|WQ_U/kFrϹ孮j%>ϥ&Jʣ+`}mA@nK Estf$O׹?νG ϊ?? Ի ]%TnM԰j_rPiv\vVN{cwu2˙!|FUB0a^|2t'I_U/mGrOIy}{s}0O2F>vqM{'!~T_'Z,TBrE)Wi?x/N~ar'\Xvg4QEhAWG/U_xG+Fwe 䎾Uȏ׌_UКΎo?h} p3jUԣd2E _j>6LIm=6%u&=܌;[K Ue>Je9%?4}~ONcbR9yIFn Ee5)&n^YMe!nlRV-~%gԞx[;drpppAQ\ȇY,IR%; Hf?,2w"R~b2Zլ #!%^Vp~V#c ^'U%Wid PXAs:{WŦ@m˅ Y-#ǻ_^Cǵ|/5Z>h6!k `]9U'E264rov3<Ikq;i$dLbN'*h*tRJ4ׯ$ "Jn0.3瞜b\Ԛw.-키3^JUu]ă:k&{99rלrQy= 嵿'щ@3%blU$42Y=km`8-:Yc'WXE,@I+ f縴n.+^WC(mry˜2I[o/A$~e]z0ZU-ux]G@~b-mP^Igr<##Ӆ#W!ČH$:kYc_fmo{[$'tY"130r M1dfnw|3%ƺmFL+Hd1!IUyWkm1y$̼ FlҫHP,pN<~:W@;˽i H0ʼA9asBlҫHP,pN<~.q O,)gwu$\VHӣXCu,jP8Y F@88z^^_#Ʒ+0^܀|+0= MR% %2HuI{w?ktKKw=*J1J6#zQ "h.>Hmv/8 Եm+2\dVI<2#Vm* cy/G/KaZf *;ĮZ4pz0)"jߘo΀)?{r4}?{r5sYx Li\&ܱ1#6s³w̹  o7RME,pg" $K>:Ӛ?*n^y\A4- (H>Wxf ">^1"|L[E# ( ( ( ( ()y?ZRNmg3qA+7W-{Пs~ʀ9]N[.4߳Eono=_;/4GZ[4oS{)l}١(F9;P.kt KtjA*mF(*Ml'mڴO - 90H _i7\7ݥ,m Vݎ9aK Լ5'2٘-icKF*C#ی+2O1*p3@F[}eMuZj$)XEU)*I{'֭ѵh&* r̂"NAǓ[TPOKǯ闑>m.-HFy vd6I9rk3A}-~kq9mn;Y dmRv)!@u4P w-b,Z\DM:1Dخ-qNK= ua(iR(}FUJ o 8lNo,Pq\g43P\NK >[0W;/^WÚ|dvfȍ** !y`އEqqOPe X"η*ǵ f|**IenҊ(((_-?5??/[k[REQEQEQEQEQEOAWT|U"CZ*?h[Q^}U?A,x+D}bEt3?yҶ#*FQEQEQEQEQES }^&r<-q;UTd]p׼ 77O펚qalg2N+Q]}IO1vO>oh#!ĜA]sXa{ J3ۻiPx[>bNeFx-"cF7aԯ.8IFIUaS[jx|ȭv c7#*e'bawEn#×z7:o|w1(0& *kiγ]io=֛Cr*UNҊ崉Y|[mu=f`E*y1UQ oƙz6r韺ϕ?5,Dn g.?- l~Pds mS#1X 3hTʐ~x<<.u8OܭEIn^c|coH9$kƺZy\i}3s(6o@f0yβu2>=wXxʹ-:xNGWFXɌ`RfʫvJӥ䰵{WdwM Qy>2պ_GIM,0Ӵ@(c}_!7.m-rB+9O">^1"ȏ׌_og>_:VtQEHŠ((((( zoO֛(k֬_@'kBnE RAv#@/5ag dU,Y#jm \|1# jY\ŽS;[cw>>iڽvoXaY6  %xin$/tY. rym  !V J\c 2#smROR6nVi3;]\ؘ=F*z|.>ߟmA>g>w7\>/&\C,k?G)`W@<_=Uʶ"F_Ok$(4S)r"!@p6-Ҙ!kh̊ȒXh-4:kq$04͒r 6&Qz a/$8 qtDlT3b|osd2}GSյ{ 1WQD\;l7*̩͞7eGA֦Aooۄn,dfWKt;W[}Nm+"Ko>+fTB#PH'n-99<&aHZHXl2:vO7[v7m7Ii(a6Ep9=~ί&: HOdSJΐyhV^{[q0c*,hErKL "nu mkQK{DX NʈF\8a hGk6ܴ\DneY FL+zN1ѤYLMn48`Ęoqwu$w*9UW V̞)2[2oV+APHa#Fہ$4z74}WDo!AHh]2$9 @bO\ٿ ջMn##2H nܮCC2j_ZI[\ijD#r0Gu Gh~lfcqyui 7ic@c6  kI?/dKqNF݇!tQ)! \ٿIt)˺4-3FEVtmPa'NÞ#vCmuya"{yc,蠒%FJ@???6o3G#sf5'mGGI'm VDo4E4_f$zmW1F+Ix[n?Gh~lfkP] U¾:vEH2ecW?!@Iٸ0A92Ugyvd%6n_'fHnv ?7%f1 L"oo$І4 8u=$YmB$M6َF no5W`Ƞ7H(ݙL TwBP!P0`???6o3G#sf5b>fZ^Cl6  13€2?7ɏ)g)m]-$xB"$3 [KvfOe3\)P O1@ %@ç ???6o3G#sf5mf1Z ( ( ( (1U"CZ*?j[kW?^M p>B+9O">^1"ȏ׌_og>_:VtQEHŠ*e=Tlsg5]L{}cRn,QU  o7F5/amWB:g|7j_3[rYFavpV2YbnexnF#=iY\\^}[  \ٿXRPY濽6ls0dnTeRW$ͺx7Nk.κL]˵t.omK9--$.H5?7tuKTQ' H(2>E l#i1$g#sf4???6o3@څeW DR0\0;tFỿM; pƟE(tV'9Gh~lf1_EqZZ[ 6ar/fI[[s R_c:>ZV.deR P@8}- \ٿP&oURO  򂪧s]Lp!rE2;;9f$$ޱ7 .LBP[D@r<>Jag$f???6o3G#sf4G%ޣ3mȄ4sl 3 a~$ A&qZW4ylBq# O霯E \ٿA4H.9،.I˽,tuKTQ' H(2>Y \ٿI? o$teqJ#Om9 g-mk$Y-EF~v!YTH, 7aG/!u/Y0dV'y D6beD>TrNXj???6o3G#sf4c,F5kV}cI'C֬cRn,QU  o7F5/am_u\NzE1n?] CS| TQEOAWT|U"CZ*?h[Q^}U?A,x+D}bEt3?yҶ#*FOW-{T׼ 7:* ( ( ( ( ( ( (3d"3r)-~%C˝:5iUkEGmob9&|0vgս@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@cEX*nmINcM6 (1U"CZ*?j[kW?^M p>B+9O">^1"ȏ׌_og>_:VtQEH©y?W* [A4%q^II=Eo"6,,X÷xrvj=Hl]Lг:){&6jIf0Gmsm]wx!E(TԞx`P,:nQ2>X҇ZřYӥ gKd ]q'A7485}?L}JM@n-M.T\kc`YQu40 3ė 4J 0p ZIW&tyF@E`0lg 5xzιyu4 P̱HA# ®zn"V;K^} QP8#8~fYwVx^ǒݍ_w7ؒ>y*VCDѿaʺdʐ kL?buK$~>Ǻ3y|ܽ3zԑtdw fS*/@;Z]R[ūkidm4dH' H׏=5ռ$iKlyV?y Dd@:+KP[wa T*e'F5]9oL)yOnqiqDZ֙>qE}V,[#n\pN?Micϰ[9VXfId'm6kXb$՜g\.JR񭵽^dF%w-j#E[eMh:Th? /i"[q˽BNxZo3Z -s,3"ɱXh$2$FTRɱ6?oRK&x4d}Ʈ@l>GMjK&x4d}Ʈ@l>GMjK&x4d}Ʈ@l>GMjK&x4d}Ʈ@l>GMjK&x5Y)cV7`;e'ROȞ?CFi??i(Ww j >*n^y\A4- (H>Wxf ">^1"|L[E# M\zoOUI??G@Q@Q@Q@Q@Q@Q@ly$K$P${^O7VV( rgK8l!#:v@_k_MiZ^O[fޮzl_:B1ܠa2t4vQg=v£5'm>vR@ [ϝx@-ܥssow $ER0sצO@krKO +HM")!`` IUO-|vAVeXAR@"yVm~ftB_"LqR@$FN7(!F'm>vTsY J^I$EUE$x-T[vs+# ԅ#,: ϭ1,n^p8# GʪpvQ[ϝPyVm~dKi}u,V7Kgp`iJJ f̈0ukWX4{[ặ`#hRHH(?q~RG`thKxV7化[",[XUߡ\}GNuuҴn{KXe pA.o0tVYi X(PN ^UߡGm>vR@pZ$6X0sR*H+`[f%b6rZıЪX(;á\\wTod[xQu.cŰI.X;py<9|ڶFa0ǹ6rga(0 n㸷XeP++w6|5rQ> c/#K,]F.8'ԟi??h(_-?5ڟ?&E{SUpз*(#_#+Y+Wxf 3lGET*&zp$V [t dkw9Ao+ֵo+o+ֵo+o+ֵo+o+ֵo+o+ֵ>[8K2'#!dԢS^j/Inn[1]Vx?)j;/麔I-euQ4w[h- Inϕ !? V_4k][qo:K 9#!Ԍ;eߌt+ DW ;]Ƈb{2u#gKs>V_4h|iOQP1 -Y[?]?'AU#,#m^%ʦT^9)y# ?Inϕ !MrK{mZ6teR2 sJV V[Β*Heu# 8 Ks>V_4h|iOS V[Β*Heu# 8 Ks>V_4h|iƫ^l-LFY揔nϥ29|C3̑\UYF v -Y[?[;|O+ 6W? -Y`5 )o[JdzLqi7$ʥx?P]\jWoXE@es=(?k_k_ k_k_ k_k_ k_k_ k_j[٬?3?#8]94(( ȷw֯j OAWBSȏ׌_og{_#+Y+ϗΕQR0(((((([Ӧi5-i  '>"4.D R362[x z)dKk6wUިB~ftQUݭ::eA Zж.6yXyb#(9i:[=CT庻Q;')V 1"𻂍WW iޏ I?.{M$#3(qRݯ\6WWV:rY#YnA!Y%6PEĪla8e'>!zk_k_kMF KJ%A Nܖ$4mQ, ꗷ(e\Ky 7'nnrx?S=U=o8dl$;wGVoY5}SK]& ۈĒ7A$3IM,*LVv@v@ѼI/o_Q[i;兲#Hۨ(w(ٌ%zw½KDK"@cKu"W0d_*^n/~WWeTbywy'6ց}^5k)gFjn]_:dnB+9O">^1"ȏ׌_og>_:VtQEHŠ((((( [ju+;]3g۹xdpGֵ3PDFZ5}}/.4rS#8 p?ܑlc5?ognM9m{ߦ[7khq1>=QE-KQS%dHTdPcpX`|W tItxk*; (tG%ޣ3mȄ4sl 3 a~$ A&qZW4ylBq# O霯En"xJKRHcc$`% `GpkZWBflI*Go2qֳb&ݴGD.[\C|(iLk&Ы3mQ(8 H|YLOfedDiPB]¨B/,1v-qK4TΥv@m6sOi$>bn$KU+ 9$[CԿt ;T򼟶qnݳzp38xk}[RMYJ + T'0<öCiZe;Cgv*p=*WNK[mMJ̐ϘHRݳ33+y-!aӥHIbH#e"AqUF xG]ZM,**o'uV@퍫zTdK Gq=յ[ȯ_'͚Xl1yqp3g9lY]_F^qq b0Fq\Md04$#61 b gal61V ~W΃MnA! МeSR i+&f+;Y`A+)WgP5 ,u$1^}f7$:1A#b6[pS\`}RM~N,t㵖/Q渉Abx ck&oZMN>aĐ;@!3ߓkc ,KyI6GeH FpAܜջbPm!])`I z5Z$\ -{FOOn7WgXeP#h2HTe= Cum)eGdr#2TH @OntMF.R[Y!2jGL<A<1F4 kOI}n\t d'l  eɛHQP"4mLt* ʎ@7f513,l1#6s³w̹M,48ZD@sBȧ܄sl 'Hudu{xd "U}E *#ʃ? z]Oqsu("IfƁ؟}d͐ ( ( ( ( ( (1U"CZ*?j[kW?^M p>B+9O">^1"ȏ׌_og>_:VtQEHŠ(((((($l3k|]+pqWW[mZf ,a}I&4oO}ڞbGAc{oi֒y1,>܌k7!"jȲɷn*4;9 TٶѴKFI#Ӓ D0IZ2ėJh{o k6ͧXʍ(M>&۳Gl99. ðOmN;V[vءsgM_-m7Ii(a6Ep9=~_JfIfu 2 MD,+e%bgvN.|+& mk$7Oij a8uQpoTEyRCg٭m!5E +Bv1#n*$q:mWF@ѹI 24N@?#('Df?ؒJc)1<߿}%Qi]jh_ `x/ZGGo lܟm'zuW/ۻXXAm:kmHOW1emh`&Ս'E.uKDl+2+"!W*w+h V7Kj6b*E'8%#X䓑uEPEPEPEPEPEPEP?[kW?^MQWw j nTQEzG)WG/WC7pW=?A,gJ؎(QEQEQEQEQEQEbxİ[ZZ_m\  nqހ6\\7sYp4v3d8TW9l`xAucQ&}F㳾{-nT.cN>xA! x;+Mu5Q^^F bED䐡1ȅ™{Zn!,modbp1aUH[Er2] F+ƒvfU11ʸH2>c`vAbmUلfgeV "f|*ƘVvW5Ik@MT6CInCoN˵J9& 5MLGT-ocƜNP *up DTl)B^y44}9hdXJ4Hn1T4=^LJ[}Χ3Yi-omI $xitK/5xlIEVDs*ñ#&5bkm [Kk;wa”l+ɐ[a$^Kc],J!dm>T6f{jK DH{ef6&\@F$y8]4NVӢm 69\βfG^gW[oOhZCͻ~1zMKTx3j1%Im<S̒IJ cS!:+4C=ºUۍ-B)cXQ~Vm]ك Gb2h7.֮ᴹO6_(hi`CneϔTaG=R齹n} Mĩ1" K2 ; ((((((Ww j >*n^y\A4- (H>Wxf ">^1"|L[E# ( ( ( ( ( ( ( +7_D}ݭq֗ND-֪ƃX$aSJXQ{.Li6hXM0EjA5ܦ[R fb.)56̾+UB#H)dpeW7Q\ZiCYc4\5P*2)[{B@Z.m5\#@+Ġ`{kQ\ύitGu&6n ٴcy$< i^;խ'Dm~j)t9hnÆFl}PZTҡI絻76o3Đ24,Hp<1N65=F; k)o&RI[UeBťR0 wZω%-uYFxGAľ&BdT,U#(&)[9qX&Kũaj2|du>5t6OgӪNLa0TŃg—:5 inas41,w{}Ӎʻ d-L vE+† 3wc&%\wY[qo*K 9#`FApAJ( ( ( ( ( ( ( (1U"CZ*?j[kW?^M p>B+9O">^1"ȏ׌_og>_:VtQEHŠ(((((((緊#񬑒 VpAT+GҨjٚlמ_݌/5+K[hTe7+9UJI7veK'v\yy^'r(gkgnVBP;U}KXҼrgi%ȭFm6ѕYA<6>IMcfP6#p>e΂hrx2-\ÜeWt)Ig*bY$ܒk& e4ϳf9_44q][" [KvfOe3\)P O1@ %@ç mchfX͕f1E۵ϫ mt6KmN)|ڦ.A$瓚i;I(+H$?|.P۰ŊT׼fˍpO# ՙGGiizBVD¨#W!. i1ݦd6m[t `U#MA};MʯD@cjI&*E8RHR˞#p?n|>mao)mPc [ IQʑ@:--`Fwy"UrH%.O}=joZ­cdP# 0#8'sY^]>hdڥ Td lf s6 [7GgIn%H^MJA%@ʣ$@&Ҵy=AU Wqp֨[j;RO!b.W||(.bd.o^[2hww~olF.E3cV`˅, ޘrohiitnuykr#re1c%0`& |--&t-ye"rT.O'kZe& Ë\s9 pa 2 A<7V[ʒ*H2AGz(((((((( ȷw֯j OAWBSȏ׌_og{_#+Y+ϗΕB yi-܊0Sg]lUHU?K >f_>fϳٿEd]akx-Ef_>fϳٿnbH!]z0'] *Gv3fg]lU~7Yʔ%%9E6}Uk-W/11,[[̬$M@=j.!YDE9wDeP*}z'w>fϳٿF4֭nէK#b+!@>p;AnVZ}zm}`]o"Tdy|qݎzw>fϳٿ|?n5 {ahUg' -.v1>[uKd$ȌdeS8Oϳٿ?.6o*0lcey{e̅0/Ό6 8IbW,3-mD!*,ls+;)]ۈm[ϳٿ?.6o*(|'o{3d-hVZi{vjc@\㜇A5o>fϳٿ²MV^ڳ!IQcᇕ ʧ`ٌx$zob!cfϳٿoϦZY96#G+[8Pw(0;'9g-A6đC8*j>fϳٿEWϳٿ?.6o*,QU.6o*?K U?K >f_>fϳٿEWϳٿ?.6o*,QU.6o*?K U?K >f_>f⪖fR;7Q y?{g[kW?^MQWw j nTQEzG)WG/WC7pW=?A,gJا8jY+imqܬn0]<7H͊+h(bEG%Z/' M}o&$Ŕa(ǎ#:]seW tx^yz\Ӯeb=!\2*U۷:xJZ7~~1Iz}*&z_~ hk=/~R(vZ*dI&P^&?RUB +h(bEG%Z/' آ*!?Q V? €6(J_OUB +h(fE鷸{i<Ѷӆ 1޼?ͤi3i̗1U:吖h+#HdDevh(E@K/o5?%/TGs]$d` `2K$a T94-Rt㍣IHIHʜA&%Z/' ?*!?P1s SB6Kwؽ%l0!8ɻ m/ΓvPKHZXYUU$HubdVRKvڿh(E@|v<9oiwe5 tC{ncH $ŔJ򡤏q++翾9$x>#WpsG? y-.XeRG$ F #r:n|3':\wQY\r,f 1#?4H,WEixw~cmks n,!o؁NF_DTu/ ^iy瑀|h,NoUBy|[MpdaAzŲn40^YC,my55M6r,r$!Pq.Li%Z/' -!z<^lRF#*SFAVYտU&y#7apHqsW^+ |ZYO]jVVG#H@.7ny'pan]h;"L$2I$$I$V?*!?P1UV:y>|]"e8b~̈Cf`CPkWe Qo bso,f@ . ^h(66ӠȕDdrǔJr-i߽݇1{o?˻'Ls[h(bEG%Z/' آ*!?Q V? €6+'\YJMETo?Rҡ$]B#c2Gq([kW?^MQWw j nTQEzG)WG/WC7pW=?A,gJ̰Gkq>B]ʃ[gv޷7M?FXo>o*z|UMEC;o[v޷7SQ@TP?c>m{U5o>o*z|UMEC;o[v޷7SQ@TP?c>m{U5o>o*z|UM=1/y8ֳKٵ"$(1 ;o[v޷7^v35[ Է+ XʾVֻJ4!2˸8e]+6R׺C.u - 0QNq8m{T}⫍+m6Hd@ ebBGںfIKHՁQGY  :۞(o>o*z|Ur:=Z[+M>]fw35:HU @eH-w#/: v#eBfd"a_.%:?z|Uc)o*!Q;o[~m{T}j(z|Ucv޷7Go>o*!Q;o[~m{UKQ0ٛ5Av82|'zZu?%E{SUpȷw֯j |EWrUx+D}bEt3?s C] ^|&tz|\֫_OpbaEPEPEPEPEPEPEPEP]8{X&`60N~$PB8cH^=k68k(n!a`H%с`:+5;R.Jt%xX|390"6H绽^o^L2LF99dڌa|c9rʠaErZt#]ByTkcj`S;E! n|1!JK' ɪC=ėo4@3yxL`@=5\5[o/Fk r:yٸB+9O">^1"ȏ׌_og>_:V=?A.?kU8jR0((((((((/]Zkׯ"R|GXeJŮ*#hiEi$ĜSM_ѩVl<}")cz?swSxBzWEU"OswGֹ;rOswGֹ;rOswGֹ;rOswGֹ;rOswGֹ;rOswGֹ;rOswGֹ;s{!q|m!;nO狵 _jzc ( ( ( ( ?iֵd4 Ch*n^y\A5G_-?5ڟ?&!QE^ C] \G/WC7pW/+b _5gK"5AGA;ܷ<zn٨5#5 A]c֢4`'u hZO ?/ j+'?+_cGWXƀ5+Su;zZ?+_cGWXƀ#4`G?3?+_cGWXƕaB?G?4`'u hXԷv:ܒŮc[0GԜҫ`'u hO Hԙ2dTd@U z "MO ?/^k~h ^TB?LO ?/`G?B?LO ?/aX#4 A]c,#4`G?3?+_cGWXƋ`G?B?LO ?/aB?G?4`'u hX#4 A]c,#4`G?3?+_cGWXƋXa[k8mO3f~msKY? A]c?4kQY? A]c?4Ed`'u hO ?/?+_c@VOWXƏkVNH?֏  ԦeYU& m7_-?5ڟ?&E{SUpз*(#_#+Y+Wxf 3lGET(((((((((((((((((((((((Ww j >*n^y\A4- (H>Wxf ">^1"|L[E# ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( (1U"CZ*?j[kW?^M p>B+9O">^1"ȏ׌_og>_:VtQEHŠ((((((((((((((((((((((( ȷw֯j OAWBSȏ׌_og{_#+Y+ϗΕQR0(((((((((((((((((((((((_-?5ڟ?&E{SUpз*(#_#+CQa[2@YA+?_#+v|L[#Vo#VolQR3j ףj ׭(j ףj ׭(j ףj ׭(j ףj ׭(j ףj ׭(j ףj ׭(j ףj ׭(j ףj ׭(j ףj ׭(j ףj ׭(j ףj ׭(j ףj ׭(j ףj ׭(j ףj ׭(j ףj ׭(j ףj ׭(j ףj ׭(j ףj ׭(j ףj ׭(j ףj ׭(j ףj ׭(j ףj ׭(j ףj ׭(ֵ)u-"{HtMdn ې8`{jy\A5j !QE^ C[?A^|&t(QEQET1X QT_QTuxT;K0\K:Mu%k*B&#F;*8o2)o'AG'A^cwwܗs1s`o{92 /8O#jo>.t;PI# U6,A󄑙/ldt~||p~l;H-^GO6>- D$hC x+WEkۍK-ܞë́JsjIrOJ+#3^h\\HM!rv:v? b((((((((!O2΀>O~>O~?mơԴwaWna"0H!Q .;v||yqAɨ%q-yq eq">1۾x־ךZ\"F"O.I xTc QW;k|+y,)nߌFn޼@wGF*I*ӿdkb ( ( ( *?jUy\A4 >B+9O">^1"kϋ?_Lk{kkdx%%^7QVŸ(Վ?>xS_,s zQ ?=e(`::+Ÿ}OY9e.ee<󓞀M`}OY?>EJ_OUBxS_O)A/K]?<#ev\QڈxS_Yv O)A/G']s zQ ?=e(`::+Ÿ}OY9e.?>xS_Yv O)A/G'];m>YXʮO99' zQ.t[EG%Z/' ?=e(Ÿe.h(EU?>xS_Yv %Z/' ?*!?UOO)A/G']C[.-|Ol)\' zQ.tttW9 ?=e(Ÿe.?>xS_Yv O)A/G']ꮧ oO)A/Uuit]ghT : /]1[?[hdsٟnetgen-6.2.1804/doc/pictures/menu_help.jpg0000644000175000017500000000267413272137567017077 0ustar kurtkurtJFIFExifMM*C  !"$"$C%["@  !"1ATa#$6CQScqt24R1! ?2ִXJQ?B zznbqWk4$:a̰XKyAD!h/+y ^H׸uZGm4D{"Z[LX +jw~ w+PHm]]ubzT"gke|@MrY.SeHW!AP %@!eHR@YH9#(:N-ze5 de’eXS$)i'10V܉z"ەm,{vw:婥!0=$L<;״dno[ b4TrP*mԝ! -a2YWx~QϽX/f4ͫOCucZ5  Hm%Xg @Pw]G>8~UϽ])AܸEUu֎MW]Ub}@+XUV{}uix$ Wċ+1&{sHeISMZJ-# };:rxj^$mƀd qfyHنn2’J ޽hPώ3;N;!i)OZq8:ZK/sNx~p{!Dnts\-2J-H –!xJ(`.twv%a uVӉ- qH^ٌ~=۪ :2u$Fk!Jƾmԥ)JqM%9sm;$q lI߼Xq`)bJbUw՞n]{練uEۤ*m8KSŁo 0h( Xt/JU:wk:wk(__sV)~sV)~RΝZΝZJV4P]$p6uN'kQ)Enetgen-6.2.1804/doc/pictures/meshingoptions_2.jpg0000644000175000017500000012165513272137567020413 0ustar kurtkurtJFIFC    $.' ",#(7),01444'9=82<.342C  2!!22222222222222222222222222222222222222222222222222=" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?翚O^E,<(R8q ڤ&7ozp8#ҡ0ֶG vE8OE>ֽYH,uv'3(\gc Ǭ}*< )!Q" vK ٫v#|,??OX¤Parυ'(@G'X,GaI  Q'X,RyB(Qd~rυy> TPYarυ'(@G'X,GaI  o$$h,.FXā1a;QCmOarυzv\]5wEhp=0{U zUݴq>hV0Ȇ>H(IG#}5Z)G'X,Gav45V+=yi$R}:n['Kȵ Z eGr mL9$qrυy> WMVM.YijϖGۍ98:XR -CSK?3R:d L^> y> Q'X,[y{V.:6 SNuC55Tso乙8`xJrg'X,Gaux6Y[Ǭl2Ny*axAԡQ}z%8`'v.O |Խ>y> Q'X,]{+]w_-?IͺKH@T,OS?hmjv'[vq,srF1ϠVWIarυGq7e"VHo!%卺m9-KR[4i=@#F~Ft%(> Q'X,RyB(UG'X,GaI  Q'X,RyB(Qd~rυy> TPYarυ'(@G'X,GaI  RC:y,p?c )E?d?i M5գFsa'ɟ|j/YxtiWrpͲs 36;Z@Ɏ?:M.K6e/)I$H,-B3Dt?yd5/25<.?5Rծg.VHI2ͱ+OZri+lգFsa'ɟSmwS`L2H#9qv&:K;\}ȌAtՃ.HI`WLܵBtRϑ_E<[F[ߊ xGCsqci,go5N5kxpuW/0%HhǶ}/?]>x6UFxO~^&h9# kEHc](йRSߓ'P}O:+aEfB>}+{Z;X9g[MOQAE]{|e1##+kA5XK-,QY,$'$YCs+?  ϊ?ZMZj2G^V m{<ǖܼ+Fĺݸ]6ޮ˫kmΧf9+?  ϊ?n&karK:vYZ:DVЌgd#/e%&A`99s ϊ?6N'RUi.n2gK=ZQo'Nu#i4,,=zkgX-hnO!feDI e0d+ÃY? y\Ơ/.,ˆKH#IrP! zIj22,j.z?Mz!~T_'TN O~Wk|WQ_U_؟dWd/_O*B5>+;g^+W_'J|2t'G~ɞ5{ ~WD9|+؇6N'RxpuIDlElg$}r"[iᕷLH`aӂk׿  ϊ?Y="vޤ1E'E\<1+6Hz!~TB<;@'Gaهg쳆XnhROS\Wm?J;#IW|`tKV>c6FM5^RZ?ACė1^$ѮCy#_#+_?&zXbL2NbI.6('* ӵ;e/lX(W&EgRPWq8ג_QFY`w*%TR2pySu>y?s\~k1X\\n|#~IyN"U2_ވ/,&Ͳ76JE+py?sQ[@O<-E9e888 㨮dC$)ɝHZ3vx;g)?1-@KVKi +8?+ѱؐ zU(,S 9r=l 6†,͖Vcݏ!i??CD [&ehcĠwnA,6>GQ^I,pGw:,WYԚ;YH-]On?1i pH IJ 'vs$#VŜ*0!UsZU02U{>'oμM%jD;(3pS%b7U%&jiO\%D#FR6PJdGQ@ >kM^ mW*Ǵd`p0'=_sa mڤVRM5P\nʂ%,m g-th!KVLv M's )$@Ykqr(X$u)5iZgƷWs!,ϸ$Ee ac#qKoO>}uiRd)hRY6}t WIlI%!y=E= 2AGķpZj~3[qE&I~o/,eIџډݾ? ˴>5?5VskR*::FC:Ӛֳmme+T$$i‚y/ UtykJv iVNdi^養I egv tuoᦝRJD $ d#i1rYy|9_.`&i[CZt/ [o7\eᘍG ?4n)nRf,YN}kR_M$W& ɅmU~9,Nwk_:?4߿onl<-w3Ojɟ]6ƪavIqxAF">XRx!\nYʨ'M>-RhX7P1!A"y0qݡ%!ΉR_XM倗(A'Q<0p@:KTwҺ*JH$ר )o=#ĈER41$AVC8?"4똤{1m ;~Z:Rܤ#G0YX fO{X++0 ]'F&v`U)muq.^1"_؎(QEQEQEQEQEQEQEQEQEQEQEQP=z6-&.fILQ 9??cSE-żsp(u##FyV ހ$9HGx[d FlCS؃ހIc3$,h:z[O\?!W`_]jd^Y$os¤$ݳw'qЌ7OOoG?ơ³isjQ%>xBbw\,%M+j20(n9ez[?5{#Lu_2GcleA=($}((d~UkP<=^jRe`[LyG2H4RѴ_AW,R%dcc *( ( ( ( ( (1sԮ 4? g?J9KҗƉ<">^1"ȏ׌_og੗ƶ#*FQEQEQEQEQEQEQEQEx2_]p]A:fE +E iEy巂JQ"_cIX')(˺WpHE$v.6oq\d <`8.˄]tPu˹|MwuR !5w00HPA 209g5+ N9Kԑ-, K>ls ubC1oG8}3JYӦ?ƫY!e qۘS,ξ"LRgg5K*IQټ+W'+drk8_P? Ŏ_DAiVo=l &:9_2 g El`[k#U d0BWq* s^MQ {hD5k1j>6El$qsXk>"EӬI{>yӝ4PW?sЅQZ泮qah/UpPdkSYntiXd(*4')]mj0Gdu'@9e..f9J I+[[Xd yfBlCɻk?_۶eGCw:ݵ/?ƛ&i"k<IG/_{BVlFf66̓RTdR˼>,u+F}NyTAm°%rr6NG&: 98I:#<T\/iKh 476}۳AR|?h 0-\N2X}9èEpe~KZ5gr"sH8wKkxz- ^n A2rH j+|3//#;Q`qK;Eڹ8PI`*F-Ve [*$\,(ȅ.9.ؽz6-&.fILQ 9??cOetEDd`*>;2O]ic,fGb>|Rq ym<5o\EirYOWPql0%CңxeyR9Q"Q 1wPv sus=(eho7?f2qŮú\ψ$tG=vAw7!Դm6ĐG #wt?69 3:z_{BVlFf66̓RTd^1"_؎(QEQEQY_L-»ĩ ɸ)P~8$(YTd);]oߛIMcfP6#p>eɦkgoI-3[jT6P?R@4袊(((((YKj_?ʴ>7GEI#hLޑ'f4!F @ 8&7@ڼwv m6I3 ]c랹e;=3N .N$+}9$'$Y7@ 7@ 7@  0}(((R/&+ /kJ_&{3Wxf ">^1"_؎(QEQEizUޣg{JՖ$yB)>l2$<9 xOOlobKHym!cG.]XC2qG{ SHhHʺkc#Lu_"fxn$6ЗxYahQݳ}*=BӋL #H=$F@OGF@O@֑^xr}ax6H>λtJ I]; *CX7q6(x;U?tBq*NH!Ǭ?i~(?i~(>ZKܶyQPcX>X_H;7 `0`ҭm㷷$q"j?i~(?i~( i:tvGK-ZE<϶"(aI>UP,;1ߝc}:guהۘ/ҥ[(L¬|O"l ~JXxivnY5´R!w.Nbns.Ҳ>c}:<~uךgtȣRMw$Hhqoh+4hn~sJya<G 4gXwHFfcIv&¿-6 ( ( (1sԮ 4? g?J9KҗƉ<">^1"ȏ׌_og੗ƶ#54[Ďde'k6OZu#,QU  o7F5/am_tcRn O2u8D2~UKxX[1  o7@?lOIQ䟕gcRnj_~T}?'YԿ煇t䟕lOIVv5/amƥ<,?-h?'G~UKxX[1  o7@?lOIQ䟕gcRnj_~T}?'YԿ煇t䟕lOIVv5/amƥ<,?-h?'G~UKxX[1  o7@?lOIQ䟕gcRnj_~T}?'YԿ煇t䟕lOIVv5/amƥ<,?-h?'G~UKxX[1  o7@?lOIUf2gpj5/amƥ<,?-ZI&;Tp =;ɬ_H?7^1  o7F5/am?j ףj ׭ j_эKxX[CtcRn3 Fz? Fzƥ<,?-Կ煇 H?7^e"ʺG{KxX[1  o7@(Կ煇tbKxX[1  o7@(Կ煇^1"ȏ׌_og੗ƶ)qZU}?A.?kUQ@Q@fj햊m靥8"%ļ耺pYAӬ_:koockhÙb")\(j 9} [U2G+:SnQ5o݄P:jZB̯,.BX^wdxe%{V m⵲[p#)*Ljr%^F:( ( ( ( ( ( ( ( +&Ěv+ka=bI1ո5;[NNVʍ( a*N yn(* }KO̶fF`8<@EQEQEQEQPXZ}eK4O7#ApGZ ( (./mfi6w)w8Fr8}>=3,]FC%OB0FAt5ϭkZt5ϭh9?jW@_}{3p_MiKDfw C] \G/WC7pTc[ȩ{o'mYk 9fE$=qo/Cz`?l>GMjRɱ6?oPizsۑb}koO'&Zhh|=ķ<'J uo_Eh㵗{ TŌSk4r~siĖ9]xd}ƬK4SRH#*ZB)d}Ə)cWh _6?o&x5vcWh _6?o&x5vcWh _6?o_Qi>Υ$0pOWm?& 1Z[q`Q{<rry47 ] #ˉQ 42#?vѸR7o,EPm.,4K;K B2 @p`d*PvOtoILkH` $Gyue&CPi%-`XO=S'ш&T48e!$++}>-mc;#\QOEp^ }V "ӣ7vw"L,N()us+Ss-S[$:pi7wjPU$e ([QVN-.` LMU۵f?EGR="qB"tw0wvghU{(#Voem#3Gh$@ )*h)ws}VHnfs879n^YxY#if&GI(rv 7630hB^ З]IIq1k>=il:abd4\.I} -uy4]Q&$kfUA$BNcnv\kw_[HvJo n:w5xNko&$np dG5bSj:%}UӗOh">a!b C;x-:XeZ$wH ֤\aY'=>ќc鞣ֹoWQZz+:VI$@8r^PWcu!,82zK($Z; _]k3s [Li!hhƲG%&Dp7"|EY:qK)h1p">~b j_, M0V^1"ȏ׌_og੗ƶ1R?7~z?#>zc)xIUAi%p1g9皏Q.>w w{U[ա  ;g6M[XOXO+   `EnGq@}c?Gq@}c?X,a[XOXO tV$w?G$w?E  `EnGq@}c?Gq@}c?X,a[XOXO tV$w?G$w?Ekh7po*oH?'^r:>Nz,4謟.z?֢ נ j+'q /^.z֢ נ j+'q /^.z֢ נ j+'q /^.z֢ נ j+'q /^.z֢ נ j+'q /^.z֬7F so?7.]ism2X?sԮ 4? g?J9KҗƉ<">^1"ȏ׌_og੗ƶ2l,$2ai,q>bq+o??A.?kUX:o?¬Q@X:o?¬WvI_V6v3Y0O 9)P/A9v?X:o?³oY]+G Ŝgq `2<5s4 昫Jg%)FgAg;MUQ**_;MUQ**_;MUQ**_;MUQ**_;MUQ**_;MUQ**_;MUQ**_;MUQ**_;MUQ**_;MUQ**_;MUQ**_;MUQ**_;MUQ**_;MUQ**_;MUQ**_;MUQ**_;MUQ**_;MUQ**_;MUQ**_;MUQ**_;MUU-?"aT8e,rG'{p+Vt5ϭh9?jW@_}{3p_MiKDfw C] \G/WC7pTc[O]k.nqH(GʰiM"o\x5UhK}@o_[U moTGq{?oV1{ UAwU$' lۏI{E![-Z~}{QFQ"qߜ*?Io K~j_/\W-K}@o_[U_&(4Uhr$ɥ ?%7M/UZ(\ -iIo KV.-K}@o_[U_&(4Uhr$ɥ ?%7M/UZ(\ -i­i7n<ϲۤ[ghOh'R5֝ Rk{ Ơy+Q%J@n$D G0H3|rTn]2-2MN{[|vj$ny 7 w>b-+NZHT.  eB&m9Z {#+$ 0hqN^'ִ'粖9LlG"͌^C3ǡ0fthsqsuSV,m4D<"GO@EQEVN# kVN# 7g?J9KsԮ 4? )|h_#+Y+Wxf |Lkc"Di<1vUQO i뵳^[tqR V _5H m}{g+bVM2ϒ)-V#OQ>%/%jQLfJZxdmA@m Lu{SM(~×g{?2iS`g*V+??GVX,c`\{o??[Q`s=`\{olQE?Qs=E ??GVX,c`\{o??[Q`s=`\{olQE?U3LidXX4E@F$#ڮQNðQEQEQEQEQEQEQEQEQEQEQEVN# kVN# 7g?J9KsԮ 4? )|h_#+Y+Wxf |Lkb _5gm닄OtDy6&XF[`ӦjFS"G97P=ڟf}& bOOiZվc>u}:Awo5e}Ȭ1 Pw`eTɺ_RSU%/%ekX,[ir$oHTッހ:+?~O4mkӿ'.:+?~O4mkӿ'.:+?~O4mkӿ'.:+?~O4mkӿ'.:+?~O4mkӿ'.:+?~O4mkӿ'.:+?~O4mkӿ'.:+?~O4mkӿ'.:+?~O4mkӿ'.:+?~O5wKor"U.`v>EIed{mT72f+`7t"KXĂ_*}:xV&]8CI{'2\/!H~;e!y,JjMS\`+ȭKH$yUr bavz}ɻȶ7/bؘ9m;Mo4Nx&eF<*df.~oݷy*TW5vVVַvRi&p <61㓩x֚55AqcTr;~ITWd!0J@m`~rS_:y^OmbnٽCc8q EPEPEPY:o@5Y:o@4+ /kR/&g;ȏ׌_og{_#+Y*e1yT / .O5`nt5ڨ2L%=h5wXH h FiU[?z "HF<@!C,v〣 Z4CЍtz "QZxb;[TCv>Em`G?B?E%#4`G? V#4X,bQ[B?G`Em`G?B?E%#4`G? V#4X,bQ[B?G`Em`G?B?E%kh7po*_!Vtv FS^==*2:VYH ŧX(;x^(#LaEPEPEPEPEPYvW =.@< d+"N@ʼ|tPEPEPEPEPY:o@5Y:o@4+ /kR/&g;ȏ׌_og{_#+Y*e1z|\֫_OpbaEPq *G*;$U`J6`2M<6yR$,(,*{@ W'Xo4um- &v!Bs$MC^fm,ֲ6~4T;@e9]\mSJH{).dT$3V((((((((((((((((((((7F so֬7F sooڕ|s_GA5p\?iZR3ٝǂG/WC7pW=?A,2QѶ#kSa֥9?qCcEo"o\x5UKk,ic\p ]> _h@_z "LO9c.RE+# zb1e-$o.1I=5k,M&&'ڵ Qk,P}ZK%jֿ-KE'ڵ Qk,P}ZK%jֿ-KE'ڵ Qk,P}ZK%jֿ-KE'ڵ Qk,P}ZK%jֿ-KE'ڵ UR4QvEv8z?oPn?#*"pM`7Ե6d3(Bq[Sx+<|I.ԭ-d8(2ˮ`Ö߇t^Ap\+Za @pNNQ@_5ƴVa>kamA6q0ڬb7Z%>Qfέiutci2jbQ1-Q@=չ605IRuB̛nmW q)RDIz!EF=f&^a{CJ# ɟ&BUQRQgkTEKMV:c!khĶR !oUr$F{(u_ Y'k/Z_Vyz_}=!e^7|ОWt p^c){mA#)T`6㝍}::}=Ǒ\>$ݎ2OsT5Ȯ=GNn- f9:(-ŚqX2fӬ0g&)'gTQg M7hW764]\%W/ 4LBlg uPAc<6Ytiu0"2!0߉F;C׼_nyۜ<KJǂ[ o/H ƹӵhkGm$|b]ΫQC+.C*!6 :m+FvB8H) ,HH"pP.ӛX %΍mmk-H٢xyIWRԕ]C7$lsAMG +kEq^M54y7? p\WsAMG M54\.vWSQGsAMG  y7? SQEkEq^M54y7? p\WsAMG M54\.vWSQGsAMG  y7? SQEkEq^M55ټ/XF1QJ.:@ 8&qBH7ڠIMsPԵ4 O>"3SQt"n5;[(Y,3,j[ gj"1O_Tt)fѰ`c[KǸQkH:Kq2+%v,(T lz]:<ֱ%=9YXo8 3ڀ7`x-IaC$l]H #I\׃Q4"D(^ydgEU!vH$dni7W;fw}!o38F1Ns/QEoo3ZYr;@=xz\%-A:{{7wAfG:ơn$.@*6? o nwy ռI4l4Zwj8Lv%%;v;[/~×\\&KrKL~`# I~g8PjnYn% vr窰Kq!vI~&O|Z6K,zf\ZELpg@EAc}7w?j%Yn ռI4l4Zwj8Lv%%;v;[/fv}^1"_ǛEK|޹?kh3[tfGåiB٘" d Wjƕ][Z3D\'n3Uc-imM }^&o n` ڠI򌓁ϩ'17#4Ǎs_SWJf*-@ygiiXV9+ӿ"7ϧDoc;}?#wF,9+ӿ"7ϧDoc;}?#wF,9+ӿ"7ϧDoc;}?#wF,9+ӿ"7ϧDoc;}?#wF,9?oVv>ƥՙ̥IO )((((((((((+'M\'M\3p_Mw9?jW@_}֔4Lgq?A,x+D}bEt3?L&5OOpbqZT+2v}Lأ>K4QWK*g|h f&9-!SK=廷 b)>S2?QF&kyϕUMcytUP$ߍSLXw;iwF̤c&{ƚq[_մN (f۷*C+)}7+N_:FYpCI,#8]p $ OR~((((((((((UR̀2hL[|«PXrq^?%CR,(\Is+{y'[djʹeAl`PO#5?+oRrH)D;~uPA2۰7 @TT7m}i'mspy֧(katf#kW+SEPERS^-mW+c# A@袊(((+'M\'M\3p_Mw9?jW@_}֔4Lgq?A,x+D}bEt3?L&57rveCdRNZ&R?7~k0cWvsq4q! 4gh㚛_M_2|콿ߴH3ul̼MU#EGj|M%;@UfRIx1e41mKm큑 Mj{?kjJ_6?o&x5vcWh _6?o&x5vcWh _6?o&x5vcWh _6?o&x5vcWh _6?o_Qi>Υ$0pOWm?& 1+'LYv2x3s꺝\ifzw.;}?Zߢi7Z٤i"ާuRB mFP1r6dIM_HKӦƚWhČ{mQ@5/HNNHlYVUrQPqijZE}[[88M_#.R5Ggb,Ė>{מiu++[%4$ȁ5+@PiI; ɦC+_Z ldڥ*A|Tp0uK{mfVX֭( %̍lӒ_Ҩ եyij`f A`3?"v++>vB@([mRQ `[-wPv sus=(eho7?f2qŮú-myųE9r4rjXpxbFX 7aE`GB'flH$thE8@A3sEQEQEQEVN# kVN# 7g?J9KsԮ 4? )|h_#+Y+Wxf |Lkc:$rBK-1^2mi IYۄE LsɨѭV*FG%ʫ-T4 N3~Uv@_P7VGv@_PV UPejD8 ZuUŜ-su DJfvQ[ϝPyVm~UߡKE'm>vQ[ϝPyVm~UߡKE'm>vQ[ϝPyVm~UߡKE'm>vQ[ϝPyVm~9Qo d%QEQEQEQEQEQEQEQEQEQEQEVN# kVN# 7g?J9KsԮ 4? )|h_#+Y+Wxf |LkbzYw`ܖf8yɦk5^o/Czm--kx1$犀:}7Ə}7ƹϴ?v(\?Z?Zk>ϴ?s!ik#^NaF)RlZOY9}>]Rʴ`jab~nh-^ mHv\ۉa=1FŅe <@גGAn.co"6*YA3b|osgTi8? O9V@?#To?€#!ih!ikKy5aeiVUW$9}j/ϴ?q\?Z?Zk>ϴ?s!ih!ikC| >k>Σ_M__M__v(C| .:}7Ə}7ƹϴ?v(\?Z?Zk>ϴ?s!ih!ikC| >k>Σ_M_MSO՝Ve$ArchZ[mV2.:Ru>CDLHl xv.;TqO8(uy{+oN˜:4{Xln'W-a*ɑp s "xmi蚣/>+"yc̯"ȻL :FŌ:6C@!lDٵ . lpw6 ݿsޕëZyw Fp}j`kHմ=>N-R!'e`x (W-I|M.ϗtfqn_kLEe$Ҭ3\!1HͱQ?+@<[mm㷷"% qUE8.+[e!heVE?4@P GJt7Zc}T_<1kPSɵg0n3,ew̌2%5x=|I~[nTX%9;@SL$<%xMn $ĊJuL q~=sIVd`6!>33[:JOhqijrk:rXL#k;s|h ]UuuS1%r YLSP'p.Qx[WHUi [-N#R62HN!; ZIwoYMm^s2,ya8 q+zceo6v,1&Iڊ'k_v$"2+PYq*&T6Q'8ȵ959,&m5>pOQMϦ5Ey"ZfG+r,8'\. vڌ^dV`*R E8|xA?ݯ<˛+.^[8F+racxmm丸"%/$0UE$xj _ܤC2Pb? &VfiҾN;lZok5̬7(`=";TQ; 2vN=?ҥgg9cXFUYkHg.WPw=ŭ%FeYc%rH1_G})uwXȳ ".6F$'x$=+NSS/]],*%u*OaQzM-0ktt_iK1'}kq2N]L>f_;ۘ`J_|dqrMKKX-m`".NNp9$5=r8],> ׌.2\V-9'̓ =Ž[-Է$-~Cv8v[j3G Nu `\B᳝zV._̻$XTJ>UҪEoAiqimsυ, .ӕܠay@]~PhRI"c 2Yu&w(~nI[j:}[+v3MI^nd`[>1/W:J<[oqK RHPF A$%N-(IQ3c'#9Y;w0KmME|{5+fB B 98NJӵ/l-nRuDf\HK(l@$BIKKѴQ-kT-8ʅ=ڀ1tOj`/lm, qNH;ֻ\:c]Z=쁂](?B#Tc2űO/m JG#nюwSQ:Vۭak{ C`}dziĩ c \U @hlQΕjfW6׬"T(*;CƠvO }u1zcoN N9KTYK6wg'''<O ZRJH6™ .eS'm6+x%k\Ơ:Ǚ 9MiZvne,;hV5-2B399K Ȭ!QU,*J/ͧYj #^Cnd&g0~ ʌw\o~Ѣ.9dܼ}I&q3[y .[hq`Px|= ևjvWm%G=#kIhCn&i)%ǜn4cq#yt&0u\oYkh"0O 42wQ(1fO~j,ƙjא=c9R IYFdb.vA $+u ) A@5SRg쯼jIvgqP,0kK{J]FI)&Lmv8J ZRJH6™ .e䁧E˩aj..|dx'NҴ"ݭ [(YvЬj[dgs('\,Mbk|9dǔX;8b;/_ݼ07Zd,נHzE>Bs]Zuŵ六֭IWh[ S9ҫ[];LMˢv3Lɸvosyjک]&v-_UIKX.vB9! +[եO.U #qvwrK.zLV5ܦkZ M! uR +N[w[ Q v*X ͅ7Zz",cmgo=I ͈!.0A̋z.52c7L/ X7b n azLwWo5F vYpPEoAiqimsυ, .ӕܠay@5WIJKwpИ GfpB@nǦi(Er|RU.;I4=&;K[DQ5+n!C $sɩ#Ҵ9u8-Re%¢W^8/xS`g }RicUtA$vV.ѩ>H#qk{GԿtrbdYeT ,HѾӁ܇H t$V:]qfE,vi+8p $ 3E 1,ǎII4%Q@Q@d0k[ֵd0k[sԮ 4? g?J9KҗƉ<">^1"ȏ׌_og੗ƶ)qZU}?A.?kUQ@Q@Q@Q@Q@Q@Q@Q@N p6I7pPQTu0[R͡ϯܯuC$1)b"f%mfBdqQWy> uc{{c2I;Uf;Yb`DgilKZ"{YuK{g[%ӼߴNKnp똔h~ @ϓߠϓߠA5ׂu{xYӮ8Rc`I\ ^3[+ P511VmVV 6F>O~>O~]SvdWӀow䵚eE]x'_]:#5,69$QW-jVT 2#;O=xzZ{ˉ^1"ȏ׌_og੗ƶ)qZVtO#_p-s':횋?+_cR3ZO ?/ j+'?+_cGWXƀ5 A]c֢4`'u hZO ?/ j+'?+_cGWXƀ5 A]c֢4`'u hZj:ap\*J#RT+63qU4`'u hh(ENO ?/UB;?+_cGWXƀ V? J_O A]co%Z/' ?*!?S4`'u hh(ENO ?/ v:֚_25N9=tU?/?+_c@VOWXƏkQY? A]c?4Ed`'u hO ?/?+_c@VOWXƏkQY? A]c?4Ed`'u hO ?/?+_c@Փ}mGWXƬ\:k\ C[2?vAO;ZI#1M?ƶ( k&GvAO(;ZI{$kbֿ=i4gk_40p]4O4 ?k&GvAO'G}QHֿ=i4gk_4O4 ?k&GvAO'G}T3I 1"4%2 ?h';ZI{$kbֿ=i4gk_4آ1M?ƶ( k&GvAO(;ZI{$kbֿ=i4gk_4آ1M?ƶ( k&GvAO(;ZI{$kbֿ=i4gk_4E.GSNagk_4?ny??'G}PvAO;ZIM#agk_4?ny??ꡚH`(xɉ9-s@?M?Ək&[P?vAO;ZI{$hֿ=i5Ecgk_4?lQ@V:U_]jc9KZ&gǂG/Vax+D}bEnc[QR0(((I7:*2m_d ??6xoAn$#X³BQ ɍDMȫ#M}GFM+QD ( ( ( ( ( ( ( ( ($r?ʣ \^jqFi#ndNT:ZYqNIM4q(. (k O2moú[=nfx;C.N <z/|ڼ%i Idn C)Ŵ\<㑴xr%_ڋfD3/̪\䐬G`4Zjuͽ֭8fWh[$a9Sx>ҹZi|֖.&<@F1>KzGề#^=؂ٙ$Pr<;#u5ɢVc?2h@EPEPEPEP^U@_}תו|s_GA5/?<">^1"kď;m4{ҝ 2Svqg4%otДG^% ^]F]9`'-|q{?R'"W%o-aOD*_J^%o9zT ȔKP^U ^{ֽYH,uv'3(\gc Ǭ}*< )!Q" vK ٫v#|,??OX¤Parυ'(@G'X,GaI  Q'X,RyB(Qd~rυy> TPYarυ'(@G'X,GaI  o$$h,.FXā1a;QCmOarυzv\]5wEhp=0{U zUݴq>hV0Ȇ>H(IG#}5Z)G'X,Gav45V+=yi$R}:n['Kȵ Z eGr mL9$qrυy> WMVM.YijϖGۍ98:XR -CSK?3R:d L^> y> Q'X,[y{V.:6 SNuC55Tso乙8`xJrg'X,Gaux6Y[Ǭl2Ny*axAԡQ}z%8`'v.O |Խ>y> Q'X,]{+]w_-?IͺKH@T,OS?hmjv'[vq,srF1ϠVWIarυGq7e"VHo!%卺m9-KR[4i=@#F~Ft%(> Q'X,RyB(UG'X,GaI  Q'X,RyB(Qd~rυy> TPYarυ'(@G'X,GaI  RC:y,p?c )E?d?i M5գFsa'ɟ|j/YxtiWrpͲs 36;Z@Ɏ?:M.K6e/)I$H,-B3Dt?yd5/25<.?5Rծg.VHI2ͱ+OZri+lգFsa'ɟSmwS`L2H#9qv&:K;\}ȌAtՃ.HI`WLܵBtRϑ_E<[F[ߊ xGCsqci,go5N5kxpuL+Q{ OB5>+/_O*ð{&xߕ({'!~T_'G=hal0F;WxpuڏaO\o &&$m(峻'IgjZ,:+ui5k1+⩺ԚI.>*ek[XK{4B2F۰;ןhMĘf"fq8B5>+ 8'IU1ɞa/kGU:uԌ^}г@|n#U5cPա<$-X8}g/_O*kGrϹskW.-#&ʅBHl7'GҪ&LȱDDE^+W_'G!~U[b}+;g^Ga>b 8'Q\WV{~0o68댷/ð^1"x+Ă9Z5ۻ(pO$u+D}bEcB\=ٯC}t WIlI%!y=EO|A|vv eP]E dȬJ<7YRj3,VS䪟; FP*~cZ@y?sG?kf?6+ mϕ#$o 6Я>IdP[#Raٶ]FU(1eoߎ_?j+}b[{]I煳H,üuĘE"Y3 Fc/pL% #% q*Zm!@2Ugb:6>-BunnㅌbjmKRmBp.$EG(1:ěB:G!u!CXcRs5uTs[#KXx-ƣxR/PNuFٓ-ۃxna:_T a@s7%adR 0[,gj5K+D/2*dsFzӾy?s\kzstݢYVX3@0Xd}G"` \uş2hw"`d䃁Z} qZhڶ!7RlI W;e*X$ eaxXFPՓ>me+T$$i‚y~0q4| uP-ZWDjv-᷊HBB td.r2i pF܇#Qa)3HV,>C/&+h6z?v';u\@o76z|g;Y_OdϮYaU0;m$d3͘9?F[Jcpi%71Q ?(M-<skvQ۬Q:^0P7/G 7 v_oᦍR L 5jzv <C-8 1۴' nywcYK[^+pi1$2 *NG:VY:TLE=1a"'aKn{|~HԤ}Fyf96m|UJ/Y[u`l\Uy?sMTKG}+bČAz>⹻(u%Ermp*[I$p699 v\\\K$Q@$yMFƟ,ְMq}o 2)*`kZ}pqI#Rn6;)!;c}:<~uY+'Qx{7Ie˝%xزZHP`yLDhp붺=WN,Wmgh5di1 S mA1@͍FY[|/x+D}bEt3?D&5?V_? /MuT,r_՗o&Co7]mX,r_՗o&Co7]mX,qx'P{EՖ{6J/Zs+ٮnl» g+KmYkKmYkKmYkKW> &% 3#c$]X,rxJ,b6{cve㎕!e,9/Co7G!e,9/Co7G!e,9/Co7G!e,9/Co7Q\'Ph3(̍vTQ`+״\s:T_՗o&(X /M՗o&(X /M՗o&(X /M՗o&(X /M^ Ү-^ȼpkKmYkKmYkKmYk6:֓DVAFdldk4ɴmOHXh*r=kFc ( ( y5Wh{±R0r:ygd2S385Mw9?jW@_}֔4Lgq?A,x+D}bEt3?L&5QR0((((((((UAq@ ECIH,z -Yf,}|;y2W F7<) j+\vlk[8$Re A$r%l"PRU O$ $h7 n 38bs{$b_9$w7ܤ˧+ӵ];Wk2m%"8%I{$t8/ReLW^y v>Q<3 -h)}c۳0LRng_>i6lQ#* pHj%t]Z[VO.T&hc])xCLSYӒf] ۞=iP5y_*ULn>wSzI$3˥qJȩ*;.d Bm4EPEPEPEPEPEPEPEPEP?ڕ|s_GA5p\?iZR3ٝǂG/WC7pW=?A,2tQEHŠ(((((((P?AAV^ =rYV?%mϿ2qX6CJ-3xQ Q1mW<拯 Mq""X]^AqL[6IOGQw`x-IaC$l]H #xV-T:eU 1=hmVyl"g(6H$ʼn9N6U~MY{mDk6Ue|$ۈ109L~B4PZ Ycy${a /8 wm֕\iw7_yf+$,W.;pw֟`Tmz|s+ʑʎX> IEPEPEPEPEPEPEPEPEP?ڕ|s_GA5p\?iZR3ٝǂG/WC7pW=?A,2tQEHŠ(((((((oESĨT 1"{[R q.ֶhP֯qq]],2v7If*h. +vy48Qi}B4q"Ʊ.; ^p8u+u*%ŝ+v2JN pvnX35mpA#rꭎ@b#=3*J(H\:-| E%Vvn BuWQkDa3f(9v% xEqwg%lo qBC =V4BFkvmy)?ꝃ.6d8 ?x7W0*^wIT)gt wmۼSUMk+jt^4WabɄfRH #\ 狦Gd/QK_YίrRti(e ZyuYo:j2_Dcbϗ<]f{;W[E`x:O좰KGeԞ~&K~hu[u,fkK[1j6arTvPkZ7QO].bN*ODiiO_; Uq*q\ m.NNLPEPEPEPEPEPEPEPEP?ڕ|s_GA5p\?iZR3ٝǂG/WC7pW=?A,2tQEHŠ((((((((͸ԾҰ8ҳtE!{+4e.>zqimt\[663 X-BQ^(5ǺF!+eTAxDf*6 ҄6ZW˧ ὲHq#<p_+TPj6'5uX9 ̷.^T:nV<>u[4{W %<I0 #^n"fs{ka^躧.[wCpY2'FHz4FmOJ=0BE+XIP7c'N2t\82)rT+wtPk&.D0ipyv^1T)QdX}%EmV)N{Ed`fR IopK 4PL'e4oE)(2OV(TD[y8!]y- D0тSۅVҫdp.//gDF(0K1lkՏ9<7o$HbԒrr˅.`AU`u]9mD/]$eШ8(.[=j""t䰙GtH"v?+pc\m>-2m#(r,M!ݗlۨ| >iwdVYNI@v iM6t8/ReLW^y v>z7|RmC|g>g?&6\t>C a[{h%ՌXQ6 ʍb< Ko_c{lڭIUTk14aN_ZjVwcuմ4F § Mtŵ{Pwr;$:((((((((R/&+ /kJ_&{3Wxf ">^1"_؎(QEQEQEQEQEQ )q"((d~U ĒJ6՘ 'bjzեn o;RJ.4?Om{[<'L"26/*d,RU؂)_ZOwqi \mIx G#=k5-Z$V\WRC=\${6Vxc| (~;Ke47Q\v*di(bL0p9V|n<7V[ʒ*H2AGziz.si7s<2I;x~AQy"e~wPB%9 :+u/67w^_n+ZdkO-B '̠S]-M|QVhkyഎz<+$F )c[H.&;D/ .іڧ$C!#9F;$IB;]t&=&]F_((E%̬)U ʝ;+ Einmˣ*BNXvKn..8 i~5 ӧɽDsr6'd<c;I,EQEQEQEQEQEQE3p_Mw9?jW@_}֔4Lgq?A,x+D}bEt3?L&5QR0((((((((EG]-֢F 99>0R[uJUB$zP~,tx'1imY%A%c _ 3 =;65pn.ry,2ZL&@, ݗҊ|jw]\;wGsnǢ3~t.݅%7uRS V  j+d֏[ "I_\^-ڱO4CsrB\u;qbi{W0YڑQgu c[_DLnxhba5x9uKo|O=j]>4Ԣ"hu)~|ݑwEpGoMgu{ivSZ %.0|B8Bv;MMkNKKpZUW`$9;wr;sEQEQEQEQEQEQEQEQE3p_Mw9?jW@_}֔4Lgq?A,x+D}bEt3?L&5QR0((((((((|4X;,)$U)n%3#px(}cXݼICwrep$d{VSx;^Vu"g!yd7&5&'hj/h/4 }?S`$RxxYIg*qgѵK\' &+cʉp0@ۀpEPuT{%m۾W@.ʣ 3I⷏43e7.XIcn(и!w$u56ϩBH\͹de8q v;.p~U-Fm#nYq Rȅ8 #ֱS͊,br. 10d[EqǏ!u >kK9gLAE2"6Ha p  mF3hP˛6H؎# |EN ܻ:Z8!xDy|v\SQڨhz֭c%uH唳*F t(((((((((g?J9KsԮ 4? )|h_#+Y+Wxf |Lkb:(aEPEPEPEPEPEPEPEPYڎ)iocB< cִh rv37eH ##A}iėcO:))!}Y({ ʐHrAi@SH4H{ٲ%rYَIf: m?[O}s۷~6o˜qW k[7H#oGVHe]e8$dHHm.E-~p LBw2Kgq,I$ֵ[\ʙ#r0 GwIqq 4B۵  VwZoh<0߼`C`CjgeM{n'Io\IaX($I$1<")f8ZI@;_gg%ԑsp6bĜd<$:IG$O7 բ$!U[/`ؼd1ROEPEPEPEPEPEPEPEP?ڕ|s_GA5p\?iZR3ٝǂG/WC7pW=?A,2tQEHŠ(((((((ġyu+ 8_&,Nx祦,72ϡε4+*gkyqހ(k:}2r<\Fv_]?â}o.Y Gq8@^]N!O0B p!$*7*=@%W#Túi5[H֨ZCq zӵsږXw3]y:dG")Xژmب`s ]Nu5ͻ &<6eT+`è%X\\YZMt$FN\9'}jK+M6-,m`;!098Q-׉flQ-o Di#C'.` s7qºۭG|/2\[RiZtZ S*/<@{ZK#ɵ?ad`yQEEW=s>)գ6MPG5Ҧ-|Q Iv1s=*KW't$2$0E߲%I]!yP)K Ȭ!QU,*Ju7ڄ7z]|mid`F:CGih- OHLʲ}=&Z]}?ln|>|n}j 7L:T=iJEj!U6IϨbA \y\A5kA5HѪ[edy_]ȅ3!b|9~7O1xTg fok\[ /!wq E$w=(Z?loP?$|loU|c,N(h(((((((R/&+ /kJ_&{3Wxf ">^1"_؎(QEQEQEQEQEQEQOGHI$*-LzťlBb=oi\?;-&2l)K'PF%5.[5eu;{kd.4Ms*|1# p6ovKe*NBq£-vA=Fͪ_lPq F!Y]bqh6GvGPjLnx2ۭ"Uc"L,W[_x~ytiBIu $R#0)P@w>a T9JqG{uK&Pld(Z ii^1"ȏ׌_og੗ƶ#*FQEQEQEQEQEQE2X&hH#ߐj(,m-9-aN=8PEPEdZjZ\h|o(:*okɴ +;m(F@?JѢѭ&ҏkɴ *M:֘- _v (\[Z}[W @=O_y-"IaJI]H#RF@?J>ѭ&ҀzWm$-ēg Ff2.p 1o6}[MhYhiG5P$F" ojZ(((((((R/&+ /kJ_&{3Wxf ">^1"_؎(QEQEQEQEQEQEWͯxGUӥ;bF=qQ@H`U%Lf]MciEiŖ0y*9$y_tP*?Et~O=G?EKykʴ/ jL[.[<)vcimzs3v:q('0i~ VԵ}5V3D!/㷑IH۩پuZw^ZE- Jb;x nim<[!V԰f*^h./^[--!\{8bPuw~y_tQO=@ty_tP*?Et}NQb ( ( ( ( ( ( (1sԮ 4? g?J9KҗƉ<">^1"ȏ׌_og੗ƶ#*FQEQEJ($q$K1ՏzU_cD@؏>'|U U+WI0(%ϱ 0}N6~3mY0ʸWl088<Ӡ b?a(V* {YaM]a`:|ǟO'؏>'|R[IF 8#s}7O˶NPI8@ #A;" 0$-rv;xUڤ b?a(V)@$:#A;" 0jD1& 8'ZkXflra'sg#*1@ #A;" 0wyBNvG28Moi|N'zP}NGw?EI'|UzuLx`I 9c '|Q#A;"+DgX8çqS 0}NԴkI!Ӵ{#mXE P~]ZL4M2F5 \W*ZLV_v[[37ʙlwrA?Z?Z!\Btq<[,6eRX"F]z*I Q!ih!ih3P:yjJh`&t'h'}MK utQ/ ġJPCt`Am9k4k4H+(GGGPMlb~cVRn5;;eID?.[YgiEP6iN_M__M__XcˤN-썶a1Cs#mHiwHvi06c|%s\jzji1[~mnh;G*dM>l!ih!ihEs +M[=l)fqIc̈5vxNWƭ[,זs[3PN8Z?ZW_D@xKRK x%"Br2 k6ekn\iaY"Hq$`W4(`\m)k4k4/Gt?eܗ1·GS>cbKj2Dӧ Cg,3l6G$Ch1@+k4k4_TL?w!ԣy> )2`f5U2v[[^öhˋ{y"0P~p#;I!o-?o-?h?QF8f-%<NO E*$5uˉ,.+ۉ U8,Cvcz6GejOlɩJq8*lcɐg E*?(OE@kG^V" +#Dۃ90'#((((g?J9KsԮ 4? )|h_#+Y+Wxf |Lkb:(aEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEP?ڕ|s_GA5p\?iZR3ٝǂG/WC7pW=?A,2tQEHŠ(((((((((((((((((((((((( + /kR/&g;ȏ׌_og{_#+Y*e1袊Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@9?jW@_}{3p_MiKDfw C] \G/WC7pTc[E# ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( (1sԮ 4? g?J9KҗƉ<">^1"ȏ׌_og੗ƶ#*FQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEcp\?i]ڕ|s_GA5/=x+D}bEt3?s C] S/lGET((((((((((((((((((((((((R/&+ /kJ_&{3Wxf ">^1"_؎(QEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQE3p_Mw9?jW@_}֔4Lgq?A,x+D}bEt3?L&5QR0((((((((((((((((((((((((g?J9KsԮ 4? )|h_#+Y+Wxf |Lkb:(aEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEP?ڕ|s_GA5p\?iZR3ٝǂG/WC7pW=?A,2tQEHŠ(((((((((((((((((((((((( + /kR/&g;ȏ׌_og{_#+Y*e1袊Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@9?jW@_}{3p_MiKDfw CW;ڢ([+$T|">^1"je1k&GvAO*Fcgk_4?lQ@M?Ək&[P?vAO;ZI{$hֿ=i5` i! ןs_GA5_MiKD;ȏ׌_Wxݩƶ (aEPEPEPoTu$UdxLVmK,WFghkbͬ՝. yl ʤ,S\^SDӭ-n^-YiU\[;ȉ3: H9xGU)㽵kзStaYmU&_;RGä5Id!n<=1ׂ*7֗Guhcr뎫/#zŲvIi|`Ҵ `-,|s{mރygIk{mmaa-GssfAVF (iX'lV>#&m@QEQEQEQEQEQEQEQEQEIGRAQ kUMD%+HG#sی tR4 f=Bh1P8]Q<P@:d߇u * {+v\x8<91_Qx5[QJɚݕ!bSh.y#htK̉nf_1T;!YXht{;[[ep̮жHÀr }s>t-?]XL&x˴cv|9! wF{e2I9hHyY2vG"kQDd?(b((((4? U* /kJ_& x+D}bEn׉wwiK;Y ˲d82h@KoTI)mK-o m){xEx/[[ ?z7Qg9{m_o m(@KoG`W%o-}'>%܍jrO%.[OD*@KoG/[[ =Þ'KPGT ȕ_o m(@KoGs_(?-o m(3x/B%G>ew|";mܸW%o-ah@KoG/[[ =h@KoG/[[ =h@KoG/[[ =h@KoG/[[ =c$.I8 @ $$zvnZ#ltHe8 AAz6yh1!!]% Hbs<k}ykr<4Z&%p@wp6> 6%#x{y{w]yr#.f@\de8UU"CZ)ܟs~ʨZjuͽ֭8fWh[$a9Sx>ү\ZZ\[iӬVimJRCU?YC!wtWNiy(a(ʻbiI+:-+0dB5-5+4.\ghI-mrlkJc3(I1L/3q Imj)8@dȜ<ߓ&Bͮ+};K-DFgWf..a ޡS`I<1^>U;@}h/ k>d[lKq!!䀫b["t8v3 8iEPEPEPEPEa^SOq> *9r1ߠ9$ ȷw֊O,y F~ߝxh#s~ʣ^YA-ӻ3T=?n2o.TU_o[ :&W:&ζɿEUζɿ?n2o.-QUn2o.o[ TU_o[ :&W:&ζɿEUζɿ?n2o.-QUn2o.o[ TWy}qKcp?Smstg[zd]QWw hI pxb#ߌg?}{&B: 7CZ^}en~YEx˸QgMtSoW;iBXu5R Vre\ Ld5 "Oqm!O0( ~n6+xHm` Y#x2[ʔ8b2@'wZgšAHwHheb`c O#_h @[O$tQ2Tm$cĚƍ[KhD#q$BnÜdgdgc-6 Hexx$.iA$>eAWcyeo sd7WCǣ*Úu.ixy^k{`DB7 V8RFFhfM!n!8#!pDn+H*c0ZOmwy`jA)X*>p7KkJmSYC+f2iKyyl6C ĖmcgV 9|6z74q;uu2iU"Lj5ǒ]Z%"0$ rUJiEQEU [R̴I/6iH!Fmds!='Cuo%I,2I#C+ v }}?LXn4馑$eDw}㚒=Y/ltDnci7@I(a < vzS]YmvzRrp , %TkeogyiibK3I@οX=Yr1$j_k;рWN2۪ϥB>,kn%#/\Sib h҅41,HYF}g٭V 7 'mvVWw h_-?57Y/59 9zqs~ʹ>o((X#s T1 7u&𶟤)yjдy`YH 1OMק.VA$O+1Rg# nEPEPU5F6d^I$o."4A g!A"A{eoZ={|dTC)  AP85=:Ur,wiSi 2& Wv)-$˒?U#x<<`^. eEB۫|z$K C;ci+Z֚t67![̓JAm0$噘f?<(7^cFIUvΡPĺ om0qhͱOG hF?*8]iw٭8AB;UBJn[w4ؖIMKkU]L3!_aw6EQHFUi64x.RN}LȀA V0)n3K??p϶)M\HHMSb*Pmhv7P][IA tl0*ztmf͡VWڌ7N6EX8t0""sR)Ë'4uEh %v0|3׆ iYdWڛw8kဣE $9s4((((_-?5ȷw֊B7'\߇ bR3le -+8'SЌ\]φI5k}8֗f<1cg0%NKQ^b|[k:}ZVAp/ĥ@`a@['|u/iof_fvayıRJHcr߼nwv7׶ns}w'mmM+p9<ҧ.枞:$@kest7J@!߱8BL[y,V&;M<*=ww1!Wck:|_hqEg/,y{9cp7rF/}ॼ Djo&լ`ebO80j<XXq2]\O o `ZYd˜Hg{zǨCbbh4c5=pgَoMeecW̲BR81Yw})^L-4-{kRo f*.ܻȸ|Ǚ̻~@yᵷTHU I;ԕF}{]^'m$pg t$=1c;˳s>޹wvv>\kD7]@T 6ݨ}Lp=pnu=R 2v7QB8H. Pqp V24'Xm]j/r-ʟXfHD>BrVO+*3<+p* Y2s*ԀYr{n%pwuk{kRwIH͒EG?$.X1+S֢}Ln'ӄڂ~TS@@=I-ct4VMys6w- fhFُLw*Ϣj%֟><{I/=? _((((_-?5ȷw֊B7'\߇I7|h4 [K^ͼ I͹!͹@ܬgQ\ǫZ\j6i2=X,F9V.8˅r|GC<^u560Zxc7mmmjˏm8qEpxYmtZCX)9aG˻WݞNW+ЮLRj3bq[: IQRvN|1:݆-oim8h-pz)[Lu kE7_>)Pc0T_N,-Y4ET(m`Sdֵ,jײIyai c5J_4dܑ$]άۈvW^(UE<,HO&eVqQA rNT6mEK1ȡ#+5n4;GT?k϶)~|~fns󊞀 ( ( (u N;-{aQˑ'fET^"ydFZ0p3E! U2 nq2AmstL`C2+"HTnUb zJG}Ҥ޷?7GuM*uMmstjmstg[zd]Zg[zd]޷?7@E0Kq,:]r\ʳNn"v |5~g[zd]޷?7@޷?7GuM*uMmstjmstg[zd]Zڻ [3oo[ :&[kEGHcie#9݉4RO\vk5u^۽Y%o.FpeR^*z,I*-uت0A 9o܀UD#W eM/Z6J18I4bTrTvB76QukZi,3*4Q F | Tekmӏz*Yhj۴rEbcon&!B\:26%+l G|OJAe#`@! > D#GVgDw-0X"up.rS,V$ҳ PqR@'ld4x[S:EG 1+[=="Wir?aڼ =ew&ul[tcw$\]A/f[/9!hʅڀQ' Ic񞀾H[9%@aZāC+'lAnjk55e2eDQpd ^>W÷ھ+%]Ɖ 'PmJ,mtVW_%+:8;ze#`bńxl9#Ƕ*Ɲb^^Je,p*P:I 3x#FK{\U-s(* $bH[p?$Tk=O΋L:D@$1ђBxW. %悗5cw䌫#r v* m<-#P>MYآm,'#MkL\v;|ژ̀82늚o,5]{6+yr,emQ <+ G*t;WmP!#+_gKM?,{<> &k Mu#uus|VUy1*%@ ւxn㸷%Ueu# 8 %`n]6G.z~a/B(Ws;^7g^[M<}.?!.#py U K,n #yHqr}I9&QEQEcEQHFUCima:v@-.4)pȑN`:Y7 tkh'aӖ/9I! y6--2-NMgNK dwMt'nx>quR2f@6Hvc0:V \tJogX7v-d! *Z'TL)$`gv ԠCj藚EiHۿbn`8={qU#NrjSaGMf9J 1BJ2ǃL[Aryۙ# Eq˓q-XgGXRxa` x;9]Ht{7ʏn&_1Y%UI(t{;[[ep̮жHÀr }sK%‘Orf99b~Ġ6xr*ޕዽ/Ԡ:4ڑ_3|a|mhyV|-ۦ. kRH9#=[V{j:"[4>pn4袊((((Ww h_-?5[˴tcOP oTtU|h|jW  TP_9EU|h|jW  TP_9EU|h|jIDuITe"h^Ww h#r*mSMdkt"s~mP2kH zU1&x'%h/XGm.~yAXp_R3pQ̳/ؒx-dsCC;3/_GW$Gʠl8U=Z: }c$qE2Oq.W7ԶWwzuF\|Ed0s8}>-jŶ_qii on/#>Q#2 `tV~"X(oCi2So;c/2OKkQ@xM_ i!6hR$[7iAPqd7wPz(((((( ȷw֊DfF$Q*qe,frJ;nU}%RI6 Tl|. ’B\~#[smt% yLl_-j#bbJTt}O ^QEUt}O ^QEUt}O ^QEUt}O ^QEUt}O ^QEUt}O ^QU5F6d^I$o."4A g!A ~'(cW_nFeq p^E jF'X@/BVu/3P/ݦwnYp3aIdfrJ9?%{EH^VYPn~T*nnO\t>PQ8vJօNڦ>JO/[/ ;HTC_Ro3>qjs5G1߾Bh00-i\hϫ7PId@p4a7pwn!/..z?..z?..z?..z?..z?..zA{eoZ={|dTC)  AWk_4k_4^kїws*<X"\ݼG~aiCiqsr幹l4 ؃ RNYk_4k_4Wk_4k_4xEWKOkˉ#n&B?netgen-6.2.1804/doc/pictures/meshingoptions_1.jpg0000644000175000017500000007166613272137567020420 0ustar kurtkurtJFIFC    $.' ",#(7),01444'9=82<.342C  2!!22222222222222222222222222222222222222222222222222=" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?翚O^E,<(R8q ڤ&7ozp8#ҡ0ֶG vE8OE>ֽYH,uv'3(\gc Ǭ}*< )!Q" vK ٫v#|,??OX¤Parυ'(@G'X,GaI  Q'X,RyB(Qd~rυy> TPYarυ'(@G'X,GaI  o$$h,.FXā1a;QCmOarυzv\]5wEhp=0{U zUݴq>hV0Ȇ>H(IG#}5Z)G'X,Gav45V+=yi$R}:n['Kȵ Z eGr mL9$qrυy> WMVM.YijϖGۍ98:XR -CSK?3R:d L^> y> Q'X,[y{V.:6 SNuC55Tso乙8`xJrg'X,Gaux6Y[Ǭl2Ny*axAԡQ}z%8`'v.O |Խ>y> Q'X,]{+]w_-?IͺKH@T,OS?hmjv'[vq,srF1ϠVWIarυGq7e"VHo!%卺m9-KR[4i=@#F~Ft%(> Q'X,RyB(UG'X,GaI  Q'X,RyB(Qd~rυy> TPYarυ'(@G'X,GaI  RC:y,p?c )E?d?i M5գFsa'ɟ|j/YxtiWrpͲs 36;Z@Ɏ?:M.K6e/)I$H,-B3Dt?yd5/25<.?5Rծg.VHI2ͱ+OZri+lգFsa'ɟSmwS`L2H#9qv&:K;\}ȌAtՃ.HI`WLܵBtRϑ_E<[F[ߊ xGCsqci,go5N5lx}i&& 4TcƼV#Kp@}+W 1Uh o'J8q&7NOsaG+??O*A47; 3aG+??O*A47pɞ/{ +;g^¬'tM0!v>͞1j}g/_O*Q>I<_듛aXӒEq\wp9$),VE'GX`osW_'G!~Ty-GƢԮ=Q瑑LcD%(Pc,9k|WQ_U&f5#Ǎίy6\]`cn^}G]n.joWeյS3gk|WQ_U7ZI5%GW;,t[kxZ"+ ofFCvr3ֲZmɲؓ DL V㜃^_U^']*F73%q귓çNϴhS`j泬jڴ7R[?b2$}s^|Tk|WQhY+/_O*pOg^+W_'G!~T}n3aG+? > :~wp?dWd/_O*B5>+; 3aG+?  ϊ?>~Wk|WQ_U[`L+SQ>PyC^']O8:O*~ɞ5u׳mRQX(V~k|WQ_UO)$"E{O"63>H-ۦb0 05k|WQ_U?G;FoRP{H.u $g ϊ?w!wF0ٳvYm,V~)'sī}G>0xK]:[ _%1#i& { OJWx݊**w5x+D}bEt3?qKfb޳eaqmoy[Mt-uF9#=jߘoμz6)!Gt =-e1!8b2B2_[1^CΗ|R3=Hc#I o9r:xڄ\HPbux^_Z#u]_LLkjNwFιʎy#kdv~y?s^vvŴzo C%N2y%pq5'VkJ 7(b,AQ dҙC2 @9#=io5ZE|7IĖ:J%$n\3),A/[ޟsn,,MܠpA,2@>HDx.mdXYmϙ4w;02rA}~uim[ޛ`Ti$+v2_,@20Zf㝤H>cjiWi"|D!c+ s݂q8_?iTFQ#)eC1 gpv%pܽ^z3?W˘8ɚV>P:+"h; $!M!29A8f#nC} [[hf +SZlԗwIɴ}|a@Uee=CKO 7ۛ=>O3icçڲgMqdĒ\m28PO'T;H|?ʸmuqlilK2ʆ?+q,?5ĿeWgyfgvsc-1Ydw|Um`pæ a[(/N(З#RGр;/FpehEP̂cpHC5k=nk Y ]H7<ꥭZ[X4v ~Q'#P?h} pa*O& J uy͘0I%з=JcjRL>z#[X6˾C*,[Xaw6A.H#.7…<ϽdQȻ}ai?@%ԞWr2p2ISOT$+d2:LH`zsȬG5y#VI*FH.@=z֨LۯR>hP]0ᶱт s voǪ\J1RVbFA Aq\ݔ:i"6oL(cjhqbsm3EGy)v<`%In9pp9=RU-2 u w?kH"%~te;`T~Y<9:}=A_ >@g []Gk>\K..v`XT'[c@P:s+ŷq.-H#3d1FP+h$퓐"ӵ@j 46K#tua)2 p~If3} oJ}f ˻xZ[vWyd줐 hS Sr5vK.vs,<qj UoU yrG]G5f[Z |@5WCAZeR4u_MzyW?iZЧǂG/WC7pW=?A,2tQEHŠ(( .-'<^kW]*مwfv WQEr_՗o&Co7]m+!e[E !e[E !e|Mi4KudєfFHv*(XX.l[ 9*/Co7]mX,r_՗o&Co7]mX,r_՗o&Co7]mX,r_՗o&Co7]mX,r_՗o&N5-ՐgFQ#쨢cWicok/ (t /MuQ`?V_? /MuQ`?V_? /MuQ`?V_? /MuQ`?V_,m\ZՑyo#ciP1z[E !e[E !e[E !e[E mςu &n:2թ<%z1 =;`qJ(c6~4?V_hc6~4?V_hc6~5mD{giu1 ) ra(z(^TTwHl8e8==J( ( * K'wP[1y$nrjz(KI".hvYeKP[(+7@ORT!37Goʏ1ߝc}:<~Tyo?7Goʏ1ߝc}:<~Tyo?7Goʏ1ߝc}:<~Tyo?7Goʏ1ߝ(2.~Q~~^ԚiVQ}E%d?آ2 ~U@Q@Q@Q@Q@9?jW@_}{3p_MiKDfw C] \G/WC7pTc[E# ( ( ( | ?Fѿ[tCk:uBY\ 8 `DUMEyOö晧O&6`L( w0>s9Fnhj:xn-%`h/79=gx=tw] JK( n FrA\_tKZdwpYS\E.c#(uqpHoJ8}b }2KK0,[ǜ'~%X{eڢ_2h .'QwWee$$v?mon.,;}FVA5yi A\k@}K-%^~|rF  c B5o B5otOݪ}XI" ,LFIʈ< U&ZhkWQ]ʋX70L#20{w? Fz? Fz|WqHn{{286e(/4a009cAP[AP[EcAP[AP[EcAP[AP[EcAP[AP[P^][ k`%XŒzںR)u 5vL#Xѥ`(9sƛ B5o B5o3lVwos7 gc2>Q8GZ9h$c? iw4+Iwj#A~O2΀;|8Q~ʗ\\s“s+*\PZ棧E\C-ϧjdu$@q>_~w3q5i^5M__4Kή[FDgwFęˈYJ9 ?Cwsv:XYS?/P^|C 2[!&&XXK4 I%LӼgGLkuh|jU O+LhW2/:db! gh^{ X[iҥ-r4fBIGTP%hw3SkRKgA I f I !88 `Zl^Jʨe,O9;|8E&_QYjANy@5,B%?^+b ( ( ( (1sԮ 4? g?J9KҗƉ<">^1"ȏ׌_og੗ƶ#*FQEQEQEQEQEQEQEQEQEAoeok5ǶKD*Oq袀#mm㷷"% qUE8+MI4k,JG5!g*k4k5'F@?7)A OT5%5_(ƲEߴ(8)+HcO#F|?ߔ oowc1(HDUEIB/ԟ7)dhPo-?o-?I>GF@?GB/B/ԟ7)dhPo-?Wu Gx)RU@ *F@?7)CNCw#` cI8 B/ԟ7)dhPo-?o-?I>GF@?eAsό ,0Z6 3tk>?]dYZXSs+H<B ( ( ( (1sԮ 4? g?J9KҗƉ<">^1"ȏ׌_og੗ƶ#*FQEQEQEQEQEQEfi׺o"Kŷ9*`LzFOyYi#i42Tp~Ieɗ$rm8jjocUA Fr99ZH&1PE 2"spFP M%&{5;au{yV°fc F`W[Y?icwڥmn7m3;~_iA6đC8*j'~ek[ n%tW|5$ez (ڿlK)5;Inn7 %Q/;pؿkoXY@ yozf7h$&%Ͳ;A< [{J&EŦIj.ZeL䏕 tU&oZ?lp|~Lmn}*J|=/^oGs j*%_̻iJ!3>Vҧxmm丸"%/$0UE$x%Gqh֏KlopqPiz[:u\.N0A  *tF/ QF/ U5bW ,m<9qcRibD7M\@A)$H$[_֣_֬CA-yѳȸŸ&HݑW|Ecgڷ쮮YILeCnHNF/ QF/ U5]:-N-2KTwj(מBg$|[ F7_ZF7_Z( F7_ZF7_Z( F7_ZF7_Z( F7_ZF7_Z)eݹ@94F/ QF/ VǓM#:q%L,aKq@Unў ,"=Þs}Vsԭ((((R/&+ /kJ_&{3Wxf ">^1"_؎(QEQEQEQExcN5{NX'mmU-#Dwdt#%-^XMF+-Qƨ ;Z2zj(3_{kqkj6Ob1f6ːRp9,pA ,\jfHQX }mRn. @ 4PpF[:(V@O^W/y46o<,F6TkfIX"e5Q@[tc`$7/ PБWlh `J)76D<Վ'In RmBo'!pUa@%ǂ/SRTtCJΊQ">{i%ԏ|K$Ku#kFAotP-o,uYӭ8; @nHP"@åL-s"7 8%AϨ( Y-dFʋ c  e?GQ]=:,v#rBߧ' [In{OL nmuul!stFOi-l䶚`ei 32v Ę6ᓐCOD*_J<.csj.tQ q*Ȇfsm 8`Z2Zɬ^Ctқb'WTHā,Igcc[?R'"Q/B%g\x2;׎ֳO֍$T$6F k*_J?OD +*_J?OD +*_J?OD +*_J?OD }$VwjCnfDR'"Q/B%M?Ʀ4ɬn./>-GcT?R'"Q/B%9?jVc_M~֟o((((R/&+ /kJ_&{3Wxf ">^1"_؎(QEQEQEQEQEQEV.j)-ǿLῼGcm ]A!rOOe]T6;K{ Z-v (''kмGzc'0ܹRKkFybW2< ]:U5͸j>|-ym,KE# q VΧ '<|+˺ݟ4+侎;n[٧`UdEۀ&1=qRjosDaȺ6>~Gw 76:ܞ*4ٌ m#*i71d8d'Kj:g7+m%x mLEgI {8u]maą /22O}H|)A>8>{\ٌ+gs$9la퟼[×\>Mm0t)[um<,8;Z^w \HX)bH 7ڙllۖ~ C0?x[\ʙ#r0 Gfii, <2*LFYɑH#h'S1d2/i$@AȘ * 30 ΀d-qYekO*Yv[yRFܬbf,-0$.7^"Q,>S_ȃlۇ4CF_ۮ~wi/oY<לpxXxkKb;x+otv'#te׎n.ui_G5H|QRzYh!yP@q'$R+׼ i@,O;K!q$M3$)9;*Q.zΥ>:KJ "K W;TB02[hkiqrnEpOcimť-|vd^珞i@ɳ֍{fС7>l+yFza̋2*wWj:A="K8&, >eݴr]]'y9,9$,52yͲj72l߷dd#!hdžg4s|7W1*39w+|8<U4.G[:-Q(U.tQEQEQEQEQEQEQE3p_Mw9?jW@_}֔4Lgq?A,x+D}bEt3?L&5QR0(((((((fI%.Y5JRҥ&mPi8.zsfk׋%[g&V}#0:JYn"(qw2:=ET_-..u[iXmET |vNOݑ@ܹMsI^ndo\ Fq/;zZl{kepk%2Xȹ<) n/=- Guj-=\|̞d3AգKsi@%s\rxPKmi)f@l0yW=x"mFOmQku)2w߇AP~Xy=ڴZs[i ^R'*R,pTmiڌ:@nChOClt\c}Rnm"3\BrOZxoCKo:8j1u/Mi"X;^Mnؙc&W.>! O LvWoY-C v@PC]&EνI+R7H10@O1#TzXͦ [Clf UH2RP,m LE"u'{VW%fP`5/L*C Yneg Qs=#I{}i=|',x?x~JEW|$Ht ;h{[Y2Hm-d #U FҌ!9Fd}sIK%q \ xcʮ9^1"ȏ׌_og੗ƶ#*FQEQEQEQEQEQEQEQE(JQR$X|PI$&\ZVPL'UBQEjwPlY.fXԶ ,@պ+]sN41! Zo,6\ ,OrIQЖ^wGӼMh~3̆]2_ o$|HbTs(@=xeyR9Q"Q |Ln5.|_\̺r5ƝQT[cܛ-PI1(b@qEpOGK[ڢ^M3ޕЯ;>ᶚgZkugj!X.e[pTg/ k7Wv:LvP}X6Є.F :P0Qж\ߋ.Ǘ06YFZ&?-UOKJYƀ(>Z[x{=桢M4\-}в o7mnˁ'o͒W6}<krd2n3^kyXOOVinBl`aa,Ё&'+|!0HOC}>ko`)`duOEpu爿SV ;ZK[9 NvXJ N/moX)n^9J¦Fb|Ep y5fK+e0mF  ے{cl-fe G.d}w8ʘPh+յq'5]:4Y^լg_8lLʩsoKM-g*!QZ.2A+ 3(-((((((((g?J9KsԮ 4? )|h_#+Y+Wxf |Lkb:(aEPEPEPEPEPEPHʮVR2=AScHlz2D U{)V 劁? û׮o^kǁ3KG ;܍y gxmh|Wi%vZ^ƃJ$n~Ev+aRpZaC$Җy"LB$tY3*6e\|aE`x/mtRDYĢ $3IaaÜ'!KD. iMqr2]bp@TV.k=#W'׬"FX(ǘ\a@ܻ񖝧iSOwoKnY-nm_FtF Zx R8a3YvǓأ!KMCv4wbfiQeVƪ+h]k[Ko8>冇t;&AJwn⏴-,~t3a[;N]ӝr +o ''$úuX÷ӕ=Ǩi}"DFǓ:ޢ'hR[4'>\&X)^1"ȏ׌_og੗ƶ#*FQEQEQEQEQEQEZͯHsnۏ)cq4P=7MLHY< Ұ,XqUn|577O$cł6ݵz*9֢(]h}2[(⑃;cfxʐ~VVv`˂x 5-'{UH< Qc :/8V ́Ν- ~\m,~y>*iG+9vm3q;c\U5~t VeT.ƅo&Hd\X#`r89UKhK-ՇyyO5%ءñmn$1F啽+ ~dk,s>x]j/]>dF|`c-z̀scε|3ܷZynK#!BIY6X('{͛zvn[tͼn8L㯩tP PA:\ŷđo r p771mijB{YfwHE11)[xN_ ifh9ZU[۩n~f`|lGaBkK;b RVR3HҐXy܅l(H-  O3I-֮4#@Gi}e>u-_;|on͓<)% wV쭛{٢e XՑXsb0B.NV qq.9:W)wm4{M#Ww##p9$? Y[kkȓ8$O,ĒKI$I5=fiz"-#WWRۃlb(((((((g?J9KsԮ 4? )|h_#+Y+Wxf |Lkb:(aEPEPEPEPEPEPEPEP/ :O, qfv1$>}?No^(`kYDv^rBn+ OQ@?5Ob"JZ֑Il&;[X٧"[OMYg ц翢*j^Ť^ɦB_5R+S+wWv6-$`e"1\7 q/Ɖi{yK; >,68FX ;6~"7 "u*CEcg`?*z=x5 /Z V\Yn;Ϧ77/F^ŷ.bS\G]v=уtc_(om:}F?"HU˙a>~p)U4o*51iv rqAvsHįɍ?c+_?*dbcьkO4f$(.jDHח~w-kXYb&ب7 twi}E{-3yo+nNl*Ao[+R$<>XUU+:08տ@Q@Q@Q@Q@Q@Q@Q@9?jW@_}{3p_MiKDfw C] \G/WC7pTc[E# ( ( ( ( ( ( +Qd&%L* Jy>$ZDUR˅ҏm+wG 8V(?RW->lZ*0khZe%rpAV F ߋe]\KsIr?[ĭ!EY|v?'*@=:ƉFuuhao#Qo^I#US."m_te[pDć^T+5 `gJeDk$˛cݰ*-w!خG>B+a7"{(&L+F; J9/aH<G̼ϥlW/ZmR= *r9.ˆݱ7O ֣j[Ǩ<Yd8w:QY b4#Bi as|66۪~/ƀ8|JѼm⼏7s ,9311[wBMG$K}瑌9˽{vGpW* M*NշhsxiwN9EPEPEPEPEPEPEP?ڕ|s_GA5p\?iZR3ٝǂG/WC7pW=?A,2tQEHŠ(((((((ZiZuŝMHaTi$cy>֭@Q@Q@TҴ ; [i}Ш6Iː2$}O[ ( ( uILA^],?'G~UZ䟕C4gME2|kuiڪ]ZȪ֖/~xz82 +k=R4&Oӭ<"I$rMuTPEPEPEPEPEPEPEP?ڕ|s_GA5p\?iZR3ٝǂG/WC7pW=?A,2tQEHŠ(((((((((((((((((((((((( + /kR/&g;ȏ׌_og{_#+Y*e1袊Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@9?jW@_}{3p_MiKDfw C] \G/WC7pTc[E# ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( (1sԮ 4? g?J9KҗƉ<">^1"ȏ׌_og੗ƶ#*FQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEcp\?i]ڕ|s_GA5/=x+D}bEt3?s C] S/lGET((((((((((((((((((((((((R/&+ /kJ_&{3Wxf ">^1"_؎(QEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQE3p_Mw9?jW@_}֔4Lgq?A,x+D}bEt3?L&5QR0((((((((((((((((((((((((g?J9KsԮ 4? )|h_#+Y+Wxf |Lkb:(aEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEP?ڕ|s_GA5p\?iZR3ٝǂG/WC7pW=?A,2tQEHŠ(((((((((((((((((((((((( + /kR/&g;ȏ׌_og{_#+Y*e1袊Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@9?jW@_}{3p_MiKDfw C] \G/WC7pTc[E# ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( (1sԮ 4? g?J9KҗƉ<">^1"ȏ׌_og੗ƶ#*FQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEcp\?i]ڕ|s_GA5/=x+D}bEt3?s C] S/lGET((((((((((((((((((((((((R/&+ /kJ_&{3Wxm Db_$?AS/lcgk_4?lQR3;ZI{$kbֿ=i4gk_4آ1M?ƶ( k&GvAOsIHֿ=i4gk_4O4 ?k&GvAO'G}QHֿ=i4gk_4C4,Q<#@r['2M?ƶ( k&GvAO(;ZI{$kbֿ=i4gk_4آ1M?ƶ( k&GvAO(;ZI{$kbֿ=i4gk_4آ1M?ƶ( k&GvAORu>'G}PvAO;ZIM#agk_4?ny??'G}PvAO;ZIM# b̘?4{$hֿ=i5Ecgk_4?lQ@M?Ək&[P?vAO;ZIc]Aޡ >HHL ?_μ4? U* /kJ_& x+D}bEnG/VL&5QE# ( ( ($s~ʣ'\߇&ĚeܥDRo$"]!`'v 1r3Q|0SX'lV>#&m@QEQEQEQE_MzyW?iZR3N_#+vHSM])N]#%7mqG/[[ JM M${m_o m(@KoKϰs+Ŀz7Q c>h@KoG/[[ =OD*_J^%o9zT ȔKP^U ^{ֽYH,uv'3(\gc Ǭ}*< )!Q" vK ٫v#|,??OX¤Parυ'(@G'X,GaI  Q'X,RyB(Qd~rυy> TPYarυ'(@G'X,GanRMkpT7 F֜,tmN$5lY\U7 #mdѸ"HE٢[ (|,??jwڜG=R[EMF3$h<O57"\ɜTH|9_9?c < +N-;P[˅7ZM:(LG'np=z?tɧ[E˦Fj F0Ia֏kH9$rrυy> WM/ᱛ\mOSK[M"DI!v|lA9gkz'?aq$B?.}d'-Y'X,GatUU.5 &$Bʨvռioo Onm?ݐ ;F@=j}!H (|,??St}g¶r;IEjBUB\1fn/oOy4P41휪:Ui$_OX9?c ֖Vˬk)c(f(Hp8ڟmWR֭$c-3K&*0yIarυb FvSt[>ƣjZ#R?9?c < *O(Q ,OX9?c yB #|,??OX¤P (|,??g'SLH/YP#1{Rm-@.3dEi\Xi0ͲgAda+!]rN$?Iq %]n>cEq!0:j.{"|4O&i7;-m`6eGFVGFs>rLMF-Alr:zTQy%4-_k%a(6Ò=} H>D}n73n~+|):=Ŏ;G`ծ|T& )S[T-ʧ`#|a^_Uk|WR&tI'~Wk|WQ_UW^ɞ7{ ##OT}n^Wk|WQ_U[a{&x#r i>"XWd(фy , qk|WQ_UKSCT亞T֢bLZx㕉L0#:minghP$EV A1W_'G!~UڏaϹw{\\f2ـFm/LTwi%G.ګF`F_zB5>+/_O*9%fZ9#7+1<{pA{tgSm{[E9A >7U gC^=,O'H|pl?O*kRcpVvqMz?e ߲֋'WXG8tax#_[`L+Q{ (|ወX,Xۣð=_'G=+;g^+WxpcydU*UEkS 0^G#ÿUX#) =i噷LbQ׀k?4UxwO*}[d-c9I4,涊+ݳiTׯi??4UY`r<$3*6@=ESP|>R3g#ÿU[P_nt2:N?P0/fϘhЃȏ׌_$ Vv}8 CX(15yݝ ߷|g|-ԫGddѾ|:mzlߢK=~MF{{evܪ|SaH5OrKH?h} qaqs-r$&:8 8TcjRL>z#[X6˾C*,[} EoKyka5%٦Z5 9+r0[k6ڠyGG tGa,CHu<|ǃVͨ2IO4 Dbf`b@g#m0:Kt,qV%Vq bB$=HbPIxz2yֲtR.Os D< "Y2@vXc++¡ἒiHV`.8]H=`ܻA-sV-5U71^Lב:vakKz!R@23A2r<ǠiYg{UQ`;W%W0 1zfj7VPsw,e ppsSjZjq"*9@$?! Wf bVٍIh9Q$ml>/?kcYXSHdB;fO$Cn9D~^IP$Xܖ~QH*8l. ȪLr p#O]FX0 $~U>H7Cφ4ؒ#C)]$˕fe%%񺺪B: jx{i9 pz ]lkĒ\ydjς 'p?=hPH:8C ^@0Hki`2{U %٥WUH<9&ncI'HP]UTu' t?F%q ީ r.FJ~)>^7;px*q*WPIY:}qVڡmmuwx%!yj'-a 6 $9fŨC]ldxasFF @r|ozO?h} qYk,"!沘v"hڬ29b -ðk4wH>P#39.?se7W0+sy.eV889 a?*Zhh(c ( ( ( *?jUy\A4 >B+9O">^1"c×zȻĎAO C] ^t&t;mYkc6~4?V_hc6~4?V_hc:.G3UO8zի ^w4sfݘe8']EX,r_՗o&Co7]mX,r_՗o&/jOudR[HXޕE%mYh6~5E%mYh6~5E%mYh6~5E%mYh6~5E'u]YmgdqW>iV+0˶pOҺ(X /M՗o&(X /M՗o&(X|+ỿSIB r)((ľnouG5-b{2=:`7[Er_՗o&Co7]m+!e[E sx+P7|jow=oX̲)JlR;hM>T>;fKuVdEhdHF]Į 24OqG=mlQ$ А9ACbYJQ\my[Y')?~LK4f0c TEPEPEPEPEPEPEPEPEP?[kW?^MQWw j nTQEzG)WG/WC7pW=?A,gJ؎(QEQEQEQEQEQEQETcHL!x$[idTǃ8=+_ Ʊ-m I]{8bP-d8c#ŎB>w!G\gށ'_RSU%/%ekX,[ir$oHTッ޺4CЍ&&hmkӿ'?iߓGE mkӿ'?iߓGE mkӿ'?iߓGE mkӿ'?iߓGE mkӿ'?iߓGE mkӿ'?iߓGE mkӿ'?iߓGE mkӿ'?iߓGE mkӿ'?iߓGE mkӿ'?iߓGE mkӿ'?iߓGE =֫{,u% 7zc'3ZtQEQEcE{SUpȷw֯j |EWrUx+D}bEt3?s C] ^|&t袊Q@b 5}BY1Ű?TdHL&H$kh8W)ا8GP!?GkM-MRSM(uNKyh</ cDhjp&\Y/پhﮉ|ɳ^GX,n`G?B?X7cy'7&ta,ʽ1 ,^PA[Eg#5E B?GŚMuug2eR O%8 pĹn~Ǟ^_Jҵ[oً,Uw<ݎNBH,'4m&RX g'kwwwJ+<_oeܑc\@ȆFXHc"@TG]{;޼ 9]>F,Hbǖ˪Ue2"+A%>V"?#ƳnDu}\Qi%eFn |unjWp{hi?veR WG81X#Ə!:(X?#ƴꦫ%ZEd)5A#[E!¼N< >B?G.[閚<Q+ x>_wx6ҏM}~k ퟑ}>is&ȇay?Ghű97SfUIb,3?#Ə!:(X?#ƨh.,k=1C-͢N y)c%p쨇;<*V\Zx\Ib3rrA`?#5h!{j}ܱܽ7䁲-gTim8f o-Cwiz$t!X.UVg{ `G?B?ZtQ`#4`G?iEg#5E إS?dqMEQEQEOAWT|U"CZ*?h[Q^}U?A,x+D}bEt3?yҶ#*FQEQEG<[oqK RHPF AJ(((0B p!$*7*=@%W#RQ@Q@Q@WiM{ Z{F\[}XXQs;2@0Cn "BQBK1${MI^y ivW/y5(מ_ّz2c , 5DIm͜2J57Yc$d7 $LAwW7 %!fh#K~|mreR#|axIsP{x ."w.Ѓ"dr=֧^@2n;\f\29>p''meF| 2 ݀`ct ռ$ʥ$E `ڤL-ׄŭ˨-D,d#<"% >Ed_k:WOӍI 77"fO"2IRo+ѯ񖷧:,[Ż/&"$y C;B3-(*3-p YBrXUr;%QEQEQEQEQEQEQEOAWT|U"CZ*?h[Q^}U?A,x+D}bEt3?yҶ#*FQEQEQEQEQEQEQEQEQEQEQEQETt]RaG!zn'[TS_-+Io KK}@o_Qpk[&*\.Z4G$ɥ E %7M/Q -iªEΗ38}5`^Cp@֭fho?֝1Q@Q@*n^y\A5G_-?5ڟ?&!QE^ C] \G/WC7pW/+b:(aEP\=ֹ\ 0! ?jsXiw5Ky3*`F:(Qs=[FX坬]N0JvKr~w=vN[vHŕG [QrBw4]IcG{g( γofע Oyqfyj+;ݓ.!:`s=`\{olQE?Qs=5+[KH Ӣ){ @ftw>Tw+3FxpuK`\{o??[Q`s=`\{olW-gͯE! Vv=p' \CuX ?.罷›LI#{sl$K,Be[ J~0Οbxh/M'bQ@@姄!``\{o??[Q`s=`\{olUMVk "淂Ic;eRB rHCץ .罷 m}6mo,`q$ 섂TPsX={rhM6VsZBHgXDIT̏l`cYݭǛla|2p@sQ>%/%eY뷳kF'{HC\?ei } ȱ4iF9iO禋}IZP?)/n&N>c{g*jWvAE,SN 51ayȤΗK~-_c[e+~>xFq,+`\{o??\-bg/l^8HUGNUbB;+.$Gخ.B.fhon7{g( آ m}{g+b,1.罷 m}(XXIa Hɷ=35f)((Ww j >*n^y\A4- (H>Wxf ">^1"|L[E# ( ((_hfWv0Ics̓n1btmĶyy ciV% >Ϋ)AJؑS@![XLT́q( (#n$$\+`He<bdݾ-[rWDn鹱7 ;úpfYL˱HخA*@U ;{x(bPTP0RQ@Q@F nbA3neRJz 6m֨k[=hYUU!7a *jwֺ:HZ5M4AI t]3A{]* 8WvrO0a,m#$ccC(6I^;+5=F; k)o&RI[UeBťR0 x|cpV7i%y,ރ#E,ǺD* \ `Ku >Ovg2HDlۏ9A:EX|Z4~hyaxhe"1;Vd)ʆh k_hbK[+# HpweHݐ V./n#~bbk L]$ sׁ#~€'tKIҮ`w+bŸۉmÜD7ؼ.C|c_&6LtN)i'0r$JC.$!Wku<ډɷYn_22W 3h,H&uTy̪IPORfԕ^{6.T{+^?di,IbJmC&KWa[qo*K 9#`FApAJ(#n$$\+`He<bdݾ-[rWDn鹱7 Vaqsqgakm5oUf9rXOHBGjQ@IEQEQEQEQEQEQEcE{SUpȷw֯j |EWrUx+D}bEt3?s C] ^|&t袊Q@Q@Q@Q@Q@Q@Q@Q@7V[D*92<GjɓzMۥ>VI#蔏rO^TPI4:]N-NK WvGtЩ |=ϭG+KOm}9ϙϝ=O_3&qf,ѴmC+*Sd `R]hzM ޗeq{*[ty#r6$@6đC8*jhzNjivWV|[3p8*A4=&;[! n#c*$`qɪnn vzQźG#B9$(Ε^[XZ 9aVYX# @Utz EQEQEQEQEQE`鷺/,dZMmCIf<0I3Eb-v7(yy)/SkS߽@7rڛ="kKV>]\ +is9`1(wEPEPEP?[kW?^MQWw j nTQEzG)WG/WC7pW=?A,gJ؎(QEV=若6r7 9b 5?eP%v?+~~G}+?Q#hYQp ]?ƏJߑ5E ?Q#hYQp ]?ƏJߑ5E ?Q#hYQp ]?ƏJߑ5E ?Q#hYQp ]?ƏJߑ5E ?Q#hYQp ]?ƏJߑ5E ?Q#hYQp ]?ƏJߑ5E ?Q#hYQp ]?ƏJߑ5E ?Q#hYQp'W ;OTFΧ'9M-R͝x'''<սB]oΘSOJ _Acp<`6H_dg:*< o%r9dv$w6_XS}V+5g@֚fj d<;~$*Yl&v`Wqp?OZTQEQEOAWT|U"CZ*?h[Q^}U?A,x+D}bEt3?yҶ#*FQE̶ww RH!f@b]g`'tSUa4N]K0 E,@8Ͽ>G&>Xҵ+ 7Q+mشf9K`1]9ˋ&.u hIoR7́tVbj?Ͽ>Lp}h|dNwCE&>ؚ5E ?ؚ4bj?ՍWRPt{ۈ#ac"(8Z:e۫7Gq`8$g֋MG}?5k5|OZsocVHZ$QAr$I &tQl 7t}Fkymt/,'4"9I($ ȧ;NFXİXϿ>G&>oQE&>ؚ5\S4,.''Cg67 mRsbj?Ͽ>Vؚ5E ?ؚ4bj?Tut"SWhlEQK2@ ؚ4bj?Ս+RPuKx&݋FcQS8[Qhk>)OwwRf^F-+2X,OϿ>G&>2sOw扡wɐ r69D}  ?ؚ4bj?X,`bj?Ͽ>V5]JBMӢn"+"TohFj0EnAk Z,3?5h_+_20A7ڢF%I$D%bsfms GfJN#2Ipse Kؚ4bj?X,emO%@ j׿^Rc1t.B`RT]wd<)>կн֥ߥy}g_;W?:Ң((Ww j >*n^y\A4- (H>Wxf ">^1"|L[E# ( (1n+\xvBVY>!@@S 1mrh|b3e!vv71$*"PE(z]Z["JQԎ3 "tQ@Q@5.VX/x\ )Y y;[Zk%кKtEaW*I),䪕Ӣ1t i][[tٍXhGe:dt&쬭DdIKIf'bI%$I$(zi Z;bK}|w)TvQjr)ly*yGR8ϰ$*zB.9mW!O4YXLH;Y$*J#;A W񭖃ie&i=[FPĻJ#%9'wNZk,互7[nnfXXǒrĒ'`HcUR1'Uh9` `Do:l[}sl[D$mA(8RSW g׃COVrz]cA"7u$` xl+D[ÔW/O" mPMGKխ d%m_GFVe9^}Vt.`nDUʒJg9*t _ p|r"o#pEHUF/Y[kkȓ8$O,ĒKI$I5=QEQEQEQEQEQEOAWT|U"CZ*?h[Q^}U?A,x+D}bEt3?yҶ#*FQEQEQEQEQEQEQEBMO%?/cuT|A(z-ʖ{_&k%!rH"6P|)tGtf[,;0!P`Dj|S}DlyR=`v2ꋹ(ݒ@5fw(cw8E@y=>A|5oDl1,|\F60ci2A;ivy(v&7.IrMP x;F}>K&K֊[pdyT(V2oq03Td ޢŋz,'+j+FѫHEXdC0b /5QOSKL7RZTUTl0:eAFkZ&EWK*>o ֗yS^]Ey8WXY. ' Q+Zɺ֗w4ӼS<5԰HX!у+yPpJ)##4 L_e #{ɚˍ-;x`5Efi p}I]MrȤBYB gj8Ӣ((((((((Ww j >*n^y\A4- (H>Wxf ">^1"|L[E# ( ͺ+*crlq޴S_kUBdJ⹭ V? J_OE h(EY4Qp V? J_OE h(EY4Qp V? J_OE h*oTXnmyI`N d:+KV+k[ϓߠ3[*YcbFm%r\%Us(#Oj^O$a"9/? EG%Z/' n.$i&fnJ⹭ V? J_OE h(EY4Qp V? J_OE h(EY4Qp V? J_OE h(EY4Qp V? J_OE h(EY4Qp V? J_OE z杨\y`N0=I#k3@Syf((Ww j >*n^y\A4- (H>Wxf ">^1"|L[E# ( iIQI&']V$Kwp P_9t;O;]ި+~y>߳G/?k?cO~`IٮGo΋_?4}}'f1ߝc}:,9^Ϥ <~u[x\WΗa-դ $is)̵wE&zI+lo1ߝ 6ew$wnXX⅙AGX_ly$?h3N\ 9P#EScGo΀83MN^Xg!`zj <~u|JD!*5ח!F$x&RC;V?`I٣?5{I:R'YU܃pg#͵?cO~`IٮGo΋_?4}}'f1ߝc}:,9^Ϥ <~uy->;D|D~eǑ\Y0Y{ `I٣?5b"XiDw {rmg͒-wI#42MHCa=go΋_?4}}'f1ߝc}:,9^Ϥ <~tyXy>߳G/?kNV7-su  *F]aG-`3)` >y>߳Vݭ`a73sS4 T+ZxBKo&$F\CuorG/2ܤ?/%ƦCw$yٍFy5~]bGQEQEOAWT|U"CZ*?h[Q^}U?A,x+D}bEt3?yҶ#*FQEQEhVZeMnpTm$CP{*E]:((((j^4W:.輈Y6h".тPZ+ya`'lPM:{+vRrۄ+(8LyV떳i%'B>v$ݷ?3xj6Ӭ .ݬU9ǿo`;ɺ.eYbYme>Dgxnd>VgmPkk2uH/`#o6lpy j+&Zj'hGi啣?,H#~SHrxZD$I=<)uGsXHU7fԼDun6\I LWJ w6o#[I0RcIcX@|z<`Vktr^Kcl 妚6Yq)1d@bxOCu{OLmle#P@9b<=+je. ?٧嵕-\C7n6Gt)n&u_!Y$FH-!P#6hݍ',⺸94Kqe4O$ Td ą82$%ᴷyg4|E v6Ӏ j+/RM CKH[C#FmѻyZQ+s=<hgefP#dwyne*2PA{o-գ r61< 9:Ӑz5'4X'k(뽙maTdۂ6-Ǭe~u-_#|o^cʓ9ɻ6s(her"b̎s3eef,Ib@#((+'^λ R8Ij"]  B+9O">^1"ȏ׌_og>_:VtQEHŠ((((((* }7O˶NPI8@Moo$7R]q0qp@{9g+K8guK6O #uXE, +kL՚`TwWԅ6Fxdln]|Oj: E5sB N䅉`II{{$] Po262{8l Pvj3<\YF\jSK!i崷$bY&ުc1Aɵ@]Fonb;˰)nr0Uv~ 4k[]F(nTXHȠ \+&ZC=N~=ya̓yہ=߁:P5i.駏4_$pɅ=͍i6Iڸ|5l-T(YeM@܀Geyů,OOrݗKHcXnIܿ0bԚÍ#YYCRF/#2631& Ge@d5"wr+ +d`1D I6K 4ʶŖYEԷQ3>B"ϙbo ( ( ( ( ( ( ( (1U"CZ*?j[kW?^M p>B+9O">^1"ȏ׌_og>_:VtQEHŠ(K)kx^#&} RR#GǕ>A@?A OGA O\Q;_+GA OGA O\Q;_\.uo-?o-?rchGQpk4k5}chEQB/s=ռv2*9$FWR0A;W7;_iGtXWf7§}\saQ#ZE D,ƣ!3PH,۷s&ijvoqYq;o#8ۄ$ɋa;{;MUT6|]+iZ~"\[#b7?c3jf/r(|8}،$-B/ԟo?¸U\il!c8UTrp_M__M__v(C| WΣ_M__M__v(C| .:}7Ə}7ƹϴ?v(\?Z?Zk>ϴ?s!ih!ikC| >k>Σ_M__M__v(C| .:}7Ə}7ƹϴ?v(\?Z?Zk>ϴ?s!ih!ikC| >k>Σ_M__M__v(C| .:}7Ə}7ƹϴ?v(\lgG 弒7EITVkö%>w*pI?*ئ0((_-?5ڟ?&E{SUpз*(#_#+Y+Wxf 3lGET(+S_u {m5n]R<ˉf=9>]&bxfː#gc<`=e8ee |Km\,79&嶈BF3QUc|Km>lRGf9b)eLud ]/>O~6? {(NO@[^b3[7(W(Yn0\)9KNnG9#o.h%P$@(dgA0%H$XEPIJ[1$29ϓߠϓߠ3sO!F>O~a-I%()34nG@9+O{D N,ĐI$ 5ld/wNx`qb2srz1±Ev^|| my{PĥBQ@$ j~j'hZ 6v>ІSVP]k BOFN<,@ p9fmV,9+Ķf$|h"TѺP9Lr(Xhϓߠϓߠc=K^M3YM.Jo!E9ڠ2̪nA|.㸷%UFApAX(o΋,ZlYE f20W&EIv5+v=ysA*$2 F#8 !*A%1Ev^|| my{y{X,qWeQQ`3Ztp[#L0((_-?5ڟ?&E{SUpз*(#_#+Y+Wxf 3lGET(* +}KO̶2F`A S@&M 7P?;?3hX7VgcڷQ jIqI# Ebr54ݭa[{R"]c<#{TQ@Q@vog{K:"+vF~E`q"rV 3Q=.N֖mnm4=}p)ErZ.-OP{.Io- 7ROWum2([V$}Ծ}v$ګN d(c7(m9 \yְ-ݽO.1u`|ž=(/51!E]Ay-ż{KhcSPe6v9qm4KM-oh~N[p.$˸O #(@Q@A}eoi67q142H܌##=*z(D`5IU_aU7y`gr[rv 1B+o[iBKno0F?w[Ebr54ݭa[{R"]c<#{TQ@Q@vog{K:"+vF~E`q"rV 3Q=.N֖mnm4=}p)Eq&LPۈfE$I VX1P2eHrCiNKKLhM*PIŒ9c~((((((Ww j >*n^y\A4- (H>Wxf ">^1"|L[E# ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( (1U"CZ*?j[kW?^M p>B+9O">^1"ȏ׌_og>_:VtQEHŠ((((((((((((((((((((((( ȷw֯j OAWBSȏ׌_og{_#+Y+ϗΕQR0(((((((((((((((((((((((_-?5ڟ?&E{SUpз*(#_#+Y+Wxf 3lGET(((((((((((((((((((((((Ww j >*n^y\A4- (H>Wxf ">^1"|L[E# ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( (1U"CZ*?j[kW?^M p>B+9O">^1"ȏ׌_og>_:VtQEHŠ((((((((((((((((((((((( ȷw֯j OAWBSȏ׌_og{_#+Y+ϗΕQR0(((((((((((((((((((((((_-?5ڟ?&E{SUpз*(#_#+CQa[2@YA+?_#+v|L[#Vo#VolQR3j ףj ׭(j ףj ׭(j ףj ׭(j ףj ׭(j ףj ׭(j ףj ׭(j ףj ׭(j ףj ׭(j ףj ׭(j ףj ׭(j ףj ׭(j ףj ׭(j ףj ׭(j ףj ׭(j ףj ׭(j ףj ׭(j ףj ׭(j ףj ׭(j ףj ׭(j ףj ׭(j ףj ׭(j ףj ׭(j ףj ׭(ֵ)u-"{HtMdn ې8`{jy\A5j !QE^ C[?A^|&t(QEQET1X QT_QTuxT;K0\K:Mu%k*B&#F;*8o2)o'AG'A^cwwܗs1s`o{92 /8O#jo>.t;PI# U6,A󄑙/ldt~||p~l;H-^GO6>- D$hC x+WEkۍK-ܞë́JsjIrOJ+#3^h\\HM!rv:v? b((((((((!O2΀>O~>O~?mơԴwaWna"0H!Q .;v||yqAɨ%q-yq eq">1۾x־ךZ\"F"O.I xTc QW;k|+y,)nߌFn޼@wGF*I*ӿdkb ( ( ( *?jUy\A4 >B+9O">^1"kϋ?_Lk{kkdx%%^7QVŸ(Վ?>xS_,s zQ ?=e(`::+Ÿ}OY9e.ee<󓞀M`}OY?>EJ_OUBxS_O)A/K]?<#ev\QڈxS_Yv O)A/G']s zQ ?=e(`::+Ÿ}OY9e.?>xS_Yv O)A/G'];m>YXʮO99' zQ.t[EG%Z/' ?=e(Ÿe.h(EU?>xS_Yv %Z/' ?*!?UOO)A/G']C[.-|Ol)\' zQ.tttW9 ?=e(Ÿe.?>xS_Yv O)A/G']ꮧ oO)A/Uuit]ghT : /]1[?[hdsٟnetgen-6.2.1804/doc/pictures/menu_geometry.jpg0000644000175000017500000001547313272137567020003 0ustar kurtkurtJFIFC    $.' ",#(7),01444'9=82<.342C  2!!22222222222222222222222222222222222222222222222222~" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?YeuJӼOc4.ϷBO~>O~ K~oڌOkCli` dCK= ua(iR(}FUJ o 8}]M$H]Ēp@f$I I-4[kvfOc3\)P O1@ %@ç/״=+ȷdG<1 (R@%Cۜg88kTN7H6ͫD/5]S`nq[}6LS0S\)`N;7uDm&2B$1$IMrvŪ@]Aw{}HR?'c.:/vᶵ:mOJ-bBBE*J P60@.i:Mk+XZ)#lGA{|E-ˬ8hmÔ& ؔVEx.m=^RG>e}zww|Aq%ְ6.06sg#ʌyWZ7Hm("`_*3ُʲl]YN>n`~CӒ{:፭f32@@^y;{y{iuWTX./x'y[``${6;j`02|+aw.oM`؛ nR"i #wiPMkY[EkAI(F!=1@_\j.#evF9}*y''$m0=N`OjCNt8aOmms\I%՚#"&ϘQ`4|;Z]Ok6Z] nc*ea,  %JgVtʤ u \ۇI\MW-6ᬮiEx]I#&I#lxsvxKx]Ru YĢ[;T:tWi> W;־]b'{f'3c2p#+jj i賘-^iaZ$]~mVMys6w- fhFُLw*Ϣj%֟><{I/=? _(((((((((E;h#s~ʣ'\߇4_Eh:YĺvLeh̞h%~ټy02g^bQu.txCldo,@b:i=(L4!qnyI9m*d9.Aw|g[tixK1k=]<'R35mf⻝bHns դFEka wWn+;e$4q`ԼyqopͶIcHǑh,H}+D5zX߼\Z$A"(6~D,*JuHޏf-/*HV!d aS8R@:Z+4[Ocͨ3$p iZ)ǘ7poAߵcwҼ'm[#]-4H^@V((ݏ4$m\'-mEiwF .݌AP 05]ZS$g5f*(H ~) tQEQEQEQEQEQEQEQEq;h-voTt(%w?qvʃuMjmstg[zd]Zg[zd]޷?7@G1<H3o@. p2{;TW:&ζɿEUζɿ?n2o.-QUn2o.o[ TU_o[ :&W:&ζɿEUζɿ?n2o.-QUn2o.o[ TU_o[ :&W:&ζɿEUζɿ?n2o.-QUn2o.o[ TU_o[ :&E'T"ʹ‰HGm??qVri$VW\i`g tv$l8s~ʲ4MҮ{H]_oy;"V$D/ʀxF_ kڶO˨x>x[XxSHOGu ikSm{4 dpX~:EkA )S#cbKrI=Ӽ_HZ-X۴MAvy#H$^䃸k-auu0βb#fbA?p_kwYweVB3#;)g*SH6Y̷ XwL`Bb0~"lZW_a[;{eTy n`vwSYj1,rٸd7q<$Q n@Oqi7ؑ DC"y\j'rBmĎdUKD; v( _5)XXi4jIWr2ɍ(2 oV-ZHh-ӫyRPϝH]Q-2Owd}MRK.l9@玖DGVl_J60w޷`7tP,C9 = (Pɬc^Gh.~PF$['&+O;UQS{wݸ#ձh ͨ^̷_?rBѕ ۈSN$cO?o~7 gپ͎wg>(#+I\txY I*w( ['r;:ՋqkM,]Ofm{Kw3F] `qҧMsI5K&Mo !y .9ph_\2C(U.?rq}iiA؞c7?»'Z/|="g$Nk\U.?r\2C*OV^o^e}c-K9vF%U.?r\2C*-K\to+STs"ߌg2?1Vx-IaC$l]H #C\jeU]| ^l<.zgڮs!}?9V jeQ\ZɼEcLYӢ,-^R͍a99gW? >s@˟U-Vy7D\c94ϵ\2C(U.?rQ@~s@˟W? ʵQ<6yR$,(,*{@ P?jeQ\ENeWV<ϲ$3gi8jUU.?r\2C*a<-p*U0rU{>%UU.?r\2C*WW? >s@˟TPJŔ"BTHqE/m?Z)g\߇]7T%ſY$_1}0 ~ߴ|>mO%sn- CnH C?cLfmݗfq^nZ-܄gxٱ O wsr5u 7s\G;IjJ4UV0DY7$m_ C?cG' X  B%X[xUk=c.ķ#!6t^?dլG34,F\P}ON?;oGhmmje9@fel->L-YX& 'kq,||K_7#4wP蚍aդk;h&jL"H+H**`X1"=ū14oQ˪Z\r \B^kugaa*Qt;oGh ;Ǹ𾒿:4X>$$vUcCr3UR^"Ix$ee*0;oGh 3S4(C4̥nh;d.wnUӮ;ƏNֽYH,uv'3(\gc Ǭ}*< )!Q" vK ٫v#|,??OX¤Parυ'(@G'X,GaI  Q'X,RyB(Qd~rυy> TPYarυ'(@G'X,GanRMkpT7 F֜,tmN$5lY\U7 #mdѸ"HE٢[ (|,??jwڜG=R[EMF3$h<O57"\ɜTH|9_9?c < +N-;P[˅7ZM:(LG'np=z?tɧ[E˦Fj F0Ia֏kH9$rrυy> WM/ᱛ\mOSK[M"DI!v|lA9gkz'?aq$B?.}d'-Y'X,GatUU.5 &$Bʨvռioo Onm?ݐ ;F@=j}!H (|,??St}g¶r;IEjBUB\1fn/oOy4P41휪:Ui$_OX9?c ֖Vˬk)c(f(Hp8ڟmWR֭$c-3K&*0yIarυb FvSt[>ƣjZ#R?9?c < *O(Q ,OX9?c yB #|,??OX¤P (|,??g'SLH/YP#1{Rm-@.3dEi\Xi0ͲgAda+!]rN$?Iq %]n>cEq!0:j.{"|4O&i7;-m`6eGFVGFs>rLMF-Alr:zTQy%4-_k%a(6Ò=} H>D}n73n~+|):=Ŏ;G`գs_ YT;|ۧ\2& )S"[T-ʧ`#|a^qG8t`y?(z?e ߲}n3aG+?/?]^.ð{&y?(z|%yC>n򮝱{T^];g^+W_'G!~T}n~Wk|WRp?#Qvgy^+W_'G!~T}n㊬k)#5WIc^ΰ xF6,NIpGW_'G!~U/NN SyRZ;]2ǽk{V'%0i麵B"`X(w^_Uk|WT{j=>\kqpmhʿfa擞OȽ1P\jzݤҋQjQ5G?w}ֿ  ϊ?~ڗ`s,|Ij\HThKx@;Y`ryҲuM[m(T('q:Wxp+⪽.sg5[ku,3y!]p0pՓ-X3]LH_Pi pA$Wp ?R_'KQx^_^_&̑ϠS|a^_Uk|WVWd/_O*B5>+n~W>##OTk|WQvg^+W_'G!~T}n~Wk|WQ_U[`L+Q{ Q'#ÿT}n>WxwO*B<;@'G=[_E1fʩu!0snUމK7! hZc"I;A\lҫHP,pN<~:W@;˽i H0ʼA9asBlҫHP,pN<~.q O,)gwu$\VHӣXCu,jP8Y F@88z^^_#Ʒ+0^܀|+0= MR% %2HuI{w?ktKKw=*J1J6#zQ "h.iV+0˶pOҺ(6~4?V_haX /M^ n.Ȥ-n9+KmYkKmYkKmYkKmYk6Owc(ouUB+9O">^1"ȏ׌_og>_:VtQEHŠ(((((((+PnRtW/Cʵzt#QmcIƋ}WQʒir腆FskhleJ34WUbKDĜ|Q$IDNMm!xRDq N?ZLm'=Jټ; k rvr{0ndPKE`oźo>ҶGl ͅl;wNv1s|]MS@ڵsܴRZHGUŒ$ǘ6aEsW:ѴrJȒV͊L߻G2 c@8'+`4tӨ> מEm`ՖDv%  HSEsZ''[kS{r_k~a,1URXF0]:+0IZ}k[J;.J:+UǚrMvQtWUvCM4O!;.ATႀu4W5'sLȹѮryQLdAʲ_ qPn-QEQEQEQEQEQEQEQEcE{SUpȷw֯j |EWrUx+D}bEt3?s C] ^|&t袊Q@Q@Q@Q@Q@Q@VMο ւy!ۼ`22;q擲ZKFvnIf9;– hFHK r}@'xQʸDs\)Ga#"qaw8%ZJm_Y][]FL#r0!G#zU|1[1l\hA@<>QJ8@&%Ͳ;A< [{J։n|V3 $mP1ޘN*O*uk;o JK#3;w01E>WW^\Y$JdI h+|o˝UOQKkH8-$Hfe$H5S+}?zc(+Haۊ6Wq-l]Ao%ӣ6nnlFb3j^}B+觖X0Rm 4j[p`Cɪjqi_ڥ˾;VD9#n@}*8&x%T;hi.eޮJ*K={j?}ά|^X;&֗i43S<25Գ#݋ $Rp '5xKHΌ(,qȦ2X%u]9oůE"[fU.rHVV#`zuk(]=bxD76BwV'& `}]PKkFybW2< ]:U hz~6k2iJMpNFxrAP2x&%Ͳ;A< [{JxSHݙ_^ T6_P8`0o- OHmo kiT#fi>11Xomskukg:wW*B!R X/tuգ\R7bwVW(ڻlHkVd""t䰙GtH"v?+pcV$t8/ReLW^y v>ni6w3Zˈ]lNAJ@Q@Q@Q@Q@Q@Q@Q@*n^y\A5G_-?5ڟ?&!QE^ C] \G/WC7pW/+b:(aEPEPEPEPEPEPTmtՏSBEɏjq>Ee^::}N|Bá|?ZݢGbQeduip& 9 ]5cFw`,p5=g( "r(:•+(;[AW!,,7\maA 4'x)Ԧ}j 2OGUӴulfز\̱lXDZ7WN6_&E)r"n]2GQ&Ŷ5S²žKmRUH‡&Fbw`x-IaC$l]H #I@~6JV[IXwN[K$ )bthL >"$JΡo\]uŵM9Ti a9c8ր9C/b/`խRVUV@1P rI8$xRn5;kFm%c'9#0o0{5hv7P][IA tl0(O6.w͉݅_yf(Y?.%$;Q@dxs?\M^jPO8-͐X,ıc 3msIŪiSߢ5%Y<ŕ] n0xeg5<HEH̱ƨ K0n h{Þn'y$P,pRId,{A (((((((Ww j >*n^y\A4- (H>Wxf ">^1"|L[E# ( ( ( ( ( ( ( #Iޢ)gh*'iU(ck[ڥ Ey6Xʷ4pjBE:J.:!vV|jk+θ+"hUG9`o~t=n;}kQ{;uXc [lK&u=r!Uqq!sL|?~1w[EQEQEQEQEQEQEQEQEOAWT|U"CZ*?h[Q^}U?A,x+D}bEt3?yҶ#*FQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEcE{SUpȷw֯j |EWrUx+D}bEt3?s C] ^|&t袊Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@*n^y\A5G_-?5ڟ?&!QE^ C] \G/WC7pW/+b:(aEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEP?[kW?^MQWw j nTQEzG)WG/WC7pW=?A,gJ؎(QEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEOAWT|U"CZ*?h[Q^}U?A,x+D}bEt3?yҶ#*FQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEcE{SUpȷw֯j |EWrUx+D}bEt3?s C] ^|&t袊Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@*n^y\A5G_-?5ڟ?&!QE^ C] \G/WC7pW/+b:(aEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEP?[kW?^MQWw j nTQEzG)WG/WC7pW=?A,gJ؎(QEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEOAWT|U"CZ*?h[Q^}U?A,x+D}bEt3?yҶ#*FQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEcE{SUpȷw֯j |EWrUx+D}bEt3?s C] ^|&t袊Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@*n^y\A5G_-?5ڟ?&!QE^ C] \G/WC7pW/+b:(aEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEP?[kW?^MQWw j nTQEzG)WG/WC7pW=?A,gJ؎(QEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEOAWT|U"CZ*?h[Q^}U?A,x+D}bEt3?yҶ#*FQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEcE{SUpȷw֯j |EWrUx+D}bEt3?s C] ^|&t袊Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@*n^y\A5G_-?5ڟ?&!QE^ C] \G/WC7pW/+b:(aEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEP?[kW?^MQWw j nTQEzG)WG/WC7pW=?A,gJ؎(QEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEOAWT|U"CZ*?h[Q^}U?A,x+D}bEt3?yҶ#*FQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEcE{SUpȷw֯j |EWrUx+D}bEt3?s C] ^|&t袊Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@*n^y\A5G_-?5ڟ?&!QE^ C] \G/WC7pW/+b:(aEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEP?[kW?^MQWw j nTQEzG)WG/WC7pW=?A,gJ؎(QEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEOAWT|U"CZ*?h[Q^}U?A,x+D}bEt3?yҶ#*FQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEcE{SUpȷw֯j |EWrUx+D}bEt3?s C] ^|&t袊Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@*n^y\A5G_-?5ڟ?&!QE^ C] \G/WC7pW/+b:(aEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEP?[kW?^MQWw j nTQEzG)WG/V-¶7Pe3VG/VyҶ1 Fz? Fzآf?$տG$տ[P?$տG$տ[P?$տG$տ[P?$տG$տ[P?$տG$տ[P?$տG$տ[P?$տG$տ[P?$տG$տ[P?$տG$տ[P?$տG$տ[P?$տG$տ[P?$տG$տ[P?$տG$տ[P?$տG$տ[P?$տG$տ[P?$տG$տ[P?$տG$տ[P?$տG$տ[P?$տG$տ[P?$տG$տ[P?$տG$տ[P?$տG$տ[P?$տG$տ[P/jRZD:& p>ս*?jUy\A4 >B+9O">^1"k _#+v|L[QR0((bbHA⢩LϓߠϓߠEv)yd`tKhUhMFwTq>dR:>O~>O~.#K/Z9lc6V&on^sd;>_p qmGVu}"}l]_Y>viFlX #23_? |[&A HЇV*WȮ׷4[<˛&hԓ䞔VGf B噻Zu_?PQ@Q@Q@Q@Q@Q@Q@Q@KBHe?||G\tۍCÏh .5D`NB` \w .Yv\' zQ.tttW9 ?=e(Ÿr˰]Gs}m=yU'=Ÿ}OY9e.h(EU?>xS_,<~#"y^;G퀹?/' 'x@"% qʨ`;TxS_O)A/G,КM^m5[zshdP# 2Ϲh*' zQ.t[EG[mU?>xS_Yv O)A/G'.tttW9 ?=e(Ÿr˰]}OY?>GGEsxS_O)A/G,\' zQ.tttW9 ?=e(Ÿr˰]}OY?>GGEsxS_O)A/G,w7}LG\rsɬO)A/G'] V? J_OS zQ ?=e)r˰]*!?Q V? ª}OY?>EJ_OUBxS_O)A/G,&u \[#8R;+~O)A/G']s zQ ?=e)˰]}OY?>GGEsxS_O)A/G,]OAWXxS_1d:u$_`>c/ ڷI]?netgen-6.2.1804/doc/pictures/topologyexplorer.jpg0000644000175000017500000010605513272137567020556 0ustar kurtkurtJFIFC    $.' ",#(7),01444'9=82<.342C  2!!22222222222222222222222222222222222222222222222222U" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?5 7yup4O ;2ԎS!{Tⓦm NzT0UHi׫7厮e dGa$*$]ہ#|W5r^~rυy> WUZx?AG+NG ćgN>oⵥz߇ M5D.[QIp( 9] g> Q'X,]֗hR$iDjqL4]/QŎgRI5#o$  sN|y> Q'X,[߈g[^ &{IV#~-iZƏqxVW:G./$'XR%E|,??OX»mύ5? yFI[/\n8$dFվ뚔 VQ!R"Y3H~FߧKj 89?c < +Ѵ}?SKoj%ml''fK| }+;,m#MSǻ8iƬ%.[JarυK'WM7hL7o}{b+ rl-'g@vMUU`}_OX9?c bmTWb0ZA;w۠omtRX fw'Z~֐$s^rυy> W`|*~;{˶q֡t:i:\I,r9*#|,??OXºo ih\mc:J֥2 FNGX4)%a{~HmLx0X85R H|,??OX»-DMŎ7O*rpN>xbUη"FMT(kN5$s~rυy> WSWO'Z6-2ZIJ6x="^?WkJXTFr=0g87VrH (|,??IņIvܡF`go5۽/O+)1>b(Bpy4{ZA#|,??OXº0UQ<1m`B)rw.27Z5|Xy0r 'j>ˣ"i~H6TSφJ+Ciɐ4K88iQZDWh 23lj_ub\ZYBKʥ8ll'ڥ-yO>g'Q+4?xd"iY^ڑ}y0JOX/E4 )Ldiw6['Wo.4"A*d}JKseir[%$ݬ 2~2׼1o;H2 Tpy#AEb(lRnEj">xgz{åJ ڥq67qHa鎵 X?zr¶[O2+F?^µTx?+G*g%`GN:$ӓ܇Q"Ik*;[o2N&CX9㹫sGpiR[p@.УрYؼ-scxZ0!b o-alQ ]ca`&\ī7͐qc)`ݒ):mMجIIs_yaomwq%mFI9rOV?Tx?+G*g%`U-rOn)>v# g*}wk`91ɭU;J X?@;XlVJ* ;eG>:n1E^Q ]}i4PDD,lDokȆ:u׹PBC4"]!ʒ0apIn%&o$*ѻIR0Io>=J;J ip't dG(/p`hK_Mq[w{qN. |{Tĸ!؟*2v5FAsir- rdGjiL%XTJ *OaUփ63mPD,?*Ga@/+L$N}M$2Il[y&8xb[ˬYi& HfI|ʼnYTr*X)5sR𽶡niwwgqi5Eh0GT6\QG?*|>ͨ_\G=έ)@ b((((((((((((((fJJwf$*6 w=m؟D ?k\Nqgk+fT㶸vh߯8S{3ݪda_a΢/]_jvK0d“w=#˾:WGB>:WGB#Dzs#_U/-(WwQ<'Ή[*a\ P+O<5`_ƫk:rOw4(nt,l3(G />R OsiWziQ{ %kd:l!<0f?s*2vN\Z^3>i&]l$eNTAQyuy&bWq.fkt/4dQerm/-ت[ǝ죏:E2Q.|aw7o."ңdҭ1K4L w[LF/#gM/Ax{Mծ.w`QH|b&AܛgdBXnClc_&6L}@#_OX}mv8_G*YY*`^!O ,j[[)kQT_ T %m,7Qkh:co}>:tI$w6'$skh:tucoc>:tH6 sP7]>;;}"MFx{հ8pg  C r>mF<ֺ5żV`!}3Qˡh}Ҭdط[61/W> |CX*]jƖ2L[`啷(\2nnxfdI;>ltv+b$ʑ ~a4}-'^H=*It-oUt?f1cjw&5OR}J!Q RU.m;|aCiq6odsuFb2eX!H *8 +{x$qơU 8I@Q@Q@Q@Q@Q@Q@Q@Q@Q@yXYa-D5zyXYa-D5zk&F ? ֓cMdס@MB?pBQB?pBWu/O#-}_>׍9|LlQEH¸?뺌>I=ftM2VX D088=y]syZ襠~][:njzMVR̒LY `&O/#: ԵkD4I&V; nqo+BpF'tTy̪IPORf v}hmGg*f,ǎ$$;÷ix . $yka)*vnNpXYjO^g=n 2bꭴ*YT ? h0siqhji>mNrɌ$voop8*ķ-楪ݾ݄H#U$."&YDw>M*exW^&DK43B9,) s$Kh0)Ќ6OGjiL%XTJ *OaUփ63mPD,?*Ga@ڍŞ[FrC+@ %ARr8e "P93] hYM1B] G>nc'~>źٱy||ڽ1GhZ=ϥX5<4cq#b:@5ˮ[h.qyCHpӂH nU=7ItkvK˴vJ[dg @Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@yXYa-D5zyXYa-D5zk&F ? ֓cMdס@MB?pBQB?pBWu/O#-}_>׍9|LlQEH?H&VLm4y]eU9F#qcoՍB:-e`5j{[0W*X CZ=k}siQy?č Urʧ: ϗV)#k5$B!+ 7΢xl5-ZC4=RIG3xۃm,Q@s*TԀYZd6:qսt€$[P9,Ӗ'=A9s+"g^=An *B#ZJJ/0+h<g$A-K˫4s3[y .W"hbp ApI ʧ:nn^ic9vK` aW(((((((((((( K?%膯_|T)!A~|w#Z( 泞z'"op;~k>th#֭ XnTJ+ ?!E+ ?!Ew"=_Uox*͖ET+' *E-tI熿k: ijO.OۗS]uAH@7A^\mmⷷY$qǭު8a^(^ib_}*'.mͻΕ3ngQ]t=[R5ILootUf1Ay V }3N˵!7'ZchdQaXGtH-0(\8bzrweAf&YF89- @΂]bK%K+;ae@!gi J~by08{]zMXD)!\JX X$gjGjiL%XTJ *Oa@Йn+>EEgXeIs@*=fT/H#nJ~r+!@>«^u4M6u@%ժJrN`N2Iǹ J|Q|92ZIyxDa,c$&V"6Mr۰0Tq /3h>YT.[U=jGgk>R]J ٢B*͌",v,%Ȭx$U$J_Uɬm/-|ی$,d@f͛xs}q,@p#>RBf݋.vb+b[F=ǟ; hȡyq4JS1mtM54|j'n9d W;J H"4F6Fʌ.>,QEQEQEQEQEQEQEQEQEWR~_N7Tk_Wt^k>4O MI'|u\$Ѕ|u\$ЅR"=_Uox*͖ET+' *E-tI熿k: ( Tqm.n!}MkW[US$`?naYzfk=:E%ʖH%砠;ƟŎtIԄd),K5Ty2%ռCxkGil o,$HJd3- _[NJ̞y$nWrU<SPveo{u"y%oǂ_M$jKep!>!AP6MJ^Yb\,w(loX<SX ;.Q l̼A'Ho?7:Ş5;]]?Ggυripiv: Z~dke&dLp\ ^ʧWGejO^g=n 2bꭴ*YT /Ium +1†۟gY-5KKBt6w1ʧ.:N5 ux(%!VuV#Xr8C/Qږ}iUR2܃nR!3$`I&sPPEoc۳/~ݳQ|Iӭ>&FKhaX10 6hU?tu_o\ny~޻szfo}i o iw6lfd3ɱ ~n5L2ge D Ԩm&;|6\1D ."8$wgeS_GE\iɿͻլg0Ѩi8زdttخKhLM;S-D-UbWpieG63\~#lǷg_3p_feS_G]EQ I4A$r՘Š(((((((fJJwf_ҿ BY^jI7MB򝫐Qw`à2ۜQMsggimR+^ַ&%ڒʑF,.eQ wGFXcN4;wR73GPz}|?okuNH,>_٣<#o(% 8|7.$qtpRן?ro݃^ס#_+yu]fI2H# <̨̱! T"yat/u?:]cKwJmeKڽFұ>)^ζ=?g3I?]\Iqqc4$l)&&RuOo?a,b|yg1f:ej>/h(|o^E\3uU$q;紷}>l>Zcf8i €$ӾHk2=^fZKickw ZW+p%d[LjHVtV>pw`WɯUSA{{ 4dٹP 7?R+e}k>?>G0g|1_n~:Oy^W3u)6{g1Ygc٫] rO#yݞ=kQE QEQEQEQEQEQE7Tk_W{5x/@=hhϭ BRI+ ?!E+ ?!Eze?_WnDu|[^7?": 3eQE# $_ K]syZ襠((O<5`_W?O'UZ( ayy$;qj|b aݝo=0xJη4#Dem;V 9p*P& Q3:~ϳZCw,cʻʻ̟ʂBΘ/47QIOIeq"@bH$om lI ;]́dszgJtz=x!V.LB ` %PK%İiѬ,4$6 $$d r='MTTOMBd-¢W^8gHW{J5-'MmT/WBl3h=G_;7|͛wwn]ͭVBj*Ec@[\K#ۢ^B$jXYqZAikvCb4\Np2I?H`ᢌΈȒXHzP}$WwnK`Wr8@-Ƅuoż9#`FApA棾Ԭ䴻ͷHU8SA*q7v֩xtTw+3FxpqnGjiL%XTJ *OaV "@TP0%Q@Q@Q@Q@Q@Q@Q@x/^^3q%Kƿ;OZ'&CD/Ԓy_ OQG_ OQ^/O#-}_>׍9|LlQEH¹<RA\?xkV)h(?H&VLm4y]eU9F#qvOn-.ֳۣRZl\`LNQz \iXZDO]HK Bij\Hǘʣ!<+b][:njzMVR̒LY `&O/#:ѭеe4bFw*eSuV( QI* @,ۏq(4}Z&I]Z_s "ѬYTmSGrpAgu%0um$c?gO;xӊ? h0siqhji>mNrɌ$v&>{-rI4UӌeRT@'k|izUԷw(v Yv;cm% "@TP0^='MTTOMBd-¢W^8gHW{JJm'Dhd:JF]!KAд}*U[|nA )0$an9mmⷷ8`GjQ@Po\ny~޻szfo}i o iw6lfd3؆ ˛H%bB*QB e1ZNۭ_@ceP# 0#8$g=vNNMmvg8,CIFœ#St9 K> GHVUjp$jQEQEQEQEQEQEQEQE7Tk_W{5x/@=hhϭ BRI+ ?!E+ ?!Eze?_WnDu|[^7?": 3eQE# $_ K]syZ襠(#xK[Fy1ouTI;D5V^?YZnIk{5r1: D89(#}q/qck;f}=u!,d/ KrU#c*򸭉uo2;o6Z[1H?[2I0id.A?#|x F{BSҢ'ܪOt![X*knldO&uj%} /,KFdyR.V;ͶMO7,B ,qԗ(VBf^ L˃tZ?U<ﻷwN*85åͥŢi[T;q&0OʼzP&s&O#)V*HN2IR nw^ kov |d)"S)]/i#K6T^!($ qUE81AK3:#"HTnUb zJ#@!ԦtI X˫ƆIA) $jۑz/ȶFu}.^w7C GHVUjp$jQEQEQEQEQEQEQEQE7Tk_W{5x/@=hhϭ BRI+ ?!E+ ?!Eze?_WnDu|[^7?": 3eQE# $_ K]syZ襠(#xK[Fy1ouTI;D5V^?YZnIk{5r1: D89(#}q/qck;f}=u!,d/ KrU#c*򸭉uo2;o6Z[1H?[2I0id.A?#|x F{BSҢ'ܪOt![X*knldO&uj%} /,KFdyR.V;ͶMO7,B ,qԗ(VBf^ L˃tZ?U<ﻷwN*85åͥŢi[T;q&0OʼzP&s&O#)V*HN2IR F4dIK:?%K ~b<ƐR>ሀ;9u$A VG  HB(qêME&2laQ+3$|=W6My]^42J HUUp#V.܎Gu~EZ6w]'jAQ6[0D#5 `(?hg}y^ټyyۿo]=3X74DCumi4t˻ 6Uz3d2@wcklCcoq\X!FFz(!FY2Ę-'MmT/WBl3h}qKOo&6;V HSF#bɑb:n%ij#+*5v p8 R5r ( ( ( ( ( ( ( ( *^5+I޽fJJw4O Mgֆ!x?_ $넟넟 _2G[^7?": }-}\r(syZ襮<RAEP\2%f*1FCy\VĺuMaX-٭$4i \ L^Ft<Z=k}siQy?č Urʧ: ,Q@s*TԀYZOPh762MēlD%X< +&!8K`+!3/I&:-c_*O~Ξwק~a4}-'^H=(MR}_G[9ph'$UmRʤNHՋ#?2z޽h7o_ju/-6"_2F1Bm8TpA VG  HB(q?kWo0y^vnxL?M7$[ZM72F͕^ wysw;D,HQQ2HQc&=KIuu4KìwPdg\iɿͻլg0Ѩi8زdttتvzN$ cZ ]8\0ԀM\((((((((fJJwf_ҿ BY^jIu ͌i$.D h,*Er@ɩEAu9e8 :Ltp~N Gʱ߳vnuGtM54|j'n9d W;JDԟWབ{9$ de*I[iT*A ޭ/ n'67:ՒH!6>il^=Adq|=OOqfcѨ9OOiI熿k\GMp7k[x,0D#4UE81@Ey~.zx#&OOz5q*G6m>ciߵ-Ȓ0v7sk'?=<uop L茉!KʬA`P U$w=(o4E,t-p{Lϧ%!IbYJceQW.cSXGm=&+Kf)kyfI& ,BW0'o+5\432$.*=@%Th7e{wEG%U$';n>|BGծm>$eը<0!-őHYXP65?/x,wR\YX xN0?.)eDu?f߿w8<}64|i8ێY1~UҀ=+DԟWབ{9$ de*I[iT*A ͥ-ogkrd{K `TvHWK#HC˅Vr`oֶ[X`Gitpb/7;h".хÖgw^!ԦtI X˫ƆIA) $jۑzo^Դ OүUɖpґ #L6 OOG|VH8KTP0_o\ny~޻szfo}i o iw6lfd3C|V[X< 'tTy]neRJz 1U+/ZͺwìwP\ʡF@ls@ֻ}qKOo&6;V HSF#bɑbV% GHV.PF.:` ɺj+~s7G~.zx#&Ѩ9OOiF?=<t}秂?n=\GMɺj+~s7G~.zx#&Ѩ9OOiF?=<t}秂?n=\GMɺj*^5+I޺\GMoC]oZ׊e ڄ֓yzcI1cʞN(ag7$h `~$u^|\3Hxʜ/<1ڶҴPAH27cZ [;iX>a>Ԅx_ OQG_ OQ]c?ȏ׌_]rt2806cY^ CV|?^\qqnM!3J/-5R&y$'Q % .Il+_>_WuIOgRU"q t׶6_Zum&7$66Gkg;rz .ZL6NJe%p)#$F,vZAquog%\$#FJ-p7o^jVi}kմ Fʞ £Jӥ䰵{WdwM Qy>2j7Z^Vj0ˌ)i#FA+F3u>#-!խl/ʢV48т A OK4 IIP2WP2yU/t='R쮣Q3 9r@\`4~e][ln%Y̆-̍wۇ) x[i6ڔOku"Fk$v!-*4yMcL/$eY.dCYTsnt9ݬ-L)ZfڰBW=(5@5H|?ԡ6Fle9gpTFO~=7_5ս˛&_5|b|-rړúdZd6Z Hn@}i ^ <͎vަ2ʗ\2!ڬJ䃹qZ+u%Em^e˘?6G@TEtQ0ἾK%ӠեL:WGB# Gx+D}bEnG/Vqf`*FQEQEQEQE7 {N3Pԏ/QTuj)5,|l9RGꠞaLw||p7+,k˛'TX!BCbIf_jZ]kN^kWϚIi$2<F)w`mzw'AG'A\^V71A[sX.VHC#ۣW2܌k"Wka{\ʊmoi~AK8ql#J9>Zz_'AG'A\gծ4O7W}4䳫>Cͻ~1zN.kv{{Ǩ[}DHUpH|6g@'AG'A^i7[x1sȢCn + %clŷWj-bZP7q,R+ơE)*;=ϓߠϓߠ8_k_m[H42,%$i~ʪhTʞXGUgqMP?serdةoFwHL0G=ϓߠϓߠZW4Be03ŲIЗ Ѯ@#&n5/hry76M+ ѩ'=(kϓߠyAqq#I43wڴ¿-6 ( ( ( ( ( (܁7>oyƍ/x%Z/' ?*!?V^1"k_6[QR0((((L_GS:䯵-Fyn#b9[2AoFPNpp+xLu)xw7/oK dK!99Sˎ+Np`r'_%q*CqdrA{3XiQ,RimO1b̛pX#`OJa-N]a;@u #8>?"}̏R+>8.Hh#*I 'hzLKe2Ӳ[2ȭ]3<fi[s`Fa utlc RPc^G .!x8b`!b)1p+NS[zs ȡF@`FpO>4:]N-NK WvGtЩ |=ϭqw7gmơW:${!UEMa5Yͼ< KZv6SiIm''P3"s/ߟmA>g>w7\>,ՆaAm=J\!2crҵu}"SWXo 5]CpHV)eakl+K *5rp : OooE J8PpJv? b+"ݧCjآ((((((ľ:WGB>:WGB# Gx+D}bEnG/Vqf`*FQEQEQE>4NN)vG=D?Q#W6my_,s3׀qER5}\AwtmbN!Tol/pĀ TTZWV=A̱Remaw3nr~Rh"Z??'vO'3ErL[]9x|»D#ߜjH(Cܻp7|~PBg ' ?'˿.bYn"bb (w9¯?'oko9@֒x{PL^kǞ2l棏u졝.R-n$Pe07Ʈmšc75 o [j% snRT~A*9 ӵ Mt7#(m 2q.v\眯M?7 m(E}m&o[E$MY$y8`|BO a\YK;D|/ >i` c75~&6};I{M<țAl0R)`%4ƱwHʪ8GVG̤0K~&}wr3u%kۣo`'l db! $ E6]#5OKo$i3VX–BGyzXc75~&ZX/.QSC`DcAm#vߺյԯɧ\JJ(_a@|'tM?7 m(ex-=su.%G\eH ıo;o.-5x5}RYkTwKfv2wr~nPoG^];1Xony%O{Nӡ^vGk\wK#HÀ8˜{ce}wr~nPAX _"_~&iz[5],jfLOJյkT/dўI"yWڊnts 5|F%Bv 9U*yҸij7IH`U%Lf]7^k^{}nO󡹚ل J2x9 \('u_QWUs_מT}2|wuhDf<1 w\W96%jKe2 7+C VdݴWZDqC$P24@Q$2T8̖\kw_[HvJo n:w4%X\\YZMt$FN\9'}jA{}i=|',x?IҴ5FֲJc<1F8s@U'['RK|Оw3ӧ5~"%t簅ItHbF?2Oq@tTpO ռwʡ6 dGޤ(( fЭ`)E HL#5䟕V,?'G~UZ䟕f_IzEw6w{tW1έQ@OAė7Hg|4eU9$vxh6HU 0A85n((((((+_-?5Ww h><gJRB><gJRB# Gx'@>1U4ῒB[UrNI?x'@>1U='#!d)ǯ5)B:ڳEe;B sXZ'4kmZ{d[uI]e[*9<V .Pʀlgӊ;Lk:t ]#Jsl99bV ? ]]%rojbb+M v(C`mivmiM"H _-!XdFBJfBe%XqA"yPokqB/4d3s`ϛN>OjכI7_>ft}d,9+XZhPG@ٷZ̦\-)e,\{}*_jy[\n܇O-/,mwi[iPLΑT˓pII%DydjvlScڀ2|KYGZ.!Z@ld nuלg# ;[M;1oz[w$D2&YuvO T *v 1 H%pSȚ([23Dvaibdʹ5iRXɽ^;$hjk"6dWe `'eC2*nUbB:J}Ҥ ]eOu,k|2NA` ,mW֖>OXbd HsՎQEQEQEQEQEQEQEQEQEQEQEQEV?[k[|xΕ\Ѕ|xΕ\ЅKFFO|;`cQ)X#{t P xT *kэxJ}fv VE )".6P{{=.廾-d+ܻ%H8,q0hTbv#pۛ}F-FS6Le"G2l$`0SUth!`g[3L%f},`'%@ @ژ/Tk !ASQif+6yxhssm地!fʓ̋T{/6#uj77.Q#(d;[PqkwtPt Yom^k{ۻh`XG|2&H KFY^]QuM>JC+ f Q@yCs^D*M(Dg@~.>U;3(vZEF}SNmaPReygA>ye%F‡vKX-;#00-v$<"9 e2J$ &tbj?zE̶E.mma7 ǹ( I%ۂ7)6_z6, =Ighx,ʲwWlc8USgM"/[euiYpdv O\T.)md)klR6,XI;Q HJyI9HԻѝ<*XI\l -/--'In\[J 2Jc@:+xVHIݑ#2TY#š@xwNhfRbb6@ oMquIfmo'x36Ue<098'!CkYw$ igXFҪAS H7Stk}R$9cK'{g;/mM}NPk3RD:)Lr SxY^jCPnaռhI^`wJdvmm+%u67i^D1K*0r= v%RǨ$߷|<WVV}ZDz$%$1$ĒI$MOEPEPEPEPEPEPEPEPEPEPEPEPEPEPX*nlV?[k@YC:WrBQC:WrBWu/O=?Үc,(&ÿ?JoP:&@ߎ9|LlKR'ܩ HEdE[i.&kuM,gR a 'v QU\wXlnl[De>Q;F=~2nKY.,R*aEi Tcdd*KH΋Qjw;92rT}mVַVRHbʊ*f H,;A#p$c$sx:MW]J4AR+d1dį_t 'QЮ>jOѐďpotWVtKSP¡,v aB[˨-;H|\}Yڨ[7m.[ J"XOE;B3ZYBj?ji$dX0F(xynRkL?buK$~>Ǻ3y|ܽ3zu$K,GTC*FQ݆xUe*IA\+OF:tZ-B4<\GZG4d_* e{7 I]{ԁq@Yյ[ydVf8ēCgݟ\FhjMsI^ndo\ Fq/;zZ\{.nWKP'g(eI̸m`!D㴆+]QEQEQEQEQEQEQEQEQEQEQEQEcE?3)?!E?3)?!EwR#Ѽ *kO|;`c9|LlQEHŠ((((( S?sM?J?*:??/3{M%/mJY2I+ !I+չv~:ѯ|L2͒o6#Ho_,9qfESw.??OAxW^4FoSrNܦЬ& Jc~F2F1 ?sM?J?sM?J宼mce6;ij ;IQ?Ǔ k|BҵHlJ%[WqILCSp~N2sM?J?sM?JRk{T3B!eilAmph Ŕ4xHצѭx,QsCic ^0M~GU߽R@:OҏOҸ/r}R4Ի<.um,.]xNԮau]sJ1}а;[rf tGs=%)`U=_@'hkKYpgjjE\(((((U"CZجȷwր>?JStz6}}y ^_^#MMKD.vۼrO Bl?ox7(玩x€4э{,zI ɛQ5,Bog,l@;9mA )S#cbKrI=玩xox7(i|myOKӮP43H6,đvvLO8bs{$b_9$w7ܤ˧+fTGnN3Pue{o ֖ܴ*[C \䂀QWj^]%,aek#- rF܋sl "on .MG Qi6rH#31$&MGl?P( ( ( ( ( ( ( (h@KoG/[[ =h@KoG/[[ =w w{U[խEx/[[ ?z7Qf=/^%oϰs+Ŀz7Q c>h@KoG/[[ =h@KoG/[[ => endobj 8 0 obj (Getting Started) endobj 9 0 obj << /S /GoTo /D (section.1.1) >> endobj 12 0 obj (What is NETGEN) endobj 13 0 obj << /S /GoTo /D (section.1.2) >> endobj 16 0 obj (The history of NETGEN) endobj 17 0 obj << /S /GoTo /D (section.1.3) >> endobj 20 0 obj (How to receive NETGEN) endobj 21 0 obj << /S /GoTo /D (section.1.4) >> endobj 24 0 obj (Installing NETGEN) endobj 25 0 obj << /S /GoTo /D (subsection.1.4.1) >> endobj 28 0 obj (Installing NETGEN for Unix/Linux) endobj 29 0 obj << /S /GoTo /D (subsection.1.4.2) >> endobj 32 0 obj (Installing NETGEN for Windows) endobj 33 0 obj << /S /GoTo /D (subsection.1.4.3) >> endobj 36 0 obj (Adding IGES/STEP file support via OpenCascade) endobj 37 0 obj << /S /GoTo /D (subsection.1.4.4) >> endobj 40 0 obj (Testing Netgen) endobj 41 0 obj << /S /GoTo /D (chapter.2) >> endobj 44 0 obj (Constructive Solid Geometry \(CSG\)) endobj 45 0 obj << /S /GoTo /D (section.2.1) >> endobj 48 0 obj (Curves) endobj 49 0 obj << /S /GoTo /D (section.2.2) >> endobj 52 0 obj (Available Primitives) endobj 53 0 obj << /S /GoTo /D (section.2.3) >> endobj 56 0 obj (Surface Identification) endobj 57 0 obj << /S /GoTo /D (section.2.4) >> endobj 60 0 obj (Known problems and work-arounds) endobj 61 0 obj << /S /GoTo /D (subsection.2.4.1) >> endobj 64 0 obj (Interfaces) endobj 65 0 obj << /S /GoTo /D (subsection.2.4.2) >> endobj 68 0 obj (Degenerated edges) endobj 69 0 obj << /S /GoTo /D (chapter.3) >> endobj 72 0 obj (Other Geometry Formats) endobj 73 0 obj << /S /GoTo /D (section.3.1) >> endobj 76 0 obj (Using IGES/STEP Geometries) endobj 77 0 obj << /S /GoTo /D (section.3.2) >> endobj 80 0 obj (Using STL Geometries) endobj 81 0 obj << /S /GoTo /D (section.3.3) >> endobj 84 0 obj (2D Spline Geometry) endobj 85 0 obj << /S /GoTo /D (chapter.4) >> endobj 88 0 obj (Mesh and Solution Formats) endobj 89 0 obj << /S /GoTo /D (section.4.1) >> endobj 92 0 obj (Mesh Size File) endobj 93 0 obj << /S /GoTo /D (section.4.2) >> endobj 96 0 obj (Neutral Format) endobj 97 0 obj << /S /GoTo /D (section.4.3) >> endobj 100 0 obj (Fepp Format 2D) endobj 101 0 obj << /S /GoTo /D (section.4.4) >> endobj 104 0 obj (Surface triangulaton file) endobj 105 0 obj << /S /GoTo /D (section.4.5) >> endobj 108 0 obj (Solution File Format) endobj 109 0 obj << /S /GoTo /D (chapter.5) >> endobj 112 0 obj (Netgen operations) endobj 113 0 obj << /S /GoTo /D (section.5.1) >> endobj 116 0 obj (Command line arguments) endobj 117 0 obj << /S /GoTo /D (chapter.6) >> endobj 120 0 obj (Using the Graphical User Interface) endobj 121 0 obj << /S /GoTo /D (section.6.1) >> endobj 124 0 obj (The Netgen menu items) endobj 125 0 obj << /S /GoTo /D (subsection.6.1.1) >> endobj 128 0 obj (The menu item File) endobj 129 0 obj << /S /GoTo /D (subsection.6.1.2) >> endobj 132 0 obj (The menu item Geometry) endobj 133 0 obj << /S /GoTo /D (subsection.6.1.3) >> endobj 136 0 obj (The menu item Mesh) endobj 137 0 obj << /S /GoTo /D (subsection.6.1.4) >> endobj 140 0 obj (The menu item View) endobj 141 0 obj << /S /GoTo /D (subsection.6.1.5) >> endobj 144 0 obj (The menu item Refinement) endobj 145 0 obj << /S /GoTo /D (section.6.2) >> endobj 148 0 obj (Meshing Options) endobj 149 0 obj << /S /GoTo /D (section.6.3) >> endobj 152 0 obj (Visualization Options) endobj 153 0 obj << /S /GoTo /D (chapter.7) >> endobj 156 0 obj (Programming Interfaces) endobj 157 0 obj << /S /GoTo /D (section.7.1) >> endobj 160 0 obj (The nginterface) endobj 161 0 obj << /S /GoTo /D (section.7.2) >> endobj 164 0 obj (The nglib) endobj 165 0 obj << /S /GoTo /D (subsection.7.2.1) >> endobj 168 0 obj (Introduction) endobj 169 0 obj << /S /GoTo /D (subsection.7.2.2) >> endobj 172 0 obj (The Header File) endobj 173 0 obj << /S /GoTo /D (subsection.7.2.3) >> endobj 176 0 obj (Types and Constants) endobj 177 0 obj << /S /GoTo /D (subsection.7.2.4) >> endobj 180 0 obj (Initialization) endobj 181 0 obj << /S /GoTo /D (subsection.7.2.5) >> endobj 184 0 obj (Mesh access) endobj 185 0 obj << /S /GoTo /D (subsection.7.2.6) >> endobj 188 0 obj (STL Geometry) endobj 189 0 obj << /S /GoTo /D (subsection.7.2.7) >> endobj 192 0 obj (Programming Example) endobj 193 0 obj << /S /GoTo /D [194 0 R /Fit ] >> endobj 196 0 obj << /Length 154 /Filter /FlateDecode >> stream x-̻ 1~b8L QXpSbPP|upߔn0P|Yआ\vy+Fϥ:txbLƻMx:ՒHMm$q%qnqjdi1].- endstream endobj 194 0 obj << /Type /Page /Contents 196 0 R /Resources 195 0 R /MediaBox [0 0 612 792] /Parent 201 0 R >> endobj 197 0 obj << /D [194 0 R /XYZ 86.4 708.045 null] >> endobj 198 0 obj << /D [194 0 R /XYZ 86.4 688.245 null] >> endobj 195 0 obj << /Font << /F16 199 0 R /F17 200 0 R >> /ProcSet [ /PDF /Text ] >> endobj 204 0 obj << /Length 55 /Filter /FlateDecode >> stream xs w34W04Գ455RIS040гP07301UIQ0Ҍ r g endstream endobj 203 0 obj << /Type /Page /Contents 204 0 R /Resources 202 0 R /MediaBox [0 0 612 792] /Parent 201 0 R >> endobj 205 0 obj << /D [203 0 R /XYZ 100.8 708.045 null] >> endobj 202 0 obj << /Font << /F17 200 0 R >> /ProcSet [ /PDF /Text ] >> endobj 237 0 obj << /Length 983 /Filter /FlateDecode >> stream xXMs6WH >#+nS'3b&D%L$CN__)a]͜@"o]R_"!2`TD8"QQFs ,~߂0 V%` QTj'9#`edcT'ⷁ6($R2o{! tVrq' esZ !.ǘQ\lխM}s :_y-ڨwAq2t2s>8FZ1@=!?KMwrZW/?ad<9*}%[<(1bu*o}2w\mw{ԍ_?zBkYFEEDEQUsTkLa>gS` Y`ۢ54Xaƪ?;]˥bo>d$X-؃sL8> endobj 206 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [85.403 525.388 198.113 538.007] /Subtype /Link /A << /S /GoTo /D (chapter.1) >> >> endobj 207 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [102.962 512.516 227.606 522.81] /Subtype /Link /A << /S /GoTo /D (section.1.1) >> >> endobj 208 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [102.962 494.994 259.802 507.614] /Subtype /Link /A << /S /GoTo /D (section.1.2) >> >> endobj 209 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [102.962 482.122 262.334 492.284] /Subtype /Link /A << /S /GoTo /D (section.1.3) >> >> endobj 210 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [102.962 464.6 234.76 477.22] /Subtype /Link /A << /S /GoTo /D (section.1.4) >> >> endobj 211 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [129.886 448.739 353.992 462.687] /Subtype /Link /A << /S /GoTo /D (subsection.1.4.1) >> >> endobj 212 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [129.886 434.207 340.89 446.826] /Subtype /Link /A << /S /GoTo /D (subsection.1.4.2) >> >> endobj 213 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [129.886 418.345 429.829 432.293] /Subtype /Link /A << /S /GoTo /D (subsection.1.4.3) >> >> endobj 214 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [129.886 403.813 246.788 416.299] /Subtype /Link /A << /S /GoTo /D (subsection.1.4.4) >> >> endobj 215 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [85.403 375.745 319.579 389.693] /Subtype /Link /A << /S /GoTo /D (chapter.2) >> >> endobj 216 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [102.962 363.537 167.062 373.699] /Subtype /Link /A << /S /GoTo /D (section.2.1) >> >> endobj 217 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [102.962 348.34 235.503 358.635] /Subtype /Link /A << /S /GoTo /D (section.2.2) >> >> endobj 218 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [102.962 333.143 240.805 343.438] /Subtype /Link /A << /S /GoTo /D (section.2.3) >> >> endobj 219 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [102.962 315.621 313.773 328.241] /Subtype /Link /A << /S /GoTo /D (section.2.4) >> >> endobj 220 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [129.886 302.749 218.499 313.044] /Subtype /Link /A << /S /GoTo /D (subsection.2.4.1) >> >> endobj 221 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [129.886 285.228 264.187 297.847] /Subtype /Link /A << /S /GoTo /D (subsection.2.4.2) >> >> endobj 222 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [85.403 257.824 254.788 270.443] /Subtype /Link /A << /S /GoTo /D (chapter.3) >> >> endobj 223 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [102.962 241.963 290.673 255.911] /Subtype /Link /A << /S /GoTo /D (section.3.1) >> >> endobj 224 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [102.962 227.43 248.33 239.917] /Subtype /Link /A << /S /GoTo /D (section.3.2) >> >> endobj 225 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [102.962 212.233 236.173 224.853] /Subtype /Link /A << /S /GoTo /D (section.3.3) >> >> endobj 226 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [85.403 187.154 267.959 197.449] /Subtype /Link /A << /S /GoTo /D (chapter.4) >> >> endobj 227 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [102.962 171.957 206.238 182.252] /Subtype /Link /A << /S /GoTo /D (section.4.1) >> >> endobj 228 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [102.962 156.76 211.701 167.055] /Subtype /Link /A << /S /GoTo /D (section.4.2) >> >> endobj 229 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [102.962 139.239 216.578 151.725] /Subtype /Link /A << /S /GoTo /D (section.4.3) >> >> endobj 230 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [102.962 124.042 255.117 136.661] /Subtype /Link /A << /S /GoTo /D (section.4.4) >> >> endobj 231 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [102.962 111.17 238.529 121.464] /Subtype /Link /A << /S /GoTo /D (section.4.5) >> >> endobj 232 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [85.403 81.441 212.861 94.061] /Subtype /Link /A << /S /GoTo /D (chapter.5) >> >> endobj 233 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [102.962 66.244 263.636 78.864] /Subtype /Link /A << /S /GoTo /D (section.5.1) >> >> endobj 238 0 obj << /D [236 0 R /XYZ 86.4 708.045 null] >> endobj 240 0 obj << /D [236 0 R /XYZ 86.4 556.113 null] >> endobj 235 0 obj << /Font << /F22 239 0 R /F17 200 0 R >> /ProcSet [ /PDF /Text ] >> endobj 261 0 obj << /Length 673 /Filter /FlateDecode >> stream xݗKo@^mUK&… XQ^{l `tXl]|uݧ:[)Y?lM &B8xB"3 -{nnqo[֨qVi6 #%*/yd/V.Y)*\`/ĤBŸ(b2ÂiWi+xGJ#IHG(0L e@t%2R#U;J-L5e3Fq 8&ܢbB5p$h1wE҆Lm Q٭m@8vCdW0Pk@#><$N&F)qBc k[KoYNמLH6 *E)Q}셶yK.r+vؠ/˪e )E'+Z$;nTJ*66N j3?:)>OUJ`2xCCmO޼WUEF 9&R"rP@lg2_]ItHoUWP endstream endobj 260 0 obj << /Type /Page /Contents 261 0 R /Resources 259 0 R /MediaBox [0 0 612 792] /Parent 201 0 R /Annots [ 234 0 R 241 0 R 242 0 R 243 0 R 244 0 R 245 0 R 246 0 R 247 0 R 248 0 R 249 0 R 250 0 R 251 0 R 252 0 R 253 0 R 254 0 R 255 0 R 256 0 R 257 0 R 258 0 R ] >> endobj 234 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [99.803 672.969 326.236 685.589] /Subtype /Link /A << /S /GoTo /D (chapter.6) >> >> endobj 241 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [117.362 658.523 269.252 671.143] /Subtype /Link /A << /S /GoTo /D (section.6.1) >> >> endobj 242 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [144.286 646.402 285.593 656.697] /Subtype /Link /A << /S /GoTo /D (subsection.6.1.1) >> >> endobj 243 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [144.286 629.632 315.251 642.251] /Subtype /Link /A << /S /GoTo /D (subsection.6.1.2) >> >> endobj 244 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [144.286 617.511 292.627 627.805] /Subtype /Link /A << /S /GoTo /D (subsection.6.1.3) >> >> endobj 245 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [144.286 603.065 291.432 613.359] /Subtype /Link /A << /S /GoTo /D (subsection.6.1.4) >> >> endobj 246 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [144.286 586.294 323.252 598.914] /Subtype /Link /A << /S /GoTo /D (subsection.6.1.5) >> >> endobj 247 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [117.362 571.848 233.224 584.468] /Subtype /Link /A << /S /GoTo /D (section.6.2) >> >> endobj 248 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [117.362 557.403 257.286 570.022] /Subtype /Link /A << /S /GoTo /D (section.6.3) >> >> endobj 249 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [99.803 531.251 261.383 543.87] /Subtype /Link /A << /S /GoTo /D (chapter.7) >> >> endobj 250 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [117.362 516.805 226.269 529.424] /Subtype /Link /A << /S /GoTo /D (section.7.1) >> >> endobj 251 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [117.362 502.359 195.704 514.978] /Subtype /Link /A << /S /GoTo /D (section.7.2) >> >> endobj 252 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [144.286 490.238 247.791 500.533] /Subtype /Link /A << /S /GoTo /D (subsection.7.2.1) >> >> endobj 253 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [144.286 475.792 267.137 486.087] /Subtype /Link /A << /S /GoTo /D (subsection.7.2.2) >> >> endobj 254 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [144.286 459.022 292.538 471.641] /Subtype /Link /A << /S /GoTo /D (subsection.7.2.3) >> >> endobj 255 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [144.286 446.9 249.092 457.195] /Subtype /Link /A << /S /GoTo /D (subsection.7.2.4) >> >> endobj 256 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [144.286 432.455 245.385 442.749] /Subtype /Link /A << /S /GoTo /D (subsection.7.2.5) >> >> endobj 257 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [144.286 415.684 260.392 428.171] /Subtype /Link /A << /S /GoTo /D (subsection.7.2.6) >> >> endobj 258 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [144.286 401.238 302.094 413.858] /Subtype /Link /A << /S /GoTo /D (subsection.7.2.7) >> >> endobj 262 0 obj << /D [260 0 R /XYZ 100.8 708.045 null] >> endobj 259 0 obj << /Font << /F17 200 0 R /F20 263 0 R /F22 239 0 R /F32 264 0 R >> /ProcSet [ /PDF /Text ] >> endobj 268 0 obj << /Length 1510 /Filter /FlateDecode >> stream xڍWKs8 WxzYyzZRocgILL=0m%-IM/ ('hgz1AA<>ПwuLMğIpInNr򗳬X$věM4.֢ٓV3yzL|8@Y>{^\m.?A\.?64 sɯn7$p69w$oi1 }b~~ n%tәP1M Ef_6s0pc/"#Vqf VصwL8*xִݵAb`JrNd)Q`KCvȍ" p؇Ƞ9o`'oJL62)"M)ŽDV'pn.n\"4E 7&Uisêۆ9v/}(tEDj&P(AXϐ9.?|@sj$|&.' mj|C<8`!#Ia]W2K9,)"Z>c=՜ئ}#~oȁ5NAє-J$Y:. ٘E2Wp57NĩOJ A1(jR gD \KVr ?q/@ㅓB4]51/2EkU!MbI'3 p2RɮBwopwa#(~q>&|px/^]@CiZCC?*94d[^-gVsJ3ˡ#q7dI7D5? Z`?і 9 N \ %A!RmA`Lƈ{ړsBtT2q g9$5^4qD#\l^fp@# @IL`njf.P5`cȱFf*r:#+/4q0egY]LCpSX[fpKӖN#>ۏ0L(h[w(QHswaĹ $rMLj\ .xRL=t($jS܊@ܾVT`R 3I yXM,`LHpB)xPNטԩp E9r$s=?Kǣ;\VL#t`WuC(tG[Dh % ~- {y`'Q!Ɓ}!Aa3hj22o*d xdj۾Gf6v~ֿt3$kCta=м21 DFox2E%})j IdFy YFnzwD%[[$(4{6ǤxܢzgVXg?㯱1A n*UQpʣfl=|ޘ@`)AN`XiO1ޭwp endstream endobj 267 0 obj << /Type /Page /Contents 268 0 R /Resources 266 0 R /MediaBox [0 0 612 792] /Parent 201 0 R /Annots [ 265 0 R ] >> endobj 265 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [437.475 301.34 445.321 315.288] /Subtype /Link /A << /S /GoTo /D (chapter.2) >> >> endobj 269 0 obj << /D [267 0 R /XYZ 86.4 708.045 null] >> endobj 6 0 obj << /D [267 0 R /XYZ 86.4 688.245 null] >> endobj 10 0 obj << /D [267 0 R /XYZ 86.4 449.482 null] >> endobj 14 0 obj << /D [267 0 R /XYZ 86.4 240.289 null] >> endobj 266 0 obj << /Font << /F22 239 0 R /F17 200 0 R >> /ProcSet [ /PDF /Text ] >> endobj 275 0 obj << /Length 1779 /Filter /FlateDecode >> stream xڕWs6 _AhQMK^t{ef#K>IRZ%^,A?oWw<qΒ pGjţȉt9 '\\p닏llGk]Mt6"]:uiV::uFqzμ͹XEVE.s-A9H[j:;sVnWdhZ#kNuerjQ{o6q[,EWu=W@FqB\D.YA%m{=1JNv578kQ[FJbVxk Xi M4++k}@cDQ蓊;r_2'()GUlH̼*ի2YrMvWCBA_~H$3rY($}{o8Ilf‘YFl)t !#qd?+6+ >?׳;]ӷvn3hUn֊fw(vI*U. w\ #z%7U)AL4?9gwuQ]hPM})&7D4?=?P G`'%ZHC~oj ((i,*[*;H.ri[[Gi'֕pDσF+g /hʕB,IReUUd!K.ꬖyÓG|Q'`~10ѐ=no[%}e OJt,)/Δ%h؊faaFg-}! @%k`ͱi\Fp8& @]Ό (0Jd lP\S9s|ι tQ03VdPogvhWk>ʸnF-s#K11E^C۠S yaXLϦ:x(=}0M*9k#K*F5_D G!c9x =SiWmߟ5d;^ X׌MuGC {T~)4@Ѡ]'Czǽk?~hMO@X@Sua7`ˁ ?k&[=YՑYH.uD@?ڠNBvPfQ@j;xw?Ad)UZSҿ%Mџ"fA\[c,ߡ3Ϝ̠"kF^HKamư$$ǖ>KeVkW-Q$%2&"l]V=K5+8kgo6nK[87GRk Ԡ| endstream endobj 274 0 obj << /Type /Page /Contents 275 0 R /Resources 273 0 R /MediaBox [0 0 612 792] /Parent 201 0 R /Annots [ 270 0 R 271 0 R 272 0 R ] >> endobj 270 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [129.068 342.393 253.713 356.341] /Subtype/Link/A<> >> endobj 271 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [129.068 304.018 268.086 317.965] /Subtype/Link/A<> >> endobj 272 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [456.148 304.018 604.53 317.965] /Subtype/Link/A<> >> endobj 276 0 obj << /D [274 0 R /XYZ 100.8 708.045 null] >> endobj 18 0 obj << /D [274 0 R /XYZ 100.8 688.245 null] >> endobj 22 0 obj << /D [274 0 R /XYZ 100.8 531.439 null] >> endobj 26 0 obj << /D [274 0 R /XYZ 100.8 452.309 null] >> endobj 273 0 obj << /Font << /F17 200 0 R /F20 263 0 R /F22 239 0 R /F29 277 0 R /F36 278 0 R >> /ProcSet [ /PDF /Text ] >> endobj 282 0 obj << /Length 1737 /Filter /FlateDecode >> stream xڭr6xzf"A3,;Zj;$%&T뻋ev҃~t~tr.}O^"? yc+>FZ`(l>%]^N/@jv=_L濞kW`l "qQPzmZٺВo+*-!pv!FdE Gi/#'. 䎵,*d4WfnTD0OrS!Q0|mAKp"'pU[ܔ-wy?ƣ:f|q")PMPui`[{+輮[|rnΠu ~_6?6_D^lWv24:ĵ^ 횚6lEZVBThp#hqvQ#$׭Hu'a>{ٽZJ34xr3h1c=I]P=u-ۗxnw IlC D DhD\DqcV"݌(h2?|$`{y X鈫Xx Im- lsқvt ~ t ߒgW ȟ^PAk_/*(Q!3!z6xl{.䉒v}?` P8Oо$%rBh6m7rEA ͗1ۮg`j2{K }{Mv$r3;~3IvC*ЉRVs  8M$GM !A lk"x:"jKgG'ɁI 4T\(cuhBCB9Oof芔֗n] \~\"˿ݚۚhn- yyyk_-OB $!I WcBhߎXV}rl}nH"A]6P,[lBi! .Zbỉ] ~(ziY=]Vgn- "tUl]p )s(@.Cm_EMh=eM_!*NW'g,2]StuS@5d;ݩm7d!};׍iqG [g2Mڹ+.(bDh 7MWKsE6,t6ŀ)Kڏ4^w}jX7oD5ur/!ߜW Fx%R6@~ Þkݗ U ߣ ~;q/nTa~$ endstream endobj 281 0 obj << /Type /Page /Contents 282 0 R /Resources 280 0 R /MediaBox [0 0 612 792] /Parent 284 0 R /Annots [ 279 0 R ] >> endobj 279 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[0 1 1] /Rect [230.044 506.635 379.727 520.582] /Subtype/Link/A<> >> endobj 283 0 obj << /D [281 0 R /XYZ 86.4 708.045 null] >> endobj 30 0 obj << /D [281 0 R /XYZ 86.4 688.245 null] >> endobj 34 0 obj << /D [281 0 R /XYZ 86.4 606.178 null] >> endobj 38 0 obj << /D [281 0 R /XYZ 86.4 392.77 null] >> endobj 280 0 obj << /Font << /F20 263 0 R /F17 200 0 R /F22 239 0 R /F36 278 0 R >> /ProcSet [ /PDF /Text ] >> endobj 287 0 obj << /Length 113 /Filter /FlateDecode >> stream xM10 @=hum$f,*G@ ?DgmR *MeW DW\ߙf^A6s> endobj 288 0 obj << /D [286 0 R /XYZ 100.8 708.045 null] >> endobj 285 0 obj << /Font << /F17 200 0 R /F20 263 0 R >> /ProcSet [ /PDF /Text ] >> endobj 292 0 obj << /Length 1796 /Filter /FlateDecode >> stream xڥXKo6W,2"EѠpIezv~}g8]hHp跛Wo eyW7U2REʒ<_lW_˽>]oLEbUڨ\MP:ᑡMe4`ۧpY,*7yJ ?#" Nddm״{rG4Ma#p< Q\ϮÜAWgUoi`v8}dR$gmM%i5_rAE{O 5Ck{[Bt&L+C{gicO xߴ 3TNd^̅3&A--AW欀zbI8>+8âohffRD4\ 3L}lʧSĕ([d7ۂwW^H>o,=L"}1(HȰ8j zOˣn؛Vh7:OKz{@"[[[$8,<@bbK ,xZftb P\ym\1q>?IqM I*:_WP ?*9ǭ$VϽǴۯZ{pޛ/+K'O:Wq~ f9J_n$;UޫW endstream endobj 291 0 obj << /Type /Page /Contents 292 0 R /Resources 290 0 R /MediaBox [0 0 612 792] /Parent 284 0 R /Annots [ 289 0 R ] >> endobj 289 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [126.374 401.959 143.325 412.121] /Subtype /Link /A << /S /GoTo /D (section.2.2) >> >> endobj 293 0 obj << /D [291 0 R /XYZ 86.4 708.045 null] >> endobj 42 0 obj << /D [291 0 R /XYZ 86.4 688.245 null] >> endobj 290 0 obj << /Font << /F22 239 0 R /F17 200 0 R /F36 278 0 R /F32 264 0 R /F26 294 0 R /F24 295 0 R >> /ProcSet [ /PDF /Text ] >> endobj 298 0 obj << /Length 1510 /Filter /FlateDecode >> stream xڵWݓ6L_d@@ڙ܃JjZʋ-J߮^͓@PK З,r5 D([:j<\=;>0+@$<بl1`R: @:Mչ[@ eI|H}c<"hG)lJi 'H7H _ue0vz2-}2NBAiefPMܧ҈U7Y = .;m(JZOE eqb}P1!fAҶ{A-( Ry %6ّA<{4eFa)]7d :܊-U46űhZзYp[rlS8v^F'[DoŜĥ 8UA} uv”VIz jp#)}7IrHnlJSDHjw6^oYVeWReŮSb| RKE|xz$>(L!ٸoHJcb@i>#[z[tqԫp {v98E2J`nn!J5*O#*wDCk 5;Jc Js w?]z}c;}6̾HqCIL4;Wa~[(&JC)+s?Вx endstream endobj 297 0 obj << /Type /Page /Contents 298 0 R /Resources 296 0 R /MediaBox [0 0 612 792] /Parent 284 0 R >> endobj 299 0 obj << /D [297 0 R /XYZ 100.8 708.045 null] >> endobj 296 0 obj << /Font << /F17 200 0 R /F20 263 0 R /F36 278 0 R /F26 294 0 R >> /ProcSet [ /PDF /Text ] >> endobj 302 0 obj << /Length 1956 /Filter /FlateDecode >> stream xڵYKs6WVjDg'=n/I4EIl)R%)w 0$Ů\D`7Ћ'O߈h9˴*Z%Q"WW@0aP^-62teiV 2O[T͎ǮS_RS~jJ+Դb{fV!WLNEú4:lסVe1~"o0=:zԭ}id,}HdLeNĮ~+Rf& M\HkSF;rtAm \xiF,gWkhHn3ҭ@L1 U/ ςQ6]˙pFnh JҚ8Y10,tEnE:>FE~ac ?'oXEJmm)@ҮVKpp}nxDP;[/OZr`=@Ni)eA;t#D2rJU8opm٫f4I$@=PgUXM [F] yA :v{U" З_`a$@O@ž]фSÖ= j74e&l}}7]>TW6` 1R:,xNLue;~Gm{LEW)W.?Xw[: MΞJ.Ƙϖũ|Oo;5a:\,\O-f V\Hpӟ)Y4"Φt:K=I^cV'7i} F1!ղb z wg7-KS5;y.bjGWM:fAga.Ue7#>Ar};ݣMJ~`<ި{KY \M#y=X8 1(emEl/: >6Ѻώ z&#GKSFW"z+&%gLRϘ+cx:h 4|.^ܳ$h06"R=XA =;] Qp`G5e\ +\g͗F"B$A{&ALSy N %:D-\]{ntZhvafu K> endobj 303 0 obj << /D [301 0 R /XYZ 86.4 708.045 null] >> endobj 46 0 obj << /D [301 0 R /XYZ 86.4 382.692 null] >> endobj 300 0 obj << /Font << /F20 263 0 R /F17 200 0 R /F36 278 0 R /F26 294 0 R /F22 239 0 R /F24 295 0 R /F27 304 0 R >> /ProcSet [ /PDF /Text ] >> endobj 307 0 obj << /Length 2200 /Filter /FlateDecode >> stream x[o8~_Gojez.md[Ms$C&?8$%K Ȏ\b$f͐W (̮>p"5B!㳫C߿펊 Yh_./(A$xW͉ /w=c[><|g}V)m NPf nx]qеc;c&>iQcnb|/r R} qIf czD 1tHpdD;|*Z.'}vQǑvy=x1z:cS :aψ!XB׋wM-f!EV#l-\߃W_c D0A8]g|Maw;\X?__-$עSBc˛OlNIQmdop|(4bAtD|_-5pTÄ|2UyLDgxP@akZ;`;xJr)|I?GL#=.n84=qڦ㿣9NT7Nt,`aǢŢPoo"qi鵫p]\p領_׃f|Wq)MG 'ɅEj6EH"1誄&f]=6\C+纊'h0NTh0N0Ѐ>Xa궎?Y0H6t[+ ȅI;}&:?z֢/L'"L8u,͹ Hjtq GU^x!vTq@2Oa/ LM^/:Ԝvnd>zфzYS_6t;QF)ѝG|bk@]B ӝWy9NTm:c~,C>a`˃>֥cYDm֍j(5Qy8J8$%-R7c.6Ϫ>MbM'Kz~BޤՅSBtZt\ybUz4$H-N 12}=‹w eoЧ|=gG$wAyAB\E0M,`ZU;{O}Jmsl/+s5S ǸJP0L7ju=R8OU)Ȁ̡ "qwL"B}q3WEu­Ws]d?Y rMX2 endstream endobj 306 0 obj << /Type /Page /Contents 307 0 R /Resources 305 0 R /MediaBox [0 0 612 792] /Parent 284 0 R >> endobj 308 0 obj << /D [306 0 R /XYZ 100.8 708.045 null] >> endobj 50 0 obj << /D [306 0 R /XYZ 100.8 552.36 null] >> endobj 309 0 obj << /D [306 0 R /XYZ 100.8 500.694 null] >> endobj 310 0 obj << /D [306 0 R /XYZ 100.8 421.077 null] >> endobj 311 0 obj << /D [306 0 R /XYZ 100.8 356.925 null] >> endobj 312 0 obj << /D [306 0 R /XYZ 100.8 307.219 null] >> endobj 313 0 obj << /D [306 0 R /XYZ 100.8 243.067 null] >> endobj 314 0 obj << /D [306 0 R /XYZ 100.8 166.019 null] >> endobj 315 0 obj << /D [306 0 R /XYZ 100.8 100.318 null] >> endobj 305 0 obj << /Font << /F17 200 0 R /F20 263 0 R /F36 278 0 R /F26 294 0 R /F24 295 0 R /F27 304 0 R /F22 239 0 R >> /ProcSet [ /PDF /Text ] >> endobj 318 0 obj << /Length 2237 /Filter /FlateDecode >> stream x]o=B 'w p -Z^>"cI,)RY Ep5;;3;߳i`1rr+ڬ_dSZpɻ_ud׿^o{ჰs*w,=IesTi2B0kMW>S#tNYnȡ(vebdLR+zaj)1NÁoM/&8ˑ u~7~(>ʼݷRe.T&8*eRi9>Oװ*AHꞾe T%ެH[}j.C(|j%pfwh{")3J*UhlaYtɈ4o V7( \dұ<UCH &Fd fu]ӍxLF"; *OC?捿Nl{=JU] Z;|~h>K"v@h?{xt e,"o  = . /] RuYW p<^Hg^\nw ܷ}$?{D/0 3bZoGA+rU ݒب h#AQȍ&pHSD9]a0p*3+Rc)޹k=#”#VOk 䇾F!?0(CZD:Tu[ c_TyeK\y~:G7țV N>AȟCG`ħ|}1^0]ǚrqwU l>J[.1qJ>`F3UM5ːRU];H>gI/Vr$UAq&4D'cτtG3T4CSX `JHcZv*,?feoS܈ ӃLICLIhfYr{ a8"BaY\r<֡hT(8yy>e\h.,).E`}TZ4P\˄cH$Xӝ D`dؑ4bA9 G!'.Bc'μStc]. ~L˺}U+̢FrR1nm&ysF,|m's X +>ia&bd 㙽-S5ê\chD0&*ìšoψWq9o[9Yu +zO'e-@Ok(6Qax H?hmO%^M~Dӽ,f4Z:Otً+`\x{T&.L-A/ͰQ H8F2+ M~W: ]i(!e1B֤6IņzC݄75uڏ4g!E;@ǔ:>f*#3^F$i:Q6ǽZ p2i ŭO2AS8SkZq}m Z<"tS^LL#"MT N1Ly: M:0.a.ߒER\EW}eAV)H $23Mf^Х&Qeij3az+ǧy0S2aXe}eoۺ!!TC>9|j`WM1c?TwsJ)SrRr,Eo`}pGj/> 6@'C]'B1oP'cŸR7kO2/س6_OӫPtg㓐jFNYiGYH=ly)aO̚3:3s' y^ XjXFsz|s+q&|4.P.V2ɀ7uɩASCG|(>Lx[ BB{y}_K-x] endstream endobj 317 0 obj << /Type /Page /Contents 318 0 R /Resources 316 0 R /MediaBox [0 0 612 792] /Parent 323 0 R >> endobj 319 0 obj << /D [317 0 R /XYZ 86.4 708.045 null] >> endobj 320 0 obj << /D [317 0 R /XYZ 86.4 666.431 null] >> endobj 321 0 obj << /D [317 0 R /XYZ 86.4 525.487 null] >> endobj 322 0 obj << /D [317 0 R /XYZ 86.4 238.674 null] >> endobj 316 0 obj << /Font << /F20 263 0 R /F17 200 0 R /F36 278 0 R /F26 294 0 R /F27 304 0 R /F32 264 0 R /F29 277 0 R /F24 295 0 R >> /ProcSet [ /PDF /Text ] >> endobj 326 0 obj << /Length 1547 /Filter /FlateDecode >> stream xڝnF=_! wH]uE\[[S@Rݯΐ:N hfwv?,^|-㉔" C5Y\Odu8Yw_^V>a'_8;*Hygoo*<[\uNW]HO痿E"gW?dj"cdQ蜥)S"ΥTwm8. SMu/uud"FUxoLwc<љmW]HjfMcu6E-r:Yve1nߒi Pyw+՗Zh07 bPGd2ްmEr5PDe7mgY7(u l{&GuV J(2B ;{ bC[3-w̨<%WGc$[Y,]67J2\Q2/i ~_78m<*2:H *Hk#+n6Yo;ӴߏyOI>5ɑ^٦2>q,r$ϻ>9Fk(5ż7#fiIXT9} yʕ(Ia]i>t_MB]ѺƣBOm('Og<o^KzBWcS m#$1<flI,{(C/U-˭-;3QDC0E"MGa)j{;e+cЕ)7p> 89 o!Fce5ŹxB2L;ڴT`pFΘPbOm J`F=.pu>>Wx5f4kp"#%p1zzaJʒw4amwQ1k ƂÍ"um⸵(dYd):hиbO7b6ʚjaioݶ;6!a8l|9dB"_кx3jjݮiK> endobj 327 0 obj << /D [325 0 R /XYZ 100.8 708.045 null] >> endobj 54 0 obj << /D [325 0 R /XYZ 100.8 688.245 null] >> endobj 328 0 obj << /D [325 0 R /XYZ 100.8 546.823 null] >> endobj 58 0 obj << /D [325 0 R /XYZ 100.8 298.555 null] >> endobj 62 0 obj << /D [325 0 R /XYZ 100.8 263.427 null] >> endobj 324 0 obj << /Font << /F17 200 0 R /F20 263 0 R /F22 239 0 R /F36 278 0 R /F29 277 0 R /F32 264 0 R /F26 294 0 R >> /ProcSet [ /PDF /Text ] >> endobj 331 0 obj << /Length 973 /Filter /FlateDecode >> stream xUKo6W"FH=jɡi"D{kŅD!>-@/p8o!?l/I->*2*<)h"dm? n dc52/nȄgQ?yCp񾪽j0x +Vj84e! [fBMYR.kxFȂlPWUA5N]O7]gAf)7nJP xi F3ƒP[鹆( ,;-@h j|P,b^f( nwء<ntp"? }p#}=igt>Fݵ τI~vK=?B>[6{=ÑIB;g$e .]#HlqH74CUx8d\kz5TF58&Ak'Sy,/ra/BG{=beڃwvJ)MuNYW}AORR+W|\K >bR}[S}#wf&a]2l= ]}ga/ $ނ >K$f C/b9[qn)`np%~<VZnbSg1vF"^Buqrxt$X H\+43 x|)_Ǹܜ{1ڭkW%DKþu[uE>=t9^q~ ^'{9W=~~#M/"ZkT6{> endobj 332 0 obj << /D [330 0 R /XYZ 86.4 708.045 null] >> endobj 66 0 obj << /D [330 0 R /XYZ 86.4 590.155 null] >> endobj 329 0 obj << /Font << /F20 263 0 R /F17 200 0 R /F32 264 0 R /F36 278 0 R /F22 239 0 R >> /ProcSet [ /PDF /Text ] >> endobj 335 0 obj << /Length 135 /Filter /FlateDecode >> stream xM;0D{bKJ0N G Ռ=iڞٵs BFyC7/9=2vIEl{4Nӹl8k+-q:#Sߩʢr%L endstream endobj 334 0 obj << /Type /Page /Contents 335 0 R /Resources 333 0 R /MediaBox [0 0 612 792] /Parent 323 0 R >> endobj 336 0 obj << /D [334 0 R /XYZ 100.8 708.045 null] >> endobj 333 0 obj << /Font << /F17 200 0 R /F20 263 0 R >> /ProcSet [ /PDF /Text ] >> endobj 340 0 obj << /Length 1510 /Filter /FlateDecode >> stream xڕWKs6Whz)4#Ɍ&!3$-w)9tzž~R bYYi R/Oq3*S,Z+]Feėq7Z?Ό#[2L55J$˕*Meno7_76(B4UAʢ,8G΄k$r![f R{*;.H6! : ^oԭ%%׮G 7DM ::cOֿI0jƷNC@ڶR hyvD܆cDz;Dw#~?6!˻͈H3Z1h8 AĠp;P;bg0dgumzkۢoַ7~l d@~B}*S[>dXb}o:3C{>\3YtDgon̥\Pϕ@\`[~` +=·Soz8!@͘ƩH}yoQ.mJ T&y(> 3c` v=%b@af5 ؘ0 S n2rs:iƒ\G2)@3Кmfkݖ.7}WwHTN7K'%p\%qqP+XNHB |H'^b&8D,l nfLKǀ|8BpXyyAeMT%q"h815zB^) l-@_WdU۷M5k?BvGbn!8t2ZŒw%"B  PH B @@>wpBSl@8Yuhqq 9gݑ/FzU4֞L*`4SnĦW<'-)ybT'`5mO_ґD_` :o;L;fPÏm &|x% 5{Ez)[dpArq UtsfؾÆQFZѕ^򅗳 oM.EYFd{onoda endstream endobj 339 0 obj << /Type /Page /Contents 340 0 R /Resources 338 0 R /MediaBox [0 0 612 792] /Parent 323 0 R /Annots [ 337 0 R ] >> endobj 337 0 obj << /Type /Annot /Border[0 0 1]/H/I/C[1 0 0] /Rect [468.489 411.186 494.544 423.805] /Subtype /Link /A << /S /GoTo /D (subsection.1.4.3) >> >> endobj 341 0 obj << /D [339 0 R /XYZ 86.4 708.045 null] >> endobj 70 0 obj << /D [339 0 R /XYZ 86.4 688.245 null] >> endobj 74 0 obj << /D [339 0 R /XYZ 86.4 501.756 null] >> endobj 78 0 obj << /D [339 0 R /XYZ 86.4 349.262 null] >> endobj 82 0 obj << /D [339 0 R /XYZ 86.4 144.375 null] >> endobj 338 0 obj << /Font << /F22 239 0 R /F17 200 0 R >> /ProcSet [ /PDF /Text ] >> endobj 344 0 obj << /Length 1582 /Filter /FlateDecode >> stream xڽX_6 ȣU-ok7ehZl+Grb;%)).bق1' _, F)Q*BeXSt˜PE?/bH8Kynf |rBoKɢ yKK[:ăX0%ޞE +S[})F\P+OEߺ̮7+OmWH^G#*o8'Ƣn?oh*S\3ILc*]c)A_7q+e$I{v{^ooיjԾ|LV6n햖Ͷ0uo~cO-2g9N`r|&$BňzUո fxd`= A lqgkoMȦd"8>҄Hb6,&=rg%iB̦eBlc/C5! Ne"ɟ|fǫdD7Usmq(r_[luà c'R* 10[PѦTadgxŧg$Vv\paYy*4kI0&^CbYeXvƺhtoK] yeZ\̜ Ld! or"3)We0(xF` :PDdW&ՠ{CeB7L%x$%b$KRmYq7a|H9GGμ-U>sC _|4;1_} 恺"[G60 Հe!|DeXSxéKꝏj~/Cz[n` CW :f5plw'3ɱu"O!q 6 N!$%ޅK(F|wO**ΐm{a` 奩BVDƒd1(A^>ɒ?_>4fc8q!.?&3m8S%g vAI!EFhʦ{V{DZvFoYZp`JdfqCY6 ;$1C J]~uO{GE*R ?b}Z&A#RAb>(Oԁg$57zgJŹYG[ &+?E%"PewE8n\>M endstream endobj 343 0 obj << /Type /Page /Contents 344 0 R /Resources 342 0 R /MediaBox [0 0 612 792] /Parent 323 0 R >> endobj 345 0 obj << /D [343 0 R /XYZ 100.8 708.045 null] >> endobj 342 0 obj << /Font << /F17 200 0 R /F20 263 0 R /F36 278 0 R /F27 304 0 R /F26 294 0 R /F29 277 0 R /F30 346 0 R /F24 295 0 R >> /ProcSet [ /PDF /Text ] >> endobj 349 0 obj << /Length 1151 /Filter /FlateDecode >> stream xڥVK6r#R|H-Eh4=h- K%Ǐ_!gD^ݶ|̧!"! (LFL(-madFr(2. [Tm]sůE!+|&J '8EkJC=0f@v=*KrƢ[k^ kL-%#@mIe[kg tvLJ)w#$4D(aCiKxpCaZwM-@rM Ja)(_$ uSRI~BB e밖QI8!Ƈc /(( yՕ c8f"rk{&+/Bg eσs.y Fd"gV)Fa:p[Jǿ1}ĨF kƒ`K tu4Ϯ%5PP`Fah_y&afH?C 53Jl #fg wrGU:] Rb})[1pV vAI_pQbt(ي9@PSQėv>ݶR}8Edg6h?9l0p&aZ^NJ,XiteᏖ,Zc)s4P EĶ\b(f*- dc" ۄ3SdhUEXG@ο> endobj 350 0 obj << /D [348 0 R /XYZ 86.4 708.045 null] >> endobj 86 0 obj << /D [348 0 R /XYZ 86.4 688.245 null] >> endobj 90 0 obj << /D [348 0 R /XYZ 86.4 454.955 null] >> endobj 94 0 obj << /D [348 0 R /XYZ 86.4 116.46 null] >> endobj 347 0 obj << /Font << /F22 239 0 R /F17 200 0 R /F32 264 0 R /F36 278 0 R /F26 294 0 R /F27 304 0 R >> /ProcSet [ /PDF /Text ] >> endobj 354 0 obj << /Length 1553 /Filter /FlateDecode >> stream xڵXMs6WHM+_&$&遖(StH*뻋][LzbwX勗*)%8ֳf,6-׳#-,yD8aIRzhY1_$NGίސk$-^'DޝS-4ZHF$xzŹ3ea^ sW=tEtQQ~;zz uGMA m595۲GmsX )~۾섃k%^>lCd(2*~ YE^cuY]?^I¥yv1l9=nڈXL;\Q bP-vǰ;{wK{qO^ސ|3'/i64F#yB5mnrZ{-(G$2jTX5jޓvX׻;@yE*=-\˚=:$-u: {:-ϡ˛_4#F7@:_?qvm텶: ;j :v=jczQNc" Ӛ2nw +NN AS"PǁuS^OZ `f xte]$L ,T@Ú \RHLzUl}̤] )%19ؔ1\;).[%2X;(y|nz{&jIriC(^enyjdId;B&슮:qb ;+ )e:$80qʄ8>6ޛ3s*Y;V'Op6%8=$8 6eUpA{y Y950ٟ9ą5q 6կeI~ӗ+ Nx6指?;6Ĕ:<6հߠyb.L>=Q'.z/;$6mz`84_ڨ0.QuCxY)Ŵ%Ӭ!L,s\IgxdFK4H& ϝC(ȩkO hAP>Tj >V%GBqK.ԉ8;ڻVCVoU)킷혴 yGU}^`Bĺ6\"[jxxA Q}HGs:+4b8VG9?˖ڛ3J>S}Ta$ ŭQSsUy,}zGO]o9%e0fΓ@NJ-۲D*zQIhCA` "1P Z_hfxx:DD<~ y.> endobj 355 0 obj << /D [353 0 R /XYZ 100.8 708.045 null] >> endobj 356 0 obj << /D [353 0 R /XYZ 100.8 688.245 null] >> endobj 357 0 obj << /D [353 0 R /XYZ 100.8 642.867 null] >> endobj 358 0 obj << /D [353 0 R /XYZ 100.8 576.021 null] >> endobj 98 0 obj << /D [353 0 R /XYZ 100.8 496.155 null] >> endobj 359 0 obj << /D [353 0 R /XYZ 100.8 440.808 null] >> endobj 360 0 obj << /D [353 0 R /XYZ 100.8 373.961 null] >> endobj 361 0 obj << /D [353 0 R /XYZ 100.8 306.451 null] >> endobj 362 0 obj << /D [353 0 R /XYZ 100.8 257.04 null] >> endobj 102 0 obj << /D [353 0 R /XYZ 100.8 151.598 null] >> endobj 363 0 obj << /D [353 0 R /XYZ 100.8 100.664 null] >> endobj 352 0 obj << /Font << /F17 200 0 R /F20 263 0 R /F26 294 0 R /F22 239 0 R /F24 295 0 R /F36 278 0 R >> /ProcSet [ /PDF /Text ] >> endobj 366 0 obj << /Length 1474 /Filter /FlateDecode >> stream xڍWY6~ϯ[d`ň)Y`E>%}Z,-$*ͯ -s|só"q p)S,Yp}lg)>},E]߼y4_o":9gKYZ]B"G],sdL$j" ʾk;z=ѳV ދ w1|JI-cg{) /ҥED^e4RM}2[L|9#ùLz 3\НLii4wtį$'= Qڮ{$ xGCuqYJ$|& =-(ƅGA9(ЂQZGZN W~ :ӹS^J~0p1;ʂRNqm=ee몶a/8nT)?fDEכּCe=9FtUSc Mݷa.U:Ro>pvj;:pT.^cv44eH4GX\o !#ȱH*Mm:Z㋶>N'^":B"2͑n|AlnCM=S[r߆ $oD`*D:Gy6M#MFG{D)b7ŠGKΞ|EIY*" 2Z!?^C|K9yvV%ˆPL#DbѤ2@+~Dr 0N f<e {I?!#wW48xd- [ph/;W%6 _ӠxӠ@vc9|ge!"> endobj 367 0 obj << /D [365 0 R /XYZ 86.4 708.045 null] >> endobj 368 0 obj << /D [365 0 R /XYZ 86.4 688.245 null] >> endobj 369 0 obj << /D [365 0 R /XYZ 86.4 653.874 null] >> endobj 106 0 obj << /D [365 0 R /XYZ 86.4 590.528 null] >> endobj 370 0 obj << /D [365 0 R /XYZ 86.4 447.681 null] >> endobj 371 0 obj << /D [365 0 R /XYZ 86.4 384.584 null] >> endobj 372 0 obj << /D [365 0 R /XYZ 86.4 350.047 null] >> endobj 373 0 obj << /D [365 0 R /XYZ 86.4 302.392 null] >> endobj 374 0 obj << /D [365 0 R /XYZ 86.4 250.919 null] >> endobj 364 0 obj << /Font << /F20 263 0 R /F17 200 0 R /F26 294 0 R /F22 239 0 R /F29 277 0 R /F36 278 0 R /F32 264 0 R >> /ProcSet [ /PDF /Text ] >> endobj 377 0 obj << /Length 127 /Filter /FlateDecode >> stream xU;0Eޫ._J" !\=]YD0F'D b<H:V¿m]iw.,b 96uyQ˺tG6gHrDaݥ! endstream endobj 376 0 obj << /Type /Page /Contents 377 0 R /Resources 375 0 R /MediaBox [0 0 612 792] /Parent 351 0 R >> endobj 378 0 obj << /D [376 0 R /XYZ 100.8 708.045 null] >> endobj 375 0 obj << /Font << /F17 200 0 R /F20 263 0 R >> /ProcSet [ /PDF /Text ] >> endobj 381 0 obj << /Length 766 /Filter /FlateDecode >> stream xڭUKo0Wp4Rp1riTԇma]K<CvW$iy}Éxt0~,PX&^״n'^۔;j袞TF7(};nj#n˶)bg GK'2 endstream endobj 380 0 obj << /Type /Page /Contents 381 0 R /Resources 379 0 R /MediaBox [0 0 612 792] /Parent 351 0 R >> endobj 382 0 obj << /D [380 0 R /XYZ 86.4 708.045 null] >> endobj 110 0 obj << /D [380 0 R /XYZ 86.4 688.245 null] >> endobj 114 0 obj << /D [380 0 R /XYZ 86.4 457.693 null] >> endobj 379 0 obj << /Font << /F22 239 0 R /F17 200 0 R /F32 264 0 R /F29 277 0 R >> /ProcSet [ /PDF /Text ] >> endobj 385 0 obj << /Length 114 /Filter /FlateDecode >> stream xU=0 @= $P Qo[BL]>C;sfT L2N?G۟,Ŭ t}\ݶ\ɽj~zemL?:<7( endstream endobj 384 0 obj << /Type /Page /Contents 385 0 R /Resources 383 0 R /MediaBox [0 0 612 792] /Parent 351 0 R >> endobj 386 0 obj << /D [384 0 R /XYZ 100.8 708.045 null] >> endobj 383 0 obj << /Font << /F17 200 0 R /F20 263 0 R >> /ProcSet [ /PDF /Text ] >> endobj 391 0 obj << /Length 524 /Filter /FlateDecode >> stream xmSMs0+t"#!$c:rJ{ ۚ\WBlw<؏oWMyQ5[$9f9.$EMүԔ奨RjUKJ:k+MavuPZc)%>$Om;'"!*R ˂)O(S&"[mzҦ7@l{~̋?W݅Rc_@Jp!cQ3ԍUXD\U "Zgy$&/[ k}uq#b2"繗"B'%O0po4|kAZ0"}?:g /pT>Gήu5_E.Kfw9|.SIҡvOm|Lp~M6 tVhA;aW`VՃ/lLsL-93;()r{l׼.nQvdg}8Yl8ik`i}D`V2&+Ë +Q/GnQ-xV&(_&# endstream endobj 390 0 obj << /Type /Page /Contents 391 0 R /Resources 389 0 R /MediaBox [0 0 612 792] /Parent 393 0 R /Annots [ 388 0 R ] >> endobj 387 0 obj << /Type /XObject /Subtype /Image /Width 771 /Height 591 /BitsPerComponent 8 /Length 36363 /ColorSpace /DeviceRGB /Filter /DCTDecode >> stream JFIFa[CCO"  [   V6UWv&$'78w %HXh#(5"GJfx4EFTst+aQq!1Aұ"r ?d̒fn/@ ٭L؉FZ_;?ɳɳ fp}=~/8fUax4WknZynwg:)fnNyQ=+xzAܑ}V+@YﯽYﯽ#/%j7m ^%}QᏙ)YF IΚްCm|tGn ΙEh5vfX J1!S̵wW t?:mJ!!LgjnW6mk]rg]gZ/ښW>1ߜtq=پ\8=پ\T#:)1' ^=*VLmc_X-ae9^>UwoqV{u|qV{u|̞Vl\q߷.qqeZ %-F"Kl+@SoPLVN+8 `69KMj/(4捜ўC4 pkv a\:jǖWKܮhYﯽYﯽ7q2UUܛ'8—E?lG-ϗ, Pdrzy,(ILa'Ad[(7{ɕڍ1RF5+$:KlЫE|q-Q`uK0gհY¯P+pQ02G\AUl.Ul.22Y͵_d2y<*FqzH CY#$iL V}D xmfKV6a8O~7e>Zg#[v[զqV{u|qV{u|/81rlX=^DU_e\=MjhWUikt2cF& ']8K/ƪ|g56ZӽgQIO/:<=#Ʈ‘mn$zeuտXɚ˘|QO^R3z?l ɬiN4ڰ"{9۞R8S.~ˣȗ(|IBqV{u|qV{u|useՓ8ݕHD?4fUq;Ss\ ƢN/*oա$xj Wfpfq/5NJx&,[6gk̅{Kv<8sMēQQ.1eu,1:z^#./ykI ϑY7WcKeغ5 XR: OiɟvIɨm+WYﯽYﯽ0x-@)rf{&eNQ蕌6+Bٕcl9J}Ȕ)&56nF#+~ѹb]Yf2vM}QW^v,Vqp3*֏Pk˓uKU"M-eaz8=پ\8=پ\s:2o+*&HDêY;k1f]Up-љ,AGGc*n2&uCPHjg[7ˇg[7ˌU9kCb> 3=buV]2fzNem?$99 淙_YVNZ(;e|Zu=F_Xqdf^;];Gn7g7G>qG77x fpfq]_7U}J6eipWY ٸذo;;:qKQ!ȹ҈U gд+]HE\P$),87"ݱBvm7B [2eوVn$K"t&+U2}kl@>*}}o*}}opsa dR=~+:"-Y]mGqn9Rvag7ÓIC/0?aZ*Sѣ͏ ;+bΤ,cYt@mDm4ƍé\&2vAR[ gn5=_$@"ք$DO8=پ\8=پ\f3Ǒ TP p5:XՌbLC[0蝖rlihAҽIQ.l:s~.y]b}Fy-|-}ЬKiby!cvL{P6uh)jvT1&h ^nBNo>ʦ)v:c/X4jӷ-!Sk _ʬU]hnK||exi:sf8ݞ!e#ke|O̓֡P5DLsh{,1Qy9DZ;: _NfvM^±ݯ ̞gjj+c^s(kcqo9a_ӟ^ZB-lv!Df޹'EsrJݑQbgy*XY\:Q]vB!W BҟNp!}h>n,noan:PRj )9%QAVsX&˭Ȼ {] R>ܰꆜX6ՎJ Jo[ӔgRaF/nN#gs+\}/M`V=E{*IM"dՕs1Zvgr$JDC2uĔ&|~hɵiGI4P ruiM٨5|+lSu `Kn $$8GVKtձm#vJ>_L.c|aJu(YVs_[d8~qY9DS9qTjyX^0;z-Hdxu)|֮#+j>o$d|R+ۭViNTo~e@WvC!NMͳM8 fcϊlli5\] &h6(VS[<ٹ}G1O|غ!ÛZ>6jFSxqt>m:Fu![l.6$wiU!or;JڼnqU8*!Pps;uT'ڶʼB*40E3UqWjA>O)yG`CclmEOvRӓJF.ɺdlq }SՖ$m,TvdA5Ktٵo7V0j֪⛤)kZ*s?+]K>@>Bn-Qgg.لʤΑ)ĖQUWx>|9Y1[KB(&{FLy&Iq\qhݻR0Di9 n?Lov +^)@$98hi[_=sv0ɏ'3Nq^VSV,l{z1DO,V ~geX]%6Ds}_7O8nPYE}g9T~:sz_*q[Ne^BESENQXیt S@o&)}ޮ@!;h}y}gt՝+utie[Es3_B#O1DZ&v>k1BPށ;t(f jni5vv|߿׵X/<;æ:ę^ysƞҶCٹ:U>ųnLUƺ5N+<:;psW 3 奴g WzG29Ї_Lo}3}gOdzkjrc۶ "#]3X1u&Ik3wN]]\P&Uj{q4nkL9lBZ&J.rhrRmoLoMjҹ46ROs-s-_Lo}3}gORC&Đ'uX-j#1Rd &Fl6pjׁ=iǹ/GםFgzϩ:z̶̶?fxoo/=@ZLs-s-3 fxoo/)h)hCoh3 ݤѶ +Df쁹|H7!*FQQ4B%+ijVF7j'kerTH[AH[C3 fxoo/MF3)%1Ir3f6CB#[++ZENNJ n@BŊ4Sjl̶̶?fxoo/=@ZL M~_&jc:BfM.WĤqX5_%IZv]4rh}JTee<=@ZĘZܟ2+9ٙY,uxxuJ鹭>''tR!@&ki'LKS__ScKckk~T6b"b"+Oo6b"+Oo6tj F=!UA8F}_% :Z?[?˳˳}_LoӹHR9R9Ї_Lo}3}gH󤪙%w n*ϛQ)>bP%$^յNΓW͗I4mi4" >T!)h)hCoh3 G2 G2=@Z>oi'Fd,je,q3Q; i#,nZL1tnc:BMetP=/IRM!Ma_j|M_Fad#re*D"RZ5kcq }W%Iee<=@Z>oi0̶̶?fxoo/=@Zz4nkL9lBZ&J.rhrRmoLoMjҹ46ROɣsXze b64RWv@Fߐ'ucǟ+kzczkVɥٵR(XF}m=M#m#m/fxoo/=@ZLs-s-3 6K47e&s7Vͪ:5Qsk{(m(FtiM߿MAQ4K\"a4)#ѣT{{dolӇr̶̶ T{{dolӇr̶̶ T{{dolӇr̶̶ T{{dolӇr̶̶"CPG=-v-CcSGoY ̯KgWggcokKkSB-˱ɵɳ\؆)/)gи6UZ7ϹtvI]N^N7clT1Ƿnuv,{XzQ&xkckGFfCnMէR9R9Ђv!}Jm&;>6'uqzi+X򸱑!P깉۩F7N|krfq+r?D"9J!/2)h)hp1OqiMb8gr_y>4FJ!/2)h)hp1OqiMb8gr_y>4FJ!/2)h)hp1OqiMb8gr_y>4FJ!/2)h)hp1OqiMb8gr_y>4FJ!/2)h)hp1OqiMb8gr_y>4FJ!/2)h)hp1OqiM6T:(HߤaAmihimi&Φ.&Ɨrmllrr{}ӗ+!~|x{grFGw5\M{Qק}Eӳ4Do.IZWQHz|"E}3}gG _-:ҹ?) Ri4n̦R8B$&cq  㪄lli9;;9*Le (Os-s-_Lo}3}gN\g>s6jLY,9X:q3}ꆥϮM˝:ǠMM˜TD50s-s-3 fxoo/)h)hCoh3 ɣjԲ528(7-_&jH]m:71ɝ!S&ĺ(ĤT)P릑H[AH[C3 fxoo/kn^ 7~8eIx}?7Ү~@ݏ7ee9| Q=*$y#_ Νs+kRMݥNkuPISOez2=@ZWSa鰾֯߅DGOiDB":{O'8o _-W7{{x|m qUՍDL;X1&b[I!RC;ߘ'J;53A(erLs-s-#3 fxoo/)h)hCoh3 G2 G2=@Z>oi09-D_-yeeϙSX۝+gPo::ϢSt/CWy9yH[AH[C!}Jm&;>6;J!/27Wy9yH[AH[C!}Jm&;>6;J!/27Wy9yH[AH[C!}Jm&;>6;J!/27Wy9yH[AH[C!}Jm&~zMOzshhikkkYzzZ:Z{mJMySJ>9w@ANU_@&S[eZz:nMlllFWMHC!mTZi$'&<2צ |$/ꦑnǹ.ӿr["\"wUmVlF8{]_Տ1y5:rƽNV__V 5XKW~M{7nΩksS8lc88'!0=ȆfgcXg34hi208uC03}K5TV4-QZF2 ZyOE3,qcӶvEJتbЄPheMgg|,2mnُ9)lYuF+#, yb=FRlnEt^&/,e9m9GztV_md\IIVm_Fea6^mi>sIq " )@$u:d)deOq v_[I"3DBw$ڜs[WU-lv0٥UI6 gVȤz5;W(|99fSG) mIVيl7ZT|p>cԚ37%aX2LRX!K;>V3{,ҹfHL֨CL]K׵|ēTZO2i\bo9_^k/|y|ªY"ұ|I$ ZDKiÄQ*{pL"77ȟ<1010EXnĊԏ1ʱ(Dg## =OtTz~>&96h±v2ҭr!G'3N)m!=e[\pǚݯy#61P^LэӪ^[r~܅7+H[Nޫt3[ UYHIoxӒoI+ 퇬Ocs˥ ;%=JD"_c*H~7AalnЯ8 dniM˾Ä+t޷E}!Z9&O~Kl9uW9yiڱZͧByxetB1VQo9wz(u#_ ҬZ"Wp 2K>CxUQN޳ ۯ8k ?SUO8ԽMXH ֬m#oaA%2&gqߎ7>!ڼ#yT< z~~?xKO,!M(fGrpǮu-ܙV D7.HRyZ]{(tٜ "䙍/Tmx 7oC Z'J&lk2֞]֕VFڷF$TnZqL5='qBctfrNf)FJ}NRһV8UTp6yuaؒ$i\W#/ޟnټ2@Jb_Q>&ptڂrU7TOsz[.n<2=jS{'8OfV?mNt:rPdr'eTy,("zLa Uո2w,O|nw559ʟ,wVMQTɶiUVN|‘i08ƒ t:nLBYU=NQY%Ž{MUrqԜژ+fOwelL"Eg%%ux3t:) י&qƪgWq%8 CpusRh o4WR1'WGulï+eC4Į+ЗoOe^vlR^ o%1 ǯ稟8E:mA_b?*}z'I׹-T6b%*^seGOOHR?@:=*:KH\gRP\tʘE>CX3[Q[J>װ=YP) :ȸ]o~jִhu1Ѩrg2>iĩk'q~gkZ q*[]f y.cᨦ"r9MƿхECcV27 <ǫmUX5dS;RD_(c5#xCLaAl|1)#bЌLem/>۶%cʭj-V(4ѥq UImF1vҦ⎬EVC%u}mf*Z_,rZ"Βgū,na6o Wnc/կ\%} %erN~=}\|KvJ{ȈDT6yn-zݡ^q5M1!pBwdk[ 76e9zLO>ε/Ӽrl؜"}jA-5?džT-jowd8Rֶõeu7_ |ߧMT\@ikU7F;9W_UD͚q N4LJq)5yϪZFxEO5+C41prܚA$aG^H#+,%fMSԯ2ÆIoAtmFL1Ξ&|\&$ٓgFlE[bkrnj:S|*G7!1'KaYef6ngm EUշÔgdD]xHh$[r: )Y0fʡ'6vGƘEq I>ύ*Uۦ&Xk _B, tG\_y:ǤJi'xU ^),qk>tZcP7Ǐ'xT}4CןOX-ӗٱ$#Ǎhy0$ +F uFU(J>=/j٬i]OpKYϚY'tܒ߬wݻcjb>XW54uqRd҇bB֏us3ksR/R$OArbIL*jeQ o^q:yy}Jcl}qJW+6];l@ժҚ$e9v>ci }A֏GםG}OOYҺZ8}KVn< Z/&lsȠW?Z@ 5?֌:lyҖ,ܤ(4ǤwCsbCVPEChK KMGTnycJא4.x_S\q/Wfz|>Ugs;zr]>߫wѽhvDeq^Hcqߕ9 e%5dW؇UU׎w}$F~ bh%:SJ UgstO"Zp$kO,G‰]ZI2 xzmTN䧔"5r9l :m-5o/6C/8s-d"T:''[5~4g<{ڙ::Z'tYrZ$]D8KBZ:,BfJZ)t|rb'4u7q>:s*˞ _4zu{9__|67uc}qZ}Ŭqt/׆ZwNd,lu |q(xR0j*ŭ%~ϒ{EA+ɴCN>OhE ;t]RvNϗQ/jE5ԟWa]UF1m?Wq<i;8g7G+7mDIثI#ucmز,+l=AW:Tz-?`m ?V% eѴ3W BѓYiȯڪnLv&قөj"Ն0ZrUdA1W@`dobfֱ` >T[kxkIHW`gO%,C Bq'ζ7*umKd 1v#R ܓ\V}f,({p$IX WrpTڟc]:ԨSi"j+YړEbGEې-qR6y°s6裹zSO'4ÅU1 IZG632IS4[ŚDZhZ64l(P]#j&N/bɕN/bӼ$Jx^$wr/_Rr{6\uQX^ZeqW1|2ɼ;˽_eםoY2㭬f:ԄK+{]Z:8a_3uƾct\YQ}?In\^0ǯݛxq4q7s~8;Usn싾][םQΣߏSRMAæZ~fڛM}=~/ďyy=2[_6 pI<)PHRiut:G+NM^xƙ%j hIOZJ{&>I:!nli K )'bHqeM,rڴ%o֜)"ػhfka[ 2ֲ2JaDjڪ,͍4Տ֍25K!QK!L*[ˌ Z{F+X+k 2}k? V$b9201譒7xpl j+xhZtdNgk[ yu/- akX(u*5hxmӍ刞7<1/&g_XA[5}5snCQW]y bnҵ5vGG'D_-y:o&ls  SwD&1*Kf7 B%zhƣLVFX]6RvePk(rG~PM]AT`Qfx׬msB]ZgNY1;vy,˛zYFSUKF5-{Gh${Gh1󱬚^\ZBC-dO}mpVՋϴ6-ʽ96sv?+ņwRػ6uNj|C:2⣠|ߜd4b{ۍLGcq3ؤi'붨:C$c)(&Y\5EWY'wڐnڑ"I]c:$-zGi,KY6SK+f !׈I*x[e*ZdHݫ5džTNM7כH3+l;W#:.71Bh9͟Ԇ\+늢#p9еQ}U!.`-,Pfaűfkhɝ)WLۥVm%/+ue9O_%by|ȉ\f=2YOtKmF/n֕\keI4aٝoVxjNJ1)"nIncI; #n9אd%7mk-Jߑmj`8eۢǒ:/Wcep^oX<("ؒ=Za. ue^`RR[/altn^۵%=L lSm̩j_VDy\ٹ.$>Xk˾+Jo+}_DcXеDuQ!cQ`I$ _"KZ9[VX:l%OQl}kuG审4)O3<۞aWYϊ]a:భ}W%6J4AM3 GUr{RMhvnjZ4iMe*^XO֔I=zža&߿׵X/0`ތɉ# )+Ɲ-X Ye.Y'`@Mߦ0lIk[yюm^(7{1]~5|lޞ״fKG)ݖSw-?#cZ0u_L7fﭙ/vZ~F+Ê9MW_h Yc YfKG)ݖ?./^\Qz)^,m_ ֱq6v'YƜoANmq_୫gi*GGzZ5ٝt 76ϧc ͫ:ْQnebl8Ouր0u_0u_dri[(7{1]~5 7fבֿ7fﭙ/vZ~F+Ê9MW_h Yc YfKG)ݖSw-?#cZym~ym~ْQnebl8Ouր0u_0u_dri[(7{1]~5 7fבֿ7fﭙ/vZ~F+Ê9MW_h Yc YfKG)ݖ;߶TU5zGA6ж)=i8h ?O-_P0u_0u_P;&yX[Ms Z&M^'Ν$.nK,qO4R!@&$: 6Tm:qusZڅG)ݖRzϘ{N)=gt[2_9MW_ri[γkγk̗Sw-?#avZ~F+ƴ%OuqG)ݖa6}la6}l~(7{1]~Qneblk@o:ͯ[o:ͯ[2_9MW_ri[γkγk̗Sw-?#avZ~F+ƴ _%(bz2s$ɉanY/IG%uzX:6з_D}t^'toME>g'[R?4l}٧-=c4姱;uzʗrF;XNZ{h'lRzʗrF;XNZ{h'lRzʗrF;XNZ{h'lRz#h_vlUYt W&ګӞvZ^Gwe.hHޭJeo !ciŠրJ_뷔ydhŠր0ߧ?_&ŠZ~0|oKZ h xaO~Y/Zh5 7Ɇ2SU^0):F%ޕ|IIy1.OJ@ OWL?|eQwr/_R^rK+z#ƪaS.%9.5Uqb]\ ĔJx^$q@ˉNKUz\@@zW'%%(Ļҹ?)<\j&>2SU^0):F%ޕ|IIy1.OJ@ OWL?|eQwr/_R^rK+z#ƪaS.%9.5Uqb]\ ĔJx^$q@ˉNKUz\@@zW'%%(Ļҹ?)<\j&>2SU^0):F%ޕ|IIy1.OJ@ OWL?|eQwr/_R^rK+z#ƪaS.%9.5Uqb]\ ĔJx^$q@ˉNKUz\@@zW'%%(Ļҹ?)<\j&>2SU^0):F%ޕ|IIy1.OJ@ OWL?|eQwr/_R^rK+z#ƪaS.%9.5Uqb]\ ĔJx^$q@ˉNKUz\@@zW'%%(Ļҹ?)<\j&>2SU^0):F%ޕ|IIy1.OJ@ OWL?|eQwr/_R^rK+z#ƪaS.%9.5Uqb]\ ĔJx^$q@ˉNKUz\@@zW'%%(Ļҹ?)<\j&>2SU^0):F%ޕ|IIy1.OJ@ OWL?|eqWD 9WO\JV툪ȭ4X,9vk5ΔIRcnnFkuyR#JPT~E[ 0.s\+rSlVԅΣT,R'yJܝMNWJخ<ʬiL`8pWسea`^b7e*TQ0s奓3H[Z3gbN/4Fgzש7g|8I]G ӻo N{ꮗ::fwK+zb]\ Ĕ.5Uq)q@ˈseͦ_ kbQs3[Uv_J[U삭$ vucc8fzYO"nmr^jx&roIau9;Λ 2~:ug\*oliV+kr,ͱAϴ#9W{ o@ҏni/a>~pݠz~1u/eeG9oiwm٘0l~`>c)+*5G*]uDم>ps 9QP=PlMh: grD8&;CȶVj{Qc3vȢ$m{Gr'﹅J/ܟtlR?EVEv(ʧUc|׍wyU97#nnjtib/yY؃4*TI%G#d^T8Wv:k-]Qܚ*}|lW$n@WNy`zvֹÊg$E4$q//9HR#f kl>C<},V~V S`tzNq*+FU:.okm(˽k 9ٹssSKKa{b`2Wy `fE$.mں h]zbiyq뵱<βy †͢SbdvqsXQkRI[_myrܲP潉X }wYNrLu'fĤ`8KЄдIGGWetE:rӦ"akC"#jϒf.RzPE`G.㡿@;XKaYRK":͝S!늲YBQA^X,lpj),Zޛe(ܤqPszSk]Tu$M7Ej7cYokcJfv%Vǯc:7>0[JWn^(ͪ1q,Yk!y!yƤM 񢜘Ե~A["|QjdtϫkfCzi<b]\ ĔJx^$q@ˉNKUz\@@v,Z*w8uqOciw:FaܫEqwVZ)uX\kF%ޕ|IIy1.OJ@ OWL?|eQwr/_R^rK+z#dQTYLuSc4u56?oOocSgy?kckgkvv9yjtSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm#{xo(tSm%5ki(H5t5]uvu4mjlrljilmrmmrmlrr ΋g8\NsUA`Re6~u(E7ɬgz^Dw,kb11by玅*ojrl_)|϶\bFtXY~Ȧ$;^ݮ^" S|a[Oc RK2noΨi\|z@XJoy z)acrtPetè%`Μb^_{th(0Lo*j}o^#w-S܎c:oeEmiD&:VGqNNXLb Nq埍أ9bUH4h)n76o IY|`;|"=H%^V'mV<ޤ : r=ރݻ]3mw|5\iKj9!W,zSuZ5eu? W^%%!Vrzղ`qBXRgF$xZ` {ɼųjyQ[|潁+,U^G`Gض_l瞶J6|:C&X4:)m3N 9Kr]ά) %O&_?IuTØX5Eb#Mn-.NMSYZfݳ9n|0һٮrCn޽lZTMjaeUKNPjS.a[8i3oQO!%c^>_/fc;M?tLr}w&]8ko= xdc_De=^b {R_Յ^P|Hjijo7i|4$KX\-Lr WCWh3'w#>'!<+꽆E[SL3JڡYm{[oj BiY53 Y.殓g>,,cӏ1"=S2cդR6 e.C?Zw]kL)YRQZ[Ӽ'T?d2aɅ|N)}#77]Y4YrB׶(D c@ԲjJ`ͫĊ_< s|xHZ.oW om|>>뎥xΕz:&vR>H 攅ŚBb2jP[)<_6 CdoiW6wǪq|k\~+:`0j¡|bZicwelU4{cmjzb-tL.6WQ*F`gY4洅%u[@ڲ\f)LUc\nw&|o'gE8eU~aXQYg>%!mTec2MkO \c-\!/];>1NYf9pk3׍6 Ò#*LUҊ"rqҮT¦hӒ]l6POUթ4)f-VkI!w/%{# b&2w$%_jW}`ѳ!.7Mueh]M "β~*(ߕZvi@HcLQ7/m{Ozy%rZbu4BuL5mH`4խO[Fnv⃜c N{O*/lOIٵ;aT!n'`^N,ՍدGOm IQ\Fm:Lbo|`*ИD,EU3bB,xLkQmn[K4:zۉ;j~^/_pw>~v9q#'9=lTZtS˰";tS!cw<ڃf?!, :(zIF"YydBl<" YQ|3ɝ\QhUa2 qƑ#kqi~-nֆėj;298\o>޲zyTVyZM:G+3‡d>A2.L7Ecku'CqPK kgӀmv8Ed\[#u5i*̛zy+Եe"Ab#Wmb恷z(XB Y- gZ-(ʮXR:$j& l[u8Bi _Fk6G&VǶV3[&qJW /p~*qr~jo7mGMV,:BvP?I|P:Pwk$5"gV\nj%di,vٖ2N6D-fBjLrK+Emf~eXock:*|Y61of-Ԗ-ac,i2]ة wܘ lP[g6,mԑKThn<|=!k[úOw:я::ϩ韬/BFz=Hk$g# <7 iy~g6ۇ}[l ծ}Hqw^lWT-8ɡ<]K2&LR2mI=1wGX= e[!H}#e&;,E}vBQ}PY<ݗX+n͍ýxʯj3͚i#p^ei&cZͳKDn]칒4oEǒ֐3!+tPV5 )#W"kVeތRF\oK"N:bDڝJ"I%%eVn^^@t#Q/^{dIɵ:&OV,Mڧ.TU,ڕB д㵫`(Ot+#g1qeC_$W4YM z. 6$U<_;AdMߕ-e6bTn'!NϻjvPEc}zs#WϗRl7 Z*pڸaAԓnkup+v_ܦZs$Ӑ_87elۡ3]U$pw'ރ.ʙ#ս{O> >> endobj 392 0 obj << /D [390 0 R /XYZ 86.4 708.045 null] >> endobj 118 0 obj << /D [390 0 R /XYZ 86.4 688.245 null] >> endobj 389 0 obj << /Font << /F22 239 0 R /F17 200 0 R /F29 277 0 R >> /XObject << /Im1 387 0 R >> /ProcSet [ /PDF /Text /ImageC ] >> endobj 396 0 obj << /Length 1109 /Filter /FlateDecode >> stream xڽVMs6 W(M#YҬdbmJbiZiZ^G-W$O8-G$lDh~wsy|]4xX]o&N^73:׏7_pinn]8 8+sᆙs93O{IGA:&Oc󏀤hKf exhZG"?zp*\]KU`74/0~ؼ/xU6œs'txZɱ5jcsݶlW9ZjFY;* 0U99rCOWAPQUC %ZJ]kW w?6)+Ԩ5I600۲9IpT&rz,vomY&"pk*ҵq+MhW,1]j7Js=|yZzC: XGqL_Q(ž[a#M)s%tْ=qNq|cVAA '~FZXI1PFZWZ3 }'=^j-uզi{Ӟ^w{}#?YagŬ6 ROaJMB2jbHMc# ;yJwJI6Y^QQ8֔ ǀNS3_kV@+5L )O|#ʽvp} G6B(M5A%ZMF ^ʗJ7~(-bmUXQ3^WT&Vӣ:3 (%ַ0!}"$8Z2wEXb ԏE2u;I b4WBf`nGrӶv"85@z|W'C@2+P{=B*ZTx O qkDN0x UBD+ɏf%K_n})~2FL6lv1伉U]Gw6[ g endstream endobj 395 0 obj << /Type /Page /Contents 396 0 R /Resources 394 0 R /MediaBox [0 0 612 792] /Parent 393 0 R >> endobj 397 0 obj << /D [395 0 R /XYZ 100.8 708.045 null] >> endobj 394 0 obj << /Font << /F17 200 0 R /F20 263 0 R /F29 277 0 R >> /ProcSet [ /PDF /Text ] >> endobj 403 0 obj << /Length 516 /Filter /FlateDecode >> stream xڭSM0Wh uE,R+!8nۆid5h0{> endobj 398 0 obj << /Type /XObject /Subtype /Image /Width 191 /Height 390 /BitsPerComponent 8 /Length 29525 /ColorSpace /DeviceRGB /Filter /DCTDecode >> stream JFIFa[CC" Q   67UWw %&g'$8V#(Xe")5:fEHIrtvy'!2Qq"1Aa ?!u!u]]zYwK{wsos~nGłr3p`vdy7}P..6p7ς<osvƮLq4wTtwTt˙_ ys =Fϭ/0@Q_),#\O i߾F vT0F /2<+ƗKLF rqxaEޚ3Lg!U&++&"4JZ:ZF]4$l MFnjOD hI xɆG!.\[*jR`Xd98uYK'^9,J]CQ8jh卮Df5DŽG; uqZl^Uq {u/|[\hhC<)#;&[yQd<&9m|j};Qjlx%Cyěy/)w#1S-+bI!L+XׅjvlTGc{{ocBPb FB ܻFc8-Mi?`B2¦Gok3"s=V[{<$!|a΋l}\Ñ1HpeyYJ Ol\%}XZd+ t䮱 T=]7v=]7v]9ďni5h >rE3p>J90NX ;kBݶ+۬$]!-)J{ 9-282fY6w'ju&W\^*w.}**7K-D]K`5SߏiSߏk$jey j̸f4o0t16ޒfcl>!Fx(Q?bKmAKCp=c<{rW˿I jW`%yԣrд:Aa_/e |Ca #5b}=]7v=]7v>~1G3F>oؐC8`- /p9` LOOI]H+7$$!BClμ0 |4v<2c<7}͆ubƳ<ܵ4=P\=_CGEs0j6w;z@M, RwTtwTte|2< p N@3^PyT[(:<T?>S]&@zuO~>WMݨEQC3\7mNEAoMz ^Æ=HQȏrQlz~fDde I!?bA&jz]9#rނ%Jfm^+1ElH}fsԆFyO |YOWǷ/RTוQHGr 6TtwTtڣ7xdb̅?Uμ(h V UznP__X2o6*wq/4mC *jH<~`-b$Z) 0<3o1ƌxV8vYŵw7G^a{W.=e ۴۵pbO3&m-ЧTج7)Yf3ĉdU#~ ߳*^`-<) ^XV[b`Dq1dy{lCn TP ŗX}Yg爌{op0u7طS/VVq=5^b[(o"úTuRwg.Ԋ;۵s!}W2߀?/ǚX^ݓk ۲oU_;hIa-ihiTYŜ ~DFnNm-+jƫoU >H2zI79@2H[?L<8 >6 <3*+bҰ%d#"FV":-c %g帙GVH'z m(- {*ʯ,cڌpT..3Aљo)rX@"h򢌚zٟ0a ꮃ1Qn܅M jfl#y+*ac5A48[2.87 `XNa1d zɁQq}=4im{vׅtwF78U^˕z\0;'%Yz2Zy@$ pF,hBbr(%EH2־10P 1YY5 -oHo-dD*Th#H2F}8oˏ wTb|O'bڤW[ | uPtvl  Q,akr*V 4@5xf9lmdd {+ %'R @Y]KyU?o@4M^NL^~ iZqkXRo#qPXAT̼Β¿&@5^<~Dvjõ^<~Dvjm{v-A迱̓#AW2!Ϟ[Q_5dSpBo6+״W'`T*k.j KJ}}5vȇ(WLx2MBZ]6#l !Ų_x%`fn}-NTvh3ɳ:ڭoIf\K0I%Ť0*hW+UH4^_܃ckN`$$35ApW)U]LvYþ_+$12D(5ޡ10 E,Zd#3b0'⪺e2Wċ1 ##MbEٓE:do8g#Ey';^"EUݗԪs=2KM}mԕ|Za42Xp2F6qfJCxG}`5"ЋEdrCTϣleW9цl'lj-Wnɗ:)Zַl"E>|0-ˌݑ9GyHP^?ζ?<:_8 ~OW}>ߠ2%+Ÿp18Hn ;3M v BMZ Td\hdȡ&Hm_]3ǖ`Ugǰ2XQXK5IẀ#VH$!6QeZ-+g$"ai KQdTwKIrv6VR`XI%2>6\nf2D\||H0 6 җʅDy8MϜGA֐l a'zG lMȾl]ʖ#rԫ Ce6-0:%l1xfS̎ þb( (W@QGF!O=tz%*$[*lUGfFMc.7cQ>cA>OݚT::h(ygZx/Qpe]O(#s)9i\3$33婌a}xaU#EJ:JS 3!D'5^`ǵ_,@wrݑיFs{l,]׌-F%Hŭ0:,.AX2p/j'݉t {}WPDp\'#~:q#:5Zm2LoV2C1u R)=Tr 5dȌWB@jRRE;70A=[/\p@O^3omҔ0(Q u!' /ϱO馀ihie";T_s5aگe";T_s56D}_ڣ~q0̷iao3THl_2Q-j6VIF߼,0۪ ߜJME^:SGx_E]Z,1wDr)?sJ٩D : GfHE5s(FkQg~ӓqQFLp|\\&!Z= 8L/s7j*Ҏ .5g/NS^kw}8]~6gn79KfeLoG[ w Vjz΁fn_" Sw5x' .I WdclnwւdH OQdǐ$[T XkM`"KY <$Pg4T)l5 u5gV 8Nʼn׻@'آez8F>? peBPG46K~Dox5e"*%[C:yk\M6\ADB9SN܎Lchew㊫x6`Z;###qZ Ќ˥+/+k_F 2ⶆg\0W>M\LJ!G#ʱUުbvo/j<8ڐSH8-2[v5v׸ۂkNJ̙{QqДOqay$zbdٲC\ :`#@ºWY\t =cEQ.z8c_lyYfh5flEĦ!#&xl -R5 QeGD7m>TºI<̑_bmDə"+<'RCOu3=Px̣iߑy9/>;G>"|WPO8GWG뮼]J]q}헟w'>}}ҿqW}9ϼhkܚ12턧?+{Q;i_X~N o*!ٌ"&+Cueas*;Y^Zpn9H1G+4&/`8Se2bIKvHquf[JR]:dһgm yZZ:iihii%.,*>Ը#gsgD/S+cp귶KosxG:e";T_s5aNwq@mH LhWsvNs@[Pvi *r2 5-#t+b]uvr"˱h pXKz!'<2C:~ ]Fx{v;Ѷx67'K⑹6D}_}w9nc({rӱx9aGh*H,}WsR|$͹ezd?}Z2UY5EVMQ9Pn?}Z2N?}Z2JkUrNt6~OV/ӯ6~OV/ҫ9Ug#\5͟գ! ͟գ! FY$MAgh:gh*EVr59Pn?}Z2N?}Z2JkUrNt6~OV/ӯ6~OV/ҫ9Ug#\5͟գ! ͟գ! FY$MAgh:gh*EVr59Pn?}Z2N?}Z2JkUrNt6~OV/ӯ6~OV/ҫ9Ug#\W2߀?/ǚ^?}Z2\AzNz#۞֧ޏ X2l!qn-"&[+gT_N]ɴ۴M^ݢ֚o^{Bj/jVO/qۯe}᷾\c:~/m裷ז[ӵ>q@7B5s*\I;s}M4M4 4'؋ێPzɻeڪf{^?5O|;<`vik}zzc;~j_!r{58/]YHc="G+J1!#oEZ ޼4a8ª?$YGgSgM\MndЏ&طl>f|qq];'ط{}g:OϿS0i2Ic aiGWYeG˃6rR!I1ˬjr ]Fߏ,l8DȠd\ݓQZq23!M&5s&  q &i]X.ZyoGB@W{18eJWx@e ъLy\A [mc=e ʟD[fٗqFFycF؇vs8K(ʾr,5Yk >af/0s O-AI ICؤ y0bN!1[i)0ڧoB|s0)`IM](RVKܭ %(8M4M4 4@WW2Ll8[^ocN ٜ_0l\"w5Ԟy$g3dmĎ'r갰{j|:t2rJ / dKUM5OrD'`w5GKG鵭$a Gg$XZzߌu5^㗵0"'VHS*Jŷӈ~ycJnW"oI:6s: ePנVzpxɰea` H'ئWV0y0ORm/{^ e4`{A&RZ=78ݏO}U|knY]]8 ˏ3RbOu[{CU\K-|׬`|u_N"[ެ #i,dq+FlL&Hy$(^UļWuOe&~Vճ7cǟsw9Q}٪ImpWad"Pʿua7QHNϋU"ԥv)#, Wmz6lE?B۠#H$Ϩ+s"ZRRD6&B]ZWљ-T%< M4M4 4@4MM4U̷$Ojq;U̷$Ojqhx^ݢoY"GH?5oxi迱红{y#[$?O|D7߼?Vq$sև"ݤpi#g<G_Q6H4MN' D 0\V&\)(9p ; t!Ar-䂤Oo} ~;/+*q&,fU.}Mˠ: ))e.Jk]gMAI :PItr)b[]T-ܑ "?ܭi@Vvxb(Fa=36eL&BlJ& @= 0_ 3\&& H#X6=H@)a)wEdTSɽ4|)9-г#t-<|ZXFNܠɓd!7qh FLjymۍUF!]>Z8A8 ŚXM&Lv{&<^NXNb)oo ~ &\K@fu3)/밇o2SI® pu,DnדDVށ -Iⷆŝ%ˡB\e0YW#'k9备ؔCSQmnlǾ^%eee$P 3"̴ߧthiiihie";T_s5aگe";T_s56D}_3V,O2j4:nc,υJ)Kᎍ_V{O ^NW*KF+zj/jR 22R-1lC)3 VTm-e;gnLV Zz1xqa?ee<صUQhsl$Y=F;F2,qS8oɟI#aR͎ Vq SIDS*?D,bb]%a}0"&6UI3:H\_$j20[>z4?b4IGyt udfpڢzdf% `ғ Z{H+wf6&3jk\,C_ { PSWhU}*H^zpD_&%G!'d=̒KQʊzc)Kld{1A{X繁`_(.81b숸G#fM)a5ĠOE.m/p]Ӌ_.>]h/ v0wtM/-<_\Gbm.^9ӔRKg\IgQ/Xw#y:Hb)%G|_G9Qa_LٟTW4{tm^aQZZLÊ[y/;#1gܕBG2=lRܨ-Nd̲ C&j0LE6[ فk._o,ʜgSԥx];$!6޺Bڼ)|?iqvl=5 }6vEpesWh/,f*B<1}΅BNN鿏NMxKU(EUU麨&3]7| F'V.^;BB:\kǨ4͠J [_Gc(|ۍľ&`,8KhXwNďº$6F#Y8d d.̱\ 0`[u-WY(,")ՔWш$E.豾Z=uy?GuwFyy/ R4@4MM4M4 4@5^<~Dvjõ^<~Dvjm{v-A迱&Ʈ;0X8dVc9k{q*d.<+ǔK8L ]s"I(֎72Y ;^Vc)I !sd7 bސ*zӸȮ+$j#>ۃy7rKlJ~f-=ip2dYJ)\>b#i D ?/qc41#t #Cc"<]HK\\2my1_Cias"^e@=@O zxU/r)<<Y^k֚̀0VZ"P5"%093(t3sBH2e ѤGꎢ#iU"T֨#OȆ kVKRX8μ/Nj~Hal-hJLm+IZ[zH_Fi)$F,Vk3/NdMjG{?$0<\ |Vgm42Uw0 |M𚻇Ҿ.g̟$^h}eC< A-yqߚVq-տB}%ߵ!oe8>.Mf婲'V8Qw]D2ݤY#VY[ubZ)Z8ghfW.1 4_gA8Ŕew)Hq 27hƑdOU*ETi#ؚFEziihie";T_s5gm5 yJpn]c~kM۵=0Vº$sJǧ=]d{:%]sc%mNh L۝m\ !';|+,ı" Hboz8ˏ6&e5}}5v1sc$HCfa&jC"yH ±Â|ǥ70ݒ_YG|~(q7w%ZInm_E]=U(nad N)VY%ӓIJzb3oa J:[`4l .2K!L-!NP(w|e{k&D [B*E4[ ѺBy<]:Rb?VׯaztW吃I*ޠV` j+;;a|;iyituw+ս%0tnŔ=[c8> Q ټ/ڜXPRT, =ມ("֓F̍@q>a*[Wƙ]ls9N6kl\C#{!ZY2bw27Y  "#eL |+|E['2k-rfs2 k*A^ %WAWUUEBDQmx6w|'Φ@p+ϗBK ]'ɑKNۀ]u7bPLs+‘vVq-.lT\[ l@ۏ0"|[ [%k? X=+dHP兎c|lh@`t+HGU+'Nn01a)*w3 q"UaT$5T]N'p#;BVS²'[tZѳx_ 0ѥJwHeNQ`Ҳc%o2anLW0]4dJ/ 4u9>Fc.&Oͫw}Mplb+b* @p UD8^U,#f X `-Yqwy\)Y}6Ⱦdc8x ۔W5Qe}wP W ŕ[ s˺ jPs:/7{S"w~iGi[s]xګ61lIq*h#{^ ?vyQ(9J,KEpA^ ?vyQ(9J,KEpA^ ?vyQ(KW2EaO2 Jpg{Sm\dl| U]:OFSiEp(.7kןaNׯ>*9evTLձIeFUs(mqUzׂ^u}y"C*7j|\M=YH)vyQ(z⣟6P7kz[  !6Tv͏[7/a>=HQȏrQlz~fDEp(.7kןaNׯ>*9ev:iEp(.7kןaNׯ>*9ev:iEp(.7kןaNׯ>*9ev:iEp(.7kןaNׯ>*9ev:iEp(.7kןaNׯ>*9ev:iEp(.7kןa\Az"JZoyqd-$Sw?NOע]XQD؏豍W2߀?/ǚKD_-A迱w-Ѿjz0]y5bqEAH7`gC%$nn%`z ?a迱Qym4[sa/a4Ý:~Rٸ:>CR#Mo8x 87IV%njI%7rFQVYG `OC"sqKj/-ATs!V d|Z~at%7me7+K.l V Rf>a*۬Dž`FqjEp/(|-̦Jxa=FI /Ӫ} MEP"%ę5A|6CRsс8ħƔkF9Q\%.9]ȼ98A5HHQ (,!Q3Ә3ienRad^$'h@scU7w1bU{?8il,87-vߡ0Vf4UkmP0nyZEk@ %EfI5l vU{;&|<džYf,TUB VT6ύlŪ3_^'@o /( ]PŪ5<,C ۶ݚGh:#]:vzW :c:cs|?}Q?_:t,t O-N>9vwc.+}C`z~rʷ>RIx5ܤ!tek`Dh葼c s:o!A!v 'ZgE]+ -xdDKm8o&C[O+ cMae1-2ʥ;]yY!uvxc~ EqbNKxYIxcnKHb4dT0ZjzH .8y-/ eG9%O]oŞ.R)Qdx%g:Y^4I{U,Úg|2#)7DžglP e'+&$5ZWLYRųn7pIFuKpx,Iedv.kA!1ˀUȏU,rsnP2q%a$*-oA}5M(:#I'/1f$Q,3Kd$ϭVִLL4pj¾S&m`*jcQzjH=r %.<2QcPoɉ?#j_ Il2-cg(AB=Ґiۅ0H2F>EepNux~YIxc,nH4d+T/mj{H u9- :sߙ(+s=aPJS!Tt~y~yWB9~+=凨zū迱v>Fi_Jj+2QlI<t[Z=md1 ׷+vCȪw+wkkL_EXc LqVKhXe|ս *6?uw)8QJꪹj\ 17 u`6Vx|?r9 a3:wxݰkqkfqگmqķ)i mMf<27"w*Zx˫R_c- x۴“蕰)O4s280 E$@a^*!Fyn%zr:9-,*NɗRwaZȃlj6%oդ ݵܱ 1@4[3: o/GYBW,O "?|?W6'vOpHCryVn4=P2qVR=bīZQUͨ8CN6D(Mgfֳ+<88aD("[F\_cĵ&~&"oH۽_@<\ɑ%}&bŘ4^Y\Qdv mV tS:MOvǣ۫TZ>8 H y#N*Mi H[GfKJ[[Ho` V[ TVn܎Lchew㊫x6`Z;###qZ _%JW{x' {ؿUs僎u+60F0X0is}knt%w6 ~9cFnޒd/*! 2f|0g Ul sr%]yc p6K0D-S؅6>E].3Mteޏ(퉅ymT0m8x]yχ3o!|YK$gd;~KbOM_`L?P pyT:OfBJE;ak㢰 >OE'ڶ 9kf=hF [:hD3}PWcarl+*p5lc8׍@68Zya a{)WyWvgyumu/_`ėno9/Zߓ9bLi.5%}LW֭X1si:|P_-j #S"z8^Jf&`~NoHeG2 썩M];[A(#DEEa9Uxͨsz&Z:j%.io-1m\wl%[Fk o8m '\Dٰۨ M4M4 4@5^<~Dvjõ^<~Dvjm{v-A迱̸ć@|7Ʈ9̨DoqS7 8\dc>Wn}^ce[;K/,D@mha1/FV\^QE2w_ _#?pK$V7O,< s# qHғ,Y%hcHAhCWaeck.`(7HqpGx>` lNPA@+zYŤH79r ļޣēXvdN%"e1YHđ^I>׈wxEQchyh27el5*xLSr?۹=Gw#]:Ϻs::|ǀM%X2a:_Bt5l~ޢ Š BDa~c[>&p 1_YGfZ2I+O=f%KK(;lOD[ ϺEZpȼyKHIEu}]v\'C^B/fM-n͆ %m\p"*c5lt8S@٫%>9OEʫxcUqN$پ]NOq$opurn?.68 eZrhvWyW[s]+Z61T1%l6 N,WDɁKѵ"RaG&rsr*R-Lhp@ŷ=4:%1 ̘E:qYIhNH!j><yv3:ʎ|eORE*d H܅8&F$ILe0|%|HL":CykQ.Yui.UT+dLQ#{ss m[`(Aje@Z'(e5񁾛8rɪy= tN~9lRf&_}Q:s5\UlE _G=1GON okgo>!iDЊu$uCȠ@CO.|mǂ3mЛ馀ihie";T_s5aگe";T_s56D}_ŦbY^}:_]cmǎ\Y_nFc4bv;ɬI1vEl[:<~z'lF wtnXDL.%bHBϒaҶIl7`I78laA2y.5Nĭ*lmGVge^yׇA%.Pfx"D6բAyE[a3[j;bMb% ? @l6shh 5'g95ڨor!Wb#/P0PXꑲ,kM fȑb ƖR?>j1.V~PIu~^r2bsD?"gㅫylI>6E&~GM5o>aAAf._>ǽ㯽R'ϻzܾνKyZb^7cwvAQߟz Ax\m2PVl`m)r^jY>TE\r `Pv[Q rP#/RyBC4yVaZ ٶvs Uw6tH4kqͲkka+ : l[u] ~90Iԃ'y58.ޑK5+̅8"q}l%lyX:o( 0A r"ыXΈjֈ_ZSVrw3qKO%O G xosǞ <5xC<]ۈn0M=WAD|orkI 9F(f.oZuLu8fՂca!x@Ds‚i(x'q}HIOVV eьEsDTFwcb[ޣ-}G3mqzjD;|;أIQM߫NWcLΤό΀)pBA[hC2-Pm̔'ckf,V|*Ts15>aS^$J8&q-atG[+C^B4 #%][f1ep3 X-^fVo%0xpۡEݛS+f=1@1B^YSXAKmx'WI(W#gsO4@2C8 #6Ej&$n Yӯm^DS+n~ jٛcϋ\x(bAcsW0 값&'1CbaFb1 Dp]݋ :dxl6N}M@a~RW+Ll#୸I_SArd)@"{#v7xr̰rU]m~BX7EQXCIb)/!iȾ &|HfSdzE[7\IfbH-4--#$\_ LX3ᆑՈ4*i B$Ϡ'kwz>YR(3N,Vi>59/` BGF_HVnAM\PPMeAE./Fsn_Ie q$L`U_ nO]X.YBҝ'$`>y4#A j}ihiiihǙoHXvǙoHM/n6E5}}5v^}_˷3ls_0u bN']1/-F). lGV.dX&fɜ 73jz|(HkOqmw,7O+t=a{M"f%9O#+Cx]DkdpT\lV{z{-q XMrYF/IQIc0׍(6-0BZ4eYleS҉H;t=} xB6N{Qlx{z@%Ng=b0P/Tw{{Aavsكv3O{6u<.}4SX꼾+R?"#.zqiyituw+Xa3fy UeԕX88rfCi\LTp]:W,U!vFl~O?ɷf:S10#w"#S[{Ub}Q^ M JLӌ $evB3 Z %8 A{0"M'mioXᄽ{B;dOy{|uzN=\莧?4>q<#@gQY+֫#&/9vѺ+᪪ p0p xl;~!v9Pg㉝' |+G6wR@q-=HjRIͫ{zlVI}e~\yXqRw2)ċ)mQ;f1V!P29|2bKBL5zYm:ř+.˄31䓓f)zi`q;. y?XYaX3K~ph eyĥBe[0{@0㙣B~NŃgłi 4(ITE˹=czh̀6@w禚hiii['E8V['E8So ۴M/ndC/D?XQoX*BUD^7&crwr|L0?{WcWku[ޅo'zo ankz~g'O s[M7~JF])Or|L0?Ntw䮔n|Ґo ankz~g'O s[M7~JF])Or|L0?Ntw䮔n|Ґo ankz~g'O s[M7~JF])Or|L0?Ntw䮔n|Ґo ankz~g'O s[M7~JF])Or|L0?Ntw䮔n|Ґo ankz~g'O s[M7~JF])Or|L0?Ntw䮔n|Ґo ankzcv}kSΌ)oy}K2ۏ܈Df=Ҥzx!Gޑkv_ ce";T_s56k .j _E]Z47:%~Ƹ(`9Er*;罵Ͱ$n(Px/ q*:毿Ʈy[<-o?=pϫ@&P4VBbvأ`\RPj6 Zz( 7C-7{HUI5莚KΪ-ZGӘ_3UcJɆǖ/c>QI* R՚`xN{,+0RO܈M`ʌmȶ63ɱxIDHphxBW1kEe`)6q$Ph/k'wᚶqS1LzxpYBp{f}USX ֺutU.$rN p}c~.lDwa}*Y2e<8#|u9u4W8XQll_Sj :23i|3Iɋ?)a%l,:( WSQmOڣ馚['E8V['E8So ۴M/n2KEXݦ!Ny03z= $;[8=[V&!Ι\~#~?4;V_vUuMi~?4yg/FS{߸oM4󵟥y=og7}O;Y_/FS{߸oM4󵟥y=og7}O;Y_/FS{߸oM4󵟥y=og7}O;Y_/FS{߸oM4󵟥y=og7}O;Y_/FS{߸oM4󵟥y=og7}x| GYl3 .^G{}W޳iw7v endstream endobj 399 0 obj << /Type /XObject /Subtype /Image /Width 173 /Height 135 /BitsPerComponent 8 /Length 11009 /ColorSpace /DeviceRGB /Filter /DCTDecode >> stream JFIFa[CC" ?  67VWw%U &'"#$(9!Qq2a ?#pFŖbao #w[_s?3bpWatC1W螲tY}PAGy;tQ$c{XnJkWA[|oz0^+_'?[CȺ{&m?\[Xn*^aPĢo_/,&05aiak2^7ϐvNo|U+*=SqW&`zJƹh6cXK|E<{)gےKk"*|9.Y-bk†8II6h9.͑z;n742q5gZKA}U},7=U},7e ,32r 'A =?l%sgl]eȁh)BUu<N=X,U]n,[R[kr> K+gY@H{Bf4pQĭ2-Ʋj'EVH)`$LfaM̄$* nEBY@-r$HVܹs> B>uUa]nw}scya"{j{`=XHY{{]? bCae\:a]p$ãu=apP+ʫǢX>C\L+(1$[dɬtUJ\݁wq[ʍlr:;hkovg=5hj(w`k-Jpa!0H+8nгPNpY |$Tt}6v+C $0qoK1%J٦Ap1p4ҦDdߋbyadpȟow! U˦v+?JʁDzDNUWa) xVTbb#PDS#>Ơ˙.L{SbX;8TdK&Q϶ʻ>IǤ7q]N5L a0}J[arr~ 3[[70$8phƒ .$EL#f>SYUgqe!{vwGF:^&q·:S<*s]Y[sE!+ٰ" ݮ L "Ҩi{v>Oy4U&*t楧nv⌿5:]"ONMvv퇹̵BqLNJZax2޳-S)o$2+cZݞ }T0jևu^AmlەjٺU >yy:( DYSl%VM,Pad -qU`iGWnWn-08dpNa3sMjW O0XRcR&)nGW'S uzMq5oln摝wtvs{w1mk];#T;v}gIR\-L”NZ߱NPR"NšITY 33ُU_ OU_ TYh ^!n ^ MfKCyu (YpXBA,<ȉVBvy@zݪp5KYX_F#H/0VECS*;!APTkO[EFh4؉tuZZM8KXVFqdOEa` r[R`u)RqMdYZQĹWjM񁞏?qgJ8|=ۗJQwN)U1%:z,xѕ$[MK&V-HᶽVkА 3 [{T3&hxSK!ADsqJƴnI{7ה*j9גp i"e%Da\GhRAɮ CW.- Ƒd'"H]6\[n[3(1|x( 8 Gq[Ql8MJGeanKx taoZ#*EH0-;3'K6J"QD-h3S|P"lCq\aBEf+MƑ q b{ CƊ|@FfObm|)a%mV=[Sl{vHΝ/;`t]\BzC4`ClyҤ`eˏ:G"{-=Z}fmp-xl-ftUv쳄B <"o)_i|(xu-Y4Q7Rn]/9cAx2O#-7t! [;:ʋs#טֶiA\Sxk6R 9b$]`hvQ&̇Sdܑu_ǁ.챒n"^Kutj}=_aډ.2vFv>RguCWz__sΆt+8;|OcE[20Y̗~_幑t = w2*Y&82*{ԅl]$8k,',JYvA/fE.>zJKq޵x fF Z-$inax4u2lziS %8fq̭i) aNB]lڀe1mb|\.l㼰;ⲭE_$UuQ:L :`.Vq]fb„0v|BލUuuvT · t~gX)佇P¤b+J߼,OݪV1jգ]qZKDxC^='H @$q5kɾr1bt=Y7Wl}2S׻@|Rǘڇ{%CZPq4FRN.NTXV٫#̌ԑ XN,IrJF|&ޑݱF* vTT!=Zh=ao'\хf; y){9͵w'2#FU{C=T u=d,`;M_3*4qqi(NXfuiVyAś z`oM;87+mnEF¹P\km51us"|2zժYV<㜗ӗ-".MV(-̳PV ,L., vCG27qꟵ??^Kfurapͷ{1v{y!ikv#%f>KC%|%I#lIV7Wxf׈]Lc~vwz8_ɿPg:\e?,}TgpI|~ڱ|,*m{>F]yZIrݰܫK0"ga[Ut %Ykl䷗20dJZч7|㍬3xin5fHQ덍BO0šyfeSP#)$Y@$ v]s4פwzw>ʯh=L\jzPNp!ӵ :AxOMr9ϯh{õ;n)}Sc:p@ cTC42|)>Rf܈2زcy~l/ZZsn? _~l/u\nΚg4d?~}2Kcqvw:k͟ѐwh.7Y1Ywc-v鷅3\!c 8Ei0q@lR>yt;b7tiM6~FCߛ?G!Kf;gsn? _~l/u\nΚg4d?~}2Kcqvw:k͟ѐwh.7Y16~FCߛ?G!Kf;gsn? _~l/u\nΨo˲(/\O~l/=s3ݏ}lonloU!vww8vwvx76v8x6|x88<88/0y {õ^.ng2s x"@rTN 2"&ELzXc#n$tĩ-N@'a񍪆Z*u(5Oy;{$hX' Ww6>TB|k'%8ƌȊj6$YOaUzjǠIDpNزJgxlhԄ{HK qx,F x3QTþtr-.t&FW/tw2X } ;КB׹{Gvuz`}۷:K9CckoVpjv5OY5ĬL|y!q[=K0-u۪j{"uB1g4ז?^tR]7Y[78jeGI9d Wv ⎧8J3- m[%p\ 5ݰTe `+ z "E9,XS ؕ?~S6G+shSPn%)gL~^v85]XcE$ZF%560fmxYEHrHYu0d^@ ,d 9 &Q;Dمto3Aƚ1坙rdLK/re+`$Qxᆲ&zlI3D]LYfT8wʆ|aKY-jţ@؆CY6Y LWU)V%[yl"x-@f<1؅|ؽ@kO.89+CgAoI<' +-Ob64CsbpOWNZdH[IlǻbpLVѵ,;sj*g7kj[}SKzGCpv1=xj͟kV?i3Qm>Bt% A ٻMtW6zĺ m&3iجn S8Ur^"eqJm is113IJq=Ddbdږs7x2_32iEo>iިU2u6I`nLaڕv1p/NoR=I@ lIvU#aVcls; (R=ij|Lp^ƚhiiiho˲(/^o˲(/N~3-_L;Yvm>E \}=֙_¬Ycd^Z0BF6$꧅59CFW`j&{õn`TxJb/6#`s[-Дjp{efM馵ʴƟR$RX\bPQ]ٻhE\ aX<'f|G3EIض59dOҌ5\i#l,aR GbF{}qy"/n_A.9tfWcVTs!-3^W@I$F.xIqD#8_f[%"M$s#> e"#5{MK,KYpk#$xCe2ݬR5qj6_,ط>xƀ-%lĜ|Ԕp Eޒhn )/h,W0-L~ĬS`&Icn f>jJڴfrAJK,X 0&~ P@ŷ+jsyeKE·NF}J7D 6 CJAw`04[UNiEخR[Hh/,J^^+~Ŝ){sskd@ u$17p]X1Y5Nf۶=iەW30񇼫 &fӤj(pK.t 47yaRajҘBʐY/U1TB9,o ˲J_+V1d:3NJ/cTe [6RNekdFzZ݊¯`K!!h/'^\yJ6rO[{Ce%^|_y+}`|w_ngB[Qrnɱ*7}oq=[TjةԬcI,v|W5C ڟc^nK\iM4 4@4MM4M4 4@5G~]AXjG~]AXjs_`g,o!I]2=1HR@q~$Q: I5x'杵w4k/>'杵w>'杵w4^Jג>'杵w>'杵w4^Jג>'杵w>'杵w4^Jג>'杵w>'杵w4^Jג>'杵w>'杵w4^Jג>'杵w>'杵w4^Jג>'杵w>'杵w4^Jג>'杵w>'杵w4^Jג>'杵w>'杵w4^Jג>'杵wW6^^*w8{уQƬ3DgJnm ,f?N(bmqibb endstream endobj 404 0 obj << /D [402 0 R /XYZ 86.4 708.045 null] >> endobj 122 0 obj << /D [402 0 R /XYZ 86.4 553.908 null] >> endobj 126 0 obj << /D [402 0 R /XYZ 86.4 506.491 null] >> endobj 130 0 obj << /D [402 0 R /XYZ 86.4 194.393 null] >> endobj 401 0 obj << /Font << /F20 263 0 R /F17 200 0 R /F29 277 0 R /F22 239 0 R /F37 405 0 R >> /XObject << /Im2 398 0 R /Im3 399 0 R >> /ProcSet [ /PDF /Text /ImageC ] >> endobj 410 0 obj << /Length 306 /Filter /FlateDecode >> stream xڭ=O0 ggLKAUZ1AP;I #r_~_?yfK r4/ c=pc-z"Sif. i4q!=i~WU*uvv]-T?KFHQ /wK*B`Z0zs9KNӊv<V;ԯ JnS=$ !0DZʘu-/8"do_\!YXvݵgԕIXNV~!M98o.?hOߴ3-o"hmr̄ڍ?3 endstream endobj 409 0 obj << /Type /Page /Contents 410 0 R /Resources 408 0 R /MediaBox [0 0 612 792] /Parent 393 0 R >> endobj 400 0 obj << /Type /XObject /Subtype /Image /Width 291 /Height 489 /BitsPerComponent 8 /Length 48322 /ColorSpace /DeviceRGB /Filter /DCTDecode >> stream JFIFa[CC#"  T W67 %Vw&(U$'#8Ffg"9EGH)DXe5:r!Q!qA1a ?!u!u]]{ !YڲYw{wsos}?.wϧ= XKKi~~K3*w~~~k]alm2e:d|Qg=/N5A}> 75tۊphc&})apw) vIͣ/Q 2:aB!{ahG*KʦڶT0$ǙF}/stgj.`M"8ĥvs*6,Eb70\*bns.cF " q]'W'譼lG7K.G!{{Mv=^k;TJ b@޴LܾJ4;6$&< /ݏyGQYscw2s:=-7<x1oSP͋ Y!}P$E& ,q! G!jN}uO׿VW"[he 63$.cdrc l㭞C%k30Z ~5+ /[M;\P>>Mו%u2gҜxx{$~6@!0yy%A_FQP^Oa[Aாܡ De5H:ْW]|#0:N:o;}qt >[{3~}hs3}>U"ʶ=lhQۚePOAPDCVp3 A0 B}ˮjY˄!Zؠ+u 7~`9o2~Cw [9.j¿bBd-ISo6gWvn %):|]\3lo;%}Obzggm1ߘ];x9@Z*\Xdni`nְh3%Qr+㷗u; #}Ŏ(;mӗ؍s[yde.*r6dFFYv4rco HQo-`S`ܐZ1ׄ(PuO׿Ӻtgk^]=^k;N}{awT{;{Mv So]7׺h6uO׿Ӻtgk^]=^k;N}{awT{;{Mv So]7$Fo*o m)hCFd $-]Dc#ҌD#^_H۪VV27>\}ZVQ AḑsYU`_lQ+s B𣶴)޺]}ڞ`,'*EU аuO׿ӺtgjY)ɧmm55ec"XjE>4"^)Uqݪ;-Mby&:+jAi 4XHfB^4CkZLV׊Ϸd//7;ӗg6 *jH<So]7ڃg}f!E8fh'Ua>Cj[[x#zODuᵌ;9;j7ǬCg3LNQa̛߾UA a! b%4bK0(xez9906/UK]7wT{U'+ ѿ7Ws32x-Yc-;5%vnf"'c[PRXSs8aR$XjlxnȢީgWlVƪ1dx!!r'wݸ4:!euP}P̺*h*)b{*2wۓe3EIfHkNίMa 3;!kyt_rfZI0΁G#.i wR%^ >J<*+)H2zI79@2H[?˜xySV7$2jl6g99} $ ۳s>WtN+qꎐCf赌$Ine*Yiq,@BJjY>cuנ{f ~&$d`,{vǯ j- 9F$UD#۫>>ܔLLˆbIfI6~ľnyIC\JeKPPe%|HL=GUo.Yui.-mK,+cÇo#{ooi8ߕ2T=Q2"2գGlZߟgeۄ1zͺy֗#v"[Ce$Vw.<2 \MZ5^Sͱ,6WZy3Xn3wgJnCئ.pz2;#2<2\]E~eTa4h rJZ|||irHd-̦Jxa=I /} MEP"%ę5A}t6CR`\xd jM[cY'.ImS[ZuqS=|[bfs-a"[(1+I: N--=N/asN z>ENjYWA/wf>d qQlp2NÊ>{( X^X/kz>q'c;cԏǪ03aŬke#drDD%1T& hFC,!A״W0dD購qL3l6 2wGBU[=Qy` DR?a/wH{&=}zvC;GHWr0gԙO5@@jڝ:=$QZ+EjEaQq^`tLʸG|yNZ^;D VݳmLgy1q[JrZLǭ&gyYledzx˭0+ ٕ~xMOg.k=Vor'p,~W".=Qs4ǞwWN*Bj!G7lDžb52`\oҜ1m0/I<ȭ1~ wdvA rBk/_sSΓlx&lV7({M4 4@M4 4@M4 4@M4 4@׆MX Pj:4v/ Ғo@GlB)TLhMG]iei2+aPȓkA[]9Ziƕc ܹRl:+W`O!E'cY#Q(-CI-h줜G8D>hg.<2J{v7^am[{zz~pYo/e{MqLbJ`717PPOU^_6$'. MwBDiKZcZcӭp}5vْdhېn0%׫%I|FUGl/DmqUDke$^u}x=:*6kM l>hӪWq'=JJZ7dz4Qf,:8ą6#K2=0TJ*߀gYNlnwN,c1.y gKqZRls0ts2?;儒ņI>o)0(\*&\m4ei|:{.jlnXYpdq\Ӻ 'Bp{oj}d\Uy;Jֺ oe.$}b\` g Otp28;_%$ZxѴ-ܹFx"lcY܋" Lid`LIn¡Һk _=V%rxZ, hgo ǀY2%_[uB L_Wyay| n.08:?Ħ5P KCx :!͍XUXoHZ006u9d]8627Qmm|NNat(~0w,B..d@mHF:1f =ʁ֐z:M:VOAC?4Iy@4VLLC@nI(h1AEU\5lzU$m2_qqy?Hb;()p.kL|0ky`ppl:D_/ૡR )fWUk-A ۂs7sNP]ݵ O4x#.I8`b+~_lnn4O>39ךּKq:y׀_pk94lbqx_H-iFxߜZNHX;&;g1 #n-~8_ L۠ٴ( "slo1eЧy>[q'cc*kSo>}t&Y U mPlA{?\?\'^9}ɣ l9x\71`!K\!&#9d¶tp= =8$IA&Z=_ޥ[ѹĢ_ j:w>*Oms`@6+l7Cj*0l v=8j ٬VI[$LFٰ~Hz[j!&Fb"c)?=c6DbPfsnlxuWg|LrsGMg!rs{&34;*L> aUU⎿Q4Tw%\EW֛ N#Fy9dnAp *n* mF6OV~漗kėLbJ` ˷OuqwOOUQ~ $')k?RwئD'KF2C!o'ߪ٪.!/u;R \-df܅BxqYbpݎj&y&BBAWzR/Morz\>=q.Իwuޟz~_x o[z hbZ]zw6w#,5;$&Gd;ēXMVr :GL/LsS[QC;-=ia`1G :pV ZQS ePTr]4@M4 4@M4 4@M4 4@M4 4@M4~;:+L4~;:+L5:u?o5ֽ׮-۬eAnZxz?g#{ւ{DPxn{>BO" c6,Z6~ff߰t כ?FCK͟٣!f7lL9X7^l?}/ӯ6~fݳ3c\R܃ȼv/V_S!M@#P74jei ? $/I)\EdM ]y4d?N~2_cvtnَ pOr5by rh];&UށHttI]人QmaM MRRR[ כ?FCK͟٣!f7lLIe"׸gNˠ>fJc:^F㰲ÿxJf7lLߧgWicsߧgWicsNW׺M_ߚsWjByeFb6¬qb#&,2H1z~CMƊC[BnL$-;}Bi=|J-`=UTk֌n4ZHAOck)awy0HLJE XUQ5@ =1-͜aYS˷Fhb(,Q2Ł626M8GUUhٵdcTV8p}it J$ge:YIդESGrsnخ-Li$@÷θS ree`˜!VϦxThW`.]^$Zw.nDPluUNO/H ճ2`5~NjHEm3(=.ʚVӫ)q$l s ͖Nr( 2J~ԫ(@)GK[F<YZވAE"`HnnȜB )i˒xLiL7>ƑCN\ oF/S L'&(U Ҷ-X[9W`(׍PZ'(buq񁾛m!z= ؗ>ZN̎0j3K9㝈kfd$FlO)v e<̀mX[6MN$7+vwcwk^i&#5\V2K7#-@"}Wv*d-dא#qi馚iiiiiiiiiiiKZcZcӭp}5vΖ~933 msi9+DZ> k.er2vgÎ+eee30ɇ-AI Z?o5ֽ 95koO1[&&8t_\g1 #AVBǠ]XV0͕S-oԭF3]BUs[ ńj9h8$%,fe $m0p,\1<8AaGW"ygM z$ Id ;p#%˜HAǼ7ŊمT W Rd6Y^]i^C՟AXKŢ cu48 S)3 wa=䙴Y6%[CEp(zp? ܻe/ ;Tb! v #A;l_oPWn%A©q_T+Gى7hihihihihihih+vu~V7:hvu~V7:jt\5~~~k]I#mNG| [ ƲP< $ *$|s-3BYc7W|ƒS8nBtnM_ߚsWjظ!? s [/'yCdÎ5XFy24/9F%OCn$^mHVJ$#2m#{}iea-mc"pI(ܼ-wR2P1~k>-p|2.Dy;8x$]M\I36B]71í*PW@lήdNK>S#} UО;_.δ?O^Q\I/Û̻)VKMP+*ogWԇcƪL J5ml=8hOXe^"ʺ1&SP2hr7[!+G0Aȴc6$n+I@YɌ bK%d=0>SrEF<0r5-޵7ɂLlO ޥr*FJ 5㮟)r_tW 3C!sVck5]X|!6B~ bR7;_N-b=>f쨞!IfBKL,&z[5YjGi !7Om˺;AS#9׫O >;’,np f+2yXxz<&$bFܞQ>HY 4WFcoQȾ߲Ncoz슮= -Y(Q ?{oR\(+fR*f/kik6f@Cxz u&k@[q6ȼSark`14$ʠib5#wf|'d֠$4cs QG0+sա|9Y_mpm"<ð%xGo7 QD.(? 7iDrߗA$MōMx{6c}βGn)#)'^ИNyP(.஢?'8'''?r:NuЍ,6`` 33$fɦP5 "o,1NXFpa\vWVaɣ 4A>4{"ݚJ埉`pw3[6d$Nj5~y[֋\T|e~wqv_\W=+^ HGtzxqtH G%BF^A$^һKi E-$msL(ʈy}1[tr$Lh\|ym;r+{ܗs; lS2)ȵM@Nؘ</8fعQyb:a>oP6́2̤hDϣ]Dr 158bN5Trj֑,9t lIbV$m<^XJ@"MZ#}l*o2"!/+ UjLY\4_:|M[sMjv> U G4RzӘta~]gCeQ'KذYm 4@M4 4@M4 4@M4 4@M4 4@M4~;:+L4~;:+L5:u?o5ֽjUcM9k̯_ Ɉq ?fneҭ˔U6b 5nCdPnD(c2, X͡Bv4gqSQɼ8lMJ`3[84-6*Fԝzuu +2l]|g*hl T4^L2~X_FMX)}\o8c MP+_r%OVJ{K@PYo/~-ۍĩ 5# 5d Z4We#wPTeb"p5ev^p"I.!Ql-w8n"QĴhԭsA Ȣ;MB:XĿ2$Ĥ%uEAX0oIxHv#]-$>ĥrkt#f=b+++)&Rgeof60 ʤRt8Vw 70'ćה]^$.uZ?o5yI9d۟YO-`"Oݤ~Lb|_6"6̬oU+hϐB:_ `*<|a"mGퟌxseOf5uR8 , s\If[umIEG܍٤܅hDאp'N!PKHTkJ-:$B_[!"fprN[6jky(# BW f XDEFpcx83.&]aGeͯ. sI'{3ڌ>Ld0JxP%_6ʀ3>;__nXXu7>{8+\m=1s>hayBeHO9icu+j(^\4]8D-[ 7m Jj?Le`1(2FEm@>I\B_mB:*_qJ2%(u2 ]Lt=ʚ9.c7pr{[? 8LvPCnLq|&X ttW}y,|۴}!?_uG=!'AǹFnhɎ\㮆?#E7.I xIW4(::yfy#gŰ-ǻ\kXDi5c8&?P6g0Pu97ػ3$3$PaC8slW({ژrGrF{V6xm CȊ2/o+< ;uy93i XWM8m! g"|+EVocۅ`^,VCB1­+~>Y ^63 nh:,owPr 쯔TR /v'}9c=#my7,]Xuj<5a%;̧Zf #2Les=u" HGsGRyϥ-uDK9K9 Zvq'- zfUE+fiH)ΡGy\pG[MrU:q5 `*00s;U՘克MQ2 n+|RM6DKladZ,6V)dⵕ^$$$,",C˓,]~@els<|$Eg% vy"y(6,lN%lxttkBX;JXogLe s;㳘Luun}"y )GK[Nh]Ux.jөcoGUczNw?BݶS { ^^ܠ#}eP9 ꦎ$Lbl9g U!,b*]wwO0W̟z>j<]J5ݗ8ج[| 8c z\AVozM| {}YD 0b1"Qkl10.23>ɧqE'^zfOP{-j8Q6hihihihihih+vu~V7:hvu~V7:jt\5~~~k]{}5v틘@[ԄN}dĬbQu WpFXxU4۵v Y'1nBg P{t(YMVw)P6&?ݯoL}E'" UKPDmѸ ΂1"puBT7jRQ9aP:!WT\~IS¥ƘE?N}5<41YVH[*=ϕ?)CXyD-qbU5RT~՗3!łlp۾i b{S[2ʂYIZ4vbw.|JX1f $r(0p Ģ<ݫa՜ZKK\XZAfS 8\C˷ 9g c٤7`1t<rgȺ_p)8yEL(d!^vu3S׻1oadpX4Q a k]`*-&Zhz@D.s.6NOjnٝH-fbك,zyԳn]Dg,}ʽݎNs{SS,ûrHlNHZ<⫭솈%|1xoO`oB&Rp^x Dty]e CW%5pPq弆*f\:^@j;3=ARp,gǢ1T_8}k˱(oɾgqqĿ`ߑu*!zoU= '}f3ȜIac--FDcaSm$m=ƌ2xkI_cHkQ|l~0~TV&o9#2S Fm 6ʦ%uˁhFf `Vcʢz~?*!N0_U ~CwhىXuKu#2I z YU]m~Wќp]P.9=!-Y 2f*w]o[+њqJ +T@ ~d9ߐ"FO˨o/UƢ8瑸LS}g5x69 MD⡇~CdrM,Ss Ȍ^g)̢őPW+'1*ܑ2+/{8WCb87{Žvy{3i|m]n003q7!o9#e;UdӋǼVB".C3M.᠀yᥬ+c tiiiiiiii Ŀ~_?Κ?~_?Κ: _ߚsWj#ܮ7JvЫ!6S2#MHOxʒ`q@B#nC'6\sxV+cc[Vٞ_KcJGmI HXsoGf|NVL>ȱ $OTeӇ6y@K]~$ WKGKWʘn. [%h4*n%dL&CV`ovҍ2!QCڷɣ+ ۺn Ur%nm=rSqЇMt]4kKȵSrESa^9J6!Wq `kH]UjʎR(8Kd {)lZl8#27▇l0'`\'i"yV" * 1-nfjg=`/q@bNd_HpI'z7R:-1/Vd\(7ׇsx ʇt1+KX4Pе ?yer$ J#$mc.FÒ eSPe;8A 節iZD{!j` QtipcT׭&XBᚶqS1LzxpYBp{f}USXJֺute.$, Ȱ~5%Rq5N/0'qzN(b67¬ӓlk[*ZCʈ{Ev9l8}!Ds{_HZ來g7=.ge3Dj/G'k:ъgQz]]5kWIRH^V`kf@ ,3c=VAOx_r#ܔtٱ7x7[q}?EWǑr/0kczƧ!>[)w(3y!-TWmڑ[nYH&=oQ7 @d{sU{Ivn000هX))Ð#.:2M VCQȯ,η 8*wc[#ҩA+ KN;5l cX! u 2`TA4:TӶ<\;ǔT% -9d+ Hm7b\p FϒBkݭבldI:dٕ{M4 4@M4 4@M4 4@M4 4@M4~;:+L4~;:+L5:u?o5km#O̩ʄ걓9KnCxYěZctKeculn5޴n$lL0*x7YE_jFEap78Gdܣ-gL#hj!@vHˣZB]԰,`WO ʅʤ+"#sYSа(UN6p6o=8&9wVDHc@MMZi(t O~$dJSbJcϑ˱9g{[%'68x@:17Fݱ HQFQϯ%2ᘒYM2߶/JА;Ǫ2@Y&ZhX,zp2Wc^YO"Bn[bhl#8.c(i;sU6iح@2W8ݐS%۪QYxw*" ZϾ&$qNf2rS"4n9dr3F__VckB~|yzF 8,xq $(ww :m"kT QZ"!ezq!+͍kMrywb0B3SI^#{+5qMC_+ZksNAT5e|[KKtZcU5pl8o8M ;z#l9sAgyG5%D=TgO\/==<9ⵞW=xf9lmdd {+ %'R @Y.eh=*sr_B-+DžI:,̙5TBs^[/)k6S8KZ2W=J\XYlf{irWUX㚐N%;$IhżCo%궬wS? x3זY X0ю]NWE>m\'Dz*Y-V mhʪڵ*8[(W>|#h nP]Q.PַA2,kð2Ĩ}gm_RXVOKax-JI)o9w[f劝9o(Kr-R7l-ℙѷ7H؍8WᤑբT["UҺzL;d~WSxFR$Vk~}EWn4J xKז6CZ_RplUm [tZSj :23i|3Iɋ?)a%l,:( 񪮦ڟGGO]+3!40ʌJu5(Q/[jnqdDjDbe:~XW@Bspq'3 t)?y6_S->jYFzsĬ7h/4{ve[ru"cAJ n1c5:ʨ5cU$QC_szea!(Po'ĕSNyBL@dKV]ZK&"ָd0b3LVkH{=}7vCǸ=BU1םޓΈozkozG~hihihihi/ߧgWicsߧgWicsNWڌ:f8|H lDL"Δp 6s+Mg+شBM 軒vo&@[kzM]|2x}5vʠg-n9JC;ql!΃;Qqq$I=w2 Xn`c]}^<8sOeeM6=ZZ, c'9Z`= bIiyituszu5ma嫠˗ssKI*q- ?+eQ aL(DdIܶ+1"r$0FȌiJp . 7{.il%D@!4xp7 Sr a2:&ɒӌC.pI$ ީ:6(KKW.]],1"mQMWS-Ո]dllx4@Pf0d#וR%QUˋeSm[*L ċ#z>gWs<1pϐ8P7 o_5 }/ 66,ɸ/lm`U (!Y^7y*z;˳L/ mdrIg;qY4|">ҵy%+lR]Z8,V9IOz:kܓs/y/Nk^?U}};Ş췽0D-S؅V8GEw6іHw'"^7~GlL/] {KjHmK.PE1þtqʚ]fvdR.;E×ڹvh?"BShgB*)㫛ʻS;ҨIQtȧl4-ptVhV-|lGhg^Ս(o ql.MBs@NY1keuqskƠ@ ӭj=t00ϤJ;H3:涺0bKޏꬢFK7XK!f, {_c%a>vL\xX{(/r_q#S"z8B%30o7wo2#FԦ WWVDEEa9Uxͨsz& h骉dY/G^sLBq':-Rd"EEL ӘD^ %dVf/Y~Cq_čd8=0^SX"ȱcfad:7P&D./yYEL^VG.\0[?z7X`KNiiiiii Ŀ~_?Κ?~_?Κ: _ߚsWj>ɹy` ! iym1YY63% /ȵ!! iuyui.U3gɑ2dۛ]o)EDDUDjDbI>ղV4-hφF옋#Yma ֈZ94l.!CqQG1$HFǝc'˗#{syy`Q n xI0X3%II(gǵ! iKyKi-MlƏ2;{;J_pt'R;3ccvu>F$ċ&uX/Pq)ϗF$N)vD+*@+A.+aUgQ*`nG#MbEٓE:do8g#Ey';^"EUݗԪ3Ǩx07#;ԥgN~5)~þ1f:f7l^P2p/j'݉t {}WPDpܾG5#C}^ITjm3R|%mHɁT!gƨ۫>>ۭ5+m<;|;ԥgN~5)~þ1f:f7l^U2pQ>$(ځ&}5 \/+#/^H.&CcB>/S%,#c }}g:#]9w'~U?/=)Oƥ/8w:wKΙ11f:`x\IKչF2Z`&y@ZIȑzr\IZno SݜOݣ(:j^~5)~þӿJ_ptnَ1JH&O\Gi}eaҶIh$>!Hq-.,TJہ>f~nn bK FShebjFI7^I T24fUUq/"U\Vƶ؋?b=1wKΝDjRc}cvtnَ;Ւؤ L#at6k٢52/:>ۭ5+m<;|;ԥgN~5)~þ1f:f7lXwV٨n.c&`2I-8φP+ƴ|C>5e4j*ՅMY`VWSm5$!22N KU²e!2J|[ DKeդVV)RDgɑ2eF/Q?XlOƥ/8w:f7lL6\nf-SL||H0 @5Q lҔ2EDxMO9Aplz-_'z?qz[ɗl5_TvNq[4FQaEWǏLQӫcf;ԥgN~5)~þ1f:f7l^U2ucqm Es5bdZ^0Xh7h,ogAkEMc"~亸;dNS.KZszx p'BEm\f]_^ZY\;vuk.\sJ_pt'R;3ccvu֥'R;;ԥgLݳm5{ԥgN~5)~þ1f:f7l[kMj^~5)~þӿJ_ptnَ1ZJ_pt'R;3ccvu֥'R;;ԥgLݳm5{ԥg^yNQke"=ս-zd+__g"\/>eloo} 1f:f7lU~;:+L4~;:+L5:uYDD nAkӽhsc~ggo88q_9/u~~~k]xzXf97oYtB#p:_^iHOAr}˄ wSn!], o…rV_?=!rV_?62lɬJ2jC-o6i*C՗:uq_9/uiz՗:uq_9/uiz՗:uq_9/uf98emdw{zx{+0k~ގ'R @ge*sn'd=\WC:՗:Ǵd=\WC:՗:Ǵd=\WC:՗:Ǵd=\WC:՗:Ǵd=\WC:՗:Ǵd=\WC:՗:Ǵd=\WC:՗:Ǵd=\WC:՗:Ǵd=\WC:՗:Ǵd=\WC| mno^ol[nmomnpnmnׅ/ߧgWicsߧgWicsNWڦ >t(DEʔ8he4pWsBϾ2dT;'W.;jkZw5xAQ"e) TVG^d si3vG6i%.;yJ& vaDbWj݋jg-t̏|^w z{c;qO廪˰ki0ĺXIA&@UהUyp l  U$HO6Tױ L; ?D|2 'h< KےA ?(0ҵ욽Lx2=$b\\*i$+\AOg±P.J0ۉxۥ\5E^>P:0DK/aǿ w"XQŶ-3ᡒ 3S߂9^QcC o$N &nP!W diJFUn;WW0rmDQݴEmreVi 1ЙL=q0P3r4 R+1 C&%ms$d8}As 8e1i>6ɫIfLZ/KW2o(P;ՆU;IIrL  B627C=UTxttq"ōhُhihihihihi/ߧgWicsߧgWicsNWڊ ,QAe9>zWSQ =[x$Rx=,3suDWjTGsO[Ü">f> )1|n LwW.H6wtef|P`¾k}sxtzUwb;5IL̜M05Bs)ď^.mҫe7 h+&.̮Y:aAP=uސnfLoi^r1I祛K+D:t7i蠶{&53n2̼F7B95űsqix kzR!QGW_鱉Hf͉qcO4@2C8 #6Ej&$n Yӯm^DS+n~ jٛcϋ_ eF>1U^>Z"ľBב{&h1N1֨u4q*JrL[vlDbm5km+  j ʹY˨`X Zcx(m5B 4@M4 4@M4 4@M4 4@M4 4@M4 4@M4~;:+L4~;:+L5:u?o5ֽjPs˃.H6(L&|QVz9+p/ Nm"y-e&ɖHJ:C*bXT= o- r)z/E[xITWCXF 0KDov/WPOU>v<Ӕم :K p.~UfNuveV27TPC<8W]A)vQ5tTf#˜0`8?VVUیѴ3fh$ `["-5ýx\i8oڗ"-ŵՕ ]^T Ħ#/tUKe ŃPg贎a;Tp]kqy1 kT3Y*|$9ޔ1>/TѰc ڀ浧[VeaVHOUzp=!: kr\1/k|;0KJ*nhg\WN1 ;#!x8c o̘ K0G6g d~]մJ2iPoaAx^OamaSޯN$o?s LRDvj(x2q1PdBxȺ³*F*l"vhihihihihih+vu~V7:hvu~V7:jt\5~~~k]`72T|]#y&WUԝ Y96~Xnx;^#IVG/6 HתzXhR _ߚsWk^ 98d⇝.=$C;!9qdv"nUʓkPooE+NVwpgN!v~\r <JS"2YA2rV*\@Ѧ{SxE~Lx ʯͫ~%@頩sG9tMJ^;bd!"a-dZ1έ7Rrc$.(w{(ѝi@ {a=\-FǸ=B+iލ?\WjStEt]fo&|/!? NY_*4"}XhM@H$' B.fyu2%9Zfo4)tf?630|\{*;']dK#~@A Y~ȕ%^wIQfԵ es |0qI亝 ;δũ-V9ڍ0/< *H< 3Q1݃lBqs9r0[Pc'{˺V{΀ ZNIԄ%ioyJۗ)h*]Xiz8w $pļ~X:Lު}TPm،ƃs0#/iW̓ H{屍ŇmI]C0R2q9Da2߱oK t[Ga7禂ziiiiiiiiiiii Ŀ~_?Κ?~_?Κ: _ߚsWjV<$ξe_Fs\msl" o2۵ >4EKuBJ֧_jAV""ndAgoI6P*;( iNm3pżex6r΅ V)K+<[g*Ɯ\JZd-%r6Z_ۙ_Gt9⵪OKq3*+95m5ҡӎ#F7^I3T4q]`'yU.Pi$' 1CJ?DG;٢˅+3LIA_o#y%`]l=yu7r ۓ8>S-^ey`eÛ=p_lߎ 2 Ŷ!["ݔ#6U,p̶Ng"^R,8/OTG, oR,dB\Tc)8Cv%dL1ӿ qjw>nت s4ٷOE:Sk/8;Behwr-1fLП 8q忆іY+)JG%/lӀр"mEU`(y3sohtIIloUk`Czd˩E<ѯЇd)%y.<*w*Ł1M*L\{>_ND!E{aHd`S䳼!MmFl*2t $ܪǢe{W#UEc΢z Oj &8+is N+őR ͋oCDs3T"ZU*,kldd :S ݽyId/qT"y k>zmYLixh/F{hѷ3 n6aczQoS^]- 1PHpxwƸc3Yvng/K;ᨬ;<7wnkܣȼLdG0;W6=O+\dCBҝIILWlezA ሇHp#b%XJ#̲Kl^O jr1m g&UJށHʠ:Cy~-}r uX;Hɐcyo$ pVL4p1^GnuC8 E$-6yvjxÊydw.̊܄O.k*h}pTKT'ZFJ%1W=/rI| dZve6%=(F7KkN2l"h+H|=\9#ىo->HZ/|yhQe1)B-jDإ5\[qJ*m'4sz!ipRCU=Whsr'\wCzgM~fY (:Sp!8~Fo UnUErd7ܶ]@R1JZ+{% $Bco~f(5Com± *HSZqmד/Vib UF@_.H@JrD vFfjK[j<9}VY3z7J6퟾˨K̶TوTѲdqn6joEp ]GWsA0~\Jlf2QLtGQO$ÍU2Y@btl)\6D3] [LmC! 4sss מ6)V!n`<`t#u JrF*ĦFLB< guJ[A[g^e'Ⓤ6^&YCƪK'%ޜMa* )Ee1hBo4/P{c J.4MЄqo\X:;qTxtѝ;6A~; *Tiexxs9Qh4KelKiox?h:d j.i1Lt![sN^3ޢ^90e_'mrϑ6YfQE}  GH1$2-mTrg2?.57Ö:K-U3KEVbPhU߯&=c 9S}@?YMBF.s-&R@ӗ1X$ݵC2,< m 6PsdV~\*bx:![ ^/۴w%ρmg2qO2lw)59_l=ȁ ;C`Ha;Iuj '~rDTs(JKʋYy{P[{qf:+,_E\C\\P+Upxͳ,9'8+2t 6-㧨UYՌX§&?)$Tq>@Bh4:bVR)W@y-hڣmGMK>IQ>PdsrL}"{iCv$X ˪M44MM44MM44MM44l 5vMۓso߉ǿŷ"? =ݍ-߼s4j&!t udTIal؟r-?zosbⳋ\|s6|ݝЬKZcZcӭp}5vu;/yu[)YYfӹ-a&6R7z.Dm:b8%TŶ_dh7v B;J{no?obR3*|7hQiyqY2E269lc%/[& h'jkA |9eYQ-FdW% pdAy m"X.^A65A#A{P@=)g}b&E6n\PQHUН21}"4WW)F..sZKM',כ+IAxɷݣ1ke{;?}nz})_n|La>1O>⵾}*-6Z4-'IvH]F>_U~Hқr_-{g@u OaAH۰ȺN:J֠paT(/CدM:bV-yhSGMu@Io>Ԭsn4}huW Ī44MM44MM44MM44MT_j[I3q_㓵mG_s&ŝ oA%ڨ۝3o㽻C[{*-n\Dee$ӏۊLoLHvl/YMߗr|`(yޚ Ŀ~_?Κ?~_?Κ:ѮqFQ$SpP1)3GPULo}ߙ3zG_) 4w1NǏ[_jkQo`v<lt79L}˙1.et7;cϬM1.d ;cϧ@|c}>4{7X7@|c}>v<lt{7L}˙`v<lt79L}˙1.et7;cϬM1.d ;cϧ@|c}>4{7X7@|c}>v<lt{7L}˙`v<lt79L}˙1.et7;cϬM1.d ;cϧ@|c}>4{7X7@|c}>v<lt{7L}˙`v<lt79L}˙1.et7;cϬM1.d ;cϧ@|c}>4{7X7@|c}>v<lt{7L}˙`v<l*Opm#𥕻b?d@9S+8mmoq{7L}˙V%1nt1ntָjUYYlb+1џ\Y;SSyፌF6U^do_5;eƖyy{jPo YEa̬1ވҘ}o/Vua6 b*\{}=l6aphn b1=UsNj"r+X^_ɒ"ټ!}x*MZV%$k H֬fƯ*bz|bͩJ׸DD ИOAz>)l܌35nV>;9Ÿ=W+jk{P6pF[9*wÂ+E(.i- Wwȃ`#ۛmquN,<(9\ ;&( e@@O!nR'lYL즙HǵfN~'Rv<ɖ2E4U[ #rZӆ-`NY\,!dP2_Y#yG`g9%T# ct#bd/ ͂] R*;tc5f\ M0LflAYDZ+H2{DItO\( m~!ȂXUX$ZU M44MM44MM44MM44MM44MM4V%1nt1ntָj\ɬn>4'}c{XuWOz_[_/zgX"{njU劲[7rk1E 7w'Cg'הr"A\C/#jޖ1D*jhP=5M>C^5b sl54pJ헴U9&1 Omk \ʅ~VOkHg 61DÜukos—biMeQ&@ VG ^$MI7ÁgOa2[w']Dw7]YCܞzJSGS:׿Pouߌߕc~&>S%2 AIbu)ҮX E11a(lA&&8pSkUuwnz,>AoFk cԧDI(/w1 '׌X`m.死ٮw;ڮOm{{#ÝY~߁7gU2yyޕ.>hbF%\+M}}F-g>CwIT{,WKVn*8qO <7ܙu;Ĺb9b ?yŒ >"& ?wiMfc$;H-eama jLQ0B?Qe eZ΢bvyWeMcgo+Z}6vunX0f򄾇"(Sym/oR(IxCtӉu~I}Z%OŲ%]+ȓVM]G#{+5qMC_+ZksNAT5e|[KKtZcU5pl8o8M ;z#ˆjLQ0B?Qe eZ΢bvyWeMcgo+Z}6v׬հ8juGlK(j Uzkb%=ǧlmM ('{(#^4xV坹&> X6ke-fy~ FJ粰WuJ|jcͥ.IS3`dF^ңhf|{${ׇҺ*Q=H۹.#&*UIjUeMҾY|2m5U9]T^& ,t yхgPҍF;b}=dj1Ht$5!Dڝ6KF6vIыx2KmYM$7$~ -ݺj$̳rBo Yttmʆ2e]w i8%FȻ;jµf\{ jRNLHy˺7,Ty3yB_Cmzm6`o$΍d!Fi຿ $dI+&M4 4@M4 4@M4 4@M4 4@M4 4AXӳ1Gӳ1SZ_jFחdi#3e(VjL۫b*+ rtJ&՜_CSUO]QIvdWڈƇ8N^ GLar.G7BFDj$SdY>1],n P9r d ڈ ǔo(^mtkTe3R3-qZsnYKp&4[+&t{s :3Gq'Gzv^8Fo NG,RvIDЎZ޿UoNҼ78! P4WƟIFnjHhD hI m_ @kFB=yU"]]\U6ղ&m\'Dz*Y-V mhʪڵ*8[(W>|#kwG&20xezD=[ oQwUay%ay1%#l <|2="]B҅W7 yqtג|Ý ^`s%NHJ r,-Z4vŬmy_]H+1/[^[Gۧ i|!I7`B-U6RKUmhqLceD7 HJ Y'ּw&,;8 ų8蠂ƪj~=tG&nt6>z#&*n 6e~07cY=c*U܉ 4@M4 4@M4 4@M4 4@M4 4@M4~;:+L4~;:+L5:u?o5;2LU\˲{0:{>ylgDchlEGCMؘ :|Fgw,;]%>Q4 K toHc]][5*b c:NHD6/3H5>ېn0%@(ĒdNfX H8I>ׄx;Q]hkyhLIelK*ɞ<Ŵ bJLN)^FqL+*hMG6KG؏Skq.~ ZF8"oLjpqÏ5"]-W.3#x/% 7g5&~2@L1+ll!2%-ʘjΠ!eMsʖjTe5~$uuxdmph9L e>$ {@y;ak_W>yH ޱ^V?zKnwW{o^uϐ~I!^| vDЪX KhbS6w[.DLJ o&ZnLP=Fo:"|}ɢΒ nߥM`hVF)ٴIS۳dq\Ӻ 'Bp{oj}d\Uy;Jֺ oe.$} ձNEBKƢAК^P.;0[MlGL ,i̡ ]ےm"KcFMGC,]^;3Sߘ=j F3UɎ&2{fO4$.Y44~WT,3ckg|QlA5Fc DehT A`Jn:KR@ pXl@TJG"Kwiuyui,}\ 'ϟ7VKeWv|4DE:ْW:]P u!'>vD|Ds")3 [{# L9&KC[1 h!%-*'WD'gd_mtY?#'I.VFLø%mӠd=vA_nu!!YyQdגBeU E\KȕwW"؁mejG yB((]Y9Un(G5$ћ#l~؉ʁFWV}~ MJiESHcsJe8$fg8U}p`-?flĺIXD < aSd$ Y-L6;`yz'Cnf늭#^("CǦ(AU]mmplQ -:F/i< 㤖$N)֢+kͱK͡dY+mHܖ.,geDMl! ~irجw\E((ڪ\KȕwT2K і;ЪKY722E ?xӈ?tY=Tŝ,2=fj~,|A#TQm>֮tlhwć@AU~8ˍuŶ>$-3hcQikM{dcɠݣ88XM]5lv Vd ~a=A(+'xjگ&@\Ŧ&kE97d)t 1Y-˅!V\ ЃQzoFWGWꗖW6>Fǝc'˗#{s74MM44MM44MM44MM4V%1nt1ntָjPr2ż L|+0Dq]3{LJaCn<,7رĿYr2uy8_ߚsWj6XX~[ (ũ=0𭷊Tv[KC&Ѵ$ӚK٣%d(PɎ[/^5d>kQ롇0 }& ]_QA5ְ^}TpG.ZnrC),!oGq?yz't;x<5gk\ l*AÑ ݔ9C G ,$f{Ә;%tV:nڶm؍9]ZjI2i<侽 YO߻_^r 9bsr+#ۜ5j/jedȦtNzpFM\В$X̫-Y\sǯ."@+i\?t"*abƻ#q ,h./M\%^jU SKqKDmu8#͸5nrGJi%֞iwŤ䅌Ck{ss%7(iOM ˑ~C%MySW\^OTѮh 6YkѺ`jBi\38J|$sGj7Sd  (TO-a"yZڍ@< La ܃Z q[Eྃ9FC9Ǧ3[ sKe="e({P&Mvvd!ß>,KjgrDayg:B=*ѺI*WؖZc1N胅X |;9sY B六1#l <|2="]B҅W7 yqtג|/6+,)d|\iuQCیy_ds*Un046&2phpvl*`4-xˉ[JGd-hZe5Y"٦VNa)moS Sq8YE/Uxk ۂK<%njGKx;WQkgRW}}@5z\;{Y%d`㢳%@kaaAG@ ݭU U5_ ]tSPj8#dpy{m ;Y<)ZN,fZ[3Ws':ްlwaA ]V5 'DA7 5q̯Ƶzt&%_.xŁn@xw#',]-'׸~yNP>K:^IFDT޿}_i8zG4UGQ䪠0n9Afl9Lt e7`2$SV]_͇32WaW<@&xaO sVo ZD'Җ`+hD E o-G) Ul1)vXIݺju_Rℕ{x5`(e:Ɏv5䶗GW")GP+^=[;nAܞgu˵.~J?c%v[Ob}={P{ׇ8/?&䜥V`/Rj& -KqJ47NZLK |{P3l2 1 =⸿LxUI//UŴ_s0SW^frD!̈́` _ K(`\;537 cւ%Ca4MM44MM4V%1nt1ntux""fzvy{QX~dvdo5_ag\1Fĭkco'R;@&Uއ$/ndZКVlOƥ/8w:wKΫsscunl{Q?XlOƥ/8w:Nyέ͏o9չDjRc}Q?Xl:i:6=Vǻ;wKεc̃r$C=k eI^6 =2z%J[2llOۏ2|~ȻO9չ:6=؍AN^6b %bD)dL_$[ T!UKW.]],]i507H݇[?]Oƥ/8w:Nyέ͏o9չDjRc}Q?Xl:i:6=Vǻ;wKΝDjRc}駜[Oƥ/8w:wKΫsscunl{Q?XlOƥ/8w:Nyέ͏o9չDjRc}Q?Xl:i:6=Vǻ;wKΝDjRc}駜[Oƥ/8w:wKΫsscunl{Q?XlOƥ/8w:Nyέ͏o9չDjRc}Q?Xl:i:6=Vǻ;wKΝDjRc}駜[Oƥ/8w:wKΫsscunl{Q?XlOƥ/8w:Nyέ͏o9չgl [9۶sbYVY3Ϭ+ḱaa]saLǹTIQ6IkXiٿ endstream endobj 406 0 obj << /Type /XObject /Subtype /Image /Width 160 /Height 303 /BitsPerComponent 8 /Length 20874 /ColorSpace /DeviceRGB /Filter /DCTDecode >> stream JFIFa[CC/" E   68%&UV$'(57"#w49EWvx$1qQ!aA ?#pFŖbqo||2wv/78}<>7ʯǿh~aڏt35e)m2mlJVVT ± (,JThF2d;*6,>ud^MM*,.>dfd=>8k2(hᢒ$lY3ϓ87 Pf"+ͯ+Dь/9wNUÚo8kQco+,q&tY)ExNw UXoU}=Y?e{j0To.<,DN*eOlNMXn@ۥ2Wud*Ҵa&.Ku.ڙl_Q<{,7vG|36ɲIOėԛ_f^UV7>L@$9ETm "vg5U˃3̺vRmV'Wp(J U5Qn*mkGURSnf{nfdDZ9*K ݨ2ҙS\RoR ^mjEH \L D( R$Qc)D9dlm6<ƻ%[\]Y jZŒ 29Uo|2-mјV&v¬rn׫y۬vW˔cߑ`ۭcVcO=m.r 2!CR$`q#rVm-f2궼 AeF%slgG* xŚh\*L0$ǙF}/sʯǿjeAдh$/*K ݣʯǿj=Ѡ{,7v*K ݨFB<{,7v ʯǿii+N3lR?WWܑ)^H\=edd;D{Vu+=VFOo+4nT@alӣڬTzZe]e@J !gM/+)0e 8Y88[6RqZZZ+ I!¯`K=/Q9Xd_; H=N8*UEV%ʬe< naHӉZِl&emmy5jh1,ʍk%[f[=9Pl+H,3B$$R`&(C?^=~>?)M^pd h^-siNVqlB'@&Phض'V +4%Ak*ڳWٯSI wB=g֞1u}64444,?QTtiKͣ'GRx%z>֯uL;Q+W&UFB5Ꮖ,4[5(]&~񦇎m8TSDI:= L4ɮC |3~5ؤ_ 7|[XBl֓q%BĈwhBrjF.v}ixmo+|SsP>ղxsau&FfV&:wc_=aenulhX\˪-"p'&S۸@M1mG2z3JRЯwe=DzL' sJ+g1Fy"mK="׭(n78$m[ ۈl͇1?QIج*y*vMPK?[mcꉤk(bV' TZ!ezgp6X1e{Ս5T%6j̤Zq==LMQn$4/ߕZRX鈡+ڱܱ֩|Ҫ0g<2t v^ `pHc S DxѪ'īD杧y;V]Esw*_{?yIl{JǪV;-mb" Jʳ݅]8~x54hѠ4hѠ4hѠ4?fJ^sm?:k.׋~aڏu!Z_O}0G4kff[J[arra 3[[1hVVT ²" (,JThF2d;^ԉZmBMcuT0* PA5x5qk;[s\CY>RYDvHd[ :rG"Hg1jL+Hj szf0chf = 9Bt^њ )gl,WF5+NA+ˍ eQ>ZIBA A<8 ⇥dtxrkٺ2* 媓k=#SGwxB2V"VmzaY(S|֜y:fn#nE=)MĝnZ/68EZ_*m=ր[8`.Da;O4$ ?+jk=qc{;!MBD71PWv*e;WS"@\eXp#*in+.􎂇hy5Sebs9U:53~q`"Q/ǧV@kCn䑚OG6^G%`sgKHfi4th)z"\[b(0Zʷqι@@7hխJ[7C[Tѣ@hѣ@hѣ@hѣ@iKͣ'GM,?QTu.׋]j}=_õB~aڏuUY:e9[X6g+ʭ!|aK$p3ٚ PJ);DqA/wf> 75qEYeܐcͰ6[X]:c Ӭy eΓ ؛Ӯjյ\!R\Hl:Xw@#<zِ CGc_=XHY®WW6[աzrr;U5'she?c7zYeγԮ.9YP v0Ad&j-W3XQ"`1 F9o =;yKlJP8j8/5\rH=ėsobmZ%lWP*utf"rAsVN%4 Mf-JyLYaڡ$ۂHTkf[ޟF6BJ;9rⵊjXxkHY%"<"5rLSM8H[c-ƙDScIH\:W5$زc u0{Q8[sLTOwqc|*"k8'HAl;$˩- p444,?QTtiKͣ'GRx%z>֯uL;Q+W&UFxlŧ[a8)d@!n##l$L)ɅIB16v ֲ>\}Ì!E%!s%V#L mzkq.CQR[ܱ!QiNӗo2W;E:T€k*L3\[E^1C&`U٠S4]ou.$}{[i[+MH$z!ƿkgSzI<^gOIa M PέWF50FxVعݭUഊنN.U*fg`? sA,XKK6XB e)=A6-7A r慬˰_NDm4Mx5{&o@1}wqKʪ%TeY$U~AX-7FLJJ5qҬ BYua`{lwO lZ1N)70.ôrXm9->;z7[N>?SJ2@&=ƌ$^dbw|e׼m䟈wW?dw?T>}X5~z4Nˣ-r"~fdFP4U^<9l),>[u[$jYNDkxmx *P*J|t $K^.wƫ9[-m(M`늅a9;}Ω]B2zV.ba@8AEȹbNdkPωKp<;uh)xd[ t' *̩k&Ǵ ~ P8kHye̬Ùe!V})U0L! Zyvq򭲮֯uL;Q+W&U\EuZY?*Xk Pw1gWCS2wyW}KG݉{s).[:x3e9=$5XOCe{uѰkj B8⮷d1V ;ĤM>b9)"J4Vj$.dRbq]yj.pufXdw6W/ d&MGATQ =̚_ޯ,jp({9Ûʰ*X7aš,3 Cf& # +(_O# \nw.JK!Nb5EL yQQm$lJ KbdHXiUdY*7Nkx(k!2X6>[y뮘ɓºڒ:s)K8.⵵ո.Sb0do1n.Yٗ_rL{+1xi*#Wb@M^EXk~ɱ]=zh ]1sDqXXwyoϬt}a;9nٱ#@WX) HN*en[*sfS9Aҩ=j6Ig&o*lALSpٰ}z&_(0rl Fݑq PĬ][8?w%iVr2[^[g2VnvB>!ͅX/*Gr9R+L(klyhm$h\CþjY0A;tuWd K8VYfѶiSif|cҋ=6SHdQܱ/WCdreT^5m1 Ѫ{dԏ~edKxBŞ2;EY2r涶dW/baO?TI\P79EtUFS yjm0r!RU,=Lb^^@s+t7,P_F93'v`l!cT<DzD˭/*i |ѱfUALiZɪw ppx0$XJ~a/Pjcp$W+1*D^W /YispSqN ls6z"e2#ktk77eL5ug0gu`[1~]c RX9eXT, p=w"de2(u.pDUdwtwE_c)/S)NNS?sxjۀ8-қ5iF^]Y'S'2>9SkjGSw=@*u+\Y/o]e c}z"Y߭FFF/96U6Rh EQԻ^/Iv^{ {ɇj=Wf2kxؓߕԲR{ ]_4zIʙC7I  )TĔZiS,{ҰnlqμMbA,}U#8n32R 5% eً@XNXPaEĔHbR@4$l<[x̾AHdy7ʽ6=ݝST3:m̋VJPlm-bJ'n Il2PFysF%VsG_WFjq:%z\ĨaژuQ#T*ằ AL*$gD#nS:JޞpUMqUEh,̃kIzݬW0\ .q[8 oV==+lK [RjśLp`ך>;K] _T8S*zsL"T ,ZGx+/#m٘UAL$9t2"CyBc=n,o^@ Ad)0EѠ 05Wmmq+"ԯo>W ^􂳁 3) $芎:OFWM'/9R,' ýv@iq\BA9/ DS5Qrth! :aUy6ycxpY{q+FDPDV+0A'U{[,5Oh6&fEIc+)%g#,kl*l$^qȸQrK(v%nO߀$ͨQJYVלXA6ֲ̨Ze#¼pTb4.\RBK &ċ#z>{4k;fhu5aڝ3D9+dahGoA#H7x7ѣFѣFҗeGO*M)yY]^/G{ɇj=ԅj}=_õfY[u[aMr^ڠ Z0ٖ@(24 йrJ,`Id}ۛ|XnͿ{]%>.x:yw7ߎCƘÏ{ w{7d}x=_7t _88{Z![RHtPv@jXq r6OlhY2B++ΪVo/p[^W૾.^Sѹ"O+ 3ne{; 8Bvͥ{)Uz8ĹUo<;uq lIdI#9֋EqĤ .4UȎ*["6,Vә2B[I^Wˏ j+oי6vl.ڥV֣9!KZGڃrYB2e/76EcBmsq|[ʍrj犽ҒT&UB̐(+xh! $ YpL|^( yAx,hu2QmNGz^W 8NS2LdsW=D1XU_[iۖW*xTV~3+֝$Q@e:Ypgwl jwz>Vr*SSTm|yaڦ|e%|yU{}B[>) '^q/uDi?ew/us~&OO^7(D~ ugI%u}cط/&g3,C.cc[pf0qBe6=74eg]/jD3F9B3}Nw>iT$#yiQƜܞސes&$]?xUg߮e >UҜ߈,}E׳ a@)$=̭89XX^(Hcא@ٗbj{#nn pӉQʃ\".\Y]ec\u}n{t6TG]Lx\I;Y}PH3q&tv)zcZ>6C}mfaV9\v>c\* F؂"X:dr )܇7i{*ӓۮ݃Xڮ)dٴԔ݌YcLԥ[۱vC].܎1~er;]8U~50UgnMsΆS`S2(2N%ݧR3 }/dvc_-c䃂H{G2^|dhkl.,K-S7-(C۾6dDߔWa-=LAdJ6aϳP nr"Muy7&П_pJkusQge# ˹KVsTpMc\F|I[5xV1v%Y4] z=Z^WkW[ &_6/ eM9} 4zرxfːs291 U4RP XG*HQ'ݧ =cSn{r,wTBLG=I,ӺpaJtrvc$)װQ΁Cj(ʟ:.P(Q3mlvVKD*ڜ {oYUtffdu;.NL'/fkkf-<#3!T ²%4pIr,JTgɑ2dۛK*MxɅwEAR\AJU'̼^oov˾XWGx7WVG5]RYLdg<4> ߱j^[= \}p_ XU'c!${XZ5~Na{֚,{?^2AĵFCܠeX鲶tFlo R "+!#,\c9]8D(H`V RGBպ*a-E"s9#qme=$+LY8>*7PdQn]ԚOۖmfzYэ ~~&w3a *V՞7Wاtk6W2`,2w"J a1gtX Meem)my55x1+*"`[Y[8kG,(0E$Hر<8qcԕ|A8MB,ujhY-E܎A^TQrKVČ ?r>P#nJAR%KZSy>?VW7Vْ֣jA,oﳕsŊ iV Խ[ aD0娘e=p[):ͷPsS-K$PIX6:\^39 Cʂ FDblxppOTn.cNTLAHIJcܔlͅRJf*TEmO (ؼL^L,˞ė.o'ޣC{'_XdE?ע?҈nmrMIMnNՒd17)5l*R,bT T%p d'h\EFRX96jI@,ĕ**J[ 6SgM\Ņ6Im vGxv=FJ^sm?:m4?fv^xkW&R{X聼%ߑ͑xŝE[kf &XxfdzR0'ɹwrX&4@\4[hdA=K=7={~{"[׹~BۢuR5u[6^8ۖ$JYD<͑g孚8j˖Hh5Y!ϓ}ۣA1,. Z*q-agQфdQ ʺȧ\}{*Fsm'?^ =Z\U{#u:G/Kꂫ`h4cV[alIέN-\~y'{<%n"~|=׿/^i#~Tu7eӘmg9%7,up8!'xza?n-Uw-R33#arra8|3[[1i`XN,KHbR#>L$oH+NwZF:r&{ jY2 Y\=U@]HJ7BJѠ_=>PgZ_HufXir n0B-|6">@0`fD 0u-ČV1o:qw6'U6*ϻ;yاyRw)bPT) ,zѠ"뺮96Q+d&#]4u5 ģZޜ+tYV! |{,E2 3 9ʹLxC9 44,?QTtiKͣ'GRx%z99&VꝞAzE{}7l_~I+{gH_$+0,F:ozE+L \QF︕'k.4~dG5(JCatCZll!owks?8}g&~/~y5~~]O{QF|kb!O GñLh!+jݾ"JMljC;7-Չ$DI)kEUW%:nʑqZX䄅[M]OJVW?/y%JN"GF;<?osp>wxxnM:y`< Ӷ/,qȿhLĊu _ߞ&Y iE>T41ԃ2`گ*b nZ,tQ"ŲDjA -`vJ"4Ǽ9G~^Ǡrk&X9lה|#kLeC%_XOGxqx46iD*t06唃\}{oqˢկ16MIGsюyh-~ꖑUv~TSZG5ӥrP)K3kP4]lQ[MS+UUϕ791mKH/Rg %*jG2VCRvkAdlRP#hH0X-^g6nRbEujp3&d)'w7EzbFokD@"dLdǩy#^wUZ_0wi#kǎWSU*'ڌ|]q|o\ 7cG;9tb=a~A(oy FTo;"2I90gK%0YW`S[X9A1L7\ːpcnۿ2rPs\8O«t1n%a/Z682Jsi53Z}i1om^+'ő|X,'MjS,i=fGb,-9&mPm%QdlgG* xŚh\*L0$ǙF},{1(l]~P}yqד2lk4P8Q}haDж^0 i\}hymxUE Xk4lS2b  'ZB[274hѠ4hѠ4?fJ^sm?:k.׋,,(y#l̀Bc̅6 J&6vDNf qA54s ömnޞRݨdnDܑoNĨ{<\|;[<~}A7Ebql۶<61H{Svʏ/n< ;{opop{8w8y]P^{_6Ls~g^wsw>g|6_E?u7H0#2۷4UgDH"ۗT( t~ɤ>!{mmOJ'֯z^$712lzԹ;u?B-Vڎ5ʓNF?Pc}mH 槔?hƩ>`՝ij澯E+])8$%ʿ-ߐVdKcVJ !Զ$ K TM)Qlf ʿp Py Ue>;]EqmſdH3eG]~.3$x>{>IDogkz'(@͙NodsmY*Zȳ@S0Ŷ_r#Z%dY#i58I,,64꺬ՍNfՃQX] B|3U{o" 2==eJR)iAĈߓ_6=HYj{27=Gd]HS ˴jͫ-JRfWݝkDRvHUQA&J&7w .Ube~r{:mψ3(}h?or_%O ;\Eq-Iԯwp`wtOYWfm( K8,i޺*: \Hoo4˚WvM[Zy]#p+ 1͕_NmeX̵;UE--ϙSxs#d6~Ydm>k&է4lYѱo~}DY[JJ݉9v)(@$> endobj 134 0 obj << /D [409 0 R /XYZ 100.8 688.245 null] >> endobj 138 0 obj << /D [409 0 R /XYZ 100.8 297.938 null] >> endobj 408 0 obj << /Font << /F17 200 0 R /F20 263 0 R /F22 239 0 R /F37 405 0 R >> /XObject << /Im4 400 0 R /Im5 406 0 R >> /ProcSet [ /PDF /Text /ImageC ] >> endobj 417 0 obj << /Length 288 /Filter /FlateDecode >> stream xm1S0 `Ւ-;^{PLhp-c7m΋m=OX͖"fC4mYw,;nU+ZrrWͮ~% `.&Hc]Q K $qߦ(ϲoڠ)!:Cj}h6:E0 taeNxJ{." ^bЈcqꝸ9T*-^}&_}7|ש; \v<8d{.Z{3܏Fr endstream endobj 416 0 obj << /Type /Page /Contents 417 0 R /Resources 415 0 R /MediaBox [0 0 612 792] /Parent 393 0 R >> endobj 407 0 obj << /Type /XObject /Subtype /Image /Width 164 /Height 158 /BitsPerComponent 8 /Length 13794 /ColorSpace /DeviceRGB /Filter /DCTDecode >> stream JFIFa[CC"  F   68Wg%&7U$'5#Vf"(4:EH"Q1q! ?vGŅ-b`#߆B,Yss~Vl9s~O/r9y}-%20u&#Z_@, QeYb p)HJ,iƑd|20p_u&>,TwV^*[sf>wRcEthF RnoTعyGg},7"wrn e$Levus[-dXkN9f .Yb˜%N Y'$Q5lQ^Uu5^myEՐ;^䙯eX3W[ޮ^5AXy+d\b"wq|}f9WVP}E)b q5Ye.X9lQ4U \03Dky, 6 qP4=EoZpa!04,S $EGN'ޥđoap [pL{^( {Ay-hu2QmNGz^W 9NS2LdsW< -W[T;3|VU*sEB ,|ڜyR09Z92Dls~jwa-j{Fbq4iWy6kaWf rf1# 6%H TJ2$kftW`.OP'm:U+an֔5J_,X ;+#Tg32\ sWnO^oyfU dmݫc~OsGswg~golu?w^7~t:J؅r-,[Y'}e"G}ı9s)\3&9Է=XMvlaRE~B%ѼqP89Zk֫-o¤,F4PF7of *-OT6UjÒVI5M͒=f/N8и" 49ca2>.LŸ]6M6ʜi/՛ϳ*nᰏfh2(I+Eڲd`{8#ŢLopk]JwtJm4;gԐ# Fs$o.z:EOhfn<},75_o MKC0F5Τ yVw~W +UBz*.K!DT$ZӢ٩qkKv.7)tk͐k;:rT%m"DuJc" DZ=LAn7aqpapy{XoG!y{Xojwbm>BP! 5\7I<@g$,R6C.RK)(L6$CyT֏ԟҏmy[s^oŰ֯ߺW:JVơtl4ovv*" 0PnEY lXވŏ6f96{_ade>{,9^$;Bu^,KNkEY9e'$ن|ggfGH,v0Ja8YCQCasMؤɜLt} /<@|qؼapWq AĹ&hs4%& FF׵wp+H*%KRDQ~8/IL\7BlK9g-o2XL̶궼 AeF--6イKhrXl0d9Ǔ CVt*SS*oY{Ix?Jyua ߥY5=H=6`v-mmell[~a-5C+}lpqȇZP ʶA[Km,_(q50"`,XZl\l8a {(p`X 84jd=a\\lb~۞T c&PRȒǎu r3÷Ee .嵡&Se|Kw=7|UZ.'r,@ODR?D2cKJf#ZzHZ6wyXLPK[V(^1^:Y~ӧI9),?Ǧ_3;We7x/=]ssK,/_2-\&+œeh DR*-" ל"Wf 8y{\ݾlհw\m)X{$b Vhݮ'qGx nCA9xH ! S]5 +FXߊW&T4Zإ]dډ+/*]q̠(TQޗ rŎS)ZZkG%X c~{Y\3 KvJ0ѹyyPTI`$IŲATG/l_%yӗxwk<Խڷ=a=T x !\R~x BN=2ͦoi ooy-}Wfvg@_vq{go|5Ƙ{`S|ٿ+n]¬Ěsmb|!@xǾ!I88885't*kGOG<ޯ7eWɇp&A됮=Ϩ ! x=67Dg=e6hcL' ́o[_+U# *BN{_aS&?Ԧb=׫yD8aCVfD"c&DZI,oqJ8xKc1<q t>\7.,[iA? uC:UR/c .|n ҹ Xk{=88+"ҍ\n5\LN[6-mKA%GZMT XKᤇ^BX`Yuc;s_) ۳c| `<< /xg[e%+pSovT5Rݯ쐠 7!9Yc G,y컝ؽ8Kym:N\K܀{Q3Mظ#/NqɐG":`2u{8J|W^)juSq7m9)H3lhh=e_[AW1 J@PCJyR2?[e%+pSovT5Rݯ쐠 7!9Yc G,yUK_$1u_ty`uL w:am H8 ӇwG0򀥫;K޴ W}zfٛc5~kb[lآGxqpug(6bRX:tNLL@.u׍Ƕnpvj͞L9&Ao6mPR%!'vє=4U;V PN:\(Kv%Ug#Y)i01C9"|~^\~)*yµ5;VU$+uJ*m\rbЁ 9yUD"r/(5=x&eOPu^M=7@0w]RߢJ}8K,<@%. Fܧ1&M=?]=6i qK\M^xgذ&pRK)QOa\` 0 21<nєMiڲPr30KvRVDzBHT6 ܄Af [\s@,J)ǔa)&ڞ= NՌl@k+1iHOm+0)B$a <"q0Q9EG:61emoPn&1kn;-f\XTo+UuUZ,UKzVlPXva5֍J3$V!w[&赪*ٳK/?6 es=tM:deʧC|sYNAMlu)cUƘfkRcC&NvhƙsQHq#Ñ]n.c)^\ou P52ԲJ tcg63A(zYPAȟX9Īh=\ o{΂ɪ\ϱzAq PG9| 2a"+ kf-qk˾v9Z5~5/HyW}fafIkXqK_, ~uTaک>I 9mˌFnRSi]v}J;5q$=nɞ"0:Uh\M,Ve`R 6q\'#?(ojo~wǿЏWPh"/fhCь'#m)iٺ-ramB0 ;2G/9Yw@n2͑sYaQbC"5"z,ҭYkM<.Wyvkhpj xVq`)CEX4 ^׿ep_)*o.z^L x$N^I-7 G:@g*xm=VoBP7&کki[z9jG#k7IIIY͵<R'$Rۦn: Cxj#D׶Z׵ٳu([تZUy*Mؠ_*{ PB.nd5S9<32lY1E4l?T^wzf^ڶ¨VAȂف^%)e)4P$ !y4#cɐK2g* "ÝUL$dvڋ/X:DZvEzUnҨ**y:r -Aݑd]%)T4l?0f[ݵqwѰ}6_jmn&vs ߘ~o￳F;h ݵ[7~a/?7٣a&vjmnw<p4l?0f[ݵqwѰ}6_jmn&vs ߘ~o￳F;h ݵ[7~a/?7٣a&vjmnw<p4l?{O::A q`C^/01敛.y W ϓI3""dʚ[ݵ;~Nx87MhI(qA}j}=0#$+Wɇpm-ShYbU=6/ch[)m0l:|>K)u($@q r>dyvAkٮ\ݎ*ȍfCk,{Q#_ H]SCc"u;=zT:YNmGTJڕ\o?9lUe厪x韘]}1*`nKH8- t.]5x36-9lK8:"+,0yd/~ZǴw!7W>8lַL,q;H.75D:CjY% 6# Tg=,##,\8<4ԫ6=tzofѝ[])Fi)_>0Yv)('7Û#8b8=gh:Ct?9*G_xr7R2 MzFTv֘Y ]SE5ӢAf(FY(53hY0 r|PZn\}BcykUCM7֘ [lc_ 7㪜{Ȧ}h>P±D*?n eߓOcn+In"5Jbnl B0i@y(yaHh 1zɝEn.M+z*\]ekFH1x;: ~Ǜ Π6%z&˧-Ͷ)a!.>ǕN+ 6Y]?4 urӈ/_uhfFTn!FG* Άг8Yb]@YY8#)Hcbm_%Ujz6a^ -r2 Lka[Nl#Vp%88K)AھyEuvˢ1 77e#^W V˧z${TUQX̜Ɣ7خ>ݱ 9EN3yuڽykI6d5JSي\EcY(G]J:^fJZ0ix-x8DOmͺwGUSbi s~@ثfP$ I@uz}dꆑYהGQfŒ/i&Yal6|ŚHtH-`ؽ[lK2Oxgg&@Üexa@7fl㟻ۅ[_~[z1:'Qs+CE1 Tp)j0q}coe-T\3XK Wl[G} ~UJ8ꮱP*}@ag[b*Zu:itaY WHNYgg/*M못k6%uM:\frxBm%X8"1OM|/8sWWo:H̙Mv=ޘzKҤevmB$4ݗQOF@,kה/:$u_M7ٖVVS\6,֨&e$ 8 yb4.\&dC4|1m7ء3 >[l$qw :z3a -UAu1#<95k0ҷ^=SZ?RJ<~Nx8 z^~>wQӿn"@OfN5}4sm:w e{OZyU_u&iS'PpnZvcIXTVF[/Sa˝9e|fLE=$sEPP,>]^F )qSVζUE}iYkӺa@>BzѮFI_9T-UZ'nSRyjwg*Oh;9ACъ@_:P( эR}Y`~雷̕PNJh@ѽG7so;pzF^S-fu9-wkM XEE:[C\,j'5kSܚ9uVPu&K}rGacZՋQ5Z@.ZJo7TZ-VeDEOlz >d\u5i%ϲ`f'4DJݻ;/&Tk[-2`aLk'D7k[y/x?r?dw? 8Ν}͊BQ^t5Wڭjԛ*[ʫWrX^a,<=Amq[>b|9FZTӍi-9y%TRݶ#jƴÚ[ҕ+( VB~fG.<^s%r1 ]5˧IӪ>:6CpsUS뭯A-:B-"m-q* ֛ (\ mUq'Ak5gKumnxygE3 ~L RaxXuTlCI`0{oT=L%"mk:ʀcZo7 $ܐ3(T՚sm$8z5L=r١K*վRX橞*>p{hmӌNjZZ7W'KD#ijT=afP zf, *dUjGg,|k:Ԏz6~r7I{uvV.9[&k6eH PFQl@7ja"FD75l? u:DD"_>7%|ExcTB Zzt({nR{4ǖ]=OzUv^=[q۝G&j\ vQjI-(7y"Ş"U5F Xt d[ ؀ȔZKh:.+vẚUe@adX *v3J]("T"I9R8ѹ5Ah/@JϮDnd2W]i0_=Hu?Oۮ0r̡dbd$L-vl–L"1$M%W9:Zt}fMDZzζinF!eL<{Iֈh%2$X$cHn }ƺomc':m-a$ߒRê?T%$I=O)ZvR˫ `YTϞ21K5qQmN^zn"3]oz XWjh;aOaԜCPG f:A K\omx˪ ]f S~lWs"EkJӂlKjTC\ Ze*ݩ2 ( ^=SZ?RJ<~Nx8 z^~>wø^^=D퍉^z~8\![1Y^$'~luD$rBivMa$g@ص Z͹sv88T.]Aoce)C>ȗ{:ץO[iD, L-ڊrFf6bi[`v.WLA"XꟿZwaJaIί*k*\Ֆì+~WU@,&)oM-&euz&KYMNZXR`U5bqP;@ :AX!yj_(|Uo5ѺܹH8]-Q1=osӒ*1VX {45=ш'-[a88.m`*/YfڹkU􊤏MZ邽i֫0# HN?<[p Z]"VLcOvC`gVCnpPi1%e2eyp,PHNVE+2̫L٫ ,tmњd5) t-nhVFzC%1* nE',-D HXԌ%B_ mͻwRWܕ'wN}ʫU♚'{1ET6O_&i[E.!I3\eWMnG]7|DvQmÖ*i\7\eD]#9QzTLJgT9%銯jo#csnlSV{db02հ|\ zMf X(C\p͸Y`NI$5_kq߇OR.cIi;-d+J=..5%bQB6+mT*=F}c jBvq}}p|(Ay1^5J{'M,H^iO᎒==* J1֊)gȔ,J+q>7/:yKdwI툳o 9{:ڶ6ͲlUnXtgĢP$jP0D1'37F >`Ѷ?s6#hugj6iZݖG_B-li, "5mx **J|t $K^.s>ԇ#V׋}}p|(Ay1^5Zj2*}u|UM=Q 6"EKaKPcZoHళqC9'J3OPݯt0R! wZ"XvF+e^W!dD]3^k\*HRyA,_}}}p x~ pׇ;螩zVY{Ϻ(NHK`#YvFuqAt@1 nzciEiΠKvDr N`)Sï~ ,8R<~bh\I|rE 7go}51^oQlAjm!ê5#&wc|2ҁ lR>;ފ7twuA^) ~=DWn WauB~7JmnH}1}]٘N@6c18[V}}}p x~ pׇAm"ABY9azQ$_(;`Ob"FTp_(-2&(.7z;ct{G߮ϲ5ҕ& Wy+݈r݃TJt|skJ1)@I&|(Ay 7go pׇ x~װUj6).@TmI˸+|cmY%#c9%7'' j;#˛ӜJze7ij-Nu['Wm`DJsJ{q`‘+G͜K䃒,Q>>oϼ5Q>>oϼ*^?ӥ"[h ?2.eg|+ ޽!ĞoVIg endstream endobj 412 0 obj << /Type /XObject /Subtype /Image /Width 430 /Height 573 /BitsPerComponent 8 /Length 29622 /ColorSpace /DeviceRGB /Filter /DCTDecode >> stream JFIFC    $.' ",#(7),01444'9=82<.342C  2!!22222222222222222222222222222222222222222222222222=" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?翚O^E,<(R8q ڤ&7ozp8#ҡ0ֶG vE8OE>ֽYH,uv'3(\gc Ǭ}*< )!Q" vK ٫v#|,??OX¤Parυ'(@G'X,GaI  Q'X,RyB(Qd~rυy> TPYarυ'(@G'X,GaI  o$$h,.FXā1a;QCmOarυzv\]5wEhp=0{U zUݴq>hV0Ȇ>H(IG#}5Z)G'X,Gav45V+=yi$R}:n['Kȵ Z eGr mL9$qrυy> WMVM.YijϖGۍ98:XR -CSK?3R:d L^> y> Q'X,[y{V.:6 SNuC55Tso乙8`xJrg'X,Gaux6Y[Ǭl2Ny*axAԡQ}z%8`'v.O |Խ>y> Q'X,]{+]w_-?IͺKH@T,OS?hmjv'[vq,srF1ϠVWIarυGq7e"VHo!%卺m9-KR[4i=@#F~Ft%(> Q'X,RyB(UG'X,GaI  Q'X,RyB(Qd~rυy> TPYarυ'(@G'X,GaI  RC:y,p?c )E?d?i M5գFsa'ɟ|j/YxtiWrpͲs 36;Z@Ɏ?:M.K6e/)I$H,-B3Dt?yd5/25<.?5Rծg.VHI2ͱ+OZri+lգFsa'ɟSmwS`L2H#9qv&:K;\}ȌAtՃ.HI`WLܵBtRϑ_E<[F[ߊ xGCsqci,go5N5lx}i&& 4TcƼV#Kp@}+W 1Uh o'J8q&7NOsaG+??O*A47; 3aG+??O*A47pɞ/{ +;g^¬'tM0!v>͞1j}g/_O*Q>I<_듛aXӒEq\wp9$),VE'GX`osW_'G!~Ty-GƢԮ=Q瑑LcD%(Pc,9k|WQ_U&f5#Ǎίy6\]`cn^}G]n.joWeյS3gk|WQ_U7ZI5%GW;,t[kxZ"+ ofFCvr3ֲZmɲؓ DL V㜃^_U^']*F73%q귓çNϴhS`j泬jڴ7R[?b2$}s^|Tk|WQhY+/_O*pOg^+W_'G!~T}n3aG+? > :~wp?dWd/_O*B5>+; 3aG+?  ϊ?>~Wk|WQ_U[`L+SQ>PyC^']O8:O*~ɞ5u׳mRQX(V~k|WQ_UO)$"E{O"63>H-ۦb0 05k|WQ_U?G;FoRP{H.u $g ϊ?w!wF0ٳvYm,V~)'sī}G>0xK]:[ _%1#i& { OJWx݊**w5x+D}bEt3?qKfb޳eaqmoy[Mt-uF9#=jߘoμz6)!Gt =-e1!8b2B2_[1^CΗ|R3=Hc#I o9r:xڄ\HPbux^_Z#u]_LLkjNwFιʎy#kdv~y?s^vvŴzo C%N2y%pq5'VkJ 7(b,AQ dҙC2 @9#=io5ZE|7IĖ:J%$n\3),A/[ޟsn,,MܠpA,2@>HDx.mdXYmϙ4w;02rA}~uim[ޛ`Ti$+v2_,@20Zf㝤H>cjiWi"|D!c+ s݂q8_?iTFQ#)eC1 gpv%pܽ^z3?W˘8ɚV>P:+"h; $!M!29A8f#nC} [[hf +SZlԗwIɴ}|a@Uee=CKO 7ۛ=>O3icçڲgMqdĒ\m28PO'T;H|?ʸmuqlilK2ʆ?+q,?5ĿeWgyfgvsc-1Ydw|Um`pæ a[(/N(З#RGр;/FpehEP̂cpHC5k=nk Y ]H7<ꥭZ[X4v ~Q'#P?h} pa*O& J uy͘0I%з=JcjRL>z#[X6˾C*,[Xaw6A.H#.7…<ϽdQȻ}ai?@%ԞWr2p2ISOT$+d2:LH`zsȬG5y#VI*FH.@=z֨LۯR>hP]0ᶱт s voǪ\J1RVbFA Aq\ݔ:i"6oL(cjhqbsm3EGy)v<`%In9pp9=RU-2 u w?kH"%~te;`T~Y<9:}=A_ >@g []Gk>\K..v`XT'[c@P:s+ŷq.-H#3d1FP+h$퓐"ӵ@j 46K#tua)2 p~If3} oJ}f ˻xZ[vWyd줐 hS Sr5vK.vs,<qj UoU yrG]G5f[Z |@5WCAZeR4u_MzyW?iZЧǂG/WC7pW=?A,2tQEHŠ(( .-'<^kW]*مwfv WQEr_՗o&Co7]m+!e[E !e[E !e|Mi4KudєfFHv*(XX.l[ 9*/Co7]mX,r_՗o&Co7]mX,r_՗o&Co7]mX,r_՗o&Co7]mX,r_՗o&N5-ՐgFQ#쨢cWicok/ (t /MuQ`?V_? /MuQ`?V_? /MuQ`?V_? /MuQ`?V_,m\ZՑyo#ciP1z[E !e[E !e[E !e[E mςu &n:2թ<%z1 =;`qJ(c6~4?V_hc6~4?V_hc6~5mD{giu1 ) ra(z(^TTwHl8e8==J( ( * K'wP[1y$nrjz(KI".hvYeKP[(+7@ORT!37Goʏ1ߝc}:<~Tyo?7Goʏ1ߝc}:<~Tyo?7Goʏ1ߝc}:<~Tyo?7Goʏ1ߝ(2.~Q~~^ԚiVQ}E%d?آ2 ~U@Q@Q@Q@Q@9?jW@_}{3p_MiKDfw C] \G/WC7pTc[E# ( ( ( | ?Fѿ[tCk:uBY\ 8 `DUMEyOö晧O&6`L( w0>s9Fnhj:xn-%`h/79=gx=tw] JK( n FrA\_tKZdwpYS\E.c#(uqpHoJ8}b }2KK0,[ǜ'~%X{eڢ_2h .'QwWee$$v?mon.,;}FVA5yi A\k@}K-%^~|rF  c B5o B5otOݪ}XI" ,LFIʈ< U&ZhkWQ]ʋX70L#20{w? Fz? Fz|WqHn{{286e(/4a009cAP[AP[EcAP[AP[EcAP[AP[EcAP[AP[P^][ k`%XŒzںR)u 5vL#Xѥ`(9sƛ B5o B5o3lVwos7 gc2>Q8GZ9h$c? iw4+Iwj#A~O2΀;|8Q~ʗ\\s“s+*\PZ棧E\C-ϧjdu$@q>_~w3q5i^5M__4Kή[FDgwFęˈYJ9 ?Cwsv:XYS?/P^|C 2[!&&XXK4 I%LӼgGLkuh|jU O+LhW2/:db! gh^{ X[iҥ-r4fBIGTP%hw3SkRKgA I f I !88 `Zl^Jʨe,O9;|8E&_QYjANy@5,B%?^+b ( ( ( (1sԮ 4? g?J9KҗƉ<">^1"ȏ׌_og੗ƶ#*FQEQEQEQEQEQEQEQEQEAoeok5ǶKD*Oq袀#mm㷷"% qUE8+MI4k,JG5!g*k4k5'F@?7)A OT5%5_(ƲEߴ(8)+HcO#F|?ߔ oowc1(HDUEIB/ԟ7)dhPo-?o-?I>GF@?GB/B/ԟ7)dhPo-?Wu Gx)RU@ *F@?7)CNCw#` cI8 B/ԟ7)dhPo-?o-?I>GF@?eAsό ,0Z6 3tk>?]dYZXSs+H<B ( ( ( (1sԮ 4? g?J9KҗƉ<">^1"ȏ׌_og੗ƶ#*FQEQEQEQEQEQEfi׺o"Kŷ9*`LzFOyYi#i42Tp~Ieɗ$rm8jjocUA Fr99ZH&1PE 2"spFP M%&{5;au{yV°fc F`W[Y?icwڥmn7m3;~_iA6đC8*j'~ek[ n%tW|5$ez (ڿlK)5;Inn7 %Q/;pؿkoXY@ yozf7h$&%Ͳ;A< [{J&EŦIj.ZeL䏕 tU&oZ?lp|~Lmn}*J|=/^oGs j*%_̻iJ!3>Vҧxmm丸"%/$0UE$x%Gqh֏KlopqPiz[:u\.N0A  *tF/ QF/ U5bW ,m<9qcRibD7M\@A)$H$[_֣_֬CA-yѳȸŸ&HݑW|Ecgڷ쮮YILeCnHNF/ QF/ U5]:-N-2KTwj(מBg$|[ F7_ZF7_Z( F7_ZF7_Z( F7_ZF7_Z( F7_ZF7_Z)eݹ@94F/ QF/ VǓM#:q%L,aKq@Unў ,"=Þs}Vsԭ((((R/&+ /kJ_&{3Wxf ">^1"_؎(QEQEQEQExcN5{NX'mmU-#Dwdt#%-^XMF+-Qƨ ;Z2zj(3_{kqkj6Ob1f6ːRp9,pA ,\jfHQX }mRn. @ 4PpF[:(V@O^W/y46o<,F6TkfIX"e5Q@[tc`$7/ PБWlh `J)76D<Վ'In RmBo'!pUa@%ǂ/SRTtCJΊQ">{i%ԏ|K$Ku#kFAotP-o,uYӭ8; @nHP"@åL-s"7 8%AϨ( Y-dFʋ c  e?GQ]=:,v#rBߧ' [In{OL nmuul!stFOi-l䶚`ei 32v Ę6ᓐCOD*_J<.csj.tQ q*Ȇfsm 8`Z2Zɬ^Ctқb'WTHā,Igcc[?R'"Q/B%g\x2;׎ֳO֍$T$6F k*_J?OD +*_J?OD +*_J?OD +*_J?OD }$VwjCnfDR'"Q/B%M?Ʀ4ɬn./>-GcT?R'"Q/B%9?jVc_M~֟o((((R/&+ /kJ_&{3Wxf ">^1"_؎(QEQEQEQEQEQEV.j)-ǿLῼGcm ]A!rOOe]T6;K{ Z-v (''kмGzc'0ܹRKkFybW2< ]:U5͸j>|-ym,KE# q VΧ '<|+˺ݟ4+侎;n[٧`UdEۀ&1=qRjosDaȺ6>~Gw 76:ܞ*4ٌ m#*i71d8d'Kj:g7+m%x mLEgI {8u]maą /22O}H|)A>8>{\ٌ+gs$9la퟼[×\>Mm0t)[um<,8;Z^w \HX)bH 7ڙllۖ~ C0?x[\ʙ#r0 Gfii, <2*LFYɑH#h'S1d2/i$@AȘ * 30 ΀d-qYekO*Yv[yRFܬbf,-0$.7^"Q,>S_ȃlۇ4CF_ۮ~wi/oY<לpxXxkKb;x+otv'#te׎n.ui_G5H|QRzYh!yP@q'$R+׼ i@,O;K!q$M3$)9;*Q.zΥ>:KJ "K W;TB02[hkiqrnEpOcimť-|vd^珞i@ɳ֍{fС7>l+yFza̋2*wWj:A="K8&, >eݴr]]'y9,9$,52yͲj72l߷dd#!hdžg4s|7W1*39w+|8<U4.G[:-Q(U.tQEQEQEQEQEQEQE3p_Mw9?jW@_}֔4Lgq?A,x+D}bEt3?L&5QR0(((((((fI%.Y5JRҥ&mPi8.zsfk׋%[g&V}#0:JYn"(qw2:=ET_-..u[iXmET |vNOݑ@ܹMsI^ndo\ Fq/;zZl{kepk%2Xȹ<) n/=- Guj-=\|̞d3AգKsi@%s\rxPKmi)f@l0yW=x"mFOmQku)2w߇AP~Xy=ڴZs[i ^R'*R,pTmiڌ:@nChOClt\c}Rnm"3\BrOZxoCKo:8j1u/Mi"X;^Mnؙc&W.>! O LvWoY-C v@PC]&EνI+R7H10@O1#TzXͦ [Clf UH2RP,m LE"u'{VW%fP`5/L*C Yneg Qs=#I{}i=|',x?x~JEW|$Ht ;h{[Y2Hm-d #U FҌ!9Fd}sIK%q \ xcʮ9^1"ȏ׌_og੗ƶ#*FQEQEQEQEQEQEQEQE(JQR$X|PI$&\ZVPL'UBQEjwPlY.fXԶ ,@պ+]sN41! Zo,6\ ,OrIQЖ^wGӼMh~3̆]2_ o$|HbTs(@=xeyR9Q"Q |Ln5.|_\̺r5ƝQT[cܛ-PI1(b@qEpOGK[ڢ^M3ޕЯ;>ᶚgZkugj!X.e[pTg/ k7Wv:LvP}X6Є.F :P0Qж\ߋ.Ǘ06YFZ&?-UOKJYƀ(>Z[x{=桢M4\-}в o7mnˁ'o͒W6}<krd2n3^kyXOOVinBl`aa,Ё&'+|!0HOC}>ko`)`duOEpu爿SV ;ZK[9 NvXJ N/moX)n^9J¦Fb|Ep y5fK+e0mF  ے{cl-fe G.d}w8ʘPh+յq'5]:4Y^լg_8lLʩsoKM-g*!QZ.2A+ 3(-((((((((g?J9KsԮ 4? )|h_#+Y+Wxf |Lkb:(aEPEPEPEPEPEPHʮVR2=AScHlz2D U{)V 劁? û׮o^kǁ3KG ;܍y gxmh|Wi%vZ^ƃJ$n~Ev+aRpZaC$Җy"LB$tY3*6e\|aE`x/mtRDYĢ $3IaaÜ'!KD. iMqr2]bp@TV.k=#W'׬"FX(ǘ\a@ܻ񖝧iSOwoKnY-nm_FtF Zx R8a3YvǓأ!KMCv4wbfiQeVƪ+h]k[Ko8>冇t;&AJwn⏴-,~t3a[;N]ӝr +o ''$úuX÷ӕ=Ǩi}"DFǓ:ޢ'hR[4'>\&X)^1"ȏ׌_og੗ƶ#*FQEQEQEQEQEQEZͯHsnۏ)cq4P=7MLHY< Ұ,XqUn|577O$cł6ݵz*9֢(]h}2[(⑃;cfxʐ~VVv`˂x 5-'{UH< Qc :/8V ́Ν- ~\m,~y>*iG+9vm3q;c\U5~t VeT.ƅo&Hd\X#`r89UKhK-ՇyyO5%ءñmn$1F啽+ ~dk,s>x]j/]>dF|`c-z̀scε|3ܷZynK#!BIY6X('{͛zvn[tͼn8L㯩tP PA:\ŷđo r p771mijB{YfwHE11)[xN_ ifh9ZU[۩n~f`|lGaBkK;b RVR3HҐXy܅l(H-  O3I-֮4#@Gi}e>u-_;|on͓<)% wV쭛{٢e XՑXsb0B.NV qq.9:W)wm4{M#Ww##p9$? Y[kkȓ8$O,ĒKI$I5=fiz"-#WWRۃlb(((((((g?J9KsԮ 4? )|h_#+Y+Wxf |Lkb:(aEPEPEPEPEPEPEPEP/ :O, qfv1$>}?No^(`kYDv^rBn+ OQ@?5Ob"JZ֑Il&;[X٧"[OMYg ц翢*j^Ť^ɦB_5R+S+wWv6-$`e"1\7 q/Ɖi{yK; >,68FX ;6~"7 "u*CEcg`?*z=x5 /Z V\Yn;Ϧ77/F^ŷ.bS\G]v=уtc_(om:}F?"HU˙a>~p)U4o*51iv rqAvsHįɍ?c+_?*dbcьkO4f$(.jDHח~w-kXYb&ب7 twi}E{-3yo+nNl*Ao[+R$<>XUU+:08տ@Q@Q@Q@Q@Q@Q@Q@9?jW@_}{3p_MiKDfw C] \G/WC7pTc[E# ( ( ( ( ( ( +Qd&%L* Jy>$ZDUR˅ҏm+wG 8V(?RW->lZ*0khZe%rpAV F ߋe]\KsIr?[ĭ!EY|v?'*@=:ƉFuuhao#Qo^I#US."m_te[pDć^T+5 `gJeDk$˛cݰ*-w!خG>B+a7"{(&L+F; J9/aH<G̼ϥlW/ZmR= *r9.ˆݱ7O ֣j[Ǩ<Yd8w:QY b4#Bi as|66۪~/ƀ8|JѼm⼏7s ,9311[wBMG$K}瑌9˽{vGpW* M*NշhsxiwN9EPEPEPEPEPEPEP?ڕ|s_GA5p\?iZR3ٝǂG/WC7pW=?A,2tQEHŠ(((((((ZiZuŝMHaTi$cy>֭@Q@Q@TҴ ; [i}Ш6Iː2$}O[ ( ( uILA^],?'G~UZ䟕C4gME2|kuiڪ]ZȪ֖/~xz82 +k=R4&Oӭ<"I$rMuTPEPEPEPEPEPEPEP?ڕ|s_GA5p\?iZR3ٝǂG/WC7pW=?A,2tQEHŠ(((((((((((((((((((((((( + /kR/&g;ȏ׌_og{_#+Y*e1袊Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@9?jW@_}{3p_MiKDfw C] \G/WC7pTc[E# ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( (1sԮ 4? g?J9KҗƉ<">^1"ȏ׌_og੗ƶ#*FQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEcp\?i]ڕ|s_GA5/=x+D}bEt3?s C] S/lGET((((((((((((((((((((((((R/&+ /kJ_&{3Wxf ">^1"_؎(QEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQE3p_Mw9?jW@_}֔4Lgq?A,x+D}bEt3?L&5QR0((((((((((((((((((((((((g?J9KsԮ 4? )|h_#+Y+Wxf |Lkb:(aEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEP?ڕ|s_GA5p\?iZR3ٝǂG/WC7pW=?A,2tQEHŠ(((((((((((((((((((((((( + /kR/&g;ȏ׌_og{_#+Y*e1袊Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@9?jW@_}{3p_MiKDfw C] \G/WC7pTc[E# ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( (1sԮ 4? g?J9KҗƉ<">^1"ȏ׌_og੗ƶ#*FQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEcp\?i]ڕ|s_GA5/=x+D}bEt3?s C] S/lGET((((((((((((((((((((((((R/&+ /kJ_&{3Wxm Db_$?AS/lcgk_4?lQR3;ZI{$kbֿ=i4gk_4آ1M?ƶ( k&GvAOsIHֿ=i4gk_4O4 ?k&GvAO'G}QHֿ=i4gk_4C4,Q<#@r['2M?ƶ( k&GvAO(;ZI{$kbֿ=i4gk_4آ1M?ƶ( k&GvAO(;ZI{$kbֿ=i4gk_4آ1M?ƶ( k&GvAORu>'G}PvAO;ZIM#agk_4?ny??'G}PvAO;ZIM# b̘?4{$hֿ=i5Ecgk_4?lQ@M?Ək&[P?vAO;ZIc]Aޡ >HHL ?_μ4? U* /kJ_& x+D}bEnG/VL&5QE# ( ( ($s~ʣ'\߇&ĚeܥDRo$"]!`'v 1r3Q|0SX'lV>#&m@QEQEQEQE_MzyW?iZR3N_#+vHSM])N]#%7mqG/[[ JM M${m_o m(@KoKϰs+Ŀz7Q c>h@KoG/[[ =OD*_J^%o9zT ȔKP^U ^{> endobj 142 0 obj << /D [416 0 R /XYZ 86.4 688.245 null] >> endobj 146 0 obj << /D [416 0 R /XYZ 86.4 505.627 null] >> endobj 415 0 obj << /Font << /F20 263 0 R /F17 200 0 R /F22 239 0 R /F37 405 0 R >> /XObject << /Im6 407 0 R /Im7 412 0 R >> /ProcSet [ /PDF /Text /ImageC ] >> endobj 422 0 obj << /Length 185 /Filter /FlateDecode >> stream xM0D{ŖvMI9%`(Ut(7ffV3ҊZ(=8(V A7eʦЋDgR$.S|ڮPl"ִeq8Om'Q}%=/ K9 -]y E~ efseQ+vp|)7 endstream endobj 421 0 obj << /Type /Page /Contents 422 0 R /Resources 420 0 R /MediaBox [0 0 612 792] /Parent 393 0 R >> endobj 413 0 obj << /Type /XObject /Subtype /Image /Width 430 /Height 573 /BitsPerComponent 8 /Length 41901 /ColorSpace /DeviceRGB /Filter /DCTDecode >> stream JFIFC    $.' ",#(7),01444'9=82<.342C  2!!22222222222222222222222222222222222222222222222222=" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?翚O^E,<(R8q ڤ&7ozp8#ҡ0ֶG vE8OE>ֽYH,uv'3(\gc Ǭ}*< )!Q" vK ٫v#|,??OX¤Parυ'(@G'X,GaI  Q'X,RyB(Qd~rυy> TPYarυ'(@G'X,GaI  o$$h,.FXā1a;QCmOarυzv\]5wEhp=0{U zUݴq>hV0Ȇ>H(IG#}5Z)G'X,Gav45V+=yi$R}:n['Kȵ Z eGr mL9$qrυy> WMVM.YijϖGۍ98:XR -CSK?3R:d L^> y> Q'X,[y{V.:6 SNuC55Tso乙8`xJrg'X,Gaux6Y[Ǭl2Ny*axAԡQ}z%8`'v.O |Խ>y> Q'X,]{+]w_-?IͺKH@T,OS?hmjv'[vq,srF1ϠVWIarυGq7e"VHo!%卺m9-KR[4i=@#F~Ft%(> Q'X,RyB(UG'X,GaI  Q'X,RyB(Qd~rυy> TPYarυ'(@G'X,GaI  RC:y,p?c )E?d?i M5գFsa'ɟ|j/YxtiWrpͲs 36;Z@Ɏ?:M.K6e/)I$H,-B3Dt?yd5/25<.?5Rծg.VHI2ͱ+OZri+lգFsa'ɟSmwS`L2H#9qv&:K;\}ȌAtՃ.HI`WLܵBtRϑ_E<[F[ߊ xGCsqci,go5N5kxpuW/0%HhǶ}/?]>x6UFxO~^&h9# kEHc](йRSߓ'P}O:+aEfB>}+{Z;X9g[MOQAE]{|e1##+kA5XK-,QY,$'$YCs+?  ϊ?ZMZj2G^V m{<ǖܼ+Fĺݸ]6ޮ˫kmΧf9+?  ϊ?n&karK:vYZ:DVЌgd#/e%&A`99s ϊ?6N'RUi.n2gK=ZQo'Nu#i4,,=zkgX-hnO!feDI e0d+ÃY? y\Ơ/.,ˆKH#IrP! zIj22,j.z?Mz!~T_'TN O~Wk|WQ_U_؟dWd/_O*B5>+;g^+W_'J|2t'G~ɞ5{ ~WD9|+؇6N'RxpuIDlElg$}r"[iᕷLH`aӂk׿  ϊ?Y="vޤ1E'E\<1+6Hz!~TB<;@'Gaهg쳆XnhROS\Wm?J;#IW|`tKV>c6FM5^RZ?ACė1^$ѮCy#_#+_?&zXbL2NbI.6('* ӵ;e/lX(W&EgRPWq8ג_QFY`w*%TR2pySu>y?s\~k1X\\n|#~IyN"U2_ވ/,&Ͳ76JE+py?sQ[@O<-E9e888 㨮dC$)ɝHZ3vx;g)?1-@KVKi +8?+ѱؐ zU(,S 9r=l 6†,͖Vcݏ!i??CD [&ehcĠwnA,6>GQ^I,pGw:,WYԚ;YH-]On?1i pH IJ 'vs$#VŜ*0!UsZU02U{>'oμM%jD;(3pS%b7U%&jiO\%D#FR6PJdGQ@ >kM^ mW*Ǵd`p0'=_sa mڤVRM5P\nʂ%,m g-th!KVLv M's )$@Ykqr(X$u)5iZgƷWs!,ϸ$Ee ac#qKoO>}uiRd)hRY6}t WIlI%!y=E= 2AGķpZj~3[qE&I~o/,eIџډݾ? ˴>5?5VskR*::FC:Ӛֳmme+T$$i‚y/ UtykJv iVNdi^養I egv tuoᦝRJD $ d#i1rYy|9_.`&i[CZt/ [o7\eᘍG ?4n)nRf,YN}kR_M$W& ɅmU~9,Nwk_:?4߿onl<-w3Ojɟ]6ƪavIqxAF">XRx!\nYʨ'M>-RhX7P1!A"y0qݡ%!ΉR_XM倗(A'Q<0p@:KTwҺ*JH$ר )o=#ĈER41$AVC8?"4똤{1m ;~Z:Rܤ#G0YX fO{X++0 ]'F&v`U)muq.^1"_؎(QEQEQEQEQEQEQEQEQEQEQEQP=z6-&.fILQ 9??cSE-żsp(u##FyV ހ$9HGx[d FlCS؃ހIc3$,h:z[O\?!W`_]jd^Y$os¤$ݳw'qЌ7OOoG?ơ³isjQ%>xBbw\,%M+j20(n9ez[?5{#Lu_2GcleA=($}((d~UkP<=^jRe`[LyG2H4RѴ_AW,R%dcc *( ( ( ( ( (1sԮ 4? g?J9KҗƉ<">^1"ȏ׌_og੗ƶ#*FQEQEQEQEQEQEQEQEx2_]p]A:fE +E iEy巂JQ"_cIX')(˺WpHE$v.6oq\d <`8.˄]tPu˹|MwuR !5w00HPA 209g5+ N9Kԑ-, K>ls ubC1oG8}3JYӦ?ƫY!e qۘS,ξ"LRgg5K*IQټ+W'+drk8_P? Ŏ_DAiVo=l &:9_2 g El`[k#U d0BWq* s^MQ {hD5k1j>6El$qsXk>"EӬI{>yӝ4PW?sЅQZ泮qah/UpPdkSYntiXd(*4')]mj0Gdu'@9e..f9J I+[[Xd yfBlCɻk?_۶eGCw:ݵ/?ƛ&i"k<IG/_{BVlFf66̓RTdR˼>,u+F}NyTAm°%rr6NG&: 98I:#<T\/iKh 476}۳AR|?h 0-\N2X}9èEpe~KZ5gr"sH8wKkxz- ^n A2rH j+|3//#;Q`qK;Eڹ8PI`*F-Ve [*$\,(ȅ.9.ؽz6-&.fILQ 9??cOetEDd`*>;2O]ic,fGb>|Rq ym<5o\EirYOWPql0%CңxeyR9Q"Q 1wPv sus=(eho7?f2qŮú\ψ$tG=vAw7!Դm6ĐG #wt?69 3:z_{BVlFf66̓RTd^1"_؎(QEQEQY_L-»ĩ ɸ)P~8$(YTd);]oߛIMcfP6#p>eɦkgoI-3[jT6P?R@4袊(((((YKj_?ʴ>7GEI#hLޑ'f4!F @ 8&7@ڼwv m6I3 ]c랹e;=3N .N$+}9$'$Y7@ 7@ 7@  0}(((R/&+ /kJ_&{3Wxf ">^1"_؎(QEQEizUޣg{JՖ$yB)>l2$<9 xOOlobKHym!cG.]XC2qG{ SHhHʺkc#Lu_"fxn$6ЗxYahQݳ}*=BӋL #H=$F@OGF@O@֑^xr}ax6H>λtJ I]; *CX7q6(x;U?tBq*NH!Ǭ?i~(?i~(>ZKܶyQPcX>X_H;7 `0`ҭm㷷$q"j?i~(?i~( i:tvGK-ZE<϶"(aI>UP,;1ߝc}:guהۘ/ҥ[(L¬|O"l ~JXxivnY5´R!w.Nbns.Ҳ>c}:<~uךgtȣRMw$Hhqoh+4hn~sJya<G 4gXwHFfcIv&¿-6 ( ( (1sԮ 4? g?J9KҗƉ<">^1"ȏ׌_og੗ƶ#54[Ďde'k6OZu#,QU  o7F5/am_tcRn O2u8D2~UKxX[1  o7@?lOIQ䟕gcRnj_~T}?'YԿ煇t䟕lOIVv5/amƥ<,?-h?'G~UKxX[1  o7@?lOIQ䟕gcRnj_~T}?'YԿ煇t䟕lOIVv5/amƥ<,?-h?'G~UKxX[1  o7@?lOIQ䟕gcRnj_~T}?'YԿ煇t䟕lOIVv5/amƥ<,?-h?'G~UKxX[1  o7@?lOIUf2gpj5/amƥ<,?-ZI&;Tp =;ɬ_H?7^1  o7F5/am?j ףj ׭ j_эKxX[CtcRn3 Fz? Fzƥ<,?-Կ煇 H?7^e"ʺG{KxX[1  o7@(Կ煇tbKxX[1  o7@(Կ煇^1"ȏ׌_og੗ƶ)qZU}?A.?kUQ@Q@fj햊m靥8"%ļ耺pYAӬ_:koockhÙb")\(j 9} [U2G+:SnQ5o݄P:jZB̯,.BX^wdxe%{V m⵲[p#)*Ljr%^F:( ( ( ( ( ( ( ( +&Ěv+ka=bI1ո5;[NNVʍ( a*N yn(* }KO̶fF`8<@EQEQEQEQPXZ}eK4O7#ApGZ ( (./mfi6w)w8Fr8}>=3,]FC%OB0FAt5ϭkZt5ϭh9?jW@_}{3p_MiKDfw C] \G/WC7pTc[ȩ{o'mYk 9fE$=qo/Cz`?l>GMjRɱ6?oPizsۑb}koO'&Zhh|=ķ<'J uo_Eh㵗{ TŌSk4r~siĖ9]xd}ƬK4SRH#*ZB)d}Ə)cWh _6?o&x5vcWh _6?o&x5vcWh _6?o_Qi>Υ$0pOWm?& 1Z[q`Q{<rry47 ] #ˉQ 42#?vѸR7o,EPm.,4K;K B2 @p`d*PvOtoILkH` $Gyue&CPi%-`XO=S'ш&T48e!$++}>-mc;#\QOEp^ }V "ӣ7vw"L,N()us+Ss-S[$:pi7wjPU$e ([QVN-.` LMU۵f?EGR="qB"tw0wvghU{(#Voem#3Gh$@ )*h)ws}VHnfs879n^YxY#if&GI(rv 7630hB^ З]IIq1k>=il:abd4\.I} -uy4]Q&$kfUA$BNcnv\kw_[HvJo n:w5xNko&$np dG5bSj:%}UӗOh">a!b C;x-:XeZ$wH ֤\aY'=>ќc鞣ֹoWQZz+:VI$@8r^PWcu!,82zK($Z; _]k3s [Li!hhƲG%&Dp7"|EY:qK)h1p">~b j_, M0V^1"ȏ׌_og੗ƶ1R?7~z?#>zc)xIUAi%p1g9皏Q.>w w{U[ա  ;g6M[XOXO+   `EnGq@}c?Gq@}c?X,a[XOXO tV$w?G$w?E  `EnGq@}c?Gq@}c?X,a[XOXO tV$w?G$w?Ekh7po*oH?'^r:>Nz,4謟.z?֢ נ j+'q /^.z֢ נ j+'q /^.z֢ נ j+'q /^.z֢ נ j+'q /^.z֢ נ j+'q /^.z֬7F so?7.]ism2X?sԮ 4? g?J9KҗƉ<">^1"ȏ׌_og੗ƶ2l,$2ai,q>bq+o??A.?kUX:o?¬Q@X:o?¬WvI_V6v3Y0O 9)P/A9v?X:o?³oY]+G Ŝgq `2<5s4 昫Jg%)FgAg;MUQ**_;MUQ**_;MUQ**_;MUQ**_;MUQ**_;MUQ**_;MUQ**_;MUQ**_;MUQ**_;MUQ**_;MUQ**_;MUQ**_;MUQ**_;MUQ**_;MUQ**_;MUQ**_;MUQ**_;MUQ**_;MUQ**_;MUQ**_;MUU-?"aT8e,rG'{p+Vt5ϭh9?jW@_}{3p_MiKDfw C] \G/WC7pTc[O]k.nqH(GʰiM"o\x5UhK}@o_[U moTGq{?oV1{ UAwU$' lۏI{E![-Z~}{QFQ"qߜ*?Io K~j_/\W-K}@o_[U_&(4Uhr$ɥ ?%7M/UZ(\ -iIo KV.-K}@o_[U_&(4Uhr$ɥ ?%7M/UZ(\ -i­i7n<ϲۤ[ghOh'R5֝ Rk{ Ơy+Q%J@n$D G0H3|rTn]2-2MN{[|vj$ny 7 w>b-+NZHT.  eB&m9Z {#+$ 0hqN^'ִ'粖9LlG"͌^C3ǡ0fthsqsuSV,m4D<"GO@EQEVN# kVN# 7g?J9KsԮ 4? )|h_#+Y+Wxf |Lkc"Di<1vUQO i뵳^[tqR V _5H m}{g+bVM2ϒ)-V#OQ>%/%jQLfJZxdmA@m Lu{SM(~×g{?2iS`g*V+??GVX,c`\{o??[Q`s=`\{olQE?Qs=E ??GVX,c`\{o??[Q`s=`\{olQE?U3LidXX4E@F$#ڮQNðQEQEQEQEQEQEQEQEQEQEQEVN# kVN# 7g?J9KsԮ 4? )|h_#+Y+Wxf |Lkb _5gm닄OtDy6&XF[`ӦjFS"G97P=ڟf}& bOOiZվc>u}:Awo5e}Ȭ1 Pw`eTɺ_RSU%/%ekX,[ir$oHTッހ:+?~O4mkӿ'.:+?~O4mkӿ'.:+?~O4mkӿ'.:+?~O4mkӿ'.:+?~O4mkӿ'.:+?~O4mkӿ'.:+?~O4mkӿ'.:+?~O4mkӿ'.:+?~O4mkӿ'.:+?~O5wKor"U.`v>EIed{mT72f+`7t"KXĂ_*}:xV&]8CI{'2\/!H~;e!y,JjMS\`+ȭKH$yUr bavz}ɻȶ7/bؘ9m;Mo4Nx&eF<*df.~oݷy*TW5vVVַvRi&p <61㓩x֚55AqcTr;~ITWd!0J@m`~rS_:y^OmbnٽCc8q EPEPEPY:o@5Y:o@4+ /kR/&g;ȏ׌_og{_#+Y*e1yT / .O5`nt5ڨ2L%=h5wXH h FiU[?z "HF<@!C,v〣 Z4CЍtz "QZxb;[TCv>Em`G?B?E%#4`G? V#4X,bQ[B?G`Em`G?B?E%#4`G? V#4X,bQ[B?G`Em`G?B?E%kh7po*_!Vtv FS^==*2:VYH ŧX(;x^(#LaEPEPEPEPEPYvW =.@< d+"N@ʼ|tPEPEPEPEPY:o@5Y:o@4+ /kR/&g;ȏ׌_og{_#+Y*e1z|\֫_OpbaEPq *G*;$U`J6`2M<6yR$,(,*{@ W'Xo4um- &v!Bs$MC^fm,ֲ6~4T;@e9]\mSJH{).dT$3V((((((((((((((((((((7F so֬7F sooڕ|s_GA5p\?iZR3ٝǂG/WC7pW=?A,2QѶ#kSa֥9?qCcEo"o\x5UKk,ic\p ]> _h@_z "LO9c.RE+# zb1e-$o.1I=5k,M&&'ڵ Qk,P}ZK%jֿ-KE'ڵ Qk,P}ZK%jֿ-KE'ڵ Qk,P}ZK%jֿ-KE'ڵ Qk,P}ZK%jֿ-KE'ڵ UR4QvEv8z?oPn?#*"pM`7Ե6d3(Bq[Sx+<|I.ԭ-d8(2ˮ`Ö߇t^Ap\+Za @pNNQ@_5ƴVa>kamA6q0ڬb7Z%>Qfέiutci2jbQ1-Q@=չ605IRuB̛nmW q)RDIz!EF=f&^a{CJ# ɟ&BUQRQgkTEKMV:c!khĶR !oUr$F{(u_ Y'k/Z_Vyz_}=!e^7|ОWt p^c){mA#)T`6㝍}::}=Ǒ\>$ݎ2OsT5Ȯ=GNn- f9:(-ŚqX2fӬ0g&)'gTQg M7hW764]\%W/ 4LBlg uPAc<6Ytiu0"2!0߉F;C׼_nyۜ<KJǂ[ o/H ƹӵhkGm$|b]ΫQC+.C*!6 :m+FvB8H) ,HH"pP.ӛX %΍mmk-H٢xyIWRԕ]C7$lsAMG +kEq^M54y7? p\WsAMG M54\.vWSQGsAMG  y7? SQEkEq^M54y7? p\WsAMG M54\.vWSQGsAMG  y7? SQEkEq^M55ټ/XF1QJ.:@ 8&qBH7ڠIMsPԵ4 O>"3SQt"n5;[(Y,3,j[ gj"1O_Tt)fѰ`c[KǸQkH:Kq2+%v,(T lz]:<ֱ%=9YXo8 3ڀ7`x-IaC$l]H #I\׃Q4"D(^ydgEU!vH$dni7W;fw}!o38F1Ns/QEoo3ZYr;@=xz\%-A:{{7wAfG:ơn$.@*6? o nwy ռI4l4Zwj8Lv%%;v;[/~×\\&KrKL~`# I~g8PjnYn% vr窰Kq!vI~&O|Z6K,zf\ZELpg@EAc}7w?j%Yn ռI4l4Zwj8Lv%%;v;[/fv}^1"_ǛEK|޹?kh3[tfGåiB٘" d Wjƕ][Z3D\'n3Uc-imM }^&o n` ڠI򌓁ϩ'17#4Ǎs_SWJf*-@ygiiXV9+ӿ"7ϧDoc;}?#wF,9+ӿ"7ϧDoc;}?#wF,9+ӿ"7ϧDoc;}?#wF,9+ӿ"7ϧDoc;}?#wF,9?oVv>ƥՙ̥IO )((((((((((+'M\'M\3p_Mw9?jW@_}֔4Lgq?A,x+D}bEt3?L&5OOpbqZT+2v}Lأ>K4QWK*g|h f&9-!SK=廷 b)>S2?QF&kyϕUMcytUP$ߍSLXw;iwF̤c&{ƚq[_մN (f۷*C+)}7+N_:FYpCI,#8]p $ OR~((((((((((UR̀2hL[|«PXrq^?%CR,(\Is+{y'[djʹeAl`PO#5?+oRrH)D;~uPA2۰7 @TT7m}i'mspy֧(katf#kW+SEPERS^-mW+c# A@袊(((+'M\'M\3p_Mw9?jW@_}֔4Lgq?A,x+D}bEt3?L&57rveCdRNZ&R?7~k0cWvsq4q! 4gh㚛_M_2|콿ߴH3ul̼MU#EGj|M%;@UfRIx1e41mKm큑 Mj{?kjJ_6?o&x5vcWh _6?o&x5vcWh _6?o&x5vcWh _6?o&x5vcWh _6?o_Qi>Υ$0pOWm?& 1+'LYv2x3s꺝\ifzw.;}?Zߢi7Z٤i"ާuRB mFP1r6dIM_HKӦƚWhČ{mQ@5/HNNHlYVUrQPqijZE}[[88M_#.R5Ggb,Ė>{מiu++[%4$ȁ5+@PiI; ɦC+_Z ldڥ*A|Tp0uK{mfVX֭( %̍lӒ_Ҩ եyij`f A`3?"v++>vB@([mRQ `[-wPv sus=(eho7?f2qŮú-myųE9r4rjXpxbFX 7aE`GB'flH$thE8@A3sEQEQEQEVN# kVN# 7g?J9KsԮ 4? )|h_#+Y+Wxf |Lkc:$rBK-1^2mi IYۄE LsɨѭV*FG%ʫ-T4 N3~Uv@_P7VGv@_PV UPejD8 ZuUŜ-su DJfvQ[ϝPyVm~UߡKE'm>vQ[ϝPyVm~UߡKE'm>vQ[ϝPyVm~UߡKE'm>vQ[ϝPyVm~9Qo d%QEQEQEQEQEQEQEQEQEQEQEVN# kVN# 7g?J9KsԮ 4? )|h_#+Y+Wxf |LkbzYw`ܖf8yɦk5^o/Czm--kx1$犀:}7Ə}7ƹϴ?v(\?Z?Zk>ϴ?s!ik#^NaF)RlZOY9}>]Rʴ`jab~nh-^ mHv\ۉa=1FŅe <@גGAn.co"6*YA3b|osgTi8? O9V@?#To?€#!ih!ikKy5aeiVUW$9}j/ϴ?q\?Z?Zk>ϴ?s!ih!ikC| >k>Σ_M__M__v(C| .:}7Ə}7ƹϴ?v(\?Z?Zk>ϴ?s!ih!ikC| >k>Σ_M_MSO՝Ve$ArchZ[mV2.:Ru>CDLHl xv.;TqO8(uy{+oN˜:4{Xln'W-a*ɑp s "xmi蚣/>+"yc̯"ȻL :FŌ:6C@!lDٵ . lpw6 ݿsޕëZyw Fp}j`kHմ=>N-R!'e`x (W-I|M.ϗtfqn_kLEe$Ҭ3\!1HͱQ?+@<[mm㷷"% qUE8.+[e!heVE?4@P GJt7Zc}T_<1kPSɵg0n3,ew̌2%5x=|I~[nTX%9;@SL$<%xMn $ĊJuL q~=sIVd`6!>33[:JOhqijrk:rXL#k;s|h ]UuuS1%r YLSP'p.Qx[WHUi [-N#R62HN!; ZIwoYMm^s2,ya8 q+zceo6v,1&Iڊ'k_v$"2+PYq*&T6Q'8ȵ959,&m5>pOQMϦ5Ey"ZfG+r,8'\. vڌ^dV`*R E8|xA?ݯ<˛+.^[8F+racxmm丸"%/$0UE$xj _ܤC2Pb? &VfiҾN;lZok5̬7(`=";TQ; 2vN=?ҥgg9cXFUYkHg.WPw=ŭ%FeYc%rH1_G})uwXȳ ".6F$'x$=+NSS/]],*%u*OaQzM-0ktt_iK1'}kq2N]L>f_;ۘ`J_|dqrMKKX-m`".NNp9$5=r8],> ׌.2\V-9'̓ =Ž[-Է$-~Cv8v[j3G Nu `\B᳝zV._̻$XTJ>UҪEoAiqimsυ, .ӕܠay@]~PhRI"c 2Yu&w(~nI[j:}[+v3MI^nd`[>1/W:J<[oqK RHPF A$%N-(IQ3c'#9Y;w0KmME|{5+fB B 98NJӵ/l-nRuDf\HK(l@$BIKKѴQ-kT-8ʅ=ڀ1tOj`/lm, qNH;ֻ\:c]Z=쁂](?B#Tc2űO/m JG#nюwSQ:Vۭak{ C`}dziĩ c \U @hlQΕjfW6׬"T(*;CƠvO }u1zcoN N9KTYK6wg'''<O ZRJH6™ .eS'm6+x%k\Ơ:Ǚ 9MiZvne,;hV5-2B399K Ȭ!QU,*J/ͧYj #^Cnd&g0~ ʌw\o~Ѣ.9dܼ}I&q3[y .[hq`Px|= ևjvWm%G=#kIhCn&i)%ǜn4cq#yt&0u\oYkh"0O 42wQ(1fO~j,ƙjא=c9R IYFdb.vA $+u ) A@5SRg쯼jIvgqP,0kK{J]FI)&Lmv8J ZRJH6™ .e䁧E˩aj..|dx'NҴ"ݭ [(YvЬj[dgs('\,Mbk|9dǔX;8b;/_ݼ07Zd,נHzE>Bs]Zuŵ六֭IWh[ S9ҫ[];LMˢv3Lɸvosyjک]&v-_UIKX.vB9! +[եO.U #qvwrK.zLV5ܦkZ M! uR +N[w[ Q v*X ͅ7Zz",cmgo=I ͈!.0A̋z.52c7L/ X7b n azLwWo5F vYpPEoAiqimsυ, .ӕܠay@5WIJKwpИ GfpB@nǦi(Er|RU.;I4=&;K[DQ5+n!C $sɩ#Ҵ9u8-Re%¢W^8/xS`g }RicUtA$vV.ѩ>H#qk{GԿtrbdYeT ,HѾӁ܇H t$V:]qfE,vi+8p $ 3E 1,ǎII4%Q@Q@d0k[ֵd0k[sԮ 4? g?J9KҗƉ<">^1"ȏ׌_og੗ƶ)qZU}?A.?kUQ@Q@Q@Q@Q@Q@Q@Q@N p6I7pPQTu0[R͡ϯܯuC$1)b"f%mfBdqQWy> uc{{c2I;Uf;Yb`DgilKZ"{YuK{g[%ӼߴNKnp똔h~ @ϓߠϓߠA5ׂu{xYӮ8Rc`I\ ^3[+ P511VmVV 6F>O~>O~]SvdWӀow䵚eE]x'_]:#5,69$QW-jVT 2#;O=xzZ{ˉ^1"ȏ׌_og੗ƶ)qZVtO#_p-s':횋?+_cR3ZO ?/ j+'?+_cGWXƀ5 A]c֢4`'u hZO ?/ j+'?+_cGWXƀ5 A]c֢4`'u hZj:ap\*J#RT+63qU4`'u hh(ENO ?/UB;?+_cGWXƀ V? J_O A]co%Z/' ?*!?S4`'u hh(ENO ?/ v:֚_25N9=tU?/?+_c@VOWXƏkQY? A]c?4Ed`'u hO ?/?+_c@VOWXƏkQY? A]c?4Ed`'u hO ?/?+_c@Փ}mGWXƬ\:k\ C[2?vAO;ZI#1M?ƶ( k&GvAO(;ZI{$kbֿ=i4gk_40p]4O4 ?k&GvAO'G}QHֿ=i4gk_4O4 ?k&GvAO'G}T3I 1"4%2 ?h';ZI{$kbֿ=i4gk_4آ1M?ƶ( k&GvAO(;ZI{$kbֿ=i4gk_4آ1M?ƶ( k&GvAO(;ZI{$kbֿ=i4gk_4E.GSNagk_4?ny??'G}PvAO;ZIM#agk_4?ny??ꡚH`(xɉ9-s@?M?Ək&[P?vAO;ZI{$hֿ=i5Ecgk_4?lQ@V:U_]jc9KZ&gǂG/Vax+D}bEnc[QR0(((I7:*2m_d ??6xoAn$#X³BQ ɍDMȫ#M}GFM+QD ( ( ( ( ( ( ( ( ($r?ʣ \^jqFi#ndNT:ZYqNIM4q(. (k O2moú[=nfx;C.N <z/|ڼ%i Idn C)Ŵ\<㑴xr%_ڋfD3/̪\䐬G`4Zjuͽ֭8fWh[$a9Sx>ҹZi|֖.&<@F1>KzGề#^=؂ٙ$Pr<;#u5ɢVc?2h@EPEPEPEP^U@_}תו|s_GA5/?<">^1"kď;m4{ҝ 2Svqg4%otДG^% ^]F]9`'-|q{?R'"W%o-aOD*_J^%o9zT ȔKP^U ^{> endobj 420 0 obj << /Font << /F17 200 0 R /F20 263 0 R >> /XObject << /Im8 413 0 R >> /ProcSet [ /PDF /Text /ImageC ] >> endobj 427 0 obj << /Length 154 /Filter /FlateDecode >> stream xM0 E|dky4+"тbU_EH]{wY՝%`佅&H 0Ms;{Sx8LOuq#ЯD+6+.,90'ފ0dݪlda/ /u-7+ endstream endobj 426 0 obj << /Type /Page /Contents 427 0 R /Resources 425 0 R /MediaBox [0 0 612 792] /Parent 429 0 R >> endobj 414 0 obj << /Type /XObject /Subtype /Image /Width 430 /Height 573 /BitsPerComponent 8 /Length 30684 /ColorSpace /DeviceRGB /Filter /DCTDecode >> stream JFIFC    $.' ",#(7),01444'9=82<.342C  2!!22222222222222222222222222222222222222222222222222=" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?翚O^E,<(R8q ڤ&7ozp8#ҡ0ֶG vE8OE>ֽYH,uv'3(\gc Ǭ}*< )!Q" vK ٫v#|,??OX¤Parυ'(@G'X,GaI  Q'X,RyB(Qd~rυy> TPYarυ'(@G'X,GaI  o$$h,.FXā1a;QCmOarυzv\]5wEhp=0{U zUݴq>hV0Ȇ>H(IG#}5Z)G'X,Gav45V+=yi$R}:n['Kȵ Z eGr mL9$qrυy> WMVM.YijϖGۍ98:XR -CSK?3R:d L^> y> Q'X,[y{V.:6 SNuC55Tso乙8`xJrg'X,Gaux6Y[Ǭl2Ny*axAԡQ}z%8`'v.O |Խ>y> Q'X,]{+]w_-?IͺKH@T,OS?hmjv'[vq,srF1ϠVWIarυGq7e"VHo!%卺m9-KR[4i=@#F~Ft%(> Q'X,RyB(UG'X,GaI  Q'X,RyB(Qd~rυy> TPYarυ'(@G'X,GaI  RC:y,p?c )E?d?i M5գFsa'ɟ|j/YxtiWrpͲs 36;Z@Ɏ?:M.K6e/)I$H,-B3Dt?yd5/25<.?5Rծg.VHI2ͱ+OZri+lգFsa'ɟSmwS`L2H#9qv&:K;\}ȌAtՃ.HI`WLܵBtRϑ_E<[F[ߊ xGCsqci,go5N5kxpuL+Q{ OB5>+/_O*ð{&xߕ({'!~T_'G=hal0F;W\WV{~0o68댷Aq}sΥ9M>M9 HdQ>7gwOҒ^l.YK2tx:1 67>z7?e ߲vrO6iR+HF˳cFGlVփkm2 \[PXYBHNIͭ_\jLd4* !ܞAJwj,m3"Ʃׯ_'G!~UJ$$7{ +/_O*ð{&xߕ({'!~T>'OT}n^Wk|WQ_U[a{&xߕ({'!~T_'G=R;3Ʈs=Ϳ!!X{{8+ Oֽ ϊ?? ;Hi\r@ )[tTF8&{ ϊ?? }'hJQqXΣcdW_'N#ÿT}f{6y8m6v d5xvC4Uyz>Kakc3dm>U/u!85^ CT^1"Q!UcBjס>me+T$$i‚y<} q M;S[2(Q."y2dVu%|ew y,5e X_r)UO#(wו?1- w_o?5zv̶ʑL7pW$2(uS-I0umbrl.#sd_o?5- =$SS:D:bL",JD1gn&qsOndO I *P}`cue ʷ7q\P?56^68"bM!#:пuh!J19s:*9䍭ҥ} y۬kHDx.mdXYmϙ4w;02rA}~uim[ޛ`Ti$+v2_,@20Zoj~rwlgy5Kk gk"F@!i>;o1ߝFnnݮ՝#/2H'^oh.+k5KM/Q[d)܉s;,m0~e mj~4JuDA5jORF56nY~uƷ-ї,bAGPJX:eo.%oQ%(\5I }uiRd)hRY6}t WIlI%!y=E= 2A;ķ0[]j6[#jZr!8 {`vrt$~y?sQlK_i?ywvlwg89q2SKI.yȪX6 G |:ni˝6y < dql} 4jV_JdU &98?SViŚiYݠݿ<s˻ΪZ嵌![H7n!gRr8%~ Ҥ`ԠW) ُk 8# ] s:F$51ɳl<͒Q~bſuޫsdʯA;WxZL`(PsO3icçڰ/u\ЛAGTVv ĸkN99qoMsa  ᶏ-@>9+;[pAsoq0hGV".pwc;Ϸ䡷`.<)UkwJI ;HE8#WmN >d'k{qK 2S*?~H1v@E]FX0 $~UxSXlnXՠx )<\ut?F_(CG]^U@_}תו|s_GA5/  x+D}bELJ.Ş)vԟOz<">^1" /M՗o&*l9/Co7G!e,9/Co7G!e,8<=݌ms?%T󏗭ZsJ6a]ن]~QE%mYh6~5E%mYh6~5E%mYh6~5E%mYj+ZMYte?ݮʊ,3 2m@'!"J`̄uÜ#Ě&g;ū/Ȭ=ԒJgo&V80\֞G\hϰ?#Di~n`D:?JC[j:mk1Mu٥H(^2H%^Epj0bK6K VI\,rȻpܬ UR@/ :O, qfv1$ +,˴ZWe E"HVNVL)#2[h^+HU⑮n|DD)'r)YK}KŇڊH>Y(o)To튉ؐ\S 4H]&`rc0ǐ-x" apو@ShV]:9?nr#gvBşkc.QEQEQEQEQEQEQEQE3p_Mw9?jW@_}֔4Lgq?A,x+D}bEt3?L&5QR0((((((((|Q A[-/ X}a}Cqsva躝kmmcS '`X+k$R)ۭĨLp4&mÔ2 1'-t{htZǦLҲ꺴sn?ܤd,]1cGwW%!n&Y[[Kk82+Fe=T#㒾6׭=cYM.Q+l]ea!R~zi>'.mn\_jQzJ4:οzWBo$sD˪9Ϡ (-t,g3jܕ%@=Ŭ_ٚ8\\,d/q-v"2翃LEuȘňW?|Q\>/ q|^j{l3Xq!x-^1"_؎(QEQEQEQEQEQEQEQEp*ӼO9Klrp5Ā,{aC&:u-Uȝd;% ewN U$p1n!$$qơU ;W-c{7srnKF*nS4G$ɥ E+Io KK}@o_Qpk[&*\.Z4G$ɥ E %7M/Q -iªEIo KK}@o_Qpk[&*\.Z4G$ɥ E %7M/Q -iªEIo KK}@o_Qpk[&*\.Z4G$ɥ E %7M/Q -iªEIo Ke-sn ܱ78[yT BEcp\?i]ڕ|s_GA5/=x+D}bEt3?s C] S/lGET½oGb[@G8T??[P?Qs=gͯE! Vv=p' \CuaX ?.罷¶(c{g( y>/-6yc[(xҕ,TFp3 w<~oued^ٵ䐢?rI>l䌰X ?.罷¶(c{g( /i3g=܉,0;1f V @87Uj)f}CԮZ%"ɷr~bad8.Os=`\{o]Ү,.-^k#Ki3e t:U,(mAimobv# w䓞a|K=4_JԮK^:Z{ z֐"5U3#1ki _HF7r5 3M,rc%@x N]^7d)=śBzvN@/S@??GVP/_M5褂9-e^1J _taXs=`\{osγ iW74E-Ū&r<,q$Hpa[5]H$ʮʲ$:xau%_??GVX,c`\{o??Xkͮծ-5M|Hݙ]#]ى]I 3iAk l䏩c{g( خj=[S@YAumie-p༌"^88,ł m}{g+Wj&iI5hKep XYj3j47sfI]e@I(uÖK.罷 m}xCTd+{YfeeW6@$ł??GVV9lu&+ X !GE 3,j"$fG6ccfK=vmz(ݐo`b9bcƏQs=E ??GVUֳX)77Qcyhœr7HTolJ(|75}gYymFe|IVh8$s0جX,t??[!<`HIS+/@fthnT"**ʀ8P-QE3p_Mw9?jW@_}֔4Lgq?A,x+D}bEt3?L&5QR0(1+p  U@s*TԀY;n>%PEPd51ϣi߆WOj(eӼ`` q"<;FU`.O¨RQ@Q@AO',Wl3gyS@Q@TҴk [[}BжA2 r=[#Bp Q 72%A=HRQ\wWZ+cKv3 bF0Wk+r} Wúl%֒ܺhvdبu[dwggP>xg#L 6^|Stcai[Oͷ97 @稫[뚯&W6PZiBL\])%i *Ϊ||%?Ϣhrěavm2Jؿ3~vkQ\>FN{ino7Yec[w*4{pCPB?X^N=Czb8/D7R-!XH$;̒tzE\i6e3.ƒ#baWZ-B#a6A#01ҹ ƏmklHcnQ?v*cV|vc>=Ɵ=cd9_w'~ld ֢^_.}mEvY z,xFmHQþU/b-0#pCr g #@ 5-I|M.ϗtfqn@<-wts*agM@過QUѡP;40BL*OC'S@1<H3o@. p2{;TQ@fCS:6fstl;NNNyɭ:(+?hV6T!?y袀 Zvn*;VE 23y5n_jh6ŋ(L[;#5|A =ĂgUG(ʤ lۏIEQEfCS:6fstl;NNNyɩ-t=&OKwo$rn; QW(( + /kR/&g;ȏ׌_og{_#+Y*e1袊Q@Q@Wj7.\J\v܀IpӜ`Š1qBU"}Hd H/Σ MtQEQEQEQEUI4:]N-NK WvGtЩ |=ϭ[*+Nktk S @֩v,hvJCtgivVxݏۤxݷwϮ~[I浂KmD/Ǖ>h!@Ēepe!= KH-`[`9Pry? +2_ [Iq۫"hle芘w Rv*y-j+KOm}9ϙϝ=OXm [h#I?OEG$<#-6e`G0HDCuo%I,2I#C+ v((((((((((( + /kR/&g;ȏ׌_og{_#+Y*e1袊Zoݭ2@d_j ]?Ʃ_3y t+?Q#hYQp?Yã[gS~Y&)fsrkL1Tf"@ GU~ M:{-"ݭ _YBͽ5-2Bgs*Bi(m?Z9id7\fGLWw8O@G%vϢsCo??Q#k>.4?+~~G ]?ƳsCo??Q#k>.4?+~~G ]?ƳsCo??Q#k>.4?+~~G ]?ƳsCo??Q#k>.4?+~~G ]?ƳsCo??Q#k>.4?+~~G ]?ƳsCo??Q#k>.4?+~~G ]?ƳsCo??Q#k>.4?+~~G ]?ƳsCo??Q#k>.4?+~~G ]?ƳsCo??Q#k>.4?+~~GֵѼY4 ̠1\uǝpO@ ES3p_Mw9?jW@_}֔4Lgq?A,x+D}bEt3?L&5QR3,oؚ4_>hX]OېO&:lo&@1ڤy4X,RDi #]"8>pbI4&DYncpOZآ̿k/uB[/I:A'(ҝj,ѻF pHLp<e;6G6qe@êYc16r>f__Q}ƷaX_Q}Ư:ϩ_>! f`2(0bI&WzVKR[]{t`wᶁ/X,kbj?Ͽ>ZzVYjv F+` tX,`bj?Ͽ>[k>)OwwRf^F-+2X,OϿ>G&>2sOw扡wɐ r69D}  ?ؚ4bj?ToN/o4eI%bN >u4X,fbj?Ͽ>Y6^*Ԧ9on%+k,fTfI+ 0 9;]å/]8\Y`n $R4oew! 0H`CQ}ƏMG}ޢMG}?5j/E=Mkcml%3$_ ӍCeG|$ZH&Bn2`a.rXϿ>G&>iZ:e۫7Gq`8$g֭`Ͽ>G&>I-ZIT $3VPuKAioYv8y 9 wD+nl)`MG}?5i,8uK6,vYa0V\.GߡcQ}ƏMG}ޮy.n-P%}Df,q2X,GϿ>G&>A-?_KL\QK4/YxFvGm,#}N O 4MtLcI#,Ͽ>G&>oQE&>ؚ5" B 9EQEӎ&;eY_nꪠjʊG siX\\klKre#fsuf&QEVdҧI%%$ٙI:vR6+N(+3Q4VgngfLUR|N?hEΦ=kղ[DUor$r''icRUq`HT!\[[VluzZ'~2C/'#s%玴k/.4c͈l@.$lOQn䍭y-"IaJI]H#d>$\6-\eR@%H,͍ܔޠcq-= 2]䙁6 "֗ŷ B 9EQEb)NPxLs׳Iw|9B{vn8Z\VT2Kf9LH]vYpF% kQ@6đC8*j((g?J9KsԮ 4? )|h_#+Y+Wxf |Lkb:(aEPEPEPEPEPEPEPXOE%ErZF(!- =(cjjŏz,6rj$E$ 9Q`rlsfx4 6;X^P+y(H nHF!@PJ:Z{iecfIg' HrNōXG[Dę'j( OugFNEI2em J8^o[j -wiv"!-P`@e ;JOQ[oG rcQ$B1/NNjG;[NZ=R5!dIB}P cޢ*j:en#)Z)#lt!FA#"mm㷷"% qUE8%|3tMQ?'Qל4s}jk~SN&iU¢!lH#1l<-ϥKy1co#\PȤ#I%ztbޛhrc5ď`g 3FqcPVG'@%H 2ʰ EOEG,'z`Q@Q@Q@Q@Q@Q@Q@Q@Q@9?jW@_}{3p_MiKDfw C] \G/WC7pTc[E#(_kZ~0ˑp;cU*!?Vn#:אGJ⹭ V? J_OE h(EY4Qp V? J_OE h(EY4Qp V? J_OE h(EY4Qp V? J_OE h*V259 ut<̪jWdַ'ALg/wxb{Ym|L?r#*FEJ_Omy<݆|ؼΧ(h+kUBřj+%Z/' ?*!?VM\.kUBdE%Z/' ?*!?VM\.kUBdE%Z/' ?*!?VM\.kUBdE%Z/' ?*!?VM\.kUBdE%Z/' ?*!?VM\.kUBdE%Z/' ?*!?VM\.kUB;/$(W8bؿ')R/&+ /kJ_&{3Wxf ">^1"_؎(jI7Ub݅8U$yO~t;:;  ~yXV9^Ϥ ouSK*Uym-q,ooU|1ߠd`}'f^ϤQ?E/ >y>߳Vݭ`a73sS4 T+ZM'D)bwa#6~* r.ik ?`I٣?5y`}'f^ϤC{ŧ=&2FXN@ $$ ./l.Kt,vbٻYΥ>y>߳G/?kbԴkIKkh#:c}:,9^Ϥ <~uxlu{m1$hֺVFe@#j/˸Xuͦ]-ۖ(8ffQ?M:ϩ*y>߳] _ZN[\ijDpy֧`}'f^Ϥ֖V7-su  *F]aG-`3-}Gwzvkf.%XcLB7䲕 i,*}'f^Ϥ'D)bwa#6~* r.ik6~tX,r`I٣?5y.YlW-嫫4"[8$|f,(}'f^ϤdItX\п6p\?ӱg ~v31~󲶴UuKʀG"1GCFUA F  _`I٣?5y'ľ zh"y1qXn)$RX,f}'f^ϤKīci%#Eא3*&IPv6Y~]ſ}M-Vi崷-ijſMT-ǂc~aX >y>߳]GoΏ1ߝ /?hO~Z)skvNeRm\u("8a |faㇾ+K!:}-abeXm$)R7 Eğ`Iٮ!*#qUUuKʀG"1GCFUA F Z$$iJ(1sԮ 4? g?J9KҗƉ<">^1"ȏ׌_og੗ƶ#*FQEfCYAWf8Kf(|v`!m:(( S^UZa3f[uX6TF\'8 0]bj};B.kusGmm „W*@Q@^jVi}kմ Fʞ ±m|XX[0ЈdV˦#jBdV CkoI1(HB(v( 'cy,$֦D"ܒLLYK*͒I_qEfCYAWf8Kf(|v`!m:(ԴkS$nF=\Z{/hvoٳb* yuS;+nS쬭DdIKIf'bI%$I$(%~nmGPGq@EY]DI759őEn3<˲R 7: B͆4+EGooE J8PpJ( {C:0BuK(&Ũtut'Fx|74) P/#%YDjRL[OTܨ]Ʒ ;B.kusGmm „W*ES7wqyO@3ldmkO[P=m^>,d.V[X6c<.q>dAڲ=&p ,I'%Y$$I$jz({G>V+G3[^1"ȏ׌_og੗ƶ#*FQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEcp\?i]ڕ|s_GA5/=x+D}bEt3?s C] S/lGET((((((((((((((((((((((((R/&+ /kJ_&{3Wxf ">^1"_؎(QEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQE3p_Mw9?jW@_}֔4Lgq?A,x+D}bEt3?L&5QR0((((((((((((((((((((((((g?J9KsԮ 4? )|h_#+Y+Wxf |Lkb:(aEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEP?ڕ|s_GA5p\?iZR3ٝǂG/WC7pW=?A,2tQEHŠ(((((((((((((((((((((((( + /kR/&g;ȏ׌_og{_#+Y*e1袊Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@9?jW@_}{3p_MiKDfw C] \G/WC7pTc[E# ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( (1sԮ 4? g?J9KҗƉ<">^1"ȏ׌_og੗ƶ#*FQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEcp\?i]ڕ|s_GA5/=x+D}bEt3?s C] S/lGET((((((((((((((((((((((((R/&+ /kJ_&{3Wxf ">^1"_؎(QEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQE3p_Mw9?jW@_}֔4Lgq?AzSm-ABŲI5G_#+v_ֿ=i4gk_4آf?vAO;ZI{$hֿ=i5Ecgk_4?lQ@M?Ək&[ >T{$hֿ=i5Hh@KoG/[[ =h@KoG/[[ =ew|";mܸW%o-ah@KoG/[[ =kʾ9K@KoIq4I-(ZFbdS6M%q9A=䚲? endstream endobj 428 0 obj << /D [426 0 R /XYZ 86.4 708.045 null] >> endobj 425 0 obj << /Font << /F20 263 0 R /F17 200 0 R >> /XObject << /Im9 414 0 R >> /ProcSet [ /PDF /Text /ImageC ] >> endobj 433 0 obj << /Length 186 /Filter /FlateDecode >> stream xM0D{ŖvMI9%`(Ut(7ffV3ҊZ(=8J<%Iop˔MqVϤH\8]؄E8^ŭiq؟N$ģ Jz^yr"[/AJʬ^MW D/c7 endstream endobj 432 0 obj << /Type /Page /Contents 433 0 R /Resources 431 0 R /MediaBox [0 0 612 792] /Parent 429 0 R >> endobj 419 0 obj << /Type /XObject /Subtype /Image /Width 430 /Height 573 /BitsPerComponent 8 /Length 23179 /ColorSpace /DeviceRGB /Filter /DCTDecode >> stream JFIFC    $.' ",#(7),01444'9=82<.342C  2!!22222222222222222222222222222222222222222222222222=" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?翚O^E,<(R8q ڤ&7ozp8#ҡ0ֶG vE8OE>ֽYH,uv'3(\gc Ǭ}*< )!Q" vK ٫v#|,??OX¤Parυ'(@G'X,GaI  Q'X,RyB(Qd~rυy> TPYarυ'(@G'X,GaI  o$$h,.FXā1a;QCmOarυzv\]5wEhp=0{U zUݴq>hV0Ȇ>H(IG#}5Z)G'X,Gav45V+=yi$R}:n['Kȵ Z eGr mL9$qrυy> WMVM.YijϖGۍ98:XR -CSK?3R:d L^> y> Q'X,[y{V.:6 SNuC55Tso乙8`xJrg'X,Gaux6Y[Ǭl2Ny*axAԡQ}z%8`'v.O |Խ>y> Q'X,]{+]w_-?IͺKH@T,OS?hmjv'[vq,srF1ϠVWIarυGq7e"VHo!%卺m9-KR[4i=@#F~Ft%(> Q'X,RyB(UG'X,GaI  Q'X,RyB(Qd~rυy> TPYarυ'(@G'X,GaI  RC:y,p?c )E?d?i M5գFsa'ɟ|j/YxtiWrpͲs 36;Z@Ɏ?:M.K6e/)I$H,-B3Dt?yd5/25<.?5Rծg.VHI2ͱ+OZri+lգFsa'ɟSmwS`L2H#9qv&:K;\}ȌAtՃ.HI`WLܵBtRϑ_E<[F[ߊ xGCsqci,go5N5kxpuL+Q{ OB5>+/_O*ð{&xߕ({'!~T_'G=hal0F;WxpuڏaO\o &&$m(峻'IgjZ,:+ui5k1+⩺ԚI.>*ek[XK{4B2F۰;ןhMĘf"fq8B5>+ 8'IU1ɞa/kGU:uԌ^}г@|n#U5cPա<$-X8; Joڠ :q?/?]֏`s֯5yqe\2ZGiM nO U5}JMCQ6cTpykԿ/?]^.WSaG+?/?]^.p/d'WXG8tax#_>W^.p ?QvdWd/_O*B5>+; 3aG+?  ϊ?>~Wk|WQ_U[`L+SQ>PyC^']O8:O*~ɞ5u׳mRQX(V~k|WQ_UO)$"E{O"63>H-ۦb0 05k|WQ_U?G;FoRP{H.u $g ϊ?w!wF0ٳvYm,V~)'sī}G>0xK]:[ _%1#i& { OJWxKhn<ӊ?A sW f ik,1\j'm$Lt??kiڝ2yqBw,a+ɓ"(C+kgIow#,NYO|)CFIi} o?Sӵج..e>T^Rdx$ۇB'@ltJIۯDkkcfwy%Tŕ~8@uoᨭo Yu'"qW2!GadR$-;p 3%z|uk%yHIWHC (UU2劆889y-J  oօn3@ bVٍIh9Q$ml>/?kcYXSHdB;fO$Cn9D~^IP$Xܖ~QH*8l. ȪLr p#N} q-M6$H8yWy,I#rYIb |nnveYbhnaB%)sk%o|ɣ܉5k?5kMj؆KI$1\`@'? Ya@5|U\w7Xk+9AnFɎHv nW$D(~c[nA_{sgym=st{VL鵖5S ؒKC :zoiW[-5i-eeG"$7ncò>+G|lh%3}0j?kԬ"֥U;%!tuč=>u5gu5;Oیyin}t WIlI%!y=EKq*WPIY:}`^Aqu*m;}"i 7"AC3VMԬ'ҽI! Y@˘y?sM:b7҉K*H=G+ӵ.c`ќr\LҶ 1@ i^E^@w)! o%ѐ 11rG?h:Rܤ#G0YX 3e#HM ګ+)rXֿuriUJ[S" "z/si6VM9Ti a9c8ֲ"^\F5s^759좓[ђ#5H$uo/Ô~Gず(_1ߝAo/+G{7K?2dHU 0p H#[hΟCR 4HCKr̉˄V r7?ڵۭ3"aeV$)#`}+GItfw ܶ́o$UqRtA|M$n,"2^(WDC 2`e $pHO?^fO@[ZVr]$0]jF1mp"atmmd'"WuG,QA䘧l̝&%;v|9>t`U PA+RO-cu'JGXOy0qݡ%!ΉR_XM倗(A'Q<0p@:KTwҺ*JH$ר )o=#ĈER41$AVC8?"4똤{1m ;~Z:Rܤ#G0YX fO{X++0 ]'F&v`U)muq.܌hz(-m7Ii(a6Ep9=~=Q@#23U$)xZT3"aV$)#`}*OA7@?Ə=?e[^OO"63DH(3rwu8W[Jb~X!L*;J(Wg6DH*;NHD~'޳I41Mڭ3ܹi@d;c9>nz(|)s.5坪[<*xY[20 w!II23xoH]1aR4kD!WkO'p+>gKCV8l6u"B0c&naHc>hu]zm14ڔQu gH-falCNXD9@N|@;+RTӢWVΕmDƒ c1\vʡ7YMu=I%`Ѭ`-G1ڸ[^öhˋ{y"0P~p#;I!zΡ$e7jrIH q ِSj }KO̶fF`8<\>Ku,RAyU΂ّM N>BIx?AzBoC Z! pʻZy8;\61<t5P&-%0F(=~WSǯֹwPյ:/MHlDпL䉛XmRW^LM:#6D]Bێ<o6Pii5A$jm<&BlJ0#`!tff(L#(-wL,q7*PJmM؞{u ȪaU H*=JSMpE4^=6t衚RBn&`[r2TG&?h+MԼ8fӎ$3G,k#ƎJ:Kp8#Lu_Bs}e[浥<~DHlVw6coR%R8=ciZ:[xfKMu Kn# `OL7ay?xY#ab[g6m0,,pp82]{S֦Nlwf6]$іQG#oG|3 KԒ$W?e0~b7('܎>APEPEPEPEPEPEP?ڕ|s_GA5p\?iZR3ٝǂG/WC7pW=?A,2tQEHŠ((((((* }7O˶NPI8@X14FUaPeeT т`@;G'({xlZL\F< sӃ"~~ƧyI9HԻѝ<*XIRPEPEZQ'9qddJ* {YaM]a`:|ǟO{o IhBzpdO^<>=ꛢedI۬fEWx ʬHRGP VT:o?&in/E0 c=jo_jteY}$Th|r2~DӬ人$[$@ $$mZ2F/- ,0Q}:vm92hrGu9=.Y}nzuQrn,Mde B b|A׵+GKo C6qImda IkiOGR@008t]{S֦Nlwf6]$іQG#(((((( + /kR/&g;ȏ׌_og{_#+Y*e1袊Q@Q@Q@Q@Q@Q@fxNWƭ[,זs[3PN8:(D֧n-3^kW72)F,ǹB u{'HARɺ@[w 2GjI鳸8@ukI-f7d8#mr8dz_bKEXgb b,(Hd@ #C8BfNHk`7Q[x^́0X0sFi1DxU|$.Y?8/tD4r0)-Wz\O^1+\} F$\ _8+ז^5n.YIJH<4 3.׈R'Ӯv9]7- BTJ\068{^]Z%lfIV9Z丒gxH$%ǚ2$JIޟDR"tYt,bOnP&byk@[8jZ66Qi)-K:TZͲ+e0,NBfNHk`7Q[x^́0X0sQ@4^=6t衚RBn&`[r2TG&?jWO7Ozw9}("SO n#}䶚 hb'<|cAV G}IխOnB #G"Q@P# 򳶀;Jjv>q;&;TԜp2OVk"&H;fRr Qӭqv~ Ԭ 6SNm*Th|9KlAu{'HARɺ@[w 2GjI@ukI-f7d8#mr8dP=z6-&.fILQ 9??c\Xo/2y-hXK3JRHj!3Eu_Gi\^Y50-/q@UBchP9(ijմvEkxBBt* '>d20TL=Z9P*G%([ REyƷ]jAltS51%wf9>bkPqBVפ" Rծ7-d] H9L @P{ j߉!ӅeF@O\Ŧi7zT)nmbD,]́ m{JΛN)pW1^״-3m ڥxY&%_푆0FA'V4B9#.Kˍ8 Aij+<ɧCkbhB]Fq[Q@Q@Q@ka40Y'ۥhcK >S FT6F[A즂;[1jMۙL!FYR @m~}s>t6Qy[ }I|lg+l6@Q@Q@9?jW@_}{3p_MiKDfw C] \G/WC7pTc[E# ( ( ( ( ( ( ( ( ( ( ( ( ( (!o."vv?L?o-?bMGJWP|}+QB/B//;_}} GA OGA O\Q;_\.uo-?o-?rchGQpk4k5}chEQB/B//;_2^J$R3EZŭ}gt*ٷ v[mt.|ؓF:qjb)T2`c5**xN8rGLfvfqqu6/'T.f7w9~c@ik5'v@_I v\4HªzZ?Zk>ϴ?q\?ZOHۣ#+C| DQUQ)R/&+ /kJ_&{3Wxf ">^1"_؎(QEQEQEQEQEQEG/\.'-[~lPÒrJWhX(;cGCն,1 3y$5Ļ>8 t:;jj.YVi[}*\mArkt4[Ns)VJ_lXhЮv.1@xZYV=qnH$3A Լ֍eeЦ>lp3y Hbeč*2ܑiZ6䄗|kLя-JwNU#kmt2Jt5%TN]7g{ oXkKf)đu(P"M]70' TV[69 u0@A$0"4ǹ+ni糑'(]y% '1X^2Q"pʬBYT Fm;LTp+K$22ItUy 6}LjBm#(N덮ap̤*i(MoOKM'TXf6XU>0 U%T7U,7/Mݦ>'6( ( Ĩ8,aEkkG[g5VVH8;s9.=HH[KL}mԢXq6KzJtP֍eeЦ>lp3y Hbeč*2ܑϤx5=/m4Qa\aT@%T¶HyPTk}ݬ/lA$7D#(%ITň4[]"=*+8ѬrFhdKheu^jVkv[$q1jr$*dA{cp|q^얞l53mRp^gxBzWEU࢙ ?/ϓߠaXhϓߠϓߠc/>O~>O~6? ^1"ȏ׌_og੗ƶ#*FQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEcp\?i]ڕ|s_GA5/=x+D}bEt3?s C] S/lGET((((((((((((((((((((((((R/&+ /kJ_&{3Wxf ">^1"_؎(QEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQE3p_Mw9?jW@_}֔4Lgq?A,x+D}bEt3?L&5QR0((((((((((((((((((((((((g?J9KsԮ 4? )|h_#+Y+Wxf |Lkb:(aEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEP?ڕ|s_GA5p\?iZR3ٝǂG/WC7pW=?A,2tQEHŠ(((((((((((((((((((((((( + /kR/&g;ȏ׌_og{_#+Y*e1袊Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@9?jW@_}{3p_MiKDfw C] \G/WC7pTc[E# ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( (1sԮ 4? g?J9KҗƉ<">^1"ȏ׌_og੗ƶ#*FQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEcp\?i]ڕ|s_GA5/=x+D}bEt3?s C] S/lGET((((((((((((((((((((((((R/&+ /kJ_&{3Wxf ">^1"_؎(QEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQE3p_Mw9?jW@_}֔4Lgq?A,x+D}bEt3?L&5QR0((((((((((((((((((((((((g?J9KsԮ 4? )|h_#+Y+Wxf |Lkb:(aEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEP?ڕ|s_GA5p\?iZR3ٝǂG/WC7pW=?A,2tQEHŠ(((((((((((((((((((((((( + /kR/&g;ȏ׌_og{_#+Y*e1袊Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@9?jW@_}{3p_MiKDfw C] \G/WC7pTc[E# ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( (1sԮ 4? g?J9KҗƉ<">^1"ȏ׌_og੗ƶ#*FQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEcp\?i]ڕ|s_GA5/=x+D}bEt3?s C] S/lGET((((((((((((((((((((((((R/&+ /kJ_&{3Wxf ">^1"_؎(QEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQE3p_Mw9?jW@_}֔4Lgq?A,x+D}bEt3?L&5QR0((((((((((((((((((((((((g?J9KsԮ 4? )|h_#*spT[XeĒjG/VL&5{$hֿ=i5EHk&GvAO(;ZI{$kbֿ=i4gk_4آ1M?ƷL@}'M#;ZI{$ksTy??0M?Ʒ*hu4* gy&gD`c) `~O6zwzyn4 3J"1Dܫp9;[a_UHtI51d#"ۇ0zEXn >lcn]q~eqQX^NI-/Vz,Oczo,[-om,%Hnc0ДH6rcQ|*vq+QDd?(b((((((((( \H?/:j藚EiHۿbn`8={qU#NrjSaGMf9J 1BJ2ǃL[Aryۙ# Eq˓q&? 0_6j5ZC4Y3[¤,BPqm%;m:bّ-3*`9$++0= qsogks5lpTvn5˫ 2yv nϒ<d8x_nH׏v fI'-9\+&NDAMc?2h@X'lQEQEQEQEW|s_GA5_MiKD;ȏ׌_#N.M6tk!9vC ݷgMo m*)7t%4W%o-/c>h@KoG/[[ => endobj 431 0 obj << /Font << /F17 200 0 R /F20 263 0 R >> /XObject << /Im10 419 0 R >> /ProcSet [ /PDF /Text /ImageC ] >> endobj 437 0 obj << /Length 154 /Filter /FlateDecode >> stream xM0 E|dky4+"тbU_EH]{wY՝%`佅&H 0Ms;{Sx8LOuq#ЯD+6+.,90'ފ0dݪlda/̰k+E endstream endobj 436 0 obj << /Type /Page /Contents 437 0 R /Resources 435 0 R /MediaBox [0 0 612 792] /Parent 429 0 R >> endobj 424 0 obj << /Type /XObject /Subtype /Image /Width 430 /Height 573 /BitsPerComponent 8 /Length 20811 /ColorSpace /DeviceRGB /Filter /DCTDecode >> stream JFIFC    $.' ",#(7),01444'9=82<.342C  2!!22222222222222222222222222222222222222222222222222=" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?翚O^E,<(R8q ڤ&7ozp8#ҡ0ֶG vE8OE>ֽYH,uv'3(\gc Ǭ}*< )!Q" vK ٫v#|,??OX¤Parυ'(@G'X,GaI  Q'X,RyB(Qd~rυy> TPYarυ'(@G'X,GaI  o$$h,.FXā1a;QCmOarυzv\]5wEhp=0{U zUݴq>hV0Ȇ>H(IG#}5Z)G'X,Gav45V+=yi$R}:n['Kȵ Z eGr mL9$qrυy> WMVM.YijϖGۍ98:XR -CSK?3R:d L^> y> Q'X,[y{V.:6 SNuC55Tso乙8`xJrg'X,Gaux6Y[Ǭl2Ny*axAԡQ}z%8`'v.O |Խ>y> Q'X,]{+]w_-?IͺKH@T,OS?hmjv'[vq,srF1ϠVWIarυGq7e"VHo!%卺m9-KR[4i=@#F~Ft%(> Q'X,RyB(UG'X,GaI  Q'X,RyB(Qd~rυy> TPYarυ'(@G'X,GaI  RC:y,p?c )E?d?i M5գFsa'ɟ|j/YxtiWrpͲs 36;Z@Ɏ?:M.K6e/)I$H,-B3Dt?yd5/25<.?5Rծg.VHI2ͱ+OZri+lգFsa'ɟSmwS`L2H#9qv&:K;\}ȌAtՃ.HI`WLܵBtRϑ_E<[F[ߊ xGCsqci,go5N5kxpuL+Q{ OB5>+/_O*ð{&xߕ({'!~T_'G=hal0F;WxpuڏaO\o &&$m(峻'IgjZ,:+ui5k1+⩺ԚI.>*ek[XK{4B2F۰;ןhMĘf"fq8B5>+ 8'IU1ɞa/kGU:uԌ^}г@|n#U5cPա<$-X8}g/_O*kGrϹskW.-#&ʅBHl7'GҪ&LȱDDE^+W_'G!~U[b}WD9|+an%X[Ydnxpu+xwO*óf!g [Ф H!wF8/Gtl-|{|lԚj%'=+_#*/bH#]G_N*G/V??*M\3ݚ1MqdĒ\m28PO'To7ɧjw`a^ %ܱP&LΤpp%u&=܌;[K Ue>Je9%?4}~ONcbR9yIFn Ee5)&n^YMe!nlRV-~%gԞx[;drpppAQ\ȇY,IR%; Hf?,2w"R~b2Zլ #!%^Vp~V#c  ",nWYV8X˖*Ե+'DTr#0I#BZD5[f5';ݣ\N~g\G<;`To;ug;Mb=Lj7! 'Tm< 8Kvi5y%@w1cr[iFE vT2BS"fA18$g;?5ƾH7Cφ4ؒ#C)]$˕fe%%;um%e1#Hr)ͬPk -Y&r&NH8կ56bu, $sn^"A]fGOՄeַ"9Ury\on g `L^Y LO$_Mn]F9o_RPZVht7מֵ;>n1gwcO|uk,1\j'm$Lt,zĪZ;]C%f$dAyzԫXo@U's x ^Ak]^)e9/-dMq! FUyp'Ny#KZj|'K.RLln U|~u7kpfBe%XqA"M2[Ʒzt7p.F쇐Lgi%!Zh-CA~=4ldSdvݭJ #apAv ^W|mvp̳fp@)W(aJchװM-ytVi iҌ.eikƋteiclQ %>}uiRd)hRY }^&.`!)muq.d'k{qK 2S*?~H1v@E]FX0 $~UxSXlnXՠx )<\ut?F_(CG]^U@_}תו|s_GA5/  x+D}bELJ.Ş)vԟOz<">^1" /M՗o&*l9/Co7G!e,9/Co7G!e,8<=݌ms?%T󏗭ZsJ6a]ن]~QE%mYh6~5E%mYh6~5E%mYh6~5E%mYj+ZMYte?ݮʊ,9y<%z1 =;`qJ[E !e[E !e[E !e[E !e|Mi4KudєfFHv*(XX.l[ 9*/Co7]mX,r_՗o&Co7]mX,r_՗o&Co7]mX,r_՗o&Co7]mX,r_՗o&Ww~mMs+Q]`((( vB剑K k~o=q@lQGҺ(6~4?V_haX /M՗o&(X /Mj[@,ṞkLnH BE1yaKd'h gۓpk>9KsԮ 4? )|h_#+Y+Wxf |Lkb:+3[6ky*]8j%YjO$Üzq7=R*/Q\ֹ7O&8/FKw;?hlW+LI g6Fǐf9 He'Q (Jl2C69n  4'SɷF-#ά8"\qtW=7WKnoT$iP**"w>w^ahrmHe>eEsQxE9yM"WVH9S-Fm#nYq Rȅ8 #ր4.nzpE;2I,}s# *KB9DlТ <i+ȬH `($~:ѯ|L2͒o6#Ho_,9qfESw.((((((((((((((((( + /kR/&g;ȏ׌_og{_#+Y*e16ݵw%*gVB*rybPXdzSl5~_7"uy j>u{s~%jEnp| 3Ƴ&I*TW|r.Knn"ߺ;go6݊.U~P>V+БFM7[Ύv˰[(;>n߹nzz..»Yʋ%3>eִil]Ao%ӣ6nnlFb3_oNԵ}1XYo܊X"7Pp]jvne*KiE pJ38x PKk>H]E2F`\9۽I x帒wYLjA;$l<) wt̯/fk*f/(`0wfz..»Yʋ%3>e֪Y} {ͶY!"yND3+ԁs@M"$ӑ#Omfȕgf;!%;0H:wVscwmsC*d29ңpnA2XX![ >C Yneg Qs=#W4FK_ݬ?eH$9 u:&Xa.DMepw89'R%,S 4 Alu[xn0`IVwGb ioKG<1tdQ 'Γ o i^iGu,7#iofydA r(l|sEbWL5fH;GH%d*'$'vZ׶xvĞNXfnجO%I$No@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@9?jW@_}{3p_MiKDfw C] \G/WC7pTc[k1bCr9I #Z?H|}^{-=Ą4gӚd֗.R \ @V9TUZwk熦ծ/Z䷇R[ x Ѓ&< IwiAqyZ~=I( WwXF$ಷEw]6xQlHzZBJfBe%XqA"n{q}isޠ.A]u(-{ 6h)}+b5 `I n] 7*!I@%[@֝Xh|o>o.yMg#,Y>,JU Y͌&|?{I)dUv$p9nA:vW֚]Aum&vMѰppÃ#BJfBe%XqA"$((((((((((((((((((g?J9KsԮ 4? )|h_#+Y+Wxf |Lkc\l!HB'=UocmcnV-(q~?>6_"kR_GԶl!1#XУL[s0^S#].xu Gt2T嶳*;+qyax--j[3ipbx8&9R2 #A?1<;]YecQBѯ`[BQ7&/s/g+8]Fh;]t&=&]F_((E%̬)U ʝm SYNۡӣoV5.Jz72Bp7,j(kw:]$YaX@.'24M{y4CHC7ؘ~>cG%+? G+}Oڤlue"̄pl|f\Z-ƣs,lx|d@V( 5c@/"XB II hc|x-$5췚APj!YOݬܓoJW?+)~./sYЭaKKm#$.+@vMkjWY|{-yk#gk4p#y xe.FGۂĈp(k'\F YVY07vH (7=[k/jWN 2Ywm\`LF\PVW1}aii4rH}F;Ww'~ XH$Kų#J)3@qn䷸%U)$r(eu#x SM4 Iq['|ʹe\b' 袊(((((((((((((((((R/&+ /kJ_&{3Wxf ">^1"_l-ͪeah;FA N~aګlI?{Hn̻s`3LMFsW4[)&-~zV_N͒}nhUXyXO͵~\5 ?[ ̺A k$)KyQ,fAkkQ4VgngfLUR|Ro-I sr#S$A! i897N7a J"u{*DpMo+Y]%1)N:|˺E)Oa`ywg \Կ GTZqnۿbpqc85}k lwk!M&}46wx!$TȡԌA;VmI"II.@XY$“]9 GFcgyx(nT̚h&(*db ݧYI$HeJ!PM:Ԗv9ro mX|Ggu}7lMk[BG1'3<']k;eb_r+oM!$1 "|]MS@ڵsܴRZHGUŒ$ǘ6C~0]jEN'j.rpMAxkKoYc]Jdѫel  {k&?hTUBI *^YUNÆs>M+VM1/n.iom"TrF?'eI n+`gGkn$|GxpClPN;1OEKm\++n$GeYK31.B"2uCkz}6r*-dEY@l"6$.ϪHѵ[>8 'sB&ȌDbO1N.usn2sa)5<;Hw6Gev%v/<,6Ӻ]̰DdAe'99 !$2]Z[˧6w?(pc@xD)é\/_̶ieCr4eART{*=wKmcLkE{\ Z/ 0) rFAGleieW 4>ѓ@$ 袊(((((((((((((((R/&+ /kJ_&{3Wxf ">^1"_؎(QEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQE3p_Mw9?jW@_}֔4Lgq?A,x+D}bEt3?L&5QR0((((((((((((((((((((((((g?J9KsԮ 4? )|h_#+Y+Wxf |Lkb:(aEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEP?ڕ|s_GA5p\?iZR3ٝǂG/WC7pW=?A,2tQEHŠ(((((((((((((((((((((((( + /kR/&g;ȏ׌_og{_#+Y*e1袊Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@9?jW@_}{3p_MiKDfw C] \G/WC7pTc[E# ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( (1sԮ 4? g?J9KҗƉ<">^1"ȏ׌_og੗ƶ#*FQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEcp\?i]ڕ|s_GA5/=x+D}bEt3?s C] S/lGET((((((((((((((((((((((((R/&+ /kJ_&{3Wxf ">^1"_؎(QEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQE3p_Mw9?jW@_}֔4Lgq?A,x+D}bEt3?L&5QR0((((((((((((((((((((((((g?J9KsԮ 4? )|h_#+Y+Wxf |Lkb:(aEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEP?ڕ|s_GA5p\?iZR3ٝǂG/WC7pW=?A,2tQEHŠ(((((((((((((((((((((((( + /kR/&g;ȏ׌_og{_#+Y*e1袊Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@9?jW@_}{3p_MiKDfw C] \G/WC7pTc[E# ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( (1sԮ 4? g?J9KҗƉ<">^1"ȏ׌_og੗ƶ#*FQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEcp\?i]ڕ|s_GA5/=x+D}bEt3?s C] S/lGET((((((((((((((((((((((((R/&+ /kJ_&{3Wxf ">^1"_؎(QEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQE3p_Mw9?jW@_}֔4Lgq?A,x+D}bEt3?L&5QR0((((((((((((((((((((((((g?J9KsԮ 4? )|h_#+Y+Wxf |Lkb:(aEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEP?ڕ|s_GA5p\?iZR3ٝǂG/WC7pW=?A,2tQEHŠ(((((((((((((((((((((((( + /kR/&g;ȏ׌_og{_#+Y*e1袊Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@9?jW@_}{3p_MiKDfw C] \G/WC7pTc[E# ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( (1sԮ 4? g?J9KҗƉ<">^1"ȏ׌_og੗ƶ#*FQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEcp\?i]ڕ|s_GA5/=x+D}bE^njkP1lMQWxݩƶ1M?ƶ({$hֿ=i5Ecgk_4?lQ@M?Ək&[P?vAO;ZI逃agk_4?ny??'G}PvAO;ZIM#agk_4?ny??ꡚH`(xɉ9-s@?M?Ək&[P?vAO;ZI{$hֿ=i5Ecgk_4?lQ@M?Ək&[P?vAO;ZI{$hֿ=i5Ecgk_4?lQ@M?Ək&[P?vAO;ZI)v :ZwM#;ZI{$ksTy??0M?Ʒ^1"k _#+v_(Q@Q@Q@OQԓoTtiM2R)[io.@Ի]|E_6 7Vt7I岫b8 3*ذMqz%MNx fWAql"$, v oTxWկBO-YfuTD_x(|'kl K&9_,dV_p^Z\yM}#4;$͌mˮ:̼>a+Siڞ%}JӛOX%)c `Q3z 垿kq%)rLj"oEY2n0c?2h@X'lQEQEQEQEQEQEQEQEQE$UIG@5U4=T{"3Iw^X'n2p*~)[JtL3h )@w(IFVX}Ak~4.R {s3d6rpN9}F mF+HfK&kvWXTJN-UӖ,Z^;2%|eP$eb;Uӯ.mnfm2B#ʜ>M洶Yua0O.@6aX O 2? }$墇+!d(>^}GFM+QD ( ( ( ( &V4? )|h'q?A^$~)Ei.d'.d8ɣ-S&=/^%og9{m_o m(@KoG`W%o-}'^% ^{xxr5? l{ޡ?-o m(3x/B%R'"W%o-aOD*_J^%o9zT ȕv:X@_'r^] ^{h@KoG/[[ =h@KoG/[[ =h@KoG/[[ => endobj 435 0 obj << /Font << /F20 263 0 R /F17 200 0 R >> /XObject << /Im11 424 0 R >> /ProcSet [ /PDF /Text /ImageC ] >> endobj 441 0 obj << /Length 246 /Filter /FlateDecode >> stream xMPN0+hxӐ4A8T H 'QDhv<;= Z UXĵ6oH`Ԭr^dwRd?vb[m_ۮ*fxX>u;!y7Uॠz\])AhT*3bJ:[$k< h^/dޝ[:[yozIh' s'udp9y?G|]˙R endstream endobj 440 0 obj << /Type /Page /Contents 441 0 R /Resources 439 0 R /MediaBox [0 0 612 792] /Parent 429 0 R >> endobj 430 0 obj << /Type /XObject /Subtype /Image /Width 430 /Height 573 /BitsPerComponent 8 /Length 29324 /ColorSpace /DeviceRGB /Filter /DCTDecode >> stream JFIFC    $.' ",#(7),01444'9=82<.342C  2!!22222222222222222222222222222222222222222222222222=" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?翚O^E,<(R8q ڤ&7ozp8#ҡ0ֶG vE8OE>ֽYH,uv'3(\gc Ǭ}*< )!Q" vK ٫v#|,??OX¤Parυ'(@G'X,GaI  Q'X,RyB(Qd~rυy> TPYarυ'(@G'X,GaI  o$$h,.FXā1a;QCmOarυzv\]5wEhp=0{U zUݴq>hV0Ȇ>H(IG#}5Z)G'X,Gav45V+=yi$R}:n['Kȵ Z eGr mL9$qrυy> WMVM.YijϖGۍ98:XR -CSK?3R:d L^> y> Q'X,[y{V.:6 SNuC55Tso乙8`xJrg'X,Gaux6Y[Ǭl2Ny*axAԡQ}z%8`'v.O |Խ>y> Q'X,]{+]w_-?IͺKH@T,OS?hmjv'[vq,srF1ϠVWIarυGq7e"VHo!%卺m9-KR[4i=@#F~Ft%(> Q'X,RyB(UG'X,GaI  Q'X,RyB(Qd~rυy> TPYarυ'(@G'X,GaI  RC:y,p?c )E?d?i M5գFsa'ɟ|j/YxtiWrpͲs 36;Z@Ɏ?:M.K6e/)I$H,-B3Dt?yd5/25<.?5Rծg.VHI2ͱ+OZri+lգFsa'ɟSmwS`L2H#9qv&:K;\}ȌAtՃ.HI`WLܵBtRϑ_E<[F[ߊ xGCsqci,go5N5kxpuL+Q{ OB5>+/_O*ð{&xߕ({'!~T_'G=hal0F;WxpuڏaO\o &&$m(峻'IgjZ,:+ui5k1+⩺ԚI.>*ek[XK{4B2F۰;ןhMĘf"fq8B5>+ 8'IU1ɞa/kGU:uԌ^}г@|n#U5cPա<$-X8}g/_O*kGrϹskW.-#&ʅBHl7'GҪ&LȱDDE^+W_'G!~U[b}+;g^Ga>b 8'Q\WV{~0o68댷/ð^1"x+Ă9Z5ۻ(pO$u+D}bEcB\=ٯC}t WIlI%!y=EO|A|vv eP]E dȬJ<7YRj3,VS䪟; FP*~cZ@y?sG?kf?6+ mϕ#$o 6Я>IdP[#Raٶ]FU(1eoߎ_?j+}b[{]I煳H,üuĘE"Y3 Fc/pL% #% q*Zm!@2Ugb:6>-BunnㅌbjmKRmBp.$EG(1:ěB:G!u!CXcRs5uTs[#KXx-ƣxR/PNuFٓ-ۃxna:_T a@s7%adR 0[,gj5K+D/2*dsFzӾy?s\kzstݢYVX3@0Xd}G"` \uş2hw"`d䃁Z} qZhڶ!7RlI W;e*X$ eaxXFPՓ>me+T$$i‚y~0q4| uP-ZWDjv-᷊HBB td.r2i pF܇#Qa)3HV,>C/&+h6z?v';u\@o76z|g;Y_OdϮYaU0;m$d3͘9?F[Jcpi%71Q ?(M-<skvQ۬Q:^0P7/G 7 v_oᦍR L 5jzv <C-8 1۴' nywcYK[^+pi1$2 *NG:VY:TLE=1a"'aKn{|~HԤ}Fyf96m|UJ/Y[u`l\Uy?sMTKG}+bČAz>⹻(u%Ermp*[I$p699 v\\\K$Q@$yMFƟ,ְMq}o 2)*`kZ}pqI#Rn6;)!;c}:<~uY+'Qx{7Ie˝%xزZHP`yLDhp붺=WN,Wmgh5di1 S mA1@͍FY[|/x+D}bEt3?D&5?V_? /MuT,r_՗o&Co7]mX,r_՗o&Co7]mX,qx'P{EՖ{6J/Zs+ٮnl» g+KmYkKmYkKmYkKW> &% 3#c$]X,rxJ,b6{cve㎕!e,9/Co7G!e,9/Co7G!e,9/Co7G!e,9/Co7Q\'Ph3(̍vTQ`+״\s:T_՗o&(X /M՗o&(X /M՗o&(X /M՗o&(X /M^ Ү-^ȼpkKmYkKmYkKmYk6:֓DVAFdldk4ɴmOHXh*r=kFc ( ( y5Wh{±R0r:ygd2S385Mw9?jW@_}֔4Lgq?A,x+D}bEt3?L&5QR0((((((((UAq@ ECIH,z -Yf,}|;y2W F7<) j+\vlk[8$Re A$r%l"PRU O$ $h7 n 38bs{$b_9$w7ܤ˧+ӵ];Wk2m%"8%I{$t8/ReLW^y v>Q<3 -h)}c۳0LRng_>i6lQ#* pHj%t]Z[VO.T&hc])xCLSYӒf] ۞=iP5y_*ULn>wSzI$3˥qJȩ*;.d Bm4EPEPEPEPEPEPEPEPEP?ڕ|s_GA5p\?iZR3ٝǂG/WC7pW=?A,2tQEHŠ(((((((P?AAV^ =rYV?%mϿ2qX6CJ-3xQ Q1mW<拯 Mq""X]^AqL[6IOGQw`x-IaC$l]H #xV-T:eU 1=hmVyl"g(6H$ʼn9N6U~MY{mDk6Ue|$ۈ109L~B4PZ Ycy${a /8 wm֕\iw7_yf+$,W.;pw֟`Tmz|s+ʑʎX> IEPEPEPEPEPEPEPEPEP?ڕ|s_GA5p\?iZR3ٝǂG/WC7pW=?A,2tQEHŠ(((((((oESĨT 1"{[R q.ֶhP֯qq]],2v7If*h. +vy48Qi}B4q"Ʊ.; ^p8u+u*%ŝ+v2JN pvnX35mpA#rꭎ@b#=3*J(H\:-| E%Vvn BuWQkDa3f(9v% xEqwg%lo qBC =V4BFkvmy)?ꝃ.6d8 ?x7W0*^wIT)gt wmۼSUMk+jt^4WabɄfRH #\ 狦Gd/QK_YίrRti(e ZyuYo:j2_Dcbϗ<]f{;W[E`x:O좰KGeԞ~&K~hu[u,fkK[1j6arTvPkZ7QO].bN*ODiiO_; Uq*q\ m.NNLPEPEPEPEPEPEPEPEP?ڕ|s_GA5p\?iZR3ٝǂG/WC7pW=?A,2tQEHŠ((((((((͸ԾҰ8ҳtE!{+4e.>zqimt\[663 X-BQ^(5ǺF!+eTAxDf*6 ҄6ZW˧ ὲHq#<p_+TPj6'5uX9 ̷.^T:nV<>u[4{W %<I0 #^n"fs{ka^躧.[wCpY2'FHz4FmOJ=0BE+XIP7c'N2t\82)rT+wtPk&.D0ipyv^1T)QdX}%EmV)N{Ed`fR IopK 4PL'e4oE)(2OV(TD[y8!]y- D0тSۅVҫdp.//gDF(0K1lkՏ9<7o$HbԒrr˅.`AU`u]9mD/]$eШ8(.[=j""t䰙GtH"v?+pc\m>-2m#(r,M!ݗlۨ| >iwdVYNI@v iM6t8/ReLW^y v>z7|RmC|g>g?&6\t>C a[{h%ՌXQ6 ʍb< Ko_c{lڭIUTk14aN_ZjVwcuմ4F § Mtŵ{Pwr;$:((((((((R/&+ /kJ_&{3Wxf ">^1"_؎(QEQEQEQEQEQ )q"((d~U ĒJ6՘ 'bjzեn o;RJ.4?Om{[<'L"26/*d,RU؂)_ZOwqi \mIx G#=k5-Z$V\WRC=\${6Vxc| (~;Ke47Q\v*di(bL0p9V|n<7V[ʒ*H2AGziz.si7s<2I;x~AQy"e~wPB%9 :+u/67w^_n+ZdkO-B '̠S]-M|QVhkyഎz<+$F )c[H.&;D/ .іڧ$C!#9F;$IB;]t&=&]F_((E%̬)U ʝ;+ Einmˣ*BNXvKn..8 i~5 ӧɽDsr6'd<c;I,EQEQEQEQEQEQE3p_Mw9?jW@_}֔4Lgq?A,x+D}bEt3?L&5QR0((((((((EG]-֢F 99>0R[uJUB$zP~,tx'1imY%A%c _ 3 =;65pn.ry,2ZL&@, ݗҊ|jw]\;wGsnǢ3~t.݅%7uRS V  j+d֏[ "I_\^-ڱO4CsrB\u;qbi{W0YڑQgu c[_DLnxhba5x9uKo|O=j]>4Ԣ"hu)~|ݑwEpGoMgu{ivSZ %.0|B8Bv;MMkNKKpZUW`$9;wr;sEQEQEQEQEQEQEQEQE3p_Mw9?jW@_}֔4Lgq?A,x+D}bEt3?L&5QR0((((((((|4X;,)$U)n%3#px(}cXݼICwrep$d{VSx;^Vu"g!yd7&5&'hj/h/4 }?S`$RxxYIg*qgѵK\' &+cʉp0@ۀpEPuT{%m۾W@.ʣ 3I⷏43e7.XIcn(и!w$u56ϩBH\͹de8q v;.p~U-Fm#nYq Rȅ8 #ֱS͊,br. 10d[EqǏ!u >kK9gLAE2"6Ha p  mF3hP˛6H؎# |EN ܻ:Z8!xDy|v\SQڨhz֭c%uH唳*F t(((((((((g?J9KsԮ 4? )|h_#+Y+Wxf |Lkb:(aEPEPEPEPEPEPEPEPYڎ)iocB< cִh rv37eH ##A}iėcO:))!}Y({ ʐHrAi@SH4H{ٲ%rYَIf: m?[O}s۷~6o˜qW k[7H#oGVHe]e8$dHHm.E-~p LBw2Kgq,I$ֵ[\ʙ#r0 GwIqq 4B۵  VwZoh<0߼`C`CjgeM{n'Io\IaX($I$1<")f8ZI@;_gg%ԑsp6bĜd<$:IG$O7 բ$!U[/`ؼd1ROEPEPEPEPEPEPEPEP?ڕ|s_GA5p\?iZR3ٝǂG/WC7pW=?A,2tQEHŠ(((((((ġyu+ 8_&,Nx祦,72ϡε4+*gkyqހ(k:}2r<\Fv_]?â}o.Y Gq8@^]N!O0B p!$*7*=@%W#Túi5[H֨ZCq zӵsږXw3]y:dG")Xژmب`s ]Nu5ͻ &<6eT+`è%X\\YZMt$FN\9'}jK+M6-,m`;!098Q-׉flQ-o Di#C'.` s7qºۭG|/2\[RiZtZ S*/<@{ZK#ɵ?ad`yQEEW=s>)գ6MPG5Ҧ-|Q Iv1s=*KW't$2$0E߲%I]!yP)K Ȭ!QU,*Ju7ڄ7z]|mid`F:CGih- OHLʲ}=&Z]}?ln|>|n}j 7L:T=iJEj!U6IϨbA \y\A5kA5HѪ[edy_]ȅ3!b|9~7O1xTg fok\[ /!wq E$w=(Z?loP?$|loU|c,N(h(((((((R/&+ /kJ_&{3Wxf ">^1"_؎(QEQEQEQEQEQEQOGHI$*-LzťlBb=oi\?;-&2l)K'PF%5.[5eu;{kd.4Ms*|1# p6ovKe*NBq£-vA=Fͪ_lPq F!Y]bqh6GvGPjLnx2ۭ"Uc"L,W[_x~ytiBIu $R#0)P@w>a T9JqG{uK&Pld(Z ii^1"ȏ׌_og੗ƶ#*FQEQEQEQEQEQE2X&hH#ߐj(,m-9-aN=8PEPEdZjZ\h|o(:*okɴ +;m(F@?JѢѭ&ҏkɴ *M:֘- _v (\[Z}[W @=O_y-"IaJI]H#RF@?J>ѭ&ҀzWm$-ēg Ff2.p 1o6}[MhYhiG5P$F" ojZ(((((((R/&+ /kJ_&{3Wxf ">^1"_؎(QEQEQEQEQEQEWͯxGUӥ;bF=qQ@H`U%Lf]MciEiŖ0y*9$y_tP*?Et~O=G?EKykʴ/ jL[.[<)vcimzs3v:q('0i~ VԵ}5V3D!/㷑IH۩پuZw^ZE- Jb;x nim<[!V԰f*^h./^[--!\{8bPuw~y_tQO=@ty_tP*?Et}NQb ( ( ( ( ( ( (1sԮ 4? g?J9KҗƉ<">^1"ȏ׌_og੗ƶ#*FQEQEJ($q$K1ՏzU_cD@؏>'|U U+WI0(%ϱ 0}N6~3mY0ʸWl088<Ӡ b?a(V* {YaM]a`:|ǟO'؏>'|R[IF 8#s}7O˶NPI8@ #A;" 0$-rv;xUڤ b?a(V)@$:#A;" 0jD1& 8'ZkXflra'sg#*1@ #A;" 0wyBNvG28Moi|N'zP}NGw?EI'|UzuLx`I 9c '|Q#A;"+DgX8çqS 0}NԴkI!Ӵ{#mXE P~]ZL4M2F5 \W*ZLV_v[[37ʙlwrA?Z?Z!\Btq<[,6eRX"F]z*I Q!ih!ih3P:yjJh`&t'h'}MK utQ/ ġJPCt`Am9k4k4H+(GGGPMlb~cVRn5;;eID?.[YgiEP6iN_M__M__XcˤN-썶a1Cs#mHiwHvi06c|%s\jzji1[~mnh;G*dM>l!ih!ihEs +M[=l)fqIc̈5vxNWƭ[,זs[3PN8Z?ZW_D@xKRK x%"Br2 k6ekn\iaY"Hq$`W4(`\m)k4k4/Gt?eܗ1·GS>cbKj2Dӧ Cg,3l6G$Ch1@+k4k4_TL?w!ԣy> )2`f5U2v[[^öhˋ{y"0P~p#;I!o-?o-?h?QF8f-%<NO E*$5uˉ,.+ۉ U8,Cvcz6GejOlɩJq8*lcɐg E*?(OE@kG^V" +#Dۃ90'#((((g?J9KsԮ 4? )|h_#+Y+Wxf |Lkb:(aEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEP?ڕ|s_GA5p\?iZR3ٝǂG/WC7pW=?A,2tQEHŠ(((((((((((((((((((((((( + /kR/&g;ȏ׌_og{_#+Y*e1袊Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@9?jW@_}{3p_MiKDfw C] \G/WC7pTc[E# ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( (1sԮ 4? g?J9KҗƉ<">^1"ȏ׌_og੗ƶ#*FQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEcp\?i]ڕ|s_GA5/=x+D}bEt3?s C] S/lGET((((((((((((((((((((((((R/&+ /kJ_&{3Wxf ">^1"_؎(QEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQE3p_Mw9?jW@_}֔4Lgq?A,x+D}bEt3?L&5QR0((((((((((((((((((((((((g?J9KsԮ 4? )|h_#+Y+Wxf |Lkb:(aEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEP?ڕ|s_GA5p\?iZR3ٝǂG/WC7pW=?A,2tQEHŠ(((((((((((((((((((((((( + /kR/&g;ȏ׌_og{_#+Y*e1袊Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@9?jW@_}{3p_MiKDfw CW;ڢ([+$T|">^1"je1k&GvAO*Fcgk_4?lQ@M?Ək&[P?vAO;ZI{$hֿ=i5` i! ןs_GA5_MiKD;ȏ׌_Wxݩƶ (aEPEPEPoTu$UdxLVmK,WFghkbͬ՝. yl ʤ,S\^SDӭ-n^-YiU\[;ȉ3: H9xGU)㽵kзStaYmU&_;RGä5Id!n<=1ׂ*7֗Guhcr뎫/#zŲvIi|`Ҵ `-,|s{mރygIk{mmaa-GssfAVF (iX'lV>#&m@QEQEQEQEQEQEQEQEQEIGRAQ kUMD%+HG#sی tR4 f=Bh1P8]Q<P@:d߇u * {+v\x8<91_Qx5[QJɚݕ!bSh.y#htK̉nf_1T;!YXht{;[[ep̮жHÀr }s>t-?]XL&x˴cv|9! wF{e2I9hHyY2vG"kQDd?(b((((4? U* /kJ_& x+D}bEn׉wwiK;Y ˲d82h@KoTI)mK-o m){xEx/[[ ?z7Qg9{m_o m(@KoG`W%o-}'>%܍jrO%.[OD*@KoG/[[ =Þ'KPGT ȕ_o m(@KoGs_(?-o m(3x/B%G>ew|";mܸW%o-ah@KoG/[[ =h@KoG/[[ =h@KoG/[[ =h@KoG/[[ => endobj 150 0 obj << /D [440 0 R /XYZ 100.8 292.486 null] >> endobj 439 0 obj << /Font << /F17 200 0 R /F20 263 0 R /F22 239 0 R >> /XObject << /Im12 430 0 R >> /ProcSet [ /PDF /Text /ImageC ] >> endobj 445 0 obj << /Length 1409 /Filter /FlateDecode >> stream xڕVK6 WVysEAdvtmM\9$WҖL{" |xݾb%r&+W*Y* QF=7,{*]mqYįCTۚ@RuW;K&x3gi7"5fpE!!Y*of%VCR$X *V; $>vq] LVH_o@aengF7$/d/yIwzЧA  z7~+`ouX3,Ee+V JӤ UC5Î2- ~`(φhtf<0rP)LxJ2? O7ĸ> endobj 446 0 obj << /D [444 0 R /XYZ 86.4 708.045 null] >> endobj 154 0 obj << /D [444 0 R /XYZ 86.4 688.245 null] >> endobj 158 0 obj << /D [444 0 R /XYZ 86.4 501.373 null] >> endobj 162 0 obj << /D [444 0 R /XYZ 86.4 364.377 null] >> endobj 166 0 obj << /D [444 0 R /XYZ 86.4 326.529 null] >> endobj 170 0 obj << /D [444 0 R /XYZ 86.4 122.897 null] >> endobj 443 0 obj << /Font << /F22 239 0 R /F17 200 0 R /F32 264 0 R /F36 278 0 R >> /ProcSet [ /PDF /Text ] >> endobj 449 0 obj << /Length 1139 /Filter /FlateDecode >> stream xڭVmo6_!`_!IQ+M[RY)6X#̖=N' fDF !úPXNǀ'Pk' <i(d6^&ežpE"Rލ@Zow"9G8߷E.!}뤅J8Bw]$e%T35Kol^u(SQ19?*v Eu߫LK p/<Ʌjst:_Dq;t5^߄A_5lN|@P1On>FT<M~COvc:>,ryJ2RV;pCL9—X IAߝuA'@OOGʬ\{wϖOS64L#ipQQ8S6GI2/w8ltYq, endstream endobj 448 0 obj << /Type /Page /Contents 449 0 R /Resources 447 0 R /MediaBox [0 0 612 792] /Parent 429 0 R >> endobj 450 0 obj << /D [448 0 R /XYZ 100.8 708.045 null] >> endobj 174 0 obj << /D [448 0 R /XYZ 100.8 656.404 null] >> endobj 447 0 obj << /Font << /F17 200 0 R /F20 263 0 R /F22 239 0 R /F36 278 0 R >> /ProcSet [ /PDF /Text ] >> endobj 453 0 obj << /Length 1201 /Filter /FlateDecode >> stream xڵVKsFWpD[f 0@rZ'^gSkrray P_%;T~~ugZ8\YdsZfg;d͝Pr{Dh/.>}<]zCk/}%S/D%ĎYPkU];w|߅?O!YܟsTIn≞T<*6! fJZݣSU')m:YV ƭ^ p-%e)tރ! Abux,Pgv5 -*`#}+]>u .< z {7ƥ\x|阗+Yx%. ( H T2M[ov[+BsU=*ksiwlU5IdˢX[yU2% ,Z5ۢ%^W+-T ږ)57cVe"(C^F:TJ'c"y*X.gw;;Xmީ 0>B0.M/ 4~>8@p9Nm֏`o [E`-'&sғ[ m9\te x,uBL齅GsNj }g{@&_ͳw?0(w9HW\"46ƗM]Wtkg\URO8UUE{ ҮϸrZ$AIeRHR" l bcOՖYP+nMU]'g(XFc.^(}NDQR↮^v[y Хwdz؉_ƟV]r*&7("b\ S)lSeۜBmH7)(v[TӪKgT[0Q,Wf̪ma"#`PT9%pl,oiӡОаw82&LZ_dL-M+>U4ï=6nÌ334ql.@B7w[e ΅S%iUY^ul ^ ]}i =jeW0`M*P׉]D@<_ >"Dv{@d/t=E?hw? endstream endobj 452 0 obj << /Type /Page /Contents 453 0 R /Resources 451 0 R /MediaBox [0 0 612 792] /Parent 455 0 R >> endobj 454 0 obj << /D [452 0 R /XYZ 86.4 708.045 null] >> endobj 178 0 obj << /D [452 0 R /XYZ 86.4 628.606 null] >> endobj 182 0 obj << /D [452 0 R /XYZ 86.4 508.065 null] >> endobj 451 0 obj << /Font << /F20 263 0 R /F17 200 0 R /F36 278 0 R /F22 239 0 R >> /ProcSet [ /PDF /Text ] >> endobj 458 0 obj << /Length 1363 /Filter /FlateDecode >> stream xڭWr6+x,X%=ƎcrrQ"$E!)yO7D[s ,}L<91O$u2~~x*:|jrr=I!@WC]]\_N܋#T>[bIBfr[.uYU~3 m[=).UkZ͒mdgTmg]hjl*g&<Ƚu{;䮦"IN;IɏdirŔ (M';@Mʔd&c\$ia IߓM[gLUfD.V|OېmԨu4p7a{f#It\d2gAHrx1GN |$wfwIA d‘,q[h<,R%#*_`gV8.Ӆ݄- | p׈UiNnrAy]ط#UϻYdپq'> $g }cecs>`Jb*KiK\Y7zDr$iķ`~O+aH<ϭJ} LJ)rO>vC'\B(Y[4[Y!,a۴Uޒ+sq^ps_7^nj%WLrEE} #΅'_:u} ? V7w[,4ȦIJbj'~y\嚄ؘsdH1p,w6]ݣ{H6i] X0) ؁kPhNʅqZ`d@P5{`d$(=X44.!L%."kbHSzAā-@,M\\\Z;mQ{S1znH2 1q#ELQ8C-ykfY`-9qzۤ6F(,iY&]n{LI&AzwK}ۮoZ\"ݾecYz:eyy? HlӮ?<-+CH~i`p ̦'X;0޹/YF57A-yȧ_z{XM. ͤ:437K@XmP_uw>dRꞛKXC^`Q;Pm2~ճ{q{LzeUig!YUa!-kؗAcvs8{) endstream endobj 457 0 obj << /Type /Page /Contents 458 0 R /Resources 456 0 R /MediaBox [0 0 612 792] /Parent 455 0 R >> endobj 459 0 obj << /D [457 0 R /XYZ 100.8 708.045 null] >> endobj 460 0 obj << /D [457 0 R /XYZ 100.8 668.569 null] >> endobj 186 0 obj << /D [457 0 R /XYZ 100.8 479.331 null] >> endobj 456 0 obj << /Font << /F17 200 0 R /F20 263 0 R /F22 239 0 R /F36 278 0 R >> /ProcSet [ /PDF /Text ] >> endobj 463 0 obj << /Length 697 /Filter /FlateDecode >> stream xuTMo0Wp*8zJ$mVQí" i;^fx晋JHVfș /YT5я0ɒ">]&&v}"Y}90ZKq U%T~Jь&Ju$=;KLdq7Dtq)m[vW~rY5CaQ*$S\9~ky{J]upn7=}l8?-|(E P*ŌY =NSzC Cp7v@mJRFtN}_nJq$Bf4ua&/_fۻcʤd"7zW݊Wq&^ C['': ,% Ʈ .|MROd[Z.\$vĺnl7K#ԯWVJxx;~A^z/Z?NRLTLbB#QKxNK'O \~ =`=v^P=ԨWcG84 S 6<1> endobj 464 0 obj << /D [462 0 R /XYZ 86.4 708.045 null] >> endobj 190 0 obj << /D [462 0 R /XYZ 86.4 599.121 null] >> endobj 461 0 obj << /Font << /F20 263 0 R /F17 200 0 R /F36 278 0 R /F22 239 0 R /F32 264 0 R >> /ProcSet [ /PDF /Text ] >> endobj 465 0 obj [674.4 703.9 1044.7 1059.4 355.6 385 591.1 591.1 591.1 591.1 591.1 948.9 532.2 665 826.7 826.7 591.1 1022.8 1140.5 885.5 296.7 386.1 620.6 944.4 868.5 944.4 885.5 355.6 473.3 473.3 591.1 885.5 355.6 414.4 355.6 591.1 591.1 591.1 591.1 591.1 591.1 591.1 591.1 591.1 591.1 591.1 355.6 355.6 386.1 885.5 591.1 591.1 885.5 865.5 816.7 826.7 875.5 756.7 727.2 895.3 896.1 471.7 610.5 895 697.8 1072.8 896.1 855 787.2 855 859.4 650 796.1 880.8 865.5 1160 865.5 865.5 708.9 356.1 620.6 356.1 591.1 355.6 355.6 591.1 532.2 532.2 591.1 532.2 400 532.2 591.1 355.6 355.6 532.2 296.7 944.4 650 591.1 591.1 532.2 501.7 486.9 385 620.5 532.2 767.8 560.6 561.7] endobj 466 0 obj [826.4] endobj 467 0 obj [295.1 826.4 531.3 826.4 531.3 559.7 795.8 801.4 757.3 871.7 778.7 672.4 827.9 872.8 460.7 580.4 896 722.6 1020.4 843.3 806.2 673.6 835.7 800.2 646.2 618.6 718.8 618.8 1002.4 873.9 615.8 720 413.2 413.2 413.2 1062.5 1062.5 434 564.4 454.5 460.2 546.7 492.9 510.4 505.6 612.3 361.7 429.7 553.2 317.1 939.8 644.7 513.5 534.8 474.4 479.5 491.3 383.7 615.2 517.4 762.5 598.1 525.2 494.2] endobj 468 0 obj [531.3 531.3 531.3 531.3 531.3 531.3] endobj 469 0 obj [272 272 761.6 489.6 761.6 489.6 516.9 734 743.9 700.5 813 724.8 633.8 772.4 811.3 431.9 541.2 833 666.2 947.3 784.1 748.3 631.1 775.5 745.3 602.2 573.9 665 570.8 924.4 812.6 568.1 670.2 380.8 380.8 380.8 979.2 979.2 410.9 514 416.3 421.4 508.8 453.8 482.6 468.9 563.7 334 405.1 509.3 291.7 856.5 584.5 470.7 491.4 434.1 441.3 461.2 353.6 557.3 473.4 699.9 556.4 477.4 454.9] endobj 470 0 obj [514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6] endobj 471 0 obj [777.8 277.8 777.8 500 777.8 500 777.8 777.8 777.8 777.8 777.8 777.8 777.8 1000 500 500 777.8 777.8 777.8 777.8 777.8 777.8 777.8 777.8 777.8 777.8 777.8 777.8 1000 1000 777.8 777.8 1000 1000 500 500 1000 1000 1000 777.8 1000 1000 611.1 611.1 1000 1000 1000 777.8 275 1000 666.7 666.7 888.9 888.9 0 0 555.6 555.6 666.7 500 722.2 722.2 777.8 777.8 611.1 798.5 656.8 526.5 771.4 527.8 718.7 594.9 844.5 544.5 677.8 761.9 689.7 1200.9 820.5 796.1 695.6 816.7 847.5 605.6 544.6 625.8 612.8 987.8 713.3 668.3 724.7 666.7 666.7 666.7 666.7 666.7 611.1 611.1 444.4 444.4 444.4 444.4 500 500 388.9 388.9 277.8 500 500 611.1 500 277.8 833.3 750 833.3] endobj 472 0 obj [550 575 862.5 875 300 325 500 500 500 500 500 814.8 450 525 700 700 500 863.4 963.4 750 250 300 500 800 755.2 800 750 300 400 400 500 750 300 350 300 500 500 500 500 500 500 500 500 500 500 500 300 300 300 750 500 500 750 726.9 688.4 700 738.4 663.4 638.4 756.7 726.9 376.9 513.4 751.9 613.4 876.9 726.9 750 663.4 750 713.4 550 700 726.9 726.9 976.9 726.9 726.9 600 300 500 300 500 300 300 500 450 450 500 450 300 450 500 300 300 450 250 800 550 500 500 450 412.5 400 325 525 450 650 450 475 400] endobj 473 0 obj [380.8 380.8 489.6 761.6 272 326.4 272 489.6 489.6 489.6 489.6 489.6 489.6 489.6 489.6 489.6 489.6 489.6 272 272 272 761.6 462.4 462.4 761.6 734 693.4 707.2 747.8 666.2 639 768.3 734 353.2 503 761.2 611.8 897.2 734 761.6 666.2 761.6 720.6 544 707.2 734 734 1006 734 734] endobj 474 0 obj [625 625 937.5 937.5 312.5 343.7 562.5 562.5 562.5 562.5 562.5 849.5 500 574.1 812.5 875 562.5 1018.5 1143.5 875 312.5 342.6 581 937.5 562.5 937.5 875 312.5 437.5 437.5 562.5 875 312.5 375 312.5 562.5 562.5 562.5 562.5 562.5 562.5 562.5 562.5 562.5 562.5 562.5 312.5 312.5 342.6 875 531.2 531.2 875 849.5 799.8 812.5 862.3 738.4 707.2 884.3 879.6 419 581 880.8 675.9 1067.1 879.6 844.9 768.5 844.9 839.1 625 782.4 864.6 849.5 1162 849.5 849.5 687.5 312.5 581 312.5 562.5 312.5 312.5 546.9 625 500 625 513.3 343.7 562.5 625 312.5 343.7 593.7 312.5 937.5 625 562.5 625 593.7 459.5 443.8 437.5 625 593.7 812.5 593.7 593.7 500] endobj 475 0 obj [571.2 544 544 816 816 272 299.2 489.6 489.6 489.6 489.6 489.6 734 435.2 489.6 707.2 761.6 489.6 883.8 992.6 761.6 272 272 489.6 816 489.6 816 761.6 272 380.8 380.8 489.6 761.6 272 326.4 272 489.6 489.6 489.6 489.6 489.6 489.6 489.6 489.6 489.6 489.6 489.6 272 272 272 761.6 462.4 462.4 761.6 734 693.4 707.2 747.8 666.2 639 768.3 734 353.2 503 761.2 611.8 897.2 734 761.6 666.2 761.6 720.6 544 707.2 734 734 1006 734 734 598.4 272 489.6 272 489.6 272 272 489.6 544 435.2 544 435.2 299.2 489.6 544 272 299.2 516.8 272 816 544 489.6 544 516.8 380.8 386.2 380.8 544 516.8 707.2 516.8 516.8 435.2 489.6 979.2 489.6 489.6 489.6] endobj 476 0 obj [301.9 249.6 458.6 458.6 458.6 458.6 458.6 458.6 458.6 458.6 458.6 458.6 458.6 249.6 249.6 249.6 719.8 432.5 432.5 719.8 693.3 654.3 667.6 706.6 628.2 602.1 726.3 693.3 327.6 471.5 719.4 576 850 693.3 719.8 628.2 719.8 680.5 510.9 667.6 693.3 693.3 954.5 693.3] endobj 477 0 obj << /Length1 1615 /Length2 9459 /Length3 0 /Length 10363 /Filter /FlateDecode >> stream xڭeTʲ. Ko\-hp }=;޷{z"SVc5w4I9:12ĴYL,TT. 7kG 7 n `crsqr R]-t'qDA.f&7+=@ rx̙YYfnS"ߎd,;g 6-;:yÅ`-S]\NY7 G{'w7 @ߩZs?22n&vfv ˿C֮R^ sek73++_q[_ʒJ2sZT6vpSvb @I:9[;/'|3 eX; /cf&G7x$ GĿ,w `M<f `YRob0K&vo&.o+&o+C<`uVPMfM`=7MX9ځo",`C x?<7Y7zN{?ܡ? pf#+ߥ8[hF0;Vov_`NŜL\@v Qu' >'$Y1 VpcM ?:9w3qX&'؊ -y:\O@p|seF6)VVv^%-2C\Yt4l ,)fٚw )t9Ү|LgLRgBטN?I`礬vB}'ԿZrB*nW_~=)RP?['h ֖ʱӈ LN\ቖn[hM$|ڕc;c |ay7c=FcAE̮{BNB:iu\< ~v]j|A<>G0Z:L1:[FqD"9ʇli%6M].|%q1\)05凍TY}E/2~fxX"Ui&ڥ1$zm*T4E5N a)@ڗ+F&Aa^vw%RNQP_ÀR[+&բdhIKu#7ZkT8J7 aտr Q{y(j,BoT\Z`Fخ +^:@Urqprj>m~;҈]Sh'e%R(5(c`1u֥.\ 2 V|#4Kz@<P=pިԌ`&k['5/o .u}9DڏwلN$!И~:k6czxa쭰GZFU}ܦ/bH%0PMVO&jfy8Ūı/]/dU5y7q>ى#/.q|tT Io.Q7v 3ӱN5,km}G ˓3Ͼd~&_x)W?Tj:~` ?ug;$Kd1oqԕrWKVُDa\إ޺}.xfCiWI=,nzYx{ZsVb5\,?2Ъl Pn?ٛj%<9#΋7Fڻ{)\MfoKHЭ}dNP0@!Tmea8M6Tp\٥ƕP`C0|{SQGɔVUo3Rn@-b LWiKq-9 eq+RJ˽fuqP~/zAǕeOyJKd{4.IPy0ƹ)5 ;3r1[nXAYNo+pdc?Pꡜ15 ӽ(^h}9=hׄ7gWJ yuIbs4xbUk;MRxxVKEFY1\,}jv*c+ok2zl3^y}=$!Y`.Yn48;aŐd:I&ɮ\xOzspx̲?螓ny t5Sn*t㌓fн¿*wur7Ĥn1A]:Qfy~(b4ld{B8Mr<%|L/ *qfώO^&ªQ_6RiƏwx d.(k"WDRrG^0/*vL|GG;b!!;eάuk GKsw9̟Ŷϲ8OcRmM[2Ry3enbEwJXkVzseL3D_ هvm=1ߓ+Xo&e酊Ee [Z0Qcp-epÚtJƔ߈F pIڜg2U 29 Whm@j]4eu3n(-oaFxHŽcMM9k{}m*P䊵H\"$b4z}21SK}O끔;6 *$ ovF`:.dvTÒڠ^SZA>k@{Ss1#،ʓ3Ҋ; ݅ܙ]5_+uޏQ6o8ש \4٩%j[sjDpSB6H}g'8֙ \oKO$"k4x1;J~\uɢf{AJ+1O?h>L *ڊ|TZpĚۄ:&opxxYKFG 1<5$RU- %JRNf: 2IZ؝qk{UmܔM6LӉT2w(˙= ,iC?G(HΆރwE3R=RgP6ƨJrlr׭GRK*6N*ٛmrbLì ƽLT_2%yNG&"XOW_GQJ:>,O#A(+Hb^KЇ whDy3:r|ئQ ,r:,Lm$3rڂnp ~LK%VsxG̵TnqZ+,"%B-dFWR 1c4]sɲ%˫W9TCiũEJLfF8ehXZ< g$^vs ]ߒ%17i-ry<ԟ$zNk0՛8,Hj ӬL SxY@^#qpKTNzU:5Aa ԙӉm2Enj$tHJ3#Dچٳ]/pR 4X}]sm9發"տ_~|P-}tFٓȦ?T4A?}3yAf#KrebȟѯEf*MQmZEךT z#h5Go$+WHFE*`]gR Q#,g]3u#T%~SG>%1.pa"ʺ[T]Ax6˘"e\,qrF *H3D€bʜJB؊8AdaMMrX蔐!ufOYL3PU l0G߹sӝU200 {Vh>r|RavG bq#F?6*SbEYx 5PDEү=@_XCZ vW]CE0.W'3>6˯M="" &%٣8\-ZMj$%Pch:FQX&/f92a5S\b9wLlM9^y d(YpEo+¸t y7O1vT%'^aPɁQ)rPѶvy b =CIb 2)f7Kﳨ#. 6N_ !76zo\K/bQ*ChÌjBfá.?x1$,Չ߳C^G5|זGiW3T[q$Uf,nѾ]h$ ~0GsiT-+胍R`p=5Ye71!TC%H TX]Ӻ* aZ}h7SyТl߹ (2ip}İWsXS玦4Pq@ӒĘܭ. TԺwl uF*Cs4?(g0uw&6^{֐5]E/#4p+U7}Ru L0;h #pIK\N -2(3Nm]os<(]@[vPʓ=(:ue's*5M-:EO"O;>.ee!pb}=c%11$4נ5dp=P\{GWi bAAV x'T7K2$7wҧjFVC =3dPCT/2]@#4E>WjQf܊́b8_j:RUO5O׉2$.~m:ªVʺjT1Abb-̞_o&r6f3aCV-";W6NKyH~LKHMߐSW",Qx~ؔ?~g{c+"/ %;:ɰ<+!D>vp]Y #[4A2UA:&/1d_ݿ!zavVLlH0>ƫ˃%8VYݳ] [AM_H/m4mqnQl8FbŠ5'=˒tiDUmX a0z"ϡp8C8GJ*xD~J%M9˷ \#b|UG"qq|&5Q8xd79v$ju/m) !3Swv* m՚$E\{.OE'Qig$܍{ u[6\’ԇVj|W lH>ް8-"ڹLkpD^^JUO#5JNx >VDͽܜfPțjTR }7._M/ߛW .Ҳ)fX~,`Mh%ϴ6TBH+haYպ3>X>p ,̫? x4u;F`CCkaFĉ|^J"ԣ-Ű#=(z.)K$8_]D쀺FSRSNJ[ʿ+sxBթǧj0ZkZ>2-AtZl:x#Ԝ M4٦c~Ao1e ƺ6N6nFP1 SQ u>+[te|j, [,S x{0d&귢=+2Q3dN>N<tՓItQkX4'\Y_V+?rj^TY>3d6ˠ#Ե+(E='@ȭ ̞a/5JdUvt"m8Ws*4 yxnF~:F+bG:w'+8Dy$]fD61;S(m$Or:tvkY*Ш5YAX?2*יZ`qzzcTK}B/44!xԱfjlx'?IZ6C "B26gS [JN&}Y[C2uaB5  901γaIC(}y]jb+1^}Th|J?'G3vz7UclT Q"M-Y#ڹ@~6)'x)n2nrE@%&?r ~E6wmu.-KM?"џK#$Evz ?Oyw_y|Q g@r7Wupk\zO/k~ge953 ?J$/6j3 Su{n]st93& j:o1&5h4&z2e7VQ? j0|Fh9/rrT*x}Wh uID)F11.oh3asCXx|2çDsSOsRvZ7d L 3o%Ax뛝<ՖH[,[P'Jy_SRUjDq38ajAj$HRc!m&5P<U %R(yǨ,#Ja:# HrzhBPu=L8P{,ΈwLzsI08KJz}6t,0K&>]7^߄)+AZ pX( CԶg5S}x/jkA{㼥=ڦz 2[C_sv^E SUg}C]"C)[2a[w1Պw3.Ku# U] KI.țvX$L{9\ex"&84ZĞq㴐 MNXx7F`R6mM,CMNN"6T\a۬aQe[v\8FW#-W*!Ub O(ݝzn4AGЖɺ# [jyS]:Tѧ7Ͳ2yF 842Ȉ..l[I)Fj O#CNhuh_> endobj 479 0 obj << /Length1 999 /Length2 4728 /Length3 0 /Length 5371 /Filter /FlateDecode >> stream xڭe\TkARB:%6 ))H7RH 0 C (n钒)%$D)y9s|_^kݛTDj"(qQqy@@ .*FãQ0\rr  . Kݑj4*P$  (gu `pAQhQ@ 0'`"Qqqs@P''#; W6_-Bp74: ׽N?LgqM/77CwNA{xH")mO_tP`7 KIyj|#pyBCq=\̍ 4LؿF`ebbzLH/`%&*&&~-~f4 HHH$Mr}I`p^{#d$ɟ{@&q 2\߿I^Kaeo( ~ PsF27^Dו}~3y] UU"r8%digGDBᨿ~k/v](@2A8(5h+'d( jPݜS@6AB\`zU S>SPU9@~)Ѯæ]/#צٗ=vg2LQe_0 ӤTg[ZW~L,ͯio㮳rѹ8zݥ~; |#T@RD_AzLI}9)6W lJ7~)I.aqQ]m_ToITHXBbяTu [ljԶ{YŸ90wɽ;XT`䷲:+rznSc%k+H6)a0V "[bdD-uL%Mavێ|#<OɲZ !>ȌOfGi_zOҲhnfav2lbB#1aü :p%+mPR2Q[Fi%nj{\1,Gx@?@&+mVpMZ][LB$ +W`!G.~.D+'ˋM2سT?(xw" ]Jyʱx/Y52)<'Yzx!kGOC^w=2bx7ŭ'2|{UF|2̝ ËsO֫8v|Qbx FkU#e^iKu 3{mo_xb/^;sntwB݌918g+8 2-Dc|%i:kIvHP576sZrcˤh%@ ÜUȑMqPi;-8*iqv^M@_C{Av נ1}Pq<*6y~H|ǚe>^u3G偩d6)-rFy 7_<. ini ͤbeqNJSY-rTxfJDiS4T@%ǠȊW5=?b%߬!Ni@Cd'bnPw'1 W?(b,٘î}QQ4(ZHPEh-981' l?/PEUdz,2-{8qبhsDe/w]Ot0=H=Y"^?C2g}j:7-QJgviDrӭYh 2W30Hͅ5Ng7c$L D+|-̯e)V_(l~DSw2`1q7u>OrƂ_ 06kg wȞKx 6E֮\F[C@!rK{ߘZؽ k8<}| -_w)D7՘qqh(,5 &baN{`.gͷNWqHWT]TdaOkRfV{?6d 43$lAjƑL i`r-WE,Icl׉0SѢG`igoc>O zDOŋZsILw=2sLX8=k?xͲĤ\?zCXg@- YMy"ӒMwx,g ;zR/+=W9%Cmf*jEt(RRڔ`#" ZC W%Xo&K}'n5roMuUj~pe 7_?2xI-NLTgԼFREp&!F}&Y_D^8Xߊl82p{b/"8ʟuFfd xE}Omt&6.'7sLZEƺ=Zk.viYĆqU3;rB$KĭG}H?h(.7=cô9rHLw@^x&cLш?kWr*,1 N9-m:RbPZh+)dyWS4vK'%Iϑ}y%<Yr#"fMm^0Nq];υ}ï7 3r ngƀsj\jtMZ]2Th[hpө}f/ŦPБMsުKp[ˆ}V7iwcuY|>=.6do-33)(Ǟ%dV n`U)^7Eg>LϡRNC׈oa)_d0r9!i vw6+druV2XXi-RL:9􇎐>&PU\p~6w72A30P>'4K^O w;%\Sͽ8@++{ʰb+1;aZ};#Lv{ep+'|N"G/+vXVJCgk't7%D<-՝#jtfI<H[^؆qYa&J yaXJt:TIG*LyW } A%A8-ft9uյU>  ]:p*2ތ\z+ZFWU*Q8v3,,u"{ay`E/E;nw2:iJ5ey O>E+eobGxCgir0@sb%?1B}=}7GD8hO^193QL)}J$#_Vq f2Di}O쮬)`:H6h M;@p:B~늼Xl5eV_Npr퉆t mr"EfG8;*+^\QzVEQisH g`.ɋNI&e$p PTL5/`JE`N6]UOffS#ا~m_71bR&M|O,Ks35J~Lmk"Z㽞̞m=jlN#UŧBg'Xް:xݰcޠrj5V~=/jsbOq%\hJV&Xaj0=-gr p<ѦX=O4'~iwҿkyǚ'p v த@tս,,;>ecEEH)Tu4s3U`*1]ixq0.sdš?%7]\?"e Vh`A{jaM<>K9}R-9aWH4^VւjwG) j%8 n0=^h' }@I(NiQ X~trb 8(q? Эg؍Sٕl O nȧBę[M~d h`Ip8겥Xw] G/ l ]rjBQbVF&/P=3Nqhs&>ID1q+rT'>rM*5:  ~z5ot%w;1I=+E{:5y ߊxfwU-n1Fܤ[N|P6u}-~(bJbe'I7f7Hh[l=K1u( ܐ)v많+iNYވT쐱v{G~{Qi}YMUDs}3KY7}c7e ȗG2ٞ$و}nMB0rve3=il:m_sIP ]1T- S͑\윧J ?-c^RYsXj J;{8E]Hd7(D1k7> endobj 481 0 obj << /Length1 1088 /Length2 6133 /Length3 0 /Length 6820 /Filter /FlateDecode >> stream xڭeXTmnA@A$fn隡a`InFns?~׺fbP─,0'7N0X <@xLLRp-I * 00@ qJ$pm-͝*n6PLJ--͛ W& B` `ud+(A &Asr@Vx@UC5&uwpP5w+ߝ?掶stvw*0zɩ@!yf`k)dpy@:uBm,mVпϡN4y@eU]M=ڿ/mܴ?3~h `Ͽߌ% bd xT||_0 @\N0OXxa4@E?$ZE0G6`? Zc'@??~H>{0w~X1>b?s@?C>?~0̼3$˗{ _p8aV zA-g`"!vIo 2ȱBL6W/!C)"\"dSQm( i(mIR bŷJ]+ #%$gI>72A vۙt{qxъYȥ> (;Eؿ^O0n%g5)'@uwWo`H>JG;M/Ed4+K8b-6_\J;TGw&!( ۘv}X_F Jb]~.֚i%]ąY?|ҵb"۸Ⱖ7Dř g~,/@_%aչ6FqzoB\ս6r϶d;xGivO3T~t{(QI~3?Z]0]^&gjg#< ϯ-6nyk-˴twN{ˣ$jPǫz[-1W"}+yV Up\Fw7Y^~]5H@0Iw81TZBX5(駃AO<RHD& ͳO`%1E Ƞ5i9pt{O&%<Ui%b!y6IA π&,i ?9/1RaS,HZƧMqٚ .~j/82J8RG7?V<-EˁbYlCؠyFq=Ӻy]f 2k6PRw-e4×E_[43*xpn hF=im !qR}0IΠhɗPͨॽ֢/Z#/? ϢJTDKفq,)||sAQxBDj(wpFrcO ۂ kqXԌ5n+-)'ofĤ.八7N!iN4_ׅ39_jIwǡ< )]zl{F\JJRn֗ªXyP Cwד@Y˅h-3L&3v:O;hSi9e Έ7j5qDMV9ڗT{`=c2>(Kwf<S좧+}I$r3}ߓ ?XЗke%icQnY5{l5 8*x_Qwғeu☧!(Y:JYTfnU6ċӑz}k'hAAV ~ hRE3?j(WCRҴD ;xBC@X[*5A"68M&6Xj=)N Y}L v D[@=P1!w|hZnf-wsAyX8QNeM&q"{KA@Wg0XT,J=bbK[X O%[5N=hM:}̪ݖ.*[$!jG4Dq6J sCq `mrֆm2pweQ.h0!)x+?V4i򛤀QJm~}'`-hFf!XKuty><DžwgbsG %tlAY@mۧ5V-Q[BY"FLTm:'y6$!cED_Oa4 RCR':ɮ[4S$ܭ#>hNgf+,ٝ˨|u$@ : ;_jlH0 `ߊF^%e+?3}$$ϲZYP2kSW^X"4#H{EYXz,ldh(viKjnRC'(}9)3>>vcHD|R%Ugj6]|_Eg/5B-2YWQP3yDP2# .Pg:!P8==bY YosS7OHzfnٮZ})ԜZvD9p.B9k˕i6%$gפMn3 fǔEOd}(:_ߖU[EEr=TȭP$6S=(T*^&K^CvQB#aG92oӴn o)c᪵NeeGd?)DpeM럇s=+tŏ^KU<Μ[ >=KD{613XLdہfcZ$,$ϭbH~\;N*]'41xڒHSB}?9zM㍐ wL6Qlj9$w}Cl^ʊwG6WFi] w_KJ5%K7zK#+fT^Hw-ۍ'M6]ۢ%_84F*gXfJ-mRk0ެm}JN~E+mn ;|6)6UZcA1c2#7!̻>؂?v(`ֽkCۿREީIE3X Ib+ΒضG,gT -e; endstream endobj 482 0 obj << /Type /FontDescriptor /FontName /ELNVRF+CMMI12 /Flags 4 /FontBBox [-30 -250 1026 750] /Ascent 694 /CapHeight 683 /Descent -194 /ItalicAngle -14 /StemV 65 /XHeight 431 /CharSet (/a/b/c/comma/d/e/greater/h/i/m/n/o/p/period/r/s/t/u/v/w/x/y/z) /FontFile 481 0 R >> endobj 483 0 obj << /Length1 926 /Length2 3510 /Length3 0 /Length 4126 /Filter /FlateDecode >> stream xڭi<ǣ"䲕-fc,BR\Ø1%ɞ,^nBk6d )Ss?|799zqI[EACř+.-OQ,hLCpe. {K=p-6&T;HR>Zs1cw*>7Αq#leN KsQ9;&Rg7 *!z #}>tgX:/ib XQ]/Qj0/-e0@A^k3ۙ"˺{3 ɸ܎8-DЮ0w@nx1#S2bZfS :]^ e lM/]y ԧǐQuŰJ +N|k"_{*J"E޾L~$~.6)ȎD5Uﮧ>'f&;Lc (5@Qֆ}jzgFjf$37op;>drjf2;3:u_D©Vx $\u>qӲeap}yqݺ1*k ͎n4Ƴʩ8Q3D3^U"x#Q{R_-ۤp+[uA}Gr#9 2<]oRvʵU `~ e}^D6GɩfyHGoV/?K-\M43^VI?^!± ֮Whr;pڈӹt;&>q7 CFo`c8 b¾*(d[9T{/O >g<&Sg?EcQ&k?pz0scd+n6ɨ4yx!r:=*|3AEfIjsW9W16hXיJ#8&*#pK D7$*$&3Kw*8h2Ԛ=#(Z*sOaqHTpcfQA+H 2U+^޳5Oe҅;i) 4ҙW쑩FӅ, =Q1lOIݺ bU e'f9dVMS-tv$dH2Q3bprsCśD f\\}]Ȧ:IK#TNg ߩ lU}؛"\RiihD!GfwI~dZ7=ذrw ZԈoZ5SHCGY[hia7F}Dʶi:02G1r w5)4!ȽLC7o29Z ɁFV  q7㑲㐗ƓQncΟ^fhz?~7]smX#Jغ Rbef}oJl:P_Z\x*tuF㮍n[GX+hd7<9Rfz~ qDKDfG2vOuxɠ6xڅlza>z:"| rY?ǧy"kBs[gS>gX5i~ ]}7>?K{SU h.a8.n.D i'oy=&L`z\.g[4JUbY_/-~P-rD16yU9s<\9)njP&}%ݤokMaja"vY\>!́6SWFa}|Ũ "P3>1ퟯdW0wu 1AÔ69ңqV|8&e|2 }5.VrOh-ߐC( B ;rVNC"6'x("=H 9Y;$Y/jQD5ݬ'N9O.aeU*ꤔ&  4" }^-E0|>\m[̤x|ZK~8 cD€SjCSsZ 9ԵUQq>DN3jбeq2Xus"1>_ 16xM)^0H6{FqƒPbD&ͼ/;?TÉ=dOk";Zi2 S4unLbya#{xTSHxI{#R^CM%rtsa޾f=-k-.{vxylYE0E!zvBB( ޷wᅝ:7K.WE2+23.0IƵzf)ϑU2#pdԉ|x"uUkT}?uKg x,mf^g!*iثjNaQqf;ulwc_`mZ\t& Uœri ^%F#Ӻ.Ic32Jw%"&k ɕ%fɆWE"Ohg,l\QA~#wo-d5LOlӞPZ$uWz֬ЋS5Jb|Zb\ݝͺ_ endstream endobj 484 0 obj << /Type /FontDescriptor /FontName /EUFQHP+CMMI8 /Flags 4 /FontBBox [-24 -250 1110 750] /Ascent 694 /CapHeight 683 /Descent -194 /ItalicAngle -14 /StemV 78 /XHeight 431 /CharSet (/G/a/b/comma/i/l/n/o/p/s/x/y/z) /FontFile 483 0 R >> endobj 485 0 obj << /Length1 2126 /Length2 14540 /Length3 0 /Length 15688 /Filter /FlateDecode >> stream xڭUX\ݲw@pwKpwwownAn~{꓾kԨzFU9IQA^$fkDUbf030! ; mmD @<fnnf) Ď@sw075sP S 9 mNf kp @hrrgZYP9\@ csdjn I[vrpPERmm F9[p.Xop1g++9CSgl휝@Y[cuU[,J:ZmL@@ N@3#_vۿ$0Jk)ZS04qRqOo @?Khklnv;x2d 7`F['&[`o0 'Q"o `q2ވ(F,F7b0JQZEZdEZC\`- o֢F`-Jo֢F`-*o֢F`-jo֢F`-o֢kz#>73z#N#C% dfgW? D;8 |!-!3X@Ojlkee>6[*迤0Eo||€o`4+&ߐtyS-8?;o5s3 |L\,˿\ᅬn,W7Cvp4s㰂8[T5{JoilOޖ9 @65Alca0}6p쬜ؿM&l@FVmӳr ˛W'.߃ >[vp5@3jNmp v ]Sn/M8ߩ7'=d,` ';t|M/) DXZO@ 6tjC X*Yx KD8&vg:bDq.cGzpR?su)?:RYQ!]j2985ҭTC)X?*ڗ&ƿ[k]>muFȇIxѹ:Μе723e#̏hj~z?ZOj3%3C,~vx߫Wݢo4yK- tj+6ur~?Ys,%᭯y%ׅ% 3{"-ŤJے3VDegan(=љՎӔ0eŲT0 T%pb4oW$K f8T"OT`1D[05;WNg@NXBus)H]sVfT ij\f&ǑLg[PB>ߪ \%R:FRFQYT"9x?Ұ;6*Ȳ4sz U;ldje!PBXwHZ#sa!(׋n_:1nKj ?%ǭVBC7h./FdHQԹP^)E6 ˼d]FZ6B>x J.HmdpI4$IYpԗ;(;qu! n8'4=vc{oVj$+8e89X-Q.UOĀ+8 7!N"!-ܯMȎaO ψok?YLB,mݽ0~Ƞڈ+8 ^GE8!]?/(OE?bZh~϶~ŷ4[ĥA)?pDQ&hȕbL4Ҙ_g ]TAc2v|tPH;GFmpEH6ۓ?%e~ PSQ`ֵO㙖FI*:_VJ@sW-^1>q}=e:yښw6i6PhU6%g9WPX\a% pݫêCcڦkj6ۯY*ã W߻c>=!~HW2n ey[`bfKM<"TJB%~TMr| ppOi'hUbbol僂0=Mnj-ġm\%do2t#|"a/uT׽l,0, "hN v|:?- Ląh@p@7C|S8_~p¿Wy"WXS٣4N'>gb~ `G&!ǘ߽Z*la%+&ݩoD:%$9(T nʅ+&yu zX?wҕгnT5>b\P5 45 4d?f{XDGsߡTȬ τ>PSm+TR{/<*j3*-5W-`/WnŜ{5m1w,J{pfʗOI[?PFZxa*V^]eF4J2QJ[ղm /jp|Dɯgg캛) K <؊rm~ ]ȅ. 'iٓ[{R'7αL8ŲYnar^w2lSAk'ԇ%dԐYtD ɉW0pP>B)ɫ8OE˟psԎӻ7̾Դο}P5L}CgM)Q0QvEy^ Wxd1Mo]Q"NBtx0!>Vh-eV_Q(jrxG,~%̾={(ւK\++$SDﳾ&s&hESwfѢ_ŽAli^<$w 2ȁb8hyKݞTV؇ޙ-{ >}b=ioTyѴQ̽Lloitj/pB$+ Yl*XqC 4e7S%+) )MeFSYxnEH,BQ^ 6é\#t&uclI C?&^yOA~布ܺ~=4[UJGi3y=G-owOd.0_Il\eۊe +/O:%]yW=GANER>.n92 (;ʿS61n˲EL$usd ##h"HXN-@vGjS?R2B6zѵzENwoaYB'gDI /,[K n60{>-2awKòpG qW26}z'ϲ#n%J(<An O}<!ڎ6: Y\w-[ya'g3>I[z3ƯpGKLyr GMË_bLjp \U:,LHxv.zN)pJļ.!Zlr َ ^E@jI@NJ>̇o- §كO #l:lһwtƒ"2MB+nzTE zg=k}K4iʟuGR^%%lAE =4zgj],LmBc+'Eʣ2K\xcp1Z^w'88<Ԉ!'OHyVq⌛<|ghOg>jm.&+!-+|Dk\kgeRI/I$3تdj#,]kb&ͪc,1oM ǿC-v߳nB"|H ҭ/Y(6ƑJxOj;P];.U2*{Y[C&jؖ,ޠβK+ˬE q(/T)Y<zFX4fA 4hs sTݾsqذ|$u$I!Zk;E.ϛڽ9^fgʴ1K/D20a1uNfw6ðܓF̍ƥ"@AۼD.'f⺍EG"L:ؓ!̓SWu5O9+bpBN7}SYR=.m}%h k\ vjˍJ${6,}k}އO['}Vr2DDZdgwI"NQ1oBj,LΫi(tqb-/Y&g~z5 ~38FGy-[ˑ=ltKnz4>aǧ%> ;ňPw޿1:3eF:s)?lҡlR $SOF|g{1d_24.I! b@c܏2_L*$ݘWKOF =φx{˻UxB?/7.JUm{%BI}/$ށΒ9nwcϔ"yS #sʤHĐt@;1^؝rΡ@%}NNcU5*t|n(nф[z,JWuږK_~Y9We}aKUO RM Y~yxט}!J\zEpv^jrƍk{OOHޟ++˦TyE!?-NJ.6$0D/YL^R漈TG}e2wJ?W<>sX\p-j%},+e$<2*E}WRI󙊶 $/&~բ6wB˂y1$uv M[bCo@zt02zʞz*Pho*\XNƦɵysk@)WvPLI!¦aWz874c@T|`.h|`wny{֚ yؑ{@YJ $Xa?ض9Gv'Z(#:~*2C|ː*,2@>NkF! ~.#J2,HgyT&qdf@n *~u;kg(L}*X DF-Mٵ!ywHүU $zN>cIR ?!_tuzPvیgٓ8qŸ;FMYqrh {Ns^Y ]ąݤ)Yp #"zUe>ra%6F0op*/ ԉ, g8mPiq%Qu_tVpZ1.ck!xx˭(MM?]S`qbb.A2˽r <ETmGX30-h6+3S NQG*u !>=<3O~QAŇRl ׯhђE?|}݄ēH$xi͹"ti΅|A*$kZ%On/&f#*<5!ٔ=;b$Y/:B:ٺ׾q r;W Lz~K2B43ai-Ӂ%\EzvL bp|УMwL([5NEvtm,~31?MI 9U-+zz['0HB~|Tū{dC*m9杖 Ɲ]9;7j1ǝK>WG꩗o5x*.hp&R ;SXRQ&iPU؃xH d|Dê{ s P` %cmyqaY[B b-?3D%\>.\itz¢uX3Q\DM>Uޕ!$~aHQHvІb5+i(1f=!cRdWl C؋Zeyߩ/F׊URR9 U`+.|9GE9[=-?CRM:twA)LKh凨KaJ#&AlVj67woiH}l$31Ғ2fh0'wd-Iɞ[Gf̾Na[ev.22Fiih/5tdֶG`|bO/ԟӐ,xvQęAͻԫKX$W,c|*qatɔQ糊JЋ̏ZJ5}.7%!h_ -=W9ai$|5Ёob{Hvz_%)&&ʤR0dƽgOOT\(ASSax;}!G:!']ʴRTaV(0:N#~MkFPCf֎4\;G=3(æ͵{eC̹(u|_ ВFL:oCEUy<-N&+>&\f/vNA86C6{@FlT!zdQc?)JHVo4S'{'`xa GV@}~K]WCIMQEC_Bvd:dA/RmY 0xJqB !?]ZjEؙ{O5향P*a~%=)LS2=b0@i6 n<'10ArjAYFpR՗,J7B?3Gn|a䄏تܠIc>L+aP :Y$r?,X8@.YuH㉳߆TGsQyS1m:KwpTNl{eߣ<0h6r{㶟_gmE{cz+%6gӋX׶:~ʷ4 3i"׉.!cn0,Ұyf[\ѯn'g7}JZ,j#&ݷ7!OirAy>ȑ!|cq!]oQ:' D˱M @“ fJ]nDqӴ;G7W[t5L2]3kD%a|G|Ky'/0P''&gQZܨ{1qK̈́j\rI[= ju?cyEw\<, ]'|6R.f%[yoRu S?ϻE3:f0 D')}X0ʼ|-M) $e^4[7$Κ-ͭ3B.Q"6MӛdciIPkg:ʌkaUENVۉu`IB@-=\*foEXD}VsWD#T|=q$wh7pEL7hcA{4%A}-\K߇:M>AZSHI}%݀$#ATxY{ [|,LW@梜Ʒ ;n5Ctj[x0^JV9Cado0(A,Ch`g\ I cWi~*.`(2 @LFz>x⣬;ީhhP<6͊Hׯ/ᓤ~bTY5+{т9 T V5?&TU}B>a=H:@ ELӦ'[ڄ[ccLl_DyB[ULF'A%p͓""'WEs3Yɚɓd< $.VB#ߝG/-VTp0V1~_`}ux\pKўgaSPI5gRՐ(^5咲 `.dgb^BqavzB vb9TNC24-2YK@:{L_ߠΜ^FlcxIDW/+KZ=ϞdfÅh$L*nQy<00NύaYbS!F/ȌNP颠1Šǀy¯Ezb i+~U>RZϊy+:3}Tp^x}Rǫa uQq]/)0ՉNLhR~1~V`ܔx11J4(fͺ)̄U~]'J;+t+_`-x&e +Xn4 ܷM+ 6oRuA%Էu?KwdDΕ](T]dU +|O]S|I~mΪ |NN"C8z*ׂ' P了 waE1HkZ{|HH ht^n^ R}DALD%z8TVp5Sy1Wk8*tm!s͌Q;׬?Q>OnTH)ٟ`V.FGQ !؆p$=GJ  ]TˢПp6x_n롴 V{0N 67%w ~ 3Sc {C~,6́:D\ ;}w4 zrHʩOQP^i.v̋X;C{5t%+ybNle#t<]_{[+$LIbŴ!9E;6ox^LPs?ɴ ा(!p$kYzo簶F|jnb3CYȤe~bwA$"U\;eML00?s(]DO8.3FӊeLgP8Al* \ (/%EWFS]`cLKzB3!LhYAU=R(V fh/D*g{]?PⷲJۧ P2#w 'f?RM|csHVLK+pm#Mq 9Tz+0́uw -:a-A]GRh4ڼGc]Q{Էi q1UBܠY2R @ y筫C@%}t_3Fk q׈ H/W լsuª]?B_6!,}쫤1H&kL|0Bߞ YLgGŘ\M>jݷEP$㛗.OYIZy;Q|5@9Z_l+IKtO.vzT7 $V]vjxCŔȩL+b?ʞwpkrEKT kiO `Pk(GJ'_ sI1ih;W tAT=Mۊ&fU$/UR \u $7m/>ܽ,=s~XڊM.!覞t`H]uL)uhδ'*fi{;)Tf顲3pPF@}ꔑqU\-ktl`Og}\$Mnr7M̈UI;ꮽ"@ݬ?7d:c(lĂKS㸩SЛ|470헓 :ҩy{5/9eV RFS^>z9f,UQr8nJՔ 9 u{*xJdCDta4Z߿Yk`&xS4P}^@|b}1xj#D)aJ9H[7x9D~Z04§!7sC~m~~BTSa>]E:ڷE蹓m̧Uh)EK8~ZNcp 'XcxQYoVt.)9:tR_)*/q[(u}<*W$ mlwډO$8 E.8H>FlAڻX+K奍ێR:s801O*~? ܀s6²v݁L3 w^CC.<օڴa?+lU Bj&.w"l} endstream endobj 486 0 obj << /Type /FontDescriptor /FontName /KZRWDG+CMR12 /Flags 4 /FontBBox [-34 -251 988 750] /Ascent 694 /CapHeight 683 /Descent -194 /ItalicAngle 0 /StemV 65 /XHeight 431 /CharSet (/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O/P/Q/R/S/T/U/V/W/X/Y/Z/a/b/bracketleft/bracketright/c/colon/comma/d/dieresis/dollar/e/eight/endash/equal/f/ff/ffi/fi/five/fl/four/g/h/hyphen/i/j/k/l/m/macron/n/nine/numbersign/o/one/p/parenleft/parenright/period/plus/q/questiondown/quotedblleft/quotedblright/quoteright/r/s/seven/six/slash/t/three/two/u/v/w/x/y/z/zero) /FontFile 485 0 R >> endobj 487 0 obj << /Length1 846 /Length2 2055 /Length3 0 /Length 2636 /Filter /FlateDecode >> stream xڭRy8mM;!'ŘЋXbe-5f~ cFddOd-{T(}_BYʒZc쾡9>ܷbR49V3ۗ S }i_m;CyJOS*KMhi^zb#cۡwq#vɼ9-ˋ!g^*LIY\'?Uy3~ܼb.:,;/S2z}_%vX>!9bbG=%葹!O|x+&L<tm*L5v#?׏OºJf2pVu HD[>R } w{~4SтTYuǿn JͿ N+qn_d[mztOړpvwP)'PBw48ڸ3oLC `ysC6HI/ґմ.!{)Nӻe/0/dkD=oA#ۜ$]aa3kY|bݪY!5%4:InS ؼjh}e꛿,%qWWdl 0ڪ:E D..C Ŋ6 .O#S/7C ZgLW'X]j^G:>˚ 7e@Np`.ĜE^(GNH\EvY ˰זk}2uCDNjϙ-\bS_Sʽoyp:ZZNRlrvW(z~JmsO {TPt~툂;Ί<h|xDLeH"ed9NnSvW !m FA4kV1 ǝ;csja AOB S:N:_ iJV U!wb%dMo&{ ]kR7)"T't2:ZkFG_ׂujOZG'S6j,iöxXn=Gڊ)hXda3dWSBf{$`*ɕy(Qh٢'3J<}l&w O9Mvέ0 yX]۰>)/W~/t+40Ε4tE @lVHSh ަwO\ 3B8bKfH^Xm>2EM]j-#vǟ_r zgBQY2QNPJ5:{I#z/F|BZ{+7V&jFe-tUf^F"f?]_Ύy0 $t1#tMtaAbʳD#1:AwHmAߦ{ew9oϜd0[crsێM=3YZӺA{Qra25{~#終l9چ ݆hj;[R3`XKx`*1kW>n7aӆ&#{8#;eЎ;ak#{d0лa#-s3ʩUp3E 7۷(/pzhA`$C'*9ԙ9hSn?`)boCLe+Z6 UE?wF8^d5-R:ӞeM=Íu&8st3ZM#^nK<Xo ]%U/8*o2mZ>;5((zp,uOR=^]!*5ybZjc;ϲ]zvPS:ㆍ-+rf8_x,^?(NA•!Gk" ÈN(jb `LGMm9z% endstream endobj 488 0 obj << /Type /FontDescriptor /FontName /WECPER+CMR17 /Flags 4 /FontBBox [-33 -250 945 749] /Ascent 694 /CapHeight 683 /Descent -195 /ItalicAngle 0 /StemV 53 /XHeight 430 /CharSet (/E/G/N/T/X/four/hyphen/period) /FontFile 487 0 R >> endobj 489 0 obj << /Length1 819 /Length2 1937 /Length3 0 /Length 2503 /Filter /FlateDecode >> stream xڭRyF[3@" 6Dh`LM1@XӃ? k.2 "a=HDpN@V. & #$"0 X/u?0|젿J )0tA Bω. 89M9 2WSY pAj$Co," "aa?RdE(DA Al xW{in\r vc0PFcBW0N`:D`( t $az(\gfMztC@)07z,Z7s:!mLБ#$ fm ݿ0CA:|JzeFt'hw}FNB%}I??iEqԽǩ X Sz0y㩧Q[Ƿ<.(~*J) |yhpI|b8Z#stǏ6E݇O+*JMpNNl%E}>CE/tpTAB?†—9x`W}}3SC˪:Tdawխ<ބTPFKd_\vU rQxEvƽTޜAǮ'Fskd@a\S}ﭴ Zs9@ց>ZO|-ۄ$3[I; fkfc.MHx--cԘw.E$-YInJQi vTF$*m>-ns.#r\Rʂg;w]~wOYdmJ˚sͧ0 زNl!gl,@(WȒ_u/^c0n=aF'FRU͗ iYo?{,9De.,|L sBsZM(ÅK&[.tSyģT#F(-Ք*mv%h=e=Íl{3T߱1LO@>JL~\{_TF o*q˜n#+k]o^rPΤm+/\rJt-Qv~/bPTtnmoX*nLC1ekWPQNS6YZJ_ȅ}mY io-yгZXćcG2!]RC Uy%S/tdҎBTT7+AߺU-i! ]pPaw p*1<ٌ,ߒpt怒#w?^dUXEߗ*+?Sz*;o@Ib~{aqݩv'$Sv13{Eƹk $;ӚQR3aaY=MAg"ո+fJթ:nī#"2z5{jRF endstream endobj 490 0 obj << /Type /FontDescriptor /FontName /IMXRQI+CMR8 /Flags 4 /FontBBox [-36 -250 1070 750] /Ascent 694 /CapHeight 683 /Descent -194 /ItalicAngle 0 /StemV 76 /XHeight 431 /CharSet (/five/four/one/six/three/two) /FontFile 489 0 R >> endobj 491 0 obj << /Length1 1238 /Length2 6680 /Length3 0 /Length 7438 /Filter /FlateDecode >> stream xڭeXڶ^\;$w)$/."]S(Z-En>lwɟc5ZsNKKf VA=@ Qb21ɹ< 0Xd<@HP(d\} V92.`7nvrl `_n3@; lˍ l!6k=W" /?K^`7wx(+<$u؂0y4`p/0$ P[O yau GD'⃟UDpw'k<]k=O~O{" nDp?H~v0O~xg_W0IACZ`;'o_~`Op wr8w^n |S y  m<A+OvrIU:/>wp\3Zƶŕ +rkIm{n<{q]qP?ƃ'Q=WI&M~h_,gFD2cHiF$ɥ&˻ /V@{)ZZ'_?Cb&^ʿДx^QN56DBxh4jT _h6v齋r|zA,peviDˆꭶh6ȉtSb- "S02َj+Tf)!Q;x+] f0 Nsm~Q}Ag"N-y&HM<{^,upyB^tf=Kǯ#őu'IZC0Ӷk fj,q3%hP׮x1uu;2=W)GQ**ԙ%,XWf @+d*J=8{Eܾt6q{ ;4 s{~(;JJx`d{J<'P/.hU^Psg>mY Q~/ hM1rҎH+H@M$?jvXXc󖉱BzO@OAa{j07#ãk1&)c;M3lz"vsNcvw/Vm?_"t{XzLZcTjFl)_8v1en{{iPq& A#l\6۴Ps V]_|1"rV8md͒ذr!Z)oCy`K1#'5*rbR)vD@T)9Xp8QF㌻>|Dru!MG] XCnnF&ox r)tҍK6&}HO:P T5޴P -G A74J*Xm8Qn(;>LSCcviDvwO͓PFwO%A6Qu_oSEY@PS!bQ!>f'mLmzQbG HCJdFq#ylz|cMw~>pMj_sޣ/ iMj30IګM-:vs^,!sCg쓥"]*bq bg +le OTmJF|%ڶUltz|uA]RW5S|NħgiC(LT>=ϓ>v#BeVcy5cxR9#6]mphu"S7aItm.I7w G?<1M(?ߤT$x6(**ٲ:>6#5d"Sҿ^t4}Z>ܣvmh 8$JM՘/WOf/z!dp!1S(8ΒC&1tѱVR*W01J#KLO Ii!>ڐ >ՋѠc 9y>dv'@WgE?RJ7" >ae%80Yc7>9Nnn۪~t-l:΂Z*EЊD8-+c"M dT.PVڨ%AN,Tsms{ t!Z;eȘL03*cQ7P|+ oC?#gNH,4`7Օ鞉?R?pdfZ0kZo uʹɩɱ蜄u  [ޔ[Kuҹwqo767@Gx gea4 ~fflN.1,>;qWٷ/乶N0cMRu+ ȍxiAYS֥@̿N뒮8pKF֋?t|J 쥬EYu*B2S~tIy΅]HW% zrQ?]Jߔ5^{0ɑ%֮ѽGH4:fFSծ=(dƓ3hFR$-=_!.k}(yJ&Z*"N݈};_2:9~68Q*cSU3K9zjt,Zu [~lfit۽RlbMI;`3:G-KL)vS`BӊZ-˞)%k"i!1Ӱ_ RH 8 m"9~۟Oڭ݌9KSou&SFnppRQZOV7Hiቿg}^y1w &|82+a&;QxER|CZCY!{5<~ Y 3s@qfPܮb=c>֙h~p DkSY3QoN4P;L23|٬E7 ]XZZ@UYuPmE}W!Q\h |X5+iLvbTG[  a3;m?HS5csP`DhoK9B3p٘=O>ZT<|͏IKHfv[{VZ 9svq߉DKm8j=sRJ0r_ O@uG[$ -J5ɼJ sϺS\w}.a !D'n L߇;;H _xI&|o쇃Ev0c^v+z>J@qP_>ν6ۀƎ#ak AirGO(snZr9]QDƦ3G#)} (b|ة|ǟgPWN^H7D#\ oܼE?7УfE A-{ ˕2WW8䦵~b$PԠ U W lcܮ9|9)ZxD Ÿ AhF Kq'Sy8Y+mN[c$iU/z{P0Z8&ٙ/tܵ-qT[c ZYT:U ch4ƊQ 7E ~Pt50!hcAHS|(Tx^':e1`nI;"~H>3$m%y;e|AiVQl"3"W_+W< trMOoK;۽kDʅ۵$7]]&fxu3gON ]'~)<N,S5fE{B[wdL4jo7ZVHU=ī"XBd?h(V((o$ChHKxٹ| %#1pUALA… <͞ ՃeTC>qFMb Bak0My4ykMsbIY|.@Mš@EjxK4)q;!hۋ ,;bo G$>& ♖LnRjbLӍmot yc1hCM_/ h|W~OYSV.a`h9I#E[? kfX N27jؤ/SCY޸ir/Mk+${c?'u p 0}~S&A);ۙ|=BrGTU yHb$ \rrA^yZ?(T35'JjQϞhpcv;7k_N1j b3fѲa]2p4HhދaP7?95w̗ G$" I Hz) o˕+j%yvu{>[ ʾ$P9/{&7ӤJ/_.[VShKm_}Kc q=+el Bkyt#+hnU.n8}$=p6ۓ?$\j=/YxZteicI :vMf#Vvi`  endstream endobj 492 0 obj << /Type /FontDescriptor /FontName /IUQWOF+CMSL12 /Flags 4 /FontBBox [-56 -251 1102 750] /Ascent 694 /CapHeight 683 /Descent -194 /ItalicAngle -9 /StemV 72 /XHeight 431 /CharSet (/A/B/C/D/E/F/G/H/I/K/L/M/N/O/P/R/S/T/U/V/W/Y/five/four/hyphen/one/parenleft/parenright/period/seven/six/three/two) /FontFile 491 0 R >> endobj 493 0 obj << /Length1 871 /Length2 1214 /Length3 0 /Length 1815 /Filter /FlateDecode >> stream xڭRiXSgʢV䂐Q ,J 7phRdHD&n0"2 0ű Zud ">CsZ2l] ~(Lb[:T/A D2‚*b1Ű.:dɁ|Lpbj(.a1Q)X0,ˈ -~!"aP8Ң#w(aH"@"`0fH|.s09My3/d(^|˥{s^0H—b&a ؂ۉd{"!RE,.fDr+X|KFH [s]"}* `QTk,%!"D2Ąвv,>` L r"AA!X R1& `űdG.ƲBvdăE"8B *}a'F? 1?BI-b(6#Zb+_ikሽ !,PuYZRlj60 v&pԕ݅W5Ht>Qj5>@Q 9⢧#U[Gz =X;+RSB Jyc y֚˧-ٹ'GL9mL9%C4T~n6(/k @ ?4YC3Eݗ -{_hN1UpG{zl4M3t}R%mNxuQ,GDh~Nz?}g5̵u%}n1j}ka㝵C~`jaW&/F3*2~6R(/Z}JjڛW{wj$Ujg${FctwHKa4S$ R\G=U}rKhpPYw;Eyބ0ŠQFC/@̙fU=V?֜4. P=g7v2OafjRG z;h_L\R|Y[tݤDkHK;Uq?,Tمt)MuVF:9ʠu& 't&M524Shv @8+^k?x={fpŊ#5k#?o=omWgMvKG.'jU&mq|/mÏ/P ޮa/;a3CIn,tmYyOO5^]_|3R0`64<1-Mؤss^b| 3мYhukZ3FH)37ON~q`gؒZw/R Lg4WY枙(gpiҕOXG/vb_*~ϊwy f-:&_7xa;a<;fڹ{>^4L.]"=ܔP^CxCVuad~k DnǜJ+/ٶ5|Ń/"Áـx~9+Jn Gi*=2y~wZ d4CnL(=UGm xD1gxax|CC&ƮZkƢ*iNw ?'WGW$ͣ7<_svJQPe> endobj 495 0 obj << /Length1 745 /Length2 580 /Length3 0 /Length 1092 /Filter /FlateDecode >> stream xSU uLOJu+53Rp P03RUu.JM,sI,IR04Tp,MW04U00222*Rp/,L(Qp)2WpM-LNSM,HZRQZZTeh\ǥrg^Z9D8&UZT tБ @'T*qJB7ܭ4'/1d<(0s3s* s JKR|SRЕB曚Y.Y옗khg`l ,vˬHM ,IPHK)N楠;z`:8jCb,WRY`P "0*ʬP6300*B+.׼̼t#S3ĢJ.QF Ն y) @(CV!-  y Q.L_89WT(Z 440U07EQ\ZTWN'2ᗚZuZ~uKmm+\_XŪڗ7D쨛Rl:/P1dɫϾ(l=Uhd_OܗEkv-X1tލ`i_y. 1dz:un~Q?3/S}] $e~s]F1ʻϯVltVtl_]ׂhWVM\|esWgE): ؾ|׻7/)xXmyjVrYXe]gL?=;paG[bgtN]Xg_%kUc>=#It|yfl(zXu)ODݝL̷a!kܚ`5y.z4&waSkiϰ˗L #~ә{:-и:8]ؔmbnT5sc%W YK5LZ23IӂcOzFӍk3,ua&zC :;\<C endstream endobj 496 0 obj << /Type /FontDescriptor /FontName /TMCDBM+CMSY8 /Flags 4 /FontBBox [-30 -955 1185 779] /Ascent 750 /CapHeight 683 /Descent -194 /ItalicAngle -14 /StemV 89 /XHeight 431 /CharSet (/minus) /FontFile 495 0 R >> endobj 497 0 obj << /Length1 1307 /Length2 8313 /Length3 0 /Length 9095 /Filter /FlateDecode >> stream xڭUX˶hhiwݵk$8 <Bk~ңYfUtTjlPYg'6;H %9Pܠ[g'iT$< ~'HW  fkm`b+ u8!6PǗ-× k;@uZ@K[ 9 3_Ö.yA_/LEKg'_% tpP8U.83]<=negKB% t屮B `qspk]jfaa8C:YK*ȳT:yh@d͠In>CvKk1' gK['k'/Ex)l,>ϋ1e 3+g7ԿNWkoxq@?*9@7z!uE|qy"WϗO‹?\/g [|]lڼQeg_^vG'tg\g's/ uyy1b/39Kq8U:RA"T7ivi ߥEb ss&@PaX7AK Mn:ޢك32Øw@FmS.O{u/ߏmG"zԿ.\@x ?WAkXqq[qWqZbAz`xt]/ 8\%P$ 1nÊM*3uPW\ l0M>s:7KљN9zHՒVLɹ-lwP};è,!* oZ"z./fC<l9*M'{/H$! "tsecsv_bW:P>A4@%D~)B.d)ECc u;W>?^nrMda's}xP~#ߣG"ݰ)*3G$AѶB2,3цU7WAz]i2 &b_SCz,Fw0CٰվXGO)IԱ2PUn8"B|Զes2 ᐊ:Ͳȧ7p0 0FM;87n\=h 6?Hoz,CFDKc85LdZ[b{L)W^JcCX4{F;sr&HD*}^[+b:QY$ V>.Ҋe)92b5aU1VXw_nR:jZUn?56G{ DY' miF]iL {ζ$%핇RLFв6|quR8̉KzC1c?xnhpDq 䊏yXw.j4QH'=xmAnR4- ^}nTi P(<4mL&Ie8O5lʢ9=yZܗ >EīsqR6˫'Oѿ5%*Oc [LeIӐxv*R- `݃V}/=Sm0uP k)iّG=)TA*^c~7I1=`rEfbmzn[Ս୼(QԞŘ r9P{[:^Um_yO|KQ"ͦj%Uv09_t1S}h$v!ڐ=` }qhEygg[9fxZ-1-C>eSr7[,a%?ы9NilgҗtKaTVfw[@C)R͂~lP pռ1xqn*-0؊D!.*.|x~(]*UdC4a5]BMK$1r _)q}3 ,՗hkThv!Քq3rVEFv~-d[eU">atW]ռDq,E\6k&ZJ7 - C= ǯ31B30#;rUY-Ij͋?U+Af$L14P 8 :($Os [e}2,fK?K:a-e`}{C’M#k —DI]Z(Bqd-G{8!k'Hu[Z(< tF`:.qQf t i+O72b>7媖P65IKg-HJ5LWjzGՀC) 3I_=]k]ADK}'%ƲzH!O^SfeY:ZڸtV=:ߞᇉ .j&J~ 6ZrݔT׮W5= 42KݱAֳ5%OꟋvg|-탪ηM:4є[nֈxOtfxެv޳A 0FrXVP71pr?kw&[L(!y}s!MSCZ#ezTT~>Nyx(QQH|#9y䶝A'mV F50)c-RxO>I/Ɵ-Bk~>Ep)-g&@3Ζ6YCG#eigNa  `}>}/4=&`|n- kHB!IBėUz*/JSU?S"ZW4H֍p˝-S)5U~ckfvO1F_Tk``)5+hV`8G]eb1IV\+N5)&2[1G}I9^es實Ƿvƨ;}Z8EaTP)2%7n;>V@-.Fӻ1&q!B䕥Lܶmډ:*x(~$?:i:YICsob eRD NU,X`2 -8" Q[Aisj.0txFi?P~@X2xdS\Մxa9om5 d"&o.s&M<gbY(×@"G+K98 od}Y(ďQqxM~o|nC% ܲGD43twt1,a\$ KyKԴpߺǰK;/%ڜ;w#|IX\u))#a-9 /35qeln (ꙟƇ~jro*t^;U֕t #p?߰k?qWWtTݖ72*+u~o*{#N(4OZYH:7Y䛺(eEUͰ&b=Ysn? Q;;啭QEf-`r=1\4fu82$B }Qy=}SdG ${e|^b;mVzC ص^z^4Ŧ:I!.ټP};c. ;X*)y}ĿxgUǭLF($Vk ϖa:0<5ݾjF10ѥk(kꠉj!LB1SI:n/-÷gq~ԥm{u-# -}#==~}|q񢣉D{7+$DA5X|x9F^{uff[wֶ̜uΖ\i78s*bn4 c_ueC oCpōiT*O]T[HAj1鴓0R"A"|8LB$G$xL?NO9([ vVg2B&jI xO5wkX b4^VqN-mtA]f*=lE˿(Zm\)*`0ؑK&V })TW~"Xk?Nkv{jhOt̉+[f9mG-ə6ҝ3 shЎ7O`4U۱G- `'nnN/B+yl4*\o!qf07BՓOENt̤91n Wf+X hs*lC1Q($z>$ U|do0cR(+.hs0E{)=%lrkcnWQo#'~0N,n6䁯;R`Q!ˁd f)Bg9?Bճ0LDQv$9]i9i0h|~!;ݤs?-haPp1GbYSXWvSfh(&CUթ\9r2”C5p]v=`8|kTc#b9C)@ 'ޤuxg7c'v&yHokNM^}˒FbpNIQsטiu,𬞳[^:D@ພ ۞kKv'ILvNf~BӅUF|T4 d 9Eq81b<CQ2Wƴ);yʑ7$C3kaY3ݙ>|~*g\ ̧{斻ډJURebP~cS"ů ^s}557;CV Lm7p; _n ㏿u?ogJ}vhQ?͚ǫ/")H u"& oܤߘ\nUUGK֚8t@>ZIx=']fN( [צrX *"M@1_JwHxkgF"aת,ʤtCM@\=Z6κ3"nBۜ5__w L Q'*c 2ц=YLa%w/XT}&Cm&NJAB"cs[5_NMuHWIv+80%&;eM׬0%K.?mrl*CG?=+_#/v)W#n(+!O?vFs5n=w $lwq4(LcV5z IYpef_Io ӯ`*m!/E,AFSݏb[.WSɄ۷{ O6FM BhX'rXdrr6>v~F^⺮J_D%*2mP4e͂/3;:9 VҰiыyrV:JeZ6 9 uOlS|'.{$:(@0x 9>qB=̪s>=-YVpU=}ac:`Q 8}0&ou--Wh? '?k^;+>Զ2iWy:xܽQwn$Pn {˼ PDgƧѝUgaщaG}x++v0-tJH;p'u$S-P窥o~6*nI:нz@|ó8\Vm8(V]놂C'\5TU_a kːhᠪ5fXX*mՇM$0EG5MS6sVnQ uE W&UDS!iS*= ]VBNxS[J_F9DU/"| `ohܬvUQB*9?G|}:VQm58"_\ ( sU3R5IA*P~zm1BC:Λx{!{!c yNq+ҨTwAIcl"ad=935nIDusn"@iYu qX䐜 LѠdݯsfW˫j!<.v0w f+-淢`Ո0Kê>qhOoA! 5la3igDh=0Wt&qXyG=Fʧl&p Va"kjO,%t -w8ias Ub6Jt+}w{ۈ(_kIR~-]lpKQP-0tN/~Pqe `X4'AP׬m{~ b=S]*|J~(w9&+ttk3=M}Zۈ{&SKHc|nNQilױ8e 'sz _6%^H ӝawLp"KW {,~zpQ7} / U6ƎWN:9,B+p#{s)Ú[ endstream endobj 498 0 obj << /Type /FontDescriptor /FontName /FMEWEI+CMTI12 /Flags 4 /FontBBox [-36 -251 1103 750] /Ascent 694 /CapHeight 683 /Descent -194 /ItalicAngle -14 /StemV 63 /XHeight 431 /CharSet (/E/F/G/M/R/V/a/b/c/colon/d/e/equal/f/fi/fl/g/h/hyphen/i/k/l/m/n/o/one/p/period/r/s/t/two/u/v/w/x/y/z) /FontFile 497 0 R >> endobj 499 0 obj << /Length1 1964 /Length2 12112 /Length3 0 /Length 13190 /Filter /FlateDecode >> stream xڭUXͲ'ݝ.ݙOܝ%';.wk℻~Ȕ՘D@&R W&6f6~:;Jj rnvV7?'?'7"@lmi  jolm t(]=Lv53@ 3"`bni#Y a37M;Mh&`f ;/""ev\NhOMdj P;;R-S07vYYW9!k)kOs3ekWS+fxnr"#&/,?2U?]ax=z̬lBf$LAf :;WL\6'l ^`rF<,M?`C?`XE8,.X]X]? VWC`u?VWC`u? `QC`/EյX]?,'Xt.JMCl`]_-g_a +O7m]??6c O.X#5ra36i 0/QNnl,,۵v?i?y^CKޭ<1+/G+s*1/_)ؙ HqMy-r~VY@<[J' nt6wd,'x32x" l.}K\ڂbt X.؎_k۟+v~]LAҖVsK*ӡʠNosH׋3ߔ\ڍH&hqnvYM{n2 !WUL &p)cw d@rW`WTn>XmN2_ VVRo _3!jg'Ak%gwr̥hwz4 eoϱgն/8Ӡm@Ua+'3BBݑn'y%]$_Џ73]˸ڡc?gك95+Y4k} `>K[Ȭ&4Wg0Z՞a - 1H2.kZ‰zfgQP癝>m8V<֐+ ZbVOT^SJ'^4Ɗ>"[UeOZ^n@'VX\G959YZ}VuMh#`N`978'aJ}(^PzKI5ӽ=(ŭ8;CH!KDCWΝ̳BБN Mĝw$xuuA#8B7V]D5v8:D9䫉YL,EJl?vӎxcr]0rєT& R܍ߞ5yYFy\w";]ʐ44"y4_%ven$[asA+ީTüA19~hn;CKP-Z_iS{@קKL,{8Mܒ2~䜇p0;~Lg0c@h0IyR3Fd: CO6h#nS%d;ƭD[{_ͷ=89Du ;KEVBk."Gy>[~Wܲw2^3_Vո1U\N_ZGuyou1}R=_2]jTc~8ȭ@g17ƾhWVӼ&`2]磂Nw&?>?H\۟/aczG7xzIiTӘxZ;y}'*22tS'51$1.=#wT/MI1Cz::M@=,mt\{ΜḊE!` WynjC ЈG>-F{\4vnB)#-?JiB2xZ|b}*Lqnr~j#{$iWhx=E@~fzA>-9`]S'" ?0YX2$XhI!J ^RjV6W<(x' NcRac2QP\h]CWna UԢr' `.z[ gǘؓr0yg1^ٖ_L_~^R {3jҗqָ by1)UPif퍡$?]\z3}!^`] 8& MT?.QZ53Xd7:cJ˻o# &O`rYK8%FwV.̼<1 PC`p;1\3dDMe<^ew6NM"vɈa9~WD ʽϞ5"?P1w`,+謁 Fion@i9yIG,Z: }Zjx\X#͑@m`۳"X3@{ lL껤鐯F#&Kfh70/k>mmkAfv: с6r,ֲ2 ?ŪںjA]\JA5:T'{7Л5T}sӉJx$QtKGZڤ6vVQ | 158ŊWkD~?,tƢIG嬉euIdK̎/zy{ˋ59XqKp2q槢nEx9[[ʣ˅nH %eW3*ʙxӣͶOr C)I.{]AeV4w0 &NH&6R$+IRHÐZgɥaVu\DQ<ڞ7/QZy}5/2}(_GPW}HVuc71V'^> =}{ѝ+\Ps-c$ΖP|=,L)쇵'Ն{_o PY9&)Gq"z9t.?aѰwR##0ȫP4)s"Qx?AÓO" ^$0wXkBO!FI.fdŪAB!GEM' _'6-ڽ9iɬh !N5hmrCO9px+4ГF=^:dUUW2x?X8pP:sCv.tRJAY iTupB28wKap,&@1&pTsXǦ#5!\j)VAl }s3w|4(`!&0wXA<}oaJ&;'qe訔d㈸p]/@35-rBBu+Y=p(g%K53I'V#mWYXbx?v2"uz:>Ѿ%pE}X*CV8 3O, /OD0;:=Q B!Z2'P72"ʹy@JEMUMxHe\Y%)=\6̢a6mTAdPDDkhf5x}cA(͛ @6;#%I)Qd"#N ccfzԎI)>4) 4b,y␫eM$eu#F.֯Y68}458PJCY;Y CUXoV|٣}+G֕nJMM7NJ"[~q9h}jҔ'}7,) wC\j(\򎛬M$ufSH][n.; Rǔ=oeGK&F. AEc1>)v q{Wq˟ׯX\1$ٿS&neq#Pd7a62 B[ONyV}iF(w_DРណ !̪ӹy)a2^4ܱ3,=IyځُDžMs YGbOɳ25NID (<̚Cs&A [S:zͱ'9*Fg5jh2Qb[T)փ*) C$iL(>'Y'fb5@;c|8`'k6=l@+^%6IQG?FѻWP-}S&68iDo' 9+^FIc5} eM*&5'"atp3pPŷ!T!?*71NZ}TT]+u=8>+\?ʡ _)zj,ǶK5 Щ\ suҜY&$/xv+WtA&%~>j53Q#VŔ] xF#q/lkYaކstv{CWCe9~(_x Fwwy4>>[JXGoc@mP?"sM,fuHDP.YT };ado2־)!2t;(?ZWã~+Ls:r5xv6F:!&#erQS#vX|[FkYs}SCOȴ@Ybh@r-!1Pvâ)a5_64Y໽'Ma=w XV!8-4ļ'iW;7_oT*$LYW3d о\<.N[ _9zYAz t1Ș.WG0t~-:|҃fIw{: CKf2ú|LiiI6C(.皞?١_{_+xVB-zLA%݁ݦcd22lϊnĈc֊^jt٧ >=,` l&oxݷᶮ2] {f BEjT[d~֩v# rQD!)lU+p>K;;-a;6ce`i!{3A}BT@nWCbskiNDU]TWD!Fvކ aҚ2vI'ζB&tHR/炔ݸetۙ t8AʏMIߏxJ~ICZ]KJoK{.V|KZƩhe?qGwwD?ՍH#9AYZ^xbV'Pͳ4̨.X)ʟUȋB]=,|(ε/,;z׼RUƮs$P$**a;Y_7Ck6ˆXjS hOHGb,3>XRnd[u^μ-xEZVdeE2$= Fn3ƶZt<.g3/6C}{1Lj/sj%B? >MR}JK)GhzhZN5;g̀+4;45/wt4U1y{x>'NhJD֟&l]-wXr~ LO7$}C~hЃDBF0yV]^E@A8ʗ|92ڭX F΁z~&Űx„1BTI!Mo(aWg؎f+sq3e4HsS@>U:JJKEyQ {V''2ԵNDZ*FxƤ ˖Fi'{9CQpS@|IVҜ 5€s*/QbLШBdo[H)qfa, 5Y`HI}RoVP!!ij^5>N4͈Ն=ooBo:+#F@$XDOSVbc{)~x }V+Tc9EfY%y}:=d(#HZfAE5p]uQhgr:IWp0R۵F2'9&-#,OoR:jQ U5́PBTџˑԒ^5ڗ?+ r>R pˎ,G_!spz* x.nr-9|F-AH.{: )2>hoAoz9Yvsdtx41m\xl b䡔jZM.u9C{FFFǭ8nW|_^+TkMO"(yAddpY!K5+mn[ܒ= !D hyA5Nq08vhޯP؂C4Lyt5"Pk'|;VK $j>0^[ןC4wk)P!ص3c"SQT{TwK}4]HkU)@ yH/pݒU7;n9rMp/ihWX$΢9CgV 奷0!09)==^E+9 8N_' i+ d YѢs$~98؛u `5ʧwhOzЦw->>y>%[NGQK._)JYn~p~G4Xr_49;cJm2<1j̷Al->vCdt22k߿F^BƝdXqZrn,rw9qgC͆um0!"Lw="rkq㺒|Q[IPSx+% BFoJhu'\Iia1$"ddU@"gћn%G( Sc |Z)N.Sn+; .El0e vH3!L[8¶$u8s')1US`u"wvUoY h Lޜߊ.{E@S׀=Q9)R5s]M4\W.Gâъ|XV4#xTe,_ӆA_O~i̭S_9ulr(Cf zq Is=Lu[{,T 6hOTqazy,UwE- e AUX"zG>{oH(}I_\e3e{PP *4c3![j>Չ z)U $Kdp8eW*ScL$:o&%d,O=`pzW1H9tޔ^7>g|j^p z%KXcQ^2[&.ٷ+۬:1a!G;8EdףRd†MokS#).e1F /?0kH L5&P }N"=.@'0Mm<6ƛ2pPik]g-K~W29d$5;Bd7+$'QiVPj/@4%G)HfZH6e~Ɏa@⍘K!}L]3" {]kow=w ׺x) d&ttu0[V6ATވjH.4.5I~⼎ۄ d3t-j[t{=rw3Lr9%MS3="zD2\(/nV˖r2Lc@TF\5fjٰmAQz-l: 71 p8(,'UWEܹvꝴ@:UVwL Cz[ uƦ QtP TYn /,ǭo(GxMPʼ|i~JԕGaWV Y( : 4yE:%U NEDKO`o=3M'j=I,j^S)3ڇ-v뉽/ZȻ4`O1 NC?[e\T Jde^"U1<޾r9fd3dO8w/!jD}8!!IIBx>cKJȪϪ9=Uv\l%;֎}w +"Fgе5Ð6q4hݡv_ {&ww|jٌ S:I/nX/0C#8 @B@ o|jx/Ζ9 tцhC^GLFSfX.4ZYZL/e'Qse% =Mwj,\س>-4^f El_7rv,)y/=VCi]% ,x+$lIlaOhȎX16zGH,KŪhhi+6(+z1g'ǙGO "b>VO_\4WTZX#mVNǬ&Pa>[޳ZycRXY$B@74qQ^1ˋ>Ϥ-'"_rZtD[0׊衵|Aog7-poҹԳp| GD<#?YRR<<|KDn"DR-!馜qW1OҞ2o}2H>gq«sZ6w|3\C6Д 'lq($9i;m1B["S.o#Z/Ɗ+J롔&3u%%}`$T4@UKcM/ߛl%1s}B2u #ks~;X6x/}1qQ;JJc&o&Aw|ԝXA:Pwmеy!D|dPZ_0~N2MI,z-?7Q'eCJ,!ŀ<;".[շ^O$c3{2Yk,oT& އ58@H!$c4RlH`9g A'WkkgYjܧ]g=V,2xַ;!PAş\`CQ//VP3W[Ӷkbj`jRH==bh,Yţma 3kf !\`GqD/O xEs+z~OL݊h4z1 ?JHUD:X{DY~̬@$ꬋ\dWcl ?^|yDd ETy-!Bk~`jF> endobj 239 0 obj << /Type /Font /Subtype /Type1 /BaseFont /GPEOIN+CMBX12 /FontDescriptor 478 0 R /FirstChar 12 /LastChar 122 /Widths 474 0 R >> endobj 405 0 obj << /Type /Font /Subtype /Type1 /BaseFont /VPNCER+CMBXTI10 /FontDescriptor 480 0 R /FirstChar 12 /LastChar 121 /Widths 465 0 R >> endobj 294 0 obj << /Type /Font /Subtype /Type1 /BaseFont /ELNVRF+CMMI12 /FontDescriptor 482 0 R /FirstChar 58 /LastChar 122 /Widths 469 0 R >> endobj 304 0 obj << /Type /Font /Subtype /Type1 /BaseFont /EUFQHP+CMMI8 /FontDescriptor 484 0 R /FirstChar 59 /LastChar 122 /Widths 467 0 R >> endobj 200 0 obj << /Type /Font /Subtype /Type1 /BaseFont /KZRWDG+CMR12 /FontDescriptor 486 0 R /FirstChar 11 /LastChar 127 /Widths 475 0 R >> endobj 199 0 obj << /Type /Font /Subtype /Type1 /BaseFont /WECPER+CMR17 /FontDescriptor 488 0 R /FirstChar 45 /LastChar 88 /Widths 476 0 R >> endobj 295 0 obj << /Type /Font /Subtype /Type1 /BaseFont /IMXRQI+CMR8 /FontDescriptor 490 0 R /FirstChar 49 /LastChar 54 /Widths 468 0 R >> endobj 263 0 obj << /Type /Font /Subtype /Type1 /BaseFont /IUQWOF+CMSL12 /FontDescriptor 492 0 R /FirstChar 40 /LastChar 89 /Widths 473 0 R >> endobj 277 0 obj << /Type /Font /Subtype /Type1 /BaseFont /CZLNDW+CMSY10 /FontDescriptor 494 0 R /FirstChar 0 /LastChar 114 /Widths 471 0 R >> endobj 346 0 obj << /Type /Font /Subtype /Type1 /BaseFont /TMCDBM+CMSY8 /FontDescriptor 496 0 R /FirstChar 0 /LastChar 0 /Widths 466 0 R >> endobj 264 0 obj << /Type /Font /Subtype /Type1 /BaseFont /FMEWEI+CMTI12 /FontDescriptor 498 0 R /FirstChar 12 /LastChar 122 /Widths 472 0 R >> endobj 278 0 obj << /Type /Font /Subtype /Type1 /BaseFont /HBKCPJ+CMTT12 /FontDescriptor 500 0 R /FirstChar 35 /LastChar 125 /Widths 470 0 R >> endobj 201 0 obj << /Type /Pages /Count 6 /Parent 501 0 R /Kids [194 0 R 203 0 R 236 0 R 260 0 R 267 0 R 274 0 R] >> endobj 284 0 obj << /Type /Pages /Count 6 /Parent 501 0 R /Kids [281 0 R 286 0 R 291 0 R 297 0 R 301 0 R 306 0 R] >> endobj 323 0 obj << /Type /Pages /Count 6 /Parent 501 0 R /Kids [317 0 R 325 0 R 330 0 R 334 0 R 339 0 R 343 0 R] >> endobj 351 0 obj << /Type /Pages /Count 6 /Parent 501 0 R /Kids [348 0 R 353 0 R 365 0 R 376 0 R 380 0 R 384 0 R] >> endobj 393 0 obj << /Type /Pages /Count 6 /Parent 501 0 R /Kids [390 0 R 395 0 R 402 0 R 409 0 R 416 0 R 421 0 R] >> endobj 429 0 obj << /Type /Pages /Count 6 /Parent 501 0 R /Kids [426 0 R 432 0 R 436 0 R 440 0 R 444 0 R 448 0 R] >> endobj 455 0 obj << /Type /Pages /Count 3 /Parent 502 0 R /Kids [452 0 R 457 0 R 462 0 R] >> endobj 501 0 obj << /Type /Pages /Count 36 /Parent 503 0 R /Kids [201 0 R 284 0 R 323 0 R 351 0 R 393 0 R 429 0 R] >> endobj 502 0 obj << /Type /Pages /Count 3 /Parent 503 0 R /Kids [455 0 R] >> endobj 503 0 obj << /Type /Pages /Count 39 /Kids [501 0 R 502 0 R] >> endobj 504 0 obj << /Type /Outlines /First 7 0 R /Last 155 0 R /Count 7 >> endobj 191 0 obj << /Title 192 0 R /A 189 0 R /Parent 163 0 R /Prev 187 0 R >> endobj 187 0 obj << /Title 188 0 R /A 185 0 R /Parent 163 0 R /Prev 183 0 R /Next 191 0 R >> endobj 183 0 obj << /Title 184 0 R /A 181 0 R /Parent 163 0 R /Prev 179 0 R /Next 187 0 R >> endobj 179 0 obj << /Title 180 0 R /A 177 0 R /Parent 163 0 R /Prev 175 0 R /Next 183 0 R >> endobj 175 0 obj << /Title 176 0 R /A 173 0 R /Parent 163 0 R /Prev 171 0 R /Next 179 0 R >> endobj 171 0 obj << /Title 172 0 R /A 169 0 R /Parent 163 0 R /Prev 167 0 R /Next 175 0 R >> endobj 167 0 obj << /Title 168 0 R /A 165 0 R /Parent 163 0 R /Next 171 0 R >> endobj 163 0 obj << /Title 164 0 R /A 161 0 R /Parent 155 0 R /Prev 159 0 R /First 167 0 R /Last 191 0 R /Count -7 >> endobj 159 0 obj << /Title 160 0 R /A 157 0 R /Parent 155 0 R /Next 163 0 R >> endobj 155 0 obj << /Title 156 0 R /A 153 0 R /Parent 504 0 R /Prev 119 0 R /First 159 0 R /Last 163 0 R /Count -2 >> endobj 151 0 obj << /Title 152 0 R /A 149 0 R /Parent 119 0 R /Prev 147 0 R >> endobj 147 0 obj << /Title 148 0 R /A 145 0 R /Parent 119 0 R /Prev 123 0 R /Next 151 0 R >> endobj 143 0 obj << /Title 144 0 R /A 141 0 R /Parent 123 0 R /Prev 139 0 R >> endobj 139 0 obj << /Title 140 0 R /A 137 0 R /Parent 123 0 R /Prev 135 0 R /Next 143 0 R >> endobj 135 0 obj << /Title 136 0 R /A 133 0 R /Parent 123 0 R /Prev 131 0 R /Next 139 0 R >> endobj 131 0 obj << /Title 132 0 R /A 129 0 R /Parent 123 0 R /Prev 127 0 R /Next 135 0 R >> endobj 127 0 obj << /Title 128 0 R /A 125 0 R /Parent 123 0 R /Next 131 0 R >> endobj 123 0 obj << /Title 124 0 R /A 121 0 R /Parent 119 0 R /Next 147 0 R /First 127 0 R /Last 143 0 R /Count -5 >> endobj 119 0 obj << /Title 120 0 R /A 117 0 R /Parent 504 0 R /Prev 111 0 R /Next 155 0 R /First 123 0 R /Last 151 0 R /Count -3 >> endobj 115 0 obj << /Title 116 0 R /A 113 0 R /Parent 111 0 R >> endobj 111 0 obj << /Title 112 0 R /A 109 0 R /Parent 504 0 R /Prev 87 0 R /Next 119 0 R /First 115 0 R /Last 115 0 R /Count -1 >> endobj 107 0 obj << /Title 108 0 R /A 105 0 R /Parent 87 0 R /Prev 103 0 R >> endobj 103 0 obj << /Title 104 0 R /A 101 0 R /Parent 87 0 R /Prev 99 0 R /Next 107 0 R >> endobj 99 0 obj << /Title 100 0 R /A 97 0 R /Parent 87 0 R /Prev 95 0 R /Next 103 0 R >> endobj 95 0 obj << /Title 96 0 R /A 93 0 R /Parent 87 0 R /Prev 91 0 R /Next 99 0 R >> endobj 91 0 obj << /Title 92 0 R /A 89 0 R /Parent 87 0 R /Next 95 0 R >> endobj 87 0 obj << /Title 88 0 R /A 85 0 R /Parent 504 0 R /Prev 71 0 R /Next 111 0 R /First 91 0 R /Last 107 0 R /Count -5 >> endobj 83 0 obj << /Title 84 0 R /A 81 0 R /Parent 71 0 R /Prev 79 0 R >> endobj 79 0 obj << /Title 80 0 R /A 77 0 R /Parent 71 0 R /Prev 75 0 R /Next 83 0 R >> endobj 75 0 obj << /Title 76 0 R /A 73 0 R /Parent 71 0 R /Next 79 0 R >> endobj 71 0 obj << /Title 72 0 R /A 69 0 R /Parent 504 0 R /Prev 43 0 R /Next 87 0 R /First 75 0 R /Last 83 0 R /Count -3 >> endobj 67 0 obj << /Title 68 0 R /A 65 0 R /Parent 59 0 R /Prev 63 0 R >> endobj 63 0 obj << /Title 64 0 R /A 61 0 R /Parent 59 0 R /Next 67 0 R >> endobj 59 0 obj << /Title 60 0 R /A 57 0 R /Parent 43 0 R /Prev 55 0 R /First 63 0 R /Last 67 0 R /Count -2 >> endobj 55 0 obj << /Title 56 0 R /A 53 0 R /Parent 43 0 R /Prev 51 0 R /Next 59 0 R >> endobj 51 0 obj << /Title 52 0 R /A 49 0 R /Parent 43 0 R /Prev 47 0 R /Next 55 0 R >> endobj 47 0 obj << /Title 48 0 R /A 45 0 R /Parent 43 0 R /Next 51 0 R >> endobj 43 0 obj << /Title 44 0 R /A 41 0 R /Parent 504 0 R /Prev 7 0 R /Next 71 0 R /First 47 0 R /Last 59 0 R /Count -4 >> endobj 39 0 obj << /Title 40 0 R /A 37 0 R /Parent 23 0 R /Prev 35 0 R >> endobj 35 0 obj << /Title 36 0 R /A 33 0 R /Parent 23 0 R /Prev 31 0 R /Next 39 0 R >> endobj 31 0 obj << /Title 32 0 R /A 29 0 R /Parent 23 0 R /Prev 27 0 R /Next 35 0 R >> endobj 27 0 obj << /Title 28 0 R /A 25 0 R /Parent 23 0 R /Next 31 0 R >> endobj 23 0 obj << /Title 24 0 R /A 21 0 R /Parent 7 0 R /Prev 19 0 R /First 27 0 R /Last 39 0 R /Count -4 >> endobj 19 0 obj << /Title 20 0 R /A 17 0 R /Parent 7 0 R /Prev 15 0 R /Next 23 0 R >> endobj 15 0 obj << /Title 16 0 R /A 13 0 R /Parent 7 0 R /Prev 11 0 R /Next 19 0 R >> endobj 11 0 obj << /Title 12 0 R /A 9 0 R /Parent 7 0 R /Next 15 0 R >> endobj 7 0 obj << /Title 8 0 R /A 5 0 R /Parent 504 0 R /Next 43 0 R /First 11 0 R /Last 23 0 R /Count -4 >> endobj 505 0 obj << /Names [(Doc-Start) 198 0 R (Item.1) 309 0 R (Item.10) 322 0 R (Item.11) 356 0 R (Item.12) 357 0 R (Item.13) 358 0 R] /Limits [(Doc-Start) (Item.13)] >> endobj 506 0 obj << /Names [(Item.14) 359 0 R (Item.15) 360 0 R (Item.16) 361 0 R (Item.17) 362 0 R (Item.18) 363 0 R (Item.19) 368 0 R] /Limits [(Item.14) (Item.19)] >> endobj 507 0 obj << /Names [(Item.2) 310 0 R (Item.20) 369 0 R (Item.21) 370 0 R (Item.22) 371 0 R (Item.23) 372 0 R (Item.24) 373 0 R] /Limits [(Item.2) (Item.24)] >> endobj 508 0 obj << /Names [(Item.25) 374 0 R (Item.3) 311 0 R (Item.4) 312 0 R (Item.5) 313 0 R (Item.6) 314 0 R (Item.7) 315 0 R] /Limits [(Item.25) (Item.7)] >> endobj 509 0 obj << /Names [(Item.8) 320 0 R (Item.9) 321 0 R (chapter*.1) 240 0 R (chapter.1) 6 0 R (chapter.2) 42 0 R (chapter.3) 70 0 R] /Limits [(Item.8) (chapter.3)] >> endobj 510 0 obj << /Names [(chapter.4) 86 0 R (chapter.5) 110 0 R (chapter.6) 118 0 R (chapter.7) 154 0 R (page.1) 197 0 R (page.10) 299 0 R] /Limits [(chapter.4) (page.10)] >> endobj 511 0 obj << /Names [(page.11) 303 0 R (page.12) 308 0 R (page.13) 319 0 R (page.14) 327 0 R (page.15) 332 0 R (page.16) 336 0 R] /Limits [(page.11) (page.16)] >> endobj 512 0 obj << /Names [(page.17) 341 0 R (page.18) 345 0 R (page.19) 350 0 R (page.2) 205 0 R (page.20) 355 0 R (page.21) 367 0 R] /Limits [(page.17) (page.21)] >> endobj 513 0 obj << /Names [(page.22) 378 0 R (page.23) 382 0 R (page.24) 386 0 R (page.25) 392 0 R (page.26) 397 0 R (page.27) 404 0 R] /Limits [(page.22) (page.27)] >> endobj 514 0 obj << /Names [(page.28) 411 0 R (page.29) 418 0 R (page.3) 238 0 R (page.30) 423 0 R (page.31) 428 0 R (page.32) 434 0 R] /Limits [(page.28) (page.32)] >> endobj 515 0 obj << /Names [(page.33) 438 0 R (page.34) 442 0 R (page.35) 446 0 R (page.36) 450 0 R (page.37) 454 0 R (page.38) 459 0 R] /Limits [(page.33) (page.38)] >> endobj 516 0 obj << /Names [(page.39) 464 0 R (page.4) 262 0 R (page.5) 269 0 R (page.6) 276 0 R (page.7) 283 0 R (page.8) 288 0 R] /Limits [(page.39) (page.8)] >> endobj 517 0 obj << /Names [(page.9) 293 0 R (section*.2) 328 0 R (section*.3) 460 0 R (section.1.1) 10 0 R (section.1.2) 14 0 R (section.1.3) 18 0 R] /Limits [(page.9) (section.1.3)] >> endobj 518 0 obj << /Names [(section.1.4) 22 0 R (section.2.1) 46 0 R (section.2.2) 50 0 R (section.2.3) 54 0 R (section.2.4) 58 0 R (section.3.1) 74 0 R] /Limits [(section.1.4) (section.3.1)] >> endobj 519 0 obj << /Names [(section.3.2) 78 0 R (section.3.3) 82 0 R (section.4.1) 90 0 R (section.4.2) 94 0 R (section.4.3) 98 0 R (section.4.4) 102 0 R] /Limits [(section.3.2) (section.4.4)] >> endobj 520 0 obj << /Names [(section.4.5) 106 0 R (section.5.1) 114 0 R (section.6.1) 122 0 R (section.6.2) 146 0 R (section.6.3) 150 0 R (section.7.1) 158 0 R] /Limits [(section.4.5) (section.7.1)] >> endobj 521 0 obj << /Names [(section.7.2) 162 0 R (subsection.1.4.1) 26 0 R (subsection.1.4.2) 30 0 R (subsection.1.4.3) 34 0 R (subsection.1.4.4) 38 0 R (subsection.2.4.1) 62 0 R] /Limits [(section.7.2) (subsection.2.4.1)] >> endobj 522 0 obj << /Names [(subsection.2.4.2) 66 0 R (subsection.6.1.1) 126 0 R (subsection.6.1.2) 130 0 R (subsection.6.1.3) 134 0 R (subsection.6.1.4) 138 0 R (subsection.6.1.5) 142 0 R] /Limits [(subsection.2.4.2) (subsection.6.1.5)] >> endobj 523 0 obj << /Names [(subsection.7.2.1) 166 0 R (subsection.7.2.2) 170 0 R (subsection.7.2.3) 174 0 R (subsection.7.2.4) 178 0 R (subsection.7.2.5) 182 0 R (subsection.7.2.6) 186 0 R] /Limits [(subsection.7.2.1) (subsection.7.2.6)] >> endobj 524 0 obj << /Names [(subsection.7.2.7) 190 0 R] /Limits [(subsection.7.2.7) (subsection.7.2.7)] >> endobj 525 0 obj << /Kids [505 0 R 506 0 R 507 0 R 508 0 R 509 0 R 510 0 R] /Limits [(Doc-Start) (page.10)] >> endobj 526 0 obj << /Kids [511 0 R 512 0 R 513 0 R 514 0 R 515 0 R 516 0 R] /Limits [(page.11) (page.8)] >> endobj 527 0 obj << /Kids [517 0 R 518 0 R 519 0 R 520 0 R 521 0 R 522 0 R] /Limits [(page.9) (subsection.6.1.5)] >> endobj 528 0 obj << /Kids [523 0 R 524 0 R] /Limits [(subsection.7.2.1) (subsection.7.2.7)] >> endobj 529 0 obj << /Kids [525 0 R 526 0 R 527 0 R 528 0 R] /Limits [(Doc-Start) (subsection.7.2.7)] >> endobj 530 0 obj << /Dests 529 0 R >> endobj 531 0 obj << /Type /Catalog /Pages 503 0 R /Outlines 504 0 R /Names 530 0 R /PageMode/UseOutlines /OpenAction 193 0 R >> endobj 532 0 obj << /Author()/Title()/Subject()/Creator(LaTeX with hyperref package)/Producer(pdfTeX-1.40.3)/Keywords() /CreationDate (D:20100303091453+01'00') /ModDate (D:20100303091453+01'00') /Trapped /False /PTEX.Fullbanner (This is pdfTeX using libpoppler, Version 3.141592-1.40.3-2.2 (Web2C 7.5.6) kpathsea version 3.5.6) >> endobj xref 0 533 0000000001 65535 f 0000000002 00000 f 0000000003 00000 f 0000000004 00000 f 0000000000 00000 f 0000000015 00000 n 0000017229 00000 n 0000504667 00000 n 0000000060 00000 n 0000000093 00000 n 0000017286 00000 n 0000504595 00000 n 0000000140 00000 n 0000000173 00000 n 0000017344 00000 n 0000504509 00000 n 0000000221 00000 n 0000000261 00000 n 0000020072 00000 n 0000504423 00000 n 0000000309 00000 n 0000000349 00000 n 0000020131 00000 n 0000504313 00000 n 0000000397 00000 n 0000000433 00000 n 0000020190 00000 n 0000504239 00000 n 0000000486 00000 n 0000000537 00000 n 0000022557 00000 n 0000504152 00000 n 0000000590 00000 n 0000000638 00000 n 0000022615 00000 n 0000504065 00000 n 0000000691 00000 n 0000000755 00000 n 0000022673 00000 n 0000503991 00000 n 0000000808 00000 n 0000000841 00000 n 0000025514 00000 n 0000503867 00000 n 0000000887 00000 n 0000000941 00000 n 0000029791 00000 n 0000503793 00000 n 0000000989 00000 n 0000001014 00000 n 0000032452 00000 n 0000503706 00000 n 0000001062 00000 n 0000001101 00000 n 0000037709 00000 n 0000503619 00000 n 0000001149 00000 n 0000001190 00000 n 0000037828 00000 n 0000503508 00000 n 0000001238 00000 n 0000001288 00000 n 0000037887 00000 n 0000503434 00000 n 0000001341 00000 n 0000001370 00000 n 0000039321 00000 n 0000503360 00000 n 0000001423 00000 n 0000001459 00000 n 0000041917 00000 n 0000503235 00000 n 0000001505 00000 n 0000001546 00000 n 0000041975 00000 n 0000503161 00000 n 0000001594 00000 n 0000001639 00000 n 0000042033 00000 n 0000503074 00000 n 0000001687 00000 n 0000001726 00000 n 0000042091 00000 n 0000503000 00000 n 0000001774 00000 n 0000001811 00000 n 0000045635 00000 n 0000502873 00000 n 0000001857 00000 n 0000001901 00000 n 0000045693 00000 n 0000502799 00000 n 0000001949 00000 n 0000001982 00000 n 0000045751 00000 n 0000502712 00000 n 0000002030 00000 n 0000002063 00000 n 0000047931 00000 n 0000502623 00000 n 0000002111 00000 n 0000002145 00000 n 0000048229 00000 n 0000502532 00000 n 0000002194 00000 n 0000002239 00000 n 0000050330 00000 n 0000502454 00000 n 0000002288 00000 n 0000002328 00000 n 0000052317 00000 n 0000502323 00000 n 0000002375 00000 n 0000002412 00000 n 0000052376 00000 n 0000502258 00000 n 0000002461 00000 n 0000002503 00000 n 0000090482 00000 n 0000502126 00000 n 0000002550 00000 n 0000002604 00000 n 0000133779 00000 n 0000502008 00000 n 0000002653 00000 n 0000002694 00000 n 0000133838 00000 n 0000501929 00000 n 0000002748 00000 n 0000002786 00000 n 0000133897 00000 n 0000501836 00000 n 0000002840 00000 n 0000002882 00000 n 0000204226 00000 n 0000501743 00000 n 0000002936 00000 n 0000002974 00000 n 0000204286 00000 n 0000501650 00000 n 0000003028 00000 n 0000003066 00000 n 0000248804 00000 n 0000501571 00000 n 0000003120 00000 n 0000003164 00000 n 0000248863 00000 n 0000501478 00000 n 0000003213 00000 n 0000003248 00000 n 0000398510 00000 n 0000501399 00000 n 0000003297 00000 n 0000003338 00000 n 0000400366 00000 n 0000501281 00000 n 0000003385 00000 n 0000003427 00000 n 0000400425 00000 n 0000501202 00000 n 0000003476 00000 n 0000003511 00000 n 0000400484 00000 n 0000501084 00000 n 0000003560 00000 n 0000003589 00000 n 0000400543 00000 n 0000501005 00000 n 0000003643 00000 n 0000003675 00000 n 0000400602 00000 n 0000500912 00000 n 0000003729 00000 n 0000003764 00000 n 0000402164 00000 n 0000500819 00000 n 0000003818 00000 n 0000003857 00000 n 0000403788 00000 n 0000500726 00000 n 0000003911 00000 n 0000003945 00000 n 0000403847 00000 n 0000500633 00000 n 0000003999 00000 n 0000004030 00000 n 0000405693 00000 n 0000500540 00000 n 0000004084 00000 n 0000004116 00000 n 0000406813 00000 n 0000500461 00000 n 0000004170 00000 n 0000004209 00000 n 0000004496 00000 n 0000004726 00000 n 0000004261 00000 n 0000004608 00000 n 0000004667 00000 n 0000498329 00000 n 0000498186 00000 n 0000499326 00000 n 0000005119 00000 n 0000004947 00000 n 0000004811 00000 n 0000005059 00000 n 0000006603 00000 n 0000006754 00000 n 0000006907 00000 n 0000007061 00000 n 0000007215 00000 n 0000007365 00000 n 0000007524 00000 n 0000007682 00000 n 0000007841 00000 n 0000008000 00000 n 0000008151 00000 n 0000008305 00000 n 0000008458 00000 n 0000008612 00000 n 0000008766 00000 n 0000008925 00000 n 0000009084 00000 n 0000009235 00000 n 0000009389 00000 n 0000009541 00000 n 0000009695 00000 n 0000009846 00000 n 0000010000 00000 n 0000010153 00000 n 0000010307 00000 n 0000010461 00000 n 0000010614 00000 n 0000010763 00000 n 0000012148 00000 n 0000011033 00000 n 0000006255 00000 n 0000005191 00000 n 0000010915 00000 n 0000497609 00000 n 0000010974 00000 n 0000012299 00000 n 0000012453 00000 n 0000012612 00000 n 0000012771 00000 n 0000012930 00000 n 0000013089 00000 n 0000013248 00000 n 0000013402 00000 n 0000013556 00000 n 0000013706 00000 n 0000013860 00000 n 0000014014 00000 n 0000014173 00000 n 0000014332 00000 n 0000014491 00000 n 0000014648 00000 n 0000014807 00000 n 0000014966 00000 n 0000015185 00000 n 0000011872 00000 n 0000011118 00000 n 0000015125 00000 n 0000498612 00000 n 0000499038 00000 n 0000017019 00000 n 0000017402 00000 n 0000016887 00000 n 0000015296 00000 n 0000017170 00000 n 0000019495 00000 n 0000019665 00000 n 0000019838 00000 n 0000020249 00000 n 0000019347 00000 n 0000017487 00000 n 0000020012 00000 n 0000498755 00000 n 0000499182 00000 n 0000022323 00000 n 0000022730 00000 n 0000022191 00000 n 0000020373 00000 n 0000022498 00000 n 0000499443 00000 n 0000023207 00000 n 0000023035 00000 n 0000022841 00000 n 0000023147 00000 n 0000025301 00000 n 0000025572 00000 n 0000025169 00000 n 0000023292 00000 n 0000025455 00000 n 0000497899 00000 n 0000498471 00000 n 0000027472 00000 n 0000027300 00000 n 0000025709 00000 n 0000027412 00000 n 0000029849 00000 n 0000029620 00000 n 0000027583 00000 n 0000029732 00000 n 0000498043 00000 n 0000032930 00000 n 0000032280 00000 n 0000029999 00000 n 0000032392 00000 n 0000032510 00000 n 0000032570 00000 n 0000032630 00000 n 0000032690 00000 n 0000032750 00000 n 0000032810 00000 n 0000032870 00000 n 0000035746 00000 n 0000035398 00000 n 0000033080 00000 n 0000035510 00000 n 0000035569 00000 n 0000035628 00000 n 0000035687 00000 n 0000499560 00000 n 0000037946 00000 n 0000037537 00000 n 0000035909 00000 n 0000037649 00000 n 0000037768 00000 n 0000039379 00000 n 0000039150 00000 n 0000038096 00000 n 0000039262 00000 n 0000039891 00000 n 0000039719 00000 n 0000039503 00000 n 0000039831 00000 n 0000041699 00000 n 0000042149 00000 n 0000041567 00000 n 0000039976 00000 n 0000041858 00000 n 0000044069 00000 n 0000043897 00000 n 0000042234 00000 n 0000044009 00000 n 0000498898 00000 n 0000045808 00000 n 0000045464 00000 n 0000044232 00000 n 0000045576 00000 n 0000499677 00000 n 0000048349 00000 n 0000047579 00000 n 0000045945 00000 n 0000047691 00000 n 0000047751 00000 n 0000047811 00000 n 0000047871 00000 n 0000047990 00000 n 0000048050 00000 n 0000048110 00000 n 0000048170 00000 n 0000048289 00000 n 0000050684 00000 n 0000050041 00000 n 0000048486 00000 n 0000050153 00000 n 0000050212 00000 n 0000050271 00000 n 0000050389 00000 n 0000050448 00000 n 0000050507 00000 n 0000050566 00000 n 0000050625 00000 n 0000051214 00000 n 0000051042 00000 n 0000050834 00000 n 0000051154 00000 n 0000052435 00000 n 0000052146 00000 n 0000051299 00000 n 0000052258 00000 n 0000052913 00000 n 0000052741 00000 n 0000052546 00000 n 0000052853 00000 n 0000053735 00000 n 0000090269 00000 n 0000090541 00000 n 0000053603 00000 n 0000052998 00000 n 0000090423 00000 n 0000499794 00000 n 0000092037 00000 n 0000091865 00000 n 0000090675 00000 n 0000091977 00000 n 0000092844 00000 n 0000122540 00000 n 0000134628 00000 n 0000133956 00000 n 0000092732 00000 n 0000092135 00000 n 0000133720 00000 n 0000497753 00000 n 0000183121 00000 n 0000204987 00000 n 0000204346 00000 n 0000134516 00000 n 0000134129 00000 n 0000204166 00000 n 0000218952 00000 n 0000249460 00000 n 0000292060 00000 n 0000248922 00000 n 0000204875 00000 n 0000204506 00000 n 0000248745 00000 n 0000323474 00000 n 0000291592 00000 n 0000249348 00000 n 0000249082 00000 n 0000291532 00000 n 0000347353 00000 n 0000322974 00000 n 0000291948 00000 n 0000291713 00000 n 0000322915 00000 n 0000499911 00000 n 0000368955 00000 n 0000346884 00000 n 0000323362 00000 n 0000323095 00000 n 0000346824 00000 n 0000368394 00000 n 0000347241 00000 n 0000347006 00000 n 0000368335 00000 n 0000398570 00000 n 0000368843 00000 n 0000368516 00000 n 0000398450 00000 n 0000400661 00000 n 0000400195 00000 n 0000398705 00000 n 0000400307 00000 n 0000402224 00000 n 0000401992 00000 n 0000400772 00000 n 0000402104 00000 n 0000403906 00000 n 0000403617 00000 n 0000402335 00000 n 0000403729 00000 n 0000500028 00000 n 0000405753 00000 n 0000405461 00000 n 0000404017 00000 n 0000405573 00000 n 0000405633 00000 n 0000406872 00000 n 0000406642 00000 n 0000405864 00000 n 0000406754 00000 n 0000406996 00000 n 0000407661 00000 n 0000407686 00000 n 0000408087 00000 n 0000408142 00000 n 0000408535 00000 n 0000409100 00000 n 0000409760 00000 n 0000410275 00000 n 0000410563 00000 n 0000411204 00000 n 0000411846 00000 n 0000412125 00000 n 0000422608 00000 n 0000423002 00000 n 0000428492 00000 n 0000428752 00000 n 0000435692 00000 n 0000435973 00000 n 0000440218 00000 n 0000440467 00000 n 0000456276 00000 n 0000456840 00000 n 0000459595 00000 n 0000459840 00000 n 0000462462 00000 n 0000462706 00000 n 0000470264 00000 n 0000470596 00000 n 0000472530 00000 n 0000472807 00000 n 0000474017 00000 n 0000474242 00000 n 0000483457 00000 n 0000483777 00000 n 0000497088 00000 n 0000500121 00000 n 0000500239 00000 n 0000500316 00000 n 0000500386 00000 n 0000504776 00000 n 0000504949 00000 n 0000505119 00000 n 0000505287 00000 n 0000505451 00000 n 0000505625 00000 n 0000505803 00000 n 0000505973 00000 n 0000506142 00000 n 0000506312 00000 n 0000506481 00000 n 0000506651 00000 n 0000506815 00000 n 0000507002 00000 n 0000507198 00000 n 0000507395 00000 n 0000507597 00000 n 0000507824 00000 n 0000508065 00000 n 0000508307 00000 n 0000508414 00000 n 0000508525 00000 n 0000508633 00000 n 0000508750 00000 n 0000508845 00000 n 0000508949 00000 n 0000508987 00000 n 0000509115 00000 n trailer << /Size 533 /Root 531 0 R /Info 532 0 R /ID [<44BFEA45D80FE5DCBC27D22D310D1D35> <44BFEA45D80FE5DCBC27D22D310D1D35>] >> startxref 509446 %%EOF netgen-6.2.1804/doc/CMakeLists.txt0000644000175000017500000000014713272137567015314 0ustar kurtkurtINSTALL(FILES ng4.pdf DESTINATION ${NG_INSTALL_DIR_RES}/${NG_INSTALL_SUFFIX}/doc COMPONENT netgen_doc) netgen-6.2.1804/doc/ng4.tex0000644000175000017500000010742113272137567013771 0ustar kurtkurt% % Requires latex and latex2html packages % % Generate pdf-file with % pdflatex ng4.tex % % Generate html docu with % latex2html ng4.tex % \documentclass[12pt]{book} \usepackage{a4, epsf, graphicx} \usepackage{html} \title{NETGEN - 4.X} \author{Joachim Sch\"oberl} \unitlength=1cm \begin{document} \maketitle \tableofcontents \chapter{Getting Started} WARNING: DOCUMENTATION IS NOT UP TO DATE \section{What is NETGEN} NETGEN is an automatic mesh generation tool for two and three dimensions. Netgen is open source under the conditions of the LGPL. It comes as stand alone programme with graphical user interface, or as C++ library to be linked into an other application. Netgen is available for Unix/Linux and Windows 98/NT. Netgen generates triangular or quadrilateral meshes in 2D, and tetrahedral meshes in 3D. The input for 2D is described by spline curves, and the input for 3D problems is either defined by constructive solid geometries (CSG), see Chapter \ref{chap_csg}, or by the standard STL file format. NETGEN contains modules for mesh optimization and hierarchical mesh refinement. Curved elements are supported of arbitrary order. \section{The history of NETGEN} % The NETGEN project was started 1994 in the master's programme of Joachim Sch\"oberl, under supervision of Prof. Ulrich Langer, at the Department of Computational Mathematics and Optimization, University Linz, Austria. Its further development was supported by the Austrian science Fund ``Fonds zur F\"orderung der wissenschaftlichen Forschung'' (http://www.fwf.ac.at) under projects P 10643-TEC and SFB 1306. Starting from 2002, the development continued within the Start project ``hp-FEM'' (http://www.hpfem.jku.at) granted by the FWF. In 2006, the Netgen development moved together with J.~Sch\"oberl to RWTH Aachen University, Germany (http://www.mathcces.rwth-aachen.de/netgen). \section{How to receive NETGEN} % The latest NETGEN source code release is available from sourceforge \begin{center} http://sourceforge.net/projects/netgen-mesher \end{center} There are file releases, as well as a public SVN repository containing the latest sources. The latest NETGEN Windows executable is available from \begin{center} http://www.mathcces.rwth-aachen.de/netgen \end{center} \section{Installing NETGEN} THIS SECTION NEEDS UPDATE INFORMATION AVAILABLE AT http://netgen-mesher.wiki.sourceforge.net/ \subsection{Installing NETGEN for Unix/Linux} To install NETGEN on Unix/Linux you will download the source code and compile it yourself. You need the following libraries: \begin{itemize} \item The 3D visualization library {\bf OpenGL}. It comes with most systems with hardware graphics. The free software version mesagl is available from \htmladdnormallink{http://www.mesa3d.org}{http://www.mesa3d.org/}. \item The graphical toolkit {\bf TclTk} developed by John Ousterhout (available from \htmladdnormallink{http://www.scriptics.com/}{http://www.scriptics.com/}) and its extension {\bf Tix} available from \htmladdnormallink{http://www.sourceforge.com}{http://www.sourceforge.com/}) by Iam Lan. Netgen has been tested with version TclTk 8.0 - TclTk 8.4 and Tix 4.6. - Tix 8.2 \end{itemize} You can also download these packages from the Netgen site. To install NETGEN please move into the directory ng4. You set the Unix-variable MACHINE according to your machine/operating system, e.g. \begin{quote} \tt setenv MACHINE LINUX \end{quote} % (in bash shell you type {\tt export MACHINE=LINUX}). The Makefile includes the makefile-include \begin{quote} \tt libsrc/makefile.mach.\$(MACHINE) %$ \end{quote} Please create/modify the according file, (e.g. copy makefile.mach.LINUX to makefile.mach.SUN). Then you enter {\bf \tt make} to build the executable. \medskip To make NETGEN globally available you just copy the binary ``ng'' to the global bin - directory. In difference to earlier versions, it needs no additional files. \subsection{Installing NETGEN for Windows} NETGEN is available now for Windows in binary form. You download the zip - archive {\tt ng4win.zip}. After unpacking it with winzip, you can start the executable ``ng4.exe''. \subsection{Adding IGES/STEP file support via OpenCascade} \label{subsec_occ} NETGEN is capable of importing IGES and STEP geometry files. If you want to use this functionality you have the add the OpenCascade library to your NETGEN distribution. OpenCascade is an open source 3D solid modeller library by OpenCASCADE S.A. You can obtain it from \htmladdnormallink{http://www.opencascade.org}{http://www.opencascade.org/} (Linux and Windows). To compile NETGEN with OpenCascade for Windows just choose the project settings ``Release (OCC)'' and adjust the proper search paths. For Linux adjust the directory search paths OCC\_DIR, OCCINC\_DIR and OCCLIB\_DIR in the Makefile and in libsrc/makefile.inc. Then add -DOCCGEOMETRY to the CPLUSPLUSFLAGS2 in libsrc/makefile.mach.\$(MACHINE). If you use OpenCascade version 5.2 also add -DOCC52 and -DHAVE\_IOSTREAM to the CPLUSPLUSFLAGS2. \subsection{Testing Netgen} Please start Netgen by entering ``ng'' or clicking the ``ng.exe'' icon. A white window with menu items should appear. Please load a geometry file by selecting "File {\tt ->} Load Geometry", choose e.g. tutorials/cube.geo. Then press the button "Generate Mesh". By keeping pressed the left, middle or right button of your mouse you can rotate, move or zoom the object. With ``File {\tt->} Export Mesh'' you can save the mesh file. \chapter{Constructive Solid Geometry (CSG)} \label{chap_csg} % The CSG input format is a useful geometry format for small and medium size geometries. One defines the geometry by writing an ASCII file in a text editor. The geometry is defined by the Eulerian operations (union, intersection and complement) from primitives. A complete list of available primitives is given in Section~\ref{sec_primitives}. The following input describes a cube: \begin{quote} \begin{verbatim} # A cube algebraic3d solid cube = orthobrick (0, 0, 0; 1, 1, 1); tlo cube; \end{verbatim} \end{quote} Lines starting with $\#$ are comment lines. Every CSG file must contain the keyword {\tt algebraic3d} before any non-comment line. The keyword {\tt solid} defines a named solid, here the solid {\it cube} is defined. A solid is defined by the Eulerian operations applied to primitives. Here, the solid is just the primitve defined by {\tt orthobrick}. This is a brick parallel to the axis, specified by the minimal $x$, $y$, and $z$ coordinates, and the maximal $x$, $y$, and $z$ coordinates. The present definition gives the cube $[0,1]^3$. Finally, the definition {\tt tlo cube} declares the solid {\it cube} as a top-level-object, what is necessary for meshing. Please start netgen with the geometry file above by entering \begin{quote} ng cube.geo \end{quote} Instead, you can also load the geometry from the file menu. You will see a blue cube, which you can rotate by keeping the left mouse button pressed. Pressing the big {\bf generate mesh} button will result in a (very coarse) mesh of that cube. Instead of using the primitive {\tt orthobrick}, one can also specify a cube by intersecting six halfspaces (called planes). Each primitive {\tt plane} is given by an arbitrary point in the plane, and a outward vector, not necessarily a unit vector. The six halfspaces are intersected by the keyword {\tt and}. The following input gives an equivalent result: \begin{quote} \begin{verbatim} # A cube algebraic3d solid cube = plane (0, 0, 0; 0, 0, -1) and plane (0, 0, 0; 0, -1, 0) and plane (0, 0, 0; -1, 0, 0) and plane (1, 1, 1; 0, 0, 1) and plane (1, 1, 1; 0, 1, 0) and plane (1, 1, 1; 1, 0, 0); tlo cube; \end{verbatim} \end{quote} To drill a hole though the cube, we will intersect the cube and the complement of a cylinder. A cylinder is defined by two points on the central axis, and the radius. Please note, a cylinder is understood as an infinitely long cylinder (although the visualization may suggest a finite cylinder): \begin{quote} \begin{verbatim} # cube with hole algebraic3d solid cubehole = orthobrick (0, 0, 0; 1, 1, 1) and not cylinder (0.5, 0.5, 0; 0.5, 0.5, 1; 0.1); tlo cubehole; \end{verbatim} \end{quote} Like {\tt and} denotes the intersection, {\tt or} denotes the union: \begin{quote} \begin{verbatim} solid cubeball = orthobrick (0, 0, 0; 1, 1, 1) or sphere (0, 0, 0; 0.5) -maxh=0.2; \end{verbatim} \end{quote} The flag {\tt -maxh=0.2} assigns the maximal mesh size of $0.2$ to the solid. The current version, NG4.1, uses the mesh size assigned to the main solid of the top-level-object for the domain. Future version will contain more possibilities to define mesh-sizes for parts of a domain. It is possible to define geometries with several sub-domains, simply by declaring several tlos: \begin{quote} \begin{verbatim} algebraic3d solid cube = orthobrick (0, 0, 0; 1, 1, 1); solid cyl = cylinder (0.5, 0.5, 0; 0.5, 0.5, 1; 0.1); solid dom1 = cube and not cyl; solid dom2 = cube and cyl; tlo dom1 -col=[0,0,1] -transparent; tlo dom2 -col=[1,0,0]; \end{verbatim} \end{quote} This example show also solid trees involving previously defined named solids. Top-level-objects can be assigned a color specified by the amount of red, green and blue (RGB) values. The flag {\tt -transparent} makes the solid appear transparent. It is possible to specify bounday condition numbers for individual surfaces of a solid. The flag {\tt -bc} assigns the bc to all surfaces of that solid-tree. If several flags are given the one closest to the leaves of the tree dominates. The following file defines a cube, with $bc=1$ at the bottom, $bc=2$ at the top, and $bc=3$ for all other surfaces: \begin{quote} \begin{verbatim} algebraic3d solid bottom = plane (0, 0, 0; 0, 0, -1) -bc=1; solid top = plane (1, 1, 1; 0, 0, 1) -bc=2; solid cube = bottm and top and plane (0, 0, 0; 0, -1, 0) and plane (0, 0, 0; -1, 0, 0) and plane (1, 1, 1; 0, 1, 0) and plane (1, 1, 1; 1, 0, 0) -bc=3; tlo cube; \end{verbatim} \end{quote} \section{Curves} For the construction of some of the primitives in the following section it is necessary to define 2D or 3D curves, which are given in terms of straight lines and of quadratic rational spline patches. A line is given by the two endpoints, a spline patch by three d'Boor points. The patch is an elliptic arc from point 1 to point 3, such that the lines 1--2 and 2--3 are tangents. A 2D curve is defined as \begin{quote} \samepage \tt \begin{tabbing} aaa\=aaa\=aaa\=aaa\=aaa\=aaa\= \kill curve2d $name$ = ($np$;\\ \>\> $x_1$, $y_1$;\\ \>\> \ldots\\ \>\> $x_{np}$, $y_{np}$;\\ \>\> $ns$;\\ \>\> [ 2 | 3 ], $p_{1,1}$, $p_{1,2}$ [, $p_{1,3}$];\\ \>\> \ldots\\ \>\> [ 2 | 3 ], $p_{ns,1}$, $p_{ns,2}$ [, $p_{ns,3}$]); \end{tabbing} \end{quote} The number of points is given by $np$, the number of segments by $ns$. Each point is given by its coordinates, each segment by the number of points (2 for line segments, 3 for spline patches) and the pointnumbers. The 3D curves are given analogously by \begin{quote} \samepage \tt \begin{tabbing} aaa\=aaa\=aaa\=aaa\=aaa\=aaa\= \kill curve3d $name$ = ($np$;\\ \>\> $x_1$, $y_1$, $z_1$;\\ \>\> \ldots\\ \>\> $x_{np}$, $y_{np}$, $z_{np}$;\\ \>\> $ns$;\\ \>\> [ 2 | 3 ], $p_{1,1}$, $p_{1,2}$ [, $p_{1,3}$];\\ \>\> \ldots\\ \>\> [ 2 | 3 ], $p_{ns,1}$, $p_{ns,2}$ [, $p_{ns,3}$]); \end{tabbing} \end{quote} \section{Available Primitives} \label{sec_primitives} Netgen %4.1 supports the following primitives: \begin{enumerate} \item A halfspace, i.e., a plane and everything on one side of it, given by an arbitrary point~$p = (p_x, p_y, p_z)$ in the plane and an outside normal vector~$n = (n_x, n_y, n_z)$, not necessarily a unit vector: \begin{quote} \tt plane ( $p_x$, $p_y$, $p_z$ ; $n_x$, $n_y$, $n_z$ ) \end{quote} \item A cylinder of infinite length, given by two points~$a=(a_x, a_y,a_z)$ and $b=(b_x, b_y, b_z)$ on the central axis and the radius $r$: \begin{quote} \tt cylinder ( $a_x$, $a_y$, $a_z$ ; $b_x$, $b_y$, $b_z$ ; $r$ ) \end{quote} \item A sphere, given by the center~ $c=(c_x,c_y,c_z)$ and the radius~$r$: \begin{quote} \tt sphere ( $c_x$, $c_y$, $c_z$ ; $r$ ) \end{quote} \item An elliptic cylinder, given by the point $c=(c_x, c_y, c_z)$ on the main axis, and the vectors $v$ and $w$ of the long and short axis of the ellipse, respectively: \begin{quote} \tt ellipticcylinder ($c_x$, $c_y$, $c_z$ ; $v_x$, $v_y$, $v_z$ ; $w_x$, $w_y$, $w_z$) \end{quote} \item An ellipsoid, given by the center $c=(c_x, c_y, c_z)$, and the vectors $u$, $v$ and $w$ of the main axis of the ellipsoid: \begin{quote} \tt ellipsoid ($c_x$, $c_y$, $c_z$ ; $u_x$, $u_y$, $u_z$; $v_x$, $v_y$, $v_z$ ; $w_x$, $w_y$, $w_z$) \end{quote} \item A cone is given by two points on the central axis and the two corresponding radii. It is not possible to mesh the top of the cone yet, it must be cut off. \begin{quote} \tt cone ( $a_x$, $a_y$, $a_z$ ; $r_a$; $b_x$, $b_y$, $b_z$ ; $r_b$ ) \end{quote} \item A orthobrick is a brick parallel to the coordinate axis. It is specified by two opposite corner points $a = (a_x, a_y, a_z)$ and $b = (b_x, b_y, b_z)$: \begin{quote} \tt orthobrick ( $a_x$, $a_y$, $a_z$ ; $b_x$, $b_y$, $b_z$ ) \end{quote} \item A polyhedron is defined by a set of triangles forming a closed polyhedron. First, a set of points is defined, then the triangles are given by point indices. The triangles must be oriented counter-clockwise when looking onto the object. The following polyhedron describes a tetrahedron: \begin{quote} \begin{verbatim} algebraic3d solid poly = polyhedron (0,0,0; 1,0,0; 0,1,0; 0,0,1 ;; 1,3,2 ; 1,4,3; 1,2,4 ; 2,3,4 ); tlo poly; \end{verbatim} \end{quote} \item A body of extrusion is defined by its profile (which has to be a closed, \textit{clockwise} oriented 2D curve), by a path (a 3D curve) and a vector $d$. It is constructed as follows. Take a point $p$ on the path and denote the (unit-) tangent of the path in this point by $t$. If we cut the body by the plane given by $p$ and $t$ as normal vector, the cut is the profile. The profile is oriented by the (local) y-direction $\bar{y} := d - (d \cdot t) t$ and the (local) x-direction $\bar{x} := t \times \bar{y}$. The syntax is: \begin{quote} \tt extrusion ( ; ; $d_x$, $d_y$, $d_z$ ) \end{quote} The following points have to be noticed: \begin{itemize} \item If the path is not closed, then also the body is NOT closed. In this case e.g.\ planes or orthobricks have to be used to construct a closed body. \item The path has to be smooth, i.e.\ the tangents at the end- resp.\ startpoint of two consecutive spline or line patches have to have the same directions. \end{itemize} \item A body of revolution is given by two points, defining the axis of revolution, and the 2D curve which is rotated: \begin{quote} \tt revolution ( $p_{1,x}$, $p_{1,y}$, $p_{1,z}$; $p_{2,x}$, $p_{2,y}$, $p_{2,z}$; ) \end{quote} The first point defines the origin of the local 2D coordinate system of the curve. It is assumed, that the curve lies above the (local) x-axis, and that it is described \textit{clockwise}. If the curve is not closed, then the start point and the end point have to lie on the x-axis, and the tangents at those points have to be orthogonal to the x-axis. \end{enumerate} \section{Surface Identification} In Netgen it is possible to construct prismatic meshes between two surfaces, where these surfaces have to be specified explicitly in the .geo file with the command \begin{quote} \tt identify closesurfaces ; \end{quote} (this feature originally was intended for close surface, which is the reason for the command name). \paragraph{Optional parameters:} (selection) \begin{itemize} \item \texttt{-tlo=}\\ the prisms are only constructed between two faces of a tlo. \item \texttt{-direction=[,,]}\\ This parameter has to be used if \textbf{skew prisms} should be built. In this case netgen ``needs help'' by the user, it needs to know the direction of identification. \textit{Example:} We start with a cylinder with the axis given by the points $(-1,0,4)$ and $(4,10,1)$. This cylinder is cut by the planes \texttt{p1} and \texttt{p2} (which are not necessarily normal to the axis and not necessarily parallel) and we want to build prisms between these planes. Then the command would, e.g., look like \begin{quote} \tt identify closesurfaces p1 p2 -direction=[5,10,-3] \end{quote} \end{itemize} \section{Known problems and work-arounds} \subsection{Interfaces} A airdomain with two connected interior parts may be described by \begin{quote} \begin{verbatim} algebraic3d solid cube = orthobrick (0, 0, 0; 1, 1, 1); solid part1 = orthobrick (0.2, 0.2, 0.2; 0.5, 0.8, 0.8); solid part2 = orthobrick (0.5, 0.2, 0.2; 0.8, 0.8, 0.8); solid air = cube and not part1 and not part2; tlo air; tlo part1; tlo part2; \end{verbatim} \end{quote} The problem is, that a domain is an open domain. Thus, the domain {\it air} is not only the outer part, but also the interface between {\it part1} and {\it part2}. The result is unspecified. To fix this problem, one can define the {\it air}-domain by cutting out one big brick: \begin{quote} \begin{verbatim} solid air = cube and not othrobrick (0.2, 0.2, 0.2; 0.8, 0.8, 0.8); \end{verbatim} \end{quote} \subsection{Degenerated edges} Degenerated edges are found sometimes, but some still cause troubles. A sphere on top of a cylinder my be described by: \begin{quote} \begin{verbatim} solid cyl = cylinder (0, 0, 0; 1, 0, 0; 0.5) and plane (0, 0, 0; -1, 0, 0) and plane (1, 0, 0; 1, 0, 0); solid main = cyl or sphere (1, 0, 0; 0.5); tlo main; \end{verbatim} \end{quote} The edge is a degenerated one. A work-around is to split the domain (artificially) into two non-degenerated parts: \begin{quote} \begin{verbatim} solid cyl = cylinder (0, 0, 0; 1, 0, 0; 0.5) and plane (0, 0, 0; -1, 0, 0) and plane (1, 0, 0; 1, 0, 0); solid hemisphere = sphere (1, 0, 0; 0.5) and not plane (1, 0, 0; -1, 0, 0); tlo cyl; tlo hemisphere; \end{verbatim} \end{quote} \chapter{Other Geometry Formats} \section{Using IGES/STEP Geometries} % IGES and STEP are standard exchange formats for CAD files. Contrary to the STL format, IGES and STEP deliver an exact representation of the geometry and do not approximate it. In order to use IGES/STEP geometries you have to install NETGEN with the OpenCascade Geometry Kernel as described in \ref{subsec_occ}. Most solid modellers can export IGES or STEP files. However, often these files are not as exact as a mesher needs them to be. So is meshing fails, try repairing the model via {\bf IGES/STEP Topology Explorer/Doctor}. \section{Using STL Geometries} % STL is a standardized file format to describe (approximate) geometies by triangulated surfaces. It is useful to describe complicated parts which are modeled with some CAD programmes. Also, some users have written their own (C) programmes to define STL geometries, where was not so easy to use the CSG format. The syntac of STL files is as follos \begin{quote} (not available yet. please figure out the syntax from the examples) \end{quote} We found that many STL geometries have some difficulties. Some of them can be corrected (removed) by the {\bf STL - Doctor}. Please see the corresponding manual pages (not available yet). \section{2D Spline Geometry} % The extension for 2D spline geometry is ``.in2d''. The boundary is given in terms of straight lines and of quadratic rational spline patches. A line is given by the two endpoints, a spline patch by 3 d'Boor points. The patch is an elliptic arc from point 1 to point 3, such that the lines 1-2 and 2-3 are tangents. It is possible to use different subdomains with this format. This file format also supports a priori mesh grading. To the spline point i one adds a local refinement factor {\tt rp}$_i$ . Close to this point the mesh-size $h(x)$ is {\tt h}$_{Glob}$ / {\tt rp}$_i$ . The global parameter {\tt grading} describes how fast the mesh-size decreases. The gradient of the local mesh-size function $h(x)$ is bounded by $| \nabla_x h(x)| \leq \mbox{grading}^{-1}$ Also a refinement by a factor {\tt rs}$_i$ > 1 along the whole segment i is possible. The file looks like: % \begin{quote} \samepage \tt splinecurves2d \\ grading \\ np \\ x$_1$ y$_1$ rp$_1$ \\ ... \\ x$_{np}$ y$_{np}$ rp$_{np}$ \\ ns \\ dil$_1$ dir$_1$ [ 2 | 3 ] pi$_{1,1}$ pi$_{1,2}$ [ pi$_{1,3}$ ] rs$_1$ \\ ... \\ dil$_{nl}$ dir$_{nl}$ [ 2 | 3 ] pi$_{nl,1}$ pi$_{nl,2}$ [ pi$_{nl,3}$ ] rs$_{nl}$ \\ \end{quote} % {\tt np} is the number of points, {\tt ns} the number of spline segments. Every segment starts with the domain numbers at the left and at the right sides of the segment. Domain number 0 is reserved for the exterior. Then the number of points and two or three point indices follow. Finally, the refinement factor along the line follows. \chapter{Mesh and Solution Formats} You can export meshes to a couple of file formats. Some are self-defined, some other are standard formats. The self-defined are the followings: \section{Mesh Size File} By means of a mesh size file you can provide a local mesh size density. The file extension must be {\it .msz}. If you want to use the mesh size file, you specify it in the ``Meshing Options'', doalog box, page ``Mesh Size''. The syntay is: \begin{verbatim} np x1 y1 z1 h1 x2 y2 z2 h2 .... xnp ynp znp hnp nl xs1 ys1 zs1 xe1 ye1 ze1 h1 xs2 ys2 zs2 xe2 ye2 ze2 h2 .... xsnl ysnl zsnl xenl yenl zenl hnl \end{verbatim} You specify {\tt np} points, given by the $(x_i,y_i,z_i)$-coordinates, where the mesh size will be reduced at least to $h_i$. You specify also {\tt nl} line-segments by the start-point and end-point coordinates. The mesh-size along the whole line will be reduced to the given $h_i$. \section{Neutral Format} The neutral volume mesh format contains the following sections: \begin{enumerate} \item nodes \\ After the number of nodes there follows a list of $x$, $y$, and $z$-coordinates of the mesh-nodes. \item volume elements \\ After the number of volume elements there follows the list of tetrahedra. Each element is specified by the sub-domain number, and 4 node indices. The node indices start with 1. \item surface elements \\ After the number of surface elements there follows the list of triangles. Each element is specified by the boundary condition number, and 3 node indices. The node indices start with 1. \end{enumerate} \section{Fepp Format 2D} The Fepp 2D format contains the following sections: \begin{enumerate} \item boundary segmetns \\ After the number of boundary segments there follows a list of segments. Each segment is specified by the spline - patch number, and the two node indices. Counting starts with 1 \item domain elements \\ After the number of domain elements there follows the list of elements. Each element is specified by the sub-domain number, the number of nodes (3 or 4) and the node indices. Counting starts with 1 \item nodes \\ After the number of nodes there follows a list of $x$ and $y$ -coordinates of the mesh-nodes. \item geometric information \\ After the number of spline patches there follows a list of spline specifications. Each spline patch is given by the 6 coefficients of the describing quadratic polynomial equation $$ c_1 x^2 + c_2 y^2 + c_3 xy + c_4 x + c_5 y + c_6 = 0 $$ \end{enumerate} \section{Surface triangulaton file} One can export to and import from a surface mesh file. It´s structure is as follows: \begin{enumerate} \item {\tt surfacemesh} \\ starts with that keyword \item number of points \\ point coordinates $(x,y,z)$. \item number of surface triangles, \\ surface triangles oriented counter-clock wise when looking at the object, index starts from 1. \end{enumerate} \section{Solution File Format} The Netgen software includes also a simple visualizer for finite element gridfunctions. It supports scalar fields (e.g. temperature), and vector valued fields (flow velocities, mechanical deformations). The solution field is imported by the menu item File $->$ Import Solution. It is important to load the corresponding mesh in advance. The format of the solution file is as follows. It consists of an arbitrary number of blocks of this structure: \begin{enumerate} \item {\tt solution} {\it function-name} flags {\tt solution} is the keyword, {\it function-name} is a string to refer to that functions. The supported flags are \begin{enumerate} \item -size=s \\ number of entries (default: number of mesh-points) \item -components=c \\ number of components (default: 1). Mechanical deformations have 3 components. \item -type=[nodal,element,surfaceelement] \\ the grid-funciton has nodal values, or one value per volume element, or one value per surface element (default: nodal) \end{enumerate} \item block of $size \times components$ values \end{enumerate} Please try out to import the solution file 'tutorials/cube.sol' fitting to the mesh 'tutorials/cube.vol'. \chapter{Netgen operations} You can use netgen in interactive mode using its menus, or, you can run netgen in batch-mode using command line arguments. \section{Command line arguments} Command line arguments are specified as {\it -flag=value}. \begin{itemize} \item -help \newline Prints the available command line arguments \item -geofile=filename \newline Specifies geometry file. Is equivalent to {\it filename}, i.e., you can scip {\it -geofile=}. \item -meshfile=filename \newline Mesh file will be stored in file {\it filename}. \item -batchmode \newline Exit after mesh generation. Otherwise, the GUI will be started \item -V \newline Verbose mode. Prints some additional information \item -verycoarse, -coarse, -moderate, -fine, -veryfine \newline Mesh size control \end{itemize} \chapter{Using the Graphical User Interface} The Netgen main window looks like: \begin{center} \includegraphics[width=12cm]{pictures/screenshot} \end{center} It consists of the menuline and the button line at the top, the status line at the bottom, and the large drawing window. The menu items will be explained in \ref{sec_menuitems}. The button line provides shot-cuts for common opteration: \begin{itemize} \item Quit \newline Terminate Netgen \item Generate mesh \newline Performe mesh generation \item Stop Meshing \newline Stop mesh generation \item Geometry/Edges/Mesh/Solution \newline Switch between operation modes of visualization. \item Zoom all \newline Zooms such that the whole visualization scene fits into the window. \item Center \newline Center rotation and scaling at marked point, available only in mesh - visuailzation mode. \item Rotate/Move/Zoom Left mouse drag rotates/moves/zooms object. \end{itemize} The status line shows information, namely \begin{itemize} \item Points \newline Number of points in the mesh \item Elements \newline Number of volume elements (3D) in the mesh \item Surf Elements \newline Number of surface elements (3D) or inner elements (2d) in the mesh. \item Mem \newline Used memory in the large memory arena \item Meshing Job, percentage Douriing mesh generation, the current job as well as the progress is displayed on the right side of the statu line. \end{itemize} The drawing window displays the geometry or the mesh. The view can be changed with the mouse: \begin{itemize} \item drag with left button pressed rotates the object, \item drag with middle button pressed moves the object, \item drag with right button pressed zooms the object. \end{itemize} The view can also be changed with the keyboard: \begin{itemize} \item cursor keys rotate the object \item shift + cursor keys move the object \item control + cursor keys zoom the object \end{itemize} When in Mesh - visualization scene, double clicking on triangles mark the surface. The point cursor is set. \section{The Netgen menu items} \label{sec_menuitems} \subsection{The menu item {\em File}} \includegraphics[height=7.8cm]{pictures/menufile} \subsection{The menu item {\em Geometry}} \includegraphics[height=2.7cm]{pictures/menugeometry} \subsection{The menu item {\em Mesh}} \includegraphics[height=9.8cm]{pictures/menumesh} \subsection{The menu item {\em View}} \includegraphics[height=6.0cm]{pictures/menuview} \subsection{The menu item {\em Refinement}} \includegraphics[width=3.2cm]{pictures/menurefinement} \section{Meshing Options} \includegraphics[width=10cm]{pictures/meshingoptions_1} \includegraphics[width=10cm]{pictures/meshingoptions_2} \includegraphics[width=10cm]{pictures/meshingoptions_3} \includegraphics[width=10cm]{pictures/meshingoptions_4} \includegraphics[width=10cm]{pictures/meshingoptions_5} \includegraphics[width=10cm]{pictures/meshingoptions_6} \section{Visualization Options} % \chapter{The Algorithms of Netgen} % % Netgen follows a top down strategy. It starts from computing the % corner points (CSG only). Then, the edges are defined and meshed into % segments (CSG and STL). Next, the faces are meshed by an advancing front % surface mesh generator. After meshing, the faces meshes are optimized. % Finally, the individual sub-domains are filled with tets. Therefore, % a fast Delaunay algorithm generates most of the elements (about 98 percent). % But often it fails for mesh the whole domain, then the slower back-tracking % rule-base algorithm takes over. Finally, the volume is optimized by the % usual node - movement, element swapping and splitting algorithms. \chapter{Programming Interfaces} % \section{The nginterface} By means of the nginterface one's own simulation code can be included into the netgen environment. This is particular useful for FEM (FVM,BEM) code developers, since they may profit from the netgen preprocessing and postprocessing possibilities. Please download the example Netgen-add-on module {\it demoapp} and follow the instructions therein \section{The nglib} \subsection{Introduction} The NETGEN mesh generation library {\it nglib} is available in C++ source code and can be compiled for Unix/Linux as well as Win95/98/NT and linked to one library file. The interface to the application programme is by the C language header file {\it nglib.h}. The functionality of nglib is volume mesh generation by a domain given by a surface triangulation, and surface mesh generation from a domain described by an STL file (standard file format for geometries defined by triangle approximation). It can do mesh optimization as well as mesh refinement. It can generate 4 node tetrahedra and 10 node tetrahedrons (with quadratic shape functions). The local mesh size can be defined automatically by geometric features and/or by user specification. \subsection{The Header File} The interface file contains the following type definitions and function calls. All Netgen types and functions start with {\tt Ng}. Types and functions have capital initial letters, constants are in capital letters. \subsection{Types and Constants} \begin{verbatim} /// Data type for NETGEN mesh typedef void * Ng_Mesh; /// Data type for NETGEN STL geomty typedef void * Ng_STL_Geometry; // max number of nodes per element #define NG_VOLUME_ELEMENT_MAXPOINTS 10 // implemented element types: enum Ng_Volume_Element_Type { NG_TET = 1, NG_PYRAMID = 2, NG_PRISM = 3, NG_TET10 = 4 }; // max number of nodes per surface element #define NG_SURFACE_ELEMENT_MAXPOINTS 6 // implemented element types: enum Ng_Surface_Element_Type { NG_TRIG = 1, NG_QUAD = 2, NG_TRIG6 = 3 }; struct Ng_Meshing_Parameters { double maxh; double fineness; // 0 .. coarse, 1 .. fine int secondorder; }; enum Ng_Result { NG_OK = 0, NG_SURFACE_INPUT_ERROR = 1, NG_VOLUME_FAILURE = 2, NG_STL_INPUT_ERROR = 3, NG_SURFACE_FAILURE = 4 }; \end{verbatim} {\tt Ng\_Mesh} is a data type representing a Netgen mesh. {\tt Ng\_STL\_Geometry} represents an STL geometry. One can operate on these data structures by the functions defined below. Netgen can (now and/or in future) work with various element types defined by generic constants. Several parameters can be specified in the {\tt Ng\_Meshing\_Parameters} structure for volume and/or surface mesh generation. The result of Netgen functions is of type {\tt Ng\_Result}. \subsection{Initialization} Please call these functions before using netgen functions and after using netgen functions, respectively: \begin{verbatim} // initialize, deconstruct Netgen library: void Ng_Init (); void Ng_Exit (); \end{verbatim} \subsection{Mesh access} Netgen meshes can be processed by the means of the following functions. A mesh contains nodes, surface elements and volume elements. Counting starts from 1. \begin{verbatim} // Generates new mesh structure Ng_Mesh * Ng_NewMesh (); void Ng_DeleteMesh (Ng_Mesh * mesh); // feeds points, surface elements and volume elements to the mesh void Ng_AddPoint (Ng_Mesh * mesh, double * x); void Ng_AddSurfaceElement (Ng_Mesh * mesh, Ng_Surface_Element_Type et, int * pi); void Ng_AddVolumeElement (Ng_Mesh * mesh, Ng_Volume_Element_Type et, int * pi); // ask for number of points, surface and volume elements int Ng_GetNP (Ng_Mesh * mesh); int Ng_GetNSE (Ng_Mesh * mesh); int Ng_GetNE (Ng_Mesh * mesh); // return point coordinates void Ng_GetPoint (Ng_Mesh * mesh, int num, double * x); // return surface and volume element in pi Ng_Surface_Element_Type Ng_GetSurfaceElement (Ng_Mesh * mesh, int num, int * pi); Ng_Volume_Element_Type Ng_GetVolumeElement (Ng_Mesh * mesh, int num, int * pi); \end{verbatim} \subsubsection{Mesh Generation} The user can specify the mesh size function by the global parameter maximal mesh size, and can additionally restrict the mesh size in points or cubes. The function {\tt Ng\_GenerateVolumeMesh} generates the volume mesh starting from the surface. \begin{verbatim} // Defines MeshSize Functions void Ng_RestrictMeshSizeGlobal (Ng_Mesh * mesh, double h); void Ng_RestrictMeshSizePoint (Ng_Mesh * mesh, double * p, double h); void Ng_RestrictMeshSizeBox (Ng_Mesh * mesh, double * pmin, double * pmax, double h); // generates volume mesh from surface mesh Ng_Result Ng_GenerateVolumeMesh (Ng_Mesh * mesh, Ng_Meshing_Parameters * mp); \end{verbatim} \subsection{STL Geometry} A STL geometry can be read from a STL file (ASCII or binary), or can be assembled by providing triangle by triangle. Either, the user can specify the edges of the geometry, or netgen can define edges by {\tt Ng\_STL\_MakeEdges} by using an angle criterium. \begin{verbatim} // loads geometry from STL file Ng_STL_Geometry * Ng_STL_LoadGeometry (char * filename, int binary = 0); // generate new STL Geometry Ng_STL_Geometry * Ng_STL_NewGeometry (); // fills STL Geometry // positive orientation // normal vector may be null-pointer void Ng_STL_AddTriangle (Ng_STL_Geometry * geom, double * p1, double * p2, double * p3, double * nv); // add (optional) edges: void Ng_STL_AddEdge (Ng_STL_Geometry * geom, double * p1, double * p2); // after adding triangles (and edges) initialize Ng_Result Ng_STL_InitSTLGeometry (Ng_STL_Geometry * geom); // automatically generates edges: void Ng_STL_MakeEdges (Ng_STL_Geometry * geom); // generates mesh, empty mesh be already created. Ng_Result Ng_STL_GenerateSurfaceMesh (Ng_STL_Geometry * geom, Ng_Mesh * mesh, Ng_Meshing_Parameters * mp); \end{verbatim} \subsection{Programming Example} The File {\it ngcore.cc}, see Appendix A, is a simple application using the netgen volume mesh generator. First, the surface mesh is read from a file containing point coordinates and surface triangles (see e.g. file {\it cube.surf}). The volume mesh generate is called, and the volume mesh is written to the standard output, see file {\it cube.vol}. \end{document} netgen-6.2.1804/LICENSE0000644000175000017500000006347613272137567013032 0ustar kurtkurt GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! netgen-6.2.1804/tests/0000755000175000017500000000000013272137567013147 5ustar kurtkurtnetgen-6.2.1804/tests/pytest/0000755000175000017500000000000013272137567014477 5ustar kurtkurtnetgen-6.2.1804/tests/pytest/test_gui.py0000644000175000017500000000027013272137567016673 0ustar kurtkurtimport netgen import pytest def test_gui(): try: from tkinter import Tk win = Tk() except: pytest.skip("can't create a window") import netgen.gui netgen-6.2.1804/tests/pytest/test_savemesh.py0000644000175000017500000000310313272137567017720 0ustar kurtkurt from netgen.csg import * from netgen import meshing import filecmp import difflib from math import sqrt, cos, sin def CreateQuad(): base = Plane(Pnt(0,0,0),Vec(0,0,1)) surface = SplineSurface(base) pts = [(-0.2,-0.2,0),(-0.2,0.2,0),(0.2,0.2,0),(0.2,-0.2,0)] geopts = [surface.AddPoint(*p) for p in pts] for p1,p2,bc in [(0,1,"wire"), (1, 2,"contact"),(2,3,"wire"),(3,0,"wire")]: surface.AddSegment(geopts[p1],geopts[p2],bc) return surface Cross = lambda a,b: [a[1]*b[2]-a[2]*b[1],a[2]*b[0]-a[0]*b[2],a[0]*b[1]-b[0]*a[1]] def CreateGeo(): geo = CSGeometry() air = OrthoBrick(Pnt(-1,-1,-1),Pnt(1,1,1)) geo.Add(air.mat("air")) surface = CreateQuad() geo.AddSplineSurface(surface) return geo def test_BBNDsave(): mesh = CreateGeo().GenerateMesh(maxh=0.4,perfstepsend = meshing.MeshingStep.MESHSURFACE) for i in range(2): mesh.GenerateVolumeMesh(mp = MeshingParameters(only3D_domain=i+1,maxh=0.4)) mesh.SetGeometry(None) mesh.Save("test.vol") mesh2 = meshing.Mesh() mesh2.Load("test.vol") mesh2.Save("test2.vol") with open("test.vol","r") as f: first = f.readlines() with open("test2.vol","r") as f: second = f.readlines() # exclude the face colours section (because they aren't in the same order) for i,line in enumerate(first): if line[0:12] == "face_colours": first = first[0:i] second = second[0:i] break diff = difflib.context_diff(first,second) print("File diff:") l = list(diff) print(*l) assert len(l)==0 netgen-6.2.1804/tests/pytest/CMakeLists.txt0000644000175000017500000000037313272137567017242 0ustar kurtkurtif(USE_PYTHON) add_test(NAME pytest COMMAND ${PYTHON_EXECUTABLE} -m pytest WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) add_custom_target(pytest ${PYTHON_EXECUTABLE} -m pytest WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) endif(USE_PYTHON) netgen-6.2.1804/tests/build.sh0000755000175000017500000000014713272137567014607 0ustar kurtkurtcd mkdir -p build/netgen cd build/netgen cmake ../../src/netgen -DUSE_CCACHE=ON make -j12 make install netgen-6.2.1804/tests/CMakeLists.txt0000644000175000017500000000003113272137567015701 0ustar kurtkurtadd_subdirectory(pytest) netgen-6.2.1804/tests/docker_15.100000644000175000017500000000042313272137567015064 0ustar kurtkurtFROM ubuntu:15.10 MAINTAINER Matthias Hochsteger RUN apt-get update && apt-get -y install python3 libpython3-dev libxmu-dev tk-dev tcl-dev cmake git g++ libglu1-mesa-dev ccache python3-pytest python3-numpy python3-tk ADD . /root/src/netgen netgen-6.2.1804/tests/docker_16.040000644000175000017500000000042313272137567015070 0ustar kurtkurtFROM ubuntu:16.04 MAINTAINER Matthias Hochsteger RUN apt-get update && apt-get -y install python3 libpython3-dev libxmu-dev tk-dev tcl-dev cmake git g++ libglu1-mesa-dev ccache python3-pytest python3-numpy python3-tk ADD . /root/src/netgen netgen-6.2.1804/INSTALL0000644000175000017500000001547213272137567013047 0ustar kurtkurtBasic Installation ================== These are generic installation instructions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, a file `config.cache' that saves the results of its tests to speed up reconfiguring, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.in' is used to create `configure' by a program called `autoconf'. You only need `configure.in' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes a while. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Type `make install' to install the programs and any data files and documentation. 4. You can remove the program binaries and object files from the source code directory by typing `make clean'. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. You can give `configure' initial values for variables by setting them in the environment. Using a Bourne-compatible shell, you can do that on the command line like this: CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure Or on systems that have the `env' program, you can do it like this: env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports the `VPATH' variable, such as GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. If you have to use a `make' that does not supports the `VPATH' variable, you have to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' will install the package's files in `/usr/local/bin', `/usr/local/man', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PATH'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you give `configure' the option `--exec-prefix=PATH', the package will use PATH as the prefix for installing programs and libraries. Documentation and other data files will still use the regular prefix. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' can not figure out automatically, but needs to determine by the type of host the package will run on. Usually `configure' can figure that out, but if it prints a message saying it can not guess the host type, give it the `--host=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name with three fields: CPU-COMPANY-SYSTEM See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the host type. If you are building compiler tools for cross-compiling, you can also use the `--target=TYPE' option to select the type of system they will produce code for and the `--build=TYPE' option to select the type of system on which you are compiling the package. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Operation Controls ================== `configure' recognizes the following options to control how it operates. `--cache-file=FILE' Use and save the results of the tests in FILE instead of `./config.cache'. Set FILE to `/dev/null' to disable caching, for debugging `configure'. `--help' Print a summary of the options to `configure', and exit. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--version' Print the version of Autoconf used to generate the `configure' script, and exit. `configure' also accepts some other, not widely useful, options. netgen-6.2.1804/ng/0000755000175000017500000000000013272137567012411 5ustar kurtkurtnetgen-6.2.1804/ng/fonts.hpp0000644000175000017500000051322213272137567014260 0ustar kurtkurt#define font12_width 591 #define font12_height 12 static unsigned char font12_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA0, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x00, 0xA1, 0x28, 0x84, 0x44, 0x10, 0x88, 0x00, 0x00, 0x00, 0x00, 0x40, 0x0E, 0xE1, 0x38, 0xD0, 0xE7, 0x7C, 0x8E, 0x03, 0x00, 0x00, 0x00, 0x38, 0x8E, 0xF3, 0x38, 0xC7, 0xF7, 0x39, 0x91, 0xC3, 0x45, 0x41, 0x14, 0x39, 0x8F, 0xF3, 0x38, 0x5F, 0x14, 0x45, 0x51, 0xF4, 0x39, 0x82, 0xA3, 0x00, 0x00, 0x10, 0x00, 0x10, 0x80, 0x01, 0x01, 0x01, 0x09, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x60, 0x84, 0x51, 0x01, 0x00, 0x00, 0x00, 0xA1, 0x28, 0x4E, 0xA5, 0x10, 0x04, 0x01, 0x00, 0x00, 0x00, 0x40, 0x91, 0x11, 0x45, 0x58, 0x10, 0x40, 0x51, 0x04, 0x00, 0x10, 0x20, 0x44, 0x51, 0x14, 0x45, 0x49, 0x10, 0x44, 0x11, 0x81, 0x24, 0xC1, 0x16, 0x45, 0x51, 0x14, 0x45, 0x44, 0x14, 0x45, 0x51, 0x04, 0x09, 0x02, 0x12, 0x01, 0x00, 0x10, 0x00, 0x10, 0x40, 0x00, 0x01, 0x00, 0x08, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x10, 0x04, 0x92, 0x00, 0x00, 0x00, 0x00, 0x01, 0x7C, 0x95, 0xA2, 0x00, 0x02, 0xA2, 0x10, 0x00, 0x00, 0x20, 0x19, 0x11, 0x41, 0x54, 0x10, 0x40, 0x51, 0x44, 0x10, 0xC8, 0x47, 0x44, 0x59, 0x14, 0x05, 0x51, 0x10, 0x04, 0x11, 0x81, 0x14, 0x41, 0x35, 0x45, 0x51, 0x14, 0x05, 0x44, 0x14, 0x45, 0x8A, 0x82, 0x08, 0x04, 0x02, 0x00, 0x80, 0xF3, 0x38, 0x9E, 0xE3, 0x78, 0x8F, 0x81, 0x49, 0xC4, 0xF3, 0x38, 0x8F, 0xD7, 0x79, 0x4E, 0x14, 0x45, 0x51, 0xF4, 0x11, 0x04, 0x02, 0x00, 0x00, 0x00, 0x00, 0x01, 0x28, 0x05, 0x42, 0x00, 0x02, 0x42, 0x10, 0x00, 0x00, 0x20, 0x15, 0x01, 0x31, 0xD2, 0xF3, 0x20, 0x4E, 0x44, 0x10, 0x04, 0x80, 0x20, 0x55, 0xF4, 0x04, 0xD1, 0xF3, 0x04, 0x1F, 0x81, 0x0C, 0x41, 0x55, 0x45, 0x51, 0x14, 0x39, 0x44, 0xA4, 0x44, 0x84, 0x42, 0x08, 0x04, 0x02, 0x00, 0x00, 0x14, 0x45, 0x51, 0x44, 0x44, 0x11, 0x01, 0x29, 0x44, 0x15, 0x45, 0x51, 0x34, 0x04, 0x44, 0x14, 0x45, 0x4A, 0x84, 0x08, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x01, 0x28, 0x0E, 0x61, 0x01, 0x02, 0xF2, 0x7D, 0xC0, 0x07, 0x10, 0x13, 0x81, 0x40, 0x11, 0x14, 0x21, 0x91, 0x07, 0x00, 0x02, 0x00, 0x11, 0xD5, 0x17, 0x05, 0x51, 0x10, 0x74, 0x11, 0x81, 0x0C, 0x41, 0x94, 0x45, 0x4F, 0xF4, 0x40, 0x44, 0xA4, 0x54, 0x04, 0x21, 0x08, 0x08, 0x02, 0x00, 0x80, 0x17, 0x05, 0xD1, 0x47, 0x44, 0x11, 0x01, 0x19, 0x44, 0x15, 0x45, 0x51, 0x14, 0x38, 0x44, 0xA4, 0x54, 0x44, 0x44, 0x10, 0x04, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x14, 0x95, 0x00, 0x02, 0x42, 0x10, 0x00, 0x00, 0x10, 0x11, 0x41, 0x40, 0x1F, 0x14, 0x11, 0x11, 0x04, 0x00, 0xC4, 0x87, 0x00, 0x59, 0x14, 0x05, 0x51, 0x10, 0x44, 0x11, 0x91, 0x14, 0x41, 0x14, 0x45, 0x41, 0x54, 0x40, 0x44, 0xA4, 0x54, 0x0A, 0x11, 0x08, 0x08, 0x02, 0x00, 0x40, 0x14, 0x05, 0x51, 0x40, 0x44, 0x11, 0x01, 0x19, 0x44, 0x15, 0x45, 0x51, 0x14, 0x40, 0x44, 0xA4, 0x54, 0x44, 0x24, 0x10, 0x04, 0x02, 0x00, 0x00, 0x00, 0x00, 0x01, 0x28, 0x95, 0x9A, 0x00, 0x04, 0xA1, 0x10, 0x04, 0x40, 0x08, 0x11, 0x21, 0x44, 0x50, 0x14, 0x11, 0x11, 0x44, 0x10, 0x08, 0x40, 0x10, 0x41, 0x14, 0x45, 0x49, 0x10, 0x44, 0x11, 0x91, 0x24, 0x41, 0x14, 0x45, 0x41, 0x95, 0x44, 0x44, 0x44, 0x6C, 0x11, 0x11, 0x08, 0x10, 0x02, 0x00, 0x40, 0x14, 0x45, 0x51, 0x40, 0x44, 0x11, 0x01, 0x29, 0x44, 0x15, 0x45, 0x51, 0x14, 0x40, 0x44, 0x44, 0x54, 0x4A, 0x14, 0x10, 0x04, 0x02, 0x00, 0x00, 0x00, 0x00, 0x01, 0x28, 0x8E, 0x64, 0x01, 0x88, 0x00, 0x00, 0x04, 0x40, 0x08, 0x8E, 0xF3, 0x39, 0x90, 0xE3, 0x10, 0x8E, 0x43, 0x10, 0x10, 0x20, 0x10, 0x5E, 0xF4, 0x38, 0xC7, 0x17, 0x38, 0x91, 0x63, 0x44, 0x5F, 0x14, 0x39, 0x81, 0x13, 0x39, 0x84, 0x43, 0x44, 0x11, 0xF1, 0x39, 0x90, 0x03, 0x00, 0x80, 0xF7, 0x38, 0x9E, 0x47, 0x78, 0x91, 0x03, 0x49, 0x4E, 0x15, 0x39, 0x8F, 0x17, 0x3C, 0x98, 0x47, 0x38, 0x91, 0xF7, 0x61, 0x84, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x20, 0x01, 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; #define font14_width 789 #define font14_height 14 static unsigned char font14_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x00, 0x08, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xCE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x66, 0x36, 0x08, 0x66, 0x1C, 0x18, 0x30, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x3E, 0x18, 0x3E, 0x3E, 0x60, 0x7F, 0x3C, 0x7F, 0x3E, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x3E, 0x3E, 0x3F, 0x3E, 0x1F, 0x7F, 0x7F, 0x3E, 0x63, 0x3C, 0x78, 0x63, 0x03, 0x41, 0x63, 0x3E, 0x3F, 0x3E, 0x3F, 0x3E, 0xFF, 0x63, 0x63, 0x63, 0x63, 0xC3, 0x7F, 0x3C, 0x06, 0x3C, 0x3C, 0x00, 0x00, 0x00, 0x03, 0x00, 0x60, 0x00, 0x78, 0x00, 0x03, 0x18, 0x60, 0x03, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x18, 0x0E, 0xDB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x66, 0x36, 0x3E, 0x6B, 0x36, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x63, 0x1C, 0x63, 0x63, 0x70, 0x03, 0x06, 0x60, 0x63, 0x63, 0x00, 0x00, 0x60, 0x00, 0x06, 0x63, 0x63, 0x63, 0x63, 0x63, 0x33, 0x03, 0x03, 0x63, 0x63, 0x18, 0x30, 0x63, 0x03, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x18, 0x63, 0x63, 0x63, 0x63, 0xC3, 0x60, 0x0C, 0x06, 0x30, 0x66, 0x00, 0x00, 0x00, 0x03, 0x00, 0x60, 0x00, 0x0C, 0x00, 0x03, 0x18, 0x60, 0x03, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x18, 0x18, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x36, 0x6B, 0x36, 0x36, 0x00, 0x0C, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x63, 0x1E, 0x63, 0x63, 0x78, 0x03, 0x03, 0x60, 0x63, 0x63, 0x00, 0x00, 0x30, 0x00, 0x0C, 0x63, 0x73, 0x63, 0x63, 0x63, 0x63, 0x03, 0x03, 0x63, 0x63, 0x18, 0x30, 0x33, 0x03, 0x77, 0x63, 0x63, 0x63, 0x63, 0x63, 0x03, 0x18, 0x63, 0x63, 0x63, 0x36, 0x66, 0x60, 0x0C, 0x0C, 0x30, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x60, 0x00, 0x0C, 0x00, 0x03, 0x00, 0x00, 0x03, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x7F, 0x0B, 0x30, 0x1C, 0x00, 0x0C, 0x30, 0x36, 0x18, 0x00, 0x00, 0x00, 0x30, 0x73, 0x18, 0x60, 0x60, 0x6C, 0x03, 0x03, 0x30, 0x63, 0x63, 0x18, 0x18, 0x18, 0x7F, 0x18, 0x63, 0x6B, 0x63, 0x63, 0x03, 0x63, 0x03, 0x03, 0x03, 0x63, 0x18, 0x30, 0x1B, 0x03, 0x7F, 0x67, 0x63, 0x63, 0x63, 0x63, 0x03, 0x18, 0x63, 0x63, 0x63, 0x36, 0x66, 0x30, 0x0C, 0x0C, 0x30, 0x00, 0x00, 0x00, 0x3E, 0x3F, 0x3E, 0x7E, 0x3E, 0x3F, 0x7E, 0x3F, 0x1C, 0x70, 0x63, 0x18, 0x3F, 0x3F, 0x3E, 0x3F, 0x7E, 0x7B, 0x7E, 0x3F, 0x63, 0x63, 0x63, 0x63, 0x63, 0x7F, 0x0C, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x36, 0x0B, 0x18, 0x6E, 0x00, 0x0C, 0x30, 0x1C, 0x18, 0x00, 0x00, 0x00, 0x18, 0x7B, 0x18, 0x30, 0x3C, 0x66, 0x3F, 0x3F, 0x30, 0x3E, 0x63, 0x18, 0x18, 0x0C, 0x00, 0x30, 0x30, 0x6B, 0x63, 0x3F, 0x03, 0x63, 0x1F, 0x1F, 0x03, 0x7F, 0x18, 0x30, 0x0F, 0x03, 0x6B, 0x6F, 0x63, 0x63, 0x63, 0x63, 0x3E, 0x18, 0x63, 0x63, 0x63, 0x1C, 0x3C, 0x18, 0x0C, 0x18, 0x30, 0x00, 0x00, 0x00, 0x60, 0x63, 0x63, 0x63, 0x63, 0x0C, 0x63, 0x63, 0x18, 0x60, 0x33, 0x18, 0x6B, 0x63, 0x63, 0x63, 0x63, 0x0F, 0x03, 0x0C, 0x63, 0x63, 0x63, 0x63, 0x63, 0x30, 0x06, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x36, 0x3E, 0x18, 0x3B, 0x00, 0x0C, 0x30, 0x7F, 0x7E, 0x00, 0x7F, 0x00, 0x18, 0x6F, 0x18, 0x18, 0x60, 0x63, 0x60, 0x63, 0x18, 0x63, 0x7E, 0x00, 0x00, 0x06, 0x00, 0x60, 0x18, 0x6B, 0x7F, 0x63, 0x03, 0x63, 0x03, 0x03, 0x7B, 0x63, 0x18, 0x30, 0x0F, 0x03, 0x63, 0x7B, 0x63, 0x3F, 0x63, 0x3F, 0x60, 0x18, 0x63, 0x36, 0x6B, 0x1C, 0x18, 0x0C, 0x0C, 0x18, 0x30, 0x00, 0x00, 0x00, 0x7E, 0x63, 0x03, 0x63, 0x63, 0x0C, 0x63, 0x63, 0x18, 0x60, 0x1B, 0x18, 0x6B, 0x63, 0x63, 0x63, 0x63, 0x07, 0x03, 0x0C, 0x63, 0x63, 0x6B, 0x36, 0x63, 0x18, 0x0C, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x7F, 0x68, 0x0C, 0x33, 0x00, 0x0C, 0x30, 0x1C, 0x18, 0x00, 0x00, 0x00, 0x0C, 0x67, 0x18, 0x0C, 0x60, 0x7F, 0x60, 0x63, 0x18, 0x63, 0x60, 0x00, 0x00, 0x0C, 0x7F, 0x30, 0x18, 0x6B, 0x63, 0x63, 0x03, 0x63, 0x03, 0x03, 0x63, 0x63, 0x18, 0x30, 0x1B, 0x03, 0x63, 0x73, 0x63, 0x03, 0x63, 0x0F, 0x60, 0x18, 0x63, 0x36, 0x7F, 0x36, 0x18, 0x06, 0x0C, 0x30, 0x30, 0x00, 0x00, 0x00, 0x63, 0x63, 0x03, 0x63, 0x7F, 0x0C, 0x63, 0x63, 0x18, 0x60, 0x0F, 0x18, 0x6B, 0x63, 0x63, 0x63, 0x63, 0x03, 0x3E, 0x0C, 0x63, 0x36, 0x6B, 0x1C, 0x63, 0x0C, 0x0C, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x68, 0x6C, 0x33, 0x00, 0x0C, 0x30, 0x36, 0x18, 0x00, 0x00, 0x00, 0x0C, 0x63, 0x18, 0x06, 0x63, 0x60, 0x60, 0x63, 0x0C, 0x63, 0x60, 0x00, 0x00, 0x18, 0x00, 0x18, 0x00, 0x73, 0x63, 0x63, 0x63, 0x63, 0x03, 0x03, 0x63, 0x63, 0x18, 0x33, 0x33, 0x03, 0x63, 0x63, 0x63, 0x03, 0x63, 0x1B, 0x63, 0x18, 0x63, 0x36, 0x77, 0x36, 0x18, 0x03, 0x0C, 0x30, 0x30, 0x00, 0x00, 0x00, 0x63, 0x63, 0x03, 0x63, 0x03, 0x0C, 0x63, 0x63, 0x18, 0x60, 0x1B, 0x18, 0x6B, 0x63, 0x63, 0x63, 0x63, 0x03, 0x60, 0x0C, 0x63, 0x36, 0x6B, 0x36, 0x63, 0x06, 0x0C, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x36, 0x6B, 0xD6, 0x3B, 0x00, 0x18, 0x18, 0x00, 0x00, 0x18, 0x00, 0x18, 0x06, 0x63, 0x18, 0x03, 0x63, 0x60, 0x63, 0x63, 0x0C, 0x63, 0x30, 0x18, 0x18, 0x30, 0x00, 0x0C, 0x18, 0x03, 0x63, 0x63, 0x63, 0x33, 0x03, 0x03, 0x63, 0x63, 0x18, 0x33, 0x63, 0x03, 0x63, 0x63, 0x63, 0x03, 0x7B, 0x33, 0x63, 0x18, 0x63, 0x1C, 0x63, 0x63, 0x18, 0x03, 0x0C, 0x60, 0x30, 0x00, 0x00, 0x00, 0x63, 0x63, 0x63, 0x63, 0x03, 0x0C, 0x63, 0x63, 0x18, 0x60, 0x33, 0x18, 0x6B, 0x63, 0x63, 0x63, 0x63, 0x03, 0x60, 0x0C, 0x63, 0x1C, 0x6B, 0x63, 0x63, 0x03, 0x0C, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x36, 0x3E, 0x66, 0x6E, 0x00, 0x30, 0x0C, 0x00, 0x00, 0x18, 0x00, 0x18, 0x06, 0x3E, 0x7E, 0x7F, 0x3E, 0x60, 0x3E, 0x3E, 0x0C, 0x3E, 0x1E, 0x18, 0x18, 0x60, 0x00, 0x06, 0x18, 0x7E, 0x63, 0x3F, 0x3E, 0x1F, 0x7F, 0x03, 0x3E, 0x63, 0x3C, 0x1E, 0x63, 0x7F, 0x63, 0x63, 0x3E, 0x03, 0x3E, 0x63, 0x3E, 0x18, 0x3E, 0x1C, 0x41, 0x63, 0x18, 0x7F, 0x3C, 0x60, 0x3C, 0x00, 0x00, 0x00, 0x7E, 0x3F, 0x3E, 0x7E, 0x3E, 0x0C, 0x7E, 0x63, 0x3C, 0x66, 0x63, 0x3C, 0x6B, 0x63, 0x3E, 0x3F, 0x7E, 0x03, 0x3F, 0x78, 0x7E, 0x1C, 0x3E, 0x63, 0x7E, 0x7F, 0x38, 0x18, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; #define font16_width 789 #define font16_height 16 static unsigned char font16_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x00, 0x08, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xCE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x66, 0x36, 0x08, 0x66, 0x1C, 0x18, 0x30, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x3E, 0x18, 0x3E, 0x3E, 0x60, 0x7F, 0x3C, 0x7F, 0x3E, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x3E, 0x3E, 0x3F, 0x3E, 0x1F, 0x7F, 0x7F, 0x3E, 0x63, 0x3C, 0x78, 0x63, 0x03, 0x41, 0x63, 0x3E, 0x3F, 0x3E, 0x3F, 0x3E, 0xFF, 0x63, 0x63, 0x63, 0x63, 0xC3, 0x7F, 0x3C, 0x06, 0x3C, 0x3C, 0x00, 0x00, 0x00, 0x03, 0x00, 0x60, 0x00, 0x78, 0x00, 0x03, 0x18, 0x60, 0x03, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x18, 0x0E, 0xDB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x66, 0x36, 0x3E, 0x6B, 0x36, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x63, 0x1C, 0x63, 0x63, 0x70, 0x03, 0x06, 0x60, 0x63, 0x63, 0x00, 0x00, 0x60, 0x00, 0x06, 0x63, 0x63, 0x63, 0x63, 0x63, 0x33, 0x03, 0x03, 0x63, 0x63, 0x18, 0x30, 0x63, 0x03, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x18, 0x63, 0x63, 0x63, 0x63, 0xC3, 0x60, 0x0C, 0x06, 0x30, 0x66, 0x00, 0x00, 0x00, 0x03, 0x00, 0x60, 0x00, 0x0C, 0x00, 0x03, 0x18, 0x60, 0x03, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x18, 0x18, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x36, 0x6B, 0x36, 0x36, 0x00, 0x0C, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x63, 0x1E, 0x63, 0x63, 0x78, 0x03, 0x03, 0x60, 0x63, 0x63, 0x00, 0x00, 0x30, 0x00, 0x0C, 0x63, 0x73, 0x63, 0x63, 0x63, 0x63, 0x03, 0x03, 0x63, 0x63, 0x18, 0x30, 0x33, 0x03, 0x77, 0x63, 0x63, 0x63, 0x63, 0x63, 0x03, 0x18, 0x63, 0x63, 0x63, 0x36, 0x66, 0x60, 0x0C, 0x0C, 0x30, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x60, 0x00, 0x0C, 0x00, 0x03, 0x00, 0x00, 0x03, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x7F, 0x0B, 0x30, 0x1C, 0x00, 0x0C, 0x30, 0x36, 0x18, 0x00, 0x00, 0x00, 0x30, 0x73, 0x18, 0x60, 0x60, 0x6C, 0x03, 0x03, 0x30, 0x63, 0x63, 0x18, 0x18, 0x18, 0x7F, 0x18, 0x63, 0x6B, 0x63, 0x63, 0x03, 0x63, 0x03, 0x03, 0x03, 0x63, 0x18, 0x30, 0x1B, 0x03, 0x7F, 0x67, 0x63, 0x63, 0x63, 0x63, 0x03, 0x18, 0x63, 0x63, 0x63, 0x36, 0x66, 0x30, 0x0C, 0x0C, 0x30, 0x00, 0x00, 0x00, 0x3E, 0x3F, 0x3E, 0x7E, 0x3E, 0x3F, 0x7E, 0x3F, 0x1C, 0x70, 0x63, 0x18, 0x3F, 0x3F, 0x3E, 0x3F, 0x7E, 0x7B, 0x7E, 0x3F, 0x63, 0x63, 0x63, 0x63, 0x63, 0x7F, 0x0C, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x36, 0x0B, 0x18, 0x6E, 0x00, 0x0C, 0x30, 0x1C, 0x18, 0x00, 0x00, 0x00, 0x18, 0x7B, 0x18, 0x30, 0x3C, 0x66, 0x3F, 0x3F, 0x30, 0x3E, 0x63, 0x18, 0x18, 0x0C, 0x00, 0x30, 0x30, 0x6B, 0x63, 0x3F, 0x03, 0x63, 0x1F, 0x1F, 0x03, 0x7F, 0x18, 0x30, 0x0F, 0x03, 0x6B, 0x6F, 0x63, 0x63, 0x63, 0x63, 0x3E, 0x18, 0x63, 0x63, 0x63, 0x1C, 0x3C, 0x18, 0x0C, 0x18, 0x30, 0x00, 0x00, 0x00, 0x60, 0x63, 0x63, 0x63, 0x63, 0x0C, 0x63, 0x63, 0x18, 0x60, 0x33, 0x18, 0x6B, 0x63, 0x63, 0x63, 0x63, 0x0F, 0x03, 0x0C, 0x63, 0x63, 0x63, 0x63, 0x63, 0x30, 0x06, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x36, 0x3E, 0x18, 0x3B, 0x00, 0x0C, 0x30, 0x7F, 0x7E, 0x00, 0x7F, 0x00, 0x18, 0x6F, 0x18, 0x18, 0x60, 0x63, 0x60, 0x63, 0x18, 0x63, 0x7E, 0x00, 0x00, 0x06, 0x00, 0x60, 0x18, 0x6B, 0x7F, 0x63, 0x03, 0x63, 0x03, 0x03, 0x7B, 0x63, 0x18, 0x30, 0x0F, 0x03, 0x63, 0x7B, 0x63, 0x3F, 0x63, 0x3F, 0x60, 0x18, 0x63, 0x36, 0x6B, 0x1C, 0x18, 0x0C, 0x0C, 0x18, 0x30, 0x00, 0x00, 0x00, 0x7E, 0x63, 0x03, 0x63, 0x63, 0x0C, 0x63, 0x63, 0x18, 0x60, 0x1B, 0x18, 0x6B, 0x63, 0x63, 0x63, 0x63, 0x07, 0x03, 0x0C, 0x63, 0x63, 0x6B, 0x36, 0x63, 0x18, 0x0C, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x7F, 0x68, 0x0C, 0x33, 0x00, 0x0C, 0x30, 0x1C, 0x18, 0x00, 0x00, 0x00, 0x0C, 0x67, 0x18, 0x0C, 0x60, 0x7F, 0x60, 0x63, 0x18, 0x63, 0x60, 0x00, 0x00, 0x0C, 0x7F, 0x30, 0x18, 0x6B, 0x63, 0x63, 0x03, 0x63, 0x03, 0x03, 0x63, 0x63, 0x18, 0x30, 0x1B, 0x03, 0x63, 0x73, 0x63, 0x03, 0x63, 0x0F, 0x60, 0x18, 0x63, 0x36, 0x7F, 0x36, 0x18, 0x06, 0x0C, 0x30, 0x30, 0x00, 0x00, 0x00, 0x63, 0x63, 0x03, 0x63, 0x7F, 0x0C, 0x63, 0x63, 0x18, 0x60, 0x0F, 0x18, 0x6B, 0x63, 0x63, 0x63, 0x63, 0x03, 0x3E, 0x0C, 0x63, 0x36, 0x6B, 0x1C, 0x63, 0x0C, 0x0C, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x68, 0x6C, 0x33, 0x00, 0x0C, 0x30, 0x36, 0x18, 0x00, 0x00, 0x00, 0x0C, 0x63, 0x18, 0x06, 0x63, 0x60, 0x60, 0x63, 0x0C, 0x63, 0x60, 0x00, 0x00, 0x18, 0x00, 0x18, 0x00, 0x73, 0x63, 0x63, 0x63, 0x63, 0x03, 0x03, 0x63, 0x63, 0x18, 0x33, 0x33, 0x03, 0x63, 0x63, 0x63, 0x03, 0x63, 0x1B, 0x63, 0x18, 0x63, 0x36, 0x77, 0x36, 0x18, 0x03, 0x0C, 0x30, 0x30, 0x00, 0x00, 0x00, 0x63, 0x63, 0x03, 0x63, 0x03, 0x0C, 0x63, 0x63, 0x18, 0x60, 0x1B, 0x18, 0x6B, 0x63, 0x63, 0x63, 0x63, 0x03, 0x60, 0x0C, 0x63, 0x36, 0x6B, 0x36, 0x63, 0x06, 0x0C, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x36, 0x6B, 0xD6, 0x3B, 0x00, 0x18, 0x18, 0x00, 0x00, 0x18, 0x00, 0x18, 0x06, 0x63, 0x18, 0x03, 0x63, 0x60, 0x63, 0x63, 0x0C, 0x63, 0x30, 0x18, 0x18, 0x30, 0x00, 0x0C, 0x18, 0x03, 0x63, 0x63, 0x63, 0x33, 0x03, 0x03, 0x63, 0x63, 0x18, 0x33, 0x63, 0x03, 0x63, 0x63, 0x63, 0x03, 0x7B, 0x33, 0x63, 0x18, 0x63, 0x1C, 0x63, 0x63, 0x18, 0x03, 0x0C, 0x60, 0x30, 0x00, 0x00, 0x00, 0x63, 0x63, 0x63, 0x63, 0x03, 0x0C, 0x63, 0x63, 0x18, 0x60, 0x33, 0x18, 0x6B, 0x63, 0x63, 0x63, 0x63, 0x03, 0x60, 0x0C, 0x63, 0x1C, 0x6B, 0x63, 0x63, 0x03, 0x0C, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x36, 0x3E, 0x66, 0x6E, 0x00, 0x30, 0x0C, 0x00, 0x00, 0x18, 0x00, 0x18, 0x06, 0x3E, 0x7E, 0x7F, 0x3E, 0x60, 0x3E, 0x3E, 0x0C, 0x3E, 0x1E, 0x18, 0x18, 0x60, 0x00, 0x06, 0x18, 0x7E, 0x63, 0x3F, 0x3E, 0x1F, 0x7F, 0x03, 0x3E, 0x63, 0x3C, 0x1E, 0x63, 0x7F, 0x63, 0x63, 0x3E, 0x03, 0x3E, 0x63, 0x3E, 0x18, 0x3E, 0x1C, 0x41, 0x63, 0x18, 0x7F, 0x3C, 0x60, 0x3C, 0x00, 0x00, 0x00, 0x7E, 0x3F, 0x3E, 0x7E, 0x3E, 0x0C, 0x7E, 0x63, 0x3C, 0x60, 0x63, 0x3C, 0x6B, 0x63, 0x3E, 0x3F, 0x7E, 0x03, 0x3F, 0x78, 0x7E, 0x1C, 0x3E, 0x63, 0x7E, 0x7F, 0x38, 0x18, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; #define font18_width 987 #define font18_height 18 static unsigned char font18_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x0C, 0x00, 0x30, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x1B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xC0, 0x0C, 0x33, 0x30, 0x38, 0xC3, 0x03, 0x0C, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xFC, 0xC0, 0xC0, 0x0F, 0x3F, 0x80, 0xF9, 0x87, 0x8F, 0x7F, 0xFC, 0xF0, 0x03, 0x00, 0x00, 0xC0, 0x00, 0x60, 0x00, 0x1E, 0xFE, 0xF0, 0xE3, 0x0F, 0x3F, 0x7E, 0xF8, 0xE7, 0x1F, 0x3F, 0x86, 0xE1, 0x01, 0x9E, 0x61, 0x06, 0x04, 0x64, 0x18, 0x3F, 0xFE, 0xF0, 0xE3, 0x0F, 0x3F, 0xFE, 0x19, 0x66, 0xD8, 0x60, 0x86, 0x19, 0xE6, 0x1F, 0x1E, 0x06, 0xE0, 0xC1, 0x0C, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x80, 0x01, 0x00, 0x1E, 0x00, 0x06, 0xC0, 0x00, 0x8C, 0x01, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x30, 0x70, 0x60, 0x1B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xC0, 0x0C, 0x33, 0xFC, 0x28, 0x63, 0x06, 0x0C, 0x30, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x86, 0xE1, 0x60, 0x98, 0x61, 0xC0, 0x19, 0xC0, 0x80, 0x61, 0x86, 0x19, 0x06, 0x00, 0x00, 0x60, 0x00, 0xC0, 0x00, 0x33, 0x83, 0x19, 0x66, 0x98, 0x61, 0xC6, 0x18, 0x60, 0x80, 0x61, 0x86, 0xC1, 0x00, 0x8C, 0x61, 0x06, 0x0C, 0x66, 0x98, 0x61, 0x86, 0x19, 0x66, 0x98, 0x61, 0x30, 0x18, 0x66, 0xD8, 0x60, 0x86, 0x19, 0x06, 0x18, 0x06, 0x06, 0x80, 0x61, 0x18, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x80, 0x01, 0x00, 0x03, 0x00, 0x06, 0xC0, 0x00, 0x8C, 0x01, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x30, 0xC0, 0x60, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x33, 0xB6, 0xB9, 0x61, 0x06, 0x00, 0x30, 0xC0, 0x60, 0x0C, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x18, 0x86, 0xF1, 0x60, 0x98, 0x61, 0xE0, 0x19, 0x60, 0x80, 0x61, 0x86, 0x19, 0x06, 0x00, 0x00, 0x30, 0x00, 0x80, 0x81, 0x61, 0x83, 0x19, 0x66, 0x98, 0x61, 0x86, 0x19, 0x60, 0x80, 0x61, 0x86, 0xC1, 0x00, 0x8C, 0x31, 0x06, 0x1C, 0x67, 0x98, 0x61, 0x86, 0x19, 0x66, 0x98, 0x61, 0x30, 0x18, 0x66, 0xD8, 0x60, 0xCC, 0x18, 0x06, 0x18, 0x06, 0x0C, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x80, 0x01, 0x00, 0x03, 0x00, 0x06, 0x00, 0x00, 0x80, 0x01, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x30, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x80, 0x7F, 0x36, 0x80, 0x61, 0x06, 0x00, 0x18, 0x80, 0xC1, 0x06, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x18, 0xC6, 0xC1, 0x60, 0x18, 0x60, 0xB0, 0x19, 0x60, 0x00, 0x60, 0x86, 0x19, 0x06, 0x03, 0x0C, 0x18, 0xF8, 0x07, 0x83, 0x61, 0xF3, 0x19, 0x66, 0x98, 0x01, 0x86, 0x19, 0x60, 0x80, 0x01, 0x86, 0xC1, 0x00, 0x8C, 0x19, 0x06, 0xBC, 0xE7, 0x98, 0x61, 0x86, 0x19, 0x66, 0x98, 0x01, 0x30, 0x18, 0x66, 0xD8, 0x60, 0xCC, 0x30, 0x03, 0x0C, 0x06, 0x0C, 0x80, 0x01, 0x00, 0x00, 0x00, 0xF0, 0xE3, 0x0F, 0x3F, 0xFC, 0xF1, 0xC3, 0x0F, 0x7F, 0xFE, 0xE0, 0x00, 0x8E, 0x61, 0x30, 0xF8, 0xE3, 0x0F, 0x3F, 0xFE, 0xF0, 0x67, 0x1F, 0x3F, 0x7E, 0x18, 0x66, 0x98, 0x61, 0x86, 0x19, 0xE6, 0x1F, 0x0C, 0x30, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x33, 0x36, 0xC0, 0xC0, 0x03, 0x00, 0x18, 0x80, 0x81, 0x03, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xE6, 0xC1, 0x00, 0x18, 0x60, 0x98, 0x19, 0x60, 0x00, 0x30, 0x86, 0x19, 0x06, 0x03, 0x0C, 0x0C, 0x00, 0x00, 0x06, 0x60, 0x9B, 0x19, 0x66, 0x98, 0x01, 0x86, 0x19, 0x60, 0x80, 0x01, 0x86, 0xC1, 0x00, 0x8C, 0x0D, 0x06, 0xEC, 0xE6, 0x99, 0x61, 0x86, 0x19, 0x66, 0x98, 0x01, 0x30, 0x18, 0xC6, 0xCC, 0x60, 0x78, 0x30, 0x03, 0x06, 0x06, 0x18, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x66, 0x98, 0x61, 0x86, 0x19, 0x06, 0x83, 0x61, 0x86, 0xC1, 0x00, 0x8C, 0x31, 0x30, 0xD8, 0x66, 0x98, 0x61, 0x86, 0x19, 0xE6, 0x81, 0x61, 0x18, 0x18, 0x66, 0x98, 0x61, 0x86, 0x19, 0x06, 0x18, 0x0C, 0x30, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x33, 0x36, 0xC0, 0xC0, 0x19, 0x00, 0x18, 0x80, 0xF1, 0x9F, 0x7F, 0x00, 0xF8, 0x07, 0x00, 0x0C, 0xB6, 0xC1, 0x00, 0x0C, 0x3E, 0x8C, 0xF9, 0xE3, 0x0F, 0x30, 0xFC, 0x18, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x0C, 0x30, 0x9B, 0x19, 0xE6, 0x8F, 0x01, 0x86, 0xF9, 0xE1, 0x87, 0x01, 0xFE, 0xC1, 0x00, 0x8C, 0x07, 0x06, 0x4C, 0x66, 0x9B, 0x61, 0x86, 0x19, 0x66, 0x18, 0x3F, 0x30, 0x18, 0xC6, 0xCC, 0x60, 0x30, 0xE0, 0x01, 0x03, 0x06, 0x18, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x66, 0x98, 0x01, 0x86, 0x19, 0x06, 0x83, 0x61, 0x86, 0xC1, 0x00, 0x8C, 0x19, 0x30, 0xD8, 0x66, 0x98, 0x61, 0x86, 0x19, 0xE6, 0x80, 0x01, 0x18, 0x18, 0x66, 0x98, 0x61, 0xCC, 0x18, 0x06, 0x0C, 0x07, 0x30, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x33, 0xFC, 0x60, 0x60, 0x1B, 0x00, 0x18, 0x80, 0x81, 0x03, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x06, 0x9E, 0xC1, 0x00, 0x06, 0x60, 0x86, 0x01, 0x66, 0x18, 0x18, 0x86, 0xF1, 0x07, 0x00, 0x00, 0x06, 0x00, 0x00, 0x0C, 0x18, 0x9B, 0xF9, 0x67, 0x98, 0x01, 0x86, 0x19, 0x60, 0x80, 0x79, 0x86, 0xC1, 0x00, 0x8C, 0x07, 0x06, 0x0C, 0x66, 0x9E, 0x61, 0xFE, 0x18, 0xE6, 0x0F, 0x60, 0x30, 0x18, 0xC6, 0xCC, 0x64, 0x30, 0xC0, 0x80, 0x01, 0x06, 0x30, 0x80, 0x01, 0x00, 0x00, 0x00, 0xF0, 0x67, 0x98, 0x01, 0x86, 0x19, 0x06, 0x83, 0x61, 0x86, 0xC1, 0x00, 0x8C, 0x0D, 0x30, 0xD8, 0x66, 0x98, 0x61, 0x86, 0x19, 0x66, 0x80, 0x01, 0x18, 0x18, 0xC6, 0x8C, 0x6D, 0x78, 0x18, 0x06, 0x06, 0x0C, 0x30, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x33, 0xB0, 0x61, 0x30, 0x0E, 0x00, 0x18, 0x80, 0xC1, 0x06, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x06, 0x8E, 0xC1, 0x00, 0x03, 0x60, 0x86, 0x01, 0x66, 0x18, 0x18, 0x86, 0x01, 0x06, 0x00, 0x00, 0x0C, 0xF8, 0x07, 0x06, 0x0C, 0x9B, 0x19, 0x66, 0x98, 0x01, 0x86, 0x19, 0x60, 0x80, 0x61, 0x86, 0xC1, 0x00, 0x8C, 0x0D, 0x06, 0x0C, 0x66, 0x9C, 0x61, 0x06, 0x18, 0xE6, 0x01, 0x60, 0x30, 0x18, 0xC6, 0xCC, 0x6E, 0x78, 0xC0, 0xC0, 0x00, 0x06, 0x30, 0x80, 0x01, 0x00, 0x00, 0x00, 0x18, 0x66, 0x98, 0x01, 0x86, 0xF9, 0x07, 0x83, 0x61, 0x86, 0xC1, 0x00, 0x8C, 0x07, 0x30, 0xD8, 0x66, 0x98, 0x61, 0x86, 0x19, 0x66, 0x00, 0x3F, 0x18, 0x18, 0xC6, 0x8C, 0x6D, 0x30, 0x18, 0x06, 0x03, 0x0C, 0x30, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x7F, 0xB0, 0x31, 0x30, 0x0C, 0x00, 0x18, 0x80, 0x61, 0x0C, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x03, 0x86, 0xC1, 0x80, 0x01, 0x60, 0xFE, 0x01, 0x66, 0x18, 0x0C, 0x86, 0x01, 0x06, 0x00, 0x00, 0x18, 0x00, 0x00, 0x03, 0x0C, 0xF3, 0x19, 0x66, 0x98, 0x01, 0x86, 0x19, 0x60, 0x80, 0x61, 0x86, 0xC1, 0x60, 0x8C, 0x19, 0x06, 0x0C, 0x66, 0x98, 0x61, 0x06, 0x18, 0x66, 0x03, 0x60, 0x30, 0x18, 0x86, 0xC7, 0x7B, 0xCC, 0xC0, 0x60, 0x00, 0x06, 0x60, 0x80, 0x01, 0x00, 0x00, 0x00, 0x18, 0x66, 0x98, 0x01, 0x86, 0x19, 0x00, 0x83, 0x61, 0x86, 0xC1, 0x00, 0x8C, 0x0D, 0x30, 0xD8, 0x66, 0x98, 0x61, 0x86, 0x19, 0x66, 0x00, 0x60, 0x18, 0x18, 0xC6, 0x8C, 0x6D, 0x78, 0x18, 0x86, 0x01, 0x0C, 0x30, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0xB0, 0xB1, 0x33, 0x0C, 0x00, 0x30, 0xC0, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x03, 0x86, 0xC1, 0xC0, 0x80, 0x61, 0x80, 0x19, 0x66, 0x18, 0x0C, 0x86, 0x01, 0x06, 0x03, 0x0C, 0x30, 0x00, 0x80, 0x01, 0x00, 0x03, 0x18, 0x66, 0x98, 0x61, 0x86, 0x19, 0x60, 0x80, 0x61, 0x86, 0xC1, 0x60, 0x8C, 0x31, 0x06, 0x0C, 0x66, 0x98, 0x61, 0x06, 0x18, 0x66, 0x86, 0x61, 0x30, 0x18, 0x86, 0xC7, 0x71, 0xCC, 0xC0, 0x60, 0x00, 0x06, 0x60, 0x80, 0x01, 0x00, 0x00, 0x00, 0x18, 0x66, 0x98, 0x01, 0x86, 0x19, 0x00, 0x83, 0x61, 0x86, 0xC1, 0x00, 0x8C, 0x19, 0x30, 0xD8, 0x66, 0x98, 0x61, 0x86, 0x19, 0x66, 0x00, 0x60, 0x18, 0x18, 0x86, 0x87, 0x6D, 0xCC, 0x18, 0xC6, 0x00, 0x0C, 0x30, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x33, 0xB6, 0x99, 0x62, 0x1E, 0x00, 0x30, 0xC0, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x83, 0x01, 0x86, 0xC1, 0x60, 0x80, 0x61, 0x80, 0x19, 0x66, 0x18, 0x0C, 0x86, 0x01, 0x03, 0x03, 0x0C, 0x60, 0x00, 0xC0, 0x00, 0x0C, 0x03, 0x18, 0x66, 0x98, 0x61, 0xC6, 0x18, 0x60, 0x80, 0x61, 0x86, 0xC1, 0x60, 0x8C, 0x61, 0x06, 0x0C, 0x66, 0x98, 0x61, 0x06, 0x98, 0x67, 0x8C, 0x61, 0x30, 0x18, 0x06, 0xC3, 0x60, 0x86, 0xC1, 0x60, 0x00, 0x06, 0xC0, 0x80, 0x01, 0x00, 0x00, 0x00, 0x18, 0x66, 0x98, 0x61, 0x86, 0x19, 0x06, 0x83, 0x61, 0x86, 0xC1, 0x00, 0x8C, 0x31, 0x30, 0xD8, 0x66, 0x98, 0x61, 0x86, 0x19, 0x66, 0x80, 0x61, 0x18, 0x18, 0x06, 0x83, 0x6D, 0x86, 0x19, 0x66, 0x00, 0x0C, 0x30, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x33, 0xFC, 0x98, 0xC3, 0x1B, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x83, 0x01, 0xFC, 0xF0, 0xE3, 0x1F, 0x3F, 0x80, 0xF1, 0xC3, 0x0F, 0x0C, 0xFC, 0xF0, 0x01, 0x00, 0x0C, 0xC0, 0x00, 0x60, 0x00, 0x0C, 0xFE, 0x19, 0xE6, 0x0F, 0x3F, 0x7E, 0xF8, 0x67, 0x00, 0x3F, 0x86, 0xE1, 0xC1, 0x87, 0x61, 0xFE, 0x0D, 0x66, 0x18, 0x3F, 0x06, 0xF0, 0x63, 0x18, 0x3F, 0x30, 0xF0, 0x03, 0x43, 0x40, 0x86, 0xC1, 0xE0, 0x1F, 0x1E, 0xC0, 0xE0, 0x01, 0x00, 0x00, 0x00, 0xF0, 0xE7, 0x0F, 0x3F, 0xFC, 0xF1, 0x03, 0x03, 0x7F, 0x86, 0xE1, 0x01, 0x8C, 0x61, 0x78, 0xD8, 0x66, 0x18, 0x3F, 0xFE, 0xF0, 0x67, 0x00, 0x3F, 0xF0, 0xF0, 0x07, 0x03, 0x3F, 0x86, 0xF1, 0xE7, 0x1F, 0x38, 0x30, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0xC0, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0xC0, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; #define font20_width 987 #define font20_height 20 static unsigned char font20_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x0C, 0x00, 0x30, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x1B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xC0, 0x0C, 0x33, 0x30, 0x00, 0xC0, 0x03, 0x0C, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0xC0, 0xC0, 0x0F, 0x3F, 0x80, 0xF9, 0x87, 0x8F, 0x7F, 0xFC, 0xF0, 0x03, 0x00, 0x00, 0x80, 0x01, 0x60, 0x00, 0x1E, 0xFE, 0xF0, 0xE3, 0x0F, 0x3F, 0x7E, 0xF8, 0xE7, 0x1F, 0x3F, 0x86, 0xE1, 0x01, 0x9E, 0x61, 0x06, 0x04, 0x64, 0x18, 0x3F, 0xFE, 0xF0, 0xE3, 0x0F, 0x3F, 0xFE, 0x19, 0x66, 0xD8, 0x60, 0x86, 0x19, 0xE6, 0x1F, 0x1E, 0x00, 0xE0, 0xC1, 0x0C, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x80, 0x01, 0x00, 0x1E, 0x00, 0x06, 0xC0, 0x00, 0x8C, 0x01, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x30, 0x70, 0x60, 0x1B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xC0, 0x0C, 0x33, 0xFC, 0x38, 0x63, 0x06, 0x0C, 0x30, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x86, 0xE1, 0x60, 0x98, 0x61, 0xC0, 0x19, 0xC0, 0x80, 0x61, 0x86, 0x19, 0x06, 0x00, 0x00, 0xC0, 0x00, 0xC0, 0x00, 0x33, 0x83, 0x19, 0x66, 0x98, 0x61, 0xC6, 0x18, 0x60, 0x80, 0x61, 0x86, 0xC1, 0x00, 0x8C, 0x61, 0x06, 0x0C, 0x66, 0x98, 0x61, 0x86, 0x19, 0x66, 0x98, 0x61, 0x30, 0x18, 0x66, 0xD8, 0x60, 0x86, 0x19, 0x06, 0x18, 0x06, 0x06, 0x80, 0x61, 0x18, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x80, 0x01, 0x00, 0x03, 0x00, 0x06, 0xC0, 0x00, 0x8C, 0x01, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x30, 0xC0, 0x60, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x33, 0xB6, 0x29, 0x63, 0x06, 0x00, 0x30, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x86, 0xF1, 0x60, 0x98, 0x61, 0xE0, 0x19, 0x60, 0x80, 0x61, 0x86, 0x19, 0x06, 0x00, 0x00, 0x60, 0x00, 0x80, 0x81, 0x61, 0x83, 0x19, 0x66, 0x98, 0x61, 0x86, 0x19, 0x60, 0x80, 0x61, 0x86, 0xC1, 0x00, 0x8C, 0x31, 0x06, 0x1C, 0x67, 0x98, 0x61, 0x86, 0x19, 0x66, 0x98, 0x61, 0x30, 0x18, 0x66, 0xD8, 0x60, 0x86, 0x19, 0x06, 0x18, 0x06, 0x06, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x80, 0x01, 0x00, 0x03, 0x00, 0x06, 0x00, 0x00, 0x80, 0x01, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x30, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x33, 0x36, 0xB8, 0x61, 0x06, 0x00, 0x18, 0x80, 0x61, 0x0C, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x18, 0x86, 0xC1, 0x60, 0x18, 0x60, 0xB0, 0x19, 0x60, 0x00, 0x60, 0x86, 0x19, 0x06, 0x00, 0x00, 0x30, 0x00, 0x00, 0x83, 0x61, 0xF3, 0x19, 0x66, 0x98, 0x01, 0x86, 0x19, 0x60, 0x80, 0x01, 0x86, 0xC1, 0x00, 0x8C, 0x19, 0x06, 0xBC, 0x67, 0x98, 0x61, 0x86, 0x19, 0x66, 0x98, 0x01, 0x30, 0x18, 0x66, 0xD8, 0x60, 0xCC, 0x30, 0x03, 0x18, 0x06, 0x0C, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x80, 0x01, 0x00, 0x03, 0x00, 0x06, 0x00, 0x00, 0x80, 0x01, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x30, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x80, 0x7F, 0x36, 0x80, 0xC1, 0x03, 0x00, 0x18, 0x80, 0xC1, 0x06, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x18, 0xC6, 0xC1, 0x00, 0x18, 0x60, 0x98, 0x19, 0x60, 0x00, 0x30, 0x86, 0x19, 0x06, 0x03, 0x0C, 0x18, 0xF8, 0x07, 0x06, 0x60, 0x9B, 0x19, 0x66, 0x98, 0x01, 0x86, 0x19, 0x60, 0x80, 0x01, 0x86, 0xC1, 0x00, 0x8C, 0x0D, 0x06, 0xEC, 0xE6, 0x98, 0x61, 0x86, 0x19, 0x66, 0x98, 0x01, 0x30, 0x18, 0x66, 0xD8, 0x60, 0xCC, 0x30, 0x03, 0x0C, 0x06, 0x0C, 0x80, 0x01, 0x00, 0x00, 0x00, 0xF0, 0xE3, 0x0F, 0x3F, 0xFC, 0xF1, 0xC3, 0x0F, 0x7F, 0xFE, 0xE0, 0x00, 0x8E, 0x61, 0x30, 0xF8, 0xE3, 0x0F, 0x3F, 0xFE, 0xF0, 0x67, 0x1F, 0x3F, 0x7E, 0x18, 0x66, 0x98, 0x61, 0x86, 0x19, 0xE6, 0x1F, 0x0C, 0x30, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x33, 0x36, 0xC0, 0x80, 0x01, 0x00, 0x18, 0x80, 0x81, 0x03, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xE6, 0xC1, 0x00, 0x18, 0x60, 0x8C, 0xF9, 0xE3, 0x0F, 0x30, 0x86, 0x19, 0x06, 0x03, 0x0C, 0x0C, 0x00, 0x00, 0x0C, 0x30, 0x9B, 0x19, 0xE6, 0x8F, 0x01, 0x86, 0x19, 0x60, 0x80, 0x01, 0x86, 0xC1, 0x00, 0x8C, 0x07, 0x06, 0x4C, 0xE6, 0x99, 0x61, 0x86, 0x19, 0x66, 0x98, 0x01, 0x30, 0x18, 0xC6, 0xCC, 0x60, 0x78, 0x30, 0x03, 0x06, 0x06, 0x18, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x66, 0x98, 0x61, 0x86, 0x19, 0x06, 0x83, 0x61, 0x86, 0xC1, 0x00, 0x8C, 0x31, 0x30, 0xD8, 0x66, 0x98, 0x61, 0x86, 0x19, 0xE6, 0x81, 0x61, 0x18, 0x18, 0x66, 0x98, 0x61, 0x86, 0x19, 0x06, 0x18, 0x0C, 0x30, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x33, 0xFC, 0xC0, 0xC0, 0x19, 0x00, 0x18, 0x80, 0xF1, 0x9F, 0x7F, 0x00, 0xF8, 0x07, 0x00, 0x0C, 0xB6, 0xC1, 0x00, 0x0C, 0x3E, 0x86, 0x01, 0x66, 0x18, 0x18, 0xFC, 0x18, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x18, 0x18, 0x9B, 0xF9, 0x67, 0x98, 0x01, 0x86, 0xF9, 0xE1, 0x87, 0x79, 0xFE, 0xC1, 0x00, 0x8C, 0x03, 0x06, 0x0C, 0x66, 0x9B, 0x61, 0xFE, 0x18, 0xE6, 0x0F, 0x3F, 0x30, 0x18, 0xC6, 0xCC, 0x60, 0x30, 0xE0, 0x01, 0x03, 0x06, 0x18, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x66, 0x98, 0x01, 0x86, 0x19, 0x06, 0x83, 0x61, 0x86, 0xC1, 0x00, 0x8C, 0x19, 0x30, 0xD8, 0x66, 0x98, 0x61, 0x86, 0x19, 0xE6, 0x80, 0x01, 0x18, 0x18, 0x66, 0x98, 0x61, 0xCC, 0x18, 0x06, 0x0C, 0x07, 0x30, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x33, 0xB0, 0x61, 0x60, 0x1B, 0x00, 0x18, 0x80, 0x81, 0x03, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x06, 0x9E, 0xC1, 0x00, 0x06, 0x60, 0x86, 0x01, 0x66, 0x18, 0x18, 0x86, 0xF1, 0x07, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x0C, 0x0C, 0x9B, 0x19, 0x66, 0x98, 0x01, 0x86, 0x19, 0x60, 0x80, 0x61, 0x86, 0xC1, 0x00, 0x8C, 0x07, 0x06, 0x0C, 0x66, 0x9E, 0x61, 0x06, 0x18, 0xE6, 0x01, 0x60, 0x30, 0x18, 0xC6, 0xCC, 0x64, 0x78, 0xC0, 0x80, 0x01, 0x06, 0x30, 0x80, 0x01, 0x00, 0x00, 0x00, 0xF0, 0x67, 0x98, 0x01, 0x86, 0x19, 0x06, 0x83, 0x61, 0x86, 0xC1, 0x00, 0x8C, 0x0D, 0x30, 0xD8, 0x66, 0x98, 0x61, 0x86, 0x19, 0x66, 0x80, 0x01, 0x18, 0x18, 0xC6, 0x8C, 0x6D, 0x78, 0x18, 0x06, 0x06, 0x0C, 0x30, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x80, 0x7F, 0xB0, 0x61, 0x30, 0x0E, 0x00, 0x18, 0x80, 0xC1, 0x06, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x06, 0x8E, 0xC1, 0x00, 0x03, 0x60, 0x86, 0x01, 0x66, 0x18, 0x0C, 0x86, 0x01, 0x06, 0x00, 0x00, 0x18, 0xF8, 0x07, 0x06, 0x0C, 0x9B, 0x19, 0x66, 0x98, 0x01, 0x86, 0x19, 0x60, 0x80, 0x61, 0x86, 0xC1, 0x00, 0x8C, 0x0D, 0x06, 0x0C, 0x66, 0x9C, 0x61, 0x06, 0x18, 0x66, 0x03, 0x60, 0x30, 0x18, 0xC6, 0xCC, 0x6E, 0xCC, 0xC0, 0xC0, 0x00, 0x06, 0x30, 0x80, 0x01, 0x00, 0x00, 0x00, 0x18, 0x66, 0x98, 0x01, 0x86, 0xF9, 0x07, 0x83, 0x61, 0x86, 0xC1, 0x00, 0x8C, 0x07, 0x30, 0xD8, 0x66, 0x98, 0x61, 0x86, 0x19, 0x66, 0x00, 0x3F, 0x18, 0x18, 0xC6, 0x8C, 0x6D, 0x30, 0x18, 0x06, 0x03, 0x0C, 0x30, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0xB0, 0x31, 0x30, 0x0C, 0x00, 0x18, 0x80, 0x61, 0x0C, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x03, 0x86, 0xC1, 0x80, 0x01, 0x60, 0xFE, 0x01, 0x66, 0x18, 0x0C, 0x86, 0x01, 0x06, 0x00, 0x00, 0x30, 0x00, 0x00, 0x03, 0x00, 0xF3, 0x19, 0x66, 0x98, 0x01, 0x86, 0x19, 0x60, 0x80, 0x61, 0x86, 0xC1, 0x60, 0x8C, 0x19, 0x06, 0x0C, 0x66, 0x98, 0x61, 0x06, 0x18, 0x66, 0x06, 0x60, 0x30, 0x18, 0x86, 0xC7, 0x7B, 0xCC, 0xC0, 0x60, 0x00, 0x06, 0x60, 0x80, 0x01, 0x00, 0x00, 0x00, 0x18, 0x66, 0x98, 0x01, 0x86, 0x19, 0x00, 0x83, 0x61, 0x86, 0xC1, 0x00, 0x8C, 0x0D, 0x30, 0xD8, 0x66, 0x98, 0x61, 0x86, 0x19, 0x66, 0x00, 0x60, 0x18, 0x18, 0xC6, 0x8C, 0x6D, 0x78, 0x18, 0x86, 0x01, 0x0C, 0x30, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0xB6, 0xB1, 0x33, 0x0C, 0x00, 0x30, 0xC0, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x03, 0x86, 0xC1, 0xC0, 0x80, 0x61, 0x80, 0x19, 0x66, 0x18, 0x0C, 0x86, 0x01, 0x06, 0x03, 0x0C, 0x60, 0x00, 0x80, 0x01, 0x00, 0x03, 0x18, 0x66, 0x98, 0x61, 0x86, 0x19, 0x60, 0x80, 0x61, 0x86, 0xC1, 0x60, 0x8C, 0x31, 0x06, 0x0C, 0x66, 0x98, 0x61, 0x06, 0x18, 0x66, 0x8C, 0x61, 0x30, 0x18, 0x86, 0xC7, 0x71, 0x86, 0xC1, 0x60, 0x00, 0x06, 0x60, 0x80, 0x01, 0x00, 0x00, 0x00, 0x18, 0x66, 0x98, 0x01, 0x86, 0x19, 0x00, 0x83, 0x61, 0x86, 0xC1, 0x00, 0x8C, 0x19, 0x30, 0xD8, 0x66, 0x98, 0x61, 0x86, 0x19, 0x66, 0x00, 0x60, 0x18, 0x18, 0x86, 0x87, 0x6D, 0xCC, 0x18, 0xC6, 0x00, 0x0C, 0x30, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x33, 0xFC, 0x98, 0x62, 0x1E, 0x00, 0x30, 0xC0, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x83, 0x01, 0x86, 0xC1, 0x60, 0x80, 0x61, 0x80, 0x19, 0x66, 0x18, 0x0C, 0x86, 0x01, 0x03, 0x03, 0x0C, 0xC0, 0x00, 0xC0, 0x00, 0x0C, 0x03, 0x18, 0x66, 0x98, 0x61, 0xC6, 0x18, 0x60, 0x80, 0x61, 0x86, 0xC1, 0x60, 0x8C, 0x61, 0x06, 0x0C, 0x66, 0x98, 0x61, 0x06, 0x98, 0x67, 0x98, 0x61, 0x30, 0x18, 0x06, 0xC3, 0x60, 0x86, 0xC1, 0x60, 0x00, 0x06, 0xC0, 0x80, 0x01, 0x00, 0x00, 0x00, 0x18, 0x66, 0x98, 0x61, 0x86, 0x19, 0x06, 0x83, 0x61, 0x86, 0xC1, 0x00, 0x8C, 0x31, 0x30, 0xD8, 0x66, 0x98, 0x61, 0x86, 0x19, 0x66, 0x80, 0x61, 0x18, 0x18, 0x06, 0x83, 0x6D, 0x86, 0x19, 0x66, 0x00, 0x0C, 0x30, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x33, 0x30, 0x98, 0xC3, 0x1B, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x83, 0x01, 0xFC, 0xF0, 0xE3, 0x1F, 0x3F, 0x80, 0xF1, 0xC3, 0x0F, 0x0C, 0xFC, 0xF0, 0x01, 0x00, 0x0C, 0x80, 0x01, 0x60, 0x00, 0x0C, 0xFE, 0x19, 0xE6, 0x0F, 0x3F, 0x7E, 0xF8, 0x67, 0x00, 0x3F, 0x86, 0xE1, 0xC1, 0x87, 0x61, 0xFE, 0x0D, 0x66, 0x18, 0x3F, 0x06, 0xF0, 0x63, 0x18, 0x3F, 0x30, 0xF0, 0x03, 0x43, 0x40, 0x86, 0xC1, 0xE0, 0x1F, 0x1E, 0xC0, 0xE0, 0x01, 0x00, 0x00, 0x00, 0xF0, 0xE7, 0x0F, 0x3F, 0xFC, 0xF1, 0x03, 0x03, 0x7F, 0x86, 0xE1, 0x01, 0x8C, 0x61, 0x78, 0xD8, 0x66, 0x18, 0x3F, 0xFE, 0xF0, 0x67, 0x00, 0x3F, 0xF0, 0xF0, 0x07, 0x03, 0x3F, 0x86, 0xF1, 0xE7, 0x1F, 0x38, 0x30, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0xC0, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0xC0, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; #define font22_width 1086 #define font22_height 22 static unsigned char font22_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD8, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x33, 0x98, 0x01, 0x03, 0xC7, 0xF0, 0x01, 0x06, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xF8, 0x00, 0x03, 0x3E, 0xF0, 0x01, 0x30, 0xFF, 0xE1, 0xC7, 0x7F, 0xF8, 0xC0, 0x07, 0x00, 0x00, 0x00, 0x18, 0x00, 0x18, 0x00, 0x1F, 0xFC, 0xC0, 0x87, 0x3F, 0xF0, 0xE1, 0x0F, 0xFF, 0xF9, 0x0F, 0x1F, 0x06, 0xE3, 0x07, 0xF8, 0x0D, 0x66, 0x80, 0x00, 0x19, 0x0C, 0x1F, 0xFE, 0xC0, 0x87, 0x3F, 0xF0, 0xF1, 0x3F, 0x83, 0x19, 0x6C, 0x60, 0x06, 0x1B, 0x98, 0xFF, 0xF0, 0x61, 0x00, 0x7C, 0x60, 0x03, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x30, 0x00, 0x80, 0x0F, 0x00, 0x06, 0x00, 0x03, 0x60, 0x18, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x03, 0x0E, 0x98, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x33, 0x98, 0xC1, 0x8F, 0xCD, 0x18, 0x03, 0x06, 0x60, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x8C, 0x81, 0x03, 0x63, 0x18, 0x03, 0x38, 0x03, 0x30, 0xC0, 0x60, 0x8C, 0x61, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x30, 0x80, 0x31, 0x86, 0x61, 0x8C, 0x61, 0x18, 0x63, 0x18, 0x03, 0x18, 0x80, 0x31, 0x06, 0x83, 0x01, 0x60, 0x0C, 0x66, 0x80, 0x81, 0x19, 0x8C, 0x31, 0x86, 0x61, 0x8C, 0x61, 0x18, 0x03, 0x03, 0x83, 0x19, 0x6C, 0x60, 0x06, 0x1B, 0x18, 0xC0, 0x30, 0x60, 0x00, 0x60, 0x30, 0x06, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x30, 0x00, 0xC0, 0x00, 0x00, 0x06, 0x00, 0x03, 0x60, 0x18, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x03, 0x18, 0x18, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x33, 0x98, 0x61, 0x9B, 0x6D, 0x18, 0x03, 0x06, 0x30, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x06, 0xC3, 0x83, 0xC1, 0x0C, 0x06, 0x3C, 0x03, 0x18, 0xC0, 0x60, 0x06, 0x33, 0x18, 0x00, 0x00, 0x00, 0x06, 0x00, 0x60, 0xC0, 0x60, 0x03, 0x33, 0x98, 0xC1, 0x0C, 0x66, 0x30, 0x03, 0x18, 0xC0, 0x60, 0x06, 0x83, 0x01, 0x60, 0x0C, 0x63, 0x80, 0xC3, 0x19, 0xCC, 0x60, 0x06, 0x33, 0x98, 0xC1, 0x0C, 0x06, 0x03, 0x83, 0x19, 0x6C, 0x60, 0x8C, 0x31, 0x0C, 0xC0, 0x30, 0xC0, 0x00, 0x60, 0x18, 0x0C, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x30, 0x00, 0xC0, 0x00, 0x00, 0x06, 0x00, 0x03, 0x60, 0x18, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x98, 0x31, 0x33, 0x67, 0x18, 0x03, 0x00, 0x30, 0x00, 0x83, 0x61, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x06, 0x63, 0x83, 0xC1, 0x00, 0x06, 0x36, 0x03, 0x18, 0x00, 0x60, 0x06, 0x33, 0x18, 0x0C, 0x60, 0x00, 0x03, 0x00, 0xC0, 0xC0, 0x60, 0xE3, 0x33, 0x98, 0xC1, 0x0C, 0x66, 0x30, 0x03, 0x18, 0xC0, 0x60, 0x06, 0x83, 0x01, 0x60, 0x8C, 0x61, 0x80, 0xE7, 0x19, 0xCC, 0x60, 0x06, 0x33, 0x98, 0xC1, 0x0C, 0x00, 0x03, 0x83, 0x19, 0x6C, 0x60, 0x8C, 0x31, 0x0C, 0xC0, 0x30, 0xC0, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x30, 0x00, 0xC0, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x18, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0xFE, 0x37, 0x03, 0x30, 0xB0, 0x01, 0x00, 0x18, 0x00, 0x06, 0x33, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x86, 0x03, 0x83, 0xC1, 0x00, 0x06, 0x33, 0x03, 0x18, 0x00, 0x30, 0x06, 0x33, 0x18, 0x0C, 0x60, 0x80, 0x01, 0xFF, 0x81, 0x01, 0x60, 0x33, 0x33, 0x98, 0xC1, 0x0C, 0x60, 0x30, 0x03, 0x18, 0xC0, 0x00, 0x06, 0x83, 0x01, 0x60, 0xCC, 0x60, 0x80, 0xBD, 0x39, 0xCC, 0x60, 0x06, 0x33, 0x98, 0xC1, 0x0C, 0x00, 0x03, 0x83, 0x19, 0x6C, 0x60, 0xD8, 0x60, 0x06, 0x60, 0x30, 0x80, 0x01, 0x60, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x87, 0x3F, 0xF0, 0x81, 0x3F, 0x7C, 0xF8, 0x07, 0x7F, 0xFE, 0xC0, 0x03, 0x78, 0x18, 0x06, 0x86, 0x7F, 0xF8, 0x03, 0x1F, 0xFE, 0xC0, 0x9F, 0xF9, 0xF8, 0xE3, 0x1F, 0x83, 0x19, 0x6C, 0x60, 0x06, 0x33, 0x98, 0xFF, 0x60, 0x00, 0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x98, 0x31, 0x03, 0x30, 0xE0, 0x00, 0x00, 0x18, 0x00, 0x06, 0x1E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xC6, 0x03, 0x03, 0xC0, 0x00, 0x83, 0x31, 0x7F, 0xF8, 0x03, 0x30, 0x8C, 0x31, 0x18, 0x0C, 0x60, 0xC0, 0x00, 0x00, 0x00, 0x03, 0x30, 0x1B, 0x33, 0x98, 0x61, 0x0C, 0x60, 0x30, 0x03, 0x18, 0xC0, 0x00, 0x06, 0x83, 0x01, 0x60, 0x6C, 0x60, 0x80, 0x99, 0x79, 0xCC, 0x60, 0x06, 0x33, 0x98, 0xC1, 0x18, 0x00, 0x03, 0x83, 0x31, 0x66, 0x60, 0xD8, 0x60, 0x06, 0x30, 0x30, 0x80, 0x01, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8C, 0x61, 0x18, 0xC3, 0x30, 0xC6, 0xC0, 0x80, 0x61, 0x86, 0x01, 0x03, 0x60, 0x18, 0x03, 0x86, 0xD9, 0x18, 0x86, 0x31, 0x86, 0x61, 0x98, 0x0D, 0x0C, 0x06, 0x03, 0x83, 0x19, 0x6C, 0x60, 0x06, 0x33, 0x18, 0xC0, 0x60, 0x00, 0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x98, 0x61, 0x03, 0x18, 0xF0, 0x00, 0x00, 0x18, 0x00, 0x06, 0x0C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x66, 0x03, 0x03, 0x60, 0xE0, 0xC1, 0x30, 0xC0, 0x18, 0x06, 0x18, 0xF8, 0x30, 0x18, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x06, 0x18, 0x1B, 0x33, 0x98, 0x3F, 0x0C, 0x60, 0x30, 0x7F, 0xF8, 0xC3, 0x00, 0xFE, 0x83, 0x01, 0x60, 0x3C, 0x60, 0x80, 0x81, 0xD9, 0xCC, 0x60, 0x86, 0x31, 0x98, 0x61, 0xF0, 0x01, 0x03, 0x83, 0x31, 0x66, 0x60, 0x70, 0xC0, 0x03, 0x18, 0x30, 0x00, 0x03, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0xC1, 0x0C, 0x66, 0x30, 0x83, 0xC1, 0xC0, 0x60, 0x06, 0x03, 0x03, 0x60, 0x98, 0x01, 0x86, 0x99, 0x19, 0xCC, 0x60, 0x06, 0x33, 0x98, 0x07, 0x0C, 0x00, 0x03, 0x83, 0x19, 0x6C, 0x60, 0x8C, 0x31, 0x18, 0x60, 0x38, 0x00, 0x03, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x98, 0xC1, 0x0F, 0x18, 0x98, 0x0D, 0x00, 0x18, 0x00, 0xC6, 0xFF, 0xFE, 0x07, 0x00, 0xFF, 0x01, 0x00, 0x06, 0x36, 0x03, 0x03, 0x30, 0x00, 0x63, 0x30, 0x80, 0x19, 0x0C, 0x18, 0x8C, 0x61, 0x18, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x06, 0x0C, 0x1B, 0xF3, 0x9F, 0x61, 0x0C, 0x60, 0x30, 0x03, 0x18, 0xC0, 0x7C, 0x06, 0x83, 0x01, 0x60, 0x3C, 0x60, 0x80, 0x81, 0x99, 0xCD, 0x60, 0xFE, 0x30, 0x98, 0x3F, 0x00, 0x03, 0x03, 0x83, 0x31, 0x66, 0x66, 0x70, 0xC0, 0x03, 0x0C, 0x30, 0x00, 0x03, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0xC1, 0x0C, 0x60, 0x30, 0x83, 0xC1, 0xC0, 0x60, 0x06, 0x03, 0x03, 0x60, 0xD8, 0x00, 0x86, 0x99, 0x19, 0xCC, 0x60, 0x06, 0x33, 0x98, 0x03, 0x0C, 0x00, 0x03, 0x83, 0x31, 0x66, 0x66, 0xD8, 0x30, 0x18, 0x30, 0x60, 0x00, 0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x98, 0x01, 0x1B, 0x0C, 0x0C, 0x0F, 0x00, 0x18, 0x00, 0x06, 0x0C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1E, 0x03, 0x03, 0x18, 0x00, 0x66, 0x30, 0x80, 0x19, 0x0C, 0x0C, 0x06, 0xC3, 0x1F, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x03, 0x0C, 0x1B, 0x33, 0x98, 0xC1, 0x0C, 0x60, 0x30, 0x03, 0x18, 0xC0, 0x60, 0x06, 0x83, 0x01, 0x60, 0x6C, 0x60, 0x80, 0x81, 0x19, 0xCF, 0x60, 0x06, 0x30, 0x98, 0x07, 0x00, 0x06, 0x03, 0x83, 0x31, 0x66, 0x66, 0xD8, 0x80, 0x01, 0x06, 0x30, 0x00, 0x06, 0x60, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x9F, 0xC1, 0x0C, 0x60, 0x30, 0xFF, 0xC1, 0xC0, 0x60, 0x06, 0x03, 0x03, 0x60, 0x78, 0x00, 0x86, 0x99, 0x19, 0xCC, 0x60, 0x06, 0x33, 0x98, 0x01, 0xF8, 0x03, 0x03, 0x83, 0x31, 0x66, 0x66, 0x70, 0x30, 0x18, 0x18, 0x60, 0x00, 0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x07, 0x33, 0x0C, 0x0C, 0x06, 0x00, 0x18, 0x00, 0x06, 0x1E, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0E, 0x03, 0x03, 0x0C, 0x00, 0x66, 0x30, 0x80, 0x19, 0x0C, 0x0C, 0x06, 0x03, 0x18, 0x00, 0x00, 0x80, 0x01, 0xFF, 0x81, 0x01, 0x00, 0x33, 0x33, 0x98, 0xC1, 0x0C, 0x60, 0x30, 0x03, 0x18, 0xC0, 0x60, 0x06, 0x83, 0x81, 0x61, 0xCC, 0x60, 0x80, 0x81, 0x19, 0xCE, 0x60, 0x06, 0x30, 0x98, 0x0D, 0x00, 0x06, 0x03, 0x83, 0x61, 0x63, 0x6F, 0xD8, 0x80, 0x01, 0x03, 0x30, 0x00, 0x06, 0x60, 0x00, 0x00, 0x00, 0x00, 0x30, 0x98, 0xC1, 0x0C, 0x60, 0x30, 0x03, 0xC0, 0xC0, 0x60, 0x06, 0x03, 0x03, 0x60, 0x78, 0x00, 0x86, 0x99, 0x19, 0xCC, 0x60, 0x06, 0x33, 0x98, 0x01, 0x00, 0x06, 0x03, 0x83, 0x31, 0x66, 0x66, 0x70, 0x30, 0x18, 0x0C, 0x60, 0x00, 0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x01, 0x33, 0xE6, 0x0C, 0x06, 0x00, 0x30, 0x00, 0x03, 0x33, 0x60, 0x00, 0x03, 0x00, 0x00, 0x80, 0x01, 0x06, 0x03, 0x03, 0x06, 0x00, 0xE6, 0x3F, 0x83, 0x19, 0x0C, 0x06, 0x06, 0x03, 0x18, 0x0C, 0x60, 0x00, 0x03, 0x00, 0xC0, 0x00, 0x00, 0xE3, 0x33, 0x98, 0xC1, 0x0C, 0x66, 0x30, 0x03, 0x18, 0xC0, 0x60, 0x06, 0x83, 0x81, 0x61, 0x8C, 0x61, 0x80, 0x81, 0x19, 0xCC, 0x60, 0x06, 0x30, 0x98, 0x19, 0x00, 0x06, 0x03, 0x83, 0x61, 0xE3, 0x79, 0x8C, 0x81, 0x81, 0x01, 0x30, 0x00, 0x0C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x30, 0x98, 0xC1, 0x0C, 0x60, 0x30, 0x03, 0xC0, 0xC0, 0x60, 0x06, 0x03, 0x03, 0x60, 0xD8, 0x00, 0x86, 0x99, 0x19, 0xCC, 0x60, 0x06, 0x33, 0x98, 0x01, 0x00, 0x06, 0x03, 0x83, 0x61, 0x63, 0x66, 0xD8, 0x30, 0x18, 0x06, 0x60, 0x00, 0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x98, 0x31, 0x33, 0xB6, 0x0D, 0x06, 0x00, 0x30, 0x00, 0x83, 0x61, 0x60, 0x00, 0x03, 0x00, 0xC0, 0x80, 0x01, 0x06, 0x03, 0x03, 0x03, 0x0C, 0x06, 0x30, 0x83, 0x19, 0x0C, 0x06, 0x06, 0x03, 0x18, 0x0C, 0x60, 0x00, 0x06, 0x00, 0x60, 0x00, 0x0C, 0x03, 0x30, 0x98, 0xC1, 0x0C, 0x66, 0x30, 0x03, 0x18, 0xC0, 0x60, 0x06, 0x83, 0x81, 0x61, 0x0C, 0x63, 0x80, 0x81, 0x19, 0xCC, 0x60, 0x06, 0x30, 0x98, 0x31, 0x0C, 0x06, 0x03, 0x83, 0xC1, 0xE1, 0x70, 0x8C, 0x81, 0x81, 0x01, 0x30, 0x00, 0x0C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x30, 0x98, 0xC1, 0x0C, 0x66, 0x30, 0x03, 0xC0, 0xC0, 0x60, 0x06, 0x03, 0x03, 0x60, 0x98, 0x01, 0x86, 0x99, 0x19, 0xCC, 0x60, 0x06, 0x33, 0x98, 0x01, 0x00, 0x06, 0x03, 0x83, 0x61, 0x63, 0x66, 0x8C, 0x31, 0x18, 0x03, 0x60, 0x00, 0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x98, 0x61, 0x1B, 0xB3, 0x19, 0x0F, 0x00, 0x60, 0x80, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0xC0, 0xC0, 0x00, 0x8C, 0x01, 0x83, 0x01, 0x18, 0x03, 0x30, 0xC6, 0x30, 0x06, 0x06, 0x8C, 0x01, 0x0C, 0x0C, 0x60, 0x00, 0x0C, 0x00, 0x30, 0x00, 0x0C, 0x06, 0x30, 0x98, 0x61, 0x18, 0x63, 0x18, 0x03, 0x18, 0x80, 0x31, 0x06, 0x83, 0x01, 0x33, 0x0C, 0x66, 0x80, 0x81, 0x19, 0x8C, 0x31, 0x06, 0x60, 0x8F, 0x61, 0x18, 0x03, 0x03, 0xC6, 0xC0, 0x61, 0x60, 0x06, 0x83, 0x81, 0x01, 0x30, 0x00, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00, 0x30, 0x98, 0x61, 0x18, 0xC3, 0x30, 0x86, 0xC1, 0x80, 0x61, 0x06, 0x03, 0x03, 0x60, 0x18, 0x03, 0x86, 0x99, 0x19, 0x8C, 0x31, 0x86, 0x61, 0x98, 0x01, 0x0C, 0x06, 0x03, 0x86, 0xC1, 0x61, 0x66, 0x06, 0x63, 0x98, 0x01, 0xC0, 0x00, 0x03, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x98, 0xC1, 0x0F, 0xE3, 0xF0, 0x0D, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0xC0, 0xC0, 0x00, 0xF8, 0xE0, 0x9F, 0xFF, 0xF0, 0x01, 0x30, 0x7C, 0xE0, 0x03, 0x06, 0xF8, 0xE0, 0x07, 0x00, 0x60, 0x00, 0x18, 0x00, 0x18, 0x00, 0x0C, 0xFC, 0x33, 0x98, 0x3F, 0xF0, 0xE1, 0x0F, 0xFF, 0x19, 0x00, 0x1F, 0x06, 0xE3, 0x07, 0x1E, 0x0C, 0xE6, 0xBF, 0x81, 0x19, 0x0C, 0x1F, 0x06, 0xC0, 0x87, 0xC1, 0xF0, 0x01, 0x03, 0x7C, 0xC0, 0x21, 0x40, 0x06, 0x83, 0x81, 0xFF, 0xF0, 0x01, 0x18, 0x7C, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x9F, 0x3F, 0xF0, 0x81, 0x3F, 0xFC, 0xC0, 0x00, 0x7F, 0x06, 0xC3, 0x0F, 0x60, 0x18, 0x86, 0x9F, 0x99, 0x19, 0x0C, 0x1F, 0xFE, 0xC0, 0x9F, 0x01, 0xF8, 0x03, 0x3E, 0xFC, 0xC1, 0xC1, 0x3F, 0x06, 0xC3, 0x9F, 0xFF, 0x80, 0x03, 0x03, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x1F, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; #define font24_width 1185 #define font24_height 24 static unsigned char font24_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x01, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x98, 0x81, 0x19, 0x60, 0x00, 0x00, 0x70, 0x00, 0x06, 0xC0, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x01, 0x06, 0xF8, 0x81, 0x1F, 0x00, 0xE6, 0x7F, 0xF8, 0xE3, 0x7F, 0xF8, 0x81, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x06, 0x80, 0x1F, 0xFC, 0x81, 0x1F, 0xFE, 0x81, 0x1F, 0xFE, 0xE1, 0x7F, 0xFE, 0x87, 0x1F, 0x06, 0x86, 0x1F, 0xC0, 0x6F, 0x60, 0x06, 0x10, 0x40, 0x06, 0x86, 0x1F, 0xFE, 0x81, 0x1F, 0xFE, 0x81, 0x1F, 0xFE, 0x67, 0x60, 0x06, 0x36, 0x60, 0x06, 0x66, 0x60, 0xFE, 0x87, 0x0F, 0x00, 0x80, 0x0F, 0x98, 0x01, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0xC0, 0x07, 0x00, 0x06, 0x00, 0x06, 0x00, 0xC3, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x60, 0xC0, 0x01, 0x66, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x98, 0x81, 0x19, 0xF8, 0xC1, 0x31, 0xD8, 0x00, 0x06, 0x60, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x0C, 0x03, 0x07, 0x0C, 0xC3, 0x30, 0x00, 0x67, 0x00, 0x0C, 0x60, 0x60, 0x0C, 0xC3, 0x30, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0C, 0xC0, 0x30, 0x06, 0xC3, 0x30, 0x06, 0xC3, 0x30, 0x06, 0x63, 0x00, 0x06, 0xC0, 0x30, 0x06, 0x06, 0x06, 0x00, 0x63, 0x30, 0x06, 0x30, 0x60, 0x06, 0xC6, 0x30, 0x06, 0xC3, 0x30, 0x06, 0xC3, 0x30, 0x60, 0x60, 0x60, 0x06, 0x36, 0x60, 0x06, 0x66, 0x60, 0x00, 0x86, 0x01, 0x0C, 0x00, 0x0C, 0x0C, 0x03, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x60, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xC3, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x60, 0x00, 0x03, 0xC6, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x98, 0x81, 0x19, 0x6C, 0x63, 0x33, 0x8C, 0x01, 0x06, 0x30, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x06, 0x86, 0x07, 0x06, 0x66, 0x60, 0x80, 0x67, 0x00, 0x06, 0x60, 0x60, 0x06, 0x66, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x18, 0x60, 0x60, 0x03, 0x66, 0x60, 0x06, 0x66, 0x60, 0x06, 0x66, 0x00, 0x06, 0x60, 0x60, 0x06, 0x06, 0x06, 0x00, 0x63, 0x18, 0x06, 0x70, 0x70, 0x06, 0x66, 0x60, 0x06, 0x66, 0x60, 0x06, 0x66, 0x60, 0x60, 0x60, 0x60, 0x06, 0x36, 0x60, 0x0C, 0xC3, 0x30, 0x00, 0x86, 0x01, 0x0C, 0x00, 0x0C, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x60, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xC3, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x60, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x80, 0x19, 0x66, 0x66, 0x1B, 0x8C, 0x01, 0x00, 0x30, 0x00, 0x06, 0x06, 0x03, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x06, 0xC6, 0x06, 0x06, 0x06, 0x60, 0xC0, 0x66, 0x00, 0x06, 0x00, 0x60, 0x06, 0x66, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x30, 0x60, 0x60, 0xC3, 0x67, 0x60, 0x06, 0x66, 0x60, 0x06, 0x66, 0x00, 0x06, 0x60, 0x60, 0x06, 0x06, 0x06, 0x00, 0x63, 0x0C, 0x06, 0xF0, 0x78, 0x06, 0x66, 0x60, 0x06, 0x66, 0x60, 0x06, 0x66, 0x00, 0x60, 0x60, 0x60, 0x06, 0x36, 0x60, 0x0C, 0xC3, 0x30, 0x00, 0x86, 0x01, 0x18, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x60, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x60, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0xE0, 0x7F, 0x66, 0xC0, 0x19, 0x8C, 0x01, 0x00, 0x18, 0x00, 0x0C, 0x8C, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x06, 0x07, 0x06, 0x06, 0x06, 0x60, 0x60, 0x66, 0x00, 0x06, 0x00, 0x30, 0x06, 0x66, 0x60, 0x60, 0x00, 0x06, 0x30, 0x00, 0x00, 0x60, 0x60, 0x60, 0x63, 0x66, 0x60, 0x06, 0x66, 0x00, 0x06, 0x66, 0x00, 0x06, 0x60, 0x00, 0x06, 0x06, 0x06, 0x00, 0x63, 0x06, 0x06, 0xB0, 0x6D, 0x0E, 0x66, 0x60, 0x06, 0x66, 0x60, 0x06, 0x66, 0x00, 0x60, 0x60, 0x60, 0x0C, 0x33, 0x60, 0x98, 0x81, 0x19, 0x00, 0x83, 0x01, 0x18, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x1F, 0xFE, 0x81, 0x1F, 0xF8, 0x87, 0x1F, 0xFC, 0x83, 0x7F, 0xFE, 0x81, 0x07, 0xC0, 0xC3, 0x60, 0x60, 0xE0, 0x1F, 0xFE, 0x81, 0x1F, 0xFE, 0x81, 0x7F, 0xE6, 0xC7, 0x3F, 0xFE, 0x61, 0x60, 0x06, 0x66, 0x60, 0x06, 0x66, 0x60, 0xFE, 0x07, 0x03, 0x60, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x80, 0x19, 0x66, 0x00, 0x0C, 0xD8, 0x00, 0x00, 0x18, 0x00, 0x0C, 0xD8, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x86, 0x07, 0x06, 0x00, 0x06, 0x60, 0x30, 0x66, 0x00, 0x06, 0x00, 0x30, 0x06, 0x66, 0x60, 0x60, 0x00, 0x06, 0x18, 0xE0, 0x7F, 0xC0, 0x00, 0x30, 0x33, 0x66, 0x60, 0x06, 0x63, 0x00, 0x06, 0x66, 0x00, 0x06, 0x60, 0x00, 0x06, 0x06, 0x06, 0x00, 0x63, 0x03, 0x06, 0x30, 0x67, 0x1E, 0x66, 0x60, 0x06, 0x66, 0x60, 0x06, 0x66, 0x00, 0x60, 0x60, 0x60, 0x0C, 0x33, 0x60, 0x98, 0x81, 0x19, 0x80, 0x81, 0x01, 0x30, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x06, 0xC3, 0x30, 0x0C, 0xC6, 0x30, 0x60, 0xC0, 0x60, 0x06, 0x03, 0x06, 0x00, 0xC3, 0x30, 0x60, 0x60, 0x36, 0x06, 0xC3, 0x30, 0x06, 0xC3, 0x60, 0x36, 0x60, 0x60, 0x30, 0x60, 0x60, 0x06, 0x66, 0x60, 0x06, 0x66, 0x60, 0x00, 0x06, 0x03, 0x60, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x80, 0x19, 0x6C, 0x00, 0x0C, 0x70, 0x00, 0x00, 0x18, 0x00, 0x0C, 0x70, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xC6, 0x06, 0x06, 0x00, 0x03, 0x30, 0x18, 0xE6, 0x1F, 0xFE, 0x01, 0x18, 0x0C, 0x63, 0x60, 0x60, 0x00, 0x06, 0x0C, 0x00, 0x00, 0x80, 0x01, 0x18, 0x33, 0x66, 0x60, 0xFE, 0x61, 0x00, 0x06, 0x66, 0x00, 0x06, 0x60, 0x00, 0x06, 0x06, 0x06, 0x00, 0xE3, 0x01, 0x06, 0x30, 0x62, 0x36, 0x66, 0x60, 0x06, 0x63, 0x60, 0x06, 0xC3, 0x00, 0x60, 0x60, 0x60, 0x0C, 0x33, 0x60, 0xF0, 0x00, 0x0F, 0xC0, 0x80, 0x01, 0x30, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x06, 0x66, 0x60, 0x06, 0x66, 0x60, 0x60, 0x60, 0x60, 0x06, 0x06, 0x06, 0x00, 0xC3, 0x18, 0x60, 0x60, 0x66, 0x06, 0x66, 0x60, 0x06, 0x66, 0x60, 0x1E, 0x60, 0x00, 0x30, 0x60, 0x60, 0x06, 0x66, 0x60, 0x0C, 0x63, 0x60, 0x00, 0x03, 0x03, 0x60, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x80, 0x19, 0xF8, 0x01, 0x06, 0x78, 0x06, 0x00, 0x18, 0x00, 0x0C, 0xFF, 0xE7, 0x7F, 0x00, 0xE0, 0x7F, 0x00, 0x00, 0x06, 0x66, 0x06, 0x06, 0x80, 0x01, 0x1F, 0x0C, 0x06, 0x30, 0x06, 0x03, 0x18, 0xF8, 0xC1, 0x60, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x03, 0x0C, 0x33, 0x66, 0x60, 0x06, 0x63, 0x00, 0x06, 0xE6, 0x1F, 0xFE, 0x61, 0x7C, 0xFE, 0x07, 0x06, 0x00, 0xE3, 0x00, 0x06, 0x30, 0x60, 0x66, 0x66, 0x60, 0xFE, 0x61, 0x60, 0xFE, 0x81, 0x1F, 0x60, 0x60, 0x60, 0x0C, 0x33, 0x60, 0x60, 0x00, 0x0F, 0x60, 0x80, 0x01, 0x60, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x06, 0x66, 0x00, 0x06, 0x66, 0x60, 0x60, 0x60, 0x60, 0x06, 0x06, 0x06, 0x00, 0xC3, 0x0C, 0x60, 0x60, 0x66, 0x06, 0x66, 0x60, 0x06, 0x66, 0x60, 0x0E, 0x60, 0x00, 0x30, 0x60, 0x60, 0x0C, 0x63, 0x60, 0x98, 0x61, 0x60, 0x80, 0xC1, 0x01, 0x60, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x80, 0x19, 0x60, 0x03, 0x06, 0xCC, 0x06, 0x00, 0x18, 0x00, 0x0C, 0x70, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x36, 0x06, 0x06, 0xC0, 0x00, 0x30, 0x06, 0x06, 0x60, 0x06, 0x06, 0x0C, 0x0C, 0x83, 0x7F, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x80, 0x01, 0x06, 0x33, 0xE6, 0x7F, 0x06, 0x66, 0x00, 0x06, 0x66, 0x00, 0x06, 0x60, 0x60, 0x06, 0x06, 0x06, 0x00, 0xE3, 0x01, 0x06, 0x30, 0x60, 0xC6, 0x66, 0x60, 0x06, 0x60, 0x60, 0x1E, 0x00, 0x30, 0x60, 0x60, 0x60, 0x98, 0x31, 0x62, 0xF0, 0x00, 0x06, 0x30, 0x80, 0x01, 0x60, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x80, 0x7F, 0x06, 0x66, 0x00, 0x06, 0x66, 0x60, 0x60, 0x60, 0x60, 0x06, 0x06, 0x06, 0x00, 0xC3, 0x06, 0x60, 0x60, 0x66, 0x06, 0x66, 0x60, 0x06, 0x66, 0x60, 0x06, 0x60, 0x00, 0x30, 0x60, 0x60, 0x0C, 0x63, 0x66, 0xF0, 0x60, 0x60, 0xC0, 0x00, 0x03, 0x60, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x80, 0x19, 0x60, 0x06, 0x03, 0x86, 0x03, 0x00, 0x18, 0x00, 0x0C, 0xD8, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1E, 0x06, 0x06, 0x60, 0x00, 0x60, 0x06, 0x06, 0x60, 0x06, 0x06, 0x0C, 0x06, 0x06, 0x60, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0xC0, 0x00, 0x06, 0x33, 0x66, 0x60, 0x06, 0x66, 0x00, 0x06, 0x66, 0x00, 0x06, 0x60, 0x60, 0x06, 0x06, 0x06, 0x00, 0x63, 0x03, 0x06, 0x30, 0x60, 0x86, 0x67, 0x60, 0x06, 0x60, 0x60, 0x36, 0x00, 0x60, 0x60, 0x60, 0x60, 0x98, 0x31, 0x67, 0x98, 0x01, 0x06, 0x18, 0x80, 0x01, 0xC0, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x60, 0x06, 0x66, 0x00, 0x06, 0xE6, 0x7F, 0x60, 0x60, 0x60, 0x06, 0x06, 0x06, 0x00, 0xC3, 0x03, 0x60, 0x60, 0x66, 0x06, 0x66, 0x60, 0x06, 0x66, 0x60, 0x06, 0xC0, 0x3F, 0x30, 0x60, 0x60, 0x98, 0x61, 0x66, 0x60, 0x60, 0x60, 0x60, 0x00, 0x03, 0x60, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x7F, 0x60, 0x06, 0x03, 0x06, 0x03, 0x00, 0x18, 0x00, 0x0C, 0x8C, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0E, 0x06, 0x06, 0x30, 0x00, 0x60, 0x06, 0x06, 0x60, 0x06, 0x06, 0x06, 0x06, 0x06, 0x60, 0x00, 0x00, 0x00, 0x30, 0xE0, 0x7F, 0x60, 0x00, 0x00, 0x63, 0x66, 0x60, 0x06, 0x66, 0x00, 0x06, 0x66, 0x00, 0x06, 0x60, 0x60, 0x06, 0x06, 0x06, 0x06, 0x63, 0x06, 0x06, 0x30, 0x60, 0x06, 0x67, 0x60, 0x06, 0x60, 0x60, 0x66, 0x00, 0x60, 0x60, 0x60, 0x60, 0x98, 0xB1, 0x6D, 0x98, 0x01, 0x06, 0x0C, 0x80, 0x01, 0xC0, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x06, 0x66, 0x00, 0x06, 0x66, 0x00, 0x60, 0x60, 0x60, 0x06, 0x06, 0x06, 0x00, 0xC3, 0x06, 0x60, 0x60, 0x66, 0x06, 0x66, 0x60, 0x06, 0x66, 0x60, 0x06, 0x00, 0x60, 0x30, 0x60, 0x60, 0x98, 0x61, 0x66, 0xF0, 0x60, 0x60, 0x30, 0x00, 0x03, 0x60, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x19, 0x66, 0x86, 0x39, 0x06, 0x03, 0x00, 0x30, 0x00, 0x06, 0x06, 0x03, 0x06, 0x60, 0x00, 0x00, 0x00, 0x80, 0x01, 0x06, 0x06, 0x06, 0x18, 0x00, 0x60, 0xFE, 0x07, 0x60, 0x06, 0x06, 0x06, 0x06, 0x06, 0x60, 0x60, 0x00, 0x06, 0x60, 0x00, 0x00, 0x30, 0x00, 0x00, 0xC3, 0x67, 0x60, 0x06, 0x66, 0x60, 0x06, 0x66, 0x00, 0x06, 0x60, 0x60, 0x06, 0x06, 0x06, 0x06, 0x63, 0x0C, 0x06, 0x30, 0x60, 0x06, 0x66, 0x60, 0x06, 0x60, 0x60, 0xC6, 0x00, 0x60, 0x60, 0x60, 0x60, 0xF0, 0xF0, 0x78, 0x0C, 0x03, 0x06, 0x06, 0x80, 0x01, 0x80, 0x01, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x06, 0x66, 0x00, 0x06, 0x66, 0x00, 0x60, 0x60, 0x60, 0x06, 0x06, 0x06, 0x00, 0xC3, 0x0C, 0x60, 0x60, 0x66, 0x06, 0x66, 0x60, 0x06, 0x66, 0x60, 0x06, 0x00, 0x60, 0x30, 0x60, 0x60, 0xF0, 0x60, 0x66, 0x98, 0x61, 0x60, 0x18, 0x00, 0x03, 0x60, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x80, 0x19, 0x6C, 0x83, 0x6D, 0x86, 0x03, 0x00, 0x30, 0x00, 0x06, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x80, 0x01, 0x06, 0x06, 0x06, 0x0C, 0x60, 0x60, 0x00, 0x66, 0x60, 0x06, 0x06, 0x06, 0x06, 0x06, 0x60, 0x60, 0x00, 0x06, 0xC0, 0x00, 0x00, 0x18, 0x00, 0x06, 0x03, 0x60, 0x60, 0x06, 0x66, 0x60, 0x06, 0x66, 0x00, 0x06, 0x60, 0x60, 0x06, 0x06, 0x06, 0x06, 0x63, 0x18, 0x06, 0x30, 0x60, 0x06, 0x66, 0x60, 0x06, 0x60, 0x66, 0x86, 0x61, 0x60, 0x60, 0x60, 0x60, 0xF0, 0x70, 0x70, 0x0C, 0x03, 0x06, 0x06, 0x80, 0x01, 0x80, 0x01, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x06, 0x66, 0x60, 0x06, 0x66, 0x00, 0x60, 0x60, 0x60, 0x06, 0x06, 0x06, 0x00, 0xC3, 0x18, 0x60, 0x60, 0x66, 0x06, 0x66, 0x60, 0x06, 0x66, 0x60, 0x06, 0x00, 0x60, 0x30, 0x60, 0x60, 0xF0, 0x60, 0x66, 0x0C, 0x63, 0x60, 0x0C, 0x00, 0x03, 0x60, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x80, 0x19, 0xF8, 0xC1, 0x6C, 0xCC, 0x06, 0x00, 0x60, 0x00, 0x03, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0xC0, 0x00, 0x0C, 0x03, 0x06, 0x06, 0xC0, 0x30, 0x00, 0xC6, 0x30, 0x0C, 0x03, 0x06, 0x0C, 0x03, 0x30, 0x60, 0x00, 0x06, 0x80, 0x01, 0x00, 0x0C, 0x00, 0x06, 0x06, 0x60, 0x60, 0x06, 0xC3, 0x30, 0x06, 0x63, 0x00, 0x06, 0xC0, 0x30, 0x06, 0x06, 0x06, 0x8C, 0x61, 0x30, 0x06, 0x30, 0x60, 0x06, 0xC6, 0x30, 0x06, 0xC0, 0x3C, 0x06, 0xC3, 0x30, 0x60, 0xC0, 0x30, 0x60, 0x30, 0x60, 0x06, 0x06, 0x06, 0x06, 0x80, 0x01, 0x00, 0x03, 0x0C, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x60, 0x06, 0xC3, 0x30, 0x0C, 0xC6, 0x60, 0x60, 0xC0, 0x70, 0x06, 0x06, 0x06, 0x00, 0xC3, 0x30, 0x60, 0x60, 0x66, 0x06, 0xC6, 0x30, 0x06, 0xC3, 0x60, 0x06, 0x60, 0x60, 0x30, 0xC0, 0x60, 0x60, 0x60, 0x66, 0x06, 0xC6, 0x70, 0x06, 0x00, 0x06, 0x60, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x80, 0x19, 0x60, 0xC0, 0x38, 0x78, 0x06, 0x00, 0xC0, 0x80, 0x01, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0xC0, 0x00, 0xF8, 0xC1, 0x3F, 0xFE, 0x87, 0x1F, 0x00, 0x86, 0x1F, 0xF8, 0x01, 0x06, 0xF8, 0xC1, 0x1F, 0x00, 0x00, 0x06, 0x00, 0x03, 0x00, 0x06, 0x00, 0x06, 0xFC, 0x67, 0x60, 0xFE, 0x81, 0x1F, 0xFE, 0xE1, 0x7F, 0x06, 0x80, 0x1F, 0x06, 0x86, 0x1F, 0xF8, 0x60, 0x60, 0xFE, 0x37, 0x60, 0x06, 0x86, 0x1F, 0x06, 0x80, 0x1F, 0x06, 0x86, 0x1F, 0x60, 0x80, 0x1F, 0x60, 0x10, 0x40, 0x06, 0x06, 0x06, 0xFE, 0x87, 0x0F, 0x00, 0x83, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x80, 0x7F, 0xFE, 0x81, 0x1F, 0xF8, 0x87, 0x3F, 0x60, 0x80, 0x7F, 0x06, 0x86, 0x1F, 0x00, 0xC3, 0x60, 0xF8, 0x61, 0x66, 0x06, 0x86, 0x1F, 0xFE, 0x81, 0x7F, 0x06, 0xC0, 0x3F, 0xE0, 0x83, 0x7F, 0x60, 0xC0, 0x3F, 0x06, 0x86, 0x7F, 0xFE, 0x07, 0x1C, 0x60, 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x0C, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x0C, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x98, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x1F, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; #define font28_width 1383 #define font28_height 28 static unsigned char font28_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x31, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xC3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x31, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xC7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x80, 0x31, 0x60, 0x0C, 0xC0, 0x00, 0x0F, 0x03, 0x0F, 0x00, 0x03, 0x80, 0x01, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xF8, 0x03, 0x30, 0x80, 0x3F, 0xE0, 0x0F, 0x00, 0x8C, 0xFF, 0x83, 0x7F, 0xF8, 0x3F, 0xF8, 0x03, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x0F, 0xF8, 0x07, 0xFE, 0xE0, 0x3F, 0xE0, 0x0F, 0xFE, 0x80, 0xFF, 0xE3, 0xFF, 0xE0, 0x0F, 0x06, 0x0C, 0xFC, 0x00, 0xF8, 0x19, 0x30, 0x06, 0x80, 0x01, 0x66, 0xC0, 0xE0, 0x0F, 0xFE, 0x03, 0xFE, 0xE0, 0x3F, 0xE0, 0x0F, 0xFE, 0x9F, 0x01, 0x63, 0xC0, 0x18, 0x60, 0x06, 0x8C, 0x01, 0xE6, 0xFF, 0xC0, 0x0F, 0x0C, 0x00, 0xFC, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0xFC, 0x00, 0x00, 0x06, 0x00, 0x30, 0x00, 0x60, 0x30, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xC0, 0x00, 0x0E, 0x60, 0xCE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x80, 0x31, 0x60, 0x0C, 0xF8, 0x87, 0x1F, 0x83, 0x1F, 0x00, 0x03, 0xC0, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xFC, 0x07, 0x38, 0xC0, 0x7F, 0xF0, 0x1F, 0x00, 0x8E, 0xFF, 0xC3, 0x7F, 0xF8, 0x3F, 0xFC, 0x07, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0xE0, 0x00, 0xF0, 0x1F, 0xFC, 0x0F, 0xFF, 0xE1, 0x7F, 0xF0, 0x1F, 0xFE, 0x83, 0xFF, 0xE3, 0xFF, 0xF0, 0x1F, 0x06, 0x0C, 0xFC, 0x00, 0xF8, 0x19, 0x38, 0x06, 0x80, 0x01, 0x66, 0xC0, 0xF0, 0x1F, 0xFE, 0x07, 0xFF, 0xE1, 0x7F, 0xF0, 0x1F, 0xFE, 0x9F, 0x01, 0x63, 0xC0, 0x18, 0x60, 0x06, 0x8C, 0x01, 0xE6, 0xFF, 0xC0, 0x0F, 0x0C, 0x00, 0xFC, 0x80, 0x3B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x06, 0x00, 0x30, 0x00, 0x60, 0x30, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xC0, 0x00, 0x1E, 0x60, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x80, 0x31, 0x60, 0x0C, 0xFC, 0x8F, 0x99, 0xC1, 0x39, 0x00, 0x03, 0x60, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x0E, 0x0E, 0x3C, 0xE0, 0xE0, 0x38, 0x38, 0x00, 0x8F, 0x01, 0xE0, 0x00, 0x18, 0x30, 0x0E, 0x8E, 0x83, 0x03, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0xC0, 0x01, 0x38, 0x38, 0x0E, 0x9C, 0x83, 0x63, 0xE0, 0x38, 0x38, 0x06, 0x87, 0x01, 0x60, 0x00, 0x38, 0x38, 0x06, 0x0C, 0x30, 0x00, 0x60, 0x18, 0x1C, 0x06, 0x80, 0x03, 0x67, 0xC0, 0x38, 0x38, 0x06, 0x8E, 0x83, 0x63, 0xE0, 0x38, 0x38, 0xC0, 0x80, 0x01, 0x63, 0xC0, 0x18, 0x60, 0x0C, 0x06, 0x03, 0x03, 0xC0, 0xC0, 0x00, 0x18, 0x00, 0xC0, 0xC0, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x30, 0x00, 0x60, 0x30, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0xC0, 0x00, 0x38, 0x60, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x80, 0x31, 0x60, 0x0C, 0xCE, 0x9C, 0x9F, 0xC1, 0x30, 0x00, 0x03, 0x60, 0x00, 0x30, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x06, 0x0C, 0x3E, 0x60, 0xC0, 0x18, 0x30, 0x80, 0x8F, 0x01, 0x60, 0x00, 0x18, 0x30, 0x06, 0x8C, 0x01, 0x03, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x80, 0x03, 0x18, 0x30, 0x06, 0x98, 0x01, 0x63, 0xC0, 0x18, 0x30, 0x06, 0x86, 0x01, 0x60, 0x00, 0x18, 0x30, 0x06, 0x0C, 0x30, 0x00, 0x60, 0x18, 0x0E, 0x06, 0x80, 0x87, 0x67, 0xC0, 0x18, 0x30, 0x06, 0x8C, 0x01, 0x63, 0xC0, 0x18, 0x30, 0xC0, 0x80, 0x01, 0x63, 0xC0, 0x18, 0x60, 0x0C, 0x06, 0x03, 0x03, 0xC0, 0xC0, 0x00, 0x18, 0x00, 0xC0, 0xE0, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0xC0, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0xF8, 0x3F, 0xC6, 0x18, 0xCF, 0xC0, 0x30, 0x00, 0x00, 0x30, 0x00, 0x60, 0xC0, 0x71, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x06, 0x0E, 0x30, 0x60, 0xC0, 0x00, 0x30, 0xC0, 0x8D, 0x01, 0x60, 0x00, 0x18, 0x30, 0x06, 0x8C, 0x01, 0x03, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x07, 0x18, 0x30, 0x86, 0x9F, 0x01, 0x63, 0xC0, 0x18, 0x30, 0x06, 0x8C, 0x01, 0x60, 0x00, 0x18, 0x30, 0x06, 0x0C, 0x30, 0x00, 0x60, 0x18, 0x07, 0x06, 0x80, 0xCF, 0xE7, 0xC0, 0x18, 0x30, 0x06, 0x8C, 0x01, 0x63, 0xC0, 0x18, 0x00, 0xC0, 0x80, 0x01, 0xC3, 0x60, 0x18, 0x60, 0x18, 0x03, 0x86, 0x01, 0xE0, 0xC0, 0x00, 0x30, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0xC0, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0xF8, 0x3F, 0xC6, 0x00, 0xC0, 0xC0, 0x39, 0x00, 0x00, 0x30, 0x00, 0x60, 0x80, 0x3B, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x06, 0x0F, 0x30, 0x60, 0xC0, 0x00, 0x30, 0xE0, 0x8C, 0x01, 0x60, 0x00, 0x00, 0x18, 0x06, 0x8C, 0x01, 0x03, 0x0C, 0x00, 0x03, 0xE0, 0x80, 0xFF, 0x03, 0x0E, 0x18, 0x30, 0xC6, 0x9F, 0x01, 0x63, 0xC0, 0x18, 0x00, 0x06, 0x8C, 0x01, 0x60, 0x00, 0x18, 0x00, 0x06, 0x0C, 0x30, 0x00, 0x60, 0x98, 0x03, 0x06, 0x80, 0xFD, 0xE6, 0xC1, 0x18, 0x30, 0x06, 0x8C, 0x01, 0x63, 0xC0, 0x18, 0x00, 0xC0, 0x80, 0x01, 0xC3, 0x60, 0x18, 0x60, 0x18, 0x03, 0x86, 0x01, 0x70, 0xC0, 0x00, 0x30, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xE0, 0x3F, 0xE0, 0x0F, 0xF8, 0x0F, 0xFE, 0xC0, 0x3F, 0xE0, 0x3F, 0xFE, 0x03, 0x3C, 0x00, 0x78, 0x30, 0x38, 0xC0, 0x80, 0xFF, 0xE1, 0x3F, 0xE0, 0x0F, 0xFE, 0x03, 0xFE, 0x63, 0xFE, 0xE0, 0x0F, 0xFC, 0x83, 0x01, 0x63, 0xC0, 0x18, 0x60, 0x06, 0x8C, 0x01, 0xE3, 0xFF, 0x80, 0x01, 0xC0, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x60, 0x0C, 0xC6, 0x00, 0x60, 0x80, 0x1F, 0x00, 0x00, 0x30, 0x00, 0x60, 0x00, 0x1F, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x86, 0x0F, 0x30, 0x00, 0xC0, 0x00, 0x30, 0x70, 0x8C, 0x01, 0x60, 0x00, 0x00, 0x18, 0x06, 0x8C, 0x01, 0x03, 0x0C, 0x00, 0x03, 0x70, 0x80, 0xFF, 0x03, 0x1C, 0x00, 0x38, 0xE6, 0x98, 0x01, 0x63, 0x60, 0x18, 0x00, 0x06, 0x8C, 0x01, 0x60, 0x00, 0x18, 0x00, 0x06, 0x0C, 0x30, 0x00, 0x60, 0xD8, 0x01, 0x06, 0x80, 0x79, 0xE6, 0xC3, 0x18, 0x30, 0x06, 0x8C, 0x01, 0x63, 0xC0, 0x18, 0x00, 0xC0, 0x80, 0x01, 0xC3, 0x60, 0x18, 0x60, 0xB0, 0x01, 0xCC, 0x00, 0x38, 0xC0, 0x00, 0x60, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xE1, 0x7F, 0xF0, 0x1F, 0xFC, 0x0F, 0xFF, 0xC1, 0x3F, 0xF0, 0x3F, 0xFE, 0x07, 0x3C, 0x00, 0x78, 0x30, 0x1C, 0xC0, 0x80, 0xFF, 0xE3, 0x7F, 0xF0, 0x1F, 0xFE, 0x07, 0xFF, 0x63, 0xFF, 0xF0, 0x1F, 0xFC, 0x83, 0x01, 0x63, 0xC0, 0x18, 0x60, 0x06, 0x8C, 0x01, 0xE3, 0xFF, 0x80, 0x01, 0xC0, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x60, 0x0C, 0xCE, 0x00, 0x60, 0x00, 0x0F, 0x00, 0x00, 0x30, 0x00, 0x60, 0x00, 0x0E, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0xC6, 0x0D, 0x30, 0x00, 0xE0, 0x00, 0x38, 0x38, 0x8C, 0xFF, 0xE0, 0x3F, 0x00, 0x0C, 0x0E, 0x8E, 0x01, 0x03, 0x0C, 0x00, 0x03, 0x38, 0x00, 0x00, 0x00, 0x38, 0x00, 0x1C, 0x66, 0x98, 0x01, 0xE3, 0x3F, 0x18, 0x00, 0x06, 0x8C, 0x01, 0x60, 0x00, 0x18, 0x00, 0x06, 0x0C, 0x30, 0x00, 0x60, 0xF8, 0x00, 0x06, 0x80, 0x31, 0x66, 0xC7, 0x18, 0x30, 0x06, 0x8C, 0x01, 0x63, 0xC0, 0x38, 0x00, 0xC0, 0x80, 0x01, 0xC3, 0x60, 0x18, 0x60, 0xB0, 0x01, 0xCC, 0x00, 0x1C, 0xC0, 0x00, 0x60, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x63, 0xE0, 0x38, 0x38, 0x0E, 0x8C, 0x83, 0x03, 0x06, 0x38, 0x30, 0x06, 0x0E, 0x30, 0x00, 0x60, 0x30, 0x0E, 0xC0, 0x80, 0x31, 0x67, 0xE0, 0x38, 0x38, 0x06, 0x8E, 0x03, 0xE3, 0x03, 0x38, 0x38, 0x60, 0x80, 0x01, 0x63, 0xC0, 0x18, 0x60, 0x0E, 0x8E, 0x01, 0x03, 0xE0, 0x80, 0x01, 0xC0, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x60, 0x0C, 0xFC, 0x07, 0x30, 0x00, 0x07, 0x00, 0x00, 0x30, 0x00, 0x60, 0xE0, 0xFF, 0xF8, 0x7F, 0x00, 0x80, 0xFF, 0x03, 0x00, 0x00, 0x03, 0xE6, 0x0C, 0x30, 0x00, 0x70, 0xC0, 0x1F, 0x1C, 0x8C, 0xFF, 0xE1, 0x7F, 0x00, 0x0C, 0xFC, 0x87, 0x03, 0x03, 0x0C, 0x00, 0x03, 0x1C, 0x00, 0x00, 0x00, 0x70, 0x00, 0x0E, 0x66, 0x98, 0x01, 0xE3, 0x3F, 0x18, 0x00, 0x06, 0x8C, 0x7F, 0xE0, 0x1F, 0x18, 0x3F, 0xFE, 0x0F, 0x30, 0x00, 0x60, 0x78, 0x00, 0x06, 0x80, 0x01, 0x66, 0xCE, 0x18, 0x30, 0x06, 0x8E, 0x01, 0x63, 0xE0, 0xF0, 0x0F, 0xC0, 0x80, 0x01, 0x83, 0x31, 0x18, 0x60, 0xE0, 0x00, 0x78, 0x00, 0x0E, 0xC0, 0x00, 0xC0, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0xC0, 0x18, 0x00, 0x06, 0x8C, 0x01, 0x03, 0x06, 0x18, 0x30, 0x06, 0x0C, 0x30, 0x00, 0x60, 0x30, 0x07, 0xC0, 0x80, 0x31, 0x66, 0xC0, 0x18, 0x30, 0x06, 0x8C, 0x01, 0xE3, 0x01, 0x18, 0x00, 0x60, 0x80, 0x01, 0xC3, 0x60, 0x18, 0x60, 0x1C, 0x87, 0x01, 0x03, 0x70, 0xE0, 0x00, 0xC0, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x60, 0x0C, 0xF8, 0x0F, 0x30, 0x80, 0x8F, 0x01, 0x00, 0x30, 0x00, 0x60, 0xE0, 0xFF, 0xF8, 0x7F, 0x00, 0x80, 0xFF, 0x03, 0x00, 0x00, 0x03, 0x76, 0x0C, 0x30, 0x00, 0x38, 0xC0, 0x1F, 0x0E, 0x0C, 0x80, 0x63, 0xE0, 0x00, 0x06, 0xFC, 0x07, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x07, 0x66, 0x98, 0xFF, 0x63, 0x60, 0x18, 0x00, 0x06, 0x8C, 0x7F, 0xE0, 0x1F, 0x18, 0x3F, 0xFE, 0x0F, 0x30, 0x00, 0x60, 0x78, 0x00, 0x06, 0x80, 0x01, 0x66, 0xDC, 0x18, 0x30, 0xFE, 0x87, 0x01, 0xE3, 0x7F, 0xE0, 0x1F, 0xC0, 0x80, 0x01, 0x83, 0x31, 0x18, 0x60, 0xE0, 0x00, 0x78, 0x00, 0x07, 0xC0, 0x00, 0xC0, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x63, 0xC0, 0x18, 0x00, 0x06, 0x8C, 0x01, 0x03, 0x06, 0x18, 0x30, 0x06, 0x0C, 0x30, 0x00, 0x60, 0xB0, 0x03, 0xC0, 0x80, 0x31, 0x66, 0xC0, 0x18, 0x30, 0x06, 0x8C, 0x01, 0xE3, 0x00, 0x38, 0x00, 0x60, 0x80, 0x01, 0xC3, 0x60, 0x18, 0x63, 0xB8, 0x83, 0x01, 0x03, 0x38, 0xE0, 0x00, 0xC0, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x60, 0x0C, 0xC0, 0x1C, 0x18, 0xC0, 0xDD, 0x01, 0x00, 0x30, 0x00, 0x60, 0x00, 0x0E, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x3E, 0x0C, 0x30, 0x00, 0x1C, 0x00, 0x38, 0x06, 0x0C, 0x00, 0x63, 0xC0, 0x00, 0x06, 0x0E, 0x0E, 0xFE, 0x03, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x70, 0x00, 0x03, 0x66, 0x98, 0xFF, 0x63, 0xC0, 0x18, 0x00, 0x06, 0x8C, 0x01, 0x60, 0x00, 0x18, 0x30, 0x06, 0x0C, 0x30, 0x00, 0x60, 0xF8, 0x00, 0x06, 0x80, 0x01, 0x66, 0xF8, 0x18, 0x30, 0xFE, 0x83, 0x01, 0xE3, 0x3F, 0x00, 0x38, 0xC0, 0x80, 0x01, 0x83, 0x31, 0x18, 0x63, 0xB0, 0x01, 0x30, 0x80, 0x03, 0xC0, 0x00, 0x80, 0x01, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x63, 0xC0, 0x18, 0x00, 0x06, 0x8C, 0xFF, 0x03, 0x06, 0x18, 0x30, 0x06, 0x0C, 0x30, 0x00, 0x60, 0xF0, 0x01, 0xC0, 0x80, 0x31, 0x66, 0xC0, 0x18, 0x30, 0x06, 0x8C, 0x01, 0x63, 0x00, 0xF0, 0x0F, 0x60, 0x80, 0x01, 0xC3, 0x60, 0x18, 0x63, 0xF0, 0x81, 0x01, 0x03, 0x1C, 0x80, 0x01, 0xC0, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x60, 0x0C, 0xC0, 0x18, 0x18, 0xE0, 0xF8, 0x00, 0x00, 0x30, 0x00, 0x60, 0x00, 0x1F, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x1E, 0x0C, 0x30, 0x00, 0x0E, 0x00, 0x30, 0x06, 0x0C, 0x00, 0x63, 0xC0, 0x00, 0x03, 0x06, 0x0C, 0x00, 0x03, 0x00, 0x00, 0x00, 0x38, 0x80, 0xFF, 0x03, 0x38, 0x00, 0x03, 0xE6, 0x98, 0x01, 0x63, 0xC0, 0x18, 0x00, 0x06, 0x8C, 0x01, 0x60, 0x00, 0x18, 0x30, 0x06, 0x0C, 0x30, 0x00, 0x60, 0xD8, 0x01, 0x06, 0x80, 0x01, 0x66, 0xF0, 0x18, 0x30, 0x06, 0x80, 0x01, 0xE3, 0x03, 0x00, 0x30, 0xC0, 0x80, 0x01, 0x83, 0x31, 0x98, 0x67, 0xB0, 0x01, 0x30, 0xC0, 0x01, 0xC0, 0x00, 0x80, 0x01, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x63, 0xC0, 0x18, 0x00, 0x06, 0x8C, 0xFF, 0x03, 0x06, 0x18, 0x30, 0x06, 0x0C, 0x30, 0x00, 0x60, 0xF0, 0x00, 0xC0, 0x80, 0x31, 0x66, 0xC0, 0x18, 0x30, 0x06, 0x8C, 0x01, 0x63, 0x00, 0xE0, 0x1F, 0x60, 0x80, 0x01, 0x83, 0x31, 0x18, 0x63, 0xE0, 0x80, 0x01, 0x03, 0x0E, 0x80, 0x01, 0xC0, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x3F, 0xC0, 0x18, 0x0C, 0x60, 0x70, 0x00, 0x00, 0x30, 0x00, 0x60, 0x80, 0x3B, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x0E, 0x0C, 0x30, 0x00, 0x07, 0x00, 0x30, 0xFE, 0x0F, 0x00, 0x63, 0xC0, 0x00, 0x03, 0x06, 0x0C, 0x00, 0x03, 0x00, 0x00, 0x00, 0x70, 0x80, 0xFF, 0x03, 0x1C, 0x00, 0x00, 0xC6, 0x9F, 0x01, 0x63, 0xC0, 0x18, 0x00, 0x06, 0x8C, 0x01, 0x60, 0x00, 0x18, 0x30, 0x06, 0x0C, 0x30, 0x60, 0x60, 0x98, 0x03, 0x06, 0x80, 0x01, 0x66, 0xE0, 0x18, 0x30, 0x06, 0x80, 0x01, 0x63, 0x07, 0x00, 0x30, 0xC0, 0x80, 0x01, 0x03, 0x1B, 0xD8, 0x6F, 0x18, 0x03, 0x30, 0xE0, 0x00, 0xC0, 0x00, 0x00, 0x03, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x63, 0xC0, 0x18, 0x00, 0x06, 0x8C, 0x01, 0x00, 0x06, 0x18, 0x30, 0x06, 0x0C, 0x30, 0x00, 0x60, 0xF0, 0x01, 0xC0, 0x80, 0x31, 0x66, 0xC0, 0x18, 0x30, 0x06, 0x8C, 0x01, 0x63, 0x00, 0x00, 0x38, 0x60, 0x80, 0x01, 0x83, 0x31, 0x18, 0x63, 0xF0, 0x81, 0x01, 0x03, 0x07, 0x80, 0x01, 0xC0, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x3F, 0xC6, 0x18, 0xCC, 0x63, 0x70, 0x00, 0x00, 0x30, 0x00, 0x60, 0xC0, 0x71, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x06, 0x0C, 0x30, 0x80, 0x03, 0x00, 0x30, 0xFE, 0x0F, 0x00, 0x63, 0xC0, 0x00, 0x03, 0x06, 0x0C, 0x00, 0x03, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x86, 0x97, 0x01, 0x63, 0xC0, 0x18, 0x30, 0x06, 0x8C, 0x01, 0x60, 0x00, 0x18, 0x30, 0x06, 0x0C, 0x30, 0x60, 0x60, 0x18, 0x07, 0x06, 0x80, 0x01, 0x66, 0xC0, 0x18, 0x30, 0x06, 0x80, 0x01, 0x63, 0x0E, 0x00, 0x30, 0xC0, 0x80, 0x01, 0x03, 0x1B, 0xF8, 0x7C, 0x18, 0x03, 0x30, 0x60, 0x00, 0xC0, 0x00, 0x00, 0x03, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x63, 0xC0, 0x18, 0x00, 0x06, 0x8C, 0x01, 0x00, 0x06, 0x18, 0x30, 0x06, 0x0C, 0x30, 0x00, 0x60, 0xB0, 0x03, 0xC0, 0x80, 0x31, 0x66, 0xC0, 0x18, 0x30, 0x06, 0x8C, 0x01, 0x63, 0x00, 0x00, 0x30, 0x60, 0x80, 0x01, 0x83, 0x31, 0x18, 0x63, 0xB8, 0x83, 0x01, 0x83, 0x03, 0x80, 0x01, 0xC0, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x60, 0x0C, 0xCE, 0x1C, 0xE6, 0x67, 0x70, 0x00, 0x00, 0x60, 0x00, 0x30, 0x00, 0x00, 0x00, 0x03, 0xC0, 0x00, 0x00, 0x00, 0x0C, 0x60, 0x00, 0x06, 0x0C, 0x30, 0xC0, 0x01, 0x18, 0x30, 0x00, 0x8C, 0x01, 0x63, 0xC0, 0x00, 0x03, 0x06, 0x0C, 0x00, 0x03, 0x0C, 0x00, 0x03, 0xC0, 0x01, 0x00, 0x00, 0x07, 0x00, 0x03, 0x06, 0x80, 0x01, 0x63, 0xC0, 0x18, 0x30, 0x06, 0x86, 0x01, 0x60, 0x00, 0x18, 0x30, 0x06, 0x0C, 0x30, 0x60, 0x60, 0x18, 0x0E, 0x06, 0x80, 0x01, 0x66, 0xC0, 0x18, 0x30, 0x06, 0x80, 0x71, 0x63, 0x1C, 0x18, 0x30, 0xC0, 0x80, 0x01, 0x03, 0x1B, 0x78, 0x78, 0x0C, 0x06, 0x30, 0x60, 0x00, 0xC0, 0x00, 0x00, 0x06, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x63, 0xC0, 0x18, 0x00, 0x06, 0x8C, 0x01, 0x00, 0x06, 0x18, 0x30, 0x06, 0x0C, 0x30, 0x00, 0x60, 0x30, 0x07, 0xC0, 0x80, 0x31, 0x66, 0xC0, 0x18, 0x30, 0x06, 0x8C, 0x01, 0x63, 0x00, 0x00, 0x30, 0x60, 0x80, 0x01, 0x03, 0x1B, 0x18, 0x63, 0x1C, 0x87, 0x01, 0xC3, 0x01, 0x80, 0x01, 0xC0, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x60, 0x0C, 0xFC, 0x0F, 0x66, 0xE6, 0xF8, 0x00, 0x00, 0x60, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x0C, 0x60, 0x00, 0x0E, 0x0E, 0x30, 0xE0, 0x00, 0x38, 0x38, 0x00, 0x8C, 0x83, 0xE3, 0xE0, 0x00, 0x03, 0x0E, 0x0E, 0x80, 0x03, 0x0C, 0x00, 0x03, 0x80, 0x03, 0x00, 0x80, 0x03, 0x00, 0x03, 0x0E, 0x80, 0x01, 0x63, 0xE0, 0x38, 0x38, 0x06, 0x87, 0x01, 0x60, 0x00, 0x38, 0x38, 0x06, 0x0C, 0x30, 0xE0, 0x70, 0x18, 0x1C, 0x06, 0x80, 0x01, 0x66, 0xC0, 0x38, 0x38, 0x06, 0x80, 0xE3, 0x63, 0x38, 0x38, 0x38, 0xC0, 0x80, 0x83, 0x03, 0x0E, 0x38, 0x70, 0x0C, 0x06, 0x30, 0x60, 0x00, 0xC0, 0x00, 0x00, 0x06, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x63, 0xE0, 0x38, 0x38, 0x0E, 0x8C, 0x83, 0x03, 0x06, 0x38, 0x30, 0x06, 0x0C, 0x30, 0x00, 0x60, 0x30, 0x0E, 0xC0, 0x80, 0x31, 0x66, 0xC0, 0x38, 0x38, 0x06, 0x8E, 0x03, 0x63, 0x00, 0x38, 0x38, 0x60, 0x80, 0x03, 0x03, 0x1B, 0x38, 0x73, 0x0E, 0x8E, 0x03, 0xE3, 0x00, 0x80, 0x03, 0xC0, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x60, 0x0C, 0xF8, 0x07, 0xE3, 0xC7, 0xDF, 0x01, 0x00, 0xC0, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x0C, 0x30, 0x00, 0xFC, 0x07, 0xFE, 0xE1, 0xFF, 0xF0, 0x1F, 0x00, 0x0C, 0xFF, 0xC1, 0x7F, 0x00, 0x03, 0xFC, 0x07, 0xFF, 0x01, 0x0C, 0x00, 0x03, 0x00, 0x07, 0x00, 0xC0, 0x01, 0x00, 0x03, 0xFC, 0x9F, 0x01, 0xE3, 0x7F, 0xF0, 0x1F, 0xFE, 0x83, 0xFF, 0x63, 0x00, 0xF0, 0x1F, 0x06, 0x0C, 0xFC, 0xC0, 0x3F, 0x18, 0x38, 0xFE, 0x8F, 0x01, 0x66, 0xC0, 0xF0, 0x1F, 0x06, 0x00, 0xFF, 0x61, 0x70, 0xF0, 0x1F, 0xC0, 0x00, 0xFF, 0x01, 0x0E, 0x18, 0x60, 0x06, 0x0C, 0x30, 0xE0, 0xFF, 0xC0, 0x0F, 0x00, 0x0C, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xE3, 0x7F, 0xF0, 0x1F, 0xFC, 0x0F, 0xFF, 0x01, 0x06, 0xF0, 0x3F, 0x06, 0x0C, 0xFC, 0x00, 0x60, 0x30, 0x1C, 0xF0, 0x83, 0x31, 0x66, 0xC0, 0xF0, 0x1F, 0xFE, 0x07, 0xFF, 0x63, 0x00, 0xF0, 0x1F, 0xE0, 0x07, 0xFF, 0x03, 0x0E, 0xF0, 0x3F, 0x06, 0x0C, 0xFF, 0xE3, 0xFF, 0x00, 0x0F, 0xC0, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x60, 0x0C, 0xC0, 0x00, 0xC3, 0x83, 0x8F, 0x01, 0x00, 0x80, 0x01, 0x0C, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x0C, 0x30, 0x00, 0xF8, 0x03, 0xFE, 0xE1, 0xFF, 0xE0, 0x0F, 0x00, 0x0C, 0xFE, 0x80, 0x3F, 0x00, 0x03, 0xF8, 0x03, 0xFF, 0x00, 0x0C, 0x00, 0x03, 0x00, 0x0E, 0x00, 0xE0, 0x00, 0x00, 0x03, 0xF8, 0x9F, 0x01, 0xE3, 0x3F, 0xE0, 0x0F, 0xFE, 0x80, 0xFF, 0x63, 0x00, 0xE0, 0x0F, 0x06, 0x0C, 0xFC, 0x80, 0x1F, 0x18, 0x30, 0xFE, 0x8F, 0x01, 0x66, 0xC0, 0xE0, 0x0F, 0x06, 0x00, 0xFE, 0x61, 0xE0, 0xE0, 0x0F, 0xC0, 0x00, 0xFE, 0x00, 0x0E, 0x18, 0x60, 0x06, 0x0C, 0x30, 0xE0, 0xFF, 0xC0, 0x0F, 0x00, 0x0C, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xE3, 0x3F, 0xE0, 0x0F, 0xF8, 0x0F, 0xFE, 0x00, 0x06, 0xE0, 0x3F, 0x06, 0x0C, 0xFC, 0x00, 0x60, 0x30, 0x38, 0xF0, 0x83, 0x31, 0x66, 0xC0, 0xE0, 0x0F, 0xFE, 0x03, 0xFE, 0x63, 0x00, 0xE0, 0x0F, 0xC0, 0x07, 0xFE, 0x03, 0x0E, 0xE0, 0x1F, 0x06, 0x0C, 0xFE, 0xE3, 0xFF, 0x00, 0x0E, 0xC0, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0xC0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0xC0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0xC0, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x1F, 0x00, 0x00, 0x00, 0x80, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; #define font32_width 1581 #define font32_height 32 static unsigned char font32_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x0E, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x0E, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x38, 0x0E, 0x38, 0x0E, 0xC0, 0x01, 0xF8, 0x38, 0xF0, 0x03, 0xC0, 0x01, 0x00, 0x07, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xF8, 0x0F, 0xC0, 0x01, 0xF8, 0x0F, 0xF8, 0x0F, 0x00, 0x38, 0xFE, 0x3F, 0xF8, 0x1F, 0xFE, 0x3F, 0xF8, 0x0F, 0xF8, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x1C, 0x00, 0xF8, 0x0F, 0xF8, 0x1F, 0xF8, 0x0F, 0xFE, 0x0F, 0xF8, 0x0F, 0xFE, 0x03, 0xFE, 0x3F, 0xFE, 0x3F, 0xF8, 0x0F, 0x0E, 0x38, 0xF0, 0x07, 0x00, 0x7F, 0x0E, 0x30, 0x0E, 0x00, 0x0E, 0x70, 0x0E, 0x38, 0xF8, 0x0F, 0xFE, 0x0F, 0xF8, 0x0F, 0xFE, 0x0F, 0xF8, 0x0F, 0xFE, 0x3F, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x70, 0x0E, 0x38, 0x0E, 0x38, 0xFE, 0x3F, 0xF0, 0x0F, 0x1C, 0x00, 0xF0, 0x0F, 0x70, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x0E, 0x00, 0xC0, 0x01, 0x00, 0x1C, 0x1C, 0x00, 0xF0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0F, 0xC0, 0x01, 0x7C, 0x00, 0xEE, 0x39, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x38, 0x0E, 0x38, 0x0E, 0xF8, 0x0F, 0xFC, 0x39, 0xF8, 0x07, 0xC0, 0x01, 0x80, 0x03, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xFC, 0x1F, 0xE0, 0x01, 0xFC, 0x1F, 0xFC, 0x1F, 0x00, 0x3C, 0xFE, 0x3F, 0xFC, 0x1F, 0xFE, 0x3F, 0xFC, 0x1F, 0xFC, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x38, 0x00, 0xFC, 0x1F, 0xFC, 0x3F, 0xFC, 0x1F, 0xFE, 0x1F, 0xFC, 0x1F, 0xFE, 0x0F, 0xFE, 0x3F, 0xFE, 0x3F, 0xFC, 0x1F, 0x0E, 0x38, 0xF0, 0x07, 0x00, 0x7F, 0x0E, 0x38, 0x0E, 0x00, 0x0E, 0x70, 0x0E, 0x38, 0xFC, 0x1F, 0xFE, 0x1F, 0xFC, 0x1F, 0xFE, 0x1F, 0xFC, 0x1F, 0xFE, 0x3F, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x70, 0x0E, 0x38, 0x0E, 0x38, 0xFE, 0x3F, 0xF0, 0x0F, 0x1C, 0x00, 0xF0, 0x0F, 0x38, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x80, 0x7F, 0x00, 0x00, 0x0E, 0x00, 0xC0, 0x01, 0x00, 0x1C, 0x1C, 0x00, 0xF0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x0F, 0xC0, 0x01, 0xFC, 0x00, 0xCE, 0x3B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x38, 0x0E, 0x38, 0x0E, 0xFC, 0x1F, 0xDC, 0x1D, 0x1C, 0x0E, 0xC0, 0x01, 0xC0, 0x01, 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x1E, 0x3C, 0xF0, 0x01, 0x1E, 0x3C, 0x1E, 0x3C, 0x00, 0x3E, 0x0E, 0x00, 0x1E, 0x00, 0x0E, 0x38, 0x1E, 0x3C, 0x1E, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x70, 0x00, 0x1E, 0x3C, 0x1E, 0x70, 0x1E, 0x3C, 0x0E, 0x3C, 0x1E, 0x3C, 0x0E, 0x1E, 0x0E, 0x00, 0x0E, 0x00, 0x1E, 0x3C, 0x0E, 0x38, 0xC0, 0x01, 0x00, 0x1C, 0x0E, 0x1C, 0x0E, 0x00, 0x1E, 0x78, 0x0E, 0x38, 0x1E, 0x3C, 0x0E, 0x3C, 0x1E, 0x3C, 0x0E, 0x3C, 0x1E, 0x3C, 0xC0, 0x01, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x70, 0x1C, 0x1C, 0x0E, 0x38, 0x00, 0x38, 0x70, 0x00, 0x38, 0x00, 0x00, 0x0E, 0x1C, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0xC0, 0x03, 0x00, 0x00, 0x0E, 0x00, 0xC0, 0x01, 0x00, 0x1C, 0x1C, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x01, 0xC0, 0x01, 0xE0, 0x01, 0x8E, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x38, 0x0E, 0x38, 0x0E, 0xDE, 0x3D, 0xDC, 0x1D, 0x1C, 0x0E, 0xC0, 0x01, 0xE0, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x0E, 0x38, 0xF8, 0x01, 0x0E, 0x38, 0x0E, 0x38, 0x00, 0x3F, 0x0E, 0x00, 0x0E, 0x00, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0xE0, 0x00, 0x0E, 0x38, 0x0E, 0x60, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x1C, 0x0E, 0x00, 0x0E, 0x00, 0x0E, 0x38, 0x0E, 0x38, 0xC0, 0x01, 0x00, 0x1C, 0x0E, 0x0E, 0x0E, 0x00, 0x3E, 0x7C, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0xC0, 0x01, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x70, 0x1C, 0x1C, 0x1C, 0x1C, 0x00, 0x38, 0x70, 0x00, 0x38, 0x00, 0x00, 0x0E, 0x0E, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x0E, 0x00, 0xC0, 0x01, 0x00, 0x1C, 0x1C, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x00, 0xC0, 0x01, 0xC0, 0x01, 0x0E, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x38, 0x0E, 0xCE, 0x39, 0xFC, 0x0F, 0x1C, 0x0E, 0x00, 0x00, 0xE0, 0x00, 0x80, 0x03, 0x1C, 0x1C, 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x0E, 0x38, 0xF8, 0x01, 0x0E, 0x38, 0x0E, 0x38, 0x80, 0x3B, 0x0E, 0x00, 0x0E, 0x00, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0xC0, 0x01, 0x0E, 0x38, 0x8E, 0x7F, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x00, 0x0E, 0x00, 0x0E, 0x38, 0x0E, 0x38, 0xC0, 0x01, 0x00, 0x1C, 0x0E, 0x07, 0x0E, 0x00, 0x7E, 0x7E, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0xC0, 0x01, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x70, 0x38, 0x0E, 0x1C, 0x1C, 0x00, 0x38, 0x70, 0x00, 0x70, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x00, 0xC0, 0x01, 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0xFE, 0x3F, 0xCE, 0x01, 0xF8, 0x0E, 0x1C, 0x0E, 0x00, 0x00, 0x70, 0x00, 0x00, 0x07, 0x38, 0x0E, 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x0E, 0x3C, 0xC0, 0x01, 0x0E, 0x38, 0x00, 0x38, 0xC0, 0x39, 0x0E, 0x00, 0x0E, 0x00, 0x0E, 0x1C, 0x0E, 0x38, 0x0E, 0x38, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x80, 0x03, 0x0E, 0x38, 0xCE, 0x7F, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x00, 0x0E, 0x38, 0x0E, 0x00, 0x0E, 0x00, 0x0E, 0x00, 0x0E, 0x38, 0xC0, 0x01, 0x00, 0x1C, 0x8E, 0x03, 0x0E, 0x00, 0x7E, 0x7E, 0x1E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x00, 0xC0, 0x01, 0x0E, 0x38, 0x1C, 0x1C, 0x0E, 0x70, 0x38, 0x0E, 0x38, 0x0E, 0x00, 0x1C, 0x70, 0x00, 0x70, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x00, 0xC0, 0x01, 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0xFE, 0x3F, 0xCE, 0x01, 0x00, 0x07, 0x1C, 0x0E, 0x00, 0x00, 0x70, 0x00, 0x00, 0x07, 0x70, 0x07, 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0E, 0x3E, 0xC0, 0x01, 0x0E, 0x38, 0x00, 0x38, 0xE0, 0x38, 0x0E, 0x00, 0x0E, 0x00, 0x00, 0x1C, 0x0E, 0x38, 0x0E, 0x38, 0xC0, 0x01, 0xC0, 0x01, 0xE0, 0x00, 0xFE, 0x3F, 0x00, 0x07, 0x0E, 0x38, 0xEE, 0x71, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x00, 0x0E, 0x38, 0x0E, 0x00, 0x0E, 0x00, 0x0E, 0x00, 0x0E, 0x38, 0xC0, 0x01, 0x00, 0x1C, 0xCE, 0x01, 0x0E, 0x00, 0xEE, 0x77, 0x3E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x00, 0xC0, 0x01, 0x0E, 0x38, 0x1C, 0x1C, 0x0E, 0x70, 0x70, 0x07, 0x38, 0x0E, 0x00, 0x0E, 0x70, 0x00, 0xE0, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x0F, 0xFE, 0x0F, 0xF8, 0x0F, 0xF8, 0x3F, 0xF8, 0x0F, 0xFC, 0x1F, 0xF8, 0x3F, 0xFE, 0x0F, 0xF0, 0x01, 0x00, 0x1F, 0x1C, 0x38, 0xC0, 0x01, 0xFE, 0x0F, 0xFE, 0x0F, 0xF8, 0x0F, 0xFE, 0x0F, 0xF8, 0x3F, 0xCE, 0x3F, 0xF8, 0x0F, 0xFE, 0x0F, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0xFE, 0x3F, 0xE0, 0x00, 0xC0, 0x01, 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x38, 0x0E, 0xCE, 0x01, 0x00, 0x07, 0x38, 0x07, 0x00, 0x00, 0x70, 0x00, 0x00, 0x07, 0xE0, 0x03, 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0E, 0x3F, 0xC0, 0x01, 0x00, 0x38, 0x00, 0x38, 0x70, 0x38, 0x0E, 0x00, 0x0E, 0x00, 0x00, 0x0E, 0x0E, 0x38, 0x0E, 0x38, 0xC0, 0x01, 0xC0, 0x01, 0x70, 0x00, 0xFE, 0x3F, 0x00, 0x0E, 0x00, 0x1C, 0xEE, 0x70, 0x0E, 0x38, 0x0E, 0x1C, 0x0E, 0x00, 0x0E, 0x38, 0x0E, 0x00, 0x0E, 0x00, 0x0E, 0x00, 0x0E, 0x38, 0xC0, 0x01, 0x00, 0x1C, 0xEE, 0x00, 0x0E, 0x00, 0xCE, 0x73, 0x7E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x00, 0xC0, 0x01, 0x0E, 0x38, 0x1C, 0x1C, 0x0E, 0x70, 0x70, 0x07, 0x70, 0x07, 0x00, 0x07, 0x70, 0x00, 0xE0, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x1F, 0xFE, 0x1F, 0xFC, 0x1F, 0xFC, 0x3F, 0xFC, 0x1F, 0xFC, 0x1F, 0xFC, 0x3F, 0xFE, 0x1F, 0xF0, 0x01, 0x00, 0x1F, 0x1C, 0x1C, 0xC0, 0x01, 0xFE, 0x1F, 0xFE, 0x1F, 0xFC, 0x1F, 0xFE, 0x1F, 0xFC, 0x3F, 0xEE, 0x3F, 0xFC, 0x1F, 0xFE, 0x0F, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0xFE, 0x3F, 0xE0, 0x00, 0xC0, 0x01, 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x38, 0x0E, 0xDE, 0x01, 0x80, 0x03, 0xF0, 0x03, 0x00, 0x00, 0x70, 0x00, 0x00, 0x07, 0xC0, 0x01, 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x8E, 0x3B, 0xC0, 0x01, 0x00, 0x1C, 0x00, 0x3C, 0x38, 0x38, 0xFE, 0x0F, 0xFE, 0x0F, 0x00, 0x0E, 0x1E, 0x3C, 0x0E, 0x38, 0xC0, 0x01, 0xC0, 0x01, 0x38, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x0E, 0xEE, 0x70, 0x0E, 0x38, 0xFE, 0x0F, 0x0E, 0x00, 0x0E, 0x38, 0x0E, 0x00, 0x0E, 0x00, 0x0E, 0x00, 0x0E, 0x38, 0xC0, 0x01, 0x00, 0x1C, 0x7E, 0x00, 0x0E, 0x00, 0xCE, 0x73, 0xEE, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x1E, 0x00, 0xC0, 0x01, 0x0E, 0x38, 0x1C, 0x1C, 0x0E, 0x70, 0xE0, 0x03, 0x70, 0x07, 0x80, 0x03, 0x70, 0x00, 0xC0, 0x01, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x0E, 0x3C, 0x1E, 0x3C, 0x1E, 0x38, 0x1E, 0x3C, 0xC0, 0x01, 0x1E, 0x38, 0x0E, 0x3C, 0xC0, 0x01, 0x00, 0x1C, 0x1C, 0x0E, 0xC0, 0x01, 0xCE, 0x3D, 0x0E, 0x3C, 0x1E, 0x3C, 0x0E, 0x3C, 0x1E, 0x38, 0x7E, 0x00, 0x1E, 0x3C, 0xE0, 0x00, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x00, 0x1C, 0xE0, 0x00, 0xC0, 0x01, 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x38, 0x0E, 0xFC, 0x0F, 0x80, 0x03, 0xF0, 0x01, 0x00, 0x00, 0x70, 0x00, 0x00, 0x07, 0xFE, 0x3F, 0xFE, 0x3F, 0x00, 0x00, 0xFE, 0x3F, 0x00, 0x00, 0x80, 0x03, 0xCE, 0x39, 0xC0, 0x01, 0x00, 0x0E, 0xF0, 0x1F, 0x1C, 0x38, 0xFE, 0x1F, 0xFE, 0x1F, 0x00, 0x07, 0xFC, 0x1F, 0x1E, 0x38, 0xC0, 0x01, 0xC0, 0x01, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x07, 0xEE, 0x70, 0x0E, 0x38, 0xFE, 0x0F, 0x0E, 0x00, 0x0E, 0x38, 0xFE, 0x07, 0xFE, 0x07, 0x8E, 0x3F, 0xFE, 0x3F, 0xC0, 0x01, 0x00, 0x1C, 0x3E, 0x00, 0x0E, 0x00, 0x8E, 0x71, 0xCE, 0x39, 0x0E, 0x38, 0x0E, 0x3C, 0x0E, 0x38, 0x0E, 0x3C, 0xFC, 0x0F, 0xC0, 0x01, 0x0E, 0x38, 0x1C, 0x1C, 0x0E, 0x70, 0xE0, 0x03, 0xE0, 0x03, 0xC0, 0x01, 0x70, 0x00, 0xC0, 0x01, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0xC0, 0x01, 0x0E, 0x38, 0x0E, 0x38, 0xC0, 0x01, 0x00, 0x1C, 0x1C, 0x07, 0xC0, 0x01, 0xCE, 0x39, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x3E, 0x00, 0x0E, 0x00, 0xE0, 0x00, 0x0E, 0x38, 0x1C, 0x1C, 0x0E, 0x38, 0x1C, 0x1C, 0x0E, 0x38, 0x00, 0x0E, 0x7C, 0x00, 0xC0, 0x01, 0x80, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x38, 0x0E, 0xF8, 0x1F, 0xC0, 0x01, 0xF8, 0x73, 0x00, 0x00, 0x70, 0x00, 0x00, 0x07, 0xFE, 0x3F, 0xFE, 0x3F, 0x00, 0x00, 0xFE, 0x3F, 0x00, 0x00, 0xC0, 0x01, 0xEE, 0x38, 0xC0, 0x01, 0x00, 0x07, 0xF0, 0x1F, 0x0E, 0x38, 0x00, 0x3C, 0x0E, 0x3C, 0x00, 0x07, 0xFC, 0x1F, 0xFC, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x38, 0x80, 0x03, 0xEE, 0x70, 0xFE, 0x3F, 0x0E, 0x1C, 0x0E, 0x00, 0x0E, 0x38, 0xFE, 0x07, 0xFE, 0x07, 0x8E, 0x3F, 0xFE, 0x3F, 0xC0, 0x01, 0x00, 0x1C, 0x3E, 0x00, 0x0E, 0x00, 0x0E, 0x70, 0x8E, 0x3B, 0x0E, 0x38, 0xFE, 0x1F, 0x0E, 0x38, 0xFE, 0x1F, 0xF8, 0x1F, 0xC0, 0x01, 0x0E, 0x38, 0x38, 0x0E, 0x8E, 0x71, 0xE0, 0x03, 0xE0, 0x03, 0xE0, 0x00, 0x70, 0x00, 0x80, 0x03, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x0E, 0x38, 0x0E, 0x00, 0x0E, 0x38, 0x0E, 0x38, 0xC0, 0x01, 0x0E, 0x38, 0x0E, 0x38, 0xC0, 0x01, 0x00, 0x1C, 0x9C, 0x03, 0xC0, 0x01, 0xCE, 0x39, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x1E, 0x00, 0x0E, 0x00, 0xE0, 0x00, 0x0E, 0x38, 0x1C, 0x1C, 0xCE, 0x39, 0x38, 0x0E, 0x0E, 0x38, 0x00, 0x07, 0x7C, 0x00, 0xC0, 0x01, 0x80, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x38, 0x0E, 0xC0, 0x3D, 0xC0, 0x01, 0x1C, 0x77, 0x00, 0x00, 0x70, 0x00, 0x00, 0x07, 0xC0, 0x01, 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x7E, 0x38, 0xC0, 0x01, 0x80, 0x03, 0x00, 0x3C, 0x0E, 0x38, 0x00, 0x38, 0x0E, 0x38, 0x80, 0x03, 0x1E, 0x3C, 0xF8, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xC0, 0x01, 0xEE, 0x70, 0xFE, 0x3F, 0x0E, 0x38, 0x0E, 0x00, 0x0E, 0x38, 0x0E, 0x00, 0x0E, 0x00, 0x0E, 0x38, 0x0E, 0x38, 0xC0, 0x01, 0x00, 0x1C, 0x7E, 0x00, 0x0E, 0x00, 0x0E, 0x70, 0x0E, 0x3F, 0x0E, 0x38, 0xFE, 0x0F, 0x0E, 0x38, 0xFE, 0x0F, 0x00, 0x3C, 0xC0, 0x01, 0x0E, 0x38, 0x38, 0x0E, 0xCE, 0x73, 0xE0, 0x03, 0xC0, 0x01, 0x70, 0x00, 0x70, 0x00, 0x80, 0x03, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x3F, 0x0E, 0x38, 0x0E, 0x00, 0x0E, 0x38, 0x0E, 0x38, 0xC0, 0x01, 0x0E, 0x38, 0x0E, 0x38, 0xC0, 0x01, 0x00, 0x1C, 0xDC, 0x01, 0xC0, 0x01, 0xCE, 0x39, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x00, 0x1E, 0x00, 0xE0, 0x00, 0x0E, 0x38, 0x1C, 0x1C, 0xCE, 0x39, 0x70, 0x07, 0x0E, 0x38, 0x80, 0x03, 0xE0, 0x00, 0xC0, 0x01, 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x38, 0x0E, 0xC0, 0x39, 0xE0, 0x00, 0x0E, 0x3E, 0x00, 0x00, 0x70, 0x00, 0x00, 0x07, 0xE0, 0x03, 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x3E, 0x38, 0xC0, 0x01, 0xC0, 0x01, 0x00, 0x38, 0x0E, 0x38, 0x00, 0x38, 0x0E, 0x38, 0x80, 0x03, 0x0E, 0x38, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xFE, 0x3F, 0x00, 0x0E, 0xC0, 0x01, 0xEE, 0x70, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x00, 0x0E, 0x38, 0x0E, 0x00, 0x0E, 0x00, 0x0E, 0x38, 0x0E, 0x38, 0xC0, 0x01, 0x00, 0x1C, 0xEE, 0x00, 0x0E, 0x00, 0x0E, 0x70, 0x0E, 0x3E, 0x0E, 0x38, 0x0E, 0x00, 0x0E, 0x38, 0x7E, 0x00, 0x00, 0x38, 0xC0, 0x01, 0x0E, 0x38, 0x38, 0x0E, 0xCE, 0x73, 0x70, 0x07, 0xC0, 0x01, 0x38, 0x00, 0x70, 0x00, 0x00, 0x07, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x3F, 0x0E, 0x38, 0x0E, 0x00, 0x0E, 0x38, 0xFE, 0x3F, 0xC0, 0x01, 0x0E, 0x38, 0x0E, 0x38, 0xC0, 0x01, 0x00, 0x1C, 0xFC, 0x00, 0xC0, 0x01, 0xCE, 0x39, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x00, 0xFC, 0x0F, 0xE0, 0x00, 0x0E, 0x38, 0x38, 0x0E, 0xCE, 0x39, 0xE0, 0x03, 0x0E, 0x38, 0xC0, 0x01, 0xE0, 0x00, 0xC0, 0x01, 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x3F, 0xC0, 0x39, 0xE0, 0x00, 0x0E, 0x1C, 0x00, 0x00, 0x70, 0x00, 0x00, 0x07, 0x70, 0x07, 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x1E, 0x38, 0xC0, 0x01, 0xE0, 0x00, 0x00, 0x38, 0xFE, 0x3F, 0x00, 0x38, 0x0E, 0x38, 0xC0, 0x01, 0x0E, 0x38, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x00, 0xFE, 0x3F, 0x00, 0x07, 0xC0, 0x01, 0xEE, 0x79, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x00, 0x0E, 0x38, 0x0E, 0x00, 0x0E, 0x00, 0x0E, 0x38, 0x0E, 0x38, 0xC0, 0x01, 0x00, 0x1C, 0xCE, 0x01, 0x0E, 0x00, 0x0E, 0x70, 0x0E, 0x3C, 0x0E, 0x38, 0x0E, 0x00, 0x0E, 0x38, 0xEE, 0x00, 0x00, 0x38, 0xC0, 0x01, 0x0E, 0x38, 0x38, 0x0E, 0xEE, 0x77, 0x70, 0x07, 0xC0, 0x01, 0x1C, 0x00, 0x70, 0x00, 0x00, 0x07, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x38, 0x0E, 0x38, 0x0E, 0x00, 0x0E, 0x38, 0xFE, 0x3F, 0xC0, 0x01, 0x0E, 0x38, 0x0E, 0x38, 0xC0, 0x01, 0x00, 0x1C, 0xFC, 0x00, 0xC0, 0x01, 0xCE, 0x39, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x00, 0xF8, 0x1F, 0xE0, 0x00, 0x0E, 0x38, 0x38, 0x0E, 0xCE, 0x39, 0xE0, 0x03, 0x0E, 0x38, 0xE0, 0x00, 0xE0, 0x00, 0xC0, 0x01, 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x3F, 0xC0, 0x39, 0x70, 0x1F, 0x0E, 0x1C, 0x00, 0x00, 0x70, 0x00, 0x00, 0x07, 0x38, 0x0E, 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x0E, 0x38, 0xC0, 0x01, 0x70, 0x00, 0x00, 0x38, 0xFE, 0x3F, 0x00, 0x38, 0x0E, 0x38, 0xC0, 0x01, 0x0E, 0x38, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0xCE, 0x7F, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x00, 0x0E, 0x38, 0x0E, 0x00, 0x0E, 0x00, 0x0E, 0x38, 0x0E, 0x38, 0xC0, 0x01, 0x0E, 0x1C, 0x8E, 0x03, 0x0E, 0x00, 0x0E, 0x70, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x00, 0x0E, 0x38, 0xCE, 0x01, 0x00, 0x38, 0xC0, 0x01, 0x0E, 0x38, 0x70, 0x07, 0x7E, 0x7E, 0x38, 0x0E, 0xC0, 0x01, 0x0E, 0x00, 0x70, 0x00, 0x00, 0x0E, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x00, 0x0E, 0x38, 0x0E, 0x00, 0xC0, 0x01, 0x0E, 0x38, 0x0E, 0x38, 0xC0, 0x01, 0x00, 0x1C, 0xDC, 0x01, 0xC0, 0x01, 0xCE, 0x39, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x00, 0x00, 0x3C, 0xE0, 0x00, 0x0E, 0x38, 0x38, 0x0E, 0xCE, 0x39, 0x70, 0x07, 0x0E, 0x38, 0x70, 0x00, 0xE0, 0x00, 0xC0, 0x01, 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x0E, 0xCE, 0x39, 0xF0, 0x3F, 0x0E, 0x1C, 0x00, 0x00, 0xE0, 0x00, 0x80, 0x03, 0x1C, 0x1C, 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x0E, 0x38, 0xC0, 0x01, 0x38, 0x00, 0x0E, 0x38, 0x00, 0x38, 0x00, 0x38, 0x0E, 0x38, 0xC0, 0x01, 0x0E, 0x38, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x8E, 0x6F, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x00, 0x0E, 0x00, 0x0E, 0x38, 0x0E, 0x38, 0xC0, 0x01, 0x0E, 0x1C, 0x0E, 0x07, 0x0E, 0x00, 0x0E, 0x70, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x00, 0x0E, 0x38, 0x8E, 0x03, 0x0E, 0x38, 0xC0, 0x01, 0x0E, 0x38, 0x70, 0x07, 0x7E, 0x7E, 0x38, 0x0E, 0xC0, 0x01, 0x0E, 0x00, 0x70, 0x00, 0x00, 0x0E, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x00, 0x0E, 0x38, 0x0E, 0x00, 0xC0, 0x01, 0x0E, 0x38, 0x0E, 0x38, 0xC0, 0x01, 0x00, 0x1C, 0x9C, 0x03, 0xC0, 0x01, 0xCE, 0x39, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x00, 0x00, 0x38, 0xE0, 0x00, 0x0E, 0x38, 0x70, 0x07, 0xCE, 0x39, 0x38, 0x0E, 0x0E, 0x38, 0x38, 0x00, 0xE0, 0x00, 0xC0, 0x01, 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x38, 0x0E, 0xDE, 0x3D, 0xB8, 0x3B, 0x0E, 0x1C, 0x00, 0x00, 0xE0, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0xC0, 0x01, 0x38, 0x00, 0x0E, 0x38, 0xC0, 0x01, 0x1C, 0x00, 0x0E, 0x38, 0x00, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0xC0, 0x01, 0x0E, 0x38, 0x00, 0x38, 0xC0, 0x01, 0xC0, 0x01, 0x00, 0x07, 0x00, 0x00, 0xE0, 0x00, 0xC0, 0x01, 0x0E, 0x00, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x1C, 0x0E, 0x00, 0x0E, 0x00, 0x0E, 0x38, 0x0E, 0x38, 0xC0, 0x01, 0x0E, 0x1C, 0x0E, 0x0E, 0x0E, 0x00, 0x0E, 0x70, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x00, 0xCE, 0x39, 0x0E, 0x07, 0x0E, 0x38, 0xC0, 0x01, 0x0E, 0x38, 0x70, 0x07, 0x3E, 0x7C, 0x1C, 0x1C, 0xC0, 0x01, 0x0E, 0x00, 0x70, 0x00, 0x00, 0x1C, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x00, 0xC0, 0x01, 0x0E, 0x38, 0x0E, 0x38, 0xC0, 0x01, 0x00, 0x1C, 0x1C, 0x07, 0xC0, 0x01, 0xCE, 0x39, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x00, 0x00, 0x38, 0xE0, 0x00, 0x0E, 0x38, 0x70, 0x07, 0xCE, 0x39, 0x1C, 0x1C, 0x0E, 0x38, 0x1C, 0x00, 0xE0, 0x00, 0xC0, 0x01, 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x38, 0x0E, 0xFC, 0x1F, 0xB8, 0x3B, 0x1E, 0x3E, 0x00, 0x00, 0xC0, 0x01, 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0xC0, 0x01, 0x38, 0x00, 0x1E, 0x3C, 0xC0, 0x01, 0x0E, 0x00, 0x1E, 0x3C, 0x00, 0x38, 0x1E, 0x38, 0x1E, 0x3C, 0xC0, 0x01, 0x1E, 0x3C, 0x00, 0x3C, 0xC0, 0x01, 0xC0, 0x01, 0x00, 0x0E, 0x00, 0x00, 0x70, 0x00, 0xC0, 0x01, 0x1E, 0x00, 0x0E, 0x38, 0x0E, 0x3C, 0x1E, 0x3C, 0x0E, 0x1E, 0x0E, 0x00, 0x0E, 0x00, 0x1E, 0x3C, 0x0E, 0x38, 0xC0, 0x01, 0x1E, 0x1E, 0x0E, 0x1C, 0x0E, 0x00, 0x0E, 0x70, 0x0E, 0x38, 0x1E, 0x3C, 0x0E, 0x00, 0x9E, 0x3F, 0x0E, 0x0E, 0x1E, 0x3C, 0xC0, 0x01, 0x1E, 0x3C, 0xE0, 0x03, 0x1E, 0x78, 0x1C, 0x1C, 0xC0, 0x01, 0x0E, 0x00, 0x70, 0x00, 0x00, 0x1C, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x38, 0x0E, 0x3C, 0x1E, 0x3C, 0x1E, 0x38, 0x1E, 0x38, 0xC0, 0x01, 0x1E, 0x38, 0x0E, 0x38, 0xC0, 0x01, 0x00, 0x1C, 0x1C, 0x0E, 0xC0, 0x01, 0xCE, 0x39, 0x0E, 0x38, 0x1E, 0x3C, 0x0E, 0x3C, 0x1E, 0x38, 0x0E, 0x00, 0x1E, 0x3C, 0xE0, 0x01, 0x1E, 0x38, 0xE0, 0x03, 0xDE, 0x3D, 0x0E, 0x38, 0x1E, 0x38, 0x0E, 0x00, 0xE0, 0x01, 0xC0, 0x01, 0xE0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x38, 0x0E, 0xF8, 0x0F, 0x9C, 0x3F, 0xFC, 0x77, 0x00, 0x00, 0x80, 0x03, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0xFC, 0x1F, 0xF8, 0x0F, 0xFE, 0x3F, 0xFC, 0x1F, 0x00, 0x38, 0xFC, 0x1F, 0xFC, 0x1F, 0xC0, 0x01, 0xFC, 0x1F, 0xFC, 0x1F, 0xC0, 0x01, 0xC0, 0x01, 0x00, 0x1C, 0x00, 0x00, 0x38, 0x00, 0xC0, 0x01, 0xFC, 0x7F, 0x0E, 0x38, 0xFE, 0x1F, 0xFC, 0x1F, 0xFE, 0x0F, 0xFE, 0x3F, 0x0E, 0x00, 0xFC, 0x1F, 0x0E, 0x38, 0xF0, 0x07, 0xFC, 0x0F, 0x0E, 0x38, 0xFE, 0x3F, 0x0E, 0x70, 0x0E, 0x38, 0xFC, 0x1F, 0x0E, 0x00, 0xFC, 0x1F, 0x0E, 0x1C, 0xFC, 0x1F, 0xC0, 0x01, 0xFC, 0x1F, 0xE0, 0x03, 0x0E, 0x70, 0x0E, 0x38, 0xC0, 0x01, 0xFE, 0x3F, 0xF0, 0x0F, 0x00, 0x38, 0xF0, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x3F, 0xFE, 0x1F, 0xFC, 0x1F, 0xFC, 0x3F, 0xFC, 0x3F, 0xC0, 0x01, 0xFC, 0x3F, 0x0E, 0x38, 0xF0, 0x07, 0x00, 0x1C, 0x1C, 0x1C, 0xF0, 0x07, 0xCE, 0x39, 0x0E, 0x38, 0xFC, 0x1F, 0xFE, 0x1F, 0xFC, 0x3F, 0x0E, 0x00, 0xFC, 0x1F, 0xC0, 0x3F, 0xFC, 0x3F, 0xE0, 0x03, 0xFC, 0x1F, 0x0E, 0x38, 0xFC, 0x3F, 0xFE, 0x3F, 0xC0, 0x0F, 0xC0, 0x01, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x38, 0x0E, 0xC0, 0x01, 0x1C, 0x1F, 0xF8, 0x73, 0x00, 0x00, 0x00, 0x07, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0xF8, 0x0F, 0xF8, 0x0F, 0xFE, 0x3F, 0xF8, 0x0F, 0x00, 0x38, 0xF8, 0x0F, 0xF8, 0x0F, 0xC0, 0x01, 0xF8, 0x0F, 0xFC, 0x0F, 0xC0, 0x01, 0xC0, 0x01, 0x00, 0x38, 0x00, 0x00, 0x1C, 0x00, 0xC0, 0x01, 0xF8, 0x7F, 0x0E, 0x38, 0xFE, 0x0F, 0xF8, 0x0F, 0xFE, 0x03, 0xFE, 0x3F, 0x0E, 0x00, 0xF8, 0x0F, 0x0E, 0x38, 0xF0, 0x07, 0xF8, 0x07, 0x0E, 0x30, 0xFE, 0x3F, 0x0E, 0x70, 0x0E, 0x38, 0xF8, 0x0F, 0x0E, 0x00, 0xF8, 0x0F, 0x0E, 0x38, 0xF8, 0x0F, 0xC0, 0x01, 0xF8, 0x0F, 0xE0, 0x03, 0x0E, 0x70, 0x0E, 0x38, 0xC0, 0x01, 0xFE, 0x3F, 0xF0, 0x0F, 0x00, 0x38, 0xF0, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x3F, 0xFE, 0x0F, 0xF8, 0x0F, 0xF8, 0x3F, 0xF8, 0x1F, 0xC0, 0x01, 0xF8, 0x3F, 0x0E, 0x38, 0xF0, 0x07, 0x00, 0x1C, 0x1C, 0x38, 0xF0, 0x07, 0xCE, 0x39, 0x0E, 0x38, 0xF8, 0x0F, 0xFE, 0x0F, 0xF8, 0x3F, 0x0E, 0x00, 0xF8, 0x0F, 0x80, 0x3F, 0xF8, 0x3F, 0xE0, 0x03, 0xF8, 0x0F, 0x0E, 0x38, 0xF8, 0x3F, 0xFE, 0x3F, 0x80, 0x0F, 0xC0, 0x01, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x1F, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x0F, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; namespace netgen { class Font { // opengl display list index (-1 if not initialized) int list_base; // width and height of font in pixels int w; int h; // raw data to draw for opengl unsigned char *char_bitmaps; // size of one character in bitmap (in bytes) int char_length; int char_w; int char_h; // first and last+1 character in bitmap font static constexpr char char_first = ' '; static constexpr char char_next = '~'+1; void setBit( char c, int x, int y) { unsigned char *cbits = getCharBitmap(c); int offset = x/8+(h-1-y)*char_w; int bit_nr = 7-x%8; cbits[offset] |= 1UL<-1) glDeleteLists(list_base, char_next-char_first); delete[] char_bitmaps; } unsigned char *getCharBitmap(char c) { return char_bitmaps + (c-char_first)*char_length; } int getDisplayListsBase() { // already initialized if(list_base>-1) return list_base; list_base = glGenLists(char_next-char_first) - char_first; for (char c=char_first; c //#include #include #include #include #include #include #include #include #include "inctcl.hpp" #include namespace netgen { extern VisualScene *vs; #include "demoview.hpp" /* static demokwstruct defkw[] = { { TOK_TIME, "t" }, { TOK_CAMPOS, "camerapos" }, { TOK_CAMPOINT, "camerapointto" }, { TOK_CAMUP, "cameraup" } }; */ static demoview_kwstruct demoview_defkw[] = { { DTOK_TIME, "t" }, { DTOK_CAMPOS, "camerapos" }, { DTOK_CAMPOINT, "camerapointto" }, { DTOK_CAMUP, "cameraup" } }; DemoScanner :: DemoScanner (ifstream & ascanin) { scanin = &ascanin; token = DTOK_END; num_value = 0; linenum = 1; } void DemoScanner :: ReadNext () { char ch; // whitespaces ueberspringen do { scanin->get(ch); if (ch == '\n') linenum++; // end of file reached if (scanin->eof()) { token = DTOK_END; return; } // skip comment line if (ch == '#') { while (ch != '\n') { scanin->get(ch); if (scanin->eof()) { token = DTOK_END; return; } } linenum++; } } while (isspace(ch)); switch (ch) { case '(': case ')': case '[': case ']': case '-': case ':': case '=': case ',': case ';': case '+': { token = DEMOVIEW_TOKEN_TYPE (ch); break; } default: { if (isdigit (ch) || ch == '.') { scanin->putback (ch); (*scanin) >> num_value; token = DTOK_NUM; return; } if (isalpha (ch)) { string_value = string (1, ch); scanin->get(ch); while (isalnum(ch)) { string_value += ch; scanin->get(ch); } scanin->putback (ch); } int nr = 0; while (demoview_defkw[nr].kw) { if (string_value == demoview_defkw[nr].name) { token = demoview_defkw[nr].kw; return; } nr++; } token = DTOK_STRING; } } } void DemoScanner :: Error (const string & err) { stringstream errstr; errstr << "Parsing error in line " << linenum << ": " << endl << err << endl; throw string(errstr.str()); } void ParseChar (DemoScanner & scan, char ch) { char str[2]; str[0] = ch; str[1] = 0; if (scan.GetToken() != DEMOVIEW_TOKEN_TYPE(ch)) scan.Error (string ("token '") + string(str) + string("' expected")); scan.ReadNext(); } double ParseNumber(DemoScanner & scan) { if (scan.GetToken() == '-') { scan.ReadNext(); return -ParseNumber (scan); } if (scan.GetToken() != DTOK_NUM) scan.Error ("number expected"); double val = scan.GetNumValue(); scan.ReadNext(); return val; } Vec<3> ParseVector (DemoScanner & scan) { Vec<3> s; s(0) = ParseNumber (scan); ParseChar (scan, ','); s(1) = ParseNumber (scan); ParseChar (scan, ','); s(2) = ParseNumber (scan); return s; } void ParseConstLineOrSpline (DemoScanner & scan, double * t, Vec<3> * s) { int np = 1; scan.ReadNext(); ParseChar (scan, '('); t[0] = ParseNumber (scan)*1000; ParseChar (scan, ':'); s[0] = ParseVector (scan); if (scan.GetToken() != DTOK_RP && scan.GetToken() != DTOK_SEMICOLON) scan.Error (") or ; expected"); if (scan.GetToken() == DTOK_SEMICOLON) { np++; scan.ReadNext(); t[1] = ParseNumber (scan)*1000; ParseChar (scan, ':'); s[1] = ParseVector (scan); if (scan.GetToken() != DTOK_RP && scan.GetToken() != DTOK_SEMICOLON) scan.Error (") or ; expected"); if (scan.GetToken() == DTOK_SEMICOLON) { np++; scan.ReadNext(); t[2] = ParseNumber (scan)*1000; ParseChar (scan, ':'); s[2] = ParseVector (scan); ParseChar (scan, ')'); ParseChar (scan, ';'); } else if (scan.GetToken() == DTOK_RP) { scan.ReadNext(); ParseChar (scan, ';'); } } else if (scan.GetToken() == DTOK_RP) { scan.ReadNext(); ParseChar (scan, ';'); } if (np == 1) // constant spline { t[1] = t[2] = t[0]; s[1] = s[2] = s[0]; } if (np == 2) // linear spline { t[2] = t[1]; t[1] = 0.5*(t[0] + t[2]); s[2] = s[1]; s[1] = 0.5*(s[0] + s[2]); } } template void InterpolationSpline :: AddSpline(double t1, double t2, double t3, S s1, S s2, S s3) { int pos, i, j; // find pos to insert interpotation point for (pos = 0; pos < ip.Size() && ip[pos][0].GetT() < t1; pos++) ; ip.SetSize( ip.Size()+1 ); for (i = ip.Size()-2; i >= pos; i--) for (j = 0; j < 3; j++) ip[i+1][j] = ip[i][j]; ip[pos][0].SetTS (t1, s1); ip[pos][1].SetTS (t2, s2); ip[pos][2].SetTS (t3, s3); } template S InterpolationSpline :: Evaluate (double t) { if (t < ip[0][0].GetT()) return (ip[0][0].GetS()); if (t > ip[ip.Size()-1][2].GetT()) { finished = 1; return (ip[ip.Size()-1][2].GetS()); } int pos; for (pos = 0; pos < ip.Size() && t >= ip[pos][0].GetT(); pos++) ; pos--; if (t >= ip[pos][0].GetT() && t <= ip[pos][2].GetT()) { double t0 = ip[pos][0].GetT(); double t1 = ip[pos][2].GetT(); double t01 = (t-t0)/(t1-t0); double b1, b2, b3, w; b1 = (1-t01)*(1-t01); b2 = sqrt(2.0) * t01 * (1-t01); b3 = t01 * t01; w = b1 + b2 + b3; return ( (1/w) * (b1 * ip[pos][0].GetS() + b2 * ip[pos][1].GetS() + b3 * ip[pos][2].GetS()) ); } else return (ip[pos][2].GetS()); } DemoView :: DemoView (const char * filename) : campos( Vec<3>(5,0,0) ), campoint ( Vec<3>(0,0,0) ), camup ( Vec<3>(0,0,1) ) { double time = 0; ifstream istr; istr.open(filename); DemoScanner scan(istr); double t[3]; Vec<3> s[3]; scan.ReadNext(); try { while (1) { if (scan.GetToken() == DTOK_END) break; if (scan.GetToken() == DTOK_CAMPOS) { ParseConstLineOrSpline (scan, &t[0], &s[0]); campos.AddSpline (time+t[0], time+t[1], time+t[2], s[0], s[1], s[2]); } else if (scan.GetToken() == DTOK_CAMUP) { ParseConstLineOrSpline (scan, &t[0], &s[0]); camup.AddSpline (time+t[0], time+t[1], time+t[2], s[0], s[1], s[2]); } else if (scan.GetToken() == DTOK_CAMPOINT) { ParseConstLineOrSpline (scan, &t[0], &s[0]); campoint.AddSpline (time+t[0], time+t[1], time+t[2], s[0], s[1], s[2]); } else if (scan.GetToken() == DTOK_TIME) { scan.ReadNext(); if (scan.GetToken() != DTOK_EQU && scan.GetToken() != DTOK_PLUS) scan.Error ("= or += expected"); if (scan.GetToken() == DTOK_EQU) { scan.ReadNext(); time = ParseNumber (scan)*1000; ParseChar (scan, ';'); } else if (scan.GetToken() == DTOK_PLUS) { scan.ReadNext(); ParseChar (scan, '='); time += ParseNumber (scan)*1000; ParseChar (scan, ';'); } } else { cout << "read unidentified token " << scan.GetToken() << " string = " << scan.GetStringValue() << endl; scan.ReadNext(); } } } catch (string errstr) { cout << "caught error " << errstr << endl; } } DemoView :: ~DemoView () { ; } int DemoView :: SetTime (double time) { /* cout << "time = " << time << endl; cout << "campos : " << campos.Evaluate (time) << endl; cout << "campoint: " << campoint.Evaluate (time) << endl; cout << "camup : " << camup.Evaluate (time) << endl; */ vs -> LookAt ( Point<3>( campos.Evaluate (time)), Point<3>(campoint.Evaluate (time)), Point<3>( camup.Evaluate (time)) ); if (campos.IsFinished() && campoint.IsFinished() && camup.IsFinished()) { return -1; } return 0; } } netgen-6.2.1804/ng/parallelfunc.cpp0000644000175000017500000002004713272137567015570 0ustar kurtkurt#ifdef PARALLEL #include "dlfcn.h" // #include #include // #include "incvis.hpp" #include #ifdef PARALLELGL #ifndef WIN32 #define GLX_GLXEXT_LEGACY #define GLX_GLXEXT_PROTOTYPES #include #include #include /* for XA_RGB_DEFAULT_MAP atom */ #include #include #endif #endif #include #include "../interface/writeuser.hpp" void (*NGS_ParallelRun) (const string & message) = NULL; namespace netgen { extern string ngdir; #ifdef OPENGL extern VisualSceneMesh vsmesh; #endif } void Parallel_Exit(); namespace netgen { extern std::shared_ptr ng_geometry; extern shared_ptr mesh; extern VisualSceneMesh vsmesh; extern VisualSceneSolution & GetVSSolution(); extern Flags parameters; extern DLL_HEADER MeshingParameters mparam; } using namespace netgen; using netgen::RegisterUserFormats; void ParallelRun() { VisualSceneSolution vssolution = GetVSSolution(); string message; MPI_Status status; MPI_Comm_size(MPI_COMM_WORLD, &ntasks); MPI_Comm_rank(MPI_COMM_WORLD, &id); if (parameters.StringFlagDefined ("testout")) testout = new ofstream (string("testout_proc") + id ); while ( true ) { message = MyMPI_RecvCmd(); if ( message.compare(0, 3, "ngs") == 0 ) { // PrintMessage ( 1, "Starting NgSolve routine ", message ) ; if (NGS_ParallelRun == NULL) { static int timer = NgProfiler::CreateTimer ("load shared library ngsolve"); NgProfiler::RegionTimer reg (timer); void * handle = dlopen ("libngsolve.so", RTLD_NOW | RTLD_GLOBAL); if (!handle) { cerr << "cannot load shared library libngsolve.so" << endl; exit(1); } NGS_ParallelRun = (void (*) (const string & message)) dlsym (handle, "NGS_ParallelRun"); if (!NGS_ParallelRun) { cerr << "cannot bind function NGS_ParallelRun" << endl; exit(1); } } (*NGS_ParallelRun) (message); } else if ( message == "mesh" ) { VT_USER_START ("Mesh::ReceiveParallelMesh"); mesh.reset( new netgen::Mesh); mesh->SendRecvMesh(); // vsmesh.SetMesh (mesh); // vssolution.SetMesh (mesh); SetGlobalMesh (mesh); VT_USER_END ("Mesh::ReceiveParallelMesh"); } else if ( message == "visualize" ) { cout << "parallel message visualize depreciated" << endl; } else if ( message == "bcastparthread" ) { MyMPI_Bcast (mparam.parthread); } #ifdef PARALLELGL else if ( message == "redraw" ) { // draw into the same GLX - drawing context // works on parallel machine, but // did not manage to get glXImportContextEXT working on Laptop (JS) string redraw_cmd; // MyMPI_Recv (redraw_cmd, 0, MPI_TAG_VIS); redraw_cmd = MyMPI_RecvCmd(); // PrintMessage (1, "Redraw - ", redraw_cmd); static string displname; static int curDrawable, contextid; static Display * display = NULL; static GLXContext context; static XVisualInfo * visinfo = 0; // if (!display) if (redraw_cmd == "init") { MyMPI_Recv (displname, 0, MPI_TAG_VIS); MyMPI_Recv (curDrawable, 0, MPI_TAG_VIS); MyMPI_Recv (contextid, 0, MPI_TAG_VIS); display = XOpenDisplay (displname.c_str()); /* PrintMessage (3, "displ - name = ", displname); PrintMessage (3, "display = ", display, " display props: ", " screen w = ", XDisplayWidth (display, 0), " , h = ", XDisplayHeight (display, 0)); */ /* Window win; int wx, wy; unsigned int ww, wh, bw, depth; cout << "got drawable: " << curDrawable << ", contextid: " << contextid << endl; cout << "get geometriy..." << endl; XGetGeometry(display, curDrawable, &win, &wx, &wy, &ww, &wh, &bw, &depth); cout << "have!" << endl; cout << "P" << id << ": window-props: x = " << wx << ", y = " << wy << ", w = " << ww << ", h = " << wh << ", depth = " << depth << endl; */ #define VISUAL #ifdef VISUAL #ifdef VISINFO_OLD //this does not seem to work anymore (but might still be with togl1.7?) // make a new GLXContext // first, generate a visual (copied from togl) int attrib_list[1000]; # define MAX_ATTEMPTS 12 static int ci_depths[MAX_ATTEMPTS] = { 8, 4, 2, 1, 12, 16, 8, 4, 2, 1, 12, 16 }; static int dbl_flags[MAX_ATTEMPTS] = { 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1 }; /* It may take a few tries to get a visual */ for (int attempt = 0; attempt < MAX_ATTEMPTS; attempt++) { int attrib_count = 0; attrib_list[attrib_count++] = GLX_USE_GL; /* RGB[A] mode */ attrib_list[attrib_count++] = GLX_RGBA; attrib_list[attrib_count++] = GLX_RED_SIZE; attrib_list[attrib_count++] = 1; attrib_list[attrib_count++] = GLX_GREEN_SIZE; attrib_list[attrib_count++] = 1; attrib_list[attrib_count++] = GLX_BLUE_SIZE; attrib_list[attrib_count++] = 1; // attrib_list[attrib_count++] = GLX_ALPHA_SIZE; // attrib_list[attrib_count++] = 1; attrib_list[attrib_count++] = GLX_DEPTH_SIZE; attrib_list[attrib_count++] = 1; attrib_list[attrib_count++] = GLX_DOUBLEBUFFER; attrib_list[attrib_count++] = None; visinfo = glXChooseVisual(display, 0, attrib_list); cout << "have vis?" << endl; if (visinfo) { /* found a GLX visual! */ // cout << "found VISINFO !!!" << endl; cout << "found VISINFO !!!" << endl; /* int hi = 0; std::cout << "attribs = "; while (attrib_list[hi] != None) std::cout << attrib_list[hi++] << " "; std::cout << std::endl; */ break; } } if (!visinfo) cerr << "no VISINFO found" << endl; #else //get all possible confs int nconfs; auto cptr = glXGetFBConfigs (display,0, &nconfs); Array conf_ids(nconfs); for(int k=0;kFBConfig->visual unsigned int d_fbc_id; glXQueryDrawable( display, curDrawable, GLX_FBCONFIG_ID, &d_fbc_id); GLXFBConfig d_fbc; for(int k=0;kacceleration != y->acceleration) return y->acceleration - x->acceleration; if (x->colors != y->colors) return y->colors - x->colors; if (x->depth != y->depth) return y->depth - x->depth; if (x->samples != y->samples) return y->samples - x->samples; return 0; } #ifdef DEBUG_GLX static int fatal_error(Display *dpy, XErrorEvent * event) { char buf[256]; XGetErrorText(dpy, event->error_code, buf, sizeof buf); fprintf(stderr, "%s\n", buf); abort(); } #endif static XVisualInfo * togl_pixelFormat(Togl *togl, int scrnum) { int attribs[256]; int na = 0; int i; XVisualInfo *visinfo; FBInfo *info; static int loadedOpenGL = False; if (!loadedOpenGL) { int dummy; int major, minor; const char *extensions; /* Make sure OpenGL's GLX extension supported */ if (!glXQueryExtension(togl->display, &dummy, &dummy)) { Tcl_SetResult(togl->Interp, TCL_STUPID "X server is missing OpenGL GLX extension", TCL_STATIC); return NULL; } loadedOpenGL = True; #ifdef DEBUG_GLX (void) XSetErrorHandler(fatal_error); #endif glXQueryVersion(togl->display, &major, &minor); extensions = glXQueryExtensionsString(togl->display, scrnum); if (major > 1 || (major == 1 && minor >= 3)) { chooseFBConfig = (PFNGLXCHOOSEFBCONFIGPROC) Togl_GetProcAddr("glXChooseFBConfig"); getFBConfigAttrib = (PFNGLXGETFBCONFIGATTRIBPROC) Togl_GetProcAddr("glXGetFBConfigAttrib"); getVisualFromFBConfig = (PFNGLXGETVISUALFROMFBCONFIGPROC) Togl_GetProcAddr("glXGetVisualFromFBConfig"); createPbuffer = (PFNGLXCREATEPBUFFERPROC) Togl_GetProcAddr("glXCreatePbuffer"); destroyPbuffer = (PFNGLXDESTROYPBUFFERPROC) Togl_GetProcAddr("glXDestroyPbuffer"); queryPbuffer = (PFNGLXQUERYDRAWABLEPROC) Togl_GetProcAddr("glXQueryDrawable"); if (createPbuffer && destroyPbuffer && queryPbuffer) { hasPbuffer = True; } else { createPbuffer = NULL; destroyPbuffer = NULL; queryPbuffer = NULL; } } if (major == 1 && minor == 2) { chooseFBConfig = (PFNGLXCHOOSEFBCONFIGPROC) Togl_GetProcAddr("glXChooseFBConfigSGIX"); getFBConfigAttrib = (PFNGLXGETFBCONFIGATTRIBPROC) Togl_GetProcAddr("glXGetFBConfigAttribSGIX"); getVisualFromFBConfig = (PFNGLXGETVISUALFROMFBCONFIGPROC) Togl_GetProcAddr("glXGetVisualFromFBConfigSGIX"); if (strstr(extensions, "GLX_SGIX_pbuffer") != NULL) { createPbufferSGIX = (PFNGLXCREATEGLXPBUFFERSGIXPROC) Togl_GetProcAddr("glXCreateGLXPbufferSGIX"); destroyPbuffer = (PFNGLXDESTROYPBUFFERPROC) Togl_GetProcAddr("glXDestroyGLXPbufferSGIX"); queryPbuffer = (PFNGLXQUERYDRAWABLEPROC) Togl_GetProcAddr("glXQueryGLXPbufferSGIX"); if (createPbufferSGIX && destroyPbuffer && queryPbuffer) { hasPbuffer = True; } else { createPbufferSGIX = NULL; destroyPbuffer = NULL; queryPbuffer = NULL; } } } if (chooseFBConfig) { /* verify that chooseFBConfig works (workaround Mesa 6.5 bug) */ int n = 0; GLXFBConfig *cfgs; attribs[n++] = GLX_RENDER_TYPE; attribs[n++] = GLX_RGBA_BIT; attribs[n++] = None; cfgs = chooseFBConfig(togl->display, scrnum, attribs, &n); if (cfgs == NULL || n == 0) { chooseFBConfig = NULL; } XFree(cfgs); } if (chooseFBConfig == NULL || getFBConfigAttrib == NULL || getVisualFromFBConfig == NULL) { chooseFBConfig = NULL; getFBConfigAttrib = NULL; getVisualFromFBConfig = NULL; } if (hasPbuffer && !chooseFBConfig) { hasPbuffer = False; } if ((major > 1 || (major == 1 && minor >= 4)) || strstr(extensions, "GLX_ARB_multisample") != NULL || strstr(extensions, "GLX_SGIS_multisample") != NULL) { /* Client GLX supports multisampling, but does the server? Well, we * can always ask. */ hasMultisampling = True; } } if (togl->MultisampleFlag && !hasMultisampling) { Tcl_SetResult(togl->Interp, TCL_STUPID "multisampling not supported", TCL_STATIC); return NULL; } if (togl->PbufferFlag && !hasPbuffer) { Tcl_SetResult(togl->Interp, TCL_STUPID "pbuffers are not supported", TCL_STATIC); return NULL; } /* * Only use the newer glXGetFBConfig if there's an explicit need for it * because it is buggy on many systems: * (1) NVidia 96.43.07 on Linux, single-buffered windows don't work * (2) Mesa 6.5.X and earlier fail */ if (chooseFBConfig) { /* have new glXGetFBConfig! */ int count; GLXFBConfig *cfgs; attribs[na++] = GLX_RENDER_TYPE; if (togl->RgbaFlag) { /* RGB[A] mode */ attribs[na++] = GLX_RGBA_BIT; attribs[na++] = GLX_RED_SIZE; attribs[na++] = togl->RgbaRed; attribs[na++] = GLX_GREEN_SIZE; attribs[na++] = togl->RgbaGreen; attribs[na++] = GLX_BLUE_SIZE; attribs[na++] = togl->RgbaBlue; if (togl->AlphaFlag) { attribs[na++] = GLX_ALPHA_SIZE; attribs[na++] = togl->AlphaSize; } } else { /* Color index mode */ attribs[na++] = GLX_COLOR_INDEX_BIT; attribs[na++] = GLX_BUFFER_SIZE; attribs[na++] = 1; } if (togl->DepthFlag) { attribs[na++] = GLX_DEPTH_SIZE; attribs[na++] = togl->DepthSize; } if (togl->DoubleFlag) { attribs[na++] = GLX_DOUBLEBUFFER; attribs[na++] = True; } if (togl->StencilFlag) { attribs[na++] = GLX_STENCIL_SIZE; attribs[na++] = togl->StencilSize; } if (togl->AccumFlag) { attribs[na++] = GLX_ACCUM_RED_SIZE; attribs[na++] = togl->AccumRed; attribs[na++] = GLX_ACCUM_GREEN_SIZE; attribs[na++] = togl->AccumGreen; attribs[na++] = GLX_ACCUM_BLUE_SIZE; attribs[na++] = togl->AccumBlue; if (togl->AlphaFlag) { attribs[na++] = GLX_ACCUM_ALPHA_SIZE; attribs[na++] = togl->AccumAlpha; } } if (togl->Stereo == TOGL_STEREO_NATIVE) { attribs[na++] = GLX_STEREO; attribs[na++] = True; } if (togl->MultisampleFlag) { attribs[na++] = GLX_SAMPLE_BUFFERS_ARB; attribs[na++] = 1; attribs[na++] = GLX_SAMPLES_ARB; attribs[na++] = 2; } if (togl->PbufferFlag) { attribs[na++] = GLX_DRAWABLE_TYPE; attribs[na++] = GLX_WINDOW_BIT | GLX_PBUFFER_BIT; } if (togl->AuxNumber != 0) { attribs[na++] = GLX_AUX_BUFFERS; attribs[na++] = togl->AuxNumber; } attribs[na++] = None; cfgs = chooseFBConfig(togl->display, scrnum, attribs, &count); if (cfgs == NULL || count == 0) { Tcl_SetResult(togl->Interp, TCL_STUPID "couldn't choose pixel format", TCL_STATIC); return NULL; } /* * Pick best format */ info = (FBInfo *) malloc(count * sizeof (FBInfo)); for (i = 0; i != count; ++i) { info[i].visInfo = getVisualFromFBConfig(togl->display, cfgs[i]); info[i].fbcfg = cfgs[i]; getFBConfigAttrib(togl->display, cfgs[i], GLX_CONFIG_CAVEAT, &info[i].acceleration); getFBConfigAttrib(togl->display, cfgs[i], GLX_BUFFER_SIZE, &info[i].colors); getFBConfigAttrib(togl->display, cfgs[i], GLX_DEPTH_SIZE, &info[i].depth); getFBConfigAttrib(togl->display, cfgs[i], GLX_SAMPLES, &info[i].samples); /* revise attributes so larger is better */ info[i].acceleration = -(info[i].acceleration - GLX_NONE); if (!togl->DepthFlag) info[i].depth = -info[i].depth; if (!togl->MultisampleFlag) info[i].samples = -info[i].samples; } qsort(info, count, sizeof info[0], FBInfoCmp); togl->fbcfg = info[0].fbcfg; visinfo = info[0].visInfo; for (i = 1; i != count; ++i) XFree(info[i].visInfo); free(info); XFree(cfgs); return visinfo; } /* use original glXChooseVisual */ attribs[na++] = GLX_USE_GL; if (togl->RgbaFlag) { /* RGB[A] mode */ attribs[na++] = GLX_RGBA; attribs[na++] = GLX_RED_SIZE; attribs[na++] = togl->RgbaRed; attribs[na++] = GLX_GREEN_SIZE; attribs[na++] = togl->RgbaGreen; attribs[na++] = GLX_BLUE_SIZE; attribs[na++] = togl->RgbaBlue; if (togl->AlphaFlag) { attribs[na++] = GLX_ALPHA_SIZE; attribs[na++] = togl->AlphaSize; } } else { /* Color index mode */ attribs[na++] = GLX_BUFFER_SIZE; attribs[na++] = 1; } if (togl->DepthFlag) { attribs[na++] = GLX_DEPTH_SIZE; attribs[na++] = togl->DepthSize; } if (togl->DoubleFlag) { attribs[na++] = GLX_DOUBLEBUFFER; } if (togl->StencilFlag) { attribs[na++] = GLX_STENCIL_SIZE; attribs[na++] = togl->StencilSize; } if (togl->AccumFlag) { attribs[na++] = GLX_ACCUM_RED_SIZE; attribs[na++] = togl->AccumRed; attribs[na++] = GLX_ACCUM_GREEN_SIZE; attribs[na++] = togl->AccumGreen; attribs[na++] = GLX_ACCUM_BLUE_SIZE; attribs[na++] = togl->AccumBlue; if (togl->AlphaFlag) { attribs[na++] = GLX_ACCUM_ALPHA_SIZE; attribs[na++] = togl->AccumAlpha; } } if (togl->Stereo == TOGL_STEREO_NATIVE) { attribs[na++] = GLX_STEREO; } if (togl->AuxNumber != 0) { attribs[na++] = GLX_AUX_BUFFERS; attribs[na++] = togl->AuxNumber; } attribs[na++] = None; visinfo = glXChooseVisual(togl->display, scrnum, attribs); if (visinfo == NULL) { Tcl_SetResult(togl->Interp, TCL_STUPID "couldn't choose pixel format", TCL_STATIC); return NULL; } return visinfo; } static int togl_describePixelFormat(Togl *togl) { int tmp = 0; /* fill in flags normally passed in that affect behavior */ (void) glXGetConfig(togl->display, togl->VisInfo, GLX_RGBA, &togl->RgbaFlag); (void) glXGetConfig(togl->display, togl->VisInfo, GLX_DOUBLEBUFFER, &togl->DoubleFlag); (void) glXGetConfig(togl->display, togl->VisInfo, GLX_DEPTH_SIZE, &tmp); togl->DepthFlag = (tmp != 0); (void) glXGetConfig(togl->display, togl->VisInfo, GLX_ACCUM_RED_SIZE, &tmp); togl->AccumFlag = (tmp != 0); (void) glXGetConfig(togl->display, togl->VisInfo, GLX_ALPHA_SIZE, &tmp); togl->AlphaFlag = (tmp != 0); (void) glXGetConfig(togl->display, togl->VisInfo, GLX_STENCIL_SIZE, &tmp); togl->StencilFlag = (tmp != 0); (void) glXGetConfig(togl->display, togl->VisInfo, GLX_STEREO, &tmp); togl->Stereo = tmp ? TOGL_STEREO_NATIVE : TOGL_STEREO_NONE; if (hasMultisampling) { (void) glXGetConfig(togl->display, togl->VisInfo, GLX_SAMPLES, &tmp); togl->MultisampleFlag = (tmp != 0); } return True; } static Tcl_ThreadDataKey togl_XError; struct ErrorData { int error_code; XErrorHandler prevHandler; }; typedef struct ErrorData ErrorData; static int togl_HandleXError(Display *dpy, XErrorEvent * event) { ErrorData *data = Tcl_GetThreadData(&togl_XError, (int) sizeof (ErrorData)); data->error_code = event->error_code; return 0; } static void togl_SetupXErrorHandler() { ErrorData *data = Tcl_GetThreadData(&togl_XError, (int) sizeof (ErrorData)); data->error_code = Success; /* 0 */ data->prevHandler = XSetErrorHandler(togl_HandleXError); } static int togl_CheckForXError(const Togl *togl) { ErrorData *data = Tcl_GetThreadData(&togl_XError, (int) sizeof (ErrorData)); XSync(togl->display, False); (void) XSetErrorHandler(data->prevHandler); return data->error_code; } static GLXPbuffer togl_createPbuffer(Togl *togl) { int attribs[32]; int na = 0; GLXPbuffer pbuf; togl_SetupXErrorHandler(); if (togl->LargestPbufferFlag) { attribs[na++] = GLX_LARGEST_PBUFFER; attribs[na++] = True; } attribs[na++] = GLX_PRESERVED_CONTENTS; attribs[na++] = True; if (createPbuffer) { attribs[na++] = GLX_PBUFFER_WIDTH; attribs[na++] = togl->Width; attribs[na++] = GLX_PBUFFER_HEIGHT; attribs[na++] = togl->Width; attribs[na++] = None; pbuf = createPbuffer(togl->display, togl->fbcfg, attribs); } else { attribs[na++] = None; pbuf = createPbufferSGIX(togl->display, togl->fbcfg, togl->Width, togl->Height, attribs); } if (togl_CheckForXError(togl) || pbuf == None) { Tcl_SetResult(togl->Interp, TCL_STUPID "unable to allocate pbuffer", TCL_STATIC); return None; } if (pbuf && togl->LargestPbufferFlag) { int tmp; queryPbuffer(togl->display, pbuf, GLX_WIDTH, &tmp); if (tmp != 0) togl->Width = tmp; queryPbuffer(togl->display, pbuf, GLX_HEIGHT, &tmp); if (tmp != 0) togl->Height = tmp; } return pbuf; } static void togl_destroyPbuffer(Togl *togl) { destroyPbuffer(togl->display, togl->pbuf); } netgen-6.2.1804/ng/Togl2.1/toglProcAddr.c0000644000175000017500000000313213272137567016266 0ustar kurtkurt/* $Id */ /* vi:set sw=4: */ /* * Togl - a Tk OpenGL widget * * Copyright (C) 1996-2002 Brian Paul and Ben Bederson * Copyright (C) 2005-2009 Greg Couch * See the LICENSE file for copyright details. */ #include "togl.h" #if defined(TOGL_OSMESA) || defined(TOGL_WGL) /* nothing extra to include */ #elif defined(__APPLE__) # include #else # if !defined(TOGL_X11) || !defined(GLX_VERSION_1_4) # include # endif #endif Togl_FuncPtr Togl_GetProcAddr(const char *funcname) { #if defined(TOGL_OSMESA) return (Togl_FuncPtr) OSMesaGetProcAddress(funcname); #elif defined(TOGL_WGL) return (Togl_FuncPtr) wglGetProcAddress(funcname); #elif defined(__APPLE__) char buf[256]; snprintf(buf, sizeof buf - 1, "_%s", funcname); buf[sizeof buf - 1] = '\0'; if (NSIsSymbolNameDefined(buf)) { NSSymbol nssym; nssym = NSLookupAndBindSymbol(buf); if (nssym) return (Togl_FuncPtr) NSAddressOfSymbol(nssym); } return NULL; #else # if defined(TOGL_X11) && defined(GLX_VERSION_1_4) /* Strictly speaking, we can only call glXGetProcAddress if glXQueryVersion * says we're using version 1.4 or later. */ return (Togl_FuncPtr) glXGetProcAddress(funcname); # else /* Linux, IRIX, OSF/1, ? */ static void *dlHandle = NULL; if (dlHandle == NULL) dlHandle = dlopen(NULL, RTLD_LAZY); /* Strictly speaking, the following cast of a data pointer to a function * pointer is not legal in ISO C, but we don't have any choice. */ return (Togl_FuncPtr) dlsym(dlHandle, funcname); # endif #endif } netgen-6.2.1804/ng/Togl2.1/texture.c0000644000175000017500000004077313272137567015416 0ustar kurtkurt/* $Id: texture.c,v 1.14 2007/08/03 16:48:50 gregcouch Exp $ */ /* * Togl - a Tk OpenGL widget * Copyright (C) 1996-1997 Brian Paul and Ben Bederson * Copyright (C) 2006-2007 Greg Couch * See the LICENSE file for copyright details. */ /* * An example Togl program demonstrating texture mapping */ #define USE_TOGL_STUBS #include "togl.h" #include #include #if defined(TOGL_AGL) # include #else # include #endif #include "image.h" #undef TCL_STORAGE_CLASS #define TCL_STORAGE_CLASS DLLEXPORT #define CHECKER 0 #define FACE 1 #define TREE 2 static GLenum minfilter = GL_NEAREST_MIPMAP_LINEAR; static GLenum magfilter = GL_LINEAR; static GLenum swrap = GL_REPEAT; static GLenum twrap = GL_REPEAT; static GLenum envmode = GL_MODULATE; static GLubyte polycolor[4] = { 255, 255, 255, 255 }; static int teximage = CHECKER; static double coord_scale = 1; static double xrot = 0; static double yrot = 0; static double texscale = 1; static GLint width, height; static GLboolean blend = GL_FALSE; /* * Load a texture image. n is one of CHECKER, FACE or TREE. */ static void texture_image(int n) { if (n == CHECKER) { #define WIDTH 64 #define HEIGHT 64 GLubyte teximage[WIDTH * HEIGHT][4]; int i, j; for (i = 0; i < HEIGHT; i++) { for (j = 0; j < WIDTH; j++) { GLubyte value; value = ((i / 4 + j / 4) % 2) ? 0xff : 0x00; teximage[i * WIDTH + j][0] = value; teximage[i * WIDTH + j][1] = value; teximage[i * WIDTH + j][2] = value; teximage[i * WIDTH + j][3] = value; } } glEnable(GL_TEXTURE_2D); gluBuild2DMipmaps(GL_TEXTURE_2D, 4, WIDTH, HEIGHT, GL_RGBA, GL_UNSIGNED_BYTE, teximage); blend = GL_FALSE; #undef WIDTH #undef HEIGHT } else if (n == FACE) { TK_RGBImageRec *img = tkRGBImageLoad("ben.rgb"); if (img) { glEnable(GL_TEXTURE_2D); glPixelStorei(GL_UNPACK_ALIGNMENT, 1); gluBuild2DMipmaps(GL_TEXTURE_2D, img->sizeZ, img->sizeX, img->sizeY, img->sizeZ == 3 ? GL_RGB : GL_RGBA, GL_UNSIGNED_BYTE, img->data); blend = GL_TRUE; } } else if (n == TREE) { TK_RGBImageRec *img = tkRGBImageLoad("tree2.rgba"); if (img) { glEnable(GL_TEXTURE_2D); glPixelStorei(GL_UNPACK_ALIGNMENT, 1); gluBuild2DMipmaps(GL_TEXTURE_2D, img->sizeZ, img->sizeX, img->sizeY, img->sizeZ == 3 ? GL_RGB : GL_RGBA, GL_UNSIGNED_BYTE, img->data); blend = GL_TRUE; } } else { abort(); } } /* * Togl widget create callback. This is called by Tcl/Tk when the widget has * been realized. Here's where one may do some one-time context setup or * initializations. */ static int create_cb(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { glEnable(GL_DEPTH_TEST); /* Enable depth buffering */ texture_image(CHECKER); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, magfilter); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, minfilter); return TCL_OK; } /* * Togl widget reshape callback. This is called by Tcl/Tk when the widget * has been resized. Typically, we call glViewport and perhaps setup the * projection matrix. */ static int reshape_cb(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { Togl *togl; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "pathName"); return TCL_ERROR; } if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { return TCL_ERROR; } width = Togl_Width(togl); height = Togl_Height(togl); glViewport(0, 0, width, height); return TCL_OK; } static void check_error(char *where) { GLenum error; while (1) { error = glGetError(); if (error == GL_NO_ERROR) { break; } printf("OpenGL error near %s: %s\n", where, gluErrorString(error)); } } /* * Togl widget display callback. This is called by Tcl/Tk when the widget's * contents have to be redrawn. Typically, we clear the color and depth * buffers, render our objects, then swap the front/back color buffers. */ static int display_cb(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { float aspect = (float) width / (float) height; Togl *togl; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "pathName"); return TCL_ERROR; } if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { return TCL_ERROR; } check_error("begin display\n"); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); /* Draw background image */ glMatrixMode(GL_PROJECTION); glLoadIdentity(); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glDisable(GL_TEXTURE_2D); glDisable(GL_DEPTH_TEST); glBegin(GL_POLYGON); glColor3f(0, 0, 0.3f); glVertex2f(-1, -1); glColor3f(0, 0, 0.3f); glVertex2f(1, -1); glColor3f(0, 0, 0.9f); glVertex2f(1, 1); glColor3f(0, 0, 0.9f); glVertex2f(-1, 1); glEnd(); /* draw textured object */ glMatrixMode(GL_PROJECTION); glLoadIdentity(); glFrustum(-aspect, aspect, -1, 1, 2, 10); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glTranslatef(0, 0, -5); glScaled(texscale, texscale, texscale); glRotated(yrot, 0, 1, 0); glRotated(xrot, 1, 0, 0); glEnable(GL_DEPTH_TEST); glEnable(GL_TEXTURE_2D); glColor4ubv(polycolor); if (blend) { glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glEnable(GL_BLEND); } glBegin(GL_POLYGON); glTexCoord2f(0, 0); glVertex2f(-1, -1); glTexCoord2d(coord_scale, 0); glVertex2f(1, -1); glTexCoord2d(coord_scale, coord_scale); glVertex2f(1, 1); glTexCoord2d(0, coord_scale); glVertex2f(-1, 1); glEnd(); glDisable(GL_BLEND); Togl_SwapBuffers(togl); return TCL_OK; } /* * Called when a magnification filter radio button is pressed. */ static int magfilter_cmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { static const char *names[] = { "GL_NEAREST", "GL_LINEAR", NULL }; static const GLenum magfilters[] = { GL_NEAREST, GL_LINEAR }; int result, index; Togl *togl; if (objc != 3) { Tcl_WrongNumArgs(interp, 1, objv, "pathName magnification-filter-type"); return TCL_ERROR; } if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { return TCL_ERROR; } result = Tcl_GetIndexFromObj(interp, objv[2], names, "magnification filter type", 0, &index); if (result == TCL_OK) { glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, magfilters[index]); Togl_PostRedisplay(togl); } return result; } /* * Called when a minification filter radio button is pressed. */ static int minfilter_cmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { static const char *names[] = { "GL_NEAREST", "GL_LINEAR", "GL_NEAREST_MIPMAP_NEAREST", "GL_LINEAR_MIPMAP_NEAREST", "GL_NEAREST_MIPMAP_LINEAR", "GL_LINEAR_MIPMAP_LINEAR", NULL }; static const GLenum minfilters[] = { GL_NEAREST, GL_LINEAR, GL_NEAREST_MIPMAP_NEAREST, GL_LINEAR_MIPMAP_NEAREST, GL_NEAREST_MIPMAP_LINEAR, GL_LINEAR_MIPMAP_LINEAR }; int result, index; Togl *togl; if (objc != 3) { Tcl_WrongNumArgs(interp, 1, objv, "pathName minification-filter-type"); return TCL_ERROR; } if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { return TCL_ERROR; } result = Tcl_GetIndexFromObj(interp, objv[2], names, "minification filter type", 0, &index); if (result == TCL_OK) { glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, minfilters[index]); Togl_PostRedisplay(togl); } return result; } static int xrot_cmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { Togl *togl; if (objc != 3) { Tcl_WrongNumArgs(interp, 1, objv, "pathName angle"); return TCL_ERROR; } if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { return TCL_ERROR; } if (Tcl_GetDoubleFromObj(interp, objv[2], &xrot) != TCL_OK) { return TCL_ERROR; } Togl_PostRedisplay(togl); /* Let result string equal value */ Tcl_SetObjResult(interp, objv[2]); return TCL_OK; } static int yrot_cmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { Togl *togl; if (objc != 3) { Tcl_WrongNumArgs(interp, 1, objv, "pathName angle"); return TCL_ERROR; } if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { return TCL_ERROR; } if (Tcl_GetDoubleFromObj(interp, objv[2], &yrot) != TCL_OK) { return TCL_ERROR; } Togl_PostRedisplay(togl); /* Let result string equal value */ Tcl_SetObjResult(interp, objv[2]); return TCL_OK; } static int texscale_cmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { Togl *togl; if (objc != 3) { Tcl_WrongNumArgs(interp, 1, objv, "pathName value"); return TCL_ERROR; } if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { return TCL_ERROR; } if (Tcl_GetDoubleFromObj(interp, objv[2], &texscale) != TCL_OK) { return TCL_ERROR; } Togl_PostRedisplay(togl); /* Let result string equal value */ Tcl_SetObjResult(interp, objv[2]); return TCL_OK; } /* * Called when S texture coordinate wrapping is changed. */ static int swrap_cmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { static const char *names[] = { "GL_CLAMP", "GL_REPEAT", NULL }; static const GLenum swraps[] = { GL_CLAMP, GL_REPEAT }; int result, index; Togl *togl; if (objc != 3) { Tcl_WrongNumArgs(interp, 1, objv, "pathName wrap-mode"); return TCL_ERROR; } if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { return TCL_ERROR; } result = Tcl_GetIndexFromObj(interp, objv[2], names, "wrap mode", 0, &index); if (result == TCL_OK) { swrap = swraps[index]; glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, swrap); Togl_PostRedisplay(togl); /* Let result string equal value */ Tcl_SetObjResult(interp, objv[2]); } return result; } /* * Called when T texture coordinate wrapping is changed. */ static int twrap_cmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { static const char *names[] = { "GL_CLAMP", "GL_REPEAT", NULL }; static const GLenum twraps[] = { GL_CLAMP, GL_REPEAT }; int result, index; Togl *togl; if (objc != 3) { Tcl_WrongNumArgs(interp, 1, objv, "pathName wrap-mode"); return TCL_ERROR; } if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { return TCL_ERROR; } result = Tcl_GetIndexFromObj(interp, objv[2], names, "wrap mode", 0, &index); if (result == TCL_OK) { twrap = twraps[index]; glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, twrap); Togl_PostRedisplay(togl); /* Let result string equal value */ Tcl_SetObjResult(interp, objv[2]); } return result; } /* * Called when the texture environment mode is changed. */ static int envmode_cmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { static const char *names[] = { "GL_MODULATE", "GL_DECAL", "GL_BLEND", NULL }; static const GLenum envmodes[] = { GL_MODULATE, GL_DECAL, GL_BLEND }; int result, index; Togl *togl; if (objc != 3) { Tcl_WrongNumArgs(interp, 1, objv, "pathName texture-env-mode"); return TCL_ERROR; } if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { return TCL_ERROR; } result = Tcl_GetIndexFromObj(interp, objv[2], names, "texture env mode", 0, &index); if (result == TCL_OK) { envmode = envmodes[index]; glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, envmode); Togl_PostRedisplay(togl); /* Let result string equal value */ Tcl_SetObjResult(interp, objv[2]); } return result; } /* * Called when the polygon color is changed. */ static int polycolor_cmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { Togl *togl; int r, g, b; if (objc != 5) { Tcl_WrongNumArgs(interp, 1, objv, "pathName r g b"); return TCL_ERROR; } if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { return TCL_ERROR; } if (Tcl_GetIntFromObj(interp, objv[2], &r) != TCL_OK || Tcl_GetIntFromObj(interp, objv[3], &g) != TCL_OK || Tcl_GetIntFromObj(interp, objv[4], &b) != TCL_OK) { return TCL_ERROR; } polycolor[0] = r; polycolor[1] = g; polycolor[2] = b; Togl_PostRedisplay(togl); return TCL_OK; } /* * Called when the texture image is to be changed */ static int teximage_cmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { static const char *names[] = { "CHECKER", "FACE", "TREE", NULL }; static const GLenum teximages[] = { CHECKER, FACE, TREE }; int result, index; Togl *togl; if (objc != 3) { Tcl_WrongNumArgs(interp, 1, objv, "pathName texture-image-name"); return TCL_ERROR; } if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { return TCL_ERROR; } result = Tcl_GetIndexFromObj(interp, objv[2], names, "texture image name", 0, &index); if (result == TCL_OK) { teximage = teximages[index]; texture_image(teximage); Togl_PostRedisplay(togl); /* Let result string equal value */ Tcl_SetObjResult(interp, objv[2]); } return result; } /* * Called when the texture coordinate scale is changed. */ static int coord_scale_cmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { double s; Togl *togl; if (objc != 3) { Tcl_WrongNumArgs(interp, 1, objv, "pathName scale"); return TCL_ERROR; } if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { return TCL_ERROR; } if (Tcl_GetDoubleFromObj(interp, objv[2], &s) != TCL_OK) { return TCL_ERROR; } if (s > 0 && s < 10) { coord_scale = s; Togl_PostRedisplay(togl); } /* Let result string equal value */ Tcl_SetObjResult(interp, objv[2]); return TCL_OK; } EXTERN int Texture_Init(Tcl_Interp *interp) { /* * Initialize Tcl and the Togl widget module. */ if (Tcl_InitStubs(interp, "8.1", 0) == NULL || Togl_InitStubs(interp, "2.0", 0) == NULL) { return TCL_ERROR; } /* * Specify the C callback functions for widget creation, display, * and reshape. */ Tcl_CreateObjCommand(interp, "create_cb", create_cb, NULL, NULL); Tcl_CreateObjCommand(interp, "display_cb", display_cb, NULL, NULL); Tcl_CreateObjCommand(interp, "reshape_cb", reshape_cb, NULL, NULL); /* * Make a new Togl widget command so the Tcl code can set a C variable. */ Tcl_CreateObjCommand(interp, "min_filter", minfilter_cmd, NULL, NULL); Tcl_CreateObjCommand(interp, "mag_filter", magfilter_cmd, NULL, NULL); Tcl_CreateObjCommand(interp, "xrot", xrot_cmd, NULL, NULL); Tcl_CreateObjCommand(interp, "yrot", yrot_cmd, NULL, NULL); Tcl_CreateObjCommand(interp, "texscale", texscale_cmd, NULL, NULL); Tcl_CreateObjCommand(interp, "swrap", swrap_cmd, NULL, NULL); Tcl_CreateObjCommand(interp, "twrap", twrap_cmd, NULL, NULL); Tcl_CreateObjCommand(interp, "envmode", envmode_cmd, NULL, NULL); Tcl_CreateObjCommand(interp, "polycolor", polycolor_cmd, NULL, NULL); Tcl_CreateObjCommand(interp, "teximage", teximage_cmd, NULL, NULL); Tcl_CreateObjCommand(interp, "coord_scale", coord_scale_cmd, NULL, NULL); /* * Call Tcl_CreateCommand for application-specific commands, if * they weren't already created by the init procedures called above. */ return TCL_OK; } netgen-6.2.1804/ng/Togl2.1/README.stubs0000644000175000017500000000230413272137567015555 0ustar kurtkurtThis version of Togl is entirely free from dependencies on Tcl/Tk's internal functions. It uses the public stubs interface, witch means that the same binary works with any stubs-aware wish (i.e. version >= 8.1) It has been tested on Windows NT/2000 and Linux for several Tcl/Tk versions up to 8.4a3. I haven't been able to test the Mac port, it propably needs mending but I can't see why it shouldn't work in principle. Implementation wise, what differs from Togl 1.5 is that Togl_MakeWindowExist() is replaced by Togl_CreateWindow(), a function that gets registered in Tk as a callback for window creation. In Tk/Tk 8.4a3, there is a new public API call Tk_SetClassProcs() to register this callback, but for earlier versions of Tk one needs to do this using some pointer magic. There is a run-time check to determine which method to use, hence the same binary runs on all versions of Wish from 8.1 and up. For this to work you need to compile against the headers from Tcl/Tk 8.4a3 or later, or the binary will only work for Tcl/Tk 8.1-8.4a2. The tk8.4a3 public headers (tk8.4a3.h + tkDecls.h) are included for conveniance, and they are used if the flag -DUSE_LOCAL_TK_H is specified. Jonas Beskow, December 2001netgen-6.2.1804/ng/Togl2.1/multisample.tcl0000644000175000017500000000615213272137567016603 0ustar kurtkurt#!/bin/sh # the next line restarts using tclsh \ exec tclsh "$0" "$@" # $Id: multisample.tcl,v 1.3 2009/03/12 23:59:35 gregcouch Exp $ # Togl - a Tk OpenGL widget # Copyright (C) 1996 Brian Paul and Ben Bederson # Copyright (C) 2006-2007 Greg Couch # See the LICENSE file for copyright details. # An Tk/OpenGL widget demo with two windows, one aliased and the # other multisampled. Reuse C code from double buffering demo. package provide multisample 1.0 # add parent directory to path to find Togl's pkgIndex in current directory if { [file exists pkgIndex.tcl] } { set auto_path [linsert $auto_path 0 ..] } # following load also loads Tk and Togl packages load [file dirname [info script]]/double[info sharedlibextension] # create ::multisample namespace namespace eval ::multisample { } proc multisample::setup {} { wm title . "Multisample vs Aliased" # create first Togl widget togl .o1 -width 200 -height 200 -rgba true -double true -depth true -create double::create_cb -display double::display_cb -reshape double::reshape_cb -multisample false -ident Aliased # create second Togl widget, share display lists with first widget togl .o2 -width 200 -height 200 -rgba true -double true -depth true -create double::create_cb -display double::display_cb -reshape double::reshape_cb -multisample true -ident Multisampled -sharelist Aliased scale .sx -label {X Axis} -from 0 -to 360 -command {::multisample::setAngle x} -orient horizontal scale .sy -label {Y Axis} -from 0 -to 360 -command {::multisample::setAngle y} -orient horizontal button .btn -text Quit -command exit bind .o1 { ::multisample::motion_event [lindex [%W config -width] 4] \ [lindex [%W config -height] 4] \ %x %y } bind .o2 { ::multisample::motion_event [lindex [%W config -width] 4] \ [lindex [%W config -height] 4] \ %x %y } grid rowconfigure . 0 -weight 1 grid columnconfigure . 0 -weight 1 -uniform same grid columnconfigure . 1 -weight 1 -uniform same grid .o1 -row 0 -column 0 -sticky nesw -padx 3 -pady 3 grid .o2 -row 0 -column 1 -sticky nesw -padx 3 -pady 3 #grid .l1 -row 1 -column 0 -sticky ew -padx 3 -pady 3 #grid .l2 -row 1 -column 1 -sticky ew -padx 3 -pady 3 grid .sx -row 2 -column 0 -columnspan 2 -sticky ew grid .sy -row 3 -column 0 -columnspan 2 -sticky ew grid .btn -row 4 -column 0 -columnspan 2 -sticky ew } # This is called when mouse button 1 is pressed and moved in either of # the OpenGL windows. proc multisample::motion_event { width height x y } { .sx set [double::setXrot [expr 360.0 * $y / $height]] .sy set [double::setYrot [expr 360.0 * ($width - $x) / $width]] .o1 postredisplay .o2 postredisplay } # This is called when a slider is changed. proc multisample::setAngle {axis value} { global xAngle yAngle zAngle switch -exact $axis { x {double::setXrot $value double::setXrot $value} y {double::setYrot $value double::setYrot $value} } .o1 postredisplay .o2 postredisplay } # Execution starts here! if { [info script] == $argv0 } { ::multisample::setup } netgen-6.2.1804/ng/Togl2.1/toglDecls.h0000755000175000017500000004135213272137567015640 0ustar kurtkurt#ifndef ToglDecls_H # define ToglDecls_H /* * Togl - a Tk OpenGL widget * * Copyright (C) 1996-2002 Brian Paul and Ben Bederson * Copyright (C) 2005-2009 Greg Couch * See the LICENSE file for copyright details. */ /* !BEGIN!: Do not edit below this line. */ /* * Exported function declarations: */ #ifndef Togl_Init_TCL_DECLARED #define Togl_Init_TCL_DECLARED /* 0 */ EXTERN int Togl_Init(Tcl_Interp *interp); #endif #ifndef Togl_MakeCurrent_TCL_DECLARED #define Togl_MakeCurrent_TCL_DECLARED /* 1 */ EXTERN void Togl_MakeCurrent(const Togl *togl); #endif #ifndef Togl_PostRedisplay_TCL_DECLARED #define Togl_PostRedisplay_TCL_DECLARED /* 2 */ EXTERN void Togl_PostRedisplay(Togl *togl); #endif #ifndef Togl_SwapBuffers_TCL_DECLARED #define Togl_SwapBuffers_TCL_DECLARED /* 3 */ EXTERN void Togl_SwapBuffers(const Togl *togl); #endif #ifndef Togl_Ident_TCL_DECLARED #define Togl_Ident_TCL_DECLARED /* 4 */ EXTERN const char * Togl_Ident(const Togl *togl); #endif #ifndef Togl_Width_TCL_DECLARED #define Togl_Width_TCL_DECLARED /* 5 */ EXTERN int Togl_Width(const Togl *togl); #endif #ifndef Togl_Height_TCL_DECLARED #define Togl_Height_TCL_DECLARED /* 6 */ EXTERN int Togl_Height(const Togl *togl); #endif #ifndef Togl_Interp_TCL_DECLARED #define Togl_Interp_TCL_DECLARED /* 7 */ EXTERN Tcl_Interp * Togl_Interp(const Togl *togl); #endif #ifndef Togl_TkWin_TCL_DECLARED #define Togl_TkWin_TCL_DECLARED /* 8 */ EXTERN Tk_Window Togl_TkWin(const Togl *togl); #endif #ifndef Togl_CommandName_TCL_DECLARED #define Togl_CommandName_TCL_DECLARED /* 9 */ EXTERN const char * Togl_CommandName(const Togl *togl); #endif #ifndef Togl_AllocColor_TCL_DECLARED #define Togl_AllocColor_TCL_DECLARED /* 10 */ EXTERN unsigned long Togl_AllocColor(const Togl *togl, float red, float green, float blue); #endif #ifndef Togl_FreeColor_TCL_DECLARED #define Togl_FreeColor_TCL_DECLARED /* 11 */ EXTERN void Togl_FreeColor(const Togl *togl, unsigned long index); #endif #ifndef Togl_SetColor_TCL_DECLARED #define Togl_SetColor_TCL_DECLARED /* 12 */ EXTERN void Togl_SetColor(const Togl *togl, unsigned long index, float red, float green, float blue); #endif #ifndef Togl_LoadBitmapFont_TCL_DECLARED #define Togl_LoadBitmapFont_TCL_DECLARED /* 13 */ EXTERN Tcl_Obj * Togl_LoadBitmapFont(const Togl *togl, const char *fontname); #endif #ifndef Togl_UnloadBitmapFont_TCL_DECLARED #define Togl_UnloadBitmapFont_TCL_DECLARED /* 14 */ EXTERN int Togl_UnloadBitmapFont(const Togl *togl, Tcl_Obj *toglfont); #endif #ifndef Togl_UseLayer_TCL_DECLARED #define Togl_UseLayer_TCL_DECLARED /* 15 */ EXTERN void Togl_UseLayer(Togl *togl, int layer); #endif #ifndef Togl_ShowOverlay_TCL_DECLARED #define Togl_ShowOverlay_TCL_DECLARED /* 16 */ EXTERN void Togl_ShowOverlay(Togl *togl); #endif #ifndef Togl_HideOverlay_TCL_DECLARED #define Togl_HideOverlay_TCL_DECLARED /* 17 */ EXTERN void Togl_HideOverlay(Togl *togl); #endif #ifndef Togl_PostOverlayRedisplay_TCL_DECLARED #define Togl_PostOverlayRedisplay_TCL_DECLARED /* 18 */ EXTERN void Togl_PostOverlayRedisplay(Togl *togl); #endif #ifndef Togl_ExistsOverlay_TCL_DECLARED #define Togl_ExistsOverlay_TCL_DECLARED /* 19 */ EXTERN int Togl_ExistsOverlay(const Togl *togl); #endif #ifndef Togl_GetOverlayTransparentValue_TCL_DECLARED #define Togl_GetOverlayTransparentValue_TCL_DECLARED /* 20 */ EXTERN int Togl_GetOverlayTransparentValue(const Togl *togl); #endif #ifndef Togl_IsMappedOverlay_TCL_DECLARED #define Togl_IsMappedOverlay_TCL_DECLARED /* 21 */ EXTERN int Togl_IsMappedOverlay(const Togl *togl); #endif #ifndef Togl_AllocColorOverlay_TCL_DECLARED #define Togl_AllocColorOverlay_TCL_DECLARED /* 22 */ EXTERN unsigned long Togl_AllocColorOverlay(const Togl *togl, float red, float green, float blue); #endif #ifndef Togl_FreeColorOverlay_TCL_DECLARED #define Togl_FreeColorOverlay_TCL_DECLARED /* 23 */ EXTERN void Togl_FreeColorOverlay(const Togl *togl, unsigned long index); #endif #ifndef Togl_GetClientData_TCL_DECLARED #define Togl_GetClientData_TCL_DECLARED /* 24 */ EXTERN ClientData Togl_GetClientData(const Togl *togl); #endif #ifndef Togl_SetClientData_TCL_DECLARED #define Togl_SetClientData_TCL_DECLARED /* 25 */ EXTERN void Togl_SetClientData(Togl *togl, ClientData clientData); #endif #ifndef Togl_DrawBuffer_TCL_DECLARED #define Togl_DrawBuffer_TCL_DECLARED /* 26 */ EXTERN void Togl_DrawBuffer(Togl *togl, GLenum mode); #endif #ifndef Togl_Clear_TCL_DECLARED #define Togl_Clear_TCL_DECLARED /* 27 */ EXTERN void Togl_Clear(const Togl *togl, GLbitfield mask); #endif #ifndef Togl_Frustum_TCL_DECLARED #define Togl_Frustum_TCL_DECLARED /* 28 */ EXTERN void Togl_Frustum(const Togl *togl, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near, GLdouble far); #endif #ifndef Togl_GetToglFromObj_TCL_DECLARED #define Togl_GetToglFromObj_TCL_DECLARED /* 29 */ EXTERN int Togl_GetToglFromObj(Tcl_Interp *interp, Tcl_Obj *obj, Togl **toglPtr); #endif #ifndef Togl_TakePhoto_TCL_DECLARED #define Togl_TakePhoto_TCL_DECLARED /* 30 */ EXTERN int Togl_TakePhoto(Togl *togl, Tk_PhotoHandle photo); #endif #ifndef Togl_GetProcAddr_TCL_DECLARED #define Togl_GetProcAddr_TCL_DECLARED /* 31 */ EXTERN Togl_FuncPtr Togl_GetProcAddr(const char *funcname); #endif #ifndef Togl_GetToglFromName_TCL_DECLARED #define Togl_GetToglFromName_TCL_DECLARED /* 32 */ EXTERN int Togl_GetToglFromName(Tcl_Interp *interp, const char *cmdName, Togl **toglPtr); #endif #ifndef Togl_SwapInterval_TCL_DECLARED #define Togl_SwapInterval_TCL_DECLARED /* 33 */ EXTERN Bool Togl_SwapInterval(const Togl *togl, int interval); #endif #ifndef Togl_Ortho_TCL_DECLARED #define Togl_Ortho_TCL_DECLARED /* 34 */ EXTERN void Togl_Ortho(const Togl *togl, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near, GLdouble far); #endif #ifndef Togl_NumEyes_TCL_DECLARED #define Togl_NumEyes_TCL_DECLARED /* 35 */ EXTERN int Togl_NumEyes(const Togl *togl); #endif #ifndef Togl_ContextTag_TCL_DECLARED #define Togl_ContextTag_TCL_DECLARED /* 36 */ EXTERN int Togl_ContextTag(const Togl *togl); #endif #ifndef Togl_UpdatePending_TCL_DECLARED #define Togl_UpdatePending_TCL_DECLARED /* 37 */ EXTERN Bool Togl_UpdatePending(const Togl *togl); #endif #ifndef Togl_WriteObj_TCL_DECLARED #define Togl_WriteObj_TCL_DECLARED /* 38 */ EXTERN int Togl_WriteObj(const Togl *togl, const Tcl_Obj *toglfont, Tcl_Obj *obj); #endif #ifndef Togl_WriteChars_TCL_DECLARED #define Togl_WriteChars_TCL_DECLARED /* 39 */ EXTERN int Togl_WriteChars(const Togl *togl, const Tcl_Obj *toglfont, const char *str, int len); #endif #ifndef Togl_HasRGBA_TCL_DECLARED #define Togl_HasRGBA_TCL_DECLARED /* 40 */ EXTERN Bool Togl_HasRGBA(const Togl *togl); #endif #ifndef Togl_IsDoubleBuffered_TCL_DECLARED #define Togl_IsDoubleBuffered_TCL_DECLARED /* 41 */ EXTERN Bool Togl_IsDoubleBuffered(const Togl *togl); #endif #ifndef Togl_HasDepthBuffer_TCL_DECLARED #define Togl_HasDepthBuffer_TCL_DECLARED /* 42 */ EXTERN Bool Togl_HasDepthBuffer(const Togl *togl); #endif #ifndef Togl_HasAccumulationBuffer_TCL_DECLARED #define Togl_HasAccumulationBuffer_TCL_DECLARED /* 43 */ EXTERN Bool Togl_HasAccumulationBuffer(const Togl *togl); #endif #ifndef Togl_HasDestinationAlpha_TCL_DECLARED #define Togl_HasDestinationAlpha_TCL_DECLARED /* 44 */ EXTERN Bool Togl_HasDestinationAlpha(const Togl *togl); #endif #ifndef Togl_HasStencilBuffer_TCL_DECLARED #define Togl_HasStencilBuffer_TCL_DECLARED /* 45 */ EXTERN Bool Togl_HasStencilBuffer(const Togl *togl); #endif #ifndef Togl_StereoMode_TCL_DECLARED #define Togl_StereoMode_TCL_DECLARED /* 46 */ EXTERN int Togl_StereoMode(const Togl *togl); #endif #ifndef Togl_HasMultisample_TCL_DECLARED #define Togl_HasMultisample_TCL_DECLARED /* 47 */ EXTERN Bool Togl_HasMultisample(const Togl *togl); #endif #ifndef Togl_CopyContext_TCL_DECLARED #define Togl_CopyContext_TCL_DECLARED /* 48 */ EXTERN int Togl_CopyContext(const Togl *from, const Togl *to, unsigned int mask); #endif typedef struct ToglStubs { int magic; const struct ToglStubHooks *hooks; int (*togl_Init) (Tcl_Interp *interp); /* 0 */ void (*togl_MakeCurrent) (const Togl *togl); /* 1 */ void (*togl_PostRedisplay) (Togl *togl); /* 2 */ void (*togl_SwapBuffers) (const Togl *togl); /* 3 */ const char * (*togl_Ident) (const Togl *togl); /* 4 */ int (*togl_Width) (const Togl *togl); /* 5 */ int (*togl_Height) (const Togl *togl); /* 6 */ Tcl_Interp * (*togl_Interp) (const Togl *togl); /* 7 */ Tk_Window (*togl_TkWin) (const Togl *togl); /* 8 */ const char * (*togl_CommandName) (const Togl *togl); /* 9 */ unsigned long (*togl_AllocColor) (const Togl *togl, float red, float green, float blue); /* 10 */ void (*togl_FreeColor) (const Togl *togl, unsigned long index); /* 11 */ void (*togl_SetColor) (const Togl *togl, unsigned long index, float red, float green, float blue); /* 12 */ Tcl_Obj * (*togl_LoadBitmapFont) (const Togl *togl, const char *fontname); /* 13 */ int (*togl_UnloadBitmapFont) (const Togl *togl, Tcl_Obj *toglfont); /* 14 */ void (*togl_UseLayer) (Togl *togl, int layer); /* 15 */ void (*togl_ShowOverlay) (Togl *togl); /* 16 */ void (*togl_HideOverlay) (Togl *togl); /* 17 */ void (*togl_PostOverlayRedisplay) (Togl *togl); /* 18 */ int (*togl_ExistsOverlay) (const Togl *togl); /* 19 */ int (*togl_GetOverlayTransparentValue) (const Togl *togl); /* 20 */ int (*togl_IsMappedOverlay) (const Togl *togl); /* 21 */ unsigned long (*togl_AllocColorOverlay) (const Togl *togl, float red, float green, float blue); /* 22 */ void (*togl_FreeColorOverlay) (const Togl *togl, unsigned long index); /* 23 */ ClientData (*togl_GetClientData) (const Togl *togl); /* 24 */ void (*togl_SetClientData) (Togl *togl, ClientData clientData); /* 25 */ void (*togl_DrawBuffer) (Togl *togl, GLenum mode); /* 26 */ void (*togl_Clear) (const Togl *togl, GLbitfield mask); /* 27 */ void (*togl_Frustum) (const Togl *togl, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near, GLdouble far); /* 28 */ int (*togl_GetToglFromObj) (Tcl_Interp *interp, Tcl_Obj *obj, Togl **toglPtr); /* 29 */ int (*togl_TakePhoto) (Togl *togl, Tk_PhotoHandle photo); /* 30 */ Togl_FuncPtr (*togl_GetProcAddr) (const char *funcname); /* 31 */ int (*togl_GetToglFromName) (Tcl_Interp *interp, const char *cmdName, Togl **toglPtr); /* 32 */ Bool (*togl_SwapInterval) (const Togl *togl, int interval); /* 33 */ void (*togl_Ortho) (const Togl *togl, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near, GLdouble far); /* 34 */ int (*togl_NumEyes) (const Togl *togl); /* 35 */ int (*togl_ContextTag) (const Togl *togl); /* 36 */ Bool (*togl_UpdatePending) (const Togl *togl); /* 37 */ int (*togl_WriteObj) (const Togl *togl, const Tcl_Obj *toglfont, Tcl_Obj *obj); /* 38 */ int (*togl_WriteChars) (const Togl *togl, const Tcl_Obj *toglfont, const char *str, int len); /* 39 */ Bool (*togl_HasRGBA) (const Togl *togl); /* 40 */ Bool (*togl_IsDoubleBuffered) (const Togl *togl); /* 41 */ Bool (*togl_HasDepthBuffer) (const Togl *togl); /* 42 */ Bool (*togl_HasAccumulationBuffer) (const Togl *togl); /* 43 */ Bool (*togl_HasDestinationAlpha) (const Togl *togl); /* 44 */ Bool (*togl_HasStencilBuffer) (const Togl *togl); /* 45 */ int (*togl_StereoMode) (const Togl *togl); /* 46 */ Bool (*togl_HasMultisample) (const Togl *togl); /* 47 */ int (*togl_CopyContext) (const Togl *from, const Togl *to, unsigned int mask); /* 48 */ } ToglStubs; #if defined(USE_TOGL_STUBS) && !defined(USE_TOGL_STUB_PROCS) extern const ToglStubs *toglStubsPtr; #endif /* defined(USE_TOGL_STUBS) && !defined(USE_TOGL_STUB_PROCS) */ #if defined(USE_TOGL_STUBS) && !defined(USE_TOGL_STUB_PROCS) /* * Inline function declarations: */ #ifndef Togl_Init #define Togl_Init \ (toglStubsPtr->togl_Init) /* 0 */ #endif #ifndef Togl_MakeCurrent #define Togl_MakeCurrent \ (toglStubsPtr->togl_MakeCurrent) /* 1 */ #endif #ifndef Togl_PostRedisplay #define Togl_PostRedisplay \ (toglStubsPtr->togl_PostRedisplay) /* 2 */ #endif #ifndef Togl_SwapBuffers #define Togl_SwapBuffers \ (toglStubsPtr->togl_SwapBuffers) /* 3 */ #endif #ifndef Togl_Ident #define Togl_Ident \ (toglStubsPtr->togl_Ident) /* 4 */ #endif #ifndef Togl_Width #define Togl_Width \ (toglStubsPtr->togl_Width) /* 5 */ #endif #ifndef Togl_Height #define Togl_Height \ (toglStubsPtr->togl_Height) /* 6 */ #endif #ifndef Togl_Interp #define Togl_Interp \ (toglStubsPtr->togl_Interp) /* 7 */ #endif #ifndef Togl_TkWin #define Togl_TkWin \ (toglStubsPtr->togl_TkWin) /* 8 */ #endif #ifndef Togl_CommandName #define Togl_CommandName \ (toglStubsPtr->togl_CommandName) /* 9 */ #endif #ifndef Togl_AllocColor #define Togl_AllocColor \ (toglStubsPtr->togl_AllocColor) /* 10 */ #endif #ifndef Togl_FreeColor #define Togl_FreeColor \ (toglStubsPtr->togl_FreeColor) /* 11 */ #endif #ifndef Togl_SetColor #define Togl_SetColor \ (toglStubsPtr->togl_SetColor) /* 12 */ #endif #ifndef Togl_LoadBitmapFont #define Togl_LoadBitmapFont \ (toglStubsPtr->togl_LoadBitmapFont) /* 13 */ #endif #ifndef Togl_UnloadBitmapFont #define Togl_UnloadBitmapFont \ (toglStubsPtr->togl_UnloadBitmapFont) /* 14 */ #endif #ifndef Togl_UseLayer #define Togl_UseLayer \ (toglStubsPtr->togl_UseLayer) /* 15 */ #endif #ifndef Togl_ShowOverlay #define Togl_ShowOverlay \ (toglStubsPtr->togl_ShowOverlay) /* 16 */ #endif #ifndef Togl_HideOverlay #define Togl_HideOverlay \ (toglStubsPtr->togl_HideOverlay) /* 17 */ #endif #ifndef Togl_PostOverlayRedisplay #define Togl_PostOverlayRedisplay \ (toglStubsPtr->togl_PostOverlayRedisplay) /* 18 */ #endif #ifndef Togl_ExistsOverlay #define Togl_ExistsOverlay \ (toglStubsPtr->togl_ExistsOverlay) /* 19 */ #endif #ifndef Togl_GetOverlayTransparentValue #define Togl_GetOverlayTransparentValue \ (toglStubsPtr->togl_GetOverlayTransparentValue) /* 20 */ #endif #ifndef Togl_IsMappedOverlay #define Togl_IsMappedOverlay \ (toglStubsPtr->togl_IsMappedOverlay) /* 21 */ #endif #ifndef Togl_AllocColorOverlay #define Togl_AllocColorOverlay \ (toglStubsPtr->togl_AllocColorOverlay) /* 22 */ #endif #ifndef Togl_FreeColorOverlay #define Togl_FreeColorOverlay \ (toglStubsPtr->togl_FreeColorOverlay) /* 23 */ #endif #ifndef Togl_GetClientData #define Togl_GetClientData \ (toglStubsPtr->togl_GetClientData) /* 24 */ #endif #ifndef Togl_SetClientData #define Togl_SetClientData \ (toglStubsPtr->togl_SetClientData) /* 25 */ #endif #ifndef Togl_DrawBuffer #define Togl_DrawBuffer \ (toglStubsPtr->togl_DrawBuffer) /* 26 */ #endif #ifndef Togl_Clear #define Togl_Clear \ (toglStubsPtr->togl_Clear) /* 27 */ #endif #ifndef Togl_Frustum #define Togl_Frustum \ (toglStubsPtr->togl_Frustum) /* 28 */ #endif #ifndef Togl_GetToglFromObj #define Togl_GetToglFromObj \ (toglStubsPtr->togl_GetToglFromObj) /* 29 */ #endif #ifndef Togl_TakePhoto #define Togl_TakePhoto \ (toglStubsPtr->togl_TakePhoto) /* 30 */ #endif #ifndef Togl_GetProcAddr #define Togl_GetProcAddr \ (toglStubsPtr->togl_GetProcAddr) /* 31 */ #endif #ifndef Togl_GetToglFromName #define Togl_GetToglFromName \ (toglStubsPtr->togl_GetToglFromName) /* 32 */ #endif #ifndef Togl_SwapInterval #define Togl_SwapInterval \ (toglStubsPtr->togl_SwapInterval) /* 33 */ #endif #ifndef Togl_Ortho #define Togl_Ortho \ (toglStubsPtr->togl_Ortho) /* 34 */ #endif #ifndef Togl_NumEyes #define Togl_NumEyes \ (toglStubsPtr->togl_NumEyes) /* 35 */ #endif #ifndef Togl_ContextTag #define Togl_ContextTag \ (toglStubsPtr->togl_ContextTag) /* 36 */ #endif #ifndef Togl_UpdatePending #define Togl_UpdatePending \ (toglStubsPtr->togl_UpdatePending) /* 37 */ #endif #ifndef Togl_WriteObj #define Togl_WriteObj \ (toglStubsPtr->togl_WriteObj) /* 38 */ #endif #ifndef Togl_WriteChars #define Togl_WriteChars \ (toglStubsPtr->togl_WriteChars) /* 39 */ #endif #ifndef Togl_HasRGBA #define Togl_HasRGBA \ (toglStubsPtr->togl_HasRGBA) /* 40 */ #endif #ifndef Togl_IsDoubleBuffered #define Togl_IsDoubleBuffered \ (toglStubsPtr->togl_IsDoubleBuffered) /* 41 */ #endif #ifndef Togl_HasDepthBuffer #define Togl_HasDepthBuffer \ (toglStubsPtr->togl_HasDepthBuffer) /* 42 */ #endif #ifndef Togl_HasAccumulationBuffer #define Togl_HasAccumulationBuffer \ (toglStubsPtr->togl_HasAccumulationBuffer) /* 43 */ #endif #ifndef Togl_HasDestinationAlpha #define Togl_HasDestinationAlpha \ (toglStubsPtr->togl_HasDestinationAlpha) /* 44 */ #endif #ifndef Togl_HasStencilBuffer #define Togl_HasStencilBuffer \ (toglStubsPtr->togl_HasStencilBuffer) /* 45 */ #endif #ifndef Togl_StereoMode #define Togl_StereoMode \ (toglStubsPtr->togl_StereoMode) /* 46 */ #endif #ifndef Togl_HasMultisample #define Togl_HasMultisample \ (toglStubsPtr->togl_HasMultisample) /* 47 */ #endif #ifndef Togl_CopyContext #define Togl_CopyContext \ (toglStubsPtr->togl_CopyContext) /* 48 */ #endif #endif /* defined(USE_TOGL_STUBS) && !defined(USE_TOGL_STUB_PROCS) */ /* !END!: Do not edit above this line. */ #endif netgen-6.2.1804/ng/Togl2.1/togl.h0000644000175000017500000000637313272137567014666 0ustar kurtkurt/* $Id: togl.h,v 1.39 2009/03/31 23:21:13 gregcouch Exp $ */ /* vi:set sw=4: */ /* * Togl - a Tk OpenGL widget * * Copyright (C) 1996-2002 Brian Paul and Ben Bederson * Copyright (C) 2005-2009 Greg Couch * See the LICENSE file for copyright details. */ #ifndef TOGL_H # define TOGL_H //# include "togl_ws.h" # ifdef TOGL_WGL # define WIN32_LEAN_AND_MEAN # include # undef WIN32_LEAN_AND_MEAN # if defined(_MSC_VER) # define DllEntryPoint DllMain # endif # endif # if defined(TOGL_AGL) || defined(TOGL_NSOPENGL) # ifndef MAC_OSX_TCL # define MAC_OSX_TCL 1 # endif # ifndef MAC_OSX_TK # define MAC_OSX_TK 1 # endif # endif # ifdef USE_TOGL_STUBS # ifndef USE_TCL_STUBS # define USE_TCL_STUBS # endif # ifndef USE_TK_STUBS # define USE_TK_STUBS # endif # endif # include # include # if defined(TOGL_AGL) # include # elif defined(TOGL_NSOPENGL) # include # include # else # include # endif # ifdef BUILD_togl # undef TCL_STORAGE_CLASS # define TCL_STORAGE_CLASS DLLEXPORT # endif # ifndef CONST84 # define CONST84 # endif # ifndef NULL # define NULL 0 # endif # ifndef EXTERN # define EXTERN extern # endif # ifdef __cplusplus /* *INDENT-OFF* */ extern "C" { /* *INDENT-ON* */ # endif # define TOGL_VERSION "2.1" # define TOGL_MAJOR_VERSION 2 # define TOGL_MINOR_VERSION 1 /* * "Standard" fonts which can be specified to Togl_LoadBitmapFont() * Deprecated. Use the Tk font name or description instead. */ # define TOGL_BITMAP_8_BY_13 "8x13" # define TOGL_BITMAP_9_BY_15 "9x15" # define TOGL_BITMAP_TIMES_ROMAN_10 "Times 10" # define TOGL_BITMAP_TIMES_ROMAN_24 "Times 24" # define TOGL_BITMAP_HELVETICA_10 "Helvetica 10" # define TOGL_BITMAP_HELVETICA_12 "Helvetica 12" # define TOGL_BITMAP_HELVETICA_18 "Helvetica 18" /* * Normal and overlay plane constants */ # define TOGL_NORMAL 1 # define TOGL_OVERLAY 2 /* * Stereo techniques: * Only the native method uses OpenGL quad-buffered stereo. * All need the eye offset and eye distance set properly. */ /* These versions need one eye drawn */ # define TOGL_STEREO_NONE 0 # define TOGL_STEREO_LEFT_EYE 1 /* just the left eye */ # define TOGL_STEREO_RIGHT_EYE 2 /* just the right eye */ # define TOGL_STEREO_ONE_EYE_MAX 127 /* These versions need both eyes drawn */ # define TOGL_STEREO_NATIVE 128 # define TOGL_STEREO_SGIOLDSTYLE 129 /* interlaced, SGI API */ # define TOGL_STEREO_ANAGLYPH 130 # define TOGL_STEREO_CROSS_EYE 131 # define TOGL_STEREO_WALL_EYE 132 # define TOGL_STEREO_DTI 133 /* dti3d.com */ # define TOGL_STEREO_ROW_INTERLEAVED 134 /* www.vrex.com/developer/interleave.htm */ struct Togl; typedef struct Togl Togl; typedef void (*Togl_FuncPtr) (); const char *Togl_InitStubs _ANSI_ARGS_((Tcl_Interp *interp, const char *version, int exact)); # ifndef USE_TOGL_STUBS # define Togl_InitStubs(interp, version, exact) \ Tcl_PkgRequire(interp, "Togl", version, exact) # endif /* * Platform independent exported functions */ # include "toglDecls.h" # ifdef __cplusplus /* *INDENT-OFF* */ } /* *INDENT-ON* */ # endif #endif netgen-6.2.1804/ng/Togl2.1/toglStubLib.c0000644000175000017500000000244313272137567016140 0ustar kurtkurt#ifndef USE_TCL_STUBS # define USE_TCL_STUBS #endif #undef USE_TCL_STUB_PROCS #ifndef USE_TK_STUBS # define USE_TK_STUBS #endif #undef USE_TK_STUB_PROCS #include "togl.h" const ToglStubs *toglStubsPtr; /* ** Ensure that Togl_InitStubs is built as an exported symbol. The other stub ** functions should be built as non-exported symbols. */ #undef TCL_STORAGE_CLASS #define TCL_STORAGE_CLASS DLLEXPORT /* * Togl_InitStubs -- * * Checks that the correct version of Togl is loaded and that it * supports stubs. It then initialises the stub table pointers. * * Results: * The actual version of Togl that satisfies the request, or * NULL to indicate that an error occurred. * * Side effects: * sets the stub table pointer. * */ #ifdef Togl_InitStubs # undef Togl_InitStubs #endif const char * Togl_InitStubs(Tcl_Interp *interp, const char *version, int exact) { const char *actualVersion; actualVersion = Tcl_PkgRequireEx(interp, "Togl", version, exact, (ClientData *) &toglStubsPtr); if (!actualVersion) { return NULL; } if (!toglStubsPtr) { Tcl_SetResult(interp, "This implementation of Togl does not support stubs", TCL_STATIC); return NULL; } return actualVersion; } netgen-6.2.1804/ng/Togl2.1/double.c0000644000175000017500000001545013272137567015162 0ustar kurtkurt/* $Id: double.c,v 1.22 2009/03/12 23:59:35 gregcouch Exp $ */ /* * Togl - a Tk OpenGL widget * Copyright (C) 1996-1997 Brian Paul and Ben Bederson * Copyright (C) 2006-2007 Greg Couch * See the LICENSE file for copyright details. */ #define USE_TOGL_STUBS #include "togl.h" #include #include #include #undef TCL_STORAGE_CLASS #define TCL_STORAGE_CLASS DLLEXPORT static Tcl_Obj *toglFont; static double xAngle = 0, yAngle = 0, zAngle = 0; static GLdouble CornerX, CornerY, CornerZ; /* where to print strings */ /* * Togl widget create callback. This is called by Tcl/Tk when the widget has * been realized. Here's where one may do some one-time context setup or * initializations. */ static int create_cb(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { Togl *togl; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "pathName"); return TCL_ERROR; } if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { return TCL_ERROR; } if (!toglFont) toglFont = Togl_LoadBitmapFont(togl, "Helvetica"); if (!toglFont) { static int shown; if (!shown) { fprintf(stderr, "Couldn't load font!\n"); shown = 1; } } return TCL_OK; } /* * Togl widget reshape callback. This is called by Tcl/Tk when the widget * has been resized. Typically, we call glViewport and perhaps setup the * projection matrix. */ static int reshape_cb(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { int width; int height; double aspect; Togl *togl; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "pathName"); return TCL_ERROR; } if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { return TCL_ERROR; } width = Togl_Width(togl); height = Togl_Height(togl); aspect = (double) width / (double) height; glViewport(0, 0, width, height); /* Set up projection transform */ glMatrixMode(GL_PROJECTION); glLoadIdentity(); glFrustum(-aspect, aspect, -1, 1, 1, 10); CornerX = -aspect; CornerY = -1; CornerZ = -1.1; /* Change back to model view transform for rendering */ glMatrixMode(GL_MODELVIEW); return TCL_OK; } static void print_string(Togl *togl, const char *s) { if (toglFont) Togl_WriteChars(togl, toglFont, s, 0); } /* * Togl widget display callback. This is called by Tcl/Tk when the widget's * contents have to be redrawn. Typically, we clear the color and depth * buffers, render our objects, then swap the front/back color buffers. */ static int display_cb(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { static GLuint cubeList = 0; const char *ident; Togl *togl; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "pathName"); return TCL_ERROR; } if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) return TCL_ERROR; glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glLoadIdentity(); /* Reset modelview matrix to the identity * matrix */ glTranslatef(0, 0, -3); /* Move the camera back three units */ glRotated(xAngle, 1, 0, 0); /* Rotate by X, Y, and Z angles */ glRotated(yAngle, 0, 1, 0); glRotated(zAngle, 0, 0, 1); glEnable(GL_DEPTH_TEST); if (!cubeList) { cubeList = glGenLists(1); glNewList(cubeList, GL_COMPILE); /* Front face */ glBegin(GL_QUADS); glColor3f(0, 0.7f, 0.1f); /* Green */ glVertex3f(-1, 1, 1); glVertex3f(1, 1, 1); glVertex3f(1, -1, 1); glVertex3f(-1, -1, 1); /* Back face */ glColor3f(0.9f, 1, 0); /* Yellow */ glVertex3f(-1, 1, -1); glVertex3f(1, 1, -1); glVertex3f(1, -1, -1); glVertex3f(-1, -1, -1); /* Top side face */ glColor3f(0.2f, 0.2f, 1); /* Blue */ glVertex3f(-1, 1, 1); glVertex3f(1, 1, 1); glVertex3f(1, 1, -1); glVertex3f(-1, 1, -1); /* Bottom side face */ glColor3f(0.7f, 0, 0.1f); /* Red */ glVertex3f(-1, -1, 1); glVertex3f(1, -1, 1); glVertex3f(1, -1, -1); glVertex3f(-1, -1, -1); glEnd(); glEndList(); } glCallList(cubeList); glDisable(GL_DEPTH_TEST); glLoadIdentity(); glColor3f(1, 1, 1); glRasterPos3d(CornerX, CornerY, CornerZ); ident = Togl_Ident(togl); if (ident) print_string(togl, ident); Togl_SwapBuffers(togl); return TCL_OK; } static int setXrot_cb(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "angle"); return TCL_ERROR; } if (Tcl_GetDoubleFromObj(interp, objv[1], &xAngle) != TCL_OK) { return TCL_ERROR; } /* printf( "before %f ", xAngle ); */ xAngle = fmod(xAngle, 360.0); if (xAngle < 0) xAngle += 360.0; /* printf( "after %f \n", xAngle ); */ /* Let result string equal value */ Tcl_SetObjResult(interp, objv[1]); return TCL_OK; } static int setYrot_cb(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "pathName angle"); return TCL_ERROR; } if (Tcl_GetDoubleFromObj(interp, objv[1], &yAngle) != TCL_OK) { return TCL_ERROR; } yAngle = fmod(yAngle, 360.0); if (yAngle < 0) yAngle += 360.0; /* Let result string equal value */ Tcl_SetObjResult(interp, objv[1]); return TCL_OK; } /* * Called by Tcl to let me initialize the modules (Togl) I will need. */ EXTERN int Double_Init(Tcl_Interp *interp) { /* * Initialize Tcl and the Togl widget module. */ if (Tcl_InitStubs(interp, "8.1", 0) == NULL || Togl_InitStubs(interp, "2.0", 0) == NULL) { return TCL_ERROR; } /* * Specify the C callback functions for widget creation, display, * and reshape. */ Tcl_CreateObjCommand(interp, "double::create_cb", create_cb, NULL, NULL); Tcl_CreateObjCommand(interp, "double::display_cb", display_cb, NULL, NULL); Tcl_CreateObjCommand(interp, "double::reshape_cb", reshape_cb, NULL, NULL); /* * Make a new Togl widget command so the Tcl code can set a C variable. */ Tcl_CreateObjCommand(interp, "double::setXrot", setXrot_cb, NULL, NULL); Tcl_CreateObjCommand(interp, "double::setYrot", setYrot_cb, NULL, NULL); /* * Call Tcl_CreateCommand for application-specific commands, if * they weren't already created by the init procedures called above. */ return TCL_OK; } netgen-6.2.1804/ng/Togl2.1/pbuffer.tcl0000644000175000017500000000676613272137567015713 0ustar kurtkurt#!/bin/sh # the next line restarts using tclsh \ exec tclsh "$0" "$@" # $Id: pbuffer.tcl,v 1.1 2009/01/29 22:45:46 gregcouch Exp $ # Togl - a Tk OpenGL widget # Copyright (C) 1996 Brian Paul and Ben Bederson # Copyright (C) 2006-2007 Greg Couch # See the LICENSE file for copyright details. # An Tk/OpenGL widget demo with two double-buffered OpenGL windows. # The first shows the aliased object, the second show the results of # rendering the same object in a higher resolution Pbuffer and using # texture mapping to antialias it. package provide pbuffer 1.0 # add parent directory to path to find Togl's pkgIndex in current directory if { [file exists pkgIndex.tcl] } { set auto_path [linsert $auto_path 0 ..] } # following load also loads Tk and Togl packages load [file dirname [info script]]/pbuffer[info sharedlibextension] # create ::pbuffer namespace namespace eval ::pbuffer { } proc pbuffer::setup {} { wm title . "Pbuffer test" #debug image create photo test image create photo test2 #end debug # create first Togl widget togl .o1 -width 300 -height 300 -rgba true -double true -depth true -ident main -create create_cb -reshape reshape_cb -display display_cb label .l1 -text "RGB, Z, double" # create second Togl widget, share display lists with first widget, no depth togl .o2 -width 300 -height 300 -rgba true -double true -sharelist main -reshape reshape2_cb -display display2_cb -ident second setOutput .o2 label .l2 -text "RGB from pbuffer texture" # create off-screen pbuffer, share display lists with other widgets # must power of 2 squared in size togl .pbuf -width 2048 -height 2048 -rgba true -depth true -sharelist main -pbuffer 1 -reshape reshape_cb -display pbuffer_cb -ident pbuffer scale .sx -label {X Axis} -from 0 -to 360 -command {::pbuffer::setAngle x} -orient horizontal scale .sy -label {Y Axis} -from 0 -to 360 -command {::pbuffer::setAngle y} -orient horizontal button .btn -text Quit -command exit bind .o1 { ::pbuffer::motion_event [lindex [%W config -width] 4] \ [lindex [%W config -height] 4] \ %x %y } bind .o2 { ::pbuffer::motion_event [lindex [%W config -width] 4] \ [lindex [%W config -height] 4] \ %x %y } grid rowconfigure . 0 -weight 1 grid columnconfigure . 0 -weight 1 -uniform same grid columnconfigure . 1 -weight 1 -uniform same grid .o1 -row 0 -column 0 -sticky nesw -padx 3 -pady 3 grid .o2 -row 0 -column 1 -sticky nesw -padx 3 -pady 3 grid .l1 -row 1 -column 0 -sticky ew -padx 3 -pady 3 grid .l2 -row 1 -column 1 -sticky ew -padx 3 -pady 3 grid .sx -row 2 -column 0 -columnspan 2 -sticky ew grid .sy -row 3 -column 0 -columnspan 2 -sticky ew grid .btn -row 4 -column 0 -columnspan 2 -sticky ew } proc pbuffer::display { } { pbuffer_cb .pbuf .o2 postredisplay } # This is called when mouse button 1 is pressed and moved in either of # the OpenGL windows. proc pbuffer::motion_event { width height x y } { .sx set [setXrot [expr 360.0 * $y / $height]] .sy set [setYrot [expr 360.0 * ($width - $x) / $width]] .o1 postredisplay .pbuf postredisplay } # This is called when a slider is changed. proc pbuffer::setAngle {axis value} { global xAngle yAngle zAngle switch -exact $axis { x {setXrot $value setXrot $value} y {setYrot $value setYrot $value} } .o1 postredisplay .pbuf postredisplay } # Execution starts here! if { [info script] == $argv0 } { ::pbuffer::setup } netgen-6.2.1804/ng/Togl2.1/ben.rgb0000644000175000017500000014144713272137567015012 0ustar kurtkurtno nameXj} 0!#;$&G')T*,U-/]02a35b68\9;V<>f?AwCDF GIJLMOPRSU VXY[\u]_Y`b>ce"fh i{jlPmo"pqsLtv wXxy{%|^}~%477*&2/.& o}Tf5Ob#Y7ymBjB]>'rD l3FkN‘Sg{$ "6#%>&(K)+S,.U/1]24]57^8:W;=c>@lACEFH IKLNOQRTUWXZ[x\^b_aEbd&eghikbln1oqresuvvwyzQ{|} Famz|{zt>[sWLH ]+y\;{J X=mGX: l%rc¨_p !1"$;%'H(*U+-U.0Z13]46]79[:<^=?k@BDEGHJKMNPQSTVWYZ[]m^`Rac0dfghjnkmBnpq|rt5uvx6ytz{})~Zq/GMJqHfBm6eB+a4M!h5({ |}}|{|w}~~{{y||}xyx{yzw}z}{z{vxsxwpvrmslljhia\ZVZTTOP^J\XS[N3H<B7?^@>XG=A=9>?7:8=;GBICHIIO?9C<9C=ABH@DDHBMF@DIAAKE@FC9?0,0(!~~{~}~}}z}}||u}xvxtzx{ursvpkehfcbcbY\XSWOXXVZTLTK3<9@7B\C;VG:CEAAFDIFJEPMPLHLKOJJKMFHLIKLMPSMQNNJEJFDPIBGE<C:-5,!~~}}{|{|}|z|~z|y{yuwurmqlifeg_]\]\UUTVMZSRXL:@5>6VXLQXC=A>BCPFMPIHGMLOGH[VLBOJOZOJROIRUHNNLG@>KDMHGK?>>616'&e2!C!v2eC!2e2vCe!2eTe!!eܘ!eeCeee2eeeTeeTeTeeTe2e2e2!22CeCeeeeT!e2C22!!v22C!22ev2!22T2!!2e!2ܘ2C22e2T2eT22T2Te2˘2!2!2Ce2C2e222T!2C22!!v22C!22v2!22T2!!22!22Cee2ee2T2e2eT22T2eeT22!22C2e22C2e222eT!222Ce2!!2e!C22!!222!e2eee!eee2e2Ce2eeCeeTee!eCeTeeee!2e!!T2!veeeee4e2!!22!C2!!22e2!22e1!2ˇ2C2eC22T22!2e2ee2C22T2e2e2!22e!!T2!ve22222e22!!22!C2!!2e2!2e!242C2eC22T22!ee2eeCe2T2e22!222!!T2!ve22e2e222e2ee2TC!2!2e2!!2!2!eˇ22!ee2e!ee2eeeeeeeCee˘e2eܘeeTv2!!!eeCeeeee˘e2e˝T!2!22!!!!e22!22e22!22e22222C22e2222e2e2Tv2!!!2ee2C22e222e2T!!e2!!!!eˇ2!22e22!224e222e22e222e2C2eee2ee2e22Tv!!!2e2C2222ee22ee2e!e!C!22T!!!!Cee2e!ܘee!evee2eeCee2eeeCTeeeeeeeTe!ee!!!CveTeeeee!e!eee22!ee!!22T!!!!C222!eܘ22!2v2C222CeT22ee2T22!ee!!v2T2e22!ee22!e2e!e!!2T!!!!C2422!22!2v2ܘC222e22CT22e22e2e2eT224!e4e!!veT2ee2e2e2!e22!2e2e2e222!!!e!!!!CC˿e2!eeC22TeTee2eܘe2eeܘeeܘCeTeTeeeee2e2C!Teܘeeeee2ee22e2!!!2!!!!C22!22e˩C222T22e2e2e22C2T2T2ee2e22222!T22ee2e2e2!!!2!!!!C˿22!22C222T222e2e22ee2eCe2eT2T2eee22e2e222!T2e2ee22ee22e2!!ee2!2!22!!2!C˿T!e!!e2eCeeeT2TeTeeTe˘eeeeeeܘ2eCT2!e2!eeeeTeeeˁ!!2e2!!22!!2!CT!2!!eܘ22C2222T2Tee22T22e222e22CT2!22!22eT2ee2!!ee2!!2!!2!C˿T!2!!e224C2222Te22Te2e222e2Te22ee22ee2e22e22CT2!e2!2e22e2e22T2422e!2eC!!!!ee!eTe22eee!ee2e2Te2eeeTeeeeeveeeeeeeee!e2e2eeCeeeeܘeee2ˁ!22C!!!!e2!2T22!2e2T2e2T2e2e2ev2222e22!22ee22C22e22e2!2eC!!!e2!2T2e2!22T2e22eT2e2ee2e22v2e2e22e222!22e2eCe2ee2eee22ee2e!!2!v22!C!!˘2Ce2eCe!eeeeCeeTeTeCeTeTe2Ceev!e2eeTeeˁ!!!ve2!Ce!!e22C2!222e22eC2T2Te22eC2ee2Tee2eT2e2eC2ev!22T2e2!!!ve2!Ce!!e22C2!222e242C2T2Te2eeCee˘ee2Te2T22eC2ev!22e2e2e2Te22e2C!!eee!2!!!!ee2˘2e!eeTee!eeTee2eeC!eeTee˘TTeeeTeeeve2e2!eeeee!!2e2!2!!e22ee22!2T22!22T2222C!22T2e2222eeT22T2ee2Te222v22e22!2e22e2!!2ee!!!e2e22!42T22!2eT22C!222eTee224e2e2TeeT2e22eTe222v2222!2e2e2e˘2e2e222e!2ve!22vܘe!2e!˘e!eeTeeCeeeeeCeeeTeeeee!TeeC2C2eeCeeeCˁ!2v2!!!!!!2vܘ2!22!e2!2Te2C22e2ee22C22222e2Te2e2e2e2!Te22Ce22ee2e2eC222C˂!2v2!!!!!!22vܘ2!22!˘2!24Te2C222e2e2C22242eeeT2ee2ee22e222!Tee2C22e22e2e22eeCe222eCeee!C!CeT!2!22vC2e2eܘe2e!ee2evCeeCeeeeeCeeTeee2!e!eeee˘eee˘2!!eT!!2vܘC222ܘ2!2e222vC2C22e2e2e22eeC2T222e2!e2!2ˇ2e2e222!!T!!vC2422ܘ2!2e2vC24Ce22ee222eC22eT2e2224e2!2!22e22˘2e2e2e2e2!2!!e!!!C!C!!Tee2e!2ee2eCeeeeeܘeeTܘee˘e2eeCeܘeTeeeCe2!!!2e!!C!!!T˿2!eܘ2eC2e2e22ee222e2e22T22e2e2e2e2T2ee2eC22ˁ2!!!2!!C!!!T2!2C2ee2e22e22e2ee22eee2e2eTeee2eee224eeܘ22eTˇ2eee2eeCe2e22!e!e2!!2Ce2e2eCe2eee2eeCeeeTeeeCܘTeTeee2T!eeeTee22!2!22!!C2ܘC222˩2e2C22˩2T2e2eeC22e2T22eeT22e222eT!22e2eT222!2!22!!C2C222C222e2Te22e2eeC2eeeT2eeeT22222eT!˘22e22e2T22ee!C!C2ee!v2!!e2!eTee2eTeCe!eeC2eeeeeeeee˘TTeeTve2e2eeee2!!22e!v2!22!2T222T2C2!2e2C22e2e2e222e2ee2e2T2T2e2eev22222e!!2ee!v2!22!2T2422T2C2!22C22e2e2e22e2e2e2e2e2eeTeTe22e2v2e222e2e2eev2!!2!e!!2!2C2e22e2eee2e2eeCeCTTeTee˘eeCTeܘe!!eeeeeTeev2!!22e!e!!!22e22e2ܘ2CCTT22eeT2e2e22Ceee2T22e2!!e22122T22v2!!22!e!!!22e2e22ܘ2C4CTT2eeTe22e22eeCeTee22eܘ2!!42ee2ee22T22ee!!T22v!2e2!eee2eeve2eeCe2eeeeeTeTeTC˘eܘTeee˘e!eTeܘee˘eeTeTee!!22ve!2ee2!2ˇ2222v222eC222e22e22eT22eeT22TeCe2e2ee2T22˘2e222!2T22e22T2Teee!!22v!2e!22e2v2eC2242e22eT2e2eTe2TeC2eeeTe22e2eee2!2T24ee422e2T22eT2e˩e!!e2e2e2!!2!!e2e2ee2e2TeeCeCeeTܘCTTeܘeTee2!eCee!e˩2!!22ee2!!!!2e2T22C2Ce222T22C2ee2T222Te2ee22T22e2e!2eC22!2e˩2!!2ee2!!!!2e2Te2C2C2e22eTeeCe2T2eeTe2ee2ee22e2T2242e!2Ce2e2!2ܘ2e!e2e2!2eT!!22eܘ2e2eeeeeTTTTeeeeeeeeeee2!e22!2!2eT!!2˿2e2e222e22T2eeT2T2T2e2ee2e2e2ee222e2e2!e22!22e!2T!!222ܘ2ee2422ee2e2e2TeeeT2TeTeee22ee2e22e2e22˘24ee2ee22e!e2!C2e!ee!2e2e2ee2eCeCeTeee˘eCܘee˘ee˘eeeeeTee!2˿22!22!2e!22222eC2CTe2e2ee22Cee2eee2e2e2e22222T22e2!222!22!2e!2e22eC2C4Te22eee2eCeee22eee2ee2e222422eT222e22!ee2e!2!C!2!Te!eTTee2eeC2eeܘeeeee˘TܘCܘeeeeeeeܘeeeeeC2Ce2e2!2!!!T2!2TT222e˿2C22ܘ2e2ee2e2e2Tee2Ceee2e2ee2e22e22222ee2ee2CeCe2e24!2!!!T2!2TT22C2ܘ2eee2e2eeeeTeeeCeeeee2eee22e2ee2222e2ee2e22C2C2222!e2!2C!2!!eTeCeeCeeeܘTeTTeeeTeeeeeTeee˘22!2!C!!!2T2Ce22C2e2e22T22e2T2e2eeeT2e2e2T2e22e22Tee22!22!2C!!!eT2C2e2C22e22e2ee2eeeT2eeeT2eeeeTee22e2e2eeT222ee2e2ee2T222eeee!2Cee2!eeCeeCTeCeeeeeeTTܘ˘eTeeCeeeeeeTe222!2e2222!22eC22C2T2C22e22e22Teee2eeT22eee2eee22Te2e2C22e2222Tee2e2222!2e222!22Ce2CT2C222e22ee2TeeTeeee2eTe222C2eee2ee222eTee2e!e!T2e2!!CC!2eevܘeܘeTeeeeeeeeeeܘee˘eeT˘!2!2e2!!C!222v2e2T22ee2e2eee22ee2ee2e2e22ee22ee22e22e2T2e2!2!222!!C!222ve2e2T22e22e2ee2eeeee2eee2eeee2ee2e2e22e22e2eeTee2eeeee!!2T2C2!2!C2eeeTeeeeT˘eeTeee˘eeܘeeTeT2eܘ!!2T22!2!222ee2eT2222Teee2e2e2ee2e2Te22e2e22e22ee22T22T2e˘˩24eܘ!!2T22!2!222e2e2e22eT2e2e2e2Teeee2eeeeTee22ee2eee22ee2ee2eTeeTe2e2˩!eCee!e!eCeeTeܘeeee˘ee˘eeTܘeeeC22!2eܘ2!!Ce2e2Te2e22e2e2e22e2e2e2ee22eee2e2222e2T2e2e2222e22eC˘2˩!2ܘ2!4!4C2e2eeܘ2e2eTee2e2e22eeeee2ee2eee22e2eeT2ee2e22ee2eCee!ev2!eCT2!!C2CCeTeeeTeeeTeܘTC˘C˘eeTeT˘2!2v2!2CT2!!2C2eT22e2T222e2ee2Tee2eee2T2ee22Ce2Ce2eee22eTe2222T222!2v2!2CT2!!2C2T22ee22e2eT2e22e2eeeTee2TeeeCeeCe2ee2eeTe2eeeTeee2!eC22C2˩22!!2!2eeܘCeeeeܘTeeeTTeeeT˘˘2!2Ce22˩2!!2!22e2C222ee22T22e2e2e22e2e2e2e2e2ee2eeT22ee2Te22ee22T2!2C222˩2!!2!22eeC2e22e22e2e22ee2eeTeeee2ee22eee2e2eTeeeTe2ee2eTe2e2ee2e!22˘e2!eeTee˘eeeeeeT˘TܘeeTeeee2!22˘2!22e2T222ee2Teee2Te2e2eee2e22ee2e2e2e22eT2e2e222e22e2˂2e2!22e22!42ee22e2T2ee22eee2e2e2TeeeeTeee2eeeeeeT2e2e22e2e2Ce2CC2e!CeeT!C2eCeeeTeTeeTeeeT˘Tee˘ܘTTeeT˘˘C2C22!22˘T!2C22e22T2T2T2ee2Te2e2e2T2e2ee2e2ee22e2ee2T2T2e22e2T2eC42C22!2eT!4C2eee22eeT2e2T2e2eT22eeee2eTeeeTeee22eeeeeTeT2e2eeTeeee2C2e!e!eܩe!22!eeeCeܘeeCeeT˘eeTeeeT˘12C2!2!2eܩ2!22!22ˇ2Cee2e22Cee22Teee2eee2ee22ee2e2ee2222T222e2T2e22C22!2!2ܩ2!22!2e2e2Ce2e2eee2e22eeCe2eTeeeee2eܘeeee2T22ee2T2ee2e2ee2!!e2e˿v22CeCeeeeeTܘeeCeeT˘e˘e2eeTܘeeܘTT˘˘222!!2v22C22eee2ee22T22C22ee2ee22Teee2eee22e2ee2e22T2ee22T2T2242!!2˿v222C222e22e2e2eT2e22C2e2eeeeeeTeee2eeee2eeT2e22TeTe!e!eCe!e2e2v˩e2!eTeT˘CCCeTeeee!e˘ee˘eve!2!eC2!222v22!2T2T2e2C2Cee2C22T222eee2e2ee22eee22ee2e2e2!2e22˘22ee22e˘ve!2!eC2!2v˩22!2T2T2eeC2Ce2C2eT2e2eeeeee2eee2!2e2ee2e2e2eeevee2e!e!e2ee2e˘eeTCCeCeTTe˘ܘT˘˘ˇeCeTveC2422e22!2!222e2TC2C2e2Ce2ee2TT22eee2ee2eee2ee2T2e22eeee2ee2Ce222eTveC2e224e22!2!22e22e22TCeCeeeCeeee22TT2eeeeeeeTeeeee˘e2eeC2e2eTvCeTe!v22!ee2!e˿T2evTTeܘTTTeTeܘTܘeTTe22eeT2!ev2!22!2T2vTT22T22TT2eeT2ʘ2T2eee2eee22eee2ee22eee2eee2e2eee2ee22eTe22eT2!ev22!242!e˿T2vTTee2eT2eTT2e2T2ee2TeeeeeeeeܘeeTe2ee2e22e2˘eeeTܘTTC˘eeee˘ee2e22e2ee2e2TeT2T222Cee22e2e2e2e2ee2eee2e2e2ee2e2˘222ee22e22e22e2˘2e2eee22eTeTeT2eeCee2e22e˘eeeeee˘e2e2eee222e!Cee2e2eC˩eCeTTTTT˘TTeeܘ˘eeeeT˿Te2!eC2222C2C22T2T2Te2T2Te2T2eT2ee22eeeee2eeee2ee2e2ee2ee2e2e2T2e2eeTe2!Ce22424C˩2C22TeT2TeeT2Te2TeeTee2eeeeeeee2e2e2˘eTe˿eT22v˘veCe2eveeTTTTeT˘eeC˘˘˘eܿee2v2ve2C2v2T2T2eeT2T2eT2e2e2ee2Ceee2e2e2eee2eeee2eee2eeee2eee2ee22ܿee22eee2v2v2C2v2eeTeTe2eeTeTeeTe2eee2eeeeCeeeeeeeeeeeeeeܿe22vTeee2e2eeCeTܘTTeTeT˘˘˘ee2vT22222C22T2T2Te2e2Te2e22eeeT2eeee2e2e2eee2ee2eee2ܘee2eee2vTe2eC2eTeTeTee2e2eeTeee2eTeeeeeeeee2eeeeee2eeeeܘeC2e2veܘeeCeTܘe˘T˘˘˘˘˘ܘ˘Te22ee2ܘ2C2ve2e2e2e2Ce2ee2e2Te2e2e2Teeee2eee2eeee2ee2e2e2eee2ܘT2e2eee2ee2ܘ2C2ve2e2eee2eeeC2eeTe2Teeeeeee˘e˘eܘeeTe2CTT2Te2eTeTC˘eT˘˘˘˘˘˘evCTT˘2eT2ee2T2eeee2T2e22Ceee2e2ee2e2T22eeee2eee2ee2eee2eeܘ2e2eevCTT2T2eeTe2eTee2eCe22e2ee2eeTeeeeeee˘eeeeee2v2eeܘT2eeC2eeeeeT˘CTeTCܘ˘˘˂eve2eeTܘ22˩2C2e2ee2T2ee2Ce2T22eeee22T2e2eeee2Ce2ee2eee2eeeeeee2ee22eev2eT222C22ee2eeeeTeeeeCeeTe2eeeTeeeeCeeeeeeeeܘeeev22eeTˇe2ee2˘TTTܘT˘T˘e˘˘˘˘˘˘e2T222e2e2T2Te˘e2eT2T22ee2e2e2Te22eee2eee2eee2eeee2ee2e2e2eee2Tˇ22e2eeT2Teee2TeTe2eeeTeee˘eeeeeeeeeeeeee2eee2eCe2eeTT˘TTܘTe˘˘ˆ˿ee22e22C˿2T2T2e2T22e2Te22T2eeee2eee22eee2eee2eee2eeee2ee2e2ee2eeee2e2e22224C2eTeTeeeTeeeeTeeeTeeeeeeeeeee2eee˿e222Cee!eܘe2e˘TTeT˘ܘ˘˘˘˘˘˛˘˿TTeeeC22!2e22T2eee2eTe2e22e2e2222e2eeeTeeeeee2e2eeeܘeee2TeTeeC2e!2eܘ22eeTeeTee2e2eeeTeeeeeeeee˘ܘeeeeTeT22e2eCeeeeTܘTTTTeˊ˘˘˘˘˘˃ܘ˘eee222C2222TeT2T2eT22eee2Tee2e2eee2ee22eeeee2eeee2eeee2ee22eeeeeee2ee222C2ee2TeTeTeeTee2eT2e2ee˘eܘeeeeee˘eee222eee!eeeeeܘCC˘˘˘˘˘ˇˋ˘Teev22!e2e2ܘ22e2C2ee2ee2e2ee22Cee2e2eeeee2eee2e2eeeeܘee2e2e2Tev22!e2e2e2eܘeCeeeeeCeeeܘeeeeeeeeܘ˘ܘe2T22vee2eTeCeCeܘe˘ee˘˘˘˘˘˘ܘ˘˘eeee2T2C2C2ee2ee2e2ee22ee2e2e2eee2eee2eeeee2eeee2ee2eeeeeee2e2eee2T2C2C2e22eee2eeeeeeeeeeeeeeeeeeeee2ee2eee!e2e˩ee˘eeT˘eTˆ˘˘eeee22!222ܘ2e2ee2Teee2ee2e2ee2ee2Teeeee2eeee2eeee2eeee22e2ee22!2˩22e2e2ܘee2eeeTeeeeeeeeeTeeeeeeee2e2e2e2ee!e!eeT˘ܘ˘˘˘ˋ˘˅eee22!2!2e2Tܘe22eeee2e2ee2eee2ee2eeee2eeeeeee2ee2e2eeeeee2e2ee22!2!2e2eTe2eeeee2˘eeeeeeee˘ee2ee2Te!e2eveeC˘˘˘˘˘˘˘˘eCeveT2!22v˘22eCe2ee2eee2eee2e2ee2eee2eeeeeeee2eeeee22e22C2veT2!224v2e2eeeeCeeeeeeeee˘eܘeeeeeeeeeee2eC22veee!eTeeevvC˘T˩ˇ˘˘˘˘˘˘˘˘eevvee2!2T222vvCe2e2ee2Tee2ee2eeeeeee2eee2ee2eeeee2e2e22evve2!2T22e2e22vvCeeeTeeeeeeeܘeeeeܘee˘ee˘ee2eevv2eeeCTeeeCe˘˘ˑ˘˘˘˘˕˘ܘeeee22T22e2C2ee2eee2e2ee2eeee2eeeee2eeeeeee2ee2eeeee22ee22eee22T2e2C22e22eeeeܘeeeeeeeeeeeܘeeeee2T22Teeeee˘Tˇ˘˘˘ː˘˘˘˘CeeT22T22e2e22eeTe2eee2ee2ee2e2eee2eeeeeeee2ee2eeeeee2C2eeT22T22e22ee22eT2eeeeܘee˘eeeeeeeeeeeeC2e22eTC˘˂˘˘˘˘˘˘˘ˁeee2e2TC2ee2e2ee2ee2e2e2eeeee2eeeeee2eeeee˘2eeee2e2TCeeeeeeeeee˘ee˘eeeeeeeeeeeee2ee!eTe˘˘˘˘˘˘˘˃˂evev1!2T22e2e2eee2ee2e2eeee2eee2eeeee2evev!2T2ee2eeeeeeeeeeeܘee˘ee˘eee˘ee2v22ve2e!TeeC˘˘˘˘˘˘˘˘e22!T22eCeee2eee2e2ee22ee2eee22e2eee2e2eee2eee2ee2e˘ee2e22!T22eCeeeee˘eee˘eeeeeeee˘eee2e2e!2TeeT˘˘˘˘˃˘˘˘ˁ˘Cee2!2T222Tee2ee2eee2eeeeee2eeeee2eee22eˇeee2Ce2!2T2e222Teeeeeeeeeeeܘeeeeeee2eeeܘeeCe22ee2eCeTe˩ܘ˘ܘ˘˘˘˘˘˂˒˘Tve222C22T22ܘe2ee2e2eeeeee2eeee2eeee22eeeeeTevee24C22eeTee˩eeeܘeܘeeeeeeeeeeeeT2v22ee!!eee˘˘˘˘ˉ˘˂˂ˊ˘ee2e!!2e22ee2eee2eeeee2eee2eee2ee22ee2eeee2eeee!!2eeee2˘eeeeeeܘeeeeeeeeeeeeee2e22e22e!eee˘˘˘˘˘˘˘˘ˇve2e2!22ee22ee2ee2eeeee2e2e2eeee2eee22eeeee˘vee222!22ee2eeeeeeeeeeeeeeeeeeee2eeܘeeeev2evee2!eee˘˘˘˘˘ˈ˘˂˃ˈee2ve2!22eeeeee2e2eeeee22eeeee2eeeeeee2v242!22eeeeeeeeeee˘eeeeeee˘ee2TT2e2e˘˘˘ee˘˄˘˘˘ˇܘeTTe2˿2eee22eeee2eee2ee2ee2e2ee2ee22eeeeeeeeeTTe2eeeeeeeeeeee2eeeܘee˘eee2eeeeeeee2ee܇e2eeTT˘˔˘˘˘˃ˇ˘ܘev2܇2T2Te2ee2ee2eeeee2e2eeeeee2eee22eeeeeeeve2܇222TeTeeeeeeeeeeeeee˘ee22v2e2eeTeT܇˘˘˘ܘ˘˘˘˘ˍ˘e ee2T2eeTeee2eee2ee܇eee2eee2ee2eeeee2eeee22eeee 22T2e2Teee܇eeeeeeeeܘeeܘeeeeeܘe2eeee2e eee2eeTee˘e˘˘˘˘˘˘˘ˋ˘˘e e2T2eee2ee2e2ee2ee2e22ee22e2ee2eeee2ee˘ee e22eTe2e2eee˘eee˘eeeeeeee˘eeeeeee2 e2eeeܘe˘ܘ˘˘˘e˘˘˘˘ˊ˘˘ 2e22222eeeee22eȘe2e˘e22ee2ee2eeee2eeeeeee 2e22ee22eeeeeeeܘeee2eeeeeeeeee2 eeCvTe˘˘˘˘˘˘e˘ܘee˘˘ e2CvT2e22eeee2eeeeee2ee2eȘe2e222eeee22eeee ee2CvTe2ee2eeeeeeeeeeee2e˘2ee2ee˘eeܘeeee TTe˘eT˘˘˘eCeCeee˘ˁ˘TT22eT2ee2e2eee2eee2e2C2e2eeCe22e2ee2e2eee2eeeeeeTT2e2eTeeeeeeeܘeeCe˘eCe2e2eeeeeeeCTe˘ܘ˘˘˘eC˘ee˘˘ˏ˘eC˘T222eeee2eee2e2e2e2eȘe2ee2Cee2eee2eeeeeeeeCT22eeeeeeeeeeeee2ee2eeCe2e2eeeܘeeeeee2ee˘T˘˘˘˘˘˘e˘eeTe˔˘˘ܘe22eTeeeeeee2e22Șe2T2ee2eeeeeܘe2eT2eeeeeeeeee2 e22eeT2eeeeeeeeeeeeCve˘ee˘˘ˁ˄eeC2e2eeee2eee2v2eȘe2ee2e2eeeeee˩e22Ceeeeeeeeev22˘eee2ee22eeeeeeee˩2eve˘˘˘˘˘˘˘ܩe˄˘v2e2eeee2eeeee22ܩ2eȘȘe˿ee22eee22eeee2ev2e2eeeܘeeeeeeee2ܩ2eeeeee2e˘eܘee2eeeeT˘˘˘˘˘TC˘˿e˘˘˘˘e22eTeeee2eee2TCe2ȘȘȘȘe222eeeeܘ222eTeeeeeeeeeTCeeeeˆܘ2e˘eeee2ee˘˘˘˘ee˘˘˘˘ܘ22e2eeeee2e2eeȘeeeee2eˇeeܘe2eeeeeeeeeeeeeeܘeeeeeeee˘˿Tˇ˘˘˂ˁ˘˘ee22eeee2eeeee22TeȘȘeeeee2eeee˘222eeeeeeee2Teeeeeeeeeeeܘee˘˘˘˘e˄˘ˆˋ˘˘ee22eee2eˇee2ee˿e22ee˘Ș222eee˘ee22eeeeˇeeeeee2eeeeeeeeee˘eeeeeeev˘˘˘˘ܘ˘Te ˅e˘ˇee2veeeee2e˘T2˘˘ȘȘee22e2eeeee22veeeeeT22eeeeeeeee2e˘ee˘eeee˘˘˘˘˘˘e evܩeeeeeee22eeȘȘȄe22ve22eeeܩeeeeeeee˘eeeee2eeeeee eeee2e2veeeeܩ ˘˘˘˘˘˘˘˘Ce˘˃ ܘeeeeeeeCeeȘȘȘȘȘȘ˘e22ee2e2eee2e˘eeeeeeeeeCeeee eee2e2e2eeܘe ˘T˘˘˘˘ee eTeeeeeeee2eeȘe2e222eee22 eTeeeeeeeeee2eeeeeeeeeee2e2eܘee e˘˘˘˘e ˘eeˇe! eeeeeee2e22Ș˘ee2e22e2e! 2e2eeeeeee2eeeeeeeee22e22ee2eܘ ˘eˆ˘eeT" ee2eee2eeeee2ee2222eeeee22e2Te2e" eeeeeeee˘2eee2eeeeee2eeTe2" e܇˘˘˘˘˩ee˂eee# ee܇e2eeeee2e22eee2222e2e# ˘e2e2e܇eee222eeeee2e2ee22eܘ#˘˘ˆe˘˘˘e˘e˿˘%˘ee2eeee2eee2ee2ee22eeeeȂe2e22˘%ܘe2e2eeeee˄e2eee2eeee2e22e2eee$˘˘˩˘˩˘˘˘ܘeeee˘eeT%ˋ˩˘˩˘eeeeee2e2ee2ee22eee2eȎee222Te%eeeee2eeeeeeeܘ22e2ee22e2e2ee22e2˘eTee2%˩˘˿˘Teˁe˘eC˩e&˩˘˘˘˘˘˘e˃eee2e2Te22eee21eeȘ˘22Ce&ee2e˃eeeeeTe2e22e2e2e2e22eeee22Ce2e%˩eT2TeveeTe˘˘˘˘eeT˄eˇeeee&˩˘eTeTeveeTeeeeeee2e2e2Teee2eee2ee˘e22&e2T2T2eev22T2e˘eee2ee2T22e2eeee2ee22e2&˩2eCev˩˿Teˇe˘e2eee'˩˩ee2eCevee˘˿ܘeee22eT2eeȘȘee22ee22'ee2C22v22eeeeܘeeT2e22eeee22eee22e'˩˩˩v TeeːT˘e˘ee'˩˩˩ve2Te22eeeTee eee212eee2'eeev˘ ˊܘ2eeTee2e22T2eee222e22e22e'˘˩˘ˎ˩˩˩˩˂eeܘee˄eˆ˂e˘T˘e'ˈ˘˔˩˩˩˩˘˘e22e22ee22eeeee221ee˘2T'eeeܘܘe˘e22ee2ee2ee2eeeee22e22Te2e2'˩˩˘܄˘eeeeˊeˎ˘Ceeee'˩˩˩܄e2e2eee2eeeeeeCe22eeee'ee܄˂ee22ee2ee2e2 e2C2e22e2e'&eeˇee˄eˁ˘eee˄ee'!e2222eeee2e2eeee'ˁ ˁ ˃ˉ22e2e2 eee2ee22e2e22e'˩˩˂ˈ˘Ceeˑee˘ee&˩˩ˍe2C22eee2eeee2e'eܘ˘ܘܘܘe2C2e2eeee 2e2e2&˘˩˘˘˄ e˘ee˘eee&ˁˉ˘22e22eeeeee2e&ee˘2e2e2e2eee 2ee&ˋ˩ ee˘ee˃eee&ˆ˩ 2e12eeee˘e2ee&˃ˁˁˁ˃222e2e2 e2e22e&˘˩ˁ ˆeeeee&ˁˁ ˇ2e22eeeee2ee&e˘˘e2eee 2e2ee%˿˃˘2˂ܘeeˁ˃eve%˿˃˘2˘e2ee2e2eee2e22ee˘eee21ev%e22ee˘22e2e2ee2e2v2e%˅˩˘˥e˘˂˘eeCee%˃˩ˬܘe2eeee22eee2eeeee2C%eeܘܘܘܘܘ˘˘ܘܘ˂e2e2ee2eeee22e2C22e%˃˩ˇe˘ee2eeee$˅˘˩˩ˇee2ee22eȘ22eeeee22e$eeeeee222e2e˘e2e2e22e2e$ˁˈC!!ˁ#eee˂ ˘e22e"ˁˆC!"e2e2eeee22e"eeCeeˉ2e22e˄ee22e22e222222ee!ˉev ˞e˅˙˘e2!eeeeee ˩˩ev ˎee2eeee2eeeeee22!e 22ev2e ܘܘ˘˘ܘˎ2ee22e˘e2e2e22e2!22e2ee ˄eve˩ˆeee˃e˃eeCeeevee˩ˆe2e2eee2eeeee1Ceev2e2eeee˘2ee2e2e2C22e222eˁ˃C˂"eee 2eeeeeˁ˃C!"ee2eeeeeȘe21e eCeܘ 2ee2e2eeeee22e 2eˈ2!v˄eˁ˄˘eeeeeˏe!!vee1eeeeeeȊee22 e2vee222ee2e ee2e˘e22e2eˋ˩veCee"e˃˘˂˘ee˘eeˋ˩veCee!e2e2eeeeeȆee1eܘ2v2C22e˂2e2eee22e˘e22ˉ2!!v%e˘eeeveˊe!!!v$e2eee eeee˘e2ev˘2!!ve 2e2ee2e2e2e2ee˘e2e2v2e˅˘Cv$e˃ eeˋ˘ee˅˘C!v#2e2eeeeȇee2eeeCve 2e2e22ee˘ee2e222eˆ˩e!2vˁ!ee˘ ˘eev˩e!2v˂ eeȘeȄ˘e2v˘ܘe2!veܘ2eee2ee2ee˂e˘ee22eee2v2ˇee!!e%ee eeveeeˌe!!e#e2eeȘe˘e ȁeȅȘvee2!!ee!2ee22eee22e e22˘e2v2eˉve!!e%e e˘eveˋve!!e˘#2eeȅȘeȁ22vv2!2˘ 2eee2eeeeee2˘e2v22ee˘e!!!v˂!e˘eeeeee˘e!v˂!eeȆ2eeeܘܘܘee2!!!ve˘e2eeee22eeee2eee22ee2e2eeˇv!2!2e$e ˘e!ee2eevˇv!2!2e˂ ȘeeȘeee2!2e2evev!!22˘e2eeeee2eeee2ee22!2ee2v22eˉee!!e%e  ˘e!e!eeeeˌe!e Ș2e˘ȘȂe ˘ee1!!eȘe!eeܘe2!ee˘e22eeeee2e22 e22!22!2e˃T!e˃eˇC!C!ee˄T2!e˅e˘eeȁeeeeeCee!!e˘eeT!2e2eee2ee2 e22C2e2!2e˩T2!22e#˘˓e!e2Cee˩T2!22e˘ee˘eee2eeec2!!2e2Cܘ˘eT2!2ee2eee2e22e2e22e22e2e22!2e2C222e˂eT"eˇ!!T˓ee!2!e2ee˂e!Teeeeeeee!!Te2eee22!2!2e2!ee˘e2T˘e22eeee2ee22e2e!!Te22e2!22e˩e!!e%˘˂ˆe2!!eee!2C2e˩e!!e ȘeeeȘee2!!2e2e2!22ܘ2!!2eee2e2ee2e2ee222!!22!22ee˃e2e˄e˃˘˄e22eee2eeee˂e2e˃Ȅ˘2eeeȁee222e2e212eeܘee222eee2 e222eee2222e˘v!e%2ee˘eeee2!2ee˘v!!e˂Ȅe2ee22˘eeȘe2ee21221e22!ee˘˘ܘev!2˘e2e2˘22ee 22222!2e22eˉv!T%C2eˋeC!e˘˘ee2e2ee!22eeˊv!T ȏC22ee2eC!eeȅee2212.e121!2eevTeeC22e2eC!ee22ee2222!2e2eˈve2TeeˁeeeT2!22e2ee 2eeeeˈveeTee˘˂Ș2e1T2!22eȘee2e2c2 2eee˘eev22T22eee ˃ ee22T2!22e2˘e222e22 2e˘e!e"˘2!!ee2e ˇ˘ee! !Ce˘!eˁe2!e212122122eeȘeeee21! !Ceeܘܘܘe2!2˘e22!2222ee˘ee2e2e2e2! !C2e˂vT"e!!ee2eˆ2!!4ee˂vT e2!!122e2e2eȂee2c2!!eeevTee2!2e2ee22!222˩v2!22e ˂e!!ee2!e 22 eeve˩v2!22e˘˃1!!12!1eȄȘe2 !2evev!22eܘ!!2222!2eee2e2 22v2e˃eC2e˃2222e˘C!!2eeˉC2e2e˂22221221212eȁee2!!2e2C2ee˘e2222222ee2!222eˇe2!e!2!2ee˘eC2 2eeeˋe!2e e!2ceȘ˘ee1C2 2ee22e2!222ee˅˄ee22C 222e˘e!!!T˄ܘe2!2ee˘C22ee˂e!T˘˃ܘ22!!22e Ȃee22 eeee2!!!Teeeܘ e2!2e˃eee22eeˍveTeev˘˩˂T!!e˘e2!!eeeeˈveTeev˩T!!!1e2eȂȂe22!eeev2T22vee˂eT!!2ee2!2222ˇe!!CT2!!ee˘e!!2eeˌe!!!CT2!!12ceee1!!2eeܘe2!!CeT!!22ee22!2e˃eC˩˄e2!!2e˃e! !eev˃e!C˄e2!!!2ee ˘e2 !eveeCeܘ22!2eˋ˘e2 !22v2˅ee2e˘˩˂v!e˘e!2e˂e˩˘ˁv!2ceee Șe21! 2eeܘe2eev22e2e2ee˘ee2!22eˇe!!!C˄22ee˘ee!2!eeeˏe!!!C2!!2eeee21!!2!eee!!!Ceܘ2e˘ee2!!222eˇe!!2 2!ee ee22!2!eeˎe2˘2!!12eeeȃe2!2!!eeee22e˘!2ee2e2222eˋeC2C2e˩˃C!2e˘e2!!!!22eeˈC2Cee˃C!22_eeeȁȗee1!!!!!!22e˘e2CC22eeC!222e2ee2!!!!!2222e˂e2e˘!!!!2e˘e2!2!!!4eˇe2e22e!!22ee22!2!!e˘e2e˘!!2ee˄ee2!!2e˃vC!Te ˘eC!2!!22Tv˃vC˃T2!2eeȁȜee2!2!2!2Tv˘evCe˂T2e2eee2!!Tv2eˍe22!2T˘˩˃22˘ ee!2!!2!!!!2eveˁˇe22!2T˩˂e!22e˘e21!2!!2!!!!2eve2!Te˘e2eee22!!!!2v2eˊeC2eTe˄C!!!e˘ 222!!!!CeeˈCeeTe˘˄C!!!12e˂ȉe22!!!!!Ce˘eeC22T2eeܘC!!2eeee22!!!C2˃e!C#!2˘ ˘2!!!!!!2ee˄e!C˘2e˘e22!!!2eee2!Cee˘2eee2!!!!22e˃e!2˂2!2!e˘ˇe2!!! !2Ce˃e22!!2!2e˂ee2! !!2Cee22ee!!2ee22! 2C22˄v2e˩!!!2˘ee2!!2!2!2ev˃ve˩˘e!!!2ee2!!2!!2!!2eveev2eee!!2e2!!2v2ˇe!!!C˂"22!ee˅ee2!!!!!2eˁˎe!!!C!22!!!1eceeee22!!!!!22e˘2!!!Ceeܘ2!!!22e2e2!!!!2eˈe!2˂"e!!ee!2!!!!22C4eˏe!2˘"e!!!2e21!2!!22Cee˘˘ee22ee˂2!!! 2!!2C2eeˈe2CeCe˩˩2!!2!22e22!!!!!22eev˿ˈeeCeCe˩˘2!2!2212e2!!!!!!!!22eev˿ee2CC2eee2!!222!!!!22ve˂e!2C˂#C!2!!2!!!!!!!!!!2e˂e!2C˘!C!2!!2!!!!!!!!!!!22eeee2!2Ce˘C!!!2!!!!!!2ˉe!!2%e!!!!2!!!!!!!!!!2ee ˈe!!2˂#2!!!!2!!!!!!!2ee ee!2ee˂2!!!!!!!!2e˃e2e˘ˁ 22!!!!!!!!!!!2!!22ev ˄˘e2˘˂22!!!!!!!!2!22ev e2222eeܘ2!!!!!!22v ˊeC2C2e˂$e!!!!!!2!2!2!Cee!ˈeCeCee˘"e!!!!!2!2!!2!Cee!e2C2C22eee!e!!!C22ee!˂e!2˂'e2!!!!!2!!22e#˃e2˂'22!!!!2!!!!!!22ee#˘e22ee#2!!!!!!2e#ˁˊv2˃$܇Ce2!!2!!2!!2Cev$˘ˇv!!2e˘˃$܇C2!2!2!!!!2!2Cev$ev2ee#܇C2!!!2Cve$˂eTe(22!2!22ee&˂eTe˘˘'22!!!!!2!22ee&ee2T2e&2!!!!22&ˉe!2.ܘ!!!2!!!C2ee)ˉ˘e!!2ˁ,ܘ!!!2!C2e)ee˘)ܘ!!!!!!C22ee)˿˃e!˃,ܘe22!!2e*˃e!˘,ܘe2!!!2ee*ܘe2!ee+ee2!!!2e*˅e2Te˘/ee!222-˅eeTe˘˘˘.˘e1!222e-ee22T22 e-ee2!22-˃e2!2˘˂41˄e2!2˘4˘e1e!22ee˘1ܘe1˅e!n˅e!˃ke2!ejˁ˂e2ev˘jˁ2ev˘ˁiee22v2ei˃e2C˩˂l˃e2eC˘iܘe22Ceeeinetgen-6.2.1804/ng/Togl2.1/pbuffer.c0000644000175000017500000003110313272137567015332 0ustar kurtkurt/* $Id: pbuffer.c,v 1.2 2009/02/05 06:57:10 gregcouch Exp $ */ /* * Togl - a Tk OpenGL widget * Copyright (C) 1996-1997 Brian Paul and Ben Bederson * Copyright (C) 2006-2007 Greg Couch * See the LICENSE file for copyright details. */ #undef PBUFFER_DEBUG #define USE_TOGL_STUBS #include "togl.h" #include #include #include #if defined(TOGL_AGL) # include # include #elif defined(TOGL_NSOPENGL) # include # include #else # include #endif #include /* OpenGL 1.4 GL_GENERATE_MIPMAP */ #undef TCL_STORAGE_CLASS #define TCL_STORAGE_CLASS DLLEXPORT static double xAngle = 0, yAngle = 0, zAngle = 0; static GLdouble CornerX, CornerY, CornerZ; /* where to print strings */ static GLuint texture; static Togl *output; /* * Togl widget create callback. This is called by Tcl/Tk when the widget has * been realized. Here's where one may do some one-time context setup or * initializations. */ static int create_cb(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { Togl *togl; double version; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "pathName"); return TCL_ERROR; } if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { return TCL_ERROR; } version = atof((const char *) glGetString(GL_VERSION)); if (version < 1.4) { Tcl_SetResult(interp, "need OpenGL 1.4 or later", TCL_STATIC); return TCL_ERROR; } return TCL_OK; } /* * Togl widget reshape callback. This is called by Tcl/Tk when the widget * has been resized. Typically, we call glViewport and perhaps setup the * projection matrix. */ static int reshape_cb(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { int width; int height; double aspect; Togl *togl; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "pathName"); return TCL_ERROR; } if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { return TCL_ERROR; } width = Togl_Width(togl); height = Togl_Height(togl); aspect = (double) width / (double) height; glViewport(0, 0, width, height); /* Set up projection transform */ glMatrixMode(GL_PROJECTION); glLoadIdentity(); glFrustum(-aspect, aspect, -1, 1, 1, 10); CornerX = -aspect; CornerY = -1; CornerZ = -1.1; /* Change back to model view transform for rendering */ glMatrixMode(GL_MODELVIEW); return TCL_OK; } /* * Togl widget reshape callback. This is called by Tcl/Tk when the widget * has been resized. Typically, we call glViewport and perhaps setup the * projection matrix. */ static int reshape2_cb(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { int width; int height; double aspect; Togl *togl; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "pathName"); return TCL_ERROR; } if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { return TCL_ERROR; } width = Togl_Width(togl); height = Togl_Height(togl); aspect = (double) width / (double) height; glViewport(0, 0, width, height); /* Set up projection transform */ glMatrixMode(GL_PROJECTION); glLoadIdentity(); glOrtho(-aspect, aspect, -1, 1, -1, 1); /* Change back to model view transform for rendering */ glMatrixMode(GL_MODELVIEW); glLoadIdentity(); return TCL_OK; } static void draw_object() { static GLuint cubeList = 0; glLoadIdentity(); /* Reset modelview matrix to the identity * matrix */ glTranslatef(0, 0, -3); /* Move the camera back three units */ glRotated(xAngle, 1, 0, 0); /* Rotate by X, Y, and Z angles */ glRotated(yAngle, 0, 1, 0); glRotated(zAngle, 0, 0, 1); glEnable(GL_DEPTH_TEST); if (!cubeList) { cubeList = glGenLists(1); glNewList(cubeList, GL_COMPILE); /* Front face */ glBegin(GL_QUADS); glColor3f(0, 0.7f, 0.1f); /* Green */ glVertex3f(-1, 1, 1); glVertex3f(1, 1, 1); glVertex3f(1, -1, 1); glVertex3f(-1, -1, 1); /* Back face */ glColor3f(0.9f, 1, 0); /* Yellow */ glVertex3f(-1, 1, -1); glVertex3f(1, 1, -1); glVertex3f(1, -1, -1); glVertex3f(-1, -1, -1); /* Top side face */ glColor3f(0.2f, 0.2f, 1); /* Blue */ glVertex3f(-1, 1, 1); glVertex3f(1, 1, 1); glVertex3f(1, 1, -1); glVertex3f(-1, 1, -1); /* Bottom side face */ glColor3f(0.7f, 0, 0.1f); /* Red */ glVertex3f(-1, -1, 1); glVertex3f(1, -1, 1); glVertex3f(1, -1, -1); glVertex3f(-1, -1, -1); glEnd(); glEndList(); } glCallList(cubeList); } /* * Togl widget display callback. This is called by Tcl/Tk when the widget's * contents have to be redrawn. Typically, we clear the color and depth * buffers, render our objects, then swap the front/back color buffers. */ static int display_cb(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { Togl *togl; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "pathName"); return TCL_ERROR; } if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) return TCL_ERROR; glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); draw_object(); #ifdef PBUFFER_DEBUG { Tk_PhotoHandle photo; /* first tcl: image create photo test */ photo = Tk_FindPhoto(interp, "test2"); if (photo == NULL) { fprintf(stderr, "missing tk photo object test2\n"); } else { Togl_TakePhoto(togl, photo); Tcl_Eval(interp, "test2 write test2.ppm -format ppm"); } } #endif Togl_SwapBuffers(togl); return TCL_OK; } /* * Togl widget display callback. This is called by Tcl/Tk when the widget's * contents have to be redrawn. Typically, we clear the color and depth * buffers, render our objects, then swap the front/back color buffers. */ static int display2_cb(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { Togl *togl; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "pathName"); return TCL_ERROR; } if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) return TCL_ERROR; glClear(GL_COLOR_BUFFER_BIT); if (texture) { glEnable(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D, texture); glBegin(GL_QUADS); glTexCoord2i(0, 0); glVertex2i(-1, -1); glTexCoord2i(1, 0); glVertex2i(1, -1); glTexCoord2i(1, 1); glVertex2i(1, 1); glTexCoord2i(0, 1); glVertex2i(-1, 1); glEnd(); glBindTexture(GL_TEXTURE_2D, 0); } Togl_SwapBuffers(togl); return TCL_OK; } /* * Togl widget display callback. This is called by Tcl/Tk when the widget's * contents have to be redrawn. Typically, we clear the color and depth * buffers, render our objects, then swap the front/back color buffers. */ static int pbuffer_cb(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { Togl *togl; int width; int height; GLenum error; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "pathName"); return TCL_ERROR; } if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) return TCL_ERROR; width = Togl_Width(togl); height = Togl_Height(togl); if (texture == 0) { glGenTextures(1, &texture); glBindTexture(GL_TEXTURE_2D, texture); glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); #if !defined(TOGL_AGL) && !defined(TOGL_NSOPENGL) glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR); #else glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); #endif glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, width, height, 0, GL_RGB, GL_BYTE, NULL); glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP, GL_TRUE); glBindTexture(GL_TEXTURE_2D, 0); error = glGetError(); if (error != GL_NO_ERROR) { fprintf(stderr, "texture init: %s\n", gluErrorString(error)); } #if 0 && defined(TOGL_AGL) AGLContext ctx = aglGetCurrentContext(); AGLPbuffer pbuf; GLint face, level, screen; GLenum err; aglGetPBuffer(ctx, &pbuf, &face, &level, &screen); err = aglGetError(); if (err != AGL_NO_ERROR) fprintf(stderr, "getPBuffer: %s\n", aglErrorString(err)); aglTexImagePBuffer(ctx, pbuf, GL_FRONT); err = aglGetError(); if (err != AGL_NO_ERROR) fprintf(stderr, "teximagepbuffer: %s\n", aglErrorString(err)); #endif } glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); draw_object(); #if 1 || !defined(TOGL_AGL) glBindTexture(GL_TEXTURE_2D, texture); glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 0, 0, width, height); glBindTexture(GL_TEXTURE_2D, 0); error = glGetError(); if (error != GL_NO_ERROR) { fprintf(stderr, "after tex copy: %s\n", gluErrorString(error)); } #endif #ifdef PBUFFER_DEBUG { Tk_PhotoHandle photo; /* first tcl: image create photo test */ photo = Tk_FindPhoto(interp, "test"); Togl_TakePhoto(togl, photo); Tcl_Eval(interp, "test write test.ppm -format ppm"); } #endif Togl_SwapBuffers(togl); if (output) Togl_PostRedisplay(output); return TCL_OK; } static int setXrot_cb(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "angle"); return TCL_ERROR; } if (Tcl_GetDoubleFromObj(interp, objv[1], &xAngle) != TCL_OK) { return TCL_ERROR; } /* printf( "before %f ", xAngle ); */ xAngle = fmod(xAngle, 360.0); if (xAngle < 0.0) xAngle += 360.0; /* printf( "after %f \n", xAngle ); */ /* Let result string equal value */ Tcl_SetObjResult(interp, objv[1]); return TCL_OK; } static int setYrot_cb(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "angle"); return TCL_ERROR; } if (Tcl_GetDoubleFromObj(interp, objv[1], &yAngle) != TCL_OK) { return TCL_ERROR; } yAngle = fmod(yAngle, 360.0); if (yAngle < 0.0) yAngle += 360.0; /* Let result equal value */ Tcl_SetObjResult(interp, objv[1]); return TCL_OK; } static int setOutput_cb(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "pathName"); return TCL_ERROR; } if (Togl_GetToglFromObj(interp, objv[1], &output) != TCL_OK) return TCL_ERROR; return TCL_OK; } /* * Called by Tcl to let me initialize the modules (Togl) I will need. */ EXTERN int Pbuffer_Init(Tcl_Interp *interp) { /* * Initialize Tcl and the Togl widget module. */ if (Tcl_InitStubs(interp, "8.1", 0) == NULL #ifdef PBUFFER_DEBUG || Tk_InitStubs(interp, "8.1", 0) == NULL #endif || Togl_InitStubs(interp, "2.0", 0) == NULL) { return TCL_ERROR; } /* * Specify the C callback functions for widget creation, display, * and reshape. */ Tcl_CreateObjCommand(interp, "create_cb", create_cb, NULL, NULL); Tcl_CreateObjCommand(interp, "display_cb", display_cb, NULL, NULL); Tcl_CreateObjCommand(interp, "display2_cb", display2_cb, NULL, NULL); Tcl_CreateObjCommand(interp, "pbuffer_cb", pbuffer_cb, NULL, NULL); Tcl_CreateObjCommand(interp, "reshape_cb", reshape_cb, NULL, NULL); Tcl_CreateObjCommand(interp, "reshape2_cb", reshape2_cb, NULL, NULL); /* * Make a new Togl widget command so the Tcl code can set a C variable. */ Tcl_CreateObjCommand(interp, "setXrot", setXrot_cb, NULL, NULL); Tcl_CreateObjCommand(interp, "setYrot", setYrot_cb, NULL, NULL); Tcl_CreateObjCommand(interp, "setOutput", setOutput_cb, NULL, NULL); /* * Call Tcl_CreateCommand for application-specific commands, if * they weren't already created by the init procedures called above. */ return TCL_OK; } netgen-6.2.1804/ng/Togl2.1/configure0000755000175000017500000107076613272137567015467 0ustar kurtkurt#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.65 for Togl 2.1. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error ERROR [LINENO LOG_FD] # --------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with status $?, using 1 if that was 0. as_fn_error () { as_status=$?; test $as_status -eq 0 && as_status=1 if test "$3"; then as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 fi $as_echo "$as_me: error: $1" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Togl' PACKAGE_TARNAME='togl' PACKAGE_VERSION='2.1' PACKAGE_STRING='Togl 2.1' PACKAGE_BUGREPORT='' PACKAGE_URL='' # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='LTLIBOBJS TCLSH_PROG RANLIB_STUB MAKE_STUB_LIB MAKE_STATIC_LIB MAKE_SHARED_LIB MAKE_LIB TCL_DBGX LDFLAGS_DEFAULT CFLAGS_DEFAULT SHLIB_SUFFIX LD_LIBRARY_PATH_VAR SHLIB_CFLAGS SHLIB_LD_LIBS SHLIB_LD STLIB_LD CFLAGS_WARNING CFLAGS_OPTIMIZE CFLAGS_DEBUG DL_LIBS LIBOBJS CELIB_DIR AR SHARED_BUILD TCL_THREADS TEA_WINDOWINGSYSTEM LIBGLU TOGL_WINDOWINGSYSTEM AUTOSTEREOD XMKMF TK_XLIB_DIR_NATIVE TK_TOP_DIR_NATIVE TK_INCLUDES TCL_TOP_DIR_NATIVE TCL_INCLUDES CLEANFILES PKG_OBJECTS PKG_SOURCES MATH_LIBS EGREP GREP RANLIB SET_MAKE INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM CPP OBJEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC TK_XINCLUDES TK_LIBS TK_STUB_LIB_SPEC TK_STUB_LIB_FLAG TK_STUB_LIB_FILE TK_LIB_SPEC TK_LIB_FLAG TK_LIB_FILE TK_SRC_DIR TK_BIN_DIR TK_VERSION TCL_SHLIB_LD_LIBS TCL_LD_FLAGS TCL_EXTRA_CFLAGS TCL_DEFS TCL_LIBS TCL_STUB_LIB_SPEC TCL_STUB_LIB_FLAG TCL_STUB_LIB_FILE TCL_LIB_SPEC TCL_LIB_FLAG TCL_LIB_FILE TCL_SRC_DIR TCL_BIN_DIR TCL_VERSION PKG_CFLAGS PKG_LIBS PKG_INCLUDES PKG_HEADERS PKG_TCL_SOURCES PKG_STUB_OBJECTS PKG_STUB_SOURCES PKG_STUB_LIB_FILE PKG_LIB_FILE EXEEXT CYGPATH target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking with_tcl with_tk enable_stubs with_tclinclude with_tkinclude with_x with_autostereo with_autostereod with_Xmu enable_threads enable_shared enable_64bit enable_64bit_vis enable_rpath enable_wince with_celib enable_load enable_symbols ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP XMKMF AUTOSTEREOD' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error "unrecognized option: \`$ac_option' Try \`$0 --help' for more information." ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures Togl 2.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/togl] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF X features: --x-includes=DIR X include files are in DIR --x-libraries=DIR X library files are in DIR _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of Togl 2.1:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-stubs build and link with stub libraries (--enable-stubs) --enable-threads build with threads --enable-shared build and link with shared libraries (default: on) --enable-64bit enable 64bit support (default: off) --enable-64bit-vis enable 64bit Sparc VIS support (default: off) --disable-rpath disable rpath support (default: on) --enable-wince enable Win/CE support (where applicable) --enable-load allow dynamic loading and "load" command (default: on) --enable-symbols build with debugging symbols (default: off) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-tcl directory containing tcl configuration (tclConfig.sh) --with-tk directory containing tk configuration (tkConfig.sh) --with-tclinclude directory containing the public Tcl header files --with-tkinclude directory containing the public Tk header files --with-x use the X Window System --with-autostereo directory with autostereo source (for SGI) --with-autostereod path to autostereod daemon (for SGI) --with-Xmu use system's shared Xmu library --with-celib=DIR use Windows/CE support library from DIR Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor XMKMF Path to xmkmf, Makefile generator for X Window System AUTOSTEREOD Path to autostereod for SGI IRIX computers Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to the package provider. _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF Togl configure 2.1 generated by GNU Autoconf 2.65 Copyright (C) 2009 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_header_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_func # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_header_mongrel cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by Togl $as_me 2.1, which was generated by GNU Autoconf 2.65. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------------- ## ## File substitutions. ## ## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then ac_site_file1=$CONFIG_SITE elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu #-------------------------------------------------------------------- # Call TEA_INIT as the first TEA_ macro to set up initial vars. # This will define a ${TEA_PLATFORM} variable == "unix" or "windows" # as well as PKG_LIB_FILE and PKG_STUB_LIB_FILE. #-------------------------------------------------------------------- # TEA extensions pass this us the version of TEA they think they # are compatible with. TEA_VERSION="3.7" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for correct TEA configuration" >&5 $as_echo_n "checking for correct TEA configuration... " >&6; } if test x"${PACKAGE_NAME}" = x ; then as_fn_error " The PACKAGE_NAME variable must be defined by your TEA configure.in" "$LINENO" 5 fi if test x"3.7" = x ; then as_fn_error " TEA version not specified." "$LINENO" 5 elif test "3.7" != "${TEA_VERSION}" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: warning: requested TEA version \"3.7\", have \"${TEA_VERSION}\"" >&5 $as_echo "warning: requested TEA version \"3.7\", have \"${TEA_VERSION}\"" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok (TEA ${TEA_VERSION})" >&5 $as_echo "ok (TEA ${TEA_VERSION})" >&6; } fi case "`uname -s`" in *win32*|*WIN32*|*CYGWIN_NT*|*CYGWIN_9*|*CYGWIN_ME*|*MINGW32_*) # Extract the first word of "cygpath", so it can be a program name with args. set dummy cygpath; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CYGPATH+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CYGPATH"; then ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CYGPATH="cygpath -w" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo" fi fi CYGPATH=$ac_cv_prog_CYGPATH if test -n "$CYGPATH"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5 $as_echo "$CYGPATH" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi EXEEXT=".exe" TEA_PLATFORM="windows" ;; *) CYGPATH=echo EXEEXT="" TEA_PLATFORM="unix" ;; esac # Check if exec_prefix is set. If not use fall back to prefix. # Note when adjusted, so that TEA_PREFIX can correct for this. # This is needed for recursive configures, since autoconf propagates # $prefix, but not $exec_prefix (doh!). if test x$exec_prefix = xNONE ; then exec_prefix_default=yes exec_prefix=$prefix fi # This package name must be replaced statically for AC_SUBST to work # Substitute STUB_LIB_FILE in case package creates a stub library too. # We AC_SUBST these here to ensure they are subst'ed, # in case the user doesn't call TEA_ADD_... ac_aux_dir= for ac_dir in tclconfig "$srcdir"/tclconfig; do for ac_t in install-sh install.sh shtool; do if test -f "$ac_dir/$ac_t"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/$ac_t -c" break 2 fi done done if test -z "$ac_aux_dir"; then as_fn_error "cannot find install-sh, install.sh, or shtool in tclconfig \"$srcdir\"/tclconfig" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. #-------------------------------------------------------------------- # Load the tclConfig.sh file #-------------------------------------------------------------------- # # Ok, lets find the tcl configuration # First, look for one uninstalled. # the alternative search directory is invoked by --with-tcl # if test x"${no_tcl}" = x ; then # we reset no_tcl in case something fails here no_tcl=true # Check whether --with-tcl was given. if test "${with_tcl+set}" = set; then : withval=$with_tcl; with_tclconfig=${withval} fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5 $as_echo_n "checking for Tcl configuration... " >&6; } if test "${ac_cv_c_tclconfig+set}" = set; then : $as_echo_n "(cached) " >&6 else # First check to see if --with-tcl was specified. if test x"${with_tclconfig}" != x ; then case ${with_tclconfig} in */tclConfig.sh ) if test -f ${with_tclconfig}; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&5 $as_echo "$as_me: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&2;} with_tclconfig=`echo ${with_tclconfig} | sed 's!/tclConfig\.sh$!!'` fi ;; esac if test -f "${with_tclconfig}/tclConfig.sh" ; then ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` else as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5 fi fi # then check for a private Tcl installation if test x"${ac_cv_c_tclconfig}" = x ; then for i in \ ../tcl \ `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \ `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \ ../../tcl \ `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \ `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \ ../../../tcl \ `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \ `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do if test -f "$i/unix/tclConfig.sh" ; then ac_cv_c_tclconfig=`(cd $i/unix; pwd)` break fi done fi # on Darwin, check in Framework installation locations if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ `ls -d /Library/Frameworks 2>/dev/null` \ `ls -d /Network/Library/Frameworks 2>/dev/null` \ `ls -d /System/Library/Frameworks 2>/dev/null` \ ; do if test -f "$i/Tcl.framework/tclConfig.sh" ; then ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)` break fi done fi # TEA specific: on Windows, check in common installation locations if test "${TEA_PLATFORM}" = "windows" \ -a x"${ac_cv_c_tclconfig}" = x ; then for i in `ls -d C:/Tcl/lib 2>/dev/null` \ `ls -d C:/Progra~1/Tcl/lib 2>/dev/null` \ ; do if test -f "$i/tclConfig.sh" ; then ac_cv_c_tclconfig=`(cd $i; pwd)` break fi done fi # check in a few common install locations if test x"${ac_cv_c_tclconfig}" = x ; then for i in `ls -d ${libdir} 2>/dev/null` \ `ls -d ${exec_prefix}/lib 2>/dev/null` \ `ls -d ${prefix}/lib 2>/dev/null` \ `ls -d /usr/local/lib 2>/dev/null` \ `ls -d /usr/contrib/lib 2>/dev/null` \ `ls -d /usr/lib 2>/dev/null` \ ; do if test -f "$i/tclConfig.sh" ; then ac_cv_c_tclconfig=`(cd $i; pwd)` break fi done fi # check in a few other private locations if test x"${ac_cv_c_tclconfig}" = x ; then for i in \ ${srcdir}/../tcl \ `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \ `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do if test -f "$i/unix/tclConfig.sh" ; then ac_cv_c_tclconfig=`(cd $i/unix; pwd)` break fi done fi fi if test x"${ac_cv_c_tclconfig}" = x ; then TCL_BIN_DIR="# no Tcl configs found" as_fn_error "Can't find Tcl configuration definitions" "$LINENO" 5 else no_tcl= TCL_BIN_DIR=${ac_cv_c_tclconfig} { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5 $as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; } fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5 $as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; } if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5 $as_echo "loading" >&6; } . "${TCL_BIN_DIR}/tclConfig.sh" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5 $as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; } fi # eval is required to do the TCL_DBGX substitution eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\"" eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\"" # If the TCL_BIN_DIR is the build directory (not the install directory), # then set the common variable name to the value of the build variables. # For example, the variable TCL_LIB_SPEC will be set to the value # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC # instead of TCL_BUILD_LIB_SPEC since it will work with both an # installed and uninstalled version of Tcl. if test -f "${TCL_BIN_DIR}/Makefile" ; then TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC} TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC} TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH} elif test "`uname -s`" = "Darwin"; then # If Tcl was built as a framework, attempt to use the libraries # from the framework at the given location so that linking works # against Tcl.framework installed in an arbitrary location. case ${TCL_DEFS} in *TCL_FRAMEWORK*) if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then for i in "`cd ${TCL_BIN_DIR}; pwd`" \ "`cd ${TCL_BIN_DIR}/../..; pwd`"; do if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}" break fi done fi if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}" TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}" fi ;; esac fi # eval is required to do the TCL_DBGX substitution eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\"" eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\"" eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\"" eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\"" # TEA specific: #-------------------------------------------------------------------- # Load the tkConfig.sh file if necessary (Tk extension) #-------------------------------------------------------------------- # # Ok, lets find the tk configuration # First, look for one uninstalled. # the alternative search directory is invoked by --with-tk # if test x"${no_tk}" = x ; then # we reset no_tk in case something fails here no_tk=true # Check whether --with-tk was given. if test "${with_tk+set}" = set; then : withval=$with_tk; with_tkconfig=${withval} fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5 $as_echo_n "checking for Tk configuration... " >&6; } if test "${ac_cv_c_tkconfig+set}" = set; then : $as_echo_n "(cached) " >&6 else # First check to see if --with-tkconfig was specified. if test x"${with_tkconfig}" != x ; then case ${with_tkconfig} in */tkConfig.sh ) if test -f ${with_tkconfig}; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-tk argument should refer to directory containing tkConfig.sh, not to tkConfig.sh itself" >&5 $as_echo "$as_me: WARNING: --with-tk argument should refer to directory containing tkConfig.sh, not to tkConfig.sh itself" >&2;} with_tkconfig=`echo ${with_tkconfig} | sed 's!/tkConfig\.sh$!!'` fi ;; esac if test -f "${with_tkconfig}/tkConfig.sh" ; then ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` else as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5 fi fi # then check for a private Tk library if test x"${ac_cv_c_tkconfig}" = x ; then for i in \ ../tk \ `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \ `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \ ../../tk \ `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \ `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \ ../../../tk \ `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \ `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do if test -f "$i/unix/tkConfig.sh" ; then ac_cv_c_tkconfig=`(cd $i/unix; pwd)` break fi done fi # on Darwin, check in Framework installation locations if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ `ls -d /Library/Frameworks 2>/dev/null` \ `ls -d /Network/Library/Frameworks 2>/dev/null` \ `ls -d /System/Library/Frameworks 2>/dev/null` \ ; do if test -f "$i/Tk.framework/tkConfig.sh" ; then ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)` break fi done fi # check in a few common install locations if test x"${ac_cv_c_tkconfig}" = x ; then for i in `ls -d ${libdir} 2>/dev/null` \ `ls -d ${exec_prefix}/lib 2>/dev/null` \ `ls -d ${prefix}/lib 2>/dev/null` \ `ls -d /usr/local/lib 2>/dev/null` \ `ls -d /usr/contrib/lib 2>/dev/null` \ `ls -d /usr/lib 2>/dev/null` \ ; do if test -f "$i/tkConfig.sh" ; then ac_cv_c_tkconfig=`(cd $i; pwd)` break fi done fi # TEA specific: on Windows, check in common installation locations if test "${TEA_PLATFORM}" = "windows" \ -a x"${ac_cv_c_tkconfig}" = x ; then for i in `ls -d C:/Tcl/lib 2>/dev/null` \ `ls -d C:/Progra~1/Tcl/lib 2>/dev/null` \ ; do if test -f "$i/tkConfig.sh" ; then ac_cv_c_tkconfig=`(cd $i; pwd)` break fi done fi # check in a few other private locations if test x"${ac_cv_c_tkconfig}" = x ; then for i in \ ${srcdir}/../tk \ `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \ `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do if test -f "$i/unix/tkConfig.sh" ; then ac_cv_c_tkconfig=`(cd $i/unix; pwd)` break fi done fi fi if test x"${ac_cv_c_tkconfig}" = x ; then TK_BIN_DIR="# no Tk configs found" as_fn_error "Can't find Tk configuration definitions" "$LINENO" 5 else no_tk= TK_BIN_DIR=${ac_cv_c_tkconfig} { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5 $as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; } fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5 $as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; } if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5 $as_echo "loading" >&6; } . "${TK_BIN_DIR}/tkConfig.sh" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5 $as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; } fi # eval is required to do the TK_DBGX substitution eval "TK_LIB_FILE=\"${TK_LIB_FILE}\"" eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\"" # If the TK_BIN_DIR is the build directory (not the install directory), # then set the common variable name to the value of the build variables. # For example, the variable TK_LIB_SPEC will be set to the value # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC # instead of TK_BUILD_LIB_SPEC since it will work with both an # installed and uninstalled version of Tcl. if test -f "${TK_BIN_DIR}/Makefile" ; then TK_LIB_SPEC=${TK_BUILD_LIB_SPEC} TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC} TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH} elif test "`uname -s`" = "Darwin"; then # If Tk was built as a framework, attempt to use the libraries # from the framework at the given location so that linking works # against Tk.framework installed in an arbitrary location. case ${TK_DEFS} in *TK_FRAMEWORK*) if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then for i in "`cd ${TK_BIN_DIR}; pwd`" \ "`cd ${TK_BIN_DIR}/../..; pwd`"; do if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}" break fi done fi if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}" TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}" fi ;; esac fi # eval is required to do the TK_DBGX substitution eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\"" eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\"" eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\"" eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\"" # TEA specific: Ensure windowingsystem is defined if test "${TEA_PLATFORM}" = "unix" ; then case ${TK_DEFS} in *MAC_OSX_TK*) $as_echo "#define MAC_OSX_TK 1" >>confdefs.h TEA_WINDOWINGSYSTEM="aqua" ;; *) TEA_WINDOWINGSYSTEM="x11" ;; esac elif test "${TEA_PLATFORM}" = "windows" ; then TEA_WINDOWINGSYSTEM="win32" fi # TEA specific: #----------------------------------------------------------------------- # Handle the --prefix=... option by defaulting to what Tcl gave. # Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER. #----------------------------------------------------------------------- if test "${prefix}" = "NONE"; then prefix_default=yes if test x"${TCL_PREFIX}" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&5 $as_echo "$as_me: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&6;} prefix=${TCL_PREFIX} else { $as_echo "$as_me:${as_lineno-$LINENO}: --prefix defaulting to /usr/local" >&5 $as_echo "$as_me: --prefix defaulting to /usr/local" >&6;} prefix=/usr/local fi fi if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" \ -o x"${exec_prefix_default}" = x"yes" ; then if test x"${TCL_EXEC_PREFIX}" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&5 $as_echo "$as_me: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&6;} exec_prefix=${TCL_EXEC_PREFIX} else { $as_echo "$as_me:${as_lineno-$LINENO}: --exec-prefix defaulting to ${prefix}" >&5 $as_echo "$as_me: --exec-prefix defaulting to ${prefix}" >&6;} exec_prefix=$prefix fi fi #----------------------------------------------------------------------- # Standard compiler checks. # This sets up CC by using the CC env var, or looks for gcc otherwise. # This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create # the basic setup necessary to compile executables. #----------------------------------------------------------------------- # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' # Don't put any macros that use the compiler (e.g. AC_TRY_COMPILE) # in this macro, they need to go into TEA_SETUP_COMPILER instead. # If the user did not set CFLAGS, set it now to keep # the AC_PROG_CC macro from adding "-g -O2". if test "${CFLAGS+set}" != "set" ; then CFLAGS="" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "no acceptable C compiler found in \$PATH See \`config.log' for more details." "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { as_fn_set_status 77 as_fn_error "C compiler cannot create executables See \`config.log' for more details." "$LINENO" 5; }; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if test "${ac_cv_objext+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "cannot compute suffix of object files: cannot compile See \`config.log' for more details." "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu #-------------------------------------------------------------------- # Checks to see if the make program sets the $MAKE variable. #-------------------------------------------------------------------- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi #-------------------------------------------------------------------- # Find ranlib #-------------------------------------------------------------------- if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_RANLIB+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi #-------------------------------------------------------------------- # Determines the correct binary file extension (.o, .obj, .exe etc.) #-------------------------------------------------------------------- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if test "${ac_cv_path_GREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if test "${ac_cv_path_EGREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if test "${ac_cv_header_stdc+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " eval as_val=\$$as_ac_Header if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done # Any macros that use the compiler (e.g. AC_TRY_COMPILE) have to go here. #------------------------------------------------------------------------ # If we're using GCC, see if the compiler understands -pipe. If so, use it. # It makes compiling go faster. (This is only a performance feature.) #------------------------------------------------------------------------ if test -z "$no_pipe" -a -n "$GCC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the compiler understands -pipe" >&5 $as_echo_n "checking if the compiler understands -pipe... " >&6; } if test "${tcl_cv_cc_pipe+set}" = set; then : $as_echo_n "(cached) " >&6 else hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -pipe" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : tcl_cv_cc_pipe=yes else tcl_cv_cc_pipe=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$hold_cflags fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_pipe" >&5 $as_echo "$tcl_cv_cc_pipe" >&6; } if test $tcl_cv_cc_pipe = yes; then CFLAGS="$CFLAGS -pipe" fi fi #-------------------------------------------------------------------- # Common compiler flag setup #-------------------------------------------------------------------- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 $as_echo_n "checking whether byte ordering is bigendian... " >&6; } if test "${ac_cv_c_bigendian+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_c_bigendian=unknown # See if we're dealing with a universal compiler. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __APPLE_CC__ not a universal capable compiler #endif typedef int dummy; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # Check for potential -arch flags. It is not universal unless # there are at least two -arch flags with different values. ac_arch= ac_prev= for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do if test -n "$ac_prev"; then case $ac_word in i?86 | x86_64 | ppc | ppc64) if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then ac_arch=$ac_word else ac_cv_c_bigendian=universal break fi ;; esac ac_prev= elif test "x$ac_word" = "x-arch"; then ac_prev=arch fi done fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_c_bigendian = unknown; then # See if sys/param.h defines the BYTE_ORDER macro. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ && LITTLE_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #if BYTE_ORDER != BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to _BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #ifndef _BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # Compile a test program. if test "$cross_compiling" = yes; then : # Try to guess by grepping values from an object file. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; int use_ascii (int i) { return ascii_mm[i] + ascii_ii[i]; } short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; int use_ebcdic (int i) { return ebcdic_mm[i] + ebcdic_ii[i]; } extern int foo; int main () { return use_ascii (foo) == use_ebcdic (foo); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then ac_cv_c_bigendian=yes fi if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then if test "$ac_cv_c_bigendian" = unknown; then ac_cv_c_bigendian=no else # finding both strings is unlikely to happen, but who knows? ac_cv_c_bigendian=unknown fi fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { /* Are we little or big endian? From Harbison&Steele. */ union { long int l; char c[sizeof (long int)]; } u; u.l = 1; return u.c[sizeof (long int) - 1] == 1; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_c_bigendian=no else ac_cv_c_bigendian=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 $as_echo "$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in #( yes) $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h ;; #( no) ;; #( universal) $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h ;; #( *) as_fn_error "unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; esac if test "${TEA_PLATFORM}" = "unix" ; then #-------------------------------------------------------------------- # On a few very rare systems, all of the libm.a stuff is # already in libc.a. Set compiler flags accordingly. # Also, Linux requires the "ieee" library for math to work # right (and it must appear before "-lm"). #-------------------------------------------------------------------- ac_fn_c_check_func "$LINENO" "sin" "ac_cv_func_sin" if test "x$ac_cv_func_sin" = x""yes; then : MATH_LIBS="" else MATH_LIBS="-lm" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lieee" >&5 $as_echo_n "checking for main in -lieee... " >&6; } if test "${ac_cv_lib_ieee_main+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lieee $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ieee_main=yes else ac_cv_lib_ieee_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee_main" >&5 $as_echo "$ac_cv_lib_ieee_main" >&6; } if test "x$ac_cv_lib_ieee_main" = x""yes; then : MATH_LIBS="-lieee $MATH_LIBS" fi #-------------------------------------------------------------------- # Interactive UNIX requires -linet instead of -lsocket, plus it # needs net/errno.h to define the socket-related error codes. #-------------------------------------------------------------------- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -linet" >&5 $as_echo_n "checking for main in -linet... " >&6; } if test "${ac_cv_lib_inet_main+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-linet $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_inet_main=yes else ac_cv_lib_inet_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_inet_main" >&5 $as_echo "$ac_cv_lib_inet_main" >&6; } if test "x$ac_cv_lib_inet_main" = x""yes; then : LIBS="$LIBS -linet" fi ac_fn_c_check_header_mongrel "$LINENO" "net/errno.h" "ac_cv_header_net_errno_h" "$ac_includes_default" if test "x$ac_cv_header_net_errno_h" = x""yes; then : $as_echo "#define HAVE_NET_ERRNO_H 1" >>confdefs.h fi #-------------------------------------------------------------------- # Check for the existence of the -lsocket and -lnsl libraries. # The order here is important, so that they end up in the right # order in the command line generated by make. Here are some # special considerations: # 1. Use "connect" and "accept" to check for -lsocket, and # "gethostbyname" to check for -lnsl. # 2. Use each function name only once: can't redo a check because # autoconf caches the results of the last check and won't redo it. # 3. Use -lnsl and -lsocket only if they supply procedures that # aren't already present in the normal libraries. This is because # IRIX 5.2 has libraries, but they aren't needed and they're # bogus: they goof up name resolution if used. # 4. On some SVR4 systems, can't use -lsocket without -lnsl too. # To get around this problem, check for both libraries together # if -lsocket doesn't work by itself. #-------------------------------------------------------------------- tcl_checkBoth=0 ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect" if test "x$ac_cv_func_connect" = x""yes; then : tcl_checkSocket=0 else tcl_checkSocket=1 fi if test "$tcl_checkSocket" = 1; then ac_fn_c_check_func "$LINENO" "setsockopt" "ac_cv_func_setsockopt" if test "x$ac_cv_func_setsockopt" = x""yes; then : else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setsockopt in -lsocket" >&5 $as_echo_n "checking for setsockopt in -lsocket... " >&6; } if test "${ac_cv_lib_socket_setsockopt+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char setsockopt (); int main () { return setsockopt (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_socket_setsockopt=yes else ac_cv_lib_socket_setsockopt=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_setsockopt" >&5 $as_echo "$ac_cv_lib_socket_setsockopt" >&6; } if test "x$ac_cv_lib_socket_setsockopt" = x""yes; then : LIBS="$LIBS -lsocket" else tcl_checkBoth=1 fi fi fi if test "$tcl_checkBoth" = 1; then tk_oldLibs=$LIBS LIBS="$LIBS -lsocket -lnsl" ac_fn_c_check_func "$LINENO" "accept" "ac_cv_func_accept" if test "x$ac_cv_func_accept" = x""yes; then : tcl_checkNsl=0 else LIBS=$tk_oldLibs fi fi ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" if test "x$ac_cv_func_gethostbyname" = x""yes; then : else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; } if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gethostbyname (); int main () { return gethostbyname (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_nsl_gethostbyname=yes else ac_cv_lib_nsl_gethostbyname=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; } if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then : LIBS="$LIBS -lnsl" fi fi # TEA specific: Don't perform the eval of the libraries here because # DL_LIBS won't be set until we call TEA_CONFIG_CFLAGS TCL_LIBS='${DL_LIBS} ${LIBS} ${MATH_LIBS}' { $as_echo "$as_me:${as_lineno-$LINENO}: checking dirent.h" >&5 $as_echo_n "checking dirent.h... " >&6; } if test "${tcl_cv_dirent_h+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #ifndef _POSIX_SOURCE # ifdef __Lynx__ /* * Generate compilation error to make the test fail: Lynx headers * are only valid if really in the POSIX environment. */ missing_procedure(); # endif #endif DIR *d; struct dirent *entryPtr; char *p; d = opendir("foobar"); entryPtr = readdir(d); p = entryPtr->d_name; closedir(d); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : tcl_cv_dirent_h=yes else tcl_cv_dirent_h=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_dirent_h" >&5 $as_echo "$tcl_cv_dirent_h" >&6; } if test $tcl_cv_dirent_h = no; then $as_echo "#define NO_DIRENT_H 1" >>confdefs.h fi # TEA specific: ac_fn_c_check_header_mongrel "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default" if test "x$ac_cv_header_errno_h" = x""yes; then : else $as_echo "#define NO_ERRNO_H 1" >>confdefs.h fi ac_fn_c_check_header_mongrel "$LINENO" "float.h" "ac_cv_header_float_h" "$ac_includes_default" if test "x$ac_cv_header_float_h" = x""yes; then : else $as_echo "#define NO_FLOAT_H 1" >>confdefs.h fi ac_fn_c_check_header_mongrel "$LINENO" "values.h" "ac_cv_header_values_h" "$ac_includes_default" if test "x$ac_cv_header_values_h" = x""yes; then : else $as_echo "#define NO_VALUES_H 1" >>confdefs.h fi ac_fn_c_check_header_mongrel "$LINENO" "limits.h" "ac_cv_header_limits_h" "$ac_includes_default" if test "x$ac_cv_header_limits_h" = x""yes; then : $as_echo "#define HAVE_LIMITS_H 1" >>confdefs.h else $as_echo "#define NO_LIMITS_H 1" >>confdefs.h fi ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" if test "x$ac_cv_header_stdlib_h" = x""yes; then : tcl_ok=1 else tcl_ok=0 fi cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "strtol" >/dev/null 2>&1; then : else tcl_ok=0 fi rm -f conftest* cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "strtoul" >/dev/null 2>&1; then : else tcl_ok=0 fi rm -f conftest* cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "strtod" >/dev/null 2>&1; then : else tcl_ok=0 fi rm -f conftest* if test $tcl_ok = 0; then $as_echo "#define NO_STDLIB_H 1" >>confdefs.h fi ac_fn_c_check_header_mongrel "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default" if test "x$ac_cv_header_string_h" = x""yes; then : tcl_ok=1 else tcl_ok=0 fi cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "strstr" >/dev/null 2>&1; then : else tcl_ok=0 fi rm -f conftest* cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "strerror" >/dev/null 2>&1; then : else tcl_ok=0 fi rm -f conftest* # See also memmove check below for a place where NO_STRING_H can be # set and why. if test $tcl_ok = 0; then $as_echo "#define NO_STRING_H 1" >>confdefs.h fi ac_fn_c_check_header_mongrel "$LINENO" "sys/wait.h" "ac_cv_header_sys_wait_h" "$ac_includes_default" if test "x$ac_cv_header_sys_wait_h" = x""yes; then : else $as_echo "#define NO_SYS_WAIT_H 1" >>confdefs.h fi ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default" if test "x$ac_cv_header_dlfcn_h" = x""yes; then : else $as_echo "#define NO_DLFCN_H 1" >>confdefs.h fi # OS/390 lacks sys/param.h (and doesn't need it, by chance). for ac_header in sys/param.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default" if test "x$ac_cv_header_sys_param_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_PARAM_H 1 _ACEOF fi done # Let the user call this, because if it triggers, they will # need a compat/strtod.c that is correct. Users can also # use Tcl_GetDouble(FromObj) instead. #TEA_BUGGY_STRTOD fi #----------------------------------------------------------------------- # __CHANGE__ # Specify the C source files to compile in TEA_ADD_SOURCES, # public headers that need to be installed in TEA_ADD_HEADERS, # stub library C source files to compile in TEA_ADD_STUB_SOURCES, # and runtime Tcl library files in TEA_ADD_TCL_SOURCES. # This defines PKG(_STUB)_SOURCES, PKG(_STUB)_OBJECTS, PKG_HEADERS # and PKG_TCL_SOURCES. #----------------------------------------------------------------------- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to link with stubs library" >&5 $as_echo_n "checking whether to link with stubs library... " >&6; } # Check whether --enable-stubs was given. if test "${enable_stubs+set}" = set; then : enableval=$enable_stubs; tcl_ok=$enableval else tcl_ok=yes fi if test "${enable_stubs+set}" = set; then enableval="$enable_stubs" tcl_ok=$enableval else tcl_ok=yes fi if test "$tcl_ok" = "yes" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: stubs" >&5 $as_echo "stubs" >&6; } USE_STUBS=1 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no stubs" >&5 $as_echo "no stubs" >&6; } USE_STUBS=0 fi vars="togl.c toglProcAddr.c toglStubInit.c" for i in $vars; do case $i in \$*) # allow $-var names PKG_SOURCES="$PKG_SOURCES $i" PKG_OBJECTS="$PKG_OBJECTS $i" ;; *) # check for existence - allows for generic/win/unix VPATH # To add more dirs here (like 'src'), you have to update VPATH # in Makefile.in as well if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \ -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \ ; then as_fn_error "could not find source file '$i'" "$LINENO" 5 fi PKG_SOURCES="$PKG_SOURCES $i" # this assumes it is in a VPATH dir i=`basename $i` # handle user calling this before or after TEA_SETUP_COMPILER if test x"${OBJEXT}" != x ; then j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}" else j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}" fi PKG_OBJECTS="$PKG_OBJECTS $j" ;; esac done # togl_ws.h is added in Makefile.in because it is generated vars="togl.h toglDecls.h" for i in $vars; do # check for existence, be strict because it is installed if test ! -f "${srcdir}/$i" ; then as_fn_error "could not find header file '${srcdir}/$i'" "$LINENO" 5 fi PKG_HEADERS="$PKG_HEADERS $i" done vars="" for i in $vars; do PKG_INCLUDES="$PKG_INCLUDES $i" done vars="" for i in $vars; do if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then # Convert foo.lib to -lfoo for GCC. No-op if not *.lib i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'` fi PKG_LIBS="$PKG_LIBS $i" done PKG_CFLAGS="$PKG_CFLAGS " if test "${USE_STUBS}" = "1" ; then vars="toglStubLib.c" for i in $vars; do # check for existence - allows for generic/win/unix VPATH if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \ -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \ ; then as_fn_error "could not find stub source file '$i'" "$LINENO" 5 fi PKG_STUB_SOURCES="$PKG_STUB_SOURCES $i" # this assumes it is in a VPATH dir i=`basename $i` # handle user calling this before or after TEA_SETUP_COMPILER if test x"${OBJEXT}" != x ; then j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}" else j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}" fi PKG_STUB_OBJECTS="$PKG_STUB_OBJECTS $j" done fi vars="" for i in $vars; do # check for existence, be strict because it is installed if test ! -f "${srcdir}/$i" ; then as_fn_error "could not find tcl source file '${srcdir}/$i'" "$LINENO" 5 fi PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i" done #-------------------------------------------------------------------- # __CHANGE__ # A few miscellaneous platform-specific items: # # Define a special symbol for Windows (BUILD_sample in this case) so # that we create the export library with the dll. # # Windows creates a few extra files that need to be cleaned up. # You can add more files to clean if your extension creates any extra # files. # # TEA_ADD_* any platform specific compiler/build info here. #-------------------------------------------------------------------- # Add pkgIndex.tcl if it is generated in the Makefile instead of ./configure # and change Makefile.in to move it from CONFIG_CLEAN_FILES to BINARIES var. #CLEANFILES="pkgIndex.tcl" if test "${TEA_PLATFORM}" = "windows" ; then $as_echo "#define BUILD_togl 1" >>confdefs.h CLEANFILES="$CLEANFILES *.lib *.dll *.exp *.ilk *.pdb vc*.pch *.manifest" #TEA_ADD_SOURCES([win/winFile.c]) #TEA_ADD_INCLUDES([-I\"$(${CYGPATH} ${srcdir}/win)\"]) else # Ensure no empty else clauses : CLEANFILES="so_locations" #TEA_ADD_SOURCES([unix/unixFile.c]) #TEA_ADD_LIBS([-lsuperfly]) fi #-------------------------------------------------------------------- # __CHANGE__ # Choose which headers you need. Extension authors should try very # hard to only rely on the Tcl public header files. Internal headers # contain private data structures and are subject to change without # notice. # This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG #-------------------------------------------------------------------- # find Tcl, Tk, and X11 headers #TEA_PUBLIC_TCL_HEADERS { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl public headers" >&5 $as_echo_n "checking for Tcl public headers... " >&6; } # Check whether --with-tclinclude was given. if test "${with_tclinclude+set}" = set; then : withval=$with_tclinclude; with_tclinclude=${withval} fi if test "${ac_cv_c_tclh+set}" = set; then : $as_echo_n "(cached) " >&6 else # Use the value from --with-tclinclude, if it was given if test x"${with_tclinclude}" != x ; then if test -f "${with_tclinclude}/tcl.h" ; then ac_cv_c_tclh=${with_tclinclude} else as_fn_error "${with_tclinclude} directory does not contain tcl.h" "$LINENO" 5 fi else if test "`uname -s`" = "Darwin"; then # If Tcl was built as a framework, attempt to use # the framework's Headers directory case ${TCL_DEFS} in *TCL_FRAMEWORK*) list="`ls -d ${TCL_BIN_DIR}/Headers 2>/dev/null`" ;; esac fi # Look in the source dir only if Tcl is not installed, # and in that situation, look there before installed locations. if test -f "${TCL_BIN_DIR}/Makefile" ; then list="$list `ls -d ${TCL_SRC_DIR}/generic 2>/dev/null`" fi # Check order: pkg --prefix location, Tcl's --prefix location, # relative to directory of tclConfig.sh. eval "temp_includedir=${includedir}" list="$list \ `ls -d ${temp_includedir} 2>/dev/null` \ `ls -d ${TCL_PREFIX}/include 2>/dev/null` \ `ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`" if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then list="$list /usr/local/include /usr/include" if test x"${TCL_INCLUDE_SPEC}" != x ; then d=`echo "${TCL_INCLUDE_SPEC}" | sed -e 's/^-I//'` list="$list `ls -d ${d} 2>/dev/null`" fi fi for i in $list ; do if test -f "$i/tcl.h" ; then ac_cv_c_tclh=$i break fi done fi fi # Print a message based on how we determined the include path if test x"${ac_cv_c_tclh}" = x ; then as_fn_error "tcl.h not found. Please specify its location with --with-tclinclude" "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_cv_c_tclh}" >&5 $as_echo "${ac_cv_c_tclh}" >&6; } fi # Convert to a native path and substitute into the output files. INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}` TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\" # Allow for --with-tclinclude to take effect and define ${ac_cv_c_tclh} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private include files" >&5 $as_echo_n "checking for Tcl private include files... " >&6; } TCL_SRC_DIR_NATIVE=`${CYGPATH} ${TCL_SRC_DIR}` TCL_TOP_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}\" # Check to see if tclPort.h isn't already with the public headers # Don't look for tclInt.h because that resides with tcl.h in the core # sources, but the Port headers are in a different directory if test "${TEA_PLATFORM}" = "windows" -a \ -f "${ac_cv_c_tclh}/tclWinPort.h"; then result="private headers found with public headers" elif test "${TEA_PLATFORM}" = "unix" -a \ -f "${ac_cv_c_tclh}/tclUnixPort.h"; then result="private headers found with public headers" else TCL_GENERIC_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/generic\" if test "${TEA_PLATFORM}" = "windows"; then TCL_PLATFORM_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/win\" else TCL_PLATFORM_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/unix\" fi # Overwrite the previous TCL_INCLUDES as this should capture both # public and private headers in the same set. # We want to ensure these are substituted so as not to require # any *_NATIVE vars be defined in the Makefile TCL_INCLUDES="-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}" if test "`uname -s`" = "Darwin"; then # If Tcl was built as a framework, attempt to use # the framework's Headers and PrivateHeaders directories case ${TCL_DEFS} in *TCL_FRAMEWORK*) if test -d "${TCL_BIN_DIR}/Headers" -a \ -d "${TCL_BIN_DIR}/PrivateHeaders"; then TCL_INCLUDES="-I\"${TCL_BIN_DIR}/Headers\" -I\"${TCL_BIN_DIR}/PrivateHeaders\" ${TCL_INCLUDES}" else TCL_INCLUDES="${TCL_INCLUDES} ${TCL_INCLUDE_SPEC} `echo "${TCL_INCLUDE_SPEC}" | sed -e 's/Headers/PrivateHeaders/'`" fi ;; esac result="Using ${TCL_INCLUDES}" else if test ! -f "${TCL_SRC_DIR}/generic/tclInt.h" ; then as_fn_error "Cannot find private header tclInt.h in ${TCL_SRC_DIR}" "$LINENO" 5 fi result="Using srcdir found in tclConfig.sh: ${TCL_SRC_DIR}" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${result}" >&5 $as_echo "${result}" >&6; } #TEA_PUBLIC_TK_HEADERS { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk public headers" >&5 $as_echo_n "checking for Tk public headers... " >&6; } # Check whether --with-tkinclude was given. if test "${with_tkinclude+set}" = set; then : withval=$with_tkinclude; with_tkinclude=${withval} fi if test "${ac_cv_c_tkh+set}" = set; then : $as_echo_n "(cached) " >&6 else # Use the value from --with-tkinclude, if it was given if test x"${with_tkinclude}" != x ; then if test -f "${with_tkinclude}/tk.h" ; then ac_cv_c_tkh=${with_tkinclude} else as_fn_error "${with_tkinclude} directory does not contain tk.h" "$LINENO" 5 fi else if test "`uname -s`" = "Darwin"; then # If Tk was built as a framework, attempt to use # the framework's Headers directory. case ${TK_DEFS} in *TK_FRAMEWORK*) list="`ls -d ${TK_BIN_DIR}/Headers 2>/dev/null`" ;; esac fi # Look in the source dir only if Tk is not installed, # and in that situation, look there before installed locations. if test -f "${TK_BIN_DIR}/Makefile" ; then list="$list `ls -d ${TK_SRC_DIR}/generic 2>/dev/null`" fi # Check order: pkg --prefix location, Tk's --prefix location, # relative to directory of tkConfig.sh, Tcl's --prefix location, # relative to directory of tclConfig.sh. eval "temp_includedir=${includedir}" list="$list \ `ls -d ${temp_includedir} 2>/dev/null` \ `ls -d ${TK_PREFIX}/include 2>/dev/null` \ `ls -d ${TK_BIN_DIR}/../include 2>/dev/null` \ `ls -d ${TCL_PREFIX}/include 2>/dev/null` \ `ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`" if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then list="$list /usr/local/include /usr/include" fi for i in $list ; do if test -f "$i/tk.h" ; then ac_cv_c_tkh=$i break fi done fi fi # Print a message based on how we determined the include path if test x"${ac_cv_c_tkh}" = x ; then as_fn_error "tk.h not found. Please specify its location with --with-tkinclude" "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_cv_c_tkh}" >&5 $as_echo "${ac_cv_c_tkh}" >&6; } fi # Convert to a native path and substitute into the output files. INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tkh}` TK_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\" if test "${TEA_WINDOWINGSYSTEM}" != "x11"; then # On Windows and Aqua, we need the X compat headers { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X11 header files" >&5 $as_echo_n "checking for X11 header files... " >&6; } if test ! -r "${INCLUDE_DIR_NATIVE}/X11/Xlib.h"; then INCLUDE_DIR_NATIVE="`${CYGPATH} ${TK_SRC_DIR}/xlib`" TK_XINCLUDES=-I\"${INCLUDE_DIR_NATIVE}\" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${INCLUDE_DIR_NATIVE}" >&5 $as_echo "${INCLUDE_DIR_NATIVE}" >&6; } fi # Allow for --with-tkinclude to take effect and define ${ac_cv_c_tkh} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private include files" >&5 $as_echo_n "checking for Tk private include files... " >&6; } TK_SRC_DIR_NATIVE=`${CYGPATH} ${TK_SRC_DIR}` TK_TOP_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}\" # Check to see if tkPort.h isn't already with the public headers # Don't look for tkInt.h because that resides with tk.h in the core # sources, but the Port headers are in a different directory if test "${TEA_PLATFORM}" = "windows" -a \ -f "${ac_cv_c_tkh}/tkWinPort.h"; then result="private headers found with public headers" elif test "${TEA_PLATFORM}" = "unix" -a \ -f "${ac_cv_c_tkh}/tkUnixPort.h"; then result="private headers found with public headers" else TK_GENERIC_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/generic\" TK_XLIB_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/xlib\" if test "${TEA_PLATFORM}" = "windows"; then TK_PLATFORM_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/win\" else TK_PLATFORM_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/unix\" fi # Overwrite the previous TK_INCLUDES as this should capture both # public and private headers in the same set. # We want to ensure these are substituted so as not to require # any *_NATIVE vars be defined in the Makefile TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE}" # Detect and add ttk subdir if test -d "${TK_SRC_DIR}/generic/ttk"; then TK_INCLUDES="${TK_INCLUDES} -I\"${TK_SRC_DIR_NATIVE}/generic/ttk\"" fi if test "${TEA_WINDOWINGSYSTEM}" != "x11"; then TK_INCLUDES="${TK_INCLUDES} -I${TK_XLIB_DIR_NATIVE}" fi if test "${TEA_WINDOWINGSYSTEM}" = "aqua"; then TK_INCLUDES="${TK_INCLUDES} -I\"${TK_SRC_DIR_NATIVE}/macosx\"" fi if test "`uname -s`" = "Darwin"; then # If Tk was built as a framework, attempt to use # the framework's Headers and PrivateHeaders directories case ${TK_DEFS} in *TK_FRAMEWORK*) if test -d "${TK_BIN_DIR}/Headers" -a \ -d "${TK_BIN_DIR}/PrivateHeaders"; then TK_INCLUDES="-I\"${TK_BIN_DIR}/Headers\" -I\"${TK_BIN_DIR}/PrivateHeaders\" ${TK_INCLUDES}" else TK_INCLUDES="${TK_INCLUDES} ${TK_INCLUDE_SPEC} `echo "${TK_INCLUDE_SPEC}" | sed -e 's/Headers/PrivateHeaders/'`" fi ;; esac result="Using ${TK_INCLUDES}" else if test ! -f "${TK_SRC_DIR}/generic/tkInt.h" ; then as_fn_error "Cannot find private header tkInt.h in ${TK_SRC_DIR}" "$LINENO" 5 fi result="Using srcdir found in tkConfig.sh: ${TK_SRC_DIR}" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${result}" >&5 $as_echo "${result}" >&6; } if test "${TEA_WINDOWINGSYSTEM}" = "x11" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 $as_echo_n "checking for X... " >&6; } # Check whether --with-x was given. if test "${with_x+set}" = set; then : withval=$with_x; fi # $have_x is `yes', `no', `disabled', or empty when we do not yet know. if test "x$with_x" = xno; then # The user explicitly disabled X. have_x=disabled else case $x_includes,$x_libraries in #( *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #( *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then : $as_echo_n "(cached) " >&6 else # One or both of the vars are not set, and there is no cached value. ac_x_includes=no ac_x_libraries=no rm -f -r conftest.dir if mkdir conftest.dir; then cd conftest.dir cat >Imakefile <<'_ACEOF' incroot: @echo incroot='${INCROOT}' usrlibdir: @echo usrlibdir='${USRLIBDIR}' libdir: @echo libdir='${LIBDIR}' _ACEOF if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then # GNU make sometimes prints "make[1]: Entering...", which would confuse us. for ac_var in incroot usrlibdir libdir; do eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" done # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. for ac_extension in a so sl dylib la dll; do if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && test -f "$ac_im_libdir/libX11.$ac_extension"; then ac_im_usrlibdir=$ac_im_libdir; break fi done # Screen out bogus values from the imake configuration. They are # bogus both because they are the default anyway, and because # using them would break gcc on systems where it needs fixed includes. case $ac_im_incroot in /usr/include) ac_x_includes= ;; *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; esac case $ac_im_usrlibdir in /usr/lib | /usr/lib64 | /lib | /lib64) ;; *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; esac fi cd .. rm -f -r conftest.dir fi # Standard set of common directories for X headers. # Check X11 before X11Rn because it is often a symlink to the current release. ac_x_header_dirs=' /usr/X11/include /usr/X11R7/include /usr/X11R6/include /usr/X11R5/include /usr/X11R4/include /usr/include/X11 /usr/include/X11R7 /usr/include/X11R6 /usr/include/X11R5 /usr/include/X11R4 /usr/local/X11/include /usr/local/X11R7/include /usr/local/X11R6/include /usr/local/X11R5/include /usr/local/X11R4/include /usr/local/include/X11 /usr/local/include/X11R7 /usr/local/include/X11R6 /usr/local/include/X11R5 /usr/local/include/X11R4 /usr/X386/include /usr/x386/include /usr/XFree86/include/X11 /usr/include /usr/local/include /usr/unsupported/include /usr/athena/include /usr/local/x11r5/include /usr/lpp/Xamples/include /usr/openwin/include /usr/openwin/share/include' if test "$ac_x_includes" = no; then # Guess where to find include files, by looking for Xlib.h. # First, try using that file with no special directory specified. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # We can compile using X headers with no special include directory. ac_x_includes= else for ac_dir in $ac_x_header_dirs; do if test -r "$ac_dir/X11/Xlib.h"; then ac_x_includes=$ac_dir break fi done fi rm -f conftest.err conftest.$ac_ext fi # $ac_x_includes = no if test "$ac_x_libraries" = no; then # Check for the libraries. # See if we find them without any special options. # Don't add to $LIBS permanently. ac_save_LIBS=$LIBS LIBS="-lX11 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { XrmInitialize () ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : LIBS=$ac_save_LIBS # We can link X programs with no special library path. ac_x_libraries= else LIBS=$ac_save_LIBS for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` do # Don't even attempt the hair of trying to link an X program! for ac_extension in a so sl dylib la dll; do if test -r "$ac_dir/libX11.$ac_extension"; then ac_x_libraries=$ac_dir break 2 fi done done fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi # $ac_x_libraries = no case $ac_x_includes,$ac_x_libraries in #( no,* | *,no | *\'*) # Didn't find X, or a directory has "'" in its name. ac_cv_have_x="have_x=no";; #( *) # Record where we found X for the cache. ac_cv_have_x="have_x=yes\ ac_x_includes='$ac_x_includes'\ ac_x_libraries='$ac_x_libraries'" esac fi ;; #( *) have_x=yes;; esac eval "$ac_cv_have_x" fi # $with_x != no if test "$have_x" != yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 $as_echo "$have_x" >&6; } no_x=yes else # If each of the values was on the command line, it overrides each guess. test "x$x_includes" = xNONE && x_includes=$ac_x_includes test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries # Update the cache value to reflect the command line values. ac_cv_have_x="have_x=yes\ ac_x_includes='$x_includes'\ ac_x_libraries='$x_libraries'" { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 $as_echo "libraries $x_libraries, headers $x_includes" >&6; } fi not_really_there="" if test "$no_x" = ""; then if test "$x_includes" = ""; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else not_really_there="yes" fi rm -f conftest.err conftest.$ac_ext else if test ! -r $x_includes/X11/Intrinsic.h; then not_really_there="yes" fi fi fi if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X11 header files" >&5 $as_echo_n "checking for X11 header files... " >&6; } found_xincludes="no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : found_xincludes="yes" else found_xincludes="no" fi rm -f conftest.err conftest.$ac_ext if test "$found_xincludes" = "no"; then dirs="/usr/unsupported/include /usr/local/include /usr/X386/include /usr/X11R6/include /usr/X11R5/include /usr/include/X11R5 /usr/include/X11R4 /usr/openwin/include /usr/X11/include /usr/sww/include" for i in $dirs ; do if test -r $i/X11/Intrinsic.h; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $i" >&5 $as_echo "$i" >&6; } XINCLUDES=" -I$i" found_xincludes="yes" break fi done fi else if test "$x_includes" != ""; then XINCLUDES="-I$x_includes" found_xincludes="yes" fi fi if test found_xincludes = "no"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: couldn't find any!" >&5 $as_echo "couldn't find any!" >&6; } fi if test "$no_x" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X11 libraries" >&5 $as_echo_n "checking for X11 libraries... " >&6; } XLIBSW=nope dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/X11R6/lib /usr/X11R5/lib /usr/lib/X11R5 /usr/lib/X11R4 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib" for i in $dirs ; do if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl -o -r $i/libX11.dylib; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $i" >&5 $as_echo "$i" >&6; } XLIBSW="-L$i -lX11" x_libraries="$i" break fi done else if test "$x_libraries" = ""; then XLIBSW=-lX11 else XLIBSW="-L$x_libraries -lX11" fi fi if test "$XLIBSW" = nope ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XCreateWindow in -lXwindow" >&5 $as_echo_n "checking for XCreateWindow in -lXwindow... " >&6; } if test "${ac_cv_lib_Xwindow_XCreateWindow+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXwindow $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char XCreateWindow (); int main () { return XCreateWindow (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_Xwindow_XCreateWindow=yes else ac_cv_lib_Xwindow_XCreateWindow=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xwindow_XCreateWindow" >&5 $as_echo "$ac_cv_lib_Xwindow_XCreateWindow" >&6; } if test "x$ac_cv_lib_Xwindow_XCreateWindow" = x""yes; then : XLIBSW=-lXwindow fi fi if test "$XLIBSW" = nope ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find any! Using -lX11." >&5 $as_echo "could not find any! Using -lX11." >&6; } XLIBSW=-lX11 fi # TEA specific: if test x"${XLIBSW}" != x ; then PKG_LIBS="${PKG_LIBS} ${XLIBSW}" fi fi # find autostereo header, lib, and daemon # Check whether --with-autostereo was given. if test "${with_autostereo+set}" = set; then : withval=$with_autostereo; with_autostereo=${withval} fi # Check whether --with-autostereod was given. if test "${with_autostereod+set}" = set; then : withval=$with_autostereod; with_autostereod=${withval} fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for autostereo directory" >&5 $as_echo_n "checking for autostereo directory... " >&6; } if test x"${with_autostereo}" != x ; then if test -f "${with_autostereo}/lib/autostereo.h" ; then with_autostereo=`(cd ${with_autostereo}; pwd)` vars="-I${with_autostereo}/lib" for i in $vars; do PKG_INCLUDES="$PKG_INCLUDES $i" done vars="-L${with_autostereo}/lib -lautostereo" for i in $vars; do if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then # Convert foo.lib to -lfoo for GCC. No-op if not *.lib i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'` fi PKG_LIBS="$PKG_LIBS $i" done cat >>confdefs.h <<_ACEOF #define HAVE_AUTOSTEREO 1 _ACEOF else as_fn_error "${with_autostereo} directory doesn't contain lib/autostereo.h" "$LINENO" 5 fi fi # Extract the first word of "autostereod", so it can be a program name with args. set dummy autostereod; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_AUTOSTEREOD+set}" = set; then : $as_echo_n "(cached) " >&6 else case $AUTOSTEREOD in [\\/]* | ?:[\\/]*) ac_cv_path_AUTOSTEREOD="$AUTOSTEREOD" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_dummy="`eval \"echo $sbindir\"`:$PATH:/sbin:/usr/sbin" for as_dir in $as_dummy do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_AUTOSTEREOD="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi AUTOSTEREOD=$ac_cv_path_AUTOSTEREOD if test -n "$AUTOSTEREOD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AUTOSTEREOD" >&5 $as_echo "$AUTOSTEREOD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Choose OpenGL platform case "${TEA_WINDOWINGSYSTEM}" in aqua) TOGL_WINDOWINGSYSTEM=TOGL_NSOPENGL CFLAGS="-ObjC" # vars="-framework AGL -framework OpenGL -framework ApplicationServices" vars="-framework OpenGL -framework AppKit -framework ApplicationServices" for i in $vars; do if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then # Convert foo.lib to -lfoo for GCC. No-op if not *.lib i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'` fi PKG_LIBS="$PKG_LIBS $i" done # libGLU is implicit in OpenGL framework LIBGLU= ;; x11) TOGL_WINDOWINGSYSTEM=TOGL_X11 # Check whether --with-Xmu was given. if test "${with_Xmu+set}" = set; then : withval=$with_Xmu; else with_Xmu=no fi if test "x$with_Xmu" != xno; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmuLookupStandardColormap in -lXmu" >&5 $as_echo_n "checking for XmuLookupStandardColormap in -lXmu... " >&6; } if test "${ac_cv_lib_Xmu_XmuLookupStandardColormap+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXmu -lXt -lX11 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char XmuLookupStandardColormap (); int main () { return XmuLookupStandardColormap (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_Xmu_XmuLookupStandardColormap=yes else ac_cv_lib_Xmu_XmuLookupStandardColormap=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuLookupStandardColormap" >&5 $as_echo "$ac_cv_lib_Xmu_XmuLookupStandardColormap" >&6; } if test "x$ac_cv_lib_Xmu_XmuLookupStandardColormap" = x""yes; then : vars="-lXmu" for i in $vars; do if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then # Convert foo.lib to -lfoo for GCC. No-op if not *.lib i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'` fi PKG_LIBS="$PKG_LIBS $i" done $as_echo "#define USE_SYSTEM_LIBXMU 1" >>confdefs.h else with_Xmu=no fi fi if test "x$with_Xmu" = xno; then : vars="Xmu/CmapAlloc.c Xmu/CrCmap.c Xmu/DelCmap.c Xmu/LookupCmap.c Xmu/StdCmap.c" for i in $vars; do case $i in \$*) # allow $-var names PKG_SOURCES="$PKG_SOURCES $i" PKG_OBJECTS="$PKG_OBJECTS $i" ;; *) # check for existence - allows for generic/win/unix VPATH # To add more dirs here (like 'src'), you have to update VPATH # in Makefile.in as well if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \ -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \ ; then as_fn_error "could not find source file '$i'" "$LINENO" 5 fi PKG_SOURCES="$PKG_SOURCES $i" # this assumes it is in a VPATH dir i=`basename $i` # handle user calling this before or after TEA_SETUP_COMPILER if test x"${OBJEXT}" != x ; then j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}" else j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}" fi PKG_OBJECTS="$PKG_OBJECTS $j" ;; esac done fi vars="-lGL" for i in $vars; do if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then # Convert foo.lib to -lfoo for GCC. No-op if not *.lib i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'` fi PKG_LIBS="$PKG_LIBS $i" done LIBGLU=-lGLU { $as_echo "$as_me:${as_lineno-$LINENO}: checking if GLX_GLXEXT_LEGACY interfers with including GL/glxext.h" >&5 $as_echo_n "checking if GLX_GLXEXT_LEGACY interfers with including GL/glxext.h... " >&6; } ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_save_CFLAGS=$CFLAGS CFLAGS=$TK_XINCLUDES cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define GLX_GLXEXT_LEGACY #include #undef GLX_VERSION_1_3 #undef GLX_VERSION_1_4 #include int main() { return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define UNDEF_GET_PROC_ADDRESS 1" >>confdefs.h fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$ac_save_CFLAGS ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ;; win32) TOGL_WINDOWINGSYSTEM=TOGL_WGL vars="opengl32.lib user32.lib gdi32.lib" for i in $vars; do if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then # Convert foo.lib to -lfoo for GCC. No-op if not *.lib i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'` fi PKG_LIBS="$PKG_LIBS $i" done if test "$GCC" = "yes" ; then LIBGLU=-lglu32 else # assume Microsoft compiler LIBGLU=glu32.lib fi ;; *) as_fn_error "Unsupported windowing system: ${TEA_WINDOWINGSYSTEM}" "$LINENO" 5 ;; esac #-------------------------------------------------------------------- # Check whether --enable-threads or --disable-threads was given. # This auto-enables if Tcl was compiled threaded. #-------------------------------------------------------------------- # Check whether --enable-threads was given. if test "${enable_threads+set}" = set; then : enableval=$enable_threads; tcl_ok=$enableval else tcl_ok=yes fi if test "${enable_threads+set}" = set; then enableval="$enable_threads" tcl_ok=$enableval else tcl_ok=yes fi if test "$tcl_ok" = "yes" -o "${TCL_THREADS}" = 1; then TCL_THREADS=1 if test "${TEA_PLATFORM}" != "windows" ; then # We are always OK on Windows, so check what this platform wants: # USE_THREAD_ALLOC tells us to try the special thread-based # allocator that significantly reduces lock contention $as_echo "#define USE_THREAD_ALLOC 1" >>confdefs.h $as_echo "#define _REENTRANT 1" >>confdefs.h if test "`uname -s`" = "SunOS" ; then $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h fi $as_echo "#define _THREAD_SAFE 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lpthread" >&5 $as_echo_n "checking for pthread_mutex_init in -lpthread... " >&6; } if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_mutex_init (); int main () { return pthread_mutex_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pthread_pthread_mutex_init=yes else ac_cv_lib_pthread_pthread_mutex_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 $as_echo "$ac_cv_lib_pthread_pthread_mutex_init" >&6; } if test "x$ac_cv_lib_pthread_pthread_mutex_init" = x""yes; then : tcl_ok=yes else tcl_ok=no fi if test "$tcl_ok" = "no"; then # Check a little harder for __pthread_mutex_init in the same # library, as some systems hide it there until pthread.h is # defined. We could alternatively do an AC_TRY_COMPILE with # pthread.h, but that will work with libpthread really doesn't # exist, like AIX 4.2. [Bug: 4359] { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_mutex_init in -lpthread" >&5 $as_echo_n "checking for __pthread_mutex_init in -lpthread... " >&6; } if test "${ac_cv_lib_pthread___pthread_mutex_init+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char __pthread_mutex_init (); int main () { return __pthread_mutex_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pthread___pthread_mutex_init=yes else ac_cv_lib_pthread___pthread_mutex_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5 $as_echo "$ac_cv_lib_pthread___pthread_mutex_init" >&6; } if test "x$ac_cv_lib_pthread___pthread_mutex_init" = x""yes; then : tcl_ok=yes else tcl_ok=no fi fi if test "$tcl_ok" = "yes"; then # The space is needed THREADS_LIBS=" -lpthread" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lpthreads" >&5 $as_echo_n "checking for pthread_mutex_init in -lpthreads... " >&6; } if test "${ac_cv_lib_pthreads_pthread_mutex_init+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_mutex_init (); int main () { return pthread_mutex_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pthreads_pthread_mutex_init=yes else ac_cv_lib_pthreads_pthread_mutex_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5 $as_echo "$ac_cv_lib_pthreads_pthread_mutex_init" >&6; } if test "x$ac_cv_lib_pthreads_pthread_mutex_init" = x""yes; then : tcl_ok=yes else tcl_ok=no fi if test "$tcl_ok" = "yes"; then # The space is needed THREADS_LIBS=" -lpthreads" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lc" >&5 $as_echo_n "checking for pthread_mutex_init in -lc... " >&6; } if test "${ac_cv_lib_c_pthread_mutex_init+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lc $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_mutex_init (); int main () { return pthread_mutex_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_c_pthread_mutex_init=yes else ac_cv_lib_c_pthread_mutex_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_pthread_mutex_init" >&5 $as_echo "$ac_cv_lib_c_pthread_mutex_init" >&6; } if test "x$ac_cv_lib_c_pthread_mutex_init" = x""yes; then : tcl_ok=yes else tcl_ok=no fi if test "$tcl_ok" = "no"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lc_r" >&5 $as_echo_n "checking for pthread_mutex_init in -lc_r... " >&6; } if test "${ac_cv_lib_c_r_pthread_mutex_init+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lc_r $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_mutex_init (); int main () { return pthread_mutex_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_c_r_pthread_mutex_init=yes else ac_cv_lib_c_r_pthread_mutex_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5 $as_echo "$ac_cv_lib_c_r_pthread_mutex_init" >&6; } if test "x$ac_cv_lib_c_r_pthread_mutex_init" = x""yes; then : tcl_ok=yes else tcl_ok=no fi if test "$tcl_ok" = "yes"; then # The space is needed THREADS_LIBS=" -pthread" else TCL_THREADS=0 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Do not know how to find pthread lib on your system - thread support disabled" >&5 $as_echo "$as_me: WARNING: Do not know how to find pthread lib on your system - thread support disabled" >&2;} fi fi fi fi fi else TCL_THREADS=0 fi # Do checking message here to not mess up interleaved configure output { $as_echo "$as_me:${as_lineno-$LINENO}: checking for building with threads" >&5 $as_echo_n "checking for building with threads... " >&6; } if test "${TCL_THREADS}" = 1; then $as_echo "#define TCL_THREADS 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5 $as_echo "yes (default)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # TCL_THREADS sanity checking. See if our request for building with # threads is the same as the way Tcl was built. If not, warn the user. case ${TCL_DEFS} in *THREADS=1*) if test "${TCL_THREADS}" = "0"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Building ${PACKAGE_NAME} without threads enabled, but building against Tcl that IS thread-enabled. It is recommended to use --enable-threads." >&5 $as_echo "$as_me: WARNING: Building ${PACKAGE_NAME} without threads enabled, but building against Tcl that IS thread-enabled. It is recommended to use --enable-threads." >&2;} fi ;; *) if test "${TCL_THREADS}" = "1"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-threads requested, but building against a Tcl that is NOT thread-enabled. This is an OK configuration that will also run in a thread-enabled core." >&5 $as_echo "$as_me: WARNING: --enable-threads requested, but building against a Tcl that is NOT thread-enabled. This is an OK configuration that will also run in a thread-enabled core." >&2;} fi ;; esac #-------------------------------------------------------------------- # The statement below defines a collection of symbols related to # building as a shared library instead of a static library. #-------------------------------------------------------------------- { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to build libraries" >&5 $as_echo_n "checking how to build libraries... " >&6; } # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; tcl_ok=$enableval else tcl_ok=yes fi if test "${enable_shared+set}" = set; then enableval="$enable_shared" tcl_ok=$enableval else tcl_ok=yes fi if test "$tcl_ok" = "yes" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: shared" >&5 $as_echo "shared" >&6; } SHARED_BUILD=1 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5 $as_echo "static" >&6; } SHARED_BUILD=0 $as_echo "#define STATIC_BUILD 1" >>confdefs.h fi #-------------------------------------------------------------------- # This macro figures out what flags to use with the compiler/linker # when building shared/static debug/optimized objects. This information # can be taken from the tclConfig.sh file, but this figures it all out. #-------------------------------------------------------------------- # Step 0.a: Enable 64 bit support? { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 64bit support is requested" >&5 $as_echo_n "checking if 64bit support is requested... " >&6; } # Check whether --enable-64bit was given. if test "${enable_64bit+set}" = set; then : enableval=$enable_64bit; do64bit=$enableval else do64bit=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $do64bit" >&5 $as_echo "$do64bit" >&6; } # Step 0.b: Enable Solaris 64 bit VIS support? { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 64bit Sparc VIS support is requested" >&5 $as_echo_n "checking if 64bit Sparc VIS support is requested... " >&6; } # Check whether --enable-64bit-vis was given. if test "${enable_64bit_vis+set}" = set; then : enableval=$enable_64bit_vis; do64bitVIS=$enableval else do64bitVIS=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $do64bitVIS" >&5 $as_echo "$do64bitVIS" >&6; } # Force 64bit on with VIS if test "$do64bitVIS" = "yes"; then : do64bit=yes fi # Step 0.c: Check if visibility support is available. Do this here so # that platform specific alternatives can be used below if this fails. { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports visibility \"hidden\"" >&5 $as_echo_n "checking if compiler supports visibility \"hidden\"... " >&6; } if test "${tcl_cv_cc_visibility_hidden+set}" = set; then : $as_echo_n "(cached) " >&6 else hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern __attribute__((__visibility__("hidden"))) void f(void); void f(void) {} int main () { f(); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : tcl_cv_cc_visibility_hidden=yes else tcl_cv_cc_visibility_hidden=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_visibility_hidden" >&5 $as_echo "$tcl_cv_cc_visibility_hidden" >&6; } if test $tcl_cv_cc_visibility_hidden = yes; then : $as_echo "#define MODULE_SCOPE extern __attribute__((__visibility__(\"hidden\")))" >>confdefs.h fi # Step 0.d: Disable -rpath support? { $as_echo "$as_me:${as_lineno-$LINENO}: checking if rpath support is requested" >&5 $as_echo_n "checking if rpath support is requested... " >&6; } # Check whether --enable-rpath was given. if test "${enable_rpath+set}" = set; then : enableval=$enable_rpath; doRpath=$enableval else doRpath=yes fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $doRpath" >&5 $as_echo "$doRpath" >&6; } # TEA specific: Cross-compiling options for Windows/CE builds? if test "${TEA_PLATFORM}" = windows; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Windows/CE build is requested" >&5 $as_echo_n "checking if Windows/CE build is requested... " >&6; } # Check whether --enable-wince was given. if test "${enable_wince+set}" = set; then : enableval=$enable_wince; doWince=$enableval else doWince=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $doWince" >&5 $as_echo "$doWince" >&6; } fi # Step 1: set the variable "system" to hold the name and version number # for the system. { $as_echo "$as_me:${as_lineno-$LINENO}: checking system version" >&5 $as_echo_n "checking system version... " >&6; } if test "${tcl_cv_sys_version+set}" = set; then : $as_echo_n "(cached) " >&6 else # TEA specific: if test "${TEA_PLATFORM}" = "windows" ; then tcl_cv_sys_version=windows elif test -f /usr/lib/NextStep/software_version; then tcl_cv_sys_version=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version` else tcl_cv_sys_version=`uname -s`-`uname -r` if test "$?" -ne 0 ; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: can't find uname command" >&5 $as_echo "$as_me: WARNING: can't find uname command" >&2;} tcl_cv_sys_version=unknown else # Special check for weird MP-RAS system (uname returns weird # results, and the version is kept in special file). if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then tcl_cv_sys_version=MP-RAS-`awk '{print $3}' /etc/.relid` fi if test "`uname -s`" = "AIX" ; then tcl_cv_sys_version=AIX-`uname -v`.`uname -r` fi fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_sys_version" >&5 $as_echo "$tcl_cv_sys_version" >&6; } system=$tcl_cv_sys_version # Step 2: check for existence of -ldl library. This is needed because # Linux can use either -ldl or -ldld for dynamic loading. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : have_dl=yes else have_dl=no fi # Require ranlib early so we can override it in special cases below. # Step 3: set configuration options based on system name and version. # This is similar to Tcl's unix/tcl.m4 except that we've added a # "windows" case. do64bit_ok=no LDFLAGS_ORIG="$LDFLAGS" # When ld needs options to work in 64-bit mode, put them in # LDFLAGS_ARCH so they eventually end up in LDFLAGS even if [load] # is disabled by the user. [Bug 1016796] LDFLAGS_ARCH="" TCL_EXPORT_FILE_SUFFIX="" UNSHARED_LIB_SUFFIX="" # TEA specific: use PACKAGE_VERSION instead of VERSION TCL_TRIM_DOTS='`echo ${PACKAGE_VERSION} | tr -d .`' ECHO_VERSION='`echo ${PACKAGE_VERSION}`' TCL_LIB_VERSIONS_OK=ok CFLAGS_DEBUG=-g CFLAGS_OPTIMIZE=-O if test "$GCC" = yes; then : # TEA specific: CFLAGS_OPTIMIZE=-O2 CFLAGS_WARNING="-Wall -Wno-implicit-int" else CFLAGS_WARNING="" fi TCL_NEEDS_EXP_FILE=0 TCL_BUILD_EXP_FILE="" TCL_EXP_FILE="" # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AR+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="ar" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi STLIB_LD='${AR} cr' LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH" case $system in # TEA specific: windows) # This is a 2-stage check to make sure we have the 64-bit SDK # We have to know where the SDK is installed. # This magic is based on MS Platform SDK for Win2003 SP1 - hobbs # MACHINE is IX86 for LINK, but this is used by the manifest, # which requires x86|amd64|ia64. MACHINE="X86" if test "$do64bit" != "no" ; then if test "x${MSSDK}x" = "xx" ; then MSSDK="C:/Progra~1/Microsoft Platform SDK" fi MSSDK=`echo "$MSSDK" | sed -e 's!\\\!/!g'` PATH64="" case "$do64bit" in amd64|x64|yes) MACHINE="AMD64" ; # default to AMD64 64-bit build PATH64="${MSSDK}/Bin/Win64/x86/AMD64" ;; ia64) MACHINE="IA64" PATH64="${MSSDK}/Bin/Win64" ;; esac if test ! -d "${PATH64}" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&5 $as_echo "$as_me: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ensure latest Platform SDK is installed" >&5 $as_echo "$as_me: WARNING: Ensure latest Platform SDK is installed" >&2;} do64bit="no" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using 64-bit $MACHINE mode" >&5 $as_echo " Using 64-bit $MACHINE mode" >&6; } do64bit_ok="yes" fi fi if test "$doWince" != "no" ; then if test "$do64bit" != "no" ; then as_fn_error "Windows/CE and 64-bit builds incompatible" "$LINENO" 5 fi if test "$GCC" = "yes" ; then as_fn_error "Windows/CE and GCC builds incompatible" "$LINENO" 5 fi # First, look for one uninstalled. # the alternative search directory is invoked by --with-celib if test x"${no_celib}" = x ; then # we reset no_celib in case something fails here no_celib=true # Check whether --with-celib was given. if test "${with_celib+set}" = set; then : withval=$with_celib; with_celibconfig=${withval} fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Windows/CE celib directory" >&5 $as_echo_n "checking for Windows/CE celib directory... " >&6; } if test "${ac_cv_c_celibconfig+set}" = set; then : $as_echo_n "(cached) " >&6 else # First check to see if --with-celibconfig was specified. if test x"${with_celibconfig}" != x ; then if test -d "${with_celibconfig}/inc" ; then ac_cv_c_celibconfig=`(cd ${with_celibconfig}; pwd)` else as_fn_error "${with_celibconfig} directory doesn't contain inc directory" "$LINENO" 5 fi fi # then check for a celib library if test x"${ac_cv_c_celibconfig}" = x ; then for i in \ ../celib-palm-3.0 \ ../celib \ ../../celib-palm-3.0 \ ../../celib \ `ls -dr ../celib-*3.[0-9]* 2>/dev/null` \ ${srcdir}/../celib-palm-3.0 \ ${srcdir}/../celib \ `ls -dr ${srcdir}/../celib-*3.[0-9]* 2>/dev/null` \ ; do if test -d "$i/inc" ; then ac_cv_c_celibconfig=`(cd $i; pwd)` break fi done fi fi if test x"${ac_cv_c_celibconfig}" = x ; then as_fn_error "Cannot find celib support library directory" "$LINENO" 5 else no_celib= CELIB_DIR=${ac_cv_c_celibconfig} CELIB_DIR=`echo "$CELIB_DIR" | sed -e 's!\\\!/!g'` { $as_echo "$as_me:${as_lineno-$LINENO}: result: found $CELIB_DIR" >&5 $as_echo "found $CELIB_DIR" >&6; } fi fi # Set defaults for common evc4/PPC2003 setup # Currently Tcl requires 300+, possibly 420+ for sockets CEVERSION=420; # could be 211 300 301 400 420 ... TARGETCPU=ARMV4; # could be ARMV4 ARM MIPS SH3 X86 ... ARCH=ARM; # could be ARM MIPS X86EM ... PLATFORM="Pocket PC 2003"; # or "Pocket PC 2002" if test "$doWince" != "yes"; then # If !yes then the user specified something # Reset ARCH to allow user to skip specifying it ARCH= eval `echo $doWince | awk -F, '{ \ if (length($1)) { printf "CEVERSION=\"%s\"\n", $1; \ if ($1 < 400) { printf "PLATFORM=\"Pocket PC 2002\"\n" } }; \ if (length($2)) { printf "TARGETCPU=\"%s\"\n", toupper($2) }; \ if (length($3)) { printf "ARCH=\"%s\"\n", toupper($3) }; \ if (length($4)) { printf "PLATFORM=\"%s\"\n", $4 }; \ }'` if test "x${ARCH}" = "x" ; then ARCH=$TARGETCPU; fi fi OSVERSION=WCE$CEVERSION; if test "x${WCEROOT}" = "x" ; then WCEROOT="C:/Program Files/Microsoft eMbedded C++ 4.0" if test ! -d "${WCEROOT}" ; then WCEROOT="C:/Program Files/Microsoft eMbedded Tools" fi fi if test "x${SDKROOT}" = "x" ; then SDKROOT="C:/Program Files/Windows CE Tools" if test ! -d "${SDKROOT}" ; then SDKROOT="C:/Windows CE Tools" fi fi WCEROOT=`echo "$WCEROOT" | sed -e 's!\\\!/!g'` SDKROOT=`echo "$SDKROOT" | sed -e 's!\\\!/!g'` if test ! -d "${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}" \ -o ! -d "${WCEROOT}/EVC/${OSVERSION}/bin"; then as_fn_error "could not find PocketPC SDK or target compiler to enable WinCE mode $CEVERSION,$TARGETCPU,$ARCH,$PLATFORM" "$LINENO" 5 doWince="no" else # We could PATH_NOSPACE these, but that's not important, # as long as we quote them when used. CEINCLUDE="${SDKROOT}/${OSVERSION}/${PLATFORM}/include" if test -d "${CEINCLUDE}/${TARGETCPU}" ; then CEINCLUDE="${CEINCLUDE}/${TARGETCPU}" fi CELIBPATH="${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}" fi fi if test "$GCC" != "yes" ; then if test "${SHARED_BUILD}" = "0" ; then runtime=-MT else runtime=-MD fi if test "$do64bit" != "no" ; then # All this magic is necessary for the Win64 SDK RC1 - hobbs CC="\"${PATH64}/cl.exe\"" CFLAGS="${CFLAGS} -I\"${MSSDK}/Include\" -I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\"" RC="\"${MSSDK}/bin/rc.exe\"" lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\"" LINKBIN="\"${PATH64}/link.exe\"" CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d" CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}" # Avoid 'unresolved external symbol __security_cookie' # errors, c.f. http://support.microsoft.com/?id=894573 vars="bufferoverflowU.lib" for i in $vars; do if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then # Convert foo.lib to -lfoo for GCC. No-op if not *.lib i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'` fi PKG_LIBS="$PKG_LIBS $i" done elif test "$doWince" != "no" ; then CEBINROOT="${WCEROOT}/EVC/${OSVERSION}/bin" if test "${TARGETCPU}" = "X86"; then CC="\"${CEBINROOT}/cl.exe\"" else CC="\"${CEBINROOT}/cl${ARCH}.exe\"" fi CFLAGS="$CFLAGS -I\"${CELIB_DIR}/inc\" -I\"${CEINCLUDE}\"" RC="\"${WCEROOT}/Common/EVC/bin/rc.exe\"" arch=`echo ${ARCH} | awk '{print tolower($0)}'` defs="${ARCH} _${ARCH}_ ${arch} PALM_SIZE _MT _WINDOWS" if test "${SHARED_BUILD}" = "1" ; then # Static CE builds require static celib as well defs="${defs} _DLL" fi for i in $defs ; do cat >>confdefs.h <<_ACEOF #define $i 1 _ACEOF done cat >>confdefs.h <<_ACEOF #define _WIN32_WCE $CEVERSION _ACEOF cat >>confdefs.h <<_ACEOF #define UNDER_CE $CEVERSION _ACEOF CFLAGS_DEBUG="-nologo -Zi -Od" CFLAGS_OPTIMIZE="-nologo -Ox" lversion=`echo ${CEVERSION} | sed -e 's/\(.\)\(..\)/\1\.\2/'` lflags="-MACHINE:${ARCH} -LIBPATH:\"${CELIBPATH}\" -subsystem:windowsce,${lversion} -nologo" LINKBIN="\"${CEBINROOT}/link.exe\"" else RC="rc" lflags="-nologo" LINKBIN="link" CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d" CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}" fi fi if test "$GCC" = "yes"; then # mingw gcc mode RC="windres" CFLAGS_DEBUG="-g" CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer" SHLIB_LD="$CC -shared" UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}" LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}" else SHLIB_LD="${LINKBIN} -dll ${lflags}" # link -lib only works when -lib is the first arg STLIB_LD="${LINKBIN} -lib ${lflags}" UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.lib' PATHTYPE=-w # For information on what debugtype is most useful, see: # http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp # and also # http://msdn2.microsoft.com/en-us/library/y0zzbyt4%28VS.80%29.aspx # This essentially turns it all on. LDFLAGS_DEBUG="-debug -debugtype:cv" LDFLAGS_OPTIMIZE="-release" if test "$doWince" != "no" ; then LDFLAGS_CONSOLE="-link ${lflags}" LDFLAGS_WINDOW=${LDFLAGS_CONSOLE} else LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}" LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}" fi fi SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".dll" SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.dll' TCL_LIB_VERSIONS_OK=nodots # Bogus to avoid getting this turned off DL_OBJS="tclLoadNone.obj" ;; AIX-*) if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes"; then : # AIX requires the _r compiler when gcc isn't being used case "${CC}" in *_r) # ok ... ;; *) CC=${CC}_r ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using $CC for compiling with threads" >&5 $as_echo "Using $CC for compiling with threads" >&6; } fi LIBS="$LIBS -lc" SHLIB_CFLAGS="" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" LD_LIBRARY_PATH_VAR="LIBPATH" # Check to enable 64-bit flags for compiler/linker on AIX 4+ if test "$do64bit" = yes -a "`uname -v`" -gt 3; then : if test "$GCC" = yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC on $system" >&5 $as_echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;} else do64bit_ok=yes CFLAGS="$CFLAGS -q64" LDFLAGS_ARCH="-q64" RANLIB="${RANLIB} -X64" AR="${AR} -X64" SHLIB_LD_FLAGS="-b64" fi fi if test "`uname -m`" = ia64; then : # AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC SHLIB_LD="/usr/ccs/bin/ld -G -z text" # AIX-5 has dl* in libc.so DL_LIBS="" if test "$GCC" = yes; then : CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' else CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}' fi LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' else if test "$GCC" = yes; then : SHLIB_LD='${CC} -shared' else SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry" fi SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix ${SHLIB_LD} ${SHLIB_LD_FLAGS}" DL_LIBS="-ldl" CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} TCL_NEEDS_EXP_FILE=1 # TEA specific: use PACKAGE_VERSION instead of VERSION TCL_EXPORT_FILE_SUFFIX='${PACKAGE_VERSION}.exp' fi # AIX v<=4.1 has some different flags than 4.2+ if test "$system" = "AIX-4.1" -o "`uname -v`" -lt 4; then : case " $LIBOBJS " in *" tclLoadAix.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS tclLoadAix.$ac_objext" ;; esac DL_LIBS="-lld" fi # On AIX <=v4 systems, libbsd.a has to be linked in to support # non-blocking file IO. This library has to be linked in after # the MATH_LIBS or it breaks the pow() function. The way to # insure proper sequencing, is to add it to the tail of MATH_LIBS. # This library also supplies gettimeofday. # # AIX does not have a timezone field in struct tm. When the AIX # bsd library is used, the timezone global and the gettimeofday # methods are to be avoided for timezone deduction instead, we # deduce the timezone by comparing the localtime result on a # known GMT value. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday in -lbsd" >&5 $as_echo_n "checking for gettimeofday in -lbsd... " >&6; } if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbsd $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gettimeofday (); int main () { return gettimeofday (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bsd_gettimeofday=yes else ac_cv_lib_bsd_gettimeofday=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gettimeofday" >&5 $as_echo "$ac_cv_lib_bsd_gettimeofday" >&6; } if test "x$ac_cv_lib_bsd_gettimeofday" = x""yes; then : libbsd=yes else libbsd=no fi if test $libbsd = yes; then : MATH_LIBS="$MATH_LIBS -lbsd" $as_echo "#define USE_DELTA_FOR_TZ 1" >>confdefs.h fi ;; BeOS*) SHLIB_CFLAGS="-fPIC" SHLIB_LD='${CC} -nostart' SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" #----------------------------------------------------------- # Check for inet_ntoa in -lbind, for BeOS (which also needs # -lsocket, even if the network functions are in -lnet which # is always linked to, for compatibility. #----------------------------------------------------------- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_ntoa in -lbind" >&5 $as_echo_n "checking for inet_ntoa in -lbind... " >&6; } if test "${ac_cv_lib_bind_inet_ntoa+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbind $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char inet_ntoa (); int main () { return inet_ntoa (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bind_inet_ntoa=yes else ac_cv_lib_bind_inet_ntoa=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bind_inet_ntoa" >&5 $as_echo "$ac_cv_lib_bind_inet_ntoa" >&6; } if test "x$ac_cv_lib_bind_inet_ntoa" = x""yes; then : LIBS="$LIBS -lbind -lsocket" fi ;; BSD/OS-2.1*|BSD/OS-3*) SHLIB_CFLAGS="" SHLIB_LD="shlicc -r" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; BSD/OS-4.*) SHLIB_CFLAGS="-export-dynamic -fPIC" SHLIB_LD='${CC} -shared' SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" LDFLAGS="$LDFLAGS -export-dynamic" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; dgux*) SHLIB_CFLAGS="-K PIC" SHLIB_LD='${CC} -G' SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; HP-UX-*.11.*) # Use updated header definitions where possible $as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h # TEA specific: Needed by Tcl, but not most extensions #AC_DEFINE(_XOPEN_SOURCE, 1, [Do we want to use the XOPEN network library?]) #LIBS="$LIBS -lxnet" # Use the XOPEN network library if test "`uname -m`" = ia64; then : SHLIB_SUFFIX=".so" # Use newer C++ library for C++ extensions #if test "$GCC" != "yes" ; then # CPPFLAGS="-AA" #fi else SHLIB_SUFFIX=".sl" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = x""yes; then : tcl_ok=yes else tcl_ok=no fi if test "$tcl_ok" = yes; then : SHLIB_CFLAGS="+z" SHLIB_LD="ld -b" SHLIB_LD_LIBS='${LIBS}' DL_OBJS="tclLoadShl.o" DL_LIBS="-ldld" LDFLAGS="$LDFLAGS -Wl,-E" CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.' LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.' LD_LIBRARY_PATH_VAR="SHLIB_PATH" fi if test "$GCC" = yes; then : SHLIB_LD='${CC} -shared' SHLIB_LD_LIBS='${LIBS}' LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} fi # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc #CFLAGS="$CFLAGS +DAportable" # Check to enable 64-bit flags for compiler/linker if test "$do64bit" = "yes"; then : if test "$GCC" = yes; then : case `${CC} -dumpmachine` in hppa64*) # 64-bit gcc in use. Fix flags for GNU ld. do64bit_ok=yes SHLIB_LD='${CC} -shared' SHLIB_LD_LIBS='${LIBS}' if test $doRpath = yes; then : CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' fi LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC on $system" >&5 $as_echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;} ;; esac else do64bit_ok=yes CFLAGS="$CFLAGS +DD64" LDFLAGS_ARCH="+DD64" fi fi ;; HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*) SHLIB_SUFFIX=".sl" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = x""yes; then : tcl_ok=yes else tcl_ok=no fi if test "$tcl_ok" = yes; then : SHLIB_CFLAGS="+z" SHLIB_LD="ld -b" SHLIB_LD_LIBS="" DL_OBJS="tclLoadShl.o" DL_LIBS="-ldld" LDFLAGS="$LDFLAGS -Wl,-E" CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.' LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.' LD_LIBRARY_PATH_VAR="SHLIB_PATH" fi ;; IRIX-5.*) SHLIB_CFLAGS="" SHLIB_LD="ld -shared -rdata_shared" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" if test $doRpath = yes; then : CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' fi ;; IRIX-6.*) SHLIB_CFLAGS="" SHLIB_LD="ld -n32 -shared -rdata_shared" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" if test $doRpath = yes; then : CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' fi if test "$GCC" = yes; then : CFLAGS="$CFLAGS -mabi=n32" LDFLAGS="$LDFLAGS -mabi=n32" else case $system in IRIX-6.3) # Use to build 6.2 compatible binaries on 6.3. CFLAGS="$CFLAGS -n32 -D_OLD_TERMIOS" ;; *) CFLAGS="$CFLAGS -n32" ;; esac LDFLAGS="$LDFLAGS -n32" fi ;; IRIX64-6.*) SHLIB_CFLAGS="" SHLIB_LD="ld -n32 -shared -rdata_shared" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" if test $doRpath = yes; then : CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' fi # Check to enable 64-bit flags for compiler/linker if test "$do64bit" = yes; then : if test "$GCC" = yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported by gcc" >&5 $as_echo "$as_me: WARNING: 64bit mode not supported by gcc" >&2;} else do64bit_ok=yes SHLIB_LD="ld -64 -shared -rdata_shared" CFLAGS="$CFLAGS -64" LDFLAGS_ARCH="-64" fi fi ;; Linux*) SHLIB_CFLAGS="-fPIC" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" # TEA specific: CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer" # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings # when you inline the string and math operations. Turn this off to # get rid of the warnings. #CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES" # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS_DEFAULT}' DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" LDFLAGS="$LDFLAGS -Wl,--export-dynamic" if test $doRpath = yes; then : CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' fi LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} if test "`uname -m`" = "alpha"; then : CFLAGS="$CFLAGS -mieee" fi if test $do64bit = yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -m64 flag" >&5 $as_echo_n "checking if compiler accepts -m64 flag... " >&6; } if test "${tcl_cv_cc_m64+set}" = set; then : $as_echo_n "(cached) " >&6 else hold_cflags=$CFLAGS CFLAGS="$CFLAGS -m64" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : tcl_cv_cc_m64=yes else tcl_cv_cc_m64=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_m64" >&5 $as_echo "$tcl_cv_cc_m64" >&6; } if test $tcl_cv_cc_m64 = yes; then : CFLAGS="$CFLAGS -m64" do64bit_ok=yes fi fi # The combo of gcc + glibc has a bug related to inlining of # functions like strtod(). The -fno-builtin flag should address # this problem but it does not work. The -fno-inline flag is kind # of overkill but it works. Disable inlining only when one of the # files in compat/*.c is being linked in. if test x"${USE_COMPAT}" != x; then : CFLAGS="$CFLAGS -fno-inline" fi ;; GNU*) SHLIB_CFLAGS="-fPIC" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" SHLIB_LD='${CC} -shared' DL_OBJS="" DL_LIBS="-ldl" LDFLAGS="$LDFLAGS -Wl,--export-dynamic" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" if test "`uname -m`" = "alpha"; then : CFLAGS="$CFLAGS -mieee" fi ;; Lynx*) SHLIB_CFLAGS="-fPIC" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" CFLAGS_OPTIMIZE=-02 SHLIB_LD='${CC} -shared' DL_OBJS="tclLoadDl.o" DL_LIBS="-mshared -ldl" LD_FLAGS="-Wl,--export-dynamic" if test $doRpath = yes; then : CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' fi ;; MP-RAS-02*) SHLIB_CFLAGS="-K PIC" SHLIB_LD='${CC} -G' SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; MP-RAS-*) SHLIB_CFLAGS="-K PIC" SHLIB_LD='${CC} -G' SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" LDFLAGS="$LDFLAGS -Wl,-Bexport" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; NetBSD-1.*|FreeBSD-[1-2].*) SHLIB_CFLAGS="-fPIC" SHLIB_LD="ld -Bshareable -x" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" if test $doRpath = yes; then : CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF" >&5 $as_echo_n "checking for ELF... " >&6; } if test "${tcl_cv_ld_elf+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __ELF__ yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then : tcl_cv_ld_elf=yes else tcl_cv_ld_elf=no fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_elf" >&5 $as_echo "$tcl_cv_ld_elf" >&6; } if test $tcl_cv_ld_elf = yes; then : SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so' else SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0' fi # Ancient FreeBSD doesn't handle version numbers with dots. UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' TCL_LIB_VERSIONS_OK=nodots ;; OpenBSD-*) SHLIB_CFLAGS="-fPIC" SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}' SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" if test $doRpath = yes; then : CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' fi LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0' { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF" >&5 $as_echo_n "checking for ELF... " >&6; } if test "${tcl_cv_ld_elf+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __ELF__ yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then : tcl_cv_ld_elf=yes else tcl_cv_ld_elf=no fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_elf" >&5 $as_echo "$tcl_cv_ld_elf" >&6; } if test $tcl_cv_ld_elf = yes; then : LDFLAGS=-Wl,-export-dynamic else LDFLAGS="" fi # OpenBSD doesn't do version numbers with dots. UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' TCL_LIB_VERSIONS_OK=nodots ;; NetBSD-*|FreeBSD-*) # FreeBSD 3.* and greater have ELF. # NetBSD 2.* has ELF and can use 'cc -shared' to build shared libs SHLIB_CFLAGS="-fPIC" SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}' SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" LDFLAGS="$LDFLAGS -export-dynamic" if test $doRpath = yes; then : CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' fi LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} if test "${TCL_THREADS}" = "1"; then : # The -pthread needs to go in the CFLAGS, not LIBS LIBS=`echo $LIBS | sed s/-pthread//` CFLAGS="$CFLAGS -pthread" LDFLAGS="$LDFLAGS -pthread" fi case $system in FreeBSD-3.*) # FreeBSD-3 doesn't handle version numbers with dots. UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so' TCL_LIB_VERSIONS_OK=nodots ;; esac ;; Darwin-*) CFLAGS_OPTIMIZE="-Os" SHLIB_CFLAGS="-fno-common" # To avoid discrepancies between what headers configure sees during # preprocessing tests and compiling tests, move any -isysroot and # -mmacosx-version-min flags from CFLAGS to CPPFLAGS: CPPFLAGS="${CPPFLAGS} `echo " ${CFLAGS}" | \ awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \ if ($i~/^(isysroot|mmacosx-version-min)/) print "-"$i}'`" CFLAGS="`echo " ${CFLAGS}" | \ awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \ if (!($i~/^(isysroot|mmacosx-version-min)/)) print "-"$i}'`" if test $do64bit = yes; then : case `arch` in ppc) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -arch ppc64 flag" >&5 $as_echo_n "checking if compiler accepts -arch ppc64 flag... " >&6; } if test "${tcl_cv_cc_arch_ppc64+set}" = set; then : $as_echo_n "(cached) " >&6 else hold_cflags=$CFLAGS CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : tcl_cv_cc_arch_ppc64=yes else tcl_cv_cc_arch_ppc64=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_arch_ppc64" >&5 $as_echo "$tcl_cv_cc_arch_ppc64" >&6; } if test $tcl_cv_cc_arch_ppc64 = yes; then : CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5" do64bit_ok=yes fi;; i386) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -arch x86_64 flag" >&5 $as_echo_n "checking if compiler accepts -arch x86_64 flag... " >&6; } if test "${tcl_cv_cc_arch_x86_64+set}" = set; then : $as_echo_n "(cached) " >&6 else hold_cflags=$CFLAGS CFLAGS="$CFLAGS -arch x86_64" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : tcl_cv_cc_arch_x86_64=yes else tcl_cv_cc_arch_x86_64=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_arch_x86_64" >&5 $as_echo "$tcl_cv_cc_arch_x86_64" >&6; } if test $tcl_cv_cc_arch_x86_64 = yes; then : CFLAGS="$CFLAGS -arch x86_64" do64bit_ok=yes fi;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&5 $as_echo "$as_me: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&2;};; esac else # Check for combined 32-bit and 64-bit fat build if echo "$CFLAGS " |grep -E -q -- '-arch (ppc64|x86_64) ' \ && echo "$CFLAGS " |grep -E -q -- '-arch (ppc|i386) '; then : fat_32_64=yes fi fi # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS_DEFAULT}' { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ld accepts -single_module flag" >&5 $as_echo_n "checking if ld accepts -single_module flag... " >&6; } if test "${tcl_cv_ld_single_module+set}" = set; then : $as_echo_n "(cached) " >&6 else hold_ldflags=$LDFLAGS LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { int i; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : tcl_cv_ld_single_module=yes else tcl_cv_ld_single_module=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_single_module" >&5 $as_echo "$tcl_cv_ld_single_module" >&6; } if test $tcl_cv_ld_single_module = yes; then : SHLIB_LD="${SHLIB_LD} -Wl,-single_module" fi # TEA specific: link shlib with current and compatibility version flags vers=`echo ${PACKAGE_VERSION} | sed -e 's/^\([0-9]\{1,5\}\)\(\(\.[0-9]\{1,3\}\)\{0,2\}\).*$/\1\2/p' -e d` SHLIB_LD="${SHLIB_LD} -current_version ${vers:-0} -compatibility_version ${vers:-0}" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".dylib" DL_OBJS="tclLoadDyld.o" DL_LIBS="" # Don't use -prebind when building for Mac OS X 10.4 or later only: if test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int($2)}'`" -lt 4 -a \ "`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int($2)}'`" -lt 4; then : LDFLAGS="$LDFLAGS -prebind" fi LDFLAGS="$LDFLAGS -headerpad_max_install_names" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ld accepts -search_paths_first flag" >&5 $as_echo_n "checking if ld accepts -search_paths_first flag... " >&6; } if test "${tcl_cv_ld_search_paths_first+set}" = set; then : $as_echo_n "(cached) " >&6 else hold_ldflags=$LDFLAGS LDFLAGS="$LDFLAGS -Wl,-search_paths_first" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { int i; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : tcl_cv_ld_search_paths_first=yes else tcl_cv_ld_search_paths_first=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_search_paths_first" >&5 $as_echo "$tcl_cv_ld_search_paths_first" >&6; } if test $tcl_cv_ld_search_paths_first = yes; then : LDFLAGS="$LDFLAGS -Wl,-search_paths_first" fi if test "$tcl_cv_cc_visibility_hidden" != yes; then : $as_echo "#define MODULE_SCOPE __private_extern__" >>confdefs.h fi CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH" # TEA specific: for combined 32 & 64 bit fat builds of Tk # extensions, verify that 64-bit build is possible. if test "$fat_32_64" = yes && test -n "${TK_BIN_DIR}"; then : if test "${TEA_WINDOWINGSYSTEM}" = x11; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit X11" >&5 $as_echo_n "checking for 64-bit X11... " >&6; } if test "${tcl_cv_lib_x11_64+set}" = set; then : $as_echo_n "(cached) " >&6 else for v in CFLAGS CPPFLAGS LDFLAGS; do eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"' done CPPFLAGS="$CPPFLAGS -I/usr/X11R6/include" LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -lX11" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { XrmInitialize(); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : tcl_cv_lib_x11_64=yes else tcl_cv_lib_x11_64=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext for v in CFLAGS CPPFLAGS LDFLAGS; do eval $v'="$hold_'$v'"' done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_lib_x11_64" >&5 $as_echo "$tcl_cv_lib_x11_64" >&6; } fi # remove 64-bit arch flags from CFLAGS et al. if configuration # does not support 64-bit. if test "${TEA_WINDOWINGSYSTEM}" = aqua -o "$tcl_cv_lib_x11_64" = no; then : { $as_echo "$as_me:${as_lineno-$LINENO}: Removing 64-bit architectures from compiler & linker flags" >&5 $as_echo "$as_me: Removing 64-bit architectures from compiler & linker flags" >&6;} for v in CFLAGS CPPFLAGS LDFLAGS; do eval $v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"' done fi fi ;; NEXTSTEP-*) SHLIB_CFLAGS="" SHLIB_LD='${CC} -nostdlib -r' SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadNext.o" DL_LIBS="" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; OS/390-*) CFLAGS_OPTIMIZE="" # Optimizer is buggy $as_echo "#define _OE_SOCKETS 1" >>confdefs.h ;; OSF1-1.0|OSF1-1.1|OSF1-1.2) # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1 SHLIB_CFLAGS="" # Hack: make package name same as library name SHLIB_LD='ld -R -export :' SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadOSF.o" DL_LIBS="" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; OSF1-1.*) # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2 SHLIB_CFLAGS="-fPIC" if test "$SHARED_BUILD" = 1; then : SHLIB_LD="ld -shared" else SHLIB_LD="ld -non_shared" fi SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; OSF1-V*) # Digital OSF/1 SHLIB_CFLAGS="" if test "$SHARED_BUILD" = 1; then : SHLIB_LD='${CC} -shared' else SHLIB_LD='${CC} -non_shared' fi SHLIB_LD_LIBS="${LIBS}" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" if test $doRpath = yes; then : CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' fi if test "$GCC" = yes; then : CFLAGS="$CFLAGS -mieee" else CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee" fi # see pthread_intro(3) for pthread support on osf1, k.furukawa if test "${TCL_THREADS}" = 1; then : CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE" CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64" LIBS=`echo $LIBS | sed s/-lpthreads//` if test "$GCC" = yes; then : LIBS="$LIBS -lpthread -lmach -lexc" else CFLAGS="$CFLAGS -pthread" LDFLAGS="$LDFLAGS -pthread" fi fi ;; QNX-6*) # QNX RTP # This may work for all QNX, but it was only reported for v6. SHLIB_CFLAGS="-fPIC" SHLIB_LD="ld -Bshareable -x" SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" # dlopen is in -lc on QNX DL_LIBS="" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; SCO_SV-3.2*) # Note, dlopen is available only on SCO 3.2.5 and greater. However, # this test works, since "uname -s" was non-standard in 3.2.4 and # below. if test "$GCC" = yes; then : SHLIB_CFLAGS="-fPIC -melf" LDFLAGS="$LDFLAGS -melf -Wl,-Bexport" else SHLIB_CFLAGS="-Kpic -belf" LDFLAGS="$LDFLAGS -belf -Wl,-Bexport" fi SHLIB_LD="ld -G" SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; SINIX*5.4*) SHLIB_CFLAGS="-K PIC" SHLIB_LD='${CC} -G' SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; SunOS-4*) SHLIB_CFLAGS="-PIC" SHLIB_LD="ld" SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} # SunOS can't handle version numbers with dots in them in library # specs, like -ltcl7.5, so use -ltcl75 instead. Also, it # requires an extra version number at the end of .so file names. # So, the library has to have a name like libtcl75.so.1.0 SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0' UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' TCL_LIB_VERSIONS_OK=nodots ;; SunOS-5.[0-6]) # Careful to not let 5.10+ fall into this case # Note: If _REENTRANT isn't defined, then Solaris # won't define thread-safe library routines. $as_echo "#define _REENTRANT 1" >>confdefs.h $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h SHLIB_CFLAGS="-KPIC" # Note: need the LIBS below, otherwise Tk won't find Tcl's # symbols when dynamically loaded into tclsh. SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" if test "$GCC" = yes; then : SHLIB_LD='${CC} -shared' CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} else SHLIB_LD="/usr/ccs/bin/ld -G -z text" CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} fi ;; SunOS-5*) # Note: If _REENTRANT isn't defined, then Solaris # won't define thread-safe library routines. $as_echo "#define _REENTRANT 1" >>confdefs.h $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h SHLIB_CFLAGS="-KPIC" # Check to enable 64-bit flags for compiler/linker if test "$do64bit" = yes; then : arch=`isainfo` if test "$arch" = "sparcv9 sparc"; then : if test "$GCC" = yes; then : if test "`${CC} -dumpversion | awk -F. '{print $1}'`" -lt 3; then : { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&5 $as_echo "$as_me: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&2;} else do64bit_ok=yes CFLAGS="$CFLAGS -m64 -mcpu=v9" LDFLAGS="$LDFLAGS -m64 -mcpu=v9" SHLIB_CFLAGS="-fPIC" fi else do64bit_ok=yes if test "$do64bitVIS" = yes; then : CFLAGS="$CFLAGS -xarch=v9a" LDFLAGS_ARCH="-xarch=v9a" else CFLAGS="$CFLAGS -xarch=v9" LDFLAGS_ARCH="-xarch=v9" fi # Solaris 64 uses this as well #LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64" fi else if test "$arch" = "amd64 i386"; then : if test "$GCC" = yes; then : case $system in SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*) do64bit_ok=yes CFLAGS="$CFLAGS -m64" LDFLAGS="$LDFLAGS -m64";; *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC on $system" >&5 $as_echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;};; esac else do64bit_ok=yes case $system in SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*) CFLAGS="$CFLAGS -m64" LDFLAGS="$LDFLAGS -m64";; *) CFLAGS="$CFLAGS -xarch=amd64" LDFLAGS="$LDFLAGS -xarch=amd64";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported for $arch" >&5 $as_echo "$as_me: WARNING: 64bit mode not supported for $arch" >&2;} fi fi fi # Note: need the LIBS below, otherwise Tk won't find Tcl's # symbols when dynamically loaded into tclsh. SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" if test "$GCC" = yes; then : SHLIB_LD='${CC} -shared' CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} if test "$do64bit_ok" = yes; then : if test "$arch" = "sparcv9 sparc"; then : # We need to specify -static-libgcc or we need to # add the path to the sparv9 libgcc. # JH: static-libgcc is necessary for core Tcl, but may # not be necessary for extensions. SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc" # for finding sparcv9 libgcc, get the regular libgcc # path, remove so name and append 'sparcv9' #v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..." #CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir" else if test "$arch" = "amd64 i386"; then : # JH: static-libgcc is necessary for core Tcl, but may # not be necessary for extensions. SHLIB_LD="$SHLIB_LD -m64 -static-libgcc" fi fi fi else case $system in SunOS-5.[1-9][0-9]*) SHLIB_LD='${CC} -G -z text ${LDFLAGS}';; *) SHLIB_LD='/usr/ccs/bin/ld -G -z text';; esac CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' fi ;; UNIX_SV* | UnixWare-5*) SHLIB_CFLAGS="-KPIC" SHLIB_LD='${CC} -G' SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers # that don't grok the -Bexport option. Test that it does. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld accepts -Bexport flag" >&5 $as_echo_n "checking for ld accepts -Bexport flag... " >&6; } if test "${tcl_cv_ld_Bexport+set}" = set; then : $as_echo_n "(cached) " >&6 else hold_ldflags=$LDFLAGS LDFLAGS="$LDFLAGS -Wl,-Bexport" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { int i; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : tcl_cv_ld_Bexport=yes else tcl_cv_ld_Bexport=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_Bexport" >&5 $as_echo "$tcl_cv_ld_Bexport" >&6; } if test $tcl_cv_ld_Bexport = yes; then : LDFLAGS="$LDFLAGS -Wl,-Bexport" fi CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; esac if test "$do64bit" = yes -a "$do64bit_ok" = no; then : { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit support being disabled -- don't know magic for this platform" >&5 $as_echo "$as_me: WARNING: 64bit support being disabled -- don't know magic for this platform" >&2;} fi # Step 4: disable dynamic loading if requested via a command-line switch. # Check whether --enable-load was given. if test "${enable_load+set}" = set; then : enableval=$enable_load; tcl_ok=$enableval else tcl_ok=yes fi if test "$tcl_ok" = no; then : DL_OBJS="" fi if test "x$DL_OBJS" != x; then : BUILD_DLTEST="\$(DLTEST_TARGETS)" else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't figure out how to do dynamic loading or shared libraries on this system." >&5 $as_echo "$as_me: WARNING: Can't figure out how to do dynamic loading or shared libraries on this system." >&2;} SHLIB_CFLAGS="" SHLIB_LD="" SHLIB_SUFFIX="" DL_OBJS="tclLoadNone.o" DL_LIBS="" LDFLAGS="$LDFLAGS_ORIG" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" BUILD_DLTEST="" fi LDFLAGS="$LDFLAGS $LDFLAGS_ARCH" # If we're running gcc, then change the C flags for compiling shared # libraries to the right flags for gcc, instead of those for the # standard manufacturer compiler. if test "$DL_OBJS" != "tclLoadNone.o" -a "$GCC" = yes; then : case $system in AIX-*) ;; BSD/OS*) ;; IRIX*) ;; NetBSD-*|FreeBSD-*) ;; Darwin-*) ;; SCO_SV-3.2*) ;; *) SHLIB_CFLAGS="-fPIC" ;; esac fi if test "$SHARED_LIB_SUFFIX" = ""; then : # TEA specific: use PACKAGE_VERSION instead of VERSION SHARED_LIB_SUFFIX='${PACKAGE_VERSION}${SHLIB_SUFFIX}' fi if test "$UNSHARED_LIB_SUFFIX" = ""; then : # TEA specific: use PACKAGE_VERSION instead of VERSION UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a' fi # These must be called after we do the basic CFLAGS checks and # verify any possible 64-bit or similar switches are necessary { $as_echo "$as_me:${as_lineno-$LINENO}: checking for required early compiler flags" >&5 $as_echo_n "checking for required early compiler flags... " >&6; } tcl_flags="" if test "${tcl_cv_flag__isoc99_source+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { char *p = (char *)strtoll; char *q = (char *)strtoull; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : tcl_cv_flag__isoc99_source=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _ISOC99_SOURCE 1 #include int main () { char *p = (char *)strtoll; char *q = (char *)strtoull; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : tcl_cv_flag__isoc99_source=yes else tcl_cv_flag__isoc99_source=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then $as_echo "#define _ISOC99_SOURCE 1" >>confdefs.h tcl_flags="$tcl_flags _ISOC99_SOURCE" fi if test "${tcl_cv_flag__largefile64_source+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { struct stat64 buf; int i = stat64("/", &buf); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : tcl_cv_flag__largefile64_source=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _LARGEFILE64_SOURCE 1 #include int main () { struct stat64 buf; int i = stat64("/", &buf); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : tcl_cv_flag__largefile64_source=yes else tcl_cv_flag__largefile64_source=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then $as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h tcl_flags="$tcl_flags _LARGEFILE64_SOURCE" fi if test "${tcl_cv_flag__largefile_source64+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { char *p = (char *)open64; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : tcl_cv_flag__largefile_source64=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _LARGEFILE_SOURCE64 1 #include int main () { char *p = (char *)open64; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : tcl_cv_flag__largefile_source64=yes else tcl_cv_flag__largefile_source64=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then $as_echo "#define _LARGEFILE_SOURCE64 1" >>confdefs.h tcl_flags="$tcl_flags _LARGEFILE_SOURCE64" fi if test "x${tcl_flags}" = "x" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${tcl_flags}" >&5 $as_echo "${tcl_flags}" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit integer type" >&5 $as_echo_n "checking for 64-bit integer type... " >&6; } if test "${tcl_cv_type_64bit+set}" = set; then : $as_echo_n "(cached) " >&6 else tcl_cv_type_64bit=none # See if the compiler knows natively about __int64 cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { __int64 value = (__int64) 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : tcl_type_64bit=__int64 else tcl_type_64bit="long long" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # See if we should use long anyway Note that we substitute in the # type that is our current guess for a 64-bit type inside this check # program, so it should be modified only carefully... cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { switch (0) { case 1: case (sizeof(${tcl_type_64bit})==sizeof(long)): ; } ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : tcl_cv_type_64bit=${tcl_type_64bit} fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "${tcl_cv_type_64bit}" = none ; then $as_echo "#define TCL_WIDE_INT_IS_LONG 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: using long" >&5 $as_echo "using long" >&6; } elif test "${tcl_cv_type_64bit}" = "__int64" \ -a "${TEA_PLATFORM}" = "windows" ; then # TEA specific: We actually want to use the default tcl.h checks in # this case to handle both TCL_WIDE_INT_TYPE and TCL_LL_MODIFIER* { $as_echo "$as_me:${as_lineno-$LINENO}: result: using Tcl header defaults" >&5 $as_echo "using Tcl header defaults" >&6; } else cat >>confdefs.h <<_ACEOF #define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit} _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${tcl_cv_type_64bit}" >&5 $as_echo "${tcl_cv_type_64bit}" >&6; } # Now check for auxiliary declarations { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct dirent64" >&5 $as_echo_n "checking for struct dirent64... " >&6; } if test "${tcl_cv_struct_dirent64+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { struct dirent64 p; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : tcl_cv_struct_dirent64=yes else tcl_cv_struct_dirent64=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_struct_dirent64" >&5 $as_echo "$tcl_cv_struct_dirent64" >&6; } if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then $as_echo "#define HAVE_STRUCT_DIRENT64 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct stat64" >&5 $as_echo_n "checking for struct stat64... " >&6; } if test "${tcl_cv_struct_stat64+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { struct stat64 p; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : tcl_cv_struct_stat64=yes else tcl_cv_struct_stat64=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_struct_stat64" >&5 $as_echo "$tcl_cv_struct_stat64" >&6; } if test "x${tcl_cv_struct_stat64}" = "xyes" ; then $as_echo "#define HAVE_STRUCT_STAT64 1" >>confdefs.h fi for ac_func in open64 lseek64 do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" eval as_val=\$$as_ac_var if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for off64_t" >&5 $as_echo_n "checking for off64_t... " >&6; } if test "${tcl_cv_type_off64_t+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { off64_t offset; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : tcl_cv_type_off64_t=yes else tcl_cv_type_off64_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_type_off64_t}" = "xyes" && \ test "x${ac_cv_func_lseek64}" = "xyes" && \ test "x${ac_cv_func_open64}" = "xyes" ; then $as_echo "#define HAVE_TYPE_OFF64_T 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi # should be part of TEA_CONFIG_CFLAGS, but more visible modification here #-------------------------------------------------------------------- # Set the default compiler switches based on the --enable-symbols option. #-------------------------------------------------------------------- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build with symbols" >&5 $as_echo_n "checking for build with symbols... " >&6; } # Check whether --enable-symbols was given. if test "${enable_symbols+set}" = set; then : enableval=$enable_symbols; tcl_ok=$enableval else tcl_ok=no fi DBGX="" if test "$tcl_ok" = "no"; then CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE}" LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else CFLAGS_DEFAULT="${CFLAGS_DEBUG}" LDFLAGS_DEFAULT="${LDFLAGS_DEBUG}" if test "$tcl_ok" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (standard debugging)" >&5 $as_echo "yes (standard debugging)" >&6; } fi fi # TEA specific: if test "${TEA_PLATFORM}" != "windows" ; then LDFLAGS_DEFAULT="${LDFLAGS}" fi if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then $as_echo "#define TCL_MEM_DEBUG 1" >>confdefs.h fi if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then if test "$tcl_ok" = "all"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled symbols mem debugging" >&5 $as_echo "enabled symbols mem debugging" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled $tcl_ok debugging" >&5 $as_echo "enabled $tcl_ok debugging" >&6; } fi fi #-------------------------------------------------------------------- # Everyone should be linking against the Tcl stub library. If you # can't for some reason, remove this definition. If you aren't using # stubs, you also need to modify the SHLIB_LD_LIBS setting below to # link against the non-stubbed Tcl library. Add Tk too if necessary. #-------------------------------------------------------------------- if test "${USE_STUBS}" = "1" ; then $as_echo "#define USE_TCL_STUBS 1" >>confdefs.h $as_echo "#define USE_TK_STUBS 1" >>confdefs.h fi #-------------------------------------------------------------------- # This macro generates a line to use when building a library. It # depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS, # and TEA_LOAD_TCLCONFIG macros above. #-------------------------------------------------------------------- if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then MAKE_STATIC_LIB="\${STLIB_LD} -out:\$@ \$(PKG_OBJECTS)" MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LD_LIBS} \${LDFLAGS_DEFAULT} -out:\$@ \$(PKG_OBJECTS)" MAKE_STUB_LIB="\${STLIB_LD} -out:\$@ \$(PKG_STUB_OBJECTS)" else MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(PKG_OBJECTS)" MAKE_SHARED_LIB="\${SHLIB_LD} -o \$@ \$(PKG_OBJECTS) \${SHLIB_LD_LIBS}" MAKE_STUB_LIB="\${STLIB_LD} \$@ \$(PKG_STUB_OBJECTS)" fi if test "${SHARED_BUILD}" = "1" ; then MAKE_LIB="${MAKE_SHARED_LIB} " else MAKE_LIB="${MAKE_STATIC_LIB} " fi #-------------------------------------------------------------------- # Shared libraries and static libraries have different names. # Use the double eval to make sure any variables in the suffix is # substituted. (@@@ Might not be necessary anymore) #-------------------------------------------------------------------- if test "${TEA_PLATFORM}" = "windows" ; then if test "${SHARED_BUILD}" = "1" ; then # We force the unresolved linking of symbols that are really in # the private libraries of Tcl and Tk. SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\"" if test x"${TK_BIN_DIR}" != x ; then SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\"" fi eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}" else eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}" fi # Some packages build their own stubs libraries eval eval "PKG_STUB_LIB_FILE=${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}" if test "$GCC" = "yes"; then PKG_STUB_LIB_FILE=lib${PKG_STUB_LIB_FILE} fi # These aren't needed on Windows (either MSVC or gcc) RANLIB=: RANLIB_STUB=: else RANLIB_STUB="${RANLIB}" if test "${SHARED_BUILD}" = "1" ; then SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}" if test x"${TK_BIN_DIR}" != x ; then SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}" fi eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${SHARED_LIB_SUFFIX}" RANLIB=: else eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}" fi # Some packages build their own stubs libraries eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}" fi # These are escaped so that only CFLAGS is picked up at configure time. # The other values will be substituted at make time. CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}" if test "${SHARED_BUILD}" = "1" ; then CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}" fi if test "${USE_STUBS}" = "0" ; then SHLIB_LD_LIBS=`echo "$SHLIB_LD_LIBS" | sed -e 's!stub!!g'` fi #-------------------------------------------------------------------- # Determine the name of the tclsh and/or wish executables in the # Tcl and Tk build directories or the location they were installed # into. These paths are used to support running test cases only, # the Makefile should not be making use of these paths to generate # a pkgIndex.tcl file or anything else at extension build time. #-------------------------------------------------------------------- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclsh" >&5 $as_echo_n "checking for tclsh... " >&6; } if test -f "${TCL_BIN_DIR}/Makefile" ; then # tclConfig.sh is in Tcl build directory if test "${TEA_PLATFORM}" = "windows"; then TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}" else TCLSH_PROG="${TCL_BIN_DIR}/tclsh" fi else # tclConfig.sh is in install location if test "${TEA_PLATFORM}" = "windows"; then TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}" else TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}${TCL_DBGX}" fi list="`ls -d ${TCL_BIN_DIR}/../bin 2>/dev/null` \ `ls -d ${TCL_BIN_DIR}/.. 2>/dev/null` \ `ls -d ${TCL_PREFIX}/bin 2>/dev/null`" for i in $list ; do if test -f "$i/${TCLSH_PROG}" ; then REAL_TCL_BIN_DIR="`cd "$i"; pwd`/" break fi done TCLSH_PROG="${REAL_TCL_BIN_DIR}${TCLSH_PROG}" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${TCLSH_PROG}" >&5 $as_echo "${TCLSH_PROG}" >&6; } #TEA_PROG_WISH #-------------------------------------------------------------------- # Finally, substitute all of the various values into the Makefile. # You may alternatively have a special pkgIndex.tcl.in or other files # which require substituting th AC variables in. Include these here. #-------------------------------------------------------------------- ac_config_files="$ac_config_files Makefile pkgIndex.tcl togl_ws.h" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that # take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. ac_script=' :mline /\\$/{ N s,\\\n,, b mline } t clear :clear s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote b any :quote s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g s/\[/\\&/g s/\]/\\&/g s/\$/$$/g H :any ${ g s/^\n// s/\n/ /g p } ' DEFS=`sed -n "$ac_script" confdefs.h` ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS="" : ${CONFIG_STATUS=./config.status} ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error ERROR [LINENO LOG_FD] # --------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with status $?, using 1 if that was 0. as_fn_error () { as_status=$?; test $as_status -eq 0 && as_status=1 if test "$3"; then as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 fi $as_echo "$as_me: error: $1" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by Togl $as_me 2.1, which was generated by GNU Autoconf 2.65. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE Configuration files: $config_files Report bugs to the package provider." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ Togl config.status 2.1 configured by $0, generated by GNU Autoconf 2.65, with options \\"\$ac_cs_config\\" Copyright (C) 2009 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --he | --h | --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "pkgIndex.tcl") CONFIG_FILES="$CONFIG_FILES pkgIndex.tcl" ;; "togl_ws.h") CONFIG_FILES="$CONFIG_FILES togl_ws.h" ;; *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ || as_fn_error "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/ s/:*\${srcdir}:*/:/ s/:*@srcdir@:*/:/ s/^\([^=]*=[ ]*\):*/\1/ s/:*$// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" eval set X " :F $CONFIG_FILES " shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ || as_fn_error "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit $? fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi netgen-6.2.1804/ng/Togl2.1/Xmu/0000755000175000017500000000000013272137567014310 5ustar kurtkurtnetgen-6.2.1804/ng/Togl2.1/Xmu/StdCmap.h0000644000175000017500000000577413272137567016031 0ustar kurtkurt/* $XConsortium: StdCmap.h,v 1.4 94/04/17 20:16:15 converse Exp $ */ /* Copyright (c) 1988 X Consortium Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of the X Consortium shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from the X Consortium. */ /* * The interfaces described by this header file are for miscellaneous utilities * and are not part of the Xlib standard. */ #ifndef _XMU_STDCMAP_H_ #define _XMU_STDCMAP_H_ #include _XFUNCPROTOBEGIN Status XmuAllStandardColormaps( #if NeedFunctionPrototypes Display* /* dpy */ #endif ); Status XmuCreateColormap( #if NeedFunctionPrototypes Display* /* dpy */, XStandardColormap* /* colormap */ #endif ); void XmuDeleteStandardColormap( #if NeedFunctionPrototypes Display* /* dpy */, int /* screen */, Atom /* property */ #endif ); Status XmuGetColormapAllocation( #if NeedFunctionPrototypes XVisualInfo* /* vinfo */, Atom /* property */, unsigned long* /* red_max_return */, unsigned long* /* green_max_return */, unsigned long* /* blue_max_return */ #endif ); Status XmuLookupStandardColormap( #if NeedFunctionPrototypes Display* /* dpy */, int /* screen */, VisualID /* visualid */, unsigned int /* depth */, Atom /* property */, Bool /* replace */, Bool /* retain */ #endif ); XStandardColormap *XmuStandardColormap( #if NeedFunctionPrototypes Display* /* dpy */, int /* screen */, VisualID /* visualid */, unsigned int /* depth */, Atom /* property */, Colormap /* cmap */, unsigned long /* red_max */, unsigned long /* green_max */, unsigned long /* blue_max */ #endif ); Status XmuVisualStandardColormaps( #if NeedFunctionPrototypes Display* /* dpy */, int /* screen */, VisualID /* visualid */, unsigned int /* depth */, Bool /* replace */, Bool /* retain */ #endif ); _XFUNCPROTOEND #endif /* _XMU_STDCMAP_H_ */ netgen-6.2.1804/ng/Togl2.1/Xmu/StdCmap.c0000644000175000017500000001577113272137567016022 0ustar kurtkurt/* $XConsortium: StdCmap.c,v 1.14 94/04/17 20:16:14 rws Exp $ */ /* Copyright (c) 1989 X Consortium Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of the X Consortium shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from the X Consortium. */ /* * Author: Donna Converse, MIT X Consortium */ #include #include #include #include #include #define lowbit(x) ((x) & (~(x) + 1)) static Status valid_args(); /* argument restrictions */ /* * To create any one standard colormap, use XmuStandardColormap(). * * Create a standard colormap for the given screen, visualid, and visual * depth, with the given red, green, and blue maximum values, with the * given standard property name. Return a pointer to an XStandardColormap * structure which describes the newly created colormap, upon success. * Upon failure, return NULL. * * XmuStandardColormap() calls XmuCreateColormap() to create the map. * * Resources created by this function are not made permanent; that is the * caller's responsibility. */ XStandardColormap *XmuStandardColormap(dpy, screen, visualid, depth, property, cmap, red_max, green_max, blue_max) Display *dpy; /* specifies X server connection */ int screen; /* specifies display screen */ VisualID visualid; /* identifies the visual type */ unsigned int depth; /* identifies the visual type */ Atom property; /* a standard colormap property */ Colormap cmap; /* specifies colormap ID or None */ unsigned long red_max, green_max, blue_max; /* allocations */ { XStandardColormap *stdcmap; Status status; XVisualInfo vinfo_template, *vinfo; long vinfo_mask; int n; /* Match the required visual information to an actual visual */ vinfo_template.visualid = visualid; vinfo_template.screen = screen; vinfo_template.depth = depth; vinfo_mask = VisualIDMask | VisualScreenMask | VisualDepthMask; if ((vinfo = XGetVisualInfo(dpy, vinfo_mask, &vinfo_template, &n)) == NULL) return 0; /* Check the validity of the combination of visual characteristics, * allocation, and colormap property. Create an XStandardColormap * structure. */ if (! valid_args(vinfo, red_max, green_max, blue_max, property) || ((stdcmap = XAllocStandardColormap()) == NULL)) { XFree((char *) vinfo); return 0; } /* Fill in the XStandardColormap structure */ if (cmap == DefaultColormap(dpy, screen)) { /* Allocating out of the default map, cannot use XFreeColormap() */ Window win = XCreateWindow(dpy, RootWindow(dpy, screen), 1, 1, 1, 1, 0, 0, InputOnly, vinfo->visual, (unsigned long) 0, (XSetWindowAttributes *)NULL); stdcmap->killid = (XID) XCreatePixmap(dpy, win, 1, 1, depth); XDestroyWindow(dpy, win); stdcmap->colormap = cmap; } else { stdcmap->killid = ReleaseByFreeingColormap; stdcmap->colormap = XCreateColormap(dpy, RootWindow(dpy, screen), vinfo->visual, AllocNone); } stdcmap->red_max = red_max; stdcmap->green_max = green_max; stdcmap->blue_max = blue_max; if (property == XA_RGB_GRAY_MAP) stdcmap->red_mult = stdcmap->green_mult = stdcmap->blue_mult = 1; else if (vinfo->class == TrueColor || vinfo->class == DirectColor) { stdcmap->red_mult = lowbit(vinfo->red_mask); stdcmap->green_mult = lowbit(vinfo->green_mask); stdcmap->blue_mult = lowbit(vinfo->blue_mask); } else { stdcmap->red_mult = (red_max > 0) ? (green_max + 1) * (blue_max + 1) : 0; stdcmap->green_mult = (green_max > 0) ? blue_max + 1 : 0; stdcmap->blue_mult = (blue_max > 0) ? 1 : 0; } stdcmap->base_pixel = 0; /* base pixel may change */ stdcmap->visualid = vinfo->visualid; /* Make the colormap */ status = XmuCreateColormap(dpy, stdcmap); /* Clean up */ XFree((char *) vinfo); if (!status) { /* Free the colormap or the pixmap, if we created one */ if (stdcmap->killid == ReleaseByFreeingColormap) XFreeColormap(dpy, stdcmap->colormap); else if (stdcmap->killid != None) XFreePixmap(dpy, stdcmap->killid); XFree((char *) stdcmap); return (XStandardColormap *) NULL; } return stdcmap; } /****************************************************************************/ static Status valid_args(vinfo, red_max, green_max, blue_max, property) XVisualInfo *vinfo; /* specifies visual */ unsigned long red_max, green_max, blue_max; /* specifies alloc */ Atom property; /* specifies property name */ { unsigned long ncolors; /* number of colors requested */ /* Determine that the number of colors requested is <= map size */ if ((vinfo->class == DirectColor) || (vinfo->class == TrueColor)) { unsigned long mask; mask = vinfo->red_mask; while (!(mask & 1)) mask >>= 1; if (red_max > mask) return 0; mask = vinfo->green_mask; while (!(mask & 1)) mask >>= 1; if (green_max > mask) return 0; mask = vinfo->blue_mask; while (!(mask & 1)) mask >>= 1; if (blue_max > mask) return 0; } else if (property == XA_RGB_GRAY_MAP) { ncolors = red_max + green_max + blue_max + 1; if (ncolors > vinfo->colormap_size) return 0; } else { ncolors = (red_max + 1) * (green_max + 1) * (blue_max + 1); if (ncolors > vinfo->colormap_size) return 0; } /* Determine that the allocation and visual make sense for the property */ switch (property) { case XA_RGB_DEFAULT_MAP: if (red_max == 0 || green_max == 0 || blue_max == 0) return 0; break; case XA_RGB_RED_MAP: if (red_max == 0) return 0; break; case XA_RGB_GREEN_MAP: if (green_max == 0) return 0; break; case XA_RGB_BLUE_MAP: if (blue_max == 0) return 0; break; case XA_RGB_BEST_MAP: if (red_max == 0 || green_max == 0 || blue_max == 0) return 0; break; case XA_RGB_GRAY_MAP: if (red_max == 0 || blue_max == 0 || green_max == 0) return 0; break; default: return 0; } return 1; } netgen-6.2.1804/ng/Togl2.1/Xmu/README.togl0000644000175000017500000000030213272137567016127 0ustar kurtkurtThe source code in this directory is a subset of the Jun 12, 1995 X11R6 Xmu library that is needed for the Togl widget. The Xmu library is no longer installed by default on many Linux systems. netgen-6.2.1804/ng/Togl2.1/Xmu/DelCmap.c0000644000175000017500000000470313272137567015765 0ustar kurtkurt/* $XConsortium: DelCmap.c,v 1.2 94/04/17 20:15:58 converse Exp $ */ /* Copyright (c) 1989 X Consortium Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of the X Consortium shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from the X Consortium. */ /* * Author: Donna Converse, MIT X Consortium */ #include #include /* To remove any standard colormap property, use XmuDeleteStandardColormap(). * XmuDeleteStandardColormap() will remove the specified property from the * specified screen, releasing any resources used by the colormap(s) of the * property if possible. */ void XmuDeleteStandardColormap(dpy, screen, property) Display *dpy; /* specifies the X server to connect to */ int screen; /* specifies the screen of the display */ Atom property; /* specifies the standard colormap property */ { XStandardColormap *stdcmaps, *s; int count = 0; if (XGetRGBColormaps(dpy, RootWindow(dpy, screen), &stdcmaps, &count, property)) { for (s=stdcmaps; count > 0; count--, s++) { if ((s->killid == ReleaseByFreeingColormap) && (s->colormap != None) && (s->colormap != DefaultColormap(dpy, screen))) XFreeColormap(dpy, s->colormap); else if (s->killid != None) XKillClient(dpy, s->killid); } XDeleteProperty(dpy, RootWindow(dpy, screen), property); XFree((char *) stdcmaps); XSync(dpy, False); } } netgen-6.2.1804/ng/Togl2.1/Xmu/CrCmap.c0000644000175000017500000004171013272137567015624 0ustar kurtkurt/* $XConsortium: CrCmap.c,v 1.6 94/04/17 20:15:53 rws Exp $ */ /* Copyright (c) 1989 X Consortium Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of the X Consortium shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from the X Consortium. */ /* * Author: Donna Converse, MIT X Consortium */ /* * CreateCmap.c - given a standard colormap description, make the map. */ #include #include #include #include static int ROmap(); /* allocate entire map Read Only */ static Status ROorRWcell(); /* allocate a cell, prefer Read Only */ static Status RWcell(); /* allocate a cell Read Write */ static int compare(); /* for quicksort */ static Status contiguous(); /* find contiguous sequence of cells */ static void free_cells(); /* frees resources before quitting */ static Status readonly_map(); /* create a map in a RO visual type */ static Status readwrite_map(); /* create a map in a RW visual type */ #define lowbit(x) ((x) & (~(x) + 1)) #define TRUEMATCH(mult,max,mask) \ (colormap->max * colormap->mult <= vinfo->mask && \ lowbit(vinfo->mask) == colormap->mult) /* * To create any one colormap which is described by an XStandardColormap * structure, use XmuCreateColormap(). * * Return 0 on failure, non-zero on success. * Resources created by this function are not made permanent. * No argument error checking is provided. Use at your own risk. * * All colormaps are created with read only allocations, with the exception * of read only allocations of colors in the default map or otherwise * which fail to return the expected pixel value, and these are individually * defined as read/write allocations. This is done so that all the cells * defined in the default map are contiguous, for use in image processing. * This typically happens with White and Black in the default map. * * Colormaps of static visuals are considered to be successfully created if * the map of the static visual matches the definition given in the * standard colormap structure. */ Status XmuCreateColormap(dpy, colormap) Display *dpy; /* specifies the connection under * which the map is created */ XStandardColormap *colormap; /* specifies the map to be created, * and returns, particularly if the * map is created as a subset of the * default colormap of the screen, * the base_pixel of the map. */ { XVisualInfo vinfo_template; /* template visual information */ XVisualInfo *vinfo; /* matching visual information */ XVisualInfo *vpointer; /* for freeing the entire list */ long vinfo_mask; /* specifies the visual mask value */ int n; /* number of matching visuals */ int status; vinfo_template.visualid = colormap->visualid; vinfo_mask = VisualIDMask; if ((vinfo = XGetVisualInfo(dpy, vinfo_mask, &vinfo_template, &n)) == NULL) return 0; /* A visual id may be valid on multiple screens. Also, there may * be multiple visuals with identical visual ids at different depths. * If the colormap is the Default Colormap, use the Default Visual. * Otherwise, arbitrarily, use the deepest visual. */ vpointer = vinfo; if (n > 1) { register int i; register int screen_number; Bool def_cmap; def_cmap = False; for (screen_number = ScreenCount(dpy); --screen_number >= 0; ) if (colormap->colormap == DefaultColormap(dpy, screen_number)) { def_cmap = True; break; } if (def_cmap) { for (i=0; i < n; i++, vinfo++) { if (vinfo->visual == DefaultVisual(dpy, screen_number)) break; } } else { unsigned int maxdepth = 0; XVisualInfo *v; for (i=0; i < n; i++, vinfo++) if (vinfo->depth > maxdepth) { maxdepth = vinfo->depth; v = vinfo; } vinfo = v; } } if (vinfo->class == PseudoColor || vinfo->class == DirectColor || vinfo->class == GrayScale) status = readwrite_map(dpy, vinfo, colormap); else if (vinfo->class == TrueColor) status = TRUEMATCH(red_mult, red_max, red_mask) && TRUEMATCH(green_mult, green_max, green_mask) && TRUEMATCH(blue_mult, blue_max, blue_mask); else status = readonly_map(dpy, vinfo, colormap); XFree((char *) vpointer); return status; } /****************************************************************************/ static Status readwrite_map(dpy, vinfo, colormap) Display *dpy; XVisualInfo *vinfo; XStandardColormap *colormap; { register unsigned long i, n; /* index counters */ int ncolors; /* number of colors to be defined */ int npixels; /* number of pixels allocated R/W */ int first_index; /* first index of pixels to use */ int remainder; /* first index of remainder */ XColor color; /* the definition of a color */ unsigned long *pixels; /* array of colormap pixels */ unsigned long delta; /* Determine ncolors, the number of colors to be defined. * Insure that 1 < ncolors <= the colormap size. */ if (vinfo->class == DirectColor) { ncolors = colormap->red_max; if (colormap->green_max > ncolors) ncolors = colormap->green_max; if (colormap->blue_max > ncolors) ncolors = colormap->blue_max; ncolors++; delta = lowbit(vinfo->red_mask) + lowbit(vinfo->green_mask) + lowbit(vinfo->blue_mask); } else { ncolors = colormap->red_max * colormap->red_mult + colormap->green_max * colormap->green_mult + colormap->blue_max * colormap->blue_mult + 1; delta = 1; } if (ncolors <= 1 || ncolors > vinfo->colormap_size) return 0; /* Allocate Read/Write as much of the colormap as we can possibly get. * Then insure that the pixels we were allocated are given in * monotonically increasing order, using a quicksort. Next, insure * that our allocation includes a subset of contiguous pixels at least * as long as the number of colors to be defined. Now we know that * these conditions are met: * 1) There are no free cells in the colormap. * 2) We have a contiguous sequence of pixels, monotonically * increasing, of length >= the number of colors requested. * * One cell at a time, we will free, compute the next color value, * then allocate read only. This takes a long time. * This is done to insure that cells are allocated read only in the * contiguous order which we prefer. If the server has a choice of * cells to grant to an allocation request, the server may give us any * cell, so that is why we do these slow gymnastics. */ if ((pixels = (unsigned long *) calloc((unsigned) vinfo->colormap_size, sizeof(unsigned long))) == NULL) return 0; if ((npixels = ROmap(dpy, colormap->colormap, pixels, vinfo->colormap_size, ncolors)) == 0) { free((char *) pixels); return 0; } qsort((char *) pixels, npixels, sizeof(unsigned long), compare); if (!contiguous(pixels, npixels, ncolors, delta, &first_index, &remainder)) { /* can't find enough contiguous cells, give up */ XFreeColors(dpy, colormap->colormap, pixels, npixels, (unsigned long) 0); free((char *) pixels); return 0; } colormap->base_pixel = pixels[first_index]; /* construct a gray map */ if (colormap->red_mult == 1 && colormap->green_mult == 1 && colormap->blue_mult == 1) for (n=colormap->base_pixel, i=0; i < ncolors; i++, n += delta) { color.pixel = n; color.blue = color.green = color.red = (unsigned short) ((i * 65535) / (colormap->red_max + colormap->green_max + colormap->blue_max)); if (! ROorRWcell(dpy, colormap->colormap, pixels, npixels, &color, first_index + i)) return 0; } /* construct a red ramp map */ else if (colormap->green_max == 0 && colormap->blue_max == 0) for (n=colormap->base_pixel, i=0; i < ncolors; i++, n += delta) { color.pixel = n; color.red = (unsigned short) ((i * 65535) / colormap->red_max); color.green = color.blue = 0; if (! ROorRWcell(dpy, colormap->colormap, pixels, npixels, &color, first_index + i)) return 0; } /* construct a green ramp map */ else if (colormap->red_max == 0 && colormap->blue_max == 0) for (n=colormap->base_pixel, i=0; i < ncolors; i++, n += delta) { color.pixel = n; color.green = (unsigned short) ((i * 65535) / colormap->green_max); color.red = color.blue = 0; if (! ROorRWcell(dpy, colormap->colormap, pixels, npixels, &color, first_index + i)) return 0; } /* construct a blue ramp map */ else if (colormap->red_max == 0 && colormap->green_max == 0) for (n=colormap->base_pixel, i=0; i < ncolors; i++, n += delta) { color.pixel = n; color.blue = (unsigned short) ((i * 65535) / colormap->blue_max); color.red = color.green = 0; if (! ROorRWcell(dpy, colormap->colormap, pixels, npixels, &color, first_index + i)) return 0; } /* construct a standard red green blue cube map */ else { #define calc(max,mult) (((n / colormap->mult) % \ (colormap->max + 1)) * 65535) / colormap->max for (n=0, i=0; i < ncolors; i++, n += delta) { color.pixel = n + colormap->base_pixel; color.red = calc(red_max, red_mult); color.green = calc(green_max, green_mult); color.blue = calc(blue_max, blue_mult); if (! ROorRWcell(dpy, colormap->colormap, pixels, npixels, &color, first_index + i)) return 0; } #undef calc } /* We have a read-only map defined. Now free unused cells, * first those occurring before the contiguous sequence begins, * then any following the contiguous sequence. */ if (first_index) XFreeColors(dpy, colormap->colormap, pixels, first_index, (unsigned long) 0); if (remainder) XFreeColors(dpy, colormap->colormap, &(pixels[first_index + ncolors]), remainder, (unsigned long) 0); free((char *) pixels); return 1; } /****************************************************************************/ static int ROmap(dpy, cmap, pixels, m, n) Display *dpy; /* the X server connection */ Colormap cmap; /* specifies colormap ID */ unsigned long pixels[]; /* returns pixel allocations */ int m; /* specifies colormap size */ int n; /* specifies number of colors */ { register int p; /* first try to allocate the entire colormap */ if (XAllocColorCells(dpy, cmap, 1, (unsigned long *) NULL, (unsigned) 0, pixels, (unsigned) m)) return m; /* Allocate all available cells in the colormap, using a binary * algorithm to discover how many cells we can allocate in the colormap. */ m--; while (n <= m) { p = n + ((m - n + 1) / 2); if (XAllocColorCells(dpy, cmap, 1, (unsigned long *) NULL, (unsigned) 0, pixels, (unsigned) p)) { if (p == m) return p; else { XFreeColors(dpy, cmap, pixels, p, (unsigned long) 0); n = p; } } else m = p - 1; } return 0; } /****************************************************************************/ static Status contiguous(pixels, npixels, ncolors, delta, first, rem) unsigned long pixels[]; /* specifies allocated pixels */ int npixels; /* specifies count of alloc'd pixels */ int ncolors; /* specifies needed sequence length */ unsigned long delta; /* between pixels */ int *first; /* returns first index of sequence */ int *rem; /* returns first index after sequence, * or 0, if none follow */ { register int i = 1; /* walking index into the pixel array */ register int count = 1; /* length of sequence discovered so far */ *first = 0; if (npixels == ncolors) { *rem = 0; return 1; } *rem = npixels - 1; while (count < ncolors && ncolors - count <= *rem) { if (pixels[i-1] + delta == pixels[i]) count++; else { count = 1; *first = i; } i++; (*rem)--; } if (count != ncolors) return 0; return 1; } /****************************************************************************/ static Status ROorRWcell(dpy, cmap, pixels, npixels, color, p) Display *dpy; Colormap cmap; unsigned long pixels[]; int npixels; XColor *color; unsigned long p; { unsigned long pixel; XColor request; /* Free the read/write allocation of one cell in the colormap. * Request a read only allocation of one cell in the colormap. * If the read only allocation cannot be granted, give up, because * there must be no free cells in the colormap. * If the read only allocation is granted, but gives us a cell which * is not the one that we just freed, it is probably the case that * we are trying allocate White or Black or some other color which * already has a read-only allocation in the map. So we try to * allocate the previously freed cell with a read/write allocation, * because we want contiguous cells for image processing algorithms. */ pixel = color->pixel; request.red = color->red; request.green = color->green; request.blue = color->blue; XFreeColors(dpy, cmap, &pixel, 1, (unsigned long) 0); if (! XAllocColor(dpy, cmap, color) || (color->pixel != pixel && (!RWcell(dpy, cmap, color, &request, &pixel)))) { free_cells(dpy, cmap, pixels, npixels, (int)p); return 0; } return 1; } /****************************************************************************/ static void free_cells(dpy, cmap, pixels, npixels, p) Display *dpy; Colormap cmap; unsigned long pixels[]; /* to be freed */ int npixels; /* original number allocated */ int p; { /* One of the npixels allocated has already been freed. * p is the index of the freed pixel. * First free the pixels preceding p, and there are p of them; * then free the pixels following p, there are npixels - p - 1 of them. */ XFreeColors(dpy, cmap, pixels, p, (unsigned long) 0); XFreeColors(dpy, cmap, &(pixels[p+1]), npixels - p - 1, (unsigned long) 0); free((char *) pixels); } /****************************************************************************/ static Status RWcell(dpy, cmap, color, request, pixel) Display *dpy; Colormap cmap; XColor *color; XColor *request; unsigned long *pixel; { unsigned long n = *pixel; XFreeColors(dpy, cmap, &(color->pixel), 1, (unsigned long)0); if (! XAllocColorCells(dpy, cmap, (Bool) 0, (unsigned long *) NULL, (unsigned) 0, pixel, (unsigned) 1)) return 0; if (*pixel != n) { XFreeColors(dpy, cmap, pixel, 1, (unsigned long) 0); return 0; } color->pixel = *pixel; color->flags = DoRed | DoGreen | DoBlue; color->red = request->red; color->green = request->green; color->blue = request->blue; XStoreColors(dpy, cmap, color, 1); return 1; } /****************************************************************************/ static int compare(e1, e2) unsigned long *e1, *e2; { if (*e1 < *e2) return -1; if (*e1 > *e2) return 1; return 0; } /****************************************************************************/ static Status readonly_map(dpy, vinfo, colormap) Display *dpy; XVisualInfo *vinfo; XStandardColormap *colormap; { int i, last_pixel; XColor color; last_pixel = (colormap->red_max + 1) * (colormap->green_max + 1) * (colormap->blue_max + 1) + colormap->base_pixel - 1; for(i=colormap->base_pixel; i <= last_pixel; i++) { color.pixel = (unsigned long) i; color.red = (unsigned short) (((i/colormap->red_mult) * 65535) / colormap->red_max); if (vinfo->class == StaticColor) { color.green = (unsigned short) ((((i/colormap->green_mult) % (colormap->green_max + 1)) * 65535) / colormap->green_max); color.blue = (unsigned short) (((i%colormap->green_mult) * 65535) / colormap->blue_max); } else /* vinfo->class == GrayScale, old style allocation XXX */ color.green = color.blue = color.red; XAllocColor(dpy, colormap->colormap, &color); if (color.pixel != (unsigned long) i) return 0; } return 1; } netgen-6.2.1804/ng/Togl2.1/Xmu/LookupCmap.c0000644000175000017500000002423213272137567016531 0ustar kurtkurt/* $XConsortium: LookupCmap.c,v 1.10 94/04/17 20:16:11 rws Exp $ */ /* Copyright (c) 1989 X Consortium Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of the X Consortium shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from the X Consortium. */ /* * Author: Donna Converse, MIT X Consortium */ #include #include #include #include #include #include static Status lookup(); /* * To create a standard colormap if one does not currently exist, or * replace the currently existing standard colormap, use * XmuLookupStandardColormap(). * * Given a screen, a visual, and a property, XmuLookupStandardColormap() * will determine the best allocation for the property under the specified * visual, and determine the whether to create a new colormap or to use * the default colormap of the screen. It will call XmuStandardColormap() * to create the standard colormap. * * If replace is true, any previous definition of the property will be * replaced. If retain is true, the property and the colormap will be * made permanent for the duration of the server session. However, * pre-existing property definitions which are not replaced cannot be made * permanent by a call to XmuLookupStandardColormap(); a request to retain * resources pertains to newly created resources. * * Returns 0 on failure, non-zero on success. A request to create a * standard colormap upon a visual which cannot support such a map is * considered a failure. An example of this would be requesting any * standard colormap property on a monochrome visual, or, requesting an * RGB_BEST_MAP on a display whose colormap size is 16. */ Status XmuLookupStandardColormap(dpy, screen, visualid, depth, property, replace, retain) Display *dpy; /* specifies X server connection */ int screen; /* specifies screen of display */ VisualID visualid; /* specifies the visual type */ unsigned int depth; /* specifies the visual type */ Atom property; /* a standard colormap property */ Bool replace; /* specifies whether to replace */ Bool retain; /* specifies whether to retain */ { Display *odpy; /* original display connection */ XStandardColormap *colormap; XVisualInfo vinfo_template, *vinfo; /* visual */ long vinfo_mask; unsigned long r_max, g_max, b_max; /* allocation */ int count; Colormap cmap; /* colormap ID */ Status status = 0; /* Match the requested visual */ vinfo_template.visualid = visualid; vinfo_template.screen = screen; vinfo_template.depth = depth; vinfo_mask = VisualIDMask | VisualScreenMask | VisualDepthMask; if ((vinfo = XGetVisualInfo(dpy, vinfo_mask, &vinfo_template, &count)) == NULL) return 0; /* Monochrome visuals have no standard maps */ if (vinfo->colormap_size <= 2) { XFree((char *) vinfo); return 0; } /* If the requested property already exists on this screen, and, * if the replace flag has not been set to true, return success. * lookup() will remove a pre-existing map if replace is true. */ if (lookup(dpy, screen, visualid, property, (XStandardColormap *) NULL, replace) && !replace) { XFree((char *) vinfo); return 1; } /* Determine the best allocation for this property under the requested * visualid and depth, and determine whether or not to use the default * colormap of the screen. */ if (!XmuGetColormapAllocation(vinfo, property, &r_max, &g_max, &b_max)) { XFree((char *) vinfo); return 0; } cmap = (property == XA_RGB_DEFAULT_MAP && visualid == XVisualIDFromVisual(DefaultVisual(dpy, screen))) ? DefaultColormap(dpy, screen) : None; /* If retaining resources, open a new connection to the same server */ if (retain) { odpy = dpy; if ((dpy = XOpenDisplay(XDisplayString(odpy))) == NULL) { XFree((char *) vinfo); return 0; } } /* Create the standard colormap */ colormap = XmuStandardColormap(dpy, screen, visualid, depth, property, cmap, r_max, g_max, b_max); /* Set the standard colormap property */ if (colormap) { XGrabServer(dpy); if (lookup(dpy, screen, visualid, property, colormap, replace) && !replace) { /* Someone has defined the property since we last looked. * Since we will not replace it, release our own resources. * If this is the default map, our allocations will be freed * when this connection closes. */ if (colormap->killid == ReleaseByFreeingColormap) XFreeColormap(dpy, colormap->colormap); } else if (retain) { XSetCloseDownMode(dpy, RetainPermanent); } XUngrabServer(dpy); XFree((char *) colormap); status = 1; } if (retain) XCloseDisplay(dpy); XFree((char *) vinfo); return status; } /***************************************************************************/ /* Lookup a standard colormap property. If the property is RGB_DEFAULT_MAP, * the visualid is used to determine whether the indicated standard colormap * exists. If the map exists and replace is true, delete the resources used * by the map and remove the property. Return true if the map exists, * or did exist and was deleted; return false if the map was not found. * * Note that this is not the way that a Status return is normally used. * * If new is not NULL, new points to an XStandardColormap structure which * describes a standard colormap of the specified property. It will be made * a standard colormap of the screen if none already exists, or if replace * is true. */ static Status lookup(dpy, screen, visualid, property, new, replace) Display *dpy; /* specifies display connection */ int screen; /* specifies screen number */ VisualID visualid; /* specifies visualid for std map */ Atom property; /* specifies colormap property name */ XStandardColormap *new; /* specifies a standard colormap */ Bool replace; /* specifies whether to replace */ { register int i; int count; XStandardColormap *stdcmaps, *s; Window win = RootWindow(dpy, screen); /* The property does not already exist */ if (! XGetRGBColormaps(dpy, win, &stdcmaps, &count, property)) { if (new) XSetRGBColormaps(dpy, win, new, 1, property); return 0; } /* The property exists and is not describing the RGB_DEFAULT_MAP */ if (property != XA_RGB_DEFAULT_MAP) { if (replace) { XmuDeleteStandardColormap(dpy, screen, property); if (new) XSetRGBColormaps(dpy, win, new, 1, property); } XFree((char *)stdcmaps); return 1; } /* The property exists and is RGB_DEFAULT_MAP */ for (i=0, s=stdcmaps; (i < count) && (s->visualid != visualid); i++, s++) ; /* No RGB_DEFAULT_MAP property matches the given visualid */ if (i == count) { if (new) { XStandardColormap *m, *maps; s = (XStandardColormap *) malloc((unsigned) ((count+1) * sizeof (XStandardColormap))); for (i = 0, m = s, maps = stdcmaps; i < count; i++, m++, maps++) { m->colormap = maps->colormap; m->red_max = maps->red_max; m->red_mult = maps->red_mult; m->green_max = maps->green_max; m->green_mult = maps->green_mult; m->blue_max = maps->blue_max; m->blue_mult = maps->blue_mult; m->base_pixel = maps->base_pixel; m->visualid = maps->visualid; m->killid = maps->killid; } m->colormap = new->colormap; m->red_max = new->red_max; m->red_mult = new->red_mult; m->green_max = new->green_max; m->green_mult = new->green_mult; m->blue_max = new->blue_max; m->blue_mult = new->blue_mult; m->base_pixel = new->base_pixel; m->visualid = new->visualid; m->killid = new->killid; XSetRGBColormaps(dpy, win, s, ++count, property); free((char *) s); } XFree((char *) stdcmaps); return 0; } /* Found an RGB_DEFAULT_MAP property with a matching visualid */ if (replace) { /* Free old resources first - we may need them, particularly in * the default colormap of the screen. However, because of this, * it is possible that we will destroy the old resource and fail * to create a new one if XmuStandardColormap() fails. */ if (count == 1) { XmuDeleteStandardColormap(dpy, screen, property); if (new) XSetRGBColormaps(dpy, win, new, 1, property); } else { XStandardColormap *map; /* s still points to the matching standard colormap */ if (s->killid == ReleaseByFreeingColormap) { if ((s->colormap != None) && (s->colormap != DefaultColormap(dpy, screen))) XFreeColormap(dpy, s->colormap); } else if (s->killid != None) XKillClient(dpy, s->killid); map = (new) ? new : stdcmaps + --count; s->colormap = map->colormap; s->red_max = map->red_max; s->red_mult = map->red_mult; s->green_max = map->green_max; s->green_mult = map->green_mult; s->blue_max = map->blue_max; s->blue_mult = map->blue_mult; s->visualid = map->visualid; s->killid = map->killid; XSetRGBColormaps(dpy, win, stdcmaps, count, property); } } XFree((char *) stdcmaps); return 1; } netgen-6.2.1804/ng/Togl2.1/Xmu/CmapAlloc.c0000644000175000017500000002235013272137567016311 0ustar kurtkurt/* $XConsortium: CmapAlloc.c,v 1.9 94/04/17 20:15:52 rws Exp $ */ /* Copyright (c) 1989, 1994 X Consortium Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of the X Consortium shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from the X Consortium. */ /* * Author: Donna Converse, MIT X Consortium */ #include #include #include #include #define lowbit(x) ((x) & (~(x) + 1)) static int default_allocation(); static void best_allocation(); static void gray_allocation(); static int icbrt(); static int icbrt_with_bits(); static int icbrt_with_guess(); /* To determine the best allocation of reds, greens, and blues in a * standard colormap, use XmuGetColormapAllocation. * vinfo specifies visual information for a chosen visual * property specifies one of the standard colormap property names * red_max returns maximum red value * green_max returns maximum green value * blue_max returns maximum blue value * * XmuGetColormapAllocation returns 0 on failure, non-zero on success. * It is assumed that the visual is appropriate for the colormap property. */ Status XmuGetColormapAllocation(vinfo, property, red_max, green_max, blue_max) XVisualInfo *vinfo; Atom property; unsigned long *red_max, *green_max, *blue_max; { Status status = 1; if (vinfo->colormap_size <= 2) return 0; switch (property) { case XA_RGB_DEFAULT_MAP: status = default_allocation(vinfo, red_max, green_max, blue_max); break; case XA_RGB_BEST_MAP: best_allocation(vinfo, red_max, green_max, blue_max); break; case XA_RGB_GRAY_MAP: gray_allocation(vinfo->colormap_size, red_max, green_max, blue_max); break; case XA_RGB_RED_MAP: *red_max = vinfo->colormap_size - 1; *green_max = *blue_max = 0; break; case XA_RGB_GREEN_MAP: *green_max = vinfo->colormap_size - 1; *red_max = *blue_max = 0; break; case XA_RGB_BLUE_MAP: *blue_max = vinfo->colormap_size - 1; *red_max = *green_max = 0; break; default: status = 0; } return status; } /****************************************************************************/ /* Determine the appropriate color allocations of a gray scale. * * Keith Packard, MIT X Consortium */ static void gray_allocation(n, red_max, green_max, blue_max) int n; /* the number of cells of the gray scale */ unsigned long *red_max, *green_max, *blue_max; { *red_max = (n * 30) / 100; *green_max = (n * 59) / 100; *blue_max = (n * 11) / 100; *green_max += ((n - 1) - (*red_max + *green_max + *blue_max)); } /****************************************************************************/ /* Determine an appropriate color allocation for the RGB_DEFAULT_MAP. * If a map has less than a minimum number of definable entries, we do not * produce an allocation for an RGB_DEFAULT_MAP. * * For 16 planes, the default colormap will have 27 each RGB; for 12 planes, * 12 each. For 8 planes, let n = the number of colormap entries, which may * be 256 or 254. Then, maximum red value = floor(cube_root(n - 125)) - 1. * Maximum green and maximum blue values are identical to maximum red. * This leaves at least 125 cells which clients can allocate. * * Return 0 if an allocation has been determined, non-zero otherwise. */ static int default_allocation(vinfo, red, green, blue) XVisualInfo *vinfo; unsigned long *red, *green, *blue; { int ngrays; /* number of gray cells */ switch (vinfo->class) { case PseudoColor: if (vinfo->colormap_size > 65000) /* intended for displays with 16 planes */ *red = *green = *blue = (unsigned long) 27; else if (vinfo->colormap_size > 4000) /* intended for displays with 12 planes */ *red = *green = *blue = (unsigned long) 12; else if (vinfo->colormap_size < 250) return 0; else /* intended for displays with 8 planes */ *red = *green = *blue = (unsigned long) (icbrt(vinfo->colormap_size - 125) - 1); break; case DirectColor: if (vinfo->colormap_size < 10) return 0; *red = *green = *blue = vinfo->colormap_size / 2 - 1; break; case TrueColor: *red = vinfo->red_mask / lowbit(vinfo->red_mask); *green = vinfo->green_mask / lowbit(vinfo->green_mask); *blue = vinfo->blue_mask / lowbit(vinfo->blue_mask); break; case GrayScale: if (vinfo->colormap_size > 65000) ngrays = 4096; else if (vinfo->colormap_size > 4000) ngrays = 512; else if (vinfo->colormap_size < 250) return 0; else ngrays = 12; gray_allocation(ngrays, red, green, blue); break; default: return 0; } return 1; } /****************************************************************************/ /* Determine an appropriate color allocation for the RGB_BEST_MAP. * * For a DirectColor or TrueColor visual, the allocation is determined * by the red_mask, green_mask, and blue_mask members of the visual info. * * Otherwise, if the colormap size is an integral power of 2, determine * the allocation according to the number of bits given to each color, * with green getting more than red, and red more than blue, if there * are to be inequities in the distribution. If the colormap size is * not an integral power of 2, let n = the number of colormap entries. * Then maximum red value = floor(cube_root(n)) - 1; * maximum blue value = floor(cube_root(n)) - 1; * maximum green value = n / ((# red values) * (# blue values)) - 1; * Which, on a GPX, allows for 252 entries in the best map, out of 254 * defineable colormap entries. */ static void best_allocation(vinfo, red, green, blue) XVisualInfo *vinfo; unsigned long *red, *green, *blue; { if (vinfo->class == DirectColor || vinfo->class == TrueColor) { *red = vinfo->red_mask; while ((*red & 01) == 0) *red >>= 1; *green = vinfo->green_mask; while ((*green & 01) == 0) *green >>=1; *blue = vinfo->blue_mask; while ((*blue & 01) == 0) *blue >>= 1; } else { register int bits, n; /* Determine n such that n is the least integral power of 2 which is * greater than or equal to the number of entries in the colormap. */ n = 1; bits = 0; while (vinfo->colormap_size > n) { n = n << 1; bits++; } /* If the number of entries in the colormap is a power of 2, determine * the allocation by "dealing" the bits, first to green, then red, then * blue. If not, find the maximum integral red, green, and blue values * which, when multiplied together, do not exceed the number of * colormap entries. */ if (n == vinfo->colormap_size) { register int r, g, b; b = bits / 3; g = b + ((bits % 3) ? 1 : 0); r = b + (((bits % 3) == 2) ? 1 : 0); *red = 1 << r; *green = 1 << g; *blue = 1 << b; } else { *red = icbrt_with_bits(vinfo->colormap_size, bits); *blue = *red; *green = (vinfo->colormap_size / ((*red) * (*blue))); } (*red)--; (*green)--; (*blue)--; } return; } /* * integer cube roots by Newton's method * * Stephen Gildea, MIT X Consortium, July 1991 */ static int icbrt(a) /* integer cube root */ int a; { register int bits = 0; register unsigned n = a; while (n) { bits++; n >>= 1; } return icbrt_with_bits(a, bits); } static int icbrt_with_bits(a, bits) int a; int bits; /* log 2 of a */ { return icbrt_with_guess(a, a>>2*bits/3); } #ifdef _X_ROOT_STATS int icbrt_loopcount; #endif /* Newton's Method: x_n+1 = x_n - ( f(x_n) / f'(x_n) ) */ /* for cube roots, x^3 - a = 0, x_new = x - 1/3 (x - a/x^2) */ /* * Quick and dirty cube roots. Nothing fancy here, just Newton's method. * Only works for positive integers (since that's all we need). * We actually return floor(cbrt(a)) because that's what we need here, too. */ static int icbrt_with_guess(a, guess) int a, guess; { register int delta; #ifdef _X_ROOT_STATS icbrt_loopcount = 0; #endif if (a <= 0) return 0; if (guess < 1) guess = 1; do { #ifdef _X_ROOT_STATS icbrt_loopcount++; #endif delta = (guess - a/(guess*guess))/3; #ifdef DEBUG printf("pass %d: guess=%d, delta=%d\n", icbrt_loopcount, guess, delta); #endif guess -= delta; } while (delta != 0); if (guess*guess*guess > a) guess--; return guess; } netgen-6.2.1804/ng/Togl2.1/doc/0000755000175000017500000000000013272137567014304 5ustar kurtkurtnetgen-6.2.1804/ng/Togl2.1/doc/tclapi.html0000644000175000017500000005400613272137567016453 0ustar kurtkurt Togl Tcl API

Togl Tcl API

Contents


Togl Tcl command

The togl command creates a new Tk widget, a Tcl command, whose name is pathName. This command may be used to invoke various operations on the widget.

togl pathName [options]
If no options are given, a 400 by 400 pixel RGB window is created. This command may be used to invoke various operations on the widget.

Togl widget commands

The following commands are possible for an existing togl widget:

Configuration commands

pathName cget -option
Return current value of given configuration option.
pathName configure
pathName configure -option
If no option is given, then return information about all configuration options. Otherwise, return configuration information for given option. All configuration information consists of five values: the configuration option name, the option database name, the option database class, the default value, and the current value.
pathName configure -option value
Reconfigure a Togl widget. option may be any one of the options listed below.
pathName contexttag
Returns an integer that represents the context tag. All Togl widgets with the same context tag share display lists.

Extensions command

pathName extensions
Returns a list of OpenGL extensions available. For example:

if {[lsearch [pathName extensions] GL_EXT_bgra] != -1]} {
    ....
}
would check if the GL_EXT_bgra extension were supported.

Rendering commands

pathName postredisplay
Cause the displaycommand callback to be called the next time the event loop is idle.
pathName render
Causes the displaycommand callback to be called for pathName.
pathName swapbuffers
Causes front/back buffers to be swapped if in double buffer mode. And flushs the OpenGL command buffer if in single buffer mode. (So this is appropriate to call after every frame is drawn.)
pathName makecurrent
Make the widget specified by pathName and its OpenGL context the current ones. This is implicitly called before any callback command is invoked.
pathName copycontextto toPathName mask
Copy a subset of the OpenGL context state from pathName to toPathName according the given mask. The mask is an integer corresponding to the same values as glPushAttrib.

Image commands

pathName takephoto imagename
Copy the contents of the togl window into the given Tk photo image. Transparency values are copied and should be fully opaque for windows without alpha bitplanes.

Font commands

These functions provide an interface to the simple bitmap font capabilities that every OpenGL implementation provides. Better font support is found in other packages, e.g., Tcl3D or with different C APIs.

pathName loadbitmapfont font
font can be any of font descriptions listed in the Tk font command. It returns a togl font object.
pathName unloadbitmapfont toglfont
Releases the OpenGL resources needed by the toglfont.
pathName write toglfont [-pos xyzw] [-color rgba] string
Write the given string in the given toglfont, optionally at a particular position, xyzw and color, rgba. xyzw is either a 2, 3, or 4 element list of numbers. rgba is either a 3 or 4 element list of numbers.

Overlay Commands

pathName uselayer layer
This is a variation on the makecurrent command that makes the overlay OpenGL context current if layer is 2 and makes the normal OpenGL context current if layer is 1.
pathName showoverlay
Turn on drawing in the overlay planes.
pathName hideoverlay
Turn off drawing in the overlay planes.
pathName postredisplayoverlay
Cause the overlay OpenGL context to be redrawn the next time the Tcl event loop is idle.
pathName renderoverlay
Causes the overlaydisplaycommand callback to be called for pathName.
pathName existsoverlay
Return true if togl widget has overlay planes.
pathName ismappedoverlay
Return true if overlay planes are shown.
pathName getoverlaytransparentvalue
Return overlay plane's transparent pixel value.

OpenGL (Stereo) Commands

These commands exist to support stereo rendering. Just replace select OpenGL calls with the Togl versions and stereo rendering will magically work. And don't forget to update the stereo options.
pathName drawbuffer mode
Replaces calls to glDrawBuffer. The mode is an integer.
pathName clear mask
Replaces calls to glClear. The mask is an integer.
pathName frustum left right bottom top near far
Replaces calls to glFrustum.
pathName ortho left right bottom top near far
Replaces calls to glOrtho.
pathName numeyes
Returns numbers of eyes — basically, 2 for stereo views and 1 for all others, except some stereo views only need one eye from OpenGL.

Togl configuration options

Togl's configuration options can be separated into several categories: geometry, pixel format, and other. The pixel format related options can only be set at widget creation time. The other options can be changed dynamically by the pathName configure command (see above).

Drawing callbacks

Option Default Comments
-createcommand {} Can be abbreviated -create.
-displaycommand {} Can be abbreviated -display.
-reshapecommand {} Can be abbreviated -reshape.
-destroycommand {} Can be abbreviated -destroy.
-overlaydisplaycommand {} Can be abbreviated -overlaydisplay.

Geometry Options

Option Default Comments
-width 400 Set width of widget in pixels. It may have any of the forms accepted by Tk_GetPixels.
-height 400 Set height of widget in pixels. It may have any of the forms accepted by Tk_GetPixels(3).
-setgrid 0 Turn on gridded geometry management for togl widget's toplevel window and specify the geometry of the grid. See the manual pages for Tk's wm(n) and Tk_SetGrid(3) for more information. Unlike the text widget, the same value is used for both width and height increments.

Timer Options

Option Default Comments
-time 1 Specifies the interval, in milliseconds, for calling the timer callback function which was registered with -timercommand.
-timercommand {} Can be abbreviated -timer.

Stereo Options

Option Default Comments
-eyeseparation 2.0 Set the distance between the eyes in viewing coordinates.
-convergence 30.0 Set the distance to the screen from the eye in viewing coordinates (the distance at which the eyes converge).
You'd think these values would be given in physical units, but there's no single right way to convert to viewing coordinates from physical units. So if you're willing to use Tk's idea of the horizontal size of a window in millimeters (not always correct), you could convert the average eye separation of 63 mm to your viewing coordinates, and use that value as the eye separation.

Miscellaneous Options

Option Default Comments
-cursor "" Set the cursor in the widget window.
-swapinterval 1 Set the minimum swap interval measure in video frame periods. The default is 1 for for non-tearing artifacts when swapping buffers. Use a value of 0 when benchmarking frame rates.
-ident "" A user identification string. This is used match widgets for the -sharecontext and the -sharelist options (see below). This is also useful in your callback functions to determine which Togl widget is the caller.

Pixel Format Options

The following options can only be given when the togl widget is created — that is, unlike other options, the togl widget can not be reconfigured with different values for the following options after it is created.
Option Default Comments
-rgba true If true, use RGB(A) mode, otherwise use Color Index mode.
-redsize 1 Minimum number of bits in red component.
-greensize 1 Minimum number of bits in green component.
-bluesize 1 Minimum number of bits in blue component.
-alpha 1 If true and -rgba is true, request an alpha channel.
-alphasize 1 Minimum number of bits in alpha component.
 
-double false If true, request a double-buffered window, otherwise request a single-buffered window.
 
-depth false If true, request a depth buffer.
-depthsize 1 Minimum number of bits in depth buffer.
 
-accum false If true, request an accumulation buffer.
-accumredsize 1 Minimum number of bits in accumulation buffer red component.
-accumgreensize 1 Minimum number of bits in accumulation buffer green component.
-accumbluesize 1 Minimum number of bits in accumulation buffer blue component.
-accumalphasize 1 Minimum number of bits in accumulation buffer alpha component.
 
-stencil false If true, request a stencil buffer.
-stencilsize 1 Minimum number of bits in stencil component.
 
-auxbuffers 0 Desired number of auxiliary buffers.
 
-privatecmap false Only applicable in color index mode. If false, use a shared read-only colormap. If true, use a private read/write colormap.
 
-overlay false If true, request overlay planes.
 
-stereo mode See the stereo information for details about the various modes. Stereo parameters are changed with the stereo options.

When using a non-native stereo mode, the OpenGL glDrawBuffer, glClear, glFrustum, and glOrtho calls must be replaced with the Togl Tcl or C versions.

 
-pbuffer false If true, request off-screen framebuffer memory for the graphics. The resulting togl widget should not be managed.
-largestpbuffer false If true, when asking for a pbuffer of a given size and there isn't enough framebuffer memory available, fallback to the largest size available.
 
-multisample false If true, request an multisampled rendering context.
-indirect false If present, request an indirect rendering context. A direct rendering context is normally requested. Only significant on Unix/X11.
-sharelist "" Togl identification string or window path name of an existing Togl widget with which to share display lists. If it is not possible to share display lists between the two togl widgets (depends on the graphics driver and the particular formats), it fails.
-sharecontext "" Togl identification string or window path name of an existing Togl widget with which to share the OpenGL context. Note: all other pixel format options are ignored.
-pixelformat 0 Set the pixel format to the (platform-dependent) given value. This is a backdoor into choosing a particular pixel format that was determined by other means.

Get Togl at SourceForge.net. Fast, secure and Free Open Source software downloads Valid HTML 4.01 Transitional netgen-6.2.1804/ng/Togl2.1/doc/using.html0000644000175000017500000001256513272137567016330 0ustar kurtkurt Using the Togl Widget

Using the Togl Widget

Contents


Using Togl With Your Application

First, double check that you have all of the prerequisites and that you have compiled and installed Togl.

Then, Togl acts like any other extension package — to load it, you use the Tcl package command:

package require Togl 2.0
After that, you can create a Togl widget just like any other Tk widget.

Examples

There are eight working examples:

double.tcl — compares single vs double buffering with two Togl widgets
texture.tcl — lets you play with texture mapping options
index.tcl — example of using color index mode
overlay.tcl — example of using overlay planes (requires overlay hardware)
stereo.tcl — stereo example
gears.tcl — spinning gears example
multisample.tcl — multisampling example
pbuffer.tcl — pbuffer (off-screen rendering) example

Each example consists of two files: a Tcl script for the user interface, and a Tcl C package that does the OpenGL drawing. To compile the examples, type make examples in the Togl source directory. The C packages are compiled into shared libraries that are loaded into the Tcl interpreter as Tcl/Tk-extensions. The examples are started by running the corrsponding Tcl script: just type ./double.tcl (or ./texture.tcl etc.) or run under one of the Tcl interpreters, i.e., tclsh or wish. For example:

tclsh84 double.tcl

Other examples that use Tcl for OpenGL drawing can be found in the Tcl3D demos.

Togl callbacks

All of the examples have similar structure. First they create the user interface with one or more Togl widgets. Each Togl widget is configured with the desired pixel format and several callback commands (not all are needed):
-createcommand Called when Togl widget is mapped — when it is safe to initialize the OpenGL context.
-reshapecommand Called when the Togl widget is resized — when the OpenGL context's viewport needs to be changed.
-displaycommand Called when the contents of the Togl widget needs to be redrawn. Redraws are normally delayed to be when the Tcl event loop is idle (see the togl widget's postredisplay command), or as the result of an explicit call to the togl's widgets render command.
-destroycommand Called when the Togl widget is destroyed. While OpenGL frees display lists and other resources, sometimes there's some associated state that is no longer needed.
-timercommand Called every n milliseconds as given by the -time option.
-overlaydisplaycommand Called when the overlay planes needs to be redrawn. The overlay planes are created and reshaped at the same time as the main OpenGL context.
Typically, only -createcommand, -reshapecommand and -displaycommand are used.


Get Togl at SourceForge.net. Fast, secure and Free Open Source software downloads Valid HTML 4.01 Transitional netgen-6.2.1804/ng/Togl2.1/doc/header.js0000644000175000017500000000135213272137567016073 0ustar kurtkurtfunction displayHeader(pageTitle) { document.write("

" + pageTitle + "

"); } function NavigationBar() { document.write(""); document.write(" "); document.write(" "); document.write(" "); document.write(" "); document.write(" "); document.write(" "); document.write(" "); document.write(" "); document.write(" "); document.write("
IndexIntroDownload/InstallUsing ToglTcl APIC APIFAQ
"); document.write("
"); } netgen-6.2.1804/ng/Togl2.1/doc/index.html0000644000175000017500000001252413272137567016305 0ustar kurtkurt Togl, a Tk OpenGL widget

Togl — a Tk OpenGL widget

Copyright © 1996-2009 Brian Paul, Ben Bederson, and Greg Couch

Index


Introduction

Togl is a Tk widget for OpenGL rendering. Togl was originally based on OGLTK, written by Benjamin Bederson at the University of New Mexico. Togl's main features are:
  • unifies Microsoft Windows, X11 (Linux/IRIX/...), and Mac OS X Aqua support
  • support for requesting stencil, accumulation, alpha buffers, etc.
  • multiple OpenGL drawing windows
  • simple stereo rendering support
  • simple, portable font support
  • color-index mode support including color allocation functions
  • overlay plane support
  • OpenGL extension testing from Tcl
  • Tcl Extension Architecture (TEA) 3 compliant

Togl does almost no OpenGL drawing itself, instead it manages OpenGL drawing by calling various Tcl commands (a.k.a., callback functions). Those commands can be C functions that call OpenGL (in)directly or another Tcl package (e.g., Tcl3D).

Togl is copyrighted by Brian Paul (brian_e_paulATyahooDOTcom), Benjamin Bederson (bedersonATcsDOTumdDOTedu), and Greg Couch (gregcouchATusersDOTsourceforgeDOTnet). See the LICENSE file for details.

The Togl project and home page are hosted by SourceForge.

Mailing list

See the Togl project at SourceForge for mailing list information.

Reporting Bugs

There is a bug database on the Togl Project Page. You may also discuss bugs on the mailing list.

It may be worth upgrading your graphics driver and retesting before reporting a bug, as, historically, many Togl "bugs" have been fixed by a graphics driver upgrade, especially on Microsoft Windows.

When reporting bugs please provide as much information as possible. Such as the version of Togl, which operating system (e,g., Microsoft Windows, Red Hat Linux, Mac OS X, etc.), the version of the operating system, and the version of the graphics driver. Also, it's very helpful to us if you can provide an example program which demonstrates the problem.

Contributors

Several people have contributed new features to Togl. Among them are:

  • Ramon Ramsan — overlay plane support
  • Miguel A. De Riera Pasenau — more overlay functions, X11 functions and EPS output
  • Peter Dern and Elmar Gerwalin — Togl_TimerFunc and related code
  • Robert Casto — Microsoft Windows NT port
  • Geza Groma — Microsoft Windows 95/NT patches
  • Ben Evans — SGI stereo support
  • Paul Thiessen — Macintosh support
  • Jonas Beskow — Tcl/Tk stubs support
  • Paul Kienzle — TEA debugging and patches
  • Greg Couch — version 1.7, 2.0, 2.1
Many others have contributed bug fixes. Thanks for your contributions!

Last edited on 4 February 2009 by Greg Couch.
Get Togl at SourceForge.net. Fast, secure and Free Open Source software downloads Valid HTML 4.01 Transitional netgen-6.2.1804/ng/Togl2.1/doc/stereo.html0000644000175000017500000001547613272137567016510 0ustar kurtkurt Togl Stereo Modes

Togl Stereo Modes

Contents


There are lots of stereo modes in Togl because there are many ways to draw stereo with different tradeoffs. All of the stereo modes are chosen with the -stereo configuration option. All of the non-native stereo techniques are software-only and can be changed at anytime.

When using a non-native stereo mode, the OpenGL glDrawBuffer, glClear, glFrustum, and glOrtho calls should be replaced with the Togl Tcl or C versions for seemless stereo rendering.

The various stereo modes are:

none or "" or any false boolean value
Turn off stereo.
native or any true boolean value
Use native OpenGL hardware accelerated stereo (single- or double-buffered for both the left and the right eyes). Each eye is drawn at full window resolution which gives the best stereo image. This mode requires support from the graphics driver and is typically only supported on workstation-class graphics cards, e.g., NVidia Quadro, ATI FireGL, Matrix Parhelia, 3DLabs Wildcat graphics cards and SGI workstations. The video refresh rate is changed automatically by the windowing system except on SGI workstations. Developers for SGI workstations can either switch the video manually with /usr/gfx/setmon or /usr/bin/X11/xsetmon, or use the autostereo package.

Currently, there is a limitation that a togl widget can not be reconfigured in or out of the native stereo mode. And if/when it is supported, some graphics drivers might not allow it.

anaglyph
Draw the left eye in the red part of the color buffer and the right eye in the blue and green parts. Designed to be viewed with inexpensive red-blue or red-cyan glasses. Works best with gray scale and non-saturated color images.
cross-eye
Draw right eye image on the left half of screen, and draw left eye image on the right half of screen. So each eye is drawn at less than half of the window resolution.
wall-eye
Draw left eye image on the left half of the screen, and draw right eye image on the right half of the screen. So each eye is drawn at less than half of the window resolution.
dti
Designed for DTI displays. If you look at the window unassisted, you'll see horizonally squished images with the left eye image on the left, and right eye image on the right. So each eye is drawn at half of the window resolution.
row interleaved
Designed for VRex, Zalman, and Hyundai displays. Where the right eye is on the even scanlines and the left is on the odd ones. Requires that there be a stencil buffer and uses the most significant stencil bit. Changes to the stencil state should be placed within glPushAttrib(GL_STENCIL_BUFFER_BIT) and glPopAttrib() calls.
left eye
Only draw left eye view at full resolution.
right eye
Only draw right eye view at full resolution.
sgioldstyle
Support older-style SGI stereo where you lose half of the vertical resolution. This uses the SGIStereo X extension, that is only available on SGI workstations, to tell the X server to duplicate non-stereo windows into both eyes. This option only works when the monitor has been changed to the one of the str_top, str_bot, or str_rect video output modes.

Get Togl at SourceForge.net. Fast, secure and Free Open Source software downloads Valid HTML 4.01 Transitional netgen-6.2.1804/ng/Togl2.1/doc/README.txt0000644000175000017500000000021713272137567016002 0ustar kurtkurtThis directory contains the documentation of Togl, the Tk OpenGL widget. The documentation also doubles as the contents of the Togl home page. netgen-6.2.1804/ng/Togl2.1/doc/download.html0000644000175000017500000003014713272137567017006 0ustar kurtkurt Downloading and Installing Togl

Downloading and Installing Togl

Contents


Prerequisites

You should have Tcl and Tk installed on your computer. Togl works with Tcl/Tk version 8.1 and up (all recent testing has been with version 8.4). The Mac OS X version requires version 8.4 (note: versions 8.4.12 and 8.4.13 have a bug when unmapping Togl widgets).

You must also have OpenGL or Mesa (a free alternative to OpenGL with the same API) installed on your computer.

And one should be familiar with Tcl, Tk, OpenGL, and C programming to use Togl effectively.

Downloading Togl

Togl can be downloaded from the SourceForge Files page.

Several prebuilt binary distributions are available as well as a source distribution.

Installing Togl

Installing prebuild binaries

Prebuilt binaries provide a Togl2.1 directory, the togl.h, togl_ws.h and toglDecls.h include files, and the togl stub library (libToglstub2.1.a or Toglstub20.lib, etc). The Togl2.1 directory needs to copied into one of the directories on Tcl's package path (type puts $auto_path in the Tcl interpreter to see the list of directories). If you have C code that needs to access Togl's subroutines directly, place the include file in the same place as Tcl's include file and the stub library in the same place as Tcl's stub library.

Installing from source

Togl uses the Tcl Extension Architecture to be able to build on the same platforms Tcl can be built on. In addition to the Togl source, you will need to have the Tcl and Tk source distributions because not all installations have the needed Tcl and Tk internal header files.

How you link with Togl depends on how you're planning to use it. There are basically three ways of using Togl with your application:

  • Install the Togl shared library and pkgIndex.tcl file (using make install) and link to the Togl stubs library with your executable or shared library. In this case you must call Togl_InitStubs() (and probably Tcl_InitStubs() — Tk_InitStubs is only needed if you call Tk functions). This is the way the included Togl examples are built.
  • Link to the Togl shared library or "compile in" the Togl object files with your executable or shared library. In this case you must call Togl_Init() from your C code to initialize Togl.
  • Install the Togl shared library and pkgIndex.tcl file (using make install) and then load it using Tcl commands or Tcl_PkgRequire(). Then use Tcl commands to create and manipulate the Togl widget.
Since Togl is compiled into a shared library using the Tcl/Tk stubs-interface, the same binary can be used with any version of Tck/Tk from 8.1 and up. See README.stubs for more info.

Specific platform notes follow:

Unix/X11 usage

Unix/X systems only need the public Tcl/Tk include files. Just configure, make, and optionally make install.

Microsoft Windows usage

Microsoft Windows platforms need tkWinInt.h and other internal Tk header files. So you need a Tcl/Tk source distribution in addition to the Togl distribution (or copy over the various include files).

Here's the minimal way to build Togl with Tcl/Tk using the gcc that is distributed as part of the cygwin tools (Microsoft's compilers work too):


VER=8.4.12
SRCDIR=`pwd`

cd $SRCDIR/tcl$VER/win
env 'CC=gcc -mno-cygwin' ./configure --enable-threads
make libtclstub84.a

cd $SRCDIR/tk$VER/win
env 'CC=gcc -mno-cygwin' ./configure --enable-threads
make libtkstub84.a

cd $SRCDIR/Togl2.1
env 'CC=gcc -mno-cygwin' ./configure --with-tcl=../tcl$VER/win --with-tk=../tk$VER/win

make
The resulting Togl21.dll and pkgIndex.tcl should be installed into your Tcl installation just like any other package.

If you change all of the above make's to make install instead, then the Togl package is installed correctly.

Mac OS X usage

These special instructions are for building the Aqua version of Togl. Mac OS X needs tkMacOSXInt.h and other internal Tk header files. Unfortunately, the Tcl and Tk frameworks that Apple distributes are missing the internal headers. So you need a Tcl/Tk source distribution in addition to the Togl distribution (or copy over the various include files). You would probably want a newer version of Tcl and Tk anyway because each minor revision of 8.4 has many Aqua bug fixes.

Here's one way to build Tcl, Tk, and Togl on Mac OS X (assuming they are all in the same directory) to install in your home directory:


VER=8.4.12

mkdir -p ~/bin
make -C tcl$VER/macosx install PREFIX="${HOME}" INSTALL_PATH="${HOME}/Library/Frameworks"
make -C tk$VER/macosx install PREFIX="${HOME}" INSTALL_PATH="${HOME}/Library/Frameworks" APPLICATION_INSTALL_PATH="${HOME}/Applications"

cd Togl2.1
./configure --prefix="${HOME}"
make install

Version History

Version 1.0 — March, 1996

  • Initial version

Version 1.1 (never officially released)

  • Added Togl_LoadBitmapFont function
  • Fixed a few bugs

Version 1.2 — November, 1996

  • added swapbuffers and makecurrent Tcl commands
  • more bug fixes
  • upgraded to support Tcl 7.6 and Tk 4.2
  • added stereo and overlay plane support
  • added Togl_Get/SetClientData() functions
  • added Togl_DestroyFunc()

Version 1.3 — May 2, 1997

  • fixed a bug in Togl_Configure()
  • fixed a compilation problem in using Tcl_PkgProvide() with Tcl < 7.4
  • new overlay functions: Togl_ExistsOverlay, Togl_GetOverlayTransparentValue, Togl_IsMappedOverlay, Togl_AllocColorOverlay, Togl_FreeColorOverlay
  • added X11 functions: Togl_Display, Togl_Screen, Togl_ScreenNumber, Togl_Colormap
  • added Togl_DumpToEpsFile function
  • fixed a C++ compilation problem
  • more robust overlay code
  • added timers (Togl_TimerFunc) from Peter Dern and Elmar Gerwalin

Version 1.4 — September 17, 1997

  • ported to Microsoft Windows NT (Robert Casto)
  • updated for Tcl/Tk 8.0
  • added many config flags (-redsize, -depthsize, etc) (Matthias Ott)
  • added Togl_Set*Func() functions to reassign callback functions (Matthias Ott)
  • added Togl_ResetDefaultCallbacks() and Togl_ClientData() functions (Greg Couch)

Version 1.5 — September 18, 1998

  • fixed a few Unix and Microsoft Windows compilation bugs
  • added Ben Evan's SGI stereo functions
  • multiple expose events now reduced to one redraw
  • destroying Togl widgets caused problems, patched by Adrian J. Chung
  • added Togl_TkWin() function
  • updated for Tcl/Tk 8.0p2
  • added gears demo from Philip Quaife
  • added -sharelist and -sharecontext config flags
  • fixed a few overlay update bugs
  • added -indirect config flag

Version 1.6 — May 7, 2003

  • added Togl_SetTimerFunc function
  • updated for Tcl/Tk 8.0.5 and 8.1
  • context sharing added for Microsoft Windows
  • Macintosh support (by Paul Thiessen)
  • Tcl/Tk stubs support — see README.tcl (by Jonas Beskow)

Version 1.7 — January 6, 2006

  • added Mac OS X support
  • enabled asking for quad-buffered stereo pixel formats on all platforms (use -oldstereo on SGIs for splitscreen stereo — C API changed too)
  • configuring the cursor is no longer slow
  • added -pixelformat config flag
  • added setgrid support (unfortunately many window managers can't cope with 1x1 pixel grid)
  • only free context when last reference is gone
  • switched to TEA-based configure (instead of editing make files)

Version 2.0 — April 22, 2008

  • stubified C API
  • replaced EPS support with TK photo image support
  • simplified C API by requiring callback command options
  • Added command arguments for create, destroy, etc. callbacks, so there is a -createcommand option to the togl command (etc.). (and removed Togl_*Func from the C API)
  • added togl instance commands that call C API — see documentation
  • use Tcl objects internally
  • use Tcl object interface for callbacks
  • vertical sync control
  • fix thread safety in anticipation that OpenGL drivers may someday be thread safe
  • added simple stereo rendering interface
  • revised font C API
  • updated font support for Tk 8.4 on all platforms
  • updated documentation
  • prebuilt binaries

Version 2.1 — December 2009

  • incorporate the part of the X11R6 Xmu library that Togl uses so it will work on (Linux) systems that don't have the Xmu shared library
  • Mac OS X Aqua delete context bug fix
  • multisampling support
  • pbuffer support (Unix/X11, Microsoft Windows, Mac OS X)
  • Ability to copy context state
  • row interleaved stereo support

Future plans

Patches for the following are especially welcome:
  • Tk 8.5 fonts
  • Aqua Cocoa support (Tk 8.6b2)
  • OpenGL 3 contexts
  • EGL support
  • RGB overlays
  • Tcl access to colormap manipulation
  • NVidia consumer stereo support

Get Togl at SourceForge.net. Fast, secure and Free Open Source software downloads Valid HTML 4.01 Transitional netgen-6.2.1804/ng/Togl2.1/doc/faq.html0000644000175000017500000000774413272137567015755 0ustar kurtkurt Togl Frequently Asked Questions

Togl Frequently Asked Questions

Contents

Frequently Asked Questions (and Problems)


If you have something to add to this section please let us know.

Bad Match X errors on Sun systems
There is(was?) a bug in Sun's XmuLookupStandardColormap X library function. If you compile togl.c with the SOLARIS_BUG symbol defined (-DSOLARIS_BUG) this function call will be omitted.

Is stereo rendering supported?
Several different stereo modes are supported.

Is fullscreen stereo rendering supported?
Before Tk 8.5, Tk does not support true fullscreen windows. Consequenly the full-screen stereo, that gaming graphics cards support (ATI Radeon, NVidia GeForce), won't be added until sometime after Tk 8.5 is available. Fullscreen stereo on workstation graphics cards (ATI FireGL, NVidia Quadro, Matrix Parhelia, 3Dlabs Wildcat) does work.

How do I get the Microsoft Windows device context?
First call Togl_MakeCurrent to make sure you have the right OpenGL context and device context set, then call wglGetCurrentDC.

How do I use Togl from Python?
The Togl source distribution comes with a Togl.py file that provides a Tkinter-style Togl widget. And for Togl callbacks that are C functions, there is a toglpy.h file that provides a function that converts a Python object into its corresponding Togl widget:
Togl *getToglFromWidget(PyObject *widget)

Is Togl compatible with Tile and Tk 8.5?
Yes, Togl works as is (except for the bitmap font support for X11 and Aqua). From Joe English:
Complex "owner-draw" widgets like tkZinc, or the text and canvas widgets, really don't benefit much from themability, so there's no reason to rewrite them. (http://wiki.tcl.tk/13373)

Get Togl at SourceForge.net. Fast, secure and Free Open Source software downloads Valid HTML 4.01 Transitional netgen-6.2.1804/ng/Togl2.1/doc/capi.html0000644000175000017500000005145113272137567016114 0ustar kurtkurt Togl C API

Togl C API

Contents


Compiling and linking C Togl Functions

All Togl functions are found in the Togl header file.

#include "togl.h"

For portability, you should include the togl.h header before any other OpenGL headers so it will compile on Microsoft Windows.

Before calling any Togl functions, you need to initialize it. Regardless if you're using stubs (by defining USE_TOGL_STUBS) or not, the following code will properly initialize togl:

if (Tcl_InitStubs(interp, "8.1", 0) == NULL
|| Togl_InitStubs(interp, "2.0", 0) == NULL) {
    /* fail */
}

If you are using a prebuilt binary distribution, you should be sure to define USE_TOGL_STUBS beforehand.

See the source for the demo programs in the Togl source distribution for working examples.

Linking

If you are using a prebuilt binary, be sure to link against the stub library. On Microsoft Windows, link against Toglstub21.lib opengl32.lib user32.lib gdi32.lib, on Mac OS X, link against -lToglstub2.1 -framework OpenGL, on other platforms, link against -lToglstub2.1 -lGLU -lGL -lm.

If building your own Togl package, you can use the stubs interface or link in the Tcl and Tk libraries as well. If using the stubs interface, link as shown above. Otherwise: on Microsoft Windows, link against Togl21.lib tk84.lib tcl84.lib opengl32.lib user32.lib gdi32.lib, on Mac OS X, link against -lTogl2.1 -framework Tk -framework Tcl -framework OpenGL, on other platforms, link against -lTogl2.1 -ltk8.4 -ltcl8.4 -lGLU -lGL -lm.

Setup and Initialization Functions

int Togl_Init(Tcl_Interp *interp)
Initializes the Togl module. This is typically called from the Tk_Main() function or other Tcl package initialization function that is directly linked to the Togl (shared) library. It is also indirectly called via Tcl's package require Togl command. If successful, the return value is TCL_OK.
const char *Togl_InitStubs(Tcl_Interp *interp, const char *version, int exact)
Loads the Togl package into the given interpreter and initializes it. version should be "2.0" or higher. This is typically called from C/C++ code that accesses Togl's C API and has installed Togl into the standard TCL hierarchy. See the Tcl InitStubs(3) or the Tk TkInitStubs(3) manual pages for more information.

Drawing-related Commands

void Togl_PostRedisplay(Togl *togl)
Signals that the widget should be redrawn. When Tk is next idle, the displaycommand callback will be invoked.
void Togl_SwapBuffers(const Togl *togl)
Swaps the front and back color buffers for a double-buffered widget. glFlush is executed if the window is single-buffered. So this call works for both single- and double-buffered contexts. This is typically called in the displaycommand callback function.
void Togl_MakeCurrent(const Togl *togl)
Sets the current rendering context to the given widget. This is done automatically before any Togl callback functions is called. So the call is only needed if you have multiple widgets with separate OpenGL contexts. If the argument is NULL, then the rendering context is cleared and subsequent OpenGL commands will fail.
Bool Togl_SwapInterval(const Togl *togl, int interval)
Returns True if successful. Attempts to change the maximum refresh rate by setting the minimum number of cycles between successive swap buffers. For benchmarking purposes, you should set the swap interval to 0.
int Togl_CopyContext(const Togl *from, const Togl *to, unsigned int mask)
Copy a subset of the OpenGL context state from from one context to another using the mask parameter who values are the same as glPushAttrib. The return value is TCL_OK if the context was copied.

Query Functions

char *Togl_Ident(const Togl *togl)
Returns a pointer to the identification string associated with a Togl widget or NULL if there's no identifier string.
int Togl_Width(const Togl *togl)
Returns the width of the given Togl widget. Typically called in the reshapecommand callback function.
int Togl_Height(const Togl *togl)
Returns the height of the given Togl widget. Typically called in the reshapecommand callback function.
Tcl_Interp *Togl_Interp(const Togl *togl)
Returns the Tcl interpreter associated with the given Togl widget.
Tk_Window Togl_TkWin(const Togl *togl)
Returns the Tk window associated with the given Togl widget.
Togl_FuncPtr Togl_GetProcAddr(const char *funcname)
Platform-independent way to get OpenGL function pointers from a function name. Note that in Microsoft Windows (WGL) versions that "the extension function addresses are unique for each pixel format. All rendering contexts of a given pixel format share the same extension function addresses." And on *nix (GLX/X11) platforms, "the function pointers returned are context independent" (Linux ABI documentation). The Mac OS X (AGL) platform acts like a *nix platform.
int Togl_ContextTag(const Togl *t)
Returns an integer that represents the context tag. All Togl widgets with the same context tag share display lists.
Bool Togl_UpdatePending(const Togl *t)
Returns True if the window should be redrawn. See Togl_PostRedisplay.
Bool Togl_HasRGBA(const Togl *t)
Return True if Togl widget has a RBGA color buffer. False means that the widget is using a color index buffer.
Bool Togl_IsDoubleBuffered(const Togl *t)
Return True if Togl widget is double buffered.
Bool Togl_HasDepthBuffer(const Togl *t)
Return True if Togl widget is has a depth buffer.
Bool Togl_HasAccumulationBuffer(const Togl *t)
Return True if Togl widget has an accumulation buffer.
Bool Togl_HasDestinationAlpha(const Togl *t)
Return True if Togl widget has a destination alpha buffer.
Bool Togl_HasStencilBuffer(const Togl *t)
Return True if Togl widget has a stencil buffer.
int Togl_StereoMode(const Togl *t)
Return current stereo mode. See ??
Bool Togl_HasMultisample(const Togl *t)
Return True if Togl widget has a multisample buffer.

Color Index Mode Functions

These functions are only used for color index mode.

unsigned long Togl_AllocColor(Togl *togl, float red, float green, float blue)
Allocate a color from a read-only colormap. Given a color specified by red, green, and blue return a colormap index (aka pixel value) whose entry most closely matches the red, green, blue color. Red, green, and blue are values in [0,1]. This function is only used in color index mode when the -privatecmap option is false.
void Togl_FreeColor(Togl *togl, unsigned long index)
Free a color in a read-only colormap. Index is a value which was returned by the Togl_AllocColor() function. This function is only used in color index mode when the -privatecmap option is false.
void Togl_SetColor(Togl *togl, int index, float red, float green, float blue)
Load the colormap entry specified by index with the given red, green and blue values. Red, green, and blue are values in [0,1]. This function is only used in color index mode when the -privatecmap option is true.

Font Functions

These functions provide an interface to the simple bitmap font capabilities that every OpenGL implementation provides. Better font support is found in other C APIs, e.g., QuesoGLC or FTGL.

Tcl_Obj *Togl_LoadBitmapFont(Togl *togl, const char *fontname)
Load the named font as a set of glBitmap display lists. fontname may be any of the font description styles accepted by the Tk font command. For maximum portability, one of the standard Tk fonts, Courier, Times, and Helvetica, should be used. Unicode fonts are treated as if they have only have an 8-bit index (so poorly). If successful, a Togl BitmapFont object is returned. NULL is returned on failure.
int Togl_UnloadBitmapFont(Togl *togl, Tcl_Obj *toglfont)
Destroys the bitmap display lists created by by Togl_LoadBitmapFont(). If successful, the return value is TCL_OK.
int Togl_WriteChars(const Togl *togl, const Tcl_Obj *toglfont, const char *string, int length) Draw the given string. If the given length is zero, then it is computed using strlen. Returns the length of the drawn string.
int Togl_WriteObj(const Togl *togl, const Tcl_Obj *toglfont, Tcl_Obj *obj)
Tcl_Obj interface to Tcl_WriteChars.

Client Data Functions

Each Togl structure has a pointer to an arbitrary client data structure.

void Togl_SetClientData(Togl *togl, ClientData clientData)
Set the Togl widget's client data pointer to clientData.
ClientData Togl_GetClientData(const Togl *togl)
Return the Togl widget's client data pointer.

Overlay Functions

These functions are modeled after GLUT's overlay sub-API.

void Togl_UseLayer(Togl *togl, int layer)
Select the layer into which subsequent OpenGL rendering will be directed. layer may be either TOGL_OVERLAY or TOGL_NORMAL.
void Togl_ShowOverlay(Togl *togl)
Display the overlay planes, if any.
void Togl_HideOverlay(Togl *togl)
Hide the overlay planes, if any.
void Togl_PostOverlayRedisplay(Togl *togl)
Signal that the overlay planes should be redraw. When Tk is next idle, the overlaydisplaycommand callback will be invoked.
int Togl_ExistsOverlay(Togl *togl)
Returns 1 if overlay planes exist, 0 otherwise.
int Togl_GetOverlayTransparentValue(const Togl *togl)
Returns the color index of the overlay's transparent pixel value.
int Togl_IsMappedOverlay(const Togl *togl)
Returns 1 if the overlay planes are currently displayed, 0 otherwise.
unsigned long Togl_AllocColorOverlay(const Togl *togl, float red, float green, float blue)
Allocate a color in the overlay planes. Red, green, and blue are values in [0,1]. Return the color index or -1 if the allocation fails.
void Togl_FreeColorOverlay(const Togl *togl, unsigned long index)
Free a color which was allocated with Togl_AllocColorOverlay().

Stereo Functions

Togl abstracts part of the stereo drawing process to seamlessly support quad-buffered stereo as well as various alternative stereo formats. The stereo viewing parameters, eyeseparation and convergence need to be set with the Togl's stereo options.

void Togl_DrawBuffer(Togl *togl, GLenum mode)
Switch to OpenGL draw buffer. Should be one of GL_BACK_LEFT, GL_BACK_RIGHT, GL_FRONT_LEFT, or GL_FRONT_RIGHT. It is not possible to draw in the left and right buffers at the same time in the alternate stereo modes.
void Togl_Clear(const Togl *togl, GLbitfield mask)
Replacement for OpenGL's glClear that takes into account the alternate stereo mode.
void Togl_Frustum(const Togl *togl, GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat near, GLfloat far)
Replacement for OpenGL's glFrustum that takes into account the alternate stereo mode.
void Togl_Ortho(const Togl *togl, GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat near, GLfloat far)
Replacement for OpenGL's glOrtho that takes into account the alternate stereo mode.
int Togl_NumEyes(const Togl *togl)

Stereo Example

This code works for quad-buffered stereo, as well as the other stereo modes.

if (Togl_NumEyes(togl) == 1) {
    Togl_DrawBuffer(togl, GL_BACK);
    Togl_Clear(togl);
    glMatrixMode(GL_PROJECTION);
    glLoadIdentity();
    Togl_Frustum(togl, left, right, bottom, top, near, far);
    glMatrixMode(GL_MODELVIEW);
    draw image
} else {
    Togl_DrawBuffer(togl, GL_BACK_LEFT);
    Togl_Clear(togl);
    glMatrixMode(GL_PROJECTION);
    glLoadIdentity();
    Togl_Frustum(togl, left, right, bottom, top, near, far);
    glMatrixMode(GL_MODELVIEW);
    draw left-eye image
    Togl_DrawBuffer(togl, GL_BACK_RIGHT);
    Togl_Clear(togl);
    glMatrixMode(GL_PROJECTION);
    glLoadIdentity();
    Togl_Frustum(togl, left, right, bottom, top, near, far);
    glMatrixMode(GL_MODELVIEW);
    draw right-eye image
}
Togl_SwapBuffers(togl);

Image Functions

int Togl_TakePhoto(Togl *togl, Tk_PhotoHandle photo)
Take a photo image of the current Togl window and place it in the given photo object. If the window is partially obscured, either by other windows or by the edges of the display, the results are undefined in the obscured region. If successful, the return value is TCL_OK.

Conversion Functions

These functions aid the programmer when writing Togl callback functions.

int Togl_GetToglFromObj(Tcl_Interp *interp, Tcl_Obj *obj, Togl **toglPtr)
Attempt to return a Togl structure "toglPtr" from the Tcl object "obj". If successful, the return value is TCL_OK.
int Togl_GetToglFromName(Tcl_Interp *interp, const char *cmdName, Togl **toglPtr)
Attempt to return a Togl structure "toglPtr" from the Tcl command name "cmdName". If successful, the return value is TCL_OK.

Get Togl at SourceForge.net. Fast, secure and Free Open Source software downloads Valid HTML 4.01 Transitional netgen-6.2.1804/ng/Togl2.1/doc/upgrading.html0000644000175000017500000001030613272137567017152 0ustar kurtkurt Upgrading to Version 2

Upgrading to Version 2

Contents


Internally, Togl version 2 isn't very different from version 1, and much of the C interface is the same. The main difference is that the focus of the Togl API has changed from being a C API to being a Tcl API. Which means that the full power of Togl is accessible from Tcl (the few exceptions are considered bugs).

Widget callback changes

The biggest change is how the various callback are initialized. In version 1, the C API Togl_Set*Func functions had to be used to setup the callback functions before creating the Togl widget. And once the callbacks were set for a particular Togl widget, they could not be changed. If more than once Togl widget was needed, the callback functions would need to be reset before each widget creation. In version 2, the callbacks are configuration arguments to the widget and can be updated like any other standard widget configuration option. See the Tcl API for details.

Widget subcommand changes

Version 1 also allowed new subcommands to be added to the togl widget command via the C API. This was dropped for a variety of reasons: there is no exact Tcl equivalent, there is no standard object-oriented technique currently in the Tcl core (8.4.13), it is unclear how to make the API thread safe, and the internal Tcl C API doesn't support dynamically changing sets of subcommands. That said, this functionality might come back, especially when TIP #257 is implemented. Instead, in version 2, create a Tcl function that takes the Togl widget as an argument. Functions written in C can get the underlying Togl structure handle with either the Togl_GetToglFromObj or the Togl_GetToglFromName function, as appropriate. This means that there are no special Togl commands, only Tcl commands. See the C API for details.

Stereo changes

The stereo support has been totally revamped. Some form of stereo is available all of the time.

Font changes

Tcl support for writing strings has been added.

The font C API has been revised so that Togl_LoadBitmapFont returns a font object instead an integer (likewise for Togl_UnloadBitmapFont). So instead of calling glListBase and glCallLists directly, use Togl_WriteObj or Togl_WriteChars.

The TOGL_BITMAP_* constants remain for limited backwards source compatibility and are deprecated. The acceptable font names are now the same as Tk_GetFont and the Tk font command on all platforms.


Get Togl at SourceForge.net. Fast, secure and Free Open Source software downloads Valid HTML 4.01 Transitional netgen-6.2.1804/ng/Togl2.1/image.h0000644000175000017500000000034513272137567014774 0ustar kurtkurt/* image.h */ #ifndef IMAGE_H # define IMAGE_H typedef struct _TK_RGBImageRec { int sizeX, sizeY, sizeZ; unsigned char *data; } TK_RGBImageRec; extern TK_RGBImageRec *tkRGBImageLoad(const char *fileName); #endif netgen-6.2.1804/ng/Togl2.1/toglFont.c0000644000175000017500000003672213272137567015511 0ustar kurtkurt/* $Id: toglFont.c,v 1.8 2009/05/22 00:18:36 gregcouch Exp $ */ /* vi:set sw=4 expandtab: */ /* * Togl - a Tk OpenGL widget * * Copyright (C) 1996-2002 Brian Paul and Ben Bederson * Copyright (C) 2005-2008 Greg Couch * See the LICENSE file for copyright details. */ /* * Togl Bitmap Font support * * If bitmap font support is requested, then this file is included into * togl.c. Parts of this file are based on , * "Creating and Using Tcl Handles in C Extensions". * * Neither the Tk public nor the internal interface give enough information * to reuse the font in OpenGL, so we copy the private structures here to * access what we need. * * Globals needed by the font module are in togl.c */ #include struct Togl_BitmapFontInfo { GLuint base; GLuint first; GLuint last; int contextTag; /* TODO: keep original font and/or encoding */ }; typedef struct Togl_BitmapFontInfo Togl_BitmapFontInfo; #define BITMAP_FONT_INFO(obj) \ ((Togl_BitmapFontInfo *) (obj)->internalRep.otherValuePtr) #define SET_BITMAP_FONT_INFO(obj) \ (obj)->internalRep.otherValuePtr static void Togl_FontFree(Tcl_Obj *obj); static void Togl_FontDup(Tcl_Obj *src, Tcl_Obj *dup); static void Togl_FontString(Tcl_Obj *obj); static int Togl_FontSet(Tcl_Interp *interp, Tcl_Obj *obj); static Tcl_ObjType Togl_BitmapFontType = { "Togl BitmapFont", /* name */ Togl_FontFree, /* free internal rep */ Togl_FontDup, /* dup internal rep */ Togl_FontString, /* update string from internal rep */ Togl_FontSet /* set internal rep from string */ }; static int Togl_FontSet(Tcl_Interp *interp, Tcl_Obj *obj) { if (interp) Tcl_AppendResult(interp, "cannot (re)build object of type \"", Togl_BitmapFontType.name, "\"", NULL); return TCL_ERROR; } static void Togl_FontFree(Tcl_Obj *obj) { Togl_BitmapFontInfo *bfi = BITMAP_FONT_INFO(obj); ckfree((char *) bfi); } static void Togl_FontString(Tcl_Obj *obj) { /* assert(obj->bytes == NULL) */ static char buf[256]; register unsigned len; Togl_BitmapFontInfo *bfi = BITMAP_FONT_INFO(obj); #if !defined(TOGL_AGL) && !defined(TOGL_NSOPENGL) snprintf(buf, sizeof buf - 1, "{{%s} %d %d %d}", Togl_BitmapFontType.name, bfi->base, bfi->first, bfi->last); #else /* unlike every other platform, on Aqua, GLint is long */ snprintf(buf, sizeof buf - 1, "{{%s} %ld %ld %ld}", Togl_BitmapFontType.name, bfi->base, bfi->first, bfi->last); #endif buf[sizeof buf - 1] = '\0'; len = strlen(buf); obj->bytes = (char *) ckalloc(len + 1); strcpy(obj->bytes, buf); obj->length = len; } static void Togl_FontDup(Tcl_Obj *src, Tcl_Obj *dup) { /* * When duplicated, lose the font-ness and just be a string. * So don't copy the internal representation and don't set * dup->typePtr. */ } #if defined(TOGL_X11) /* From tkUnixFont.c */ /* * The following structure encapsulates an individual screen font. A font * object is made up of however many SubFonts are necessary to display a * stream of multilingual characters. */ typedef struct FontFamily FontFamily; typedef struct SubFont { char **fontMap; /* Pointer to font map from the FontFamily, * cached here to save a dereference. */ XFontStruct *fontStructPtr; /* The specific screen font that will be used * when displaying/measuring chars belonging to * the FontFamily. */ FontFamily *familyPtr; /* The FontFamily for this SubFont. */ } SubFont; /* * The following structure represents Unix's implementation of a font * object. */ # define SUBFONT_SPACE 3 # define BASE_CHARS 256 typedef struct UnixFont { TkFont font; /* Stuff used by generic font package. Must be * first in structure. */ SubFont staticSubFonts[SUBFONT_SPACE]; /* Builtin space for a limited number of SubFonts. */ int numSubFonts; /* Length of following array. */ SubFont *subFontArray; /* Array of SubFonts that have been loaded in * order to draw/measure all the characters * encountered by this font so far. All fonts * start off with one SubFont initialized by * AllocFont() from the original set of font * attributes. Usually points to * staticSubFonts, but may point to malloced * space if there are lots of SubFonts. */ SubFont controlSubFont; /* Font to use to display control-character * expansions. */ # if 0 Display *display; /* Display that owns font. */ int pixelSize; /* Original pixel size used when font was * constructed. */ TkXLFDAttributes xa; /* Additional attributes that specify the * preferred foundry and encoding to use when * constructing additional SubFonts. */ int widths[BASE_CHARS]; /* Widths of first 256 chars in the base font, * for handling common case. */ int underlinePos; /* Offset from baseline to origin of underline * bar (used when drawing underlined font) * (pixels). */ int barHeight; /* Height of underline or overstrike bar (used * when drawing underlined or strikeout font) * (pixels). */ # endif } UnixFont; #elif defined(TOGL_WGL) # include /* From tkWinFont.c */ typedef struct FontFamily FontFamily; /* * The following structure encapsulates an individual screen font. A font * object is made up of however many SubFonts are necessary to display a * stream of multilingual characters. */ typedef struct SubFont { char **fontMap; /* Pointer to font map from the FontFamily, * cached here to save a dereference. */ HFONT hFont; /* The specific screen font that will be used * when displaying/measuring chars belonging to * the FontFamily. */ FontFamily *familyPtr; /* The FontFamily for this SubFont. */ } SubFont; /* * The following structure represents Windows' implementation of a font * object. */ # define SUBFONT_SPACE 3 # define BASE_CHARS 128 typedef struct WinFont { TkFont font; /* Stuff used by generic font package. Must be * first in structure. */ SubFont staticSubFonts[SUBFONT_SPACE]; /* Builtin space for a limited number of SubFonts. */ int numSubFonts; /* Length of following array. */ SubFont *subFontArray; /* Array of SubFonts that have been loaded in * order to draw/measure all the characters * encountered by this font so far. All fonts * start off with one SubFont initialized by * AllocFont() from the original set of font * attributes. Usually points to * staticSubFonts, but may point to malloced * space if there are lots of SubFonts. */ HWND hwnd; /* Toplevel window of application that owns * this font, used for getting HDC for * offscreen measurements. */ int pixelSize; /* Original pixel size used when font was * constructed. */ int widths[BASE_CHARS]; /* Widths of first 128 chars in the base font, * for handling common case. The base font is * always used to draw characters between * 0x0000 and 0x007f. */ } WinFont; #elif defined(TOGL_AGL) typedef struct FontFamily { struct FontFamily *nextPtr; /* Next in list of all known font families. */ int refCount; /* How many SubFonts are referring to this * FontFamily. When the refCount drops to * zero, this FontFamily may be freed. */ /* * Key. */ FMFontFamily faceNum; /* Unique face number key for this FontFamily. */ /* * Derived properties. */ Tcl_Encoding encoding; /* Encoding for this font family. */ # if 0 int isSymbolFont; /* Non-zero if this is a symbol family. */ int isMultiByteFont; /* Non-zero if this is a multi-byte family. */ char typeTable[256]; /* Table that identfies all lead bytes for a * multi-byte family, used when measuring * chars. If a byte is a lead byte, the value * at the corresponding position in the * typeTable is 1, otherwise 0. If this is a * single-byte font, all entries are 0. */ char *fontMap[FONTMAP_PAGES]; /* Two-level sparse table used to determine quickly if the specified * character exists. As characters are encountered, more pages in this * table are dynamically added. The contents of each page is a bitmask * consisting of FONTMAP_BITSPERPAGE bits, representing whether this font * can be used to display the given character at the corresponding bit * position. The high bits of the character are used to pick which page of * the table is used. */ # endif } FontFamily; /* * The following structure encapsulates an individual screen font. A font * object is made up of however many SubFonts are necessary to display a * stream of multilingual characters. */ typedef struct SubFont { char **fontMap; /* Pointer to font map from the FontFamily, * cached here to save a dereference. */ FontFamily *familyPtr; /* The FontFamily for this SubFont. */ } SubFont; /* * The following structure represents Macintosh's implementation of a font * object. */ # define SUBFONT_SPACE 3 typedef struct MacFont { TkFont font; /* Stuff used by generic font package. Must be * first in structure. */ SubFont staticSubFonts[SUBFONT_SPACE]; /* Builtin space for a limited number of SubFonts. */ int numSubFonts; /* Length of following array. */ SubFont *subFontArray; /* Array of SubFonts that have been loaded in * order to draw/measure all the characters * encountered by this font so far. All fonts * start off with one SubFont initialized by * AllocFont() from the original set of font * attributes. Usually points to * staticSubFonts, but may point to malloced * space if there are lots of SubFonts. */ short size; /* Font size in pixels, constructed from font * attributes. */ short style; /* Style bits, constructed from font * attributes. */ } MacFont; #endif /* * Load the named bitmap font as a sequence of bitmaps in a display list. * fontname may be any font recognized by Tk_GetFont. */ Tcl_Obj * Togl_LoadBitmapFont(const Togl *togl, const char *fontname) { Tk_Font font; Togl_BitmapFontInfo *bfi; Tcl_Obj *obj; #if defined(TOGL_X11) UnixFont *unixfont; XFontStruct *fontinfo; #elif defined(TOGL_WGL) WinFont *winfont; HFONT oldFont; TEXTMETRIC tm; #elif defined(TOGL_AGL) || defined(TOGL_NSOPENGL) MacFont *macfont; #endif int first, last, count; GLuint fontbase; if (!fontname) { fontname = DEFAULT_FONTNAME; } font = Tk_GetFont(togl->Interp, togl->TkWin, fontname); if (!font) { return NULL; } #if defined(TOGL_X11) unixfont = (UnixFont *) font; fontinfo = unixfont->subFontArray->fontStructPtr; first = fontinfo->min_char_or_byte2; last = fontinfo->max_char_or_byte2; #elif defined(TOGL_WGL) winfont = (WinFont *) font; oldFont = (HFONT) SelectObject(togl->tglGLHdc, winfont->subFontArray->hFont); GetTextMetrics(togl->tglGLHdc, &tm); first = tm.tmFirstChar; last = tm.tmLastChar; #elif defined(TOGL_AGL) || defined(TOGL_NSOPENGL) macfont = (MacFont *) font; first = 10; /* don't know how to determine font range on * Mac... */ last = 255; #endif if (last > 255) last = 255; /* no unicode support */ count = last - first + 1; fontbase = glGenLists((GLuint) (last + 1)); if (fontbase == 0) { #ifdef TOGL_WGL SelectObject(togl->tglGLHdc, oldFont); #endif Tk_FreeFont(font); return NULL; } #if defined(TOGL_WGL) wglUseFontBitmaps(togl->tglGLHdc, first, count, fontbase + first); SelectObject(togl->tglGLHdc, oldFont); #elif defined(TOGL_X11) glXUseXFont(fontinfo->fid, first, count, (int) fontbase + first); #elif defined(TOGL_AGL) /* deprecated in OS X 10.5 */ aglUseFont(togl->Ctx, macfont->subFontArray->familyPtr->faceNum, macfont->style, macfont->size, first, count, fontbase + first); #elif defined(TOGL_NSOPENGL) /* No NSOpenGL equivalent to aglUseFont(). */ #endif Tk_FreeFont(font); bfi = (Togl_BitmapFontInfo *) ckalloc(sizeof (Togl_BitmapFontInfo)); bfi->base = fontbase; bfi->first = first; bfi->last = last; bfi->contextTag = togl->contextTag; obj = Tcl_NewObj(); SET_BITMAP_FONT_INFO(obj) = bfi; obj->typePtr = &Togl_BitmapFontType; return obj; } /* * Release the display lists which were generated by Togl_LoadBitmapFont(). */ int Togl_UnloadBitmapFont(const Togl *togl, Tcl_Obj *toglfont) { Togl_BitmapFontInfo *bfi; if (toglfont == NULL || toglfont->typePtr != &Togl_BitmapFontType) { Tcl_Interp *interp = Togl_Interp(togl); Tcl_AppendResult(interp, "font not found", NULL); return TCL_ERROR; } bfi = BITMAP_FONT_INFO(toglfont); glDeleteLists(bfi->base, bfi->last + 1); /* match glGenLists */ return TCL_OK; } int Togl_WriteObj(const Togl *togl, const Tcl_Obj *toglfont, Tcl_Obj *obj) { const char *str; int len; str = Tcl_GetStringFromObj(obj, &len); return Togl_WriteChars(togl, toglfont, str, len); } int Togl_WriteChars(const Togl *togl, const Tcl_Obj *toglfont, const char *str, int len) { /* TODO: assume utf8 encoding and convert to font encoding */ Togl_BitmapFontInfo *bfi; if (toglfont == NULL || toglfont->typePtr != &Togl_BitmapFontType) return -1; bfi = BITMAP_FONT_INFO(toglfont); if (Togl_ContextTag(togl) != bfi->contextTag) return -1; if (len == 0) len = strlen(str); glListBase(bfi->base); glCallLists(len, GL_UNSIGNED_BYTE, str); return len; } netgen-6.2.1804/ng/Togl2.1/LICENSE0000644000175000017500000000276513272137567014556 0ustar kurtkurtThis software is copyrighted by Brian Paul (brian@mesa3d.org), Benjamin Bederson (bederson@cs.umd.edu), and Greg Couch (gregcouch@users.sourceforge.net). The following terms apply to all files associated with the software unless explicitly disclaimed in individual files. The authors hereby grant permission to use, copy, modify, distribute, and license this software and its documentation for any purpose, provided that existing copyright notices are retained in all copies and that this notice is included verbatim in any distributions. No written agreement, license, or royalty fee is required for any of the authorized uses. Modifications to this software may be copyrighted by their authors and need not follow the licensing terms described here, provided that the new terms are clearly indicated on the first page of each file where they apply. IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. netgen-6.2.1804/ng/Togl2.1/configure.in0000755000175000017500000002431713272137567016062 0ustar kurtkurt#!/bin/bash -norc dnl This file is an input file used by the GNU "autoconf" program to dnl generate the file "configure", which is run during Tcl installation dnl to configure the system for the local environment. # # RCS: @(#) $Id: configure.in,v 1.17 2009/03/03 21:49:56 gregcouch Exp $ #----------------------------------------------------------------------- # Sample configure.in for Tcl Extensions. The only places you should # need to modify this file are marked by the string __CHANGE__ #----------------------------------------------------------------------- #----------------------------------------------------------------------- # __CHANGE__ # Set your package name and version numbers here. # # This initializes the environment with PACKAGE_NAME and PACKAGE_VERSION # set as provided. These will also be added as -D defs in your Makefile # so you can encode the package version directly into the source files. #----------------------------------------------------------------------- AC_INIT([Togl], [2.1]) #-------------------------------------------------------------------- # Call TEA_INIT as the first TEA_ macro to set up initial vars. # This will define a ${TEA_PLATFORM} variable == "unix" or "windows" # as well as PKG_LIB_FILE and PKG_STUB_LIB_FILE. #-------------------------------------------------------------------- TEA_INIT([3.7]) AC_CONFIG_AUX_DIR(tclconfig) #-------------------------------------------------------------------- # Load the tclConfig.sh file #-------------------------------------------------------------------- TEA_PATH_TCLCONFIG TEA_LOAD_TCLCONFIG #-------------------------------------------------------------------- # Load the tkConfig.sh file if necessary (Tk extension) #-------------------------------------------------------------------- TEA_PATH_TKCONFIG TEA_LOAD_TKCONFIG #----------------------------------------------------------------------- # Handle the --prefix=... option by defaulting to what Tcl gave. # Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER. #----------------------------------------------------------------------- TEA_PREFIX #----------------------------------------------------------------------- # Standard compiler checks. # This sets up CC by using the CC env var, or looks for gcc otherwise. # This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create # the basic setup necessary to compile executables. #----------------------------------------------------------------------- TEA_SETUP_COMPILER #----------------------------------------------------------------------- # __CHANGE__ # Specify the C source files to compile in TEA_ADD_SOURCES, # public headers that need to be installed in TEA_ADD_HEADERS, # stub library C source files to compile in TEA_ADD_STUB_SOURCES, # and runtime Tcl library files in TEA_ADD_TCL_SOURCES. # This defines PKG(_STUB)_SOURCES, PKG(_STUB)_OBJECTS, PKG_HEADERS # and PKG_TCL_SOURCES. #----------------------------------------------------------------------- TOGL_ENABLE_STUBS TEA_ADD_SOURCES([togl.c toglProcAddr.c toglStubInit.c]) # togl_ws.h is added in Makefile.in because it is generated TEA_ADD_HEADERS([togl.h toglDecls.h]) TEA_ADD_INCLUDES([]) TEA_ADD_LIBS([]) TEA_ADD_CFLAGS([]) if test "${USE_STUBS}" = "1" ; then TEA_ADD_STUB_SOURCES([toglStubLib.c]) fi TEA_ADD_TCL_SOURCES([]) #-------------------------------------------------------------------- # __CHANGE__ # A few miscellaneous platform-specific items: # # Define a special symbol for Windows (BUILD_sample in this case) so # that we create the export library with the dll. # # Windows creates a few extra files that need to be cleaned up. # You can add more files to clean if your extension creates any extra # files. # # TEA_ADD_* any platform specific compiler/build info here. #-------------------------------------------------------------------- # Add pkgIndex.tcl if it is generated in the Makefile instead of ./configure # and change Makefile.in to move it from CONFIG_CLEAN_FILES to BINARIES var. #CLEANFILES="pkgIndex.tcl" if test "${TEA_PLATFORM}" = "windows" ; then AC_DEFINE(BUILD_togl, 1, [Build windows export dll]) CLEANFILES="$CLEANFILES *.lib *.dll *.exp *.ilk *.pdb vc*.pch *.manifest" #TEA_ADD_SOURCES([win/winFile.c]) #TEA_ADD_INCLUDES([-I\"$(${CYGPATH} ${srcdir}/win)\"]) else # Ensure no empty else clauses : CLEANFILES="so_locations" #TEA_ADD_SOURCES([unix/unixFile.c]) #TEA_ADD_LIBS([-lsuperfly]) fi AC_SUBST(CLEANFILES) #-------------------------------------------------------------------- # __CHANGE__ # Choose which headers you need. Extension authors should try very # hard to only rely on the Tcl public header files. Internal headers # contain private data structures and are subject to change without # notice. # This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG #-------------------------------------------------------------------- # find Tcl, Tk, and X11 headers #TEA_PUBLIC_TCL_HEADERS TEA_PRIVATE_TCL_HEADERS #TEA_PUBLIC_TK_HEADERS TEA_PRIVATE_TK_HEADERS TEA_PATH_X # find autostereo header, lib, and daemon AC_ARG_WITH([autostereo], [AS_HELP_STRING([--with-autostereo], [directory with autostereo source (for SGI)])], [with_autostereo=${withval}]) AC_ARG_WITH([autostereod], [AS_HELP_STRING([--with-autostereod], [path to autostereod daemon (for SGI)])], [with_autostereod=${withval}]) AC_ARG_VAR([AUTOSTEREOD], [Path to autostereod for SGI IRIX computers]) AC_MSG_CHECKING([for autostereo directory]) if test x"${with_autostereo}" != x ; then if test -f "${with_autostereo}/lib/autostereo.h" ; then with_autostereo=`(cd ${with_autostereo}; pwd)` TEA_ADD_INCLUDES([-I${with_autostereo}/lib]) TEA_ADD_LIBS([-L${with_autostereo}/lib -lautostereo]) AC_DEFINE_UNQUOTED(HAVE_AUTOSTEREO, 1, [Define this if you have the autostereo header]) else AC_MSG_ERROR([${with_autostereo} directory doesn't contain lib/autostereo.h]) fi fi AC_PATH_PROG([AUTOSTEREOD], [autostereod], [], [`eval \"echo $sbindir\"`:$PATH:/sbin:/usr/sbin]) # Choose OpenGL platform case "${TEA_WINDOWINGSYSTEM}" in aqua) AC_SUBST(TOGL_WINDOWINGSYSTEM,TOGL_AGL) TEA_ADD_LIBS([-framework AGL -framework OpenGL -framework ApplicationServices]) # libGLU is implicit in OpenGL framework LIBGLU= ;; x11) AC_SUBST(TOGL_WINDOWINGSYSTEM,TOGL_X11) AC_ARG_WITH([Xmu], [AS_HELP_STRING([--with-Xmu], [use system's shared Xmu library])], [], [with_Xmu=no]) AS_IF([test "x$with_Xmu" != xno], [AC_CHECK_LIB([Xmu], [XmuLookupStandardColormap], [TEA_ADD_LIBS([-lXmu]) AC_DEFINE(USE_SYSTEM_LIBXMU, 1, [Define to use system Xmu library]) ], [with_Xmu=no], [-lXt -lX11] )]) AS_IF([test "x$with_Xmu" = xno], [TEA_ADD_SOURCES([Xmu/CmapAlloc.c Xmu/CrCmap.c Xmu/DelCmap.c Xmu/LookupCmap.c Xmu/StdCmap.c])]) TEA_ADD_LIBS([-lGL]) LIBGLU=-lGLU TOGL_UNDEF_GET_PROC_ADDRESS ;; win32) AC_SUBST(TOGL_WINDOWINGSYSTEM,TOGL_WGL) TEA_ADD_LIBS([opengl32.lib user32.lib gdi32.lib]) if test "$GCC" = "yes" ; then LIBGLU=-lglu32 else # assume Microsoft compiler LIBGLU=glu32.lib fi ;; *) AC_MSG_ERROR([Unsupported windowing system: ${TEA_WINDOWINGSYSTEM}]) ;; esac AC_SUBST(LIBGLU) AC_SUBST(TEA_WINDOWINGSYSTEM) #-------------------------------------------------------------------- # Check whether --enable-threads or --disable-threads was given. # This auto-enables if Tcl was compiled threaded. #-------------------------------------------------------------------- TEA_ENABLE_THREADS #-------------------------------------------------------------------- # The statement below defines a collection of symbols related to # building as a shared library instead of a static library. #-------------------------------------------------------------------- TEA_ENABLE_SHARED #-------------------------------------------------------------------- # This macro figures out what flags to use with the compiler/linker # when building shared/static debug/optimized objects. This information # can be taken from the tclConfig.sh file, but this figures it all out. #-------------------------------------------------------------------- TEA_CONFIG_CFLAGS # should be part of TEA_CONFIG_CFLAGS, but more visible modification here AC_SUBST(SHLIB_SUFFIX) #-------------------------------------------------------------------- # Set the default compiler switches based on the --enable-symbols option. #-------------------------------------------------------------------- TEA_ENABLE_SYMBOLS #-------------------------------------------------------------------- # Everyone should be linking against the Tcl stub library. If you # can't for some reason, remove this definition. If you aren't using # stubs, you also need to modify the SHLIB_LD_LIBS setting below to # link against the non-stubbed Tcl library. Add Tk too if necessary. #-------------------------------------------------------------------- if test "${USE_STUBS}" = "1" ; then AC_DEFINE(USE_TCL_STUBS, 1, [Use Tcl stubs]) AC_DEFINE(USE_TK_STUBS, 1, [Use Tk stubs]) fi #-------------------------------------------------------------------- # This macro generates a line to use when building a library. It # depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS, # and TEA_LOAD_TCLCONFIG macros above. #-------------------------------------------------------------------- TEA_MAKE_LIB if test "${USE_STUBS}" = "0" ; then SHLIB_LD_LIBS=`echo "$SHLIB_LD_LIBS" | sed -e 's!stub!!g'` fi #-------------------------------------------------------------------- # Determine the name of the tclsh and/or wish executables in the # Tcl and Tk build directories or the location they were installed # into. These paths are used to support running test cases only, # the Makefile should not be making use of these paths to generate # a pkgIndex.tcl file or anything else at extension build time. #-------------------------------------------------------------------- TEA_PROG_TCLSH #TEA_PROG_WISH #-------------------------------------------------------------------- # Finally, substitute all of the various values into the Makefile. # You may alternatively have a special pkgIndex.tcl.in or other files # which require substituting th AC variables in. Include these here. #-------------------------------------------------------------------- AC_OUTPUT([Makefile pkgIndex.tcl togl_ws.h]) netgen-6.2.1804/ng/Togl2.1/overlay.c0000644000175000017500000001224213272137567015365 0ustar kurtkurt/* $Id: overlay.c,v 1.10 2007/08/03 16:48:50 gregcouch Exp $ */ /* * Togl - a Tk OpenGL widget * Copyright (C) 1996-1997 Brian Paul and Ben Bederson * Copyright (C) 2006-2007 Greg Couch * See the LICENSE file for copyright details. */ /* * An example Togl program using an overlay. */ #define USE_TOGL_STUBS #include "togl.h" #include #include #undef TCL_STORAGE_CLASS #define TCL_STORAGE_CLASS DLLEXPORT /* Overlay color indexes: */ static unsigned long Red, Green; /* * Togl widget create callback. This is called by Tcl/Tk when the widget has * been realized. Here's where one may do some one-time context setup or * initializations. */ static int create_cb(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { Togl *togl; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "pathName"); return TCL_ERROR; } if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { return TCL_ERROR; } /* allocate overlay color indexes */ Red = Togl_AllocColorOverlay(togl, 1, 0, 0); Green = Togl_AllocColorOverlay(togl, 0, 1, 0); /* in this demo we always show the overlay */ if (Togl_ExistsOverlay(togl)) { Togl_ShowOverlay(togl); printf("Red and green lines are in the overlay\n"); } else { printf("Sorry, this display doesn't support overlays\n"); } return TCL_OK; } /* * Togl widget reshape callback. This is called by Tcl/Tk when the widget * has been resized. Typically, we call glViewport and perhaps setup the * projection matrix. */ static int reshape_cb(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { int width; int height; float aspect; Togl *togl; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "pathName"); return TCL_ERROR; } if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { return TCL_ERROR; } width = Togl_Width(togl); height = Togl_Height(togl); aspect = (float) width / (float) height; /* Set up viewing for normal plane's context */ glViewport(0, 0, width, height); glMatrixMode(GL_PROJECTION); glLoadIdentity(); glOrtho(-aspect, aspect, -1, 1, -1, 1); glMatrixMode(GL_MODELVIEW); /* Set up viewing for overlay plane's context */ if (Togl_ExistsOverlay(togl)) { Togl_UseLayer(togl, TOGL_OVERLAY); glViewport(0, 0, width, height); glMatrixMode(GL_PROJECTION); glLoadIdentity(); glOrtho(-1, 1, -1, 1, -1, 1); glMatrixMode(GL_MODELVIEW); Togl_UseLayer(togl, TOGL_NORMAL); } return TCL_OK; } /* * Togl widget overlay display callback. This is called by Tcl/Tk when the * overlay has to be redrawn. */ static int overlay_display_cb(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { glClear(GL_COLOR_BUFFER_BIT); glIndexi(Red); glBegin(GL_LINES); glVertex2f(-1, -1); glVertex2f(1, 1); glVertex2f(-1, 1); glVertex2f(1, -1); glEnd(); glIndexi(Green); glBegin(GL_LINE_LOOP); glVertex2f(-0.5f, -0.5f); glVertex2f(0.5f, -0.5f); glVertex2f(0.5f, 0.5f); glVertex2f(-0.5f, 0.5f); glEnd(); glFlush(); return TCL_OK; } /* * Togl widget display callback. This is called by Tcl/Tk when the widget's * contents have to be redrawn. Typically, we clear the color and depth * buffers, render our objects, then swap the front/back color buffers. */ static int display_cb(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { glClear(GL_COLOR_BUFFER_BIT); glLoadIdentity(); glBegin(GL_TRIANGLES); glColor3f(1, 0, 1); glVertex2f(-0.5f, -0.3f); glVertex2f(0.5f, -0.3f); glVertex2f(0, 0.6f); glColor3f(1, 1, 0); glVertex2f(-0.5f + 0.2f, -0.3f - 0.2f); glVertex2f(0.5f + 0.2f, -0.3f - 0.2f); glVertex2f(0 + 0.2f, 0.6f - 0.2f); glColor3f(0, 1, 1); glVertex2f(-0.5f + 0.4f, -0.3f - 0.4f); glVertex2f(0.5f + 0.4f, -0.3f - 0.4f); glVertex2f(0 + 0.4f, 0.6f - 0.4f); glEnd(); glFlush(); return TCL_OK; } /* * Called by Tcl to let me initialize the modules (Togl) I will need. */ EXTERN int Overlay_Init(Tcl_Interp *interp) { /* * Initialize Tcl and the Togl widget module. */ if (Tcl_InitStubs(interp, "8.1", 0) == NULL || Togl_InitStubs(interp, "2.0", 0) == NULL) { return TCL_ERROR; } /* * Specify the C callback functions for widget creation, display, * and reshape. */ Tcl_CreateObjCommand(interp, "create_cb", create_cb, NULL, NULL); Tcl_CreateObjCommand(interp, "display_cb", display_cb, NULL, NULL); Tcl_CreateObjCommand(interp, "reshape_cb", reshape_cb, NULL, NULL); Tcl_CreateObjCommand(interp, "overlay_display_cb", overlay_display_cb, NULL, NULL); /* * Make a new Togl widget command so the Tcl code can set a C variable. */ /* NONE */ /* * Call Tcl_CreateCommand for application-specific commands, if * they weren't already created by the init procedures called above. */ return TCL_OK; } netgen-6.2.1804/ng/Togl2.1/togl.decls0000644000175000017500000001054713272137567015527 0ustar kurtkurtlibrary togl interface togl # Declare each of the functions in the public Togl interface. Note that # the an index should never be reused for a different function in order # to preserve backwards compatibility. # package initialization declare 0 generic { int Togl_Init(Tcl_Interp *interp) } # Miscellaneous declare 1 generic { void Togl_MakeCurrent(const Togl *togl) } declare 2 generic { void Togl_PostRedisplay(Togl *togl) } declare 3 generic { void Togl_SwapBuffers(const Togl *togl) } declare 33 generic { Bool Togl_SwapInterval(const Togl *togl, int interval) } declare 48 generic { int Togl_CopyContext(const Togl *from, const Togl *to, unsigned int mask) } # Query functions declare 4 generic { const char *Togl_Ident(const Togl *togl) } declare 5 generic { int Togl_Width(const Togl *togl) } declare 6 generic { int Togl_Height(const Togl *togl) } declare 7 generic { Tcl_Interp *Togl_Interp(const Togl *togl) } declare 8 generic { Tk_Window Togl_TkWin(const Togl *togl) } declare 9 generic { const char *Togl_CommandName(const Togl *togl) } declare 36 generic { int Togl_ContextTag(const Togl *togl) } declare 37 generic { Bool Togl_UpdatePending(const Togl *togl) } declare 40 generic { Bool Togl_HasRGBA(const Togl *togl) } declare 41 generic { Bool Togl_IsDoubleBuffered(const Togl *togl) } declare 42 generic { Bool Togl_HasDepthBuffer(const Togl *togl) } declare 43 generic { Bool Togl_HasAccumulationBuffer(const Togl *togl) } declare 44 generic { Bool Togl_HasDestinationAlpha(const Togl *togl) } declare 45 generic { Bool Togl_HasStencilBuffer(const Togl *togl) } declare 46 generic { int Togl_StereoMode(const Togl *togl) } declare 47 generic { Bool Togl_HasMultisample(const Togl *togl) } declare 49 generic { int Togl_PixelScale(const Togl *togl) } # Color Index mode declare 10 generic { unsigned long Togl_AllocColor(const Togl *togl, float red, float green, float blue) } declare 11 generic { void Togl_FreeColor(const Togl *togl, unsigned long index) } declare 12 generic { void Togl_SetColor(const Togl *togl, unsigned long index, float red, float green, float blue) } # Bitmap fonts declare 13 generic { Tcl_Obj *Togl_LoadBitmapFont(const Togl *togl, const char *fontname) } declare 14 generic { int Togl_UnloadBitmapFont(const Togl *togl, Tcl_Obj *toglfont) } declare 38 generic { int Togl_WriteObj(const Togl *togl, const Tcl_Obj *toglfont, Tcl_Obj *obj) } declare 39 generic { int Togl_WriteChars(const Togl *togl, const Tcl_Obj *toglfont, const char *str, int len) } # Overlay functions declare 15 generic { void Togl_UseLayer(Togl *togl, int layer) } declare 16 generic { void Togl_ShowOverlay(Togl *togl) } declare 17 generic { void Togl_HideOverlay(Togl *togl) } declare 18 generic { void Togl_PostOverlayRedisplay(Togl *togl) } declare 19 generic { int Togl_ExistsOverlay(const Togl *togl) } declare 20 generic { int Togl_GetOverlayTransparentValue(const Togl *togl) } declare 21 generic { int Togl_IsMappedOverlay(const Togl *togl) } declare 22 generic { unsigned long Togl_AllocColorOverlay(const Togl *togl, float red, float green, float blue) } declare 23 generic { void Togl_FreeColorOverlay(const Togl *togl, unsigned long index) } # User client data declare 24 generic { ClientData Togl_GetClientData(const Togl *togl) } declare 25 generic { void Togl_SetClientData(Togl *togl, ClientData clientData) } # Stereo support declare 26 generic { void Togl_DrawBuffer(Togl *togl, GLenum mode) } declare 27 generic { void Togl_Clear(const Togl *togl, GLbitfield mask) } declare 28 generic { void Togl_Frustum(const Togl *togl, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near, GLdouble far) } declare 34 generic { void Togl_Ortho(const Togl *togl, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near, GLdouble far) } declare 35 generic { int Togl_NumEyes(const Togl *togl) } # save current contents of OpenGL window into photo image declare 30 generic { int Togl_TakePhoto(Togl *togl, Tk_PhotoHandle photo) } # platform-independent lookup of OpenGL functions declare 31 generic { Togl_FuncPtr Togl_GetProcAddr(const char *funcname) } # Return the Togl data associated with pathName declare 29 generic { int Togl_GetToglFromObj(Tcl_Interp *interp, Tcl_Obj *obj, Togl **toglPtr) } declare 32 generic { int Togl_GetToglFromName(Tcl_Interp *interp, const char *cmdName, Togl **toglPtr) } netgen-6.2.1804/ng/Togl2.1/stereo.tcl0000644000175000017500000000714213272137567015550 0ustar kurtkurt#!/bin/sh # the next line restarts using tclsh \ exec tclsh "$0" "$@" # $Id: stereo.tcl,v 1.13 2009/03/31 23:21:13 gregcouch Exp $ # Togl - a Tk OpenGL widget # Copyright (C) 1996 Brian Paul and Ben Bederson # Copyright (C) 2006-2009 Greg Couch # See the LICENSE file for copyright details. # add parent directory to path to find Togl's pkgIndex in current directory if { [file exists pkgIndex.tcl] } { set auto_path [linsert $auto_path 0 ..] } # following load also loads Tk and Togl packages load [file dirname [info script]]/stereo[info sharedlibextension] # create ::stereo namespace namespace eval ::stereo { } variable stereo::mode none proc stereo::setup {} { grid rowconfigure . 0 -weight 1 -minsize 200p grid columnconfigure . 1 -weight 1 -minsize 200p labelframe .c -text "Stereo mode:" grid .c -padx 2 -pady 2 -ipadx 2 -ipady 1 foreach {b} {none native sgioldstyle anaglyph cross-eye wall-eye DTI "row interleaved" "left eye" "right eye" } { set name [string map {- _ " " _} $b] radiobutton .c.b$name -text "$b" -command "::stereo::makeGraphics {$b}" -variable stereo::mode -value "$b" pack .c.b$name -padx 2 -pady 1 -anchor w } scale .sx -label {X Axis} -from 0 -to 360 -command {::stereo::setAngle x} -orient horizontal grid .sx -columnspan 2 -sticky ew scale .sy -label {Y Axis} -from 0 -to 360 -command {::stereo::setAngle y} -orient horizontal grid .sy -columnspan 2 -sticky ew if {[string first IRIX $::tcl_platform(os)] != -1} { label .irix -justify left -wraplength 250p -text "Use /usr/gfx/setmon or /usr/bin/X11/xsetmon to change video mode for native stereo (eg., 1024x768_120s) or sgioldstyle stereo (eg., str_bot) and back." grid .irix -sticky new -columnspan 2 } button .quit -text Close -command exit grid .quit -sticky se -columnspan 2 -padx 2 -pady 2 frame .f -relief groove -borderwidth 2 -bg black grid .f -row 0 -column 1 -sticky news bind . {exit} label .f.error -wraplength 100p -bg black -fg white ::stereo::makeGraphics $stereo::mode } set stereo::count 0 set stereo::gwidget "" proc stereo::makeGraphics {mode} { incr stereo::count set name .f.gr$stereo::count set width 200 set height 200 if { [catch { togl $name -width $width -height $height -rgba true -stereo "$mode" -double true -depth true -sharelist main -create create_cb -display display_cb -reshape reshape_cb -eyeseparation 0.05 -convergence 2.0 -stencil true } error] } { pack forget $stereo::gwidget .f.error configure -text "$error\n\nMake another choice from the stereo modes on the left." pack .f.error -expand 1 -fill both } else { pack forget .f.error $name configure -ident main if { "$stereo::gwidget" != "" } { destroy $stereo::gwidget } set stereo::gwidget $name pack $name -expand 1 -fill both bind $name { ::stereo::motion_event %W \ [lindex [%W config -width] 4] \ [lindex [%W config -height] 4] %x %y } } } # This is called when mouse button 1 is pressed and moved proc stereo::motion_event { widget width height x y } { setXrot $widget [expr 360.0 * $y / $height] setYrot $widget [expr 360.0 * ($width - $x) / $width] # .sx set [expr 360.0 * $y / $height] # .sy set [expr 360.0 * ($width - $x) / $width] .sx set [getXrot] .sy set [getYrot] } # This is called when a slider is changed. proc stereo::setAngle {axis value} { # catch because .f.gr might be a label instead of a Togl widget catch { switch -exact $axis { x {setXrot $stereo::gwidget $value} y {setYrot $stereo::gwidget $value} } } } if { [info script] == $argv0 } { if { $argc == 1 } { set stereo::mode [lindex $argv 0] } ::stereo::setup } netgen-6.2.1804/ng/Togl2.1/pkgIndex.tcl.in0000644000175000017500000000020113272137567016412 0ustar kurtkurt# # Tcl package index file # package ifneeded @PACKAGE_NAME@ @PACKAGE_VERSION@ \ [list load [file join $dir @PKG_LIB_FILE@]] netgen-6.2.1804/ng/Togl2.1/overlay.tcl0000644000175000017500000000202713272137567015725 0ustar kurtkurt#!/bin/sh # the next line restarts using tclsh \ exec tclsh "$0" "$@" # $Id: overlay.tcl,v 1.7 2007/08/03 16:48:50 gregcouch Exp $ # Togl - a Tk OpenGL widget # Copyright (C) 1996 Brian Paul and Ben Bederson # Copyright (C) 2006-2007 Greg Couch # See the LICENSE file for copyright details. # A Tk/OpenGL widget demo using an overlay. # add parent directory to path to find Togl's pkgIndex in current directory if { [file exists pkgIndex.tcl] } { set auto_path [linsert $auto_path 0 ..] } # following load also loads Tk and Togl packages load [file dirname [info script]]/overlay[info sharedlibextension] proc setup {} { wm title . "Overlay demo" togl .win -width 200 -height 200 -rgba true -double false -overlay true -create create_cb -reshape reshape_cb -display display_cb -overlaydisplay overlay_display_cb button .btn -text Quit -command exit pack .win -expand true -fill both pack .btn -expand true -fill both } # Execution starts here! # Execution starts here! if { [info script] == $argv0 } { setup } netgen-6.2.1804/ng/Togl2.1/stereo.c0000644000175000017500000002014413272137567015205 0ustar kurtkurt/* $Id: stereo.c,v 1.14 2009/02/07 07:04:50 gregcouch Exp $ */ /* * Togl - a Tk OpenGL widget * Copyright (C) 1996-1997 Brian Paul and Ben Bederson * Copyright (C) 2006-2009 Greg Couch * See the LICENSE file for copyright details. */ #define USE_TOGL_STUBS #include "togl.h" #include #include #undef TCL_STORAGE_CLASS #define TCL_STORAGE_CLASS DLLEXPORT static Tcl_Obj *toglFont; static double xAngle = 0, yAngle = 0, zAngle = 0; static GLfloat CornerX, CornerY, CornerZ; /* where to print strings */ static double coord_scale = 1; /* * Togl widget create callback. This is called by Tcl/Tk when the widget has * been realized. Here's where one may do some one-time context setup or * initializations. */ static int create_cb(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { Togl *togl; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "pathName"); return TCL_ERROR; } if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { return TCL_ERROR; } return TCL_OK; } /* * Togl widget reshape callback. This is called by Tcl/Tk when the widget * has been resized. Typically, we call glViewport and perhaps setup the * projection matrix. */ static int reshape_cb(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { int width; int height; float aspect; Togl *togl; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "pathName"); return TCL_ERROR; } if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { return TCL_ERROR; } width = Togl_Width(togl); height = Togl_Height(togl); aspect = (float) width / (float) height; glViewport(0, 0, width, height); /* Set up projection transform */ glMatrixMode(GL_PROJECTION); glLoadIdentity(); glFrustum(-aspect, aspect, -1, 1, 1, 10); CornerX = -aspect; CornerY = -1; CornerZ = -1.1f; /* Change back to model view transform for rendering */ glMatrixMode(GL_MODELVIEW); return TCL_OK; } static void draw_eye(Togl *togl) { static GLuint cubeList = 0; Togl_Clear(togl, GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glMatrixMode(GL_PROJECTION); glLoadIdentity(); Togl_Frustum(togl, -1, 1, -1, 1, 1, 10); glMatrixMode(GL_MODELVIEW); if (!cubeList) { cubeList = glGenLists(1); glNewList(cubeList, GL_COMPILE); /* Front face */ glBegin(GL_QUADS); glColor3f(0.4f, 0.8f, 0.4f); /* Green-ish */ glVertex3f(-1, 1, 1); glVertex3f(1, 1, 1); glVertex3f(1, -1, 1); glVertex3f(-1, -1, 1); /* Back face */ glColor3f(0.8f, 0.8f, 0.4f); /* Yellow-ish */ glVertex3f(-1, 1, -1); glVertex3f(1, 1, -1); glVertex3f(1, -1, -1); glVertex3f(-1, -1, -1); /* Top side face */ glColor3f(0.4f, 0.4f, 0.8f); /* Blue-ish */ glVertex3f(-1, 1, 1); glVertex3f(1, 1, 1); glVertex3f(1, 1, -1); glVertex3f(-1, 1, -1); /* Bottom side face */ glColor3f(0.8f, 0.4f, 0.4f); /* Red-ish */ glVertex3f(-1, -1, 1); glVertex3f(1, -1, 1); glVertex3f(1, -1, -1); glVertex3f(-1, -1, -1); glEnd(); glEndList(); } glCallList(cubeList); } /* * Togl widget display callback. This is called by Tcl/Tk when the widget's * contents have to be redrawn. Typically, we clear the color and depth * buffers, render our objects, then swap the front/back color buffers. */ static int display_cb(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { Togl *togl; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "pathName"); return TCL_ERROR; } if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { return TCL_ERROR; } /* setup modelview matrix */ glLoadIdentity(); /* Reset modelview matrix to the identity * matrix */ glTranslatef(0, 0, -3.0); /* Move the camera back three units */ glScaled(coord_scale, coord_scale, coord_scale); /* Zoom in and out */ glRotated(xAngle, 1, 0, 0); /* Rotate by X, Y, and Z angles */ glRotated(yAngle, 0, 1, 0); glRotated(zAngle, 0, 0, 1); glEnable(GL_DEPTH_TEST); if (Togl_NumEyes(togl) == 1) { /* single eye */ Togl_DrawBuffer(togl, GL_BACK); draw_eye(togl); } else { /* stereo left eye */ Togl_DrawBuffer(togl, GL_BACK_LEFT); draw_eye(togl); /* stereo right eye */ Togl_DrawBuffer(togl, GL_BACK_RIGHT); draw_eye(togl); } glDisable(GL_DEPTH_TEST); glLoadIdentity(); glColor3f(1, 1, 1); glRasterPos3f(CornerX, CornerY, CornerZ); Togl_SwapBuffers(togl); return TCL_OK; } static int setXrot_cb(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { Togl *togl; if (objc != 3) { Tcl_WrongNumArgs(interp, 1, objv, "pathName angle"); return TCL_ERROR; } if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { return TCL_ERROR; } if (Tcl_GetDoubleFromObj(interp, objv[2], &xAngle) != TCL_OK) { return TCL_ERROR; } /* printf( "before %f ", xAngle ); */ if (xAngle < 0) { xAngle += 360; } else if (xAngle > 360) { xAngle -= 360; } /* printf( "after %f \n", xAngle ); */ Togl_PostRedisplay(togl); /* Let result string equal value */ Tcl_SetObjResult(interp, objv[2]); return TCL_OK; } static int setYrot_cb(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { Togl *togl; if (objc != 3) { Tcl_WrongNumArgs(interp, 1, objv, "pathName angle"); return TCL_ERROR; } if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { return TCL_ERROR; } if (Tcl_GetDoubleFromObj(interp, objv[2], &yAngle) != TCL_OK) { return TCL_ERROR; } if (yAngle < 0) { yAngle += 360; } else if (yAngle > 360) { yAngle -= 360; } Togl_PostRedisplay(togl); /* Let result string equal value */ Tcl_SetObjResult(interp, objv[2]); return TCL_OK; } int getXrot_cb(ClientData clientData, Tcl_Interp *interp, int argc, CONST84 char *argv[]) { Tcl_SetObjResult(interp, Tcl_NewDoubleObj(xAngle)); return TCL_OK; } int getYrot_cb(ClientData clientData, Tcl_Interp *interp, int argc, CONST84 char *argv[]) { Tcl_SetObjResult(interp, Tcl_NewDoubleObj(yAngle)); return TCL_OK; } static int coord_scale_cb(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { Togl *togl; if (objc != 3) { Tcl_WrongNumArgs(interp, 1, objv, "pathName value"); return TCL_ERROR; } if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { return TCL_ERROR; } if (Tcl_GetDoubleFromObj(interp, objv[2], &coord_scale) != TCL_OK) { return TCL_ERROR; } Togl_PostRedisplay(togl); /* Let result string equal value */ Tcl_SetObjResult(interp, objv[2]); return TCL_OK; } EXTERN int Stereo_Init(Tcl_Interp *interp) { /* * Initialize Tcl and the Togl widget module. */ if (Tcl_InitStubs(interp, "8.1", 0) == NULL || Togl_InitStubs(interp, "2.0", 0) == NULL) { return TCL_ERROR; } /* * Specify the C callback functions for widget creation, display, * and reshape. */ Tcl_CreateObjCommand(interp, "create_cb", create_cb, NULL, NULL); Tcl_CreateObjCommand(interp, "display_cb", display_cb, NULL, NULL); Tcl_CreateObjCommand(interp, "reshape_cb", reshape_cb, NULL, NULL); Tcl_CreateObjCommand(interp, "setXrot", setXrot_cb, NULL, NULL); Tcl_CreateObjCommand(interp, "setYrot", setYrot_cb, NULL, NULL); Tcl_CreateObjCommand(interp, "coord_scale", coord_scale_cb, NULL, NULL); /* * Call Tcl_CreateCommand for application-specific commands, if * they weren't already created by the init procedures called above. */ Tcl_CreateCommand(interp, "getXrot", getXrot_cb, NULL, NULL); Tcl_CreateCommand(interp, "getYrot", getYrot_cb, NULL, NULL); return TCL_OK; } netgen-6.2.1804/ng/Togl2.1/Togl.py0000644000175000017500000000634313272137567015024 0ustar kurtkurt """ Tkinter support for the Togl 2.X Tk OpenGL widget. Copyright (C) 2006-2007 Greg Couch See the LICENSE file for copyright details. """ __all__ = ['Togl', 'NORMAL', 'OVERLAY'] import Tkinter import weakref, atexit # Overlay constants NORMAL = 1 OVERLAY = 2 class Togl(Tkinter.Widget): """Tk OpenGL Widget""" _instances = weakref.WeakKeyDictionary() def __init__(self, master=None, cnf={}, **kw): """Return new Togl widget""" if master is None: master = Tkinter._default_root master.tk.call('package', 'require', 'Togl', '2.0') try: Tkinter.Widget.__init__(self, master, "togl", cnf, kw) except: Tkinter.Widget.destroy(self) raise Togl._instances[self] = True def _cbsubst(self, *args): """callback command argument substitution""" if len(args) != 1: return args return (self._nametowidget(args[0]),) def _options(self, cnf, kw = None): """Internal function.""" if kw: cnf = Tkinter._cnfmerge((cnf, kw)) else: cnf = Tkinter._cnfmerge(cnf) res = () for k, v in cnf.items(): if v is not None: if k[-1] == '_': k = k[:-1] if callable(v): if k.endswith('command'): v = self._register(v, self._cbsubst) else: v = self._register(v) res = res + ('-'+k, v) return res # cget, configure are inherited def extensions(self): """Return list of supported OpenGL extensions""" return self.tk.call(self._w, 'extensions') def postredisplay(self): """Cause the displaycommand callback to be called the next time the event loop is idle.""" self.tk.call(self._w, 'postredisplay') def render(self): """Call the displaycommand callback immediately.""" self.tk.call(self._w, 'render') def swapbuffers(self): """If single-buffred, just flush OpenGL command buffer. If double-buffered, swap front and back buffers. (So this is appropriate to call after every frame is drawn.)""" self.tk.call(self._w, 'swapbuffers') def makecurrent(self): """Make widget the current OpenGL context""" self.tk.call(self._w, 'makecurrent') def takephoto(self, imageName): """Copy current contents of widget into the given photo image """ self.tk.call(self._w, 'takephoto', imageName) def loadbitmapfont(self, name): return self.tk.call(self._w, 'loadbitmapfont', name) def unloadbitmapfont(self, fontbase): self.tk.call(self._w, 'unloadbitmapfont', fontbase) def uselayer(self, layer): self.tk.call(self._w, 'uselayer', layer) def showoverlay(self): self.tk.call(self._w, 'showoverlay') def hideoverlay(self): self.tk.call(self._w, 'hideoverlay') def postredisplayoverlay(self): self.tk.call(self._w, 'postredisplayoverlay') def renderoverlay(self): self.tk.call(self._w, 'renderoverlay') def existsoverlay(self): return self.tk.call(self._w, 'existsoverlay') def ismappedoverlay(self): return self.tk.call(self._w, 'ismappedoverlay') def getoverlaytransparentvalue(self): return self.tk.call(self._w, 'getoverlaytransparentvalue') def destroy(self): del Togl._instances[self] Tkinter.Widget.destroy(self) def _cleanup(): # destroy OpenGL contexts early, so destroycommand's don't # try to make any OpenGL calls during exit. for t in Togl._instances.keys(): try: t.destroy() except Tkinter.TclError: pass atexit.register(_cleanup) netgen-6.2.1804/ng/Togl2.1/double.tcl0000644000175000017500000000601113272137567015513 0ustar kurtkurt#!/bin/sh # the next line restarts using tclsh \ exec tclsh "$0" "$@" # $Id: double.tcl,v 1.11 2009/03/12 23:59:35 gregcouch Exp $ # Togl - a Tk OpenGL widget # Copyright (C) 1996 Brian Paul and Ben Bederson # Copyright (C) 2006-2007 Greg Couch # See the LICENSE file for copyright details. # An Tk/OpenGL widget demo with two windows, one single buffered and the # other double buffered. package provide double 1.0 # add parent directory to path to find Togl's pkgIndex in current directory if { [file exists pkgIndex.tcl] } { set auto_path [linsert $auto_path 0 ..] } # following load also loads Tk and Togl packages load [file dirname [info script]]/double[info sharedlibextension] # create ::double namespace namespace eval ::double { } proc double::setup {} { wm title . "Single vs Double Buffering" # create first Togl widget togl .o1 -width 200 -height 200 -rgba true -double false -depth true -ident "Single Buffered" -create double::create_cb -display double::display_cb -reshape double::reshape_cb # create second Togl widget, share display lists with first widget togl .o2 -width 200 -height 200 -rgba true -double true -depth true -ident "Double Buffered" -sharelist "Single Buffered" -create double::create_cb -display double::display_cb -reshape double::reshape_cb scale .sx -label {X Axis} -from 0 -to 360 -command {::double::setAngle x} -orient horizontal scale .sy -label {Y Axis} -from 0 -to 360 -command {::double::setAngle y} -orient horizontal button .btn -text Quit -command exit bind .o1 { ::double::motion_event [lindex [%W config -width] 4] \ [lindex [%W config -height] 4] \ %x %y } bind .o2 { ::double::motion_event [lindex [%W config -width] 4] \ [lindex [%W config -height] 4] \ %x %y } grid rowconfigure . 0 -weight 1 grid columnconfigure . 0 -weight 1 -uniform same grid columnconfigure . 1 -weight 1 -uniform same grid .o1 -row 0 -column 0 -sticky nesw -padx 3 -pady 3 grid .o2 -row 0 -column 1 -sticky nesw -padx 3 -pady 3 #grid .l1 -row 1 -column 0 -sticky ew -padx 3 -pady 3 #grid .l2 -row 1 -column 1 -sticky ew -padx 3 -pady 3 grid .sx -row 2 -column 0 -columnspan 2 -sticky ew grid .sy -row 3 -column 0 -columnspan 2 -sticky ew grid .btn -row 4 -column 0 -columnspan 2 -sticky ew } # This is called when mouse button 1 is pressed and moved in either of # the OpenGL windows. proc double::motion_event { width height x y } { .sx set [double::setXrot [expr 360.0 * $y / $height]] .sy set [double::setYrot [expr 360.0 * ($width - $x) / $width]] .o1 postredisplay .o2 postredisplay } # This is called when a slider is changed. proc double::setAngle {axis value} { global xAngle yAngle zAngle switch -exact $axis { x {double::setXrot $value double::setXrot $value} y {double::setYrot $value double::setYrot $value} } .o1 postredisplay .o2 postredisplay } # Execution starts here! if { [info script] == $argv0 } { ::double::setup } netgen-6.2.1804/ng/Togl2.1/gears.c0000644000175000017500000003117413272137567015012 0ustar kurtkurt/* gears.c */ /* * 3-D gear wheels. This program is in the public domain. * * Brian Paul * * * Modified to work under Togl as a widget for TK 1997 * * Philip Quaife * */ #define USE_TOGL_STUBS #include "togl.h" #include #include #include #undef TCL_STORAGE_CLASS #define TCL_STORAGE_CLASS DLLEXPORT #ifndef M_PI # define M_PI 3.14159265 #endif #define FM_PI ((float) M_PI) #ifdef _MSC_VER __inline float sinf(double a) { return (float) sin(a); } __inline float cosf(double a) { return (float) cos(a); } __inline float sqrtf(double a) { return (float) sqrt(a); } # define sin sinf # define cos cosf # define sqrt sqrtf #endif struct WHIRLYGIZMO { int Gear1, Gear2, Gear3; double Rotx, Roty, Rotz; double Angle; int Height, Width; }; typedef struct WHIRLYGIZMO WHIRLYGIZMO; /* * Draw a gear wheel. You'll probably want to call this function when * building a display list since we do a lot of trig here. * * Input: inner_radius - radius of hole at center * outer_radius - radius at center of teeth * width - width of gear * teeth - number of teeth * tooth_depth - depth of tooth */ static void gear(GLfloat inner_radius, GLfloat outer_radius, GLfloat width, GLint teeth, GLfloat tooth_depth) { GLint i; GLfloat r0, r1, r2; GLfloat angle, da; GLfloat u, v, len; r0 = inner_radius; r1 = outer_radius - tooth_depth / 2; r2 = outer_radius + tooth_depth / 2; da = 2 * FM_PI / teeth / 4; glShadeModel(GL_FLAT); glNormal3f(0, 0, 1); /* draw front face */ glBegin(GL_QUAD_STRIP); for (i = 0; i <= teeth; i++) { angle = i * 2 * FM_PI / teeth; glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5f); glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5f); glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5f); glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), width * 0.5f); } glEnd(); /* draw front sides of teeth */ glBegin(GL_QUADS); da = 2 * FM_PI / teeth / 4; for (i = 0; i < teeth; i++) { angle = i * 2 * FM_PI / teeth; glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5f); glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), width * 0.5f); glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), width * 0.5f); glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), width * 0.5f); } glEnd(); glNormal3f(0, 0, -1); /* draw back face */ glBegin(GL_QUAD_STRIP); for (i = 0; i <= teeth; i++) { angle = i * 2 * FM_PI / teeth; glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5f); glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5f); glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), -width * 0.5f); glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5f); } glEnd(); /* draw back sides of teeth */ glBegin(GL_QUADS); da = 2 * FM_PI / teeth / 4; for (i = 0; i < teeth; i++) { angle = i * 2 * FM_PI / teeth; glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), -width * 0.5f); glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), -width * 0.5f); glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), -width * 0.5f); glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5f); } glEnd(); /* draw outward faces of teeth */ glBegin(GL_QUAD_STRIP); for (i = 0; i < teeth; i++) { angle = i * 2 * FM_PI / teeth; glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5f); glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5f); u = r2 * cos(angle + da) - r1 * cos(angle); v = r2 * sin(angle + da) - r1 * sin(angle); len = sqrt(u * u + v * v); u /= len; v /= len; glNormal3f(v, -u, 0); glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), width * 0.5f); glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), -width * 0.5f); glNormal3f(cos(angle), sin(angle), 0); glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), width * 0.5f); glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), -width * 0.5f); u = r1 * cos(angle + 3 * da) - r2 * cos(angle + 2 * da); v = r1 * sin(angle + 3 * da) - r2 * sin(angle + 2 * da); glNormal3f(v, -u, 0); glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), width * 0.5f); glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), -width * 0.5f); glNormal3f(cos(angle), sin(angle), 0); } glVertex3f(r1 /* * cos(0) */ , /* r1 * sin(0) */ 0, width * 0.5f); glVertex3f(r1 /* * cos(0) */ , /* r1 * sin(0) */ 0, -width * 0.5f); glEnd(); glShadeModel(GL_SMOOTH); /* draw inside radius cylinder */ glBegin(GL_QUAD_STRIP); for (i = 0; i <= teeth; i++) { angle = i * 2 * FM_PI / teeth; glNormal3f(-cos(angle), -sin(angle), 0); glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5f); glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5f); } glEnd(); } /* * static GLfloat view_rotx=20, view_roty=30, view_rotz=0; static GLint * gear1, gear2, gear3; static GLfloat angle = 0; */ static GLuint limit; static GLuint count = 1; static GLubyte polycolor[4] = { 255, 255, 255, 255 }; static int draw(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { WHIRLYGIZMO *Wg; Togl *togl; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "pathName"); return TCL_ERROR; } if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { return TCL_ERROR; } glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); Wg = (WHIRLYGIZMO *) Togl_GetClientData(togl); glDisable(GL_TEXTURE_2D); glPushMatrix(); glRotatef((float) Wg->Rotx, 1, 0, 0); glRotatef((float) Wg->Roty, 0, 1, 0); glRotatef((float) Wg->Rotz, 0, 0, 1); glPushMatrix(); glTranslatef(-3, -2, 0); glRotatef((float) Wg->Angle, 0, 0, 1); glEnable(GL_DEPTH_TEST); glCallList(Wg->Gear1); glEnable(GL_DEPTH_TEST); glPopMatrix(); glPushMatrix(); glTranslatef(3.1f, -2, 0); glRotatef(-2 * (float) Wg->Angle - 9, 0, 0, 1); glCallList(Wg->Gear2); glPopMatrix(); glPushMatrix(); glTranslatef(-3.1f, 4.2f, 0); glRotatef(-2 * (float) Wg->Angle - 25, 0, 0, 1); glCallList(Wg->Gear3); glPopMatrix(); glPopMatrix(); Togl_SwapBuffers(togl); return TCL_OK; } static int zap(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { WHIRLYGIZMO *Wg; Togl *togl; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "pathName"); return TCL_ERROR; } if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { return TCL_ERROR; } Wg = (WHIRLYGIZMO *) Togl_GetClientData(togl); free(Wg); return TCL_OK; } static int idle(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { WHIRLYGIZMO *Wg; Togl *togl; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "pathName"); return TCL_ERROR; } if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { return TCL_ERROR; } Wg = (WHIRLYGIZMO *) Togl_GetClientData(togl); Wg->Angle += 2; Togl_PostRedisplay(togl); return TCL_OK; } /* change view angle, exit upon ESC */ /* * static GLenum key(int k, GLenum mask) { switch (k) { case TK_UP: view_rotx * += 5; return GL_TRUE; case TK_DOWN: view_rotx -= 5; return GL_TRUE; case * TK_LEFT: view_roty += 5; return GL_TRUE; case TK_RIGHT: view_roty -= 5; * return GL_TRUE; case TK_z: view_rotz += 5; return GL_TRUE; case TK_Z: * view_rotz -= 5; return GL_TRUE; } return GL_FALSE; } */ /* new window size or exposure */ static int reshape(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { int width, height; Togl *togl; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "pathName"); return TCL_ERROR; } if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { return TCL_ERROR; } width = Togl_Width(togl); height = Togl_Height(togl); glViewport(0, 0, (GLint) width, (GLint) height); glMatrixMode(GL_PROJECTION); glLoadIdentity(); if (width > height) { GLfloat w = (GLfloat) width / (GLfloat) height; glFrustum(-w, w, -1, 1, 5, 60); } else { GLfloat h = (GLfloat) height / (GLfloat) width; glFrustum(-1, 1, -h, h, 5, 60); } glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glTranslatef(0, 0, -40); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); return TCL_OK; } static int init(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { WHIRLYGIZMO *Wg; static GLfloat red[4] = { 0.8f, 0.1f, 0, 1 }; static GLfloat green[4] = { 0, 0.8f, 0.2f, 1 }; static GLfloat blue[4] = { 0.2f, 0.2f, 1, 1 }; static GLfloat pos[4] = { 5, 5, 10, 0 }; Togl *togl; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "pathName"); return TCL_ERROR; } if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { return TCL_ERROR; } glLightfv(GL_LIGHT0, GL_POSITION, pos); glEnable(GL_CULL_FACE); glEnable(GL_LIGHTING); glEnable(GL_LIGHT0); glEnable(GL_DEPTH_TEST); /* make the gears */ Wg = (WHIRLYGIZMO *) malloc(sizeof (WHIRLYGIZMO)); if (!Wg) { Tcl_SetResult(Togl_Interp(togl), "\"Cannot allocate client data for widget\"", TCL_STATIC); } Wg->Gear1 = glGenLists(1); glNewList(Wg->Gear1, GL_COMPILE); glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, red); gear(1, 4, 1, 20, 0.7f); glEndList(); Wg->Gear2 = glGenLists(1); glNewList(Wg->Gear2, GL_COMPILE); glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, green); gear(0.5f, 2, 2, 10, 0.7f); glEndList(); Wg->Gear3 = glGenLists(1); glNewList(Wg->Gear3, GL_COMPILE); glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, blue); gear(1.3f, 2, 0.5f, 10, 0.7f); glEndList(); glEnable(GL_NORMALIZE); Wg->Height = Togl_Height(togl); Wg->Width = Togl_Width(togl); Wg->Angle = 0; Wg->Rotx = 0; Wg->Roty = 0; Wg->Rotz = 0; Togl_SetClientData(togl, (ClientData) Wg); return TCL_OK; } static int position(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { WHIRLYGIZMO *Wg; char Result[100]; Togl *togl; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "pathName"); return TCL_ERROR; } if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { return TCL_ERROR; } Wg = (WHIRLYGIZMO *) Togl_GetClientData(togl); /* Let result string equal value */ sprintf(Result, "%g %g", Wg->Roty, Wg->Rotx); Tcl_SetResult(interp, Result, TCL_VOLATILE); return TCL_OK; } static int rotate(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { WHIRLYGIZMO *Wg; Togl *togl; if (objc != 4) { Tcl_WrongNumArgs(interp, 1, objv, "pathName yrot xrot"); return TCL_ERROR; } if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { return TCL_ERROR; } Wg = (WHIRLYGIZMO *) Togl_GetClientData(togl); if (Tcl_GetDoubleFromObj(interp, objv[2], &Wg->Roty) != TCL_OK) { return TCL_ERROR; } if (Tcl_GetDoubleFromObj(interp, objv[3], &Wg->Rotx) != TCL_OK) { return TCL_ERROR; } Togl_PostRedisplay(togl); return TCL_OK; } EXTERN int Gears_Init(Tcl_Interp *interp) { /* * Initialize Tcl and the Togl widget module. */ if (Tcl_InitStubs(interp, "8.1", 0) == NULL || Togl_InitStubs(interp, "2.0", 0) == NULL) { return TCL_ERROR; } /* * Specify the C callback functions for widget creation, display, * and reshape. */ Tcl_CreateObjCommand(interp, "init", init, NULL, NULL); Tcl_CreateObjCommand(interp, "zap", zap, NULL, NULL); Tcl_CreateObjCommand(interp, "draw", draw, NULL, NULL); Tcl_CreateObjCommand(interp, "reshape", reshape, NULL, NULL); Tcl_CreateObjCommand(interp, "idle", idle, NULL, NULL); Tcl_CreateObjCommand(interp, "rotate", rotate, NULL, NULL); Tcl_CreateObjCommand(interp, "position", position, NULL, NULL); return TCL_OK; } netgen-6.2.1804/ng/Togl2.1/gears.tcl0000644000175000017500000000456413272137567015355 0ustar kurtkurt#!/bin/sh # the next line restarts using tclsh \ exec tclsh "$0" "$@" # Togl - a Tk OpenGL widget # Copyright (C) 1996-1997 Brian Paul and Ben Bederson # Copyright (C) 2006-2007 Greg Couch # See the LICENSE file for copyright details. # # Test Togl using GL Gears Demo # # Copyright (C) 1997 Philip Quaife # package provide gears 1.0 # add parent directory to path to find Togl's pkgIndex in current directory if { [file exists pkgIndex.tcl] } { set auto_path [linsert $auto_path 0 ..] } # following load also loads Tk and Togl packages load [file dirname [info script]]/gears[info sharedlibextension] # create ::gears namespace namespace eval ::gears { } proc ::gears::setup {} { global startx starty xangle0 yangle0 xangle yangle RotCnt global vTime set RotCnt 1 set xangle 0.0 set yangle 0.0 set vTime 100 wm title . "Rotating Gear Widget Test" label .t -text "Click and drag to rotate image" pack .t -side top -padx 2 -pady 10 frame .f pack .f -side top button .f.n1 -text " Add " -command ::gears::AutoRot button .f.r1 -text "Remove" -command ::gears::DelRot button .f.b1 -text " Quit " -command exit entry .f.t -width 4 -textvariable vTime pack .f.n1 .f.t .f.r1 .f.b1 -side left -anchor w -padx 5 newRot .w0 10 } proc ::gears::AutoRot {} { global RotCnt vTime newRot .w$RotCnt $vTime set RotCnt [expr $RotCnt + 1] } proc ::gears::DelRot {} { global RotCnt vTime if { $RotCnt != 0 } { set RotCnt [expr $RotCnt - 1] destroy .w$RotCnt } } proc ::gears::newRot {win {tick 100} } { togl $win -width 200 -height 200 -rgba true -double true -depth true -privatecmap false -time $tick -create init -destroy zap -display draw -reshape reshape -timer idle bind $win {::gears::RotStart %x %y %W} bind $win {::gears::RotMove %x %y %W} pack $win -expand true -fill both } proc ::gears::RotStart {x y W} { global startx starty xangle0 yangle0 xangle yangle set startx $x set starty $y set vPos [position $W] set xangle0 [lindex $vPos 0] set yangle0 [lindex $vPos 1] } proc ::gears::RotMove {x y W} { global startx starty xangle0 yangle0 xangle yangle set xangle [expr $xangle0 + ($x - $startx)] set yangle [expr $yangle0 + ($y - $starty)] rotate $W $xangle $yangle } if { [info script] == $argv0 } { ::gears::setup } netgen-6.2.1804/ng/Togl2.1/toglStubInit.c0000755000175000017500000000357713272137567016351 0ustar kurtkurt/* * Togl - a Tk OpenGL widget * * Copyright (C) 1996-2002 Brian Paul and Ben Bederson * Copyright (C) 2005-2009 Greg Couch * See the LICENSE file for copyright details. */ #include "togl.h" extern const ToglStubs toglStubs; /* !BEGIN!: Do not edit below this line. */ const ToglStubs toglStubs = { TCL_STUB_MAGIC, NULL, Togl_Init, /* 0 */ Togl_MakeCurrent, /* 1 */ Togl_PostRedisplay, /* 2 */ Togl_SwapBuffers, /* 3 */ Togl_Ident, /* 4 */ Togl_Width, /* 5 */ Togl_Height, /* 6 */ Togl_Interp, /* 7 */ Togl_TkWin, /* 8 */ Togl_CommandName, /* 9 */ Togl_AllocColor, /* 10 */ Togl_FreeColor, /* 11 */ Togl_SetColor, /* 12 */ Togl_LoadBitmapFont, /* 13 */ Togl_UnloadBitmapFont, /* 14 */ Togl_UseLayer, /* 15 */ Togl_ShowOverlay, /* 16 */ Togl_HideOverlay, /* 17 */ Togl_PostOverlayRedisplay, /* 18 */ Togl_ExistsOverlay, /* 19 */ Togl_GetOverlayTransparentValue, /* 20 */ Togl_IsMappedOverlay, /* 21 */ Togl_AllocColorOverlay, /* 22 */ Togl_FreeColorOverlay, /* 23 */ Togl_GetClientData, /* 24 */ Togl_SetClientData, /* 25 */ Togl_DrawBuffer, /* 26 */ Togl_Clear, /* 27 */ Togl_Frustum, /* 28 */ Togl_GetToglFromObj, /* 29 */ Togl_TakePhoto, /* 30 */ Togl_GetProcAddr, /* 31 */ Togl_GetToglFromName, /* 32 */ Togl_SwapInterval, /* 33 */ Togl_Ortho, /* 34 */ Togl_NumEyes, /* 35 */ Togl_ContextTag, /* 36 */ Togl_UpdatePending, /* 37 */ Togl_WriteObj, /* 38 */ Togl_WriteChars, /* 39 */ Togl_HasRGBA, /* 40 */ Togl_IsDoubleBuffered, /* 41 */ Togl_HasDepthBuffer, /* 42 */ Togl_HasAccumulationBuffer, /* 43 */ Togl_HasDestinationAlpha, /* 44 */ Togl_HasStencilBuffer, /* 45 */ Togl_StereoMode, /* 46 */ Togl_HasMultisample, /* 47 */ Togl_CopyContext, /* 48 */ }; /* !END!: Do not edit above this line. */ netgen-6.2.1804/ng/Togl2.1/aclocal.m40000644000175000017500000000340313272137567015377 0ustar kurtkurt# # Include the TEA standard macro set # builtin(include,tclconfig/tcl.m4) # # Add here whatever m4 macros you want to define for your package # #------------------------------------------------------------------------ # TOGL_ENABLE_STUBS -- # # Specify if stubs should be used. # # Arguments: # none # # Results: # # Adds the following arguments to configure: # --enable-stubs # #------------------------------------------------------------------------ AC_DEFUN(TOGL_ENABLE_STUBS, [ AC_MSG_CHECKING([whether to link with stubs library]) AC_ARG_ENABLE(stubs, [ --enable-stubs build and link with stub libraries (--enable-stubs)], [tcl_ok=$enableval], [tcl_ok=yes]) if test "${enable_stubs+set}" = set; then enableval="$enable_stubs" tcl_ok=$enableval else tcl_ok=yes fi if test "$tcl_ok" = "yes" ; then AC_MSG_RESULT([stubs]) USE_STUBS=1 else AC_MSG_RESULT([no stubs]) USE_STUBS=0 fi ]) #------------------------------------------------------------------------ # TOGL_UNDEF_GET_PROC_ADDRESS -- # # Does defining GLX_GLXEXT_LEGACY interfer with including GL/glxext.h? # # Arguments: # none # # Results: # # defines TOGL_UNDEF_GET_PROC_ADDRESS # #------------------------------------------------------------------------ AC_DEFUN(TOGL_UNDEF_GET_PROC_ADDRESS, [ AC_MSG_CHECKING([if GLX_GLXEXT_LEGACY interfers with including GL/glxext.h]) AC_LANG_PUSH(C) ac_save_CFLAGS=$CFLAGS CFLAGS=$TK_XINCLUDES AC_COMPILE_IFELSE( [AC_LANG_SOURCE([[ #define GLX_GLXEXT_LEGACY #include #undef GLX_VERSION_1_3 #undef GLX_VERSION_1_4 #include int main() { return 0; } ]])], [AC_MSG_RESULT([no])], [AC_MSG_RESULT([yes]) AC_DEFINE(UNDEF_GET_PROC_ADDRESS, 1)]) CFLAGS=$ac_save_CFLAGS AC_LANG_POP() ]) netgen-6.2.1804/ng/Togl2.1/toglWGL.c0000644000175000017500000004773613272137567015243 0ustar kurtkurt/* $Id: toglWGL.c,v 1.8 2009/12/23 21:50:49 gregcouch Exp $ */ /* vi:set sw=4 expandtab: */ /* * Togl - a Tk OpenGL widget * * Copyright (C) 1996-2002 Brian Paul and Ben Bederson * Copyright (C) 2005-2009 Greg Couch * See the LICENSE file for copyright details. */ /* TODO: fullscreen support */ #include #include #include #include #include #include #ifndef PFD_SUPPORT_COMPOSITION /* for Vista -- not needed because we don't use PFD_SUPPORT_GDI/BITMAP */ # define PFD_SUPPORT_COMPOSITION 0x00008000 #endif /* TODO: move these statics into global structure */ static PFNWGLGETEXTENSIONSSTRINGARBPROC getExtensionsString = NULL; static PFNWGLCHOOSEPIXELFORMATARBPROC choosePixelFormat; static PFNWGLGETPIXELFORMATATTRIBIVARBPROC getPixelFormatAttribiv; static PFNWGLCREATEPBUFFERARBPROC createPbuffer = NULL; static PFNWGLDESTROYPBUFFERARBPROC destroyPbuffer = NULL; static PFNWGLGETPBUFFERDCARBPROC getPbufferDC = NULL; static PFNWGLRELEASEPBUFFERDCARBPROC releasePbufferDC = NULL; static PFNWGLQUERYPBUFFERARBPROC queryPbuffer = NULL; static int hasMultisampling = FALSE; static int hasPbuffer = FALSE; static int hasARBPbuffer = FALSE; static HWND toglCreateTestWindow(HWND parent) { static char ClassName[] = "ToglTestWindow"; WNDCLASS wc; HINSTANCE instance = GetModuleHandle(NULL); HWND wnd; HDC dc; PIXELFORMATDESCRIPTOR pfd; int pixelFormat; wc.style = CS_OWNDC; wc.lpfnWndProc = DefWindowProc; wc.cbClsExtra = 0; wc.cbWndExtra = 0; wc.hInstance = instance; wc.hIcon = LoadIcon(NULL, IDI_WINLOGO); wc.hCursor = LoadCursor(NULL, IDC_ARROW); wc.hbrBackground = NULL; wc.lpszMenuName = NULL; wc.lpszClassName = ClassName; if (!RegisterClass(&wc)) { DWORD err = GetLastError(); if (err != ERROR_CLASS_ALREADY_EXISTS) { fprintf(stderr, "Unable to register Togl Test Window class\n"); return NULL; } } wnd = CreateWindow(ClassName, "test OpenGL capabilities", WS_OVERLAPPEDWINDOW | WS_CLIPSIBLINGS | WS_CLIPCHILDREN, 0, 0, 1, 1, parent, NULL, instance, NULL); if (wnd == NULL) { fprintf(stderr, "Unable to create temporary OpenGL window\n"); return NULL; } dc = GetDC(wnd); memset(&pfd, 0, sizeof pfd); pfd.nSize = sizeof pfd; pfd.nVersion = 1; pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER; pfd.iPixelType = PFD_TYPE_RGBA; pfd.cColorBits = 3; pfd.iLayerType = PFD_MAIN_PLANE; pixelFormat = ChoosePixelFormat(dc, &pfd); if (pixelFormat == 0) { fprintf(stderr, "Unable to choose simple pixel format\n"); ReleaseDC(wnd, dc); return NULL; } if (!SetPixelFormat(dc, pixelFormat, &pfd)) { fprintf(stderr, "Unable to set simple pixel format\n"); ReleaseDC(wnd, dc); return NULL; } ShowWindow(wnd, SW_HIDE); // make sure it's hidden ReleaseDC(wnd, dc); return wnd; } struct FBInfo { int stereo; int acceleration; int colors; int depth; int samples; int pixelFormat; }; typedef struct FBInfo FBInfo; static int FBAttribs[] = { /* must match order in FBInfo structure */ WGL_STEREO_ARB, WGL_ACCELERATION_ARB, WGL_COLOR_BITS_ARB, WGL_DEPTH_BITS_ARB, WGL_SAMPLES_ARB, }; #define NUM_FBAttribs (sizeof FBAttribs / sizeof FBAttribs[0]) static int FBInfoCmp(const void *a, const void *b) { /* * 1. stereo is better * 2. full acceleration is better * 3. greater color bits is better * 4. greater depth bits is better * 5. more multisampling is better */ const FBInfo *x = (const FBInfo *) a; const FBInfo *y = (const FBInfo *) b; if (x->stereo != y->stereo) return y->stereo - x->stereo; if (x->acceleration != y->acceleration) return y->acceleration - x->acceleration; if (x->colors != y->colors) return y->colors - x->colors; if (x->depth != y->depth) return y->depth - x->depth; if (x->samples != y->samples) return y->samples - x->samples; return 0; } static int togl_pixelFormat(Togl *togl, HWND hwnd) { /* return 0 when pixel format is unavailable. */ int pixelformat = 0; static int loadedOpenGL = FALSE; int formats[256]; UINT numFormats; FBInfo *info; UINT i; int attribs[128]; int na = 0; if (!loadedOpenGL) { HWND test = NULL; HDC dc; HGLRC rc; if (wglGetCurrentContext() != NULL) { dc = wglGetCurrentDC(); } else { /* HWND hwnd = Tk_GetHWND(Tk_WindowId(togl->TkWin)); */ test = toglCreateTestWindow(hwnd); if (test == NULL) { Tcl_SetResult(togl->Interp, TCL_STUPID "can't create dummy OpenGL window", TCL_STATIC); return 0; } dc = GetDC(test); rc = wglCreateContext(dc); wglMakeCurrent(dc, rc); } loadedOpenGL = TRUE; /* * Now that we have an OpenGL window, we can initialize all * OpenGL information and figure out if multisampling is supported. */ getExtensionsString = (PFNWGLGETEXTENSIONSSTRINGARBPROC) wglGetProcAddress("wglGetExtensionsStringARB"); if (getExtensionsString == NULL) getExtensionsString = (PFNWGLGETEXTENSIONSSTRINGARBPROC) wglGetProcAddress("wglGetExtensionsStringEXT"); if (getExtensionsString) { const char *extensions = getExtensionsString(dc); if (strstr(extensions, "WGL_ARB_multisample") != NULL || strstr(extensions, "WGL_EXT_multisample") != NULL) hasMultisampling = TRUE; if (strstr(extensions, "WGL_ARB_pixel_format") != NULL) { choosePixelFormat = (PFNWGLCHOOSEPIXELFORMATARBPROC) wglGetProcAddress("wglChoosePixelFormatARB"); getPixelFormatAttribiv = (PFNWGLGETPIXELFORMATATTRIBIVARBPROC) wglGetProcAddress("wglGetPixelFormatAttribivARB"); if (choosePixelFormat == NULL || getPixelFormatAttribiv == NULL) { choosePixelFormat = NULL; getPixelFormatAttribiv = NULL; } } if (choosePixelFormat == NULL && strstr(extensions, "WGL_EXT_pixel_format") != NULL) { choosePixelFormat = (PFNWGLCHOOSEPIXELFORMATARBPROC) wglGetProcAddress("wglChoosePixelFormatEXT"); getPixelFormatAttribiv = (PFNWGLGETPIXELFORMATATTRIBIVARBPROC) wglGetProcAddress("wglGetPixelFormatAttribivEXT"); if (choosePixelFormat == NULL || getPixelFormatAttribiv == NULL) { choosePixelFormat = NULL; getPixelFormatAttribiv = NULL; } } if (createPbuffer == NULL && strstr(extensions, "WGL_ARB_pbuffer") != NULL) { createPbuffer = (PFNWGLCREATEPBUFFERARBPROC) wglGetProcAddress("wglCreatePbufferARB"); destroyPbuffer = (PFNWGLDESTROYPBUFFERARBPROC) wglGetProcAddress("wglDestroyPbufferARB"); getPbufferDC = (PFNWGLGETPBUFFERDCARBPROC) wglGetProcAddress("wglGetPbufferDCARB"); releasePbufferDC = (PFNWGLRELEASEPBUFFERDCARBPROC) wglGetProcAddress("wglReleasePbufferDCARB"); queryPbuffer = (PFNWGLQUERYPBUFFERARBPROC) wglGetProcAddress("wglQueryPbufferARB"); if (createPbuffer == NULL || destroyPbuffer == NULL || getPbufferDC == NULL || releasePbufferDC == NULL || queryPbuffer == NULL) { createPbuffer = NULL; destroyPbuffer = NULL; getPbufferDC = NULL; releasePbufferDC = NULL; queryPbuffer = NULL; } else { hasPbuffer = TRUE; hasARBPbuffer = TRUE; } } if (createPbuffer == NULL && strstr(extensions, "WGL_EXT_pbuffer") != NULL) { createPbuffer = (PFNWGLCREATEPBUFFERARBPROC) wglGetProcAddress("wglCreatePbufferEXT"); destroyPbuffer = (PFNWGLDESTROYPBUFFERARBPROC) wglGetProcAddress("wglDestroyPbufferEXT"); getPbufferDC = (PFNWGLGETPBUFFERDCARBPROC) wglGetProcAddress("wglGetPbufferDCEXT"); releasePbufferDC = (PFNWGLRELEASEPBUFFERDCARBPROC) wglGetProcAddress("wglReleasePbufferDCEXT"); queryPbuffer = (PFNWGLQUERYPBUFFERARBPROC) wglGetProcAddress("wglQueryPbufferEXT"); if (createPbuffer == NULL || destroyPbuffer == NULL || getPbufferDC == NULL || releasePbufferDC == NULL || queryPbuffer == NULL) { createPbuffer = NULL; destroyPbuffer = NULL; getPbufferDC = NULL; releasePbufferDC = NULL; queryPbuffer = NULL; } else { hasPbuffer = TRUE; } } } /* No need to confirm multisampling is in glGetString(GL_EXTENSIONS) * because OpenGL driver is local */ if (test != NULL) { /* cleanup by removing temporary OpenGL window */ wglMakeCurrent(NULL, NULL); wglDeleteContext(rc); ReleaseDC(test, dc); DestroyWindow(test); } } if (togl->MultisampleFlag && !hasMultisampling) { Tcl_SetResult(togl->Interp, TCL_STUPID "multisampling not supported", TCL_STATIC); return 0; } if (togl->PbufferFlag && !hasPbuffer) { Tcl_SetResult(togl->Interp, TCL_STUPID "pbuffers are not supported", TCL_STATIC); return 0; } if (choosePixelFormat == NULL) { PIXELFORMATDESCRIPTOR pfd; /* Don't have the great wglChoosePixelFormatARB() function, so do it * the old way. */ if (togl->MultisampleFlag) { Tcl_SetResult(togl->Interp, TCL_STUPID "multisampling not supported", TCL_STATIC); return 0; } memset(&pfd, 0, sizeof pfd); pfd.nSize = sizeof pfd; pfd.nVersion = 1; pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_SUPPORT_COMPOSITION; if (togl->DoubleFlag) { pfd.dwFlags |= PFD_DOUBLEBUFFER; } if (togl->Stereo == TOGL_STEREO_NATIVE) { pfd.dwFlags |= PFD_STEREO; } pfd.iPixelType = togl->RgbaFlag ? PFD_TYPE_RGBA : PFD_TYPE_COLORINDEX; pfd.cColorBits = togl->RgbaRed + togl->RgbaGreen + togl->RgbaBlue; /* Alpha bitplanes are not supported in the current generic OpenGL * implementation, but may be supported by specific hardware devices. */ pfd.cAlphaBits = togl->AlphaFlag ? togl->AlphaSize : 0; pfd.cAccumBits = togl->AccumFlag ? (togl->AccumRed + togl->AccumGreen + togl->AccumBlue + togl->AccumAlpha) : 0; pfd.cDepthBits = togl->DepthFlag ? togl->DepthSize : 0; pfd.cStencilBits = togl->StencilFlag ? togl->StencilSize : 0; /* Auxiliary buffers are not supported in the current generic OpenGL * implementation, but may be supported by specific hardware devices. */ pfd.cAuxBuffers = togl->AuxNumber; pfd.iLayerType = PFD_MAIN_PLANE; if ((pixelformat = ChoosePixelFormat(togl->tglGLHdc, &pfd)) == 0) { Tcl_SetResult(togl->Interp, TCL_STUPID "couldn't choose pixel format", TCL_STATIC); return 0; } /* double check that we got the stereo format we requested */ if (togl->Stereo == TOGL_STEREO_NATIVE) { DescribePixelFormat(togl->tglGLHdc, pixelformat, sizeof (pfd), &pfd); if ((pfd.dwFlags & PFD_STEREO) == 0) { Tcl_SetResult(togl->Interp, TCL_STUPID "couldn't choose stereo pixel format", TCL_STATIC); return 0; } } return pixelformat; } // We have the new wglChoosePixelFormat!! if (togl->MultisampleFlag && !hasMultisampling) { Tcl_SetResult(togl->Interp, TCL_STUPID "multisampling not supported", TCL_STATIC); return 0; } if (togl->PbufferFlag) attribs[na++] = WGL_DRAW_TO_PBUFFER_ARB; else attribs[na++] = WGL_DRAW_TO_WINDOW_ARB; attribs[na++] = GL_TRUE; attribs[na++] = WGL_SUPPORT_OPENGL_ARB; attribs[na++] = GL_TRUE; attribs[na++] = WGL_PIXEL_TYPE_ARB; if (!togl->RgbaFlag) { attribs[na++] = WGL_TYPE_COLORINDEX_ARB; } else { attribs[na++] = WGL_TYPE_RGBA_ARB; attribs[na++] = WGL_RED_BITS_ARB; attribs[na++] = togl->RgbaRed; attribs[na++] = WGL_GREEN_BITS_ARB; attribs[na++] = togl->RgbaGreen; attribs[na++] = WGL_BLUE_BITS_ARB; attribs[na++] = togl->RgbaBlue; if (togl->AlphaFlag) { attribs[na++] = WGL_ALPHA_BITS_ARB; attribs[na++] = togl->AlphaSize; } } if (togl->DepthFlag) { attribs[na++] = WGL_DEPTH_BITS_ARB; attribs[na++] = togl->DepthSize; } if (togl->DoubleFlag) { attribs[na++] = WGL_DOUBLE_BUFFER_ARB; attribs[na++] = GL_TRUE; } if (togl->StencilFlag) { attribs[na++] = WGL_STENCIL_BITS_ARB; attribs[na++] = togl->StencilSize; } if (togl->AccumFlag) { attribs[na++] = WGL_ACCUM_RED_BITS_ARB; attribs[na++] = togl->AccumRed; attribs[na++] = WGL_ACCUM_GREEN_BITS_ARB; attribs[na++] = togl->AccumGreen; attribs[na++] = WGL_ACCUM_BLUE_BITS_ARB; attribs[na++] = togl->AccumBlue; if (togl->AlphaFlag) { attribs[na++] = WGL_ACCUM_ALPHA_BITS_ARB; attribs[na++] = togl->AccumAlpha; } } if (togl->Stereo == TOGL_STEREO_NATIVE) { attribs[na++] = WGL_STEREO_ARB; attribs[na++] = GL_TRUE; } if (togl->MultisampleFlag) { attribs[na++] = WGL_SAMPLE_BUFFERS_ARB; attribs[na++] = 1; attribs[na++] = WGL_SAMPLES_ARB; attribs[na++] = 2; } if (togl->AuxNumber) { attribs[na++] = WGL_AUX_BUFFERS_ARB; attribs[na++] = togl->AuxNumber; } attribs[na++] = 0; // must be last if (!choosePixelFormat(togl->tglGLHdc, &attribs[0], NULL, 256, formats, &numFormats) || numFormats == 0) { Tcl_SetResult(togl->Interp, TCL_STUPID "couldn't choose pixel format", TCL_STATIC); return 0; } /* * Pick best format */ info = (FBInfo *) malloc(numFormats * sizeof (FBInfo)); for (i = 0; i != numFormats; ++i) { info[i].pixelFormat = formats[i]; getPixelFormatAttribiv(togl->tglGLHdc, formats[i], 0, NUM_FBAttribs, FBAttribs, &info[i].stereo); /* revise attributes so larger is better */ if (!togl->DepthFlag) info[i].depth = -info[i].depth; if (!togl->MultisampleFlag) info[i].samples = -info[i].samples; if (togl->Stereo != TOGL_STEREO_NATIVE) info[i].stereo = -info[i].stereo; } qsort(info, numFormats, sizeof info[0], FBInfoCmp); pixelformat = info[0].pixelFormat; /* double check that we got the stereo format we requested */ if (togl->Stereo == TOGL_STEREO_NATIVE && !info[0].stereo) { Tcl_SetResult(togl->Interp, TCL_STUPID "couldn't choose stereo pixel format", TCL_STATIC); free(info); return 0; } free(info); return pixelformat; } static int togl_describePixelFormat(Togl *togl) { if (getPixelFormatAttribiv == NULL) { PIXELFORMATDESCRIPTOR pfd; DescribePixelFormat(togl->tglGLHdc, (int) togl->PixelFormat, sizeof (pfd), &pfd); /* fill in flags normally passed in that affect behavior */ togl->RgbaFlag = pfd.iPixelType == PFD_TYPE_RGBA; togl->DoubleFlag = (pfd.dwFlags & PFD_DOUBLEBUFFER) != 0; togl->DepthFlag = (pfd.cDepthBits != 0); togl->AccumFlag = (pfd.cAccumBits != 0); togl->AlphaFlag = (pfd.cAlphaBits != 0); togl->StencilFlag = (pfd.cStencilBits != 0); if ((pfd.dwFlags & PFD_STEREO) != 0) togl->Stereo = TOGL_STEREO_NATIVE; else togl->Stereo = TOGL_STEREO_NONE; } else { static int attribs[] = { WGL_PIXEL_TYPE_ARB, WGL_DOUBLE_BUFFER_ARB, WGL_DEPTH_BITS_ARB, WGL_ACCUM_RED_BITS_ARB, WGL_ALPHA_BITS_ARB, WGL_STENCIL_BITS_ARB, WGL_STEREO_ARB, WGL_SAMPLES_ARB }; #define NUM_ATTRIBS (sizeof attribs / sizeof attribs[0]) int info[NUM_ATTRIBS]; getPixelFormatAttribiv(togl->tglGLHdc, (int) togl->PixelFormat, 0, NUM_ATTRIBS, attribs, info); #undef NUM_ATTRIBS togl->RgbaFlag = info[0]; togl->DoubleFlag = info[1]; togl->DepthFlag = (info[2] != 0); togl->AccumFlag = (info[3] != 0); togl->AlphaFlag = (info[4] != 0); togl->StencilFlag = (info[5] != 0); togl->Stereo = info[6] ? TOGL_STEREO_NATIVE : TOGL_STEREO_NONE; togl->MultisampleFlag = (info[7] != 0); } return True; } static HPBUFFERARB togl_createPbuffer(Togl *togl) { int attribs[32]; int na = 0; HPBUFFERARB pbuf; if (togl->LargestPbufferFlag) { attribs[na++] = WGL_PBUFFER_LARGEST_ARB; attribs[na++] = 1; } attribs[na] = 0; pbuf = createPbuffer(togl->tglGLHdc, (int) togl->PixelFormat, togl->Width, togl->Height, attribs); if (pbuf && togl->LargestPbufferFlag) { queryPbuffer(pbuf, WGL_PBUFFER_WIDTH_ARB, &togl->Width); queryPbuffer(pbuf, WGL_PBUFFER_HEIGHT_ARB, &togl->Height); } return pbuf; } static void togl_destroyPbuffer(Togl *togl) { destroyPbuffer(togl->pbuf); } #if 0 // From nvidia.com Multisampling requires WGL_ARB_extension_string and WGL_ARB_pixel_format wglGetProcAddress("wglGetExtensionsStringARB") // From msdn.microsoft.com, various ways to enumerate PixelFormats void CPixForm::OnClickedLastPfd() { COpenGL gl; PIXELFORMATDESCRIPTOR pfd; // // Get the hwnd of the view window. // HWND hwndview = GetViewHwnd(); // // Get a DC associated with the view window. // HDC dc =::GetDC(hwndview); int nID = (m_nNextID > 1) ? m_nNextID-- : 1; // // Get a description of the pixel format. If it is valid, then go and // update the controls in the dialog box, otherwise do nothing. // if (gl.DescribePixelFormat(dc, nID, sizeof (PIXELFORMATDESCRIPTOR), &pfd)) UpdateDlg(&pfd); // // Release the DC. // ::ReleaseDC(hwndview, dc); } ---------------------- // local variables int iMax; PIXELFORMATDESCRIPTOR pfd; int iPixelFormat; // initialize a pixel format index variable iPixelFormat = 1; // keep obtaining and examining pixel format data... do { // try to obtain some pixel format data iMax = DescribePixelFormat(dc, iPixelFormat, sizeof (pfd), &pfd); // if there was some problem with that... if (iMax == 0) // return indicating failure return (FALSE); // we have successfully obtained pixel format data // let's examine the pixel format data... myPixelFormatExaminer(&pfd); } // ...until we've looked at all the device context's pixel formats while (++iPixelFormat <= iMax); #endif netgen-6.2.1804/ng/Togl2.1/toglpy.h0000644000175000017500000000444013272137567015230 0ustar kurtkurt/* * getToglFromWidget: * * Given a Python widget, get the corresponding Togl pointer. * and should be included before this. If included into a C file, * there should be a static keyword just before the include. * * There should be one copy of getToglFromWidget per-shared library so that * the library's Tcl/Tk/Togl stub pointers are properly initialized. * * Copyright (C) 2006 Greg Couch * See the LICENSE file for copyright details. */ Togl * getToglFromWidget(PyObject *widget) { PyObject *cmdNameObj, *tk, *interpAddr; const char *cmdName; Tcl_Interp *interp; Togl *curTogl; #ifdef USE_TOGL_STUBS static int didOnce = 0; #endif /* Python: cmdName = widget._w */ /* Python: interpAddr = widget.tk.interpaddr() */ cmdNameObj = PyObject_GetAttrString(widget, "_w"); tk = PyObject_GetAttrString(widget, "tk"); if (cmdNameObj == NULL || !PyString_Check(cmdNameObj) || tk == NULL) { Py_XDECREF(cmdNameObj); Py_XDECREF(tk); #ifdef __cplusplus throw std::invalid_argument("not a Tk widget"); #else return NULL; #endif } interpAddr = PyEval_CallMethod(tk, "interpaddr", "()"); if (interpAddr == NULL || !PyInt_Check(interpAddr)) { Py_DECREF(cmdNameObj); Py_DECREF(tk); Py_XDECREF(interpAddr); #ifdef __cplusplus throw std::invalid_argument("not a Tk widget"); #else return NULL; #endif } cmdName = PyString_AsString(cmdNameObj); interp = (Tcl_Interp *) PyInt_AsLong(interpAddr); #ifdef USE_TOGL_STUBS if (!didOnce) { /* make sure stubs are initialized before calling a Togl function. */ if (Tcl_InitStubs(interp, TCL_VERSION, 0) == NULL || Tk_InitStubs(interp, TK_VERSION, 0) == NULL || Togl_InitStubs(interp, TOGL_VERSION, 0) == NULL) # ifdef __cplusplus throw std::runtime_error("unable to initialize Togl"); # else return NULL; # endif didOnce = 1; } #endif if (Togl_GetToglFromName(interp, cmdName, &curTogl) != TCL_OK) curTogl = NULL; Py_DECREF(cmdNameObj); Py_DECREF(tk); Py_DECREF(interpAddr); #ifdef __cplusplus if (curTogl == NULL) throw std::invalid_argument("not a Togl widget"); #endif return curTogl; } netgen-6.2.1804/ng/Togl2.1/Makefile.in0000644000175000017500000005012413272137567015606 0ustar kurtkurt# Makefile.in -- # # This file is a Makefile for Sample TEA Extension. If it has the name # "Makefile.in" then it is a template for a Makefile; to generate the # actual Makefile, run "./configure", which is a configuration script # generated by the "autoconf" program (constructs like "@foo@" will get # replaced in the actual Makefile. # # Copyright (c) 1999 Scriptics Corporation. # Copyright (c) 2002-2005 ActiveState Corporation. # # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # # RCS: @(#) $Id: Makefile.in,v 1.26 2009/12/23 21:46:16 gregcouch Exp $ #======================================================================== # Add additional lines to handle any additional AC_SUBST cases that # have been added in a customized configure script. #======================================================================== #SAMPLE_NEW_VAR = @SAMPLE_NEW_VAR@ SHLIB_SUFFIX = @SHLIB_SUFFIX@ MATH_LIBS = @MATH_LIBS@ LIBGLU = @LIBGLU@ EXAMPLE_SRCS = double.c gears.c index.c overlay.c stereo.c texture.c pbuffer.c EXAMPLE_OBJS = $(EXAMPLE_SRCS:.c=.$(OBJEXT)) EXAMPLE_SHLIBS = $(EXAMPLE_SRCS:.c=$(SHLIB_SUFFIX)) #======================================================================== # Nothing of the variables below this line should need to be changed. # Please check the TARGETS section below to make sure the make targets # are correct. #======================================================================== #======================================================================== # The names of the source files is defined in the configure script. # The object files are used for linking into the final library. # This will be used when a dist target is added to the Makefile. # It is not important to specify the directory, as long as it is the # $(srcdir) or in the generic, win or unix subdirectory. #======================================================================== PKG_SOURCES = @PKG_SOURCES@ PKG_OBJECTS = @PKG_OBJECTS@ PKG_STUB_SOURCES = @PKG_STUB_SOURCES@ PKG_STUB_OBJECTS = @PKG_STUB_OBJECTS@ #======================================================================== # PKG_TCL_SOURCES identifies Tcl runtime files that are associated with # this package that need to be installed, if any. #======================================================================== PKG_TCL_SOURCES = @PKG_TCL_SOURCES@ #======================================================================== # This is a list of public header files to be installed, if any. #======================================================================== PKG_HEADERS = @PKG_HEADERS@ togl_ws.h #======================================================================== # "PKG_LIB_FILE" refers to the library (dynamic or static as per # configuration options) composed of the named objects. #======================================================================== PKG_LIB_FILE = @PKG_LIB_FILE@ PKG_STUB_LIB_FILE = @PKG_STUB_LIB_FILE@ pkglib_BINARIES = $(PKG_LIB_FILE) lib_BINARIES = $(PKG_STUB_LIB_FILE) BINARIES = $(pkglib_BINARIES) $(lib_BINARIES) SHELL = @SHELL@ srcdir = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ libdir = @libdir@ includedir = @includedir@ datarootdir = @datarootdir@ datadir = @datadir@ mandir = @mandir@ DESTDIR = PKG_DIR = $(PACKAGE_NAME)$(PACKAGE_VERSION) pkgdatadir = $(datadir)/$(PKG_DIR) pkglibdir = $(libdir)/$(PKG_DIR) pkgincludedir = $(includedir)/$(PKG_DIR) top_builddir = . INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ CC = @CC@ CFLAGS_DEFAULT = @CFLAGS_DEFAULT@ CFLAGS_WARNING = @CFLAGS_WARNING@ EXEEXT = @EXEEXT@ LDFLAGS_DEFAULT = @LDFLAGS_DEFAULT@ MAKE_LIB = @MAKE_LIB@ MAKE_SHARED_LIB = @MAKE_SHARED_LIB@ MAKE_STATIC_LIB = @MAKE_STATIC_LIB@ MAKE_STUB_LIB = @MAKE_STUB_LIB@ OBJEXT = @OBJEXT@ RANLIB = @RANLIB@ RANLIB_STUB = @RANLIB_STUB@ SHLIB_CFLAGS = @SHLIB_CFLAGS@ SHLIB_LD = @SHLIB_LD@ SHLIB_LD_LIBS = @SHLIB_LD_LIBS@ STLIB_LD = @STLIB_LD@ #TCL_DEFS = @TCL_DEFS@ TCL_BIN_DIR = @TCL_BIN_DIR@ TCL_SRC_DIR = @TCL_SRC_DIR@ #TK_BIN_DIR = @TK_BIN_DIR@ #TK_SRC_DIR = @TK_SRC_DIR@ # Not used, but retained for reference of what libs Tcl required #TCL_LIBS = @TCL_LIBS@ #======================================================================== # TCLLIBPATH seeds the auto_path in Tcl's init.tcl so we can test our # package without installing. The other environment variables allow us # to test against an uninstalled Tcl. Add special env vars that you # require for testing here (like TCLX_LIBRARY). #======================================================================== #EXTRA_PATH = $(top_builddir):$(TCL_BIN_DIR) EXTRA_PATH = $(top_builddir):$(TCL_BIN_DIR):$(TK_BIN_DIR) TCLLIBPATH = $(top_builddir) TCLSH_ENV = TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library` \ @LD_LIBRARY_PATH_VAR@="$(EXTRA_PATH):$(@LD_LIBRARY_PATH_VAR@)" \ PATH="$(EXTRA_PATH):$(PATH)" \ TCLLIBPATH="$(TCLLIBPATH)" # TK_LIBRARY=`@CYGPATH@ $(TK_SRC_DIR)/library` TCLSH_PROG = @TCLSH_PROG@ TCLSH = $(TCLSH_ENV) $(TCLSH_PROG) WISH_PROG = @WISH_PROG@ WISH = $(TCLSH_ENV) $(WISH_PROG) SHARED_BUILD = @SHARED_BUILD@ INCLUDES = -I. @PKG_INCLUDES@ @TCL_INCLUDES@ @TK_INCLUDES@ @TK_XINCLUDES@ PKG_CFLAGS = @PKG_CFLAGS@ # TCL_DEFS is not strictly need here, but if you remove it, then you # must make sure that configure.in checks for the necessary components # that your library may use. TCL_DEFS can actually be a problem if # you do not compile with a similar machine setup as the Tcl core was # compiled with. #DEFS = $(TCL_DEFS) @DEFS@ $(PKG_CFLAGS) DEFS = @DEFS@ -DAUTOSTEREOD=\"@AUTOSTEREOD@\" $(PKG_CFLAGS) CONFIG_CLEAN_FILES = Makefile pkgIndex.tcl togl_ws.h CLEANFILES = @CLEANFILES@ $(EXAMPLE_OBJS) $(EXAMPLE_SHLIBS) CPPFLAGS = @CPPFLAGS@ LIBS = @PKG_LIBS@ @LIBS@ AR = @AR@ CFLAGS = @CFLAGS@ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) #======================================================================== # Start of user-definable TARGETS section #======================================================================== #======================================================================== # TEA TARGETS. Please note that the "libraries:" target refers to platform # independent files, and the "binaries:" target includes executable programs and # platform-dependent libraries. Modify these targets so that they install # the various pieces of your package. The make and install rules # for the BINARIES that you specified above have already been done. #======================================================================== all: binaries libraries doc #======================================================================== # The binaries target builds executable programs, Windows .dll's, unix # shared/static libraries, and any other platform-dependent files. # The list of targets to build for "binaries:" is specified at the top # of the Makefile, in the "BINARIES" variable. #======================================================================== binaries: $(BINARIES) libraries: #======================================================================== # Example section. These are examples because we don't want to install them. # And they're not tests because we currently have no automatic way to see # if they work. #======================================================================== examples: $(EXAMPLE_SHLIBS) double$(SHLIB_SUFFIX): double.$(OBJEXT) $(PKG_STUB_LIB_FILE) -match=`expr 'x$(PKG_OBJECTS)' : '.*togl.*'`; \ if [ $$match -eq 0 ]; then \ $(MAKE_SHARED_LIB) ; \ else \ $(MAKE) PKG_OBJECTS="double.$(OBJEXT) $(PKG_STUB_LIB_FILE)" $@ ; \ fi gears$(SHLIB_SUFFIX): gears.$(OBJEXT) $(PKG_STUB_LIB_FILE) -match=`expr 'x$(PKG_OBJECTS)' : '.*togl.*'`; \ if [ $$match -eq 0 ]; then \ $(MAKE_SHARED_LIB) ; \ else \ $(MAKE) PKG_OBJECTS="gears.$(OBJEXT) $(PKG_STUB_LIB_FILE)" $@ ; \ fi index$(SHLIB_SUFFIX): index.$(OBJEXT) $(PKG_STUB_LIB_FILE) -match=`expr 'x$(PKG_OBJECTS)' : '.*togl.*'`; \ if [ $$match -eq 0 ]; then \ $(MAKE_SHARED_LIB) ; \ else \ $(MAKE) PKG_OBJECTS="index.$(OBJEXT) $(PKG_STUB_LIB_FILE)" $@ ; \ fi overlay$(SHLIB_SUFFIX): overlay.$(OBJEXT) $(PKG_STUB_LIB_FILE) -match=`expr 'x$(PKG_OBJECTS)' : '.*togl.*'`; \ if [ $$match -eq 0 ]; then \ $(MAKE_SHARED_LIB) ; \ else \ $(MAKE) PKG_OBJECTS="overlay.$(OBJEXT) $(PKG_STUB_LIB_FILE)" $@ ; \ fi stereo$(SHLIB_SUFFIX): stereo.$(OBJEXT) $(PKG_STUB_LIB_FILE) -match=`expr 'x$(PKG_OBJECTS)' : '.*togl.*'`; \ if [ $$match -eq 0 ]; then \ $(MAKE_SHARED_LIB) ; \ else \ $(MAKE) PKG_OBJECTS="stereo.$(OBJEXT) $(PKG_STUB_LIB_FILE)" $@ ; \ fi texture$(SHLIB_SUFFIX): texture.$(OBJEXT) image.$(OBJEXT) $(PKG_STUB_LIB_FILE) -match=`expr 'x$(PKG_OBJECTS)' : '.*togl.*'`; \ if [ $$match -eq 0 ]; then \ $(MAKE_SHARED_LIB) ; \ else \ $(MAKE) PKG_OBJECTS="texture.$(OBJEXT) image.$(OBJEXT) $(PKG_STUB_LIB_FILE) $(LIBGLU)" $@ ; \ fi pbuffer$(SHLIB_SUFFIX): pbuffer.$(OBJEXT) $(PKG_STUB_LIB_FILE) -match=`expr 'x$(PKG_OBJECTS)' : '.*togl.*'`; \ if [ $$match -eq 0 ]; then \ $(MAKE_SHARED_LIB) ; \ else \ $(MAKE) PKG_OBJECTS="pbuffer.$(OBJEXT) $(PKG_STUB_LIB_FILE) $(LIBGLU)" $@ ; \ fi #======================================================================== # Stub section. #======================================================================== toglDecls.h toglStubInit.c: togl.decls $(TCLSH) `@CYGPATH@ $(TCL_SRC_DIR)/tools/genStubs.tcl` . togl.decls #======================================================================== # Your doc target should differentiate from doc builds (by the developer) # and doc installs (see install-doc), which just install the docs on the # end user machine when building from source. #======================================================================== doc: # @echo "If you have documentation to create, place the commands to" # @echo "build the docs in the 'doc:' target. For example:" # @echo " xml2nroff sample.xml > sample.n" # @echo " xml2html sample.xml > sample.html" install: all install-binaries install-libraries install-doc install-binaries: binaries install-lib-binaries install-bin-binaries #======================================================================== # This rule installs platform-independent files, such as header files. # The list=...; for p in $$list handles the empty list case x-platform. #======================================================================== install-libraries: libraries @mkdir -p $(DESTDIR)$(includedir) @echo "Installing header files in $(DESTDIR)$(includedir)" @list='$(PKG_HEADERS)'; for i in $$list; do \ echo "Installing $(srcdir)/$$i" ; \ $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(includedir) ; \ done #======================================================================== # Install documentation. Unix manpages should go in the $(mandir) # directory. #======================================================================== install-doc: doc # @mkdir -p $(DESTDIR)$(mandir)/mann # @echo "Installing documentation in $(DESTDIR)$(mandir)" # @list='$(srcdir)/doc/*.n'; for i in $$list; do \ # echo "Installing $$i"; \ # rm -f $(DESTDIR)$(mandir)/mann/`basename $$i`; \ # $(INSTALL_DATA) $$i $(DESTDIR)$(mandir)/mann ; \ # done test: binaries libraries $(TCLSH) `@CYGPATH@ $(srcdir)/tests/all.tcl` $(TESTFLAGS) shell: binaries libraries @$(TCLSH) $(SCRIPT) gdb: $(TCLSH_ENV) gdb $(TCLSH_PROG) $(SCRIPT) depend: #======================================================================== # $(PKG_LIB_FILE) should be listed as part of the BINARIES variable # mentioned above. That will ensure that this target is built when you # run "make binaries". # # The $(PKG_OBJECTS) objects are created and linked into the final # library. In most cases these object files will correspond to the # source files above. #======================================================================== $(PKG_LIB_FILE): $(PKG_OBJECTS) -rm -f $(PKG_LIB_FILE) ${MAKE_LIB} $(RANLIB) $(PKG_LIB_FILE) $(PKG_STUB_LIB_FILE): $(PKG_STUB_OBJECTS) -rm -f $(PKG_STUB_LIB_FILE) ${MAKE_STUB_LIB} $(RANLIB_STUB) $(PKG_STUB_LIB_FILE) #======================================================================== # We need to enumerate the list of .c to .o lines here. # # In the following lines, $(srcdir) refers to the toplevel directory # containing your extension. If your sources are in a subdirectory, # you will have to modify the paths to reflect this: # # sample.$(OBJEXT): $(srcdir)/generic/sample.c # $(COMPILE) -c `@CYGPATH@ $(srcdir)/generic/sample.c` -o $@ # # Setting the VPATH variable to a list of paths will cause the makefile # to look into these paths when resolving .c to .obj dependencies. # As necessary, add $(srcdir):$(srcdir)/compat:.... #======================================================================== VPATH = $(srcdir):Xmu .c.@OBJEXT@: $(COMPILE) -c `@CYGPATH@ $<` -o $@ #======================================================================== # Distribution creation # You may need to tweak this target to make it work correctly. #======================================================================== COMPRESS = tar zcvf $(PKG_DIR)-src.tar.gz $(PKG_DIR) DIST_ROOT = /tmp/togl-dist DIST_DIR = $(DIST_ROOT)/$(PKG_DIR) BINPKG_DIR = $(PKG_DIR)-@TCL_VERSION@-$(subst Darwin,MacOSX,$(subst CYGWIN,Windows,$(shell uname -s | sed -e 's/[-_].*//'))) BINDIST_DIR = $(DIST_ROOT)/$(BINPKG_DIR) dist-clean: rm -rf $(DIST_DIR) $(DIST_ROOT)/$(PKG_DIR)* dist: dist-clean mkdir -p $(DIST_DIR) cp -p $(srcdir)/README* $(srcdir)/LICENSE* $(srcdir)/togl.decls \ $(srcdir)/*.py $(srcdir)/*.tcl \ $(srcdir)/aclocal.m4 $(srcdir)/configure $(srcdir)/*.in \ ben.rgb tree2.rgba \ $(DIST_DIR)/ chmod 664 $(DIST_DIR)/* chmod 775 $(DIST_DIR)/configure $(DIST_DIR)/configure.in for i in $(srcdir)/*.[ch]; do \ if [ -f $$i ]; then \ cp -p $$i $(DIST_DIR)/ ; \ fi; \ done cd $(DIST_DIR); rm -f $(CONFIG_CLEAN_FILES) mkdir $(DIST_DIR)/tclconfig cp $(srcdir)/tclconfig/install-sh $(srcdir)/tclconfig/tcl.m4 \ $(DIST_DIR)/tclconfig/ chmod 664 $(DIST_DIR)/tclconfig/tcl.m4 chmod +x $(DIST_DIR)/tclconfig/install-sh list='examples doc tests Xmu GL'; \ for p in $$list; do \ if test -d $(srcdir)/$$p ; then \ mkdir $(DIST_DIR)/$$p; \ cp -p $(srcdir)/$$p/*.* $(DIST_DIR)/$$p/; \ fi; \ done (cd $(DIST_ROOT); $(COMPRESS);) bindist-clean: rm -rf $(BINDIST_DIR) $(DIST_ROOT)/$(PKG_DIR)* bindist: all bindist-clean mkdir -p $(BINDIST_DIR) $(MAKE) prefix=$(BINDIST_DIR) exec_prefix=$(BINDIST_DIR) install $(INSTALL_DATA) README.bin $(BINDIST_DIR)/README.txt mkdir -p $(BINDIST_DIR)/doc @list='doc/*.html doc/*.js'; for i in $$list; do \ echo "Installing $$i"; \ rm -f $(BINDIST_DIR)/doc/`basename $$i`; \ $(INSTALL_DATA) $$i $(BINDIST_DIR)/doc ; \ done if [ @TOGL_WINDOWINGSYSTEM@ == TOGL_WGL ]; then \ (cd $(DIST_ROOT); zip -rDX9 $(BINPKG_DIR).zip $(BINPKG_DIR)); \ else \ (cd $(DIST_ROOT); tar zcvf $(BINPKG_DIR).tar.gz $(BINPKG_DIR)); \ fi #======================================================================== # End of user-definable section #======================================================================== #======================================================================== # Don't modify the file to clean here. Instead, set the "CLEANFILES" # variable in configure.in #======================================================================== clean: -test -z "$(BINARIES)" || rm -f $(BINARIES) -rm -f *.$(OBJEXT) core *.core -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean: clean -rm -f *.tab.c -rm -f $(CONFIG_CLEAN_FILES) -rm -f config.cache config.log config.status #======================================================================== # Install binary object libraries. On Windows this includes both .dll and # .lib files. Because the .lib files are not explicitly listed anywhere, # we need to deduce their existence from the .dll file of the same name. # Library files go into the lib directory. # In addition, this will generate the pkgIndex.tcl # file in the install location (assuming it can find a usable tclsh shell) # # You should not have to modify this target. #======================================================================== install-lib-binaries: binaries @mkdir -p $(DESTDIR)$(libdir) @list='$(lib_BINARIES)'; for p in $$list; do \ if test -f $$p; then \ echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(libdir)/$$p"; \ $(INSTALL_PROGRAM) $$p $(DESTDIR)$(libdir)/$$p; \ stub=`echo $$p|sed -e "s/.*\(stub\).*/\1/"`; \ if test "x$$stub" = "xstub"; then \ echo " $(RANLIB_STUB) $(DESTDIR)$(libdir)/$$p"; \ $(RANLIB_STUB) $(DESTDIR)$(libdir)/$$p; \ else \ echo " $(RANLIB) $(DESTDIR)$(libdir)/$$p"; \ $(RANLIB) $(DESTDIR)$(libdir)/$$p; \ fi; \ ext=`echo $$p|sed -e "s/.*\.//"`; \ if test "x$$ext" = "xdll"; then \ lib=`basename $$p|sed -e 's/.[^.]*$$//'`.lib; \ if test -f $$lib; then \ echo " $(INSTALL_DATA) $$lib $(DESTDIR)$(libdir)/$$lib"; \ $(INSTALL_DATA) $$lib $(DESTDIR)$(libdir)/$$lib; \ fi; \ fi; \ fi; \ done @mkdir -p $(DESTDIR)$(pkglibdir) @list='$(pkglib_BINARIES)'; for p in $$list; do \ if test -f $$p; then \ echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p"; \ $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p; \ stub=`echo $$p|sed -e "s/.*\(stub\).*/\1/"`; \ if test "x$$stub" = "xstub"; then \ echo " $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p"; \ $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p; \ else \ echo " $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p"; \ $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p; \ fi; \ ext=`echo $$p|sed -e "s/.*\.//"`; \ if test "x$$ext" = "xdll"; then \ lib=`basename $$p|sed -e 's/.[^.]*$$//'`.lib; \ if test -f $$lib; then \ echo " $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib"; \ $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib; \ fi; \ fi; \ fi; \ done @list='$(PKG_TCL_SOURCES)'; for p in $$list; do \ if test -f $(srcdir)/$$p; then \ destp=`basename $$p`; \ echo " Install $$destp $(DESTDIR)$(pkglibdir)/$$destp"; \ $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkglibdir)/$$destp; \ fi; \ done @if test "x$(SHARED_BUILD)" = "x1"; then \ echo " Install pkgIndex.tcl $(DESTDIR)$(pkglibdir)"; \ $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir); \ echo " Install LICENSE $(DESTDIR)$(pkglibdir)"; \ $(INSTALL_DATA) LICENSE $(DESTDIR)$(pkglibdir); \ else \ echo " Install LICENSE.togl $(DESTDIR)$(libdir)"; \ $(INSTALL_DATA) LICENSE $(DESTDIR)$(libdir)/LICENSE.togl; \ fi #======================================================================== # Install binary executables (e.g. .exe files and dependent .dll files) # This is for files that must go in the bin directory (located next to # wish and tclsh), like dependent .dll files on Windows. # # You should not have to modify this target, except to define bin_BINARIES # above if necessary. #======================================================================== install-bin-binaries: binaries @mkdir -p $(DESTDIR)$(bindir) @list='$(bin_BINARIES)'; for p in $$list; do \ if test -f $$p; then \ echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p"; \ $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \ fi; \ done .SUFFIXES: .c .$(OBJEXT) Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status uninstall-binaries: list='$(pkglib_BINARIES)'; for p in $$list; do \ rm -f $(DESTDIR)$(pkglibdir)/$$p; \ done list='$(lib_BINARIES)'; for p in $$list; do \ rm -f $(DESTDIR)$(libdir)/$$p; \ done list='$(PKG_TCL_SOURCES)'; for p in $$list; do \ p=`basename $$p`; \ rm -f $(DESTDIR)$(pkglibdir)/$$p; \ done list='$(bin_BINARIES)'; for p in $$list; do \ rm -f $(DESTDIR)$(bindir)/$$p; \ done .PHONY: all binaries clean depend distclean doc install libraries test # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: # Additional dependencies togl.$(OBJEXT): toglFont.c toglAGL.c toglGLX.c toglWGL.c netgen-6.2.1804/ng/Togl2.1/tree2.rgba0000644000175000017500000020100013272137567015406 0ustar kurtkurtno name@@@?0?;?000@0@1@116@@000@0@,)55@?,0000 @0::@600000*@566@45)0000)@1540@4@004@)114@1@004F@1145)000@ 0@0*104)000 ,@0,45@)000 @0156@:@00 @@0*4>@;@0@  ((64,51:@6>,>( (( ($6,*>54@1,16:5$JJ (6C(@E50(((*@@1,54)$*441,, $$ $ T@?*> fa>151:4*((((((( (;))$(*)$1E41,, N@((6?C)(((  L\lF;,*5 65WF>4;4*(450(((((0E$4*5N   ,?((((*(056()0,()0,0$W NJ,1*FcPFI;IZoV>@ 44C50((,?   L,1N@00:440>F>*((((>5,)( *5>Jp0**5?$1$(@(((,:6($,4(140)*,**)6O4* ((5;6456TP``:1F??400((((*6 (N\ $YVpQ;1:>;:*00450500(((0NPF*((*0550())1045) (0((()*(()*)(,,)***5*))*( (((0>0(*:5J:0444>:0((()),4$(E@? ]C;;;;;6NQPFZN551466J0((055*0>4( *>:@()*,,**( ** (5:1($($(*) *)***1*$)* ( ((0**(((*:*00*:5((((**5 FC66((IP51( ;;;;54oJF:4:5;:5T:***44*(:0( (*( )),*$$  ( (:0 ( *( ((((*(((0:(4:((((((()),FI0C66;$L;TY;6I5; ;;;;44;o{Y444:5@:054*(((**(**((( ( (   0( ((  ((((( ( ((((((*(((** *0((((((((()**4>4:,5a?5:bTEC10?L;;;;::r`>@>:00>0(**((((((((( ( (     (4*((( (( (((( ((((((*(())(*((*)*,*0*:@4445>Lz;;;;;5bwY>@55*(**(((((( (      (((550*( ( (((( ( ((*(((((((((((****0**4*04>@YmJ;;;;5Q]|J:40:40(((((((((((( *( ( (   ((4E0((( (( (((( (((( (((((**(((((((((((**(4*400555JN>0;;;;5Yrf>50*0*(((((((( (((((>:( ( *(  *:0(( ((((*0*((*(( (((((((((( ((((((*(05(000554:@4*;;;;;5qcE:4*(((((((((( ((( 05( (    *((000((( *4*((((( (((((((((((((((***((44*5445>55540;;;;;@?cmTEJ:( ((((( ((((*:0  (((( (( ( (* (  (0>>0(( (0((( ( (((*((((*(((00540(*40*444:F:5440;;;;;ENc|kT>@5( ( ((((( **J4 ((( *4(   (040 (( ( ( (((( *0(((:@0((**00004:@YE444;;;;;?IT|qZfV>40( (( (((EJ*  (   (  ** (*4*( (*( (*( (((( (( ((50((*0:5**0:NNoJ445;;;;;?FNJ`TT@:50(( (((5b*  (   >E>0*0J:( (( (*( (( (0@*(*04PT504:E:>>55;;;;;;;;Y`P60440**( (((((* *0r5    (Vc\F@EJ5* (*(( 0(((((((( ( (0E\:055@@YE:V\E@:5455;;;;;;;;OZo;;;C4**( ((*((4 4\::0    (( *NfbYNVE00((**0(*( (((((((( (0>550>55*4@\mm`@514:54;;;::65WF`PC>C0((( ((( ((((( 0\V>0 (0*    40 *JT>5@*4>4*((*04*( (((( (((*00**(((*FJN>EE>;;>EFE;;;6l1I\rE:;@0(*( ((( (*0( (>F4* 4F* (    :FF50**545* (*50( ( *( (*(( (****(((*5@F504:J@WTVVT:;?;m{rrV>I@F5*@*( (( (45 (40( (5PF4   (  0@0(** *5@* ((054( :@*( *4( ((*(( (((5NE505:E:;LFF>5;Ec~mYELwbY5*@J0( (5(((0J*4*0*(((EEmpT   0  ((  (* ((:TP0((044(( ( ( 5J( 0( ( ((((*(((((((0>>005:::66;YF;;Ycmkf`bY:4@P@0( *( (0VFY@54((0EY{Y4   0J  ((4(  (0JJ0**(* * ( ( ((((0*((04**((0>*0>P:>5;lyE;;vbprqbm`@:450***(((( EbmJ4(*EoY|:( (( (0(  4: (>E44(((   ( (((*(((5\5*))),*4EP@55Nreb;;v|Q\cZI@T:00*0 05((( (@rY::\JE:(  *((( *4 ( 4@>5*(  ( (((**(*4@45,))0E]T>I45Lq@;;:PWmfbLcJ40*0*(>Y0( ( (>TfbbY>*(( 0(  ((((    (*(  ((( ( ((4*0*05>((*))*4`bZ@EFQY{:6;Z\~flc>(((*(0FE*(**( *>mTE* ( (  >J(  ((0     *0( (( (***045>4?;((*40@>C6JYZbJ@55;n6|wbJTmVE((((0:05**(0( (((***( (((( ( FT( (*5(   *4(**( (((((*04:FF5(,@?*0@`@554NfkZWC45565p~?5?apP@50 (:((( 4*(((54(( (((((( (( 4EV* (((*( (   ((*5TP0 ( ((((*0:@>P0(((,,(4;@514:n`x\|J66614ye>>PcP\@50( (*( *5@4*J@ ( *4( (( EV@ (0 4*  (:0(( ((*>TF* (( *@TTF>*((((**F??0*5:IVf\rN:::vY>PN@5:40(((((( (4@T*N> (0*(( ( ((@YN   ((   5N:0( ( (( (4( (* (0>N\T>(((((*5{F>0,1@PI]P{Z445:@I1JE:4045(*E@0( ( ( 4J(FE (  ((5J5(   (* (( *>F5* (((( ( ( ( (0>@4JT>0*((**EW464,1;IV]Q@FV55;:NZ154040EN4*P\>(4b: ((05(*5(  (:\5 ((((( 04 (( (( (0@E( (( (((( (( ((((0::(4:*50((*,,5050:?:OhF@:ozJ6;:ZF504FV`00EJ4(*cV(*0@N*0N0  0F4 4:E4:@(( >@( (:@@( ((*( (((((((**(**00*4***4?4;1*,;EI{E:::;CZ6@YC;44;@F04VN*((NV054:4((V:( (( * (*( PfN**0( *04*( *@0 ( ( ( ((*0*(**((4**05001>J;C?400IO~E>LZ:cZ5ZnJ50*04E5>T50*(mmF:E( ( ( (( (@0 55( 5bN( (((05((*(( (4(  (((  ((*0*(((((***4@106CTN;@>>1>NF;YZVCI6h\qaO5EV>@4:F44**JbWN:( :5 (( (>0( (0VP0( 44(*(((@N4(*****((** ((05( (*(((*(40((:4*0015;QN::?4C:NEO]wq@Lz|6a\aphO0\\FV:0@\E45:cc{>*( (:5((( (( *50(*4\Y4  >:( (( Pb@00(*00500*(( (((04 (((((*::0(***),4>:::OOJ5\F\qVFlVZk;IqQITf(Jc@`E04oP**4PYE4((((( 4:((( ((*04@4VN@(( :E*0 4>:*0*0500*004( *0*( ( ((((((*0:0*4(*),1:;:ECOP:?CEVoT?OL\JqILLIEP05|pfFEJkP*::\T>40((( (>*(:0( (((*4@:TFP*:V(*0 0((**05404*E>5*55J5( ((*00 (4((((((***(0*4J5((0416056CF::>]mECOFZCJ?Ep?]p60(Pk`@5>4:Vk`@:5***((*(( (JF4(((((*0:JEE*Ew4 (5EN@4FE5>cmT5:\pPF* *4**(((4E>*(((0*44(4:E\>0*5F00>50>:55;TV;JNQ:6?L`r@>(0{mOT0**4N`\c\m\EN**V>(( *40*(((0((*>J4(@*(4 *(>fkJ5445PwyVEFybF5*((00*>>>JF5*(*5:55:(0:V\:**0:>444::>>?>;booOJl;::wTTbT@((wb:555NTb{\F*0@>*(( (***(**4(5c5**4 (4*(0(4YkYJ:>F@fpfTcp`bJ>50*(0*ETYN4****>N\F5(*:N@0555JPE44>FE>JVO@]|lEPJ6:CNeVPrC0(4l~V@TJN\Yk{FN>:5** 40E(((04*4(:rN*04 (5:54 4fykVPTk{yocVPbTF4:504F`54@E:4*0:YcV4(*4::0@F@fcT>40>:?EJPJE;IOEOrk;:11YPC:1*4akY{TY00`w|mw\4 (VN*(((*0*((0Vm0(*:F004* 5o||wwpkYbkF4\pV55:JT`N(*NJ@40*0Nof@54EJE4>F4Ybk`405@bTEFJ>6PZTWO|:;:4?lP;0)*0FrWpbP0(04YNPTJ4(** \` ((((*((*:F* VkJ4(@( (>@V\kopTNN`@0VrF5:PmP****4@55>>JVb\N0F\`>NN:JPY\;:@VTEFE>@PVqqal6;:510J0000:y\pJ:(((((0@:P(04 ** (((((**((0*(45>5(>0 (*ETobVJJ@>05P{yJNY\bJ040>>5@EPVPJ@@4(4Tf@JYJVVbL;F@>O:;@:FFLJV|6;:p11ea@>0VmzZcJCF4:*0(((0V0(( ((((((0*( (4EJN@:0*(   (0>`rmF:545VkN\{cJ>44>E:0::4@E:000*(>YNP\@PT`C5>JE@;5::JVPaYL{F:;{n4:V@YFN;,*4>:@40((( 005( (*(*(((0* *T{T@:0(  :PTmfJ@4>VrcyTJ4(*TJF400*4>N@>:4*4YTT:>`VkPEOcf\ZE::YVTZlk`6ww\>;610)*5>`J@4(*0 (0 ((4*0***:0 4pyo`P4((*   (*>b{YT>>fkV>E0*:\VV55:>>>P>5NJ5(54>5PNF`TJcmcNTTE>JNTQN]nk4{\oQ;4*)*(((050>V:04*0 F0(0@((((*(0N>00( (:yb:50*(* (( (0kkJ>N\::::@J@F>4:@NFFV>4FJ5((5E5VYPP\bc\JT\mkF>JTrhevhl1k~w]`TF@4****)**F4:NF(*(( (kF04T0*((**4wT0 :PwT4:45:( (( ((0*fNFbPNPPEJV@4@J>FPF5:P@>N@4((5F>TbPE\aN>EJ\fFCOPwnzF66{@YJTEE55F44::@>F4P4** (*04* J@0(***4J5( (45*:F>5YY0  ( 0N5FT``NP`pcVVP04F`TPN40*4>@NF:4504:E>@E:CFJCJEN@@CIn]`c6:\NFNTOO`\PFNJYJJ0:05fT(*(0@* *:0(**((4:5@**((*(**05JYw>   4YfJJ\NcfbJNTTE@>4(0@cpVV@>0:PFJb`P@05ETJ\V:J`TVc@::>@Vw1P4|W:cIJ{P;Coko`EE:P4((FY:(( EJ( ((*(((*((*4f@0((*( 0>54( >N`YJVE>VTPcV0:0*545Nwy\NYPkwcm`@5bo`kP>TcccfP>FFQ4x4pmk]NoqC6>OYCzrE>P>6FTJ(JmE(((4cP5(E:00*(**(*5b{oJN:*(( (0:0 ( 0*PTN`P@`fF4*>T>5PE>JPkyJ>PopEYcokPJrcro|r\oYYqoaW4hOV54]cZ]WC1EpoP>V`5>fF**0:cT0(YV:5*(**0FcPm`ok0 ((*( (((( (Tomc\fN4N\4(@wJ>NNJN>Pm\J\ybTbPb@FVcr\cVVf|rqlTkpOVI56>6@::?QLCC1:PwWYPP>5NJ500>\Y* >T@54*(05\mN>f{N:@((*(((5( **((((JcJbyrE((4*4ffcfcP5@bkowE>>:00FJJN@VmwpkYVrmlcz:656>L|Z?m\zV>EFTac54>4:4*0>EE* *:>44*(*JT:(:{kFF(0T0( *( ((((( *0(TPV:**5*4crrkfkNETprrm::>:40ETYbNccYTO{n\r?6;:66>l~ff{NPFCL`Y5@:044040**(:>:(((*04:E*(:myY0(050((((((((((( *005>* (E40EPJ\ob\JNVcwykc@@@:>4@>Nk\Vbro\bPrxxfoooohV5:::;1CYz44NYc\TQ```o:@J:*E40*** :V5((((4N:(((4@T>4*40****( (*((*(((0PY\* (@*5\>Jb`cppormpyk|E0J:5@JENbpYTmll|rmolnwlla`::;;NT\{::6OlobY`YT\PY:bV:>J>(*TE0((*5f@((((0F@44>50**0((4F*5E400>Yb> (*F\``mF@kpwJNV`Tm@:YFEFFJYpw\Pc|{xqbyry~mxP6;;o:{`|rY`Y{YTFfP>Tc:0T>*(05Em>5*(*4F:5TF:4(>4*5*>*:N544Py0 0*(5>0@@0>:N>:J?I:>LICC\NNV|mT]lkbefkoyoahV;;;::;;~b@lYeYerrfNycTY:5bN:J0**:JPY44*((*0(:T**0*fN*0(444E540Jb@ ( (*:0(NP@5((0;I??6NT?4>Q\PTko\VfLO~bYeTe]waY]`;;;66;5bVWrn\]ONcwwFmFT>5NypP>co|P0*>oNF:50((*((*40(0::4*4(4J5Y>05:( ( (**>0*0500**4Fb]L?cP>:CNZcYfcVPP::ZZEJ`f\Lb;;;;65:55656Tf]oc?:5J:Fcr`w|{JF:Fr4(*>5*000(*:*(*54*>N*0*4* 5*EV5@c00*4( (055***005446\`cNPmLCQkbhv\ZVbYCCWqTQWpwCN;;;;;:6:;;NlJlkQLFrF\rc~yFEF0P\E4*(4N0****N`:(*0:>PfE0((((**Jc>5>*F>5*((*>5:0*404E5>VcFP`Vh{VFYeWeyWYVppaZoxy`\lzY~f\e\;;;;;;;;;;~fZTfeY\mzN]w\P\NJT>Vk:540@JFP@@kT500450>`k4>:*5>5Epf>*@TF*(((0:5:0440**@ye?N\YxZJ\QWekhe]cZOqc{O?ELL\wq;;;;;;;;;;::15OnxqO\rqqw]Qbvpmop\VVcr>>@45kPN|V\:44@5( *5E44>5@555w{E:YoJ0>(*:PF:*040**@mO]{Vb|peV]OWh`lmJV\whal?Wnao~Nqh;;;;;;;;;;::Q5LC\zF]rWI;>J>VTTT\k@:J@:@:5V0*4@F4*(*F4*0EEPJE0Jk45pN*4:ENfwr40544005@Nw~rbpnhV`hcYTVZ?CLEJp|e>>4loVZO5;;;;;;;;;;4IFQ\hxQWlOOC50?{xc`I>cJ>JV{rTEo4:@TE4:05*F545kYbff0*0(*FcJ**4>@@V>04440?EETTfknaNOpzZPZ>OLEOkzlFIlfq?555;;;;;;;;;;5kmynm?6WLF:5;CWyyry|`>46;>@bmYYm`4>PTV:4*4*(*5*PTPP>(*(((*******00>*0000*;Pwmy`zzYV|PVyOZZmfynO{x55;;;;;;;;;;;;k5nY>6;??FC:QkxkxoNJOC?LCOPTrk\cobF4T\\@E:@5**((0**(((0((054455*04550044445TrYnZhrr`f]\\OrfffVfWY\::;;;;;;;;;;;;;;;;;;c::CeIr`O\lQZxpFJENJpbk\mycNTN>N@5JofPNE@E0*00(((((*5>50:E>44*55E54Pk@:4@YmVNro|vv`vnVq|QTavN;;;;;;;;;;;;;;;;;;;::T@vfWZcpTxponrNYJFYwrpJrVNyE:mrP:>:>54b`(((((*YY::4FPE5:04>45\fN>5bVVO?@P~rk`TpTEO;?O:;;;;;;;;;;;;;;;;;;;:56~lpYTI>Wna|bJFJFVoNFcoJc{{VE``>F:*05Y@((((0:J:>TE5JE0:>@>**F@JVJbVJJ?TNoko\IJY>N?5J;;;;;;;;;;;;;;;;;;;;51YWpw\EPrr`Fc{YrpOTJETcyNTPNboNY`FJF5>Yb>(*T4 *(0PN>0>TF5>:(4\V>054:JbPw|ECC?m|~z{llk]v~bP\LmLO|`a;;;;;;;;;;;;;;;;;;;;5\JJam``wJ>CIJ`OEac`J`JIZfY`rkoyYmk:40>F\E((@0 *4*>E5:FE5E44**VJEP5@NE5{YYLY~parYEObW]zb\xob;;;;;;;;;;;;;;;;;;;;;Nok|>5Pl`ENQTeoQYTY\Tc{pooJE55::045J*((**0>05>5>@*44*To@:`5FPE55`mlQJO@?>l|~WNEJpInnbbZZ;;;;;;;;;;;;;;;;;;;;;;WrFfywwrcCFNPcbbW{pTEZykpw]V5E4@5>J`4**(44F455*045045JkV545TP``p5vnlCIEWICJPoYnQfxbN]f::;;;;;;;;;;;;;;;;;;;;;;WamPTYEaLJJ\J@FJTbn]rYN?bcw|ooC@O5Y>E5*5PTP@**:F5:5000>554\bf54@Vc::5511\Qff@5FeFP]Lrln6:;;;;;;;;;;;;;;;;;;;;;;;;;5vpnfPIIN\hL>E\|YornP@b`r{ZJcv@?T:>FF5((0ENF540400**4:E5:4FP`>5@Pr]oTYYY{nCEpO\I>E?wvP]{c@J;66;;;;;;;;;;;;;;;;;;;;;;;;;54{lFIh]poV?@?chbfkOYpc{xL54TVPq@J:J5**((0:4*4:0((05F\54>ETV:>@Jp{Tlr`5`|CzfJpC?;;55;lCW;44;;;;;;;;;;;;;;;;;;;;;;;;;;;qlEV{nx{I`cP`q\hOETCVeJF4;:N]aPPNVV5ET0*4:04>:0*5@@NF@>NTJE>N\TokbqbbT4{r;JJ5\QF;;;;;:6W;66;;;;;;;;;;;;;;;;;;;;;;;;;;;lcwhZZpok\YNb\@;>CLTkoZ>OFeE*:`>*54:Yc@04@J>NYJJVobYJmkaZZhcWO]O4YY``FF;~NF;;;;;;66|6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;c|ofYQbk|vrf;?`YYkaq{YO:6;:NI:@Nf@44:FP@5@@N`wEPNYpP@QymaL?WcFPYY{{`;`;;|@;;;;;;;:::6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;c\PVVTZlhCCF\yNqkar\?C;PPmm5F`>44>@@:@FcrcPbLLvI>QcezN;z~r`{`{{Y;;;;5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;r5|xyLb|qy~~{Iq\`ha~~ll@ErnwPc\TEJF5:FPfF>@Nb{kmNPlPW]YT]mIl``F;;;Fn6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6|cԝrcYwb6C{EPPYVLYWWPO`F>:N\T::5:`bkNEPffywTLo\\hT|OPlmrqY]`;;;;F\lEC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:56;y˼aT]]J6kbLcWvzqNPhbkzxxWw`VP@:IT:4>Jk`hfENf`VT`NTcNoQLNYWWOTf;;;;F\C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;65::rcFLT\E{QQZqPP~Wb|LVbOJP>cfJ6FbrEL`TTbm`rLV?Cb;I`C]vYZx;;;;;@I]O;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;66:rQqc\|JTToWbyCJ{NJEw`wpZ@FP`cYPbze?E;JOV@pmw;;;;;;;;;;;;LYJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;66;QP`4WLcZ]T::PheF|c`TLy|e>@m|kOFPTNbewZEF`kYLrw;;;;;;;;;;;;;;;JJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;l:LZzxwxm66:NkJNovfbVLVpL45x~Y`TL@;?JPTprpofllw;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:6E?x64~lec;::;;;?@WZeTVopNOJL:4>xWWQ;?LYfcVfl~f;ww;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:6Wzz:4hac;;;;;;;5f;E~VTmTEbP;>6CavfzfJ6{TOraavY;Z;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:65NNyL;;;;;;>@{Yk`TkYC>`TEPIPF:a\J@bn\Y]lx~vohl;;;pN;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:55;::I`]Y;;;;;;Yy`LYwP>Y|YVPW;4>pQFEao\WTbeekYC;;;;;ZfqN;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:6:;::`TL;;;;;:FvevV?]wVVY5@>:bpofQcZm\Vflox?;;;;;;NqN;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;LYL;;;;6:;F@Wlvo`WWT\yh5?J]PcF`ocW]|r:;;;;;;;;;N;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;@amVoV\wCP{O46?wozW|ObVZoY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;C@IaxϲVVwJPLPJFONqycJoOblcJWWY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6@eeoO~VQN\yma\nf@EbmyVCnT`kLN\o;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::Pbe]OQYJTwx`oaIN|{yxkJCwOҕY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yknlf\QLOhcWQo~p{{JwJ>c\Yn;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6?xxxZQNWwwpfWQl`axWYETck]n;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;66|pfYWWˈlT\h:]JkYlfmZC>Y;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Vmzwʉ~{oYY6`CkweQ]hrY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:`wmclfl`eavONQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Q{y]OfLLTfmlwoTZmJ@yC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Qxw{wyc;@Noa|pWCPNC@IC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;]|xL;;El;>@E:6:;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;JzWYL;;;;Nl|L;::;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;      )         $$   ,,  $ 0* ,)$ (JI(0>F$0FE50(((* $  *4$$$ )*(*$ $ PC>4> TV>5;:>4*((((((( ($ $$( ,C (( O>**;?@10),,()(  FWcL?11:  :6F:4,0*((440(((((4C*5*5N  (,?(( (0(1,($ $()554)W(NE044F`PEE>I$VeO;E(54I>0**4@   I45?5*(0*00>J>0(***E:1, (5:Fc40,>@(5)(@((($;;($ ($ $,1440*:P1*$((5?;5:>WOc];5PII5440***4? ),Ya *TPemF:46;::*0*5:4:44**(4PYP0,)*455*,,(4441, (*(((($(($ ($$,144:1,04 (((4@0*0>>V>455;F@4***004;),OIF($$eF$ ]]]]]TJQOEOJ5445:;F0*(0>:44F5*(0@@F,00441,( $$( ** ( 5:1($($$ **,4160)00 ((((000***0@044*@:((**11>$ NN;?,))0OV;:*$ ]]]]NFbfJ@:5:55>:N5**0:>0*>5*( (*(()04*)( (((:0 ( ( (*(** ((((**((4:(:>((((((*),4LJ0F6>@((J?TW>>N>@)(]]]]II]YpV444:45:4540***40(0**(( ( (  *( (( (*((( ( ((((((****** 00( (((***(,0*5@5?5>]?::bTFC66EJ]]]]YYmm`@F@>44E5000*****(((((( ((      *50**(( ((((( ((((( ((((*0*(** (*(*000*0*:>445:>Jp]]]]]Ohop\@@:50*00*(***(((((((( (*(  (  (*:>4*(( (((( (((( (((((0*****((((((****4*04045@>V`E]]]]LWb{N:54>55*((((***(((((0* (*( (((( ( (  ((( **:J0*(( (((*((( **(* ((*((00((*(( ((*(****404445:5EJ>4]]]]L]xkE:40400*(*(***((((((@>* (( (( (( *(  ( (( ( ( 4@4*( ((*(040((0*( (((***((((((((((***45*0045:5>>40]]]]]NyfF@50***(((((**(((*((4>* ((( ( ((( (( ((   **(540*** *50***(( (((((*((((((*(***(*55*544:>55544]]]]]\JboVNP>*((( ((((*(((***0@4 ((*( ** (( (0 (  ((5EE5*(((0**( (((*((((*((*00440*0540445:E:5544]]]]]ZOe{mY@F>* (( ((((0*(((0*N5 (((((( ( *4(   ((4:4 (((( * ( ((((( *4***>@0****44004>@TE545]]]]]\YWyp]k`E:4*( ( ( (*(((0(FJ* ( (((  (  00 *050( (0* ( (*(((((( ( (*:0((04>5004:NNkF44:]]]]]\YONaVVF@>4** ( ((((((**:`* (((  EJ@404T@( (*( ( (*(( ((( (4@***45NN545:E>>>55]]]]]]]]\`V?4::400*(( (**((*( (*4o5 (  ( *`k`JFJP:0(*0**( ( (( ((0((((*((((( (0EV:05:E@YE:VY@@:55::]]]]]]]VQ`o@@CI500*(((((00**5( 5Y@>4 (( ((   ( *(  (0Pmf\PYF45((004**( (((((*(((( ( (4>550>5:45E`kfY@55:>>5]]]WTOIWJ]QICI50*((*(( (**(*((5c\F5( 040 ( (  ( 50  0PV@>E05E50((0450*(( ( ((((( (((**04*****4JNN>@E>??@FNJ]]QIn@N]oJ?@F500*(**0(((04(( *FP>4( (:J4  (  (@NJ:400>::0 ((4:0((( ( *( ((*( (****(((*5@F:45:JEVQ\YT@]\OovwYCJFN@4F40((**((*5:( *:5*((:VJ5 (   (*  5E4*40(4>F0((*:>4*( :>*( *5* ( ((**(( (((5N@50:>@>@NJJ@>]PknWLOyk]@4NV5*(*>***5P04*40***EJorV  (0  *(*( (*  ((@\T5(*4:5(( *( ( 5F( 4(( (( (*((((((*4@>00:::::;@\J]]]|{alkkcf`@:F\F4((0*((5bJ\@>5**4F\yY5 4J  *05(   *0PP40000 ( (( ( (((*4**(04**(*0>*4@N>@>@orF]]qanpncmcJE:>500000**( ((NkoN:00Fm\y>((( ( ((  ((*5* 45 ((EJ:50** ( ((((*(((:V50,,0105EN?>>Prb`]]qyT\c]LJY@5545*(4:0**( ((Er{\@E`{NJ:* *(((( (  (*(((( *0 ( 5FE>0* (( ( ((*(0***4>450015F]Q@I;?Qr|a]]FTWlhcOeP55050*EY4(((( *FYfcc\@*0*( (( 5*  ((**   ( (*0*(  *0(   ( (4*0*0::(**),45]]WCJLTawOO]ZZzflkF0**404NJ4044* (4FmVJ0(((*((( ( EN(  **0    ((( 04*( (((( (0*0045>5??**044?>E;OZZaWVIJ]nLnbIVp\J0((04@5:40*5* (**(*00* ((0***( *( (JV* (*0:(   ( 05***( ((***(*45>JE5*,C@00@\>55:Neh\]NFLOQLpC:Ecr\JE5((*@0*(((50***>4 ((( (*****( ** :FT*  ****(((  ( ( ((0:TP4( (((***4>@@P0**(11*5>C655>k]xY~ZOOP@CyhC@TfTbJ@5*((40( 0:F:0P@ *(0:((**( ( JV> (4 ((5*   *>4(( *(0EVF* (( (0EVPF>**(((*0E@?405:JTfZn`QPTrYCVTF:>:5**(**(( (*4EY0P@(((4*(* * (((*(J\N( (  *( (  :N>4* (*(*4* ** (4@PYT@***(*05rE>016EOJ]Q|YIIPYQJ6PJ@:45:00JE4((*((((5N*JF(((( ( ( ((0*>T@( ( ( *0 ** (0EJ:0(((((*((((( (( (4>@4JT:4**(*0FQ4;54:@LWZWEFYJQ]CO]6>55:5JT:4Y`E*4b>***4:*0:* ( (*@c@( (*((*(44(*( **( (((4EE* (( *(*((*( ((((4::(4:*54***1,5155@E@QeLE?oyYT]J\N>4:PYb55JP5*0kY(05FN44T0 ( ( ( (4P:( (5@F5:@** (EJ( (((>F@* ((** ( (((((**(*0***00*400*5@5;101CILqE@@?CEkPV`L@:>CJP5>\P40*VV5>:>4((V>( ((**( 4( ( *4* VfN0*0* (445*((( 0E4( ((( ( (**040***(*4**05444?L>F@555JPzE@JW>ckN]oO:445:N>EV@54*kfPEF( ((*((((( (F0 *(>>* :bN*(*0(4>*(*((( (:((  *** (**040*((((*004>44;EVP?E>?:CNFEYWVCLPk]p{hT:J\EJ;CN:544Nc]V@(( (E:(*((( (J5* 05bV5( (:4(0***EP500004***00(( (*5:( **(***(40((:400046;QP;;C6F>OFP`onEOz|Pa`bnmT4bbP`@5E\F:>>ccr@0*((( (>:***((( 0>5*5:cY5(  E>((*((YfE45*040>450*( ((*44 (*((*0*>:0*0*0*,4>;;;QQO:]L`rTJ|nTYmVYrWNTf0PcFcJ55kN04:VY@5***(( (5>***( (((05>J:bTF** >F04 5F@4404:444445* *40* (( (((***004>404**),1:>?FCQT?EEIQpY@LIaNv\WPOJT4:ofNJPmP5@@`V@:4***(((*@**E:0(*(04:JEbPV*:T(44 4(**05>5450J@:0>>N5( (*044 *5*((((*000*444N:*(4556466FI>>C`hIFQFZJOP\oIarC5*Tk`F>E:F\m\E@>444*00*((*YP:000*055>TJF0Fo0(( ((>NVJ:JJ>EkoY:@`oPF0( *500*((5F>*((*44:5*5>FY>0*>J04>:4>:::CV|W@QQTOL\WcrJC04wlPT544>Tcbmbp`FT00V@**((0:5540000*0EN5(F**4 0*EprT>55>V{{YJPwbJ>0(*440EE@NF5**0>@:>>*4>Y\:000>>445>>@>EC@bloQPmYYYwZ\m\J0*pcC:>@TVf{bP45FE0*( *040*045*>f>4*5 *50(4(5bm\N@FJFmrkVfr`cN@:40(44NV\P4**00ETbN>*0@PE0:::NPE45@FJ@PVPC\xkNWNTYWQe\TwI505lzWFYPV`YkyNTEE>40(50E***454:*>rT444 *:>:5 :k{m\TTk{wmcVTcVF5>>45Jb:5@E>504@`kY:*0:@:0EFFcbT@54@@ELJPNE>NOITwh~]WE?\QF>:45`ob|\`54br|ryb:(((0\N0((*444*(4`p5**@J5450(>r||yypk\cfF5`oY>>>TVbN*0FJE:445TpfF:5FJF4@F5V`f\54:EaPEJJ>;PYVYP{|T]VEFmW@5445Jy]pn\5*45YNY\J5*00 (\\(((***0**0@J0(\fP:*@( (@EY`op|pTNJbE4Y|pJ:@TmP*0005F::E@JYf`N4F\\>TP>NPVYC>EYQJFE@@PZoo]lP]VI>?O545:@y`vV@*****4@>T*44( *0(((****40**50*55F>*>4( ((0FVofYNPFE4:TypNP\`cN454@@:FJVVPJE@4*4Pc@JYJVV`L@NE@P??@>JFQN~WQ]Wp>>faFE:Yoz]cJJN>>05*(*4V50*( (((((****54*((*:FNTE>00* (4EcwpN@>5>YkTbycNE45@F>4@>5EF:444**>YPT\EPTVC;>NFI@:>>NVTb\P~YWYyh?YYI\OVC50:EEE54*(*(45:( ((*000**0:0((0YyPE:4* (>PTokNE:EVpfwVN5*4\NJ:554:@NE@>5*5\TT:E`YbPEPec`ZI>@YVW\hlkLry]E@?;614>EbNJ:*05((04( ((*0505040@4( (5oyo`T50(0( ((0@c{\V@EkkV@J54@b\Y>:>E@@N>:PP:*:5@:VPFYTNbh`PTTF@JPVVQhwnCy\pY@:415,*05@5>YE:>45(*N4*5E((*0004P@450 (>yb@::4(*( (( *5kykN@P\>@>@FNEJ@:>@PJJT>5NN:*0:F:YYPN\``VJV`mfJENTwkozmo?m~ra`WLE;4410,*4T:>NJ04**(*kJ45Y40*004:rT0 ( >TrP5@>>>* (* **40k|NNbTNPTFPYE5@NEJPF:>TE@TF500:J@T`J@YZN@IL`{bFFOVwx{VJPzE\NWIN>@F;:@@JFJ5T:4*((0450*TF4*000:N5( ((((5:0>N>:`\4( (( 5T>{FVbbPP\fc\VT5:NbYYP:40:EETJ>5:45:F@EE:ELNEPJNEEFNwaefNY\OOPWOO`cVNPV`PJ5@4>fT00(4F0(((4>5*0000:>:@00*(**000:P\w>(( :`fNP\PfkbNTVNEE@5*4Jkp\\F@5@TJNb\T@45FVN\T:F\T\fE>>EEVv;Y>~kYcNL{QCFpkobNJ>P:*(Pb@**(F|N0***00*000005k{F4***(( (4@:5*(( ( EPb\PYF@YVTmY4@40:5:Tyy\T\Tmwfm`@:`m\bJ>P\\ckT@IFT>y>rkf`]ppJ?ET\Iz{J@YF?JTJ0PwN00*5fP>0N@55**0004>cypNP:**( (*4>0 *( (( *50TYT`PEcfN50EYE>VF@NTmwJEVo{mET`fcNJm`mm|p\kWZqqcYLhTW;;`b\b`F:JrwWEV`>EoN445EkV40c`E@4*005Pr\o`of4( (0*0*(**(((((VrpcbbN5P\5*FrP@PPNP@Vp`Nbr`T`P\@FTb{kY`VVh~wonhWloTWYPPC;E>?IVQJJ:>Tx`cVYJ@TP>45Ec\0(E`J@:405>frT@kyN>E*(0((*5( (00***(JcNc{oE**54:mmckcT>Ecorr@>@:45NJJPETcombWWwmkey~YPPPCN|ZEney\EJTYfk@>J>@:04EJJ0(4@F550*4NY:*>{oNJ*4T0((4*((*****(04*YPV:44>4:fywof|kNJVpryk>>@:54JVY`PcycYTP{m]pPL]WQTCh~kh|Y`PNQ``>J@5::44440*@FE0**05::E0*@p{\0*5:400*0*(*(**((4:5>E0(0P55PTTbobYJPVbrwo{fEEE>@4E@Pf\V\mk\`TwyykppppkZIYWW];F\zFFTcmaYY```p@JT@4F54450(Ec>0***:T>0*(5ET@50:54400*(*0(*00*0:V\\0 *E*@kETkbfpomrkr{mF4N:>EFETboVTkek{pmqhkomnckVY]]LV\WYTOlpeZ`ZVb\\@f\@@TE00\J4*04>mE0*((4PJ55@@4004**5N0>N>45F`c@((((00PkkfoJEkp{rNP\aWoE;]FFNFJ\moYQe{yrnazqwzpycT]]pW`~qZ`ZYYNcTEVf>4VF40:@Nk@>0*0:P@:TF>:*@54>0J4@T>:>\w0((((400>E5JE4@>PE@NFL>@OJIJ\TPYyfT]k~keffepyqell]]]TT]]ykIpZk\mzvfTwk\b@>fVET:40ET``::0(*04*>T0455kP45*::>J>:5Tb@((*(((*0@50TPF>0,5@JE@;TVC;@TYNVkm\YkPTa\fWcfhbfk]]]NN]LbW\wk]bQTewwFkJYE>TyV@kpT40EoPP@@5(*0**05404E@:4:05P>\@5@@*((((((*04E405:54446Ib]NEfTE?EOZb\f`VVT@@]ZLObp`Wq]]]]ONWLJC@JYf`peFC>PEPkyf{PNENp:04>>4454*4@0**>50ET454:0(:4F\>Fc0504*((*5>>44454>::?bbcPTpQFVkblwZZVe\FJZpWTWmvLh]]]]]YQW]YQlOlm\YP{Tf{l~|{NJP5\bJ:40:T:4440Vb@*05@ETmF40*0004NfE>>0N@:0((0E>>45:55N>F`mJT`Yn{YI]h]hyYZWppb]pyyb]my]~h]op]]]]]]]]]]|h\Vpl]crzVcwbTbTTYE`mE:>5FPNYJEkY@555:0Eck:E@4@FENymE4EYJ0*0*5@>>4>:404J|mETc\z`O`Y\emlkah]WpcxQFJP~O`~]]]]]]]]]]YYE>WozyV`{wppbWex{rwpb`\mrEEF::kYTY\>55F:*(4@J::F@J@@@{{JE\pN5@00@TN@45:444FoQc|ZcymkZ`V\kbnoQZazmcmFZppo|Tqy]]]]]]]]]]YYY?OEayPb{YOCEPEY\`\bmJ@PF@JE@Y50:EJ50*0T>04JP\VP:Pm5@wP45>JTkyw54>5:55>ETzwcyvlYblhaZ\bILTNPq{eEEFppak`Q]]]]]]]]]]FLNT]hrZ`qQTF;:Izw|kmOEfNEP\y\Fo{5>FYJ5>5>4N>::oboom444*4NfN00:EEFY>45::5@LJV\mmnaQQpzbWbFWTNVl{pONlfrNIQQ]]]]]]]]]]IkoynnF@\NJC?EL`yzy{|bF>?CFNor``ob:ETV`>:050(4>0TVTT@*4**0444404455E045550@W{zw|cyy]ZY]xWbbpfynTyIL]]]]]]]]]]]]lNn\F@EFELLCTrzlzyPQWNETNZV`wmcfpmN:YccFN@F>**00400***40*4@::>>4::::44:::5>Yp\wcovvfmeccWqkkkWkY\kYY]]]]]]]]]]]]]]]]]]e?CFhLr`VarY`~rNONYTwfwcp{fV`VF\J@TrkPVFFN5455*(**00>F>5EPF::4@>F:5TpF>:Fbp\V|{xzc|r\qyWVbwZ]]]]]]]]]]]]]]]]]]]TTVIwfZ]hq\{wwmoYcPPcy{rT|bYPFpwT@E@F:5fb****04b`>@5P\J>@::E:>bfTE>fZ`YJJY{of\rVJP@I\Y]]]]]]]]]]]]]]]]]]]TLT~npZYNC]mb|bVQVNYpNNmwVp|bPc`EP@05>`E**004ET>@TE>VJ4EFF@44NET\PfZQOJYVpnrcPQ\EPE?T]]]]]]]]]]]]]]]]]]]]PF\\px`JWvp]J`v\{pQ`WN\kyJY`YowPbfPTJ>FbcE*0Y4(00:VPE4E\F5EE0:c\E5>>@PcV|JOLFpz~~kkfbxhYbToOQ{ck]]]]]]]]]]]]]]]]]]]]PbONcoaavLEFJP\OJbf]NkVTekYbwr{boo@::EN`F*(F5*050@J@@PJ:F:>40\PJT@FTF>|bbT]|qcvaLT~eZawccypq]]]]]]]]]]]]]]]]]]]]]Wp{l{E?Wm`IPVYhn]c`beWm|rpwPN>:EE55:N0(*44:E5>E>EF4>:4VrF@b@PVF>>brlVNQJEEl~~Z|PIPwOqohokk]]]]]]]]]]]]]]]]]]]]]]`vLevvxrcIJVVomocyVLa|o{{c\>N>F>EPb5040>>N:>>45:>5:>TpY>:>YVbbp>ywnLOL\NJNVoYlWcqfWblYY]]]]]]]]]]]]]]]]]]]]]]`cqWY\LeONPbPJTVboxcwbVFlkwrwNIT>`EJ>5>T\VE45@P@E>455E@>:fkk>:F`m@@>>;;cZhhJ;LkOQaTqmpPY]]]]]]]]]]]]]]]]]]]]]]]]YLrqvkVNLTcnQENfcryrZFlcw|cQeyJJ]>FJJ>0*4NTN>:5>:440>@J>@:PYcE>J\{`oW]\\w\ZpW]PEVVwxYb||hIP]PP]]]]]]]]]]]]]]]]]]]]]]]]]NE{mJNncvrZJIImrmkmQckyT@:\\VqFV@N:44005@>55@5005@Vb>:@J\`@EFNyYoxb>b~\zhOpV\]]QQ]rJ]]OO]]]]]]]]]]]]]]]]]]]]]]]]]]]ymIW~rz~Omo\kycnQNYJ]mON;E@YkcV\Y`Y>NY50:>:>FE54>FFYPFEV\PNEVbVrohwhhW;r]ZZPcac]]]]]YV\]TT]]]]]]]]]]]]]]]]]]]]]]]]]]]mkoeeyym`bQhcF@FINWrq\FTNmJ5EkE0>>EcoJ:>FNFY`TT`yk`Prkb`ale\TcV>\\bbZZ]~\c]]]]]]TTQ]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]~fwla\hn~vrn@F`ZZkcqzZTC?@@QN?FVoJ::FNVJ>JJVfyNYVbwVFWypaPEYeLY\\b]b]]W]]]]]]]YYYQ]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]eaY]]\alkFJNfyPqlhzcINCYYpm>PmF5:EFFENPoyoYkTVxLCWck|TEz{yvbbZ]]]]O]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]vNyyPly~{{P~xf`hb~ppIJypwTf\VFVP>@NYkNJJVfopTWlPZ`]YcpOmzbbY]]]cnJ]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]TfϜyfcrc>LNTPYYPa]aQTcNE@P\T>E>EkkoVPYkmYVwaakYTVmlqqZ`b]]]]cnp]a]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]TLQYzźfY`fN>phVcYyzqOTqhmzzx]{h]VF>OY?>EVwkpoJTmfcYfQZlTpZQQ]ZYQWh]]]]cna]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]PJTTyeLPZaNVT`qQW]e~Q`lYPVLkmQ@Pk{LVf\\mpkxQ`IJhELbZb~v\kx]]]]]aVbh]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]NJYwWqkbNTZqZkxIPyQPJ{f{xbIP\km\YkoIJEOV\Yp]]]]]]]]]]]]bee]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]PP]YWcL~ؾZQe]]WVVVhcNfkZTy{fFLrkVLY\TfmaJOcl\h{]]]]]]]]]]]]]]]ee]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]oYP]y~vrwmQTYWkQTlwpm]QYpO>>~bhZQFEEVYYvxrphmm]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]TPIEyPIzmff]YY]]]\V``e~\`wwVWQO@>F`bZ?FO\ok`oq~h]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]TPZyyVJhbc]]]]]]]FfEN`\r\PkVEFCIlzloT>zYWykhyc]p]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]YPNOOf]]]]]]LIzble\o`LFbVO\TWOChfQJfva`enznhm]]]~h]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]TIP]TFLaco]]]]]]h{bPb~ZEbbaY\E?Iw\OPmqaa\kmckmb]]]]]qzh]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]TPY]TJa]f]]]]]WWrhw\Cfyba`?JECkwvmZh`va\kpoz\]]]]]]hh]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]fof]]]]TJL\NYkwwcaa`fzl@JTe\mJcql]b{qY]]]]]]]]]h]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]QINmlWw`fFZ~T>@Fzra~Tf``~p]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]\WWhyŭ``{NZVVNJWTw~kNoQcnhO]]p]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]QWfh~nT`\Ofrb]opJLfp~`NmYbkQQb~]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]WW`ehbQWaL]|vbxhNPz~xlQFwVəp]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]ymznhf\VWnm\Trzq{|]wLEc`]|]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]TZyyyc\Wawwpf\Tpabwf\NWhlc|]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]TT|qh`Z\pY`lFaOkmwkmeOFo]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]bmyvŒrfZCaLkq\em˃o]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]Yox{ryyp~bwmwWPh]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]mxwaTkh]eypmwzlenQIb]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]mxwzvzw]\cqmph]a\TVab]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]o|yf]]c{]QVbYTY]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]foof]]]]k{f]YY]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]             ** *)),     1)($ II* (     0)()*  ,4>)$  ( 0*   * (0   )   6,,,>1()$*1;0 $ * )  ; *  *   *E$)  $0 $,,54 )$)  $ 14 ?:W`;) $   **($ ( *  $  )$(4)((((($@@?4?5( *  ((  *   () ,0  (((( \kJ00 4   *(   **)$(,$,1$$)$( (((( (JF4  (    ( 6$ 54*,$ *0((((((V@5 (  (0 (((*;\((((($:TE*    ( (04Pb:(((($05]E(  ((( ***:E5 (((($4C{4 *( (  ( ***45* ((((( CP0( (( ( (*4****((((((00PW@50(( (  ( ((  ((*0>00**((((((14Qx>40 4   4:   (04N>*0*(((((*5?lW:4*(00 0( (( (05@`@*00(((((*46:C5* (@ *  (5  (@@*(*0044400((((((((?Jb0  V( (*( ((  5N0 ( *4N50NV5500*00((((((()4:Q$$(*( :((  (*((0( 0** *(((5PcfY:0,,00*((($$$$E4>,((* ::* (*    >@E5>>4544544((($F,>O)((((*(  0(     *4:0(04@5LC:>50(*)FPJJ4()(**(  50  (05 (*E:0*05:4144400(4T6PfC:(*>4, ((( 4 00JN>  0**@ (55**0444,,1>5((?ZwN;>>544* (** 0(@0* 4:V:  >  **  ( (4(*4E4401CF5((Q@EWLE;@5( (4>0 0J:V\*( * ( 0N* $()5@4,*5FEP((\e:;?6,(,  (FP:((@c54*(  (4(*$ $(5LE5>)*:Va)(():?E5P@,0(*> 5@@EE4   ( **  )INL6::EEyN)((;:INY>;:0 0* (E40*4  (*4(10 ( 146,:F;>0*(((L$PT5015*  ( 0: (  (0:*$54 5N4***>OC>>1(($$ L`Q*()4>0(  ( (( 0:** (**4  $$*01)(*0ZE\vC`5(($ $QE$ 45*4( (0(50*5**   ( *04*( ;41$ *,4?N@Qv:((${P@$*0( ( (0>:0((:5((044(*m50($)4;6F;`@(($$0v1**  0* (>:4*(  (  (( 04 :F(,,$(06FJ@4;6((()6o:  ( *05>* @  * (4  (* (( (  ($)),00EW;4,Wc6$((>mhp0( (055 *0 @5 0: (> ( (*4(*0( (((   (*$($ 01;m:00001o@$,]hW60*(((**(5045 * F0>N: (  (,(,*($$:@r:4>F*L~@$WZ>T1(( * *:( NE( 0( (F:    * $(10***)$0>54EC?44f(J>Jwl@:(*@**$,5 5C:4(** 5:  ( * 0 $)(00))0),*>:>Icb5:`\(o>:CWL5 :@05)$4@0 **CCF(** (5> (* *    00   $))))110(606@C>yO?@kO(6rF41>F4>0:* (N5 5:* (* ((* 54*(4   ( ( ()(*)16,116E?11C>J4V0;wf444> (FJN405J: ((:5*( 0  (*(505(E (   *  (  0( ((( ))04044OY541:;04,4xP0FT) 4TmLE0(0(*>F:* (  (*( **05b( ( *  04* (05*(  0(   (*:*  0 **(00004J{C0:06n))*;EPV,, YN1: (5>@>:>:05>*  (0 4  *0(  (44*((:E4(  (((40( ( ( (5:(**(((*004444Y`\:6\(((QVw65>50krJ,(**5:@TcPTT@4 0*  ((E (( (00* *(000*44**((  (040(*50  0( (450((0:40:E>4Ql\4>C((Q05O?6Y1 *Wh>0@45EFNf{{fE*5* (  4 ( *(N4 ((*((0::44000445540*0**   *5 00( (444  ( *0*>@40((4046:>>:4>?>LNCw($ F>1*$ *PvlJ:Y:E( >NbFE:J5 >:  (( 5J *5 4::544400>F4((:54 (005*54* *45* 44* *0(:>>@*(05YI::>:1IPLNIrr$(($,Z4, (5cF;I54 (*:4*00  @F  (*EN4 0 **04:40**0(*555((0:4 *( *(**040 055*04(05:;,0:NcI:5:55FLfJVW$(($ f1 $$ *`L>hF1( **: (  ((( 0( (400(((  (55**4440 (* **040*((  0>005055@40544@0,44:>C>zyFqQ$($L>C0*(EJV>F414(*( >( ( *00((  050( 04(4:4*( ((*( (( ((( *5404*55E0*0:410004>FEL~F:h4$(TT (bb\>4C44*  **0  (*   :kbV:0* *(04*( (0::45*( 0**   (*(((((:54((:>J:4:EF@?444JFIIOJ6\$h`VbbNrF*0,($$ (*@0(   * ( ( (NPNF@ *0:0* 0J@:*  (404 (**(5( 00(( ((405F:4EJE::>55>@FE>5>L pWlELoV:,(  *:(  4  * @0 (VF*( 5>0*((JJ5 (*0(*((((4005( 00((*(::@>@FE@:>ETP:5>CVN:LNF FLwkN:50*($  * 054 P4( 5  (c@ (:`E(* (*5E**40:>*0*(*4* **(*40 (0**40 (0*5::5FI;046JfP::?CY>`ca5$(Tw0O05,e,((4((**0(5(:  0* (( (:*((*50 @E * >@**44**5E4000 *4000  **40( * (*4044*1454;:>55:>>EEWyJ($Z?4;@511:@6055@:: (J:  0*  *0(4  *EE`0*5*(4*454**04*((  (5>00*((400>:50 (455>:0:F>EJ50,1:JY(1(\>$E44q4))Lb@:0*40E((0(4\5 ( (Pk0((5**  (00*4* 00040 *  (0>F@4440:@:>PYP>0(FE>E:4ENNJE>555L(O(PE@C6;k0(*CL,Qb>*(5**:>5*5*(F>(** ( ( (EYV:@0 (0 *0*40*55**:* 40*44:>**0EJEJPFJV\F4E@EE:>\NVOOPET@EQLC6~ Y;J( NOE:04(4JPE5*4:((5* (@: >4** ( (404EfE``  (05405*(*4 *@>*(0000*4>54:E:0EY:0JY@45>EVNEJE@IWVTTF>PP5:4($)$0**15Z:01(*5YL44**((4*  *:: (*(*(( (*@>40P\:** * (**5:>( (>EE555:5(*:>:EPE***( (555:5@JNJF@@PNIFTY]lpq(((()4\:*@5Qc>004:@VV:( ( *( *44 ((((( ::b**P@44(@  004(  55:::@:4*4FF>TP>**40((4>>E5ETN@@>:\TJ;J\fw0(($$(*W{rLkFEZy46114fc`:>(*( ( *0* ((*4 *@EE (* (* * *004>:4045>EF:EE:**40*(405@>>ETNEJ>N@@:>E>>;:4(($$(*6ZZQ$ n4:>:4::::>**4( 0 (4( *:0 (*50( *   >@> ( 0(*4E5:E>>E>PP:EF* 50*054:@J>>QNNVTL>\LNVPC~Z6F((((6;>I$(`$0>NN>;6:64{J44b5(>0(*4*0*  *F5  *0((4   5(0( 0:@0 *444>0*>@JJ0::>6>0,;5455:@ENE@IWYOLFV@ZN`VbFY@:(((haLN$fWI:TTfEI6:6I5Pb@@0*54*:@(0* **5P0*  (0((E>( *( 00 (4(((4VT * (( *((*(400:*4,0:614>5:@TPF>CIZVLJJOP;@E?:;hE>(((((((Y];x,@5@6>@ObbbE0>F:05((:4(0( 05:E(*  *E E5 ((((0(( *5*  0( *05*(14,,,551)0;@>>JN@@J::YI@NCQ:V@656FOhcc((($$( @:4LZF:44@IIb:\45**0F@N4(@FYV0( 0P50**( ( **( ( (4(@0 ** 0 (*(( *6E@;0@5,,4:EJENF@@@,*@@14Elb;C0Ic(((($ $ (()>Q:I@Z***b:*0>J:@@>0**0\P@( 0* * *(*:( ( (05 4N ( *  (* ((((*((,EEF@@TJ60;ICJWJ@@NE11EeC:Icbbe*5(((((($$((q;Y0LET450>b4:>6NYF@@005(4:** :(  5E0(*4:E4 4@**0 400  0*0 (*((0*0@F5@N@FO>1@E>FWE?CEE>>41>@@6IWe4NNF:@((((((((((ZWQF4b;C>@@ZPcP1;F54>44>0:F**( 0c5:0**F5( (* *@J 00(( 0JE* 0>4 (**0 **(((4Y`L1>I>NQ>4C?@EPOLILE?TNkv0,,0|e4F@Q(((((((((((($(:EQF0;J>CLP>;EVE>EE@>>@F00*(*N>:NN:@( (4((0((4(4(((PP0*@N5(4 0>:*((0(((4bP@IY@EPFE>E;@NIPN:CEPNJVy5I?F;f6ZL((((((((((((;*40CY,:P>?;,15,>NFEF5:>>F4050***(EP5 (05(0( (40555 0F((NV: (0:>NY\**0*0**05@bcT]J@JJJ>@LJI@CE55>66WcO0)$OkY@C>((((((((((( 145?Om]:5:Z4F6,(0TNFE@:>1,>44::@E50@F (0@0(*((0( (P@>>J  0E5 *550@4*0*005:5@Ero]hVETFIC66PVE?I5;>6;JZT1;YPYr0((((((((((((( TEe~PW0*:000,40@TJFF@E>*),,005>J5>@> (:>>*( ( :@:0* (((0 (0**(5;Tf\YbYePETFOO>;QW@CW>IlIhcq@ZeY>bY((((((((((((((pbbI(PJ1*1*,150>>YPJ@414104415>F@T:EE4* :::*004(   (((00 ((*0((*0000>kbTEYICEQPZ\fPO`YLOFII@VfOO:::FLE((((((((((((((((((((cI()*?0PL??:45IC15144E>E>NNF440(**(4@@45400  (0( (*0** (*5**EP4405@VN@:FNJPYPP`{]YnLakCQEaY\@@Qla:((((((((((((((((((($$c5*IJ?CPTq;C>:LV4:545TPpT45F50FJ*(EJ5(*(0* JN @E**(4:4(*(*4**PT@54N;::5:>br\kTYmkk{oe>PJEWb?6?,5?(((((((((((((((((((($$(PFN:E6*:YOr~ZFPTVF:115>F544:05@J4*>Y@*0* *E4 *4**:4(45 *054(*@:@J>E:55:F>behZfYIcrZEFwofaaI66E1;4*6((((((((((((((((((((((;:QJJ5;NVL5QhrEEOP>>1,>@J5:54>504:450(*5@( >( >5* (04**0 (>@4*404>N@PJ:544T\TZNZvmbVVT>LqIaF?J;V;>bNI(((((((((((((((((((((@44ENrIJY:141:NC:FII:J515F>>FE>T@>FNE*( *0:**  (04(*0**5(*( >\:5F4:@:4cTE?;IeZPZ:4>hhLE{r;a]@WPmF`Zp{I(((((((((((((((((((((Yz0F\Wkp0,FNE:?C;EW>@>:56:JEJVPNfPN40*(**((*:  (4((*(55(0*(@T54J4>E:44JPVqlY@@E1,4V]a;f@*6If4EpWJICC((((((((((((((((((((((`6|Q5P]\e\VE65>5E@>6J@41:JJVTckF@F\?>(* *(05F* ((4 ( ((0***5N@404E>JJ`1Y>pzQ;?4C656EZ>YEOcI0?Pe:((((((((((((((((((((((((`6EqF6:;5L40:E:45::>F@J:5,:FVJPJT@YN0,:*@*4* *:E@4 *4(**(*(40*(:EJ00:EJ5541*,wmkN5LzW1):n@5;qE;ZT>((((((((((((((((((((((((((($]OmI@:51>E?:,4EPN:VVQ;1>@NJ\]60@L1,@0*05*  055(( ( *0500*5:E54:>NIN@FCCb>af01T?J100*JI1@OmhL,0(((((((((((((((((((((((((((($ ]Na15F@NJ6144JZC@NN\;:@JkE\Z5,$656\40*5*  *( (* (*5F4045>>4:::PYCPQmJ4J\h0P\Pn,],*(((((;ZT4;((((((((((((((((((((((((((((((@NZ1CPJTY5EE@EN@C::@16?mp45),,6?NI>55:@*4: *0((0*( *445555::5:5@EEVfNFQII@*WTqc(::(:l1*(((((((C((((((((((((((((((((((((((((((TTpm`IbkTNC:?JEVZP@>0;T@1,*,04?E@*55@1(>0 **0>F0*(4:0:F>:>FEF@N\VLCCQI>6E;,EEJJ55(T`,*((((((((O$((((((((((((((((((((((((((((((TpzZQFp`PE;6>FWQTV>)*:66FCNT6Y5((**41(04@4**45:4*44:FVY5>>@N4,>YTJ60?F6>rEEYYJ(J((TF)((((((((($V$((((((((((((((((((((((((((((((p`F|@cy|c?@;;?NNh1,1EbQ0ZNJ6bC:01,>:>@*0>4**445045EPbE>N?>O0*>JOZ5,hbcTJYJYYqF((((T$(((((((((((((((((((((((((((((((((((((((((bT F?rVcb>JYVNTVZJ4`@E:FC\]b>>10COT>:>:445*05:N:45:EbJFJ>:?4;FC?IJ:LfmcJJ5(((*TP$((((((((((((((((((((((((((((((((((((((((((($FFEhQNJ\wpQI)1J1:1Z5:6y:51|]15P@54*5@@0004@@J>5@NJY\PP?>J@@Oq?Q>CNTaW~FIJ((((*5?n*)(((((((((((((((((((((((((((((((((((((((($ (@qcJCEE5(?;6>>CQN5:L>OQJJ:J@@>40;:,,5:N?NJ:>FE@cffEJ:>J;Vc1,;Cp>@55EcT((((*Nph5)((((((((((((((((((((((((((((((((((((((($$$(LYhehE4>CC1NP44?O]60]Lz4FcZW4;@65:1FE6,;NT16E@@FVJYkV>E11N16ElV,FhYCCEEE((((()*?`0((((((((((((((((((((((((((((((((((((((( (L6bob`Nf\:5NI*?1Y>@:Np])*`c4]b;5P@NNTJ\cm?45>>FE@FOC041:h?E,pQT@(((((((EEE(((((,5v,((((((((((((((((((((((((((((((((((((((( (:;5(kf5,zE?E0((bNo4QL*PP@PL>:PLC,0ETolZT>55>@PPO\@5:OYE4cp>@(((((((((E((((((,,(((((((((((((((((((((((((((((((((((((((((((Fw(,IbQLZZ\PnN$((bN:W50VJhF@\V@;;I5**NWIN@;,*1>EF]`Z\\`\LNNccppp@c((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((($$0,x?$ aNJLmT((((((*16ENba@>FJ>>61,)0N`C@>(06FTTJywEF`pmLccc(Ecc@@((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((($$;QkT($N\ENT(((((((T**TWEEJ>:J@11*4@TL]T;(afb??\]EFY{@TTTT(@ccT((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((bbh(((E**Y4(((((()0c4JEENF;5JC;@6>5,JcE40@N`E?NYZcWVPNcTT(((QqcT5(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((b(($ $($))6E?((((((>Z~L>F`ZC5JbF@CC0(1VcC64LZNFEENYOVV@,(T((((@LTT5(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((bb(($$(($(n6;4((((($0r\>FkoyJ6IVF@E,11,JTQN>fwJFP4CFV`h*((cb((((5Tc5(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((b(((((((((4?4(((($()00IVFNpoT@@FJZW*16I>kcT,|kJW64Epla$(((((((((5E(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((**,IYCrbyykVJE\*;]>(**aTVo\c@P;Q,CyP?(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((0,1IlJ\qe??\0;6e44\,??WkZT0W4?CN*05~p?((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((($,NOOhoO4N??5E\PLJPN01FTZc?0W;@vN)1>~P((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((($$>I@>14T{E6@`ocEVkI46fmaZbycC44a4ep?((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((TOPON`E>:>WVccrq{E?]mc\Z6Q6,PI0|O((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((*@@EE>:@WWbcVOE?WPQr`Y`z@>4:@Q1P(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((\PEEEEcWZEc>>Y,?>W?PIWC10~hr?((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((bZ?TeP]`f]\TCL*?0VYJY>CNV?(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((EvZWpkNJOL{Wk;hIEI;6vZ;(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((;fcbx:1:E46?LYJcYT>@C50Yb,((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((;EObTp]I(0:bnZI\W@,:60,1,((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((EElb\@EE4((0Oalbb()*,$$(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((4\cc??4((((5aaN\fc4(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((netgen-6.2.1804/ng/Togl2.1/tclconfig/0000755000175000017500000000000013272137567015507 5ustar kurtkurtnetgen-6.2.1804/ng/Togl2.1/tclconfig/tcl.m40000644000175000017500000040050513272137567016537 0ustar kurtkurt# tcl.m4 -- # # This file provides a set of autoconf macros to help TEA-enable # a Tcl extension. # # Copyright (c) 1999-2000 Ajuba Solutions. # Copyright (c) 2002-2005 ActiveState Corporation. # # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # # RCS: @(#) $Id: tcl.m4,v 1.12 2009/01/08 04:40:39 gregcouch Exp $ AC_PREREQ(2.57) dnl TEA extensions pass us the version of TEA they think they dnl are compatible with (must be set in TEA_INIT below) dnl TEA_VERSION="3.7" # Possible values for key variables defined: # # TEA_WINDOWINGSYSTEM - win32 aqua x11 (mirrors 'tk windowingsystem') # TEA_PLATFORM - windows unix # #------------------------------------------------------------------------ # TEA_PATH_TCLCONFIG -- # # Locate the tclConfig.sh file and perform a sanity check on # the Tcl compile flags # # Arguments: # none # # Results: # # Adds the following arguments to configure: # --with-tcl=... # # Defines the following vars: # TCL_BIN_DIR Full path to the directory containing # the tclConfig.sh file #------------------------------------------------------------------------ AC_DEFUN([TEA_PATH_TCLCONFIG], [ dnl TEA specific: Make sure we are initialized AC_REQUIRE([TEA_INIT]) # # Ok, lets find the tcl configuration # First, look for one uninstalled. # the alternative search directory is invoked by --with-tcl # if test x"${no_tcl}" = x ; then # we reset no_tcl in case something fails here no_tcl=true AC_ARG_WITH(tcl, AC_HELP_STRING([--with-tcl], [directory containing tcl configuration (tclConfig.sh)]), with_tclconfig=${withval}) AC_MSG_CHECKING([for Tcl configuration]) AC_CACHE_VAL(ac_cv_c_tclconfig,[ # First check to see if --with-tcl was specified. if test x"${with_tclconfig}" != x ; then case ${with_tclconfig} in */tclConfig.sh ) if test -f ${with_tclconfig}; then AC_MSG_WARN([--with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself]) with_tclconfig=`echo ${with_tclconfig} | sed 's!/tclConfig\.sh$!!'` fi ;; esac if test -f "${with_tclconfig}/tclConfig.sh" ; then ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` else AC_MSG_ERROR([${with_tclconfig} directory doesn't contain tclConfig.sh]) fi fi # then check for a private Tcl installation if test x"${ac_cv_c_tclconfig}" = x ; then for i in \ ../tcl \ `ls -dr ../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ `ls -dr ../tcl[[8-9]].[[0-9]] 2>/dev/null` \ `ls -dr ../tcl[[8-9]].[[0-9]]* 2>/dev/null` \ ../../tcl \ `ls -dr ../../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ `ls -dr ../../tcl[[8-9]].[[0-9]] 2>/dev/null` \ `ls -dr ../../tcl[[8-9]].[[0-9]]* 2>/dev/null` \ ../../../tcl \ `ls -dr ../../../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ `ls -dr ../../../tcl[[8-9]].[[0-9]] 2>/dev/null` \ `ls -dr ../../../tcl[[8-9]].[[0-9]]* 2>/dev/null` ; do if test -f "$i/unix/tclConfig.sh" ; then ac_cv_c_tclconfig=`(cd $i/unix; pwd)` break fi done fi # on Darwin, check in Framework installation locations if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ `ls -d /Library/Frameworks 2>/dev/null` \ `ls -d /Network/Library/Frameworks 2>/dev/null` \ `ls -d /System/Library/Frameworks 2>/dev/null` \ ; do if test -f "$i/Tcl.framework/tclConfig.sh" ; then ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)` break fi done fi # TEA specific: on Windows, check in common installation locations if test "${TEA_PLATFORM}" = "windows" \ -a x"${ac_cv_c_tclconfig}" = x ; then for i in `ls -d C:/Tcl/lib 2>/dev/null` \ `ls -d C:/Progra~1/Tcl/lib 2>/dev/null` \ ; do if test -f "$i/tclConfig.sh" ; then ac_cv_c_tclconfig=`(cd $i; pwd)` break fi done fi # check in a few common install locations if test x"${ac_cv_c_tclconfig}" = x ; then for i in `ls -d ${libdir} 2>/dev/null` \ `ls -d ${exec_prefix}/lib 2>/dev/null` \ `ls -d ${prefix}/lib 2>/dev/null` \ `ls -d /usr/local/lib 2>/dev/null` \ `ls -d /usr/contrib/lib 2>/dev/null` \ `ls -d /usr/lib 2>/dev/null` \ ; do if test -f "$i/tclConfig.sh" ; then ac_cv_c_tclconfig=`(cd $i; pwd)` break fi done fi # check in a few other private locations if test x"${ac_cv_c_tclconfig}" = x ; then for i in \ ${srcdir}/../tcl \ `ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ `ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]] 2>/dev/null` \ `ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]]* 2>/dev/null` ; do if test -f "$i/unix/tclConfig.sh" ; then ac_cv_c_tclconfig=`(cd $i/unix; pwd)` break fi done fi ]) if test x"${ac_cv_c_tclconfig}" = x ; then TCL_BIN_DIR="# no Tcl configs found" AC_MSG_ERROR([Can't find Tcl configuration definitions]) else no_tcl= TCL_BIN_DIR=${ac_cv_c_tclconfig} AC_MSG_RESULT([found ${TCL_BIN_DIR}/tclConfig.sh]) fi fi ]) #------------------------------------------------------------------------ # TEA_PATH_TKCONFIG -- # # Locate the tkConfig.sh file # # Arguments: # none # # Results: # # Adds the following arguments to configure: # --with-tk=... # # Defines the following vars: # TK_BIN_DIR Full path to the directory containing # the tkConfig.sh file #------------------------------------------------------------------------ AC_DEFUN([TEA_PATH_TKCONFIG], [ # # Ok, lets find the tk configuration # First, look for one uninstalled. # the alternative search directory is invoked by --with-tk # if test x"${no_tk}" = x ; then # we reset no_tk in case something fails here no_tk=true AC_ARG_WITH(tk, AC_HELP_STRING([--with-tk], [directory containing tk configuration (tkConfig.sh)]), with_tkconfig=${withval}) AC_MSG_CHECKING([for Tk configuration]) AC_CACHE_VAL(ac_cv_c_tkconfig,[ # First check to see if --with-tkconfig was specified. if test x"${with_tkconfig}" != x ; then case ${with_tkconfig} in */tkConfig.sh ) if test -f ${with_tkconfig}; then AC_MSG_WARN([--with-tk argument should refer to directory containing tkConfig.sh, not to tkConfig.sh itself]) with_tkconfig=`echo ${with_tkconfig} | sed 's!/tkConfig\.sh$!!'` fi ;; esac if test -f "${with_tkconfig}/tkConfig.sh" ; then ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` else AC_MSG_ERROR([${with_tkconfig} directory doesn't contain tkConfig.sh]) fi fi # then check for a private Tk library if test x"${ac_cv_c_tkconfig}" = x ; then for i in \ ../tk \ `ls -dr ../tk[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ `ls -dr ../tk[[8-9]].[[0-9]] 2>/dev/null` \ `ls -dr ../tk[[8-9]].[[0-9]]* 2>/dev/null` \ ../../tk \ `ls -dr ../../tk[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ `ls -dr ../../tk[[8-9]].[[0-9]] 2>/dev/null` \ `ls -dr ../../tk[[8-9]].[[0-9]]* 2>/dev/null` \ ../../../tk \ `ls -dr ../../../tk[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ `ls -dr ../../../tk[[8-9]].[[0-9]] 2>/dev/null` \ `ls -dr ../../../tk[[8-9]].[[0-9]]* 2>/dev/null` ; do if test -f "$i/unix/tkConfig.sh" ; then ac_cv_c_tkconfig=`(cd $i/unix; pwd)` break fi done fi # on Darwin, check in Framework installation locations if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ `ls -d /Library/Frameworks 2>/dev/null` \ `ls -d /Network/Library/Frameworks 2>/dev/null` \ `ls -d /System/Library/Frameworks 2>/dev/null` \ ; do if test -f "$i/Tk.framework/tkConfig.sh" ; then ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)` break fi done fi # check in a few common install locations if test x"${ac_cv_c_tkconfig}" = x ; then for i in `ls -d ${libdir} 2>/dev/null` \ `ls -d ${exec_prefix}/lib 2>/dev/null` \ `ls -d ${prefix}/lib 2>/dev/null` \ `ls -d /usr/local/lib 2>/dev/null` \ `ls -d /usr/contrib/lib 2>/dev/null` \ `ls -d /usr/lib 2>/dev/null` \ ; do if test -f "$i/tkConfig.sh" ; then ac_cv_c_tkconfig=`(cd $i; pwd)` break fi done fi # TEA specific: on Windows, check in common installation locations if test "${TEA_PLATFORM}" = "windows" \ -a x"${ac_cv_c_tkconfig}" = x ; then for i in `ls -d C:/Tcl/lib 2>/dev/null` \ `ls -d C:/Progra~1/Tcl/lib 2>/dev/null` \ ; do if test -f "$i/tkConfig.sh" ; then ac_cv_c_tkconfig=`(cd $i; pwd)` break fi done fi # check in a few other private locations if test x"${ac_cv_c_tkconfig}" = x ; then for i in \ ${srcdir}/../tk \ `ls -dr ${srcdir}/../tk[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ `ls -dr ${srcdir}/../tk[[8-9]].[[0-9]] 2>/dev/null` \ `ls -dr ${srcdir}/../tk[[8-9]].[[0-9]]* 2>/dev/null` ; do if test -f "$i/unix/tkConfig.sh" ; then ac_cv_c_tkconfig=`(cd $i/unix; pwd)` break fi done fi ]) if test x"${ac_cv_c_tkconfig}" = x ; then TK_BIN_DIR="# no Tk configs found" AC_MSG_ERROR([Can't find Tk configuration definitions]) else no_tk= TK_BIN_DIR=${ac_cv_c_tkconfig} AC_MSG_RESULT([found ${TK_BIN_DIR}/tkConfig.sh]) fi fi ]) #------------------------------------------------------------------------ # TEA_LOAD_TCLCONFIG -- # # Load the tclConfig.sh file # # Arguments: # # Requires the following vars to be set: # TCL_BIN_DIR # # Results: # # Subst the following vars: # TCL_BIN_DIR # TCL_SRC_DIR # TCL_LIB_FILE # #------------------------------------------------------------------------ AC_DEFUN([TEA_LOAD_TCLCONFIG], [ AC_MSG_CHECKING([for existence of ${TCL_BIN_DIR}/tclConfig.sh]) if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then AC_MSG_RESULT([loading]) . "${TCL_BIN_DIR}/tclConfig.sh" else AC_MSG_RESULT([could not find ${TCL_BIN_DIR}/tclConfig.sh]) fi # eval is required to do the TCL_DBGX substitution eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\"" eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\"" # If the TCL_BIN_DIR is the build directory (not the install directory), # then set the common variable name to the value of the build variables. # For example, the variable TCL_LIB_SPEC will be set to the value # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC # instead of TCL_BUILD_LIB_SPEC since it will work with both an # installed and uninstalled version of Tcl. if test -f "${TCL_BIN_DIR}/Makefile" ; then TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC} TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC} TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH} elif test "`uname -s`" = "Darwin"; then # If Tcl was built as a framework, attempt to use the libraries # from the framework at the given location so that linking works # against Tcl.framework installed in an arbitrary location. case ${TCL_DEFS} in *TCL_FRAMEWORK*) if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then for i in "`cd ${TCL_BIN_DIR}; pwd`" \ "`cd ${TCL_BIN_DIR}/../..; pwd`"; do if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}" break fi done fi if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}" TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}" fi ;; esac fi # eval is required to do the TCL_DBGX substitution eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\"" eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\"" eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\"" eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\"" AC_SUBST(TCL_VERSION) AC_SUBST(TCL_BIN_DIR) AC_SUBST(TCL_SRC_DIR) AC_SUBST(TCL_LIB_FILE) AC_SUBST(TCL_LIB_FLAG) AC_SUBST(TCL_LIB_SPEC) AC_SUBST(TCL_STUB_LIB_FILE) AC_SUBST(TCL_STUB_LIB_FLAG) AC_SUBST(TCL_STUB_LIB_SPEC) # TEA specific: AC_SUBST(TCL_LIBS) AC_SUBST(TCL_DEFS) AC_SUBST(TCL_EXTRA_CFLAGS) AC_SUBST(TCL_LD_FLAGS) AC_SUBST(TCL_SHLIB_LD_LIBS) ]) #------------------------------------------------------------------------ # TEA_LOAD_TKCONFIG -- # # Load the tkConfig.sh file # # Arguments: # # Requires the following vars to be set: # TK_BIN_DIR # # Results: # # Sets the following vars that should be in tkConfig.sh: # TK_BIN_DIR #------------------------------------------------------------------------ AC_DEFUN([TEA_LOAD_TKCONFIG], [ AC_MSG_CHECKING([for existence of ${TK_BIN_DIR}/tkConfig.sh]) if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then AC_MSG_RESULT([loading]) . "${TK_BIN_DIR}/tkConfig.sh" else AC_MSG_RESULT([could not find ${TK_BIN_DIR}/tkConfig.sh]) fi # eval is required to do the TK_DBGX substitution eval "TK_LIB_FILE=\"${TK_LIB_FILE}\"" eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\"" # If the TK_BIN_DIR is the build directory (not the install directory), # then set the common variable name to the value of the build variables. # For example, the variable TK_LIB_SPEC will be set to the value # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC # instead of TK_BUILD_LIB_SPEC since it will work with both an # installed and uninstalled version of Tcl. if test -f "${TK_BIN_DIR}/Makefile" ; then TK_LIB_SPEC=${TK_BUILD_LIB_SPEC} TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC} TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH} elif test "`uname -s`" = "Darwin"; then # If Tk was built as a framework, attempt to use the libraries # from the framework at the given location so that linking works # against Tk.framework installed in an arbitrary location. case ${TK_DEFS} in *TK_FRAMEWORK*) if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then for i in "`cd ${TK_BIN_DIR}; pwd`" \ "`cd ${TK_BIN_DIR}/../..; pwd`"; do if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}" break fi done fi if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}" TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}" fi ;; esac fi # eval is required to do the TK_DBGX substitution eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\"" eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\"" eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\"" eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\"" # TEA specific: Ensure windowingsystem is defined if test "${TEA_PLATFORM}" = "unix" ; then case ${TK_DEFS} in *MAC_OSX_TK*) AC_DEFINE(MAC_OSX_TK, 1, [Are we building against Mac OS X TkAqua?]) TEA_WINDOWINGSYSTEM="aqua" ;; *) TEA_WINDOWINGSYSTEM="x11" ;; esac elif test "${TEA_PLATFORM}" = "windows" ; then TEA_WINDOWINGSYSTEM="win32" fi AC_SUBST(TK_VERSION) AC_SUBST(TK_BIN_DIR) AC_SUBST(TK_SRC_DIR) AC_SUBST(TK_LIB_FILE) AC_SUBST(TK_LIB_FLAG) AC_SUBST(TK_LIB_SPEC) AC_SUBST(TK_STUB_LIB_FILE) AC_SUBST(TK_STUB_LIB_FLAG) AC_SUBST(TK_STUB_LIB_SPEC) # TEA specific: AC_SUBST(TK_LIBS) AC_SUBST(TK_XINCLUDES) ]) #------------------------------------------------------------------------ # TEA_PROG_TCLSH # Determine the fully qualified path name of the tclsh executable # in the Tcl build directory or the tclsh installed in a bin # directory. This macro will correctly determine the name # of the tclsh executable even if tclsh has not yet been # built in the build directory. The tclsh found is always # associated with a tclConfig.sh file. This tclsh should be used # only for running extension test cases. It should never be # or generation of files (like pkgIndex.tcl) at build time. # # Arguments # none # # Results # Subst's the following values: # TCLSH_PROG #------------------------------------------------------------------------ AC_DEFUN([TEA_PROG_TCLSH], [ AC_MSG_CHECKING([for tclsh]) if test -f "${TCL_BIN_DIR}/Makefile" ; then # tclConfig.sh is in Tcl build directory if test "${TEA_PLATFORM}" = "windows"; then TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}" else TCLSH_PROG="${TCL_BIN_DIR}/tclsh" fi else # tclConfig.sh is in install location if test "${TEA_PLATFORM}" = "windows"; then TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}" else TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}${TCL_DBGX}" fi list="`ls -d ${TCL_BIN_DIR}/../bin 2>/dev/null` \ `ls -d ${TCL_BIN_DIR}/.. 2>/dev/null` \ `ls -d ${TCL_PREFIX}/bin 2>/dev/null`" for i in $list ; do if test -f "$i/${TCLSH_PROG}" ; then REAL_TCL_BIN_DIR="`cd "$i"; pwd`/" break fi done TCLSH_PROG="${REAL_TCL_BIN_DIR}${TCLSH_PROG}" fi AC_MSG_RESULT([${TCLSH_PROG}]) AC_SUBST(TCLSH_PROG) ]) #------------------------------------------------------------------------ # TEA_PROG_WISH # Determine the fully qualified path name of the wish executable # in the Tk build directory or the wish installed in a bin # directory. This macro will correctly determine the name # of the wish executable even if wish has not yet been # built in the build directory. The wish found is always # associated with a tkConfig.sh file. This wish should be used # only for running extension test cases. It should never be # or generation of files (like pkgIndex.tcl) at build time. # # Arguments # none # # Results # Subst's the following values: # WISH_PROG #------------------------------------------------------------------------ AC_DEFUN([TEA_PROG_WISH], [ AC_MSG_CHECKING([for wish]) if test -f "${TK_BIN_DIR}/Makefile" ; then # tkConfig.sh is in Tk build directory if test "${TEA_PLATFORM}" = "windows"; then WISH_PROG="${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}${EXEEXT}" else WISH_PROG="${TK_BIN_DIR}/wish" fi else # tkConfig.sh is in install location if test "${TEA_PLATFORM}" = "windows"; then WISH_PROG="wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}${EXEEXT}" else WISH_PROG="wish${TK_MAJOR_VERSION}.${TK_MINOR_VERSION}${TK_DBGX}" fi list="`ls -d ${TK_BIN_DIR}/../bin 2>/dev/null` \ `ls -d ${TK_BIN_DIR}/.. 2>/dev/null` \ `ls -d ${TK_PREFIX}/bin 2>/dev/null`" for i in $list ; do if test -f "$i/${WISH_PROG}" ; then REAL_TK_BIN_DIR="`cd "$i"; pwd`/" break fi done WISH_PROG="${REAL_TK_BIN_DIR}${WISH_PROG}" fi AC_MSG_RESULT([${WISH_PROG}]) AC_SUBST(WISH_PROG) ]) #------------------------------------------------------------------------ # TEA_ENABLE_SHARED -- # # Allows the building of shared libraries # # Arguments: # none # # Results: # # Adds the following arguments to configure: # --enable-shared=yes|no # # Defines the following vars: # STATIC_BUILD Used for building import/export libraries # on Windows. # # Sets the following vars: # SHARED_BUILD Value of 1 or 0 #------------------------------------------------------------------------ AC_DEFUN([TEA_ENABLE_SHARED], [ AC_MSG_CHECKING([how to build libraries]) AC_ARG_ENABLE(shared, AC_HELP_STRING([--enable-shared], [build and link with shared libraries (default: on)]), [tcl_ok=$enableval], [tcl_ok=yes]) if test "${enable_shared+set}" = set; then enableval="$enable_shared" tcl_ok=$enableval else tcl_ok=yes fi if test "$tcl_ok" = "yes" ; then AC_MSG_RESULT([shared]) SHARED_BUILD=1 else AC_MSG_RESULT([static]) SHARED_BUILD=0 AC_DEFINE(STATIC_BUILD, 1, [Is this a static build?]) fi AC_SUBST(SHARED_BUILD) ]) #------------------------------------------------------------------------ # TEA_ENABLE_THREADS -- # # Specify if thread support should be enabled. If "yes" is specified # as an arg (optional), threads are enabled by default, "no" means # threads are disabled. "yes" is the default. # # TCL_THREADS is checked so that if you are compiling an extension # against a threaded core, your extension must be compiled threaded # as well. # # Note that it is legal to have a thread enabled extension run in a # threaded or non-threaded Tcl core, but a non-threaded extension may # only run in a non-threaded Tcl core. # # Arguments: # none # # Results: # # Adds the following arguments to configure: # --enable-threads # # Sets the following vars: # THREADS_LIBS Thread library(s) # # Defines the following vars: # TCL_THREADS # _REENTRANT # _THREAD_SAFE # #------------------------------------------------------------------------ AC_DEFUN([TEA_ENABLE_THREADS], [ AC_ARG_ENABLE(threads, AC_HELP_STRING([--enable-threads], [build with threads]), [tcl_ok=$enableval], [tcl_ok=yes]) if test "${enable_threads+set}" = set; then enableval="$enable_threads" tcl_ok=$enableval else tcl_ok=yes fi if test "$tcl_ok" = "yes" -o "${TCL_THREADS}" = 1; then TCL_THREADS=1 if test "${TEA_PLATFORM}" != "windows" ; then # We are always OK on Windows, so check what this platform wants: # USE_THREAD_ALLOC tells us to try the special thread-based # allocator that significantly reduces lock contention AC_DEFINE(USE_THREAD_ALLOC, 1, [Do we want to use the threaded memory allocator?]) AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?]) if test "`uname -s`" = "SunOS" ; then AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1, [Do we really want to follow the standard? Yes we do!]) fi AC_DEFINE(_THREAD_SAFE, 1, [Do we want the thread-safe OS API?]) AC_CHECK_LIB(pthread,pthread_mutex_init,tcl_ok=yes,tcl_ok=no) if test "$tcl_ok" = "no"; then # Check a little harder for __pthread_mutex_init in the same # library, as some systems hide it there until pthread.h is # defined. We could alternatively do an AC_TRY_COMPILE with # pthread.h, but that will work with libpthread really doesn't # exist, like AIX 4.2. [Bug: 4359] AC_CHECK_LIB(pthread, __pthread_mutex_init, tcl_ok=yes, tcl_ok=no) fi if test "$tcl_ok" = "yes"; then # The space is needed THREADS_LIBS=" -lpthread" else AC_CHECK_LIB(pthreads, pthread_mutex_init, tcl_ok=yes, tcl_ok=no) if test "$tcl_ok" = "yes"; then # The space is needed THREADS_LIBS=" -lpthreads" else AC_CHECK_LIB(c, pthread_mutex_init, tcl_ok=yes, tcl_ok=no) if test "$tcl_ok" = "no"; then AC_CHECK_LIB(c_r, pthread_mutex_init, tcl_ok=yes, tcl_ok=no) if test "$tcl_ok" = "yes"; then # The space is needed THREADS_LIBS=" -pthread" else TCL_THREADS=0 AC_MSG_WARN([Do not know how to find pthread lib on your system - thread support disabled]) fi fi fi fi fi else TCL_THREADS=0 fi # Do checking message here to not mess up interleaved configure output AC_MSG_CHECKING([for building with threads]) if test "${TCL_THREADS}" = 1; then AC_DEFINE(TCL_THREADS, 1, [Are we building with threads enabled?]) AC_MSG_RESULT([yes (default)]) else AC_MSG_RESULT([no]) fi # TCL_THREADS sanity checking. See if our request for building with # threads is the same as the way Tcl was built. If not, warn the user. case ${TCL_DEFS} in *THREADS=1*) if test "${TCL_THREADS}" = "0"; then AC_MSG_WARN([ Building ${PACKAGE_NAME} without threads enabled, but building against Tcl that IS thread-enabled. It is recommended to use --enable-threads.]) fi ;; *) if test "${TCL_THREADS}" = "1"; then AC_MSG_WARN([ --enable-threads requested, but building against a Tcl that is NOT thread-enabled. This is an OK configuration that will also run in a thread-enabled core.]) fi ;; esac AC_SUBST(TCL_THREADS) ]) #------------------------------------------------------------------------ # TEA_ENABLE_SYMBOLS -- # # Specify if debugging symbols should be used. # Memory (TCL_MEM_DEBUG) debugging can also be enabled. # # Arguments: # none # # TEA varies from core Tcl in that C|LDFLAGS_DEFAULT receives # the value of C|LDFLAGS_OPTIMIZE|DEBUG already substituted. # Requires the following vars to be set in the Makefile: # CFLAGS_DEFAULT # LDFLAGS_DEFAULT # # Results: # # Adds the following arguments to configure: # --enable-symbols # # Defines the following vars: # CFLAGS_DEFAULT Sets to $(CFLAGS_DEBUG) if true # Sets to $(CFLAGS_OPTIMIZE) if false # LDFLAGS_DEFAULT Sets to $(LDFLAGS_DEBUG) if true # Sets to $(LDFLAGS_OPTIMIZE) if false # DBGX Formerly used as debug library extension; # always blank now. # #------------------------------------------------------------------------ AC_DEFUN([TEA_ENABLE_SYMBOLS], [ dnl TEA specific: Make sure we are initialized AC_REQUIRE([TEA_CONFIG_CFLAGS]) AC_MSG_CHECKING([for build with symbols]) AC_ARG_ENABLE(symbols, AC_HELP_STRING([--enable-symbols], [build with debugging symbols (default: off)]), [tcl_ok=$enableval], [tcl_ok=no]) DBGX="" if test "$tcl_ok" = "no"; then CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE}" LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}" AC_MSG_RESULT([no]) else CFLAGS_DEFAULT="${CFLAGS_DEBUG}" LDFLAGS_DEFAULT="${LDFLAGS_DEBUG}" if test "$tcl_ok" = "yes"; then AC_MSG_RESULT([yes (standard debugging)]) fi fi # TEA specific: if test "${TEA_PLATFORM}" != "windows" ; then LDFLAGS_DEFAULT="${LDFLAGS}" fi AC_SUBST(CFLAGS_DEFAULT) AC_SUBST(LDFLAGS_DEFAULT) AC_SUBST(TCL_DBGX) if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then AC_DEFINE(TCL_MEM_DEBUG, 1, [Is memory debugging enabled?]) fi if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then if test "$tcl_ok" = "all"; then AC_MSG_RESULT([enabled symbols mem debugging]) else AC_MSG_RESULT([enabled $tcl_ok debugging]) fi fi ]) #------------------------------------------------------------------------ # TEA_ENABLE_LANGINFO -- # # Allows use of modern nl_langinfo check for better l10n. # This is only relevant for Unix. # # Arguments: # none # # Results: # # Adds the following arguments to configure: # --enable-langinfo=yes|no (default is yes) # # Defines the following vars: # HAVE_LANGINFO Triggers use of nl_langinfo if defined. # #------------------------------------------------------------------------ AC_DEFUN([TEA_ENABLE_LANGINFO], [ AC_ARG_ENABLE(langinfo, AC_HELP_STRING([--enable-langinfo], [use nl_langinfo if possible to determine encoding at startup, otherwise use old heuristic (default: on)]), [langinfo_ok=$enableval], [langinfo_ok=yes]) HAVE_LANGINFO=0 if test "$langinfo_ok" = "yes"; then AC_CHECK_HEADER(langinfo.h,[langinfo_ok=yes],[langinfo_ok=no]) fi AC_MSG_CHECKING([whether to use nl_langinfo]) if test "$langinfo_ok" = "yes"; then AC_CACHE_VAL(tcl_cv_langinfo_h, [ AC_TRY_COMPILE([#include ], [nl_langinfo(CODESET);], [tcl_cv_langinfo_h=yes],[tcl_cv_langinfo_h=no])]) AC_MSG_RESULT([$tcl_cv_langinfo_h]) if test $tcl_cv_langinfo_h = yes; then AC_DEFINE(HAVE_LANGINFO, 1, [Do we have nl_langinfo()?]) fi else AC_MSG_RESULT([$langinfo_ok]) fi ]) #-------------------------------------------------------------------- # TEA_CONFIG_SYSTEM # # Determine what the system is (some things cannot be easily checked # on a feature-driven basis, alas). This can usually be done via the # "uname" command, but there are a few systems, like Next, where # this doesn't work. # # Arguments: # none # # Results: # Defines the following var: # # system - System/platform/version identification code. # #-------------------------------------------------------------------- AC_DEFUN([TEA_CONFIG_SYSTEM], [ AC_CACHE_CHECK([system version], tcl_cv_sys_version, [ # TEA specific: if test "${TEA_PLATFORM}" = "windows" ; then tcl_cv_sys_version=windows elif test -f /usr/lib/NextStep/software_version; then tcl_cv_sys_version=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version` else tcl_cv_sys_version=`uname -s`-`uname -r` if test "$?" -ne 0 ; then AC_MSG_WARN([can't find uname command]) tcl_cv_sys_version=unknown else # Special check for weird MP-RAS system (uname returns weird # results, and the version is kept in special file). if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then tcl_cv_sys_version=MP-RAS-`awk '{print $[3]}' /etc/.relid` fi if test "`uname -s`" = "AIX" ; then tcl_cv_sys_version=AIX-`uname -v`.`uname -r` fi fi fi ]) system=$tcl_cv_sys_version ]) #-------------------------------------------------------------------- # TEA_CONFIG_CFLAGS # # Try to determine the proper flags to pass to the compiler # for building shared libraries and other such nonsense. # # Arguments: # none # # Results: # # Defines and substitutes the following vars: # # DL_OBJS - Name of the object file that implements dynamic # loading for Tcl on this system. # DL_LIBS - Library file(s) to include in tclsh and other base # applications in order for the "load" command to work. # LDFLAGS - Flags to pass to the compiler when linking object # files into an executable application binary such # as tclsh. # LD_SEARCH_FLAGS-Flags to pass to ld, such as "-R /usr/local/tcl/lib", # that tell the run-time dynamic linker where to look # for shared libraries such as libtcl.so. Depends on # the variable LIB_RUNTIME_DIR in the Makefile. Could # be the same as CC_SEARCH_FLAGS if ${CC} is used to link. # CC_SEARCH_FLAGS-Flags to pass to ${CC}, such as "-Wl,-rpath,/usr/local/tcl/lib", # that tell the run-time dynamic linker where to look # for shared libraries such as libtcl.so. Depends on # the variable LIB_RUNTIME_DIR in the Makefile. # SHLIB_CFLAGS - Flags to pass to cc when compiling the components # of a shared library (may request position-independent # code, among other things). # SHLIB_LD - Base command to use for combining object files # into a shared library. # SHLIB_LD_LIBS - Dependent libraries for the linker to scan when # creating shared libraries. This symbol typically # goes at the end of the "ld" commands that build # shared libraries. The value of the symbol is # "${LIBS}" if all of the dependent libraries should # be specified when creating a shared library. If # dependent libraries should not be specified (as on # SunOS 4.x, where they cause the link to fail, or in # general if Tcl and Tk aren't themselves shared # libraries), then this symbol has an empty string # as its value. # SHLIB_SUFFIX - Suffix to use for the names of dynamically loadable # extensions. An empty string means we don't know how # to use shared libraries on this platform. # LIB_SUFFIX - Specifies everything that comes after the "libfoo" # in a static or shared library name, using the $VERSION variable # to put the version in the right place. This is used # by platforms that need non-standard library names. # Examples: ${VERSION}.so.1.1 on NetBSD, since it needs # to have a version after the .so, and ${VERSION}.a # on AIX, since a shared library needs to have # a .a extension whereas shared objects for loadable # extensions have a .so extension. Defaults to # ${VERSION}${SHLIB_SUFFIX}. # TCL_NEEDS_EXP_FILE - # 1 means that an export file is needed to link to a # shared library. # TCL_EXP_FILE - The name of the installed export / import file which # should be used to link to the Tcl shared library. # Empty if Tcl is unshared. # TCL_BUILD_EXP_FILE - # The name of the built export / import file which # should be used to link to the Tcl shared library. # Empty if Tcl is unshared. # CFLAGS_DEBUG - # Flags used when running the compiler in debug mode # CFLAGS_OPTIMIZE - # Flags used when running the compiler in optimize mode # CFLAGS - Additional CFLAGS added as necessary (usually 64-bit) # #-------------------------------------------------------------------- AC_DEFUN([TEA_CONFIG_CFLAGS], [ dnl TEA specific: Make sure we are initialized AC_REQUIRE([TEA_INIT]) # Step 0.a: Enable 64 bit support? AC_MSG_CHECKING([if 64bit support is requested]) AC_ARG_ENABLE(64bit, AC_HELP_STRING([--enable-64bit], [enable 64bit support (default: off)]), [do64bit=$enableval], [do64bit=no]) AC_MSG_RESULT([$do64bit]) # Step 0.b: Enable Solaris 64 bit VIS support? AC_MSG_CHECKING([if 64bit Sparc VIS support is requested]) AC_ARG_ENABLE(64bit-vis, AC_HELP_STRING([--enable-64bit-vis], [enable 64bit Sparc VIS support (default: off)]), [do64bitVIS=$enableval], [do64bitVIS=no]) AC_MSG_RESULT([$do64bitVIS]) # Force 64bit on with VIS AS_IF([test "$do64bitVIS" = "yes"], [do64bit=yes]) # Step 0.c: Check if visibility support is available. Do this here so # that platform specific alternatives can be used below if this fails. AC_CACHE_CHECK([if compiler supports visibility "hidden"], tcl_cv_cc_visibility_hidden, [ hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror" AC_TRY_LINK([ extern __attribute__((__visibility__("hidden"))) void f(void); void f(void) {}], [f();], tcl_cv_cc_visibility_hidden=yes, tcl_cv_cc_visibility_hidden=no) CFLAGS=$hold_cflags]) AS_IF([test $tcl_cv_cc_visibility_hidden = yes], [ AC_DEFINE(MODULE_SCOPE, [extern __attribute__((__visibility__("hidden")))], [Compiler support for module scope symbols]) ]) # Step 0.d: Disable -rpath support? AC_MSG_CHECKING([if rpath support is requested]) AC_ARG_ENABLE(rpath, AC_HELP_STRING([--disable-rpath], [disable rpath support (default: on)]), [doRpath=$enableval], [doRpath=yes]) AC_MSG_RESULT([$doRpath]) # TEA specific: Cross-compiling options for Windows/CE builds? AS_IF([test "${TEA_PLATFORM}" = windows], [ AC_MSG_CHECKING([if Windows/CE build is requested]) AC_ARG_ENABLE(wince, AC_HELP_STRING([--enable-wince], [enable Win/CE support (where applicable)]), [doWince=$enableval], [doWince=no]) AC_MSG_RESULT([$doWince]) ]) # Step 1: set the variable "system" to hold the name and version number # for the system. TEA_CONFIG_SYSTEM # Step 2: check for existence of -ldl library. This is needed because # Linux can use either -ldl or -ldld for dynamic loading. AC_CHECK_LIB(dl, dlopen, have_dl=yes, have_dl=no) # Require ranlib early so we can override it in special cases below. AC_REQUIRE([AC_PROG_RANLIB]) # Step 3: set configuration options based on system name and version. # This is similar to Tcl's unix/tcl.m4 except that we've added a # "windows" case. do64bit_ok=no LDFLAGS_ORIG="$LDFLAGS" # When ld needs options to work in 64-bit mode, put them in # LDFLAGS_ARCH so they eventually end up in LDFLAGS even if [load] # is disabled by the user. [Bug 1016796] LDFLAGS_ARCH="" TCL_EXPORT_FILE_SUFFIX="" UNSHARED_LIB_SUFFIX="" # TEA specific: use PACKAGE_VERSION instead of VERSION TCL_TRIM_DOTS='`echo ${PACKAGE_VERSION} | tr -d .`' ECHO_VERSION='`echo ${PACKAGE_VERSION}`' TCL_LIB_VERSIONS_OK=ok CFLAGS_DEBUG=-g CFLAGS_OPTIMIZE=-O AS_IF([test "$GCC" = yes], [ # TEA specific: CFLAGS_OPTIMIZE=-O2 CFLAGS_WARNING="-Wall -Wno-implicit-int" ], [CFLAGS_WARNING=""]) TCL_NEEDS_EXP_FILE=0 TCL_BUILD_EXP_FILE="" TCL_EXP_FILE="" dnl FIXME: Replace AC_CHECK_PROG with AC_CHECK_TOOL once cross compiling is fixed. dnl AC_CHECK_TOOL(AR, ar) AC_CHECK_PROG(AR, ar, ar) STLIB_LD='${AR} cr' LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH" case $system in # TEA specific: windows) # This is a 2-stage check to make sure we have the 64-bit SDK # We have to know where the SDK is installed. # This magic is based on MS Platform SDK for Win2003 SP1 - hobbs # MACHINE is IX86 for LINK, but this is used by the manifest, # which requires x86|amd64|ia64. MACHINE="X86" if test "$do64bit" != "no" ; then if test "x${MSSDK}x" = "xx" ; then MSSDK="C:/Progra~1/Microsoft Platform SDK" fi MSSDK=`echo "$MSSDK" | sed -e 's!\\\!/!g'` PATH64="" case "$do64bit" in amd64|x64|yes) MACHINE="AMD64" ; # default to AMD64 64-bit build PATH64="${MSSDK}/Bin/Win64/x86/AMD64" ;; ia64) MACHINE="IA64" PATH64="${MSSDK}/Bin/Win64" ;; esac if test ! -d "${PATH64}" ; then AC_MSG_WARN([Could not find 64-bit $MACHINE SDK to enable 64bit mode]) AC_MSG_WARN([Ensure latest Platform SDK is installed]) do64bit="no" else AC_MSG_RESULT([ Using 64-bit $MACHINE mode]) do64bit_ok="yes" fi fi if test "$doWince" != "no" ; then if test "$do64bit" != "no" ; then AC_MSG_ERROR([Windows/CE and 64-bit builds incompatible]) fi if test "$GCC" = "yes" ; then AC_MSG_ERROR([Windows/CE and GCC builds incompatible]) fi TEA_PATH_CELIB # Set defaults for common evc4/PPC2003 setup # Currently Tcl requires 300+, possibly 420+ for sockets CEVERSION=420; # could be 211 300 301 400 420 ... TARGETCPU=ARMV4; # could be ARMV4 ARM MIPS SH3 X86 ... ARCH=ARM; # could be ARM MIPS X86EM ... PLATFORM="Pocket PC 2003"; # or "Pocket PC 2002" if test "$doWince" != "yes"; then # If !yes then the user specified something # Reset ARCH to allow user to skip specifying it ARCH= eval `echo $doWince | awk -F, '{ \ if (length([$]1)) { printf "CEVERSION=\"%s\"\n", [$]1; \ if ([$]1 < 400) { printf "PLATFORM=\"Pocket PC 2002\"\n" } }; \ if (length([$]2)) { printf "TARGETCPU=\"%s\"\n", toupper([$]2) }; \ if (length([$]3)) { printf "ARCH=\"%s\"\n", toupper([$]3) }; \ if (length([$]4)) { printf "PLATFORM=\"%s\"\n", [$]4 }; \ }'` if test "x${ARCH}" = "x" ; then ARCH=$TARGETCPU; fi fi OSVERSION=WCE$CEVERSION; if test "x${WCEROOT}" = "x" ; then WCEROOT="C:/Program Files/Microsoft eMbedded C++ 4.0" if test ! -d "${WCEROOT}" ; then WCEROOT="C:/Program Files/Microsoft eMbedded Tools" fi fi if test "x${SDKROOT}" = "x" ; then SDKROOT="C:/Program Files/Windows CE Tools" if test ! -d "${SDKROOT}" ; then SDKROOT="C:/Windows CE Tools" fi fi WCEROOT=`echo "$WCEROOT" | sed -e 's!\\\!/!g'` SDKROOT=`echo "$SDKROOT" | sed -e 's!\\\!/!g'` if test ! -d "${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}" \ -o ! -d "${WCEROOT}/EVC/${OSVERSION}/bin"; then AC_MSG_ERROR([could not find PocketPC SDK or target compiler to enable WinCE mode [$CEVERSION,$TARGETCPU,$ARCH,$PLATFORM]]) doWince="no" else # We could PATH_NOSPACE these, but that's not important, # as long as we quote them when used. CEINCLUDE="${SDKROOT}/${OSVERSION}/${PLATFORM}/include" if test -d "${CEINCLUDE}/${TARGETCPU}" ; then CEINCLUDE="${CEINCLUDE}/${TARGETCPU}" fi CELIBPATH="${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}" fi fi if test "$GCC" != "yes" ; then if test "${SHARED_BUILD}" = "0" ; then runtime=-MT else runtime=-MD fi if test "$do64bit" != "no" ; then # All this magic is necessary for the Win64 SDK RC1 - hobbs CC="\"${PATH64}/cl.exe\"" CFLAGS="${CFLAGS} -I\"${MSSDK}/Include\" -I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\"" RC="\"${MSSDK}/bin/rc.exe\"" lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\"" LINKBIN="\"${PATH64}/link.exe\"" CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d" CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}" # Avoid 'unresolved external symbol __security_cookie' # errors, c.f. http://support.microsoft.com/?id=894573 TEA_ADD_LIBS([bufferoverflowU.lib]) elif test "$doWince" != "no" ; then CEBINROOT="${WCEROOT}/EVC/${OSVERSION}/bin" if test "${TARGETCPU}" = "X86"; then CC="\"${CEBINROOT}/cl.exe\"" else CC="\"${CEBINROOT}/cl${ARCH}.exe\"" fi CFLAGS="$CFLAGS -I\"${CELIB_DIR}/inc\" -I\"${CEINCLUDE}\"" RC="\"${WCEROOT}/Common/EVC/bin/rc.exe\"" arch=`echo ${ARCH} | awk '{print tolower([$]0)}'` defs="${ARCH} _${ARCH}_ ${arch} PALM_SIZE _MT _WINDOWS" if test "${SHARED_BUILD}" = "1" ; then # Static CE builds require static celib as well defs="${defs} _DLL" fi for i in $defs ; do AC_DEFINE_UNQUOTED($i, 1, [WinCE def ]$i) done AC_DEFINE_UNQUOTED(_WIN32_WCE, $CEVERSION, [_WIN32_WCE version]) AC_DEFINE_UNQUOTED(UNDER_CE, $CEVERSION, [UNDER_CE version]) CFLAGS_DEBUG="-nologo -Zi -Od" CFLAGS_OPTIMIZE="-nologo -Ox" lversion=`echo ${CEVERSION} | sed -e 's/\(.\)\(..\)/\1\.\2/'` lflags="-MACHINE:${ARCH} -LIBPATH:\"${CELIBPATH}\" -subsystem:windowsce,${lversion} -nologo" LINKBIN="\"${CEBINROOT}/link.exe\"" AC_SUBST(CELIB_DIR) else RC="rc" lflags="-nologo" LINKBIN="link" CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d" CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}" fi fi if test "$GCC" = "yes"; then # mingw gcc mode RC="windres" CFLAGS_DEBUG="-g" CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer" SHLIB_LD="$CC -shared" UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}" LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}" else SHLIB_LD="${LINKBIN} -dll ${lflags}" # link -lib only works when -lib is the first arg STLIB_LD="${LINKBIN} -lib ${lflags}" UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.lib' PATHTYPE=-w # For information on what debugtype is most useful, see: # http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp # and also # http://msdn2.microsoft.com/en-us/library/y0zzbyt4%28VS.80%29.aspx # This essentially turns it all on. LDFLAGS_DEBUG="-debug -debugtype:cv" LDFLAGS_OPTIMIZE="-release" if test "$doWince" != "no" ; then LDFLAGS_CONSOLE="-link ${lflags}" LDFLAGS_WINDOW=${LDFLAGS_CONSOLE} else LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}" LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}" fi fi SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".dll" SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.dll' TCL_LIB_VERSIONS_OK=nodots # Bogus to avoid getting this turned off DL_OBJS="tclLoadNone.obj" ;; AIX-*) AS_IF([test "${TCL_THREADS}" = "1" -a "$GCC" != "yes"], [ # AIX requires the _r compiler when gcc isn't being used case "${CC}" in *_r) # ok ... ;; *) CC=${CC}_r ;; esac AC_MSG_RESULT([Using $CC for compiling with threads]) ]) LIBS="$LIBS -lc" SHLIB_CFLAGS="" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" LD_LIBRARY_PATH_VAR="LIBPATH" # Check to enable 64-bit flags for compiler/linker on AIX 4+ AS_IF([test "$do64bit" = yes -a "`uname -v`" -gt 3], [ AS_IF([test "$GCC" = yes], [ AC_MSG_WARN([64bit mode not supported with GCC on $system]) ], [ do64bit_ok=yes CFLAGS="$CFLAGS -q64" LDFLAGS_ARCH="-q64" RANLIB="${RANLIB} -X64" AR="${AR} -X64" SHLIB_LD_FLAGS="-b64" ]) ]) AS_IF([test "`uname -m`" = ia64], [ # AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC SHLIB_LD="/usr/ccs/bin/ld -G -z text" # AIX-5 has dl* in libc.so DL_LIBS="" AS_IF([test "$GCC" = yes], [ CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' ], [ CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}' ]) LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' ], [ AS_IF([test "$GCC" = yes], [SHLIB_LD='${CC} -shared'], [ SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry" ]) SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix ${SHLIB_LD} ${SHLIB_LD_FLAGS}" DL_LIBS="-ldl" CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} TCL_NEEDS_EXP_FILE=1 # TEA specific: use PACKAGE_VERSION instead of VERSION TCL_EXPORT_FILE_SUFFIX='${PACKAGE_VERSION}.exp' ]) # AIX v<=4.1 has some different flags than 4.2+ AS_IF([test "$system" = "AIX-4.1" -o "`uname -v`" -lt 4], [ AC_LIBOBJ([tclLoadAix]) DL_LIBS="-lld" ]) # On AIX <=v4 systems, libbsd.a has to be linked in to support # non-blocking file IO. This library has to be linked in after # the MATH_LIBS or it breaks the pow() function. The way to # insure proper sequencing, is to add it to the tail of MATH_LIBS. # This library also supplies gettimeofday. # # AIX does not have a timezone field in struct tm. When the AIX # bsd library is used, the timezone global and the gettimeofday # methods are to be avoided for timezone deduction instead, we # deduce the timezone by comparing the localtime result on a # known GMT value. AC_CHECK_LIB(bsd, gettimeofday, libbsd=yes, libbsd=no) AS_IF([test $libbsd = yes], [ MATH_LIBS="$MATH_LIBS -lbsd" AC_DEFINE(USE_DELTA_FOR_TZ, 1, [Do we need a special AIX hack for timezones?]) ]) ;; BeOS*) SHLIB_CFLAGS="-fPIC" SHLIB_LD='${CC} -nostart' SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" #----------------------------------------------------------- # Check for inet_ntoa in -lbind, for BeOS (which also needs # -lsocket, even if the network functions are in -lnet which # is always linked to, for compatibility. #----------------------------------------------------------- AC_CHECK_LIB(bind, inet_ntoa, [LIBS="$LIBS -lbind -lsocket"]) ;; BSD/OS-2.1*|BSD/OS-3*) SHLIB_CFLAGS="" SHLIB_LD="shlicc -r" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; BSD/OS-4.*) SHLIB_CFLAGS="-export-dynamic -fPIC" SHLIB_LD='${CC} -shared' SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" LDFLAGS="$LDFLAGS -export-dynamic" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; dgux*) SHLIB_CFLAGS="-K PIC" SHLIB_LD='${CC} -G' SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; HP-UX-*.11.*) # Use updated header definitions where possible AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, [Do we want to use the XOPEN network library?]) # TEA specific: Needed by Tcl, but not most extensions #AC_DEFINE(_XOPEN_SOURCE, 1, [Do we want to use the XOPEN network library?]) #LIBS="$LIBS -lxnet" # Use the XOPEN network library AS_IF([test "`uname -m`" = ia64], [ SHLIB_SUFFIX=".so" # Use newer C++ library for C++ extensions #if test "$GCC" != "yes" ; then # CPPFLAGS="-AA" #fi ], [ SHLIB_SUFFIX=".sl" ]) AC_CHECK_LIB(dld, shl_load, tcl_ok=yes, tcl_ok=no) AS_IF([test "$tcl_ok" = yes], [ SHLIB_CFLAGS="+z" SHLIB_LD="ld -b" SHLIB_LD_LIBS='${LIBS}' DL_OBJS="tclLoadShl.o" DL_LIBS="-ldld" LDFLAGS="$LDFLAGS -Wl,-E" CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.' LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.' LD_LIBRARY_PATH_VAR="SHLIB_PATH" ]) AS_IF([test "$GCC" = yes], [ SHLIB_LD='${CC} -shared' SHLIB_LD_LIBS='${LIBS}' LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} ]) # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc #CFLAGS="$CFLAGS +DAportable" # Check to enable 64-bit flags for compiler/linker AS_IF([test "$do64bit" = "yes"], [ AS_IF([test "$GCC" = yes], [ case `${CC} -dumpmachine` in hppa64*) # 64-bit gcc in use. Fix flags for GNU ld. do64bit_ok=yes SHLIB_LD='${CC} -shared' SHLIB_LD_LIBS='${LIBS}' AS_IF([test $doRpath = yes], [ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}']) LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} ;; *) AC_MSG_WARN([64bit mode not supported with GCC on $system]) ;; esac ], [ do64bit_ok=yes CFLAGS="$CFLAGS +DD64" LDFLAGS_ARCH="+DD64" ]) ]) ;; HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*) SHLIB_SUFFIX=".sl" AC_CHECK_LIB(dld, shl_load, tcl_ok=yes, tcl_ok=no) AS_IF([test "$tcl_ok" = yes], [ SHLIB_CFLAGS="+z" SHLIB_LD="ld -b" SHLIB_LD_LIBS="" DL_OBJS="tclLoadShl.o" DL_LIBS="-ldld" LDFLAGS="$LDFLAGS -Wl,-E" CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.' LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.' LD_LIBRARY_PATH_VAR="SHLIB_PATH" ]) ;; IRIX-5.*) SHLIB_CFLAGS="" SHLIB_LD="ld -shared -rdata_shared" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" AS_IF([test $doRpath = yes], [ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}']) ;; IRIX-6.*) SHLIB_CFLAGS="" SHLIB_LD="ld -n32 -shared -rdata_shared" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" AS_IF([test $doRpath = yes], [ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}']) AS_IF([test "$GCC" = yes], [ CFLAGS="$CFLAGS -mabi=n32" LDFLAGS="$LDFLAGS -mabi=n32" ], [ case $system in IRIX-6.3) # Use to build 6.2 compatible binaries on 6.3. CFLAGS="$CFLAGS -n32 -D_OLD_TERMIOS" ;; *) CFLAGS="$CFLAGS -n32" ;; esac LDFLAGS="$LDFLAGS -n32" ]) ;; IRIX64-6.*) SHLIB_CFLAGS="" SHLIB_LD="ld -n32 -shared -rdata_shared" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" AS_IF([test $doRpath = yes], [ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}']) # Check to enable 64-bit flags for compiler/linker AS_IF([test "$do64bit" = yes], [ AS_IF([test "$GCC" = yes], [ AC_MSG_WARN([64bit mode not supported by gcc]) ], [ do64bit_ok=yes SHLIB_LD="ld -64 -shared -rdata_shared" CFLAGS="$CFLAGS -64" LDFLAGS_ARCH="-64" ]) ]) ;; Linux*) SHLIB_CFLAGS="-fPIC" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" # TEA specific: CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer" # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings # when you inline the string and math operations. Turn this off to # get rid of the warnings. #CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES" # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS_DEFAULT}' DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" LDFLAGS="$LDFLAGS -Wl,--export-dynamic" AS_IF([test $doRpath = yes], [ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}']) LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} AS_IF([test "`uname -m`" = "alpha"], [CFLAGS="$CFLAGS -mieee"]) AS_IF([test $do64bit = yes], [ AC_CACHE_CHECK([if compiler accepts -m64 flag], tcl_cv_cc_m64, [ hold_cflags=$CFLAGS CFLAGS="$CFLAGS -m64" AC_TRY_LINK(,, tcl_cv_cc_m64=yes, tcl_cv_cc_m64=no) CFLAGS=$hold_cflags]) AS_IF([test $tcl_cv_cc_m64 = yes], [ CFLAGS="$CFLAGS -m64" do64bit_ok=yes ]) ]) # The combo of gcc + glibc has a bug related to inlining of # functions like strtod(). The -fno-builtin flag should address # this problem but it does not work. The -fno-inline flag is kind # of overkill but it works. Disable inlining only when one of the # files in compat/*.c is being linked in. AS_IF([test x"${USE_COMPAT}" != x],[CFLAGS="$CFLAGS -fno-inline"]) ;; GNU*) SHLIB_CFLAGS="-fPIC" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" SHLIB_LD='${CC} -shared' DL_OBJS="" DL_LIBS="-ldl" LDFLAGS="$LDFLAGS -Wl,--export-dynamic" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" AS_IF([test "`uname -m`" = "alpha"], [CFLAGS="$CFLAGS -mieee"]) ;; Lynx*) SHLIB_CFLAGS="-fPIC" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" CFLAGS_OPTIMIZE=-02 SHLIB_LD='${CC} -shared' DL_OBJS="tclLoadDl.o" DL_LIBS="-mshared -ldl" LD_FLAGS="-Wl,--export-dynamic" AS_IF([test $doRpath = yes], [ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}']) ;; MP-RAS-02*) SHLIB_CFLAGS="-K PIC" SHLIB_LD='${CC} -G' SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; MP-RAS-*) SHLIB_CFLAGS="-K PIC" SHLIB_LD='${CC} -G' SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" LDFLAGS="$LDFLAGS -Wl,-Bexport" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; NetBSD-1.*|FreeBSD-[[1-2]].*) SHLIB_CFLAGS="-fPIC" SHLIB_LD="ld -Bshareable -x" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" AS_IF([test $doRpath = yes], [ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}']) AC_CACHE_CHECK([for ELF], tcl_cv_ld_elf, [ AC_EGREP_CPP(yes, [ #ifdef __ELF__ yes #endif ], tcl_cv_ld_elf=yes, tcl_cv_ld_elf=no)]) AS_IF([test $tcl_cv_ld_elf = yes], [ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so' ], [ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0' ]) # Ancient FreeBSD doesn't handle version numbers with dots. UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' TCL_LIB_VERSIONS_OK=nodots ;; OpenBSD-*) SHLIB_CFLAGS="-fPIC" SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}' SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" AS_IF([test $doRpath = yes], [ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}']) LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0' AC_CACHE_CHECK([for ELF], tcl_cv_ld_elf, [ AC_EGREP_CPP(yes, [ #ifdef __ELF__ yes #endif ], tcl_cv_ld_elf=yes, tcl_cv_ld_elf=no)]) AS_IF([test $tcl_cv_ld_elf = yes], [ LDFLAGS=-Wl,-export-dynamic ], [LDFLAGS=""]) # OpenBSD doesn't do version numbers with dots. UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' TCL_LIB_VERSIONS_OK=nodots ;; NetBSD-*|FreeBSD-*) # FreeBSD 3.* and greater have ELF. # NetBSD 2.* has ELF and can use 'cc -shared' to build shared libs SHLIB_CFLAGS="-fPIC" SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}' SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" LDFLAGS="$LDFLAGS -export-dynamic" AS_IF([test $doRpath = yes], [ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}']) LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} AS_IF([test "${TCL_THREADS}" = "1"], [ # The -pthread needs to go in the CFLAGS, not LIBS LIBS=`echo $LIBS | sed s/-pthread//` CFLAGS="$CFLAGS -pthread" LDFLAGS="$LDFLAGS -pthread" ]) case $system in FreeBSD-3.*) # FreeBSD-3 doesn't handle version numbers with dots. UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so' TCL_LIB_VERSIONS_OK=nodots ;; esac ;; Darwin-*) CFLAGS_OPTIMIZE="-Os" SHLIB_CFLAGS="-fno-common" # To avoid discrepancies between what headers configure sees during # preprocessing tests and compiling tests, move any -isysroot and # -mmacosx-version-min flags from CFLAGS to CPPFLAGS: CPPFLAGS="${CPPFLAGS} `echo " ${CFLAGS}" | \ awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \ if ([$]i~/^(isysroot|mmacosx-version-min)/) print "-"[$]i}'`" CFLAGS="`echo " ${CFLAGS}" | \ awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \ if (!([$]i~/^(isysroot|mmacosx-version-min)/)) print "-"[$]i}'`" AS_IF([test $do64bit = yes], [ case `arch` in ppc) AC_CACHE_CHECK([if compiler accepts -arch ppc64 flag], tcl_cv_cc_arch_ppc64, [ hold_cflags=$CFLAGS CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5" AC_TRY_LINK(,, tcl_cv_cc_arch_ppc64=yes, tcl_cv_cc_arch_ppc64=no) CFLAGS=$hold_cflags]) AS_IF([test $tcl_cv_cc_arch_ppc64 = yes], [ CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5" do64bit_ok=yes ]);; i386) AC_CACHE_CHECK([if compiler accepts -arch x86_64 flag], tcl_cv_cc_arch_x86_64, [ hold_cflags=$CFLAGS CFLAGS="$CFLAGS -arch x86_64" AC_TRY_LINK(,, tcl_cv_cc_arch_x86_64=yes, tcl_cv_cc_arch_x86_64=no) CFLAGS=$hold_cflags]) AS_IF([test $tcl_cv_cc_arch_x86_64 = yes], [ CFLAGS="$CFLAGS -arch x86_64" do64bit_ok=yes ]);; *) AC_MSG_WARN([Don't know how enable 64-bit on architecture `arch`]);; esac ], [ # Check for combined 32-bit and 64-bit fat build AS_IF([echo "$CFLAGS " |grep -E -q -- '-arch (ppc64|x86_64) ' \ && echo "$CFLAGS " |grep -E -q -- '-arch (ppc|i386) '], [ fat_32_64=yes]) ]) # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS_DEFAULT}' AC_CACHE_CHECK([if ld accepts -single_module flag], tcl_cv_ld_single_module, [ hold_ldflags=$LDFLAGS LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module" AC_TRY_LINK(, [int i;], tcl_cv_ld_single_module=yes, tcl_cv_ld_single_module=no) LDFLAGS=$hold_ldflags]) AS_IF([test $tcl_cv_ld_single_module = yes], [ SHLIB_LD="${SHLIB_LD} -Wl,-single_module" ]) # TEA specific: link shlib with current and compatibility version flags vers=`echo ${PACKAGE_VERSION} | sed -e 's/^\([[0-9]]\{1,5\}\)\(\(\.[[0-9]]\{1,3\}\)\{0,2\}\).*$/\1\2/p' -e d` SHLIB_LD="${SHLIB_LD} -current_version ${vers:-0} -compatibility_version ${vers:-0}" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".dylib" DL_OBJS="tclLoadDyld.o" DL_LIBS="" # Don't use -prebind when building for Mac OS X 10.4 or later only: AS_IF([test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int([$]2)}'`" -lt 4 -a \ "`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int([$]2)}'`" -lt 4], [ LDFLAGS="$LDFLAGS -prebind"]) LDFLAGS="$LDFLAGS -headerpad_max_install_names" AC_CACHE_CHECK([if ld accepts -search_paths_first flag], tcl_cv_ld_search_paths_first, [ hold_ldflags=$LDFLAGS LDFLAGS="$LDFLAGS -Wl,-search_paths_first" AC_TRY_LINK(, [int i;], tcl_cv_ld_search_paths_first=yes, tcl_cv_ld_search_paths_first=no) LDFLAGS=$hold_ldflags]) AS_IF([test $tcl_cv_ld_search_paths_first = yes], [ LDFLAGS="$LDFLAGS -Wl,-search_paths_first" ]) AS_IF([test "$tcl_cv_cc_visibility_hidden" != yes], [ AC_DEFINE(MODULE_SCOPE, [__private_extern__], [Compiler support for module scope symbols]) ]) CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH" # TEA specific: for combined 32 & 64 bit fat builds of Tk # extensions, verify that 64-bit build is possible. AS_IF([test "$fat_32_64" = yes && test -n "${TK_BIN_DIR}"], [ AS_IF([test "${TEA_WINDOWINGSYSTEM}" = x11], [ AC_CACHE_CHECK([for 64-bit X11], tcl_cv_lib_x11_64, [ for v in CFLAGS CPPFLAGS LDFLAGS; do eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"' done CPPFLAGS="$CPPFLAGS -I/usr/X11R6/include" LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -lX11" AC_TRY_LINK([#include ], [XrmInitialize();], tcl_cv_lib_x11_64=yes, tcl_cv_lib_x11_64=no) for v in CFLAGS CPPFLAGS LDFLAGS; do eval $v'="$hold_'$v'"' done]) ]) # remove 64-bit arch flags from CFLAGS et al. if configuration # does not support 64-bit. AS_IF([test "${TEA_WINDOWINGSYSTEM}" = aqua -o "$tcl_cv_lib_x11_64" = no], [ AC_MSG_NOTICE([Removing 64-bit architectures from compiler & linker flags]) for v in CFLAGS CPPFLAGS LDFLAGS; do eval $v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"' done]) ]) ;; NEXTSTEP-*) SHLIB_CFLAGS="" SHLIB_LD='${CC} -nostdlib -r' SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadNext.o" DL_LIBS="" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; OS/390-*) CFLAGS_OPTIMIZE="" # Optimizer is buggy AC_DEFINE(_OE_SOCKETS, 1, # needed in sys/socket.h [Should OS/390 do the right thing with sockets?]) ;; OSF1-1.0|OSF1-1.1|OSF1-1.2) # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1 SHLIB_CFLAGS="" # Hack: make package name same as library name SHLIB_LD='ld -R -export $@:' SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadOSF.o" DL_LIBS="" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; OSF1-1.*) # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2 SHLIB_CFLAGS="-fPIC" AS_IF([test "$SHARED_BUILD" = 1], [SHLIB_LD="ld -shared"], [ SHLIB_LD="ld -non_shared" ]) SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; OSF1-V*) # Digital OSF/1 SHLIB_CFLAGS="" AS_IF([test "$SHARED_BUILD" = 1], [ SHLIB_LD='${CC} -shared' ], [ SHLIB_LD='${CC} -non_shared' ]) SHLIB_LD_LIBS="${LIBS}" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" AS_IF([test $doRpath = yes], [ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}']) AS_IF([test "$GCC" = yes], [CFLAGS="$CFLAGS -mieee"], [ CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee"]) # see pthread_intro(3) for pthread support on osf1, k.furukawa AS_IF([test "${TCL_THREADS}" = 1], [ CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE" CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64" LIBS=`echo $LIBS | sed s/-lpthreads//` AS_IF([test "$GCC" = yes], [ LIBS="$LIBS -lpthread -lmach -lexc" ], [ CFLAGS="$CFLAGS -pthread" LDFLAGS="$LDFLAGS -pthread" ]) ]) ;; QNX-6*) # QNX RTP # This may work for all QNX, but it was only reported for v6. SHLIB_CFLAGS="-fPIC" SHLIB_LD="ld -Bshareable -x" SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" # dlopen is in -lc on QNX DL_LIBS="" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; SCO_SV-3.2*) # Note, dlopen is available only on SCO 3.2.5 and greater. However, # this test works, since "uname -s" was non-standard in 3.2.4 and # below. AS_IF([test "$GCC" = yes], [ SHLIB_CFLAGS="-fPIC -melf" LDFLAGS="$LDFLAGS -melf -Wl,-Bexport" ], [ SHLIB_CFLAGS="-Kpic -belf" LDFLAGS="$LDFLAGS -belf -Wl,-Bexport" ]) SHLIB_LD="ld -G" SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; SINIX*5.4*) SHLIB_CFLAGS="-K PIC" SHLIB_LD='${CC} -G' SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; SunOS-4*) SHLIB_CFLAGS="-PIC" SHLIB_LD="ld" SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} # SunOS can't handle version numbers with dots in them in library # specs, like -ltcl7.5, so use -ltcl75 instead. Also, it # requires an extra version number at the end of .so file names. # So, the library has to have a name like libtcl75.so.1.0 SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0' UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' TCL_LIB_VERSIONS_OK=nodots ;; SunOS-5.[[0-6]]) # Careful to not let 5.10+ fall into this case # Note: If _REENTRANT isn't defined, then Solaris # won't define thread-safe library routines. AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?]) AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1, [Do we really want to follow the standard? Yes we do!]) SHLIB_CFLAGS="-KPIC" # Note: need the LIBS below, otherwise Tk won't find Tcl's # symbols when dynamically loaded into tclsh. SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" AS_IF([test "$GCC" = yes], [ SHLIB_LD='${CC} -shared' CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} ], [ SHLIB_LD="/usr/ccs/bin/ld -G -z text" CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} ]) ;; SunOS-5*) # Note: If _REENTRANT isn't defined, then Solaris # won't define thread-safe library routines. AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?]) AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1, [Do we really want to follow the standard? Yes we do!]) SHLIB_CFLAGS="-KPIC" # Check to enable 64-bit flags for compiler/linker AS_IF([test "$do64bit" = yes], [ arch=`isainfo` AS_IF([test "$arch" = "sparcv9 sparc"], [ AS_IF([test "$GCC" = yes], [ AS_IF([test "`${CC} -dumpversion | awk -F. '{print [$]1}'`" -lt 3], [ AC_MSG_WARN([64bit mode not supported with GCC < 3.2 on $system]) ], [ do64bit_ok=yes CFLAGS="$CFLAGS -m64 -mcpu=v9" LDFLAGS="$LDFLAGS -m64 -mcpu=v9" SHLIB_CFLAGS="-fPIC" ]) ], [ do64bit_ok=yes AS_IF([test "$do64bitVIS" = yes], [ CFLAGS="$CFLAGS -xarch=v9a" LDFLAGS_ARCH="-xarch=v9a" ], [ CFLAGS="$CFLAGS -xarch=v9" LDFLAGS_ARCH="-xarch=v9" ]) # Solaris 64 uses this as well #LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64" ]) ], [AS_IF([test "$arch" = "amd64 i386"], [ AS_IF([test "$GCC" = yes], [ case $system in SunOS-5.1[[1-9]]*|SunOS-5.[[2-9]][[0-9]]*) do64bit_ok=yes CFLAGS="$CFLAGS -m64" LDFLAGS="$LDFLAGS -m64";; *) AC_MSG_WARN([64bit mode not supported with GCC on $system]);; esac ], [ do64bit_ok=yes case $system in SunOS-5.1[[1-9]]*|SunOS-5.[[2-9]][[0-9]]*) CFLAGS="$CFLAGS -m64" LDFLAGS="$LDFLAGS -m64";; *) CFLAGS="$CFLAGS -xarch=amd64" LDFLAGS="$LDFLAGS -xarch=amd64";; esac ]) ], [AC_MSG_WARN([64bit mode not supported for $arch])])]) ]) # Note: need the LIBS below, otherwise Tk won't find Tcl's # symbols when dynamically loaded into tclsh. SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" AS_IF([test "$GCC" = yes], [ SHLIB_LD='${CC} -shared' CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} AS_IF([test "$do64bit_ok" = yes], [ AS_IF([test "$arch" = "sparcv9 sparc"], [ # We need to specify -static-libgcc or we need to # add the path to the sparv9 libgcc. # JH: static-libgcc is necessary for core Tcl, but may # not be necessary for extensions. SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc" # for finding sparcv9 libgcc, get the regular libgcc # path, remove so name and append 'sparcv9' #v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..." #CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir" ], [AS_IF([test "$arch" = "amd64 i386"], [ # JH: static-libgcc is necessary for core Tcl, but may # not be necessary for extensions. SHLIB_LD="$SHLIB_LD -m64 -static-libgcc" ])]) ]) ], [ case $system in SunOS-5.[[1-9]][[0-9]]*) SHLIB_LD='${CC} -G -z text ${LDFLAGS}';; *) SHLIB_LD='/usr/ccs/bin/ld -G -z text';; esac CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' ]) ;; UNIX_SV* | UnixWare-5*) SHLIB_CFLAGS="-KPIC" SHLIB_LD='${CC} -G' SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers # that don't grok the -Bexport option. Test that it does. AC_CACHE_CHECK([for ld accepts -Bexport flag], tcl_cv_ld_Bexport, [ hold_ldflags=$LDFLAGS LDFLAGS="$LDFLAGS -Wl,-Bexport" AC_TRY_LINK(, [int i;], tcl_cv_ld_Bexport=yes, tcl_cv_ld_Bexport=no) LDFLAGS=$hold_ldflags]) AS_IF([test $tcl_cv_ld_Bexport = yes], [ LDFLAGS="$LDFLAGS -Wl,-Bexport" ]) CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; esac AS_IF([test "$do64bit" = yes -a "$do64bit_ok" = no], [ AC_MSG_WARN([64bit support being disabled -- don't know magic for this platform]) ]) dnl # Add any CPPFLAGS set in the environment to our CFLAGS, but delay doing so dnl # until the end of configure, as configure's compile and link tests use dnl # both CPPFLAGS and CFLAGS (unlike our compile and link) but configure's dnl # preprocessing tests use only CPPFLAGS. AC_CONFIG_COMMANDS_PRE([CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS=""]) # Step 4: disable dynamic loading if requested via a command-line switch. AC_ARG_ENABLE(load, AC_HELP_STRING([--enable-load], [allow dynamic loading and "load" command (default: on)]), [tcl_ok=$enableval], [tcl_ok=yes]) AS_IF([test "$tcl_ok" = no], [DL_OBJS=""]) AS_IF([test "x$DL_OBJS" != x], [BUILD_DLTEST="\$(DLTEST_TARGETS)"], [ AC_MSG_WARN([Can't figure out how to do dynamic loading or shared libraries on this system.]) SHLIB_CFLAGS="" SHLIB_LD="" SHLIB_SUFFIX="" DL_OBJS="tclLoadNone.o" DL_LIBS="" LDFLAGS="$LDFLAGS_ORIG" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" BUILD_DLTEST="" ]) LDFLAGS="$LDFLAGS $LDFLAGS_ARCH" # If we're running gcc, then change the C flags for compiling shared # libraries to the right flags for gcc, instead of those for the # standard manufacturer compiler. AS_IF([test "$DL_OBJS" != "tclLoadNone.o" -a "$GCC" = yes], [ case $system in AIX-*) ;; BSD/OS*) ;; IRIX*) ;; NetBSD-*|FreeBSD-*) ;; Darwin-*) ;; SCO_SV-3.2*) ;; *) SHLIB_CFLAGS="-fPIC" ;; esac]) AS_IF([test "$SHARED_LIB_SUFFIX" = ""], [ # TEA specific: use PACKAGE_VERSION instead of VERSION SHARED_LIB_SUFFIX='${PACKAGE_VERSION}${SHLIB_SUFFIX}']) AS_IF([test "$UNSHARED_LIB_SUFFIX" = ""], [ # TEA specific: use PACKAGE_VERSION instead of VERSION UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a']) AC_SUBST(DL_LIBS) AC_SUBST(CFLAGS_DEBUG) AC_SUBST(CFLAGS_OPTIMIZE) AC_SUBST(CFLAGS_WARNING) AC_SUBST(STLIB_LD) AC_SUBST(SHLIB_LD) AC_SUBST(SHLIB_LD_LIBS) AC_SUBST(SHLIB_CFLAGS) AC_SUBST(LD_LIBRARY_PATH_VAR) # These must be called after we do the basic CFLAGS checks and # verify any possible 64-bit or similar switches are necessary TEA_TCL_EARLY_FLAGS TEA_TCL_64BIT_FLAGS ]) #-------------------------------------------------------------------- # TEA_SERIAL_PORT # # Determine which interface to use to talk to the serial port. # Note that #include lines must begin in leftmost column for # some compilers to recognize them as preprocessor directives, # and some build environments have stdin not pointing at a # pseudo-terminal (usually /dev/null instead.) # # Arguments: # none # # Results: # # Defines only one of the following vars: # HAVE_SYS_MODEM_H # USE_TERMIOS # USE_TERMIO # USE_SGTTY # #-------------------------------------------------------------------- AC_DEFUN([TEA_SERIAL_PORT], [ AC_CHECK_HEADERS(sys/modem.h) AC_CACHE_CHECK([termios vs. termio vs. sgtty], tcl_cv_api_serial, [ AC_TRY_RUN([ #include int main() { struct termios t; if (tcgetattr(0, &t) == 0) { cfsetospeed(&t, 0); t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB; return 0; } return 1; }], tcl_cv_api_serial=termios, tcl_cv_api_serial=no, tcl_cv_api_serial=no) if test $tcl_cv_api_serial = no ; then AC_TRY_RUN([ #include int main() { struct termio t; if (ioctl(0, TCGETA, &t) == 0) { t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB; return 0; } return 1; }], tcl_cv_api_serial=termio, tcl_cv_api_serial=no, tcl_cv_api_serial=no) fi if test $tcl_cv_api_serial = no ; then AC_TRY_RUN([ #include int main() { struct sgttyb t; if (ioctl(0, TIOCGETP, &t) == 0) { t.sg_ospeed = 0; t.sg_flags |= ODDP | EVENP | RAW; return 0; } return 1; }], tcl_cv_api_serial=sgtty, tcl_cv_api_serial=no, tcl_cv_api_serial=no) fi if test $tcl_cv_api_serial = no ; then AC_TRY_RUN([ #include #include int main() { struct termios t; if (tcgetattr(0, &t) == 0 || errno == ENOTTY || errno == ENXIO || errno == EINVAL) { cfsetospeed(&t, 0); t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB; return 0; } return 1; }], tcl_cv_api_serial=termios, tcl_cv_api_serial=no, tcl_cv_api_serial=no) fi if test $tcl_cv_api_serial = no; then AC_TRY_RUN([ #include #include int main() { struct termio t; if (ioctl(0, TCGETA, &t) == 0 || errno == ENOTTY || errno == ENXIO || errno == EINVAL) { t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB; return 0; } return 1; }], tcl_cv_api_serial=termio, tcl_cv_api_serial=no, tcl_cv_api_serial=no) fi if test $tcl_cv_api_serial = no; then AC_TRY_RUN([ #include #include int main() { struct sgttyb t; if (ioctl(0, TIOCGETP, &t) == 0 || errno == ENOTTY || errno == ENXIO || errno == EINVAL) { t.sg_ospeed = 0; t.sg_flags |= ODDP | EVENP | RAW; return 0; } return 1; }], tcl_cv_api_serial=sgtty, tcl_cv_api_serial=none, tcl_cv_api_serial=none) fi]) case $tcl_cv_api_serial in termios) AC_DEFINE(USE_TERMIOS, 1, [Use the termios API for serial lines]);; termio) AC_DEFINE(USE_TERMIO, 1, [Use the termio API for serial lines]);; sgtty) AC_DEFINE(USE_SGTTY, 1, [Use the sgtty API for serial lines]);; esac ]) #-------------------------------------------------------------------- # TEA_MISSING_POSIX_HEADERS # # Supply substitutes for missing POSIX header files. Special # notes: # - stdlib.h doesn't define strtol, strtoul, or # strtod insome versions of SunOS # - some versions of string.h don't declare procedures such # as strstr # # Arguments: # none # # Results: # # Defines some of the following vars: # NO_DIRENT_H # NO_ERRNO_H # NO_VALUES_H # HAVE_LIMITS_H or NO_LIMITS_H # NO_STDLIB_H # NO_STRING_H # NO_SYS_WAIT_H # NO_DLFCN_H # HAVE_SYS_PARAM_H # # HAVE_STRING_H ? # # tkUnixPort.h checks for HAVE_LIMITS_H, so do both HAVE and # CHECK on limits.h #-------------------------------------------------------------------- AC_DEFUN([TEA_MISSING_POSIX_HEADERS], [ AC_CACHE_CHECK([dirent.h], tcl_cv_dirent_h, [ AC_TRY_LINK([#include #include ], [ #ifndef _POSIX_SOURCE # ifdef __Lynx__ /* * Generate compilation error to make the test fail: Lynx headers * are only valid if really in the POSIX environment. */ missing_procedure(); # endif #endif DIR *d; struct dirent *entryPtr; char *p; d = opendir("foobar"); entryPtr = readdir(d); p = entryPtr->d_name; closedir(d); ], tcl_cv_dirent_h=yes, tcl_cv_dirent_h=no)]) if test $tcl_cv_dirent_h = no; then AC_DEFINE(NO_DIRENT_H, 1, [Do we have ?]) fi # TEA specific: AC_CHECK_HEADER(errno.h, , [AC_DEFINE(NO_ERRNO_H, 1, [Do we have ?])]) AC_CHECK_HEADER(float.h, , [AC_DEFINE(NO_FLOAT_H, 1, [Do we have ?])]) AC_CHECK_HEADER(values.h, , [AC_DEFINE(NO_VALUES_H, 1, [Do we have ?])]) AC_CHECK_HEADER(limits.h, [AC_DEFINE(HAVE_LIMITS_H, 1, [Do we have ?])], [AC_DEFINE(NO_LIMITS_H, 1, [Do we have ?])]) AC_CHECK_HEADER(stdlib.h, tcl_ok=1, tcl_ok=0) AC_EGREP_HEADER(strtol, stdlib.h, , tcl_ok=0) AC_EGREP_HEADER(strtoul, stdlib.h, , tcl_ok=0) AC_EGREP_HEADER(strtod, stdlib.h, , tcl_ok=0) if test $tcl_ok = 0; then AC_DEFINE(NO_STDLIB_H, 1, [Do we have ?]) fi AC_CHECK_HEADER(string.h, tcl_ok=1, tcl_ok=0) AC_EGREP_HEADER(strstr, string.h, , tcl_ok=0) AC_EGREP_HEADER(strerror, string.h, , tcl_ok=0) # See also memmove check below for a place where NO_STRING_H can be # set and why. if test $tcl_ok = 0; then AC_DEFINE(NO_STRING_H, 1, [Do we have ?]) fi AC_CHECK_HEADER(sys/wait.h, , [AC_DEFINE(NO_SYS_WAIT_H, 1, [Do we have ?])]) AC_CHECK_HEADER(dlfcn.h, , [AC_DEFINE(NO_DLFCN_H, 1, [Do we have ?])]) # OS/390 lacks sys/param.h (and doesn't need it, by chance). AC_HAVE_HEADERS(sys/param.h) ]) #-------------------------------------------------------------------- # TEA_PATH_X # # Locate the X11 header files and the X11 library archive. Try # the ac_path_x macro first, but if it doesn't find the X stuff # (e.g. because there's no xmkmf program) then check through # a list of possible directories. Under some conditions the # autoconf macro will return an include directory that contains # no include files, so double-check its result just to be safe. # # This should be called after TEA_CONFIG_CFLAGS as setting the # LIBS line can confuse some configure macro magic. # # Arguments: # none # # Results: # # Sets the following vars: # XINCLUDES # XLIBSW # PKG_LIBS (appends to) # #-------------------------------------------------------------------- AC_DEFUN([TEA_PATH_X], [ if test "${TEA_WINDOWINGSYSTEM}" = "x11" ; then TEA_PATH_UNIX_X fi ]) AC_DEFUN([TEA_PATH_UNIX_X], [ AC_PATH_X not_really_there="" if test "$no_x" = ""; then if test "$x_includes" = ""; then AC_TRY_CPP([#include ], , not_really_there="yes") else if test ! -r $x_includes/X11/Intrinsic.h; then not_really_there="yes" fi fi fi if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then AC_MSG_CHECKING([for X11 header files]) found_xincludes="no" AC_TRY_CPP([#include ], found_xincludes="yes", found_xincludes="no") if test "$found_xincludes" = "no"; then dirs="/usr/unsupported/include /usr/local/include /usr/X386/include /usr/X11R6/include /usr/X11R5/include /usr/include/X11R5 /usr/include/X11R4 /usr/openwin/include /usr/X11/include /usr/sww/include" for i in $dirs ; do if test -r $i/X11/Intrinsic.h; then AC_MSG_RESULT([$i]) XINCLUDES=" -I$i" found_xincludes="yes" break fi done fi else if test "$x_includes" != ""; then XINCLUDES="-I$x_includes" found_xincludes="yes" fi fi if test found_xincludes = "no"; then AC_MSG_RESULT([couldn't find any!]) fi if test "$no_x" = yes; then AC_MSG_CHECKING([for X11 libraries]) XLIBSW=nope dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/X11R6/lib /usr/X11R5/lib /usr/lib/X11R5 /usr/lib/X11R4 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib" for i in $dirs ; do if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl -o -r $i/libX11.dylib; then AC_MSG_RESULT([$i]) XLIBSW="-L$i -lX11" x_libraries="$i" break fi done else if test "$x_libraries" = ""; then XLIBSW=-lX11 else XLIBSW="-L$x_libraries -lX11" fi fi if test "$XLIBSW" = nope ; then AC_CHECK_LIB(Xwindow, XCreateWindow, XLIBSW=-lXwindow) fi if test "$XLIBSW" = nope ; then AC_MSG_RESULT([could not find any! Using -lX11.]) XLIBSW=-lX11 fi # TEA specific: if test x"${XLIBSW}" != x ; then PKG_LIBS="${PKG_LIBS} ${XLIBSW}" fi ]) #-------------------------------------------------------------------- # TEA_BLOCKING_STYLE # # The statements below check for systems where POSIX-style # non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented. # On these systems (mostly older ones), use the old BSD-style # FIONBIO approach instead. # # Arguments: # none # # Results: # # Defines some of the following vars: # HAVE_SYS_IOCTL_H # HAVE_SYS_FILIO_H # USE_FIONBIO # O_NONBLOCK # #-------------------------------------------------------------------- AC_DEFUN([TEA_BLOCKING_STYLE], [ AC_CHECK_HEADERS(sys/ioctl.h) AC_CHECK_HEADERS(sys/filio.h) TEA_CONFIG_SYSTEM AC_MSG_CHECKING([FIONBIO vs. O_NONBLOCK for nonblocking I/O]) case $system in # There used to be code here to use FIONBIO under AIX. However, it # was reported that FIONBIO doesn't work under AIX 3.2.5. Since # using O_NONBLOCK seems fine under AIX 4.*, I removed the FIONBIO # code (JO, 5/31/97). OSF*) AC_DEFINE(USE_FIONBIO, 1, [Should we use FIONBIO?]) AC_MSG_RESULT([FIONBIO]) ;; SunOS-4*) AC_DEFINE(USE_FIONBIO, 1, [Should we use FIONBIO?]) AC_MSG_RESULT([FIONBIO]) ;; *) AC_MSG_RESULT([O_NONBLOCK]) ;; esac ]) #-------------------------------------------------------------------- # TEA_TIME_HANLDER # # Checks how the system deals with time.h, what time structures # are used on the system, and what fields the structures have. # # Arguments: # none # # Results: # # Defines some of the following vars: # USE_DELTA_FOR_TZ # HAVE_TM_GMTOFF # HAVE_TM_TZADJ # HAVE_TIMEZONE_VAR # #-------------------------------------------------------------------- AC_DEFUN([TEA_TIME_HANDLER], [ AC_CHECK_HEADERS(sys/time.h) AC_HEADER_TIME AC_STRUCT_TIMEZONE AC_CHECK_FUNCS(gmtime_r localtime_r) AC_CACHE_CHECK([tm_tzadj in struct tm], tcl_cv_member_tm_tzadj, [ AC_TRY_COMPILE([#include ], [struct tm tm; tm.tm_tzadj;], tcl_cv_member_tm_tzadj=yes, tcl_cv_member_tm_tzadj=no)]) if test $tcl_cv_member_tm_tzadj = yes ; then AC_DEFINE(HAVE_TM_TZADJ, 1, [Should we use the tm_tzadj field of struct tm?]) fi AC_CACHE_CHECK([tm_gmtoff in struct tm], tcl_cv_member_tm_gmtoff, [ AC_TRY_COMPILE([#include ], [struct tm tm; tm.tm_gmtoff;], tcl_cv_member_tm_gmtoff=yes, tcl_cv_member_tm_gmtoff=no)]) if test $tcl_cv_member_tm_gmtoff = yes ; then AC_DEFINE(HAVE_TM_GMTOFF, 1, [Should we use the tm_gmtoff field of struct tm?]) fi # # Its important to include time.h in this check, as some systems # (like convex) have timezone functions, etc. # AC_CACHE_CHECK([long timezone variable], tcl_cv_timezone_long, [ AC_TRY_COMPILE([#include ], [extern long timezone; timezone += 1; exit (0);], tcl_cv_timezone_long=yes, tcl_cv_timezone_long=no)]) if test $tcl_cv_timezone_long = yes ; then AC_DEFINE(HAVE_TIMEZONE_VAR, 1, [Should we use the global timezone variable?]) else # # On some systems (eg IRIX 6.2), timezone is a time_t and not a long. # AC_CACHE_CHECK([time_t timezone variable], tcl_cv_timezone_time, [ AC_TRY_COMPILE([#include ], [extern time_t timezone; timezone += 1; exit (0);], tcl_cv_timezone_time=yes, tcl_cv_timezone_time=no)]) if test $tcl_cv_timezone_time = yes ; then AC_DEFINE(HAVE_TIMEZONE_VAR, 1, [Should we use the global timezone variable?]) fi fi ]) #-------------------------------------------------------------------- # TEA_BUGGY_STRTOD # # Under Solaris 2.4, strtod returns the wrong value for the # terminating character under some conditions. Check for this # and if the problem exists use a substitute procedure # "fixstrtod" (provided by Tcl) that corrects the error. # Also, on Compaq's Tru64 Unix 5.0, # strtod(" ") returns 0.0 instead of a failure to convert. # # Arguments: # none # # Results: # # Might defines some of the following vars: # strtod (=fixstrtod) # #-------------------------------------------------------------------- AC_DEFUN([TEA_BUGGY_STRTOD], [ AC_CHECK_FUNC(strtod, tcl_strtod=1, tcl_strtod=0) if test "$tcl_strtod" = 1; then AC_CACHE_CHECK([for Solaris2.4/Tru64 strtod bugs], tcl_cv_strtod_buggy,[ AC_TRY_RUN([ extern double strtod(); int main() { char *infString="Inf", *nanString="NaN", *spaceString=" "; char *term; double value; value = strtod(infString, &term); if ((term != infString) && (term[-1] == 0)) { exit(1); } value = strtod(nanString, &term); if ((term != nanString) && (term[-1] == 0)) { exit(1); } value = strtod(spaceString, &term); if (term == (spaceString+1)) { exit(1); } exit(0); }], tcl_cv_strtod_buggy=ok, tcl_cv_strtod_buggy=buggy, tcl_cv_strtod_buggy=buggy)]) if test "$tcl_cv_strtod_buggy" = buggy; then AC_LIBOBJ([fixstrtod]) USE_COMPAT=1 AC_DEFINE(strtod, fixstrtod, [Do we want to use the strtod() in compat?]) fi fi ]) #-------------------------------------------------------------------- # TEA_TCL_LINK_LIBS # # Search for the libraries needed to link the Tcl shell. # Things like the math library (-lm) and socket stuff (-lsocket vs. # -lnsl) are dealt with here. # # Arguments: # Requires the following vars to be set in the Makefile: # DL_LIBS # LIBS # MATH_LIBS # # Results: # # Subst's the following var: # TCL_LIBS # MATH_LIBS # # Might append to the following vars: # LIBS # # Might define the following vars: # HAVE_NET_ERRNO_H # #-------------------------------------------------------------------- AC_DEFUN([TEA_TCL_LINK_LIBS], [ #-------------------------------------------------------------------- # On a few very rare systems, all of the libm.a stuff is # already in libc.a. Set compiler flags accordingly. # Also, Linux requires the "ieee" library for math to work # right (and it must appear before "-lm"). #-------------------------------------------------------------------- AC_CHECK_FUNC(sin, MATH_LIBS="", MATH_LIBS="-lm") AC_CHECK_LIB(ieee, main, [MATH_LIBS="-lieee $MATH_LIBS"]) #-------------------------------------------------------------------- # Interactive UNIX requires -linet instead of -lsocket, plus it # needs net/errno.h to define the socket-related error codes. #-------------------------------------------------------------------- AC_CHECK_LIB(inet, main, [LIBS="$LIBS -linet"]) AC_CHECK_HEADER(net/errno.h, [ AC_DEFINE(HAVE_NET_ERRNO_H, 1, [Do we have ?])]) #-------------------------------------------------------------------- # Check for the existence of the -lsocket and -lnsl libraries. # The order here is important, so that they end up in the right # order in the command line generated by make. Here are some # special considerations: # 1. Use "connect" and "accept" to check for -lsocket, and # "gethostbyname" to check for -lnsl. # 2. Use each function name only once: can't redo a check because # autoconf caches the results of the last check and won't redo it. # 3. Use -lnsl and -lsocket only if they supply procedures that # aren't already present in the normal libraries. This is because # IRIX 5.2 has libraries, but they aren't needed and they're # bogus: they goof up name resolution if used. # 4. On some SVR4 systems, can't use -lsocket without -lnsl too. # To get around this problem, check for both libraries together # if -lsocket doesn't work by itself. #-------------------------------------------------------------------- tcl_checkBoth=0 AC_CHECK_FUNC(connect, tcl_checkSocket=0, tcl_checkSocket=1) if test "$tcl_checkSocket" = 1; then AC_CHECK_FUNC(setsockopt, , [AC_CHECK_LIB(socket, setsockopt, LIBS="$LIBS -lsocket", tcl_checkBoth=1)]) fi if test "$tcl_checkBoth" = 1; then tk_oldLibs=$LIBS LIBS="$LIBS -lsocket -lnsl" AC_CHECK_FUNC(accept, tcl_checkNsl=0, [LIBS=$tk_oldLibs]) fi AC_CHECK_FUNC(gethostbyname, , [AC_CHECK_LIB(nsl, gethostbyname, [LIBS="$LIBS -lnsl"])]) # TEA specific: Don't perform the eval of the libraries here because # DL_LIBS won't be set until we call TEA_CONFIG_CFLAGS TCL_LIBS='${DL_LIBS} ${LIBS} ${MATH_LIBS}' AC_SUBST(TCL_LIBS) AC_SUBST(MATH_LIBS) ]) #-------------------------------------------------------------------- # TEA_TCL_EARLY_FLAGS # # Check for what flags are needed to be passed so the correct OS # features are available. # # Arguments: # None # # Results: # # Might define the following vars: # _ISOC99_SOURCE # _LARGEFILE64_SOURCE # _LARGEFILE_SOURCE64 # #-------------------------------------------------------------------- AC_DEFUN([TEA_TCL_EARLY_FLAG],[ AC_CACHE_VAL([tcl_cv_flag_]translit($1,[A-Z],[a-z]), AC_TRY_COMPILE([$2], $3, [tcl_cv_flag_]translit($1,[A-Z],[a-z])=no, AC_TRY_COMPILE([[#define ]$1[ 1 ]$2], $3, [tcl_cv_flag_]translit($1,[A-Z],[a-z])=yes, [tcl_cv_flag_]translit($1,[A-Z],[a-z])=no))) if test ["x${tcl_cv_flag_]translit($1,[A-Z],[a-z])[}" = "xyes"] ; then AC_DEFINE($1, 1, [Add the ]$1[ flag when building]) tcl_flags="$tcl_flags $1" fi ]) AC_DEFUN([TEA_TCL_EARLY_FLAGS],[ AC_MSG_CHECKING([for required early compiler flags]) tcl_flags="" TEA_TCL_EARLY_FLAG(_ISOC99_SOURCE,[#include ], [char *p = (char *)strtoll; char *q = (char *)strtoull;]) TEA_TCL_EARLY_FLAG(_LARGEFILE64_SOURCE,[#include ], [struct stat64 buf; int i = stat64("/", &buf);]) TEA_TCL_EARLY_FLAG(_LARGEFILE_SOURCE64,[#include ], [char *p = (char *)open64;]) if test "x${tcl_flags}" = "x" ; then AC_MSG_RESULT([none]) else AC_MSG_RESULT([${tcl_flags}]) fi ]) #-------------------------------------------------------------------- # TEA_TCL_64BIT_FLAGS # # Check for what is defined in the way of 64-bit features. # # Arguments: # None # # Results: # # Might define the following vars: # TCL_WIDE_INT_IS_LONG # TCL_WIDE_INT_TYPE # HAVE_STRUCT_DIRENT64 # HAVE_STRUCT_STAT64 # HAVE_TYPE_OFF64_T # #-------------------------------------------------------------------- AC_DEFUN([TEA_TCL_64BIT_FLAGS], [ AC_MSG_CHECKING([for 64-bit integer type]) AC_CACHE_VAL(tcl_cv_type_64bit,[ tcl_cv_type_64bit=none # See if the compiler knows natively about __int64 AC_TRY_COMPILE(,[__int64 value = (__int64) 0;], tcl_type_64bit=__int64, tcl_type_64bit="long long") # See if we should use long anyway Note that we substitute in the # type that is our current guess for a 64-bit type inside this check # program, so it should be modified only carefully... AC_TRY_COMPILE(,[switch (0) { case 1: case (sizeof(]${tcl_type_64bit}[)==sizeof(long)): ; }],tcl_cv_type_64bit=${tcl_type_64bit})]) if test "${tcl_cv_type_64bit}" = none ; then AC_DEFINE(TCL_WIDE_INT_IS_LONG, 1, [Are wide integers to be implemented with C 'long's?]) AC_MSG_RESULT([using long]) elif test "${tcl_cv_type_64bit}" = "__int64" \ -a "${TEA_PLATFORM}" = "windows" ; then # TEA specific: We actually want to use the default tcl.h checks in # this case to handle both TCL_WIDE_INT_TYPE and TCL_LL_MODIFIER* AC_MSG_RESULT([using Tcl header defaults]) else AC_DEFINE_UNQUOTED(TCL_WIDE_INT_TYPE,${tcl_cv_type_64bit}, [What type should be used to define wide integers?]) AC_MSG_RESULT([${tcl_cv_type_64bit}]) # Now check for auxiliary declarations AC_CACHE_CHECK([for struct dirent64], tcl_cv_struct_dirent64,[ AC_TRY_COMPILE([#include #include ],[struct dirent64 p;], tcl_cv_struct_dirent64=yes,tcl_cv_struct_dirent64=no)]) if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then AC_DEFINE(HAVE_STRUCT_DIRENT64, 1, [Is 'struct dirent64' in ?]) fi AC_CACHE_CHECK([for struct stat64], tcl_cv_struct_stat64,[ AC_TRY_COMPILE([#include ],[struct stat64 p; ], tcl_cv_struct_stat64=yes,tcl_cv_struct_stat64=no)]) if test "x${tcl_cv_struct_stat64}" = "xyes" ; then AC_DEFINE(HAVE_STRUCT_STAT64, 1, [Is 'struct stat64' in ?]) fi AC_CHECK_FUNCS(open64 lseek64) AC_MSG_CHECKING([for off64_t]) AC_CACHE_VAL(tcl_cv_type_off64_t,[ AC_TRY_COMPILE([#include ],[off64_t offset; ], tcl_cv_type_off64_t=yes,tcl_cv_type_off64_t=no)]) dnl Define HAVE_TYPE_OFF64_T only when the off64_t type and the dnl functions lseek64 and open64 are defined. if test "x${tcl_cv_type_off64_t}" = "xyes" && \ test "x${ac_cv_func_lseek64}" = "xyes" && \ test "x${ac_cv_func_open64}" = "xyes" ; then AC_DEFINE(HAVE_TYPE_OFF64_T, 1, [Is off64_t in ?]) AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi fi ]) ## ## Here ends the standard Tcl configuration bits and starts the ## TEA specific functions ## #------------------------------------------------------------------------ # TEA_INIT -- # # Init various Tcl Extension Architecture (TEA) variables. # This should be the first called TEA_* macro. # # Arguments: # none # # Results: # # Defines and substs the following vars: # CYGPATH # EXEEXT # Defines only: # TEA_VERSION # TEA_INITED # TEA_PLATFORM (windows or unix) # # "cygpath" is used on windows to generate native path names for include # files. These variables should only be used with the compiler and linker # since they generate native path names. # # EXEEXT # Select the executable extension based on the host type. This # is a lightweight replacement for AC_EXEEXT that doesn't require # a compiler. #------------------------------------------------------------------------ AC_DEFUN([TEA_INIT], [ # TEA extensions pass this us the version of TEA they think they # are compatible with. TEA_VERSION="3.7" AC_MSG_CHECKING([for correct TEA configuration]) if test x"${PACKAGE_NAME}" = x ; then AC_MSG_ERROR([ The PACKAGE_NAME variable must be defined by your TEA configure.in]) fi if test x"$1" = x ; then AC_MSG_ERROR([ TEA version not specified.]) elif test "$1" != "${TEA_VERSION}" ; then AC_MSG_RESULT([warning: requested TEA version "$1", have "${TEA_VERSION}"]) else AC_MSG_RESULT([ok (TEA ${TEA_VERSION})]) fi case "`uname -s`" in *win32*|*WIN32*|*CYGWIN_NT*|*CYGWIN_9*|*CYGWIN_ME*|*MINGW32_*) AC_CHECK_PROG(CYGPATH, cygpath, cygpath -w, echo) EXEEXT=".exe" TEA_PLATFORM="windows" ;; *) CYGPATH=echo EXEEXT="" TEA_PLATFORM="unix" ;; esac # Check if exec_prefix is set. If not use fall back to prefix. # Note when adjusted, so that TEA_PREFIX can correct for this. # This is needed for recursive configures, since autoconf propagates # $prefix, but not $exec_prefix (doh!). if test x$exec_prefix = xNONE ; then exec_prefix_default=yes exec_prefix=$prefix fi AC_SUBST(EXEEXT) AC_SUBST(CYGPATH) # This package name must be replaced statically for AC_SUBST to work AC_SUBST(PKG_LIB_FILE) # Substitute STUB_LIB_FILE in case package creates a stub library too. AC_SUBST(PKG_STUB_LIB_FILE) # We AC_SUBST these here to ensure they are subst'ed, # in case the user doesn't call TEA_ADD_... AC_SUBST(PKG_STUB_SOURCES) AC_SUBST(PKG_STUB_OBJECTS) AC_SUBST(PKG_TCL_SOURCES) AC_SUBST(PKG_HEADERS) AC_SUBST(PKG_INCLUDES) AC_SUBST(PKG_LIBS) AC_SUBST(PKG_CFLAGS) ]) #------------------------------------------------------------------------ # TEA_ADD_SOURCES -- # # Specify one or more source files. Users should check for # the right platform before adding to their list. # It is not important to specify the directory, as long as it is # in the generic, win or unix subdirectory of $(srcdir). # # Arguments: # one or more file names # # Results: # # Defines and substs the following vars: # PKG_SOURCES # PKG_OBJECTS #------------------------------------------------------------------------ AC_DEFUN([TEA_ADD_SOURCES], [ vars="$@" for i in $vars; do case $i in [\$]*) # allow $-var names PKG_SOURCES="$PKG_SOURCES $i" PKG_OBJECTS="$PKG_OBJECTS $i" ;; *) # check for existence - allows for generic/win/unix VPATH # To add more dirs here (like 'src'), you have to update VPATH # in Makefile.in as well if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \ -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \ ; then AC_MSG_ERROR([could not find source file '$i']) fi PKG_SOURCES="$PKG_SOURCES $i" # this assumes it is in a VPATH dir i=`basename $i` # handle user calling this before or after TEA_SETUP_COMPILER if test x"${OBJEXT}" != x ; then j="`echo $i | sed -e 's/\.[[^.]]*$//'`.${OBJEXT}" else j="`echo $i | sed -e 's/\.[[^.]]*$//'`.\${OBJEXT}" fi PKG_OBJECTS="$PKG_OBJECTS $j" ;; esac done AC_SUBST(PKG_SOURCES) AC_SUBST(PKG_OBJECTS) ]) #------------------------------------------------------------------------ # TEA_ADD_STUB_SOURCES -- # # Specify one or more source files. Users should check for # the right platform before adding to their list. # It is not important to specify the directory, as long as it is # in the generic, win or unix subdirectory of $(srcdir). # # Arguments: # one or more file names # # Results: # # Defines and substs the following vars: # PKG_STUB_SOURCES # PKG_STUB_OBJECTS #------------------------------------------------------------------------ AC_DEFUN([TEA_ADD_STUB_SOURCES], [ vars="$@" for i in $vars; do # check for existence - allows for generic/win/unix VPATH if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \ -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \ ; then AC_MSG_ERROR([could not find stub source file '$i']) fi PKG_STUB_SOURCES="$PKG_STUB_SOURCES $i" # this assumes it is in a VPATH dir i=`basename $i` # handle user calling this before or after TEA_SETUP_COMPILER if test x"${OBJEXT}" != x ; then j="`echo $i | sed -e 's/\.[[^.]]*$//'`.${OBJEXT}" else j="`echo $i | sed -e 's/\.[[^.]]*$//'`.\${OBJEXT}" fi PKG_STUB_OBJECTS="$PKG_STUB_OBJECTS $j" done AC_SUBST(PKG_STUB_SOURCES) AC_SUBST(PKG_STUB_OBJECTS) ]) #------------------------------------------------------------------------ # TEA_ADD_TCL_SOURCES -- # # Specify one or more Tcl source files. These should be platform # independent runtime files. # # Arguments: # one or more file names # # Results: # # Defines and substs the following vars: # PKG_TCL_SOURCES #------------------------------------------------------------------------ AC_DEFUN([TEA_ADD_TCL_SOURCES], [ vars="$@" for i in $vars; do # check for existence, be strict because it is installed if test ! -f "${srcdir}/$i" ; then AC_MSG_ERROR([could not find tcl source file '${srcdir}/$i']) fi PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i" done AC_SUBST(PKG_TCL_SOURCES) ]) #------------------------------------------------------------------------ # TEA_ADD_HEADERS -- # # Specify one or more source headers. Users should check for # the right platform before adding to their list. # # Arguments: # one or more file names # # Results: # # Defines and substs the following vars: # PKG_HEADERS #------------------------------------------------------------------------ AC_DEFUN([TEA_ADD_HEADERS], [ vars="$@" for i in $vars; do # check for existence, be strict because it is installed if test ! -f "${srcdir}/$i" ; then AC_MSG_ERROR([could not find header file '${srcdir}/$i']) fi PKG_HEADERS="$PKG_HEADERS $i" done AC_SUBST(PKG_HEADERS) ]) #------------------------------------------------------------------------ # TEA_ADD_INCLUDES -- # # Specify one or more include dirs. Users should check for # the right platform before adding to their list. # # Arguments: # one or more file names # # Results: # # Defines and substs the following vars: # PKG_INCLUDES #------------------------------------------------------------------------ AC_DEFUN([TEA_ADD_INCLUDES], [ vars="$@" for i in $vars; do PKG_INCLUDES="$PKG_INCLUDES $i" done AC_SUBST(PKG_INCLUDES) ]) #------------------------------------------------------------------------ # TEA_ADD_LIBS -- # # Specify one or more libraries. Users should check for # the right platform before adding to their list. For Windows, # libraries provided in "foo.lib" format will be converted to # "-lfoo" when using GCC (mingw). # # Arguments: # one or more file names # # Results: # # Defines and substs the following vars: # PKG_LIBS #------------------------------------------------------------------------ AC_DEFUN([TEA_ADD_LIBS], [ vars="$@" for i in $vars; do if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then # Convert foo.lib to -lfoo for GCC. No-op if not *.lib i=`echo "$i" | sed -e 's/^\([[^-]].*\)\.lib[$]/-l\1/i'` fi PKG_LIBS="$PKG_LIBS $i" done AC_SUBST(PKG_LIBS) ]) #------------------------------------------------------------------------ # TEA_ADD_CFLAGS -- # # Specify one or more CFLAGS. Users should check for # the right platform before adding to their list. # # Arguments: # one or more file names # # Results: # # Defines and substs the following vars: # PKG_CFLAGS #------------------------------------------------------------------------ AC_DEFUN([TEA_ADD_CFLAGS], [ PKG_CFLAGS="$PKG_CFLAGS $@" AC_SUBST(PKG_CFLAGS) ]) #------------------------------------------------------------------------ # TEA_PREFIX -- # # Handle the --prefix=... option by defaulting to what Tcl gave # # Arguments: # none # # Results: # # If --prefix or --exec-prefix was not specified, $prefix and # $exec_prefix will be set to the values given to Tcl when it was # configured. #------------------------------------------------------------------------ AC_DEFUN([TEA_PREFIX], [ if test "${prefix}" = "NONE"; then prefix_default=yes if test x"${TCL_PREFIX}" != x; then AC_MSG_NOTICE([--prefix defaulting to TCL_PREFIX ${TCL_PREFIX}]) prefix=${TCL_PREFIX} else AC_MSG_NOTICE([--prefix defaulting to /usr/local]) prefix=/usr/local fi fi if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" \ -o x"${exec_prefix_default}" = x"yes" ; then if test x"${TCL_EXEC_PREFIX}" != x; then AC_MSG_NOTICE([--exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}]) exec_prefix=${TCL_EXEC_PREFIX} else AC_MSG_NOTICE([--exec-prefix defaulting to ${prefix}]) exec_prefix=$prefix fi fi ]) #------------------------------------------------------------------------ # TEA_SETUP_COMPILER_CC -- # # Do compiler checks the way we want. This is just a replacement # for AC_PROG_CC in TEA configure.in files to make them cleaner. # # Arguments: # none # # Results: # # Sets up CC var and other standard bits we need to make executables. #------------------------------------------------------------------------ AC_DEFUN([TEA_SETUP_COMPILER_CC], [ # Don't put any macros that use the compiler (e.g. AC_TRY_COMPILE) # in this macro, they need to go into TEA_SETUP_COMPILER instead. # If the user did not set CFLAGS, set it now to keep # the AC_PROG_CC macro from adding "-g -O2". if test "${CFLAGS+set}" != "set" ; then CFLAGS="" fi AC_PROG_CC AC_PROG_CPP AC_PROG_INSTALL #-------------------------------------------------------------------- # Checks to see if the make program sets the $MAKE variable. #-------------------------------------------------------------------- AC_PROG_MAKE_SET #-------------------------------------------------------------------- # Find ranlib #-------------------------------------------------------------------- AC_PROG_RANLIB #-------------------------------------------------------------------- # Determines the correct binary file extension (.o, .obj, .exe etc.) #-------------------------------------------------------------------- AC_OBJEXT AC_EXEEXT ]) #------------------------------------------------------------------------ # TEA_SETUP_COMPILER -- # # Do compiler checks that use the compiler. This must go after # TEA_SETUP_COMPILER_CC, which does the actual compiler check. # # Arguments: # none # # Results: # # Sets up CC var and other standard bits we need to make executables. #------------------------------------------------------------------------ AC_DEFUN([TEA_SETUP_COMPILER], [ # Any macros that use the compiler (e.g. AC_TRY_COMPILE) have to go here. AC_REQUIRE([TEA_SETUP_COMPILER_CC]) #------------------------------------------------------------------------ # If we're using GCC, see if the compiler understands -pipe. If so, use it. # It makes compiling go faster. (This is only a performance feature.) #------------------------------------------------------------------------ if test -z "$no_pipe" -a -n "$GCC"; then AC_CACHE_CHECK([if the compiler understands -pipe], tcl_cv_cc_pipe, [ hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -pipe" AC_TRY_COMPILE(,, tcl_cv_cc_pipe=yes, tcl_cv_cc_pipe=no) CFLAGS=$hold_cflags]) if test $tcl_cv_cc_pipe = yes; then CFLAGS="$CFLAGS -pipe" fi fi #-------------------------------------------------------------------- # Common compiler flag setup #-------------------------------------------------------------------- AC_C_BIGENDIAN if test "${TEA_PLATFORM}" = "unix" ; then TEA_TCL_LINK_LIBS TEA_MISSING_POSIX_HEADERS # Let the user call this, because if it triggers, they will # need a compat/strtod.c that is correct. Users can also # use Tcl_GetDouble(FromObj) instead. #TEA_BUGGY_STRTOD fi ]) #------------------------------------------------------------------------ # TEA_MAKE_LIB -- # # Generate a line that can be used to build a shared/unshared library # in a platform independent manner. # # Arguments: # none # # Requires: # # Results: # # Defines the following vars: # CFLAGS - Done late here to note disturb other AC macros # MAKE_LIB - Command to execute to build the Tcl library; # differs depending on whether or not Tcl is being # compiled as a shared library. # MAKE_SHARED_LIB Makefile rule for building a shared library # MAKE_STATIC_LIB Makefile rule for building a static library # MAKE_STUB_LIB Makefile rule for building a stub library #------------------------------------------------------------------------ AC_DEFUN([TEA_MAKE_LIB], [ if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then MAKE_STATIC_LIB="\${STLIB_LD} -out:\[$]@ \$(PKG_OBJECTS)" MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LD_LIBS} \${LDFLAGS_DEFAULT} -out:\[$]@ \$(PKG_OBJECTS)" MAKE_STUB_LIB="\${STLIB_LD} -out:\[$]@ \$(PKG_STUB_OBJECTS)" else MAKE_STATIC_LIB="\${STLIB_LD} \[$]@ \$(PKG_OBJECTS)" MAKE_SHARED_LIB="\${SHLIB_LD} -o \[$]@ \$(PKG_OBJECTS) \${SHLIB_LD_LIBS}" MAKE_STUB_LIB="\${STLIB_LD} \[$]@ \$(PKG_STUB_OBJECTS)" fi if test "${SHARED_BUILD}" = "1" ; then MAKE_LIB="${MAKE_SHARED_LIB} " else MAKE_LIB="${MAKE_STATIC_LIB} " fi #-------------------------------------------------------------------- # Shared libraries and static libraries have different names. # Use the double eval to make sure any variables in the suffix is # substituted. (@@@ Might not be necessary anymore) #-------------------------------------------------------------------- if test "${TEA_PLATFORM}" = "windows" ; then if test "${SHARED_BUILD}" = "1" ; then # We force the unresolved linking of symbols that are really in # the private libraries of Tcl and Tk. SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\"" if test x"${TK_BIN_DIR}" != x ; then SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\"" fi eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}" else eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}" fi # Some packages build their own stubs libraries eval eval "PKG_STUB_LIB_FILE=${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}" if test "$GCC" = "yes"; then PKG_STUB_LIB_FILE=lib${PKG_STUB_LIB_FILE} fi # These aren't needed on Windows (either MSVC or gcc) RANLIB=: RANLIB_STUB=: else RANLIB_STUB="${RANLIB}" if test "${SHARED_BUILD}" = "1" ; then SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}" if test x"${TK_BIN_DIR}" != x ; then SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}" fi eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${SHARED_LIB_SUFFIX}" RANLIB=: else eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}" fi # Some packages build their own stubs libraries eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}" fi # These are escaped so that only CFLAGS is picked up at configure time. # The other values will be substituted at make time. CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}" if test "${SHARED_BUILD}" = "1" ; then CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}" fi AC_SUBST(MAKE_LIB) AC_SUBST(MAKE_SHARED_LIB) AC_SUBST(MAKE_STATIC_LIB) AC_SUBST(MAKE_STUB_LIB) AC_SUBST(RANLIB_STUB) ]) #------------------------------------------------------------------------ # TEA_LIB_SPEC -- # # Compute the name of an existing object library located in libdir # from the given base name and produce the appropriate linker flags. # # Arguments: # basename The base name of the library without version # numbers, extensions, or "lib" prefixes. # extra_dir Extra directory in which to search for the # library. This location is used first, then # $prefix/$exec-prefix, then some defaults. # # Requires: # TEA_INIT and TEA_PREFIX must be called first. # # Results: # # Defines the following vars: # ${basename}_LIB_NAME The computed library name. # ${basename}_LIB_SPEC The computed linker flags. #------------------------------------------------------------------------ AC_DEFUN([TEA_LIB_SPEC], [ AC_MSG_CHECKING([for $1 library]) # Look in exec-prefix for the library (defined by TEA_PREFIX). tea_lib_name_dir="${exec_prefix}/lib" # Or in a user-specified location. if test x"$2" != x ; then tea_extra_lib_dir=$2 else tea_extra_lib_dir=NONE fi for i in \ `ls -dr ${tea_extra_lib_dir}/$1[[0-9]]*.lib 2>/dev/null ` \ `ls -dr ${tea_extra_lib_dir}/lib$1[[0-9]]* 2>/dev/null ` \ `ls -dr ${tea_lib_name_dir}/$1[[0-9]]*.lib 2>/dev/null ` \ `ls -dr ${tea_lib_name_dir}/lib$1[[0-9]]* 2>/dev/null ` \ `ls -dr /usr/lib/$1[[0-9]]*.lib 2>/dev/null ` \ `ls -dr /usr/lib/lib$1[[0-9]]* 2>/dev/null ` \ `ls -dr /usr/local/lib/$1[[0-9]]*.lib 2>/dev/null ` \ `ls -dr /usr/local/lib/lib$1[[0-9]]* 2>/dev/null ` ; do if test -f "$i" ; then tea_lib_name_dir=`dirname $i` $1_LIB_NAME=`basename $i` $1_LIB_PATH_NAME=$i break fi done if test "${TEA_PLATFORM}" = "windows"; then $1_LIB_SPEC=\"`${CYGPATH} ${$1_LIB_PATH_NAME} 2>/dev/null`\" else # Strip off the leading "lib" and trailing ".a" or ".so" tea_lib_name_lib=`echo ${$1_LIB_NAME}|sed -e 's/^lib//' -e 's/\.[[^.]]*$//' -e 's/\.so.*//'` $1_LIB_SPEC="-L${tea_lib_name_dir} -l${tea_lib_name_lib}" fi if test "x${$1_LIB_NAME}" = x ; then AC_MSG_ERROR([not found]) else AC_MSG_RESULT([${$1_LIB_SPEC}]) fi ]) #------------------------------------------------------------------------ # TEA_PRIVATE_TCL_HEADERS -- # # Locate the private Tcl include files # # Arguments: # # Requires: # TCL_SRC_DIR Assumes that TEA_LOAD_TCLCONFIG has # already been called. # # Results: # # Substs the following vars: # TCL_TOP_DIR_NATIVE # TCL_INCLUDES #------------------------------------------------------------------------ AC_DEFUN([TEA_PRIVATE_TCL_HEADERS], [ # Allow for --with-tclinclude to take effect and define ${ac_cv_c_tclh} AC_REQUIRE([TEA_PUBLIC_TCL_HEADERS]) AC_MSG_CHECKING([for Tcl private include files]) TCL_SRC_DIR_NATIVE=`${CYGPATH} ${TCL_SRC_DIR}` TCL_TOP_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}\" # Check to see if tclPort.h isn't already with the public headers # Don't look for tclInt.h because that resides with tcl.h in the core # sources, but the Port headers are in a different directory if test "${TEA_PLATFORM}" = "windows" -a \ -f "${ac_cv_c_tclh}/tclWinPort.h"; then result="private headers found with public headers" elif test "${TEA_PLATFORM}" = "unix" -a \ -f "${ac_cv_c_tclh}/tclUnixPort.h"; then result="private headers found with public headers" else TCL_GENERIC_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/generic\" if test "${TEA_PLATFORM}" = "windows"; then TCL_PLATFORM_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/win\" else TCL_PLATFORM_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/unix\" fi # Overwrite the previous TCL_INCLUDES as this should capture both # public and private headers in the same set. # We want to ensure these are substituted so as not to require # any *_NATIVE vars be defined in the Makefile TCL_INCLUDES="-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}" if test "`uname -s`" = "Darwin"; then # If Tcl was built as a framework, attempt to use # the framework's Headers and PrivateHeaders directories case ${TCL_DEFS} in *TCL_FRAMEWORK*) if test -d "${TCL_BIN_DIR}/Headers" -a \ -d "${TCL_BIN_DIR}/PrivateHeaders"; then TCL_INCLUDES="-I\"${TCL_BIN_DIR}/Headers\" -I\"${TCL_BIN_DIR}/PrivateHeaders\" ${TCL_INCLUDES}" else TCL_INCLUDES="${TCL_INCLUDES} ${TCL_INCLUDE_SPEC} `echo "${TCL_INCLUDE_SPEC}" | sed -e 's/Headers/PrivateHeaders/'`" fi ;; esac result="Using ${TCL_INCLUDES}" else if test ! -f "${TCL_SRC_DIR}/generic/tclInt.h" ; then AC_MSG_ERROR([Cannot find private header tclInt.h in ${TCL_SRC_DIR}]) fi result="Using srcdir found in tclConfig.sh: ${TCL_SRC_DIR}" fi fi AC_SUBST(TCL_TOP_DIR_NATIVE) AC_SUBST(TCL_INCLUDES) AC_MSG_RESULT([${result}]) ]) #------------------------------------------------------------------------ # TEA_PUBLIC_TCL_HEADERS -- # # Locate the installed public Tcl header files # # Arguments: # None. # # Requires: # CYGPATH must be set # # Results: # # Adds a --with-tclinclude switch to configure. # Result is cached. # # Substs the following vars: # TCL_INCLUDES #------------------------------------------------------------------------ AC_DEFUN([TEA_PUBLIC_TCL_HEADERS], [ AC_MSG_CHECKING([for Tcl public headers]) AC_ARG_WITH(tclinclude, [ --with-tclinclude directory containing the public Tcl header files], with_tclinclude=${withval}) AC_CACHE_VAL(ac_cv_c_tclh, [ # Use the value from --with-tclinclude, if it was given if test x"${with_tclinclude}" != x ; then if test -f "${with_tclinclude}/tcl.h" ; then ac_cv_c_tclh=${with_tclinclude} else AC_MSG_ERROR([${with_tclinclude} directory does not contain tcl.h]) fi else if test "`uname -s`" = "Darwin"; then # If Tcl was built as a framework, attempt to use # the framework's Headers directory case ${TCL_DEFS} in *TCL_FRAMEWORK*) list="`ls -d ${TCL_BIN_DIR}/Headers 2>/dev/null`" ;; esac fi # Look in the source dir only if Tcl is not installed, # and in that situation, look there before installed locations. if test -f "${TCL_BIN_DIR}/Makefile" ; then list="$list `ls -d ${TCL_SRC_DIR}/generic 2>/dev/null`" fi # Check order: pkg --prefix location, Tcl's --prefix location, # relative to directory of tclConfig.sh. eval "temp_includedir=${includedir}" list="$list \ `ls -d ${temp_includedir} 2>/dev/null` \ `ls -d ${TCL_PREFIX}/include 2>/dev/null` \ `ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`" if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then list="$list /usr/local/include /usr/include" if test x"${TCL_INCLUDE_SPEC}" != x ; then d=`echo "${TCL_INCLUDE_SPEC}" | sed -e 's/^-I//'` list="$list `ls -d ${d} 2>/dev/null`" fi fi for i in $list ; do if test -f "$i/tcl.h" ; then ac_cv_c_tclh=$i break fi done fi ]) # Print a message based on how we determined the include path if test x"${ac_cv_c_tclh}" = x ; then AC_MSG_ERROR([tcl.h not found. Please specify its location with --with-tclinclude]) else AC_MSG_RESULT([${ac_cv_c_tclh}]) fi # Convert to a native path and substitute into the output files. INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}` TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\" AC_SUBST(TCL_INCLUDES) ]) #------------------------------------------------------------------------ # TEA_PRIVATE_TK_HEADERS -- # # Locate the private Tk include files # # Arguments: # # Requires: # TK_SRC_DIR Assumes that TEA_LOAD_TKCONFIG has # already been called. # # Results: # # Substs the following vars: # TK_INCLUDES #------------------------------------------------------------------------ AC_DEFUN([TEA_PRIVATE_TK_HEADERS], [ # Allow for --with-tkinclude to take effect and define ${ac_cv_c_tkh} AC_REQUIRE([TEA_PUBLIC_TK_HEADERS]) AC_MSG_CHECKING([for Tk private include files]) TK_SRC_DIR_NATIVE=`${CYGPATH} ${TK_SRC_DIR}` TK_TOP_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}\" # Check to see if tkPort.h isn't already with the public headers # Don't look for tkInt.h because that resides with tk.h in the core # sources, but the Port headers are in a different directory if test "${TEA_PLATFORM}" = "windows" -a \ -f "${ac_cv_c_tkh}/tkWinPort.h"; then result="private headers found with public headers" elif test "${TEA_PLATFORM}" = "unix" -a \ -f "${ac_cv_c_tkh}/tkUnixPort.h"; then result="private headers found with public headers" else TK_GENERIC_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/generic\" TK_XLIB_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/xlib\" if test "${TEA_PLATFORM}" = "windows"; then TK_PLATFORM_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/win\" else TK_PLATFORM_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/unix\" fi # Overwrite the previous TK_INCLUDES as this should capture both # public and private headers in the same set. # We want to ensure these are substituted so as not to require # any *_NATIVE vars be defined in the Makefile TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE}" # Detect and add ttk subdir if test -d "${TK_SRC_DIR}/generic/ttk"; then TK_INCLUDES="${TK_INCLUDES} -I\"${TK_SRC_DIR_NATIVE}/generic/ttk\"" fi if test "${TEA_WINDOWINGSYSTEM}" != "x11"; then TK_INCLUDES="${TK_INCLUDES} -I${TK_XLIB_DIR_NATIVE}" fi if test "${TEA_WINDOWINGSYSTEM}" = "aqua"; then TK_INCLUDES="${TK_INCLUDES} -I\"${TK_SRC_DIR_NATIVE}/macosx\"" fi if test "`uname -s`" = "Darwin"; then # If Tk was built as a framework, attempt to use # the framework's Headers and PrivateHeaders directories case ${TK_DEFS} in *TK_FRAMEWORK*) if test -d "${TK_BIN_DIR}/Headers" -a \ -d "${TK_BIN_DIR}/PrivateHeaders"; then TK_INCLUDES="-I\"${TK_BIN_DIR}/Headers\" -I\"${TK_BIN_DIR}/PrivateHeaders\" ${TK_INCLUDES}" else TK_INCLUDES="${TK_INCLUDES} ${TK_INCLUDE_SPEC} `echo "${TK_INCLUDE_SPEC}" | sed -e 's/Headers/PrivateHeaders/'`" fi ;; esac result="Using ${TK_INCLUDES}" else if test ! -f "${TK_SRC_DIR}/generic/tkInt.h" ; then AC_MSG_ERROR([Cannot find private header tkInt.h in ${TK_SRC_DIR}]) fi result="Using srcdir found in tkConfig.sh: ${TK_SRC_DIR}" fi fi AC_SUBST(TK_TOP_DIR_NATIVE) AC_SUBST(TK_XLIB_DIR_NATIVE) AC_SUBST(TK_INCLUDES) AC_MSG_RESULT([${result}]) ]) #------------------------------------------------------------------------ # TEA_PUBLIC_TK_HEADERS -- # # Locate the installed public Tk header files # # Arguments: # None. # # Requires: # CYGPATH must be set # # Results: # # Adds a --with-tkinclude switch to configure. # Result is cached. # # Substs the following vars: # TK_INCLUDES #------------------------------------------------------------------------ AC_DEFUN([TEA_PUBLIC_TK_HEADERS], [ AC_MSG_CHECKING([for Tk public headers]) AC_ARG_WITH(tkinclude, [ --with-tkinclude directory containing the public Tk header files], with_tkinclude=${withval}) AC_CACHE_VAL(ac_cv_c_tkh, [ # Use the value from --with-tkinclude, if it was given if test x"${with_tkinclude}" != x ; then if test -f "${with_tkinclude}/tk.h" ; then ac_cv_c_tkh=${with_tkinclude} else AC_MSG_ERROR([${with_tkinclude} directory does not contain tk.h]) fi else if test "`uname -s`" = "Darwin"; then # If Tk was built as a framework, attempt to use # the framework's Headers directory. case ${TK_DEFS} in *TK_FRAMEWORK*) list="`ls -d ${TK_BIN_DIR}/Headers 2>/dev/null`" ;; esac fi # Look in the source dir only if Tk is not installed, # and in that situation, look there before installed locations. if test -f "${TK_BIN_DIR}/Makefile" ; then list="$list `ls -d ${TK_SRC_DIR}/generic 2>/dev/null`" fi # Check order: pkg --prefix location, Tk's --prefix location, # relative to directory of tkConfig.sh, Tcl's --prefix location, # relative to directory of tclConfig.sh. eval "temp_includedir=${includedir}" list="$list \ `ls -d ${temp_includedir} 2>/dev/null` \ `ls -d ${TK_PREFIX}/include 2>/dev/null` \ `ls -d ${TK_BIN_DIR}/../include 2>/dev/null` \ `ls -d ${TCL_PREFIX}/include 2>/dev/null` \ `ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`" if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then list="$list /usr/local/include /usr/include" fi for i in $list ; do if test -f "$i/tk.h" ; then ac_cv_c_tkh=$i break fi done fi ]) # Print a message based on how we determined the include path if test x"${ac_cv_c_tkh}" = x ; then AC_MSG_ERROR([tk.h not found. Please specify its location with --with-tkinclude]) else AC_MSG_RESULT([${ac_cv_c_tkh}]) fi # Convert to a native path and substitute into the output files. INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tkh}` TK_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\" AC_SUBST(TK_INCLUDES) if test "${TEA_WINDOWINGSYSTEM}" != "x11"; then # On Windows and Aqua, we need the X compat headers AC_MSG_CHECKING([for X11 header files]) if test ! -r "${INCLUDE_DIR_NATIVE}/X11/Xlib.h"; then INCLUDE_DIR_NATIVE="`${CYGPATH} ${TK_SRC_DIR}/xlib`" TK_XINCLUDES=-I\"${INCLUDE_DIR_NATIVE}\" AC_SUBST(TK_XINCLUDES) fi AC_MSG_RESULT([${INCLUDE_DIR_NATIVE}]) fi ]) #------------------------------------------------------------------------ # TEA_PATH_CONFIG -- # # Locate the ${1}Config.sh file and perform a sanity check on # the ${1} compile flags. These are used by packages like # [incr Tk] that load *Config.sh files from more than Tcl and Tk. # # Arguments: # none # # Results: # # Adds the following arguments to configure: # --with-$1=... # # Defines the following vars: # $1_BIN_DIR Full path to the directory containing # the $1Config.sh file #------------------------------------------------------------------------ AC_DEFUN([TEA_PATH_CONFIG], [ # # Ok, lets find the $1 configuration # First, look for one uninstalled. # the alternative search directory is invoked by --with-$1 # if test x"${no_$1}" = x ; then # we reset no_$1 in case something fails here no_$1=true AC_ARG_WITH($1, [ --with-$1 directory containing $1 configuration ($1Config.sh)], with_$1config=${withval}) AC_MSG_CHECKING([for $1 configuration]) AC_CACHE_VAL(ac_cv_c_$1config,[ # First check to see if --with-$1 was specified. if test x"${with_$1config}" != x ; then case ${with_$1config} in */$1Config.sh ) if test -f ${with_$1config}; then AC_MSG_WARN([--with-$1 argument should refer to directory containing $1Config.sh, not to $1Config.sh itself]) with_$1config=`echo ${with_$1config} | sed 's!/$1Config\.sh$!!'` fi;; esac if test -f "${with_$1config}/$1Config.sh" ; then ac_cv_c_$1config=`(cd ${with_$1config}; pwd)` else AC_MSG_ERROR([${with_$1config} directory doesn't contain $1Config.sh]) fi fi # then check for a private $1 installation if test x"${ac_cv_c_$1config}" = x ; then for i in \ ../$1 \ `ls -dr ../$1*[[0-9]].[[0-9]]*.[[0-9]]* 2>/dev/null` \ `ls -dr ../$1*[[0-9]].[[0-9]][[0-9]] 2>/dev/null` \ `ls -dr ../$1*[[0-9]].[[0-9]] 2>/dev/null` \ `ls -dr ../$1*[[0-9]].[[0-9]]* 2>/dev/null` \ ../../$1 \ `ls -dr ../../$1*[[0-9]].[[0-9]]*.[[0-9]]* 2>/dev/null` \ `ls -dr ../../$1*[[0-9]].[[0-9]][[0-9]] 2>/dev/null` \ `ls -dr ../../$1*[[0-9]].[[0-9]] 2>/dev/null` \ `ls -dr ../../$1*[[0-9]].[[0-9]]* 2>/dev/null` \ ../../../$1 \ `ls -dr ../../../$1*[[0-9]].[[0-9]]*.[[0-9]]* 2>/dev/null` \ `ls -dr ../../../$1*[[0-9]].[[0-9]][[0-9]] 2>/dev/null` \ `ls -dr ../../../$1*[[0-9]].[[0-9]] 2>/dev/null` \ `ls -dr ../../../$1*[[0-9]].[[0-9]]* 2>/dev/null` \ ${srcdir}/../$1 \ `ls -dr ${srcdir}/../$1*[[0-9]].[[0-9]]*.[[0-9]]* 2>/dev/null` \ `ls -dr ${srcdir}/../$1*[[0-9]].[[0-9]][[0-9]] 2>/dev/null` \ `ls -dr ${srcdir}/../$1*[[0-9]].[[0-9]] 2>/dev/null` \ `ls -dr ${srcdir}/../$1*[[0-9]].[[0-9]]* 2>/dev/null` \ ; do if test -f "$i/$1Config.sh" ; then ac_cv_c_$1config=`(cd $i; pwd)` break fi if test -f "$i/unix/$1Config.sh" ; then ac_cv_c_$1config=`(cd $i/unix; pwd)` break fi done fi # check in a few common install locations if test x"${ac_cv_c_$1config}" = x ; then for i in `ls -d ${libdir} 2>/dev/null` \ `ls -d ${exec_prefix}/lib 2>/dev/null` \ `ls -d ${prefix}/lib 2>/dev/null` \ `ls -d /usr/local/lib 2>/dev/null` \ `ls -d /usr/contrib/lib 2>/dev/null` \ `ls -d /usr/lib 2>/dev/null` \ ; do if test -f "$i/$1Config.sh" ; then ac_cv_c_$1config=`(cd $i; pwd)` break fi done fi ]) if test x"${ac_cv_c_$1config}" = x ; then $1_BIN_DIR="# no $1 configs found" AC_MSG_WARN([Cannot find $1 configuration definitions]) exit 0 else no_$1= $1_BIN_DIR=${ac_cv_c_$1config} AC_MSG_RESULT([found $$1_BIN_DIR/$1Config.sh]) fi fi ]) #------------------------------------------------------------------------ # TEA_LOAD_CONFIG -- # # Load the $1Config.sh file # # Arguments: # # Requires the following vars to be set: # $1_BIN_DIR # # Results: # # Subst the following vars: # $1_SRC_DIR # $1_LIB_FILE # $1_LIB_SPEC # #------------------------------------------------------------------------ AC_DEFUN([TEA_LOAD_CONFIG], [ AC_MSG_CHECKING([for existence of ${$1_BIN_DIR}/$1Config.sh]) if test -f "${$1_BIN_DIR}/$1Config.sh" ; then AC_MSG_RESULT([loading]) . "${$1_BIN_DIR}/$1Config.sh" else AC_MSG_RESULT([file not found]) fi # # If the $1_BIN_DIR is the build directory (not the install directory), # then set the common variable name to the value of the build variables. # For example, the variable $1_LIB_SPEC will be set to the value # of $1_BUILD_LIB_SPEC. An extension should make use of $1_LIB_SPEC # instead of $1_BUILD_LIB_SPEC since it will work with both an # installed and uninstalled version of Tcl. # if test -f "${$1_BIN_DIR}/Makefile" ; then AC_MSG_WARN([Found Makefile - using build library specs for $1]) $1_LIB_SPEC=${$1_BUILD_LIB_SPEC} $1_STUB_LIB_SPEC=${$1_BUILD_STUB_LIB_SPEC} $1_STUB_LIB_PATH=${$1_BUILD_STUB_LIB_PATH} fi AC_SUBST($1_VERSION) AC_SUBST($1_BIN_DIR) AC_SUBST($1_SRC_DIR) AC_SUBST($1_LIB_FILE) AC_SUBST($1_LIB_SPEC) AC_SUBST($1_STUB_LIB_FILE) AC_SUBST($1_STUB_LIB_SPEC) AC_SUBST($1_STUB_LIB_PATH) ]) #------------------------------------------------------------------------ # TEA_PATH_CELIB -- # # Locate Keuchel's celib emulation layer for targeting Win/CE # # Arguments: # none # # Results: # # Adds the following arguments to configure: # --with-celib=... # # Defines the following vars: # CELIB_DIR Full path to the directory containing # the include and platform lib files #------------------------------------------------------------------------ AC_DEFUN([TEA_PATH_CELIB], [ # First, look for one uninstalled. # the alternative search directory is invoked by --with-celib if test x"${no_celib}" = x ; then # we reset no_celib in case something fails here no_celib=true AC_ARG_WITH(celib,[ --with-celib=DIR use Windows/CE support library from DIR], with_celibconfig=${withval}) AC_MSG_CHECKING([for Windows/CE celib directory]) AC_CACHE_VAL(ac_cv_c_celibconfig,[ # First check to see if --with-celibconfig was specified. if test x"${with_celibconfig}" != x ; then if test -d "${with_celibconfig}/inc" ; then ac_cv_c_celibconfig=`(cd ${with_celibconfig}; pwd)` else AC_MSG_ERROR([${with_celibconfig} directory doesn't contain inc directory]) fi fi # then check for a celib library if test x"${ac_cv_c_celibconfig}" = x ; then for i in \ ../celib-palm-3.0 \ ../celib \ ../../celib-palm-3.0 \ ../../celib \ `ls -dr ../celib-*3.[[0-9]]* 2>/dev/null` \ ${srcdir}/../celib-palm-3.0 \ ${srcdir}/../celib \ `ls -dr ${srcdir}/../celib-*3.[[0-9]]* 2>/dev/null` \ ; do if test -d "$i/inc" ; then ac_cv_c_celibconfig=`(cd $i; pwd)` break fi done fi ]) if test x"${ac_cv_c_celibconfig}" = x ; then AC_MSG_ERROR([Cannot find celib support library directory]) else no_celib= CELIB_DIR=${ac_cv_c_celibconfig} CELIB_DIR=`echo "$CELIB_DIR" | sed -e 's!\\\!/!g'` AC_MSG_RESULT([found $CELIB_DIR]) fi fi ]) # Local Variables: # mode: autoconf # End: netgen-6.2.1804/ng/Togl2.1/tclconfig/install-sh0000755000175000017500000000421213272137567017512 0ustar kurtkurt#!/bin/sh # # install - install a program, script, or datafile # This comes from X11R5; it is not part of GNU. # # $XConsortium: install.sh,v 1.2 89/12/18 14:47:22 jim Exp $ # # This script is compatible with the BSD install script, but was written # from scratch. # # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" instcmd="$mvprog" chmodcmd="" chowncmd="" chgrpcmd="" stripcmd="" rmcmd="$rmprog -f" mvcmd="$mvprog" src="" dst="" while [ x"$1" != x ]; do case $1 in -c) instcmd="$cpprog" shift continue;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; -s) stripcmd="$stripprog" shift continue;; *) if [ x"$src" = x ] then src=$1 else dst=$1 fi shift continue;; esac done if [ x"$src" = x ] then echo "install: no input file specified" exit 1 fi if [ x"$dst" = x ] then echo "install: no destination specified" exit 1 fi # If destination is a directory, append the input filename; if your system # does not like double slashes in filenames, you may need to add some logic if [ -d $dst ] then dst="$dst"/`basename $src` fi # Make a temp file name in the proper directory. dstdir=`dirname $dst` dsttmp=$dstdir/#inst.$$# # Move or copy the file name to the temp name $doit $instcmd $src $dsttmp # and set any options; do chmod last to preserve setuid bits if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; fi if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; fi if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; fi if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; fi # Now rename the file to the real destination. $doit $rmcmd $dst $doit $mvcmd $dsttmp $dst exit 0 netgen-6.2.1804/ng/Togl2.1/togl_ws.h.in0000644000175000017500000000020213272137567015765 0ustar kurtkurt#ifndef TOGL_WS_H # define TOGL_WS_H /* define windowing system togl is compiled with */ # define @TOGL_WINDOWINGSYSTEM@ #endif netgen-6.2.1804/ng/Togl2.1/toglNSOpenGL.c0000644000175000017500000001573413272137567016170 0ustar kurtkurt/* $Id: toglNSOpenGL.c,v 1.7 2009/10/22 00:06:41 gregcouch Exp $ */ /* vi:set sw=4 expandtab: */ /* * Togl - a Tk OpenGL widget * * Copyright (C) 1996-2002 Brian Paul and Ben Bederson * Copyright (C) 2005-2009 Greg Couch * See the LICENSE file for copyright details. */ static NSOpenGLPixelFormat * togl_pixelFormat(Togl *togl) { NSOpenGLPixelFormatAttribute attribs[32]; int na = 0; NSOpenGLPixelFormat *pix; #if 0 if (togl->MultisampleFlag && !hasMultisampling) { Tcl_SetResult(togl->Interp, TCL_STUPID "multisampling not supported", TCL_STATIC); return NULL; } #endif if (togl->PbufferFlag && !togl->RgbaFlag) { Tcl_SetResult(togl->Interp, TCL_STUPID "puffer must be RGB[A]", TCL_STATIC); return NULL; } attribs[na++] = NSOpenGLPFAMinimumPolicy; /* ask for hardware-accelerated onscreen */ attribs[na++] = NSOpenGLPFAAccelerated; attribs[na++] = NSOpenGLPFANoRecovery; if (togl->RgbaFlag) { /* RGB[A] mode */ attribs[na++] = NSOpenGLPFAColorSize; attribs[na++] = togl->RgbaRed + togl->RgbaGreen + togl->RgbaBlue; /* NSOpenGL does not take separate red,green,blue sizes. */ if (togl->AlphaFlag) { attribs[na++] = NSOpenGLPFAAlphaSize; attribs[na++] = togl->AlphaSize; } } else { /* Color index mode */ Tcl_SetResult(togl->Interp, TCL_STUPID "Color index mode not supported", TCL_STATIC); return NULL; } if (togl->DepthFlag) { attribs[na++] = NSOpenGLPFADepthSize; attribs[na++] = togl->DepthSize; } if (togl->DoubleFlag) { attribs[na++] = NSOpenGLPFADoubleBuffer; } if (togl->StencilFlag) { attribs[na++] = NSOpenGLPFAStencilSize; attribs[na++] = togl->StencilSize; } if (togl->AccumFlag) { attribs[na++] = NSOpenGLPFAAccumSize; attribs[na++] = togl->AccumRed + togl->AccumGreen + togl->AccumBlue + (togl->AlphaFlag ? togl->AccumAlpha : 0); } if (togl->MultisampleFlag) { attribs[na++] = NSOpenGLPFAMultisample; attribs[na++] = NSOpenGLPFASampleBuffers; attribs[na++] = 1; attribs[na++] = NSOpenGLPFASamples; attribs[na++] = 2; } if (togl->AuxNumber != 0) { attribs[na++] = NSOpenGLPFAAuxBuffers; attribs[na++] = togl->AuxNumber; } if (togl->Stereo == TOGL_STEREO_NATIVE) { attribs[na++] = NSOpenGLPFAStereo; } if (togl->FullscreenFlag) { attribs[na++] = NSOpenGLPFAFullScreen; } attribs[na++] = 0; /* End of attributes. */ pix = [[NSOpenGLPixelFormat alloc] initWithAttributes:attribs]; if (pix == nil) { Tcl_SetResult(togl->Interp, TCL_STUPID "couldn't choose pixel format", TCL_STATIC); return NULL; } return pix; } static int togl_describePixelFormat(Togl *togl) { NSOpenGLPixelFormat *pfmt = togl->PixelFormat; /* fill in RgbaFlag, DoubleFlag, and Stereo */ GLint has_rgba, has_doublebuf, has_depth, has_accum, has_alpha, has_stencil, has_stereo, has_multisample; GLint vscr = 0; [pfmt getValues:&has_rgba forAttribute:NSOpenGLPFAColorSize forVirtualScreen:vscr]; [pfmt getValues:&has_doublebuf forAttribute:NSOpenGLPFADoubleBuffer forVirtualScreen:vscr]; [pfmt getValues:&has_depth forAttribute:NSOpenGLPFADepthSize forVirtualScreen:vscr]; [pfmt getValues:&has_accum forAttribute:NSOpenGLPFAAccumSize forVirtualScreen:vscr]; [pfmt getValues:&has_alpha forAttribute:NSOpenGLPFAAlphaSize forVirtualScreen:vscr]; [pfmt getValues:&has_stencil forAttribute:NSOpenGLPFAStencilSize forVirtualScreen:vscr]; [pfmt getValues:&has_stereo forAttribute:NSOpenGLPFAStereo forVirtualScreen:vscr]; [pfmt getValues:&has_multisample forAttribute:NSOpenGLPFASampleBuffers forVirtualScreen:vscr]; togl->RgbaFlag = (has_rgba != 0); togl->DoubleFlag = (has_doublebuf != 0); togl->DepthFlag = (has_depth != 0); togl->AccumFlag = (has_accum != 0); togl->AlphaFlag = (has_alpha != 0); togl->StencilFlag = (has_stencil != 0); togl->Stereo = (has_stereo ? TOGL_STEREO_NATIVE : TOGL_STEREO_NONE); togl->MultisampleFlag = (has_multisample != 0); return True; } #define isPow2(x) (((x) & ((x) - 1)) == 0) static NSOpenGLPixelBuffer * togl_createPbuffer(Togl *togl) { GLint min_size[2], max_size[2]; Bool hasPbuffer; const char *extensions; GLint target; GLint virtualScreen; NSOpenGLPixelBuffer *pbuf; extensions = (const char *) glGetString(GL_EXTENSIONS); hasPbuffer = (strstr(extensions, "GL_APPLE_pixel_buffer") != NULL); if (!hasPbuffer) { Tcl_SetResult(togl->Interp, TCL_STUPID "pbuffers are not supported", TCL_STATIC); return NULL; } glGetIntegerv(GL_MIN_PBUFFER_VIEWPORT_DIMS_APPLE, min_size); glGetIntegerv(GL_MAX_VIEWPORT_DIMS, max_size); virtualScreen = [togl->Ctx currentVirtualScreen]; for (;;) { /* make sure we don't exceed the maximum size because if we do, * NSOpenGLPixelBuffer allocationmay succeed and later uses of * the pbuffer fail */ if (togl->Width < min_size[0]) togl->Width = min_size[0]; else if (togl->Width > max_size[0]) { if (togl->LargestPbufferFlag) togl->Width = max_size[0]; else { Tcl_SetResult(togl->Interp, TCL_STUPID "pbuffer too large", TCL_STATIC); return NULL; } } if (togl->Height < min_size[1]) togl->Height = min_size[1]; else if (togl->Height > max_size[1]) { if (togl->LargestPbufferFlag) togl->Height = max_size[1]; else { Tcl_SetResult(togl->Interp, TCL_STUPID "pbuffer too large", TCL_STATIC); return NULL; } } if (isPow2(togl->Width) && isPow2(togl->Height)) target = GL_TEXTURE_2D; else target = GL_TEXTURE_RECTANGLE_ARB; pbuf = [[NSOpenGLPixelBuffer alloc] initWithTextureTarget:target textureInternalFormat:(togl->AlphaFlag ? GL_RGBA : GL_RGB) textureMaxMipMapLevel:0 pixelsWide:togl->Width pixelsHigh:togl->Height]; if (pbuf != nil) { /* setPixelBuffer allocates the framebuffer space */ [togl->Ctx setPixelBuffer:pbuf cubeMapFace:0 mipMapLevel:0 currentVirtualScreen:virtualScreen]; return pbuf; } if (!togl->LargestPbufferFlag || togl->Width == min_size[0] || togl->Height == min_size[1]) { Tcl_SetResult(togl->Interp, TCL_STUPID "unable to create pbuffer", TCL_STATIC); return NULL; } /* largest unavailable, try something smaller */ togl->Width = togl->Width / 2 + togl->Width % 2; togl->Height = togl->Width / 2 + togl->Height % 2; } } static void togl_destroyPbuffer(Togl *togl) { [togl->pbuf release]; }netgen-6.2.1804/ng/Togl2.1/gl/0000755000175000017500000000000013272137567014141 5ustar kurtkurtnetgen-6.2.1804/ng/Togl2.1/gl/glxext.h0000644000175000017500000010253613272137567015634 0ustar kurtkurt#ifndef __glxext_h_ #define __glxext_h_ #ifdef __cplusplus extern "C" { #endif /* ** Copyright (c) 2007 The Khronos Group Inc. ** ** Permission is hereby granted, free of charge, to any person obtaining a ** copy of this software and/or associated documentation files (the ** "Materials"), to deal in the Materials without restriction, including ** without limitation the rights to use, copy, modify, merge, publish, ** distribute, sublicense, and/or sell copies of the Materials, and to ** permit persons to whom the Materials are furnished to do so, subject to ** the following conditions: ** ** The above copyright notice and this permission notice shall be included ** in all copies or substantial portions of the Materials. ** ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE ** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. */ #if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) #define WIN32_LEAN_AND_MEAN 1 #include #endif #ifndef APIENTRY #define APIENTRY #endif #ifndef APIENTRYP #define APIENTRYP APIENTRY * #endif #ifndef GLAPI #define GLAPI extern #endif /*************************************************************/ /* Header file version number, required by OpenGL ABI for Linux */ /* glxext.h last updated 2008/10/22 */ /* Current version at http://www.opengl.org/registry/ */ #define GLX_GLXEXT_VERSION 21 #ifndef GLX_VERSION_1_3 #define GLX_WINDOW_BIT 0x00000001 #define GLX_PIXMAP_BIT 0x00000002 #define GLX_PBUFFER_BIT 0x00000004 #define GLX_RGBA_BIT 0x00000001 #define GLX_COLOR_INDEX_BIT 0x00000002 #define GLX_PBUFFER_CLOBBER_MASK 0x08000000 #define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001 #define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002 #define GLX_BACK_LEFT_BUFFER_BIT 0x00000004 #define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008 #define GLX_AUX_BUFFERS_BIT 0x00000010 #define GLX_DEPTH_BUFFER_BIT 0x00000020 #define GLX_STENCIL_BUFFER_BIT 0x00000040 #define GLX_ACCUM_BUFFER_BIT 0x00000080 #define GLX_CONFIG_CAVEAT 0x20 #define GLX_X_VISUAL_TYPE 0x22 #define GLX_TRANSPARENT_TYPE 0x23 #define GLX_TRANSPARENT_INDEX_VALUE 0x24 #define GLX_TRANSPARENT_RED_VALUE 0x25 #define GLX_TRANSPARENT_GREEN_VALUE 0x26 #define GLX_TRANSPARENT_BLUE_VALUE 0x27 #define GLX_TRANSPARENT_ALPHA_VALUE 0x28 #define GLX_DONT_CARE 0xFFFFFFFF #define GLX_NONE 0x8000 #define GLX_SLOW_CONFIG 0x8001 #define GLX_TRUE_COLOR 0x8002 #define GLX_DIRECT_COLOR 0x8003 #define GLX_PSEUDO_COLOR 0x8004 #define GLX_STATIC_COLOR 0x8005 #define GLX_GRAY_SCALE 0x8006 #define GLX_STATIC_GRAY 0x8007 #define GLX_TRANSPARENT_RGB 0x8008 #define GLX_TRANSPARENT_INDEX 0x8009 #define GLX_VISUAL_ID 0x800B #define GLX_SCREEN 0x800C #define GLX_NON_CONFORMANT_CONFIG 0x800D #define GLX_DRAWABLE_TYPE 0x8010 #define GLX_RENDER_TYPE 0x8011 #define GLX_X_RENDERABLE 0x8012 #define GLX_FBCONFIG_ID 0x8013 #define GLX_RGBA_TYPE 0x8014 #define GLX_COLOR_INDEX_TYPE 0x8015 #define GLX_MAX_PBUFFER_WIDTH 0x8016 #define GLX_MAX_PBUFFER_HEIGHT 0x8017 #define GLX_MAX_PBUFFER_PIXELS 0x8018 #define GLX_PRESERVED_CONTENTS 0x801B #define GLX_LARGEST_PBUFFER 0x801C #define GLX_WIDTH 0x801D #define GLX_HEIGHT 0x801E #define GLX_EVENT_MASK 0x801F #define GLX_DAMAGED 0x8020 #define GLX_SAVED 0x8021 #define GLX_WINDOW 0x8022 #define GLX_PBUFFER 0x8023 #define GLX_PBUFFER_HEIGHT 0x8040 #define GLX_PBUFFER_WIDTH 0x8041 #endif #ifndef GLX_VERSION_1_4 #define GLX_SAMPLE_BUFFERS 100000 #define GLX_SAMPLES 100001 #endif #ifndef GLX_ARB_get_proc_address #endif #ifndef GLX_ARB_multisample #define GLX_SAMPLE_BUFFERS_ARB 100000 #define GLX_SAMPLES_ARB 100001 #endif #ifndef GLX_ARB_fbconfig_float #define GLX_RGBA_FLOAT_TYPE_ARB 0x20B9 #define GLX_RGBA_FLOAT_BIT_ARB 0x00000004 #endif #ifndef GLX_ARB_create_context #define GLX_CONTEXT_DEBUG_BIT_ARB 0x00000001 #define GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x00000002 #define GLX_CONTEXT_MAJOR_VERSION_ARB 0x2091 #define GLX_CONTEXT_MINOR_VERSION_ARB 0x2092 #define GLX_CONTEXT_FLAGS_ARB 0x2094 #endif #ifndef GLX_SGIS_multisample #define GLX_SAMPLE_BUFFERS_SGIS 100000 #define GLX_SAMPLES_SGIS 100001 #endif #ifndef GLX_EXT_visual_info #define GLX_X_VISUAL_TYPE_EXT 0x22 #define GLX_TRANSPARENT_TYPE_EXT 0x23 #define GLX_TRANSPARENT_INDEX_VALUE_EXT 0x24 #define GLX_TRANSPARENT_RED_VALUE_EXT 0x25 #define GLX_TRANSPARENT_GREEN_VALUE_EXT 0x26 #define GLX_TRANSPARENT_BLUE_VALUE_EXT 0x27 #define GLX_TRANSPARENT_ALPHA_VALUE_EXT 0x28 #define GLX_NONE_EXT 0x8000 #define GLX_TRUE_COLOR_EXT 0x8002 #define GLX_DIRECT_COLOR_EXT 0x8003 #define GLX_PSEUDO_COLOR_EXT 0x8004 #define GLX_STATIC_COLOR_EXT 0x8005 #define GLX_GRAY_SCALE_EXT 0x8006 #define GLX_STATIC_GRAY_EXT 0x8007 #define GLX_TRANSPARENT_RGB_EXT 0x8008 #define GLX_TRANSPARENT_INDEX_EXT 0x8009 #endif #ifndef GLX_SGI_swap_control #endif #ifndef GLX_SGI_video_sync #endif #ifndef GLX_SGI_make_current_read #endif #ifndef GLX_SGIX_video_source #endif #ifndef GLX_EXT_visual_rating #define GLX_VISUAL_CAVEAT_EXT 0x20 #define GLX_SLOW_VISUAL_EXT 0x8001 #define GLX_NON_CONFORMANT_VISUAL_EXT 0x800D /* reuse GLX_NONE_EXT */ #endif #ifndef GLX_EXT_import_context #define GLX_SHARE_CONTEXT_EXT 0x800A #define GLX_VISUAL_ID_EXT 0x800B #define GLX_SCREEN_EXT 0x800C #endif #ifndef GLX_SGIX_fbconfig #define GLX_WINDOW_BIT_SGIX 0x00000001 #define GLX_PIXMAP_BIT_SGIX 0x00000002 #define GLX_RGBA_BIT_SGIX 0x00000001 #define GLX_COLOR_INDEX_BIT_SGIX 0x00000002 #define GLX_DRAWABLE_TYPE_SGIX 0x8010 #define GLX_RENDER_TYPE_SGIX 0x8011 #define GLX_X_RENDERABLE_SGIX 0x8012 #define GLX_FBCONFIG_ID_SGIX 0x8013 #define GLX_RGBA_TYPE_SGIX 0x8014 #define GLX_COLOR_INDEX_TYPE_SGIX 0x8015 /* reuse GLX_SCREEN_EXT */ #endif #ifndef GLX_SGIX_pbuffer #define GLX_PBUFFER_BIT_SGIX 0x00000004 #define GLX_BUFFER_CLOBBER_MASK_SGIX 0x08000000 #define GLX_FRONT_LEFT_BUFFER_BIT_SGIX 0x00000001 #define GLX_FRONT_RIGHT_BUFFER_BIT_SGIX 0x00000002 #define GLX_BACK_LEFT_BUFFER_BIT_SGIX 0x00000004 #define GLX_BACK_RIGHT_BUFFER_BIT_SGIX 0x00000008 #define GLX_AUX_BUFFERS_BIT_SGIX 0x00000010 #define GLX_DEPTH_BUFFER_BIT_SGIX 0x00000020 #define GLX_STENCIL_BUFFER_BIT_SGIX 0x00000040 #define GLX_ACCUM_BUFFER_BIT_SGIX 0x00000080 #define GLX_SAMPLE_BUFFERS_BIT_SGIX 0x00000100 #define GLX_MAX_PBUFFER_WIDTH_SGIX 0x8016 #define GLX_MAX_PBUFFER_HEIGHT_SGIX 0x8017 #define GLX_MAX_PBUFFER_PIXELS_SGIX 0x8018 #define GLX_OPTIMAL_PBUFFER_WIDTH_SGIX 0x8019 #define GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX 0x801A #define GLX_PRESERVED_CONTENTS_SGIX 0x801B #define GLX_LARGEST_PBUFFER_SGIX 0x801C #define GLX_WIDTH_SGIX 0x801D #define GLX_HEIGHT_SGIX 0x801E #define GLX_EVENT_MASK_SGIX 0x801F #define GLX_DAMAGED_SGIX 0x8020 #define GLX_SAVED_SGIX 0x8021 #define GLX_WINDOW_SGIX 0x8022 #define GLX_PBUFFER_SGIX 0x8023 #endif #ifndef GLX_SGI_cushion #endif #ifndef GLX_SGIX_video_resize #define GLX_SYNC_FRAME_SGIX 0x00000000 #define GLX_SYNC_SWAP_SGIX 0x00000001 #endif #ifndef GLX_SGIX_dmbuffer #define GLX_DIGITAL_MEDIA_PBUFFER_SGIX 0x8024 #endif #ifndef GLX_SGIX_swap_group #endif #ifndef GLX_SGIX_swap_barrier #endif #ifndef GLX_SGIS_blended_overlay #define GLX_BLENDED_RGBA_SGIS 0x8025 #endif #ifndef GLX_SGIS_shared_multisample #define GLX_MULTISAMPLE_SUB_RECT_WIDTH_SGIS 0x8026 #define GLX_MULTISAMPLE_SUB_RECT_HEIGHT_SGIS 0x8027 #endif #ifndef GLX_SUN_get_transparent_index #endif #ifndef GLX_3DFX_multisample #define GLX_SAMPLE_BUFFERS_3DFX 0x8050 #define GLX_SAMPLES_3DFX 0x8051 #endif #ifndef GLX_MESA_copy_sub_buffer #endif #ifndef GLX_MESA_pixmap_colormap #endif #ifndef GLX_MESA_release_buffers #endif #ifndef GLX_MESA_set_3dfx_mode #define GLX_3DFX_WINDOW_MODE_MESA 0x1 #define GLX_3DFX_FULLSCREEN_MODE_MESA 0x2 #endif #ifndef GLX_SGIX_visual_select_group #define GLX_VISUAL_SELECT_GROUP_SGIX 0x8028 #endif #ifndef GLX_OML_swap_method #define GLX_SWAP_METHOD_OML 0x8060 #define GLX_SWAP_EXCHANGE_OML 0x8061 #define GLX_SWAP_COPY_OML 0x8062 #define GLX_SWAP_UNDEFINED_OML 0x8063 #endif #ifndef GLX_OML_sync_control #endif #ifndef GLX_NV_float_buffer #define GLX_FLOAT_COMPONENTS_NV 0x20B0 #endif #ifndef GLX_SGIX_hyperpipe #define GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX 80 #define GLX_BAD_HYPERPIPE_CONFIG_SGIX 91 #define GLX_BAD_HYPERPIPE_SGIX 92 #define GLX_HYPERPIPE_DISPLAY_PIPE_SGIX 0x00000001 #define GLX_HYPERPIPE_RENDER_PIPE_SGIX 0x00000002 #define GLX_PIPE_RECT_SGIX 0x00000001 #define GLX_PIPE_RECT_LIMITS_SGIX 0x00000002 #define GLX_HYPERPIPE_STEREO_SGIX 0x00000003 #define GLX_HYPERPIPE_PIXEL_AVERAGE_SGIX 0x00000004 #define GLX_HYPERPIPE_ID_SGIX 0x8030 #endif #ifndef GLX_MESA_agp_offset #endif #ifndef GLX_EXT_fbconfig_packed_float #define GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT 0x20B1 #define GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT 0x00000008 #endif #ifndef GLX_EXT_framebuffer_sRGB #define GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20B2 #endif #ifndef GLX_EXT_texture_from_pixmap #define GLX_TEXTURE_1D_BIT_EXT 0x00000001 #define GLX_TEXTURE_2D_BIT_EXT 0x00000002 #define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004 #define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0 #define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1 #define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2 #define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3 #define GLX_Y_INVERTED_EXT 0x20D4 #define GLX_TEXTURE_FORMAT_EXT 0x20D5 #define GLX_TEXTURE_TARGET_EXT 0x20D6 #define GLX_MIPMAP_TEXTURE_EXT 0x20D7 #define GLX_TEXTURE_FORMAT_NONE_EXT 0x20D8 #define GLX_TEXTURE_FORMAT_RGB_EXT 0x20D9 #define GLX_TEXTURE_FORMAT_RGBA_EXT 0x20DA #define GLX_TEXTURE_1D_EXT 0x20DB #define GLX_TEXTURE_2D_EXT 0x20DC #define GLX_TEXTURE_RECTANGLE_EXT 0x20DD #define GLX_FRONT_LEFT_EXT 0x20DE #define GLX_FRONT_RIGHT_EXT 0x20DF #define GLX_BACK_LEFT_EXT 0x20E0 #define GLX_BACK_RIGHT_EXT 0x20E1 #define GLX_FRONT_EXT GLX_FRONT_LEFT_EXT #define GLX_BACK_EXT GLX_BACK_LEFT_EXT #define GLX_AUX0_EXT 0x20E2 #define GLX_AUX1_EXT 0x20E3 #define GLX_AUX2_EXT 0x20E4 #define GLX_AUX3_EXT 0x20E5 #define GLX_AUX4_EXT 0x20E6 #define GLX_AUX5_EXT 0x20E7 #define GLX_AUX6_EXT 0x20E8 #define GLX_AUX7_EXT 0x20E9 #define GLX_AUX8_EXT 0x20EA #define GLX_AUX9_EXT 0x20EB #endif #ifndef GLX_NV_present_video #define GLX_NUM_VIDEO_SLOTS_NV 0x20F0 #endif #ifndef GLX_NV_video_out #define GLX_VIDEO_OUT_COLOR_NV 0x20C3 #define GLX_VIDEO_OUT_ALPHA_NV 0x20C4 #define GLX_VIDEO_OUT_DEPTH_NV 0x20C5 #define GLX_VIDEO_OUT_COLOR_AND_ALPHA_NV 0x20C6 #define GLX_VIDEO_OUT_COLOR_AND_DEPTH_NV 0x20C7 #define GLX_VIDEO_OUT_FRAME_NV 0x20C8 #define GLX_VIDEO_OUT_FIELD_1_NV 0x20C9 #define GLX_VIDEO_OUT_FIELD_2_NV 0x20CA #define GLX_VIDEO_OUT_STACKED_FIELDS_1_2_NV 0x20CB #define GLX_VIDEO_OUT_STACKED_FIELDS_2_1_NV 0x20CC #endif #ifndef GLX_NV_swap_group #endif /*************************************************************/ #ifndef GLX_ARB_get_proc_address typedef void (*__GLXextFuncPtr)(void); #endif #ifndef GLX_SGIX_video_source typedef XID GLXVideoSourceSGIX; #endif #ifndef GLX_SGIX_fbconfig typedef XID GLXFBConfigIDSGIX; typedef struct __GLXFBConfigRec *GLXFBConfigSGIX; #endif #ifndef GLX_SGIX_pbuffer typedef XID GLXPbufferSGIX; typedef struct { int type; unsigned long serial; /* # of last request processed by server */ Bool send_event; /* true if this came for SendEvent request */ Display *display; /* display the event was read from */ GLXDrawable drawable; /* i.d. of Drawable */ int event_type; /* GLX_DAMAGED_SGIX or GLX_SAVED_SGIX */ int draw_type; /* GLX_WINDOW_SGIX or GLX_PBUFFER_SGIX */ unsigned int mask; /* mask indicating which buffers are affected*/ int x, y; int width, height; int count; /* if nonzero, at least this many more */ } GLXBufferClobberEventSGIX; #endif #ifndef GLEXT_64_TYPES_DEFINED /* This code block is duplicated in glext.h, so must be protected */ #define GLEXT_64_TYPES_DEFINED /* Define int32_t, int64_t, and uint64_t types for UST/MSC */ /* (as used in the GLX_OML_sync_control extension). */ #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #include #elif defined(__sun__) || defined(__digital__) #include #if defined(__STDC__) #if defined(__arch64__) || defined(_LP64) typedef long int int64_t; typedef unsigned long int uint64_t; #else typedef long long int int64_t; typedef unsigned long long int uint64_t; #endif /* __arch64__ */ #endif /* __STDC__ */ #elif defined( __VMS ) || defined(__sgi) #include #elif defined(__SCO__) || defined(__USLC__) #include #elif defined(__UNIXOS2__) || defined(__SOL64__) typedef long int int32_t; typedef long long int int64_t; typedef unsigned long long int uint64_t; #elif defined(_WIN32) && defined(__GNUC__) #include #elif defined(_WIN32) typedef __int32 int32_t; typedef __int64 int64_t; typedef unsigned __int64 uint64_t; #else #include /* Fallback option */ #endif #endif #ifndef GLX_VERSION_1_3 #define GLX_VERSION_1_3 1 #ifdef GLX_GLXEXT_PROTOTYPES extern GLXFBConfig * glXGetFBConfigs (Display *, int, int *); extern GLXFBConfig * glXChooseFBConfig (Display *, int, const int *, int *); extern int glXGetFBConfigAttrib (Display *, GLXFBConfig, int, int *); extern XVisualInfo * glXGetVisualFromFBConfig (Display *, GLXFBConfig); extern GLXWindow glXCreateWindow (Display *, GLXFBConfig, Window, const int *); extern void glXDestroyWindow (Display *, GLXWindow); extern GLXPixmap glXCreatePixmap (Display *, GLXFBConfig, Pixmap, const int *); extern void glXDestroyPixmap (Display *, GLXPixmap); extern GLXPbuffer glXCreatePbuffer (Display *, GLXFBConfig, const int *); extern void glXDestroyPbuffer (Display *, GLXPbuffer); extern void glXQueryDrawable (Display *, GLXDrawable, int, unsigned int *); extern GLXContext glXCreateNewContext (Display *, GLXFBConfig, int, GLXContext, Bool); extern Bool glXMakeContextCurrent (Display *, GLXDrawable, GLXDrawable, GLXContext); extern GLXDrawable glXGetCurrentReadDrawable (void); extern Display * glXGetCurrentDisplay (void); extern int glXQueryContext (Display *, GLXContext, int, int *); extern void glXSelectEvent (Display *, GLXDrawable, unsigned long); extern void glXGetSelectedEvent (Display *, GLXDrawable, unsigned long *); #endif /* GLX_GLXEXT_PROTOTYPES */ typedef GLXFBConfig * ( * PFNGLXGETFBCONFIGSPROC) (Display *dpy, int screen, int *nelements); typedef GLXFBConfig * ( * PFNGLXCHOOSEFBCONFIGPROC) (Display *dpy, int screen, const int *attrib_list, int *nelements); typedef int ( * PFNGLXGETFBCONFIGATTRIBPROC) (Display *dpy, GLXFBConfig config, int attribute, int *value); typedef XVisualInfo * ( * PFNGLXGETVISUALFROMFBCONFIGPROC) (Display *dpy, GLXFBConfig config); typedef GLXWindow ( * PFNGLXCREATEWINDOWPROC) (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list); typedef void ( * PFNGLXDESTROYWINDOWPROC) (Display *dpy, GLXWindow win); typedef GLXPixmap ( * PFNGLXCREATEPIXMAPPROC) (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list); typedef void ( * PFNGLXDESTROYPIXMAPPROC) (Display *dpy, GLXPixmap pixmap); typedef GLXPbuffer ( * PFNGLXCREATEPBUFFERPROC) (Display *dpy, GLXFBConfig config, const int *attrib_list); typedef void ( * PFNGLXDESTROYPBUFFERPROC) (Display *dpy, GLXPbuffer pbuf); typedef void ( * PFNGLXQUERYDRAWABLEPROC) (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value); typedef GLXContext ( * PFNGLXCREATENEWCONTEXTPROC) (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct); typedef Bool ( * PFNGLXMAKECONTEXTCURRENTPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx); typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLEPROC) (void); typedef Display * ( * PFNGLXGETCURRENTDISPLAYPROC) (void); typedef int ( * PFNGLXQUERYCONTEXTPROC) (Display *dpy, GLXContext ctx, int attribute, int *value); typedef void ( * PFNGLXSELECTEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long event_mask); typedef void ( * PFNGLXGETSELECTEDEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long *event_mask); #endif #ifndef GLX_VERSION_1_4 #define GLX_VERSION_1_4 1 #ifdef GLX_GLXEXT_PROTOTYPES extern __GLXextFuncPtr glXGetProcAddress (const GLubyte *); #endif /* GLX_GLXEXT_PROTOTYPES */ typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSPROC) (const GLubyte *procName); #endif #ifndef GLX_ARB_get_proc_address #define GLX_ARB_get_proc_address 1 #ifdef GLX_GLXEXT_PROTOTYPES extern __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *); #endif /* GLX_GLXEXT_PROTOTYPES */ typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSARBPROC) (const GLubyte *procName); #endif #ifndef GLX_ARB_multisample #define GLX_ARB_multisample 1 #endif #ifndef GLX_ARB_fbconfig_float #define GLX_ARB_fbconfig_float 1 #endif #ifndef GLX_ARB_create_context #define GLX_ARB_create_context 1 #ifdef GLX_GLXEXT_PROTOTYPES extern GLXContext glXCreateContextAttribsARB (Display *, GLXFBConfig, GLXContext, Bool, const int *); #endif /* GLX_GLXEXT_PROTOTYPES */ typedef GLXContext ( * PFNGLXCREATECONTEXTATTRIBSARBPROC) (Display *dpy, GLXFBConfig config, GLXContext share_context, Bool direct, const int *attrib_list); #endif #ifndef GLX_SGIS_multisample #define GLX_SGIS_multisample 1 #endif #ifndef GLX_EXT_visual_info #define GLX_EXT_visual_info 1 #endif #ifndef GLX_SGI_swap_control #define GLX_SGI_swap_control 1 #ifdef GLX_GLXEXT_PROTOTYPES extern int glXSwapIntervalSGI (int); #endif /* GLX_GLXEXT_PROTOTYPES */ typedef int ( * PFNGLXSWAPINTERVALSGIPROC) (int interval); #endif #ifndef GLX_SGI_video_sync #define GLX_SGI_video_sync 1 #ifdef GLX_GLXEXT_PROTOTYPES extern int glXGetVideoSyncSGI (unsigned int *); extern int glXWaitVideoSyncSGI (int, int, unsigned int *); #endif /* GLX_GLXEXT_PROTOTYPES */ typedef int ( * PFNGLXGETVIDEOSYNCSGIPROC) (unsigned int *count); typedef int ( * PFNGLXWAITVIDEOSYNCSGIPROC) (int divisor, int remainder, unsigned int *count); #endif #ifndef GLX_SGI_make_current_read #define GLX_SGI_make_current_read 1 #ifdef GLX_GLXEXT_PROTOTYPES extern Bool glXMakeCurrentReadSGI (Display *, GLXDrawable, GLXDrawable, GLXContext); extern GLXDrawable glXGetCurrentReadDrawableSGI (void); #endif /* GLX_GLXEXT_PROTOTYPES */ typedef Bool ( * PFNGLXMAKECURRENTREADSGIPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx); typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLESGIPROC) (void); #endif #ifndef GLX_SGIX_video_source #define GLX_SGIX_video_source 1 #ifdef _VL_H #ifdef GLX_GLXEXT_PROTOTYPES extern GLXVideoSourceSGIX glXCreateGLXVideoSourceSGIX (Display *, int, VLServer, VLPath, int, VLNode); extern void glXDestroyGLXVideoSourceSGIX (Display *, GLXVideoSourceSGIX); #endif /* GLX_GLXEXT_PROTOTYPES */ typedef GLXVideoSourceSGIX ( * PFNGLXCREATEGLXVIDEOSOURCESGIXPROC) (Display *display, int screen, VLServer server, VLPath path, int nodeClass, VLNode drainNode); typedef void ( * PFNGLXDESTROYGLXVIDEOSOURCESGIXPROC) (Display *dpy, GLXVideoSourceSGIX glxvideosource); #endif /* _VL_H */ #endif #ifndef GLX_EXT_visual_rating #define GLX_EXT_visual_rating 1 #endif #ifndef GLX_EXT_import_context #define GLX_EXT_import_context 1 #ifdef GLX_GLXEXT_PROTOTYPES extern Display * glXGetCurrentDisplayEXT (void); extern int glXQueryContextInfoEXT (Display *, GLXContext, int, int *); extern GLXContextID glXGetContextIDEXT (const GLXContext); extern GLXContext glXImportContextEXT (Display *, GLXContextID); extern void glXFreeContextEXT (Display *, GLXContext); #endif /* GLX_GLXEXT_PROTOTYPES */ typedef Display * ( * PFNGLXGETCURRENTDISPLAYEXTPROC) (void); typedef int ( * PFNGLXQUERYCONTEXTINFOEXTPROC) (Display *dpy, GLXContext context, int attribute, int *value); typedef GLXContextID ( * PFNGLXGETCONTEXTIDEXTPROC) (const GLXContext context); typedef GLXContext ( * PFNGLXIMPORTCONTEXTEXTPROC) (Display *dpy, GLXContextID contextID); typedef void ( * PFNGLXFREECONTEXTEXTPROC) (Display *dpy, GLXContext context); #endif #ifndef GLX_SGIX_fbconfig #define GLX_SGIX_fbconfig 1 #ifdef GLX_GLXEXT_PROTOTYPES extern int glXGetFBConfigAttribSGIX (Display *, GLXFBConfigSGIX, int, int *); extern GLXFBConfigSGIX * glXChooseFBConfigSGIX (Display *, int, int *, int *); extern GLXPixmap glXCreateGLXPixmapWithConfigSGIX (Display *, GLXFBConfigSGIX, Pixmap); extern GLXContext glXCreateContextWithConfigSGIX (Display *, GLXFBConfigSGIX, int, GLXContext, Bool); extern XVisualInfo * glXGetVisualFromFBConfigSGIX (Display *, GLXFBConfigSGIX); extern GLXFBConfigSGIX glXGetFBConfigFromVisualSGIX (Display *, XVisualInfo *); #endif /* GLX_GLXEXT_PROTOTYPES */ typedef int ( * PFNGLXGETFBCONFIGATTRIBSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int attribute, int *value); typedef GLXFBConfigSGIX * ( * PFNGLXCHOOSEFBCONFIGSGIXPROC) (Display *dpy, int screen, int *attrib_list, int *nelements); typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap); typedef GLXContext ( * PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct); typedef XVisualInfo * ( * PFNGLXGETVISUALFROMFBCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config); typedef GLXFBConfigSGIX ( * PFNGLXGETFBCONFIGFROMVISUALSGIXPROC) (Display *dpy, XVisualInfo *vis); #endif #ifndef GLX_SGIX_pbuffer #define GLX_SGIX_pbuffer 1 #ifdef GLX_GLXEXT_PROTOTYPES extern GLXPbufferSGIX glXCreateGLXPbufferSGIX (Display *, GLXFBConfigSGIX, unsigned int, unsigned int, int *); extern void glXDestroyGLXPbufferSGIX (Display *, GLXPbufferSGIX); extern int glXQueryGLXPbufferSGIX (Display *, GLXPbufferSGIX, int, unsigned int *); extern void glXSelectEventSGIX (Display *, GLXDrawable, unsigned long); extern void glXGetSelectedEventSGIX (Display *, GLXDrawable, unsigned long *); #endif /* GLX_GLXEXT_PROTOTYPES */ typedef GLXPbufferSGIX ( * PFNGLXCREATEGLXPBUFFERSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list); typedef void ( * PFNGLXDESTROYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf); typedef int ( * PFNGLXQUERYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value); typedef void ( * PFNGLXSELECTEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long mask); typedef void ( * PFNGLXGETSELECTEDEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long *mask); #endif #ifndef GLX_SGI_cushion #define GLX_SGI_cushion 1 #ifdef GLX_GLXEXT_PROTOTYPES extern void glXCushionSGI (Display *, Window, float); #endif /* GLX_GLXEXT_PROTOTYPES */ typedef void ( * PFNGLXCUSHIONSGIPROC) (Display *dpy, Window window, float cushion); #endif #ifndef GLX_SGIX_video_resize #define GLX_SGIX_video_resize 1 #ifdef GLX_GLXEXT_PROTOTYPES extern int glXBindChannelToWindowSGIX (Display *, int, int, Window); extern int glXChannelRectSGIX (Display *, int, int, int, int, int, int); extern int glXQueryChannelRectSGIX (Display *, int, int, int *, int *, int *, int *); extern int glXQueryChannelDeltasSGIX (Display *, int, int, int *, int *, int *, int *); extern int glXChannelRectSyncSGIX (Display *, int, int, GLenum); #endif /* GLX_GLXEXT_PROTOTYPES */ typedef int ( * PFNGLXBINDCHANNELTOWINDOWSGIXPROC) (Display *display, int screen, int channel, Window window); typedef int ( * PFNGLXCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int x, int y, int w, int h); typedef int ( * PFNGLXQUERYCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int *dx, int *dy, int *dw, int *dh); typedef int ( * PFNGLXQUERYCHANNELDELTASSGIXPROC) (Display *display, int screen, int channel, int *x, int *y, int *w, int *h); typedef int ( * PFNGLXCHANNELRECTSYNCSGIXPROC) (Display *display, int screen, int channel, GLenum synctype); #endif #ifndef GLX_SGIX_dmbuffer #define GLX_SGIX_dmbuffer 1 #ifdef _DM_BUFFER_H_ #ifdef GLX_GLXEXT_PROTOTYPES extern Bool glXAssociateDMPbufferSGIX (Display *, GLXPbufferSGIX, DMparams *, DMbuffer); #endif /* GLX_GLXEXT_PROTOTYPES */ typedef Bool ( * PFNGLXASSOCIATEDMPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params, DMbuffer dmbuffer); #endif /* _DM_BUFFER_H_ */ #endif #ifndef GLX_SGIX_swap_group #define GLX_SGIX_swap_group 1 #ifdef GLX_GLXEXT_PROTOTYPES extern void glXJoinSwapGroupSGIX (Display *, GLXDrawable, GLXDrawable); #endif /* GLX_GLXEXT_PROTOTYPES */ typedef void ( * PFNGLXJOINSWAPGROUPSGIXPROC) (Display *dpy, GLXDrawable drawable, GLXDrawable member); #endif #ifndef GLX_SGIX_swap_barrier #define GLX_SGIX_swap_barrier 1 #ifdef GLX_GLXEXT_PROTOTYPES extern void glXBindSwapBarrierSGIX (Display *, GLXDrawable, int); extern Bool glXQueryMaxSwapBarriersSGIX (Display *, int, int *); #endif /* GLX_GLXEXT_PROTOTYPES */ typedef void ( * PFNGLXBINDSWAPBARRIERSGIXPROC) (Display *dpy, GLXDrawable drawable, int barrier); typedef Bool ( * PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC) (Display *dpy, int screen, int *max); #endif #ifndef GLX_SUN_get_transparent_index #define GLX_SUN_get_transparent_index 1 #ifdef GLX_GLXEXT_PROTOTYPES extern Status glXGetTransparentIndexSUN (Display *, Window, Window, long *); #endif /* GLX_GLXEXT_PROTOTYPES */ typedef Status ( * PFNGLXGETTRANSPARENTINDEXSUNPROC) (Display *dpy, Window overlay, Window underlay, long *pTransparentIndex); #endif #ifndef GLX_MESA_copy_sub_buffer #define GLX_MESA_copy_sub_buffer 1 #ifdef GLX_GLXEXT_PROTOTYPES extern void glXCopySubBufferMESA (Display *, GLXDrawable, int, int, int, int); #endif /* GLX_GLXEXT_PROTOTYPES */ typedef void ( * PFNGLXCOPYSUBBUFFERMESAPROC) (Display *dpy, GLXDrawable drawable, int x, int y, int width, int height); #endif #ifndef GLX_MESA_pixmap_colormap #define GLX_MESA_pixmap_colormap 1 #ifdef GLX_GLXEXT_PROTOTYPES extern GLXPixmap glXCreateGLXPixmapMESA (Display *, XVisualInfo *, Pixmap, Colormap); #endif /* GLX_GLXEXT_PROTOTYPES */ typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPMESAPROC) (Display *dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap); #endif #ifndef GLX_MESA_release_buffers #define GLX_MESA_release_buffers 1 #ifdef GLX_GLXEXT_PROTOTYPES extern Bool glXReleaseBuffersMESA (Display *, GLXDrawable); #endif /* GLX_GLXEXT_PROTOTYPES */ typedef Bool ( * PFNGLXRELEASEBUFFERSMESAPROC) (Display *dpy, GLXDrawable drawable); #endif #ifndef GLX_MESA_set_3dfx_mode #define GLX_MESA_set_3dfx_mode 1 #ifdef GLX_GLXEXT_PROTOTYPES extern Bool glXSet3DfxModeMESA (int); #endif /* GLX_GLXEXT_PROTOTYPES */ typedef Bool ( * PFNGLXSET3DFXMODEMESAPROC) (int mode); #endif #ifndef GLX_SGIX_visual_select_group #define GLX_SGIX_visual_select_group 1 #endif #ifndef GLX_OML_swap_method #define GLX_OML_swap_method 1 #endif #ifndef GLX_OML_sync_control #define GLX_OML_sync_control 1 #ifdef GLX_GLXEXT_PROTOTYPES extern Bool glXGetSyncValuesOML (Display *, GLXDrawable, int64_t *, int64_t *, int64_t *); extern Bool glXGetMscRateOML (Display *, GLXDrawable, int32_t *, int32_t *); extern int64_t glXSwapBuffersMscOML (Display *, GLXDrawable, int64_t, int64_t, int64_t); extern Bool glXWaitForMscOML (Display *, GLXDrawable, int64_t, int64_t, int64_t, int64_t *, int64_t *, int64_t *); extern Bool glXWaitForSbcOML (Display *, GLXDrawable, int64_t, int64_t *, int64_t *, int64_t *); #endif /* GLX_GLXEXT_PROTOTYPES */ typedef Bool ( * PFNGLXGETSYNCVALUESOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t *ust, int64_t *msc, int64_t *sbc); typedef Bool ( * PFNGLXGETMSCRATEOMLPROC) (Display *dpy, GLXDrawable drawable, int32_t *numerator, int32_t *denominator); typedef int64_t ( * PFNGLXSWAPBUFFERSMSCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder); typedef Bool ( * PFNGLXWAITFORMSCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder, int64_t *ust, int64_t *msc, int64_t *sbc); typedef Bool ( * PFNGLXWAITFORSBCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_sbc, int64_t *ust, int64_t *msc, int64_t *sbc); #endif #ifndef GLX_NV_float_buffer #define GLX_NV_float_buffer 1 #endif #ifndef GLX_SGIX_hyperpipe #define GLX_SGIX_hyperpipe 1 typedef struct { char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; int networkId; } GLXHyperpipeNetworkSGIX; typedef struct { char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; int channel; unsigned int participationType; int timeSlice; } GLXHyperpipeConfigSGIX; typedef struct { char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; int srcXOrigin, srcYOrigin, srcWidth, srcHeight; int destXOrigin, destYOrigin, destWidth, destHeight; } GLXPipeRect; typedef struct { char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; int XOrigin, YOrigin, maxHeight, maxWidth; } GLXPipeRectLimits; #ifdef GLX_GLXEXT_PROTOTYPES extern GLXHyperpipeNetworkSGIX * glXQueryHyperpipeNetworkSGIX (Display *, int *); extern int glXHyperpipeConfigSGIX (Display *, int, int, GLXHyperpipeConfigSGIX *, int *); extern GLXHyperpipeConfigSGIX * glXQueryHyperpipeConfigSGIX (Display *, int, int *); extern int glXDestroyHyperpipeConfigSGIX (Display *, int); extern int glXBindHyperpipeSGIX (Display *, int); extern int glXQueryHyperpipeBestAttribSGIX (Display *, int, int, int, void *, void *); extern int glXHyperpipeAttribSGIX (Display *, int, int, int, void *); extern int glXQueryHyperpipeAttribSGIX (Display *, int, int, int, void *); #endif /* GLX_GLXEXT_PROTOTYPES */ typedef GLXHyperpipeNetworkSGIX * ( * PFNGLXQUERYHYPERPIPENETWORKSGIXPROC) (Display *dpy, int *npipes); typedef int ( * PFNGLXHYPERPIPECONFIGSGIXPROC) (Display *dpy, int networkId, int npipes, GLXHyperpipeConfigSGIX *cfg, int *hpId); typedef GLXHyperpipeConfigSGIX * ( * PFNGLXQUERYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId, int *npipes); typedef int ( * PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId); typedef int ( * PFNGLXBINDHYPERPIPESGIXPROC) (Display *dpy, int hpId); typedef int ( * PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList, void *returnAttribList); typedef int ( * PFNGLXHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList); typedef int ( * PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *returnAttribList); #endif #ifndef GLX_MESA_agp_offset #define GLX_MESA_agp_offset 1 #ifdef GLX_GLXEXT_PROTOTYPES extern unsigned int glXGetAGPOffsetMESA (const void *); #endif /* GLX_GLXEXT_PROTOTYPES */ typedef unsigned int ( * PFNGLXGETAGPOFFSETMESAPROC) (const void *pointer); #endif #ifndef GLX_EXT_fbconfig_packed_float #define GLX_EXT_fbconfig_packed_float 1 #endif #ifndef GLX_EXT_framebuffer_sRGB #define GLX_EXT_framebuffer_sRGB 1 #endif #ifndef GLX_EXT_texture_from_pixmap #define GLX_EXT_texture_from_pixmap 1 #ifdef GLX_GLXEXT_PROTOTYPES extern void glXBindTexImageEXT (Display *, GLXDrawable, int, const int *); extern void glXReleaseTexImageEXT (Display *, GLXDrawable, int); #endif /* GLX_GLXEXT_PROTOTYPES */ typedef void ( * PFNGLXBINDTEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list); typedef void ( * PFNGLXRELEASETEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawable, int buffer); #endif #ifndef GLX_NV_present_video #define GLX_NV_present_video 1 #endif #ifndef GLX_NV_video_out #define GLX_NV_video_out 1 #endif #ifndef GLX_NV_swap_group #define GLX_NV_swap_group 1 #endif #ifdef __cplusplus } #endif #endif netgen-6.2.1804/ng/Togl2.1/gl/glext.h0000644000175000017500000157345213272137567015456 0ustar kurtkurt#ifndef __glext_h_ #define __glext_h_ #ifdef __cplusplus extern "C" { #endif /* ** Copyright (c) 2007 The Khronos Group Inc. ** ** Permission is hereby granted, free of charge, to any person obtaining a ** copy of this software and/or associated documentation files (the ** "Materials"), to deal in the Materials without restriction, including ** without limitation the rights to use, copy, modify, merge, publish, ** distribute, sublicense, and/or sell copies of the Materials, and to ** permit persons to whom the Materials are furnished to do so, subject to ** the following conditions: ** ** The above copyright notice and this permission notice shall be included ** in all copies or substantial portions of the Materials. ** ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE ** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. */ #if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) #define WIN32_LEAN_AND_MEAN 1 #include #endif #ifndef APIENTRY #define APIENTRY #endif #ifndef APIENTRYP #define APIENTRYP APIENTRY * #endif #ifndef GLAPI #define GLAPI extern #endif /*************************************************************/ /* Header file version number, required by OpenGL ABI for Linux */ /* glext.h last updated 2008/11/14 */ /* Current version at http://www.opengl.org/registry/ */ #define GL_GLEXT_VERSION 44 #ifndef GL_VERSION_1_2 #define GL_UNSIGNED_BYTE_3_3_2 0x8032 #define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 #define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 #define GL_UNSIGNED_INT_8_8_8_8 0x8035 #define GL_UNSIGNED_INT_10_10_10_2 0x8036 #define GL_RESCALE_NORMAL 0x803A #define GL_TEXTURE_BINDING_3D 0x806A #define GL_PACK_SKIP_IMAGES 0x806B #define GL_PACK_IMAGE_HEIGHT 0x806C #define GL_UNPACK_SKIP_IMAGES 0x806D #define GL_UNPACK_IMAGE_HEIGHT 0x806E #define GL_TEXTURE_3D 0x806F #define GL_PROXY_TEXTURE_3D 0x8070 #define GL_TEXTURE_DEPTH 0x8071 #define GL_TEXTURE_WRAP_R 0x8072 #define GL_MAX_3D_TEXTURE_SIZE 0x8073 #define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362 #define GL_UNSIGNED_SHORT_5_6_5 0x8363 #define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364 #define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365 #define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366 #define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367 #define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368 #define GL_BGR 0x80E0 #define GL_BGRA 0x80E1 #define GL_MAX_ELEMENTS_VERTICES 0x80E8 #define GL_MAX_ELEMENTS_INDICES 0x80E9 #define GL_CLAMP_TO_EDGE 0x812F #define GL_TEXTURE_MIN_LOD 0x813A #define GL_TEXTURE_MAX_LOD 0x813B #define GL_TEXTURE_BASE_LEVEL 0x813C #define GL_TEXTURE_MAX_LEVEL 0x813D #define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8 #define GL_SINGLE_COLOR 0x81F9 #define GL_SEPARATE_SPECULAR_COLOR 0x81FA #define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12 #define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13 #define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22 #define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23 #define GL_ALIASED_POINT_SIZE_RANGE 0x846D #define GL_ALIASED_LINE_WIDTH_RANGE 0x846E #endif #ifndef GL_ARB_imaging #define GL_CONSTANT_COLOR 0x8001 #define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 #define GL_CONSTANT_ALPHA 0x8003 #define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 #define GL_BLEND_COLOR 0x8005 #define GL_FUNC_ADD 0x8006 #define GL_MIN 0x8007 #define GL_MAX 0x8008 #define GL_BLEND_EQUATION 0x8009 #define GL_FUNC_SUBTRACT 0x800A #define GL_FUNC_REVERSE_SUBTRACT 0x800B #define GL_CONVOLUTION_1D 0x8010 #define GL_CONVOLUTION_2D 0x8011 #define GL_SEPARABLE_2D 0x8012 #define GL_CONVOLUTION_BORDER_MODE 0x8013 #define GL_CONVOLUTION_FILTER_SCALE 0x8014 #define GL_CONVOLUTION_FILTER_BIAS 0x8015 #define GL_REDUCE 0x8016 #define GL_CONVOLUTION_FORMAT 0x8017 #define GL_CONVOLUTION_WIDTH 0x8018 #define GL_CONVOLUTION_HEIGHT 0x8019 #define GL_MAX_CONVOLUTION_WIDTH 0x801A #define GL_MAX_CONVOLUTION_HEIGHT 0x801B #define GL_POST_CONVOLUTION_RED_SCALE 0x801C #define GL_POST_CONVOLUTION_GREEN_SCALE 0x801D #define GL_POST_CONVOLUTION_BLUE_SCALE 0x801E #define GL_POST_CONVOLUTION_ALPHA_SCALE 0x801F #define GL_POST_CONVOLUTION_RED_BIAS 0x8020 #define GL_POST_CONVOLUTION_GREEN_BIAS 0x8021 #define GL_POST_CONVOLUTION_BLUE_BIAS 0x8022 #define GL_POST_CONVOLUTION_ALPHA_BIAS 0x8023 #define GL_HISTOGRAM 0x8024 #define GL_PROXY_HISTOGRAM 0x8025 #define GL_HISTOGRAM_WIDTH 0x8026 #define GL_HISTOGRAM_FORMAT 0x8027 #define GL_HISTOGRAM_RED_SIZE 0x8028 #define GL_HISTOGRAM_GREEN_SIZE 0x8029 #define GL_HISTOGRAM_BLUE_SIZE 0x802A #define GL_HISTOGRAM_ALPHA_SIZE 0x802B #define GL_HISTOGRAM_LUMINANCE_SIZE 0x802C #define GL_HISTOGRAM_SINK 0x802D #define GL_MINMAX 0x802E #define GL_MINMAX_FORMAT 0x802F #define GL_MINMAX_SINK 0x8030 #define GL_TABLE_TOO_LARGE 0x8031 #define GL_COLOR_MATRIX 0x80B1 #define GL_COLOR_MATRIX_STACK_DEPTH 0x80B2 #define GL_MAX_COLOR_MATRIX_STACK_DEPTH 0x80B3 #define GL_POST_COLOR_MATRIX_RED_SCALE 0x80B4 #define GL_POST_COLOR_MATRIX_GREEN_SCALE 0x80B5 #define GL_POST_COLOR_MATRIX_BLUE_SCALE 0x80B6 #define GL_POST_COLOR_MATRIX_ALPHA_SCALE 0x80B7 #define GL_POST_COLOR_MATRIX_RED_BIAS 0x80B8 #define GL_POST_COLOR_MATRIX_GREEN_BIAS 0x80B9 #define GL_POST_COLOR_MATRIX_BLUE_BIAS 0x80BA #define GL_POST_COLOR_MATRIX_ALPHA_BIAS 0x80BB #define GL_COLOR_TABLE 0x80D0 #define GL_POST_CONVOLUTION_COLOR_TABLE 0x80D1 #define GL_POST_COLOR_MATRIX_COLOR_TABLE 0x80D2 #define GL_PROXY_COLOR_TABLE 0x80D3 #define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4 #define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5 #define GL_COLOR_TABLE_SCALE 0x80D6 #define GL_COLOR_TABLE_BIAS 0x80D7 #define GL_COLOR_TABLE_FORMAT 0x80D8 #define GL_COLOR_TABLE_WIDTH 0x80D9 #define GL_COLOR_TABLE_RED_SIZE 0x80DA #define GL_COLOR_TABLE_GREEN_SIZE 0x80DB #define GL_COLOR_TABLE_BLUE_SIZE 0x80DC #define GL_COLOR_TABLE_ALPHA_SIZE 0x80DD #define GL_COLOR_TABLE_LUMINANCE_SIZE 0x80DE #define GL_COLOR_TABLE_INTENSITY_SIZE 0x80DF #define GL_CONSTANT_BORDER 0x8151 #define GL_REPLICATE_BORDER 0x8153 #define GL_CONVOLUTION_BORDER_COLOR 0x8154 #endif #ifndef GL_VERSION_1_3 #define GL_TEXTURE0 0x84C0 #define GL_TEXTURE1 0x84C1 #define GL_TEXTURE2 0x84C2 #define GL_TEXTURE3 0x84C3 #define GL_TEXTURE4 0x84C4 #define GL_TEXTURE5 0x84C5 #define GL_TEXTURE6 0x84C6 #define GL_TEXTURE7 0x84C7 #define GL_TEXTURE8 0x84C8 #define GL_TEXTURE9 0x84C9 #define GL_TEXTURE10 0x84CA #define GL_TEXTURE11 0x84CB #define GL_TEXTURE12 0x84CC #define GL_TEXTURE13 0x84CD #define GL_TEXTURE14 0x84CE #define GL_TEXTURE15 0x84CF #define GL_TEXTURE16 0x84D0 #define GL_TEXTURE17 0x84D1 #define GL_TEXTURE18 0x84D2 #define GL_TEXTURE19 0x84D3 #define GL_TEXTURE20 0x84D4 #define GL_TEXTURE21 0x84D5 #define GL_TEXTURE22 0x84D6 #define GL_TEXTURE23 0x84D7 #define GL_TEXTURE24 0x84D8 #define GL_TEXTURE25 0x84D9 #define GL_TEXTURE26 0x84DA #define GL_TEXTURE27 0x84DB #define GL_TEXTURE28 0x84DC #define GL_TEXTURE29 0x84DD #define GL_TEXTURE30 0x84DE #define GL_TEXTURE31 0x84DF #define GL_ACTIVE_TEXTURE 0x84E0 #define GL_CLIENT_ACTIVE_TEXTURE 0x84E1 #define GL_MAX_TEXTURE_UNITS 0x84E2 #define GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3 #define GL_TRANSPOSE_PROJECTION_MATRIX 0x84E4 #define GL_TRANSPOSE_TEXTURE_MATRIX 0x84E5 #define GL_TRANSPOSE_COLOR_MATRIX 0x84E6 #define GL_MULTISAMPLE 0x809D #define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E #define GL_SAMPLE_ALPHA_TO_ONE 0x809F #define GL_SAMPLE_COVERAGE 0x80A0 #define GL_SAMPLE_BUFFERS 0x80A8 #define GL_SAMPLES 0x80A9 #define GL_SAMPLE_COVERAGE_VALUE 0x80AA #define GL_SAMPLE_COVERAGE_INVERT 0x80AB #define GL_MULTISAMPLE_BIT 0x20000000 #define GL_NORMAL_MAP 0x8511 #define GL_REFLECTION_MAP 0x8512 #define GL_TEXTURE_CUBE_MAP 0x8513 #define GL_TEXTURE_BINDING_CUBE_MAP 0x8514 #define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A #define GL_PROXY_TEXTURE_CUBE_MAP 0x851B #define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C #define GL_COMPRESSED_ALPHA 0x84E9 #define GL_COMPRESSED_LUMINANCE 0x84EA #define GL_COMPRESSED_LUMINANCE_ALPHA 0x84EB #define GL_COMPRESSED_INTENSITY 0x84EC #define GL_COMPRESSED_RGB 0x84ED #define GL_COMPRESSED_RGBA 0x84EE #define GL_TEXTURE_COMPRESSION_HINT 0x84EF #define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0 #define GL_TEXTURE_COMPRESSED 0x86A1 #define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 #define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 #define GL_CLAMP_TO_BORDER 0x812D #define GL_COMBINE 0x8570 #define GL_COMBINE_RGB 0x8571 #define GL_COMBINE_ALPHA 0x8572 #define GL_SOURCE0_RGB 0x8580 #define GL_SOURCE1_RGB 0x8581 #define GL_SOURCE2_RGB 0x8582 #define GL_SOURCE0_ALPHA 0x8588 #define GL_SOURCE1_ALPHA 0x8589 #define GL_SOURCE2_ALPHA 0x858A #define GL_OPERAND0_RGB 0x8590 #define GL_OPERAND1_RGB 0x8591 #define GL_OPERAND2_RGB 0x8592 #define GL_OPERAND0_ALPHA 0x8598 #define GL_OPERAND1_ALPHA 0x8599 #define GL_OPERAND2_ALPHA 0x859A #define GL_RGB_SCALE 0x8573 #define GL_ADD_SIGNED 0x8574 #define GL_INTERPOLATE 0x8575 #define GL_SUBTRACT 0x84E7 #define GL_CONSTANT 0x8576 #define GL_PRIMARY_COLOR 0x8577 #define GL_PREVIOUS 0x8578 #define GL_DOT3_RGB 0x86AE #define GL_DOT3_RGBA 0x86AF #endif #ifndef GL_VERSION_1_4 #define GL_BLEND_DST_RGB 0x80C8 #define GL_BLEND_SRC_RGB 0x80C9 #define GL_BLEND_DST_ALPHA 0x80CA #define GL_BLEND_SRC_ALPHA 0x80CB #define GL_POINT_SIZE_MIN 0x8126 #define GL_POINT_SIZE_MAX 0x8127 #define GL_POINT_FADE_THRESHOLD_SIZE 0x8128 #define GL_POINT_DISTANCE_ATTENUATION 0x8129 #define GL_GENERATE_MIPMAP 0x8191 #define GL_GENERATE_MIPMAP_HINT 0x8192 #define GL_DEPTH_COMPONENT16 0x81A5 #define GL_DEPTH_COMPONENT24 0x81A6 #define GL_DEPTH_COMPONENT32 0x81A7 #define GL_MIRRORED_REPEAT 0x8370 #define GL_FOG_COORDINATE_SOURCE 0x8450 #define GL_FOG_COORDINATE 0x8451 #define GL_FRAGMENT_DEPTH 0x8452 #define GL_CURRENT_FOG_COORDINATE 0x8453 #define GL_FOG_COORDINATE_ARRAY_TYPE 0x8454 #define GL_FOG_COORDINATE_ARRAY_STRIDE 0x8455 #define GL_FOG_COORDINATE_ARRAY_POINTER 0x8456 #define GL_FOG_COORDINATE_ARRAY 0x8457 #define GL_COLOR_SUM 0x8458 #define GL_CURRENT_SECONDARY_COLOR 0x8459 #define GL_SECONDARY_COLOR_ARRAY_SIZE 0x845A #define GL_SECONDARY_COLOR_ARRAY_TYPE 0x845B #define GL_SECONDARY_COLOR_ARRAY_STRIDE 0x845C #define GL_SECONDARY_COLOR_ARRAY_POINTER 0x845D #define GL_SECONDARY_COLOR_ARRAY 0x845E #define GL_MAX_TEXTURE_LOD_BIAS 0x84FD #define GL_TEXTURE_FILTER_CONTROL 0x8500 #define GL_TEXTURE_LOD_BIAS 0x8501 #define GL_INCR_WRAP 0x8507 #define GL_DECR_WRAP 0x8508 #define GL_TEXTURE_DEPTH_SIZE 0x884A #define GL_DEPTH_TEXTURE_MODE 0x884B #define GL_TEXTURE_COMPARE_MODE 0x884C #define GL_TEXTURE_COMPARE_FUNC 0x884D #define GL_COMPARE_R_TO_TEXTURE 0x884E #endif #ifndef GL_VERSION_1_5 #define GL_BUFFER_SIZE 0x8764 #define GL_BUFFER_USAGE 0x8765 #define GL_QUERY_COUNTER_BITS 0x8864 #define GL_CURRENT_QUERY 0x8865 #define GL_QUERY_RESULT 0x8866 #define GL_QUERY_RESULT_AVAILABLE 0x8867 #define GL_ARRAY_BUFFER 0x8892 #define GL_ELEMENT_ARRAY_BUFFER 0x8893 #define GL_ARRAY_BUFFER_BINDING 0x8894 #define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895 #define GL_VERTEX_ARRAY_BUFFER_BINDING 0x8896 #define GL_NORMAL_ARRAY_BUFFER_BINDING 0x8897 #define GL_COLOR_ARRAY_BUFFER_BINDING 0x8898 #define GL_INDEX_ARRAY_BUFFER_BINDING 0x8899 #define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 0x889A #define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING 0x889B #define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING 0x889C #define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING 0x889D #define GL_WEIGHT_ARRAY_BUFFER_BINDING 0x889E #define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F #define GL_READ_ONLY 0x88B8 #define GL_WRITE_ONLY 0x88B9 #define GL_READ_WRITE 0x88BA #define GL_BUFFER_ACCESS 0x88BB #define GL_BUFFER_MAPPED 0x88BC #define GL_BUFFER_MAP_POINTER 0x88BD #define GL_STREAM_DRAW 0x88E0 #define GL_STREAM_READ 0x88E1 #define GL_STREAM_COPY 0x88E2 #define GL_STATIC_DRAW 0x88E4 #define GL_STATIC_READ 0x88E5 #define GL_STATIC_COPY 0x88E6 #define GL_DYNAMIC_DRAW 0x88E8 #define GL_DYNAMIC_READ 0x88E9 #define GL_DYNAMIC_COPY 0x88EA #define GL_SAMPLES_PASSED 0x8914 #define GL_FOG_COORD_SRC GL_FOG_COORDINATE_SOURCE #define GL_FOG_COORD GL_FOG_COORDINATE #define GL_CURRENT_FOG_COORD GL_CURRENT_FOG_COORDINATE #define GL_FOG_COORD_ARRAY_TYPE GL_FOG_COORDINATE_ARRAY_TYPE #define GL_FOG_COORD_ARRAY_STRIDE GL_FOG_COORDINATE_ARRAY_STRIDE #define GL_FOG_COORD_ARRAY_POINTER GL_FOG_COORDINATE_ARRAY_POINTER #define GL_FOG_COORD_ARRAY GL_FOG_COORDINATE_ARRAY #define GL_FOG_COORD_ARRAY_BUFFER_BINDING GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING #define GL_SRC0_RGB GL_SOURCE0_RGB #define GL_SRC1_RGB GL_SOURCE1_RGB #define GL_SRC2_RGB GL_SOURCE2_RGB #define GL_SRC0_ALPHA GL_SOURCE0_ALPHA #define GL_SRC1_ALPHA GL_SOURCE1_ALPHA #define GL_SRC2_ALPHA GL_SOURCE2_ALPHA #endif #ifndef GL_VERSION_2_0 #define GL_BLEND_EQUATION_RGB GL_BLEND_EQUATION #define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622 #define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623 #define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624 #define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625 #define GL_CURRENT_VERTEX_ATTRIB 0x8626 #define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642 #define GL_VERTEX_PROGRAM_TWO_SIDE 0x8643 #define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645 #define GL_STENCIL_BACK_FUNC 0x8800 #define GL_STENCIL_BACK_FAIL 0x8801 #define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802 #define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803 #define GL_MAX_DRAW_BUFFERS 0x8824 #define GL_DRAW_BUFFER0 0x8825 #define GL_DRAW_BUFFER1 0x8826 #define GL_DRAW_BUFFER2 0x8827 #define GL_DRAW_BUFFER3 0x8828 #define GL_DRAW_BUFFER4 0x8829 #define GL_DRAW_BUFFER5 0x882A #define GL_DRAW_BUFFER6 0x882B #define GL_DRAW_BUFFER7 0x882C #define GL_DRAW_BUFFER8 0x882D #define GL_DRAW_BUFFER9 0x882E #define GL_DRAW_BUFFER10 0x882F #define GL_DRAW_BUFFER11 0x8830 #define GL_DRAW_BUFFER12 0x8831 #define GL_DRAW_BUFFER13 0x8832 #define GL_DRAW_BUFFER14 0x8833 #define GL_DRAW_BUFFER15 0x8834 #define GL_BLEND_EQUATION_ALPHA 0x883D #define GL_POINT_SPRITE 0x8861 #define GL_COORD_REPLACE 0x8862 #define GL_MAX_VERTEX_ATTRIBS 0x8869 #define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A #define GL_MAX_TEXTURE_COORDS 0x8871 #define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872 #define GL_FRAGMENT_SHADER 0x8B30 #define GL_VERTEX_SHADER 0x8B31 #define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49 #define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A #define GL_MAX_VARYING_FLOATS 0x8B4B #define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C #define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D #define GL_SHADER_TYPE 0x8B4F #define GL_FLOAT_VEC2 0x8B50 #define GL_FLOAT_VEC3 0x8B51 #define GL_FLOAT_VEC4 0x8B52 #define GL_INT_VEC2 0x8B53 #define GL_INT_VEC3 0x8B54 #define GL_INT_VEC4 0x8B55 #define GL_BOOL 0x8B56 #define GL_BOOL_VEC2 0x8B57 #define GL_BOOL_VEC3 0x8B58 #define GL_BOOL_VEC4 0x8B59 #define GL_FLOAT_MAT2 0x8B5A #define GL_FLOAT_MAT3 0x8B5B #define GL_FLOAT_MAT4 0x8B5C #define GL_SAMPLER_1D 0x8B5D #define GL_SAMPLER_2D 0x8B5E #define GL_SAMPLER_3D 0x8B5F #define GL_SAMPLER_CUBE 0x8B60 #define GL_SAMPLER_1D_SHADOW 0x8B61 #define GL_SAMPLER_2D_SHADOW 0x8B62 #define GL_DELETE_STATUS 0x8B80 #define GL_COMPILE_STATUS 0x8B81 #define GL_LINK_STATUS 0x8B82 #define GL_VALIDATE_STATUS 0x8B83 #define GL_INFO_LOG_LENGTH 0x8B84 #define GL_ATTACHED_SHADERS 0x8B85 #define GL_ACTIVE_UNIFORMS 0x8B86 #define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87 #define GL_SHADER_SOURCE_LENGTH 0x8B88 #define GL_ACTIVE_ATTRIBUTES 0x8B89 #define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A #define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B #define GL_SHADING_LANGUAGE_VERSION 0x8B8C #define GL_CURRENT_PROGRAM 0x8B8D #define GL_POINT_SPRITE_COORD_ORIGIN 0x8CA0 #define GL_LOWER_LEFT 0x8CA1 #define GL_UPPER_LEFT 0x8CA2 #define GL_STENCIL_BACK_REF 0x8CA3 #define GL_STENCIL_BACK_VALUE_MASK 0x8CA4 #define GL_STENCIL_BACK_WRITEMASK 0x8CA5 #endif #ifndef GL_VERSION_2_1 #define GL_CURRENT_RASTER_SECONDARY_COLOR 0x845F #define GL_PIXEL_PACK_BUFFER 0x88EB #define GL_PIXEL_UNPACK_BUFFER 0x88EC #define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED #define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF #define GL_FLOAT_MAT2x3 0x8B65 #define GL_FLOAT_MAT2x4 0x8B66 #define GL_FLOAT_MAT3x2 0x8B67 #define GL_FLOAT_MAT3x4 0x8B68 #define GL_FLOAT_MAT4x2 0x8B69 #define GL_FLOAT_MAT4x3 0x8B6A #define GL_SRGB 0x8C40 #define GL_SRGB8 0x8C41 #define GL_SRGB_ALPHA 0x8C42 #define GL_SRGB8_ALPHA8 0x8C43 #define GL_SLUMINANCE_ALPHA 0x8C44 #define GL_SLUMINANCE8_ALPHA8 0x8C45 #define GL_SLUMINANCE 0x8C46 #define GL_SLUMINANCE8 0x8C47 #define GL_COMPRESSED_SRGB 0x8C48 #define GL_COMPRESSED_SRGB_ALPHA 0x8C49 #define GL_COMPRESSED_SLUMINANCE 0x8C4A #define GL_COMPRESSED_SLUMINANCE_ALPHA 0x8C4B #endif #ifndef GL_VERSION_3_0 #define GL_COMPARE_REF_TO_TEXTURE GL_COMPARE_R_TO_TEXTURE_ARB #define GL_CLIP_DISTANCE0 GL_CLIP_PLANE0 #define GL_CLIP_DISTANCE1 GL_CLIP_PLANE1 #define GL_CLIP_DISTANCE2 GL_CLIP_PLANE2 #define GL_CLIP_DISTANCE3 GL_CLIP_PLANE3 #define GL_CLIP_DISTANCE4 GL_CLIP_PLANE4 #define GL_CLIP_DISTANCE5 GL_CLIP_PLANE5 #define GL_MAX_CLIP_DISTANCES GL_MAX_CLIP_PLANES #define GL_MAJOR_VERSION 0x821B #define GL_MINOR_VERSION 0x821C #define GL_NUM_EXTENSIONS 0x821D #define GL_CONTEXT_FLAGS 0x821E #define GL_DEPTH_BUFFER 0x8223 #define GL_STENCIL_BUFFER 0x8224 #define GL_COMPRESSED_RED 0x8225 #define GL_COMPRESSED_RG 0x8226 #define GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT 0x0001 #define GL_RGBA32F 0x8814 #define GL_RGB32F 0x8815 #define GL_RGBA16F 0x881A #define GL_RGB16F 0x881B #define GL_VERTEX_ATTRIB_ARRAY_INTEGER 0x88FD #define GL_MAX_ARRAY_TEXTURE_LAYERS 0x88FF #define GL_MIN_PROGRAM_TEXEL_OFFSET 0x8904 #define GL_MAX_PROGRAM_TEXEL_OFFSET 0x8905 #define GL_CLAMP_VERTEX_COLOR 0x891A #define GL_CLAMP_FRAGMENT_COLOR 0x891B #define GL_CLAMP_READ_COLOR 0x891C #define GL_FIXED_ONLY 0x891D #define GL_MAX_VARYING_COMPONENTS GL_MAX_VARYING_FLOATS #define GL_TEXTURE_RED_TYPE 0x8C10 #define GL_TEXTURE_GREEN_TYPE 0x8C11 #define GL_TEXTURE_BLUE_TYPE 0x8C12 #define GL_TEXTURE_ALPHA_TYPE 0x8C13 #define GL_TEXTURE_LUMINANCE_TYPE 0x8C14 #define GL_TEXTURE_INTENSITY_TYPE 0x8C15 #define GL_TEXTURE_DEPTH_TYPE 0x8C16 #define GL_UNSIGNED_NORMALIZED 0x8C17 #define GL_TEXTURE_1D_ARRAY 0x8C18 #define GL_PROXY_TEXTURE_1D_ARRAY 0x8C19 #define GL_TEXTURE_2D_ARRAY 0x8C1A #define GL_PROXY_TEXTURE_2D_ARRAY 0x8C1B #define GL_TEXTURE_BINDING_1D_ARRAY 0x8C1C #define GL_TEXTURE_BINDING_2D_ARRAY 0x8C1D #define GL_R11F_G11F_B10F 0x8C3A #define GL_UNSIGNED_INT_10F_11F_11F_REV 0x8C3B #define GL_RGB9_E5 0x8C3D #define GL_UNSIGNED_INT_5_9_9_9_REV 0x8C3E #define GL_TEXTURE_SHARED_SIZE 0x8C3F #define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH 0x8C76 #define GL_TRANSFORM_FEEDBACK_BUFFER_MODE 0x8C7F #define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS 0x8C80 #define GL_TRANSFORM_FEEDBACK_VARYINGS 0x8C83 #define GL_TRANSFORM_FEEDBACK_BUFFER_START 0x8C84 #define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE 0x8C85 #define GL_PRIMITIVES_GENERATED 0x8C87 #define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 0x8C88 #define GL_RASTERIZER_DISCARD 0x8C89 #define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS 0x8C8A #define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS 0x8C8B #define GL_INTERLEAVED_ATTRIBS 0x8C8C #define GL_SEPARATE_ATTRIBS 0x8C8D #define GL_TRANSFORM_FEEDBACK_BUFFER 0x8C8E #define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING 0x8C8F #define GL_RGBA32UI 0x8D70 #define GL_RGB32UI 0x8D71 #define GL_RGBA16UI 0x8D76 #define GL_RGB16UI 0x8D77 #define GL_RGBA8UI 0x8D7C #define GL_RGB8UI 0x8D7D #define GL_RGBA32I 0x8D82 #define GL_RGB32I 0x8D83 #define GL_RGBA16I 0x8D88 #define GL_RGB16I 0x8D89 #define GL_RGBA8I 0x8D8E #define GL_RGB8I 0x8D8F #define GL_RED_INTEGER 0x8D94 #define GL_GREEN_INTEGER 0x8D95 #define GL_BLUE_INTEGER 0x8D96 #define GL_ALPHA_INTEGER 0x8D97 #define GL_RGB_INTEGER 0x8D98 #define GL_RGBA_INTEGER 0x8D99 #define GL_BGR_INTEGER 0x8D9A #define GL_BGRA_INTEGER 0x8D9B #define GL_SAMPLER_1D_ARRAY 0x8DC0 #define GL_SAMPLER_2D_ARRAY 0x8DC1 #define GL_SAMPLER_1D_ARRAY_SHADOW 0x8DC3 #define GL_SAMPLER_2D_ARRAY_SHADOW 0x8DC4 #define GL_SAMPLER_CUBE_SHADOW 0x8DC5 #define GL_UNSIGNED_INT_VEC2 0x8DC6 #define GL_UNSIGNED_INT_VEC3 0x8DC7 #define GL_UNSIGNED_INT_VEC4 0x8DC8 #define GL_INT_SAMPLER_1D 0x8DC9 #define GL_INT_SAMPLER_2D 0x8DCA #define GL_INT_SAMPLER_3D 0x8DCB #define GL_INT_SAMPLER_CUBE 0x8DCC #define GL_INT_SAMPLER_1D_ARRAY 0x8DCE #define GL_INT_SAMPLER_2D_ARRAY 0x8DCF #define GL_UNSIGNED_INT_SAMPLER_1D 0x8DD1 #define GL_UNSIGNED_INT_SAMPLER_2D 0x8DD2 #define GL_UNSIGNED_INT_SAMPLER_3D 0x8DD3 #define GL_UNSIGNED_INT_SAMPLER_CUBE 0x8DD4 #define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY 0x8DD6 #define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY 0x8DD7 #define GL_QUERY_WAIT 0x8E13 #define GL_QUERY_NO_WAIT 0x8E14 #define GL_QUERY_BY_REGION_WAIT 0x8E15 #define GL_QUERY_BY_REGION_NO_WAIT 0x8E16 /* Reuse tokens from ARB_depth_buffer_float */ /* reuse GL_DEPTH_COMPONENT32F */ /* reuse GL_DEPTH32F_STENCIL8 */ /* reuse GL_FLOAT_32_UNSIGNED_INT_24_8_REV */ /* Reuse tokens from ARB_framebuffer_object */ /* reuse GL_INVALID_FRAMEBUFFER_OPERATION */ /* reuse GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING */ /* reuse GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE */ /* reuse GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE */ /* reuse GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE */ /* reuse GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE */ /* reuse GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE */ /* reuse GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE */ /* reuse GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE */ /* reuse GL_FRAMEBUFFER_DEFAULT */ /* reuse GL_FRAMEBUFFER_UNDEFINED */ /* reuse GL_DEPTH_STENCIL_ATTACHMENT */ /* reuse GL_INDEX */ /* reuse GL_MAX_RENDERBUFFER_SIZE */ /* reuse GL_DEPTH_STENCIL */ /* reuse GL_UNSIGNED_INT_24_8 */ /* reuse GL_DEPTH24_STENCIL8 */ /* reuse GL_TEXTURE_STENCIL_SIZE */ /* reuse GL_TEXTURE_RED_TYPE */ /* reuse GL_TEXTURE_GREEN_TYPE */ /* reuse GL_TEXTURE_BLUE_TYPE */ /* reuse GL_TEXTURE_ALPHA_TYPE */ /* reuse GL_TEXTURE_LUMINANCE_TYPE */ /* reuse GL_TEXTURE_INTENSITY_TYPE */ /* reuse GL_TEXTURE_DEPTH_TYPE */ /* reuse GL_UNSIGNED_NORMALIZED */ /* reuse GL_FRAMEBUFFER_BINDING */ /* reuse GL_DRAW_FRAMEBUFFER_BINDING */ /* reuse GL_RENDERBUFFER_BINDING */ /* reuse GL_READ_FRAMEBUFFER */ /* reuse GL_DRAW_FRAMEBUFFER */ /* reuse GL_READ_FRAMEBUFFER_BINDING */ /* reuse GL_RENDERBUFFER_SAMPLES */ /* reuse GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE */ /* reuse GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME */ /* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL */ /* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE */ /* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */ /* reuse GL_FRAMEBUFFER_COMPLETE */ /* reuse GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT */ /* reuse GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT */ /* reuse GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER */ /* reuse GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER */ /* reuse GL_FRAMEBUFFER_UNSUPPORTED */ /* reuse GL_MAX_COLOR_ATTACHMENTS */ /* reuse GL_COLOR_ATTACHMENT0 */ /* reuse GL_COLOR_ATTACHMENT1 */ /* reuse GL_COLOR_ATTACHMENT2 */ /* reuse GL_COLOR_ATTACHMENT3 */ /* reuse GL_COLOR_ATTACHMENT4 */ /* reuse GL_COLOR_ATTACHMENT5 */ /* reuse GL_COLOR_ATTACHMENT6 */ /* reuse GL_COLOR_ATTACHMENT7 */ /* reuse GL_COLOR_ATTACHMENT8 */ /* reuse GL_COLOR_ATTACHMENT9 */ /* reuse GL_COLOR_ATTACHMENT10 */ /* reuse GL_COLOR_ATTACHMENT11 */ /* reuse GL_COLOR_ATTACHMENT12 */ /* reuse GL_COLOR_ATTACHMENT13 */ /* reuse GL_COLOR_ATTACHMENT14 */ /* reuse GL_COLOR_ATTACHMENT15 */ /* reuse GL_DEPTH_ATTACHMENT */ /* reuse GL_STENCIL_ATTACHMENT */ /* reuse GL_FRAMEBUFFER */ /* reuse GL_RENDERBUFFER */ /* reuse GL_RENDERBUFFER_WIDTH */ /* reuse GL_RENDERBUFFER_HEIGHT */ /* reuse GL_RENDERBUFFER_INTERNAL_FORMAT */ /* reuse GL_STENCIL_INDEX1 */ /* reuse GL_STENCIL_INDEX4 */ /* reuse GL_STENCIL_INDEX8 */ /* reuse GL_STENCIL_INDEX16 */ /* reuse GL_RENDERBUFFER_RED_SIZE */ /* reuse GL_RENDERBUFFER_GREEN_SIZE */ /* reuse GL_RENDERBUFFER_BLUE_SIZE */ /* reuse GL_RENDERBUFFER_ALPHA_SIZE */ /* reuse GL_RENDERBUFFER_DEPTH_SIZE */ /* reuse GL_RENDERBUFFER_STENCIL_SIZE */ /* reuse GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE */ /* reuse GL_MAX_SAMPLES */ /* Reuse tokens from ARB_framebuffer_sRGB */ /* reuse GL_FRAMEBUFFER_SRGB */ /* Reuse tokens from ARB_half_float_vertex */ /* reuse GL_HALF_FLOAT */ /* Reuse tokens from ARB_map_buffer_range */ /* reuse GL_MAP_READ_BIT */ /* reuse GL_MAP_WRITE_BIT */ /* reuse GL_MAP_INVALIDATE_RANGE_BIT */ /* reuse GL_MAP_INVALIDATE_BUFFER_BIT */ /* reuse GL_MAP_FLUSH_EXPLICIT_BIT */ /* reuse GL_MAP_UNSYNCHRONIZED_BIT */ /* Reuse tokens from ARB_texture_compression_rgtc */ /* reuse GL_COMPRESSED_RED_RGTC1 */ /* reuse GL_COMPRESSED_SIGNED_RED_RGTC1 */ /* reuse GL_COMPRESSED_RG_RGTC2 */ /* reuse GL_COMPRESSED_SIGNED_RG_RGTC2 */ /* Reuse tokens from ARB_texture_rg */ /* reuse GL_RG */ /* reuse GL_RG_INTEGER */ /* reuse GL_R8 */ /* reuse GL_R16 */ /* reuse GL_RG8 */ /* reuse GL_RG16 */ /* reuse GL_R16F */ /* reuse GL_R32F */ /* reuse GL_RG16F */ /* reuse GL_RG32F */ /* reuse GL_R8I */ /* reuse GL_R8UI */ /* reuse GL_R16I */ /* reuse GL_R16UI */ /* reuse GL_R32I */ /* reuse GL_R32UI */ /* reuse GL_RG8I */ /* reuse GL_RG8UI */ /* reuse GL_RG16I */ /* reuse GL_RG16UI */ /* reuse GL_RG32I */ /* reuse GL_RG32UI */ /* Reuse tokens from ARB_vertex_array_object */ /* reuse GL_VERTEX_ARRAY_BINDING */ #endif #ifndef GL_ARB_multitexture #define GL_TEXTURE0_ARB 0x84C0 #define GL_TEXTURE1_ARB 0x84C1 #define GL_TEXTURE2_ARB 0x84C2 #define GL_TEXTURE3_ARB 0x84C3 #define GL_TEXTURE4_ARB 0x84C4 #define GL_TEXTURE5_ARB 0x84C5 #define GL_TEXTURE6_ARB 0x84C6 #define GL_TEXTURE7_ARB 0x84C7 #define GL_TEXTURE8_ARB 0x84C8 #define GL_TEXTURE9_ARB 0x84C9 #define GL_TEXTURE10_ARB 0x84CA #define GL_TEXTURE11_ARB 0x84CB #define GL_TEXTURE12_ARB 0x84CC #define GL_TEXTURE13_ARB 0x84CD #define GL_TEXTURE14_ARB 0x84CE #define GL_TEXTURE15_ARB 0x84CF #define GL_TEXTURE16_ARB 0x84D0 #define GL_TEXTURE17_ARB 0x84D1 #define GL_TEXTURE18_ARB 0x84D2 #define GL_TEXTURE19_ARB 0x84D3 #define GL_TEXTURE20_ARB 0x84D4 #define GL_TEXTURE21_ARB 0x84D5 #define GL_TEXTURE22_ARB 0x84D6 #define GL_TEXTURE23_ARB 0x84D7 #define GL_TEXTURE24_ARB 0x84D8 #define GL_TEXTURE25_ARB 0x84D9 #define GL_TEXTURE26_ARB 0x84DA #define GL_TEXTURE27_ARB 0x84DB #define GL_TEXTURE28_ARB 0x84DC #define GL_TEXTURE29_ARB 0x84DD #define GL_TEXTURE30_ARB 0x84DE #define GL_TEXTURE31_ARB 0x84DF #define GL_ACTIVE_TEXTURE_ARB 0x84E0 #define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1 #define GL_MAX_TEXTURE_UNITS_ARB 0x84E2 #endif #ifndef GL_ARB_transpose_matrix #define GL_TRANSPOSE_MODELVIEW_MATRIX_ARB 0x84E3 #define GL_TRANSPOSE_PROJECTION_MATRIX_ARB 0x84E4 #define GL_TRANSPOSE_TEXTURE_MATRIX_ARB 0x84E5 #define GL_TRANSPOSE_COLOR_MATRIX_ARB 0x84E6 #endif #ifndef GL_ARB_multisample #define GL_MULTISAMPLE_ARB 0x809D #define GL_SAMPLE_ALPHA_TO_COVERAGE_ARB 0x809E #define GL_SAMPLE_ALPHA_TO_ONE_ARB 0x809F #define GL_SAMPLE_COVERAGE_ARB 0x80A0 #define GL_SAMPLE_BUFFERS_ARB 0x80A8 #define GL_SAMPLES_ARB 0x80A9 #define GL_SAMPLE_COVERAGE_VALUE_ARB 0x80AA #define GL_SAMPLE_COVERAGE_INVERT_ARB 0x80AB #define GL_MULTISAMPLE_BIT_ARB 0x20000000 #endif #ifndef GL_ARB_texture_env_add #endif #ifndef GL_ARB_texture_cube_map #define GL_NORMAL_MAP_ARB 0x8511 #define GL_REFLECTION_MAP_ARB 0x8512 #define GL_TEXTURE_CUBE_MAP_ARB 0x8513 #define GL_TEXTURE_BINDING_CUBE_MAP_ARB 0x8514 #define GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x8515 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x8516 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x8517 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x8518 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x8519 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x851A #define GL_PROXY_TEXTURE_CUBE_MAP_ARB 0x851B #define GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB 0x851C #endif #ifndef GL_ARB_texture_compression #define GL_COMPRESSED_ALPHA_ARB 0x84E9 #define GL_COMPRESSED_LUMINANCE_ARB 0x84EA #define GL_COMPRESSED_LUMINANCE_ALPHA_ARB 0x84EB #define GL_COMPRESSED_INTENSITY_ARB 0x84EC #define GL_COMPRESSED_RGB_ARB 0x84ED #define GL_COMPRESSED_RGBA_ARB 0x84EE #define GL_TEXTURE_COMPRESSION_HINT_ARB 0x84EF #define GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB 0x86A0 #define GL_TEXTURE_COMPRESSED_ARB 0x86A1 #define GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A2 #define GL_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A3 #endif #ifndef GL_ARB_texture_border_clamp #define GL_CLAMP_TO_BORDER_ARB 0x812D #endif #ifndef GL_ARB_point_parameters #define GL_POINT_SIZE_MIN_ARB 0x8126 #define GL_POINT_SIZE_MAX_ARB 0x8127 #define GL_POINT_FADE_THRESHOLD_SIZE_ARB 0x8128 #define GL_POINT_DISTANCE_ATTENUATION_ARB 0x8129 #endif #ifndef GL_ARB_vertex_blend #define GL_MAX_VERTEX_UNITS_ARB 0x86A4 #define GL_ACTIVE_VERTEX_UNITS_ARB 0x86A5 #define GL_WEIGHT_SUM_UNITY_ARB 0x86A6 #define GL_VERTEX_BLEND_ARB 0x86A7 #define GL_CURRENT_WEIGHT_ARB 0x86A8 #define GL_WEIGHT_ARRAY_TYPE_ARB 0x86A9 #define GL_WEIGHT_ARRAY_STRIDE_ARB 0x86AA #define GL_WEIGHT_ARRAY_SIZE_ARB 0x86AB #define GL_WEIGHT_ARRAY_POINTER_ARB 0x86AC #define GL_WEIGHT_ARRAY_ARB 0x86AD #define GL_MODELVIEW0_ARB 0x1700 #define GL_MODELVIEW1_ARB 0x850A #define GL_MODELVIEW2_ARB 0x8722 #define GL_MODELVIEW3_ARB 0x8723 #define GL_MODELVIEW4_ARB 0x8724 #define GL_MODELVIEW5_ARB 0x8725 #define GL_MODELVIEW6_ARB 0x8726 #define GL_MODELVIEW7_ARB 0x8727 #define GL_MODELVIEW8_ARB 0x8728 #define GL_MODELVIEW9_ARB 0x8729 #define GL_MODELVIEW10_ARB 0x872A #define GL_MODELVIEW11_ARB 0x872B #define GL_MODELVIEW12_ARB 0x872C #define GL_MODELVIEW13_ARB 0x872D #define GL_MODELVIEW14_ARB 0x872E #define GL_MODELVIEW15_ARB 0x872F #define GL_MODELVIEW16_ARB 0x8730 #define GL_MODELVIEW17_ARB 0x8731 #define GL_MODELVIEW18_ARB 0x8732 #define GL_MODELVIEW19_ARB 0x8733 #define GL_MODELVIEW20_ARB 0x8734 #define GL_MODELVIEW21_ARB 0x8735 #define GL_MODELVIEW22_ARB 0x8736 #define GL_MODELVIEW23_ARB 0x8737 #define GL_MODELVIEW24_ARB 0x8738 #define GL_MODELVIEW25_ARB 0x8739 #define GL_MODELVIEW26_ARB 0x873A #define GL_MODELVIEW27_ARB 0x873B #define GL_MODELVIEW28_ARB 0x873C #define GL_MODELVIEW29_ARB 0x873D #define GL_MODELVIEW30_ARB 0x873E #define GL_MODELVIEW31_ARB 0x873F #endif #ifndef GL_ARB_matrix_palette #define GL_MATRIX_PALETTE_ARB 0x8840 #define GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB 0x8841 #define GL_MAX_PALETTE_MATRICES_ARB 0x8842 #define GL_CURRENT_PALETTE_MATRIX_ARB 0x8843 #define GL_MATRIX_INDEX_ARRAY_ARB 0x8844 #define GL_CURRENT_MATRIX_INDEX_ARB 0x8845 #define GL_MATRIX_INDEX_ARRAY_SIZE_ARB 0x8846 #define GL_MATRIX_INDEX_ARRAY_TYPE_ARB 0x8847 #define GL_MATRIX_INDEX_ARRAY_STRIDE_ARB 0x8848 #define GL_MATRIX_INDEX_ARRAY_POINTER_ARB 0x8849 #endif #ifndef GL_ARB_texture_env_combine #define GL_COMBINE_ARB 0x8570 #define GL_COMBINE_RGB_ARB 0x8571 #define GL_COMBINE_ALPHA_ARB 0x8572 #define GL_SOURCE0_RGB_ARB 0x8580 #define GL_SOURCE1_RGB_ARB 0x8581 #define GL_SOURCE2_RGB_ARB 0x8582 #define GL_SOURCE0_ALPHA_ARB 0x8588 #define GL_SOURCE1_ALPHA_ARB 0x8589 #define GL_SOURCE2_ALPHA_ARB 0x858A #define GL_OPERAND0_RGB_ARB 0x8590 #define GL_OPERAND1_RGB_ARB 0x8591 #define GL_OPERAND2_RGB_ARB 0x8592 #define GL_OPERAND0_ALPHA_ARB 0x8598 #define GL_OPERAND1_ALPHA_ARB 0x8599 #define GL_OPERAND2_ALPHA_ARB 0x859A #define GL_RGB_SCALE_ARB 0x8573 #define GL_ADD_SIGNED_ARB 0x8574 #define GL_INTERPOLATE_ARB 0x8575 #define GL_SUBTRACT_ARB 0x84E7 #define GL_CONSTANT_ARB 0x8576 #define GL_PRIMARY_COLOR_ARB 0x8577 #define GL_PREVIOUS_ARB 0x8578 #endif #ifndef GL_ARB_texture_env_crossbar #endif #ifndef GL_ARB_texture_env_dot3 #define GL_DOT3_RGB_ARB 0x86AE #define GL_DOT3_RGBA_ARB 0x86AF #endif #ifndef GL_ARB_texture_mirrored_repeat #define GL_MIRRORED_REPEAT_ARB 0x8370 #endif #ifndef GL_ARB_depth_texture #define GL_DEPTH_COMPONENT16_ARB 0x81A5 #define GL_DEPTH_COMPONENT24_ARB 0x81A6 #define GL_DEPTH_COMPONENT32_ARB 0x81A7 #define GL_TEXTURE_DEPTH_SIZE_ARB 0x884A #define GL_DEPTH_TEXTURE_MODE_ARB 0x884B #endif #ifndef GL_ARB_shadow #define GL_TEXTURE_COMPARE_MODE_ARB 0x884C #define GL_TEXTURE_COMPARE_FUNC_ARB 0x884D #define GL_COMPARE_R_TO_TEXTURE_ARB 0x884E #endif #ifndef GL_ARB_shadow_ambient #define GL_TEXTURE_COMPARE_FAIL_VALUE_ARB 0x80BF #endif #ifndef GL_ARB_window_pos #endif #ifndef GL_ARB_vertex_program #define GL_COLOR_SUM_ARB 0x8458 #define GL_VERTEX_PROGRAM_ARB 0x8620 #define GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB 0x8622 #define GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB 0x8623 #define GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB 0x8624 #define GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB 0x8625 #define GL_CURRENT_VERTEX_ATTRIB_ARB 0x8626 #define GL_PROGRAM_LENGTH_ARB 0x8627 #define GL_PROGRAM_STRING_ARB 0x8628 #define GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB 0x862E #define GL_MAX_PROGRAM_MATRICES_ARB 0x862F #define GL_CURRENT_MATRIX_STACK_DEPTH_ARB 0x8640 #define GL_CURRENT_MATRIX_ARB 0x8641 #define GL_VERTEX_PROGRAM_POINT_SIZE_ARB 0x8642 #define GL_VERTEX_PROGRAM_TWO_SIDE_ARB 0x8643 #define GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB 0x8645 #define GL_PROGRAM_ERROR_POSITION_ARB 0x864B #define GL_PROGRAM_BINDING_ARB 0x8677 #define GL_MAX_VERTEX_ATTRIBS_ARB 0x8869 #define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB 0x886A #define GL_PROGRAM_ERROR_STRING_ARB 0x8874 #define GL_PROGRAM_FORMAT_ASCII_ARB 0x8875 #define GL_PROGRAM_FORMAT_ARB 0x8876 #define GL_PROGRAM_INSTRUCTIONS_ARB 0x88A0 #define GL_MAX_PROGRAM_INSTRUCTIONS_ARB 0x88A1 #define GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A2 #define GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A3 #define GL_PROGRAM_TEMPORARIES_ARB 0x88A4 #define GL_MAX_PROGRAM_TEMPORARIES_ARB 0x88A5 #define GL_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A6 #define GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A7 #define GL_PROGRAM_PARAMETERS_ARB 0x88A8 #define GL_MAX_PROGRAM_PARAMETERS_ARB 0x88A9 #define GL_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AA #define GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AB #define GL_PROGRAM_ATTRIBS_ARB 0x88AC #define GL_MAX_PROGRAM_ATTRIBS_ARB 0x88AD #define GL_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AE #define GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AF #define GL_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B0 #define GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B1 #define GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B2 #define GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B3 #define GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB 0x88B4 #define GL_MAX_PROGRAM_ENV_PARAMETERS_ARB 0x88B5 #define GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB 0x88B6 #define GL_TRANSPOSE_CURRENT_MATRIX_ARB 0x88B7 #define GL_MATRIX0_ARB 0x88C0 #define GL_MATRIX1_ARB 0x88C1 #define GL_MATRIX2_ARB 0x88C2 #define GL_MATRIX3_ARB 0x88C3 #define GL_MATRIX4_ARB 0x88C4 #define GL_MATRIX5_ARB 0x88C5 #define GL_MATRIX6_ARB 0x88C6 #define GL_MATRIX7_ARB 0x88C7 #define GL_MATRIX8_ARB 0x88C8 #define GL_MATRIX9_ARB 0x88C9 #define GL_MATRIX10_ARB 0x88CA #define GL_MATRIX11_ARB 0x88CB #define GL_MATRIX12_ARB 0x88CC #define GL_MATRIX13_ARB 0x88CD #define GL_MATRIX14_ARB 0x88CE #define GL_MATRIX15_ARB 0x88CF #define GL_MATRIX16_ARB 0x88D0 #define GL_MATRIX17_ARB 0x88D1 #define GL_MATRIX18_ARB 0x88D2 #define GL_MATRIX19_ARB 0x88D3 #define GL_MATRIX20_ARB 0x88D4 #define GL_MATRIX21_ARB 0x88D5 #define GL_MATRIX22_ARB 0x88D6 #define GL_MATRIX23_ARB 0x88D7 #define GL_MATRIX24_ARB 0x88D8 #define GL_MATRIX25_ARB 0x88D9 #define GL_MATRIX26_ARB 0x88DA #define GL_MATRIX27_ARB 0x88DB #define GL_MATRIX28_ARB 0x88DC #define GL_MATRIX29_ARB 0x88DD #define GL_MATRIX30_ARB 0x88DE #define GL_MATRIX31_ARB 0x88DF #endif #ifndef GL_ARB_fragment_program #define GL_FRAGMENT_PROGRAM_ARB 0x8804 #define GL_PROGRAM_ALU_INSTRUCTIONS_ARB 0x8805 #define GL_PROGRAM_TEX_INSTRUCTIONS_ARB 0x8806 #define GL_PROGRAM_TEX_INDIRECTIONS_ARB 0x8807 #define GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x8808 #define GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x8809 #define GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x880A #define GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB 0x880B #define GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB 0x880C #define GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB 0x880D #define GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x880E #define GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x880F #define GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x8810 #define GL_MAX_TEXTURE_COORDS_ARB 0x8871 #define GL_MAX_TEXTURE_IMAGE_UNITS_ARB 0x8872 #endif #ifndef GL_ARB_vertex_buffer_object #define GL_BUFFER_SIZE_ARB 0x8764 #define GL_BUFFER_USAGE_ARB 0x8765 #define GL_ARRAY_BUFFER_ARB 0x8892 #define GL_ELEMENT_ARRAY_BUFFER_ARB 0x8893 #define GL_ARRAY_BUFFER_BINDING_ARB 0x8894 #define GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB 0x8895 #define GL_VERTEX_ARRAY_BUFFER_BINDING_ARB 0x8896 #define GL_NORMAL_ARRAY_BUFFER_BINDING_ARB 0x8897 #define GL_COLOR_ARRAY_BUFFER_BINDING_ARB 0x8898 #define GL_INDEX_ARRAY_BUFFER_BINDING_ARB 0x8899 #define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB 0x889A #define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB 0x889B #define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB 0x889C #define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB 0x889D #define GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB 0x889E #define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB 0x889F #define GL_READ_ONLY_ARB 0x88B8 #define GL_WRITE_ONLY_ARB 0x88B9 #define GL_READ_WRITE_ARB 0x88BA #define GL_BUFFER_ACCESS_ARB 0x88BB #define GL_BUFFER_MAPPED_ARB 0x88BC #define GL_BUFFER_MAP_POINTER_ARB 0x88BD #define GL_STREAM_DRAW_ARB 0x88E0 #define GL_STREAM_READ_ARB 0x88E1 #define GL_STREAM_COPY_ARB 0x88E2 #define GL_STATIC_DRAW_ARB 0x88E4 #define GL_STATIC_READ_ARB 0x88E5 #define GL_STATIC_COPY_ARB 0x88E6 #define GL_DYNAMIC_DRAW_ARB 0x88E8 #define GL_DYNAMIC_READ_ARB 0x88E9 #define GL_DYNAMIC_COPY_ARB 0x88EA #endif #ifndef GL_ARB_occlusion_query #define GL_QUERY_COUNTER_BITS_ARB 0x8864 #define GL_CURRENT_QUERY_ARB 0x8865 #define GL_QUERY_RESULT_ARB 0x8866 #define GL_QUERY_RESULT_AVAILABLE_ARB 0x8867 #define GL_SAMPLES_PASSED_ARB 0x8914 #endif #ifndef GL_ARB_shader_objects #define GL_PROGRAM_OBJECT_ARB 0x8B40 #define GL_SHADER_OBJECT_ARB 0x8B48 #define GL_OBJECT_TYPE_ARB 0x8B4E #define GL_OBJECT_SUBTYPE_ARB 0x8B4F #define GL_FLOAT_VEC2_ARB 0x8B50 #define GL_FLOAT_VEC3_ARB 0x8B51 #define GL_FLOAT_VEC4_ARB 0x8B52 #define GL_INT_VEC2_ARB 0x8B53 #define GL_INT_VEC3_ARB 0x8B54 #define GL_INT_VEC4_ARB 0x8B55 #define GL_BOOL_ARB 0x8B56 #define GL_BOOL_VEC2_ARB 0x8B57 #define GL_BOOL_VEC3_ARB 0x8B58 #define GL_BOOL_VEC4_ARB 0x8B59 #define GL_FLOAT_MAT2_ARB 0x8B5A #define GL_FLOAT_MAT3_ARB 0x8B5B #define GL_FLOAT_MAT4_ARB 0x8B5C #define GL_SAMPLER_1D_ARB 0x8B5D #define GL_SAMPLER_2D_ARB 0x8B5E #define GL_SAMPLER_3D_ARB 0x8B5F #define GL_SAMPLER_CUBE_ARB 0x8B60 #define GL_SAMPLER_1D_SHADOW_ARB 0x8B61 #define GL_SAMPLER_2D_SHADOW_ARB 0x8B62 #define GL_SAMPLER_2D_RECT_ARB 0x8B63 #define GL_SAMPLER_2D_RECT_SHADOW_ARB 0x8B64 #define GL_OBJECT_DELETE_STATUS_ARB 0x8B80 #define GL_OBJECT_COMPILE_STATUS_ARB 0x8B81 #define GL_OBJECT_LINK_STATUS_ARB 0x8B82 #define GL_OBJECT_VALIDATE_STATUS_ARB 0x8B83 #define GL_OBJECT_INFO_LOG_LENGTH_ARB 0x8B84 #define GL_OBJECT_ATTACHED_OBJECTS_ARB 0x8B85 #define GL_OBJECT_ACTIVE_UNIFORMS_ARB 0x8B86 #define GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB 0x8B87 #define GL_OBJECT_SHADER_SOURCE_LENGTH_ARB 0x8B88 #endif #ifndef GL_ARB_vertex_shader #define GL_VERTEX_SHADER_ARB 0x8B31 #define GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB 0x8B4A #define GL_MAX_VARYING_FLOATS_ARB 0x8B4B #define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB 0x8B4C #define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB 0x8B4D #define GL_OBJECT_ACTIVE_ATTRIBUTES_ARB 0x8B89 #define GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB 0x8B8A #endif #ifndef GL_ARB_fragment_shader #define GL_FRAGMENT_SHADER_ARB 0x8B30 #define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB 0x8B49 #define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB 0x8B8B #endif #ifndef GL_ARB_shading_language_100 #define GL_SHADING_LANGUAGE_VERSION_ARB 0x8B8C #endif #ifndef GL_ARB_texture_non_power_of_two #endif #ifndef GL_ARB_point_sprite #define GL_POINT_SPRITE_ARB 0x8861 #define GL_COORD_REPLACE_ARB 0x8862 #endif #ifndef GL_ARB_fragment_program_shadow #endif #ifndef GL_ARB_draw_buffers #define GL_MAX_DRAW_BUFFERS_ARB 0x8824 #define GL_DRAW_BUFFER0_ARB 0x8825 #define GL_DRAW_BUFFER1_ARB 0x8826 #define GL_DRAW_BUFFER2_ARB 0x8827 #define GL_DRAW_BUFFER3_ARB 0x8828 #define GL_DRAW_BUFFER4_ARB 0x8829 #define GL_DRAW_BUFFER5_ARB 0x882A #define GL_DRAW_BUFFER6_ARB 0x882B #define GL_DRAW_BUFFER7_ARB 0x882C #define GL_DRAW_BUFFER8_ARB 0x882D #define GL_DRAW_BUFFER9_ARB 0x882E #define GL_DRAW_BUFFER10_ARB 0x882F #define GL_DRAW_BUFFER11_ARB 0x8830 #define GL_DRAW_BUFFER12_ARB 0x8831 #define GL_DRAW_BUFFER13_ARB 0x8832 #define GL_DRAW_BUFFER14_ARB 0x8833 #define GL_DRAW_BUFFER15_ARB 0x8834 #endif #ifndef GL_ARB_texture_rectangle #define GL_TEXTURE_RECTANGLE_ARB 0x84F5 #define GL_TEXTURE_BINDING_RECTANGLE_ARB 0x84F6 #define GL_PROXY_TEXTURE_RECTANGLE_ARB 0x84F7 #define GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB 0x84F8 #endif #ifndef GL_ARB_color_buffer_float #define GL_RGBA_FLOAT_MODE_ARB 0x8820 #define GL_CLAMP_VERTEX_COLOR_ARB 0x891A #define GL_CLAMP_FRAGMENT_COLOR_ARB 0x891B #define GL_CLAMP_READ_COLOR_ARB 0x891C #define GL_FIXED_ONLY_ARB 0x891D #endif #ifndef GL_ARB_half_float_pixel #define GL_HALF_FLOAT_ARB 0x140B #endif #ifndef GL_ARB_texture_float #define GL_TEXTURE_RED_TYPE_ARB 0x8C10 #define GL_TEXTURE_GREEN_TYPE_ARB 0x8C11 #define GL_TEXTURE_BLUE_TYPE_ARB 0x8C12 #define GL_TEXTURE_ALPHA_TYPE_ARB 0x8C13 #define GL_TEXTURE_LUMINANCE_TYPE_ARB 0x8C14 #define GL_TEXTURE_INTENSITY_TYPE_ARB 0x8C15 #define GL_TEXTURE_DEPTH_TYPE_ARB 0x8C16 #define GL_UNSIGNED_NORMALIZED_ARB 0x8C17 #define GL_RGBA32F_ARB 0x8814 #define GL_RGB32F_ARB 0x8815 #define GL_ALPHA32F_ARB 0x8816 #define GL_INTENSITY32F_ARB 0x8817 #define GL_LUMINANCE32F_ARB 0x8818 #define GL_LUMINANCE_ALPHA32F_ARB 0x8819 #define GL_RGBA16F_ARB 0x881A #define GL_RGB16F_ARB 0x881B #define GL_ALPHA16F_ARB 0x881C #define GL_INTENSITY16F_ARB 0x881D #define GL_LUMINANCE16F_ARB 0x881E #define GL_LUMINANCE_ALPHA16F_ARB 0x881F #endif #ifndef GL_ARB_pixel_buffer_object #define GL_PIXEL_PACK_BUFFER_ARB 0x88EB #define GL_PIXEL_UNPACK_BUFFER_ARB 0x88EC #define GL_PIXEL_PACK_BUFFER_BINDING_ARB 0x88ED #define GL_PIXEL_UNPACK_BUFFER_BINDING_ARB 0x88EF #endif #ifndef GL_ARB_depth_buffer_float #define GL_DEPTH_COMPONENT32F 0x8CAC #define GL_DEPTH32F_STENCIL8 0x8CAD #define GL_FLOAT_32_UNSIGNED_INT_24_8_REV 0x8DAD #endif #ifndef GL_ARB_draw_instanced #endif #ifndef GL_ARB_framebuffer_object #define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506 #define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING 0x8210 #define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE 0x8211 #define GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE 0x8212 #define GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE 0x8213 #define GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE 0x8214 #define GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE 0x8215 #define GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE 0x8216 #define GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE 0x8217 #define GL_FRAMEBUFFER_DEFAULT 0x8218 #define GL_FRAMEBUFFER_UNDEFINED 0x8219 #define GL_DEPTH_STENCIL_ATTACHMENT 0x821A #define GL_INDEX 0x8222 #define GL_MAX_RENDERBUFFER_SIZE 0x84E8 #define GL_DEPTH_STENCIL 0x84F9 #define GL_UNSIGNED_INT_24_8 0x84FA #define GL_DEPTH24_STENCIL8 0x88F0 #define GL_TEXTURE_STENCIL_SIZE 0x88F1 #define GL_FRAMEBUFFER_BINDING 0x8CA6 #define GL_DRAW_FRAMEBUFFER_BINDING GL_FRAMEBUFFER_BINDING #define GL_RENDERBUFFER_BINDING 0x8CA7 #define GL_READ_FRAMEBUFFER 0x8CA8 #define GL_DRAW_FRAMEBUFFER 0x8CA9 #define GL_READ_FRAMEBUFFER_BINDING 0x8CAA #define GL_RENDERBUFFER_SAMPLES 0x8CAB #define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0 #define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4 #define GL_FRAMEBUFFER_COMPLETE 0x8CD5 #define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6 #define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7 #define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER 0x8CDB #define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER 0x8CDC #define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD #define GL_MAX_COLOR_ATTACHMENTS 0x8CDF #define GL_COLOR_ATTACHMENT0 0x8CE0 #define GL_COLOR_ATTACHMENT1 0x8CE1 #define GL_COLOR_ATTACHMENT2 0x8CE2 #define GL_COLOR_ATTACHMENT3 0x8CE3 #define GL_COLOR_ATTACHMENT4 0x8CE4 #define GL_COLOR_ATTACHMENT5 0x8CE5 #define GL_COLOR_ATTACHMENT6 0x8CE6 #define GL_COLOR_ATTACHMENT7 0x8CE7 #define GL_COLOR_ATTACHMENT8 0x8CE8 #define GL_COLOR_ATTACHMENT9 0x8CE9 #define GL_COLOR_ATTACHMENT10 0x8CEA #define GL_COLOR_ATTACHMENT11 0x8CEB #define GL_COLOR_ATTACHMENT12 0x8CEC #define GL_COLOR_ATTACHMENT13 0x8CED #define GL_COLOR_ATTACHMENT14 0x8CEE #define GL_COLOR_ATTACHMENT15 0x8CEF #define GL_DEPTH_ATTACHMENT 0x8D00 #define GL_STENCIL_ATTACHMENT 0x8D20 #define GL_FRAMEBUFFER 0x8D40 #define GL_RENDERBUFFER 0x8D41 #define GL_RENDERBUFFER_WIDTH 0x8D42 #define GL_RENDERBUFFER_HEIGHT 0x8D43 #define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44 #define GL_STENCIL_INDEX1 0x8D46 #define GL_STENCIL_INDEX4 0x8D47 #define GL_STENCIL_INDEX8 0x8D48 #define GL_STENCIL_INDEX16 0x8D49 #define GL_RENDERBUFFER_RED_SIZE 0x8D50 #define GL_RENDERBUFFER_GREEN_SIZE 0x8D51 #define GL_RENDERBUFFER_BLUE_SIZE 0x8D52 #define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53 #define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54 #define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55 #define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56 #define GL_MAX_SAMPLES 0x8D57 #endif #ifndef GL_ARB_framebuffer_sRGB #define GL_FRAMEBUFFER_SRGB 0x8DB9 #endif #ifndef GL_ARB_geometry_shader4 #define GL_LINES_ADJACENCY_ARB 0x000A #define GL_LINE_STRIP_ADJACENCY_ARB 0x000B #define GL_TRIANGLES_ADJACENCY_ARB 0x000C #define GL_TRIANGLE_STRIP_ADJACENCY_ARB 0x000D #define GL_PROGRAM_POINT_SIZE_ARB 0x8642 #define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB 0x8C29 #define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_ARB 0x8DA7 #define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB 0x8DA8 #define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB 0x8DA9 #define GL_GEOMETRY_SHADER_ARB 0x8DD9 #define GL_GEOMETRY_VERTICES_OUT_ARB 0x8DDA #define GL_GEOMETRY_INPUT_TYPE_ARB 0x8DDB #define GL_GEOMETRY_OUTPUT_TYPE_ARB 0x8DDC #define GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB 0x8DDD #define GL_MAX_VERTEX_VARYING_COMPONENTS_ARB 0x8DDE #define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB 0x8DDF #define GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB 0x8DE0 #define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB 0x8DE1 /* reuse GL_MAX_VARYING_COMPONENTS */ /* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */ #endif #ifndef GL_ARB_half_float_vertex #define GL_HALF_FLOAT 0x140B #endif #ifndef GL_ARB_instanced_arrays #endif #ifndef GL_ARB_map_buffer_range #define GL_MAP_READ_BIT 0x0001 #define GL_MAP_WRITE_BIT 0x0002 #define GL_MAP_INVALIDATE_RANGE_BIT 0x0004 #define GL_MAP_INVALIDATE_BUFFER_BIT 0x0008 #define GL_MAP_FLUSH_EXPLICIT_BIT 0x0010 #define GL_MAP_UNSYNCHRONIZED_BIT 0x0020 #endif #ifndef GL_ARB_texture_buffer_object #define GL_TEXTURE_BUFFER_ARB 0x8C2A #define GL_MAX_TEXTURE_BUFFER_SIZE_ARB 0x8C2B #define GL_TEXTURE_BINDING_BUFFER_ARB 0x8C2C #define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_ARB 0x8C2D #define GL_TEXTURE_BUFFER_FORMAT_ARB 0x8C2E #endif #ifndef GL_ARB_texture_compression_rgtc #define GL_COMPRESSED_RED_RGTC1 0x8DBB #define GL_COMPRESSED_SIGNED_RED_RGTC1 0x8DBC #define GL_COMPRESSED_RG_RGTC2 0x8DBD #define GL_COMPRESSED_SIGNED_RG_RGTC2 0x8DBE #endif #ifndef GL_ARB_texture_rg #define GL_RG 0x8227 #define GL_RG_INTEGER 0x8228 #define GL_R8 0x8229 #define GL_R16 0x822A #define GL_RG8 0x822B #define GL_RG16 0x822C #define GL_R16F 0x822D #define GL_R32F 0x822E #define GL_RG16F 0x822F #define GL_RG32F 0x8230 #define GL_R8I 0x8231 #define GL_R8UI 0x8232 #define GL_R16I 0x8233 #define GL_R16UI 0x8234 #define GL_R32I 0x8235 #define GL_R32UI 0x8236 #define GL_RG8I 0x8237 #define GL_RG8UI 0x8238 #define GL_RG16I 0x8239 #define GL_RG16UI 0x823A #define GL_RG32I 0x823B #define GL_RG32UI 0x823C #endif #ifndef GL_ARB_vertex_array_object #define GL_VERTEX_ARRAY_BINDING 0x85B5 #endif #ifndef GL_EXT_abgr #define GL_ABGR_EXT 0x8000 #endif #ifndef GL_EXT_blend_color #define GL_CONSTANT_COLOR_EXT 0x8001 #define GL_ONE_MINUS_CONSTANT_COLOR_EXT 0x8002 #define GL_CONSTANT_ALPHA_EXT 0x8003 #define GL_ONE_MINUS_CONSTANT_ALPHA_EXT 0x8004 #define GL_BLEND_COLOR_EXT 0x8005 #endif #ifndef GL_EXT_polygon_offset #define GL_POLYGON_OFFSET_EXT 0x8037 #define GL_POLYGON_OFFSET_FACTOR_EXT 0x8038 #define GL_POLYGON_OFFSET_BIAS_EXT 0x8039 #endif #ifndef GL_EXT_texture #define GL_ALPHA4_EXT 0x803B #define GL_ALPHA8_EXT 0x803C #define GL_ALPHA12_EXT 0x803D #define GL_ALPHA16_EXT 0x803E #define GL_LUMINANCE4_EXT 0x803F #define GL_LUMINANCE8_EXT 0x8040 #define GL_LUMINANCE12_EXT 0x8041 #define GL_LUMINANCE16_EXT 0x8042 #define GL_LUMINANCE4_ALPHA4_EXT 0x8043 #define GL_LUMINANCE6_ALPHA2_EXT 0x8044 #define GL_LUMINANCE8_ALPHA8_EXT 0x8045 #define GL_LUMINANCE12_ALPHA4_EXT 0x8046 #define GL_LUMINANCE12_ALPHA12_EXT 0x8047 #define GL_LUMINANCE16_ALPHA16_EXT 0x8048 #define GL_INTENSITY_EXT 0x8049 #define GL_INTENSITY4_EXT 0x804A #define GL_INTENSITY8_EXT 0x804B #define GL_INTENSITY12_EXT 0x804C #define GL_INTENSITY16_EXT 0x804D #define GL_RGB2_EXT 0x804E #define GL_RGB4_EXT 0x804F #define GL_RGB5_EXT 0x8050 #define GL_RGB8_EXT 0x8051 #define GL_RGB10_EXT 0x8052 #define GL_RGB12_EXT 0x8053 #define GL_RGB16_EXT 0x8054 #define GL_RGBA2_EXT 0x8055 #define GL_RGBA4_EXT 0x8056 #define GL_RGB5_A1_EXT 0x8057 #define GL_RGBA8_EXT 0x8058 #define GL_RGB10_A2_EXT 0x8059 #define GL_RGBA12_EXT 0x805A #define GL_RGBA16_EXT 0x805B #define GL_TEXTURE_RED_SIZE_EXT 0x805C #define GL_TEXTURE_GREEN_SIZE_EXT 0x805D #define GL_TEXTURE_BLUE_SIZE_EXT 0x805E #define GL_TEXTURE_ALPHA_SIZE_EXT 0x805F #define GL_TEXTURE_LUMINANCE_SIZE_EXT 0x8060 #define GL_TEXTURE_INTENSITY_SIZE_EXT 0x8061 #define GL_REPLACE_EXT 0x8062 #define GL_PROXY_TEXTURE_1D_EXT 0x8063 #define GL_PROXY_TEXTURE_2D_EXT 0x8064 #define GL_TEXTURE_TOO_LARGE_EXT 0x8065 #endif #ifndef GL_EXT_texture3D #define GL_PACK_SKIP_IMAGES_EXT 0x806B #define GL_PACK_IMAGE_HEIGHT_EXT 0x806C #define GL_UNPACK_SKIP_IMAGES_EXT 0x806D #define GL_UNPACK_IMAGE_HEIGHT_EXT 0x806E #define GL_TEXTURE_3D_EXT 0x806F #define GL_PROXY_TEXTURE_3D_EXT 0x8070 #define GL_TEXTURE_DEPTH_EXT 0x8071 #define GL_TEXTURE_WRAP_R_EXT 0x8072 #define GL_MAX_3D_TEXTURE_SIZE_EXT 0x8073 #endif #ifndef GL_SGIS_texture_filter4 #define GL_FILTER4_SGIS 0x8146 #define GL_TEXTURE_FILTER4_SIZE_SGIS 0x8147 #endif #ifndef GL_EXT_subtexture #endif #ifndef GL_EXT_copy_texture #endif #ifndef GL_EXT_histogram #define GL_HISTOGRAM_EXT 0x8024 #define GL_PROXY_HISTOGRAM_EXT 0x8025 #define GL_HISTOGRAM_WIDTH_EXT 0x8026 #define GL_HISTOGRAM_FORMAT_EXT 0x8027 #define GL_HISTOGRAM_RED_SIZE_EXT 0x8028 #define GL_HISTOGRAM_GREEN_SIZE_EXT 0x8029 #define GL_HISTOGRAM_BLUE_SIZE_EXT 0x802A #define GL_HISTOGRAM_ALPHA_SIZE_EXT 0x802B #define GL_HISTOGRAM_LUMINANCE_SIZE_EXT 0x802C #define GL_HISTOGRAM_SINK_EXT 0x802D #define GL_MINMAX_EXT 0x802E #define GL_MINMAX_FORMAT_EXT 0x802F #define GL_MINMAX_SINK_EXT 0x8030 #define GL_TABLE_TOO_LARGE_EXT 0x8031 #endif #ifndef GL_EXT_convolution #define GL_CONVOLUTION_1D_EXT 0x8010 #define GL_CONVOLUTION_2D_EXT 0x8011 #define GL_SEPARABLE_2D_EXT 0x8012 #define GL_CONVOLUTION_BORDER_MODE_EXT 0x8013 #define GL_CONVOLUTION_FILTER_SCALE_EXT 0x8014 #define GL_CONVOLUTION_FILTER_BIAS_EXT 0x8015 #define GL_REDUCE_EXT 0x8016 #define GL_CONVOLUTION_FORMAT_EXT 0x8017 #define GL_CONVOLUTION_WIDTH_EXT 0x8018 #define GL_CONVOLUTION_HEIGHT_EXT 0x8019 #define GL_MAX_CONVOLUTION_WIDTH_EXT 0x801A #define GL_MAX_CONVOLUTION_HEIGHT_EXT 0x801B #define GL_POST_CONVOLUTION_RED_SCALE_EXT 0x801C #define GL_POST_CONVOLUTION_GREEN_SCALE_EXT 0x801D #define GL_POST_CONVOLUTION_BLUE_SCALE_EXT 0x801E #define GL_POST_CONVOLUTION_ALPHA_SCALE_EXT 0x801F #define GL_POST_CONVOLUTION_RED_BIAS_EXT 0x8020 #define GL_POST_CONVOLUTION_GREEN_BIAS_EXT 0x8021 #define GL_POST_CONVOLUTION_BLUE_BIAS_EXT 0x8022 #define GL_POST_CONVOLUTION_ALPHA_BIAS_EXT 0x8023 #endif #ifndef GL_SGI_color_matrix #define GL_COLOR_MATRIX_SGI 0x80B1 #define GL_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B2 #define GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B3 #define GL_POST_COLOR_MATRIX_RED_SCALE_SGI 0x80B4 #define GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI 0x80B5 #define GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI 0x80B6 #define GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI 0x80B7 #define GL_POST_COLOR_MATRIX_RED_BIAS_SGI 0x80B8 #define GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI 0x80B9 #define GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI 0x80BA #define GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI 0x80BB #endif #ifndef GL_SGI_color_table #define GL_COLOR_TABLE_SGI 0x80D0 #define GL_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D1 #define GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D2 #define GL_PROXY_COLOR_TABLE_SGI 0x80D3 #define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D4 #define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D5 #define GL_COLOR_TABLE_SCALE_SGI 0x80D6 #define GL_COLOR_TABLE_BIAS_SGI 0x80D7 #define GL_COLOR_TABLE_FORMAT_SGI 0x80D8 #define GL_COLOR_TABLE_WIDTH_SGI 0x80D9 #define GL_COLOR_TABLE_RED_SIZE_SGI 0x80DA #define GL_COLOR_TABLE_GREEN_SIZE_SGI 0x80DB #define GL_COLOR_TABLE_BLUE_SIZE_SGI 0x80DC #define GL_COLOR_TABLE_ALPHA_SIZE_SGI 0x80DD #define GL_COLOR_TABLE_LUMINANCE_SIZE_SGI 0x80DE #define GL_COLOR_TABLE_INTENSITY_SIZE_SGI 0x80DF #endif #ifndef GL_SGIS_pixel_texture #define GL_PIXEL_TEXTURE_SGIS 0x8353 #define GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS 0x8354 #define GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS 0x8355 #define GL_PIXEL_GROUP_COLOR_SGIS 0x8356 #endif #ifndef GL_SGIX_pixel_texture #define GL_PIXEL_TEX_GEN_SGIX 0x8139 #define GL_PIXEL_TEX_GEN_MODE_SGIX 0x832B #endif #ifndef GL_SGIS_texture4D #define GL_PACK_SKIP_VOLUMES_SGIS 0x8130 #define GL_PACK_IMAGE_DEPTH_SGIS 0x8131 #define GL_UNPACK_SKIP_VOLUMES_SGIS 0x8132 #define GL_UNPACK_IMAGE_DEPTH_SGIS 0x8133 #define GL_TEXTURE_4D_SGIS 0x8134 #define GL_PROXY_TEXTURE_4D_SGIS 0x8135 #define GL_TEXTURE_4DSIZE_SGIS 0x8136 #define GL_TEXTURE_WRAP_Q_SGIS 0x8137 #define GL_MAX_4D_TEXTURE_SIZE_SGIS 0x8138 #define GL_TEXTURE_4D_BINDING_SGIS 0x814F #endif #ifndef GL_SGI_texture_color_table #define GL_TEXTURE_COLOR_TABLE_SGI 0x80BC #define GL_PROXY_TEXTURE_COLOR_TABLE_SGI 0x80BD #endif #ifndef GL_EXT_cmyka #define GL_CMYK_EXT 0x800C #define GL_CMYKA_EXT 0x800D #define GL_PACK_CMYK_HINT_EXT 0x800E #define GL_UNPACK_CMYK_HINT_EXT 0x800F #endif #ifndef GL_EXT_texture_object #define GL_TEXTURE_PRIORITY_EXT 0x8066 #define GL_TEXTURE_RESIDENT_EXT 0x8067 #define GL_TEXTURE_1D_BINDING_EXT 0x8068 #define GL_TEXTURE_2D_BINDING_EXT 0x8069 #define GL_TEXTURE_3D_BINDING_EXT 0x806A #endif #ifndef GL_SGIS_detail_texture #define GL_DETAIL_TEXTURE_2D_SGIS 0x8095 #define GL_DETAIL_TEXTURE_2D_BINDING_SGIS 0x8096 #define GL_LINEAR_DETAIL_SGIS 0x8097 #define GL_LINEAR_DETAIL_ALPHA_SGIS 0x8098 #define GL_LINEAR_DETAIL_COLOR_SGIS 0x8099 #define GL_DETAIL_TEXTURE_LEVEL_SGIS 0x809A #define GL_DETAIL_TEXTURE_MODE_SGIS 0x809B #define GL_DETAIL_TEXTURE_FUNC_POINTS_SGIS 0x809C #endif #ifndef GL_SGIS_sharpen_texture #define GL_LINEAR_SHARPEN_SGIS 0x80AD #define GL_LINEAR_SHARPEN_ALPHA_SGIS 0x80AE #define GL_LINEAR_SHARPEN_COLOR_SGIS 0x80AF #define GL_SHARPEN_TEXTURE_FUNC_POINTS_SGIS 0x80B0 #endif #ifndef GL_EXT_packed_pixels #define GL_UNSIGNED_BYTE_3_3_2_EXT 0x8032 #define GL_UNSIGNED_SHORT_4_4_4_4_EXT 0x8033 #define GL_UNSIGNED_SHORT_5_5_5_1_EXT 0x8034 #define GL_UNSIGNED_INT_8_8_8_8_EXT 0x8035 #define GL_UNSIGNED_INT_10_10_10_2_EXT 0x8036 #endif #ifndef GL_SGIS_texture_lod #define GL_TEXTURE_MIN_LOD_SGIS 0x813A #define GL_TEXTURE_MAX_LOD_SGIS 0x813B #define GL_TEXTURE_BASE_LEVEL_SGIS 0x813C #define GL_TEXTURE_MAX_LEVEL_SGIS 0x813D #endif #ifndef GL_SGIS_multisample #define GL_MULTISAMPLE_SGIS 0x809D #define GL_SAMPLE_ALPHA_TO_MASK_SGIS 0x809E #define GL_SAMPLE_ALPHA_TO_ONE_SGIS 0x809F #define GL_SAMPLE_MASK_SGIS 0x80A0 #define GL_1PASS_SGIS 0x80A1 #define GL_2PASS_0_SGIS 0x80A2 #define GL_2PASS_1_SGIS 0x80A3 #define GL_4PASS_0_SGIS 0x80A4 #define GL_4PASS_1_SGIS 0x80A5 #define GL_4PASS_2_SGIS 0x80A6 #define GL_4PASS_3_SGIS 0x80A7 #define GL_SAMPLE_BUFFERS_SGIS 0x80A8 #define GL_SAMPLES_SGIS 0x80A9 #define GL_SAMPLE_MASK_VALUE_SGIS 0x80AA #define GL_SAMPLE_MASK_INVERT_SGIS 0x80AB #define GL_SAMPLE_PATTERN_SGIS 0x80AC #endif #ifndef GL_EXT_rescale_normal #define GL_RESCALE_NORMAL_EXT 0x803A #endif #ifndef GL_EXT_vertex_array #define GL_VERTEX_ARRAY_EXT 0x8074 #define GL_NORMAL_ARRAY_EXT 0x8075 #define GL_COLOR_ARRAY_EXT 0x8076 #define GL_INDEX_ARRAY_EXT 0x8077 #define GL_TEXTURE_COORD_ARRAY_EXT 0x8078 #define GL_EDGE_FLAG_ARRAY_EXT 0x8079 #define GL_VERTEX_ARRAY_SIZE_EXT 0x807A #define GL_VERTEX_ARRAY_TYPE_EXT 0x807B #define GL_VERTEX_ARRAY_STRIDE_EXT 0x807C #define GL_VERTEX_ARRAY_COUNT_EXT 0x807D #define GL_NORMAL_ARRAY_TYPE_EXT 0x807E #define GL_NORMAL_ARRAY_STRIDE_EXT 0x807F #define GL_NORMAL_ARRAY_COUNT_EXT 0x8080 #define GL_COLOR_ARRAY_SIZE_EXT 0x8081 #define GL_COLOR_ARRAY_TYPE_EXT 0x8082 #define GL_COLOR_ARRAY_STRIDE_EXT 0x8083 #define GL_COLOR_ARRAY_COUNT_EXT 0x8084 #define GL_INDEX_ARRAY_TYPE_EXT 0x8085 #define GL_INDEX_ARRAY_STRIDE_EXT 0x8086 #define GL_INDEX_ARRAY_COUNT_EXT 0x8087 #define GL_TEXTURE_COORD_ARRAY_SIZE_EXT 0x8088 #define GL_TEXTURE_COORD_ARRAY_TYPE_EXT 0x8089 #define GL_TEXTURE_COORD_ARRAY_STRIDE_EXT 0x808A #define GL_TEXTURE_COORD_ARRAY_COUNT_EXT 0x808B #define GL_EDGE_FLAG_ARRAY_STRIDE_EXT 0x808C #define GL_EDGE_FLAG_ARRAY_COUNT_EXT 0x808D #define GL_VERTEX_ARRAY_POINTER_EXT 0x808E #define GL_NORMAL_ARRAY_POINTER_EXT 0x808F #define GL_COLOR_ARRAY_POINTER_EXT 0x8090 #define GL_INDEX_ARRAY_POINTER_EXT 0x8091 #define GL_TEXTURE_COORD_ARRAY_POINTER_EXT 0x8092 #define GL_EDGE_FLAG_ARRAY_POINTER_EXT 0x8093 #endif #ifndef GL_EXT_misc_attribute #endif #ifndef GL_SGIS_generate_mipmap #define GL_GENERATE_MIPMAP_SGIS 0x8191 #define GL_GENERATE_MIPMAP_HINT_SGIS 0x8192 #endif #ifndef GL_SGIX_clipmap #define GL_LINEAR_CLIPMAP_LINEAR_SGIX 0x8170 #define GL_TEXTURE_CLIPMAP_CENTER_SGIX 0x8171 #define GL_TEXTURE_CLIPMAP_FRAME_SGIX 0x8172 #define GL_TEXTURE_CLIPMAP_OFFSET_SGIX 0x8173 #define GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8174 #define GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX 0x8175 #define GL_TEXTURE_CLIPMAP_DEPTH_SGIX 0x8176 #define GL_MAX_CLIPMAP_DEPTH_SGIX 0x8177 #define GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8178 #define GL_NEAREST_CLIPMAP_NEAREST_SGIX 0x844D #define GL_NEAREST_CLIPMAP_LINEAR_SGIX 0x844E #define GL_LINEAR_CLIPMAP_NEAREST_SGIX 0x844F #endif #ifndef GL_SGIX_shadow #define GL_TEXTURE_COMPARE_SGIX 0x819A #define GL_TEXTURE_COMPARE_OPERATOR_SGIX 0x819B #define GL_TEXTURE_LEQUAL_R_SGIX 0x819C #define GL_TEXTURE_GEQUAL_R_SGIX 0x819D #endif #ifndef GL_SGIS_texture_edge_clamp #define GL_CLAMP_TO_EDGE_SGIS 0x812F #endif #ifndef GL_SGIS_texture_border_clamp #define GL_CLAMP_TO_BORDER_SGIS 0x812D #endif #ifndef GL_EXT_blend_minmax #define GL_FUNC_ADD_EXT 0x8006 #define GL_MIN_EXT 0x8007 #define GL_MAX_EXT 0x8008 #define GL_BLEND_EQUATION_EXT 0x8009 #endif #ifndef GL_EXT_blend_subtract #define GL_FUNC_SUBTRACT_EXT 0x800A #define GL_FUNC_REVERSE_SUBTRACT_EXT 0x800B #endif #ifndef GL_EXT_blend_logic_op #endif #ifndef GL_SGIX_interlace #define GL_INTERLACE_SGIX 0x8094 #endif #ifndef GL_SGIX_pixel_tiles #define GL_PIXEL_TILE_BEST_ALIGNMENT_SGIX 0x813E #define GL_PIXEL_TILE_CACHE_INCREMENT_SGIX 0x813F #define GL_PIXEL_TILE_WIDTH_SGIX 0x8140 #define GL_PIXEL_TILE_HEIGHT_SGIX 0x8141 #define GL_PIXEL_TILE_GRID_WIDTH_SGIX 0x8142 #define GL_PIXEL_TILE_GRID_HEIGHT_SGIX 0x8143 #define GL_PIXEL_TILE_GRID_DEPTH_SGIX 0x8144 #define GL_PIXEL_TILE_CACHE_SIZE_SGIX 0x8145 #endif #ifndef GL_SGIS_texture_select #define GL_DUAL_ALPHA4_SGIS 0x8110 #define GL_DUAL_ALPHA8_SGIS 0x8111 #define GL_DUAL_ALPHA12_SGIS 0x8112 #define GL_DUAL_ALPHA16_SGIS 0x8113 #define GL_DUAL_LUMINANCE4_SGIS 0x8114 #define GL_DUAL_LUMINANCE8_SGIS 0x8115 #define GL_DUAL_LUMINANCE12_SGIS 0x8116 #define GL_DUAL_LUMINANCE16_SGIS 0x8117 #define GL_DUAL_INTENSITY4_SGIS 0x8118 #define GL_DUAL_INTENSITY8_SGIS 0x8119 #define GL_DUAL_INTENSITY12_SGIS 0x811A #define GL_DUAL_INTENSITY16_SGIS 0x811B #define GL_DUAL_LUMINANCE_ALPHA4_SGIS 0x811C #define GL_DUAL_LUMINANCE_ALPHA8_SGIS 0x811D #define GL_QUAD_ALPHA4_SGIS 0x811E #define GL_QUAD_ALPHA8_SGIS 0x811F #define GL_QUAD_LUMINANCE4_SGIS 0x8120 #define GL_QUAD_LUMINANCE8_SGIS 0x8121 #define GL_QUAD_INTENSITY4_SGIS 0x8122 #define GL_QUAD_INTENSITY8_SGIS 0x8123 #define GL_DUAL_TEXTURE_SELECT_SGIS 0x8124 #define GL_QUAD_TEXTURE_SELECT_SGIS 0x8125 #endif #ifndef GL_SGIX_sprite #define GL_SPRITE_SGIX 0x8148 #define GL_SPRITE_MODE_SGIX 0x8149 #define GL_SPRITE_AXIS_SGIX 0x814A #define GL_SPRITE_TRANSLATION_SGIX 0x814B #define GL_SPRITE_AXIAL_SGIX 0x814C #define GL_SPRITE_OBJECT_ALIGNED_SGIX 0x814D #define GL_SPRITE_EYE_ALIGNED_SGIX 0x814E #endif #ifndef GL_SGIX_texture_multi_buffer #define GL_TEXTURE_MULTI_BUFFER_HINT_SGIX 0x812E #endif #ifndef GL_EXT_point_parameters #define GL_POINT_SIZE_MIN_EXT 0x8126 #define GL_POINT_SIZE_MAX_EXT 0x8127 #define GL_POINT_FADE_THRESHOLD_SIZE_EXT 0x8128 #define GL_DISTANCE_ATTENUATION_EXT 0x8129 #endif #ifndef GL_SGIS_point_parameters #define GL_POINT_SIZE_MIN_SGIS 0x8126 #define GL_POINT_SIZE_MAX_SGIS 0x8127 #define GL_POINT_FADE_THRESHOLD_SIZE_SGIS 0x8128 #define GL_DISTANCE_ATTENUATION_SGIS 0x8129 #endif #ifndef GL_SGIX_instruments #define GL_INSTRUMENT_BUFFER_POINTER_SGIX 0x8180 #define GL_INSTRUMENT_MEASUREMENTS_SGIX 0x8181 #endif #ifndef GL_SGIX_texture_scale_bias #define GL_POST_TEXTURE_FILTER_BIAS_SGIX 0x8179 #define GL_POST_TEXTURE_FILTER_SCALE_SGIX 0x817A #define GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX 0x817B #define GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX 0x817C #endif #ifndef GL_SGIX_framezoom #define GL_FRAMEZOOM_SGIX 0x818B #define GL_FRAMEZOOM_FACTOR_SGIX 0x818C #define GL_MAX_FRAMEZOOM_FACTOR_SGIX 0x818D #endif #ifndef GL_SGIX_tag_sample_buffer #endif #ifndef GL_FfdMaskSGIX #define GL_TEXTURE_DEFORMATION_BIT_SGIX 0x00000001 #define GL_GEOMETRY_DEFORMATION_BIT_SGIX 0x00000002 #endif #ifndef GL_SGIX_polynomial_ffd #define GL_GEOMETRY_DEFORMATION_SGIX 0x8194 #define GL_TEXTURE_DEFORMATION_SGIX 0x8195 #define GL_DEFORMATIONS_MASK_SGIX 0x8196 #define GL_MAX_DEFORMATION_ORDER_SGIX 0x8197 #endif #ifndef GL_SGIX_reference_plane #define GL_REFERENCE_PLANE_SGIX 0x817D #define GL_REFERENCE_PLANE_EQUATION_SGIX 0x817E #endif #ifndef GL_SGIX_flush_raster #endif #ifndef GL_SGIX_depth_texture #define GL_DEPTH_COMPONENT16_SGIX 0x81A5 #define GL_DEPTH_COMPONENT24_SGIX 0x81A6 #define GL_DEPTH_COMPONENT32_SGIX 0x81A7 #endif #ifndef GL_SGIS_fog_function #define GL_FOG_FUNC_SGIS 0x812A #define GL_FOG_FUNC_POINTS_SGIS 0x812B #define GL_MAX_FOG_FUNC_POINTS_SGIS 0x812C #endif #ifndef GL_SGIX_fog_offset #define GL_FOG_OFFSET_SGIX 0x8198 #define GL_FOG_OFFSET_VALUE_SGIX 0x8199 #endif #ifndef GL_HP_image_transform #define GL_IMAGE_SCALE_X_HP 0x8155 #define GL_IMAGE_SCALE_Y_HP 0x8156 #define GL_IMAGE_TRANSLATE_X_HP 0x8157 #define GL_IMAGE_TRANSLATE_Y_HP 0x8158 #define GL_IMAGE_ROTATE_ANGLE_HP 0x8159 #define GL_IMAGE_ROTATE_ORIGIN_X_HP 0x815A #define GL_IMAGE_ROTATE_ORIGIN_Y_HP 0x815B #define GL_IMAGE_MAG_FILTER_HP 0x815C #define GL_IMAGE_MIN_FILTER_HP 0x815D #define GL_IMAGE_CUBIC_WEIGHT_HP 0x815E #define GL_CUBIC_HP 0x815F #define GL_AVERAGE_HP 0x8160 #define GL_IMAGE_TRANSFORM_2D_HP 0x8161 #define GL_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8162 #define GL_PROXY_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8163 #endif #ifndef GL_HP_convolution_border_modes #define GL_IGNORE_BORDER_HP 0x8150 #define GL_CONSTANT_BORDER_HP 0x8151 #define GL_REPLICATE_BORDER_HP 0x8153 #define GL_CONVOLUTION_BORDER_COLOR_HP 0x8154 #endif #ifndef GL_INGR_palette_buffer #endif #ifndef GL_SGIX_texture_add_env #define GL_TEXTURE_ENV_BIAS_SGIX 0x80BE #endif #ifndef GL_EXT_color_subtable #endif #ifndef GL_PGI_vertex_hints #define GL_VERTEX_DATA_HINT_PGI 0x1A22A #define GL_VERTEX_CONSISTENT_HINT_PGI 0x1A22B #define GL_MATERIAL_SIDE_HINT_PGI 0x1A22C #define GL_MAX_VERTEX_HINT_PGI 0x1A22D #define GL_COLOR3_BIT_PGI 0x00010000 #define GL_COLOR4_BIT_PGI 0x00020000 #define GL_EDGEFLAG_BIT_PGI 0x00040000 #define GL_INDEX_BIT_PGI 0x00080000 #define GL_MAT_AMBIENT_BIT_PGI 0x00100000 #define GL_MAT_AMBIENT_AND_DIFFUSE_BIT_PGI 0x00200000 #define GL_MAT_DIFFUSE_BIT_PGI 0x00400000 #define GL_MAT_EMISSION_BIT_PGI 0x00800000 #define GL_MAT_COLOR_INDEXES_BIT_PGI 0x01000000 #define GL_MAT_SHININESS_BIT_PGI 0x02000000 #define GL_MAT_SPECULAR_BIT_PGI 0x04000000 #define GL_NORMAL_BIT_PGI 0x08000000 #define GL_TEXCOORD1_BIT_PGI 0x10000000 #define GL_TEXCOORD2_BIT_PGI 0x20000000 #define GL_TEXCOORD3_BIT_PGI 0x40000000 #define GL_TEXCOORD4_BIT_PGI 0x80000000 #define GL_VERTEX23_BIT_PGI 0x00000004 #define GL_VERTEX4_BIT_PGI 0x00000008 #endif #ifndef GL_PGI_misc_hints #define GL_PREFER_DOUBLEBUFFER_HINT_PGI 0x1A1F8 #define GL_CONSERVE_MEMORY_HINT_PGI 0x1A1FD #define GL_RECLAIM_MEMORY_HINT_PGI 0x1A1FE #define GL_NATIVE_GRAPHICS_HANDLE_PGI 0x1A202 #define GL_NATIVE_GRAPHICS_BEGIN_HINT_PGI 0x1A203 #define GL_NATIVE_GRAPHICS_END_HINT_PGI 0x1A204 #define GL_ALWAYS_FAST_HINT_PGI 0x1A20C #define GL_ALWAYS_SOFT_HINT_PGI 0x1A20D #define GL_ALLOW_DRAW_OBJ_HINT_PGI 0x1A20E #define GL_ALLOW_DRAW_WIN_HINT_PGI 0x1A20F #define GL_ALLOW_DRAW_FRG_HINT_PGI 0x1A210 #define GL_ALLOW_DRAW_MEM_HINT_PGI 0x1A211 #define GL_STRICT_DEPTHFUNC_HINT_PGI 0x1A216 #define GL_STRICT_LIGHTING_HINT_PGI 0x1A217 #define GL_STRICT_SCISSOR_HINT_PGI 0x1A218 #define GL_FULL_STIPPLE_HINT_PGI 0x1A219 #define GL_CLIP_NEAR_HINT_PGI 0x1A220 #define GL_CLIP_FAR_HINT_PGI 0x1A221 #define GL_WIDE_LINE_HINT_PGI 0x1A222 #define GL_BACK_NORMALS_HINT_PGI 0x1A223 #endif #ifndef GL_EXT_paletted_texture #define GL_COLOR_INDEX1_EXT 0x80E2 #define GL_COLOR_INDEX2_EXT 0x80E3 #define GL_COLOR_INDEX4_EXT 0x80E4 #define GL_COLOR_INDEX8_EXT 0x80E5 #define GL_COLOR_INDEX12_EXT 0x80E6 #define GL_COLOR_INDEX16_EXT 0x80E7 #define GL_TEXTURE_INDEX_SIZE_EXT 0x80ED #endif #ifndef GL_EXT_clip_volume_hint #define GL_CLIP_VOLUME_CLIPPING_HINT_EXT 0x80F0 #endif #ifndef GL_SGIX_list_priority #define GL_LIST_PRIORITY_SGIX 0x8182 #endif #ifndef GL_SGIX_ir_instrument1 #define GL_IR_INSTRUMENT1_SGIX 0x817F #endif #ifndef GL_SGIX_calligraphic_fragment #define GL_CALLIGRAPHIC_FRAGMENT_SGIX 0x8183 #endif #ifndef GL_SGIX_texture_lod_bias #define GL_TEXTURE_LOD_BIAS_S_SGIX 0x818E #define GL_TEXTURE_LOD_BIAS_T_SGIX 0x818F #define GL_TEXTURE_LOD_BIAS_R_SGIX 0x8190 #endif #ifndef GL_SGIX_shadow_ambient #define GL_SHADOW_AMBIENT_SGIX 0x80BF #endif #ifndef GL_EXT_index_texture #endif #ifndef GL_EXT_index_material #define GL_INDEX_MATERIAL_EXT 0x81B8 #define GL_INDEX_MATERIAL_PARAMETER_EXT 0x81B9 #define GL_INDEX_MATERIAL_FACE_EXT 0x81BA #endif #ifndef GL_EXT_index_func #define GL_INDEX_TEST_EXT 0x81B5 #define GL_INDEX_TEST_FUNC_EXT 0x81B6 #define GL_INDEX_TEST_REF_EXT 0x81B7 #endif #ifndef GL_EXT_index_array_formats #define GL_IUI_V2F_EXT 0x81AD #define GL_IUI_V3F_EXT 0x81AE #define GL_IUI_N3F_V2F_EXT 0x81AF #define GL_IUI_N3F_V3F_EXT 0x81B0 #define GL_T2F_IUI_V2F_EXT 0x81B1 #define GL_T2F_IUI_V3F_EXT 0x81B2 #define GL_T2F_IUI_N3F_V2F_EXT 0x81B3 #define GL_T2F_IUI_N3F_V3F_EXT 0x81B4 #endif #ifndef GL_EXT_compiled_vertex_array #define GL_ARRAY_ELEMENT_LOCK_FIRST_EXT 0x81A8 #define GL_ARRAY_ELEMENT_LOCK_COUNT_EXT 0x81A9 #endif #ifndef GL_EXT_cull_vertex #define GL_CULL_VERTEX_EXT 0x81AA #define GL_CULL_VERTEX_EYE_POSITION_EXT 0x81AB #define GL_CULL_VERTEX_OBJECT_POSITION_EXT 0x81AC #endif #ifndef GL_SGIX_ycrcb #define GL_YCRCB_422_SGIX 0x81BB #define GL_YCRCB_444_SGIX 0x81BC #endif #ifndef GL_SGIX_fragment_lighting #define GL_FRAGMENT_LIGHTING_SGIX 0x8400 #define GL_FRAGMENT_COLOR_MATERIAL_SGIX 0x8401 #define GL_FRAGMENT_COLOR_MATERIAL_FACE_SGIX 0x8402 #define GL_FRAGMENT_COLOR_MATERIAL_PARAMETER_SGIX 0x8403 #define GL_MAX_FRAGMENT_LIGHTS_SGIX 0x8404 #define GL_MAX_ACTIVE_LIGHTS_SGIX 0x8405 #define GL_CURRENT_RASTER_NORMAL_SGIX 0x8406 #define GL_LIGHT_ENV_MODE_SGIX 0x8407 #define GL_FRAGMENT_LIGHT_MODEL_LOCAL_VIEWER_SGIX 0x8408 #define GL_FRAGMENT_LIGHT_MODEL_TWO_SIDE_SGIX 0x8409 #define GL_FRAGMENT_LIGHT_MODEL_AMBIENT_SGIX 0x840A #define GL_FRAGMENT_LIGHT_MODEL_NORMAL_INTERPOLATION_SGIX 0x840B #define GL_FRAGMENT_LIGHT0_SGIX 0x840C #define GL_FRAGMENT_LIGHT1_SGIX 0x840D #define GL_FRAGMENT_LIGHT2_SGIX 0x840E #define GL_FRAGMENT_LIGHT3_SGIX 0x840F #define GL_FRAGMENT_LIGHT4_SGIX 0x8410 #define GL_FRAGMENT_LIGHT5_SGIX 0x8411 #define GL_FRAGMENT_LIGHT6_SGIX 0x8412 #define GL_FRAGMENT_LIGHT7_SGIX 0x8413 #endif #ifndef GL_IBM_rasterpos_clip #define GL_RASTER_POSITION_UNCLIPPED_IBM 0x19262 #endif #ifndef GL_HP_texture_lighting #define GL_TEXTURE_LIGHTING_MODE_HP 0x8167 #define GL_TEXTURE_POST_SPECULAR_HP 0x8168 #define GL_TEXTURE_PRE_SPECULAR_HP 0x8169 #endif #ifndef GL_EXT_draw_range_elements #define GL_MAX_ELEMENTS_VERTICES_EXT 0x80E8 #define GL_MAX_ELEMENTS_INDICES_EXT 0x80E9 #endif #ifndef GL_WIN_phong_shading #define GL_PHONG_WIN 0x80EA #define GL_PHONG_HINT_WIN 0x80EB #endif #ifndef GL_WIN_specular_fog #define GL_FOG_SPECULAR_TEXTURE_WIN 0x80EC #endif #ifndef GL_EXT_light_texture #define GL_FRAGMENT_MATERIAL_EXT 0x8349 #define GL_FRAGMENT_NORMAL_EXT 0x834A #define GL_FRAGMENT_COLOR_EXT 0x834C #define GL_ATTENUATION_EXT 0x834D #define GL_SHADOW_ATTENUATION_EXT 0x834E #define GL_TEXTURE_APPLICATION_MODE_EXT 0x834F #define GL_TEXTURE_LIGHT_EXT 0x8350 #define GL_TEXTURE_MATERIAL_FACE_EXT 0x8351 #define GL_TEXTURE_MATERIAL_PARAMETER_EXT 0x8352 /* reuse GL_FRAGMENT_DEPTH_EXT */ #endif #ifndef GL_SGIX_blend_alpha_minmax #define GL_ALPHA_MIN_SGIX 0x8320 #define GL_ALPHA_MAX_SGIX 0x8321 #endif #ifndef GL_SGIX_impact_pixel_texture #define GL_PIXEL_TEX_GEN_Q_CEILING_SGIX 0x8184 #define GL_PIXEL_TEX_GEN_Q_ROUND_SGIX 0x8185 #define GL_PIXEL_TEX_GEN_Q_FLOOR_SGIX 0x8186 #define GL_PIXEL_TEX_GEN_ALPHA_REPLACE_SGIX 0x8187 #define GL_PIXEL_TEX_GEN_ALPHA_NO_REPLACE_SGIX 0x8188 #define GL_PIXEL_TEX_GEN_ALPHA_LS_SGIX 0x8189 #define GL_PIXEL_TEX_GEN_ALPHA_MS_SGIX 0x818A #endif #ifndef GL_EXT_bgra #define GL_BGR_EXT 0x80E0 #define GL_BGRA_EXT 0x80E1 #endif #ifndef GL_SGIX_async #define GL_ASYNC_MARKER_SGIX 0x8329 #endif #ifndef GL_SGIX_async_pixel #define GL_ASYNC_TEX_IMAGE_SGIX 0x835C #define GL_ASYNC_DRAW_PIXELS_SGIX 0x835D #define GL_ASYNC_READ_PIXELS_SGIX 0x835E #define GL_MAX_ASYNC_TEX_IMAGE_SGIX 0x835F #define GL_MAX_ASYNC_DRAW_PIXELS_SGIX 0x8360 #define GL_MAX_ASYNC_READ_PIXELS_SGIX 0x8361 #endif #ifndef GL_SGIX_async_histogram #define GL_ASYNC_HISTOGRAM_SGIX 0x832C #define GL_MAX_ASYNC_HISTOGRAM_SGIX 0x832D #endif #ifndef GL_INTEL_texture_scissor #endif #ifndef GL_INTEL_parallel_arrays #define GL_PARALLEL_ARRAYS_INTEL 0x83F4 #define GL_VERTEX_ARRAY_PARALLEL_POINTERS_INTEL 0x83F5 #define GL_NORMAL_ARRAY_PARALLEL_POINTERS_INTEL 0x83F6 #define GL_COLOR_ARRAY_PARALLEL_POINTERS_INTEL 0x83F7 #define GL_TEXTURE_COORD_ARRAY_PARALLEL_POINTERS_INTEL 0x83F8 #endif #ifndef GL_HP_occlusion_test #define GL_OCCLUSION_TEST_HP 0x8165 #define GL_OCCLUSION_TEST_RESULT_HP 0x8166 #endif #ifndef GL_EXT_pixel_transform #define GL_PIXEL_TRANSFORM_2D_EXT 0x8330 #define GL_PIXEL_MAG_FILTER_EXT 0x8331 #define GL_PIXEL_MIN_FILTER_EXT 0x8332 #define GL_PIXEL_CUBIC_WEIGHT_EXT 0x8333 #define GL_CUBIC_EXT 0x8334 #define GL_AVERAGE_EXT 0x8335 #define GL_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8336 #define GL_MAX_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8337 #define GL_PIXEL_TRANSFORM_2D_MATRIX_EXT 0x8338 #endif #ifndef GL_EXT_pixel_transform_color_table #endif #ifndef GL_EXT_shared_texture_palette #define GL_SHARED_TEXTURE_PALETTE_EXT 0x81FB #endif #ifndef GL_EXT_separate_specular_color #define GL_LIGHT_MODEL_COLOR_CONTROL_EXT 0x81F8 #define GL_SINGLE_COLOR_EXT 0x81F9 #define GL_SEPARATE_SPECULAR_COLOR_EXT 0x81FA #endif #ifndef GL_EXT_secondary_color #define GL_COLOR_SUM_EXT 0x8458 #define GL_CURRENT_SECONDARY_COLOR_EXT 0x8459 #define GL_SECONDARY_COLOR_ARRAY_SIZE_EXT 0x845A #define GL_SECONDARY_COLOR_ARRAY_TYPE_EXT 0x845B #define GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT 0x845C #define GL_SECONDARY_COLOR_ARRAY_POINTER_EXT 0x845D #define GL_SECONDARY_COLOR_ARRAY_EXT 0x845E #endif #ifndef GL_EXT_texture_perturb_normal #define GL_PERTURB_EXT 0x85AE #define GL_TEXTURE_NORMAL_EXT 0x85AF #endif #ifndef GL_EXT_multi_draw_arrays #endif #ifndef GL_EXT_fog_coord #define GL_FOG_COORDINATE_SOURCE_EXT 0x8450 #define GL_FOG_COORDINATE_EXT 0x8451 #define GL_FRAGMENT_DEPTH_EXT 0x8452 #define GL_CURRENT_FOG_COORDINATE_EXT 0x8453 #define GL_FOG_COORDINATE_ARRAY_TYPE_EXT 0x8454 #define GL_FOG_COORDINATE_ARRAY_STRIDE_EXT 0x8455 #define GL_FOG_COORDINATE_ARRAY_POINTER_EXT 0x8456 #define GL_FOG_COORDINATE_ARRAY_EXT 0x8457 #endif #ifndef GL_REND_screen_coordinates #define GL_SCREEN_COORDINATES_REND 0x8490 #define GL_INVERTED_SCREEN_W_REND 0x8491 #endif #ifndef GL_EXT_coordinate_frame #define GL_TANGENT_ARRAY_EXT 0x8439 #define GL_BINORMAL_ARRAY_EXT 0x843A #define GL_CURRENT_TANGENT_EXT 0x843B #define GL_CURRENT_BINORMAL_EXT 0x843C #define GL_TANGENT_ARRAY_TYPE_EXT 0x843E #define GL_TANGENT_ARRAY_STRIDE_EXT 0x843F #define GL_BINORMAL_ARRAY_TYPE_EXT 0x8440 #define GL_BINORMAL_ARRAY_STRIDE_EXT 0x8441 #define GL_TANGENT_ARRAY_POINTER_EXT 0x8442 #define GL_BINORMAL_ARRAY_POINTER_EXT 0x8443 #define GL_MAP1_TANGENT_EXT 0x8444 #define GL_MAP2_TANGENT_EXT 0x8445 #define GL_MAP1_BINORMAL_EXT 0x8446 #define GL_MAP2_BINORMAL_EXT 0x8447 #endif #ifndef GL_EXT_texture_env_combine #define GL_COMBINE_EXT 0x8570 #define GL_COMBINE_RGB_EXT 0x8571 #define GL_COMBINE_ALPHA_EXT 0x8572 #define GL_RGB_SCALE_EXT 0x8573 #define GL_ADD_SIGNED_EXT 0x8574 #define GL_INTERPOLATE_EXT 0x8575 #define GL_CONSTANT_EXT 0x8576 #define GL_PRIMARY_COLOR_EXT 0x8577 #define GL_PREVIOUS_EXT 0x8578 #define GL_SOURCE0_RGB_EXT 0x8580 #define GL_SOURCE1_RGB_EXT 0x8581 #define GL_SOURCE2_RGB_EXT 0x8582 #define GL_SOURCE0_ALPHA_EXT 0x8588 #define GL_SOURCE1_ALPHA_EXT 0x8589 #define GL_SOURCE2_ALPHA_EXT 0x858A #define GL_OPERAND0_RGB_EXT 0x8590 #define GL_OPERAND1_RGB_EXT 0x8591 #define GL_OPERAND2_RGB_EXT 0x8592 #define GL_OPERAND0_ALPHA_EXT 0x8598 #define GL_OPERAND1_ALPHA_EXT 0x8599 #define GL_OPERAND2_ALPHA_EXT 0x859A #endif #ifndef GL_APPLE_specular_vector #define GL_LIGHT_MODEL_SPECULAR_VECTOR_APPLE 0x85B0 #endif #ifndef GL_APPLE_transform_hint #define GL_TRANSFORM_HINT_APPLE 0x85B1 #endif #ifndef GL_SGIX_fog_scale #define GL_FOG_SCALE_SGIX 0x81FC #define GL_FOG_SCALE_VALUE_SGIX 0x81FD #endif #ifndef GL_SUNX_constant_data #define GL_UNPACK_CONSTANT_DATA_SUNX 0x81D5 #define GL_TEXTURE_CONSTANT_DATA_SUNX 0x81D6 #endif #ifndef GL_SUN_global_alpha #define GL_GLOBAL_ALPHA_SUN 0x81D9 #define GL_GLOBAL_ALPHA_FACTOR_SUN 0x81DA #endif #ifndef GL_SUN_triangle_list #define GL_RESTART_SUN 0x0001 #define GL_REPLACE_MIDDLE_SUN 0x0002 #define GL_REPLACE_OLDEST_SUN 0x0003 #define GL_TRIANGLE_LIST_SUN 0x81D7 #define GL_REPLACEMENT_CODE_SUN 0x81D8 #define GL_REPLACEMENT_CODE_ARRAY_SUN 0x85C0 #define GL_REPLACEMENT_CODE_ARRAY_TYPE_SUN 0x85C1 #define GL_REPLACEMENT_CODE_ARRAY_STRIDE_SUN 0x85C2 #define GL_REPLACEMENT_CODE_ARRAY_POINTER_SUN 0x85C3 #define GL_R1UI_V3F_SUN 0x85C4 #define GL_R1UI_C4UB_V3F_SUN 0x85C5 #define GL_R1UI_C3F_V3F_SUN 0x85C6 #define GL_R1UI_N3F_V3F_SUN 0x85C7 #define GL_R1UI_C4F_N3F_V3F_SUN 0x85C8 #define GL_R1UI_T2F_V3F_SUN 0x85C9 #define GL_R1UI_T2F_N3F_V3F_SUN 0x85CA #define GL_R1UI_T2F_C4F_N3F_V3F_SUN 0x85CB #endif #ifndef GL_SUN_vertex #endif #ifndef GL_EXT_blend_func_separate #define GL_BLEND_DST_RGB_EXT 0x80C8 #define GL_BLEND_SRC_RGB_EXT 0x80C9 #define GL_BLEND_DST_ALPHA_EXT 0x80CA #define GL_BLEND_SRC_ALPHA_EXT 0x80CB #endif #ifndef GL_INGR_color_clamp #define GL_RED_MIN_CLAMP_INGR 0x8560 #define GL_GREEN_MIN_CLAMP_INGR 0x8561 #define GL_BLUE_MIN_CLAMP_INGR 0x8562 #define GL_ALPHA_MIN_CLAMP_INGR 0x8563 #define GL_RED_MAX_CLAMP_INGR 0x8564 #define GL_GREEN_MAX_CLAMP_INGR 0x8565 #define GL_BLUE_MAX_CLAMP_INGR 0x8566 #define GL_ALPHA_MAX_CLAMP_INGR 0x8567 #endif #ifndef GL_INGR_interlace_read #define GL_INTERLACE_READ_INGR 0x8568 #endif #ifndef GL_EXT_stencil_wrap #define GL_INCR_WRAP_EXT 0x8507 #define GL_DECR_WRAP_EXT 0x8508 #endif #ifndef GL_EXT_422_pixels #define GL_422_EXT 0x80CC #define GL_422_REV_EXT 0x80CD #define GL_422_AVERAGE_EXT 0x80CE #define GL_422_REV_AVERAGE_EXT 0x80CF #endif #ifndef GL_NV_texgen_reflection #define GL_NORMAL_MAP_NV 0x8511 #define GL_REFLECTION_MAP_NV 0x8512 #endif #ifndef GL_EXT_texture_cube_map #define GL_NORMAL_MAP_EXT 0x8511 #define GL_REFLECTION_MAP_EXT 0x8512 #define GL_TEXTURE_CUBE_MAP_EXT 0x8513 #define GL_TEXTURE_BINDING_CUBE_MAP_EXT 0x8514 #define GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT 0x8515 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_EXT 0x8516 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_EXT 0x8517 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT 0x8518 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_EXT 0x8519 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT 0x851A #define GL_PROXY_TEXTURE_CUBE_MAP_EXT 0x851B #define GL_MAX_CUBE_MAP_TEXTURE_SIZE_EXT 0x851C #endif #ifndef GL_SUN_convolution_border_modes #define GL_WRAP_BORDER_SUN 0x81D4 #endif #ifndef GL_EXT_texture_env_add #endif #ifndef GL_EXT_texture_lod_bias #define GL_MAX_TEXTURE_LOD_BIAS_EXT 0x84FD #define GL_TEXTURE_FILTER_CONTROL_EXT 0x8500 #define GL_TEXTURE_LOD_BIAS_EXT 0x8501 #endif #ifndef GL_EXT_texture_filter_anisotropic #define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE #define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF #endif #ifndef GL_EXT_vertex_weighting #define GL_MODELVIEW0_STACK_DEPTH_EXT GL_MODELVIEW_STACK_DEPTH #define GL_MODELVIEW1_STACK_DEPTH_EXT 0x8502 #define GL_MODELVIEW0_MATRIX_EXT GL_MODELVIEW_MATRIX #define GL_MODELVIEW1_MATRIX_EXT 0x8506 #define GL_VERTEX_WEIGHTING_EXT 0x8509 #define GL_MODELVIEW0_EXT GL_MODELVIEW #define GL_MODELVIEW1_EXT 0x850A #define GL_CURRENT_VERTEX_WEIGHT_EXT 0x850B #define GL_VERTEX_WEIGHT_ARRAY_EXT 0x850C #define GL_VERTEX_WEIGHT_ARRAY_SIZE_EXT 0x850D #define GL_VERTEX_WEIGHT_ARRAY_TYPE_EXT 0x850E #define GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT 0x850F #define GL_VERTEX_WEIGHT_ARRAY_POINTER_EXT 0x8510 #endif #ifndef GL_NV_light_max_exponent #define GL_MAX_SHININESS_NV 0x8504 #define GL_MAX_SPOT_EXPONENT_NV 0x8505 #endif #ifndef GL_NV_vertex_array_range #define GL_VERTEX_ARRAY_RANGE_NV 0x851D #define GL_VERTEX_ARRAY_RANGE_LENGTH_NV 0x851E #define GL_VERTEX_ARRAY_RANGE_VALID_NV 0x851F #define GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV 0x8520 #define GL_VERTEX_ARRAY_RANGE_POINTER_NV 0x8521 #endif #ifndef GL_NV_register_combiners #define GL_REGISTER_COMBINERS_NV 0x8522 #define GL_VARIABLE_A_NV 0x8523 #define GL_VARIABLE_B_NV 0x8524 #define GL_VARIABLE_C_NV 0x8525 #define GL_VARIABLE_D_NV 0x8526 #define GL_VARIABLE_E_NV 0x8527 #define GL_VARIABLE_F_NV 0x8528 #define GL_VARIABLE_G_NV 0x8529 #define GL_CONSTANT_COLOR0_NV 0x852A #define GL_CONSTANT_COLOR1_NV 0x852B #define GL_PRIMARY_COLOR_NV 0x852C #define GL_SECONDARY_COLOR_NV 0x852D #define GL_SPARE0_NV 0x852E #define GL_SPARE1_NV 0x852F #define GL_DISCARD_NV 0x8530 #define GL_E_TIMES_F_NV 0x8531 #define GL_SPARE0_PLUS_SECONDARY_COLOR_NV 0x8532 #define GL_UNSIGNED_IDENTITY_NV 0x8536 #define GL_UNSIGNED_INVERT_NV 0x8537 #define GL_EXPAND_NORMAL_NV 0x8538 #define GL_EXPAND_NEGATE_NV 0x8539 #define GL_HALF_BIAS_NORMAL_NV 0x853A #define GL_HALF_BIAS_NEGATE_NV 0x853B #define GL_SIGNED_IDENTITY_NV 0x853C #define GL_SIGNED_NEGATE_NV 0x853D #define GL_SCALE_BY_TWO_NV 0x853E #define GL_SCALE_BY_FOUR_NV 0x853F #define GL_SCALE_BY_ONE_HALF_NV 0x8540 #define GL_BIAS_BY_NEGATIVE_ONE_HALF_NV 0x8541 #define GL_COMBINER_INPUT_NV 0x8542 #define GL_COMBINER_MAPPING_NV 0x8543 #define GL_COMBINER_COMPONENT_USAGE_NV 0x8544 #define GL_COMBINER_AB_DOT_PRODUCT_NV 0x8545 #define GL_COMBINER_CD_DOT_PRODUCT_NV 0x8546 #define GL_COMBINER_MUX_SUM_NV 0x8547 #define GL_COMBINER_SCALE_NV 0x8548 #define GL_COMBINER_BIAS_NV 0x8549 #define GL_COMBINER_AB_OUTPUT_NV 0x854A #define GL_COMBINER_CD_OUTPUT_NV 0x854B #define GL_COMBINER_SUM_OUTPUT_NV 0x854C #define GL_MAX_GENERAL_COMBINERS_NV 0x854D #define GL_NUM_GENERAL_COMBINERS_NV 0x854E #define GL_COLOR_SUM_CLAMP_NV 0x854F #define GL_COMBINER0_NV 0x8550 #define GL_COMBINER1_NV 0x8551 #define GL_COMBINER2_NV 0x8552 #define GL_COMBINER3_NV 0x8553 #define GL_COMBINER4_NV 0x8554 #define GL_COMBINER5_NV 0x8555 #define GL_COMBINER6_NV 0x8556 #define GL_COMBINER7_NV 0x8557 /* reuse GL_TEXTURE0_ARB */ /* reuse GL_TEXTURE1_ARB */ /* reuse GL_ZERO */ /* reuse GL_NONE */ /* reuse GL_FOG */ #endif #ifndef GL_NV_fog_distance #define GL_FOG_DISTANCE_MODE_NV 0x855A #define GL_EYE_RADIAL_NV 0x855B #define GL_EYE_PLANE_ABSOLUTE_NV 0x855C /* reuse GL_EYE_PLANE */ #endif #ifndef GL_NV_texgen_emboss #define GL_EMBOSS_LIGHT_NV 0x855D #define GL_EMBOSS_CONSTANT_NV 0x855E #define GL_EMBOSS_MAP_NV 0x855F #endif #ifndef GL_NV_blend_square #endif #ifndef GL_NV_texture_env_combine4 #define GL_COMBINE4_NV 0x8503 #define GL_SOURCE3_RGB_NV 0x8583 #define GL_SOURCE3_ALPHA_NV 0x858B #define GL_OPERAND3_RGB_NV 0x8593 #define GL_OPERAND3_ALPHA_NV 0x859B #endif #ifndef GL_MESA_resize_buffers #endif #ifndef GL_MESA_window_pos #endif #ifndef GL_EXT_texture_compression_s3tc #define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0 #define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1 #define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2 #define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3 #endif #ifndef GL_IBM_cull_vertex #define GL_CULL_VERTEX_IBM 103050 #endif #ifndef GL_IBM_multimode_draw_arrays #endif #ifndef GL_IBM_vertex_array_lists #define GL_VERTEX_ARRAY_LIST_IBM 103070 #define GL_NORMAL_ARRAY_LIST_IBM 103071 #define GL_COLOR_ARRAY_LIST_IBM 103072 #define GL_INDEX_ARRAY_LIST_IBM 103073 #define GL_TEXTURE_COORD_ARRAY_LIST_IBM 103074 #define GL_EDGE_FLAG_ARRAY_LIST_IBM 103075 #define GL_FOG_COORDINATE_ARRAY_LIST_IBM 103076 #define GL_SECONDARY_COLOR_ARRAY_LIST_IBM 103077 #define GL_VERTEX_ARRAY_LIST_STRIDE_IBM 103080 #define GL_NORMAL_ARRAY_LIST_STRIDE_IBM 103081 #define GL_COLOR_ARRAY_LIST_STRIDE_IBM 103082 #define GL_INDEX_ARRAY_LIST_STRIDE_IBM 103083 #define GL_TEXTURE_COORD_ARRAY_LIST_STRIDE_IBM 103084 #define GL_EDGE_FLAG_ARRAY_LIST_STRIDE_IBM 103085 #define GL_FOG_COORDINATE_ARRAY_LIST_STRIDE_IBM 103086 #define GL_SECONDARY_COLOR_ARRAY_LIST_STRIDE_IBM 103087 #endif #ifndef GL_SGIX_subsample #define GL_PACK_SUBSAMPLE_RATE_SGIX 0x85A0 #define GL_UNPACK_SUBSAMPLE_RATE_SGIX 0x85A1 #define GL_PIXEL_SUBSAMPLE_4444_SGIX 0x85A2 #define GL_PIXEL_SUBSAMPLE_2424_SGIX 0x85A3 #define GL_PIXEL_SUBSAMPLE_4242_SGIX 0x85A4 #endif #ifndef GL_SGIX_ycrcb_subsample #endif #ifndef GL_SGIX_ycrcba #define GL_YCRCB_SGIX 0x8318 #define GL_YCRCBA_SGIX 0x8319 #endif #ifndef GL_SGI_depth_pass_instrument #define GL_DEPTH_PASS_INSTRUMENT_SGIX 0x8310 #define GL_DEPTH_PASS_INSTRUMENT_COUNTERS_SGIX 0x8311 #define GL_DEPTH_PASS_INSTRUMENT_MAX_SGIX 0x8312 #endif #ifndef GL_3DFX_texture_compression_FXT1 #define GL_COMPRESSED_RGB_FXT1_3DFX 0x86B0 #define GL_COMPRESSED_RGBA_FXT1_3DFX 0x86B1 #endif #ifndef GL_3DFX_multisample #define GL_MULTISAMPLE_3DFX 0x86B2 #define GL_SAMPLE_BUFFERS_3DFX 0x86B3 #define GL_SAMPLES_3DFX 0x86B4 #define GL_MULTISAMPLE_BIT_3DFX 0x20000000 #endif #ifndef GL_3DFX_tbuffer #endif #ifndef GL_EXT_multisample #define GL_MULTISAMPLE_EXT 0x809D #define GL_SAMPLE_ALPHA_TO_MASK_EXT 0x809E #define GL_SAMPLE_ALPHA_TO_ONE_EXT 0x809F #define GL_SAMPLE_MASK_EXT 0x80A0 #define GL_1PASS_EXT 0x80A1 #define GL_2PASS_0_EXT 0x80A2 #define GL_2PASS_1_EXT 0x80A3 #define GL_4PASS_0_EXT 0x80A4 #define GL_4PASS_1_EXT 0x80A5 #define GL_4PASS_2_EXT 0x80A6 #define GL_4PASS_3_EXT 0x80A7 #define GL_SAMPLE_BUFFERS_EXT 0x80A8 #define GL_SAMPLES_EXT 0x80A9 #define GL_SAMPLE_MASK_VALUE_EXT 0x80AA #define GL_SAMPLE_MASK_INVERT_EXT 0x80AB #define GL_SAMPLE_PATTERN_EXT 0x80AC #define GL_MULTISAMPLE_BIT_EXT 0x20000000 #endif #ifndef GL_SGIX_vertex_preclip #define GL_VERTEX_PRECLIP_SGIX 0x83EE #define GL_VERTEX_PRECLIP_HINT_SGIX 0x83EF #endif #ifndef GL_SGIX_convolution_accuracy #define GL_CONVOLUTION_HINT_SGIX 0x8316 #endif #ifndef GL_SGIX_resample #define GL_PACK_RESAMPLE_SGIX 0x842C #define GL_UNPACK_RESAMPLE_SGIX 0x842D #define GL_RESAMPLE_REPLICATE_SGIX 0x842E #define GL_RESAMPLE_ZERO_FILL_SGIX 0x842F #define GL_RESAMPLE_DECIMATE_SGIX 0x8430 #endif #ifndef GL_SGIS_point_line_texgen #define GL_EYE_DISTANCE_TO_POINT_SGIS 0x81F0 #define GL_OBJECT_DISTANCE_TO_POINT_SGIS 0x81F1 #define GL_EYE_DISTANCE_TO_LINE_SGIS 0x81F2 #define GL_OBJECT_DISTANCE_TO_LINE_SGIS 0x81F3 #define GL_EYE_POINT_SGIS 0x81F4 #define GL_OBJECT_POINT_SGIS 0x81F5 #define GL_EYE_LINE_SGIS 0x81F6 #define GL_OBJECT_LINE_SGIS 0x81F7 #endif #ifndef GL_SGIS_texture_color_mask #define GL_TEXTURE_COLOR_WRITEMASK_SGIS 0x81EF #endif #ifndef GL_EXT_texture_env_dot3 #define GL_DOT3_RGB_EXT 0x8740 #define GL_DOT3_RGBA_EXT 0x8741 #endif #ifndef GL_ATI_texture_mirror_once #define GL_MIRROR_CLAMP_ATI 0x8742 #define GL_MIRROR_CLAMP_TO_EDGE_ATI 0x8743 #endif #ifndef GL_NV_fence #define GL_ALL_COMPLETED_NV 0x84F2 #define GL_FENCE_STATUS_NV 0x84F3 #define GL_FENCE_CONDITION_NV 0x84F4 #endif #ifndef GL_IBM_texture_mirrored_repeat #define GL_MIRRORED_REPEAT_IBM 0x8370 #endif #ifndef GL_NV_evaluators #define GL_EVAL_2D_NV 0x86C0 #define GL_EVAL_TRIANGULAR_2D_NV 0x86C1 #define GL_MAP_TESSELLATION_NV 0x86C2 #define GL_MAP_ATTRIB_U_ORDER_NV 0x86C3 #define GL_MAP_ATTRIB_V_ORDER_NV 0x86C4 #define GL_EVAL_FRACTIONAL_TESSELLATION_NV 0x86C5 #define GL_EVAL_VERTEX_ATTRIB0_NV 0x86C6 #define GL_EVAL_VERTEX_ATTRIB1_NV 0x86C7 #define GL_EVAL_VERTEX_ATTRIB2_NV 0x86C8 #define GL_EVAL_VERTEX_ATTRIB3_NV 0x86C9 #define GL_EVAL_VERTEX_ATTRIB4_NV 0x86CA #define GL_EVAL_VERTEX_ATTRIB5_NV 0x86CB #define GL_EVAL_VERTEX_ATTRIB6_NV 0x86CC #define GL_EVAL_VERTEX_ATTRIB7_NV 0x86CD #define GL_EVAL_VERTEX_ATTRIB8_NV 0x86CE #define GL_EVAL_VERTEX_ATTRIB9_NV 0x86CF #define GL_EVAL_VERTEX_ATTRIB10_NV 0x86D0 #define GL_EVAL_VERTEX_ATTRIB11_NV 0x86D1 #define GL_EVAL_VERTEX_ATTRIB12_NV 0x86D2 #define GL_EVAL_VERTEX_ATTRIB13_NV 0x86D3 #define GL_EVAL_VERTEX_ATTRIB14_NV 0x86D4 #define GL_EVAL_VERTEX_ATTRIB15_NV 0x86D5 #define GL_MAX_MAP_TESSELLATION_NV 0x86D6 #define GL_MAX_RATIONAL_EVAL_ORDER_NV 0x86D7 #endif #ifndef GL_NV_packed_depth_stencil #define GL_DEPTH_STENCIL_NV 0x84F9 #define GL_UNSIGNED_INT_24_8_NV 0x84FA #endif #ifndef GL_NV_register_combiners2 #define GL_PER_STAGE_CONSTANTS_NV 0x8535 #endif #ifndef GL_NV_texture_compression_vtc #endif #ifndef GL_NV_texture_rectangle #define GL_TEXTURE_RECTANGLE_NV 0x84F5 #define GL_TEXTURE_BINDING_RECTANGLE_NV 0x84F6 #define GL_PROXY_TEXTURE_RECTANGLE_NV 0x84F7 #define GL_MAX_RECTANGLE_TEXTURE_SIZE_NV 0x84F8 #endif #ifndef GL_NV_texture_shader #define GL_OFFSET_TEXTURE_RECTANGLE_NV 0x864C #define GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV 0x864D #define GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV 0x864E #define GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV 0x86D9 #define GL_UNSIGNED_INT_S8_S8_8_8_NV 0x86DA #define GL_UNSIGNED_INT_8_8_S8_S8_REV_NV 0x86DB #define GL_DSDT_MAG_INTENSITY_NV 0x86DC #define GL_SHADER_CONSISTENT_NV 0x86DD #define GL_TEXTURE_SHADER_NV 0x86DE #define GL_SHADER_OPERATION_NV 0x86DF #define GL_CULL_MODES_NV 0x86E0 #define GL_OFFSET_TEXTURE_MATRIX_NV 0x86E1 #define GL_OFFSET_TEXTURE_SCALE_NV 0x86E2 #define GL_OFFSET_TEXTURE_BIAS_NV 0x86E3 #define GL_OFFSET_TEXTURE_2D_MATRIX_NV GL_OFFSET_TEXTURE_MATRIX_NV #define GL_OFFSET_TEXTURE_2D_SCALE_NV GL_OFFSET_TEXTURE_SCALE_NV #define GL_OFFSET_TEXTURE_2D_BIAS_NV GL_OFFSET_TEXTURE_BIAS_NV #define GL_PREVIOUS_TEXTURE_INPUT_NV 0x86E4 #define GL_CONST_EYE_NV 0x86E5 #define GL_PASS_THROUGH_NV 0x86E6 #define GL_CULL_FRAGMENT_NV 0x86E7 #define GL_OFFSET_TEXTURE_2D_NV 0x86E8 #define GL_DEPENDENT_AR_TEXTURE_2D_NV 0x86E9 #define GL_DEPENDENT_GB_TEXTURE_2D_NV 0x86EA #define GL_DOT_PRODUCT_NV 0x86EC #define GL_DOT_PRODUCT_DEPTH_REPLACE_NV 0x86ED #define GL_DOT_PRODUCT_TEXTURE_2D_NV 0x86EE #define GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV 0x86F0 #define GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV 0x86F1 #define GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV 0x86F2 #define GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV 0x86F3 #define GL_HILO_NV 0x86F4 #define GL_DSDT_NV 0x86F5 #define GL_DSDT_MAG_NV 0x86F6 #define GL_DSDT_MAG_VIB_NV 0x86F7 #define GL_HILO16_NV 0x86F8 #define GL_SIGNED_HILO_NV 0x86F9 #define GL_SIGNED_HILO16_NV 0x86FA #define GL_SIGNED_RGBA_NV 0x86FB #define GL_SIGNED_RGBA8_NV 0x86FC #define GL_SIGNED_RGB_NV 0x86FE #define GL_SIGNED_RGB8_NV 0x86FF #define GL_SIGNED_LUMINANCE_NV 0x8701 #define GL_SIGNED_LUMINANCE8_NV 0x8702 #define GL_SIGNED_LUMINANCE_ALPHA_NV 0x8703 #define GL_SIGNED_LUMINANCE8_ALPHA8_NV 0x8704 #define GL_SIGNED_ALPHA_NV 0x8705 #define GL_SIGNED_ALPHA8_NV 0x8706 #define GL_SIGNED_INTENSITY_NV 0x8707 #define GL_SIGNED_INTENSITY8_NV 0x8708 #define GL_DSDT8_NV 0x8709 #define GL_DSDT8_MAG8_NV 0x870A #define GL_DSDT8_MAG8_INTENSITY8_NV 0x870B #define GL_SIGNED_RGB_UNSIGNED_ALPHA_NV 0x870C #define GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV 0x870D #define GL_HI_SCALE_NV 0x870E #define GL_LO_SCALE_NV 0x870F #define GL_DS_SCALE_NV 0x8710 #define GL_DT_SCALE_NV 0x8711 #define GL_MAGNITUDE_SCALE_NV 0x8712 #define GL_VIBRANCE_SCALE_NV 0x8713 #define GL_HI_BIAS_NV 0x8714 #define GL_LO_BIAS_NV 0x8715 #define GL_DS_BIAS_NV 0x8716 #define GL_DT_BIAS_NV 0x8717 #define GL_MAGNITUDE_BIAS_NV 0x8718 #define GL_VIBRANCE_BIAS_NV 0x8719 #define GL_TEXTURE_BORDER_VALUES_NV 0x871A #define GL_TEXTURE_HI_SIZE_NV 0x871B #define GL_TEXTURE_LO_SIZE_NV 0x871C #define GL_TEXTURE_DS_SIZE_NV 0x871D #define GL_TEXTURE_DT_SIZE_NV 0x871E #define GL_TEXTURE_MAG_SIZE_NV 0x871F #endif #ifndef GL_NV_texture_shader2 #define GL_DOT_PRODUCT_TEXTURE_3D_NV 0x86EF #endif #ifndef GL_NV_vertex_array_range2 #define GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV 0x8533 #endif #ifndef GL_NV_vertex_program #define GL_VERTEX_PROGRAM_NV 0x8620 #define GL_VERTEX_STATE_PROGRAM_NV 0x8621 #define GL_ATTRIB_ARRAY_SIZE_NV 0x8623 #define GL_ATTRIB_ARRAY_STRIDE_NV 0x8624 #define GL_ATTRIB_ARRAY_TYPE_NV 0x8625 #define GL_CURRENT_ATTRIB_NV 0x8626 #define GL_PROGRAM_LENGTH_NV 0x8627 #define GL_PROGRAM_STRING_NV 0x8628 #define GL_MODELVIEW_PROJECTION_NV 0x8629 #define GL_IDENTITY_NV 0x862A #define GL_INVERSE_NV 0x862B #define GL_TRANSPOSE_NV 0x862C #define GL_INVERSE_TRANSPOSE_NV 0x862D #define GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV 0x862E #define GL_MAX_TRACK_MATRICES_NV 0x862F #define GL_MATRIX0_NV 0x8630 #define GL_MATRIX1_NV 0x8631 #define GL_MATRIX2_NV 0x8632 #define GL_MATRIX3_NV 0x8633 #define GL_MATRIX4_NV 0x8634 #define GL_MATRIX5_NV 0x8635 #define GL_MATRIX6_NV 0x8636 #define GL_MATRIX7_NV 0x8637 #define GL_CURRENT_MATRIX_STACK_DEPTH_NV 0x8640 #define GL_CURRENT_MATRIX_NV 0x8641 #define GL_VERTEX_PROGRAM_POINT_SIZE_NV 0x8642 #define GL_VERTEX_PROGRAM_TWO_SIDE_NV 0x8643 #define GL_PROGRAM_PARAMETER_NV 0x8644 #define GL_ATTRIB_ARRAY_POINTER_NV 0x8645 #define GL_PROGRAM_TARGET_NV 0x8646 #define GL_PROGRAM_RESIDENT_NV 0x8647 #define GL_TRACK_MATRIX_NV 0x8648 #define GL_TRACK_MATRIX_TRANSFORM_NV 0x8649 #define GL_VERTEX_PROGRAM_BINDING_NV 0x864A #define GL_PROGRAM_ERROR_POSITION_NV 0x864B #define GL_VERTEX_ATTRIB_ARRAY0_NV 0x8650 #define GL_VERTEX_ATTRIB_ARRAY1_NV 0x8651 #define GL_VERTEX_ATTRIB_ARRAY2_NV 0x8652 #define GL_VERTEX_ATTRIB_ARRAY3_NV 0x8653 #define GL_VERTEX_ATTRIB_ARRAY4_NV 0x8654 #define GL_VERTEX_ATTRIB_ARRAY5_NV 0x8655 #define GL_VERTEX_ATTRIB_ARRAY6_NV 0x8656 #define GL_VERTEX_ATTRIB_ARRAY7_NV 0x8657 #define GL_VERTEX_ATTRIB_ARRAY8_NV 0x8658 #define GL_VERTEX_ATTRIB_ARRAY9_NV 0x8659 #define GL_VERTEX_ATTRIB_ARRAY10_NV 0x865A #define GL_VERTEX_ATTRIB_ARRAY11_NV 0x865B #define GL_VERTEX_ATTRIB_ARRAY12_NV 0x865C #define GL_VERTEX_ATTRIB_ARRAY13_NV 0x865D #define GL_VERTEX_ATTRIB_ARRAY14_NV 0x865E #define GL_VERTEX_ATTRIB_ARRAY15_NV 0x865F #define GL_MAP1_VERTEX_ATTRIB0_4_NV 0x8660 #define GL_MAP1_VERTEX_ATTRIB1_4_NV 0x8661 #define GL_MAP1_VERTEX_ATTRIB2_4_NV 0x8662 #define GL_MAP1_VERTEX_ATTRIB3_4_NV 0x8663 #define GL_MAP1_VERTEX_ATTRIB4_4_NV 0x8664 #define GL_MAP1_VERTEX_ATTRIB5_4_NV 0x8665 #define GL_MAP1_VERTEX_ATTRIB6_4_NV 0x8666 #define GL_MAP1_VERTEX_ATTRIB7_4_NV 0x8667 #define GL_MAP1_VERTEX_ATTRIB8_4_NV 0x8668 #define GL_MAP1_VERTEX_ATTRIB9_4_NV 0x8669 #define GL_MAP1_VERTEX_ATTRIB10_4_NV 0x866A #define GL_MAP1_VERTEX_ATTRIB11_4_NV 0x866B #define GL_MAP1_VERTEX_ATTRIB12_4_NV 0x866C #define GL_MAP1_VERTEX_ATTRIB13_4_NV 0x866D #define GL_MAP1_VERTEX_ATTRIB14_4_NV 0x866E #define GL_MAP1_VERTEX_ATTRIB15_4_NV 0x866F #define GL_MAP2_VERTEX_ATTRIB0_4_NV 0x8670 #define GL_MAP2_VERTEX_ATTRIB1_4_NV 0x8671 #define GL_MAP2_VERTEX_ATTRIB2_4_NV 0x8672 #define GL_MAP2_VERTEX_ATTRIB3_4_NV 0x8673 #define GL_MAP2_VERTEX_ATTRIB4_4_NV 0x8674 #define GL_MAP2_VERTEX_ATTRIB5_4_NV 0x8675 #define GL_MAP2_VERTEX_ATTRIB6_4_NV 0x8676 #define GL_MAP2_VERTEX_ATTRIB7_4_NV 0x8677 #define GL_MAP2_VERTEX_ATTRIB8_4_NV 0x8678 #define GL_MAP2_VERTEX_ATTRIB9_4_NV 0x8679 #define GL_MAP2_VERTEX_ATTRIB10_4_NV 0x867A #define GL_MAP2_VERTEX_ATTRIB11_4_NV 0x867B #define GL_MAP2_VERTEX_ATTRIB12_4_NV 0x867C #define GL_MAP2_VERTEX_ATTRIB13_4_NV 0x867D #define GL_MAP2_VERTEX_ATTRIB14_4_NV 0x867E #define GL_MAP2_VERTEX_ATTRIB15_4_NV 0x867F #endif #ifndef GL_SGIX_texture_coordinate_clamp #define GL_TEXTURE_MAX_CLAMP_S_SGIX 0x8369 #define GL_TEXTURE_MAX_CLAMP_T_SGIX 0x836A #define GL_TEXTURE_MAX_CLAMP_R_SGIX 0x836B #endif #ifndef GL_SGIX_scalebias_hint #define GL_SCALEBIAS_HINT_SGIX 0x8322 #endif #ifndef GL_OML_interlace #define GL_INTERLACE_OML 0x8980 #define GL_INTERLACE_READ_OML 0x8981 #endif #ifndef GL_OML_subsample #define GL_FORMAT_SUBSAMPLE_24_24_OML 0x8982 #define GL_FORMAT_SUBSAMPLE_244_244_OML 0x8983 #endif #ifndef GL_OML_resample #define GL_PACK_RESAMPLE_OML 0x8984 #define GL_UNPACK_RESAMPLE_OML 0x8985 #define GL_RESAMPLE_REPLICATE_OML 0x8986 #define GL_RESAMPLE_ZERO_FILL_OML 0x8987 #define GL_RESAMPLE_AVERAGE_OML 0x8988 #define GL_RESAMPLE_DECIMATE_OML 0x8989 #endif #ifndef GL_NV_copy_depth_to_color #define GL_DEPTH_STENCIL_TO_RGBA_NV 0x886E #define GL_DEPTH_STENCIL_TO_BGRA_NV 0x886F #endif #ifndef GL_ATI_envmap_bumpmap #define GL_BUMP_ROT_MATRIX_ATI 0x8775 #define GL_BUMP_ROT_MATRIX_SIZE_ATI 0x8776 #define GL_BUMP_NUM_TEX_UNITS_ATI 0x8777 #define GL_BUMP_TEX_UNITS_ATI 0x8778 #define GL_DUDV_ATI 0x8779 #define GL_DU8DV8_ATI 0x877A #define GL_BUMP_ENVMAP_ATI 0x877B #define GL_BUMP_TARGET_ATI 0x877C #endif #ifndef GL_ATI_fragment_shader #define GL_FRAGMENT_SHADER_ATI 0x8920 #define GL_REG_0_ATI 0x8921 #define GL_REG_1_ATI 0x8922 #define GL_REG_2_ATI 0x8923 #define GL_REG_3_ATI 0x8924 #define GL_REG_4_ATI 0x8925 #define GL_REG_5_ATI 0x8926 #define GL_REG_6_ATI 0x8927 #define GL_REG_7_ATI 0x8928 #define GL_REG_8_ATI 0x8929 #define GL_REG_9_ATI 0x892A #define GL_REG_10_ATI 0x892B #define GL_REG_11_ATI 0x892C #define GL_REG_12_ATI 0x892D #define GL_REG_13_ATI 0x892E #define GL_REG_14_ATI 0x892F #define GL_REG_15_ATI 0x8930 #define GL_REG_16_ATI 0x8931 #define GL_REG_17_ATI 0x8932 #define GL_REG_18_ATI 0x8933 #define GL_REG_19_ATI 0x8934 #define GL_REG_20_ATI 0x8935 #define GL_REG_21_ATI 0x8936 #define GL_REG_22_ATI 0x8937 #define GL_REG_23_ATI 0x8938 #define GL_REG_24_ATI 0x8939 #define GL_REG_25_ATI 0x893A #define GL_REG_26_ATI 0x893B #define GL_REG_27_ATI 0x893C #define GL_REG_28_ATI 0x893D #define GL_REG_29_ATI 0x893E #define GL_REG_30_ATI 0x893F #define GL_REG_31_ATI 0x8940 #define GL_CON_0_ATI 0x8941 #define GL_CON_1_ATI 0x8942 #define GL_CON_2_ATI 0x8943 #define GL_CON_3_ATI 0x8944 #define GL_CON_4_ATI 0x8945 #define GL_CON_5_ATI 0x8946 #define GL_CON_6_ATI 0x8947 #define GL_CON_7_ATI 0x8948 #define GL_CON_8_ATI 0x8949 #define GL_CON_9_ATI 0x894A #define GL_CON_10_ATI 0x894B #define GL_CON_11_ATI 0x894C #define GL_CON_12_ATI 0x894D #define GL_CON_13_ATI 0x894E #define GL_CON_14_ATI 0x894F #define GL_CON_15_ATI 0x8950 #define GL_CON_16_ATI 0x8951 #define GL_CON_17_ATI 0x8952 #define GL_CON_18_ATI 0x8953 #define GL_CON_19_ATI 0x8954 #define GL_CON_20_ATI 0x8955 #define GL_CON_21_ATI 0x8956 #define GL_CON_22_ATI 0x8957 #define GL_CON_23_ATI 0x8958 #define GL_CON_24_ATI 0x8959 #define GL_CON_25_ATI 0x895A #define GL_CON_26_ATI 0x895B #define GL_CON_27_ATI 0x895C #define GL_CON_28_ATI 0x895D #define GL_CON_29_ATI 0x895E #define GL_CON_30_ATI 0x895F #define GL_CON_31_ATI 0x8960 #define GL_MOV_ATI 0x8961 #define GL_ADD_ATI 0x8963 #define GL_MUL_ATI 0x8964 #define GL_SUB_ATI 0x8965 #define GL_DOT3_ATI 0x8966 #define GL_DOT4_ATI 0x8967 #define GL_MAD_ATI 0x8968 #define GL_LERP_ATI 0x8969 #define GL_CND_ATI 0x896A #define GL_CND0_ATI 0x896B #define GL_DOT2_ADD_ATI 0x896C #define GL_SECONDARY_INTERPOLATOR_ATI 0x896D #define GL_NUM_FRAGMENT_REGISTERS_ATI 0x896E #define GL_NUM_FRAGMENT_CONSTANTS_ATI 0x896F #define GL_NUM_PASSES_ATI 0x8970 #define GL_NUM_INSTRUCTIONS_PER_PASS_ATI 0x8971 #define GL_NUM_INSTRUCTIONS_TOTAL_ATI 0x8972 #define GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI 0x8973 #define GL_NUM_LOOPBACK_COMPONENTS_ATI 0x8974 #define GL_COLOR_ALPHA_PAIRING_ATI 0x8975 #define GL_SWIZZLE_STR_ATI 0x8976 #define GL_SWIZZLE_STQ_ATI 0x8977 #define GL_SWIZZLE_STR_DR_ATI 0x8978 #define GL_SWIZZLE_STQ_DQ_ATI 0x8979 #define GL_SWIZZLE_STRQ_ATI 0x897A #define GL_SWIZZLE_STRQ_DQ_ATI 0x897B #define GL_RED_BIT_ATI 0x00000001 #define GL_GREEN_BIT_ATI 0x00000002 #define GL_BLUE_BIT_ATI 0x00000004 #define GL_2X_BIT_ATI 0x00000001 #define GL_4X_BIT_ATI 0x00000002 #define GL_8X_BIT_ATI 0x00000004 #define GL_HALF_BIT_ATI 0x00000008 #define GL_QUARTER_BIT_ATI 0x00000010 #define GL_EIGHTH_BIT_ATI 0x00000020 #define GL_SATURATE_BIT_ATI 0x00000040 #define GL_COMP_BIT_ATI 0x00000002 #define GL_NEGATE_BIT_ATI 0x00000004 #define GL_BIAS_BIT_ATI 0x00000008 #endif #ifndef GL_ATI_pn_triangles #define GL_PN_TRIANGLES_ATI 0x87F0 #define GL_MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F1 #define GL_PN_TRIANGLES_POINT_MODE_ATI 0x87F2 #define GL_PN_TRIANGLES_NORMAL_MODE_ATI 0x87F3 #define GL_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F4 #define GL_PN_TRIANGLES_POINT_MODE_LINEAR_ATI 0x87F5 #define GL_PN_TRIANGLES_POINT_MODE_CUBIC_ATI 0x87F6 #define GL_PN_TRIANGLES_NORMAL_MODE_LINEAR_ATI 0x87F7 #define GL_PN_TRIANGLES_NORMAL_MODE_QUADRATIC_ATI 0x87F8 #endif #ifndef GL_ATI_vertex_array_object #define GL_STATIC_ATI 0x8760 #define GL_DYNAMIC_ATI 0x8761 #define GL_PRESERVE_ATI 0x8762 #define GL_DISCARD_ATI 0x8763 #define GL_OBJECT_BUFFER_SIZE_ATI 0x8764 #define GL_OBJECT_BUFFER_USAGE_ATI 0x8765 #define GL_ARRAY_OBJECT_BUFFER_ATI 0x8766 #define GL_ARRAY_OBJECT_OFFSET_ATI 0x8767 #endif #ifndef GL_EXT_vertex_shader #define GL_VERTEX_SHADER_EXT 0x8780 #define GL_VERTEX_SHADER_BINDING_EXT 0x8781 #define GL_OP_INDEX_EXT 0x8782 #define GL_OP_NEGATE_EXT 0x8783 #define GL_OP_DOT3_EXT 0x8784 #define GL_OP_DOT4_EXT 0x8785 #define GL_OP_MUL_EXT 0x8786 #define GL_OP_ADD_EXT 0x8787 #define GL_OP_MADD_EXT 0x8788 #define GL_OP_FRAC_EXT 0x8789 #define GL_OP_MAX_EXT 0x878A #define GL_OP_MIN_EXT 0x878B #define GL_OP_SET_GE_EXT 0x878C #define GL_OP_SET_LT_EXT 0x878D #define GL_OP_CLAMP_EXT 0x878E #define GL_OP_FLOOR_EXT 0x878F #define GL_OP_ROUND_EXT 0x8790 #define GL_OP_EXP_BASE_2_EXT 0x8791 #define GL_OP_LOG_BASE_2_EXT 0x8792 #define GL_OP_POWER_EXT 0x8793 #define GL_OP_RECIP_EXT 0x8794 #define GL_OP_RECIP_SQRT_EXT 0x8795 #define GL_OP_SUB_EXT 0x8796 #define GL_OP_CROSS_PRODUCT_EXT 0x8797 #define GL_OP_MULTIPLY_MATRIX_EXT 0x8798 #define GL_OP_MOV_EXT 0x8799 #define GL_OUTPUT_VERTEX_EXT 0x879A #define GL_OUTPUT_COLOR0_EXT 0x879B #define GL_OUTPUT_COLOR1_EXT 0x879C #define GL_OUTPUT_TEXTURE_COORD0_EXT 0x879D #define GL_OUTPUT_TEXTURE_COORD1_EXT 0x879E #define GL_OUTPUT_TEXTURE_COORD2_EXT 0x879F #define GL_OUTPUT_TEXTURE_COORD3_EXT 0x87A0 #define GL_OUTPUT_TEXTURE_COORD4_EXT 0x87A1 #define GL_OUTPUT_TEXTURE_COORD5_EXT 0x87A2 #define GL_OUTPUT_TEXTURE_COORD6_EXT 0x87A3 #define GL_OUTPUT_TEXTURE_COORD7_EXT 0x87A4 #define GL_OUTPUT_TEXTURE_COORD8_EXT 0x87A5 #define GL_OUTPUT_TEXTURE_COORD9_EXT 0x87A6 #define GL_OUTPUT_TEXTURE_COORD10_EXT 0x87A7 #define GL_OUTPUT_TEXTURE_COORD11_EXT 0x87A8 #define GL_OUTPUT_TEXTURE_COORD12_EXT 0x87A9 #define GL_OUTPUT_TEXTURE_COORD13_EXT 0x87AA #define GL_OUTPUT_TEXTURE_COORD14_EXT 0x87AB #define GL_OUTPUT_TEXTURE_COORD15_EXT 0x87AC #define GL_OUTPUT_TEXTURE_COORD16_EXT 0x87AD #define GL_OUTPUT_TEXTURE_COORD17_EXT 0x87AE #define GL_OUTPUT_TEXTURE_COORD18_EXT 0x87AF #define GL_OUTPUT_TEXTURE_COORD19_EXT 0x87B0 #define GL_OUTPUT_TEXTURE_COORD20_EXT 0x87B1 #define GL_OUTPUT_TEXTURE_COORD21_EXT 0x87B2 #define GL_OUTPUT_TEXTURE_COORD22_EXT 0x87B3 #define GL_OUTPUT_TEXTURE_COORD23_EXT 0x87B4 #define GL_OUTPUT_TEXTURE_COORD24_EXT 0x87B5 #define GL_OUTPUT_TEXTURE_COORD25_EXT 0x87B6 #define GL_OUTPUT_TEXTURE_COORD26_EXT 0x87B7 #define GL_OUTPUT_TEXTURE_COORD27_EXT 0x87B8 #define GL_OUTPUT_TEXTURE_COORD28_EXT 0x87B9 #define GL_OUTPUT_TEXTURE_COORD29_EXT 0x87BA #define GL_OUTPUT_TEXTURE_COORD30_EXT 0x87BB #define GL_OUTPUT_TEXTURE_COORD31_EXT 0x87BC #define GL_OUTPUT_FOG_EXT 0x87BD #define GL_SCALAR_EXT 0x87BE #define GL_VECTOR_EXT 0x87BF #define GL_MATRIX_EXT 0x87C0 #define GL_VARIANT_EXT 0x87C1 #define GL_INVARIANT_EXT 0x87C2 #define GL_LOCAL_CONSTANT_EXT 0x87C3 #define GL_LOCAL_EXT 0x87C4 #define GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87C5 #define GL_MAX_VERTEX_SHADER_VARIANTS_EXT 0x87C6 #define GL_MAX_VERTEX_SHADER_INVARIANTS_EXT 0x87C7 #define GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87C8 #define GL_MAX_VERTEX_SHADER_LOCALS_EXT 0x87C9 #define GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CA #define GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT 0x87CB #define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87CC #define GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT 0x87CD #define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCALS_EXT 0x87CE #define GL_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CF #define GL_VERTEX_SHADER_VARIANTS_EXT 0x87D0 #define GL_VERTEX_SHADER_INVARIANTS_EXT 0x87D1 #define GL_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87D2 #define GL_VERTEX_SHADER_LOCALS_EXT 0x87D3 #define GL_VERTEX_SHADER_OPTIMIZED_EXT 0x87D4 #define GL_X_EXT 0x87D5 #define GL_Y_EXT 0x87D6 #define GL_Z_EXT 0x87D7 #define GL_W_EXT 0x87D8 #define GL_NEGATIVE_X_EXT 0x87D9 #define GL_NEGATIVE_Y_EXT 0x87DA #define GL_NEGATIVE_Z_EXT 0x87DB #define GL_NEGATIVE_W_EXT 0x87DC #define GL_ZERO_EXT 0x87DD #define GL_ONE_EXT 0x87DE #define GL_NEGATIVE_ONE_EXT 0x87DF #define GL_NORMALIZED_RANGE_EXT 0x87E0 #define GL_FULL_RANGE_EXT 0x87E1 #define GL_CURRENT_VERTEX_EXT 0x87E2 #define GL_MVP_MATRIX_EXT 0x87E3 #define GL_VARIANT_VALUE_EXT 0x87E4 #define GL_VARIANT_DATATYPE_EXT 0x87E5 #define GL_VARIANT_ARRAY_STRIDE_EXT 0x87E6 #define GL_VARIANT_ARRAY_TYPE_EXT 0x87E7 #define GL_VARIANT_ARRAY_EXT 0x87E8 #define GL_VARIANT_ARRAY_POINTER_EXT 0x87E9 #define GL_INVARIANT_VALUE_EXT 0x87EA #define GL_INVARIANT_DATATYPE_EXT 0x87EB #define GL_LOCAL_CONSTANT_VALUE_EXT 0x87EC #define GL_LOCAL_CONSTANT_DATATYPE_EXT 0x87ED #endif #ifndef GL_ATI_vertex_streams #define GL_MAX_VERTEX_STREAMS_ATI 0x876B #define GL_VERTEX_STREAM0_ATI 0x876C #define GL_VERTEX_STREAM1_ATI 0x876D #define GL_VERTEX_STREAM2_ATI 0x876E #define GL_VERTEX_STREAM3_ATI 0x876F #define GL_VERTEX_STREAM4_ATI 0x8770 #define GL_VERTEX_STREAM5_ATI 0x8771 #define GL_VERTEX_STREAM6_ATI 0x8772 #define GL_VERTEX_STREAM7_ATI 0x8773 #define GL_VERTEX_SOURCE_ATI 0x8774 #endif #ifndef GL_ATI_element_array #define GL_ELEMENT_ARRAY_ATI 0x8768 #define GL_ELEMENT_ARRAY_TYPE_ATI 0x8769 #define GL_ELEMENT_ARRAY_POINTER_ATI 0x876A #endif #ifndef GL_SUN_mesh_array #define GL_QUAD_MESH_SUN 0x8614 #define GL_TRIANGLE_MESH_SUN 0x8615 #endif #ifndef GL_SUN_slice_accum #define GL_SLICE_ACCUM_SUN 0x85CC #endif #ifndef GL_NV_multisample_filter_hint #define GL_MULTISAMPLE_FILTER_HINT_NV 0x8534 #endif #ifndef GL_NV_depth_clamp #define GL_DEPTH_CLAMP_NV 0x864F #endif #ifndef GL_NV_occlusion_query #define GL_PIXEL_COUNTER_BITS_NV 0x8864 #define GL_CURRENT_OCCLUSION_QUERY_ID_NV 0x8865 #define GL_PIXEL_COUNT_NV 0x8866 #define GL_PIXEL_COUNT_AVAILABLE_NV 0x8867 #endif #ifndef GL_NV_point_sprite #define GL_POINT_SPRITE_NV 0x8861 #define GL_COORD_REPLACE_NV 0x8862 #define GL_POINT_SPRITE_R_MODE_NV 0x8863 #endif #ifndef GL_NV_texture_shader3 #define GL_OFFSET_PROJECTIVE_TEXTURE_2D_NV 0x8850 #define GL_OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV 0x8851 #define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8852 #define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV 0x8853 #define GL_OFFSET_HILO_TEXTURE_2D_NV 0x8854 #define GL_OFFSET_HILO_TEXTURE_RECTANGLE_NV 0x8855 #define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV 0x8856 #define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8857 #define GL_DEPENDENT_HILO_TEXTURE_2D_NV 0x8858 #define GL_DEPENDENT_RGB_TEXTURE_3D_NV 0x8859 #define GL_DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV 0x885A #define GL_DOT_PRODUCT_PASS_THROUGH_NV 0x885B #define GL_DOT_PRODUCT_TEXTURE_1D_NV 0x885C #define GL_DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV 0x885D #define GL_HILO8_NV 0x885E #define GL_SIGNED_HILO8_NV 0x885F #define GL_FORCE_BLUE_TO_ONE_NV 0x8860 #endif #ifndef GL_NV_vertex_program1_1 #endif #ifndef GL_EXT_shadow_funcs #endif #ifndef GL_EXT_stencil_two_side #define GL_STENCIL_TEST_TWO_SIDE_EXT 0x8910 #define GL_ACTIVE_STENCIL_FACE_EXT 0x8911 #endif #ifndef GL_ATI_text_fragment_shader #define GL_TEXT_FRAGMENT_SHADER_ATI 0x8200 #endif #ifndef GL_APPLE_client_storage #define GL_UNPACK_CLIENT_STORAGE_APPLE 0x85B2 #endif #ifndef GL_APPLE_element_array #define GL_ELEMENT_ARRAY_APPLE 0x8768 #define GL_ELEMENT_ARRAY_TYPE_APPLE 0x8769 #define GL_ELEMENT_ARRAY_POINTER_APPLE 0x876A #endif #ifndef GL_APPLE_fence #define GL_DRAW_PIXELS_APPLE 0x8A0A #define GL_FENCE_APPLE 0x8A0B #endif #ifndef GL_APPLE_vertex_array_object #define GL_VERTEX_ARRAY_BINDING_APPLE 0x85B5 #endif #ifndef GL_APPLE_vertex_array_range #define GL_VERTEX_ARRAY_RANGE_APPLE 0x851D #define GL_VERTEX_ARRAY_RANGE_LENGTH_APPLE 0x851E #define GL_VERTEX_ARRAY_STORAGE_HINT_APPLE 0x851F #define GL_VERTEX_ARRAY_RANGE_POINTER_APPLE 0x8521 #define GL_STORAGE_CACHED_APPLE 0x85BE #define GL_STORAGE_SHARED_APPLE 0x85BF #endif #ifndef GL_APPLE_ycbcr_422 #define GL_YCBCR_422_APPLE 0x85B9 #define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA #define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB #endif #ifndef GL_S3_s3tc #define GL_RGB_S3TC 0x83A0 #define GL_RGB4_S3TC 0x83A1 #define GL_RGBA_S3TC 0x83A2 #define GL_RGBA4_S3TC 0x83A3 #endif #ifndef GL_ATI_draw_buffers #define GL_MAX_DRAW_BUFFERS_ATI 0x8824 #define GL_DRAW_BUFFER0_ATI 0x8825 #define GL_DRAW_BUFFER1_ATI 0x8826 #define GL_DRAW_BUFFER2_ATI 0x8827 #define GL_DRAW_BUFFER3_ATI 0x8828 #define GL_DRAW_BUFFER4_ATI 0x8829 #define GL_DRAW_BUFFER5_ATI 0x882A #define GL_DRAW_BUFFER6_ATI 0x882B #define GL_DRAW_BUFFER7_ATI 0x882C #define GL_DRAW_BUFFER8_ATI 0x882D #define GL_DRAW_BUFFER9_ATI 0x882E #define GL_DRAW_BUFFER10_ATI 0x882F #define GL_DRAW_BUFFER11_ATI 0x8830 #define GL_DRAW_BUFFER12_ATI 0x8831 #define GL_DRAW_BUFFER13_ATI 0x8832 #define GL_DRAW_BUFFER14_ATI 0x8833 #define GL_DRAW_BUFFER15_ATI 0x8834 #endif #ifndef GL_ATI_pixel_format_float #define GL_TYPE_RGBA_FLOAT_ATI 0x8820 #define GL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI 0x8835 #endif #ifndef GL_ATI_texture_env_combine3 #define GL_MODULATE_ADD_ATI 0x8744 #define GL_MODULATE_SIGNED_ADD_ATI 0x8745 #define GL_MODULATE_SUBTRACT_ATI 0x8746 #endif #ifndef GL_ATI_texture_float #define GL_RGBA_FLOAT32_ATI 0x8814 #define GL_RGB_FLOAT32_ATI 0x8815 #define GL_ALPHA_FLOAT32_ATI 0x8816 #define GL_INTENSITY_FLOAT32_ATI 0x8817 #define GL_LUMINANCE_FLOAT32_ATI 0x8818 #define GL_LUMINANCE_ALPHA_FLOAT32_ATI 0x8819 #define GL_RGBA_FLOAT16_ATI 0x881A #define GL_RGB_FLOAT16_ATI 0x881B #define GL_ALPHA_FLOAT16_ATI 0x881C #define GL_INTENSITY_FLOAT16_ATI 0x881D #define GL_LUMINANCE_FLOAT16_ATI 0x881E #define GL_LUMINANCE_ALPHA_FLOAT16_ATI 0x881F #endif #ifndef GL_NV_float_buffer #define GL_FLOAT_R_NV 0x8880 #define GL_FLOAT_RG_NV 0x8881 #define GL_FLOAT_RGB_NV 0x8882 #define GL_FLOAT_RGBA_NV 0x8883 #define GL_FLOAT_R16_NV 0x8884 #define GL_FLOAT_R32_NV 0x8885 #define GL_FLOAT_RG16_NV 0x8886 #define GL_FLOAT_RG32_NV 0x8887 #define GL_FLOAT_RGB16_NV 0x8888 #define GL_FLOAT_RGB32_NV 0x8889 #define GL_FLOAT_RGBA16_NV 0x888A #define GL_FLOAT_RGBA32_NV 0x888B #define GL_TEXTURE_FLOAT_COMPONENTS_NV 0x888C #define GL_FLOAT_CLEAR_COLOR_VALUE_NV 0x888D #define GL_FLOAT_RGBA_MODE_NV 0x888E #endif #ifndef GL_NV_fragment_program #define GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV 0x8868 #define GL_FRAGMENT_PROGRAM_NV 0x8870 #define GL_MAX_TEXTURE_COORDS_NV 0x8871 #define GL_MAX_TEXTURE_IMAGE_UNITS_NV 0x8872 #define GL_FRAGMENT_PROGRAM_BINDING_NV 0x8873 #define GL_PROGRAM_ERROR_STRING_NV 0x8874 #endif #ifndef GL_NV_half_float #define GL_HALF_FLOAT_NV 0x140B #endif #ifndef GL_NV_pixel_data_range #define GL_WRITE_PIXEL_DATA_RANGE_NV 0x8878 #define GL_READ_PIXEL_DATA_RANGE_NV 0x8879 #define GL_WRITE_PIXEL_DATA_RANGE_LENGTH_NV 0x887A #define GL_READ_PIXEL_DATA_RANGE_LENGTH_NV 0x887B #define GL_WRITE_PIXEL_DATA_RANGE_POINTER_NV 0x887C #define GL_READ_PIXEL_DATA_RANGE_POINTER_NV 0x887D #endif #ifndef GL_NV_primitive_restart #define GL_PRIMITIVE_RESTART_NV 0x8558 #define GL_PRIMITIVE_RESTART_INDEX_NV 0x8559 #endif #ifndef GL_NV_texture_expand_normal #define GL_TEXTURE_UNSIGNED_REMAP_MODE_NV 0x888F #endif #ifndef GL_NV_vertex_program2 #endif #ifndef GL_ATI_map_object_buffer #endif #ifndef GL_ATI_separate_stencil #define GL_STENCIL_BACK_FUNC_ATI 0x8800 #define GL_STENCIL_BACK_FAIL_ATI 0x8801 #define GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI 0x8802 #define GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI 0x8803 #endif #ifndef GL_ATI_vertex_attrib_array_object #endif #ifndef GL_OES_read_format #define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A #define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B #endif #ifndef GL_EXT_depth_bounds_test #define GL_DEPTH_BOUNDS_TEST_EXT 0x8890 #define GL_DEPTH_BOUNDS_EXT 0x8891 #endif #ifndef GL_EXT_texture_mirror_clamp #define GL_MIRROR_CLAMP_EXT 0x8742 #define GL_MIRROR_CLAMP_TO_EDGE_EXT 0x8743 #define GL_MIRROR_CLAMP_TO_BORDER_EXT 0x8912 #endif #ifndef GL_EXT_blend_equation_separate #define GL_BLEND_EQUATION_RGB_EXT GL_BLEND_EQUATION #define GL_BLEND_EQUATION_ALPHA_EXT 0x883D #endif #ifndef GL_MESA_pack_invert #define GL_PACK_INVERT_MESA 0x8758 #endif #ifndef GL_MESA_ycbcr_texture #define GL_UNSIGNED_SHORT_8_8_MESA 0x85BA #define GL_UNSIGNED_SHORT_8_8_REV_MESA 0x85BB #define GL_YCBCR_MESA 0x8757 #endif #ifndef GL_EXT_pixel_buffer_object #define GL_PIXEL_PACK_BUFFER_EXT 0x88EB #define GL_PIXEL_UNPACK_BUFFER_EXT 0x88EC #define GL_PIXEL_PACK_BUFFER_BINDING_EXT 0x88ED #define GL_PIXEL_UNPACK_BUFFER_BINDING_EXT 0x88EF #endif #ifndef GL_NV_fragment_program_option #endif #ifndef GL_NV_fragment_program2 #define GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV 0x88F4 #define GL_MAX_PROGRAM_CALL_DEPTH_NV 0x88F5 #define GL_MAX_PROGRAM_IF_DEPTH_NV 0x88F6 #define GL_MAX_PROGRAM_LOOP_DEPTH_NV 0x88F7 #define GL_MAX_PROGRAM_LOOP_COUNT_NV 0x88F8 #endif #ifndef GL_NV_vertex_program2_option /* reuse GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */ /* reuse GL_MAX_PROGRAM_CALL_DEPTH_NV */ #endif #ifndef GL_NV_vertex_program3 /* reuse GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB */ #endif #ifndef GL_EXT_framebuffer_object #define GL_INVALID_FRAMEBUFFER_OPERATION_EXT 0x0506 #define GL_MAX_RENDERBUFFER_SIZE_EXT 0x84E8 #define GL_FRAMEBUFFER_BINDING_EXT 0x8CA6 #define GL_RENDERBUFFER_BINDING_EXT 0x8CA7 #define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT 0x8CD0 #define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT 0x8CD1 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT 0x8CD2 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT 0x8CD3 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT 0x8CD4 #define GL_FRAMEBUFFER_COMPLETE_EXT 0x8CD5 #define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT 0x8CD6 #define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT 0x8CD7 #define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT 0x8CD9 #define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT 0x8CDA #define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT 0x8CDB #define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT 0x8CDC #define GL_FRAMEBUFFER_UNSUPPORTED_EXT 0x8CDD #define GL_MAX_COLOR_ATTACHMENTS_EXT 0x8CDF #define GL_COLOR_ATTACHMENT0_EXT 0x8CE0 #define GL_COLOR_ATTACHMENT1_EXT 0x8CE1 #define GL_COLOR_ATTACHMENT2_EXT 0x8CE2 #define GL_COLOR_ATTACHMENT3_EXT 0x8CE3 #define GL_COLOR_ATTACHMENT4_EXT 0x8CE4 #define GL_COLOR_ATTACHMENT5_EXT 0x8CE5 #define GL_COLOR_ATTACHMENT6_EXT 0x8CE6 #define GL_COLOR_ATTACHMENT7_EXT 0x8CE7 #define GL_COLOR_ATTACHMENT8_EXT 0x8CE8 #define GL_COLOR_ATTACHMENT9_EXT 0x8CE9 #define GL_COLOR_ATTACHMENT10_EXT 0x8CEA #define GL_COLOR_ATTACHMENT11_EXT 0x8CEB #define GL_COLOR_ATTACHMENT12_EXT 0x8CEC #define GL_COLOR_ATTACHMENT13_EXT 0x8CED #define GL_COLOR_ATTACHMENT14_EXT 0x8CEE #define GL_COLOR_ATTACHMENT15_EXT 0x8CEF #define GL_DEPTH_ATTACHMENT_EXT 0x8D00 #define GL_STENCIL_ATTACHMENT_EXT 0x8D20 #define GL_FRAMEBUFFER_EXT 0x8D40 #define GL_RENDERBUFFER_EXT 0x8D41 #define GL_RENDERBUFFER_WIDTH_EXT 0x8D42 #define GL_RENDERBUFFER_HEIGHT_EXT 0x8D43 #define GL_RENDERBUFFER_INTERNAL_FORMAT_EXT 0x8D44 #define GL_STENCIL_INDEX1_EXT 0x8D46 #define GL_STENCIL_INDEX4_EXT 0x8D47 #define GL_STENCIL_INDEX8_EXT 0x8D48 #define GL_STENCIL_INDEX16_EXT 0x8D49 #define GL_RENDERBUFFER_RED_SIZE_EXT 0x8D50 #define GL_RENDERBUFFER_GREEN_SIZE_EXT 0x8D51 #define GL_RENDERBUFFER_BLUE_SIZE_EXT 0x8D52 #define GL_RENDERBUFFER_ALPHA_SIZE_EXT 0x8D53 #define GL_RENDERBUFFER_DEPTH_SIZE_EXT 0x8D54 #define GL_RENDERBUFFER_STENCIL_SIZE_EXT 0x8D55 #endif #ifndef GL_GREMEDY_string_marker #endif #ifndef GL_EXT_packed_depth_stencil #define GL_DEPTH_STENCIL_EXT 0x84F9 #define GL_UNSIGNED_INT_24_8_EXT 0x84FA #define GL_DEPTH24_STENCIL8_EXT 0x88F0 #define GL_TEXTURE_STENCIL_SIZE_EXT 0x88F1 #endif #ifndef GL_EXT_stencil_clear_tag #define GL_STENCIL_TAG_BITS_EXT 0x88F2 #define GL_STENCIL_CLEAR_TAG_VALUE_EXT 0x88F3 #endif #ifndef GL_EXT_texture_sRGB #define GL_SRGB_EXT 0x8C40 #define GL_SRGB8_EXT 0x8C41 #define GL_SRGB_ALPHA_EXT 0x8C42 #define GL_SRGB8_ALPHA8_EXT 0x8C43 #define GL_SLUMINANCE_ALPHA_EXT 0x8C44 #define GL_SLUMINANCE8_ALPHA8_EXT 0x8C45 #define GL_SLUMINANCE_EXT 0x8C46 #define GL_SLUMINANCE8_EXT 0x8C47 #define GL_COMPRESSED_SRGB_EXT 0x8C48 #define GL_COMPRESSED_SRGB_ALPHA_EXT 0x8C49 #define GL_COMPRESSED_SLUMINANCE_EXT 0x8C4A #define GL_COMPRESSED_SLUMINANCE_ALPHA_EXT 0x8C4B #define GL_COMPRESSED_SRGB_S3TC_DXT1_EXT 0x8C4C #define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT 0x8C4D #define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT 0x8C4E #define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT 0x8C4F #endif #ifndef GL_EXT_framebuffer_blit #define GL_READ_FRAMEBUFFER_EXT 0x8CA8 #define GL_DRAW_FRAMEBUFFER_EXT 0x8CA9 #define GL_DRAW_FRAMEBUFFER_BINDING_EXT GL_FRAMEBUFFER_BINDING_EXT #define GL_READ_FRAMEBUFFER_BINDING_EXT 0x8CAA #endif #ifndef GL_EXT_framebuffer_multisample #define GL_RENDERBUFFER_SAMPLES_EXT 0x8CAB #define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56 #define GL_MAX_SAMPLES_EXT 0x8D57 #endif #ifndef GL_MESAX_texture_stack #define GL_TEXTURE_1D_STACK_MESAX 0x8759 #define GL_TEXTURE_2D_STACK_MESAX 0x875A #define GL_PROXY_TEXTURE_1D_STACK_MESAX 0x875B #define GL_PROXY_TEXTURE_2D_STACK_MESAX 0x875C #define GL_TEXTURE_1D_STACK_BINDING_MESAX 0x875D #define GL_TEXTURE_2D_STACK_BINDING_MESAX 0x875E #endif #ifndef GL_EXT_timer_query #define GL_TIME_ELAPSED_EXT 0x88BF #endif #ifndef GL_EXT_gpu_program_parameters #endif #ifndef GL_APPLE_flush_buffer_range #define GL_BUFFER_SERIALIZED_MODIFY_APPLE 0x8A12 #define GL_BUFFER_FLUSHING_UNMAP_APPLE 0x8A13 #endif #ifndef GL_NV_gpu_program4 #define GL_MIN_PROGRAM_TEXEL_OFFSET_NV 0x8904 #define GL_MAX_PROGRAM_TEXEL_OFFSET_NV 0x8905 #define GL_PROGRAM_ATTRIB_COMPONENTS_NV 0x8906 #define GL_PROGRAM_RESULT_COMPONENTS_NV 0x8907 #define GL_MAX_PROGRAM_ATTRIB_COMPONENTS_NV 0x8908 #define GL_MAX_PROGRAM_RESULT_COMPONENTS_NV 0x8909 #define GL_MAX_PROGRAM_GENERIC_ATTRIBS_NV 0x8DA5 #define GL_MAX_PROGRAM_GENERIC_RESULTS_NV 0x8DA6 #endif #ifndef GL_NV_geometry_program4 #define GL_LINES_ADJACENCY_EXT 0x000A #define GL_LINE_STRIP_ADJACENCY_EXT 0x000B #define GL_TRIANGLES_ADJACENCY_EXT 0x000C #define GL_TRIANGLE_STRIP_ADJACENCY_EXT 0x000D #define GL_GEOMETRY_PROGRAM_NV 0x8C26 #define GL_MAX_PROGRAM_OUTPUT_VERTICES_NV 0x8C27 #define GL_MAX_PROGRAM_TOTAL_OUTPUT_COMPONENTS_NV 0x8C28 #define GL_GEOMETRY_VERTICES_OUT_EXT 0x8DDA #define GL_GEOMETRY_INPUT_TYPE_EXT 0x8DDB #define GL_GEOMETRY_OUTPUT_TYPE_EXT 0x8DDC #define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT 0x8C29 #define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT 0x8DA7 #define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT 0x8DA8 #define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT 0x8DA9 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT 0x8CD4 #define GL_PROGRAM_POINT_SIZE_EXT 0x8642 #endif #ifndef GL_EXT_geometry_shader4 #define GL_GEOMETRY_SHADER_EXT 0x8DD9 /* reuse GL_GEOMETRY_VERTICES_OUT_EXT */ /* reuse GL_GEOMETRY_INPUT_TYPE_EXT */ /* reuse GL_GEOMETRY_OUTPUT_TYPE_EXT */ /* reuse GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT */ #define GL_MAX_GEOMETRY_VARYING_COMPONENTS_EXT 0x8DDD #define GL_MAX_VERTEX_VARYING_COMPONENTS_EXT 0x8DDE #define GL_MAX_VARYING_COMPONENTS_EXT 0x8B4B #define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT 0x8DDF #define GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT 0x8DE0 #define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT 0x8DE1 /* reuse GL_LINES_ADJACENCY_EXT */ /* reuse GL_LINE_STRIP_ADJACENCY_EXT */ /* reuse GL_TRIANGLES_ADJACENCY_EXT */ /* reuse GL_TRIANGLE_STRIP_ADJACENCY_EXT */ /* reuse GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT */ /* reuse GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT */ /* reuse GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT */ /* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */ /* reuse GL_PROGRAM_POINT_SIZE_EXT */ #endif #ifndef GL_NV_vertex_program4 #define GL_VERTEX_ATTRIB_ARRAY_INTEGER_NV 0x88FD #endif #ifndef GL_EXT_gpu_shader4 #define GL_SAMPLER_1D_ARRAY_EXT 0x8DC0 #define GL_SAMPLER_2D_ARRAY_EXT 0x8DC1 #define GL_SAMPLER_BUFFER_EXT 0x8DC2 #define GL_SAMPLER_1D_ARRAY_SHADOW_EXT 0x8DC3 #define GL_SAMPLER_2D_ARRAY_SHADOW_EXT 0x8DC4 #define GL_SAMPLER_CUBE_SHADOW_EXT 0x8DC5 #define GL_UNSIGNED_INT_VEC2_EXT 0x8DC6 #define GL_UNSIGNED_INT_VEC3_EXT 0x8DC7 #define GL_UNSIGNED_INT_VEC4_EXT 0x8DC8 #define GL_INT_SAMPLER_1D_EXT 0x8DC9 #define GL_INT_SAMPLER_2D_EXT 0x8DCA #define GL_INT_SAMPLER_3D_EXT 0x8DCB #define GL_INT_SAMPLER_CUBE_EXT 0x8DCC #define GL_INT_SAMPLER_2D_RECT_EXT 0x8DCD #define GL_INT_SAMPLER_1D_ARRAY_EXT 0x8DCE #define GL_INT_SAMPLER_2D_ARRAY_EXT 0x8DCF #define GL_INT_SAMPLER_BUFFER_EXT 0x8DD0 #define GL_UNSIGNED_INT_SAMPLER_1D_EXT 0x8DD1 #define GL_UNSIGNED_INT_SAMPLER_2D_EXT 0x8DD2 #define GL_UNSIGNED_INT_SAMPLER_3D_EXT 0x8DD3 #define GL_UNSIGNED_INT_SAMPLER_CUBE_EXT 0x8DD4 #define GL_UNSIGNED_INT_SAMPLER_2D_RECT_EXT 0x8DD5 #define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT 0x8DD6 #define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT 0x8DD7 #define GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT 0x8DD8 #endif #ifndef GL_EXT_draw_instanced #endif #ifndef GL_EXT_packed_float #define GL_R11F_G11F_B10F_EXT 0x8C3A #define GL_UNSIGNED_INT_10F_11F_11F_REV_EXT 0x8C3B #define GL_RGBA_SIGNED_COMPONENTS_EXT 0x8C3C #endif #ifndef GL_EXT_texture_array #define GL_TEXTURE_1D_ARRAY_EXT 0x8C18 #define GL_PROXY_TEXTURE_1D_ARRAY_EXT 0x8C19 #define GL_TEXTURE_2D_ARRAY_EXT 0x8C1A #define GL_PROXY_TEXTURE_2D_ARRAY_EXT 0x8C1B #define GL_TEXTURE_BINDING_1D_ARRAY_EXT 0x8C1C #define GL_TEXTURE_BINDING_2D_ARRAY_EXT 0x8C1D #define GL_MAX_ARRAY_TEXTURE_LAYERS_EXT 0x88FF #define GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT 0x884E /* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */ #endif #ifndef GL_EXT_texture_buffer_object #define GL_TEXTURE_BUFFER_EXT 0x8C2A #define GL_MAX_TEXTURE_BUFFER_SIZE_EXT 0x8C2B #define GL_TEXTURE_BINDING_BUFFER_EXT 0x8C2C #define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT 0x8C2D #define GL_TEXTURE_BUFFER_FORMAT_EXT 0x8C2E #endif #ifndef GL_EXT_texture_compression_latc #define GL_COMPRESSED_LUMINANCE_LATC1_EXT 0x8C70 #define GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT 0x8C71 #define GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT 0x8C72 #define GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT 0x8C73 #endif #ifndef GL_EXT_texture_compression_rgtc #define GL_COMPRESSED_RED_RGTC1_EXT 0x8DBB #define GL_COMPRESSED_SIGNED_RED_RGTC1_EXT 0x8DBC #define GL_COMPRESSED_RED_GREEN_RGTC2_EXT 0x8DBD #define GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT 0x8DBE #endif #ifndef GL_EXT_texture_shared_exponent #define GL_RGB9_E5_EXT 0x8C3D #define GL_UNSIGNED_INT_5_9_9_9_REV_EXT 0x8C3E #define GL_TEXTURE_SHARED_SIZE_EXT 0x8C3F #endif #ifndef GL_NV_depth_buffer_float #define GL_DEPTH_COMPONENT32F_NV 0x8DAB #define GL_DEPTH32F_STENCIL8_NV 0x8DAC #define GL_FLOAT_32_UNSIGNED_INT_24_8_REV_NV 0x8DAD #define GL_DEPTH_BUFFER_FLOAT_MODE_NV 0x8DAF #endif #ifndef GL_NV_fragment_program4 #endif #ifndef GL_NV_framebuffer_multisample_coverage #define GL_RENDERBUFFER_COVERAGE_SAMPLES_NV 0x8CAB #define GL_RENDERBUFFER_COLOR_SAMPLES_NV 0x8E10 #define GL_MAX_MULTISAMPLE_COVERAGE_MODES_NV 0x8E11 #define GL_MULTISAMPLE_COVERAGE_MODES_NV 0x8E12 #endif #ifndef GL_EXT_framebuffer_sRGB #define GL_FRAMEBUFFER_SRGB_EXT 0x8DB9 #define GL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x8DBA #endif #ifndef GL_NV_geometry_shader4 #endif #ifndef GL_NV_parameter_buffer_object #define GL_MAX_PROGRAM_PARAMETER_BUFFER_BINDINGS_NV 0x8DA0 #define GL_MAX_PROGRAM_PARAMETER_BUFFER_SIZE_NV 0x8DA1 #define GL_VERTEX_PROGRAM_PARAMETER_BUFFER_NV 0x8DA2 #define GL_GEOMETRY_PROGRAM_PARAMETER_BUFFER_NV 0x8DA3 #define GL_FRAGMENT_PROGRAM_PARAMETER_BUFFER_NV 0x8DA4 #endif #ifndef GL_EXT_draw_buffers2 #endif #ifndef GL_NV_transform_feedback #define GL_BACK_PRIMARY_COLOR_NV 0x8C77 #define GL_BACK_SECONDARY_COLOR_NV 0x8C78 #define GL_TEXTURE_COORD_NV 0x8C79 #define GL_CLIP_DISTANCE_NV 0x8C7A #define GL_VERTEX_ID_NV 0x8C7B #define GL_PRIMITIVE_ID_NV 0x8C7C #define GL_GENERIC_ATTRIB_NV 0x8C7D #define GL_TRANSFORM_FEEDBACK_ATTRIBS_NV 0x8C7E #define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_NV 0x8C7F #define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_NV 0x8C80 #define GL_ACTIVE_VARYINGS_NV 0x8C81 #define GL_ACTIVE_VARYING_MAX_LENGTH_NV 0x8C82 #define GL_TRANSFORM_FEEDBACK_VARYINGS_NV 0x8C83 #define GL_TRANSFORM_FEEDBACK_BUFFER_START_NV 0x8C84 #define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_NV 0x8C85 #define GL_TRANSFORM_FEEDBACK_RECORD_NV 0x8C86 #define GL_PRIMITIVES_GENERATED_NV 0x8C87 #define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_NV 0x8C88 #define GL_RASTERIZER_DISCARD_NV 0x8C89 #define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_ATTRIBS_NV 0x8C8A #define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_NV 0x8C8B #define GL_INTERLEAVED_ATTRIBS_NV 0x8C8C #define GL_SEPARATE_ATTRIBS_NV 0x8C8D #define GL_TRANSFORM_FEEDBACK_BUFFER_NV 0x8C8E #define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_NV 0x8C8F #endif #ifndef GL_EXT_bindable_uniform #define GL_MAX_VERTEX_BINDABLE_UNIFORMS_EXT 0x8DE2 #define GL_MAX_FRAGMENT_BINDABLE_UNIFORMS_EXT 0x8DE3 #define GL_MAX_GEOMETRY_BINDABLE_UNIFORMS_EXT 0x8DE4 #define GL_MAX_BINDABLE_UNIFORM_SIZE_EXT 0x8DED #define GL_UNIFORM_BUFFER_EXT 0x8DEE #define GL_UNIFORM_BUFFER_BINDING_EXT 0x8DEF #endif #ifndef GL_EXT_texture_integer #define GL_RGBA32UI_EXT 0x8D70 #define GL_RGB32UI_EXT 0x8D71 #define GL_ALPHA32UI_EXT 0x8D72 #define GL_INTENSITY32UI_EXT 0x8D73 #define GL_LUMINANCE32UI_EXT 0x8D74 #define GL_LUMINANCE_ALPHA32UI_EXT 0x8D75 #define GL_RGBA16UI_EXT 0x8D76 #define GL_RGB16UI_EXT 0x8D77 #define GL_ALPHA16UI_EXT 0x8D78 #define GL_INTENSITY16UI_EXT 0x8D79 #define GL_LUMINANCE16UI_EXT 0x8D7A #define GL_LUMINANCE_ALPHA16UI_EXT 0x8D7B #define GL_RGBA8UI_EXT 0x8D7C #define GL_RGB8UI_EXT 0x8D7D #define GL_ALPHA8UI_EXT 0x8D7E #define GL_INTENSITY8UI_EXT 0x8D7F #define GL_LUMINANCE8UI_EXT 0x8D80 #define GL_LUMINANCE_ALPHA8UI_EXT 0x8D81 #define GL_RGBA32I_EXT 0x8D82 #define GL_RGB32I_EXT 0x8D83 #define GL_ALPHA32I_EXT 0x8D84 #define GL_INTENSITY32I_EXT 0x8D85 #define GL_LUMINANCE32I_EXT 0x8D86 #define GL_LUMINANCE_ALPHA32I_EXT 0x8D87 #define GL_RGBA16I_EXT 0x8D88 #define GL_RGB16I_EXT 0x8D89 #define GL_ALPHA16I_EXT 0x8D8A #define GL_INTENSITY16I_EXT 0x8D8B #define GL_LUMINANCE16I_EXT 0x8D8C #define GL_LUMINANCE_ALPHA16I_EXT 0x8D8D #define GL_RGBA8I_EXT 0x8D8E #define GL_RGB8I_EXT 0x8D8F #define GL_ALPHA8I_EXT 0x8D90 #define GL_INTENSITY8I_EXT 0x8D91 #define GL_LUMINANCE8I_EXT 0x8D92 #define GL_LUMINANCE_ALPHA8I_EXT 0x8D93 #define GL_RED_INTEGER_EXT 0x8D94 #define GL_GREEN_INTEGER_EXT 0x8D95 #define GL_BLUE_INTEGER_EXT 0x8D96 #define GL_ALPHA_INTEGER_EXT 0x8D97 #define GL_RGB_INTEGER_EXT 0x8D98 #define GL_RGBA_INTEGER_EXT 0x8D99 #define GL_BGR_INTEGER_EXT 0x8D9A #define GL_BGRA_INTEGER_EXT 0x8D9B #define GL_LUMINANCE_INTEGER_EXT 0x8D9C #define GL_LUMINANCE_ALPHA_INTEGER_EXT 0x8D9D #define GL_RGBA_INTEGER_MODE_EXT 0x8D9E #endif #ifndef GL_GREMEDY_frame_terminator #endif #ifndef GL_NV_conditional_render #define GL_QUERY_WAIT_NV 0x8E13 #define GL_QUERY_NO_WAIT_NV 0x8E14 #define GL_QUERY_BY_REGION_WAIT_NV 0x8E15 #define GL_QUERY_BY_REGION_NO_WAIT_NV 0x8E16 #endif #ifndef GL_NV_present_video #define GL_FRAME_NV 0x8E26 #define GL_FIELDS_NV 0x8E27 #define GL_CURRENT_TIME_NV 0x8E28 #define GL_NUM_FILL_STREAMS_NV 0x8E29 #define GL_PRESENT_TIME_NV 0x8E2A #define GL_PRESENT_DURATION_NV 0x8E2B #endif #ifndef GL_EXT_transform_feedback #define GL_TRANSFORM_FEEDBACK_BUFFER_EXT 0x8C8E #define GL_TRANSFORM_FEEDBACK_BUFFER_START_EXT 0x8C84 #define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_EXT 0x8C85 #define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_EXT 0x8C8F #define GL_INTERLEAVED_ATTRIBS_EXT 0x8C8C #define GL_SEPARATE_ATTRIBS_EXT 0x8C8D #define GL_PRIMITIVES_GENERATED_EXT 0x8C87 #define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_EXT 0x8C88 #define GL_RASTERIZER_DISCARD_EXT 0x8C89 #define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_EXT 0x8C8A #define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_EXT 0x8C8B #define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_EXT 0x8C80 #define GL_TRANSFORM_FEEDBACK_VARYINGS_EXT 0x8C83 #define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_EXT 0x8C7F #define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH_EXT 0x8C76 #endif #ifndef GL_EXT_direct_state_access #define GL_PROGRAM_MATRIX_EXT 0x8E2D #define GL_TRANSPOSE_PROGRAM_MATRIX_EXT 0x8E2E #define GL_PROGRAM_MATRIX_STACK_DEPTH_EXT 0x8E2F #endif #ifndef GL_EXT_vertex_array_bgra /* reuse GL_BGRA */ #endif #ifndef GL_EXT_texture_swizzle #define GL_TEXTURE_SWIZZLE_R_EXT 0x8E42 #define GL_TEXTURE_SWIZZLE_G_EXT 0x8E43 #define GL_TEXTURE_SWIZZLE_B_EXT 0x8E44 #define GL_TEXTURE_SWIZZLE_A_EXT 0x8E45 #define GL_TEXTURE_SWIZZLE_RGBA_EXT 0x8E46 #endif #ifndef GL_NV_explicit_multisample #define GL_SAMPLE_POSITION_NV 0x8E50 #define GL_SAMPLE_MASK_NV 0x8E51 #define GL_SAMPLE_MASK_VALUE_NV 0x8E52 #define GL_TEXTURE_BINDING_RENDERBUFFER_NV 0x8E53 #define GL_TEXTURE_RENDERBUFFER_DATA_STORE_BINDING_NV 0x8E54 #define GL_MAX_SAMPLE_MASK_WORDS_NV 0x8E59 #define GL_TEXTURE_RENDERBUFFER_NV 0x8E55 #define GL_SAMPLER_RENDERBUFFER_NV 0x8E56 #define GL_INT_SAMPLER_RENDERBUFFER_NV 0x8E57 #define GL_UNSIGNED_INT_SAMPLER_RENDERBUFFER_NV 0x8E58 #endif #ifndef GL_NV_transform_feedback2 #define GL_TRANSFORM_FEEDBACK_NV 0x8E22 #define GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED_NV 0x8E23 #define GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE_NV 0x8E24 #define GL_TRANSFORM_FEEDBACK_BINDING_NV 0x8E25 #endif /*************************************************************/ #include #ifndef GL_VERSION_2_0 /* GL type for program/shader text */ typedef char GLchar; /* native character */ #endif #ifndef GL_VERSION_1_5 /* GL types for handling large vertex buffer objects */ typedef ptrdiff_t GLintptr; typedef ptrdiff_t GLsizeiptr; #endif #ifndef GL_ARB_vertex_buffer_object /* GL types for handling large vertex buffer objects */ typedef ptrdiff_t GLintptrARB; typedef ptrdiff_t GLsizeiptrARB; #endif #ifndef GL_ARB_shader_objects /* GL types for handling shader object handles and program/shader text */ typedef char GLcharARB; /* native character */ typedef unsigned int GLhandleARB; /* shader object handle */ #endif /* GL types for "half" precision (s10e5) float data in host memory */ #ifndef GL_ARB_half_float_pixel typedef unsigned short GLhalfARB; #endif #ifndef GL_NV_half_float typedef unsigned short GLhalfNV; #endif #ifndef GLEXT_64_TYPES_DEFINED /* This code block is duplicated in glxext.h, so must be protected */ #define GLEXT_64_TYPES_DEFINED /* Define int32_t, int64_t, and uint64_t types for UST/MSC */ /* (as used in the GL_EXT_timer_query extension). */ #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #include #elif defined(__sun__) || defined(__digital__) #include #if defined(__STDC__) #if defined(__arch64__) || defined(_LP64) typedef long int int64_t; typedef unsigned long int uint64_t; #else typedef long long int int64_t; typedef unsigned long long int uint64_t; #endif /* __arch64__ */ #endif /* __STDC__ */ #elif defined( __VMS ) || defined(__sgi) #include #elif defined(__SCO__) || defined(__USLC__) #include #elif defined(__UNIXOS2__) || defined(__SOL64__) typedef long int int32_t; typedef long long int int64_t; typedef unsigned long long int uint64_t; #elif defined(_WIN32) && defined(__GNUC__) #include #elif defined(_WIN32) typedef __int32 int32_t; typedef __int64 int64_t; typedef unsigned __int64 uint64_t; #else #include /* Fallback option */ #endif #endif #ifndef GL_EXT_timer_query typedef int64_t GLint64EXT; typedef uint64_t GLuint64EXT; #endif #ifndef GL_VERSION_1_2 #define GL_VERSION_1_2 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glBlendColor (GLclampf, GLclampf, GLclampf, GLclampf); GLAPI void APIENTRY glBlendEquation (GLenum); GLAPI void APIENTRY glDrawRangeElements (GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *); GLAPI void APIENTRY glColorTable (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *); GLAPI void APIENTRY glColorTableParameterfv (GLenum, GLenum, const GLfloat *); GLAPI void APIENTRY glColorTableParameteriv (GLenum, GLenum, const GLint *); GLAPI void APIENTRY glCopyColorTable (GLenum, GLenum, GLint, GLint, GLsizei); GLAPI void APIENTRY glGetColorTable (GLenum, GLenum, GLenum, GLvoid *); GLAPI void APIENTRY glGetColorTableParameterfv (GLenum, GLenum, GLfloat *); GLAPI void APIENTRY glGetColorTableParameteriv (GLenum, GLenum, GLint *); GLAPI void APIENTRY glColorSubTable (GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *); GLAPI void APIENTRY glCopyColorSubTable (GLenum, GLsizei, GLint, GLint, GLsizei); GLAPI void APIENTRY glConvolutionFilter1D (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *); GLAPI void APIENTRY glConvolutionFilter2D (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *); GLAPI void APIENTRY glConvolutionParameterf (GLenum, GLenum, GLfloat); GLAPI void APIENTRY glConvolutionParameterfv (GLenum, GLenum, const GLfloat *); GLAPI void APIENTRY glConvolutionParameteri (GLenum, GLenum, GLint); GLAPI void APIENTRY glConvolutionParameteriv (GLenum, GLenum, const GLint *); GLAPI void APIENTRY glCopyConvolutionFilter1D (GLenum, GLenum, GLint, GLint, GLsizei); GLAPI void APIENTRY glCopyConvolutionFilter2D (GLenum, GLenum, GLint, GLint, GLsizei, GLsizei); GLAPI void APIENTRY glGetConvolutionFilter (GLenum, GLenum, GLenum, GLvoid *); GLAPI void APIENTRY glGetConvolutionParameterfv (GLenum, GLenum, GLfloat *); GLAPI void APIENTRY glGetConvolutionParameteriv (GLenum, GLenum, GLint *); GLAPI void APIENTRY glGetSeparableFilter (GLenum, GLenum, GLenum, GLvoid *, GLvoid *, GLvoid *); GLAPI void APIENTRY glSeparableFilter2D (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *, const GLvoid *); GLAPI void APIENTRY glGetHistogram (GLenum, GLboolean, GLenum, GLenum, GLvoid *); GLAPI void APIENTRY glGetHistogramParameterfv (GLenum, GLenum, GLfloat *); GLAPI void APIENTRY glGetHistogramParameteriv (GLenum, GLenum, GLint *); GLAPI void APIENTRY glGetMinmax (GLenum, GLboolean, GLenum, GLenum, GLvoid *); GLAPI void APIENTRY glGetMinmaxParameterfv (GLenum, GLenum, GLfloat *); GLAPI void APIENTRY glGetMinmaxParameteriv (GLenum, GLenum, GLint *); GLAPI void APIENTRY glHistogram (GLenum, GLsizei, GLenum, GLboolean); GLAPI void APIENTRY glMinmax (GLenum, GLenum, GLboolean); GLAPI void APIENTRY glResetHistogram (GLenum); GLAPI void APIENTRY glResetMinmax (GLenum); GLAPI void APIENTRY glTexImage3D (GLenum, GLint, GLint, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *); GLAPI void APIENTRY glTexSubImage3D (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *); GLAPI void APIENTRY glCopyTexSubImage3D (GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLBLENDCOLORPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode); typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices); typedef void (APIENTRYP PFNGLCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params); typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params); typedef void (APIENTRYP PFNGLCOPYCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); typedef void (APIENTRYP PFNGLGETCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table); typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data); typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image); typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image); typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat params); typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params); typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIPROC) (GLenum target, GLenum pname, GLint params); typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params); typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image); typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLGETSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span); typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column); typedef void (APIENTRYP PFNGLGETHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLGETMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLHISTOGRAMPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); typedef void (APIENTRYP PFNGLMINMAXPROC) (GLenum target, GLenum internalformat, GLboolean sink); typedef void (APIENTRYP PFNGLRESETHISTOGRAMPROC) (GLenum target); typedef void (APIENTRYP PFNGLRESETMINMAXPROC) (GLenum target); typedef void (APIENTRYP PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); #endif #ifndef GL_VERSION_1_3 #define GL_VERSION_1_3 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glActiveTexture (GLenum); GLAPI void APIENTRY glClientActiveTexture (GLenum); GLAPI void APIENTRY glMultiTexCoord1d (GLenum, GLdouble); GLAPI void APIENTRY glMultiTexCoord1dv (GLenum, const GLdouble *); GLAPI void APIENTRY glMultiTexCoord1f (GLenum, GLfloat); GLAPI void APIENTRY glMultiTexCoord1fv (GLenum, const GLfloat *); GLAPI void APIENTRY glMultiTexCoord1i (GLenum, GLint); GLAPI void APIENTRY glMultiTexCoord1iv (GLenum, const GLint *); GLAPI void APIENTRY glMultiTexCoord1s (GLenum, GLshort); GLAPI void APIENTRY glMultiTexCoord1sv (GLenum, const GLshort *); GLAPI void APIENTRY glMultiTexCoord2d (GLenum, GLdouble, GLdouble); GLAPI void APIENTRY glMultiTexCoord2dv (GLenum, const GLdouble *); GLAPI void APIENTRY glMultiTexCoord2f (GLenum, GLfloat, GLfloat); GLAPI void APIENTRY glMultiTexCoord2fv (GLenum, const GLfloat *); GLAPI void APIENTRY glMultiTexCoord2i (GLenum, GLint, GLint); GLAPI void APIENTRY glMultiTexCoord2iv (GLenum, const GLint *); GLAPI void APIENTRY glMultiTexCoord2s (GLenum, GLshort, GLshort); GLAPI void APIENTRY glMultiTexCoord2sv (GLenum, const GLshort *); GLAPI void APIENTRY glMultiTexCoord3d (GLenum, GLdouble, GLdouble, GLdouble); GLAPI void APIENTRY glMultiTexCoord3dv (GLenum, const GLdouble *); GLAPI void APIENTRY glMultiTexCoord3f (GLenum, GLfloat, GLfloat, GLfloat); GLAPI void APIENTRY glMultiTexCoord3fv (GLenum, const GLfloat *); GLAPI void APIENTRY glMultiTexCoord3i (GLenum, GLint, GLint, GLint); GLAPI void APIENTRY glMultiTexCoord3iv (GLenum, const GLint *); GLAPI void APIENTRY glMultiTexCoord3s (GLenum, GLshort, GLshort, GLshort); GLAPI void APIENTRY glMultiTexCoord3sv (GLenum, const GLshort *); GLAPI void APIENTRY glMultiTexCoord4d (GLenum, GLdouble, GLdouble, GLdouble, GLdouble); GLAPI void APIENTRY glMultiTexCoord4dv (GLenum, const GLdouble *); GLAPI void APIENTRY glMultiTexCoord4f (GLenum, GLfloat, GLfloat, GLfloat, GLfloat); GLAPI void APIENTRY glMultiTexCoord4fv (GLenum, const GLfloat *); GLAPI void APIENTRY glMultiTexCoord4i (GLenum, GLint, GLint, GLint, GLint); GLAPI void APIENTRY glMultiTexCoord4iv (GLenum, const GLint *); GLAPI void APIENTRY glMultiTexCoord4s (GLenum, GLshort, GLshort, GLshort, GLshort); GLAPI void APIENTRY glMultiTexCoord4sv (GLenum, const GLshort *); GLAPI void APIENTRY glLoadTransposeMatrixf (const GLfloat *); GLAPI void APIENTRY glLoadTransposeMatrixd (const GLdouble *); GLAPI void APIENTRY glMultTransposeMatrixf (const GLfloat *); GLAPI void APIENTRY glMultTransposeMatrixd (const GLdouble *); GLAPI void APIENTRY glSampleCoverage (GLclampf, GLboolean); GLAPI void APIENTRY glCompressedTexImage3D (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *); GLAPI void APIENTRY glCompressedTexImage2D (GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *); GLAPI void APIENTRY glCompressedTexImage1D (GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid *); GLAPI void APIENTRY glCompressedTexSubImage3D (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *); GLAPI void APIENTRY glCompressedTexSubImage2D (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *); GLAPI void APIENTRY glCompressedTexSubImage1D (GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *); GLAPI void APIENTRY glGetCompressedTexImage (GLenum, GLint, GLvoid *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture); typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture); typedef void (APIENTRYP PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s); typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVPROC) (GLenum target, const GLdouble *v); typedef void (APIENTRYP PFNGLMULTITEXCOORD1FPROC) (GLenum target, GLfloat s); typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVPROC) (GLenum target, const GLfloat *v); typedef void (APIENTRYP PFNGLMULTITEXCOORD1IPROC) (GLenum target, GLint s); typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVPROC) (GLenum target, const GLint *v); typedef void (APIENTRYP PFNGLMULTITEXCOORD1SPROC) (GLenum target, GLshort s); typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVPROC) (GLenum target, const GLshort *v); typedef void (APIENTRYP PFNGLMULTITEXCOORD2DPROC) (GLenum target, GLdouble s, GLdouble t); typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVPROC) (GLenum target, const GLdouble *v); typedef void (APIENTRYP PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t); typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat *v); typedef void (APIENTRYP PFNGLMULTITEXCOORD2IPROC) (GLenum target, GLint s, GLint t); typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVPROC) (GLenum target, const GLint *v); typedef void (APIENTRYP PFNGLMULTITEXCOORD2SPROC) (GLenum target, GLshort s, GLshort t); typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVPROC) (GLenum target, const GLshort *v); typedef void (APIENTRYP PFNGLMULTITEXCOORD3DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r); typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVPROC) (GLenum target, const GLdouble *v); typedef void (APIENTRYP PFNGLMULTITEXCOORD3FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r); typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVPROC) (GLenum target, const GLfloat *v); typedef void (APIENTRYP PFNGLMULTITEXCOORD3IPROC) (GLenum target, GLint s, GLint t, GLint r); typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVPROC) (GLenum target, const GLint *v); typedef void (APIENTRYP PFNGLMULTITEXCOORD3SPROC) (GLenum target, GLshort s, GLshort t, GLshort r); typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVPROC) (GLenum target, const GLshort *v); typedef void (APIENTRYP PFNGLMULTITEXCOORD4DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVPROC) (GLenum target, const GLdouble *v); typedef void (APIENTRYP PFNGLMULTITEXCOORD4FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVPROC) (GLenum target, const GLfloat *v); typedef void (APIENTRYP PFNGLMULTITEXCOORD4IPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q); typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVPROC) (GLenum target, const GLint *v); typedef void (APIENTRYP PFNGLMULTITEXCOORD4SPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVPROC) (GLenum target, const GLshort *v); typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFPROC) (const GLfloat *m); typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDPROC) (const GLdouble *m); typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFPROC) (const GLfloat *m); typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDPROC) (const GLdouble *m); typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLclampf value, GLboolean invert); typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data); typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data); typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data); typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data); typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, GLvoid *img); #endif #ifndef GL_VERSION_1_4 #define GL_VERSION_1_4 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glBlendFuncSeparate (GLenum, GLenum, GLenum, GLenum); GLAPI void APIENTRY glFogCoordf (GLfloat); GLAPI void APIENTRY glFogCoordfv (const GLfloat *); GLAPI void APIENTRY glFogCoordd (GLdouble); GLAPI void APIENTRY glFogCoorddv (const GLdouble *); GLAPI void APIENTRY glFogCoordPointer (GLenum, GLsizei, const GLvoid *); GLAPI void APIENTRY glMultiDrawArrays (GLenum, GLint *, GLsizei *, GLsizei); GLAPI void APIENTRY glMultiDrawElements (GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei); GLAPI void APIENTRY glPointParameterf (GLenum, GLfloat); GLAPI void APIENTRY glPointParameterfv (GLenum, const GLfloat *); GLAPI void APIENTRY glPointParameteri (GLenum, GLint); GLAPI void APIENTRY glPointParameteriv (GLenum, const GLint *); GLAPI void APIENTRY glSecondaryColor3b (GLbyte, GLbyte, GLbyte); GLAPI void APIENTRY glSecondaryColor3bv (const GLbyte *); GLAPI void APIENTRY glSecondaryColor3d (GLdouble, GLdouble, GLdouble); GLAPI void APIENTRY glSecondaryColor3dv (const GLdouble *); GLAPI void APIENTRY glSecondaryColor3f (GLfloat, GLfloat, GLfloat); GLAPI void APIENTRY glSecondaryColor3fv (const GLfloat *); GLAPI void APIENTRY glSecondaryColor3i (GLint, GLint, GLint); GLAPI void APIENTRY glSecondaryColor3iv (const GLint *); GLAPI void APIENTRY glSecondaryColor3s (GLshort, GLshort, GLshort); GLAPI void APIENTRY glSecondaryColor3sv (const GLshort *); GLAPI void APIENTRY glSecondaryColor3ub (GLubyte, GLubyte, GLubyte); GLAPI void APIENTRY glSecondaryColor3ubv (const GLubyte *); GLAPI void APIENTRY glSecondaryColor3ui (GLuint, GLuint, GLuint); GLAPI void APIENTRY glSecondaryColor3uiv (const GLuint *); GLAPI void APIENTRY glSecondaryColor3us (GLushort, GLushort, GLushort); GLAPI void APIENTRY glSecondaryColor3usv (const GLushort *); GLAPI void APIENTRY glSecondaryColorPointer (GLint, GLenum, GLsizei, const GLvoid *); GLAPI void APIENTRY glWindowPos2d (GLdouble, GLdouble); GLAPI void APIENTRY glWindowPos2dv (const GLdouble *); GLAPI void APIENTRY glWindowPos2f (GLfloat, GLfloat); GLAPI void APIENTRY glWindowPos2fv (const GLfloat *); GLAPI void APIENTRY glWindowPos2i (GLint, GLint); GLAPI void APIENTRY glWindowPos2iv (const GLint *); GLAPI void APIENTRY glWindowPos2s (GLshort, GLshort); GLAPI void APIENTRY glWindowPos2sv (const GLshort *); GLAPI void APIENTRY glWindowPos3d (GLdouble, GLdouble, GLdouble); GLAPI void APIENTRY glWindowPos3dv (const GLdouble *); GLAPI void APIENTRY glWindowPos3f (GLfloat, GLfloat, GLfloat); GLAPI void APIENTRY glWindowPos3fv (const GLfloat *); GLAPI void APIENTRY glWindowPos3i (GLint, GLint, GLint); GLAPI void APIENTRY glWindowPos3iv (const GLint *); GLAPI void APIENTRY glWindowPos3s (GLshort, GLshort, GLshort); GLAPI void APIENTRY glWindowPos3sv (const GLshort *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); typedef void (APIENTRYP PFNGLFOGCOORDFPROC) (GLfloat coord); typedef void (APIENTRYP PFNGLFOGCOORDFVPROC) (const GLfloat *coord); typedef void (APIENTRYP PFNGLFOGCOORDDPROC) (GLdouble coord); typedef void (APIENTRYP PFNGLFOGCOORDDVPROC) (const GLdouble *coord); typedef void (APIENTRYP PFNGLFOGCOORDPOINTERPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount); typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount); typedef void (APIENTRYP PFNGLPOINTPARAMETERFPROC) (GLenum pname, GLfloat param); typedef void (APIENTRYP PFNGLPOINTPARAMETERFVPROC) (GLenum pname, const GLfloat *params); typedef void (APIENTRYP PFNGLPOINTPARAMETERIPROC) (GLenum pname, GLint param); typedef void (APIENTRYP PFNGLPOINTPARAMETERIVPROC) (GLenum pname, const GLint *params); typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BPROC) (GLbyte red, GLbyte green, GLbyte blue); typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVPROC) (const GLbyte *v); typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DPROC) (GLdouble red, GLdouble green, GLdouble blue); typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVPROC) (const GLdouble *v); typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FPROC) (GLfloat red, GLfloat green, GLfloat blue); typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVPROC) (const GLfloat *v); typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IPROC) (GLint red, GLint green, GLint blue); typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVPROC) (const GLint *v); typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SPROC) (GLshort red, GLshort green, GLshort blue); typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVPROC) (const GLshort *v); typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBPROC) (GLubyte red, GLubyte green, GLubyte blue); typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVPROC) (const GLubyte *v); typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIPROC) (GLuint red, GLuint green, GLuint blue); typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVPROC) (const GLuint *v); typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USPROC) (GLushort red, GLushort green, GLushort blue); typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVPROC) (const GLushort *v); typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); typedef void (APIENTRYP PFNGLWINDOWPOS2DPROC) (GLdouble x, GLdouble y); typedef void (APIENTRYP PFNGLWINDOWPOS2DVPROC) (const GLdouble *v); typedef void (APIENTRYP PFNGLWINDOWPOS2FPROC) (GLfloat x, GLfloat y); typedef void (APIENTRYP PFNGLWINDOWPOS2FVPROC) (const GLfloat *v); typedef void (APIENTRYP PFNGLWINDOWPOS2IPROC) (GLint x, GLint y); typedef void (APIENTRYP PFNGLWINDOWPOS2IVPROC) (const GLint *v); typedef void (APIENTRYP PFNGLWINDOWPOS2SPROC) (GLshort x, GLshort y); typedef void (APIENTRYP PFNGLWINDOWPOS2SVPROC) (const GLshort *v); typedef void (APIENTRYP PFNGLWINDOWPOS3DPROC) (GLdouble x, GLdouble y, GLdouble z); typedef void (APIENTRYP PFNGLWINDOWPOS3DVPROC) (const GLdouble *v); typedef void (APIENTRYP PFNGLWINDOWPOS3FPROC) (GLfloat x, GLfloat y, GLfloat z); typedef void (APIENTRYP PFNGLWINDOWPOS3FVPROC) (const GLfloat *v); typedef void (APIENTRYP PFNGLWINDOWPOS3IPROC) (GLint x, GLint y, GLint z); typedef void (APIENTRYP PFNGLWINDOWPOS3IVPROC) (const GLint *v); typedef void (APIENTRYP PFNGLWINDOWPOS3SPROC) (GLshort x, GLshort y, GLshort z); typedef void (APIENTRYP PFNGLWINDOWPOS3SVPROC) (const GLshort *v); #endif #ifndef GL_VERSION_1_5 #define GL_VERSION_1_5 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glGenQueries (GLsizei, GLuint *); GLAPI void APIENTRY glDeleteQueries (GLsizei, const GLuint *); GLAPI GLboolean APIENTRY glIsQuery (GLuint); GLAPI void APIENTRY glBeginQuery (GLenum, GLuint); GLAPI void APIENTRY glEndQuery (GLenum); GLAPI void APIENTRY glGetQueryiv (GLenum, GLenum, GLint *); GLAPI void APIENTRY glGetQueryObjectiv (GLuint, GLenum, GLint *); GLAPI void APIENTRY glGetQueryObjectuiv (GLuint, GLenum, GLuint *); GLAPI void APIENTRY glBindBuffer (GLenum, GLuint); GLAPI void APIENTRY glDeleteBuffers (GLsizei, const GLuint *); GLAPI void APIENTRY glGenBuffers (GLsizei, GLuint *); GLAPI GLboolean APIENTRY glIsBuffer (GLuint); GLAPI void APIENTRY glBufferData (GLenum, GLsizeiptr, const GLvoid *, GLenum); GLAPI void APIENTRY glBufferSubData (GLenum, GLintptr, GLsizeiptr, const GLvoid *); GLAPI void APIENTRY glGetBufferSubData (GLenum, GLintptr, GLsizeiptr, GLvoid *); GLAPI GLvoid* APIENTRY glMapBuffer (GLenum, GLenum); GLAPI GLboolean APIENTRY glUnmapBuffer (GLenum); GLAPI void APIENTRY glGetBufferParameteriv (GLenum, GLenum, GLint *); GLAPI void APIENTRY glGetBufferPointerv (GLenum, GLenum, GLvoid* *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLGENQUERIESPROC) (GLsizei n, GLuint *ids); typedef void (APIENTRYP PFNGLDELETEQUERIESPROC) (GLsizei n, const GLuint *ids); typedef GLboolean (APIENTRYP PFNGLISQUERYPROC) (GLuint id); typedef void (APIENTRYP PFNGLBEGINQUERYPROC) (GLenum target, GLuint id); typedef void (APIENTRYP PFNGLENDQUERYPROC) (GLenum target); typedef void (APIENTRYP PFNGLGETQUERYIVPROC) (GLenum target, GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVPROC) (GLuint id, GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVPROC) (GLuint id, GLenum pname, GLuint *params); typedef void (APIENTRYP PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer); typedef void (APIENTRYP PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers); typedef void (APIENTRYP PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers); typedef GLboolean (APIENTRYP PFNGLISBUFFERPROC) (GLuint buffer); typedef void (APIENTRYP PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage); typedef void (APIENTRYP PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data); typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, GLvoid *data); typedef GLvoid* (APIENTRYP PFNGLMAPBUFFERPROC) (GLenum target, GLenum access); typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERPROC) (GLenum target); typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVPROC) (GLenum target, GLenum pname, GLvoid* *params); #endif #ifndef GL_VERSION_2_0 #define GL_VERSION_2_0 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glBlendEquationSeparate (GLenum, GLenum); GLAPI void APIENTRY glDrawBuffers (GLsizei, const GLenum *); GLAPI void APIENTRY glStencilOpSeparate (GLenum, GLenum, GLenum, GLenum); GLAPI void APIENTRY glStencilFuncSeparate (GLenum, GLenum, GLint, GLuint); GLAPI void APIENTRY glStencilMaskSeparate (GLenum, GLuint); GLAPI void APIENTRY glAttachShader (GLuint, GLuint); GLAPI void APIENTRY glBindAttribLocation (GLuint, GLuint, const GLchar *); GLAPI void APIENTRY glCompileShader (GLuint); GLAPI GLuint APIENTRY glCreateProgram (void); GLAPI GLuint APIENTRY glCreateShader (GLenum); GLAPI void APIENTRY glDeleteProgram (GLuint); GLAPI void APIENTRY glDeleteShader (GLuint); GLAPI void APIENTRY glDetachShader (GLuint, GLuint); GLAPI void APIENTRY glDisableVertexAttribArray (GLuint); GLAPI void APIENTRY glEnableVertexAttribArray (GLuint); GLAPI void APIENTRY glGetActiveAttrib (GLuint, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLchar *); GLAPI void APIENTRY glGetActiveUniform (GLuint, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLchar *); GLAPI void APIENTRY glGetAttachedShaders (GLuint, GLsizei, GLsizei *, GLuint *); GLAPI GLint APIENTRY glGetAttribLocation (GLuint, const GLchar *); GLAPI void APIENTRY glGetProgramiv (GLuint, GLenum, GLint *); GLAPI void APIENTRY glGetProgramInfoLog (GLuint, GLsizei, GLsizei *, GLchar *); GLAPI void APIENTRY glGetShaderiv (GLuint, GLenum, GLint *); GLAPI void APIENTRY glGetShaderInfoLog (GLuint, GLsizei, GLsizei *, GLchar *); GLAPI void APIENTRY glGetShaderSource (GLuint, GLsizei, GLsizei *, GLchar *); GLAPI GLint APIENTRY glGetUniformLocation (GLuint, const GLchar *); GLAPI void APIENTRY glGetUniformfv (GLuint, GLint, GLfloat *); GLAPI void APIENTRY glGetUniformiv (GLuint, GLint, GLint *); GLAPI void APIENTRY glGetVertexAttribdv (GLuint, GLenum, GLdouble *); GLAPI void APIENTRY glGetVertexAttribfv (GLuint, GLenum, GLfloat *); GLAPI void APIENTRY glGetVertexAttribiv (GLuint, GLenum, GLint *); GLAPI void APIENTRY glGetVertexAttribPointerv (GLuint, GLenum, GLvoid* *); GLAPI GLboolean APIENTRY glIsProgram (GLuint); GLAPI GLboolean APIENTRY glIsShader (GLuint); GLAPI void APIENTRY glLinkProgram (GLuint); GLAPI void APIENTRY glShaderSource (GLuint, GLsizei, const GLchar* *, const GLint *); GLAPI void APIENTRY glUseProgram (GLuint); GLAPI void APIENTRY glUniform1f (GLint, GLfloat); GLAPI void APIENTRY glUniform2f (GLint, GLfloat, GLfloat); GLAPI void APIENTRY glUniform3f (GLint, GLfloat, GLfloat, GLfloat); GLAPI void APIENTRY glUniform4f (GLint, GLfloat, GLfloat, GLfloat, GLfloat); GLAPI void APIENTRY glUniform1i (GLint, GLint); GLAPI void APIENTRY glUniform2i (GLint, GLint, GLint); GLAPI void APIENTRY glUniform3i (GLint, GLint, GLint, GLint); GLAPI void APIENTRY glUniform4i (GLint, GLint, GLint, GLint, GLint); GLAPI void APIENTRY glUniform1fv (GLint, GLsizei, const GLfloat *); GLAPI void APIENTRY glUniform2fv (GLint, GLsizei, const GLfloat *); GLAPI void APIENTRY glUniform3fv (GLint, GLsizei, const GLfloat *); GLAPI void APIENTRY glUniform4fv (GLint, GLsizei, const GLfloat *); GLAPI void APIENTRY glUniform1iv (GLint, GLsizei, const GLint *); GLAPI void APIENTRY glUniform2iv (GLint, GLsizei, const GLint *); GLAPI void APIENTRY glUniform3iv (GLint, GLsizei, const GLint *); GLAPI void APIENTRY glUniform4iv (GLint, GLsizei, const GLint *); GLAPI void APIENTRY glUniformMatrix2fv (GLint, GLsizei, GLboolean, const GLfloat *); GLAPI void APIENTRY glUniformMatrix3fv (GLint, GLsizei, GLboolean, const GLfloat *); GLAPI void APIENTRY glUniformMatrix4fv (GLint, GLsizei, GLboolean, const GLfloat *); GLAPI void APIENTRY glValidateProgram (GLuint); GLAPI void APIENTRY glVertexAttrib1d (GLuint, GLdouble); GLAPI void APIENTRY glVertexAttrib1dv (GLuint, const GLdouble *); GLAPI void APIENTRY glVertexAttrib1f (GLuint, GLfloat); GLAPI void APIENTRY glVertexAttrib1fv (GLuint, const GLfloat *); GLAPI void APIENTRY glVertexAttrib1s (GLuint, GLshort); GLAPI void APIENTRY glVertexAttrib1sv (GLuint, const GLshort *); GLAPI void APIENTRY glVertexAttrib2d (GLuint, GLdouble, GLdouble); GLAPI void APIENTRY glVertexAttrib2dv (GLuint, const GLdouble *); GLAPI void APIENTRY glVertexAttrib2f (GLuint, GLfloat, GLfloat); GLAPI void APIENTRY glVertexAttrib2fv (GLuint, const GLfloat *); GLAPI void APIENTRY glVertexAttrib2s (GLuint, GLshort, GLshort); GLAPI void APIENTRY glVertexAttrib2sv (GLuint, const GLshort *); GLAPI void APIENTRY glVertexAttrib3d (GLuint, GLdouble, GLdouble, GLdouble); GLAPI void APIENTRY glVertexAttrib3dv (GLuint, const GLdouble *); GLAPI void APIENTRY glVertexAttrib3f (GLuint, GLfloat, GLfloat, GLfloat); GLAPI void APIENTRY glVertexAttrib3fv (GLuint, const GLfloat *); GLAPI void APIENTRY glVertexAttrib3s (GLuint, GLshort, GLshort, GLshort); GLAPI void APIENTRY glVertexAttrib3sv (GLuint, const GLshort *); GLAPI void APIENTRY glVertexAttrib4Nbv (GLuint, const GLbyte *); GLAPI void APIENTRY glVertexAttrib4Niv (GLuint, const GLint *); GLAPI void APIENTRY glVertexAttrib4Nsv (GLuint, const GLshort *); GLAPI void APIENTRY glVertexAttrib4Nub (GLuint, GLubyte, GLubyte, GLubyte, GLubyte); GLAPI void APIENTRY glVertexAttrib4Nubv (GLuint, const GLubyte *); GLAPI void APIENTRY glVertexAttrib4Nuiv (GLuint, const GLuint *); GLAPI void APIENTRY glVertexAttrib4Nusv (GLuint, const GLushort *); GLAPI void APIENTRY glVertexAttrib4bv (GLuint, const GLbyte *); GLAPI void APIENTRY glVertexAttrib4d (GLuint, GLdouble, GLdouble, GLdouble, GLdouble); GLAPI void APIENTRY glVertexAttrib4dv (GLuint, const GLdouble *); GLAPI void APIENTRY glVertexAttrib4f (GLuint, GLfloat, GLfloat, GLfloat, GLfloat); GLAPI void APIENTRY glVertexAttrib4fv (GLuint, const GLfloat *); GLAPI void APIENTRY glVertexAttrib4iv (GLuint, const GLint *); GLAPI void APIENTRY glVertexAttrib4s (GLuint, GLshort, GLshort, GLshort, GLshort); GLAPI void APIENTRY glVertexAttrib4sv (GLuint, const GLshort *); GLAPI void APIENTRY glVertexAttrib4ubv (GLuint, const GLubyte *); GLAPI void APIENTRY glVertexAttrib4uiv (GLuint, const GLuint *); GLAPI void APIENTRY glVertexAttrib4usv (GLuint, const GLushort *); GLAPI void APIENTRY glVertexAttribPointer (GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha); typedef void (APIENTRYP PFNGLDRAWBUFFERSPROC) (GLsizei n, const GLenum *bufs); typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); typedef void (APIENTRYP PFNGLSTENCILMASKSEPARATEPROC) (GLenum face, GLuint mask); typedef void (APIENTRYP PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader); typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar *name); typedef void (APIENTRYP PFNGLCOMPILESHADERPROC) (GLuint shader); typedef GLuint (APIENTRYP PFNGLCREATEPROGRAMPROC) (void); typedef GLuint (APIENTRYP PFNGLCREATESHADERPROC) (GLenum type); typedef void (APIENTRYP PFNGLDELETEPROGRAMPROC) (GLuint program); typedef void (APIENTRYP PFNGLDELETESHADERPROC) (GLuint shader); typedef void (APIENTRYP PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader); typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index); typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index); typedef void (APIENTRYP PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); typedef void (APIENTRYP PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj); typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name); typedef void (APIENTRYP PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog); typedef void (APIENTRYP PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); typedef void (APIENTRYP PFNGLGETSHADERSOURCEPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source); typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar *name); typedef void (APIENTRYP PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat *params); typedef void (APIENTRYP PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint *params); typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVPROC) (GLuint index, GLenum pname, GLdouble *params); typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVPROC) (GLuint index, GLenum pname, GLfloat *params); typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, GLvoid* *pointer); typedef GLboolean (APIENTRYP PFNGLISPROGRAMPROC) (GLuint program); typedef GLboolean (APIENTRYP PFNGLISSHADERPROC) (GLuint shader); typedef void (APIENTRYP PFNGLLINKPROGRAMPROC) (GLuint program); typedef void (APIENTRYP PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar* *string, const GLint *length); typedef void (APIENTRYP PFNGLUSEPROGRAMPROC) (GLuint program); typedef void (APIENTRYP PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0); typedef void (APIENTRYP PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1); typedef void (APIENTRYP PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); typedef void (APIENTRYP PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); typedef void (APIENTRYP PFNGLUNIFORM1IPROC) (GLint location, GLint v0); typedef void (APIENTRYP PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1); typedef void (APIENTRYP PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2); typedef void (APIENTRYP PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); typedef void (APIENTRYP PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat *value); typedef void (APIENTRYP PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat *value); typedef void (APIENTRYP PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat *value); typedef void (APIENTRYP PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat *value); typedef void (APIENTRYP PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint *value); typedef void (APIENTRYP PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint *value); typedef void (APIENTRYP PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint *value); typedef void (APIENTRYP PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint *value); typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPROC) (GLuint program); typedef void (APIENTRYP PFNGLVERTEXATTRIB1DPROC) (GLuint index, GLdouble x); typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVPROC) (GLuint index, const GLdouble *v); typedef void (APIENTRYP PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x); typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat *v); typedef void (APIENTRYP PFNGLVERTEXATTRIB1SPROC) (GLuint index, GLshort x); typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVPROC) (GLuint index, const GLshort *v); typedef void (APIENTRYP PFNGLVERTEXATTRIB2DPROC) (GLuint index, GLdouble x, GLdouble y); typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVPROC) (GLuint index, const GLdouble *v); typedef void (APIENTRYP PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y); typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat *v); typedef void (APIENTRYP PFNGLVERTEXATTRIB2SPROC) (GLuint index, GLshort x, GLshort y); typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVPROC) (GLuint index, const GLshort *v); typedef void (APIENTRYP PFNGLVERTEXATTRIB3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVPROC) (GLuint index, const GLdouble *v); typedef void (APIENTRYP PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat *v); typedef void (APIENTRYP PFNGLVERTEXATTRIB3SPROC) (GLuint index, GLshort x, GLshort y, GLshort z); typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVPROC) (GLuint index, const GLshort *v); typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVPROC) (GLuint index, const GLbyte *v); typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVPROC) (GLuint index, const GLint *v); typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVPROC) (GLuint index, const GLshort *v); typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVPROC) (GLuint index, const GLubyte *v); typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVPROC) (GLuint index, const GLuint *v); typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVPROC) (GLuint index, const GLushort *v); typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVPROC) (GLuint index, const GLbyte *v); typedef void (APIENTRYP PFNGLVERTEXATTRIB4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVPROC) (GLuint index, const GLdouble *v); typedef void (APIENTRYP PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat *v); typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVPROC) (GLuint index, const GLint *v); typedef void (APIENTRYP PFNGLVERTEXATTRIB4SPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVPROC) (GLuint index, const GLshort *v); typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVPROC) (GLuint index, const GLubyte *v); typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVPROC) (GLuint index, const GLuint *v); typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVPROC) (GLuint index, const GLushort *v); typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer); #endif #ifndef GL_VERSION_2_1 #define GL_VERSION_2_1 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glUniformMatrix2x3fv (GLint, GLsizei, GLboolean, const GLfloat *); GLAPI void APIENTRY glUniformMatrix3x2fv (GLint, GLsizei, GLboolean, const GLfloat *); GLAPI void APIENTRY glUniformMatrix2x4fv (GLint, GLsizei, GLboolean, const GLfloat *); GLAPI void APIENTRY glUniformMatrix4x2fv (GLint, GLsizei, GLboolean, const GLfloat *); GLAPI void APIENTRY glUniformMatrix3x4fv (GLint, GLsizei, GLboolean, const GLfloat *); GLAPI void APIENTRY glUniformMatrix4x3fv (GLint, GLsizei, GLboolean, const GLfloat *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); #endif #ifndef GL_VERSION_3_0 #define GL_VERSION_3_0 1 /* OpenGL 3.0 also reuses entry points from these extensions: */ /* ARB_framebuffer_object */ /* ARB_map_buffer_range */ /* ARB_vertex_array_object */ #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glColorMaski (GLuint, GLboolean, GLboolean, GLboolean, GLboolean); GLAPI void APIENTRY glGetBooleani_v (GLenum, GLuint, GLboolean *); GLAPI void APIENTRY glGetIntegeri_v (GLenum, GLuint, GLint *); GLAPI void APIENTRY glEnablei (GLenum, GLuint); GLAPI void APIENTRY glDisablei (GLenum, GLuint); GLAPI GLboolean APIENTRY glIsEnabledi (GLenum, GLuint); GLAPI void APIENTRY glBeginTransformFeedback (GLenum); GLAPI void APIENTRY glEndTransformFeedback (void); GLAPI void APIENTRY glBindBufferRange (GLenum, GLuint, GLuint, GLintptr, GLsizeiptr); GLAPI void APIENTRY glBindBufferBase (GLenum, GLuint, GLuint); GLAPI void APIENTRY glTransformFeedbackVaryings (GLuint, GLsizei, const GLint *, GLenum); GLAPI void APIENTRY glGetTransformFeedbackVarying (GLuint, GLuint, GLint *); GLAPI void APIENTRY glClampColor (GLenum, GLenum); GLAPI void APIENTRY glBeginConditionalRender (GLuint, GLenum); GLAPI void APIENTRY glEndConditionalRender (void); GLAPI void APIENTRY glVertexAttribI1i (GLuint, GLint); GLAPI void APIENTRY glVertexAttribI2i (GLuint, GLint, GLint); GLAPI void APIENTRY glVertexAttribI3i (GLuint, GLint, GLint, GLint); GLAPI void APIENTRY glVertexAttribI4i (GLuint, GLint, GLint, GLint, GLint); GLAPI void APIENTRY glVertexAttribI1ui (GLuint, GLuint); GLAPI void APIENTRY glVertexAttribI2ui (GLuint, GLuint, GLuint); GLAPI void APIENTRY glVertexAttribI3ui (GLuint, GLuint, GLuint, GLuint); GLAPI void APIENTRY glVertexAttribI4ui (GLuint, GLuint, GLuint, GLuint, GLuint); GLAPI void APIENTRY glVertexAttribI1iv (GLuint, const GLint *); GLAPI void APIENTRY glVertexAttribI2iv (GLuint, const GLint *); GLAPI void APIENTRY glVertexAttribI3iv (GLuint, const GLint *); GLAPI void APIENTRY glVertexAttribI4iv (GLuint, const GLint *); GLAPI void APIENTRY glVertexAttribI1uiv (GLuint, const GLuint *); GLAPI void APIENTRY glVertexAttribI2uiv (GLuint, const GLuint *); GLAPI void APIENTRY glVertexAttribI3uiv (GLuint, const GLuint *); GLAPI void APIENTRY glVertexAttribI4uiv (GLuint, const GLuint *); GLAPI void APIENTRY glVertexAttribI4bv (GLuint, const GLbyte *); GLAPI void APIENTRY glVertexAttribI4sv (GLuint, const GLshort *); GLAPI void APIENTRY glVertexAttribI4ubv (GLuint, const GLubyte *); GLAPI void APIENTRY glVertexAttribI4usv (GLuint, const GLushort *); GLAPI void APIENTRY glVertexAttribIPointer (GLuint, GLint, GLenum, GLsizei, const GLvoid *); GLAPI void APIENTRY glGetVertexAttribIiv (GLuint, GLenum, GLint *); GLAPI void APIENTRY glGetVertexAttribIuiv (GLuint, GLenum, GLuint *); GLAPI void APIENTRY glGetUniformuiv (GLuint, GLint, GLuint *); GLAPI void APIENTRY glBindFragDataLocation (GLuint, GLuint, const GLchar *); GLAPI GLint APIENTRY glGetFragDataLocation (GLuint, const GLchar *); GLAPI void APIENTRY glUniform1ui (GLint, GLuint); GLAPI void APIENTRY glUniform2ui (GLint, GLuint, GLuint); GLAPI void APIENTRY glUniform3ui (GLint, GLuint, GLuint, GLuint); GLAPI void APIENTRY glUniform4ui (GLint, GLuint, GLuint, GLuint, GLuint); GLAPI void APIENTRY glUniform1uiv (GLint, GLsizei, const GLuint *); GLAPI void APIENTRY glUniform2uiv (GLint, GLsizei, const GLuint *); GLAPI void APIENTRY glUniform3uiv (GLint, GLsizei, const GLuint *); GLAPI void APIENTRY glUniform4uiv (GLint, GLsizei, const GLuint *); GLAPI void APIENTRY glTexParameterIiv (GLenum, GLenum, const GLint *); GLAPI void APIENTRY glTexParameterIuiv (GLenum, GLenum, const GLuint *); GLAPI void APIENTRY glGetTexParameterIiv (GLenum, GLenum, GLint *); GLAPI void APIENTRY glGetTexParameterIuiv (GLenum, GLenum, GLuint *); GLAPI void APIENTRY glClearBufferiv (GLenum, GLint, const GLint *); GLAPI void APIENTRY glClearBufferuiv (GLenum, GLint, const GLuint *); GLAPI void APIENTRY glClearBufferfv (GLenum, GLint, const GLfloat *); GLAPI void APIENTRY glClearBufferfi (GLenum, GLint, GLfloat, GLint); GLAPI const GLubyte * APIENTRY glGetStringi (GLenum, GLuint); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLCOLORMASKIPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); typedef void (APIENTRYP PFNGLGETBOOLEANI_VPROC) (GLenum target, GLuint index, GLboolean *data); typedef void (APIENTRYP PFNGLGETINTEGERI_VPROC) (GLenum target, GLuint index, GLint *data); typedef void (APIENTRYP PFNGLENABLEIPROC) (GLenum target, GLuint index); typedef void (APIENTRYP PFNGLDISABLEIPROC) (GLenum target, GLuint index); typedef GLboolean (APIENTRYP PFNGLISENABLEDIPROC) (GLenum target, GLuint index); typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKPROC) (GLenum primitiveMode); typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKPROC) (void); typedef void (APIENTRYP PFNGLBINDBUFFERRANGEPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); typedef void (APIENTRYP PFNGLBINDBUFFERBASEPROC) (GLenum target, GLuint index, GLuint buffer); typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSPROC) (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode); typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGPROC) (GLuint program, GLuint index, GLint *location); typedef void (APIENTRYP PFNGLCLAMPCOLORPROC) (GLenum target, GLenum clamp); typedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERPROC) (GLuint id, GLenum mode); typedef void (APIENTRYP PFNGLENDCONDITIONALRENDERPROC) (void); typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IPROC) (GLuint index, GLint x); typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IPROC) (GLuint index, GLint x, GLint y); typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IPROC) (GLuint index, GLint x, GLint y, GLint z); typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w); typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIPROC) (GLuint index, GLuint x); typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIPROC) (GLuint index, GLuint x, GLuint y); typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z); typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IVPROC) (GLuint index, const GLint *v); typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IVPROC) (GLuint index, const GLint *v); typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IVPROC) (GLuint index, const GLint *v); typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IVPROC) (GLuint index, const GLint *v); typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIVPROC) (GLuint index, const GLuint *v); typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIVPROC) (GLuint index, const GLuint *v); typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIVPROC) (GLuint index, const GLuint *v); typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIVPROC) (GLuint index, const GLuint *v); typedef void (APIENTRYP PFNGLVERTEXATTRIBI4BVPROC) (GLuint index, const GLbyte *v); typedef void (APIENTRYP PFNGLVERTEXATTRIBI4SVPROC) (GLuint index, const GLshort *v); typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UBVPROC) (GLuint index, const GLubyte *v); typedef void (APIENTRYP PFNGLVERTEXATTRIBI4USVPROC) (GLuint index, const GLushort *v); typedef void (APIENTRYP PFNGLVERTEXATTRIBIPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIIVPROC) (GLuint index, GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIUIVPROC) (GLuint index, GLenum pname, GLuint *params); typedef void (APIENTRYP PFNGLGETUNIFORMUIVPROC) (GLuint program, GLint location, GLuint *params); typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONPROC) (GLuint program, GLuint color, const GLchar *name); typedef GLint (APIENTRYP PFNGLGETFRAGDATALOCATIONPROC) (GLuint program, const GLchar *name); typedef void (APIENTRYP PFNGLUNIFORM1UIPROC) (GLint location, GLuint v0); typedef void (APIENTRYP PFNGLUNIFORM2UIPROC) (GLint location, GLuint v0, GLuint v1); typedef void (APIENTRYP PFNGLUNIFORM3UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2); typedef void (APIENTRYP PFNGLUNIFORM4UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); typedef void (APIENTRYP PFNGLUNIFORM1UIVPROC) (GLint location, GLsizei count, const GLuint *value); typedef void (APIENTRYP PFNGLUNIFORM2UIVPROC) (GLint location, GLsizei count, const GLuint *value); typedef void (APIENTRYP PFNGLUNIFORM3UIVPROC) (GLint location, GLsizei count, const GLuint *value); typedef void (APIENTRYP PFNGLUNIFORM4UIVPROC) (GLint location, GLsizei count, const GLuint *value); typedef void (APIENTRYP PFNGLTEXPARAMETERIIVPROC) (GLenum target, GLenum pname, const GLint *params); typedef void (APIENTRYP PFNGLTEXPARAMETERIUIVPROC) (GLenum target, GLenum pname, const GLuint *params); typedef void (APIENTRYP PFNGLGETTEXPARAMETERIIVPROC) (GLenum target, GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLGETTEXPARAMETERIUIVPROC) (GLenum target, GLenum pname, GLuint *params); typedef void (APIENTRYP PFNGLCLEARBUFFERIVPROC) (GLenum buffer, GLint drawbuffer, const GLint *value); typedef void (APIENTRYP PFNGLCLEARBUFFERUIVPROC) (GLenum buffer, GLint drawbuffer, const GLuint *value); typedef void (APIENTRYP PFNGLCLEARBUFFERFVPROC) (GLenum buffer, GLint drawbuffer, const GLfloat *value); typedef void (APIENTRYP PFNGLCLEARBUFFERFIPROC) (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); typedef const GLubyte * (APIENTRYP PFNGLGETSTRINGIPROC) (GLenum name, GLuint index); #endif #ifndef GL_ARB_multitexture #define GL_ARB_multitexture 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glActiveTextureARB (GLenum); GLAPI void APIENTRY glClientActiveTextureARB (GLenum); GLAPI void APIENTRY glMultiTexCoord1dARB (GLenum, GLdouble); GLAPI void APIENTRY glMultiTexCoord1dvARB (GLenum, const GLdouble *); GLAPI void APIENTRY glMultiTexCoord1fARB (GLenum, GLfloat); GLAPI void APIENTRY glMultiTexCoord1fvARB (GLenum, const GLfloat *); GLAPI void APIENTRY glMultiTexCoord1iARB (GLenum, GLint); GLAPI void APIENTRY glMultiTexCoord1ivARB (GLenum, const GLint *); GLAPI void APIENTRY glMultiTexCoord1sARB (GLenum, GLshort); GLAPI void APIENTRY glMultiTexCoord1svARB (GLenum, const GLshort *); GLAPI void APIENTRY glMultiTexCoord2dARB (GLenum, GLdouble, GLdouble); GLAPI void APIENTRY glMultiTexCoord2dvARB (GLenum, const GLdouble *); GLAPI void APIENTRY glMultiTexCoord2fARB (GLenum, GLfloat, GLfloat); GLAPI void APIENTRY glMultiTexCoord2fvARB (GLenum, const GLfloat *); GLAPI void APIENTRY glMultiTexCoord2iARB (GLenum, GLint, GLint); GLAPI void APIENTRY glMultiTexCoord2ivARB (GLenum, const GLint *); GLAPI void APIENTRY glMultiTexCoord2sARB (GLenum, GLshort, GLshort); GLAPI void APIENTRY glMultiTexCoord2svARB (GLenum, const GLshort *); GLAPI void APIENTRY glMultiTexCoord3dARB (GLenum, GLdouble, GLdouble, GLdouble); GLAPI void APIENTRY glMultiTexCoord3dvARB (GLenum, const GLdouble *); GLAPI void APIENTRY glMultiTexCoord3fARB (GLenum, GLfloat, GLfloat, GLfloat); GLAPI void APIENTRY glMultiTexCoord3fvARB (GLenum, const GLfloat *); GLAPI void APIENTRY glMultiTexCoord3iARB (GLenum, GLint, GLint, GLint); GLAPI void APIENTRY glMultiTexCoord3ivARB (GLenum, const GLint *); GLAPI void APIENTRY glMultiTexCoord3sARB (GLenum, GLshort, GLshort, GLshort); GLAPI void APIENTRY glMultiTexCoord3svARB (GLenum, const GLshort *); GLAPI void APIENTRY glMultiTexCoord4dARB (GLenum, GLdouble, GLdouble, GLdouble, GLdouble); GLAPI void APIENTRY glMultiTexCoord4dvARB (GLenum, const GLdouble *); GLAPI void APIENTRY glMultiTexCoord4fARB (GLenum, GLfloat, GLfloat, GLfloat, GLfloat); GLAPI void APIENTRY glMultiTexCoord4fvARB (GLenum, const GLfloat *); GLAPI void APIENTRY glMultiTexCoord4iARB (GLenum, GLint, GLint, GLint, GLint); GLAPI void APIENTRY glMultiTexCoord4ivARB (GLenum, const GLint *); GLAPI void APIENTRY glMultiTexCoord4sARB (GLenum, GLshort, GLshort, GLshort, GLshort); GLAPI void APIENTRY glMultiTexCoord4svARB (GLenum, const GLshort *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture); typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture); typedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s); typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v); typedef void (APIENTRYP PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s); typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v); typedef void (APIENTRYP PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s); typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v); typedef void (APIENTRYP PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s); typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v); typedef void (APIENTRYP PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t); typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v); typedef void (APIENTRYP PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t); typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v); typedef void (APIENTRYP PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t); typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v); typedef void (APIENTRYP PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t); typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v); typedef void (APIENTRYP PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r); typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v); typedef void (APIENTRYP PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r); typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v); typedef void (APIENTRYP PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r); typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v); typedef void (APIENTRYP PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r); typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v); typedef void (APIENTRYP PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v); typedef void (APIENTRYP PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v); typedef void (APIENTRYP PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q); typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v); typedef void (APIENTRYP PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v); #endif #ifndef GL_ARB_transpose_matrix #define GL_ARB_transpose_matrix 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glLoadTransposeMatrixfARB (const GLfloat *); GLAPI void APIENTRY glLoadTransposeMatrixdARB (const GLdouble *); GLAPI void APIENTRY glMultTransposeMatrixfARB (const GLfloat *); GLAPI void APIENTRY glMultTransposeMatrixdARB (const GLdouble *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFARBPROC) (const GLfloat *m); typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDARBPROC) (const GLdouble *m); typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFARBPROC) (const GLfloat *m); typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDARBPROC) (const GLdouble *m); #endif #ifndef GL_ARB_multisample #define GL_ARB_multisample 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glSampleCoverageARB (GLclampf, GLboolean); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLSAMPLECOVERAGEARBPROC) (GLclampf value, GLboolean invert); #endif #ifndef GL_ARB_texture_env_add #define GL_ARB_texture_env_add 1 #endif #ifndef GL_ARB_texture_cube_map #define GL_ARB_texture_cube_map 1 #endif #ifndef GL_ARB_texture_compression #define GL_ARB_texture_compression 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glCompressedTexImage3DARB (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *); GLAPI void APIENTRY glCompressedTexImage2DARB (GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *); GLAPI void APIENTRY glCompressedTexImage1DARB (GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid *); GLAPI void APIENTRY glCompressedTexSubImage3DARB (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *); GLAPI void APIENTRY glCompressedTexSubImage2DARB (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *); GLAPI void APIENTRY glCompressedTexSubImage1DARB (GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *); GLAPI void APIENTRY glGetCompressedTexImageARB (GLenum, GLint, GLvoid *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data); typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data); typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data); typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data); typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint level, GLvoid *img); #endif #ifndef GL_ARB_texture_border_clamp #define GL_ARB_texture_border_clamp 1 #endif #ifndef GL_ARB_point_parameters #define GL_ARB_point_parameters 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glPointParameterfARB (GLenum, GLfloat); GLAPI void APIENTRY glPointParameterfvARB (GLenum, const GLfloat *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLPOINTPARAMETERFARBPROC) (GLenum pname, GLfloat param); typedef void (APIENTRYP PFNGLPOINTPARAMETERFVARBPROC) (GLenum pname, const GLfloat *params); #endif #ifndef GL_ARB_vertex_blend #define GL_ARB_vertex_blend 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glWeightbvARB (GLint, const GLbyte *); GLAPI void APIENTRY glWeightsvARB (GLint, const GLshort *); GLAPI void APIENTRY glWeightivARB (GLint, const GLint *); GLAPI void APIENTRY glWeightfvARB (GLint, const GLfloat *); GLAPI void APIENTRY glWeightdvARB (GLint, const GLdouble *); GLAPI void APIENTRY glWeightubvARB (GLint, const GLubyte *); GLAPI void APIENTRY glWeightusvARB (GLint, const GLushort *); GLAPI void APIENTRY glWeightuivARB (GLint, const GLuint *); GLAPI void APIENTRY glWeightPointerARB (GLint, GLenum, GLsizei, const GLvoid *); GLAPI void APIENTRY glVertexBlendARB (GLint); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLWEIGHTBVARBPROC) (GLint size, const GLbyte *weights); typedef void (APIENTRYP PFNGLWEIGHTSVARBPROC) (GLint size, const GLshort *weights); typedef void (APIENTRYP PFNGLWEIGHTIVARBPROC) (GLint size, const GLint *weights); typedef void (APIENTRYP PFNGLWEIGHTFVARBPROC) (GLint size, const GLfloat *weights); typedef void (APIENTRYP PFNGLWEIGHTDVARBPROC) (GLint size, const GLdouble *weights); typedef void (APIENTRYP PFNGLWEIGHTUBVARBPROC) (GLint size, const GLubyte *weights); typedef void (APIENTRYP PFNGLWEIGHTUSVARBPROC) (GLint size, const GLushort *weights); typedef void (APIENTRYP PFNGLWEIGHTUIVARBPROC) (GLint size, const GLuint *weights); typedef void (APIENTRYP PFNGLWEIGHTPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); typedef void (APIENTRYP PFNGLVERTEXBLENDARBPROC) (GLint count); #endif #ifndef GL_ARB_matrix_palette #define GL_ARB_matrix_palette 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glCurrentPaletteMatrixARB (GLint); GLAPI void APIENTRY glMatrixIndexubvARB (GLint, const GLubyte *); GLAPI void APIENTRY glMatrixIndexusvARB (GLint, const GLushort *); GLAPI void APIENTRY glMatrixIndexuivARB (GLint, const GLuint *); GLAPI void APIENTRY glMatrixIndexPointerARB (GLint, GLenum, GLsizei, const GLvoid *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLCURRENTPALETTEMATRIXARBPROC) (GLint index); typedef void (APIENTRYP PFNGLMATRIXINDEXUBVARBPROC) (GLint size, const GLubyte *indices); typedef void (APIENTRYP PFNGLMATRIXINDEXUSVARBPROC) (GLint size, const GLushort *indices); typedef void (APIENTRYP PFNGLMATRIXINDEXUIVARBPROC) (GLint size, const GLuint *indices); typedef void (APIENTRYP PFNGLMATRIXINDEXPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); #endif #ifndef GL_ARB_texture_env_combine #define GL_ARB_texture_env_combine 1 #endif #ifndef GL_ARB_texture_env_crossbar #define GL_ARB_texture_env_crossbar 1 #endif #ifndef GL_ARB_texture_env_dot3 #define GL_ARB_texture_env_dot3 1 #endif #ifndef GL_ARB_texture_mirrored_repeat #define GL_ARB_texture_mirrored_repeat 1 #endif #ifndef GL_ARB_depth_texture #define GL_ARB_depth_texture 1 #endif #ifndef GL_ARB_shadow #define GL_ARB_shadow 1 #endif #ifndef GL_ARB_shadow_ambient #define GL_ARB_shadow_ambient 1 #endif #ifndef GL_ARB_window_pos #define GL_ARB_window_pos 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glWindowPos2dARB (GLdouble, GLdouble); GLAPI void APIENTRY glWindowPos2dvARB (const GLdouble *); GLAPI void APIENTRY glWindowPos2fARB (GLfloat, GLfloat); GLAPI void APIENTRY glWindowPos2fvARB (const GLfloat *); GLAPI void APIENTRY glWindowPos2iARB (GLint, GLint); GLAPI void APIENTRY glWindowPos2ivARB (const GLint *); GLAPI void APIENTRY glWindowPos2sARB (GLshort, GLshort); GLAPI void APIENTRY glWindowPos2svARB (const GLshort *); GLAPI void APIENTRY glWindowPos3dARB (GLdouble, GLdouble, GLdouble); GLAPI void APIENTRY glWindowPos3dvARB (const GLdouble *); GLAPI void APIENTRY glWindowPos3fARB (GLfloat, GLfloat, GLfloat); GLAPI void APIENTRY glWindowPos3fvARB (const GLfloat *); GLAPI void APIENTRY glWindowPos3iARB (GLint, GLint, GLint); GLAPI void APIENTRY glWindowPos3ivARB (const GLint *); GLAPI void APIENTRY glWindowPos3sARB (GLshort, GLshort, GLshort); GLAPI void APIENTRY glWindowPos3svARB (const GLshort *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLWINDOWPOS2DARBPROC) (GLdouble x, GLdouble y); typedef void (APIENTRYP PFNGLWINDOWPOS2DVARBPROC) (const GLdouble *v); typedef void (APIENTRYP PFNGLWINDOWPOS2FARBPROC) (GLfloat x, GLfloat y); typedef void (APIENTRYP PFNGLWINDOWPOS2FVARBPROC) (const GLfloat *v); typedef void (APIENTRYP PFNGLWINDOWPOS2IARBPROC) (GLint x, GLint y); typedef void (APIENTRYP PFNGLWINDOWPOS2IVARBPROC) (const GLint *v); typedef void (APIENTRYP PFNGLWINDOWPOS2SARBPROC) (GLshort x, GLshort y); typedef void (APIENTRYP PFNGLWINDOWPOS2SVARBPROC) (const GLshort *v); typedef void (APIENTRYP PFNGLWINDOWPOS3DARBPROC) (GLdouble x, GLdouble y, GLdouble z); typedef void (APIENTRYP PFNGLWINDOWPOS3DVARBPROC) (const GLdouble *v); typedef void (APIENTRYP PFNGLWINDOWPOS3FARBPROC) (GLfloat x, GLfloat y, GLfloat z); typedef void (APIENTRYP PFNGLWINDOWPOS3FVARBPROC) (const GLfloat *v); typedef void (APIENTRYP PFNGLWINDOWPOS3IARBPROC) (GLint x, GLint y, GLint z); typedef void (APIENTRYP PFNGLWINDOWPOS3IVARBPROC) (const GLint *v); typedef void (APIENTRYP PFNGLWINDOWPOS3SARBPROC) (GLshort x, GLshort y, GLshort z); typedef void (APIENTRYP PFNGLWINDOWPOS3SVARBPROC) (const GLshort *v); #endif #ifndef GL_ARB_vertex_program #define GL_ARB_vertex_program 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glVertexAttrib1dARB (GLuint, GLdouble); GLAPI void APIENTRY glVertexAttrib1dvARB (GLuint, const GLdouble *); GLAPI void APIENTRY glVertexAttrib1fARB (GLuint, GLfloat); GLAPI void APIENTRY glVertexAttrib1fvARB (GLuint, const GLfloat *); GLAPI void APIENTRY glVertexAttrib1sARB (GLuint, GLshort); GLAPI void APIENTRY glVertexAttrib1svARB (GLuint, const GLshort *); GLAPI void APIENTRY glVertexAttrib2dARB (GLuint, GLdouble, GLdouble); GLAPI void APIENTRY glVertexAttrib2dvARB (GLuint, const GLdouble *); GLAPI void APIENTRY glVertexAttrib2fARB (GLuint, GLfloat, GLfloat); GLAPI void APIENTRY glVertexAttrib2fvARB (GLuint, const GLfloat *); GLAPI void APIENTRY glVertexAttrib2sARB (GLuint, GLshort, GLshort); GLAPI void APIENTRY glVertexAttrib2svARB (GLuint, const GLshort *); GLAPI void APIENTRY glVertexAttrib3dARB (GLuint, GLdouble, GLdouble, GLdouble); GLAPI void APIENTRY glVertexAttrib3dvARB (GLuint, const GLdouble *); GLAPI void APIENTRY glVertexAttrib3fARB (GLuint, GLfloat, GLfloat, GLfloat); GLAPI void APIENTRY glVertexAttrib3fvARB (GLuint, const GLfloat *); GLAPI void APIENTRY glVertexAttrib3sARB (GLuint, GLshort, GLshort, GLshort); GLAPI void APIENTRY glVertexAttrib3svARB (GLuint, const GLshort *); GLAPI void APIENTRY glVertexAttrib4NbvARB (GLuint, const GLbyte *); GLAPI void APIENTRY glVertexAttrib4NivARB (GLuint, const GLint *); GLAPI void APIENTRY glVertexAttrib4NsvARB (GLuint, const GLshort *); GLAPI void APIENTRY glVertexAttrib4NubARB (GLuint, GLubyte, GLubyte, GLubyte, GLubyte); GLAPI void APIENTRY glVertexAttrib4NubvARB (GLuint, const GLubyte *); GLAPI void APIENTRY glVertexAttrib4NuivARB (GLuint, const GLuint *); GLAPI void APIENTRY glVertexAttrib4NusvARB (GLuint, const GLushort *); GLAPI void APIENTRY glVertexAttrib4bvARB (GLuint, const GLbyte *); GLAPI void APIENTRY glVertexAttrib4dARB (GLuint, GLdouble, GLdouble, GLdouble, GLdouble); GLAPI void APIENTRY glVertexAttrib4dvARB (GLuint, const GLdouble *); GLAPI void APIENTRY glVertexAttrib4fARB (GLuint, GLfloat, GLfloat, GLfloat, GLfloat); GLAPI void APIENTRY glVertexAttrib4fvARB (GLuint, const GLfloat *); GLAPI void APIENTRY glVertexAttrib4ivARB (GLuint, const GLint *); GLAPI void APIENTRY glVertexAttrib4sARB (GLuint, GLshort, GLshort, GLshort, GLshort); GLAPI void APIENTRY glVertexAttrib4svARB (GLuint, const GLshort *); GLAPI void APIENTRY glVertexAttrib4ubvARB (GLuint, const GLubyte *); GLAPI void APIENTRY glVertexAttrib4uivARB (GLuint, const GLuint *); GLAPI void APIENTRY glVertexAttrib4usvARB (GLuint, const GLushort *); GLAPI void APIENTRY glVertexAttribPointerARB (GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid *); GLAPI void APIENTRY glEnableVertexAttribArrayARB (GLuint); GLAPI void APIENTRY glDisableVertexAttribArrayARB (GLuint); GLAPI void APIENTRY glProgramStringARB (GLenum, GLenum, GLsizei, const GLvoid *); GLAPI void APIENTRY glBindProgramARB (GLenum, GLuint); GLAPI void APIENTRY glDeleteProgramsARB (GLsizei, const GLuint *); GLAPI void APIENTRY glGenProgramsARB (GLsizei, GLuint *); GLAPI void APIENTRY glProgramEnvParameter4dARB (GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble); GLAPI void APIENTRY glProgramEnvParameter4dvARB (GLenum, GLuint, const GLdouble *); GLAPI void APIENTRY glProgramEnvParameter4fARB (GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat); GLAPI void APIENTRY glProgramEnvParameter4fvARB (GLenum, GLuint, const GLfloat *); GLAPI void APIENTRY glProgramLocalParameter4dARB (GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble); GLAPI void APIENTRY glProgramLocalParameter4dvARB (GLenum, GLuint, const GLdouble *); GLAPI void APIENTRY glProgramLocalParameter4fARB (GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat); GLAPI void APIENTRY glProgramLocalParameter4fvARB (GLenum, GLuint, const GLfloat *); GLAPI void APIENTRY glGetProgramEnvParameterdvARB (GLenum, GLuint, GLdouble *); GLAPI void APIENTRY glGetProgramEnvParameterfvARB (GLenum, GLuint, GLfloat *); GLAPI void APIENTRY glGetProgramLocalParameterdvARB (GLenum, GLuint, GLdouble *); GLAPI void APIENTRY glGetProgramLocalParameterfvARB (GLenum, GLuint, GLfloat *); GLAPI void APIENTRY glGetProgramivARB (GLenum, GLenum, GLint *); GLAPI void APIENTRY glGetProgramStringARB (GLenum, GLenum, GLvoid *); GLAPI void APIENTRY glGetVertexAttribdvARB (GLuint, GLenum, GLdouble *); GLAPI void APIENTRY glGetVertexAttribfvARB (GLuint, GLenum, GLfloat *); GLAPI void APIENTRY glGetVertexAttribivARB (GLuint, GLenum, GLint *); GLAPI void APIENTRY glGetVertexAttribPointervARB (GLuint, GLenum, GLvoid* *); GLAPI GLboolean APIENTRY glIsProgramARB (GLuint); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLVERTEXATTRIB1DARBPROC) (GLuint index, GLdouble x); typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVARBPROC) (GLuint index, const GLdouble *v); typedef void (APIENTRYP PFNGLVERTEXATTRIB1FARBPROC) (GLuint index, GLfloat x); typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVARBPROC) (GLuint index, const GLfloat *v); typedef void (APIENTRYP PFNGLVERTEXATTRIB1SARBPROC) (GLuint index, GLshort x); typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVARBPROC) (GLuint index, const GLshort *v); typedef void (APIENTRYP PFNGLVERTEXATTRIB2DARBPROC) (GLuint index, GLdouble x, GLdouble y); typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVARBPROC) (GLuint index, const GLdouble *v); typedef void (APIENTRYP PFNGLVERTEXATTRIB2FARBPROC) (GLuint index, GLfloat x, GLfloat y); typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVARBPROC) (GLuint index, const GLfloat *v); typedef void (APIENTRYP PFNGLVERTEXATTRIB2SARBPROC) (GLuint index, GLshort x, GLshort y); typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVARBPROC) (GLuint index, const GLshort *v); typedef void (APIENTRYP PFNGLVERTEXATTRIB3DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVARBPROC) (GLuint index, const GLdouble *v); typedef void (APIENTRYP PFNGLVERTEXATTRIB3FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVARBPROC) (GLuint index, const GLfloat *v); typedef void (APIENTRYP PFNGLVERTEXATTRIB3SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z); typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVARBPROC) (GLuint index, const GLshort *v); typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVARBPROC) (GLuint index, const GLbyte *v); typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVARBPROC) (GLuint index, const GLint *v); typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVARBPROC) (GLuint index, const GLshort *v); typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBARBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVARBPROC) (GLuint index, const GLubyte *v); typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVARBPROC) (GLuint index, const GLuint *v); typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVARBPROC) (GLuint index, const GLushort *v); typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVARBPROC) (GLuint index, const GLbyte *v); typedef void (APIENTRYP PFNGLVERTEXATTRIB4DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVARBPROC) (GLuint index, const GLdouble *v); typedef void (APIENTRYP PFNGLVERTEXATTRIB4FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVARBPROC) (GLuint index, const GLfloat *v); typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVARBPROC) (GLuint index, const GLint *v); typedef void (APIENTRYP PFNGLVERTEXATTRIB4SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVARBPROC) (GLuint index, const GLshort *v); typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVARBPROC) (GLuint index, const GLubyte *v); typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVARBPROC) (GLuint index, const GLuint *v); typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVARBPROC) (GLuint index, const GLushort *v); typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERARBPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer); typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYARBPROC) (GLuint index); typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYARBPROC) (GLuint index); typedef void (APIENTRYP PFNGLPROGRAMSTRINGARBPROC) (GLenum target, GLenum format, GLsizei len, const GLvoid *string); typedef void (APIENTRYP PFNGLBINDPROGRAMARBPROC) (GLenum target, GLuint program); typedef void (APIENTRYP PFNGLDELETEPROGRAMSARBPROC) (GLsizei n, const GLuint *programs); typedef void (APIENTRYP PFNGLGENPROGRAMSARBPROC) (GLsizei n, GLuint *programs); typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params); typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params); typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params); typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params); typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params); typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params); typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params); typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params); typedef void (APIENTRYP PFNGLGETPROGRAMIVARBPROC) (GLenum target, GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGARBPROC) (GLenum target, GLenum pname, GLvoid *string); typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVARBPROC) (GLuint index, GLenum pname, GLdouble *params); typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVARBPROC) (GLuint index, GLenum pname, GLfloat *params); typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVARBPROC) (GLuint index, GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVARBPROC) (GLuint index, GLenum pname, GLvoid* *pointer); typedef GLboolean (APIENTRYP PFNGLISPROGRAMARBPROC) (GLuint program); #endif #ifndef GL_ARB_fragment_program #define GL_ARB_fragment_program 1 /* All ARB_fragment_program entry points are shared with ARB_vertex_program. */ #endif #ifndef GL_ARB_vertex_buffer_object #define GL_ARB_vertex_buffer_object 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glBindBufferARB (GLenum, GLuint); GLAPI void APIENTRY glDeleteBuffersARB (GLsizei, const GLuint *); GLAPI void APIENTRY glGenBuffersARB (GLsizei, GLuint *); GLAPI GLboolean APIENTRY glIsBufferARB (GLuint); GLAPI void APIENTRY glBufferDataARB (GLenum, GLsizeiptrARB, const GLvoid *, GLenum); GLAPI void APIENTRY glBufferSubDataARB (GLenum, GLintptrARB, GLsizeiptrARB, const GLvoid *); GLAPI void APIENTRY glGetBufferSubDataARB (GLenum, GLintptrARB, GLsizeiptrARB, GLvoid *); GLAPI GLvoid* APIENTRY glMapBufferARB (GLenum, GLenum); GLAPI GLboolean APIENTRY glUnmapBufferARB (GLenum); GLAPI void APIENTRY glGetBufferParameterivARB (GLenum, GLenum, GLint *); GLAPI void APIENTRY glGetBufferPointervARB (GLenum, GLenum, GLvoid* *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLBINDBUFFERARBPROC) (GLenum target, GLuint buffer); typedef void (APIENTRYP PFNGLDELETEBUFFERSARBPROC) (GLsizei n, const GLuint *buffers); typedef void (APIENTRYP PFNGLGENBUFFERSARBPROC) (GLsizei n, GLuint *buffers); typedef GLboolean (APIENTRYP PFNGLISBUFFERARBPROC) (GLuint buffer); typedef void (APIENTRYP PFNGLBUFFERDATAARBPROC) (GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage); typedef void (APIENTRYP PFNGLBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data); typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data); typedef GLvoid* (APIENTRYP PFNGLMAPBUFFERARBPROC) (GLenum target, GLenum access); typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERARBPROC) (GLenum target); typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVARBPROC) (GLenum target, GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVARBPROC) (GLenum target, GLenum pname, GLvoid* *params); #endif #ifndef GL_ARB_occlusion_query #define GL_ARB_occlusion_query 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glGenQueriesARB (GLsizei, GLuint *); GLAPI void APIENTRY glDeleteQueriesARB (GLsizei, const GLuint *); GLAPI GLboolean APIENTRY glIsQueryARB (GLuint); GLAPI void APIENTRY glBeginQueryARB (GLenum, GLuint); GLAPI void APIENTRY glEndQueryARB (GLenum); GLAPI void APIENTRY glGetQueryivARB (GLenum, GLenum, GLint *); GLAPI void APIENTRY glGetQueryObjectivARB (GLuint, GLenum, GLint *); GLAPI void APIENTRY glGetQueryObjectuivARB (GLuint, GLenum, GLuint *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLGENQUERIESARBPROC) (GLsizei n, GLuint *ids); typedef void (APIENTRYP PFNGLDELETEQUERIESARBPROC) (GLsizei n, const GLuint *ids); typedef GLboolean (APIENTRYP PFNGLISQUERYARBPROC) (GLuint id); typedef void (APIENTRYP PFNGLBEGINQUERYARBPROC) (GLenum target, GLuint id); typedef void (APIENTRYP PFNGLENDQUERYARBPROC) (GLenum target); typedef void (APIENTRYP PFNGLGETQUERYIVARBPROC) (GLenum target, GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVARBPROC) (GLuint id, GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVARBPROC) (GLuint id, GLenum pname, GLuint *params); #endif #ifndef GL_ARB_shader_objects #define GL_ARB_shader_objects 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glDeleteObjectARB (GLhandleARB); GLAPI GLhandleARB APIENTRY glGetHandleARB (GLenum); GLAPI void APIENTRY glDetachObjectARB (GLhandleARB, GLhandleARB); GLAPI GLhandleARB APIENTRY glCreateShaderObjectARB (GLenum); GLAPI void APIENTRY glShaderSourceARB (GLhandleARB, GLsizei, const GLcharARB* *, const GLint *); GLAPI void APIENTRY glCompileShaderARB (GLhandleARB); GLAPI GLhandleARB APIENTRY glCreateProgramObjectARB (void); GLAPI void APIENTRY glAttachObjectARB (GLhandleARB, GLhandleARB); GLAPI void APIENTRY glLinkProgramARB (GLhandleARB); GLAPI void APIENTRY glUseProgramObjectARB (GLhandleARB); GLAPI void APIENTRY glValidateProgramARB (GLhandleARB); GLAPI void APIENTRY glUniform1fARB (GLint, GLfloat); GLAPI void APIENTRY glUniform2fARB (GLint, GLfloat, GLfloat); GLAPI void APIENTRY glUniform3fARB (GLint, GLfloat, GLfloat, GLfloat); GLAPI void APIENTRY glUniform4fARB (GLint, GLfloat, GLfloat, GLfloat, GLfloat); GLAPI void APIENTRY glUniform1iARB (GLint, GLint); GLAPI void APIENTRY glUniform2iARB (GLint, GLint, GLint); GLAPI void APIENTRY glUniform3iARB (GLint, GLint, GLint, GLint); GLAPI void APIENTRY glUniform4iARB (GLint, GLint, GLint, GLint, GLint); GLAPI void APIENTRY glUniform1fvARB (GLint, GLsizei, const GLfloat *); GLAPI void APIENTRY glUniform2fvARB (GLint, GLsizei, const GLfloat *); GLAPI void APIENTRY glUniform3fvARB (GLint, GLsizei, const GLfloat *); GLAPI void APIENTRY glUniform4fvARB (GLint, GLsizei, const GLfloat *); GLAPI void APIENTRY glUniform1ivARB (GLint, GLsizei, const GLint *); GLAPI void APIENTRY glUniform2ivARB (GLint, GLsizei, const GLint *); GLAPI void APIENTRY glUniform3ivARB (GLint, GLsizei, const GLint *); GLAPI void APIENTRY glUniform4ivARB (GLint, GLsizei, const GLint *); GLAPI void APIENTRY glUniformMatrix2fvARB (GLint, GLsizei, GLboolean, const GLfloat *); GLAPI void APIENTRY glUniformMatrix3fvARB (GLint, GLsizei, GLboolean, const GLfloat *); GLAPI void APIENTRY glUniformMatrix4fvARB (GLint, GLsizei, GLboolean, const GLfloat *); GLAPI void APIENTRY glGetObjectParameterfvARB (GLhandleARB, GLenum, GLfloat *); GLAPI void APIENTRY glGetObjectParameterivARB (GLhandleARB, GLenum, GLint *); GLAPI void APIENTRY glGetInfoLogARB (GLhandleARB, GLsizei, GLsizei *, GLcharARB *); GLAPI void APIENTRY glGetAttachedObjectsARB (GLhandleARB, GLsizei, GLsizei *, GLhandleARB *); GLAPI GLint APIENTRY glGetUniformLocationARB (GLhandleARB, const GLcharARB *); GLAPI void APIENTRY glGetActiveUniformARB (GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *); GLAPI void APIENTRY glGetUniformfvARB (GLhandleARB, GLint, GLfloat *); GLAPI void APIENTRY glGetUniformivARB (GLhandleARB, GLint, GLint *); GLAPI void APIENTRY glGetShaderSourceARB (GLhandleARB, GLsizei, GLsizei *, GLcharARB *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLDELETEOBJECTARBPROC) (GLhandleARB obj); typedef GLhandleARB (APIENTRYP PFNGLGETHANDLEARBPROC) (GLenum pname); typedef void (APIENTRYP PFNGLDETACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB attachedObj); typedef GLhandleARB (APIENTRYP PFNGLCREATESHADEROBJECTARBPROC) (GLenum shaderType); typedef void (APIENTRYP PFNGLSHADERSOURCEARBPROC) (GLhandleARB shaderObj, GLsizei count, const GLcharARB* *string, const GLint *length); typedef void (APIENTRYP PFNGLCOMPILESHADERARBPROC) (GLhandleARB shaderObj); typedef GLhandleARB (APIENTRYP PFNGLCREATEPROGRAMOBJECTARBPROC) (void); typedef void (APIENTRYP PFNGLATTACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB obj); typedef void (APIENTRYP PFNGLLINKPROGRAMARBPROC) (GLhandleARB programObj); typedef void (APIENTRYP PFNGLUSEPROGRAMOBJECTARBPROC) (GLhandleARB programObj); typedef void (APIENTRYP PFNGLVALIDATEPROGRAMARBPROC) (GLhandleARB programObj); typedef void (APIENTRYP PFNGLUNIFORM1FARBPROC) (GLint location, GLfloat v0); typedef void (APIENTRYP PFNGLUNIFORM2FARBPROC) (GLint location, GLfloat v0, GLfloat v1); typedef void (APIENTRYP PFNGLUNIFORM3FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); typedef void (APIENTRYP PFNGLUNIFORM4FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); typedef void (APIENTRYP PFNGLUNIFORM1IARBPROC) (GLint location, GLint v0); typedef void (APIENTRYP PFNGLUNIFORM2IARBPROC) (GLint location, GLint v0, GLint v1); typedef void (APIENTRYP PFNGLUNIFORM3IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2); typedef void (APIENTRYP PFNGLUNIFORM4IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); typedef void (APIENTRYP PFNGLUNIFORM1FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); typedef void (APIENTRYP PFNGLUNIFORM2FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); typedef void (APIENTRYP PFNGLUNIFORM3FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); typedef void (APIENTRYP PFNGLUNIFORM4FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); typedef void (APIENTRYP PFNGLUNIFORM1IVARBPROC) (GLint location, GLsizei count, const GLint *value); typedef void (APIENTRYP PFNGLUNIFORM2IVARBPROC) (GLint location, GLsizei count, const GLint *value); typedef void (APIENTRYP PFNGLUNIFORM3IVARBPROC) (GLint location, GLsizei count, const GLint *value); typedef void (APIENTRYP PFNGLUNIFORM4IVARBPROC) (GLint location, GLsizei count, const GLint *value); typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERFVARBPROC) (GLhandleARB obj, GLenum pname, GLfloat *params); typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERIVARBPROC) (GLhandleARB obj, GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLGETINFOLOGARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog); typedef void (APIENTRYP PFNGLGETATTACHEDOBJECTSARBPROC) (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj); typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name); typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name); typedef void (APIENTRYP PFNGLGETUNIFORMFVARBPROC) (GLhandleARB programObj, GLint location, GLfloat *params); typedef void (APIENTRYP PFNGLGETUNIFORMIVARBPROC) (GLhandleARB programObj, GLint location, GLint *params); typedef void (APIENTRYP PFNGLGETSHADERSOURCEARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source); #endif #ifndef GL_ARB_vertex_shader #define GL_ARB_vertex_shader 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glBindAttribLocationARB (GLhandleARB, GLuint, const GLcharARB *); GLAPI void APIENTRY glGetActiveAttribARB (GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *); GLAPI GLint APIENTRY glGetAttribLocationARB (GLhandleARB, const GLcharARB *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONARBPROC) (GLhandleARB programObj, GLuint index, const GLcharARB *name); typedef void (APIENTRYP PFNGLGETACTIVEATTRIBARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name); typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name); #endif #ifndef GL_ARB_fragment_shader #define GL_ARB_fragment_shader 1 #endif #ifndef GL_ARB_shading_language_100 #define GL_ARB_shading_language_100 1 #endif #ifndef GL_ARB_texture_non_power_of_two #define GL_ARB_texture_non_power_of_two 1 #endif #ifndef GL_ARB_point_sprite #define GL_ARB_point_sprite 1 #endif #ifndef GL_ARB_fragment_program_shadow #define GL_ARB_fragment_program_shadow 1 #endif #ifndef GL_ARB_draw_buffers #define GL_ARB_draw_buffers 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glDrawBuffersARB (GLsizei, const GLenum *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLDRAWBUFFERSARBPROC) (GLsizei n, const GLenum *bufs); #endif #ifndef GL_ARB_texture_rectangle #define GL_ARB_texture_rectangle 1 #endif #ifndef GL_ARB_color_buffer_float #define GL_ARB_color_buffer_float 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glClampColorARB (GLenum, GLenum); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLCLAMPCOLORARBPROC) (GLenum target, GLenum clamp); #endif #ifndef GL_ARB_half_float_pixel #define GL_ARB_half_float_pixel 1 #endif #ifndef GL_ARB_texture_float #define GL_ARB_texture_float 1 #endif #ifndef GL_ARB_pixel_buffer_object #define GL_ARB_pixel_buffer_object 1 #endif #ifndef GL_ARB_depth_buffer_float #define GL_ARB_depth_buffer_float 1 #endif #ifndef GL_ARB_draw_instanced #define GL_ARB_draw_instanced 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glDrawArraysInstancedARB (GLenum, GLint, GLsizei, GLsizei); GLAPI void APIENTRY glDrawElementsInstancedARB (GLenum, GLsizei, GLenum, const GLvoid *, GLsizei); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDARBPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount); typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDARBPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount); #endif #ifndef GL_ARB_framebuffer_object #define GL_ARB_framebuffer_object 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI GLboolean APIENTRY glIsRenderbuffer (GLuint); GLAPI void APIENTRY glBindRenderbuffer (GLenum, GLuint); GLAPI void APIENTRY glDeleteRenderbuffers (GLsizei, const GLuint *); GLAPI void APIENTRY glGenRenderbuffers (GLsizei, GLuint *); GLAPI void APIENTRY glRenderbufferStorage (GLenum, GLenum, GLsizei, GLsizei); GLAPI void APIENTRY glGetRenderbufferParameteriv (GLenum, GLenum, GLint *); GLAPI GLboolean APIENTRY glIsFramebuffer (GLuint); GLAPI void APIENTRY glBindFramebuffer (GLenum, GLuint); GLAPI void APIENTRY glDeleteFramebuffers (GLsizei, const GLuint *); GLAPI void APIENTRY glGenFramebuffers (GLsizei, GLuint *); GLAPI GLenum APIENTRY glCheckFramebufferStatus (GLenum); GLAPI void APIENTRY glFramebufferTexture1D (GLenum, GLenum, GLenum, GLuint, GLint); GLAPI void APIENTRY glFramebufferTexture2D (GLenum, GLenum, GLenum, GLuint, GLint); GLAPI void APIENTRY glFramebufferTexture3D (GLenum, GLenum, GLenum, GLuint, GLint, GLint); GLAPI void APIENTRY glFramebufferRenderbuffer (GLenum, GLenum, GLenum, GLuint); GLAPI void APIENTRY glGetFramebufferAttachmentParameteriv (GLenum, GLenum, GLenum, GLint *); GLAPI void APIENTRY glGenerateMipmap (GLenum); GLAPI void APIENTRY glBlitFramebuffer (GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum); GLAPI void APIENTRY glRenderbufferStorageMultisample (GLenum, GLsizei, GLenum, GLsizei, GLsizei); GLAPI void APIENTRY glFramebufferTextureLayer (GLenum, GLenum, GLuint, GLint, GLint); #endif /* GL_GLEXT_PROTOTYPES */ typedef GLboolean (APIENTRYP PFNGLISRENDERBUFFERPROC) (GLuint renderbuffer); typedef void (APIENTRYP PFNGLBINDRENDERBUFFERPROC) (GLenum target, GLuint renderbuffer); typedef void (APIENTRYP PFNGLDELETERENDERBUFFERSPROC) (GLsizei n, const GLuint *renderbuffers); typedef void (APIENTRYP PFNGLGENRENDERBUFFERSPROC) (GLsizei n, GLuint *renderbuffers); typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); typedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); typedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFERPROC) (GLuint framebuffer); typedef void (APIENTRYP PFNGLBINDFRAMEBUFFERPROC) (GLenum target, GLuint framebuffer); typedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSPROC) (GLsizei n, const GLuint *framebuffers); typedef void (APIENTRYP PFNGLGENFRAMEBUFFERSPROC) (GLsizei n, GLuint *framebuffers); typedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSPROC) (GLenum target); typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); typedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFERPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); typedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLGENERATEMIPMAPPROC) (GLenum target); typedef void (APIENTRYP PFNGLBLITFRAMEBUFFERPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); #endif #ifndef GL_ARB_framebuffer_sRGB #define GL_ARB_framebuffer_sRGB 1 #endif #ifndef GL_ARB_geometry_shader4 #define GL_ARB_geometry_shader4 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glProgramParameteriARB (GLuint, GLenum, GLint); GLAPI void APIENTRY glFramebufferTextureARB (GLenum, GLenum, GLuint, GLint); GLAPI void APIENTRY glFramebufferTextureLayerARB (GLenum, GLenum, GLuint, GLint, GLint); GLAPI void APIENTRY glFramebufferTextureFaceARB (GLenum, GLenum, GLuint, GLint, GLenum); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIARBPROC) (GLuint program, GLenum pname, GLint value); typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level); typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREFACEARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face); #endif #ifndef GL_ARB_half_float_vertex #define GL_ARB_half_float_vertex 1 #endif #ifndef GL_ARB_instanced_arrays #define GL_ARB_instanced_arrays 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glVertexAttribDivisor (GLuint, GLuint); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLVERTEXATTRIBDIVISORPROC) (GLuint index, GLuint divisor); #endif #ifndef GL_ARB_map_buffer_range #define GL_ARB_map_buffer_range 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glMapBufferRange (GLenum, GLintptr, GLsizeiptr, GLbitfield); GLAPI void APIENTRY glFlushMappedBufferRange (GLenum, GLintptr, GLsizeiptr); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLMAPBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); typedef void (APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length); #endif #ifndef GL_ARB_texture_buffer_object #define GL_ARB_texture_buffer_object 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glTexBufferARB (GLenum, GLenum, GLuint); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLTEXBUFFERARBPROC) (GLenum target, GLenum internalformat, GLuint buffer); #endif #ifndef GL_ARB_texture_compression_rgtc #define GL_ARB_texture_compression_rgtc 1 #endif #ifndef GL_ARB_texture_rg #define GL_ARB_texture_rg 1 #endif #ifndef GL_ARB_vertex_array_object #define GL_ARB_vertex_array_object 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glBindVertexArray (GLuint); GLAPI void APIENTRY glDeleteVertexArrays (GLsizei, const GLuint *); GLAPI void APIENTRY glGenVertexArrays (GLsizei, GLuint *); GLAPI GLboolean APIENTRY glIsVertexArray (GLuint); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLBINDVERTEXARRAYPROC) (GLuint array); typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSPROC) (GLsizei n, const GLuint *arrays); typedef void (APIENTRYP PFNGLGENVERTEXARRAYSPROC) (GLsizei n, GLuint *arrays); typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYPROC) (GLuint array); #endif #ifndef GL_EXT_abgr #define GL_EXT_abgr 1 #endif #ifndef GL_EXT_blend_color #define GL_EXT_blend_color 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glBlendColorEXT (GLclampf, GLclampf, GLclampf, GLclampf); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLBLENDCOLOREXTPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); #endif #ifndef GL_EXT_polygon_offset #define GL_EXT_polygon_offset 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glPolygonOffsetEXT (GLfloat, GLfloat); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLPOLYGONOFFSETEXTPROC) (GLfloat factor, GLfloat bias); #endif #ifndef GL_EXT_texture #define GL_EXT_texture 1 #endif #ifndef GL_EXT_texture3D #define GL_EXT_texture3D 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glTexImage3DEXT (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *); GLAPI void APIENTRY glTexSubImage3DEXT (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLTEXIMAGE3DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); #endif #ifndef GL_SGIS_texture_filter4 #define GL_SGIS_texture_filter4 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glGetTexFilterFuncSGIS (GLenum, GLenum, GLfloat *); GLAPI void APIENTRY glTexFilterFuncSGIS (GLenum, GLenum, GLsizei, const GLfloat *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLGETTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLfloat *weights); typedef void (APIENTRYP PFNGLTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLsizei n, const GLfloat *weights); #endif #ifndef GL_EXT_subtexture #define GL_EXT_subtexture 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glTexSubImage1DEXT (GLenum, GLint, GLint, GLsizei, GLenum, GLenum, const GLvoid *); GLAPI void APIENTRY glTexSubImage2DEXT (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); typedef void (APIENTRYP PFNGLTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); #endif #ifndef GL_EXT_copy_texture #define GL_EXT_copy_texture 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glCopyTexImage1DEXT (GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLint); GLAPI void APIENTRY glCopyTexImage2DEXT (GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint); GLAPI void APIENTRY glCopyTexSubImage1DEXT (GLenum, GLint, GLint, GLint, GLint, GLsizei); GLAPI void APIENTRY glCopyTexSubImage2DEXT (GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei); GLAPI void APIENTRY glCopyTexSubImage3DEXT (GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLCOPYTEXIMAGE1DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); typedef void (APIENTRYP PFNGLCOPYTEXIMAGE2DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); #endif #ifndef GL_EXT_histogram #define GL_EXT_histogram 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glGetHistogramEXT (GLenum, GLboolean, GLenum, GLenum, GLvoid *); GLAPI void APIENTRY glGetHistogramParameterfvEXT (GLenum, GLenum, GLfloat *); GLAPI void APIENTRY glGetHistogramParameterivEXT (GLenum, GLenum, GLint *); GLAPI void APIENTRY glGetMinmaxEXT (GLenum, GLboolean, GLenum, GLenum, GLvoid *); GLAPI void APIENTRY glGetMinmaxParameterfvEXT (GLenum, GLenum, GLfloat *); GLAPI void APIENTRY glGetMinmaxParameterivEXT (GLenum, GLenum, GLint *); GLAPI void APIENTRY glHistogramEXT (GLenum, GLsizei, GLenum, GLboolean); GLAPI void APIENTRY glMinmaxEXT (GLenum, GLenum, GLboolean); GLAPI void APIENTRY glResetHistogramEXT (GLenum); GLAPI void APIENTRY glResetMinmaxEXT (GLenum); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLGETHISTOGRAMEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLGETMINMAXEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLHISTOGRAMEXTPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); typedef void (APIENTRYP PFNGLMINMAXEXTPROC) (GLenum target, GLenum internalformat, GLboolean sink); typedef void (APIENTRYP PFNGLRESETHISTOGRAMEXTPROC) (GLenum target); typedef void (APIENTRYP PFNGLRESETMINMAXEXTPROC) (GLenum target); #endif #ifndef GL_EXT_convolution #define GL_EXT_convolution 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glConvolutionFilter1DEXT (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *); GLAPI void APIENTRY glConvolutionFilter2DEXT (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *); GLAPI void APIENTRY glConvolutionParameterfEXT (GLenum, GLenum, GLfloat); GLAPI void APIENTRY glConvolutionParameterfvEXT (GLenum, GLenum, const GLfloat *); GLAPI void APIENTRY glConvolutionParameteriEXT (GLenum, GLenum, GLint); GLAPI void APIENTRY glConvolutionParameterivEXT (GLenum, GLenum, const GLint *); GLAPI void APIENTRY glCopyConvolutionFilter1DEXT (GLenum, GLenum, GLint, GLint, GLsizei); GLAPI void APIENTRY glCopyConvolutionFilter2DEXT (GLenum, GLenum, GLint, GLint, GLsizei, GLsizei); GLAPI void APIENTRY glGetConvolutionFilterEXT (GLenum, GLenum, GLenum, GLvoid *); GLAPI void APIENTRY glGetConvolutionParameterfvEXT (GLenum, GLenum, GLfloat *); GLAPI void APIENTRY glGetConvolutionParameterivEXT (GLenum, GLenum, GLint *); GLAPI void APIENTRY glGetSeparableFilterEXT (GLenum, GLenum, GLenum, GLvoid *, GLvoid *, GLvoid *); GLAPI void APIENTRY glSeparableFilter2DEXT (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *, const GLvoid *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image); typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image); typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat params); typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params); typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint params); typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params); typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image); typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLGETSEPARABLEFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span); typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column); #endif #ifndef GL_SGI_color_matrix #define GL_SGI_color_matrix 1 #endif #ifndef GL_SGI_color_table #define GL_SGI_color_table 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glColorTableSGI (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *); GLAPI void APIENTRY glColorTableParameterfvSGI (GLenum, GLenum, const GLfloat *); GLAPI void APIENTRY glColorTableParameterivSGI (GLenum, GLenum, const GLint *); GLAPI void APIENTRY glCopyColorTableSGI (GLenum, GLenum, GLint, GLint, GLsizei); GLAPI void APIENTRY glGetColorTableSGI (GLenum, GLenum, GLenum, GLvoid *); GLAPI void APIENTRY glGetColorTableParameterfvSGI (GLenum, GLenum, GLfloat *); GLAPI void APIENTRY glGetColorTableParameterivSGI (GLenum, GLenum, GLint *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, const GLfloat *params); typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, const GLint *params); typedef void (APIENTRYP PFNGLCOPYCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); typedef void (APIENTRYP PFNGLGETCOLORTABLESGIPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table); typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, GLfloat *params); typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, GLint *params); #endif #ifndef GL_SGIX_pixel_texture #define GL_SGIX_pixel_texture 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glPixelTexGenSGIX (GLenum); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLPIXELTEXGENSGIXPROC) (GLenum mode); #endif #ifndef GL_SGIS_pixel_texture #define GL_SGIS_pixel_texture 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glPixelTexGenParameteriSGIS (GLenum, GLint); GLAPI void APIENTRY glPixelTexGenParameterivSGIS (GLenum, const GLint *); GLAPI void APIENTRY glPixelTexGenParameterfSGIS (GLenum, GLfloat); GLAPI void APIENTRY glPixelTexGenParameterfvSGIS (GLenum, const GLfloat *); GLAPI void APIENTRY glGetPixelTexGenParameterivSGIS (GLenum, GLint *); GLAPI void APIENTRY glGetPixelTexGenParameterfvSGIS (GLenum, GLfloat *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERISGISPROC) (GLenum pname, GLint param); typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, const GLint *params); typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFSGISPROC) (GLenum pname, GLfloat param); typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params); typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, GLfloat *params); #endif #ifndef GL_SGIS_texture4D #define GL_SGIS_texture4D 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glTexImage4DSGIS (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *); GLAPI void APIENTRY glTexSubImage4DSGIS (GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLTEXIMAGE4DSGISPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const GLvoid *pixels); typedef void (APIENTRYP PFNGLTEXSUBIMAGE4DSGISPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLenum format, GLenum type, const GLvoid *pixels); #endif #ifndef GL_SGI_texture_color_table #define GL_SGI_texture_color_table 1 #endif #ifndef GL_EXT_cmyka #define GL_EXT_cmyka 1 #endif #ifndef GL_EXT_texture_object #define GL_EXT_texture_object 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI GLboolean APIENTRY glAreTexturesResidentEXT (GLsizei, const GLuint *, GLboolean *); GLAPI void APIENTRY glBindTextureEXT (GLenum, GLuint); GLAPI void APIENTRY glDeleteTexturesEXT (GLsizei, const GLuint *); GLAPI void APIENTRY glGenTexturesEXT (GLsizei, GLuint *); GLAPI GLboolean APIENTRY glIsTextureEXT (GLuint); GLAPI void APIENTRY glPrioritizeTexturesEXT (GLsizei, const GLuint *, const GLclampf *); #endif /* GL_GLEXT_PROTOTYPES */ typedef GLboolean (APIENTRYP PFNGLARETEXTURESRESIDENTEXTPROC) (GLsizei n, const GLuint *textures, GLboolean *residences); typedef void (APIENTRYP PFNGLBINDTEXTUREEXTPROC) (GLenum target, GLuint texture); typedef void (APIENTRYP PFNGLDELETETEXTURESEXTPROC) (GLsizei n, const GLuint *textures); typedef void (APIENTRYP PFNGLGENTEXTURESEXTPROC) (GLsizei n, GLuint *textures); typedef GLboolean (APIENTRYP PFNGLISTEXTUREEXTPROC) (GLuint texture); typedef void (APIENTRYP PFNGLPRIORITIZETEXTURESEXTPROC) (GLsizei n, const GLuint *textures, const GLclampf *priorities); #endif #ifndef GL_SGIS_detail_texture #define GL_SGIS_detail_texture 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glDetailTexFuncSGIS (GLenum, GLsizei, const GLfloat *); GLAPI void APIENTRY glGetDetailTexFuncSGIS (GLenum, GLfloat *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLDETAILTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points); typedef void (APIENTRYP PFNGLGETDETAILTEXFUNCSGISPROC) (GLenum target, GLfloat *points); #endif #ifndef GL_SGIS_sharpen_texture #define GL_SGIS_sharpen_texture 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glSharpenTexFuncSGIS (GLenum, GLsizei, const GLfloat *); GLAPI void APIENTRY glGetSharpenTexFuncSGIS (GLenum, GLfloat *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLSHARPENTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points); typedef void (APIENTRYP PFNGLGETSHARPENTEXFUNCSGISPROC) (GLenum target, GLfloat *points); #endif #ifndef GL_EXT_packed_pixels #define GL_EXT_packed_pixels 1 #endif #ifndef GL_SGIS_texture_lod #define GL_SGIS_texture_lod 1 #endif #ifndef GL_SGIS_multisample #define GL_SGIS_multisample 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glSampleMaskSGIS (GLclampf, GLboolean); GLAPI void APIENTRY glSamplePatternSGIS (GLenum); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLSAMPLEMASKSGISPROC) (GLclampf value, GLboolean invert); typedef void (APIENTRYP PFNGLSAMPLEPATTERNSGISPROC) (GLenum pattern); #endif #ifndef GL_EXT_rescale_normal #define GL_EXT_rescale_normal 1 #endif #ifndef GL_EXT_vertex_array #define GL_EXT_vertex_array 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glArrayElementEXT (GLint); GLAPI void APIENTRY glColorPointerEXT (GLint, GLenum, GLsizei, GLsizei, const GLvoid *); GLAPI void APIENTRY glDrawArraysEXT (GLenum, GLint, GLsizei); GLAPI void APIENTRY glEdgeFlagPointerEXT (GLsizei, GLsizei, const GLboolean *); GLAPI void APIENTRY glGetPointervEXT (GLenum, GLvoid* *); GLAPI void APIENTRY glIndexPointerEXT (GLenum, GLsizei, GLsizei, const GLvoid *); GLAPI void APIENTRY glNormalPointerEXT (GLenum, GLsizei, GLsizei, const GLvoid *); GLAPI void APIENTRY glTexCoordPointerEXT (GLint, GLenum, GLsizei, GLsizei, const GLvoid *); GLAPI void APIENTRY glVertexPointerEXT (GLint, GLenum, GLsizei, GLsizei, const GLvoid *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLARRAYELEMENTEXTPROC) (GLint i); typedef void (APIENTRYP PFNGLCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); typedef void (APIENTRYP PFNGLDRAWARRAYSEXTPROC) (GLenum mode, GLint first, GLsizei count); typedef void (APIENTRYP PFNGLEDGEFLAGPOINTEREXTPROC) (GLsizei stride, GLsizei count, const GLboolean *pointer); typedef void (APIENTRYP PFNGLGETPOINTERVEXTPROC) (GLenum pname, GLvoid* *params); typedef void (APIENTRYP PFNGLINDEXPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); typedef void (APIENTRYP PFNGLNORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); typedef void (APIENTRYP PFNGLTEXCOORDPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); typedef void (APIENTRYP PFNGLVERTEXPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); #endif #ifndef GL_EXT_misc_attribute #define GL_EXT_misc_attribute 1 #endif #ifndef GL_SGIS_generate_mipmap #define GL_SGIS_generate_mipmap 1 #endif #ifndef GL_SGIX_clipmap #define GL_SGIX_clipmap 1 #endif #ifndef GL_SGIX_shadow #define GL_SGIX_shadow 1 #endif #ifndef GL_SGIS_texture_edge_clamp #define GL_SGIS_texture_edge_clamp 1 #endif #ifndef GL_SGIS_texture_border_clamp #define GL_SGIS_texture_border_clamp 1 #endif #ifndef GL_EXT_blend_minmax #define GL_EXT_blend_minmax 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glBlendEquationEXT (GLenum); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLBLENDEQUATIONEXTPROC) (GLenum mode); #endif #ifndef GL_EXT_blend_subtract #define GL_EXT_blend_subtract 1 #endif #ifndef GL_EXT_blend_logic_op #define GL_EXT_blend_logic_op 1 #endif #ifndef GL_SGIX_interlace #define GL_SGIX_interlace 1 #endif #ifndef GL_SGIX_pixel_tiles #define GL_SGIX_pixel_tiles 1 #endif #ifndef GL_SGIX_texture_select #define GL_SGIX_texture_select 1 #endif #ifndef GL_SGIX_sprite #define GL_SGIX_sprite 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glSpriteParameterfSGIX (GLenum, GLfloat); GLAPI void APIENTRY glSpriteParameterfvSGIX (GLenum, const GLfloat *); GLAPI void APIENTRY glSpriteParameteriSGIX (GLenum, GLint); GLAPI void APIENTRY glSpriteParameterivSGIX (GLenum, const GLint *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLSPRITEPARAMETERFSGIXPROC) (GLenum pname, GLfloat param); typedef void (APIENTRYP PFNGLSPRITEPARAMETERFVSGIXPROC) (GLenum pname, const GLfloat *params); typedef void (APIENTRYP PFNGLSPRITEPARAMETERISGIXPROC) (GLenum pname, GLint param); typedef void (APIENTRYP PFNGLSPRITEPARAMETERIVSGIXPROC) (GLenum pname, const GLint *params); #endif #ifndef GL_SGIX_texture_multi_buffer #define GL_SGIX_texture_multi_buffer 1 #endif #ifndef GL_EXT_point_parameters #define GL_EXT_point_parameters 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glPointParameterfEXT (GLenum, GLfloat); GLAPI void APIENTRY glPointParameterfvEXT (GLenum, const GLfloat *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLPOINTPARAMETERFEXTPROC) (GLenum pname, GLfloat param); typedef void (APIENTRYP PFNGLPOINTPARAMETERFVEXTPROC) (GLenum pname, const GLfloat *params); #endif #ifndef GL_SGIS_point_parameters #define GL_SGIS_point_parameters 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glPointParameterfSGIS (GLenum, GLfloat); GLAPI void APIENTRY glPointParameterfvSGIS (GLenum, const GLfloat *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLPOINTPARAMETERFSGISPROC) (GLenum pname, GLfloat param); typedef void (APIENTRYP PFNGLPOINTPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params); #endif #ifndef GL_SGIX_instruments #define GL_SGIX_instruments 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI GLint APIENTRY glGetInstrumentsSGIX (void); GLAPI void APIENTRY glInstrumentsBufferSGIX (GLsizei, GLint *); GLAPI GLint APIENTRY glPollInstrumentsSGIX (GLint *); GLAPI void APIENTRY glReadInstrumentsSGIX (GLint); GLAPI void APIENTRY glStartInstrumentsSGIX (void); GLAPI void APIENTRY glStopInstrumentsSGIX (GLint); #endif /* GL_GLEXT_PROTOTYPES */ typedef GLint (APIENTRYP PFNGLGETINSTRUMENTSSGIXPROC) (void); typedef void (APIENTRYP PFNGLINSTRUMENTSBUFFERSGIXPROC) (GLsizei size, GLint *buffer); typedef GLint (APIENTRYP PFNGLPOLLINSTRUMENTSSGIXPROC) (GLint *marker_p); typedef void (APIENTRYP PFNGLREADINSTRUMENTSSGIXPROC) (GLint marker); typedef void (APIENTRYP PFNGLSTARTINSTRUMENTSSGIXPROC) (void); typedef void (APIENTRYP PFNGLSTOPINSTRUMENTSSGIXPROC) (GLint marker); #endif #ifndef GL_SGIX_texture_scale_bias #define GL_SGIX_texture_scale_bias 1 #endif #ifndef GL_SGIX_framezoom #define GL_SGIX_framezoom 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glFrameZoomSGIX (GLint); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLFRAMEZOOMSGIXPROC) (GLint factor); #endif #ifndef GL_SGIX_tag_sample_buffer #define GL_SGIX_tag_sample_buffer 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glTagSampleBufferSGIX (void); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLTAGSAMPLEBUFFERSGIXPROC) (void); #endif #ifndef GL_SGIX_polynomial_ffd #define GL_SGIX_polynomial_ffd 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glDeformationMap3dSGIX (GLenum, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, const GLdouble *); GLAPI void APIENTRY glDeformationMap3fSGIX (GLenum, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, const GLfloat *); GLAPI void APIENTRY glDeformSGIX (GLbitfield); GLAPI void APIENTRY glLoadIdentityDeformationMapSGIX (GLbitfield); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLDEFORMATIONMAP3DSGIXPROC) (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble w1, GLdouble w2, GLint wstride, GLint worder, const GLdouble *points); typedef void (APIENTRYP PFNGLDEFORMATIONMAP3FSGIXPROC) (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat w1, GLfloat w2, GLint wstride, GLint worder, const GLfloat *points); typedef void (APIENTRYP PFNGLDEFORMSGIXPROC) (GLbitfield mask); typedef void (APIENTRYP PFNGLLOADIDENTITYDEFORMATIONMAPSGIXPROC) (GLbitfield mask); #endif #ifndef GL_SGIX_reference_plane #define GL_SGIX_reference_plane 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glReferencePlaneSGIX (const GLdouble *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLREFERENCEPLANESGIXPROC) (const GLdouble *equation); #endif #ifndef GL_SGIX_flush_raster #define GL_SGIX_flush_raster 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glFlushRasterSGIX (void); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLFLUSHRASTERSGIXPROC) (void); #endif #ifndef GL_SGIX_depth_texture #define GL_SGIX_depth_texture 1 #endif #ifndef GL_SGIS_fog_function #define GL_SGIS_fog_function 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glFogFuncSGIS (GLsizei, const GLfloat *); GLAPI void APIENTRY glGetFogFuncSGIS (GLfloat *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLFOGFUNCSGISPROC) (GLsizei n, const GLfloat *points); typedef void (APIENTRYP PFNGLGETFOGFUNCSGISPROC) (GLfloat *points); #endif #ifndef GL_SGIX_fog_offset #define GL_SGIX_fog_offset 1 #endif #ifndef GL_HP_image_transform #define GL_HP_image_transform 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glImageTransformParameteriHP (GLenum, GLenum, GLint); GLAPI void APIENTRY glImageTransformParameterfHP (GLenum, GLenum, GLfloat); GLAPI void APIENTRY glImageTransformParameterivHP (GLenum, GLenum, const GLint *); GLAPI void APIENTRY glImageTransformParameterfvHP (GLenum, GLenum, const GLfloat *); GLAPI void APIENTRY glGetImageTransformParameterivHP (GLenum, GLenum, GLint *); GLAPI void APIENTRY glGetImageTransformParameterfvHP (GLenum, GLenum, GLfloat *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIHPPROC) (GLenum target, GLenum pname, GLint param); typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFHPPROC) (GLenum target, GLenum pname, GLfloat param); typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, const GLint *params); typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, const GLfloat *params); typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, GLfloat *params); #endif #ifndef GL_HP_convolution_border_modes #define GL_HP_convolution_border_modes 1 #endif #ifndef GL_SGIX_texture_add_env #define GL_SGIX_texture_add_env 1 #endif #ifndef GL_EXT_color_subtable #define GL_EXT_color_subtable 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glColorSubTableEXT (GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *); GLAPI void APIENTRY glCopyColorSubTableEXT (GLenum, GLsizei, GLint, GLint, GLsizei); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data); typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); #endif #ifndef GL_PGI_vertex_hints #define GL_PGI_vertex_hints 1 #endif #ifndef GL_PGI_misc_hints #define GL_PGI_misc_hints 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glHintPGI (GLenum, GLint); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLHINTPGIPROC) (GLenum target, GLint mode); #endif #ifndef GL_EXT_paletted_texture #define GL_EXT_paletted_texture 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glColorTableEXT (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *); GLAPI void APIENTRY glGetColorTableEXT (GLenum, GLenum, GLenum, GLvoid *); GLAPI void APIENTRY glGetColorTableParameterivEXT (GLenum, GLenum, GLint *); GLAPI void APIENTRY glGetColorTableParameterfvEXT (GLenum, GLenum, GLfloat *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLCOLORTABLEEXTPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); typedef void (APIENTRYP PFNGLGETCOLORTABLEEXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *data); typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); #endif #ifndef GL_EXT_clip_volume_hint #define GL_EXT_clip_volume_hint 1 #endif #ifndef GL_SGIX_list_priority #define GL_SGIX_list_priority 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glGetListParameterfvSGIX (GLuint, GLenum, GLfloat *); GLAPI void APIENTRY glGetListParameterivSGIX (GLuint, GLenum, GLint *); GLAPI void APIENTRY glListParameterfSGIX (GLuint, GLenum, GLfloat); GLAPI void APIENTRY glListParameterfvSGIX (GLuint, GLenum, const GLfloat *); GLAPI void APIENTRY glListParameteriSGIX (GLuint, GLenum, GLint); GLAPI void APIENTRY glListParameterivSGIX (GLuint, GLenum, const GLint *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLGETLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, GLfloat *params); typedef void (APIENTRYP PFNGLGETLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLLISTPARAMETERFSGIXPROC) (GLuint list, GLenum pname, GLfloat param); typedef void (APIENTRYP PFNGLLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, const GLfloat *params); typedef void (APIENTRYP PFNGLLISTPARAMETERISGIXPROC) (GLuint list, GLenum pname, GLint param); typedef void (APIENTRYP PFNGLLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, const GLint *params); #endif #ifndef GL_SGIX_ir_instrument1 #define GL_SGIX_ir_instrument1 1 #endif #ifndef GL_SGIX_calligraphic_fragment #define GL_SGIX_calligraphic_fragment 1 #endif #ifndef GL_SGIX_texture_lod_bias #define GL_SGIX_texture_lod_bias 1 #endif #ifndef GL_SGIX_shadow_ambient #define GL_SGIX_shadow_ambient 1 #endif #ifndef GL_EXT_index_texture #define GL_EXT_index_texture 1 #endif #ifndef GL_EXT_index_material #define GL_EXT_index_material 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glIndexMaterialEXT (GLenum, GLenum); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLINDEXMATERIALEXTPROC) (GLenum face, GLenum mode); #endif #ifndef GL_EXT_index_func #define GL_EXT_index_func 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glIndexFuncEXT (GLenum, GLclampf); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLINDEXFUNCEXTPROC) (GLenum func, GLclampf ref); #endif #ifndef GL_EXT_index_array_formats #define GL_EXT_index_array_formats 1 #endif #ifndef GL_EXT_compiled_vertex_array #define GL_EXT_compiled_vertex_array 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glLockArraysEXT (GLint, GLsizei); GLAPI void APIENTRY glUnlockArraysEXT (void); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLLOCKARRAYSEXTPROC) (GLint first, GLsizei count); typedef void (APIENTRYP PFNGLUNLOCKARRAYSEXTPROC) (void); #endif #ifndef GL_EXT_cull_vertex #define GL_EXT_cull_vertex 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glCullParameterdvEXT (GLenum, GLdouble *); GLAPI void APIENTRY glCullParameterfvEXT (GLenum, GLfloat *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLCULLPARAMETERDVEXTPROC) (GLenum pname, GLdouble *params); typedef void (APIENTRYP PFNGLCULLPARAMETERFVEXTPROC) (GLenum pname, GLfloat *params); #endif #ifndef GL_SGIX_ycrcb #define GL_SGIX_ycrcb 1 #endif #ifndef GL_SGIX_fragment_lighting #define GL_SGIX_fragment_lighting 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glFragmentColorMaterialSGIX (GLenum, GLenum); GLAPI void APIENTRY glFragmentLightfSGIX (GLenum, GLenum, GLfloat); GLAPI void APIENTRY glFragmentLightfvSGIX (GLenum, GLenum, const GLfloat *); GLAPI void APIENTRY glFragmentLightiSGIX (GLenum, GLenum, GLint); GLAPI void APIENTRY glFragmentLightivSGIX (GLenum, GLenum, const GLint *); GLAPI void APIENTRY glFragmentLightModelfSGIX (GLenum, GLfloat); GLAPI void APIENTRY glFragmentLightModelfvSGIX (GLenum, const GLfloat *); GLAPI void APIENTRY glFragmentLightModeliSGIX (GLenum, GLint); GLAPI void APIENTRY glFragmentLightModelivSGIX (GLenum, const GLint *); GLAPI void APIENTRY glFragmentMaterialfSGIX (GLenum, GLenum, GLfloat); GLAPI void APIENTRY glFragmentMaterialfvSGIX (GLenum, GLenum, const GLfloat *); GLAPI void APIENTRY glFragmentMaterialiSGIX (GLenum, GLenum, GLint); GLAPI void APIENTRY glFragmentMaterialivSGIX (GLenum, GLenum, const GLint *); GLAPI void APIENTRY glGetFragmentLightfvSGIX (GLenum, GLenum, GLfloat *); GLAPI void APIENTRY glGetFragmentLightivSGIX (GLenum, GLenum, GLint *); GLAPI void APIENTRY glGetFragmentMaterialfvSGIX (GLenum, GLenum, GLfloat *); GLAPI void APIENTRY glGetFragmentMaterialivSGIX (GLenum, GLenum, GLint *); GLAPI void APIENTRY glLightEnviSGIX (GLenum, GLint); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLFRAGMENTCOLORMATERIALSGIXPROC) (GLenum face, GLenum mode); typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFSGIXPROC) (GLenum light, GLenum pname, GLfloat param); typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, const GLfloat *params); typedef void (APIENTRYP PFNGLFRAGMENTLIGHTISGIXPROC) (GLenum light, GLenum pname, GLint param); typedef void (APIENTRYP PFNGLFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, const GLint *params); typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFSGIXPROC) (GLenum pname, GLfloat param); typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFVSGIXPROC) (GLenum pname, const GLfloat *params); typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELISGIXPROC) (GLenum pname, GLint param); typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELIVSGIXPROC) (GLenum pname, const GLint *params); typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFSGIXPROC) (GLenum face, GLenum pname, GLfloat param); typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, const GLfloat *params); typedef void (APIENTRYP PFNGLFRAGMENTMATERIALISGIXPROC) (GLenum face, GLenum pname, GLint param); typedef void (APIENTRYP PFNGLFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, const GLint *params); typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, GLfloat *params); typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, GLfloat *params); typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLLIGHTENVISGIXPROC) (GLenum pname, GLint param); #endif #ifndef GL_IBM_rasterpos_clip #define GL_IBM_rasterpos_clip 1 #endif #ifndef GL_HP_texture_lighting #define GL_HP_texture_lighting 1 #endif #ifndef GL_EXT_draw_range_elements #define GL_EXT_draw_range_elements 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glDrawRangeElementsEXT (GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSEXTPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices); #endif #ifndef GL_WIN_phong_shading #define GL_WIN_phong_shading 1 #endif #ifndef GL_WIN_specular_fog #define GL_WIN_specular_fog 1 #endif #ifndef GL_EXT_light_texture #define GL_EXT_light_texture 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glApplyTextureEXT (GLenum); GLAPI void APIENTRY glTextureLightEXT (GLenum); GLAPI void APIENTRY glTextureMaterialEXT (GLenum, GLenum); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLAPPLYTEXTUREEXTPROC) (GLenum mode); typedef void (APIENTRYP PFNGLTEXTURELIGHTEXTPROC) (GLenum pname); typedef void (APIENTRYP PFNGLTEXTUREMATERIALEXTPROC) (GLenum face, GLenum mode); #endif #ifndef GL_SGIX_blend_alpha_minmax #define GL_SGIX_blend_alpha_minmax 1 #endif #ifndef GL_EXT_bgra #define GL_EXT_bgra 1 #endif #ifndef GL_SGIX_async #define GL_SGIX_async 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glAsyncMarkerSGIX (GLuint); GLAPI GLint APIENTRY glFinishAsyncSGIX (GLuint *); GLAPI GLint APIENTRY glPollAsyncSGIX (GLuint *); GLAPI GLuint APIENTRY glGenAsyncMarkersSGIX (GLsizei); GLAPI void APIENTRY glDeleteAsyncMarkersSGIX (GLuint, GLsizei); GLAPI GLboolean APIENTRY glIsAsyncMarkerSGIX (GLuint); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLASYNCMARKERSGIXPROC) (GLuint marker); typedef GLint (APIENTRYP PFNGLFINISHASYNCSGIXPROC) (GLuint *markerp); typedef GLint (APIENTRYP PFNGLPOLLASYNCSGIXPROC) (GLuint *markerp); typedef GLuint (APIENTRYP PFNGLGENASYNCMARKERSSGIXPROC) (GLsizei range); typedef void (APIENTRYP PFNGLDELETEASYNCMARKERSSGIXPROC) (GLuint marker, GLsizei range); typedef GLboolean (APIENTRYP PFNGLISASYNCMARKERSGIXPROC) (GLuint marker); #endif #ifndef GL_SGIX_async_pixel #define GL_SGIX_async_pixel 1 #endif #ifndef GL_SGIX_async_histogram #define GL_SGIX_async_histogram 1 #endif #ifndef GL_INTEL_parallel_arrays #define GL_INTEL_parallel_arrays 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glVertexPointervINTEL (GLint, GLenum, const GLvoid* *); GLAPI void APIENTRY glNormalPointervINTEL (GLenum, const GLvoid* *); GLAPI void APIENTRY glColorPointervINTEL (GLint, GLenum, const GLvoid* *); GLAPI void APIENTRY glTexCoordPointervINTEL (GLint, GLenum, const GLvoid* *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLVERTEXPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer); typedef void (APIENTRYP PFNGLNORMALPOINTERVINTELPROC) (GLenum type, const GLvoid* *pointer); typedef void (APIENTRYP PFNGLCOLORPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer); typedef void (APIENTRYP PFNGLTEXCOORDPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer); #endif #ifndef GL_HP_occlusion_test #define GL_HP_occlusion_test 1 #endif #ifndef GL_EXT_pixel_transform #define GL_EXT_pixel_transform 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glPixelTransformParameteriEXT (GLenum, GLenum, GLint); GLAPI void APIENTRY glPixelTransformParameterfEXT (GLenum, GLenum, GLfloat); GLAPI void APIENTRY glPixelTransformParameterivEXT (GLenum, GLenum, const GLint *); GLAPI void APIENTRY glPixelTransformParameterfvEXT (GLenum, GLenum, const GLfloat *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint param); typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat param); typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params); typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params); #endif #ifndef GL_EXT_pixel_transform_color_table #define GL_EXT_pixel_transform_color_table 1 #endif #ifndef GL_EXT_shared_texture_palette #define GL_EXT_shared_texture_palette 1 #endif #ifndef GL_EXT_separate_specular_color #define GL_EXT_separate_specular_color 1 #endif #ifndef GL_EXT_secondary_color #define GL_EXT_secondary_color 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glSecondaryColor3bEXT (GLbyte, GLbyte, GLbyte); GLAPI void APIENTRY glSecondaryColor3bvEXT (const GLbyte *); GLAPI void APIENTRY glSecondaryColor3dEXT (GLdouble, GLdouble, GLdouble); GLAPI void APIENTRY glSecondaryColor3dvEXT (const GLdouble *); GLAPI void APIENTRY glSecondaryColor3fEXT (GLfloat, GLfloat, GLfloat); GLAPI void APIENTRY glSecondaryColor3fvEXT (const GLfloat *); GLAPI void APIENTRY glSecondaryColor3iEXT (GLint, GLint, GLint); GLAPI void APIENTRY glSecondaryColor3ivEXT (const GLint *); GLAPI void APIENTRY glSecondaryColor3sEXT (GLshort, GLshort, GLshort); GLAPI void APIENTRY glSecondaryColor3svEXT (const GLshort *); GLAPI void APIENTRY glSecondaryColor3ubEXT (GLubyte, GLubyte, GLubyte); GLAPI void APIENTRY glSecondaryColor3ubvEXT (const GLubyte *); GLAPI void APIENTRY glSecondaryColor3uiEXT (GLuint, GLuint, GLuint); GLAPI void APIENTRY glSecondaryColor3uivEXT (const GLuint *); GLAPI void APIENTRY glSecondaryColor3usEXT (GLushort, GLushort, GLushort); GLAPI void APIENTRY glSecondaryColor3usvEXT (const GLushort *); GLAPI void APIENTRY glSecondaryColorPointerEXT (GLint, GLenum, GLsizei, const GLvoid *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BEXTPROC) (GLbyte red, GLbyte green, GLbyte blue); typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVEXTPROC) (const GLbyte *v); typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DEXTPROC) (GLdouble red, GLdouble green, GLdouble blue); typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVEXTPROC) (const GLdouble *v); typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FEXTPROC) (GLfloat red, GLfloat green, GLfloat blue); typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVEXTPROC) (const GLfloat *v); typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IEXTPROC) (GLint red, GLint green, GLint blue); typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVEXTPROC) (const GLint *v); typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SEXTPROC) (GLshort red, GLshort green, GLshort blue); typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVEXTPROC) (const GLshort *v); typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBEXTPROC) (GLubyte red, GLubyte green, GLubyte blue); typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVEXTPROC) (const GLubyte *v); typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIEXTPROC) (GLuint red, GLuint green, GLuint blue); typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVEXTPROC) (const GLuint *v); typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USEXTPROC) (GLushort red, GLushort green, GLushort blue); typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVEXTPROC) (const GLushort *v); typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); #endif #ifndef GL_EXT_texture_perturb_normal #define GL_EXT_texture_perturb_normal 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glTextureNormalEXT (GLenum); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLTEXTURENORMALEXTPROC) (GLenum mode); #endif #ifndef GL_EXT_multi_draw_arrays #define GL_EXT_multi_draw_arrays 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glMultiDrawArraysEXT (GLenum, GLint *, GLsizei *, GLsizei); GLAPI void APIENTRY glMultiDrawElementsEXT (GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount); typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount); #endif #ifndef GL_EXT_fog_coord #define GL_EXT_fog_coord 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glFogCoordfEXT (GLfloat); GLAPI void APIENTRY glFogCoordfvEXT (const GLfloat *); GLAPI void APIENTRY glFogCoorddEXT (GLdouble); GLAPI void APIENTRY glFogCoorddvEXT (const GLdouble *); GLAPI void APIENTRY glFogCoordPointerEXT (GLenum, GLsizei, const GLvoid *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLFOGCOORDFEXTPROC) (GLfloat coord); typedef void (APIENTRYP PFNGLFOGCOORDFVEXTPROC) (const GLfloat *coord); typedef void (APIENTRYP PFNGLFOGCOORDDEXTPROC) (GLdouble coord); typedef void (APIENTRYP PFNGLFOGCOORDDVEXTPROC) (const GLdouble *coord); typedef void (APIENTRYP PFNGLFOGCOORDPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); #endif #ifndef GL_REND_screen_coordinates #define GL_REND_screen_coordinates 1 #endif #ifndef GL_EXT_coordinate_frame #define GL_EXT_coordinate_frame 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glTangent3bEXT (GLbyte, GLbyte, GLbyte); GLAPI void APIENTRY glTangent3bvEXT (const GLbyte *); GLAPI void APIENTRY glTangent3dEXT (GLdouble, GLdouble, GLdouble); GLAPI void APIENTRY glTangent3dvEXT (const GLdouble *); GLAPI void APIENTRY glTangent3fEXT (GLfloat, GLfloat, GLfloat); GLAPI void APIENTRY glTangent3fvEXT (const GLfloat *); GLAPI void APIENTRY glTangent3iEXT (GLint, GLint, GLint); GLAPI void APIENTRY glTangent3ivEXT (const GLint *); GLAPI void APIENTRY glTangent3sEXT (GLshort, GLshort, GLshort); GLAPI void APIENTRY glTangent3svEXT (const GLshort *); GLAPI void APIENTRY glBinormal3bEXT (GLbyte, GLbyte, GLbyte); GLAPI void APIENTRY glBinormal3bvEXT (const GLbyte *); GLAPI void APIENTRY glBinormal3dEXT (GLdouble, GLdouble, GLdouble); GLAPI void APIENTRY glBinormal3dvEXT (const GLdouble *); GLAPI void APIENTRY glBinormal3fEXT (GLfloat, GLfloat, GLfloat); GLAPI void APIENTRY glBinormal3fvEXT (const GLfloat *); GLAPI void APIENTRY glBinormal3iEXT (GLint, GLint, GLint); GLAPI void APIENTRY glBinormal3ivEXT (const GLint *); GLAPI void APIENTRY glBinormal3sEXT (GLshort, GLshort, GLshort); GLAPI void APIENTRY glBinormal3svEXT (const GLshort *); GLAPI void APIENTRY glTangentPointerEXT (GLenum, GLsizei, const GLvoid *); GLAPI void APIENTRY glBinormalPointerEXT (GLenum, GLsizei, const GLvoid *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLTANGENT3BEXTPROC) (GLbyte tx, GLbyte ty, GLbyte tz); typedef void (APIENTRYP PFNGLTANGENT3BVEXTPROC) (const GLbyte *v); typedef void (APIENTRYP PFNGLTANGENT3DEXTPROC) (GLdouble tx, GLdouble ty, GLdouble tz); typedef void (APIENTRYP PFNGLTANGENT3DVEXTPROC) (const GLdouble *v); typedef void (APIENTRYP PFNGLTANGENT3FEXTPROC) (GLfloat tx, GLfloat ty, GLfloat tz); typedef void (APIENTRYP PFNGLTANGENT3FVEXTPROC) (const GLfloat *v); typedef void (APIENTRYP PFNGLTANGENT3IEXTPROC) (GLint tx, GLint ty, GLint tz); typedef void (APIENTRYP PFNGLTANGENT3IVEXTPROC) (const GLint *v); typedef void (APIENTRYP PFNGLTANGENT3SEXTPROC) (GLshort tx, GLshort ty, GLshort tz); typedef void (APIENTRYP PFNGLTANGENT3SVEXTPROC) (const GLshort *v); typedef void (APIENTRYP PFNGLBINORMAL3BEXTPROC) (GLbyte bx, GLbyte by, GLbyte bz); typedef void (APIENTRYP PFNGLBINORMAL3BVEXTPROC) (const GLbyte *v); typedef void (APIENTRYP PFNGLBINORMAL3DEXTPROC) (GLdouble bx, GLdouble by, GLdouble bz); typedef void (APIENTRYP PFNGLBINORMAL3DVEXTPROC) (const GLdouble *v); typedef void (APIENTRYP PFNGLBINORMAL3FEXTPROC) (GLfloat bx, GLfloat by, GLfloat bz); typedef void (APIENTRYP PFNGLBINORMAL3FVEXTPROC) (const GLfloat *v); typedef void (APIENTRYP PFNGLBINORMAL3IEXTPROC) (GLint bx, GLint by, GLint bz); typedef void (APIENTRYP PFNGLBINORMAL3IVEXTPROC) (const GLint *v); typedef void (APIENTRYP PFNGLBINORMAL3SEXTPROC) (GLshort bx, GLshort by, GLshort bz); typedef void (APIENTRYP PFNGLBINORMAL3SVEXTPROC) (const GLshort *v); typedef void (APIENTRYP PFNGLTANGENTPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); typedef void (APIENTRYP PFNGLBINORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); #endif #ifndef GL_EXT_texture_env_combine #define GL_EXT_texture_env_combine 1 #endif #ifndef GL_APPLE_specular_vector #define GL_APPLE_specular_vector 1 #endif #ifndef GL_APPLE_transform_hint #define GL_APPLE_transform_hint 1 #endif #ifndef GL_SGIX_fog_scale #define GL_SGIX_fog_scale 1 #endif #ifndef GL_SUNX_constant_data #define GL_SUNX_constant_data 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glFinishTextureSUNX (void); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLFINISHTEXTURESUNXPROC) (void); #endif #ifndef GL_SUN_global_alpha #define GL_SUN_global_alpha 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glGlobalAlphaFactorbSUN (GLbyte); GLAPI void APIENTRY glGlobalAlphaFactorsSUN (GLshort); GLAPI void APIENTRY glGlobalAlphaFactoriSUN (GLint); GLAPI void APIENTRY glGlobalAlphaFactorfSUN (GLfloat); GLAPI void APIENTRY glGlobalAlphaFactordSUN (GLdouble); GLAPI void APIENTRY glGlobalAlphaFactorubSUN (GLubyte); GLAPI void APIENTRY glGlobalAlphaFactorusSUN (GLushort); GLAPI void APIENTRY glGlobalAlphaFactoruiSUN (GLuint); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORBSUNPROC) (GLbyte factor); typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORSSUNPROC) (GLshort factor); typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORISUNPROC) (GLint factor); typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORFSUNPROC) (GLfloat factor); typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORDSUNPROC) (GLdouble factor); typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUBSUNPROC) (GLubyte factor); typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUSSUNPROC) (GLushort factor); typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUISUNPROC) (GLuint factor); #endif #ifndef GL_SUN_triangle_list #define GL_SUN_triangle_list 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glReplacementCodeuiSUN (GLuint); GLAPI void APIENTRY glReplacementCodeusSUN (GLushort); GLAPI void APIENTRY glReplacementCodeubSUN (GLubyte); GLAPI void APIENTRY glReplacementCodeuivSUN (const GLuint *); GLAPI void APIENTRY glReplacementCodeusvSUN (const GLushort *); GLAPI void APIENTRY glReplacementCodeubvSUN (const GLubyte *); GLAPI void APIENTRY glReplacementCodePointerSUN (GLenum, GLsizei, const GLvoid* *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLREPLACEMENTCODEUISUNPROC) (GLuint code); typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSSUNPROC) (GLushort code); typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBSUNPROC) (GLubyte code); typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVSUNPROC) (const GLuint *code); typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSVSUNPROC) (const GLushort *code); typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBVSUNPROC) (const GLubyte *code); typedef void (APIENTRYP PFNGLREPLACEMENTCODEPOINTERSUNPROC) (GLenum type, GLsizei stride, const GLvoid* *pointer); #endif #ifndef GL_SUN_vertex #define GL_SUN_vertex 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glColor4ubVertex2fSUN (GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat); GLAPI void APIENTRY glColor4ubVertex2fvSUN (const GLubyte *, const GLfloat *); GLAPI void APIENTRY glColor4ubVertex3fSUN (GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat); GLAPI void APIENTRY glColor4ubVertex3fvSUN (const GLubyte *, const GLfloat *); GLAPI void APIENTRY glColor3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); GLAPI void APIENTRY glColor3fVertex3fvSUN (const GLfloat *, const GLfloat *); GLAPI void APIENTRY glNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); GLAPI void APIENTRY glNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *); GLAPI void APIENTRY glColor4fNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); GLAPI void APIENTRY glColor4fNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *); GLAPI void APIENTRY glTexCoord2fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); GLAPI void APIENTRY glTexCoord2fVertex3fvSUN (const GLfloat *, const GLfloat *); GLAPI void APIENTRY glTexCoord4fVertex4fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); GLAPI void APIENTRY glTexCoord4fVertex4fvSUN (const GLfloat *, const GLfloat *); GLAPI void APIENTRY glTexCoord2fColor4ubVertex3fSUN (GLfloat, GLfloat, GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat); GLAPI void APIENTRY glTexCoord2fColor4ubVertex3fvSUN (const GLfloat *, const GLubyte *, const GLfloat *); GLAPI void APIENTRY glTexCoord2fColor3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); GLAPI void APIENTRY glTexCoord2fColor3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *); GLAPI void APIENTRY glTexCoord2fNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); GLAPI void APIENTRY glTexCoord2fNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *); GLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); GLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *, const GLfloat *); GLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); GLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fvSUN (const GLfloat *, const GLfloat *, const GLfloat *, const GLfloat *); GLAPI void APIENTRY glReplacementCodeuiVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat); GLAPI void APIENTRY glReplacementCodeuiVertex3fvSUN (const GLuint *, const GLfloat *); GLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fSUN (GLuint, GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat); GLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fvSUN (const GLuint *, const GLubyte *, const GLfloat *); GLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); GLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *); GLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); GLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *); GLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); GLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *, const GLfloat *); GLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); GLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *); GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *, const GLfloat *); GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *, const GLfloat *, const GLfloat *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y); typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FVSUNPROC) (const GLubyte *c, const GLfloat *v); typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FVSUNPROC) (const GLubyte *c, const GLfloat *v); typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *v); typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FSUNPROC) (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *n, const GLfloat *v); typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *n, const GLfloat *v); typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z); typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *v); typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w); typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *v); typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FVSUNPROC) (const GLfloat *tc, const GLubyte *c, const GLfloat *v); typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *v); typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *n, const GLfloat *v); typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); typedef void (APIENTRYP PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z, GLfloat w); typedef void (APIENTRYP PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FSUNPROC) (GLuint rc, GLfloat x, GLfloat y, GLfloat z); typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *v); typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FSUNPROC) (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FVSUNPROC) (const GLuint *rc, const GLubyte *c, const GLfloat *v); typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *v); typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *n, const GLfloat *v); typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *n, const GLfloat *v); typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z); typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *v); typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v); typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); #endif #ifndef GL_EXT_blend_func_separate #define GL_EXT_blend_func_separate 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glBlendFuncSeparateEXT (GLenum, GLenum, GLenum, GLenum); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEEXTPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); #endif #ifndef GL_INGR_blend_func_separate #define GL_INGR_blend_func_separate 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glBlendFuncSeparateINGR (GLenum, GLenum, GLenum, GLenum); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEINGRPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); #endif #ifndef GL_INGR_color_clamp #define GL_INGR_color_clamp 1 #endif #ifndef GL_INGR_interlace_read #define GL_INGR_interlace_read 1 #endif #ifndef GL_EXT_stencil_wrap #define GL_EXT_stencil_wrap 1 #endif #ifndef GL_EXT_422_pixels #define GL_EXT_422_pixels 1 #endif #ifndef GL_NV_texgen_reflection #define GL_NV_texgen_reflection 1 #endif #ifndef GL_SUN_convolution_border_modes #define GL_SUN_convolution_border_modes 1 #endif #ifndef GL_EXT_texture_env_add #define GL_EXT_texture_env_add 1 #endif #ifndef GL_EXT_texture_lod_bias #define GL_EXT_texture_lod_bias 1 #endif #ifndef GL_EXT_texture_filter_anisotropic #define GL_EXT_texture_filter_anisotropic 1 #endif #ifndef GL_EXT_vertex_weighting #define GL_EXT_vertex_weighting 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glVertexWeightfEXT (GLfloat); GLAPI void APIENTRY glVertexWeightfvEXT (const GLfloat *); GLAPI void APIENTRY glVertexWeightPointerEXT (GLsizei, GLenum, GLsizei, const GLvoid *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLVERTEXWEIGHTFEXTPROC) (GLfloat weight); typedef void (APIENTRYP PFNGLVERTEXWEIGHTFVEXTPROC) (const GLfloat *weight); typedef void (APIENTRYP PFNGLVERTEXWEIGHTPOINTEREXTPROC) (GLsizei size, GLenum type, GLsizei stride, const GLvoid *pointer); #endif #ifndef GL_NV_light_max_exponent #define GL_NV_light_max_exponent 1 #endif #ifndef GL_NV_vertex_array_range #define GL_NV_vertex_array_range 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glFlushVertexArrayRangeNV (void); GLAPI void APIENTRY glVertexArrayRangeNV (GLsizei, const GLvoid *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGENVPROC) (void); typedef void (APIENTRYP PFNGLVERTEXARRAYRANGENVPROC) (GLsizei length, const GLvoid *pointer); #endif #ifndef GL_NV_register_combiners #define GL_NV_register_combiners 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glCombinerParameterfvNV (GLenum, const GLfloat *); GLAPI void APIENTRY glCombinerParameterfNV (GLenum, GLfloat); GLAPI void APIENTRY glCombinerParameterivNV (GLenum, const GLint *); GLAPI void APIENTRY glCombinerParameteriNV (GLenum, GLint); GLAPI void APIENTRY glCombinerInputNV (GLenum, GLenum, GLenum, GLenum, GLenum, GLenum); GLAPI void APIENTRY glCombinerOutputNV (GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLboolean, GLboolean, GLboolean); GLAPI void APIENTRY glFinalCombinerInputNV (GLenum, GLenum, GLenum, GLenum); GLAPI void APIENTRY glGetCombinerInputParameterfvNV (GLenum, GLenum, GLenum, GLenum, GLfloat *); GLAPI void APIENTRY glGetCombinerInputParameterivNV (GLenum, GLenum, GLenum, GLenum, GLint *); GLAPI void APIENTRY glGetCombinerOutputParameterfvNV (GLenum, GLenum, GLenum, GLfloat *); GLAPI void APIENTRY glGetCombinerOutputParameterivNV (GLenum, GLenum, GLenum, GLint *); GLAPI void APIENTRY glGetFinalCombinerInputParameterfvNV (GLenum, GLenum, GLfloat *); GLAPI void APIENTRY glGetFinalCombinerInputParameterivNV (GLenum, GLenum, GLint *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFVNVPROC) (GLenum pname, const GLfloat *params); typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFNVPROC) (GLenum pname, GLfloat param); typedef void (APIENTRYP PFNGLCOMBINERPARAMETERIVNVPROC) (GLenum pname, const GLint *params); typedef void (APIENTRYP PFNGLCOMBINERPARAMETERINVPROC) (GLenum pname, GLint param); typedef void (APIENTRYP PFNGLCOMBINERINPUTNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); typedef void (APIENTRYP PFNGLCOMBINEROUTPUTNVPROC) (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum); typedef void (APIENTRYP PFNGLFINALCOMBINERINPUTNVPROC) (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params); typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLfloat *params); typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC) (GLenum variable, GLenum pname, GLfloat *params); typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC) (GLenum variable, GLenum pname, GLint *params); #endif #ifndef GL_NV_fog_distance #define GL_NV_fog_distance 1 #endif #ifndef GL_NV_texgen_emboss #define GL_NV_texgen_emboss 1 #endif #ifndef GL_NV_blend_square #define GL_NV_blend_square 1 #endif #ifndef GL_NV_texture_env_combine4 #define GL_NV_texture_env_combine4 1 #endif #ifndef GL_MESA_resize_buffers #define GL_MESA_resize_buffers 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glResizeBuffersMESA (void); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLRESIZEBUFFERSMESAPROC) (void); #endif #ifndef GL_MESA_window_pos #define GL_MESA_window_pos 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glWindowPos2dMESA (GLdouble, GLdouble); GLAPI void APIENTRY glWindowPos2dvMESA (const GLdouble *); GLAPI void APIENTRY glWindowPos2fMESA (GLfloat, GLfloat); GLAPI void APIENTRY glWindowPos2fvMESA (const GLfloat *); GLAPI void APIENTRY glWindowPos2iMESA (GLint, GLint); GLAPI void APIENTRY glWindowPos2ivMESA (const GLint *); GLAPI void APIENTRY glWindowPos2sMESA (GLshort, GLshort); GLAPI void APIENTRY glWindowPos2svMESA (const GLshort *); GLAPI void APIENTRY glWindowPos3dMESA (GLdouble, GLdouble, GLdouble); GLAPI void APIENTRY glWindowPos3dvMESA (const GLdouble *); GLAPI void APIENTRY glWindowPos3fMESA (GLfloat, GLfloat, GLfloat); GLAPI void APIENTRY glWindowPos3fvMESA (const GLfloat *); GLAPI void APIENTRY glWindowPos3iMESA (GLint, GLint, GLint); GLAPI void APIENTRY glWindowPos3ivMESA (const GLint *); GLAPI void APIENTRY glWindowPos3sMESA (GLshort, GLshort, GLshort); GLAPI void APIENTRY glWindowPos3svMESA (const GLshort *); GLAPI void APIENTRY glWindowPos4dMESA (GLdouble, GLdouble, GLdouble, GLdouble); GLAPI void APIENTRY glWindowPos4dvMESA (const GLdouble *); GLAPI void APIENTRY glWindowPos4fMESA (GLfloat, GLfloat, GLfloat, GLfloat); GLAPI void APIENTRY glWindowPos4fvMESA (const GLfloat *); GLAPI void APIENTRY glWindowPos4iMESA (GLint, GLint, GLint, GLint); GLAPI void APIENTRY glWindowPos4ivMESA (const GLint *); GLAPI void APIENTRY glWindowPos4sMESA (GLshort, GLshort, GLshort, GLshort); GLAPI void APIENTRY glWindowPos4svMESA (const GLshort *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLWINDOWPOS2DMESAPROC) (GLdouble x, GLdouble y); typedef void (APIENTRYP PFNGLWINDOWPOS2DVMESAPROC) (const GLdouble *v); typedef void (APIENTRYP PFNGLWINDOWPOS2FMESAPROC) (GLfloat x, GLfloat y); typedef void (APIENTRYP PFNGLWINDOWPOS2FVMESAPROC) (const GLfloat *v); typedef void (APIENTRYP PFNGLWINDOWPOS2IMESAPROC) (GLint x, GLint y); typedef void (APIENTRYP PFNGLWINDOWPOS2IVMESAPROC) (const GLint *v); typedef void (APIENTRYP PFNGLWINDOWPOS2SMESAPROC) (GLshort x, GLshort y); typedef void (APIENTRYP PFNGLWINDOWPOS2SVMESAPROC) (const GLshort *v); typedef void (APIENTRYP PFNGLWINDOWPOS3DMESAPROC) (GLdouble x, GLdouble y, GLdouble z); typedef void (APIENTRYP PFNGLWINDOWPOS3DVMESAPROC) (const GLdouble *v); typedef void (APIENTRYP PFNGLWINDOWPOS3FMESAPROC) (GLfloat x, GLfloat y, GLfloat z); typedef void (APIENTRYP PFNGLWINDOWPOS3FVMESAPROC) (const GLfloat *v); typedef void (APIENTRYP PFNGLWINDOWPOS3IMESAPROC) (GLint x, GLint y, GLint z); typedef void (APIENTRYP PFNGLWINDOWPOS3IVMESAPROC) (const GLint *v); typedef void (APIENTRYP PFNGLWINDOWPOS3SMESAPROC) (GLshort x, GLshort y, GLshort z); typedef void (APIENTRYP PFNGLWINDOWPOS3SVMESAPROC) (const GLshort *v); typedef void (APIENTRYP PFNGLWINDOWPOS4DMESAPROC) (GLdouble x, GLdouble y, GLdouble z, GLdouble w); typedef void (APIENTRYP PFNGLWINDOWPOS4DVMESAPROC) (const GLdouble *v); typedef void (APIENTRYP PFNGLWINDOWPOS4FMESAPROC) (GLfloat x, GLfloat y, GLfloat z, GLfloat w); typedef void (APIENTRYP PFNGLWINDOWPOS4FVMESAPROC) (const GLfloat *v); typedef void (APIENTRYP PFNGLWINDOWPOS4IMESAPROC) (GLint x, GLint y, GLint z, GLint w); typedef void (APIENTRYP PFNGLWINDOWPOS4IVMESAPROC) (const GLint *v); typedef void (APIENTRYP PFNGLWINDOWPOS4SMESAPROC) (GLshort x, GLshort y, GLshort z, GLshort w); typedef void (APIENTRYP PFNGLWINDOWPOS4SVMESAPROC) (const GLshort *v); #endif #ifndef GL_IBM_cull_vertex #define GL_IBM_cull_vertex 1 #endif #ifndef GL_IBM_multimode_draw_arrays #define GL_IBM_multimode_draw_arrays 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glMultiModeDrawArraysIBM (const GLenum *, const GLint *, const GLsizei *, GLsizei, GLint); GLAPI void APIENTRY glMultiModeDrawElementsIBM (const GLenum *, const GLsizei *, GLenum, const GLvoid* const *, GLsizei, GLint); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLMULTIMODEDRAWARRAYSIBMPROC) (const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride); typedef void (APIENTRYP PFNGLMULTIMODEDRAWELEMENTSIBMPROC) (const GLenum *mode, const GLsizei *count, GLenum type, const GLvoid* const *indices, GLsizei primcount, GLint modestride); #endif #ifndef GL_IBM_vertex_array_lists #define GL_IBM_vertex_array_lists 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glColorPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint); GLAPI void APIENTRY glSecondaryColorPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint); GLAPI void APIENTRY glEdgeFlagPointerListIBM (GLint, const GLboolean* *, GLint); GLAPI void APIENTRY glFogCoordPointerListIBM (GLenum, GLint, const GLvoid* *, GLint); GLAPI void APIENTRY glIndexPointerListIBM (GLenum, GLint, const GLvoid* *, GLint); GLAPI void APIENTRY glNormalPointerListIBM (GLenum, GLint, const GLvoid* *, GLint); GLAPI void APIENTRY glTexCoordPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint); GLAPI void APIENTRY glVertexPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); typedef void (APIENTRYP PFNGLEDGEFLAGPOINTERLISTIBMPROC) (GLint stride, const GLboolean* *pointer, GLint ptrstride); typedef void (APIENTRYP PFNGLFOGCOORDPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); typedef void (APIENTRYP PFNGLINDEXPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); typedef void (APIENTRYP PFNGLNORMALPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); typedef void (APIENTRYP PFNGLTEXCOORDPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); typedef void (APIENTRYP PFNGLVERTEXPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); #endif #ifndef GL_SGIX_subsample #define GL_SGIX_subsample 1 #endif #ifndef GL_SGIX_ycrcba #define GL_SGIX_ycrcba 1 #endif #ifndef GL_SGIX_ycrcb_subsample #define GL_SGIX_ycrcb_subsample 1 #endif #ifndef GL_SGIX_depth_pass_instrument #define GL_SGIX_depth_pass_instrument 1 #endif #ifndef GL_3DFX_texture_compression_FXT1 #define GL_3DFX_texture_compression_FXT1 1 #endif #ifndef GL_3DFX_multisample #define GL_3DFX_multisample 1 #endif #ifndef GL_3DFX_tbuffer #define GL_3DFX_tbuffer 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glTbufferMask3DFX (GLuint); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLTBUFFERMASK3DFXPROC) (GLuint mask); #endif #ifndef GL_EXT_multisample #define GL_EXT_multisample 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glSampleMaskEXT (GLclampf, GLboolean); GLAPI void APIENTRY glSamplePatternEXT (GLenum); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLSAMPLEMASKEXTPROC) (GLclampf value, GLboolean invert); typedef void (APIENTRYP PFNGLSAMPLEPATTERNEXTPROC) (GLenum pattern); #endif #ifndef GL_SGIX_vertex_preclip #define GL_SGIX_vertex_preclip 1 #endif #ifndef GL_SGIX_convolution_accuracy #define GL_SGIX_convolution_accuracy 1 #endif #ifndef GL_SGIX_resample #define GL_SGIX_resample 1 #endif #ifndef GL_SGIS_point_line_texgen #define GL_SGIS_point_line_texgen 1 #endif #ifndef GL_SGIS_texture_color_mask #define GL_SGIS_texture_color_mask 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glTextureColorMaskSGIS (GLboolean, GLboolean, GLboolean, GLboolean); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLTEXTURECOLORMASKSGISPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); #endif #ifndef GL_SGIX_igloo_interface #define GL_SGIX_igloo_interface 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glIglooInterfaceSGIX (GLenum, const GLvoid *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLIGLOOINTERFACESGIXPROC) (GLenum pname, const GLvoid *params); #endif #ifndef GL_EXT_texture_env_dot3 #define GL_EXT_texture_env_dot3 1 #endif #ifndef GL_ATI_texture_mirror_once #define GL_ATI_texture_mirror_once 1 #endif #ifndef GL_NV_fence #define GL_NV_fence 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glDeleteFencesNV (GLsizei, const GLuint *); GLAPI void APIENTRY glGenFencesNV (GLsizei, GLuint *); GLAPI GLboolean APIENTRY glIsFenceNV (GLuint); GLAPI GLboolean APIENTRY glTestFenceNV (GLuint); GLAPI void APIENTRY glGetFenceivNV (GLuint, GLenum, GLint *); GLAPI void APIENTRY glFinishFenceNV (GLuint); GLAPI void APIENTRY glSetFenceNV (GLuint, GLenum); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences); typedef void (APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences); typedef GLboolean (APIENTRYP PFNGLISFENCENVPROC) (GLuint fence); typedef GLboolean (APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence); typedef void (APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence); typedef void (APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition); #endif #ifndef GL_NV_evaluators #define GL_NV_evaluators 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glMapControlPointsNV (GLenum, GLuint, GLenum, GLsizei, GLsizei, GLint, GLint, GLboolean, const GLvoid *); GLAPI void APIENTRY glMapParameterivNV (GLenum, GLenum, const GLint *); GLAPI void APIENTRY glMapParameterfvNV (GLenum, GLenum, const GLfloat *); GLAPI void APIENTRY glGetMapControlPointsNV (GLenum, GLuint, GLenum, GLsizei, GLsizei, GLboolean, GLvoid *); GLAPI void APIENTRY glGetMapParameterivNV (GLenum, GLenum, GLint *); GLAPI void APIENTRY glGetMapParameterfvNV (GLenum, GLenum, GLfloat *); GLAPI void APIENTRY glGetMapAttribParameterivNV (GLenum, GLuint, GLenum, GLint *); GLAPI void APIENTRY glGetMapAttribParameterfvNV (GLenum, GLuint, GLenum, GLfloat *); GLAPI void APIENTRY glEvalMapsNV (GLenum, GLenum); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const GLvoid *points); typedef void (APIENTRYP PFNGLMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, const GLint *params); typedef void (APIENTRYP PFNGLMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, const GLfloat *params); typedef void (APIENTRYP PFNGLGETMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, GLvoid *points); typedef void (APIENTRYP PFNGLGETMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLGETMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, GLfloat *params); typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERIVNVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params); typedef void (APIENTRYP PFNGLEVALMAPSNVPROC) (GLenum target, GLenum mode); #endif #ifndef GL_NV_packed_depth_stencil #define GL_NV_packed_depth_stencil 1 #endif #ifndef GL_NV_register_combiners2 #define GL_NV_register_combiners2 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glCombinerStageParameterfvNV (GLenum, GLenum, const GLfloat *); GLAPI void APIENTRY glGetCombinerStageParameterfvNV (GLenum, GLenum, GLfloat *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, const GLfloat *params); typedef void (APIENTRYP PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, GLfloat *params); #endif #ifndef GL_NV_texture_compression_vtc #define GL_NV_texture_compression_vtc 1 #endif #ifndef GL_NV_texture_rectangle #define GL_NV_texture_rectangle 1 #endif #ifndef GL_NV_texture_shader #define GL_NV_texture_shader 1 #endif #ifndef GL_NV_texture_shader2 #define GL_NV_texture_shader2 1 #endif #ifndef GL_NV_vertex_array_range2 #define GL_NV_vertex_array_range2 1 #endif #ifndef GL_NV_vertex_program #define GL_NV_vertex_program 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI GLboolean APIENTRY glAreProgramsResidentNV (GLsizei, const GLuint *, GLboolean *); GLAPI void APIENTRY glBindProgramNV (GLenum, GLuint); GLAPI void APIENTRY glDeleteProgramsNV (GLsizei, const GLuint *); GLAPI void APIENTRY glExecuteProgramNV (GLenum, GLuint, const GLfloat *); GLAPI void APIENTRY glGenProgramsNV (GLsizei, GLuint *); GLAPI void APIENTRY glGetProgramParameterdvNV (GLenum, GLuint, GLenum, GLdouble *); GLAPI void APIENTRY glGetProgramParameterfvNV (GLenum, GLuint, GLenum, GLfloat *); GLAPI void APIENTRY glGetProgramivNV (GLuint, GLenum, GLint *); GLAPI void APIENTRY glGetProgramStringNV (GLuint, GLenum, GLubyte *); GLAPI void APIENTRY glGetTrackMatrixivNV (GLenum, GLuint, GLenum, GLint *); GLAPI void APIENTRY glGetVertexAttribdvNV (GLuint, GLenum, GLdouble *); GLAPI void APIENTRY glGetVertexAttribfvNV (GLuint, GLenum, GLfloat *); GLAPI void APIENTRY glGetVertexAttribivNV (GLuint, GLenum, GLint *); GLAPI void APIENTRY glGetVertexAttribPointervNV (GLuint, GLenum, GLvoid* *); GLAPI GLboolean APIENTRY glIsProgramNV (GLuint); GLAPI void APIENTRY glLoadProgramNV (GLenum, GLuint, GLsizei, const GLubyte *); GLAPI void APIENTRY glProgramParameter4dNV (GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble); GLAPI void APIENTRY glProgramParameter4dvNV (GLenum, GLuint, const GLdouble *); GLAPI void APIENTRY glProgramParameter4fNV (GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat); GLAPI void APIENTRY glProgramParameter4fvNV (GLenum, GLuint, const GLfloat *); GLAPI void APIENTRY glProgramParameters4dvNV (GLenum, GLuint, GLuint, const GLdouble *); GLAPI void APIENTRY glProgramParameters4fvNV (GLenum, GLuint, GLuint, const GLfloat *); GLAPI void APIENTRY glRequestResidentProgramsNV (GLsizei, const GLuint *); GLAPI void APIENTRY glTrackMatrixNV (GLenum, GLuint, GLenum, GLenum); GLAPI void APIENTRY glVertexAttribPointerNV (GLuint, GLint, GLenum, GLsizei, const GLvoid *); GLAPI void APIENTRY glVertexAttrib1dNV (GLuint, GLdouble); GLAPI void APIENTRY glVertexAttrib1dvNV (GLuint, const GLdouble *); GLAPI void APIENTRY glVertexAttrib1fNV (GLuint, GLfloat); GLAPI void APIENTRY glVertexAttrib1fvNV (GLuint, const GLfloat *); GLAPI void APIENTRY glVertexAttrib1sNV (GLuint, GLshort); GLAPI void APIENTRY glVertexAttrib1svNV (GLuint, const GLshort *); GLAPI void APIENTRY glVertexAttrib2dNV (GLuint, GLdouble, GLdouble); GLAPI void APIENTRY glVertexAttrib2dvNV (GLuint, const GLdouble *); GLAPI void APIENTRY glVertexAttrib2fNV (GLuint, GLfloat, GLfloat); GLAPI void APIENTRY glVertexAttrib2fvNV (GLuint, const GLfloat *); GLAPI void APIENTRY glVertexAttrib2sNV (GLuint, GLshort, GLshort); GLAPI void APIENTRY glVertexAttrib2svNV (GLuint, const GLshort *); GLAPI void APIENTRY glVertexAttrib3dNV (GLuint, GLdouble, GLdouble, GLdouble); GLAPI void APIENTRY glVertexAttrib3dvNV (GLuint, const GLdouble *); GLAPI void APIENTRY glVertexAttrib3fNV (GLuint, GLfloat, GLfloat, GLfloat); GLAPI void APIENTRY glVertexAttrib3fvNV (GLuint, const GLfloat *); GLAPI void APIENTRY glVertexAttrib3sNV (GLuint, GLshort, GLshort, GLshort); GLAPI void APIENTRY glVertexAttrib3svNV (GLuint, const GLshort *); GLAPI void APIENTRY glVertexAttrib4dNV (GLuint, GLdouble, GLdouble, GLdouble, GLdouble); GLAPI void APIENTRY glVertexAttrib4dvNV (GLuint, const GLdouble *); GLAPI void APIENTRY glVertexAttrib4fNV (GLuint, GLfloat, GLfloat, GLfloat, GLfloat); GLAPI void APIENTRY glVertexAttrib4fvNV (GLuint, const GLfloat *); GLAPI void APIENTRY glVertexAttrib4sNV (GLuint, GLshort, GLshort, GLshort, GLshort); GLAPI void APIENTRY glVertexAttrib4svNV (GLuint, const GLshort *); GLAPI void APIENTRY glVertexAttrib4ubNV (GLuint, GLubyte, GLubyte, GLubyte, GLubyte); GLAPI void APIENTRY glVertexAttrib4ubvNV (GLuint, const GLubyte *); GLAPI void APIENTRY glVertexAttribs1dvNV (GLuint, GLsizei, const GLdouble *); GLAPI void APIENTRY glVertexAttribs1fvNV (GLuint, GLsizei, const GLfloat *); GLAPI void APIENTRY glVertexAttribs1svNV (GLuint, GLsizei, const GLshort *); GLAPI void APIENTRY glVertexAttribs2dvNV (GLuint, GLsizei, const GLdouble *); GLAPI void APIENTRY glVertexAttribs2fvNV (GLuint, GLsizei, const GLfloat *); GLAPI void APIENTRY glVertexAttribs2svNV (GLuint, GLsizei, const GLshort *); GLAPI void APIENTRY glVertexAttribs3dvNV (GLuint, GLsizei, const GLdouble *); GLAPI void APIENTRY glVertexAttribs3fvNV (GLuint, GLsizei, const GLfloat *); GLAPI void APIENTRY glVertexAttribs3svNV (GLuint, GLsizei, const GLshort *); GLAPI void APIENTRY glVertexAttribs4dvNV (GLuint, GLsizei, const GLdouble *); GLAPI void APIENTRY glVertexAttribs4fvNV (GLuint, GLsizei, const GLfloat *); GLAPI void APIENTRY glVertexAttribs4svNV (GLuint, GLsizei, const GLshort *); GLAPI void APIENTRY glVertexAttribs4ubvNV (GLuint, GLsizei, const GLubyte *); #endif /* GL_GLEXT_PROTOTYPES */ typedef GLboolean (APIENTRYP PFNGLAREPROGRAMSRESIDENTNVPROC) (GLsizei n, const GLuint *programs, GLboolean *residences); typedef void (APIENTRYP PFNGLBINDPROGRAMNVPROC) (GLenum target, GLuint id); typedef void (APIENTRYP PFNGLDELETEPROGRAMSNVPROC) (GLsizei n, const GLuint *programs); typedef void (APIENTRYP PFNGLEXECUTEPROGRAMNVPROC) (GLenum target, GLuint id, const GLfloat *params); typedef void (APIENTRYP PFNGLGENPROGRAMSNVPROC) (GLsizei n, GLuint *programs); typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERDVNVPROC) (GLenum target, GLuint index, GLenum pname, GLdouble *params); typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params); typedef void (APIENTRYP PFNGLGETPROGRAMIVNVPROC) (GLuint id, GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGNVPROC) (GLuint id, GLenum pname, GLubyte *program); typedef void (APIENTRYP PFNGLGETTRACKMATRIXIVNVPROC) (GLenum target, GLuint address, GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVNVPROC) (GLuint index, GLenum pname, GLdouble *params); typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVNVPROC) (GLuint index, GLenum pname, GLfloat *params); typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVNVPROC) (GLuint index, GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVNVPROC) (GLuint index, GLenum pname, GLvoid* *pointer); typedef GLboolean (APIENTRYP PFNGLISPROGRAMNVPROC) (GLuint id); typedef void (APIENTRYP PFNGLLOADPROGRAMNVPROC) (GLenum target, GLuint id, GLsizei len, const GLubyte *program); typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DNVPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DVNVPROC) (GLenum target, GLuint index, const GLdouble *v); typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FNVPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FVNVPROC) (GLenum target, GLuint index, const GLfloat *v); typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4DVNVPROC) (GLenum target, GLuint index, GLuint count, const GLdouble *v); typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4FVNVPROC) (GLenum target, GLuint index, GLuint count, const GLfloat *v); typedef void (APIENTRYP PFNGLREQUESTRESIDENTPROGRAMSNVPROC) (GLsizei n, const GLuint *programs); typedef void (APIENTRYP PFNGLTRACKMATRIXNVPROC) (GLenum target, GLuint address, GLenum matrix, GLenum transform); typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERNVPROC) (GLuint index, GLint fsize, GLenum type, GLsizei stride, const GLvoid *pointer); typedef void (APIENTRYP PFNGLVERTEXATTRIB1DNVPROC) (GLuint index, GLdouble x); typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVNVPROC) (GLuint index, const GLdouble *v); typedef void (APIENTRYP PFNGLVERTEXATTRIB1FNVPROC) (GLuint index, GLfloat x); typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVNVPROC) (GLuint index, const GLfloat *v); typedef void (APIENTRYP PFNGLVERTEXATTRIB1SNVPROC) (GLuint index, GLshort x); typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVNVPROC) (GLuint index, const GLshort *v); typedef void (APIENTRYP PFNGLVERTEXATTRIB2DNVPROC) (GLuint index, GLdouble x, GLdouble y); typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVNVPROC) (GLuint index, const GLdouble *v); typedef void (APIENTRYP PFNGLVERTEXATTRIB2FNVPROC) (GLuint index, GLfloat x, GLfloat y); typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVNVPROC) (GLuint index, const GLfloat *v); typedef void (APIENTRYP PFNGLVERTEXATTRIB2SNVPROC) (GLuint index, GLshort x, GLshort y); typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVNVPROC) (GLuint index, const GLshort *v); typedef void (APIENTRYP PFNGLVERTEXATTRIB3DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVNVPROC) (GLuint index, const GLdouble *v); typedef void (APIENTRYP PFNGLVERTEXATTRIB3FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVNVPROC) (GLuint index, const GLfloat *v); typedef void (APIENTRYP PFNGLVERTEXATTRIB3SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z); typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVNVPROC) (GLuint index, const GLshort *v); typedef void (APIENTRYP PFNGLVERTEXATTRIB4DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVNVPROC) (GLuint index, const GLdouble *v); typedef void (APIENTRYP PFNGLVERTEXATTRIB4FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVNVPROC) (GLuint index, const GLfloat *v); typedef void (APIENTRYP PFNGLVERTEXATTRIB4SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVNVPROC) (GLuint index, const GLshort *v); typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBNVPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVNVPROC) (GLuint index, const GLubyte *v); typedef void (APIENTRYP PFNGLVERTEXATTRIBS1DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); typedef void (APIENTRYP PFNGLVERTEXATTRIBS1FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); typedef void (APIENTRYP PFNGLVERTEXATTRIBS1SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); typedef void (APIENTRYP PFNGLVERTEXATTRIBS2DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); typedef void (APIENTRYP PFNGLVERTEXATTRIBS2FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); typedef void (APIENTRYP PFNGLVERTEXATTRIBS2SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); typedef void (APIENTRYP PFNGLVERTEXATTRIBS3DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); typedef void (APIENTRYP PFNGLVERTEXATTRIBS3FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); typedef void (APIENTRYP PFNGLVERTEXATTRIBS3SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); typedef void (APIENTRYP PFNGLVERTEXATTRIBS4DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); typedef void (APIENTRYP PFNGLVERTEXATTRIBS4FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); typedef void (APIENTRYP PFNGLVERTEXATTRIBS4SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); typedef void (APIENTRYP PFNGLVERTEXATTRIBS4UBVNVPROC) (GLuint index, GLsizei count, const GLubyte *v); #endif #ifndef GL_SGIX_texture_coordinate_clamp #define GL_SGIX_texture_coordinate_clamp 1 #endif #ifndef GL_SGIX_scalebias_hint #define GL_SGIX_scalebias_hint 1 #endif #ifndef GL_OML_interlace #define GL_OML_interlace 1 #endif #ifndef GL_OML_subsample #define GL_OML_subsample 1 #endif #ifndef GL_OML_resample #define GL_OML_resample 1 #endif #ifndef GL_NV_copy_depth_to_color #define GL_NV_copy_depth_to_color 1 #endif #ifndef GL_ATI_envmap_bumpmap #define GL_ATI_envmap_bumpmap 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glTexBumpParameterivATI (GLenum, const GLint *); GLAPI void APIENTRY glTexBumpParameterfvATI (GLenum, const GLfloat *); GLAPI void APIENTRY glGetTexBumpParameterivATI (GLenum, GLint *); GLAPI void APIENTRY glGetTexBumpParameterfvATI (GLenum, GLfloat *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERIVATIPROC) (GLenum pname, const GLint *param); typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERFVATIPROC) (GLenum pname, const GLfloat *param); typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERIVATIPROC) (GLenum pname, GLint *param); typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERFVATIPROC) (GLenum pname, GLfloat *param); #endif #ifndef GL_ATI_fragment_shader #define GL_ATI_fragment_shader 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI GLuint APIENTRY glGenFragmentShadersATI (GLuint); GLAPI void APIENTRY glBindFragmentShaderATI (GLuint); GLAPI void APIENTRY glDeleteFragmentShaderATI (GLuint); GLAPI void APIENTRY glBeginFragmentShaderATI (void); GLAPI void APIENTRY glEndFragmentShaderATI (void); GLAPI void APIENTRY glPassTexCoordATI (GLuint, GLuint, GLenum); GLAPI void APIENTRY glSampleMapATI (GLuint, GLuint, GLenum); GLAPI void APIENTRY glColorFragmentOp1ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint); GLAPI void APIENTRY glColorFragmentOp2ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint); GLAPI void APIENTRY glColorFragmentOp3ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint); GLAPI void APIENTRY glAlphaFragmentOp1ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint); GLAPI void APIENTRY glAlphaFragmentOp2ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint); GLAPI void APIENTRY glAlphaFragmentOp3ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint); GLAPI void APIENTRY glSetFragmentShaderConstantATI (GLuint, const GLfloat *); #endif /* GL_GLEXT_PROTOTYPES */ typedef GLuint (APIENTRYP PFNGLGENFRAGMENTSHADERSATIPROC) (GLuint range); typedef void (APIENTRYP PFNGLBINDFRAGMENTSHADERATIPROC) (GLuint id); typedef void (APIENTRYP PFNGLDELETEFRAGMENTSHADERATIPROC) (GLuint id); typedef void (APIENTRYP PFNGLBEGINFRAGMENTSHADERATIPROC) (void); typedef void (APIENTRYP PFNGLENDFRAGMENTSHADERATIPROC) (void); typedef void (APIENTRYP PFNGLPASSTEXCOORDATIPROC) (GLuint dst, GLuint coord, GLenum swizzle); typedef void (APIENTRYP PFNGLSAMPLEMAPATIPROC) (GLuint dst, GLuint interp, GLenum swizzle); typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); typedef void (APIENTRYP PFNGLSETFRAGMENTSHADERCONSTANTATIPROC) (GLuint dst, const GLfloat *value); #endif #ifndef GL_ATI_pn_triangles #define GL_ATI_pn_triangles 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glPNTrianglesiATI (GLenum, GLint); GLAPI void APIENTRY glPNTrianglesfATI (GLenum, GLfloat); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLPNTRIANGLESIATIPROC) (GLenum pname, GLint param); typedef void (APIENTRYP PFNGLPNTRIANGLESFATIPROC) (GLenum pname, GLfloat param); #endif #ifndef GL_ATI_vertex_array_object #define GL_ATI_vertex_array_object 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI GLuint APIENTRY glNewObjectBufferATI (GLsizei, const GLvoid *, GLenum); GLAPI GLboolean APIENTRY glIsObjectBufferATI (GLuint); GLAPI void APIENTRY glUpdateObjectBufferATI (GLuint, GLuint, GLsizei, const GLvoid *, GLenum); GLAPI void APIENTRY glGetObjectBufferfvATI (GLuint, GLenum, GLfloat *); GLAPI void APIENTRY glGetObjectBufferivATI (GLuint, GLenum, GLint *); GLAPI void APIENTRY glFreeObjectBufferATI (GLuint); GLAPI void APIENTRY glArrayObjectATI (GLenum, GLint, GLenum, GLsizei, GLuint, GLuint); GLAPI void APIENTRY glGetArrayObjectfvATI (GLenum, GLenum, GLfloat *); GLAPI void APIENTRY glGetArrayObjectivATI (GLenum, GLenum, GLint *); GLAPI void APIENTRY glVariantArrayObjectATI (GLuint, GLenum, GLsizei, GLuint, GLuint); GLAPI void APIENTRY glGetVariantArrayObjectfvATI (GLuint, GLenum, GLfloat *); GLAPI void APIENTRY glGetVariantArrayObjectivATI (GLuint, GLenum, GLint *); #endif /* GL_GLEXT_PROTOTYPES */ typedef GLuint (APIENTRYP PFNGLNEWOBJECTBUFFERATIPROC) (GLsizei size, const GLvoid *pointer, GLenum usage); typedef GLboolean (APIENTRYP PFNGLISOBJECTBUFFERATIPROC) (GLuint buffer); typedef void (APIENTRYP PFNGLUPDATEOBJECTBUFFERATIPROC) (GLuint buffer, GLuint offset, GLsizei size, const GLvoid *pointer, GLenum preserve); typedef void (APIENTRYP PFNGLGETOBJECTBUFFERFVATIPROC) (GLuint buffer, GLenum pname, GLfloat *params); typedef void (APIENTRYP PFNGLGETOBJECTBUFFERIVATIPROC) (GLuint buffer, GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLFREEOBJECTBUFFERATIPROC) (GLuint buffer); typedef void (APIENTRYP PFNGLARRAYOBJECTATIPROC) (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); typedef void (APIENTRYP PFNGLGETARRAYOBJECTFVATIPROC) (GLenum array, GLenum pname, GLfloat *params); typedef void (APIENTRYP PFNGLGETARRAYOBJECTIVATIPROC) (GLenum array, GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLVARIANTARRAYOBJECTATIPROC) (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTFVATIPROC) (GLuint id, GLenum pname, GLfloat *params); typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTIVATIPROC) (GLuint id, GLenum pname, GLint *params); #endif #ifndef GL_EXT_vertex_shader #define GL_EXT_vertex_shader 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glBeginVertexShaderEXT (void); GLAPI void APIENTRY glEndVertexShaderEXT (void); GLAPI void APIENTRY glBindVertexShaderEXT (GLuint); GLAPI GLuint APIENTRY glGenVertexShadersEXT (GLuint); GLAPI void APIENTRY glDeleteVertexShaderEXT (GLuint); GLAPI void APIENTRY glShaderOp1EXT (GLenum, GLuint, GLuint); GLAPI void APIENTRY glShaderOp2EXT (GLenum, GLuint, GLuint, GLuint); GLAPI void APIENTRY glShaderOp3EXT (GLenum, GLuint, GLuint, GLuint, GLuint); GLAPI void APIENTRY glSwizzleEXT (GLuint, GLuint, GLenum, GLenum, GLenum, GLenum); GLAPI void APIENTRY glWriteMaskEXT (GLuint, GLuint, GLenum, GLenum, GLenum, GLenum); GLAPI void APIENTRY glInsertComponentEXT (GLuint, GLuint, GLuint); GLAPI void APIENTRY glExtractComponentEXT (GLuint, GLuint, GLuint); GLAPI GLuint APIENTRY glGenSymbolsEXT (GLenum, GLenum, GLenum, GLuint); GLAPI void APIENTRY glSetInvariantEXT (GLuint, GLenum, const GLvoid *); GLAPI void APIENTRY glSetLocalConstantEXT (GLuint, GLenum, const GLvoid *); GLAPI void APIENTRY glVariantbvEXT (GLuint, const GLbyte *); GLAPI void APIENTRY glVariantsvEXT (GLuint, const GLshort *); GLAPI void APIENTRY glVariantivEXT (GLuint, const GLint *); GLAPI void APIENTRY glVariantfvEXT (GLuint, const GLfloat *); GLAPI void APIENTRY glVariantdvEXT (GLuint, const GLdouble *); GLAPI void APIENTRY glVariantubvEXT (GLuint, const GLubyte *); GLAPI void APIENTRY glVariantusvEXT (GLuint, const GLushort *); GLAPI void APIENTRY glVariantuivEXT (GLuint, const GLuint *); GLAPI void APIENTRY glVariantPointerEXT (GLuint, GLenum, GLuint, const GLvoid *); GLAPI void APIENTRY glEnableVariantClientStateEXT (GLuint); GLAPI void APIENTRY glDisableVariantClientStateEXT (GLuint); GLAPI GLuint APIENTRY glBindLightParameterEXT (GLenum, GLenum); GLAPI GLuint APIENTRY glBindMaterialParameterEXT (GLenum, GLenum); GLAPI GLuint APIENTRY glBindTexGenParameterEXT (GLenum, GLenum, GLenum); GLAPI GLuint APIENTRY glBindTextureUnitParameterEXT (GLenum, GLenum); GLAPI GLuint APIENTRY glBindParameterEXT (GLenum); GLAPI GLboolean APIENTRY glIsVariantEnabledEXT (GLuint, GLenum); GLAPI void APIENTRY glGetVariantBooleanvEXT (GLuint, GLenum, GLboolean *); GLAPI void APIENTRY glGetVariantIntegervEXT (GLuint, GLenum, GLint *); GLAPI void APIENTRY glGetVariantFloatvEXT (GLuint, GLenum, GLfloat *); GLAPI void APIENTRY glGetVariantPointervEXT (GLuint, GLenum, GLvoid* *); GLAPI void APIENTRY glGetInvariantBooleanvEXT (GLuint, GLenum, GLboolean *); GLAPI void APIENTRY glGetInvariantIntegervEXT (GLuint, GLenum, GLint *); GLAPI void APIENTRY glGetInvariantFloatvEXT (GLuint, GLenum, GLfloat *); GLAPI void APIENTRY glGetLocalConstantBooleanvEXT (GLuint, GLenum, GLboolean *); GLAPI void APIENTRY glGetLocalConstantIntegervEXT (GLuint, GLenum, GLint *); GLAPI void APIENTRY glGetLocalConstantFloatvEXT (GLuint, GLenum, GLfloat *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLBEGINVERTEXSHADEREXTPROC) (void); typedef void (APIENTRYP PFNGLENDVERTEXSHADEREXTPROC) (void); typedef void (APIENTRYP PFNGLBINDVERTEXSHADEREXTPROC) (GLuint id); typedef GLuint (APIENTRYP PFNGLGENVERTEXSHADERSEXTPROC) (GLuint range); typedef void (APIENTRYP PFNGLDELETEVERTEXSHADEREXTPROC) (GLuint id); typedef void (APIENTRYP PFNGLSHADEROP1EXTPROC) (GLenum op, GLuint res, GLuint arg1); typedef void (APIENTRYP PFNGLSHADEROP2EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2); typedef void (APIENTRYP PFNGLSHADEROP3EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3); typedef void (APIENTRYP PFNGLSWIZZLEEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); typedef void (APIENTRYP PFNGLWRITEMASKEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); typedef void (APIENTRYP PFNGLINSERTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num); typedef void (APIENTRYP PFNGLEXTRACTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num); typedef GLuint (APIENTRYP PFNGLGENSYMBOLSEXTPROC) (GLenum datatype, GLenum storagetype, GLenum range, GLuint components); typedef void (APIENTRYP PFNGLSETINVARIANTEXTPROC) (GLuint id, GLenum type, const GLvoid *addr); typedef void (APIENTRYP PFNGLSETLOCALCONSTANTEXTPROC) (GLuint id, GLenum type, const GLvoid *addr); typedef void (APIENTRYP PFNGLVARIANTBVEXTPROC) (GLuint id, const GLbyte *addr); typedef void (APIENTRYP PFNGLVARIANTSVEXTPROC) (GLuint id, const GLshort *addr); typedef void (APIENTRYP PFNGLVARIANTIVEXTPROC) (GLuint id, const GLint *addr); typedef void (APIENTRYP PFNGLVARIANTFVEXTPROC) (GLuint id, const GLfloat *addr); typedef void (APIENTRYP PFNGLVARIANTDVEXTPROC) (GLuint id, const GLdouble *addr); typedef void (APIENTRYP PFNGLVARIANTUBVEXTPROC) (GLuint id, const GLubyte *addr); typedef void (APIENTRYP PFNGLVARIANTUSVEXTPROC) (GLuint id, const GLushort *addr); typedef void (APIENTRYP PFNGLVARIANTUIVEXTPROC) (GLuint id, const GLuint *addr); typedef void (APIENTRYP PFNGLVARIANTPOINTEREXTPROC) (GLuint id, GLenum type, GLuint stride, const GLvoid *addr); typedef void (APIENTRYP PFNGLENABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id); typedef void (APIENTRYP PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id); typedef GLuint (APIENTRYP PFNGLBINDLIGHTPARAMETEREXTPROC) (GLenum light, GLenum value); typedef GLuint (APIENTRYP PFNGLBINDMATERIALPARAMETEREXTPROC) (GLenum face, GLenum value); typedef GLuint (APIENTRYP PFNGLBINDTEXGENPARAMETEREXTPROC) (GLenum unit, GLenum coord, GLenum value); typedef GLuint (APIENTRYP PFNGLBINDTEXTUREUNITPARAMETEREXTPROC) (GLenum unit, GLenum value); typedef GLuint (APIENTRYP PFNGLBINDPARAMETEREXTPROC) (GLenum value); typedef GLboolean (APIENTRYP PFNGLISVARIANTENABLEDEXTPROC) (GLuint id, GLenum cap); typedef void (APIENTRYP PFNGLGETVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data); typedef void (APIENTRYP PFNGLGETVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data); typedef void (APIENTRYP PFNGLGETVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data); typedef void (APIENTRYP PFNGLGETVARIANTPOINTERVEXTPROC) (GLuint id, GLenum value, GLvoid* *data); typedef void (APIENTRYP PFNGLGETINVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data); typedef void (APIENTRYP PFNGLGETINVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data); typedef void (APIENTRYP PFNGLGETINVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data); typedef void (APIENTRYP PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data); typedef void (APIENTRYP PFNGLGETLOCALCONSTANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data); typedef void (APIENTRYP PFNGLGETLOCALCONSTANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data); #endif #ifndef GL_ATI_vertex_streams #define GL_ATI_vertex_streams 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glVertexStream1sATI (GLenum, GLshort); GLAPI void APIENTRY glVertexStream1svATI (GLenum, const GLshort *); GLAPI void APIENTRY glVertexStream1iATI (GLenum, GLint); GLAPI void APIENTRY glVertexStream1ivATI (GLenum, const GLint *); GLAPI void APIENTRY glVertexStream1fATI (GLenum, GLfloat); GLAPI void APIENTRY glVertexStream1fvATI (GLenum, const GLfloat *); GLAPI void APIENTRY glVertexStream1dATI (GLenum, GLdouble); GLAPI void APIENTRY glVertexStream1dvATI (GLenum, const GLdouble *); GLAPI void APIENTRY glVertexStream2sATI (GLenum, GLshort, GLshort); GLAPI void APIENTRY glVertexStream2svATI (GLenum, const GLshort *); GLAPI void APIENTRY glVertexStream2iATI (GLenum, GLint, GLint); GLAPI void APIENTRY glVertexStream2ivATI (GLenum, const GLint *); GLAPI void APIENTRY glVertexStream2fATI (GLenum, GLfloat, GLfloat); GLAPI void APIENTRY glVertexStream2fvATI (GLenum, const GLfloat *); GLAPI void APIENTRY glVertexStream2dATI (GLenum, GLdouble, GLdouble); GLAPI void APIENTRY glVertexStream2dvATI (GLenum, const GLdouble *); GLAPI void APIENTRY glVertexStream3sATI (GLenum, GLshort, GLshort, GLshort); GLAPI void APIENTRY glVertexStream3svATI (GLenum, const GLshort *); GLAPI void APIENTRY glVertexStream3iATI (GLenum, GLint, GLint, GLint); GLAPI void APIENTRY glVertexStream3ivATI (GLenum, const GLint *); GLAPI void APIENTRY glVertexStream3fATI (GLenum, GLfloat, GLfloat, GLfloat); GLAPI void APIENTRY glVertexStream3fvATI (GLenum, const GLfloat *); GLAPI void APIENTRY glVertexStream3dATI (GLenum, GLdouble, GLdouble, GLdouble); GLAPI void APIENTRY glVertexStream3dvATI (GLenum, const GLdouble *); GLAPI void APIENTRY glVertexStream4sATI (GLenum, GLshort, GLshort, GLshort, GLshort); GLAPI void APIENTRY glVertexStream4svATI (GLenum, const GLshort *); GLAPI void APIENTRY glVertexStream4iATI (GLenum, GLint, GLint, GLint, GLint); GLAPI void APIENTRY glVertexStream4ivATI (GLenum, const GLint *); GLAPI void APIENTRY glVertexStream4fATI (GLenum, GLfloat, GLfloat, GLfloat, GLfloat); GLAPI void APIENTRY glVertexStream4fvATI (GLenum, const GLfloat *); GLAPI void APIENTRY glVertexStream4dATI (GLenum, GLdouble, GLdouble, GLdouble, GLdouble); GLAPI void APIENTRY glVertexStream4dvATI (GLenum, const GLdouble *); GLAPI void APIENTRY glNormalStream3bATI (GLenum, GLbyte, GLbyte, GLbyte); GLAPI void APIENTRY glNormalStream3bvATI (GLenum, const GLbyte *); GLAPI void APIENTRY glNormalStream3sATI (GLenum, GLshort, GLshort, GLshort); GLAPI void APIENTRY glNormalStream3svATI (GLenum, const GLshort *); GLAPI void APIENTRY glNormalStream3iATI (GLenum, GLint, GLint, GLint); GLAPI void APIENTRY glNormalStream3ivATI (GLenum, const GLint *); GLAPI void APIENTRY glNormalStream3fATI (GLenum, GLfloat, GLfloat, GLfloat); GLAPI void APIENTRY glNormalStream3fvATI (GLenum, const GLfloat *); GLAPI void APIENTRY glNormalStream3dATI (GLenum, GLdouble, GLdouble, GLdouble); GLAPI void APIENTRY glNormalStream3dvATI (GLenum, const GLdouble *); GLAPI void APIENTRY glClientActiveVertexStreamATI (GLenum); GLAPI void APIENTRY glVertexBlendEnviATI (GLenum, GLint); GLAPI void APIENTRY glVertexBlendEnvfATI (GLenum, GLfloat); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLVERTEXSTREAM1SATIPROC) (GLenum stream, GLshort x); typedef void (APIENTRYP PFNGLVERTEXSTREAM1SVATIPROC) (GLenum stream, const GLshort *coords); typedef void (APIENTRYP PFNGLVERTEXSTREAM1IATIPROC) (GLenum stream, GLint x); typedef void (APIENTRYP PFNGLVERTEXSTREAM1IVATIPROC) (GLenum stream, const GLint *coords); typedef void (APIENTRYP PFNGLVERTEXSTREAM1FATIPROC) (GLenum stream, GLfloat x); typedef void (APIENTRYP PFNGLVERTEXSTREAM1FVATIPROC) (GLenum stream, const GLfloat *coords); typedef void (APIENTRYP PFNGLVERTEXSTREAM1DATIPROC) (GLenum stream, GLdouble x); typedef void (APIENTRYP PFNGLVERTEXSTREAM1DVATIPROC) (GLenum stream, const GLdouble *coords); typedef void (APIENTRYP PFNGLVERTEXSTREAM2SATIPROC) (GLenum stream, GLshort x, GLshort y); typedef void (APIENTRYP PFNGLVERTEXSTREAM2SVATIPROC) (GLenum stream, const GLshort *coords); typedef void (APIENTRYP PFNGLVERTEXSTREAM2IATIPROC) (GLenum stream, GLint x, GLint y); typedef void (APIENTRYP PFNGLVERTEXSTREAM2IVATIPROC) (GLenum stream, const GLint *coords); typedef void (APIENTRYP PFNGLVERTEXSTREAM2FATIPROC) (GLenum stream, GLfloat x, GLfloat y); typedef void (APIENTRYP PFNGLVERTEXSTREAM2FVATIPROC) (GLenum stream, const GLfloat *coords); typedef void (APIENTRYP PFNGLVERTEXSTREAM2DATIPROC) (GLenum stream, GLdouble x, GLdouble y); typedef void (APIENTRYP PFNGLVERTEXSTREAM2DVATIPROC) (GLenum stream, const GLdouble *coords); typedef void (APIENTRYP PFNGLVERTEXSTREAM3SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z); typedef void (APIENTRYP PFNGLVERTEXSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords); typedef void (APIENTRYP PFNGLVERTEXSTREAM3IATIPROC) (GLenum stream, GLint x, GLint y, GLint z); typedef void (APIENTRYP PFNGLVERTEXSTREAM3IVATIPROC) (GLenum stream, const GLint *coords); typedef void (APIENTRYP PFNGLVERTEXSTREAM3FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z); typedef void (APIENTRYP PFNGLVERTEXSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords); typedef void (APIENTRYP PFNGLVERTEXSTREAM3DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z); typedef void (APIENTRYP PFNGLVERTEXSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords); typedef void (APIENTRYP PFNGLVERTEXSTREAM4SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w); typedef void (APIENTRYP PFNGLVERTEXSTREAM4SVATIPROC) (GLenum stream, const GLshort *coords); typedef void (APIENTRYP PFNGLVERTEXSTREAM4IATIPROC) (GLenum stream, GLint x, GLint y, GLint z, GLint w); typedef void (APIENTRYP PFNGLVERTEXSTREAM4IVATIPROC) (GLenum stream, const GLint *coords); typedef void (APIENTRYP PFNGLVERTEXSTREAM4FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w); typedef void (APIENTRYP PFNGLVERTEXSTREAM4FVATIPROC) (GLenum stream, const GLfloat *coords); typedef void (APIENTRYP PFNGLVERTEXSTREAM4DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w); typedef void (APIENTRYP PFNGLVERTEXSTREAM4DVATIPROC) (GLenum stream, const GLdouble *coords); typedef void (APIENTRYP PFNGLNORMALSTREAM3BATIPROC) (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz); typedef void (APIENTRYP PFNGLNORMALSTREAM3BVATIPROC) (GLenum stream, const GLbyte *coords); typedef void (APIENTRYP PFNGLNORMALSTREAM3SATIPROC) (GLenum stream, GLshort nx, GLshort ny, GLshort nz); typedef void (APIENTRYP PFNGLNORMALSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords); typedef void (APIENTRYP PFNGLNORMALSTREAM3IATIPROC) (GLenum stream, GLint nx, GLint ny, GLint nz); typedef void (APIENTRYP PFNGLNORMALSTREAM3IVATIPROC) (GLenum stream, const GLint *coords); typedef void (APIENTRYP PFNGLNORMALSTREAM3FATIPROC) (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz); typedef void (APIENTRYP PFNGLNORMALSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords); typedef void (APIENTRYP PFNGLNORMALSTREAM3DATIPROC) (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz); typedef void (APIENTRYP PFNGLNORMALSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords); typedef void (APIENTRYP PFNGLCLIENTACTIVEVERTEXSTREAMATIPROC) (GLenum stream); typedef void (APIENTRYP PFNGLVERTEXBLENDENVIATIPROC) (GLenum pname, GLint param); typedef void (APIENTRYP PFNGLVERTEXBLENDENVFATIPROC) (GLenum pname, GLfloat param); #endif #ifndef GL_ATI_element_array #define GL_ATI_element_array 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glElementPointerATI (GLenum, const GLvoid *); GLAPI void APIENTRY glDrawElementArrayATI (GLenum, GLsizei); GLAPI void APIENTRY glDrawRangeElementArrayATI (GLenum, GLuint, GLuint, GLsizei); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLELEMENTPOINTERATIPROC) (GLenum type, const GLvoid *pointer); typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYATIPROC) (GLenum mode, GLsizei count); typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYATIPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count); #endif #ifndef GL_SUN_mesh_array #define GL_SUN_mesh_array 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glDrawMeshArraysSUN (GLenum, GLint, GLsizei, GLsizei); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLDRAWMESHARRAYSSUNPROC) (GLenum mode, GLint first, GLsizei count, GLsizei width); #endif #ifndef GL_SUN_slice_accum #define GL_SUN_slice_accum 1 #endif #ifndef GL_NV_multisample_filter_hint #define GL_NV_multisample_filter_hint 1 #endif #ifndef GL_NV_depth_clamp #define GL_NV_depth_clamp 1 #endif #ifndef GL_NV_occlusion_query #define GL_NV_occlusion_query 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glGenOcclusionQueriesNV (GLsizei, GLuint *); GLAPI void APIENTRY glDeleteOcclusionQueriesNV (GLsizei, const GLuint *); GLAPI GLboolean APIENTRY glIsOcclusionQueryNV (GLuint); GLAPI void APIENTRY glBeginOcclusionQueryNV (GLuint); GLAPI void APIENTRY glEndOcclusionQueryNV (void); GLAPI void APIENTRY glGetOcclusionQueryivNV (GLuint, GLenum, GLint *); GLAPI void APIENTRY glGetOcclusionQueryuivNV (GLuint, GLenum, GLuint *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLGENOCCLUSIONQUERIESNVPROC) (GLsizei n, GLuint *ids); typedef void (APIENTRYP PFNGLDELETEOCCLUSIONQUERIESNVPROC) (GLsizei n, const GLuint *ids); typedef GLboolean (APIENTRYP PFNGLISOCCLUSIONQUERYNVPROC) (GLuint id); typedef void (APIENTRYP PFNGLBEGINOCCLUSIONQUERYNVPROC) (GLuint id); typedef void (APIENTRYP PFNGLENDOCCLUSIONQUERYNVPROC) (void); typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYIVNVPROC) (GLuint id, GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYUIVNVPROC) (GLuint id, GLenum pname, GLuint *params); #endif #ifndef GL_NV_point_sprite #define GL_NV_point_sprite 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glPointParameteriNV (GLenum, GLint); GLAPI void APIENTRY glPointParameterivNV (GLenum, const GLint *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLPOINTPARAMETERINVPROC) (GLenum pname, GLint param); typedef void (APIENTRYP PFNGLPOINTPARAMETERIVNVPROC) (GLenum pname, const GLint *params); #endif #ifndef GL_NV_texture_shader3 #define GL_NV_texture_shader3 1 #endif #ifndef GL_NV_vertex_program1_1 #define GL_NV_vertex_program1_1 1 #endif #ifndef GL_EXT_shadow_funcs #define GL_EXT_shadow_funcs 1 #endif #ifndef GL_EXT_stencil_two_side #define GL_EXT_stencil_two_side 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glActiveStencilFaceEXT (GLenum); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLACTIVESTENCILFACEEXTPROC) (GLenum face); #endif #ifndef GL_ATI_text_fragment_shader #define GL_ATI_text_fragment_shader 1 #endif #ifndef GL_APPLE_client_storage #define GL_APPLE_client_storage 1 #endif #ifndef GL_APPLE_element_array #define GL_APPLE_element_array 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glElementPointerAPPLE (GLenum, const GLvoid *); GLAPI void APIENTRY glDrawElementArrayAPPLE (GLenum, GLint, GLsizei); GLAPI void APIENTRY glDrawRangeElementArrayAPPLE (GLenum, GLuint, GLuint, GLint, GLsizei); GLAPI void APIENTRY glMultiDrawElementArrayAPPLE (GLenum, const GLint *, const GLsizei *, GLsizei); GLAPI void APIENTRY glMultiDrawRangeElementArrayAPPLE (GLenum, GLuint, GLuint, const GLint *, const GLsizei *, GLsizei); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLELEMENTPOINTERAPPLEPROC) (GLenum type, const GLvoid *pointer); typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, GLint first, GLsizei count); typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count); typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); typedef void (APIENTRYP PFNGLMULTIDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount); #endif #ifndef GL_APPLE_fence #define GL_APPLE_fence 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glGenFencesAPPLE (GLsizei, GLuint *); GLAPI void APIENTRY glDeleteFencesAPPLE (GLsizei, const GLuint *); GLAPI void APIENTRY glSetFenceAPPLE (GLuint); GLAPI GLboolean APIENTRY glIsFenceAPPLE (GLuint); GLAPI GLboolean APIENTRY glTestFenceAPPLE (GLuint); GLAPI void APIENTRY glFinishFenceAPPLE (GLuint); GLAPI GLboolean APIENTRY glTestObjectAPPLE (GLenum, GLuint); GLAPI void APIENTRY glFinishObjectAPPLE (GLenum, GLint); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLGENFENCESAPPLEPROC) (GLsizei n, GLuint *fences); typedef void (APIENTRYP PFNGLDELETEFENCESAPPLEPROC) (GLsizei n, const GLuint *fences); typedef void (APIENTRYP PFNGLSETFENCEAPPLEPROC) (GLuint fence); typedef GLboolean (APIENTRYP PFNGLISFENCEAPPLEPROC) (GLuint fence); typedef GLboolean (APIENTRYP PFNGLTESTFENCEAPPLEPROC) (GLuint fence); typedef void (APIENTRYP PFNGLFINISHFENCEAPPLEPROC) (GLuint fence); typedef GLboolean (APIENTRYP PFNGLTESTOBJECTAPPLEPROC) (GLenum object, GLuint name); typedef void (APIENTRYP PFNGLFINISHOBJECTAPPLEPROC) (GLenum object, GLint name); #endif #ifndef GL_APPLE_vertex_array_object #define GL_APPLE_vertex_array_object 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glBindVertexArrayAPPLE (GLuint); GLAPI void APIENTRY glDeleteVertexArraysAPPLE (GLsizei, const GLuint *); GLAPI void APIENTRY glGenVertexArraysAPPLE (GLsizei, GLuint *); GLAPI GLboolean APIENTRY glIsVertexArrayAPPLE (GLuint); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLBINDVERTEXARRAYAPPLEPROC) (GLuint array); typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint *arrays); typedef void (APIENTRYP PFNGLGENVERTEXARRAYSAPPLEPROC) (GLsizei n, GLuint *arrays); typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYAPPLEPROC) (GLuint array); #endif #ifndef GL_APPLE_vertex_array_range #define GL_APPLE_vertex_array_range 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glVertexArrayRangeAPPLE (GLsizei, GLvoid *); GLAPI void APIENTRY glFlushVertexArrayRangeAPPLE (GLsizei, GLvoid *); GLAPI void APIENTRY glVertexArrayParameteriAPPLE (GLenum, GLint); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, GLvoid *pointer); typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, GLvoid *pointer); typedef void (APIENTRYP PFNGLVERTEXARRAYPARAMETERIAPPLEPROC) (GLenum pname, GLint param); #endif #ifndef GL_APPLE_ycbcr_422 #define GL_APPLE_ycbcr_422 1 #endif #ifndef GL_S3_s3tc #define GL_S3_s3tc 1 #endif #ifndef GL_ATI_draw_buffers #define GL_ATI_draw_buffers 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glDrawBuffersATI (GLsizei, const GLenum *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLDRAWBUFFERSATIPROC) (GLsizei n, const GLenum *bufs); #endif #ifndef GL_ATI_pixel_format_float #define GL_ATI_pixel_format_float 1 /* This is really a WGL extension, but defines some associated GL enums. * ATI does not export "GL_ATI_pixel_format_float" in the GL_EXTENSIONS string. */ #endif #ifndef GL_ATI_texture_env_combine3 #define GL_ATI_texture_env_combine3 1 #endif #ifndef GL_ATI_texture_float #define GL_ATI_texture_float 1 #endif #ifndef GL_NV_float_buffer #define GL_NV_float_buffer 1 #endif #ifndef GL_NV_fragment_program #define GL_NV_fragment_program 1 /* Some NV_fragment_program entry points are shared with ARB_vertex_program. */ #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glProgramNamedParameter4fNV (GLuint, GLsizei, const GLubyte *, GLfloat, GLfloat, GLfloat, GLfloat); GLAPI void APIENTRY glProgramNamedParameter4dNV (GLuint, GLsizei, const GLubyte *, GLdouble, GLdouble, GLdouble, GLdouble); GLAPI void APIENTRY glProgramNamedParameter4fvNV (GLuint, GLsizei, const GLubyte *, const GLfloat *); GLAPI void APIENTRY glProgramNamedParameter4dvNV (GLuint, GLsizei, const GLubyte *, const GLdouble *); GLAPI void APIENTRY glGetProgramNamedParameterfvNV (GLuint, GLsizei, const GLubyte *, GLfloat *); GLAPI void APIENTRY glGetProgramNamedParameterdvNV (GLuint, GLsizei, const GLubyte *, GLdouble *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w); typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w); typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v); typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v); typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERFVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params); typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERDVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble *params); #endif #ifndef GL_NV_half_float #define GL_NV_half_float 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glVertex2hNV (GLhalfNV, GLhalfNV); GLAPI void APIENTRY glVertex2hvNV (const GLhalfNV *); GLAPI void APIENTRY glVertex3hNV (GLhalfNV, GLhalfNV, GLhalfNV); GLAPI void APIENTRY glVertex3hvNV (const GLhalfNV *); GLAPI void APIENTRY glVertex4hNV (GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV); GLAPI void APIENTRY glVertex4hvNV (const GLhalfNV *); GLAPI void APIENTRY glNormal3hNV (GLhalfNV, GLhalfNV, GLhalfNV); GLAPI void APIENTRY glNormal3hvNV (const GLhalfNV *); GLAPI void APIENTRY glColor3hNV (GLhalfNV, GLhalfNV, GLhalfNV); GLAPI void APIENTRY glColor3hvNV (const GLhalfNV *); GLAPI void APIENTRY glColor4hNV (GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV); GLAPI void APIENTRY glColor4hvNV (const GLhalfNV *); GLAPI void APIENTRY glTexCoord1hNV (GLhalfNV); GLAPI void APIENTRY glTexCoord1hvNV (const GLhalfNV *); GLAPI void APIENTRY glTexCoord2hNV (GLhalfNV, GLhalfNV); GLAPI void APIENTRY glTexCoord2hvNV (const GLhalfNV *); GLAPI void APIENTRY glTexCoord3hNV (GLhalfNV, GLhalfNV, GLhalfNV); GLAPI void APIENTRY glTexCoord3hvNV (const GLhalfNV *); GLAPI void APIENTRY glTexCoord4hNV (GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV); GLAPI void APIENTRY glTexCoord4hvNV (const GLhalfNV *); GLAPI void APIENTRY glMultiTexCoord1hNV (GLenum, GLhalfNV); GLAPI void APIENTRY glMultiTexCoord1hvNV (GLenum, const GLhalfNV *); GLAPI void APIENTRY glMultiTexCoord2hNV (GLenum, GLhalfNV, GLhalfNV); GLAPI void APIENTRY glMultiTexCoord2hvNV (GLenum, const GLhalfNV *); GLAPI void APIENTRY glMultiTexCoord3hNV (GLenum, GLhalfNV, GLhalfNV, GLhalfNV); GLAPI void APIENTRY glMultiTexCoord3hvNV (GLenum, const GLhalfNV *); GLAPI void APIENTRY glMultiTexCoord4hNV (GLenum, GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV); GLAPI void APIENTRY glMultiTexCoord4hvNV (GLenum, const GLhalfNV *); GLAPI void APIENTRY glFogCoordhNV (GLhalfNV); GLAPI void APIENTRY glFogCoordhvNV (const GLhalfNV *); GLAPI void APIENTRY glSecondaryColor3hNV (GLhalfNV, GLhalfNV, GLhalfNV); GLAPI void APIENTRY glSecondaryColor3hvNV (const GLhalfNV *); GLAPI void APIENTRY glVertexWeighthNV (GLhalfNV); GLAPI void APIENTRY glVertexWeighthvNV (const GLhalfNV *); GLAPI void APIENTRY glVertexAttrib1hNV (GLuint, GLhalfNV); GLAPI void APIENTRY glVertexAttrib1hvNV (GLuint, const GLhalfNV *); GLAPI void APIENTRY glVertexAttrib2hNV (GLuint, GLhalfNV, GLhalfNV); GLAPI void APIENTRY glVertexAttrib2hvNV (GLuint, const GLhalfNV *); GLAPI void APIENTRY glVertexAttrib3hNV (GLuint, GLhalfNV, GLhalfNV, GLhalfNV); GLAPI void APIENTRY glVertexAttrib3hvNV (GLuint, const GLhalfNV *); GLAPI void APIENTRY glVertexAttrib4hNV (GLuint, GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV); GLAPI void APIENTRY glVertexAttrib4hvNV (GLuint, const GLhalfNV *); GLAPI void APIENTRY glVertexAttribs1hvNV (GLuint, GLsizei, const GLhalfNV *); GLAPI void APIENTRY glVertexAttribs2hvNV (GLuint, GLsizei, const GLhalfNV *); GLAPI void APIENTRY glVertexAttribs3hvNV (GLuint, GLsizei, const GLhalfNV *); GLAPI void APIENTRY glVertexAttribs4hvNV (GLuint, GLsizei, const GLhalfNV *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLVERTEX2HNVPROC) (GLhalfNV x, GLhalfNV y); typedef void (APIENTRYP PFNGLVERTEX2HVNVPROC) (const GLhalfNV *v); typedef void (APIENTRYP PFNGLVERTEX3HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z); typedef void (APIENTRYP PFNGLVERTEX3HVNVPROC) (const GLhalfNV *v); typedef void (APIENTRYP PFNGLVERTEX4HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w); typedef void (APIENTRYP PFNGLVERTEX4HVNVPROC) (const GLhalfNV *v); typedef void (APIENTRYP PFNGLNORMAL3HNVPROC) (GLhalfNV nx, GLhalfNV ny, GLhalfNV nz); typedef void (APIENTRYP PFNGLNORMAL3HVNVPROC) (const GLhalfNV *v); typedef void (APIENTRYP PFNGLCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue); typedef void (APIENTRYP PFNGLCOLOR3HVNVPROC) (const GLhalfNV *v); typedef void (APIENTRYP PFNGLCOLOR4HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha); typedef void (APIENTRYP PFNGLCOLOR4HVNVPROC) (const GLhalfNV *v); typedef void (APIENTRYP PFNGLTEXCOORD1HNVPROC) (GLhalfNV s); typedef void (APIENTRYP PFNGLTEXCOORD1HVNVPROC) (const GLhalfNV *v); typedef void (APIENTRYP PFNGLTEXCOORD2HNVPROC) (GLhalfNV s, GLhalfNV t); typedef void (APIENTRYP PFNGLTEXCOORD2HVNVPROC) (const GLhalfNV *v); typedef void (APIENTRYP PFNGLTEXCOORD3HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r); typedef void (APIENTRYP PFNGLTEXCOORD3HVNVPROC) (const GLhalfNV *v); typedef void (APIENTRYP PFNGLTEXCOORD4HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q); typedef void (APIENTRYP PFNGLTEXCOORD4HVNVPROC) (const GLhalfNV *v); typedef void (APIENTRYP PFNGLMULTITEXCOORD1HNVPROC) (GLenum target, GLhalfNV s); typedef void (APIENTRYP PFNGLMULTITEXCOORD1HVNVPROC) (GLenum target, const GLhalfNV *v); typedef void (APIENTRYP PFNGLMULTITEXCOORD2HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t); typedef void (APIENTRYP PFNGLMULTITEXCOORD2HVNVPROC) (GLenum target, const GLhalfNV *v); typedef void (APIENTRYP PFNGLMULTITEXCOORD3HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r); typedef void (APIENTRYP PFNGLMULTITEXCOORD3HVNVPROC) (GLenum target, const GLhalfNV *v); typedef void (APIENTRYP PFNGLMULTITEXCOORD4HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q); typedef void (APIENTRYP PFNGLMULTITEXCOORD4HVNVPROC) (GLenum target, const GLhalfNV *v); typedef void (APIENTRYP PFNGLFOGCOORDHNVPROC) (GLhalfNV fog); typedef void (APIENTRYP PFNGLFOGCOORDHVNVPROC) (const GLhalfNV *fog); typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue); typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HVNVPROC) (const GLhalfNV *v); typedef void (APIENTRYP PFNGLVERTEXWEIGHTHNVPROC) (GLhalfNV weight); typedef void (APIENTRYP PFNGLVERTEXWEIGHTHVNVPROC) (const GLhalfNV *weight); typedef void (APIENTRYP PFNGLVERTEXATTRIB1HNVPROC) (GLuint index, GLhalfNV x); typedef void (APIENTRYP PFNGLVERTEXATTRIB1HVNVPROC) (GLuint index, const GLhalfNV *v); typedef void (APIENTRYP PFNGLVERTEXATTRIB2HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y); typedef void (APIENTRYP PFNGLVERTEXATTRIB2HVNVPROC) (GLuint index, const GLhalfNV *v); typedef void (APIENTRYP PFNGLVERTEXATTRIB3HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z); typedef void (APIENTRYP PFNGLVERTEXATTRIB3HVNVPROC) (GLuint index, const GLhalfNV *v); typedef void (APIENTRYP PFNGLVERTEXATTRIB4HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w); typedef void (APIENTRYP PFNGLVERTEXATTRIB4HVNVPROC) (GLuint index, const GLhalfNV *v); typedef void (APIENTRYP PFNGLVERTEXATTRIBS1HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v); typedef void (APIENTRYP PFNGLVERTEXATTRIBS2HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v); typedef void (APIENTRYP PFNGLVERTEXATTRIBS3HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v); typedef void (APIENTRYP PFNGLVERTEXATTRIBS4HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v); #endif #ifndef GL_NV_pixel_data_range #define GL_NV_pixel_data_range 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glPixelDataRangeNV (GLenum, GLsizei, GLvoid *); GLAPI void APIENTRY glFlushPixelDataRangeNV (GLenum); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLPIXELDATARANGENVPROC) (GLenum target, GLsizei length, GLvoid *pointer); typedef void (APIENTRYP PFNGLFLUSHPIXELDATARANGENVPROC) (GLenum target); #endif #ifndef GL_NV_primitive_restart #define GL_NV_primitive_restart 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glPrimitiveRestartNV (void); GLAPI void APIENTRY glPrimitiveRestartIndexNV (GLuint); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLPRIMITIVERESTARTNVPROC) (void); typedef void (APIENTRYP PFNGLPRIMITIVERESTARTINDEXNVPROC) (GLuint index); #endif #ifndef GL_NV_texture_expand_normal #define GL_NV_texture_expand_normal 1 #endif #ifndef GL_NV_vertex_program2 #define GL_NV_vertex_program2 1 #endif #ifndef GL_ATI_map_object_buffer #define GL_ATI_map_object_buffer 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI GLvoid* APIENTRY glMapObjectBufferATI (GLuint); GLAPI void APIENTRY glUnmapObjectBufferATI (GLuint); #endif /* GL_GLEXT_PROTOTYPES */ typedef GLvoid* (APIENTRYP PFNGLMAPOBJECTBUFFERATIPROC) (GLuint buffer); typedef void (APIENTRYP PFNGLUNMAPOBJECTBUFFERATIPROC) (GLuint buffer); #endif #ifndef GL_ATI_separate_stencil #define GL_ATI_separate_stencil 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glStencilOpSeparateATI (GLenum, GLenum, GLenum, GLenum); GLAPI void APIENTRY glStencilFuncSeparateATI (GLenum, GLenum, GLint, GLuint); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEATIPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEATIPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); #endif #ifndef GL_ATI_vertex_attrib_array_object #define GL_ATI_vertex_attrib_array_object 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glVertexAttribArrayObjectATI (GLuint, GLint, GLenum, GLboolean, GLsizei, GLuint, GLuint); GLAPI void APIENTRY glGetVertexAttribArrayObjectfvATI (GLuint, GLenum, GLfloat *); GLAPI void APIENTRY glGetVertexAttribArrayObjectivATI (GLuint, GLenum, GLint *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLVERTEXATTRIBARRAYOBJECTATIPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset); typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC) (GLuint index, GLenum pname, GLfloat *params); typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC) (GLuint index, GLenum pname, GLint *params); #endif #ifndef GL_OES_read_format #define GL_OES_read_format 1 #endif #ifndef GL_EXT_depth_bounds_test #define GL_EXT_depth_bounds_test 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glDepthBoundsEXT (GLclampd, GLclampd); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLDEPTHBOUNDSEXTPROC) (GLclampd zmin, GLclampd zmax); #endif #ifndef GL_EXT_texture_mirror_clamp #define GL_EXT_texture_mirror_clamp 1 #endif #ifndef GL_EXT_blend_equation_separate #define GL_EXT_blend_equation_separate 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glBlendEquationSeparateEXT (GLenum, GLenum); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEEXTPROC) (GLenum modeRGB, GLenum modeAlpha); #endif #ifndef GL_MESA_pack_invert #define GL_MESA_pack_invert 1 #endif #ifndef GL_MESA_ycbcr_texture #define GL_MESA_ycbcr_texture 1 #endif #ifndef GL_EXT_pixel_buffer_object #define GL_EXT_pixel_buffer_object 1 #endif #ifndef GL_NV_fragment_program_option #define GL_NV_fragment_program_option 1 #endif #ifndef GL_NV_fragment_program2 #define GL_NV_fragment_program2 1 #endif #ifndef GL_NV_vertex_program2_option #define GL_NV_vertex_program2_option 1 #endif #ifndef GL_NV_vertex_program3 #define GL_NV_vertex_program3 1 #endif #ifndef GL_EXT_framebuffer_object #define GL_EXT_framebuffer_object 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI GLboolean APIENTRY glIsRenderbufferEXT (GLuint); GLAPI void APIENTRY glBindRenderbufferEXT (GLenum, GLuint); GLAPI void APIENTRY glDeleteRenderbuffersEXT (GLsizei, const GLuint *); GLAPI void APIENTRY glGenRenderbuffersEXT (GLsizei, GLuint *); GLAPI void APIENTRY glRenderbufferStorageEXT (GLenum, GLenum, GLsizei, GLsizei); GLAPI void APIENTRY glGetRenderbufferParameterivEXT (GLenum, GLenum, GLint *); GLAPI GLboolean APIENTRY glIsFramebufferEXT (GLuint); GLAPI void APIENTRY glBindFramebufferEXT (GLenum, GLuint); GLAPI void APIENTRY glDeleteFramebuffersEXT (GLsizei, const GLuint *); GLAPI void APIENTRY glGenFramebuffersEXT (GLsizei, GLuint *); GLAPI GLenum APIENTRY glCheckFramebufferStatusEXT (GLenum); GLAPI void APIENTRY glFramebufferTexture1DEXT (GLenum, GLenum, GLenum, GLuint, GLint); GLAPI void APIENTRY glFramebufferTexture2DEXT (GLenum, GLenum, GLenum, GLuint, GLint); GLAPI void APIENTRY glFramebufferTexture3DEXT (GLenum, GLenum, GLenum, GLuint, GLint, GLint); GLAPI void APIENTRY glFramebufferRenderbufferEXT (GLenum, GLenum, GLenum, GLuint); GLAPI void APIENTRY glGetFramebufferAttachmentParameterivEXT (GLenum, GLenum, GLenum, GLint *); GLAPI void APIENTRY glGenerateMipmapEXT (GLenum); #endif /* GL_GLEXT_PROTOTYPES */ typedef GLboolean (APIENTRYP PFNGLISRENDERBUFFEREXTPROC) (GLuint renderbuffer); typedef void (APIENTRYP PFNGLBINDRENDERBUFFEREXTPROC) (GLenum target, GLuint renderbuffer); typedef void (APIENTRYP PFNGLDELETERENDERBUFFERSEXTPROC) (GLsizei n, const GLuint *renderbuffers); typedef void (APIENTRYP PFNGLGENRENDERBUFFERSEXTPROC) (GLsizei n, GLuint *renderbuffers); typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); typedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); typedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFEREXTPROC) (GLuint framebuffer); typedef void (APIENTRYP PFNGLBINDFRAMEBUFFEREXTPROC) (GLenum target, GLuint framebuffer); typedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSEXTPROC) (GLsizei n, const GLuint *framebuffers); typedef void (APIENTRYP PFNGLGENFRAMEBUFFERSEXTPROC) (GLsizei n, GLuint *framebuffers); typedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC) (GLenum target); typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); typedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); typedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLGENERATEMIPMAPEXTPROC) (GLenum target); #endif #ifndef GL_GREMEDY_string_marker #define GL_GREMEDY_string_marker 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glStringMarkerGREMEDY (GLsizei, const GLvoid *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLSTRINGMARKERGREMEDYPROC) (GLsizei len, const GLvoid *string); #endif #ifndef GL_EXT_packed_depth_stencil #define GL_EXT_packed_depth_stencil 1 #endif #ifndef GL_EXT_stencil_clear_tag #define GL_EXT_stencil_clear_tag 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glStencilClearTagEXT (GLsizei, GLuint); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLSTENCILCLEARTAGEXTPROC) (GLsizei stencilTagBits, GLuint stencilClearTag); #endif #ifndef GL_EXT_texture_sRGB #define GL_EXT_texture_sRGB 1 #endif #ifndef GL_EXT_framebuffer_blit #define GL_EXT_framebuffer_blit 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glBlitFramebufferEXT (GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLBLITFRAMEBUFFEREXTPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); #endif #ifndef GL_EXT_framebuffer_multisample #define GL_EXT_framebuffer_multisample 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glRenderbufferStorageMultisampleEXT (GLenum, GLsizei, GLenum, GLsizei, GLsizei); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); #endif #ifndef GL_MESAX_texture_stack #define GL_MESAX_texture_stack 1 #endif #ifndef GL_EXT_timer_query #define GL_EXT_timer_query 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glGetQueryObjecti64vEXT (GLuint, GLenum, GLint64EXT *); GLAPI void APIENTRY glGetQueryObjectui64vEXT (GLuint, GLenum, GLuint64EXT *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, GLenum pname, GLint64EXT *params); typedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, GLenum pname, GLuint64EXT *params); #endif #ifndef GL_EXT_gpu_program_parameters #define GL_EXT_gpu_program_parameters 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glProgramEnvParameters4fvEXT (GLenum, GLuint, GLsizei, const GLfloat *); GLAPI void APIENTRY glProgramLocalParameters4fvEXT (GLenum, GLuint, GLsizei, const GLfloat *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params); typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params); #endif #ifndef GL_APPLE_flush_buffer_range #define GL_APPLE_flush_buffer_range 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glBufferParameteriAPPLE (GLenum, GLenum, GLint); GLAPI void APIENTRY glFlushMappedBufferRangeAPPLE (GLenum, GLintptr, GLsizeiptr); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLBUFFERPARAMETERIAPPLEPROC) (GLenum target, GLenum pname, GLint param); typedef void (APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEAPPLEPROC) (GLenum target, GLintptr offset, GLsizeiptr size); #endif #ifndef GL_NV_gpu_program4 #define GL_NV_gpu_program4 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glProgramLocalParameterI4iNV (GLenum, GLuint, GLint, GLint, GLint, GLint); GLAPI void APIENTRY glProgramLocalParameterI4ivNV (GLenum, GLuint, const GLint *); GLAPI void APIENTRY glProgramLocalParametersI4ivNV (GLenum, GLuint, GLsizei, const GLint *); GLAPI void APIENTRY glProgramLocalParameterI4uiNV (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint); GLAPI void APIENTRY glProgramLocalParameterI4uivNV (GLenum, GLuint, const GLuint *); GLAPI void APIENTRY glProgramLocalParametersI4uivNV (GLenum, GLuint, GLsizei, const GLuint *); GLAPI void APIENTRY glProgramEnvParameterI4iNV (GLenum, GLuint, GLint, GLint, GLint, GLint); GLAPI void APIENTRY glProgramEnvParameterI4ivNV (GLenum, GLuint, const GLint *); GLAPI void APIENTRY glProgramEnvParametersI4ivNV (GLenum, GLuint, GLsizei, const GLint *); GLAPI void APIENTRY glProgramEnvParameterI4uiNV (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint); GLAPI void APIENTRY glProgramEnvParameterI4uivNV (GLenum, GLuint, const GLuint *); GLAPI void APIENTRY glProgramEnvParametersI4uivNV (GLenum, GLuint, GLsizei, const GLuint *); GLAPI void APIENTRY glGetProgramLocalParameterIivNV (GLenum, GLuint, GLint *); GLAPI void APIENTRY glGetProgramLocalParameterIuivNV (GLenum, GLuint, GLuint *); GLAPI void APIENTRY glGetProgramEnvParameterIivNV (GLenum, GLuint, GLint *); GLAPI void APIENTRY glGetProgramEnvParameterIuivNV (GLenum, GLuint, GLuint *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params); typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params); typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params); typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params); typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params); typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params); typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params); typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params); typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params); typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params); typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params); typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params); #endif #ifndef GL_NV_geometry_program4 #define GL_NV_geometry_program4 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glProgramVertexLimitNV (GLenum, GLint); GLAPI void APIENTRY glFramebufferTextureEXT (GLenum, GLenum, GLuint, GLint); GLAPI void APIENTRY glFramebufferTextureLayerEXT (GLenum, GLenum, GLuint, GLint, GLint); GLAPI void APIENTRY glFramebufferTextureFaceEXT (GLenum, GLenum, GLuint, GLint, GLenum); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLPROGRAMVERTEXLIMITNVPROC) (GLenum target, GLint limit); typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level); typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYEREXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREFACEEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face); #endif #ifndef GL_EXT_geometry_shader4 #define GL_EXT_geometry_shader4 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glProgramParameteriEXT (GLuint, GLenum, GLint); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value); #endif #ifndef GL_NV_vertex_program4 #define GL_NV_vertex_program4 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glVertexAttribI1iEXT (GLuint, GLint); GLAPI void APIENTRY glVertexAttribI2iEXT (GLuint, GLint, GLint); GLAPI void APIENTRY glVertexAttribI3iEXT (GLuint, GLint, GLint, GLint); GLAPI void APIENTRY glVertexAttribI4iEXT (GLuint, GLint, GLint, GLint, GLint); GLAPI void APIENTRY glVertexAttribI1uiEXT (GLuint, GLuint); GLAPI void APIENTRY glVertexAttribI2uiEXT (GLuint, GLuint, GLuint); GLAPI void APIENTRY glVertexAttribI3uiEXT (GLuint, GLuint, GLuint, GLuint); GLAPI void APIENTRY glVertexAttribI4uiEXT (GLuint, GLuint, GLuint, GLuint, GLuint); GLAPI void APIENTRY glVertexAttribI1ivEXT (GLuint, const GLint *); GLAPI void APIENTRY glVertexAttribI2ivEXT (GLuint, const GLint *); GLAPI void APIENTRY glVertexAttribI3ivEXT (GLuint, const GLint *); GLAPI void APIENTRY glVertexAttribI4ivEXT (GLuint, const GLint *); GLAPI void APIENTRY glVertexAttribI1uivEXT (GLuint, const GLuint *); GLAPI void APIENTRY glVertexAttribI2uivEXT (GLuint, const GLuint *); GLAPI void APIENTRY glVertexAttribI3uivEXT (GLuint, const GLuint *); GLAPI void APIENTRY glVertexAttribI4uivEXT (GLuint, const GLuint *); GLAPI void APIENTRY glVertexAttribI4bvEXT (GLuint, const GLbyte *); GLAPI void APIENTRY glVertexAttribI4svEXT (GLuint, const GLshort *); GLAPI void APIENTRY glVertexAttribI4ubvEXT (GLuint, const GLubyte *); GLAPI void APIENTRY glVertexAttribI4usvEXT (GLuint, const GLushort *); GLAPI void APIENTRY glVertexAttribIPointerEXT (GLuint, GLint, GLenum, GLsizei, const GLvoid *); GLAPI void APIENTRY glGetVertexAttribIivEXT (GLuint, GLenum, GLint *); GLAPI void APIENTRY glGetVertexAttribIuivEXT (GLuint, GLenum, GLuint *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IEXTPROC) (GLuint index, GLint x); typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IEXTPROC) (GLuint index, GLint x, GLint y); typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IEXTPROC) (GLuint index, GLint x, GLint y, GLint z); typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IEXTPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w); typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIEXTPROC) (GLuint index, GLuint x); typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIEXTPROC) (GLuint index, GLuint x, GLuint y); typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z); typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IVEXTPROC) (GLuint index, const GLint *v); typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IVEXTPROC) (GLuint index, const GLint *v); typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IVEXTPROC) (GLuint index, const GLint *v); typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IVEXTPROC) (GLuint index, const GLint *v); typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIVEXTPROC) (GLuint index, const GLuint *v); typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIVEXTPROC) (GLuint index, const GLuint *v); typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIVEXTPROC) (GLuint index, const GLuint *v); typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIVEXTPROC) (GLuint index, const GLuint *v); typedef void (APIENTRYP PFNGLVERTEXATTRIBI4BVEXTPROC) (GLuint index, const GLbyte *v); typedef void (APIENTRYP PFNGLVERTEXATTRIBI4SVEXTPROC) (GLuint index, const GLshort *v); typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UBVEXTPROC) (GLuint index, const GLubyte *v); typedef void (APIENTRYP PFNGLVERTEXATTRIBI4USVEXTPROC) (GLuint index, const GLushort *v); typedef void (APIENTRYP PFNGLVERTEXATTRIBIPOINTEREXTPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIIVEXTPROC) (GLuint index, GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIUIVEXTPROC) (GLuint index, GLenum pname, GLuint *params); #endif #ifndef GL_EXT_gpu_shader4 #define GL_EXT_gpu_shader4 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glGetUniformuivEXT (GLuint, GLint, GLuint *); GLAPI void APIENTRY glBindFragDataLocationEXT (GLuint, GLuint, const GLchar *); GLAPI GLint APIENTRY glGetFragDataLocationEXT (GLuint, const GLchar *); GLAPI void APIENTRY glUniform1uiEXT (GLint, GLuint); GLAPI void APIENTRY glUniform2uiEXT (GLint, GLuint, GLuint); GLAPI void APIENTRY glUniform3uiEXT (GLint, GLuint, GLuint, GLuint); GLAPI void APIENTRY glUniform4uiEXT (GLint, GLuint, GLuint, GLuint, GLuint); GLAPI void APIENTRY glUniform1uivEXT (GLint, GLsizei, const GLuint *); GLAPI void APIENTRY glUniform2uivEXT (GLint, GLsizei, const GLuint *); GLAPI void APIENTRY glUniform3uivEXT (GLint, GLsizei, const GLuint *); GLAPI void APIENTRY glUniform4uivEXT (GLint, GLsizei, const GLuint *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLGETUNIFORMUIVEXTPROC) (GLuint program, GLint location, GLuint *params); typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONEXTPROC) (GLuint program, GLuint color, const GLchar *name); typedef GLint (APIENTRYP PFNGLGETFRAGDATALOCATIONEXTPROC) (GLuint program, const GLchar *name); typedef void (APIENTRYP PFNGLUNIFORM1UIEXTPROC) (GLint location, GLuint v0); typedef void (APIENTRYP PFNGLUNIFORM2UIEXTPROC) (GLint location, GLuint v0, GLuint v1); typedef void (APIENTRYP PFNGLUNIFORM3UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2); typedef void (APIENTRYP PFNGLUNIFORM4UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); typedef void (APIENTRYP PFNGLUNIFORM1UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value); typedef void (APIENTRYP PFNGLUNIFORM2UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value); typedef void (APIENTRYP PFNGLUNIFORM3UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value); typedef void (APIENTRYP PFNGLUNIFORM4UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value); #endif #ifndef GL_EXT_draw_instanced #define GL_EXT_draw_instanced 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glDrawArraysInstancedEXT (GLenum, GLint, GLsizei, GLsizei); GLAPI void APIENTRY glDrawElementsInstancedEXT (GLenum, GLsizei, GLenum, const GLvoid *, GLsizei); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDEXTPROC) (GLenum mode, GLint start, GLsizei count, GLsizei primcount); typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDEXTPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount); #endif #ifndef GL_EXT_packed_float #define GL_EXT_packed_float 1 #endif #ifndef GL_EXT_texture_array #define GL_EXT_texture_array 1 #endif #ifndef GL_EXT_texture_buffer_object #define GL_EXT_texture_buffer_object 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glTexBufferEXT (GLenum, GLenum, GLuint); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLTEXBUFFEREXTPROC) (GLenum target, GLenum internalformat, GLuint buffer); #endif #ifndef GL_EXT_texture_compression_latc #define GL_EXT_texture_compression_latc 1 #endif #ifndef GL_EXT_texture_compression_rgtc #define GL_EXT_texture_compression_rgtc 1 #endif #ifndef GL_EXT_texture_shared_exponent #define GL_EXT_texture_shared_exponent 1 #endif #ifndef GL_NV_depth_buffer_float #define GL_NV_depth_buffer_float 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glDepthRangedNV (GLdouble, GLdouble); GLAPI void APIENTRY glClearDepthdNV (GLdouble); GLAPI void APIENTRY glDepthBoundsdNV (GLdouble, GLdouble); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLDEPTHRANGEDNVPROC) (GLdouble zNear, GLdouble zFar); typedef void (APIENTRYP PFNGLCLEARDEPTHDNVPROC) (GLdouble depth); typedef void (APIENTRYP PFNGLDEPTHBOUNDSDNVPROC) (GLdouble zmin, GLdouble zmax); #endif #ifndef GL_NV_fragment_program4 #define GL_NV_fragment_program4 1 #endif #ifndef GL_NV_framebuffer_multisample_coverage #define GL_NV_framebuffer_multisample_coverage 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glRenderbufferStorageMultisampleCoverageNV (GLenum, GLsizei, GLsizei, GLenum, GLsizei, GLsizei); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height); #endif #ifndef GL_EXT_framebuffer_sRGB #define GL_EXT_framebuffer_sRGB 1 #endif #ifndef GL_NV_geometry_shader4 #define GL_NV_geometry_shader4 1 #endif #ifndef GL_NV_parameter_buffer_object #define GL_NV_parameter_buffer_object 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glProgramBufferParametersfvNV (GLenum, GLuint, GLuint, GLsizei, const GLfloat *); GLAPI void APIENTRY glProgramBufferParametersIivNV (GLenum, GLuint, GLuint, GLsizei, const GLint *); GLAPI void APIENTRY glProgramBufferParametersIuivNV (GLenum, GLuint, GLuint, GLsizei, const GLuint *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSFVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLfloat *params); typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIIVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLint *params); typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIUIVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLuint *params); #endif #ifndef GL_EXT_draw_buffers2 #define GL_EXT_draw_buffers2 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glColorMaskIndexedEXT (GLuint, GLboolean, GLboolean, GLboolean, GLboolean); GLAPI void APIENTRY glGetBooleanIndexedvEXT (GLenum, GLuint, GLboolean *); GLAPI void APIENTRY glGetIntegerIndexedvEXT (GLenum, GLuint, GLint *); GLAPI void APIENTRY glEnableIndexedEXT (GLenum, GLuint); GLAPI void APIENTRY glDisableIndexedEXT (GLenum, GLuint); GLAPI GLboolean APIENTRY glIsEnabledIndexedEXT (GLenum, GLuint); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLCOLORMASKINDEXEDEXTPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); typedef void (APIENTRYP PFNGLGETBOOLEANINDEXEDVEXTPROC) (GLenum target, GLuint index, GLboolean *data); typedef void (APIENTRYP PFNGLGETINTEGERINDEXEDVEXTPROC) (GLenum target, GLuint index, GLint *data); typedef void (APIENTRYP PFNGLENABLEINDEXEDEXTPROC) (GLenum target, GLuint index); typedef void (APIENTRYP PFNGLDISABLEINDEXEDEXTPROC) (GLenum target, GLuint index); typedef GLboolean (APIENTRYP PFNGLISENABLEDINDEXEDEXTPROC) (GLenum target, GLuint index); #endif #ifndef GL_NV_transform_feedback #define GL_NV_transform_feedback 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glBeginTransformFeedbackNV (GLenum); GLAPI void APIENTRY glEndTransformFeedbackNV (void); GLAPI void APIENTRY glTransformFeedbackAttribsNV (GLuint, const GLint *, GLenum); GLAPI void APIENTRY glBindBufferRangeNV (GLenum, GLuint, GLuint, GLintptr, GLsizeiptr); GLAPI void APIENTRY glBindBufferOffsetNV (GLenum, GLuint, GLuint, GLintptr); GLAPI void APIENTRY glBindBufferBaseNV (GLenum, GLuint, GLuint); GLAPI void APIENTRY glTransformFeedbackVaryingsNV (GLuint, GLsizei, const GLint *, GLenum); GLAPI void APIENTRY glActiveVaryingNV (GLuint, const GLchar *); GLAPI GLint APIENTRY glGetVaryingLocationNV (GLuint, const GLchar *); GLAPI void APIENTRY glGetActiveVaryingNV (GLuint, GLuint, GLsizei, GLsizei *, GLsizei *, GLenum *, GLchar *); GLAPI void APIENTRY glGetTransformFeedbackVaryingNV (GLuint, GLuint, GLint *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKNVPROC) (GLenum primitiveMode); typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKNVPROC) (void); typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKATTRIBSNVPROC) (GLuint count, const GLint *attribs, GLenum bufferMode); typedef void (APIENTRYP PFNGLBINDBUFFERRANGENVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); typedef void (APIENTRYP PFNGLBINDBUFFEROFFSETNVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset); typedef void (APIENTRYP PFNGLBINDBUFFERBASENVPROC) (GLenum target, GLuint index, GLuint buffer); typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSNVPROC) (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode); typedef void (APIENTRYP PFNGLACTIVEVARYINGNVPROC) (GLuint program, const GLchar *name); typedef GLint (APIENTRYP PFNGLGETVARYINGLOCATIONNVPROC) (GLuint program, const GLchar *name); typedef void (APIENTRYP PFNGLGETACTIVEVARYINGNVPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGNVPROC) (GLuint program, GLuint index, GLint *location); #endif #ifndef GL_EXT_bindable_uniform #define GL_EXT_bindable_uniform 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glUniformBufferEXT (GLuint, GLint, GLuint); GLAPI GLint APIENTRY glGetUniformBufferSizeEXT (GLuint, GLint); GLAPI GLintptr APIENTRY glGetUniformOffsetEXT (GLuint, GLint); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLUNIFORMBUFFEREXTPROC) (GLuint program, GLint location, GLuint buffer); typedef GLint (APIENTRYP PFNGLGETUNIFORMBUFFERSIZEEXTPROC) (GLuint program, GLint location); typedef GLintptr (APIENTRYP PFNGLGETUNIFORMOFFSETEXTPROC) (GLuint program, GLint location); #endif #ifndef GL_EXT_texture_integer #define GL_EXT_texture_integer 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glTexParameterIivEXT (GLenum, GLenum, const GLint *); GLAPI void APIENTRY glTexParameterIuivEXT (GLenum, GLenum, const GLuint *); GLAPI void APIENTRY glGetTexParameterIivEXT (GLenum, GLenum, GLint *); GLAPI void APIENTRY glGetTexParameterIuivEXT (GLenum, GLenum, GLuint *); GLAPI void APIENTRY glClearColorIiEXT (GLint, GLint, GLint, GLint); GLAPI void APIENTRY glClearColorIuiEXT (GLuint, GLuint, GLuint, GLuint); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, const GLint *params); typedef void (APIENTRYP PFNGLTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, const GLuint *params); typedef void (APIENTRYP PFNGLGETTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLGETTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, GLuint *params); typedef void (APIENTRYP PFNGLCLEARCOLORIIEXTPROC) (GLint red, GLint green, GLint blue, GLint alpha); typedef void (APIENTRYP PFNGLCLEARCOLORIUIEXTPROC) (GLuint red, GLuint green, GLuint blue, GLuint alpha); #endif #ifndef GL_GREMEDY_frame_terminator #define GL_GREMEDY_frame_terminator 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glFrameTerminatorGREMEDY (void); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLFRAMETERMINATORGREMEDYPROC) (void); #endif #ifndef GL_NV_conditional_render #define GL_NV_conditional_render 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glBeginConditionalRenderNV (GLuint, GLenum); GLAPI void APIENTRY glEndConditionalRenderNV (void); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERNVPROC) (GLuint id, GLenum mode); typedef void (APIENTRYP PFNGLENDCONDITIONALRENDERNVPROC) (void); #endif #ifndef GL_NV_present_video #define GL_NV_present_video 1 #endif #ifndef GL_EXT_transform_feedback #define GL_EXT_transform_feedback 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glBeginTransformFeedbackEXT (GLenum); GLAPI void APIENTRY glEndTransformFeedbackEXT (void); GLAPI void APIENTRY glBindBufferRangeEXT (GLenum, GLuint, GLuint, GLintptr, GLsizeiptr); GLAPI void APIENTRY glBindBufferOffsetEXT (GLenum, GLuint, GLuint, GLintptr); GLAPI void APIENTRY glBindBufferBaseEXT (GLenum, GLuint, GLuint); GLAPI void APIENTRY glTransformFeedbackVaryingsEXT (GLuint, GLsizei, const GLint *, GLenum); GLAPI void APIENTRY glGetTransformFeedbackVaryingEXT (GLuint, GLuint, GLint *); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKEXTPROC) (GLenum primitiveMode); typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKEXTPROC) (void); typedef void (APIENTRYP PFNGLBINDBUFFERRANGEEXTPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); typedef void (APIENTRYP PFNGLBINDBUFFEROFFSETEXTPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset); typedef void (APIENTRYP PFNGLBINDBUFFERBASEEXTPROC) (GLenum target, GLuint index, GLuint buffer); typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSEXTPROC) (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode); typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGEXTPROC) (GLuint program, GLuint index, GLint *location); #endif #ifndef GL_EXT_direct_state_access #define GL_EXT_direct_state_access 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glClientAttribDefaultEXT (GLbitfield); GLAPI void APIENTRY glPushClientAttribDefaultEXT (GLbitfield); GLAPI void APIENTRY glMatrixLoadfEXT (GLenum, const GLfloat *); GLAPI void APIENTRY glMatrixLoaddEXT (GLenum, const GLdouble *); GLAPI void APIENTRY glMatrixMultfEXT (GLenum, const GLfloat *); GLAPI void APIENTRY glMatrixMultdEXT (GLenum, const GLdouble *); GLAPI void APIENTRY glMatrixLoadIdentityEXT (GLenum); GLAPI void APIENTRY glMatrixRotatefEXT (GLenum, GLfloat, GLfloat, GLfloat, GLfloat); GLAPI void APIENTRY glMatrixRotatedEXT (GLenum, GLdouble, GLdouble, GLdouble, GLdouble); GLAPI void APIENTRY glMatrixScalefEXT (GLenum, GLfloat, GLfloat, GLfloat); GLAPI void APIENTRY glMatrixScaledEXT (GLenum, GLdouble, GLdouble, GLdouble); GLAPI void APIENTRY glMatrixTranslatefEXT (GLenum, GLfloat, GLfloat, GLfloat); GLAPI void APIENTRY glMatrixTranslatedEXT (GLenum, GLdouble, GLdouble, GLdouble); GLAPI void APIENTRY glMatrixFrustumEXT (GLenum, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble); GLAPI void APIENTRY glMatrixOrthoEXT (GLenum, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble); GLAPI void APIENTRY glMatrixPopEXT (GLenum); GLAPI void APIENTRY glMatrixPushEXT (GLenum); GLAPI void APIENTRY glMatrixLoadTransposefEXT (GLenum, const GLfloat *); GLAPI void APIENTRY glMatrixLoadTransposedEXT (GLenum, const GLdouble *); GLAPI void APIENTRY glMatrixMultTransposefEXT (GLenum, const GLfloat *); GLAPI void APIENTRY glMatrixMultTransposedEXT (GLenum, const GLdouble *); GLAPI void APIENTRY glTextureParameterfEXT (GLuint, GLenum, GLenum, GLfloat); GLAPI void APIENTRY glTextureParameterfvEXT (GLuint, GLenum, GLenum, const GLfloat *); GLAPI void APIENTRY glTextureParameteriEXT (GLuint, GLenum, GLenum, GLint); GLAPI void APIENTRY glTextureParameterivEXT (GLuint, GLenum, GLenum, const GLint *); GLAPI void APIENTRY glTextureImage1DEXT (GLuint, GLenum, GLint, GLenum, GLsizei, GLint, GLenum, GLenum, const GLvoid *); GLAPI void APIENTRY glTextureImage2DEXT (GLuint, GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *); GLAPI void APIENTRY glTextureSubImage1DEXT (GLuint, GLenum, GLint, GLint, GLsizei, GLenum, GLenum, const GLvoid *); GLAPI void APIENTRY glTextureSubImage2DEXT (GLuint, GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *); GLAPI void APIENTRY glCopyTextureImage1DEXT (GLuint, GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLint); GLAPI void APIENTRY glCopyTextureImage2DEXT (GLuint, GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint); GLAPI void APIENTRY glCopyTextureSubImage1DEXT (GLuint, GLenum, GLint, GLint, GLint, GLint, GLsizei); GLAPI void APIENTRY glCopyTextureSubImage2DEXT (GLuint, GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei); GLAPI void APIENTRY glGetTextureImageEXT (GLuint, GLenum, GLint, GLenum, GLenum, GLvoid *); GLAPI void APIENTRY glGetTextureParameterfvEXT (GLuint, GLenum, GLenum, GLfloat *); GLAPI void APIENTRY glGetTextureParameterivEXT (GLuint, GLenum, GLenum, GLint *); GLAPI void APIENTRY glGetTextureLevelParameterfvEXT (GLuint, GLenum, GLint, GLenum, GLfloat *); GLAPI void APIENTRY glGetTextureLevelParameterivEXT (GLuint, GLenum, GLint, GLenum, GLint *); GLAPI void APIENTRY glTextureImage3DEXT (GLuint, GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *); GLAPI void APIENTRY glTextureSubImage3DEXT (GLuint, GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *); GLAPI void APIENTRY glCopyTextureSubImage3DEXT (GLuint, GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei); GLAPI void APIENTRY glMultiTexParameterfEXT (GLenum, GLenum, GLenum, GLfloat); GLAPI void APIENTRY glMultiTexParameterfvEXT (GLenum, GLenum, GLenum, const GLfloat *); GLAPI void APIENTRY glMultiTexParameteriEXT (GLenum, GLenum, GLenum, GLint); GLAPI void APIENTRY glMultiTexParameterivEXT (GLenum, GLenum, GLenum, const GLint *); GLAPI void APIENTRY glMultiTexImage1DEXT (GLenum, GLenum, GLint, GLenum, GLsizei, GLint, GLenum, GLenum, const GLvoid *); GLAPI void APIENTRY glMultiTexImage2DEXT (GLenum, GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *); GLAPI void APIENTRY glMultiTexSubImage1DEXT (GLenum, GLenum, GLint, GLint, GLsizei, GLenum, GLenum, const GLvoid *); GLAPI void APIENTRY glMultiTexSubImage2DEXT (GLenum, GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *); GLAPI void APIENTRY glCopyMultiTexImage1DEXT (GLenum, GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLint); GLAPI void APIENTRY glCopyMultiTexImage2DEXT (GLenum, GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint); GLAPI void APIENTRY glCopyMultiTexSubImage1DEXT (GLenum, GLenum, GLint, GLint, GLint, GLint, GLsizei); GLAPI void APIENTRY glCopyMultiTexSubImage2DEXT (GLenum, GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei); GLAPI void APIENTRY glGetMultiTexImageEXT (GLenum, GLenum, GLint, GLenum, GLenum, GLvoid *); GLAPI void APIENTRY glGetMultiTexParameterfvEXT (GLenum, GLenum, GLenum, GLfloat *); GLAPI void APIENTRY glGetMultiTexParameterivEXT (GLenum, GLenum, GLenum, GLint *); GLAPI void APIENTRY glGetMultiTexLevelParameterfvEXT (GLenum, GLenum, GLint, GLenum, GLfloat *); GLAPI void APIENTRY glGetMultiTexLevelParameterivEXT (GLenum, GLenum, GLint, GLenum, GLint *); GLAPI void APIENTRY glMultiTexImage3DEXT (GLenum, GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *); GLAPI void APIENTRY glMultiTexSubImage3DEXT (GLenum, GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *); GLAPI void APIENTRY glCopyMultiTexSubImage3DEXT (GLenum, GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei); GLAPI void APIENTRY glBindMultiTextureEXT (GLenum, GLenum, GLuint); GLAPI void APIENTRY glEnableClientStateIndexedEXT (GLenum, GLuint); GLAPI void APIENTRY glDisableClientStateIndexedEXT (GLenum, GLuint); GLAPI void APIENTRY glMultiTexCoordPointerEXT (GLenum, GLint, GLenum, GLsizei, const GLvoid *); GLAPI void APIENTRY glMultiTexEnvfEXT (GLenum, GLenum, GLenum, GLfloat); GLAPI void APIENTRY glMultiTexEnvfvEXT (GLenum, GLenum, GLenum, const GLfloat *); GLAPI void APIENTRY glMultiTexEnviEXT (GLenum, GLenum, GLenum, GLint); GLAPI void APIENTRY glMultiTexEnvivEXT (GLenum, GLenum, GLenum, const GLint *); GLAPI void APIENTRY glMultiTexGendEXT (GLenum, GLenum, GLenum, GLdouble); GLAPI void APIENTRY glMultiTexGendvEXT (GLenum, GLenum, GLenum, const GLdouble *); GLAPI void APIENTRY glMultiTexGenfEXT (GLenum, GLenum, GLenum, GLfloat); GLAPI void APIENTRY glMultiTexGenfvEXT (GLenum, GLenum, GLenum, const GLfloat *); GLAPI void APIENTRY glMultiTexGeniEXT (GLenum, GLenum, GLenum, GLint); GLAPI void APIENTRY glMultiTexGenivEXT (GLenum, GLenum, GLenum, const GLint *); GLAPI void APIENTRY glGetMultiTexEnvfvEXT (GLenum, GLenum, GLenum, GLfloat *); GLAPI void APIENTRY glGetMultiTexEnvivEXT (GLenum, GLenum, GLenum, GLint *); GLAPI void APIENTRY glGetMultiTexGendvEXT (GLenum, GLenum, GLenum, GLdouble *); GLAPI void APIENTRY glGetMultiTexGenfvEXT (GLenum, GLenum, GLenum, GLfloat *); GLAPI void APIENTRY glGetMultiTexGenivEXT (GLenum, GLenum, GLenum, GLint *); GLAPI void APIENTRY glGetFloatIndexedvEXT (GLenum, GLuint, GLfloat *); GLAPI void APIENTRY glGetDoubleIndexedvEXT (GLenum, GLuint, GLdouble *); GLAPI void APIENTRY glGetPointerIndexedvEXT (GLenum, GLuint, GLvoid* *); GLAPI void APIENTRY glCompressedTextureImage3DEXT (GLuint, GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *); GLAPI void APIENTRY glCompressedTextureImage2DEXT (GLuint, GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *); GLAPI void APIENTRY glCompressedTextureImage1DEXT (GLuint, GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid *); GLAPI void APIENTRY glCompressedTextureSubImage3DEXT (GLuint, GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *); GLAPI void APIENTRY glCompressedTextureSubImage2DEXT (GLuint, GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *); GLAPI void APIENTRY glCompressedTextureSubImage1DEXT (GLuint, GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *); GLAPI void APIENTRY glGetCompressedTextureImageEXT (GLuint, GLenum, GLint, GLvoid *); GLAPI void APIENTRY glCompressedMultiTexImage3DEXT (GLenum, GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *); GLAPI void APIENTRY glCompressedMultiTexImage2DEXT (GLenum, GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *); GLAPI void APIENTRY glCompressedMultiTexImage1DEXT (GLenum, GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid *); GLAPI void APIENTRY glCompressedMultiTexSubImage3DEXT (GLenum, GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *); GLAPI void APIENTRY glCompressedMultiTexSubImage2DEXT (GLenum, GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *); GLAPI void APIENTRY glCompressedMultiTexSubImage1DEXT (GLenum, GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *); GLAPI void APIENTRY glGetCompressedMultiTexImageEXT (GLenum, GLenum, GLint, GLvoid *); GLAPI void APIENTRY glNamedProgramStringEXT (GLuint, GLenum, GLenum, GLsizei, const GLvoid *); GLAPI void APIENTRY glNamedProgramLocalParameter4dEXT (GLuint, GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble); GLAPI void APIENTRY glNamedProgramLocalParameter4dvEXT (GLuint, GLenum, GLuint, const GLdouble *); GLAPI void APIENTRY glNamedProgramLocalParameter4fEXT (GLuint, GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat); GLAPI void APIENTRY glNamedProgramLocalParameter4fvEXT (GLuint, GLenum, GLuint, const GLfloat *); GLAPI void APIENTRY glGetNamedProgramLocalParameterdvEXT (GLuint, GLenum, GLuint, GLdouble *); GLAPI void APIENTRY glGetNamedProgramLocalParameterfvEXT (GLuint, GLenum, GLuint, GLfloat *); GLAPI void APIENTRY glGetNamedProgramivEXT (GLuint, GLenum, GLenum, GLint *); GLAPI void APIENTRY glGetNamedProgramStringEXT (GLuint, GLenum, GLenum, GLvoid *); GLAPI void APIENTRY glNamedProgramLocalParameters4fvEXT (GLuint, GLenum, GLuint, GLsizei, const GLfloat *); GLAPI void APIENTRY glNamedProgramLocalParameterI4iEXT (GLuint, GLenum, GLuint, GLint, GLint, GLint, GLint); GLAPI void APIENTRY glNamedProgramLocalParameterI4ivEXT (GLuint, GLenum, GLuint, const GLint *); GLAPI void APIENTRY glNamedProgramLocalParametersI4ivEXT (GLuint, GLenum, GLuint, GLsizei, const GLint *); GLAPI void APIENTRY glNamedProgramLocalParameterI4uiEXT (GLuint, GLenum, GLuint, GLuint, GLuint, GLuint, GLuint); GLAPI void APIENTRY glNamedProgramLocalParameterI4uivEXT (GLuint, GLenum, GLuint, const GLuint *); GLAPI void APIENTRY glNamedProgramLocalParametersI4uivEXT (GLuint, GLenum, GLuint, GLsizei, const GLuint *); GLAPI void APIENTRY glGetNamedProgramLocalParameterIivEXT (GLuint, GLenum, GLuint, GLint *); GLAPI void APIENTRY glGetNamedProgramLocalParameterIuivEXT (GLuint, GLenum, GLuint, GLuint *); GLAPI void APIENTRY glTextureParameterIivEXT (GLuint, GLenum, GLenum, const GLint *); GLAPI void APIENTRY glTextureParameterIuivEXT (GLuint, GLenum, GLenum, const GLuint *); GLAPI void APIENTRY glGetTextureParameterIivEXT (GLuint, GLenum, GLenum, GLint *); GLAPI void APIENTRY glGetTextureParameterIuivEXT (GLuint, GLenum, GLenum, GLuint *); GLAPI void APIENTRY glMultiTexParameterIivEXT (GLenum, GLenum, GLenum, const GLint *); GLAPI void APIENTRY glMultiTexParameterIuivEXT (GLenum, GLenum, GLenum, const GLuint *); GLAPI void APIENTRY glGetMultiTexParameterIivEXT (GLenum, GLenum, GLenum, GLint *); GLAPI void APIENTRY glGetMultiTexParameterIuivEXT (GLenum, GLenum, GLenum, GLuint *); GLAPI void APIENTRY glProgramUniform1fEXT (GLuint, GLint, GLfloat); GLAPI void APIENTRY glProgramUniform2fEXT (GLuint, GLint, GLfloat, GLfloat); GLAPI void APIENTRY glProgramUniform3fEXT (GLuint, GLint, GLfloat, GLfloat, GLfloat); GLAPI void APIENTRY glProgramUniform4fEXT (GLuint, GLint, GLfloat, GLfloat, GLfloat, GLfloat); GLAPI void APIENTRY glProgramUniform1iEXT (GLuint, GLint, GLint); GLAPI void APIENTRY glProgramUniform2iEXT (GLuint, GLint, GLint, GLint); GLAPI void APIENTRY glProgramUniform3iEXT (GLuint, GLint, GLint, GLint, GLint); GLAPI void APIENTRY glProgramUniform4iEXT (GLuint, GLint, GLint, GLint, GLint, GLint); GLAPI void APIENTRY glProgramUniform1fvEXT (GLuint, GLint, GLsizei, const GLfloat *); GLAPI void APIENTRY glProgramUniform2fvEXT (GLuint, GLint, GLsizei, const GLfloat *); GLAPI void APIENTRY glProgramUniform3fvEXT (GLuint, GLint, GLsizei, const GLfloat *); GLAPI void APIENTRY glProgramUniform4fvEXT (GLuint, GLint, GLsizei, const GLfloat *); GLAPI void APIENTRY glProgramUniform1ivEXT (GLuint, GLint, GLsizei, const GLint *); GLAPI void APIENTRY glProgramUniform2ivEXT (GLuint, GLint, GLsizei, const GLint *); GLAPI void APIENTRY glProgramUniform3ivEXT (GLuint, GLint, GLsizei, const GLint *); GLAPI void APIENTRY glProgramUniform4ivEXT (GLuint, GLint, GLsizei, const GLint *); GLAPI void APIENTRY glProgramUniformMatrix2fvEXT (GLuint, GLint, GLsizei, GLboolean, const GLfloat *); GLAPI void APIENTRY glProgramUniformMatrix3fvEXT (GLuint, GLint, GLsizei, GLboolean, const GLfloat *); GLAPI void APIENTRY glProgramUniformMatrix4fvEXT (GLuint, GLint, GLsizei, GLboolean, const GLfloat *); GLAPI void APIENTRY glProgramUniformMatrix2x3fvEXT (GLuint, GLint, GLsizei, GLboolean, const GLfloat *); GLAPI void APIENTRY glProgramUniformMatrix3x2fvEXT (GLuint, GLint, GLsizei, GLboolean, const GLfloat *); GLAPI void APIENTRY glProgramUniformMatrix2x4fvEXT (GLuint, GLint, GLsizei, GLboolean, const GLfloat *); GLAPI void APIENTRY glProgramUniformMatrix4x2fvEXT (GLuint, GLint, GLsizei, GLboolean, const GLfloat *); GLAPI void APIENTRY glProgramUniformMatrix3x4fvEXT (GLuint, GLint, GLsizei, GLboolean, const GLfloat *); GLAPI void APIENTRY glProgramUniformMatrix4x3fvEXT (GLuint, GLint, GLsizei, GLboolean, const GLfloat *); GLAPI void APIENTRY glProgramUniform1uiEXT (GLuint, GLint, GLuint); GLAPI void APIENTRY glProgramUniform2uiEXT (GLuint, GLint, GLuint, GLuint); GLAPI void APIENTRY glProgramUniform3uiEXT (GLuint, GLint, GLuint, GLuint, GLuint); GLAPI void APIENTRY glProgramUniform4uiEXT (GLuint, GLint, GLuint, GLuint, GLuint, GLuint); GLAPI void APIENTRY glProgramUniform1uivEXT (GLuint, GLint, GLsizei, const GLuint *); GLAPI void APIENTRY glProgramUniform2uivEXT (GLuint, GLint, GLsizei, const GLuint *); GLAPI void APIENTRY glProgramUniform3uivEXT (GLuint, GLint, GLsizei, const GLuint *); GLAPI void APIENTRY glProgramUniform4uivEXT (GLuint, GLint, GLsizei, const GLuint *); GLAPI void APIENTRY glNamedBufferDataEXT (GLuint, GLsizeiptr, const GLvoid *, GLenum); GLAPI void APIENTRY glNamedBufferSubDataEXT (GLuint, GLintptr, GLsizeiptr, const GLvoid *); GLAPI GLvoid* APIENTRY glMapNamedBufferEXT (GLuint, GLenum); GLAPI GLboolean APIENTRY glUnmapNamedBufferEXT (GLuint); GLAPI void APIENTRY glGetNamedBufferParameterivEXT (GLuint, GLenum, GLint *); GLAPI void APIENTRY glGetNamedBufferPointervEXT (GLuint, GLenum, GLvoid* *); GLAPI void APIENTRY glGetNamedBufferSubDataEXT (GLuint, GLintptr, GLsizeiptr, GLvoid *); GLAPI void APIENTRY glTextureBufferEXT (GLuint, GLenum, GLenum, GLuint); GLAPI void APIENTRY glMultiTexBufferEXT (GLenum, GLenum, GLenum, GLuint); GLAPI void APIENTRY glNamedRenderbufferStorageEXT (GLuint, GLenum, GLsizei, GLsizei); GLAPI void APIENTRY glGetNamedRenderbufferParameterivEXT (GLuint, GLenum, GLint *); GLAPI GLenum APIENTRY glCheckNamedFramebufferStatusEXT (GLuint, GLenum); GLAPI void APIENTRY glNamedFramebufferTexture1DEXT (GLuint, GLenum, GLenum, GLuint, GLint); GLAPI void APIENTRY glNamedFramebufferTexture2DEXT (GLuint, GLenum, GLenum, GLuint, GLint); GLAPI void APIENTRY glNamedFramebufferTexture3DEXT (GLuint, GLenum, GLenum, GLuint, GLint, GLint); GLAPI void APIENTRY glNamedFramebufferRenderbufferEXT (GLuint, GLenum, GLenum, GLuint); GLAPI void APIENTRY glGetNamedFramebufferAttachmentParameterivEXT (GLuint, GLenum, GLenum, GLint *); GLAPI void APIENTRY glGenerateTextureMipmapEXT (GLuint, GLenum); GLAPI void APIENTRY glGenerateMultiTexMipmapEXT (GLenum, GLenum); GLAPI void APIENTRY glFramebufferDrawBufferEXT (GLuint, GLenum); GLAPI void APIENTRY glFramebufferDrawBuffersEXT (GLuint, GLsizei, const GLenum *); GLAPI void APIENTRY glFramebufferReadBufferEXT (GLuint, GLenum); GLAPI void APIENTRY glGetFramebufferParameterivEXT (GLuint, GLenum, GLint *); GLAPI void APIENTRY glNamedRenderbufferStorageMultisampleEXT (GLuint, GLsizei, GLenum, GLsizei, GLsizei); GLAPI void APIENTRY glNamedRenderbufferStorageMultisampleCoverageEXT (GLuint, GLsizei, GLsizei, GLenum, GLsizei, GLsizei); GLAPI void APIENTRY glNamedFramebufferTextureEXT (GLuint, GLenum, GLuint, GLint); GLAPI void APIENTRY glNamedFramebufferTextureLayerEXT (GLuint, GLenum, GLuint, GLint, GLint); GLAPI void APIENTRY glNamedFramebufferTextureFaceEXT (GLuint, GLenum, GLuint, GLint, GLenum); GLAPI void APIENTRY glTextureRenderbufferEXT (GLuint, GLenum, GLuint); GLAPI void APIENTRY glMultiTexRenderbufferEXT (GLenum, GLenum, GLuint); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLCLIENTATTRIBDEFAULTEXTPROC) (GLbitfield mask); typedef void (APIENTRYP PFNGLPUSHCLIENTATTRIBDEFAULTEXTPROC) (GLbitfield mask); typedef void (APIENTRYP PFNGLMATRIXLOADFEXTPROC) (GLenum mode, const GLfloat *m); typedef void (APIENTRYP PFNGLMATRIXLOADDEXTPROC) (GLenum mode, const GLdouble *m); typedef void (APIENTRYP PFNGLMATRIXMULTFEXTPROC) (GLenum mode, const GLfloat *m); typedef void (APIENTRYP PFNGLMATRIXMULTDEXTPROC) (GLenum mode, const GLdouble *m); typedef void (APIENTRYP PFNGLMATRIXLOADIDENTITYEXTPROC) (GLenum mode); typedef void (APIENTRYP PFNGLMATRIXROTATEFEXTPROC) (GLenum mode, GLfloat angle, GLfloat x, GLfloat y, GLfloat z); typedef void (APIENTRYP PFNGLMATRIXROTATEDEXTPROC) (GLenum mode, GLdouble angle, GLdouble x, GLdouble y, GLdouble z); typedef void (APIENTRYP PFNGLMATRIXSCALEFEXTPROC) (GLenum mode, GLfloat x, GLfloat y, GLfloat z); typedef void (APIENTRYP PFNGLMATRIXSCALEDEXTPROC) (GLenum mode, GLdouble x, GLdouble y, GLdouble z); typedef void (APIENTRYP PFNGLMATRIXTRANSLATEFEXTPROC) (GLenum mode, GLfloat x, GLfloat y, GLfloat z); typedef void (APIENTRYP PFNGLMATRIXTRANSLATEDEXTPROC) (GLenum mode, GLdouble x, GLdouble y, GLdouble z); typedef void (APIENTRYP PFNGLMATRIXFRUSTUMEXTPROC) (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); typedef void (APIENTRYP PFNGLMATRIXORTHOEXTPROC) (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); typedef void (APIENTRYP PFNGLMATRIXPOPEXTPROC) (GLenum mode); typedef void (APIENTRYP PFNGLMATRIXPUSHEXTPROC) (GLenum mode); typedef void (APIENTRYP PFNGLMATRIXLOADTRANSPOSEFEXTPROC) (GLenum mode, const GLfloat *m); typedef void (APIENTRYP PFNGLMATRIXLOADTRANSPOSEDEXTPROC) (GLenum mode, const GLdouble *m); typedef void (APIENTRYP PFNGLMATRIXMULTTRANSPOSEFEXTPROC) (GLenum mode, const GLfloat *m); typedef void (APIENTRYP PFNGLMATRIXMULTTRANSPOSEDEXTPROC) (GLenum mode, const GLdouble *m); typedef void (APIENTRYP PFNGLTEXTUREPARAMETERFEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLfloat param); typedef void (APIENTRYP PFNGLTEXTUREPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLfloat *params); typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint param); typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLint *params); typedef void (APIENTRYP PFNGLTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels); typedef void (APIENTRYP PFNGLTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels); typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); typedef void (APIENTRYP PFNGLCOPYTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); typedef void (APIENTRYP PFNGLCOPYTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); typedef void (APIENTRYP PFNGLGETTEXTUREIMAGEEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels); typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLfloat *params); typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum pname, GLfloat *params); typedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLTEXTUREIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); typedef void (APIENTRYP PFNGLMULTITEXPARAMETERFEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat param); typedef void (APIENTRYP PFNGLMULTITEXPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params); typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint param); typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params); typedef void (APIENTRYP PFNGLMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels); typedef void (APIENTRYP PFNGLMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels); typedef void (APIENTRYP PFNGLMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); typedef void (APIENTRYP PFNGLMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); typedef void (APIENTRYP PFNGLCOPYMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); typedef void (APIENTRYP PFNGLCOPYMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); typedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); typedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); typedef void (APIENTRYP PFNGLGETMULTITEXIMAGEEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels); typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat *params); typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLGETMULTITEXLEVELPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum pname, GLfloat *params); typedef void (APIENTRYP PFNGLGETMULTITEXLEVELPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLMULTITEXIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); typedef void (APIENTRYP PFNGLMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); typedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); typedef void (APIENTRYP PFNGLBINDMULTITEXTUREEXTPROC) (GLenum texunit, GLenum target, GLuint texture); typedef void (APIENTRYP PFNGLENABLECLIENTSTATEINDEXEDEXTPROC) (GLenum array, GLuint index); typedef void (APIENTRYP PFNGLDISABLECLIENTSTATEINDEXEDEXTPROC) (GLenum array, GLuint index); typedef void (APIENTRYP PFNGLMULTITEXCOORDPOINTEREXTPROC) (GLenum texunit, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); typedef void (APIENTRYP PFNGLMULTITEXENVFEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat param); typedef void (APIENTRYP PFNGLMULTITEXENVFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params); typedef void (APIENTRYP PFNGLMULTITEXENVIEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint param); typedef void (APIENTRYP PFNGLMULTITEXENVIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params); typedef void (APIENTRYP PFNGLMULTITEXGENDEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLdouble param); typedef void (APIENTRYP PFNGLMULTITEXGENDVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLdouble *params); typedef void (APIENTRYP PFNGLMULTITEXGENFEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLfloat param); typedef void (APIENTRYP PFNGLMULTITEXGENFVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLfloat *params); typedef void (APIENTRYP PFNGLMULTITEXGENIEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLint param); typedef void (APIENTRYP PFNGLMULTITEXGENIVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLint *params); typedef void (APIENTRYP PFNGLGETMULTITEXENVFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat *params); typedef void (APIENTRYP PFNGLGETMULTITEXENVIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLGETMULTITEXGENDVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLdouble *params); typedef void (APIENTRYP PFNGLGETMULTITEXGENFVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLfloat *params); typedef void (APIENTRYP PFNGLGETMULTITEXGENIVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLGETFLOATINDEXEDVEXTPROC) (GLenum target, GLuint index, GLfloat *data); typedef void (APIENTRYP PFNGLGETDOUBLEINDEXEDVEXTPROC) (GLenum target, GLuint index, GLdouble *data); typedef void (APIENTRYP PFNGLGETPOINTERINDEXEDVEXTPROC) (GLenum target, GLuint index, GLvoid* *data); typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *bits); typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *bits); typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *bits); typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *bits); typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *bits); typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *bits); typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXTUREIMAGEEXTPROC) (GLuint texture, GLenum target, GLint lod, GLvoid *img); typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *bits); typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *bits); typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *bits); typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *bits); typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *bits); typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *bits); typedef void (APIENTRYP PFNGLGETCOMPRESSEDMULTITEXIMAGEEXTPROC) (GLenum texunit, GLenum target, GLint lod, GLvoid *img); typedef void (APIENTRYP PFNGLNAMEDPROGRAMSTRINGEXTPROC) (GLuint program, GLenum target, GLenum format, GLsizei len, const GLvoid *string); typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4DEXTPROC) (GLuint program, GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4DVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLdouble *params); typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4FEXTPROC) (GLuint program, GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4FVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLfloat *params); typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERDVEXTPROC) (GLuint program, GLenum target, GLuint index, GLdouble *params); typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERFVEXTPROC) (GLuint program, GLenum target, GLuint index, GLfloat *params); typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMIVEXTPROC) (GLuint program, GLenum target, GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMSTRINGEXTPROC) (GLuint program, GLenum target, GLenum pname, GLvoid *string); typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLfloat *params); typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4IEXTPROC) (GLuint program, GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4IVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLint *params); typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERSI4IVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLint *params); typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIEXTPROC) (GLuint program, GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLuint *params); typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERSI4UIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLuint *params); typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERIIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLint *params); typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERIUIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLuint *params); typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLint *params); typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIUIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLuint *params); typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIUIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLuint *params); typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params); typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIUIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLuint *params); typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIUIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLuint *params); typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FEXTPROC) (GLuint program, GLint location, GLfloat v0); typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1); typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IEXTPROC) (GLuint program, GLint location, GLint v0); typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1); typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIEXTPROC) (GLuint program, GLint location, GLuint v0); typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1); typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); typedef void (APIENTRYP PFNGLNAMEDBUFFERDATAEXTPROC) (GLuint buffer, GLsizeiptr size, const GLvoid *data, GLenum usage); typedef void (APIENTRYP PFNGLNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, const GLvoid *data); typedef GLvoid* (APIENTRYP PFNGLMAPNAMEDBUFFEREXTPROC) (GLuint buffer, GLenum access); typedef GLboolean (APIENTRYP PFNGLUNMAPNAMEDBUFFEREXTPROC) (GLuint buffer); typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERIVEXTPROC) (GLuint buffer, GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPOINTERVEXTPROC) (GLuint buffer, GLenum pname, GLvoid* *params); typedef void (APIENTRYP PFNGLGETNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, GLvoid *data); typedef void (APIENTRYP PFNGLTEXTUREBUFFEREXTPROC) (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer); typedef void (APIENTRYP PFNGLMULTITEXBUFFEREXTPROC) (GLenum texunit, GLenum target, GLenum internalformat, GLuint buffer); typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEEXTPROC) (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height); typedef void (APIENTRYP PFNGLGETNAMEDRENDERBUFFERPARAMETERIVEXTPROC) (GLuint renderbuffer, GLenum pname, GLint *params); typedef GLenum (APIENTRYP PFNGLCHECKNAMEDFRAMEBUFFERSTATUSEXTPROC) (GLuint framebuffer, GLenum target); typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE1DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level); typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE2DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level); typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE3DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERRENDERBUFFEREXTPROC) (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); typedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLGENERATETEXTUREMIPMAPEXTPROC) (GLuint texture, GLenum target); typedef void (APIENTRYP PFNGLGENERATEMULTITEXMIPMAPEXTPROC) (GLenum texunit, GLenum target); typedef void (APIENTRYP PFNGLFRAMEBUFFERDRAWBUFFEREXTPROC) (GLuint framebuffer, GLenum mode); typedef void (APIENTRYP PFNGLFRAMEBUFFERDRAWBUFFERSEXTPROC) (GLuint framebuffer, GLsizei n, const GLenum *bufs); typedef void (APIENTRYP PFNGLFRAMEBUFFERREADBUFFEREXTPROC) (GLuint framebuffer, GLenum mode); typedef void (APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLECOVERAGEEXTPROC) (GLuint renderbuffer, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height); typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTUREEXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level); typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURELAYEREXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer); typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTUREFACEEXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLenum face); typedef void (APIENTRYP PFNGLTEXTURERENDERBUFFEREXTPROC) (GLuint texture, GLenum target, GLuint renderbuffer); typedef void (APIENTRYP PFNGLMULTITEXRENDERBUFFEREXTPROC) (GLenum texunit, GLenum target, GLuint renderbuffer); #endif #ifndef GL_EXT_vertex_array_bgra #define GL_EXT_vertex_array_bgra 1 #endif #ifndef GL_EXT_texture_swizzle #define GL_EXT_texture_swizzle 1 #endif #ifndef GL_NV_explicit_multisample #define GL_NV_explicit_multisample 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glGetMultisamplefvNV (GLenum, GLuint, GLfloat *); GLAPI void APIENTRY glSampleMaskIndexedNV (GLuint, GLbitfield); GLAPI void APIENTRY glTexRenderbufferNV (GLenum, GLuint); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLGETMULTISAMPLEFVNVPROC) (GLenum pname, GLuint index, GLfloat *val); typedef void (APIENTRYP PFNGLSAMPLEMASKINDEXEDNVPROC) (GLuint index, GLbitfield mask); typedef void (APIENTRYP PFNGLTEXRENDERBUFFERNVPROC) (GLenum target, GLuint renderbuffer); #endif #ifndef GL_NV_transform_feedback2 #define GL_NV_transform_feedback2 1 #ifdef GL_GLEXT_PROTOTYPES GLAPI void APIENTRY glBindTransformFeedbackNV (GLenum, GLuint); GLAPI void APIENTRY glDeleteTransformFeedbacksNV (GLsizei, const GLuint *); GLAPI void APIENTRY glGenTransformFeedbacksNV (GLsizei, GLuint *); GLAPI GLboolean APIENTRY glIsTransformFeedbackNV (GLuint); GLAPI void APIENTRY glPauseTransformFeedbackNV (void); GLAPI void APIENTRY glResumeTransformFeedbackNV (void); GLAPI void APIENTRY glDrawTransformFeedbackNV (GLenum, GLuint); #endif /* GL_GLEXT_PROTOTYPES */ typedef void (APIENTRYP PFNGLBINDTRANSFORMFEEDBACKNVPROC) (GLenum target, GLuint id); typedef void (APIENTRYP PFNGLDELETETRANSFORMFEEDBACKSNVPROC) (GLsizei n, const GLuint *ids); typedef void (APIENTRYP PFNGLGENTRANSFORMFEEDBACKSNVPROC) (GLsizei n, GLuint *ids); typedef GLboolean (APIENTRYP PFNGLISTRANSFORMFEEDBACKNVPROC) (GLuint id); typedef void (APIENTRYP PFNGLPAUSETRANSFORMFEEDBACKNVPROC) (void); typedef void (APIENTRYP PFNGLRESUMETRANSFORMFEEDBACKNVPROC) (void); typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKNVPROC) (GLenum mode, GLuint id); #endif #ifdef __cplusplus } #endif #endif netgen-6.2.1804/ng/Togl2.1/gl/wglext.h0000644000175000017500000010132513272137567015626 0ustar kurtkurt#ifndef __wglext_h_ #define __wglext_h_ #ifdef __cplusplus extern "C" { #endif /* ** Copyright (c) 2007 The Khronos Group Inc. ** ** Permission is hereby granted, free of charge, to any person obtaining a ** copy of this software and/or associated documentation files (the ** "Materials"), to deal in the Materials without restriction, including ** without limitation the rights to use, copy, modify, merge, publish, ** distribute, sublicense, and/or sell copies of the Materials, and to ** permit persons to whom the Materials are furnished to do so, subject to ** the following conditions: ** ** The above copyright notice and this permission notice shall be included ** in all copies or substantial portions of the Materials. ** ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE ** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. */ #if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) #define WIN32_LEAN_AND_MEAN 1 #include #endif #ifndef APIENTRY #define APIENTRY #endif #ifndef APIENTRYP #define APIENTRYP APIENTRY * #endif #ifndef GLAPI #define GLAPI extern #endif /*************************************************************/ /* Header file version number */ /* wglext.h last updated 2008/10/07 */ /* Current version at http://www.opengl.org/registry/ */ #define WGL_WGLEXT_VERSION 11 #ifndef WGL_ARB_buffer_region #define WGL_FRONT_COLOR_BUFFER_BIT_ARB 0x00000001 #define WGL_BACK_COLOR_BUFFER_BIT_ARB 0x00000002 #define WGL_DEPTH_BUFFER_BIT_ARB 0x00000004 #define WGL_STENCIL_BUFFER_BIT_ARB 0x00000008 #endif #ifndef WGL_ARB_multisample #define WGL_SAMPLE_BUFFERS_ARB 0x2041 #define WGL_SAMPLES_ARB 0x2042 #endif #ifndef WGL_ARB_extensions_string #endif #ifndef WGL_ARB_pixel_format #define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000 #define WGL_DRAW_TO_WINDOW_ARB 0x2001 #define WGL_DRAW_TO_BITMAP_ARB 0x2002 #define WGL_ACCELERATION_ARB 0x2003 #define WGL_NEED_PALETTE_ARB 0x2004 #define WGL_NEED_SYSTEM_PALETTE_ARB 0x2005 #define WGL_SWAP_LAYER_BUFFERS_ARB 0x2006 #define WGL_SWAP_METHOD_ARB 0x2007 #define WGL_NUMBER_OVERLAYS_ARB 0x2008 #define WGL_NUMBER_UNDERLAYS_ARB 0x2009 #define WGL_TRANSPARENT_ARB 0x200A #define WGL_TRANSPARENT_RED_VALUE_ARB 0x2037 #define WGL_TRANSPARENT_GREEN_VALUE_ARB 0x2038 #define WGL_TRANSPARENT_BLUE_VALUE_ARB 0x2039 #define WGL_TRANSPARENT_ALPHA_VALUE_ARB 0x203A #define WGL_TRANSPARENT_INDEX_VALUE_ARB 0x203B #define WGL_SHARE_DEPTH_ARB 0x200C #define WGL_SHARE_STENCIL_ARB 0x200D #define WGL_SHARE_ACCUM_ARB 0x200E #define WGL_SUPPORT_GDI_ARB 0x200F #define WGL_SUPPORT_OPENGL_ARB 0x2010 #define WGL_DOUBLE_BUFFER_ARB 0x2011 #define WGL_STEREO_ARB 0x2012 #define WGL_PIXEL_TYPE_ARB 0x2013 #define WGL_COLOR_BITS_ARB 0x2014 #define WGL_RED_BITS_ARB 0x2015 #define WGL_RED_SHIFT_ARB 0x2016 #define WGL_GREEN_BITS_ARB 0x2017 #define WGL_GREEN_SHIFT_ARB 0x2018 #define WGL_BLUE_BITS_ARB 0x2019 #define WGL_BLUE_SHIFT_ARB 0x201A #define WGL_ALPHA_BITS_ARB 0x201B #define WGL_ALPHA_SHIFT_ARB 0x201C #define WGL_ACCUM_BITS_ARB 0x201D #define WGL_ACCUM_RED_BITS_ARB 0x201E #define WGL_ACCUM_GREEN_BITS_ARB 0x201F #define WGL_ACCUM_BLUE_BITS_ARB 0x2020 #define WGL_ACCUM_ALPHA_BITS_ARB 0x2021 #define WGL_DEPTH_BITS_ARB 0x2022 #define WGL_STENCIL_BITS_ARB 0x2023 #define WGL_AUX_BUFFERS_ARB 0x2024 #define WGL_NO_ACCELERATION_ARB 0x2025 #define WGL_GENERIC_ACCELERATION_ARB 0x2026 #define WGL_FULL_ACCELERATION_ARB 0x2027 #define WGL_SWAP_EXCHANGE_ARB 0x2028 #define WGL_SWAP_COPY_ARB 0x2029 #define WGL_SWAP_UNDEFINED_ARB 0x202A #define WGL_TYPE_RGBA_ARB 0x202B #define WGL_TYPE_COLORINDEX_ARB 0x202C #endif #ifndef WGL_ARB_make_current_read #define ERROR_INVALID_PIXEL_TYPE_ARB 0x2043 #define ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB 0x2054 #endif #ifndef WGL_ARB_pbuffer #define WGL_DRAW_TO_PBUFFER_ARB 0x202D #define WGL_MAX_PBUFFER_PIXELS_ARB 0x202E #define WGL_MAX_PBUFFER_WIDTH_ARB 0x202F #define WGL_MAX_PBUFFER_HEIGHT_ARB 0x2030 #define WGL_PBUFFER_LARGEST_ARB 0x2033 #define WGL_PBUFFER_WIDTH_ARB 0x2034 #define WGL_PBUFFER_HEIGHT_ARB 0x2035 #define WGL_PBUFFER_LOST_ARB 0x2036 #endif #ifndef WGL_ARB_render_texture #define WGL_BIND_TO_TEXTURE_RGB_ARB 0x2070 #define WGL_BIND_TO_TEXTURE_RGBA_ARB 0x2071 #define WGL_TEXTURE_FORMAT_ARB 0x2072 #define WGL_TEXTURE_TARGET_ARB 0x2073 #define WGL_MIPMAP_TEXTURE_ARB 0x2074 #define WGL_TEXTURE_RGB_ARB 0x2075 #define WGL_TEXTURE_RGBA_ARB 0x2076 #define WGL_NO_TEXTURE_ARB 0x2077 #define WGL_TEXTURE_CUBE_MAP_ARB 0x2078 #define WGL_TEXTURE_1D_ARB 0x2079 #define WGL_TEXTURE_2D_ARB 0x207A #define WGL_MIPMAP_LEVEL_ARB 0x207B #define WGL_CUBE_MAP_FACE_ARB 0x207C #define WGL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x207D #define WGL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x207E #define WGL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x207F #define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x2080 #define WGL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x2081 #define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x2082 #define WGL_FRONT_LEFT_ARB 0x2083 #define WGL_FRONT_RIGHT_ARB 0x2084 #define WGL_BACK_LEFT_ARB 0x2085 #define WGL_BACK_RIGHT_ARB 0x2086 #define WGL_AUX0_ARB 0x2087 #define WGL_AUX1_ARB 0x2088 #define WGL_AUX2_ARB 0x2089 #define WGL_AUX3_ARB 0x208A #define WGL_AUX4_ARB 0x208B #define WGL_AUX5_ARB 0x208C #define WGL_AUX6_ARB 0x208D #define WGL_AUX7_ARB 0x208E #define WGL_AUX8_ARB 0x208F #define WGL_AUX9_ARB 0x2090 #endif #ifndef WGL_ARB_pixel_format_float #define WGL_TYPE_RGBA_FLOAT_ARB 0x21A0 #endif #ifndef WGL_ARB_create_context #define WGL_CONTEXT_DEBUG_BIT_ARB 0x0001 #define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x0002 #define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091 #define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092 #define WGL_CONTEXT_LAYER_PLANE_ARB 0x2093 #define WGL_CONTEXT_FLAGS_ARB 0x2094 #define ERROR_INVALID_VERSION_ARB 0x2095 #endif #ifndef WGL_EXT_make_current_read #define ERROR_INVALID_PIXEL_TYPE_EXT 0x2043 #endif #ifndef WGL_EXT_pixel_format #define WGL_NUMBER_PIXEL_FORMATS_EXT 0x2000 #define WGL_DRAW_TO_WINDOW_EXT 0x2001 #define WGL_DRAW_TO_BITMAP_EXT 0x2002 #define WGL_ACCELERATION_EXT 0x2003 #define WGL_NEED_PALETTE_EXT 0x2004 #define WGL_NEED_SYSTEM_PALETTE_EXT 0x2005 #define WGL_SWAP_LAYER_BUFFERS_EXT 0x2006 #define WGL_SWAP_METHOD_EXT 0x2007 #define WGL_NUMBER_OVERLAYS_EXT 0x2008 #define WGL_NUMBER_UNDERLAYS_EXT 0x2009 #define WGL_TRANSPARENT_EXT 0x200A #define WGL_TRANSPARENT_VALUE_EXT 0x200B #define WGL_SHARE_DEPTH_EXT 0x200C #define WGL_SHARE_STENCIL_EXT 0x200D #define WGL_SHARE_ACCUM_EXT 0x200E #define WGL_SUPPORT_GDI_EXT 0x200F #define WGL_SUPPORT_OPENGL_EXT 0x2010 #define WGL_DOUBLE_BUFFER_EXT 0x2011 #define WGL_STEREO_EXT 0x2012 #define WGL_PIXEL_TYPE_EXT 0x2013 #define WGL_COLOR_BITS_EXT 0x2014 #define WGL_RED_BITS_EXT 0x2015 #define WGL_RED_SHIFT_EXT 0x2016 #define WGL_GREEN_BITS_EXT 0x2017 #define WGL_GREEN_SHIFT_EXT 0x2018 #define WGL_BLUE_BITS_EXT 0x2019 #define WGL_BLUE_SHIFT_EXT 0x201A #define WGL_ALPHA_BITS_EXT 0x201B #define WGL_ALPHA_SHIFT_EXT 0x201C #define WGL_ACCUM_BITS_EXT 0x201D #define WGL_ACCUM_RED_BITS_EXT 0x201E #define WGL_ACCUM_GREEN_BITS_EXT 0x201F #define WGL_ACCUM_BLUE_BITS_EXT 0x2020 #define WGL_ACCUM_ALPHA_BITS_EXT 0x2021 #define WGL_DEPTH_BITS_EXT 0x2022 #define WGL_STENCIL_BITS_EXT 0x2023 #define WGL_AUX_BUFFERS_EXT 0x2024 #define WGL_NO_ACCELERATION_EXT 0x2025 #define WGL_GENERIC_ACCELERATION_EXT 0x2026 #define WGL_FULL_ACCELERATION_EXT 0x2027 #define WGL_SWAP_EXCHANGE_EXT 0x2028 #define WGL_SWAP_COPY_EXT 0x2029 #define WGL_SWAP_UNDEFINED_EXT 0x202A #define WGL_TYPE_RGBA_EXT 0x202B #define WGL_TYPE_COLORINDEX_EXT 0x202C #endif #ifndef WGL_EXT_pbuffer #define WGL_DRAW_TO_PBUFFER_EXT 0x202D #define WGL_MAX_PBUFFER_PIXELS_EXT 0x202E #define WGL_MAX_PBUFFER_WIDTH_EXT 0x202F #define WGL_MAX_PBUFFER_HEIGHT_EXT 0x2030 #define WGL_OPTIMAL_PBUFFER_WIDTH_EXT 0x2031 #define WGL_OPTIMAL_PBUFFER_HEIGHT_EXT 0x2032 #define WGL_PBUFFER_LARGEST_EXT 0x2033 #define WGL_PBUFFER_WIDTH_EXT 0x2034 #define WGL_PBUFFER_HEIGHT_EXT 0x2035 #endif #ifndef WGL_EXT_depth_float #define WGL_DEPTH_FLOAT_EXT 0x2040 #endif #ifndef WGL_3DFX_multisample #define WGL_SAMPLE_BUFFERS_3DFX 0x2060 #define WGL_SAMPLES_3DFX 0x2061 #endif #ifndef WGL_EXT_multisample #define WGL_SAMPLE_BUFFERS_EXT 0x2041 #define WGL_SAMPLES_EXT 0x2042 #endif #ifndef WGL_I3D_digital_video_control #define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_FRAMEBUFFER_I3D 0x2050 #define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_VALUE_I3D 0x2051 #define WGL_DIGITAL_VIDEO_CURSOR_INCLUDED_I3D 0x2052 #define WGL_DIGITAL_VIDEO_GAMMA_CORRECTED_I3D 0x2053 #endif #ifndef WGL_I3D_gamma #define WGL_GAMMA_TABLE_SIZE_I3D 0x204E #define WGL_GAMMA_EXCLUDE_DESKTOP_I3D 0x204F #endif #ifndef WGL_I3D_genlock #define WGL_GENLOCK_SOURCE_MULTIVIEW_I3D 0x2044 #define WGL_GENLOCK_SOURCE_EXTENAL_SYNC_I3D 0x2045 #define WGL_GENLOCK_SOURCE_EXTENAL_FIELD_I3D 0x2046 #define WGL_GENLOCK_SOURCE_EXTENAL_TTL_I3D 0x2047 #define WGL_GENLOCK_SOURCE_DIGITAL_SYNC_I3D 0x2048 #define WGL_GENLOCK_SOURCE_DIGITAL_FIELD_I3D 0x2049 #define WGL_GENLOCK_SOURCE_EDGE_FALLING_I3D 0x204A #define WGL_GENLOCK_SOURCE_EDGE_RISING_I3D 0x204B #define WGL_GENLOCK_SOURCE_EDGE_BOTH_I3D 0x204C #endif #ifndef WGL_I3D_image_buffer #define WGL_IMAGE_BUFFER_MIN_ACCESS_I3D 0x00000001 #define WGL_IMAGE_BUFFER_LOCK_I3D 0x00000002 #endif #ifndef WGL_I3D_swap_frame_lock #endif #ifndef WGL_NV_render_depth_texture #define WGL_BIND_TO_TEXTURE_DEPTH_NV 0x20A3 #define WGL_BIND_TO_TEXTURE_RECTANGLE_DEPTH_NV 0x20A4 #define WGL_DEPTH_TEXTURE_FORMAT_NV 0x20A5 #define WGL_TEXTURE_DEPTH_COMPONENT_NV 0x20A6 #define WGL_DEPTH_COMPONENT_NV 0x20A7 #endif #ifndef WGL_NV_render_texture_rectangle #define WGL_BIND_TO_TEXTURE_RECTANGLE_RGB_NV 0x20A0 #define WGL_BIND_TO_TEXTURE_RECTANGLE_RGBA_NV 0x20A1 #define WGL_TEXTURE_RECTANGLE_NV 0x20A2 #endif #ifndef WGL_ATI_pixel_format_float #define WGL_TYPE_RGBA_FLOAT_ATI 0x21A0 #endif #ifndef WGL_NV_float_buffer #define WGL_FLOAT_COMPONENTS_NV 0x20B0 #define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_R_NV 0x20B1 #define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RG_NV 0x20B2 #define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGB_NV 0x20B3 #define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGBA_NV 0x20B4 #define WGL_TEXTURE_FLOAT_R_NV 0x20B5 #define WGL_TEXTURE_FLOAT_RG_NV 0x20B6 #define WGL_TEXTURE_FLOAT_RGB_NV 0x20B7 #define WGL_TEXTURE_FLOAT_RGBA_NV 0x20B8 #endif #ifndef WGL_3DL_stereo_control #define WGL_STEREO_EMITTER_ENABLE_3DL 0x2055 #define WGL_STEREO_EMITTER_DISABLE_3DL 0x2056 #define WGL_STEREO_POLARITY_NORMAL_3DL 0x2057 #define WGL_STEREO_POLARITY_INVERT_3DL 0x2058 #endif #ifndef WGL_EXT_pixel_format_packed_float #define WGL_TYPE_RGBA_UNSIGNED_FLOAT_EXT 0x20A8 #endif #ifndef WGL_EXT_framebuffer_sRGB #define WGL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20A9 #endif #ifndef WGL_NV_present_video #define WGL_NUM_VIDEO_SLOTS_NV 0x20F0 #endif #ifndef WGL_NV_video_out #define WGL_BIND_TO_VIDEO_RGB_NV 0x20C0 #define WGL_BIND_TO_VIDEO_RGBA_NV 0x20C1 #define WGL_BIND_TO_VIDEO_RGB_AND_DEPTH_NV 0x20C2 #define WGL_VIDEO_OUT_COLOR_NV 0x20C3 #define WGL_VIDEO_OUT_ALPHA_NV 0x20C4 #define WGL_VIDEO_OUT_DEPTH_NV 0x20C5 #define WGL_VIDEO_OUT_COLOR_AND_ALPHA_NV 0x20C6 #define WGL_VIDEO_OUT_COLOR_AND_DEPTH_NV 0x20C7 #define WGL_VIDEO_OUT_FRAME 0x20C8 #define WGL_VIDEO_OUT_FIELD_1 0x20C9 #define WGL_VIDEO_OUT_FIELD_2 0x20CA #define WGL_VIDEO_OUT_STACKED_FIELDS_1_2 0x20CB #define WGL_VIDEO_OUT_STACKED_FIELDS_2_1 0x20CC #endif #ifndef WGL_NV_swap_group #endif #ifndef WGL_NV_gpu_affinity #define WGL_ERROR_INCOMPATIBLE_AFFINITY_MASKS_NV 0x20D0 #define WGL_ERROR_MISSING_AFFINITY_MASK_NV 0x20D1 #endif /*************************************************************/ #ifndef WGL_ARB_pbuffer DECLARE_HANDLE(HPBUFFERARB); #endif #ifndef WGL_EXT_pbuffer DECLARE_HANDLE(HPBUFFEREXT); #endif #ifndef WGL_NV_present_video DECLARE_HANDLE(HVIDEOOUTPUTDEVICENV); #endif #ifndef WGL_NV_video_out DECLARE_HANDLE(HPVIDEODEV); #endif #ifndef WGL_NV_gpu_affinity DECLARE_HANDLE(HPGPUNV); DECLARE_HANDLE(HGPUNV); typedef struct _GPU_DEVICE { DWORD cb; CHAR DeviceName[32]; CHAR DeviceString[128]; DWORD Flags; RECT rcVirtualScreen; } GPU_DEVICE, *PGPU_DEVICE; #endif #ifndef WGL_ARB_buffer_region #define WGL_ARB_buffer_region 1 #ifdef WGL_WGLEXT_PROTOTYPES extern HANDLE WINAPI wglCreateBufferRegionARB (HDC, int, UINT); extern VOID WINAPI wglDeleteBufferRegionARB (HANDLE); extern BOOL WINAPI wglSaveBufferRegionARB (HANDLE, int, int, int, int); extern BOOL WINAPI wglRestoreBufferRegionARB (HANDLE, int, int, int, int, int, int); #endif /* WGL_WGLEXT_PROTOTYPES */ typedef HANDLE (WINAPI * PFNWGLCREATEBUFFERREGIONARBPROC) (HDC hDC, int iLayerPlane, UINT uType); typedef VOID (WINAPI * PFNWGLDELETEBUFFERREGIONARBPROC) (HANDLE hRegion); typedef BOOL (WINAPI * PFNWGLSAVEBUFFERREGIONARBPROC) (HANDLE hRegion, int x, int y, int width, int height); typedef BOOL (WINAPI * PFNWGLRESTOREBUFFERREGIONARBPROC) (HANDLE hRegion, int x, int y, int width, int height, int xSrc, int ySrc); #endif #ifndef WGL_ARB_multisample #define WGL_ARB_multisample 1 #endif #ifndef WGL_ARB_extensions_string #define WGL_ARB_extensions_string 1 #ifdef WGL_WGLEXT_PROTOTYPES extern const char * WINAPI wglGetExtensionsStringARB (HDC); #endif /* WGL_WGLEXT_PROTOTYPES */ typedef const char * (WINAPI * PFNWGLGETEXTENSIONSSTRINGARBPROC) (HDC hdc); #endif #ifndef WGL_ARB_pixel_format #define WGL_ARB_pixel_format 1 #ifdef WGL_WGLEXT_PROTOTYPES extern BOOL WINAPI wglGetPixelFormatAttribivARB (HDC, int, int, UINT, const int *, int *); extern BOOL WINAPI wglGetPixelFormatAttribfvARB (HDC, int, int, UINT, const int *, FLOAT *); extern BOOL WINAPI wglChoosePixelFormatARB (HDC, const int *, const FLOAT *, UINT, int *, UINT *); #endif /* WGL_WGLEXT_PROTOTYPES */ typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues); typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBFVARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, FLOAT *pfValues); typedef BOOL (WINAPI * PFNWGLCHOOSEPIXELFORMATARBPROC) (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats); #endif #ifndef WGL_ARB_make_current_read #define WGL_ARB_make_current_read 1 #ifdef WGL_WGLEXT_PROTOTYPES extern BOOL WINAPI wglMakeContextCurrentARB (HDC, HDC, HGLRC); extern HDC WINAPI wglGetCurrentReadDCARB (void); #endif /* WGL_WGLEXT_PROTOTYPES */ typedef BOOL (WINAPI * PFNWGLMAKECONTEXTCURRENTARBPROC) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc); typedef HDC (WINAPI * PFNWGLGETCURRENTREADDCARBPROC) (void); #endif #ifndef WGL_ARB_pbuffer #define WGL_ARB_pbuffer 1 #ifdef WGL_WGLEXT_PROTOTYPES extern HPBUFFERARB WINAPI wglCreatePbufferARB (HDC, int, int, int, const int *); extern HDC WINAPI wglGetPbufferDCARB (HPBUFFERARB); extern int WINAPI wglReleasePbufferDCARB (HPBUFFERARB, HDC); extern BOOL WINAPI wglDestroyPbufferARB (HPBUFFERARB); extern BOOL WINAPI wglQueryPbufferARB (HPBUFFERARB, int, int *); #endif /* WGL_WGLEXT_PROTOTYPES */ typedef HPBUFFERARB (WINAPI * PFNWGLCREATEPBUFFERARBPROC) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList); typedef HDC (WINAPI * PFNWGLGETPBUFFERDCARBPROC) (HPBUFFERARB hPbuffer); typedef int (WINAPI * PFNWGLRELEASEPBUFFERDCARBPROC) (HPBUFFERARB hPbuffer, HDC hDC); typedef BOOL (WINAPI * PFNWGLDESTROYPBUFFERARBPROC) (HPBUFFERARB hPbuffer); typedef BOOL (WINAPI * PFNWGLQUERYPBUFFERARBPROC) (HPBUFFERARB hPbuffer, int iAttribute, int *piValue); #endif #ifndef WGL_ARB_render_texture #define WGL_ARB_render_texture 1 #ifdef WGL_WGLEXT_PROTOTYPES extern BOOL WINAPI wglBindTexImageARB (HPBUFFERARB, int); extern BOOL WINAPI wglReleaseTexImageARB (HPBUFFERARB, int); extern BOOL WINAPI wglSetPbufferAttribARB (HPBUFFERARB, const int *); #endif /* WGL_WGLEXT_PROTOTYPES */ typedef BOOL (WINAPI * PFNWGLBINDTEXIMAGEARBPROC) (HPBUFFERARB hPbuffer, int iBuffer); typedef BOOL (WINAPI * PFNWGLRELEASETEXIMAGEARBPROC) (HPBUFFERARB hPbuffer, int iBuffer); typedef BOOL (WINAPI * PFNWGLSETPBUFFERATTRIBARBPROC) (HPBUFFERARB hPbuffer, const int *piAttribList); #endif #ifndef WGL_ARB_pixel_format_float #define WGL_ARB_pixel_format_float 1 #endif #ifndef WGL_ARB_create_context #define WGL_ARB_create_context 1 #ifdef WGL_WGLEXT_PROTOTYPES extern HGLRC WINAPI wglCreateContextAttribsARB (HDC, HGLRC, const int *); #endif /* WGL_WGLEXT_PROTOTYPES */ typedef HGLRC (WINAPI * PFNWGLCREATECONTEXTATTRIBSARBPROC) (HDC hDC, HGLRC hShareContext, const int *attribList); #endif #ifndef WGL_EXT_display_color_table #define WGL_EXT_display_color_table 1 #ifdef WGL_WGLEXT_PROTOTYPES extern GLboolean WINAPI wglCreateDisplayColorTableEXT (GLushort); extern GLboolean WINAPI wglLoadDisplayColorTableEXT (const GLushort *, GLuint); extern GLboolean WINAPI wglBindDisplayColorTableEXT (GLushort); extern VOID WINAPI wglDestroyDisplayColorTableEXT (GLushort); #endif /* WGL_WGLEXT_PROTOTYPES */ typedef GLboolean (WINAPI * PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC) (GLushort id); typedef GLboolean (WINAPI * PFNWGLLOADDISPLAYCOLORTABLEEXTPROC) (const GLushort *table, GLuint length); typedef GLboolean (WINAPI * PFNWGLBINDDISPLAYCOLORTABLEEXTPROC) (GLushort id); typedef VOID (WINAPI * PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC) (GLushort id); #endif #ifndef WGL_EXT_extensions_string #define WGL_EXT_extensions_string 1 #ifdef WGL_WGLEXT_PROTOTYPES extern const char * WINAPI wglGetExtensionsStringEXT (void); #endif /* WGL_WGLEXT_PROTOTYPES */ typedef const char * (WINAPI * PFNWGLGETEXTENSIONSSTRINGEXTPROC) (void); #endif #ifndef WGL_EXT_make_current_read #define WGL_EXT_make_current_read 1 #ifdef WGL_WGLEXT_PROTOTYPES extern BOOL WINAPI wglMakeContextCurrentEXT (HDC, HDC, HGLRC); extern HDC WINAPI wglGetCurrentReadDCEXT (void); #endif /* WGL_WGLEXT_PROTOTYPES */ typedef BOOL (WINAPI * PFNWGLMAKECONTEXTCURRENTEXTPROC) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc); typedef HDC (WINAPI * PFNWGLGETCURRENTREADDCEXTPROC) (void); #endif #ifndef WGL_EXT_pbuffer #define WGL_EXT_pbuffer 1 #ifdef WGL_WGLEXT_PROTOTYPES extern HPBUFFEREXT WINAPI wglCreatePbufferEXT (HDC, int, int, int, const int *); extern HDC WINAPI wglGetPbufferDCEXT (HPBUFFEREXT); extern int WINAPI wglReleasePbufferDCEXT (HPBUFFEREXT, HDC); extern BOOL WINAPI wglDestroyPbufferEXT (HPBUFFEREXT); extern BOOL WINAPI wglQueryPbufferEXT (HPBUFFEREXT, int, int *); #endif /* WGL_WGLEXT_PROTOTYPES */ typedef HPBUFFEREXT (WINAPI * PFNWGLCREATEPBUFFEREXTPROC) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList); typedef HDC (WINAPI * PFNWGLGETPBUFFERDCEXTPROC) (HPBUFFEREXT hPbuffer); typedef int (WINAPI * PFNWGLRELEASEPBUFFERDCEXTPROC) (HPBUFFEREXT hPbuffer, HDC hDC); typedef BOOL (WINAPI * PFNWGLDESTROYPBUFFEREXTPROC) (HPBUFFEREXT hPbuffer); typedef BOOL (WINAPI * PFNWGLQUERYPBUFFEREXTPROC) (HPBUFFEREXT hPbuffer, int iAttribute, int *piValue); #endif #ifndef WGL_EXT_pixel_format #define WGL_EXT_pixel_format 1 #ifdef WGL_WGLEXT_PROTOTYPES extern BOOL WINAPI wglGetPixelFormatAttribivEXT (HDC, int, int, UINT, int *, int *); extern BOOL WINAPI wglGetPixelFormatAttribfvEXT (HDC, int, int, UINT, int *, FLOAT *); extern BOOL WINAPI wglChoosePixelFormatEXT (HDC, const int *, const FLOAT *, UINT, int *, UINT *); #endif /* WGL_WGLEXT_PROTOTYPES */ typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVEXTPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, int *piValues); typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBFVEXTPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, FLOAT *pfValues); typedef BOOL (WINAPI * PFNWGLCHOOSEPIXELFORMATEXTPROC) (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats); #endif #ifndef WGL_EXT_swap_control #define WGL_EXT_swap_control 1 #ifdef WGL_WGLEXT_PROTOTYPES extern BOOL WINAPI wglSwapIntervalEXT (int); extern int WINAPI wglGetSwapIntervalEXT (void); #endif /* WGL_WGLEXT_PROTOTYPES */ typedef BOOL (WINAPI * PFNWGLSWAPINTERVALEXTPROC) (int interval); typedef int (WINAPI * PFNWGLGETSWAPINTERVALEXTPROC) (void); #endif #ifndef WGL_EXT_depth_float #define WGL_EXT_depth_float 1 #endif #ifndef WGL_NV_vertex_array_range #define WGL_NV_vertex_array_range 1 #ifdef WGL_WGLEXT_PROTOTYPES extern void* WINAPI wglAllocateMemoryNV (GLsizei, GLfloat, GLfloat, GLfloat); extern void WINAPI wglFreeMemoryNV (void *); #endif /* WGL_WGLEXT_PROTOTYPES */ typedef void* (WINAPI * PFNWGLALLOCATEMEMORYNVPROC) (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority); typedef void (WINAPI * PFNWGLFREEMEMORYNVPROC) (void *pointer); #endif #ifndef WGL_3DFX_multisample #define WGL_3DFX_multisample 1 #endif #ifndef WGL_EXT_multisample #define WGL_EXT_multisample 1 #endif #ifndef WGL_OML_sync_control #define WGL_OML_sync_control 1 #ifdef WGL_WGLEXT_PROTOTYPES extern BOOL WINAPI wglGetSyncValuesOML (HDC, INT64 *, INT64 *, INT64 *); extern BOOL WINAPI wglGetMscRateOML (HDC, INT32 *, INT32 *); extern INT64 WINAPI wglSwapBuffersMscOML (HDC, INT64, INT64, INT64); extern INT64 WINAPI wglSwapLayerBuffersMscOML (HDC, int, INT64, INT64, INT64); extern BOOL WINAPI wglWaitForMscOML (HDC, INT64, INT64, INT64, INT64 *, INT64 *, INT64 *); extern BOOL WINAPI wglWaitForSbcOML (HDC, INT64, INT64 *, INT64 *, INT64 *); #endif /* WGL_WGLEXT_PROTOTYPES */ typedef BOOL (WINAPI * PFNWGLGETSYNCVALUESOMLPROC) (HDC hdc, INT64 *ust, INT64 *msc, INT64 *sbc); typedef BOOL (WINAPI * PFNWGLGETMSCRATEOMLPROC) (HDC hdc, INT32 *numerator, INT32 *denominator); typedef INT64 (WINAPI * PFNWGLSWAPBUFFERSMSCOMLPROC) (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder); typedef INT64 (WINAPI * PFNWGLSWAPLAYERBUFFERSMSCOMLPROC) (HDC hdc, int fuPlanes, INT64 target_msc, INT64 divisor, INT64 remainder); typedef BOOL (WINAPI * PFNWGLWAITFORMSCOMLPROC) (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder, INT64 *ust, INT64 *msc, INT64 *sbc); typedef BOOL (WINAPI * PFNWGLWAITFORSBCOMLPROC) (HDC hdc, INT64 target_sbc, INT64 *ust, INT64 *msc, INT64 *sbc); #endif #ifndef WGL_I3D_digital_video_control #define WGL_I3D_digital_video_control 1 #ifdef WGL_WGLEXT_PROTOTYPES extern BOOL WINAPI wglGetDigitalVideoParametersI3D (HDC, int, int *); extern BOOL WINAPI wglSetDigitalVideoParametersI3D (HDC, int, const int *); #endif /* WGL_WGLEXT_PROTOTYPES */ typedef BOOL (WINAPI * PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC) (HDC hDC, int iAttribute, int *piValue); typedef BOOL (WINAPI * PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC) (HDC hDC, int iAttribute, const int *piValue); #endif #ifndef WGL_I3D_gamma #define WGL_I3D_gamma 1 #ifdef WGL_WGLEXT_PROTOTYPES extern BOOL WINAPI wglGetGammaTableParametersI3D (HDC, int, int *); extern BOOL WINAPI wglSetGammaTableParametersI3D (HDC, int, const int *); extern BOOL WINAPI wglGetGammaTableI3D (HDC, int, USHORT *, USHORT *, USHORT *); extern BOOL WINAPI wglSetGammaTableI3D (HDC, int, const USHORT *, const USHORT *, const USHORT *); #endif /* WGL_WGLEXT_PROTOTYPES */ typedef BOOL (WINAPI * PFNWGLGETGAMMATABLEPARAMETERSI3DPROC) (HDC hDC, int iAttribute, int *piValue); typedef BOOL (WINAPI * PFNWGLSETGAMMATABLEPARAMETERSI3DPROC) (HDC hDC, int iAttribute, const int *piValue); typedef BOOL (WINAPI * PFNWGLGETGAMMATABLEI3DPROC) (HDC hDC, int iEntries, USHORT *puRed, USHORT *puGreen, USHORT *puBlue); typedef BOOL (WINAPI * PFNWGLSETGAMMATABLEI3DPROC) (HDC hDC, int iEntries, const USHORT *puRed, const USHORT *puGreen, const USHORT *puBlue); #endif #ifndef WGL_I3D_genlock #define WGL_I3D_genlock 1 #ifdef WGL_WGLEXT_PROTOTYPES extern BOOL WINAPI wglEnableGenlockI3D (HDC); extern BOOL WINAPI wglDisableGenlockI3D (HDC); extern BOOL WINAPI wglIsEnabledGenlockI3D (HDC, BOOL *); extern BOOL WINAPI wglGenlockSourceI3D (HDC, UINT); extern BOOL WINAPI wglGetGenlockSourceI3D (HDC, UINT *); extern BOOL WINAPI wglGenlockSourceEdgeI3D (HDC, UINT); extern BOOL WINAPI wglGetGenlockSourceEdgeI3D (HDC, UINT *); extern BOOL WINAPI wglGenlockSampleRateI3D (HDC, UINT); extern BOOL WINAPI wglGetGenlockSampleRateI3D (HDC, UINT *); extern BOOL WINAPI wglGenlockSourceDelayI3D (HDC, UINT); extern BOOL WINAPI wglGetGenlockSourceDelayI3D (HDC, UINT *); extern BOOL WINAPI wglQueryGenlockMaxSourceDelayI3D (HDC, UINT *, UINT *); #endif /* WGL_WGLEXT_PROTOTYPES */ typedef BOOL (WINAPI * PFNWGLENABLEGENLOCKI3DPROC) (HDC hDC); typedef BOOL (WINAPI * PFNWGLDISABLEGENLOCKI3DPROC) (HDC hDC); typedef BOOL (WINAPI * PFNWGLISENABLEDGENLOCKI3DPROC) (HDC hDC, BOOL *pFlag); typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEI3DPROC) (HDC hDC, UINT uSource); typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEI3DPROC) (HDC hDC, UINT *uSource); typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEEDGEI3DPROC) (HDC hDC, UINT uEdge); typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEEDGEI3DPROC) (HDC hDC, UINT *uEdge); typedef BOOL (WINAPI * PFNWGLGENLOCKSAMPLERATEI3DPROC) (HDC hDC, UINT uRate); typedef BOOL (WINAPI * PFNWGLGETGENLOCKSAMPLERATEI3DPROC) (HDC hDC, UINT *uRate); typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEDELAYI3DPROC) (HDC hDC, UINT uDelay); typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEDELAYI3DPROC) (HDC hDC, UINT *uDelay); typedef BOOL (WINAPI * PFNWGLQUERYGENLOCKMAXSOURCEDELAYI3DPROC) (HDC hDC, UINT *uMaxLineDelay, UINT *uMaxPixelDelay); #endif #ifndef WGL_I3D_image_buffer #define WGL_I3D_image_buffer 1 #ifdef WGL_WGLEXT_PROTOTYPES extern LPVOID WINAPI wglCreateImageBufferI3D (HDC, DWORD, UINT); extern BOOL WINAPI wglDestroyImageBufferI3D (HDC, LPVOID); extern BOOL WINAPI wglAssociateImageBufferEventsI3D (HDC, const HANDLE *, const LPVOID *, const DWORD *, UINT); extern BOOL WINAPI wglReleaseImageBufferEventsI3D (HDC, const LPVOID *, UINT); #endif /* WGL_WGLEXT_PROTOTYPES */ typedef LPVOID (WINAPI * PFNWGLCREATEIMAGEBUFFERI3DPROC) (HDC hDC, DWORD dwSize, UINT uFlags); typedef BOOL (WINAPI * PFNWGLDESTROYIMAGEBUFFERI3DPROC) (HDC hDC, LPVOID pAddress); typedef BOOL (WINAPI * PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC) (HDC hDC, const HANDLE *pEvent, const LPVOID *pAddress, const DWORD *pSize, UINT count); typedef BOOL (WINAPI * PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC) (HDC hDC, const LPVOID *pAddress, UINT count); #endif #ifndef WGL_I3D_swap_frame_lock #define WGL_I3D_swap_frame_lock 1 #ifdef WGL_WGLEXT_PROTOTYPES extern BOOL WINAPI wglEnableFrameLockI3D (void); extern BOOL WINAPI wglDisableFrameLockI3D (void); extern BOOL WINAPI wglIsEnabledFrameLockI3D (BOOL *); extern BOOL WINAPI wglQueryFrameLockMasterI3D (BOOL *); #endif /* WGL_WGLEXT_PROTOTYPES */ typedef BOOL (WINAPI * PFNWGLENABLEFRAMELOCKI3DPROC) (void); typedef BOOL (WINAPI * PFNWGLDISABLEFRAMELOCKI3DPROC) (void); typedef BOOL (WINAPI * PFNWGLISENABLEDFRAMELOCKI3DPROC) (BOOL *pFlag); typedef BOOL (WINAPI * PFNWGLQUERYFRAMELOCKMASTERI3DPROC) (BOOL *pFlag); #endif #ifndef WGL_I3D_swap_frame_usage #define WGL_I3D_swap_frame_usage 1 #ifdef WGL_WGLEXT_PROTOTYPES extern BOOL WINAPI wglGetFrameUsageI3D (float *); extern BOOL WINAPI wglBeginFrameTrackingI3D (void); extern BOOL WINAPI wglEndFrameTrackingI3D (void); extern BOOL WINAPI wglQueryFrameTrackingI3D (DWORD *, DWORD *, float *); #endif /* WGL_WGLEXT_PROTOTYPES */ typedef BOOL (WINAPI * PFNWGLGETFRAMEUSAGEI3DPROC) (float *pUsage); typedef BOOL (WINAPI * PFNWGLBEGINFRAMETRACKINGI3DPROC) (void); typedef BOOL (WINAPI * PFNWGLENDFRAMETRACKINGI3DPROC) (void); typedef BOOL (WINAPI * PFNWGLQUERYFRAMETRACKINGI3DPROC) (DWORD *pFrameCount, DWORD *pMissedFrames, float *pLastMissedUsage); #endif #ifndef WGL_ATI_pixel_format_float #define WGL_ATI_pixel_format_float 1 #endif #ifndef WGL_NV_float_buffer #define WGL_NV_float_buffer 1 #endif #ifndef WGL_EXT_pixel_format_packed_float #define WGL_EXT_pixel_format_packed_float 1 #endif #ifndef WGL_EXT_framebuffer_sRGB #define WGL_EXT_framebuffer_sRGB 1 #endif #ifndef WGL_NV_present_video #define WGL_NV_present_video 1 #ifdef WGL_WGLEXT_PROTOTYPES extern int WINAPI wglEnumerateVideoDevicesNV (HDC, HVIDEOOUTPUTDEVICENV *); extern BOOL WINAPI wglBindVideoDeviceNV (HDC, unsigned int, HVIDEOOUTPUTDEVICENV, const int *); extern BOOL WINAPI wglQueryCurrentContextNV (int, int *); #endif /* WGL_WGLEXT_PROTOTYPES */ typedef int (WINAPI * PFNWGLENUMERATEVIDEODEVICESNVPROC) (HDC hDC, HVIDEOOUTPUTDEVICENV *phDeviceList); typedef BOOL (WINAPI * PFNWGLBINDVIDEODEVICENVPROC) (HDC hDC, unsigned int uVideoSlot, HVIDEOOUTPUTDEVICENV hVideoDevice, const int *piAttribList); typedef BOOL (WINAPI * PFNWGLQUERYCURRENTCONTEXTNVPROC) (int iAttribute, int *piValue); #endif #ifndef WGL_NV_video_out #define WGL_NV_video_out 1 #ifdef WGL_WGLEXT_PROTOTYPES extern BOOL WINAPI wglGetVideoDeviceNV (HDC, int, HPVIDEODEV *); extern BOOL WINAPI wglReleaseVideoDeviceNV (HPVIDEODEV); extern BOOL WINAPI wglBindVideoImageNV (HPVIDEODEV, HPBUFFERARB, int); extern BOOL WINAPI wglReleaseVideoImageNV (HPBUFFERARB, int); extern BOOL WINAPI wglSendPbufferToVideoNV (HPBUFFERARB, int, unsigned long *, BOOL); extern BOOL WINAPI wglGetVideoInfoNV (HPVIDEODEV, unsigned long *, unsigned long *); #endif /* WGL_WGLEXT_PROTOTYPES */ typedef BOOL (WINAPI * PFNWGLGETVIDEODEVICENVPROC) (HDC hDC, int numDevices, HPVIDEODEV *hVideoDevice); typedef BOOL (WINAPI * PFNWGLRELEASEVIDEODEVICENVPROC) (HPVIDEODEV hVideoDevice); typedef BOOL (WINAPI * PFNWGLBINDVIDEOIMAGENVPROC) (HPVIDEODEV hVideoDevice, HPBUFFERARB hPbuffer, int iVideoBuffer); typedef BOOL (WINAPI * PFNWGLRELEASEVIDEOIMAGENVPROC) (HPBUFFERARB hPbuffer, int iVideoBuffer); typedef BOOL (WINAPI * PFNWGLSENDPBUFFERTOVIDEONVPROC) (HPBUFFERARB hPbuffer, int iBufferType, unsigned long *pulCounterPbuffer, BOOL bBlock); typedef BOOL (WINAPI * PFNWGLGETVIDEOINFONVPROC) (HPVIDEODEV hpVideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo); #endif #ifndef WGL_NV_swap_group #define WGL_NV_swap_group 1 #ifdef WGL_WGLEXT_PROTOTYPES extern BOOL WINAPI wglJoinSwapGroupNV (HDC, GLuint); extern BOOL WINAPI wglBindSwapBarrierNV (GLuint, GLuint); extern BOOL WINAPI wglQuerySwapGroupNV (HDC, GLuint *, GLuint *); extern BOOL WINAPI wglQueryMaxSwapGroupsNV (HDC, GLuint *, GLuint *); extern BOOL WINAPI wglQueryFrameCountNV (HDC, GLuint *); extern BOOL WINAPI wglResetFrameCountNV (HDC); #endif /* WGL_WGLEXT_PROTOTYPES */ typedef BOOL (WINAPI * PFNWGLJOINSWAPGROUPNVPROC) (HDC hDC, GLuint group); typedef BOOL (WINAPI * PFNWGLBINDSWAPBARRIERNVPROC) (GLuint group, GLuint barrier); typedef BOOL (WINAPI * PFNWGLQUERYSWAPGROUPNVPROC) (HDC hDC, GLuint *group, GLuint *barrier); typedef BOOL (WINAPI * PFNWGLQUERYMAXSWAPGROUPSNVPROC) (HDC hDC, GLuint *maxGroups, GLuint *maxBarriers); typedef BOOL (WINAPI * PFNWGLQUERYFRAMECOUNTNVPROC) (HDC hDC, GLuint *count); typedef BOOL (WINAPI * PFNWGLRESETFRAMECOUNTNVPROC) (HDC hDC); #endif #ifndef WGL_NV_gpu_affinity #define WGL_NV_gpu_affinity 1 #ifdef WGL_WGLEXT_PROTOTYPES extern BOOL WINAPI wglEnumGpusNV (UINT, HGPUNV *); extern BOOL WINAPI wglEnumGpuDevicesNV (HGPUNV, UINT, PGPU_DEVICE); extern HDC WINAPI wglCreateAffinityDCNV (const HGPUNV *); extern BOOL WINAPI wglEnumGpusFromAffinityDCNV (HDC, UINT, HGPUNV *); extern BOOL WINAPI wglDeleteDCNV (HDC); #endif /* WGL_WGLEXT_PROTOTYPES */ typedef BOOL (WINAPI * PFNWGLENUMGPUSNVPROC) (UINT iGpuIndex, HGPUNV *phGpu); typedef BOOL (WINAPI * PFNWGLENUMGPUDEVICESNVPROC) (HGPUNV hGpu, UINT iDeviceIndex, PGPU_DEVICE lpGpuDevice); typedef HDC (WINAPI * PFNWGLCREATEAFFINITYDCNVPROC) (const HGPUNV *phGpuList); typedef BOOL (WINAPI * PFNWGLENUMGPUSFROMAFFINITYDCNVPROC) (HDC hAffinityDC, UINT iGpuIndex, HGPUNV *hGpu); typedef BOOL (WINAPI * PFNWGLDELETEDCNVPROC) (HDC hdc); #endif #ifdef __cplusplus } #endif #endif netgen-6.2.1804/ng/Togl2.1/image.c0000644000175000017500000001420413272137567014766 0ustar kurtkurt/* * SGI rgb file reader borrowed from gltk library */ #include "togl.h" /* added by GG to include windows.h */ #include #include #include #include "image.h" #ifndef SEEK_SET # define SEEK_SET 0 #endif static void tkQuit(void) { exit(0); } /******************************************************************************/ typedef struct _rawImageRec { unsigned short imagic; unsigned short type; unsigned short dim; unsigned short sizeX, sizeY, sizeZ; unsigned long min, max; unsigned long wasteBytes; char name[80]; unsigned long colorMap; FILE *file; unsigned char *tmp, *tmpR, *tmpG, *tmpB, *tmpA; unsigned long rleEnd; GLuint *rowStart; GLint *rowSize; } rawImageRec; /******************************************************************************/ static void ConvertShort(unsigned short *array, long length) { unsigned long b1, b2; unsigned char *ptr; ptr = (unsigned char *) array; while (length--) { b1 = *ptr++; b2 = *ptr++; *array++ = (unsigned short) ((b1 << 8) | b2); } } static void ConvertLong(GLuint *array, long length) { unsigned long b1, b2, b3, b4; unsigned char *ptr; ptr = (unsigned char *) array; while (length--) { b1 = *ptr++; b2 = *ptr++; b3 = *ptr++; b4 = *ptr++; *array++ = (b1 << 24) | (b2 << 16) | (b3 << 8) | (b4); } } static rawImageRec * RawImageOpen(const char *fileName) { union { int testWord; char testByte[4]; } endianTest; rawImageRec *raw; GLenum swapFlag; int x; endianTest.testWord = 1; if (endianTest.testByte[0] == 1) { swapFlag = GL_TRUE; } else { swapFlag = GL_FALSE; } raw = (rawImageRec *) malloc(sizeof (rawImageRec)); if (raw == NULL) { fprintf(stderr, "Out of memory!\n"); tkQuit(); } if ((raw->file = fopen(fileName, "rb")) == NULL) { perror(fileName); tkQuit(); } fread(raw, 1, 12, raw->file); if (swapFlag) { ConvertShort(&raw->imagic, 6); } raw->tmp = (unsigned char *) malloc(raw->sizeX * 256); raw->tmpR = (unsigned char *) malloc(raw->sizeX * 256); raw->tmpG = (unsigned char *) malloc(raw->sizeX * 256); raw->tmpB = (unsigned char *) malloc(raw->sizeX * 256); raw->tmpA = (unsigned char *) malloc(raw->sizeX * 256); if (raw->tmp == NULL || raw->tmpR == NULL || raw->tmpG == NULL || raw->tmpB == NULL || raw->tmpA == NULL) { fprintf(stderr, "Out of memory!\n"); tkQuit(); } if ((raw->type & 0xFF00) == 0x0100) { x = raw->sizeY * raw->sizeZ * sizeof (GLuint); raw->rowStart = (GLuint *) malloc(x); raw->rowSize = (GLint *) malloc(x); if (raw->rowStart == NULL || raw->rowSize == NULL) { fprintf(stderr, "Out of memory!\n"); tkQuit(); } raw->rleEnd = 512 + (2 * x); fseek(raw->file, 512, SEEK_SET); fread(raw->rowStart, 1, x, raw->file); fread(raw->rowSize, 1, x, raw->file); if (swapFlag) { ConvertLong(raw->rowStart, x / sizeof (GLuint)); ConvertLong((GLuint *) raw->rowSize, x / sizeof (GLint)); } } return raw; } static void RawImageClose(rawImageRec * raw) { fclose(raw->file); free(raw->tmp); free(raw->tmpR); free(raw->tmpG); free(raw->tmpB); free(raw->tmpA); free(raw); } static void RawImageGetRow(rawImageRec * raw, unsigned char *buf, int y, int z) { unsigned char *iPtr, *oPtr, pixel; int count; if ((raw->type & 0xFF00) == 0x0100) { fseek(raw->file, raw->rowStart[y + z * raw->sizeY], SEEK_SET); fread(raw->tmp, 1, (unsigned int) raw->rowSize[y + z * raw->sizeY], raw->file); iPtr = raw->tmp; oPtr = buf; while (1) { pixel = *iPtr++; count = (int) (pixel & 0x7F); if (!count) { return; } if (pixel & 0x80) { while (count--) { *oPtr++ = *iPtr++; } } else { pixel = *iPtr++; while (count--) { *oPtr++ = pixel; } } } } else { fseek(raw->file, 512 + (y * raw->sizeX) + (z * raw->sizeX * raw->sizeY), SEEK_SET); fread(buf, 1, raw->sizeX, raw->file); } } static void RawImageGetData(rawImageRec * raw, TK_RGBImageRec * final) { unsigned char *ptr; int i, j; final->data = (unsigned char *) malloc((raw->sizeX + 1) * (raw->sizeY + 1) * 4); if (final->data == NULL) { fprintf(stderr, "Out of memory!\n"); tkQuit(); } ptr = final->data; for (i = 0; i < (int) (raw->sizeY); i++) { RawImageGetRow(raw, raw->tmpR, i, 0); RawImageGetRow(raw, raw->tmpG, i, 1); RawImageGetRow(raw, raw->tmpB, i, 2); if (raw->sizeZ == 4) { /* 4 components */ RawImageGetRow(raw, raw->tmpA, i, 3); for (j = 0; j < (int) (raw->sizeX); j++) { *ptr++ = *(raw->tmpR + j); *ptr++ = *(raw->tmpG + j); *ptr++ = *(raw->tmpB + j); *ptr++ = *(raw->tmpA + j); } } else { /* 3 components */ for (j = 0; j < (int) (raw->sizeX); j++) { *ptr++ = *(raw->tmpR + j); *ptr++ = *(raw->tmpG + j); *ptr++ = *(raw->tmpB + j); } } } } TK_RGBImageRec * tkRGBImageLoad(const char *fileName) { rawImageRec *raw; TK_RGBImageRec *final; raw = RawImageOpen(fileName); final = (TK_RGBImageRec *) malloc(sizeof (TK_RGBImageRec)); if (final == NULL) { fprintf(stderr, "Out of memory!\n"); tkQuit(); } final->sizeX = raw->sizeX; final->sizeY = raw->sizeY; final->sizeZ = raw->sizeZ; RawImageGetData(raw, final); RawImageClose(raw); return final; } /******************************************************************************/ netgen-6.2.1804/ng/Togl2.1/texture.tcl0000644000175000017500000002325213272137567015747 0ustar kurtkurt#!/bin/sh # the next line restarts using tclsh \ exec tclsh "$0" "$@" # $Id: texture.tcl,v 1.8 2007/08/03 16:48:50 gregcouch Exp $ # Togl - a Tk OpenGL widget # Copyright (C) 1996 Brian Paul and Ben Bederson # Copyright (C) 2006-2007 Greg Couch # See the LICENSE file for copyright details. # Togl texture map demo package provide texture 1.0 # add parent directory to path to find Togl's pkgIndex in current directory if { [file exists pkgIndex.tcl] } { set auto_path [linsert $auto_path 0 ..] } # following load also loads Tk and Togl packages load [file dirname [info script]]/texture[info sharedlibextension] # create ::texture namespace namespace eval ::texture { } # Called magnification filter changes proc ::texture::new_magfilter {} { global magfilter mag_filter .f1.view $magfilter } # Called minification filter changes proc ::texture::new_minfilter {} { global minfilter min_filter .f1.view $minfilter } # Called when texture image radio button changes proc ::texture::new_image {} { global image teximage .f1.view $image } # Called when texture S wrap button changes proc ::texture::new_swrap {} { global swrap swrap .f1.view $swrap } # Called when texture T wrap button changes proc ::texture::new_twrap {} { global twrap twrap .f1.view $twrap } # Called when texture environment radio button selected proc ::texture::new_env {} { global envmode envmode .f1.view $envmode } # Called when polygon color sliders change proc ::texture::new_color { foo } { global poly_red poly_green poly_blue polycolor .f1.view $poly_red $poly_green $poly_blue } proc ::texture::new_coord_scale { name element op } { global coord_scale coord_scale .f1.view $coord_scale } proc ::texture::take_photo {} { image create photo teximg .f1.view takephoto teximg teximg write image.ppm -format ppm } # Make the widgets proc ::texture::setup {} { global magfilter global minfilter global image global swrap global twrap global envmode global poly_red global poly_green global poly_blue global coord_scale global startx starty # location of mouse when button pressed global xangle yangle global xangle0 yangle0 global texscale texscale0 wm title . "Texture Map Options" ### Two frames: top half and bottom half frame .f1 frame .f2 ### The OpenGL window togl .f1.view -width 250 -height 250 -rgba true -double true -depth true -create create_cb -reshape reshape_cb -display display_cb ### Filter radio buttons frame .f1.filter -relief ridge -borderwidth 3 frame .f1.filter.mag -relief ridge -borderwidth 2 label .f1.filter.mag.label -text "Magnification Filter" -anchor w radiobutton .f1.filter.mag.nearest -text GL_NEAREST -anchor w -variable magfilter -value GL_NEAREST -command ::texture::new_magfilter radiobutton .f1.filter.mag.linear -text GL_LINEAR -anchor w -variable magfilter -value GL_LINEAR -command ::texture::new_magfilter frame .f1.filter.min -relief ridge -borderwidth 2 label .f1.filter.min.label -text "Minification Filter" -anchor w radiobutton .f1.filter.min.nearest -text GL_NEAREST -anchor w -variable minfilter -value GL_NEAREST -command ::texture::new_minfilter radiobutton .f1.filter.min.linear -text GL_LINEAR -anchor w -variable minfilter -value GL_LINEAR -command ::texture::new_minfilter radiobutton .f1.filter.min.nearest_mipmap_nearest -text GL_NEAREST_MIPMAP_NEAREST -anchor w -variable minfilter -value GL_NEAREST_MIPMAP_NEAREST -command ::texture::new_minfilter radiobutton .f1.filter.min.linear_mipmap_nearest -text GL_LINEAR_MIPMAP_NEAREST -anchor w -variable minfilter -value GL_LINEAR_MIPMAP_NEAREST -command ::texture::new_minfilter radiobutton .f1.filter.min.nearest_mipmap_linear -text GL_NEAREST_MIPMAP_LINEAR -anchor w -variable minfilter -value GL_NEAREST_MIPMAP_LINEAR -command ::texture::new_minfilter radiobutton .f1.filter.min.linear_mipmap_linear -text GL_LINEAR_MIPMAP_LINEAR -anchor w -variable minfilter -value GL_LINEAR_MIPMAP_LINEAR -command ::texture::new_minfilter pack .f1.filter.mag -fill x pack .f1.filter.mag.label -fill x pack .f1.filter.mag.nearest -side top -fill x pack .f1.filter.mag.linear -side top -fill x pack .f1.filter.min -fill both -expand true pack .f1.filter.min.label -side top -fill x pack .f1.filter.min.nearest -side top -fill x pack .f1.filter.min.linear -side top -fill x pack .f1.filter.min.nearest_mipmap_nearest -side top -fill x pack .f1.filter.min.linear_mipmap_nearest -side top -fill x pack .f1.filter.min.nearest_mipmap_linear -side top -fill x pack .f1.filter.min.linear_mipmap_linear -side top -fill x ### Texture coordinate scale and wrapping frame .f2.coord -relief ridge -borderwidth 3 frame .f2.coord.scale -relief ridge -borderwidth 2 label .f2.coord.scale.label -text "Max Texture Coord" -anchor w entry .f2.coord.scale.entry -textvariable coord_scale trace variable coord_scale w ::texture::new_coord_scale frame .f2.coord.s -relief ridge -borderwidth 2 label .f2.coord.s.label -text "GL_TEXTURE_WRAP_S" -anchor w radiobutton .f2.coord.s.repeat -text "GL_REPEAT" -anchor w -variable swrap -value GL_REPEAT -command ::texture::new_swrap radiobutton .f2.coord.s.clamp -text "GL_CLAMP" -anchor w -variable swrap -value GL_CLAMP -command ::texture::new_swrap frame .f2.coord.t -relief ridge -borderwidth 2 label .f2.coord.t.label -text "GL_TEXTURE_WRAP_T" -anchor w radiobutton .f2.coord.t.repeat -text "GL_REPEAT" -anchor w -variable twrap -value GL_REPEAT -command ::texture::new_twrap radiobutton .f2.coord.t.clamp -text "GL_CLAMP" -anchor w -variable twrap -value GL_CLAMP -command ::texture::new_twrap pack .f2.coord.scale -fill both -expand true pack .f2.coord.scale.label -side top -fill x pack .f2.coord.scale.entry -side top -fill x pack .f2.coord.s -fill x pack .f2.coord.s.label -side top -fill x pack .f2.coord.s.repeat -side top -fill x pack .f2.coord.s.clamp -side top -fill x pack .f2.coord.t -fill x pack .f2.coord.t.label -side top -fill x pack .f2.coord.t.repeat -side top -fill x pack .f2.coord.t.clamp -side top -fill x ### Texture image radio buttons (just happens to fit into the coord frame) frame .f2.env -relief ridge -borderwidth 3 frame .f2.env.image -relief ridge -borderwidth 2 label .f2.env.image.label -text "Texture Image" -anchor w radiobutton .f2.env.image.checker -text "Checker" -anchor w -variable image -value CHECKER -command ::texture::new_image radiobutton .f2.env.image.tree -text "Tree" -anchor w -variable image -value TREE -command ::texture::new_image radiobutton .f2.env.image.face -text "Face" -anchor w -variable image -value FACE -command ::texture::new_image pack .f2.env.image -fill x pack .f2.env.image.label -side top -fill x pack .f2.env.image.checker -side top -fill x pack .f2.env.image.tree -side top -fill x pack .f2.env.image.face -side top -fill x ### Texture Environment label .f2.env.label -text "GL_TEXTURE_ENV_MODE" -anchor w radiobutton .f2.env.modulate -text "GL_MODULATE" -anchor w -variable envmode -value GL_MODULATE -command ::texture::new_env radiobutton .f2.env.decal -text "GL_DECAL" -anchor w -variable envmode -value GL_DECAL -command ::texture::new_env radiobutton .f2.env.blend -text "GL_BLEND" -anchor w -variable envmode -value GL_BLEND -command ::texture::new_env pack .f2.env.label -fill x pack .f2.env.modulate -side top -fill x pack .f2.env.decal -side top -fill x pack .f2.env.blend -side top -fill x ### Polygon color frame .f2.color -relief ridge -borderwidth 3 label .f2.color.label -text "Polygon color" -anchor w scale .f2.color.red -label Red -from 0 -to 255 -orient horizontal -variable poly_red -command ::texture::new_color scale .f2.color.green -label Green -from 0 -to 255 -orient horizontal -variable poly_green -command ::texture::new_color scale .f2.color.blue -label Blue -from 0 -to 255 -orient horizontal -variable poly_blue -command ::texture::new_color pack .f2.color.label -fill x pack .f2.color.red -side top -fill x pack .f2.color.green -side top -fill x pack .f2.color.blue -side top -fill x ### Main widgets pack .f1.view -side left -fill both -expand true pack .f1.filter -side left -fill y pack .f1 -side top -fill both -expand true pack .f2.coord .f2.env -side left -fill both pack .f2.color -fill x pack .f2 -side top -fill x button .photo -text "Take Photo" -command ::texture::take_photo pack .photo -expand true -fill both button .quit -text Quit -command exit pack .quit -expand true -fill both bind .f1.view { set startx %x set starty %y set xangle0 $xangle set yangle0 $yangle } bind .f1.view { set xangle [expr $xangle0 + (%x - $startx) / 3.0 ] set yangle [expr $yangle0 + (%y - $starty) / 3.0 ] yrot .f1.view $xangle xrot .f1.view $yangle } bind .f1.view { set startx %x set starty %y set texscale0 $texscale } bind .f1.view { set q [ expr ($starty - %y) / 400.0 ] set texscale [expr $texscale0 * exp($q)] texscale .f1.view $texscale } # set default values: set minfilter GL_NEAREST_MIPMAP_LINEAR set magfilter GL_LINEAR set swrap GL_REPEAT set twrap GL_REPEAT set envmode GL_MODULATE set image CHECKER set poly_red 255 set poly_green 255 set poly_blue 255 set coord_scale 1.0 set xangle 0.0 set yangle 0.0 set texscale 1.0 } # Execution starts here! if { [info script] == $argv0 } { ::texture::setup } netgen-6.2.1804/ng/Togl2.1/index.c0000644000175000017500000001252513272137567015017 0ustar kurtkurt/* $Id: index.c,v 1.13 2007/08/03 16:48:50 gregcouch Exp $ */ /* * Togl - a Tk OpenGL widget * Copyright (C) 1996-1997 Brian Paul and Ben Bederson * Copyright (C) 2006-2007 Greg Couch * See the LICENSE file for copyright details. */ /* * An example Togl program using color-index mode. */ #define USE_TOGL_STUBS #include "togl.h" #include #include #undef TCL_STORAGE_CLASS #define TCL_STORAGE_CLASS DLLEXPORT /* Our color indexes: */ static unsigned long black, red, green, blue; /* Rotation angle */ static float Angle = 0; /* * Togl widget create callback. This is called by Tcl/Tk when the widget has * been realized. Here's where one may do some one-time context setup or * initializations. */ static int create_cb(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { Togl *togl; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "pathName"); return TCL_ERROR; } if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { return TCL_ERROR; } /* allocate color indexes */ black = Togl_AllocColor(togl, 0, 0, 0); red = Togl_AllocColor(togl, 1, 0, 0); green = Togl_AllocColor(togl, 0, 1, 0); blue = Togl_AllocColor(togl, 0, 0, 1); /* If we were using a private read/write colormap we'd setup our color * table with something like this: */ /* * black = 1; Togl_SetColor( togl, black, 0, 0, 0 ); red = 2; * Togl_SetColor( togl, red, 1, 0, 0 ); green = 3; Togl_SetColor( * togl, green, 0, 1, 0 ); blue = 4; Togl_SetColor( togl, blue, 0, * 0, 1 ); */ glShadeModel(GL_FLAT); glDisable(GL_DITHER); return TCL_OK; } /* * Togl widget reshape callback. This is called by Tcl/Tk when the widget * has been resized. Typically, we call glViewport and perhaps setup the * projection matrix. */ static int reshape_cb(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { int width; int height; float aspect; Togl *togl; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "pathName"); return TCL_ERROR; } if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { return TCL_ERROR; } width = Togl_Width(togl); height = Togl_Height(togl); aspect = (float) width / (float) height; glViewport(0, 0, width, height); /* Set up projection transform */ glMatrixMode(GL_PROJECTION); glLoadIdentity(); glOrtho(-aspect, aspect, -1, 1, -1, 1); /* Change back to model view transform for rendering */ glMatrixMode(GL_MODELVIEW); return TCL_OK; } /* * Togl widget display callback. This is called by Tcl/Tk when the widget's * contents have to be redrawn. Typically, we clear the color and depth * buffers, render our objects, then swap the front/back color buffers. */ static int display_cb(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { Togl *togl; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "pathName"); return TCL_ERROR; } if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { return TCL_ERROR; } glClearIndex((float) black); glClear(GL_COLOR_BUFFER_BIT); glPushMatrix(); glTranslatef(0.3f, -0.3f, 0); glRotatef(Angle, 0, 0, 1); glIndexi(red); glBegin(GL_TRIANGLES); glVertex2f(-0.5f, -0.3f); glVertex2f(0.5f, -0.3f); glVertex2f(0, 0.6f); glEnd(); glPopMatrix(); glPushMatrix(); glRotatef(Angle, 0, 0, 1); glIndexi(green); glBegin(GL_TRIANGLES); glVertex2f(-0.5f, -0.3f); glVertex2f(0.5f, -0.3f); glVertex2f(0, 0.6f); glEnd(); glPopMatrix(); glPushMatrix(); glTranslatef(-0.3f, 0.3f, 0); glRotatef(Angle, 0, 0, 1); glIndexi(blue); glBegin(GL_TRIANGLES); glVertex2f(-0.5f, -0.3f); glVertex2f(0.5f, -0.3f); glVertex2f(0, 0.6f); glEnd(); glPopMatrix(); glFlush(); Togl_SwapBuffers(togl); return TCL_OK; } static int timer_cb(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { Togl *togl; if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "pathName"); return TCL_ERROR; } if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) { return TCL_ERROR; } Angle += 5.0; Togl_PostRedisplay(togl); return TCL_OK; } EXTERN int Index_Init(Tcl_Interp *interp) { /* * Initialize Tcl and the Togl widget module. */ if (Tcl_InitStubs(interp, "8.1", 0) == NULL || Togl_InitStubs(interp, "2.0", 0) == NULL) { return TCL_ERROR; } /* * Specify the C callback functions for widget creation, display, * and reshape. */ Tcl_CreateObjCommand(interp, "::index::create_cb", create_cb, NULL, NULL); Tcl_CreateObjCommand(interp, "::index::display_cb", display_cb, NULL, NULL); Tcl_CreateObjCommand(interp, "::index::reshape_cb", reshape_cb, NULL, NULL); Tcl_CreateObjCommand(interp, "::index::timer_cb", timer_cb, NULL, NULL); /* * Make a new Togl widget command so the Tcl code can set a C variable. */ /* NONE */ /* * Call Tcl_CreateCommand for application-specific commands, if * they weren't already created by the init procedures called above. */ return TCL_OK; } netgen-6.2.1804/ng/Togl2.1/CMakeLists.txt0000644000175000017500000000354413272137567016305 0ustar kurtkurt if(APPLE) set(CMAKE_C_COMPILER "/usr/bin/gcc") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -x objective-c") endif(APPLE) if(WIN32) add_definitions("-DBUILD_togl -DUNICODE -D_UNICODE -DTOGL_USE_FONTS=0 -DSTDC_HEADERS -DSTDC_HEADER") add_library(togl SHARED togl.c toglProcAddr.c toglStubInit.c) install(TARGETS togl DESTINATION ${NG_INSTALL_DIR} COMPONENT netgen) target_link_libraries(togl ${TCL_LIBRARY} ${TK_LIBRARY}) else(WIN32) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fomit-frame-pointer -Wno-implicit-int") add_definitions("-DPACKAGE_NAME=\"Togl\" -DPACKAGE_TARNAME=\"togl\" -DPACKAGE_VERSION=\"2.1\" -DPACKAGE_STRING=\"Togl\ 2.1\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=0 -DHAVE_LIMITS_H=1 -DHAVE_SYS_PARAM_H=1 -DUSE_THREAD_ALLOC=1 -D_REENTRANT=1 -D_THREAD_SAFE=1 -DTCL_THREADS=1 -DMODULE_SCOPE=extern\ __attribute__\(\(__visibility__\(\"hidden\"\)\)\) -D_LARGEFILE64_SOURCE=1 -DTCL_WIDE_INT_IS_LONG=1 -DUSE_TCL_STUBS=1 -DUSE_TK_STUBS=1 -DAUTOSTEREOD=\"\"") include_directories(BEFORE "${TCL_INCLUDE_PATH}/tcl-private/generic" "${TCL_INCLUDE_PATH}/tcl-private/unix") include_directories(BEFORE "${TK_INCLUDE_PATH}/tk-private/generic" "${TK_INCLUDE_PATH}/tk-private/unix" "${TK_INCLUDE_PATH}/tk-private") include_directories(BEFORE "${TCL_INCLUDE_PATH}/tk-private/generic/ttk") include_directories(BEFORE "${TK_INCLUDE_PATH}/../PrivateHeaders") include_directories(BEFORE "${TCL_INCLUDE_PATH}") include_directories(BEFORE "${TK_INCLUDE_PATH}") add_library(togl togl.c toglProcAddr.c toglStubInit.c) target_link_libraries(togl -ldl) endif(WIN32) target_link_libraries(togl ${OPENGL_LIBRARIES}) set_target_properties(togl PROPERTIES POSITION_INDEPENDENT_CODE ON ) netgen-6.2.1804/ng/Togl2.1/toglAGL.c0000644000175000017500000002227213272137567015201 0ustar kurtkurt/* $Id: toglAGL.c,v 1.7 2009/10/22 00:06:41 gregcouch Exp $ */ /* vi:set sw=4 expandtab: */ /* * Togl - a Tk OpenGL widget * * Copyright (C) 1996-2002 Brian Paul and Ben Bederson * Copyright (C) 2005-2009 Greg Couch * See the LICENSE file for copyright details. */ struct FBInfo { GLint acceleration; GLint colors; GLint depth; GLint samples; AGLPixelFormat pix; }; typedef struct FBInfo FBInfo; static int FBInfoCmp(const void *a, const void *b) { /* * 1. full acceleration is better * 2. greater color bits is better * 3. greater depth bits is better * 4. more multisampling is better */ const FBInfo *x = (const FBInfo *) a; const FBInfo *y = (const FBInfo *) b; if (x->acceleration != y->acceleration) return y->acceleration - x->acceleration; if (x->colors != y->colors) return y->colors - x->colors; if (x->depth != y->depth) return y->depth - x->depth; if (x->samples != y->samples) return y->samples - x->samples; return 0; } static AGLPixelFormat togl_pixelFormat(Togl *togl) { GLint attribs[32]; int na = 0; AGLPixelFormat pix; GDHandle display = NULL; FBInfo *info = NULL; int count; #if 0 if (togl->MultisampleFlag && !hasMultisampling) { Tcl_SetResult(togl->Interp, TCL_STUPID "multisampling not supported", TCL_STATIC); return NULL; } #endif if (togl->PbufferFlag && !togl->RgbaFlag) { Tcl_SetResult(togl->Interp, TCL_STUPID "puffer must be RGB[A]", TCL_STATIC); return NULL; } attribs[na++] = AGL_MINIMUM_POLICY; /* ask for hardware-accelerated onscreen */ attribs[na++] = AGL_ACCELERATED; attribs[na++] = AGL_NO_RECOVERY; if (togl->RgbaFlag) { /* RGB[A] mode */ attribs[na++] = AGL_RGBA; attribs[na++] = AGL_RED_SIZE; attribs[na++] = togl->RgbaRed; attribs[na++] = AGL_GREEN_SIZE; attribs[na++] = togl->RgbaGreen; attribs[na++] = AGL_BLUE_SIZE; attribs[na++] = togl->RgbaBlue; if (togl->AlphaFlag) { attribs[na++] = AGL_ALPHA_SIZE; attribs[na++] = togl->AlphaSize; } } else { /* Color index mode */ attribs[na++] = AGL_BUFFER_SIZE; attribs[na++] = 8; } if (togl->DepthFlag) { attribs[na++] = AGL_DEPTH_SIZE; attribs[na++] = togl->DepthSize; } if (togl->DoubleFlag) { attribs[na++] = AGL_DOUBLEBUFFER; } if (togl->StencilFlag) { attribs[na++] = AGL_STENCIL_SIZE; attribs[na++] = togl->StencilSize; } if (togl->AccumFlag) { attribs[na++] = AGL_ACCUM_RED_SIZE; attribs[na++] = togl->AccumRed; attribs[na++] = AGL_ACCUM_GREEN_SIZE; attribs[na++] = togl->AccumGreen; attribs[na++] = AGL_ACCUM_BLUE_SIZE; attribs[na++] = togl->AccumBlue; if (togl->AlphaFlag) { attribs[na++] = AGL_ACCUM_ALPHA_SIZE; attribs[na++] = togl->AccumAlpha; } } if (togl->MultisampleFlag) { attribs[na++] = AGL_MULTISAMPLE; #ifdef AGL_SAMPLES_ARB /* OS X 10.2 and later */ attribs[na++] = AGL_SAMPLE_BUFFERS_ARB; attribs[na++] = 1; attribs[na++] = AGL_SAMPLES_ARB; attribs[na++] = 2; #endif } if (togl->AuxNumber != 0) { attribs[na++] = AGL_AUX_BUFFERS; attribs[na++] = togl->AuxNumber; } if (togl->Stereo == TOGL_STEREO_NATIVE) { attribs[na++] = AGL_STEREO; } if (togl->FullscreenFlag) { attribs[na++] = AGL_FULLSCREEN; /* TODO: convert Tk screen to display device */ display = GetMainDevice(); } attribs[na++] = AGL_NONE; if ((pix = aglChoosePixelFormat(&display, togl->FullscreenFlag ? 1 : 0, attribs)) == NULL) { Tcl_SetResult(togl->Interp, TCL_STUPID "couldn't choose pixel format", TCL_STATIC); return NULL; } /* TODO: since we aglDestroyPixelFormat elsewhere, this code may leak * memory if the pixel format chosen is not the original (because * aglDestroyPixelFormat will give an error). */ count = 0; do { info = (FBInfo *) realloc(info, (count + 1) * sizeof (FBInfo)); info[count].pix = pix; aglDescribePixelFormat(pix, AGL_ACCELERATED, &info[count].acceleration); aglDescribePixelFormat(pix, AGL_BUFFER_SIZE, &info[count].colors); aglDescribePixelFormat(pix, AGL_DEPTH_SIZE, &info[count].depth); #ifdef AGL_SAMPLES_ARB aglDescribePixelFormat(pix, AGL_SAMPLES_ARB, &info[count].samples); #else info[count].samples = 0; #endif ++count; } while (pix = aglNextPixelFormat(pix)); qsort(info, count, sizeof info[0], FBInfoCmp); pix = info[0].pix; free(info); return pix; } static int togl_describePixelFormat(Togl *togl) { AGLPixelFormat pixelformat; /* fill in RgbaFlag, DoubleFlag, and Stereo */ pixelformat = (AGLPixelFormat) togl->PixelFormat; GLint has_rgba, has_doublebuf, has_depth, has_accum, has_alpha, has_stencil, has_stereo, has_multisample; if (aglDescribePixelFormat(pixelformat, AGL_RGBA, &has_rgba) && aglDescribePixelFormat(pixelformat, AGL_DOUBLEBUFFER, &has_doublebuf) && aglDescribePixelFormat(pixelformat, AGL_DEPTH_SIZE, &has_depth) && aglDescribePixelFormat(pixelformat, AGL_ACCUM_RED_SIZE, &has_accum) && aglDescribePixelFormat(pixelformat, AGL_ALPHA_SIZE, &has_alpha) && aglDescribePixelFormat(pixelformat, AGL_STENCIL_SIZE, &has_stencil) && aglDescribePixelFormat(pixelformat, AGL_STEREO, &has_stereo) #ifdef AGL_SAMPLES_ARB && aglDescribePixelFormat(pixelformat, AGL_SAMPLES_ARB, &has_multisample) #endif ) { togl->RgbaFlag = (has_rgba != 0); togl->DoubleFlag = (has_doublebuf != 0); togl->DepthFlag = (has_depth != 0); togl->AccumFlag = (has_accum != 0); togl->AlphaFlag = (has_alpha != 0); togl->StencilFlag = (has_stencil != 0); togl->Stereo = (has_stereo ? TOGL_STEREO_NATIVE : TOGL_STEREO_NONE); #ifdef AGL_SAMPLES_ARB togl->MultisampleFlag = (has_multisample != 0); #else togl->MultisampleFlag = False; #endif return True; } else { Tcl_SetResult(togl->Interp, TCL_STUPID "failed querying pixel format attributes", TCL_STATIC); return False; } } #define isPow2(x) (((x) & ((x) - 1)) == 0) static AGLPbuffer togl_createPbuffer(Togl *togl) { GLint min_size[2], max_size[2]; Bool hasPbuffer; const char *extensions; GLboolean good; GLint target; GLint virtualScreen; AGLPbuffer pbuf; extensions = (const char *) glGetString(GL_EXTENSIONS); hasPbuffer = (strstr(extensions, "GL_APPLE_pixel_buffer") != NULL); if (!hasPbuffer) { Tcl_SetResult(togl->Interp, TCL_STUPID "pbuffers are not supported", TCL_STATIC); return NULL; } glGetIntegerv(GL_MIN_PBUFFER_VIEWPORT_DIMS_APPLE, min_size); glGetIntegerv(GL_MAX_VIEWPORT_DIMS, max_size); virtualScreen = aglGetVirtualScreen(togl->Ctx); for (;;) { /* make sure we don't exceed the maximum size because if we do, * aglCreatePbuffer may succeed and later uses of the pbuffer fail */ if (togl->Width < min_size[0]) togl->Width = min_size[0]; else if (togl->Width > max_size[0]) { if (togl->LargestPbufferFlag) togl->Width = max_size[0]; else { Tcl_SetResult(togl->Interp, TCL_STUPID "pbuffer too large", TCL_STATIC); return NULL; } } if (togl->Height < min_size[1]) togl->Height = min_size[1]; else if (togl->Height > max_size[1]) { if (togl->LargestPbufferFlag) togl->Height = max_size[1]; else { Tcl_SetResult(togl->Interp, TCL_STUPID "pbuffer too large", TCL_STATIC); return NULL; } } if (isPow2(togl->Width) && isPow2(togl->Height)) target = GL_TEXTURE_2D; else target = GL_TEXTURE_RECTANGLE_ARB; good = aglCreatePBuffer(togl->Width, togl->Height, target, togl->AlphaFlag ? GL_RGBA : GL_RGB, 0, &pbuf); if (good) { /* aglSetPbuffer allocates the framebuffer space */ if (aglSetPBuffer(togl->Ctx, pbuf, 0, 0, virtualScreen)) { return pbuf; } } if (!togl->LargestPbufferFlag || togl->Width == min_size[0] || togl->Height == min_size[1]) { Tcl_SetResult(togl->Interp, TCL_STUPID "unable to create pbuffer", TCL_STATIC); return NULL; } /* largest unavailable, try something smaller */ togl->Width = togl->Width / 2 + togl->Width % 2; togl->Height = togl->Width / 2 + togl->Height % 2; } } static void togl_destroyPbuffer(Togl *togl) { aglDestroyPBuffer(togl->pbuf); } netgen-6.2.1804/ng/Togl2.1/README.bin0000644000175000017500000000473013272137567015172 0ustar kurtkurtREADME.txt: Togl This is a Togl 2.X binary distribution for both users and developers. It is specific to a particular operating system (e.g., Windows, Mac OS X, Linux, etc.). Since the C ABI should be same for all compilers on the same system, using Togl via the Tcl interface should work regardless of which compiler Tcl was compiled with. The files are named: ToglTOGL_VERSION-TCL_VERSION-OS.SUFFIX For example, TOGL_VERSION=2.0, TCL_VERSION=8.4, OS=Linux, and SUFFIX=.tar.gz gives: Togl2.0-8.4-Linux.tar.gz Togl is also available at: http://sourceforge.net/projects/togl/ You can get any release of Togl from the file distributions link at the above URL. A copy of the online documentation is in the doc directory. For users: Only the lib/Togl2.X directory (and its contents) need to be installed in your Tcl library. Execute the following Tcl script to find the directories Tcl looks for packages in: puts $tcl_libPath and then copy the lib/Togl2.X directory into one of those directories. For developers: The lib/Togl2.X directory (and its contents) is all that needs to be redistributed in your application distribution. If you wish to link with Togl, then you will need the include files and a link library for your compiler. The compilers used are (OS- WINDOWING_SYSTEM): MacOSX: gcc 4.0.1, Mac OS X 10.4, ppc/i386 Linux: gcc 3.3.6, Red Hat 7.1, i386 Linux64: gcc 4.2.3 -Wl,--hash-style=both, Red Hat Server 5.1, x86_64 Windows: Microsoft Visual Studio .NET 2003, Windows XP SP2, i386 File hierarchy: README.txt this file bin/ unused (empty) lib/ Togl2.X/ Tcl package (place on Tcl's autopath) LICENSE redistribution license pkgIndex.tcl Tcl package index Togl2X.dll Windows Tcl package binary Toglstub2X.a Windows gcc/mingw link library Toglstub2X.lib Windows Visual Studio link library libToglstub2X.a UNIX (Linux, IRIX, etc.) link library include/ togl.h Main header file, includes others toglDecls.h API function declarations togl_ws.h Which windowing system togl was compiled with doc/ Documentation *.html Start with index.html The contents of the include and lib directories can be placed verbatim in the Tcl installataion hierarchy. Documentation is in the doc directory. Start with doc/index.html in your web browser. netgen-6.2.1804/ng/Togl2.1/togl.c0000644000175000017500000051064513272137567014663 0ustar kurtkurt/* $Id: togl.c,v 1.142 2009/12/23 21:50:49 gregcouch Exp $ */ /* vi:set sw=4 expandtab: */ /* * Togl - a Tk OpenGL widget * * Copyright (C) 1996-2002 Brian Paul and Ben Bederson * Copyright (C) 2005-2009 Greg Couch * See the LICENSE file for copyright details. */ /* * Currently we support X11, Win32 and Mac OS X only */ #define USE_TOGL_STUB_PROCS #include "togl.h" #include // don't need it on osx ??? #include #ifndef TOGL_USE_FONTS # define TOGL_USE_FONTS 1 #endif #if (TK_MAJOR_VERSION > 8 || TK_MINOR_VERSION > 4) && !defined(TOGL_WGL) /* X11 and Aqua font technology changed in 8.5 */ # undef TOGL_USE_FONTS #endif #ifndef TOGL_USE_OVERLAY # if defined(TOGL_X11) || defined(TOGL_WGL) # define TOGL_USE_OVERLAY 1 # endif #endif /* Use TCL_STUPID to cast (const char *) to (char *) where the Tcl function * prototype argument should really be const */ #define TCL_STUPID (char *) /* Use WIDGREC to cast widgRec or recordPtr arguments */ #define WIDGREC (char *) /*** Windows headers ***/ #if defined(TOGL_WGL) # define WIN32_LEAN_AND_MEAN # include # undef WIN32_LEAN_AND_MEAN # include # ifndef PFD_SUPPORT_COMPOSITION // for Vista -- not strictly needed because we don't use PFD_SUPPORT_GDI/BITMAP # define PFD_SUPPORT_COMPOSITION 0x00008000 # endif # include # include # include # ifdef _MSC_VER # include # else # ifdef UNICODE # define StringCchPrintf snwprintf # else # define StringCchPrintf snprintf # endif # endif /*** X Window System headers ***/ #elif defined(TOGL_X11) # include # include # include /* for XA_RGB_DEFAULT_MAP atom */ # if !defined(USE_SYSTEM_XMU) # include "Xmu/StdCmap.h" # else # if defined(__vms) # include /* for XmuLookupStandardColormap */ # else # include /* for XmuLookupStandardColormap */ # endif # endif # define GLX_GLXEXT_LEGACY /* include glxext.h separately */ # include /* we want the prototype typedefs from glxext.h */ # undef GLX_VERSION_1_3 # undef GLX_VERSION_1_4 # ifdef UNDEF_GET_PROC_ADDRESS # undef GLX_ARB_get_proc_address # endif # include # ifdef __sgi # include # endif # ifdef HAVE_AUTOSTEREO # include # endif /*** Mac Carbon headers ***/ #elif defined(TOGL_AGL) # define Cursor QDCursor # include # undef Cursor # include /* usa MacDrawable */ # include # define Togl_MacOSXGetDrawablePort(togl) TkMacOSXGetDrawablePort((Drawable) ((TkWindow *) togl->TkWin)->privatePtr) /*** Mac Cocoa headers ***/ #elif defined(TOGL_NSOPENGL) #undef panic # include # include /* Use NSOpenGLContext */ # include /* Use NSView */ # include /* Use NSWindow */ # include /* Use NSView setWantsBestResolutionOpenGLSurface */ # include /* Use NSEvent */ # include /* Use NSTouch */ # include /* Use NSRect */ # include /* Use MacDrawable */ # include # define Togl_MacOSXGetDrawablePort(togl) TkMacOSXGetDrawablePort((Drawable) ((TkWindow *) togl->TkWin)->privatePtr) # include # ifndef __MAC_10_7 /* Define Mac retina display routines not available prior to Mac OS 10.7 */ @interface NSView (NSOpenGLSurfaceResolution) - (BOOL)wantsBestResolutionOpenGLSurface; - (void)setWantsBestResolutionOpenGLSurface:(BOOL)flag; - (NSRect)convertRectToBacking:(NSRect)aRect; #define NSEventPhaseNone 0 @end # endif #else /* make sure only one platform defined */ # error Unsupported platform, or confused platform defines... #endif #define NC3D L"NVidia Consumer 3D Stereo" #ifndef STEREO_BUFFER_NONE /* From , but we use this constants elsewhere */ # define STEREO_BUFFER_NONE 0 # define STEREO_BUFFER_LEFT 1 # define STEREO_BUFFER_RIGHT 2 #endif /*** Standard C headers ***/ #include #include #include #ifdef TOGL_WGL # include #endif #if TK_MAJOR_VERSION < 8 # error Sorry Togl requires Tcl/Tk ver 8.0 or higher. #endif #ifdef USE_TCL_STUBS # if TK_MAJOR_VERSION < 8 || (TK_MAJOR_VERSION == 8 && TK_MINOR_VERSION < 1) # error Sorry stub support requires Tcl/Tk ver 8.1 or higher. # endif #endif #if defined(TOGL_AGL) # if TK_MAJOR_VERSION < 8 || (TK_MAJOR_VERSION == 8 && TK_MINOR_VERSION < 4) # error Sorry Mac Aqua version requires Tcl/Tk ver 8.4.0 or higher. # endif #endif /* TOGL_AGL */ // Seems to work with Apple Tcl 8.5 too.... // #if defined(TOGL_NSOPENGL) // # if TK_MAJOR_VERSION < 8 || (TK_MAJOR_VERSION == 8 && TK_MINOR_VERSION < 6) // # error Sorry Mac Cocoa version requires Tcl/Tk ver 8.6.0 or higher. // # endif // #endif /* TOGL_NSOPENGL */ #if defined(TOGL_WGL) && defined(_MSC_VER) # define snprintf _snprintf # pragma warning(disable:4995) #endif /* workaround for bug #123153 in tcl ver8.4a2 (tcl.h) */ #if defined(Tcl_InitHashTable) && defined(USE_TCL_STUBS) # undef Tcl_InitHashTable # define Tcl_InitHashTable (tclStubsPtr->tcl_InitHashTable) #endif #if TK_MAJOR_VERSION > 8 || (TK_MAJOR_VERSION == 8 && TK_MINOR_VERSION >= 4) # define HAVE_TK_SETCLASSPROCS /* pointer to Tk_SetClassProcs function in the stub table */ #if TK_MAJOR_VERSION == 8 && TK_MINOR_VERSION < 6 static void (*SetClassProcsPtr) _ANSI_ARGS_((Tk_Window, Tk_ClassProcs *, ClientData)); #else static void (*SetClassProcsPtr) _ANSI_ARGS_((Tk_Window, const Tk_ClassProcs *, ClientData)); #endif #endif /* * Copy of TkClassProcs declarations from tkInt.h * (this is needed for Tcl ver =< 8.4a3) */ typedef Window (TkClassCreateProc) _ANSI_ARGS_((Tk_Window tkwin, Window parent, ClientData instanceData)); typedef void (TkClassGeometryProc) _ANSI_ARGS_((ClientData instanceData)); typedef void (TkClassModalProc) _ANSI_ARGS_((Tk_Window tkwin, XEvent *eventPtr)); typedef struct TkClassProcs { TkClassCreateProc *createProc; TkClassGeometryProc *geometryProc; TkClassModalProc *modalProc; } TkClassProcs; /* Defaults */ #define DEFAULT_WIDTH "400" #define DEFAULT_HEIGHT "400" #define DEFAULT_IDENT "" #define DEFAULT_FONTNAME "Courier" #define DEFAULT_TIME "1" #ifdef TOGL_WGL /* Maximum size of a logical palette corresponding to a colormap in color index * mode. */ # define MAX_CI_COLORMAP_SIZE 4096 # define MAX_CI_COLORMAP_BITS 12 # if TOGL_USE_FONTS != 1 /* * copy of TkWinColormap from tkWinInt.h */ typedef struct { HPALETTE palette; /* Palette handle used when drawing. */ UINT size; /* Number of entries in the palette. */ int stale; /* 1 if palette needs to be realized, otherwise * 0. If the palette is stale, then an idle * handler is scheduled to realize the palette. */ Tcl_HashTable refCounts; /* Hash table of palette entry reference counts * indexed by pixel value. */ } TkWinColormap; # else # include # endif static LRESULT(CALLBACK *tkWinChildProc) (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) = NULL; # ifndef TK_WIN_CHILD_CLASS_NAME # define TK_WIN_CHILD_CLASS_NAME L"TkChild" # endif #endif /* TOGL_WGL */ #define MAX(a,b) (((a)>(b))?(a):(b)) #define TCL_ERR(interp, string) \ do { \ Tcl_ResetResult(interp); \ Tcl_AppendResult(interp, string, NULL); \ return TCL_ERROR; \ } while (0) #define ALL_EVENTS_MASK \ (KeyPressMask \ |KeyReleaseMask \ |ButtonPressMask \ |ButtonReleaseMask \ |EnterWindowMask \ |LeaveWindowMask \ |PointerMotionMask \ |ExposureMask \ |VisibilityChangeMask \ |FocusChangeMask \ |PropertyChangeMask \ |ColormapChangeMask) /* * The following structure contains pointers to functions used for * processing the custom "-stereo" option. Copied from tkPanedWindow.c. */ static int SetStereo(ClientData clientData, Tcl_Interp *interp, Tk_Window tkwin, Tcl_Obj **value, char *recordPtr, int internalOffset, char *oldInternalPtr, int flags); static Tcl_Obj *GetStereo(ClientData clientData, Tk_Window tkwin, char *recordPtr, int internalOffset); static void RestoreStereo(ClientData clientData, Tk_Window tkwin, char *internalPtr, char *oldInternalPtr); static Tk_ObjCustomOption stereoOption = { "stereo", /* name */ SetStereo, /* setProc */ GetStereo, /* getProc */ RestoreStereo, /* restoreProc */ NULL, /* freeProc */ 0 }; /* * The following structure contains pointers to functions used for * processing the custom "-pixelformat" option. Copied from tkPanedWindow.c. */ static int SetWideInt(ClientData clientData, Tcl_Interp *interp, Tk_Window tkwin, Tcl_Obj **value, char *recordPtr, int internalOffset, char *oldInternalPtr, int flags); static Tcl_Obj *GetWideInt(ClientData clientData, Tk_Window tkwin, char *recordPtr, int internalOffset); static void RestoreWideInt(ClientData clientData, Tk_Window tkwin, char *internalPtr, char *oldInternalPtr); static Tk_ObjCustomOption wideIntOption = { "wide int", /* name */ SetWideInt, /* setProc */ GetWideInt, /* getProc */ RestoreWideInt, /* restoreProc */ NULL, /* freeProc */ 0 }; /* * Stuff we initialize on a per package (Togl_Init) basis. * Since Tcl uses one interpreter per thread, any per-thread * data goes here. */ struct Togl_PackageGlobals { Tk_OptionTable optionTable; /* Used to parse options */ Togl *toglHead; /* Head of linked list of all Togl widgets */ int nextContextTag; /* Used to assign similar context tags */ }; typedef struct Togl_PackageGlobals Togl_PackageGlobals; extern ToglStubs toglStubs; /* should be only non-const global */ #if defined(TOGL_NSOPENGL) /* Handle window drags between retina and non-retina displays. */ @interface ToglNSView : NSView { struct Togl *togl; } - (void) setTogl: (struct Togl*)t; - (void) viewDidChangeBackingProperties; - (void) magnifyWithEvent: (NSEvent *)event; - (void) rotateWithEvent: (NSEvent *)event; - (void) scrollWheel: (NSEvent *)event; - (void)touchesBeganWithEvent:(NSEvent *)event; - (void)touchesMovedWithEvent:(NSEvent *)event; - (void)touchesEndedWithEvent:(NSEvent *)event; - (void)touchesCancelledWithEvent:(NSEvent *)event; - (void)reportEventTouches:(NSEvent *)event; @end #endif struct Togl { Togl *Next; /* next in linked list */ #if defined(TOGL_WGL) HGLRC Ctx; /* OpenGL rendering context to be made current */ HDC tglGLHdc; /* Device context of device that OpenGL calls * will be drawn on */ int CiColormapSize; /* (Maximum) size of colormap in color index * mode */ #elif defined(TOGL_X11) GLXContext Ctx; /* Normal planes GLX context */ #elif defined(TOGL_AGL) AGLContext Ctx; #elif defined(TOGL_NSOPENGL) NSOpenGLContext *Ctx; ToglNSView *nsview; #endif int contextTag; /* all contexts with same tag share display * lists */ XVisualInfo *VisInfo; /* Visual info of the current */ Display *display; /* X's token for the window's display. */ Tk_Window TkWin; /* Tk window structure */ Tcl_Interp *Interp; /* Tcl interpreter */ Tcl_Command widgetCmd; /* Token for togl's widget command */ Togl_PackageGlobals *tpg; /* Used to access globals */ #ifndef NO_TK_CURSOR Tk_Cursor Cursor; /* The widget's cursor */ #endif int Width, Height; /* Dimensions of window */ int PixelScale; /* Graphics pixels per Tk pixel. */ /* 1 for normal display. */ /* 2 for Mac retina display. */ int SetGrid; /* positive is grid size for window manager */ int TimerInterval; /* Time interval for timer in milliseconds */ Tcl_TimerToken timerHandler; /* Token for togl's timer handler */ Bool RgbaFlag; /* configuration flags (ala GLX parameters) */ int RgbaRed; int RgbaGreen; int RgbaBlue; Bool DoubleFlag; Bool DepthFlag; int DepthSize; Bool AccumFlag; int AccumRed; int AccumGreen; int AccumBlue; int AccumAlpha; Bool AlphaFlag; int AlphaSize; Bool StencilFlag; int StencilSize; Bool PrivateCmapFlag; Bool OverlayFlag; int Stereo; double EyeSeparation; double Convergence; GLuint riStencilBit; /* row interleaved stencil bit */ int AuxNumber; Bool Indirect; #if defined(TOGL_NSOPENGL) NSOpenGLPixelFormat *PixelFormat; #else Tcl_WideInt PixelFormat; #endif int SwapInterval; Bool MultisampleFlag; Bool FullscreenFlag; Bool PbufferFlag; Bool LargestPbufferFlag; #if defined(TOGL_X11) GLXFBConfig fbcfg; /* cache FBConfig for pbuffer creation */ GLXPbuffer pbuf; #elif defined(TOGL_WGL) HPBUFFERARB pbuf; int pbufferLost; #elif defined(TOGL_AGL) AGLPbuffer pbuf; #elif defined(TOGL_NSOPENGL) NSOpenGLPixelBuffer *pbuf; #endif const char *ShareList; /* name (ident) of Togl to share dlists with */ const char *ShareContext; /* name (ident) to share OpenGL context with */ const char *Ident; /* User's identification string */ ClientData Client_Data; /* Pointer to user data */ Bool UpdatePending; /* Should normal planes be redrawn? */ Tcl_Obj *CreateProc; /* Callback when widget is realized */ Tcl_Obj *DisplayProc; /* Callback when widget is redrawn */ Tcl_Obj *ReshapeProc; /* Callback when window size changes */ Tcl_Obj *DestroyProc; /* Callback when widget is destroyed */ Tcl_Obj *TimerProc; /* Callback when widget is idle */ Tcl_Obj *MagnifyProc; /* Callback for track pad pinch gesture */ Tcl_Obj *RotateProc; /* Callback for track pad rotate gesture */ Tcl_Obj *ScrollProc; /* Callback for track pad scroll gesture */ Tcl_Obj *ScrollWheelProc; /* Callback for mouse scroll wheel, not trackpad */ Tcl_Obj *TouchesProc; /* Callback for track pad touches */ /* Overlay stuff */ #if defined(TOGL_X11) GLXContext OverlayCtx; /* Overlay planes OpenGL context */ #elif defined(TOGL_WGL) HGLRC tglGLOverlayHglrc; #endif Window OverlayWindow; /* The overlay window, or 0 */ Tcl_Obj *OverlayDisplayProc; /* Overlay redraw proc */ Bool OverlayUpdatePending; /* Should overlay be redrawn? */ Colormap OverlayCmap; /* colormap for overlay is created */ int OverlayTransparentPixel; /* transparent pixel */ Bool OverlayIsMapped; GLfloat *RedMap; /* Index2RGB Maps for Color index modes */ GLfloat *GreenMap; GLfloat *BlueMap; GLint MapSize; /* = Number of indices in our Togl */ int currentStereoBuffer; #ifdef HAVE_AUTOSTEREO int as_initialized; /* for autostereo package */ ASHandle ash; /* for autostereo package */ #endif int badWindow; /* true when Togl_MakeWindow fails or should * create a dummy window */ }; int Togl_CallCallback(Togl *togl, Tcl_Obj *cmd); static int Togl_CallCallback_P(Togl *togl, Tcl_Obj *cmd, double *params, int nparams); #if defined(TOGL_NSOPENGL) static int viewPixelScale(NSView *nsview); @implementation ToglNSView - (void) setTogl: (struct Togl*)t { togl = t; } - (void) viewDidChangeBackingProperties { [super viewDidChangeBackingProperties]; if (togl && togl->ReshapeProc) { int pscale = viewPixelScale(self); if (pscale != togl->PixelScale) { togl->PixelScale = pscale; if (togl->ReshapeProc) (void) Togl_CallCallback(togl, togl->ReshapeProc); Togl_PostRedisplay(togl); } } } - (void) magnifyWithEvent: (NSEvent *)event { if (togl && togl->MagnifyProc) { double mag = [event magnification] + 1.0; (void) Togl_CallCallback_P(togl, togl->MagnifyProc, &mag, 1); } } - (void) rotateWithEvent: (NSEvent *)event { if (togl && togl->RotateProc) { double deg = [event rotation]; (void) Togl_CallCallback_P(togl, togl->RotateProc, °, 1); } } - (void) scrollWheel: (NSEvent *)event { if (togl && (togl->ScrollProc || togl->ScrollWheelProc)) { float dx = [event deltaX], dy = [event deltaY]; if (dx != 0 || dy != 0) { // float track_pad = ((([event phase] == NSEventPhaseNone) && // ([event momentumPhase] == NSEventPhaseNone)) ? 0 : 1); float track_pad = ([event subtype] == NSMouseEventSubtype ? 0 : 1); double args[3] = {dx, dy, track_pad}; if (togl->ScrollProc) (void) Togl_CallCallback_P(togl, togl->ScrollProc, args, 3); if (togl->ScrollWheelProc && !track_pad) (void) Togl_CallCallback_P(togl, togl->ScrollWheelProc, args+1, 1); } } } - (void)touchesBeganWithEvent:(NSEvent *)event { NSWindow *win = [self window]; [win makeKeyWindow]; [win makeMainWindow]; [self reportEventTouches:event]; } - (void)touchesMovedWithEvent:(NSEvent *)event { [self reportEventTouches:event]; } - (void)touchesEndedWithEvent:(NSEvent *)event { [self reportEventTouches:event]; } - (void)touchesCancelledWithEvent:(NSEvent *)event; { [self reportEventTouches:event]; } - (void)reportEventTouches: (NSEvent *)event { if (togl && togl->TouchesProc) { NSSet *touches = [event touchesMatchingPhase:NSTouchPhaseTouching inView:self]; int n = touches.count, i; double *id_xy = NULL; if (n >= 0) { id_xy = (double *)malloc(3*n*sizeof(double)); NSArray *array = [touches allObjects]; for (i = 0 ; i < n ; ++i) { NSTouch *t = [array objectAtIndex:i]; id_xy[3*i] = (long)t.identity; id_xy[3*i+1] = t.normalizedPosition.x * t.deviceSize.width; id_xy[3*i+2] = t.normalizedPosition.y * t.deviceSize.height; } (void) Togl_CallCallback_P(togl, togl->TouchesProc, id_xy, 3*n); if (id_xy) free(id_xy); } } } @end #endif /* * Prototypes for functions local to this file */ static int Togl_ObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv); static void Togl_ObjCmdDelete(ClientData clientData); static void Togl_EventProc(ClientData clientData, XEvent *eventPtr); static void Togl_RedisplayProc(ClientData clientData, XEvent *eventPtr); static Window Togl_MakeWindow(Tk_Window, Window, ClientData); static void Togl_WorldChanged(ClientData); static void Togl_SetViewPort(const struct Togl *); #ifdef MESA_COLOR_HACK static int get_free_color_cells(Display *display, int screen, Colormap colormap); static void free_default_color_cells(Display *display, Colormap colormap); #endif static void ToglCmdDeletedProc(ClientData); #if defined(TOGL_AGL) || defined(TOGL_NSOPENGL) static void SetMacBufRect(Togl *togl); #endif #if defined(TOGL_WGL) # include "toglWGL.c" #elif defined(TOGL_AGL) # include "toglAGL.c" #elif defined(TOGL_NSOPENGL) # include "toglNSOpenGL.c" #elif defined(TOGL_X11) # include "toglGLX.c" #endif /* * Setup Togl widget configuration options: */ #define GEOMETRY_MASK 0x1 /* widget geometry */ #define FORMAT_MASK 0x2 /* pixel format */ #define CURSOR_MASK 0x4 #define TIMER_MASK 0x8 #define OVERLAY_MASK 0x10 #define SWAP_MASK 0x20 #define STEREO_MASK 0x40 #define STEREO_FORMAT_MASK 0x80 static Tk_OptionSpec optionSpecs[] = { {TK_OPTION_PIXELS, TCL_STUPID "-height", "height", "Height", DEFAULT_HEIGHT, -1, Tk_Offset(Togl, Height), 0, NULL, GEOMETRY_MASK}, {TK_OPTION_PIXELS, TCL_STUPID "-width", "width", "Width", DEFAULT_WIDTH, -1, Tk_Offset(Togl, Width), 0, NULL, GEOMETRY_MASK}, {TK_OPTION_INT, TCL_STUPID "-pixelscale", "pixelscale", "PixelScale", "1", -1, Tk_Offset(Togl, PixelScale), 0, NULL, FORMAT_MASK}, {TK_OPTION_BOOLEAN, TCL_STUPID "-rgba", "rgba", "Rgba", "true", -1, Tk_Offset(Togl, RgbaFlag), 0, NULL, FORMAT_MASK}, {TK_OPTION_INT, TCL_STUPID "-redsize", "redsize", "RedSize", "1", -1, Tk_Offset(Togl, RgbaRed), 0, NULL, FORMAT_MASK}, {TK_OPTION_INT, TCL_STUPID "-greensize", "greensize", "GreenSize", "1", -1, Tk_Offset(Togl, RgbaGreen), 0, NULL, FORMAT_MASK}, {TK_OPTION_INT, TCL_STUPID "-bluesize", "bluesize", "BlueSize", "1", -1, Tk_Offset(Togl, RgbaBlue), 0, NULL, FORMAT_MASK}, {TK_OPTION_BOOLEAN, TCL_STUPID "-double", "double", "Double", "false", -1, Tk_Offset(Togl, DoubleFlag), 0, NULL, FORMAT_MASK}, {TK_OPTION_BOOLEAN, TCL_STUPID "-depth", "depth", "Depth", "false", -1, Tk_Offset(Togl, DepthFlag), 0, NULL, FORMAT_MASK}, {TK_OPTION_INT, TCL_STUPID "-depthsize", "depthsize", "DepthSize", "1", -1, Tk_Offset(Togl, DepthSize), 0, NULL, FORMAT_MASK}, {TK_OPTION_BOOLEAN, TCL_STUPID "-accum", "accum", "Accum", "false", -1, Tk_Offset(Togl, AccumFlag), 0, NULL, FORMAT_MASK}, {TK_OPTION_INT, TCL_STUPID "-accumredsize", "accumredsize", "AccumRedSize", "1", -1, Tk_Offset(Togl, AccumRed), 0, NULL, FORMAT_MASK}, {TK_OPTION_INT, TCL_STUPID "-accumgreensize", "accumgreensize", "AccumGreenSize", "1", -1, Tk_Offset(Togl, AccumGreen), 0, NULL, FORMAT_MASK}, {TK_OPTION_INT, TCL_STUPID "-accumbluesize", "accumbluesize", "AccumBlueSize", "1", -1, Tk_Offset(Togl, AccumBlue), 0, NULL, FORMAT_MASK}, {TK_OPTION_INT, TCL_STUPID "-accumalphasize", "accumalphasize", "AccumAlphaSize", "1", -1, Tk_Offset(Togl, AccumAlpha), 0, NULL, FORMAT_MASK}, {TK_OPTION_BOOLEAN, TCL_STUPID "-alpha", "alpha", "Alpha", "false", -1, Tk_Offset(Togl, AlphaFlag), 0, NULL, FORMAT_MASK}, {TK_OPTION_INT, TCL_STUPID "-alphasize", "alphasize", "AlphaSize", "1", -1, Tk_Offset(Togl, AlphaSize), 0, NULL, FORMAT_MASK}, {TK_OPTION_BOOLEAN, TCL_STUPID "-stencil", "stencil", "Stencil", "false", -1, Tk_Offset(Togl, StencilFlag), 0, NULL, FORMAT_MASK}, {TK_OPTION_INT, TCL_STUPID "-stencilsize", "stencilsize", "StencilSize", "1", -1, Tk_Offset(Togl, StencilSize), 0, NULL, FORMAT_MASK}, {TK_OPTION_INT, TCL_STUPID "-auxbuffers", "auxbuffers", "AuxBuffers", "0", -1, Tk_Offset(Togl, AuxNumber), 0, NULL, FORMAT_MASK}, {TK_OPTION_BOOLEAN, TCL_STUPID "-privatecmap", "privateCmap", "PrivateCmap", "false", -1, Tk_Offset(Togl, PrivateCmapFlag), 0, NULL, FORMAT_MASK}, {TK_OPTION_BOOLEAN, TCL_STUPID "-overlay", "overlay", "Overlay", "false", -1, Tk_Offset(Togl, OverlayFlag), 0, NULL, OVERLAY_MASK}, {TK_OPTION_CUSTOM, TCL_STUPID "-stereo", "stereo", "Stereo", "", -1, Tk_Offset(Togl, Stereo), 0, (ClientData) &stereoOption, STEREO_FORMAT_MASK}, {TK_OPTION_DOUBLE, TCL_STUPID "-eyeseparation", "eyeseparation", "EyeSeparation", "2.0", -1, Tk_Offset(Togl, EyeSeparation), 0, NULL, STEREO_MASK}, {TK_OPTION_DOUBLE, TCL_STUPID "-convergence", "convergence", "Convergence", "35.0", -1, Tk_Offset(Togl, Convergence), 0, NULL, STEREO_MASK}, #ifndef NO_TK_CURSOR {TK_OPTION_CURSOR, TCL_STUPID "-cursor", "cursor", "Cursor", "", -1, Tk_Offset(Togl, Cursor), TK_OPTION_NULL_OK, NULL, CURSOR_MASK}, #endif {TK_OPTION_INT, TCL_STUPID "-setgrid", "setGrid", "SetGrid", "0", -1, Tk_Offset(Togl, SetGrid), 0, NULL, GEOMETRY_MASK}, {TK_OPTION_INT, TCL_STUPID "-time", "time", "Time", DEFAULT_TIME, -1, Tk_Offset(Togl, TimerInterval), 0, NULL, TIMER_MASK}, {TK_OPTION_STRING, TCL_STUPID "-sharelist", "sharelist", "ShareList", NULL, -1, Tk_Offset(Togl, ShareList), 0, NULL, FORMAT_MASK}, {TK_OPTION_STRING, TCL_STUPID "-sharecontext", "sharecontext", "ShareContext", NULL, -1, Tk_Offset(Togl, ShareContext), 0, NULL, FORMAT_MASK}, {TK_OPTION_STRING, TCL_STUPID "-ident", "ident", "Ident", DEFAULT_IDENT, -1, Tk_Offset(Togl, Ident), 0, NULL, 0}, {TK_OPTION_BOOLEAN, TCL_STUPID "-indirect", "indirect", "Indirect", "false", -1, Tk_Offset(Togl, Indirect), 0, NULL, FORMAT_MASK}, {TK_OPTION_CUSTOM, TCL_STUPID "-pixelformat", "pixelFormat", "PixelFormat", "0", -1, Tk_Offset(Togl, PixelFormat), 0, (ClientData) &wideIntOption, FORMAT_MASK}, {TK_OPTION_INT, TCL_STUPID "-swapinterval", "swapInterval", "SwapInterval", "1", -1, Tk_Offset(Togl, SwapInterval), 0, NULL, SWAP_MASK}, #if 0 {TK_OPTION_BOOLEAN, TCL_STUPID "-fullscreen", "fullscreen", "Fullscreen", "false", -1, Tk_Offset(Togl, FullscreenFlag), 0, NULL, GEOMETRY_MASK|FORMAT_MASK}, #endif {TK_OPTION_BOOLEAN, TCL_STUPID "-multisample", "multisample", "Multisample", "false", -1, Tk_Offset(Togl, MultisampleFlag), 0, NULL, FORMAT_MASK}, {TK_OPTION_BOOLEAN, TCL_STUPID "-pbuffer", "pbuffer", "Pbuffer", "false", -1, Tk_Offset(Togl, PbufferFlag), 0, NULL, FORMAT_MASK}, {TK_OPTION_BOOLEAN, TCL_STUPID "-largestpbuffer", "largestpbuffer", "LargestPbuffer", "false", -1, Tk_Offset(Togl, LargestPbufferFlag), 0, NULL, 0}, {TK_OPTION_STRING, TCL_STUPID "-createcommand", "createCommand", "CallbackCommand", NULL, Tk_Offset(Togl, CreateProc), -1, TK_OPTION_NULL_OK, NULL, 0}, {TK_OPTION_SYNONYM, TCL_STUPID "-create", NULL, NULL, NULL, -1, -1, 0, (ClientData) "-createcommand", 0}, {TK_OPTION_STRING, TCL_STUPID "-displaycommand", "displayCommand", "CallbackCommand", NULL, Tk_Offset(Togl, DisplayProc), -1, TK_OPTION_NULL_OK, NULL, 0}, {TK_OPTION_SYNONYM, TCL_STUPID "-display", NULL, NULL, NULL, -1, -1, 0, (ClientData) "-displaycommand", 0}, {TK_OPTION_STRING, TCL_STUPID "-reshapecommand", "reshapeCommand", "CallbackCommand", NULL, Tk_Offset(Togl, ReshapeProc), -1, TK_OPTION_NULL_OK, NULL, 0}, {TK_OPTION_SYNONYM, TCL_STUPID "-reshape", NULL, NULL, NULL, -1, -1, 0, (ClientData) "-reshapecommand", 0}, {TK_OPTION_STRING, TCL_STUPID "-destroycommand", "destroyCommand", "CallbackCommand", NULL, Tk_Offset(Togl, DestroyProc), -1, TK_OPTION_NULL_OK, NULL, 0}, {TK_OPTION_SYNONYM, TCL_STUPID "-destroy", NULL, NULL, NULL, -1, -1, 0, (ClientData) "-destroycommand", 0}, {TK_OPTION_STRING, TCL_STUPID "-timercommand", "timerCommand", "CallabckCommand", NULL, Tk_Offset(Togl, TimerProc), -1, TK_OPTION_NULL_OK, NULL, 0}, {TK_OPTION_SYNONYM, TCL_STUPID "-timer", NULL, NULL, NULL, -1, -1, 0, (ClientData) "-timercommand", 0}, {TK_OPTION_STRING, TCL_STUPID "-overlaydisplaycommand", "overlaydisplayCommand", "CallbackCommand", NULL, Tk_Offset(Togl, OverlayDisplayProc), -1, TK_OPTION_NULL_OK, NULL, OVERLAY_MASK}, {TK_OPTION_SYNONYM, TCL_STUPID "-overlaydisplay", NULL, NULL, NULL, -1, -1, 0, (ClientData) "-overlaydisplaycommand", 0}, {TK_OPTION_STRING, TCL_STUPID "-magnifycommand", "magnifyCommand", "CallbackCommand", NULL, Tk_Offset(Togl, MagnifyProc), -1, TK_OPTION_NULL_OK, NULL, 0}, {TK_OPTION_STRING, TCL_STUPID "-rotatecommand", "rotateCommand", "CallbackCommand", NULL, Tk_Offset(Togl, RotateProc), -1, TK_OPTION_NULL_OK, NULL, 0}, {TK_OPTION_STRING, TCL_STUPID "-scrollcommand", "scrollCommand", "CallbackCommand", NULL, Tk_Offset(Togl, ScrollProc), -1, TK_OPTION_NULL_OK, NULL, 0}, {TK_OPTION_STRING, TCL_STUPID "-scrollwheelcommand", "scrollWheelCommand", "CallbackCommand", NULL, Tk_Offset(Togl, ScrollWheelProc), -1, TK_OPTION_NULL_OK, NULL, 0}, {TK_OPTION_STRING, TCL_STUPID "-touchescommand", "touchesCommand", "CallbackCommand", NULL, Tk_Offset(Togl, TouchesProc), -1, TK_OPTION_NULL_OK, NULL, 0}, /* Tcl3D backwards compatibility */ {TK_OPTION_SYNONYM, TCL_STUPID "-createproc", NULL, NULL, NULL, -1, -1, 0, (ClientData) "-createcommand", 0}, {TK_OPTION_SYNONYM, TCL_STUPID "-displayproc", NULL, NULL, NULL, -1, -1, 0, (ClientData) "-displaycommand", 0}, {TK_OPTION_SYNONYM, TCL_STUPID "-reshapeproc", NULL, NULL, NULL, -1, -1, 0, (ClientData) "-reshapecommand", 0}, /* end Tcl3D compatibility */ {TK_OPTION_END, NULL, NULL, NULL, NULL, -1, -1, 0, NULL, 0} }; /* * Add given togl widget to linked list. */ static void AddToList(Togl *t) { t->Next = t->tpg->toglHead; t->tpg->toglHead = t; } /* * Remove given togl widget from linked list. */ static void RemoveFromList(Togl *t) { Togl *prev; Togl *cur; for (cur = t->tpg->toglHead, prev = NULL; cur; prev = cur, cur = cur->Next) { if (t != cur) continue; if (prev) { prev->Next = cur->Next; } else { t->tpg->toglHead = cur->Next; } break; } if (cur) cur->Next = NULL; } /* * Return pointer to togl widget given a user identifier string. */ static Togl * FindTogl(Togl *togl, const char *ident) { Togl *t; if (ident[0] != '.') { for (t = togl->tpg->toglHead; t; t = t->Next) { if (strcmp(t->Ident, ident) == 0) break; } } else { for (t = togl->tpg->toglHead; t; t = t->Next) { const char *pathname = Tk_PathName(t->TkWin); if (strcmp(pathname, ident) == 0) break; } } return t; } /* * Return pointer to another togl widget with same OpenGL context. */ static Togl * FindToglWithSameContext(const Togl *togl) { Togl *t; for (t = togl->tpg->toglHead; t != NULL; t = t->Next) { if (t == togl) continue; if (t->Ctx == togl->Ctx) { return t; } } return NULL; } #if TOGL_USE_OVERLAY /* * Return pointer to another togl widget with same OpenGL overlay context. */ static Togl * FindToglWithSameOverlayContext(const Togl *togl) { Togl *t; for (t = togl->tpg->toglHead; t != NULL; t = t->Next) { if (t == togl) continue; # if defined(TOGL_X11) if (t->OverlayCtx == togl->OverlayCtx) # elif defined(TOGL_WGL) if (t->tglGLOverlayHglrc == togl->tglGLOverlayHglrc) # endif { return t; } } return NULL; } #endif #if defined(TOGL_X11) /* * Return an X colormap to use for OpenGL RGB-mode rendering. * Input: dpy - the X display * scrnum - the X screen number * visinfo - the XVisualInfo as returned by glXChooseVisual() * Return: an X Colormap or 0 if there's a _serious_ error. */ static Colormap get_rgb_colormap(Display *dpy, int scrnum, const XVisualInfo *visinfo, Tk_Window tkwin) { Atom hp_cr_maps; Status status; int numCmaps; int i; XStandardColormap *standardCmaps; Window root = XRootWindow(dpy, scrnum); Bool using_mesa; /* * First check if visinfo's visual matches the default/root visual. */ if (visinfo->visual == Tk_Visual(tkwin)) { /* use the default/root colormap */ Colormap cmap; cmap = Tk_Colormap(tkwin); # ifdef MESA_COLOR_HACK (void) get_free_color_cells(dpy, scrnum, cmap); # endif return cmap; } /* * Check if we're using Mesa. */ if (strstr(glXQueryServerString(dpy, scrnum, GLX_VERSION), "Mesa")) { using_mesa = True; } else { using_mesa = False; } /* * Next, if we're using Mesa and displaying on an HP with the "Color * Recovery" feature and the visual is 8-bit TrueColor, search for a * special colormap initialized for dithering. Mesa will know how to * dither using this colormap. */ if (using_mesa) { hp_cr_maps = XInternAtom(dpy, "_HP_RGB_SMOOTH_MAP_LIST", True); if (hp_cr_maps # ifdef __cplusplus && visinfo->visual->c_class == TrueColor # else && visinfo->visual->class == TrueColor # endif && visinfo->depth == 8) { status = XGetRGBColormaps(dpy, root, &standardCmaps, &numCmaps, hp_cr_maps); if (status) { for (i = 0; i < numCmaps; i++) { if (standardCmaps[i].visualid == visinfo->visual->visualid) { Colormap cmap = standardCmaps[i].colormap; (void) XFree(standardCmaps); return cmap; } } (void) XFree(standardCmaps); } } } /* * Next, try to find a standard X colormap. */ # if !HP && !SUN # ifndef SOLARIS_BUG status = XmuLookupStandardColormap(dpy, visinfo->screen, visinfo->visualid, visinfo->depth, XA_RGB_DEFAULT_MAP, /* replace */ False, /* retain */ True); if (status == 1) { status = XGetRGBColormaps(dpy, root, &standardCmaps, &numCmaps, XA_RGB_DEFAULT_MAP); if (status == 1) { for (i = 0; i < numCmaps; i++) { if (standardCmaps[i].visualid == visinfo->visualid) { Colormap cmap = standardCmaps[i].colormap; (void) XFree(standardCmaps); return cmap; } } (void) XFree(standardCmaps); } } # endif # endif /* * If we get here, give up and just allocate a new colormap. */ return XCreateColormap(dpy, root, visinfo->visual, AllocNone); } #elif defined(TOGL_WGL) /* Code to create RGB palette is taken from the GENGL sample program of Win32 * SDK */ static const unsigned char threeto8[8] = { 0, 0111 >> 1, 0222 >> 1, 0333 >> 1, 0444 >> 1, 0555 >> 1, 0666 >> 1, 0377 }; static const unsigned char twoto8[4] = { 0, 0x55, 0xaa, 0xff }; static const unsigned char oneto8[2] = { 0, 255 }; static const int defaultOverride[13] = { 0, 3, 24, 27, 64, 67, 88, 173, 181, 236, 247, 164, 91 }; static const PALETTEENTRY defaultPalEntry[20] = { {0, 0, 0, 0}, {0x80, 0, 0, 0}, {0, 0x80, 0, 0}, {0x80, 0x80, 0, 0}, {0, 0, 0x80, 0}, {0x80, 0, 0x80, 0}, {0, 0x80, 0x80, 0}, {0xC0, 0xC0, 0xC0, 0}, {192, 220, 192, 0}, {166, 202, 240, 0}, {255, 251, 240, 0}, {160, 160, 164, 0}, {0x80, 0x80, 0x80, 0}, {0xFF, 0, 0, 0}, {0, 0xFF, 0, 0}, {0xFF, 0xFF, 0, 0}, {0, 0, 0xFF, 0}, {0xFF, 0, 0xFF, 0}, {0, 0xFF, 0xFF, 0}, {0xFF, 0xFF, 0xFF, 0} }; static unsigned char ComponentFromIndex(int i, UINT nbits, UINT shift) { unsigned char val; val = (unsigned char) (i >> shift); switch (nbits) { case 1: val &= 0x1; return oneto8[val]; case 2: val &= 0x3; return twoto8[val]; case 3: val &= 0x7; return threeto8[val]; default: return 0; } } static Colormap Win32CreateRgbColormap(PIXELFORMATDESCRIPTOR pfd) { TkWinColormap *cmap = (TkWinColormap *) ckalloc(sizeof (TkWinColormap)); LOGPALETTE *pPal; int n, i; n = 1 << pfd.cColorBits; pPal = (PLOGPALETTE) LocalAlloc(LMEM_FIXED, sizeof (LOGPALETTE) + n * sizeof (PALETTEENTRY)); pPal->palVersion = 0x300; pPal->palNumEntries = n; for (i = 0; i < n; i++) { pPal->palPalEntry[i].peRed = ComponentFromIndex(i, pfd.cRedBits, pfd.cRedShift); pPal->palPalEntry[i].peGreen = ComponentFromIndex(i, pfd.cGreenBits, pfd.cGreenShift); pPal->palPalEntry[i].peBlue = ComponentFromIndex(i, pfd.cBlueBits, pfd.cBlueShift); pPal->palPalEntry[i].peFlags = 0; } /* fix up the palette to include the default GDI palette */ if ((pfd.cColorBits == 8) && (pfd.cRedBits == 3) && (pfd.cRedShift == 0) && (pfd.cGreenBits == 3) && (pfd.cGreenShift == 3) && (pfd.cBlueBits == 2) && (pfd.cBlueShift == 6)) { for (i = 1; i <= 12; i++) pPal->palPalEntry[defaultOverride[i]] = defaultPalEntry[i]; } cmap->palette = CreatePalette(pPal); LocalFree(pPal); cmap->size = n; cmap->stale = 0; /* Since this is a private colormap of a fix size, we do not need a valid * hash table, but a dummy one */ Tcl_InitHashTable(&cmap->refCounts, TCL_ONE_WORD_KEYS); return (Colormap) cmap; } static Colormap Win32CreateCiColormap(Togl *togl) { /* Create a colormap with size of togl->CiColormapSize and set all entries * to black */ LOGPALETTE logPalette; TkWinColormap *cmap = (TkWinColormap *) ckalloc(sizeof (TkWinColormap)); logPalette.palVersion = 0x300; logPalette.palNumEntries = 1; logPalette.palPalEntry[0].peRed = 0; logPalette.palPalEntry[0].peGreen = 0; logPalette.palPalEntry[0].peBlue = 0; logPalette.palPalEntry[0].peFlags = 0; cmap->palette = CreatePalette(&logPalette); cmap->size = togl->CiColormapSize; ResizePalette(cmap->palette, cmap->size); /* sets new entries to black */ cmap->stale = 0; /* Since this is a private colormap of a fix size, we do not need a valid * hash table, but a dummy one */ Tcl_InitHashTable(&cmap->refCounts, TCL_ONE_WORD_KEYS); return (Colormap) cmap; } /* ErrorExit is from */ static void ErrorExit(LPTSTR lpszFunction) { /* Retrieve the system error message for the last-error code */ LPTSTR lpMsgBuf; LPTSTR lpDisplayBuf; DWORD err = GetLastError(); if (err == 0) { /* The function said it failed, but GetLastError says it didn't, so * pretend it didn't. */ return; } FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, err, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &lpMsgBuf, 0, NULL); /* Display the error message and exit the process */ lpDisplayBuf = (LPTSTR) LocalAlloc(LMEM_ZEROINIT, (lstrlen(lpMsgBuf) + lstrlen(lpszFunction) + 40) * sizeof (TCHAR)); StringCchPrintf(lpDisplayBuf, LocalSize(lpDisplayBuf), TEXT("%s failed with error %ld: %s"), lpszFunction, err, lpMsgBuf); MessageBox(NULL, lpDisplayBuf, TEXT("Error"), MB_OK); LocalFree(lpMsgBuf); LocalFree(lpDisplayBuf); ExitProcess(err); } #endif /* * Togl_Init * * Called upon system startup to create togl command. */ int Togl_Init(Tcl_Interp *interp) { int major, minor, patchLevel, releaseType; #ifdef USE_TCL_STUBS if (Tcl_InitStubs(interp, "8.1", 0) == NULL) { return TCL_ERROR; } #endif #ifdef USE_TK_STUBS if (Tk_InitStubs(interp, TCL_STUPID "8.1", 0) == NULL) { return TCL_ERROR; } #endif Tcl_GetVersion(&major, &minor, &patchLevel, &releaseType); #ifdef HAVE_TK_SETCLASSPROCS if (major > 8 || (major == 8 && (minor > 4 || (minor == 4 && (releaseType > 0 || patchLevel >= 2))))) { # ifdef USE_TK_STUBS SetClassProcsPtr = tkStubsPtr->tk_SetClassProcs; # else SetClassProcsPtr = Tk_SetClassProcs; # endif } else { SetClassProcsPtr = NULL; } #else if (major > 8 || (major == 8 && (minor > 4 || (minor == 4 && (releaseType > 0 || patchLevel >= 2))))) { TCL_ERR(interp, "Sorry, this instance of Togl was not compiled to work with Tcl/Tk 8.4a2 or higher."); } #endif if (Tcl_CreateObjCommand(interp, "togl", Togl_ObjCmd, NULL, Togl_ObjCmdDelete) == NULL) { return TCL_ERROR; } if (Tcl_PkgProvideEx(interp, "Togl", TOGL_VERSION, &toglStubs) != TCL_OK) { return TCL_ERROR; } return TCL_OK; } /* * Togl_CallCallback * * Call command with togl widget as only argument */ int Togl_CallCallback(Togl *togl, Tcl_Obj *cmd) { int result; Tcl_Obj *objv[3]; if (cmd == NULL || togl->widgetCmd == NULL) return TCL_OK; objv[0] = cmd; Tcl_IncrRefCount(objv[0]); objv[1] = Tcl_NewStringObj(Tcl_GetCommandName(togl->Interp, togl->widgetCmd), -1); Tcl_IncrRefCount(objv[1]); objv[2] = NULL; result = Tcl_EvalObjv(togl->Interp, 2, objv, TCL_EVAL_GLOBAL); Tcl_DecrRefCount(objv[1]); Tcl_DecrRefCount(objv[0]); if (result != TCL_OK) Tcl_BackgroundError(togl->Interp); return result; } static int Togl_CallCallback_P(Togl *togl, Tcl_Obj *cmd, double *params, int nparams) { int result, i; Tcl_Obj **objv = (Tcl_Obj **)malloc((3+nparams)*sizeof(Tcl_Obj *)); if (cmd == NULL || togl->widgetCmd == NULL) return TCL_OK; objv[0] = cmd; Tcl_IncrRefCount(objv[0]); objv[1] = Tcl_NewStringObj(Tcl_GetCommandName(togl->Interp, togl->widgetCmd), -1); Tcl_IncrRefCount(objv[1]); for (i = 0 ; i < nparams ; ++i) { objv[2+i] = Tcl_NewDoubleObj(params[i]); Tcl_IncrRefCount(objv[2+i]); } objv[2+nparams] = NULL; result = Tcl_EvalObjv(togl->Interp, 2+nparams, objv, TCL_EVAL_GLOBAL); for (i = 1+nparams ; i >= 0 ; --i) Tcl_DecrRefCount(objv[i]); free(objv); if (result != TCL_OK) Tcl_BackgroundError(togl->Interp); return result; } /* * Togl_Timer * * Gets called from Tk_CreateTimerHandler. */ static void Togl_Timer(ClientData clientData) { Togl *togl = (Togl *) clientData; if (togl->TimerProc) { if (Togl_CallCallback(togl, togl->TimerProc) != TCL_OK) { togl->timerHandler = NULL; return; } /* * Re-register this callback since Tcl/Tk timers are "one-shot". * That is, after the timer callback is called it not normally * called again. That's not the behavior we want for Togl. */ togl->timerHandler = Tcl_CreateTimerHandler(togl->TimerInterval, Togl_Timer, (ClientData) togl); } } /* * Togl_MakeCurrent * * Bind the OpenGL rendering context to the specified * Togl widget. If given a NULL argument, then the * OpenGL context is released without assigning a new one. */ void Togl_MakeCurrent(const Togl *togl) { #if defined(TOGL_WGL) int res = TRUE; if (togl == NULL) { HDC hdc = wglGetCurrentDC(); if (hdc != NULL) res = wglMakeCurrent(hdc, NULL); } else { if (togl->pbufferLost) { Bool keepContext = FindToglWithSameContext(togl) != NULL; Togl *t = (Togl *) togl; /* conceptually const */ if (!keepContext) { wglDeleteContext(t->Ctx); } togl_destroyPbuffer(t); t->pbuf = togl_createPbuffer(t); if (!keepContext) { t->Ctx = wglCreateContext(t->tglGLHdc); } } res = wglMakeCurrent(togl->tglGLHdc, togl->Ctx); } if (!res) { ErrorExit(TEXT("wglMakeCurrent")); } #elif defined(TOGL_X11) Display *display = togl ? togl->display : glXGetCurrentDisplay(); if (display) { GLXDrawable drawable; if (!togl) drawable = None; else if (togl->PbufferFlag) drawable = togl->pbuf; else if (togl->TkWin) drawable = Tk_WindowId(togl->TkWin); else drawable = None; (void) glXMakeCurrent(display, drawable, drawable ? togl->Ctx : NULL); } #elif defined(TOGL_AGL) if (togl == NULL || togl->Ctx == NULL) { (void) aglSetCurrentContext(NULL); } else { (void) aglSetCurrentContext(togl->Ctx); if (FindToglWithSameContext(togl) != NULL) { if (!togl->PbufferFlag) { AGLDrawable d = Togl_MacOSXGetDrawablePort(togl); aglSetDrawable(togl->Ctx, d); } else { GLint virtualScreen = aglGetVirtualScreen(togl->Ctx); aglSetPBuffer(togl->Ctx, togl->pbuf, 0, 0, virtualScreen); } } } #elif defined(TOGL_NSOPENGL) if (togl != NULL && togl->Ctx != NULL) { [togl->Ctx makeCurrentContext]; if (FindToglWithSameContext(togl) != NULL) { if (!togl->PbufferFlag) { [togl->Ctx setView:togl->nsview]; } else { GLint virtualScreen = [togl->Ctx currentVirtualScreen]; [togl->Ctx setPixelBuffer:togl->pbuf cubeMapFace:0 mipMapLevel:0 currentVirtualScreen:virtualScreen]; } } } #endif } /* * Togl_TakePhoto * * Take a photo image of the current OpenGL window. May have problems * if window is partially obscured, either by other windows or by the * edges of the display. */ int Togl_TakePhoto(Togl *togl, Tk_PhotoHandle photo) { GLubyte *buffer; Tk_PhotoImageBlock photoBlock; int y, midy; unsigned char *cp; int width = togl->Width, height = togl->Height; /* * TIP #116 altered Tk_PhotoPutBlock API to add interp arg that 8.4 * doesn't have. * We need to remove that for compiling with 8.4. */ #if (TK_MAJOR_VERSION == 8) && (TK_MINOR_VERSION < 5) # define TK_PHOTOPUTBLOCK(interp, hdl, blk, x, y, w, h, cr) \ Tk_PhotoPutBlock(hdl, blk, x, y, w, h, cr) #else # define TK_PHOTOPUTBLOCK Tk_PhotoPutBlock #endif buffer = (GLubyte *) ckalloc(width * height * 4); photoBlock.pixelPtr = buffer; photoBlock.width = width; photoBlock.height = height; photoBlock.pitch = width * 4; photoBlock.pixelSize = 4; photoBlock.offset[0] = 0; photoBlock.offset[1] = 1; photoBlock.offset[2] = 2; photoBlock.offset[3] = 3; if (!togl->RgbaFlag) { #if defined(TOGL_WGL) /* Due to the lack of a unique inverse mapping from the frame buffer to * the logical palette we need a translation map from the complete * logical palette. */ int n, i; TkWinColormap *cmap = (TkWinColormap *) Tk_Colormap(togl->TkWin); LPPALETTEENTRY entry = (LPPALETTEENTRY) malloc(togl->MapSize * sizeof (PALETTEENTRY)); n = GetPaletteEntries(cmap->palette, 0, togl->MapSize, entry); for (i = 0; i < n; i++) { togl->RedMap[i] = (GLfloat) (entry[i].peRed / 255.0); togl->GreenMap[i] = (GLfloat) (entry[i].peGreen / 255.0); togl->BlueMap[i] = (GLfloat) (entry[i].peBlue / 255.0); } free(entry); #endif /* TOGL_WGL */ glPixelMapfv(GL_PIXEL_MAP_I_TO_R, togl->MapSize, togl->RedMap); glPixelMapfv(GL_PIXEL_MAP_I_TO_G, togl->MapSize, togl->GreenMap); glPixelMapfv(GL_PIXEL_MAP_I_TO_B, togl->MapSize, togl->BlueMap); } glPushClientAttrib(GL_CLIENT_PIXEL_STORE_BIT); glPixelStorei(GL_PACK_ALIGNMENT, 4); /* guarantee performance */ glPixelStorei(GL_PACK_SWAP_BYTES, GL_FALSE); glPixelStorei(GL_PACK_SKIP_PIXELS, 0); #if 1 glPixelStorei(GL_PACK_ROW_LENGTH, 0); glPixelStorei(GL_PACK_SKIP_ROWS, 0); glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, buffer); /* Some OpenGL drivers are buggy and return zero for Alpha instead of one * for RGB pixel formats. If that is happening to you, upgrade your * graphics driver. */ /* OpenGL's origin is bottom-left, Tk Photo image's is top-left, so mirror * the rows around the middle row. */ midy = height / 2; cp = buffer; for (y = 0; y < midy; ++y) { int m_y = height - 1 - y; /* mirror y */ unsigned char *m_cp = buffer + m_y * photoBlock.pitch; int x; for (x = 0; x < photoBlock.pitch; ++x) { unsigned char c = *cp; *cp++ = *m_cp; *m_cp++ = c; } } #else /* OpenGL's origin is bottom-left, Tk Photo image's is top-left, so save * rows in reverse order. */ glPixelStorei(GL_PACK_ROW_LENGTH, width); glPixelStorei(GL_PACK_SKIP_ROWS, -1); glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, buffer + width * (height - 1) * 4); #endif TK_PHOTOPUTBLOCK(togl->Interp, photo, &photoBlock, 0, 0, width, height, TK_PHOTO_COMPOSITE_SET); glPopClientAttrib(); /* restore PACK_ALIGNMENT */ ckfree((char *) buffer); return TCL_OK; } Bool Togl_SwapInterval(const Togl *togl, int interval) { #ifdef TOGL_AGL GLint swapInterval = interval; return aglSetInteger(togl->Ctx, AGL_SWAP_INTERVAL, &swapInterval); #endif #ifdef TOGL_NSOPENGL GLint swapInterval = interval; [togl->Ctx setValues:&swapInterval forParameter:NSOpenGLCPSwapInterval]; return True; #endif #ifdef TOGL_WGL typedef BOOL (WINAPI *BOOLFuncInt) (int); typedef const char *(WINAPI *StrFuncHDC) (HDC); static BOOLFuncInt swapInterval = NULL; static BOOL initialized = False; if (!initialized) { const char *extensions; StrFuncHDC getExtensionsString; getExtensionsString = (StrFuncHDC) wglGetProcAddress("wglGetExtensionsStringARB"); if (getExtensionsString == NULL) getExtensionsString = (StrFuncHDC) wglGetProcAddress("wglGetExtensionsStringEXT"); if (getExtensionsString) { extensions = getExtensionsString(togl->tglGLHdc); if (strstr(extensions, "WGL_EXT_swap_control") != NULL) { swapInterval = (BOOLFuncInt) wglGetProcAddress("wglSwapIntervalEXT"); } } initialized = True; } if (swapInterval) return swapInterval(interval); return False; #endif #ifdef TOGL_X11 typedef int (*IntFuncInt) (int); static IntFuncInt swapInterval = NULL; static int initialized = False; if (!initialized) { const char *extensions = glXQueryExtensionsString(togl->display, Tk_ScreenNumber(togl->TkWin)); if (strstr(extensions, "GLX_SGI_swap_control") != NULL) { swapInterval = (IntFuncInt) Togl_GetProcAddr("glXSwapIntervalSGI"); } else if (strstr(extensions, "GLX_MESA_swap_control") != NULL) { swapInterval = (IntFuncInt) Togl_GetProcAddr("glXSwapIntervalMESA"); } initialized = True; } if (swapInterval) return swapInterval(interval) == 0; return False; #endif } #if defined(TOGL_AGL) /* tell OpenGL which part of the Mac window to render to */ static void SetMacBufRect(Togl *togl) { GLint wrect[4]; Rect r; MacDrawable *d = ((TkWindow *) togl->TkWin)->privatePtr; /* set wrect[0,1] to lower left corner of widget */ wrect[2] = Tk_Width(togl->TkWin); wrect[3] = Tk_Height(togl->TkWin); wrect[0] = d->xOff; GetPortBounds(Togl_MacOSXGetDrawablePort(togl), &r); wrect[1] = r.bottom - wrect[3] - d->yOff; if (togl->FullscreenFlag) { aglEnable(togl->Ctx, AGL_FS_CAPTURE_SINGLE); aglSetFullScreen(togl->Ctx, 0, 0, 0, 0); } else { aglUpdateContext(togl->Ctx); } aglSetInteger(togl->Ctx, AGL_BUFFER_RECT, wrect); aglEnable(togl->Ctx, AGL_BUFFER_RECT); } static void ReconfigureCB(CGDirectDisplayID display, CGDisplayChangeSummaryFlags flags, void *closure) { /* Display reconfiguration callback. Documented as needed by Apple QA1209. * Updated for 10.3 (and later) to use * CGDisplayRegisterReconfigurationCallback. */ Togl *togl = (Togl *) closure; if (0 != (flags & kCGDisplayBeginConfigurationFlag)) return; /* wait until display is reconfigured */ SetMacBufRect(togl); Togl_MakeCurrent(togl); if (togl->Ctx) { if (togl->ReshapeProc) { Togl_CallCallback(togl, togl->ReshapeProc); } else { Togl_SetViewPort(togl); } } } #endif #if defined(TOGL_NSOPENGL) /* TODO: It appears that Tk only makes an NSView for toplevel windows. Also it looks like NSOpenGL does not have the equivalent of AGL_BUFFER_RECT that allows opengl drawing to just part of an NSView. So we might need to create our own NSView for controlling the opengl bounds. Look at TkMacOSXMakeRealWindowExist() in tkMacOSXWm.c. */ /* tell OpenGL which part of the Mac window to render to */ static void SetMacBufRect(Togl *togl) { Rect r, rt; NSRect rect; TkWindow *w = (TkWindow *) togl->TkWin; TkWindow *t = w->privatePtr->toplevel->winPtr; TkMacOSXWinBounds(w, &r); TkMacOSXWinBounds(t, &rt); rect.origin.x = r.left - rt.left; rect.origin.y = rt.bottom - r.bottom; rect.size.width = r.right - r.left; rect.size.height = r.bottom - r.top; [togl->nsview setFrame:rect]; [togl->Ctx update]; /* TODO: Support full screen. */ } static void ReconfigureCB(CGDirectDisplayID display, CGDisplayChangeSummaryFlags flags, void *closure) { /* Display reconfiguration callback. Documented as needed by Apple QA1209. * Updated for 10.3 (and later) to use * CGDisplayRegisterReconfigurationCallback. */ Togl *togl = (Togl *) closure; if (0 != (flags & kCGDisplayBeginConfigurationFlag)) return; /* wait until display is reconfigured */ SetMacBufRect(togl); Togl_MakeCurrent(togl); if (togl->Ctx) { if (togl->ReshapeProc) { Togl_CallCallback(togl, togl->ReshapeProc); } else { Togl_SetViewPort(togl); } } } #endif /* * Called when the widget's contents must be redrawn. Basically, we * just call the user's render callback function. * * Note that the parameter type is ClientData so this function can be * passed to Tk_DoWhenIdle(). */ static void Togl_Render(ClientData clientData) { Togl *togl = (Togl *) clientData; if (togl->DisplayProc) { Togl_MakeCurrent(togl); Togl_CallCallback(togl, togl->DisplayProc); } togl->UpdatePending = False; } static void Togl_RenderOverlay(ClientData clientData) { Togl *togl = (Togl *) clientData; if (togl->OverlayFlag && togl->OverlayDisplayProc) { #if defined(TOGL_WGL) int res = wglMakeCurrent(togl->tglGLHdc, togl->tglGLOverlayHglrc); if (!res) { ErrorExit(TEXT("wglMakeCurrent overlay")); } #elif defined(TOGL_X11) (void) glXMakeCurrent(Tk_Display(togl->TkWin), togl->OverlayWindow, togl->OverlayCtx); #endif /* TOGL_WGL */ Togl_CallCallback(togl, togl->OverlayDisplayProc); } togl->OverlayUpdatePending = False; } static int Togl_EnterStereo(Togl *togl) { if (togl->Stereo == TOGL_STEREO_ROW_INTERLEAVED) { GLint stencil_bits; Tk_Window top; Togl_MakeCurrent(togl); glGetIntegerv(GL_STENCIL_BITS, &stencil_bits); if (stencil_bits == 0) { Tcl_SetResult(togl->Interp, TCL_STUPID "need stencil buffer for row interleaved stereo", TCL_STATIC); return False; } togl->riStencilBit = 1u << (stencil_bits - 1); glEnable(GL_STENCIL_TEST); /* Need to redraw window when moved between odd and even scanlines, so * bind to top level window so we're notified when that happens. */ top = togl->TkWin; while (!Tk_IsTopLevel(top)) { top = Tk_Parent(top); if (top == NULL) break; } if (top) { Tk_CreateEventHandler(top, StructureNotifyMask, Togl_RedisplayProc, (ClientData) togl); } } return True; } static void Togl_LeaveStereo(Togl *togl, int oldStereo) { switch (oldStereo) { default: break; #ifdef HAVE_AUTOSTEREO case TOGL_STEREO_NATIVE: if (togl->ash != -1) { ASClosedStereoWindow(togl->ash); togl->ash = -1; } break; #endif #ifdef __sgi case TOGL_STEREO_SGIOLDSTYLE: togl->currentStereoBuffer = STEREO_BUFFER_NONE; glXWaitGL(); /* sync with GL command stream before calling X */ XSGISetStereoBuffer(togl->display, Tk_WindowId(togl->TkWin), togl->currentStereoBuffer); glXWaitX(); /* sync with X command stream before calling GL */ break; #endif case TOGL_STEREO_ROW_INTERLEAVED: if (togl->riStencilBit) { Tk_Window top; glDisable(GL_STENCIL_TEST); /* need to remove previously added top level event handler */ top = togl->TkWin; while (!Tk_IsTopLevel(top)) { top = Tk_Parent(top); if (top == NULL) break; } if (top) { Tk_DeleteEventHandler(top, StructureNotifyMask, Togl_RedisplayProc, (ClientData) togl); } } break; } } /* * See domentation about what can't be changed */ static int Togl_ObjConfigure(Tcl_Interp *interp, Togl *togl, int objc, Tcl_Obj *const *objv) { Tk_SavedOptions savedOptions; int error, mask; int undoMask = 0; Tcl_Obj *errorResult = NULL; int oldStereo = togl->Stereo; int oldWidth = togl->Width; int oldHeight = togl->Height; for (error = 0; error <= 1; ++error, mask = undoMask) { if (error == 0) { /* * Tk_SetOptions parses the command arguments * and looks for defaults in the resource database. */ if (Tk_SetOptions(interp, WIDGREC togl, togl->tpg->optionTable, objc, objv, togl->TkWin, &savedOptions, &mask) != TCL_OK) { /* previous values are restored, so nothing to do */ return TCL_ERROR; } } else { /* * Restore options from saved values */ errorResult = Tcl_GetObjResult(interp); Tcl_IncrRefCount(errorResult); Tk_RestoreSavedOptions(&savedOptions); } if (togl->Ident && togl->Ident[0] == '.') { Tcl_AppendResult(interp, "Can not set ident to a window path name", NULL); continue; } if (togl->FullscreenFlag) { /* override width and height */ togl->Width = WidthOfScreen(Tk_Screen(togl->TkWin)); togl->Height = HeightOfScreen(Tk_Screen(togl->TkWin)); undoMask |= GEOMETRY_MASK; } if (mask & GEOMETRY_MASK) { if (!togl->PbufferFlag) { Togl_WorldChanged((ClientData) togl); /* Reset width and height so ConfigureNotify * event will call reshape callback */ togl->Width = oldWidth; togl->Height = oldHeight; undoMask |= GEOMETRY_MASK; } } if (mask & OVERLAY_MASK) { #if !TOGL_USE_OVERLAY if (togl->OverlayFlag) { Tcl_AppendResult(interp, "Sorry, overlay was disabled", NULL); continue; } #else # if defined(TOGL_X11) if (togl->OverlayCtx) # elif defined(TOGL_WGL) if (togl->tglGLOverlayHglrc) # endif { /* * Trying to change existing pixel format/graphics context */ Tcl_AppendResult(interp, "Unable to change overlay pixel format", NULL); continue; } #endif } if (mask & SWAP_MASK) { if (togl->Ctx) { /* * Change existing swap interval */ Togl_MakeCurrent(togl); /* TODO: needed? */ Togl_SwapInterval(togl, togl->SwapInterval); undoMask |= SWAP_MASK; } } if (error == 0 && (mask & STEREO_FORMAT_MASK) != 0) { if (oldStereo == TOGL_STEREO_NATIVE || togl->Stereo == TOGL_STEREO_NATIVE) { /* only native stereo affects the visual format */ mask |= FORMAT_MASK; } if (togl->Stereo == TOGL_STEREO_SGIOLDSTYLE) { #ifndef __sgi Tcl_AppendResult(interp, "sgioldstyle: only available on SGI computers", NULL); continue; #else int event, error; /* Make sure Display supports SGIStereo */ if (XSGIStereoQueryExtension(Tk_Display(togl->TkWin), &event, &error) == False) { Tcl_AppendResult(interp, "sgioldstyle: SGIStereo X extension is missing", NULL); continue; } /* Make sure Window (Screen) supports SGIStereo */ if (XSGIQueryStereoMode(Tk_Display(togl->TkWin), Tk_WindowId(Tk_Parent(togl->TkWin))) == X_STEREO_UNSUPPORTED) { Tcl_AppendResult(interp, "sgioldstyle: unsupported by screen", NULL); continue; } #endif } } if (mask & FORMAT_MASK) { if (togl->Ctx) { /* * Trying to change existing pixel format/graphics context * TODO: (re)create graphics context * * save old graphics context * try to create new one and share display lists * if failure, then restore old one */ Tcl_AppendResult(interp, "Unable to change pixel format", NULL); continue; } if (togl->ShareContext && togl->ShareList) { Tcl_AppendResult(interp, "only one of -sharelist and -sharecontext allowed", NULL); continue; } if (togl->PbufferFlag && togl->Stereo) { Tcl_AppendResult(interp, "pbuffer not supported with stereo", NULL); continue; } if (togl->PbufferFlag && togl->OverlayFlag) { Tcl_AppendResult(interp, "pbuffer not supported with overlay", NULL); continue; } if (togl->FullscreenFlag) { #if defined(TOGL_NSOPENGL) Tcl_AppendResult(interp, "Fullscreen not supported with Cocoa Tk", NULL); continue; #endif #ifndef TOGL_AGL # if TK_MAJOR_VERSION < 8 || (TK_MAJOR_VERSION == 8 && TK_MINOR_VERSION < 5) Tcl_AppendResult(interp, "Need Tk 8.5 or later for fullscreen support", NULL); continue; # endif #endif } /* Whether or not the format is okay is figured out when togl tries * to create the window. */ #ifdef MESA_COLOR_HACK free_default_color_cells(Tk_Display(togl->TkWin), Tk_Colormap(togl->TkWin)); #endif undoMask |= FORMAT_MASK; } if (togl->Ctx) { if (oldStereo != togl->Stereo) { /* leaving stereo */ Togl_LeaveStereo(togl, oldStereo); if (togl->Stereo && !Togl_EnterStereo(togl)) continue; } } if (mask & TIMER_MASK) { if (togl->timerHandler != NULL) { Tcl_DeleteTimerHandler(togl->timerHandler); } if (togl->TimerProc) { togl->timerHandler = Tcl_CreateTimerHandler(togl->TimerInterval, Togl_Timer, (ClientData) togl); } undoMask |= TIMER_MASK; } break; } if (error == 0) { Tk_FreeSavedOptions(&savedOptions); return TCL_OK; } else { Tcl_SetObjResult(interp, errorResult); Tcl_DecrRefCount(errorResult); return TCL_ERROR; } } static int Togl_ObjWidget(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { Togl *togl = (Togl *) clientData; const char *commands[] = { "cget", "configure", "extensions", "postredisplay", "render", "swapbuffers", "makecurrent", "takephoto", "loadbitmapfont", "unloadbitmapfont", "write", "uselayer", "showoverlay", "hideoverlay", "postredisplayoverlay", "renderoverlay", "existsoverlay", "ismappedoverlay", "getoverlaytransparentvalue", "drawbuffer", "clear", "frustum", "ortho", "numeyes", "contexttag", "copycontextto", "maketopfortrackpadevents", NULL }; enum command { TOGL_CGET, TOGL_CONFIGURE, TOGL_EXTENSIONS, TOGL_POSTREDISPLAY, TOGL_RENDER, TOGL_SWAPBUFFERS, TOGL_MAKECURRENT, TOGL_TAKEPHOTO, TOGL_LOADBITMAPFONT, TOGL_UNLOADBITMAPFONT, TOGL_WRITE, TOGL_USELAYER, TOGL_SHOWOVERLAY, TOGL_HIDEOVERLAY, TOGL_POSTREDISPLAYOVERLAY, TOGL_RENDEROVERLAY, TOGL_EXISTSOVERLAY, TOGL_ISMAPPEDOVERLAY, TOGL_GETOVERLAYTRANSPARENTVALUE, TOGL_DRAWBUFFER, TOGL_CLEAR, TOGL_FRUSTUM, TOGL_ORTHO, TOGL_NUMEYES, TOGL_CONTEXTTAG, TOGL_COPYCONTEXTTO, TOGL_MAKETOPFORTRACKPADEVENTS }; int result = TCL_OK; Tcl_Obj *objPtr; int index; if (objc < 2) { Tcl_WrongNumArgs(interp, 1, objv, "command ?arg arg ...?"); return TCL_ERROR; } Tk_Preserve((ClientData) togl); result = Tcl_GetIndexFromObj(interp, objv[1], commands, "option", 0, &index); switch (index) { case TOGL_CGET: if (objc != 3) { Tcl_WrongNumArgs(interp, 2, objv, "option"); result = TCL_ERROR; break; } objPtr = Tk_GetOptionValue(interp, WIDGREC togl, togl->tpg->optionTable, (objc == 3) ? objv[2] : NULL, togl->TkWin); if (objPtr == NULL) { result = TCL_ERROR; break; } Tcl_SetObjResult(interp, objPtr); break; case TOGL_CONFIGURE: if (objc <= 3) { /* * Return one item if the option is given, * or return all configuration information */ objPtr = Tk_GetOptionInfo(interp, WIDGREC togl, togl->tpg->optionTable, (objc == 3) ? objv[2] : NULL, togl->TkWin); if (objPtr == NULL) { result = TCL_ERROR; } else { Tcl_SetObjResult(interp, objPtr); } } else { /* Execute a configuration change */ result = Togl_ObjConfigure(interp, togl, objc - 2, objv + 2); } break; case TOGL_EXTENSIONS: /* Return a list of OpenGL extensions available */ /* TODO: -glu for glu extensions, -platform for glx/wgl extensions */ if (objc == 2) { const char *extensions; Tcl_Obj *objPtr; int length = -1; extensions = (const char *) glGetString(GL_EXTENSIONS); objPtr = Tcl_NewStringObj(extensions, -1); /* convert to list by asking for its length */ (void) Tcl_ListObjLength(interp, objPtr, &length); Tcl_SetObjResult(interp, objPtr); } else { Tcl_WrongNumArgs(interp, 2, objv, NULL); result = TCL_ERROR; } break; case TOGL_POSTREDISPLAY: /* schedule the widget to be redrawn */ if (objc == 2) { Togl_PostRedisplay(togl); } else { Tcl_WrongNumArgs(interp, 2, objv, NULL); result = TCL_ERROR; } break; case TOGL_RENDER: /* force the widget to be redrawn */ if (objc == 2) { Togl_Render((ClientData) togl); } else { Tcl_WrongNumArgs(interp, 2, objv, NULL); result = TCL_ERROR; } break; case TOGL_SWAPBUFFERS: /* force the widget to be redrawn */ if (objc == 2) { Togl_SwapBuffers(togl); } else { Tcl_WrongNumArgs(interp, 2, objv, NULL); result = TCL_ERROR; } break; case TOGL_MAKECURRENT: /* force the widget to be redrawn */ if (objc == 2) { Togl_MakeCurrent(togl); } else { Tcl_WrongNumArgs(interp, 2, objv, NULL); result = TCL_ERROR; } break; case TOGL_TAKEPHOTO: { /* force the widget to be redrawn */ if (objc != 3) { Tcl_WrongNumArgs(interp, 2, objv, "name"); result = TCL_ERROR; } else { const char *name; Tk_PhotoHandle photo; name = Tcl_GetStringFromObj(objv[2], NULL); photo = Tk_FindPhoto(interp, name); if (photo == NULL) { Tcl_AppendResult(interp, "image \"", name, "\" doesn't exist or is not a photo image", NULL); result = TCL_ERROR; break; } glPushAttrib(GL_PIXEL_MODE_BIT); if (togl->DoubleFlag) { glReadBuffer(GL_FRONT); } Togl_TakePhoto(togl, photo); glPopAttrib(); /* restore glReadBuffer */ } break; } case TOGL_LOADBITMAPFONT: #if TOGL_USE_FONTS != 1 Tcl_AppendResult(interp, "unsupported", NULL); result = TCL_ERROR; #else if (objc >= 3) { Tcl_Obj *font, *list; list = Tcl_NewListObj(objc - 2, objv + 2); Tcl_IncrRefCount(list); font = Togl_LoadBitmapFont(togl, Tcl_GetString(list)); Tcl_DecrRefCount(list); if (font) { Tcl_SetObjResult(interp, font); result = TCL_OK; } else { Tcl_AppendResult(interp, "Could not allocate font", NULL); result = TCL_ERROR; } } else { Tcl_WrongNumArgs(interp, 2, objv, "fontname"); result = TCL_ERROR; } #endif break; case TOGL_UNLOADBITMAPFONT: #if TOGL_USE_FONTS != 1 Tcl_AppendResult(interp, "unsupported", NULL); result = TCL_ERROR; #else if (objc == 3) { result = Togl_UnloadBitmapFont(togl, objv[2]); } else { Tcl_WrongNumArgs(interp, 2, objv, "toglfont"); result = TCL_ERROR; } #endif break; case TOGL_WRITE:{ #if TOGL_USE_FONTS != 1 Tcl_AppendResult(interp, "unsupported", NULL); result = TCL_ERROR; #else /* Tcl_Obj *toglfont = objv[2]; */ int wobjc = objc - 3; Tcl_Obj *const *wobjv = objv + 3; while (wobjc > 1) { const char *name = Tcl_GetStringFromObj(wobjv[0], NULL); int oc, i; Tcl_Obj **ov; double args[4]; if (Tcl_ListObjGetElements(NULL, wobjv[1], &oc, &ov) != TCL_OK) { oc = 0; } else if (oc <= 4) { for (i = 0; i < oc; ++i) { if (Tcl_GetDoubleFromObj(NULL, ov[i], &args[i]) != TCL_OK) { } } } if (strcmp(name, "-color") == 0) { if (oc == 4) glColor4d(args[0], args[1], args[2], args[3]); else if (oc == 3) glColor3d(args[0], args[1], args[2]); else goto write_usage; } else if (strcmp(name, "-pos") == 0) { if (oc == 4) glRasterPos4d(args[0], args[1], args[2], args[3]); else if (oc == 3) glRasterPos3d(args[0], args[1], args[2]); else if (oc == 2) glRasterPos2d(args[0], args[1]); else goto write_usage; } else goto write_usage; wobjc -= 2; wobjv += 2; } if (wobjc != 1) goto write_usage; result = Togl_WriteObj(togl, objv[2], wobjv[0]); if (result != -1) result = TCL_OK; else { Tcl_AppendResult(interp, "togl write failed", NULL); result = TCL_ERROR; } break; write_usage: Tcl_WrongNumArgs(interp, 2, objv, "[-pos {x y [z [w]]}]" " [-color {r g b [a]}" " string"); result = TCL_ERROR; #endif break; } case TOGL_USELAYER: if (objc == 3) { int layer; result = Tcl_GetIntFromObj(interp, objv[2], &layer); if (result == TCL_OK) { Togl_UseLayer(togl, layer); } } else { Tcl_WrongNumArgs(interp, 2, objv, "layer"); result = TCL_ERROR; } break; case TOGL_SHOWOVERLAY: if (objc == 2) { Togl_ShowOverlay(togl); } else { Tcl_WrongNumArgs(interp, 2, objv, NULL); result = TCL_ERROR; } break; case TOGL_HIDEOVERLAY: if (objc == 2) { Togl_HideOverlay(togl); } else { Tcl_WrongNumArgs(interp, 2, objv, NULL); result = TCL_ERROR; } break; case TOGL_POSTREDISPLAYOVERLAY: if (objc == 2) { Togl_PostOverlayRedisplay(togl); } else { Tcl_WrongNumArgs(interp, 2, objv, NULL); result = TCL_ERROR; } break; case TOGL_RENDEROVERLAY: /* force the overlay to be redrawn */ if (objc == 2) { Togl_RenderOverlay((ClientData) togl); } else { Tcl_WrongNumArgs(interp, 2, objv, NULL); result = TCL_ERROR; } break; case TOGL_EXISTSOVERLAY: if (objc == 2) { Tcl_SetObjResult(interp, Tcl_NewIntObj(Togl_ExistsOverlay(togl))); } else { Tcl_WrongNumArgs(interp, 2, objv, NULL); result = TCL_ERROR; } break; case TOGL_ISMAPPEDOVERLAY: if (objc == 2) { Tcl_SetObjResult(interp, Tcl_NewIntObj(Togl_IsMappedOverlay(togl))); } else { Tcl_WrongNumArgs(interp, 2, objv, NULL); result = TCL_ERROR; } break; case TOGL_GETOVERLAYTRANSPARENTVALUE: if (objc == 2) { Tcl_SetObjResult(interp, Tcl_NewIntObj(Togl_GetOverlayTransparentValue(togl))); } else { Tcl_WrongNumArgs(interp, 2, objv, NULL); result = TCL_ERROR; } break; case TOGL_DRAWBUFFER: if (objc != 3) { Tcl_WrongNumArgs(interp, 2, objv, "mode"); result = TCL_ERROR; } else { int mask; result = Tcl_GetIntFromObj(interp, objv[2], &mask); if (result == TCL_ERROR) break; Togl_DrawBuffer(togl, (GLenum) mask); } break; case TOGL_CLEAR: if (objc != 3) { Tcl_WrongNumArgs(interp, 2, objv, "mask"); result = TCL_ERROR; } else { int mask; result = Tcl_GetIntFromObj(interp, objv[2], &mask); if (result == TCL_ERROR) break; Togl_Clear(togl, (GLbitfield) mask); } break; case TOGL_FRUSTUM: if (objc != 8) { Tcl_WrongNumArgs(interp, 2, objv, "left right bottom top near far"); result = TCL_ERROR; } else { double left, right, bottom, top, zNear, zFar; if (Tcl_GetDoubleFromObj(interp, objv[2], &left) == TCL_ERROR || Tcl_GetDoubleFromObj(interp, objv[3], &right) == TCL_ERROR || Tcl_GetDoubleFromObj(interp, objv[4], &bottom) == TCL_ERROR || Tcl_GetDoubleFromObj(interp, objv[5], &top) == TCL_ERROR || Tcl_GetDoubleFromObj(interp, objv[6], &zNear) == TCL_ERROR || Tcl_GetDoubleFromObj(interp, objv[7], &zFar) == TCL_ERROR) { result = TCL_ERROR; break; } Togl_Frustum(togl, left, right, bottom, top, zNear, zFar); } break; case TOGL_ORTHO: if (objc != 8) { Tcl_WrongNumArgs(interp, 2, objv, "left right bottom top near far"); result = TCL_ERROR; } else { double left, right, bottom, top, zNear, zFar; if (Tcl_GetDoubleFromObj(interp, objv[2], &left) == TCL_ERROR || Tcl_GetDoubleFromObj(interp, objv[3], &right) == TCL_ERROR || Tcl_GetDoubleFromObj(interp, objv[4], &bottom) == TCL_ERROR || Tcl_GetDoubleFromObj(interp, objv[5], &top) == TCL_ERROR || Tcl_GetDoubleFromObj(interp, objv[6], &zNear) == TCL_ERROR || Tcl_GetDoubleFromObj(interp, objv[7], &zFar) == TCL_ERROR) { result = TCL_ERROR; break; } Togl_Ortho(togl, left, right, bottom, top, zNear, zFar); } break; case TOGL_NUMEYES: if (objc == 2) { Tcl_SetObjResult(interp, Tcl_NewIntObj(Togl_NumEyes(togl))); } else { Tcl_WrongNumArgs(interp, 2, objv, NULL); result = TCL_ERROR; } break; case TOGL_CONTEXTTAG: if (objc == 2) { Tcl_SetObjResult(interp, Tcl_NewIntObj(Togl_ContextTag(togl))); } else { Tcl_WrongNumArgs(interp, 2, objv, NULL); result = TCL_ERROR; } break; case TOGL_COPYCONTEXTTO: if (objc != 4) { Tcl_WrongNumArgs(interp, 2, objv, NULL); result = TCL_ERROR; } else { Togl *to; unsigned int mask; if (Togl_GetToglFromObj(togl->Interp, objv[2], &to) == TCL_ERROR || Tcl_GetIntFromObj(togl->Interp, objv[3], (int *) &mask) == TCL_ERROR) { result = TCL_ERROR; break; } result = Togl_CopyContext(togl, to, mask); } #ifdef TOGL_NSOPENGL case TOGL_MAKETOPFORTRACKPADEVENTS: if (objc == 2) { // This hack places the Togl NSView at the top of sibling views so that it receives // trackpad events. The hierarchy is not used for drawing, nor for mouse event dispatching. [togl->nsview retain]; [togl->nsview removeFromSuperview]; MacDrawable *d = ((TkWindow *) togl->TkWin)->privatePtr; NSView *topview = d->toplevel->view; [topview addSubview:togl->nsview]; [togl->nsview release]; } else { Tcl_WrongNumArgs(interp, 2, objv, NULL); result = TCL_ERROR; } break; #endif } Tk_Release((ClientData) togl); return result; } /* * Togl_ObjCmdDelete * * Called when togl command is removed from interpreter. */ static void Togl_ObjCmdDelete(ClientData clientData) { if (clientData != NULL) { Togl_PackageGlobals *tpg = (Togl_PackageGlobals *) clientData; Tk_DeleteOptionTable(tpg->optionTable); ckfree((char *) clientData); } } /* * Togl_ObjCmd * * Called when Togl is executed - creation of a Togl widget. * * Creates a new window * * Creates an 'Togl' data structure * * Creates an event handler for this window * * Creates a command that handles this object * * Configures this Togl for the given arguments */ int Togl_ObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { Togl_PackageGlobals *tpg; Togl *togl; Tk_Window tkwin; Tcl_SavedResult saveError; if (objc <= 1) { Tcl_WrongNumArgs(interp, 1, objv, "pathName ?options?"); return TCL_ERROR; } tpg = (Togl_PackageGlobals *) clientData; if (tpg == NULL) { Tcl_CmdInfo info; const char *name; /* * Initialize the Togl_PackageGlobals for this widget the * first time a Togl widget is created. The globals are * saved as our client data. */ tpg = (Togl_PackageGlobals *) ckalloc(sizeof (Togl_PackageGlobals)); if (tpg == NULL) { return TCL_ERROR; } tpg->nextContextTag = 0; tpg->optionTable = Tk_CreateOptionTable(interp, optionSpecs); tpg->toglHead = NULL; name = Tcl_GetString(objv[0]); Tcl_GetCommandInfo(interp, name, &info); info.objClientData = (ClientData) tpg; Tcl_SetCommandInfo(interp, name, &info); } /* Create the window. */ tkwin = Tk_CreateWindowFromPath(interp, Tk_MainWindow(interp), Tcl_GetString(objv[1]), NULL); if (tkwin == NULL) { return TCL_ERROR; } Tk_SetClass(tkwin, "Togl"); /* Create Togl data structure */ togl = (Togl *) ckalloc(sizeof (Togl)); if (togl == NULL) { return TCL_ERROR; } /* initialize Togl data structures values */ togl->Next = NULL; togl->Ctx = NULL; #if defined(TOGL_WGL) togl->tglGLHdc = NULL; togl->tglGLOverlayHglrc = NULL; #elif defined(TOGL_X11) togl->OverlayCtx = NULL; #endif togl->contextTag = 0; togl->display = Tk_Display(tkwin); togl->TkWin = tkwin; togl->Interp = interp; togl->VisInfo = NULL; togl->OverlayWindow = None; togl->OverlayCmap = None; togl->OverlayTransparentPixel = 0; togl->OverlayIsMapped = False; togl->UpdatePending = False; togl->OverlayUpdatePending = False; togl->tpg = tpg; togl->Client_Data = NULL; /* for color index mode photos */ togl->RedMap = togl->GreenMap = togl->BlueMap = NULL; togl->MapSize = 0; #ifndef NO_TK_CURSOR togl->Cursor = None; #endif togl->Width = 0; togl->Height = 0; togl->PixelScale = 1; togl->SetGrid = 0; togl->TimerInterval = 0; togl->RgbaFlag = True; togl->RgbaRed = 1; togl->RgbaGreen = 1; togl->RgbaBlue = 1; togl->DoubleFlag = False; togl->DepthFlag = False; togl->DepthSize = 1; togl->AccumFlag = False; togl->AccumRed = 1; togl->AccumGreen = 1; togl->AccumBlue = 1; togl->AccumAlpha = 1; togl->AlphaFlag = False; togl->AlphaSize = 1; togl->StencilFlag = False; togl->StencilSize = 1; togl->OverlayFlag = False; togl->Stereo = TOGL_STEREO_NONE; togl->EyeSeparation = 0; togl->Convergence = 0; togl->riStencilBit = 0; togl->AuxNumber = 0; togl->Indirect = False; togl->PixelFormat = 0; togl->SwapInterval = 1; togl->MultisampleFlag = False; togl->FullscreenFlag = False; togl->PbufferFlag = False; togl->LargestPbufferFlag = False; #if defined(TOGL_X11) togl->fbcfg = None; togl->pbuf = None; #elif defined(TOGL_WGL) togl->pbuf = None; togl->pbufferLost = 0; #elif defined(TOGL_AGL) togl->pbuf = NULL; #elif defined(TOGL_NSOPENGL) togl->pbuf = NULL; #endif togl->CreateProc = NULL; togl->DisplayProc = NULL; togl->ReshapeProc = NULL; togl->DestroyProc = NULL; togl->TimerProc = NULL; togl->timerHandler = NULL; togl->OverlayDisplayProc = NULL; togl->MagnifyProc = NULL; togl->RotateProc = NULL; togl->ScrollProc = NULL; togl->ScrollWheelProc = NULL; togl->TouchesProc = NULL; togl->ShareList = NULL; togl->ShareContext = NULL; togl->Ident = NULL; togl->PrivateCmapFlag = False; togl->currentStereoBuffer = STEREO_BUFFER_NONE; #ifdef HAVE_AUTOSTEREO togl->as_initialized = False; togl->ash = -1; #endif togl->badWindow = False; /* Create command event handler */ togl->widgetCmd = Tcl_CreateObjCommand(interp, Tk_PathName(tkwin), Togl_ObjWidget, (ClientData) togl, ToglCmdDeletedProc); /* * Setup the Tk_ClassProcs callbacks to point at our own window creation * function * * We need to check at runtime if we should use the new Tk_SetClassProcs() * API or if we need to modify the window structure directly */ #ifdef HAVE_TK_SETCLASSPROCS if (SetClassProcsPtr != NULL) { /* use public API (Tk 8.4+) */ Tk_ClassProcs *procsPtr; procsPtr = (Tk_ClassProcs *) ckalloc(sizeof (Tk_ClassProcs)); procsPtr->size = sizeof (Tk_ClassProcs); procsPtr->createProc = Togl_MakeWindow; procsPtr->worldChangedProc = Togl_WorldChanged; procsPtr->modalProc = NULL; /* Tk_SetClassProcs(togl->TkWin, procsPtr, (ClientData) togl); */ (SetClassProcsPtr) (togl->TkWin, procsPtr, (ClientData) togl); } else #endif { /* use private API */ /* * We need to set these fields in the Tk_FakeWin structure: dummy17 = * classProcsPtr dummy18 = instanceData */ TkClassProcs *procsPtr; Tk_FakeWin *winPtr = (Tk_FakeWin *) (togl->TkWin); procsPtr = (TkClassProcs *) ckalloc(sizeof (TkClassProcs)); procsPtr->createProc = Togl_MakeWindow; procsPtr->geometryProc = Togl_WorldChanged; procsPtr->modalProc = NULL; winPtr->dummy17 = (char *) procsPtr; winPtr->dummy18 = (ClientData) togl; } Tk_CreateEventHandler(tkwin, ExposureMask | StructureNotifyMask, Togl_EventProc, (ClientData) togl); /* Configure Togl widget */ if (Tk_InitOptions(interp, WIDGREC togl, tpg->optionTable, tkwin) != TCL_OK || Togl_ObjConfigure(interp, togl, objc - 2, objv + 2) != TCL_OK) { goto error; } /* * If OpenGL window wasn't already created by Togl_ObjConfigure() we * create it now. We can tell by checking if the OpenGL context has * been initialized. */ if (!togl->Ctx) { Tk_MakeWindowExist(togl->TkWin); if (togl->badWindow) { goto error; } } Togl_MakeCurrent(togl); if (togl->contextTag == 0) togl->contextTag = ++tpg->nextContextTag; (void) Togl_SwapInterval(togl, togl->SwapInterval); /* If defined, call create callback */ if (togl->CreateProc) { if (Togl_CallCallback(togl, togl->CreateProc) != TCL_OK) { goto error; } } #if defined(TOGL_AGL) || defined(TOGL_NSOPENGL) if (!togl->PbufferFlag) SetMacBufRect(togl); #endif /* If defined, call reshape proc */ if (togl->ReshapeProc) { if (Togl_CallCallback(togl, togl->ReshapeProc) != TCL_OK) { goto error; } } else { Togl_SetViewPort(togl); #if defined(TOGL_X11) if (togl->OverlayFlag) { Togl_UseLayer(togl, TOGL_OVERLAY); Togl_SetViewPort(togl); Togl_UseLayer(togl, TOGL_NORMAL); } #endif } if (togl->Stereo && !Togl_EnterStereo(togl)) goto error; Tcl_AppendResult(interp, Tk_PathName(tkwin), NULL); /* Add to linked list */ AddToList(togl); return TCL_OK; error: Tcl_SaveResult(interp, &saveError); togl->badWindow = True; (void) Tcl_DeleteCommandFromToken(interp, togl->widgetCmd); Tcl_RestoreResult(interp, &saveError); Tcl_AppendResult(interp, "\nCouldn't configure togl widget", NULL); return TCL_ERROR; } #if TOGL_USE_OVERLAY /* * Do all the setup for overlay planes * Return: TCL_OK or TCL_ERROR */ static int SetupOverlay(Togl *togl) { # if defined(TOGL_X11) # ifdef GLX_TRANSPARENT_TYPE_EXT static int ovAttributeList[] = { GLX_BUFFER_SIZE, 2, GLX_LEVEL, 1, GLX_TRANSPARENT_TYPE_EXT, GLX_TRANSPARENT_INDEX_EXT, None }; # else static int ovAttributeList[] = { GLX_BUFFER_SIZE, 2, GLX_LEVEL, 1, None }; # endif XVisualInfo *visinfo; TkWindow *winPtr = (TkWindow *) togl->TkWin; XSetWindowAttributes swa; Tcl_HashEntry *hPtr; int new_flag; visinfo = glXChooseVisual(togl->display, Tk_ScreenNumber(winPtr), ovAttributeList); if (!visinfo) { Tcl_AppendResult(togl->Interp, Tk_PathName(winPtr), ": No suitable overlay index visual available", NULL); togl->OverlayCtx = NULL; togl->OverlayWindow = 0; togl->OverlayCmap = 0; return TCL_ERROR; } # ifdef GLX_TRANSPARENT_INDEX_EXT { int fail = glXGetConfig(togl->display, visinfo, GLX_TRANSPARENT_INDEX_VALUE_EXT, &togl->OverlayTransparentPixel); if (fail) togl->OverlayTransparentPixel = 0; /* maybe, maybe ... */ } # else togl->OverlayTransparentPixel = 0; /* maybe, maybe ... */ # endif /* share display lists with normal layer context */ togl->OverlayCtx = glXCreateContext(togl->display, visinfo, togl->Ctx, !togl->Indirect); swa.colormap = XCreateColormap(togl->display, XRootWindow(togl->display, visinfo->screen), visinfo->visual, AllocNone); togl->OverlayCmap = swa.colormap; swa.border_pixel = 0; swa.event_mask = ALL_EVENTS_MASK; togl->OverlayWindow = XCreateWindow(togl->display, Tk_WindowId(togl->TkWin), 0, 0, togl->Width, togl->Height, 0, visinfo->depth, InputOutput, visinfo->visual, CWBorderPixel | CWColormap | CWEventMask, &swa); hPtr = Tcl_CreateHashEntry(&winPtr->dispPtr->winTable, (const char *) togl->OverlayWindow, &new_flag); Tcl_SetHashValue(hPtr, winPtr); /* XMapWindow(togl->display, togl->OverlayWindow); */ togl->OverlayIsMapped = False; /* Make sure window manager installs our colormap */ XSetWMColormapWindows(togl->display, togl->OverlayWindow, &togl->OverlayWindow, 1); return TCL_OK; # elif defined(TOGL_WGL) || defined(TOGL_AGL) || defined(TOGL_NSOPENGL) /* not yet implemented on these */ return TCL_ERROR; # endif } #endif /* TOGL_USE_OVERLAY */ #ifdef TOGL_WGL # define TOGL_CLASS_NAME "Togl Class" static Bool ToglClassInitialized = False; static LRESULT CALLBACK Win32WinProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { LONG result; Togl *togl = (Togl *) GetWindowLongPtr(hwnd, 0); WNDCLASS childClass; switch (message) { case WM_WINDOWPOSCHANGED: /* Should be processed by DefWindowProc, otherwise a double buffered * context is not properly resized when the corresponding window is * resized. */ break; case WM_DESTROY: if (togl && togl->TkWin != NULL) { if (togl->SetGrid > 0) { Tk_UnsetGrid(togl->TkWin); } (void) Tcl_DeleteCommandFromToken(togl->Interp, togl->widgetCmd); } break; case WM_ERASEBKGND: /* We clear our own window */ return 1; case WM_DISPLAYCHANGE: if (togl->PbufferFlag && hasARBPbuffer && !togl->pbufferLost) { queryPbuffer(togl->pbuf, WGL_PBUFFER_LOST_ARB, &togl->pbufferLost); } /* FALLTHROUGH */ default: # if USE_STATIC_LIB return TkWinChildProc(hwnd, message, wParam, lParam); # else /* * OK, since TkWinChildProc is not explicitly exported in the * dynamic libraries, we have to retrieve it from the class info * registered with windows. * */ if (tkWinChildProc == NULL) { GetClassInfo(Tk_GetHINSTANCE(), TK_WIN_CHILD_CLASS_NAME, &childClass); tkWinChildProc = childClass.lpfnWndProc; } return tkWinChildProc(hwnd, message, wParam, lParam); # endif } result = DefWindowProc(hwnd, message, wParam, lParam); Tcl_ServiceAll(); return result; } #endif /* TOGL_WGL */ /* * Togl_MakeWindow * * Window creation function, invoked as a callback from Tk_MakeWindowExist. * This is called instead of TkpMakeWindow and must always succeed. */ static Window Togl_MakeWindow(Tk_Window tkwin, Window parent, ClientData instanceData) { Togl *togl = (Togl *) instanceData; Display *dpy; Colormap cmap; int scrnum; Window window = None; #if defined(TOGL_X11) Bool directCtx = True; XSetWindowAttributes swa; int width, height; #elif defined(TOGL_WGL) HWND hwnd, parentWin; DWORD style; HINSTANCE hInstance; PIXELFORMATDESCRIPTOR pfd; int width, height; Bool createdPbufferDC = False; #elif defined(TOGL_AGL) #endif if (togl->badWindow) { TkWindow *winPtr = (TkWindow *) tkwin; return TkpMakeWindow(winPtr, parent); } /* for color index mode photos */ if (togl->RedMap) free(togl->RedMap); if (togl->GreenMap) free(togl->GreenMap); if (togl->BlueMap) free(togl->BlueMap); togl->RedMap = togl->GreenMap = togl->BlueMap = NULL; togl->MapSize = 0; dpy = Tk_Display(tkwin); scrnum = Tk_ScreenNumber(tkwin); /* * Windows and Mac OS X need the window created before OpenGL context * is created. So do that now and set the window variable. */ #if defined(TOGL_AGL) || defined(TOGL_NSOPENGL) { TkWindow *winPtr = (TkWindow *) tkwin; window = TkpMakeWindow(winPtr, parent); if (!togl->PbufferFlag) (void) XMapWindow(dpy, window); } #elif defined(TOGL_WGL) hInstance = Tk_GetHINSTANCE(); if (!ToglClassInitialized) { WNDCLASS ToglClass; ToglClassInitialized = True; ToglClass.style = CS_HREDRAW | CS_VREDRAW; ToglClass.cbClsExtra = 0; ToglClass.cbWndExtra = sizeof (LONG_PTR); /* to save Togl* */ ToglClass.hInstance = hInstance; ToglClass.hbrBackground = NULL; ToglClass.lpszMenuName = NULL; ToglClass.lpszClassName = TOGL_CLASS_NAME; ToglClass.lpfnWndProc = Win32WinProc; ToglClass.hIcon = NULL; ToglClass.hCursor = NULL; if (!RegisterClass(&ToglClass)) { Tcl_SetResult(togl->Interp, TCL_STUPID "unable register Togl window class", TCL_STATIC); goto error; } } /* duplicate tkpMakeWindow logic from tk8.[45]/win/tkWinWindow.c */ if (parent != None) { parentWin = Tk_GetHWND(parent); style = WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS; } else { parentWin = NULL; style = WS_POPUP | WS_CLIPCHILDREN; } if (togl->PbufferFlag) { width = height = 1; /* TODO: demo code mishaves when set to 1000 */ } else { width = togl->Width; height = togl->Height; } hwnd = CreateWindowEx(WS_EX_NOPARENTNOTIFY, TOGL_CLASS_NAME, NULL, style, 0, 0, width, height, parentWin, NULL, hInstance, NULL); SetWindowPos(hwnd, HWND_TOP, 0, 0, 0, 0, SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE); window = Tk_AttachHWND(tkwin, hwnd); SetWindowLongPtr(hwnd, 0, (LONG_PTR) togl); if (togl->PbufferFlag) { ShowWindow(hwnd, SW_HIDE); /* make sure it's hidden */ } #endif /* * Figure out which OpenGL context to use */ #ifdef TOGL_WGL togl->tglGLHdc = GetDC(hwnd); #endif if (togl->PixelFormat) { #if defined(TOGL_X11) XVisualInfo template; int count = 0; template.visualid = togl->PixelFormat; togl->VisInfo = XGetVisualInfo(dpy, VisualIDMask, &template, &count); if (togl->VisInfo == NULL) { Tcl_SetResult(togl->Interp, TCL_STUPID "missing visual information", TCL_STATIC); goto error; } #endif if (!togl_describePixelFormat(togl)) { Tcl_SetResult(togl->Interp, TCL_STUPID "couldn't choose pixel format", TCL_STATIC); goto error; } } else { #if defined(TOGL_X11) togl->VisInfo = togl_pixelFormat(togl, scrnum); if (togl->VisInfo == NULL) #elif defined(TOGL_WGL) || defined(TOGL_AGL) || defined(TOGL_NSOPENGL) # ifdef TOGL_WGL togl->PixelFormat = togl_pixelFormat(togl, hwnd); # elif defined(TOGL_NSOPENGL) togl->PixelFormat = (void *)togl_pixelFormat(togl); # else togl->PixelFormat = (Tcl_WideInt)togl_pixelFormat(togl); # endif if (togl->PixelFormat == 0) #endif { goto error; } } #ifdef TOGL_WGL if (togl->PbufferFlag) { togl->pbuf = togl_createPbuffer(togl); if (togl->pbuf == NULL) { Tcl_SetResult(togl->Interp, TCL_STUPID "couldn't create pbuffer", TCL_STATIC); goto error; } ReleaseDC(hwnd, togl->tglGLHdc); togl->tglGLHdc = getPbufferDC(togl->pbuf); createdPbufferDC = True; } else if (SetPixelFormat(togl->tglGLHdc, (int) togl->PixelFormat, NULL) == FALSE) { Tcl_SetResult(togl->Interp, TCL_STUPID "couldn't set pixel format", TCL_STATIC); goto error; } #endif #if defined(TOGL_WGL) || defined(TOGL_AGL) || defined(TOGL_NSOPENGL) if (togl->VisInfo == NULL) { /* * Create a new OpenGL rendering context. And check to share lists. */ Visual *visual; /* Just for portability, define the simplest visinfo */ visual = DefaultVisual(dpy, scrnum); togl->VisInfo = (XVisualInfo *) calloc(1, sizeof (XVisualInfo)); togl->VisInfo->screen = scrnum; togl->VisInfo->visual = visual; togl->VisInfo->visualid = visual->visualid; # if defined(__cplusplus) || defined(c_plusplus) togl->VisInfo->c_class = visual->c_class; # else togl->VisInfo->class = visual->class; # endif togl->VisInfo->depth = visual->bits_per_rgb; } #endif #if defined(TOGL_X11) if (togl->Indirect) { directCtx = False; } #endif /* * Create a new OpenGL rendering context. */ #if defined(TOGL_X11) if (togl->ShareList) { /* share display lists with existing togl widget */ Togl *shareWith = FindTogl(togl, togl->ShareList); GLXContext shareCtx; int error_code; if (shareWith) { shareCtx = shareWith->Ctx; togl->contextTag = shareWith->contextTag; } else { shareCtx = None; } if (shareCtx) { togl_SetupXErrorHandler(); } togl->Ctx = glXCreateContext(dpy, togl->VisInfo, shareCtx, directCtx); if (shareCtx && (error_code = togl_CheckForXError(togl))) { char buf[256]; togl->Ctx = NULL; XGetErrorText(dpy, error_code, buf, sizeof buf); Tcl_AppendResult(togl->Interp, "unable to share display lists: ", buf, NULL); goto error; } } else { if (togl->ShareContext && FindTogl(togl, togl->ShareContext)) { /* share OpenGL context with existing Togl widget */ Togl *shareWith = FindTogl(togl, togl->ShareContext); if (togl->VisInfo->visualid != shareWith->VisInfo->visualid) { Tcl_SetResult(togl->Interp, TCL_STUPID "unable to share OpenGL context", TCL_STATIC); goto error; } togl->Ctx = shareWith->Ctx; } else { /* don't share display lists */ togl->ShareContext = False; togl->Ctx = glXCreateContext(dpy, togl->VisInfo, None, directCtx); } } #elif defined(TOGL_WGL) if (togl->ShareContext && FindTogl(togl, togl->ShareContext)) { /* share OpenGL context with existing Togl widget */ Togl *shareWith = FindTogl(togl, togl->ShareContext); if (togl->PixelFormat != shareWith->PixelFormat) { Tcl_SetResult(togl->Interp, TCL_STUPID "unable to share OpenGL context", TCL_STATIC); goto error; } togl->Ctx = shareWith->Ctx; } else { togl->Ctx = wglCreateContext(togl->tglGLHdc); } if (togl->ShareList) { /* share display lists with existing togl widget */ Togl *shareWith = FindTogl(togl, togl->ShareList); if (shareWith) { if (!wglShareLists(shareWith->Ctx, togl->Ctx)) { # if 0 LPVOID lpMsgBuf; DWORD err = GetLastError(); FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, NULL, err, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &lpMsgBuf, 0, NULL); fprintf(stderr, "unable to share display lists: %d: %s\n", err, lpMsgBuf); LocalFree(lpMsgBuf); # endif Tcl_SetResult(togl->Interp, TCL_STUPID "unable to share display lists", TCL_STATIC); goto error; } togl->contextTag = shareWith->contextTag; } } #elif defined(TOGL_AGL) AGLContext shareCtx = NULL; if (togl->ShareList) { /* share display lists with existing togl widget */ Togl *shareWith = FindTogl(togl, togl->ShareList); if (shareWith) { shareCtx = shareWith->Ctx; togl->contextTag = shareWith->contextTag; } } if (togl->ShareContext && FindTogl(togl, togl->ShareContext)) { /* share OpenGL context with existing Togl widget */ Togl *shareWith = FindTogl(togl, togl->ShareContext); if (togl->PixelFormat != shareWith->PixelFormat) { Tcl_SetResult(togl->Interp, TCL_STUPID "unable to share OpenGL context", TCL_STATIC); goto error; } togl->Ctx = shareWith->Ctx; } else if ((togl->Ctx = aglCreateContext((AGLPixelFormat) togl->PixelFormat, shareCtx)) == NULL) { GLenum err = aglGetError(); aglDestroyPixelFormat((AGLPixelFormat) togl->PixelFormat); togl->PixelFormat = 0; if (err == AGL_BAD_MATCH) Tcl_SetResult(togl->Interp, TCL_STUPID "unable to share display lists" ": shared context doesn't match", TCL_STATIC); else if (err == AGL_BAD_CONTEXT) Tcl_SetResult(togl->Interp, TCL_STUPID "unable to share display lists" ": bad shared context", TCL_STATIC); else if (err == AGL_BAD_PIXELFMT) Tcl_SetResult(togl->Interp, TCL_STUPID "could not create rendering context" ": bad pixel format", TCL_STATIC); else Tcl_SetResult(togl->Interp, TCL_STUPID "could not create rendering context" ": unknown reason", TCL_STATIC); goto error; } if (!togl->PbufferFlag && !aglSetDrawable(togl->Ctx, Togl_MacOSXGetDrawablePort(togl))) { /* aglSetDrawable is deprecated in OS X 10.5 */ aglDestroyContext(togl->Ctx); togl->Ctx = NULL; aglDestroyPixelFormat((AGLPixelFormat) togl->PixelFormat); togl->PixelFormat = 0; Tcl_SetResult(togl->Interp, TCL_STUPID "couldn't set drawable", TCL_STATIC); goto error; } #elif defined(TOGL_NSOPENGL) NSOpenGLContext *shareCtx = NULL; if (togl->ShareList) { /* share display lists with existing togl widget */ Togl *shareWith = FindTogl(togl, togl->ShareList); if (shareWith) { shareCtx = shareWith->Ctx; togl->contextTag = shareWith->contextTag; } } if (togl->ShareContext && FindTogl(togl, togl->ShareContext)) { /* share OpenGL context with existing Togl widget */ Tcl_SetResult(togl->Interp, TCL_STUPID "unable to share NSOpenGL context", TCL_STATIC); goto error; /* Togl *shareWith = FindTogl(togl, togl->ShareContext); if (togl->PixelFormat != shareWith->PixelFormat) { Tcl_SetResult(togl->Interp, TCL_STUPID "unable to share OpenGL context", TCL_STATIC); goto error; } togl->Ctx = [[NSOpenGLContext alloc] initWithCGLContextObj:shareWith->Ctx]; */ /* initWithCGLContextObj requires Mac OS 10.6 */ } else { togl->Ctx = [NSOpenGLContext alloc]; if ([togl->Ctx initWithFormat:togl->PixelFormat shareContext:shareCtx] == nil) { [togl->PixelFormat release]; togl->PixelFormat = 0; Tcl_SetResult(togl->Interp, TCL_STUPID "Could not obtain OpenGL context", TCL_STATIC); goto error; } } if (!togl->PbufferFlag) { togl->nsview = [[ToglNSView alloc] initWithFrame:NSZeroRect]; [togl->nsview setTogl:togl]; if ([togl->nsview respondsToSelector:@selector(setWantsBestResolutionOpenGLSurface:)]) { [togl->nsview setWantsBestResolutionOpenGLSurface:YES]; } [togl->nsview setAcceptsTouchEvents:YES]; MacDrawable *d = ((TkWindow *) togl->TkWin)->privatePtr; NSView *topview = d->toplevel->view; [topview addSubview:togl->nsview]; /* TODO: Appears setView has to be deferred until window mapped. * or it gives "invalid drawable" error. But MapNotify doesn't happen. * I think toplevel is already mapped. Iconifying and uniconifying * main window makes the graphics work. */ /* [togl->Ctx setView:togl->nsview];*/ } #endif if (togl->Ctx == NULL) { Tcl_SetResult(togl->Interp, TCL_STUPID "could not create rendering context", TCL_STATIC); goto error; } #if defined(TOGL_AGL) || defined(TOGL_NSOPENGL) CGDisplayRegisterReconfigurationCallback(ReconfigureCB, togl); #endif if (togl->PbufferFlag) { /* Don't need a colormap, nor overlay, nor be displayed */ #if defined(TOGL_X11) || defined(TOGL_AGL) || defined(TOGL_NSOPENGL) togl->pbuf = togl_createPbuffer(togl); if (!togl->pbuf) { /* tcl result set in togl_createPbuffer */ # ifdef TOGL_AGL if (!togl->ShareContext) { aglDestroyContext(togl->Ctx); aglDestroyPixelFormat((AGLPixelFormat) togl->PixelFormat); } togl->Ctx = NULL; togl->PixelFormat = 0; # endif # ifdef TOGL_NSOPENGL if (!togl->ShareContext) { [togl->Ctx release]; [togl->PixelFormat release]; } togl->Ctx = NULL; togl->PixelFormat = 0; # endif goto error; } # ifdef TOGL_X11 window = TkpMakeWindow((TkWindow *) tkwin, parent); # endif #endif return window; } #ifdef TOGL_WGL DescribePixelFormat(togl->tglGLHdc, (int) togl->PixelFormat, sizeof (pfd), &pfd); #endif /* * find a colormap */ if (togl->RgbaFlag) { /* Colormap for RGB mode */ #if defined(TOGL_X11) cmap = get_rgb_colormap(dpy, scrnum, togl->VisInfo, tkwin); #elif defined(TOGL_WGL) if (pfd.dwFlags & PFD_NEED_PALETTE) { cmap = Win32CreateRgbColormap(pfd); } else { cmap = DefaultColormap(dpy, scrnum); } #elif defined(TOGL_AGL) || defined(TOGL_NSOPENGL) cmap = DefaultColormap(dpy, scrnum); #endif } else { /* Colormap for CI mode */ #ifdef TOGL_WGL /* this logic is to overcome a combination driver/compiler bug: (1) * cColorBits may be unusually large (e.g., 32 instead of 8 or 12) and * (2) 1 << 32 might be 1 instead of zero (gcc for ia32) */ if (pfd.cColorBits >= MAX_CI_COLORMAP_BITS) { togl->CiColormapSize = MAX_CI_COLORMAP_SIZE; } else { togl->CiColormapSize = 1 << pfd.cColorBits; if (togl->CiColormapSize >= MAX_CI_COLORMAP_SIZE) togl->CiColormapSize = MAX_CI_COLORMAP_SIZE; } #endif if (togl->PrivateCmapFlag) { /* need read/write colormap so user can store own color entries */ #if defined(TOGL_X11) cmap = XCreateColormap(dpy, XRootWindow(dpy, togl->VisInfo->screen), togl->VisInfo->visual, AllocAll); #elif defined(TOGL_WGL) cmap = Win32CreateCiColormap(togl); #elif defined(TOGL_AGL) || defined(TOGL_NSOPENGL) /* need to figure out how to do this correctly on Mac... */ cmap = DefaultColormap(dpy, scrnum); #endif } else { if (togl->VisInfo->visual == DefaultVisual(dpy, scrnum)) { /* share default/root colormap */ cmap = Tk_Colormap(tkwin); } else { /* make a new read-only colormap */ cmap = XCreateColormap(dpy, XRootWindow(dpy, togl->VisInfo->screen), togl->VisInfo->visual, AllocNone); } } } /* Make sure Tk knows to switch to the new colormap when the cursor is over * this window when running in color index mode. */ (void) Tk_SetWindowVisual(tkwin, togl->VisInfo->visual, togl->VisInfo->depth, cmap); #ifdef TOGL_WGL /* Install the colormap */ SelectPalette(togl->tglGLHdc, ((TkWinColormap *) cmap)->palette, TRUE); RealizePalette(togl->tglGLHdc); #endif #if defined(TOGL_X11) swa.background_pixmap = None; swa.border_pixel = 0; swa.colormap = cmap; swa.event_mask = ALL_EVENTS_MASK; if (togl->PbufferFlag) { width = height = 1; } else { width = togl->Width; height = togl->Height; } window = XCreateWindow(dpy, parent, 0, 0, width, height, 0, togl->VisInfo->depth, InputOutput, togl->VisInfo->visual, CWBackPixmap | CWBorderPixel | CWColormap | CWEventMask, &swa); /* Make sure window manager installs our colormap */ (void) XSetWMColormapWindows(dpy, window, &window, 1); if (!togl->DoubleFlag) { int dbl_flag; /* See if we requested single buffering but had to accept a double * buffered visual. If so, set the GL draw buffer to be the front * buffer to simulate single buffering. */ if (glXGetConfig(dpy, togl->VisInfo, GLX_DOUBLEBUFFER, &dbl_flag)) { if (dbl_flag) { glXMakeCurrent(dpy, window, togl->Ctx); glDrawBuffer(GL_FRONT); glReadBuffer(GL_FRONT); } } } #elif defined(TOGL_WGL) if (!togl->DoubleFlag) { /* See if we requested single buffering but had to accept a double * buffered visual. If so, set the GL draw buffer to be the front * buffer to simulate single buffering. */ if (getPixelFormatAttribiv == NULL) { /* pfd is already set */ if ((pfd.dwFlags & PFD_DOUBLEBUFFER) != 0) { wglMakeCurrent(togl->tglGLHdc, togl->Ctx); glDrawBuffer(GL_FRONT); glReadBuffer(GL_FRONT); } } else { static int attribs[] = { WGL_DOUBLE_BUFFER_ARB, }; # define NUM_ATTRIBS (sizeof attribs / sizeof attribs[0]) int info[NUM_ATTRIBS]; getPixelFormatAttribiv(togl->tglGLHdc, (int) togl->PixelFormat, 0, NUM_ATTRIBS, attribs, info); # undef NUM_ATTRIBS if (info[0]) { wglMakeCurrent(togl->tglGLHdc, togl->Ctx); glDrawBuffer(GL_FRONT); glReadBuffer(GL_FRONT); } } } #endif #if TOGL_USE_OVERLAY if (togl->OverlayFlag) { if (SetupOverlay(togl) == TCL_ERROR) { fprintf(stderr, "Warning: couldn't setup overlay.\n"); togl->OverlayFlag = False; } } #endif #if !defined(TOGL_AGL) /* Request the X window to be displayed */ (void) XMapWindow(dpy, window); #endif if (!togl->RgbaFlag) { int index_size; #if defined(TOGL_X11) || defined(TOGL_AGL) || defined(TOGL_NSOPENGL) GLint index_bits; glGetIntegerv(GL_INDEX_BITS, &index_bits); index_size = 1 << index_bits; #elif defined(TOGL_WGL) index_size = togl->CiColormapSize; #endif if (togl->MapSize != index_size) { if (togl->RedMap) free(togl->RedMap); if (togl->GreenMap) free(togl->GreenMap); if (togl->BlueMap) free(togl->BlueMap); togl->MapSize = index_size; togl->RedMap = (GLfloat *) calloc(index_size, sizeof (GLfloat)); togl->GreenMap = (GLfloat *) calloc(index_size, sizeof (GLfloat)); togl->BlueMap = (GLfloat *) calloc(index_size, sizeof (GLfloat)); } } #ifdef HAVE_AUTOSTEREO if (togl->Stereo == TOGL_STEREO_NATIVE) { if (!togl->as_initialized) { const char *autostereod; togl->as_initialized = True; if ((autostereod = getenv("AUTOSTEREOD")) == NULL) autostereod = AUTOSTEREOD; if (autostereod && *autostereod) { if (ASInitialize(togl->display, autostereod) == Success) { togl->ash = ASCreatedStereoWindow(dpy); } } } else { togl->ash = ASCreatedStereoWindow(dpy); } } #endif return window; error: togl->badWindow = True; #if defined(TOGL_X11) if (window == None) { TkWindow *winPtr = (TkWindow *) tkwin; window = TkpMakeWindow(winPtr, parent); } #elif defined(TOGL_WGL) if (togl->tglGLHdc) { if (createdPbufferDC) releasePbufferDC(togl->pbuf, togl->tglGLHdc); else ReleaseDC(hwnd, togl->tglGLHdc); togl->tglGLHdc = NULL; } #endif return window; } /* * Togl_WorldChanged * * Add support for setgrid option. */ static void Togl_WorldChanged(ClientData instanceData) { Togl *togl = (Togl *) instanceData; int width; int height; if (togl->PbufferFlag) width = height = 1; else { width = togl->Width; height = togl->Height; } Tk_GeometryRequest(togl->TkWin, width, height); Tk_SetInternalBorder(togl->TkWin, 0); if (togl->SetGrid > 0) { Tk_SetGrid(togl->TkWin, width / togl->SetGrid, height / togl->SetGrid, togl->SetGrid, togl->SetGrid); } else { Tk_UnsetGrid(togl->TkWin); } } static void Togl_SetViewPort(const struct Togl *togl) { glViewport(0, 0, togl->Width*togl->PixelScale, togl->Height*togl->PixelScale); } /* * ToglFree * * Wrap the ckfree macro. */ static void ToglFree(char *clientData) { ckfree(clientData); } /* * ToglCmdDeletedProc * * This procedure is invoked when a widget command is deleted. If * the widget isn't already in the process of being destroyed, * this command destroys it. * * Results: * None. * * Side effects: * The widget is destroyed. * *---------------------------------------------------------------------- */ static void ToglCmdDeletedProc(ClientData clientData) { Togl *togl = (Togl *) clientData; Tk_Window tkwin = togl->TkWin; /* * This procedure could be invoked either because the window was * destroyed and the command was then deleted (in which case tkwin * is NULL) or because the command was deleted, and then this procedure * destroys the widget. */ if (tkwin) { Tk_DeleteEventHandler(tkwin, ExposureMask | StructureNotifyMask, Togl_EventProc, (ClientData) togl); } Tk_Preserve((ClientData) togl); Tcl_EventuallyFree((ClientData) togl, ToglFree); Togl_LeaveStereo(togl, togl->Stereo); if (togl->DestroyProc) { /* call user's cleanup code */ Togl_CallCallback(togl, togl->DestroyProc); } if (togl->TimerProc != NULL) { Tcl_DeleteTimerHandler(togl->timerHandler); togl->timerHandler = NULL; } if (togl->UpdatePending) { Tcl_CancelIdleCall(Togl_Render, (ClientData) togl); togl->UpdatePending = False; } #ifndef NO_TK_CURSOR if (togl->Cursor != None) { Tk_FreeCursor(togl->display, togl->Cursor); togl->Cursor = None; } #endif /* remove from linked list */ RemoveFromList(togl); togl->TkWin = NULL; if (tkwin != NULL) { if (togl->Ctx) { if (FindToglWithSameContext(togl) == NULL) { #if defined(TOGL_X11) glXDestroyContext(togl->display, togl->Ctx); #elif defined(TOGL_WGL) wglDeleteContext(togl->Ctx); #elif defined(TOGL_AGL) aglDestroyContext(togl->Ctx); CGDisplayRemoveReconfigurationCallback(ReconfigureCB, togl); #elif defined(TOGL_NSOPENGL) [togl->Ctx release]; togl->Ctx = nil; [togl->nsview setTogl:nil]; [togl->nsview release]; togl->nsview = nil; CGDisplayRemoveReconfigurationCallback(ReconfigureCB, togl); #endif #if defined(TOGL_X11) XFree(togl->VisInfo); #else free(togl->VisInfo); #endif } #if defined(TOGL_WGL) if (togl->tglGLHdc) { if (togl->PbufferFlag) { releasePbufferDC(togl->pbuf, togl->tglGLHdc); } else { HWND hwnd = Tk_GetHWND(Tk_WindowId(tkwin)); ReleaseDC(hwnd, togl->tglGLHdc); } togl->tglGLHdc = NULL; } #endif if (togl->PbufferFlag && togl->pbuf) { togl_destroyPbuffer(togl); togl->pbuf = 0; } togl->Ctx = NULL; togl->VisInfo = NULL; } #if defined(TOGL_X11) # if TOGL_USE_OVERLAY if (togl->OverlayCtx) { Tcl_HashEntry *entryPtr; TkWindow *winPtr = (TkWindow *) tkwin; if (winPtr) { entryPtr = Tcl_FindHashEntry(&winPtr->dispPtr->winTable, (const char *) togl->OverlayWindow); Tcl_DeleteHashEntry(entryPtr); } if (FindToglWithSameOverlayContext(togl) == NULL) glXDestroyContext(togl->display, togl->OverlayCtx); togl->OverlayCtx = NULL; } # endif /* TOGL_USE_OVERLAY */ #endif if (togl->SetGrid > 0) { Tk_UnsetGrid(tkwin); } Tk_DestroyWindow(tkwin); } Tk_Release((ClientData) togl); } /* * This gets called to track top level position changes for * row interleaved stereo. */ static void Togl_RedisplayProc(ClientData clientData, XEvent *eventPtr) { Togl *togl = (Togl *) clientData; switch (eventPtr->type) { case ConfigureNotify: Togl_PostRedisplay(togl); break; } } #if defined(TOGL_AGL) || defined(TOGL_NSOPENGL) static int viewPixelScale(NSView *nsview) { int pixelScale = 1; if ([nsview respondsToSelector:@selector(convertRectToBacking:)]) { NSRect wbounds = [nsview bounds]; NSRect gbounds = [nsview convertRectToBacking:wbounds]; pixelScale = (wbounds.size.width > 0 ? gbounds.size.width / wbounds.size.width : 1); } return pixelScale; } #endif /* * This gets called to handle Togl window configuration events */ static void Togl_EventProc(ClientData clientData, XEvent *eventPtr) { Togl *togl = (Togl *) clientData; switch (eventPtr->type) { case Expose: #if defined(TOGL_NSOPENGL) if (!Tk_IsMapped(togl->TkWin)) /* Tk Cocoa generates expose events for unmapped windows! */ break; #endif if (eventPtr->xexpose.count == 0) { if (!togl->UpdatePending && eventPtr->xexpose.window == Tk_WindowId(togl->TkWin)) { Togl_PostRedisplay(togl); } #if defined(TOGL_X11) if (!togl->OverlayUpdatePending && togl->OverlayFlag && togl->OverlayIsMapped && eventPtr->xexpose.window == togl->OverlayWindow) { Togl_PostOverlayRedisplay(togl); } #endif #if defined(TOGL_NSOPENGL) [togl->Ctx setView:togl->nsview]; SetMacBufRect(togl); #endif } break; case ConfigureNotify: if (togl->PbufferFlag) break; #if defined(TOGL_AGL) || defined(TOGL_NSOPENGL) int pixelScale = viewPixelScale(togl->nsview); if (togl->Width == Tk_Width(togl->TkWin) && togl->Height == Tk_Height(togl->TkWin) && togl->PixelScale == pixelScale) { // Even though the size hasn't changed, // it's position on the screen may have. if (Tk_IsMapped(togl->TkWin)) SetMacBufRect(togl); break; } #endif togl->Width = Tk_Width(togl->TkWin); togl->Height = Tk_Height(togl->TkWin); #if defined(TOGL_AGL) || defined(TOGL_NSOPENGL) togl->PixelScale = pixelScale; #endif (void) XResizeWindow(Tk_Display(togl->TkWin), Tk_WindowId(togl->TkWin), togl->Width, togl->Height); #if defined(TOGL_X11) if (togl->OverlayFlag) { (void) XResizeWindow(Tk_Display(togl->TkWin), togl->OverlayWindow, togl->Width, togl->Height); (void) XRaiseWindow(Tk_Display(togl->TkWin), togl->OverlayWindow); } #endif #if defined(TOGL_AGL) || defined(TOGL_NSOPENGL) SetMacBufRect(togl); #endif Togl_MakeCurrent(togl); if (togl->ReshapeProc) { Togl_SetViewPort(togl); (void) Togl_CallCallback(togl, togl->ReshapeProc); } else { Togl_SetViewPort(togl); #if defined(TOGL_X11) if (togl->OverlayFlag) { Togl_UseLayer(togl, TOGL_OVERLAY); Togl_SetViewPort(togl); Togl_UseLayer(togl, TOGL_NORMAL); } #endif } break; case MapNotify: #if defined(TOGL_AGL) if (!togl->PbufferFlag) { /* * See comment for the UnmapNotify case below. */ AGLDrawable d = Togl_MacOSXGetDrawablePort(togl); /* aglSetDrawable is deprecated in OS X 10.5 */ aglSetDrawable(togl->Ctx, d); SetMacBufRect(togl); } #endif #if defined(TOGL_NSOPENGL) if (!togl->PbufferFlag) { /* * See comment for the UnmapNotify case below. */ [togl->Ctx setView:togl->nsview]; SetMacBufRect(togl); } #endif break; case UnmapNotify: #if defined(TOGL_AGL) if (!togl->PbufferFlag) { /* * For Mac OS X Aqua, Tk subwindows are not implemented as * separate Aqua windows. They are just different regions of * a single Aqua window. To unmap them they are just not drawn. * Have to disconnect the AGL context otherwise they will continue * to be displayed directly by Aqua. */ /* aglSetDrawable is deprecated in OS X 10.5 */ aglSetDrawable(togl->Ctx, NULL); } #endif #if defined(TOGL_NSOPENGL) if (!togl->PbufferFlag) { /* * For Mac OS X Aqua, Tk subwindows are not implemented as * separate Aqua windows. They are just different regions of * a single Aqua window. To unmap them they are just not drawn. * Have to disconnect the NSView otherwise they will continue * to be displayed directly by Aqua. */ [togl->Ctx clearDrawable]; } #endif break; case DestroyNotify: if (togl->TkWin != NULL) { #ifdef TOGL_WGL HWND hwnd = Tk_GetHWND(Tk_WindowId(togl->TkWin)); /* Prevent Win32WinProc from calling Tcl_DeleteCommandFromToken * a second time */ SetWindowLongPtr(hwnd, 0, (LONG_PTR) 0); #endif if (togl->SetGrid > 0) { Tk_UnsetGrid(togl->TkWin); } (void) Tcl_DeleteCommandFromToken(togl->Interp, togl->widgetCmd); } break; default: /* nothing */ ; } } void Togl_PostRedisplay(Togl *togl) { if (!togl->UpdatePending) { togl->UpdatePending = True; Tk_DoWhenIdle(Togl_Render, (ClientData) togl); } } Bool Togl_UpdatePending(const Togl *togl) { return togl->UpdatePending; } void Togl_SwapBuffers(const Togl *togl) { if (togl->DoubleFlag) { #if defined(TOGL_WGL) int res = SwapBuffers(togl->tglGLHdc); if (!res) { ErrorExit(TEXT("SwapBuffers")); } #elif defined(TOGL_X11) glXSwapBuffers(Tk_Display(togl->TkWin), Tk_WindowId(togl->TkWin)); #elif defined(TOGL_AGL) aglSwapBuffers(togl->Ctx); #elif defined(TOGL_NSOPENGL) [togl->Ctx flushBuffer]; #endif } else { glFlush(); } } const char * Togl_Ident(const Togl *togl) { return togl->Ident; } int Togl_Width(const Togl *togl) { return togl->Width; } int Togl_Height(const Togl *togl) { return togl->Height; } int Togl_PixelScale(const Togl *togl) { return togl->PixelScale; } Tcl_Interp * Togl_Interp(const Togl *togl) { return togl->Interp; } Tk_Window Togl_TkWin(const Togl *togl) { return togl->TkWin; } const char * Togl_CommandName(const Togl *togl) { return Tcl_GetCommandName(togl->Interp, togl->widgetCmd); } int Togl_ContextTag(const Togl *togl) { return togl->contextTag; } Bool Togl_HasRGBA(const Togl *togl) { return togl->RgbaFlag; } Bool Togl_IsDoubleBuffered(const Togl *togl) { return togl->DoubleFlag; } Bool Togl_HasDepthBuffer(const Togl *togl) { return togl->DepthFlag; } Bool Togl_HasAccumulationBuffer(const Togl *togl) { return togl->AccumFlag; } Bool Togl_HasDestinationAlpha(const Togl *togl) { return togl->AlphaFlag; } Bool Togl_HasStencilBuffer(const Togl *togl) { return togl->StencilFlag; } int Togl_StereoMode(const Togl *togl) { return togl->Stereo; } Bool Togl_HasMultisample(const Togl *togl) { return togl->MultisampleFlag; } #if defined(TOGL_X11) /* * A replacement for XAllocColor. This function should never * fail to allocate a color. When XAllocColor fails, we return * the nearest matching color. If we have to allocate many colors * this function isn't too efficient; the XQueryColors() could be * done just once. * Written by Michael Pichler, Brian Paul, Mark Kilgard * Input: dpy - X display * cmap - X colormap * cmapSize - size of colormap * In/Out: color - the XColor struct * Output: exact - 1=exact color match, 0=closest match */ static void noFaultXAllocColor(Display *dpy, Colormap cmap, int cmapSize, XColor *color, int *exact) { XColor *ctable, subColor; int i, bestmatch; double mindist; /* 3*2^16^2 exceeds long int precision. */ /* First try just using XAllocColor. */ if (XAllocColor(dpy, cmap, color)) { *exact = 1; return; } /* Retrieve color table entries. */ /* XXX alloca candidate. */ ctable = (XColor *) ckalloc(cmapSize * sizeof (XColor)); for (i = 0; i < cmapSize; i++) { ctable[i].pixel = i; } (void) XQueryColors(dpy, cmap, ctable, cmapSize); /* Find best match. */ bestmatch = -1; mindist = 0; for (i = 0; i < cmapSize; i++) { double dr = (double) color->red - (double) ctable[i].red; double dg = (double) color->green - (double) ctable[i].green; double db = (double) color->blue - (double) ctable[i].blue; double dist = dr * dr + dg * dg + db * db; if (bestmatch < 0 || dist < mindist) { bestmatch = i; mindist = dist; } } /* Return result. */ subColor.red = ctable[bestmatch].red; subColor.green = ctable[bestmatch].green; subColor.blue = ctable[bestmatch].blue; ckfree((char *) ctable); /* Try to allocate the closest match color. This should only fail if the * cell is read/write. Otherwise, we're incrementing the cell's reference * count. */ if (!XAllocColor(dpy, cmap, &subColor)) { /* do this to work around a problem reported by Frank Ortega */ subColor.pixel = (unsigned long) bestmatch; subColor.red = ctable[bestmatch].red; subColor.green = ctable[bestmatch].green; subColor.blue = ctable[bestmatch].blue; subColor.flags = DoRed | DoGreen | DoBlue; } *color = subColor; } #elif defined(TOGL_WGL) static UINT Win32AllocColor(const Togl *togl, float red, float green, float blue) { /* Modified version of XAllocColor emulation of Tk. - returns index, * instead of color itself - allocates logical palette entry even for * non-palette devices */ TkWinColormap *cmap = (TkWinColormap *) Tk_Colormap(togl->TkWin); UINT index; COLORREF newColor, closeColor; PALETTEENTRY entry, closeEntry; int isNew, refCount; Tcl_HashEntry *entryPtr; entry.peRed = (unsigned char) (red * 255 + .5); entry.peGreen = (unsigned char) (green * 255 + .5); entry.peBlue = (unsigned char) (blue * 255 + .5); entry.peFlags = 0; /* * Find the nearest existing palette entry. */ newColor = RGB(entry.peRed, entry.peGreen, entry.peBlue); index = GetNearestPaletteIndex(cmap->palette, newColor); GetPaletteEntries(cmap->palette, index, 1, &closeEntry); closeColor = RGB(closeEntry.peRed, closeEntry.peGreen, closeEntry.peBlue); /* * If this is not a duplicate and colormap is not full, allocate a new entry. */ if (newColor != closeColor) { if (cmap->size == (unsigned int) togl->CiColormapSize) { entry = closeEntry; } else { cmap->size++; ResizePalette(cmap->palette, cmap->size); index = cmap->size - 1; SetPaletteEntries(cmap->palette, index, 1, &entry); SelectPalette(togl->tglGLHdc, cmap->palette, TRUE); RealizePalette(togl->tglGLHdc); } } newColor = PALETTERGB(entry.peRed, entry.peGreen, entry.peBlue); entryPtr = Tcl_CreateHashEntry(&cmap->refCounts, (CONST char *) newColor, &isNew); if (isNew) { refCount = 1; } else { refCount = ((int) Tcl_GetHashValue(entryPtr)) + 1; } Tcl_SetHashValue(entryPtr, (ClientData) refCount); /* for color index mode photos */ togl->RedMap[index] = (GLfloat) (entry.peRed / 255.0); togl->GreenMap[index] = (GLfloat) (entry.peGreen / 255.0); togl->BlueMap[index] = (GLfloat) (entry.peBlue / 255.0); return index; } static void Win32FreeColor(const Togl *togl, unsigned long index) { TkWinColormap *cmap = (TkWinColormap *) Tk_Colormap(togl->TkWin); COLORREF cref; UINT count, refCount; PALETTEENTRY entry, *entries; Tcl_HashEntry *entryPtr; if (index >= cmap->size) { panic("Tried to free a color that isn't allocated."); } GetPaletteEntries(cmap->palette, index, 1, &entry); cref = PALETTERGB(entry.peRed, entry.peGreen, entry.peBlue); entryPtr = Tcl_FindHashEntry(&cmap->refCounts, (CONST char *) cref); if (!entryPtr) { panic("Tried to free a color that isn't allocated."); } refCount = (int) Tcl_GetHashValue(entryPtr) - 1; if (refCount == 0) { count = cmap->size - index; entries = (PALETTEENTRY *) ckalloc(sizeof (PALETTEENTRY) * count); GetPaletteEntries(cmap->palette, index + 1, count, entries); SetPaletteEntries(cmap->palette, index, count, entries); SelectPalette(togl->tglGLHdc, cmap->palette, TRUE); RealizePalette(togl->tglGLHdc); ckfree((char *) entries); cmap->size--; Tcl_DeleteHashEntry(entryPtr); } else { Tcl_SetHashValue(entryPtr, (ClientData) refCount); } } static void Win32SetColor(const Togl *togl, unsigned long index, float red, float green, float blue) { TkWinColormap *cmap = (TkWinColormap *) Tk_Colormap(togl->TkWin); PALETTEENTRY entry; entry.peRed = (unsigned char) (red * 255 + .5); entry.peGreen = (unsigned char) (green * 255 + .5); entry.peBlue = (unsigned char) (blue * 255 + .5); entry.peFlags = 0; SetPaletteEntries(cmap->palette, index, 1, &entry); SelectPalette(togl->tglGLHdc, cmap->palette, TRUE); RealizePalette(togl->tglGLHdc); /* for color index mode photos */ togl->RedMap[index] = (GLfloat) (entry.peRed / 255.0); togl->GreenMap[index] = (GLfloat) (entry.peGreen / 255.0); togl->BlueMap[index] = (GLfloat) (entry.peBlue / 255.0); } #endif /* TOGL_X11 */ unsigned long Togl_AllocColor(const Togl *togl, float red, float green, float blue) { if (togl->RgbaFlag) { (void) fprintf(stderr, "Error: Togl_AllocColor illegal in RGBA mode.\n"); return 0; } /* TODO: maybe not... */ if (togl->PrivateCmapFlag) { (void) fprintf(stderr, "Error: Togl_AllocColor illegal with private colormap\n"); return 0; } #if defined(TOGL_X11) { XColor xcol; int exact; xcol.red = (short) (red * 65535.0); xcol.green = (short) (green * 65535.0); xcol.blue = (short) (blue * 65535.0); noFaultXAllocColor(Tk_Display(togl->TkWin), Tk_Colormap(togl->TkWin), Tk_Visual(togl->TkWin)->map_entries, &xcol, &exact); /* for color index mode photos */ togl->RedMap[xcol.pixel] = (float) xcol.red / 65535.0; togl->GreenMap[xcol.pixel] = (float) xcol.green / 65535.0; togl->BlueMap[xcol.pixel] = (float) xcol.blue / 65535.0; return xcol.pixel; } #elif defined(TOGL_WGL) return Win32AllocColor(togl, red, green, blue); #elif defined(TOGL_AGL) || defined(TOGL_NSOPENGL) /* still need to implement this on Mac... */ return 0; #endif } void Togl_FreeColor(const Togl *togl, unsigned long pixel) { if (togl->RgbaFlag) { (void) fprintf(stderr, "Error: Togl_FreeColor illegal in RGBA mode.\n"); return; } /* TODO: maybe not... */ if (togl->PrivateCmapFlag) { (void) fprintf(stderr, "Error: Togl_FreeColor illegal with private colormap\n"); return; } #if defined(TOGL_X11) (void) XFreeColors(Tk_Display(togl->TkWin), Tk_Colormap(togl->TkWin), &pixel, 1, 0); #elif defined(TOGL_WGL) Win32FreeColor(togl, pixel); #endif } void Togl_SetColor(const Togl *togl, unsigned long index, float red, float green, float blue) { if (togl->RgbaFlag) { (void) fprintf(stderr, "Error: Togl_SetColor illegal in RGBA mode.\n"); return; } if (!togl->PrivateCmapFlag) { (void) fprintf(stderr, "Error: Togl_SetColor requires a private colormap\n"); return; } #if defined(TOGL_X11) { XColor xcol; xcol.pixel = index; xcol.red = (short) (red * 65535.0); xcol.green = (short) (green * 65535.0); xcol.blue = (short) (blue * 65535.0); xcol.flags = DoRed | DoGreen | DoBlue; (void) XStoreColor(Tk_Display(togl->TkWin), Tk_Colormap(togl->TkWin), &xcol); /* for color index mode photos */ togl->RedMap[xcol.pixel] = (float) xcol.red / 65535.0; togl->GreenMap[xcol.pixel] = (float) xcol.green / 65535.0; togl->BlueMap[xcol.pixel] = (float) xcol.blue / 65535.0; } #elif defined(TOGL_WGL) Win32SetColor(togl, index, red, green, blue); #endif } #if TOGL_USE_FONTS == 1 # include "toglFont.c" #else Tcl_Obj * Togl_LoadBitmapFont(const Togl *togl, const char *fontname) { return NULL; } int Togl_UnloadBitmapFont(const Togl *togl, Tcl_Obj *bitmapfont) { return TCL_OK; } int Togl_WriteObj(const Togl *togl, const Tcl_Obj *toglfont, Tcl_Obj *obj) { return -1; } int Togl_WriteChars(const Togl *togl, const Tcl_Obj *toglfont, const char *str, int len) { return -1; } #endif /* TOGL_USE_FONTS */ /* * Overlay functions */ void Togl_UseLayer(Togl *togl, int layer) { if (layer == TOGL_NORMAL) { #if defined(TOGL_WGL) int res = wglMakeCurrent(togl->tglGLHdc, togl->Ctx); if (!res) { ErrorExit(TEXT("wglMakeCurrent")); } #elif defined(TOGL_X11) (void) glXMakeCurrent(Tk_Display(togl->TkWin), Tk_WindowId(togl->TkWin), togl->Ctx); #elif defined(TOGL_AGL) (void) aglSetCurrentContext(togl->Ctx); #elif defined(TOGL_NSOPENGL) [togl->Ctx makeCurrentContext]; #endif } else if (layer == TOGL_OVERLAY && togl->OverlayWindow) { #if defined(TOGL_WGL) int res = wglMakeCurrent(togl->tglGLHdc, togl->tglGLOverlayHglrc); if (!res) { ErrorExit(TEXT("wglMakeCurrent overlay")); } #elif defined(TOGL_X11) (void) glXMakeCurrent(Tk_Display(togl->TkWin), togl->OverlayWindow, togl->OverlayCtx); #elif defined(TOGL_AGL) || defined(TOGL_NSOPENGL) #endif } else { /* error */ } } void Togl_ShowOverlay(Togl *togl) { #if defined(TOGL_X11) /* not yet implemented on Windows */ if (togl->OverlayWindow) { (void) XMapWindow(Tk_Display(togl->TkWin), togl->OverlayWindow); (void) XInstallColormap(Tk_Display(togl->TkWin), togl->OverlayCmap); togl->OverlayIsMapped = True; } #endif } void Togl_HideOverlay(Togl *togl) { if (togl->OverlayWindow && togl->OverlayIsMapped) { (void) XUnmapWindow(Tk_Display(togl->TkWin), togl->OverlayWindow); togl->OverlayIsMapped = False; } } void Togl_PostOverlayRedisplay(Togl *togl) { if (!togl->OverlayUpdatePending && togl->OverlayWindow && togl->OverlayDisplayProc) { Tk_DoWhenIdle(Togl_RenderOverlay, (ClientData) togl); togl->OverlayUpdatePending = True; } } int Togl_ExistsOverlay(const Togl *togl) { return togl->OverlayFlag; } int Togl_GetOverlayTransparentValue(const Togl *togl) { return togl->OverlayTransparentPixel; } int Togl_IsMappedOverlay(const Togl *togl) { return togl->OverlayFlag && togl->OverlayIsMapped; } unsigned long Togl_AllocColorOverlay(const Togl *togl, float red, float green, float blue) { #if defined(TOGL_X11) /* not yet implemented on Windows */ if (togl->OverlayFlag && togl->OverlayCmap) { XColor xcol; xcol.red = (short) (red * 65535.0); xcol.green = (short) (green * 65535.0); xcol.blue = (short) (blue * 65535.0); if (!XAllocColor(Tk_Display(togl->TkWin), togl->OverlayCmap, &xcol)) return (unsigned long) -1; return xcol.pixel; } #endif /* TOGL_X11 */ return (unsigned long) -1; } void Togl_FreeColorOverlay(const Togl *togl, unsigned long pixel) { #if defined(TOGL_X11) /* not yet implemented on Windows */ if (togl->OverlayFlag && togl->OverlayCmap) { (void) XFreeColors(Tk_Display(togl->TkWin), togl->OverlayCmap, &pixel, 1, 0); } #endif /* TOGL_X11 */ } /* * User client data */ ClientData Togl_GetClientData(const Togl *togl) { return togl->Client_Data; } void Togl_SetClientData(Togl *togl, ClientData clientData) { togl->Client_Data = clientData; } int Togl_CopyContext(const Togl *from, const Togl *to, unsigned mask) { #ifdef TOGL_X11 int error_code; int same = (glXGetCurrentContext() == to->Ctx); if (same) (void) glXMakeCurrent(to->display, None, NULL); togl_SetupXErrorHandler(); glXCopyContext(from->display, from->Ctx, to->Ctx, mask); if (error_code = togl_CheckForXError(from)) { char buf[256]; XGetErrorText(from->display, error_code, buf, sizeof buf); Tcl_AppendResult(from->Interp, "unable to copy context: ", buf, NULL); return TCL_ERROR; } #elif defined(TOGL_WGL) int same = (wglGetCurrentContext() == to->Ctx); if (same) (void) wglMakeCurrent(to->tglGLHdc, NULL); if (!wglCopyContext(from->Ctx, to->Ctx, mask)) { char buf[256]; snprintf(buf, sizeof buf, "unable to copy context: %d", GetLastError()); Tcl_AppendElement(from->Interp, buf); return TCL_ERROR; } #elif defined(TOGL_AGL) int same = (aglGetCurrentContext() == to->Ctx); if (same) (void) aglSetCurrentContext(NULL); if (!aglCopyContext(from->Ctx, to->Ctx, mask)) { Tcl_AppendResult(from->Interp, "unable to copy context: ", aglErrorString(aglGetError()), NULL); return TCL_ERROR; } #elif defined(TOGL_NSOPENGL) int same = (from->Ctx == to->Ctx); if (same) { [NSOpenGLContext clearCurrentContext]; } [to->Ctx copyAttributesFromContext:from->Ctx withMask:mask]; #endif if (same) Togl_MakeCurrent(to); return TCL_OK; } #ifdef MESA_COLOR_HACK /* * Let's know how many free colors do we have */ # define RLEVELS 5 # define GLEVELS 9 # define BLEVELS 5 /* to free dithered_rgb_colormap pixels allocated by Mesa */ static unsigned long *ToglMesaUsedPixelCells = NULL; static int ToglMesaUsedFreeCells = 0; static int get_free_color_cells(Display *display, int screen, Colormap colormap) { if (!ToglMesaUsedPixelCells) { XColor xcol; int i; int colorsfailed, ncolors = XDisplayCells(display, screen); long r, g, b; ToglMesaUsedPixelCells = (unsigned long *) ckalloc(ncolors * sizeof (unsigned long)); /* Allocate X colors and initialize color_table[], red_table[], etc */ /* de Mesa 2.1: xmesa1.c setup_dithered_(...) */ i = colorsfailed = 0; for (r = 0; r < RLEVELS; r++) for (g = 0; g < GLEVELS; g++) for (b = 0; b < BLEVELS; b++) { int exact; xcol.red = (r * 65535) / (RLEVELS - 1); xcol.green = (g * 65535) / (GLEVELS - 1); xcol.blue = (b * 65535) / (BLEVELS - 1); noFaultXAllocColor(display, colormap, ncolors, &xcol, &exact); ToglMesaUsedPixelCells[i++] = xcol.pixel; if (!exact) { colorsfailed++; } } ToglMesaUsedFreeCells = i; XFreeColors(display, colormap, ToglMesaUsedPixelCells, ToglMesaUsedFreeCells, 0x00000000); } return ToglMesaUsedFreeCells; } static void free_default_color_cells(Display *display, Colormap colormap) { if (ToglMesaUsedPixelCells) { XFreeColors(display, colormap, ToglMesaUsedPixelCells, ToglMesaUsedFreeCells, 0x00000000); ckfree((char *) ToglMesaUsedPixelCells); ToglMesaUsedPixelCells = NULL; ToglMesaUsedFreeCells = 0; } } #endif /* * Original stereo code contributed by Ben Evans (Ben.Evans@anusf.anu.edu.au) * and was based on SGI's /usr/share/src/OpenGL/teach/stereo/glwstereo.c, * which is identical to the 1997/12/1 glwstereo.c code in the CrystalEyes * Software Development Kit. */ int Togl_NumEyes(const Togl *togl) { if (togl->Stereo > TOGL_STEREO_ONE_EYE_MAX) return 2; return 1; } /* call instead of glDrawBuffer */ void Togl_DrawBuffer(Togl *togl, GLenum mode) { if (togl->Stereo <= TOGL_STEREO_ONE_EYE_MAX) { /* Only drawing a single eye */ if (togl->currentStereoBuffer != STEREO_BUFFER_NONE) { Togl_SetViewPort(togl); glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); togl->currentStereoBuffer = STEREO_BUFFER_NONE; } switch (mode) { case GL_FRONT: case GL_BACK: case GL_FRONT_AND_BACK: break; case GL_LEFT: case GL_FRONT_LEFT: case GL_RIGHT: case GL_FRONT_RIGHT: mode = GL_FRONT; break; case GL_BACK_LEFT: case GL_BACK_RIGHT: mode = GL_BACK; break; default: break; } glDrawBuffer(mode); return; } /* called once for each eye */ switch (mode) { case GL_FRONT: case GL_BACK: case GL_FRONT_AND_BACK: /* ** Simultaneous drawing to both left and right buffers isn't ** really possible if we don't have a stereo capable visual. ** For now just fall through and use the left buffer. */ case GL_LEFT: case GL_FRONT_LEFT: case GL_BACK_LEFT: togl->currentStereoBuffer = STEREO_BUFFER_LEFT; break; case GL_RIGHT: case GL_FRONT_RIGHT: case GL_BACK_RIGHT: togl->currentStereoBuffer = STEREO_BUFFER_RIGHT; break; default: break; } if (togl->Stereo != TOGL_STEREO_NATIVE) { switch (mode) { default: mode = GL_FRONT; break; case GL_BACK: case GL_BACK_LEFT: case GL_BACK_RIGHT: mode = GL_BACK; break; } } int w = togl->Width*togl->PixelScale, h = togl->Height*togl->PixelScale; switch (togl->Stereo) { default: break; #ifdef __sgi case TOGL_STEREO_SGIOLDSTYLE: glXWaitGL(); /* sync with GL command stream before calling X */ XSGISetStereoBuffer(togl->display, Tk_WindowId(togl->TkWin), togl->currentStereoBuffer); glXWaitX(); /* sync with X command stream before calling GL */ break; #endif case TOGL_STEREO_ANAGLYPH: if (togl->currentStereoBuffer == STEREO_BUFFER_LEFT) glColorMask(GL_TRUE, GL_FALSE, GL_FALSE, GL_TRUE); else glColorMask(GL_FALSE, GL_TRUE, GL_TRUE, GL_TRUE); glViewport(0, 0, w, h); break; case TOGL_STEREO_CROSS_EYE: if (togl->currentStereoBuffer == STEREO_BUFFER_LEFT) glViewport(w / 2 + 1, 0, w / 2, h); else glViewport(0, 0, w / 2, h); break; case TOGL_STEREO_WALL_EYE: if (togl->currentStereoBuffer == STEREO_BUFFER_LEFT) glViewport(0, 0, w / 2, h); else glViewport(w / 2 + 1, 0, w / 2, h); break; case TOGL_STEREO_DTI: if (togl->currentStereoBuffer == STEREO_BUFFER_LEFT) glViewport(0, 0, w / 2, h); else glViewport(w / 2 + 1, 0, w / 2, h); break; case TOGL_STEREO_ROW_INTERLEAVED: glViewport(0, 0, w, h); break; } glDrawBuffer(mode); } /* call instead of glClear */ void Togl_Clear(const Togl *togl, GLbitfield mask) { GLint stencil_write_mask = 0; GLint stencil_clear_value = 0; switch (togl->Stereo) { default: break; case TOGL_STEREO_CROSS_EYE: case TOGL_STEREO_WALL_EYE: case TOGL_STEREO_DTI: if (togl->currentStereoBuffer != STEREO_BUFFER_LEFT) { /* Since glViewport does not affect what is cleared (unlike * glScissor), only clear in left eye */ return; } break; case TOGL_STEREO_ROW_INTERLEAVED: if (togl->currentStereoBuffer == STEREO_BUFFER_LEFT) { if ((mask & GL_STENCIL_BUFFER_BIT) == 0) { mask |= GL_STENCIL_BUFFER_BIT; glStencilMask(~0u); glClearStencil(0); } else { glGetIntegerv(GL_STENCIL_WRITEMASK, &stencil_write_mask); glGetIntegerv(GL_STENCIL_CLEAR_VALUE, &stencil_clear_value); glStencilMask(stencil_write_mask | togl->riStencilBit); glClearStencil(stencil_clear_value & ~togl->riStencilBit); } } else { mask &= ~(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); } break; } #if 0 /* only needed if we wish to support multi-eye clears */ if (togl->Stereo > TOGL_STEREO_ONE_EYE_MAX) { GLenum drawBuffer = togl->currentDrawBuffer; switch (drawBuffer) { case GL_FRONT: Togl_DrawBuffer(togl, GL_FRONT_RIGHT); glClear(mask); Togl_DrawBuffer(togl, drawBuffer); break; case GL_BACK: Togl_DrawBuffer(togl, GL_BACK_RIGHT); glClear(mask); Togl_DrawBuffer(togl, drawBuffer); break; case GL_FRONT_AND_BACK: Togl_DrawBuffer(togl, GL_RIGHT); glClear(mask); Togl_DrawBuffer(togl, drawBuffer); break; case GL_LEFT: case GL_FRONT_LEFT: case GL_BACK_LEFT: case GL_RIGHT: case GL_FRONT_RIGHT: case GL_BACK_RIGHT: default: break; } } #endif if (mask != 0) glClear(mask); if (togl->Stereo == TOGL_STEREO_ROW_INTERLEAVED) { int x, y; if (togl->currentStereoBuffer == STEREO_BUFFER_LEFT) { int i; /* initialize stencil buffer mask */ glPushAttrib(GL_COLOR_BUFFER_BIT | GL_ENABLE_BIT | GL_LINE_BIT | GL_VIEWPORT_BIT); // 2d projection Togl_SetViewPort(togl); glMatrixMode(GL_PROJECTION); glPushMatrix(); glLoadIdentity(); glOrtho(0, togl->Width, 0, togl->Height, -1, 1); glMatrixMode(GL_MODELVIEW); glPushMatrix(); glLoadIdentity(); glTranslatef(0.375f, 0.375f, 0); glDisable(GL_ALPHA_TEST); glDisable(GL_COLOR_LOGIC_OP); glDisable(GL_DEPTH_TEST); glDisable(GL_DITHER); glDisable(GL_INDEX_LOGIC_OP); glDisable(GL_LIGHTING); glDisable(GL_LINE_SMOOTH); glDisable(GL_MULTISAMPLE); glLineWidth(1); glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE); glStencilFunc(GL_ALWAYS, togl->riStencilBit, togl->riStencilBit); glStencilOp(GL_KEEP, GL_REPLACE, GL_REPLACE); glBegin(GL_LINES); for (i = 0; i < togl->Height; i += 2) { glVertex2i(0, i); glVertex2i(togl->Width, i); } glEnd(); glMatrixMode(GL_PROJECTION); glPopMatrix(); glMatrixMode(GL_MODELVIEW); glPopMatrix(); glPopAttrib(); if (stencil_write_mask) { glStencilMask(stencil_write_mask & ~togl->riStencilBit); } else { glStencilMask(~togl->riStencilBit); } Tk_GetRootCoords(togl->TkWin, &x, &y); if ((y + togl->Height) % 2) { glStencilFunc(GL_NOTEQUAL, togl->riStencilBit, togl->riStencilBit); } else { glStencilFunc(GL_EQUAL, togl->riStencilBit, togl->riStencilBit); } } else { Tk_GetRootCoords(togl->TkWin, &x, &y); if ((y + togl->Height) % 2) { glStencilFunc(GL_EQUAL, togl->riStencilBit, togl->riStencilBit); } else { glStencilFunc(GL_NOTEQUAL, togl->riStencilBit, togl->riStencilBit); } } } } /* * Togl_Frustum and Togl_Ortho: * * eyeOffset is the distance from the center line * and is negative for the left eye and positive for right eye. * eyeDist and eyeOffset need to be in the same units as your model space. * In physical space, eyeDist might be 30 inches from the screen * and eyeDist would be +/- 1.25 inch (for a total interocular distance * of 2.5 inches). */ void Togl_Frustum(const Togl *togl, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar) { GLdouble eyeOffset = 0, eyeShift = 0; if (togl->Stereo == TOGL_STEREO_LEFT_EYE || togl->currentStereoBuffer == STEREO_BUFFER_LEFT) eyeOffset = -togl->EyeSeparation / 2; /* for left eye */ else if (togl->Stereo == TOGL_STEREO_RIGHT_EYE || togl->currentStereoBuffer == STEREO_BUFFER_RIGHT) eyeOffset = togl->EyeSeparation / 2; /* for right eye */ eyeShift = (togl->Convergence - zNear) * (eyeOffset / togl->Convergence); /* compenstate for altered viewports */ switch (togl->Stereo) { default: break; case TOGL_STEREO_SGIOLDSTYLE: case TOGL_STEREO_DTI: /* squished image is expanded, nothing needed */ break; case TOGL_STEREO_CROSS_EYE: case TOGL_STEREO_WALL_EYE:{ GLdouble delta = (top - bottom) / 2; top += delta; bottom -= delta; break; } } glFrustum(left + eyeShift, right + eyeShift, bottom, top, zNear, zFar); glTranslated(-eyeShift, 0, 0); } void Togl_Ortho(const Togl *togl, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar) { /* TODO: debug this */ GLdouble eyeOffset = 0, eyeShift = 0; if (togl->currentStereoBuffer == STEREO_BUFFER_LEFT) eyeOffset = -togl->EyeSeparation / 2; /* for left eye */ else if (togl->currentStereoBuffer == STEREO_BUFFER_RIGHT) eyeOffset = togl->EyeSeparation / 2; /* for right eye */ eyeShift = (togl->Convergence - zNear) * (eyeOffset / togl->Convergence); /* compenstate for altered viewports */ switch (togl->Stereo) { default: break; case TOGL_STEREO_SGIOLDSTYLE: case TOGL_STEREO_DTI: /* squished image is expanded, nothing needed */ break; case TOGL_STEREO_CROSS_EYE: case TOGL_STEREO_WALL_EYE:{ GLdouble delta = (top - bottom) / 2; top += delta; bottom -= delta; break; } } glOrtho(left + eyeShift, right + eyeShift, bottom, top, zNear, zFar); glTranslated(-eyeShift, 0, 0); } int Togl_GetToglFromObj(Tcl_Interp *interp, Tcl_Obj *obj, Togl **toglPtr) { Tcl_Command toglCmd; Tcl_CmdInfo info; toglCmd = Tcl_GetCommandFromObj(interp, obj); if (Tcl_GetCommandInfoFromToken(toglCmd, &info) == 0 || info.objProc != Togl_ObjWidget) { Tcl_AppendResult(interp, "expected togl command argument", NULL); return TCL_ERROR; } *toglPtr = (Togl *) info.objClientData; return TCL_OK; } int Togl_GetToglFromName(Tcl_Interp *interp, const char *cmdName, Togl **toglPtr) { Tcl_CmdInfo info; if (Tcl_GetCommandInfo(interp, cmdName, &info) == 0 || info.objProc != Togl_ObjWidget) { Tcl_AppendResult(interp, "expected togl command argument", NULL); return TCL_ERROR; } *toglPtr = (Togl *) info.objClientData; return TCL_OK; } static int ObjectIsEmpty(Tcl_Obj *objPtr); /* *---------------------------------------------------------------------- * * GetStereo - * * Converts an internal int into a a Tcl string obj. * * Results: * Tcl_Obj containing the string representation of the stereo value. * * Side effects: * Creates a new Tcl_Obj. * *---------------------------------------------------------------------- */ static Tcl_Obj * GetStereo(ClientData clientData, Tk_Window tkwin, char *recordPtr, int internalOffset) /* recordPtr is a pointer to widget record. */ /* internalOffset is the offset within *recordPtr containing the stereo * value. */ { int stereo = *(int *) (recordPtr + internalOffset); const char *name = "unknown"; switch (stereo) { case TOGL_STEREO_NONE: name = ""; break; case TOGL_STEREO_LEFT_EYE: name = "left eye"; break; case TOGL_STEREO_RIGHT_EYE: name = "right eye"; break; case TOGL_STEREO_NATIVE: name = "native"; break; case TOGL_STEREO_SGIOLDSTYLE: name = "sgioldstyle"; break; case TOGL_STEREO_ANAGLYPH: name = "anaglyph"; break; case TOGL_STEREO_CROSS_EYE: name = "cross-eye"; break; case TOGL_STEREO_WALL_EYE: name = "wall-eye"; break; case TOGL_STEREO_DTI: name = "dti"; break; case TOGL_STEREO_ROW_INTERLEAVED: name = "row interleaved"; break; } return Tcl_NewStringObj(name, -1); } /* *---------------------------------------------------------------------- * * SetStereo -- * * Converts a Tcl_Obj representing a widgets stereo into an * integer value. * * Results: * Standard Tcl result. * * Side effects: * May store the integer value into the internal representation * pointer. May change the pointer to the Tcl_Obj to NULL to indicate * that the specified string was empty and that is acceptable. * *---------------------------------------------------------------------- */ static int SetStereo(ClientData clientData, Tcl_Interp *interp, Tk_Window tkwin, Tcl_Obj **value, char *recordPtr, int internalOffset, char *oldInternalPtr, int flags) /* interp is the current interp; may be used for errors. */ /* tkwin is the Window for which option is being set. */ /* value is a pointer to the pointer to the value object. We use a pointer * to the pointer because we may need to return a value (NULL). */ /* recordPtr is a pointer to storage for the widget record. */ /* internalOffset is the offset within *recordPtr at which the internal * value is to be stored. */ /* oldInternalPtr is a pointer to storage for the old value. */ /* flags are the flags for the option, set Tk_SetOptions. */ { int stereo = 0; char *string, *internalPtr; internalPtr = (internalOffset > 0) ? recordPtr + internalOffset : NULL; if ((flags & TK_OPTION_NULL_OK) && ObjectIsEmpty(*value)) { *value = NULL; } else { /* * Convert the stereo specifier into an integer value. */ if (Tcl_GetBooleanFromObj(NULL, *value, &stereo) == TCL_OK) { stereo = stereo ? TOGL_STEREO_NATIVE : TOGL_STEREO_NONE; } else { string = Tcl_GetString(*value); if (strcmp(string, "") == 0 || strcasecmp(string, "none") == 0) { stereo = TOGL_STEREO_NONE; } else if (strcasecmp(string, "native") == 0) { stereo = TOGL_STEREO_NATIVE; /* check if available when creating visual */ } else if (strcasecmp(string, "left eye") == 0) { stereo = TOGL_STEREO_LEFT_EYE; } else if (strcasecmp(string, "right eye") == 0) { stereo = TOGL_STEREO_RIGHT_EYE; } else if (strcasecmp(string, "sgioldstyle") == 0) { stereo = TOGL_STEREO_SGIOLDSTYLE; } else if (strcasecmp(string, "anaglyph") == 0) { stereo = TOGL_STEREO_ANAGLYPH; } else if (strcasecmp(string, "cross-eye") == 0) { stereo = TOGL_STEREO_CROSS_EYE; } else if (strcasecmp(string, "wall-eye") == 0) { stereo = TOGL_STEREO_WALL_EYE; } else if (strcasecmp(string, "dti") == 0) { stereo = TOGL_STEREO_DTI; } else if (strcasecmp(string, "row interleaved") == 0) { stereo = TOGL_STEREO_ROW_INTERLEAVED; } else { Tcl_ResetResult(interp); Tcl_AppendResult(interp, "bad stereo value \"", Tcl_GetString(*value), "\"", NULL); return TCL_ERROR; } } } if (internalPtr != NULL) { *((int *) oldInternalPtr) = *((int *) internalPtr); *((int *) internalPtr) = stereo; } return TCL_OK; } /* *---------------------------------------------------------------------- * RestoreStereo -- * * Restore a stereo option value from a saved value. * * Results: * None. * * Side effects: * Restores the old value. * *---------------------------------------------------------------------- */ static void RestoreStereo(ClientData clientData, Tk_Window tkwin, char *internalPtr, char *oldInternalPtr) { *(int *) internalPtr = *(int *) oldInternalPtr; } /* *---------------------------------------------------------------------- * * GetWideInt - * * Converts an internal wide integer into a a Tcl WideInt obj. * * Results: * Tcl_Obj containing the wide int value. * * Side effects: * Creates a new Tcl_Obj. * *---------------------------------------------------------------------- */ static Tcl_Obj * GetWideInt(ClientData clientData, Tk_Window tkwin, char *recordPtr, int internalOffset) /* recordPtr is a pointer to widget record. */ /* internalOffset is the offset within *recordPtr containing the wide int * value. */ { Tcl_WideInt wi = *(Tcl_WideInt *) (recordPtr + internalOffset); return Tcl_NewWideIntObj(wi); } /* *---------------------------------------------------------------------- * * SetWideInt -- * * Converts a Tcl_Obj representing a Tcl_WideInt. * * Results: * Standard Tcl result. * * Side effects: * May store the wide int value into the internal representation * pointer. May change the pointer to the Tcl_Obj to NULL to indicate * that the specified string was empty and that is acceptable. * *---------------------------------------------------------------------- */ static int SetWideInt(ClientData clientData, Tcl_Interp *interp, Tk_Window tkwin, Tcl_Obj **value, char *recordPtr, int internalOffset, char *oldInternalPtr, int flags) /* interp is the current interp; may be used for errors. */ /* tkwin is the Window for which option is being set. */ /* value is a pointer to the pointer to the value object. We use a pointer * to the pointer because we may need to return a value (NULL). */ /* recordPtr is a pointer to storage for the widget record. */ /* internalOffset is the offset within *recordPtr at which the internal * value is to be stored. */ /* oldInternalPtr is a pointer to storage for the old value. */ /* flags are the flags for the option, set Tk_SetOptions. */ { char *internalPtr; Tcl_WideInt w; internalPtr = (internalOffset > 0) ? recordPtr + internalOffset : NULL; if ((flags & TK_OPTION_NULL_OK) && ObjectIsEmpty(*value)) { *value = NULL; w = 0; } else { if (Tcl_GetWideIntFromObj(interp, *value, &w) != TCL_OK) { return TCL_ERROR; } } if (internalPtr != NULL) { *((Tcl_WideInt *) oldInternalPtr) = *((Tcl_WideInt *) internalPtr); *((Tcl_WideInt *) internalPtr) = w; } return TCL_OK; } /* *---------------------------------------------------------------------- * RestoreWideInt -- * * Restore a wide int option value from a saved value. * * Results: * None. * * Side effects: * Restores the old value. * *---------------------------------------------------------------------- */ static void RestoreWideInt(ClientData clientData, Tk_Window tkwin, char *internalPtr, char *oldInternalPtr) { *(Tcl_WideInt *) internalPtr = *(Tcl_WideInt *) oldInternalPtr; } /* *---------------------------------------------------------------------- * * ObjectIsEmpty -- * * This procedure tests whether the string value of an object is * empty. * * Results: * The return value is 1 if the string value of objPtr has length * zero, and 0 otherwise. * * Side effects: * None. * *---------------------------------------------------------------------- */ static int ObjectIsEmpty(Tcl_Obj *objPtr) /* objPtr = Object to test. May be NULL. */ { int length; if (objPtr == NULL) { return 1; } if (objPtr->bytes != NULL) { return (objPtr->length == 0); } Tcl_GetStringFromObj(objPtr, &length); return (length == 0); } netgen-6.2.1804/ng/onetcl.cpp0000644000175000017500000100577213272137567014415 0ustar kurtkurtconst char * ngscript[] = {"" ,"catch {lappend auto_path $env(NETGENDIR) }\n" ,"catch {lappend auto_path $env(NETGENDIR)/../lib }\n" ,"if {[catch {Ng_GetCommandLineParameter batchmode} result ]} {\n" ,"load libgui[info sharedlibextension] gui\n" ,"}\n" ,"set batchmode [Ng_GetCommandLineParameter batchmode]\n" ,"if {$batchmode==\"undefined\"} {\n" ,"if {[catch {package require tkdnd } result ]} {\n" ,"}\n" ,"}\n" ,"set userlevel 3\n" ,"if { [Ng_GetCommandLineParameter expert]==\"defined\" } {\n" ,"set userlevel 3\n" ,"}\n" ,"set progname \"NETGEN\"\n" ,"set ngdir \"\"\n" ,"if { [lsearch [array names env] NETGENDIR] != -1 } {\n" ,"set ngdir $env(NETGENDIR)\n" ,"}\n" ,"if { [string length $ngdir] == 0 } {\n" ,"set ngdir \".\"\n" ,"}\n" ,"set nguserdir \"\"\n" ,"if { [lsearch [array names env] NETGEN_USER_DIR] != -1 } {\n" ,"set nguserdir $env(NETGEN_USER_DIR)\n" ,"}\n" ,"if { [string length $nguserdir] == 0 } {\n" ,"set nguserdir \".\"\n" ,"}\n" ,"set batchmode [Ng_GetCommandLineParameter batchmode]\n" ,"set solvemode 0\n" ,"if { [Ng_GetCommandLineParameter solve] != \"undefined\" || \\\n" ,"[Ng_GetCommandLineParameter recent] == \"defined\" } {\n" ,"set solvemode defined\n" ,"}\n" ,"set shellmode [Ng_GetCommandLineParameter shellmode]\n" ,"if { $shellmode == \"defined\" } {\n" ,"set batchmode \"defined\"\n" ,"}\n" ,"if { $batchmode != \"defined\" } {\n" ,"catch {\n" ,"wm withdraw .\n" ,"wm title . $progname\n" ,"wm geometry . =850x600\n" ,"wm minsize . 400 300\n" ,"}\n" ,"}\n" ,"set drawmode rotate\n" ,"set selectvisual geometry\n" ,"set dirname .\n" ,"set loadgeomtypevar \"All Geometry types\"\n" ,"set basefilename filename\n" ,"set meshoptions.fineness 3\n" ,"set meshoptions.firststep ag\n" ,"set meshoptions.laststep ov\n" ,"set options.memory 0\n" ,"set options.localh 1\n" ,"set options.delaunay 1\n" ,"set options.checkoverlap 1\n" ,"set options.checkoverlappingboundary 0\n" ,"set options.checkchartboundary 1\n" ,"set options.startinsurface 0\n" ,"set options.blockfill 1\n" ,"set options.debugmode 0\n" ,"set options.dooptimize 1\n" ,"set options.parthread 1\n" ,"set options.elsizeweight 0.2\n" ,"set options.secondorder 0\n" ,"set options.elementorder 1\n" ,"set options.quad 0\n" ,"set options.try_hexes 0\n" ,"set options.inverttets 0\n" ,"set options.inverttrigs 0\n" ,"set options.autozrefine 0\n" ,"set options.meshsize 1000\n" ,"set options.minmeshsize 0\n" ,"set options.curvaturesafety 2\n" ,"set options.segmentsperedge 2\n" ,"set options.meshsizefilename \"\"\n" ,"set options.badellimit 175\n" ,"set options.optsteps2d 3\n" ,"set options.optsteps3d 5\n" ,"set options.opterrpow 2\n" ,"set options.grading 0.5\n" ,"set options.printmsg 2\n" ,"set debug.slowchecks 0\n" ,"set debug.debugoutput 0\n" ,"set debug.haltexistingline 0\n" ,"set debug.haltoverlap 0\n" ,"set debug.haltsuccess 0\n" ,"set debug.haltnosuccess 0\n" ,"set debug.haltlargequalclass 0\n" ,"set debug.haltsegment 0\n" ,"set debug.haltnode 0\n" ,"set debug.haltface 0\n" ,"set debug.haltfacenr 0\n" ,"set debug.haltsegmentp1 0\n" ,"set debug.haltsegmentp2 0\n" ,"set geooptions.drawcsg 1\n" ,"set geooptions.detail 0.001\n" ,"set geooptions.accuracy 1e-6\n" ,"set geooptions.facets 20\n" ,"set geooptions.minx -1000\n" ,"set geooptions.miny -1000\n" ,"set geooptions.minz -1000\n" ,"set geooptions.maxx 1000\n" ,"set geooptions.maxy 1000\n" ,"set geooptions.maxz 1000\n" ,"set viewqualityplot 0\n" ,"set memuseplot 0\n" ,"set viewrotatebutton 0\n" ,"set showsensitivehelp 0\n" ,"set showhelpline 0\n" ,"set viewoptions.specpointvlen 0.3\n" ,"set viewoptions.light.amb 0.3\n" ,"set viewoptions.light.diff 0.7\n" ,"set viewoptions.light.spec 1\n" ,"set viewoptions.light.locviewer 0\n" ,"set viewoptions.mat.shininess 50\n" ,"set viewoptions.mat.transp 0.3\n" ,"set viewoptions.colormeshsize 0\n" ,"set viewoptions.whitebackground 1\n" ,"set viewoptions.drawcoordinatecross 1\n" ,"set viewoptions.drawcolorbar 1\n" ,"set viewoptions.drawnetgenlogo 1\n" ,"set viewoptions.stereo 0\n" ,"set viewoptions.shrink 1\n" ,"set viewoptions.drawfilledtrigs 1\n" ,"set viewoptions.drawedges 0\n" ,"set viewoptions.drawbadels 0\n" ,"set viewoptions.centerpoint 0\n" ,"set viewoptions.drawelement 0\n" ,"set viewoptions.drawoutline 1\n" ,"set viewoptions.drawtets 0\n" ,"set viewoptions.drawtetsdomain 0\n" ,"set viewoptions.drawprisms 0\n" ,"set viewoptions.drawpyramids 0\n" ,"set viewoptions.drawhexes 0\n" ,"set viewoptions.drawidentified 0\n" ,"set viewoptions.drawpointnumbers 0\n" ,"set viewoptions.drawedgenumbers 0\n" ,"set viewoptions.drawfacenumbers 0\n" ,"set viewoptions.drawelementnumbers 0\n" ,"set viewoptions.drawdomainsurf 0\n" ,"set viewoptions.drawededges 1\n" ,"set viewoptions.drawedpoints 1\n" ,"set viewoptions.drawedpointnrs 0\n" ,"set viewoptions.drawedtangents 0\n" ,"set viewoptions.drawededgenrs 0\n" ,"set viewoptions.drawmetispartition 0\n" ,"set viewoptions.drawcurveproj 0\n" ,"set viewoptions.drawcurveprojedge 1\n" ,"set viewoptions.clipping.nx 0\n" ,"set viewoptions.clipping.ny 1\n" ,"set viewoptions.clipping.nz 0\n" ,"set viewoptions.clipping.dist 0\n" ,"set viewoptions.clipping.dist2 0\n" ,"set viewoptions.clipping.enable 0\n" ,"set viewoptions.clipping.onlydomain 0\n" ,"set viewoptions.clipping.notdomain 0\n" ,"set viewoptions.usecentercoords 0\n" ,"set viewoptions.centerx 0\n" ,"set viewoptions.centery 0\n" ,"set viewoptions.centerz 0\n" ,"set viewoptions.drawspecpoint 0\n" ,"set viewoptions.specpointx 0\n" ,"set viewoptions.specpointy 0\n" ,"set viewoptions.specpointz 0\n" ,"set stloptions.showtrias 0\n" ,"set stloptions.showfilledtrias 1\n" ,"set stloptions.showedges 1\n" ,"set stloptions.showmarktrias 0\n" ,"set stloptions.showactivechart 0\n" ,"set stloptions.yangle 30\n" ,"set stloptions.contyangle 20\n" ,"set stloptions.edgecornerangle 60\n" ,"set stloptions.chartangle 15\n" ,"set stloptions.outerchartangle 70\n" ,"set stloptions.usesearchtree 0\n" ,"set stloptions.chartnumber 1\n" ,"set stloptions.charttrignumber 1\n" ,"set stloptions.chartnumberoffset 0\n" ,"set stloptions.atlasminh 0.1\n" ,"set stloptions.resthsurfcurvfac 2\n" ,"set stloptions.resthsurfcurvenable 0\n" ,"set stloptions.resthatlasfac 2\n" ,"set stloptions.resthatlasenable 1\n" ,"set stloptions.resthchartdistfac 1.2\n" ,"set stloptions.resthchartdistenable 1\n" ,"set stloptions.resthlinelengthfac 0.5\n" ,"set stloptions.resthlinelengthenable 1\n" ,"set stloptions.resthcloseedgefac 1\n" ,"set stloptions.resthcloseedgeenable 1\n" ,"set stloptions.resthminedgelen 0.01\n" ,"set stloptions.resthminedgelenenable 1\n" ,"set stloptions.resthedgeanglefac 1\n" ,"set stloptions.resthedgeangleenable 0\n" ,"set stloptions.resthsurfmeshcurvfac 1\n" ,"set stloptions.resthsurfmeshcurvenable 0\n" ,"set stloptions.recalchopt 1\n" ,"set stldoctor.drawmeshededges 1\n" ,"set stldoctor.geom_tol_fact 0.000001\n" ,"set stldoctor.useexternaledges 0\n" ,"set stldoctor.showfaces 0\n" ,"set stldoctor.conecheck 1\n" ,"set stldoctor.spiralcheck 1\n" ,"set stldoctor.selecttrig 0\n" ,"set stldoctor.selectmode 1\n" ,"set stldoctor.longlinefact 0\n" ,"set stldoctor.showexcluded 1\n" ,"set stldoctor.edgeselectmode 0\n" ,"set stldoctor.nodeofseltrig 1\n" ,"set stldoctor.showtouchedtrigchart 0\n" ,"set stldoctor.showedgecornerpoints 0\n" ,"set stldoctor.showmarkedtrigs 1\n" ,"set stldoctor.dirtytrigfact 0.01\n" ,"set stldoctor.smoothangle 90\n" ,"set stldoctor.selectwithmouse 1\n" ,"set stldoctor.showvicinity 0\n" ,"set stldoctor.vicinity 50\n" ,"set stldoctor.smoothnormalsweight 0.2\n" ,"set occoptions.showvolumenr 0\n" ,"set occoptions.showsurfaces 1\n" ,"set occoptions.showedges 1\n" ,"set occoptions.showsolidnr 0\n" ,"set occoptions.showsolidnr2 0\n" ,"set occoptions.visproblemfaces 0\n" ,"set occoptions.zoomtohighlightedentity 0\n" ,"set occoptions.deflection 1\n" ,"set occoptions.tolerance 1e-3\n" ,"set occoptions.fixsmalledges 1\n" ,"set occoptions.fixspotstripfaces 1\n" ,"set occoptions.sewfaces 1\n" ,"set occoptions.makesolids 1\n" ,"set occoptions.splitpartitions 0\n" ,"set meshdoctor.active 0\n" ,"set meshdoctor.markedgedist 1\n" ,"set status_np 0\n" ,"set status_ne 0\n" ,"set status_nse 0\n" ,"set status_working \" \"\n" ,"set status_task \" \"\n" ,"set status_percent 0\n" ,"set status_filename 0\n" ,"set status_tetqualclasses \"10 20 30 40 10 20 30 40 10 20 30 40 10 20 30 40 10 20 30 40\"\n" ,"set exportfiletype \"Neutral Format\"\n" ,"set preproc.facenr 0\n" ,"set preproc.selectmode query\n" ,"set preproc.numtrig 0\n" ,"set mem_moveable 0\n" ,"set multithread_pause 0\n" ,"set multithread_testmode 0\n" ,"set multithread_redraw 0\n" ,"set multithread_drawing 0\n" ,"set multithread_terminate 0\n" ,"set multithread_running 0\n" ,"set level 0\n" ,"set tablesforoutput {}\n" ,"set optlist {\n" ,"options.localh\n" ,"options.delaunay\n" ,"options.checkoverlap\n" ,"options.startinsurface\n" ,"options.blockfill\n" ,"options.dooptimize\n" ,"options.elsizeweight\n" ,"options.meshsize\n" ,"options.minmeshsize\n" ,"options.curvaturesafety\n" ,"options.optsteps2d\n" ,"options.optsteps3d\n" ,"options.secondorder\n" ,"}\n" ,"set visoptions.usetexture 1\n" ,"set visoptions.invcolor 0\n" ,"set visoptions.imaginary 0\n" ,"set visoptions.lineartexture 0\n" ,"set visoptions.numtexturecols 16\n" ,"set visoptions.showclipsolution 1\n" ,"set visoptions.showsurfacesolution 0\n" ,"set visoptions.drawfieldlines 0\n" ,"set visoptions.drawpointcurves 1\n" ,"set visoptions.numfieldlines 100\n" ,"set visoptions.fieldlinesrandomstart 0\n" ,"set visoptions.fieldlinesstartarea box\n" ,"set visoptions.fieldlinesstartareap1x 1\n" ,"set visoptions.fieldlinesstartareap1y 1\n" ,"set visoptions.fieldlinesstartareap1z 1\n" ,"set visoptions.fieldlinesstartareap2x 0\n" ,"set visoptions.fieldlinesstartareap2y 0\n" ,"set visoptions.fieldlinesstartareap2z 0\n" ,"set visoptions.fieldlinesstartface -1\n" ,"set visoptions.fieldlinesfilename none\n" ,"set visoptions.fieldlinestolerance 0.0005\n" ,"set visoptions.fieldlinesrktype crungekutta\n" ,"set visoptions.fieldlineslength 0.5\n" ,"set visoptions.fieldlinesmaxpoints 500\n" ,"set visoptions.fieldlinesthickness 0.0015\n" ,"set visoptions.fieldlinesvecfunction none\n" ,"set visoptions.fieldlinesphase 0\n" ,"set visoptions.fieldlinesonlyonephase 1\n" ,"set visoptions.lineplotfile empty\n" ,"set visoptions.lineplotsource file\n" ,"set visoptions.lineplotusingx 0\n" ,"set visoptions.lineplotusingy 1\n" ,"set visoptions.lineplotautoscale 1\n" ,"set visoptions.lineplotxmin 0\n" ,"set visoptions.lineplotxmax 1\n" ,"set visoptions.lineplotymin 0\n" ,"set visoptions.lineplotymax 1\n" ,"set visoptions.lineplotcurrentnum -1\n" ,"set visoptions.lineplotinfos \"\"\n" ,"set visoptions.lineplotselected none\n" ,"set visoptions.lineplotselector \"\"\n" ,"set visoptions.lineplotcolor red\n" ,"set visoptions.lineplotsizex 500\n" ,"set visoptions.lineplotsizey 400\n" ,"set visoptions.lineplotselectedeval 0\n" ,"set visoptions.lineplotdatadescr \"column1 column2 column3\"\n" ,"set visoptions.lineplotxcoordselector \"\"\n" ,"set visoptions.lineplotycoordselector \"\"\n" ,"set visoptions.evaluatefilenames none\n" ,"set visoptions.evaluatefiledescriptions none\n" ,"set visoptions.clipsolution none\n" ,"set visoptions.scalfunction none\n" ,"set visoptions.vecfunction none\n" ,"set visoptions.evaluate abs\n" ,"set visoptions.gridsize 20\n" ,"set visoptions.xoffset 0\n" ,"set visoptions.yoffset 0\n" ,"set visoptions.autoscale 1\n" ,"set visoptions.redrawperiodic 0\n" ,"set visoptions.logscale 0\n" ,"set visoptions.mminval 0\n" ,"set visoptions.mmaxval 1\n" ,"set visoptions.isolines 0\n" ,"set visoptions.isosurf 0\n" ,"set visoptions.subdivisions 1\n" ,"set visoptions.numiso 10\n" ,"set visoptions.autoredraw 0\n" ,"set visoptions.autoredrawtime 2\n" ,"set visoptions.simulationtime 0\n" ,"set visoptions.multidimcomponent 0\n" ,"set visoptions.deformation 0\n" ,"set visoptions.scaledeform1 1\n" ,"set visoptions.scaledeform2 1\n" ,"set parallel_netgen 0\n" ,"set optfilename [file join $nguserdir ng.opt]\n" ,"set inifilename [file join $nguserdir ng.ini]\n" ,"set meshinifilename [file join $nguserdir ngmesh.ini]\n" ,"global env\n" ,"if { [llength [array names env NG_OPT]] == 1 } {\n" ,"if { [string length $env(NG_OPT)] > 0 } {\n" ,"set optfilename $env(NG_OPT)\n" ,"}\n" ,"}\n" ,"if { [file exists $optfilename] == 1 } {\n" ,"set datei [open $optfilename r]\n" ,"while { [gets $datei line] >= 0 } {\n" ,"set [lindex $line 0] [lindex $line 1]\n" ,"}\n" ,"close $datei\n" ,"} {\n" ,"puts \"optfile $optfilename does not exist - using default values\"\n" ,"}\n" ,"proc saveoptions { } {\n" ,"uplevel 1 {\n" ,"set file $optfilename\n" ,"if {$file != \"\"} {\n" ,"set datei [open $file w]\n" ,"puts $datei \"dirname ${dirname}\"\n" ,"puts $datei \"loadgeomtypevar \\\"${loadgeomtypevar}\\\"\"\n" ,"puts $datei \"exportfiletype \\\"${exportfiletype}\\\"\"\n" ,"puts $datei \"meshoptions.fineness ${meshoptions.fineness}\"\n" ,"puts $datei \"meshoptions.firststep ${meshoptions.firststep}\"\n" ,"puts $datei \"meshoptions.laststep ${meshoptions.laststep}\"\n" ,"puts $datei \"options.localh ${options.localh}\"\n" ,"puts $datei \"options.delaunay ${options.delaunay}\"\n" ,"puts $datei \"options.checkoverlap ${options.checkoverlap}\"\n" ,"puts $datei \"options.checkchartboundary ${options.checkchartboundary}\"\n" ,"puts $datei \"options.startinsurface ${options.startinsurface}\"\n" ,"puts $datei \"options.blockfill ${options.blockfill}\"\n" ,"puts $datei \"options.debugmode ${options.debugmode}\"\n" ,"puts $datei \"options.dooptimize ${options.dooptimize}\"\n" ,"puts $datei \"options.parthread ${options.parthread}\"\n" ,"puts $datei \"options.elsizeweight ${options.elsizeweight}\"\n" ,"puts $datei \"options.secondorder ${options.secondorder}\"\n" ,"puts $datei \"options.elementorder ${options.elementorder}\"\n" ,"puts $datei \"options.quad ${options.quad}\"\n" ,"puts $datei \"options.try_hexes ${options.try_hexes}\"\n" ,"puts $datei \"options.inverttets ${options.inverttets}\"\n" ,"puts $datei \"options.inverttrigs ${options.inverttrigs}\"\n" ,"puts $datei \"options.autozrefine ${options.autozrefine}\"\n" ,"puts $datei \"options.meshsize ${options.meshsize}\"\n" ,"puts $datei \"options.minmeshsize ${options.minmeshsize}\"\n" ,"puts $datei \"options.curvaturesafety ${options.curvaturesafety}\"\n" ,"puts $datei \"options.segmentsperedge ${options.segmentsperedge}\"\n" ,"puts $datei \"options.meshsizefilename ${options.meshsizefilename}\"\n" ,"puts $datei \"options.badellimit ${options.badellimit}\"\n" ,"puts $datei \"options.optsteps2d ${options.optsteps2d}\"\n" ,"puts $datei \"options.optsteps3d ${options.optsteps3d}\"\n" ,"puts $datei \"options.opterrpow ${options.opterrpow}\"\n" ,"puts $datei \"options.grading ${options.grading}\"\n" ,"puts $datei \"options.printmsg ${options.printmsg}\"\n" ,"puts $datei \"geooptions.drawcsg ${geooptions.drawcsg}\"\n" ,"puts $datei \"geooptions.detail ${geooptions.detail}\"\n" ,"puts $datei \"geooptions.accuracy ${geooptions.accuracy}\"\n" ,"puts $datei \"geooptions.facets ${geooptions.facets}\"\n" ,"puts $datei \"geooptions.minx ${geooptions.minx}\"\n" ,"puts $datei \"geooptions.miny ${geooptions.miny}\"\n" ,"puts $datei \"geooptions.minz ${geooptions.minz}\"\n" ,"puts $datei \"geooptions.maxx ${geooptions.maxx}\"\n" ,"puts $datei \"geooptions.maxy ${geooptions.maxy}\"\n" ,"puts $datei \"geooptions.maxz ${geooptions.maxz}\"\n" ,"puts $datei \"viewoptions.specpointvlen ${viewoptions.specpointvlen}\"\n" ,"puts $datei \"viewoptions.light.amb ${viewoptions.light.amb}\"\n" ,"puts $datei \"viewoptions.light.diff ${viewoptions.light.diff}\"\n" ,"puts $datei \"viewoptions.light.spec ${viewoptions.light.spec}\"\n" ,"puts $datei \"viewoptions.light.locviewer ${viewoptions.light.locviewer}\"\n" ,"puts $datei \"viewoptions.mat.shininess ${viewoptions.mat.shininess}\"\n" ,"puts $datei \"viewoptions.mat.transp ${viewoptions.mat.transp}\"\n" ,"puts $datei \"viewoptions.colormeshsize ${viewoptions.colormeshsize}\"\n" ,"puts $datei \"viewoptions.whitebackground ${viewoptions.whitebackground}\"\n" ,"puts $datei \"viewoptions.drawcolorbar ${viewoptions.drawcolorbar}\"\n" ,"puts $datei \"viewoptions.drawcoordinatecross ${viewoptions.drawcoordinatecross}\"\n" ,"puts $datei \"viewoptions.drawnetgenlogo ${viewoptions.drawnetgenlogo}\"\n" ,"puts $datei \"viewoptions.stereo ${viewoptions.stereo}\"\n" ,"puts $datei \"viewoptions.drawfilledtrigs ${viewoptions.drawfilledtrigs}\"\n" ,"puts $datei \"viewoptions.drawedges ${viewoptions.drawedges}\"\n" ,"puts $datei \"viewoptions.drawbadels ${viewoptions.drawbadels}\"\n" ,"puts $datei \"viewoptions.centerpoint ${viewoptions.centerpoint}\"\n" ,"puts $datei \"viewoptions.drawelement ${viewoptions.drawelement}\"\n" ,"puts $datei \"viewoptions.drawoutline ${viewoptions.drawoutline}\"\n" ,"puts $datei \"viewoptions.drawtets ${viewoptions.drawtets}\"\n" ,"puts $datei \"viewoptions.drawprisms ${viewoptions.drawprisms}\"\n" ,"puts $datei \"viewoptions.drawpyramids ${viewoptions.drawpyramids}\"\n" ,"puts $datei \"viewoptions.drawhexes ${viewoptions.drawhexes}\"\n" ,"puts $datei \"viewoptions.drawidentified ${viewoptions.drawidentified}\"\n" ,"puts $datei \"viewoptions.drawpointnumbers ${viewoptions.drawpointnumbers}\"\n" ,"puts $datei \"viewoptions.drawededges ${viewoptions.drawededges}\"\n" ,"puts $datei \"viewoptions.drawedpoints ${viewoptions.drawedpoints}\"\n" ,"puts $datei \"viewoptions.drawedpointnrs ${viewoptions.drawedpointnrs}\"\n" ,"puts $datei \"viewoptions.drawedtangents ${viewoptions.drawedtangents}\"\n" ,"puts $datei \"viewoptions.shrink ${viewoptions.shrink}\"\n" ,"puts $datei \"stloptions.showtrias ${stloptions.showtrias}\"\n" ,"puts $datei \"stloptions.showfilledtrias ${stloptions.showfilledtrias}\"\n" ,"puts $datei \"stloptions.showedges ${stloptions.showedges}\"\n" ,"puts $datei \"stloptions.showmarktrias ${stloptions.showmarktrias}\"\n" ,"puts $datei \"stloptions.showactivechart ${stloptions.showactivechart}\"\n" ,"puts $datei \"stloptions.yangle ${stloptions.yangle}\"\n" ,"puts $datei \"stloptions.contyangle ${stloptions.contyangle}\"\n" ,"puts $datei \"stloptions.edgecornerangle ${stloptions.edgecornerangle}\"\n" ,"puts $datei \"stloptions.chartangle ${stloptions.chartangle}\"\n" ,"puts $datei \"stloptions.outerchartangle ${stloptions.outerchartangle}\"\n" ,"puts $datei \"stloptions.usesearchtree ${stloptions.usesearchtree}\"\n" ,"puts $datei \"stloptions.chartnumber ${stloptions.chartnumber}\"\n" ,"puts $datei \"stloptions.charttrignumber ${stloptions.charttrignumber}\"\n" ,"puts $datei \"stloptions.chartnumberoffset ${stloptions.chartnumberoffset}\"\n" ,"puts $datei \"stloptions.atlasminh ${stloptions.atlasminh}\"\n" ,"puts $datei \"stloptions.resthsurfcurvfac ${stloptions.resthsurfcurvfac}\"\n" ,"puts $datei \"stloptions.resthsurfcurvenable ${stloptions.resthsurfcurvenable}\"\n" ,"puts $datei \"stloptions.resthatlasfac ${stloptions.resthatlasfac}\"\n" ,"puts $datei \"stloptions.resthatlasenable ${stloptions.resthatlasenable}\"\n" ,"puts $datei \"stloptions.resthchartdistfac ${stloptions.resthchartdistfac}\"\n" ,"puts $datei \"stloptions.resthchartdistenable ${stloptions.resthchartdistenable}\"\n" ,"puts $datei \"stloptions.resthlinelengthfac ${stloptions.resthlinelengthfac}\"\n" ,"puts $datei \"stloptions.resthlinelengthenable ${stloptions.resthlinelengthenable}\"\n" ,"puts $datei \"stloptions.resthminedgelen ${stloptions.resthminedgelen}\"\n" ,"puts $datei \"stloptions.resthminedgelenenable ${stloptions.resthminedgelenenable}\"\n" ,"puts $datei \"stloptions.resthcloseedgefac ${stloptions.resthcloseedgefac}\"\n" ,"puts $datei \"stloptions.resthcloseedgeenable ${stloptions.resthcloseedgeenable}\"\n" ,"puts $datei \"stloptions.resthedgeanglefac ${stloptions.resthedgeanglefac}\"\n" ,"puts $datei \"stloptions.resthedgeangleenable ${stloptions.resthedgeangleenable}\"\n" ,"puts $datei \"stloptions.resthsurfmeshcurvfac ${stloptions.resthsurfmeshcurvfac}\"\n" ,"puts $datei \"stloptions.resthsurfmeshcurvenable ${stloptions.resthsurfmeshcurvenable}\"\n" ,"puts $datei \"stloptions.recalchopt ${stloptions.recalchopt}\"\n" ,"puts $datei \"visoptions.subdivisions ${visoptions.subdivisions}\"\n" ,"puts $datei \"visoptions.autoredraw ${visoptions.autoredraw}\"\n" ,"puts $datei \"visoptions.autoredrawtime ${visoptions.autoredrawtime}\"\n" ,"if { [info exists trafooptions.solver] == 1 } {\n" ,"puts $datei \"trafooptions.solver ${trafooptions.solver}\"\n" ,"puts $datei \"trafooptions.levels ${trafooptions.levels}\"\n" ,"puts $datei \"trafooptions.linits ${trafooptions.linits}\"\n" ,"puts $datei \"trafooptions.nonlinits ${trafooptions.nonlinits}\"\n" ,"puts $datei \"trafooptions.stabcurrent ${trafooptions.stabcurrent}\"\n" ,"puts $datei \"trafooptions.checkcond ${trafooptions.checkcond}\"\n" ,"puts $datei \"trafooptions.maxdirect ${trafooptions.maxdirect}\"\n" ,"puts $datei \"trafooptions.secondorder ${trafooptions.secondorder}\"\n" ,"puts $datei \"trafooptions.homogenizedcore ${trafooptions.homogenizedcore}\"\n" ,"puts $datei \"trafooptions.ordercore ${trafooptions.ordercore}\"\n" ,"puts $datei \"trafooptions.simplecurrents ${trafooptions.simplecurrents}\"\n" ,"puts $datei \"trafooptions.assemblecomplexmatrix ${trafooptions.assemblecomplexmatrix}\"\n" ,"puts $datei \"trafooptions.meshcasing ${trafooptions.meshcasing}\"\n" ,"puts $datei \"trafooptions.meshcore ${trafooptions.meshcore}\"\n" ,"puts $datei \"trafooptions.meshclumps ${trafooptions.meshclumps}\"\n" ,"puts $datei \"trafooptions.meshshields ${trafooptions.meshshields}\"\n" ,"puts $datei \"trafooptions.meshcoils ${trafooptions.meshcoils}\"\n" ,"puts $datei \"trafooptions.bcmdirectory ${trafooptions.bcmdirectory}\"\n" ,"puts $datei \"trafooptions.lossdensityfile ${trafooptions.lossdensityfile}\"\n" ,"}\n" ,"if { [info exists smalltrafomodell.tankheight] == 1 } {\n" ,"puts $datei \"smalltrafomodell.tankheight ${smalltrafomodell.tankheight}\"\n" ,"puts $datei \"smalltrafomodell.tankwidth ${smalltrafomodell.tankwidth}\"\n" ,"puts $datei \"smalltrafomodell.tanklength ${smalltrafomodell.tanklength}\"\n" ,"puts $datei \"smalltrafomodell.corewidth ${smalltrafomodell.corewidth}\"\n" ,"puts $datei \"smalltrafomodell.windowheight ${smalltrafomodell.windowheight}\"\n" ,"puts $datei \"smalltrafomodell.limbdistance ${smalltrafomodell.limbdistance}\"\n" ,"puts $datei \"smalltrafomodell.xposcore ${smalltrafomodell.xposcore}\"\n" ,"puts $datei \"smalltrafomodell.yposcore ${smalltrafomodell.yposcore}\"\n" ,"puts $datei \"smalltrafomodell.zposcore ${smalltrafomodell.zposcore}\"\n" ,"puts $datei \"smalltrafomodell.leakagefluxguidethickness ${smalltrafomodell.leakagefluxguidethickness}\"\n" ,"puts $datei \"smalltrafomodell.leakagefluxguidewidth ${smalltrafomodell.leakagefluxguidewidth}\"\n" ,"puts $datei \"smalltrafomodell.leakagefluxguidezposition ${smalltrafomodell.leakagefluxguidezposition}\"\n" ,"puts $datei \"smalltrafomodell.limbcoil.1 ${smalltrafomodell.limbcoil.1}\"\n" ,"puts $datei \"smalltrafomodell.ricoil.1 ${smalltrafomodell.ricoil.1}\"\n" ,"puts $datei \"smalltrafomodell.rocoil.1 ${smalltrafomodell.rocoil.1}\"\n" ,"puts $datei \"smalltrafomodell.zposcoil.1 ${smalltrafomodell.zposcoil.1}\"\n" ,"puts $datei \"smalltrafomodell.heightcoil.1 ${smalltrafomodell.heightcoil.1}\"\n" ,"puts $datei \"smalltrafomodell.currentcoil.1 ${smalltrafomodell.currentcoil.1}\"\n" ,"puts $datei \"smalltrafomodell.nturnscoil.1 ${smalltrafomodell.nturnscoil.1}\"\n" ,"puts $datei \"smalltrafomodell.limbcoil.2 ${smalltrafomodell.limbcoil.2}\"\n" ,"puts $datei \"smalltrafomodell.ricoil.2 ${smalltrafomodell.ricoil.2}\"\n" ,"puts $datei \"smalltrafomodell.rocoil.2 ${smalltrafomodell.rocoil.2}\"\n" ,"puts $datei \"smalltrafomodell.zposcoil.2 ${smalltrafomodell.zposcoil.2}\"\n" ,"puts $datei \"smalltrafomodell.heightcoil.2 ${smalltrafomodell.heightcoil.2}\"\n" ,"puts $datei \"smalltrafomodell.currentcoil.2 ${smalltrafomodell.currentcoil.2}\"\n" ,"puts $datei \"smalltrafomodell.nturnscoil.2 ${smalltrafomodell.nturnscoil.2}\"\n" ,"puts $datei \"smalltrafomodell.limbcoil.3 ${smalltrafomodell.limbcoil.3}\"\n" ,"puts $datei \"smalltrafomodell.ricoil.3 ${smalltrafomodell.ricoil.3}\"\n" ,"puts $datei \"smalltrafomodell.rocoil.3 ${smalltrafomodell.rocoil.3}\"\n" ,"puts $datei \"smalltrafomodell.zposcoil.3 ${smalltrafomodell.zposcoil.3}\"\n" ,"puts $datei \"smalltrafomodell.heightcoil.3 ${smalltrafomodell.heightcoil.3}\"\n" ,"puts $datei \"smalltrafomodell.currentcoil.3 ${smalltrafomodell.currentcoil.3}\"\n" ,"puts $datei \"smalltrafomodell.nturnscoil.3 ${smalltrafomodell.nturnscoil.3}\"\n" ,"puts $datei \"smalltrafomodell.limbcoil.4 ${smalltrafomodell.limbcoil.4}\"\n" ,"puts $datei \"smalltrafomodell.ricoil.4 ${smalltrafomodell.ricoil.4}\"\n" ,"puts $datei \"smalltrafomodell.rocoil.4 ${smalltrafomodell.rocoil.4}\"\n" ,"puts $datei \"smalltrafomodell.zposcoil.4 ${smalltrafomodell.zposcoil.4}\"\n" ,"puts $datei \"smalltrafomodell.heightcoil.4 ${smalltrafomodell.heightcoil.4}\"\n" ,"puts $datei \"smalltrafomodell.currentcoil.4 ${smalltrafomodell.currentcoil.4}\"\n" ,"puts $datei \"smalltrafomodell.nturnscoil.4 ${smalltrafomodell.nturnscoil.4}\"\n" ,"puts $datei \"smalltrafomodell.limbcoil.5 ${smalltrafomodell.limbcoil.5}\"\n" ,"puts $datei \"smalltrafomodell.ricoil.5 ${smalltrafomodell.ricoil.5}\"\n" ,"puts $datei \"smalltrafomodell.rocoil.5 ${smalltrafomodell.rocoil.5}\"\n" ,"puts $datei \"smalltrafomodell.zposcoil.5 ${smalltrafomodell.zposcoil.5}\"\n" ,"puts $datei \"smalltrafomodell.heightcoil.5 ${smalltrafomodell.heightcoil.5}\"\n" ,"puts $datei \"smalltrafomodell.currentcoil.5 ${smalltrafomodell.currentcoil.5}\"\n" ,"puts $datei \"smalltrafomodell.nturnscoil.5 ${smalltrafomodell.nturnscoil.5}\"\n" ,"puts $datei \"smalltrafomodell.limbcoil.6 ${smalltrafomodell.limbcoil.6}\"\n" ,"puts $datei \"smalltrafomodell.ricoil.6 ${smalltrafomodell.ricoil.6}\"\n" ,"puts $datei \"smalltrafomodell.rocoil.6 ${smalltrafomodell.rocoil.6}\"\n" ,"puts $datei \"smalltrafomodell.zposcoil.6 ${smalltrafomodell.zposcoil.6}\"\n" ,"puts $datei \"smalltrafomodell.heightcoil.6 ${smalltrafomodell.heightcoil.6}\"\n" ,"puts $datei \"smalltrafomodell.currentcoil.6 ${smalltrafomodell.currentcoil.6}\"\n" ,"puts $datei \"smalltrafomodell.nturnscoil.6 ${smalltrafomodell.nturnscoil.6}\"\n" ,"puts $datei \"smalltrafomodell.limbtest.1 ${smalltrafomodell.limbtest.1}\"\n" ,"puts $datei \"smalltrafomodell.heighttest.1 ${smalltrafomodell.heighttest.1}\"\n" ,"puts $datei \"smalltrafomodell.widthtest.1 ${smalltrafomodell.widthtest.1}\"\n" ,"puts $datei \"smalltrafomodell.rtest.1 ${smalltrafomodell.rtest.1}\"\n" ,"puts $datei \"smalltrafomodell.zpostest.1 ${smalltrafomodell.zpostest.1}\"\n" ,"puts $datei \"smalltrafomodell.edgeradiustest.1 ${smalltrafomodell.edgeradiustest.1}\"\n" ,"puts $datei \"smalltrafomodell.finetest.1 ${smalltrafomodell.finetest.1}\"\n" ,"puts $datei \"smalltrafomodell.conductivetest.1 ${smalltrafomodell.conductivetest.1}\"\n" ,"puts $datei \"smalltrafomodell.limbtest.2 ${smalltrafomodell.limbtest.2}\"\n" ,"puts $datei \"smalltrafomodell.heighttest.2 ${smalltrafomodell.heighttest.2}\"\n" ,"puts $datei \"smalltrafomodell.widthtest.2 ${smalltrafomodell.widthtest.2}\"\n" ,"puts $datei \"smalltrafomodell.rtest.2 ${smalltrafomodell.rtest.2}\"\n" ,"puts $datei \"smalltrafomodell.zpostest.2 ${smalltrafomodell.zpostest.2}\"\n" ,"puts $datei \"smalltrafomodell.edgeradiustest.2 ${smalltrafomodell.edgeradiustest.2}\"\n" ,"puts $datei \"smalltrafomodell.finetest.2 ${smalltrafomodell.finetest.2}\"\n" ,"puts $datei \"smalltrafomodell.conductivetest.2 ${smalltrafomodell.conductivetest.2}\"\n" ,"puts $datei \"smalltrafomodell.limbtest.3 ${smalltrafomodell.limbtest.3}\"\n" ,"puts $datei \"smalltrafomodell.heighttest.3 ${smalltrafomodell.heighttest.3}\"\n" ,"puts $datei \"smalltrafomodell.widthtest.3 ${smalltrafomodell.widthtest.3}\"\n" ,"puts $datei \"smalltrafomodell.rtest.3 ${smalltrafomodell.rtest.3}\"\n" ,"puts $datei \"smalltrafomodell.zpostest.3 ${smalltrafomodell.zpostest.3}\"\n" ,"puts $datei \"smalltrafomodell.edgeradiustest.3 ${smalltrafomodell.edgeradiustest.3}\"\n" ,"puts $datei \"smalltrafomodell.finetest.3 ${smalltrafomodell.finetest.3}\"\n" ,"puts $datei \"smalltrafomodell.conductivetest.3 ${smalltrafomodell.conductivetest.3}\"\n" ,"puts $datei \"smalltrafomodell.limbtest.4 ${smalltrafomodell.limbtest.4}\"\n" ,"puts $datei \"smalltrafomodell.heighttest.4 ${smalltrafomodell.heighttest.4}\"\n" ,"puts $datei \"smalltrafomodell.widthtest.4 ${smalltrafomodell.widthtest.4}\"\n" ,"puts $datei \"smalltrafomodell.rtest.4 ${smalltrafomodell.rtest.4}\"\n" ,"puts $datei \"smalltrafomodell.zpostest.4 ${smalltrafomodell.zpostest.4}\"\n" ,"puts $datei \"smalltrafomodell.edgeradiustest.4 ${smalltrafomodell.edgeradiustest.4}\"\n" ,"puts $datei \"smalltrafomodell.finetest.4 ${smalltrafomodell.finetest.4}\"\n" ,"puts $datei \"smalltrafomodell.conductivetest.4 ${smalltrafomodell.conductivetest.4}\"\n" ,"puts $datei \"smalltrafomodell.nperitest ${smalltrafomodell.nperitest}\"\n" ,"puts $datei \"smalltrafomodell.filename ${smalltrafomodell.filename}\"\n" ,"puts $datei \"smalltrafomodell.murlfguide ${smalltrafomodell.murlfguide}\"\n" ,"puts $datei \"smalltrafomodell.murtestwire ${smalltrafomodell.murtestwire}\"\n" ,"puts $datei \"smalltrafomodell.murcore ${smalltrafomodell.murcore}\"\n" ,"puts $datei \"smalltrafomodell.kappalfguide ${smalltrafomodell.kappalfguide}\"\n" ,"puts $datei \"smalltrafomodell.kappatestwire ${smalltrafomodell.kappatestwire}\"\n" ,"puts $datei \"smalltrafomodell.kappacore ${smalltrafomodell.kappacore}\"\n" ,"}\n" ,"close $datei\n" ,"}\n" ,"}\n" ,"}\n" ,"proc saveinifile { } {\n" ,"global inifilename\n" ,"if {[catch { set datei [open $inifilename w] } result ]} {\n" ,"puts \"cannot write file $inifilename\"\n" ,"} {\n" ,"for { set i [.ngmenu.file.recent index last] } { $i >= 0 } { incr i -1 } {\n" ,"puts $datei \"recentfile \\\"[.ngmenu.file.recent entrycget $i -label]\\\"\"\n" ,"}\n" ,"close $datei\n" ,"}\n" ,"}\n" ,"proc savemeshinifile { } {\n" ,"global meshinifilename\n" ,"if {[catch { set datei [open $meshinifilename w] } result ]} {\n" ,"puts \"cannot write file $meshinifilename\"\n" ,"} {\n" ,"for { set i [.ngmenu.file.recentmesh index last] } { $i >= 1 } { incr i -1 } {\n" ,"puts $datei \"recentfile \\\"[.ngmenu.file.recentmesh entrycget $i -label]\\\"\"\n" ,"}\n" ,"close $datei\n" ,"}\n" ,"}\n" ,"proc loadinifile { } {\n" ,"global inifilename\n" ,"if { [file exists $inifilename] == 1 } {\n" ,"set datei [open $inifilename r]\n" ,"while { [gets $datei line] >= 0 } {\n" ,"if {[lindex $line 0] == \"recentfile\"} {\n" ,"set filename [lindex $line 1]\n" ,"if { [file exists $filename] == 1 } {\n" ,"AddRecentFile $filename\n" ,"}\n" ,"}\n" ,"}\n" ,"close $datei\n" ,"}\n" ,"}\n" ,"proc loadmeshinifile { } {\n" ,"global meshinifilename\n" ,"if { [file exists $meshinifilename] == 1 } {\n" ,"set datei [open $meshinifilename r]\n" ,"while { [gets $datei line] >= 0 } {\n" ,"if {[lindex $line 0] == \"recentfile\"} {\n" ,"set filename [lindex $line 1]\n" ,"if { [file exists $filename] == 1 } {\n" ,"AddRecentMeshFile $filename\n" ,"}\n" ,"}\n" ,"}\n" ,"close $datei\n" ,"}\n" ,"}\n" ,"set cmdindex {}\n" ,"set hlpindex {}\n" ,"set secindex {}\n" ,"proc setgranularity { gran } {\n" ,"if {$gran == 6} { return }\n" ,"set gran [expr $gran - 1]\n" ,"global options.curvaturesafety\n" ,"set surfcurvlist { 1 1.5 2 3 5 }\n" ,"set options.curvaturesafety [lindex $surfcurvlist $gran]\n" ,"global options.segmentsperedge\n" ,"set spelist { 0.3 0.5 1 2 3 }\n" ,"set options.segmentsperedge [lindex $spelist $gran]\n" ,"global stloptions.resthsurfcurvfac\n" ,"set surfcurvfaclist { 0.25 0.5 1 1.5 3 }\n" ,"set stloptions.resthsurfcurvfac [lindex $surfcurvfaclist $gran]\n" ,"global stloptions.resthchartdistfac\n" ,"set chartdistfaclist { 0.8 1 1.5 2 5 }\n" ,"set stloptions.resthchartdistfac [lindex $chartdistfaclist $gran]\n" ,"global stloptions.resthlinelengthfac\n" ,"set linelengthfaclist { 0.2 0.35 0.5 1.5 3 }\n" ,"set stloptions.resthlinelengthfac [lindex $linelengthfaclist $gran]\n" ,"global stloptions.resthcloseedgefac\n" ,"set closeedgefaclist { 0.5 1 2 3.5 5 }\n" ,"set stloptions.resthcloseedgefac [lindex $closeedgefaclist $gran]\n" ,"global stloptions.resthminedgelen\n" ,"set minedgelenlist { 0.002 0.02 0.2 1.0 2.0 5.0 10.0 }\n" ,"set stloptions.resthminedgelen [lindex $minedgelenlist $gran]\n" ,"global stloptions.resthedgeanglefac\n" ,"set edgeanglefaclist { 0.25 0.5 1 1.5 3 }\n" ,"set stloptions.resthedgeanglefac [lindex $edgeanglefaclist $gran]\n" ,"global stloptions.resthsurfmeshcurvfac\n" ,"set surfmeshcurvlist { 1 1.5 2 3 5 }\n" ,"set stloptions.resthsurfmeshcurvfac [lindex $surfmeshcurvlist $gran]\n" ,"global options.grading\n" ,"set gradinglist { 0.7 0.5 0.3 0.2 0.1 }\n" ,"set options.grading [lindex $gradinglist $gran]\n" ,"}\n" ,"if { $batchmode != \"defined\" } {\n" ,"catch {\n" ,"if { $tcl_platform(os) eq \"Linux\" && [tk scaling] > 1.5 } {\n" ,"font create ngFont -family Helvetica\n" ,"option add *font ngFont\n" ,"ttk::style configure \".\" -font ngFont\n" ,"}\n" ,"menu .ngmenu -tearoff 0 -relief raised -bd 2\n" ,". configure -menu .ngmenu\n" ,".ngmenu add cascade -label \"File\" -menu .ngmenu.file -underline 0\n" ,".ngmenu add cascade -label \"Geometry\" -menu .ngmenu.geometry -underline 0\n" ,".ngmenu add cascade -label \"Mesh\" -menu .ngmenu.mesh -underline 0\n" ,".ngmenu add cascade -label \"View\" -menu .ngmenu.view -underline 0\n" ,".ngmenu add cascade -label \"Refinement\" -menu .ngmenu.meshsize -underline 5\n" ,"if { $userlevel == 3} {\n" ,".ngmenu add cascade -label \"Special\" -menu .ngmenu.special -underline 3\n" ,"}\n" ,".ngmenu add cascade -label \"Help\" -menu .ngmenu.help -underline 0\n" ,"menu .ngmenu.file\n" ,".ngmenu.file add command -label \"Load Geometry...\" -accelerator \"\" \\\n" ,"-command {\n" ,"set types {\n" ,"{\"All Geometry types\" { .stl .stlb .step .stp .geo .in2d .igs .iges .brep .sat} }\n" ,"{\"IGES Geometry\" {.igs .iges} }\n" ,"{\"BREP OpenCascade Geometry\" {.brep} }\n" ,"{\"STL Geometry\" {.stl} }\n" ,"{\"Binary STL Geometry\" {.stlb} }\n" ,"{\"STEP Geometry\" {.step .stp} }\n" ,"{\"Geometry file\" {.geo} }\n" ,"{\"2D Geometry\" {.in2d } }\n" ,"}\n" ,"set ACISavailable [Ng_ACISCommand isACISavailable]\n" ,"if {$ACISavailable == \"yes\" } {\n" ,"lappend types {\"ACIS Geometry\" {.sat} }\n" ,"}\n" ,"if {[catch {\n" ,"set file [tk_getOpenFile -filetypes $types -initialdir $dirname -typevariable loadgeomtypevar]\n" ,"}]} {\n" ,"set file [tk_getOpenFile -filetypes $types -initialdir $dirname]\n" ,"}\n" ,"if {$file != \"\"} {\n" ,"AddRecentFile $file\n" ,"Ng_LoadGeometry $file\n" ,"Ng_ParseGeometry\n" ,"set selectvisual geometry\n" ,"Ng_SetVisParameters\n" ,"redraw\n" ,"wm title . [concat \"$progname - \" $file]\n" ,"set dirname [file dirname $file]\n" ,"set basefilename [file tail [file rootname $file]]\n" ,"if { $hasocc == \"yes\" } {\n" ,"rebuildoccdialog\n" ,"}\n" ,"}\n" ,"}\n" ,".ngmenu.file add command -label \"Save Geometry...\" \\\n" ,"-command {\n" ,"set occgeometryloaded [Ng_OCCCommand isoccgeometryloaded]\n" ,"puts $occgeometryloaded\n" ,"if {$occgeometryloaded == 1 } {\n" ,"set types {\n" ,"{\"IGES Geometry file\" {.igs} }\n" ,"{\"STEP Geometry file\" {.stp} }\n" ,"{\"STL Geometry file\" {.stl} }\n" ,"{\"STL BIN Geometry file\" {.stlb} }\n" ,"}\n" ,"} {\n" ,"set types {\n" ,"{\"STL Geometry file\" {.stl} }\n" ,"{\"STL BIN Geometry file\" {.stlb} }\n" ,"}\n" ,"}\n" ,"set ACISavailable [Ng_ACISCommand isACISavailable]\n" ,"puts $ACISavailable\n" ,"if {$ACISavailable == \"yes\" } {\n" ,"lappend types {\"ACIS Geometry\" {.sat} }\n" ,"}\n" ,"set file [tk_getSaveFile -filetypes $types -initialdir $dirname -initialfile $basefilename ]\n" ,"if {$file != \"\"} {\n" ,"Ng_SaveGeometry $file\n" ,"}\n" ,"}\n" ,".ngmenu.file add cascade -label \"Recent Files\" -menu .ngmenu.file.recent\n" ,"menu .ngmenu.file.recent -tearoff 0\n" ,"proc AddRecentFile { filename } {\n" ,"global progname\n" ,"global dirname\n" ,"catch { [.ngmenu.file.recent delete $filename] }\n" ,".ngmenu.file.recent insert 0 command -label $filename \\\n" ,"-command \"AddRecentFile {$filename};\n" ,"Ng_LoadGeometry {$filename};\n" ,"Ng_ParseGeometry;\n" ,"set selectvisual geometry;\n" ,"Ng_SetVisParameters;\n" ,"redraw;\n" ,"wm title . [concat \\\" $progname - $filename \\\"];\n" ,"set dirname {[file dirname $filename]};\n" ,"set basefilename {[file tail [file rootname $filename]]};\n" ,"rebuildoccdialog;\"\n" ,"if { [.ngmenu.file.recent index last] >= 6 } {\n" ,".ngmenu.file.recent delete last }\n" ,"saveinifile;\n" ,"}\n" ,"loadinifile;\n" ,".ngmenu.file add separator\n" ,".ngmenu.file add command -label \"Load Mesh...\" -accelerator \"\" \\\n" ,"-command {\n" ,"set types {\n" ,"{\"Mesh file\" {.vol .vol.gz} } }\n" ,"set file [tk_getOpenFile -filetypes $types -defaultextension \".vol\"]\n" ,"if {$file != \"\"} {\n" ,"AddRecentMeshFile $file;\n" ,"Ng_LoadMesh $file;\n" ,"set selectvisual mesh\n" ,"Ng_SetVisParameters\n" ,"redraw\n" ,"Ng_ReadStatus;\n" ,"wm title . [concat \"$progname - \" $file]\n" ,"set dirname [file dirname $file]\n" ,"set basefilename [file tail [file rootname $file]]\n" ,"}\n" ,"}\n" ,".ngmenu.file add cascade -label \"Recent Meshes\" -menu .ngmenu.file.recentmesh\n" ,"menu .ngmenu.file.recentmesh\n" ,"proc AddRecentMeshFile { filename } {\n" ,"global progname\n" ,"global dirname\n" ,"catch { [.ngmenu.file.recentmesh delete $filename] }\n" ,".ngmenu.file.recentmesh insert 0 command -label $filename \\\n" ,"-command \"AddRecentMeshFile {$filename};\n" ,"Ng_LoadMesh {$filename};\n" ,"set selectvisual mesh;\n" ,"Ng_SetVisParameters;\n" ,"redraw;\n" ,"wm title . [concat \\\" $progname - $filename \\\"];\n" ,"set dirname {[file dirname $filename]};\n" ,"set basefilename {[file tail [file rootname $filename]]};\n" ,"rebuildoccdialog;\"\n" ,"if { [.ngmenu.file.recentmesh index last] >= 6 } {\n" ,".ngmenu.file.recentmesh delete last }\n" ,"savemeshinifile;\n" ,"}\n" ,"loadmeshinifile;\n" ,".ngmenu.file add command -label \"Save Mesh...\" -accelerator \"\" \\\n" ,"-command {\n" ,"set types {\n" ,"{\"Mesh file\" {.vol .vol.gz} } }\n" ,"set file [tk_getSaveFile -filetypes $types -defaultextension \".vol.gz\" -initialfile $basefilename -initialdir $dirname ]\n" ,"if {$file != \"\"} {\n" ,"Ng_SaveMesh $file }\n" ,"AddRecentMeshFile $file;\n" ,"}\n" ,".ngmenu.file add command -label \"Merge Mesh...\" \\\n" ,"-command {\n" ,"set types {\n" ,"{\"Mesh file\" {.vol} } }\n" ,"set file [tk_getOpenFile -filetypes $types -defaultextension \".vol\"]\n" ,"if {$file != \"\"} {\n" ,"Ng_MergeMesh $file;\n" ,"set selectvisual mesh\n" ,"Ng_SetVisParameters\n" ,"redraw\n" ,"Ng_ReadStatus;\n" ,"}\n" ,"}\n" ,".ngmenu.file add command -label \"Import Mesh...\" \\\n" ,"-command {\n" ,"set types {\n" ,"{\"Neutral format\" {.mesh .emt} }\n" ,"{\"Surface mesh format\" {.surf} }\n" ,"{\"Universal format\" {.unv} }\n" ,"{\"Olaf format\" {.emt} }\n" ,"{\"TET format\" {.tet} }\n" ,"{\"Pro/ENGINEER neutral format\" {.fnf} }\n" ,"}\n" ,"set file [tk_getOpenFile -filetypes $types ]\n" ,"if {$file != \"\"} {\n" ,"Ng_ImportMesh $file\n" ,"set selectvisual mesh\n" ,"Ng_SetVisParameters\n" ,"redraw\n" ,"Ng_ReadStatus;\n" ,"}\n" ,"}\n" ,".ngmenu.file add command -label \"Export Mesh...\" \\\n" ,"-command {\n" ,"foreach exportformat $meshexportformats {\n" ,"if { [lindex $exportformat 0] == $exportfiletype } {\n" ,"set extension [lindex $exportformat 1]\n" ,"}\n" ,"}\n" ,"if { $exportfiletype == \"Elmer Format\"} {\n" ,"set file [file nativename [tk_chooseDirectory -title \"Elmer Mesh Export - Select Directory\"]]\n" ,"} elseif { $exportfiletype == \"OpenFOAM 1.5+ Format\"} {\n" ,"set file [file nativename [tk_chooseDirectory -title \"OpenFOAM 1.5+ Mesh Export - Select Case Directory\"]]\n" ,"} elseif { $exportfiletype == \"OpenFOAM 1.5+ Compressed\"} {\n" ,"set file [file nativename [tk_chooseDirectory -title \"OpenFOAM 1.5+ Mesh Export - Select Case Directory\"]]\n" ,"} else {\n" ,"set file [tk_getSaveFile -filetypes \"{ \\\"$exportfiletype\\\" {*}}\" ]\n" ,"}\n" ,"if {$file != \"\"} {\n" ,"Ng_ExportMesh $file $exportfiletype\n" ,"}\n" ,"}\n" ,".ngmenu.file add cascade -label \"Export Filetype\" -menu .ngmenu.file.filetype\n" ,"menu .ngmenu.file.filetype\n" ,".ngmenu.file add separator\n" ,".ngmenu.file add command -label \"Save Solution...\" \\\n" ,"-command {\n" ,"set types {\n" ,"{\"Solution File\" {.sol} }\n" ,"{\"VTK File\" {.vtk} }\n" ,"}\n" ,"set file [tk_getSaveFile -filetypes $types ]\n" ,"if {$file != \"\"} {\n" ,"Ng_SaveSolution $file\n" ,"}\n" ,"}\n" ,".ngmenu.file add command -label \"Import Solution...\" \\\n" ,"-command {\n" ,"set types { {\"Solution File\" {.sol} } }\n" ,"set file [tk_getOpenFile -filetypes $types -defaultextension \".sol\" ]\n" ,"if {$file != \"\"} {\n" ,"Ng_ImportSolution $file\n" ,"set selectvisual solution\n" ,"Ng_SetVisParameters\n" ,"redraw\n" ,"}\n" ,"}\n" ,"set demostarttime [clock clicks -millisecond]\n" ,"set stopdemo 0\n" ,"proc demoredraw { } {\n" ,"global demostarttime\n" ,"global stopdemo\n" ,"set curtime [clock clicks -millisecond]\n" ,"set result [ Ng_DemoSetTime [expr $curtime - $demostarttime] ]\n" ,"redraw\n" ,"global videoactive\n" ,"if { $videoactive == 1 } {\n" ,"puts \"addframe\"\n" ,"Ng_VideoClip .ndraw addframe\n" ,"}\n" ,"if { $result == 0 && $stopdemo == 0 } {\n" ,"after 1 { demoredraw }\n" ,"}\n" ,"}\n" ,".ngmenu.file add command -label \"Show Demo...\" \\\n" ,"-command {\n" ,"set types { {\"Demo File\" {.dem} } }\n" ,"set file [tk_getOpenFile -filetypes $types -defaultextension \".dem\" ]\n" ,"if {$file != \"\"} {\n" ,"Ng_ShowDemo $file\n" ,"set demostarttime [clock clicks -millisecond]\n" ,"set stopdemo 0\n" ,"demoredraw\n" ,"}\n" ,"}\n" ,".ngmenu.file add separator\n" ,".ngmenu.file add command -label \"Snapshot...\" \\\n" ,"-command {\n" ,"set types {\n" ,"{\"JPG file\" {.jpg} }\n" ,"{\"GIF file\" {.gif} }\n" ,"{\"PPM file\" {.ppm} }\n" ,"}\n" ,"set file [tk_getSaveFile -filetypes $types]\n" ,"if {$file != \"\"} {\n" ,"Ng_SnapShot .ndraw $file }\n" ,"}\n" ,".ngmenu.file add cascade -label \"Video clip\" -menu .ngmenu.file.video\n" ,"menu .ngmenu.file.video\n" ,"set videoactive 0\n" ,".ngmenu.file.video add command -label \"start...\" \\\n" ,"-command {\n" ,"set types {\n" ,"{\"MPG file\" {.mpg} }\n" ,"}\n" ,"set file [tk_getSaveFile -filetypes $types]\n" ,"if {$file != \"\"} {\n" ,"Ng_VideoClip .ndraw init $file\n" ,"global videoactive\n" ,"set videoactive 1\n" ,"}\n" ,"}\n" ,".ngmenu.file.video add command -label \"add frame...\" \\\n" ,"-command {Ng_VideoClip .ndraw addframe }\n" ,".ngmenu.file.video add command -label \"one cycle\" \\\n" ,"-command {\n" ,"set visoptions.redrawperiodic 1\n" ,"for { set j 0 } { $j < 100 } { incr j } {\n" ,"puts \"j = $j\"\n" ,"Ng_Vis_Set time [expr (1000 * $j / 100)]\n" ,"redraw\n" ,"Ng_VideoClip .ndraw addframe\n" ,"after 200\n" ,"}\n" ,"}\n" ,".ngmenu.file.video add command -label \"finalize...\" \\\n" ,"-command {\n" ,"Ng_VideoClip .ndraw finalize\n" ,"global videoactive\n" ,"set videoactive 0\n" ,"}\n" ,".ngmenu.file add command -label \"Save Options\" \\\n" ,"-command { saveoptions }\n" ,".ngmenu.file add separator\n" ,".ngmenu.file add command -label \"Quit\" -accelerator \"\" \\\n" ,"-command {\n" ,"puts \"Thank you for using $progname\";\n" ,"if { [catch { unload libngsolve[info sharedlibextension] ngsolve } result ] } {\n" ,"}\n" ,"after cancel { timer2 }\n" ,"Ng_Exit;\n" ,"destroy .\n" ,"}\n" ,"menu .ngmenu.mesh\n" ,".ngmenu.mesh add command -label \"Generate Mesh\" -accelerator \"\" \\\n" ,"-command {\n" ,"set selectvisual mesh\n" ,"Ng_SetVisParameters\n" ,"Ng_GenerateMesh ${meshoptions.firststep} ${meshoptions.laststep}\n" ,"Ng_ReadStatus\n" ,"redraw\n" ,"}\n" ,".ngmenu.mesh add command -label \"Stop Meshing\" \\\n" ,"-command { Ng_StopMeshing }\n" ,".ngmenu.mesh add command -label \"Meshing Options...\" \\\n" ,"-command meshingoptionsdialog\n" ,".ngmenu.mesh add separator\n" ,".ngmenu.mesh add command -label \"Delete Mesh\" \\\n" ,"-command { Ng_New mesh; Ng_ReadStatus; redraw }\n" ,".ngmenu.mesh add command -label \"Delete Vol Mesh\" \\\n" ,"-command { Ng_DeleteVolMesh; Ng_ReadStatus; redraw }\n" ,".ngmenu.mesh add command -label \"Mesh Info\" \\\n" ,"-command {\n" ,"set dim [Ng_MeshInfo dim]\n" ,"set np [Ng_MeshInfo np]\n" ,"set ne [Ng_MeshInfo ne]\n" ,"set nse [Ng_MeshInfo nse]\n" ,"set nseg [Ng_MeshInfo nseg]\n" ,"set bbox [Ng_MeshInfo bbox]\n" ,"tk_messageBox -message \"Dimension: $dim\\nPoints: $np\\nElements: $ne\\nSurface Els: $nse\\nSegments: $nseg\\nxmin [lindex $bbox 0] xmax [lindex $bbox 1]\\nymin [lindex $bbox 2] ymax [lindex $bbox 3]\\nzmin [lindex $bbox 4] zmax [lindex $bbox 5]\"\n" ,"}\n" ,".ngmenu.mesh add command -label \"Mesh Quality\" \\\n" ,"-command {\n" ,"set inplanemin 0\n" ,"set inplanemax 0\n" ,"set betplanemin 0\n" ,"set betplanemax 0\n" ,"Ng_MeshQuality inplanemin inplanemax betplanemin betplanemax\n" ,"puts \"Triangle angles : $inplanemin - $inplanemax\"\n" ,"puts \"Tet angles : $betplanemin - $betplanemax\"\n" ,"tk_messageBox -message \"Triangle angles : $inplanemin - $inplanemax \\n Tet angles : $betplanemin - $betplanemax\"\n" ,"}\n" ,".ngmenu.mesh add command -label \"Check Surface Mesh\" \\\n" ,"-command { Ng_CheckSurfaceMesh }\n" ,".ngmenu.mesh add command -label \"Check Volume Mesh\" \\\n" ,"-command { Ng_CheckVolumeMesh }\n" ,".ngmenu.mesh add command -label \"Edit Boundary Conditions...\" \\\n" ,"-command { bcpropdialog }\n" ,"if { $userlevel == 3 } {\n" ,".ngmenu.mesh add command -label \"Mesh Doctor...\" \\\n" ,"-command { meshdoctordialog }\n" ,"}\n" ,".ngmenu.mesh add command -label \"METIS Mesh Partitioning...\" \\\n" ,"-command { METISdialog }\n" ,".ngmenu.mesh add separator\n" ,".ngmenu.mesh add command -label \"Analyze Geometry\" \\\n" ,"-command { Ng_GenerateMesh ag ag; Ng_ReadStatus; redraw }\n" ,".ngmenu.mesh add command -label \"Mesh Edges\" \\\n" ,"-command { Ng_GenerateMesh me me; Ng_ReadStatus; redraw }\n" ,".ngmenu.mesh add command -label \"Mesh Surface\" \\\n" ,"-command { set selectvisual mesh; Ng_SetVisParameters; \\\n" ,"Ng_GenerateMesh ms ms; Ng_ReadStatus; redraw }\n" ,".ngmenu.mesh add command -label \"Optimize Surface\" \\\n" ,"-command { Ng_GenerateMesh os os cmsmSm; redraw }\n" ,".ngmenu.mesh add cascade -label \"Surface Optim. Step\" -menu .ngmenu.mesh.surfoptstep\n" ,"menu .ngmenu.mesh.surfoptstep\n" ,".ngmenu.mesh.surfoptstep add command -label \"Mesh Smoothing\" \\\n" ,"-command { Ng_GenerateMesh os os m; redraw}\n" ,".ngmenu.mesh.surfoptstep add command -label \"Edge swapping (topologic)\" \\\n" ,"-command { Ng_GenerateMesh os os s; redraw}\n" ,".ngmenu.mesh.surfoptstep add command -label \"Edge swapping (metric)\" \\\n" ,"-command { Ng_GenerateMesh os os S; redraw}\n" ,".ngmenu.mesh.surfoptstep add command -label \"Combine points\" \\\n" ,"-command { Ng_GenerateMesh os os c; redraw}\n" ,".ngmenu.mesh add separator\n" ,".ngmenu.mesh add command -label \"Mesh Volume\" \\\n" ,"-command { Ng_GenerateMesh mv mv; Ng_ReadStatus }\n" ,".ngmenu.mesh add command -label \"Optimize Volume\" \\\n" ,"-command { Ng_GenerateMesh ov ov; Ng_ReadStatus }\n" ,".ngmenu.mesh add command -label \"Smooth Opt Volume\" \\\n" ,"-command { Ng_GenerateMesh ov ov m; Ng_ReadStatus }\n" ,".ngmenu.mesh add command -label \"Smooth Opt Volume Jacobian\" \\\n" ,"-command { Ng_GenerateMesh ov ov j; Ng_ReadStatus }\n" ,"menu .ngmenu.geometry\n" ,"menu .ngmenu.view\n" ,".ngmenu.view add command -label \"Zoom all\" \\\n" ,"-command { Ng_ZoomAll; redraw }\n" ,".ngmenu.view add command -label \"Center\" \\\n" ,"-command { Ng_Center; redraw }\n" ,".ngmenu.view add command -label \"x-y plane\" \\\n" ,"-command { Ng_StandardRotation xy; redraw }\n" ,".ngmenu.view add command -label \"y-x plane\" \\\n" ,"-command { Ng_StandardRotation yx; redraw }\n" ,".ngmenu.view add command -label \"x-z plane\" \\\n" ,"-command { Ng_StandardRotation xz; redraw }\n" ,".ngmenu.view add command -label \"z-x plane\" \\\n" ,"-command { Ng_StandardRotation zx; redraw }\n" ,".ngmenu.view add command -label \"y-z plane\" \\\n" ,"-command { Ng_StandardRotation yz; redraw }\n" ,".ngmenu.view add command -label \"z-y plane\" \\\n" ,"-command { Ng_StandardRotation zy; redraw }\n" ,".ngmenu.view add command -label \"Viewing Options...\" \\\n" ,"-command { viewingoptionsdialog; redraw }\n" ,".ngmenu.view add command -label \"Clipping Plane...\" \\\n" ,"-command { clippingdialog; redraw }\n" ,".ngmenu.view add command -label \"Solution Data...\" \\\n" ,"-command { visual_dialog; redraw }\n" ,".ngmenu.view add checkbutton -variable viewqualityplot \\\n" ,"-label \"Quality Plot\" \\\n" ,"-command { qualityviewdialog $viewqualityplot }\n" ,".ngmenu.view add checkbutton -variable memuseplot \\\n" ,"-label \"Memory Usage\" \\\n" ,"-command { memusedialog $memuseplot }\n" ,"menu .ngmenu.meshsize\n" ,".ngmenu.meshsize add command -label \"Refine uniform\" \\\n" ,"-command { Ng_Refine; Ng_HighOrder ${options.elementorder}; Ng_ReadStatus; redraw }\n" ,".ngmenu.meshsize add command -label \"Second Order\" \\\n" ,"-command { Ng_SecondOrder; Ng_ReadStatus; redraw }\n" ,".ngmenu.meshsize add command -label \"Validate Second Order\" \\\n" ,"-command { Ng_ValidateSecondOrder; Ng_ReadStatus; redraw }\n" ,".ngmenu.meshsize add command -label \"High Order\" \\\n" ,"-command { Ng_HighOrder ${options.elementorder}; Ng_ReadStatus; redraw }\n" ,".ngmenu.meshsize add separator\n" ,".ngmenu.meshsize add command -label \"Refinement Dialog...\" \\\n" ,"-command { refinementdialog }\n" ,".ngmenu.meshsize add command -label \"Load Meshsize...\" \\\n" ,"-command {\n" ,"set types {\n" ,"{\"Meshsize file\" {.msz} } }\n" ,"set file [tk_getOpenFile -filetypes $types]\n" ,"if {$file != \"\"} {\n" ,"Ng_LoadMeshSize $file;\n" ,"}\n" ,"}\n" ,".ngmenu.meshsize add command -label \"MS from Surf Mesh\" \\\n" ,"-command { Ng_MeshSizeFromSurfaceMesh }\n" ,"if { $userlevel == 3 } {\n" ,".ngmenu.meshsize add command -label \"Singular point ms\" \\\n" ,"-command { Ng_SingularPointMS; }\n" ,".ngmenu.meshsize add command -label \"Singular edge ms\" \\\n" ,"-command { Ng_SingularEdgeMS; }\n" ,".ngmenu.meshsize add separator\n" ,"set bisectfilename \"\";\n" ,".ngmenu.meshsize add command -label \"Bisection\" \\\n" ,"-command { Ng_ReadStatus; set oldnp 0; set newnp $status_np;\n" ,"Ng_ReadStatus;\n" ,"while { $oldnp < $newnp } {\n" ,"set level [expr $level+1]\n" ,"if { $bisectfilename == \"\"} {\n" ,"Ng_Bisect;\n" ,"} else {\n" ,"Ng_Bisect $bisectfilename;\n" ,"}\n" ,"Ng_ReadStatus;\n" ,"redraw;\n" ,"if { $bisectfilename == \"\"} {\n" ,"set oldnp $newnp;\n" ,"set newnp $status_np;\n" ,"puts \"oldnp $oldnp newnp $newnp\";\n" ,"} else {\n" ,"set oldnp $newnp;\n" ,"}\n" ,"}\n" ,"}\n" ,"}\n" ,".ngmenu.meshsize add command -label \"Load Refinement Info...\" \\\n" ,"-command {\n" ,"set types {\n" ,"{\"Refinement info\" {.refine} }}\n" ,"set bisectfilename [tk_getOpenFile -filetypes $types]\n" ,"}\n" ,".ngmenu.meshsize add command -label \"Z-Refinement\" \\\n" ,"-command { Ng_ZRefinement 2; Ng_ReadStatus; redraw }\n" ,".ngmenu.meshsize add cascade -label \"hp-Refinement\" -menu .ngmenu.meshsize.hpref\n" ,"menu .ngmenu.meshsize.hpref\n" ,".ngmenu.meshsize.hpref add command -label \"1 Level\" \\\n" ,"-command { Ng_HPRefinement 1; Ng_ReadStatus; redraw }\n" ,".ngmenu.meshsize.hpref add command -label \"2 Levels\" \\\n" ,"-command { Ng_HPRefinement 2; Ng_ReadStatus; redraw }\n" ,".ngmenu.meshsize.hpref add command -label \"3 Levels\" \\\n" ,"-command { Ng_HPRefinement 3; Ng_ReadStatus; redraw }\n" ,".ngmenu.meshsize.hpref add command -label \"4 Levels\" \\\n" ,"-command { Ng_HPRefinement 4; Ng_ReadStatus; redraw }\n" ,".ngmenu.meshsize.hpref add command -label \"5 Levels\" \\\n" ,"-command { Ng_HPRefinement 5; Ng_ReadStatus; redraw }\n" ,".ngmenu.meshsize.hpref add command -label \"6 Levels\" \\\n" ,"-command { Ng_HPRefinement 6; Ng_ReadStatus; redraw }\n" ,".ngmenu.meshsize.hpref add command -label \"7 Levels\" \\\n" ,"-command { Ng_HPRefinement 7; Ng_ReadStatus; redraw }\n" ,".ngmenu.meshsize.hpref add command -label \"8 Levels\" \\\n" ,"-command { Ng_HPRefinement 8; Ng_ReadStatus; redraw }\n" ,".ngmenu.meshsize.hpref add command -label \"9 Levels\" \\\n" ,"-command { Ng_HPRefinement 9; Ng_ReadStatus; redraw }\n" ,".ngmenu.meshsize.hpref add command -label \"10 Levels\" \\\n" ,"-command { Ng_HPRefinement 10; Ng_ReadStatus; redraw }\n" ,".ngmenu.meshsize add command -label \"Split to Tets\" \\\n" ,"-command { Ng_Split2Tets; Ng_ReadStatus; redraw }\n" ,"menu .ngmenu.special\n" ,".ngmenu.special add command -label \"Prismatic Boundary Layer\" \\\n" ,"-command { Ng_GenerateBoundaryLayer; redraw }\n" ,".ngmenu.special add command -label \"Insert virtual boundary layer\" \\\n" ,"-command { Ng_InsertVirtualBL; redraw }\n" ,".ngmenu.special add command -label \"Cut off and combine with other\" \\\n" ,"-command {\n" ,"set types { {\"Mesh file\" {.vol} } }\n" ,"set file [tk_getOpenFile -filetypes $types]\n" ,"if {$file != \"\"} {\n" ,"Ng_CutOffAndCombine $file; }\n" ,"redraw\n" ,"}\n" ,".ngmenu.special add command -label \"Helmholtz Mesh grading\" \\\n" ,"-command { Ng_HelmholtzMesh; }\n" ,".ngmenu.special add cascade -label \"Colour-based boundary conditions\" -menu .ngmenu.special.colbndcond\n" ,"menu .ngmenu.special.colbndcond\n" ,".ngmenu.special.colbndcond add command -label \"Inspect Colours in mesh\" \\\n" ,"-command { currmeshcoloursdialog }\n" ,".ngmenu.special.colbndcond add separator\n" ,".ngmenu.special.colbndcond add command -label \"Automatic Assignment\" \\\n" ,"-command { Ng_AutoColourBcProps auto; redraw }\n" ,".ngmenu.special.colbndcond add separator\n" ,"set ocffile [file join ${ngdir} netgen.ocf];\n" ,".ngmenu.special.colbndcond add command -label \"Select Colour Profile file\" \\\n" ,"-command {\n" ,"set types { {\"Colour Profile file\" {.ocf} } }\n" ,"set ocffile [tk_getOpenFile -filetypes $types]\n" ,"if {$ocffile == \"\"} {\n" ,"set ocffile [file join ${ngdir} netgen.ocf]; }\n" ,"}\n" ,".ngmenu.special.colbndcond add command -label \"Profile based Assignment\" \\\n" ,"-command { Ng_AutoColourBcProps profile ${ocffile}; redraw }\n" ,"menu .ngmenu.help\n" ,".ngmenu.view add checkbutton -label \"Help Line\" -variable showhelpline \\\n" ,"-command {\n" ,"if { $showhelpline == 1} {\n" ,"pack .helpline -before .statbar -side bottom -fill x -padx 3p\n" ,"} {\n" ,"pack forget .helpline\n" ,"}\n" ,"}\n" ,".ngmenu.help add command -label \"About...\" \\\n" ,"-command {\n" ,"tk_messageBox -message \"This is NETGEN \\nmainly written by \\nJoachim Schoeberl \\nthanks to \\nRobert Gaisbauer, Johannes Gerstmayr, Philippose Rajan\"\n" ,"}\n" ,"ttk::frame .bubar\n" ,"pack .bubar -side top -fill x\n" ,"ttk::button .bubar.testb -text \"Test\" -command { Ng_SaveGeometry }\n" ,"ttk::button .bubar.surfm -text \"Generate Mesh\" -command \\\n" ,"{\n" ,".ngmenu.mesh invoke \"Generate Mesh\";\n" ,"}\n" ,"ttk::button .bubar.stopm -text \"Stop\" -command \\\n" ,"{\n" ,"set multithread_terminate 1;\n" ,"set stopdemo 1;\n" ,"}\n" ,"ttk::button .bubar.exitb -text \"Quit\" \\\n" ,"-command {\n" ,"set ans [tk_messageBox -title \"Quit Netgen?\" -message \"Do you really want to quit Netgen?\" -type yesno -default \"no\" -icon question]\n" ,"if { $ans == \"yes\" } {\n" ,".ngmenu.file invoke \"Quit\";\n" ,"}\n" ,"}\n" ,"pack .bubar.exitb .bubar.surfm .bubar.stopm -side left\n" ,"ttk::button .bubar.zoomall -text \"Zoom All\" \\\n" ,"-command { Ng_ZoomAll; redraw }\n" ,"ttk::button .bubar.center -text \"Center\" \\\n" ,"-command { Ng_Center; redraw }\n" ,"ttk::menubutton .bubar.modesel -menu .bubar.modesel.menu -text \"\" -width 6\n" ,"menu .bubar.modesel.menu -tearoff 0\n" ,".bubar.modesel.menu add command -label \"Rotate\" -command \"set drawmode \\\"rotate\\\" ;.bubar.modesel configure -text \\\"Rotate\\\"\"\n" ,".bubar.modesel.menu add command -label \"Move\" -command \"set drawmode \\\"move\\\" ;.bubar.modesel configure -text \\\"Move\\\"\"\n" ,".bubar.modesel.menu add command -label \"Zoom\" -command \"set drawmode \\\"zoom\\\" ;.bubar.modesel configure -text \\\"Zoom\\\"\"\n" ,".bubar.modesel.menu invoke \"Rotate\"\n" ,"set viewvals { geometry specpoints mesh solution}\n" ,"if { $userlevel == 3} {\n" ,"set viewvals { geometry mesh specpoints surfmeshing modelview solution}\n" ,"}\n" ,"set viewvallabs(cross) \"Cross\"\n" ,"set viewvallabs(geometry) \"Geometry\"\n" ,"set viewvallabs(mesh) \"Mesh\"\n" ,"set viewvallabs(specpoints) \"Edges\"\n" ,"set viewvallabs(surfmeshing) \"Mesh Gen\"\n" ,"set viewvallabs(modelview) \"Modeller\"\n" ,"set viewvallabs(solution) \"Solution\"\n" ,"pack .bubar.center .bubar.zoomall -side right\n" ,".ngmenu.view add checkbutton -variable viewrotatebutton \\\n" ,"-label \"Enable LeftButton Selection\" \\\n" ,"-command {\n" ,"if { $viewrotatebutton } {\n" ,"pack .bubar.modesel -side right\n" ,"} {\n" ,"pack forget .bubar.modesel\n" ,"}\n" ,"}\n" ,"menu .bubar.selviewmenu\n" ,"ttk::menubutton .bubar.selview1 -menu .bubar.selviewmenu -text \"Geometry\"\n" ,"foreach viewv $viewvals {\n" ,".bubar.selviewmenu add command -label $viewvallabs($viewv) -command \\\n" ,"\".bubar.selview1 configure -text \\\"$viewvallabs($viewv)\\\" ; set selectvisual $viewv ; Ng_SetVisParameters; redraw\"\n" ,"}\n" ,"pack .bubar.selview1 -side right\n" ,"trace add variable selectvisual write selvis_monitor\n" ,"proc selvis_monitor { name args } {\n" ,"global selectvisual viewvallabs\n" ,".bubar.selviewmenu invoke $viewvallabs($selectvisual)\n" ,"}\n" ,"ttk::label .helpline -text \"None\"\n" ,"pack forget .helpline -side bottom -fill x\n" ,"ttk::frame .statbar -relief flat\n" ,"pack .statbar -side bottom -fill x\n" ,"ttk::label .statbar.ptslabel -text \" Points: \"\n" ,"ttk::label .statbar.ptsval -textvariable status_np\n" ,"ttk::label .statbar.elslabel -text \" Elements: \"\n" ,"ttk::label .statbar.elsval -textvariable status_ne\n" ,"ttk::label .statbar.selslabel -text \" Surf Elements: \"\n" ,"ttk::label .statbar.selsval -textvariable status_nse\n" ,"ttk::label .statbar.task -textvariable status_task\n" ,"pack .statbar.ptslabel .statbar.ptsval -side left -ipady 3p\n" ,"pack .statbar.elslabel .statbar.elsval -side left -ipady 3p\n" ,"pack .statbar.selslabel .statbar.selsval -side left -ipady 3p\n" ,"ttk::progressbar .statbar.per -value 0 -maximum 1\n" ,"pack .statbar.per -side right\n" ,"pack .statbar.task -side right -ipady 4\n" ,"set qualbaraxis(0) 0\n" ,"set qualbar(0) 0\n" ,"set qualbarnull(0) 0\n" ,"proc timer2 { } {\n" ,"global status_np\n" ,"global status_ne\n" ,"global status_nse\n" ,"global multithread_running\n" ,"global multithread_redraw\n" ,"global status_working\n" ,"global status_task\n" ,"global status_percent\n" ,"global status_tetqualclasses\n" ,"Ng_ReadStatus\n" ,"if { $multithread_redraw == 1 } {\n" ,"set multithread_redraw 0;\n" ,"redraw;\n" ,"global videoactive\n" ,"if { $videoactive == 1 } {\n" ,"puts \"addframe\"\n" ,"Ng_VideoClip .ndraw addframe\n" ,"}\n" ,"}\n" ,"if { $multithread_redraw == 2 } {\n" ,"redraw;\n" ,"set multithread_redraw 0;\n" ,"global videoactive\n" ,"if { $videoactive == 1 } {\n" ,"puts \"addframe\"\n" ,"Ng_VideoClip .ndraw addframe\n" ,"}\n" ,"after 1 { timer2 }\n" ,"return\n" ,"}\n" ,".statbar.per configure -value [expr $status_percent/100]\n" ,"if { $multithread_running } {\n" ,"pack .statbar.per -side right -before .statbar.task -padx 6\n" ,"} {\n" ,"pack forget .statbar.per\n" ,"}\n" ,"if {[winfo exists .qualityview_dlg] == 1} {\n" ,"global qualbar\n" ,"global qualbarnull\n" ,"global qualbaraxis\n" ,"set maxval 0\n" ,"for {set i 0} {$i < 20} {incr i} {\n" ,"if {[lindex $status_tetqualclasses $i] > $maxval} {\n" ,"set maxval [lindex $status_tetqualclasses $i]\n" ,"}\n" ,"}\n" ,"set ubound 1\n" ,"while { $ubound < $maxval } {\n" ,"set ubound [expr {10 * $ubound}]\n" ,"}\n" ,"if { $ubound/5 > $maxval } {\n" ,"set ubound [expr $ubound/5]\n" ,"}\n" ,"if { $ubound/2 > $maxval } {\n" ,"set ubound [expr $ubound/2]\n" ,"}\n" ,"for {set i 1} {$i <= 5} {incr i} {\n" ,"set value [expr { $i * $ubound / 5 }]\n" ,".qualityview_dlg.c dchars $qualbaraxis($i) 0 end\n" ,".qualityview_dlg.c insert $qualbaraxis($i) end $value\n" ,"}\n" ,"for {set i 0} {$i < 20} {incr i} {\n" ,"set x1 [expr {100 + ($i*15) + 2}]\n" ,"set x2 [expr {$x1+10}]\n" ,"set nbrs [lindex $status_tetqualclasses $i]\n" ,"set y [expr (249 - (200 * $nbrs / $ubound ) )]\n" ,".qualityview_dlg.c coords $qualbar($i) $x1 250 $x2 $y\n" ,"if { $nbrs == 0 } {\n" ,".qualityview_dlg.c itemconfigure $qualbarnull($i) -text 0\n" ,"} {\n" ,".qualityview_dlg.c itemconfigure $qualbarnull($i) -text \"\"\n" ,"}\n" ,"}\n" ,"}\n" ,"if {[winfo exists .memuse_dlg] == 1} {\n" ,"global memmark\n" ,"set usemb [Ng_MemInfo usedmb]\n" ,"for {set i 0} {$i < [string length $usemb] } {incr i} {\n" ,"if { [string index $usemb $i] == 0 } {\n" ,".memuse_dlg.c coords $memmark($i) [expr 50+$i] 68 [expr 50+$i] 70\n" ,"} {\n" ,".memuse_dlg.c coords $memmark($i) [expr 50+$i] 50 [expr 50+$i] 70\n" ,"}\n" ,"}\n" ,"}\n" ,"after 10 { timer2 }\n" ,"}\n" ,"timer2\n" ,"proc bgerror { error } {\n" ,"global errorInfo userlevel\n" ,"if { $userlevel == 3} {\n" ,"puts \"ERROR: $error\"\n" ,"puts \"errinfo: $errorInfo\"\n" ,"}\n" ,"tk_messageBox -title \"Error Message\" -message $error -type ok\n" ,"}\n" ,"proc smh2 { menuitem } {\n" ,"if {[catch {$menuitem entrycget active -label} name]} {\n" ,"set name \" \"\n" ,"}\n" ,"show_menu_help $name\n" ,"update idletasks\n" ,"}\n" ,"bind .ngmenu <> { smh2 %W }\n" ,"bind .ngmenu.file <> { smh2 %W }\n" ,"bind .ngmenu.geometry <> { smh2 %W }\n" ,"bind .ngmenu.mesh <> { smh2 %W }\n" ,"bind .ngmenu.view <> { smh2 %W }\n" ,"bind .ngmenu.meshsize <> { smh2 %W }\n" ,"bind .ngmenu.special <> { smh2 %W }\n" ,"bind .ngmenu.help <> { smh2 %W }\n" ,"bind . { .ngmenu.file invoke \"Quit\" }\n" ,"bind . { .ngmenu.file invoke \"Load Geometry...\" } ;\n" ,"bind . { .ngmenu.file invoke \"Load Mesh...\" } ;\n" ,"bind . { .ngmenu.file invoke \"Save Mesh...\" } ;\n" ,"bind . { .ngmenu.file activate \"Recent Files\" } ;\n" ,"bind .

{ newprimitivedialog } ; \n" ,"bind .

{ editprimitivedialog }\n" ,"bind . { newsoliddialog }\n" ,"bind . { .ngmenu.mesh invoke \"Generate Mesh\" } ;\n" ,"}\n" ,"}\n" ,"catch {\n" ,"proc meshingoptionsdialog { } {\n" ,"set w .options_dlg\n" ,"if {[winfo exists .options_dlg] == 1} {\n" ,"wm withdraw $w\n" ,"wm deiconify $w\n" ,"focus $w\n" ,"} {\n" ,"toplevel $w\n" ,"pack [ttk::notebook $w.nb] -fill both -side top\n" ,"$w.nb add [ttk::frame $w.nb.general] -text \"General\" -underline 0\n" ,"$w.nb add [ttk::frame $w.nb.meshsize] -text \"Mesh Size\" -underline 0\n" ,"$w.nb add [ttk::frame $w.nb.chartopt] -text \"STL Charts\" -underline 0\n" ,"$w.nb add [ttk::frame $w.nb.optimizer] -text \"Optimizer\" -underline 0\n" ,"$w.nb add [ttk::frame $w.nb.debug] -text \"Debug\" -underline 0\n" ,"set f $w.nb.general\n" ,"ttk::frame $f.background\n" ,"pack $f.background -fill both\n" ,"set f $f.background\n" ,"ttk::labelframe $f.f2 -relief groove -borderwidth 3 -text \"General meshing options\"\n" ,"pack $f.f2 -pady 15 -fill x\n" ,"set f $f.f2\n" ,"set finevals { 1 2 3 4 5 6 }\n" ,"set finelabs(1) \"very coarse\"\n" ,"set finelabs(2) \"coarse\"\n" ,"set finelabs(3) \"moderate\"\n" ,"set finelabs(4) \"fine\"\n" ,"set finelabs(5) \"very fine\"\n" ,"set finelabs(6) \"user defined\"\n" ,"global meshoptions.fineness\n" ,"ttk::label $f.fine2l -text \"Mesh granularity: \"\n" ,"ttk::menubutton $f.fine2c -menu $f.fine2m -text \"coarse\" -width 16\n" ,"menu $f.fine2m -tearoff 0\n" ,"foreach finev { 1 2 3 4 5 6 } {\n" ,"$f.fine2m add command -label $finelabs($finev) \\\n" ,"-command \"set meshoptions.fineness $finev ; setgranularity $finev; $f.fine2c configure -text \\\"$finelabs($finev)\\\"\"\n" ,"}\n" ,"$f.fine2m invoke $finelabs(${meshoptions.fineness})\n" ,"grid $f.fine2l $f.fine2c -sticky nw\n" ,"set mgsteps { ag me ms os mv ov }\n" ,"set mgsteplabel(ag) \"Analyze Geometry\"\n" ,"set mgsteplabel(me) \"Mesh Edges\"\n" ,"set mgsteplabel(ms) \"Mesh Surface\"\n" ,"set mgsteplabel(os) \"Optimize Surface\"\n" ,"set mgsteplabel(mv) \"Mesh Volume\"\n" ,"set mgsteplabel(ov) \"Optimize Volume\"\n" ,"global meshoptions.firststep\n" ,"ttk::label $f.first2l -text \"First Step: \"\n" ,"ttk::menubutton $f.first2c -menu $f.first2m -width 16\n" ,"menu $f.first2m -tearoff 0\n" ,"foreach i $mgsteps {\n" ,"$f.first2m add command -label $mgsteplabel($i) -command \"set meshoptions.firststep $i ; $f.first2c configure -text \\\"$mgsteplabel($i)\\\"\"\n" ,"}\n" ,"$f.first2m invoke $mgsteplabel(${meshoptions.firststep})\n" ,"grid $f.first2l $f.first2c -sticky nw\n" ,"global meshoptions.laststep\n" ,"ttk::label $f.last2l -text \"Last Step: \"\n" ,"ttk::menubutton $f.last2c -menu $f.last2m -width 16\n" ,"menu $f.last2m -tearoff 0\n" ,"foreach i $mgsteps {\n" ,"$f.last2m add command -label $mgsteplabel($i) -command \"set meshoptions.laststep $i ; $f.last2c configure -text \\\"$mgsteplabel($i)\\\"\"\n" ,"}\n" ,"$f.last2m invoke $mgsteplabel(${meshoptions.laststep})\n" ,"grid $f.last2l $f.last2c -sticky nw\n" ,"grid anchor $f center\n" ,"set msg(0) \"None\"\n" ,"set msg(1) \"Least\"\n" ,"set msg(2) \"Little\"\n" ,"set msg(3) \"Moderate\"\n" ,"set msg(4) \"Much\"\n" ,"set msg(5) \"Most\"\n" ,"global options.printmsg\n" ,"ttk::label $f.msg2l -text \"Print Messages: \"\n" ,"menu $f.msg2m -tearoff 0\n" ,"ttk::menubutton $f.msg2c -menu $f.msg2m -width 16\n" ,"foreach step {0 1 2 3 4 5 } {\n" ,"$f.msg2m add command -label $msg($step) -command \"set options.printmsg $step ; $f.msg2c configure -text $msg($step)\"\n" ,"}\n" ,"$f.msg2m invoke ${options.printmsg}\n" ,"grid $f.msg2l $f.msg2c -sticky nw\n" ,"set f $w.nb.general\n" ,"ttk::labelframe $f.bts -borderwidth 3 -relief groove -text \"Additional meshing options\"\n" ,"pack $f.bts -fill x -pady 15\n" ,"ttk::frame $f.bts.btnframe\n" ,"ttk::checkbutton $f.bts.btnframe.parthread -text \"Parallel meshing thread\" \\\n" ,"-variable options.parthread\n" ,"ttk::checkbutton $f.bts.btnframe.second -text \"Second order elements\" \\\n" ,"-variable options.secondorder\n" ,"ttk::checkbutton $f.bts.btnframe.quad -text \"Quad dominated\" \\\n" ,"-variable options.quad -command {\n" ,"if { ${options.quad} } {\n" ,"set meshoptions.laststep os\n" ,"}\n" ,"}\n" ,"ttk::checkbutton $f.bts.btnframe.invtets -text \"Invert volume elements\" \\\n" ,"-variable options.inverttets\n" ,"ttk::checkbutton $f.bts.btnframe.invtrigs -text \"Invert surface elements\" \\\n" ,"-variable options.inverttrigs\n" ,"ttk::checkbutton $f.bts.btnframe.azref -text \"Automatic Z-refinement\" \\\n" ,"-variable options.autozrefine\n" ,"pack $f.bts.btnframe -anchor center\n" ,"pack $f.bts.btnframe.parthread $f.bts.btnframe.second $f.bts.btnframe.quad $f.bts.btnframe.invtets $f.bts.btnframe.invtrigs $f.bts.btnframe.azref -anchor w\n" ,"ttk::label $f.bts.btnframe.l -text \"Element order\"\n" ,"ttk::spinbox $f.bts.btnframe.elementorder2 -from 1 -to 20 -textvariable options.elementorder -width 2\n" ,"pack $f.bts.btnframe.elementorder2 $f.bts.btnframe.l -anchor w -side left\n" ,"set f $w.nb.meshsize\n" ,"ttk::frame $f.f2\n" ,"pack $f.f2 -pady 10\n" ,"set f $f.f2\n" ,"ttk::frame $f.meshsize\n" ,"ttk::label $f.meshsize.l -text \"max mesh-size\"\n" ,"ttk::spinbox $f.meshsize.s -from 1e-9 -to 1e9 -textvariable options.meshsize -width 5 -validate focus -validatecommand \"my_validatespinbox %W %P 10\" \\\n" ,"-invalidcommand \"my_invalidspinbox %W\"\n" ,"pack $f.meshsize -fill x\n" ,"pack $f.meshsize.s $f.meshsize.l -side right\n" ,"ttk::frame $f.minmeshsize\n" ,"ttk::label $f.minmeshsize.l -text \"min mesh-size\"\n" ,"ttk::spinbox $f.minmeshsize.s -from 0 -to 1e9 -textvariable options.minmeshsize -width 5 -validate focus -validatecommand \"my_validatespinbox %W %P 10\" \\\n" ,"-invalidcommand \"my_invalidspinbox %W\"\n" ,"pack $f.minmeshsize -fill x\n" ,"pack $f.minmeshsize.s $f.minmeshsize.l -side right\n" ,"ttk::frame $f.grading\n" ,"ttk::label $f.grading.l -text \"mesh-size grading\"\n" ,"ttk::spinbox $f.grading.s -from 0.1 -to 1.0 -textvariable options.grading -width 5 -increment 0.1 -validate focus -validatecommand \"my_validatespinbox %W %P 3\" \\\n" ,"-invalidcommand \"my_invalidspinbox %W\"\n" ,"pack $f.grading -fill x\n" ,"pack $f.grading.s $f.grading.l -side right\n" ,"set f $w.nb.meshsize\n" ,"ttk::labelframe $f.msf -text \"mesh-size file:\" -relief groove -borderwidth 3\n" ,"pack $f.msf\n" ,"ttk::entry $f.msf.ent -textvariable options.meshsizefilename -width 30\n" ,"ttk::button $f.msf.btn -text \"Browse\" -command {\n" ,"global options.meshsizefilename\n" ,"set types {\n" ,"{\"Meshsize file\" {.msz} } }\n" ,"set options.meshsizefilename [tk_getOpenFile -filetypes $types -initialfile ${options.meshsizefilename}]\n" ,"}\n" ,"pack $f.msf.ent -side left -expand yes -fill x -anchor s -padx 4 -pady 4\n" ,"pack $f.msf.btn -side left -anchor s -padx 4 -pady 4\n" ,"ttk::label $f.lab -text \"Additional mesh size restrictions:\"\n" ,"ttk::labelframe $f.csg -relief groove -borderwidth 3 -text \"CSG mesh-size\"\n" ,"pack $f.csg -fill x\n" ,"proc test {a} {puts $a}\n" ,"ttk::scale $f.csg.curvsc -orient horizontal -length 150 -from 0.2 -to 5 \\\n" ,"-variable options.curvaturesafety -takefocus 0 -command \"roundscale $f.csg.curvsc 1\"\n" ,"ttk::entry $f.csg.curve -textvariable options.curvaturesafety -width 3 \\\n" ,"-validatecommand \"my_validate %W [$f.csg.curvsc cget -from] [$f.csg.curvsc cget -to] %P 1\" \\\n" ,"-invalidcommand \"my_invalid %W\" -validate focus\n" ,"ttk::label $f.csg.curvla -text \"Elements per curvature radius\"\n" ,"grid $f.csg.curvsc $f.csg.curve $f.csg.curvla -sticky nw -padx 4\n" ,"ttk::scale $f.csg.elensc -orient horizontal -length 150 -from 0.2 -to 5 \\\n" ,"-variable options.segmentsperedge -takefocus 0 -command \"roundscale $f.csg.elensc 1\"\n" ,"ttk::entry $f.csg.elene -textvariable options.segmentsperedge -width 3 \\\n" ,"-validatecommand \"my_validate %W [$f.csg.elensc cget -from] [$f.csg.elensc cget -to] %P 1\" \\\n" ,"-invalidcommand \"my_invalid %W\" -validate focus\n" ,"ttk::label $f.csg.elenla -text \"Elements per edge\"\n" ,"grid $f.csg.elensc $f.csg.elene $f.csg.elenla -sticky nw -padx 4\n" ,"grid anchor $f.csg center\n" ,"ttk::labelframe $f.stl -relief groove -borderwidth 3 -text \"STL mesh-size\"\n" ,"pack $f.stl -fill x\n" ,"ttk::scale $f.stl.r2sc -orient horizontal -length 150 -from 0.2 -to 5 \\\n" ,"-variable stloptions.resthchartdistfac -takefocus 0 -command \"roundscale $f.stl.r2sc 1\"\n" ,"ttk::entry $f.stl.r2e -textvariable stloptions.resthchartdistfac -width 3 \\\n" ,"-validatecommand \"my_validate %W [$f.stl.r2sc cget -from] [$f.stl.r2sc cget -to] %P 1\" \\\n" ,"-invalidcommand \"my_invalid %W\" -validate focus\n" ,"ttk::checkbutton $f.stl.r2bu -text \"STL - chart distance\" \\\n" ,"-variable stloptions.resthchartdistenable\n" ,"grid $f.stl.r2sc $f.stl.r2e $f.stl.r2bu -sticky nw -padx 4\n" ,"ttk::scale $f.stl.r6sc -orient horizontal -length 150 -from 0.2 -to 5 \\\n" ,"-variable stloptions.resthlinelengthfac -takefocus 0 -command \"roundscale $f.stl.r6sc 1\"\n" ,"ttk::entry $f.stl.r6e -textvariable stloptions.resthlinelengthfac -width 3 \\\n" ,"-validatecommand \"my_validate %W [$f.stl.r6sc cget -from] [$f.stl.r6sc cget -to] %P 1\" \\\n" ,"-invalidcommand \"my_invalid %W\" -validate focus\n" ,"ttk::checkbutton $f.stl.r6bu -text \"STL - line length\" \\\n" ,"-variable stloptions.resthlinelengthenable\n" ,"grid $f.stl.r6sc $f.stl.r6e $f.stl.r6bu -sticky nw -padx 4\n" ,"ttk::scale $f.stl.r3sc -orient horizontal -length 150 -from 0.2 -to 8 \\\n" ,"-variable stloptions.resthcloseedgefac -takefocus 0 -command \"roundscale $f.stl.r3sc 1\"\n" ,"ttk::entry $f.stl.r3e -textvariable stloptions.resthcloseedgefac -width 3 \\\n" ,"-validatecommand \"my_validate %W [$f.stl.r3sc cget -from] [$f.stl.r3sc cget -to] %P 1\" \\\n" ,"-invalidcommand \"my_invalid %W\" -validate focus\n" ,"ttk::checkbutton $f.stl.r3bu -text \"STL/IGES/STEP - close edges\" \\\n" ,"-variable stloptions.resthcloseedgeenable\n" ,"grid $f.stl.r3sc $f.stl.r3e $f.stl.r3bu -sticky nw -padx 4\n" ,"ttk::scale $f.stl.r1sc -orient horizontal -length 150 -from 0.2 -to 5 \\\n" ,"-variable stloptions.resthsurfcurvfac -takefocus 0 -command \"roundscale $f.stl.r1sc 1\"\n" ,"ttk::entry $f.stl.r1e -textvariable stloptions.resthsurfcurvfac -width 3 \\\n" ,"-validatecommand \"my_validate %W [$f.stl.r1sc cget -from] [$f.stl.r1sc cget -to] %P 1\" \\\n" ,"-invalidcommand \"my_invalid %W\" -validate focus\n" ,"ttk::checkbutton $f.stl.r1bu -text \"STL - surface curvature\" \\\n" ,"-variable stloptions.resthsurfcurvenable\n" ,"grid $f.stl.r1sc $f.stl.r1e $f.stl.r1bu -sticky nw -padx 4\n" ,"ttk::scale $f.stl.r3bsc -orient horizontal -length 150 -from 0.2 -to 5 \\\n" ,"-variable stloptions.resthedgeanglefac -takefocus 0 -command \"roundscale $f.stl.r3bsc 1\"\n" ,"ttk::entry $f.stl.r3be -textvariable stloptions.resthedgeanglefac -width 3 \\\n" ,"-validatecommand \"my_validate %W [$f.stl.r3bsc cget -from] [$f.stl.r3bsc cget -to] %P 1\" \\\n" ,"-invalidcommand \"my_invalid %W\" -validate focus\n" ,"ttk::checkbutton $f.stl.r3bbu -text \"STL - edge angle\" \\\n" ,"-variable stloptions.resthedgeangleenable\n" ,"grid $f.stl.r3bsc $f.stl.r3be $f.stl.r3bbu -sticky nw -padx 4\n" ,"ttk::scale $f.stl.r5sc -orient horizontal -length 150 -from 0.2 -to 5 \\\n" ,"-variable stloptions.resthsurfmeshcurvfac -takefocus 0 -command \"roundscale $f.stl.r5sc 1\"\n" ,"ttk::entry $f.stl.r5e -textvariable stloptions.resthsurfmeshcurvfac -width 3 \\\n" ,"-validatecommand \"my_validate %W [$f.stl.r5sc cget -from] [$f.stl.r5sc cget -to] %P 1\" \\\n" ,"-invalidcommand \"my_invalid %W\" -validate focus\n" ,"ttk::checkbutton $f.stl.r5bu -text \"STL - surface mesh curv\" \\\n" ,"-variable stloptions.resthsurfmeshcurvenable\n" ,"grid $f.stl.r5sc $f.stl.r5e $f.stl.r5bu -sticky nw -padx 4\n" ,"ttk::checkbutton $f.stl.recalch -text \"STL - Recalc mesh size for surface optimization\" \\\n" ,"-variable stloptions.recalchopt\n" ,"grid $f.stl.recalch -sticky n -columnspan 3 -column 0\n" ,"ttk::button $f.stl.calch -text \"Calc New H\" -command { redraw; Ng_STLCalcLocalH }\n" ,"grid $f.stl.calch -columnspan 3 -column 0\n" ,"grid anchor $f.stl center\n" ,"proc roundscale {w n_digits args} {\n" ,"set val [$w get]\n" ,"global [$w cget -variable]\n" ,"if {$n_digits == 0 } {\n" ,"set [$w cget -variable] [tcl::mathfunc::round $val]\n" ,"} else {\n" ,"set [$w cget -variable] [format \"%.[append n_digits \"f\"]\" $val]\n" ,"}\n" ,"}\n" ,"global last_accepted_sc\n" ,"proc my_validate {w mini maxi val n_digits} {\n" ,"global last_accepted_sc [$w cget -textvariable]\n" ,"if {[string length $val] == 0} {return 0}\n" ,"if {[string is double $val] == 1} {\n" ,"if { $n_digits == 0 } {\n" ,"set val [tcl::mathfunc::max $mini [tcl::mathfunc::min $maxi [tcl::mathfunc::round $val]]]\n" ,"} else {\n" ,"if { $n_digits < 9 } {\n" ,"set val [tcl::mathfunc::max $mini [tcl::mathfunc::min $maxi [format \"%.[append n_digits \"f\"]\" $val]]]\n" ,"}\n" ,"}\n" ,"set last_accepted_sc $val\n" ,"set [$w cget -textvariable] $val\n" ,"return 1\n" ,"} else {\n" ,"return 0\n" ,"}\n" ,"}\n" ,"proc my_invalid {w} {\n" ,"global last_accepted_sc [$w cget -textvariable]\n" ,"set [$w cget -textvariable] $last_accepted_sc\n" ,"}\n" ,"set f $w.nb.chartopt\n" ,"ttk::labelframe $f.mainframe -text \"STL angles\" -relief groove -borderwidth 3\n" ,"pack $f.mainframe -fill x -pady 15\n" ,"set f $f.mainframe\n" ,"ttk::label $f.labYangles -text \"Yellow Edges Angle ()\"\n" ,"ttk::scale $f.scale1 -orient horizontal -length 150 -from 0 -to 90 -variable stloptions.yangle -takefocus 0 -command \"roundscale $f.scale1 1\"\n" ,"ttk::entry $f.entry1 -textvariable stloptions.yangle -width 5 -validate focus -takefocus 0 -validatecommand \"my_validate %W [$f.scale1 cget -from] [$f.scale1 cget -to] %P 1\" \\\n" ,"-invalidcommand \"my_invalid %W\"\n" ,"grid $f.scale1 $f.entry1 $f.labYangles -sticky nw -padx 4 -pady 6\n" ,"ttk::label $f.labEangles -text \"Edge Corner Angle ()\"\n" ,"ttk::scale $f.scale2 -orient horizontal -length 150 -from 0 -to 180 -variable stloptions.edgecornerangle -takefocus 0 -command \"roundscale $f.scale2 1\"\n" ,"ttk::entry $f.entry2 -textvariable stloptions.edgecornerangle -width 5 -validate focus -takefocus 0 -validatecommand \"my_validate %W [$f.scale2 cget -from] [$f.scale2 cget -to] %P 1\" \\\n" ,"-invalidcommand \"my_invalid %W\"\n" ,"grid $f.scale2 $f.entry2 $f.labEangles -sticky nw -padx 4 -pady 6\n" ,"ttk::label $f.lab31 -text \"Chart Angle ()\"\n" ,"ttk::scale $f.scale3 -orient horizontal -length 150 -from 0 -to 180 -variable stloptions.chartangle -takefocus 0 -command \"roundscale $f.scale3 1\"\n" ,"ttk::entry $f.entry3 -textvariable stloptions.chartangle -width 5 -validate focus -takefocus 0 -validatecommand \"my_validate %W [$f.scale3 cget -from] [$f.scale3 cget -to] %P 1\" \\\n" ,"-invalidcommand \"my_invalid %W\"\n" ,"grid $f.scale3 $f.entry3 $f.lab31 -sticky nw -padx 4 -pady 6\n" ,"ttk::label $f.lab41 -text \"Outer Chart Angle ()\"\n" ,"ttk::scale $f.scale4 -orient horizontal -length 150 -from 0 -to 180 -variable stloptions.outerchartangle -takefocus 0 -command \"roundscale $f.scale4 1\"\n" ,"ttk::entry $f.entry4 -textvariable stloptions.outerchartangle -width 5 -validate focus -takefocus 0 -validatecommand \"my_validate %W [$f.scale4 cget -from] [$f.scale4 cget -to] %P 1\" \\\n" ,"-invalidcommand \"my_invalid %W\"\n" ,"grid $f.scale4 $f.entry4 $f.lab41 -sticky nw -padx 4 -pady 6\n" ,"grid anchor $f center\n" ,"global last_accepted_sp\n" ,"proc my_validatespinbox {w val n_digits} {\n" ,"global last_accepted_sp\n" ,"if {[string length $val] == 0} {return 0}\n" ,"if {[string is double $val] == 1} {\n" ,"if { $n_digits == 0 } {\n" ,"if { $n_digits < 9 } {\n" ,"set val [tcl::mathfunc::round $val] } else { set val [format \"%.[append n_digits \"f\"]\" $val]\n" ,"}\n" ,"}\n" ,"$w set [tcl::mathfunc::max [$w cget -from] [tcl::mathfunc::min [$w cget -to] $val]]\n" ,"set last_accepted_sp $val\n" ,"return 1\n" ,"} else {\n" ,"return 0\n" ,"}\n" ,"}\n" ,"proc my_invalidspinbox {w} {\n" ,"global last_accepted_sp\n" ,"$w set $last_accepted_sp\n" ,"}\n" ,"set f $w.nb.optimizer\n" ,"ttk::labelframe $f.optframe -text \"Optimization settings\" -relief groove -borderwidth 3\n" ,"pack $f.optframe -fill x -pady 15\n" ,"ttk::label $f.optframe.sosl -text \"Surface opt steps\"\n" ,"ttk::spinbox $f.optframe.soss -from 0 -to 99 -textvariable options.optsteps2d -width 5 -increment 1 -validate focus -validatecommand \"my_validatespinbox %W %P 0\" \\\n" ,"-invalidcommand \"my_invalidspinbox %W\"\n" ,"grid $f.optframe.sosl $f.optframe.soss -sticky nw;\n" ,"ttk::label $f.optframe.vosl -text \"Volume opt steps\"\n" ,"ttk::spinbox $f.optframe.voss -from 0 -to 99 -textvariable options.optsteps3d -width 5 -increment 1 -validate focus -validatecommand \"my_validatespinbox %W %P 0\" \\\n" ,"-invalidcommand \"my_invalidspinbox %W\"\n" ,"grid $f.optframe.vosl $f.optframe.voss -sticky nw;\n" ,"ttk::label $f.optframe.eswl -text \"Element size weight\"\n" ,"ttk::spinbox $f.optframe.esws -from 0 -to 1 -textvariable options.elsizeweight -width 5 -increment 0.1 -validate focus -validatecommand \"my_validatespinbox %W %P 1\" \\\n" ,"-invalidcommand \"my_invalidspinbox %W\"\n" ,"grid $f.optframe.eswl $f.optframe.esws -sticky nw;\n" ,"ttk::label $f.optframe.weml -text \"Worst element measure\"\n" ,"ttk::spinbox $f.optframe.wems -from 1 -to 10 -textvariable options.opterrpow -width 5 -increment 1 -validate focus -validatecommand \"my_validatespinbox %W %P 0\" \\\n" ,"-invalidcommand \"my_invalidspinbox %W\"\n" ,"grid $f.optframe.weml $f.optframe.wems -sticky nw;\n" ,"grid anchor $f.optframe center\n" ,"proc roundscale_helper_osx {w val} {\n" ,"global [$w cget -variable] options.badellimit\n" ,"set [$w cget -variable] [tcl::mathfunc::round $val]\n" ,"set options.badellimit [expr [tcl::mathfunc::round $val]+160]\n" ,"}\n" ,"proc my_validate_helper_osx {w val} {\n" ,"if {[string length $val] == 0} {return 0}\n" ,"if {[string is double $val] == 1} {\n" ,"set scale_loc [lindex [winfo children [winfo parent $w]] [lsearch [winfo children [winfo parent $w]] *scale]]\n" ,"global [$scale_loc cget -variable] options.badellimit\n" ,"set [$scale_loc cget -variable] [tcl::mathfunc::max [$scale_loc cget -from] [tcl::mathfunc::min [$scale_loc cget -to] [expr [tcl::mathfunc::round $val]-160]]]\n" ,"set options.badellimit [tcl::mathfunc::max [expr [$scale_loc cget -from]+160] [tcl::mathfunc::min [expr [$scale_loc cget -to]+160] [tcl::mathfunc::round $val]]]\n" ,"return 1\n" ,"} else {\n" ,"return 0\n" ,"}\n" ,"}\n" ,"proc my_invalid_helper_osx {w} {\n" ,"global options.badellimit\n" ,"set scale_loc [lindex [winfo children [winfo parent $w]] [lsearch [winfo children [winfo parent $w]] *scale]]\n" ,"global [$scale_loc cget -variable]\n" ,"set [$scale_loc cget -variable] [tcl::mathfunc::round [$scale_loc get]]\n" ,"set options.badellimit [expr [tcl::mathfunc::round [$scale_loc get]]+160]\n" ,"}\n" ,"global dummy_badellimit\n" ,"set dummy_badellimit 15\n" ,"ttk::labelframe $f.optframe2 -text \"Bad elements\" -relief groove -borderwidth 3\n" ,"pack $f.optframe2 -fill x -pady 15 -ipady 5\n" ,"ttk::frame $f.optframe2.badellimit\n" ,"ttk::label $f.optframe2.lab -text \"bad element criterion\";\n" ,"ttk::scale $f.optframe2.scale -orient horizontal -length 100 -from 00 -to 20 -variable dummy_badellimit -takefocus 0 -command \"roundscale_helper_osx $f.optframe2.scale\"\n" ,"ttk::entry $f.optframe2.entry -textvariable options.badellimit -width 3 -validate focusout -takefocus 0 -validatecommand \"my_validate_helper_osx %W %P\" \\\n" ,"-invalidcommand \"my_invalid_helper_osx %W\"\n" ,"grid $f.optframe2.scale $f.optframe2.entry $f.optframe2.lab -padx 4 -sticky nw\n" ,"grid anchor $f.optframe2 center\n" ,"set f $w.nb.debug\n" ,"ttk::labelframe $f.f2 -text \"Advanced options\" -borderwidth 3 -relief groove\n" ,"pack $f.f2 -fill x -pady 15\n" ,"set f $f.f2\n" ,"ttk::checkbutton $f.localh -text \"Use Local Meshsize\" \\\n" ,"-variable options.localh\n" ,"ttk::checkbutton $f.delauney -text \"Use Delaunay\" \\\n" ,"-variable options.delaunay\n" ,"ttk::checkbutton $f.checkoverlap -text \"Check Overlapping\" \\\n" ,"-variable options.checkoverlap\n" ,"ttk::checkbutton $f.checkcb -text \"Check Chart Boundary\" \\\n" ,"-variable options.checkchartboundary\n" ,"ttk::checkbutton $f.blockfill -text \"Do Blockfilling\" \\\n" ,"-variable options.blockfill\n" ,"grid $f.localh $f.delauney -sticky nw\n" ,"grid $f.checkoverlap $f.blockfill -sticky nw\n" ,"grid $f.checkcb -sticky nw\n" ,"grid anchor $f center\n" ,"set f $w.nb.debug\n" ,"proc enable_cb {w1 w2 w3} {\n" ,"Ng_SetDebugParameters\n" ,"if {[string match *selected* [$w1 state]] == 1 } {\n" ,"$w2 configure -state normal\n" ,"$w3 configure -state normal\n" ,"} else {\n" ,"$w2 configure -state disabled\n" ,"$w3 configure -state disabled\n" ,"}\n" ,"}\n" ,"ttk::labelframe $f.cb1 -text \"Debugging options\" -borderwidth 3 -relief groove\n" ,"pack $f.cb1 -fill x -pady 15\n" ,"ttk::checkbutton $f.cb1.slowchecks -text \"Slow checks\" \\\n" ,"-variable debug.slowchecks -command { Ng_SetDebugParameters }\n" ,"ttk::checkbutton $f.cb1.debugoutput -text \"Debugging outout\" \\\n" ,"-variable debug.debugoutput -command { Ng_SetDebugParameters }\n" ,"ttk::checkbutton $f.cb1.haltexline -text \"Halt on existing line\" \\\n" ,"-variable debug.haltexistingline -command { Ng_SetDebugParameters }\n" ,"ttk::checkbutton $f.cb1.haltoverlap -text \"Halt on Overlap\" \\\n" ,"-variable debug.haltoverlap -command { Ng_SetDebugParameters }\n" ,"ttk::checkbutton $f.cb1.haltsuc -text \"Halt on success\" \\\n" ,"-variable debug.haltsuccess -command { Ng_SetDebugParameters }\n" ,"ttk::checkbutton $f.cb1.haltnosuc -text \"Halt on no success\" \\\n" ,"-variable debug.haltnosuccess -command { Ng_SetDebugParameters }\n" ,"ttk::checkbutton $f.cb1.haltlargequal -text \"Halt on large quality class\" \\\n" ,"-variable debug.haltlargequalclass -command { Ng_SetDebugParameters }\n" ,"ttk::checkbutton $f.cb1.haltseg -text \"Halt on Segment:\" \\\n" ,"-variable debug.haltsegment -command \"enable_cb %W $f.cb1.segs.ent1 $f.cb1.segs.ent2\"\n" ,"ttk::checkbutton $f.cb1.haltnode -text \"Halt on Node:\" \\\n" ,"-variable debug.haltnode -command \"enable_cb %W $f.cb1.segs.ent1 $f.cb1.segs.ent2\"\n" ,"ttk::frame $f.cb1.fr\n" ,"ttk::checkbutton $f.cb1.fr.cb -text \"Halt on Face:\" \\\n" ,"-variable debug.haltface -command \"enable_cb %W $f.cb1.fr.ent $f.cb1.fr.ent\"\n" ,"ttk::entry $f.cb1.fr.ent -textvariable debug.haltfacenr -width 3 -state disabled\n" ,"pack $f.cb1.fr.cb $f.cb1.fr.ent -side left\n" ,"ttk::frame $f.cb1.segs\n" ,"ttk::label $f.cb1.segs.lab1 -text \"P1:\"\n" ,"ttk::entry $f.cb1.segs.ent1 -width 6 \\\n" ,"-textvariable debug.haltsegmentp1 -state disabled\n" ,"ttk::label $f.cb1.segs.lab2 -text \"P2:\"\n" ,"ttk::entry $f.cb1.segs.ent2 -width 6 \\\n" ,"-textvariable debug.haltsegmentp2 -state disabled\n" ,"pack $f.cb1.segs.lab1 $f.cb1.segs.ent1 $f.cb1.segs.lab2 $f.cb1.segs.ent2 -side left\n" ,"grid $f.cb1.slowchecks $f.cb1.debugoutput -sticky nw\n" ,"grid $f.cb1.haltexline $f.cb1.haltoverlap -sticky nw\n" ,"grid $f.cb1.haltsuc $f.cb1.haltnosuc -sticky nw\n" ,"grid $f.cb1.haltlargequal $f.cb1.fr -sticky nw\n" ,"grid $f.cb1.haltnode -sticky nw\n" ,"grid $f.cb1.haltseg -stick nw\n" ,"grid $f.cb1.segs -stick w -row 4 -rowspan 2 -column 1\n" ,"grid rowconfigure $f.cb1 3 -pad 8\n" ,"grid anchor $f.cb1 center\n" ,"ttk::checkbutton $f.cb1.showactivechart -text \"Show Active Meshing-Chart\" -variable stloptions.showactivechart -command { Ng_SetVisParameters; redraw }\n" ,"grid $f.cb1.showactivechart\n" ,"grid rowconfigure $f.cb1 3 -pad 8\n" ,"grid rowconfigure $f.cb1 5 -pad 8\n" ,"set f $w.nb.debug\n" ,"ttk::labelframe $f.cont -relief groove -borderwidth 3 -text \"Debugging visualization\"\n" ,"pack $f.cont -fill x -pady 15\n" ,"ttk::checkbutton $f.cont.multidrawing -text \"Draw Meshing\" -variable multithread_drawing\n" ,"ttk::checkbutton $f.cont.multitestmode -text \"Meshing Testmode\" -variable multithread_testmode\n" ,"ttk::button $f.cont.goon -text \"Go On\" -command { set multithread_pause 0 }\n" ,"grid $f.cont.multidrawing -sticky nw\n" ,"grid $f.cont.multitestmode -sticky nw\n" ,"grid $f.cont.goon -row 0 -rowspan 2 -column 1 -sticky w\n" ,"grid columnconfigure $f.cont 0 -pad 30\n" ,"grid columnconfigure $f.cont 1 -pad 20\n" ,"grid anchor $f.cont center\n" ,"global userlevel\n" ,"if { $userlevel < 3} {\n" ,"$w.nb delete insider\n" ,"$w.nb delete debug\n" ,"}\n" ,"ttk::frame $w.bu\n" ,"pack $w.bu -fill x -ipady 3\n" ,"ttk::button $w.bu.apl -text \"Apply\" -command {\n" ,"Ng_SetMeshingParameters\n" ,"Ng_SetDebugParameters\n" ,"}\n" ,"ttk::button $w.bu.ok -text \"Done\" -command {\n" ,"Ng_SetMeshingParameters\n" ,"Ng_SetDebugParameters\n" ,"wm withdraw .options_dlg\n" ,"}\n" ,"pack $w.bu.apl $w.bu.ok -side left -expand yes\n" ,"wm withdraw $w\n" ,"wm geom $w +100+100\n" ,"wm deiconify $w\n" ,"wm title $w \"Meshing Options\"\n" ,"focus .options_dlg\n" ,"}\n" ,"}\n" ,"meshingoptionsdialog\n" ,"wm withdraw .options_dlg\n" ,"proc viewingoptionsdialog { } {\n" ,"global userlevel\n" ,"set w .viewopts_dlg\n" ,"if {[winfo exists .viewopts_dlg] == 1} {\n" ,"wm withdraw $w\n" ,"wm deiconify $w\n" ,"focus $w\n" ,"} {\n" ,"toplevel $w\n" ,"pack [ttk::notebook $w.nb] -fill both -fill both -side top\n" ,"$w.nb add [ttk::frame $w.nb.general] -text \"General\" -underline 0\n" ,"$w.nb add [ttk::frame $w.nb.stl] -text \"STL\" -underline 0\n" ,"$w.nb add [ttk::frame $w.nb.occ] -text \"IGES/STEP\" -underline 0\n" ,"$w.nb add [ttk::frame $w.nb.mesh] -text \"Mesh\" -underline 0\n" ,"$w.nb add [ttk::frame $w.nb.light] -text \"Light\" -underline 0\n" ,"$w.nb add [ttk::frame $w.nb.edges] -text \"Edges\" -underline 0\n" ,"$w.nb add [ttk::frame $w.nb.misc] -text \"Misc.\" -underline 3\n" ,"set f $w.nb.general\n" ,"ttk::labelframe $f.gvop -text \"General viewing options\" -relief groove -borderwidth 3\n" ,"pack $f.gvop -fill x -pady 15\n" ,"set f $f.gvop\n" ,"ttk::checkbutton $f.backcol -text \"White Background\" \\\n" ,"-variable viewoptions.whitebackground \\\n" ,"-command { Ng_SetVisParameters; redraw }\n" ,"ttk::checkbutton $f.cross -text \"Draw Coordinate Cross\" \\\n" ,"-variable viewoptions.drawcoordinatecross \\\n" ,"-command { Ng_SetVisParameters; redraw }\n" ,"ttk::checkbutton $f.color -text \"Draw Color-bar\" \\\n" ,"-variable viewoptions.drawcolorbar \\\n" ,"-command { Ng_SetVisParameters; redraw }\n" ,"ttk::checkbutton $f.netgen -text \"Draw Netgen-logo\" \\\n" ,"-variable viewoptions.drawnetgenlogo \\\n" ,"-command { Ng_SetVisParameters; redraw }\n" ,"grid $f.backcol -sticky nw\n" ,"grid $f.cross -stick nw\n" ,"grid $f.color -sticky nw\n" ,"grid $f.netgen -sticky nw\n" ,"menu $f.stylemenu\n" ,"ttk::menubutton $f.style -menu $f.stylemenu -width 10 -text [ttk::style theme use]\n" ,"grid $f.style -sticky nw\n" ,"grid anchor $f center\n" ,"foreach theme [ttk::themes] {\n" ,"$f.stylemenu add command -label $theme \\\n" ,"-command \" $f.style configure -text $theme; puts $theme ; ttk::setTheme $theme\"\n" ,"}\n" ,"set f $w.nb.stl\n" ,"ttk::labelframe $f.show -relief groove -borderwidth 3 -text \"STL viewing options\"\n" ,"pack $f.show -fill x -pady 15\n" ,"ttk::checkbutton $f.show.showtrias -text \"Show STL-Triangles\" \\\n" ,"-variable stloptions.showtrias -command { Ng_SetVisParameters; redraw }\n" ,"ttk::checkbutton $f.show.showfilledtrias -text \"Show Filled Triangles\" \\\n" ,"-variable stloptions.showfilledtrias -command { Ng_SetVisParameters; redraw }\n" ,"grid $f.show.showtrias $f.show.showfilledtrias -sticky nw\n" ,"ttk::checkbutton $f.show.showactivechart -text \"Show Active Meshing-Chart\" \\\n" ,"-variable stloptions.showactivechart -command { Ng_SetVisParameters; redraw }\n" ,"ttk::checkbutton $f.show.showedges -text \"Show Edges\" \\\n" ,"-variable stloptions.showedges -command { Ng_SetVisParameters; redraw }\n" ,"grid $f.show.showactivechart $f.show.showedges -sticky nw\n" ,"grid anchor $f.show center\n" ,"ttk::checkbutton $f.show.showmarktrias -text \"Show Chart Triangles\" \\\n" ,"-variable stloptions.showmarktrias \\\n" ,"-command {set stldoctor.showfaces 0; Ng_STLDoctor; Ng_SetVisParameters; redraw }\n" ,"ttk::checkbutton $f.show.showfaces -text \"Show Faces\" \\\n" ,"-variable stldoctor.showfaces \\\n" ,"-command {set stloptions.showmarktrias 0; Ng_STLDoctor; Ng_SetVisParameters; redraw}\n" ,"grid $f.show.showmarktrias $f.show.showfaces -sticky nw\n" ,"ttk::labelframe $f.fn -relief groove -borderwidth 3 -text \"Chart/Face number\"\n" ,"pack $f.fn -fill x\n" ,"ttk::label $f.fn.lab3 -text \"Chart/Face number\"\n" ,"ttk::scale $f.fn.scale3 -orient horizontal -length 150 -from 0 -to 200 \\\n" ,"-variable stloptions.chartnumber -command \"Ng_SetVisParameters; redraw;roundscale $f.fn.scale3 0\"\n" ,"ttk::entry $f.fn.ent3 -textvariable stloptions.chartnumber -width 3 -validate focus -takefocus 0 \\\n" ,"-validatecommand \"Ng_SetVisParameters; redraw;my_validate %W [$f.fn.scale3 cget -from] [$f.fn.scale3 cget -to] %P 0\" \\\n" ,"-invalidcommand \"my_invalid %W;Ng_SetVisParameters; redraw;\"\n" ,"grid $f.fn.scale3 $f.fn.ent3 $f.fn.lab3 -sticky nw -padx 4\n" ,"tk::label $f.fn.lab -text \"Chart/Face Offset:\";\n" ,"ttk::entry $f.fn.ent -width 3 \\\n" ,"-textvariable stloptions.chartnumberoffset -validate focus -takefocus 0 \\\n" ,"-validatecommand \"my_validate %W 0 1e9 %P 0\" \\\n" ,"-invalidcommand \"my_invalid %W\"\n" ,"grid $f.fn.lab -sticky ne -padx 4\n" ,"grid $f.fn.ent -sticky nw -padx 4 -row 1 -column 1\n" ,"grid anchor $f.fn center\n" ,"ttk::labelframe $f.advstl -text \"Advanced STL options\" -relief groove -borderwidth 3\n" ,"pack $f.advstl -fill x -pady 15\n" ,"ttk::checkbutton $f.advstl.bu1 -text \"Show Marked (Dirty) Triangles\" \\\n" ,"-variable stldoctor.showmarkedtrigs \\\n" ,"-command {Ng_STLDoctor; redraw}\n" ,"ttk::checkbutton $f.advstl.bu2 -text \"show edge corner points\" \\\n" ,"-variable stldoctor.showedgecornerpoints \\\n" ,"-command {Ng_STLDoctor; redraw}\n" ,"ttk::checkbutton $f.advstl.bu3 -text \"show touched triangle chart\" \\\n" ,"-variable stldoctor.showtouchedtrigchart \\\n" ,"-command {set stldoctor.showfaces 0; set stloptions.showmarktrias 1; \\\n" ,"Ng_STLDoctor; Ng_SetVisParameters; redraw}\n" ,"ttk::checkbutton $f.advstl.bu4 -text \"draw meshed edges\" \\\n" ,"-variable stldoctor.drawmeshededges \\\n" ,"-command {Ng_STLDoctor;}\n" ,"ttk::checkbutton $f.advstl.bu5 -text \"select with mouse\" \\\n" ,"-variable stldoctor.selectwithmouse\n" ,"grid $f.advstl.bu1 -stick nw\n" ,"grid $f.advstl.bu2 -sticky nw\n" ,"grid $f.advstl.bu3 -stick nw\n" ,"grid $f.advstl.bu4 -stick nw\n" ,"grid $f.advstl.bu5 -stick nw\n" ,"grid anchor $f.advstl center\n" ,"ttk::frame $f.advstl.tbn\n" ,"ttk::label $f.advstl.tbn.lab -text \"Select triangle by number\";\n" ,"ttk::entry $f.advstl.tbn.ent -width 5 \\\n" ,"-textvariable stldoctor.selecttrig\n" ,"pack $f.advstl.tbn.lab $f.advstl.tbn.ent -padx 4 -side left\n" ,"grid $f.advstl.tbn -sticky nw\n" ,"grid anchor $f.advstl center\n" ,"grid rowconfigure $f.advstl 4 -pad 8\n" ,"ttk::labelframe $f.vc -relief groove -borderwidth 3 -text \"Vicinity options\"\n" ,"pack $f.vc -fill x -pady 15\n" ,"ttk::checkbutton $f.vc.bu -text \"show vicinity\" \\\n" ,"-variable stldoctor.showvicinity \\\n" ,"-command {Ng_STLDoctor vicinity; redraw}\n" ,"ttk::label $f.vc.lab -text \"vicinity size\";\n" ,"ttk::scale $f.vc.scale -orient horizontal -length 150 -from 0 -to 200 \\\n" ,"-variable stldoctor.vicinity \\\n" ,"-takefocus 0 \\\n" ,"-command \"roundscale $f.vc.scale 0; Ng_STLDoctor vicinity; redraw\"\n" ,"ttk::entry $f.vc.ent -width 4 -textvariable stldoctor.vicinity -validate focus \\\n" ,"-takefocus 0 -validatecommand \"Ng_STLDoctor vicinity; redraw;my_validate %W [$f.vc.scale cget -from] [$f.vc.scale cget -to] %P 0\" \\\n" ,"-invalidcommand \"my_invalid %W;Ng_STLDoctor vicinity; redraw\"\n" ,"grid $f.vc.bu -stick nw -columnspan 3 -column 0\n" ,"grid $f.vc.scale $f.vc.ent $f.vc.lab -sticky nw -padx 4\n" ,"grid anchor $f.vc center\n" ,"set f $w.nb.occ\n" ,"ttk::labelframe $f.occframe -text \"IGES/STEP options\" -relief groove -borderwidth 3\n" ,"pack $f.occframe -fill x -pady 15 -ipady 8\n" ,"ttk::checkbutton $f.occframe.occshowsurfaces -text \"Show surfaces \" \\\n" ,"-variable occoptions.showsurfaces \\\n" ,"-command { Ng_SetOCCVisParameters; redraw }\n" ,"ttk::checkbutton $f.occframe.occshowedges -text \"Show edges \" \\\n" ,"-variable occoptions.showedges \\\n" ,"-command { Ng_SetOCCVisParameters; redraw }\n" ,"grid $f.occframe.occshowsurfaces $f.occframe.occshowedges -sticky nw -padx 4\n" ,"grid anchor $f.occframe center\n" ,"ttk::button $f.occframe.btn -text \"Rebuild visualization data\" \\\n" ,"-command {\n" ,"Ng_SetOCCVisParameters\n" ,"Ng_OCCCommand buildvisualizationmesh\n" ,"redraw\n" ,"}\n" ,"ttk::frame $f.occframe.vssm\n" ,"ttk::label $f.occframe.vssm.lab -text \"Visulization smoothness\"\n" ,"ttk::spinbox $f.occframe.vssm.sp -textvariable occoptions.deflection \\\n" ,"-from 0.1 -to 3 -increment 0.1 -width 4 -command { catch Ng_SetOCCVisParameters } \\\n" ,"-validate focus -validatecommand \"my_validatespinbox %W %P 0\" \\\n" ,"-invalidcommand \"my_invalidspinbox %W\"\n" ,"pack $f.occframe.vssm.lab $f.occframe.vssm.sp -side left -padx 4\n" ,"grid $f.occframe.vssm -sticky nw -columnspan 2 -column 0 -pady 8\n" ,"grid $f.occframe.btn -columnspan 2 -column 0 -sticky n\n" ,"ttk::labelframe $f.occframe1 -relief groove -borderwidth 3 -text \"ACIS visulization / construction\"\n" ,"pack $f.occframe1 -fill x -pady 15 -ipady 8\n" ,"ttk::label $f.occframe1.lab1 -text \"Show solid (0 for all)\"\n" ,"ttk::spinbox $f.occframe1.sp1 -textvariable occoptions.showsolidnr \\\n" ,"-from 0 -to 999 -increment 1 -width 4 -command { catch Ng_SetOCCVisParameters;redraw } \\\n" ,"-validate focus -validatecommand \"my_validatespinbox %W %P 0\" \\\n" ,"-invalidcommand \"my_invalidspinbox %W\"\n" ,"ttk::label $f.occframe1.lab2 -text \"Show solid 2\"\n" ,"ttk::spinbox $f.occframe1.sp2 -textvariable occoptions.showsolidnr2 \\\n" ,"-from 0 -to 999 -increment 1 -width 4 -command { catch Ng_SetOCCVisParameters;redraw } \\\n" ,"-validate focus -validatecommand \"my_validatespinbox %W %P 0\" \\\n" ,"-invalidcommand \"my_invalidspinbox %W\"\n" ,"ttk::button $f.occframe1.subtract -text \"Subtract (2 minus 1)\" \\\n" ,"-command {\n" ,"Ng_ACISCommand subtract ${occoptions.showsolidnr} ${occoptions.showsolidnr2}\n" ,"redraw\n" ,"}\n" ,"ttk::button $f.occframe1.combine -text \"Combine all\" \\\n" ,"-command {\n" ,"Ng_ACISCommand combineall\n" ,"redraw\n" ,"}\n" ,"grid $f.occframe1.lab1 -row 0 -column 0 -sticky ne\n" ,"grid $f.occframe1.sp1 -row 0 -column 1 -sticky nw\n" ,"grid $f.occframe1.lab2 -row 1 -column 0 -sticky ne\n" ,"grid $f.occframe1.sp2 -row 1 -column 1 -sticky nw\n" ,"grid $f.occframe1.combine -columnspan 2 -column 0 -sticky n\n" ,"grid anchor $f.occframe1 center\n" ,"set f $w.nb.mesh\n" ,"ttk::labelframe $f.center -relief groove -borderwidth 3 -text \"how shall i name you?\"\n" ,"pack $f.center -fill x -pady 15\n" ,"ttk::button $f.center.lab1 -text \"Set Center Point\" \\\n" ,"-command { Ng_SetVisParameters; Ng_Center; redraw }\n" ,"ttk::entry $f.center.ent1 -width 5 \\\n" ,"-textvariable viewoptions.centerpoint -validate focus \\\n" ,"-validatecommand \"my_validate %W 0 1e9 %P 0\" \\\n" ,"-invalidcommand \"my_invalid %W\"\n" ,"grid $f.center.ent1 $f.center.lab1 -padx 4 -pady 4 -sticky nw\n" ,"ttk::button $f.center.lab2 -text \"Draw Element\" \\\n" ,"-command { Ng_SetVisParameters; Ng_ZoomAll; redraw }\n" ,"ttk::entry $f.center.ent2 -width 5 \\\n" ,"-textvariable viewoptions.drawelement -validate focus \\\n" ,"-validatecommand \"my_validate %W 0 1e9 %P 0\" \\\n" ,"-invalidcommand \"my_invalid %W\"\n" ,"grid $f.center.ent2 $f.center.lab2 -padx 4 -pady 4 -sticky nw\n" ,"grid anchor $f.center center\n" ,"ttk::labelframe $f.meshframe -text \"Mesh visualization options\" -relief groove -borderwidth 3\n" ,"pack $f.meshframe -fill x -pady 15\n" ,"set f $f.meshframe\n" ,"ttk::checkbutton $f.showcolor -text \"Meshsize Visualization\" \\\n" ,"-variable viewoptions.colormeshsize \\\n" ,"-command { Ng_SetVisParameters;redraw; }\n" ,"ttk::checkbutton $f.showfilledtrigs -text \"Show filled triangles\" \\\n" ,"-variable viewoptions.drawfilledtrigs \\\n" ,"-command { Ng_SetVisParameters; redraw }\n" ,"ttk::checkbutton $f.showedges -text \"Show edges\" \\\n" ,"-variable viewoptions.drawedges \\\n" ,"-command { Ng_SetVisParameters; redraw }\n" ,"ttk::checkbutton $f.showoutline -text \"Show Triangle Outline\" \\\n" ,"-variable viewoptions.drawoutline \\\n" ,"-command { Ng_SetVisParameters; redraw }\n" ,"ttk::checkbutton $f.showbadels -text \"Show bad elements\" \\\n" ,"-variable viewoptions.drawbadels \\\n" ,"-command { Ng_SetVisParameters; redraw }\n" ,"ttk::checkbutton $f.showprisms -text \"Show prisms\" \\\n" ,"-variable viewoptions.drawprisms \\\n" ,"-command { Ng_SetVisParameters; redraw }\n" ,"ttk::checkbutton $f.showpyramids -text \"Show pyramids\" \\\n" ,"-variable viewoptions.drawpyramids \\\n" ,"-command { Ng_SetVisParameters; redraw }\n" ,"ttk::checkbutton $f.showhexes -text \"Show hexes\" \\\n" ,"-variable viewoptions.drawhexes \\\n" ,"-command { Ng_SetVisParameters; redraw }\n" ,"ttk::checkbutton $f.showidentified -text \"Show identified points\" \\\n" ,"-variable viewoptions.drawidentified \\\n" ,"-command { Ng_SetVisParameters; redraw }\n" ,"ttk::checkbutton $f.showmetispartition -text \"Show METIS Partition\" \\\n" ,"-variable viewoptions.drawmetispartition \\\n" ,"-command { Ng_SetVisParameters; redraw }\n" ,"ttk::checkbutton $f.showpointnumbers -text \"Show Point-numbers\" \\\n" ,"-variable viewoptions.drawpointnumbers \\\n" ,"-command { Ng_SetVisParameters; redraw }\n" ,"ttk::checkbutton $f.showedgenumbers -text \"Show Edge-numbers\" \\\n" ,"-variable viewoptions.drawedgenumbers \\\n" ,"-command { Ng_SetVisParameters; redraw }\n" ,"ttk::checkbutton $f.showfacenumbers -text \"Show Face-numbers\" \\\n" ,"-variable viewoptions.drawfacenumbers \\\n" ,"-command { Ng_SetVisParameters; redraw }\n" ,"ttk::checkbutton $f.showelementnumbers -text \"Show Element-numbers\" \\\n" ,"-variable viewoptions.drawelementnumbers \\\n" ,"-command { Ng_SetVisParameters; redraw }\n" ,"ttk::frame $f.frametets\n" ,"ttk::checkbutton $f.frametets.showtets -text \"\" \\\n" ,"-variable viewoptions.drawtets \\\n" ,"-command { Ng_SetVisParameters; redraw }\n" ,"ttk::label $f.frametets.label -text \"\\Show Tets\\rin domain\"\n" ,"ttk::spinbox $f.frametets.showtetsdomain -from 0 -to 500 -increment 1 -width 3 \\\n" ,"-textvariable viewoptions.drawtetsdomain -validate focus \\\n" ,"-command \"Ng_SetVisParameters; redraw;\" \\\n" ,"-validatecommand \"my_validatespinbox %W %P 0\" \\\n" ,"-invalidcommand \"my_invalidspinbox %W\"\n" ,"ttk::label $f.frametets.label1 -text \"Subdivision\"\n" ,"ttk::spinbox $f.frametets.subdiv -from 0 -to 8 -increment 1 -width 3 \\\n" ,"-textvariable visoptions.subdivisions -validate focus \\\n" ,"-command { Ng_SetVisParameters; Ng_Vis_Set parameters; Ng_SetNextTimeStamp; redraw } \\\n" ,"-validatecommand \"my_validatespinbox %W %P 0\" \\\n" ,"-invalidcommand \"my_invalidspinbox %W\"\n" ,"ttk::label $f.frametets.label2 -text \"Show surface\\rof domain\"\n" ,"ttk::spinbox $f.frametets.showdomain -from 0 -to 50 -increment 1 -width 3 \\\n" ,"-textvariable viewoptions.drawdomainsurf -validate focus \\\n" ,"-command { Ng_SetVisParameters; Ng_Vis_Set parameters; redraw } \\\n" ,"-validatecommand \"my_validatespinbox %W %P 0\" \\\n" ,"-invalidcommand \"my_invalidspinbox %W\"\n" ,"grid $f.frametets.showtets $f.frametets.label $f.frametets.showtetsdomain -sticky w\n" ,"grid x $f.frametets.label2 $f.frametets.showdomain -stick w\n" ,"grid x $f.frametets.label1 $f.frametets.subdiv -sticky w\n" ,"grid $f.showfilledtrigs $f.showoutline -sticky nw\n" ,"grid $f.showedges $f.showbadels -sticky nw\n" ,"grid $f.showpointnumbers $f.showedgenumbers -sticky nw\n" ,"grid $f.showfacenumbers $f.showelementnumbers -sticky nw\n" ,"grid $f.showmetispartition $f.showidentified -sticky nw\n" ,"grid $f.showcolor $f.showpyramids -sticky nw\n" ,"grid $f.showprisms $f.showhexes -sticky nw\n" ,"grid $f.frametets -sticky n -columnspan 2 -column 0 -pady 8\n" ,"grid anchor $f center\n" ,"set f $w.nb.mesh\n" ,"ttk::labelframe $f.fshrink -text \"Element visualization\" -relief groove -borderwidth 3\n" ,"ttk::label $f.fshrink.lab -text \"Shrink elements\"\n" ,"ttk::scale $f.fshrink.scale -orient horizontal -length 200 -from 0 -to 1.0001 \\\n" ,"-command \"roundscale $f.fshrink.scale 2;Ng_SetVisParameters; after idle redraw\" \\\n" ,"-variable viewoptions.shrink\n" ,"ttk::entry $f.fshrink.entry -textvariable viewoptions.shrink -width 4 -validate focus \\\n" ,"-takefocus 0 -validatecommand \"Ng_SetVisParameters; after idle redraw;my_validate %W [$f.fshrink.scale cget -from] [$f.fshrink.scale cget -to] %P 2\" \\\n" ,"-invalidcommand \"my_invalid %W;Ng_SetVisParameters; after idle redraw;\"\n" ,"pack $f.fshrink -fill x -ipady 8\n" ,"grid $f.fshrink.scale $f.fshrink.entry $f.fshrink.lab -padx 4\n" ,"grid anchor $f.fshrink center\n" ,"set f $w.nb.light\n" ,"ttk::labelframe $f.main -text \"Lighting options\" -relief groove -borderwidth 3\n" ,"pack $f.main -fill x -pady 15\n" ,"set f $f.main\n" ,"ttk::label $f.lab1 -text \"Ambient Light\"\n" ,"ttk::scale $f.scale1 -orient horizontal -length 200 -from 0 -to 1 \\\n" ,"-command \"roundscale $f.scale1 2; Ng_SetVisParameters; redraw\" \\\n" ,"-variable viewoptions.light.amb\n" ,"ttk::entry $f.ent1 -textvariable viewoptions.light.amb -validate focus -width 4 \\\n" ,"-validatecommand \" Ng_SetVisParameters; redraw;my_validate %W [$f.scale1 cget -from] [$f.scale1 cget -to] %P 2\" \\\n" ,"-invalidcommand \"my_invalid %W;Ng_SetVisParameters; redraw;\"\n" ,"ttk::label $f.lab2 -text \"Diffuse Light\"\n" ,"ttk::scale $f.scale2 -orient horizontal -length 200 -from 0 -to 1 \\\n" ,"-command \"roundscale $f.scale2 2; Ng_SetVisParameters; redraw \" \\\n" ,"-variable viewoptions.light.diff\n" ,"ttk::entry $f.ent2 -textvariable viewoptions.light.diff -validate focus -width 4 \\\n" ,"-validatecommand \" Ng_SetVisParameters; redraw;my_validate %W [$f.scale2 cget -from] [$f.scale2 cget -to] %P 2\" \\\n" ,"-invalidcommand \"my_invalid %W;Ng_SetVisParameters; redraw;\"\n" ,"ttk::label $f.lab3 -text \"Specular Light\"\n" ,"ttk::scale $f.scale3 -orient horizontal -length 200 -from 0 -to 1 \\\n" ,"-command \"roundscale $f.scale3 2; Ng_SetVisParameters; redraw \" \\\n" ,"-variable viewoptions.light.spec\n" ,"ttk::entry $f.ent3 -textvariable viewoptions.light.spec -validate focus -width 4 \\\n" ,"-validatecommand \" Ng_SetVisParameters; redraw;my_validate %W [$f.scale3 cget -from] [$f.scale3 cget -to] %P 2\" \\\n" ,"-invalidcommand \"my_invalid %W;Ng_SetVisParameters; redraw;\"\n" ,"grid $f.scale1 $f.ent1 $f.lab1 -sticky nw -padx 4 -pady 8\n" ,"grid $f.scale2 $f.ent2 $f.lab2 -sticky nw -padx 4 -pady 8\n" ,"grid $f.scale3 $f.ent3 $f.lab3 -sticky nw -padx 4 -pady 8\n" ,"grid anchor $f center\n" ,"set f $w.nb.light\n" ,"ttk::labelframe $f.main1 -text \"Material options\" -relief groove -borderwidth 3\n" ,"pack $f.main1 -fill x -pady 15\n" ,"set f $f.main1\n" ,"ttk::label $f.lab4 -text \"Material Shininess\"\n" ,"ttk::scale $f.scale4 -orient horizontal -length 200 -from 0 -to 128 \\\n" ,"-command \"roundscale $f.scale4 0; Ng_SetVisParameters; redraw \" \\\n" ,"-variable viewoptions.mat.shininess\n" ,"ttk::entry $f.ent4 -textvariable viewoptions.mat.shininess -validate focus -width 4 \\\n" ,"-validatecommand \" Ng_SetVisParameters; redraw;my_validate %W [$f.scale4 cget -from] [$f.scale4 cget -to] %P 0\" \\\n" ,"-invalidcommand \"my_invalid %W;Ng_SetVisParameters; redraw;\"\n" ,"ttk::label $f.lab5 -text \"Material Transparency\"\n" ,"ttk::scale $f.scale5 -orient horizontal -length 200 -from 0 -to 1 \\\n" ,"-command \"roundscale $f.scale5 2; Ng_SetVisParameters; redraw \" \\\n" ,"-variable viewoptions.mat.transp\n" ,"ttk::entry $f.ent5 -textvariable viewoptions.mat.transp -validate focus -width 4 \\\n" ,"-validatecommand \" Ng_SetVisParameters; redraw;my_validate %W [$f.scale5 cget -from] [$f.scale5 cget -to] %P 2\" \\\n" ,"-invalidcommand \"my_invalid %W;Ng_SetVisParameters; redraw;\"\n" ,"grid $f.scale4 $f.ent4 $f.lab4 -sticky nw -padx 4 -pady 8\n" ,"grid $f.scale5 $f.ent5 $f.lab5 -sticky nw -padx 4 -pady 8\n" ,"grid anchor $f center\n" ,"set f $w.nb.edges\n" ,"ttk::labelframe $f.main -text \"Edge viewing options\" -relief groove -borderwidth 3\n" ,"pack $f.main -fill x -pady 15\n" ,"set f $f.main\n" ,"ttk::frame $f.helper\n" ,"pack $f.helper -anchor center\n" ,"set f $f.helper\n" ,"ttk::checkbutton $f.showedges -text \"Show Edges\" \\\n" ,"-variable viewoptions.drawededges \\\n" ,"-command { Ng_SetVisParameters; redraw }\n" ,"ttk::checkbutton $f.showpoints -text \"Show Points\" \\\n" ,"-variable viewoptions.drawedpoints \\\n" ,"-command { Ng_SetVisParameters; redraw }\n" ,"ttk::checkbutton $f.showpointnrs -text \"Show Points Nrs\" \\\n" ,"-variable viewoptions.drawedpointnrs \\\n" ,"-command { Ng_SetVisParameters; redraw }\n" ,"ttk::checkbutton $f.showtang -text \"Show CP Tangents\" \\\n" ,"-variable viewoptions.drawedtangents \\\n" ,"-command { Ng_SetVisParameters; redraw }\n" ,"ttk::checkbutton $f.drawedgenrs -text \"Show Edge Nrs\" \\\n" ,"-variable viewoptions.drawededgenrs \\\n" ,"-command { Ng_SetVisParameters; redraw }\n" ,"pack $f.showedges $f.showpoints $f.showpointnrs $f.showtang $f.drawedgenrs -anchor w\n" ,"set f $w.nb.edges\n" ,"ttk::labelframe $f.main1 -text \"Center point\" -relief groove -borderwidth 3\n" ,"pack $f.main1 -fill x -pady 15\n" ,"set f $f.main1\n" ,"ttk::frame $f.center\n" ,"pack $f.center -anchor center\n" ,"ttk::button $f.center.btn -text \"Set Center Point\" \\\n" ,"-command { Ng_SetVisParameters; Ng_Center; redraw }\n" ,"ttk::entry $f.center.ent -width 5 -textvariable viewoptions.centerpoint -validate focus \\\n" ,"-validatecommand \"my_validate %W 0 1e9 %P 0\" \\\n" ,"-invalidcommand \"my_invalid %W\"\n" ,"grid $f.center.ent $f.center.btn -sticky nw -padx 4\n" ,"ttk::label $f.center.lab1 -text \"SpecPoint Veclen\"\n" ,"ttk::entry $f.center.ent1 -width 5 -textvariable viewoptions.specpointvlen -validate focus \\\n" ,"-validatecommand \"my_validate %W 0 1e9 %P 1\" \\\n" ,"-invalidcommand \"my_invalid %W\"\n" ,"grid $f.center.ent1 $f.center.lab1 -sticky nw -padx 4\n" ,"set f $w.nb.misc\n" ,"ttk::labelframe $f.point -relief groove -borderwidth 3 -text \"Special point\"\n" ,"ttk::frame $f.point.dp\n" ,"ttk::checkbutton $f.point.dp.drawpoint -text \"Draw Point\" \\\n" ,"-variable viewoptions.drawspecpoint \\\n" ,"-command { Ng_SetVisParameters; redraw }\n" ,"ttk::entry $f.point.dp.px -width 8 -textvariable viewoptions.specpointx -validate focus \\\n" ,"-validatecommand \"my_validate %W -1e9 1e9 %P 10\" \\\n" ,"-invalidcommand \"my_invalid %W\"\n" ,"ttk::entry $f.point.dp.py -width 8 -textvariable viewoptions.specpointy -validate focus \\\n" ,"-validatecommand \"my_validate %W -1e9 1e9 %P 10\" \\\n" ,"-invalidcommand \"my_invalid %W\"\n" ,"ttk::entry $f.point.dp.pz -width 8 -textvariable viewoptions.specpointz -validate focus \\\n" ,"-validatecommand \"my_validate %W -1e9 1e9 %P 10\" \\\n" ,"-invalidcommand \"my_invalid %W\"\n" ,"grid $f.point.dp.drawpoint $f.point.dp.px $f.point.dp.py $f.point.dp.pz -sticky nw -padx 4;\n" ,"ttk::checkbutton $f.point.dp.center -text \"Use as Center\" \\\n" ,"-variable viewoptions.usecentercoords \\\n" ,"-command {\n" ,"if { ${viewoptions.usecentercoords} } {\n" ,"set viewoptions.centerx ${viewoptions.specpointx}\n" ,"set viewoptions.centery ${viewoptions.specpointy}\n" ,"set viewoptions.centerz ${viewoptions.specpointz}\n" ,"Ng_SetVisParameters; Ng_Center\n" ,"redraw\n" ,"} {\n" ,"Ng_SetVisParameters\n" ,"}\n" ,"}\n" ,"grid $f.point.dp.center -sticky nw -padx 4\n" ,"pack $f.point.dp\n" ,"pack $f.point -fill x -ipady 3 -pady 15\n" ,"ttk::frame $w.bu\n" ,"pack $w.bu -fill x -ipady 3\n" ,"ttk::button $w.bu.done -text \"Done\" -command {\n" ,"Ng_SetVisParameters;\n" ,"redraw\n" ,"destroy .viewopts_dlg\n" ,"}\n" ,"ttk::button $w.bu.apply -text \"Apply\" -command {\n" ,"Ng_SetVisParameters;\n" ,"redraw\n" ,"}\n" ,"pack $w.bu.apply $w.bu.done -expand yes -side left\n" ,"wm withdraw $w\n" ,"wm geom $w +100+100\n" ,"wm deiconify $w\n" ,"wm title $w \"Viewing options\"\n" ,"focus $w\n" ,"}\n" ,"}\n" ,"proc clipplanecommand { { optionalvar 0 } } {\n" ,"Ng_SetVisParameters\n" ,"after idle redraw\n" ,"}\n" ,"set clippingdialog_pop1 0\n" ,"set clippingdialog_pop2 0\n" ,"set clippingdialog_pop3 0\n" ,"set clippingdialog_pop4 0\n" ,"proc clippingdialog { } {\n" ,"global clippingdialog_pop1\n" ,"global clippingdialog_pop2\n" ,"global clippingdialog_pop3\n" ,"global clippingdialog_pop4\n" ,"set clippingdialog_pop1 1\n" ,"set clippingdialog_pop2 1\n" ,"set clippingdialog_pop3 1\n" ,"set clippingdialog_pop4 1\n" ,"set w .clipping_dlg\n" ,"if {[winfo exists .clipping_dlg] == 1} {\n" ,"wm withdraw $w\n" ,"wm deiconify $w\n" ,"focus $w\n" ,"} {\n" ,"toplevel $w\n" ,"ttk::frame $w.background\n" ,"pack $w.background -fill x -fill y\n" ,"set w $w.background\n" ,"ttk::labelframe $w.main -text \"Visual clipping\" -relief groove -borderwidth 3\n" ,"pack $w.main -fill x -pady 15\n" ,"set w $w.main\n" ,"ttk::label $w.lab1 -text \"Normal x\"\n" ,"ttk::scale $w.scale1 -orient horizontal -length 300 -from -1 -to 1 \\\n" ,"-variable viewoptions.clipping.nx \\\n" ,"-command \"roundscale $w.scale1 2; clipplanecommand \"\n" ,"ttk::entry $w.entry1 -width 5 -textvariable viewoptions.clipping.nx \\\n" ,"-validate focus -validatecommand \" clipplanecommand;my_validate %W [$w.scale1 cget -from] [$w.scale1 cget -to] %P 2\" \\\n" ,"-invalidcommand \"my_invalid %W; clipplanecommand\"\n" ,"ttk::label $w.lab2 -text \"Normal y\"\n" ,"ttk::scale $w.scale2 -orient horizontal -length 300 -from -1 -to 1 \\\n" ,"-variable viewoptions.clipping.ny \\\n" ,"-command \"roundscale $w.scale2 2; clipplanecommand \"\n" ,"ttk::entry $w.entry2 -width 5 -textvariable viewoptions.clipping.ny \\\n" ,"-validate focus -validatecommand \" clipplanecommand;my_validate %W [$w.scale2 cget -from] [$w.scale2 cget -to] %P 2\" \\\n" ,"-invalidcommand \"my_invalid $w.entry2;clipplanecommand\"\n" ,"ttk::label $w.lab3 -text \"Normal z\"\n" ,"ttk::scale $w.scale3 -orient horizontal -length 300 -from -1 -to 1 \\\n" ,"-variable viewoptions.clipping.nz \\\n" ,"-command \"roundscale $w.scale3 2; clipplanecommand \"\n" ,"ttk::entry $w.entry3 -width 5 -textvariable viewoptions.clipping.nz \\\n" ,"-validate focus -validatecommand \" clipplanecommand;my_validate %W [$w.scale3 cget -from] [$w.scale3 cget -to] %P 2\" \\\n" ,"-invalidcommand \"my_invalid %W;clipplanecommand\"\n" ,"ttk::label $w.lab4 -text \"Distance\"\n" ,"ttk::scale $w.scale4 -orient horizontal -length 300 -from -1 -to 1.001 \\\n" ,"-variable viewoptions.clipping.dist \\\n" ,"-command \"roundscale $w.scale4 3; clipplanecommand \"\n" ,"ttk::entry $w.entry4 -width 5 -textvariable viewoptions.clipping.dist \\\n" ,"-validate focus -validatecommand \" clipplanecommand;my_validate %W [$w.scale4 cget -from] [$w.scale4 cget -to] %P 3\" \\\n" ,"-invalidcommand \"my_invalid %W;clipplanecommand\"\n" ,"proc my_Press {w x y} {\n" ,"set inc [expr {([$w get $x $y] <= [$w get]) ? -1 : 1}]\n" ,"ttk::Repeatedly ttk::scale::Increment $w [expr 0.001*$inc]\n" ,"}\n" ,"bind $w.scale4 { if { [string match *slider [%W identify %x %y]] == 0 } { my_Press %W %x %y;break } }\n" ,"bind $w.scale4 {ttk::scale::Release %W %x %y}\n" ,"ttk::label $w.lab5 -text \"Additional\\rDistance\"\n" ,"ttk::scale $w.scale5 -orient horizontal -length 300 -from -1 -to 1.001 \\\n" ,"-variable viewoptions.clipping.dist2 \\\n" ,"-command \"roundscale $w.scale5 3; clipplanecommand \"\n" ,"ttk::entry $w.entry5 -width 5 -textvariable viewoptions.clipping.dist2 \\\n" ,"-validate focus -validatecommand \" clipplanecommand;my_validate %W [$w.scale5 cget -from] [$w.scale5 cget -to] %P 3\" \\\n" ,"-invalidcommand \"my_invalid %W;clipplanecommand\"\n" ,"bind $w.scale5 { if { [string match *slider [%W identify %x %y]] == 0 } { my_Press %W %x %y;break } }\n" ,"bind $w.scale5 {ttk::scale::Release %W %x %y}\n" ,"ttk::label $w.clipdomainlabel -text \"Clip only domain\"\n" ,"ttk::spinbox $w.clipdomainspinb -from 0 -to 500 -increment 1 -width 3 \\\n" ,"-textvariable viewoptions.clipping.onlydomain -validate focus \\\n" ,"-command {clipplanecommand;} \\\n" ,"-validatecommand \"my_validatespinbox %W %P 0\" \\\n" ,"-invalidcommand \"my_invalidspinbox %W\"\n" ,"ttk::label $w.donotclipdomainlabel -text \"Do not clip domain\"\n" ,"ttk::spinbox $w.donotclipdomainspinb -from 0 -to 500 -increment 1 -width 3 \\\n" ,"-textvariable viewoptions.clipping.notdomain -validate focus \\\n" ,"-command \"clipplanecommand\" \\\n" ,"-validatecommand \"my_validatespinbox %W %P 0\" \\\n" ,"-invalidcommand \"my_invalidspinbox %W\"\n" ,"grid $w.scale1 $w.entry1 $w.lab1 -sticky nw -padx 4 -pady 14\n" ,"grid $w.scale2 $w.entry2 $w.lab2 -sticky nw -padx 4 -pady 14\n" ,"grid $w.scale3 $w.entry3 $w.lab3 -sticky nw -padx 4 -pady 14\n" ,"grid $w.scale4 $w.entry4 $w.lab4 -sticky nw -padx 4 -pady 14\n" ,"grid $w.scale5 $w.entry5 $w.lab5 -sticky w -padx 4 -pady 14\n" ,"grid $w.clipdomainlabel -sticky ne -padx 4 -pady 14\n" ,"grid $w.clipdomainspinb -sticky nw -padx 4 -pady 14 -column 1 -row 5\n" ,"grid $w.donotclipdomainlabel -sticky ne -padx 4 -pady 14\n" ,"grid $w.donotclipdomainspinb -sticky nw -padx 4 -pady 14 -column 1 -row 6\n" ,"grid anchor $w center\n" ,"set w .clipping_dlg.background.main\n" ,"ttk::checkbutton $w.cb1 -text \"Enable clipping\" \\\n" ,"-variable viewoptions.clipping.enable \\\n" ,"-command { Ng_SetVisParameters; redraw }\n" ,"grid $w.cb1 -columnspan 2 -sticky ne\n" ,"ttk::frame $w.bu\n" ,"grid $w.bu;\n" ,"ttk::button $w.cancle -text \"Done\" -command \"destroy .clipping_dlg\"\n" ,"grid $w.cancle -columnspan 3 -pady 16\n" ,"set w .clipping_dlg\n" ,"wm withdraw $w\n" ,"wm geom $w +100+100\n" ,"wm deiconify $w\n" ,"wm title $w \"Clipping Plane\"\n" ,"focus $w\n" ,"clipplanecommand\n" ,"}\n" ,"}\n" ,"proc refinementdialog { } {\n" ,"set w .refinement_dlg\n" ,"if {[winfo exists .refinement_dlg] == 1} {\n" ,"wm withdraw $w\n" ,"wm deiconify $w\n" ,"focus $w\n" ,"} {\n" ,"toplevel $w\n" ,"global localh\n" ,"set localh 1\n" ,"ttk::frame $w.meshsize\n" ,"ttk::label $w.meshsize.l1 -text \"max mesh-size: \"\n" ,"ttk::spinbox $w.meshsize.sp1 -from 1e-6 -to 1e6 -textvariable options.meshsize -validate focus -validatecommand \"my_validatespinbox %W %P 4\" \\\n" ,"-invalidcommand \"my_invalidspinbox %W\" -width 6 -increment 0.1\n" ,"ttk::frame $w.meshsizeloc\n" ,"ttk::label $w.meshsizeloc.l1 -text \"local mesh-size: \"\n" ,"ttk::spinbox $w.meshsizeloc.sp1 -from 1e-6 -to 1e6 -textvariable localh -validate focus -validatecommand \"my_validatespinbox %W %P 4\" \\\n" ,"-invalidcommand \"my_invalidspinbox %W\" -width 6 -increment 0.1\n" ,"pack $w.meshsize\n" ,"pack $w.meshsizeloc\n" ,"grid $w.meshsize.l1 $w.meshsize.sp1\n" ,"grid $w.meshsizeloc.l1 $w.meshsizeloc.sp1\n" ,"ttk::button $w.restface -text \"Restrict H at face\" \\\n" ,"-command {\n" ,".refinement_dlg.meshsize invoke\n" ,".refinement_dlg.loch invoke\n" ,"Ng_RestrictH face $localh\n" ,"}\n" ,"ttk::button $w.restedge -text \"Restrict H at edge\" \\\n" ,"-command {\n" ,".refinement_dlg.meshsize invoke\n" ,".refinement_dlg.loch invoke\n" ,"Ng_RestrictH edge $localh\n" ,"}\n" ,"ttk::button $w.restelement -text \"Restrict H at element\" \\\n" ,"-command {\n" ,".refinement_dlg.meshsize invoke\n" ,".refinement_dlg.loch invoke\n" ,"Ng_RestrictH element $localh\n" ,"}\n" ,"ttk::button $w.restpoint -text \"Restrict H at point\" \\\n" ,"-command {\n" ,".refinement_dlg.meshsize invoke\n" ,".refinement_dlg.loch invoke\n" ,"Ng_RestrictH point $localh\n" ,"}\n" ,"pack $w.restface $w.restedge $w.restelement $w.restpoint\n" ,"ttk::button $w.anisoedge -text \"Declare Anisotropic edge\" \\\n" ,"-command {\n" ,"Ng_Anisotropy edge\n" ,"}\n" ,"pack $w.anisoedge\n" ,"frame $w.bu\n" ,"pack $w.bu -fill x -ipady 3\n" ,"ttk::button $w.bu.cancle -text \"Done\" -command \"destroy .refinement_dlg\"\n" ,"ttk::button $w.bu.refine -text \"Refine\" \\\n" ,"-command {\n" ,"set oldnp 0; set newnp $status_np;\n" ,"while { $oldnp < $newnp } {\n" ,"set level [expr $level+1]\n" ,"Ng_Bisect;\n" ,"Ng_HighOrder ${options.elementorder}\n" ,"Ng_ReadStatus;\n" ,"redraw;\n" ,"set oldnp $newnp\n" ,"set newnp $status_np\n" ,"puts \"oldnp $oldnp newnp $newnp\"\n" ,"}\n" ,"}\n" ,"ttk::button $w.bu.zrefine -text \"Z-Refine\" \\\n" ,"-command { Ng_ZRefinement; Ng_ReadStatus; redraw; }\n" ,"pack $w.bu.zrefine $w.bu.refine $w.bu.cancle -expand yes -side left\n" ,"wm withdraw $w\n" ,"wm geom $w +100+100\n" ,"wm deiconify $w\n" ,"wm title $w \"Select Refinement\"\n" ,"focus $w\n" ,"}\n" ,"}\n" ,"proc bcpropdialog { } {\n" ,"set w .bcprop_dlg\n" ,"if {[winfo exists .bcprop_dlg] == 1} {\n" ,"wm withdraw $w\n" ,"wm deiconify $w\n" ,"} {\n" ,"toplevel $w\n" ,"ttk::frame $w.face -borderwidth 3\n" ,"pack $w.face -fill x\n" ,"ttk::label $w.face.lab -text \"face index:\"\n" ,"ttk::label $w.face.ent -text 1\n" ,"ttk::button $w.face.next -text \"next\" -command {\n" ,"set w .bcprop_dlg;\n" ,"set facenr [$w.face.ent cget -text]\n" ,"if {$facenr == [Ng_BCProp getnfd]} {\n" ,"set facenr 1\n" ,"} {\n" ,"set facenr [expr $facenr + 1]\n" ,"}\n" ,"$w.face.ent configure -text $facenr\n" ,"Ng_BCProp setactive $facenr\n" ,"set bcnr [Ng_BCProp getbc $facenr]\n" ,"$w.bc.ent delete 0 end\n" ,"$w.bc.ent insert 0 $bcnr\n" ,"redraw\n" ,"}\n" ,"ttk::button $w.face.prev -text \"prev\" -command {\n" ,"set w .bcprop_dlg;\n" ,"set facenr [$w.face.ent cget -text]\n" ,"if {$facenr == 1} {\n" ,"set facenr [Ng_BCProp getnfd]\n" ,"} {\n" ,"set facenr [expr $facenr - 1]\n" ,"}\n" ,"$w.face.ent configure -text $facenr\n" ,"Ng_BCProp setactive $facenr\n" ,"set bcnr [Ng_BCProp getbc $facenr]\n" ,"$w.bc.ent delete 0 end\n" ,"$w.bc.ent insert 0 $bcnr\n" ,"redraw\n" ,"}\n" ,"pack $w.face.lab $w.face.ent $w.face.prev $w.face.next -side left\n" ,"ttk::frame $w.bc -borderwidth 3\n" ,"pack $w.bc -fill x\n" ,"ttk::label $w.bc.lab -text \"bc property:\"\n" ,"entry $w.bc.ent -width 5 -relief sunken\n" ,"ttk::button $w.bc.but -text \"change\" -command {\n" ,"set w .bcprop_dlg;\n" ,"Ng_BCProp setbc [$w.face.ent cget -text] [$w.bc.ent get];\n" ,"}\n" ,"ttk::button $w.bc.but2 -text \"all\" -command {\n" ,"set w .bcprop_dlg;\n" ,"Ng_BCProp setall [$w.bc.ent get];\n" ,"}\n" ,"pack $w.bc.lab $w.bc.ent $w.bc.but $w.bc.but2 -side left -expand yes\n" ,"ttk::frame $w.bcname -borderwidth 3\n" ,"pack $w.bcname -fill x\n" ,"ttk::label $w.bcname.lab -text \"bc name:\"\n" ,"ttk::label $w.bcname.ent -text \"-\"\n" ,"pack $w.bcname.lab $w.bcname.ent -side left -expand yes\n" ,"ttk::frame $w.bu\n" ,"pack $w.bu -fill x -ipady 3\n" ,"ttk::button $w.bu.close -text \"Close\" -command { destroy .bcprop_dlg }\n" ,"pack $w.bu.close -expand yes -side left\n" ,"wm withdraw $w\n" ,"wm geom $w +100+100\n" ,"wm deiconify $w\n" ,"wm title $w \"Boundary Conditions\"\n" ,"}\n" ,"focus $w\n" ,"set facenr [Ng_BCProp getactive]\n" ,"$w.face.ent configure -text $facenr\n" ,"set bcnr [Ng_BCProp getbc $facenr]\n" ,"$w.bc.ent delete 0 end\n" ,"$w.bc.ent insert 0 $bcnr\n" ,"set bcname [Ng_BCProp getbcname $facenr]\n" ,"$w.bcname.ent configure -text $bcname\n" ,"}\n" ,"proc currmeshcoloursdialog { } {\n" ,"set w .currmeshcolours_dlg\n" ,"if {[winfo exists .currmeshcolours_dlg] == 1} {\n" ,"wm withdraw $w\n" ,"wm deiconify $w\n" ,"focus $w\n" ,"} {\n" ,"toplevel $w\n" ,"global facecolslist\n" ,"frame $w.facecols -borderwidth 3\n" ,"listbox $w.facecols.list -yscroll \"$w.facecols.scroll set\" -selectmode single -setgrid 1 -width 32 -height 12\n" ,"scrollbar $w.facecols.scroll -command \"$w.facecols.list yview\"\n" ,"pack $w.facecols.scroll -side right -fill y\n" ,"pack $w.facecols.list -side left -expand yes -fill both\n" ,"Ng_CurrentFaceColours getcolours facecolslist\n" ,"set i 1\n" ,"foreach el $facecolslist {\n" ,"set hel [format \"%d: (%.4f %.4f %.4f)\" $i [ lindex $el 0 ] [ lindex $el 1 ] [ lindex $el 2 ]]\n" ,"incr i\n" ,"$w.facecols.list insert end $hel }\n" ,"frame $w.bu1 -borderwidth 3\n" ,"ttk::button $w.bu1.showonly -text \"show only\" -command {\n" ,"Ng_CurrentFaceColours showonly [.currmeshcolours_dlg.facecols.list curselection]\n" ,"redraw\n" ,"}\n" ,"ttk::button $w.bu1.hideonly -text \"hide only\" -command {\n" ,"Ng_CurrentFaceColours hideonly [.currmeshcolours_dlg.facecols.list curselection]\n" ,"redraw\n" ,"}\n" ,"ttk::button $w.bu1.showalso -text \"show\" -command {\n" ,"Ng_CurrentFaceColours showalso [.currmeshcolours_dlg.facecols.list curselection]\n" ,"redraw\n" ,"}\n" ,"ttk::button $w.bu1.hidealso -text \"hide\" -command {\n" ,"Ng_CurrentFaceColours hidealso [.currmeshcolours_dlg.facecols.list curselection]\n" ,"redraw\n" ,"}\n" ,"pack $w.bu1.showonly $w.bu1.hideonly $w.bu1.showalso $w.bu1.hidealso -expand yes -fill x -padx 2 -pady 2 -side left\n" ,"frame $w.bu2\n" ,"ttk::button $w.bu2.showall -text \"show all\" -command {\n" ,"Ng_CurrentFaceColours showall\n" ,"redraw\n" ,"}\n" ,"ttk::button $w.bu2.hideall -text \"hide all\" -command {\n" ,"Ng_CurrentFaceColours hideall\n" ,"redraw\n" ,"}\n" ,"pack $w.bu2.showall $w.bu2.hideall -expand yes -fill x -padx 2 -pady 2 -side left\n" ,"frame $w.bu3\n" ,"ttk::button $w.bu3.close -text \"close\" -command {\n" ,"destroy .currmeshcolours_dlg\n" ,"}\n" ,"pack $w.bu3.close -expand yes -fill x -pady 3 -side right\n" ,"pack $w.facecols -side top -expand yes -fill x -fill y\n" ,"pack $w.bu3 -side bottom\n" ,"pack $w.bu2 -side bottom\n" ,"pack $w.bu1 -expand yes -fill x -side left\n" ,"wm withdraw $w\n" ,"wm geom $w +100+100\n" ,"wm deiconify $w\n" ,"wm title $w \"Inspect Mesh Colours\"\n" ,"focus $w\n" ,"}\n" ,"}\n" ,"proc surfacemeshsizedialog { } {\n" ,"set w .surfacemeshsize_dlg\n" ,"if {[winfo exists .surfacemeshsize_dlg] == 1} {\n" ,"wm withdraw $w\n" ,"wm deiconify $w\n" ,"} {\n" ,"toplevel $w\n" ,"frame $w.face -borderwidth 3\n" ,"pack $w.face -fill x -padx 5\n" ,"ttk::label $w.face.lab -text \"face index:\"\n" ,"ttk::label $w.face.ent -text 1 -padx 4\n" ,"ttk::button $w.face.next -text \"next\" -command {\n" ,"set w .surfacemeshsize_dlg;\n" ,"set facenr [$w.face.ent cget -text]\n" ,"if {$facenr == [Ng_SurfaceMeshSize getnfd]} {\n" ,"set facenr 1\n" ,"} {\n" ,"set facenr [expr $facenr + 1]\n" ,"}\n" ,"$w.face.ent configure -text $facenr\n" ,"Ng_SurfaceMeshSize setactive $facenr\n" ,"set surfms [Ng_SurfaceMeshSize getsurfms $facenr]\n" ,"$w.sms.ent delete 0 end\n" ,"$w.sms.ent insert 0 $surfms\n" ,"redraw\n" ,"}\n" ,"ttk::button $w.face.prev -text \"prev\" -command {\n" ,"set w .surfacemeshsize_dlg;\n" ,"set facenr [$w.face.ent cget -text]\n" ,"if {$facenr == 1} {\n" ,"set facenr [Ng_SurfaceMeshSize getnfd]\n" ,"} {\n" ,"set facenr [expr $facenr - 1]\n" ,"}\n" ,"$w.face.ent configure -text $facenr\n" ,"Ng_SurfaceMeshSize setactive $facenr\n" ,"set surfms [Ng_SurfaceMeshSize getsurfms $facenr]\n" ,"$w.sms.ent delete 0 end\n" ,"$w.sms.ent insert 0 $surfms\n" ,"redraw\n" ,"}\n" ,"pack $w.face.lab $w.face.ent $w.face.prev $w.face.next -side left\n" ,"frame $w.sms -borderwidth 3\n" ,"pack $w.sms -fill x\n" ,"ttk::label $w.sms.lab -text \"max mesh size:\"\n" ,"entry $w.sms.ent -width 8 -relief sunken\n" ,"ttk::button $w.sms.but -text \"change\" -command {\n" ,"set w .surfacemeshsize_dlg;\n" ,"Ng_SurfaceMeshSize setsurfms [$w.face.ent cget -text] [$w.sms.ent get];\n" ,"}\n" ,"ttk::button $w.sms.but2 -text \"all\" -command {\n" ,"set w .surfacemeshsize_dlg;\n" ,"Ng_SurfaceMeshSize setall [$w.sms.ent get];\n" ,"}\n" ,"pack $w.sms.lab $w.sms.ent $w.sms.but $w.sms.but2 -side left -padx 5 -expand yes\n" ,"frame $w.bu\n" ,"pack $w.bu -fill x -ipady 3\n" ,"ttk::button $w.bu.close -text \"Close\" -command { destroy .surfacemeshsize_dlg }\n" ,"pack $w.bu.close -expand yes -side left\n" ,"wm withdraw $w\n" ,"wm geom $w +100+100\n" ,"wm deiconify $w\n" ,"wm title $w \"Edit Surface Mesh Size\"\n" ,"}\n" ,"focus $w\n" ,"set facenr [Ng_SurfaceMeshSize getactive]\n" ,"$w.face.ent configure -text $facenr\n" ,"set surfms [Ng_SurfaceMeshSize getsurfms $facenr]\n" ,"$w.sms.ent delete 0 end\n" ,"$w.sms.ent insert 0 $surfms\n" ,"}\n" ,"proc METISdialog { } {\n" ,"set w .metis_dlg\n" ,"set w.parts 64\n" ,"if {[winfo exists .metis_dlg] == 1} {\n" ,"wm withdraw $w\n" ,"wm deiconify $w\n" ,"} {\n" ,"toplevel $w\n" ,"frame $w.a -borderwidth 0\n" ,"frame $w.b -borderwidth 0\n" ,"pack $w.a $w.b\n" ,"ttk::label $w.a.lab -text \"Number of partitions:\"\n" ,"entry $w.a.ent -textvariable w.parts -width 4 -relief sunken\n" ,"ttk::button $w.b.start -text \"Start METIS\" -command {\n" ,"Ng_Metis ${w.parts}\n" ,"redraw\n" ,"}\n" ,"ttk::button $w.b.cancel -text \"Cancel\" -command { destroy .metis_dlg }\n" ,"pack $w.a.lab $w.a.ent -side left -expand yes\n" ,"pack $w.b.start $w.b.cancel -side left\n" ,"wm withdraw $w\n" ,"wm geom $w +100+100\n" ,"wm deiconify $w\n" ,"wm title $w \"METIS Partitioning\"\n" ,"focus $w\n" ,"}\n" ,"}\n" ,"proc stloptionsdialog { } {\n" ,"set w .stlopts_dlg\n" ,"if {[winfo exists .stlopts_dlg] == 1} {\n" ,"wm withdraw $w\n" ,"wm deiconify $w\n" ,"focus $w\n" ,"} {\n" ,"toplevel $w\n" ,"pack [ttk::notebook $w.nb] -fill both -fill both -side top\n" ,"frame $w.bu\n" ,"pack $w.bu -fill x -ipady 3\n" ,"ttk::button $w.bu.apply -text \"Apply\" -command { redraw; Ng_GenerateMesh 1 2}\n" ,"ttk::button $w.bu.cancle -text \"Done\" -command { destroy .stlopts_dlg }\n" ,"pack $w.bu.cancle $w.bu.apply -side left -expand yes\n" ,"wm withdraw $w\n" ,"wm geom $w +100+100\n" ,"wm deiconify $w\n" ,"wm title $w \"STL Options\"\n" ,"focus $w\n" ,"}\n" ,"}\n" ,"proc stldoctordialog { } {\n" ,"Ng_STLDoctor 0 0\n" ,"set wd .stldoctor_dlg\n" ,"if {[winfo exists .stldoctor_dlg] == 1} {\n" ,"wm withdraw $wd\n" ,"wm deiconify $wd\n" ,"focus $wd\n" ,"} {\n" ,"toplevel $wd\n" ,"pack [ttk::notebook $wd.nb] -fill both -fill both -side top\n" ,"$wd.nb add [ttk::frame $wd.nb.general] -text \"General\" -underline 0\n" ,"$wd.nb add [ttk::frame $wd.nb.topology] -text \"Edit Topology\" -underline 5\n" ,"$wd.nb add [ttk::frame $wd.nb.edges] -text \"Edit Edges\" -underline 5\n" ,"$wd.nb add [ttk::frame $wd.nb.normals] -text \"Edit Normals\" -underline 5\n" ,"$wd.nb add [ttk::frame $wd.nb.advanced] -text \"Advanced\" -underline 0\n" ,"set f $wd.nb.general\n" ,"ttk::frame $f.selectframe -borderwidth 0\n" ,"ttk::checkbutton $f.selectframe.showtrias -text \"Show STL-Triangles\" \\\n" ,"-variable stloptions.showtrias -command { Ng_SetVisParameters; redraw }\n" ,"ttk::checkbutton $f.selectframe.showfilledtrias -text \"Show Filled Triangles\" \\\n" ,"-variable stloptions.showfilledtrias -command { Ng_SetVisParameters; redraw }\n" ,"set selmodevals { 0 1 2 3 4 }\n" ,"set selmodelabs(0) \"triangle\"\n" ,"set selmodelabs(1) \"edge\"\n" ,"set selmodelabs(2) \"point\"\n" ,"set selmodelabs(3) \"line\"\n" ,"set selmodelabs(4) \"line cluster\"\n" ,"global stldoctor.selectmode\n" ,"ttk::label $f.selectframe.dblcsellab -text \"Double Click selects : \"\n" ,"ttk::menubutton $f.selectframe.dblcselbut -menu $f.selectframe.dblcselmen -text \"triangle\" -width 16\n" ,"menu $f.selectframe.dblcselmen -tearoff 0\n" ,"foreach selmode { 0 1 2 3 4 } {\n" ,"$f.selectframe.dblcselmen add command -label $selmodelabs($selmode) \\\n" ,"-command \"set stldoctor.selectmode $selmode ; Ng_STLDoctor ; $f.selectframe.dblcselbut configure -text \\\"$selmodelabs($selmode)\\\"\"\n" ,"}\n" ,"$f.selectframe.dblcselmen invoke $selmodelabs(${stldoctor.selectmode})\n" ,"pack $f.selectframe\n" ,"grid $f.selectframe.showtrias -sticky nw\n" ,"grid $f.selectframe.showfilledtrias -sticky nw\n" ,"grid $f.selectframe.dblcsellab $f.selectframe.dblcselbut -sticky nw\n" ,"ttk::frame $f.sm\n" ,"pack $f.sm -fill x\n" ,"ttk::checkbutton $f.sm.bu -text \"select with mouse\" \\\n" ,"-variable stldoctor.selectwithmouse\n" ,"pack $f.sm.bu\n" ,"ttk::frame $f.st -relief groove -borderwidth 3\n" ,"pack $f.st -fill x\n" ,"ttk::label $f.st.lab -text \"Select triangle by number\";\n" ,"ttk::entry $f.st.ent -width 5 \\\n" ,"-textvariable stldoctor.selecttrig\n" ,"pack $f.st.ent $f.st.lab -side left -expand yes\n" ,"ttk::frame $f.vc -relief groove -borderwidth 3\n" ,"pack $f.vc -fill x\n" ,"ttk::checkbutton $f.vc.bu -text \"show vicinity\" \\\n" ,"-variable stldoctor.showvicinity \\\n" ,"-command {Ng_STLDoctor vicinity; redraw}\n" ,"ttk::label $f.vc.lab -text \"vicinity size\";\n" ,"ttk::frame $f.vc.sc\n" ,"ttk::scale $f.vc.sc.scale -orient horizontal -length 200 -from 0 -to 200 \\\n" ,"-variable stldoctor.vicinity -takefocus 0 -command \"Ng_STLDoctor vicinity; redraw; roundscale $f.vc.sc.scale 0\"\n" ,"ttk::entry $f.vc.sc.entry -textvariable stldoctor.vicinity -width 3 \\\n" ,"-validatecommand \"Ng_STLDoctor vicinity; redraw; my_validate %W [$f.vc.sc.scale cget -from] [$f.vc.sc.scale cget -to] %P 0\" \\\n" ,"-invalidcommand \"my_invalid %W;Ng_STLDoctor vicinity; redraw;\" -validate focus\n" ,"ttk::label $f.vc.sc.lab -text \"vicinity size\"\n" ,"grid $f.vc.sc.scale $f.vc.sc.entry $f.vc.sc.lab -sticky nw -padx 4\n" ,"pack $f.vc.bu $f.vc.lab $f.vc.sc -expand yes\n" ,"ttk::frame $f.ge -relief groove -borderwidth 0\n" ,"pack $f.ge -expand yes\n" ,"ttk::button $f.ge.neighbourangles -text \"calc neighbourangles\" -command {Ng_STLDoctor neighbourangles}\n" ,"ttk::button $f.ge.showcoords -text \"show coords of touched triangle\" -command {Ng_STLDoctor showcoords}\n" ,"ttk::button $f.ge.moveptm -text \"move point to middle of trianglepoints\" -command {Ng_STLDoctor movepointtomiddle; redraw}\n" ,"ttk::button $f.ge.destroy0trigs -text \"destroy 0-volume triangles\" -command {Ng_STLDoctor destroy0trigs}\n" ,"grid $f.ge.neighbourangles -sticky nw -padx 4 -pady 4\n" ,"grid $f.ge.showcoords -sticky nw -padx 4 -pady 4\n" ,"grid $f.ge.moveptm -sticky nw -padx 4 -pady 4\n" ,"grid $f.ge.destroy0trigs -sticky nw -padx 4 -pady 4\n" ,"ttk::button $f.ge.cancle -text \"Done\" -command {destroy .stldoctor_dlg }\n" ,"grid $f.ge.cancle -sticky nw\n" ,"set f $wd.nb.topology\n" ,"ttk::frame $f.oc -relief groove -borderwidth 3\n" ,"pack $f.oc -pady 3 -ipady 3 -fill y -fill x\n" ,"ttk::frame $f.oc.oc1 -borderwidth 0\n" ,"pack $f.oc.oc1\n" ,"ttk::button $f.oc.oc1.bu -text \"invert orientation \\n of selected trig\" -command {Ng_STLDoctor invertselectedtrig; redraw }\n" ,"ttk::button $f.oc.oc1.bu2 -text \"orient after \\n selected trig\" -command {Ng_STLDoctor orientafterselectedtrig; redraw }\n" ,"ttk::button $f.oc.oc1.toperr -text \"mark inconsistent triangles\" -command {Ng_STLDoctor marktoperrortrigs; redraw }\n" ,"ttk::button $f.oc.oc1.deltrig -text \"delete selected triangle\" -command {Ng_STLDoctor deleteselectedtrig; redraw }\n" ,"ttk::button $f.oc.oc1.geosmooth -text \"geometric smoothing\" -command {Ng_STLDoctor smoothgeometry; redraw }\n" ,"grid $f.oc.oc1.bu x $f.oc.oc1.bu2 -sticky nw -padx 4 -pady 4\n" ,"grid $f.oc.oc1.toperr - x -sticky nw -padx 4 -pady 4\n" ,"grid $f.oc.oc1.deltrig - x -sticky nw -padx 4 -pady 4\n" ,"grid $f.oc.oc1.geosmooth - x -sticky nw -padx 4 -pady 4\n" ,"set f $wd.nb.edges\n" ,"ttk::frame $f.be -relief groove -borderwidth 3\n" ,"pack $f.be -fill x\n" ,"ttk::frame $f.be.frame\n" ,"pack $f.be.frame -ipady 4 -pady 4\n" ,"ttk::label $f.be.frame.lab -text \"build edges with yellow angle:\";\n" ,"ttk::scale $f.be.frame.scale -orient horizontal -length 200 -from 0 -to 200 \\\n" ,"-variable stloptions.yangle -takefocus 0 -command \"roundscale $f.be.frame.scale 1; Ng_SetSTLParameters; Ng_STLDoctor buildedges; redraw\"\n" ,"ttk::entry $f.be.frame.entry -textvariable stloptions.yangle -width 5 \\\n" ,"-validatecommand \"Ng_SetSTLParameters; Ng_STLDoctor buildedges; redraw;my_validate %W [$f.be.frame.scale cget -from] [$f.be.frame.scale cget -to] %P 1\" \\\n" ,"-invalidcommand \"my_invalid %W;Ng_SetSTLParameters; Ng_STLDoctor buildedges; redraw\" -validate focus\n" ,"grid $f.be.frame.lab - -sticky nw -padx 4\n" ,"grid $f.be.frame.scale $f.be.frame.entry -sticky nw -padx 4\n" ,"ttk::label $f.be.frame.lab2 -text \"continue edges with yellow angle:\";\n" ,"ttk::scale $f.be.frame.scale2 -orient horizontal -length 200 -from 0 -to 100 \\\n" ,"-variable stloptions.contyangle -takefocus 0 -command \"roundscale $f.be.frame.scale2 1; Ng_SetSTLParameters; Ng_STLDoctor buildedges; redraw\"\n" ,"ttk::entry $f.be.frame.entry2 -textvariable stloptions.contyangle -width 5 \\\n" ,"-validatecommand \"Ng_SetSTLParameters; Ng_STLDoctor buildedges; redraw;my_validate %W [$f.be.frame.scale2 cget -from] [$f.be.frame.scale2 cget -to] %P 1\" \\\n" ,"-invalidcommand \"my_invalid %W;Ng_SetSTLParameters; Ng_STLDoctor buildedges; redraw\" -validate focus\n" ,"grid $f.be.frame.lab2 - -sticky nw -padx 4\n" ,"grid $f.be.frame.scale2 $f.be.frame.entry2 -sticky nw -padx 4\n" ,"ttk::button $f.be.frame.buildedges -text \"Build Edges\" -command {Ng_STLDoctor buildedges; redraw}\n" ,"grid $f.be.frame.buildedges - -sticky n -padx 4 -pady 4\n" ,"ttk::frame $f.se -relief groove -borderwidth 3\n" ,"pack $f.se -fill x\n" ,"ttk::checkbutton $f.se.bu -text \"show excluded\" \\\n" ,"-variable stldoctor.showexcluded \\\n" ,"-command {Ng_STLDoctor; redraw}\n" ,"pack $f.se.bu\n" ,"set edgeselmodevals { 0 1 2 3 4 }\n" ,"set edgeselmodelabs(0) \"no change\"\n" ,"set edgeselmodelabs(1) \"undefined\"\n" ,"set edgeselmodelabs(2) \"confirmed\"\n" ,"set edgeselmodelabs(3) \"candidate\"\n" ,"set edgeselmodelabs(4) \"excluded\"\n" ,"global stldoctor.edgeselectmode\n" ,"ttk::frame $f.scaleframe -relief groove -borderwidth 0\n" ,"pack $f.scaleframe -ipadx 4 -pady 4 -expand yes\n" ,"ttk::label $f.scaleframe.dblcedgelab -text \"Double Click sets edge :\"\n" ,"ttk::menubutton $f.scaleframe.dblcledgebut -menu $f.scaleframe.dblcledgem -text \"coarse\" -width 16\n" ,"menu $f.scaleframe.dblcledgem -tearoff 0\n" ,"foreach selectmode { 0 1 2 3 4 } {\n" ,"$f.scaleframe.dblcledgem add command -label $edgeselmodelabs($selectmode) \\\n" ,"-command \"set stldoctor.edgeselectmode $selectmode ; $f.scaleframe.dblcledgebut configure -text \\\"$edgeselmodelabs($selectmode)\\\"\"\n" ,"}\n" ,"$f.scaleframe.dblcledgem invoke $edgeselmodelabs(${stldoctor.edgeselectmode})\n" ,"grid $f.scaleframe.dblcedgelab $f.scaleframe.dblcledgebut -sticky n -ipadx 4\n" ,"ttk::frame $f.edg -relief groove -borderwidth 3\n" ,"pack $f.edg -fill x -ipadx 4 -ipady 4\n" ,"ttk::frame $f.edg.f0\n" ,"pack $f.edg.f0\n" ,"ttk::button $f.edg.f0.confirmedge -text \"confirm\" -command {Ng_STLDoctor confirmedge; redraw}\n" ,"ttk::button $f.edg.f0.candidateedge -text \"candidate\" -command {Ng_STLDoctor candidateedge; redraw}\n" ,"ttk::button $f.edg.f0.excludeedge -text \"exclude\" -command {Ng_STLDoctor excludeedge; redraw}\n" ,"ttk::button $f.edg.f0.undefinededge -text \"undefined\" -command {Ng_STLDoctor undefinededge; redraw}\n" ,"pack $f.edg.f0.confirmedge $f.edg.f0.candidateedge $f.edg.f0.excludeedge $f.edg.f0.undefinededge -side left\n" ,"ttk::frame $f.edg.fa\n" ,"pack $f.edg.fa\n" ,"ttk::button $f.edg.fa.setallundefined -text \"all undefined\" -command {Ng_STLDoctor setallundefinededges; redraw}\n" ,"ttk::button $f.edg.fa.erasecandidates -text \"candidates to undefined\" -command {Ng_STLDoctor erasecandidateedges; redraw}\n" ,"pack $f.edg.fa.setallundefined $f.edg.fa.erasecandidates -side left\n" ,"ttk::frame $f.edg.fb\n" ,"pack $f.edg.fb\n" ,"ttk::button $f.edg.fb.confirmcandidates -text \"candidates to confirmed\" -command {Ng_STLDoctor confirmcandidateedges; redraw}\n" ,"ttk::button $f.edg.fb.confirmedtocandidates -text \"confirmed to candidates\" -command {Ng_STLDoctor confirmedtocandidateedges; redraw}\n" ,"pack $f.edg.fb.confirmcandidates $f.edg.fb.confirmedtocandidates -side left\n" ,"ttk::frame $f.edg.f1\n" ,"ttk::frame $f.edg.f2\n" ,"ttk::frame $f.edg.f3\n" ,"ttk::frame $f.edg.f4\n" ,"pack $f.edg.f1 $f.edg.f2 $f.edg.f3 $f.edg.f4\n" ,"ttk::button $f.edg.f1.exportedges -text \"export edges\" -command {Ng_STLDoctor exportedges}\n" ,"ttk::button $f.edg.f1.importedges -text \"import edges\" -command {Ng_STLDoctor importedges; redraw}\n" ,"ttk::button $f.edg.f1.saveedgedata -text \"save edgedata\" \\\n" ,"-command {\n" ,"set types {\n" ,"{\"Netgen Edgedata\" {.ned} }\n" ,"}\n" ,"set file [tk_getSaveFile -filetypes $types -defaultextension \".ned\"]\n" ,"if {$file != \"\"} {\n" ,"Ng_STLDoctor saveedgedata $file\n" ,"}\n" ,"}\n" ,"ttk::button $f.edg.f1.loadedgedata -text \"load edgedata\" \\\n" ,"-command {\n" ,"set types {\n" ,"{\"Netgen Edgedata\" {.ned} }\n" ,"}\n" ,"set file [tk_getOpenFile -filetypes $types -defaultextension \".ned\"]\n" ,"if {$file != \"\"} {\n" ,"Ng_STLDoctor loadedgedata $file\n" ,"puts \"loading done\"\n" ,"redraw\n" ,"}\n" ,"}\n" ,"ttk::button $f.edg.f1.importAVLedges -text \"import AVL edges\" \\\n" ,"-command {\n" ,"set types {{\"Edge file\" {.edg }}}\n" ,"set file [tk_getOpenFile -filetypes $types -defaultextension \".edg\"]\n" ,"if {$file != \"\"} {\n" ,"Ng_STLDoctor importexternaledges $file;\n" ,"}\n" ,"}\n" ,"pack $f.edg.f1.importAVLedges $f.edg.f1.loadedgedata $f.edg.f1.saveedgedata -side left\n" ,"ttk::frame $f.edg2 -relief groove -borderwidth 3\n" ,"pack $f.edg2 -fill x\n" ,"ttk::label $f.edg2.lab -text \"length (%):\"\n" ,"scale $f.edg2.sc -orient horizontal -length 200 -from 0 -to 100 \\\n" ,"-resolution 0.5 \\\n" ,"-variable stldoctor.longlinefact\n" ,"ttk::button $f.edg2.undoedge -text \"undo last edge change\" -command {Ng_STLDoctor undoedgechange; redraw}\n" ,"pack $f.edg2.undoedge -expand yes\n" ,"set f $wd.nb.normals\n" ,"ttk::frame $f.dt -relief groove -borderwidth 3\n" ,"pack $f.dt -fill x\n" ,"ttk::label $f.dt.lab -text \"dirty triangle factor\";\n" ,"ttk::entry $f.dt.ent -width 5 \\\n" ,"-textvariable stldoctor.dirtytrigfact -validatecommand \"Ng_SetSTLParameters;my_validate %W -1e9 1e9 %P 3\" \\\n" ,"-invalidcommand \"my_invalid %W;Ng_SetSTLParameters\" -validate focus\n" ,"pack $f.dt.ent $f.dt.lab -side left -expand yes -pady 8\n" ,"ttk::frame $f.srt -relief groove -borderwidth 3\n" ,"pack $f.srt -fill x\n" ,"ttk::button $f.srt.bu -text \"smooth reverted triangles geometric\" -command {Ng_STLDoctor smoothrevertedtrigs; redraw }\n" ,"ttk::entry $f.srt.ent -width 5 \\\n" ,"-textvariable stldoctor.smoothangle -validatecommand \"Ng_SetSTLParameters;my_validate %W -1e9 1e9 %P 2\" \\\n" ,"-invalidcommand \"my_invalid %W;Ng_SetSTLParameters\" -validate focus\n" ,"pack $f.srt.ent $f.srt.bu -side left -expand yes -pady 8\n" ,"ttk::frame $f.bdt -relief groove -borderwidth 3\n" ,"pack $f.bdt -fill x\n" ,"ttk::button $f.bdt.bu -text \"mark dirty triangles\" -command {Ng_STLDoctor markdirtytrigs; redraw }\n" ,"ttk::button $f.bdt.bu2 -text \"smooth dirty triangles normal\" -command {Ng_STLDoctor smoothdirtytrigs; redraw }\n" ,"pack $f.bdt.bu $f.bdt.bu2 -side left -expand yes -pady 8\n" ,"ttk::frame $f.sno -relief groove -borderwidth 3\n" ,"pack $f.sno -fill x\n" ,"ttk::frame $f.sno.snoframe -borderwidth 0\n" ,"ttk::button $f.sno.smoothnormals -text \"smooth normals\" -command { Ng_STLDoctor smoothnormals; redraw}\n" ,"ttk::scale $f.sno.snoframe.scale -orient horizontal -length 100 -from 0.0 -to 0.8 \\\n" ,"-variable stldoctor.smoothnormalsweight -takefocus 0 -command \"roundscale $f.sno.snoframe.scale 2;Ng_SetSTLParameters\"\n" ,"ttk::entry $f.sno.snoframe.entry -textvariable stldoctor.smoothnormalsweight -width 4 \\\n" ,"-validatecommand \"Ng_SetSTLParameters;my_validate %W [$f.sno.snoframe.scale cget -from] [$f.sno.snoframe.scale cget -to] %P 2\" \\\n" ,"-invalidcommand \"my_invalid %W;Ng_SetSTLParameters\" -validate focus\n" ,"ttk::label $f.sno.snoframe.labrough -text \"rough\"\n" ,"ttk::label $f.sno.snoframe.labsmooth -text \"smooth\"\n" ,"grid $f.sno.snoframe.labrough $f.sno.snoframe.scale $f.sno.snoframe.labsmooth $f.sno.snoframe.entry -sticky nw -padx 4\n" ,"pack $f.sno.snoframe $f.sno.smoothnormals -side left -padx 5 -pady 8\n" ,"ttk::frame $f.no -relief groove -borderwidth 3\n" ,"pack $f.no -fill x\n" ,"ttk::button $f.no.marknonsmoothnormals -text \"mark non-smooth triangles\" -command {Ng_STLDoctor marknonsmoothnormals; redraw}\n" ,"ttk::button $f.no.calcnormals -text \"calculate normals from geometry\" -command {Ng_STLDoctor calcnormals; redraw}\n" ,"pack $f.no.marknonsmoothnormals $f.no.calcnormals -expand yes -pady 8\n" ,"set f $wd.nb.advanced\n" ,"ttk::frame $f.sc\n" ,"pack $f.sc -fill x\n" ,"ttk::checkbutton $f.sc.bu -text \"spiral check\" \\\n" ,"-variable stldoctor.spiralcheck \\\n" ,"-command {Ng_STLDoctor;}\n" ,"ttk::checkbutton $f.sc.bu2 -text \"cone check\" \\\n" ,"-variable stldoctor.conecheck \\\n" ,"-command {Ng_STLDoctor;}\n" ,"pack $f.sc.bu $f.sc.bu2\n" ,"ttk::spinbox $f.gtol -from 1 -to 20 -textvariable stldoctor.geom_tol_fact -width 8\n" ,"pack $f.gtol\n" ,"ttk::button $f.adap -text \"Apply\" -command {\n" ,".stldoctor_dlg.nb.advanced.gtol invoke\n" ,"Ng_STLDoctor;\n" ,"}\n" ,"pack $f.adap -expand yes\n" ,"wm withdraw $wd\n" ,"wm geom $wd +100+100\n" ,"wm deiconify $wd\n" ,"wm title $wd \"STL Doctor\"\n" ,"focus $wd\n" ,"}\n" ,"}\n" ,"proc meshdoctordialog { } {\n" ,"set w .meshdoc_dlg\n" ,"global meshdoctor.active\n" ,"if {[winfo exists .meshdoc_dlg] == 1} {\n" ,"wm withdraw $w\n" ,"wm deiconify $w\n" ,"focus $w\n" ,"} {\n" ,"toplevel $w\n" ,"set meshdoctor.active 1\n" ,"Ng_MeshDoctor;\n" ,"ttk::frame $w.vis -relief groove -borderwidth 3\n" ,"pack $w.vis\n" ,"ttk::checkbutton $w.vis.showfilledtrigs -text \"Show filled triangles\" \\\n" ,"-variable viewoptions.drawfilledtrigs \\\n" ,"-command { Ng_SetVisParameters; redraw }\n" ,"ttk::checkbutton $w.vis.showedges -text \"Show edges\" \\\n" ,"-variable viewoptions.drawedges \\\n" ,"-command { Ng_SetVisParameters; redraw }\n" ,"ttk::checkbutton $w.vis.showoutline -text \"Show Triangle Outline\" \\\n" ,"-variable viewoptions.drawoutline \\\n" ,"-command { Ng_SetVisParameters; redraw }\n" ,"pack $w.vis.showfilledtrigs $w.vis.showoutline $w.vis.showedges\n" ,"ttk::frame $w.markedgedist\n" ,"ttk::label $w.markedgedist.l -text \"Mark edge dist: \"\n" ,"ttk::spinbox $w.markedgedist.s -from 0 -to 999 -width 5 -increment 1 -validate focus -validatecommand \"my_validatespinbox %W %P 0\" \\\n" ,"-invalidcommand \"my_invalidspinbox %W\" -command {Ng_MeshDoctor markedgedist ${meshdoc.markedgedist};redraw} -textvariable meshdoc.markedgedist\n" ,"pack $w.markedgedist.l $w.markedgedist.s -side left\n" ,"pack $w.markedgedist\n" ,"ttk::button $w.deledge -text \"Delete marked segments\" -command {\n" ,"Ng_MeshDoctor deletemarkedsegments\n" ,"redraw\n" ,"}\n" ,"pack $w.deledge\n" ,"ttk::button $w.close -text \"Close\" -command {\n" ,"set meshdoctor.active 0;\n" ,"Ng_MeshDoctor;\n" ,"destroy .meshdoc_dlg\n" ,"}\n" ,"pack $w.close -expand yes\n" ,"wm withdraw $w\n" ,"wm geom $w +100+100\n" ,"wm deiconify $w\n" ,"wm title $w \"Mesh Doctor\"\n" ,"}\n" ,"}\n" ,"proc qualityviewdialog { show } {\n" ,"set w .qualityview_dlg\n" ,"if {[winfo exists .qualityview_dlg] == 1} {\n" ,"if { $show == 1 } {\n" ,"wm withdraw .qualityview_dlg\n" ,"wm deiconify $w\n" ,"focus $w\n" ,"} {\n" ,"wm withdraw $w\n" ,"}\n" ,"} {\n" ,"toplevel $w\n" ,"set c $w.c\n" ,"canvas $c -relief raised -width 450 -height 300\n" ,"pack $w.c -side top -fill x\n" ,"set plotFont {Helvetica 12}\n" ,"set smallFont {Helvetica 12}\n" ,"$c create line 100 250 400 250 -width 2\n" ,"$c create line 100 250 100 50 -width 2\n" ,"for {set i 0} {$i <= 10} {incr i} {\n" ,"set x [expr {100 + ($i*30)}]\n" ,"$c create line $x 250 $x 245 -width 2\n" ,"if { [expr {$i % 2}] == 0 } {\n" ,"$c create text $x 254 -text [format %1.1f [expr 0.1*$i]] -anchor n -font $plotFont\n" ,"}\n" ,"}\n" ,"global qualbar\n" ,"global qualbarnull\n" ,"global qualbaraxis\n" ,"for {set i 0} {$i <= 5} {incr i} {\n" ,"set y [expr {250 - ($i*40)}]\n" ,"$c create line 100 $y 105 $y -width 2\n" ,"set qualbaraxis($i) \\\n" ,"[$c create text 96 $y -text [expr $i*50].0 -anchor e -font $plotFont]\n" ,"}\n" ,"for {set i 0} {$i < 20} {incr i} {\n" ,"set x1 [expr {100 + ($i*15) + 2}]\n" ,"set x2 [expr {$x1+10}]\n" ,"set y [expr {250 - 10 * $i}]\n" ,"set qualbar($i) [$c create rectangle $x1 250 $x2 245 -fill blue]\n" ,"set qualbarnull($i) [$c create text [expr {($x1+$x2)/2}] 245 -text 0 -anchor s -font $smallFont -fill blue]\n" ,"}\n" ,"frame $w.bu\n" ,"pack $w.bu\n" ,"ttk::button $w.close -text \"Close\" \\\n" ,"-command {\n" ,"wm withdraw .qualityview_dlg\n" ,"set viewqualityplot 0\n" ,"}\n" ,"pack $w.close\n" ,"if { $show == 1 } {\n" ,"wm withdraw $w\n" ,"wm geom $w +100+100\n" ,"wm deiconify $w\n" ,"wm title $w \"Mesh Quality\"\n" ,"focus $w\n" ,"}\n" ,"}\n" ,"}\n" ,"proc memusedialog { show } {\n" ,"set w .memuse_dlg\n" ,"if {[winfo exists .memuse_dlg] == 1} {\n" ,"if { $show == 1 } {\n" ,"wm withdraw .memuse_dlg\n" ,"wm deiconify $w\n" ,"focus $w\n" ,"} {\n" ,"wm withdraw $w\n" ,"}\n" ,"} {\n" ,"toplevel $w\n" ,"set c $w.c\n" ,"canvas $c -relief raised -width 600 -height 300\n" ,"pack $w.c -side top -fill x\n" ,"set plotFont {Helvetica 18}\n" ,"set smallFont {Helvetica 12}\n" ,"global memmark\n" ,"for {set i 0} {$i < 512} { incr i } {\n" ,"set memmark($i) [$c create line [expr 50+$i] 50 [expr 50+$i] 70 -fill blue]\n" ,"}\n" ,"set plotFont {Helvetica 18}\n" ,"set smallFont {Helvetica 12}\n" ,"$c create text 50 90 -text \"0 GB\" -anchor n -font $plotFont\n" ,"$c create text 178 90 -text \"1 GB\" -anchor n -font $plotFont\n" ,"$c create text 306 90 -text \"2 GB\" -anchor n -font $plotFont\n" ,"$c create text 434 90 -text \"3 GB\" -anchor n -font $plotFont\n" ,"$c create text 562 90 -text \"4 GB\" -anchor n -font $plotFont\n" ,"ttk::frame $w.bu\n" ,"pack $w.bu\n" ,"ttk::button $w.close -text \"Close\" \\\n" ,"-command {\n" ,"wm withdraw .memuse_dlg\n" ,"set memuseplot 0\n" ,"}\n" ,"pack $w.close\n" ,"if { $show == 1 } {\n" ,"wm withdraw $w\n" ,"wm geom $w +100+100\n" ,"wm deiconify $w\n" ,"wm title $w \"Memory Usage\"\n" ,"focus $w\n" ,"}\n" ,"}\n" ,"}\n" ,"proc STLinfodialog { show } {\n" ,"set w .STLinfo_dlg\n" ,"if {[winfo exists .STLinfo_dlg] == 1} {\n" ,"if { $show == 1 } {\n" ,"wm withdraw .STLinfo_dlg\n" ,"wm deiconify $w\n" ,"focus $w\n" ,"} {\n" ,"wm withdraw $w\n" ,"}\n" ,"} {\n" ,"toplevel $w\n" ,"set c $w.c\n" ,"canvas $c -relief raised -width 450 -height 300\n" ,"pack $w.c -side top -fill x\n" ,"set plotFont {Helvetica 18}\n" ,"set smallFont {Helvetica 12}\n" ,"$c create line 100 250 400 250 -width 2\n" ,"$c create line 100 250 100 50 -width 2\n" ,"ttk::frame $w.bu\n" ,"pack $w.bu\n" ,"ttk::button $w.close -text \"Close\" \\\n" ,"-command {\n" ,"wm withdraw .STLinfo_dlg\n" ,"}\n" ,"pack $w.close\n" ,"if { $show == 1 } {\n" ,"wm withdraw $w\n" ,"wm geom $w +100+100\n" ,"wm deiconify $w\n" ,"wm title $w \"STL Geometry Info\"\n" ,"focus $w\n" ,"}\n" ,"}\n" ,"}\n" ,"proc logwindow { } {\n" ,"set w .logwindow\n" ,"if {[winfo exists .logwindow] == 1} {\n" ,"wm withdraw $w\n" ,"wm deiconify $w\n" ,"focus $w\n" ,"} {\n" ,"toplevel $w\n" ,"text $w.edit -yscroll \"$w.scrolly set\" -setgrid 1 -height 12\n" ,"scrollbar $w.scrolly -command \"$w.edit yview\"\n" ,"pack $w.edit -side left -fill both -expand 1\n" ,"pack $w.scrolly -side left -fill both -expand 0\n" ,".logwindow.edit insert end \"Netgen Log Window\\n\"\n" ,"wm withdraw $w\n" ,"wm geom $w +100+100\n" ,"wm deiconify $w\n" ,"wm title $w \"Netgen Log\"\n" ,"focus $w\n" ,"}\n" ,"}\n" ,"proc printtable { tablevar } {\n" ,"set w newtcltable\n" ,"while {[winfo exists .$w] == 1} {set w 1$w}\n" ,"set w .$w\n" ,"toplevel $w\n" ,"for {set i 0} {$i < [lindex $tablevar 2]} { incr i } {\n" ,"frame $w.col$i\n" ,"for {set j 0} {$j < [lindex $tablevar 1]} { incr j } {\n" ,"frame $w.col$i.row$j\n" ,"message $w.col$i.row$j.txt -aspect 10000000 -text [lindex $tablevar [expr 3+[lindex $tablevar 2]*$j+$i]]\n" ,"pack $w.col$i.row$j.txt\n" ,"pack $w.col$i.row$j -side top\n" ,"}\n" ,"pack $w.col$i -side left\n" ,"}\n" ,"wm withdraw $w\n" ,"wm geom $w +200+100; wm deiconify $w\n" ,"wm title $w [lindex $tablevar 0]\n" ,"focus $w\n" ,"}\n" ,"set latestwarning 0\n" ,"proc printwarning { textvar } {\n" ,"global latestwarning\n" ,"set latestwarning $textvar\n" ,"set w warning\n" ,"while {[winfo exists .$w] == 1} {set w 1$w}\n" ,"set w .$w\n" ,"toplevel $w\n" ,"message $w.mes -aspect 2000 -text \"WARNING:\\n$textvar\"\n" ,"ttk::button $w.done -text \"Done\" -command \"destroy $w\"\n" ,"pack $w.mes\n" ,"pack $w.done\n" ,"wm withdraw $w\n" ,"wm deiconify $w\n" ,"wm title $w \"Warning\"\n" ,"focus $w\n" ,"}\n" ,"proc printlatestwarning { } {\n" ,"global latestwarning\n" ,"if {$latestwarning != 0} {printwarning $latestwarning}\n" ,"}\n" ,"}\n" ,"catch {\n" ,"set oldmousex 0\n" ,"set oldmousey 0\n" ,"set toglversion [Ng_GetToglVersion]\n" ,"puts \"togl-version : $toglversion\"\n" ,"set toglok 0\n" ,"if { [Ng_GetToglVersion] == 2 } {\n" ,"if {[catch {togl .ndraw -width 400 -height 300 -rgba true -double true -depth true -privatecmap false -stereo false -indirect false -create init -display draw -reshape reshape }] } {\n" ,"puts \"no OpenGL\"\n" ,"} {\n" ,"set toglok 1\n" ,"}\n" ,"} {\n" ,"if {[catch {togl .ndraw -width 400 -height 300 -rgba true -double true -depth true -privatecmap false -stereo false -indirect false }] } {\n" ,"puts \"no OpenGL\"\n" ,"} {\n" ,"set toglok 1\n" ,"}\n" ,"}\n" ,"if { $toglok == 1} {\n" ,"pack .ndraw -expand true -fill both -padx 10 -pady 10\n" ,"catch { tkdnd::drop_target register .ndraw DND_Files }\n" ,"bind .ndraw {\n" ,"set oldmousex %x; set oldmousey %y;\n" ,"}\n" ,"bind .ndraw {\n" ,"set oldmousex %x; set oldmousey %y;\n" ,"}\n" ,"bind .ndraw {\n" ,"set oldmousex %x; set oldmousey %y;\n" ,"}\n" ,"bind .ndraw {\n" ,"Ng_MouseMove $oldmousex $oldmousey %x %y $drawmode\n" ,".ndraw render\n" ,"set oldmousex %x; set oldmousey %y;\n" ,"}\n" ,"bind .ndraw {\n" ,"Ng_MouseDblClick %x %y\n" ,".ndraw render\n" ,"if { [winfo exists .bcprop_dlg] } { bcpropdialog }\n" ,"if { [winfo exists .surfacemeshsize_dlg] } { surfacemeshsizedialog }\n" ,"if { [winfo exists .fieldlines_dlg] } { fieldlinesdialog }\n" ,"}\n" ,"bind .ndraw {\n" ,"Ng_MouseMove $oldmousex $oldmousey %x %y move\n" ,".ndraw render\n" ,"set oldmousex %x; set oldmousey %y;\n" ,"}\n" ,"bind .ndraw {\n" ,"if { $tcl_platform(os) == \"Darwin\" } {\n" ,"Ng_MouseMove $oldmousex $oldmousey %x %y move\n" ,"} {\n" ,"Ng_MouseMove $oldmousex $oldmousey %x %y zoom\n" ,"}\n" ,".ndraw render\n" ,"set oldmousex %x; set oldmousey %y;\n" ,"}\n" ,"}\n" ,"proc popupcheckredraw { vari { x 0 } } {\n" ,"upvar $vari varname\n" ,"if { $varname == 1 } {\n" ,"set varname 0\n" ,"} {\n" ,"Ng_Vis_Set parameters\n" ,"redraw\n" ,"}\n" ,"}\n" ,"proc popupcheckredraw2 { vari boolvar { x 0 } } {\n" ,"upvar $vari varname\n" ,"if { $varname == 1 } {\n" ,"set varname 0\n" ,"} {\n" ,"Ng_SetVisParameters\n" ,"Ng_Vis_Set parameters\n" ,"if { $boolvar == 1 } { redraw }\n" ,"Ng_SetVisParameters\n" ,"}\n" ,"}\n" ,"proc popupcheckredraw3 { vari { x 0 } } {\n" ,"upvar $vari varname\n" ,"if { $varname == 1 } {\n" ,"set varname 0\n" ,"} {\n" ,"Ng_Vis_Set parameters\n" ,"}\n" ,"}\n" ,"proc redraw { {x 0} } {\n" ,"if {[winfo exists .ndraw]} { .ndraw render }\n" ,"}\n" ,"bind . { Ng_MouseMove 0 0 -10 0 rotate; redraw }\n" ,"bind . { Ng_MouseMove 0 0 10 0 rotate; redraw }\n" ,"bind . { Ng_MouseMove 0 0 0 -10 rotate; redraw }\n" ,"bind . { Ng_MouseMove 0 0 0 10 rotate; redraw }\n" ,"bind . { Ng_MouseMove 0 0 -10 0 move; redraw }\n" ,"bind . { Ng_MouseMove 0 0 10 0 move; redraw }\n" ,"bind . { Ng_MouseMove 0 0 0 -10 move; redraw }\n" ,"bind . { Ng_MouseMove 0 0 0 10 move; redraw }\n" ,"bind . { Ng_MouseMove 0 0 0 -10 zoom; redraw }\n" ,"bind . { Ng_MouseMove 0 0 0 10 zoom; redraw }\n" ,"bind . \\\n" ,"{event generate [focus -displayof %W] -delta 120}\n" ,"bind . \\\n" ,"{event generate [focus -displayof %W] -delta -120}\n" ,"bind . { Ng_MouseMove 0 0 0 [expr {%D/-5}] zoom; redraw }\n" ,"bind .ndraw <> {\n" ,"set filename [join %D \" \"]\n" ,"set index [string last . $filename]\n" ,"set type [string range $filename $index+1 end]\n" ,"set ispde [string match -nocase $type \"pde\"]\n" ,"set isgeo [expr max([string match -nocase $type \"geo\"],[string match -nocase $type \"in2d\"])]\n" ,"set ismesh [expr max([string match -nocase $type \"vol\"],[string match -nocase $type \"vol.gz\"])]\n" ,"set ispy [string match -nocase $type \"py\"]\n" ,"if {$ispde == 1} {\n" ,"AddRecentNGSFile $filename;\n" ,"NGS_LoadPDE $filename;\n" ,"SetNumProcHelpMenu\n" ,"set selectvisual mesh;\n" ,"Ng_SetVisParameters\n" ,"}\n" ,"if {$ispy == 1} {\n" ,"AddRecentPYNGSFile $filename;\n" ,"NGS_LoadPy $filename;\n" ,"}\n" ,"if {$isgeo == 1} {\n" ,"AddRecentFile $filename;\n" ,"Ng_LoadGeometry $filename;\n" ,"Ng_ParseGeometry\n" ,"set selectvisual geometry\n" ,"Ng_SetVisParameters\n" ,"redraw\n" ,"wm title . [concat \"$progname - \" $filename]\n" ,"set dirname [file dirname $filename]\n" ,"set basefilename [file tail [file rootname $filename]]\n" ,"}\n" ,"if {$ismesh == 1} {\n" ,"AddRecentMeshFile $filename;\n" ,"Ng_LoadMesh $filename;\n" ,"set selectvisual mesh\n" ,"Ng_SetVisParameters\n" ,"redraw\n" ,"Ng_ReadStatus;\n" ,"wm title . [concat \"$progname - \" %D]\n" ,"set dirname [file dirname %D]\n" ,"set basefilename [file tail [file rootname %D]]\n" ,"}\n" ,"return %A\n" ,"}\n" ,"}\n" ,"catch { .ngmenu.geometry add command -label \"Scan CSG Geometry\" -command { Ng_ParseGeometry }\n" ,".ngmenu.geometry add command -label \"CSG Options...\" -command geometryoptionsdialog\n" ,".ngmenu.geometry add command -label \"CSG Properties...\" \\\n" ,"-command topleveldialog2\n" ,"proc geometryoptionsdialog { } {\n" ,"set w .geometry_dlg\n" ,"if {[winfo exists .geometry_dlg] == 1} {\n" ,"wm withdraw $w\n" ,"wm deiconify $w\n" ,"focus $w\n" ,"} {\n" ,"toplevel $w\n" ,"global geooptions\n" ,"Ng_GeometryOptions get\n" ,"checkbutton $w.drawcsg -text \"Draw Geometry\" \\\n" ,"-variable geooptions.drawcsg\n" ,"pack $w.drawcsg\n" ,"frame $w.fac\n" ,"pack $w.fac -pady 5\n" ,"ttk::label $w.fac.lab -text \"Facets:\";\n" ,"entry $w.fac.ent -width 8 -relief sunken \\\n" ,"-textvariable geooptions.facets\n" ,"pack $w.fac.lab $w.fac.ent -side left\n" ,"frame $w.det\n" ,"pack $w.det -pady 5\n" ,"ttk::label $w.det.lab -text \"Detail:\";\n" ,"entry $w.det.ent -width 8 -relief sunken \\\n" ,"-textvariable geooptions.detail\n" ,"pack $w.det.lab $w.det.ent -side left\n" ,"frame $w.cox\n" ,"pack $w.cox -pady 5\n" ,"ttk::label $w.cox.lab -text \"min/max x:\";\n" ,"entry $w.cox.ent1 -width 8 -relief sunken \\\n" ,"-textvariable geooptions.minx\n" ,"entry $w.cox.ent2 -width 8 -relief sunken \\\n" ,"-textvariable geooptions.maxx\n" ,"pack $w.cox.lab $w.cox.ent1 \\\n" ,"$w.cox.ent2 -side left\n" ,"frame $w.coy\n" ,"pack $w.coy -pady 5\n" ,"ttk::label $w.coy.lab -text \"min/max y:\";\n" ,"entry $w.coy.ent1 -width 8 -relief sunken \\\n" ,"-textvariable geooptions.miny\n" ,"entry $w.coy.ent2 -width 8 -relief sunken \\\n" ,"-textvariable geooptions.maxy\n" ,"pack $w.coy.lab $w.coy.ent1 \\\n" ,"$w.coy.ent2 -side left\n" ,"frame $w.coz\n" ,"pack $w.coz -pady 5\n" ,"ttk::label $w.coz.lab -text \"min/max z:\";\n" ,"entry $w.coz.ent1 -width 8 -relief sunken \\\n" ,"-textvariable geooptions.minz\n" ,"entry $w.coz.ent2 -width 8 -relief sunken \\\n" ,"-textvariable geooptions.maxz\n" ,"pack $w.coz.lab $w.coz.ent1 \\\n" ,"$w.coz.ent2 -side left\n" ,"frame $w.bu\n" ,"pack $w.bu -fill x -ipady 3\n" ,"ttk::button $w.bu.app -text \"Apply\" -command {\n" ,"Ng_GeometryOptions set\n" ,"}\n" ,"ttk::button $w.bu.ok -text \"Done\" -command {\n" ,"Ng_GeometryOptions set\n" ,"destroy .geometry_dlg\n" ,"}\n" ,"pack $w.bu.app $w.bu.ok -side left -expand yes\n" ,"wm withdraw $w\n" ,"wm geom $w +100+100\n" ,"wm deiconify $w\n" ,"wm title $w \"Geometry options\"\n" ,"focus $w\n" ,"}\n" ,"}\n" ,"proc editprimitivedialog2 { name } {\n" ,"global w classname\n" ,"set w .ep_dlg\n" ,"toplevel .$w\n" ,"Ng_GetPrimitiveData $name classname valuelist\n" ,"ttk::label $w.lab1 -text \"Primitive Name: $name\";\n" ,"ttk::label $w.lab2 -text \"Primitive Class: $classname\";\n" ,"pack $w.lab1 $w.lab2 -fill x -pady 1m -padx 5m\n" ,"frame $w.specific -relief groove\n" ,"global spec\n" ,"set spec(sphere) { cx cy cz rad }\n" ,"set spec(cylinder) { ax ay az bx by bz rad }\n" ,"set spec(plane) { px py pz nx ny nz }\n" ,"set spec(cone) { ax ay az bx by bz ra rb }\n" ,"set spec(brick) { p1x p1y p1z p2x p2y p2z p3x p3y p3z p4x p4y p4z }\n" ,"set cnt 0\n" ,"foreach field $spec($classname) {\n" ,"frame $w.specific.f$cnt\n" ,"pack $w.specific.f$cnt -side top -anchor ne\n" ,"ttk::label $w.specific.f$cnt.lab -text \"$field\"\n" ,"entry $w.specific.f$cnt.ent -textvariable dataval($cnt) \\\n" ,"-width 6 -relief sunken\n" ,"pack $w.specific.f$cnt.ent $w.specific.f$cnt.lab -side right\n" ,"$w.specific.f$cnt.ent delete 0 end\n" ,"$w.specific.f$cnt.ent insert 0 [lindex $valuelist $cnt]\n" ,"set cnt [expr $cnt + 1]\n" ,"}\n" ,"pack $w.specific\n" ,"ttk::button $w.cancel -text \"cancel\" -command {\n" ,"destroy $w\n" ,"}\n" ,"ttk::button $w.ok -text \"ok\" -command {\n" ,"set valuelist \"\"\n" ,"set cnt 0\n" ,"foreach field $spec($classname) {\n" ,"lappend valuelist $dataval($cnt)\n" ,"set cnt [expr $cnt + 1]\n" ,"}\n" ,"Ng_SetPrimitiveData $name $valuelist\n" ,"destroy $w\n" ,"}\n" ,"pack $w.cancel $w.ok -side left -expand yes\n" ,"bind $w { $w.ok invoke}\n" ,"bind $w { $w.cancel invoke}\n" ,"wm withdraw $w\n" ,"wm geom $w +100+100\n" ,"wm deiconify $w\n" ,"focus $w.specific.f0.ent\n" ,"}\n" ,"proc editprimitivedialog { } {\n" ,"global w\n" ,"set w .ep_dlg\n" ,"toplevel $w\n" ,"frame $w.frame -borderwidth 5m\n" ,"pack $w.frame -side top -expand yes -fill y\n" ,"listbox $w.frame.list -yscroll \"$w.frame.scroll set\" -setgrid 1 -height 12\n" ,"scrollbar $w.frame.scroll -command \"$w.frame.list yview\"\n" ,"pack $w.frame.scroll -side right -fill y\n" ,"pack $w.frame.list -side left -expand 1 -fill both\n" ,"Ng_GetPrimitiveList primlist\n" ,"foreach el $primlist {\n" ,"$w.frame.list insert end $el }\n" ,"ttk::button $w.cancel -text \"cancel\" -command { destroy $w }\n" ,"ttk::button $w.ok -text \"ok\" -command {\n" ,"set name [.ep_dlg.frame.list get active]\n" ,"puts \"name=($name)\"\n" ,"destroy $w\n" ,"if { $name != \"\" } { editprimitivedialog2 $name }\n" ,"}\n" ,"bind $w { $w.cancel invoke }\n" ,"bind $w { $w.ok invoke }\n" ,"pack $w.cancel $w.ok -side left -expand yes\n" ,"wm withdraw $w\n" ,"wm geom $w +100+100\n" ,"wm deiconify $w\n" ,"focus $w.frame.list\n" ,"}\n" ,"proc newprimitivedialog { } {\n" ,"global w name\n" ,"set w .ap_dlg\n" ,"toplevel $w\n" ,"set name \"\"\n" ,"frame $w.f1\n" ,"pack $w.f1 -pady 2m\n" ,"ttk::label $w.f1.lab -text \"Primitive Name: \";\n" ,"entry $w.f1.ent -width 5 -relief sunken \\\n" ,"-textvariable name\n" ,"pack $w.f1.lab $w.f1.ent -side left\n" ,"frame $w.frame -borderwidth .5c\n" ,"pack $w.frame -side top -expand yes -fill y\n" ,"listbox $w.frame.list -yscroll \"$w.frame.scroll set\" -setgrid 1 -height 8\n" ,"scrollbar $w.frame.scroll -command \"$w.frame.list yview\"\n" ,"pack $w.frame.scroll -side right -fill y\n" ,"pack $w.frame.list -side left -expand 1 -fill both\n" ,"$w.frame.list insert 0 sphere cylinder plane cone brick\n" ,"$w.frame.list activate 0\n" ,"ttk::button $w.ok -text \"ok\" -command {\n" ,"Ng_CreatePrimitive [$w.frame.list get active] $name\n" ,"destroy $w\n" ,"editprimitivedialog2 $name\n" ,"}\n" ,"ttk::button $w.cancel -text \"cancel\" -command {\n" ,"destroy $w\n" ,"}\n" ,"pack $w.cancel $w.ok -side left -expand yes -pady 2m\n" ,"bind $w { $w.cancel invoke }\n" ,"bind $w { $w.ok invoke }\n" ,"wm withdraw $w\n" ,"wm geom $w +100+100\n" ,"wm deiconify $w\n" ,"focus $w.f1.ent\n" ,"}\n" ,"proc newsoliddialog { } {\n" ,"global w name val sollist\n" ,"set w .ns_dlg\n" ,"toplevel $w\n" ,"set name \"\"\n" ,"frame $w.f1\n" ,"ttk::label $w.f1.lab -text \"Solid Name: \";\n" ,"entry $w.f1.ent -width 5 -relief sunken \\\n" ,"-textvariable name\n" ,"$w.f1.ent delete 0 end\n" ,"ttk::button $w.f1.getsel -text \"Get Selected\" -command {\n" ,"$w.f1.ent delete 0 end\n" ,"$w.f1.ent insert 0 [$w.f3.list get active]\n" ,"$w.bu.get invoke\n" ,"}\n" ,"pack $w.f1.getsel -side bottom\n" ,"pack $w.f1.ent $w.f1.lab -side right\n" ,"frame $w.f3 -borderwidth .5c\n" ,"listbox $w.f3.list -yscroll \"$w.f3.scroll set\" -setgrid 1 -height 12\n" ,"scrollbar $w.f3.scroll -command \"$w.f3.list yview\"\n" ,"pack $w.f3.scroll -side right -fill y\n" ,"pack $w.f3.list -side left -expand 1 -fill both\n" ,"Ng_GetSolidList sollist\n" ,"foreach el $sollist {\n" ,"$w.f3.list insert end $el }\n" ,"frame $w.f2\n" ,"ttk::label $w.f2.lab -text \"Solid Description: \";\n" ,"pack $w.f2.lab\n" ,"entry $w.f2.ent -width 100 -relief sunken \\\n" ,"-textvariable val -xscrollcommand \"$w.f2.scr set\"\n" ,"scrollbar $w.f2.scr -relief sunken -orient horiz -command \\\n" ,"\"$w.f2.ent xview\"\n" ,"$w.f2.ent delete 0 end\n" ,"pack $w.f2.ent $w.f2.scr -fill x\n" ,"frame $w.bu\n" ,"ttk::button $w.bu.close -text \"close\" -command {\n" ,"destroy $w\n" ,"}\n" ,"ttk::button $w.bu.get -text \"get data\" -command {\n" ,"Ng_GetSolidData $name val\n" ,"}\n" ,"ttk::button $w.bu.set -text \"set data\" -command {\n" ,"Ng_SetSolidData $name $val\n" ,"}\n" ,"pack $w.bu.get $w.bu.set $w.bu.close -side left\n" ,"pack $w.bu -pady 5 -side bottom ;\n" ,"pack $w.f2 -pady 5 -side bottom ;\n" ,"pack $w.f1 -pady 5 -side left ;\n" ,"pack $w.f3 -side left -expand yes -fill y ;\n" ,"bind $w { $w.bu.close invoke }\n" ,"wm withdraw $w\n" ,"wm geom $w +100+100\n" ,"wm deiconify $w\n" ,"focus $w\n" ,"}\n" ,"proc toplevelproperties { w solname surfname } {\n" ,"global properties\n" ,"Ng_TopLevel getprop $solname $surfname properties\n" ,"set w .tlprop_dlg\n" ,"if {[winfo exists $w] == 1} {\n" ,"wm withdraw $w\n" ,"wm deiconify $w\n" ,"focus $w\n" ,"} {\n" ,"toplevel $w\n" ,"ttk::label $w.lab1 -text \"Red\"\n" ,"scale $w.scale1 -orient horizontal -length 300 -from 0 -to 1 \\\n" ,"-resolution 0.01 -tickinterval 0.2 \\\n" ,"-command { Ng_TopLevel setprop $solname $surfname properties; redraw } -variable properties(red)\n" ,"ttk::label $w.lab2 -text \"Green\"\n" ,"scale $w.scale2 -orient horizontal -length 300 -from 0 -to 1 \\\n" ,"-resolution 0.01 -tickinterval 0.2 \\\n" ,"-command { Ng_TopLevel setprop $solname $surfname properties; redraw } -variable properties(green)\n" ,"ttk::label $w.lab3 -text \"Blue\"\n" ,"scale $w.scale3 -orient horizontal -length 300 -from 0 -to 1 \\\n" ,"-resolution 0.01 -tickinterval 0.2 \\\n" ,"-command { Ng_TopLevel setprop $solname $surfname properties; redraw } -variable properties(blue)\n" ,"pack $w.lab1 $w.scale1 $w.lab2 $w.scale2 $w.lab3 $w.scale3\n" ,"checkbutton $w.cb4 -text \"Visible\" \\\n" ,"-command { Ng_TopLevel setprop $solname $surfname properties; redraw } \\\n" ,"-variable properties(visible)\n" ,"checkbutton $w.cb5 -text \"Transparent\" \\\n" ,"-command { Ng_TopLevel setprop $solname $surfname properties; redraw } \\\n" ,"-variable properties(transp)\n" ,"pack $w.cb4 $w.cb5\n" ,"frame $w.bu\n" ,"pack $w.bu -fill x\n" ,"ttk::button $w.bu.ok -text \"Ok\" -command \"destroy .tlprop_dlg\"\n" ,"pack $w.bu.ok -expand yes\n" ,"wm withdraw $w\n" ,"wm geom $w +100+100\n" ,"wm deiconify $w\n" ,"focus $w\n" ,"}\n" ,"wm title $w \"Properties $solname $surfname\"\n" ,"}\n" ,"proc topleveldialog { } {\n" ,"global w name val sollist\n" ,"set w .tl_dlg\n" ,"toplevel $w\n" ,"frame $w.sol -borderwidth .5c\n" ,"listbox $w.sol.list -yscroll \"$w.sol.scroll set\" -setgrid 1 -height 12\n" ,"scrollbar $w.sol.scroll -command \"$w.sol.list yview\"\n" ,"pack $w.sol.scroll -side right -fill y\n" ,"pack $w.sol.list -side left -expand 1 -fill both\n" ,"Ng_GetSolidList sollist\n" ,"foreach el $sollist {\n" ,"$w.sol.list insert end $el }\n" ,"Ng_GetPrimitiveList sollist\n" ,"foreach el $sollist {\n" ,"$w.sol.list insert end $el }\n" ,"frame $w.sul -borderwidth .5c\n" ,"listbox $w.sul.list -yscroll \"$w.sul.scroll set\" -setgrid 1 -height 12\n" ,"scrollbar $w.sul.scroll -command \"$w.sul.list yview\"\n" ,"pack $w.sul.scroll -side right -fill y\n" ,"pack $w.sul.list -side left -expand 1 -fill both\n" ,"Ng_GetSurfaceList sollist\n" ,"foreach el $sollist {\n" ,"$w.sul.list insert end $el }\n" ,"frame $w.topl -borderwidth .5c\n" ,"listbox $w.topl.list -yscroll \"$w.topl.scroll set\" -setgrid 1 -height 12 \\\n" ,"-command { puts hi }\n" ,"scrollbar $w.topl.scroll -command \"$w.topl.list yview\"\n" ,"pack $w.topl.scroll -side right -fill y\n" ,"pack $w.topl.list -side left -expand 1 -fill both\n" ,"Ng_TopLevel getlist sollist\n" ,"puts $sollist\n" ,"foreach el $sollist {\n" ,"set hel \"[ lindex $el 0 ]\"\n" ,"if { [ llength $el ] == 2 } {\n" ,"set hel \"[ lindex $el 1 ] on [ lindex $el 0 ]\"\n" ,"}\n" ,"$w.topl.list insert end $hel\n" ,"}\n" ,"frame $w.bu\n" ,"ttk::button $w.bu.close -text \"close\" -command {\n" ,"destroy $w\n" ,"}\n" ,"ttk::button $w.bu.addsol -text \"Add Solid\" -command {\n" ,"set solname [$w.sol.list get active]\n" ,"Ng_TopLevel set $solname \"\"\n" ,"Ng_ParseGeometry\n" ,"$w.topl.list insert end $solname\n" ,"}\n" ,"ttk::button $w.bu.addsurf -text \"Add Surface\" -command {\n" ,"set solname [$w.sol.list get active]\n" ,"set surfname [$w.sul.list get active]\n" ,"Ng_TopLevel set $solname $surfname\n" ,"Ng_ParseGeometry\n" ,"puts \"$solname on $surfname\"\n" ,"$w.topl.list insert end \"$surfname on $solname\"\n" ,"}\n" ,"ttk::button $w.bu.remsol -text \"Remove\" -command {\n" ,"set solname [$w.topl.list get active]\n" ,"set surfname \"\"\n" ,"if { [llength $solname] == 3 } {\n" ,"set surfname [lindex $solname 0]\n" ,"set solname [lindex $solname 2]\n" ,"}\n" ,"Ng_TopLevel remove $solname $surfname\n" ,"Ng_ParseGeometry\n" ,"$w.topl.list delete active\n" ,"}\n" ,"ttk::button $w.bu.prop -text \"Properties\" -command {\n" ,"set solname [$w.topl.list get active]\n" ,"set surfname \"\"\n" ,"if { [llength $solname] == 3 } {\n" ,"set surfname [lindex $solname 0]\n" ,"set solname [lindex $solname 2]\n" ,"}\n" ,"toplevelproperties tlp $solname $surfname\n" ,"}\n" ,"pack $w.bu.close $w.bu.addsol $w.bu.addsurf $w.bu.remsol $w.bu.prop -side left\n" ,"pack $w.bu -side bottom\n" ,"pack $w.sol -side left -expand yes -fill y ;\n" ,"pack $w.sul -side left -expand yes -fill y ;\n" ,"pack $w.topl -side left -expand yes -fill y ;\n" ,"bind $w { $w.bu.close invoke }\n" ,"wm withdraw $w\n" ,"wm geom $w +100+100\n" ,"wm deiconify $w\n" ,"focus $w\n" ,"}\n" ,"proc topleveldialog2 { } {\n" ,"set w .tl2_dlg\n" ,"if {[winfo exists .tl2_dlg] == 1} {\n" ,"wm withdraw $w\n" ,"wm deiconify $w\n" ,"focus $w\n" ,"} {\n" ,"toplevel $w\n" ,"global name val sollist\n" ,"frame $w.topl -borderwidth .5c\n" ,"listbox $w.topl.list -yscroll \"$w.topl.scroll set\" -setgrid 1 -height 12\n" ,"scrollbar $w.topl.scroll -command \"$w.topl.list yview\"\n" ,"pack $w.topl.scroll -side right -fill y\n" ,"pack $w.topl.list -side left -expand 1 -fill both\n" ,"Ng_TopLevel getlist sollist\n" ,"puts $sollist\n" ,"set i 1\n" ,"foreach el $sollist {\n" ,"set hel \"$i: [ lindex $el 0 ]\"\n" ,"if { [ llength $el ] == 2 } {\n" ,"set hel \"$i: [ lindex $el 1 ] on [ lindex $el 0 ]\"\n" ,"}\n" ,"incr i\n" ,"$w.topl.list insert end $hel }\n" ,"frame $w.bu\n" ,"ttk::button $w.bu.close -text \"close\" -command {\n" ,"destroy .tl2_dlg\n" ,"}\n" ,"ttk::button $w.bu.prop -text \"Properties\" -command {\n" ,"set solname [.tl2_dlg.topl.list get active]\n" ,"set surfname \"\"\n" ,"if { [llength $solname] == 2 } {\n" ,"set solname [lindex $solname 1]\n" ,"}\n" ,"if { [llength $solname] == 4 } {\n" ,"set surfname [lindex $solname 1]\n" ,"set solname [lindex $solname 3]\n" ,"}\n" ,"toplevelproperties tlp $solname $surfname\n" ,"}\n" ,"pack $w.bu.close $w.bu.prop -side left\n" ,"pack $w.bu -side bottom\n" ,"pack $w.topl -side left -expand yes -fill y ;\n" ,"bind .tl2_dlg.topl.list {\n" ,"set solname [.tl2_dlg.topl.list get @%x,%y]\n" ,"set surfname \"\"\n" ,"if { [llength $solname] == 2 } {\n" ,"set solname [lindex $solname 1]\n" ,"}\n" ,"if { [llength $solname] == 4 } {\n" ,"set surfname [lindex $solname 1]\n" ,"set solname [lindex $solname 3]\n" ,"}\n" ,"toplevelproperties tlp $solname $surfname\n" ,"}\n" ,"bind .tl2_dlg { .tl2_dlg.bu.close invoke }\n" ,"wm withdraw $w\n" ,"wm geom $w +100+100\n" ,"wm deiconify $w\n" ,"wm title $w \"Top-Level Options\"\n" ,"focus $w\n" ,"}\n" ,"}\n" ,"}\n" ,"catch { \n" ,".ngmenu.geometry add separator\n" ,".ngmenu.geometry add command -label \"STL Doctor...\" \\\n" ,"-command { stldoctordialog; }\n" ,".ngmenu.geometry add command -label \"STL Info\" \\\n" ,"-command {\n" ,"set notriangles 0\n" ,"set minx 0\n" ,"set maxx 0\n" ,"set miny 0\n" ,"set maxy 0\n" ,"set minz 0\n" ,"set maxz 0\n" ,"set trigscons 0\n" ,"Ng_STLInfo notriangles minx maxx miny maxy minz maxz trigscons\n" ,"set msgtext \"NO STL-Triangles : $notriangles\\nGeometry:\\nX = $minx - $maxx\\nY = $miny - $maxy\\nZ = $minz - $maxz\\nConsistency Check = $trigscons\\n\"\n" ,"set msgtext \"$msgtext Status: [Ng_STLInfo status]\"\n" ,"tk_messageBox -title \"STL Info\" -message $msgtext -type ok\n" ,"}\n" ,"}\n" ,"set hasocc no\n" ,"catch { if { [catch { load liboccvis[info sharedlibextension] Ng_OCC } result ] } {\n" ,"}\n" ,"if { [catch { Ng_OCCCommand isoccgeometryloaded }] } {\n" ,"proc rebuildoccdialog { } { }\n" ,"} {\n" ,"puts \"OCC module loaded\"\n" ,"set hasocc yes\n" ,".ngmenu.geometry add separator\n" ,".ngmenu.geometry add command -label \"IGES/STEP Topology Explorer/Doctor...\" \\\n" ,"-command { occdialog; }\n" ,".ngmenu.geometry add command -label \"Edit Face Mesh Size...\" \\\n" ,"-command { surfacemeshsizedialog }\n" ,"set entities [ ]\n" ,"proc occdialogbuildtree {} {\n" ,"global entities\n" ,"set w .occ_dlg\n" ,"set entities [Ng_GetOCCData getentities]\n" ,"set nrentities [expr [llength $entities]]\n" ,"if {$nrentities != 0} {\n" ,"$w.tree insert {Topology} end -id \"CompSolids\" -text \"Composite Solids\"\n" ,"$w.tree insert {Topology} end -id \"FreeSolids\" -text \"Free Solids\"\n" ,"$w.tree insert {Topology} end -id \"FreeShells\" -text \"Free Shells\"\n" ,"$w.tree insert {Topology} end -id \"FreeFaces\" -text \"Free Faces\"\n" ,"$w.tree insert {Topology} end -id \"FreeWires\" -text \"Free Wires\"\n" ,"$w.tree insert {Topology} end -id \"FreeEdges\" -text \"Free Edges\"\n" ,"$w.tree insert {Topology} end -id \"FreeVertices\" -text \"Free Vertices\"\n" ,"$w.tree item \"Topology\" -open true\n" ,"set i [expr 0]\n" ,"while {$i < $nrentities} {\n" ,"set entity [lindex $entities [expr $i]]\n" ,"incr i 1\n" ,"set entityname [lindex $entities [expr $i]]\n" ,"set myroot [string range $entity 0 [string last / $entity]-1]\n" ,"$w.tree insert $myroot end -id $entity -text $entityname -value 1\n" ,"incr i 1\n" ,"}\n" ,"set i [expr 0]\n" ,"while {$i < $nrentities} {\n" ,"set entity [lindex $entities [expr $i]]\n" ,"$w.tree item $entity -open false\n" ,"incr i 2\n" ,"}\n" ,"set faces [Ng_OCCCommand getunmeshedfaceinfo]\n" ,"set nrfaces [expr [llength $faces]]\n" ,"if {$nrfaces >= 2} {\n" ,"$w.tree insert {} -id ErrorFaces -text \"Faces with surface meshing error\"\n" ,"$w.tree item ErrorFaces -open true\n" ,"set i [expr 0]\n" ,"while {$i < $nrfaces} {\n" ,"set entity [lindex $faces [expr $i]]\n" ,"set myroot [string range $entity 0 [string last / $entity]-1]\n" ,"if { [string length $myroot] == 0 } {\n" ,"set myroot ErrorFaces\n" ,"}\n" ,"incr i 1\n" ,"set entityname [lindex $faces [expr $i]]\n" ,"$w.tree insert {myroot} end -id $entity -text $entityname -value 0\n" ,"incr i 1\n" ,"}\n" ,"}\n" ,"set faces [Ng_OCCCommand getnotdrawablefaces]\n" ,"set nrfaces [expr [llength $faces]]\n" ,"if {$nrfaces >= 2} {\n" ,"$w.tree insert {} -id NotDrawableFaces -text \"Faces impossible to visualize\"\n" ,"$w.tree item NotDrawableFaces -open true\n" ,"set i [expr 0]\n" ,"while {$i < $nrfaces} {\n" ,"set entity [lindex $faces [expr $i]]\n" ,"set myroot [string range $entity 0 [string last / $entity]-1]\n" ,"if { [string length $myroot ] == 0 } {\n" ,"set myroot NotDrawableFaces\n" ,"}\n" ,"incr i 1\n" ,"set entityname [lindex $faces [expr $i]]\n" ,"$w.tree insert $myroot end -id $entity -text $entityname -value 0\n" ,"incr i 1\n" ,"}\n" ,"}\n" ,"puts \"done\"\n" ,"}\n" ,"}\n" ,"proc rebuildoccdialog {} {\n" ,"if {[winfo exists .occ_dlg] == 1} {\n" ,".occ_dlg.tree delete [.occ_dlg.tree children Topology]\n" ,"occdialogbuildtree\n" ,"}\n" ,"}\n" ,"proc checkoccloaded { } {\n" ,"set isoccgeometryloaded [Ng_OCCCommand isoccgeometryloaded]\n" ,"if {$isoccgeometryloaded == 0} {\n" ,"puts \"no IGES/STEP geometry loaded\"\n" ,"destroy .occ_dlg\n" ,"}\n" ,"}\n" ,"proc selectentity { entityname } {\n" ,"global entities\n" ,"set nrentities [expr [llength $entities]]\n" ,"set i [expr 0]\n" ,"while {$i < $nrentities} {\n" ,"set entitylength []\n" ,"set entity2 [lindex $entities [expr $i]]\n" ,"incr i 1\n" ,"set entityname2 [lindex $entities [expr $i]]\n" ,"incr i 1\n" ,"set entityname2 [string range $entityname2 0 [expr [string length $entityname]-1]]\n" ,"if {$entityname == $entityname2} {\n" ,".occ_dlg.tree see $entity2\n" ,".occ_dlg.tree selection set $entity2\n" ,"}\n" ,"}\n" ,"}\n" ,"proc occdialog { } {\n" ,"uplevel 1 {\n" ,"global entities\n" ,"set selectvisual geometry\n" ,"Ng_SetVisParameters\n" ,"redraw\n" ,"set w .occ_dlg\n" ,"if {[winfo exists .occ_dlg] == 1} {\n" ,"wm withdraw $w\n" ,"wm deiconify $w\n" ,"focus $w\n" ,"} {\n" ,"toplevel $w\n" ,"ttk::treeview $w.tree\n" ,"$w.tree insert {} end -id \"Topology\" -text \"Topology\"\n" ,"pack $w.tree -fill both -expand yes\n" ,"occdialogbuildtree\n" ,"bind $w.tree {\n" ,"set entityname [.occ_dlg.tree item [.occ_dlg.tree selection] -text ]\n" ,"set rootname \"\"\n" ,"if {[.occ_dlg.tree item [.occ_dlg.tree selection] -value] == 1 } {\n" ,"set rootname \"Topology\"\n" ,"}\n" ,"set spacepos [string first \" \" $entityname]\n" ,"set entitytype [string range $entityname 0 [expr $spacepos-1]]\n" ,"set helpstring [string range $entityname [expr $spacepos+1] [expr [string length $entityname]-1]]\n" ,"set spacepos2 [string first \" \" $helpstring]\n" ,"set entitynumber [string range $helpstring 0 [expr $spacepos2-1]]\n" ,"if {$rootname == \"Topology\"} {\n" ,"Ng_OCCCommand highlightentity $entitytype $entitynumber\n" ,"set selectvisual geometry\n" ,"redraw\n" ,"} {\n" ,"set brackpos [string first \" (\" $entityname]\n" ,"if {$brackpos != -1} {\n" ,"set entityname [string range $entityname 0 $brackpos]\n" ,"}\n" ,"selectentity $entityname\n" ,"}\n" ,"}\n" ,"ttk::button $w.cl -text \"Close\" -command {\n" ,"destroy .occ_dlg\n" ,"}\n" ,"ttk::button $w.show -text \"Show\" -command {\n" ,"set entityname [.occ_dlg.tree item [.occ_dlg.tree selection] -text ]\n" ,"set spacepos [string first \" \" $entityname]\n" ,"set entitytype [string range $entityname 0 [expr $spacepos-1]]\n" ,"set helpstring [string range $entityname [expr $spacepos+1] [expr [string length $entityname]-1]]\n" ,"set spacepos2 [string first \" \" $helpstring]\n" ,"set entitynumber [string range $helpstring 0 [expr $spacepos2-1]]\n" ,"Ng_OCCCommand show $entitytype $entitynumber\n" ,"set selectvisual geometry\n" ,"redraw\n" ,"}\n" ,"ttk::button $w.hide -text \"Hide\" -command {\n" ,"set entityname [.occ_dlg.tree item [.occ_dlg.tree selection] -text ]\n" ,"set spacepos [string first \" \" $entityname]\n" ,"set entitytype [string range $entityname 0 [expr $spacepos-1]]\n" ,"set helpstring [string range $entityname [expr $spacepos+1] [expr [string length $entityname]-1]]\n" ,"set spacepos2 [string first \" \" $helpstring]\n" ,"set entitynumber [string range $helpstring 0 [expr $spacepos2-1]]\n" ,"Ng_OCCCommand hide $entitytype $entitynumber\n" ,"set selectvisual geometry\n" ,"redraw\n" ,"}\n" ,"ttk::button $w.swaporientation -text \"Swap orientation\" -command {\n" ,"set entityname [.occ_dlg.tree item [.occ_dlg.tree selection] -text ]\n" ,"set spacepos [string first \" \" $entityname]\n" ,"set entitytype [string range $entityname 0 [expr $spacepos-1]]\n" ,"set helpstring [string range $entityname [expr $spacepos+1] [expr [string length $entityname]-1]]\n" ,"set spacepos2 [string first \" \" $helpstring]\n" ,"set entitynumber [string range $helpstring 0 [expr $spacepos2-1]]\n" ,"Ng_OCCCommand swaporientation $entitytype $entitynumber\n" ,"set selectvisual geometry\n" ,"redraw\n" ,".occ_dlg.tree delete [.occ_dlg.tree children Topology]\n" ,"occdialogbuildtree\n" ,"}\n" ,"ttk::button $w.marksingular -text \"Mark/Unmark as singular\" -command {\n" ,"set entityname [.occ_dlg.tree item [.occ_dlg.tree selection] -text ]\n" ,"set spacepos [string first \" \" $entityname]\n" ,"if { $spacepos != 0 } {\n" ,"set entitytype [string range $entityname 0 [expr $spacepos-1]]\n" ,"set helpstring [string range $entityname [expr $spacepos+1] [expr [string length $entityname]-1]]\n" ,"set spacepos2 [string first \" \" $helpstring]\n" ,"if { $spacepos2 != 0 } {\n" ,"set entitynumber [string range $helpstring 0 [expr $spacepos2-1]]\n" ,"puts $entitytype\n" ,"puts $entitynumber\n" ,"global ismarkedsingular\n" ,"Ng_OCCCommand marksingular $entitytype $entitynumber\n" ,"if { $ismarkedsingular == 0 } {\n" ,".occ_dlg.tree tag remove \"Color\" [.occ_dlg.tree selection]\n" ,"} {\n" ,".occ_dlg.tree tag add \"Color\" [.occ_dlg.tree selection]\n" ,".occ_dlg.tree tag configure \"Color\" -foreground \"red\"\n" ,".occ_dlg.tree tag configure \"Color\" -background \"blue\"\n" ,"}\n" ,"}\n" ,"}\n" ,"}\n" ,"ttk::checkbutton $w.zoomtohighlightedentity -text \"Zoom to highlighted entity\" \\\n" ,"-variable occoptions.zoomtohighlightedentity \\\n" ,"-command {\n" ,"Ng_SetOCCVisParameters\n" ,"if { ${occoptions.zoomtohighlightedentity} == 1} {\n" ,"set selectvisual geometry\n" ,"Ng_OCCCommand redrawstatus 1\n" ,"redraw\n" ,"} {\n" ,"Ng_OCCCommand redrawstatus 0\n" ,"}\n" ,"}\n" ,"ttk::frame $w.healing -relief groove -borderwidth 3\n" ,"ttk::button $w.healing.checkentities -text \"Analyze geometry\" -command {\n" ,"set irregent [Ng_OCCCommand findsmallentities]\n" ,"set w .occ_dlg\n" ,"set nritems [expr [llength $irregent]]\n" ,"set i [expr 0]\n" ,"if {$nritems > 0 } {\n" ,"if { [.occ_dlg.tree exists ProblematicEntities] == 1 } {\n" ,"$w.tree delete ProblematicEntities\n" ,"}\n" ,"$w.tree insert {} end -id ProblematicEntities -text \"Problematic Entities\"\n" ,"}\n" ,"while {$i < $nritems} {\n" ,"set entity [lindex $irregent [expr $i]]\n" ,"incr i 1\n" ,"set entityname [lindex $irregent [expr $i]]\n" ,"set myroot [string range $entity 0 [string last / $entity]-1]\n" ,"if { [string length $myroot] == 0 } {\n" ,"set myroot ProblematicEntities\n" ,"}\n" ,"$w.tree insert $myroot end -id $entity -text $entityname\n" ,"incr i 1\n" ,"}\n" ,"$w.tree item ProblematicEntities -open true\n" ,"}\n" ,"ttk::frame $w.healing.tolerance\n" ,"ttk::label $w.healing.tolerance.label -text \"Healing tolerance: \"\n" ,"ttk::spinbox $w.healing.tolerance.sp -textvariable occoptions.tolerance -width 6 -increment 0.01 -validate focus -validatecommand \"my_validatespinbox %W %P 12\" \\\n" ,"-invalidcommand \"my_invalidspinbox %W\" -from -1e-9 -to 1e6\n" ,"grid $w.healing.tolerance.label $w.healing.tolerance.sp\n" ,"ttk::checkbutton $w.healing.fixsmalledges -text \"Fix small edges\" \\\n" ,"-variable occoptions.fixsmalledges\n" ,"ttk::checkbutton $w.healing.fixspotstripfaces -text \"Fix spot/strip faces\" \\\n" ,"-variable occoptions.fixspotstripfaces\n" ,"ttk::checkbutton $w.healing.sewfaces -text \"Sew faces\" \\\n" ,"-variable occoptions.sewfaces\n" ,"ttk::checkbutton $w.healing.makesolids -text \"Make solids\" \\\n" ,"-variable occoptions.makesolids\n" ,"ttk::checkbutton $w.healing.splitpartitions -text \"Split partitions\" \\\n" ,"-variable occoptions.splitpartitions\n" ,"ttk::button $w.healing.heal -text \"Heal geometry\" -command {\n" ,"Ng_OCCCommand shapehealing\n" ,"redraw\n" ,".occ_dlg.tree delete [.occ_dlg.tree children Topology]\n" ,"occdialogbuildtree\n" ,"}\n" ,"pack $w.healing.checkentities\n" ,"pack $w.healing.tolerance $w.healing.fixsmalledges \\\n" ,"$w.healing.fixspotstripfaces $w.healing.sewfaces \\\n" ,"$w.healing.makesolids $w.healing.splitpartitions -anchor w\n" ,"pack $w.healing.heal\n" ,"pack $w.show $w.hide\n" ,"pack $w.zoomtohighlightedentity -anchor w\n" ,"pack $w.swaporientation\n" ,"pack $w.marksingular\n" ,"pack $w.healing -fill x\n" ,"pack $w.cl\n" ,"wm withdraw $w\n" ,"wm geom $w +100+100\n" ,"wm deiconify $w\n" ,"wm title $w \"IGES/STEP Topology Explorer/Doctor\"\n" ,"focus .occ_dlg\n" ,"}\n" ,"}\n" ,"}\n" ,"} }\n" ,"if { [Ng_ACISCommand isACISavailable] == \"yes\" } {\n" ,".ngmenu.geometry add command -label \"ACIS Topology Explorer...\" \\\n" ,"-command { acisdialog; }\n" ,".ngmenu.geometry add command -label \"ACIS combine all\" \\\n" ,"-command { Ng_ACISCommand combineall }\n" ,".ngmenu.geometry add command -label \"ACIS Create CT\" \\\n" ,"-command { Ng_ACISCommand createct }\n" ,"}\n" ,"catch { proc print_commandline_help { } {\n" ,"puts \"Usage: ng { options }\"\n" ,"puts \"-geofile=filename Input geometry file (alternative: ng filename)\"\n" ,"puts \"-meshfile=filename Output mesh file\"\n" ,"puts \"-verycoarse, -coarse, -moderate, -fine, -veryfine\"\n" ,"puts \" Automatic mesh-size selection\"\n" ,"puts \"-meshsizefile=filename Load mesh-size file with local mesh sizes\"\n" ,"puts \"-meshfiletype={\\\"Neutral Format\\\", ...}\"\n" ,"puts \" Filetype of output file, default is netgen file\"\n" ,"puts \"-batchmode Run Netgen in batchmode\"\n" ,"puts \"-inputmeshfile=filename\"\n" ,"puts \" Input mesh file (batchmode only)\"\n" ,"puts \"-mergefile=filename Merge with mesh file (batchmode only)\"\n" ,"puts \"-refinementfile=filename\"\n" ,"puts \" Use refinementinfo from file (batchmode only)\"\n" ,"puts \"-serversocket=\\\n" ,"puts \"-V Print additional information\"\n" ,"puts \"-testout=filename file for test output\"\n" ,"if { [catch { NGS_GetData } ] == 0 } {\n" ,"puts \"\\nNGSolve parameters:\"\n" ,"puts \"-pdefile=filename Load pde input file\"\n" ,"puts \"-solve Solve pde once\"\n" ,"puts \"-solve=n Solve pde by n adaptive refinement steps\"\n" ,"puts \"-recent Load and solve most recently loaded pde\"\n" ,"}\n" ,"}\n" ,"proc set_menu_help { entry helpmsg } {\n" ,"global menuhelps\n" ,"set menuhelps($entry) $helpmsg\n" ,"}\n" ,"proc show_menu_help { entry } {\n" ,"global menuhelps\n" ,"if {[catch {set helptext $menuhelps($entry)}]} {\n" ,"set helptext \"no help available \"\n" ,"}\n" ,".helpline configure -text $helptext\n" ,"if {[winfo exists .senshelp_dlg]==1} {\n" ,".senshelp_dlg.text delete 1.0 end\n" ,".senshelp_dlg.text insert end \"Menu item: $entry\\n\\n\"\n" ,".senshelp_dlg.text insert end $helptext\n" ,"}\n" ,"}\n" ,"proc set_control_help { control helpmsg } {\n" ,"bind $control \"show_control_help {$helpmsg}\"\n" ,"bind $control \"show_control_help {None}\"\n" ,".balloon bind $control -balloonmsg $helpmsg -statusmsg $helpmsg\n" ,"}\n" ,"proc show_control_help { helpmsg } {\n" ,".helpline configure -text $helpmsg\n" ,"if {[winfo exists .senshelp_dlg]==1} {\n" ,".senshelp_dlg.text delete 1.0 end\n" ,".senshelp_dlg.text insert end $helpmsg\n" ,"}\n" ,"}\n" ,"proc sensitivehelpdialog { show } {\n" ,"set w .senshelp_dlg\n" ,"if {[winfo exists .senshelp_dlg] == 1} {\n" ,"if { $show == 1 } {\n" ,"wm withdraw .senshelp_dlg\n" ,"wm deiconify $w\n" ,"focus $w\n" ,"} {\n" ,"wm withdraw $w\n" ,"}\n" ,"} {\n" ,"toplevel $w\n" ,"global senshelptext\n" ,"text $w.text -yscrollcommand \"$w.scroll set\" -setgrid true \\\n" ,"-width 40 -height 10 -wrap word\n" ,"scrollbar $w.scroll -command \"$w.text yview\"\n" ,"pack $w.scroll -side right -fill y\n" ,"pack $w.text -expand yes -fill both\n" ,"ttk::frame $w.bu\n" ,"pack $w.bu\n" ,"ttk::button $w.close -text \"Close\" \\\n" ,"-command {\n" ,"wm withdraw .senshelp_dlg\n" ,"set showsensitivehelp 0\n" ,"}\n" ,"pack $w.close\n" ,"if { $show == 1 } {\n" ,"wm withdraw $w\n" ,"wm geom $w +100+100\n" ,"wm deiconify $w\n" ,"wm title $w \"Help\"\n" ,"focus $w\n" ,"}\n" ,"}\n" ,"}\n" ,"set_menu_help \"File\" \"In File menu you can load and store geometries, meshes etc.\"\n" ,"set_menu_help \"New Geometry\" \"Deletes current geometry\"\n" ,"set_menu_help \"Load Geometry\" \"Loads Geometry file in one of the formats STL (ASCII or binary), Constructive Solid Geometry (.geo) or 2D geometry. Please have a look into Netgen User's manuel for more details.\"\n" ,"set_menu_help \"Save Geometry\" \"Saves STL Geometry in in either ASCII or binary STL format.\"\n" ,"set_menu_help \"Load Mesh\" \"Loads surface and volume mesh in Netgen internal format.\"\n" ,"set_menu_help \"Save Mesh\" \"Saves surface and volume mesh in Netgen internal format.\"\n" ,"set_menu_help \"Write EPS File\" \"Dumps OpenGL rendering to EPS File.\"\n" ,"set_menu_help \"Save Options\" \"Saves current options in file \\\"ng.opt\\\". These options will be loaded again when starting ng in the same directory.\"\n" ,"set_menu_help \"Export Mesh\" \"Exports mesh in format defined by Export Filetype.\"\n" ,"set_menu_help \"Export Filetype\" \"Selects file format for exporting mesh. Please have a look into the Netgen User's manual for more information.\"\n" ,"set_menu_help \"Import Mesh\" \"Imports surface or volume mesh in exchange format.\"\n" ,"set_menu_help \"Quit\" \"Quits Netgen\"\n" ,"set_menu_help \"Geometry\" \"Preparing geometries, visualiztion of geometries.\"\n" ,"set_menu_help \"Scan CSG Geometry\" \"Generates surface triangulation for rendering\"\n" ,"set_menu_help \"CSG Options\" \"Sets Options for CSG visualization (bounding box, detail size, number of facets).\"\n" ,"set_menu_help \"CSG Properties\" \"Defines appearance of current CSG geometry (color, visibility, transparency)\"\n" ,"set_menu_help \"STL Doctor\" \"Calls STL Doctor for preprocessing STL geometry files.\"\n" ,"set_menu_help \"STL Info\" \"Retrieves information about current STL geometry.\"\n" ,"set_menu_help \"Mesh\" \"Menu for mesh generation\"\n" ,"set_menu_help \"Generate Mesh\" \"Generates mesh from geometry, same as Button \\\"Generate Mesh\\\"\"\n" ,"set_menu_help \"Stop Meshing\" \"Terminates meshgeneration. It may take a while until meshing terminates, please be patient.\"\n" ,"set_menu_help \"Meshing Options\" \"Set options for mesh generation.\"\n" ,"set_menu_help \"Delete Mesh\" \"Deletes mesh. Not necessary before generation of new mesh.\"\n" ,"set_menu_help \"Delete Vol Mesh\" \"Deletes only volume mesh.\"\n" ,"set_menu_help \"Mesh Quality\" \"Computs element shape measures. Triangle angles are inner angles of all triangles (faces of tetrahedra). Tet angles are angles between faces of tetrahedra.\"\n" ,"set_menu_help \"Check Surface Mesh\" \"Checks consistency and overlap of surface mesh. Marks overlapping elements as bad elements, please enable visualization of bad elements in View->Mesh.\"\n" ,"set_menu_help \"Check Volume Mesh\" \"Checks conformity of volume mesh.\"\n" ,"set_menu_help \"Edit Boundary Conditions\" \"Open dialog for setting boundary condition numbers for individual faces.\"\n" ,"set_menu_help \"Analyze Geometry\" \"Perform only first step in mesh generation. Action depends on geometry type, e.g. generates charts for STL mesh, find vertices in CSG geometries.\"\n" ,"set_menu_help \"Mesh Edges\" \"Meshes edges\"\n" ,"set_menu_help \"Mesh Surface\" \"Generates surface mesh. Includes already surface optimization for some geometry types.\"\n" ,"set_menu_help \"Optimize Surface\" \"Optimizes surface mesh.\"\n" ,"set_menu_help \"Surface Optim. Step\" \"Performs a specific surface optimiztion step. Mesh smoothing moves nodes. edge swapping swaps the diagonal of a quadrilateral built by two triangles, criterion either by number of nodes, or anlges. Combine points eliminates triangles by combining points (in the center of gravity).\"\n" ,"set_menu_help \"Mesh Volume\" \"Performs volume meshing. Algorithm is a combination of Delaunay and Rule-based Advancing Front\"\n" ,"set_menu_help \"Optimize Volume\" \"Performs additional volume optimization steps\"\n" ,"set_menu_help \"Smooth Opt Volume\" \"Performs optimization steps by smoothing iterations\"\n" ,"set_menu_help \"Smooth Opt Volume Jacobian\" \"Volume optimization by smoothing iterations. Criterion is optimization of Jacobi determinants. This optimization step is also available for 10-node tetrahedra.\"\n" ,"set_menu_help \"View\" \"Sets viewing options\"\n" ,"set_menu_help \"Zoom all\" \"Zooms scene to show whole object\"\n" ,"set_menu_help \"Center\" \"Defines center of rotation\"\n" ,"set_menu_help \"Viewing Options\" \"Sets viewing options for geometry, mesh, lighting\"\n" ,"set_menu_help \"Clipping Plane\" \"Introduces clipping plane. The clipping plane is defined by the normal vector, and a scaled offset. Clipping of performed by OpenGl rendering\"\n" ,"set_menu_help \"Quality Plot\" \"Shows the element quality distribution histogram. Measure is volume scaled by edge-length to the third. Optimal elements have measure 1.\"\n" ,"set_menu_help \"Sensitive Help\" \"Shows this help window\"\n" ,"set_menu_help \"Mesh-size\" \"Manipulations of existing mesh\"\n" ,"set_menu_help \"Refine uniform\" \"Refines mesh by splitting elements into eight childs (algorithm of J. Bey)\"\n" ,"set_menu_help \"Second Order\" \"Converts 4 node elements to 10 node elements. Edge-midpoitns are projected to the geometry.\"\n" ,"set_menu_help \"Refinement Dialog\" \"Controls local mesh refinement\"\n" ,"set_menu_help \"Load Meshsize\" \"Loads mesh-size file for local mesh refinement.\"\n" ,"set_menu_help \"MS from Surf Mesh\" \"Defines mesh-size by the surface mesh.\"\n" ,"set f .options_dlg.nb.nbframe.general\n" ,"set_control_help $f.fine \"Controls relative mesh size.\\nThis control affects other mesh-size controls in common\"\n" ,"set_control_help $f.first \"First step in mesh generation. Usually, meshing starts from \\\"analyze geometry\\\". If the surface mesh is already available \\\"First step\\\" should be set to \\\"mesh volume\\\"\"\n" ,"set_control_help $f.last \"Last step in mesh generation. If only the surface mesh is required, please set \\\"Last Step\\\" to \\\"Optimize Surface\\\"\"\n" ,"set_control_help .bubar.surfm \"Start mesh generation\"\n" ,"set_control_help .bubar.stopm \"Stop mesh generation\"\n" ,"proc help_item { helptext } {p\n" ,"puts $helptext\n" ,"}\n" ,"proc show_help { } {\n" ,"set w .help\n" ,"if {[winfo exists .help] == 1} {\n" ,"wm withdraw $w\n" ,"wm deiconif $w\n" ,"focus $w\n" ,"} {\n" ,"toplevel $w\n" ,"frame $w.buttons\n" ,"pack $w.buttons -side bottom -fill x -pady 2m\n" ,"button $w.buttons.done -text Done -command \"destroy $w\"\n" ,"pack $w.buttons.done -side left -expand 1\n" ,"text $w.text -yscrollcommand \"$w.scroll set\" -setgrid true \\\n" ,"-width 60 -height 24 -wrap word\n" ,"scrollbar $w.scroll -command \"$w.text yview\"\n" ,"pack $w.scroll -side right -fill y\n" ,"pack $w.text -expand yes -fill both\n" ,"}\n" ,"$w.text configure -state normal\n" ,"$w.text delete 1.0 end\n" ,"}\n" ,"set bold \"-background \n" ,"set normal \"-background {} -relief flat\"\n" ,"proc help_main { } {\n" ,"show_help;\n" ,"set w .help\n" ,"global bold\n" ,"global normal\n" ,"$w.text insert 0.0 \\\n" ,"{NETGEN Help}\n" ,"$w.text insert end \\n\\n\n" ,"$w.text insert end \\\n" ,"{1. General} d1\n" ,"$w.text insert end \\n\\n\n" ,"$w.text insert end \\\n" ,"{2. Menu items } d2\n" ,"$w.text insert end \\n\\n\n" ,"foreach tag {d1 d2} {\n" ,"$w.text tag bind $tag \"$w.text tag configure $tag $bold\"\n" ,"$w.text tag bind $tag \"$w.text tag configure $tag $normal\"\n" ,"}\n" ,"$w.text tag bind d1 <1> { puts \"general\"; help_general }\n" ,"$w.text tag bind d2 <1> { help_menus }\n" ,"$w.text configure -state disabled\n" ,"}\n" ,"proc help_general { } {\n" ,"show_help;\n" ,"set w .help\n" ,"global bold\n" ,"global normal\n" ,"puts \"general called\"\n" ,"$w.text insert 0.0 \\\n" ,"{NETGEN is an automatic three dimensional tetrahedral mesh generation system. It accepts input from constructive solid geometry (CSG) or boundary representation (BRep) from STEP or STL file format. NETGEN contains modules for mesh optimization and hierarchical mesh refinement.}\n" ,"$w.text configure -state disabled\n" ,"}\n" ,"proc help_menus { } {\n" ,"show_help;\n" ,"set w .help\n" ,"global bold\n" ,"global normal\n" ,"$w.text insert 0.0 \\\n" ,"{The NETGEN Menu items are}\n" ,"$w.text insert end \\n\\n\n" ,"$w.text insert end \\\n" ,"{1. File} d1\n" ,"$w.text insert end \\n\\n\n" ,"$w.text insert end \\\n" ,"{2. Geometry } d2\n" ,"$w.text insert end \\n\\n\n" ,"$w.text insert end \\\n" ,"{3. Mesh } d3\n" ,"$w.text insert end \\n\\n\n" ,"$w.text insert end \\\n" ,"{4. View } d4\n" ,"$w.text insert end \\n\\n\n" ,"$w.text insert end \\\n" ,"{5. Mesh-size } d5\n" ,"$w.text insert end \\n\\n\n" ,"$w.text insert end \\\n" ,"{6. STL } d6\n" ,"foreach tag {d1 d2 d3 d4 d5 d6} {\n" ,"$w.text tag bind $tag \"$w.text tag configure $tag $bold\"\n" ,"$w.text tag bind $tag \"$w.text tag configure $tag $normal\"\n" ,"}\n" ,"$w.text tag bind d1 <1> {puts \"File menu\"}\n" ,"$w.text tag bind d2 <1> {puts \"Geometry menu\"}\n" ,"$w.text tag bind d3 <1> {puts \"Mesh menu\"}\n" ,"$w.text tag bind d4 <1> {puts \"View menu\"}\n" ,"$w.text tag bind d5 <1> {puts \"Mesh-size menu\"}\n" ,"$w.text tag bind d6 <1> {puts \"STL menu\"}\n" ,"$w.text configure -state disabled\n" ,"}\n" ,"}\n" ,"catch { Ng_Vis_Set parameters\n" ,"set viscnt 0\n" ,"proc snapshottimer { } {\n" ,"after 2000 { snapshottimer }\n" ,"global viscnt\n" ,"set viscnt [expr $viscnt+1]\n" ,"set s1 0000$viscnt\n" ,"set cnt [string range $s1 [expr [string length $s1]-4] end]\n" ,"set filename \"p$cnt.jpg\"\n" ,"}\n" ,"snapshottimer\n" ,"proc redrawtimer { } {\n" ,"global visoptions.autoredraw\n" ,"global visoptions.autoredrawtime\n" ,"set delay [expr int(${visoptions.autoredrawtime}*1000)]\n" ,"if { ${visoptions.autoredraw} == 1 } { redraw; }\n" ,"after $delay { redrawtimer }\n" ,"}\n" ,"redrawtimer\n" ,"set perstarttime [clock clicks -millisecond]\n" ,"proc redrawperiodic { } {\n" ,"global visoptions.redrawperiodic\n" ,"global perstarttime\n" ,"set curtime [clock clicks -millisecond]\n" ,"Ng_Vis_Set time [expr ($curtime - $perstarttime) / 5]\n" ,"redraw\n" ,"if { ${visoptions.redrawperiodic} == 1 } { after 30 { redrawperiodic } };\n" ,"}\n" ,"proc addplotline { identifier datax datay plotinfo {color black}} {\n" ,"set c $identifier.c\n" ,"set xstart [lindex $plotinfo 0]\n" ,"set ystart [lindex $plotinfo 1]\n" ,"set xmin [lindex $plotinfo 2]\n" ,"set ymin [lindex $plotinfo 3]\n" ,"set unitx [lindex $plotinfo 4]\n" ,"set unity [lindex $plotinfo 5]\n" ,"set latestx [expr ([lindex $datax 0]-$xmin)*$unitx + $xstart]\n" ,"set latesty [expr ([lindex $datay 0]-$ymin)*$unity + $ystart]\n" ,"for {set i 1} {$i < [llength $datax]} {incr i} {\n" ,"set xpos [expr ([lindex $datax $i]-$xmin)*$unitx + $xstart]\n" ,"set ypos [expr ([lindex $datay $i]-$ymin)*$unity + $ystart]\n" ,"$c create line $latestx $latesty $xpos $ypos -width 1 -fill $color\n" ,"set latestx $xpos\n" ,"set latesty $ypos\n" ,"}\n" ,"}\n" ,"proc createlineplot { width height identifier title xmin xmax ymin ymax plotinfo} {\n" ,"set thiswidth $width\n" ,"set thisheight $height\n" ,"if { $thiswidth < 275 } { set thiswidth 275 }\n" ,"if { $thisheight < 225 } { seth thisheight 225 }\n" ,"set w $identifier\n" ,"if {[winfo exists $w] == 1} {\n" ,"wm withdraw $w\n" ,"wm deiconify $w\n" ,"focus $w\n" ,"} {\n" ,"toplevel $w\n" ,"set c $w.c\n" ,"canvas $c -relief raised -width $thiswidth -height $thisheight\n" ,"pack $w.c -side top -fill x\n" ,"set titleFont {Helvetica 18}\n" ,"set smallFont {Helvetica 12}\n" ,"set xstart 100\n" ,"set xend [expr $thiswidth-75]\n" ,"set ystart [expr $thisheight-75]\n" ,"set yend 75\n" ,"$c create line $xstart $ystart $xstart $yend -width 2\n" ,"$c create line $xstart $ystart $xend $ystart -width 2\n" ,"set unitx [expr double($xend-$xstart)/($xmax-$xmin)]\n" ,"set unity [expr double($yend-$ystart)/($ymax-$ymin)]\n" ,"for {set i 0} {$i <= 1} {set i [expr $i+0.2]} {\n" ,"$c create line [expr $xstart+$i*($xend-$xstart)] [expr $ystart] [expr $xstart+$i*($xend-$xstart)] [expr $ystart+5] -width 2\n" ,"$c create text [expr $xstart+$i*($xend-$xstart)] [expr $ystart+7] -anchor n -font $smallFont \\\n" ,"-text [format \"%.3g\" [expr $xmin+$i*($xmax-$xmin)]]\n" ,"$c create line [expr $xstart] [expr $ystart+$i*($yend-$ystart)] [expr $xstart-7] [expr $ystart+$i*($yend-$ystart)] -width 2\n" ,"$c create text [expr $xstart-9] [expr $ystart+$i*($yend-$ystart)] -anchor e -font $smallFont \\\n" ,"-text [format \"%.3g\" [expr $ymin+$i*($ymax-$ymin)]]\n" ,"}\n" ,"upvar $plotinfo ploti\n" ,"set ploti \"$xstart $ystart $xmin $ymin $unitx $unity\"\n" ,"button $w.close -text \"Close\" -command \"destroy $w\"\n" ,"pack $w.close\n" ,"wm withdraw $w\n" ,"wm geom $w +100+100\n" ,"wm deiconify $w\n" ,"wm title $w $title\n" ,"focus $w\n" ,"}\n" ,"}\n" ,"proc getlineplotdata { datax datay xmini xmaxi ymini ymaxi} {\n" ,"upvar $datax datx\n" ,"upvar $datay daty\n" ,"upvar $xmini xmin\n" ,"upvar $xmaxi xmax\n" ,"upvar $ymini ymin\n" ,"upvar $ymaxi ymax\n" ,"global visoptions.lineplotusingx\n" ,"global visoptions.lineplotusingy\n" ,"global visoptions.lineplotsource\n" ,"global visoptions.lineplotfile\n" ,"set datx \"\"\n" ,"set daty \"\"\n" ,"set xmin 1e20\n" ,"set xmax -1e20\n" ,"set ymin 1e20\n" ,"set ymax -1e20\n" ,"if {${visoptions.lineplotsource} == \"file\"} {\n" ,"set fileId [open ${visoptions.lineplotfile} r]\n" ,"set line \"\"\n" ,"while {[gets $fileId line] >= 0} {\n" ,"if { [string index [lindex $line 0] 0] != \"\\\n" ,"if { ${visoptions.lineplotusingx} < [llength $line] } {\n" ,"lappend datx [lindex $line ${visoptions.lineplotusingx}]\n" ,"if { [lindex $datx end] < $xmin } {set xmin [lindex $datx end]}\n" ,"if { [lindex $datx end] > $xmax } {set xmax [lindex $datx end]}\n" ,"} {\n" ,"lappend datx 0\n" ,"}\n" ,"if { ${visoptions.lineplotusingy} < [llength $line] } {\n" ,"lappend daty [lindex $line ${visoptions.lineplotusingy}]\n" ,"if { [lindex $daty end] < $ymin } {set ymin [lindex $daty end]}\n" ,"if { [lindex $daty end] > $ymax } {set ymax [lindex $daty end]}\n" ,"} {\n" ,"lappend daty 0\n" ,"}\n" ,"}\n" ,"}\n" ,"close $fileId\n" ,"}\n" ,"}\n" ,"proc lineplotdialog { } {\n" ,"set w .lineplot_dlg\n" ,"if {[winfo exists .lineplot_dlg] == 1} {\n" ,"wm withdraw $w\n" ,"wm deiconify $w\n" ,"focus $w\n" ,"} {\n" ,"toplevel $w\n" ,"ttk::frame $w.filesettings -relief groove -borderwidth 3\n" ,"ttk::frame $w.filesettings.title\n" ,"ttk::radiobutton $w.filesettings.title.choose -variable visoptions.lineplotsource \\\n" ,"-value file -text \"Data from File\"\n" ,"pack $w.filesettings.title.choose -side left\n" ,"pack $w.filesettings.title\n" ,"global visoptions.lineplotselectedeval\n" ,"global visoptions.lineplotfile\n" ,"global visoptions.evaluatefilenames\n" ,"global visoptions.evaluatefiledescriptions\n" ,"set evdata [NGS_GetData evaluatefiles]\n" ,"set visoptions.evaluatefilenames none\n" ,"set visoptions.evaluatefiledescriptions none\n" ,"for {set i 0} {[expr $i+1] < [llength $evdata]} {incr i 2} {\n" ,"lappend visoptions.evaluatefilenames [lindex $evdata $i]\n" ,"lappend visoptions.evaluatefiledescriptions [lindex $evdata [expr $i+1]]\n" ,"}\n" ,"ttk::frame $w.filesettings.latestevals\n" ,"ttk::label $w.filesettings.latestevals.lab -text \"Use Evaluate Results: \"\n" ,"ttk::menubutton $w.filesettings.latestevals.but -menu $w.filesettings.latestevals.menu -text \"coarse\" -width 40\n" ,"menu $w.filesettings.latestevals.menu -tearoff 0\n" ,"for {set i 0} {$i < [llength ${visoptions.evaluatefilenames}]} {incr i} {\n" ,"$w.filesettings.latestevals.menu add command -label $i\\\n" ,"-command \"set visoptions.lineplotselectedeval $i ; $w.filesettings.latestevals.but configure -text \\\"[lindex ${visoptions.evaluatefiledescriptions} $i] ([lindex ${visoptions.evaluatefilenames} $i])\\\"\"\n" ,"}\n" ,"$w.filesettings.latestevals.menu invoke ${visoptions.lineplotselectedeval}\n" ,"grid $w.filesettings.latestevals.lab $w.filesettings.latestevals.but -sticky nw\n" ,"pack $w.filesettings.latestevals\n" ,"ttk::frame $w.filesettings.sfn\n" ,"ttk::button $w.filesettings.sfn.bb -text \"Browse\" \\\n" ,"-command { set visoptions.lineplotfile [tk_getOpenFile] }\n" ,"ttk::entry $w.filesettings.sfn.fn -width 50 \\\n" ,"-textvariable visoptions.lineplotfile\n" ,"pack $w.filesettings.sfn.bb $w.filesettings.sfn.fn -side left\n" ,"pack $w.filesettings.sfn\n" ,"ttk::button $w.filesettings.refresh -text \"Refresh\" -command {\n" ,"if { ${visoptions.lineplotselectedeval} != 0} {\n" ,"set visoptions.lineplotfile [lindex ${visoptions.evaluatefilenames} ${visoptions.lineplotselectedeval}]\n" ,"}\n" ,"set saveusingx ${visoptions.lineplotusingx}\n" ,"set saveusingy ${visoptions.lineplotusingy}\n" ,"for { set i 0 } { $i < [llength ${visoptions.lineplotdatadescr}] } { incr i } {\n" ,"${visoptions.lineplotxcoordselector} delete $i\n" ,"}\n" ,"for { set i 0 } { $i < [llength ${visoptions.lineplotdatadescr}] } { incr i } {\n" ,"${visoptions.lineplotycoordselector} delete $i\n" ,"}\n" ,"set fileId [open ${visoptions.lineplotfile} r]\n" ,"set line \"\"\n" ,"gets $fileId line\n" ,"close $fileId\n" ,"if { [lindex $line 0] == \"\\\n" ,"set visoptions.lineplotdatadescr [lrange $line 1 end]\n" ,"} {\n" ,"set visoptions.lineplotdatadescr \"\"\n" ,"for { set i 0 } { $i < [llength $line] } { incr i } {\n" ,"lappend visoptions.lineplotdatadescr \"data[expr $i+1]\"\n" ,"}\n" ,"}\n" ,"for { set i 0 } { $i < [llength ${visoptions.lineplotdatadescr}] } { incr i } {\n" ,"${visoptions.lineplotxcoordselector} add command $i -label [lindex ${visoptions.lineplotdatadescr} $i]\n" ,"}\n" ,"for { set i 0 } { $i < [llength ${visoptions.lineplotdatadescr}] } { incr i } {\n" ,"${visoptions.lineplotycoordselector} add command $i -label [lindex ${visoptions.lineplotdatadescr} $i]\n" ,"}\n" ,"if { $saveusingx < [llength ${visoptions.lineplotdatadescr}] } {\n" ,"set visoptions.lineplotusingx $saveusingx\n" ,"} {\n" ,"set visoptions.lineplotusingx 0\n" ,"}\n" ,"if { $saveusingy < [llength ${visoptions.lineplotdatadescr}] } {\n" ,"set visoptions.lineplotusingy $saveusingy\n" ,"} {\n" ,"set visoptions.lineplotusingy 1\n" ,"}\n" ,"}\n" ,"pack $w.filesettings.refresh\n" ,"ttk::frame $w.filesettings.using\n" ,"global visoptions.lineplotdatadescr\n" ,"ttk::frame $w.filesettings.using.xco\n" ,"ttk::label $w.filesettings.using.xco.lab -text \"X-Coord:\"\n" ,"ttk::menubutton $w.filesettings.using.xco.but -menu $w.filesettings.using.xco.menu -text \"\" -width 15\n" ,"menu $w.filesettings.using.xco.menu -tearoff 0\n" ,"for {set i 0} {$i < [llength ${visoptions.lineplotdatadescr}]} {incr i} {\n" ,"$w.filesettings.using.xco.menu add command -label [lindex ${visoptions.lineplotdatadescr} $i]\\\n" ,"-command \"set visoptions.lineplotusingx $i ; $w.filesettings.using.xco.but configure -text \\\"[lindex ${visoptions.lineplotdatadescr} $i]\\\"\"\n" ,"}\n" ,"$w.filesettings.using.xco.menu invoke [lindex ${visoptions.lineplotdatadescr} 0]\n" ,"grid $w.filesettings.using.xco.lab $w.filesettings.using.xco.but -sticky nw\n" ,"ttk::frame $w.filesettings.using.yco\n" ,"ttk::label $w.filesettings.using.yco.lab -text \"Y-Coord:\"\n" ,"ttk::menubutton $w.filesettings.using.yco.but -menu $w.filesettings.using.yco.menu -text \"\" -width 15\n" ,"menu $w.filesettings.using.yco.menu -tearoff 0\n" ,"for {set i 0} {$i < [llength ${visoptions.lineplotdatadescr}]} {incr i} {\n" ,"$w.filesettings.using.yco.menu add command -label [lindex ${visoptions.lineplotdatadescr} $i]\\\n" ,"-command \"set visoptions.lineplotusingy $i ; $w.filesettings.using.yco.but configure -text \\\"[lindex ${visoptions.lineplotdatadescr} $i]\\\"\"\n" ,"}\n" ,"$w.filesettings.using.yco.menu invoke [lindex ${visoptions.lineplotdatadescr} 0]\n" ,"grid $w.filesettings.using.yco.lab $w.filesettings.using.yco.but -sticky nw\n" ,"global visoptions.lineplotxcoordselector\n" ,"global visoptions.lineplotycoordselector\n" ,"set visoptions.lineplotxcoordselector $w.filesettings.using.xco\n" ,"set visoptions.lineplotycoordselector $w.filesettings.using.yco\n" ,"pack $w.filesettings.using.xco $w.filesettings.using.yco -side left\n" ,"pack $w.filesettings.using\n" ,"pack $w.filesettings -fill x -ipady 3\n" ,"ttk::frame $w.settings -relief groove -borderwidth 3\n" ,"ttk::label $w.settings.title -text \"\\nSettings\\n\"\n" ,"pack $w.settings.title\n" ,"ttk::frame $w.settings.minmax\n" ,"ttk::checkbutton $w.settings.minmax.autoscale -text \"Autoscale\" -variable visoptions.lineplotautoscale\n" ,"ttk::frame $w.settings.minmax.xmin\n" ,"ttk::label $w.settings.minmax.xmin.label -text \"Min. x: \"\n" ,"ttk::spinbox $w.settings.minmax.xmin.sp -textvariable visoptions.lineplotxmin -width 6 -increment 0.1 -validate focus -validatecommand \"my_validatespinbox %W %P 3\" \\\n" ,"-invalidcommand \"my_invalidspinbox %W\" -from -1e9 -to 1e9\n" ,"ttk::frame $w.settings.minmax.xmax\n" ,"ttk::label $w.settings.minmax.xmax.label -text \"Max. x: \"\n" ,"ttk::spinbox $w.settings.minmax.xmax.sp -textvariable visoptions.lineplotxmax -width 6 -increment 0.1 -validate focus -validatecommand \"my_validatespinbox %W %P 3\" \\\n" ,"-invalidcommand \"my_invalidspinbox %W\" -from -1e9 -to 1e9\n" ,"ttk::frame $w.settings.minmax.ymin\n" ,"ttk::label $w.settings.minmax.ymin.label -text \"Min. y: \"\n" ,"ttk::spinbox $w.settings.minmax.ymin.sp -textvariable visoptions.lineplotymin -width 6 -increment 0.1 -validate focus -validatecommand \"my_validatespinbox %W %P 3\" \\\n" ,"-invalidcommand \"my_invalidspinbox %W\" -from -1e9 -to 1e9\n" ,"ttk::frame $w.settings.minmax.ymax\n" ,"ttk::label $w.settings.minmax.ymax.label -text \"Max. y: \"\n" ,"ttk::spinbox $w.settings.minmax.ymax.sp -textvariable visoptions.lineplotymax -width 6 -increment 0.1 -validate focus -validatecommand \"my_validatespinbox %W %P 3\" \\\n" ,"-invalidcommand \"my_invalidspinbox %W\" -from -1e9 -to 1e9\n" ,"pack $w.settings.minmax.xmin.label $w.settings.minmax.xmin.sp\n" ,"pack $w.settings.minmax.xmax.label $w.settings.minmax.xmax.sp\n" ,"pack $w.settings.minmax.ymin.label $w.settings.minmax.ymin.sp\n" ,"pack $w.settings.minmax.ymax.label $w.settings.minmax.ymax.sp\n" ,"pack $w.settings.minmax.autoscale $w.settings.minmax.xmin $w.settings.minmax.xmax \\\n" ,"$w.settings.minmax.ymin $w.settings.minmax.ymax -side left\n" ,"pack $w.settings.minmax\n" ,"ttk::label $w.settings.empty1 -text \"\"\n" ,"pack $w.settings.empty1\n" ,"ttk::frame $w.settings.plotsize\n" ,"ttk::frame $w.settings.plotsize.xsize\n" ,"ttk::label $w.settings.plotsize.xsize.label -text \"Plotsize x: \"\n" ,"ttk::spinbox $w.settings.plotsize.xsize.sp -textvariable visoptions.lineplotsizex -width 6 -increment 1 -validate focus -validatecommand \"my_validatespinbox %W %P 0\" \\\n" ,"-invalidcommand \"my_invalidspinbox %W\" -from -1e9 -to 1e9\n" ,"pack $w.settings.plotsize.xsize.label $w.settings.plotsize.xsize.sp\n" ,"ttk::frame $w.settings.plotsize.ysize\n" ,"ttk::label $w.settings.plotsize.ysize.label -text \"Plotsize y: \"\n" ,"ttk::spinbox $w.settings.plotsize.ysize.sp -textvariable visoptions.lineplotsizey -width 6 -increment 1 -validate focus -validatecommand \"my_validatespinbox %W %P 0\" \\\n" ,"-invalidcommand \"my_invalidspinbox %W\" -from -1e9 -to 1e9\n" ,"pack $w.settings.plotsize.ysize.label $w.settings.plotsize.ysize.sp\n" ,"pack $w.settings.plotsize.xsize $w.settings.plotsize.ysize -side left\n" ,"pack $w.settings.plotsize\n" ,"ttk::label $w.settings.empty2 -text \"\"\n" ,"pack $w.settings.empty2\n" ,"ttk::frame $w.settings.color\n" ,"ttk::label $w.settings.color.lab -text \"Linecolor: \"\n" ,"ttk::menubutton $w.settings.color.but -menu $w.settings.color.menu -text \"\" -width 15\n" ,"menu $w.settings.color.menu -tearoff 0\n" ,"foreach step { red black blue green yellow } {\n" ,"$w.settings.color.menu add command -label $step -command \"set visoptions.lineplotcolor $step; $w.settings.color.but configure -text \\\"$step\\\"\"\n" ,"}\n" ,"$w.settings.color.menu invoke \"red\"\n" ,"grid $w.settings.color.lab $w.settings.color.but -sticky nw\n" ,"pack $w.settings.color\n" ,"pack $w.settings -fill x\n" ,"set datax \"\"\n" ,"set datay \"\"\n" ,"set xmin 0\n" ,"set xmax 0\n" ,"set ymin 0\n" ,"set ymax 0\n" ,"ttk::frame $w.plots -relief groove -borderwidth 3\n" ,"ttk::frame $w.plots.selplot\n" ,"ttk::label $w.plots.selplot.lab -text \"Linecolor: \"\n" ,"ttk::menubutton $w.plots.selplot.but -menu $w.plots.selplot.menu -text \"\" -width 15\n" ,"menu $w.plots.selplot.menu -tearoff 0\n" ,"$w.plots.selplot.menu add command -label \"None\" -command \"set visoptions.lineplotselected \\\"None\\\"; $w.plots.selplot.but configure -text \\\"None\\\"\"\n" ,"grid $w.plots.selplot.lab $w.plots.selplot.but -sticky nw\n" ,"$w.plots.selplot.menu invoke \"None\"\n" ,"global visoptions.lineplotselector\n" ,"set visoptions.lineplotselector $w.plots.selplot.menu\n" ,"ttk::button $w.plots.new -text \"Generate New Plot\" -command {\n" ,"if { ${visoptions.lineplotselectedeval} != 0} {\n" ,"set visoptions.lineplotfile [lindex ${visoptions.evaluatefilenames} ${visoptions.lineplotselectedeval}]\n" ,"}\n" ,"getlineplotdata datax datay xmin xmax ymin ymax\n" ,"puts stdout \"xmin $xmin xmax $xmax ymin $ymin ymax $ymax\"\n" ,"global visoptions.lineplotautoscale\n" ,"if {! ${visoptions.lineplotautoscale}} {\n" ,"puts \"using set min/max values\"\n" ,"set xmin ${visoptions.lineplotxmin}\n" ,"set xmax ${visoptions.lineplotxmax}\n" ,"set ymin ${visoptions.lineplotymin}\n" ,"set ymax ${visoptions.lineplotymax}\n" ,"}\n" ,"incr visoptions.lineplotcurrentnum\n" ,"set ident .newplot${visoptions.lineplotcurrentnum}\n" ,"set plotinfo \"\"\n" ,"createlineplot ${visoptions.lineplotsizex} ${visoptions.lineplotsizey} \\\n" ,"$ident \"Lineplot ${visoptions.lineplotcurrentnum}\" \\\n" ,"$xmin $xmax $ymin $ymax plotinfo\n" ,"lappend visoptions.lineplotinfos $plotinfo\n" ,"${visoptions.lineplotselector} add command ${visoptions.lineplotcurrentnum} -label \"Lineplot ${visoptions.lineplotcurrentnum}\"\n" ,"addplotline $ident $datax $datay $plotinfo ${visoptions.lineplotcolor}\n" ,"}\n" ,"ttk::button $w.plots.addto -text \"Add to Selected Plot\" -command {\n" ,"if { ${visoptions.lineplotselectedeval} != 0} {\n" ,"set visoptions.lineplotfile [lindex ${visoptions.evaluatefilenames} ${visoptions.lineplotselectedeval}]\n" ,"}\n" ,"if { ${visoptions.lineplotselected} != \"none\" } {\n" ,"getlineplotdata datax datay xmin xmax ymin ymax\n" ,"set ident .newplot${visoptions.lineplotselected}\n" ,"set plotinfo [lindex ${visoptions.lineplotinfos} ${visoptions.lineplotselected}]\n" ,"addplotline $ident $datax $datay $plotinfo ${visoptions.lineplotcolor}\n" ,"}\n" ,"}\n" ,"pack $w.plots.new $w.plots.addto $w.plots.selplot\n" ,"pack $w.plots -fill x -ipady 3\n" ,"ttk::button $w.close -text \"Close\" -command \"destroy $w\"\n" ,"pack $w.close\n" ,"wm withdraw $w\n" ,"wm geom $w +200+100\n" ,"wm deiconify $w\n" ,"wm title $w \"2D Lineplots\"\n" ,"focus $w\n" ,"}\n" ,"}\n" ,"set fieldlinesdialog_pop1 0\n" ,"proc fieldlinesdialog { } {\n" ,"set w .fieldlines_dlg\n" ,"global fieldlinesdialog_pop1\n" ,"set fieldlinesdialog_pop1 1\n" ,"if {[winfo exists .fieldlines_dlg] == 1} {\n" ,"wm withdraw $w\n" ,"wm deiconify $w\n" ,"focus $w\n" ,"} {\n" ,"toplevel $w\n" ,"pack [ttk::notebook $w.nb] -fill both -side top -ipadx 6 -ipady 6\n" ,"$w.nb add [ttk::frame $w.nb.draw] -text \"Draw\" -underline 0\n" ,"$w.nb add [ttk::frame $w.nb.settings] -text \"Settings\" -underline 0\n" ,"set f $w.nb.draw\n" ,"ttk::labelframe $f.general -text \"General settings\" -relief groove -borderwidth 3\n" ,"ttk::checkbutton $f.general.enable -text \"Enable Fieldlines\" \\\n" ,"-variable visoptions.drawfieldlines \\\n" ,"-command {\n" ,"Ng_Vis_Set parameters;\n" ,"redraw\n" ,"}\n" ,"ttk::label $f.general.numl -text \"num:\"\n" ,"ttk::spinbox $f.general.num -from 0 -to 100 -increment 1 \\\n" ,"-textvariable visoptions.numfieldlines -width 4\n" ,"grid $f.general.enable -sticky nw -padx 4 -pady 2\n" ,"grid x $f.general.numl $f.general.num -rowspan 3 -sticky w -padx 4 -row 0 -pady 2\n" ,"grid anchor $f.general center\n" ,"pack $f.general -pady 15 -fill x -ipady 3\n" ,"ttk::label $f.labe0 -text \" \"\n" ,"pack $f.labe0\n" ,"ttk::checkbutton $f.general.randomstart -text \"Field dependent density \" \\\n" ,"-variable visoptions.fieldlinesrandomstart \\\n" ,"-command { Ng_Vis_Set parameters; redraw}\n" ,"ttk::checkbutton $f.general.redrawperiodic -text \"Animate periodic\" \\\n" ,"-variable visoptions.redrawperiodic \\\n" ,"-command {\n" ,"redrawperiodic\n" ,"Ng_Vis_Set parameters;\n" ,"redraw\n" ,"}\n" ,"grid $f.general.randomstart -sticky nw -padx 4 -row 1\n" ,"grid $f.general.redrawperiodic -sticky nw -padx 4 -row 2\n" ,"ttk::label $f.lab0 -text \" \"\n" ,"pack $f.lab0\n" ,"ttk::frame $f.vecfun\n" ,"ttk::label $f.vecfun.lab -text \"Vector Function: \"\n" ,"ttk::menubutton $f.vecfun.but -menu $f.vecfun.menu -text \"\" -width 12\n" ,"menu $f.vecfun.menu -tearoff 0\n" ,"for { set i 1 } { $i <= [Ng_Vis_Field getnfieldnames] } { incr i } {\n" ,"set fname [Ng_Vis_Field getfieldname $i]\n" ,"set fcomp [Ng_Vis_Field getfieldcomponents $i]\n" ,"set iscomplex [Ng_Vis_Field iscomplex $i]\n" ,"set sdim [Ng_Vis_Field getdimension]\n" ,"if { $iscomplex == 1 } { set fcomp [expr $fcomp / 2] }\n" ,"if { ($fcomp == $sdim) || ($fcomp == 3) } {\n" ,"$f.vecfun.menu add command -label $fname -command \"set visoptions.fieldlinesvecfunction $fname;Ng_Vis_Set parameters; redraw;$f.vecfun.but configure -text \\\"$fname\\\" \" }\n" ,"}\n" ,"grid $f.vecfun.lab $f.vecfun.but -sticky nw\n" ,"pack $f.vecfun\n" ,"ttk::label $f.lab00 -text \" \"\n" ,"pack $f.lab00\n" ,"ttk::frame $f.phasesettings\n" ,"ttk::checkbutton $f.phasesettings.onephase -text \"Fix Phase\" -variable visoptions.fieldlinesonlyonephase\n" ,"ttk::frame $f.phasesettings.phase\n" ,"ttk::label $f.phasesettings.phase.lab -text \"phi\"\n" ,"ttk::scale $f.phasesettings.phase.sc -orient horizontal -length 100 -from 0 -to 360 -variable visoptions.fieldlinesphase \\\n" ,"-command \"roundscale $f.phasesettings.phase.sc 0; popupcheckredraw3 fieldlinesdialog_pop1\"\n" ,"ttk::entry $f.phasesettings.phase.ent -width 4 -textvariable visoptions.fieldlinesphase -validate focus -takefocus 0 \\\n" ,"-validatecommand \"popupcheckredraw3 fieldlinesdialog_pop1;my_validate %W 0 1 %P 0\" \\\n" ,"-invalidcommand \"my_invalid %W;popupcheckredraw3 fieldlinesdialog_pop1\"\n" ,"grid $f.phasesettings.phase.lab $f.phasesettings.phase.sc $f.phasesettings.phase.ent -sticky nw -ipadx 4\n" ,"pack $f.phasesettings.onephase $f.phasesettings.phase -side left\n" ,"pack $f.phasesettings\n" ,"ttk::label $f.lab1 -text \" \"\n" ,"pack $f.lab1\n" ,"ttk::frame $f.boxsettings -relief groove -borderwidth 3\n" ,"ttk::frame $f.boxsettings.title\n" ,"ttk::radiobutton $f.boxsettings.title.choose -variable visoptions.fieldlinesstartarea \\\n" ,"-value box -text \"Startpoints in Box\"\n" ,"pack $f.boxsettings.title.choose -side left\n" ,"pack $f.boxsettings.title\n" ,"ttk::frame $f.boxsettings.points\n" ,"ttk::label $f.boxsettings.points.lab2 -text \"Pmin\";\n" ,"ttk::entry $f.boxsettings.points.ent1x -width 8 \\\n" ,"-textvariable visoptions.fieldlinesstartareap1x\n" ,"ttk::entry $f.boxsettings.points.ent1y -width 8 \\\n" ,"-textvariable visoptions.fieldlinesstartareap1y\n" ,"ttk::entry $f.boxsettings.points.ent1z -width 8 \\\n" ,"-textvariable visoptions.fieldlinesstartareap1z\n" ,"ttk::label $f.boxsettings.points.lab3 -text \" Pmax\";\n" ,"ttk::entry $f.boxsettings.points.ent2x -width 8 \\\n" ,"-textvariable visoptions.fieldlinesstartareap2x\n" ,"ttk::entry $f.boxsettings.points.ent2y -width 8 \\\n" ,"-textvariable visoptions.fieldlinesstartareap2y\n" ,"ttk::entry $f.boxsettings.points.ent2z -width 8 \\\n" ,"-textvariable visoptions.fieldlinesstartareap2z\n" ,"pack $f.boxsettings.points\n" ,"pack $f.boxsettings.points.lab2 $f.boxsettings.points.ent1x $f.boxsettings.points.ent1y $f.boxsettings.points.ent1z -side left\n" ,"pack $f.boxsettings.points.lab3 $f.boxsettings.points.ent2x $f.boxsettings.points.ent2y $f.boxsettings.points.ent2z -side left\n" ,"ttk::button $f.boxsettings.settobb -text \"Bounding Box\" -command {\n" ,"set bbox [Ng_MeshInfo bbox]\n" ,"set visoptions.fieldlinesstartareap1x [lindex $bbox 0]\n" ,"set visoptions.fieldlinesstartareap2x [lindex $bbox 1]\n" ,"set visoptions.fieldlinesstartareap1y [lindex $bbox 2]\n" ,"set visoptions.fieldlinesstartareap2y [lindex $bbox 3]\n" ,"set visoptions.fieldlinesstartareap1z [lindex $bbox 4]\n" ,"set visoptions.fieldlinesstartareap2z [lindex $bbox 5]\n" ,"}\n" ,"pack $f.boxsettings.settobb\n" ,"pack $f.boxsettings -fill x -ipady 3\n" ,"ttk::frame $f.facesettings -relief groove -borderwidth 3\n" ,"ttk::frame $f.facesettings.title\n" ,"ttk::radiobutton $f.facesettings.title.choose -variable visoptions.fieldlinesstartarea \\\n" ,"-value face -text \"Startpoints on Face\"\n" ,"pack $f.facesettings.title.choose -side left\n" ,"pack $f.facesettings.title\n" ,"ttk::frame $f.facesettings.index\n" ,"ttk::label $f.facesettings.index.lab -text \"face index:\"\n" ,"ttk::label $f.facesettings.index.ent -text 1;\n" ,"pack $f.facesettings.index.lab $f.facesettings.index.ent -side left\n" ,"pack $f.facesettings.index\n" ,"pack $f.facesettings -fill x -ipady 3\n" ,"global visoptions.fieldlinesfilename\n" ,"ttk::frame $f.filesettings -relief groove -borderwidth 3\n" ,"ttk::frame $f.filesettings.title\n" ,"ttk::radiobutton $f.filesettings.title.choose -variable visoptions.fieldlinesstartarea \\\n" ,"-value file -text \"Startpoints from File\"\n" ,"pack $f.filesettings.title.choose -side left\n" ,"pack $f.filesettings.title\n" ,"ttk::frame $f.filesettings.sfn\n" ,"ttk::button $f.filesettings.sfn.bb -text \"Browse\" \\\n" ,"-command {\n" ,"set types {\n" ,"{ \"Netgen Fieldlines\" {.nef} }\n" ,"}\n" ,"set visoptions.fieldlinesfilename [tk_getOpenFile -filetypes $types -defaultextension \".nef\"]\n" ,"}\n" ,"ttk::entry $f.filesettings.sfn.fn -width 50 \\\n" ,"-textvariable visoptions.fieldlinesfilename\n" ,"pack $f.filesettings.sfn.bb $f.filesettings.sfn.fn -side left\n" ,"pack $f.filesettings.sfn\n" ,"pack $f.filesettings -fill x -ipady 3\n" ,"set g $w.nb.settings\n" ,"ttk::frame $g.linesettings -relief groove -borderwidth 3\n" ,"ttk::label $g.linesettings.title -text \"\\nLine Settings\\n\"\n" ,"ttk::frame $g.linesettings.length\n" ,"ttk::label $g.linesettings.length.lab -text \"rel. Length: \"\n" ,"ttk::spinbox $g.linesettings.length.sp -textvariable visoptions.fieldlineslength -width 6 -increment 0.1 -validate focus -validatecommand \"my_validatespinbox %W %P 5\" \\\n" ,"-invalidcommand \"my_invalidspinbox %W\" -from 0.00001 -to 10000\n" ,"grid $g.linesettings.length.lab $g.linesettings.length.sp -sticky nw\n" ,"ttk::frame $g.linesettings.maxpoints\n" ,"ttk::label $g.linesettings.maxpoints.lab -text \"max. Points: \"\n" ,"ttk::spinbox $g.linesettings.maxpoints.sp -textvariable visoptions.fieldlinesmaxpoints -width 6 -increment 1 -validate focus -validatecommand \"my_validatespinbox %W %P 0\" \\\n" ,"-invalidcommand \"my_invalidspinbox %W\" -from 0 -to 10000\n" ,"grid $g.linesettings.maxpoints.lab $g.linesettings.maxpoints.sp -sticky nw\n" ,"ttk::frame $g.linesettings.thick\n" ,"ttk::label $g.linesettings.thick.lab -text \"rel. Thickness: \"\n" ,"ttk::spinbox $g.linesettings.thick.sp -textvariable visoptions.fieldlinesthickness -width 6 -increment 0.001 -validate focus -validatecommand \"my_validatespinbox %W %P 6\" \\\n" ,"-invalidcommand \"my_invalidspinbox %W\" -from 1e-10 -to 0.5\n" ,"grid $g.linesettings.thick.lab $g.linesettings.thick.sp -stick nw\n" ,"pack $g.linesettings.title $g.linesettings.length $g.linesettings.maxpoints $g.linesettings.thick\n" ,"pack $g.linesettings -fill x -ipady 3\n" ,"global visoptions.fieldlinestolerance\n" ,"ttk::frame $g.odesettings -relief groove -borderwidth 3\n" ,"ttk::label $g.odesettings.title -text \"\\nODE Settings\\n\"\n" ,"ttk::frame $g.odesettings.tol\n" ,"ttk::label $g.odesettings.tol.lab -text \"rel. Thickness: \"\n" ,"ttk::spinbox $g.odesettings.tol.sp -textvariable visoptions.fieldlinestolerance -width 6 -increment 0.01 -validate focus -validatecommand \"my_validatespinbox %W %P 5\" \\\n" ,"-invalidcommand \"my_invalidspinbox %W\" -from 0.00001 -to 1\n" ,"grid $g.odesettings.tol.lab $g.odesettings.tol.sp -stick nw\n" ,"ttk::frame $g.odesettings.rktype\n" ,"ttk::label $g.odesettings.rktype.lab -text \"RK-Type \"\n" ,"ttk::menubutton $g.odesettings.rktype.but -menu $g.odesettings.rktype.menu -text \"\" -width 25\n" ,"menu $g.odesettings.rktype.menu -tearoff 0\n" ,"$g.odesettings.rktype.menu add command -label \"Euler, order 1\" -command \"set visoptions.fieldlinesrktype \\\"euler\\\" ;Ng_Vis_Set parameters; redraw;$g.odesettings.rktype.but configure -text \\\"Euler,order 1\\\" \"\n" ,"$g.odesettings.rktype.menu add command -label \"Euler-Cauchy, order 2\" -command \"set visoptions.fieldlinesrktype \\\"eulercauchy\\\" ;Ng_Vis_Set parameters; redraw;$g.odesettings.rktype.but configure -text \\\"Euler-Cauchy,order 2\\\" \"\n" ,"$g.odesettings.rktype.menu add command -label \"Simpson, order 3\" -command \"set visoptions.fieldlinesrktype \\\"simpson\\\" ;Ng_Vis_Set parameters; redraw;$g.odesettings.rktype.but configure -text \\\"Simpson,order 3\\\"\"\n" ,"$g.odesettings.rktype.menu add command -label \"classical Runge-Kutta, order 4\" -command \"set visoptions.fieldlinesrktype \\\"crungekutta\\\" ;Ng_Vis_Set parameters; redraw; $g.odesettings.rktype.but configure -text \\\"classical Runge-Kutta,order 4\\\"\"\n" ,"$g.odesettings.rktype.menu invoke \"classical Runge-Kutta, order 4\"\n" ,"grid $g.odesettings.rktype.lab $g.odesettings.rktype.but -sticky nw\n" ,"pack $g.odesettings.title $g.odesettings.tol $g.odesettings.rktype\n" ,"pack $g.odesettings -fill x -ipady 3\n" ,"ttk::frame $w.bu\n" ,"pack $w.bu -fill x -ipady 3\n" ,"ttk::button $w.bu.calc -text \"Build Fieldlines\" -command {\n" ,"if { ${visoptions.fieldlinesvecfunction} == \"none\" } {\n" ,"bgerror \"Please select the vector function first!\"\n" ,"} {\n" ,"set visoptions.drawfieldlines 1\n" ,"Ng_Vis_Set parameters\n" ,"Ng_BuildFieldLines\n" ,"redraw\n" ,"}\n" ,"}\n" ,"ttk::button $w.bu.help -text \"Help\" -command {\n" ,"if {[winfo exists .fieldlines_help] == 1} {\n" ,"wm withdraw .fieldlines_help\n" ,"wm deiconify .fieldlines_help\n" ,"focus .fieldlines_help\n" ,"} {\n" ,"toplevel .fieldlines_help\n" ,"set f [frame .fieldlines_help.ht]\n" ,"ttk::scrollbar $f.vsb -orient vertical -command [list $f.t yview]\n" ,"text $f.t -yscrollcommand [list $f.vsb set]\n" ,"grid $f.t -row 0 -column 0 -sticky nsew\n" ,"grid $f.vsb -row 0 -column 1 -sticky nsew\n" ,"grid columnconfigure $f 0 -weight 1\n" ,"grid rowconfigure $f 0 -weight 1\n" ,"set text $f.t\n" ,"$text configure -setgrid true -wrap word\n" ,"$text tag configure bold -font *-*-bold-*-*-*-*\n" ,"$text insert end \\\n" ,"\"Draw menu\\n \\n\" bold\n" ,"$text insert end \\\n" ,"\"Enable Fieldlines\\n To turn on and off the calculated fieldlines. (Has to be turned on to start the calculation)\\n\"\n" ,"$text insert end \\\n" ,"\"Num\\n Number of fieldlines to calculate. (May not be used exactly.)\"\n" ,"$text insert end \\\n" ,"\"Field dependent density\\n There will be more fieldline startpoints where the field is stronger\\n\\n\"\n" ,"$text insert end \\\n" ,"\"Animate periodic\\n (for quasistationary fields) The fieldlines of the different phase angles are animated.\\n ATTENTION: \\\"Fix Phase\\\" has to be turned off\\n\\n\"\n" ,"$text insert end \\\n" ,"\"Vector Function\\n The function fixing the direction of the lines\\n\\n\"\n" ,"$text insert end \\\n" ,"\"Fix Phase\\n (for quasistationary fields) Only calculate and draw fieldlines for one special phase angle.\\n\\n\"\n" ,"$text insert end \\\n" ,"\"Startpoints in Box\\n Set the startpoints inside the box \\[Pmin1,Pmax1\\] x \\[Pmin2,Pmax2\\] x \\[Pmin3,Pmax3\\]\\n\"\n" ,"$text insert end \\\n" ,"\" With the button \\\"Bounding Box\\\" the whole bounding box of the geometry is selected.\\n\\n\"\n" ,"$text insert end \\\n" ,"\"Startpoints on Face\\n All startpoints will be set on one face. This face is selected by double-clicking with the mouse.\\n\\n\"\n" ,"$text insert end \\\n" ,"\"Startpoints from File\\n The startpoint information will be read from the selected file.\\n The entries in the file can be as follows:\\n\"\n" ,"$text insert end \\\n" ,"\" point \\n set a (potential) startpoint\\n\"\n" ,"$text insert end \\\n" ,"\" line \\n set n (potential) startpoints on the line from (x1,y1,z1) to (x2,y2,z2)\\n\"\n" ,"$text insert end \\\n" ,"\" box \\n set n (potential) startpoints inside the box \\[x1,x2\\] x \\[y1,y2\\] x \\[z1,z2\\]\\n\"\n" ,"$text insert end \\\n" ,"\" ATTENTION: These are potential startpoints.\\n The total number of startpoints will be bounded by the \\\"Num\\\"-parameter.\\n \\n \\n \\n\"\n" ,"$text insert end \\\n" ,"\"Settings Menu\\n \\n\" bold\n" ,"$text insert end \\\n" ,"\"rel. Length\\n The maximal length of a fieldline relative to the diameter of the geometry.\\n\\n\"\n" ,"$text insert end \\\n" ,"\"max. Points\\n The maximum number of Runge-Kutta steps.\\n\\n\"\n" ,"$text insert end \\\n" ,"\"rel. Thickness\\n The thickness of the fieldlines relative to the diameter of the geometry.\\n\\n\"\n" ,"$text insert end \\\n" ,"\"rel. Tolerance\\n The tolerance for the step-length control of the Runge-Kutta method.\\n\\n\"\n" ,"$text insert end \\\n" ,"\"RK-Type\\n Which Runge-Kutta scheme to use\\n \\n \\n \\n\"\n" ,"$text insert end \\\n" ,"\"Button \\\"Build Fieldlines\\\"\\n\" bold\n" ,"$text insert end \\\n" ,"\" Build the fieldlines.\"\n" ,"$text configure -state disabled\n" ,"pack .fieldlines_help.ht -expand yes -fill both\n" ,"wm withdraw .fieldlines_help\n" ,"wm geom .fieldlines_help +300+200\n" ,"wm deiconify .fieldlines_help\n" ,"wm title .fieldlines_help \"Fieldlines Help\"\n" ,"focus .fieldlines_help\n" ,"}\n" ,"}\n" ,"ttk::button $w.bu.cancel -text \"Done\" -command \"destroy $w\"\n" ,"grid $w.bu.calc $w.bu.help $w.bu.cancel -sticky nw -padx 4\n" ,"grid anchor $w.bu center\n" ,"wm withdraw $w\n" ,"wm geom $w +200+100\n" ,"wm deiconify $w\n" ,"wm title $w \"Fieldlines\"\n" ,"focus $w\n" ,"}\n" ,"global visoptions.fieldlinesstartface\n" ,"set f $w.nb.draw\n" ,"set visoptions.fieldlinesstartface [Ng_BCProp getactive]\n" ,"$f.facesettings.index.ent configure -text ${visoptions.fieldlinesstartface}\n" ,"}\n" ,"set visual_dialog_pop1 0\n" ,"set visual_dialog_pop2 0\n" ,"set visual_dialog_pop3 0\n" ,"set visual_dialog_pop4 0\n" ,"set visual_dialog_pop5 0\n" ,"set visual_dialog_pop6 0\n" ,"set visual_dialog_pop7 0\n" ,"proc visual_dialog { } {\n" ,"set w .visoptions_dlg\n" ,"global visual_dialog_pop1\n" ,"global visual_dialog_pop2\n" ,"global visual_dialog_pop3\n" ,"global visual_dialog_pop4\n" ,"global visual_dialog_pop5\n" ,"global visual_dialog_pop6\n" ,"global visual_dialog_pop7\n" ,"set visual_dialog_pop1 1\n" ,"set visual_dialog_pop2 1\n" ,"set visual_dialog_pop3 1\n" ,"set visual_dialog_pop4 1\n" ,"set visual_dialog_pop5 1\n" ,"set visual_dialog_pop6 1\n" ,"set visual_dialog_pop7 1\n" ,"if {[winfo exists .visoptions_dlg] == 1} {\n" ,"wm withdraw $w\n" ,"wm deiconify $w\n" ,"focus $w\n" ,"} {\n" ,"toplevel $w\n" ,"ttk::frame $w.main\n" ,"pack $w.main -fill x\n" ,"set w $w.main\n" ,"ttk::frame $w.upperfr ;\n" ,"pack $w.upperfr -fill x;\n" ,"ttk::labelframe $w.upperfr.size -text \"Grid\" -relief groove -borderwidth 3\n" ,"ttk::entry $w.upperfr.size.ent -width 3 -textvariable visoptions.gridsize -validate focus -takefocus 0 -validatecommand \"popupcheckredraw visual_dialog_pop2;my_validate %W 0 200 %P 0\" \\\n" ,"-invalidcommand \"my_invalid %W;popupcheckredraw visual_dialog_pop2\"\n" ,"ttk::scale $w.upperfr.size.sc -orient horizontal -length 100 -from 1 -to 200 -variable visoptions.gridsize\\\n" ,"-command \"roundscale $w.upperfr.size.sc 0;popupcheckredraw visual_dialog_pop2\"\n" ,"ttk::labelframe $w.upperfr.offsets -text \"x / y offsets\" -relief groove -borderwidth 3\n" ,"ttk::label $w.upperfr.offsets.xlab -text \"x\"\n" ,"ttk::label $w.upperfr.offsets.ylab -text \"y\"\n" ,"ttk::scale $w.upperfr.offsets.xoffset -orient horizontal -length 100 -from 0 -to 1 -variable visoptions.xoffset \\\n" ,"-command \"roundscale $w.upperfr.offsets.xoffset 2; popupcheckredraw visual_dialog_pop3\"\n" ,"ttk::scale $w.upperfr.offsets.yoffset -orient horizontal -length 100 -from 0 -to 1 -variable visoptions.yoffset \\\n" ,"-command \"roundscale $w.upperfr.offsets.yoffset 2; popupcheckredraw visual_dialog_pop4\"\n" ,"ttk::entry $w.upperfr.offsets.entx -width 4 -textvariable visoptions.xoffset -validate focus -takefocus 0 \\\n" ,"-validatecommand \"popupcheckredraw visual_dialog_pop3;my_validate %W 0 1 %P 2\" \\\n" ,"-invalidcommand \"my_invalid %W;popupcheckredraw visual_dialog_pop3\"\n" ,"ttk::entry $w.upperfr.offsets.enty -width 4 -textvariable visoptions.yoffset -validate focus -takefocus 0 \\\n" ,"-validatecommand \"popupcheckredraw visual_dialog_pop4;my_validate %W 0 1 %P 2\" \\\n" ,"-invalidcommand \"my_invalid %W;popupcheckredraw visual_dialog_pop4\"\n" ,"pack $w.upperfr.size.sc $w.upperfr.size.ent -padx 4 -pady 12 -side left\n" ,"grid $w.upperfr.offsets.xoffset $w.upperfr.offsets.entx $w.upperfr.offsets.xlab -sticky nw -padx 4\n" ,"grid $w.upperfr.offsets.yoffset $w.upperfr.offsets.enty $w.upperfr.offsets.ylab -sticky nw -padx 4\n" ,"grid $w.upperfr.size $w.upperfr.offsets -sticky nw -pady 7 -padx 10\n" ,"grid anchor $w.upperfr center\n" ,"ttk::labelframe $w.deform -relief groove -borderwidth 3 -text \"Deformation settings\"\n" ,"ttk::checkbutton $w.deform.cb -text \"Deformation\" \\\n" ,"-variable visoptions.deformation \\\n" ,"-command { Ng_Vis_Set parameters; redraw }\n" ,"ttk::label $w.deform.l -text \"Scale: \"\n" ,"ttk::spinbox $w.deform.sc1 -from 0 -to 1e99 -textvariable visoptions.scaledeform1 -width 5 \\\n" ,"-command { Ng_Vis_Set parameters; redraw } \\\n" ,"-validate focusout -validatecommand { Ng_Vis_Set parameters; redraw; string is double %P } \\\n" ,"-invalidcommand { puts \"invalid value, %P %s\"; set visoptions.scaledeform1 1; }\n" ,"ttk::scale $w.deform.sc2 -orient horizontal -length 100 -from 0 -to 1 \\\n" ,"-variable visoptions.scaledeform2 \\\n" ,"-command { popupcheckredraw visual_dialog_pop5 }\n" ,"pack $w.deform -fill x -ipady 2 -pady 4 -ipady 3\n" ,"grid $w.deform.cb $w.deform.l $w.deform.sc1 $w.deform.sc2 -sticky nw -padx 4;\n" ,"grid anchor $w.deform center\n" ,"grid columnconfigure $w.deform 0 -pad 20\n" ,"grid columnconfigure $w.deform 2 -pad 20\n" ,"ttk::labelframe $w.as -relief groove -borderwidth 3 -text \"Scaling options\"\n" ,"ttk::checkbutton $w.as.autoscale -text \"Autoscale\" \\\n" ,"-variable visoptions.autoscale \\\n" ,"-command { Ng_Vis_Set parameters; redraw }\n" ,"ttk::label $w.as.lmin -text \"Min-value\"\n" ,"ttk::spinbox $w.as.smin -textvariable visoptions.mminval -width 5 -validate focus \\\n" ,"-validatecommand \"my_validatespinbox %W %P 10\" \\\n" ,"-command \"Ng_Vis_Set parameters; redraw;\" \\\n" ,"-invalidcommand \"my_invalidspinbox %W\" -from -1e10 -to 1e10 -increment 0.001\n" ,"ttk::label $w.as.lmax -text \"Max-value\"\n" ,"ttk::spinbox $w.as.smax -textvariable visoptions.mmaxval -width 5 -validate focus \\\n" ,"-validatecommand \"Ng_Vis_Set parameters; redraw;my_validatespinbox %W %P 10\" \\\n" ,"-command \"Ng_Vis_Set parameters; redraw;\" \\\n" ,"-invalidcommand \"my_invalidspinbox %W;Ng_Vis_Set parameters; redraw\" -from -1e10 -to 1e10 -increment 0.001\n" ,"pack $w.as -fill x -pady 5 -ipady 3\n" ,"grid $w.as.autoscale $w.as.lmin $w.as.smin $w.as.lmax $w.as.smax -sticky nw -padx 4\n" ,"grid columnconfigure $w.as 0 -pad 20\n" ,"grid columnconfigure $w.as 2 -pad 20\n" ,"grid anchor $w.as center\n" ,"ttk::frame $w.iso; \n" ,"pack $w.iso -anchor center;\n" ,"ttk::labelframe $w.iso.cb -relief groove -borderwidth 3 -text \"Iso lines / surfaces\"\n" ,"pack $w.iso.cb -side left -pady 7 -fill y\n" ,"ttk::checkbutton $w.iso.cb.isolines -text \"Iso-lines\" \\\n" ,"-variable visoptions.isolines \\\n" ,"-command { Ng_Vis_Set parameters; redraw }\n" ,"ttk::checkbutton $w.iso.cb.isosurf -text \"Iso-Surface\" \\\n" ,"-variable visoptions.isosurf \\\n" ,"-command { Ng_Vis_Set parameters; redraw }\n" ,"ttk::label $w.iso.cb.numisol -text \"amount\"\n" ,"ttk::scale $w.iso.cb.numiso -orient horizontal -length 100 -from 2 -to 50 \\\n" ,"-variable visoptions.numiso \\\n" ,"-command \"roundscale $w.iso.cb.numiso 0;popupcheckredraw visual_dialog_pop6\"\n" ,"ttk::entry $w.iso.cb.entry -textvariable visoptions.numiso -width 3 \\\n" ,"-validate focus -validatecommand \"popupcheckredraw visual_dialog_pop6;\\\n" ,"my_validate %W [$w.iso.cb.numiso cget -from] [$w.iso.cb.numiso cget -to] %P 0\" \\\n" ,"-invalidcommand \"my_invalid %W;popupcheckredraw visual_dialog_pop6\"\n" ,"grid $w.iso.cb.isolines $w.iso.cb.numisol $w.iso.cb.entry -sticky nw -padx 4\n" ,"grid $w.iso.cb.isosurf -sticky nw -padx 4\n" ,"grid $w.iso.cb.numiso -sticky nw -padx 4 -columnspan 2 -column 1 -row 1\n" ,"ttk::labelframe $w.iso.subdiv -text \"Subdivision\" -relief groove -borderwidth 3\n" ,"ttk::radiobutton $w.iso.subdiv.zero -text \"0\" -variable visoptions.subdivisions -value 0 \\\n" ,"-command {\n" ,"Ng_Vis_Set parameters; redraw;\n" ,"}\n" ,"ttk::radiobutton $w.iso.subdiv.one -text \"1\" -variable visoptions.subdivisions -value 1 \\\n" ,"-command {\n" ,"Ng_Vis_Set parameters; redraw;\n" ,"}\n" ,"ttk::radiobutton $w.iso.subdiv.two -text \"2\" -variable visoptions.subdivisions -value 2 \\\n" ,"-command {\n" ,"Ng_Vis_Set parameters; redraw;\n" ,"}\n" ,"ttk::radiobutton $w.iso.subdiv.three -text \"3\" -variable visoptions.subdivisions -value 3 \\\n" ,"-command {\n" ,"Ng_Vis_Set parameters; redraw;\n" ,"}\n" ,"ttk::radiobutton $w.iso.subdiv.four -text \"4\" -variable visoptions.subdivisions -value 4 \\\n" ,"-command {\n" ,"Ng_Vis_Set parameters; redraw;\n" ,"}\n" ,"ttk::radiobutton $w.iso.subdiv.five -text \"5\" -variable visoptions.subdivisions -value 5 \\\n" ,"-command {\n" ,"Ng_Vis_Set parameters; redraw;\n" ,"}\n" ,"ttk::label $w.iso.subdiv.text -text \"subdivision\"\n" ,"pack $w.iso.subdiv -side right -fill y -padx 4 -pady 7\n" ,"grid $w.iso.subdiv.zero $w.iso.subdiv.one $w.iso.subdiv.two $w.iso.subdiv.three $w.iso.subdiv.four $w.iso.subdiv.five\n" ,"grid anchor $w.iso.subdiv center\n" ,"ttk::labelframe $w.redraw -relief groove -borderwidth 3 -text \"Auto-redraw\"\n" ,"ttk::checkbutton $w.redraw.auto -text \"Auto-redraw after (sec)\" \\\n" ,"-variable visoptions.autoredraw\n" ,"ttk::spinbox $w.redraw.val -textvariable visoptions.autoredrawtime -from 0 -to 100 -width 3\n" ,"pack $w.redraw -fill x -ipady 3 -pady 7\n" ,"grid $w.redraw.auto $w.redraw.val -sticky nw\n" ,"grid anchor $w.redraw center\n" ,"ttk::labelframe $w.lowerframe -text \"Additional viewing options\" -relief groove -borderwidth 3\n" ,"pack $w.lowerframe -fill x\n" ,"set w $w.lowerframe\n" ,"ttk::frame $w.f1\n" ,"set f [ttk::frame $w.f1.clipsol]\n" ,"pack $f -anchor e\n" ,"menu $f.m\n" ,"ttk::menubutton $f.b -menu $f.m -width 12\n" ,"ttk::label $f.l -text \"Clipping Plane Sol: \"\n" ,"global visoptions.clipsolution\n" ,"set clipsollabs(none) \"None\"\n" ,"set clipsollabs(scal) \"Scalar Function\"\n" ,"set clipsollabs(vec) \"Vector Function\"\n" ,"foreach i { none scal vec } {\n" ,"set textval $clipsollabs($i)\n" ,"$f.m add command -label \"$textval\" -command \\\n" ,"\"$f.b configure -text \\\"$textval\\\" ; set visoptions.clipsolution $i ; Ng_Vis_Set parameters ; redraw \"\n" ,"}\n" ,"pack $f.b $f.l -side right\n" ,"$f.m invoke $clipsollabs(${visoptions.clipsolution})\n" ,"set f [ttk::frame $w.f1.scalfun]\n" ,"pack $f -anchor e\n" ,"menu $f.m\n" ,"ttk::menubutton $f.b -menu $f.m -width 12\n" ,"ttk::label $f.l -text \"Scalar Function: \"\n" ,"set scalentries [list none None]\n" ,"for { set i 1 } { $i <= [Ng_Vis_Field getnfieldnames] } { incr i } {\n" ,"set fname [Ng_Vis_Field getfieldname $i]\n" ,"set fcomp [Ng_Vis_Field getfieldcomponents $i]\n" ,"if { $fcomp == 1 } {\n" ,"lappend scalentries $fname:1 $fname\n" ,"} {\n" ,"for { set j 1 } { $j <= $fcomp } { incr j } {\n" ,"lappend scalentries $fname:$j \"$fname ($j)\"\n" ,"}\n" ,"lappend scalentries $fname:0 \"func ($fname)\"\n" ,"}\n" ,"}\n" ,"global visoptions.scalfunction\n" ,"foreach { name textval } $scalentries {\n" ,"$f.m add command -label \"$textval\" -command \\\n" ,"\"$f.b configure -text \\\"$textval\\\" ; set visoptions.scalfunction $name ; Ng_Vis_Set parameters ; redraw ; \"\n" ,"}\n" ,"pack $f.b $f.l -side right\n" ,"foreach { name textval } $scalentries {\n" ,"if { ${visoptions.scalfunction} == $name } {\n" ,"$f.m invoke $textval\n" ,"}\n" ,"}\n" ,"set f [ttk::frame $w.f1.vecfun]\n" ,"pack $f -anchor e\n" ,"menu $f.m\n" ,"ttk::menubutton $f.b -menu $f.m -width 12\n" ,"ttk::label $f.l -text \"Vector Function: \"\n" ,"set vecentries [list none None]\n" ,"for { set i 1 } { $i <= [Ng_Vis_Field getnfieldnames] } { incr i } {\n" ,"set fname [Ng_Vis_Field getfieldname $i]\n" ,"set fcomp [Ng_Vis_Field getfieldcomponents $i]\n" ,"set iscomplex [Ng_Vis_Field iscomplex $i]\n" ,"set sdim [Ng_Vis_Field getdimension]\n" ,"if { $iscomplex == 1 } { set fcomp [expr $fcomp / 2] }\n" ,"if { ($fcomp == $sdim) || ($fcomp == 3) } {\n" ,"lappend vecentries $fname $fname\n" ,"}\n" ,"}\n" ,"global visoptions.vecfunction\n" ,"foreach { name textval } $vecentries {\n" ,"$f.m add command -label \"$textval\" -command \\\n" ,"\"$f.b configure -text \\\"$textval\\\" ; set visoptions.vecfunction $name ; Ng_Vis_Set parameters ; redraw ; \"\n" ,"}\n" ,"pack $f.b $f.l -side right\n" ,"foreach { name textval } $vecentries {\n" ,"if { ${visoptions.vecfunction} == $name } {\n" ,"$f.m invoke $textval\n" ,"}\n" ,"}\n" ,"set f [ttk::frame $w.f1.evaluate]\n" ,"pack $f -anchor e\n" ,"menu $f.m\n" ,"ttk::menubutton $f.b -menu $f.m -width 12\n" ,"ttk::label $f.l -text \"Evaluate: \"\n" ,"global visoptions.evaluate\n" ,"set evallabs(abs) \"| |\"\n" ,"set evallabs(abstens) \"|tensor|\"\n" ,"set evallabs(mises) \"Mises\"\n" ,"set evallabs(main) \"Main\"\n" ,"foreach i { abs abstens mises main } {\n" ,"set textval $evallabs($i)\n" ,"$f.m add command -label \"$textval\" -command \\\n" ,"\"$f.b configure -text \\\"$textval\\\" ; set visoptions.evaluate $i ; \"\n" ,"}\n" ,"pack $f.b $f.l -side right\n" ,"$f.m invoke $evallabs(${visoptions.evaluate})\n" ,"pack [ttk::frame $w.f1.multidim] -fill x\n" ,"set f [ttk::frame $w.f1.multidim.f]\n" ,"pack $f -anchor e\n" ,"ttk::label $f.l1 -text \"multidim-component: \"\n" ,"ttk::spinbox $f.sb1 -from 0 -to 1e99 -textvariable visoptions.multidimcomponent -width 3 \\\n" ,"-command { Ng_Vis_Set parameters; redraw }\n" ,"pack $f.l1 $f.sb1 -side left\n" ,"ttk::frame $w.fcb\n" ,"grid $w.f1 $w.fcb -sticky nw -padx 7 -ipady 3\n" ,"grid anchor $w center\n" ,"ttk::frame $w.fcb.cb\n" ,"pack $w.fcb.cb\n" ,"ttk::checkbutton $w.fcb.cb.showsurfsolution -text \"Draw Surface Vectors\" \\\n" ,"-variable visoptions.showsurfacesolution \\\n" ,"-command { Ng_Vis_Set parameters; redraw }\n" ,"ttk::checkbutton $w.fcb.cb.showcurves -text \"Show Curves\" \\\n" ,"-variable visoptions.drawpointcurves \\\n" ,"-command { Ng_Vis_Set parameters; redraw }\n" ,"ttk::checkbutton $w.fcb.cb.imaginary -text \"Imaginary Part\" \\\n" ,"-variable visoptions.imaginary \\\n" ,"-command { Ng_Vis_Set parameters; redraw }\n" ,"ttk::checkbutton $w.fcb.cb.logscale -text \"Log Scale\" \\\n" ,"-variable visoptions.logscale \\\n" ,"-command { Ng_Vis_Set parameters; redraw }\n" ,"ttk::checkbutton $w.fcb.cb.invcolor -text \"Inverse Color\" \\\n" ,"-variable visoptions.invcolor \\\n" ,"-command { Ng_Vis_Set parametersrange; redraw }\n" ,"ttk::frame $w.fcb.cb.texframe\n" ,"ttk::checkbutton $w.fcb.cb.texframe.usetexture -text \"Use Textures (\" \\\n" ,"-variable visoptions.usetexture \\\n" ,"-command { Ng_Vis_Set parameters; redraw }\n" ,"ttk::checkbutton $w.fcb.cb.texframe.lintexture -text \"Linear )\" \\\n" ,"-variable visoptions.lineartexture \\\n" ,"-command { Ng_Vis_Set parametersrange; redraw }\n" ,"ttk::checkbutton $w.fcb.cb.lineartexture -text \"Use Linear Texture\" \\\n" ,"-variable visoptions.lineartexture \\\n" ,"-command { Ng_Vis_Set parameters; redraw }\n" ,"scale $w.numcols -orient horizontal -length 100 -from 0 -to 50 \\\n" ,"-resolution 1 \\\n" ,"-variable visoptions.numtexturecols \\\n" ,"-command { popupcheckredraw visual_dialog_pop1 }\n" ,"ttk::checkbutton $w.fcb.cb.showclipsolution -text \"Draw Clipping Plane Solution\" \\\n" ,"-variable visoptions.showclipsolution \\\n" ,"-command { Ng_Vis_Set parameters; redraw }\n" ,"ttk::checkbutton $w.fcb.cb.redrawperiodic -text \"Animate periodic\" \\\n" ,"-variable visoptions.redrawperiodic \\\n" ,"-command {\n" ,"redrawperiodic\n" ,"Ng_Vis_Set parameters;\n" ,"redraw\n" ,"}\n" ,"grid $w.fcb.cb.showsurfsolution -sticky nw\n" ,"grid $w.fcb.cb.showcurves -sticky nw\n" ,"grid $w.fcb.cb.imaginary -sticky nw\n" ,"grid $w.fcb.cb.logscale -sticky nw\n" ,"grid $w.fcb.cb.texframe -sticky nw\n" ,"grid $w.fcb.cb.invcolor -sticky nw\n" ,"grid $w.fcb.cb.redrawperiodic -sticky nw\n" ,"pack $w.fcb.cb.texframe.usetexture $w.fcb.cb.texframe.lintexture -side left -expand yes\n" ,"set w .visoptions_dlg.main\n" ,"ttk::frame $w.bu;\n" ,"pack $w.bu -pady 5 -padx 4\n" ,"ttk::button $w.bu.showsol -text \"Show Solution\" -command {\n" ,"set selectvisual solution\n" ,"Ng_SetVisParameters\n" ,"redraw\n" ,"}\n" ,"ttk::button $w.bu.clipping -text \"Clipping\" -command {\n" ,"clippingdialog;\n" ,"}\n" ,"ttk::button $w.bu.fieldlines -text \"Fieldlines\" -command {\n" ,"fieldlinesdialog;\n" ,"}\n" ,"ttk::button $w.bu.lineplot -text \"2D Lineplot\" -command {\n" ,"lineplotdialog;\n" ,"}\n" ,"ttk::button $w.bu.done -text \"Close\" -command {\n" ,"destroy .visoptions_dlg\n" ,"}\n" ,"pack $w.bu.showsol $w.bu.clipping $w.bu.fieldlines $w.bu.lineplot $w.bu.done -side left -expand yes\n" ,"set w .visoptions_dlg\n" ,"wm withdraw $w\n" ,"wm geom $w +100+100\n" ,"wm deiconify $w\n" ,"wm title $w \"Visualization\"\n" ,"}\n" ,"}\n" ,"}\n" ,"catch { set sockets.serverport 0\n" ,"set sockets.serverhost \"localhost\"\n" ,"set sockets.serverlistbox 0\n" ,"set sockets.queuelistbox 0\n" ,"set sockets.currentjoblistbox 0\n" ,"set sockets.answerlistbox 0\n" ,"set sockets.myidlabel -1\n" ,"proc updateserverlist { } {\n" ,"global sockets.serverlistbox\n" ,"set retval [Ng_Socket getserverlist]\n" ,"${sockets.serverlistbox} delete 0 end\n" ,"for {set i 0} {$i < [llength $retval]} {incr i 3} {\n" ,"${sockets.serverlistbox} insert end \\\n" ,"[format \"%-16s %6i %6i\" [lindex $retval $i] [lindex $retval [expr $i+1]] [lindex $retval [expr $i+2]]]\n" ,"}\n" ,"}\n" ,"proc clientsocketdialog { } {\n" ,"set w .clientsock_dlg\n" ,"if {[winfo exists .clientsock_dlg] == 1} {\n" ,"wm withdraw $w\n" ,"wm deiconify $w\n" ,"focus $w\n" ,"} {\n" ,"toplevel $w\n" ,"global sockets.serverhost\n" ,"global sockets.serverport\n" ,"ttk::frame $w.general\n" ,"ttk::frame $w.host\n" ,"ttk::label $w.host.lab -text \"Serverhost: \"\n" ,"ttk::entry $w.host.name -width 30 -textvariable sockets.serverhost\n" ,"pack $w.host.lab $w.host.name -side left\n" ,"pack $w.host\n" ,"ttk::frame $w.ports\n" ,"ttk::label $w.ports.lab1 -text \"Serverport: \"\n" ,"ttk::entry $w.ports.statport -width 6 -textvariable sockets.serverport\n" ,"pack $w.ports.lab1 $w.ports.statport -side left\n" ,"pack $w.ports\n" ,"ttk::frame $w.listboxes\n" ,"ttk::frame $w.listboxes.choosesocketframe\n" ,"tixScrolledListBox $w.listboxes.choosesocketframe.choosesocket -scrollbar auto\n" ,"global sockets.serverlistbox\n" ,"set sockets.serverlistbox [$w.listboxes.choosesocketframe.choosesocket subwidget listbox]\n" ,"${sockets.serverlistbox} configure -width 35\n" ,"${sockets.serverlistbox} configure -selectmode browse\n" ,"${sockets.serverlistbox} configure -exportselection false\n" ,"ttk::button $w.addserver -text \"Add ServerSocket\" -command {\n" ,"Ng_Socket addserver ${sockets.serverport} ${sockets.serverhost}\n" ,"updateserverlist\n" ,"}\n" ,"pack $w.addserver\n" ,"ttk::label $w.linefeed -text \"\\n\"\n" ,"pack $w.linefeed\n" ,"ttk::frame $w.clientidframe\n" ,"ttk::label $w.clientidframe.lab -text \"Client ID: \";\n" ,"global sockets.myidlabel\n" ,"ttk::entry $w.clientidframe.val -width 5 -textvariable sockets.myidlabel\n" ,"ttk::button $w.clientidframe.but -text \"Set\" -command {\n" ,"set opsel [${sockets.serverlistbox} curselection]\n" ,"if {[llength $opsel] > 0} {\n" ,"set opserver [lindex $opsel 0]\n" ,"Ng_Socket setid $opserver ${sockets.myidlabel}\n" ,"updateserverlist\n" ,"}\n" ,"}\n" ,"pack $w.clientidframe.lab $w.clientidframe.val $w.clientidframe.but -side left\n" ,"pack $w.clientidframe\n" ,"ttk::label $w.listboxes.choosesocketframe.chooselab -text [format \"\\n\\n%-16s %6s %6s \" Host Socket MyID ]\n" ,"pack $w.listboxes.choosesocketframe.chooselab\n" ,"pack $w.listboxes.choosesocketframe.choosesocket\n" ,"ttk::frame $w.listboxes.choosesocketframe.serverbuttons\n" ,"ttk::button $w.listboxes.choosesocketframe.serverbuttons.save -text \"Save\" -command {\n" ,"Ng_Socket saveserverlist\n" ,"}\n" ,"global sockets.serverlist\n" ,"Ng_Socket loadserverlist\n" ,"updateserverlist\n" ,"ttk::button $w.listboxes.choosesocketframe.serverbuttons.delete -text \"Delete\" -command {\n" ,"set opsel [${sockets.serverlistbox} curselection]\n" ,"if {[llength $opsel] > 0} {\n" ,"Ng_Socket deletesocket [lindex $opsel 0]\n" ,"updateserverlist\n" ,"}\n" ,"}\n" ,"pack $w.listboxes.choosesocketframe.serverbuttons.save $w.listboxes.choosesocketframe.serverbuttons.delete -side left\n" ,"pack $w.listboxes.choosesocketframe.serverbuttons\n" ,"ttk::frame $w.listboxes.statusframe\n" ,"ttk::label $w.listboxes.statusframe.statuslabel1 -text \"\\n\\njobqueue\"\n" ,"tixScrolledListBox $w.listboxes.statusframe.queuestatus -scrollbar auto\n" ,"ttk::label $w.listboxes.statusframe.statuslabel2 -text \"\\ncurrent job\"\n" ,"tixScrolledListBox $w.listboxes.statusframe.currentjobstatus -scrollbar auto\n" ,"ttk::label $w.listboxes.statusframe.statuslabel3 -text \"\\nanswers\"\n" ,"tixScrolledListBox $w.listboxes.statusframe.answers -scrollbar auto\n" ,"global sockets.queuelistbox\n" ,"global sockets.currentjoblistbox\n" ,"global sockets.answerlistbox\n" ,"set sockets.queuelistbox [$w.listboxes.statusframe.queuestatus subwidget listbox]\n" ,"set sockets.currentjoblistbox [$w.listboxes.statusframe.currentjobstatus subwidget listbox]\n" ,"set sockets.answerlistbox [$w.listboxes.statusframe.answers subwidget listbox]\n" ,"${sockets.queuelistbox} configure -width 50\n" ,"${sockets.queuelistbox} configure -height 5\n" ,"${sockets.queuelistbox} configure -selectmode browse\n" ,"${sockets.queuelistbox} configure -exportselection false\n" ,"${sockets.currentjoblistbox} configure -width 50\n" ,"${sockets.currentjoblistbox} configure -height 1\n" ,"${sockets.currentjoblistbox} configure -selectmode browse\n" ,"${sockets.currentjoblistbox} configure -exportselection false\n" ,"${sockets.answerlistbox} configure -width 50\n" ,"${sockets.answerlistbox} configure -height 5\n" ,"${sockets.answerlistbox} configure -selectmode browse\n" ,"${sockets.answerlistbox} configure -exportselection false\n" ,"ttk::button $w.listboxes.statusframe.updatebutton -text \"Update\" -command {\n" ,"set opsel [${sockets.serverlistbox} curselection]\n" ,"if {[llength $opsel] > 0} {\n" ,"set opserver [lindex $opsel 0]\n" ,"set retval [Ng_Socket sendqueuestatus $opserver]\n" ,"${sockets.queuelistbox} delete 0 end\n" ,"if {[lindex $retval 0] > 0} {\n" ,"${sockets.queuelistbox} insert end [format \"Blocked for user %i\" [lindex $retval 0]]\n" ,"} {\n" ,"${sockets.queuelistbox} insert end \"Not blocked\"\n" ,"}\n" ,"for {set i 2} {$i < [expr 2*[lindex $retval 1]+2]} {incr i 2} {\n" ,"${sockets.queuelistbox} insert end [format \"client %i, command %s\" [lindex $retval $i] [lindex $retval [expr $i+1]]]\n" ,"}\n" ,"${sockets.answerlistbox} delete 0 end\n" ,"for {set i [expr 2*[lindex $retval 1]+3]} {$i < [llength $retval]} {incr i 2} {\n" ,"${sockets.answerlistbox} insert end [format \"client %i, command %s\" [lindex $retval $i] [lindex $retval [expr $i+1]]]\n" ,"}\n" ,"${sockets.currentjoblistbox} delete 0 end\n" ,"set retval [Ng_Socket sendjobstatus $opserver]\n" ,"if {[lindex $retval 0] != 0} {\n" ,"${sockets.currentjoblistbox} insert end [format \"client %i, command %s: %s\" [lindex $retval 0] [lindex $retval 1] [lrange $retval 2 end]]\n" ,"}\n" ,"}\n" ,"}\n" ,"pack $w.listboxes.statusframe.statuslabel1 $w.listboxes.statusframe.queuestatus \\\n" ,"$w.listboxes.statusframe.statuslabel2 $w.listboxes.statusframe.currentjobstatus \\\n" ,"$w.listboxes.statusframe.statuslabel3 $w.listboxes.statusframe.answers \\\n" ,"$w.listboxes.statusframe.updatebutton\n" ,"pack $w.listboxes.choosesocketframe $w.listboxes.statusframe -side left\n" ,"pack $w.listboxes\n" ,"ttk::label $w.lab1 -text \"\\n\"\n" ,"pack $w.lab1\n" ,"ttk::frame $w.buttons1\n" ,"ttk::frame $w.buttons2\n" ,"ttk::button $w.buttons1.getid -text \"Get ID\" -command {\n" ,"set opsel [${sockets.serverlistbox} curselection]\n" ,"if {[llength $opsel] > 0} {\n" ,"set opserver [lindex $opsel 0]\n" ,"set retval [Ng_Socket getid $opserver]\n" ,"updateserverlist\n" ,"set sockets.myidlabel $retval\n" ,"}\n" ,"}\n" ,"ttk::button $w.buttons1.killjob -text \"Kill Cur. Job\" -command {\n" ,"set opsel [${sockets.serverlistbox} curselection]\n" ,"if {[llength $opsel] > 0} {\n" ,"set opserver [lindex $opsel 0]\n" ,"Ng_Socket killcurrentjob $opserver\n" ,"}\n" ,"}\n" ,"ttk::button $w.buttons2.sendmesh -text \"Send Mesh\" -command {\n" ,"set opsel [${sockets.serverlistbox} curselection]\n" ,"if {[llength $opsel] > 0} {\n" ,"set opserver [lindex $opsel 0]\n" ,"set retval [Ng_Socket sendmesh $opserver]\n" ,"set sockets.meshsent 1\n" ,"}\n" ,"}\n" ,"ttk::button $w.buttons2.sendpde -text \"Send PDE\" -command {\n" ,"set opsel [${sockets.serverlistbox} curselection]\n" ,"if {[llength $opsel] > 0} {\n" ,"set opserver [lindex $opsel 0]\n" ,"set retval [NGS_Socket sendpdefile $opserver]\n" ,"}\n" ,"}\n" ,"ttk::button $w.buttons2.solvepde -text \"Solve PDE\" -command {\n" ,"set opsel [${sockets.serverlistbox} curselection]\n" ,"if {[llength $opsel] > 0} {\n" ,"set opserver [lindex $opsel 0]\n" ,"set retval [NGS_Socket solvepde $opserver]\n" ,"}\n" ,"}\n" ,"ttk::button $w.buttons2.writesol -text \"Write Solution\" -command {\n" ,"set opsel [${sockets.serverlistbox} curselection]\n" ,"if {[llength $opsel] > 0} {\n" ,"set opserver [lindex $opsel 0]\n" ,"set retval [NGS_Socket writesolution $opserver]\n" ,"}\n" ,"}\n" ,"ttk::button $w.buttons2.sendsol -text \"Receive Solution\" -command {\n" ,"set opsel [${sockets.serverlistbox} curselection]\n" ,"if {[llength $opsel] > 0} {\n" ,"set opserver [lindex $opsel 0]\n" ,"set retval [NGS_Socket sendsolution $opserver]\n" ,"}\n" ,"}\n" ,"ttk::button $w.buttons1.blockserver -text \"Block Server\" -command {\n" ,"set opsel [${sockets.serverlistbox} curselection]\n" ,"if {[llength $opsel] > 0} {\n" ,"set opserver [lindex $opsel 0]\n" ,"set retval [Ng_Socket blockserver $opserver]\n" ,"}\n" ,"}\n" ,"ttk::button $w.buttons1.unblockserver -text \"UnBlock Server\" -command {\n" ,"set opsel [${sockets.serverlistbox} curselection]\n" ,"if {[llength $opsel] > 0} {\n" ,"set opserver [lindex $opsel 0]\n" ,"set retval [Ng_Socket unblockserver $opserver]\n" ,"}\n" ,"}\n" ,"pack $w.buttons1.getid $w.buttons1.blockserver $w.buttons1.unblockserver $w.buttons1.killjob -side left\n" ,"pack $w.buttons2.sendmesh $w.buttons2.sendpde $w.buttons2.solvepde $w.buttons2.writesol $w.buttons2.sendsol -side left\n" ,"pack $w.buttons1 $w.buttons2\n" ,"wm withdraw $w\n" ,"wm geom $w +200+200\n" ,"wm deiconify $w\n" ,"wm title $w \"Client Socket\"\n" ,"focus .options_dlg\n" ,"}\n" ,"}\n" ,"}\n" ,"catch { source ${ngdir}/acis.tcl }\n" ,"set zugstange 0\n" ,"catch { source ${ngdir}/trafo/menu.tcl }\n" ,"setgranularity ${meshoptions.fineness}\n" ,"Ng_SetMeshingParameters\n" ,"Ng_SetVisParameters\n" ,"Ng_SetDebugParameters\n" ,"Ng_STLDoctor\n" ,"Ng_GeometryOptions set\n" ,"if { $hasocc == \"yes\" } {\n" ,"Ng_SetOCCVisParameters\n" ,"}\n" ,"if { $batchmode != \"defined\" } {\n" ,"catch {\n" ,"wm protocol . WM_DELETE_WINDOW { .ngmenu.file invoke \"Quit\" }\n" ,"wm deiconify .\n" ,"}\n" ,"}\n" ,"set trafoapp 0\n" ,"catch { source ${ngdir}/trafoapp/trafoapp.tcl }\n" ,"set geofilename [Ng_GetCommandLineParameter geofile]\n" ,"if { $geofilename != \"undefined\" &&\n" ,"[info exists trafo] == 0 && $zugstange == 0} {\n" ,"if { [ catch { Ng_LoadGeometry $geofilename } errstring] == 0 } {\n" ,"if { $batchmode != \"defined\" } {\n" ,"AddRecentFile $geofilename\n" ,"}\n" ,"Ng_ParseGeometry\n" ,"if { $batchmode != \"defined\" } {\n" ,"set selectvisual geometry\n" ,"Ng_SetVisParameters\n" ,"redraw\n" ,"wm title . [concat \"$progname - \" $geofilename]\n" ,"}\n" ,"set dirname [file dirname $geofilename]\n" ,"set basefilename [file tail [file rootname $geofilename]]\n" ,"} {\n" ,"puts \"Problem with input file:\"\n" ,"puts \"$errstring\"\n" ,"}\n" ,"}\n" ,"set cnt 0\n" ,"foreach { gran } { verycoarse coarse moderate fine veryfine } {\n" ,"set cnt [expr $cnt + 1]\n" ,"if { [Ng_GetCommandLineParameter $gran] == \"defined\" } {\n" ,"set meshoptions.fineness $cnt\n" ,"setgranularity ${meshoptions.fineness}\n" ,"}\n" ,"}\n" ,"set meshfilename [Ng_GetCommandLineParameter meshfile]\n" ,"if { $meshfilename == \"undefined\" } {\n" ,"set meshfilename out.mesh\n" ,"}\n" ,"set meshfiletype [Ng_GetCommandLineParameter meshfiletype]\n" ,"if { $meshfiletype == \"undefined\" } {\n" ,"set meshfiletype netgen\n" ,"}\n" ,"set inputmeshfilename [Ng_GetCommandLineParameter inputmeshfile]\n" ,"set mergemeshfilename [Ng_GetCommandLineParameter mergefile]\n" ,"set meshsizefilename [Ng_GetCommandLineParameter meshsizefile]\n" ,"if { $meshsizefilename != \"undefined\" } {\n" ,"set options.meshsizefilename $meshsizefilename\n" ,"}\n" ,"set refinementfilename [Ng_GetCommandLineParameter refinementfile]\n" ,"if { $batchmode == \"defined\" && $solvemode != \"defined\"} {\n" ,"set options.parthread 0\n" ,"if { $shellmode == \"undefined\" } {\n" ,"set selectvisual mesh\n" ,"Ng_SetVisParameters\n" ,"set meshsize [Ng_GetCommandLineParameter meshsize]\n" ,"if {$meshsize != \"undefined\"} { set options.meshsize $meshsize }\n" ,"if { $inputmeshfilename == \"undefined\" } {\n" ,"Ng_GenerateMesh ${meshoptions.firststep} ${meshoptions.laststep}\n" ,"} else {\n" ,"Ng_LoadMesh $inputmeshfilename\n" ,"if { $mergemeshfilename != \"undefined\" } {\n" ,"Ng_MergeMesh $mergemeshfilename\n" ,"}\n" ,"}\n" ,"if { $refinementfilename != \"undefined\" } {\n" ,"Ng_Bisect $refinementfilename\n" ,"}\n" ,"if { $meshfiletype == \"netgen\" } {\n" ,"Ng_SaveMesh $meshfilename\n" ,"} else {\n" ,"if { [catch { Ng_ExportMesh $meshfilename $meshfiletype } ] == 1 } {\n" ,"puts \"Unknown file format $meshfiletype\"\n" ,"}\n" ,"}\n" ,"Ng_Exit;\n" ,"exit\n" ,"} else {\n" ,"set code [catch { \n" ,"proc dotest {} {\n" ,"source ngtest.tcl\n" ,"}\n" ,"proc Ng_RunShell {} {\n" ,"puts \"Wellcome to NG Shell mode\"\n" ,"set line 1\n" ,"while { 1 } {\n" ,"puts -nonewline \"$line: \"\n" ,"flush stdout\n" ,"set cmdline [gets stdin]\n" ,"if { [catch $cmdline errcode] } {\n" ,"puts \"$errcode\"\n" ,"}\n" ,"incr line 1\n" ,"}\n" ,"}\n" ,"proc Ng_PrintCmdIndex { } {\n" ,"global cmdindex\n" ,"foreach { lst } $cmdindex {\n" ,"puts $lst\n" ,"}\n" ,"}\n" ,"proc Ng_PrintHlpIndex { } {\n" ,"global hlpindex\n" ,"global secindex\n" ,"foreach {sec} $secindex {\n" ,"puts \"\\n * $sec:\"\n" ,"foreach {lst} $hlpindex {\n" ,"if {$sec == [lindex $lst 1]} {\n" ,"puts \" * [lindex $lst 2]: [lindex $lst 3]\"\n" ,"}\n" ,"}\n" ,"}\n" ,"}\n" ,"proc Ng_RegisterCmd { cmd section syntax {help \"\"} } {\n" ,"global hlpindex\n" ,"global cmdindex\n" ,"global secindex\n" ,"puts \"register command $cmd\"\n" ,"if { [lsearch $cmdindex cmd] != -1 } {\n" ,"puts \"command '$cmd' already defined\"\n" ,"} else {\n" ,"lappend cmdindex $cmd\n" ,"lappend hlpindex [list $cmd $section $syntax $help]\n" ,"if {[lsearch $secindex $section]==-1} {\n" ,"lappend secindex $section\n" ,"}\n" ,"}\n" ,"}\n" ,"Ng_RegisterCmd \"exit\" \"general\" \"exit\" \"exit Netgen shell mode\"\n" ,"proc nghelp { {sec \"\"} } {\n" ,"global secindex\n" ,"global hlpindex\n" ,"global cmdindex\n" ,"if { $sec == \"\" } {\n" ,"Ng_PrintHlpIndex\n" ,"puts \"\\n type help 'section'\\n\"\n" ,"return\n" ,"}\n" ,"if { [lsearch $secindex $sec] != -1} {\n" ,"foreach {lst} $hlpindex {\n" ,"if {[lindex $lst 1] == $sec } {\n" ,"puts \" * [lindex $lst 2]: [lindex $lst 3]\"\n" ,"}\n" ,"}\n" ,"return\n" ,"}\n" ,"set ind [lsearch $cmdindex $sec]\n" ,"if {$ind != -1} {\n" ,"set lst [lindex $hlpindex $ind]\n" ,"puts \" * [lindex $lst 2]: [lindex $lst 3]\"\n" ,"return\n" ,"}\n" ,"puts \" unknown section or command $sec\"\n" ,"}\n" ,"set ngtimer 0\n" ,"proc nggettimer {} {\n" ,"return [clock clicks -milliseconds]\n" ,"}\n" ,"proc ngtic {} {\n" ,"set ::ngtimer [nggettimer]\n" ,"}\n" ,"proc ngtoc { {logfile stdout} } {\n" ,"set end [nggettimer]\n" ,"set tim [expr ($end - $::ngtimer)/1000.0]\n" ,"puts $logfile \"$tim s\"\n" ,"}\n" ,"proc ngloadgeometry { fname } {\n" ,"if { ![file exists $fname] } {\n" ,"puts \"error: file $fname does not exist\"\n" ,"} else {\n" ,"set err [catch {Ng_LoadGeometry $fname}]\n" ,"if {$err != 0} {\n" ,"puts \"error: loading geometry failed\"\n" ,"}\n" ,"}\n" ,"}\n" ,"Ng_RegisterCmd \"ngloadgeometry\" \"netgen\" \"ngloadgeometry \" \"load geometry file\"\n" ,"proc ngparsegeometry {} {\n" ,"set err [catch {Ng_ParseGeometry}]\n" ,"if {$err} {\n" ,"puts \"error: parsing geometry failed\"\n" ,"}\n" ,"}\n" ,"Ng_RegisterCmd \"ngparsegeometry\" \"netgen\" \"ngparsegeometry\" \"parse geometry\"\n" ,"proc nggeneratemesh {} {\n" ,"set err [catch {Ng_GenerateMesh}]\n" ,"if {$err} {\n" ,"puts \"error: mesh generation failed\"\n" ,"}\n" ,"}\n" ,"Ng_RegisterCmd \"nggeneratemesh\" \"netgen\" \"nggeneratemesh\" \"generate mesh\"\n" ,"proc ngsavemesh { fname } {\n" ,"if { [file exists $fname]} {\n" ,"puts \"warning: existing file $fname overwritten\"\n" ,"} else {\n" ,"set err [catch {Ng_SaveMesh $fname}]\n" ,"if {$err != 0} {\n" ,"puts \"error: saving mesh failed\"\n" ,"}\n" ,"}\n" ,"}\n" ,"Ng_RegisterCmd \"ngsavemesh\" \"netgen\" \"ngsavemesh \" \"save mesh to file\"\n" ,"proc ngset { opt {val 0} } {\n" ,"if {$opt == \"meshsize\"} {\n" ,"set ::options.meshsize $val\n" ,"Ng_SetMeshingParameters\n" ,"} elseif {$opt == \"printmsg\"} {\n" ,"set ::options.printmsg $val\n" ,"Ng_SetMeshingParameters\n" ,"} else {\n" ,"puts \"error: unknown option $opt\";\n" ,"}\n" ,"}\n" ,"Ng_RegisterCmd \"ngset\" \"netgen\" \"ngset

" # .ngmenu.geometry add command -label "Edit Primitive" \ # -command editprimitivedialog -accelerator "

" # .ngmenu.geometry add command -label "Edit Solid" \ # -command newsoliddialog -accelerator "" # .ngmenu.geometry add command -label "Choose Top Level " \ # -command topleveldialog # .ngmenu.geometry add command -label "Identify" \ # -command identifydialog .ngmenu.geometry add command -label "CSG Properties..." \ -command topleveldialog2 proc geometryoptionsdialog { } { set w .geometry_dlg if {[winfo exists .geometry_dlg] == 1} { wm withdraw $w wm deiconify $w focus $w } { toplevel $w global geooptions Ng_GeometryOptions get checkbutton $w.drawcsg -text "Draw Geometry" \ -variable geooptions.drawcsg pack $w.drawcsg frame $w.fac pack $w.fac -pady 5 ttk::label $w.fac.lab -text "Facets:"; entry $w.fac.ent -width 8 -relief sunken \ -textvariable geooptions.facets pack $w.fac.lab $w.fac.ent -side left frame $w.det pack $w.det -pady 5 ttk::label $w.det.lab -text "Detail:"; entry $w.det.ent -width 8 -relief sunken \ -textvariable geooptions.detail pack $w.det.lab $w.det.ent -side left frame $w.cox pack $w.cox -pady 5 ttk::label $w.cox.lab -text "min/max x:"; entry $w.cox.ent1 -width 8 -relief sunken \ -textvariable geooptions.minx entry $w.cox.ent2 -width 8 -relief sunken \ -textvariable geooptions.maxx pack $w.cox.lab $w.cox.ent1 \ $w.cox.ent2 -side left frame $w.coy pack $w.coy -pady 5 ttk::label $w.coy.lab -text "min/max y:"; entry $w.coy.ent1 -width 8 -relief sunken \ -textvariable geooptions.miny entry $w.coy.ent2 -width 8 -relief sunken \ -textvariable geooptions.maxy pack $w.coy.lab $w.coy.ent1 \ $w.coy.ent2 -side left frame $w.coz pack $w.coz -pady 5 ttk::label $w.coz.lab -text "min/max z:"; entry $w.coz.ent1 -width 8 -relief sunken \ -textvariable geooptions.minz entry $w.coz.ent2 -width 8 -relief sunken \ -textvariable geooptions.maxz pack $w.coz.lab $w.coz.ent1 \ $w.coz.ent2 -side left # tixButtonBox $w.bbox -orientation horizontal # $w.bbox add ok -text Apply -underline 0 -width 5 \ # -command { Ng_GeometryOptions set } # $w.bbox add close -text Done -underline 0 -width 5 \ # -command { # Ng_GeometryOptions set # destroy .geometry_dlg # } # pack $w.bbox -side bottom -fill x frame $w.bu pack $w.bu -fill x -ipady 3 ttk::button $w.bu.app -text "Apply" -command { Ng_GeometryOptions set } ttk::button $w.bu.ok -text "Done" -command { Ng_GeometryOptions set destroy .geometry_dlg } pack $w.bu.app $w.bu.ok -side left -expand yes wm withdraw $w wm geom $w +100+100 wm deiconify $w wm title $w "Geometry options" focus $w } } # # # Edit primitive # # proc editprimitivedialog2 { name } { global w classname set w .ep_dlg toplevel .$w Ng_GetPrimitiveData $name classname valuelist ttk::label $w.lab1 -text "Primitive Name: $name"; ttk::label $w.lab2 -text "Primitive Class: $classname"; pack $w.lab1 $w.lab2 -fill x -pady 1m -padx 5m frame $w.specific -relief groove global spec set spec(sphere) { cx cy cz rad } set spec(cylinder) { ax ay az bx by bz rad } set spec(plane) { px py pz nx ny nz } set spec(cone) { ax ay az bx by bz ra rb } set spec(brick) { p1x p1y p1z p2x p2y p2z p3x p3y p3z p4x p4y p4z } set cnt 0 foreach field $spec($classname) { frame $w.specific.f$cnt pack $w.specific.f$cnt -side top -anchor ne ttk::label $w.specific.f$cnt.lab -text "$field" entry $w.specific.f$cnt.ent -textvariable dataval($cnt) \ -width 6 -relief sunken pack $w.specific.f$cnt.ent $w.specific.f$cnt.lab -side right $w.specific.f$cnt.ent delete 0 end $w.specific.f$cnt.ent insert 0 [lindex $valuelist $cnt] set cnt [expr $cnt + 1] } pack $w.specific ttk::button $w.cancel -text "cancel" -command { destroy $w } ttk::button $w.ok -text "ok" -command { set valuelist "" set cnt 0 foreach field $spec($classname) { lappend valuelist $dataval($cnt) set cnt [expr $cnt + 1] } Ng_SetPrimitiveData $name $valuelist destroy $w } pack $w.cancel $w.ok -side left -expand yes bind $w { $w.ok invoke} bind $w { $w.cancel invoke} wm withdraw $w wm geom $w +100+100 wm deiconify $w # grab $w focus $w.specific.f0.ent } # # # Select primitve to edit # # proc editprimitivedialog { } { global w set w .ep_dlg toplevel $w frame $w.frame -borderwidth 5m pack $w.frame -side top -expand yes -fill y listbox $w.frame.list -yscroll "$w.frame.scroll set" -setgrid 1 -height 12 scrollbar $w.frame.scroll -command "$w.frame.list yview" pack $w.frame.scroll -side right -fill y pack $w.frame.list -side left -expand 1 -fill both Ng_GetPrimitiveList primlist foreach el $primlist { $w.frame.list insert end $el } ttk::button $w.cancel -text "cancel" -command { destroy $w } ttk::button $w.ok -text "ok" -command { set name [.ep_dlg.frame.list get active] puts "name=($name)" destroy $w if { $name != "" } { editprimitivedialog2 $name } } bind $w { $w.cancel invoke } bind $w { $w.ok invoke } pack $w.cancel $w.ok -side left -expand yes wm withdraw $w wm geom $w +100+100 wm deiconify $w # grab $w focus $w.frame.list } # # # Create new primitive # # proc newprimitivedialog { } { global w name set w .ap_dlg toplevel $w set name "" frame $w.f1 pack $w.f1 -pady 2m ttk::label $w.f1.lab -text "Primitive Name: "; entry $w.f1.ent -width 5 -relief sunken \ -textvariable name pack $w.f1.lab $w.f1.ent -side left frame $w.frame -borderwidth .5c pack $w.frame -side top -expand yes -fill y listbox $w.frame.list -yscroll "$w.frame.scroll set" -setgrid 1 -height 8 scrollbar $w.frame.scroll -command "$w.frame.list yview" pack $w.frame.scroll -side right -fill y pack $w.frame.list -side left -expand 1 -fill both $w.frame.list insert 0 sphere cylinder plane cone brick $w.frame.list activate 0 ttk::button $w.ok -text "ok" -command { Ng_CreatePrimitive [$w.frame.list get active] $name destroy $w editprimitivedialog2 $name } ttk::button $w.cancel -text "cancel" -command { destroy $w } pack $w.cancel $w.ok -side left -expand yes -pady 2m bind $w { $w.cancel invoke } bind $w { $w.ok invoke } wm withdraw $w wm geom $w +100+100 wm deiconify $w # grab $w focus $w.f1.ent } proc newsoliddialog { } { global w name val sollist set w .ns_dlg toplevel $w set name "" frame $w.f1 ttk::label $w.f1.lab -text "Solid Name: "; entry $w.f1.ent -width 5 -relief sunken \ -textvariable name $w.f1.ent delete 0 end ttk::button $w.f1.getsel -text "Get Selected" -command { $w.f1.ent delete 0 end $w.f1.ent insert 0 [$w.f3.list get active] $w.bu.get invoke } pack $w.f1.getsel -side bottom pack $w.f1.ent $w.f1.lab -side right frame $w.f3 -borderwidth .5c listbox $w.f3.list -yscroll "$w.f3.scroll set" -setgrid 1 -height 12 scrollbar $w.f3.scroll -command "$w.f3.list yview" pack $w.f3.scroll -side right -fill y pack $w.f3.list -side left -expand 1 -fill both Ng_GetSolidList sollist foreach el $sollist { $w.f3.list insert end $el } frame $w.f2 ttk::label $w.f2.lab -text "Solid Description: "; pack $w.f2.lab entry $w.f2.ent -width 100 -relief sunken \ -textvariable val -xscrollcommand "$w.f2.scr set" scrollbar $w.f2.scr -relief sunken -orient horiz -command \ "$w.f2.ent xview" $w.f2.ent delete 0 end pack $w.f2.ent $w.f2.scr -fill x frame $w.bu ttk::button $w.bu.close -text "close" -command { destroy $w } ttk::button $w.bu.get -text "get data" -command { Ng_GetSolidData $name val } ttk::button $w.bu.set -text "set data" -command { Ng_SetSolidData $name $val } pack $w.bu.get $w.bu.set $w.bu.close -side left pack $w.bu -pady 5 -side bottom ;# buttons pack $w.f2 -pady 5 -side bottom ;# edit field pack $w.f1 -pady 5 -side left ;# name pack $w.f3 -side left -expand yes -fill y ;# listbox bind $w { $w.bu.close invoke } wm withdraw $w wm geom $w +100+100 wm deiconify $w # grab $w focus $w } # # Edit top level objects # # proc toplevelproperties { w solname surfname } { global properties Ng_TopLevel getprop $solname $surfname properties set w .tlprop_dlg if {[winfo exists $w] == 1} { wm withdraw $w wm deiconify $w focus $w } { toplevel $w ttk::label $w.lab1 -text "Red" scale $w.scale1 -orient horizontal -length 300 -from 0 -to 1 \ -resolution 0.01 -tickinterval 0.2 \ -command { Ng_TopLevel setprop $solname $surfname properties; redraw } -variable properties(red) ttk::label $w.lab2 -text "Green" scale $w.scale2 -orient horizontal -length 300 -from 0 -to 1 \ -resolution 0.01 -tickinterval 0.2 \ -command { Ng_TopLevel setprop $solname $surfname properties; redraw } -variable properties(green) ttk::label $w.lab3 -text "Blue" scale $w.scale3 -orient horizontal -length 300 -from 0 -to 1 \ -resolution 0.01 -tickinterval 0.2 \ -command { Ng_TopLevel setprop $solname $surfname properties; redraw } -variable properties(blue) pack $w.lab1 $w.scale1 $w.lab2 $w.scale2 $w.lab3 $w.scale3 checkbutton $w.cb4 -text "Visible" \ -command { Ng_TopLevel setprop $solname $surfname properties; redraw } \ -variable properties(visible) checkbutton $w.cb5 -text "Transparent" \ -command { Ng_TopLevel setprop $solname $surfname properties; redraw } \ -variable properties(transp) pack $w.cb4 $w.cb5 frame $w.bu pack $w.bu -fill x ttk::button $w.bu.ok -text "Ok" -command "destroy .tlprop_dlg" pack $w.bu.ok -expand yes wm withdraw $w wm geom $w +100+100 wm deiconify $w focus $w } wm title $w "Properties $solname $surfname" } proc topleveldialog { } { global w name val sollist set w .tl_dlg toplevel $w frame $w.sol -borderwidth .5c listbox $w.sol.list -yscroll "$w.sol.scroll set" -setgrid 1 -height 12 scrollbar $w.sol.scroll -command "$w.sol.list yview" pack $w.sol.scroll -side right -fill y pack $w.sol.list -side left -expand 1 -fill both Ng_GetSolidList sollist foreach el $sollist { $w.sol.list insert end $el } Ng_GetPrimitiveList sollist foreach el $sollist { $w.sol.list insert end $el } frame $w.sul -borderwidth .5c listbox $w.sul.list -yscroll "$w.sul.scroll set" -setgrid 1 -height 12 scrollbar $w.sul.scroll -command "$w.sul.list yview" pack $w.sul.scroll -side right -fill y pack $w.sul.list -side left -expand 1 -fill both Ng_GetSurfaceList sollist foreach el $sollist { $w.sul.list insert end $el } frame $w.topl -borderwidth .5c listbox $w.topl.list -yscroll "$w.topl.scroll set" -setgrid 1 -height 12 \ -command { puts hi } scrollbar $w.topl.scroll -command "$w.topl.list yview" pack $w.topl.scroll -side right -fill y pack $w.topl.list -side left -expand 1 -fill both Ng_TopLevel getlist sollist puts $sollist foreach el $sollist { set hel "[ lindex $el 0 ]" if { [ llength $el ] == 2 } { set hel "[ lindex $el 1 ] on [ lindex $el 0 ]" } $w.topl.list insert end $hel } frame $w.bu ttk::button $w.bu.close -text "close" -command { destroy $w } ttk::button $w.bu.addsol -text "Add Solid" -command { set solname [$w.sol.list get active] Ng_TopLevel set $solname "" Ng_ParseGeometry $w.topl.list insert end $solname } ttk::button $w.bu.addsurf -text "Add Surface" -command { set solname [$w.sol.list get active] set surfname [$w.sul.list get active] Ng_TopLevel set $solname $surfname Ng_ParseGeometry puts "$solname on $surfname" $w.topl.list insert end "$surfname on $solname" } ttk::button $w.bu.remsol -text "Remove" -command { set solname [$w.topl.list get active] set surfname "" if { [llength $solname] == 3 } { set surfname [lindex $solname 0] set solname [lindex $solname 2] } Ng_TopLevel remove $solname $surfname Ng_ParseGeometry $w.topl.list delete active } ttk::button $w.bu.prop -text "Properties" -command { set solname [$w.topl.list get active] set surfname "" if { [llength $solname] == 3 } { set surfname [lindex $solname 0] set solname [lindex $solname 2] } toplevelproperties tlp $solname $surfname } pack $w.bu.close $w.bu.addsol $w.bu.addsurf $w.bu.remsol $w.bu.prop -side left pack $w.bu -side bottom pack $w.sol -side left -expand yes -fill y ;# listbox pack $w.sul -side left -expand yes -fill y ;# listbox pack $w.topl -side left -expand yes -fill y ;# listbox bind $w { $w.bu.close invoke } wm withdraw $w wm geom $w +100+100 wm deiconify $w # grab $w focus $w } proc topleveldialog2 { } { set w .tl2_dlg if {[winfo exists .tl2_dlg] == 1} { wm withdraw $w wm deiconify $w focus $w } { toplevel $w global name val sollist frame $w.topl -borderwidth .5c listbox $w.topl.list -yscroll "$w.topl.scroll set" -setgrid 1 -height 12 scrollbar $w.topl.scroll -command "$w.topl.list yview" pack $w.topl.scroll -side right -fill y pack $w.topl.list -side left -expand 1 -fill both Ng_TopLevel getlist sollist puts $sollist set i 1 foreach el $sollist { set hel "$i: [ lindex $el 0 ]" if { [ llength $el ] == 2 } { set hel "$i: [ lindex $el 1 ] on [ lindex $el 0 ]" } incr i $w.topl.list insert end $hel } frame $w.bu ttk::button $w.bu.close -text "close" -command { destroy .tl2_dlg } ttk::button $w.bu.prop -text "Properties" -command { set solname [.tl2_dlg.topl.list get active] set surfname "" if { [llength $solname] == 2 } { set solname [lindex $solname 1] } if { [llength $solname] == 4 } { set surfname [lindex $solname 1] set solname [lindex $solname 3] } toplevelproperties tlp $solname $surfname } pack $w.bu.close $w.bu.prop -side left pack $w.bu -side bottom pack $w.topl -side left -expand yes -fill y ;# listbox bind .tl2_dlg.topl.list { set solname [.tl2_dlg.topl.list get @%x,%y] set surfname "" if { [llength $solname] == 2 } { set solname [lindex $solname 1] } if { [llength $solname] == 4 } { set surfname [lindex $solname 1] set solname [lindex $solname 3] } toplevelproperties tlp $solname $surfname } bind .tl2_dlg { .tl2_dlg.bu.close invoke } wm withdraw $w wm geom $w +100+100 wm deiconify $w wm title $w "Top-Level Options" focus $w } } netgen-6.2.1804/ng/ngicon.tcl0000644000175000017500000001000413272137567014365 0ustar kurtkurtset icon_data { /* XPM */ static char *icon2[] = { /* width height num_colors chars_per_pixel */ " 60 60 6 1", /* colors */ ". c #000000", "# c #008000", "a c #00b700", "b c #00c700", "c c #00ff00", "d s c None c None", /* pixels */ "dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd", "dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd", "dddddddddddddddd..........dddddddddddddddddddddddddddddddddd", "ddddddddddddddd.c..cc#####................dddddddddddddddddd", "ddddddddddddd..cccc..ccccccccccccccccc...#...............ddd", "dddddddddddd.cccccccc..cccccccccccc...ccc..cccccccccc###..dd", "ddddddddddd.ccccccccccc..ccccccccc.cccccccc.ccccccccccc...dd", "dddddddddd.cccccccccccccc.cccccc..cccccccccc.ccccccccc.b..dd", "ddddddddd.cccccccccccccccc..ccc.ccccccccccccc..cccccc.bb..dd", "ddddddd........................cccccccccccccccc.cccc.bbb..dd", "dddddd.ccc.ccccccccccccccccc..#..............ccc.c..bbbb..dd", "dddd..ccccc..cccccccccccccc.#..##############.....bbbbb.b.dd", "ddd.ccccccccc..ccccccccccc.##.#.#################.bbbbb.b.dd", "dd.cccccccccccc..cccccccc.###.##.################.bbbbb.b.dd", "d..cccccccccccccc..ccccc.####.###.###############.bbbbb.b.dd", "d.a..............cc..cc.#####.####.##############.bbbb.bb.dd", "d..aaaaaaaaaaaaaa......######.#####.#############.bbbb.bb.dd", "d.a.aaaaaaaaaaaaaaaaa...#####.######..###########.bbbb.bb.dd", "d.aa.aaaaaaaaaaaaaaaa...#####.########.##########.bbbb.bb.dd", "d.aaa.aaaaaaaaaaaaaaa..#.####.#########.##########..b.bbb.dd", "d.aaaa.aaaaaaaaaaaaaa..#.####.##########.#########..b.bbb.dd", "d.aaaaa..aaaaaaaaaaaa..##.###.###########.########..b.bbb.dd", "d.aaaaaaa.aaaaaaaaaaa..###.###.###########.#######..b.bbb.dd", "d.aaaaaaaa.aaaaaaaaaa..###.###.############.######..b.bbb#.d", "d.aaaaaaaaa.aaaaaaaaa..####.##.#############.#####...bbbb#.d", "d.aaaaaaaaaa.aaaaaaaa..#####.#.##############.####...bbbb#.d", "d.aaaaaaaaaaa.aaaaaaa..#####.#.###############.###...bbbb#.d", "d.aaaaaaaaaaaa.aaaaaa..######..################.##...bbbb#.d", "d.aaaaaaaaaaaaa.aaaaaaa.#####..#################.#..bbbbb#.d", "d.aaaaaaaaaaaaaa.aaaaaa.#####.............#######...bbbbb#.d", "d.aaaaaaaaaaaaaaa.aaaaa.####.###.#########..........bbbbbb.d", "dd.aaaaaaaaaaaaaaa.aaaa.###.#####..##############...bbbbbb.d", "dd.aaaaaaaaaaaaaaaa.aaa.##.########.############.b...bbbbb.d", "dd.aaaaaaaaaaaaaaaaa.aa.#.##########...########.b.bbb.bbbb.d", "dd.aaaaaaaaaaaaaaaaaa....##############.######.bb.bbb.bbbb.d", "dd.aaaaaaaaaaaaaaaaaaaa...##############..###.bbb.bbbb.bbb.d", "dd.aaaaaaaaaaaaaaaaaa..a.a..............##.#.bbbb.bbbb.bbb.d", "dd.aaaaaaaaaaaaaaaaa.aaaa.aaaaaaaaaaaaaa....bbbb.bbbbbb.bb.d", "dd.aaaaaaaaaaaaaaaa.aaaaa.aaaaaaaaaaaaaaaaa.bbbb.bbbbbbb.b.d", "dd.aaaaaaaaaaaaaaa.aaaaaaa.aaaaaaaaaaaaaaaa.bbbb.bbbbbbb.b.d", "dd.aaaaaaaaaaaaaa.aaaaaaaaa.aaaaaaaaaaaaaaa.bbbb.bbbbbbbb..d", "dd.aaaaaaaaaaaaa.aaaaaaaaaaa.aaaaaaaaaaaaaa.bbb.bbbbbbbbb..d", "dd.aaaaaaaaaaaa.aaaaaaaaaaaaa.aaaaaaaaaaaaa.bbb.bbbbbbbbbb.d", "dd.aaaaaaaaaaa.aaaaaaaaaaaaaaa.aaaaaaaaaaaa.bbb.bbbbbbbbbb.d", "dd.aaaaaaaaaa.aaaaaaaaaaaaaaaaa.aaaaaaaaaaaa.bb.bbbbbbbbb.dd", "dd.aaaaaaaaa.aaaaaaaaaaaaaaaaaaa.aaaaaaaaaaa.bb.bbbbbbbb.ddd", "dd.aaaaaaaa.aaaaaaaaaaaaaaaaaaaaa.aaaaaaaaaa.b.bbbbbbbb.dddd", "dd.aaaaaaa.aaaaaaaaaaaaaaaaaaaaaaa.aaaaaaaaa.b.bbbbbbb.ddddd", "dd.aaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaa.aaaaaaaa.b.bbbbbb.dddddd", "dd.aaaa..aaaaaaaaaaaaaaaaaaaaaaaaaaa..aaaaaa.b.bbbbb.ddddddd", "ddd.aa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.aaaaa..bbbb..dddddddd", "ddd.a.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.aaaa..bbb.dddddddddd", "ddd..aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.aaa..bb.ddddddddddd", "ddd........aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.aa..b.dddddddddddd", "ddddddddddd.............aaaaaaaaaaaaaaaaaa.a...ddddddddddddd", "dddddddddddddddddddddddd............aaaaaaa...dddddddddddddd", "dddddddddddddddddddddddddddddddddddd.........ddddddddddddddd", "dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd", "dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd", "dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd" }; } netgen-6.2.1804/ng/occgeom.tcl0000644000175000017500000003423513272137567014540 0ustar kurtkurtif { [catch { load liboccvis[info sharedlibextension] Ng_OCC } result ] } { # puts "cannot load occ" # puts "error: $result" } if { [catch { Ng_OCCCommand isoccgeometryloaded }] } { # dummy proc rebuildoccdialog { } { } } { puts "OCC module loaded" set hasocc yes .ngmenu.geometry add separator .ngmenu.geometry add command -label "IGES/STEP Topology Explorer/Doctor..." \ -command { occdialog; } # Philippose - 30/01/2009 # Add menu item for local face mesh size definition in the # TCL Gui .ngmenu.geometry add command -label "Edit Face Mesh Size..." \ -command { surfacemeshsizedialog } # .ngmenu.geometry add command -label "OCC Construction" \ # -command { Ng_OCCConstruction; } set entities [ ] proc occdialogbuildtree {} { global entities set w .occ_dlg #set hlist [$w.mtre subwidget hlist] set entities [Ng_GetOCCData getentities] set nrentities [expr [llength $entities]] if {$nrentities != 0} { #$hlist add Topology -itemtype text -text "Topology" #$hlist add Topology/CompSolids -itemtype text -text "Composite Solids" -data "Composite Solids" #$hlist add Topology/FreeSolids -itemtype text -text "Free Solids" -data "Free Solids" #$hlist add Topology/FreeShells -itemtype text -text "Free Shells" -data "Free Shells" #$hlist add Topology/FreeFaces -itemtype text -text "Free Faces" -data "Free Faces" #$hlist add Topology/FreeWires -itemtype text -text "Free Wires" -data "Free Wires" #$hlist add Topology/FreeEdges -itemtype text -text "Free Edges" -data "Free Edges" #$hlist add Topology/FreeVertices -itemtype text -text "Free Vertices" -data "Free Vertices" $w.tree insert {Topology} end -id "CompSolids" -text "Composite Solids" $w.tree insert {Topology} end -id "FreeSolids" -text "Free Solids" $w.tree insert {Topology} end -id "FreeShells" -text "Free Shells" $w.tree insert {Topology} end -id "FreeFaces" -text "Free Faces" $w.tree insert {Topology} end -id "FreeWires" -text "Free Wires" $w.tree insert {Topology} end -id "FreeEdges" -text "Free Edges" $w.tree insert {Topology} end -id "FreeVertices" -text "Free Vertices" # $hlist add SingularEntities -itemtype text -text "Entities marked as singular" $w.tree item "Topology" -open true set i [expr 0] while {$i < $nrentities} { set entity [lindex $entities [expr $i]] incr i 1 set entityname [lindex $entities [expr $i]] #$hlist add Topology/$entity -text $entityname -data $entityname set myroot [string range $entity 0 [string last / $entity]-1] $w.tree insert $myroot end -id $entity -text $entityname -value 1 incr i 1 #$w.mtre close Topology/$entity } #$w.mtre autosetmode #$w.mtre open Topology #$w.mtre close Topology/CompSolids #$w.mtre close Topology/FreeSolids #$w.mtre close Topology/FreeShells #$w.mtre close Topology/FreeFaces #$w.mtre close Topology/FreeWires #$w.mtre close Topology/FreeEdges #$w.mtre close Topology/FreeVertices set i [expr 0] while {$i < $nrentities} { set entity [lindex $entities [expr $i]] #$w.mtre close Topology/$entity $w.tree item $entity -open false incr i 2 } set faces [Ng_OCCCommand getunmeshedfaceinfo] set nrfaces [expr [llength $faces]] if {$nrfaces >= 2} { #$hlist add ErrorFaces -itemtype text -text "Faces with surface meshing error" $w.tree insert {} -id ErrorFaces -text "Faces with surface meshing error" #$w.mtre open ErrorFaces $w.tree item ErrorFaces -open true set i [expr 0] while {$i < $nrfaces} { set entity [lindex $faces [expr $i]] set myroot [string range $entity 0 [string last / $entity]-1] if { [string length $myroot] == 0 } { set myroot ErrorFaces } incr i 1 set entityname [lindex $faces [expr $i]] #$hlist add ErrorFaces/$entity -text $entityname -data $entityname $w.tree insert {myroot} end -id $entity -text $entityname -value 0 incr i 1 } } set faces [Ng_OCCCommand getnotdrawablefaces] set nrfaces [expr [llength $faces]] if {$nrfaces >= 2} { #$hlist add NotDrawableFaces -itemtype text -text "Faces impossible to visualize" $w.tree insert {} -id NotDrawableFaces -text "Faces impossible to visualize" #$w.mtre open NotDrawableFaces $w.tree item NotDrawableFaces -open true set i [expr 0] while {$i < $nrfaces} { set entity [lindex $faces [expr $i]] set myroot [string range $entity 0 [string last / $entity]-1] if { [string length $myroot ] == 0 } { set myroot NotDrawableFaces } incr i 1 set entityname [lindex $faces [expr $i]] #$hlist add NotDrawableFaces/$entity -text $entityname -data $entityname $w.tree insert $myroot end -id $entity -text $entityname -value 0 incr i 1 } } #$w.mtre autosetmode puts "done" } } proc rebuildoccdialog {} { if {[winfo exists .occ_dlg] == 1} { .occ_dlg.tree delete [.occ_dlg.tree children Topology] #[.occ_dlg.mtre subwidget hlist] delete all occdialogbuildtree } } proc checkoccloaded { } { set isoccgeometryloaded [Ng_OCCCommand isoccgeometryloaded] if {$isoccgeometryloaded == 0} { puts "no IGES/STEP geometry loaded" destroy .occ_dlg } } #proc setocctolerance { } { # set w .setocctolerance #} proc selectentity { entityname } { global entities set nrentities [expr [llength $entities]] set i [expr 0] while {$i < $nrentities} { set entitylength [] set entity2 [lindex $entities [expr $i]] incr i 1 set entityname2 [lindex $entities [expr $i]] incr i 1 set entityname2 [string range $entityname2 0 [expr [string length $entityname]-1]] if {$entityname == $entityname2} { # #set hlist [.occ_dlg.mtre subwidget hlist] # #.occ_dlg.mtre open Topology # .occ_dlg.tree item Topology -open true # puts $entity2 # set slashpos [string last "/" $entity2] # set entity3 [string range $entity2 0 [expr $slashpos-1]] # while {$slashpos != -1} { # #.occ_dlg.mtre open Topology/$entity3 # .occ_dlg.tree item $entity3 -open true # puts $entity3 # set slashpos [string last "/" $entity3] # set entity3 [string range $entity3 0 [expr $slashpos-1]] # } #$hlist selection clear .occ_dlg.tree see $entity2 .occ_dlg.tree selection set $entity2 } } } proc occdialog { } { uplevel 1 { global entities set selectvisual geometry Ng_SetVisParameters redraw set w .occ_dlg if {[winfo exists .occ_dlg] == 1} { wm withdraw $w wm deiconify $w focus $w } { toplevel $w ttk::treeview $w.tree $w.tree insert {} end -id "Topology" -text "Topology" pack $w.tree -fill both -expand yes occdialogbuildtree bind $w.tree { set entityname [.occ_dlg.tree item [.occ_dlg.tree selection] -text ] set rootname "" if {[.occ_dlg.tree item [.occ_dlg.tree selection] -value] == 1 } { set rootname "Topology" } set spacepos [string first " " $entityname] set entitytype [string range $entityname 0 [expr $spacepos-1]] set helpstring [string range $entityname [expr $spacepos+1] [expr [string length $entityname]-1]] set spacepos2 [string first " " $helpstring] set entitynumber [string range $helpstring 0 [expr $spacepos2-1]] if {$rootname == "Topology"} { Ng_OCCCommand highlightentity $entitytype $entitynumber set selectvisual geometry redraw } { set brackpos [string first " (" $entityname] if {$brackpos != -1} { set entityname [string range $entityname 0 $brackpos] } selectentity $entityname } } ttk::button $w.cl -text "Close" -command { destroy .occ_dlg } ttk::button $w.show -text "Show" -command { set entityname [.occ_dlg.tree item [.occ_dlg.tree selection] -text ] set spacepos [string first " " $entityname] set entitytype [string range $entityname 0 [expr $spacepos-1]] set helpstring [string range $entityname [expr $spacepos+1] [expr [string length $entityname]-1]] set spacepos2 [string first " " $helpstring] set entitynumber [string range $helpstring 0 [expr $spacepos2-1]] Ng_OCCCommand show $entitytype $entitynumber set selectvisual geometry # Ng_SetVisParameters redraw } ttk::button $w.hide -text "Hide" -command { set entityname [.occ_dlg.tree item [.occ_dlg.tree selection] -text ] set spacepos [string first " " $entityname] set entitytype [string range $entityname 0 [expr $spacepos-1]] set helpstring [string range $entityname [expr $spacepos+1] [expr [string length $entityname]-1]] set spacepos2 [string first " " $helpstring] set entitynumber [string range $helpstring 0 [expr $spacepos2-1]] Ng_OCCCommand hide $entitytype $entitynumber set selectvisual geometry # Ng_SetVisParameters redraw } ttk::button $w.swaporientation -text "Swap orientation" -command { set entityname [.occ_dlg.tree item [.occ_dlg.tree selection] -text ] set spacepos [string first " " $entityname] set entitytype [string range $entityname 0 [expr $spacepos-1]] set helpstring [string range $entityname [expr $spacepos+1] [expr [string length $entityname]-1]] set spacepos2 [string first " " $helpstring] set entitynumber [string range $helpstring 0 [expr $spacepos2-1]] Ng_OCCCommand swaporientation $entitytype $entitynumber set selectvisual geometry # Ng_SetVisParameters redraw .occ_dlg.tree delete [.occ_dlg.tree children Topology] #[.occ_dlg.mtre subwidget hlist] delete all occdialogbuildtree } ttk::button $w.marksingular -text "Mark/Unmark as singular" -command { set entityname [.occ_dlg.tree item [.occ_dlg.tree selection] -text ] set spacepos [string first " " $entityname] if { $spacepos != 0 } { set entitytype [string range $entityname 0 [expr $spacepos-1]] set helpstring [string range $entityname [expr $spacepos+1] [expr [string length $entityname]-1]] set spacepos2 [string first " " $helpstring] if { $spacepos2 != 0 } { set entitynumber [string range $helpstring 0 [expr $spacepos2-1]] puts $entitytype puts $entitynumber global ismarkedsingular Ng_OCCCommand marksingular $entitytype $entitynumber if { $ismarkedsingular == 0 } { .occ_dlg.tree tag remove "Color" [.occ_dlg.tree selection] } { .occ_dlg.tree tag add "Color" [.occ_dlg.tree selection] .occ_dlg.tree tag configure "Color" -foreground "red" .occ_dlg.tree tag configure "Color" -background "blue" } } } } ttk::checkbutton $w.zoomtohighlightedentity -text "Zoom to highlighted entity" \ -variable occoptions.zoomtohighlightedentity \ -command { Ng_SetOCCVisParameters if { ${occoptions.zoomtohighlightedentity} == 1} { set selectvisual geometry # Ng_SetVisParameters Ng_OCCCommand redrawstatus 1 redraw } { Ng_OCCCommand redrawstatus 0 } } ttk::frame $w.healing -relief groove -borderwidth 3 ttk::button $w.healing.checkentities -text "Analyze geometry" -command { set irregent [Ng_OCCCommand findsmallentities] set w .occ_dlg set nritems [expr [llength $irregent]] set i [expr 0] if {$nritems > 0 } { if { [.occ_dlg.tree exists ProblematicEntities] == 1 } { $w.tree delete ProblematicEntities } $w.tree insert {} end -id ProblematicEntities -text "Problematic Entities" } while {$i < $nritems} { set entity [lindex $irregent [expr $i]] incr i 1 set entityname [lindex $irregent [expr $i]] #puts $entity #puts $entityname set myroot [string range $entity 0 [string last / $entity]-1] if { [string length $myroot] == 0 } { set myroot ProblematicEntities } $w.tree insert $myroot end -id $entity -text $entityname incr i 1 } $w.tree item ProblematicEntities -open true } # tixControl $w.healing.tolerance -label "Healing tolerance: " -integer false \ # -variable occoptions.tolerance -min 1e-9 -max 1e6 \ # -options { # entry.width 6 # label.width 25 # label.anchor e # } ttk::frame $w.healing.tolerance ttk::label $w.healing.tolerance.label -text "Healing tolerance: " ttk::spinbox $w.healing.tolerance.sp -textvariable occoptions.tolerance -width 6 -increment 0.01 -validate focus -validatecommand "my_validatespinbox %W %P 12" \ -invalidcommand "my_invalidspinbox %W" -from -1e-9 -to 1e6 grid $w.healing.tolerance.label $w.healing.tolerance.sp ttk::checkbutton $w.healing.fixsmalledges -text "Fix small edges" \ -variable occoptions.fixsmalledges ttk::checkbutton $w.healing.fixspotstripfaces -text "Fix spot/strip faces" \ -variable occoptions.fixspotstripfaces ttk::checkbutton $w.healing.sewfaces -text "Sew faces" \ -variable occoptions.sewfaces ttk::checkbutton $w.healing.makesolids -text "Make solids" \ -variable occoptions.makesolids ttk::checkbutton $w.healing.splitpartitions -text "Split partitions" \ -variable occoptions.splitpartitions ttk::button $w.healing.heal -text "Heal geometry" -command { #.occ_dlg.healing.tolerance.sp invoke Ng_OCCCommand shapehealing redraw .occ_dlg.tree delete [.occ_dlg.tree children Topology] #[.occ_dlg.mtre subwidget hlist] delete all occdialogbuildtree } pack $w.healing.checkentities pack $w.healing.tolerance $w.healing.fixsmalledges \ $w.healing.fixspotstripfaces $w.healing.sewfaces \ $w.healing.makesolids $w.healing.splitpartitions -anchor w pack $w.healing.heal pack $w.show $w.hide pack $w.zoomtohighlightedentity -anchor w # pack $w.checkentities pack $w.swaporientation pack $w.marksingular pack $w.healing -fill x pack $w.cl wm withdraw $w wm geom $w +100+100 wm deiconify $w wm title $w "IGES/STEP Topology Explorer/Doctor" focus .occ_dlg } } } }netgen-6.2.1804/ng/netgen.ocf0000644000175000017500000000134313272137567014363 0ustar kurtkurt# Netgen Mesher # Boundary Condition Colour Profile # # Name: netgen.ocf # # Description: Netgen default colour # profile file for colour based automatic # assignment of boundary condition numbers # # Format: # [boundary_colours] (mandatory keyword) # # # # .... # .... # NOTE: # * Currently, the default Boundary # Condition number assigned to faces without # any colour defined is "1" # * Boundary Condition number "0" is invalid, # and should not be used boundary_colours 7 2 0.0000 0.0000 0.0000 3 1.0000 0.0000 0.0000 4 0.0000 0.0000 1.0000 5 1.0000 1.0000 0.0000 6 0.0000 1.0000 1.0000 7 1.0000 0.0000 1.0000 8 1.0000 1.0000 1.0000 netgen-6.2.1804/ng/encoding.hpp0000644000175000017500000001601613272137567014714 0ustar kurtkurt#ifndef ENCODING_HPP_INCLUDED__ #define ENCODING_HPP_INCLUDED__ #ifdef FFMPEG extern "C" { #include #include #include #include #include #include #include #include #include } constexpr int BITRATE = 50000000; class Mpeg { private: bool is_started =false; int framerate = 25; AVOutputFormat *fmt; AVFormatContext *oc; AVStream *st; AVCodecContext *enc; AVFrame *frame; AVFrame *rgb_frame; uint8_t *rgb_buffer; struct SwsContext *sws_ctx; AVFrame *alloc_picture(enum AVPixelFormat pix_fmt) { AVFrame *picture; picture = av_frame_alloc(); if (!picture) return NULL; picture->format = pix_fmt; picture->width = width; picture->height = height; av_frame_get_buffer(picture, 32); return picture; } public: int width; int height; bool IsStarted() { return is_started; } int AddFrame() { int ret; int got_packet = 0; AVPacket pkt = { 0 }; glReadPixels (0, 0, width, height, GL_RGB, GL_UNSIGNED_BYTE, rgb_buffer); av_image_fill_arrays(rgb_frame->data, rgb_frame->linesize, rgb_buffer, AV_PIX_FMT_RGB24, width, height, 1); if (av_frame_make_writable(frame) < 0) return 1; // The picture is upside down - flip it: auto data = rgb_frame->data[0] + 3*width*height; uint8_t *flipped_data[4] = { data, data, data, data }; int flipped_stride[4] = { -rgb_frame->linesize[0], -rgb_frame->linesize[1], -rgb_frame->linesize[2], -rgb_frame->linesize[3] }; sws_scale(sws_ctx, flipped_data, flipped_stride, 0, enc->height, frame->data, frame->linesize); av_init_packet(&pkt); got_packet = 0; ret = avcodec_send_frame(enc, frame); if (ret < 0) { cerr << "Error encoding video frame: " << endl; return(1); } ret = avcodec_receive_packet(enc, &pkt); if (!ret) got_packet = 1; if (ret == AVERROR(EAGAIN)) return 0; if (ret < 0) { cerr << "Error encoding video frame: " << endl; return 1; } if (got_packet) { /* rescale output packet timestamp values from codec to stream timebase */ av_packet_rescale_ts(&pkt, enc->time_base, st->time_base); pkt.stream_index = st->index; /* Write the compressed frame to the media file. */ ret = av_interleaved_write_frame(oc, &pkt); } else { ret = 0; } if (ret < 0) { cerr << "Error while writing video frame: " << endl; return(1); } return 0; } int Start(string filename) { AVCodec *video_codec; if(is_started) { cerr << "Stream already started" << endl; return 1; } is_started = true; GLint dims[4] = {0}; glGetIntegerv(GL_VIEWPORT, dims); width = dims[2]; height= dims[3]; width = int((width+1)/4)*4+4; height = 2 * (height/2); int ret; int i; av_register_all(); avformat_alloc_output_context2(&oc, NULL, NULL, filename.c_str()); // oc->preload= (int)(0.5*AV_TIME_BASE); oc->max_delay= (int)(0.7*AV_TIME_BASE); fmt = oc->oformat; if (fmt->video_codec != AV_CODEC_ID_NONE) { /* find the encoder */ video_codec = avcodec_find_encoder(fmt->video_codec); if (!(video_codec)) { cerr << "Could not find encoder for '" << avcodec_get_name(fmt->video_codec) << "'" << endl; return 1; } st = avformat_new_stream(oc, NULL); if (!st) { cerr << "Could not allocate stream\n"; return 1; } st->id = oc->nb_streams-1; enc = avcodec_alloc_context3(video_codec); if (!enc) { cerr << "Could not alloc an encoding context\n"; return 1; } enc->codec_id = fmt->video_codec; enc->bit_rate = BITRATE; enc->width = width; enc->height = height; AVRational tb; tb.num=1; tb.den=framerate; st->time_base = tb; enc->time_base = st->time_base; enc->gop_size = 200; enc->pix_fmt = AV_PIX_FMT_YUV420P; if (enc->codec_id == AV_CODEC_ID_MPEG2VIDEO) { enc->max_b_frames = 3; } if (enc->codec_id == AV_CODEC_ID_MPEG1VIDEO) { enc->mb_decision = 2; } if (oc->oformat->flags & AVFMT_GLOBALHEADER) enc->flags |= AV_CODEC_FLAG_GLOBAL_HEADER; // enc->flags |= CODEC_FLAG_QSCALE; // enc->global_quality = 1180; } else { cerr << "could not init codecs!" << endl; return 1; } AVDictionary *opt = NULL; /* open the codec */ ret = avcodec_open2(enc, video_codec, &opt); av_dict_free(&opt); if (ret < 0) { cerr << "Could not open video codec" << endl; return 1; } /* allocate and init a re-usable frame */ frame = alloc_picture(enc->pix_fmt); if (!frame) { cerr << "Could not allocate video frame\n"; return 1; } /* copy the stream parameters to the muxer */ ret = avcodec_parameters_from_context(st->codecpar, enc); if (ret < 0) { cerr << "Could not copy the stream parameters\n"; return 1; } av_dump_format(oc, 0, filename.c_str(), 1); if (!(fmt->flags & AVFMT_NOFILE)) { ret = avio_open(&oc->pb, filename.c_str(), AVIO_FLAG_WRITE); if (ret < 0) { cerr << "Could not open " << filename << " : " << endl; return 1; } } ret = avformat_write_header(oc, &opt); if (ret < 0) { cerr << "Error occurred when opening output file: " << endl;; return 1; } rgb_frame = alloc_picture(AV_PIX_FMT_RGB24); rgb_buffer = new uint8_t[width*height*4]; sws_ctx = sws_getContext( width, height, AV_PIX_FMT_RGB24, width, height, AV_PIX_FMT_YUV420P, SWS_BICUBIC, NULL, NULL, NULL ); } void Stop() { av_write_trailer(oc); avcodec_free_context(&enc); av_frame_free(&frame); sws_freeContext(sws_ctx); if (!(fmt->flags & AVFMT_NOFILE)) avio_closep(&oc->pb); avformat_free_context(oc); delete [] rgb_buffer; is_started = false; } }; #endif // FFMPEG #endif // ENCODING_HPP_INCLUDED__ netgen-6.2.1804/ng/demoview.hpp0000644000175000017500000000516113272137567014744 0ustar kurtkurt#ifndef FILE_DEMOVIEW #define FILE_DEMOVIEW /*********************************************************************/ /* File: demoview.hpp */ /* Author: Robert, Joachim */ /* Date: 6. Mar. 2003 */ /*********************************************************************/ using namespace netgen; enum DEMOVIEW_TOKEN_TYPE { DTOK_MINUS = '-', DTOK_LP = '(', DTOK_RP = ')', DTOK_LSP = '[', DTOK_RSP = ']', DTOK_EQU = '=', DTOK_COMMA = ',', DTOK_SEMICOLON = ';', DTOK_COLON = ':', DTOK_PLUS = '+', DTOK_NUM = 100, DTOK_STRING, DTOK_TIME, DTOK_CAMPOS, DTOK_CAMPOINT, DTOK_CAMUP, DTOK_END }; struct demoview_kwstruct { DEMOVIEW_TOKEN_TYPE kw; const char * name; }; class DemoScanner { DEMOVIEW_TOKEN_TYPE token; double num_value; string string_value; int linenum; ifstream * scanin; public: DemoScanner (ifstream & ascanin); DEMOVIEW_TOKEN_TYPE GetToken() const { return token; } double GetNumValue() const { return num_value; } const string & GetStringValue() const { return string_value; } void ReadNext(); void Error (const string & err); }; void ParseChar (DemoScanner & scan, char ch); double ParseNumber(DemoScanner & scan); Vec<3> ParseVector (DemoScanner & scan); template class InterpolationPoint { double t; S s; public: InterpolationPoint() {}; ~InterpolationPoint() {}; double GetT() const { return t; }; S GetS() const { return s; }; void SetTS(double at, S as) { t = at; s = as; }; InterpolationPoint & operator= (const InterpolationPoint & ip2) { SetTS (ip2.t, ip2.s); return (*this); }; }; template class InterpolationSpline { protected: // Array < InterpolationPoint[3] > ip; class intpts { public: InterpolationPoint pts[3]; InterpolationPoint & operator[](int i) { return pts[i]; } }; Array < intpts > ip; int finished; public: InterpolationSpline() : finished(0) {}; InterpolationSpline( S s1 ) : finished(0) { AddSpline (-1e99, -1e99, -1e99, s1, s1, s1); // InterpolationSpline(); } ~InterpolationSpline() {}; void AddSpline(double t1, double t2, double t3, S s1, S s2, S s3); S Evaluate (double t); int IsFinished() const { return finished; } }; class DemoView { InterpolationSpline< Vec<3> > campos; InterpolationSpline< Vec<3> > campoint; InterpolationSpline< Vec<3> > camup; public: DemoView (const char * filename); ~DemoView (); int SetTime (double time); }; #endif netgen-6.2.1804/ng/togl_1_7.h0000644000175000017500000001431013272137567014174 0ustar kurtkurt/* $Id: togl.h,v 1.28 2005/10/27 07:45:48 gregcouch Exp $ */ /* vi:set sw=4: */ /* * Togl - a Tk OpenGL widget * * Copyright (C) 1996-1998 Brian Paul and Ben Bederson * See the LICENSE file for copyright details. */ #ifndef TOGL_H # define TOGL_H #if !defined TOGL_X11 && !defined TOGL_WGL && !defined TOGL_AGL_CLASSIC && !defined TOGL_AGL # include "togl_ws.h" #endif # ifdef TOGL_WGL # define WIN32_LEAN_AND_MEAN # include # undef WIN32_LEAN_AND_MEAN # if defined(_MSC_VER) # define DllEntryPoint DllMain # endif # endif # ifdef _WIN32 # define TOGL_EXTERN __declspec(dllexport) extern # else # define TOGL_EXTERN extern # endif /* _WIN32 */ # ifdef TOGL_AGL_CLASSIC # ifndef MAC_TCL # define MAC_TCL 1 # endif # endif # ifdef TOGL_AGL # ifndef MAC_OSX_TCL # define MAC_OSX_TCL 1 # endif # ifndef MAC_OSX_TK # define MAC_OSX_TK 1 # endif # endif # include # include # if defined(TOGL_AGL) || defined(TOGL_AGL_CLASSIC) # include # else # include # endif # ifdef __sgi # include # include # endif # ifndef CONST84 # define CONST84 # endif # ifndef NULL # define NULL 0 # endif # ifndef TOGL_USE_FONTS # define TOGL_USE_FONTS 1 /* needed for demos */ # endif # ifdef __cplusplus /* *INDENT-OFF* */ extern "C" { /* *INDENT-ON* */ # endif # define TOGL_VERSION "1.7" # define TOGL_MAJOR_VERSION 1 # define TOGL_MINOR_VERSION 7 /* * "Standard" fonts which can be specified to Togl_LoadBitmapFont() */ # define TOGL_BITMAP_8_BY_13 ((char *) 1) # define TOGL_BITMAP_9_BY_15 ((char *) 2) # define TOGL_BITMAP_TIMES_ROMAN_10 ((char *) 3) # define TOGL_BITMAP_TIMES_ROMAN_24 ((char *) 4) # define TOGL_BITMAP_HELVETICA_10 ((char *) 5) # define TOGL_BITMAP_HELVETICA_12 ((char *) 6) # define TOGL_BITMAP_HELVETICA_18 ((char *) 7) /* * Normal and overlay plane constants */ # define TOGL_NORMAL 1 # define TOGL_OVERLAY 2 struct Togl; typedef struct Togl Togl; typedef void (Togl_Callback) (Togl *togl); typedef int (Togl_CmdProc) (Togl *togl, int argc, CONST84 char *argv[]); TOGL_EXTERN int Togl_Init(Tcl_Interp *interp); /* * Default/initial callback setup functions */ TOGL_EXTERN void Togl_CreateFunc(Togl_Callback *proc); TOGL_EXTERN void Togl_DisplayFunc(Togl_Callback *proc); TOGL_EXTERN void Togl_ReshapeFunc(Togl_Callback *proc); TOGL_EXTERN void Togl_DestroyFunc(Togl_Callback *proc); TOGL_EXTERN void Togl_TimerFunc(Togl_Callback *proc); TOGL_EXTERN void Togl_ResetDefaultCallbacks(void); /* * Change callbacks for existing widget */ TOGL_EXTERN void Togl_SetCreateFunc(Togl *togl, Togl_Callback *proc); TOGL_EXTERN void Togl_SetDisplayFunc(Togl *togl, Togl_Callback *proc); TOGL_EXTERN void Togl_SetReshapeFunc(Togl *togl, Togl_Callback *proc); TOGL_EXTERN void Togl_SetDestroyFunc(Togl *togl, Togl_Callback *proc); TOGL_EXTERN void Togl_SetTimerFunc(Togl *togl, Togl_Callback *proc); /* * Miscellaneous */ TOGL_EXTERN int Togl_Configure(Tcl_Interp *interp, Togl *togl, int argc, const char *argv[], int flags); TOGL_EXTERN void Togl_MakeCurrent(const Togl *togl); TOGL_EXTERN void Togl_CreateCommand(char *cmd_name, Togl_CmdProc *cmd_proc); TOGL_EXTERN void Togl_PostRedisplay(Togl *togl); TOGL_EXTERN void Togl_SwapBuffers(const Togl *togl); /* * Query functions */ TOGL_EXTERN const char *Togl_Ident(const Togl *togl); TOGL_EXTERN int Togl_Width(const Togl *togl); TOGL_EXTERN int Togl_Height(const Togl *togl); TOGL_EXTERN Tcl_Interp *Togl_Interp(const Togl *togl); TOGL_EXTERN Tk_Window Togl_TkWin(const Togl *togl); /* * Color Index mode */ TOGL_EXTERN unsigned long Togl_AllocColor(const Togl *togl, float red, float green, float blue); TOGL_EXTERN void Togl_FreeColor(const Togl *togl, unsigned long index); TOGL_EXTERN void Togl_SetColor(const Togl *togl, unsigned long index, float red, float green, float blue); # if TOGL_USE_FONTS == 1 /* * Bitmap fonts */ TOGL_EXTERN GLuint Togl_LoadBitmapFont(const Togl *togl, const char *fontname); TOGL_EXTERN void Togl_UnloadBitmapFont(const Togl *togl, GLuint fontbase); # endif /* * Overlay functions */ TOGL_EXTERN void Togl_UseLayer(Togl *togl, int layer); TOGL_EXTERN void Togl_ShowOverlay(Togl *togl); TOGL_EXTERN void Togl_HideOverlay(Togl *togl); TOGL_EXTERN void Togl_PostOverlayRedisplay(Togl *togl); TOGL_EXTERN void Togl_OverlayDisplayFunc(Togl_Callback *proc); TOGL_EXTERN int Togl_ExistsOverlay(const Togl *togl); TOGL_EXTERN int Togl_GetOverlayTransparentValue(const Togl *togl); TOGL_EXTERN int Togl_IsMappedOverlay(const Togl *togl); TOGL_EXTERN unsigned long Togl_AllocColorOverlay(const Togl *togl, float red, float green, float blue); TOGL_EXTERN void Togl_FreeColorOverlay(const Togl *togl, unsigned long index); /* * User client data */ TOGL_EXTERN void Togl_ClientData(ClientData clientData); TOGL_EXTERN ClientData Togl_GetClientData(const Togl *togl); TOGL_EXTERN void Togl_SetClientData(Togl *togl, ClientData clientData); # ifdef TOGL_X11 /* * X11-only commands. * Contributed by Miguel A. De Riera Pasenau (miguel@DALILA.UPC.ES) */ TOGL_EXTERN Display *Togl_Display(const Togl *togl); TOGL_EXTERN Screen *Togl_Screen(const Togl *togl); TOGL_EXTERN int Togl_ScreenNumber(const Togl *togl); TOGL_EXTERN Colormap Togl_Colormap(const Togl *togl); # endif # ifdef __sgi /* * SGI stereo-only commands. * Contributed by Ben Evans (Ben.Evans@anusf.anu.edu.au) */ TOGL_EXTERN void Togl_OldStereoDrawBuffer(GLenum mode); TOGL_EXTERN void Togl_OldStereoClear(GLbitfield mask); # endif TOGL_EXTERN void Togl_StereoFrustum(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat near, GLfloat far, GLfloat eyeDist, GLfloat eyeOffset); /* * Generate EPS file. * Contributed by Miguel A. De Riera Pasenau (miguel@DALILA.UPC.ES) */ TOGL_EXTERN int Togl_DumpToEpsFile(const Togl *togl, const char *filename, int inColor, void (*user_redraw) (const Togl *)); # ifdef TOGL_AGL_CLASSIC /* * Mac-specific setup functions */ extern int Togl_MacInit(void); extern int Togl_MacSetupMainInterp(Tcl_Interp *interp); # endif # ifdef __cplusplus /* *INDENT-OFF* */ } /* *INDENT-ON* */ # endif #endif netgen-6.2.1804/ng/stlgeom.tcl0000644000175000017500000000137513272137567014575 0ustar kurtkurt#if { [catch { load libstlvis[info sharedlibextension] Ng_STL } result ] } { # puts "cannot load stl" # puts "error: $result" #} .ngmenu.geometry add separator .ngmenu.geometry add command -label "STL Doctor..." \ -command { stldoctordialog; } .ngmenu.geometry add command -label "STL Info" \ -command { set notriangles 0 set minx 0 set maxx 0 set miny 0 set maxy 0 set minz 0 set maxz 0 set trigscons 0 Ng_STLInfo notriangles minx maxx miny maxy minz maxz trigscons set msgtext "NO STL-Triangles : $notriangles\nGeometry:\nX = $minx - $maxx\nY = $miny - $maxy\nZ = $minz - $maxz\nConsistency Check = $trigscons\n" set msgtext "$msgtext Status: [Ng_STLInfo status]" tk_messageBox -title "STL Info" -message $msgtext -type ok } netgen-6.2.1804/ng/ngappinit.cpp0000644000175000017500000002210613272137567015107 0ustar kurtkurt/* The main function of netgen. This file is a modification of tkAppInit.c from the Tcl/Tk package */ #include #include #include #ifdef PARALLEL #include extern void ParallelRun(); namespace netgen { MPI_Comm mesh_comm; } #endif #include "../libsrc/interface/writeuser.hpp" namespace netgen { DLL_HEADER extern Flags parameters; DLL_HEADER extern bool netgen_executable_started; } DLL_HEADER extern bool nodisplay; using netgen::parameters; using netgen::ngdir; using netgen::verbose; using netgen::Array; using netgen::RegisterUserFormats; /* * The following variable is a special hack that is needed in order for * Sun shared libraries to be used for Tcl. */ // extern "C" int matherr(); // int *tclDummyMathPtr = (int *) matherr; extern "C" int Ng_ServerSocketManagerInit (int port); extern "C" int Ng_ServerSocketManagerRun (void); bool shellmode = false; /* * * The Netgen main function * */ int main(int argc, char ** argv) { netgen::netgen_executable_started = true; #ifdef PARALLEL int mpi_required = MPI_THREAD_MULTIPLE; #ifdef VTRACE mpi_required = MPI_THREAD_SINGLE; #endif int mpi_provided; MPI_Init_thread(&argc, &argv, mpi_required, &mpi_provided); MPI_Comm_size(MPI_COMM_WORLD, &netgen::ntasks); MPI_Comm_rank(MPI_COMM_WORLD, &netgen::id); MPI_Comm_dup ( MPI_COMM_WORLD, &netgen::mesh_comm); #endif if ( netgen::id == 0 ) { cout << "NETGEN-" << PACKAGE_VERSION << endl; cout << "Developed by Joachim Schoeberl at" << endl << "2010-xxxx Vienna University of Technology" << endl << "2006-2010 RWTH Aachen University" << endl << "1996-2006 Johannes Kepler University Linz" << endl; #ifdef OCCGEOMETRY cout << "Including OpenCascade geometry kernel" << endl; #endif #ifdef ACIS cout << "Including ACIS geometry kernel" << endl; #endif #ifdef LINUX //feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW); //feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW | FE_UNDERFLOW); //cout << "Handle Floating Point Exceptions: " << fegetexcept() << endl; #endif #ifdef DEBUG cout << "You are running the debug version !" << endl; #endif #ifdef PARALLEL if (netgen::ntasks == 1) { cout << "Run parallel Netgen with 'mpirun -np xy netgen'" << endl; } else { cout << "Running MPI - parallel using " << netgen::ntasks << " processor" << ((netgen::ntasks > 1) ? "s " : " ") << endl; cout << "MPI-version = " << MPI_VERSION << '.' << MPI_SUBVERSION << endl; if (mpi_provided == MPI_THREAD_MULTIPLE) cout << "multithreaded MPI is supported" << endl; } #endif } netgen::h_argc = argc; netgen::h_argv = argv; // command line arguments: for (int i = 1; i < argc; i++) { if (argv[i][0] == '-') parameters.SetCommandLineFlag (argv[i]); else { if (strstr(argv[i], ".py")) parameters.SetFlag ("py", argv[i]); else parameters.SetFlag ("geofile", argv[i]); } } if (getenv ("NETGENDIR") && strlen (getenv ("NETGENDIR"))) ngdir = getenv ("NETGENDIR"); else ngdir = "."; verbose = parameters.GetDefineFlag ("V"); if (verbose) cout << "NETGENDIR = " << ngdir << endl; if ( netgen::id == 0 ) { if (parameters.StringFlagDefined ("testout")) netgen::testout = new ofstream (parameters.GetStringFlag ("testout", "test.out")); #ifdef SOCKETS Ng_ServerSocketManagerInit(static_cast(parameters.GetNumFlag("serversocket",-1))); if(parameters.GetNumFlag("serversocket",-1) > 0 && !parameters.GetDefineFlag("display")) nodisplay = true; #endif if(parameters.GetDefineFlag("batchmode")) nodisplay = true; if(parameters.GetDefineFlag("shellmode")) { nodisplay = true; shellmode = true; } Tcl_FindExecutable(NULL); // initialize application Tcl_Interp * myinterp = Tcl_CreateInterp (); if (Tcl_AppInit (myinterp) == TCL_ERROR) { cerr << "Exit Netgen due to initialization problem" << endl; exit (1); } // parse tcl-script int errcode; bool internaltcl = INTERNAL_TCL_DEFAULT; if (shellmode) internaltcl = false; if (verbose) { cout << "Tcl header version = " << TCL_PATCH_LEVEL << endl; Tcl_Eval (myinterp, "puts \"Tcl runtime version = [info patchlevel] \";"); } if (parameters.GetDefineFlag ("internaltcl")) internaltcl=true; if (parameters.GetDefineFlag ("externaltcl")) internaltcl=false; if (internaltcl) { if (verbose) cout << "using internal Tcl-script" << endl; // connect to one string extern const char * ngscript[]; const char ** hcp = ngscript; int len = 0; while (*hcp) len += strlen (*hcp++); char * tr1 = new char[len+1]; *tr1 = 0; hcp = ngscript; char * tt1 = tr1; while (*hcp) { strcat (tt1, *hcp); tt1 += strlen (*hcp++); } errcode = Tcl_Eval (myinterp, tr1); delete [] tr1; } else { string startfile = ngdir + "/ng.tcl"; if (verbose) cout << "Load Tcl-script from " << startfile << endl; errcode = Tcl_EvalFile (myinterp, (char*)startfile.c_str()); } if (errcode) { cout << "Error in Tcl-Script:" << endl; // cout << "result = " << myinterp->result << endl; cout << "result = " << Tcl_GetStringResult (myinterp) << endl; // cout << "in line " << myinterp->errorLine << endl; cout << "\nMake sure to set environment variable NETGENDIR to directory containing ng.tcl" << endl; exit (1); } // lookup user file formats and insert into format list: Array userformats; Array extensions; RegisterUserFormats (userformats, extensions); ostringstream fstr; tcl_const char * exportft = Tcl_GetVar (myinterp, "exportfiletype", 0); for (int i = 1; i <= userformats.Size(); i++) { fstr << ".ngmenu.file.filetype add radio -label \"" << userformats.Get(i) << "\" -variable exportfiletype\n"; fstr << "lappend meshexportformats { {" << userformats.Get(i) << "} {" << extensions.Get(i) << "} }\n"; } Tcl_Eval (myinterp, (char*)fstr.str().c_str()); Tcl_SetVar (myinterp, "exportfiletype", exportft, 0); #ifdef SOCKETS Ng_ServerSocketManagerRun(); #endif // start event-loop Tk_MainLoop(); Tcl_DeleteInterp (myinterp); Tcl_Exit(0); } #ifdef PARALLEL else { ParallelRun(); MPI_Finalize(); } #endif return 0; } /* extern "C" int Tix_Init (Tcl_Interp * interp); extern "C" int Itcl_Init (Tcl_Interp * interp); extern "C" int Itk_Init (Tcl_Interp * interp); */ extern "C" int Ng_Init (Tcl_Interp * interp); extern "C" int Ng_Vis_Init (Tcl_Interp * interp); // extern Tcl_PackageInitProc * Tk_SafeInit; /* * * Initialize packages * */ // extern "C" int NGSolve_Init (Tcl_Interp * interp); int Tcl_AppInit(Tcl_Interp * interp) { if (Tcl_Init(interp) == TCL_ERROR) { cerr << "Problem in Tcl_Init: " << endl; cout << "result = " << Tcl_GetStringResult (interp) << endl; // cerr << interp->result << endl; // return TCL_ERROR; } if (!nodisplay && Tk_Init(interp) == TCL_ERROR) { cerr << "Problem in Tk_Init: " << endl; cout << "result = " << Tcl_GetStringResult (interp) << endl; // cerr << interp->result << endl; // return TCL_ERROR; } #ifdef TRAFO // extern int Trafo_Init (Tcl_Interp * interp); // if (Trafo_Init(interp) == TCL_ERROR) // { // cerr << "Problem in Trafo_Init: " << endl; // cerr << interp->result << endl; // return TCL_ERROR; // } #endif #ifdef EBGELAST extern int EBGElast_Init (Tcl_Interp * interp); if(EBGElast_Init(interp) == TCL_ERROR) { cerr << "Problem in EBGElast_Init: " << endl; cerr << interp->result << endl; return TCL_ERROR; } #endif #ifdef SMALLTRAFO extern int SmallModels_Init (Tcl_Interp * interp); if(SmallModels_Init(interp) == TCL_ERROR) { cerr << "Problem in SmallModel_Init: " << endl; cerr << interp->result << endl; return TCL_ERROR; } #endif #ifdef SOCKETS extern int Ng_Socket_Init (Tcl_Interp * interp); if ( Ng_Socket_Init(interp) == TCL_ERROR) { cerr << "Problem in Ng_Socket_Init: " << endl; cerr << interp->result << endl; return TCL_ERROR; } #endif #ifdef ZUGSTANGE extern int Zugstange_Init (Tcl_Interp * interp); if (Zugstange_Init(interp) == TCL_ERROR) { cerr << "Problem in Zugstange_Init: " << endl; cerr << interp->result << endl; return TCL_ERROR; } #endif Tcl_StaticPackage(interp, "Tk", Tk_Init, 0); return TCL_OK; } netgen-6.2.1804/ng/ng_acis.hpp0000644000175000017500000001247213272137567014533 0ustar kurtkurt#include #ifdef ACIS_R17 extern void unlock_spatial_products_661(); #endif namespace netgen { ACISGeometry * acisgeometry = NULL; static VisualSceneACISGeometry vsacisgeom; extern int ACISGenerateMesh (ACISGeometry & geometry, Mesh*& mesh, int perfstepsstart, int perfstepsend, char* optstring); int Ng_ACISCommand (ClientData /* clientData */, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { if (argc >= 2) { if (strcmp (argv[1], "isACISavailable") == 0) { Tcl_SetResult (interp, (char*)"yes", TCL_STATIC); return TCL_OK; } } if (!acisgeometry) { Tcl_SetResult (interp, (char*)"This operation needs an ACIS geometry", TCL_STATIC); return TCL_ERROR; } if (argc >= 2 && strcmp (argv[1], "getentities") == 0) { stringstream str; const ENTITY_LIST & entlist = acisgeometry -> entlist; ENTITY_LIST cellList; api_ct_get_all_cells( entlist, cellList ); for(int j=0; jattrib(); int k = 0; while (ap) { ATTRIB_GEN_INTEGER * aip = dynamic_cast(ap); if (aip) str << "cell" << j << "/attrib" << k << " { name = " << aip->name() << " val = " << aip->value() << "} \n"; else str << "cell" << j << "/attrib" << k << " { typename = " << ap->type_name() << "} \n"; ap = ap->next(); k++; } } for (int i = 0; i < entlist.count(); i++) { str << "entity" << i << " {Entity " << i << "} \n"; ENTITY_LIST faceList; ENTITY_LIST edgeList; api_get_faces_from_all_entities(entlist[i], faceList); for(int j=0; jattrib(); int k = 0; while (ap) { ATTRIB_GEN_INTEGER * aip = dynamic_cast(ap); if (aip) str << "entity" << i << "/face" << j << "/attrib" << k << " { name = " << aip->name() << " val = " << aip->value() << "} \n"; else str << "entity" << i << "/face" << j << "/attrib" << k << " { typename = " << ap->type_name() << "} \n"; ap = ap->next(); k++; } SPAbox * box = face->bound(); str << "entity" << i << "/face" << j << "/bbox" << " { BBox (" << box->low().x() << ", " << box->low().y() << ", " << box->low().z() << ";" << box->high().x() << ", " << box->high().y() << ", " << box->high().z() << ")" << " }\n"; } api_get_edges_from_all_entities(entlist[i], edgeList); for(int j=0; j= 2 && strcmp (argv[1], "selectentity") == 0) { int ientry = -1, iface = -1; string select = argv[2]; cout << "ACIS selectentity: " << select << endl; int pos_ent1 = select.find("entity", 0); int pos_ent2 = select.find("/", pos_ent1); if (pos_ent1 != -1 && pos_ent2 == -1) pos_ent2 = select.length(); if (pos_ent1 != -1) ientry = atoi (select.substr(pos_ent1+6, pos_ent2).c_str()); int pos_face1 = select.find("face", 0); int pos_face2 = select.find("/", pos_face1); if (pos_face1 != -1 && pos_face2 == -1) pos_face2 = select.length(); if (pos_face1 != -1) iface = atoi (select.substr(pos_face1+4, pos_face2).c_str()); cout << "entry = " << ientry << ", face = " << iface << endl; const ENTITY_LIST & entlist = acisgeometry -> entlist; if (ientry != -1 && iface == -1) vsacisgeom.SelectEntity (entlist[ientry]); if (iface != -1) { ENTITY_LIST faceList; api_get_faces_from_all_entities(entlist[ientry], faceList); vsacisgeom.SelectEntity (faceList[iface]); } } if (argc >= 2 && strcmp (argv[1], "createct") == 0) { acisgeometry -> CreateCT(); } if (argc >= 2 && strcmp (argv[1], "combineall") == 0) { cout << "combineall " << endl; acisgeometry -> Combine(); } if (argc >= 4) { if (strcmp (argv[1], "subtract") == 0) { cout << "subtract " << argv[2] << " minus " << argv[3] << endl; acisgeometry -> Subtract (atoi (argv[2])-1, atoi (argv[3])-1); } } return TCL_OK; } } netgen-6.2.1804/ng/drawing.tcl0000644000175000017500000001236413272137567014556 0ustar kurtkurt# # Creates a drawing frame, and binds mouse events # set oldmousex 0 set oldmousey 0 # # if { 1 } { # use this one for Togl 2.0 #if {[catch {togl .ndraw -width 400 -height 300 -rgba true -double true -depth true -privatecmap false -stereo false -indirect false }] } { # if {[catch {togl .ndraw -width 400 -height 300 -rgba true -double true -depth true -privatecmap false -stereo false -indirect false -create init -display draw -reshape reshape }] } { # puts "no OpenGL" # } { set toglversion [Ng_GetToglVersion] puts "togl-version : $toglversion" set toglok 0 if { [Ng_GetToglVersion] == 2 } { # Togl 2.x if {[catch {togl .ndraw -width 400 -height 300 -rgba true -double true -depth true -privatecmap false -stereo false -indirect false -create init -display draw -reshape reshape }] } { puts "no OpenGL" } { # puts "have Togl 2.1" set toglok 1 } } { # Togl 1.7 if {[catch {togl .ndraw -width 400 -height 300 -rgba true -double true -depth true -privatecmap false -stereo false -indirect false }] } { puts "no OpenGL" } { # puts "have Togl 1.7" set toglok 1 } } if { $toglok == 1} { # pack .ndraw -expand true -fill both -padx 10 -pady 10 catch { tkdnd::drop_target register .ndraw DND_Files } # bind .ndraw { set oldmousex %x; set oldmousey %y; } bind .ndraw { set oldmousex %x; set oldmousey %y; } bind .ndraw { set oldmousex %x; set oldmousey %y; } bind .ndraw { Ng_MouseMove $oldmousex $oldmousey %x %y $drawmode .ndraw render set oldmousex %x; set oldmousey %y; } bind .ndraw { Ng_MouseDblClick %x %y .ndraw render if { [winfo exists .bcprop_dlg] } { bcpropdialog } if { [winfo exists .surfacemeshsize_dlg] } { surfacemeshsizedialog } if { [winfo exists .fieldlines_dlg] } { fieldlinesdialog } } bind .ndraw { Ng_MouseMove $oldmousex $oldmousey %x %y move .ndraw render set oldmousex %x; set oldmousey %y; } bind .ndraw { if { $tcl_platform(os) == "Darwin" } { Ng_MouseMove $oldmousex $oldmousey %x %y move } { Ng_MouseMove $oldmousex $oldmousey %x %y zoom } .ndraw render set oldmousex %x; set oldmousey %y; } } proc popupcheckredraw { vari { x 0 } } { upvar $vari varname if { $varname == 1 } { set varname 0 } { # puts "popup-redraw $vari" Ng_Vis_Set parameters redraw } } proc popupcheckredraw2 { vari boolvar { x 0 } } { upvar $vari varname if { $varname == 1 } { set varname 0 } { Ng_SetVisParameters Ng_Vis_Set parameters if { $boolvar == 1 } { redraw } Ng_SetVisParameters } } proc popupcheckredraw3 { vari { x 0 } } { upvar $vari varname if { $varname == 1 } { set varname 0 } { Ng_Vis_Set parameters } } proc redraw { {x 0} } { if {[winfo exists .ndraw]} { .ndraw render } } bind . { Ng_MouseMove 0 0 -10 0 rotate; redraw } bind . { Ng_MouseMove 0 0 10 0 rotate; redraw } bind . { Ng_MouseMove 0 0 0 -10 rotate; redraw } bind . { Ng_MouseMove 0 0 0 10 rotate; redraw } bind . { Ng_MouseMove 0 0 -10 0 move; redraw } bind . { Ng_MouseMove 0 0 10 0 move; redraw } bind . { Ng_MouseMove 0 0 0 -10 move; redraw } bind . { Ng_MouseMove 0 0 0 10 move; redraw } bind . { Ng_MouseMove 0 0 0 -10 zoom; redraw } bind . { Ng_MouseMove 0 0 0 10 zoom; redraw } bind . \ {event generate [focus -displayof %W] -delta 120} bind . \ {event generate [focus -displayof %W] -delta -120} bind . { Ng_MouseMove 0 0 0 [expr {%D/-5}] zoom; redraw } # Drop callbacks: bind .ndraw <> { #tk_messageBox -message "Dropped files: \"[join %D {, }]\"" set filename [join %D " "] #%W state !active set index [string last . $filename] #tk_messageBox -message $index set type [string range $filename $index+1 end] # tk_messageBox -message $type set ispde [string match -nocase $type "pde"] set isgeo [expr max([string match -nocase $type "geo"],[string match -nocase $type "in2d"])] set ismesh [expr max([string match -nocase $type "vol"],[string match -nocase $type "vol.gz"])] set ispy [string match -nocase $type "py"] if {$ispde == 1} { AddRecentNGSFile $filename; NGS_LoadPDE $filename; SetNumProcHelpMenu set selectvisual mesh; Ng_SetVisParameters } if {$ispy == 1} { AddRecentPYNGSFile $filename; NGS_LoadPy $filename; } if {$isgeo == 1} { AddRecentFile $filename; Ng_LoadGeometry $filename; Ng_ParseGeometry set selectvisual geometry Ng_SetVisParameters redraw wm title . [concat "$progname - " $filename] set dirname [file dirname $filename] set basefilename [file tail [file rootname $filename]] } if {$ismesh == 1} { AddRecentMeshFile $filename; Ng_LoadMesh $filename; set selectvisual mesh Ng_SetVisParameters redraw Ng_ReadStatus; wm title . [concat "$progname - " %D] set dirname [file dirname %D] set basefilename [file tail [file rootname %D]] } return %A } netgen-6.2.1804/ng/ngpkg.cpp0000644000175000017500000022721713272137567014236 0ustar kurtkurt/* The interface between the GUI and the netgen library */ #include #include #include #include #include #include #include #ifdef SOCKETS #include "../libsrc/sockets/sockets.hpp" #include "../libsrc/sockets/socketmanager.hpp" #endif // to be sure to include the 'right' togl-version #include "Togl2.1/togl.h" #include "fonts.hpp" extern bool nodisplay; #include #include "../libsrc/interface/writeuser.hpp" namespace netgen { DLL_HEADER extern MeshingParameters mparam; DLL_HEADER extern void ImportSolution2(const char * filename); #include "demoview.hpp" } #ifdef ACIS #include "ng_acis.hpp" #endif #ifdef JPEGLIB #include #endif #ifdef FFMPEG #include "encoding.hpp" #endif #ifdef NGSOLVE extern "C" void NGSolve_Exit(); #endif // extern void * ngsolve_handle; namespace netgen { extern Flags parameters; /* NetgenOutStream operator<< ( ostream & ost, Imp imp ) { return ( NetgenOutStream ( &ost, imp ) ); } NetgenOutStream operator<< ( ostream & ost, Proc proc ) { return ( NetgenOutStream ( &ost, proc ) ); } NetgenOutStream operator<< ( ostream & ost, Procs & procs ) { return ( NetgenOutStream ( &ost, procs ) ); } */ DLL_HEADER extern std::shared_ptr ng_geometry; DLL_HEADER extern std::shared_ptr mesh; Tcl_Interp * tcl_interp; #ifdef SOCKETS AutoPtr clientsocket; ServerSocketManager serversocketmanager; //Array< AutoPtr < ServerInfo > > servers; Array< ServerInfo* > servers; AutoPtr serversocketusernetgen; #endif // visualization scenes, pointer vs selects which one is drawn: static VisualScene vscross; DLL_HEADER extern VisualSceneSurfaceMeshing vssurfacemeshing; DLL_HEADER extern VisualSceneMeshDoctor vsmeshdoc; static VisualSceneSpecPoints vsspecpoints; VisualScene *vs = &vscross; extern char * err_needsmesh;// = (char*) "This operation needs a mesh"; extern char * err_jobrunning;// = (char*) "Meshing Job already running"; #ifndef SMALLLIB // // Destination for messages, errors, ... #ifndef WIN32 DLL_HEADER void Ng_PrintDest(const char * s) { /* #ifdef PARALLEL int id, ntasks; MPI_Comm_size(MPI_COMM_WORLD, &ntasks); MPI_Comm_rank(MPI_COMM_WORLD, &id); #else int id = 0; int ntasks = 1; #endif */ if (id == 0) (*mycout) << s << flush; /* if ( ntasks == 1 ) (*mycout) << s << flush; else (*mycout) << "p" << id << ": " << s << flush ; */ } #endif void MyError2(const char * ch) { cout << ch; (*testout) << "Error !!! " << ch << endl << flush; } #endif static clock_t starttimea; void ResetTime2 () { starttimea = clock(); } #ifndef SMALLLIB double GetTime2 () { return double(clock() - starttimea) / CLOCKS_PER_SEC; } #endif // file handling .. int Ng_New (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { if (strcmp (argv[1], "mesh") == 0) mesh.reset(); if (strcmp (argv[1], "geom") == 0) { /* delete ng_geometry; ng_geometry = new NetgenGeometry; */ ng_geometry = make_shared(); } return TCL_OK; } int Ng_ImportMesh (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]); int Ng_LoadMesh (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { string filename (argv[1]); if (filename.find(".vol") == string::npos) { return Ng_ImportMesh(clientData,interp,argc,argv); } PrintMessage (1, "load mesh from file ", filename); mesh = make_shared(); try { istream * infile; // if (filename.substr (filename.length()-3, 3) == ".gz") if (filename.find(".vol.gz") != string::npos) infile = new igzstream (filename.c_str()); else infile = new ifstream (filename.c_str()); // ifstream infile(filename.c_str()); mesh -> Load(*infile); // vsmesh.SetMesh (mesh); SetGlobalMesh (mesh); #ifdef PARALLEL MyMPI_SendCmd ("mesh"); mesh -> Distribute(); #endif for (int i = 0; i < geometryregister.Size(); i++) { NetgenGeometry * hgeom = geometryregister[i]->LoadFromMeshFile (*infile); if (hgeom) { ng_geometry = shared_ptr(hgeom); break; } } delete infile; /* string auxstring; if(infile.good()) { infile >> auxstring; if(auxstring == "csgsurfaces") { CSGeometry * geometry = new CSGeometry (""); geometry -> LoadSurfaces(infile); delete ng_geometry; ng_geometry = geometry; } } */ } catch (NgException e) { PrintMessage (3, e.What()); return TCL_ERROR; } PrintMessage (2, mesh->GetNP(), " Points, ", mesh->GetNE(), " Elements."); return TCL_OK; } int Ng_SaveMesh (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { if (!mesh) { Tcl_SetResult (interp, err_needsmesh, TCL_STATIC); return TCL_ERROR; } string filename (argv[1]); PrintMessage (1, "Save mesh to file ", filename, ".... Please Wait!"); ostream * outfile; if (filename.substr (filename.length()-3, 3) == ".gz") outfile = new ogzstream (filename.c_str()); else outfile = new ofstream (filename.c_str()); mesh -> Save (*outfile); // *outfile << endl << endl << "endmesh" << endl << endl; if (ng_geometry && !mesh->GetGeometry()) ng_geometry -> SaveToMeshFile (*outfile); delete outfile; PrintMessage (1, "Save mesh to file .... DONE!"); return TCL_OK; } int Ng_MergeMesh (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { string filename (argv[1]); PrintMessage (1, "merge with mesh from file ", filename); try { CSGeometry * geometry = dynamic_cast (ng_geometry.get()); //mesh -> Merge (filename); ifstream infile(filename.c_str()); const int offset = (geometry) ? geometry->GetNSurf() : 0; mesh -> Merge(infile,offset); string auxstring; if(infile.good()) { infile >> auxstring; if(geometry && auxstring == "csgsurfaces") geometry -> LoadSurfaces(infile); } } catch (NgException e) { PrintMessage (3, e.What()); return TCL_ERROR; } PrintMessage (2, mesh->GetNP(), " Points, ", mesh->GetNSE(), " Surface Elements."); return TCL_OK; } int Ng_ExportMesh (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { if (!mesh) { Tcl_SetResult (interp, err_needsmesh, TCL_STATIC); return TCL_ERROR; } string filename (argv[1]); string filetype (argv[2]); PrintMessage (1, "Export mesh to file ", filename, ".... Please Wait!"); // CSGeometry * geometry = dynamic_cast (ng_geometry); if (WriteUserFormat (filetype, *mesh, /* *ng_geometry, */ filename)) { ostringstream ost; ost << "Sorry, nothing known about file format " << filetype << endl; Tcl_SetResult (interp, (char*)ost.str().c_str(), TCL_VOLATILE); return TCL_ERROR; } PrintMessage (1, "Export mesh to file .... DONE!"); return TCL_OK; } int Ng_ImportMesh (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { const string filename (argv[1]); PrintMessage (1, "import mesh from ", filename); mesh = make_shared(); ReadFile (*mesh, filename); PrintMessage (2, mesh->GetNP(), " Points, ", mesh->GetNE(), " Elements."); mesh->SetGlobalH (mparam.maxh); mesh->CalcLocalH(mparam.grading); return TCL_OK; } int Ng_ImportSolution (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { if (!mesh) { Tcl_SetResult (interp, err_needsmesh, TCL_STATIC); return TCL_ERROR; } const char * filename = argv[1]; PrintMessage (1, "Import solution from file ", filename); ImportSolution2 (filename); return TCL_OK; } static DemoView * demoview = 0; int Ng_ShowDemo (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { const char * filename = argv[1]; PrintMessage (1, "Show demo ", filename); demoview = new DemoView (filename); return TCL_OK; } int Ng_DemoSetTime (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { cout << "demosettime, time = " << argv[1] << endl; int result = -1; static char strminusone[] = "-1"; static char str0[] = "0"; if (demoview) result = demoview->SetTime (atof (argv[1])); if (result == -1) Tcl_SetResult (interp, strminusone, TCL_STATIC); else Tcl_SetResult (interp, str0, TCL_STATIC); return TCL_OK; } int Ng_SaveSolution (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { if (!mesh) { Tcl_SetResult (interp, err_needsmesh, TCL_STATIC); return TCL_ERROR; } const char * filename = argv[1]; PrintMessage (1, "Save solution to file ", filename); netgen::GetVSSolution().SaveSolutionData (filename); return TCL_OK; } int Ng_SetNextTimeStamp (ClientData clientData, Tcl_Interp * interp, int argqc, tcl_const char *argv[]) { if (mesh) mesh -> SetNextTimeStamp(); return TCL_OK; } int Ng_LoadGeometry (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { if (multithread.running) { Tcl_SetResult (interp, err_jobrunning, TCL_STATIC); return TCL_ERROR; } tcl_const char * lgfilename = argv[1]; #ifdef LOG_STREAM (*logout) << "Load geometry file: " << lgfilename << endl; #endif #ifdef STAT_STREAM (*statout) << lgfilename << " & " << endl; #endif try { for (int i = 0; i < geometryregister.Size(); i++) { NetgenGeometry * hgeom = geometryregister[i]->Load (lgfilename); if (hgeom) { // delete ng_geometry; // ng_geometry = hgeom; ng_geometry = shared_ptr (hgeom); mesh.reset(); return TCL_OK; } } ifstream infile(lgfilename); if (strlen(lgfilename) < 4) { cout << "ERROR: cannot recognise file format!" << endl; } else { if ((strcmp (&lgfilename[strlen(lgfilename)-4], "iges") == 0) || (strcmp (&lgfilename[strlen(lgfilename)-3], "igs") == 0) || (strcmp (&lgfilename[strlen(lgfilename)-3], "IGS") == 0) || (strcmp (&lgfilename[strlen(lgfilename)-4], "IGES") == 0)) { Tcl_SetResult (interp, (char*)"IGES import requires the OpenCascade geometry kernel. " "Please install OpenCascade as described in the Netgen-website", TCL_STATIC); return TCL_ERROR; } else if (strcmp (&lgfilename[strlen(lgfilename)-3], "sat") == 0) { #ifdef ACIS PrintMessage (1, "Load ACIS geometry file ", lgfilename); acisgeometry = netgen::LoadACIS_SAT (lgfilename); #endif } else if ((strcmp (&lgfilename[strlen(lgfilename)-4], "step") == 0) || (strcmp (&lgfilename[strlen(lgfilename)-3], "stp") == 0) || (strcmp (&lgfilename[strlen(lgfilename)-3], "STP") == 0) || (strcmp (&lgfilename[strlen(lgfilename)-4], "STEP") == 0)) { #ifdef ACISxxx PrintMessage (1, "Load STEP geometry file ", lgfilename); acisgeometry = netgen::LoadACIS_STEP (lgfilename); #else Tcl_SetResult (interp, (char*)"IGES import requires the OpenCascade geometry kernel. " "Please install OpenCascade as described in the Netgen-website", TCL_STATIC); return TCL_ERROR; #endif } else if ((strcmp (&lgfilename[strlen(lgfilename)-4], "brep") == 0) || (strcmp (&lgfilename[strlen(lgfilename)-4], "Brep") == 0) || (strcmp (&lgfilename[strlen(lgfilename)-4], "BREP") == 0)) { Tcl_SetResult (interp, (char*)"BREP import requires the OpenCascade geometry kernel. " "Please install OpenCascade as described in the Netgen-website", TCL_STATIC); return TCL_ERROR; } } } catch (NgException e) { Tcl_SetResult (interp, const_cast (e.What().c_str()), TCL_VOLATILE); return TCL_ERROR; } mesh.reset(); return TCL_OK; } int Ng_SaveGeometry (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { if (argc == 2) { const char * cfilename = argv[1]; try { ng_geometry -> Save (string (cfilename)); } catch (NgException e) { Tcl_SetResult (interp, const_cast (e.What().c_str()), TCL_VOLATILE); return TCL_ERROR; } PrintMessage (1, "Save geometry to file ", cfilename); if (strlen(cfilename) < 4) {cout << "ERROR: can not recognise file format!!!" << endl;} else { #ifdef ACIS if (acisgeometry) { char * filename = const_cast (argv[1]); if (strcmp (&filename[strlen(filename)-3], "sat") == 0) { acisgeometry -> SaveSATFile (filename); } } #endif /* if (strcmp (&cfilename[strlen(cfilename)-3], "ngg") == 0) { CSGeometry * geometry = dynamic_cast (ng_geometry); if (geometry) { ofstream of(cfilename); geometry->Save (of); } } */ } } return TCL_OK; } int Ng_ReadStatus (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { char buf[20], lstring[200]; if (mesh) { sprintf (buf, "%d", mesh->GetNP()); Tcl_SetVar (interp, "::status_np", buf, 0); sprintf (buf, "%d", mesh->GetNE()); Tcl_SetVar (interp, "::status_ne", buf, 0); sprintf (buf, "%d", mesh->GetNSE()); Tcl_SetVar (interp, "::status_nse", buf, 0); } else { Tcl_SetVar (interp, "::status_np", "0", 0); Tcl_SetVar (interp, "::status_ne", "0", 0); Tcl_SetVar (interp, "::status_nse", "0", 0); } if (multithread.running) Tcl_SetVar (interp, "::status_working", "working", 0); else Tcl_SetVar (interp, "::status_working", " ", 0); Tcl_SetVar (interp, "::status_task", const_cast(multithread.task), 0); sprintf (buf, "%lf", multithread.percent); Tcl_SetVar (interp, "::status_percent", buf, 0); lstring[0] = 0; for (int i = 1; i <= tets_in_qualclass.Size(); i++) { sprintf (buf, " %d", tets_in_qualclass.Get(i)); strcat (lstring, buf); } for (int i = tets_in_qualclass.Size()+1; i <= 20; i++) strcat (lstring, " 0"); Tcl_SetVar (interp, "::status_tetqualclasses", lstring, 0); { lock_guard guard(tcl_todo_mutex); if (multithread.tcl_todo->length()) { Tcl_Eval (interp, multithread.tcl_todo->c_str()); *multithread.tcl_todo = ""; } } return TCL_OK; } int Ng_MemInfo (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) {/* if (argc < 2) return TCL_ERROR; if (strcmp (argv[1], "usedmb") == 0) { // returns string of 512 '0' or '1' static char usedmb[513]; for (int i = 0; i < 512; i++) usedmb[i] = (i % 7 == 0) ? '1' : '0'; usedmb[512] = 0; BaseDynamicMem::GetUsed (512, usedmb); Tcl_SetResult (interp, usedmb, TCL_STATIC); return TCL_OK; } */ return TCL_ERROR; } int Ng_BCProp (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { static char buf[100]; if (argc < 2) { Tcl_SetResult (interp, (char*)"Ng_BCProp needs arguments", TCL_STATIC); return TCL_ERROR; } if (strcmp (argv[1], "setbc") == 0) { int facenr = atoi (argv[2]); int bcnr = atoi (argv[3]); if (mesh && facenr >= 1 && facenr <= mesh->GetNFD()) mesh->GetFaceDescriptor (facenr).SetBCProperty (bcnr); } if (strcmp (argv[1], "setall") == 0) { int bcnr = atoi (argv[2]); if (mesh) { int nfd = mesh->GetNFD(); for (int i = 1; i <= nfd; i++) mesh->GetFaceDescriptor (i).SetBCProperty (bcnr); } } if (strcmp (argv[1], "getbc") == 0) { int facenr = atoi (argv[2]); if (mesh && facenr >= 1 && facenr <= mesh->GetNFD()) { sprintf (buf, "%d", mesh->GetFaceDescriptor(facenr).BCProperty()); } else { strcpy (buf, "0"); } Tcl_SetResult (interp, buf, TCL_STATIC); } if (strcmp (argv[1], "getbcname") == 0) { int facenr = atoi (argv[2]); if (mesh && facenr >= 1 && facenr <= mesh->GetNFD()) { sprintf (buf, "%s", mesh->GetFaceDescriptor(facenr).GetBCName().c_str()); } else { strcpy (buf, "-"); } Tcl_SetResult (interp, buf, TCL_STATIC); } if (strcmp (argv[1], "getactive") == 0) { sprintf (buf, "%d", vsmesh.SelectedFace()); Tcl_SetResult (interp, buf, TCL_STATIC); } if (strcmp (argv[1], "setactive") == 0) { int facenr = atoi (argv[2]); if (mesh && facenr >= 1 && facenr <= mesh->GetNFD()) { vsmesh.SetSelectedFace (facenr); } } if (strcmp (argv[1], "getnfd") == 0) { if (mesh) sprintf (buf, "%d", mesh->GetNFD()); else sprintf (buf, "0"); Tcl_SetResult (interp, buf, TCL_STATIC); } return TCL_OK; } int Ng_Refine (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { if (!mesh) { Tcl_SetResult (interp, err_needsmesh, TCL_STATIC); return TCL_ERROR; } if (multithread.running) { Tcl_SetResult (interp, err_jobrunning, TCL_STATIC); return TCL_ERROR; } #ifdef ACIS if (acisgeometry) { ACISRefinementSurfaces ref (*acisgeometry); ACISMeshOptimize2dSurfaces opt(*acisgeometry); ref.Set2dOptimizer(&opt); ref.Refine (*mesh); } else #endif { // ng_geometry -> GetRefinement().Refine(*mesh); mesh->GetGeometry()->GetRefinement().Refine(*mesh); } //redo second order refinement if desired if (mparam.secondorder) const_cast (mesh->GetGeometry()->GetRefinement()).MakeSecondOrder(*mesh); return TCL_OK; } int Ng_SecondOrder (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { if (!mesh) { Tcl_SetResult (interp, err_needsmesh, TCL_STATIC); return TCL_ERROR; } if (multithread.running) { Tcl_SetResult (interp, err_jobrunning, TCL_STATIC); return TCL_ERROR; } const_cast (mesh->GetGeometry()->GetRefinement()).MakeSecondOrder (*mesh); return TCL_OK; } void * HighOrderDummy (void *) { // mparam.elementorder = atoi (Tcl_GetVar (interp, "options.elementorder", 0)); const char * savetask = multithread.task; Refinement & ref = const_cast (mesh->GetGeometry()->GetRefinement()); mesh -> GetCurvedElements().BuildCurvedElements (&ref, mparam.elementorder); multithread.task = savetask; multithread.running = 0; multithread.terminate = 1; mesh -> SetNextMajorTimeStamp(); return 0; } int Ng_HighOrder (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { if (!mesh) { Tcl_SetResult (interp, err_needsmesh, TCL_STATIC); return TCL_ERROR; } if (multithread.running) { Tcl_SetResult (interp, err_jobrunning, TCL_STATIC); return TCL_ERROR; } multithread.running = 1; multithread.terminate = 0; mparam.elementorder = atoi(argv[1]); HighOrderDummy(NULL); return TCL_OK; } void * ValidateDummy (void *) { Refinement & ref = const_cast (mesh->GetGeometry()->GetRefinement()); ref.ValidateSecondOrder (*mesh); multithread.running = 0; return NULL; } int Ng_ValidateSecondOrder (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { if (!mesh) { Tcl_SetResult (interp, err_needsmesh, TCL_STATIC); return TCL_ERROR; } if (multithread.running) { Tcl_SetResult (interp, err_jobrunning, TCL_STATIC); return TCL_ERROR; } multithread.running = 1; RunParallel (ValidateDummy, NULL); return TCL_OK; } int Ng_ZRefinement (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { if (!mesh) { Tcl_SetResult (interp, err_needsmesh, TCL_STATIC); return TCL_ERROR; } if (multithread.running) { Tcl_SetResult (interp, err_jobrunning, TCL_STATIC); return TCL_ERROR; } ZRefinementOptions opt; opt.minref = 5; if (argc >= 2) opt.minref = atoi (argv[1]); ZRefinement (*mesh, ng_geometry.get(), opt); return TCL_OK; } int Ng_HPRefinement (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { if (!mesh) { Tcl_SetResult (interp, err_needsmesh, TCL_STATIC); return TCL_ERROR; } if (multithread.running) { Tcl_SetResult (interp, err_jobrunning, TCL_STATIC); return TCL_ERROR; } int levels = atoi (argv[1]); Refinement & ref = const_cast (mesh->GetGeometry()->GetRefinement()); HPRefinement (*mesh, &ref, levels); return TCL_OK; } int Ng_LoadMeshSize (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { if (!mesh) { Tcl_SetResult (interp, err_needsmesh, TCL_STATIC); return TCL_ERROR; } if (multithread.running) { Tcl_SetResult (interp, err_jobrunning, TCL_STATIC); return TCL_ERROR; } mesh->LoadLocalMeshSize(argv[1]); return TCL_OK; } int Ng_MeshSizeFromSurfaceMesh (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { if (!mesh) { Tcl_SetResult (interp, err_needsmesh, TCL_STATIC); return TCL_ERROR; } if (multithread.running) { Tcl_SetResult (interp, err_jobrunning, TCL_STATIC); return TCL_ERROR; } mesh->SetGlobalH (mparam.maxh); mesh->CalcLocalH(mparam.grading); return TCL_OK; } // Philippose Rajan - 13 June 2009 // Added a new TCL function call for the generation // of prismatic boundary layers int Ng_GenerateBoundaryLayer (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { if (!mesh) { Tcl_SetResult (interp, err_needsmesh, TCL_STATIC); return TCL_ERROR; } if(multithread.running) { Tcl_SetResult(interp, err_jobrunning, TCL_STATIC); return TCL_ERROR; } cout << "Generate Prismatic Boundary Layers (Experimental)...." << endl; // Use an array to support creation of boundary // layers for multiple surfaces in the future... Array surfid; int surfinp = 0; int prismlayers = 1; double hfirst = 0.01; double growthfactor = 1.0; while(surfinp >= 0) { cout << "Enter Surface ID (-1 to end list): "; cin >> surfinp; if(surfinp >= 0) surfid.Append(surfinp); } cout << "Number of surfaces entered = " << surfid.Size() << endl; cout << "Selected surfaces are:" << endl; for(int i = 1; i <= surfid.Size(); i++) cout << "Surface " << i << ": " << surfid.Elem(i) << endl; cout << endl << "Enter number of prism layers: "; cin >> prismlayers; if(prismlayers < 1) prismlayers = 1; cout << "Enter height of first layer: "; cin >> hfirst; if(hfirst <= 0.0) hfirst = 0.01; cout << "Enter layer growth / shrink factor: "; cin >> growthfactor; if(growthfactor <= 0.0) growthfactor = 0.5; BoundaryLayerParameters blp; blp.surfid = surfid; blp.prismlayers = prismlayers; blp.hfirst = blp.hfirst; blp.growthfactor = growthfactor; GenerateBoundaryLayer (*mesh, blp); return TCL_OK; } int Ng_InsertVirtualBL (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { if (!mesh) { Tcl_SetResult (interp, err_needsmesh, TCL_STATIC); return TCL_ERROR; } if (multithread.running) { Tcl_SetResult (interp, err_jobrunning, TCL_STATIC); return TCL_ERROR; } InsertVirtualBoundaryLayer (*mesh); return TCL_OK; } int Ng_CutOffAndCombine (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { Mesh othermesh; othermesh.Load (argv[1]); othermesh.SetGlobalH (mparam.maxh); othermesh.CalcLocalH(mparam.grading); CutOffAndCombine (*mesh, othermesh); return TCL_OK; } int Ng_HelmholtzMesh (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { HelmholtzMesh (*mesh); return TCL_OK; } int Ng_SetMeshingParameters (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { mparam.maxh = atof (Tcl_GetVar (interp, "::options.meshsize", 0)); mparam.minh = atof (Tcl_GetVar (interp, "::options.minmeshsize", 0)); mparam.meshsizefilename = Tcl_GetVar (interp, "::options.meshsizefilename", 0); // if (!strlen (mparam.meshsizefilename)) mparam.meshsizefilename = NULL; mparam.curvaturesafety = atof (Tcl_GetVar (interp, "::options.curvaturesafety", 0)); mparam.segmentsperedge = atof (Tcl_GetVar (interp, "::options.segmentsperedge", 0)); mparam.badellimit = atof (Tcl_GetVar (interp, "::options.badellimit", 0)); mparam.secondorder = atoi (Tcl_GetVar (interp, "::options.secondorder", 0)); mparam.elementorder = atoi (Tcl_GetVar (interp, "::options.elementorder", 0)); mparam.quad = atoi (Tcl_GetVar (interp, "::options.quad", 0)); mparam.try_hexes = atoi (Tcl_GetVar (interp, "::options.try_hexes", 0)); mparam.inverttets = atoi (Tcl_GetVar (interp, "::options.inverttets", 0)); mparam.inverttrigs = atoi (Tcl_GetVar (interp, "::options.inverttrigs", 0)); mparam.uselocalh = atoi (Tcl_GetVar (interp, "::options.localh", 0)); mparam.grading = atof (Tcl_GetVar (interp, "::options.grading", 0)); mparam.delaunay = atoi (Tcl_GetVar (interp, "::options.delaunay", 0)); mparam.checkoverlap = atoi (Tcl_GetVar (interp, "::options.checkoverlap", 0)); mparam.checkoverlappingboundary = atoi (Tcl_GetVar (interp, "::options.checkoverlappingboundary", 0)); mparam.checkchartboundary = atoi (Tcl_GetVar (interp, "::options.checkchartboundary", 0)); mparam.optsteps3d = atoi (Tcl_GetVar (interp, "::options.optsteps3d", 0)); mparam.optsteps2d = atoi (Tcl_GetVar (interp, "::options.optsteps2d", 0)); mparam.opterrpow = atof (Tcl_GetVar (interp, "::options.opterrpow", 0)); mparam.parthread = atoi (Tcl_GetVar (interp, "::options.parthread", 0)); mparam.elsizeweight = atof (Tcl_GetVar (interp, "::options.elsizeweight", 0)); mparam.autozrefine = atoi (Tcl_GetVar (interp, "::options.autozrefine", 0)); extern int printmessage_importance; extern int printdots; printmessage_importance = atoi (Tcl_GetVar (interp, "::options.printmsg", 0)); printdots = (printmessage_importance >= 4); //BaseMoveableMem::totalsize = 0; // 1048576 * atoi (Tcl_GetVar (interp, "::options.memory", 0)); if (mesh) { mesh->SetGlobalH (mparam.maxh); mesh->SetMinimalH (mparam.minh); } #ifdef PARALLEL MyMPI_SendCmd ("bcastparthread"); MyMPI_Bcast (mparam.parthread); #endif return TCL_OK; } int Ng_SetDebugParameters (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { debugparam.slowchecks = atoi (Tcl_GetVar (interp, "::debug.slowchecks", 0)); debugparam.debugoutput = atoi (Tcl_GetVar (interp, "::debug.debugoutput", 0)); debugparam.haltexistingline = atoi (Tcl_GetVar (interp, "::debug.haltexistingline", 0)); debugparam.haltoverlap = atoi (Tcl_GetVar (interp, "::debug.haltoverlap", 0)); debugparam.haltsuccess = atoi (Tcl_GetVar (interp, "::debug.haltsuccess", 0)); debugparam.haltnosuccess = atoi (Tcl_GetVar (interp, "::debug.haltnosuccess", 0)); debugparam.haltlargequalclass = atoi (Tcl_GetVar (interp, "::debug.haltlargequalclass", 0)); debugparam.haltsegment = atoi (Tcl_GetVar (interp, "::debug.haltsegment", 0)); debugparam.haltnode = atoi (Tcl_GetVar (interp, "::debug.haltnode", 0)); debugparam.haltface = atoi (Tcl_GetVar (interp, "::debug.haltface", 0)); debugparam.haltsegmentp1 = atoi (Tcl_GetVar (interp, "::debug.haltsegmentp1", 0)); debugparam.haltsegmentp2 = atoi (Tcl_GetVar (interp, "::debug.haltsegmentp2", 0)); debugparam.haltfacenr = atoi (Tcl_GetVar (interp, "::debug.haltfacenr", 0)); return TCL_OK; } int Ng_GetCommandLineParameter (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { if (argc != 2) { Tcl_SetResult (interp, (char*)"Ng_GetCommandLineParameter needs 1 parameter", TCL_STATIC); return TCL_ERROR; } static char buf[10]; if (parameters.StringFlagDefined (argv[1])) Tcl_SetResult (interp, (char*)parameters.GetStringFlag (argv[1], NULL), TCL_STATIC); else if (parameters.NumFlagDefined (argv[1])) { sprintf (buf, "%lf", parameters.GetNumFlag (argv[1], 0)); Tcl_SetResult (interp, buf, TCL_STATIC); } else if (parameters.GetDefineFlag (argv[1])) Tcl_SetResult (interp, (char*)"defined", TCL_STATIC); else Tcl_SetResult (interp, (char*)"undefined", TCL_STATIC); return TCL_OK; } static int perfstepsstart; static int perfstepsend; static char* optstring = NULL; static char* optstringcsg = NULL; void * MeshingDummy (void *) { const char * savetask = multithread.task; multithread.task = "Generate Mesh"; ResetTime(); try { #ifdef LOG_STREAM (*logout) << "Start meshing" << endl; (*logout) << "Meshing parameters:" << endl; mparam.Print (*logout); #endif #ifdef ACIS if (acisgeometry) { ACISGenerateMesh(*acisgeometry, mesh.Ptr(), perfstepsstart, perfstepsend, optstring); } else #endif if (ng_geometry) { mesh = make_shared (); // vsmesh.SetMesh (mesh); SetGlobalMesh (mesh); mesh -> SetGeometry(ng_geometry); mparam.perfstepsstart = perfstepsstart; mparam.perfstepsend = perfstepsend; int res = ng_geometry -> GenerateMesh (mesh, mparam); if (res != MESHING3_OK) { multithread.task = savetask; multithread.running = 0; return 0; } } else // no ng_geometry { multithread.task = savetask; multithread.running = 0; return 0; } if (mparam.autozrefine) { ZRefinementOptions opt; opt.minref = 5; ZRefinement (*mesh, ng_geometry.get(), opt); mesh -> SetNextMajorTimeStamp(); } if (mparam.secondorder) { const_cast (mesh->GetGeometry()->GetRefinement()).MakeSecondOrder (*mesh); mesh -> SetNextMajorTimeStamp(); } if (mparam.elementorder > 1) { mesh -> GetCurvedElements().BuildCurvedElements (&const_cast (mesh->GetGeometry()->GetRefinement()), mparam.elementorder); mesh -> SetNextMajorTimeStamp(); } PrintMessage (1, "Meshing done, time = ", GetTime(), " sec"); } catch (NgException e) { cout << e.What() << endl; } multithread.task = savetask; multithread.running = 0; #ifdef OCCGEOMETRYorig // currently not active OCCGeometry * occgeometry = dynamic_cast (ng_geometry); if (occgeometry && occgeometry->ErrorInSurfaceMeshing()) { char script[] = "rebuildoccdialog"; Tcl_GlobalEval (tcl_interp, script); } #endif return NULL; } int MeshingVal(tcl_const char* str) { if (strcmp(str, "ag") == 0) {return MESHCONST_ANALYSE;} if (strcmp(str, "me") == 0) {return MESHCONST_MESHEDGES;} if (strcmp(str, "ms") == 0) {return MESHCONST_MESHSURFACE;} if (strcmp(str, "os") == 0) {return MESHCONST_OPTSURFACE;} if (strcmp(str, "mv") == 0) {return MESHCONST_MESHVOLUME;} if (strcmp(str, "ov") == 0) {return MESHCONST_OPTVOLUME;} cout << "TCL TK ERROR, wrong meshing value, return='" << str << "'" << endl; return 0; } int Ng_GenerateMesh (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { if (multithread.running) { Tcl_SetResult (interp, err_jobrunning, TCL_STATIC); return TCL_ERROR; } multithread.running = 1; multithread.terminate = 0; extern void Render(bool blocking); mparam.render_function = &Render; for (int i = 0; i < geometryregister.Size(); i++) geometryregister[i] -> SetParameters (interp); Ng_SetMeshingParameters (clientData, interp, 0, argv); perfstepsstart = 1; perfstepsend = 6; if (optstringcsg) delete optstringcsg; optstringcsg = NULL; if (optstring) delete optstring; optstring = NULL; if (argc == 2) { perfstepsstart = 1; perfstepsend = MeshingVal(argv[1]); } else if (argc == 3) { perfstepsstart = MeshingVal(argv[1]); perfstepsend = MeshingVal(argv[2]); } else if (argc == 4) { perfstepsstart = MeshingVal(argv[1]); perfstepsend = MeshingVal(argv[2]); optstring = new char[strlen(argv[3])+1]; strcpy(optstring, argv[3]); optstringcsg = new char[strlen(argv[3])+1]; strcpy(optstringcsg, argv[3]); } RunParallel (MeshingDummy, NULL); return TCL_OK; } int Ng_StopMeshing (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { multithread.terminate = 1; return TCL_OK; } int Ng_MeshInfo (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { if (!mesh) { Tcl_SetResult (interp, err_needsmesh, TCL_STATIC); return TCL_ERROR; } ostringstream str; if (argc >= 2 && strcmp (argv[1], "dim") == 0) str << mesh->GetDimension(); else if (argc >= 2 && strcmp (argv[1], "np") == 0) str << mesh->GetNP(); else if (argc >= 2 && strcmp (argv[1], "ne") == 0) str << mesh->GetNE(); else if (argc >= 2 && strcmp (argv[1], "nse") == 0) str << mesh->GetNSE(); else if (argc >= 2 && strcmp (argv[1], "nseg") == 0) str << mesh->GetNSeg(); else if (argc >= 2 && strcmp (argv[1], "bbox") == 0) { Point3d pmin, pmax; mesh->GetBox (pmin, pmax); str << pmin.X() << " " << pmax.X() << " " << pmin.Y() << " " << pmax.Y() << " " << pmin.Z() << " " << pmax.Z() << endl; } else { cout << "argv[1] = " << argv[1] << endl; Tcl_SetResult (interp, (char*)"Ng_MeshInfo requires an argument out of \n dim np ne", TCL_STATIC); return TCL_ERROR; } Tcl_SetResult (interp, (char*)str.str().c_str(), TCL_VOLATILE); return TCL_OK; } int Ng_MeshQuality (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { if (!mesh) { Tcl_SetResult (interp, err_needsmesh, TCL_STATIC); return TCL_ERROR; } if (multithread.running) { Tcl_SetResult (interp, err_jobrunning, TCL_STATIC); return TCL_ERROR; } double angles[4]; char buf[10]; if (mesh) mesh->CalcMinMaxAngle(mparam.badellimit, angles); else { angles[0] = angles[1] = angles[2] = angles[3] = 0; } sprintf (buf, "%5.1lf", angles[0]); Tcl_SetVar (interp, argv[1], buf, 0); sprintf (buf, "%5.1lf", angles[1]); Tcl_SetVar (interp, argv[2], buf, 0); sprintf (buf, "%5.1lf", angles[2]); Tcl_SetVar (interp, argv[3], buf, 0); sprintf (buf, "%5.1lf", angles[3]); Tcl_SetVar (interp, argv[4], buf, 0); return TCL_OK; } int Ng_CheckSurfaceMesh (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { if (!mesh) { Tcl_SetResult (interp, err_needsmesh, TCL_STATIC); return TCL_ERROR; } if (multithread.running) { Tcl_SetResult (interp, err_jobrunning, TCL_STATIC); return TCL_ERROR; } mesh->FindOpenElements(); if (mesh->CheckConsistentBoundary()) { PrintMessage (1, "surface mesh not consistent, trying orientation"); mesh->SurfaceMeshOrientation(); } else { PrintMessage (1, "surface mesh consistent"); } mesh->CheckOverlappingBoundary(); return TCL_OK; } int Ng_CheckVolumeMesh (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { if (!mesh) { Tcl_SetResult (interp, err_needsmesh, TCL_STATIC); return TCL_ERROR; } if (multithread.running) { Tcl_SetResult (interp, err_jobrunning, TCL_STATIC); return TCL_ERROR; } mesh->CheckVolumeMesh(); return TCL_OK; } int Ng_DeleteVolMesh (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { if (mesh) mesh->ClearVolumeElements(); return TCL_OK; } int Ng_SplitSeparatedFaces (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { if (mesh) mesh->SplitSeparatedFaces (); return TCL_OK; } int Ng_RestrictH (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { if (!mesh) { Tcl_SetResult (interp, err_needsmesh, TCL_STATIC); return TCL_ERROR; } if (multithread.running) { Tcl_SetResult (interp, err_jobrunning, TCL_STATIC); return TCL_ERROR; } if (argc != 3) return TCL_OK; if (!mesh) return TCL_OK; double loch = atof (argv[2]); if (strcmp (argv[1], "face") == 0) { cout << "Restrict h at face to " << loch << endl; mesh -> RestrictLocalH (RESTRICTH_FACE, vsmesh.SelectedFace(), loch); } if (strcmp (argv[1], "edge") == 0) { cout << "Restrict h at edge to " << loch << endl; mesh -> RestrictLocalH (RESTRICTH_EDGE, vsmesh.SelectedEdge(), loch); } if (strcmp (argv[1], "point") == 0) { cout << "Restrict h at point to " << loch << endl; mesh -> RestrictLocalH (RESTRICTH_POINT, vsmesh.SelectedPoint(), loch); } return TCL_OK; } int Ng_Anisotropy (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { if (!mesh) { Tcl_SetResult (interp, err_needsmesh, TCL_STATIC); return TCL_ERROR; } if (multithread.running) { Tcl_SetResult (interp, err_jobrunning, TCL_STATIC); return TCL_ERROR; } if (argc != 2) return TCL_OK; if (!mesh) return TCL_OK; if (strcmp (argv[1], "edge") == 0) { int edgenr = vsmesh.SelectedEdge(); for (int i = 1; i <= mesh->GetNSeg(); i++) { Segment & seg = mesh->LineSegment(i); if (seg.edgenr == edgenr) { seg.singedge_left = 1 - seg.singedge_left; seg.singedge_right = 1 - seg.singedge_right; } } } return TCL_OK; } BisectionOptions biopt; void * BisectDummy (void *) { const Refinement & ref = mesh->GetGeometry()->GetRefinement(); MeshOptimize2d * opt = NULL; /* #ifdef ACIS if (acisgeometry) { // ref = new ACISRefinementSurfaces(*acisgeometry); opt = new ACISMeshOptimize2dSurfaces(*acisgeometry); ref->Set2dOptimizer(opt); } #endif else { ref = new RefinementSurfaces(*geometry); opt = new MeshOptimize2dSurfaces(*geometry); ref->Set2dOptimizer(opt); } */ if(!mesh->LocalHFunctionGenerated()) mesh->CalcLocalH(mparam.grading); mesh->LocalHFunction().SetGrading (mparam.grading); ref . Bisect (*mesh, biopt); mesh -> UpdateTopology(); mesh -> GetCurvedElements().BuildCurvedElements (&ref, mparam.elementorder); multithread.running = 0; delete opt; return NULL; } int Ng_Bisect (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { if (!mesh) { Tcl_SetResult (interp, err_needsmesh, TCL_STATIC); return TCL_ERROR; } if (multithread.running) { Tcl_SetResult (interp, err_jobrunning, TCL_STATIC); return TCL_ERROR; } if (multithread.running) { cout << "Thread alrad running" << endl; return TCL_OK; } multithread.running = 1; biopt.outfilename = NULL; // "ngfepp.vol"; biopt.femcode = "fepp"; biopt.refinementfilename = NULL; if (argc >= 2) biopt.refinementfilename = argv[1]; BisectDummy (0); /* extern void BisectTets (Mesh &, const CSGeometry *); BisectTets (*mesh, geometry); */ return TCL_OK; } // int Ng_BisectCopyMesh (ClientData clientData, // Tcl_Interp * interp, // int argc, tcl_const char *argv[]) // { // if (!mesh) // { // Tcl_SetResult (interp, err_needsmesh, TCL_STATIC); // return TCL_ERROR; // } // if (multithread.running) // { // Tcl_SetResult (interp, err_jobrunning, TCL_STATIC); // return TCL_ERROR; // } // BisectTetsCopyMesh (*mesh, geometry.Ptr(), biopt); // return TCL_OK; // } int Ng_Split2Tets (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { if (!mesh) { Tcl_SetResult (interp, err_needsmesh, TCL_STATIC); return TCL_ERROR; } if (multithread.running) { Tcl_SetResult (interp, err_jobrunning, TCL_STATIC); return TCL_ERROR; } mesh->Split2Tets (); return TCL_OK; } extern int Ng_MeshDoctor (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]); SYMBOLTABLE & GetVisualizationScenes () { static SYMBOLTABLE vss; return vss; } void AddVisualizationScene (const string & name, VisualScene * avs) { GetVisualizationScenes().Set (name.c_str(), avs); } void SetVisualScene (Tcl_Interp * interp) { const char * vismode = vispar.selectvisual; // Tcl_GetVar (interp, "selectvisual", 0); vs = &vscross; if (GetVisualizationScenes().Used(vismode)) { vs = GetVisualizationScenes().Get(vismode); } else if (vismode) { if (strcmp (vismode, "geometry") == 0) { for (int i = 0; i < geometryregister.Size(); i++) { VisualScene * hvs = geometryregister[i]->GetVisualScene (ng_geometry.get()); if (hvs) { vs = hvs; return; } } #ifdef ACIS else if (acisgeometry) vs = &vsacisgeom; #endif // ACIS } if (strcmp (vismode, "mesh") == 0) { if (!meshdoctor.active) vs = &vsmesh; else vs = &vsmeshdoc; } // if (strcmp (vismode, "surfmeshing") == 0) vs = &vssurfacemeshing; if (strcmp (vismode, "specpoints") == 0) vs = &vsspecpoints; if (strcmp (vismode, "solution") == 0) vs = &netgen::GetVSSolution(); } } Font * font = nullptr; Togl * togl = NULL; void MyOpenGLText_GUI (const char * text) { glListBase (font->getDisplayListsBase()); glCallLists (GLsizei(strlen(text)), GL_UNSIGNED_BYTE, text); } static int Ng_ToglVersion(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { Tcl_SetResult (interp, (char*)"2", TCL_STATIC); return TCL_OK; } static int init(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { // cout << "call init" << endl; if (Togl_GetToglFromObj(interp, objv[1], &togl) != TCL_OK) return TCL_ERROR; // possible values: 12,14,16,18,20,22,24,28,32 font = selectFont(18); LoadOpenGLFunctionPointers(); glMatrixMode(GL_PROJECTION); glLoadIdentity(); glMatrixMode(GL_MODELVIEW); SetVisualScene (Togl_Interp(togl)); vs->DrawScene(); Set_OpenGLText_Callback (&MyOpenGLText_GUI); return TCL_OK; } static int zap(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { return TCL_OK; } static int draw(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { SetVisualScene (interp); glPushMatrix(); glLoadIdentity(); vs->DrawScene(); Togl_SwapBuffers(togl); glPopMatrix(); return TCL_OK; } static int reshape(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) { int w = Togl_Width (togl); int h = Togl_Height (togl); // glViewport(0, 0, w, h); int res[4]; glGetIntegerv(GL_VIEWPORT, res); // cout << "w = " << w << " h = " << h << endl; w = res[2]; h = res[3]; /* cout << "viewport: " << res[0] << " " << res[1] << " " << res[2] << " " << res[3] << endl; */ // change font size according to window width font = selectFont(w/80); glMatrixMode(GL_PROJECTION); glLoadIdentity(); // OpenGL near and far clipping planes double pnear = 0.1; double pfar = 10; gluPerspective(20.0f, double(w) / h, pnear, pfar); glMatrixMode(GL_MODELVIEW); return TCL_OK; } static int Ng_SnapShot(ClientData clientData, Tcl_Interp *interp, int argc, Tcl_Obj *const *argv) { struct Togl *togl; if (Togl_GetToglFromObj(interp, argv[1], &togl) != TCL_OK) return TCL_ERROR; const char * filename = Tcl_GetString(argv[2]); int len = strlen(filename); int w = Togl_Width (togl); int h = Togl_Height (togl); Array buffer(w*h*3); glPixelStorei(GL_UNPACK_ALIGNMENT,1); glPixelStorei(GL_PACK_ALIGNMENT,1); glReadPixels (0, 0, w, h, GL_RGB, GL_UNSIGNED_BYTE, &buffer[0]); #ifdef JPEGLIB if (strcmp ("jpg", filename+len-3) == 0) { cout << "Snapshot to file '" << filename << "'" << endl; struct jpeg_compress_struct cinfo; struct jpeg_error_mgr jerr; FILE *outfile = fopen(filename,"wb"); JSAMPROW row_pointer[1]; int row_stride, quality = 100; // 1...100 cinfo.err = jpeg_std_error( &jerr ); jpeg_create_compress( &cinfo ); jpeg_stdio_dest( &cinfo, outfile ); cinfo.image_width = w; cinfo.image_height = h; cinfo.input_components = 3; cinfo.in_color_space = JCS_RGB; jpeg_set_defaults( &cinfo ); jpeg_set_quality( &cinfo, quality, FALSE ); // TRUE jpeg_start_compress( &cinfo, TRUE ); row_stride = 3*w; while( cinfo.next_scanline < cinfo.image_height ) { row_pointer[0] = &buffer[ (h-1-cinfo.next_scanline) * row_stride ]; (void)jpeg_write_scanlines( &cinfo, row_pointer, 1 ); } jpeg_finish_compress( &cinfo ); fclose( outfile ); jpeg_destroy_compress( &cinfo ); fprintf( stdout, "done [ok]\n" ); fflush( stdout ); return TCL_OK; } #endif // JPEGLIB { string command; string filename2; filename2 = filename; if(filename2.substr(len-3) != ".ppm") filename2 += ".ppm"; cout << "Snapshot to file '" << filename << endl; int w = Togl_Width (togl); int h = Togl_Height (togl); ofstream outfile(filename2); outfile << "P6" << endl << "# CREATOR: Netgen" << endl << w << " " << h << endl << "255" << endl; for (int i = 0; i < h; i++) for (int j = 0; j < w; j++) for (int k = 0; k < 3; k++) outfile.put (buffer[k+3*j+3*w*(h-i-1)]); outfile << flush; if (filename2 == string(filename)) return TCL_OK; else { // convert image file (Unix/Linux only): command = string("convert -quality 100 ") + filename2 + " " + filename; int err = system(command.c_str()); if (err != 0) { Tcl_SetResult (Togl_Interp(togl), (char*)"Cannot convert image file, stored as .ppm", TCL_VOLATILE); return TCL_ERROR; } command = string("rm ") + filename2; err = system(command.c_str()); if (err != 0) { Tcl_SetResult (Togl_Interp(togl), (char*)"Cannot delete temporary file", TCL_VOLATILE); return TCL_ERROR; } return TCL_OK; } } } #ifdef FFMPEG static int Ng_VideoClip(ClientData clientData, Tcl_Interp *interp, int argc, Tcl_Obj *const *argv) { static Mpeg mpeg; struct Togl *togl; if (Togl_GetToglFromObj(interp, argv[1], &togl) != TCL_OK) return TCL_ERROR; if (strcmp (Tcl_GetString(argv[2]), "init") == 0) { // Can't initialize when running: //------------------------------- if( mpeg.IsStarted() ) { cout << "cannot initialize: already running" << endl; return TCL_ERROR; } const char * filename = Tcl_GetString(argv[3]); mpeg.Start(filename); return TCL_OK; } else if (strcmp (Tcl_GetString(argv[2]), "addframe") == 0) { if(mpeg.AddFrame()) return TCL_ERROR; } else if (strcmp (Tcl_GetString(argv[2]), "finalize") == 0) { mpeg.Stop(); } return TCL_OK; } #else // FFMPEG static int Ng_VideoClip(ClientData clientData, Tcl_Interp *interp, int argc, Tcl_Obj *const *argv) { Tcl_SetResult (Togl_Interp(togl), (char*)"Video not available, Netgen was not compiled with FFMPEG library", TCL_STATIC); return TCL_ERROR; } #endif // FFMPEG int Ng_MouseMove (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { int oldx, oldy; int newx, newy; oldx = atoi (argv[1]); oldy = atoi (argv[2]); newx = atoi (argv[3]); newy = atoi (argv[4]); SetVisualScene(interp); vs->MouseMove (oldx, oldy, newx, newy, argv[5][0]); return TCL_OK; } int Ng_MouseDblClick (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { int px, py; px = atoi (argv[1]); py = atoi (argv[2]); SetVisualScene(interp); vs->MouseDblClick (px, py); return TCL_OK; } int Ng_ZoomAll (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { SetVisualScene(interp); vs->BuildScene (1); return TCL_OK; } int Ng_Center (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { SetVisualScene(interp); vs->BuildScene (2); return TCL_OK; } int Ng_StandardRotation (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { SetVisualScene(interp); vs->StandardRotation (argv[1]); return TCL_OK; } int Ng_ArbitraryRotation (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { SetVisualScene(interp); Array alpha; Array vec; for(int i=1; iArbitraryRotation (alpha,vec); return TCL_OK; } int Ng_Metis (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { #ifdef PARALLEL if (!mesh) { Tcl_SetResult (interp, err_needsmesh, TCL_STATIC); return TCL_ERROR; } int nparts = atoi (argv[1]); ntasks = nparts+1; cout << "calling metis ... " << flush; mesh->ParallelMetis(); cout << "done" << endl; ntasks = 1; for (ElementIndex ei = 0; ei < mesh->GetNE(); ei++) (*mesh)[ei].SetIndex ( (*mesh)[ei].GetPartition() ); return TCL_OK; #else Tcl_SetResult (interp, (char*)"metis not available", TCL_STATIC); return TCL_ERROR; #endif #ifdef OLDOLD // METIS Partitioning if (mesh->GetDimension() == 3) { using namespace metis; int ne = mesh->GetNE(); if (ne < 3) { Tcl_SetResult (interp, "This operation needs a volume mesh", TCL_STATIC); return TCL_ERROR; } int nn = mesh->GetNP(); ELEMENT_TYPE elementtype = mesh->VolumeElement(1).GetType(); int npe = mesh->VolumeElement(1).GetNP(); for (int i = 2; i<=ne; i++) if (mesh->VolumeElement(i).GetType() != elementtype) { Tcl_SetResult (interp, "Works in 3D only uniformal tet or hex meshes", TCL_STATIC); return TCL_ERROR; } idxtype *elmnts; elmnts = new idxtype[ne*npe]; int etype; if (elementtype == TET) etype = 2; else if (elementtype == HEX) etype = 3; else { Tcl_SetResult (interp, "Works in 3D only uniformal tet or hex meshes", TCL_STATIC); return TCL_ERROR; } for (int i=1; i<=ne; i++) for (int j=1; j<=npe; j++) elmnts[(i-1)*npe+(j-1)] = mesh->VolumeElement(i).PNum(j)-1; int numflag = 0; int nparts = atoi (argv[1]); int edgecut; idxtype *epart, *npart; epart = new idxtype[ne]; npart = new idxtype[nn]; cout << "Starting Metis (" << ne << " Elements, " << nn << " Nodes, " << nparts << " Partitions) ... " << flush; METIS_PartMeshNodal (&ne, &nn, elmnts, &etype, &numflag, &nparts, &edgecut, epart, npart); cout << "done" << endl; cout << "edge-cut: " << edgecut << ", balance: " << ComputeElementBalance(ne, nparts, epart) << endl; for (int i=1; i<=ne; i++) mesh->VolumeElement(i).SetPartition(epart[i-1]); mesh->SetNextTimeStamp(); } #endif return TCL_OK; } void SelectFaceInOCCDialogTree (int facenr) { char script[50]; sprintf (script, "selectentity {Face %i}", facenr); Tcl_GlobalEval (tcl_interp, script); } #ifndef ACIS int Ng_ACISCommand (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { if (argc >= 2) { if (strcmp (argv[1], "isACISavailable") == 0) { Tcl_SetResult (interp, (char*)"no", TCL_STATIC); return TCL_OK; } } Tcl_SetResult (interp, (char*)"undefined ACiS command", TCL_STATIC); return TCL_ERROR; } #endif // from ng_interface void Ng_SetVisualizationParameter (const char * name, const char * value) { // #ifdef OPENGL // #ifndef NOTCL char buf[100]; sprintf (buf, "visoptions.%s", name); if (printmessage_importance>0) { cout << "name = " << name << ", value = " << value << endl; cout << "set tcl-variable " << buf << " to " << value << endl; } Tcl_SetVar (tcl_interp, buf, const_cast (value), 0); Tcl_Eval (tcl_interp, "Ng_Vis_Set parameters;"); // #endif // #endif } } using namespace netgen; void Ng_SetMouseEventHandler (netgen::MouseEventHandler * handler) { vsmesh.SetMouseEventHandler (handler); } void Ng_SetUserVisualizationObject (netgen::UserVisualizationObject * vis) { netgen::GetVSSolution().AddUserVisualizationObject (vis); } namespace netgen { int firsttime = 1; int animcnt = 0; void PlayAnimFile(const char* name, int speed, int maxcnt) { //extern Mesh * mesh; /* if (mesh) mesh->DeleteMesh(); if (!mesh) mesh = new Mesh(); */ mesh = make_shared(); int ne, np, i; char str[80]; char str2[80]; //int tend = 5000; // for (ti = 1; ti <= tend; ti++) //{ int rti = (animcnt%(maxcnt-1)) + 1; animcnt+=speed; sprintf(str2,"%05i.sol",rti); strcpy(str,"mbssol/"); strcat(str,name); strcat(str,str2); if (printmessage_importance>0) cout << "read file '" << str << "'" << endl; ifstream infile(str); infile >> ne; for (i = 1; i <= ne; i++) { int j; Element2d tri(TRIG); tri.SetIndex(1); //faceind for (j = 1; j <= 3; j++) infile >> tri.PNum(j); infile >> np; for (i = 1; i <= np; i++) { Point3d p; infile >> p.X() >> p.Y() >> p.Z(); if (firsttime) mesh->AddPoint (p); else mesh->Point(i) = Point<3> (p); } //firsttime = 0; Ng_Redraw(); } } int Ng_SetVisParameters (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { if (!Tcl_GetVar (interp, "::viewoptions.light.amb", TCL_GLOBAL_ONLY)) return TCL_ERROR; vispar.lightamb = atof (Tcl_GetVar (interp, "::viewoptions.light.amb", TCL_GLOBAL_ONLY)); vispar.lightdiff = atof (Tcl_GetVar (interp, "::viewoptions.light.diff", TCL_GLOBAL_ONLY)); vispar.lightspec = atof (Tcl_GetVar (interp, "::viewoptions.light.spec", TCL_GLOBAL_ONLY)); vispar.shininess = atof (Tcl_GetVar (interp, "::viewoptions.mat.shininess", TCL_GLOBAL_ONLY)); vispar.locviewer = atoi (Tcl_GetVar (interp, "::viewoptions.light.locviewer", TCL_GLOBAL_ONLY)); vispar.transp = atof (Tcl_GetVar (interp, "::viewoptions.mat.transp", TCL_GLOBAL_ONLY)); VisualizationParameters::Clipping hclip; hclip.normal.X() = atof (Tcl_GetVar (interp, "::viewoptions.clipping.nx", TCL_GLOBAL_ONLY)); hclip.normal.Y() = atof (Tcl_GetVar (interp, "::viewoptions.clipping.ny", TCL_GLOBAL_ONLY)); hclip.normal.Z() = atof (Tcl_GetVar (interp, "::viewoptions.clipping.nz", TCL_GLOBAL_ONLY)); hclip.dist = atof (Tcl_GetVar (interp, "::viewoptions.clipping.dist", TCL_GLOBAL_ONLY)); hclip.dist2 = atof (Tcl_GetVar (interp, "::viewoptions.clipping.dist2", TCL_GLOBAL_ONLY)); hclip.enable = atoi (Tcl_GetVar (interp, "::viewoptions.clipping.enable", TCL_GLOBAL_ONLY)); vispar.clipdomain = atoi (Tcl_GetVar (interp, "::viewoptions.clipping.onlydomain", TCL_GLOBAL_ONLY)); vispar.donotclipdomain = atoi (Tcl_GetVar (interp, "::viewoptions.clipping.notdomain", TCL_GLOBAL_ONLY)); if ( ! (hclip == vispar.clipping) ) { vispar.clipping = hclip; vispar.clipping.timestamp = NextTimeStamp(); } vispar.whitebackground = atoi (Tcl_GetVar (interp, "::viewoptions.whitebackground", TCL_GLOBAL_ONLY)); vispar.drawcoordinatecross = atoi (Tcl_GetVar (interp, "::viewoptions.drawcoordinatecross", TCL_GLOBAL_ONLY)); vispar.drawcolorbar = atoi (Tcl_GetVar (interp, "::viewoptions.drawcolorbar", TCL_GLOBAL_ONLY)); vispar.drawnetgenlogo = atoi (Tcl_GetVar (interp, "::viewoptions.drawnetgenlogo", TCL_GLOBAL_ONLY)); vispar.stereo = atoi (Tcl_GetVar (interp, "::viewoptions.stereo", TCL_GLOBAL_ONLY)); vispar.colormeshsize = atoi (Tcl_GetVar (interp, "::viewoptions.colormeshsize", TCL_GLOBAL_ONLY)); VisualScene :: SetBackGroundColor (vispar.whitebackground ? 1 : 0); strcpy (vispar.selectvisual, Tcl_GetVar (interp, "::selectvisual", TCL_GLOBAL_ONLY)); // vispar.showstltrias = atoi (Tcl_GetVar (interp, "::viewoptions.stl.showtrias", TCL_GLOBAL_ONLY)); vispar.stlshowtrias = atoi (Tcl_GetVar (interp, "::stloptions.showtrias", TCL_GLOBAL_ONLY)); vispar.stlshowfilledtrias = atoi (Tcl_GetVar (interp, "::stloptions.showfilledtrias", TCL_GLOBAL_ONLY)); vispar.stlshowedges = atoi (Tcl_GetVar (interp, "::stloptions.showedges", TCL_GLOBAL_ONLY)); vispar.stlshowmarktrias = atoi (Tcl_GetVar (interp, "::stloptions.showmarktrias", TCL_GLOBAL_ONLY)); vispar.stlshowactivechart = atoi (Tcl_GetVar (interp, "::stloptions.showactivechart", TCL_GLOBAL_ONLY)); vispar.stlchartnumber = atoi (Tcl_GetVar (interp, "::stloptions.chartnumber", TCL_GLOBAL_ONLY)); vispar.stlchartnumberoffset = atoi (Tcl_GetVar (interp, "::stloptions.chartnumberoffset", TCL_GLOBAL_ONLY)); vispar.occshowsurfaces = atoi (Tcl_GetVar (interp, "::occoptions.showsurfaces", TCL_GLOBAL_ONLY)); vispar.occshowedges = atoi (Tcl_GetVar (interp, "::occoptions.showedges", TCL_GLOBAL_ONLY)); vispar.drawoutline = atoi (Tcl_GetVar (interp, "::viewoptions.drawoutline", TCL_GLOBAL_ONLY)); vispar.drawfilledtrigs = atoi (Tcl_GetVar (interp, "::viewoptions.drawfilledtrigs", TCL_GLOBAL_ONLY)); vispar.subdivisions = atoi (Tcl_GetVar (interp, "::visoptions.subdivisions", TCL_GLOBAL_ONLY)); vispar.drawbadels = atoi (Tcl_GetVar (interp, "::viewoptions.drawbadels", TCL_GLOBAL_ONLY)); vispar.drawedges = atoi (Tcl_GetVar (interp, "::viewoptions.drawedges", TCL_GLOBAL_ONLY)); vispar.drawtetsdomain = atoi (Tcl_GetVar (interp, "::viewoptions.drawtetsdomain", TCL_GLOBAL_ONLY)); vispar.drawtets = atoi (Tcl_GetVar (interp, "::viewoptions.drawtets", TCL_GLOBAL_ONLY)); vispar.drawprisms = atoi (Tcl_GetVar (interp, "::viewoptions.drawprisms", TCL_GLOBAL_ONLY)); vispar.drawpyramids = atoi (Tcl_GetVar (interp, "::viewoptions.drawpyramids", TCL_GLOBAL_ONLY)); vispar.drawhexes = atoi (Tcl_GetVar (interp, "::viewoptions.drawhexes", TCL_GLOBAL_ONLY)); /* vispar.shrink = atof (Tcl_GetVar (interp, "::viewoptions.shrink", TCL_GLOBAL_ONLY)); */ double hshrink = atof (Tcl_GetVar (interp, "::viewoptions.shrink", TCL_GLOBAL_ONLY)); if (hshrink != vispar.shrink) { vispar.shrink = hshrink; vispar.clipping.timestamp = NextTimeStamp();} vispar.drawidentified = atoi (Tcl_GetVar (interp, "::viewoptions.drawidentified", TCL_GLOBAL_ONLY)); vispar.drawpointnumbers = atoi (Tcl_GetVar (interp, "::viewoptions.drawpointnumbers", TCL_GLOBAL_ONLY)); vispar.drawedgenumbers = atoi (Tcl_GetVar (interp, "::viewoptions.drawedgenumbers", TCL_GLOBAL_ONLY)); vispar.drawfacenumbers = atoi (Tcl_GetVar (interp, "::viewoptions.drawfacenumbers", TCL_GLOBAL_ONLY)); vispar.drawelementnumbers = atoi (Tcl_GetVar (interp, "::viewoptions.drawelementnumbers", TCL_GLOBAL_ONLY)); vispar.drawdomainsurf = atoi (Tcl_GetVar (interp, "::viewoptions.drawdomainsurf", TCL_GLOBAL_ONLY)); vispar.drawededges = atoi (Tcl_GetVar (interp, "::viewoptions.drawededges", TCL_GLOBAL_ONLY)); vispar.drawedpoints = atoi (Tcl_GetVar (interp, "::viewoptions.drawedpoints", TCL_GLOBAL_ONLY)); vispar.drawedpointnrs = atoi (Tcl_GetVar (interp, "::viewoptions.drawedpointnrs", TCL_GLOBAL_ONLY)); vispar.drawedtangents = atoi (Tcl_GetVar (interp, "::viewoptions.drawedtangents", TCL_GLOBAL_ONLY)); vispar.drawededgenrs = atoi (Tcl_GetVar (interp, "::viewoptions.drawededgenrs", TCL_GLOBAL_ONLY)); vispar.drawcurveproj = atoi (Tcl_GetVar (interp, "::viewoptions.drawcurveproj", TCL_GLOBAL_ONLY)); vispar.drawcurveprojedge = atoi (Tcl_GetVar (interp, "::viewoptions.drawcurveprojedge", TCL_GLOBAL_ONLY)); vispar.centerpoint = atoi (Tcl_GetVar (interp, "::viewoptions.centerpoint", TCL_GLOBAL_ONLY)); vispar.use_center_coords = atoi (Tcl_GetVar (interp, "::viewoptions.usecentercoords", TCL_GLOBAL_ONLY)) > 0; vispar.centerx = atof (Tcl_GetVar (interp, "::viewoptions.centerx", TCL_GLOBAL_ONLY)); vispar.centery = atof (Tcl_GetVar (interp, "::viewoptions.centery", TCL_GLOBAL_ONLY)); vispar.centerz = atof (Tcl_GetVar (interp, "::viewoptions.centerz", TCL_GLOBAL_ONLY)); vispar.drawelement = atoi (Tcl_GetVar (interp, "::viewoptions.drawelement", TCL_GLOBAL_ONLY)); vispar.drawmetispartition = atoi (Tcl_GetVar (interp, "::viewoptions.drawmetispartition", TCL_GLOBAL_ONLY)); vispar.drawspecpoint = atoi (Tcl_GetVar (interp, "::viewoptions.drawspecpoint", TCL_GLOBAL_ONLY)); vispar.specpointx = atof (Tcl_GetVar (interp, "::viewoptions.specpointx", TCL_GLOBAL_ONLY)); vispar.specpointy = atof (Tcl_GetVar (interp, "::viewoptions.specpointy", TCL_GLOBAL_ONLY)); vispar.specpointz = atof (Tcl_GetVar (interp, "::viewoptions.specpointz", TCL_GLOBAL_ONLY)); vsspecpoints.len = atof (Tcl_GetVar (interp, "::viewoptions.specpointvlen", TCL_GLOBAL_ONLY)); vispar.occdeflection = pow(10.0,-1-atof (Tcl_GetVar (interp, "::occoptions.deflection", TCL_GLOBAL_ONLY))); #ifdef PARALLELGL vsmesh.Broadcast (); #endif return TCL_OK; } int Ng_BuildFieldLines (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { netgen::GetVSSolution().BuildFieldLinesPlot(); return TCL_OK; } int Ng_Exit (ClientData clientData, Tcl_Interp * interp, int argc, tcl_const char *argv[]) { /* #ifdef PARALLEL int id, rc, ntasks; MPI_Comm_size(MPI_COMM_WORLD, &ntasks); MPI_Comm_rank(MPI_COMM_WORLD, &id); if ( id != 0 ) return TCL_OK; #endif */ /* if (ngsolve_handle) { void (*ngs_exit)(); ngs_exit = ( void (*)() ) dlsym (ngsolve_handle, "NGSolve_Exit"); if (ngs_exit) (*ngs_exit)(); } */ #ifdef NGSOLVE NGSolve_Exit (); #endif #ifdef ACIS outcome res; res = api_terminate_faceter(); if(!res.ok()) cerr << "problem with terminating acis faceter" << endl; res = api_terminate_constructors(); if(!res.ok()) cerr << "problem with terminating acis constructors" << endl; res = api_terminate_kernel(); if(!res.ok()) cerr << "problem with terminating acis kernel" << endl; res = api_stop_modeller(); if(!res.ok()) cerr << "problem with terminating acis modeller" << endl; //cout << "stopped acis, outcome = " << res.ok() << endl; #endif #ifdef PARALLEL if (id == 0) MyMPI_SendCmd ("end"); MPI_Finalize(); #endif mesh.reset(); ng_geometry.reset(); if (testout != &cout) delete testout; return TCL_OK; } #ifdef SOCKETS void * ServerSocketManagerRunDummy ( void * nix ) { serversocketmanager.Run(); return NULL; } extern "C" int Ng_ServerSocketManagerRun( void ); int Ng_ServerSocketManagerRun( void ) { if(mparam.parthread) RunParallel(ServerSocketManagerRunDummy,NULL); else serversocketmanager.Run(); return TCL_OK; } extern "C" int Ng_ServerSocketManagerInit(int port); int Ng_ServerSocketManagerInit(int port) { serversocketmanager.Init(port); return TCL_OK; } #endif //SOCKETS extern "C" int Ng_Init (Tcl_Interp * interp); extern "C" int Ng_CSG_Init (Tcl_Interp * interp); extern "C" int Ng_stl_Init (Tcl_Interp * interp); extern "C" int Ng_geom2d_Init (Tcl_Interp * interp); #ifdef OCCGEOMETRY extern "C" int Ng_occ_Init (Tcl_Interp * interp); #endif // extern "C" int Ng_Geom2d_Init (Tcl_Interp * interp); // int main_Eero (ClientData clientData, // Tcl_Interp * interp, // int argc, tcl_const char *argv[]); int Ng_Init (Tcl_Interp * interp) { #ifdef SOCKETS if(serversocketmanager.Good()) serversocketusernetgen.Reset(new ServerSocketUserNetgen (serversocketmanager, mesh, geometry)); #endif Ng_CSG_Init(interp); Ng_stl_Init(interp); Ng_geom2d_Init (interp); #ifdef OCCGEOMETRY Ng_occ_Init (interp); #endif // Ng_Geom2d_Init(interp); tcl_interp = interp; // Tcl_CreateCommand (interp, "Ng_Eero", main_Eero, // (ClientData)NULL, // (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_New", Ng_New, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); // Tcl_CreateCommand (interp, "Ng_Lock", Ng_Lock, // (ClientData)NULL, // (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_LoadGeometry", Ng_LoadGeometry, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_SaveGeometry", Ng_SaveGeometry, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_LoadMesh", Ng_LoadMesh, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_SaveMesh", Ng_SaveMesh, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_MergeMesh", Ng_MergeMesh, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_ExportMesh", Ng_ExportMesh, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_ImportMesh", Ng_ImportMesh, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_ImportSolution", Ng_ImportSolution, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_ShowDemo", Ng_ShowDemo, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_DemoSetTime", Ng_DemoSetTime, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_SaveSolution", Ng_SaveSolution, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); // meshing Tcl_CreateCommand (interp, "Ng_GenerateMesh", Ng_GenerateMesh, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_StopMeshing", Ng_StopMeshing, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_MeshInfo", Ng_MeshInfo, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_MeshQuality", Ng_MeshQuality, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_CheckSurfaceMesh", Ng_CheckSurfaceMesh, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_CheckVolumeMesh", Ng_CheckVolumeMesh, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_DeleteVolMesh", Ng_DeleteVolMesh, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_SplitSeparatedFaces", Ng_SplitSeparatedFaces, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_SetNextTimeStamp", Ng_SetNextTimeStamp, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_Refine", Ng_Refine, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_SecondOrder", Ng_SecondOrder, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_HighOrder", Ng_HighOrder, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_ValidateSecondOrder", Ng_ValidateSecondOrder, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_RestrictH", Ng_RestrictH, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_Anisotropy", Ng_Anisotropy, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_Bisect", Ng_Bisect, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); // Tcl_CreateCommand (interp, "Ng_BisectCopyMesh", Ng_BisectCopyMesh, // (ClientData)NULL, // (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_Split2Tets", Ng_Split2Tets, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_ZRefinement", Ng_ZRefinement, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_HPRefinement", Ng_HPRefinement, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_LoadMeshSize", Ng_LoadMeshSize, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_MeshSizeFromSurfaceMesh", Ng_MeshSizeFromSurfaceMesh, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_GenerateBoundaryLayer", Ng_GenerateBoundaryLayer, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_InsertVirtualBL", Ng_InsertVirtualBL, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_CutOffAndCombine", Ng_CutOffAndCombine, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_HelmholtzMesh", Ng_HelmholtzMesh, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_ReadStatus", Ng_ReadStatus, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_MemInfo", Ng_MemInfo, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_MeshDoctor", Ng_MeshDoctor, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_BCProp", Ng_BCProp, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_ACISCommand", Ng_ACISCommand, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_MouseMove", Ng_MouseMove, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_MouseDblClick", Ng_MouseDblClick, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_ZoomAll", Ng_ZoomAll, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_Center", Ng_Center, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_StandardRotation", Ng_StandardRotation, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_ArbitraryRotation", Ng_ArbitraryRotation, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_SetVisParameters", Ng_SetVisParameters, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_SetMeshingParameters", Ng_SetMeshingParameters, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_SetDebugParameters", Ng_SetDebugParameters, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_GetCommandLineParameter", Ng_GetCommandLineParameter, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_Exit", Ng_Exit, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_Metis", Ng_Metis, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); Tcl_CreateCommand (interp, "Ng_BuildFieldLines", Ng_BuildFieldLines, (ClientData)NULL, (Tcl_CmdDeleteProc*) NULL); /* * Specify the C callback functions for widget creation, display, * and reshape. */ Tcl_CreateObjCommand(interp, "Ng_GetToglVersion", Ng_ToglVersion, NULL, NULL); if (!nodisplay) { if (Togl_Init(interp) == TCL_ERROR) return TCL_ERROR; Tcl_CreateObjCommand(interp, "init", init, NULL, NULL); Tcl_CreateObjCommand(interp, "zap", zap, NULL, NULL); Tcl_CreateObjCommand(interp, "draw", draw, NULL, NULL); Tcl_CreateObjCommand(interp, "reshape", reshape, NULL, NULL); // Togl_TimerFunc( idle ); Tcl_CreateObjCommand(interp, "Ng_SnapShot", Ng_SnapShot, NULL, NULL); Tcl_CreateObjCommand(interp, "Ng_VideoClip", Ng_VideoClip, NULL, NULL); } multithread.pause = 0; multithread.testmode = 0; multithread.redraw = 0; multithread.drawing = 1; multithread.terminate = 0; multithread.running = 0; multithread.task = ""; multithread.percent = 20; Tcl_LinkVar (interp, "multithread_pause", (char*)&multithread.pause, TCL_LINK_INT); Tcl_LinkVar (interp, "multithread_testmode", (char*)&multithread.testmode, TCL_LINK_INT); Tcl_LinkVar (interp, "multithread_redraw", (char*)&multithread.redraw, TCL_LINK_INT); Tcl_LinkVar (interp, "multithread_drawing", (char*)&multithread.drawing, TCL_LINK_INT); Tcl_LinkVar (interp, "multithread_terminate", (char*)&multithread.terminate, TCL_LINK_INT); Tcl_LinkVar (interp, "multithread_running", (char*)&multithread.running, TCL_LINK_INT); //testout->setstate(ios_base::badbit); myerr = &cerr; extern ostream * mycout; mycout = &cout; testmode = 0; #ifdef ACIS outcome res; res = api_start_modeller (0); if(!res.ok()) cerr << "problem with starting acis modeller" << endl; #ifdef ACIS_R17 unlock_spatial_products_661(); #endif res = api_initialize_kernel(); if(!res.ok()) cerr << "problem with starting acis kernel" << endl; res = api_initialize_constructors(); if(!res.ok()) cerr << "problem with starting acis constructors" << endl; res = api_initialize_faceter(); if(!res.ok()) cerr << "problem with starting acis faceter" << endl; #endif return TCL_OK; } } netgen-6.2.1804/ng/dialog.tcl0000644000175000017500000033523713272137567014371 0ustar kurtkurtproc meshingoptionsdialog { } { set w .options_dlg if {[winfo exists .options_dlg] == 1} { wm withdraw $w wm deiconify $w focus $w } { toplevel $w #wm resizable $w 0 0 # global options.meshsize pack [ttk::notebook $w.nb] -fill both -side top $w.nb add [ttk::frame $w.nb.general] -text "General" -underline 0 $w.nb add [ttk::frame $w.nb.meshsize] -text "Mesh Size" -underline 0 $w.nb add [ttk::frame $w.nb.chartopt] -text "STL Charts" -underline 0 $w.nb add [ttk::frame $w.nb.optimizer] -text "Optimizer" -underline 0 # $w.nb add [ttk::frame $w.nb.insider] -text "Insider" -underline 0 $w.nb add [ttk::frame $w.nb.debug] -text "Debug" -underline 0 # tixNoteBook $w.nbold -ipadx 6 -ipady 6 # $w.nbold add general -label "General" -underline 0 # $w.nbold add meshsize -label "Mesh Size" -underline 0 # $w.nbold add chartopt -label "STL Charts" -underline 0 # $w.nbold add optimizer -label "Optimizer" -underline 0 # $w.nbold add insider -label "Insider" -underline 0 # $w.nbold add debug -label "Debug" -underline 0 # pack $w.nb -expand yes -fill both -padx 5 -pady 5 -side top # ############################################################ # General meshing options # ############################################################ set f $w.nb.general ttk::frame $f.background pack $f.background -fill both set f $f.background ttk::labelframe $f.f2 -relief groove -borderwidth 3 -text "General meshing options" pack $f.f2 -pady 15 -fill x set f $f.f2 set finevals { 1 2 3 4 5 6 } set finelabs(1) "very coarse" set finelabs(2) "coarse" set finelabs(3) "moderate" set finelabs(4) "fine" set finelabs(5) "very fine" set finelabs(6) "user defined" #tixOptionMenu $f.fine -label "Mesh granularity : " \ -options { # label.width 19 # label.anchor e # menubutton.width 15 # } #foreach finev $finevals { # $f.fine add command $finev -label $finelabs($finev) #} #$f.fine config -variable meshoptions.fineness #$f.fine config -command { setgranularity } #global meshoptions.fineness #setgranularity ${meshoptions.fineness} #pack $f.fine global meshoptions.fineness ttk::label $f.fine2l -text "Mesh granularity: " ttk::menubutton $f.fine2c -menu $f.fine2m -text "coarse" -width 16 menu $f.fine2m -tearoff 0 foreach finev { 1 2 3 4 5 6 } { $f.fine2m add command -label $finelabs($finev) \ -command "set meshoptions.fineness $finev ; setgranularity $finev; $f.fine2c configure -text \"$finelabs($finev)\"" } $f.fine2m invoke $finelabs(${meshoptions.fineness}) grid $f.fine2l $f.fine2c -sticky nw set mgsteps { ag me ms os mv ov } set mgsteplabel(ag) "Analyze Geometry" set mgsteplabel(me) "Mesh Edges" set mgsteplabel(ms) "Mesh Surface" set mgsteplabel(os) "Optimize Surface" set mgsteplabel(mv) "Mesh Volume" set mgsteplabel(ov) "Optimize Volume" global meshoptions.firststep ttk::label $f.first2l -text "First Step: " # ttk::menubutton $f.first2.c -menu $f.first2.m -text "Analyze Geometry" -width 12 ttk::menubutton $f.first2c -menu $f.first2m -width 16 menu $f.first2m -tearoff 0 foreach i $mgsteps { $f.first2m add command -label $mgsteplabel($i) -command "set meshoptions.firststep $i ; $f.first2c configure -text \"$mgsteplabel($i)\"" } $f.first2m invoke $mgsteplabel(${meshoptions.firststep}) grid $f.first2l $f.first2c -sticky nw global meshoptions.laststep ttk::label $f.last2l -text "Last Step: " ttk::menubutton $f.last2c -menu $f.last2m -width 16 menu $f.last2m -tearoff 0 foreach i $mgsteps { $f.last2m add command -label $mgsteplabel($i) -command "set meshoptions.laststep $i ; $f.last2c configure -text \"$mgsteplabel($i)\"" } $f.last2m invoke $mgsteplabel(${meshoptions.laststep}) grid $f.last2l $f.last2c -sticky nw grid anchor $f center # tixOptionMenu $f.first -label "First Step : " \ # -options { # label.width 19 # label.anchor e # menubutton.width 15 # } # tixOptionMenu $f.last -label "Last Step : " \ # -options { # label.width 19 # label.anchor e # menubutton.width 15 # } # foreach step $mgsteps { # $f.first add command $step -label $mgsteplabel($step) # $f.last add command $step -label $mgsteplabel($step) # } # $f.first config -variable meshoptions.firststep # $f.last config -variable meshoptions.laststep # pack $f.first $f.last set msg(0) "None" set msg(1) "Least" set msg(2) "Little" set msg(3) "Moderate" set msg(4) "Much" set msg(5) "Most" #tixOptionMenu $f.msg -label "Print Messages : " \ -options { # label.width 19 # label.anchor e # menubutton.width 15 # } #foreach step {0 1 2 3 4 5 } { # $f.msg add command $step -label $msg($step) #} #$f.msg config -variable options.printmsg # pack $f.msg global options.printmsg #ttk::frame $f.msg2 ttk::label $f.msg2l -text "Print Messages: " menu $f.msg2m -tearoff 0 ttk::menubutton $f.msg2c -menu $f.msg2m -width 16 foreach step {0 1 2 3 4 5 } { $f.msg2m add command -label $msg($step) -command "set options.printmsg $step ; $f.msg2c configure -text $msg($step)" # if { ${options.printmsg} == $step } { $f.msg2.c configure -text $msg($step) } } $f.msg2m invoke ${options.printmsg} grid $f.msg2l $f.msg2c -sticky nw set f $w.nb.general ttk::labelframe $f.bts -borderwidth 3 -relief groove -text "Additional meshing options" pack $f.bts -fill x -pady 15 ttk::frame $f.bts.btnframe ttk::checkbutton $f.bts.btnframe.parthread -text "Parallel meshing thread" \ -variable options.parthread ttk::checkbutton $f.bts.btnframe.second -text "Second order elements" \ -variable options.secondorder ttk::checkbutton $f.bts.btnframe.quad -text "Quad dominated" \ -variable options.quad -command { if { ${options.quad} } { set meshoptions.laststep os } } ttk::checkbutton $f.bts.btnframe.invtets -text "Invert volume elements" \ -variable options.inverttets ttk::checkbutton $f.bts.btnframe.invtrigs -text "Invert surface elements" \ -variable options.inverttrigs ttk::checkbutton $f.bts.btnframe.azref -text "Automatic Z-refinement" \ -variable options.autozrefine pack $f.bts.btnframe -anchor center pack $f.bts.btnframe.parthread $f.bts.btnframe.second $f.bts.btnframe.quad $f.bts.btnframe.invtets $f.bts.btnframe.invtrigs $f.bts.btnframe.azref -anchor w # tixControl $f.elementorder -label "Element order: " -integer true \ # -variable options.elementorder -min 1 -max 20 \ # -options { # entry.width 2 # label.width 20 # label.anchor e # } # pack $f.elementorder #ttk::frame $f.bts.sbox #pack $f.bts.sbox -anchor w -pady 10 ttk::label $f.bts.btnframe.l -text "Element order" ttk::spinbox $f.bts.btnframe.elementorder2 -from 1 -to 20 -textvariable options.elementorder -width 2 pack $f.bts.btnframe.elementorder2 $f.bts.btnframe.l -anchor w -side left # ############################################################ # Mesh - Size options # ############################################################ set f $w.nb.meshsize ttk::frame $f.f2 pack $f.f2 -pady 10 # # ttk::style configure Tframe -background red # puts "********************" # puts "found these themes:" # puts [ttk::themes] # ttk::setTheme classic # ttk::setTheme aqua # puts "style Tframe foreground = " # puts [ttk::style lookup Tframe -foreground] # puts "f2 style:" # puts [$f.f2 cget -style] # puts [winfo class $f.f2] # puts "style element names gives:" # puts [ttk::style element names] set f $f.f2 ttk::frame $f.meshsize ttk::label $f.meshsize.l -text "max mesh-size" ttk::spinbox $f.meshsize.s -from 1e-9 -to 1e9 -textvariable options.meshsize -width 5 -validate focus -validatecommand "my_validatespinbox %W %P 10" \ -invalidcommand "my_invalidspinbox %W" pack $f.meshsize -fill x pack $f.meshsize.s $f.meshsize.l -side right ttk::frame $f.minmeshsize ttk::label $f.minmeshsize.l -text "min mesh-size" ttk::spinbox $f.minmeshsize.s -from 0 -to 1e9 -textvariable options.minmeshsize -width 5 -validate focus -validatecommand "my_validatespinbox %W %P 10" \ -invalidcommand "my_invalidspinbox %W" pack $f.minmeshsize -fill x pack $f.minmeshsize.s $f.minmeshsize.l -side right ttk::frame $f.grading ttk::label $f.grading.l -text "mesh-size grading" ttk::spinbox $f.grading.s -from 0.1 -to 1.0 -textvariable options.grading -width 5 -increment 0.1 -validate focus -validatecommand "my_validatespinbox %W %P 3" \ -invalidcommand "my_invalidspinbox %W" pack $f.grading -fill x pack $f.grading.s $f.grading.l -side right # tixControl $f.meshsize -label "max mesh-size: " -integer false \ # -variable options.meshsize -min 1e-9 -max 1e6 \ # -options { # entry.width 6 # label.width 25 # label.anchor e # } # tixControl $f.minmeshsize -label "min mesh-size: " -integer false \ # -variable options.minmeshsize -min 0 -max 1e6 \ # -options { # entry.width 6 # label.width 25 # label.anchor e # } # tixControl $f.grading -label "mesh-size grading: " -integer false \ # -variable options.grading -min 0.1 -max 1 -step 0.1 \ # -options { # entry.width 6 # label.width 25 # label.anchor e # } # pack $f.meshsize $f.minmeshsize $f.grading set f $w.nb.meshsize ttk::labelframe $f.msf -text "mesh-size file:" -relief groove -borderwidth 3 pack $f.msf # tixLabelEntry $f.msf.ent -label "mesh-size file: " \ # -labelside top \ # -options { # entry.textVariable options.meshsizefilename # entry.width 35 # label.width 25 # label.anchor w # } ttk::entry $f.msf.ent -textvariable options.meshsizefilename -width 30 ttk::button $f.msf.btn -text "Browse" -command { global options.meshsizefilename set types { {"Meshsize file" {.msz} } } set options.meshsizefilename [tk_getOpenFile -filetypes $types -initialfile ${options.meshsizefilename}] } pack $f.msf.ent -side left -expand yes -fill x -anchor s -padx 4 -pady 4 pack $f.msf.btn -side left -anchor s -padx 4 -pady 4 ttk::label $f.lab -text "Additional mesh size restrictions:" #csg-meshsize options ttk::labelframe $f.csg -relief groove -borderwidth 3 -text "CSG mesh-size" pack $f.csg -fill x proc test {a} {puts $a} #ttk::frame $f.csg.curv #pack $f.csg.curv -fill x -anchor center ttk::scale $f.csg.curvsc -orient horizontal -length 150 -from 0.2 -to 5 \ -variable options.curvaturesafety -takefocus 0 -command "roundscale $f.csg.curvsc 1" # -resolution 0.1 ttk::entry $f.csg.curve -textvariable options.curvaturesafety -width 3 \ -validatecommand "my_validate %W [$f.csg.curvsc cget -from] [$f.csg.curvsc cget -to] %P 1" \ -invalidcommand "my_invalid %W" -validate focus ttk::label $f.csg.curvla -text "Elements per curvature radius" grid $f.csg.curvsc $f.csg.curve $f.csg.curvla -sticky nw -padx 4 #ttk::frame $f.csg.elen #pack $f.csg.elen -fill x -anchor center ttk::scale $f.csg.elensc -orient horizontal -length 150 -from 0.2 -to 5 \ -variable options.segmentsperedge -takefocus 0 -command "roundscale $f.csg.elensc 1" # -resolution 0.1 ttk::entry $f.csg.elene -textvariable options.segmentsperedge -width 3 \ -validatecommand "my_validate %W [$f.csg.elensc cget -from] [$f.csg.elensc cget -to] %P 1" \ -invalidcommand "my_invalid %W" -validate focus ttk::label $f.csg.elenla -text "Elements per edge" grid $f.csg.elensc $f.csg.elene $f.csg.elenla -sticky nw -padx 4 grid anchor $f.csg center #stl-meshsize options ttk::labelframe $f.stl -relief groove -borderwidth 3 -text "STL mesh-size" pack $f.stl -fill x #ttk::frame $f.stl.r2 #pack $f.stl.r2 -fill x ttk::scale $f.stl.r2sc -orient horizontal -length 150 -from 0.2 -to 5 \ -variable stloptions.resthchartdistfac -takefocus 0 -command "roundscale $f.stl.r2sc 1" ttk::entry $f.stl.r2e -textvariable stloptions.resthchartdistfac -width 3 \ -validatecommand "my_validate %W [$f.stl.r2sc cget -from] [$f.stl.r2sc cget -to] %P 1" \ -invalidcommand "my_invalid %W" -validate focus ttk::checkbutton $f.stl.r2bu -text "STL - chart distance" \ -variable stloptions.resthchartdistenable grid $f.stl.r2sc $f.stl.r2e $f.stl.r2bu -sticky nw -padx 4 #ttk::frame $f.stl.r6 #pack $f.stl.r6 -anchor w ttk::scale $f.stl.r6sc -orient horizontal -length 150 -from 0.2 -to 5 \ -variable stloptions.resthlinelengthfac -takefocus 0 -command "roundscale $f.stl.r6sc 1" ttk::entry $f.stl.r6e -textvariable stloptions.resthlinelengthfac -width 3 \ -validatecommand "my_validate %W [$f.stl.r6sc cget -from] [$f.stl.r6sc cget -to] %P 1" \ -invalidcommand "my_invalid %W" -validate focus ttk::checkbutton $f.stl.r6bu -text "STL - line length" \ -variable stloptions.resthlinelengthenable grid $f.stl.r6sc $f.stl.r6e $f.stl.r6bu -sticky nw -padx 4 #ttk::frame $f.stl.r3 #pack $f.stl.r3 -anchor w ttk::scale $f.stl.r3sc -orient horizontal -length 150 -from 0.2 -to 8 \ -variable stloptions.resthcloseedgefac -takefocus 0 -command "roundscale $f.stl.r3sc 1" ttk::entry $f.stl.r3e -textvariable stloptions.resthcloseedgefac -width 3 \ -validatecommand "my_validate %W [$f.stl.r3sc cget -from] [$f.stl.r3sc cget -to] %P 1" \ -invalidcommand "my_invalid %W" -validate focus ttk::checkbutton $f.stl.r3bu -text "STL/IGES/STEP - close edges" \ -variable stloptions.resthcloseedgeenable grid $f.stl.r3sc $f.stl.r3e $f.stl.r3bu -sticky nw -padx 4 #ttk::frame $f.stl.r1 #pack $f.stl.r1 -anchor w ttk::scale $f.stl.r1sc -orient horizontal -length 150 -from 0.2 -to 5 \ -variable stloptions.resthsurfcurvfac -takefocus 0 -command "roundscale $f.stl.r1sc 1" ttk::entry $f.stl.r1e -textvariable stloptions.resthsurfcurvfac -width 3 \ -validatecommand "my_validate %W [$f.stl.r1sc cget -from] [$f.stl.r1sc cget -to] %P 1" \ -invalidcommand "my_invalid %W" -validate focus ttk::checkbutton $f.stl.r1bu -text "STL - surface curvature" \ -variable stloptions.resthsurfcurvenable grid $f.stl.r1sc $f.stl.r1e $f.stl.r1bu -sticky nw -padx 4 #ttk::frame $f.stl.r3b #pack $f.stl.r3b -anchor w ttk::scale $f.stl.r3bsc -orient horizontal -length 150 -from 0.2 -to 5 \ -variable stloptions.resthedgeanglefac -takefocus 0 -command "roundscale $f.stl.r3bsc 1" ttk::entry $f.stl.r3be -textvariable stloptions.resthedgeanglefac -width 3 \ -validatecommand "my_validate %W [$f.stl.r3bsc cget -from] [$f.stl.r3bsc cget -to] %P 1" \ -invalidcommand "my_invalid %W" -validate focus ttk::checkbutton $f.stl.r3bbu -text "STL - edge angle" \ -variable stloptions.resthedgeangleenable grid $f.stl.r3bsc $f.stl.r3be $f.stl.r3bbu -sticky nw -padx 4 #ttk::frame $f.stl.r5 #pack $f.stl.r5 -anchor w ttk::scale $f.stl.r5sc -orient horizontal -length 150 -from 0.2 -to 5 \ -variable stloptions.resthsurfmeshcurvfac -takefocus 0 -command "roundscale $f.stl.r5sc 1" ttk::entry $f.stl.r5e -textvariable stloptions.resthsurfmeshcurvfac -width 3 \ -validatecommand "my_validate %W [$f.stl.r5sc cget -from] [$f.stl.r5sc cget -to] %P 1" \ -invalidcommand "my_invalid %W" -validate focus ttk::checkbutton $f.stl.r5bu -text "STL - surface mesh curv" \ -variable stloptions.resthsurfmeshcurvenable grid $f.stl.r5sc $f.stl.r5e $f.stl.r5bu -sticky nw -padx 4 ttk::checkbutton $f.stl.recalch -text "STL - Recalc mesh size for surface optimization" \ -variable stloptions.recalchopt grid $f.stl.recalch -sticky n -columnspan 3 -column 0 ttk::button $f.stl.calch -text "Calc New H" -command { redraw; Ng_STLCalcLocalH } grid $f.stl.calch -columnspan 3 -column 0 grid anchor $f.stl center # set f [$w.nb subwidget chartopt] # round ttk::scale values to n_digits proc roundscale {w n_digits args} { set val [$w get] global [$w cget -variable] if {$n_digits == 0 } { set [$w cget -variable] [tcl::mathfunc::round $val] } else { set [$w cget -variable] [format "%.[append n_digits "f"]" $val] } } # validate ttk::entry which are linked to ttk::scales widgets global last_accepted_sc proc my_validate {w mini maxi val n_digits} { global last_accepted_sc [$w cget -textvariable] if {[string length $val] == 0} {return 0} if {[string is double $val] == 1} { if { $n_digits == 0 } { set val [tcl::mathfunc::max $mini [tcl::mathfunc::min $maxi [tcl::mathfunc::round $val]]] } else { if { $n_digits < 9 } { set val [tcl::mathfunc::max $mini [tcl::mathfunc::min $maxi [format "%.[append n_digits "f"]" $val]]] } } set last_accepted_sc $val set [$w cget -textvariable] $val return 1 } else { return 0 } } # if my_validate returns 0, this function gets called proc my_invalid {w} { global last_accepted_sc [$w cget -textvariable] set [$w cget -textvariable] $last_accepted_sc } set f $w.nb.chartopt ttk::labelframe $f.mainframe -text "STL angles" -relief groove -borderwidth 3 pack $f.mainframe -fill x -pady 15 set f $f.mainframe #ttk::frame $f.f1 ttk::label $f.labYangles -text "Yellow Edges Angle ()" ttk::scale $f.scale1 -orient horizontal -length 150 -from 0 -to 90 -variable stloptions.yangle -takefocus 0 -command "roundscale $f.scale1 1" ttk::entry $f.entry1 -textvariable stloptions.yangle -width 5 -validate focus -takefocus 0 -validatecommand "my_validate %W [$f.scale1 cget -from] [$f.scale1 cget -to] %P 1" \ -invalidcommand "my_invalid %W" #pack $f.f1 -anchor center grid $f.scale1 $f.entry1 $f.labYangles -sticky nw -padx 4 -pady 6 #ttk::frame $f.f21 ttk::label $f.labEangles -text "Edge Corner Angle ()" ttk::scale $f.scale2 -orient horizontal -length 150 -from 0 -to 180 -variable stloptions.edgecornerangle -takefocus 0 -command "roundscale $f.scale2 1" ttk::entry $f.entry2 -textvariable stloptions.edgecornerangle -width 5 -validate focus -takefocus 0 -validatecommand "my_validate %W [$f.scale2 cget -from] [$f.scale2 cget -to] %P 1" \ -invalidcommand "my_invalid %W" #pack $f.f21 -anchor center grid $f.scale2 $f.entry2 $f.labEangles -sticky nw -padx 4 -pady 6 #ttk::frame $f.f31 ttk::label $f.lab31 -text "Chart Angle ()" ttk::scale $f.scale3 -orient horizontal -length 150 -from 0 -to 180 -variable stloptions.chartangle -takefocus 0 -command "roundscale $f.scale3 1" ttk::entry $f.entry3 -textvariable stloptions.chartangle -width 5 -validate focus -takefocus 0 -validatecommand "my_validate %W [$f.scale3 cget -from] [$f.scale3 cget -to] %P 1" \ -invalidcommand "my_invalid %W" #pack $f.f31 -anchor center grid $f.scale3 $f.entry3 $f.lab31 -sticky nw -padx 4 -pady 6 #ttk::frame $f.f41 ttk::label $f.lab41 -text "Outer Chart Angle ()" ttk::scale $f.scale4 -orient horizontal -length 150 -from 0 -to 180 -variable stloptions.outerchartangle -takefocus 0 -command "roundscale $f.scale4 1" ttk::entry $f.entry4 -textvariable stloptions.outerchartangle -width 5 -validate focus -takefocus 0 -validatecommand "my_validate %W [$f.scale4 cget -from] [$f.scale4 cget -to] %P 1" \ -invalidcommand "my_invalid %W" #pack $f.f41 -anchor center grid $f.scale4 $f.entry4 $f.lab41 -sticky nw -padx 4 -pady 6 grid anchor $f center # Optimization options global last_accepted_sp # Used to validate the entries linked with a ttk::spinbox widget proc my_validatespinbox {w val n_digits} { global last_accepted_sp if {[string length $val] == 0} {return 0} if {[string is double $val] == 1} { if { $n_digits == 0 } { if { $n_digits < 9 } { set val [tcl::mathfunc::round $val] } else { set val [format "%.[append n_digits "f"]" $val] } } $w set [tcl::mathfunc::max [$w cget -from] [tcl::mathfunc::min [$w cget -to] $val]] set last_accepted_sp $val return 1 } else { return 0 } } proc my_invalidspinbox {w} { global last_accepted_sp $w set $last_accepted_sp } # set f [$w.nb subwidget optimizer] set f $w.nb.optimizer ttk::labelframe $f.optframe -text "Optimization settings" -relief groove -borderwidth 3 pack $f.optframe -fill x -pady 15 #ttk::frame $f.optframe.sos ttk::label $f.optframe.sosl -text "Surface opt steps" ttk::spinbox $f.optframe.soss -from 0 -to 99 -textvariable options.optsteps2d -width 5 -increment 1 -validate focus -validatecommand "my_validatespinbox %W %P 0" \ -invalidcommand "my_invalidspinbox %W" #pack $f.optframe.sos -anchor center grid $f.optframe.sosl $f.optframe.soss -sticky nw;# -side right -fill x -pady 2 #ttk::frame $f.optframe.vos ttk::label $f.optframe.vosl -text "Volume opt steps" ttk::spinbox $f.optframe.voss -from 0 -to 99 -textvariable options.optsteps3d -width 5 -increment 1 -validate focus -validatecommand "my_validatespinbox %W %P 0" \ -invalidcommand "my_invalidspinbox %W" #pack $f.optframe.vos -anchor center grid $f.optframe.vosl $f.optframe.voss -sticky nw;# -side right -fill x -pady 2 #ttk::frame $f.optframe.esw ttk::label $f.optframe.eswl -text "Element size weight" ttk::spinbox $f.optframe.esws -from 0 -to 1 -textvariable options.elsizeweight -width 5 -increment 0.1 -validate focus -validatecommand "my_validatespinbox %W %P 1" \ -invalidcommand "my_invalidspinbox %W" #pack $f.optframe.esw -anchor center grid $f.optframe.eswl $f.optframe.esws -sticky nw;# -side right -fill x -pady 2 #ttk::frame $f.optframe.wem ttk::label $f.optframe.weml -text "Worst element measure" ttk::spinbox $f.optframe.wems -from 1 -to 10 -textvariable options.opterrpow -width 5 -increment 1 -validate focus -validatecommand "my_validatespinbox %W %P 0" \ -invalidcommand "my_invalidspinbox %W" #pack $f.optframe.wem -anchor e grid $f.optframe.weml $f.optframe.wems -sticky nw;# -side right -fill x -pady 2 grid anchor $f.optframe center # These functions are needed due to a bug within the aqua theme # if a ttk::scale widget has a from value larger than 100. proc roundscale_helper_osx {w val} { global [$w cget -variable] options.badellimit set [$w cget -variable] [tcl::mathfunc::round $val] set options.badellimit [expr [tcl::mathfunc::round $val]+160] } proc my_validate_helper_osx {w val} { if {[string length $val] == 0} {return 0} if {[string is double $val] == 1} { set scale_loc [lindex [winfo children [winfo parent $w]] [lsearch [winfo children [winfo parent $w]] *scale]] global [$scale_loc cget -variable] options.badellimit set [$scale_loc cget -variable] [tcl::mathfunc::max [$scale_loc cget -from] [tcl::mathfunc::min [$scale_loc cget -to] [expr [tcl::mathfunc::round $val]-160]]] set options.badellimit [tcl::mathfunc::max [expr [$scale_loc cget -from]+160] [tcl::mathfunc::min [expr [$scale_loc cget -to]+160] [tcl::mathfunc::round $val]]] return 1 } else { return 0 } } proc my_invalid_helper_osx {w} { global options.badellimit set scale_loc [lindex [winfo children [winfo parent $w]] [lsearch [winfo children [winfo parent $w]] *scale]] global [$scale_loc cget -variable] set [$scale_loc cget -variable] [tcl::mathfunc::round [$scale_loc get]] set options.badellimit [expr [tcl::mathfunc::round [$scale_loc get]]+160] } global dummy_badellimit set dummy_badellimit 15 ttk::labelframe $f.optframe2 -text "Bad elements" -relief groove -borderwidth 3 pack $f.optframe2 -fill x -pady 15 -ipady 5 ttk::frame $f.optframe2.badellimit ttk::label $f.optframe2.lab -text "bad element criterion"; ttk::scale $f.optframe2.scale -orient horizontal -length 100 -from 00 -to 20 -variable dummy_badellimit -takefocus 0 -command "roundscale_helper_osx $f.optframe2.scale" ttk::entry $f.optframe2.entry -textvariable options.badellimit -width 3 -validate focusout -takefocus 0 -validatecommand "my_validate_helper_osx %W %P" \ -invalidcommand "my_invalid_helper_osx %W" #pack $f.optframe2.badellimit -anchor center grid $f.optframe2.scale $f.optframe2.entry $f.optframe2.lab -padx 4 -sticky nw grid anchor $f.optframe2 center # insider options # set f [$w.nb subwidget insider] set f $w.nb.debug ttk::labelframe $f.f2 -text "Advanced options" -borderwidth 3 -relief groove pack $f.f2 -fill x -pady 15 #ttk::frame $f.f2.frame #pack $f.f2.frame set f $f.f2 ttk::checkbutton $f.localh -text "Use Local Meshsize" \ -variable options.localh ttk::checkbutton $f.delauney -text "Use Delaunay" \ -variable options.delaunay ttk::checkbutton $f.checkoverlap -text "Check Overlapping" \ -variable options.checkoverlap ttk::checkbutton $f.checkcb -text "Check Chart Boundary" \ -variable options.checkchartboundary ttk::checkbutton $f.blockfill -text "Do Blockfilling" \ -variable options.blockfill grid $f.localh $f.delauney -sticky nw grid $f.checkoverlap $f.blockfill -sticky nw grid $f.checkcb -sticky nw grid anchor $f center # debugging options set f $w.nb.debug # enable / disable ttk::entry widgets linked to ttk::checkbuttons proc enable_cb {w1 w2 w3} { Ng_SetDebugParameters if {[string match *selected* [$w1 state]] == 1 } { $w2 configure -state normal $w3 configure -state normal } else { $w2 configure -state disabled $w3 configure -state disabled } } ttk::labelframe $f.cb1 -text "Debugging options" -borderwidth 3 -relief groove pack $f.cb1 -fill x -pady 15 #frame $f.cb1.cb0 #pack $f.cb1.cb0 -fill x ttk::checkbutton $f.cb1.slowchecks -text "Slow checks" \ -variable debug.slowchecks -command { Ng_SetDebugParameters } ttk::checkbutton $f.cb1.debugoutput -text "Debugging outout" \ -variable debug.debugoutput -command { Ng_SetDebugParameters } ttk::checkbutton $f.cb1.haltexline -text "Halt on existing line" \ -variable debug.haltexistingline -command { Ng_SetDebugParameters } ttk::checkbutton $f.cb1.haltoverlap -text "Halt on Overlap" \ -variable debug.haltoverlap -command { Ng_SetDebugParameters } ttk::checkbutton $f.cb1.haltsuc -text "Halt on success" \ -variable debug.haltsuccess -command { Ng_SetDebugParameters } ttk::checkbutton $f.cb1.haltnosuc -text "Halt on no success" \ -variable debug.haltnosuccess -command { Ng_SetDebugParameters } ttk::checkbutton $f.cb1.haltlargequal -text "Halt on large quality class" \ -variable debug.haltlargequalclass -command { Ng_SetDebugParameters } ttk::checkbutton $f.cb1.haltseg -text "Halt on Segment:" \ -variable debug.haltsegment -command "enable_cb %W $f.cb1.segs.ent1 $f.cb1.segs.ent2" ttk::checkbutton $f.cb1.haltnode -text "Halt on Node:" \ -variable debug.haltnode -command "enable_cb %W $f.cb1.segs.ent1 $f.cb1.segs.ent2" ttk::frame $f.cb1.fr ttk::checkbutton $f.cb1.fr.cb -text "Halt on Face:" \ -variable debug.haltface -command "enable_cb %W $f.cb1.fr.ent $f.cb1.fr.ent" ttk::entry $f.cb1.fr.ent -textvariable debug.haltfacenr -width 3 -state disabled pack $f.cb1.fr.cb $f.cb1.fr.ent -side left ttk::frame $f.cb1.segs ttk::label $f.cb1.segs.lab1 -text "P1:" ttk::entry $f.cb1.segs.ent1 -width 6 \ -textvariable debug.haltsegmentp1 -state disabled ttk::label $f.cb1.segs.lab2 -text "P2:" ttk::entry $f.cb1.segs.ent2 -width 6 \ -textvariable debug.haltsegmentp2 -state disabled pack $f.cb1.segs.lab1 $f.cb1.segs.ent1 $f.cb1.segs.lab2 $f.cb1.segs.ent2 -side left grid $f.cb1.slowchecks $f.cb1.debugoutput -sticky nw grid $f.cb1.haltexline $f.cb1.haltoverlap -sticky nw grid $f.cb1.haltsuc $f.cb1.haltnosuc -sticky nw grid $f.cb1.haltlargequal $f.cb1.fr -sticky nw grid $f.cb1.haltnode -sticky nw grid $f.cb1.haltseg -stick nw grid $f.cb1.segs -stick w -row 4 -rowspan 2 -column 1 grid rowconfigure $f.cb1 3 -pad 8 grid anchor $f.cb1 center ttk::checkbutton $f.cb1.showactivechart -text "Show Active Meshing-Chart" -variable stloptions.showactivechart -command { Ng_SetVisParameters; redraw } grid $f.cb1.showactivechart grid rowconfigure $f.cb1 3 -pad 8 grid rowconfigure $f.cb1 5 -pad 8 set f $w.nb.debug ttk::labelframe $f.cont -relief groove -borderwidth 3 -text "Debugging visualization" pack $f.cont -fill x -pady 15 #ttk::frame $f.cont.f #pack $f.cont.f ttk::checkbutton $f.cont.multidrawing -text "Draw Meshing" -variable multithread_drawing ttk::checkbutton $f.cont.multitestmode -text "Meshing Testmode" -variable multithread_testmode ttk::button $f.cont.goon -text "Go On" -command { set multithread_pause 0 } grid $f.cont.multidrawing -sticky nw grid $f.cont.multitestmode -sticky nw grid $f.cont.goon -row 0 -rowspan 2 -column 1 -sticky w grid columnconfigure $f.cont 0 -pad 30 grid columnconfigure $f.cont 1 -pad 20 grid anchor $f.cont center global userlevel if { $userlevel < 3} { $w.nb delete insider $w.nb delete debug } # tixButtonBox $w.bbox -orientation horizontal # $w.bbox add ok -text Apply -underline 0 -width 5 \ # -command { # [.options_dlg.nb subwidget meshsize].meshsize invoke # [.options_dlg.nb subwidget meshsize].grading invoke # [.options_dlg.nb subwidget optimizer].os2d invoke # [.options_dlg.nb subwidget optimizer].os3d invoke # [.options_dlg.nb subwidget optimizer].elw invoke # [.options_dlg.nb subwidget optimizer].wem invoke # Ng_SetMeshingParameters # } # $w.bbox add close -text Done -underline 0 -width 5 \ # -command { # [.options_dlg.nb subwidget meshsize].meshsize invoke # [.options_dlg.nb subwidget meshsize].grading invoke # [.options_dlg.nb subwidget optimizer].os2d invoke # [.options_dlg.nb subwidget optimizer].os3d invoke # [.options_dlg.nb subwidget optimizer].elw invoke # [.options_dlg.nb subwidget optimizer].wem invoke # Ng_SetMeshingParameters # destroy .options_dlg # } # pack $w.bbox -side bottom -fill x ttk::frame $w.bu pack $w.bu -fill x -ipady 3 ttk::button $w.bu.apl -text "Apply" -command { Ng_SetMeshingParameters Ng_SetDebugParameters } ttk::button $w.bu.ok -text "Done" -command { Ng_SetMeshingParameters Ng_SetDebugParameters wm withdraw .options_dlg # destroy .options_dlg } pack $w.bu.apl $w.bu.ok -side left -expand yes wm withdraw $w wm geom $w +100+100 wm deiconify $w wm title $w "Meshing Options" focus .options_dlg } } meshingoptionsdialog wm withdraw .options_dlg # # # Viewing dialog # # proc viewingoptionsdialog { } { global userlevel set w .viewopts_dlg if {[winfo exists .viewopts_dlg] == 1} { wm withdraw $w wm deiconify $w focus $w } { toplevel $w #wm resizable $w 0 0 pack [ttk::notebook $w.nb] -fill both -fill both -side top $w.nb add [ttk::frame $w.nb.general] -text "General" -underline 0 $w.nb add [ttk::frame $w.nb.stl] -text "STL" -underline 0 $w.nb add [ttk::frame $w.nb.occ] -text "IGES/STEP" -underline 0 $w.nb add [ttk::frame $w.nb.mesh] -text "Mesh" -underline 0 $w.nb add [ttk::frame $w.nb.light] -text "Light" -underline 0 $w.nb add [ttk::frame $w.nb.edges] -text "Edges" -underline 0 $w.nb add [ttk::frame $w.nb.misc] -text "Misc." -underline 3 # tixNoteBook $w.nb -ipadx 6 -ipady 6 # $w.nb add general -label "General" -underline 0 # $w.nb add stl -label "STL" -underline 0 # $w.nb add occ -label "IGES/STEP" -underline 0 # $w.nb add mesh -label "Mesh" -underline 0 # $w.nb add light -label "Light" -underline 0 # $w.nb add edges -label "Edges" -underline 0 # $w.nb add misc -label "Misc." -underline 3 # pack $w.nb -expand yes -fill both -padx 5 -pady 5 -side top # general set f $w.nb.general ttk::labelframe $f.gvop -text "General viewing options" -relief groove -borderwidth 3 pack $f.gvop -fill x -pady 15 set f $f.gvop ttk::checkbutton $f.backcol -text "White Background" \ -variable viewoptions.whitebackground \ -command { Ng_SetVisParameters; redraw } ttk::checkbutton $f.cross -text "Draw Coordinate Cross" \ -variable viewoptions.drawcoordinatecross \ -command { Ng_SetVisParameters; redraw } ttk::checkbutton $f.color -text "Draw Color-bar" \ -variable viewoptions.drawcolorbar \ -command { Ng_SetVisParameters; redraw } ttk::checkbutton $f.netgen -text "Draw Netgen-logo" \ -variable viewoptions.drawnetgenlogo \ -command { Ng_SetVisParameters; redraw } grid $f.backcol -sticky nw grid $f.cross -stick nw grid $f.color -sticky nw grid $f.netgen -sticky nw # checkbutton $f.stereo -text "Stereo View" \ # -variable viewoptions.stereo \ # -command { Ng_SetVisParameters; redraw } # pack $f.stereo menu $f.stylemenu ttk::menubutton $f.style -menu $f.stylemenu -width 10 -text [ttk::style theme use] grid $f.style -sticky nw grid anchor $f center foreach theme [ttk::themes] { $f.stylemenu add command -label $theme \ -command " $f.style configure -text $theme; puts $theme ; ttk::setTheme $theme" } # stl geometry set f $w.nb.stl ttk::labelframe $f.show -relief groove -borderwidth 3 -text "STL viewing options" pack $f.show -fill x -pady 15 ttk::checkbutton $f.show.showtrias -text "Show STL-Triangles" \ -variable stloptions.showtrias -command { Ng_SetVisParameters; redraw } #grid $f.show.showtrias -stick nw ttk::checkbutton $f.show.showfilledtrias -text "Show Filled Triangles" \ -variable stloptions.showfilledtrias -command { Ng_SetVisParameters; redraw } grid $f.show.showtrias $f.show.showfilledtrias -sticky nw ttk::checkbutton $f.show.showactivechart -text "Show Active Meshing-Chart" \ -variable stloptions.showactivechart -command { Ng_SetVisParameters; redraw } #grid $f.show.showactivechart -sticky nw ttk::checkbutton $f.show.showedges -text "Show Edges" \ -variable stloptions.showedges -command { Ng_SetVisParameters; redraw } grid $f.show.showactivechart $f.show.showedges -sticky nw grid anchor $f.show center #frame $f.special -relief groove -borderwidth 3 #pack $f.special ttk::checkbutton $f.show.showmarktrias -text "Show Chart Triangles" \ -variable stloptions.showmarktrias \ -command {set stldoctor.showfaces 0; Ng_STLDoctor; Ng_SetVisParameters; redraw } #pack $f.show.showmarktrias -side left ttk::checkbutton $f.show.showfaces -text "Show Faces" \ -variable stldoctor.showfaces \ -command {set stloptions.showmarktrias 0; Ng_STLDoctor; Ng_SetVisParameters; redraw} #pack $f.show.showfaces -side left grid $f.show.showmarktrias $f.show.showfaces -sticky nw ttk::labelframe $f.fn -relief groove -borderwidth 3 -text "Chart/Face number" pack $f.fn -fill x ttk::label $f.fn.lab3 -text "Chart/Face number" ttk::scale $f.fn.scale3 -orient horizontal -length 150 -from 0 -to 200 \ -variable stloptions.chartnumber -command "Ng_SetVisParameters; redraw;roundscale $f.fn.scale3 0" ttk::entry $f.fn.ent3 -textvariable stloptions.chartnumber -width 3 -validate focus -takefocus 0 \ -validatecommand "Ng_SetVisParameters; redraw;my_validate %W [$f.fn.scale3 cget -from] [$f.fn.scale3 cget -to] %P 0" \ -invalidcommand "my_invalid %W;Ng_SetVisParameters; redraw;" grid $f.fn.scale3 $f.fn.ent3 $f.fn.lab3 -sticky nw -padx 4 #frame $f.fo -relief groove -borderwidth 3 #pack $f.fo tk::label $f.fn.lab -text "Chart/Face Offset:"; ttk::entry $f.fn.ent -width 3 \ -textvariable stloptions.chartnumberoffset -validate focus -takefocus 0 \ -validatecommand "my_validate %W 0 1e9 %P 0" \ -invalidcommand "my_invalid %W" grid $f.fn.lab -sticky ne -padx 4 grid $f.fn.ent -sticky nw -padx 4 -row 1 -column 1 grid anchor $f.fn center ttk::labelframe $f.advstl -text "Advanced STL options" -relief groove -borderwidth 3 pack $f.advstl -fill x -pady 15 #frame $f.mt #pack $f.mt -fill x ttk::checkbutton $f.advstl.bu1 -text "Show Marked (Dirty) Triangles" \ -variable stldoctor.showmarkedtrigs \ -command {Ng_STLDoctor; redraw} #pack $f.mt.bu #frame $f.ep #pack $f.ep -fill x ttk::checkbutton $f.advstl.bu2 -text "show edge corner points" \ -variable stldoctor.showedgecornerpoints \ -command {Ng_STLDoctor; redraw} #pack $f.ep.bu #frame $f.stt #pack $f.stt -fill x ttk::checkbutton $f.advstl.bu3 -text "show touched triangle chart" \ -variable stldoctor.showtouchedtrigchart \ -command {set stldoctor.showfaces 0; set stloptions.showmarktrias 1; \ Ng_STLDoctor; Ng_SetVisParameters; redraw} #pack $f.stt.bu #frame $f.sml #pack $f.sml -fill x ttk::checkbutton $f.advstl.bu4 -text "draw meshed edges" \ -variable stldoctor.drawmeshededges \ -command {Ng_STLDoctor;} #pack $f.sml.bu #frame $f.sm #pack $f.sm -fill x ttk::checkbutton $f.advstl.bu5 -text "select with mouse" \ -variable stldoctor.selectwithmouse #pack $f.sm.bu grid $f.advstl.bu1 -stick nw grid $f.advstl.bu2 -sticky nw grid $f.advstl.bu3 -stick nw grid $f.advstl.bu4 -stick nw grid $f.advstl.bu5 -stick nw grid anchor $f.advstl center ttk::frame $f.advstl.tbn ttk::label $f.advstl.tbn.lab -text "Select triangle by number"; ttk::entry $f.advstl.tbn.ent -width 5 \ -textvariable stldoctor.selecttrig pack $f.advstl.tbn.lab $f.advstl.tbn.ent -padx 4 -side left grid $f.advstl.tbn -sticky nw grid anchor $f.advstl center grid rowconfigure $f.advstl 4 -pad 8 ttk::labelframe $f.vc -relief groove -borderwidth 3 -text "Vicinity options" pack $f.vc -fill x -pady 15 ttk::checkbutton $f.vc.bu -text "show vicinity" \ -variable stldoctor.showvicinity \ -command {Ng_STLDoctor vicinity; redraw} ttk::label $f.vc.lab -text "vicinity size"; ttk::scale $f.vc.scale -orient horizontal -length 150 -from 0 -to 200 \ -variable stldoctor.vicinity \ -takefocus 0 \ -command "roundscale $f.vc.scale 0; Ng_STLDoctor vicinity; redraw" #-command { Ng_STLDoctor vicinity; redraw } ttk::entry $f.vc.ent -width 4 -textvariable stldoctor.vicinity -validate focus \ -takefocus 0 -validatecommand "Ng_STLDoctor vicinity; redraw;my_validate %W [$f.vc.scale cget -from] [$f.vc.scale cget -to] %P 0" \ -invalidcommand "my_invalid %W;Ng_STLDoctor vicinity; redraw" #pack $f.vc.bu $f.vc.lab $f.vc.sc -expand yes grid $f.vc.bu -stick nw -columnspan 3 -column 0 grid $f.vc.scale $f.vc.ent $f.vc.lab -sticky nw -padx 4 grid anchor $f.vc center # IGES/STEP set f $w.nb.occ ttk::labelframe $f.occframe -text "IGES/STEP options" -relief groove -borderwidth 3 pack $f.occframe -fill x -pady 15 -ipady 8 #set f $f.occframe ttk::checkbutton $f.occframe.occshowsurfaces -text "Show surfaces " \ -variable occoptions.showsurfaces \ -command { Ng_SetOCCVisParameters; redraw } ttk::checkbutton $f.occframe.occshowedges -text "Show edges " \ -variable occoptions.showedges \ -command { Ng_SetOCCVisParameters; redraw } grid $f.occframe.occshowsurfaces $f.occframe.occshowedges -sticky nw -padx 4 grid anchor $f.occframe center #ttk::frame $f.deflection -relief groove -borderwidth 3 #pack $f.occframe.deflection -fill x ttk::button $f.occframe.btn -text "Rebuild visualization data" \ -command { Ng_SetOCCVisParameters Ng_OCCCommand buildvisualizationmesh redraw } #tixControl $f.occframe.ent -label "Visualization smoothness" -integer false \ -variable occoptions.deflection -min 0.1 -max 3 -step 0.1 \ -options { entry.width 3 } \ -command { Ng_SetOCCVisParameters } ttk::frame $f.occframe.vssm ttk::label $f.occframe.vssm.lab -text "Visulization smoothness" ttk::spinbox $f.occframe.vssm.sp -textvariable occoptions.deflection \ -from 0.1 -to 3 -increment 0.1 -width 4 -command { catch Ng_SetOCCVisParameters } \ -validate focus -validatecommand "my_validatespinbox %W %P 0" \ -invalidcommand "my_invalidspinbox %W" pack $f.occframe.vssm.lab $f.occframe.vssm.sp -side left -padx 4 grid $f.occframe.vssm -sticky nw -columnspan 2 -column 0 -pady 8 grid $f.occframe.btn -columnspan 2 -column 0 -sticky n #grid $f.occframe.ent $f.occframe.lab -sticky nw # ACIS visualization / construction ttk::labelframe $f.occframe1 -relief groove -borderwidth 3 -text "ACIS visulization / construction" pack $f.occframe1 -fill x -pady 15 -ipady 8 #ttk::frame $f.occframe1.shso ttk::label $f.occframe1.lab1 -text "Show solid (0 for all)" ttk::spinbox $f.occframe1.sp1 -textvariable occoptions.showsolidnr \ -from 0 -to 999 -increment 1 -width 4 -command { catch Ng_SetOCCVisParameters;redraw } \ -validate focus -validatecommand "my_validatespinbox %W %P 0" \ -invalidcommand "my_invalidspinbox %W" #pack $f.occframe1.shso.lab $f.occframe1.shso.sp -side left -padx 4 #ttk::frame $f.occframe1.shso2 ttk::label $f.occframe1.lab2 -text "Show solid 2" ttk::spinbox $f.occframe1.sp2 -textvariable occoptions.showsolidnr2 \ -from 0 -to 999 -increment 1 -width 4 -command { catch Ng_SetOCCVisParameters;redraw } \ -validate focus -validatecommand "my_validatespinbox %W %P 0" \ -invalidcommand "my_invalidspinbox %W" #pack $f.occframe1.shso2.lab $f.occframe1.shso2.sp -side left -padx 4 #tixControl $f.showsolid -label "Show solid (0 for all)" -integer true \ -variable occoptions.showsolidnr -min 0 -max 999 \ -options { entry.width 3 } \ -command { Ng_SetOCCVisParameters; redraw } #tixControl $f.showsolid2 -label "Show solid 2" -integer true \ -variable occoptions.showsolidnr2 -min 0 -max 999 \ -options { entry.width 3 } \ -command { Ng_SetOCCVisParameters; redraw } ttk::button $f.occframe1.subtract -text "Subtract (2 minus 1)" \ -command { Ng_ACISCommand subtract ${occoptions.showsolidnr} ${occoptions.showsolidnr2} redraw } ttk::button $f.occframe1.combine -text "Combine all" \ -command { Ng_ACISCommand combineall redraw } #pack $f.showsolid $f.showsolid2 $f.subtract $f.combine;# -sticky nw grid $f.occframe1.lab1 -row 0 -column 0 -sticky ne grid $f.occframe1.sp1 -row 0 -column 1 -sticky nw grid $f.occframe1.lab2 -row 1 -column 0 -sticky ne grid $f.occframe1.sp2 -row 1 -column 1 -sticky nw grid $f.occframe1.combine -columnspan 2 -column 0 -sticky n grid anchor $f.occframe1 center # mesh options set f $w.nb.mesh ttk::labelframe $f.center -relief groove -borderwidth 3 -text "how shall i name you?" pack $f.center -fill x -pady 15 ttk::button $f.center.lab1 -text "Set Center Point" \ -command { Ng_SetVisParameters; Ng_Center; redraw } ttk::entry $f.center.ent1 -width 5 \ -textvariable viewoptions.centerpoint -validate focus \ -validatecommand "my_validate %W 0 1e9 %P 0" \ -invalidcommand "my_invalid %W" grid $f.center.ent1 $f.center.lab1 -padx 4 -pady 4 -sticky nw #ttk::frame $f.drawel -relief groove -borderwidth 3 #pack $f.drawel -fill x ttk::button $f.center.lab2 -text "Draw Element" \ -command { Ng_SetVisParameters; Ng_ZoomAll; redraw } ttk::entry $f.center.ent2 -width 5 \ -textvariable viewoptions.drawelement -validate focus \ -validatecommand "my_validate %W 0 1e9 %P 0" \ -invalidcommand "my_invalid %W" grid $f.center.ent2 $f.center.lab2 -padx 4 -pady 4 -sticky nw grid anchor $f.center center ttk::labelframe $f.meshframe -text "Mesh visualization options" -relief groove -borderwidth 3 pack $f.meshframe -fill x -pady 15 set f $f.meshframe ttk::checkbutton $f.showcolor -text "Meshsize Visualization" \ -variable viewoptions.colormeshsize \ -command { Ng_SetVisParameters;redraw; } ttk::checkbutton $f.showfilledtrigs -text "Show filled triangles" \ -variable viewoptions.drawfilledtrigs \ -command { Ng_SetVisParameters; redraw } ttk::checkbutton $f.showedges -text "Show edges" \ -variable viewoptions.drawedges \ -command { Ng_SetVisParameters; redraw } ttk::checkbutton $f.showoutline -text "Show Triangle Outline" \ -variable viewoptions.drawoutline \ -command { Ng_SetVisParameters; redraw } ttk::checkbutton $f.showbadels -text "Show bad elements" \ -variable viewoptions.drawbadels \ -command { Ng_SetVisParameters; redraw } ttk::checkbutton $f.showprisms -text "Show prisms" \ -variable viewoptions.drawprisms \ -command { Ng_SetVisParameters; redraw } ttk::checkbutton $f.showpyramids -text "Show pyramids" \ -variable viewoptions.drawpyramids \ -command { Ng_SetVisParameters; redraw } ttk::checkbutton $f.showhexes -text "Show hexes" \ -variable viewoptions.drawhexes \ -command { Ng_SetVisParameters; redraw } ttk::checkbutton $f.showidentified -text "Show identified points" \ -variable viewoptions.drawidentified \ -command { Ng_SetVisParameters; redraw } ttk::checkbutton $f.showmetispartition -text "Show METIS Partition" \ -variable viewoptions.drawmetispartition \ -command { Ng_SetVisParameters; redraw } ttk::checkbutton $f.showpointnumbers -text "Show Point-numbers" \ -variable viewoptions.drawpointnumbers \ -command { Ng_SetVisParameters; redraw } ttk::checkbutton $f.showedgenumbers -text "Show Edge-numbers" \ -variable viewoptions.drawedgenumbers \ -command { Ng_SetVisParameters; redraw } ttk::checkbutton $f.showfacenumbers -text "Show Face-numbers" \ -variable viewoptions.drawfacenumbers \ -command { Ng_SetVisParameters; redraw } ttk::checkbutton $f.showelementnumbers -text "Show Element-numbers" \ -variable viewoptions.drawelementnumbers \ -command { Ng_SetVisParameters; redraw } # label $f.showdomainlab -text "Domain Surface" # scale $f.showdomain -orient horizontal -length 100 -from 0 -to 50 \ -resolution 1 -variable viewoptions.drawdomainsurf \ -command { Ng_SetVisParameters; redraw } \ -label "Domain Surface" #pack $f.showfilledtrigs #pack $f.showoutline $f.subdiv $f.showedges $f.showbadels ## pack $f.showdomainlab #pack $f.showdomain #pack $f.showpointnumbers #pack $f.showedgenumbers $f.showfacenumbers $f.showelementnumbers #pack $f.showmetispartition ttk::frame $f.frametets ttk::checkbutton $f.frametets.showtets -text "" \ -variable viewoptions.drawtets \ -command { Ng_SetVisParameters; redraw } ttk::label $f.frametets.label -text "\Show Tets\rin domain" ttk::spinbox $f.frametets.showtetsdomain -from 0 -to 500 -increment 1 -width 3 \ -textvariable viewoptions.drawtetsdomain -validate focus \ -command "Ng_SetVisParameters; redraw;" \ -validatecommand "my_validatespinbox %W %P 0" \ -invalidcommand "my_invalidspinbox %W" #ttk::frame $f.frametets ttk::label $f.frametets.label1 -text "Subdivision" ttk::spinbox $f.frametets.subdiv -from 0 -to 8 -increment 1 -width 3 \ -textvariable visoptions.subdivisions -validate focus \ -command { Ng_SetVisParameters; Ng_Vis_Set parameters; Ng_SetNextTimeStamp; redraw } \ -validatecommand "my_validatespinbox %W %P 0" \ -invalidcommand "my_invalidspinbox %W" ttk::label $f.frametets.label2 -text "Show surface\rof domain" ttk::spinbox $f.frametets.showdomain -from 0 -to 50 -increment 1 -width 3 \ -textvariable viewoptions.drawdomainsurf -validate focus \ -command { Ng_SetVisParameters; Ng_Vis_Set parameters; redraw } \ -validatecommand "my_validatespinbox %W %P 0" \ -invalidcommand "my_invalidspinbox %W" #tixControl $f.showdomain -label "Show surface\rof domain" -integer true \ -variable viewoptions.drawdomainsurf -min 0 -max 50 \ -options { entry.width 2 } \ -command { Ng_SetVisParameters; Ng_Vis_Set parameters; redraw } #tixControl $f.subdiv -label "Subdivision" -integer true \ # -variable visoptions.subdivisions -min 0 -max 8 \ -options { entry.width 2 } \ -command { Ng_SetVisParameters; Ng_Vis_Set parameters; Ng_SetNextTimeStamp; redraw } #tixControl $f.frametets.showtetsdomain -label "" -integer true \ -variable viewoptions.drawtetsdomain -min 0 -max 500 \ -options { entry.width 2 } \ -command { Ng_SetVisParameters; redraw } #pack $f.frametets grid $f.frametets.showtets $f.frametets.label $f.frametets.showtetsdomain -sticky w grid x $f.frametets.label2 $f.frametets.showdomain -stick w grid x $f.frametets.label1 $f.frametets.subdiv -sticky w grid $f.showfilledtrigs $f.showoutline -sticky nw grid $f.showedges $f.showbadels -sticky nw grid $f.showpointnumbers $f.showedgenumbers -sticky nw grid $f.showfacenumbers $f.showelementnumbers -sticky nw grid $f.showmetispartition $f.showidentified -sticky nw grid $f.showcolor $f.showpyramids -sticky nw grid $f.showprisms $f.showhexes -sticky nw grid $f.frametets -sticky n -columnspan 2 -column 0 -pady 8 #grid $f.showdomain -stick ne;# -columnspan 3 -column 0 -pady 6 #grid $f.framesubdiv -sticky nw;# -columnspan 3 -column 0 -pady 6 grid anchor $f center set f $w.nb.mesh ttk::labelframe $f.fshrink -text "Element visualization" -relief groove -borderwidth 3 ttk::label $f.fshrink.lab -text "Shrink elements" #scale $f.fshrink.scale -orient horizontal -length 200 -from 0 -to 1.0001 \ -resolution 0.01 -tickinterval 0.25 \ -command { Ng_SetVisParameters; after idle redraw } \ -variable viewoptions.shrink ttk::scale $f.fshrink.scale -orient horizontal -length 200 -from 0 -to 1.0001 \ -command "roundscale $f.fshrink.scale 2;Ng_SetVisParameters; after idle redraw" \ -variable viewoptions.shrink ttk::entry $f.fshrink.entry -textvariable viewoptions.shrink -width 4 -validate focus \ -takefocus 0 -validatecommand "Ng_SetVisParameters; after idle redraw;my_validate %W [$f.fshrink.scale cget -from] [$f.fshrink.scale cget -to] %P 2" \ -invalidcommand "my_invalid %W;Ng_SetVisParameters; after idle redraw;" pack $f.fshrink -fill x -ipady 8 grid $f.fshrink.scale $f.fshrink.entry $f.fshrink.lab -padx 4 grid anchor $f.fshrink center # if {$userlevel == 3} { # frame $f.framecurveproj # checkbutton $f.framecurveproj.showcurveproj -text "Show curved edge projection " \ -variable viewoptions.drawcurveproj \ -command { Ng_SetVisParameters; redraw } # tixControl $f.framecurveproj.showcurveprojedge -label "" -integer true \ -variable viewoptions.drawcurveprojedge -min 1 -max 99999 \ -options { entry.width 5 } \ -command { Ng_SetVisParameters; redraw } # pack $f.framecurveproj # pack $f.framecurveproj.showcurveproj $f.framecurveproj.showcurveprojedge -side left # } # light options set f $w.nb.light ttk::labelframe $f.main -text "Lighting options" -relief groove -borderwidth 3 pack $f.main -fill x -pady 15 set f $f.main ttk::label $f.lab1 -text "Ambient Light" ttk::scale $f.scale1 -orient horizontal -length 200 -from 0 -to 1 \ -command "roundscale $f.scale1 2; Ng_SetVisParameters; redraw" \ -variable viewoptions.light.amb ttk::entry $f.ent1 -textvariable viewoptions.light.amb -validate focus -width 4 \ -validatecommand " Ng_SetVisParameters; redraw;my_validate %W [$f.scale1 cget -from] [$f.scale1 cget -to] %P 2" \ -invalidcommand "my_invalid %W;Ng_SetVisParameters; redraw;" ttk::label $f.lab2 -text "Diffuse Light" ttk::scale $f.scale2 -orient horizontal -length 200 -from 0 -to 1 \ -command "roundscale $f.scale2 2; Ng_SetVisParameters; redraw " \ -variable viewoptions.light.diff ttk::entry $f.ent2 -textvariable viewoptions.light.diff -validate focus -width 4 \ -validatecommand " Ng_SetVisParameters; redraw;my_validate %W [$f.scale2 cget -from] [$f.scale2 cget -to] %P 2" \ -invalidcommand "my_invalid %W;Ng_SetVisParameters; redraw;" ttk::label $f.lab3 -text "Specular Light" ttk::scale $f.scale3 -orient horizontal -length 200 -from 0 -to 1 \ -command "roundscale $f.scale3 2; Ng_SetVisParameters; redraw " \ -variable viewoptions.light.spec ttk::entry $f.ent3 -textvariable viewoptions.light.spec -validate focus -width 4 \ -validatecommand " Ng_SetVisParameters; redraw;my_validate %W [$f.scale3 cget -from] [$f.scale3 cget -to] %P 2" \ -invalidcommand "my_invalid %W;Ng_SetVisParameters; redraw;" grid $f.scale1 $f.ent1 $f.lab1 -sticky nw -padx 4 -pady 8 grid $f.scale2 $f.ent2 $f.lab2 -sticky nw -padx 4 -pady 8 grid $f.scale3 $f.ent3 $f.lab3 -sticky nw -padx 4 -pady 8 grid anchor $f center set f $w.nb.light ttk::labelframe $f.main1 -text "Material options" -relief groove -borderwidth 3 pack $f.main1 -fill x -pady 15 set f $f.main1 ttk::label $f.lab4 -text "Material Shininess" ttk::scale $f.scale4 -orient horizontal -length 200 -from 0 -to 128 \ -command "roundscale $f.scale4 0; Ng_SetVisParameters; redraw " \ -variable viewoptions.mat.shininess ttk::entry $f.ent4 -textvariable viewoptions.mat.shininess -validate focus -width 4 \ -validatecommand " Ng_SetVisParameters; redraw;my_validate %W [$f.scale4 cget -from] [$f.scale4 cget -to] %P 0" \ -invalidcommand "my_invalid %W;Ng_SetVisParameters; redraw;" ttk::label $f.lab5 -text "Material Transparency" ttk::scale $f.scale5 -orient horizontal -length 200 -from 0 -to 1 \ -command "roundscale $f.scale5 2; Ng_SetVisParameters; redraw " \ -variable viewoptions.mat.transp ttk::entry $f.ent5 -textvariable viewoptions.mat.transp -validate focus -width 4 \ -validatecommand " Ng_SetVisParameters; redraw;my_validate %W [$f.scale5 cget -from] [$f.scale5 cget -to] %P 2" \ -invalidcommand "my_invalid %W;Ng_SetVisParameters; redraw;" grid $f.scale4 $f.ent4 $f.lab4 -sticky nw -padx 4 -pady 8 grid $f.scale5 $f.ent5 $f.lab5 -sticky nw -padx 4 -pady 8 grid anchor $f center #$f.lab2 $f.scale2 $f.lab3 $f.scale3 $f.lab4 $f.scale4 $f.lab5 $f.scale5 # edges options set f $w.nb.edges ttk::labelframe $f.main -text "Edge viewing options" -relief groove -borderwidth 3 pack $f.main -fill x -pady 15 set f $f.main ttk::frame $f.helper pack $f.helper -anchor center set f $f.helper ttk::checkbutton $f.showedges -text "Show Edges" \ -variable viewoptions.drawededges \ -command { Ng_SetVisParameters; redraw } ttk::checkbutton $f.showpoints -text "Show Points" \ -variable viewoptions.drawedpoints \ -command { Ng_SetVisParameters; redraw } ttk::checkbutton $f.showpointnrs -text "Show Points Nrs" \ -variable viewoptions.drawedpointnrs \ -command { Ng_SetVisParameters; redraw } ttk::checkbutton $f.showtang -text "Show CP Tangents" \ -variable viewoptions.drawedtangents \ -command { Ng_SetVisParameters; redraw } ttk::checkbutton $f.drawedgenrs -text "Show Edge Nrs" \ -variable viewoptions.drawededgenrs \ -command { Ng_SetVisParameters; redraw } pack $f.showedges $f.showpoints $f.showpointnrs $f.showtang $f.drawedgenrs -anchor w set f $w.nb.edges ttk::labelframe $f.main1 -text "Center point" -relief groove -borderwidth 3 pack $f.main1 -fill x -pady 15 set f $f.main1 ttk::frame $f.center pack $f.center -anchor center ttk::button $f.center.btn -text "Set Center Point" \ -command { Ng_SetVisParameters; Ng_Center; redraw } ttk::entry $f.center.ent -width 5 -textvariable viewoptions.centerpoint -validate focus \ -validatecommand "my_validate %W 0 1e9 %P 0" \ -invalidcommand "my_invalid %W" grid $f.center.ent $f.center.btn -sticky nw -padx 4 #ttk::frame $f.f1 #pack $f.f1 -pady 5 -anchor center ttk::label $f.center.lab1 -text "SpecPoint Veclen" ttk::entry $f.center.ent1 -width 5 -textvariable viewoptions.specpointvlen -validate focus \ -validatecommand "my_validate %W 0 1e9 %P 1" \ -invalidcommand "my_invalid %W" grid $f.center.ent1 $f.center.lab1 -sticky nw -padx 4 # misc options set f $w.nb.misc ttk::labelframe $f.point -relief groove -borderwidth 3 -text "Special point" ttk::frame $f.point.dp ttk::checkbutton $f.point.dp.drawpoint -text "Draw Point" \ -variable viewoptions.drawspecpoint \ -command { Ng_SetVisParameters; redraw } ttk::entry $f.point.dp.px -width 8 -textvariable viewoptions.specpointx -validate focus \ -validatecommand "my_validate %W -1e9 1e9 %P 10" \ -invalidcommand "my_invalid %W" ttk::entry $f.point.dp.py -width 8 -textvariable viewoptions.specpointy -validate focus \ -validatecommand "my_validate %W -1e9 1e9 %P 10" \ -invalidcommand "my_invalid %W" ttk::entry $f.point.dp.pz -width 8 -textvariable viewoptions.specpointz -validate focus \ -validatecommand "my_validate %W -1e9 1e9 %P 10" \ -invalidcommand "my_invalid %W" grid $f.point.dp.drawpoint $f.point.dp.px $f.point.dp.py $f.point.dp.pz -sticky nw -padx 4;# -side left ttk::checkbutton $f.point.dp.center -text "Use as Center" \ -variable viewoptions.usecentercoords \ -command { if { ${viewoptions.usecentercoords} } { set viewoptions.centerx ${viewoptions.specpointx} set viewoptions.centery ${viewoptions.specpointy} set viewoptions.centerz ${viewoptions.specpointz} Ng_SetVisParameters; Ng_Center redraw } { Ng_SetVisParameters } } grid $f.point.dp.center -sticky nw -padx 4 pack $f.point.dp pack $f.point -fill x -ipady 3 -pady 15 ttk::frame $w.bu pack $w.bu -fill x -ipady 3 ttk::button $w.bu.done -text "Done" -command { Ng_SetVisParameters; redraw destroy .viewopts_dlg } ttk::button $w.bu.apply -text "Apply" -command { Ng_SetVisParameters; redraw } pack $w.bu.apply $w.bu.done -expand yes -side left wm withdraw $w wm geom $w +100+100 wm deiconify $w wm title $w "Viewing options" focus $w } } proc clipplanecommand { { optionalvar 0 } } { Ng_SetVisParameters after idle redraw } set clippingdialog_pop1 0 set clippingdialog_pop2 0 set clippingdialog_pop3 0 set clippingdialog_pop4 0 # # # clipping dialog # # proc clippingdialog { } { global clippingdialog_pop1 global clippingdialog_pop2 global clippingdialog_pop3 global clippingdialog_pop4 set clippingdialog_pop1 1 set clippingdialog_pop2 1 set clippingdialog_pop3 1 set clippingdialog_pop4 1 set w .clipping_dlg if {[winfo exists .clipping_dlg] == 1} { wm withdraw $w wm deiconify $w focus $w } { toplevel $w ttk::frame $w.background pack $w.background -fill x -fill y set w $w.background ttk::labelframe $w.main -text "Visual clipping" -relief groove -borderwidth 3 pack $w.main -fill x -pady 15 set w $w.main ttk::label $w.lab1 -text "Normal x" ttk::scale $w.scale1 -orient horizontal -length 300 -from -1 -to 1 \ -variable viewoptions.clipping.nx \ -command "roundscale $w.scale1 2; clipplanecommand " ttk::entry $w.entry1 -width 5 -textvariable viewoptions.clipping.nx \ -validate focus -validatecommand " clipplanecommand;my_validate %W [$w.scale1 cget -from] [$w.scale1 cget -to] %P 2" \ -invalidcommand "my_invalid %W; clipplanecommand" ttk::label $w.lab2 -text "Normal y" ttk::scale $w.scale2 -orient horizontal -length 300 -from -1 -to 1 \ -variable viewoptions.clipping.ny \ -command "roundscale $w.scale2 2; clipplanecommand " ttk::entry $w.entry2 -width 5 -textvariable viewoptions.clipping.ny \ -validate focus -validatecommand " clipplanecommand;my_validate %W [$w.scale2 cget -from] [$w.scale2 cget -to] %P 2" \ -invalidcommand "my_invalid $w.entry2;clipplanecommand" ttk::label $w.lab3 -text "Normal z" ttk::scale $w.scale3 -orient horizontal -length 300 -from -1 -to 1 \ -variable viewoptions.clipping.nz \ -command "roundscale $w.scale3 2; clipplanecommand " ttk::entry $w.entry3 -width 5 -textvariable viewoptions.clipping.nz \ -validate focus -validatecommand " clipplanecommand;my_validate %W [$w.scale3 cget -from] [$w.scale3 cget -to] %P 2" \ -invalidcommand "my_invalid %W;clipplanecommand" ttk::label $w.lab4 -text "Distance" ttk::scale $w.scale4 -orient horizontal -length 300 -from -1 -to 1.001 \ -variable viewoptions.clipping.dist \ -command "roundscale $w.scale4 3; clipplanecommand " ttk::entry $w.entry4 -width 5 -textvariable viewoptions.clipping.dist \ -validate focus -validatecommand " clipplanecommand;my_validate %W [$w.scale4 cget -from] [$w.scale4 cget -to] %P 3" \ -invalidcommand "my_invalid %W;clipplanecommand" proc my_Press {w x y} { set inc [expr {([$w get $x $y] <= [$w get]) ? -1 : 1}] ttk::Repeatedly ttk::scale::Increment $w [expr 0.001*$inc] } bind $w.scale4 { if { [string match *slider [%W identify %x %y]] == 0 } { my_Press %W %x %y;break } } bind $w.scale4 {ttk::scale::Release %W %x %y} ttk::label $w.lab5 -text "Additional\rDistance" ttk::scale $w.scale5 -orient horizontal -length 300 -from -1 -to 1.001 \ -variable viewoptions.clipping.dist2 \ -command "roundscale $w.scale5 3; clipplanecommand " ttk::entry $w.entry5 -width 5 -textvariable viewoptions.clipping.dist2 \ -validate focus -validatecommand " clipplanecommand;my_validate %W [$w.scale5 cget -from] [$w.scale5 cget -to] %P 3" \ -invalidcommand "my_invalid %W;clipplanecommand" bind $w.scale5 { if { [string match *slider [%W identify %x %y]] == 0 } { my_Press %W %x %y;break } } bind $w.scale5 {ttk::scale::Release %W %x %y} ttk::label $w.clipdomainlabel -text "Clip only domain" ttk::spinbox $w.clipdomainspinb -from 0 -to 500 -increment 1 -width 3 \ -textvariable viewoptions.clipping.onlydomain -validate focus \ -command {clipplanecommand;} \ -validatecommand "my_validatespinbox %W %P 0" \ -invalidcommand "my_invalidspinbox %W" ttk::label $w.donotclipdomainlabel -text "Do not clip domain" ttk::spinbox $w.donotclipdomainspinb -from 0 -to 500 -increment 1 -width 3 \ -textvariable viewoptions.clipping.notdomain -validate focus \ -command "clipplanecommand" \ -validatecommand "my_validatespinbox %W %P 0" \ -invalidcommand "my_invalidspinbox %W" #tixControl $w.clipdomain -label "Clip only domain" -integer true \ -variable viewoptions.clipping.onlydomain -min 0 -max 50 \ -options { entry.width 2 } \ -command { clipplanecommand; } # -command { Ng_SetVisParameters; redraw } #tixControl $w.donotclipdomain -label "Do not clip domain" -integer true \ -variable viewoptions.clipping.notdomain -min 0 -max 50 \ -options { entry.width 2 } \ -command { clipplanecommand; } # -command { Ng_SetVisParameters; redraw } grid $w.scale1 $w.entry1 $w.lab1 -sticky nw -padx 4 -pady 14 grid $w.scale2 $w.entry2 $w.lab2 -sticky nw -padx 4 -pady 14 grid $w.scale3 $w.entry3 $w.lab3 -sticky nw -padx 4 -pady 14 grid $w.scale4 $w.entry4 $w.lab4 -sticky nw -padx 4 -pady 14 grid $w.scale5 $w.entry5 $w.lab5 -sticky w -padx 4 -pady 14 grid $w.clipdomainlabel -sticky ne -padx 4 -pady 14 grid $w.clipdomainspinb -sticky nw -padx 4 -pady 14 -column 1 -row 5 grid $w.donotclipdomainlabel -sticky ne -padx 4 -pady 14 grid $w.donotclipdomainspinb -sticky nw -padx 4 -pady 14 -column 1 -row 6 grid anchor $w center #pack $w.lab2 $w.scale2 $w.lab3 $w.scale3 $w.lab4 $w.scale4 $w.lab5 $w.scale5 $w.clipdomain $w.donotclipdomain set w .clipping_dlg.background.main ttk::checkbutton $w.cb1 -text "Enable clipping" \ -variable viewoptions.clipping.enable \ -command { Ng_SetVisParameters; redraw } grid $w.cb1 -columnspan 2 -sticky ne ttk::frame $w.bu # pack $w.bu -fill x grid $w.bu;# -fill x -ipady 3 ttk::button $w.cancle -text "Done" -command "destroy .clipping_dlg" grid $w.cancle -columnspan 3 -pady 16 set w .clipping_dlg wm withdraw $w wm geom $w +100+100 wm deiconify $w wm title $w "Clipping Plane" # grab $w focus $w # $w.scale1 configure -command { puts "call1b"; Ng_SetVisParameters; redraw } # puts "after" clipplanecommand } } # # refinement dialog # # proc refinementdialog { } { set w .refinement_dlg if {[winfo exists .refinement_dlg] == 1} { wm withdraw $w wm deiconify $w focus $w } { toplevel $w #ttk::labelframe $w.main -text "Refinement options" -relief groove -borderwidth 3 #pack $w.main -fill x -pady 15 #set w $w.main # tixControl $w.meshsize -label "max mesh-size: " -integer false \ # -variable options.meshize -min 1e-6 -max 1e6 \ # -options { # entry.width 6 # label.width 25 # label.anchor e # } # pack $w.meshsize -anchor e global localh set localh 1 # tixControl $w.loch -label "local mesh-size: " -integer false \ # -variable localh -min 1e-6 -max 1e6 \ # -options { # entry.width 6 # label.width 25 # label.anchor e # } # pack $w.loch -anchor e ttk::frame $w.meshsize ttk::label $w.meshsize.l1 -text "max mesh-size: " ttk::spinbox $w.meshsize.sp1 -from 1e-6 -to 1e6 -textvariable options.meshsize -validate focus -validatecommand "my_validatespinbox %W %P 4" \ -invalidcommand "my_invalidspinbox %W" -width 6 -increment 0.1 #pack $w.meshsize.l1 $w.meshsize.sp1 -fill x -side left ttk::frame $w.meshsizeloc #pack $w.meshsize -anchor e #pack $w.meshsizeloc -anchor e ttk::label $w.meshsizeloc.l1 -text "local mesh-size: " ttk::spinbox $w.meshsizeloc.sp1 -from 1e-6 -to 1e6 -textvariable localh -validate focus -validatecommand "my_validatespinbox %W %P 4" \ -invalidcommand "my_invalidspinbox %W" -width 6 -increment 0.1 #pack $w.meshsizeloc.l1 $w.meshsizeloc.sp1 -expand yes -fill x pack $w.meshsize pack $w.meshsizeloc grid $w.meshsize.l1 $w.meshsize.sp1 grid $w.meshsizeloc.l1 $w.meshsizeloc.sp1 ttk::button $w.restface -text "Restrict H at face" \ -command { .refinement_dlg.meshsize invoke .refinement_dlg.loch invoke Ng_RestrictH face $localh } ttk::button $w.restedge -text "Restrict H at edge" \ -command { .refinement_dlg.meshsize invoke .refinement_dlg.loch invoke Ng_RestrictH edge $localh } ttk::button $w.restelement -text "Restrict H at element" \ -command { .refinement_dlg.meshsize invoke .refinement_dlg.loch invoke Ng_RestrictH element $localh } ttk::button $w.restpoint -text "Restrict H at point" \ -command { .refinement_dlg.meshsize invoke .refinement_dlg.loch invoke Ng_RestrictH point $localh } pack $w.restface $w.restedge $w.restelement $w.restpoint ttk::button $w.anisoedge -text "Declare Anisotropic edge" \ -command { Ng_Anisotropy edge } pack $w.anisoedge frame $w.bu pack $w.bu -fill x -ipady 3 ttk::button $w.bu.cancle -text "Done" -command "destroy .refinement_dlg" ttk::button $w.bu.refine -text "Refine" \ -command { # Ng_BisectCopyMesh; set oldnp 0; set newnp $status_np; while { $oldnp < $newnp } { set level [expr $level+1] Ng_Bisect; Ng_HighOrder ${options.elementorder} Ng_ReadStatus; redraw; set oldnp $newnp set newnp $status_np puts "oldnp $oldnp newnp $newnp" } } ttk::button $w.bu.zrefine -text "Z-Refine" \ -command { Ng_ZRefinement; Ng_ReadStatus; redraw; } pack $w.bu.zrefine $w.bu.refine $w.bu.cancle -expand yes -side left wm withdraw $w wm geom $w +100+100 wm deiconify $w wm title $w "Select Refinement" focus $w } } # # boundcondessing dialog # # proc bcpropdialog { } { set w .bcprop_dlg if {[winfo exists .bcprop_dlg] == 1} { wm withdraw $w wm deiconify $w } { toplevel $w ttk::frame $w.face -borderwidth 3 pack $w.face -fill x ttk::label $w.face.lab -text "face index:" ttk::label $w.face.ent -text 1 ttk::button $w.face.next -text "next" -command { set w .bcprop_dlg; set facenr [$w.face.ent cget -text] if {$facenr == [Ng_BCProp getnfd]} { set facenr 1 } { set facenr [expr $facenr + 1] } $w.face.ent configure -text $facenr Ng_BCProp setactive $facenr set bcnr [Ng_BCProp getbc $facenr] $w.bc.ent delete 0 end $w.bc.ent insert 0 $bcnr redraw } ttk::button $w.face.prev -text "prev" -command { set w .bcprop_dlg; set facenr [$w.face.ent cget -text] if {$facenr == 1} { set facenr [Ng_BCProp getnfd] } { set facenr [expr $facenr - 1] } $w.face.ent configure -text $facenr Ng_BCProp setactive $facenr set bcnr [Ng_BCProp getbc $facenr] $w.bc.ent delete 0 end $w.bc.ent insert 0 $bcnr redraw } pack $w.face.lab $w.face.ent $w.face.prev $w.face.next -side left ttk::frame $w.bc -borderwidth 3 pack $w.bc -fill x ttk::label $w.bc.lab -text "bc property:" entry $w.bc.ent -width 5 -relief sunken ttk::button $w.bc.but -text "change" -command { set w .bcprop_dlg; Ng_BCProp setbc [$w.face.ent cget -text] [$w.bc.ent get]; } ttk::button $w.bc.but2 -text "all" -command { set w .bcprop_dlg; Ng_BCProp setall [$w.bc.ent get]; } pack $w.bc.lab $w.bc.ent $w.bc.but $w.bc.but2 -side left -expand yes ttk::frame $w.bcname -borderwidth 3 pack $w.bcname -fill x ttk::label $w.bcname.lab -text "bc name:" ttk::label $w.bcname.ent -text "-" pack $w.bcname.lab $w.bcname.ent -side left -expand yes ttk::frame $w.bu pack $w.bu -fill x -ipady 3 ttk::button $w.bu.close -text "Close" -command { destroy .bcprop_dlg } pack $w.bu.close -expand yes -side left wm withdraw $w wm geom $w +100+100 wm deiconify $w wm title $w "Boundary Conditions" } focus $w set facenr [Ng_BCProp getactive] $w.face.ent configure -text $facenr set bcnr [Ng_BCProp getbc $facenr] $w.bc.ent delete 0 end $w.bc.ent insert 0 $bcnr set bcname [Ng_BCProp getbcname $facenr] $w.bcname.ent configure -text $bcname } # # Philippose - 25/07/2010 # Display the face colours currently # available in the mesh # proc currmeshcoloursdialog { } { set w .currmeshcolours_dlg if {[winfo exists .currmeshcolours_dlg] == 1} { wm withdraw $w wm deiconify $w focus $w } { toplevel $w global facecolslist frame $w.facecols -borderwidth 3 listbox $w.facecols.list -yscroll "$w.facecols.scroll set" -selectmode single -setgrid 1 -width 32 -height 12 scrollbar $w.facecols.scroll -command "$w.facecols.list yview" pack $w.facecols.scroll -side right -fill y pack $w.facecols.list -side left -expand yes -fill both Ng_CurrentFaceColours getcolours facecolslist set i 1 foreach el $facecolslist { set hel [format "%d: (%.4f %.4f %.4f)" $i [ lindex $el 0 ] [ lindex $el 1 ] [ lindex $el 2 ]] incr i $w.facecols.list insert end $hel } frame $w.bu1 -borderwidth 3 ttk::button $w.bu1.showonly -text "show only" -command { Ng_CurrentFaceColours showonly [.currmeshcolours_dlg.facecols.list curselection] redraw } ttk::button $w.bu1.hideonly -text "hide only" -command { Ng_CurrentFaceColours hideonly [.currmeshcolours_dlg.facecols.list curselection] redraw } ttk::button $w.bu1.showalso -text "show" -command { Ng_CurrentFaceColours showalso [.currmeshcolours_dlg.facecols.list curselection] redraw } ttk::button $w.bu1.hidealso -text "hide" -command { Ng_CurrentFaceColours hidealso [.currmeshcolours_dlg.facecols.list curselection] redraw } pack $w.bu1.showonly $w.bu1.hideonly $w.bu1.showalso $w.bu1.hidealso -expand yes -fill x -padx 2 -pady 2 -side left frame $w.bu2 ttk::button $w.bu2.showall -text "show all" -command { Ng_CurrentFaceColours showall redraw } ttk::button $w.bu2.hideall -text "hide all" -command { Ng_CurrentFaceColours hideall redraw } pack $w.bu2.showall $w.bu2.hideall -expand yes -fill x -padx 2 -pady 2 -side left frame $w.bu3 ttk::button $w.bu3.close -text "close" -command { destroy .currmeshcolours_dlg } pack $w.bu3.close -expand yes -fill x -pady 3 -side right pack $w.facecols -side top -expand yes -fill x -fill y pack $w.bu3 -side bottom pack $w.bu2 -side bottom pack $w.bu1 -expand yes -fill x -side left wm withdraw $w wm geom $w +100+100 wm deiconify $w wm title $w "Inspect Mesh Colours" focus $w } } # # Philippose - 30/01/2009 # Local Surface Mesh Size Selection # (Currently only supports OCC Geometry) # # proc surfacemeshsizedialog { } { set w .surfacemeshsize_dlg if {[winfo exists .surfacemeshsize_dlg] == 1} { wm withdraw $w wm deiconify $w } { toplevel $w frame $w.face -borderwidth 3 pack $w.face -fill x -padx 5 ttk::label $w.face.lab -text "face index:" ttk::label $w.face.ent -text 1 -padx 4 ttk::button $w.face.next -text "next" -command { set w .surfacemeshsize_dlg; set facenr [$w.face.ent cget -text] if {$facenr == [Ng_SurfaceMeshSize getnfd]} { set facenr 1 } { set facenr [expr $facenr + 1] } $w.face.ent configure -text $facenr Ng_SurfaceMeshSize setactive $facenr set surfms [Ng_SurfaceMeshSize getsurfms $facenr] $w.sms.ent delete 0 end $w.sms.ent insert 0 $surfms redraw } ttk::button $w.face.prev -text "prev" -command { set w .surfacemeshsize_dlg; set facenr [$w.face.ent cget -text] if {$facenr == 1} { set facenr [Ng_SurfaceMeshSize getnfd] } { set facenr [expr $facenr - 1] } $w.face.ent configure -text $facenr Ng_SurfaceMeshSize setactive $facenr set surfms [Ng_SurfaceMeshSize getsurfms $facenr] $w.sms.ent delete 0 end $w.sms.ent insert 0 $surfms redraw } pack $w.face.lab $w.face.ent $w.face.prev $w.face.next -side left frame $w.sms -borderwidth 3 pack $w.sms -fill x ttk::label $w.sms.lab -text "max mesh size:" entry $w.sms.ent -width 8 -relief sunken ttk::button $w.sms.but -text "change" -command { set w .surfacemeshsize_dlg; Ng_SurfaceMeshSize setsurfms [$w.face.ent cget -text] [$w.sms.ent get]; } ttk::button $w.sms.but2 -text "all" -command { set w .surfacemeshsize_dlg; Ng_SurfaceMeshSize setall [$w.sms.ent get]; } pack $w.sms.lab $w.sms.ent $w.sms.but $w.sms.but2 -side left -padx 5 -expand yes frame $w.bu pack $w.bu -fill x -ipady 3 ttk::button $w.bu.close -text "Close" -command { destroy .surfacemeshsize_dlg } pack $w.bu.close -expand yes -side left wm withdraw $w wm geom $w +100+100 wm deiconify $w wm title $w "Edit Surface Mesh Size" } focus $w set facenr [Ng_SurfaceMeshSize getactive] $w.face.ent configure -text $facenr set surfms [Ng_SurfaceMeshSize getsurfms $facenr] $w.sms.ent delete 0 end $w.sms.ent insert 0 $surfms } # # METIS dialog # # proc METISdialog { } { set w .metis_dlg set w.parts 64 if {[winfo exists .metis_dlg] == 1} { wm withdraw $w wm deiconify $w } { toplevel $w frame $w.a -borderwidth 0 frame $w.b -borderwidth 0 pack $w.a $w.b ttk::label $w.a.lab -text "Number of partitions:" entry $w.a.ent -textvariable w.parts -width 4 -relief sunken ttk::button $w.b.start -text "Start METIS" -command { Ng_Metis ${w.parts} redraw } ttk::button $w.b.cancel -text "Cancel" -command { destroy .metis_dlg } pack $w.a.lab $w.a.ent -side left -expand yes pack $w.b.start $w.b.cancel -side left wm withdraw $w wm geom $w +100+100 wm deiconify $w wm title $w "METIS Partitioning" focus $w } } # # STL dialog # proc stloptionsdialog { } { set w .stlopts_dlg if {[winfo exists .stlopts_dlg] == 1} { wm withdraw $w wm deiconify $w focus $w } { toplevel $w pack [ttk::notebook $w.nb] -fill both -fill both -side top # tixNoteBook $w.nb -ipadx 6 -ipady 6 # $w config -bg gray # $w.nb subwidget nbframe config -backpagecolor gray # Create the two tabs on the notebook. The -underline option # puts a underline on the first character of the labels of the tabs. # Keyboard accelerators will be defined automatically according # to the underlined character. # # $w.nb add chartopt -label "Chart Options" -underline 0 # #$w.nb add meshsize -label "Mesh Size" -underline 0 # pack $w.nb -expand yes -fill both -padx 5 -pady 5 -side top # set f [$w.nb subwidget chartopt] # label $f.lab1 -text "Yellow Edges Angle ()" # scale $f.scale1 -orient horizontal -length 300 \ # -from 0 -to 90 -resolution 1 -tickinterval 10 \ # -variable stloptions.yangle # pack $f.lab1 $f.scale1 # label $f.lab2e -text "Edge Corner Angle ()" # scale $f.scale2e -orient horizontal -length 360 -from 0 -to 180 \ # -resolution 1 -tickinterval 20 \ # -variable stloptions.edgecornerangle # pack $f.lab2e $f.scale2e # label $f.lab2 -text "Chart Angle ()" # scale $f.scale2 -orient horizontal -length 360 -from 0 -to 180 \ # -resolution 1 -tickinterval 20 \ # -variable stloptions.chartangle # pack $f.lab2 $f.scale2 # label $f.lab2b -text "Outer Chart Angle ()" # scale $f.scale2b -orient horizontal -length 360 -from 0 -to 180 \ # -resolution 1 -tickinterval 20 \ # -variable stloptions.outerchartangle # pack $f.lab2b $f.scale2b # frame $f.r4 # pack $f.r4 -anchor w # scale $f.r4.sc -orient horizontal -length 200 -from 0.1 -to 10 \ # -resolution 0.1 -variable stloptions.resthatlasfac # checkbutton $f.r4.bu -text "Restrict h for Calc Atlas (Faster)" \ # -variable stloptions.resthatlasenable # pack $f.r4.sc $f.r4.bu -side left #set f [$w.nb subwidget meshsize] # checkbutton $w.seat -text "Use Searchtrees" \ # -variable stloptions.usesearchtree # pack $w.seat frame $w.bu # pack $w.bu pack $w.bu -fill x -ipady 3 # -fill x ttk::button $w.bu.apply -text "Apply" -command { redraw; Ng_GenerateMesh 1 2} ttk::button $w.bu.cancle -text "Done" -command { destroy .stlopts_dlg } pack $w.bu.cancle $w.bu.apply -side left -expand yes wm withdraw $w wm geom $w +100+100 wm deiconify $w wm title $w "STL Options" # grab $w focus $w } } proc stldoctordialog { } { Ng_STLDoctor 0 0 set wd .stldoctor_dlg if {[winfo exists .stldoctor_dlg] == 1} { wm withdraw $wd wm deiconify $wd focus $wd } { toplevel $wd pack [ttk::notebook $wd.nb] -fill both -fill both -side top $wd.nb add [ttk::frame $wd.nb.general] -text "General" -underline 0 $wd.nb add [ttk::frame $wd.nb.topology] -text "Edit Topology" -underline 5 $wd.nb add [ttk::frame $wd.nb.edges] -text "Edit Edges" -underline 5 $wd.nb add [ttk::frame $wd.nb.normals] -text "Edit Normals" -underline 5 $wd.nb add [ttk::frame $wd.nb.advanced] -text "Advanced" -underline 0 # tixNoteBook $wd.nb -ipadx 6 -ipady 6 # $wd.nb add general -label "General" -underline 0 # $wd.nb add topology -label "Edit Topology" -underline 5 # $wd.nb add edges -label "Edit Edges" -underline 5 # $wd.nb add normals -label "Edit Normals" -underline 5 # $wd.nb add advanced -label "Advanced" -underline 0 # pack $wd.nb -expand yes -fill both -padx 5 -pady 5 -side top # GENERAL ***************************** set f $wd.nb.general ttk::frame $f.selectframe -borderwidth 0 #ttk::frame $f.show #pack $f.show -fill x ttk::checkbutton $f.selectframe.showtrias -text "Show STL-Triangles" \ -variable stloptions.showtrias -command { Ng_SetVisParameters; redraw } #pack $f.selectframe.showtrias -anchor w ttk::checkbutton $f.selectframe.showfilledtrias -text "Show Filled Triangles" \ -variable stloptions.showfilledtrias -command { Ng_SetVisParameters; redraw } #pack $f.show.showfilledtrias -anchor w set selmodevals { 0 1 2 3 4 } set selmodelabs(0) "triangle" set selmodelabs(1) "edge" set selmodelabs(2) "point" set selmodelabs(3) "line" set selmodelabs(4) "line cluster" # tixOptionMenu $f.selmode -label "Double Click selects :" \ # -options { # label.width 19 # label.anchor e # menubutton.width 15 # } # foreach selmodev $selmodevals { # $f.selmode add command $selmodev -label $selmodelabs($selmodev) # } # $f.selmode config -variable stldoctor.selectmode # $f.selmode config -command { Ng_STLDoctor } global stldoctor.selectmode # pack $f.selmode ttk::label $f.selectframe.dblcsellab -text "Double Click selects : " ttk::menubutton $f.selectframe.dblcselbut -menu $f.selectframe.dblcselmen -text "triangle" -width 16 menu $f.selectframe.dblcselmen -tearoff 0 foreach selmode { 0 1 2 3 4 } { $f.selectframe.dblcselmen add command -label $selmodelabs($selmode) \ -command "set stldoctor.selectmode $selmode ; Ng_STLDoctor ; $f.selectframe.dblcselbut configure -text \"$selmodelabs($selmode)\"" } $f.selectframe.dblcselmen invoke $selmodelabs(${stldoctor.selectmode}) pack $f.selectframe grid $f.selectframe.showtrias -sticky nw grid $f.selectframe.showfilledtrias -sticky nw grid $f.selectframe.dblcsellab $f.selectframe.dblcselbut -sticky nw ttk::frame $f.sm pack $f.sm -fill x ttk::checkbutton $f.sm.bu -text "select with mouse" \ -variable stldoctor.selectwithmouse pack $f.sm.bu ttk::frame $f.st -relief groove -borderwidth 3 pack $f.st -fill x ttk::label $f.st.lab -text "Select triangle by number"; ttk::entry $f.st.ent -width 5 \ -textvariable stldoctor.selecttrig pack $f.st.ent $f.st.lab -side left -expand yes ttk::frame $f.vc -relief groove -borderwidth 3 pack $f.vc -fill x ttk::checkbutton $f.vc.bu -text "show vicinity" \ -variable stldoctor.showvicinity \ -command {Ng_STLDoctor vicinity; redraw} ttk::label $f.vc.lab -text "vicinity size"; #scale $f.vc.sc -orient horizontal -length 200 -from 0 -to 200 \ -resolution 1 -variable stldoctor.vicinity \ -command { Ng_STLDoctor vicinity; redraw } ttk::frame $f.vc.sc ttk::scale $f.vc.sc.scale -orient horizontal -length 200 -from 0 -to 200 \ -variable stldoctor.vicinity -takefocus 0 -command "Ng_STLDoctor vicinity; redraw; roundscale $f.vc.sc.scale 0" ttk::entry $f.vc.sc.entry -textvariable stldoctor.vicinity -width 3 \ -validatecommand "Ng_STLDoctor vicinity; redraw; my_validate %W [$f.vc.sc.scale cget -from] [$f.vc.sc.scale cget -to] %P 0" \ -invalidcommand "my_invalid %W;Ng_STLDoctor vicinity; redraw;" -validate focus ttk::label $f.vc.sc.lab -text "vicinity size" grid $f.vc.sc.scale $f.vc.sc.entry $f.vc.sc.lab -sticky nw -padx 4 pack $f.vc.bu $f.vc.lab $f.vc.sc -expand yes ttk::frame $f.ge -relief groove -borderwidth 0 pack $f.ge -expand yes ttk::button $f.ge.neighbourangles -text "calc neighbourangles" -command {Ng_STLDoctor neighbourangles} ttk::button $f.ge.showcoords -text "show coords of touched triangle" -command {Ng_STLDoctor showcoords} ttk::button $f.ge.moveptm -text "move point to middle of trianglepoints" -command {Ng_STLDoctor movepointtomiddle; redraw} ttk::button $f.ge.destroy0trigs -text "destroy 0-volume triangles" -command {Ng_STLDoctor destroy0trigs} grid $f.ge.neighbourangles -sticky nw -padx 4 -pady 4 grid $f.ge.showcoords -sticky nw -padx 4 -pady 4 grid $f.ge.moveptm -sticky nw -padx 4 -pady 4 grid $f.ge.destroy0trigs -sticky nw -padx 4 -pady 4 ttk::button $f.ge.cancle -text "Done" -command {destroy .stldoctor_dlg } grid $f.ge.cancle -sticky nw # TOPOLOGY ******************** set f $wd.nb.topology ttk::frame $f.oc -relief groove -borderwidth 3 pack $f.oc -pady 3 -ipady 3 -fill y -fill x ttk::frame $f.oc.oc1 -borderwidth 0 pack $f.oc.oc1 ttk::button $f.oc.oc1.bu -text "invert orientation \n of selected trig" -command {Ng_STLDoctor invertselectedtrig; redraw } ttk::button $f.oc.oc1.bu2 -text "orient after \n selected trig" -command {Ng_STLDoctor orientafterselectedtrig; redraw } ttk::button $f.oc.oc1.toperr -text "mark inconsistent triangles" -command {Ng_STLDoctor marktoperrortrigs; redraw } ttk::button $f.oc.oc1.deltrig -text "delete selected triangle" -command {Ng_STLDoctor deleteselectedtrig; redraw } ttk::button $f.oc.oc1.geosmooth -text "geometric smoothing" -command {Ng_STLDoctor smoothgeometry; redraw } grid $f.oc.oc1.bu x $f.oc.oc1.bu2 -sticky nw -padx 4 -pady 4 grid $f.oc.oc1.toperr - x -sticky nw -padx 4 -pady 4 grid $f.oc.oc1.deltrig - x -sticky nw -padx 4 -pady 4 grid $f.oc.oc1.geosmooth - x -sticky nw -padx 4 -pady 4 # EDGES *********************** set f $wd.nb.edges ttk::frame $f.be -relief groove -borderwidth 3 pack $f.be -fill x #scale $f.be.sc -orient horizontal -length 200 -from 0 -to 100 \ #-resolution 0.5 ttk::frame $f.be.frame pack $f.be.frame -ipady 4 -pady 4 ttk::label $f.be.frame.lab -text "build edges with yellow angle:"; ttk::scale $f.be.frame.scale -orient horizontal -length 200 -from 0 -to 200 \ -variable stloptions.yangle -takefocus 0 -command "roundscale $f.be.frame.scale 1; Ng_SetSTLParameters; Ng_STLDoctor buildedges; redraw" ttk::entry $f.be.frame.entry -textvariable stloptions.yangle -width 5 \ -validatecommand "Ng_SetSTLParameters; Ng_STLDoctor buildedges; redraw;my_validate %W [$f.be.frame.scale cget -from] [$f.be.frame.scale cget -to] %P 1" \ -invalidcommand "my_invalid %W;Ng_SetSTLParameters; Ng_STLDoctor buildedges; redraw" -validate focus grid $f.be.frame.lab - -sticky nw -padx 4 grid $f.be.frame.scale $f.be.frame.entry -sticky nw -padx 4 #$f.be.sc config -variable stloptions.yangle #$f.be.sc config -command { Ng_SetSTLParameters; Ng_STLDoctor buildedges; redraw } ttk::label $f.be.frame.lab2 -text "continue edges with yellow angle:"; # scale $f.be.sc2 -orient horizontal -length 200 -from 0 -to 100 \ -resolution 0.5 ttk::scale $f.be.frame.scale2 -orient horizontal -length 200 -from 0 -to 100 \ -variable stloptions.contyangle -takefocus 0 -command "roundscale $f.be.frame.scale2 1; Ng_SetSTLParameters; Ng_STLDoctor buildedges; redraw" ttk::entry $f.be.frame.entry2 -textvariable stloptions.contyangle -width 5 \ -validatecommand "Ng_SetSTLParameters; Ng_STLDoctor buildedges; redraw;my_validate %W [$f.be.frame.scale2 cget -from] [$f.be.frame.scale2 cget -to] %P 1" \ -invalidcommand "my_invalid %W;Ng_SetSTLParameters; Ng_STLDoctor buildedges; redraw" -validate focus grid $f.be.frame.lab2 - -sticky nw -padx 4 grid $f.be.frame.scale2 $f.be.frame.entry2 -sticky nw -padx 4 #$f.be.sc2 config -variable stloptions.contyangle #$f.be.sc2 config -command { Ng_SetSTLParameters; Ng_STLDoctor buildedges; redraw } ttk::button $f.be.frame.buildedges -text "Build Edges" -command {Ng_STLDoctor buildedges; redraw} grid $f.be.frame.buildedges - -sticky n -padx 4 -pady 4 #pack $f.be.lab $f.be.sc $f.be.lab2 $f.be.sc2 $f.be.buildedges -expand yes ttk::frame $f.se -relief groove -borderwidth 3 pack $f.se -fill x ttk::checkbutton $f.se.bu -text "show excluded" \ -variable stldoctor.showexcluded \ -command {Ng_STLDoctor; redraw} pack $f.se.bu # edgeselectmode ****** set edgeselmodevals { 0 1 2 3 4 } set edgeselmodelabs(0) "no change" set edgeselmodelabs(1) "undefined" set edgeselmodelabs(2) "confirmed" set edgeselmodelabs(3) "candidate" set edgeselmodelabs(4) "excluded" # tixOptionMenu $f.edgeselmode -label "Double Click sets edge :" \ # -options { # label.width 19 # label.anchor e # menubutton.width 15 # } # foreach edgeselmodev $edgeselmodevals { # $f.edgeselmode add command $edgeselmodev -label $edgeselmodelabs($edgeselmodev) # } # $f.edgeselmode config -variable stldoctor.edgeselectmode # $f.edgeselmode config -command { Ng_STLDoctor } global stldoctor.edgeselectmode # pack $f.edgeselmode ttk::frame $f.scaleframe -relief groove -borderwidth 0 pack $f.scaleframe -ipadx 4 -pady 4 -expand yes ttk::label $f.scaleframe.dblcedgelab -text "Double Click sets edge :" ttk::menubutton $f.scaleframe.dblcledgebut -menu $f.scaleframe.dblcledgem -text "coarse" -width 16 menu $f.scaleframe.dblcledgem -tearoff 0 foreach selectmode { 0 1 2 3 4 } { $f.scaleframe.dblcledgem add command -label $edgeselmodelabs($selectmode) \ -command "set stldoctor.edgeselectmode $selectmode ; $f.scaleframe.dblcledgebut configure -text \"$edgeselmodelabs($selectmode)\"" } $f.scaleframe.dblcledgem invoke $edgeselmodelabs(${stldoctor.edgeselectmode}) grid $f.scaleframe.dblcedgelab $f.scaleframe.dblcledgebut -sticky n -ipadx 4 # edge buttons ttk::frame $f.edg -relief groove -borderwidth 3 pack $f.edg -fill x -ipadx 4 -ipady 4 # checkbutton $f.edg.bu -text "use external edges" \ # -variable stldoctor.useexternaledges \ # -command {Ng_STLDoctor; redraw} # pack $f.edg.bu -expand yes ttk::frame $f.edg.f0 pack $f.edg.f0 ttk::button $f.edg.f0.confirmedge -text "confirm" -command {Ng_STLDoctor confirmedge; redraw} ttk::button $f.edg.f0.candidateedge -text "candidate" -command {Ng_STLDoctor candidateedge; redraw} ttk::button $f.edg.f0.excludeedge -text "exclude" -command {Ng_STLDoctor excludeedge; redraw} ttk::button $f.edg.f0.undefinededge -text "undefined" -command {Ng_STLDoctor undefinededge; redraw} pack $f.edg.f0.confirmedge $f.edg.f0.candidateedge $f.edg.f0.excludeedge $f.edg.f0.undefinededge -side left ttk::frame $f.edg.fa pack $f.edg.fa ttk::button $f.edg.fa.setallundefined -text "all undefined" -command {Ng_STLDoctor setallundefinededges; redraw} ttk::button $f.edg.fa.erasecandidates -text "candidates to undefined" -command {Ng_STLDoctor erasecandidateedges; redraw} pack $f.edg.fa.setallundefined $f.edg.fa.erasecandidates -side left ttk::frame $f.edg.fb pack $f.edg.fb ttk::button $f.edg.fb.confirmcandidates -text "candidates to confirmed" -command {Ng_STLDoctor confirmcandidateedges; redraw} ttk::button $f.edg.fb.confirmedtocandidates -text "confirmed to candidates" -command {Ng_STLDoctor confirmedtocandidateedges; redraw} pack $f.edg.fb.confirmcandidates $f.edg.fb.confirmedtocandidates -side left ttk::frame $f.edg.f1 ttk::frame $f.edg.f2 ttk::frame $f.edg.f3 ttk::frame $f.edg.f4 pack $f.edg.f1 $f.edg.f2 $f.edg.f3 $f.edg.f4 ttk::button $f.edg.f1.exportedges -text "export edges" -command {Ng_STLDoctor exportedges} ttk::button $f.edg.f1.importedges -text "import edges" -command {Ng_STLDoctor importedges; redraw} ttk::button $f.edg.f1.saveedgedata -text "save edgedata" \ -command { set types { {"Netgen Edgedata" {.ned} } } set file [tk_getSaveFile -filetypes $types -defaultextension ".ned"] if {$file != ""} { Ng_STLDoctor saveedgedata $file } } ttk::button $f.edg.f1.loadedgedata -text "load edgedata" \ -command { set types { {"Netgen Edgedata" {.ned} } } set file [tk_getOpenFile -filetypes $types -defaultextension ".ned"] if {$file != ""} { Ng_STLDoctor loadedgedata $file puts "loading done" redraw # wm title . [concat "NETGEN - " $file] } } ttk::button $f.edg.f1.importAVLedges -text "import AVL edges" \ -command { set types {{"Edge file" {.edg }}} set file [tk_getOpenFile -filetypes $types -defaultextension ".edg"] if {$file != ""} { Ng_STLDoctor importexternaledges $file; } } pack $f.edg.f1.importAVLedges $f.edg.f1.loadedgedata $f.edg.f1.saveedgedata -side left # button $f.edg.f1.buildedges -text "build external edges" -command {Ng_STLDoctor buildexternaledges; redraw} ttk::frame $f.edg2 -relief groove -borderwidth 3 pack $f.edg2 -fill x # button $f.edg2.addlonglines -text "make long lines candidates (% of diam)" -command {Ng_STLDoctor addlonglines; redraw} ttk::label $f.edg2.lab -text "length (%):" scale $f.edg2.sc -orient horizontal -length 200 -from 0 -to 100 \ -resolution 0.5 \ -variable stldoctor.longlinefact # button $f.edg2.deletedirtyedges -text "make dirty edges candidates" -command {Ng_STLDoctor deletedirtyedges; redraw} ttk::button $f.edg2.undoedge -text "undo last edge change" -command {Ng_STLDoctor undoedgechange; redraw} # pack $f.edg2.addlonglines $f.edg2.deletedirtyedges -expand yes # pack $f.edg2.lab $f.edg2.sc -side left pack $f.edg2.undoedge -expand yes # NORMALS *********************** set f $wd.nb.normals ttk::frame $f.dt -relief groove -borderwidth 3 pack $f.dt -fill x ttk::label $f.dt.lab -text "dirty triangle factor"; ttk::entry $f.dt.ent -width 5 \ -textvariable stldoctor.dirtytrigfact -validatecommand "Ng_SetSTLParameters;my_validate %W -1e9 1e9 %P 3" \ -invalidcommand "my_invalid %W;Ng_SetSTLParameters" -validate focus pack $f.dt.ent $f.dt.lab -side left -expand yes -pady 8 ttk::frame $f.srt -relief groove -borderwidth 3 pack $f.srt -fill x ttk::button $f.srt.bu -text "smooth reverted triangles geometric" -command {Ng_STLDoctor smoothrevertedtrigs; redraw } ttk::entry $f.srt.ent -width 5 \ -textvariable stldoctor.smoothangle -validatecommand "Ng_SetSTLParameters;my_validate %W -1e9 1e9 %P 2" \ -invalidcommand "my_invalid %W;Ng_SetSTLParameters" -validate focus pack $f.srt.ent $f.srt.bu -side left -expand yes -pady 8 ttk::frame $f.bdt -relief groove -borderwidth 3 pack $f.bdt -fill x ttk::button $f.bdt.bu -text "mark dirty triangles" -command {Ng_STLDoctor markdirtytrigs; redraw } ttk::button $f.bdt.bu2 -text "smooth dirty triangles normal" -command {Ng_STLDoctor smoothdirtytrigs; redraw } pack $f.bdt.bu $f.bdt.bu2 -side left -expand yes -pady 8 ttk::frame $f.sno -relief groove -borderwidth 3 pack $f.sno -fill x ttk::frame $f.sno.snoframe -borderwidth 0 #ttk::label $f.sno.labrough -text "rough" #scale $f.sno.scsmooth -orient horizontal -length 100 -from 0 -to 0.8 \ -resolution 0.01 -variable stldoctor.smoothnormalsweight \ -command { Ng_SetSTLParameters } #ttk::label $f.sno.labsmooth -text "smooth" ttk::button $f.sno.smoothnormals -text "smooth normals" -command { Ng_STLDoctor smoothnormals; redraw} ttk::scale $f.sno.snoframe.scale -orient horizontal -length 100 -from 0.0 -to 0.8 \ -variable stldoctor.smoothnormalsweight -takefocus 0 -command "roundscale $f.sno.snoframe.scale 2;Ng_SetSTLParameters" ttk::entry $f.sno.snoframe.entry -textvariable stldoctor.smoothnormalsweight -width 4 \ -validatecommand "Ng_SetSTLParameters;my_validate %W [$f.sno.snoframe.scale cget -from] [$f.sno.snoframe.scale cget -to] %P 2" \ -invalidcommand "my_invalid %W;Ng_SetSTLParameters" -validate focus ttk::label $f.sno.snoframe.labrough -text "rough" ttk::label $f.sno.snoframe.labsmooth -text "smooth" grid $f.sno.snoframe.labrough $f.sno.snoframe.scale $f.sno.snoframe.labsmooth $f.sno.snoframe.entry -sticky nw -padx 4 #pack $f.sno.labrough $f.sno.scsmooth $f.sno.labsmooth $f.sno.smoothnormals -side left -padx 5 pack $f.sno.snoframe $f.sno.smoothnormals -side left -padx 5 -pady 8 ttk::frame $f.no -relief groove -borderwidth 3 pack $f.no -fill x ttk::button $f.no.marknonsmoothnormals -text "mark non-smooth triangles" -command {Ng_STLDoctor marknonsmoothnormals; redraw} ttk::button $f.no.calcnormals -text "calculate normals from geometry" -command {Ng_STLDoctor calcnormals; redraw} pack $f.no.marknonsmoothnormals $f.no.calcnormals -expand yes -pady 8 # ADVANCED ************************** set f $wd.nb.advanced ttk::frame $f.sc pack $f.sc -fill x ttk::checkbutton $f.sc.bu -text "spiral check" \ -variable stldoctor.spiralcheck \ -command {Ng_STLDoctor;} ttk::checkbutton $f.sc.bu2 -text "cone check" \ -variable stldoctor.conecheck \ -command {Ng_STLDoctor;} pack $f.sc.bu $f.sc.bu2 #tixControl $f.gtol -label "load-geometry tolerance factor" -integer false \ -variable stldoctor.geom_tol_fact \ -options { # entry.width 8 # label.width 30 # label.anchor e #} ttk::spinbox $f.gtol -from 1 -to 20 -textvariable stldoctor.geom_tol_fact -width 8 pack $f.gtol ttk::button $f.adap -text "Apply" -command { .stldoctor_dlg.nb.advanced.gtol invoke Ng_STLDoctor; } pack $f.adap -expand yes # frame $f.gtol -relief groove -borderwidth 3 # pack $f.gtol -fill x # label $f.gtol.lab -text "Geometry-Load-Tolerance-Factor"; # entry $f.gtol.ent -width 5 -relief sunken \ # -textvariable stldoctor.geom_tol_fact # pack $f.gtol.lab $f.gtol.ent -side left -expand yes #******************************* wm withdraw $wd wm geom $wd +100+100 wm deiconify $wd wm title $wd "STL Doctor" focus $wd } } proc meshdoctordialog { } { set w .meshdoc_dlg global meshdoctor.active if {[winfo exists .meshdoc_dlg] == 1} { wm withdraw $w wm deiconify $w focus $w } { toplevel $w set meshdoctor.active 1 Ng_MeshDoctor; ttk::frame $w.vis -relief groove -borderwidth 3 pack $w.vis ttk::checkbutton $w.vis.showfilledtrigs -text "Show filled triangles" \ -variable viewoptions.drawfilledtrigs \ -command { Ng_SetVisParameters; redraw } ttk::checkbutton $w.vis.showedges -text "Show edges" \ -variable viewoptions.drawedges \ -command { Ng_SetVisParameters; redraw } ttk::checkbutton $w.vis.showoutline -text "Show Triangle Outline" \ -variable viewoptions.drawoutline \ -command { Ng_SetVisParameters; redraw } pack $w.vis.showfilledtrigs $w.vis.showoutline $w.vis.showedges ttk::frame $w.markedgedist ttk::label $w.markedgedist.l -text "Mark edge dist: " ttk::spinbox $w.markedgedist.s -from 0 -to 999 -width 5 -increment 1 -validate focus -validatecommand "my_validatespinbox %W %P 0" \ -invalidcommand "my_invalidspinbox %W" -command {Ng_MeshDoctor markedgedist ${meshdoc.markedgedist};redraw} -textvariable meshdoc.markedgedist #pack $f.grading -fill x pack $w.markedgedist.l $w.markedgedist.s -side left # tixControl $w.markedgedist -label "Mark edge dist: " -integer true \ # -min 0 -max 999 \ # -variable meshdoc.markedgedist \ # -options { # entry.width 3 # label.width 20 # label.anchor e # } \ # -command { # Ng_MeshDoctor markedgedist ${meshdoc.markedgedist} # redraw # } pack $w.markedgedist ttk::button $w.deledge -text "Delete marked segments" -command { Ng_MeshDoctor deletemarkedsegments redraw } pack $w.deledge ttk::button $w.close -text "Close" -command { set meshdoctor.active 0; Ng_MeshDoctor; destroy .meshdoc_dlg } pack $w.close -expand yes wm withdraw $w wm geom $w +100+100 wm deiconify $w wm title $w "Mesh Doctor" } } # # Quality viewer # proc qualityviewdialog { show } { set w .qualityview_dlg if {[winfo exists .qualityview_dlg] == 1} { if { $show == 1 } { wm withdraw .qualityview_dlg wm deiconify $w focus $w } { wm withdraw $w } } { toplevel $w set c $w.c canvas $c -relief raised -width 450 -height 300 pack $w.c -side top -fill x set plotFont {Helvetica 12} set smallFont {Helvetica 12} $c create line 100 250 400 250 -width 2 $c create line 100 250 100 50 -width 2 for {set i 0} {$i <= 10} {incr i} { set x [expr {100 + ($i*30)}] $c create line $x 250 $x 245 -width 2 if { [expr {$i % 2}] == 0 } { $c create text $x 254 -text [format %1.1f [expr 0.1*$i]] -anchor n -font $plotFont } } global qualbar global qualbarnull global qualbaraxis for {set i 0} {$i <= 5} {incr i} { set y [expr {250 - ($i*40)}] $c create line 100 $y 105 $y -width 2 # global qualbaraxis($i) set qualbaraxis($i) \ [$c create text 96 $y -text [expr $i*50].0 -anchor e -font $plotFont] } for {set i 0} {$i < 20} {incr i} { set x1 [expr {100 + ($i*15) + 2}] set x2 [expr {$x1+10}] set y [expr {250 - 10 * $i}] # global qualbar($i) set qualbar($i) [$c create rectangle $x1 250 $x2 245 -fill blue] set qualbarnull($i) [$c create text [expr {($x1+$x2)/2}] 245 -text 0 -anchor s -font $smallFont -fill blue] } frame $w.bu pack $w.bu # -fill x ttk::button $w.close -text "Close" \ -command { wm withdraw .qualityview_dlg set viewqualityplot 0 } pack $w.close if { $show == 1 } { wm withdraw $w wm geom $w +100+100 wm deiconify $w wm title $w "Mesh Quality" focus $w } } } # # Quality viewer # proc memusedialog { show } { set w .memuse_dlg if {[winfo exists .memuse_dlg] == 1} { if { $show == 1 } { wm withdraw .memuse_dlg wm deiconify $w focus $w } { wm withdraw $w } } { toplevel $w set c $w.c canvas $c -relief raised -width 600 -height 300 pack $w.c -side top -fill x set plotFont {Helvetica 18} set smallFont {Helvetica 12} global memmark for {set i 0} {$i < 512} { incr i } { set memmark($i) [$c create line [expr 50+$i] 50 [expr 50+$i] 70 -fill blue] } set plotFont {Helvetica 18} set smallFont {Helvetica 12} $c create text 50 90 -text "0 GB" -anchor n -font $plotFont $c create text 178 90 -text "1 GB" -anchor n -font $plotFont $c create text 306 90 -text "2 GB" -anchor n -font $plotFont $c create text 434 90 -text "3 GB" -anchor n -font $plotFont $c create text 562 90 -text "4 GB" -anchor n -font $plotFont ttk::frame $w.bu pack $w.bu # -fill x ttk::button $w.close -text "Close" \ -command { wm withdraw .memuse_dlg set memuseplot 0 } pack $w.close if { $show == 1 } { wm withdraw $w wm geom $w +100+100 wm deiconify $w wm title $w "Memory Usage" focus $w } } } # # STL INFO dialog # proc STLinfodialog { show } { set w .STLinfo_dlg if {[winfo exists .STLinfo_dlg] == 1} { if { $show == 1 } { wm withdraw .STLinfo_dlg wm deiconify $w focus $w } { wm withdraw $w } } { toplevel $w set c $w.c canvas $c -relief raised -width 450 -height 300 pack $w.c -side top -fill x set plotFont {Helvetica 18} set smallFont {Helvetica 12} $c create line 100 250 400 250 -width 2 $c create line 100 250 100 50 -width 2 ttk::frame $w.bu pack $w.bu # -fill x ttk::button $w.close -text "Close" \ -command { wm withdraw .STLinfo_dlg #set STLinfoopen 0 } pack $w.close if { $show == 1 } { wm withdraw $w wm geom $w +100+100 wm deiconify $w wm title $w "STL Geometry Info" focus $w } } } proc logwindow { } { set w .logwindow if {[winfo exists .logwindow] == 1} { wm withdraw $w wm deiconify $w focus $w } { toplevel $w text $w.edit -yscroll "$w.scrolly set" -setgrid 1 -height 12 scrollbar $w.scrolly -command "$w.edit yview" pack $w.edit -side left -fill both -expand 1 pack $w.scrolly -side left -fill both -expand 0 .logwindow.edit insert end "Netgen Log Window\n" wm withdraw $w wm geom $w +100+100 wm deiconify $w wm title $w "Netgen Log" focus $w } } # logwindow # Opens a window with a table. tablevar is a list, the first entry is the title, the second the number of rows, the third the number of columns, # then the entries follow. proc printtable { tablevar } { set w newtcltable while {[winfo exists .$w] == 1} {set w 1$w} set w .$w toplevel $w for {set i 0} {$i < [lindex $tablevar 2]} { incr i } { frame $w.col$i for {set j 0} {$j < [lindex $tablevar 1]} { incr j } { frame $w.col$i.row$j message $w.col$i.row$j.txt -aspect 10000000 -text [lindex $tablevar [expr 3+[lindex $tablevar 2]*$j+$i]] pack $w.col$i.row$j.txt pack $w.col$i.row$j -side top } pack $w.col$i -side left } wm withdraw $w wm geom $w +200+100; wm deiconify $w wm title $w [lindex $tablevar 0] focus $w } set latestwarning 0 proc printwarning { textvar } { global latestwarning set latestwarning $textvar set w warning while {[winfo exists .$w] == 1} {set w 1$w} set w .$w toplevel $w message $w.mes -aspect 2000 -text "WARNING:\n$textvar" ttk::button $w.done -text "Done" -command "destroy $w" pack $w.mes pack $w.done wm withdraw $w wm deiconify $w wm title $w "Warning" focus $w } proc printlatestwarning { } { global latestwarning if {$latestwarning != 0} {printwarning $latestwarning} } # proc runtestdialog { } { # source $::ngdir/ngshell.tcl # set w .runtest_dlg # if {[winfo exists .runtest_dlg] == 1} { # wm withdraw $w # wm deiconify $w # focus $w # } { # toplevel $w # # in2d testing # # frame $w.in2dframe # pack $w.in2dframe # set in2dlogfile "" # tixLabelEntry $w.in2dframe.ent -label "in2d log-file: console if empty" \ # -labelside top \ # -options { # entry.textVariable in2dlogfile # entry.width 35 # label.width 25 # label.anchor w # } # button $w.in2dframe.btn -text "Browse" -command { # set types { { "Log file" {.log} } } # set in2dlogfile [tk_getOpenFile -filetypes $types -initialfile $in2dlogfile] # } # button $w.in2dframe.test -text "Test in2d meshing" -command { ngtest in2d $in2dlogfile } # pack $w.in2dframe.test -side left -anchor s -padx 4 -pady 4 # pack $w.in2dframe.ent -side left -expand yes -fill x -anchor s -padx 4 -pady 4 # pack $w.in2dframe.btn -side left -anchor s -padx 4 -pady 4 # # geo testing # # frame $w.geoframe # pack $w.geoframe # set geologfile "" # tixLabelEntry $w.geoframe.ent -label "geo log-file: console if empty" \ # -labelside top \ # -options { # entry.textVariable geologfile # entry.width 35 # label.width 25 # label.anchor w # } # button $w.geoframe.btn -text "Browse" -command { # set types { { "Log file" {.log} } } # set geologfile [tk_getOpenFile -filetypes $types -initialfile $geologfile] # } # button $w.geoframe.test -text "Test geo meshing" -command { ngtest geo $geologfile } # pack $w.geoframe.test -side left -anchor s -padx 4 -pady 4 # pack $w.geoframe.ent -side left -expand yes -fill x -anchor s -padx 4 -pady 4 # pack $w.geoframe.btn -side left -anchor s -padx 4 -pady 4 # # stl testing # # frame $w.stlframe # pack $w.stlframe # set stllogfile "" # tixLabelEntry $w.stlframe.ent -label "stl log-file: console if empty" \ # -labelside top \ # -options { # entry.textVariable stllogfile # entry.width 35 # label.width 25 # label.anchor w # } # button $w.stlframe.btn -text "Browse" -command { # set types { { "Log file" {.log} } } # set stllogfile [tk_getOpenFile -filetypes $types -initialfile $stllogfile] # } # button $w.stlframe.test -text "Test stl meshing" -command { ngtest stl $stllogfile } # pack $w.stlframe.test -side left -anchor s -padx 4 -pady 4 # pack $w.stlframe.ent -side left -expand yes -fill x -anchor s -padx 4 -pady 4 # pack $w.stlframe.btn -side left -anchor s -padx 4 -pady 4 # # pde testing # # frame $w.pdeframe # pack $w.pdeframe # set pdelogfile "" # tixLabelEntry $w.pdeframe.ent -label "pde log-file: console if empty" \ # -labelside top \ # -options { # entry.textVariable pdelogfile # entry.width 35 # label.width 25 # label.anchor w # } # button $w.pdeframe.btn -text "Browse" -command { # set types { { "Log file" {.log} } } # set pdelogfile [tk_getOpenFile -filetypes $types -initialfile $pdelogfile] # } # button $w.pdeframe.test -text "Test ngsolve pde's" -command { ngtest pde $pdelogfile } # pack $w.pdeframe.test -side left -anchor s -padx 4 -pady 4 # pack $w.pdeframe.ent -side left -expand yes -fill x -anchor s -padx 4 -pady 4 # pack $w.pdeframe.btn -side left -anchor s -padx 4 -pady 4 # wm title $w "Testing" # focus .runtest_dlg # } # } netgen-6.2.1804/ng/menustat.tcl0000644000175000017500000010427513272137567014766 0ustar kurtkurtif { $tcl_platform(os) eq "Linux" && [tk scaling] > 1.5 } { # On some Linux systems, the scaling setting is only applied after # overwriting some default font settings. # This is a workaround to scale up fonts on high resolution displays. font create ngFont -family Helvetica option add *font ngFont ttk::style configure "." -font ngFont } # netgen menus: menu .ngmenu -tearoff 0 -relief raised -bd 2 . configure -menu .ngmenu .ngmenu add cascade -label "File" -menu .ngmenu.file -underline 0 .ngmenu add cascade -label "Geometry" -menu .ngmenu.geometry -underline 0 .ngmenu add cascade -label "Mesh" -menu .ngmenu.mesh -underline 0 .ngmenu add cascade -label "View" -menu .ngmenu.view -underline 0 .ngmenu add cascade -label "Refinement" -menu .ngmenu.meshsize -underline 5 if { $userlevel == 3} { .ngmenu add cascade -label "Special" -menu .ngmenu.special -underline 3 } .ngmenu add cascade -label "Help" -menu .ngmenu.help -underline 0 ##################################################### # # # Menu File # # # ##################################################### menu .ngmenu.file .ngmenu.file add command -label "Load Geometry..." -accelerator "" \ -command { set types { {"All Geometry types" { .stl .stlb .step .stp .geo .in2d .igs .iges .brep .sat} } {"IGES Geometry" {.igs .iges} } {"BREP OpenCascade Geometry" {.brep} } {"STL Geometry" {.stl} } {"Binary STL Geometry" {.stlb} } {"STEP Geometry" {.step .stp} } {"Geometry file" {.geo} } {"2D Geometry" {.in2d } } } set ACISavailable [Ng_ACISCommand isACISavailable] if {$ACISavailable == "yes" } { lappend types {"ACIS Geometry" {.sat} } } if {[catch { set file [tk_getOpenFile -filetypes $types -initialdir $dirname -typevariable loadgeomtypevar] }]} { set file [tk_getOpenFile -filetypes $types -initialdir $dirname] } if {$file != ""} { AddRecentFile $file Ng_LoadGeometry $file Ng_ParseGeometry # if { [Ng_STLInfo status]=="ERROR" } { # tk_messageBox -message "STL ERROR: \n [Ng_STLInfo statustext]" -type ok # } set selectvisual geometry Ng_SetVisParameters redraw wm title . [concat "$progname - " $file] set dirname [file dirname $file] set basefilename [file tail [file rootname $file]] if { $hasocc == "yes" } { rebuildoccdialog } } } .ngmenu.file add command -label "Save Geometry..." \ -command { set occgeometryloaded [Ng_OCCCommand isoccgeometryloaded] puts $occgeometryloaded if {$occgeometryloaded == 1 } { set types { {"IGES Geometry file" {.igs} } {"STEP Geometry file" {.stp} } {"STL Geometry file" {.stl} } {"STL BIN Geometry file" {.stlb} } } } { set types { {"STL Geometry file" {.stl} } {"STL BIN Geometry file" {.stlb} } } } set ACISavailable [Ng_ACISCommand isACISavailable] puts $ACISavailable if {$ACISavailable == "yes" } { lappend types {"ACIS Geometry" {.sat} } } set file [tk_getSaveFile -filetypes $types -initialdir $dirname -initialfile $basefilename ] if {$file != ""} { Ng_SaveGeometry $file } } .ngmenu.file add cascade -label "Recent Files" -menu .ngmenu.file.recent menu .ngmenu.file.recent -tearoff 0 proc AddRecentFile { filename } { global progname global dirname catch { [.ngmenu.file.recent delete $filename] } .ngmenu.file.recent insert 0 command -label $filename \ -command "AddRecentFile {$filename}; Ng_LoadGeometry {$filename}; Ng_ParseGeometry; set selectvisual geometry; Ng_SetVisParameters; redraw; wm title . [concat \" $progname - $filename \"]; set dirname {[file dirname $filename]}; set basefilename {[file tail [file rootname $filename]]}; rebuildoccdialog;" if { [.ngmenu.file.recent index last] >= 6 } { .ngmenu.file.recent delete last } saveinifile; } loadinifile; .ngmenu.file add separator .ngmenu.file add command -label "Load Mesh..." -accelerator "" \ -command { set types { {"Mesh file" {.vol .vol.gz} } } set file [tk_getOpenFile -filetypes $types -defaultextension ".vol"] if {$file != ""} { AddRecentMeshFile $file; Ng_LoadMesh $file; set selectvisual mesh Ng_SetVisParameters redraw Ng_ReadStatus; # Ng_MeshSizeFromSurfaceMesh wm title . [concat "$progname - " $file] set dirname [file dirname $file] set basefilename [file tail [file rootname $file]] } } # astrid .ngmenu.file add cascade -label "Recent Meshes" -menu .ngmenu.file.recentmesh menu .ngmenu.file.recentmesh proc AddRecentMeshFile { filename } { global progname global dirname catch { [.ngmenu.file.recentmesh delete $filename] } .ngmenu.file.recentmesh insert 0 command -label $filename \ -command "AddRecentMeshFile {$filename}; Ng_LoadMesh {$filename}; set selectvisual mesh; Ng_SetVisParameters; redraw; wm title . [concat \" $progname - $filename \"]; set dirname {[file dirname $filename]}; set basefilename {[file tail [file rootname $filename]]}; rebuildoccdialog;" if { [.ngmenu.file.recentmesh index last] >= 6 } { .ngmenu.file.recentmesh delete last } savemeshinifile; } loadmeshinifile; # astrid ende .ngmenu.file add command -label "Save Mesh..." -accelerator "" \ -command { set types { {"Mesh file" {.vol .vol.gz} } } set file [tk_getSaveFile -filetypes $types -defaultextension ".vol.gz" -initialfile $basefilename -initialdir $dirname ] if {$file != ""} { Ng_SaveMesh $file } AddRecentMeshFile $file; } .ngmenu.file add command -label "Merge Mesh..." \ -command { set types { {"Mesh file" {.vol} } } set file [tk_getOpenFile -filetypes $types -defaultextension ".vol"] if {$file != ""} { Ng_MergeMesh $file; set selectvisual mesh Ng_SetVisParameters redraw Ng_ReadStatus; } } .ngmenu.file add command -label "Import Mesh..." \ -command { set types { {"Neutral format" {.mesh .emt} } {"Surface mesh format" {.surf} } {"Universal format" {.unv} } {"Olaf format" {.emt} } {"TET format" {.tet} } {"Pro/ENGINEER neutral format" {.fnf} } } set file [tk_getOpenFile -filetypes $types ] if {$file != ""} { Ng_ImportMesh $file set selectvisual mesh Ng_SetVisParameters redraw Ng_ReadStatus; } } .ngmenu.file add command -label "Export Mesh..." \ -command { # global meshexportformats foreach exportformat $meshexportformats { if { [lindex $exportformat 0] == $exportfiletype } { set extension [lindex $exportformat 1] } } if { $exportfiletype == "Elmer Format"} { set file [file nativename [tk_chooseDirectory -title "Elmer Mesh Export - Select Directory"]] } elseif { $exportfiletype == "OpenFOAM 1.5+ Format"} { set file [file nativename [tk_chooseDirectory -title "OpenFOAM 1.5+ Mesh Export - Select Case Directory"]] } elseif { $exportfiletype == "OpenFOAM 1.5+ Compressed"} { set file [file nativename [tk_chooseDirectory -title "OpenFOAM 1.5+ Mesh Export - Select Case Directory"]] } else { # set file [tk_getSaveFile -filetypes "{ \"$exportfiletype\" {$extension} }" ] set file [tk_getSaveFile -filetypes "{ \"$exportfiletype\" {*}}" ] } if {$file != ""} { Ng_ExportMesh $file $exportfiletype } } .ngmenu.file add cascade -label "Export Filetype" -menu .ngmenu.file.filetype menu .ngmenu.file.filetype .ngmenu.file add separator .ngmenu.file add command -label "Save Solution..." \ -command { set types { {"Solution File" {.sol} } {"VTK File" {.vtk} } } set file [tk_getSaveFile -filetypes $types ] if {$file != ""} { Ng_SaveSolution $file } } #-defaultextension ".sol" ] .ngmenu.file add command -label "Import Solution..." \ -command { set types { {"Solution File" {.sol} } } set file [tk_getOpenFile -filetypes $types -defaultextension ".sol" ] if {$file != ""} { Ng_ImportSolution $file set selectvisual solution Ng_SetVisParameters redraw } } set demostarttime [clock clicks -millisecond] set stopdemo 0 proc demoredraw { } { global demostarttime global stopdemo set curtime [clock clicks -millisecond] set result [ Ng_DemoSetTime [expr $curtime - $demostarttime] ] redraw global videoactive if { $videoactive == 1 } { puts "addframe" Ng_VideoClip .ndraw addframe } if { $result == 0 && $stopdemo == 0 } { after 1 { demoredraw } } } .ngmenu.file add command -label "Show Demo..." \ -command { set types { {"Demo File" {.dem} } } set file [tk_getOpenFile -filetypes $types -defaultextension ".dem" ] if {$file != ""} { Ng_ShowDemo $file set demostarttime [clock clicks -millisecond] set stopdemo 0 demoredraw } } .ngmenu.file add separator .ngmenu.file add command -label "Snapshot..." \ -command { set types { {"JPG file" {.jpg} } {"GIF file" {.gif} } {"PPM file" {.ppm} } } set file [tk_getSaveFile -filetypes $types] # -defaultextension ".ppm"] if {$file != ""} { Ng_SnapShot .ndraw $file } } .ngmenu.file add cascade -label "Video clip" -menu .ngmenu.file.video menu .ngmenu.file.video set videoactive 0 .ngmenu.file.video add command -label "start..." \ -command { set types { {"MPG file" {.mpg} } } set file [tk_getSaveFile -filetypes $types] if {$file != ""} { Ng_VideoClip .ndraw init $file global videoactive set videoactive 1 } } .ngmenu.file.video add command -label "add frame..." \ -command {Ng_VideoClip .ndraw addframe } .ngmenu.file.video add command -label "one cycle" \ -command { set visoptions.redrawperiodic 1 for { set j 0 } { $j < 100 } { incr j } { puts "j = $j" Ng_Vis_Set time [expr (1000 * $j / 100)] redraw Ng_VideoClip .ndraw addframe after 200 } } .ngmenu.file.video add command -label "finalize..." \ -command { Ng_VideoClip .ndraw finalize global videoactive set videoactive 0 } .ngmenu.file add command -label "Save Options" \ -command { saveoptions } .ngmenu.file add separator ## herbert tcl load menu # .ngmenu.file add command -label "Run tests ..." \ \# -command { runtestdialog } ## # .ngmenu.file add separator .ngmenu.file add command -label "Quit" -accelerator "" \ -command { puts "Thank you for using $progname"; if { [catch { unload libngsolve[info sharedlibextension] ngsolve } result ] } { # puts "cannot unload ngsolve" # puts "error: $result" } after cancel { timer2 } Ng_Exit; destroy . } # exit ##################################################### # # # Menu Mesh # # # ##################################################### menu .ngmenu.mesh .ngmenu.mesh add command -label "Generate Mesh" -accelerator "" \ -command { set selectvisual mesh Ng_SetVisParameters Ng_GenerateMesh ${meshoptions.firststep} ${meshoptions.laststep} Ng_ReadStatus redraw } .ngmenu.mesh add command -label "Stop Meshing" \ -command { Ng_StopMeshing } .ngmenu.mesh add command -label "Meshing Options..." \ -command meshingoptionsdialog .ngmenu.mesh add separator .ngmenu.mesh add command -label "Delete Mesh" \ -command { Ng_New mesh; Ng_ReadStatus; redraw } .ngmenu.mesh add command -label "Delete Vol Mesh" \ -command { Ng_DeleteVolMesh; Ng_ReadStatus; redraw } .ngmenu.mesh add command -label "Mesh Info" \ -command { set dim [Ng_MeshInfo dim] set np [Ng_MeshInfo np] set ne [Ng_MeshInfo ne] set nse [Ng_MeshInfo nse] set nseg [Ng_MeshInfo nseg] set bbox [Ng_MeshInfo bbox] tk_messageBox -message "Dimension: $dim\nPoints: $np\nElements: $ne\nSurface Els: $nse\nSegments: $nseg\nxmin [lindex $bbox 0] xmax [lindex $bbox 1]\nymin [lindex $bbox 2] ymax [lindex $bbox 3]\nzmin [lindex $bbox 4] zmax [lindex $bbox 5]" } .ngmenu.mesh add command -label "Mesh Quality" \ -command { set inplanemin 0 set inplanemax 0 set betplanemin 0 set betplanemax 0 Ng_MeshQuality inplanemin inplanemax betplanemin betplanemax puts "Triangle angles : $inplanemin - $inplanemax" puts "Tet angles : $betplanemin - $betplanemax" tk_messageBox -message "Triangle angles : $inplanemin - $inplanemax \n Tet angles : $betplanemin - $betplanemax" } # .ngmenu.mesh add command -label "Quality Plot" \ # -command { qualityviewdialog 1 } .ngmenu.mesh add command -label "Check Surface Mesh" \ -command { Ng_CheckSurfaceMesh } .ngmenu.mesh add command -label "Check Volume Mesh" \ -command { Ng_CheckVolumeMesh } .ngmenu.mesh add command -label "Edit Boundary Conditions..." \ -command { bcpropdialog } if { $userlevel == 3 } { .ngmenu.mesh add command -label "Mesh Doctor..." \ -command { meshdoctordialog } } .ngmenu.mesh add command -label "METIS Mesh Partitioning..." \ -command { METISdialog } .ngmenu.mesh add separator .ngmenu.mesh add command -label "Analyze Geometry" \ -command { Ng_GenerateMesh ag ag; Ng_ReadStatus; redraw } .ngmenu.mesh add command -label "Mesh Edges" \ -command { Ng_GenerateMesh me me; Ng_ReadStatus; redraw } .ngmenu.mesh add command -label "Mesh Surface" \ -command { set selectvisual mesh; Ng_SetVisParameters; \ Ng_GenerateMesh ms ms; Ng_ReadStatus; redraw } .ngmenu.mesh add command -label "Optimize Surface" \ -command { Ng_GenerateMesh os os cmsmSm; redraw } .ngmenu.mesh add cascade -label "Surface Optim. Step" -menu .ngmenu.mesh.surfoptstep menu .ngmenu.mesh.surfoptstep .ngmenu.mesh.surfoptstep add command -label "Mesh Smoothing" \ -command { Ng_GenerateMesh os os m; redraw} .ngmenu.mesh.surfoptstep add command -label "Edge swapping (topologic)" \ -command { Ng_GenerateMesh os os s; redraw} .ngmenu.mesh.surfoptstep add command -label "Edge swapping (metric)" \ -command { Ng_GenerateMesh os os S; redraw} .ngmenu.mesh.surfoptstep add command -label "Combine points" \ -command { Ng_GenerateMesh os os c; redraw} .ngmenu.mesh add separator .ngmenu.mesh add command -label "Mesh Volume" \ -command { Ng_GenerateMesh mv mv; Ng_ReadStatus } .ngmenu.mesh add command -label "Optimize Volume" \ -command { Ng_GenerateMesh ov ov; Ng_ReadStatus } .ngmenu.mesh add command -label "Smooth Opt Volume" \ -command { Ng_GenerateMesh ov ov m; Ng_ReadStatus } .ngmenu.mesh add command -label "Smooth Opt Volume Jacobian" \ -command { Ng_GenerateMesh ov ov j; Ng_ReadStatus } ##################################################### # # # Menu Geometry # # # ##################################################### menu .ngmenu.geometry ##################################################### # # # Menu View # # # ##################################################### menu .ngmenu.view .ngmenu.view add command -label "Zoom all" \ -command { Ng_ZoomAll; redraw } .ngmenu.view add command -label "Center" \ -command { Ng_Center; redraw } .ngmenu.view add command -label "x-y plane" \ -command { Ng_StandardRotation xy; redraw } .ngmenu.view add command -label "y-x plane" \ -command { Ng_StandardRotation yx; redraw } .ngmenu.view add command -label "x-z plane" \ -command { Ng_StandardRotation xz; redraw } .ngmenu.view add command -label "z-x plane" \ -command { Ng_StandardRotation zx; redraw } .ngmenu.view add command -label "y-z plane" \ -command { Ng_StandardRotation yz; redraw } .ngmenu.view add command -label "z-y plane" \ -command { Ng_StandardRotation zy; redraw } .ngmenu.view add command -label "Viewing Options..." \ -command { viewingoptionsdialog; redraw } .ngmenu.view add command -label "Clipping Plane..." \ -command { clippingdialog; redraw } .ngmenu.view add command -label "Solution Data..." \ -command { visual_dialog; redraw } .ngmenu.view add checkbutton -variable viewqualityplot \ -label "Quality Plot" \ -command { qualityviewdialog $viewqualityplot } .ngmenu.view add checkbutton -variable memuseplot \ -label "Memory Usage" \ -command { memusedialog $memuseplot } ##################################################### # # # Menu Refinement # # # ##################################################### # # Mesh size menu # menu .ngmenu.meshsize .ngmenu.meshsize add command -label "Refine uniform" \ -command { Ng_Refine; Ng_HighOrder ${options.elementorder}; Ng_ReadStatus; redraw } .ngmenu.meshsize add command -label "Second Order" \ -command { Ng_SecondOrder; Ng_ReadStatus; redraw } .ngmenu.meshsize add command -label "Validate Second Order" \ -command { Ng_ValidateSecondOrder; Ng_ReadStatus; redraw } .ngmenu.meshsize add command -label "High Order" \ -command { Ng_HighOrder ${options.elementorder}; Ng_ReadStatus; redraw } .ngmenu.meshsize add separator .ngmenu.meshsize add command -label "Refinement Dialog..." \ -command { refinementdialog } .ngmenu.meshsize add command -label "Load Meshsize..." \ -command { set types { {"Meshsize file" {.msz} } } set file [tk_getOpenFile -filetypes $types] if {$file != ""} { Ng_LoadMeshSize $file; } } .ngmenu.meshsize add command -label "MS from Surf Mesh" \ -command { Ng_MeshSizeFromSurfaceMesh } if { $userlevel == 3 } { .ngmenu.meshsize add command -label "Singular point ms" \ -command { Ng_SingularPointMS; } .ngmenu.meshsize add command -label "Singular edge ms" \ -command { Ng_SingularEdgeMS; } .ngmenu.meshsize add separator set bisectfilename ""; .ngmenu.meshsize add command -label "Bisection" \ -command { Ng_ReadStatus; set oldnp 0; set newnp $status_np; # Ng_BisectCopyMesh; # Ng_Split2Tets; Ng_ReadStatus; while { $oldnp < $newnp } { # if { $level == 0 } { # Ng_ExportMesh feppmesh.vol fepp; # } { # Ng_ExportMesh feppmesh$level feppml # } set level [expr $level+1] if { $bisectfilename == ""} { Ng_Bisect; } else { Ng_Bisect $bisectfilename; } # Ng_HighOrder ${options.elementorder} "noparallel" # Ng_Split2Tets; Ng_ReadStatus; redraw; if { $bisectfilename == ""} { set oldnp $newnp; set newnp $status_np; puts "oldnp $oldnp newnp $newnp"; } else { set oldnp $newnp; } } } # -command { Ng_Bisect; Ng_ReadStatus; redraw } # -command { exec netgen abc >outfile 2>errfile; Ng_ReadStatus; redraw } } .ngmenu.meshsize add command -label "Load Refinement Info..." \ -command { set types { {"Refinement info" {.refine} }} set bisectfilename [tk_getOpenFile -filetypes $types] } .ngmenu.meshsize add command -label "Z-Refinement" \ -command { Ng_ZRefinement 2; Ng_ReadStatus; redraw } # .ngmenu.meshsize add command -label "hp-Refinement" \ \# -command { Ng_HPRefinement 4; Ng_ReadStatus; redraw } .ngmenu.meshsize add cascade -label "hp-Refinement" -menu .ngmenu.meshsize.hpref menu .ngmenu.meshsize.hpref .ngmenu.meshsize.hpref add command -label "1 Level" \ -command { Ng_HPRefinement 1; Ng_ReadStatus; redraw } .ngmenu.meshsize.hpref add command -label "2 Levels" \ -command { Ng_HPRefinement 2; Ng_ReadStatus; redraw } .ngmenu.meshsize.hpref add command -label "3 Levels" \ -command { Ng_HPRefinement 3; Ng_ReadStatus; redraw } .ngmenu.meshsize.hpref add command -label "4 Levels" \ -command { Ng_HPRefinement 4; Ng_ReadStatus; redraw } .ngmenu.meshsize.hpref add command -label "5 Levels" \ -command { Ng_HPRefinement 5; Ng_ReadStatus; redraw } .ngmenu.meshsize.hpref add command -label "6 Levels" \ -command { Ng_HPRefinement 6; Ng_ReadStatus; redraw } .ngmenu.meshsize.hpref add command -label "7 Levels" \ -command { Ng_HPRefinement 7; Ng_ReadStatus; redraw } .ngmenu.meshsize.hpref add command -label "8 Levels" \ -command { Ng_HPRefinement 8; Ng_ReadStatus; redraw } .ngmenu.meshsize.hpref add command -label "9 Levels" \ -command { Ng_HPRefinement 9; Ng_ReadStatus; redraw } .ngmenu.meshsize.hpref add command -label "10 Levels" \ -command { Ng_HPRefinement 10; Ng_ReadStatus; redraw } .ngmenu.meshsize add command -label "Split to Tets" \ -command { Ng_Split2Tets; Ng_ReadStatus; redraw } ##################################################### # # # Menu Special # # # ##################################################### menu .ngmenu.special .ngmenu.special add command -label "Prismatic Boundary Layer" \ -command { Ng_GenerateBoundaryLayer; redraw } .ngmenu.special add command -label "Insert virtual boundary layer" \ -command { Ng_InsertVirtualBL; redraw } .ngmenu.special add command -label "Cut off and combine with other" \ -command { set types { {"Mesh file" {.vol} } } set file [tk_getOpenFile -filetypes $types] if {$file != ""} { Ng_CutOffAndCombine $file; } redraw } .ngmenu.special add command -label "Helmholtz Mesh grading" \ -command { Ng_HelmholtzMesh; } .ngmenu.special add cascade -label "Colour-based boundary conditions" -menu .ngmenu.special.colbndcond menu .ngmenu.special.colbndcond .ngmenu.special.colbndcond add command -label "Inspect Colours in mesh" \ -command { currmeshcoloursdialog } .ngmenu.special.colbndcond add separator .ngmenu.special.colbndcond add command -label "Automatic Assignment" \ -command { Ng_AutoColourBcProps auto; redraw } .ngmenu.special.colbndcond add separator set ocffile [file join ${ngdir} netgen.ocf]; .ngmenu.special.colbndcond add command -label "Select Colour Profile file" \ -command { set types { {"Colour Profile file" {.ocf} } } set ocffile [tk_getOpenFile -filetypes $types] if {$ocffile == ""} { set ocffile [file join ${ngdir} netgen.ocf]; } } .ngmenu.special.colbndcond add command -label "Profile based Assignment" \ -command { Ng_AutoColourBcProps profile ${ocffile}; redraw } # menu .mbar.stl.menu # .mbar.stl.menu add command -label "STL options" \ # -command { stloptionsdialog; } #.mbar.stl.menu add command -label "STL Doctor" \ # -command { stldoctordialog; } ##################################################### # # # Menu Help # # # ##################################################### menu .ngmenu.help # .ngmenu.help add command -label "Ng Help..." \ \# -command { help_main } # .ngmenu.view add checkbutton -variable showsensitivehelp \ # -label "Sensitive Help" \ # -command { sensitivehelpdialog $showsensitivehelp } .ngmenu.view add checkbutton -label "Help Line" -variable showhelpline \ -command { if { $showhelpline == 1} { pack .helpline -before .statbar -side bottom -fill x -padx 3p } { pack forget .helpline } } .ngmenu.help add command -label "About..." \ -command { tk_messageBox -message "This is NETGEN \nmainly written by \nJoachim Schoeberl \nthanks to \nRobert Gaisbauer, Johannes Gerstmayr, Philippose Rajan" } # tk_menuBar .mbar .mbar.file .mbar.mesh .mbar.test .mbar.help # focus .mbar ##################################################### # # # Button bar # # # ##################################################### ttk::frame .bubar # -relief raised #-relief raised -bd 2 pack .bubar -side top -fill x ttk::button .bubar.testb -text "Test" -command { Ng_SaveGeometry } ttk::button .bubar.surfm -text "Generate Mesh" -command \ { .ngmenu.mesh invoke "Generate Mesh"; # set selectvisual mesh; # Ng_SetVisParameters; # Ng_GenerateMesh ${meshoptions.firststep} ${meshoptions.laststep} # redraw } ttk::button .bubar.stopm -text "Stop" -command \ { # Ng_StopMeshing; set multithread_terminate 1; set stopdemo 1; } ttk::button .bubar.exitb -text "Quit" \ -command { set ans [tk_messageBox -title "Quit Netgen?" -message "Do you really want to quit Netgen?" -type yesno -default "no" -icon question] if { $ans == "yes" } { .ngmenu.file invoke "Quit"; } } pack .bubar.exitb .bubar.surfm .bubar.stopm -side left #button .bubar.scan -text "Scan" \ # -command { Ng_ParseGeometry; set selectvisual geometry; Ng_SetVisParameters; redraw } ttk::button .bubar.zoomall -text "Zoom All" \ -command { Ng_ZoomAll; redraw } ttk::button .bubar.center -text "Center" \ -command { Ng_Center; redraw } # tk_optionMenu .bubar.modesel drawmode "rotate" "move " "zoom " # tixOptionMenu .bubar.modesel \ # -options { # label.width 0 # label.anchor e # menubutton.width 6 # } \ # -variable drawmode # .bubar.modesel add command rotate -label Rotate # .bubar.modesel add command move -label Move # .bubar.modesel add command zoom -label Zoom ttk::menubutton .bubar.modesel -menu .bubar.modesel.menu -text "" -width 6 menu .bubar.modesel.menu -tearoff 0 .bubar.modesel.menu add command -label "Rotate" -command "set drawmode \"rotate\" ;.bubar.modesel configure -text \"Rotate\"" .bubar.modesel.menu add command -label "Move" -command "set drawmode \"move\" ;.bubar.modesel configure -text \"Move\"" .bubar.modesel.menu add command -label "Zoom" -command "set drawmode \"zoom\" ;.bubar.modesel configure -text \"Zoom\"" .bubar.modesel.menu invoke "Rotate" set viewvals { geometry specpoints mesh solution} if { $userlevel == 3} { set viewvals { geometry mesh specpoints surfmeshing modelview solution} } set viewvallabs(cross) "Cross" set viewvallabs(geometry) "Geometry" set viewvallabs(mesh) "Mesh" set viewvallabs(specpoints) "Edges" set viewvallabs(surfmeshing) "Mesh Gen" set viewvallabs(modelview) "Modeller" set viewvallabs(solution) "Solution" # tixOptionMenu .bubar.selview \ # -options { # label.width 0 # label.anchor e # menubutton.width 10 # } \ # foreach viewv $viewvals { # .bubar.selview add command $viewv -label $viewvallabs($viewv) # } # .bubar.selview config -variable selectvisual # .bubar.selview config -command { Ng_SetVisParameters; redraw } # pack .bubar.modesel -side right # pack forget .bubar.modesel pack .bubar.center .bubar.zoomall -side right # pack .bubar.selview -side right .ngmenu.view add checkbutton -variable viewrotatebutton \ -label "Enable LeftButton Selection" \ -command { if { $viewrotatebutton } { pack .bubar.modesel -side right } { pack forget .bubar.modesel } } menu .bubar.selviewmenu ttk::menubutton .bubar.selview1 -menu .bubar.selviewmenu -text "Geometry" foreach viewv $viewvals { .bubar.selviewmenu add command -label $viewvallabs($viewv) -command \ ".bubar.selview1 configure -text \"$viewvallabs($viewv)\" ; set selectvisual $viewv ; Ng_SetVisParameters; redraw" } pack .bubar.selview1 -side right # .bubar.selviewmenu invoke $viewvallabs($selectvisual) trace add variable selectvisual write selvis_monitor proc selvis_monitor { name args } { global selectvisual viewvallabs .bubar.selviewmenu invoke $viewvallabs($selectvisual) } # set selectvisual solution ##################################################### # # # Status bar # # # ##################################################### ttk::label .helpline -text "None" pack forget .helpline -side bottom -fill x ttk::frame .statbar -relief flat # -bd 2 pack .statbar -side bottom -fill x ttk::label .statbar.ptslabel -text " Points: " ttk::label .statbar.ptsval -textvariable status_np ttk::label .statbar.elslabel -text " Elements: " ttk::label .statbar.elsval -textvariable status_ne ttk::label .statbar.selslabel -text " Surf Elements: " ttk::label .statbar.selsval -textvariable status_nse # label .statbar.memlabel -text " Mem: " # label .statbar.memval -textvariable mem_moveable ttk::label .statbar.task -textvariable status_task pack .statbar.ptslabel .statbar.ptsval -side left -ipady 3p pack .statbar.elslabel .statbar.elsval -side left -ipady 3p pack .statbar.selslabel .statbar.selsval -side left -ipady 3p # if { $userlevel == 3 } { # pack .statbar.memlabel .statbar.memval -side left -ipady 3p # } #tixMeter .statbar.per -value 0 -text 0% ttk::progressbar .statbar.per -value 0 -maximum 1 #.statbar.per configure -fillcolor blue pack .statbar.per -side right pack .statbar.task -side right -ipady 4 set qualbaraxis(0) 0 set qualbar(0) 0 set qualbarnull(0) 0 proc timer2 { } { global status_np global status_ne global status_nse global multithread_running global multithread_redraw global status_working global status_task global status_percent global status_tetqualclasses Ng_ReadStatus if { $multithread_redraw == 1 } { # non-blocking redraw set multithread_redraw 0; redraw; global videoactive if { $videoactive == 1 } { puts "addframe" Ng_VideoClip .ndraw addframe } } if { $multithread_redraw == 2 } { # blocking redraw redraw; set multithread_redraw 0; global videoactive if { $videoactive == 1 } { puts "addframe" Ng_VideoClip .ndraw addframe } after 1 { timer2 } return } # global mem_moveable # set mem_moveable [Ng_MemInfo moveable] .statbar.per configure -value [expr $status_percent/100] # -text [format %2.1f [expr 0.1*int(10*$status_percent)]]% if { $multithread_running } { pack .statbar.per -side right -before .statbar.task -padx 6 } { pack forget .statbar.per } # tet quality if {[winfo exists .qualityview_dlg] == 1} { global qualbar global qualbarnull global qualbaraxis set maxval 0 for {set i 0} {$i < 20} {incr i} { if {[lindex $status_tetqualclasses $i] > $maxval} { set maxval [lindex $status_tetqualclasses $i] } } set ubound 1 while { $ubound < $maxval } { set ubound [expr {10 * $ubound}] } if { $ubound/5 > $maxval } { set ubound [expr $ubound/5] } if { $ubound/2 > $maxval } { set ubound [expr $ubound/2] } for {set i 1} {$i <= 5} {incr i} { # global qualbaraxis($i) set value [expr { $i * $ubound / 5 }] .qualityview_dlg.c dchars $qualbaraxis($i) 0 end .qualityview_dlg.c insert $qualbaraxis($i) end $value } for {set i 0} {$i < 20} {incr i} { set x1 [expr {100 + ($i*15) + 2}] set x2 [expr {$x1+10}] set nbrs [lindex $status_tetqualclasses $i] set y [expr (249 - (200 * $nbrs / $ubound ) )] # global qualbar($i) .qualityview_dlg.c coords $qualbar($i) $x1 250 $x2 $y # global qualbarnull($i) if { $nbrs == 0 } { .qualityview_dlg.c itemconfigure $qualbarnull($i) -text 0 } { .qualityview_dlg.c itemconfigure $qualbarnull($i) -text "" } } } if {[winfo exists .memuse_dlg] == 1} { global memmark set usemb [Ng_MemInfo usedmb] for {set i 0} {$i < [string length $usemb] } {incr i} { if { [string index $usemb $i] == 0 } { .memuse_dlg.c coords $memmark($i) [expr 50+$i] 68 [expr 50+$i] 70 } { .memuse_dlg.c coords $memmark($i) [expr 50+$i] 50 [expr 50+$i] 70 } } } after 10 { timer2 } } # after 1000 { timer2 } timer2 proc bgerror { error } { global errorInfo userlevel if { $userlevel == 3} { puts "ERROR: $error" puts "errinfo: $errorInfo" } tk_messageBox -title "Error Message" -message $error -type ok } proc smh2 { menuitem } { if {[catch {$menuitem entrycget active -label} name]} { set name " " } show_menu_help $name update idletasks } bind .ngmenu <> { smh2 %W } bind .ngmenu.file <> { smh2 %W } bind .ngmenu.geometry <> { smh2 %W } bind .ngmenu.mesh <> { smh2 %W } bind .ngmenu.view <> { smh2 %W } bind .ngmenu.meshsize <> { smh2 %W } bind .ngmenu.special <> { smh2 %W } bind .ngmenu.help <> { smh2 %W } # command bindings bind . { .ngmenu.file invoke "Quit" } bind . { .ngmenu.file invoke "Load Geometry..." } ; bind . { .ngmenu.file invoke "Load Mesh..." } ; bind . { .ngmenu.file invoke "Save Mesh..." } ; bind . { .ngmenu.file activate "Recent Files" } ; bind .

{ newprimitivedialog } ; # bind .

{ editprimitivedialog } bind . { newsoliddialog } bind . { .ngmenu.mesh invoke "Generate Mesh" } ; netgen-6.2.1804/ng/onetcl.py0000644000175000017500000000277013272137567014255 0ustar kurtkurtimport glob import functools # load all tcl files in current folder tclfiles = {} for fname in glob.glob('*.tcl'): tclfiles[fname] = open(fname,'r').read() # do a topological sorting (such that if a.tcl is including b.tcl, # a will come after b in the sorted list) fnames = list(tclfiles.keys()) fnames.sort(key=functools.cmp_to_key( lambda x,y: tclfiles[x].find('/'+y) )) # replace all occurrences of 'source bla.tcl' with the code of bla.tcl for f in fnames: for g in fnames: if(tclfiles[f].find('/'+g) >= 0): tclfiles[f] = tclfiles[f].replace("source ${ngdir}/"+g, tclfiles[g]) # write a cpp file containing the result of ng.tcl onetclcpp = open("onetcl.cpp",'w') onetclcpp.write('const char * ngscript[] = {""'+'\n'); # make sure to remove comments (and if lines with comments end with '\' also the next line(s) ) skip_next = False # flag to indicate that the next line should be removed for line in tclfiles["ng.tcl"].split('\n'): line = line.strip() if len(line)==0: skip_next = False continue if skip_next: # skip as long as lines end with '\' skip_next = line[-1]=='\\' continue if(line.find('#')>-1): # comment found (not necessarily the whole line) skip_next = line[-1]=='\\' line = line[:line.find('#')] if len(line)>0: s = ',"' + line.replace('\\', r'\\').replace('"', r'\"') + '\\n"\n' onetclcpp.write(s) onetclcpp.write(', nullptr\n'); onetclcpp.write('};\n'); onetclcpp.close(); netgen-6.2.1804/ng/variables.tcl0000644000175000017500000006757713272137567015113 0ustar kurtkurt# netgen global tcl-variables set drawmode rotate set selectvisual geometry set dirname . set loadgeomtypevar "All Geometry types" set basefilename filename set meshoptions.fineness 3 set meshoptions.firststep ag set meshoptions.laststep ov set options.memory 0 set options.localh 1 set options.delaunay 1 set options.checkoverlap 1 set options.checkoverlappingboundary 0 set options.checkchartboundary 1 set options.startinsurface 0 set options.blockfill 1 set options.debugmode 0 set options.dooptimize 1 set options.parthread 1 set options.elsizeweight 0.2 set options.secondorder 0 set options.elementorder 1 set options.quad 0 set options.try_hexes 0 set options.inverttets 0 set options.inverttrigs 0 set options.autozrefine 0 set options.meshsize 1000 set options.minmeshsize 0 set options.curvaturesafety 2 set options.segmentsperedge 2 set options.meshsizefilename "" set options.badellimit 175 set options.optsteps2d 3 set options.optsteps3d 5 set options.opterrpow 2 set options.grading 0.5 set options.printmsg 2 set debug.slowchecks 0 set debug.debugoutput 0 set debug.haltexistingline 0 set debug.haltoverlap 0 set debug.haltsuccess 0 set debug.haltnosuccess 0 set debug.haltlargequalclass 0 set debug.haltsegment 0 set debug.haltnode 0 set debug.haltface 0 set debug.haltfacenr 0 set debug.haltsegmentp1 0 set debug.haltsegmentp2 0 set geooptions.drawcsg 1 set geooptions.detail 0.001 set geooptions.accuracy 1e-6 set geooptions.facets 20 set geooptions.minx -1000 set geooptions.miny -1000 set geooptions.minz -1000 set geooptions.maxx 1000 set geooptions.maxy 1000 set geooptions.maxz 1000 set viewqualityplot 0 set memuseplot 0 set viewrotatebutton 0 set showsensitivehelp 0 set showhelpline 0 set viewoptions.specpointvlen 0.3 set viewoptions.light.amb 0.3 set viewoptions.light.diff 0.7 set viewoptions.light.spec 1 set viewoptions.light.locviewer 0 set viewoptions.mat.shininess 50 set viewoptions.mat.transp 0.3 set viewoptions.colormeshsize 0 set viewoptions.whitebackground 1 set viewoptions.drawcoordinatecross 1 set viewoptions.drawcolorbar 1 set viewoptions.drawnetgenlogo 1 set viewoptions.stereo 0 set viewoptions.shrink 1 set viewoptions.drawfilledtrigs 1 set viewoptions.drawedges 0 set viewoptions.drawbadels 0 set viewoptions.centerpoint 0 set viewoptions.drawelement 0 set viewoptions.drawoutline 1 set viewoptions.drawtets 0 set viewoptions.drawtetsdomain 0 set viewoptions.drawprisms 0 set viewoptions.drawpyramids 0 set viewoptions.drawhexes 0 set viewoptions.drawidentified 0 set viewoptions.drawpointnumbers 0 set viewoptions.drawedgenumbers 0 set viewoptions.drawfacenumbers 0 set viewoptions.drawelementnumbers 0 set viewoptions.drawdomainsurf 0 set viewoptions.drawededges 1 set viewoptions.drawedpoints 1 set viewoptions.drawedpointnrs 0 set viewoptions.drawedtangents 0 set viewoptions.drawededgenrs 0 set viewoptions.drawmetispartition 0 set viewoptions.drawcurveproj 0 set viewoptions.drawcurveprojedge 1 set viewoptions.clipping.nx 0 set viewoptions.clipping.ny 1 set viewoptions.clipping.nz 0 set viewoptions.clipping.dist 0 set viewoptions.clipping.dist2 0 set viewoptions.clipping.enable 0 set viewoptions.clipping.onlydomain 0 set viewoptions.clipping.notdomain 0 set viewoptions.usecentercoords 0 set viewoptions.centerx 0 set viewoptions.centery 0 set viewoptions.centerz 0 set viewoptions.drawspecpoint 0 set viewoptions.specpointx 0 set viewoptions.specpointy 0 set viewoptions.specpointz 0 set stloptions.showtrias 0 set stloptions.showfilledtrias 1 set stloptions.showedges 1 set stloptions.showmarktrias 0 set stloptions.showactivechart 0 set stloptions.yangle 30 set stloptions.contyangle 20 set stloptions.edgecornerangle 60 set stloptions.chartangle 15 set stloptions.outerchartangle 70 set stloptions.usesearchtree 0 set stloptions.chartnumber 1 set stloptions.charttrignumber 1 set stloptions.chartnumberoffset 0 set stloptions.atlasminh 0.1 set stloptions.resthsurfcurvfac 2 set stloptions.resthsurfcurvenable 0 set stloptions.resthatlasfac 2 set stloptions.resthatlasenable 1 set stloptions.resthchartdistfac 1.2 set stloptions.resthchartdistenable 1 set stloptions.resthlinelengthfac 0.5 set stloptions.resthlinelengthenable 1 set stloptions.resthcloseedgefac 1 set stloptions.resthcloseedgeenable 1 set stloptions.resthminedgelen 0.01 set stloptions.resthminedgelenenable 1 set stloptions.resthedgeanglefac 1 set stloptions.resthedgeangleenable 0 set stloptions.resthsurfmeshcurvfac 1 set stloptions.resthsurfmeshcurvenable 0 set stloptions.recalchopt 1 set stldoctor.drawmeshededges 1 set stldoctor.geom_tol_fact 0.000001 set stldoctor.useexternaledges 0 set stldoctor.showfaces 0 set stldoctor.conecheck 1 set stldoctor.spiralcheck 1 set stldoctor.selecttrig 0 set stldoctor.selectmode 1 set stldoctor.longlinefact 0 set stldoctor.showexcluded 1 set stldoctor.edgeselectmode 0 set stldoctor.nodeofseltrig 1 set stldoctor.showtouchedtrigchart 0 set stldoctor.showedgecornerpoints 0 set stldoctor.showmarkedtrigs 1 set stldoctor.dirtytrigfact 0.01 set stldoctor.smoothangle 90 set stldoctor.selectwithmouse 1 set stldoctor.showvicinity 0 set stldoctor.vicinity 50 set stldoctor.smoothnormalsweight 0.2 set occoptions.showvolumenr 0 set occoptions.showsurfaces 1 set occoptions.showedges 1 set occoptions.showsolidnr 0 set occoptions.showsolidnr2 0 set occoptions.visproblemfaces 0 set occoptions.zoomtohighlightedentity 0 set occoptions.deflection 1 set occoptions.tolerance 1e-3 set occoptions.fixsmalledges 1 set occoptions.fixspotstripfaces 1 set occoptions.sewfaces 1 set occoptions.makesolids 1 set occoptions.splitpartitions 0 set meshdoctor.active 0 set meshdoctor.markedgedist 1 # variablenname mit punkt problematisch! set status_np 0 set status_ne 0 set status_nse 0 set status_working " " set status_task " " set status_percent 0 set status_filename 0 set status_tetqualclasses "10 20 30 40 10 20 30 40 10 20 30 40 10 20 30 40 10 20 30 40" set exportfiletype "Neutral Format" set preproc.facenr 0 set preproc.selectmode query set preproc.numtrig 0 set mem_moveable 0 set multithread_pause 0 set multithread_testmode 0 set multithread_redraw 0 set multithread_drawing 0 set multithread_terminate 0 set multithread_running 0 set level 0 set tablesforoutput {} set optlist { options.localh options.delaunay options.checkoverlap options.startinsurface options.blockfill options.dooptimize options.elsizeweight options.meshsize options.minmeshsize options.curvaturesafety options.optsteps2d options.optsteps3d options.secondorder } set visoptions.usetexture 1 set visoptions.invcolor 0 set visoptions.imaginary 0 set visoptions.lineartexture 0 set visoptions.numtexturecols 16 set visoptions.showclipsolution 1 set visoptions.showsurfacesolution 0 set visoptions.drawfieldlines 0 set visoptions.drawpointcurves 1 set visoptions.numfieldlines 100 set visoptions.fieldlinesrandomstart 0 set visoptions.fieldlinesstartarea box set visoptions.fieldlinesstartareap1x 1 set visoptions.fieldlinesstartareap1y 1 set visoptions.fieldlinesstartareap1z 1 set visoptions.fieldlinesstartareap2x 0 set visoptions.fieldlinesstartareap2y 0 set visoptions.fieldlinesstartareap2z 0 set visoptions.fieldlinesstartface -1 set visoptions.fieldlinesfilename none set visoptions.fieldlinestolerance 0.0005 set visoptions.fieldlinesrktype crungekutta set visoptions.fieldlineslength 0.5 set visoptions.fieldlinesmaxpoints 500 set visoptions.fieldlinesthickness 0.0015 set visoptions.fieldlinesvecfunction none set visoptions.fieldlinesphase 0 set visoptions.fieldlinesonlyonephase 1 set visoptions.lineplotfile empty set visoptions.lineplotsource file set visoptions.lineplotusingx 0 set visoptions.lineplotusingy 1 set visoptions.lineplotautoscale 1 set visoptions.lineplotxmin 0 set visoptions.lineplotxmax 1 set visoptions.lineplotymin 0 set visoptions.lineplotymax 1 set visoptions.lineplotcurrentnum -1 set visoptions.lineplotinfos "" set visoptions.lineplotselected none set visoptions.lineplotselector "" set visoptions.lineplotcolor red set visoptions.lineplotsizex 500 set visoptions.lineplotsizey 400 set visoptions.lineplotselectedeval 0 set visoptions.lineplotdatadescr "column1 column2 column3" set visoptions.lineplotxcoordselector "" set visoptions.lineplotycoordselector "" set visoptions.evaluatefilenames none set visoptions.evaluatefiledescriptions none set visoptions.clipsolution none set visoptions.scalfunction none set visoptions.vecfunction none set visoptions.evaluate abs set visoptions.gridsize 20 set visoptions.xoffset 0 set visoptions.yoffset 0 set visoptions.autoscale 1 set visoptions.redrawperiodic 0 set visoptions.logscale 0 set visoptions.mminval 0 set visoptions.mmaxval 1 set visoptions.isolines 0 set visoptions.isosurf 0 set visoptions.subdivisions 1 set visoptions.numiso 10 set visoptions.autoredraw 0 set visoptions.autoredrawtime 2 set visoptions.simulationtime 0 set visoptions.multidimcomponent 0 # deform by vector function set visoptions.deformation 0 set visoptions.scaledeform1 1 set visoptions.scaledeform2 1 set parallel_netgen 0 set optfilename [file join $nguserdir ng.opt] set inifilename [file join $nguserdir ng.ini] set meshinifilename [file join $nguserdir ngmesh.ini] global env if { [llength [array names env NG_OPT]] == 1 } { if { [string length $env(NG_OPT)] > 0 } { set optfilename $env(NG_OPT) } } if { [file exists $optfilename] == 1 } { set datei [open $optfilename r] while { [gets $datei line] >= 0 } { set [lindex $line 0] [lindex $line 1] } close $datei } { puts "optfile $optfilename does not exist - using default values" } proc saveoptions { } { uplevel 1 { set file $optfilename if {$file != ""} { set datei [open $file w] puts $datei "dirname ${dirname}" puts $datei "loadgeomtypevar \"${loadgeomtypevar}\"" puts $datei "exportfiletype \"${exportfiletype}\"" puts $datei "meshoptions.fineness ${meshoptions.fineness}" puts $datei "meshoptions.firststep ${meshoptions.firststep}" puts $datei "meshoptions.laststep ${meshoptions.laststep}" puts $datei "options.localh ${options.localh}" puts $datei "options.delaunay ${options.delaunay}" puts $datei "options.checkoverlap ${options.checkoverlap}" puts $datei "options.checkchartboundary ${options.checkchartboundary}" puts $datei "options.startinsurface ${options.startinsurface}" puts $datei "options.blockfill ${options.blockfill}" puts $datei "options.debugmode ${options.debugmode}" puts $datei "options.dooptimize ${options.dooptimize}" puts $datei "options.parthread ${options.parthread}" puts $datei "options.elsizeweight ${options.elsizeweight}" puts $datei "options.secondorder ${options.secondorder}" puts $datei "options.elementorder ${options.elementorder}" # puts $datei "options.memory ${options.memory}" puts $datei "options.quad ${options.quad}" puts $datei "options.try_hexes ${options.try_hexes}" puts $datei "options.inverttets ${options.inverttets}" puts $datei "options.inverttrigs ${options.inverttrigs}" puts $datei "options.autozrefine ${options.autozrefine}" puts $datei "options.meshsize ${options.meshsize}" puts $datei "options.minmeshsize ${options.minmeshsize}" puts $datei "options.curvaturesafety ${options.curvaturesafety}" puts $datei "options.segmentsperedge ${options.segmentsperedge}" puts $datei "options.meshsizefilename ${options.meshsizefilename}" puts $datei "options.badellimit ${options.badellimit}" puts $datei "options.optsteps2d ${options.optsteps2d}" puts $datei "options.optsteps3d ${options.optsteps3d}" puts $datei "options.opterrpow ${options.opterrpow}" puts $datei "options.grading ${options.grading}" puts $datei "options.printmsg ${options.printmsg}" puts $datei "geooptions.drawcsg ${geooptions.drawcsg}" puts $datei "geooptions.detail ${geooptions.detail}" puts $datei "geooptions.accuracy ${geooptions.accuracy}" puts $datei "geooptions.facets ${geooptions.facets}" puts $datei "geooptions.minx ${geooptions.minx}" puts $datei "geooptions.miny ${geooptions.miny}" puts $datei "geooptions.minz ${geooptions.minz}" puts $datei "geooptions.maxx ${geooptions.maxx}" puts $datei "geooptions.maxy ${geooptions.maxy}" puts $datei "geooptions.maxz ${geooptions.maxz}" puts $datei "viewoptions.specpointvlen ${viewoptions.specpointvlen}" puts $datei "viewoptions.light.amb ${viewoptions.light.amb}" puts $datei "viewoptions.light.diff ${viewoptions.light.diff}" puts $datei "viewoptions.light.spec ${viewoptions.light.spec}" puts $datei "viewoptions.light.locviewer ${viewoptions.light.locviewer}" puts $datei "viewoptions.mat.shininess ${viewoptions.mat.shininess}" puts $datei "viewoptions.mat.transp ${viewoptions.mat.transp}" puts $datei "viewoptions.colormeshsize ${viewoptions.colormeshsize}" puts $datei "viewoptions.whitebackground ${viewoptions.whitebackground}" puts $datei "viewoptions.drawcolorbar ${viewoptions.drawcolorbar}" puts $datei "viewoptions.drawcoordinatecross ${viewoptions.drawcoordinatecross}" puts $datei "viewoptions.drawnetgenlogo ${viewoptions.drawnetgenlogo}" puts $datei "viewoptions.stereo ${viewoptions.stereo}" puts $datei "viewoptions.drawfilledtrigs ${viewoptions.drawfilledtrigs}" puts $datei "viewoptions.drawedges ${viewoptions.drawedges}" puts $datei "viewoptions.drawbadels ${viewoptions.drawbadels}" puts $datei "viewoptions.centerpoint ${viewoptions.centerpoint}" puts $datei "viewoptions.drawelement ${viewoptions.drawelement}" puts $datei "viewoptions.drawoutline ${viewoptions.drawoutline}" puts $datei "viewoptions.drawtets ${viewoptions.drawtets}" puts $datei "viewoptions.drawprisms ${viewoptions.drawprisms}" puts $datei "viewoptions.drawpyramids ${viewoptions.drawpyramids}" puts $datei "viewoptions.drawhexes ${viewoptions.drawhexes}" puts $datei "viewoptions.drawidentified ${viewoptions.drawidentified}" puts $datei "viewoptions.drawpointnumbers ${viewoptions.drawpointnumbers}" puts $datei "viewoptions.drawededges ${viewoptions.drawededges}" puts $datei "viewoptions.drawedpoints ${viewoptions.drawedpoints}" puts $datei "viewoptions.drawedpointnrs ${viewoptions.drawedpointnrs}" puts $datei "viewoptions.drawedtangents ${viewoptions.drawedtangents}" puts $datei "viewoptions.shrink ${viewoptions.shrink}" puts $datei "stloptions.showtrias ${stloptions.showtrias}" puts $datei "stloptions.showfilledtrias ${stloptions.showfilledtrias}" puts $datei "stloptions.showedges ${stloptions.showedges}" puts $datei "stloptions.showmarktrias ${stloptions.showmarktrias}" puts $datei "stloptions.showactivechart ${stloptions.showactivechart}" puts $datei "stloptions.yangle ${stloptions.yangle}" puts $datei "stloptions.contyangle ${stloptions.contyangle}" puts $datei "stloptions.edgecornerangle ${stloptions.edgecornerangle}" puts $datei "stloptions.chartangle ${stloptions.chartangle}" puts $datei "stloptions.outerchartangle ${stloptions.outerchartangle}" puts $datei "stloptions.usesearchtree ${stloptions.usesearchtree}" puts $datei "stloptions.chartnumber ${stloptions.chartnumber}" puts $datei "stloptions.charttrignumber ${stloptions.charttrignumber}" puts $datei "stloptions.chartnumberoffset ${stloptions.chartnumberoffset}" puts $datei "stloptions.atlasminh ${stloptions.atlasminh}" puts $datei "stloptions.resthsurfcurvfac ${stloptions.resthsurfcurvfac}" puts $datei "stloptions.resthsurfcurvenable ${stloptions.resthsurfcurvenable}" puts $datei "stloptions.resthatlasfac ${stloptions.resthatlasfac}" puts $datei "stloptions.resthatlasenable ${stloptions.resthatlasenable}" puts $datei "stloptions.resthchartdistfac ${stloptions.resthchartdistfac}" puts $datei "stloptions.resthchartdistenable ${stloptions.resthchartdistenable}" puts $datei "stloptions.resthlinelengthfac ${stloptions.resthlinelengthfac}" puts $datei "stloptions.resthlinelengthenable ${stloptions.resthlinelengthenable}" puts $datei "stloptions.resthminedgelen ${stloptions.resthminedgelen}" puts $datei "stloptions.resthminedgelenenable ${stloptions.resthminedgelenenable}" puts $datei "stloptions.resthcloseedgefac ${stloptions.resthcloseedgefac}" puts $datei "stloptions.resthcloseedgeenable ${stloptions.resthcloseedgeenable}" puts $datei "stloptions.resthedgeanglefac ${stloptions.resthedgeanglefac}" puts $datei "stloptions.resthedgeangleenable ${stloptions.resthedgeangleenable}" puts $datei "stloptions.resthsurfmeshcurvfac ${stloptions.resthsurfmeshcurvfac}" puts $datei "stloptions.resthsurfmeshcurvenable ${stloptions.resthsurfmeshcurvenable}" puts $datei "stloptions.recalchopt ${stloptions.recalchopt}" puts $datei "visoptions.subdivisions ${visoptions.subdivisions}" puts $datei "visoptions.autoredraw ${visoptions.autoredraw}" puts $datei "visoptions.autoredrawtime ${visoptions.autoredrawtime}" # trafo options # if exist trafooptions then ... if { [info exists trafooptions.solver] == 1 } { puts $datei "trafooptions.solver ${trafooptions.solver}" puts $datei "trafooptions.levels ${trafooptions.levels}" puts $datei "trafooptions.linits ${trafooptions.linits}" puts $datei "trafooptions.nonlinits ${trafooptions.nonlinits}" puts $datei "trafooptions.stabcurrent ${trafooptions.stabcurrent}" puts $datei "trafooptions.checkcond ${trafooptions.checkcond}" puts $datei "trafooptions.maxdirect ${trafooptions.maxdirect}" puts $datei "trafooptions.secondorder ${trafooptions.secondorder}" puts $datei "trafooptions.homogenizedcore ${trafooptions.homogenizedcore}" puts $datei "trafooptions.ordercore ${trafooptions.ordercore}" puts $datei "trafooptions.simplecurrents ${trafooptions.simplecurrents}" puts $datei "trafooptions.assemblecomplexmatrix ${trafooptions.assemblecomplexmatrix}" puts $datei "trafooptions.meshcasing ${trafooptions.meshcasing}" puts $datei "trafooptions.meshcore ${trafooptions.meshcore}" puts $datei "trafooptions.meshclumps ${trafooptions.meshclumps}" puts $datei "trafooptions.meshshields ${trafooptions.meshshields}" puts $datei "trafooptions.meshcoils ${trafooptions.meshcoils}" puts $datei "trafooptions.bcmdirectory ${trafooptions.bcmdirectory}" puts $datei "trafooptions.lossdensityfile ${trafooptions.lossdensityfile}" } if { [info exists smalltrafomodell.tankheight] == 1 } { puts $datei "smalltrafomodell.tankheight ${smalltrafomodell.tankheight}" puts $datei "smalltrafomodell.tankwidth ${smalltrafomodell.tankwidth}" puts $datei "smalltrafomodell.tanklength ${smalltrafomodell.tanklength}" puts $datei "smalltrafomodell.corewidth ${smalltrafomodell.corewidth}" puts $datei "smalltrafomodell.windowheight ${smalltrafomodell.windowheight}" puts $datei "smalltrafomodell.limbdistance ${smalltrafomodell.limbdistance}" puts $datei "smalltrafomodell.xposcore ${smalltrafomodell.xposcore}" puts $datei "smalltrafomodell.yposcore ${smalltrafomodell.yposcore}" puts $datei "smalltrafomodell.zposcore ${smalltrafomodell.zposcore}" puts $datei "smalltrafomodell.leakagefluxguidethickness ${smalltrafomodell.leakagefluxguidethickness}" puts $datei "smalltrafomodell.leakagefluxguidewidth ${smalltrafomodell.leakagefluxguidewidth}" puts $datei "smalltrafomodell.leakagefluxguidezposition ${smalltrafomodell.leakagefluxguidezposition}" puts $datei "smalltrafomodell.limbcoil.1 ${smalltrafomodell.limbcoil.1}" puts $datei "smalltrafomodell.ricoil.1 ${smalltrafomodell.ricoil.1}" puts $datei "smalltrafomodell.rocoil.1 ${smalltrafomodell.rocoil.1}" puts $datei "smalltrafomodell.zposcoil.1 ${smalltrafomodell.zposcoil.1}" puts $datei "smalltrafomodell.heightcoil.1 ${smalltrafomodell.heightcoil.1}" puts $datei "smalltrafomodell.currentcoil.1 ${smalltrafomodell.currentcoil.1}" puts $datei "smalltrafomodell.nturnscoil.1 ${smalltrafomodell.nturnscoil.1}" puts $datei "smalltrafomodell.limbcoil.2 ${smalltrafomodell.limbcoil.2}" puts $datei "smalltrafomodell.ricoil.2 ${smalltrafomodell.ricoil.2}" puts $datei "smalltrafomodell.rocoil.2 ${smalltrafomodell.rocoil.2}" puts $datei "smalltrafomodell.zposcoil.2 ${smalltrafomodell.zposcoil.2}" puts $datei "smalltrafomodell.heightcoil.2 ${smalltrafomodell.heightcoil.2}" puts $datei "smalltrafomodell.currentcoil.2 ${smalltrafomodell.currentcoil.2}" puts $datei "smalltrafomodell.nturnscoil.2 ${smalltrafomodell.nturnscoil.2}" puts $datei "smalltrafomodell.limbcoil.3 ${smalltrafomodell.limbcoil.3}" puts $datei "smalltrafomodell.ricoil.3 ${smalltrafomodell.ricoil.3}" puts $datei "smalltrafomodell.rocoil.3 ${smalltrafomodell.rocoil.3}" puts $datei "smalltrafomodell.zposcoil.3 ${smalltrafomodell.zposcoil.3}" puts $datei "smalltrafomodell.heightcoil.3 ${smalltrafomodell.heightcoil.3}" puts $datei "smalltrafomodell.currentcoil.3 ${smalltrafomodell.currentcoil.3}" puts $datei "smalltrafomodell.nturnscoil.3 ${smalltrafomodell.nturnscoil.3}" puts $datei "smalltrafomodell.limbcoil.4 ${smalltrafomodell.limbcoil.4}" puts $datei "smalltrafomodell.ricoil.4 ${smalltrafomodell.ricoil.4}" puts $datei "smalltrafomodell.rocoil.4 ${smalltrafomodell.rocoil.4}" puts $datei "smalltrafomodell.zposcoil.4 ${smalltrafomodell.zposcoil.4}" puts $datei "smalltrafomodell.heightcoil.4 ${smalltrafomodell.heightcoil.4}" puts $datei "smalltrafomodell.currentcoil.4 ${smalltrafomodell.currentcoil.4}" puts $datei "smalltrafomodell.nturnscoil.4 ${smalltrafomodell.nturnscoil.4}" puts $datei "smalltrafomodell.limbcoil.5 ${smalltrafomodell.limbcoil.5}" puts $datei "smalltrafomodell.ricoil.5 ${smalltrafomodell.ricoil.5}" puts $datei "smalltrafomodell.rocoil.5 ${smalltrafomodell.rocoil.5}" puts $datei "smalltrafomodell.zposcoil.5 ${smalltrafomodell.zposcoil.5}" puts $datei "smalltrafomodell.heightcoil.5 ${smalltrafomodell.heightcoil.5}" puts $datei "smalltrafomodell.currentcoil.5 ${smalltrafomodell.currentcoil.5}" puts $datei "smalltrafomodell.nturnscoil.5 ${smalltrafomodell.nturnscoil.5}" puts $datei "smalltrafomodell.limbcoil.6 ${smalltrafomodell.limbcoil.6}" puts $datei "smalltrafomodell.ricoil.6 ${smalltrafomodell.ricoil.6}" puts $datei "smalltrafomodell.rocoil.6 ${smalltrafomodell.rocoil.6}" puts $datei "smalltrafomodell.zposcoil.6 ${smalltrafomodell.zposcoil.6}" puts $datei "smalltrafomodell.heightcoil.6 ${smalltrafomodell.heightcoil.6}" puts $datei "smalltrafomodell.currentcoil.6 ${smalltrafomodell.currentcoil.6}" puts $datei "smalltrafomodell.nturnscoil.6 ${smalltrafomodell.nturnscoil.6}" puts $datei "smalltrafomodell.limbtest.1 ${smalltrafomodell.limbtest.1}" puts $datei "smalltrafomodell.heighttest.1 ${smalltrafomodell.heighttest.1}" puts $datei "smalltrafomodell.widthtest.1 ${smalltrafomodell.widthtest.1}" puts $datei "smalltrafomodell.rtest.1 ${smalltrafomodell.rtest.1}" puts $datei "smalltrafomodell.zpostest.1 ${smalltrafomodell.zpostest.1}" puts $datei "smalltrafomodell.edgeradiustest.1 ${smalltrafomodell.edgeradiustest.1}" puts $datei "smalltrafomodell.finetest.1 ${smalltrafomodell.finetest.1}" puts $datei "smalltrafomodell.conductivetest.1 ${smalltrafomodell.conductivetest.1}" puts $datei "smalltrafomodell.limbtest.2 ${smalltrafomodell.limbtest.2}" puts $datei "smalltrafomodell.heighttest.2 ${smalltrafomodell.heighttest.2}" puts $datei "smalltrafomodell.widthtest.2 ${smalltrafomodell.widthtest.2}" puts $datei "smalltrafomodell.rtest.2 ${smalltrafomodell.rtest.2}" puts $datei "smalltrafomodell.zpostest.2 ${smalltrafomodell.zpostest.2}" puts $datei "smalltrafomodell.edgeradiustest.2 ${smalltrafomodell.edgeradiustest.2}" puts $datei "smalltrafomodell.finetest.2 ${smalltrafomodell.finetest.2}" puts $datei "smalltrafomodell.conductivetest.2 ${smalltrafomodell.conductivetest.2}" puts $datei "smalltrafomodell.limbtest.3 ${smalltrafomodell.limbtest.3}" puts $datei "smalltrafomodell.heighttest.3 ${smalltrafomodell.heighttest.3}" puts $datei "smalltrafomodell.widthtest.3 ${smalltrafomodell.widthtest.3}" puts $datei "smalltrafomodell.rtest.3 ${smalltrafomodell.rtest.3}" puts $datei "smalltrafomodell.zpostest.3 ${smalltrafomodell.zpostest.3}" puts $datei "smalltrafomodell.edgeradiustest.3 ${smalltrafomodell.edgeradiustest.3}" puts $datei "smalltrafomodell.finetest.3 ${smalltrafomodell.finetest.3}" puts $datei "smalltrafomodell.conductivetest.3 ${smalltrafomodell.conductivetest.3}" puts $datei "smalltrafomodell.limbtest.4 ${smalltrafomodell.limbtest.4}" puts $datei "smalltrafomodell.heighttest.4 ${smalltrafomodell.heighttest.4}" puts $datei "smalltrafomodell.widthtest.4 ${smalltrafomodell.widthtest.4}" puts $datei "smalltrafomodell.rtest.4 ${smalltrafomodell.rtest.4}" puts $datei "smalltrafomodell.zpostest.4 ${smalltrafomodell.zpostest.4}" puts $datei "smalltrafomodell.edgeradiustest.4 ${smalltrafomodell.edgeradiustest.4}" puts $datei "smalltrafomodell.finetest.4 ${smalltrafomodell.finetest.4}" puts $datei "smalltrafomodell.conductivetest.4 ${smalltrafomodell.conductivetest.4}" puts $datei "smalltrafomodell.nperitest ${smalltrafomodell.nperitest}" puts $datei "smalltrafomodell.filename ${smalltrafomodell.filename}" puts $datei "smalltrafomodell.murlfguide ${smalltrafomodell.murlfguide}" puts $datei "smalltrafomodell.murtestwire ${smalltrafomodell.murtestwire}" puts $datei "smalltrafomodell.murcore ${smalltrafomodell.murcore}" puts $datei "smalltrafomodell.kappalfguide ${smalltrafomodell.kappalfguide}" puts $datei "smalltrafomodell.kappatestwire ${smalltrafomodell.kappatestwire}" puts $datei "smalltrafomodell.kappacore ${smalltrafomodell.kappacore}" } close $datei } } } # the ini file is saved on demand : proc saveinifile { } { global inifilename if {[catch { set datei [open $inifilename w] } result ]} { puts "cannot write file $inifilename" } { for { set i [.ngmenu.file.recent index last] } { $i >= 0 } { incr i -1 } { puts $datei "recentfile \"[.ngmenu.file.recent entrycget $i -label]\"" } close $datei } } proc savemeshinifile { } { global meshinifilename if {[catch { set datei [open $meshinifilename w] } result ]} { puts "cannot write file $meshinifilename" } { for { set i [.ngmenu.file.recentmesh index last] } { $i >= 1 } { incr i -1 } { puts $datei "recentfile \"[.ngmenu.file.recentmesh entrycget $i -label]\"" } close $datei } } proc loadinifile { } { global inifilename if { [file exists $inifilename] == 1 } { set datei [open $inifilename r] while { [gets $datei line] >= 0 } { if {[lindex $line 0] == "recentfile"} { set filename [lindex $line 1] if { [file exists $filename] == 1 } { AddRecentFile $filename } } } close $datei } } proc loadmeshinifile { } { global meshinifilename if { [file exists $meshinifilename] == 1 } { set datei [open $meshinifilename r] while { [gets $datei line] >= 0 } { if {[lindex $line 0] == "recentfile"} { set filename [lindex $line 1] if { [file exists $filename] == 1 } { AddRecentMeshFile $filename } } } close $datei } } set cmdindex {} set hlpindex {} set secindex {} netgen-6.2.1804/ng/netgenpy.cpp0000644000175000017500000000327513272137567014755 0ustar kurtkurt// a wrapper to load netgen-dll into python #include #include <../general/ngpython.hpp> #ifdef WIN32 #define DLL_HEADER __declspec(dllimport) #else #define DLL_HEADER #endif void DLL_HEADER ExportNetgenMeshing(py::module &m); void DLL_HEADER ExportMeshVis(py::module &m); void DLL_HEADER ExportCSG(py::module &m); void DLL_HEADER ExportCSGVis(py::module &m); void DLL_HEADER ExportGeom2d(py::module &m); void DLL_HEADER ExportSTL(py::module &m); void DLL_HEADER ExportSTLVis(py::module &m); #ifdef OCCGEOMETRY void DLL_HEADER ExportNgOCC(py::module &m); #endif // OCCGEOMETRY PYBIND11_MODULE(libngpy, ngpy) { py::module meshing = ngpy.def_submodule("_meshing", "pybind meshing module"); ExportNetgenMeshing(meshing); py::module csg = ngpy.def_submodule("_csg", "pybind csg module"); ExportCSG(csg); py::module geom2d = ngpy.def_submodule("_geom2d", "pybind geom2d module"); ExportGeom2d(geom2d); py::module stl = ngpy.def_submodule("_stl", "pybind stl module"); ExportSTL(stl); #ifdef OCCGEOMETRY py::module NgOCC = ngpy.def_submodule("_NgOCC", "pybind NgOCC module"); ExportNgOCC(NgOCC); #endif // OCCGEOMETRY #ifdef OPENGL py::module meshvis = ngpy.def_submodule("meshvis", "pybind meshvis module"); ExportMeshVis(meshvis); py::module csgvis = ngpy.def_submodule("csgvis", "pybind csgvis module"); ExportCSGVis(csgvis); py::module stlvis = ngpy.def_submodule("stlvis", "pybind stlvis module"); ExportSTLVis(stlvis); #endif // OPENGL } // Force linking libnglib to libnetgenpy namespace netgen { void MyBeep (int i); void MyDummyToForceLinkingNGLib() { MyBeep(0); } } netgen-6.2.1804/ng/gui.cpp0000644000175000017500000000171413272137567013704 0ustar kurtkurt#include #include #include #ifdef WIN32 #define DLL_HEADER_IMPORT __declspec(dllimport) #define DLL_HEADER_EXPORT __declspec(dllexport) #else #define DLL_HEADER_IMPORT #define DLL_HEADER_EXPORT #endif namespace netgen { DLL_HEADER_EXPORT Flags parameters; } DLL_HEADER_EXPORT bool nodisplay = false; extern "C" int Ng_Init (Tcl_Interp * interp); extern "C" int Ng_Vis_Init (Tcl_Interp * interp); extern "C" void Ng_TclCmd(string); // tcl package dynamic load extern "C" int DLL_HEADER_EXPORT Gui_Init (Tcl_Interp * interp) { if (Ng_Init(interp) == TCL_ERROR) { cerr << "Problem in Ng_Init: " << endl; cout << "result = " << Tcl_GetStringResult (interp) << endl; return TCL_ERROR; } if (!nodisplay && Ng_Vis_Init(interp) == TCL_ERROR) { cerr << "Problem in Ng_Vis_Init: " << endl; cout << "result = " << Tcl_GetStringResult (interp) << endl; return TCL_ERROR; } return TCL_OK; } netgen-6.2.1804/ng/sockets.tcl0000644000175000017500000002224213272137567014572 0ustar kurtkurtset sockets.serverport 0 set sockets.serverhost "localhost" set sockets.serverlistbox 0 set sockets.queuelistbox 0 set sockets.currentjoblistbox 0 set sockets.answerlistbox 0 set sockets.myidlabel -1 proc updateserverlist { } { global sockets.serverlistbox set retval [Ng_Socket getserverlist] ${sockets.serverlistbox} delete 0 end for {set i 0} {$i < [llength $retval]} {incr i 3} { ${sockets.serverlistbox} insert end \ [format "%-16s %6i %6i" [lindex $retval $i] [lindex $retval [expr $i+1]] [lindex $retval [expr $i+2]]] } } proc clientsocketdialog { } { set w .clientsock_dlg if {[winfo exists .clientsock_dlg] == 1} { wm withdraw $w wm deiconify $w focus $w } { toplevel $w global sockets.serverhost global sockets.serverport ttk::frame $w.general ttk::frame $w.host ttk::label $w.host.lab -text "Serverhost: " ttk::entry $w.host.name -width 30 -textvariable sockets.serverhost pack $w.host.lab $w.host.name -side left pack $w.host ttk::frame $w.ports ttk::label $w.ports.lab1 -text "Serverport: " ttk::entry $w.ports.statport -width 6 -textvariable sockets.serverport pack $w.ports.lab1 $w.ports.statport -side left pack $w.ports ttk::frame $w.listboxes ttk::frame $w.listboxes.choosesocketframe tixScrolledListBox $w.listboxes.choosesocketframe.choosesocket -scrollbar auto global sockets.serverlistbox set sockets.serverlistbox [$w.listboxes.choosesocketframe.choosesocket subwidget listbox] ${sockets.serverlistbox} configure -width 35 ${sockets.serverlistbox} configure -selectmode browse ${sockets.serverlistbox} configure -exportselection false ttk::button $w.addserver -text "Add ServerSocket" -command { Ng_Socket addserver ${sockets.serverport} ${sockets.serverhost} updateserverlist } pack $w.addserver ttk::label $w.linefeed -text "\n" pack $w.linefeed ttk::frame $w.clientidframe ttk::label $w.clientidframe.lab -text "Client ID: "; global sockets.myidlabel ttk::entry $w.clientidframe.val -width 5 -textvariable sockets.myidlabel ttk::button $w.clientidframe.but -text "Set" -command { set opsel [${sockets.serverlistbox} curselection] if {[llength $opsel] > 0} { set opserver [lindex $opsel 0] Ng_Socket setid $opserver ${sockets.myidlabel} updateserverlist } } pack $w.clientidframe.lab $w.clientidframe.val $w.clientidframe.but -side left pack $w.clientidframe # label $w.clientidlabel -text "\nClient ID: -1" # global sockets.myidlabel # set sockets.myidlabel $w.clientidlabel # pack $w.clientidlabel ttk::label $w.listboxes.choosesocketframe.chooselab -text [format "\n\n%-16s %6s %6s " Host Socket MyID ] pack $w.listboxes.choosesocketframe.chooselab pack $w.listboxes.choosesocketframe.choosesocket ttk::frame $w.listboxes.choosesocketframe.serverbuttons ttk::button $w.listboxes.choosesocketframe.serverbuttons.save -text "Save" -command { Ng_Socket saveserverlist } global sockets.serverlist Ng_Socket loadserverlist updateserverlist ttk::button $w.listboxes.choosesocketframe.serverbuttons.delete -text "Delete" -command { set opsel [${sockets.serverlistbox} curselection] if {[llength $opsel] > 0} { Ng_Socket deletesocket [lindex $opsel 0] updateserverlist } } pack $w.listboxes.choosesocketframe.serverbuttons.save $w.listboxes.choosesocketframe.serverbuttons.delete -side left pack $w.listboxes.choosesocketframe.serverbuttons ttk::frame $w.listboxes.statusframe ttk::label $w.listboxes.statusframe.statuslabel1 -text "\n\njobqueue" tixScrolledListBox $w.listboxes.statusframe.queuestatus -scrollbar auto ttk::label $w.listboxes.statusframe.statuslabel2 -text "\ncurrent job" tixScrolledListBox $w.listboxes.statusframe.currentjobstatus -scrollbar auto ttk::label $w.listboxes.statusframe.statuslabel3 -text "\nanswers" tixScrolledListBox $w.listboxes.statusframe.answers -scrollbar auto global sockets.queuelistbox global sockets.currentjoblistbox global sockets.answerlistbox set sockets.queuelistbox [$w.listboxes.statusframe.queuestatus subwidget listbox] set sockets.currentjoblistbox [$w.listboxes.statusframe.currentjobstatus subwidget listbox] set sockets.answerlistbox [$w.listboxes.statusframe.answers subwidget listbox] ${sockets.queuelistbox} configure -width 50 ${sockets.queuelistbox} configure -height 5 ${sockets.queuelistbox} configure -selectmode browse ${sockets.queuelistbox} configure -exportselection false ${sockets.currentjoblistbox} configure -width 50 ${sockets.currentjoblistbox} configure -height 1 ${sockets.currentjoblistbox} configure -selectmode browse ${sockets.currentjoblistbox} configure -exportselection false ${sockets.answerlistbox} configure -width 50 ${sockets.answerlistbox} configure -height 5 ${sockets.answerlistbox} configure -selectmode browse ${sockets.answerlistbox} configure -exportselection false ttk::button $w.listboxes.statusframe.updatebutton -text "Update" -command { set opsel [${sockets.serverlistbox} curselection] if {[llength $opsel] > 0} { set opserver [lindex $opsel 0] set retval [Ng_Socket sendqueuestatus $opserver] ${sockets.queuelistbox} delete 0 end if {[lindex $retval 0] > 0} { ${sockets.queuelistbox} insert end [format "Blocked for user %i" [lindex $retval 0]] } { ${sockets.queuelistbox} insert end "Not blocked" } for {set i 2} {$i < [expr 2*[lindex $retval 1]+2]} {incr i 2} { ${sockets.queuelistbox} insert end [format "client %i, command %s" [lindex $retval $i] [lindex $retval [expr $i+1]]] } ${sockets.answerlistbox} delete 0 end for {set i [expr 2*[lindex $retval 1]+3]} {$i < [llength $retval]} {incr i 2} { ${sockets.answerlistbox} insert end [format "client %i, command %s" [lindex $retval $i] [lindex $retval [expr $i+1]]] } ${sockets.currentjoblistbox} delete 0 end set retval [Ng_Socket sendjobstatus $opserver] if {[lindex $retval 0] != 0} { ${sockets.currentjoblistbox} insert end [format "client %i, command %s: %s" [lindex $retval 0] [lindex $retval 1] [lrange $retval 2 end]] } } } pack $w.listboxes.statusframe.statuslabel1 $w.listboxes.statusframe.queuestatus \ $w.listboxes.statusframe.statuslabel2 $w.listboxes.statusframe.currentjobstatus \ $w.listboxes.statusframe.statuslabel3 $w.listboxes.statusframe.answers \ $w.listboxes.statusframe.updatebutton pack $w.listboxes.choosesocketframe $w.listboxes.statusframe -side left pack $w.listboxes ttk::label $w.lab1 -text "\n" pack $w.lab1 ttk::frame $w.buttons1 ttk::frame $w.buttons2 ttk::button $w.buttons1.getid -text "Get ID" -command { set opsel [${sockets.serverlistbox} curselection] if {[llength $opsel] > 0} { set opserver [lindex $opsel 0] set retval [Ng_Socket getid $opserver] updateserverlist set sockets.myidlabel $retval } } ttk::button $w.buttons1.killjob -text "Kill Cur. Job" -command { set opsel [${sockets.serverlistbox} curselection] if {[llength $opsel] > 0} { set opserver [lindex $opsel 0] Ng_Socket killcurrentjob $opserver } } ttk::button $w.buttons2.sendmesh -text "Send Mesh" -command { set opsel [${sockets.serverlistbox} curselection] if {[llength $opsel] > 0} { set opserver [lindex $opsel 0] set retval [Ng_Socket sendmesh $opserver] set sockets.meshsent 1 } } ttk::button $w.buttons2.sendpde -text "Send PDE" -command { set opsel [${sockets.serverlistbox} curselection] if {[llength $opsel] > 0} { set opserver [lindex $opsel 0] set retval [NGS_Socket sendpdefile $opserver] } } ttk::button $w.buttons2.solvepde -text "Solve PDE" -command { set opsel [${sockets.serverlistbox} curselection] if {[llength $opsel] > 0} { set opserver [lindex $opsel 0] set retval [NGS_Socket solvepde $opserver] } } ttk::button $w.buttons2.writesol -text "Write Solution" -command { set opsel [${sockets.serverlistbox} curselection] if {[llength $opsel] > 0} { set opserver [lindex $opsel 0] set retval [NGS_Socket writesolution $opserver] } } ttk::button $w.buttons2.sendsol -text "Receive Solution" -command { set opsel [${sockets.serverlistbox} curselection] if {[llength $opsel] > 0} { set opserver [lindex $opsel 0] set retval [NGS_Socket sendsolution $opserver] } } ttk::button $w.buttons1.blockserver -text "Block Server" -command { set opsel [${sockets.serverlistbox} curselection] if {[llength $opsel] > 0} { set opserver [lindex $opsel 0] set retval [Ng_Socket blockserver $opserver] } } ttk::button $w.buttons1.unblockserver -text "UnBlock Server" -command { set opsel [${sockets.serverlistbox} curselection] if {[llength $opsel] > 0} { set opserver [lindex $opsel 0] set retval [Ng_Socket unblockserver $opserver] } } pack $w.buttons1.getid $w.buttons1.blockserver $w.buttons1.unblockserver $w.buttons1.killjob -side left pack $w.buttons2.sendmesh $w.buttons2.sendpde $w.buttons2.solvepde $w.buttons2.writesol $w.buttons2.sendsol -side left pack $w.buttons1 $w.buttons2 wm withdraw $w wm geom $w +200+200 wm deiconify $w wm title $w "Client Socket" focus .options_dlg } } #.ngmenu.special add command -label "Client Socket" \ -command { clientsocketdialog } netgen-6.2.1804/ng/Togl-1.7/0000755000175000017500000000000013272137567013621 5ustar kurtkurtnetgen-6.2.1804/ng/Togl-1.7/index.tcl0000644000175000017500000000245313272137567015440 0ustar kurtkurt#!/bin/sh # the next line restarts using wish \ exec wish "$0" "$@" # $Id: index.tcl,v 1.5 2001/12/20 13:59:31 beskow Exp $ # Togl - a Tk OpenGL widget # Copyright (C) 1996 Brian Paul and Ben Bederson # See the LICENSE file for copyright details. # $Log: index.tcl,v $ # Revision 1.5 2001/12/20 13:59:31 beskow # Improved error-handling in togl.c in case of window creation failure # Added pkgIndex target to makefile # Updated documentation to reflect stubs-interface (Togl.html + new README.stubs) # Added tk8.4a3 headers # Removed obsolete Tk internal headers # # Revision 1.4 2001/01/29 18:11:53 brianp # Jonas Beskow's changes to use Tcl/Tk stub interface # # Revision 1.3 1998/01/24 14:05:50 brianp # added quit button (Ben Bederson) # # Revision 1.2 1997/04/11 01:37:34 brianp # added a timer to rotate the triangles # # Revision 1.1 1996/10/23 23:18:11 brianp # Initial revision # # A Tk/OpenGL widget demo using color-index mode. load [file dirname [info script]]/index[info sharedlibextension] proc setup {} { wm title . "Color index demo" togl .win -width 200 -height 200 -rgba false -double true -privatecmap false -time 10 button .btn -text Quit -command exit pack .win -expand true -fill both pack .btn -expand true -fill both } # Execution starts here! setup netgen-6.2.1804/ng/Togl-1.7/TODO0000644000175000017500000000104513272137567014311 0ustar kurtkurtIn no particular order: ----------------------- stubify C API. replace EPS support with TK photo image support Add command arguments for create, destroy, etc. so there would be a -createcommand option to the togl command (etc.) (and phase out Togl_*Func from the C API) multisampling support (can be worked-around by passing in a pixelformat) add vertical sync control update documentation - update build instructions - update stereo documentation - separate Tcl API from C API - say togl hides window system dependent (glX/wgl/agl) calls netgen-6.2.1804/ng/Togl-1.7/texture.c0000644000175000017500000003467113272137567015500 0ustar kurtkurt/* $Id: texture.c,v 1.10 2005/04/23 07:49:14 gregcouch Exp $ */ /* * Togl - a Tk OpenGL widget * Copyright (C) 1996-1997 Brian Paul and Ben Bederson * See the LICENSE file for copyright details. */ /* * An example Togl program demonstrating texture mapping */ #include "togl.h" #include #include #if defined(TOGL_AGL) || defined(TOGL_AGL_CLASSIC) # include #else # include #endif #include "image.h" /* * The following variable is a special hack that is needed in order for * Sun shared libraries to be used for Tcl. */ #ifdef SUN extern int matherr(); int *tclDummyMathPtr = (int *) matherr; #endif #define CHECKER 0 #define FACE 1 #define TREE 2 static GLenum minfilter = GL_NEAREST_MIPMAP_LINEAR; static GLenum magfilter = GL_LINEAR; static GLenum swrap = GL_REPEAT; static GLenum twrap = GL_REPEAT; static GLenum envmode = GL_MODULATE; static GLubyte polycolor[4] = { 255, 255, 255, 255 }; static int image = CHECKER; static GLfloat coord_scale = 1.0; static GLfloat xrot = 0.0; static GLfloat yrot = 0.0; static GLfloat scale = 1.0; static GLint width, height; static GLboolean blend = GL_FALSE; /* * Load a texture image. n is one of CHECKER, FACE or TREE. */ void texture_image(int n) { if (n == CHECKER) { #define WIDTH 64 #define HEIGHT 64 GLubyte teximage[WIDTH * HEIGHT][4]; int i, j; for (i = 0; i < HEIGHT; i++) { for (j = 0; j < WIDTH; j++) { GLubyte value; value = ((i / 4 + j / 4) % 2) ? 0xff : 0x00; teximage[i * WIDTH + j][0] = value; teximage[i * WIDTH + j][1] = value; teximage[i * WIDTH + j][2] = value; teximage[i * WIDTH + j][3] = value; } } glEnable(GL_TEXTURE_2D); gluBuild2DMipmaps(GL_TEXTURE_2D, 4, WIDTH, HEIGHT, GL_RGBA, GL_UNSIGNED_BYTE, teximage); blend = GL_FALSE; #undef WIDTH #undef HEIGHT } else if (n == FACE) { TK_RGBImageRec *img = tkRGBImageLoad("ben.rgb"); if (img) { glEnable(GL_TEXTURE_2D); glPixelStorei(GL_UNPACK_ALIGNMENT, 1); gluBuild2DMipmaps(GL_TEXTURE_2D, img->sizeZ, img->sizeX, img->sizeY, img->sizeZ == 3 ? GL_RGB : GL_RGBA, GL_UNSIGNED_BYTE, img->data); blend = GL_TRUE; } } else if (n == TREE) { TK_RGBImageRec *img = tkRGBImageLoad("tree2.rgba"); if (img) { glEnable(GL_TEXTURE_2D); glPixelStorei(GL_UNPACK_ALIGNMENT, 1); gluBuild2DMipmaps(GL_TEXTURE_2D, img->sizeZ, img->sizeX, img->sizeY, img->sizeZ == 3 ? GL_RGB : GL_RGBA, GL_UNSIGNED_BYTE, img->data); blend = GL_TRUE; } } else { abort(); } } /* * Togl widget create callback. This is called by Tcl/Tk when the widget has * been realized. Here's where one may do some one-time context setup or * initializations. */ void create_cb(Togl *togl) { glEnable(GL_DEPTH_TEST); /* Enable depth buffering */ texture_image(CHECKER); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, magfilter); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, minfilter); } /* * Togl widget reshape callback. This is called by Tcl/Tk when the widget * has been resized. Typically, we call glViewport and perhaps setup the * projection matrix. */ void reshape_cb(Togl *togl) { width = Togl_Width(togl); height = Togl_Height(togl); glViewport(0, 0, width, height); } static void check_error(char *where) { GLenum error; while (1) { error = glGetError(); if (error == GL_NO_ERROR) { break; } printf("OpenGL error near %s: %s\n", where, gluErrorString(error)); } } /* * Togl widget display callback. This is called by Tcl/Tk when the widget's * contents have to be redrawn. Typically, we clear the color and depth * buffers, render our objects, then swap the front/back color buffers. */ void display_cb(Togl *togl) { float aspect = (float) width / (float) height; check_error("begin display\n"); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); /* Draw background image */ glMatrixMode(GL_PROJECTION); glLoadIdentity(); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glDisable(GL_TEXTURE_2D); glDisable(GL_DEPTH_TEST); glBegin(GL_POLYGON); glColor3f(0.0, 0.0, 0.3); glVertex2f(-1.0, -1.0); glColor3f(0.0, 0.0, 0.3); glVertex2f(1.0, -1.0); glColor3f(0.0, 0.0, 0.9); glVertex2f(1.0, 1.0); glColor3f(0.0, 0.0, 0.9); glVertex2f(-1.0, 1.0); glEnd(); /* draw textured object */ glMatrixMode(GL_PROJECTION); glLoadIdentity(); glFrustum(-aspect, aspect, -1.0, 1.0, 2.0, 10.0); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glTranslatef(0.0, 0.0, -5.0); glScalef(scale, scale, scale); glRotatef(yrot, 0.0, 1.0, 0.0); glRotatef(xrot, 1.0, 0.0, 0.0); glEnable(GL_DEPTH_TEST); glEnable(GL_TEXTURE_2D); glColor4ubv(polycolor); if (blend) { glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glEnable(GL_BLEND); } glBegin(GL_POLYGON); glTexCoord2f(0.0, 0.0); glVertex2f(-1.0, -1.0); glTexCoord2f(coord_scale, 0.0); glVertex2f(1.0, -1.0); glTexCoord2f(coord_scale, coord_scale); glVertex2f(1.0, 1.0); glTexCoord2f(0.0, coord_scale); glVertex2f(-1.0, 1.0); glEnd(); glDisable(GL_BLEND); Togl_SwapBuffers(togl); } /* * Called when a magnification filter radio button is pressed. */ int magfilter_cb(Togl *togl, int argc, CONST84 char *argv[]) { Tcl_Interp *interp = Togl_Interp(togl); if (strcmp(argv[2], "GL_NEAREST") == 0) { magfilter = GL_NEAREST; } else if (strcmp(argv[2], "GL_LINEAR") == 0) { magfilter = GL_LINEAR; } else { Tcl_SetResult(interp, "unknown magnification filter type", TCL_STATIC); return TCL_ERROR; } glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, magfilter); Togl_PostRedisplay(togl); return TCL_OK; } /* * Called when a minification filter radio button is pressed. */ int minfilter_cb(Togl *togl, int argc, CONST84 char *argv[]) { Tcl_Interp *interp = Togl_Interp(togl); if (strcmp(argv[2], "GL_NEAREST") == 0) { minfilter = GL_NEAREST; } else if (strcmp(argv[2], "GL_LINEAR") == 0) { minfilter = GL_LINEAR; } else if (strcmp(argv[2], "GL_NEAREST_MIPMAP_NEAREST") == 0) { minfilter = GL_NEAREST_MIPMAP_NEAREST; } else if (strcmp(argv[2], "GL_LINEAR_MIPMAP_NEAREST") == 0) { minfilter = GL_LINEAR_MIPMAP_NEAREST; } else if (strcmp(argv[2], "GL_NEAREST_MIPMAP_LINEAR") == 0) { minfilter = GL_NEAREST_MIPMAP_LINEAR; } else if (strcmp(argv[2], "GL_LINEAR_MIPMAP_LINEAR") == 0) { minfilter = GL_LINEAR_MIPMAP_LINEAR; } else { Tcl_SetResult(interp, "unknown minification filter type", TCL_STATIC); return TCL_ERROR; } glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, minfilter); Togl_PostRedisplay(togl); return TCL_OK; } int xrot_cb(Togl *togl, int argc, CONST84 char *argv[]) { Tcl_Interp *interp = Togl_Interp(togl); /* error checking */ if (argc != 3) { Tcl_SetResult(interp, "wrong # args: should be \"pathName setXrot ?angle?\"", TCL_STATIC); return TCL_ERROR; } xrot = atof(argv[2]); Togl_PostRedisplay(togl); /* Let result string equal value */ strcpy(interp->result, argv[2]); return TCL_OK; } int yrot_cb(Togl *togl, int argc, CONST84 char *argv[]) { Tcl_Interp *interp = Togl_Interp(togl); /* error checking */ if (argc != 3) { Tcl_SetResult(interp, "wrong # args: should be \"pathName setYrot ?angle?\"", TCL_STATIC); return TCL_ERROR; } yrot = atof(argv[2]); Togl_PostRedisplay(togl); /* Let result string equal value */ strcpy(interp->result, argv[2]); return TCL_OK; } int scale_cb(Togl *togl, int argc, CONST84 char *argv[]) { Tcl_Interp *interp = Togl_Interp(togl); /* error checking */ if (argc != 3) { Tcl_SetResult(interp, "wrong # args: should be \"pathName scale ?value?\"", TCL_STATIC); return TCL_ERROR; } scale = atof(argv[2]); Togl_PostRedisplay(togl); /* Let result string equal value */ strcpy(interp->result, argv[2]); return TCL_OK; } /* * Called when S texture coordinate wrapping is changed. */ int swrap_cb(Togl *togl, int argc, CONST84 char *argv[]) { Tcl_Interp *interp = Togl_Interp(togl); /* error checking */ if (argc != 3) { Tcl_SetResult(interp, "wrong # args: should be \"pathName swrap ?mode?\"", TCL_STATIC); return TCL_ERROR; } if (strcmp(argv[2], "GL_CLAMP") == 0) { swrap = GL_CLAMP; } else if (strcmp(argv[2], "GL_REPEAT") == 0) { swrap = GL_REPEAT; } else { Tcl_SetResult(interp, "unknown wrap value", TCL_STATIC); return TCL_ERROR; } glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, swrap); Togl_PostRedisplay(togl); /* Let result string equal value */ strcpy(interp->result, argv[2]); return TCL_OK; } /* * Called when T texture coordinate wrapping is changed. */ int twrap_cb(Togl *togl, int argc, CONST84 char *argv[]) { Tcl_Interp *interp = Togl_Interp(togl); /* error checking */ if (argc != 3) { Tcl_SetResult(interp, "wrong # args: should be \"pathName twrap ?mode?\"", TCL_STATIC); return TCL_ERROR; } if (strcmp(argv[2], "GL_CLAMP") == 0) { twrap = GL_CLAMP; } else if (strcmp(argv[2], "GL_REPEAT") == 0) { twrap = GL_REPEAT; } else { Tcl_SetResult(interp, "unknown wrap value", TCL_STATIC); return TCL_ERROR; } glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, twrap); Togl_PostRedisplay(togl); /* Let result string equal value */ strcpy(interp->result, argv[2]); return TCL_OK; } /* * Called when the texture environment mode is changed. */ int envmode_cb(Togl *togl, int argc, CONST84 char *argv[]) { Tcl_Interp *interp = Togl_Interp(togl); /* error checking */ if (argc != 3) { Tcl_SetResult(interp, "wrong # args: should be \"pathName envmode ?mode?\"", TCL_STATIC); return TCL_ERROR; } if (strcmp(argv[2], "GL_MODULATE") == 0) { envmode = GL_MODULATE; } else if (strcmp(argv[2], "GL_DECAL") == 0) { envmode = GL_DECAL; } else if (strcmp(argv[2], "GL_BLEND") == 0) { envmode = GL_BLEND; } else { Tcl_SetResult(interp, "unknown texture env mode", TCL_STATIC); return TCL_ERROR; } glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, envmode); Togl_PostRedisplay(togl); /* Let result string equal value */ strcpy(interp->result, argv[2]); return TCL_OK; } /* * Called when the polygon color is changed. */ int polycolor_cb(Togl *togl, int argc, CONST84 char *argv[]) { Tcl_Interp *interp = Togl_Interp(togl); /* error checking */ if (argc != 5) { Tcl_SetResult(interp, "wrong # args: should be \"pathName polycolor ?r? ?g? ?b?\"", TCL_STATIC); return TCL_ERROR; } polycolor[0] = atoi(argv[2]); polycolor[1] = atoi(argv[3]); polycolor[2] = atoi(argv[4]); Togl_PostRedisplay(togl); /* Let result string equal value */ strcpy(interp->result, argv[2]); return TCL_OK; } /* * Called when the texture image is to be changed */ int image_cb(Togl *togl, int argc, CONST84 char *argv[]) { Tcl_Interp *interp = Togl_Interp(togl); /* error checking */ if (argc != 3) { Tcl_SetResult(interp, "wrong # args: should be \"pathName image ?name?\"", TCL_STATIC); return TCL_ERROR; } if (strcmp(argv[2], "CHECKER") == 0) { texture_image(CHECKER); } else if (strcmp(argv[2], "FACE") == 0) { texture_image(FACE); } else if (strcmp(argv[2], "TREE") == 0) { texture_image(TREE); } else { Tcl_SetResult(interp, "unknown texture image", TCL_STATIC); return TCL_ERROR; } Togl_PostRedisplay(togl); /* Let result string equal value */ strcpy(interp->result, argv[2]); return TCL_OK; } /* * Called when the texture coordinate scale is changed. */ int coord_scale_cb(Togl *togl, int argc, CONST84 char *argv[]) { Tcl_Interp *interp = Togl_Interp(togl); float s; /* error checking */ if (argc != 3) { Tcl_SetResult(interp, "wrong # args: should be \"pathName coord_scale ?scale?\"", TCL_STATIC); return TCL_ERROR; } s = atof(argv[2]); if (s > 0.0 && s < 10.0) { coord_scale = s; Togl_PostRedisplay(togl); } /* Let result string equal value */ strcpy(interp->result, argv[2]); return TCL_OK; } TOGL_EXTERN int Texture_Init(Tcl_Interp *interp) { /* * Initialize Tcl, Tk, and the Togl widget module. */ #ifdef USE_TCL_STUBS if (Tcl_InitStubs(interp, "8.1", 0) == NULL) { return TCL_ERROR; } #endif #ifdef USE_TK_STUBS if (Tk_InitStubs(interp, "8.1", 0) == NULL) { return TCL_ERROR; } #endif if (Togl_Init(interp) == TCL_ERROR) { return TCL_ERROR; } /* * Specify the C callback functions for widget creation, display, * and reshape. */ Togl_CreateFunc(create_cb); Togl_DisplayFunc(display_cb); Togl_ReshapeFunc(reshape_cb); /* * Make a new Togl widget command so the Tcl code can set a C variable. */ Togl_CreateCommand("min_filter", minfilter_cb); Togl_CreateCommand("mag_filter", magfilter_cb); Togl_CreateCommand("xrot", xrot_cb); Togl_CreateCommand("yrot", yrot_cb); Togl_CreateCommand("scale", scale_cb); Togl_CreateCommand("swrap", swrap_cb); Togl_CreateCommand("twrap", twrap_cb); Togl_CreateCommand("envmode", envmode_cb); Togl_CreateCommand("polycolor", polycolor_cb); Togl_CreateCommand("image", image_cb); Togl_CreateCommand("coord_scale", coord_scale_cb); /* * Call Tcl_CreateCommand for application-specific commands, if * they weren't already created by the init procedures called above. */ return TCL_OK; } netgen-6.2.1804/ng/Togl-1.7/tkMacOSX.h0000644000175000017500000000210413272137567015420 0ustar kurtkurt/* This file isn't installed by default */ /* * tkMacOSXInt.h -- * * Declarations of Macintosh specific exported variables and procedures. * * Copyright (c) 1995-1997 Sun Microsystems, Inc. * Copyright 2001, Apple Computer, Inc. * * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * * RCS: @(#) $Id: tkMacOSX.h,v 1.1 2005/04/22 02:00:07 gregcouch Exp $ */ #ifndef _TKMAC #define _TKMAC #include #include "tkInt.h" /* * Structures and function types for handling Netscape-type in process * embedding where Tk does not control the top-level */ typedef int (Tk_MacOSXEmbedRegisterWinProc) (int winID, Tk_Window window); typedef GWorldPtr (Tk_MacOSXEmbedGetGrafPortProc) (Tk_Window window); typedef int (Tk_MacOSXEmbedMakeContainerExistProc) (Tk_Window window); typedef void (Tk_MacOSXEmbedGetClipProc) (Tk_Window window, RgnHandle rgn); typedef void (Tk_MacOSXEmbedGetOffsetInParentProc) (Tk_Window window, Point *ulCorner); #include "tkPlatDecls.h" #endif /* _TKMAC */ netgen-6.2.1804/ng/Togl-1.7/README.stubs0000644000175000017500000000230413272137567015637 0ustar kurtkurtThis version of Togl is entirely free from dependencies on Tcl/Tk's internal functions. It uses the public stubs interface, witch means that the same binary works with any stubs-aware wish (i.e. version >= 8.1) It has been tested on Windows NT/2000 and Linux for several Tcl/Tk versions up to 8.4a3. I haven't been able to test the Mac port, it propably needs mending but I can't see why it shouldn't work in principle. Implementation wise, what differs from Togl 1.5 is that Togl_MakeWindowExist() is replaced by Togl_CreateWindow(), a function that gets registered in Tk as a callback for window creation. In Tk/Tk 8.4a3, there is a new public API call Tk_SetClassProcs() to register this callback, but for earlier versions of Tk one needs to do this using some pointer magic. There is a run-time check to determine which method to use, hence the same binary runs on all versions of Wish from 8.1 and up. For this to work you need to compile against the headers from Tcl/Tk 8.4a3 or later, or the binary will only work for Tcl/Tk 8.1-8.4a2. The tk8.4a3 public headers (tk8.4a3.h + tkDecls.h) are included for conveniance, and they are used if the flag -DUSE_LOCAL_TK_H is specified. Jonas Beskow, December 2001netgen-6.2.1804/ng/Togl-1.7/togl.h0000644000175000017500000001431013272137567014736 0ustar kurtkurt/* $Id: togl.h,v 1.28 2005/10/27 07:45:48 gregcouch Exp $ */ /* vi:set sw=4: */ /* * Togl - a Tk OpenGL widget * * Copyright (C) 1996-1998 Brian Paul and Ben Bederson * See the LICENSE file for copyright details. */ #ifndef TOGL_H # define TOGL_H #if !defined TOGL_X11 && !defined TOGL_WGL && !defined TOGL_AGL_CLASSIC && !defined TOGL_AGL # include "togl_ws.h" #endif # ifdef TOGL_WGL # define WIN32_LEAN_AND_MEAN # include # undef WIN32_LEAN_AND_MEAN # if defined(_MSC_VER) # define DllEntryPoint DllMain # endif # endif # ifdef _WIN32 # define TOGL_EXTERN __declspec(dllexport) extern # else # define TOGL_EXTERN extern # endif /* _WIN32 */ # ifdef TOGL_AGL_CLASSIC # ifndef MAC_TCL # define MAC_TCL 1 # endif # endif # ifdef TOGL_AGL # ifndef MAC_OSX_TCL # define MAC_OSX_TCL 1 # endif # ifndef MAC_OSX_TK # define MAC_OSX_TK 1 # endif # endif # include # include # if defined(TOGL_AGL) || defined(TOGL_AGL_CLASSIC) # include # else # include # endif # ifdef __sgi # include # include # endif # ifndef CONST84 # define CONST84 # endif # ifndef NULL # define NULL 0 # endif # ifndef TOGL_USE_FONTS # define TOGL_USE_FONTS 1 /* needed for demos */ # endif # ifdef __cplusplus /* *INDENT-OFF* */ extern "C" { /* *INDENT-ON* */ # endif # define TOGL_VERSION "1.7" # define TOGL_MAJOR_VERSION 1 # define TOGL_MINOR_VERSION 7 /* * "Standard" fonts which can be specified to Togl_LoadBitmapFont() */ # define TOGL_BITMAP_8_BY_13 ((char *) 1) # define TOGL_BITMAP_9_BY_15 ((char *) 2) # define TOGL_BITMAP_TIMES_ROMAN_10 ((char *) 3) # define TOGL_BITMAP_TIMES_ROMAN_24 ((char *) 4) # define TOGL_BITMAP_HELVETICA_10 ((char *) 5) # define TOGL_BITMAP_HELVETICA_12 ((char *) 6) # define TOGL_BITMAP_HELVETICA_18 ((char *) 7) /* * Normal and overlay plane constants */ # define TOGL_NORMAL 1 # define TOGL_OVERLAY 2 struct Togl; typedef struct Togl Togl; typedef void (Togl_Callback) (Togl *togl); typedef int (Togl_CmdProc) (Togl *togl, int argc, CONST84 char *argv[]); TOGL_EXTERN int Togl_Init(Tcl_Interp *interp); /* * Default/initial callback setup functions */ TOGL_EXTERN void Togl_CreateFunc(Togl_Callback *proc); TOGL_EXTERN void Togl_DisplayFunc(Togl_Callback *proc); TOGL_EXTERN void Togl_ReshapeFunc(Togl_Callback *proc); TOGL_EXTERN void Togl_DestroyFunc(Togl_Callback *proc); TOGL_EXTERN void Togl_TimerFunc(Togl_Callback *proc); TOGL_EXTERN void Togl_ResetDefaultCallbacks(void); /* * Change callbacks for existing widget */ TOGL_EXTERN void Togl_SetCreateFunc(Togl *togl, Togl_Callback *proc); TOGL_EXTERN void Togl_SetDisplayFunc(Togl *togl, Togl_Callback *proc); TOGL_EXTERN void Togl_SetReshapeFunc(Togl *togl, Togl_Callback *proc); TOGL_EXTERN void Togl_SetDestroyFunc(Togl *togl, Togl_Callback *proc); TOGL_EXTERN void Togl_SetTimerFunc(Togl *togl, Togl_Callback *proc); /* * Miscellaneous */ TOGL_EXTERN int Togl_Configure(Tcl_Interp *interp, Togl *togl, int argc, const char *argv[], int flags); TOGL_EXTERN void Togl_MakeCurrent(const Togl *togl); TOGL_EXTERN void Togl_CreateCommand(char *cmd_name, Togl_CmdProc *cmd_proc); TOGL_EXTERN void Togl_PostRedisplay(Togl *togl); TOGL_EXTERN void Togl_SwapBuffers(const Togl *togl); /* * Query functions */ TOGL_EXTERN const char *Togl_Ident(const Togl *togl); TOGL_EXTERN int Togl_Width(const Togl *togl); TOGL_EXTERN int Togl_Height(const Togl *togl); TOGL_EXTERN Tcl_Interp *Togl_Interp(const Togl *togl); TOGL_EXTERN Tk_Window Togl_TkWin(const Togl *togl); /* * Color Index mode */ TOGL_EXTERN unsigned long Togl_AllocColor(const Togl *togl, float red, float green, float blue); TOGL_EXTERN void Togl_FreeColor(const Togl *togl, unsigned long index); TOGL_EXTERN void Togl_SetColor(const Togl *togl, unsigned long index, float red, float green, float blue); # if TOGL_USE_FONTS == 1 /* * Bitmap fonts */ TOGL_EXTERN GLuint Togl_LoadBitmapFont(const Togl *togl, const char *fontname); TOGL_EXTERN void Togl_UnloadBitmapFont(const Togl *togl, GLuint fontbase); # endif /* * Overlay functions */ TOGL_EXTERN void Togl_UseLayer(Togl *togl, int layer); TOGL_EXTERN void Togl_ShowOverlay(Togl *togl); TOGL_EXTERN void Togl_HideOverlay(Togl *togl); TOGL_EXTERN void Togl_PostOverlayRedisplay(Togl *togl); TOGL_EXTERN void Togl_OverlayDisplayFunc(Togl_Callback *proc); TOGL_EXTERN int Togl_ExistsOverlay(const Togl *togl); TOGL_EXTERN int Togl_GetOverlayTransparentValue(const Togl *togl); TOGL_EXTERN int Togl_IsMappedOverlay(const Togl *togl); TOGL_EXTERN unsigned long Togl_AllocColorOverlay(const Togl *togl, float red, float green, float blue); TOGL_EXTERN void Togl_FreeColorOverlay(const Togl *togl, unsigned long index); /* * User client data */ TOGL_EXTERN void Togl_ClientData(ClientData clientData); TOGL_EXTERN ClientData Togl_GetClientData(const Togl *togl); TOGL_EXTERN void Togl_SetClientData(Togl *togl, ClientData clientData); # ifdef TOGL_X11 /* * X11-only commands. * Contributed by Miguel A. De Riera Pasenau (miguel@DALILA.UPC.ES) */ TOGL_EXTERN Display *Togl_Display(const Togl *togl); TOGL_EXTERN Screen *Togl_Screen(const Togl *togl); TOGL_EXTERN int Togl_ScreenNumber(const Togl *togl); TOGL_EXTERN Colormap Togl_Colormap(const Togl *togl); # endif # ifdef __sgi /* * SGI stereo-only commands. * Contributed by Ben Evans (Ben.Evans@anusf.anu.edu.au) */ TOGL_EXTERN void Togl_OldStereoDrawBuffer(GLenum mode); TOGL_EXTERN void Togl_OldStereoClear(GLbitfield mask); # endif TOGL_EXTERN void Togl_StereoFrustum(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat near, GLfloat far, GLfloat eyeDist, GLfloat eyeOffset); /* * Generate EPS file. * Contributed by Miguel A. De Riera Pasenau (miguel@DALILA.UPC.ES) */ TOGL_EXTERN int Togl_DumpToEpsFile(const Togl *togl, const char *filename, int inColor, void (*user_redraw) (const Togl *)); # ifdef TOGL_AGL_CLASSIC /* * Mac-specific setup functions */ extern int Togl_MacInit(void); extern int Togl_MacSetupMainInterp(Tcl_Interp *interp); # endif # ifdef __cplusplus /* *INDENT-OFF* */ } /* *INDENT-ON* */ # endif #endif netgen-6.2.1804/ng/Togl-1.7/double.c0000644000175000017500000001534213272137567015244 0ustar kurtkurt/* $Id: double.c,v 1.14 2005/04/23 07:49:13 gregcouch Exp $ */ /* * Togl - a Tk OpenGL widget * Copyright (C) 1996-1997 Brian Paul and Ben Bederson * See the LICENSE file for copyright details. */ #include "togl.h" #include #include /* * The following variable is a special hack that is needed in order for * Sun shared libraries to be used for Tcl. */ #ifdef SUN extern int matherr(); int *tclDummyMathPtr = (int *) matherr; #endif static GLuint FontBase; static float xAngle = 0.0, yAngle = 0.0, zAngle = 0.0; static GLfloat CornerX, CornerY, CornerZ; /* where to print strings */ /* * Togl widget create callback. This is called by Tcl/Tk when the widget has * been realized. Here's where one may do some one-time context setup or * initializations. */ void create_cb(Togl *togl) { FontBase = Togl_LoadBitmapFont(togl, TOGL_BITMAP_8_BY_13); if (!FontBase) { printf("Couldn't load font!\n"); exit(1); } } /* * Togl widget reshape callback. This is called by Tcl/Tk when the widget * has been resized. Typically, we call glViewport and perhaps setup the * projection matrix. */ void reshape_cb(Togl *togl) { int width = Togl_Width(togl); int height = Togl_Height(togl); float aspect = (float) width / (float) height; glViewport(0, 0, width, height); /* Set up projection transform */ glMatrixMode(GL_PROJECTION); glLoadIdentity(); glFrustum(-aspect, aspect, -1.0, 1.0, 1.0, 10.0); CornerX = -aspect; CornerY = -1.0; CornerZ = -1.1; /* Change back to model view transform for rendering */ glMatrixMode(GL_MODELVIEW); } static void print_string(const char *s) { glCallLists(strlen(s), GL_UNSIGNED_BYTE, s); } /* * Togl widget display callback. This is called by Tcl/Tk when the widget's * contents have to be redrawn. Typically, we clear the color and depth * buffers, render our objects, then swap the front/back color buffers. */ void display_cb(Togl *togl) { static GLuint cubeList = 0; const char *ident; glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glLoadIdentity(); /* Reset modelview matrix to the identity * matrix */ glTranslatef(0.0, 0.0, -3.0); /* Move the camera back three units */ glRotatef(xAngle, 1.0, 0.0, 0.0); /* Rotate by X, Y, and Z angles */ glRotatef(yAngle, 0.0, 1.0, 0.0); glRotatef(zAngle, 0.0, 0.0, 1.0); glEnable(GL_DEPTH_TEST); if (!cubeList) { cubeList = glGenLists(1); glNewList(cubeList, GL_COMPILE); /* Front face */ glBegin(GL_QUADS); glColor3f(0.0, 0.7, 0.1); /* Green */ glVertex3f(-1.0, 1.0, 1.0); glVertex3f(1.0, 1.0, 1.0); glVertex3f(1.0, -1.0, 1.0); glVertex3f(-1.0, -1.0, 1.0); /* Back face */ glColor3f(0.9, 1.0, 0.0); /* Yellow */ glVertex3f(-1.0, 1.0, -1.0); glVertex3f(1.0, 1.0, -1.0); glVertex3f(1.0, -1.0, -1.0); glVertex3f(-1.0, -1.0, -1.0); /* Top side face */ glColor3f(0.2, 0.2, 1.0); /* Blue */ glVertex3f(-1.0, 1.0, 1.0); glVertex3f(1.0, 1.0, 1.0); glVertex3f(1.0, 1.0, -1.0); glVertex3f(-1.0, 1.0, -1.0); /* Bottom side face */ glColor3f(0.7, 0.0, 0.1); /* Red */ glVertex3f(-1.0, -1.0, 1.0); glVertex3f(1.0, -1.0, 1.0); glVertex3f(1.0, -1.0, -1.0); glVertex3f(-1.0, -1.0, -1.0); glEnd(); glEndList(); } glCallList(cubeList); glDisable(GL_DEPTH_TEST); glLoadIdentity(); glColor3f(1.0, 1.0, 1.0); glRasterPos3f(CornerX, CornerY, CornerZ); glListBase(FontBase); ident = Togl_Ident(togl); if (strcmp(ident, "Single") == 0) { print_string("Single buffered"); } else { print_string("Double buffered"); } Togl_SwapBuffers(togl); } int setXrot_cb(Togl *togl, int argc, CONST84 char *argv[]) { Tcl_Interp *interp = Togl_Interp(togl); /* error checking */ if (argc != 3) { Tcl_SetResult(interp, "wrong # args: should be \"pathName setXrot ?angle?\"", TCL_STATIC); return TCL_ERROR; } xAngle = atof(argv[2]); /* printf( "before %f ", xAngle ); */ if (xAngle < 0.0) { xAngle += 360.0; } else if (xAngle > 360.0) { xAngle -= 360.0; } /* printf( "after %f \n", xAngle ); */ Togl_PostRedisplay(togl); /* Let result string equal value */ strcpy(interp->result, argv[2]); return TCL_OK; } int setYrot_cb(Togl *togl, int argc, CONST84 char *argv[]) { Tcl_Interp *interp = Togl_Interp(togl); /* error checking */ if (argc != 3) { Tcl_SetResult(interp, "wrong # args: should be \"pathName setYrot ?angle?\"", TCL_STATIC); return TCL_ERROR; } yAngle = atof(argv[2]); if (yAngle < 0.0) { yAngle += 360.0; } else if (yAngle > 360.0) { yAngle -= 360.0; } Togl_PostRedisplay(togl); /* Let result string equal value */ strcpy(interp->result, argv[2]); return TCL_OK; } int getXrot_cb(ClientData clientData, Tcl_Interp *interp, int argc, char *argv[]) { sprintf(interp->result, "%d", (int) xAngle); return TCL_OK; } int getYrot_cb(ClientData clientData, Tcl_Interp *interp, int argc, char *argv[]) { sprintf(interp->result, "%d", (int) yAngle); return TCL_OK; } /* * Called by Tk_Main() to let me initialize the modules (Togl) I will need. */ TOGL_EXTERN int Double_Init(Tcl_Interp *interp) { #ifdef USE_TCL_STUBS if (Tcl_InitStubs(interp, "8.1", 0) == NULL) { return TCL_ERROR; } #endif #ifdef USE_TK_STUBS if (Tk_InitStubs(interp, "8.1", 0) == NULL) { return TCL_ERROR; } #endif if (Togl_Init(interp) == TCL_ERROR) { return TCL_ERROR; } #ifdef macintosh Togl_MacSetupMainInterp(interp); #endif /* * Specify the C callback functions for widget creation, display, * and reshape. */ Togl_CreateFunc(create_cb); Togl_DisplayFunc(display_cb); Togl_ReshapeFunc(reshape_cb); /* * Make a new Togl widget command so the Tcl code can set a C variable. */ Togl_CreateCommand("setXrot", setXrot_cb); Togl_CreateCommand("setYrot", setYrot_cb); /* * Call Tcl_CreateCommand for application-specific commands, if * they weren't already created by the init procedures called above. */ Tcl_CreateCommand(interp, "getXrot", (Tcl_CmdProc *) getXrot_cb, (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); Tcl_CreateCommand(interp, "getYrot", (Tcl_CmdProc *) getYrot_cb, (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); return TCL_OK; } netgen-6.2.1804/ng/Togl-1.7/ben.rgb0000644000175000017500000014144713272137567015074 0ustar kurtkurtno nameXj} 0!#;$&G')T*,U-/]02a35b68\9;V<>f?AwCDF GIJLMOPRSU VXY[\u]_Y`b>ce"fh i{jlPmo"pqsLtv wXxy{%|^}~%477*&2/.& o}Tf5Ob#Y7ymBjB]>'rD l3FkN‘Sg{$ "6#%>&(K)+S,.U/1]24]57^8:W;=c>@lACEFH IKLNOQRTUWXZ[x\^b_aEbd&eghikbln1oqresuvvwyzQ{|} Famz|{zt>[sWLH ]+y\;{J X=mGX: l%rc¨_p !1"$;%'H(*U+-U.0Z13]46]79[:<^=?k@BDEGHJKMNPQSTVWYZ[]m^`Rac0dfghjnkmBnpq|rt5uvx6ytz{})~Zq/GMJqHfBm6eB+a4M!h5({ |}}|{|w}~~{{y||}xyx{yzw}z}{z{vxsxwpvrmslljhia\ZVZTTOP^J\XS[N3H<B7?^@>XG=A=9>?7:8=;GBICHIIO?9C<9C=ABH@DDHBMF@DIAAKE@FC9?0,0(!~~{~}~}}z}}||u}xvxtzx{ursvpkehfcbcbY\XSWOXXVZTLTK3<9@7B\C;VG:CEAAFDIFJEPMPLHLKOJJKMFHLIKLMPSMQNNJEJFDPIBGE<C:-5,!~~}}{|{|}|z|~z|y{yuwurmqlifeg_]\]\UUTVMZSRXL:@5>6VXLQXC=A>BCPFMPIHGMLOGH[VLBOJOZOJROIRUHNNLG@>KDMHGK?>>616'&e2!C!v2eC!2e2vCe!2eTe!!eܘ!eeCeee2eeeTeeTeTeeTe2e2e2!22CeCeeeeT!e2C22!!v22C!22ev2!22T2!!2e!2ܘ2C22e2T2eT22T2Te2˘2!2!2Ce2C2e222T!2C22!!v22C!22v2!22T2!!22!22Cee2ee2T2e2eT22T2eeT22!22C2e22C2e222eT!222Ce2!!2e!C22!!222!e2eee!eee2e2Ce2eeCeeTee!eCeTeeee!2e!!T2!veeeee4e2!!22!C2!!22e2!22e1!2ˇ2C2eC22T22!2e2ee2C22T2e2e2!22e!!T2!ve22222e22!!22!C2!!2e2!2e!242C2eC22T22!ee2eeCe2T2e22!222!!T2!ve22e2e222e2ee2TC!2!2e2!!2!2!eˇ22!ee2e!ee2eeeeeeeCee˘e2eܘeeTv2!!!eeCeeeee˘e2e˝T!2!22!!!!e22!22e22!22e22222C22e2222e2e2Tv2!!!2ee2C22e222e2T!!e2!!!!eˇ2!22e22!224e222e22e222e2C2eee2ee2e22Tv!!!2e2C2222ee22ee2e!e!C!22T!!!!Cee2e!ܘee!evee2eeCee2eeeCTeeeeeeeTe!ee!!!CveTeeeee!e!eee22!ee!!22T!!!!C222!eܘ22!2v2C222CeT22ee2T22!ee!!v2T2e22!ee22!e2e!e!!2T!!!!C2422!22!2v2ܘC222e22CT22e22e2e2eT224!e4e!!veT2ee2e2e2!e22!2e2e2e222!!!e!!!!CC˿e2!eeC22TeTee2eܘe2eeܘeeܘCeTeTeeeee2e2C!Teܘeeeee2ee22e2!!!2!!!!C22!22e˩C222T22e2e2e22C2T2T2ee2e22222!T22ee2e2e2!!!2!!!!C˿22!22C222T222e2e22ee2eCe2eT2T2eee22e2e222!T2e2ee22ee22e2!!ee2!2!22!!2!C˿T!e!!e2eCeeeT2TeTeeTe˘eeeeeeܘ2eCT2!e2!eeeeTeeeˁ!!2e2!!22!!2!CT!2!!eܘ22C2222T2Tee22T22e222e22CT2!22!22eT2ee2!!ee2!!2!!2!C˿T!2!!e224C2222Te22Te2e222e2Te22ee22ee2e22e22CT2!e2!2e22e2e22T2422e!2eC!!!!ee!eTe22eee!ee2e2Te2eeeTeeeeeveeeeeeeee!e2e2eeCeeeeܘeee2ˁ!22C!!!!e2!2T22!2e2T2e2T2e2e2ev2222e22!22ee22C22e22e2!2eC!!!e2!2T2e2!22T2e22eT2e2ee2e22v2e2e22e222!22e2eCe2ee2eee22ee2e!!2!v22!C!!˘2Ce2eCe!eeeeCeeTeTeCeTeTe2Ceev!e2eeTeeˁ!!!ve2!Ce!!e22C2!222e22eC2T2Te22eC2ee2Tee2eT2e2eC2ev!22T2e2!!!ve2!Ce!!e22C2!222e242C2T2Te2eeCee˘ee2Te2T22eC2ev!22e2e2e2Te22e2C!!eee!2!!!!ee2˘2e!eeTee!eeTee2eeC!eeTee˘TTeeeTeeeve2e2!eeeee!!2e2!2!!e22ee22!2T22!22T2222C!22T2e2222eeT22T2ee2Te222v22e22!2e22e2!!2ee!!!e2e22!42T22!2eT22C!222eTee224e2e2TeeT2e22eTe222v2222!2e2e2e˘2e2e222e!2ve!22vܘe!2e!˘e!eeTeeCeeeeeCeeeTeeeee!TeeC2C2eeCeeeCˁ!2v2!!!!!!2vܘ2!22!e2!2Te2C22e2ee22C22222e2Te2e2e2e2!Te22Ce22ee2e2eC222C˂!2v2!!!!!!22vܘ2!22!˘2!24Te2C222e2e2C22242eeeT2ee2ee22e222!Tee2C22e22e2e22eeCe222eCeee!C!CeT!2!22vC2e2eܘe2e!ee2evCeeCeeeeeCeeTeee2!e!eeee˘eee˘2!!eT!!2vܘC222ܘ2!2e222vC2C22e2e2e22eeC2T222e2!e2!2ˇ2e2e222!!T!!vC2422ܘ2!2e2vC24Ce22ee222eC22eT2e2224e2!2!22e22˘2e2e2e2e2!2!!e!!!C!C!!Tee2e!2ee2eCeeeeeܘeeTܘee˘e2eeCeܘeTeeeCe2!!!2e!!C!!!T˿2!eܘ2eC2e2e22ee222e2e22T22e2e2e2e2T2ee2eC22ˁ2!!!2!!C!!!T2!2C2ee2e22e22e2ee22eee2e2eTeee2eee224eeܘ22eTˇ2eee2eeCe2e22!e!e2!!2Ce2e2eCe2eee2eeCeeeTeeeCܘTeTeee2T!eeeTee22!2!22!!C2ܘC222˩2e2C22˩2T2e2eeC22e2T22eeT22e222eT!22e2eT222!2!22!!C2C222C222e2Te22e2eeC2eeeT2eeeT22222eT!˘22e22e2T22ee!C!C2ee!v2!!e2!eTee2eTeCe!eeC2eeeeeeeee˘TTeeTve2e2eeee2!!22e!v2!22!2T222T2C2!2e2C22e2e2e222e2ee2e2T2T2e2eev22222e!!2ee!v2!22!2T2422T2C2!22C22e2e2e22e2e2e2e2e2eeTeTe22e2v2e222e2e2eev2!!2!e!!2!2C2e22e2eee2e2eeCeCTTeTee˘eeCTeܘe!!eeeeeTeev2!!22e!e!!!22e22e2ܘ2CCTT22eeT2e2e22Ceee2T22e2!!e22122T22v2!!22!e!!!22e2e22ܘ2C4CTT2eeTe22e22eeCeTee22eܘ2!!42ee2ee22T22ee!!T22v!2e2!eee2eeve2eeCe2eeeeeTeTeTC˘eܘTeee˘e!eTeܘee˘eeTeTee!!22ve!2ee2!2ˇ2222v222eC222e22e22eT22eeT22TeCe2e2ee2T22˘2e222!2T22e22T2Teee!!22v!2e!22e2v2eC2242e22eT2e2eTe2TeC2eeeTe22e2eee2!2T24ee422e2T22eT2e˩e!!e2e2e2!!2!!e2e2ee2e2TeeCeCeeTܘCTTeܘeTee2!eCee!e˩2!!22ee2!!!!2e2T22C2Ce222T22C2ee2T222Te2ee22T22e2e!2eC22!2e˩2!!2ee2!!!!2e2Te2C2C2e22eTeeCe2T2eeTe2ee2ee22e2T2242e!2Ce2e2!2ܘ2e!e2e2!2eT!!22eܘ2e2eeeeeTTTTeeeeeeeeeee2!e22!2!2eT!!2˿2e2e222e22T2eeT2T2T2e2ee2e2e2ee222e2e2!e22!22e!2T!!222ܘ2ee2422ee2e2e2TeeeT2TeTeee22ee2e22e2e22˘24ee2ee22e!e2!C2e!ee!2e2e2ee2eCeCeTeee˘eCܘee˘ee˘eeeeeTee!2˿22!22!2e!22222eC2CTe2e2ee22Cee2eee2e2e2e22222T22e2!222!22!2e!2e22eC2C4Te22eee2eCeee22eee2ee2e222422eT222e22!ee2e!2!C!2!Te!eTTee2eeC2eeܘeeeee˘TܘCܘeeeeeeeܘeeeeeC2Ce2e2!2!!!T2!2TT222e˿2C22ܘ2e2ee2e2e2Tee2Ceee2e2ee2e22e22222ee2ee2CeCe2e24!2!!!T2!2TT22C2ܘ2eee2e2eeeeTeeeCeeeee2eee22e2ee2222e2ee2e22C2C2222!e2!2C!2!!eTeCeeCeeeܘTeTTeeeTeeeeeTeee˘22!2!C!!!2T2Ce22C2e2e22T22e2T2e2eeeT2e2e2T2e22e22Tee22!22!2C!!!eT2C2e2C22e22e2ee2eeeT2eeeT2eeeeTee22e2e2eeT222ee2e2ee2T222eeee!2Cee2!eeCeeCTeCeeeeeeTTܘ˘eTeeCeeeeeeTe222!2e2222!22eC22C2T2C22e22e22Teee2eeT22eee2eee22Te2e2C22e2222Tee2e2222!2e222!22Ce2CT2C222e22ee2TeeTeeee2eTe222C2eee2ee222eTee2e!e!T2e2!!CC!2eevܘeܘeTeeeeeeeeeeܘee˘eeT˘!2!2e2!!C!222v2e2T22ee2e2eee22ee2ee2e2e22ee22ee22e22e2T2e2!2!222!!C!222ve2e2T22e22e2ee2eeeee2eee2eeee2ee2e2e22e22e2eeTee2eeeee!!2T2C2!2!C2eeeTeeeeT˘eeTeee˘eeܘeeTeT2eܘ!!2T22!2!222ee2eT2222Teee2e2e2ee2e2Te22e2e22e22ee22T22T2e˘˩24eܘ!!2T22!2!222e2e2e22eT2e2e2e2Teeee2eeeeTee22ee2eee22ee2ee2eTeeTe2e2˩!eCee!e!eCeeTeܘeeee˘ee˘eeTܘeeeC22!2eܘ2!!Ce2e2Te2e22e2e2e22e2e2e2ee22eee2e2222e2T2e2e2222e22eC˘2˩!2ܘ2!4!4C2e2eeܘ2e2eTee2e2e22eeeee2ee2eee22e2eeT2ee2e22ee2eCee!ev2!eCT2!!C2CCeTeeeTeeeTeܘTC˘C˘eeTeT˘2!2v2!2CT2!!2C2eT22e2T222e2ee2Tee2eee2T2ee22Ce2Ce2eee22eTe2222T222!2v2!2CT2!!2C2T22ee22e2eT2e22e2eeeTee2TeeeCeeCe2ee2eeTe2eeeTeee2!eC22C2˩22!!2!2eeܘCeeeeܘTeeeTTeeeT˘˘2!2Ce22˩2!!2!22e2C222ee22T22e2e2e22e2e2e2e2e2ee2eeT22ee2Te22ee22T2!2C222˩2!!2!22eeC2e22e22e2e22ee2eeTeeee2ee22eee2e2eTeeeTe2ee2eTe2e2ee2e!22˘e2!eeTee˘eeeeeeT˘TܘeeTeeee2!22˘2!22e2T222ee2Teee2Te2e2eee2e22ee2e2e2e22eT2e2e222e22e2˂2e2!22e22!42ee22e2T2ee22eee2e2e2TeeeeTeee2eeeeeeT2e2e22e2e2Ce2CC2e!CeeT!C2eCeeeTeTeeTeeeT˘Tee˘ܘTTeeT˘˘C2C22!22˘T!2C22e22T2T2T2ee2Te2e2e2T2e2ee2e2ee22e2ee2T2T2e22e2T2eC42C22!2eT!4C2eee22eeT2e2T2e2eT22eeee2eTeeeTeee22eeeeeTeT2e2eeTeeee2C2e!e!eܩe!22!eeeCeܘeeCeeT˘eeTeeeT˘12C2!2!2eܩ2!22!22ˇ2Cee2e22Cee22Teee2eee2ee22ee2e2ee2222T222e2T2e22C22!2!2ܩ2!22!2e2e2Ce2e2eee2e22eeCe2eTeeeee2eܘeeee2T22ee2T2ee2e2ee2!!e2e˿v22CeCeeeeeTܘeeCeeT˘e˘e2eeTܘeeܘTT˘˘222!!2v22C22eee2ee22T22C22ee2ee22Teee2eee22e2ee2e22T2ee22T2T2242!!2˿v222C222e22e2e2eT2e22C2e2eeeeeeTeee2eeee2eeT2e22TeTe!e!eCe!e2e2v˩e2!eTeT˘CCCeTeeee!e˘ee˘eve!2!eC2!222v22!2T2T2e2C2Cee2C22T222eee2e2ee22eee22ee2e2e2!2e22˘22ee22e˘ve!2!eC2!2v˩22!2T2T2eeC2Ce2C2eT2e2eeeeee2eee2!2e2ee2e2e2eeevee2e!e!e2ee2e˘eeTCCeCeTTe˘ܘT˘˘ˇeCeTveC2422e22!2!222e2TC2C2e2Ce2ee2TT22eee2ee2eee2ee2T2e22eeee2ee2Ce222eTveC2e224e22!2!22e22e22TCeCeeeCeeee22TT2eeeeeeeTeeeee˘e2eeC2e2eTvCeTe!v22!ee2!e˿T2evTTeܘTTTeTeܘTܘeTTe22eeT2!ev2!22!2T2vTT22T22TT2eeT2ʘ2T2eee2eee22eee2ee22eee2eee2e2eee2ee22eTe22eT2!ev22!242!e˿T2vTTee2eT2eTT2e2T2ee2TeeeeeeeeܘeeTe2ee2e22e2˘eeeTܘTTC˘eeee˘ee2e22e2ee2e2TeT2T222Cee22e2e2e2e2ee2eee2e2e2ee2e2˘222ee22e22e22e2˘2e2eee22eTeTeT2eeCee2e22e˘eeeeee˘e2e2eee222e!Cee2e2eC˩eCeTTTTT˘TTeeܘ˘eeeeT˿Te2!eC2222C2C22T2T2Te2T2Te2T2eT2ee22eeeee2eeee2ee2e2ee2ee2e2e2T2e2eeTe2!Ce22424C˩2C22TeT2TeeT2Te2TeeTee2eeeeeeee2e2e2˘eTe˿eT22v˘veCe2eveeTTTTeT˘eeC˘˘˘eܿee2v2ve2C2v2T2T2eeT2T2eT2e2e2ee2Ceee2e2e2eee2eeee2eee2eeee2eee2ee22ܿee22eee2v2v2C2v2eeTeTe2eeTeTeeTe2eee2eeeeCeeeeeeeeeeeeeeܿe22vTeee2e2eeCeTܘTTeTeT˘˘˘ee2vT22222C22T2T2Te2e2Te2e22eeeT2eeee2e2e2eee2ee2eee2ܘee2eee2vTe2eC2eTeTeTee2e2eeTeee2eTeeeeeeeee2eeeeee2eeeeܘeC2e2veܘeeCeTܘe˘T˘˘˘˘˘ܘ˘Te22ee2ܘ2C2ve2e2e2e2Ce2ee2e2Te2e2e2Teeee2eee2eeee2ee2e2e2eee2ܘT2e2eee2ee2ܘ2C2ve2e2eee2eeeC2eeTe2Teeeeeee˘e˘eܘeeTe2CTT2Te2eTeTC˘eT˘˘˘˘˘˘evCTT˘2eT2ee2T2eeee2T2e22Ceee2e2ee2e2T22eeee2eee2ee2eee2eeܘ2e2eevCTT2T2eeTe2eTee2eCe22e2ee2eeTeeeeeee˘eeeeee2v2eeܘT2eeC2eeeeeT˘CTeTCܘ˘˘˂eve2eeTܘ22˩2C2e2ee2T2ee2Ce2T22eeee22T2e2eeee2Ce2ee2eee2eeeeeee2ee22eev2eT222C22ee2eeeeTeeeeCeeTe2eeeTeeeeCeeeeeeeeܘeeev22eeTˇe2ee2˘TTTܘT˘T˘e˘˘˘˘˘˘e2T222e2e2T2Te˘e2eT2T22ee2e2e2Te22eee2eee2eee2eeee2ee2e2e2eee2Tˇ22e2eeT2Teee2TeTe2eeeTeee˘eeeeeeeeeeeeee2eee2eCe2eeTT˘TTܘTe˘˘ˆ˿ee22e22C˿2T2T2e2T22e2Te22T2eeee2eee22eee2eee2eee2eeee2ee2e2ee2eeee2e2e22224C2eTeTeeeTeeeeTeeeTeeeeeeeeeee2eee˿e222Cee!eܘe2e˘TTeT˘ܘ˘˘˘˘˘˛˘˿TTeeeC22!2e22T2eee2eTe2e22e2e2222e2eeeTeeeeee2e2eeeܘeee2TeTeeC2e!2eܘ22eeTeeTee2e2eeeTeeeeeeeee˘ܘeeeeTeT22e2eCeeeeTܘTTTTeˊ˘˘˘˘˘˃ܘ˘eee222C2222TeT2T2eT22eee2Tee2e2eee2ee22eeeee2eeee2eeee2ee22eeeeeee2ee222C2ee2TeTeTeeTee2eT2e2ee˘eܘeeeeee˘eee222eee!eeeeeܘCC˘˘˘˘˘ˇˋ˘Teev22!e2e2ܘ22e2C2ee2ee2e2ee22Cee2e2eeeee2eee2e2eeeeܘee2e2e2Tev22!e2e2e2eܘeCeeeeeCeeeܘeeeeeeeeܘ˘ܘe2T22vee2eTeCeCeܘe˘ee˘˘˘˘˘˘ܘ˘˘eeee2T2C2C2ee2ee2e2ee22ee2e2e2eee2eee2eeeee2eeee2ee2eeeeeee2e2eee2T2C2C2e22eee2eeeeeeeeeeeeeeeeeeeee2ee2eee!e2e˩ee˘eeT˘eTˆ˘˘eeee22!222ܘ2e2ee2Teee2ee2e2ee2ee2Teeeee2eeee2eeee2eeee22e2ee22!2˩22e2e2ܘee2eeeTeeeeeeeeeTeeeeeeee2e2e2e2ee!e!eeT˘ܘ˘˘˘ˋ˘˅eee22!2!2e2Tܘe22eeee2e2ee2eee2ee2eeee2eeeeeee2ee2e2eeeeee2e2ee22!2!2e2eTe2eeeee2˘eeeeeeee˘ee2ee2Te!e2eveeC˘˘˘˘˘˘˘˘eCeveT2!22v˘22eCe2ee2eee2eee2e2ee2eee2eeeeeeee2eeeee22e22C2veT2!224v2e2eeeeCeeeeeeeee˘eܘeeeeeeeeeee2eC22veee!eTeeevvC˘T˩ˇ˘˘˘˘˘˘˘˘eevvee2!2T222vvCe2e2ee2Tee2ee2eeeeeee2eee2ee2eeeee2e2e22evve2!2T22e2e22vvCeeeTeeeeeeeܘeeeeܘee˘ee˘ee2eevv2eeeCTeeeCe˘˘ˑ˘˘˘˘˕˘ܘeeee22T22e2C2ee2eee2e2ee2eeee2eeeee2eeeeeee2ee2eeeee22ee22eee22T2e2C22e22eeeeܘeeeeeeeeeeeܘeeeee2T22Teeeee˘Tˇ˘˘˘ː˘˘˘˘CeeT22T22e2e22eeTe2eee2ee2ee2e2eee2eeeeeeee2ee2eeeeee2C2eeT22T22e22ee22eT2eeeeܘee˘eeeeeeeeeeeeC2e22eTC˘˂˘˘˘˘˘˘˘ˁeee2e2TC2ee2e2ee2ee2e2e2eeeee2eeeeee2eeeee˘2eeee2e2TCeeeeeeeeee˘ee˘eeeeeeeeeeeee2ee!eTe˘˘˘˘˘˘˘˃˂evev1!2T22e2e2eee2ee2e2eeee2eee2eeeee2evev!2T2ee2eeeeeeeeeeeܘee˘ee˘eee˘ee2v22ve2e!TeeC˘˘˘˘˘˘˘˘e22!T22eCeee2eee2e2ee22ee2eee22e2eee2e2eee2eee2ee2e˘ee2e22!T22eCeeeee˘eee˘eeeeeeee˘eee2e2e!2TeeT˘˘˘˘˃˘˘˘ˁ˘Cee2!2T222Tee2ee2eee2eeeeee2eeeee2eee22eˇeee2Ce2!2T2e222Teeeeeeeeeeeܘeeeeeee2eeeܘeeCe22ee2eCeTe˩ܘ˘ܘ˘˘˘˘˘˂˒˘Tve222C22T22ܘe2ee2e2eeeeee2eeee2eeee22eeeeeTevee24C22eeTee˩eeeܘeܘeeeeeeeeeeeeT2v22ee!!eee˘˘˘˘ˉ˘˂˂ˊ˘ee2e!!2e22ee2eee2eeeee2eee2eee2ee22ee2eeee2eeee!!2eeee2˘eeeeeeܘeeeeeeeeeeeeee2e22e22e!eee˘˘˘˘˘˘˘˘ˇve2e2!22ee22ee2ee2eeeee2e2e2eeee2eee22eeeee˘vee222!22ee2eeeeeeeeeeeeeeeeeeee2eeܘeeeev2evee2!eee˘˘˘˘˘ˈ˘˂˃ˈee2ve2!22eeeeee2e2eeeee22eeeee2eeeeeee2v242!22eeeeeeeeeee˘eeeeeee˘ee2TT2e2e˘˘˘ee˘˄˘˘˘ˇܘeTTe2˿2eee22eeee2eee2ee2ee2e2ee2ee22eeeeeeeeeTTe2eeeeeeeeeeee2eeeܘee˘eee2eeeeeeee2ee܇e2eeTT˘˔˘˘˘˃ˇ˘ܘev2܇2T2Te2ee2ee2eeeee2e2eeeeee2eee22eeeeeeeve2܇222TeTeeeeeeeeeeeeee˘ee22v2e2eeTeT܇˘˘˘ܘ˘˘˘˘ˍ˘e ee2T2eeTeee2eee2ee܇eee2eee2ee2eeeee2eeee22eeee 22T2e2Teee܇eeeeeeeeܘeeܘeeeeeܘe2eeee2e eee2eeTee˘e˘˘˘˘˘˘˘ˋ˘˘e e2T2eee2ee2e2ee2ee2e22ee22e2ee2eeee2ee˘ee e22eTe2e2eee˘eee˘eeeeeeee˘eeeeeee2 e2eeeܘe˘ܘ˘˘˘e˘˘˘˘ˊ˘˘ 2e22222eeeee22eȘe2e˘e22ee2ee2eeee2eeeeeee 2e22ee22eeeeeeeܘeee2eeeeeeeeee2 eeCvTe˘˘˘˘˘˘e˘ܘee˘˘ e2CvT2e22eeee2eeeeee2ee2eȘe2e222eeee22eeee ee2CvTe2ee2eeeeeeeeeeee2e˘2ee2ee˘eeܘeeee TTe˘eT˘˘˘eCeCeee˘ˁ˘TT22eT2ee2e2eee2eee2e2C2e2eeCe22e2ee2e2eee2eeeeeeTT2e2eTeeeeeeeܘeeCe˘eCe2e2eeeeeeeCTe˘ܘ˘˘˘eC˘ee˘˘ˏ˘eC˘T222eeee2eee2e2e2e2eȘe2ee2Cee2eee2eeeeeeeeCT22eeeeeeeeeeeee2ee2eeCe2e2eeeܘeeeeee2ee˘T˘˘˘˘˘˘e˘eeTe˔˘˘ܘe22eTeeeeeee2e22Șe2T2ee2eeeeeܘe2eT2eeeeeeeeee2 e22eeT2eeeeeeeeeeeeCve˘ee˘˘ˁ˄eeC2e2eeee2eee2v2eȘe2ee2e2eeeeee˩e22Ceeeeeeeeev22˘eee2ee22eeeeeeee˩2eve˘˘˘˘˘˘˘ܩe˄˘v2e2eeee2eeeee22ܩ2eȘȘe˿ee22eee22eeee2ev2e2eeeܘeeeeeeee2ܩ2eeeeee2e˘eܘee2eeeeT˘˘˘˘˘TC˘˿e˘˘˘˘e22eTeeee2eee2TCe2ȘȘȘȘe222eeeeܘ222eTeeeeeeeeeTCeeeeˆܘ2e˘eeee2ee˘˘˘˘ee˘˘˘˘ܘ22e2eeeee2e2eeȘeeeee2eˇeeܘe2eeeeeeeeeeeeeeܘeeeeeeee˘˿Tˇ˘˘˂ˁ˘˘ee22eeee2eeeee22TeȘȘeeeee2eeee˘222eeeeeeee2Teeeeeeeeeeeܘee˘˘˘˘e˄˘ˆˋ˘˘ee22eee2eˇee2ee˿e22ee˘Ș222eee˘ee22eeeeˇeeeeee2eeeeeeeeee˘eeeeeeev˘˘˘˘ܘ˘Te ˅e˘ˇee2veeeee2e˘T2˘˘ȘȘee22e2eeeee22veeeeeT22eeeeeeeee2e˘ee˘eeee˘˘˘˘˘˘e evܩeeeeeee22eeȘȘȄe22ve22eeeܩeeeeeeee˘eeeee2eeeeee eeee2e2veeeeܩ ˘˘˘˘˘˘˘˘Ce˘˃ ܘeeeeeeeCeeȘȘȘȘȘȘ˘e22ee2e2eee2e˘eeeeeeeeeCeeee eee2e2e2eeܘe ˘T˘˘˘˘ee eTeeeeeeee2eeȘe2e222eee22 eTeeeeeeeeee2eeeeeeeeeee2e2eܘee e˘˘˘˘e ˘eeˇe! eeeeeee2e22Ș˘ee2e22e2e! 2e2eeeeeee2eeeeeeeee22e22ee2eܘ ˘eˆ˘eeT" ee2eee2eeeee2ee2222eeeee22e2Te2e" eeeeeeee˘2eee2eeeeee2eeTe2" e܇˘˘˘˘˩ee˂eee# ee܇e2eeeee2e22eee2222e2e# ˘e2e2e܇eee222eeeee2e2ee22eܘ#˘˘ˆe˘˘˘e˘e˿˘%˘ee2eeee2eee2ee2ee22eeeeȂe2e22˘%ܘe2e2eeeee˄e2eee2eeee2e22e2eee$˘˘˩˘˩˘˘˘ܘeeee˘eeT%ˋ˩˘˩˘eeeeee2e2ee2ee22eee2eȎee222Te%eeeee2eeeeeeeܘ22e2ee22e2e2ee22e2˘eTee2%˩˘˿˘Teˁe˘eC˩e&˩˘˘˘˘˘˘e˃eee2e2Te22eee21eeȘ˘22Ce&ee2e˃eeeeeTe2e22e2e2e2e22eeee22Ce2e%˩eT2TeveeTe˘˘˘˘eeT˄eˇeeee&˩˘eTeTeveeTeeeeeee2e2e2Teee2eee2ee˘e22&e2T2T2eev22T2e˘eee2ee2T22e2eeee2ee22e2&˩2eCev˩˿Teˇe˘e2eee'˩˩ee2eCevee˘˿ܘeee22eT2eeȘȘee22ee22'ee2C22v22eeeeܘeeT2e22eeee22eee22e'˩˩˩v TeeːT˘e˘ee'˩˩˩ve2Te22eeeTee eee212eee2'eeev˘ ˊܘ2eeTee2e22T2eee222e22e22e'˘˩˘ˎ˩˩˩˩˂eeܘee˄eˆ˂e˘T˘e'ˈ˘˔˩˩˩˩˘˘e22e22ee22eeeee221ee˘2T'eeeܘܘe˘e22ee2ee2ee2eeeee22e22Te2e2'˩˩˘܄˘eeeeˊeˎ˘Ceeee'˩˩˩܄e2e2eee2eeeeeeCe22eeee'ee܄˂ee22ee2ee2e2 e2C2e22e2e'&eeˇee˄eˁ˘eee˄ee'!e2222eeee2e2eeee'ˁ ˁ ˃ˉ22e2e2 eee2ee22e2e22e'˩˩˂ˈ˘Ceeˑee˘ee&˩˩ˍe2C22eee2eeee2e'eܘ˘ܘܘܘe2C2e2eeee 2e2e2&˘˩˘˘˄ e˘ee˘eee&ˁˉ˘22e22eeeeee2e&ee˘2e2e2e2eee 2ee&ˋ˩ ee˘ee˃eee&ˆ˩ 2e12eeee˘e2ee&˃ˁˁˁ˃222e2e2 e2e22e&˘˩ˁ ˆeeeee&ˁˁ ˇ2e22eeeee2ee&e˘˘e2eee 2e2ee%˿˃˘2˂ܘeeˁ˃eve%˿˃˘2˘e2ee2e2eee2e22ee˘eee21ev%e22ee˘22e2e2ee2e2v2e%˅˩˘˥e˘˂˘eeCee%˃˩ˬܘe2eeee22eee2eeeee2C%eeܘܘܘܘܘ˘˘ܘܘ˂e2e2ee2eeee22e2C22e%˃˩ˇe˘ee2eeee$˅˘˩˩ˇee2ee22eȘ22eeeee22e$eeeeee222e2e˘e2e2e22e2e$ˁˈC!!ˁ#eee˂ ˘e22e"ˁˆC!"e2e2eeee22e"eeCeeˉ2e22e˄ee22e22e222222ee!ˉev ˞e˅˙˘e2!eeeeee ˩˩ev ˎee2eeee2eeeeee22!e 22ev2e ܘܘ˘˘ܘˎ2ee22e˘e2e2e22e2!22e2ee ˄eve˩ˆeee˃e˃eeCeeevee˩ˆe2e2eee2eeeee1Ceev2e2eeee˘2ee2e2e2C22e222eˁ˃C˂"eee 2eeeeeˁ˃C!"ee2eeeeeȘe21e eCeܘ 2ee2e2eeeee22e 2eˈ2!v˄eˁ˄˘eeeeeˏe!!vee1eeeeeeȊee22 e2vee222ee2e ee2e˘e22e2eˋ˩veCee"e˃˘˂˘ee˘eeˋ˩veCee!e2e2eeeeeȆee1eܘ2v2C22e˂2e2eee22e˘e22ˉ2!!v%e˘eeeveˊe!!!v$e2eee eeee˘e2ev˘2!!ve 2e2ee2e2e2e2ee˘e2e2v2e˅˘Cv$e˃ eeˋ˘ee˅˘C!v#2e2eeeeȇee2eeeCve 2e2e22ee˘ee2e222eˆ˩e!2vˁ!ee˘ ˘eev˩e!2v˂ eeȘeȄ˘e2v˘ܘe2!veܘ2eee2ee2ee˂e˘ee22eee2v2ˇee!!e%ee eeveeeˌe!!e#e2eeȘe˘e ȁeȅȘvee2!!ee!2ee22eee22e e22˘e2v2eˉve!!e%e e˘eveˋve!!e˘#2eeȅȘeȁ22vv2!2˘ 2eee2eeeeee2˘e2v22ee˘e!!!v˂!e˘eeeeee˘e!v˂!eeȆ2eeeܘܘܘee2!!!ve˘e2eeee22eeee2eee22ee2e2eeˇv!2!2e$e ˘e!ee2eevˇv!2!2e˂ ȘeeȘeee2!2e2evev!!22˘e2eeeee2eeee2ee22!2ee2v22eˉee!!e%e  ˘e!e!eeeeˌe!e Ș2e˘ȘȂe ˘ee1!!eȘe!eeܘe2!ee˘e22eeeee2e22 e22!22!2e˃T!e˃eˇC!C!ee˄T2!e˅e˘eeȁeeeeeCee!!e˘eeT!2e2eee2ee2 e22C2e2!2e˩T2!22e#˘˓e!e2Cee˩T2!22e˘ee˘eee2eeec2!!2e2Cܘ˘eT2!2ee2eee2e22e2e22e22e2e22!2e2C222e˂eT"eˇ!!T˓ee!2!e2ee˂e!Teeeeeeee!!Te2eee22!2!2e2!ee˘e2T˘e22eeee2ee22e2e!!Te22e2!22e˩e!!e%˘˂ˆe2!!eee!2C2e˩e!!e ȘeeeȘee2!!2e2e2!22ܘ2!!2eee2e2ee2e2ee222!!22!22ee˃e2e˄e˃˘˄e22eee2eeee˂e2e˃Ȅ˘2eeeȁee222e2e212eeܘee222eee2 e222eee2222e˘v!e%2ee˘eeee2!2ee˘v!!e˂Ȅe2ee22˘eeȘe2ee21221e22!ee˘˘ܘev!2˘e2e2˘22ee 22222!2e22eˉv!T%C2eˋeC!e˘˘ee2e2ee!22eeˊv!T ȏC22ee2eC!eeȅee2212.e121!2eevTeeC22e2eC!ee22ee2222!2e2eˈve2TeeˁeeeT2!22e2ee 2eeeeˈveeTee˘˂Ș2e1T2!22eȘee2e2c2 2eee˘eev22T22eee ˃ ee22T2!22e2˘e222e22 2e˘e!e"˘2!!ee2e ˇ˘ee! !Ce˘!eˁe2!e212122122eeȘeeee21! !Ceeܘܘܘe2!2˘e22!2222ee˘ee2e2e2e2! !C2e˂vT"e!!ee2eˆ2!!4ee˂vT e2!!122e2e2eȂee2c2!!eeevTee2!2e2ee22!222˩v2!22e ˂e!!ee2!e 22 eeve˩v2!22e˘˃1!!12!1eȄȘe2 !2evev!22eܘ!!2222!2eee2e2 22v2e˃eC2e˃2222e˘C!!2eeˉC2e2e˂22221221212eȁee2!!2e2C2ee˘e2222222ee2!222eˇe2!e!2!2ee˘eC2 2eeeˋe!2e e!2ceȘ˘ee1C2 2ee22e2!222ee˅˄ee22C 222e˘e!!!T˄ܘe2!2ee˘C22ee˂e!T˘˃ܘ22!!22e Ȃee22 eeee2!!!Teeeܘ e2!2e˃eee22eeˍveTeev˘˩˂T!!e˘e2!!eeeeˈveTeev˩T!!!1e2eȂȂe22!eeev2T22vee˂eT!!2ee2!2222ˇe!!CT2!!ee˘e!!2eeˌe!!!CT2!!12ceee1!!2eeܘe2!!CeT!!22ee22!2e˃eC˩˄e2!!2e˃e! !eev˃e!C˄e2!!!2ee ˘e2 !eveeCeܘ22!2eˋ˘e2 !22v2˅ee2e˘˩˂v!e˘e!2e˂e˩˘ˁv!2ceee Șe21! 2eeܘe2eev22e2e2ee˘ee2!22eˇe!!!C˄22ee˘ee!2!eeeˏe!!!C2!!2eeee21!!2!eee!!!Ceܘ2e˘ee2!!222eˇe!!2 2!ee ee22!2!eeˎe2˘2!!12eeeȃe2!2!!eeee22e˘!2ee2e2222eˋeC2C2e˩˃C!2e˘e2!!!!22eeˈC2Cee˃C!22_eeeȁȗee1!!!!!!22e˘e2CC22eeC!222e2ee2!!!!!2222e˂e2e˘!!!!2e˘e2!2!!!4eˇe2e22e!!22ee22!2!!e˘e2e˘!!2ee˄ee2!!2e˃vC!Te ˘eC!2!!22Tv˃vC˃T2!2eeȁȜee2!2!2!2Tv˘evCe˂T2e2eee2!!Tv2eˍe22!2T˘˩˃22˘ ee!2!!2!!!!2eveˁˇe22!2T˩˂e!22e˘e21!2!!2!!!!2eve2!Te˘e2eee22!!!!2v2eˊeC2eTe˄C!!!e˘ 222!!!!CeeˈCeeTe˘˄C!!!12e˂ȉe22!!!!!Ce˘eeC22T2eeܘC!!2eeee22!!!C2˃e!C#!2˘ ˘2!!!!!!2ee˄e!C˘2e˘e22!!!2eee2!Cee˘2eee2!!!!22e˃e!2˂2!2!e˘ˇe2!!! !2Ce˃e22!!2!2e˂ee2! !!2Cee22ee!!2ee22! 2C22˄v2e˩!!!2˘ee2!!2!2!2ev˃ve˩˘e!!!2ee2!!2!!2!!2eveev2eee!!2e2!!2v2ˇe!!!C˂"22!ee˅ee2!!!!!2eˁˎe!!!C!22!!!1eceeee22!!!!!22e˘2!!!Ceeܘ2!!!22e2e2!!!!2eˈe!2˂"e!!ee!2!!!!22C4eˏe!2˘"e!!!2e21!2!!22Cee˘˘ee22ee˂2!!! 2!!2C2eeˈe2CeCe˩˩2!!2!22e22!!!!!22eev˿ˈeeCeCe˩˘2!2!2212e2!!!!!!!!22eev˿ee2CC2eee2!!222!!!!22ve˂e!2C˂#C!2!!2!!!!!!!!!!2e˂e!2C˘!C!2!!2!!!!!!!!!!!22eeee2!2Ce˘C!!!2!!!!!!2ˉe!!2%e!!!!2!!!!!!!!!!2ee ˈe!!2˂#2!!!!2!!!!!!!2ee ee!2ee˂2!!!!!!!!2e˃e2e˘ˁ 22!!!!!!!!!!!2!!22ev ˄˘e2˘˂22!!!!!!!!2!22ev e2222eeܘ2!!!!!!22v ˊeC2C2e˂$e!!!!!!2!2!2!Cee!ˈeCeCee˘"e!!!!!2!2!!2!Cee!e2C2C22eee!e!!!C22ee!˂e!2˂'e2!!!!!2!!22e#˃e2˂'22!!!!2!!!!!!22ee#˘e22ee#2!!!!!!2e#ˁˊv2˃$܇Ce2!!2!!2!!2Cev$˘ˇv!!2e˘˃$܇C2!2!2!!!!2!2Cev$ev2ee#܇C2!!!2Cve$˂eTe(22!2!22ee&˂eTe˘˘'22!!!!!2!22ee&ee2T2e&2!!!!22&ˉe!2.ܘ!!!2!!!C2ee)ˉ˘e!!2ˁ,ܘ!!!2!C2e)ee˘)ܘ!!!!!!C22ee)˿˃e!˃,ܘe22!!2e*˃e!˘,ܘe2!!!2ee*ܘe2!ee+ee2!!!2e*˅e2Te˘/ee!222-˅eeTe˘˘˘.˘e1!222e-ee22T22 e-ee2!22-˃e2!2˘˂41˄e2!2˘4˘e1e!22ee˘1ܘe1˅e!n˅e!˃ke2!ejˁ˂e2ev˘jˁ2ev˘ˁiee22v2ei˃e2C˩˂l˃e2eC˘iܘe22Ceeeinetgen-6.2.1804/ng/Togl-1.7/image.h0000644000175000017500000000033713272137567015057 0ustar kurtkurt/* image.h */ #ifndef IMAGE_H # define IMAGE_H typedef struct _TK_RGBImageRec { int sizeX, sizeY, sizeZ; unsigned char *data; } TK_RGBImageRec; extern TK_RGBImageRec *tkRGBImageLoad(char *fileName); #endif netgen-6.2.1804/ng/Togl-1.7/LICENSE0000644000175000017500000000270513272137567014632 0ustar kurtkurtThis software is copyrighted by Brian Paul (brian@mesa3d.org) and Benjamin Bederson (bederson@cs.umd.edu). The following terms apply to all files associated with the software unless explicitly disclaimed in individual files. The authors hereby grant permission to use, copy, modify, distribute, and license this software and its documentation for any purpose, provided that existing copyright notices are retained in all copies and that this notice is included verbatim in any distributions. No written agreement, license, or royalty fee is required for any of the authorized uses. Modifications to this software may be copyrighted by their authors and need not follow the licensing terms described here, provided that the new terms are clearly indicated on the first page of each file where they apply. IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. netgen-6.2.1804/ng/Togl-1.7/configure.in0000644000175000017500000002051613272137567016136 0ustar kurtkurt#!/bin/bash -norc dnl This file is an input file used by the GNU "autoconf" program to dnl generate the file "configure", which is run during Tcl installation dnl to configure the system for the local environment. # # RCS: @(#) $Id: configure.in,v 1.6 2006/01/06 00:09:00 gregcouch Exp $ #----------------------------------------------------------------------- # Sample configure.in for Tcl Extensions. The only places you should # need to modify this file are marked by the string __CHANGE__ #----------------------------------------------------------------------- #----------------------------------------------------------------------- # __CHANGE__ # Set your package name and version numbers here. # # This initializes the environment with PACKAGE_NAME and PACKAGE_VERSION # set as provided. These will also be added as -D defs in your Makefile # so you can encode the package version directly into the source files. #----------------------------------------------------------------------- AC_INIT([Togl], [1.7]) #-------------------------------------------------------------------- # Call TEA_INIT as the first TEA_ macro to set up initial vars. # This will define a ${TEA_PLATFORM} variable == "unix" or "windows" # as well as PKG_LIB_FILE and PKG_STUB_LIB_FILE. #-------------------------------------------------------------------- TEA_INIT([3.4]) AC_CONFIG_AUX_DIR(tclconfig) #-------------------------------------------------------------------- # Load the tclConfig.sh file #-------------------------------------------------------------------- TEA_PATH_TCLCONFIG TEA_LOAD_TCLCONFIG #-------------------------------------------------------------------- # Load the tkConfig.sh file if necessary (Tk extension) #-------------------------------------------------------------------- TEA_PATH_TKCONFIG TEA_LOAD_TKCONFIG #----------------------------------------------------------------------- # Handle the --prefix=... option by defaulting to what Tcl gave. # Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER. #----------------------------------------------------------------------- TEA_PREFIX #----------------------------------------------------------------------- # Standard compiler checks. # This sets up CC by using the CC env var, or looks for gcc otherwise. # This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create # the basic setup necessary to compile executables. #----------------------------------------------------------------------- TEA_SETUP_COMPILER #----------------------------------------------------------------------- # __CHANGE__ # Specify the C source files to compile in TEA_ADD_SOURCES, # public headers that need to be installed in TEA_ADD_HEADERS, # stub library C source files to compile in TEA_ADD_STUB_SOURCES, # and runtime Tcl library files in TEA_ADD_TCL_SOURCES. # This defines PKG(_STUB)_SOURCES, PKG(_STUB)_OBJECTS, PKG_HEADERS # and PKG_TCL_SOURCES. #----------------------------------------------------------------------- TEA_ADD_SOURCES([togl.c]) # togl_ws.h is added in Makefile.in because it is generated TEA_ADD_HEADERS([togl.h]) TEA_ADD_INCLUDES([]) TEA_ADD_LIBS([]) TEA_ADD_CFLAGS([]) TEA_ADD_STUB_SOURCES([]) TEA_ADD_TCL_SOURCES([]) #-------------------------------------------------------------------- # __CHANGE__ # A few miscellaneous platform-specific items: # # Define a special symbol for Windows (BUILD_sample in this case) so # that we create the export library with the dll. # # Windows creates a few extra files that need to be cleaned up. # You can add more files to clean if your extension creates any extra # files. # # TEA_ADD_* any platform specific compiler/build info here. #-------------------------------------------------------------------- if test "${TEA_PLATFORM}" = "windows" ; then AC_DEFINE(BUILD_togl, 1, [Build windows export dll]) CLEANFILES="pkgIndex.tcl togl_ws.h *.lib *.dll *.exp *.ilk *.pdb vc*.pch" #TEA_ADD_SOURCES([win/winFile.c]) #TEA_ADD_INCLUDES([-I\"$(${CYGPATH} ${srcdir}/win)\"]) else CLEANFILES="pkgIndex.tcl togl_ws.h so_locations" #TEA_ADD_SOURCES([unix/unixFile.c]) #TEA_ADD_LIBS([-lsuperfly]) fi AC_SUBST(CLEANFILES) #-------------------------------------------------------------------- # __CHANGE__ # Choose which headers you need. Extension authors should try very # hard to only rely on the Tcl public header files. Internal headers # contain private data structures and are subject to change without # notice. # This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG #-------------------------------------------------------------------- TEA_PUBLIC_TCL_HEADERS #TEA_PRIVATE_TCL_HEADERS #TEA_PUBLIC_TK_HEADERS TEA_PRIVATE_TK_HEADERS TEA_PATH_X #-------------------------------------------------------------------- # __CHANGE__ # Choose OpenGL platform #-------------------------------------------------------------------- case "${TEA_WINDOWINGSYSTEM}" in aqua) AC_SUBST(TOGL_WINDOWINGSYSTEM,TOGL_AGL) TEA_ADD_LIBS([-framework AGL -framework OpenGL -framework ApplicationServices]) # libGLU is implicit in OpenGL framework LIBGLU= ;; x11) AC_SUBST(TOGL_WINDOWINGSYSTEM,TOGL_X11) TEA_ADD_LIBS([-lGL -lXmu]) LIBGLU=-lGLU ;; win32) AC_SUBST(TOGL_WINDOWINGSYSTEM,TOGL_WGL) TEA_ADD_LIBS([opengl32.lib user32.lib gdi32.lib]) if test "$GCC" = "yes" ; then LIBGLU=-lglu32 else LIBGLU=glu32.lib fi ;; *) AC_MSG_ERROR([Unsupported windowing system: ${TEA_WINDOWINGSYSTEM}]) ;; esac AC_SUBST(LIBGLU) #-------------------------------------------------------------------- # Check whether --enable-threads or --disable-threads was given. # This auto-enables if Tcl was compiled threaded. #-------------------------------------------------------------------- TEA_ENABLE_THREADS #-------------------------------------------------------------------- # The statement below defines a collection of symbols related to # building as a shared library instead of a static library. #-------------------------------------------------------------------- TEA_ENABLE_SHARED #-------------------------------------------------------------------- # This macro figures out what flags to use with the compiler/linker # when building shared/static debug/optimized objects. This information # can be taken from the tclConfig.sh file, but this figures it all out. #-------------------------------------------------------------------- TEA_CONFIG_CFLAGS # should be part of TEA_CONFIG_CFLAGS, but more visible modification here AC_SUBST(SHLIB_SUFFIX) #-------------------------------------------------------------------- # Set the default compiler switches based on the --enable-symbols option. #-------------------------------------------------------------------- TEA_ENABLE_SYMBOLS #-------------------------------------------------------------------- # Everyone should be linking against the Tcl stub library. If you # can't for some reason, remove this definition. If you aren't using # stubs, you also need to modify the SHLIB_LD_LIBS setting below to # link against the non-stubbed Tcl library. Add Tk too if necessary. #-------------------------------------------------------------------- AC_DEFINE(USE_TCL_STUBS, 1, [Use Tcl stubs]) AC_DEFINE(USE_TK_STUBS, 1, [Use Tk stubs]) #-------------------------------------------------------------------- # This macro generates a line to use when building a library. It # depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS, # and TEA_LOAD_TCLCONFIG macros above. #-------------------------------------------------------------------- TEA_MAKE_LIB #-------------------------------------------------------------------- # Determine the name of the tclsh and/or wish executables in the # Tcl and Tk build directories or the location they were installed # into. These paths are used to support running test cases only, # the Makefile should not be making use of these paths to generate # a pkgIndex.tcl file or anything else at extension build time. #-------------------------------------------------------------------- TEA_PROG_TCLSH TEA_PROG_WISH #-------------------------------------------------------------------- # Finally, substitute all of the various values into the Makefile. # You may alternatively have a special pkgIndex.tcl.in or other files # which require substituting th AC variables in. Include these here. #-------------------------------------------------------------------- AC_OUTPUT([Makefile pkgIndex.tcl togl_ws.h]) netgen-6.2.1804/ng/Togl-1.7/overlay.c0000644000175000017500000001067213272137567015454 0ustar kurtkurt/* $Id: overlay.c,v 1.7 2005/04/23 07:49:13 gregcouch Exp $ */ /* * Togl - a Tk OpenGL widget * Copyright (C) 1996-1997 Brian Paul and Ben Bederson * See the LICENSE file for copyright details. */ /* * An example Togl program using an overlay. */ #include "togl.h" #include #include /* * The following variable is a special hack that is needed in order for * Sun shared libraries to be used for Tcl. */ #ifdef SUN extern int matherr(); int *tclDummyMathPtr = (int *) matherr; #endif /* Overlay color indexes: */ static unsigned long Red, Green; /* * Togl widget create callback. This is called by Tcl/Tk when the widget has * been realized. Here's where one may do some one-time context setup or * initializations. */ void create_cb(Togl *togl) { /* allocate overlay color indexes */ Red = Togl_AllocColorOverlay(togl, 1.0, 0.0, 0.0); Green = Togl_AllocColorOverlay(togl, 0.0, 1.0, 0.0); /* in this demo we always show the overlay */ if (Togl_ExistsOverlay(togl)) { Togl_ShowOverlay(togl); printf("Red and green lines are in the overlay\n"); } else { printf("Sorry, this display doesn't support overlays\n"); } } /* * Togl widget reshape callback. This is called by Tcl/Tk when the widget * has been resized. Typically, we call glViewport and perhaps setup the * projection matrix. */ void reshape_cb(Togl *togl) { int width = Togl_Width(togl); int height = Togl_Height(togl); float aspect = (float) width / (float) height; /* Set up viewing for normal plane's context */ glViewport(0, 0, width, height); glMatrixMode(GL_PROJECTION); glLoadIdentity(); glOrtho(-aspect, aspect, -1.0, 1.0, -1.0, 1.0); glMatrixMode(GL_MODELVIEW); /* Set up viewing for overlay plane's context */ if (Togl_ExistsOverlay(togl)) { Togl_UseLayer(togl, TOGL_OVERLAY); glViewport(0, 0, width, height); glMatrixMode(GL_PROJECTION); glLoadIdentity(); glOrtho(-1.0, 1.0, -1.0, 1.0, -1.0, 1.0); glMatrixMode(GL_MODELVIEW); Togl_UseLayer(togl, TOGL_NORMAL); } } /* * Togl widget overlay display callback. This is called by Tcl/Tk when the * overlay has to be redrawn. */ void overlay_display_cb(Togl *togl) { glClear(GL_COLOR_BUFFER_BIT); glIndexi(Red); glBegin(GL_LINES); glVertex2f(-1.0, -1.0); glVertex2f(1.0, 1.0); glVertex2f(-1.0, 1.0); glVertex2f(1.0, -1.0); glEnd(); glIndexi(Green); glBegin(GL_LINE_LOOP); glVertex2f(-0.5, -0.5); glVertex2f(0.5, -0.5); glVertex2f(0.5, 0.5); glVertex2f(-0.5, 0.5); glEnd(); glFlush(); } /* * Togl widget display callback. This is called by Tcl/Tk when the widget's * contents have to be redrawn. Typically, we clear the color and depth * buffers, render our objects, then swap the front/back color buffers. */ void display_cb(Togl *togl) { glClear(GL_COLOR_BUFFER_BIT); glLoadIdentity(); glBegin(GL_TRIANGLES); glColor3f(1.0, 0.0, 1.0); glVertex2f(-0.5, -0.3); glVertex2f(0.5, -0.3); glVertex2f(0.0, 0.6); glColor3f(1.0, 1.0, 0.0); glVertex2f(-0.5 + 0.2, -0.3 - 0.2); glVertex2f(0.5 + 0.2, -0.3 - 0.2); glVertex2f(0.0 + 0.2, 0.6 - 0.2); glColor3f(0.0, 1.0, 1.0); glVertex2f(-0.5 + 0.4, -0.3 - 0.4); glVertex2f(0.5 + 0.4, -0.3 - 0.4); glVertex2f(0.0 + 0.4, 0.6 - 0.4); glEnd(); glFlush(); } /* * Called by Tk_Main() to let me initialize the modules (Togl) I will need. */ TOGL_EXTERN int Overlay_Init(Tcl_Interp *interp) { /* * Initialize Tcl, Tk, and the Togl widget module. */ #ifdef USE_TCL_STUBS if (Tcl_InitStubs(interp, "8.1", 0) == NULL) { return TCL_ERROR; } #endif #ifdef USE_TK_STUBS if (Tk_InitStubs(interp, "8.1", 0) == NULL) { return TCL_ERROR; } #endif if (Togl_Init(interp) == TCL_ERROR) { return TCL_ERROR; } /* * Specify the C callback functions for widget creation, display, * and reshape. */ Togl_CreateFunc(create_cb); Togl_DisplayFunc(display_cb); Togl_ReshapeFunc(reshape_cb); Togl_OverlayDisplayFunc(overlay_display_cb); /* * Make a new Togl widget command so the Tcl code can set a C variable. */ /* NONE */ /* * Call Tcl_CreateCommand for application-specific commands, if * they weren't already created by the init procedures called above. */ return TCL_OK; } netgen-6.2.1804/ng/Togl-1.7/stereo.tcl0000644000175000017500000000554313272137567015635 0ustar kurtkurt#!/bin/sh # the next line restarts using wish \ exec wish "$0" "$@" # $Id: stereo.tcl,v 1.4 2004/12/21 05:28:39 gregcouch Exp $ # Togl - a Tk OpenGL widget # Copyright (C) 1996 Brian Paul and Ben Bederson # See the LICENSE file for copyright details. # $Log: stereo.tcl,v $ # Revision 1.4 2004/12/21 05:28:39 gregcouch # Apply outstanding patches and Mac OS X support. # # Revision 1.3 2001/12/20 13:59:31 beskow # Improved error-handling in togl.c in case of window creation failure # Added pkgIndex target to makefile # Updated documentation to reflect stubs-interface (Togl.html + new README.stubs) # Added tk8.4a3 headers # Removed obsolete Tk internal headers # # Revision 1.2 2001/01/29 18:11:53 brianp # Jonas Beskow's changes to use Tcl/Tk stub interface # # Revision 1.1 1997/10/01 02:53:12 brianp # Initial revision # # # Revision 1.1 1997/9/28 18:54:46 Ben Evans # Initial revision. Based on double.tcl # # An Tk/OpenGL widget demo with two windows, one single buffered and the # other double buffered. load [file dirname [info script]]/stereo[info sharedlibextension] proc setup {} { global scale set scale 1.0 wm title . "Full Screen Stereo Buffering" frame .f1 togl .f1.o1 -width 200 -height 200 -rgba true -stereo true -double true -depth true -ident "stereo buffer" scale .sx -label {X Axis} -from 0 -to 360 -command {setAngle x} -orient horizontal scale .sy -label {Y Axis} -from 0 -to 360 -command {setAngle y} -orient horizontal button .btn -text Quit -command exit bind .f1.o1 { motion_event [lindex [%W config -width] 4] \ [lindex [%W config -height] 4] \ %x %y } bind .f1.o1 { set startx %x set starty %y set scale0 $scale } bind .f1.o1 { set q [ expr ($starty - %y) / 400.0 ] set scale [expr $scale0 * exp($q)] .f1.o1 scale $scale } pack .f1.o1 -side left -padx 3 -pady 3 -fill both -expand t pack .f1 -fill both -expand t pack .sx -fill x pack .sy -fill x pack .btn -fill x if {[string first $::tcl_platform(os) IRIX] != -1} { puts "use /usr/gfx/setmon -n 60 to reset display and /usr/gfx/setmon -n STR_RECT to put in display in stereo mode" } } # This is called when mouse button 1 is pressed and moved in either of # the OpenGL windows. proc motion_event { width height x y } { .f1.o1 setXrot [expr 360.0 * $y / $height] .f1.o1 setYrot [expr 360.0 * ($width - $x) / $width] # .sx set [expr 360.0 * $y / $height] # .sy set [expr 360.0 * ($width - $x) / $width] .sx set [getXrot] .sy set [getYrot] } # This is called when a slider is changed. proc setAngle {axis value} { global xAngle yAngle zAngle switch -exact $axis { x {.f1.o1 setXrot $value} y {.f1.o1 setYrot $value} } } # Execution starts here! setup netgen-6.2.1804/ng/Togl-1.7/pkgIndex.tcl.in0000644000175000017500000000020113272137567016474 0ustar kurtkurt# # Tcl package index file # package ifneeded @PACKAGE_NAME@ @PACKAGE_VERSION@ \ [list load [file join $dir @PKG_LIB_FILE@]] netgen-6.2.1804/ng/Togl-1.7/overlay.tcl0000644000175000017500000000230213272137567016003 0ustar kurtkurt#!/bin/sh # the next line restarts using wish \ exec wish "$0" "$@" # $Id: overlay.tcl,v 1.4 2001/12/20 13:59:31 beskow Exp $ # Togl - a Tk OpenGL widget # Copyright (C) 1996 Brian Paul and Ben Bederson # See the LICENSE file for copyright details. # $Log: overlay.tcl,v $ # Revision 1.4 2001/12/20 13:59:31 beskow # Improved error-handling in togl.c in case of window creation failure # Added pkgIndex target to makefile # Updated documentation to reflect stubs-interface (Togl.html + new README.stubs) # Added tk8.4a3 headers # Removed obsolete Tk internal headers # # Revision 1.3 2001/01/29 18:11:53 brianp # Jonas Beskow's changes to use Tcl/Tk stub interface # # Revision 1.2 1998/01/24 14:05:50 brianp # added quit button (Ben Bederson) # # Revision 1.1 1997/03/07 01:26:38 brianp # Initial revision # # # A Tk/OpenGL widget demo using an overlay. load [file dirname [info script]]/overlay[info sharedlibextension] proc setup {} { wm title . "Overlay demo" togl .win -width 200 -height 200 -rgba true -double false -overlay true button .btn -text Quit -command exit pack .win -expand true -fill both pack .btn -expand true -fill both } # Execution starts here! setup netgen-6.2.1804/ng/Togl-1.7/stereo.c0000644000175000017500000002121613272137567015270 0ustar kurtkurt/* $Id: stereo.c,v 1.6 2005/04/23 07:49:13 gregcouch Exp $ */ /* * Togl - a Tk OpenGL widget * Copyright (C) 1996-1997 Brian Paul and Ben Bederson * See the LICENSE file for copyright details. */ #include "togl.h" #include #include /* * The following variable is a special hack that is needed in order for * Sun shared libraries to be used for Tcl. */ #ifdef SUN extern int matherr(); int *tclDummyMathPtr = (int *) matherr; #endif static GLuint FontBase; static float xAngle = 0.0, yAngle = 0.0, zAngle = 0.0; static GLfloat CornerX, CornerY, CornerZ; /* where to print strings */ static GLfloat scale = 1.0; /* * Togl widget create callback. This is called by Tcl/Tk when the widget has * been realized. Here's where one may do some one-time context setup or * initializations. */ void create_cb(Togl *togl) { FontBase = Togl_LoadBitmapFont(togl, TOGL_BITMAP_8_BY_13); if (!FontBase) { printf("Couldn't load font!\n"); exit(1); } } /* * Togl widget reshape callback. This is called by Tcl/Tk when the widget * has been resized. Typically, we call glViewport and perhaps setup the * projection matrix. */ void reshape_cb(Togl *togl) { int width = Togl_Width(togl); int height = Togl_Height(togl); float aspect = (float) width / (float) height; glViewport(0, 0, width, height); /* Set up projection transform */ glMatrixMode(GL_PROJECTION); glLoadIdentity(); glFrustum(-aspect, aspect, -1.0, 1.0, 1.0, 10.0); CornerX = -aspect; CornerY = -1.0; CornerZ = -1.1; /* Change back to model view transform for rendering */ glMatrixMode(GL_MODELVIEW); } static void print_string(const char *s) { glCallLists(strlen(s), GL_UNSIGNED_BYTE, s); } /* * Togl widget display callback. This is called by Tcl/Tk when the widget's * contents have to be redrawn. Typically, we clear the color and depth * buffers, render our objects, then swap the front/back color buffers. */ void display_cb(Togl *togl) { const char *ident; GLfloat eyeDist = 2.0; GLfloat eyeOffset = 0.05; glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glLoadIdentity(); /* Reset modelview matrix to the identity * matrix */ glTranslatef(0.0, 0.0, -3.0); /* Move the camera back three units */ glScalef(scale, scale, scale); /* Zoom in and out */ glRotatef(xAngle, 1.0, 0.0, 0.0); /* Rotate by X, Y, and Z angles */ glRotatef(yAngle, 0.0, 1.0, 0.0); glRotatef(zAngle, 0.0, 0.0, 1.0); glEnable(GL_DEPTH_TEST); /* stereo right eye */ glMatrixMode(GL_PROJECTION); glLoadIdentity(); Togl_StereoFrustum(-1, 1, -1, 1, 1, 10, eyeDist, eyeOffset); glMatrixMode(GL_MODELVIEW); #ifdef OLD_STEREO Togl_OldStereoDrawBuffer(GL_BACK_RIGHT); Togl_OldStereoClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); #else glDrawBuffer(GL_BACK_RIGHT); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); #endif /* Front face */ glBegin(GL_QUADS); glColor3f(0.0, 0.7, 0.1); /* Green */ glVertex3f(-1.0, 1.0, 1.0); glVertex3f(1.0, 1.0, 1.0); glVertex3f(1.0, -1.0, 1.0); glVertex3f(-1.0, -1.0, 1.0); /* Back face */ glColor3f(0.9, 1.0, 0.0); /* Yellow */ glVertex3f(-1.0, 1.0, -1.0); glVertex3f(1.0, 1.0, -1.0); glVertex3f(1.0, -1.0, -1.0); glVertex3f(-1.0, -1.0, -1.0); /* Top side face */ glColor3f(0.2, 0.2, 1.0); /* Blue */ glVertex3f(-1.0, 1.0, 1.0); glVertex3f(1.0, 1.0, 1.0); glVertex3f(1.0, 1.0, -1.0); glVertex3f(-1.0, 1.0, -1.0); /* Bottom side face */ glColor3f(0.7, 0.0, 0.1); /* Red */ glVertex3f(-1.0, -1.0, 1.0); glVertex3f(1.0, -1.0, 1.0); glVertex3f(1.0, -1.0, -1.0); glVertex3f(-1.0, -1.0, -1.0); glEnd(); /* stereo left eye */ glMatrixMode(GL_PROJECTION); glLoadIdentity(); Togl_StereoFrustum(-1, 1, -1, 1, 1, 10, eyeDist, -eyeOffset); glMatrixMode(GL_MODELVIEW); #ifdef OLD_STEREO Togl_OldStereoDrawBuffer(GL_BACK_LEFT); Togl_OldStereoClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); #else glDrawBuffer(GL_BACK_LEFT); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); #endif /* Front face */ glBegin(GL_QUADS); glColor3f(0.0, 0.7, 0.1); /* Green */ glVertex3f(-1.0, 1.0, 1.0); glVertex3f(1.0, 1.0, 1.0); glVertex3f(1.0, -1.0, 1.0); glVertex3f(-1.0, -1.0, 1.0); /* Back face */ glColor3f(0.9, 1.0, 0.0); /* Yellow */ glVertex3f(-1.0, 1.0, -1.0); glVertex3f(1.0, 1.0, -1.0); glVertex3f(1.0, -1.0, -1.0); glVertex3f(-1.0, -1.0, -1.0); /* Top side face */ glColor3f(0.2, 0.2, 1.0); /* Blue */ glVertex3f(-1.0, 1.0, 1.0); glVertex3f(1.0, 1.0, 1.0); glVertex3f(1.0, 1.0, -1.0); glVertex3f(-1.0, 1.0, -1.0); /* Bottom side face */ glColor3f(0.7, 0.0, 0.1); /* Red */ glVertex3f(-1.0, -1.0, 1.0); glVertex3f(1.0, -1.0, 1.0); glVertex3f(1.0, -1.0, -1.0); glVertex3f(-1.0, -1.0, -1.0); glEnd(); glDisable(GL_DEPTH_TEST); glLoadIdentity(); glColor3f(1.0, 1.0, 1.0); glRasterPos3f(CornerX, CornerY, CornerZ); glListBase(FontBase); /* ident = Togl_Ident( togl ); if (strcmp(ident,"Single")==0) { * print_string( "Single buffered" ); } else { print_string( "Double * buffered" ); } */ print_string(Togl_Ident(togl)); Togl_SwapBuffers(togl); } int setXrot_cb(Togl *togl, int argc, CONST84 char *argv[]) { Tcl_Interp *interp = Togl_Interp(togl); /* error checking */ if (argc != 3) { Tcl_SetResult(interp, "wrong # args: should be \"pathName setXrot ?angle?\"", TCL_STATIC); return TCL_ERROR; } xAngle = atof(argv[2]); /* printf( "before %f ", xAngle ); */ if (xAngle < 0.0) { xAngle += 360.0; } else if (xAngle > 360.0) { xAngle -= 360.0; } /* printf( "after %f \n", xAngle ); */ Togl_PostRedisplay(togl); /* Let result string equal value */ strcpy(interp->result, argv[2]); return TCL_OK; } int setYrot_cb(Togl *togl, int argc, CONST84 char *argv[]) { Tcl_Interp *interp = Togl_Interp(togl); /* error checking */ if (argc != 3) { Tcl_SetResult(interp, "wrong # args: should be \"pathName setYrot ?angle?\"", TCL_STATIC); return TCL_ERROR; } yAngle = atof(argv[2]); if (yAngle < 0.0) { yAngle += 360.0; } else if (yAngle > 360.0) { yAngle -= 360.0; } Togl_PostRedisplay(togl); /* Let result string equal value */ strcpy(interp->result, argv[2]); return TCL_OK; } int getXrot_cb(ClientData clientData, Tcl_Interp *interp, int argc, CONST84 char *argv[]) { sprintf(interp->result, "%d", (int) xAngle); return TCL_OK; } int getYrot_cb(ClientData clientData, Tcl_Interp *interp, int argc, CONST84 char *argv[]) { sprintf(interp->result, "%d", (int) yAngle); return TCL_OK; } int scale_cb(Togl *togl, int argc, CONST84 char *argv[]) { Tcl_Interp *interp = Togl_Interp(togl); /* error checking */ if (argc != 3) { Tcl_SetResult(interp, "wrong # args: should be \"pathName scale ?value?\"", TCL_STATIC); return TCL_ERROR; } scale = atof(argv[2]); Togl_PostRedisplay(togl); /* Let result string equal value */ strcpy(interp->result, argv[2]); return TCL_OK; } TOGL_EXTERN int Stereo_Init(Tcl_Interp *interp) { /* * Initialize Tcl, Tk, and the Togl widget module. */ #ifdef USE_TCL_STUBS if (Tcl_InitStubs(interp, "8.1", 0) == NULL) { return TCL_ERROR; } #endif #ifdef USE_TK_STUBS if (Tk_InitStubs(interp, "8.1", 0) == NULL) { return TCL_ERROR; } #endif if (Togl_Init(interp) == TCL_ERROR) { return TCL_ERROR; } /* * Specify the C callback functions for widget creation, display, * and reshape. */ Togl_CreateFunc(create_cb); Togl_DisplayFunc(display_cb); Togl_ReshapeFunc(reshape_cb); /* * Make a new Togl widget command so the Tcl code can set a C variable. */ Togl_CreateCommand("setXrot", setXrot_cb); Togl_CreateCommand("setYrot", setYrot_cb); Togl_CreateCommand("scale", scale_cb); /* * Call Tcl_CreateCommand for application-specific commands, if * they weren't already created by the init procedures called above. */ Tcl_CreateCommand(interp, "getXrot", getXrot_cb, (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); Tcl_CreateCommand(interp, "getYrot", getYrot_cb, (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); return TCL_OK; } netgen-6.2.1804/ng/Togl-1.7/double.tcl0000644000175000017500000000552213272137567015603 0ustar kurtkurt#!/bin/sh # the next line restarts using wish \ exec wish "$0" "$@" # $Id: double.tcl,v 1.5 2001/12/20 13:59:31 beskow Exp $ # Togl - a Tk OpenGL widget # Copyright (C) 1996 Brian Paul and Ben Bederson # See the LICENSE file for copyright details. # $Log: double.tcl,v $ # Revision 1.5 2001/12/20 13:59:31 beskow # Improved error-handling in togl.c in case of window creation failure # Added pkgIndex target to makefile # Updated documentation to reflect stubs-interface (Togl.html + new README.stubs) # Added tk8.4a3 headers # Removed obsolete Tk internal headers # # Revision 1.4 2001/01/29 18:11:53 brianp # Jonas Beskow's changes to use Tcl/Tk stub interface # # Revision 1.3 1998/03/12 03:52:31 brianp # now sharing display lists between the widgets # # Revision 1.2 1996/10/23 23:31:56 brianp # added -ident options to togl calls # # Revision 1.1 1996/10/23 23:17:22 brianp # Initial revision # # An Tk/OpenGL widget demo with two windows, one single buffered and the # other double buffered. load [file dirname [info script]]/double[info sharedlibextension] proc setup {} { wm title . "Single vs Double Buffering" frame .f1 # create first Togl widget togl .f1.o1 -width 200 -height 200 -rgba true -double false -depth true -ident Single # create second Togl widget, share display lists with first widget togl .f1.o2 -width 200 -height 200 -rgba true -double true -depth true -ident Double -sharelist Single scale .sx -label {X Axis} -from 0 -to 360 -command {setAngle x} -orient horizontal scale .sy -label {Y Axis} -from 0 -to 360 -command {setAngle y} -orient horizontal button .btn -text Quit -command exit bind .f1.o1 { motion_event [lindex [%W config -width] 4] \ [lindex [%W config -height] 4] \ %x %y } bind .f1.o2 { motion_event [lindex [%W config -width] 4] \ [lindex [%W config -height] 4] \ %x %y } pack .f1.o1 .f1.o2 -side left -padx 3 -pady 3 -fill both -expand t pack .f1 -fill both -expand t pack .sx -fill x pack .sy -fill x pack .btn -fill x } # This is called when mouse button 1 is pressed and moved in either of # the OpenGL windows. proc motion_event { width height x y } { .f1.o1 setXrot [expr 360.0 * $y / $height] .f1.o2 setXrot [expr 360.0 * $y / $height] .f1.o1 setYrot [expr 360.0 * ($width - $x) / $width] .f1.o2 setYrot [expr 360.0 * ($width - $x) / $width] # .sx set [expr 360.0 * $y / $height] # .sy set [expr 360.0 * ($width - $x) / $width] .sx set [getXrot] .sy set [getYrot] } # This is called when a slider is changed. proc setAngle {axis value} { global xAngle yAngle zAngle switch -exact $axis { x {.f1.o1 setXrot $value .f1.o2 setXrot $value} y {.f1.o1 setYrot $value .f1.o2 setYrot $value} } } # Execution starts here! setup netgen-6.2.1804/ng/Togl-1.7/gears.c0000644000175000017500000002477313272137567015103 0ustar kurtkurt/* gears.c */ /* * 3-D gear wheels. This program is in the public domain. * * Brian Paul * * * Modified to work under Togl as a widget for TK 1997 * * Philip Quaife * */ #include "togl.h" #include #include #include #ifndef M_PI # define M_PI 3.14159265 #endif struct WHIRLYGIZMO { GLint Gear1, Gear2, Gear3; GLfloat Rotx, Roty, Rotz; GLfloat Angle; int Height, Width; }; /* * Draw a gear wheel. You'll probably want to call this function when * building a display list since we do a lot of trig here. * * Input: inner_radius - radius of hole at center * outer_radius - radius at center of teeth * width - width of gear * teeth - number of teeth * tooth_depth - depth of tooth */ static void gear(GLfloat inner_radius, GLfloat outer_radius, GLfloat width, GLint teeth, GLfloat tooth_depth) { GLint i; GLfloat r0, r1, r2; GLfloat angle, da; GLfloat u, v, len; r0 = inner_radius; r1 = outer_radius - tooth_depth / 2.0; r2 = outer_radius + tooth_depth / 2.0; da = 2.0 * M_PI / teeth / 4.0; glShadeModel(GL_FLAT); glNormal3f(0.0, 0.0, 1.0); /* draw front face */ glBegin(GL_QUAD_STRIP); for (i = 0; i <= teeth; i++) { angle = i * 2.0 * M_PI / teeth; glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5); glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5); glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5); glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), width * 0.5); } glEnd(); /* draw front sides of teeth */ glBegin(GL_QUADS); da = 2.0 * M_PI / teeth / 4.0; for (i = 0; i < teeth; i++) { angle = i * 2.0 * M_PI / teeth; glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5); glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), width * 0.5); glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), width * 0.5); glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), width * 0.5); } glEnd(); glNormal3f(0.0, 0.0, -1.0); /* draw back face */ glBegin(GL_QUAD_STRIP); for (i = 0; i <= teeth; i++) { angle = i * 2.0 * M_PI / teeth; glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5); glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5); glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), -width * 0.5); glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5); } glEnd(); /* draw back sides of teeth */ glBegin(GL_QUADS); da = 2.0 * M_PI / teeth / 4.0; for (i = 0; i < teeth; i++) { angle = i * 2.0 * M_PI / teeth; glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), -width * 0.5); glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), -width * 0.5); glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), -width * 0.5); glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5); } glEnd(); /* draw outward faces of teeth */ glBegin(GL_QUAD_STRIP); for (i = 0; i < teeth; i++) { angle = i * 2.0 * M_PI / teeth; glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5); glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5); u = r2 * cos(angle + da) - r1 * cos(angle); v = r2 * sin(angle + da) - r1 * sin(angle); len = sqrt(u * u + v * v); u /= len; v /= len; glNormal3f(v, -u, 0.0); glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), width * 0.5); glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), -width * 0.5); glNormal3f(cos(angle), sin(angle), 0.0); glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), width * 0.5); glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), -width * 0.5); u = r1 * cos(angle + 3 * da) - r2 * cos(angle + 2 * da); v = r1 * sin(angle + 3 * da) - r2 * sin(angle + 2 * da); glNormal3f(v, -u, 0.0); glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), width * 0.5); glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), -width * 0.5); glNormal3f(cos(angle), sin(angle), 0.0); } glVertex3f(r1 * cos(0), r1 * sin(0), width * 0.5); glVertex3f(r1 * cos(0), r1 * sin(0), -width * 0.5); glEnd(); glShadeModel(GL_SMOOTH); /* draw inside radius cylinder */ glBegin(GL_QUAD_STRIP); for (i = 0; i <= teeth; i++) { angle = i * 2.0 * M_PI / teeth; glNormal3f(-cos(angle), -sin(angle), 0.0); glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5); glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5); } glEnd(); } /* * static GLfloat view_rotx=20.0, view_roty=30.0, view_rotz=0.0; static GLint * gear1, gear2, gear3; static GLfloat angle = 0.0; */ static GLuint limit; static GLuint count = 1; static GLubyte polycolor[4] = { 255, 255, 255, 255 }; static void draw(Togl *togl) { struct WHIRLYGIZMO *Wg; glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); Wg = Togl_GetClientData(togl); glDisable(GL_TEXTURE_2D); glPushMatrix(); glRotatef(Wg->Rotx, 1.0, 0.0, 0.0); glRotatef(Wg->Roty, 0.0, 1.0, 0.0); glRotatef(Wg->Rotz, 0.0, 0.0, 1.0); glPushMatrix(); glTranslatef(-3.0, -2.0, 0.0); glRotatef(Wg->Angle, 0.0, 0.0, 1.0); glEnable(GL_DEPTH_TEST); glCallList(Wg->Gear1); glEnable(GL_DEPTH_TEST); glPopMatrix(); glPushMatrix(); glTranslatef(3.1, -2.0, 0.0); glRotatef(-2.0 * Wg->Angle - 9.0, 0.0, 0.0, 1.0); glCallList(Wg->Gear2); glPopMatrix(); glPushMatrix(); glTranslatef(-3.1, 4.2, 0.0); glRotatef(-2.0 * Wg->Angle - 25.0, 0.0, 0.0, 1.0); glCallList(Wg->Gear3); glPopMatrix(); glPopMatrix(); Togl_SwapBuffers(togl); } static void zap(Togl *togl) { struct WHIRLYGIZMO *Wg; Wg = Togl_GetClientData(togl); free(Wg); } static void idle(Togl *togl) { struct WHIRLYGIZMO *Wg; Wg = Togl_GetClientData(togl); Wg->Angle += 2.0; Togl_PostRedisplay(togl); } /* change view angle, exit upon ESC */ /* * static GLenum key(int k, GLenum mask) { switch (k) { case TK_UP: view_rotx * += 5.0; return GL_TRUE; case TK_DOWN: view_rotx -= 5.0; return GL_TRUE; case * TK_LEFT: view_roty += 5.0; return GL_TRUE; case TK_RIGHT: view_roty -= 5.0; * return GL_TRUE; case TK_z: view_rotz += 5.0; return GL_TRUE; case TK_Z: * view_rotz -= 5.0; return GL_TRUE; } return GL_FALSE; } */ /* new window size or exposure */ static void reshape(Togl *togl) { int width, height; width = Togl_Width(togl); height = Togl_Height(togl); glViewport(0, 0, (GLint) width, (GLint) height); glMatrixMode(GL_PROJECTION); glLoadIdentity(); if (width > height) { GLfloat w = (GLfloat) width / (GLfloat) height; glFrustum(-w, w, -1.0, 1.0, 5.0, 60.0); } else { GLfloat h = (GLfloat) height / (GLfloat) width; glFrustum(-1.0, 1.0, -h, h, 5.0, 60.0); } glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glTranslatef(0.0, 0.0, -40.0); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); } static void init(Togl *togl) { struct WHIRLYGIZMO *Wg; static GLfloat red[4] = { 0.8, 0.1, 0.0, 1.0 }; static GLfloat green[4] = { 0.0, 0.8, 0.2, 1.0 }; static GLfloat blue[4] = { 0.2, 0.2, 1.0, 1.0 }; static GLfloat pos[4] = { 5.0, 5.0, 10.0, 0.0 }; glLightfv(GL_LIGHT0, GL_POSITION, pos); glEnable(GL_CULL_FACE); glEnable(GL_LIGHTING); glEnable(GL_LIGHT0); glEnable(GL_DEPTH_TEST); /* make the gears */ Wg = malloc(sizeof (*Wg)); if (!Wg) { Tcl_SetResult(Togl_Interp(togl), "\"Cannot allocate client data for widget\"", TCL_STATIC); } Wg->Gear1 = glGenLists(1); glNewList(Wg->Gear1, GL_COMPILE); glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, red); gear(1.0, 4.0, 1.0, 20, 0.7); glEndList(); Wg->Gear2 = glGenLists(1); glNewList(Wg->Gear2, GL_COMPILE); glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, green); gear(0.5, 2.0, 2.0, 10, 0.7); glEndList(); Wg->Gear3 = glGenLists(1); glNewList(Wg->Gear3, GL_COMPILE); glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, blue); gear(1.3, 2.0, 0.5, 10, 0.7); glEndList(); glEnable(GL_NORMALIZE); Wg->Height = Togl_Height(togl); Wg->Width = Togl_Width(togl); Wg->Angle = 0.0; Wg->Rotx = 0.0; Wg->Roty = 0.0; Wg->Rotz = 0.0; Togl_SetClientData(togl, (ClientData) Wg); } int position(Togl *togl, int argc, CONST84 char *argv[]) { struct WHIRLYGIZMO *Wg; Tcl_Interp *interp = Togl_Interp(togl); char Result[100]; Wg = Togl_GetClientData(togl); /* error checking */ if (argc != 2) { Tcl_SetResult(interp, "wrong # args: should be \"pathName \"", TCL_STATIC); return TCL_ERROR; } /* Let result string equal value */ sprintf(Result, "%g %g", Wg->Roty, Wg->Rotx); Tcl_SetResult(interp, Result, TCL_VOLATILE); return TCL_OK; } int rotate(Togl *togl, int argc, CONST84 char *argv[]) { struct WHIRLYGIZMO *Wg; Tcl_Interp *interp = Togl_Interp(togl); Wg = Togl_GetClientData(togl); /* error checking */ if (argc != 4) { Tcl_SetResult(interp, "wrong # args: should be \"pathName xrot yrot\"", TCL_STATIC); return TCL_ERROR; } Wg->Roty = atof(argv[2]); Wg->Rotx = atof(argv[3]); Togl_PostRedisplay(togl); /* Let result string equal value */ strcpy(interp->result, argv[2]); return TCL_OK; } TOGL_EXTERN int Gears_Init(Tcl_Interp *interp) { /* * Initialize Tcl, Tk, and the Togl widget module. */ #ifdef USE_TCL_STUBS if (Tcl_InitStubs(interp, "8.1", 0) == NULL) { return TCL_ERROR; } #endif #ifdef USE_TK_STUBS if (Tk_InitStubs(interp, "8.1", 0) == NULL) { return TCL_ERROR; } #endif if (Togl_Init(interp) == TCL_ERROR) { return TCL_ERROR; } /* * Specify the C callback functions for widget creation, display, * and reshape. */ Togl_CreateFunc(init); Togl_DestroyFunc(zap); Togl_DisplayFunc(draw); Togl_ReshapeFunc(reshape); Togl_TimerFunc(idle); Togl_CreateCommand("rotate", rotate); Togl_CreateCommand("position", position); return TCL_OK; } netgen-6.2.1804/ng/Togl-1.7/gears.tcl0000755000175000017500000000356413272137567015441 0ustar kurtkurt#!/bin/sh # the next line restarts using wish \ exec wish "$0" "$@" # Togl - a Tk OpenGL widget # Copyright (C) 1996-1997 Brian Paul and Ben Bederson # See the LICENSE file for copyright details. # # Test Togl using GL Gears Demo # # Copyright (C) 1997 Philip Quaife # load [file dirname [info script]]/gears[info sharedlibextension] proc setup {} { global startx starty xangle0 yangle0 xangle yangle RotCnt global vTime set RotCnt 1 set xangle 0.0 set yangle 0.0 set vTime 100 wm title . "Rotating Gear Widget Test" label .t -text "Click and drag to rotate image" pack .t -side top -padx 2 -pady 10 frame .f pack .f -side top button .f.n1 -text " Add " -command AutoRot button .f.r1 -text "Remove" -command DelRot button .f.b1 -text " Quit " -command exit entry .f.t -width 4 -textvariable vTime pack .f.n1 .f.t .f.r1 .f.b1 -side left -anchor w -padx 5 newRot .w0 10 } proc AutoRot {} { global RotCnt vTime newRot .w$RotCnt $vTime set RotCnt [expr $RotCnt + 1] } proc DelRot {} { global RotCnt vTime if { $RotCnt != 0 } { set RotCnt [expr $RotCnt - 1] destroy .w$RotCnt } } proc newRot {win {tick 100} } { togl $win -width 200 -height 200 -rgba true -double true -depth true -privatecmap false -time $tick bind $win {RotStart %x %y %W} bind $win {RotMove %x %y %W} pack $win -expand true -fill both } proc RotStart {x y W } { global startx starty xangle0 yangle0 xangle yangle set startx $x set starty $y set vPos [$W position] set xangle0 [lindex $vPos 0] set yangle0 [lindex $vPos 1] } proc RotMove {x y W} { global startx starty xangle0 yangle0 xangle yangle set xangle [expr $xangle0 + ($x - $startx) ] set yangle [expr $yangle0 + ($y - $starty) ] $W rotate $xangle $yangle } setup netgen-6.2.1804/ng/Togl-1.7/aclocal.m40000644000175000017500000000022313272137567015456 0ustar kurtkurt# # Include the TEA standard macro set # builtin(include,tclconfig/tcl.m4) # # Add here whatever m4 macros you want to define for your package # netgen-6.2.1804/ng/Togl-1.7/.indent.pro0000644000175000017500000000250113272137567015700 0ustar kurtkurt--blank-before-sizeof --blank-lines-after-declarations --blank-lines-after-procedures --blank-lines-before-block-comments --braces-after-struct-decl-line --braces-on-if-line --break-before-boolean-operator --case-brace-indentation0 --case-indentation2 --comment-line-length80 --continuation-indentation8 --cuddle-do-while --cuddle-else --declaration-indentation8 --dont-line-up-parentheses --format-all-comments --format-first-column-comments --indent-level4 --leave-optional-blank-lines --line-length80 --no-space-after-function-call-names --no-space-after-parentheses --no-tabs --parameter-indentation8 --preprocessor-indentation2 --procnames-start-lines --space-after-cast --space-after-for --space-after-if --space-after-while --space-special-semicolon --start-left-side-of-comments --struct-brace-indentation0 --tab-size8 -T AGLContext -T CALLBACK -T ClientData -T Colormap -T Display -T GLXContext -T GLbitfield -T GLboolean -T GLenum -T GLfloat -T GLint -T GLuint -T HDC -T HGLRC -T HWND -T LPARAM -T PIXELFORMATDESCRIPTOR -T Tcl_Command -T Tcl_Interp -T TkClassCreateProc -T TkClassGeometryProc -T TkClassModalProc -T TkClassProcs -T TkWinColormap -T Tk_ConfigSpec -T Tk_Cursor -T Tk_Window -T Togl_Callback -T Togl_CmdProc -T UINT -T WPARAM -T WinFont -T Window -T XColor -T XEvent -T XVisualInfo -T TOGL_EXTERN -T Togl netgen-6.2.1804/ng/Togl-1.7/tree2.rgba0000644000175000017500000020100013272137567015470 0ustar kurtkurtno name@@@?0?;?000@0@1@116@@000@0@,)55@?,0000 @0::@600000*@566@45)0000)@1540@4@004@)114@1@004F@1145)000@ 0@0*104)000 ,@0,45@)000 @0156@:@00 @@0*4>@;@0@  ((64,51:@6>,>( (( ($6,*>54@1,16:5$JJ (6C(@E50(((*@@1,54)$*441,, $$ $ T@?*> fa>151:4*((((((( (;))$(*)$1E41,, N@((6?C)(((  L\lF;,*5 65WF>4;4*(450(((((0E$4*5N   ,?((((*(056()0,()0,0$W NJ,1*FcPFI;IZoV>@ 44C50((,?   L,1N@00:440>F>*((((>5,)( *5>Jp0**5?$1$(@(((,:6($,4(140)*,**)6O4* ((5;6456TP``:1F??400((((*6 (N\ $YVpQ;1:>;:*00450500(((0NPF*((*0550())1045) (0((()*(()*)(,,)***5*))*( (((0>0(*:5J:0444>:0((()),4$(E@? ]C;;;;;6NQPFZN551466J0((055*0>4( *>:@()*,,**( ** (5:1($($(*) *)***1*$)* ( ((0**(((*:*00*:5((((**5 FC66((IP51( ;;;;54oJF:4:5;:5T:***44*(:0( (*( )),*$$  ( (:0 ( *( ((((*(((0:(4:((((((()),FI0C66;$L;TY;6I5; ;;;;44;o{Y444:5@:054*(((**(**((( ( (   0( ((  ((((( ( ((((((*(((** *0((((((((()**4>4:,5a?5:bTEC10?L;;;;::r`>@>:00>0(**((((((((( ( (     (4*((( (( (((( ((((((*(())(*((*)*,*0*:@4445>Lz;;;;;5bwY>@55*(**(((((( (      (((550*( ( (((( ( ((*(((((((((((****0**4*04>@YmJ;;;;5Q]|J:40:40(((((((((((( *( ( (   ((4E0((( (( (((( (((( (((((**(((((((((((**(4*400555JN>0;;;;5Yrf>50*0*(((((((( (((((>:( ( *(  *:0(( ((((*0*((*(( (((((((((( ((((((*(05(000554:@4*;;;;;5qcE:4*(((((((((( ((( 05( (    *((000((( *4*((((( (((((((((((((((***((44*5445>55540;;;;;@?cmTEJ:( ((((( ((((*:0  (((( (( ( (* (  (0>>0(( (0((( ( (((*((((*(((00540(*40*444:F:5440;;;;;ENc|kT>@5( ( ((((( **J4 ((( *4(   (040 (( ( ( (((( *0(((:@0((**00004:@YE444;;;;;?IT|qZfV>40( (( (((EJ*  (   (  ** (*4*( (*( (*( (((( (( ((50((*0:5**0:NNoJ445;;;;;?FNJ`TT@:50(( (((5b*  (   >E>0*0J:( (( (*( (( (0@*(*04PT504:E:>>55;;;;;;;;Y`P60440**( (((((* *0r5    (Vc\F@EJ5* (*(( 0(((((((( ( (0E\:055@@YE:V\E@:5455;;;;;;;;OZo;;;C4**( ((*((4 4\::0    (( *NfbYNVE00((**0(*( (((((((( (0>550>55*4@\mm`@514:54;;;::65WF`PC>C0((( ((( ((((( 0\V>0 (0*    40 *JT>5@*4>4*((*04*( (((( (((*00**(((*FJN>EE>;;>EFE;;;6l1I\rE:;@0(*( ((( (*0( (>F4* 4F* (    :FF50**545* (*50( ( *( (*(( (****(((*5@F504:J@WTVVT:;?;m{rrV>I@F5*@*( (( (45 (40( (5PF4   (  0@0(** *5@* ((054( :@*( *4( ((*(( (((5NE505:E:;LFF>5;Ec~mYELwbY5*@J0( (5(((0J*4*0*(((EEmpT   0  ((  (* ((:TP0((044(( ( ( 5J( 0( ( ((((*(((((((0>>005:::66;YF;;Ycmkf`bY:4@P@0( *( (0VFY@54((0EY{Y4   0J  ((4(  (0JJ0**(* * ( ( ((((0*((04**((0>*0>P:>5;lyE;;vbprqbm`@:450***(((( EbmJ4(*EoY|:( (( (0(  4: (>E44(((   ( (((*(((5\5*))),*4EP@55Nreb;;v|Q\cZI@T:00*0 05((( (@rY::\JE:(  *((( *4 ( 4@>5*(  ( (((**(*4@45,))0E]T>I45Lq@;;:PWmfbLcJ40*0*(>Y0( ( (>TfbbY>*(( 0(  ((((    (*(  ((( ( ((4*0*05>((*))*4`bZ@EFQY{:6;Z\~flc>(((*(0FE*(**( *>mTE* ( (  >J(  ((0     *0( (( (***045>4?;((*40@>C6JYZbJ@55;n6|wbJTmVE((((0:05**(0( (((***( (((( ( FT( (*5(   *4(**( (((((*04:FF5(,@?*0@`@554NfkZWC45565p~?5?apP@50 (:((( 4*(((54(( (((((( (( 4EV* (((*( (   ((*5TP0 ( ((((*0:@>P0(((,,(4;@514:n`x\|J66614ye>>PcP\@50( (*( *5@4*J@ ( *4( (( EV@ (0 4*  (:0(( ((*>TF* (( *@TTF>*((((**F??0*5:IVf\rN:::vY>PN@5:40(((((( (4@T*N> (0*(( ( ((@YN   ((   5N:0( ( (( (4( (* (0>N\T>(((((*5{F>0,1@PI]P{Z445:@I1JE:4045(*E@0( ( ( 4J(FE (  ((5J5(   (* (( *>F5* (((( ( ( ( (0>@4JT>0*((**EW464,1;IV]Q@FV55;:NZ154040EN4*P\>(4b: ((05(*5(  (:\5 ((((( 04 (( (( (0@E( (( (((( (( ((((0::(4:*50((*,,5050:?:OhF@:ozJ6;:ZF504FV`00EJ4(*cV(*0@N*0N0  0F4 4:E4:@(( >@( (:@@( ((*( (((((((**(**00*4***4?4;1*,;EI{E:::;CZ6@YC;44;@F04VN*((NV054:4((V:( (( * (*( PfN**0( *04*( *@0 ( ( ( ((*0*(**((4**05001>J;C?400IO~E>LZ:cZ5ZnJ50*04E5>T50*(mmF:E( ( ( (( (@0 55( 5bN( (((05((*(( (4(  (((  ((*0*(((((***4@106CTN;@>>1>NF;YZVCI6h\qaO5EV>@4:F44**JbWN:( :5 (( (>0( (0VP0( 44(*(((@N4(*****((** ((05( (*(((*(40((:4*0015;QN::?4C:NEO]wq@Lz|6a\aphO0\\FV:0@\E45:cc{>*( (:5((( (( *50(*4\Y4  >:( (( Pb@00(*00500*(( (((04 (((((*::0(***),4>:::OOJ5\F\qVFlVZk;IqQITf(Jc@`E04oP**4PYE4((((( 4:((( ((*04@4VN@(( :E*0 4>:*0*0500*004( *0*( ( ((((((*0:0*4(*),1:;:ECOP:?CEVoT?OL\JqILLIEP05|pfFEJkP*::\T>40((( (>*(:0( (((*4@:TFP*:V(*0 0((**05404*E>5*55J5( ((*00 (4((((((***(0*4J5((0416056CF::>]mECOFZCJ?Ep?]p60(Pk`@5>4:Vk`@:5***((*(( (JF4(((((*0:JEE*Ew4 (5EN@4FE5>cmT5:\pPF* *4**(((4E>*(((0*44(4:E\>0*5F00>50>:55;TV;JNQ:6?L`r@>(0{mOT0**4N`\c\m\EN**V>(( *40*(((0((*>J4(@*(4 *(>fkJ5445PwyVEFybF5*((00*>>>JF5*(*5:55:(0:V\:**0:>444::>>?>;booOJl;::wTTbT@((wb:555NTb{\F*0@>*(( (***(**4(5c5**4 (4*(0(4YkYJ:>F@fpfTcp`bJ>50*(0*ETYN4****>N\F5(*:N@0555JPE44>FE>JVO@]|lEPJ6:CNeVPrC0(4l~V@TJN\Yk{FN>:5** 40E(((04*4(:rN*04 (5:54 4fykVPTk{yocVPbTF4:504F`54@E:4*0:YcV4(*4::0@F@fcT>40>:?EJPJE;IOEOrk;:11YPC:1*4akY{TY00`w|mw\4 (VN*(((*0*((0Vm0(*:F004* 5o||wwpkYbkF4\pV55:JT`N(*NJ@40*0Nof@54EJE4>F4Ybk`405@bTEFJ>6PZTWO|:;:4?lP;0)*0FrWpbP0(04YNPTJ4(** \` ((((*((*:F* VkJ4(@( (>@V\kopTNN`@0VrF5:PmP****4@55>>JVb\N0F\`>NN:JPY\;:@VTEFE>@PVqqal6;:510J0000:y\pJ:(((((0@:P(04 ** (((((**((0*(45>5(>0 (*ETobVJJ@>05P{yJNY\bJ040>>5@EPVPJ@@4(4Tf@JYJVVbL;F@>O:;@:FFLJV|6;:p11ea@>0VmzZcJCF4:*0(((0V0(( ((((((0*( (4EJN@:0*(   (0>`rmF:545VkN\{cJ>44>E:0::4@E:000*(>YNP\@PT`C5>JE@;5::JVPaYL{F:;{n4:V@YFN;,*4>:@40((( 005( (*(*(((0* *T{T@:0(  :PTmfJ@4>VrcyTJ4(*TJF400*4>N@>:4*4YTT:>`VkPEOcf\ZE::YVTZlk`6ww\>;610)*5>`J@4(*0 (0 ((4*0***:0 4pyo`P4((*   (*>b{YT>>fkV>E0*:\VV55:>>>P>5NJ5(54>5PNF`TJcmcNTTE>JNTQN]nk4{\oQ;4*)*(((050>V:04*0 F0(0@((((*(0N>00( (:yb:50*(* (( (0kkJ>N\::::@J@F>4:@NFFV>4FJ5((5E5VYPP\bc\JT\mkF>JTrhevhl1k~w]`TF@4****)**F4:NF(*(( (kF04T0*((**4wT0 :PwT4:45:( (( ((0*fNFbPNPPEJV@4@J>FPF5:P@>N@4((5F>TbPE\aN>EJ\fFCOPwnzF66{@YJTEE55F44::@>F4P4** (*04* J@0(***4J5( (45*:F>5YY0  ( 0N5FT``NP`pcVVP04F`TPN40*4>@NF:4504:E>@E:CFJCJEN@@CIn]`c6:\NFNTOO`\PFNJYJJ0:05fT(*(0@* *:0(**((4:5@**((*(**05JYw>   4YfJJ\NcfbJNTTE@>4(0@cpVV@>0:PFJb`P@05ETJ\V:J`TVc@::>@Vw1P4|W:cIJ{P;Coko`EE:P4((FY:(( EJ( ((*(((*((*4f@0((*( 0>54( >N`YJVE>VTPcV0:0*545Nwy\NYPkwcm`@5bo`kP>TcccfP>FFQ4x4pmk]NoqC6>OYCzrE>P>6FTJ(JmE(((4cP5(E:00*(**(*5b{oJN:*(( (0:0 ( 0*PTN`P@`fF4*>T>5PE>JPkyJ>PopEYcokPJrcro|r\oYYqoaW4hOV54]cZ]WC1EpoP>V`5>fF**0:cT0(YV:5*(**0FcPm`ok0 ((*( (((( (Tomc\fN4N\4(@wJ>NNJN>Pm\J\ybTbPb@FVcr\cVVf|rqlTkpOVI56>6@::?QLCC1:PwWYPP>5NJ500>\Y* >T@54*(05\mN>f{N:@((*(((5( **((((JcJbyrE((4*4ffcfcP5@bkowE>>:00FJJN@VmwpkYVrmlcz:656>L|Z?m\zV>EFTac54>4:4*0>EE* *:>44*(*JT:(:{kFF(0T0( *( ((((( *0(TPV:**5*4crrkfkNETprrm::>:40ETYbNccYTO{n\r?6;:66>l~ff{NPFCL`Y5@:044040**(:>:(((*04:E*(:myY0(050((((((((((( *005>* (E40EPJ\ob\JNVcwykc@@@:>4@>Nk\Vbro\bPrxxfoooohV5:::;1CYz44NYc\TQ```o:@J:*E40*** :V5((((4N:(((4@T>4*40****( (*((*(((0PY\* (@*5\>Jb`cppormpyk|E0J:5@JENbpYTmll|rmolnwlla`::;;NT\{::6OlobY`YT\PY:bV:>J>(*TE0((*5f@((((0F@44>50**0((4F*5E400>Yb> (*F\``mF@kpwJNV`Tm@:YFEFFJYpw\Pc|{xqbyry~mxP6;;o:{`|rY`Y{YTFfP>Tc:0T>*(05Em>5*(*4F:5TF:4(>4*5*>*:N544Py0 0*(5>0@@0>:N>:J?I:>LICC\NNV|mT]lkbefkoyoahV;;;::;;~b@lYeYerrfNycTY:5bN:J0**:JPY44*((*0(:T**0*fN*0(444E540Jb@ ( (*:0(NP@5((0;I??6NT?4>Q\PTko\VfLO~bYeTe]waY]`;;;66;5bVWrn\]ONcwwFmFT>5NypP>co|P0*>oNF:50((*((*40(0::4*4(4J5Y>05:( ( (**>0*0500**4Fb]L?cP>:CNZcYfcVPP::ZZEJ`f\Lb;;;;65:55656Tf]oc?:5J:Fcr`w|{JF:Fr4(*>5*000(*:*(*54*>N*0*4* 5*EV5@c00*4( (055***005446\`cNPmLCQkbhv\ZVbYCCWqTQWpwCN;;;;;:6:;;NlJlkQLFrF\rc~yFEF0P\E4*(4N0****N`:(*0:>PfE0((((**Jc>5>*F>5*((*>5:0*404E5>VcFP`Vh{VFYeWeyWYVppaZoxy`\lzY~f\e\;;;;;;;;;;~fZTfeY\mzN]w\P\NJT>Vk:540@JFP@@kT500450>`k4>:*5>5Epf>*@TF*(((0:5:0440**@ye?N\YxZJ\QWekhe]cZOqc{O?ELL\wq;;;;;;;;;;::15OnxqO\rqqw]Qbvpmop\VVcr>>@45kPN|V\:44@5( *5E44>5@555w{E:YoJ0>(*:PF:*040**@mO]{Vb|peV]OWh`lmJV\whal?Wnao~Nqh;;;;;;;;;;::Q5LC\zF]rWI;>J>VTTT\k@:J@:@:5V0*4@F4*(*F4*0EEPJE0Jk45pN*4:ENfwr40544005@Nw~rbpnhV`hcYTVZ?CLEJp|e>>4loVZO5;;;;;;;;;;4IFQ\hxQWlOOC50?{xc`I>cJ>JV{rTEo4:@TE4:05*F545kYbff0*0(*FcJ**4>@@V>04440?EETTfknaNOpzZPZ>OLEOkzlFIlfq?555;;;;;;;;;;5kmynm?6WLF:5;CWyyry|`>46;>@bmYYm`4>PTV:4*4*(*5*PTPP>(*(((*******00>*0000*;Pwmy`zzYV|PVyOZZmfynO{x55;;;;;;;;;;;;k5nY>6;??FC:QkxkxoNJOC?LCOPTrk\cobF4T\\@E:@5**((0**(((0((054455*04550044445TrYnZhrr`f]\\OrfffVfWY\::;;;;;;;;;;;;;;;;;;c::CeIr`O\lQZxpFJENJpbk\mycNTN>N@5JofPNE@E0*00(((((*5>50:E>44*55E54Pk@:4@YmVNro|vv`vnVq|QTavN;;;;;;;;;;;;;;;;;;;::T@vfWZcpTxponrNYJFYwrpJrVNyE:mrP:>:>54b`(((((*YY::4FPE5:04>45\fN>5bVVO?@P~rk`TpTEO;?O:;;;;;;;;;;;;;;;;;;;:56~lpYTI>Wna|bJFJFVoNFcoJc{{VE``>F:*05Y@((((0:J:>TE5JE0:>@>**F@JVJbVJJ?TNoko\IJY>N?5J;;;;;;;;;;;;;;;;;;;;51YWpw\EPrr`Fc{YrpOTJETcyNTPNboNY`FJF5>Yb>(*T4 *(0PN>0>TF5>:(4\V>054:JbPw|ECC?m|~z{llk]v~bP\LmLO|`a;;;;;;;;;;;;;;;;;;;;5\JJam``wJ>CIJ`OEac`J`JIZfY`rkoyYmk:40>F\E((@0 *4*>E5:FE5E44**VJEP5@NE5{YYLY~parYEObW]zb\xob;;;;;;;;;;;;;;;;;;;;;Nok|>5Pl`ENQTeoQYTY\Tc{pooJE55::045J*((**0>05>5>@*44*To@:`5FPE55`mlQJO@?>l|~WNEJpInnbbZZ;;;;;;;;;;;;;;;;;;;;;;WrFfywwrcCFNPcbbW{pTEZykpw]V5E4@5>J`4**(44F455*045045JkV545TP``p5vnlCIEWICJPoYnQfxbN]f::;;;;;;;;;;;;;;;;;;;;;;WamPTYEaLJJ\J@FJTbn]rYN?bcw|ooC@O5Y>E5*5PTP@**:F5:5000>554\bf54@Vc::5511\Qff@5FeFP]Lrln6:;;;;;;;;;;;;;;;;;;;;;;;;;5vpnfPIIN\hL>E\|YornP@b`r{ZJcv@?T:>FF5((0ENF540400**4:E5:4FP`>5@Pr]oTYYY{nCEpO\I>E?wvP]{c@J;66;;;;;;;;;;;;;;;;;;;;;;;;;54{lFIh]poV?@?chbfkOYpc{xL54TVPq@J:J5**((0:4*4:0((05F\54>ETV:>@Jp{Tlr`5`|CzfJpC?;;55;lCW;44;;;;;;;;;;;;;;;;;;;;;;;;;;;qlEV{nx{I`cP`q\hOETCVeJF4;:N]aPPNVV5ET0*4:04>:0*5@@NF@>NTJE>N\TokbqbbT4{r;JJ5\QF;;;;;:6W;66;;;;;;;;;;;;;;;;;;;;;;;;;;;lcwhZZpok\YNb\@;>CLTkoZ>OFeE*:`>*54:Yc@04@J>NYJJVobYJmkaZZhcWO]O4YY``FF;~NF;;;;;;66|6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;c|ofYQbk|vrf;?`YYkaq{YO:6;:NI:@Nf@44:FP@5@@N`wEPNYpP@QymaL?WcFPYY{{`;`;;|@;;;;;;;:::6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;c\PVVTZlhCCF\yNqkar\?C;PPmm5F`>44>@@:@FcrcPbLLvI>QcezN;z~r`{`{{Y;;;;5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;r5|xyLb|qy~~{Iq\`ha~~ll@ErnwPc\TEJF5:FPfF>@Nb{kmNPlPW]YT]mIl``F;;;Fn6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6|cԝrcYwb6C{EPPYVLYWWPO`F>:N\T::5:`bkNEPffywTLo\\hT|OPlmrqY]`;;;;F\lEC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:56;y˼aT]]J6kbLcWvzqNPhbkzxxWw`VP@:IT:4>Jk`hfENf`VT`NTcNoQLNYWWOTf;;;;F\C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;65::rcFLT\E{QQZqPP~Wb|LVbOJP>cfJ6FbrEL`TTbm`rLV?Cb;I`C]vYZx;;;;;@I]O;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;66:rQqc\|JTToWbyCJ{NJEw`wpZ@FP`cYPbze?E;JOV@pmw;;;;;;;;;;;;LYJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;66;QP`4WLcZ]T::PheF|c`TLy|e>@m|kOFPTNbewZEF`kYLrw;;;;;;;;;;;;;;;JJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;l:LZzxwxm66:NkJNovfbVLVpL45x~Y`TL@;?JPTprpofllw;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:6E?x64~lec;::;;;?@WZeTVopNOJL:4>xWWQ;?LYfcVfl~f;ww;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:6Wzz:4hac;;;;;;;5f;E~VTmTEbP;>6CavfzfJ6{TOraavY;Z;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:65NNyL;;;;;;>@{Yk`TkYC>`TEPIPF:a\J@bn\Y]lx~vohl;;;pN;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:55;::I`]Y;;;;;;Yy`LYwP>Y|YVPW;4>pQFEao\WTbeekYC;;;;;ZfqN;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:6:;::`TL;;;;;:FvevV?]wVVY5@>:bpofQcZm\Vflox?;;;;;;NqN;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;LYL;;;;6:;F@Wlvo`WWT\yh5?J]PcF`ocW]|r:;;;;;;;;;N;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;@amVoV\wCP{O46?wozW|ObVZoY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;C@IaxϲVVwJPLPJFONqycJoOblcJWWY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6@eeoO~VQN\yma\nf@EbmyVCnT`kLN\o;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::Pbe]OQYJTwx`oaIN|{yxkJCwOҕY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yknlf\QLOhcWQo~p{{JwJ>c\Yn;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6?xxxZQNWwwpfWQl`axWYETck]n;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;66|pfYWWˈlT\h:]JkYlfmZC>Y;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Vmzwʉ~{oYY6`CkweQ]hrY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:`wmclfl`eavONQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Q{y]OfLLTfmlwoTZmJ@yC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Qxw{wyc;@Noa|pWCPNC@IC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;]|xL;;El;>@E:6:;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;JzWYL;;;;Nl|L;::;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;      )         $$   ,,  $ 0* ,)$ (JI(0>F$0FE50(((* $  *4$$$ )*(*$ $ PC>4> TV>5;:>4*((((((( ($ $$( ,C (( O>**;?@10),,()(  FWcL?11:  :6F:4,0*((440(((((4C*5*5N  (,?(( (0(1,($ $()554)W(NE044F`PEE>I$VeO;E(54I>0**4@   I45?5*(0*00>J>0(***E:1, (5:Fc40,>@(5)(@((($;;($ ($ $,1440*:P1*$((5?;5:>WOc];5PII5440***4? ),Ya *TPemF:46;::*0*5:4:44**(4PYP0,)*455*,,(4441, (*(((($(($ ($$,144:1,04 (((4@0*0>>V>455;F@4***004;),OIF($$eF$ ]]]]]TJQOEOJ5445:;F0*(0>:44F5*(0@@F,00441,( $$( ** ( 5:1($($$ **,4160)00 ((((000***0@044*@:((**11>$ NN;?,))0OV;:*$ ]]]]NFbfJ@:5:55>:N5**0:>0*>5*( (*(()04*)( (((:0 ( ( (*(** ((((**((4:(:>((((((*),4LJ0F6>@((J?TW>>N>@)(]]]]II]YpV444:45:4540***40(0**(( ( (  *( (( (*((( ( ((((((****** 00( (((***(,0*5@5?5>]?::bTFC66EJ]]]]YYmm`@F@>44E5000*****(((((( ((      *50**(( ((((( ((((( ((((*0*(** (*(*000*0*:>445:>Jp]]]]]Ohop\@@:50*00*(***(((((((( (*(  (  (*:>4*(( (((( (((( (((((0*****((((((****4*04045@>V`E]]]]LWb{N:54>55*((((***(((((0* (*( (((( ( (  ((( **:J0*(( (((*((( **(* ((*((00((*(( ((*(****404445:5EJ>4]]]]L]xkE:40400*(*(***((((((@>* (( (( (( *(  ( (( ( ( 4@4*( ((*(040((0*( (((***((((((((((***45*0045:5>>40]]]]]NyfF@50***(((((**(((*((4>* ((( ( ((( (( ((   **(540*** *50***(( (((((*((((((*(***(*55*544:>55544]]]]]\JboVNP>*((( ((((*(((***0@4 ((*( ** (( (0 (  ((5EE5*(((0**( (((*((((*((*00440*0540445:E:5544]]]]]ZOe{mY@F>* (( ((((0*(((0*N5 (((((( ( *4(   ((4:4 (((( * ( ((((( *4***>@0****44004>@TE545]]]]]\YWyp]k`E:4*( ( ( (*(((0(FJ* ( (((  (  00 *050( (0* ( (*(((((( ( (*:0((04>5004:NNkF44:]]]]]\YONaVVF@>4** ( ((((((**:`* (((  EJ@404T@( (*( ( (*(( ((( (4@***45NN545:E>>>55]]]]]]]]\`V?4::400*(( (**((*( (*4o5 (  ( *`k`JFJP:0(*0**( ( (( ((0((((*((((( (0EV:05:E@YE:VY@@:55::]]]]]]]VQ`o@@CI500*(((((00**5( 5Y@>4 (( ((   ( *(  (0Pmf\PYF45((004**( (((((*(((( ( (4>550>5:45E`kfY@55:>>5]]]WTOIWJ]QICI50*((*(( (**(*((5c\F5( 040 ( (  ( 50  0PV@>E05E50((0450*(( ( ((((( (((**04*****4JNN>@E>??@FNJ]]QIn@N]oJ?@F500*(**0(((04(( *FP>4( (:J4  (  (@NJ:400>::0 ((4:0((( ( *( ((*( (****(((*5@F:45:JEVQ\YT@]\OovwYCJFN@4F40((**((*5:( *:5*((:VJ5 (   (*  5E4*40(4>F0((*:>4*( :>*( *5* ( ((**(( (((5N@50:>@>@NJJ@>]PknWLOyk]@4NV5*(*>***5P04*40***EJorV  (0  *(*( (*  ((@\T5(*4:5(( *( ( 5F( 4(( (( (*((((((*4@>00:::::;@\J]]]|{alkkcf`@:F\F4((0*((5bJ\@>5**4F\yY5 4J  *05(   *0PP40000 ( (( ( (((*4**(04**(*0>*4@N>@>@orF]]qanpncmcJE:>500000**( ((NkoN:00Fm\y>((( ( ((  ((*5* 45 ((EJ:50** ( ((((*(((:V50,,0105EN?>>Prb`]]qyT\c]LJY@5545*(4:0**( ((Er{\@E`{NJ:* *(((( (  (*(((( *0 ( 5FE>0* (( ( ((*(0***4>450015F]Q@I;?Qr|a]]FTWlhcOeP55050*EY4(((( *FYfcc\@*0*( (( 5*  ((**   ( (*0*(  *0(   ( (4*0*0::(**),45]]WCJLTawOO]ZZzflkF0**404NJ4044* (4FmVJ0(((*((( ( EN(  **0    ((( 04*( (((( (0*0045>5??**044?>E;OZZaWVIJ]nLnbIVp\J0((04@5:40*5* (**(*00* ((0***( *( (JV* (*0:(   ( 05***( ((***(*45>JE5*,C@00@\>55:Neh\]NFLOQLpC:Ecr\JE5((*@0*(((50***>4 ((( (*****( ** :FT*  ****(((  ( ( ((0:TP4( (((***4>@@P0**(11*5>C655>k]xY~ZOOP@CyhC@TfTbJ@5*((40( 0:F:0P@ *(0:((**( ( JV> (4 ((5*   *>4(( *(0EVF* (( (0EVPF>**(((*0E@?405:JTfZn`QPTrYCVTF:>:5**(**(( (*4EY0P@(((4*(* * (((*(J\N( (  *( (  :N>4* (*(*4* ** (4@PYT@***(*05rE>016EOJ]Q|YIIPYQJ6PJ@:45:00JE4((*((((5N*JF(((( ( ( ((0*>T@( ( ( *0 ** (0EJ:0(((((*((((( (( (4>@4JT:4**(*0FQ4;54:@LWZWEFYJQ]CO]6>55:5JT:4Y`E*4b>***4:*0:* ( (*@c@( (*((*(44(*( **( (((4EE* (( *(*((*( ((((4::(4:*54***1,5155@E@QeLE?oyYT]J\N>4:PYb55JP5*0kY(05FN44T0 ( ( ( (4P:( (5@F5:@** (EJ( (((>F@* ((** ( (((((**(*0***00*400*5@5;101CILqE@@?CEkPV`L@:>CJP5>\P40*VV5>:>4((V>( ((**( 4( ( *4* VfN0*0* (445*((( 0E4( ((( ( (**040***(*4**05444?L>F@555JPzE@JW>ckN]oO:445:N>EV@54*kfPEF( ((*((((( (F0 *(>>* :bN*(*0(4>*(*((( (:((  *** (**040*((((*004>44;EVP?E>?:CNFEYWVCLPk]p{hT:J\EJ;CN:544Nc]V@(( (E:(*((( (J5* 05bV5( (:4(0***EP500004***00(( (*5:( **(***(40((:400046;QP;;C6F>OFP`onEOz|Pa`bnmT4bbP`@5E\F:>>ccr@0*((( (>:***((( 0>5*5:cY5(  E>((*((YfE45*040>450*( ((*44 (*((*0*>:0*0*0*,4>;;;QQO:]L`rTJ|nTYmVYrWNTf0PcFcJ55kN04:VY@5***(( (5>***( (((05>J:bTF** >F04 5F@4404:444445* *40* (( (((***004>404**),1:>?FCQT?EEIQpY@LIaNv\WPOJT4:ofNJPmP5@@`V@:4***(((*@**E:0(*(04:JEbPV*:T(44 4(**05>5450J@:0>>N5( (*044 *5*((((*000*444N:*(4556466FI>>C`hIFQFZJOP\oIarC5*Tk`F>E:F\m\E@>444*00*((*YP:000*055>TJF0Fo0(( ((>NVJ:JJ>EkoY:@`oPF0( *500*((5F>*((*44:5*5>FY>0*>J04>:4>:::CV|W@QQTOL\WcrJC04wlPT544>Tcbmbp`FT00V@**((0:5540000*0EN5(F**4 0*EprT>55>V{{YJPwbJ>0(*440EE@NF5**0>@:>>*4>Y\:000>>445>>@>EC@bloQPmYYYwZ\m\J0*pcC:>@TVf{bP45FE0*( *040*045*>f>4*5 *50(4(5bm\N@FJFmrkVfr`cN@:40(44NV\P4**00ETbN>*0@PE0:::NPE45@FJ@PVPC\xkNWNTYWQe\TwI505lzWFYPV`YkyNTEE>40(50E***454:*>rT444 *:>:5 :k{m\TTk{wmcVTcVF5>>45Jb:5@E>504@`kY:*0:@:0EFFcbT@54@@ELJPNE>NOITwh~]WE?\QF>:45`ob|\`54br|ryb:(((0\N0((*444*(4`p5**@J5450(>r||yypk\cfF5`oY>>>TVbN*0FJE:445TpfF:5FJF4@F5V`f\54:EaPEJJ>;PYVYP{|T]VEFmW@5445Jy]pn\5*45YNY\J5*00 (\\(((***0**0@J0(\fP:*@( (@EY`op|pTNJbE4Y|pJ:@TmP*0005F::E@JYf`N4F\\>TP>NPVYC>EYQJFE@@PZoo]lP]VI>?O545:@y`vV@*****4@>T*44( *0(((****40**50*55F>*>4( ((0FVofYNPFE4:TypNP\`cN454@@:FJVVPJE@4*4Pc@JYJVV`L@NE@P??@>JFQN~WQ]Wp>>faFE:Yoz]cJJN>>05*(*4V50*( (((((****54*((*:FNTE>00* (4EcwpN@>5>YkTbycNE45@F>4@>5EF:444**>YPT\EPTVC;>NFI@:>>NVTb\P~YWYyh?YYI\OVC50:EEE54*(*(45:( ((*000**0:0((0YyPE:4* (>PTokNE:EVpfwVN5*4\NJ:554:@NE@>5*5\TT:E`YbPEPec`ZI>@YVW\hlkLry]E@?;614>EbNJ:*05((04( ((*0505040@4( (5oyo`T50(0( ((0@c{\V@EkkV@J54@b\Y>:>E@@N>:PP:*:5@:VPFYTNbh`PTTF@JPVVQhwnCy\pY@:415,*05@5>YE:>45(*N4*5E((*0004P@450 (>yb@::4(*( (( *5kykN@P\>@>@FNEJ@:>@PJJT>5NN:*0:F:YYPN\``VJV`mfJENTwkozmo?m~ra`WLE;4410,*4T:>NJ04**(*kJ45Y40*004:rT0 ( >TrP5@>>>* (* **40k|NNbTNPTFPYE5@NEJPF:>TE@TF500:J@T`J@YZN@IL`{bFFOVwx{VJPzE\NWIN>@F;:@@JFJ5T:4*((0450*TF4*000:N5( ((((5:0>N>:`\4( (( 5T>{FVbbPP\fc\VT5:NbYYP:40:EETJ>5:45:F@EE:ELNEPJNEEFNwaefNY\OOPWOO`cVNPV`PJ5@4>fT00(4F0(((4>5*0000:>:@00*(**000:P\w>(( :`fNP\PfkbNTVNEE@5*4Jkp\\F@5@TJNb\T@45FVN\T:F\T\fE>>EEVv;Y>~kYcNL{QCFpkobNJ>P:*(Pb@**(F|N0***00*000005k{F4***(( (4@:5*(( ( EPb\PYF@YVTmY4@40:5:Tyy\T\Tmwfm`@:`m\bJ>P\\ckT@IFT>y>rkf`]ppJ?ET\Iz{J@YF?JTJ0PwN00*5fP>0N@55**0004>cypNP:**( (*4>0 *( (( *50TYT`PEcfN50EYE>VF@NTmwJEVo{mET`fcNJm`mm|p\kWZqqcYLhTW;;`b\b`F:JrwWEV`>EoN445EkV40c`E@4*005Pr\o`of4( (0*0*(**(((((VrpcbbN5P\5*FrP@PPNP@Vp`Nbr`T`P\@FTb{kY`VVh~wonhWloTWYPPC;E>?IVQJJ:>Tx`cVYJ@TP>45Ec\0(E`J@:405>frT@kyN>E*(0((*5( (00***(JcNc{oE**54:mmckcT>Ecorr@>@:45NJJPETcombWWwmkey~YPPPCN|ZEney\EJTYfk@>J>@:04EJJ0(4@F550*4NY:*>{oNJ*4T0((4*((*****(04*YPV:44>4:fywof|kNJVpryk>>@:54JVY`PcycYTP{m]pPL]WQTCh~kh|Y`PNQ``>J@5::44440*@FE0**05::E0*@p{\0*5:400*0*(*(**((4:5>E0(0P55PTTbobYJPVbrwo{fEEE>@4E@Pf\V\mk\`TwyykppppkZIYWW];F\zFFTcmaYY```p@JT@4F54450(Ec>0***:T>0*(5ET@50:54400*(*0(*00*0:V\\0 *E*@kETkbfpomrkr{mF4N:>EFETboVTkek{pmqhkomnckVY]]LV\WYTOlpeZ`ZVb\\@f\@@TE00\J4*04>mE0*((4PJ55@@4004**5N0>N>45F`c@((((00PkkfoJEkp{rNP\aWoE;]FFNFJ\moYQe{yrnazqwzpycT]]pW`~qZ`ZYYNcTEVf>4VF40:@Nk@>0*0:P@:TF>:*@54>0J4@T>:>\w0((((400>E5JE4@>PE@NFL>@OJIJ\TPYyfT]k~keffepyqell]]]TT]]ykIpZk\mzvfTwk\b@>fVET:40ET``::0(*04*>T0455kP45*::>J>:5Tb@((*(((*0@50TPF>0,5@JE@;TVC;@TYNVkm\YkPTa\fWcfhbfk]]]NN]LbW\wk]bQTewwFkJYE>TyV@kpT40EoPP@@5(*0**05404E@:4:05P>\@5@@*((((((*04E405:54446Ib]NEfTE?EOZb\f`VVT@@]ZLObp`Wq]]]]ONWLJC@JYf`peFC>PEPkyf{PNENp:04>>4454*4@0**>50ET454:0(:4F\>Fc0504*((*5>>44454>::?bbcPTpQFVkblwZZVe\FJZpWTWmvLh]]]]]YQW]YQlOlm\YP{Tf{l~|{NJP5\bJ:40:T:4440Vb@*05@ETmF40*0004NfE>>0N@:0((0E>>45:55N>F`mJT`Yn{YI]h]hyYZWppb]pyyb]my]~h]op]]]]]]]]]]|h\Vpl]crzVcwbTbTTYE`mE:>5FPNYJEkY@555:0Eck:E@4@FENymE4EYJ0*0*5@>>4>:404J|mETc\z`O`Y\emlkah]WpcxQFJP~O`~]]]]]]]]]]YYE>WozyV`{wppbWex{rwpb`\mrEEF::kYTY\>55F:*(4@J::F@J@@@{{JE\pN5@00@TN@45:444FoQc|ZcymkZ`V\kbnoQZazmcmFZppo|Tqy]]]]]]]]]]YYY?OEayPb{YOCEPEY\`\bmJ@PF@JE@Y50:EJ50*0T>04JP\VP:Pm5@wP45>JTkyw54>5:55>ETzwcyvlYblhaZ\bILTNPq{eEEFppak`Q]]]]]]]]]]FLNT]hrZ`qQTF;:Izw|kmOEfNEP\y\Fo{5>FYJ5>5>4N>::oboom444*4NfN00:EEFY>45::5@LJV\mmnaQQpzbWbFWTNVl{pONlfrNIQQ]]]]]]]]]]IkoynnF@\NJC?EL`yzy{|bF>?CFNor``ob:ETV`>:050(4>0TVTT@*4**0444404455E045550@W{zw|cyy]ZY]xWbbpfynTyIL]]]]]]]]]]]]lNn\F@EFELLCTrzlzyPQWNETNZV`wmcfpmN:YccFN@F>**00400***40*4@::>>4::::44:::5>Yp\wcovvfmeccWqkkkWkY\kYY]]]]]]]]]]]]]]]]]]e?CFhLr`VarY`~rNONYTwfwcp{fV`VF\J@TrkPVFFN5455*(**00>F>5EPF::4@>F:5TpF>:Fbp\V|{xzc|r\qyWVbwZ]]]]]]]]]]]]]]]]]]]TTVIwfZ]hq\{wwmoYcPPcy{rT|bYPFpwT@E@F:5fb****04b`>@5P\J>@::E:>bfTE>fZ`YJJY{of\rVJP@I\Y]]]]]]]]]]]]]]]]]]]TLT~npZYNC]mb|bVQVNYpNNmwVp|bPc`EP@05>`E**004ET>@TE>VJ4EFF@44NET\PfZQOJYVpnrcPQ\EPE?T]]]]]]]]]]]]]]]]]]]]PF\\px`JWvp]J`v\{pQ`WN\kyJY`YowPbfPTJ>FbcE*0Y4(00:VPE4E\F5EE0:c\E5>>@PcV|JOLFpz~~kkfbxhYbToOQ{ck]]]]]]]]]]]]]]]]]]]]PbONcoaavLEFJP\OJbf]NkVTekYbwr{boo@::EN`F*(F5*050@J@@PJ:F:>40\PJT@FTF>|bbT]|qcvaLT~eZawccypq]]]]]]]]]]]]]]]]]]]]]Wp{l{E?Wm`IPVYhn]c`beWm|rpwPN>:EE55:N0(*44:E5>E>EF4>:4VrF@b@PVF>>brlVNQJEEl~~Z|PIPwOqohokk]]]]]]]]]]]]]]]]]]]]]]`vLevvxrcIJVVomocyVLa|o{{c\>N>F>EPb5040>>N:>>45:>5:>TpY>:>YVbbp>ywnLOL\NJNVoYlWcqfWblYY]]]]]]]]]]]]]]]]]]]]]]`cqWY\LeONPbPJTVboxcwbVFlkwrwNIT>`EJ>5>T\VE45@P@E>455E@>:fkk>:F`m@@>>;;cZhhJ;LkOQaTqmpPY]]]]]]]]]]]]]]]]]]]]]]]]YLrqvkVNLTcnQENfcryrZFlcw|cQeyJJ]>FJJ>0*4NTN>:5>:440>@J>@:PYcE>J\{`oW]\\w\ZpW]PEVVwxYb||hIP]PP]]]]]]]]]]]]]]]]]]]]]]]]]NE{mJNncvrZJIImrmkmQckyT@:\\VqFV@N:44005@>55@5005@Vb>:@J\`@EFNyYoxb>b~\zhOpV\]]QQ]rJ]]OO]]]]]]]]]]]]]]]]]]]]]]]]]]]ymIW~rz~Omo\kycnQNYJ]mON;E@YkcV\Y`Y>NY50:>:>FE54>FFYPFEV\PNEVbVrohwhhW;r]ZZPcac]]]]]YV\]TT]]]]]]]]]]]]]]]]]]]]]]]]]]]mkoeeyym`bQhcF@FINWrq\FTNmJ5EkE0>>EcoJ:>FNFY`TT`yk`Prkb`ale\TcV>\\bbZZ]~\c]]]]]]TTQ]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]~fwla\hn~vrn@F`ZZkcqzZTC?@@QN?FVoJ::FNVJ>JJVfyNYVbwVFWypaPEYeLY\\b]b]]W]]]]]]]YYYQ]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]eaY]]\alkFJNfyPqlhzcINCYYpm>PmF5:EFFENPoyoYkTVxLCWck|TEz{yvbbZ]]]]O]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]vNyyPly~{{P~xf`hb~ppIJypwTf\VFVP>@NYkNJJVfopTWlPZ`]YcpOmzbbY]]]cnJ]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]TfϜyfcrc>LNTPYYPa]aQTcNE@P\T>E>EkkoVPYkmYVwaakYTVmlqqZ`b]]]]cnp]a]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]TLQYzźfY`fN>phVcYyzqOTqhmzzx]{h]VF>OY?>EVwkpoJTmfcYfQZlTpZQQ]ZYQWh]]]]cna]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]PJTTyeLPZaNVT`qQW]e~Q`lYPVLkmQ@Pk{LVf\\mpkxQ`IJhELbZb~v\kx]]]]]aVbh]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]NJYwWqkbNTZqZkxIPyQPJ{f{xbIP\km\YkoIJEOV\Yp]]]]]]]]]]]]bee]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]PP]YWcL~ؾZQe]]WVVVhcNfkZTy{fFLrkVLY\TfmaJOcl\h{]]]]]]]]]]]]]]]ee]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]oYP]y~vrwmQTYWkQTlwpm]QYpO>>~bhZQFEEVYYvxrphmm]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]TPIEyPIzmff]YY]]]\V``e~\`wwVWQO@>F`bZ?FO\ok`oq~h]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]TPZyyVJhbc]]]]]]]FfEN`\r\PkVEFCIlzloT>zYWykhyc]p]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]YPNOOf]]]]]]LIzble\o`LFbVO\TWOChfQJfva`enznhm]]]~h]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]TIP]TFLaco]]]]]]h{bPb~ZEbbaY\E?Iw\OPmqaa\kmckmb]]]]]qzh]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]TPY]TJa]f]]]]]WWrhw\Cfyba`?JECkwvmZh`va\kpoz\]]]]]]hh]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]fof]]]]TJL\NYkwwcaa`fzl@JTe\mJcql]b{qY]]]]]]]]]h]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]QINmlWw`fFZ~T>@Fzra~Tf``~p]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]\WWhyŭ``{NZVVNJWTw~kNoQcnhO]]p]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]QWfh~nT`\Ofrb]opJLfp~`NmYbkQQb~]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]WW`ehbQWaL]|vbxhNPz~xlQFwVəp]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]ymznhf\VWnm\Trzq{|]wLEc`]|]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]TZyyyc\Wawwpf\Tpabwf\NWhlc|]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]TT|qh`Z\pY`lFaOkmwkmeOFo]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]bmyvŒrfZCaLkq\em˃o]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]Yox{ryyp~bwmwWPh]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]mxwaTkh]eypmwzlenQIb]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]mxwzvzw]\cqmph]a\TVab]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]o|yf]]c{]QVbYTY]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]foof]]]]k{f]YY]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]             ** *)),     1)($ II* (     0)()*  ,4>)$  ( 0*   * (0   )   6,,,>1()$*1;0 $ * )  ; *  *   *E$)  $0 $,,54 )$)  $ 14 ?:W`;) $   **($ ( *  $  )$(4)((((($@@?4?5( *  ((  *   () ,0  (((( \kJ00 4   *(   **)$(,$,1$$)$( (((( (JF4  (    ( 6$ 54*,$ *0((((((V@5 (  (0 (((*;\((((($:TE*    ( (04Pb:(((($05]E(  ((( ***:E5 (((($4C{4 *( (  ( ***45* ((((( CP0( (( ( (*4****((((((00PW@50(( (  ( ((  ((*0>00**((((((14Qx>40 4   4:   (04N>*0*(((((*5?lW:4*(00 0( (( (05@`@*00(((((*46:C5* (@ *  (5  (@@*(*0044400((((((((?Jb0  V( (*( ((  5N0 ( *4N50NV5500*00((((((()4:Q$$(*( :((  (*((0( 0** *(((5PcfY:0,,00*((($$$$E4>,((* ::* (*    >@E5>>4544544((($F,>O)((((*(  0(     *4:0(04@5LC:>50(*)FPJJ4()(**(  50  (05 (*E:0*05:4144400(4T6PfC:(*>4, ((( 4 00JN>  0**@ (55**0444,,1>5((?ZwN;>>544* (** 0(@0* 4:V:  >  **  ( (4(*4E4401CF5((Q@EWLE;@5( (4>0 0J:V\*( * ( 0N* $()5@4,*5FEP((\e:;?6,(,  (FP:((@c54*(  (4(*$ $(5LE5>)*:Va)(():?E5P@,0(*> 5@@EE4   ( **  )INL6::EEyN)((;:INY>;:0 0* (E40*4  (*4(10 ( 146,:F;>0*(((L$PT5015*  ( 0: (  (0:*$54 5N4***>OC>>1(($$ L`Q*()4>0(  ( (( 0:** (**4  $$*01)(*0ZE\vC`5(($ $QE$ 45*4( (0(50*5**   ( *04*( ;41$ *,4?N@Qv:((${P@$*0( ( (0>:0((:5((044(*m50($)4;6F;`@(($$0v1**  0* (>:4*(  (  (( 04 :F(,,$(06FJ@4;6((()6o:  ( *05>* @  * (4  (* (( (  ($)),00EW;4,Wc6$((>mhp0( (055 *0 @5 0: (> ( (*4(*0( (((   (*$($ 01;m:00001o@$,]hW60*(((**(5045 * F0>N: (  (,(,*($$:@r:4>F*L~@$WZ>T1(( * *:( NE( 0( (F:    * $(10***)$0>54EC?44f(J>Jwl@:(*@**$,5 5C:4(** 5:  ( * 0 $)(00))0),*>:>Icb5:`\(o>:CWL5 :@05)$4@0 **CCF(** (5> (* *    00   $))))110(606@C>yO?@kO(6rF41>F4>0:* (N5 5:* (* ((* 54*(4   ( ( ()(*)16,116E?11C>J4V0;wf444> (FJN405J: ((:5*( 0  (*(505(E (   *  (  0( ((( ))04044OY541:;04,4xP0FT) 4TmLE0(0(*>F:* (  (*( **05b( ( *  04* (05*(  0(   (*:*  0 **(00004J{C0:06n))*;EPV,, YN1: (5>@>:>:05>*  (0 4  *0(  (44*((:E4(  (((40( ( ( (5:(**(((*004444Y`\:6\(((QVw65>50krJ,(**5:@TcPTT@4 0*  ((E (( (00* *(000*44**((  (040(*50  0( (450((0:40:E>4Ql\4>C((Q05O?6Y1 *Wh>0@45EFNf{{fE*5* (  4 ( *(N4 ((*((0::44000445540*0**   *5 00( (444  ( *0*>@40((4046:>>:4>?>LNCw($ F>1*$ *PvlJ:Y:E( >NbFE:J5 >:  (( 5J *5 4::544400>F4((:54 (005*54* *45* 44* *0(:>>@*(05YI::>:1IPLNIrr$(($,Z4, (5cF;I54 (*:4*00  @F  (*EN4 0 **04:40**0(*555((0:4 *( *(**040 055*04(05:;,0:NcI:5:55FLfJVW$(($ f1 $$ *`L>hF1( **: (  ((( 0( (400(((  (55**4440 (* **040*((  0>005055@40544@0,44:>C>zyFqQ$($L>C0*(EJV>F414(*( >( ( *00((  050( 04(4:4*( ((*( (( ((( *5404*55E0*0:410004>FEL~F:h4$(TT (bb\>4C44*  **0  (*   :kbV:0* *(04*( (0::45*( 0**   (*(((((:54((:>J:4:EF@?444JFIIOJ6\$h`VbbNrF*0,($$ (*@0(   * ( ( (NPNF@ *0:0* 0J@:*  (404 (**(5( 00(( ((405F:4EJE::>55>@FE>5>L pWlELoV:,(  *:(  4  * @0 (VF*( 5>0*((JJ5 (*0(*((((4005( 00((*(::@>@FE@:>ETP:5>CVN:LNF FLwkN:50*($  * 054 P4( 5  (c@ (:`E(* (*5E**40:>*0*(*4* **(*40 (0**40 (0*5::5FI;046JfP::?CY>`ca5$(Tw0O05,e,((4((**0(5(:  0* (( (:*((*50 @E * >@**44**5E4000 *4000  **40( * (*4044*1454;:>55:>>EEWyJ($Z?4;@511:@6055@:: (J:  0*  *0(4  *EE`0*5*(4*454**04*((  (5>00*((400>:50 (455>:0:F>EJ50,1:JY(1(\>$E44q4))Lb@:0*40E((0(4\5 ( (Pk0((5**  (00*4* 00040 *  (0>F@4440:@:>PYP>0(FE>E:4ENNJE>555L(O(PE@C6;k0(*CL,Qb>*(5**:>5*5*(F>(** ( ( (EYV:@0 (0 *0*40*55**:* 40*44:>**0EJEJPFJV\F4E@EE:>\NVOOPET@EQLC6~ Y;J( NOE:04(4JPE5*4:((5* (@: >4** ( (404EfE``  (05405*(*4 *@>*(0000*4>54:E:0EY:0JY@45>EVNEJE@IWVTTF>PP5:4($)$0**15Z:01(*5YL44**((4*  *:: (*(*(( (*@>40P\:** * (**5:>( (>EE555:5(*:>:EPE***( (555:5@JNJF@@PNIFTY]lpq(((()4\:*@5Qc>004:@VV:( ( *( *44 ((((( ::b**P@44(@  004(  55:::@:4*4FF>TP>**40((4>>E5ETN@@>:\TJ;J\fw0(($$(*W{rLkFEZy46114fc`:>(*( ( *0* ((*4 *@EE (* (* * *004>:4045>EF:EE:**40*(405@>>ETNEJ>N@@:>E>>;:4(($$(*6ZZQ$ n4:>:4::::>**4( 0 (4( *:0 (*50( *   >@> ( 0(*4E5:E>>E>PP:EF* 50*054:@J>>QNNVTL>\LNVPC~Z6F((((6;>I$(`$0>NN>;6:64{J44b5(>0(*4*0*  *F5  *0((4   5(0( 0:@0 *444>0*>@JJ0::>6>0,;5455:@ENE@IWYOLFV@ZN`VbFY@:(((haLN$fWI:TTfEI6:6I5Pb@@0*54*:@(0* **5P0*  (0((E>( *( 00 (4(((4VT * (( *((*(400:*4,0:614>5:@TPF>CIZVLJJOP;@E?:;hE>(((((((Y];x,@5@6>@ObbbE0>F:05((:4(0( 05:E(*  *E E5 ((((0(( *5*  0( *05*(14,,,551)0;@>>JN@@J::YI@NCQ:V@656FOhcc((($$( @:4LZF:44@IIb:\45**0F@N4(@FYV0( 0P50**( ( **( ( (4(@0 ** 0 (*(( *6E@;0@5,,4:EJENF@@@,*@@14Elb;C0Ic(((($ $ (()>Q:I@Z***b:*0>J:@@>0**0\P@( 0* * *(*:( ( (05 4N ( *  (* ((((*((,EEF@@TJ60;ICJWJ@@NE11EeC:Icbbe*5(((((($$((q;Y0LET450>b4:>6NYF@@005(4:** :(  5E0(*4:E4 4@**0 400  0*0 (*((0*0@F5@N@FO>1@E>FWE?CEE>>41>@@6IWe4NNF:@((((((((((ZWQF4b;C>@@ZPcP1;F54>44>0:F**( 0c5:0**F5( (* *@J 00(( 0JE* 0>4 (**0 **(((4Y`L1>I>NQ>4C?@EPOLILE?TNkv0,,0|e4F@Q(((((((((((($(:EQF0;J>CLP>;EVE>EE@>>@F00*(*N>:NN:@( (4((0((4(4(((PP0*@N5(4 0>:*((0(((4bP@IY@EPFE>E;@NIPN:CEPNJVy5I?F;f6ZL((((((((((((;*40CY,:P>?;,15,>NFEF5:>>F4050***(EP5 (05(0( (40555 0F((NV: (0:>NY\**0*0**05@bcT]J@JJJ>@LJI@CE55>66WcO0)$OkY@C>((((((((((( 145?Om]:5:Z4F6,(0TNFE@:>1,>44::@E50@F (0@0(*((0( (P@>>J  0E5 *550@4*0*005:5@Ero]hVETFIC66PVE?I5;>6;JZT1;YPYr0((((((((((((( TEe~PW0*:000,40@TJFF@E>*),,005>J5>@> (:>>*( ( :@:0* (((0 (0**(5;Tf\YbYePETFOO>;QW@CW>IlIhcq@ZeY>bY((((((((((((((pbbI(PJ1*1*,150>>YPJ@414104415>F@T:EE4* :::*004(   (((00 ((*0((*0000>kbTEYICEQPZ\fPO`YLOFII@VfOO:::FLE((((((((((((((((((((cI()*?0PL??:45IC15144E>E>NNF440(**(4@@45400  (0( (*0** (*5**EP4405@VN@:FNJPYPP`{]YnLakCQEaY\@@Qla:((((((((((((((((((($$c5*IJ?CPTq;C>:LV4:545TPpT45F50FJ*(EJ5(*(0* JN @E**(4:4(*(*4**PT@54N;::5:>br\kTYmkk{oe>PJEWb?6?,5?(((((((((((((((((((($$(PFN:E6*:YOr~ZFPTVF:115>F544:05@J4*>Y@*0* *E4 *4**:4(45 *054(*@:@J>E:55:F>behZfYIcrZEFwofaaI66E1;4*6((((((((((((((((((((((;:QJJ5;NVL5QhrEEOP>>1,>@J5:54>504:450(*5@( >( >5* (04**0 (>@4*404>N@PJ:544T\TZNZvmbVVT>LqIaF?J;V;>bNI(((((((((((((((((((((@44ENrIJY:141:NC:FII:J515F>>FE>T@>FNE*( *0:**  (04(*0**5(*( >\:5F4:@:4cTE?;IeZPZ:4>hhLE{r;a]@WPmF`Zp{I(((((((((((((((((((((Yz0F\Wkp0,FNE:?C;EW>@>:56:JEJVPNfPN40*(**((*:  (4((*(55(0*(@T54J4>E:44JPVqlY@@E1,4V]a;f@*6If4EpWJICC((((((((((((((((((((((`6|Q5P]\e\VE65>5E@>6J@41:JJVTckF@F\?>(* *(05F* ((4 ( ((0***5N@404E>JJ`1Y>pzQ;?4C656EZ>YEOcI0?Pe:((((((((((((((((((((((((`6EqF6:;5L40:E:45::>F@J:5,:FVJPJT@YN0,:*@*4* *:E@4 *4(**(*(40*(:EJ00:EJ5541*,wmkN5LzW1):n@5;qE;ZT>((((((((((((((((((((((((((($]OmI@:51>E?:,4EPN:VVQ;1>@NJ\]60@L1,@0*05*  055(( ( *0500*5:E54:>NIN@FCCb>af01T?J100*JI1@OmhL,0(((((((((((((((((((((((((((($ ]Na15F@NJ6144JZC@NN\;:@JkE\Z5,$656\40*5*  *( (* (*5F4045>>4:::PYCPQmJ4J\h0P\Pn,],*(((((;ZT4;((((((((((((((((((((((((((((((@NZ1CPJTY5EE@EN@C::@16?mp45),,6?NI>55:@*4: *0((0*( *445555::5:5@EEVfNFQII@*WTqc(::(:l1*(((((((C((((((((((((((((((((((((((((((TTpm`IbkTNC:?JEVZP@>0;T@1,*,04?E@*55@1(>0 **0>F0*(4:0:F>:>FEF@N\VLCCQI>6E;,EEJJ55(T`,*((((((((O$((((((((((((((((((((((((((((((TpzZQFp`PE;6>FWQTV>)*:66FCNT6Y5((**41(04@4**45:4*44:FVY5>>@N4,>YTJ60?F6>rEEYYJ(J((TF)((((((((($V$((((((((((((((((((((((((((((((p`F|@cy|c?@;;?NNh1,1EbQ0ZNJ6bC:01,>:>@*0>4**445045EPbE>N?>O0*>JOZ5,hbcTJYJYYqF((((T$(((((((((((((((((((((((((((((((((((((((((bT F?rVcb>JYVNTVZJ4`@E:FC\]b>>10COT>:>:445*05:N:45:EbJFJ>:?4;FC?IJ:LfmcJJ5(((*TP$((((((((((((((((((((((((((((((((((((((((((($FFEhQNJ\wpQI)1J1:1Z5:6y:51|]15P@54*5@@0004@@J>5@NJY\PP?>J@@Oq?Q>CNTaW~FIJ((((*5?n*)(((((((((((((((((((((((((((((((((((((((($ (@qcJCEE5(?;6>>CQN5:L>OQJJ:J@@>40;:,,5:N?NJ:>FE@cffEJ:>J;Vc1,;Cp>@55EcT((((*Nph5)((((((((((((((((((((((((((((((((((((((($$$(LYhehE4>CC1NP44?O]60]Lz4FcZW4;@65:1FE6,;NT16E@@FVJYkV>E11N16ElV,FhYCCEEE((((()*?`0((((((((((((((((((((((((((((((((((((((( (L6bob`Nf\:5NI*?1Y>@:Np])*`c4]b;5P@NNTJ\cm?45>>FE@FOC041:h?E,pQT@(((((((EEE(((((,5v,((((((((((((((((((((((((((((((((((((((( (:;5(kf5,zE?E0((bNo4QL*PP@PL>:PLC,0ETolZT>55>@PPO\@5:OYE4cp>@(((((((((E((((((,,(((((((((((((((((((((((((((((((((((((((((((Fw(,IbQLZZ\PnN$((bN:W50VJhF@\V@;;I5**NWIN@;,*1>EF]`Z\\`\LNNccppp@c((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((($$0,x?$ aNJLmT((((((*16ENba@>FJ>>61,)0N`C@>(06FTTJywEF`pmLccc(Ecc@@((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((($$;QkT($N\ENT(((((((T**TWEEJ>:J@11*4@TL]T;(afb??\]EFY{@TTTT(@ccT((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((bbh(((E**Y4(((((()0c4JEENF;5JC;@6>5,JcE40@N`E?NYZcWVPNcTT(((QqcT5(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((b(($ $($))6E?((((((>Z~L>F`ZC5JbF@CC0(1VcC64LZNFEENYOVV@,(T((((@LTT5(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((bb(($$(($(n6;4((((($0r\>FkoyJ6IVF@E,11,JTQN>fwJFP4CFV`h*((cb((((5Tc5(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((b(((((((((4?4(((($()00IVFNpoT@@FJZW*16I>kcT,|kJW64Epla$(((((((((5E(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((**,IYCrbyykVJE\*;]>(**aTVo\c@P;Q,CyP?(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((0,1IlJ\qe??\0;6e44\,??WkZT0W4?CN*05~p?((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((($,NOOhoO4N??5E\PLJPN01FTZc?0W;@vN)1>~P((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((($$>I@>14T{E6@`ocEVkI46fmaZbycC44a4ep?((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((TOPON`E>:>WVccrq{E?]mc\Z6Q6,PI0|O((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((*@@EE>:@WWbcVOE?WPQr`Y`z@>4:@Q1P(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((\PEEEEcWZEc>>Y,?>W?PIWC10~hr?((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((bZ?TeP]`f]\TCL*?0VYJY>CNV?(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((EvZWpkNJOL{Wk;hIEI;6vZ;(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((;fcbx:1:E46?LYJcYT>@C50Yb,((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((;EObTp]I(0:bnZI\W@,:60,1,((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((EElb\@EE4((0Oalbb()*,$$(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((4\cc??4((((5aaN\fc4(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((netgen-6.2.1804/ng/Togl-1.7/tclconfig/0000755000175000017500000000000013272137567015571 5ustar kurtkurtnetgen-6.2.1804/ng/Togl-1.7/tclconfig/README.txt0000644000175000017500000000145413272137567017273 0ustar kurtkurtThese files comprise the basic building blocks for a Tcl Extension Architecture (TEA) extension. For more information on TEA see: http://www.tcl.tk/doc/tea/ This package is part of the Tcl project at SourceForge, and latest sources should be available there: http://tcl.sourceforge.net/ This package is a freely available open source package. You can do virtually anything you like with it, such as modifying it, redistributing it, and selling it either in whole or in part. CONTENTS ======== The following is a short description of the files you will find in the sample extension. README.txt This file install-sh Program used for copying binaries and script files to their install locations. tcl.m4 Collection of Tcl autoconf macros. Included by a package's aclocal.m4 to define TEA_* macros. netgen-6.2.1804/ng/Togl-1.7/tclconfig/tcl.m40000644000175000017500000035772613272137567016641 0ustar kurtkurt# tcl.m4 -- # # This file provides a set of autoconf macros to help TEA-enable # a Tcl extension. # # Copyright (c) 1999-2000 Ajuba Solutions. # Copyright (c) 2002-2005 ActiveState Corporation. # # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # # RCS: @(#) $Id: tcl.m4,v 1.4 2006/01/06 00:09:00 gregcouch Exp $ AC_PREREQ(2.50) # Possible values for key variables defined: # # TEA_WINDOWINGSYSTEM - win32 aqua x11 (mirrors 'tk windowingsystem') # TEA_PLATFORM - windows unix # #------------------------------------------------------------------------ # TEA_PATH_TCLCONFIG -- # # Locate the tclConfig.sh file and perform a sanity check on # the Tcl compile flags # # Arguments: # none # # Results: # # Adds the following arguments to configure: # --with-tcl=... # # Defines the following vars: # TCL_BIN_DIR Full path to the directory containing # the tclConfig.sh file #------------------------------------------------------------------------ AC_DEFUN(TEA_PATH_TCLCONFIG, [ dnl Make sure we are initialized AC_REQUIRE([TEA_INIT]) # # Ok, lets find the tcl configuration # First, look for one uninstalled. # the alternative search directory is invoked by --with-tcl # if test x"${no_tcl}" = x ; then # we reset no_tcl in case something fails here no_tcl=true AC_ARG_WITH(tcl, [ --with-tcl directory containing tcl configuration (tclConfig.sh)], with_tclconfig=${withval}) AC_MSG_CHECKING([for Tcl configuration]) AC_CACHE_VAL(ac_cv_c_tclconfig,[ # First check to see if --with-tcl was specified. if test x"${with_tclconfig}" != x ; then case ${with_tclconfig} in */tclConfig.sh ) if test -f ${with_tclconfig}; then AC_MSG_WARN([--with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself]) with_tclconfig=`echo ${with_tclconfig} | sed 's!/tclConfig\.sh$!!'` fi ;; esac if test -f "${with_tclconfig}/tclConfig.sh" ; then ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` else AC_MSG_ERROR([${with_tclconfig} directory doesn't contain tclConfig.sh]) fi fi # then check for a private Tcl installation if test x"${ac_cv_c_tclconfig}" = x ; then for i in \ ../tcl \ `ls -dr ../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ `ls -dr ../tcl[[8-9]].[[0-9]] 2>/dev/null` \ `ls -dr ../tcl[[8-9]].[[0-9]]* 2>/dev/null` \ ../../tcl \ `ls -dr ../../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ `ls -dr ../../tcl[[8-9]].[[0-9]] 2>/dev/null` \ `ls -dr ../../tcl[[8-9]].[[0-9]]* 2>/dev/null` \ ../../../tcl \ `ls -dr ../../../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ `ls -dr ../../../tcl[[8-9]].[[0-9]] 2>/dev/null` \ `ls -dr ../../../tcl[[8-9]].[[0-9]]* 2>/dev/null` ; do if test -f "$i/unix/tclConfig.sh" ; then ac_cv_c_tclconfig=`(cd $i/unix; pwd)` break fi done fi # on Darwin, check in Framework installation locations if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ `ls -d /Library/Frameworks 2>/dev/null` \ `ls -d /Network/Library/Frameworks 2>/dev/null` \ `ls -d /System/Library/Frameworks 2>/dev/null` \ ; do if test -f "$i/Tcl.framework/tclConfig.sh" ; then ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)` break fi done fi # check in a few common install locations if test x"${ac_cv_c_tclconfig}" = x ; then for i in `ls -d ${libdir} 2>/dev/null` \ `ls -d ${exec_prefix}/lib 2>/dev/null` \ `ls -d ${prefix}/lib 2>/dev/null` \ `ls -d /usr/local/lib 2>/dev/null` \ `ls -d /usr/contrib/lib 2>/dev/null` \ `ls -d /usr/lib 2>/dev/null` \ ; do if test -f "$i/tclConfig.sh" ; then ac_cv_c_tclconfig=`(cd $i; pwd)` break fi done fi # check in a few other private locations if test x"${ac_cv_c_tclconfig}" = x ; then for i in \ ${srcdir}/../tcl \ `ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ `ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]] 2>/dev/null` \ `ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]]* 2>/dev/null` ; do if test -f "$i/unix/tclConfig.sh" ; then ac_cv_c_tclconfig=`(cd $i/unix; pwd)` break fi done fi ]) if test x"${ac_cv_c_tclconfig}" = x ; then TCL_BIN_DIR="# no Tcl configs found" AC_MSG_WARN("Cannot find Tcl configuration definitions") exit 0 else no_tcl= TCL_BIN_DIR=${ac_cv_c_tclconfig} AC_MSG_RESULT([found $TCL_BIN_DIR/tclConfig.sh]) fi fi ]) #------------------------------------------------------------------------ # TEA_PATH_TKCONFIG -- # # Locate the tkConfig.sh file # # Arguments: # none # # Results: # # Adds the following arguments to configure: # --with-tk=... # # Defines the following vars: # TK_BIN_DIR Full path to the directory containing # the tkConfig.sh file #------------------------------------------------------------------------ AC_DEFUN(TEA_PATH_TKCONFIG, [ # # Ok, lets find the tk configuration # First, look for one uninstalled. # the alternative search directory is invoked by --with-tk # if test x"${no_tk}" = x ; then # we reset no_tk in case something fails here no_tk=true AC_ARG_WITH(tk, [ --with-tk directory containing tk configuration (tkConfig.sh)], with_tkconfig=${withval}) AC_MSG_CHECKING([for Tk configuration]) AC_CACHE_VAL(ac_cv_c_tkconfig,[ # First check to see if --with-tkconfig was specified. if test x"${with_tkconfig}" != x ; then case ${with_tkconfig} in */tkConfig.sh ) if test -f ${with_tkconfig}; then AC_MSG_WARN([--with-tk argument should refer to directory containing tkConfig.sh, not to tkConfig.sh itself]) with_tkconfig=`echo ${with_tkconfig} | sed 's!/tkConfig\.sh$!!'` fi ;; esac if test -f "${with_tkconfig}/tkConfig.sh" ; then ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` else AC_MSG_ERROR([${with_tkconfig} directory doesn't contain tkConfig.sh]) fi fi # then check for a private Tk library if test x"${ac_cv_c_tkconfig}" = x ; then for i in \ ../tk \ `ls -dr ../tk[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ `ls -dr ../tk[[8-9]].[[0-9]] 2>/dev/null` \ `ls -dr ../tk[[8-9]].[[0-9]]* 2>/dev/null` \ ../../tk \ `ls -dr ../../tk[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ `ls -dr ../../tk[[8-9]].[[0-9]] 2>/dev/null` \ `ls -dr ../../tk[[8-9]].[[0-9]]* 2>/dev/null` \ ../../../tk \ `ls -dr ../../../tk[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ `ls -dr ../../../tk[[8-9]].[[0-9]] 2>/dev/null` \ `ls -dr ../../../tk[[8-9]].[[0-9]]* 2>/dev/null` ; do if test -f "$i/unix/tkConfig.sh" ; then ac_cv_c_tkconfig=`(cd $i/unix; pwd)` break fi done fi # on Darwin, check in Framework installation locations if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ `ls -d /Library/Frameworks 2>/dev/null` \ `ls -d /Network/Library/Frameworks 2>/dev/null` \ `ls -d /System/Library/Frameworks 2>/dev/null` \ ; do if test -f "$i/Tk.framework/tkConfig.sh" ; then ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)` break fi done fi # check in a few common install locations if test x"${ac_cv_c_tkconfig}" = x ; then for i in `ls -d ${libdir} 2>/dev/null` \ `ls -d ${exec_prefix}/lib 2>/dev/null` \ `ls -d ${prefix}/lib 2>/dev/null` \ `ls -d /usr/local/lib 2>/dev/null` \ `ls -d /usr/contrib/lib 2>/dev/null` \ `ls -d /usr/lib 2>/dev/null` \ ; do if test -f "$i/tkConfig.sh" ; then ac_cv_c_tkconfig=`(cd $i; pwd)` break fi done fi # check in a few other private locations if test x"${ac_cv_c_tkconfig}" = x ; then for i in \ ${srcdir}/../tk \ `ls -dr ${srcdir}/../tk[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ `ls -dr ${srcdir}/../tk[[8-9]].[[0-9]] 2>/dev/null` \ `ls -dr ${srcdir}/../tk[[8-9]].[[0-9]]* 2>/dev/null` ; do if test -f "$i/unix/tkConfig.sh" ; then ac_cv_c_tkconfig=`(cd $i/unix; pwd)` break fi done fi ]) if test x"${ac_cv_c_tkconfig}" = x ; then TK_BIN_DIR="# no Tk configs found" AC_MSG_WARN("Cannot find Tk configuration definitions") exit 0 else no_tk= TK_BIN_DIR=${ac_cv_c_tkconfig} AC_MSG_RESULT([found $TK_BIN_DIR/tkConfig.sh]) fi fi ]) #------------------------------------------------------------------------ # TEA_LOAD_TCLCONFIG -- # # Load the tclConfig.sh file # # Arguments: # # Requires the following vars to be set: # TCL_BIN_DIR # # Results: # # Subst the following vars: # TCL_BIN_DIR # TCL_SRC_DIR # TCL_LIB_FILE # #------------------------------------------------------------------------ AC_DEFUN(TEA_LOAD_TCLCONFIG, [ AC_MSG_CHECKING([for existence of $TCL_BIN_DIR/tclConfig.sh]) if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then AC_MSG_RESULT([loading]) . $TCL_BIN_DIR/tclConfig.sh else AC_MSG_RESULT([file not found]) fi # # If the TCL_BIN_DIR is the build directory (not the install directory), # then set the common variable name to the value of the build variables. # For example, the variable TCL_LIB_SPEC will be set to the value # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC # instead of TCL_BUILD_LIB_SPEC since it will work with both an # installed and uninstalled version of Tcl. # if test -f $TCL_BIN_DIR/Makefile ; then TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC} TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC} TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH} fi # # eval is required to do the TCL_DBGX substitution # eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\"" eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\"" eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\"" eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\"" eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\"" eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\"" AC_SUBST(TCL_VERSION) AC_SUBST(TCL_BIN_DIR) AC_SUBST(TCL_SRC_DIR) AC_SUBST(TCL_LIB_FILE) AC_SUBST(TCL_LIB_FLAG) AC_SUBST(TCL_LIB_SPEC) AC_SUBST(TCL_STUB_LIB_FILE) AC_SUBST(TCL_STUB_LIB_FLAG) AC_SUBST(TCL_STUB_LIB_SPEC) AC_SUBST(TCL_LIBS) AC_SUBST(TCL_DEFS) AC_SUBST(TCL_EXTRA_CFLAGS) AC_SUBST(TCL_LD_FLAGS) AC_SUBST(TCL_SHLIB_LD_LIBS) #AC_SUBST(TCL_BUILD_LIB_SPEC) #AC_SUBST(TCL_BUILD_STUB_LIB_SPEC) ]) #------------------------------------------------------------------------ # TEA_LOAD_TKCONFIG -- # # Load the tkConfig.sh file # # Arguments: # # Requires the following vars to be set: # TK_BIN_DIR # # Results: # # Sets the following vars that should be in tkConfig.sh: # TK_BIN_DIR #------------------------------------------------------------------------ AC_DEFUN(TEA_LOAD_TKCONFIG, [ AC_MSG_CHECKING([for existence of ${TK_BIN_DIR}/tkConfig.sh]) if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then AC_MSG_RESULT([loading]) . $TK_BIN_DIR/tkConfig.sh else AC_MSG_RESULT([could not find ${TK_BIN_DIR}/tkConfig.sh]) fi # # If the TK_BIN_DIR is the build directory (not the install directory), # then set the common variable name to the value of the build variables. # For example, the variable TK_LIB_SPEC will be set to the value # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC # instead of TK_BUILD_LIB_SPEC since it will work with both an # installed and uninstalled version of Tcl. # if test -f $TK_BIN_DIR/Makefile ; then TK_LIB_SPEC=${TK_BUILD_LIB_SPEC} TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC} TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH} fi # Ensure windowingsystem is defined if test "${TEA_PLATFORM}" = "unix" ; then case ${TK_DEFS} in *MAC_OSX_TK*) AC_DEFINE(MAC_OSX_TK, 1, [Are we building against Mac OS X TkAqua?]) TEA_WINDOWINGSYSTEM="aqua" ;; *) TEA_WINDOWINGSYSTEM="x11" ;; esac elif test "${TEA_PLATFORM}" = "windows" ; then TEA_WINDOWINGSYSTEM="win32" fi # # eval is required to do the TK_DBGX substitution # eval "TK_LIB_FILE=\"${TK_LIB_FILE}\"" eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\"" eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\"" eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\"" eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\"" eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\"" AC_SUBST(TK_VERSION) AC_SUBST(TK_BIN_DIR) AC_SUBST(TK_SRC_DIR) AC_SUBST(TK_LIB_FILE) AC_SUBST(TK_LIB_FLAG) AC_SUBST(TK_LIB_SPEC) AC_SUBST(TK_STUB_LIB_FILE) AC_SUBST(TK_STUB_LIB_FLAG) AC_SUBST(TK_STUB_LIB_SPEC) AC_SUBST(TK_LIBS) AC_SUBST(TK_XINCLUDES) ]) #------------------------------------------------------------------------ # TEA_ENABLE_SHARED -- # # Allows the building of shared libraries # # Arguments: # none # # Results: # # Adds the following arguments to configure: # --enable-shared=yes|no # # Defines the following vars: # STATIC_BUILD Used for building import/export libraries # on Windows. # # Sets the following vars: # SHARED_BUILD Value of 1 or 0 #------------------------------------------------------------------------ AC_DEFUN(TEA_ENABLE_SHARED, [ AC_MSG_CHECKING([how to build libraries]) AC_ARG_ENABLE(shared, [ --enable-shared build and link with shared libraries [--enable-shared]], [tcl_ok=$enableval], [tcl_ok=yes]) if test "${enable_shared+set}" = set; then enableval="$enable_shared" tcl_ok=$enableval else tcl_ok=yes fi if test "$tcl_ok" = "yes" ; then AC_MSG_RESULT([shared]) SHARED_BUILD=1 else AC_MSG_RESULT([static]) SHARED_BUILD=0 AC_DEFINE(STATIC_BUILD, 1, [Is this a static build?]) fi AC_SUBST(SHARED_BUILD) ]) #------------------------------------------------------------------------ # TEA_ENABLE_THREADS -- # # Specify if thread support should be enabled. If "yes" is specified # as an arg (optional), threads are enabled by default, "no" means # threads are disabled. "yes" is the default. # # TCL_THREADS is checked so that if you are compiling an extension # against a threaded core, your extension must be compiled threaded # as well. # # Note that it is legal to have a thread enabled extension run in a # threaded or non-threaded Tcl core, but a non-threaded extension may # only run in a non-threaded Tcl core. # # Arguments: # none # # Results: # # Adds the following arguments to configure: # --enable-threads # # Sets the following vars: # THREADS_LIBS Thread library(s) # # Defines the following vars: # TCL_THREADS # _REENTRANT # #------------------------------------------------------------------------ AC_DEFUN(TEA_ENABLE_THREADS, [ AC_ARG_ENABLE(threads, [ --enable-threads build with threads], [tcl_ok=$enableval], [tcl_ok=yes]) if test "${enable_threads+set}" = set; then enableval="$enable_threads" tcl_ok=$enableval else tcl_ok=yes fi if test "$tcl_ok" = "yes" -o "${TCL_THREADS}" = 1; then TCL_THREADS=1 if test "${TEA_PLATFORM}" != "windows" ; then # We are always OK on Windows, so check what this platform wants. AC_DEFINE(USE_THREAD_ALLOC, 1, [Do we want to use the threaded memory allocator?]) AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?]) AC_DEFINE(_THREAD_SAFE, 1, [Do we want the thread-safe OS API?]) AC_CHECK_LIB(pthread,pthread_mutex_init,tcl_ok=yes,tcl_ok=no) if test "$tcl_ok" = "no"; then # Check a little harder for __pthread_mutex_init in the # same library, as some systems hide it there until # pthread.h is defined. We could alternatively do an # AC_TRY_COMPILE with pthread.h, but that will work with # libpthread really doesn't exist, like AIX 4.2. # [Bug: 4359] AC_CHECK_LIB(pthread, __pthread_mutex_init, tcl_ok=yes, tcl_ok=no) fi if test "$tcl_ok" = "yes"; then # The space is needed THREADS_LIBS=" -lpthread" else AC_CHECK_LIB(pthreads, pthread_mutex_init, tcl_ok=yes, tcl_ok=no) if test "$tcl_ok" = "yes"; then # The space is needed THREADS_LIBS=" -lpthreads" else AC_CHECK_LIB(c, pthread_mutex_init, tcl_ok=yes, tcl_ok=no) if test "$tcl_ok" = "no"; then AC_CHECK_LIB(c_r, pthread_mutex_init, tcl_ok=yes, tcl_ok=no) if test "$tcl_ok" = "yes"; then # The space is needed THREADS_LIBS=" -pthread" else TCL_THREADS=0 AC_MSG_WARN("Don t know how to find pthread lib on your system - thread support disabled") fi fi fi fi dnl # Not needed in TEA dnl # Does the pthread-implementation provide dnl # 'pthread_attr_setstacksize' ? dnl dnl ac_saved_libs=$LIBS dnl LIBS="$LIBS $THREADS_LIBS" dnl AC_CHECK_FUNCS(pthread_attr_setstacksize) dnl LIBS=$ac_saved_libs fi else TCL_THREADS=0 fi # Do checking message here to not mess up interleaved configure output AC_MSG_CHECKING([for building with threads]) if test "${TCL_THREADS}" = "1"; then AC_DEFINE(TCL_THREADS, 1, [Are we building with threads enabled?]) #LIBS="$LIBS $THREADS_LIBS" AC_MSG_RESULT([yes (default)]) else AC_MSG_RESULT([no]) fi # TCL_THREADS sanity checking. See if our request for building with # threads is the same as the way Tcl was built. If not, warn the user. case ${TCL_DEFS} in *THREADS=1*) if test "${TCL_THREADS}" = "0"; then AC_MSG_WARN([ Building ${PACKAGE_NAME} without threads enabled, but building against Tcl that IS thread-enabled. It is recommended to use --enable-threads.]) fi ;; *) if test "${TCL_THREADS}" = "1"; then AC_MSG_WARN([ --enable-threads requested, but building against a Tcl that is NOT thread-enabled. This is an OK configuration that will also run in a thread-enabled core.]) fi ;; esac AC_SUBST(TCL_THREADS) ]) #------------------------------------------------------------------------ # TEA_ENABLE_SYMBOLS -- # # Specify if debugging symbols should be used # Memory (TCL_MEM_DEBUG) debugging can also be enabled. # # Arguments: # none # # Requires the following vars to be set: # CFLAGS_DEBUG # CFLAGS_OPTIMIZE # LDFLAGS_DEBUG # LDFLAGS_OPTIMIZE # # Results: # # Adds the following arguments to configure: # --enable-symbols # # Defines the following vars: # CFLAGS_DEFAULT Sets to CFLAGS_DEBUG if true # Sets to CFLAGS_OPTIMIZE if false # LDFLAGS_DEFAULT Sets to LDFLAGS_DEBUG if true # Sets to LDFLAGS_OPTIMIZE if false # DBGX Formerly used as debug library extension; # always blank now. # #------------------------------------------------------------------------ AC_DEFUN(TEA_ENABLE_SYMBOLS, [ dnl Make sure we are initialized AC_REQUIRE([TEA_CONFIG_CFLAGS]) DBGX="" AC_MSG_CHECKING([for build with symbols]) AC_ARG_ENABLE(symbols, [ --enable-symbols build with debugging symbols [--disable-symbols]], [tcl_ok=$enableval], [tcl_ok=no]) if test "$tcl_ok" = "no"; then CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE}" LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}" AC_MSG_RESULT([no]) else CFLAGS_DEFAULT="${CFLAGS_DEBUG}" LDFLAGS_DEFAULT="${LDFLAGS_DEBUG}" if test "$tcl_ok" = "yes"; then AC_MSG_RESULT([yes (standard debugging)]) fi fi if test "${TEA_PLATFORM}" != "windows" ; then LDFLAGS_DEFAULT="${LDFLAGS}" fi AC_SUBST(TCL_DBGX) AC_SUBST(CFLAGS_DEFAULT) AC_SUBST(LDFLAGS_DEFAULT) if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then AC_DEFINE(TCL_MEM_DEBUG, 1, [Is memory debugging enabled?]) fi if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then if test "$tcl_ok" = "all"; then AC_MSG_RESULT([enabled symbols mem debugging]) else AC_MSG_RESULT([enabled $tcl_ok debugging]) fi fi ]) #------------------------------------------------------------------------ # TEA_ENABLE_LANGINFO -- # # Allows use of modern nl_langinfo check for better l10n. # This is only relevant for Unix. # # Arguments: # none # # Results: # # Adds the following arguments to configure: # --enable-langinfo=yes|no (default is yes) # # Defines the following vars: # HAVE_LANGINFO Triggers use of nl_langinfo if defined. # #------------------------------------------------------------------------ AC_DEFUN(TEA_ENABLE_LANGINFO, [ AC_ARG_ENABLE(langinfo, [ --enable-langinfo use nl_langinfo if possible to determine encoding at startup, otherwise use old heuristic], [langinfo_ok=$enableval], [langinfo_ok=yes]) HAVE_LANGINFO=0 if test "$langinfo_ok" = "yes"; then AC_CHECK_HEADER(langinfo.h,[langinfo_ok=yes],[langinfo_ok=no]) fi AC_MSG_CHECKING([whether to use nl_langinfo]) if test "$langinfo_ok" = "yes"; then AC_CACHE_VAL(tcl_cv_langinfo_h, AC_TRY_COMPILE([#include ], [nl_langinfo(CODESET);], [tcl_cv_langinfo_h=yes],[tcl_cv_langinfo_h=no])) AC_MSG_RESULT($tcl_cv_langinfo_h) if test $tcl_cv_langinfo_h = yes; then AC_DEFINE(HAVE_LANGINFO, 1, [Do we have nl_langinfo()?]) fi else AC_MSG_RESULT([$langinfo_ok]) fi ]) #-------------------------------------------------------------------- # TEA_CONFIG_CFLAGS # # Try to determine the proper flags to pass to the compiler # for building shared libraries and other such nonsense. # # Arguments: # none # # Results: # # Defines the following vars: # # DL_OBJS - Name of the object file that implements dynamic # loading for Tcl on this system. # DL_LIBS - Library file(s) to include in tclsh and other base # applications in order for the "load" command to work. # LDFLAGS - Flags to pass to the compiler when linking object # files into an executable application binary such # as tclsh. # LD_SEARCH_FLAGS-Flags to pass to ld, such as "-R /usr/local/tcl/lib", # that tell the run-time dynamic linker where to look # for shared libraries such as libtcl.so. Depends on # the variable LIB_RUNTIME_DIR in the Makefile. # SHLIB_CFLAGS - Flags to pass to cc when compiling the components # of a shared library (may request position-independent # code, among other things). # SHLIB_LD - Base command to use for combining object files # into a shared library. # SHLIB_LD_LIBS - Dependent libraries for the linker to scan when # creating shared libraries. This symbol typically # goes at the end of the "ld" commands that build # shared libraries. The value of the symbol is # "${LIBS}" if all of the dependent libraries should # be specified when creating a shared library. If # dependent libraries should not be specified (as on # SunOS 4.x, where they cause the link to fail, or in # general if Tcl and Tk aren't themselves shared # libraries), then this symbol has an empty string # as its value. # SHLIB_SUFFIX - Suffix to use for the names of dynamically loadable # extensions. An empty string means we don't know how # to use shared libraries on this platform. # TCL_LIB_FILE - Name of the file that contains the Tcl library, such # as libtcl7.8.so or libtcl7.8.a. # TCL_LIB_SUFFIX -Specifies everything that comes after the "libtcl" # in the shared library name, using the # ${PACKAGE_VERSION} variable to put the version in # the right place. This is used by platforms that # need non-standard library names. # Examples: ${PACKAGE_VERSION}.so.1.1 on NetBSD, # since it needs to have a version after the .so, and # ${PACKAGE_VERSION}.a on AIX, since the Tcl shared # library needs to have a .a extension whereas shared # objects for loadable extensions have a .so # extension. Defaults to # ${PACKAGE_VERSION}${SHLIB_SUFFIX}. # TCL_NEEDS_EXP_FILE - # 1 means that an export file is needed to link to a # shared library. # TCL_EXP_FILE - The name of the installed export / import file which # should be used to link to the Tcl shared library. # Empty if Tcl is unshared. # TCL_BUILD_EXP_FILE - # The name of the built export / import file which # should be used to link to the Tcl shared library. # Empty if Tcl is unshared. # CFLAGS_DEBUG - # Flags used when running the compiler in debug mode # CFLAGS_OPTIMIZE - # Flags used when running the compiler in optimize mode # CFLAGS - We add CFLAGS to pass to the compiler # # Subst's the following vars: # DL_LIBS # CFLAGS_DEBUG # CFLAGS_OPTIMIZE # CFLAGS_WARNING # # STLIB_LD # SHLIB_LD # SHLIB_CFLAGS # LDFLAGS_DEBUG # LDFLAGS_OPTIMIZE #-------------------------------------------------------------------- AC_DEFUN(TEA_CONFIG_CFLAGS, [ dnl Make sure we are initialized AC_REQUIRE([TEA_INIT]) # Step 0: Enable 64 bit support? AC_MSG_CHECKING([if 64bit support is enabled]) AC_ARG_ENABLE(64bit,[ --enable-64bit enable 64bit support (where applicable)], [do64bit=$enableval], [do64bit=no]) AC_MSG_RESULT([$do64bit]) # Step 0.b: Enable Solaris 64 bit VIS support? AC_MSG_CHECKING([if 64bit Sparc VIS support is requested]) AC_ARG_ENABLE(64bit-vis,[ --enable-64bit-vis enable 64bit Sparc VIS support], [do64bitVIS=$enableval], [do64bitVIS=no]) AC_MSG_RESULT([$do64bitVIS]) if test "$do64bitVIS" = "yes"; then # Force 64bit on with VIS do64bit=yes fi # Step 0.c: Cross-compiling options for Windows/CE builds? if test "${TEA_PLATFORM}" = "windows" ; then AC_MSG_CHECKING([if Windows/CE build is requested]) AC_ARG_ENABLE(wince,[ --enable-wince enable Win/CE support (where applicable)], [doWince=$enableval], [doWince=no]) AC_MSG_RESULT($doWince) fi # Step 1: set the variable "system" to hold the name and version number # for the system. This can usually be done via the "uname" command, but # there are a few systems, like Next, where this doesn't work. AC_MSG_CHECKING([system version (for dynamic loading)]) if test -f /usr/lib/NextStep/software_version; then system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version` else system=`uname -s`-`uname -r` if test "$?" -ne 0 ; then AC_MSG_RESULT([unknown (can't find uname command)]) system=unknown else # Special check for weird MP-RAS system (uname returns weird # results, and the version is kept in special file). if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then system=MP-RAS-`awk '{print $3}' /etc/.relid` fi if test "`uname -s`" = "AIX" ; then system=AIX-`uname -v`.`uname -r` fi if test "${TEA_PLATFORM}" = "windows" ; then system=windows fi AC_MSG_RESULT([$system]) fi fi # Step 2: check for existence of -ldl library. This is needed because # Linux can use either -ldl or -ldld for dynamic loading. AC_CHECK_LIB(dl, dlopen, have_dl=yes, have_dl=no) # Step 3: set configuration options based on system name and version. # This is similar to Tcl's unix/tcl.m4 except that we've added a # "windows" case and CC_SEARCH_FLAGS becomes LD_SEARCH_FLAGS for us # (and we have no CC_SEARCH_FLAGS). do64bit_ok=no LDFLAGS_ORIG="$LDFLAGS" TCL_EXPORT_FILE_SUFFIX="" UNSHARED_LIB_SUFFIX="" TCL_TRIM_DOTS='`echo ${PACKAGE_VERSION} | tr -d .`' ECHO_VERSION='`echo ${PACKAGE_VERSION}`' TCL_LIB_VERSIONS_OK=ok CFLAGS_DEBUG=-g if test "$GCC" = "yes" ; then CFLAGS_OPTIMIZE=-O2 CFLAGS_WARNING="-Wall -Wno-implicit-int" else CFLAGS_OPTIMIZE=-O CFLAGS_WARNING="" fi TCL_NEEDS_EXP_FILE=0 TCL_BUILD_EXP_FILE="" TCL_EXP_FILE="" dnl FIXME: Replace AC_CHECK_PROG with AC_CHECK_TOOL once cross compiling is fixed. dnl AC_CHECK_TOOL(AR, ar, :) AC_CHECK_PROG(AR, ar, ar) STLIB_LD='${AR} cr' LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH" case $system in windows) # This is a 2-stage check to make sure we have the 64-bit SDK # We have to know where the SDK is installed. # This magic is based on MS Platform SDK for Win2003 SP1 - hobbs # MACHINE is IX86 for LINK, but this is used by the manifest, # which requires x86|amd64|ia64. MACHINE="X86" if test "$do64bit" != "no" ; then if test "x${MSSDK}x" = "xx" ; then MSSDK="C:/Progra~1/Microsoft Platform SDK" fi MSSDK=`echo "$MSSDK" | sed -e 's!\\\!/!g'` PATH64="" case "$do64bit" in amd64|x64|yes) MACHINE="AMD64" ; # default to AMD64 64-bit build PATH64="${MSSDK}/Bin/Win64/x86/AMD64" ;; ia64) MACHINE="IA64" PATH64="${MSSDK}/Bin/Win64" ;; esac if test ! -d "${PATH64}" ; then AC_MSG_WARN([Could not find 64-bit $MACHINE SDK to enable 64bit mode]) AC_MSG_WARN([Ensure latest Platform SDK is installed]) do64bit="no" else AC_MSG_RESULT([ Using 64-bit $MACHINE mode]) do64bit_ok="yes" fi fi if test "$doWince" != "no" ; then if test "$do64bit" != "no" ; then AC_MSG_ERROR([Windows/CE and 64-bit builds incompatible]) fi if test "$GCC" = "yes" ; then AC_MSG_ERROR([Windows/CE and GCC builds incompatible]) fi TEA_PATH_CELIB # Set defaults for common evc4/PPC2003 setup # Currently Tcl requires 300+, possibly 420+ for sockets CEVERSION=420; # could be 211 300 301 400 420 ... TARGETCPU=ARMV4; # could be ARMV4 ARM MIPS SH3 X86 ... ARCH=ARM; # could be ARM MIPS X86EM ... PLATFORM="Pocket PC 2003"; # or "Pocket PC 2002" if test "$doWince" != "yes"; then # If !yes then the user specified something # Reset ARCH to allow user to skip specifying it ARCH= eval `echo $doWince | awk -F, '{ \ if (length([$]1)) { printf "CEVERSION=\"%s\"\n", [$]1; \ if ([$]1 < 400) { printf "PLATFORM=\"Pocket PC 2002\"\n" } }; \ if (length([$]2)) { printf "TARGETCPU=\"%s\"\n", toupper([$]2) }; \ if (length([$]3)) { printf "ARCH=\"%s\"\n", toupper([$]3) }; \ if (length([$]4)) { printf "PLATFORM=\"%s\"\n", [$]4 }; \ }'` if test "x${ARCH}" = "x" ; then ARCH=$TARGETCPU; fi fi OSVERSION=WCE$CEVERSION; if test "x${WCEROOT}" = "x" ; then WCEROOT="C:/Program Files/Microsoft eMbedded C++ 4.0" if test ! -d "${WCEROOT}" ; then WCEROOT="C:/Program Files/Microsoft eMbedded Tools" fi fi if test "x${SDKROOT}" = "x" ; then SDKROOT="C:/Program Files/Windows CE Tools" if test ! -d "${SDKROOT}" ; then SDKROOT="C:/Windows CE Tools" fi fi WCEROOT=`echo "$WCEROOT" | sed -e 's!\\\!/!g'` SDKROOT=`echo "$SDKROOT" | sed -e 's!\\\!/!g'` if test ! -d "${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}" \ -o ! -d "${WCEROOT}/EVC/${OSVERSION}/bin"; then AC_MSG_ERROR([could not find PocketPC SDK or target compiler to enable WinCE mode [$CEVERSION,$TARGETCPU,$ARCH,$PLATFORM]]) doWince="no" else # We could PATH_NOSPACE these, but that's not important, # as long as we quote them when used. CEINCLUDE="${SDKROOT}/${OSVERSION}/${PLATFORM}/include" if test -d "${CEINCLUDE}/${TARGETCPU}" ; then CEINCLUDE="${CEINCLUDE}/${TARGETCPU}" fi CELIBPATH="${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}" fi fi if test "$GCC" != "yes" ; then if test "${SHARED_BUILD}" = "0" ; then runtime=-MT else runtime=-MD fi if test "$do64bit" != "no" ; then # All this magic is necessary for the Win64 SDK RC1 - hobbs CC="\"${PATH64}/cl.exe\"" CFLAGS="${CFLAGS} -I\"${MSSDK}/Include\" -I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\"" RC="\"${MSSDK}/bin/rc.exe\"" lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\"" LINKBIN="\"${PATH64}/link.exe\"" CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d" CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}" # Avoid 'unresolved external symbol __security_cookie' # errors, c.f. http://support.microsoft.com/?id=894573 TEA_ADD_LIBS([bufferoverflowU.lib]) elif test "$doWince" != "no" ; then CEBINROOT="${WCEROOT}/EVC/${OSVERSION}/bin" if test "${TARGETCPU}" = "X86"; then CC="\"${CEBINROOT}/cl.exe\"" else CC="\"${CEBINROOT}/cl${ARCH}.exe\"" fi CFLAGS="$CFLAGS -I\"${CELIB_DIR}/inc\" -I\"${CEINCLUDE}\"" RC="\"${WCEROOT}/Common/EVC/bin/rc.exe\"" arch=`echo ${ARCH} | awk '{print tolower([$]0)}'` defs="${ARCH} _${ARCH}_ ${arch} PALM_SIZE _MT _WINDOWS" if test "${SHARED_BUILD}" = "1" ; then # Static CE builds require static celib as well defs="${defs} _DLL" fi for i in $defs ; do AC_DEFINE_UNQUOTED($i, 1, [WinCE def ]$i) done AC_DEFINE_UNQUOTED(_WIN32_WCE, $CEVERSION, [_WIN32_WCE version]) AC_DEFINE_UNQUOTED(UNDER_CE, $CEVERSION, [UNDER_CE version]) CFLAGS_DEBUG="-nologo -Zi -Od" CFLAGS_OPTIMIZE="-nologo -Ox" lversion=`echo ${CEVERSION} | sed -e 's/\(.\)\(..\)/\1\.\2/'` lflags="-MACHINE:${ARCH} -LIBPATH:\"${CELIBPATH}\" -subsystem:windowsce,${lversion} -nologo" LINKBIN="\"${CEBINROOT}/link.exe\"" AC_SUBST(CELIB_DIR) else RC="rc" lflags="-nologo" LINKBIN="link" CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d" CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}" fi fi if test "$GCC" = "yes"; then # mingw gcc mode RC="windres" CFLAGS_DEBUG="-g" CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer" SHLIB_LD="$CC -shared" UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}" LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}" else SHLIB_LD="${LINKBIN} -dll ${lflags}" # link -lib only works when -lib is the first arg STLIB_LD="${LINKBIN} -lib ${lflags}" UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.lib' PATHTYPE=-w # For information on what debugtype is most useful, see: # http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp # This essentially turns it all on. LDFLAGS_DEBUG="-debug:full -debugtype:both -warn:2" LDFLAGS_OPTIMIZE="-release" if test "$doWince" != "no" ; then LDFLAGS_CONSOLE="-link ${lflags}" LDFLAGS_WINDOW=${LDFLAGS_CONSOLE} else LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}" LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}" fi fi SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".dll" SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.dll' TCL_LIB_VERSIONS_OK=nodots # Bogus to avoid getting this turned off DL_OBJS="tclLoadNone.obj" ;; AIX-*) if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes" ; then # AIX requires the _r compiler when gcc isn't being used case "${CC}" in *_r) # ok ... ;; *) CC=${CC}_r ;; esac AC_MSG_RESULT([Using $CC for compiling with threads]) fi LIBS="$LIBS -lc" SHLIB_CFLAGS="" SHLIB_SUFFIX=".so" SHLIB_LD_LIBS='${LIBS}' DL_OBJS="tclLoadDl.o" LD_LIBRARY_PATH_VAR="LIBPATH" # AIX v<=4.1 has some different flags than 4.2+ if test "$system" = "AIX-4.1" -o "`uname -v`" -lt "4" ; then #LIBOBJS="$LIBOBJS tclLoadAix.o" AC_LIBOBJ([tclLoadAix]) DL_LIBS="-lld" fi # Check to enable 64-bit flags for compiler/linker on AIX 4+ if test "$do64bit" = "yes" -a "`uname -v`" -gt "3" ; then if test "$GCC" = "yes" ; then AC_MSG_WARN("64bit mode not supported with GCC on $system") else do64bit_ok=yes CFLAGS="$CFLAGS -q64" LDFLAGS="$LDFLAGS -q64" RANLIB="${RANLIB} -X64" AR="${AR} -X64" SHLIB_LD_FLAGS="-b64" fi fi if test "`uname -m`" = "ia64" ; then # AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC SHLIB_LD="/usr/ccs/bin/ld -G -z text" # AIX-5 has dl* in libc.so DL_LIBS="" if test "$GCC" = "yes" ; then LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' else LD_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}' fi else if test "$GCC" = "yes" ; then SHLIB_LD="gcc -shared" else SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry" fi SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix ${SHLIB_LD} ${SHLIB_LD_FLAGS}" DL_LIBS="-ldl" LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' TCL_NEEDS_EXP_FILE=1 TCL_EXPORT_FILE_SUFFIX='${PACKAGE_VERSION}.exp' fi # On AIX <=v4 systems, libbsd.a has to be linked in to support # non-blocking file IO. This library has to be linked in after # the MATH_LIBS or it breaks the pow() function. The way to # insure proper sequencing, is to add it to the tail of MATH_LIBS. # This library also supplies gettimeofday. # # AIX does not have a timezone field in struct tm. When the AIX # bsd library is used, the timezone global and the gettimeofday # methods are to be avoided for timezone deduction instead, we # deduce the timezone by comparing the localtime result on a # known GMT value. AC_CHECK_LIB(bsd, gettimeofday, libbsd=yes, libbsd=no) if test $libbsd = yes; then MATH_LIBS="$MATH_LIBS -lbsd" AC_DEFINE(USE_DELTA_FOR_TZ, 1, [Do we need a special AIX hack for timezones?]) fi ;; BeOS*) SHLIB_CFLAGS="-fPIC" SHLIB_LD="${CC} -nostart" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" ;; BSD/OS-2.1*|BSD/OS-3*) SHLIB_CFLAGS="" SHLIB_LD="shlicc -r" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" LD_SEARCH_FLAGS="" ;; BSD/OS-4.*) SHLIB_CFLAGS="-export-dynamic -fPIC" SHLIB_LD="cc -shared" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" LDFLAGS="$LDFLAGS -export-dynamic" LD_SEARCH_FLAGS="" ;; dgux*) SHLIB_CFLAGS="-K PIC" SHLIB_LD="cc -G" SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" LD_SEARCH_FLAGS="" ;; HP-UX-*.11.*) # Use updated header definitions where possible AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, [Do we want to use the XOPEN network library?]) SHLIB_SUFFIX=".sl" AC_CHECK_LIB(dld, shl_load, tcl_ok=yes, tcl_ok=no) if test "$tcl_ok" = yes; then SHLIB_CFLAGS="+z" SHLIB_LD="ld -b" SHLIB_LD_LIBS='${LIBS}' DL_OBJS="tclLoadShl.o" DL_LIBS="-ldld" LDFLAGS="$LDFLAGS -Wl,-E" LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.' LD_LIBRARY_PATH_VAR="SHLIB_PATH" fi if test "$GCC" = "yes" ; then SHLIB_LD="gcc -shared" SHLIB_LD_LIBS='${LIBS}' LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.' fi # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc #CFLAGS="$CFLAGS +DAportable" # Check to enable 64-bit flags for compiler/linker if test "$do64bit" = "yes" ; then if test "$GCC" = "yes" ; then hpux_arch=`${CC} -dumpmachine` case $hpux_arch in hppa64*) # 64-bit gcc in use. Fix flags for GNU ld. do64bit_ok=yes SHLIB_LD="${CC} -shared" SHLIB_LD_LIBS='${LIBS}' ;; *) AC_MSG_WARN("64bit mode not supported with GCC on $system") ;; esac else do64bit_ok=yes CFLAGS="$CFLAGS +DD64" LDFLAGS="$LDFLAGS +DD64" fi fi ;; HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*) SHLIB_SUFFIX=".sl" AC_CHECK_LIB(dld, shl_load, tcl_ok=yes, tcl_ok=no) if test "$tcl_ok" = yes; then SHLIB_CFLAGS="+z" SHLIB_LD="ld -b" SHLIB_LD_LIBS="" DL_OBJS="tclLoadShl.o" DL_LIBS="-ldld" LDFLAGS="$LDFLAGS -Wl,-E" LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.' fi LD_LIBRARY_PATH_VAR="SHLIB_PATH" ;; IRIX-4.*) SHLIB_CFLAGS="-G 0" SHLIB_SUFFIX=".a" SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0" SHLIB_LD_LIBS='${LIBS}' DL_OBJS="tclLoadAout.o" DL_LIBS="" LDFLAGS="$LDFLAGS -Wl,-D,08000000" LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' SHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a' ;; IRIX-5.*) SHLIB_CFLAGS="" SHLIB_LD="ld -shared -rdata_shared" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' ;; IRIX-6.*|IRIX64-6.5*) SHLIB_CFLAGS="" SHLIB_LD="ld -n32 -shared -rdata_shared" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' if test "$GCC" = "yes" ; then CFLAGS="$CFLAGS -mabi=n32" LDFLAGS="$LDFLAGS -mabi=n32" else case $system in IRIX-6.3) # Use to build 6.2 compatible binaries on 6.3. CFLAGS="$CFLAGS -n32 -D_OLD_TERMIOS" ;; *) CFLAGS="$CFLAGS -n32" ;; esac LDFLAGS="$LDFLAGS -n32" fi ;; IRIX64-6.*) SHLIB_CFLAGS="" SHLIB_LD="ld -n32 -shared -rdata_shared" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' # Check to enable 64-bit flags for compiler/linker if test "$do64bit" = "yes" ; then if test "$GCC" = "yes" ; then AC_MSG_WARN([64bit mode not supported by gcc]) else do64bit_ok=yes SHLIB_LD="ld -64 -shared -rdata_shared" CFLAGS="$CFLAGS -64" LDFLAGS="$LDFLAGS -64" fi fi ;; Linux*) SHLIB_CFLAGS="-fPIC" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer" # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings # when you inline the string and math operations. Turn this off to # get rid of the warnings. #CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES" if test "$have_dl" = yes; then SHLIB_LD="${CC} -shared" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" LDFLAGS="$LDFLAGS -Wl,--export-dynamic" LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' else AC_CHECK_HEADER(dld.h, [ SHLIB_LD="ld -shared" DL_OBJS="tclLoadDld.o" DL_LIBS="-ldld" LD_SEARCH_FLAGS=""]) fi if test "`uname -m`" = "alpha" ; then CFLAGS="$CFLAGS -mieee" fi # The combo of gcc + glibc has a bug related # to inlining of functions like strtod(). The # -fno-builtin flag should address this problem # but it does not work. The -fno-inline flag # is kind of overkill but it works. # Disable inlining only when one of the # files in compat/*.c is being linked in. if test x"${USE_COMPAT}" != x ; then CFLAGS="$CFLAGS -fno-inline" fi ;; GNU*) SHLIB_CFLAGS="-fPIC" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" if test "$have_dl" = yes; then SHLIB_LD="${CC} -shared" DL_OBJS="" DL_LIBS="-ldl" LDFLAGS="$LDFLAGS -Wl,--export-dynamic" LD_SEARCH_FLAGS="" else AC_CHECK_HEADER(dld.h, [ SHLIB_LD="ld -shared" DL_OBJS="" DL_LIBS="-ldld" LD_SEARCH_FLAGS=""]) fi if test "`uname -m`" = "alpha" ; then CFLAGS="$CFLAGS -mieee" fi ;; MP-RAS-02*) SHLIB_CFLAGS="-K PIC" SHLIB_LD="cc -G" SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" LD_SEARCH_FLAGS="" ;; MP-RAS-*) SHLIB_CFLAGS="-K PIC" SHLIB_LD="cc -G" SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" LDFLAGS="$LDFLAGS -Wl,-Bexport" LD_SEARCH_FLAGS="" ;; NetBSD-*|FreeBSD-[[1-2]].*) # Not available on all versions: check for include file. AC_CHECK_HEADER(dlfcn.h, [ # NetBSD/SPARC needs -fPIC, -fpic will not do. SHLIB_CFLAGS="-fPIC" SHLIB_LD="ld -Bshareable -x" SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' AC_MSG_CHECKING([for ELF]) AC_EGREP_CPP(yes, [ #ifdef __ELF__ yes #endif ], AC_MSG_RESULT([yes]) SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so', AC_MSG_RESULT([no]) SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0' ) ], [ SHLIB_CFLAGS="" SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".a" DL_OBJS="tclLoadAout.o" DL_LIBS="" LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' ]) # FreeBSD doesn't handle version numbers with dots. UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' TCL_LIB_VERSIONS_OK=nodots ;; OpenBSD-*) SHLIB_LD="${CC} -shared" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" LD_SEARCH_FLAGS="" AC_MSG_CHECKING(for ELF) AC_EGREP_CPP(yes, [ #ifdef __ELF__ yes #endif ], [AC_MSG_RESULT(yes) SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0'], [AC_MSG_RESULT(no) SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0'] ) # OpenBSD doesn't do version numbers with dots. UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' TCL_LIB_VERSIONS_OK=nodots ;; FreeBSD-*) # FreeBSD 3.* and greater have ELF. SHLIB_CFLAGS="-fPIC" SHLIB_LD="ld -Bshareable -x" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" LDFLAGS="$LDFLAGS -export-dynamic" LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' if test "${TCL_THREADS}" = "1" ; then # The -pthread needs to go in the CFLAGS, not LIBS LIBS=`echo $LIBS | sed s/-pthread//` CFLAGS="$CFLAGS -pthread" LDFLAGS="$LDFLAGS -pthread" fi case $system in FreeBSD-3.*) # FreeBSD-3 doesn't handle version numbers with dots. UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so' TCL_LIB_VERSIONS_OK=nodots ;; esac ;; Darwin-*) CFLAGS_OPTIMIZE="-Os" SHLIB_CFLAGS="-fno-common" if test $do64bit = yes; then do64bit_ok=yes CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5" fi SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS}' AC_CACHE_CHECK([if ld accepts -single_module flag], tcl_cv_ld_single_module, [ hold_ldflags=$LDFLAGS LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module" AC_TRY_LINK(, [int i;], tcl_cv_ld_single_module=yes, tcl_cv_ld_single_module=no) LDFLAGS=$hold_ldflags]) if test $tcl_cv_ld_single_module = yes; then SHLIB_LD="${SHLIB_LD} -Wl,-single_module" fi SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".dylib" DL_OBJS="tclLoadDyld.o" DL_LIBS="" # Don't use -prebind when building for Mac OS X 10.4 or later only: test -z "${MACOSX_DEPLOYMENT_TARGET}" || \ test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F. '{print [$]2}'`" -lt 4 && \ LDFLAGS="$LDFLAGS -prebind" LDFLAGS="$LDFLAGS -headerpad_max_install_names" AC_CACHE_CHECK([if ld accepts -search_paths_first flag], tcl_cv_ld_search_paths_first, [ hold_ldflags=$LDFLAGS LDFLAGS="$LDFLAGS -Wl,-search_paths_first" AC_TRY_LINK(, [int i;], tcl_cv_ld_search_paths_first=yes, tcl_cv_ld_search_paths_first=no) LDFLAGS=$hold_ldflags]) if test $tcl_cv_ld_search_paths_first = yes; then LDFLAGS="$LDFLAGS -Wl,-search_paths_first" fi LD_SEARCH_FLAGS="" LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH" ;; NEXTSTEP-*) SHLIB_CFLAGS="" SHLIB_LD="cc -nostdlib -r" SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadNext.o" DL_LIBS="" LD_SEARCH_FLAGS="" ;; OS/390-*) CFLAGS_OPTIMIZE="" # Optimizer is buggy AC_DEFINE(_OE_SOCKETS, 1, # needed in sys/socket.h [Should OS/390 do the right thing with sockets?]) ;; OSF1-1.0|OSF1-1.1|OSF1-1.2) # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1 SHLIB_CFLAGS="" # Hack: make package name same as library name SHLIB_LD='ld -R -export $@:' SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadOSF.o" DL_LIBS="" LD_SEARCH_FLAGS="" ;; OSF1-1.*) # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2 SHLIB_CFLAGS="-fPIC" if test "$SHARED_BUILD" = "1" ; then SHLIB_LD="ld -shared" else SHLIB_LD="ld -non_shared" fi SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" LD_SEARCH_FLAGS="" ;; OSF1-V*) # Digital OSF/1 SHLIB_CFLAGS="" if test "$SHARED_BUILD" = "1" ; then SHLIB_LD="${CC} -shared" else SHLIB_LD="${CC} -non_shared" fi SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' if test "$GCC" = "yes" ; then CFLAGS="$CFLAGS -mieee" else CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee" fi # see pthread_intro(3) for pthread support on osf1, k.furukawa if test "${TCL_THREADS}" = "1" ; then CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE" CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64" LIBS=`echo $LIBS | sed s/-lpthreads//` if test "$GCC" = "yes" ; then LIBS="$LIBS -lpthread -lmach -lexc" else CFLAGS="$CFLAGS -pthread" LDFLAGS="$LDFLAGS -pthread" fi fi ;; QNX-6*) # QNX RTP # This may work for all QNX, but it was only reported for v6. SHLIB_CFLAGS="-fPIC" SHLIB_LD="ld -Bshareable -x" SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" # dlopen is in -lc on QNX DL_LIBS="" LD_SEARCH_FLAGS="" ;; RISCos-*) SHLIB_CFLAGS="-G 0" SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".a" DL_OBJS="tclLoadAout.o" DL_LIBS="" LDFLAGS="$LDFLAGS -Wl,-D,08000000" LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' ;; SCO_SV-3.2*) # Note, dlopen is available only on SCO 3.2.5 and greater. However, # this test works, since "uname -s" was non-standard in 3.2.4 and # below. if test "$GCC" = "yes" ; then SHLIB_CFLAGS="-fPIC -melf" LDFLAGS="$LDFLAGS -melf -Wl,-Bexport" else SHLIB_CFLAGS="-Kpic -belf" LDFLAGS="$LDFLAGS -belf -Wl,-Bexport" fi SHLIB_LD="ld -G" SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" LD_SEARCH_FLAGS="" ;; SINIX*5.4*) SHLIB_CFLAGS="-K PIC" SHLIB_LD="cc -G" SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" LD_SEARCH_FLAGS="" ;; SunOS-4*) SHLIB_CFLAGS="-PIC" SHLIB_LD="ld" SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' # SunOS can't handle version numbers with dots in them in library # specs, like -ltcl7.5, so use -ltcl75 instead. Also, it # requires an extra version number at the end of .so file names. # So, the library has to have a name like libtcl75.so.1.0 SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0' UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' TCL_LIB_VERSIONS_OK=nodots ;; SunOS-5.[[0-6]]) # Careful to not let 5.10+ fall into this case # Note: If _REENTRANT isn't defined, then Solaris # won't define thread-safe library routines. AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?]) AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1, [Do we really want to follow the standard? Yes we do!]) SHLIB_CFLAGS="-KPIC" # Note: need the LIBS below, otherwise Tk won't find Tcl's # symbols when dynamically loaded into tclsh. SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" if test "$GCC" = "yes" ; then SHLIB_LD="$CC -shared" LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' else SHLIB_LD="/usr/ccs/bin/ld -G -z text" LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' fi ;; SunOS-5*) # Note: If _REENTRANT isn't defined, then Solaris # won't define thread-safe library routines. AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?]) AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1, [Do we really want to follow the standard? Yes we do!]) SHLIB_CFLAGS="-KPIC" # Check to enable 64-bit flags for compiler/linker if test "$do64bit" = "yes" ; then arch=`isainfo` if test "$arch" = "sparcv9 sparc" ; then if test "$GCC" = "yes" ; then if test "`gcc -dumpversion` | awk -F. '{print $1}'" -lt "3" ; then AC_MSG_WARN([64bit mode not supported with GCC < 3.2 on $system]) else do64bit_ok=yes CFLAGS="$CFLAGS -m64 -mcpu=v9" LDFLAGS="$LDFLAGS -m64 -mcpu=v9" SHLIB_CFLAGS="-fPIC" fi else do64bit_ok=yes if test "$do64bitVIS" = "yes" ; then CFLAGS="$CFLAGS -xarch=v9a" LDFLAGS="$LDFLAGS -xarch=v9a" else CFLAGS="$CFLAGS -xarch=v9" LDFLAGS="$LDFLAGS -xarch=v9" fi # Solaris 64 uses this as well #LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64" fi elif test "$arch" = "amd64 i386" ; then if test "$GCC" = "yes" ; then AC_MSG_WARN([64bit mode not supported with GCC on $system]) else do64bit_ok=yes CFLAGS="$CFLAGS -xarch=amd64" LDFLAGS="$LDFLAGS -xarch=amd64" fi else AC_MSG_WARN([64bit mode not supported for $arch]) fi fi # Note: need the LIBS below, otherwise Tk won't find Tcl's # symbols when dynamically loaded into tclsh. SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" if test "$GCC" = "yes" ; then SHLIB_LD="$CC -shared" LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' if test "$do64bit" = "yes" ; then # We need to specify -static-libgcc or we need to # add the path to the sparv9 libgcc. # JH: static-libgcc is necessary for core Tcl, but may # not be necessary for extensions. SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc" # for finding sparcv9 libgcc, get the regular libgcc # path, remove so name and append 'sparcv9' #v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..." #LD_SEARCH_FLAGS="${LD_SEARCH_FLAGS},-R,$v9gcclibdir" fi else SHLIB_LD="/usr/ccs/bin/ld -G -z text" LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' fi ;; ULTRIX-4.*) SHLIB_CFLAGS="-G 0" SHLIB_SUFFIX=".a" SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0" SHLIB_LD_LIBS='${LIBS}' DL_OBJS="tclLoadAout.o" DL_LIBS="" LDFLAGS="$LDFLAGS -Wl,-D,08000000" LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' if test "$GCC" != "yes" ; then CFLAGS="$CFLAGS -DHAVE_TZSET -std1" fi ;; UNIX_SV* | UnixWare-5*) SHLIB_CFLAGS="-KPIC" SHLIB_LD="cc -G" SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers # that don't grok the -Bexport option. Test that it does. hold_ldflags=$LDFLAGS AC_MSG_CHECKING(for ld accepts -Bexport flag) LDFLAGS="$LDFLAGS -Wl,-Bexport" AC_TRY_LINK(, [int i;], [found=yes], [LDFLAGS=$hold_ldflags found=no]) AC_MSG_RESULT([$found]) LD_SEARCH_FLAGS="" ;; esac if test "$do64bit" != "no" -a "$do64bit_ok" = "no" ; then AC_MSG_WARN([64bit support being disabled -- don't know magic for this platform]) fi # Step 4: If pseudo-static linking is in use (see K. B. Kenny, "Dynamic # Loading for Tcl -- What Became of It?". Proc. 2nd Tcl/Tk Workshop, # New Orleans, LA, Computerized Processes Unlimited, 1994), then we need # to determine which of several header files defines the a.out file # format (a.out.h, sys/exec.h, or sys/exec_aout.h). At present, we # support only a file format that is more or less version-7-compatible. # In particular, # - a.out files must begin with `struct exec'. # - the N_TXTOFF on the `struct exec' must compute the seek address # of the text segment # - The `struct exec' must contain a_magic, a_text, a_data, a_bss # and a_entry fields. # The following compilation should succeed if and only if either sys/exec.h # or a.out.h is usable for the purpose. # # Note that the modified COFF format used on MIPS Ultrix 4.x is usable; the # `struct exec' includes a second header that contains information that # duplicates the v7 fields that are needed. if test "x$DL_OBJS" = "xtclLoadAout.o" ; then AC_MSG_CHECKING([sys/exec.h]) AC_TRY_COMPILE([#include ],[ struct exec foo; unsigned long seek; int flag; #if defined(__mips) || defined(mips) seek = N_TXTOFF (foo.ex_f, foo.ex_o); #else seek = N_TXTOFF (foo); #endif flag = (foo.a_magic == OMAGIC); return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry; ], tcl_ok=usable, tcl_ok=unusable) AC_MSG_RESULT([$tcl_ok]) if test $tcl_ok = usable; then AC_DEFINE(USE_SYS_EXEC_H, 1, [Should we use when doing dynamic loading?]) else AC_MSG_CHECKING([a.out.h]) AC_TRY_COMPILE([#include ],[ struct exec foo; unsigned long seek; int flag; #if defined(__mips) || defined(mips) seek = N_TXTOFF (foo.ex_f, foo.ex_o); #else seek = N_TXTOFF (foo); #endif flag = (foo.a_magic == OMAGIC); return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry; ], tcl_ok=usable, tcl_ok=unusable) AC_MSG_RESULT([$tcl_ok]) if test $tcl_ok = usable; then AC_DEFINE(USE_A_OUT_H, 1, [Should we use when doing dynamic loading?]) else AC_MSG_CHECKING([sys/exec_aout.h]) AC_TRY_COMPILE([#include ],[ struct exec foo; unsigned long seek; int flag; #if defined(__mips) || defined(mips) seek = N_TXTOFF (foo.ex_f, foo.ex_o); #else seek = N_TXTOFF (foo); #endif flag = (foo.a_midmag == OMAGIC); return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry; ], tcl_ok=usable, tcl_ok=unusable) AC_MSG_RESULT([$tcl_ok]) if test $tcl_ok = usable; then AC_DEFINE(USE_SYS_EXEC_AOUT_H, 1, [Should we use when doing dynamic loading?]) else DL_OBJS="" fi fi fi fi # Step 5: disable dynamic loading if requested via a command-line switch. AC_ARG_ENABLE(load, [ --disable-load disallow dynamic loading and "load" command], [tcl_ok=$enableval], [tcl_ok=yes]) if test "$tcl_ok" = "no"; then DL_OBJS="" fi if test "x$DL_OBJS" != "x" ; then BUILD_DLTEST="\$(DLTEST_TARGETS)" else echo "Can't figure out how to do dynamic loading or shared libraries" echo "on this system." SHLIB_CFLAGS="" SHLIB_LD="" SHLIB_SUFFIX="" DL_OBJS="tclLoadNone.o" DL_LIBS="" LDFLAGS="$LDFLAGS_ORIG" LD_SEARCH_FLAGS="" BUILD_DLTEST="" fi # If we're running gcc, then change the C flags for compiling shared # libraries to the right flags for gcc, instead of those for the # standard manufacturer compiler. if test "$DL_OBJS" != "tclLoadNone.o" ; then if test "$GCC" = "yes" ; then case $system in AIX-*) ;; BSD/OS*) ;; IRIX*) ;; NetBSD-*|FreeBSD-*) ;; Darwin-*) ;; RISCos-*) ;; SCO_SV-3.2*) ;; ULTRIX-4.*) ;; windows) ;; *) SHLIB_CFLAGS="-fPIC" ;; esac fi fi if test "$SHARED_LIB_SUFFIX" = "" ; then SHARED_LIB_SUFFIX='${PACKAGE_VERSION}${SHLIB_SUFFIX}' fi if test "$UNSHARED_LIB_SUFFIX" = "" ; then UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a' fi AC_SUBST(DL_LIBS) AC_SUBST(CFLAGS_DEBUG) AC_SUBST(CFLAGS_OPTIMIZE) AC_SUBST(CFLAGS_WARNING) AC_SUBST(STLIB_LD) AC_SUBST(SHLIB_LD) AC_SUBST(SHLIB_CFLAGS) AC_SUBST(SHLIB_LD_LIBS) AC_SUBST(LDFLAGS_DEBUG) AC_SUBST(LDFLAGS_OPTIMIZE) AC_SUBST(LD_LIBRARY_PATH_VAR) # These must be called after we do the basic CFLAGS checks and # verify any possible 64-bit or similar switches are necessary TEA_TCL_EARLY_FLAGS TEA_TCL_64BIT_FLAGS ]) #-------------------------------------------------------------------- # TEA_SERIAL_PORT # # Determine which interface to use to talk to the serial port. # Note that #include lines must begin in leftmost column for # some compilers to recognize them as preprocessor directives, # and some build environments have stdin not pointing at a # pseudo-terminal (usually /dev/null instead.) # # Arguments: # none # # Results: # # Defines only one of the following vars: # HAVE_SYS_MODEM_H # USE_TERMIOS # USE_TERMIO # USE_SGTTY # #-------------------------------------------------------------------- AC_DEFUN(TEA_SERIAL_PORT, [ AC_CHECK_HEADERS(sys/modem.h) AC_MSG_CHECKING([termios vs. termio vs. sgtty]) AC_CACHE_VAL(tcl_cv_api_serial, [ AC_TRY_RUN([ #include int main() { struct termios t; if (tcgetattr(0, &t) == 0) { cfsetospeed(&t, 0); t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB; return 0; } return 1; }], tcl_cv_api_serial=termios, tcl_cv_api_serial=no, tcl_cv_api_serial=no) if test $tcl_cv_api_serial = no ; then AC_TRY_RUN([ #include int main() { struct termio t; if (ioctl(0, TCGETA, &t) == 0) { t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB; return 0; } return 1; }], tcl_cv_api_serial=termio, tcl_cv_api_serial=no, tcl_cv_api_serial=no) fi if test $tcl_cv_api_serial = no ; then AC_TRY_RUN([ #include int main() { struct sgttyb t; if (ioctl(0, TIOCGETP, &t) == 0) { t.sg_ospeed = 0; t.sg_flags |= ODDP | EVENP | RAW; return 0; } return 1; }], tcl_cv_api_serial=sgtty, tcl_cv_api_serial=none, tcl_cv_api_serial=none) fi if test $tcl_cv_api_serial = no ; then AC_TRY_RUN([ #include #include int main() { struct termios t; if (tcgetattr(0, &t) == 0 || errno == ENOTTY || errno == ENXIO || errno == EINVAL) { cfsetospeed(&t, 0); t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB; return 0; } return 1; }], tcl_cv_api_serial=termios, tcl_cv_api_serial=no, tcl_cv_api_serial=no) fi if test $tcl_cv_api_serial = no; then AC_TRY_RUN([ #include #include int main() { struct termio t; if (ioctl(0, TCGETA, &t) == 0 || errno == ENOTTY || errno == ENXIO || errno == EINVAL) { t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB; return 0; } return 1; }], tcl_cv_api_serial=termio, tcl_cv_api_serial=no, tcl_cv_api_serial=no) fi if test $tcl_cv_api_serial = no; then AC_TRY_RUN([ #include #include int main() { struct sgttyb t; if (ioctl(0, TIOCGETP, &t) == 0 || errno == ENOTTY || errno == ENXIO || errno == EINVAL) { t.sg_ospeed = 0; t.sg_flags |= ODDP | EVENP | RAW; return 0; } return 1; }], tcl_cv_api_serial=sgtty, tcl_cv_api_serial=none, tcl_cv_api_serial=none) fi]) case $tcl_cv_api_serial in termios) AC_DEFINE(USE_TERMIOS, 1, [Use the termios API for serial lines]);; termio) AC_DEFINE(USE_TERMIO, 1, [Use the termio API for serial lines]);; sgtty) AC_DEFINE(USE_SGTTY, 1, [Use the sgtty API for serial lines]);; esac AC_MSG_RESULT([$tcl_cv_api_serial]) ]) #-------------------------------------------------------------------- # TEA_MISSING_POSIX_HEADERS # # Supply substitutes for missing POSIX header files. Special # notes: # - stdlib.h doesn't define strtol, strtoul, or # strtod insome versions of SunOS # - some versions of string.h don't declare procedures such # as strstr # # Arguments: # none # # Results: # # Defines some of the following vars: # NO_DIRENT_H # NO_ERRNO_H # NO_VALUES_H # HAVE_LIMITS_H or NO_LIMITS_H # NO_STDLIB_H # NO_STRING_H # NO_SYS_WAIT_H # NO_DLFCN_H # HAVE_SYS_PARAM_H # # HAVE_STRING_H ? # # tkUnixPort.h checks for HAVE_LIMITS_H, so do both HAVE and # CHECK on limits.h #-------------------------------------------------------------------- AC_DEFUN(TEA_MISSING_POSIX_HEADERS, [ AC_MSG_CHECKING([dirent.h]) AC_CACHE_VAL(tcl_cv_dirent_h, AC_TRY_LINK([#include #include ], [ #ifndef _POSIX_SOURCE # ifdef __Lynx__ /* * Generate compilation error to make the test fail: Lynx headers * are only valid if really in the POSIX environment. */ missing_procedure(); # endif #endif DIR *d; struct dirent *entryPtr; char *p; d = opendir("foobar"); entryPtr = readdir(d); p = entryPtr->d_name; closedir(d); ], tcl_cv_dirent_h=yes, tcl_cv_dirent_h=no)) if test $tcl_cv_dirent_h = no; then AC_DEFINE(NO_DIRENT_H, 1, [Do we have ?]) fi AC_MSG_RESULT([$tcl_ok]) AC_CHECK_HEADER(errno.h, , [AC_DEFINE(NO_ERRNO_H, 1, [Do we have ?])]) AC_CHECK_HEADER(float.h, , [AC_DEFINE(NO_FLOAT_H, 1, [Do we have ?])]) AC_CHECK_HEADER(values.h, , [AC_DEFINE(NO_VALUES_H, 1, [Do we have ?])]) AC_CHECK_HEADER(limits.h, [AC_DEFINE(HAVE_LIMITS_H, 1, [Do we have ?])], [AC_DEFINE(NO_LIMITS_H, 1, [Do we have ?])]) AC_CHECK_HEADER(stdlib.h, tcl_ok=1, tcl_ok=0) AC_EGREP_HEADER(strtol, stdlib.h, , tcl_ok=0) AC_EGREP_HEADER(strtoul, stdlib.h, , tcl_ok=0) AC_EGREP_HEADER(strtod, stdlib.h, , tcl_ok=0) if test $tcl_ok = 0; then AC_DEFINE(NO_STDLIB_H, 1, [Do we have ?]) fi AC_CHECK_HEADER(string.h, tcl_ok=1, tcl_ok=0) AC_EGREP_HEADER(strstr, string.h, , tcl_ok=0) AC_EGREP_HEADER(strerror, string.h, , tcl_ok=0) # See also memmove check below for a place where NO_STRING_H can be # set and why. if test $tcl_ok = 0; then AC_DEFINE(NO_STRING_H, 1, [Do we have ?]) fi AC_CHECK_HEADER(sys/wait.h, , [AC_DEFINE(NO_SYS_WAIT_H, 1, [Do we have ?])]) AC_CHECK_HEADER(dlfcn.h, , [AC_DEFINE(NO_DLFCN_H, 1, [Do we have ?])]) # OS/390 lacks sys/param.h (and doesn't need it, by chance). AC_HAVE_HEADERS(sys/param.h) ]) #-------------------------------------------------------------------- # TEA_PATH_X # # Locate the X11 header files and the X11 library archive. Try # the ac_path_x macro first, but if it doesn't find the X stuff # (e.g. because there's no xmkmf program) then check through # a list of possible directories. Under some conditions the # autoconf macro will return an include directory that contains # no include files, so double-check its result just to be safe. # # This should be called after TEA_CONFIG_CFLAGS as setting the # LIBS line can confuse some configure macro magic. # # Arguments: # none # # Results: # # Sets the following vars: # XINCLUDES # XLIBSW # LIBS (appends to) # TEA_WINDOWINGSYSTEM # #-------------------------------------------------------------------- AC_DEFUN(TEA_PATH_X, [ if test "${TEA_WINDOWINGSYSTEM}" = "x11" ; then TEA_PATH_UNIX_X fi ]) AC_DEFUN(TEA_PATH_UNIX_X, [ AC_PATH_X not_really_there="" if test "$no_x" = ""; then if test "$x_includes" = ""; then AC_TRY_CPP([#include ], , not_really_there="yes") else if test ! -r $x_includes/X11/Intrinsic.h; then not_really_there="yes" fi fi fi if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then AC_MSG_CHECKING([for X11 header files]) XINCLUDES="# no special path needed" AC_TRY_CPP([#include ], , XINCLUDES="nope") if test "$XINCLUDES" = nope; then dirs="/usr/unsupported/include /usr/local/include /usr/X386/include /usr/X11R6/include /usr/X11R5/include /usr/include/X11R5 /usr/include/X11R4 /usr/openwin/include /usr/X11/include /usr/sww/include" for i in $dirs ; do if test -r $i/X11/Intrinsic.h; then AC_MSG_RESULT([$i]) XINCLUDES=" -I$i" break fi done fi else if test "$x_includes" != ""; then XINCLUDES=-I$x_includes else XINCLUDES="# no special path needed" fi fi if test "$XINCLUDES" = nope; then AC_MSG_RESULT([could not find any!]) XINCLUDES="# no include files found" fi if test "$no_x" = yes; then AC_MSG_CHECKING([for X11 libraries]) XLIBSW=nope dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/X11R6/lib /usr/X11R5/lib /usr/lib/X11R5 /usr/lib/X11R4 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib" for i in $dirs ; do if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl; then AC_MSG_RESULT([$i]) XLIBSW="-L$i -lX11" x_libraries="$i" break fi done else if test "$x_libraries" = ""; then XLIBSW=-lX11 else XLIBSW="-L$x_libraries -lX11" fi fi if test "$XLIBSW" = nope ; then AC_CHECK_LIB(Xwindow, XCreateWindow, XLIBSW=-lXwindow) fi if test "$XLIBSW" = nope ; then AC_MSG_RESULT([could not find any! Using -lX11.]) XLIBSW=-lX11 fi if test x"${XLIBSW}" != x ; then PKG_LIBS="${PKG_LIBS} ${XLIBSW}" fi ]) #-------------------------------------------------------------------- # TEA_BLOCKING_STYLE # # The statements below check for systems where POSIX-style # non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented. # On these systems (mostly older ones), use the old BSD-style # FIONBIO approach instead. # # Arguments: # none # # Results: # # Defines some of the following vars: # HAVE_SYS_IOCTL_H # HAVE_SYS_FILIO_H # USE_FIONBIO # O_NONBLOCK # #-------------------------------------------------------------------- AC_DEFUN(TEA_BLOCKING_STYLE, [ AC_CHECK_HEADERS(sys/ioctl.h) AC_CHECK_HEADERS(sys/filio.h) AC_MSG_CHECKING([FIONBIO vs. O_NONBLOCK for nonblocking I/O]) if test -f /usr/lib/NextStep/software_version; then system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version` else system=`uname -s`-`uname -r` if test "$?" -ne 0 ; then system=unknown else # Special check for weird MP-RAS system (uname returns weird # results, and the version is kept in special file). if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then system=MP-RAS-`awk '{print $3}' /etc/.relid` fi if test "`uname -s`" = "AIX" ; then system=AIX-`uname -v`.`uname -r` fi fi fi case $system in # There used to be code here to use FIONBIO under AIX. However, it # was reported that FIONBIO doesn't work under AIX 3.2.5. Since # using O_NONBLOCK seems fine under AIX 4.*, I removed the FIONBIO # code (JO, 5/31/97). OSF*) AC_DEFINE(USE_FIONBIO, 1, [Should we use FIONBIO?]) AC_MSG_RESULT([FIONBIO]) ;; SunOS-4*) AC_DEFINE(USE_FIONBIO, 1, [Should we use FIONBIO?]) AC_MSG_RESULT([FIONBIO]) ;; ULTRIX-4.*) AC_DEFINE(USE_FIONBIO, 1, [Should we use FIONBIO?]) AC_MSG_RESULT([FIONBIO]) ;; *) AC_MSG_RESULT([O_NONBLOCK]) ;; esac ]) #-------------------------------------------------------------------- # TEA_TIME_HANLDER # # Checks how the system deals with time.h, what time structures # are used on the system, and what fields the structures have. # # Arguments: # none # # Results: # # Defines some of the following vars: # USE_DELTA_FOR_TZ # HAVE_TM_GMTOFF # HAVE_TM_TZADJ # HAVE_TIMEZONE_VAR # #-------------------------------------------------------------------- AC_DEFUN(TEA_TIME_HANDLER, [ AC_CHECK_HEADERS(sys/time.h) AC_HEADER_TIME AC_STRUCT_TIMEZONE AC_CHECK_FUNCS(gmtime_r localtime_r) AC_MSG_CHECKING([tm_tzadj in struct tm]) AC_CACHE_VAL(tcl_cv_member_tm_tzadj, AC_TRY_COMPILE([#include ], [struct tm tm; tm.tm_tzadj;], tcl_cv_member_tm_tzadj=yes, tcl_cv_member_tm_tzadj=no)) AC_MSG_RESULT([$tcl_cv_member_tm_tzadj]) if test $tcl_cv_member_tm_tzadj = yes ; then AC_DEFINE(HAVE_TM_TZADJ, 1, [Should we use the tm_tzadj field of struct tm?]) fi AC_MSG_CHECKING([tm_gmtoff in struct tm]) AC_CACHE_VAL(tcl_cv_member_tm_gmtoff, AC_TRY_COMPILE([#include ], [struct tm tm; tm.tm_gmtoff;], tcl_cv_member_tm_gmtoff=yes, tcl_cv_member_tm_gmtoff=no)) AC_MSG_RESULT([$tcl_cv_member_tm_gmtoff]) if test $tcl_cv_member_tm_gmtoff = yes ; then AC_DEFINE(HAVE_TM_GMTOFF, 1, [Should we use the tm_gmtoff field of struct tm?]) fi # # Its important to include time.h in this check, as some systems # (like convex) have timezone functions, etc. # AC_MSG_CHECKING([long timezone variable]) AC_CACHE_VAL(tcl_cv_timezone_long, AC_TRY_COMPILE([#include ], [extern long timezone; timezone += 1; exit (0);], tcl_cv_timezone_long=yes, tcl_cv_timezone_long=no)) AC_MSG_RESULT([$tcl_cv_timezone_long]) if test $tcl_cv_timezone_long = yes ; then AC_DEFINE(HAVE_TIMEZONE_VAR, 1, [Should we use the global timezone variable?]) else # # On some systems (eg IRIX 6.2), timezone is a time_t and not a long. # AC_MSG_CHECKING([time_t timezone variable]) AC_CACHE_VAL(tcl_cv_timezone_time, AC_TRY_COMPILE([#include ], [extern time_t timezone; timezone += 1; exit (0);], tcl_cv_timezone_time=yes, tcl_cv_timezone_time=no)) AC_MSG_RESULT([$tcl_cv_timezone_time]) if test $tcl_cv_timezone_time = yes ; then AC_DEFINE(HAVE_TIMEZONE_VAR, 1, [Should we use the global timezone variable?]) fi fi ]) #-------------------------------------------------------------------- # TEA_BUGGY_STRTOD # # Under Solaris 2.4, strtod returns the wrong value for the # terminating character under some conditions. Check for this # and if the problem exists use a substitute procedure # "fixstrtod" (provided by Tcl) that corrects the error. # Also, on Compaq's Tru64 Unix 5.0, # strtod(" ") returns 0.0 instead of a failure to convert. # # Arguments: # none # # Results: # # Might defines some of the following vars: # strtod (=fixstrtod) # #-------------------------------------------------------------------- AC_DEFUN(TEA_BUGGY_STRTOD, [ AC_CHECK_FUNC(strtod, tcl_strtod=1, tcl_strtod=0) if test "$tcl_strtod" = 1; then AC_MSG_CHECKING([for Solaris2.4/Tru64 strtod bugs]) AC_CACHE_VAL(tcl_cv_strtod_buggy,[ AC_TRY_RUN([ extern double strtod(); int main() { char *string = "NaN", *spaceString = " "; char *term; double value; value = strtod(string, &term); if ((term != string) && (term[-1] == 0)) { exit(1); } value = strtod(spaceString, &term); if (term == (spaceString+1)) { exit(1); } exit(0); }], tcl_cv_strtod_buggy=1, tcl_cv_strtod_buggy=0, tcl_cv_strtod_buggy=0)]) if test "$tcl_cv_strtod_buggy" = 1; then AC_MSG_RESULT([ok]) else AC_MSG_RESULT([buggy]) #LIBOBJS="$LIBOBJS fixstrtod.o" AC_LIBOBJ([fixstrtod]) USE_COMPAT=1 AC_DEFINE(strtod, fixstrtod, [Do we want to use the strtod() in compat?]) fi fi ]) #-------------------------------------------------------------------- # TEA_TCL_LINK_LIBS # # Search for the libraries needed to link the Tcl shell. # Things like the math library (-lm) and socket stuff (-lsocket vs. # -lnsl) are dealt with here. # # Arguments: # Requires the following vars to be set in the Makefile: # DL_LIBS # LIBS # MATH_LIBS # # Results: # # Subst's the following var: # TCL_LIBS # MATH_LIBS # # Might append to the following vars: # LIBS # # Might define the following vars: # HAVE_NET_ERRNO_H # #-------------------------------------------------------------------- AC_DEFUN(TEA_TCL_LINK_LIBS, [ #-------------------------------------------------------------------- # On a few very rare systems, all of the libm.a stuff is # already in libc.a. Set compiler flags accordingly. # Also, Linux requires the "ieee" library for math to work # right (and it must appear before "-lm"). #-------------------------------------------------------------------- AC_CHECK_FUNC(sin, MATH_LIBS="", MATH_LIBS="-lm") AC_CHECK_LIB(ieee, main, [MATH_LIBS="-lieee $MATH_LIBS"]) #-------------------------------------------------------------------- # Interactive UNIX requires -linet instead of -lsocket, plus it # needs net/errno.h to define the socket-related error codes. #-------------------------------------------------------------------- AC_CHECK_LIB(inet, main, [LIBS="$LIBS -linet"]) AC_CHECK_HEADER(net/errno.h, [ AC_DEFINE(HAVE_NET_ERRNO_H, 1, [Do we have ?])]) #-------------------------------------------------------------------- # Check for the existence of the -lsocket and -lnsl libraries. # The order here is important, so that they end up in the right # order in the command line generated by make. Here are some # special considerations: # 1. Use "connect" and "accept" to check for -lsocket, and # "gethostbyname" to check for -lnsl. # 2. Use each function name only once: can't redo a check because # autoconf caches the results of the last check and won't redo it. # 3. Use -lnsl and -lsocket only if they supply procedures that # aren't already present in the normal libraries. This is because # IRIX 5.2 has libraries, but they aren't needed and they're # bogus: they goof up name resolution if used. # 4. On some SVR4 systems, can't use -lsocket without -lnsl too. # To get around this problem, check for both libraries together # if -lsocket doesn't work by itself. #-------------------------------------------------------------------- tcl_checkBoth=0 AC_CHECK_FUNC(connect, tcl_checkSocket=0, tcl_checkSocket=1) if test "$tcl_checkSocket" = 1; then AC_CHECK_FUNC(setsockopt, , [AC_CHECK_LIB(socket, setsockopt, LIBS="$LIBS -lsocket", tcl_checkBoth=1)]) fi if test "$tcl_checkBoth" = 1; then tk_oldLibs=$LIBS LIBS="$LIBS -lsocket -lnsl" AC_CHECK_FUNC(accept, tcl_checkNsl=0, [LIBS=$tk_oldLibs]) fi AC_CHECK_FUNC(gethostbyname, , [AC_CHECK_LIB(nsl, gethostbyname, [LIBS="$LIBS -lnsl"])]) # Don't perform the eval of the libraries here because DL_LIBS # won't be set until we call TEA_CONFIG_CFLAGS TCL_LIBS='${DL_LIBS} ${LIBS} ${MATH_LIBS}' AC_SUBST(TCL_LIBS) AC_SUBST(MATH_LIBS) ]) #-------------------------------------------------------------------- # TEA_TCL_EARLY_FLAGS # # Check for what flags are needed to be passed so the correct OS # features are available. # # Arguments: # None # # Results: # # Might define the following vars: # _ISOC99_SOURCE # _LARGEFILE64_SOURCE # #-------------------------------------------------------------------- AC_DEFUN(TEA_TCL_EARLY_FLAG,[ AC_CACHE_VAL([tcl_cv_flag_]translit($1,[A-Z],[a-z]), AC_TRY_COMPILE([$2], $3, [tcl_cv_flag_]translit($1,[A-Z],[a-z])=no, AC_TRY_COMPILE([[#define ]$1[ 1 ]$2], $3, [tcl_cv_flag_]translit($1,[A-Z],[a-z])=yes, [tcl_cv_flag_]translit($1,[A-Z],[a-z])=no))) if test ["x${tcl_cv_flag_]translit($1,[A-Z],[a-z])[}" = "xyes"] ; then AC_DEFINE($1, 1, [Add the ]$1[ flag when building]) tcl_flags="$tcl_flags $1" fi ]) AC_DEFUN(TEA_TCL_EARLY_FLAGS,[ AC_MSG_CHECKING([for required early compiler flags]) tcl_flags="" TEA_TCL_EARLY_FLAG(_ISOC99_SOURCE,[#include ], [char *p = (char *)strtoll; char *q = (char *)strtoull;]) TEA_TCL_EARLY_FLAG(_LARGEFILE64_SOURCE,[#include ], [struct stat64 buf; int i = stat64("/", &buf);]) if test "x${tcl_flags}" = "x" ; then AC_MSG_RESULT([none]) else AC_MSG_RESULT([${tcl_flags}]) fi ]) #-------------------------------------------------------------------- # TEA_TCL_64BIT_FLAGS # # Check for what is defined in the way of 64-bit features. # # Arguments: # None # # Results: # # Might define the following vars: # TCL_WIDE_INT_IS_LONG # TCL_WIDE_INT_TYPE # HAVE_STRUCT_DIRENT64 # HAVE_STRUCT_STAT64 # HAVE_TYPE_OFF64_T # #-------------------------------------------------------------------- AC_DEFUN(TEA_TCL_64BIT_FLAGS, [ AC_MSG_CHECKING([for 64-bit integer type]) AC_CACHE_VAL(tcl_cv_type_64bit,[ tcl_cv_type_64bit=none # See if the compiler knows natively about __int64 AC_TRY_COMPILE(,[__int64 value = (__int64) 0;], tcl_type_64bit=__int64, tcl_type_64bit="long long") # See if we should use long anyway Note that we substitute in the # type that is our current guess for a 64-bit type inside this check # program, so it should be modified only carefully... AC_TRY_COMPILE(,[switch (0) { case 1: case (sizeof(]${tcl_type_64bit}[)==sizeof(long)): ; }],tcl_cv_type_64bit=${tcl_type_64bit})]) if test "${tcl_cv_type_64bit}" = none ; then AC_DEFINE(TCL_WIDE_INT_IS_LONG, 1, [Are wide integers to be implemented with C 'long's?]) AC_MSG_RESULT([using long]) elif test "${tcl_cv_type_64bit}" = "__int64" \ -a "${TEA_PLATFORM}" = "windows" ; then # We actually want to use the default tcl.h checks in this # case to handle both TCL_WIDE_INT_TYPE and TCL_LL_MODIFIER* AC_MSG_RESULT([using Tcl header defaults]) else AC_DEFINE_UNQUOTED(TCL_WIDE_INT_TYPE,${tcl_cv_type_64bit}, [What type should be used to define wide integers?]) AC_MSG_RESULT([${tcl_cv_type_64bit}]) # Now check for auxiliary declarations AC_MSG_CHECKING([for struct dirent64]) AC_CACHE_VAL(tcl_cv_struct_dirent64,[ AC_TRY_COMPILE([#include #include ],[struct dirent64 p;], tcl_cv_struct_dirent64=yes,tcl_cv_struct_dirent64=no)]) if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then AC_DEFINE(HAVE_STRUCT_DIRENT64, 1, [Is 'struct dirent64' in ?]) fi AC_MSG_RESULT([${tcl_cv_struct_dirent64}]) AC_MSG_CHECKING([for struct stat64]) AC_CACHE_VAL(tcl_cv_struct_stat64,[ AC_TRY_COMPILE([#include ],[struct stat64 p; ], tcl_cv_struct_stat64=yes,tcl_cv_struct_stat64=no)]) if test "x${tcl_cv_struct_stat64}" = "xyes" ; then AC_DEFINE(HAVE_STRUCT_STAT64, 1, [Is 'struct stat64' in ?]) fi AC_MSG_RESULT([${tcl_cv_struct_stat64}]) AC_MSG_CHECKING([for off64_t]) AC_CACHE_VAL(tcl_cv_type_off64_t,[ AC_TRY_COMPILE([#include ],[off64_t offset; ], tcl_cv_type_off64_t=yes,tcl_cv_type_off64_t=no)]) if test "x${tcl_cv_type_off64_t}" = "xyes" ; then AC_DEFINE(HAVE_TYPE_OFF64_T, 1, [Is off64_t in ?]) fi AC_MSG_RESULT([${tcl_cv_type_off64_t}]) fi ]) ## ## Here ends the standard Tcl configuration bits and starts the ## TEA specific functions ## #------------------------------------------------------------------------ # TEA_INIT -- # # Init various Tcl Extension Architecture (TEA) variables. # This should be the first called TEA_* macro. # # Arguments: # none # # Results: # # Defines and substs the following vars: # CYGPATH # EXEEXT # Defines only: # TEA_INITED # TEA_PLATFORM (windows or unix) # # "cygpath" is used on windows to generate native path names for include # files. These variables should only be used with the compiler and linker # since they generate native path names. # # EXEEXT # Select the executable extension based on the host type. This # is a lightweight replacement for AC_EXEEXT that doesn't require # a compiler. #------------------------------------------------------------------------ AC_DEFUN(TEA_INIT, [ # TEA extensions pass this us the version of TEA they think they # are compatible with. TEA_VERSION="3.4" AC_MSG_CHECKING([for correct TEA configuration]) if test x"${PACKAGE_NAME}" = x ; then AC_MSG_ERROR([ The PACKAGE_NAME variable must be defined by your TEA configure.in]) fi if test x"$1" = x ; then AC_MSG_ERROR([ TEA version not specified.]) elif test "$1" != "${TEA_VERSION}" ; then AC_MSG_RESULT([warning: requested TEA version "$1", have "${TEA_VERSION}"]) else AC_MSG_RESULT([ok (TEA ${TEA_VERSION})]) fi case "`uname -s`" in *win32*|*WIN32*|*CYGWIN_NT*|*CYGWIN_9*|*CYGWIN_ME*|*MINGW32_*) AC_CHECK_PROG(CYGPATH, cygpath, cygpath -w, echo) EXEEXT=".exe" TEA_PLATFORM="windows" ;; *) CYGPATH=echo EXEEXT="" TEA_PLATFORM="unix" ;; esac # Check if exec_prefix is set. If not use fall back to prefix. # Note when adjusted, so that TEA_PREFIX can correct for this. # This is needed for recursive configures, since autoconf propagates # $prefix, but not $exec_prefix (doh!). if test x$exec_prefix = xNONE ; then exec_prefix_default=yes exec_prefix=$prefix fi AC_SUBST(EXEEXT) AC_SUBST(CYGPATH) # This package name must be replaced statically for AC_SUBST to work AC_SUBST(PKG_LIB_FILE) # Substitute STUB_LIB_FILE in case package creates a stub library too. AC_SUBST(PKG_STUB_LIB_FILE) # We AC_SUBST these here to ensure they are subst'ed, # in case the user doesn't call TEA_ADD_... AC_SUBST(PKG_STUB_SOURCES) AC_SUBST(PKG_STUB_OBJECTS) AC_SUBST(PKG_TCL_SOURCES) AC_SUBST(PKG_HEADERS) AC_SUBST(PKG_INCLUDES) AC_SUBST(PKG_LIBS) AC_SUBST(PKG_CFLAGS) ]) #------------------------------------------------------------------------ # TEA_ADD_SOURCES -- # # Specify one or more source files. Users should check for # the right platform before adding to their list. # It is not important to specify the directory, as long as it is # in the generic, win or unix subdirectory of $(srcdir). # # Arguments: # one or more file names # # Results: # # Defines and substs the following vars: # PKG_SOURCES # PKG_OBJECTS #------------------------------------------------------------------------ AC_DEFUN(TEA_ADD_SOURCES, [ vars="$@" for i in $vars; do case $i in [\$]*) # allow $-var names PKG_SOURCES="$PKG_SOURCES $i" PKG_OBJECTS="$PKG_OBJECTS $i" ;; *) # check for existence - allows for generic/win/unix VPATH if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \ -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \ ; then AC_MSG_ERROR([could not find source file '$i']) fi PKG_SOURCES="$PKG_SOURCES $i" # this assumes it is in a VPATH dir i=`basename $i` # handle user calling this before or after TEA_SETUP_COMPILER if test x"${OBJEXT}" != x ; then j="`echo $i | sed -e 's/\.[[^.]]*$//'`.${OBJEXT}" else j="`echo $i | sed -e 's/\.[[^.]]*$//'`.\${OBJEXT}" fi PKG_OBJECTS="$PKG_OBJECTS $j" ;; esac done AC_SUBST(PKG_SOURCES) AC_SUBST(PKG_OBJECTS) ]) #------------------------------------------------------------------------ # TEA_ADD_STUB_SOURCES -- # # Specify one or more source files. Users should check for # the right platform before adding to their list. # It is not important to specify the directory, as long as it is # in the generic, win or unix subdirectory of $(srcdir). # # Arguments: # one or more file names # # Results: # # Defines and substs the following vars: # PKG_STUB_SOURCES # PKG_STUB_OBJECTS #------------------------------------------------------------------------ AC_DEFUN(TEA_ADD_STUB_SOURCES, [ vars="$@" for i in $vars; do # check for existence - allows for generic/win/unix VPATH if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \ -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \ ; then AC_MSG_ERROR([could not find stub source file '$i']) fi PKG_STUB_SOURCES="$PKG_STUB_SOURCES $i" # this assumes it is in a VPATH dir i=`basename $i` # handle user calling this before or after TEA_SETUP_COMPILER if test x"${OBJEXT}" != x ; then j="`echo $i | sed -e 's/\.[[^.]]*$//'`.${OBJEXT}" else j="`echo $i | sed -e 's/\.[[^.]]*$//'`.\${OBJEXT}" fi PKG_STUB_OBJECTS="$PKG_STUB_OBJECTS $j" done AC_SUBST(PKG_STUB_SOURCES) AC_SUBST(PKG_STUB_OBJECTS) ]) #------------------------------------------------------------------------ # TEA_ADD_TCL_SOURCES -- # # Specify one or more Tcl source files. These should be platform # independent runtime files. # # Arguments: # one or more file names # # Results: # # Defines and substs the following vars: # PKG_TCL_SOURCES #------------------------------------------------------------------------ AC_DEFUN(TEA_ADD_TCL_SOURCES, [ vars="$@" for i in $vars; do # check for existence, be strict because it is installed if test ! -f "${srcdir}/$i" ; then AC_MSG_ERROR([could not find tcl source file '${srcdir}/$i']) fi PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i" done AC_SUBST(PKG_TCL_SOURCES) ]) #------------------------------------------------------------------------ # TEA_ADD_HEADERS -- # # Specify one or more source headers. Users should check for # the right platform before adding to their list. # # Arguments: # one or more file names # # Results: # # Defines and substs the following vars: # PKG_HEADERS #------------------------------------------------------------------------ AC_DEFUN(TEA_ADD_HEADERS, [ vars="$@" for i in $vars; do # check for existence, be strict because it is installed if test ! -f "${srcdir}/$i" ; then AC_MSG_ERROR([could not find header file '${srcdir}/$i']) fi PKG_HEADERS="$PKG_HEADERS $i" done AC_SUBST(PKG_HEADERS) ]) #------------------------------------------------------------------------ # TEA_ADD_INCLUDES -- # # Specify one or more include dirs. Users should check for # the right platform before adding to their list. # # Arguments: # one or more file names # # Results: # # Defines and substs the following vars: # PKG_INCLUDES #------------------------------------------------------------------------ AC_DEFUN(TEA_ADD_INCLUDES, [ vars="$@" for i in $vars; do PKG_INCLUDES="$PKG_INCLUDES $i" done AC_SUBST(PKG_INCLUDES) ]) #------------------------------------------------------------------------ # TEA_ADD_LIBS -- # # Specify one or more libraries. Users should check for # the right platform before adding to their list. For Windows, # libraries provided in "foo.lib" format will be converted to # "-lfoo" when using GCC (mingw). # # Arguments: # one or more file names # # Results: # # Defines and substs the following vars: # PKG_LIBS #------------------------------------------------------------------------ AC_DEFUN(TEA_ADD_LIBS, [ vars="$@" for i in $vars; do if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then # Convert foo.lib to -lfoo for GCC. No-op if not *.lib i=`echo "$i" | sed -e 's/^\([[^-]].*\)\.lib[$]/-l\1/i'` fi PKG_LIBS="$PKG_LIBS $i" done AC_SUBST(PKG_LIBS) ]) #------------------------------------------------------------------------ # TEA_ADD_CFLAGS -- # # Specify one or more CFLAGS. Users should check for # the right platform before adding to their list. # # Arguments: # one or more file names # # Results: # # Defines and substs the following vars: # PKG_CFLAGS #------------------------------------------------------------------------ AC_DEFUN(TEA_ADD_CFLAGS, [ PKG_CFLAGS="$PKG_CFLAGS $@" AC_SUBST(PKG_CFLAGS) ]) #------------------------------------------------------------------------ # TEA_PREFIX -- # # Handle the --prefix=... option by defaulting to what Tcl gave # # Arguments: # none # # Results: # # If --prefix or --exec-prefix was not specified, $prefix and # $exec_prefix will be set to the values given to Tcl when it was # configured. #------------------------------------------------------------------------ AC_DEFUN(TEA_PREFIX, [ if test "${prefix}" = "NONE"; then prefix_default=yes if test x"${TCL_PREFIX}" != x; then AC_MSG_NOTICE([--prefix defaulting to TCL_PREFIX ${TCL_PREFIX}]) prefix=${TCL_PREFIX} else AC_MSG_NOTICE([--prefix defaulting to /usr/local]) prefix=/usr/local fi fi if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" \ -o x"${exec_prefix_default}" = x"yes" ; then if test x"${TCL_EXEC_PREFIX}" != x; then AC_MSG_NOTICE([--exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}]) exec_prefix=${TCL_EXEC_PREFIX} else AC_MSG_NOTICE([--exec-prefix defaulting to ${prefix}]) exec_prefix=$prefix fi fi ]) #------------------------------------------------------------------------ # TEA_SETUP_COMPILER_CC -- # # Do compiler checks the way we want. This is just a replacement # for AC_PROG_CC in TEA configure.in files to make them cleaner. # # Arguments: # none # # Results: # # Sets up CC var and other standard bits we need to make executables. #------------------------------------------------------------------------ AC_DEFUN(TEA_SETUP_COMPILER_CC, [ # Don't put any macros that use the compiler (e.g. AC_TRY_COMPILE) # in this macro, they need to go into TEA_SETUP_COMPILER instead. # If the user did not set CFLAGS, set it now to keep # the AC_PROG_CC macro from adding "-g -O2". if test "${CFLAGS+set}" != "set" ; then CFLAGS="" fi AC_PROG_CC AC_PROG_CPP AC_PROG_INSTALL #-------------------------------------------------------------------- # Checks to see if the make program sets the $MAKE variable. #-------------------------------------------------------------------- AC_PROG_MAKE_SET #-------------------------------------------------------------------- # Find ranlib #-------------------------------------------------------------------- AC_PROG_RANLIB #-------------------------------------------------------------------- # Determines the correct binary file extension (.o, .obj, .exe etc.) #-------------------------------------------------------------------- AC_OBJEXT AC_EXEEXT ]) #------------------------------------------------------------------------ # TEA_SETUP_COMPILER -- # # Do compiler checks that use the compiler. This must go after # TEA_SETUP_COMPILER_CC, which does the actual compiler check. # # Arguments: # none # # Results: # # Sets up CC var and other standard bits we need to make executables. #------------------------------------------------------------------------ AC_DEFUN(TEA_SETUP_COMPILER, [ # Any macros that use the compiler (e.g. AC_TRY_COMPILE) have to go here. AC_REQUIRE([TEA_SETUP_COMPILER_CC]) #------------------------------------------------------------------------ # If we're using GCC, see if the compiler understands -pipe. If so, use it. # It makes compiling go faster. (This is only a performance feature.) #------------------------------------------------------------------------ if test -z "$no_pipe" -a -n "$GCC"; then AC_MSG_CHECKING([if the compiler understands -pipe]) OLDCC="$CC" CC="$CC -pipe" AC_TRY_COMPILE(,, AC_MSG_RESULT([yes]), CC="$OLDCC" AC_MSG_RESULT([no])) fi #-------------------------------------------------------------------- # Common compiler flag setup #-------------------------------------------------------------------- AC_C_BIGENDIAN if test "${TEA_PLATFORM}" = "unix" ; then TEA_TCL_LINK_LIBS TEA_MISSING_POSIX_HEADERS # Let the user call this, because if it triggers, they will # need a compat/strtod.c that is correct. Users can also # use Tcl_GetDouble(FromObj) instead. #TEA_BUGGY_STRTOD fi ]) #------------------------------------------------------------------------ # TEA_MAKE_LIB -- # # Generate a line that can be used to build a shared/unshared library # in a platform independent manner. # # Arguments: # none # # Requires: # # Results: # # Defines the following vars: # CFLAGS - Done late here to note disturb other AC macros # MAKE_LIB - Command to execute to build the Tcl library; # differs depending on whether or not Tcl is being # compiled as a shared library. # MAKE_SHARED_LIB Makefile rule for building a shared library # MAKE_STATIC_LIB Makefile rule for building a static library # MAKE_STUB_LIB Makefile rule for building a stub library #------------------------------------------------------------------------ AC_DEFUN(TEA_MAKE_LIB, [ if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then MAKE_STATIC_LIB="\${STLIB_LD} -out:\[$]@ \$(PKG_OBJECTS)" MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LD_LIBS} \${LDFLAGS_DEFAULT} -out:\[$]@ \$(PKG_OBJECTS)" MAKE_STUB_LIB="\${STLIB_LD} -out:\[$]@ \$(PKG_STUB_OBJECTS)" else MAKE_STATIC_LIB="\${STLIB_LD} \[$]@ \$(PKG_OBJECTS)" MAKE_SHARED_LIB="\${SHLIB_LD} -o \[$]@ \$(PKG_OBJECTS) \${SHLIB_LD_LIBS}" MAKE_STUB_LIB="\${STLIB_LD} \[$]@ \$(PKG_STUB_OBJECTS)" fi if test "${SHARED_BUILD}" = "1" ; then MAKE_LIB="${MAKE_SHARED_LIB} " else MAKE_LIB="${MAKE_STATIC_LIB} " fi #-------------------------------------------------------------------- # Shared libraries and static libraries have different names. # Use the double eval to make sure any variables in the suffix is # substituted. (@@@ Might not be necessary anymore) #-------------------------------------------------------------------- if test "${TEA_PLATFORM}" = "windows" ; then if test "${SHARED_BUILD}" = "1" ; then # We force the unresolved linking of symbols that are really in # the private libraries of Tcl and Tk. SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\"" if test x"${TK_BIN_DIR}" != x ; then SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\"" fi eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}" else eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}" fi # Some packages build there own stubs libraries eval eval "PKG_STUB_LIB_FILE=${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}" # These aren't needed on Windows (either MSVC or gcc) RANLIB=: RANLIB_STUB=: else RANLIB_STUB="${RANLIB}" if test "${SHARED_BUILD}" = "1" ; then SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}" if test x"${TK_BIN_DIR}" != x ; then SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}" fi eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${SHARED_LIB_SUFFIX}" RANLIB=: else eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}" fi # Some packages build there own stubs libraries eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}" fi # These are escaped so that only CFLAGS is picked up at configure time. # The other values will be substituted at make time. CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}" if test "${SHARED_BUILD}" = "1" ; then CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}" fi AC_SUBST(MAKE_LIB) AC_SUBST(MAKE_SHARED_LIB) AC_SUBST(MAKE_STATIC_LIB) AC_SUBST(MAKE_STUB_LIB) AC_SUBST(RANLIB_STUB) ]) #------------------------------------------------------------------------ # TEA_LIB_SPEC -- # # Compute the name of an existing object library located in libdir # from the given base name and produce the appropriate linker flags. # # Arguments: # basename The base name of the library without version # numbers, extensions, or "lib" prefixes. # extra_dir Extra directory in which to search for the # library. This location is used first, then # $prefix/$exec-prefix, then some defaults. # # Requires: # TEA_INIT and TEA_PREFIX must be called first. # # Results: # # Defines the following vars: # ${basename}_LIB_NAME The computed library name. # ${basename}_LIB_SPEC The computed linker flags. #------------------------------------------------------------------------ AC_DEFUN(TEA_LIB_SPEC, [ AC_MSG_CHECKING([for $1 library]) # Look in exec-prefix for the library (defined by TEA_PREFIX). tea_lib_name_dir="${exec_prefix}/lib" # Or in a user-specified location. if test x"$2" != x ; then tea_extra_lib_dir=$2 else tea_extra_lib_dir=NONE fi for i in \ `ls -dr ${tea_extra_lib_dir}/$1[[0-9]]*.lib 2>/dev/null ` \ `ls -dr ${tea_extra_lib_dir}/lib$1[[0-9]]* 2>/dev/null ` \ `ls -dr ${tea_lib_name_dir}/$1[[0-9]]*.lib 2>/dev/null ` \ `ls -dr ${tea_lib_name_dir}/lib$1[[0-9]]* 2>/dev/null ` \ `ls -dr /usr/lib/$1[[0-9]]*.lib 2>/dev/null ` \ `ls -dr /usr/lib/lib$1[[0-9]]* 2>/dev/null ` \ `ls -dr /usr/local/lib/$1[[0-9]]*.lib 2>/dev/null ` \ `ls -dr /usr/local/lib/lib$1[[0-9]]* 2>/dev/null ` ; do if test -f "$i" ; then tea_lib_name_dir=`dirname $i` $1_LIB_NAME=`basename $i` $1_LIB_PATH_NAME=$i break fi done if test "${TEA_PLATFORM}" = "windows"; then $1_LIB_SPEC=\"`${CYGPATH} ${$1_LIB_PATH_NAME} 2>/dev/null`\" else # Strip off the leading "lib" and trailing ".a" or ".so" tea_lib_name_lib=`echo ${$1_LIB_NAME}|sed -e 's/^lib//' -e 's/\.[[^.]]*$//' -e 's/\.so.*//'` $1_LIB_SPEC="-L${tea_lib_name_dir} -l${tea_lib_name_lib}" fi if test "x${$1_LIB_NAME}" = x ; then AC_MSG_ERROR([not found]) else AC_MSG_RESULT([${$1_LIB_SPEC}]) fi ]) #------------------------------------------------------------------------ # TEA_PRIVATE_TCL_HEADERS -- # # Locate the private Tcl include files # # Arguments: # # Requires: # TCL_SRC_DIR Assumes that TEA_LOAD_TCLCONFIG has # already been called. # # Results: # # Substs the following vars: # TCL_TOP_DIR_NATIVE # TCL_GENERIC_DIR_NATIVE # TCL_UNIX_DIR_NATIVE # TCL_WIN_DIR_NATIVE # TCL_BMAP_DIR_NATIVE # TCL_TOOL_DIR_NATIVE # TCL_PLATFORM_DIR_NATIVE # TCL_BIN_DIR_NATIVE # TCL_INCLUDES #------------------------------------------------------------------------ AC_DEFUN(TEA_PRIVATE_TCL_HEADERS, [ AC_MSG_CHECKING([for Tcl private include files]) TCL_SRC_DIR_NATIVE=`${CYGPATH} ${TCL_SRC_DIR}` TCL_TOP_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}\" TCL_GENERIC_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/generic\" TCL_UNIX_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/unix\" TCL_WIN_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/win\" TCL_BMAP_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/bitmaps\" TCL_TOOL_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/tools\" TCL_COMPAT_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/compat\" if test "${TEA_PLATFORM}" = "windows"; then TCL_PLATFORM_DIR_NATIVE=${TCL_WIN_DIR_NATIVE} else TCL_PLATFORM_DIR_NATIVE=${TCL_UNIX_DIR_NATIVE} fi # We want to ensure these are substituted so as not to require # any *_NATIVE vars be defined in the Makefile TCL_INCLUDES="-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}" if test "`uname -s`" = "Darwin"; then # If Tcl was built as a framework, attempt to use # the framework's Headers and PrivateHeaders directories case ${TCL_DEFS} in *TCL_FRAMEWORK*) if test -d "${TCL_BIN_DIR}/Headers" -a -d "${TCL_BIN_DIR}/PrivateHeaders"; then TCL_INCLUDES="-I\"${TCL_BIN_DIR}/Headers\" -I\"${TCL_BIN_DIR}/PrivateHeaders\" ${TCL_INCLUDES}"; else TCL_INCLUDES="${TCL_INCLUDES} ${TCL_INCLUDE_SPEC} `echo "${TCL_INCLUDE_SPEC}" | sed -e 's/Headers/PrivateHeaders/'`"; fi ;; esac fi AC_SUBST(TCL_TOP_DIR_NATIVE) AC_SUBST(TCL_GENERIC_DIR_NATIVE) AC_SUBST(TCL_UNIX_DIR_NATIVE) AC_SUBST(TCL_WIN_DIR_NATIVE) AC_SUBST(TCL_BMAP_DIR_NATIVE) AC_SUBST(TCL_TOOL_DIR_NATIVE) AC_SUBST(TCL_PLATFORM_DIR_NATIVE) AC_SUBST(TCL_INCLUDES) AC_MSG_RESULT([Using srcdir found in tclConfig.sh: ${TCL_SRC_DIR}]) ]) #------------------------------------------------------------------------ # TEA_PUBLIC_TCL_HEADERS -- # # Locate the installed public Tcl header files # # Arguments: # None. # # Requires: # CYGPATH must be set # # Results: # # Adds a --with-tclinclude switch to configure. # Result is cached. # # Substs the following vars: # TCL_INCLUDES #------------------------------------------------------------------------ AC_DEFUN(TEA_PUBLIC_TCL_HEADERS, [ AC_MSG_CHECKING([for Tcl public headers]) AC_ARG_WITH(tclinclude, [ --with-tclinclude directory containing the public Tcl header files], with_tclinclude=${withval}) AC_CACHE_VAL(ac_cv_c_tclh, [ # Use the value from --with-tclinclude, if it was given if test x"${with_tclinclude}" != x ; then if test -f "${with_tclinclude}/tcl.h" ; then ac_cv_c_tclh=${with_tclinclude} else AC_MSG_ERROR([${with_tclinclude} directory does not contain tcl.h]) fi else # If Tcl was built as a framework, attempt to use # the framework's Headers directory case ${TCL_DEFS} in *TCL_FRAMEWORK*) list="`ls -d ${TCL_BIN_DIR}/Headers 2>/dev/null`" ;; *) list="" ;; esac # Look in the source dir only if Tcl is not installed, # and in that situation, look there before installed locations. if test -f "$TCL_BIN_DIR/Makefile" ; then list="$list `ls -d ${TCL_SRC_DIR}/generic 2>/dev/null`" fi # Check order: pkg --prefix location, Tcl's --prefix location, # relative to directory of tclConfig.sh. eval "temp_includedir=${includedir}" list="$list \ `ls -d ${temp_includedir} 2>/dev/null` \ `ls -d ${TCL_PREFIX}/include 2>/dev/null` \ `ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`" if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then list="$list /usr/local/include /usr/include" if test x"${TCL_INCLUDE_SPEC}" != x ; then d=`echo "${TCL_INCLUDE_SPEC}" | sed -e 's/^-I//'` list="$list `ls -d ${d} 2>/dev/null`" fi fi for i in $list ; do if test -f "$i/tcl.h" ; then ac_cv_c_tclh=$i break fi done fi ]) # Print a message based on how we determined the include path if test x"${ac_cv_c_tclh}" = x ; then AC_MSG_ERROR([tcl.h not found. Please specify its location with --with-tclinclude]) else AC_MSG_RESULT([${ac_cv_c_tclh}]) fi # Convert to a native path and substitute into the output files. INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}` TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\" AC_SUBST(TCL_INCLUDES) ]) #------------------------------------------------------------------------ # TEA_PRIVATE_TK_HEADERS -- # # Locate the private Tk include files # # Arguments: # # Requires: # TK_SRC_DIR Assumes that TEA_LOAD_TKCONFIG has # already been called. # # Results: # # Substs the following vars: # TK_INCLUDES #------------------------------------------------------------------------ AC_DEFUN(TEA_PRIVATE_TK_HEADERS, [ AC_MSG_CHECKING([for Tk private include files]) TK_SRC_DIR_NATIVE=`${CYGPATH} ${TK_SRC_DIR}` TK_TOP_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}\" TK_UNIX_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/unix\" TK_WIN_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/win\" TK_GENERIC_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/generic\" TK_XLIB_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/xlib\" if test "${TEA_PLATFORM}" = "windows"; then TK_PLATFORM_DIR_NATIVE=${TK_WIN_DIR_NATIVE} else TK_PLATFORM_DIR_NATIVE=${TK_UNIX_DIR_NATIVE} fi # We want to ensure these are substituted so as not to require # any *_NATIVE vars be defined in the Makefile TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE}" if test "${TEA_WINDOWINGSYSTEM}" = "win32" \ -o "${TEA_WINDOWINGSYSTEM}" = "aqua"; then TK_INCLUDES="${TK_INCLUDES} -I${TK_XLIB_DIR_NATIVE}" fi if test "${TEA_WINDOWINGSYSTEM}" = "aqua"; then TK_INCLUDES="${TK_INCLUDES} -I${TK_SRC_DIR_NATIVE}/macosx" fi if test "`uname -s`" = "Darwin"; then # If Tk was built as a framework, attempt to use # the framework's Headers and PrivateHeaders directories case ${TK_DEFS} in *TK_FRAMEWORK*) if test -d "${TK_BIN_DIR}/Headers" -a -d "${TK_BIN_DIR}/PrivateHeaders"; then TK_INCLUDES="-I\"${TK_BIN_DIR}/Headers\" -I\"${TK_BIN_DIR}/PrivateHeaders\" ${TK_INCLUDES}"; fi ;; esac fi AC_SUBST(TK_TOP_DIR_NATIVE) AC_SUBST(TK_UNIX_DIR_NATIVE) AC_SUBST(TK_WIN_DIR_NATIVE) AC_SUBST(TK_GENERIC_DIR_NATIVE) AC_SUBST(TK_XLIB_DIR_NATIVE) AC_SUBST(TK_PLATFORM_DIR_NATIVE) AC_SUBST(TK_INCLUDES) AC_MSG_RESULT([Using srcdir found in tkConfig.sh: ${TK_SRC_DIR}]) ]) #------------------------------------------------------------------------ # TEA_PUBLIC_TK_HEADERS -- # # Locate the installed public Tk header files # # Arguments: # None. # # Requires: # CYGPATH must be set # # Results: # # Adds a --with-tkinclude switch to configure. # Result is cached. # # Substs the following vars: # TK_INCLUDES #------------------------------------------------------------------------ AC_DEFUN(TEA_PUBLIC_TK_HEADERS, [ AC_MSG_CHECKING([for Tk public headers]) AC_ARG_WITH(tkinclude, [ --with-tkinclude directory containing the public Tk header files.], with_tkinclude=${withval}) AC_CACHE_VAL(ac_cv_c_tkh, [ # Use the value from --with-tkinclude, if it was given if test x"${with_tkinclude}" != x ; then if test -f "${with_tkinclude}/tk.h" ; then ac_cv_c_tkh=${with_tkinclude} else AC_MSG_ERROR([${with_tkinclude} directory does not contain tk.h]) fi else # If Tk was built as a framework, attempt to use # the framework's Headers directory. case ${TK_DEFS} in *TK_FRAMEWORK*) list="`ls -d ${TK_BIN_DIR}/Headers 2>/dev/null`" ;; *) list="" ;; esac # Look in the source dir only if Tk is not installed, # and in that situation, look there before installed locations. if test -f "$TK_BIN_DIR/Makefile" ; then list="$list `ls -d ${TK_SRC_DIR}/generic 2>/dev/null`" fi # Check order: pkg --prefix location, Tk's --prefix location, # relative to directory of tkConfig.sh, Tcl's --prefix location, # relative to directory of tclConfig.sh. eval "temp_includedir=${includedir}" list="$list \ `ls -d ${temp_includedir} 2>/dev/null` \ `ls -d ${TK_PREFIX}/include 2>/dev/null` \ `ls -d ${TK_BIN_DIR}/../include 2>/dev/null` \ `ls -d ${TCL_PREFIX}/include 2>/dev/null` \ `ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`" if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then list="$list /usr/local/include /usr/include" fi for i in $list ; do if test -f "$i/tk.h" ; then ac_cv_c_tkh=$i break fi done fi ]) # Print a message based on how we determined the include path if test x"${ac_cv_c_tkh}" = x ; then AC_MSG_ERROR([tk.h not found. Please specify its location with --with-tkinclude]) else AC_MSG_RESULT([${ac_cv_c_tkh}]) fi # Convert to a native path and substitute into the output files. INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tkh}` TK_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\" AC_SUBST(TK_INCLUDES) if test "${TEA_WINDOWINGSYSTEM}" = "win32" \ -o "${TEA_WINDOWINGSYSTEM}" = "aqua"; then # On Windows and Aqua, we need the X compat headers AC_MSG_CHECKING([for X11 header files]) if test ! -r "${INCLUDE_DIR_NATIVE}/X11/Xlib.h"; then INCLUDE_DIR_NATIVE="`${CYGPATH} ${TK_SRC_DIR}/xlib`" TK_XINCLUDES=-I\"${INCLUDE_DIR_NATIVE}\" AC_SUBST(TK_XINCLUDES) fi AC_MSG_RESULT([${INCLUDE_DIR_NATIVE}]) fi ]) #------------------------------------------------------------------------ # TEA_PROG_TCLSH # Determine the fully qualified path name of the tclsh executable # in the Tcl build directory or the tclsh installed in a bin # directory. This macro will correctly determine the name # of the tclsh executable even if tclsh has not yet been # built in the build directory. The tclsh found is always # associated with a tclConfig.sh file. This tclsh should be used # only for running extension test cases. It should never be # or generation of files (like pkgIndex.tcl) at build time. # # Arguments # none # # Results # Subst's the following values: # TCLSH_PROG #------------------------------------------------------------------------ AC_DEFUN(TEA_PROG_TCLSH, [ AC_MSG_CHECKING([for tclsh]) if test -f "${TCL_BIN_DIR}/Makefile" ; then # tclConfig.sh is in Tcl build directory if test "${TEA_PLATFORM}" = "windows"; then TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}" else TCLSH_PROG="${TCL_BIN_DIR}/tclsh" fi else # tclConfig.sh is in install location if test "${TEA_PLATFORM}" = "windows"; then TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}" else TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}${TCL_DBGX}" fi list="`ls -d ${TCL_PREFIX}/bin 2>/dev/null` \ `ls -d ${TCL_BIN_DIR}/../bin 2>/dev/null`" for i in $list ; do if test -f "$i/${TCLSH_PROG}" ; then REAL_TCL_BIN_DIR="`cd "$i"; pwd`" break fi done TCLSH_PROG="${REAL_TCL_BIN_DIR}/${TCLSH_PROG}" fi AC_MSG_RESULT(${TCLSH_PROG}) AC_SUBST(TCLSH_PROG) ]) #------------------------------------------------------------------------ # TEA_PROG_WISH # Determine the fully qualified path name of the wish executable # in the Tk build directory or the wish installed in a bin # directory. This macro will correctly determine the name # of the wish executable even if wish has not yet been # built in the build directory. The wish found is always # associated with a tkConfig.sh file. This wish should be used # only for running extension test cases. It should never be # or generation of files (like pkgIndex.tcl) at build time. # # Arguments # none # # Results # Subst's the following values: # WISH_PROG #------------------------------------------------------------------------ AC_DEFUN(TEA_PROG_WISH, [ AC_MSG_CHECKING([for wish]) if test -f "${TK_BIN_DIR}/Makefile" ; then # tkConfig.sh is in Tk build directory if test "${TEA_PLATFORM}" = "windows"; then WISH_PROG="${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}${EXEEXT}" else WISH_PROG="${TK_BIN_DIR}/wish" fi else # tkConfig.sh is in install location if test "${TEA_PLATFORM}" = "windows"; then WISH_PROG="wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}${EXEEXT}" else WISH_PROG="wish${TK_MAJOR_VERSION}.${TK_MINOR_VERSION}${TK_DBGX}" fi list="`ls -d ${TK_PREFIX}/bin 2>/dev/null` \ `ls -d ${TK_BIN_DIR}/../bin 2>/dev/null`" for i in $list ; do if test -f "$i/${WISH_PROG}" ; then REAL_TK_BIN_DIR="`cd "$i"; pwd`" break fi done WISH_PROG="${REAL_TK_BIN_DIR}/${WISH_PROG}" fi AC_MSG_RESULT(${WISH_PROG}) AC_SUBST(WISH_PROG) ]) #------------------------------------------------------------------------ # TEA_PATH_CONFIG -- # # Locate the ${1}Config.sh file and perform a sanity check on # the ${1} compile flags. These are used by packages like # [incr Tk] that load *Config.sh files from more than Tcl and Tk. # # Arguments: # none # # Results: # # Adds the following arguments to configure: # --with-$1=... # # Defines the following vars: # $1_BIN_DIR Full path to the directory containing # the $1Config.sh file #------------------------------------------------------------------------ AC_DEFUN(TEA_PATH_CONFIG, [ # # Ok, lets find the $1 configuration # First, look for one uninstalled. # the alternative search directory is invoked by --with-$1 # if test x"${no_$1}" = x ; then # we reset no_$1 in case something fails here no_$1=true AC_ARG_WITH($1, [ --with-$1 directory containing $1 configuration ($1Config.sh)], with_$1config=${withval}) AC_MSG_CHECKING([for $1 configuration]) AC_CACHE_VAL(ac_cv_c_$1config,[ # First check to see if --with-$1 was specified. if test x"${with_$1config}" != x ; then case ${with_$1config} in */$1Config.sh ) if test -f ${with_$1config}; then AC_MSG_WARN([--with-$1 argument should refer to directory containing $1Config.sh, not to $1Config.sh itself]) with_$1config=`echo ${with_$1config} | sed 's!/$1Config\.sh$!!'` fi;; esac if test -f "${with_$1config}/$1Config.sh" ; then ac_cv_c_$1config=`(cd ${with_$1config}; pwd)` else AC_MSG_ERROR([${with_$1config} directory doesn't contain $1Config.sh]) fi fi # then check for a private $1 installation if test x"${ac_cv_c_$1config}" = x ; then for i in \ ../$1 \ `ls -dr ../$1*[[0-9]].[[0-9]]*.[[0-9]]* 2>/dev/null` \ `ls -dr ../$1*[[0-9]].[[0-9]][[0-9]] 2>/dev/null` \ `ls -dr ../$1*[[0-9]].[[0-9]] 2>/dev/null` \ `ls -dr ../$1*[[0-9]].[[0-9]]* 2>/dev/null` \ ../../$1 \ `ls -dr ../../$1*[[0-9]].[[0-9]]*.[[0-9]]* 2>/dev/null` \ `ls -dr ../../$1*[[0-9]].[[0-9]][[0-9]] 2>/dev/null` \ `ls -dr ../../$1*[[0-9]].[[0-9]] 2>/dev/null` \ `ls -dr ../../$1*[[0-9]].[[0-9]]* 2>/dev/null` \ ../../../$1 \ `ls -dr ../../../$1*[[0-9]].[[0-9]]*.[[0-9]]* 2>/dev/null` \ `ls -dr ../../../$1*[[0-9]].[[0-9]][[0-9]] 2>/dev/null` \ `ls -dr ../../../$1*[[0-9]].[[0-9]] 2>/dev/null` \ `ls -dr ../../../$1*[[0-9]].[[0-9]]* 2>/dev/null` \ ${srcdir}/../$1 \ `ls -dr ${srcdir}/../$1*[[0-9]].[[0-9]]*.[[0-9]]* 2>/dev/null` \ `ls -dr ${srcdir}/../$1*[[0-9]].[[0-9]][[0-9]] 2>/dev/null` \ `ls -dr ${srcdir}/../$1*[[0-9]].[[0-9]] 2>/dev/null` \ `ls -dr ${srcdir}/../$1*[[0-9]].[[0-9]]* 2>/dev/null` \ ; do if test -f "$i/$1Config.sh" ; then ac_cv_c_$1config=`(cd $i; pwd)` break fi if test -f "$i/unix/$1Config.sh" ; then ac_cv_c_$1config=`(cd $i/unix; pwd)` break fi done fi # check in a few common install locations if test x"${ac_cv_c_$1config}" = x ; then for i in `ls -d ${libdir} 2>/dev/null` \ `ls -d ${exec_prefix}/lib 2>/dev/null` \ `ls -d ${prefix}/lib 2>/dev/null` \ `ls -d /usr/local/lib 2>/dev/null` \ `ls -d /usr/contrib/lib 2>/dev/null` \ `ls -d /usr/lib 2>/dev/null` \ ; do if test -f "$i/$1Config.sh" ; then ac_cv_c_$1config=`(cd $i; pwd)` break fi done fi ]) if test x"${ac_cv_c_$1config}" = x ; then $1_BIN_DIR="# no $1 configs found" AC_MSG_WARN("Cannot find $1 configuration definitions") exit 0 else no_$1= $1_BIN_DIR=${ac_cv_c_$1config} AC_MSG_RESULT([found $$1_BIN_DIR/$1Config.sh]) fi fi ]) #------------------------------------------------------------------------ # TEA_LOAD_CONFIG -- # # Load the $1Config.sh file # # Arguments: # # Requires the following vars to be set: # $1_BIN_DIR # # Results: # # Subst the following vars: # $1_SRC_DIR # $1_LIB_FILE # $1_LIB_SPEC # #------------------------------------------------------------------------ AC_DEFUN(TEA_LOAD_CONFIG, [ AC_MSG_CHECKING([for existence of ${$1_BIN_DIR}/$1Config.sh]) if test -f "${$1_BIN_DIR}/$1Config.sh" ; then AC_MSG_RESULT([loading]) . ${$1_BIN_DIR}/$1Config.sh else AC_MSG_RESULT([file not found]) fi # # If the $1_BIN_DIR is the build directory (not the install directory), # then set the common variable name to the value of the build variables. # For example, the variable $1_LIB_SPEC will be set to the value # of $1_BUILD_LIB_SPEC. An extension should make use of $1_LIB_SPEC # instead of $1_BUILD_LIB_SPEC since it will work with both an # installed and uninstalled version of Tcl. # if test -f ${$1_BIN_DIR}/Makefile ; then AC_MSG_WARN([Found Makefile - using build library specs for $1]) $1_LIB_SPEC=${$1_BUILD_LIB_SPEC} $1_STUB_LIB_SPEC=${$1_BUILD_STUB_LIB_SPEC} $1_STUB_LIB_PATH=${$1_BUILD_STUB_LIB_PATH} fi AC_SUBST($1_VERSION) AC_SUBST($1_BIN_DIR) AC_SUBST($1_SRC_DIR) AC_SUBST($1_LIB_FILE) AC_SUBST($1_LIB_SPEC) AC_SUBST($1_STUB_LIB_FILE) AC_SUBST($1_STUB_LIB_SPEC) AC_SUBST($1_STUB_LIB_PATH) ]) #------------------------------------------------------------------------ # TEA_PATH_CELIB -- # # Locate Keuchel's celib emulation layer for targeting Win/CE # # Arguments: # none # # Results: # # Adds the following arguments to configure: # --with-celib=... # # Defines the following vars: # CELIB_DIR Full path to the directory containing # the include and platform lib files #------------------------------------------------------------------------ AC_DEFUN(TEA_PATH_CELIB, [ # First, look for one uninstalled. # the alternative search directory is invoked by --with-celib if test x"${no_celib}" = x ; then # we reset no_celib in case something fails here no_celib=true AC_ARG_WITH(celib,[ --with-celib=DIR use Windows/CE support library from DIR], with_celibconfig=${withval}) AC_MSG_CHECKING([for Windows/CE celib directory]) AC_CACHE_VAL(ac_cv_c_celibconfig,[ # First check to see if --with-celibconfig was specified. if test x"${with_celibconfig}" != x ; then if test -d "${with_celibconfig}/inc" ; then ac_cv_c_celibconfig=`(cd ${with_celibconfig}; pwd)` else AC_MSG_ERROR([${with_celibconfig} directory doesn't contain inc directory]) fi fi # then check for a celib library if test x"${ac_cv_c_celibconfig}" = x ; then for i in \ ../celib-palm-3.0 \ ../celib \ ../../celib-palm-3.0 \ ../../celib \ `ls -dr ../celib-*3.[[0-9]]* 2>/dev/null` \ ${srcdir}/../celib-palm-3.0 \ ${srcdir}/../celib \ `ls -dr ${srcdir}/../celib-*3.[[0-9]]* 2>/dev/null` \ ; do if test -d "$i/inc" ; then ac_cv_c_celibconfig=`(cd $i; pwd)` break fi done fi ]) if test x"${ac_cv_c_celibconfig}" = x ; then AC_MSG_ERROR([Cannot find celib support library directory]) else no_celib= CELIB_DIR=${ac_cv_c_celibconfig} CELIB_DIR=`echo "$CELIB_DIR" | sed -e 's!\\\!/!g'` AC_MSG_RESULT([found $CELIB_DIR]) fi fi ]) netgen-6.2.1804/ng/Togl-1.7/tclconfig/install-sh0000644000175000017500000000421213272137567017571 0ustar kurtkurt#!/bin/sh # # install - install a program, script, or datafile # This comes from X11R5; it is not part of GNU. # # $XConsortium: install.sh,v 1.2 89/12/18 14:47:22 jim Exp $ # # This script is compatible with the BSD install script, but was written # from scratch. # # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" instcmd="$mvprog" chmodcmd="" chowncmd="" chgrpcmd="" stripcmd="" rmcmd="$rmprog -f" mvcmd="$mvprog" src="" dst="" while [ x"$1" != x ]; do case $1 in -c) instcmd="$cpprog" shift continue;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; -s) stripcmd="$stripprog" shift continue;; *) if [ x"$src" = x ] then src=$1 else dst=$1 fi shift continue;; esac done if [ x"$src" = x ] then echo "install: no input file specified" exit 1 fi if [ x"$dst" = x ] then echo "install: no destination specified" exit 1 fi # If destination is a directory, append the input filename; if your system # does not like double slashes in filenames, you may need to add some logic if [ -d $dst ] then dst="$dst"/`basename $src` fi # Make a temp file name in the proper directory. dstdir=`dirname $dst` dsttmp=$dstdir/#inst.$$# # Move or copy the file name to the temp name $doit $instcmd $src $dsttmp # and set any options; do chmod last to preserve setuid bits if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; fi if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; fi if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; fi if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; fi # Now rename the file to the real destination. $doit $rmcmd $dst $doit $mvcmd $dsttmp $dst exit 0 netgen-6.2.1804/ng/Togl-1.7/togl_ws.h.in0000644000175000017500000000020213272137567016047 0ustar kurtkurt#ifndef TOGL_WS_H # define TOGL_WS_H /* define windowing system togl is compiled with */ # define @TOGL_WINDOWINGSYSTEM@ #endif netgen-6.2.1804/ng/Togl-1.7/image.c0000644000175000017500000001414713272137567015056 0ustar kurtkurt/* * SGI rgb file reader borrowed from gltk library */ #include "togl.h" /* added by GG to include windows.h */ #include #include #include #include "image.h" #ifndef SEEK_SET # define SEEK_SET 0 #endif static void tkQuit(void) { exit(0); } /******************************************************************************/ typedef struct _rawImageRec { unsigned short imagic; unsigned short type; unsigned short dim; unsigned short sizeX, sizeY, sizeZ; unsigned long min, max; unsigned long wasteBytes; char name[80]; unsigned long colorMap; FILE *file; unsigned char *tmp, *tmpR, *tmpG, *tmpB, *tmpA; unsigned long rleEnd; GLuint *rowStart; GLint *rowSize; } rawImageRec; /******************************************************************************/ static void ConvertShort(unsigned short *array, long length) { unsigned long b1, b2; unsigned char *ptr; ptr = (unsigned char *) array; while (length--) { b1 = *ptr++; b2 = *ptr++; *array++ = (b1 << 8) | (b2); } } static void ConvertLong(GLuint *array, long length) { unsigned long b1, b2, b3, b4; unsigned char *ptr; ptr = (unsigned char *) array; while (length--) { b1 = *ptr++; b2 = *ptr++; b3 = *ptr++; b4 = *ptr++; *array++ = (b1 << 24) | (b2 << 16) | (b3 << 8) | (b4); } } static rawImageRec * RawImageOpen(char *fileName) { union { int testWord; char testByte[4]; } endianTest; rawImageRec *raw; GLenum swapFlag; int x; endianTest.testWord = 1; if (endianTest.testByte[0] == 1) { swapFlag = GL_TRUE; } else { swapFlag = GL_FALSE; } raw = (rawImageRec *) malloc(sizeof (rawImageRec)); if (raw == NULL) { fprintf(stderr, "Out of memory!\n"); tkQuit(); } if ((raw->file = fopen(fileName, "rb")) == NULL) { perror(fileName); tkQuit(); } fread(raw, 1, 12, raw->file); if (swapFlag) { ConvertShort(&raw->imagic, 6); } raw->tmp = (unsigned char *) malloc(raw->sizeX * 256); raw->tmpR = (unsigned char *) malloc(raw->sizeX * 256); raw->tmpG = (unsigned char *) malloc(raw->sizeX * 256); raw->tmpB = (unsigned char *) malloc(raw->sizeX * 256); raw->tmpA = (unsigned char *) malloc(raw->sizeX * 256); if (raw->tmp == NULL || raw->tmpR == NULL || raw->tmpG == NULL || raw->tmpB == NULL || raw->tmpA == NULL) { fprintf(stderr, "Out of memory!\n"); tkQuit(); } if ((raw->type & 0xFF00) == 0x0100) { x = raw->sizeY * raw->sizeZ * sizeof (GLuint); raw->rowStart = (GLuint *) malloc(x); raw->rowSize = (GLint *) malloc(x); if (raw->rowStart == NULL || raw->rowSize == NULL) { fprintf(stderr, "Out of memory!\n"); tkQuit(); } raw->rleEnd = 512 + (2 * x); fseek(raw->file, 512, SEEK_SET); fread(raw->rowStart, 1, x, raw->file); fread(raw->rowSize, 1, x, raw->file); if (swapFlag) { ConvertLong(raw->rowStart, x / sizeof (GLuint)); ConvertLong((GLuint *) raw->rowSize, x / sizeof (GLint)); } } return raw; } static void RawImageClose(rawImageRec * raw) { fclose(raw->file); free(raw->tmp); free(raw->tmpR); free(raw->tmpG); free(raw->tmpB); free(raw->tmpA); free(raw); } static void RawImageGetRow(rawImageRec * raw, unsigned char *buf, int y, int z) { unsigned char *iPtr, *oPtr, pixel; int count; if ((raw->type & 0xFF00) == 0x0100) { fseek(raw->file, raw->rowStart[y + z * raw->sizeY], SEEK_SET); fread(raw->tmp, 1, (unsigned int) raw->rowSize[y + z * raw->sizeY], raw->file); iPtr = raw->tmp; oPtr = buf; while (1) { pixel = *iPtr++; count = (int) (pixel & 0x7F); if (!count) { return; } if (pixel & 0x80) { while (count--) { *oPtr++ = *iPtr++; } } else { pixel = *iPtr++; while (count--) { *oPtr++ = pixel; } } } } else { fseek(raw->file, 512 + (y * raw->sizeX) + (z * raw->sizeX * raw->sizeY), SEEK_SET); fread(buf, 1, raw->sizeX, raw->file); } } static void RawImageGetData(rawImageRec * raw, TK_RGBImageRec * final) { unsigned char *ptr; int i, j; final->data = (unsigned char *) malloc((raw->sizeX + 1) * (raw->sizeY + 1) * 4); if (final->data == NULL) { fprintf(stderr, "Out of memory!\n"); tkQuit(); } ptr = final->data; for (i = 0; i < (int) (raw->sizeY); i++) { RawImageGetRow(raw, raw->tmpR, i, 0); RawImageGetRow(raw, raw->tmpG, i, 1); RawImageGetRow(raw, raw->tmpB, i, 2); if (raw->sizeZ == 4) { /* 4 components */ RawImageGetRow(raw, raw->tmpA, i, 3); for (j = 0; j < (int) (raw->sizeX); j++) { *ptr++ = *(raw->tmpR + j); *ptr++ = *(raw->tmpG + j); *ptr++ = *(raw->tmpB + j); *ptr++ = *(raw->tmpA + j); } } else { /* 3 components */ for (j = 0; j < (int) (raw->sizeX); j++) { *ptr++ = *(raw->tmpR + j); *ptr++ = *(raw->tmpG + j); *ptr++ = *(raw->tmpB + j); } } } } TK_RGBImageRec * tkRGBImageLoad(char *fileName) { rawImageRec *raw; TK_RGBImageRec *final; raw = RawImageOpen(fileName); final = (TK_RGBImageRec *) malloc(sizeof (TK_RGBImageRec)); if (final == NULL) { fprintf(stderr, "Out of memory!\n"); tkQuit(); } final->sizeX = raw->sizeX; final->sizeY = raw->sizeY; final->sizeZ = raw->sizeZ; RawImageGetData(raw, final); RawImageClose(raw); return final; } /******************************************************************************/ netgen-6.2.1804/ng/Togl-1.7/Togl.html0000644000175000017500000010201113272137567015407 0ustar kurtkurt Togl

Togl — a Tk OpenGL widget

Copyright (C) 1996-2002 Brian Paul and Ben Bederson


Contents


Introduction

Togl is a Tk widget for OpenGL rendering. Togl was originally based on OGLTK, written by Benjamin Bederson at the University of New Mexico. Togl adds the new features:
  • color-index mode support including color allocation functions
  • support for requesting stencil, accumulation, alpha buffers, etc
  • multiple OpenGL drawing widgets
  • OpenGL extension testing from Tcl
  • simple, portable font support
  • overlay plane support

Togl allows one to create and manage a special Tk/OpenGL widget with Tcl and render into it with a C program. That is, a typical Togl program will have Tcl code for managing the user interface and a C program for computations and OpenGL rendering.

Togl is copyrighted by Brian Paul (brian_e_paul@yahoo.com) and Benjamin Bederson (bederson@cs.umd.edu). See the LICENSE file for details.

The Togl project and home page are hosted by SourceForge.

Prerequisites

You should have Tcl and Tk installed on your computer. Togl works with Tcl/Tk version 8.0 and up. The Mac OS X version requires version 8.4.

You must also have OpenGL or Mesa (a free alternative to OpenGL) installed on your computer.

One should be familiar with Tcl, Tk, OpenGL, and C programming to use Togl effectively.

Getting Togl

The current version of Togl is 1.7. Togl can be downloaded from SourceForge.

Mailing list

See the Togl project at SourceForge for mailing list information.

Using Togl With Your Application

There are basically two ways of using Togl with your application:

  • Link or "compile in" Togl with your executable or shared library. In this case you must call Togl_Init() from your C code to initialize Togl. This is the way the included Togl examples are built.
  • Install the Togl shared library and pkgIndex.tcl file (using make install) and then load it into wish using package require Togl. Then, before creating the Togl widget, call functions in your application code (also a compiled into a shared library and loaded into wish) to setup the Togl widget for the OpenGL rendering. Create the blank Togl widget, and then you're managing redraws and buffer swapping from the Tcl level.
Since Togl is compiled into a shared library using the Tcl/Tk stubs-interface, the same binary can be used with any version of Tck/Tk from 8.06 and up. See README.stubs for more info.

Unix/X11 usage

Unix/X systems only need the togl.c, togl.h and the public Tcl/Tk include files.

Windows 95/NT/2000/XP usage

Windows platforms need tkWinInt.h and other internal Tk header files. So you need a Tcl/Tk source distribution in addition to the Togl distribution (or copy over the various include files).

Here's the minimal way to build Togl with Tcl/Tk using the gcc that is distributed as part of the cygwin tools (Microsoft's compilers work too):

VER=8.4.12
SRCDIR=`pwd`

cd $SRCDIR/tcl$VER/win
env 'CC=gcc -mno-cygwin' ./configure --enable-threads
make libtclstub84.a

cd $SRCDIR/tk$VER/win
env 'CC=gcc -mno-cygwin' ./configure --enable-threads
make libtkstub84.a

cd $SRCDIR/Togl
env 'CC=gcc -mno-cygwin' ./configure --with-tcl=../tcl$VER/win --with-tk=../tk$VER/win

make
The resulting Togl17.dll and pkgIndex.tcl should be installed into your Tcl distribution just like any other package.

Mac OS X usage

These special instructions are for building the Aqua version of Togl. Mac OS X needs tkMacOSXInt.h and other internal Tk header files. Unfortunately, the Tcl and Tk frameworks that Apple distributes are missing the internal headers. So you need a Tcl/Tk source distribution in addition to the Togl distribution (or copy over the various include files). You would probably want a newer version of Tcl and Tk anyway because each minor revision of 8.4 has many Aqua bug fixes.

Here's one way to build Tcl, Tk, and Togl on Mac OS X (assuming they are all in the same directory) to install in your home directory:

VER=8.4.12

mkdir -p ~/bin
make -C tcl$VER/macosx install PREFIX="${HOME}" INSTALL_PATH="${HOME}/Library/Frameworks"
make -C tk$VER/macosx install PREFIX="${HOME}" INSTALL_PATH="${HOME}/Library/Frameworks"

(cd Togl; ./configure --prefix="${HOME}")
make -C Togl install

C Togl Functions

These are the Togl functions one may call from a C program.

#include "togl.h"

For portability, you should include the togl.h header before any other OpenGL header so that various Windows 95/NT/2000/XP stuff falls into place.

Setup and Initialization Functions

int Togl_Init(Tcl_Interp *interp)
Initializes the Togl module. This is typically called from the Tk_Main() function or via Tcl's package require command.
void Togl_CreateFunc(Togl_Callback *proc)
void Togl_DisplayFunc(Togl_Callback *proc)
void Togl_ReshapeFunc(Togl_Callback *proc)
void Togl_DestroyFunc(Togl_Callback *proc)
Register C functions to be called by Tcl/Tk when a widget is realized, must be redrawn, is resized, or is destroyed respectively.

Each C callback must be of the form:

	void callback(Togl *togl)
	{
	   ...your code...
	}
void Togl_TimerFunc(Togl_Callback *proc)
Register a C timer callback function which will be called every n milliseconds. The interval n is specified by the -time option to the Togl Tcl command.

The C callback must be of the form:

	void my_timer_callback(Togl *togl)
	{
	   ...your code...
	}
void Togl_ResetDefaultCallbacks(void)
Reset all default callback pointers to NULL.
void Togl_CreateCommand(char *cmd_name, Togl_CmdProc *cmd_proc)
Used to create a new Togl sub-command. The C function which implements the command must be of the form:

	int callback(Togl *togl, int argc, char *argv[])
	{
	   ...your code...
	   return TCL_OK or TCL_ERROR;
	}

Drawing-related Commands

void Togl_PostRedisplay(Togl *togl)
Signals that the widget should be redrawn. When Tk is next idle the user's C render callback will be invoked. This is typically called from within a Togl sub-command which was registered with Togl_CreateCommand().
void Togl_SwapBuffers(const Togl *togl)
Swaps the front and back color buffers for a double-buffered widget. glFlush() is executed if the window is single-buffered. This is typically called in the rendering function which was registered with Togl_DisplayFunc().
void Togl_MakeCurrent(const Togl *togl)
Sets the current rendering context to the given widget. This is done automatically before the Togl callback functions are called. So the call is only needed if you have multiple widgets with separate OpenGL contexts. If the argument is NULL, then the rendering context is cleared and subsequent OpenGL commands will fail.

Query Functions

char *Togl_Ident(const Togl *togl)
Returns a pointer to the identification string associated with a Togl widget or NULL if there's no identifier string.
int Togl_Width(const Togl *togl)
Returns the width of the given Togl widget. Typically called in the function registered with Togl_ReshapeFunc().
int Togl_Height(const Togl *togl)
Returns the height of the given Togl widget. Typically called in the function registered with Togl_ReshapeFunc().
Tcl_Interp *Togl_Interp(const Togl *togl)
Returns the Tcl interpreter associated with the given Togl widget.
Tk_Window Togl_TkWin(const Togl *togl)
Returns the Tk window associated with the given Togl widget.

Color Index Mode Functions

These functions are only used for color index mode.

unsigned long Togl_AllocColor(Togl *togl, float red, float green, float blue)
Allocate a color from a read-only colormap. Given a color specified by red, green, and blue return a colormap index (aka pixel value) whose entry most closely matches the red, green, blue color. Red, green, and blue are values in [0,1]. This function is only used in color index mode when the -privatecmap option is false.
void Togl_FreeColor(Togl *togl, unsigned long index)
Free a color in a read-only colormap. Index is a value which was returned by the Togl_AllocColor() function. This function is only used in color index mode when the -privatecmap option is false.
void Togl_SetColor(Togl *togl, int index, float red, float green, float blue)
Load the colormap entry specified by index with the given red, green and blue values. Red, green, and blue are values in [0,1]. This function is only used in color index mode when the -privatecmap option is true.

Font Functions

GLuint Togl_LoadBitmapFont(Togl *togl, const char *fontname)
Load the named font as a set of glBitmap display lists. fontname may be one of
  • TOGL_BITMAP_8_BY_13
  • TOGL_BITMAP_9_BY_15
  • TOGL_BITMAP_TIMES_ROMAN_10
  • TOGL_BITMAP_TIMES_ROMAN_24
  • TOGL_BITMAP_HELVETICA_10
  • TOGL_BITMAP_HELVETICA_12
  • TOGL_BITMAP_HELVETICA_18
  • or any X11 font name
Zero is returned if this function fails.
After Togl_LoadBitmapFont() has been called, returning fontbase, you can render a string s with:
glListBase(fontbase);
glCallLists(strlen(s), GL_BYTE, s);
To maximize the portability of your application it is best to use one of the predefined TOGL_BITMAP_* fonts.
void Togl_UnloadBitmapFont(Togl *togl, GLuint fontbase)
Destroys the bitmap display lists created by by Togl_LoadBitmapFont().

Client Data Functions

void Togl_SetClientData(Togl *togl, ClientData clientData)
clientData is a pointer to an arbitrary user data structure. Each Togl struct has such a pointer. This function sets the Togl widget's client data pointer.
ClientData Togl_GetClientData(const Togl *togl)
clientData is a pointer to an arbitrary user data structure. Each Togl struct has such a pointer. This function returns the Togl widget's client data pointer.
void Togl_ClientData(ClientData clientData)
clientData is a pointer to an arbitrary user data structure. Set default client data pointer for subsequent new Togl widgets. Default value is NULL.

Overlay Functions

These functions are modelled after GLUT's overlay sub-API.

void Togl_UseLayer(Togl *togl, int layer)
Select the layer into which subsequent OpenGL rendering will be directed. layer may be either TOGL_OVERLAY or TOGL_NORMAL.
void Togl_ShowOverlay(Togl *togl)
Display the overlay planes, if any.
void Togl_HideOverlay(Togl *togl)
Hide the overlay planes, if any.
void Togl_PostOverlayRedisplay(Togl *togl)
Signal that the overlay planes should be redraw. When Tk is next idle the user's C overlay display callback will be invoked. This is typically called from within a Togl sub-command which was registered with Togl_CreateCommand().
void Togl_OverlayDisplayFunc(Togl_Callback *proc)
Registers the C callback function which should be called to redraw the overlay planes. This is the function which will be called in response to Togl_PostOverlayRedisplay(). The callback must be of the form:

	void RedrawOverlay(Togl *togl)
	{
	   ...your code...
	}
int Togl_ExistsOverlay(Togl *togl)
Returns 1 if overlay planes exist, 0 otherwise.
int Togl_GetOverlayTransparentValue(const Togl *togl)
Returns the color index of the overlay's transparent pixel value.
int Togl_IsMappedOverlay(const Togl *togl)
Returns 1 if the overlay planes are currently displayed, 0 otherwise.
unsigned long Togl_AllocColorOverlay(const Togl *togl, float red, float green, float blue)
Allocate a color in the overlay planes. Red, green, and blue are values in [0,1]. Return the color index or -1 if the allocation fails.
void Togl_FreeColorOverlay(const Togl *togl, unsigned long index)
Free a color which was allocated with Togl_AllocColorOverlay().

X11-only Functions

These functions are only implemented on systems using the X Window System. We recommend that you avoid using these functions in your application since they are not portable to other operating/window systems (use Togl_TkWin() and normal Tk functions instead).

Display *Togl_Display(const Togl *togl)
Returns the X Display of a Togl widget.
Screen *Togl_Screen(const Togl *togl)
Returns the X Screen of a Togl widget.
int Togl_ScreenNumber(const Togl *togl)
Returns the X screen number of a Togl widget.
Colormap Togl_Colormap(const Togl *togl)
Returns the X Colormap used by a Togl widget.

Postscript Output

int Togl_DumpToEpsFile(const Togl *togl, const char *filename, int rgbFlag, void (*user_redraw)())
Generate an encapsulated Postscript file of the image in a Togl widget. filename is the name of the file to generate. If rgbFlag is non-zero then an RGB image file is written, else a grayscale image file is written. user_redraw is a pointer to the function which will render the desired image. This will typically be the same as the function passed to Togl_DisplayFunc().

Tcl Togl commands

These are the Togl commands one may call from a Tcl program.

togl pathName [options]
Creates a new togl widget with name pathName and an optional list of configuration options. Options include:

Option Default Comments
-width 400 Width of widget in pixels.
-height 400 Height of widget in pixels.
 
-ident "" A user identification string. This is used match widgets for the -sharecontext and the -sharelist options (see below). This is also useful in your callback functions to determine which Togl widget is the caller.
 
-rgba true If true, use RGB(A) mode, otherwise use Color Index mode.
-redsize 1 Minimum number of bits in red component.
-greensize 1 Minimum number of bits in green component.
-bluesize 1 Minimum number of bits in blue component.
-alpha 1 If true and -rgba is true, request an alpha channel.
-alphasize 1 Minimum number of bits in alpha component.
 
-double false If true, request a double-buffered window, otherwise request a single-buffered window.
 
-depth false If true, request a depth buffer.
-depthsize 1 Minimum number of bits in depth buffer.
 
-accum false If true, request an accumulation buffer.
-accumredsize 1 Minimum number of bits in accumulation buffer red component.
-accumgreensize 1 Minimum number of bits in accumulation buffer green component.
-accumbluesize 1 Minimum number of bits in accumulation buffer blue component.
-accumalphasize 1 Minimum number of bits in accumulation buffer alpha component.
 
-stencil false If true, request a stencil buffer.
-stencilsize 1 Minimum number of bits in stencil component.
 
-auxbuffers 0 Desired number of auxiliary buffers.
 
-privatecmap false Only applicable in color index mode. If false, use a shared read-only colormap. If true, use a private read/write colormap.
 
-overlay false If true, request overlay planes.
 
-stereo false If true, request a stereo-capable window.
-oldstereo false On SGI workstations only: if true, request divided-screen stereo.
 
-time 1 Specifies the interval, in milliseconds, for calling the C timer callback function which was registered with Togl_TimerFunc.
 
-sharelist "" Name of an existing Togl widget with which to share display lists.
-sharecontext "" Name of an existing Togl widget with which to share the OpenGL context. NOTE: most other attributes such as double buffering, RGBA vs CI, ancillary buffer specs, etc are then ignored.
 
-indirect false If present, request an indirect rendering context. A direct rendering context is normally requested. Only significant on Unix/X11.
 
-cursor "" Set the cursor in the widget window.
 
-pixelformat 0 Set the pixel format to the (platform-dependent) given value.

pathName configure
Returns all configuration records for the named togl widget.
pathName configure -option
Returns configuration information for the specified option which may be one of:
-width
Returns the width configuration of the widget in the form:
-width width Width W w
where W is the default width in pixels and w is the current width in pixels
-height
Returns the height configuration of the widget in the form:
-height height Height H h
where H is the default height in pixels and h is the current height in pixels
-extensions
Returns a list of OpenGL extensions available. For example: GL_EXT_polygon_offset GL_EXT_vertex_array
pathName configure -option value
Reconfigure a Togl widget. option may be any one of the options listed in the togl command above.
pathName render
Causes the render callback function to be called for pathName.
pathName swapbuffers
Causes front/back buffers to be swapped if in double buffer mode. And flushs the OpenGL command buffer if in single buffer mode. (So this is appropriate to call after every frame is drawn.)
pathName makecurrent
Make the widget specified by pathName and its OpenGL context the current ones.

Demo Programs

There are six demo programs:

double.tcl — compares single vs double buffering with two Togl widgets
texture.tcl — lets you play with texture mapping options
index.tcl — demo of using color index mode
overlay.tcl — example of using overlay planes (requires overlay hardware)
stereo.tcl — stereo example
gears.tcl — spinning gears demo

To compile the demos, edit the Makefile to suit your system, then type make demos. The demos are compiled into shared libraries, that can are loaded into the Tcl interpreter as Tcl/Tk-extensions. Demos are started by running the corrsponding Tcl script. To run a demo just type ./double.tcl or ./texture.tcl etc.

Stereo Rendering

Quad-buffered stereo-in-a-window is supported. Quad-buffer stereo is only available on workstation-class graphics cards (3Dlabs Wildcat series, ATI FireGL series, NVidia Quadro series, and SGI workstations). Legacy support for divided-screen stereo on SGI workstations is available via the -oldstereo option. Developers for SGI workstations might also like the autostereo package to automatically switch the display in and out of stereo (other systems already do it automatically).

Full-screen stereo that gaming graphics cards support (ATI Radeon, NVidia GeForce) is not supported.

Common Questions and Problems

If you have something to add to this section please let us know.

Bad Match X errors on Sun systems

There's a bug in Sun's XmuLookupStandardColormap X library function. If you compile togl.c with the SOLARIS_BUG symbol defined (-DSOLARIS_BUG) this function call will be omitted.

Reporting Bugs

There is a bug database on the Togl Project Page. You may also discuss bugs on the mailing list.

When reporting bugs please provide as much information as possible. Also, it's very helpful to us if you can provide an example program which demonstrates the problem.

Version History

Version 1.0 — March, 1996

  • Initial version

Version 1.1 (never officially released)

  • Added Togl_LoadBitmapFont function
  • Fixed a few bugs

Version 1.2 — November, 1996

  • added swapbuffers and makecurrent Tcl commands
  • More bug fixes
  • Upgraded to support Tcl 7.6 and Tk 4.2
  • Added stereo and overlay plane support
  • Added Togl_Get/SetClientData() functions
  • Added Togl_DestroyFunc()

Version 1.3 — May 2, 1997

  • fixed a bug in Togl_Configure()
  • fixed a compilation problem in using Tcl_PkgProvide() with Tcl < 7.4
  • new overlay functions: Togl_ExistsOverlay, Togl_GetOverlayTransparentValue, Togl_IsMappedOverlay, Togl_AllocColorOverlay, Togl_FreeColorOverlay
  • added X11 functions: Togl_Display, Togl_Screen, Togl_ScreenNumber, Togl_Colormap
  • added Togl_DumpToEpsFile function
  • fixed a C++ compilation problem
  • more robust overlay code
  • added timers (Togl_TimerFunc) from Peter Dern and Elmar Gerwalin

Version 1.4 — September 17, 1997

  • Ported to Windows NT (Robert Casto)
  • Updated for Tcl/Tk 8.0
  • Added many config flags (-redsize, -depthsize, etc) (Matthias Ott)
  • Added Togl_Set*Func() functions to reassign callback functions (Matthias Ott)
  • Added Togl_ResetDefaultCallbacks() and Togl_ClientData() functions (Greg Couch)

Version 1.5 — September 18, 1998

  • Fixed a few Unix and Windows compilation bugs
  • Added Ben Evan's SGI stereo functions
  • Multiple expose events now reduced to one redraw
  • Destroying Togl widgets caused problems, patched by Adrian J. Chung
  • Added Togl_TkWin() function
  • Updated for Tcl/Tk 8.0p2
  • Added gears demo from Philip Quaife
  • Added -sharelist and -sharecontext config flags
  • Fixed a few overlay update bugs
  • Added -indirect config flag

Version 1.6 — May 7, 2003

  • Added Togl_SetTimerFunc function
  • Updated for Tcl/Tk 8.0.5 and 8.1
  • Context sharing added for Windows
  • Macintosh support (by Paul Thiessen)
  • Tcl/Tk stubs support — see README.tcl (by Jonas Beskow)

Version 1.7 — Jan 2006

  • Added Mac OS X support
  • Enabled asking for quad-buffered stereo pixel formats on all platforms (use -oldstereo on SGIs for splitscreen stereo — C API changed too)
  • Configuring the cursor is no longer slow
  • Added -pixelformat config flag
  • Added setgrid support (unfortunately many window managers can't cope with 1x1 pixel grid)
  • Only free context when last reference is gone
  • Switched to TEA-based configure (instead of editing make files)

Version 2.0 — ??? 2006


Future plans

  • add callback command options for create/display/reshape/destroy
  • add vertical sync control
  • multisampling support (can be worked-around by passing in a pixelformat)
  • replace EPS support with TK photo image support
  • simplify C API by requiring callback command options
  • stubify C API
  • Use Tcl object interface for callbacks
  • allow (require?) private colormap to given with TK photo image

Contributors

Several people have contributed new features to Togl. Among them are:

  • Ramon Ramsan — overlay plane support
  • Miguel A. De Riera Pasenau — more overlay functions, X11 functions and EPS output
  • Peter Dern and Elmar Gerwalin — Togl_TimerFunc and related code
  • Robert Casto — Windows NT port
  • Geza Groma — Windows 95/NT patches
  • Ben Evans — SGI stereo support
  • Paul Thiessen — Macintosh support
  • Jonas Beskow — Tcl/Tk stubs support
  • Paul Kienzle — TEA debugging and patches
  • Greg Couch — version 1.7
Many others have contributed bug fixes. Thanks for your contributions!

Last edited on 25 October 2005 by Greg Couch. netgen-6.2.1804/ng/Togl-1.7/texture.tcl0000644000175000017500000002244613272137567016035 0ustar kurtkurt#!/bin/sh # the next line restarts using wish \ exec wish "$0" "$@" # $Id: texture.tcl,v 1.5 2001/12/20 13:59:31 beskow Exp $ # Togl - a Tk OpenGL widget # Copyright (C) 1996 Brian Paul and Ben Bederson # See the LICENSE file for copyright details. # $Log: texture.tcl,v $ # Revision 1.5 2001/12/20 13:59:31 beskow # Improved error-handling in togl.c in case of window creation failure # Added pkgIndex target to makefile # Updated documentation to reflect stubs-interface (Togl.html + new README.stubs) # Added tk8.4a3 headers # Removed obsolete Tk internal headers # # Revision 1.4 2001/01/29 18:11:53 brianp # Jonas Beskow's changes to use Tcl/Tk stub interface # # Revision 1.3 1998/01/24 14:05:50 brianp # added quit button (Ben Bederson) # # Revision 1.2 1997/09/30 23:54:46 brianp # new layout # # Revision 1.1 1996/10/23 23:18:36 brianp # Initial revision # # Togl texture map demo load [file dirname [info script]]/texture[info sharedlibextension] # Called magnification filter changes proc new_magfilter {} { global magfilter .f1.view mag_filter $magfilter } # Called minification filter changes proc new_minfilter {} { global minfilter .f1.view min_filter $minfilter } # Called when texture image radio button changes proc new_image {} { global teximage .f1.view image $teximage } # Called when texture S wrap button changes proc new_swrap {} { global swrap .f1.view swrap $swrap } # Called when texture T wrap button changes proc new_twrap {} { global twrap .f1.view twrap $twrap } # Called when texture environment radio button selected proc new_env {} { global envmode .f1.view envmode $envmode } # Called when polygon color sliders change proc new_color { foo } { global poly_red poly_green poly_blue .f1.view polycolor $poly_red $poly_green $poly_blue } proc new_coord_scale { name element op } { global coord_scale .f1.view coord_scale $coord_scale } # Make the widgets proc setup {} { global magfilter global minfilter global teximage global swrap global twrap global envmode global poly_red global poly_green global poly_blue global coord_scale global startx starty # location of mouse when button pressed global xangle yangle global xangle0 yangle0 global scale scale0 wm title . "Texture Map Options" ### Two frames: top half and bottom half frame .f1 frame .f2 ### The OpenGL window togl .f1.view -width 250 -height 250 -rgba true -double true -depth true ### Filter radio buttons frame .f1.filter -relief ridge -borderwidth 3 frame .f1.filter.mag -relief ridge -borderwidth 2 label .f1.filter.mag.label -text "Magnification Filter" -anchor w radiobutton .f1.filter.mag.nearest -text GL_NEAREST -anchor w -variable magfilter -value GL_NEAREST -command new_magfilter radiobutton .f1.filter.mag.linear -text GL_LINEAR -anchor w -variable magfilter -value GL_LINEAR -command new_magfilter frame .f1.filter.min -relief ridge -borderwidth 2 label .f1.filter.min.label -text "Minification Filter" -anchor w radiobutton .f1.filter.min.nearest -text GL_NEAREST -anchor w -variable minfilter -value GL_NEAREST -command new_minfilter radiobutton .f1.filter.min.linear -text GL_LINEAR -anchor w -variable minfilter -value GL_LINEAR -command new_minfilter radiobutton .f1.filter.min.nearest_mipmap_nearest -text GL_NEAREST_MIPMAP_NEAREST -anchor w -variable minfilter -value GL_NEAREST_MIPMAP_NEAREST -command new_minfilter radiobutton .f1.filter.min.linear_mipmap_nearest -text GL_LINEAR_MIPMAP_NEAREST -anchor w -variable minfilter -value GL_LINEAR_MIPMAP_NEAREST -command new_minfilter radiobutton .f1.filter.min.nearest_mipmap_linear -text GL_NEAREST_MIPMAP_LINEAR -anchor w -variable minfilter -value GL_NEAREST_MIPMAP_LINEAR -command new_minfilter radiobutton .f1.filter.min.linear_mipmap_linear -text GL_LINEAR_MIPMAP_LINEAR -anchor w -variable minfilter -value GL_LINEAR_MIPMAP_LINEAR -command new_minfilter pack .f1.filter.mag -fill x pack .f1.filter.mag.label -fill x pack .f1.filter.mag.nearest -side top -fill x pack .f1.filter.mag.linear -side top -fill x pack .f1.filter.min -fill both -expand true pack .f1.filter.min.label -side top -fill x pack .f1.filter.min.nearest -side top -fill x pack .f1.filter.min.linear -side top -fill x pack .f1.filter.min.nearest_mipmap_nearest -side top -fill x pack .f1.filter.min.linear_mipmap_nearest -side top -fill x pack .f1.filter.min.nearest_mipmap_linear -side top -fill x pack .f1.filter.min.linear_mipmap_linear -side top -fill x ### Texture coordinate scale and wrapping frame .f2.coord -relief ridge -borderwidth 3 frame .f2.coord.scale -relief ridge -borderwidth 2 label .f2.coord.scale.label -text "Max Texture Coord" -anchor w entry .f2.coord.scale.entry -textvariable coord_scale trace variable coord_scale w new_coord_scale frame .f2.coord.s -relief ridge -borderwidth 2 label .f2.coord.s.label -text "GL_TEXTURE_WRAP_S" -anchor w radiobutton .f2.coord.s.repeat -text "GL_REPEAT" -anchor w -variable swrap -value GL_REPEAT -command new_swrap radiobutton .f2.coord.s.clamp -text "GL_CLAMP" -anchor w -variable swrap -value GL_CLAMP -command new_swrap frame .f2.coord.t -relief ridge -borderwidth 2 label .f2.coord.t.label -text "GL_TEXTURE_WRAP_T" -anchor w radiobutton .f2.coord.t.repeat -text "GL_REPEAT" -anchor w -variable twrap -value GL_REPEAT -command new_twrap radiobutton .f2.coord.t.clamp -text "GL_CLAMP" -anchor w -variable twrap -value GL_CLAMP -command new_twrap pack .f2.coord.scale -fill both -expand true pack .f2.coord.scale.label -side top -fill x pack .f2.coord.scale.entry -side top -fill x pack .f2.coord.s -fill x pack .f2.coord.s.label -side top -fill x pack .f2.coord.s.repeat -side top -fill x pack .f2.coord.s.clamp -side top -fill x pack .f2.coord.t -fill x pack .f2.coord.t.label -side top -fill x pack .f2.coord.t.repeat -side top -fill x pack .f2.coord.t.clamp -side top -fill x ### Texture image radio buttons (just happens to fit into the coord frame) frame .f2.env -relief ridge -borderwidth 3 frame .f2.env.image -relief ridge -borderwidth 2 label .f2.env.image.label -text "Texture Image" -anchor w radiobutton .f2.env.image.checker -text "Checker" -anchor w -variable teximage -value CHECKER -command new_image radiobutton .f2.env.image.tree -text "Tree" -anchor w -variable teximage -value TREE -command new_image radiobutton .f2.env.image.face -text "Face" -anchor w -variable teximage -value FACE -command new_image pack .f2.env.image -fill x pack .f2.env.image.label -side top -fill x pack .f2.env.image.checker -side top -fill x pack .f2.env.image.tree -side top -fill x pack .f2.env.image.face -side top -fill x ### Texture Environment label .f2.env.label -text "GL_TEXTURE_ENV_MODE" -anchor w radiobutton .f2.env.modulate -text "GL_MODULATE" -anchor w -variable envmode -value GL_MODULATE -command new_env radiobutton .f2.env.decal -text "GL_DECAL" -anchor w -variable envmode -value GL_DECAL -command new_env radiobutton .f2.env.blend -text "GL_BLEND" -anchor w -variable envmode -value GL_BLEND -command new_env pack .f2.env.label -fill x pack .f2.env.modulate -side top -fill x pack .f2.env.decal -side top -fill x pack .f2.env.blend -side top -fill x ### Polygon color frame .f2.color -relief ridge -borderwidth 3 label .f2.color.label -text "Polygon color" -anchor w scale .f2.color.red -label Red -from 0 -to 255 -orient horizontal -variable poly_red -command new_color scale .f2.color.green -label Green -from 0 -to 255 -orient horizontal -variable poly_green -command new_color scale .f2.color.blue -label Blue -from 0 -to 255 -orient horizontal -variable poly_blue -command new_color pack .f2.color.label -fill x pack .f2.color.red -side top -fill x pack .f2.color.green -side top -fill x pack .f2.color.blue -side top -fill x ### Main widgets pack .f1.view -side left -fill both -expand true pack .f1.filter -side left -fill y pack .f1 -side top -fill both -expand true pack .f2.coord .f2.env -side left -fill both pack .f2.color -fill x pack .f2 -side top -fill x button .btn -text Quit -command exit pack .btn -expand true -fill both bind .f1.view { set startx %x set starty %y set xangle0 $xangle set yangle0 $yangle } bind .f1.view { set xangle [expr $xangle0 + (%x - $startx) / 3.0 ] set yangle [expr $yangle0 + (%y - $starty) / 3.0 ] .f1.view yrot $xangle .f1.view xrot $yangle } bind .f1.view { set startx %x set starty %y set scale0 $scale } bind .f1.view { set q [ expr ($starty - %y) / 400.0 ] set scale [expr $scale0 * exp($q)] .f1.view scale $scale } # set default values: set minfilter GL_NEAREST_MIPMAP_LINEAR set magfilter GL_LINEAR set swrap GL_REPEAT set twrap GL_REPEAT set envmode GL_MODULATE set teximage CHECKER set poly_red 255 set poly_green 255 set poly_blue 255 set coord_scale 1.0 set xangle 0.0 set yangle 0.0 set scale 1.0 } # Execution starts here! setup netgen-6.2.1804/ng/Togl-1.7/index.c0000644000175000017500000001024113272137567015072 0ustar kurtkurt/* $Id: index.c,v 1.10 2005/04/23 07:49:13 gregcouch Exp $ */ /* * Togl - a Tk OpenGL widget * Copyright (C) 1996-1997 Brian Paul and Ben Bederson * See the LICENSE file for copyright details. */ /* * An example Togl program using color-index mode. */ #include "togl.h" #include #include /* * The following variable is a special hack that is needed in order for * Sun shared libraries to be used for Tcl. */ #ifdef SUN extern int matherr(); int *tclDummyMathPtr = (int *) matherr; #endif /* Our color indexes: */ static unsigned long black, red, green, blue; /* Rotation angle */ static float Angle = 0.0; /* * Togl widget create callback. This is called by Tcl/Tk when the widget has * been realized. Here's where one may do some one-time context setup or * initializations. */ void create_cb(Togl *togl) { /* allocate color indexes */ black = Togl_AllocColor(togl, 0.0, 0.0, 0.0); red = Togl_AllocColor(togl, 1.0, 0.0, 0.0); green = Togl_AllocColor(togl, 0.0, 1.0, 0.0); blue = Togl_AllocColor(togl, 0.0, 0.0, 1.0); /* If we were using a private read/write colormap we'd setup our color * table with something like this: */ /* * black = 1; Togl_SetColor( togl, black, 0.0, 0.0, 0.0 ); red = 2; * Togl_SetColor( togl, red, 1.0, 0.0, 0.0 ); green = 3; Togl_SetColor( * togl, green, 0.0, 1.0, 0.0 ); blue = 4; Togl_SetColor( togl, blue, 0.0, * 0.0, 1.0 ); */ glShadeModel(GL_FLAT); glDisable(GL_DITHER); } /* * Togl widget reshape callback. This is called by Tcl/Tk when the widget * has been resized. Typically, we call glViewport and perhaps setup the * projection matrix. */ void reshape_cb(Togl *togl) { int width = Togl_Width(togl); int height = Togl_Height(togl); float aspect = (float) width / (float) height; glViewport(0, 0, width, height); /* Set up projection transform */ glMatrixMode(GL_PROJECTION); glLoadIdentity(); glOrtho(-aspect, aspect, -1.0, 1.0, -1.0, 1.0); /* Change back to model view transform for rendering */ glMatrixMode(GL_MODELVIEW); } /* * Togl widget display callback. This is called by Tcl/Tk when the widget's * contents have to be redrawn. Typically, we clear the color and depth * buffers, render our objects, then swap the front/back color buffers. */ void display_cb(Togl *togl) { glClearIndex(black); glClear(GL_COLOR_BUFFER_BIT); glPushMatrix(); glTranslatef(0.3, -0.3, 0.0); glRotatef(Angle, 0.0, 0.0, 1.0); glIndexi(red); glBegin(GL_TRIANGLES); glVertex2f(-0.5, -0.3); glVertex2f(0.5, -0.3); glVertex2f(0.0, 0.6); glEnd(); glPopMatrix(); glPushMatrix(); glRotatef(Angle, 0.0, 0.0, 1.0); glIndexi(green); glBegin(GL_TRIANGLES); glVertex2f(-0.5, -0.3); glVertex2f(0.5, -0.3); glVertex2f(0.0, 0.6); glEnd(); glPopMatrix(); glPushMatrix(); glTranslatef(-0.3, 0.3, 0.0); glRotatef(Angle, 0.0, 0.0, 1.0); glIndexi(blue); glBegin(GL_TRIANGLES); glVertex2f(-0.5, -0.3); glVertex2f(0.5, -0.3); glVertex2f(0.0, 0.6); glEnd(); glPopMatrix(); glFlush(); Togl_SwapBuffers(togl); } void timer_cb(Togl *togl) { Angle += 5.0; Togl_PostRedisplay(togl); } TOGL_EXTERN int Index_Init(Tcl_Interp *interp) { /* * Initialize Tcl, Tk, and the Togl widget module. */ #ifdef USE_TCL_STUBS if (Tcl_InitStubs(interp, "8.1", 0) == NULL) { return TCL_ERROR; } #endif #ifdef USE_TK_STUBS if (Tk_InitStubs(interp, "8.1", 0) == NULL) { return TCL_ERROR; } #endif if (Togl_Init(interp) == TCL_ERROR) { return TCL_ERROR; } /* * Specify the C callback functions for widget creation, display, * and reshape. */ Togl_CreateFunc(create_cb); Togl_DisplayFunc(display_cb); Togl_ReshapeFunc(reshape_cb); Togl_TimerFunc(timer_cb); /* * Make a new Togl widget command so the Tcl code can set a C variable. */ /* NONE */ /* * Call Tcl_CreateCommand for application-specific commands, if * they weren't already created by the init procedures called above. */ return TCL_OK; } netgen-6.2.1804/ng/Togl-1.7/CMakeLists.txt0000644000175000017500000000420513272137567016362 0ustar kurtkurtadd_definitions("-DPACKAGE_NAME=\"Togl\" -DPACKAGE_TARNAME=\"togl\" -DPACKAGE_VERSION=\"1.7\" -DPACKAGE_STRING=\"Togl\ 1.7\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_PARAM_H=1 -DUSE_THREAD_ALLOC=1 -D_REENTRANT=1 -D_THREAD_SAFE=1 -DTCL_THREADS=1 -D_LARGEFILE64_SOURCE=1 -DTCL_WIDE_INT_IS_LONG=1 -DUSE_TCL_STUBS=1 -DUSE_TK_STUBS=1") # include_directories("/usr/include/tcl8.5" "/usr/include/tcl8.5/tk-private/generic" "/usr/include/tcl8.5/tk-private/unix") # SET(CMAKE_CXX_FLAGS "-O2 -fomit-frame-pointer -Wall -Wno-implicit-int -fPIC -c") include_directories("${TCL_INCLUDE_PATH}/tk-private/generic" "${TCL_INCLUDE_PATH}/tk-private/unix") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -fomit-frame-pointer -Wall -Wno-implicit-int") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2 -fomit-frame-pointer -Wall -Wno-implicit-int") add_library(togl togl.c) target_link_libraries(togl ${OPENGL_LIBRARIES}) set_target_properties(togl PROPERTIES POSITION_INDEPENDENT_CODE ON ) # # gcc -DPACKAGE_NAME=\"Togl\" -DPACKAGE_TARNAME=\"togl\" -DPACKAGE_VERSION=\"1.7\" -DPACKAGE_STRING=\"Togl\ 1.7\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_PARAM_H=1 -DUSE_THREAD_ALLOC=1 -D_REENTRANT=1 -D_THREAD_SAFE=1 -DTCL_THREADS=1 -D_LARGEFILE64_SOURCE=1 -DTCL_WIDE_INT_IS_LONG=1 -DUSE_TCL_STUBS=1 -DUSE_TK_STUBS=1 # -I"/usr/include/tcl8.6" -I"/usr/include/tcl8.6/tk-private/generic" -I"/usr/include/tcl8.6/tk-private/unix" # -O2 -fomit-frame-pointer -Wall -Wno-implicit-int -fPIC -c `echo togl.c` -o togl.o # rm -f libTogl1.7.so # gcc -pipe -shared -o libTogl1.7.so togl.o -lX11 -lGL -lXmu -L/usr/lib/x86_64-linux-gnu -ltclstub8.6 -L/usr/lib/x86_64-linux-gnu -ltkstub8.6 # : libTogl1.7.so netgen-6.2.1804/ng/Togl-1.7/togl.c0000644000175000017500000035712013272137567014742 0ustar kurtkurt/* $Id: togl.c,v 1.73 2005/10/26 07:40:22 gregcouch Exp $ */ /* vi:set sw=4: */ /* * Togl - a Tk OpenGL widget * * Copyright (C) 1996-2002 Brian Paul and Ben Bederson * See the LICENSE file for copyright details. */ /* * Currently we support X11, Win32 and Macintosh only */ #include "togl.h" /* Use TCL_STUPID to cast (const char *) to (char *) where the Tcl function * prototype argument should really be const */ #define TCL_STUPID (char *) /* Use WIDGREC to cast widgRec arguments */ #define WIDGREC (char *) /*** Windows headers ***/ #if defined(TOGL_WGL) # define WIN32_LEAN_AND_MEAN # include # undef WIN32_LEAN_AND_MEAN # include /*** X Window System headers ***/ #elif defined(TOGL_X11) # include # include # include /* for XA_RGB_DEFAULT_MAP atom */ # if defined(__vms) # include /* for XmuLookupStandardColormap */ # else # include /* for XmuLookupStandardColormap */ # endif # include /*** Mac headers ***/ #elif defined(TOGL_AGL_CLASSIC) # include # include # include # include #elif defined(TOGL_AGL) # define Cursor QDCursor # include # undef Cursor # include "tkMacOSX.h" # include /* usa MacDrawable */ # include #else /* make sure only one platform defined */ # error Unsupported platform, or confused platform defines... #endif /*** Standard C headers ***/ #include #include #include #ifdef TOGL_WGL # include #endif #if TK_MAJOR_VERSION < 8 # error Sorry Togl requires Tcl/Tk ver 8.0 or higher. #endif #if defined(TOGL_AGL_CLASSIC) # if TK_MAJOR_VERSION < 8 || (TK_MAJOR_VERSION == 8 && TK_MINOR_VERSION < 3) # error Sorry Mac classic version requires Tcl/Tk ver 8.3.0 or higher. # endif #endif /* TOGL_AGL_CLASSIC */ #if defined(TOGL_AGL) # if TK_MAJOR_VERSION < 8 || (TK_MAJOR_VERSION == 8 && TK_MINOR_VERSION < 4) # error Sorry Mac Aqua version requires Tcl/Tk ver 8.4.0 or higher. # endif #endif /* TOGL_AGL */ /* workaround for bug #123153 in tcl ver8.4a2 (tcl.h) */ #if defined(Tcl_InitHashTable) && defined(USE_TCL_STUBS) # undef Tcl_InitHashTable # define Tcl_InitHashTable (tclStubsPtr->tcl_InitHashTable) #endif #if TK_MAJOR_VERSION > 8 || (TK_MAJOR_VERSION == 8 && TK_MINOR_VERSION >= 4) # define HAVE_TK_SETCLASSPROCS /* pointer to Tk_SetClassProcs function in the stub table */ static void (*SetClassProcsPtr) _ANSI_ARGS_((Tk_Window, Tk_ClassProcs *, ClientData)); #endif /* * Copy of TkClassProcs declarations form tkInt.h * (this is needed for Tcl ver =< 8.4a3) */ typedef Window (TkClassCreateProc) _ANSI_ARGS_((Tk_Window tkwin, Window parent, ClientData instanceData)); typedef void (TkClassGeometryProc) _ANSI_ARGS_((ClientData instanceData)); typedef void (TkClassModalProc) _ANSI_ARGS_((Tk_Window tkwin, XEvent *eventPtr)); typedef struct TkClassProcs { TkClassCreateProc *createProc; TkClassGeometryProc *geometryProc; TkClassModalProc *modalProc; } TkClassProcs; /* Defaults */ #define DEFAULT_WIDTH "400" #define DEFAULT_HEIGHT "400" #define DEFAULT_IDENT "" #define DEFAULT_FONTNAME "fixed" #define DEFAULT_TIME "1" #ifdef TOGL_WGL /* Maximum size of a logical palette corresponding to a colormap in color index * mode. */ # define MAX_CI_COLORMAP_SIZE 4096 # if TOGL_USE_FONTS != 1 /* * copy of TkWinColormap from tkWinInt.h */ typedef struct { HPALETTE palette; /* Palette handle used when drawing. */ UINT size; /* Number of entries in the palette. */ int stale; /* 1 if palette needs to be realized, otherwise * 0. If the palette is stale, then an idle * handler is scheduled to realize the palette. */ Tcl_HashTable refCounts; /* Hash table of palette entry reference counts * indexed by pixel value. */ } TkWinColormap; # else # include "tkWinInt.h" # endif static LRESULT(CALLBACK *tkWinChildProc) (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) = NULL; # define TK_WIN_CHILD_CLASS_NAME "TkChild" #endif /* TOGL_WGL */ #define MAX(a,b) (((a)>(b))?(a):(b)) #define TCL_ERR(interp, string) \ do { \ Tcl_ResetResult(interp); \ Tcl_AppendResult(interp, string, NULL); \ return TCL_ERROR; \ } while (0) /* The constant DUMMY_WINDOW is used to signal window creation failure from the * Togl_CreateWindow() */ #define DUMMY_WINDOW ((Window) -1) #define ALL_EVENTS_MASK \ (KeyPressMask | \ KeyReleaseMask | \ ButtonPressMask | \ ButtonReleaseMask | \ EnterWindowMask | \ LeaveWindowMask | \ PointerMotionMask | \ ExposureMask | \ VisibilityChangeMask | \ FocusChangeMask | \ PropertyChangeMask | \ ColormapChangeMask) struct Togl { Togl *Next; /* next in linked list */ #if defined(TOGL_WGL) HDC tglGLHdc; /* Device context of device that OpenGL calls * will be drawn on */ HGLRC tglGLHglrc; /* OpenGL rendering context to be made current */ int CiColormapSize; /* (Maximum) size of colormap in color index * mode */ #elif defined(TOGL_X11) GLXContext GlCtx; /* Normal planes GLX context */ #elif defined(TOGL_AGL_CLASSIC) || defined(TOGL_AGL) AGLContext aglCtx; #endif /* TOGL_WGL */ Display *display; /* X's token for the window's display. */ Tk_Window TkWin; /* Tk window structure */ Tcl_Interp *Interp; /* Tcl interpreter */ Tcl_Command widgetCmd; /* Token for togl's widget command */ #ifndef NO_TK_CURSOR Tk_Cursor Cursor; /* The widget's cursor */ #endif int Width, Height; /* Dimensions of window */ int SetGrid; /* positive is grid size for window manager */ int TimerInterval; /* Time interval for timer in milliseconds */ #if (TCL_MAJOR_VERSION * 100 + TCL_MINOR_VERSION) >= 705 Tcl_TimerToken timerHandler; /* Token for togl's timer handler */ #else Tk_TimerToken timerHandler; /* Token for togl's timer handler */ #endif Bool RgbaFlag; /* configuration flags (ala GLX parameters) */ int RgbaRed; int RgbaGreen; int RgbaBlue; Bool DoubleFlag; Bool DepthFlag; int DepthSize; Bool AccumFlag; int AccumRed; int AccumGreen; int AccumBlue; int AccumAlpha; Bool AlphaFlag; int AlphaSize; Bool StencilFlag; int StencilSize; Bool PrivateCmapFlag; Bool OverlayFlag; Bool StereoFlag; #ifdef __sgi Bool OldStereoFlag; #endif int AuxNumber; Bool Indirect; int PixelFormat; const char *ShareList; /* name (ident) of Togl to share dlists with */ const char *ShareContext; /* name (ident) to share OpenGL context with */ const char *Ident; /* User's identification string */ ClientData Client_Data; /* Pointer to user data */ Bool UpdatePending; /* Should normal planes be redrawn? */ Togl_Callback *CreateProc; /* Callback when widget is created */ Togl_Callback *DisplayProc; /* Callback when widget is rendered */ Togl_Callback *ReshapeProc; /* Callback when window size changes */ Togl_Callback *DestroyProc; /* Callback when widget is destroyed */ Togl_Callback *TimerProc; /* Callback when widget is idle */ /* Overlay stuff */ #if defined(TOGL_X11) GLXContext OverlayCtx; /* Overlay planes OpenGL context */ #elif defined(TOGL_WGL) HGLRC tglGLOverlayHglrc; #endif /* TOGL_X11 */ Window OverlayWindow; /* The overlay window, or 0 */ Togl_Callback *OverlayDisplayProc; /* Overlay redraw proc */ Bool OverlayUpdatePending; /* Should overlay be redrawn? */ Colormap OverlayCmap; /* colormap for overlay is created */ int OverlayTransparentPixel; /* transparent pixel */ Bool OverlayIsMapped; /* for DumpToEpsFile: Added by Miguel A. de Riera Pasenau 10.01.1997 */ XVisualInfo *VisInfo; /* Visual info of the current */ /* context needed for DumpToEpsFile */ GLfloat *EpsRedMap; /* Index2RGB Maps for Color index modes */ GLfloat *EpsGreenMap; GLfloat *EpsBlueMap; GLint EpsMapSize; /* = Number of indices in our Togl */ }; /* NTNTNT need to change to handle Windows Data Types */ /* * Prototypes for functions local to this file */ static int Togl_Cmd(ClientData clientData, Tcl_Interp *interp, int argc, CONST84 char **argv); static void Togl_EventProc(ClientData clientData, XEvent *eventPtr); static Window Togl_CreateWindow(Tk_Window, Window, ClientData); static void Togl_WorldChanged(ClientData); #ifdef MESA_COLOR_HACK static int get_free_color_cells(Display *display, int screen, Colormap colormap); static void free_default_color_cells(Display *display, Colormap colormap); #endif static void ToglCmdDeletedProc(ClientData); #if defined(__sgi) /* SGI-only stereo */ static void oldStereoMakeCurrent(Display *dpy, Window win, GLXContext ctx); static void oldStereoInit(Togl *togl, int stereoEnabled); #endif #if defined(TOGL_AGL_CLASSIC) || defined(TOGL_AGL) static void SetMacBufRect(Togl *togl); #endif /* * Setup Togl widget configuration options: */ static Tk_ConfigSpec configSpecs[] = { {TK_CONFIG_PIXELS, TCL_STUPID "-height", "height", "Height", DEFAULT_HEIGHT, Tk_Offset(Togl, Height), 0, NULL}, {TK_CONFIG_PIXELS, TCL_STUPID "-width", "width", "Width", DEFAULT_WIDTH, Tk_Offset(Togl, Width), 0, NULL}, {TK_CONFIG_INT, TCL_STUPID "-setgrid", "setGrid", "SetGrid", "0", Tk_Offset(Togl, SetGrid), 0}, {TK_CONFIG_BOOLEAN, TCL_STUPID "-rgba", "rgba", "Rgba", "true", Tk_Offset(Togl, RgbaFlag), 0, NULL}, {TK_CONFIG_INT, TCL_STUPID "-redsize", "redsize", "RedSize", "1", Tk_Offset(Togl, RgbaRed), 0, NULL}, {TK_CONFIG_INT, TCL_STUPID "-greensize", "greensize", "GreenSize", "1", Tk_Offset(Togl, RgbaGreen), 0, NULL}, {TK_CONFIG_INT, TCL_STUPID "-bluesize", "bluesize", "BlueSize", "1", Tk_Offset(Togl, RgbaBlue), 0, NULL}, {TK_CONFIG_BOOLEAN, TCL_STUPID "-double", "double", "Double", "false", Tk_Offset(Togl, DoubleFlag), 0, NULL}, {TK_CONFIG_BOOLEAN, TCL_STUPID "-depth", "depth", "Depth", "false", Tk_Offset(Togl, DepthFlag), 0, NULL}, {TK_CONFIG_INT, TCL_STUPID "-depthsize", "depthsize", "DepthSize", "1", Tk_Offset(Togl, DepthSize), 0, NULL}, {TK_CONFIG_BOOLEAN, TCL_STUPID "-accum", "accum", "Accum", "false", Tk_Offset(Togl, AccumFlag), 0, NULL}, {TK_CONFIG_INT, TCL_STUPID "-accumredsize", "accumredsize", "AccumRedSize", "1", Tk_Offset(Togl, AccumRed), 0, NULL}, {TK_CONFIG_INT, TCL_STUPID "-accumgreensize", "accumgreensize", "AccumGreenSize", "1", Tk_Offset(Togl, AccumGreen), 0, NULL}, {TK_CONFIG_INT, TCL_STUPID "-accumbluesize", "accumbluesize", "AccumBlueSize", "1", Tk_Offset(Togl, AccumBlue), 0, NULL}, {TK_CONFIG_INT, TCL_STUPID "-accumalphasize", "accumalphasize", "AccumAlphaSize", "1", Tk_Offset(Togl, AccumAlpha), 0, NULL}, {TK_CONFIG_BOOLEAN, TCL_STUPID "-alpha", "alpha", "Alpha", "false", Tk_Offset(Togl, AlphaFlag), 0, NULL}, {TK_CONFIG_INT, TCL_STUPID "-alphasize", "alphasize", "AlphaSize", "1", Tk_Offset(Togl, AlphaSize), 0, NULL}, {TK_CONFIG_BOOLEAN, TCL_STUPID "-stencil", "stencil", "Stencil", "false", Tk_Offset(Togl, StencilFlag), 0, NULL}, {TK_CONFIG_INT, TCL_STUPID "-stencilsize", "stencilsize", "StencilSize", "1", Tk_Offset(Togl, StencilSize), 0, NULL}, {TK_CONFIG_INT, TCL_STUPID "-auxbuffers", "auxbuffers", "AuxBuffers", "0", Tk_Offset(Togl, AuxNumber), 0, NULL}, {TK_CONFIG_BOOLEAN, TCL_STUPID "-privatecmap", "privateCmap", "PrivateCmap", "false", Tk_Offset(Togl, PrivateCmapFlag), 0, NULL}, {TK_CONFIG_BOOLEAN, TCL_STUPID "-overlay", "overlay", "Overlay", "false", Tk_Offset(Togl, OverlayFlag), 0, NULL}, {TK_CONFIG_BOOLEAN, TCL_STUPID "-stereo", "stereo", "Stereo", "false", Tk_Offset(Togl, StereoFlag), 0, NULL}, #ifdef __sgi {TK_CONFIG_BOOLEAN, TCL_STUPID "-oldstereo", "oldstereo", "OldStereo", "false", Tk_Offset(Togl, OldStereoFlag), 0, NULL}, #endif #ifndef NO_TK_CURSOR {TK_CONFIG_ACTIVE_CURSOR, TCL_STUPID "-cursor", "cursor", "Cursor", "", Tk_Offset(Togl, Cursor), TK_CONFIG_NULL_OK}, #endif {TK_CONFIG_INT, TCL_STUPID "-time", "time", "Time", DEFAULT_TIME, Tk_Offset(Togl, TimerInterval), 0, NULL}, {TK_CONFIG_STRING, TCL_STUPID "-sharelist", "sharelist", "ShareList", NULL, Tk_Offset(Togl, ShareList), 0, NULL}, {TK_CONFIG_STRING, TCL_STUPID "-sharecontext", "sharecontext", "ShareContext", NULL, Tk_Offset(Togl, ShareContext), 0, NULL}, {TK_CONFIG_STRING, TCL_STUPID "-ident", "ident", "Ident", DEFAULT_IDENT, Tk_Offset(Togl, Ident), 0, NULL}, {TK_CONFIG_BOOLEAN, TCL_STUPID "-indirect", "indirect", "Indirect", "false", Tk_Offset(Togl, Indirect), 0, NULL}, {TK_CONFIG_INT, TCL_STUPID "-pixelformat", "pixelFormat", "PixelFormat", "0", Tk_Offset(Togl, PixelFormat), 0, NULL}, {TK_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0, NULL} }; /* * Default callback pointers. When a new Togl widget is created it * will be assigned these initial callbacks. */ static Togl_Callback *DefaultCreateProc = NULL; static Togl_Callback *DefaultDisplayProc = NULL; static Togl_Callback *DefaultReshapeProc = NULL; static Togl_Callback *DefaultDestroyProc = NULL; static Togl_Callback *DefaultOverlayDisplayProc = NULL; static Togl_Callback *DefaultTimerProc = NULL; static ClientData DefaultClientData = NULL; static Tcl_HashTable CommandTable; /* * Head of linked list of all Togl widgets */ static Togl *ToglHead = NULL; /* * Add given togl widget to linked list. */ static void AddToList(Togl *t) { t->Next = ToglHead; ToglHead = t; } /* * Remove given togl widget from linked list. */ static void RemoveFromList(Togl *t) { Togl *prev = NULL; Togl *pos = ToglHead; while (pos) { if (pos == t) { if (prev) { prev->Next = pos->Next; } else { ToglHead = pos->Next; } return; } prev = pos; pos = pos->Next; } } /* * Return pointer to togl widget given a user identifier string. */ static Togl * FindTogl(const char *ident) { Togl *t = ToglHead; while (t) { if (strcmp(t->Ident, ident) == 0) return t; t = t->Next; } return NULL; } #if defined(TOGL_X11) /* * Return pointer to another togl widget with same OpenGL context. */ static Togl * FindToglWithSameContext(Togl *togl) { Togl *t; for (t = ToglHead; t != NULL; t = t->Next) { if (t == togl) continue; # if defined(TOGL_WGL) if (t->tglGLHglrc == togl->tglGLHglrc) # elif defined(TOGL_X11) if (t->GlCtx == togl->GlCtx) # elif defined(TOGL_AGL_CLASSIC) || defined(TOGL_AGL) if (t->aglCtx == togl->aglCtx) # endif return t; } return NULL; } #endif #ifdef USE_OVERLAY /* * Return pointer to another togl widget with same OpenGL overlay context. */ static Togl * FindToglWithSameOverlayContext(Togl *togl) { Togl *t; for (t = ToglHead; t != NULL; t = t->Next) { if (t == togl) continue; # if defined(TOGL_X11) if (t->OverlayCtx == togl->OverlayCtx) # elif defined(TOGL_WGL) if (t->tglGLOverlayHglrc == togl->tglGLOverlayHglrc) # endif return t; } return NULL; } #endif #if defined(TOGL_X11) /* * Return an X colormap to use for OpenGL RGB-mode rendering. * Input: dpy - the X display * scrnum - the X screen number * visinfo - the XVisualInfo as returned by glXChooseVisual() * Return: an X Colormap or 0 if there's a _serious_ error. */ static Colormap get_rgb_colormap(Display *dpy, int scrnum, const XVisualInfo *visinfo, Tk_Window tkwin) { Atom hp_cr_maps; Status status; int numCmaps; int i; XStandardColormap *standardCmaps; Window root = XRootWindow(dpy, scrnum); Bool using_mesa; /* * First check if visinfo's visual matches the default/root visual. */ if (visinfo->visual == Tk_Visual(tkwin)) { /* use the default/root colormap */ Colormap cmap; cmap = Tk_Colormap(tkwin); # ifdef MESA_COLOR_HACK (void) get_free_color_cells(dpy, scrnum, cmap); # endif return cmap; } /* * Check if we're using Mesa. */ if (strstr(glXQueryServerString(dpy, scrnum, GLX_VERSION), "Mesa")) { using_mesa = True; } else { using_mesa = False; } /* * Next, if we're using Mesa and displaying on an HP with the "Color * Recovery" feature and the visual is 8-bit TrueColor, search for a * special colormap initialized for dithering. Mesa will know how to * dither using this colormap. */ if (using_mesa) { hp_cr_maps = XInternAtom(dpy, "_HP_RGB_SMOOTH_MAP_LIST", True); if (hp_cr_maps # ifdef __cplusplus && visinfo->visual->c_class == TrueColor # else && visinfo->visual->class == TrueColor # endif && visinfo->depth == 8) { status = XGetRGBColormaps(dpy, root, &standardCmaps, &numCmaps, hp_cr_maps); if (status) { for (i = 0; i < numCmaps; i++) { if (standardCmaps[i].visualid == visinfo->visual->visualid) { Colormap cmap = standardCmaps[i].colormap; (void) XFree(standardCmaps); return cmap; } } (void) XFree(standardCmaps); } } } /* * Next, try to find a standard X colormap. */ # if !HP && !SUN # ifndef SOLARIS_BUG status = XmuLookupStandardColormap(dpy, visinfo->screen, visinfo->visualid, visinfo->depth, XA_RGB_DEFAULT_MAP, /* replace */ False, /* retain */ True); if (status == 1) { status = XGetRGBColormaps(dpy, root, &standardCmaps, &numCmaps, XA_RGB_DEFAULT_MAP); if (status == 1) { for (i = 0; i < numCmaps; i++) { if (standardCmaps[i].visualid == visinfo->visualid) { Colormap cmap = standardCmaps[i].colormap; (void) XFree(standardCmaps); return cmap; } } (void) XFree(standardCmaps); } } # endif # endif /* * If we get here, give up and just allocate a new colormap. */ return XCreateColormap(dpy, root, visinfo->visual, AllocNone); } #elif defined(TOGL_WGL) /* Code to create RGB palette is taken from the GENGL sample program of Win32 * SDK */ static unsigned char threeto8[8] = { 0, 0111 >> 1, 0222 >> 1, 0333 >> 1, 0444 >> 1, 0555 >> 1, 0666 >> 1, 0377 }; static unsigned char twoto8[4] = { 0, 0x55, 0xaa, 0xff }; static unsigned char oneto8[2] = { 0, 255 }; static int defaultOverride[13] = { 0, 3, 24, 27, 64, 67, 88, 173, 181, 236, 247, 164, 91 }; static PALETTEENTRY defaultPalEntry[20] = { {0, 0, 0, 0}, {0x80, 0, 0, 0}, {0, 0x80, 0, 0}, {0x80, 0x80, 0, 0}, {0, 0, 0x80, 0}, {0x80, 0, 0x80, 0}, {0, 0x80, 0x80, 0}, {0xC0, 0xC0, 0xC0, 0}, {192, 220, 192, 0}, {166, 202, 240, 0}, {255, 251, 240, 0}, {160, 160, 164, 0}, {0x80, 0x80, 0x80, 0}, {0xFF, 0, 0, 0}, {0, 0xFF, 0, 0}, {0xFF, 0xFF, 0, 0}, {0, 0, 0xFF, 0}, {0xFF, 0, 0xFF, 0}, {0, 0xFF, 0xFF, 0}, {0xFF, 0xFF, 0xFF, 0} }; static unsigned char ComponentFromIndex(int i, UINT nbits, UINT shift) { unsigned char val; val = (unsigned char) (i >> shift); switch (nbits) { case 1: val &= 0x1; return oneto8[val]; case 2: val &= 0x3; return twoto8[val]; case 3: val &= 0x7; return threeto8[val]; default: return 0; } } static Colormap Win32CreateRgbColormap(PIXELFORMATDESCRIPTOR pfd) { TkWinColormap *cmap = (TkWinColormap *) ckalloc(sizeof (TkWinColormap)); LOGPALETTE *pPal; int n, i; n = 1 << pfd.cColorBits; pPal = (PLOGPALETTE) LocalAlloc(LMEM_FIXED, sizeof (LOGPALETTE) + n * sizeof (PALETTEENTRY)); pPal->palVersion = 0x300; pPal->palNumEntries = n; for (i = 0; i < n; i++) { pPal->palPalEntry[i].peRed = ComponentFromIndex(i, pfd.cRedBits, pfd.cRedShift); pPal->palPalEntry[i].peGreen = ComponentFromIndex(i, pfd.cGreenBits, pfd.cGreenShift); pPal->palPalEntry[i].peBlue = ComponentFromIndex(i, pfd.cBlueBits, pfd.cBlueShift); pPal->palPalEntry[i].peFlags = 0; } /* fix up the palette to include the default GDI palette */ if ((pfd.cColorBits == 8) && (pfd.cRedBits == 3) && (pfd.cRedShift == 0) && (pfd.cGreenBits == 3) && (pfd.cGreenShift == 3) && (pfd.cBlueBits == 2) && (pfd.cBlueShift == 6)) { for (i = 1; i <= 12; i++) pPal->palPalEntry[defaultOverride[i]] = defaultPalEntry[i]; } cmap->palette = CreatePalette(pPal); LocalFree(pPal); cmap->size = n; cmap->stale = 0; /* Since this is a private colormap of a fix size, we do not need a valid * hash table, but a dummy one */ Tcl_InitHashTable(&cmap->refCounts, TCL_ONE_WORD_KEYS); return (Colormap) cmap; } static Colormap Win32CreateCiColormap(Togl *togl) { /* Create a colormap with size of togl->CiColormapSize and set all entries * to black */ LOGPALETTE logPalette; TkWinColormap *cmap = (TkWinColormap *) ckalloc(sizeof (TkWinColormap)); logPalette.palVersion = 0x300; logPalette.palNumEntries = 1; logPalette.palPalEntry[0].peRed = 0; logPalette.palPalEntry[0].peGreen = 0; logPalette.palPalEntry[0].peBlue = 0; logPalette.palPalEntry[0].peFlags = 0; cmap->palette = CreatePalette(&logPalette); cmap->size = togl->CiColormapSize; ResizePalette(cmap->palette, cmap->size); /* sets new entries to black */ cmap->stale = 0; /* Since this is a private colormap of a fix size, we do not need a valid * hash table, but a dummy one */ Tcl_InitHashTable(&cmap->refCounts, TCL_ONE_WORD_KEYS); return (Colormap) cmap; } #endif /* TOGL_X11 */ /* * Togl_Init * * Called upon system startup to create Togl command. */ int Togl_Init(Tcl_Interp *interp) { int major, minor, patchLevel, releaseType; #ifdef USE_TCL_STUBS if (Tcl_InitStubs(interp, "8.1", 0) == NULL) { return TCL_ERROR; } #endif #ifdef USE_TK_STUBS if (Tk_InitStubs(interp, TCL_STUPID "8.1", 0) == NULL) { return TCL_ERROR; } #endif /* Skip all this on Tcl/Tk 8.0 or older. Seems to work */ #if TCL_MAJOR_VERSION * 100 + TCL_MINOR_VERSION > 800 Tcl_GetVersion(&major, &minor, &patchLevel, &releaseType); # ifdef HAVE_TK_SETCLASSPROCS if (major > 8 || (major == 8 && (minor > 4 || (minor == 4 && (releaseType > 0 || patchLevel >= 2))))) { # ifdef USE_TK_STUBS SetClassProcsPtr = tkStubsPtr->tk_SetClassProcs; # else SetClassProcsPtr = Tk_SetClassProcs; # endif } else { SetClassProcsPtr = NULL; } # else if (major > 8 || (major == 8 && (minor > 4 || (minor == 4 && (releaseType > 0 || patchLevel >= 2))))) { TCL_ERR(interp, "Sorry, this instance of Togl was not compiled to work with Tcl/Tk 8.4a2 or higher."); } # endif #endif if (Tcl_PkgProvide(interp, "Togl", TOGL_VERSION) != TCL_OK) { return TCL_ERROR; } if (Tcl_CreateCommand(interp, "togl", Togl_Cmd, (ClientData) Tk_MainWindow(interp), NULL) == NULL) return TCL_ERROR; Tcl_InitHashTable(&CommandTable, TCL_STRING_KEYS); return TCL_OK; } /* * Register a C function to be called when an Togl widget is realized. */ void Togl_CreateFunc(Togl_Callback *proc) { DefaultCreateProc = proc; } /* * Register a C function to be called when an Togl widget must be redrawn. */ void Togl_DisplayFunc(Togl_Callback *proc) { DefaultDisplayProc = proc; } /* * Register a C function to be called when an Togl widget is resized. */ void Togl_ReshapeFunc(Togl_Callback *proc) { DefaultReshapeProc = proc; } /* * Register a C function to be called when an Togl widget is destroyed. */ void Togl_DestroyFunc(Togl_Callback *proc) { DefaultDestroyProc = proc; } /* * Register a C function to be called from TimerEventHandler. */ void Togl_TimerFunc(Togl_Callback *proc) { DefaultTimerProc = proc; } /* * Reset default callback pointers to NULL. */ void Togl_ResetDefaultCallbacks(void) { DefaultCreateProc = NULL; DefaultDisplayProc = NULL; DefaultReshapeProc = NULL; DefaultDestroyProc = NULL; DefaultOverlayDisplayProc = NULL; DefaultTimerProc = NULL; DefaultClientData = NULL; } /* * Change the create callback for a specific Togl widget. */ void Togl_SetCreateFunc(Togl *togl, Togl_Callback *proc) { togl->CreateProc = proc; } /* * Change the display/redraw callback for a specific Togl widget. */ void Togl_SetDisplayFunc(Togl *togl, Togl_Callback *proc) { togl->DisplayProc = proc; } /* * Change the reshape callback for a specific Togl widget. */ void Togl_SetReshapeFunc(Togl *togl, Togl_Callback *proc) { togl->ReshapeProc = proc; } /* * Change the destroy callback for a specific Togl widget. */ void Togl_SetDestroyFunc(Togl *togl, Togl_Callback *proc) { togl->DestroyProc = proc; } /* * Togl_Timer * * Gets called from Tk_CreateTimerHandler. */ static void Togl_Timer(ClientData clientData) { Togl *togl = (Togl *) clientData; if (togl->TimerProc) { togl->TimerProc(togl); /* Re-register this callback since Tcl/Tk timers are "one-shot". That * is, after the timer callback is called it not normally called again. * * * * * * * * * That's not the behavior we want for Togl. */ #if (TK_MAJOR_VERSION * 100 + TK_MINOR_VERSION) >= 401 togl->timerHandler = Tcl_CreateTimerHandler(togl->TimerInterval, Togl_Timer, (ClientData) togl); #else togl->timerHandler = Tk_CreateTimerHandler(togl->TimeInterval, Togl_Timer, (ClientData) togl); #endif } } /* * Change the timer callback for a specific Togl widget. * Pass NULL to disable the callback. */ void Togl_SetTimerFunc(Togl *togl, Togl_Callback *proc) { togl->TimerProc = proc; if (proc) { #if (TK_MAJOR_VERSION * 100 + TK_MINOR_VERSION) >= 401 togl->timerHandler = Tcl_CreateTimerHandler(togl->TimerInterval, Togl_Timer, (ClientData) togl); #else togl->timerHandler = Tk_CreateTimerHandler(togl->TimeInterval, Togl_Timer, (ClientData) togl); #endif } } /* * Togl_CreateCommand * * Declares a new C sub-command of Togl callable from Tcl. * Every time the sub-command is called from Tcl, the * C routine will be called with all the arguments from Tcl. */ void Togl_CreateCommand(char *cmd_name, Togl_CmdProc *cmd_proc) { int new_item; Tcl_HashEntry *entry; entry = Tcl_CreateHashEntry(&CommandTable, cmd_name, &new_item); Tcl_SetHashValue(entry, cmd_proc); } /* * Togl_MakeCurrent * * Bind the OpenGL rendering context to the specified * Togl widget. */ void Togl_MakeCurrent(const Togl *togl) { #if defined(TOGL_WGL) int res = wglMakeCurrent(togl->tglGLHdc, togl->tglGLHglrc); assert(res == TRUE); #elif defined(TOGL_X11) if (!togl->GlCtx) return; (void) glXMakeCurrent(togl->display, togl->TkWin ? Tk_WindowId(togl->TkWin) : None, togl->GlCtx); # if defined(__sgi) if (togl->OldStereoFlag) oldStereoMakeCurrent(togl->display, togl->TkWin ? Tk_WindowId(togl->TkWin) : None, togl->GlCtx); # endif /*__sgi STEREO */ #elif defined(TOGL_AGL_CLASSIC) || defined(TOGL_AGL) if (!togl->aglCtx) return; aglSetCurrentContext(togl->aglCtx); #endif } #ifdef TOGL_AGL_CLASSIC /* tell OpenGL which part of the Mac window to render to */ static void SetMacBufRect(Togl *togl) { GLint wrect[4]; /* set wrect[0,1] to lower left corner of widget */ wrect[2] = ((TkWindow *) (togl->TkWin))->changes.width; wrect[3] = ((TkWindow *) (togl->TkWin))->changes.height; wrect[0] = ((TkWindow *) (togl->TkWin))->privatePtr->xOff; wrect[1] = ((TkWindow *) (togl->TkWin))->privatePtr->toplevel->portPtr-> portRect.bottom - wrect[3] - ((TkWindow *) (togl->TkWin))->privatePtr->yOff; aglSetInteger(togl->aglCtx, AGL_BUFFER_RECT, wrect); aglEnable(togl->aglCtx, AGL_BUFFER_RECT); aglUpdateContext(togl->aglCtx); } #elif defined(TOGL_AGL) /* tell OpenGL which part of the Mac window to render to */ static void SetMacBufRect(Togl *togl) { GLint wrect[4]; /* set wrect[0,1] to lower left corner of widget */ wrect[2] = Tk_Width(togl->TkWin); wrect[3] = Tk_Height(togl->TkWin); wrect[0] = ((TkWindow *) (togl->TkWin))->privatePtr->xOff; Rect r; GetPortBounds(((TkWindow *) (togl->TkWin))->privatePtr->toplevel->grafPtr, &r); wrect[1] = r.bottom - wrect[3] - ((TkWindow *) (togl->TkWin))->privatePtr->yOff; aglSetInteger(togl->aglCtx, AGL_BUFFER_RECT, wrect); aglEnable(togl->aglCtx, AGL_BUFFER_RECT); aglUpdateContext(togl->aglCtx); } #endif /* * Called when the widget's contents must be redrawn. Basically, we * just call the user's render callback function. * * Note that the parameter type is ClientData so this function can be * passed to Tk_DoWhenIdle(). */ static void Togl_Render(ClientData clientData) { Togl *togl = (Togl *) clientData; if (togl->DisplayProc) { #ifdef TOGL_AGL_CLASSIC /* Mac is complicated here because OpenGL needs to know what part of * the parent window to render into, and it seems that region need to * be invalidated before drawing, so that QuickDraw will allow OpenGL * to transfer pixels into that part of the window. I'm not even * totally sure how or why this works as it does, since this aspect of * Mac OpenGL seems to be totally undocumented. This was put together * by trial and error! (thiessen) */ MacRegion r; RgnPtr rp = &r; GrafPtr curPort, parentWin; parentWin = (GrafPtr) (((MacDrawable *) (Tk_WindowId(togl->TkWin)))->toplevel-> portPtr); if (!parentWin) return; #endif Togl_MakeCurrent(togl); #ifdef TOGL_AGL_CLASSIC /* Set QuickDraw port and clipping region */ GetPort(&curPort); SetPort(parentWin); r.rgnBBox.left = ((TkWindow *) (togl->TkWin))->privatePtr->xOff; r.rgnBBox.right = r.rgnBBox.left + ((TkWindow *) (togl->TkWin))->changes.width - 1; r.rgnBBox.top = ((TkWindow *) (togl->TkWin))->privatePtr->yOff; r.rgnBBox.bottom = r.rgnBBox.top + ((TkWindow *) (togl->TkWin))->changes.height - 1; r.rgnSize = sizeof (Region); InvalRgn(&rp); SetClip(&rp); /* this may seem an odd place to put this, with possibly redundant * calls to aglSetInteger(AGL_BUFFER_RECT...), but for some reason * performance is actually a lot better if this is called before every * render... */ SetMacBufRect(togl); #endif #ifdef TOGL_AGL SetMacBufRect(togl); #endif togl->DisplayProc(togl); #ifdef TOGL_AGL_CLASSIC SetPort(curPort); /* restore previous port */ #endif } #if defined(TOGL_AGL_CLASSIC) || defined(TOGL_AGL) else { /* Always need to update on resize */ SetMacBufRect(togl); } #endif togl->UpdatePending = False; } static void RenderOverlay(ClientData clientData) { Togl *togl = (Togl *) clientData; if (togl->OverlayFlag && togl->OverlayDisplayProc) { #if defined(TOGL_WGL) int res = wglMakeCurrent(togl->tglGLHdc, togl->tglGLHglrc); assert(res == TRUE); #elif defined(TOGL_X11) (void) glXMakeCurrent(Tk_Display(togl->TkWin), togl->OverlayWindow, togl->OverlayCtx); # if defined(__sgi) if (togl->OldStereoFlag) oldStereoMakeCurrent(Tk_Display(togl->TkWin), togl->OverlayWindow, togl->OverlayCtx); # endif /*__sgi STEREO */ #endif /* TOGL_WGL */ togl->OverlayDisplayProc(togl); } togl->OverlayUpdatePending = False; } /* * It's possible to change with this function or in a script some * options like RGBA - ColorIndex ; Z-buffer and so on */ int Togl_Configure(Tcl_Interp *interp, Togl *togl, int argc, const char *argv[], int flags) { Bool oldRgbaFlag = togl->RgbaFlag; int oldRgbaRed = togl->RgbaRed; int oldRgbaGreen = togl->RgbaGreen; int oldRgbaBlue = togl->RgbaBlue; Bool oldDoubleFlag = togl->DoubleFlag; Bool oldDepthFlag = togl->DepthFlag; int oldDepthSize = togl->DepthSize; Bool oldAccumFlag = togl->AccumFlag; int oldAccumRed = togl->AccumRed; int oldAccumGreen = togl->AccumGreen; int oldAccumBlue = togl->AccumBlue; int oldAccumAlpha = togl->AccumAlpha; Bool oldAlphaFlag = togl->AlphaFlag; int oldAlphaSize = togl->AlphaSize; Bool oldStencilFlag = togl->StencilFlag; int oldStencilSize = togl->StencilSize; int oldAuxNumber = togl->AuxNumber; int oldWidth = togl->Width; int oldHeight = togl->Height; int oldSetGrid = togl->SetGrid; if (Tk_ConfigureWidget(interp, togl->TkWin, configSpecs, argc, argv, WIDGREC togl, flags) == TCL_ERROR) { return (TCL_ERROR); } #ifndef USE_OVERLAY if (togl->OverlayFlag) { TCL_ERR(interp, "Sorry, overlay was disabled"); } #endif if (togl->Width != oldWidth || togl->Height != oldHeight || togl->SetGrid != oldSetGrid) { Togl_WorldChanged((ClientData) togl); /* this added per Lou Arata */ Tk_ResizeWindow(togl->TkWin, togl->Width, togl->Height); if (togl->ReshapeProc && #if defined(TOGL_WGL) togl->tglGLHglrc #elif defined(TOGL_X11) togl->GlCtx #elif defined(TOGL_AGL_CLASSIC) || defined(TOGL_AGL) togl->aglCtx #endif ) { Togl_MakeCurrent(togl); togl->ReshapeProc(togl); } } if (togl->RgbaFlag != oldRgbaFlag || togl->RgbaRed != oldRgbaRed || togl->RgbaGreen != oldRgbaGreen || togl->RgbaBlue != oldRgbaBlue || togl->DoubleFlag != oldDoubleFlag || togl->DepthFlag != oldDepthFlag || togl->DepthSize != oldDepthSize || togl->AccumFlag != oldAccumFlag || togl->AccumRed != oldAccumRed || togl->AccumGreen != oldAccumGreen || togl->AccumBlue != oldAccumBlue || togl->AccumAlpha != oldAccumAlpha || togl->AlphaFlag != oldAlphaFlag || togl->AlphaSize != oldAlphaSize || togl->StencilFlag != oldStencilFlag || togl->StencilSize != oldStencilSize || togl->AuxNumber != oldAuxNumber) { #ifdef MESA_COLOR_HACK free_default_color_cells(Tk_Display(togl->TkWin), Tk_Colormap(togl->TkWin)); #endif } #if defined(__sgi) oldStereoInit(togl, togl->OldStereoFlag); #endif return TCL_OK; } static int Togl_Widget(ClientData clientData, Tcl_Interp *interp, int argc, CONST84 char *argv[]) { Togl *togl = (Togl *) clientData; int result = TCL_OK; Tcl_HashEntry *entry; Tcl_HashSearch search; Togl_CmdProc *cmd_proc; if (argc < 2) { Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0], " ?options?\"", NULL); return TCL_ERROR; } Tk_Preserve((ClientData) togl); if (!strncmp(argv[1], "configure", MAX(1, strlen(argv[1])))) { if (argc == 2) { /* Return list of all configuration parameters */ result = Tk_ConfigureInfo(interp, togl->TkWin, configSpecs, WIDGREC togl, (char *) NULL, 0); } else if (argc == 3) { if (strcmp(argv[2], "-extensions") == 0) { /* Return a list of OpenGL extensions available */ const char *extensions; extensions = (const char *) glGetString(GL_EXTENSIONS); Tcl_SetResult(interp, TCL_STUPID extensions, TCL_STATIC); result = TCL_OK; } else { /* Return a specific configuration parameter */ result = Tk_ConfigureInfo(interp, togl->TkWin, configSpecs, WIDGREC togl, argv[2], 0); } } else { /* Execute a configuration change */ result = Togl_Configure(interp, togl, argc - 2, argv + 2, TK_CONFIG_ARGV_ONLY); } } else if (!strncmp(argv[1], "render", MAX(1, strlen(argv[1])))) { /* force the widget to be redrawn */ Togl_Render((ClientData) togl); } else if (!strncmp(argv[1], "swapbuffers", MAX(1, strlen(argv[1])))) { /* force the widget to be redrawn */ Togl_SwapBuffers(togl); } else if (!strncmp(argv[1], "makecurrent", MAX(1, strlen(argv[1])))) { /* force the widget to be redrawn */ Togl_MakeCurrent(togl); } #if TOGL_USE_FONTS == 1 else if (!strncmp(argv[1], "loadbitmapfont", MAX(1, strlen(argv[1])))) { if (argc == 3) { GLuint fontbase; Tcl_Obj *fontbaseAsTclObject; fontbase = Togl_LoadBitmapFont(togl, argv[2]); if (fontbase) { fontbaseAsTclObject = Tcl_NewIntObj(fontbase); Tcl_SetObjResult(interp, fontbaseAsTclObject); result = TCL_OK; } else { Tcl_AppendResult(interp, "Could not allocate font", NULL); result = TCL_ERROR; } } else { Tcl_AppendResult(interp, "wrong # args", NULL); result = TCL_ERROR; } } else if (!strncmp(argv[1], "unloadbitmapfont", MAX(1, strlen(argv[1])))) { if (argc == 3) { Togl_UnloadBitmapFont(togl, atoi(argv[2])); result = TCL_OK; } else { Tcl_AppendResult(interp, "wrong # args", NULL); result = TCL_ERROR; } } #endif /* TOGL_USE_FONTS */ else { /* Probably a user-defined function */ entry = Tcl_FindHashEntry(&CommandTable, argv[1]); if (entry != NULL) { cmd_proc = (Togl_CmdProc *) Tcl_GetHashValue(entry); result = cmd_proc(togl, argc, argv); } else { Tcl_AppendResult(interp, "Togl: Unknown option: ", argv[1], "\n", "Try: configure or render\n", "or one of the user-defined commands:\n", NULL); entry = Tcl_FirstHashEntry(&CommandTable, &search); while (entry) { Tcl_AppendResult(interp, " ", Tcl_GetHashKey(&CommandTable, entry), "\n", NULL); entry = Tcl_NextHashEntry(&search); } result = TCL_ERROR; } } Tk_Release((ClientData) togl); return result; } /* * Togl_Cmd * * Called when Togl is executed - creation of a Togl widget. * * Creates a new window * * Creates an 'Togl' data structure * * Creates an event handler for this window * * Creates a command that handles this object * * Configures this Togl for the given arguments */ static int Togl_Cmd(ClientData clientData, Tcl_Interp *interp, int argc, CONST84 char **argv) { const char *name; Tk_Window mainwin = (Tk_Window) clientData; Tk_Window tkwin; Togl *togl; if (argc <= 1) { TCL_ERR(interp, "wrong # args: should be \"pathName read filename\""); } /* Create the window. */ name = argv[1]; tkwin = Tk_CreateWindowFromPath(interp, mainwin, name, (char *) NULL); if (tkwin == NULL) { return TCL_ERROR; } Tk_SetClass(tkwin, "Togl"); /* Create Togl data structure */ togl = (Togl *) malloc(sizeof (Togl)); if (!togl) { return TCL_ERROR; } togl->Next = NULL; #if defined(TOGL_WGL) togl->tglGLHdc = NULL; togl->tglGLHglrc = NULL; #elif defined(TOGL_X11) togl->GlCtx = NULL; togl->OverlayCtx = NULL; #elif defined(TOGL_AGL_CLASSIC) || defined(TOGL_AGL) togl->aglCtx = NULL; #endif /* TOGL_WGL */ togl->display = Tk_Display(tkwin); togl->TkWin = tkwin; togl->Interp = interp; #ifndef NO_TK_CURSOR togl->Cursor = None; #endif togl->Width = 0; togl->Height = 0; togl->SetGrid = 0; togl->TimerInterval = 0; togl->RgbaFlag = True; togl->RgbaRed = 1; togl->RgbaGreen = 1; togl->RgbaBlue = 1; togl->DoubleFlag = False; togl->DepthFlag = False; togl->DepthSize = 1; togl->AccumFlag = False; togl->AccumRed = 1; togl->AccumGreen = 1; togl->AccumBlue = 1; togl->AccumAlpha = 1; togl->AlphaFlag = False; togl->AlphaSize = 1; togl->StencilFlag = False; togl->StencilSize = 1; togl->OverlayFlag = False; togl->StereoFlag = False; #ifdef __sgi togl->OldStereoFlag = False; #endif togl->AuxNumber = 0; togl->Indirect = False; togl->PixelFormat = 0; togl->UpdatePending = False; togl->OverlayUpdatePending = False; togl->CreateProc = DefaultCreateProc; togl->DisplayProc = DefaultDisplayProc; togl->ReshapeProc = DefaultReshapeProc; togl->DestroyProc = DefaultDestroyProc; togl->TimerProc = DefaultTimerProc; togl->OverlayDisplayProc = DefaultOverlayDisplayProc; togl->ShareList = NULL; togl->ShareContext = NULL; togl->Ident = NULL; togl->Client_Data = DefaultClientData; /* for EPS Output */ togl->EpsRedMap = togl->EpsGreenMap = togl->EpsBlueMap = NULL; togl->EpsMapSize = 0; /* Create command event handler */ togl->widgetCmd = Tcl_CreateCommand(interp, Tk_PathName(tkwin), Togl_Widget, (ClientData) togl, (Tcl_CmdDeleteProc *) ToglCmdDeletedProc); /* * Setup the Tk_ClassProcs callbacks to point at our own window creation * function * * We need to check at runtime if we should use the new Tk_SetClassProcs() * API or if we need to modify the window structure directly */ #ifdef HAVE_TK_SETCLASSPROCS if (SetClassProcsPtr != NULL) { /* use public API (Tk 8.4+) */ Tk_ClassProcs *procsPtr; procsPtr = (Tk_ClassProcs *) Tcl_Alloc(sizeof (Tk_ClassProcs)); procsPtr->size = sizeof (Tk_ClassProcs); procsPtr->createProc = Togl_CreateWindow; procsPtr->worldChangedProc = Togl_WorldChanged; procsPtr->modalProc = NULL; /* Tk_SetClassProcs(togl->TkWin,procsPtr,(ClientData)togl); */ (SetClassProcsPtr) (togl->TkWin, procsPtr, (ClientData) togl); } else #endif { /* use private API */ /* * We need to set these fields in the Tk_FakeWin structure: dummy17 = * classProcsPtr dummy18 = instanceData */ TkClassProcs *procsPtr; Tk_FakeWin *winPtr = (Tk_FakeWin *) (togl->TkWin); procsPtr = (TkClassProcs *) Tcl_Alloc(sizeof (TkClassProcs)); procsPtr->createProc = Togl_CreateWindow; procsPtr->geometryProc = Togl_WorldChanged; procsPtr->modalProc = NULL; winPtr->dummy17 = (char *) procsPtr; winPtr->dummy18 = (ClientData) togl; } Tk_CreateEventHandler(tkwin, ExposureMask | StructureNotifyMask, Togl_EventProc, (ClientData) togl); /* Configure Togl widget */ if (Togl_Configure(interp, togl, argc - 2, argv + 2, 0) == TCL_ERROR) { Tk_DestroyWindow(tkwin); Tcl_AppendResult(interp, "Couldn't configure togl widget\n", NULL); goto error; } /* * If OpenGL window wasn't already created by Togl_Configure() we * create it now. We can tell by checking if the GLX context has * been initialized. */ if (! #if defined(TOGL_WGL) togl->tglGLHdc #elif defined(TOGL_X11) togl->GlCtx #elif defined(TOGL_AGL_CLASSIC) || defined(TOGL_AGL) togl->aglCtx #endif ) { Tk_MakeWindowExist(togl->TkWin); if (Tk_WindowId(togl->TkWin) == DUMMY_WINDOW) { return TCL_ERROR; } Togl_MakeCurrent(togl); } /* If defined, call create callback */ if (togl->CreateProc) { togl->CreateProc(togl); } /* If defined, call reshape proc */ if (togl->ReshapeProc) { togl->ReshapeProc(togl); } /* If defined, setup timer */ if (togl->TimerProc) { (void) Tk_CreateTimerHandler(togl->TimerInterval, Togl_Timer, (ClientData) togl); } Tcl_AppendResult(interp, Tk_PathName(tkwin), NULL); /* Add to linked list */ AddToList(togl); return TCL_OK; error: (void) Tcl_DeleteCommand(interp, "togl"); /* free(togl); Don't free it, if we do a crash occurs later... */ return TCL_ERROR; } #ifdef USE_OVERLAY /* * Do all the setup for overlay planes * Return: TCL_OK or TCL_ERROR */ static int SetupOverlay(Togl *togl) { # if defined(TOGL_X11) # ifdef GLX_TRANSPARENT_TYPE_EXT static int ovAttributeList[] = { GLX_BUFFER_SIZE, 2, GLX_LEVEL, 1, GLX_TRANSPARENT_TYPE_EXT, GLX_TRANSPARENT_INDEX_EXT, None }; # else static int ovAttributeList[] = { GLX_BUFFER_SIZE, 2, GLX_LEVEL, 1, None }; # endif Display *dpy; XVisualInfo *visinfo; TkWindow *winPtr = (TkWindow *) togl->TkWin; XSetWindowAttributes swa; Tcl_HashEntry *hPtr; int new_flag; dpy = Tk_Display(togl->TkWin); visinfo = glXChooseVisual(dpy, Tk_ScreenNumber(winPtr), ovAttributeList); if (!visinfo) { Tcl_AppendResult(togl->Interp, Tk_PathName(winPtr), ": No suitable overlay index visual available", (char *) NULL); togl->OverlayCtx = 0; togl->OverlayWindow = 0; togl->OverlayCmap = 0; return TCL_ERROR; } # ifdef GLX_TRANSPARENT_INDEX_EXT { int fail = glXGetConfig(dpy, visinfo, GLX_TRANSPARENT_INDEX_VALUE_EXT, &togl->OverlayTransparentPixel); if (fail) togl->OverlayTransparentPixel = 0; /* maybe, maybe ... */ } # else togl->OverlayTransparentPixel = 0; /* maybe, maybe ... */ # endif /* share display lists with normal layer context */ togl->OverlayCtx = glXCreateContext(dpy, visinfo, togl->GlCtx, !togl->Indirect); swa.colormap = XCreateColormap(dpy, XRootWindow(dpy, visinfo->screen), visinfo->visual, AllocNone); togl->OverlayCmap = swa.colormap; swa.border_pixel = 0; swa.event_mask = ALL_EVENTS_MASK; togl->OverlayWindow = XCreateWindow(dpy, Tk_WindowId(togl->TkWin), 0, 0, togl->Width, togl->Height, 0, visinfo->depth, InputOutput, visinfo->visual, CWBorderPixel | CWColormap | CWEventMask, &swa); hPtr = Tcl_CreateHashEntry(&winPtr->dispPtr->winTable, (char *) togl->OverlayWindow, &new_flag); Tcl_SetHashValue(hPtr, winPtr); /* XMapWindow( dpy, togl->OverlayWindow ); */ togl->OverlayIsMapped = False; /* Make sure window manager installs our colormap */ XSetWMColormapWindows(dpy, togl->OverlayWindow, &togl->OverlayWindow, 1); return TCL_OK; # elif defined(TOGL_WGL) || defined(TOGL_AGL_CLASSIC) || defined(TOGL_AGL) /* not yet implemented on these */ return TCL_ERROR; # endif } #endif /* USE_OVERLAY */ #ifdef TOGL_WGL # define TOGL_CLASS_NAME "Togl Class" static Bool ToglClassInitialized = False; static LRESULT CALLBACK Win32WinProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { LONG result; Togl *togl = (Togl *) GetWindowLong(hwnd, 0); WNDCLASS childClass; switch (message) { case WM_WINDOWPOSCHANGED: /* Should be processed by DefWindowProc, otherwise a double buffered * context is not properly resized when the corresponding window is * resized. */ break; case WM_DESTROY: if (togl->tglGLHglrc) { wglDeleteContext(togl->tglGLHglrc); } if (togl->tglGLHdc) { ReleaseDC(hwnd, togl->tglGLHdc); } free(togl); break; default: # if USE_STATIC_LIB return TkWinChildProc(hwnd, message, wParam, lParam); # else /* * OK, since TkWinChildProc is not explicitly exported in the * dynamic libraries, we have to retrieve it from the class info * registered with windows. * */ if (tkWinChildProc == NULL) { GetClassInfo(Tk_GetHINSTANCE(), TK_WIN_CHILD_CLASS_NAME, &childClass); tkWinChildProc = childClass.lpfnWndProc; } return tkWinChildProc(hwnd, message, wParam, lParam); # endif } result = DefWindowProc(hwnd, message, wParam, lParam); Tcl_ServiceAll(); return result; } #endif /* TOGL_WGL */ /* * Togl_CreateWindow * * Window creation function, invoked as a callback from Tk_MakeWindowExist. * Creates an OpenGL window for the Togl widget. */ static Window Togl_CreateWindow(Tk_Window tkwin, Window parent, ClientData instanceData) { Togl *togl = (Togl *) instanceData; XVisualInfo *visinfo = NULL; Display *dpy; Colormap cmap; int scrnum; Window window; #if defined(TOGL_X11) Bool directCtx = True; int attrib_list[1000]; int attrib_count; int dummy; XSetWindowAttributes swa; # define MAX_ATTEMPTS 12 static int ci_depths[MAX_ATTEMPTS] = { 8, 4, 2, 1, 12, 16, 8, 4, 2, 1, 12, 16 }; static int dbl_flags[MAX_ATTEMPTS] = { 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1 }; #elif defined(TOGL_WGL) HWND hwnd, parentWin; int pixelformat; HANDLE hInstance; WNDCLASS ToglClass; PIXELFORMATDESCRIPTOR pfd; XVisualInfo VisInf; #elif defined(TOGL_AGL_CLASSIC) || defined(TOGL_AGL) GLint attribs[20]; int na; AGLPixelFormat fmt; XVisualInfo VisInf; #endif /* TOGL_X11 */ dpy = Tk_Display(togl->TkWin); #if defined(TOGL_X11) /* Make sure OpenGL's GLX extension supported */ if (!glXQueryExtension(dpy, &dummy, &dummy)) { Tcl_SetResult(togl->Interp, TCL_STUPID "Togl: X server has no OpenGL GLX extension", TCL_STATIC); return DUMMY_WINDOW; } if (togl->ShareContext && FindTogl(togl->ShareContext)) { /* share OpenGL context with existing Togl widget */ Togl *shareWith = FindTogl(togl->ShareContext); assert(shareWith != NULL); assert(shareWith->GlCtx != NULL); togl->GlCtx = shareWith->GlCtx; togl->VisInfo = shareWith->VisInfo; visinfo = togl->VisInfo; } else { if (togl->PixelFormat) { XVisualInfo template; int count = 1; template.visualid = togl->PixelFormat; visinfo = XGetVisualInfo(dpy, VisualIDMask, &template, &count); if (visinfo == NULL) { Tcl_SetResult(togl->Interp, TCL_STUPID "Togl: couldn't choose pixel format", TCL_STATIC); return DUMMY_WINDOW; } /* fill in flags normally passed in that affect behavior */ (void) glXGetConfig(dpy, visinfo, GLX_RGBA, &togl->RgbaFlag); (void) glXGetConfig(dpy, visinfo, GLX_DOUBLEBUFFER, &togl->DoubleFlag); (void) glXGetConfig(dpy, visinfo, GLX_STEREO, &togl->StereoFlag); } else { int attempt; /* It may take a few tries to get a visual */ for (attempt = 0; attempt < MAX_ATTEMPTS; attempt++) { attrib_count = 0; attrib_list[attrib_count++] = GLX_USE_GL; if (togl->RgbaFlag) { /* RGB[A] mode */ attrib_list[attrib_count++] = GLX_RGBA; attrib_list[attrib_count++] = GLX_RED_SIZE; attrib_list[attrib_count++] = togl->RgbaRed; attrib_list[attrib_count++] = GLX_GREEN_SIZE; attrib_list[attrib_count++] = togl->RgbaGreen; attrib_list[attrib_count++] = GLX_BLUE_SIZE; attrib_list[attrib_count++] = togl->RgbaBlue; if (togl->AlphaFlag) { attrib_list[attrib_count++] = GLX_ALPHA_SIZE; attrib_list[attrib_count++] = togl->AlphaSize; } /* for EPS Output */ if (togl->EpsRedMap) free(togl->EpsRedMap); if (togl->EpsGreenMap) free(togl->EpsGreenMap); if (togl->EpsBlueMap) free(togl->EpsBlueMap); togl->EpsRedMap = togl->EpsGreenMap = togl->EpsBlueMap = NULL; togl->EpsMapSize = 0; } else { /* Color index mode */ int depth; attrib_list[attrib_count++] = GLX_BUFFER_SIZE; depth = ci_depths[attempt]; attrib_list[attrib_count++] = depth; } if (togl->DepthFlag) { attrib_list[attrib_count++] = GLX_DEPTH_SIZE; attrib_list[attrib_count++] = togl->DepthSize; } if (togl->DoubleFlag || dbl_flags[attempt]) { attrib_list[attrib_count++] = GLX_DOUBLEBUFFER; } if (togl->StencilFlag) { attrib_list[attrib_count++] = GLX_STENCIL_SIZE; attrib_list[attrib_count++] = togl->StencilSize; } if (togl->AccumFlag) { attrib_list[attrib_count++] = GLX_ACCUM_RED_SIZE; attrib_list[attrib_count++] = togl->AccumRed; attrib_list[attrib_count++] = GLX_ACCUM_GREEN_SIZE; attrib_list[attrib_count++] = togl->AccumGreen; attrib_list[attrib_count++] = GLX_ACCUM_BLUE_SIZE; attrib_list[attrib_count++] = togl->AccumBlue; if (togl->AlphaFlag) { attrib_list[attrib_count++] = GLX_ACCUM_ALPHA_SIZE; attrib_list[attrib_count++] = togl->AccumAlpha; } } if (togl->AuxNumber != 0) { attrib_list[attrib_count++] = GLX_AUX_BUFFERS; attrib_list[attrib_count++] = togl->AuxNumber; } if (togl->Indirect) { directCtx = False; } if (togl->StereoFlag) { attrib_list[attrib_count++] = GLX_STEREO; } attrib_list[attrib_count++] = None; visinfo = glXChooseVisual(dpy, Tk_ScreenNumber(togl->TkWin), attrib_list); if (visinfo) { /* found a GLX visual! */ break; } } togl->VisInfo = visinfo; if (visinfo == NULL) { Tcl_SetResult(togl->Interp, TCL_STUPID "Togl: couldn't get visual", TCL_STATIC); return DUMMY_WINDOW; } /* * Create a new OpenGL rendering context. */ if (togl->ShareList) { /* share display lists with existing togl widget */ Togl *shareWith = FindTogl(togl->ShareList); GLXContext shareCtx; if (shareWith) shareCtx = shareWith->GlCtx; else shareCtx = None; togl->GlCtx = glXCreateContext(dpy, visinfo, shareCtx, directCtx); } else { /* don't share display lists */ togl->GlCtx = glXCreateContext(dpy, visinfo, None, directCtx); } if (togl->GlCtx == NULL) { Tcl_SetResult(togl->Interp, TCL_STUPID "could not create rendering context", TCL_STATIC); return DUMMY_WINDOW; } } } #endif /* TOGL_X11 */ #ifdef TOGL_WGL parentWin = Tk_GetHWND(parent); hInstance = Tk_GetHINSTANCE(); if (!ToglClassInitialized) { ToglClassInitialized = True; ToglClass.style = CS_HREDRAW | CS_VREDRAW; ToglClass.cbClsExtra = 0; ToglClass.cbWndExtra = 4; /* to save struct Togl* */ ToglClass.hInstance = hInstance; ToglClass.hbrBackground = NULL; ToglClass.lpszMenuName = NULL; ToglClass.lpszClassName = TOGL_CLASS_NAME; ToglClass.lpfnWndProc = Win32WinProc; ToglClass.hIcon = NULL; ToglClass.hCursor = NULL; if (!RegisterClass(&ToglClass)) { Tcl_SetResult(togl->Interp, TCL_STUPID "unable register Togl window class", TCL_STATIC); return DUMMY_WINDOW; } } hwnd = CreateWindow(TOGL_CLASS_NAME, NULL, WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS, 0, 0, togl->Width, togl->Height, parentWin, NULL, hInstance, NULL); SetWindowLong(hwnd, 0, (LONG) togl); SetWindowPos(hwnd, HWND_TOP, 0, 0, 0, 0, SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE); togl->tglGLHdc = GetDC(hwnd); pfd.nSize = sizeof (PIXELFORMATDESCRIPTOR); pfd.nVersion = 1; pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL; if (togl->DoubleFlag) { pfd.dwFlags |= PFD_DOUBLEBUFFER; } /* The stereo flag is not supported in the current generic OpenGL * implementation, but may be supported by specific hardware devices. */ if (togl->StereoFlag) { pfd.dwFlags |= PFD_STEREO; } if (togl->PixelFormat) { pixelformat = togl->PixelFormat; } else { pfd.cColorBits = togl->RgbaRed + togl->RgbaGreen + togl->RgbaBlue; pfd.iPixelType = togl->RgbaFlag ? PFD_TYPE_RGBA : PFD_TYPE_COLORINDEX; /* Alpha bitplanes are not supported in the current generic OpenGL * implementation, but may be supported by specific hardware devices. */ pfd.cAlphaBits = togl->AlphaFlag ? togl->AlphaSize : 0; pfd.cAccumBits = togl->AccumFlag ? (togl->AccumRed + togl->AccumGreen + togl->AccumBlue + togl->AccumAlpha) : 0; pfd.cDepthBits = togl->DepthFlag ? togl->DepthSize : 0; pfd.cStencilBits = togl->StencilFlag ? togl->StencilSize : 0; /* Auxiliary buffers are not supported in the current generic OpenGL * implementation, but may be supported by specific hardware devices. */ pfd.cAuxBuffers = togl->AuxNumber; pfd.iLayerType = PFD_MAIN_PLANE; if ((pixelformat = ChoosePixelFormat(togl->tglGLHdc, &pfd)) == 0) { Tcl_SetResult(togl->Interp, TCL_STUPID "Togl: couldn't choose pixel format", TCL_STATIC); return DUMMY_WINDOW; } } if (SetPixelFormat(togl->tglGLHdc, pixelformat, &pfd) == FALSE) { Tcl_SetResult(togl->Interp, TCL_STUPID "Togl: couldn't choose pixel format", TCL_STATIC); return DUMMY_WINDOW; } /* Get the actual pixel format */ DescribePixelFormat(togl->tglGLHdc, pixelformat, sizeof (pfd), &pfd); if (togl->PixelFormat) { /* fill in flags normally passed in that affect behavior */ togl->RgbaFlag = pfd.iPixelType == PFD_TYPE_RGBA; togl->DoubleFlag = pfd.cDepthBits > 0; togl->StereoFlag = (pfd.dwFlags & PFD_STEREO) != 0; // TODO: set depth flag, and more } else if (togl->StereoFlag && (pfd.dwFlags & PFD_STEREO) == 0) { Tcl_SetResult(togl->Interp, TCL_STUPID "Togl: couldn't choose stereo pixel format", TCL_STATIC); return DUMMY_WINDOW; } if (togl->ShareContext && FindTogl(togl->ShareContext)) { /* share OpenGL context with existing Togl widget */ Togl *shareWith = FindTogl(togl->ShareContext); assert(shareWith); assert(shareWith->tglGLHglrc); togl->tglGLHglrc = shareWith->tglGLHglrc; togl->VisInfo = shareWith->VisInfo; visinfo = togl->VisInfo; } else { /* * Create a new OpenGL rendering context. And check to share lists. */ togl->tglGLHglrc = wglCreateContext(togl->tglGLHdc); if (togl->ShareList) { /* share display lists with existing togl widget */ Togl *shareWith = FindTogl(togl->ShareList); if (shareWith) wglShareLists(shareWith->tglGLHglrc, togl->tglGLHglrc); } if (!togl->tglGLHglrc) { Tcl_SetResult(togl->Interp, TCL_STUPID "could not create rendering context", TCL_STATIC); return DUMMY_WINDOW; } /* Just for portability, define the simplest visinfo */ visinfo = &VisInf; visinfo->visual = DefaultVisual(dpy, DefaultScreen(dpy)); visinfo->depth = visinfo->visual->bits_per_rgb; togl->VisInfo = visinfo; } #endif /* TOGL_WGL */ /* * find a colormap */ scrnum = Tk_ScreenNumber(togl->TkWin); if (togl->RgbaFlag) { /* Colormap for RGB mode */ #if defined(TOGL_X11) cmap = get_rgb_colormap(dpy, scrnum, visinfo, togl->TkWin); #elif defined(TOGL_WGL) if (pfd.dwFlags & PFD_NEED_PALETTE) { cmap = Win32CreateRgbColormap(pfd); } else { cmap = DefaultColormap(dpy, scrnum); } /* for EPS Output */ if (togl->EpsRedMap) free(togl->EpsRedMap); if (togl->EpsGreenMap) free(togl->EpsGreenMap); if (togl->EpsBlueMap) free(togl->EpsBlueMap); togl->EpsRedMap = togl->EpsGreenMap = togl->EpsBlueMap = NULL; togl->EpsMapSize = 0; #elif defined(TOGL_AGL_CLASSIC) || defined(TOGL_AGL) cmap = DefaultColormap(dpy, scrnum); /* for EPS Output */ if (togl->EpsRedMap) free(togl->EpsRedMap); if (togl->EpsGreenMap) free(togl->EpsGreenMap); if (togl->EpsBlueMap) free(togl->EpsBlueMap); togl->EpsRedMap = togl->EpsGreenMap = togl->EpsBlueMap = NULL; togl->EpsMapSize = 0; #endif /* TOGL_X11 */ } else { /* Colormap for CI mode */ #ifdef TOGL_WGL togl->CiColormapSize = 1 << pfd.cColorBits; togl->CiColormapSize = togl->CiColormapSize < MAX_CI_COLORMAP_SIZE ? togl->CiColormapSize : MAX_CI_COLORMAP_SIZE; #endif /* TOGL_WGL */ if (togl->PrivateCmapFlag) { /* need read/write colormap so user can store own color entries */ #if defined(TOGL_X11) cmap = XCreateColormap(dpy, XRootWindow(dpy, visinfo->screen), visinfo->visual, AllocAll); #elif defined(TOGL_WGL) cmap = Win32CreateCiColormap(togl); #elif defined(TOGL_AGL_CLASSIC) || defined(TOGL_AGL) /* need to figure out how to do this correctly on Mac... */ cmap = DefaultColormap(dpy, scrnum); #endif /* TOGL_X11 */ } else { if (visinfo->visual == DefaultVisual(dpy, scrnum)) { /* share default/root colormap */ cmap = Tk_Colormap(togl->TkWin); } else { /* make a new read-only colormap */ cmap = XCreateColormap(dpy, XRootWindow(dpy, visinfo->screen), visinfo->visual, AllocNone); } } } #if !defined(TOGL_AGL) /* Make sure Tk knows to switch to the new colormap when the cursor is over * this window when running in color index mode. */ (void) Tk_SetWindowVisual(togl->TkWin, visinfo->visual, visinfo->depth, cmap); #endif #ifdef TOGL_WGL /* Install the colormap */ SelectPalette(togl->tglGLHdc, ((TkWinColormap *) cmap)->palette, TRUE); RealizePalette(togl->tglGLHdc); #endif /* TOGL_WGL */ #if defined(TOGL_X11) swa.colormap = cmap; swa.border_pixel = 0; swa.event_mask = ALL_EVENTS_MASK; window = XCreateWindow(dpy, parent, 0, 0, togl->Width, togl->Height, 0, visinfo->depth, InputOutput, visinfo->visual, CWBorderPixel | CWColormap | CWEventMask, &swa); /* Make sure window manager installs our colormap */ (void) XSetWMColormapWindows(dpy, window, &window, 1); #elif defined(TOGL_WGL) window = Tk_AttachHWND(togl->TkWin, hwnd); #elif defined(TOGL_AGL_CLASSIC) || defined(TOGL_AGL) { TkWindow *winPtr = (TkWindow *) togl->TkWin; window = TkpMakeWindow(winPtr, parent); } #endif /* TOGL_X11 */ #ifdef USE_OVERLAY if (togl->OverlayFlag) { if (SetupOverlay(togl) == TCL_ERROR) { fprintf(stderr, "Warning: couldn't setup overlay.\n"); togl->OverlayFlag = False; } } #endif /* USE_OVERLAY */ /* Request the X window to be displayed */ (void) XMapWindow(dpy, window); #if defined(TOGL_AGL_CLASSIC) || defined(TOGL_AGL) if (togl->ShareContext && FindTogl(togl->ShareContext)) { /* share OpenGL context with existing Togl widget */ Togl *shareWith = FindTogl(togl->ShareContext); assert(shareWith); assert(shareWith->aglCtx); togl->aglCtx = shareWith->aglCtx; togl->VisInfo = shareWith->VisInfo; visinfo = togl->VisInfo; } else { AGLContext shareCtx = NULL; if (togl->PixelFormat) { /* fill in RgbaFlag, DoubleFlag, and StereoFlag */ fmt = (AGLPixelFormat) togl->PixelFormat; GLint has_rgba, has_doublebuf, has_stereo; if (aglDescribePixelFormat(fmt, AGL_RGBA, &has_rgba) && aglDescribePixelFormat(fmt, AGL_DOUBLEBUFFER, &has_doublebuf) && aglDescribePixelFormat(fmt, AGL_STEREO, &has_stereo)) { togl->RgbaFlag = (has_rgba ? True : False); togl->DoubleFlag = (has_doublebuf ? True : False); togl->StereoFlag = (has_stereo ? True : False); } else { Tcl_SetResult(togl->Interp, TCL_STUPID "Togl: failed querying pixel format attributes", TCL_STATIC); return DUMMY_WINDOW; } } else { /* Need to do this after mapping window, so MacDrawable structure * is more completely filled in */ na = 0; attribs[na++] = AGL_MINIMUM_POLICY; attribs[na++] = AGL_ROBUST; if (togl->RgbaFlag) { /* RGB[A] mode */ attribs[na++] = AGL_RGBA; attribs[na++] = AGL_RED_SIZE; attribs[na++] = togl->RgbaRed; attribs[na++] = AGL_GREEN_SIZE; attribs[na++] = togl->RgbaGreen; attribs[na++] = AGL_BLUE_SIZE; attribs[na++] = togl->RgbaBlue; if (togl->AlphaFlag) { attribs[na++] = AGL_ALPHA_SIZE; attribs[na++] = togl->AlphaSize; } } else { /* Color index mode */ attribs[na++] = AGL_BUFFER_SIZE; attribs[na++] = 8; } if (togl->DepthFlag) { attribs[na++] = AGL_DEPTH_SIZE; attribs[na++] = togl->DepthSize; } if (togl->DoubleFlag) { attribs[na++] = AGL_DOUBLEBUFFER; } if (togl->StencilFlag) { attribs[na++] = AGL_STENCIL_SIZE; attribs[na++] = togl->StencilSize; } if (togl->AccumFlag) { attribs[na++] = AGL_ACCUM_RED_SIZE; attribs[na++] = togl->AccumRed; attribs[na++] = AGL_ACCUM_GREEN_SIZE; attribs[na++] = togl->AccumGreen; attribs[na++] = AGL_ACCUM_BLUE_SIZE; attribs[na++] = togl->AccumBlue; if (togl->AlphaFlag) { attribs[na++] = AGL_ACCUM_ALPHA_SIZE; attribs[na++] = togl->AccumAlpha; } } if (togl->AuxNumber != 0) { attribs[na++] = AGL_AUX_BUFFERS; attribs[na++] = togl->AuxNumber; } attribs[na++] = AGL_NONE; if ((fmt = aglChoosePixelFormat(NULL, 0, attribs)) == NULL) { Tcl_SetResult(togl->Interp, TCL_STUPID "Togl: couldn't choose pixel format", TCL_STATIC); return DUMMY_WINDOW; } } /* * Check whether to share lists. */ if (togl->ShareList) { /* share display lists with existing togl widget */ Togl *shareWith = FindTogl(togl->ShareList); if (shareWith) shareCtx = shareWith->aglCtx; } if ((togl->aglCtx = aglCreateContext(fmt, shareCtx)) == NULL) { GLenum err = aglGetError(); aglDestroyPixelFormat(fmt); if (err == AGL_BAD_MATCH) Tcl_SetResult(togl->Interp, TCL_STUPID "Togl: couldn't create context, shared context doesn't match", TCL_STATIC); else if (err == AGL_BAD_CONTEXT) Tcl_SetResult(togl->Interp, TCL_STUPID "Togl: couldn't create context, bad shared context", TCL_STATIC); else if (err == AGL_BAD_PIXELFMT) Tcl_SetResult(togl->Interp, TCL_STUPID "Togl: couldn't create context, bad pixel format", TCL_STATIC); else Tcl_SetResult(togl->Interp, TCL_STUPID "Togl: couldn't create context, unknown reason", TCL_STATIC); return DUMMY_WINDOW; } aglDestroyPixelFormat(fmt); if (!aglSetDrawable(togl->aglCtx, # if defined(TOGL_AGL) ((MacDrawable *) (window))->toplevel->grafPtr # else ((MacDrawable *) (window))->toplevel->portPtr # endif )) { aglDestroyContext(togl->aglCtx); Tcl_SetResult(togl->Interp, TCL_STUPID "Togl: couldn't set drawable", TCL_STATIC); return DUMMY_WINDOW; } /* Just for portability, define the simplest visinfo */ visinfo = &VisInf; visinfo->visual = DefaultVisual(dpy, DefaultScreen(dpy)); visinfo->depth = visinfo->visual->bits_per_rgb; Tk_SetWindowVisual(togl->TkWin, visinfo->visual, visinfo->depth, cmap); } #endif /* TOGL_AGL_CLASSIC || TOGL_AGL */ #if defined(TOGL_X11) /* Check for a single/double buffering snafu */ { int dbl_flag; if (glXGetConfig(dpy, visinfo, GLX_DOUBLEBUFFER, &dbl_flag)) { if (!togl->DoubleFlag && dbl_flag) { /* We requested single buffering but had to accept a */ /* double buffered visual. Set the GL draw buffer to */ /* be the front buffer to simulate single buffering. */ glDrawBuffer(GL_FRONT); } } } #endif /* TOGL_X11 */ /* for EPS Output */ if (!togl->RgbaFlag) { int index_size; #if defined(TOGL_X11) || defined(TOGL_AGL_CLASSIC) || defined(TOGL_AGL) GLint index_bits; glGetIntegerv(GL_INDEX_BITS, &index_bits); index_size = 1 << index_bits; #elif defined(TOGL_WGL) index_size = togl->CiColormapSize; #endif /* TOGL_X11 */ if (togl->EpsMapSize != index_size) { if (togl->EpsRedMap) free(togl->EpsRedMap); if (togl->EpsGreenMap) free(togl->EpsGreenMap); if (togl->EpsBlueMap) free(togl->EpsBlueMap); togl->EpsMapSize = index_size; togl->EpsRedMap = (GLfloat *) calloc(index_size, sizeof (GLfloat)); togl->EpsGreenMap = (GLfloat *) calloc(index_size, sizeof (GLfloat)); togl->EpsBlueMap = (GLfloat *) calloc(index_size, sizeof (GLfloat)); } } return window; } /* * Togl_WorldChanged * * Add support for setgrid option. */ static void Togl_WorldChanged(ClientData instanceData) { Togl *togl = (Togl *) instanceData; Tk_GeometryRequest(togl->TkWin, togl->Width, togl->Height); Tk_SetInternalBorder(togl->TkWin, 0); if (togl->SetGrid > 0) { Tk_SetGrid(togl->TkWin, togl->Width / togl->SetGrid, togl->Height / togl->SetGrid, togl->SetGrid, togl->SetGrid); } else { Tk_UnsetGrid(togl->TkWin); } } /* * ToglCmdDeletedProc * * This procedure is invoked when a widget command is deleted. If * the widget isn't already in the process of being destroyed, * this command destroys it. * * Results: * None. * * Side effects: * The widget is destroyed. * *---------------------------------------------------------------------- */ static void ToglCmdDeletedProc(ClientData clientData) { Togl *togl = (Togl *) clientData; Tk_Window tkwin = togl->TkWin; /* * This procedure could be invoked either because the window was * destroyed and the command was then deleted (in which case tkwin * is NULL) or because the command was deleted, and then this procedure * destroys the widget. */ if (togl && tkwin) { Tk_DeleteEventHandler(tkwin, ExposureMask | StructureNotifyMask, Togl_EventProc, (ClientData) togl); } #if defined(TOGL_X11) if (togl->GlCtx) { if (FindToglWithSameContext(togl) == NULL) glXDestroyContext(togl->display, togl->GlCtx); togl->GlCtx = NULL; } # ifdef USE_OVERLAY if (togl->OverlayCtx) { Tcl_HashEntry *entryPtr; TkWindow *winPtr = (TkWindow *) togl->TkWin; if (winPtr) { entryPtr = Tcl_FindHashEntry(&winPtr->dispPtr->winTable, (char *) togl->OverlayWindow); Tcl_DeleteHashEntry(entryPtr); } if (FindToglWithSameOverlayContext(togl) == NULL) glXDestroyContext(togl->display, togl->OverlayCtx); togl->OverlayCtx = NULL; } # endif /* USE_OVERLAY */ #endif /* TODO: delete contexts on other platforms */ if (tkwin != NULL) { if (togl->SetGrid > 0) { Tk_UnsetGrid(tkwin); } togl->TkWin = NULL; Tk_DestroyWindow(tkwin); } } /* * Togl_Destroy * * Gets called when an Togl widget is destroyed. */ static void Togl_Destroy( #if (TK_MAJOR_VERSION * 100 + TK_MINOR_VERSION) >= 401 char * #else ClientData #endif clientData) { Togl *togl = (Togl *) clientData; Tk_FreeOptions(configSpecs, WIDGREC togl, togl->display, 0); #ifndef NO_TK_CURSOR if (togl->Cursor != None) { Tk_FreeCursor(togl->display, togl->Cursor); } #endif if (togl->DestroyProc) { togl->DestroyProc(togl); } /* remove from linked list */ RemoveFromList(togl); #if !defined(TOGL_WGL) /* TODO: why not on Windows? */ free(togl); #endif } /* * This gets called to handle Togl window configuration events */ static void Togl_EventProc(ClientData clientData, XEvent *eventPtr) { Togl *togl = (Togl *) clientData; switch (eventPtr->type) { case Expose: if (eventPtr->xexpose.count == 0) { if (!togl->UpdatePending && eventPtr->xexpose.window == Tk_WindowId(togl->TkWin)) { Togl_PostRedisplay(togl); } #if defined(TOGL_X11) if (!togl->OverlayUpdatePending && togl->OverlayFlag && togl->OverlayIsMapped && eventPtr->xexpose.window == togl->OverlayWindow) { Togl_PostOverlayRedisplay(togl); } #endif /* TOGL_X11 */ } break; case ConfigureNotify: if (togl->Width != Tk_Width(togl->TkWin) || togl->Height != Tk_Height(togl->TkWin)) { togl->Width = Tk_Width(togl->TkWin); togl->Height = Tk_Height(togl->TkWin); (void) XResizeWindow(Tk_Display(togl->TkWin), Tk_WindowId(togl->TkWin), togl->Width, togl->Height); #if defined(TOGL_X11) if (togl->OverlayFlag) { (void) XResizeWindow(Tk_Display(togl->TkWin), togl->OverlayWindow, togl->Width, togl->Height); (void) XRaiseWindow(Tk_Display(togl->TkWin), togl->OverlayWindow); } #endif /* TOGL_X11 */ Togl_MakeCurrent(togl); if (togl->ReshapeProc) { togl->ReshapeProc(togl); } else { glViewport(0, 0, togl->Width, togl->Height); #if defined(TOGL_X11) if (togl->OverlayFlag) { Togl_UseLayer(togl, TOGL_OVERLAY); glViewport(0, 0, togl->Width, togl->Height); Togl_UseLayer(togl, TOGL_NORMAL); } #endif /* TOGL_X11 */ } #ifndef TOGL_WGL /* causes double redisplay on Win32 platform */ Togl_PostRedisplay(togl); #endif /* TOGL_WGL */ } break; case MapNotify: #if defined(TOGL_AGL) { /* * See comment for the UnmapNotify case below. */ AGLDrawable d = TkMacOSXGetDrawablePort(Tk_WindowId(togl->TkWin)); aglSetDrawable(togl->aglCtx, d); } #endif /* TOGL_AGL */ break; case UnmapNotify: #if defined(TOGL_AGL) { /* * For Mac OS X Aqua, Tk subwindows are not implemented as * separate Aqua windows. They are just different regions of * a single Aqua window. To unmap them they are just not drawn. * Have to disconnect the AGL context otherwise they will continue * to be displayed directly by Aqua. */ aglSetDrawable(togl->aglCtx, NULL); } #endif /* TOGL_AGL */ break; case DestroyNotify: if (togl->TkWin != NULL) { if (togl->SetGrid > 0) { Tk_UnsetGrid(togl->TkWin); } togl->TkWin = NULL; #if (TCL_MAJOR_VERSION * 100 + TCL_MINOR_VERSION) >= 800 /* This function new in Tcl/Tk 8.0 */ (void) Tcl_DeleteCommandFromToken(togl->Interp, togl->widgetCmd); #endif } if (togl->TimerProc != NULL) { #if (TK_MAJOR_VERSION * 100 + TK_MINOR_VERSION) >= 401 Tcl_DeleteTimerHandler(togl->timerHandler); #else Tk_DeleteTimerHandler(togl->timerHandler); #endif } if (togl->UpdatePending) { #if (TCL_MAJOR_VERSION * 100 + TCL_MINOR_VERSION) >= 705 Tcl_CancelIdleCall(Togl_Render, (ClientData) togl); #else Tk_CancelIdleCall(Togl_Render, (ClientData) togl); #endif } #if (TK_MAJOR_VERSION * 100 + TK_MINOR_VERSION) >= 401 Tcl_EventuallyFree((ClientData) togl, Togl_Destroy); #else Tk_EventuallyFree((ClientData) togl, Togl_Destroy); #endif break; default: /* nothing */ ; } } void Togl_PostRedisplay(Togl *togl) { if (!togl->UpdatePending) { togl->UpdatePending = True; Tk_DoWhenIdle(Togl_Render, (ClientData) togl); } } void Togl_SwapBuffers(const Togl *togl) { if (togl->DoubleFlag) { #if defined(TOGL_WGL) int res = SwapBuffers(togl->tglGLHdc); assert(res == TRUE); #elif defined(TOGL_X11) glXSwapBuffers(Tk_Display(togl->TkWin), Tk_WindowId(togl->TkWin)); #elif defined(TOGL_AGL_CLASSIC) || defined(TOGL_AGL) aglSwapBuffers(togl->aglCtx); #endif /* TOGL_WGL */ } else { glFlush(); } } const char * Togl_Ident(const Togl *togl) { return togl->Ident; } int Togl_Width(const Togl *togl) { return togl->Width; } int Togl_Height(const Togl *togl) { return togl->Height; } Tcl_Interp * Togl_Interp(const Togl *togl) { return togl->Interp; } Tk_Window Togl_TkWin(const Togl *togl) { return togl->TkWin; } #if defined(TOGL_X11) /* * A replacement for XAllocColor. This function should never * fail to allocate a color. When XAllocColor fails, we return * the nearest matching color. If we have to allocate many colors * this function isn't too efficient; the XQueryColors() could be * done just once. * Written by Michael Pichler, Brian Paul, Mark Kilgard * Input: dpy - X display * cmap - X colormap * cmapSize - size of colormap * In/Out: color - the XColor struct * Output: exact - 1=exact color match, 0=closest match */ static void noFaultXAllocColor(Display *dpy, Colormap cmap, int cmapSize, XColor *color, int *exact) { XColor *ctable, subColor; int i, bestmatch; double mindist; /* 3*2^16^2 exceeds long int precision. */ /* First try just using XAllocColor. */ if (XAllocColor(dpy, cmap, color)) { *exact = 1; return; } /* Retrieve color table entries. */ /* XXX alloca candidate. */ ctable = (XColor *) malloc(cmapSize * sizeof (XColor)); for (i = 0; i < cmapSize; i++) { ctable[i].pixel = i; } (void) XQueryColors(dpy, cmap, ctable, cmapSize); /* Find best match. */ bestmatch = -1; mindist = 0; for (i = 0; i < cmapSize; i++) { double dr = (double) color->red - (double) ctable[i].red; double dg = (double) color->green - (double) ctable[i].green; double db = (double) color->blue - (double) ctable[i].blue; double dist = dr * dr + dg * dg + db * db; if (bestmatch < 0 || dist < mindist) { bestmatch = i; mindist = dist; } } /* Return result. */ subColor.red = ctable[bestmatch].red; subColor.green = ctable[bestmatch].green; subColor.blue = ctable[bestmatch].blue; free(ctable); /* Try to allocate the closest match color. This should only fail if the * cell is read/write. Otherwise, we're incrementing the cell's reference * count. */ if (!XAllocColor(dpy, cmap, &subColor)) { /* do this to work around a problem reported by Frank Ortega */ subColor.pixel = (unsigned long) bestmatch; subColor.red = ctable[bestmatch].red; subColor.green = ctable[bestmatch].green; subColor.blue = ctable[bestmatch].blue; subColor.flags = DoRed | DoGreen | DoBlue; } *color = subColor; } #elif defined(TOGL_WGL) static UINT Win32AllocColor(const Togl *togl, float red, float green, float blue) { /* Modified version of XAllocColor emulation of Tk. - returns index, * instead of color itself - allocates logical palette entry even for * non-palette devices */ TkWinColormap *cmap = (TkWinColormap *) Tk_Colormap(togl->TkWin); UINT index; COLORREF newColor, closeColor; PALETTEENTRY entry, closeEntry; int new, refCount; Tcl_HashEntry *entryPtr; entry.peRed = (unsigned char) (red * 255 + .5); entry.peGreen = (unsigned char) (green * 255 + .5); entry.peBlue = (unsigned char) (blue * 255 + .5); entry.peFlags = 0; /* * Find the nearest existing palette entry. */ newColor = RGB(entry.peRed, entry.peGreen, entry.peBlue); index = GetNearestPaletteIndex(cmap->palette, newColor); GetPaletteEntries(cmap->palette, index, 1, &closeEntry); closeColor = RGB(closeEntry.peRed, closeEntry.peGreen, closeEntry.peBlue); /* * If this is not a duplicate and colormap is not full, allocate a new entry. */ if (newColor != closeColor) { if (cmap->size == (unsigned int) togl->CiColormapSize) { entry = closeEntry; } else { cmap->size++; ResizePalette(cmap->palette, cmap->size); index = cmap->size - 1; SetPaletteEntries(cmap->palette, index, 1, &entry); SelectPalette(togl->tglGLHdc, cmap->palette, TRUE); RealizePalette(togl->tglGLHdc); } } newColor = PALETTERGB(entry.peRed, entry.peGreen, entry.peBlue); entryPtr = Tcl_CreateHashEntry(&cmap->refCounts, (char *) newColor, &new); if (new) { refCount = 1; } else { refCount = ((int) Tcl_GetHashValue(entryPtr)) + 1; } Tcl_SetHashValue(entryPtr, (ClientData) refCount); /* for EPS output */ togl->EpsRedMap[index] = (GLfloat) (entry.peRed / 255.0); togl->EpsGreenMap[index] = (GLfloat) (entry.peGreen / 255.0); togl->EpsBlueMap[index] = (GLfloat) (entry.peBlue / 255.0); return index; } static void Win32FreeColor(const Togl *togl, unsigned long index) { TkWinColormap *cmap = (TkWinColormap *) Tk_Colormap(togl->TkWin); COLORREF cref; UINT count, refCount; PALETTEENTRY entry, *entries; Tcl_HashEntry *entryPtr; if (index >= cmap->size) { panic("Tried to free a color that isn't allocated."); } GetPaletteEntries(cmap->palette, index, 1, &entry); cref = PALETTERGB(entry.peRed, entry.peGreen, entry.peBlue); entryPtr = Tcl_FindHashEntry(&cmap->refCounts, (char *) cref); if (!entryPtr) { panic("Tried to free a color that isn't allocated."); } refCount = (int) Tcl_GetHashValue(entryPtr) - 1; if (refCount == 0) { count = cmap->size - index; entries = (PALETTEENTRY *) ckalloc(sizeof (PALETTEENTRY) * count); GetPaletteEntries(cmap->palette, index + 1, count, entries); SetPaletteEntries(cmap->palette, index, count, entries); SelectPalette(togl->tglGLHdc, cmap->palette, TRUE); RealizePalette(togl->tglGLHdc); ckfree((char *) entries); cmap->size--; Tcl_DeleteHashEntry(entryPtr); } else { Tcl_SetHashValue(entryPtr, (ClientData) refCount); } } static void Win32SetColor(const Togl *togl, unsigned long index, float red, float green, float blue) { TkWinColormap *cmap = (TkWinColormap *) Tk_Colormap(togl->TkWin); PALETTEENTRY entry; entry.peRed = (unsigned char) (red * 255 + .5); entry.peGreen = (unsigned char) (green * 255 + .5); entry.peBlue = (unsigned char) (blue * 255 + .5); entry.peFlags = 0; SetPaletteEntries(cmap->palette, index, 1, &entry); SelectPalette(togl->tglGLHdc, cmap->palette, TRUE); RealizePalette(togl->tglGLHdc); /* for EPS output */ togl->EpsRedMap[index] = (GLfloat) (entry.peRed / 255.0); togl->EpsGreenMap[index] = (GLfloat) (entry.peGreen / 255.0); togl->EpsBlueMap[index] = (GLfloat) (entry.peBlue / 255.0); } #endif /* TOGL_X11 */ unsigned long Togl_AllocColor(const Togl *togl, float red, float green, float blue) { if (togl->RgbaFlag) { (void) fprintf(stderr, "Error: Togl_AllocColor illegal in RGBA mode.\n"); return 0; } /* TODO: maybe not... */ if (togl->PrivateCmapFlag) { (void) fprintf(stderr, "Error: Togl_FreeColor illegal with private colormap\n"); return 0; } #if defined(TOGL_X11) { XColor xcol; int exact; xcol.red = (short) (red * 65535.0); xcol.green = (short) (green * 65535.0); xcol.blue = (short) (blue * 65535.0); noFaultXAllocColor(Tk_Display(togl->TkWin), Tk_Colormap(togl->TkWin), Tk_Visual(togl->TkWin)->map_entries, &xcol, &exact); /* for EPS output */ togl->EpsRedMap[xcol.pixel] = (float) xcol.red / 65535.0; togl->EpsGreenMap[xcol.pixel] = (float) xcol.green / 65535.0; togl->EpsBlueMap[xcol.pixel] = (float) xcol.blue / 65535.0; return xcol.pixel; } #elif defined(TOGL_WGL) return Win32AllocColor(togl, red, green, blue); #elif defined(TOGL_AGL_CLASSIC) || defined(TOGL_AGL) /* still need to implement this on Mac... */ return 0; #endif /* TOGL_X11 */ } void Togl_FreeColor(const Togl *togl, unsigned long pixel) { if (togl->RgbaFlag) { (void) fprintf(stderr, "Error: Togl_AllocColor illegal in RGBA mode.\n"); return; } /* TODO: maybe not... */ if (togl->PrivateCmapFlag) { (void) fprintf(stderr, "Error: Togl_FreeColor illegal with private colormap\n"); return; } #if defined(TOGL_X11) (void) XFreeColors(Tk_Display(togl->TkWin), Tk_Colormap(togl->TkWin), &pixel, 1, 0); #elif defined(TOGL_WGL) Win32FreeColor(togl, pixel); #endif /* TOGL_X11 */ } void Togl_SetColor(const Togl *togl, unsigned long index, float red, float green, float blue) { if (togl->RgbaFlag) { (void) fprintf(stderr, "Error: Togl_AllocColor illegal in RGBA mode.\n"); return; } if (!togl->PrivateCmapFlag) { (void) fprintf(stderr, "Error: Togl_SetColor requires a private colormap\n"); return; } #if defined(TOGL_X11) { XColor xcol; xcol.pixel = index; xcol.red = (short) (red * 65535.0); xcol.green = (short) (green * 65535.0); xcol.blue = (short) (blue * 65535.0); xcol.flags = DoRed | DoGreen | DoBlue; (void) XStoreColor(Tk_Display(togl->TkWin), Tk_Colormap(togl->TkWin), &xcol); /* for EPS output */ togl->EpsRedMap[xcol.pixel] = (float) xcol.red / 65535.0; togl->EpsGreenMap[xcol.pixel] = (float) xcol.green / 65535.0; togl->EpsBlueMap[xcol.pixel] = (float) xcol.blue / 65535.0; } #elif defined(TOGL_WGL) Win32SetColor(togl, index, red, green, blue); #endif /* TOGL_X11 */ } #if TOGL_USE_FONTS == 1 # if defined(TOGL_WGL) # include "tkWinInt.h" # include "tkFont.h" /* * The following structure represents Windows' implementation of a font. */ typedef struct WinFont { TkFont font; /* Stuff used by generic font package. Must be * first in structure. */ HFONT hFont; /* Windows information about font. */ HWND hwnd; /* Toplevel window of application that owns * this font, used for getting HDC. */ int widths[256]; /* Widths of first 256 chars in this font. */ } WinFont; # endif /* TOGL_WGL */ # define MAX_FONTS 1000 static GLuint ListBase[MAX_FONTS]; static GLuint ListCount[MAX_FONTS]; /* * Load the named bitmap font as a sequence of bitmaps in a display list. * fontname may be one of the predefined fonts like TOGL_BITMAP_8_BY_13 * or an X font name, or a Windows font name, etc. */ GLuint Togl_LoadBitmapFont(const Togl *togl, const char *fontname) { static Bool FirstTime = True; # if defined(TOGL_X11) XFontStruct *fontinfo; # elif defined(TOGL_WGL) WinFont *winfont; HFONT oldFont; TEXTMETRIC tm; # endif /* TOGL_X11 */ int first, last, count; GLuint fontbase; const char *name; /* Initialize the ListBase and ListCount arrays */ if (FirstTime) { int i; for (i = 0; i < MAX_FONTS; i++) { ListBase[i] = ListCount[i] = 0; } FirstTime = False; } /* * This method of selecting X fonts according to a TOGL_ font name * is a kludge. To be fixed when I find time... */ if (fontname == TOGL_BITMAP_8_BY_13) { name = "8x13"; } else if (fontname == TOGL_BITMAP_9_BY_15) { name = "9x15"; } else if (fontname == TOGL_BITMAP_TIMES_ROMAN_10) { name = "-adobe-times-medium-r-normal--10-100-75-75-p-54-iso8859-1"; } else if (fontname == TOGL_BITMAP_TIMES_ROMAN_24) { name = "-adobe-times-medium-r-normal--24-240-75-75-p-124-iso8859-1"; } else if (fontname == TOGL_BITMAP_HELVETICA_10) { name = "-adobe-helvetica-medium-r-normal--10-100-75-75-p-57-iso8859-1"; } else if (fontname == TOGL_BITMAP_HELVETICA_12) { name = "-adobe-helvetica-medium-r-normal--12-120-75-75-p-67-iso8859-1"; } else if (fontname == TOGL_BITMAP_HELVETICA_18) { name = "-adobe-helvetica-medium-r-normal--18-180-75-75-p-98-iso8859-1"; } else if (!fontname) { name = DEFAULT_FONTNAME; } else { name = (const char *) fontname; } assert(name); # if defined(TOGL_X11) fontinfo = (XFontStruct *) XLoadQueryFont(Tk_Display(togl->TkWin), name); if (!fontinfo) { return 0; } first = fontinfo->min_char_or_byte2; last = fontinfo->max_char_or_byte2; # elif defined(TOGL_WGL) winfont = (WinFont *) Tk_GetFont(togl->Interp, togl->TkWin, name); if (!winfont) { return 0; } oldFont = SelectObject(togl->tglGLHdc, winfont->hFont); GetTextMetrics(togl->tglGLHdc, &tm); first = tm.tmFirstChar; last = tm.tmLastChar; # elif defined(TOGL_AGL_CLASSIC) || defined(TOGL_AGL) first = 10; /* don't know how to determine font range on * Mac... */ last = 127; # endif /* TOGL_X11 */ count = last - first + 1; fontbase = glGenLists((GLuint) (last + 1)); if (fontbase == 0) { # ifdef TOGL_WGL SelectObject(togl->tglGLHdc, oldFont); Tk_FreeFont((Tk_Font) winfont); # endif /* TOGL_WGL */ return 0; } # if defined(TOGL_WGL) wglUseFontBitmaps(togl->tglGLHdc, first, count, (int) fontbase + first); SelectObject(togl->tglGLHdc, oldFont); Tk_FreeFont((Tk_Font) winfont); # elif defined(TOGL_X11) glXUseXFont(fontinfo->fid, first, count, (int) fontbase + first); # elif defined(TOGL_AGL_CLASSIC) || defined(TOGL_AGL) aglUseFont(togl->aglCtx, 1, 0, 14, /* for now, only app font, regular * 14-point */ 10, 118, fontbase + first); # endif /* Record the list base and number of display lists for * Togl_UnloadBitmapFont(). */ { int i; for (i = 0; i < MAX_FONTS; i++) { if (ListBase[i] == 0) { ListBase[i] = fontbase; ListCount[i] = last + 1; break; } } } return fontbase; } /* * Release the display lists which were generated by Togl_LoadBitmapFont(). */ void Togl_UnloadBitmapFont(const Togl *togl, GLuint fontbase) { int i; (void) togl; for (i = 0; i < MAX_FONTS; i++) { if (ListBase[i] == fontbase) { glDeleteLists(ListBase[i], ListCount[i]); ListBase[i] = ListCount[i] = 0; return; } } } #endif /* TOGL_USE_FONTS */ /* * Overlay functions */ void Togl_UseLayer(Togl *togl, int layer) { if (!togl->OverlayWindow) return; if (layer == TOGL_OVERLAY) { #if defined(TOGL_WGL) int res = wglMakeCurrent(togl->tglGLHdc, togl->tglGLOverlayHglrc); assert(res == TRUE); #elif defined(TOGL_X11) (void) glXMakeCurrent(Tk_Display(togl->TkWin), togl->OverlayWindow, togl->OverlayCtx); # if defined(__sgi) if (togl->OldStereoFlag) oldStereoMakeCurrent(Tk_Display(togl->TkWin), togl->OverlayWindow, togl->OverlayCtx); # endif /* __sgi STEREO */ #endif /* TOGL_WGL */ } else if (layer == TOGL_NORMAL) { #if defined(TOGL_WGL) int res = wglMakeCurrent(togl->tglGLHdc, togl->tglGLHglrc); assert(res == TRUE); #elif defined(TOGL_X11) (void) glXMakeCurrent(Tk_Display(togl->TkWin), Tk_WindowId(togl->TkWin), togl->GlCtx); # if defined(__sgi) if (togl->OldStereoFlag) oldStereoMakeCurrent(Tk_Display(togl->TkWin), Tk_WindowId(togl->TkWin), togl->GlCtx); # endif /* __sgi STEREO */ #endif /* TOGL_WGL */ } else { /* error */ } } void Togl_ShowOverlay(Togl *togl) { #if defined(TOGL_X11) /* not yet implemented on Windows */ if (togl->OverlayWindow) { (void) XMapWindow(Tk_Display(togl->TkWin), togl->OverlayWindow); (void) XInstallColormap(Tk_Display(togl->TkWin), togl->OverlayCmap); togl->OverlayIsMapped = True; } #endif /* TOGL_X11 */ } void Togl_HideOverlay(Togl *togl) { if (togl->OverlayWindow && togl->OverlayIsMapped) { (void) XUnmapWindow(Tk_Display(togl->TkWin), togl->OverlayWindow); togl->OverlayIsMapped = False; } } void Togl_PostOverlayRedisplay(Togl *togl) { if (!togl->OverlayUpdatePending && togl->OverlayWindow && togl->OverlayDisplayProc) { Tk_DoWhenIdle(RenderOverlay, (ClientData) togl); togl->OverlayUpdatePending = True; } } void Togl_OverlayDisplayFunc(Togl_Callback *proc) { DefaultOverlayDisplayProc = proc; } int Togl_ExistsOverlay(const Togl *togl) { return togl->OverlayFlag; } int Togl_GetOverlayTransparentValue(const Togl *togl) { return togl->OverlayTransparentPixel; } int Togl_IsMappedOverlay(const Togl *togl) { return togl->OverlayFlag && togl->OverlayIsMapped; } unsigned long Togl_AllocColorOverlay(const Togl *togl, float red, float green, float blue) { #if defined(TOGL_X11) /* not yet implemented on Windows */ if (togl->OverlayFlag && togl->OverlayCmap) { XColor xcol; xcol.red = (short) (red * 65535.0); xcol.green = (short) (green * 65535.0); xcol.blue = (short) (blue * 65535.0); if (!XAllocColor(Tk_Display(togl->TkWin), togl->OverlayCmap, &xcol)) return (unsigned long) -1; return xcol.pixel; } #endif /* TOGL_X11 */ return (unsigned long) -1; } void Togl_FreeColorOverlay(const Togl *togl, unsigned long pixel) { #if defined(TOGL_X11) /* not yet implemented on Windows */ if (togl->OverlayFlag && togl->OverlayCmap) { (void) XFreeColors(Tk_Display(togl->TkWin), togl->OverlayCmap, &pixel, 1, 0); } #endif /* TOGL_X11 */ } /* * User client data */ void Togl_ClientData(ClientData clientData) { DefaultClientData = clientData; } ClientData Togl_GetClientData(const Togl *togl) { return togl->Client_Data; } void Togl_SetClientData(Togl *togl, ClientData clientData) { togl->Client_Data = clientData; } /* * X11-only functions * Contributed by Miguel A. De Riera Pasenau (miguel@DALILA.UPC.ES) */ Display * Togl_Display(const Togl *togl) { return Tk_Display(togl->TkWin); } Screen * Togl_Screen(const Togl *togl) { return Tk_Screen(togl->TkWin); } int Togl_ScreenNumber(const Togl *togl) { return Tk_ScreenNumber(togl->TkWin); } Colormap Togl_Colormap(const Togl *togl) { return Tk_Colormap(togl->TkWin); } #ifdef MESA_COLOR_HACK /* * Let's know how many free colors do we have */ # if 0 static unsigned char rojo[] = { 4, 39, 74, 110, 145, 181, 216, 251 }, verde[] = { 4, 39, 74, 110, 145, 181, 216, 251}, azul[] = { 4, 39, 74, 110, 145, 181, 216, 251}; unsigned char rojo[] = { 4, 36, 72, 109, 145, 182, 218, 251 }, verde[] = { 4, 36, 72, 109, 145, 182, 218, 251}, azul[] = { 4, 36, 72, 109, 145, 182, 218, 251}; azul[] = { 0, 85, 170, 255}; # endif # define RLEVELS 5 # define GLEVELS 9 # define BLEVELS 5 /* to free dithered_rgb_colormap pixels allocated by Mesa */ static unsigned long *ToglMesaUsedPixelCells = NULL; static int ToglMesaUsedFreeCells = 0; static int get_free_color_cells(Display *display, int screen, Colormap colormap) { if (!ToglMesaUsedPixelCells) { XColor xcol; int i; int colorsfailed, ncolors = XDisplayCells(display, screen); long r, g, b; ToglMesaUsedPixelCells = (unsigned long *) calloc(ncolors, sizeof (unsigned long)); /* Allocate X colors and initialize color_table[], red_table[], etc */ /* de Mesa 2.1: xmesa1.c setup_dithered_(...) */ i = colorsfailed = 0; for (r = 0; r < RLEVELS; r++) for (g = 0; g < GLEVELS; g++) for (b = 0; b < BLEVELS; b++) { int exact; xcol.red = (r * 65535) / (RLEVELS - 1); xcol.green = (g * 65535) / (GLEVELS - 1); xcol.blue = (b * 65535) / (BLEVELS - 1); noFaultXAllocColor(display, colormap, ncolors, &xcol, &exact); ToglMesaUsedPixelCells[i++] = xcol.pixel; if (!exact) { colorsfailed++; } } ToglMesaUsedFreeCells = i; XFreeColors(display, colormap, ToglMesaUsedPixelCells, ToglMesaUsedFreeCells, 0x00000000); } return ToglMesaUsedFreeCells; } static void free_default_color_cells(Display *display, Colormap colormap) { if (ToglMesaUsedPixelCells) { XFreeColors(display, colormap, ToglMesaUsedPixelCells, ToglMesaUsedFreeCells, 0x00000000); free(ToglMesaUsedPixelCells); ToglMesaUsedPixelCells = NULL; ToglMesaUsedFreeCells = 0; } } #endif /* * Generate EPS file. * Contributed by Miguel A. De Riera Pasenau (miguel@DALILA.UPC.ES) */ /* Function that creates a EPS File from a created pixmap on the current * context. Based on the code from Copyright (c) Mark J. Kilgard, 1996. * Parameters: name_file, b&w / Color flag, redraw function. The redraw * function is needed in order to draw things into the new created pixmap. */ /* Copyright (c) Mark J. Kilgard, 1996. */ static GLvoid * grabPixels(int inColor, unsigned int width, unsigned int height) { GLvoid *buffer; GLint swapbytes, lsbfirst, rowlength; GLint skiprows, skippixels, alignment; GLenum format; unsigned int size; if (inColor) { format = GL_RGB; size = width * height * 3; } else { format = GL_LUMINANCE; size = width * height * 1; } buffer = (GLvoid *) malloc(size); if (buffer == NULL) return NULL; /* Save current modes. */ glGetIntegerv(GL_PACK_SWAP_BYTES, &swapbytes); glGetIntegerv(GL_PACK_LSB_FIRST, &lsbfirst); glGetIntegerv(GL_PACK_ROW_LENGTH, &rowlength); glGetIntegerv(GL_PACK_SKIP_ROWS, &skiprows); glGetIntegerv(GL_PACK_SKIP_PIXELS, &skippixels); glGetIntegerv(GL_PACK_ALIGNMENT, &alignment); /* Little endian machines (DEC Alpha for example) could benefit from * setting GL_PACK_LSB_FIRST to GL_TRUE instead of GL_FALSE, but this would * * * * * * * * * require changing the generated bitmaps too. */ glPixelStorei(GL_PACK_SWAP_BYTES, GL_FALSE); glPixelStorei(GL_PACK_LSB_FIRST, GL_FALSE); glPixelStorei(GL_PACK_ROW_LENGTH, 0); glPixelStorei(GL_PACK_SKIP_ROWS, 0); glPixelStorei(GL_PACK_SKIP_PIXELS, 0); glPixelStorei(GL_PACK_ALIGNMENT, 1); /* Actually read the pixels. */ glReadPixels(0, 0, width, height, format, GL_UNSIGNED_BYTE, (GLvoid *) buffer); /* Restore saved modes. */ glPixelStorei(GL_PACK_SWAP_BYTES, swapbytes); glPixelStorei(GL_PACK_LSB_FIRST, lsbfirst); glPixelStorei(GL_PACK_ROW_LENGTH, rowlength); glPixelStorei(GL_PACK_SKIP_ROWS, skiprows); glPixelStorei(GL_PACK_SKIP_PIXELS, skippixels); glPixelStorei(GL_PACK_ALIGNMENT, alignment); return buffer; } static int generateEPS(const char *filename, int inColor, unsigned int width, unsigned int height) { FILE *fp; GLvoid *pixels; unsigned char *curpix; unsigned int components, i; int pos; unsigned int bitpixel; pixels = grabPixels(inColor, width, height); if (pixels == NULL) return 1; if (inColor) components = 3; /* Red, green, blue. */ else components = 1; /* Luminance. */ fp = fopen(filename, "w"); if (fp == NULL) { return 2; } (void) fprintf(fp, "%%!PS-Adobe-2.0 EPSF-1.2\n"); (void) fprintf(fp, "%%%%Creator: OpenGL pixmap render output\n"); (void) fprintf(fp, "%%%%BoundingBox: 0 0 %d %d\n", width, height); (void) fprintf(fp, "%%%%EndComments\n"); i = (((width * height) + 7) / 8) / 40; /* # of lines, 40 bytes per * line */ (void) fprintf(fp, "%%%%BeginPreview: %d %d %d %d\n%%", width, height, 1, i); pos = 0; curpix = (unsigned char *) pixels; for (i = 0; i < width * height * components;) { bitpixel = 0; if (inColor) { double pix = 0; pix = 0.30 * (double) curpix[i] + 0.59 * (double) curpix[i + 1] + 0.11 * (double) curpix[i + 2]; i += 3; if (pix > 127.0) bitpixel |= 0x80; pix = 0.30 * (double) curpix[i] + 0.59 * (double) curpix[i + 1] + 0.11 * (double) curpix[i + 2]; i += 3; if (pix > 127.0) bitpixel |= 0x40; pix = 0.30 * (double) curpix[i] + 0.59 * (double) curpix[i + 1] + 0.11 * (double) curpix[i + 2]; i += 3; if (pix > 127.0) bitpixel |= 0x20; pix = 0.30 * (double) curpix[i] + 0.59 * (double) curpix[i + 1] + 0.11 * (double) curpix[i + 2]; i += 3; if (pix > 127.0) bitpixel |= 0x10; pix = 0.30 * (double) curpix[i] + 0.59 * (double) curpix[i + 1] + 0.11 * (double) curpix[i + 2]; i += 3; if (pix > 127.0) bitpixel |= 0x08; pix = 0.30 * (double) curpix[i] + 0.59 * (double) curpix[i + 1] + 0.11 * (double) curpix[i + 2]; i += 3; if (pix > 127.0) bitpixel |= 0x04; pix = 0.30 * (double) curpix[i] + 0.59 * (double) curpix[i + 1] + 0.11 * (double) curpix[i + 2]; i += 3; if (pix > 127.0) bitpixel |= 0x02; pix = 0.30 * (double) curpix[i] + 0.59 * (double) curpix[i + 1] + 0.11 * (double) curpix[i + 2]; i += 3; if (pix > 127.0) bitpixel |= 0x01; } else { if (curpix[i++] > 0x7f) bitpixel |= 0x80; if (curpix[i++] > 0x7f) bitpixel |= 0x40; if (curpix[i++] > 0x7f) bitpixel |= 0x20; if (curpix[i++] > 0x7f) bitpixel |= 0x10; if (curpix[i++] > 0x7f) bitpixel |= 0x08; if (curpix[i++] > 0x7f) bitpixel |= 0x04; if (curpix[i++] > 0x7f) bitpixel |= 0x02; if (curpix[i++] > 0x7f) bitpixel |= 0x01; } (void) fprintf(fp, "%02x", bitpixel); if (++pos >= 40) { (void) fprintf(fp, "\n%%"); pos = 0; } } if (pos) (void) fprintf(fp, "\n%%%%EndPreview\n"); else (void) fprintf(fp, "%%EndPreview\n"); (void) fprintf(fp, "gsave\n"); (void) fprintf(fp, "/bwproc {\n"); (void) fprintf(fp, " rgbproc\n"); (void) fprintf(fp, " dup length 3 idiv string 0 3 0\n"); (void) fprintf(fp, " 5 -1 roll {\n"); (void) fprintf(fp, " add 2 1 roll 1 sub dup 0 eq\n"); (void) fprintf(fp, " { pop 3 idiv 3 -1 roll dup 4 -1 roll dup\n"); (void) fprintf(fp, " 3 1 roll 5 -1 roll put 1 add 3 0 }\n"); (void) fprintf(fp, " { 2 1 roll } ifelse\n"); (void) fprintf(fp, " } forall\n"); (void) fprintf(fp, " pop pop pop\n"); (void) fprintf(fp, "} def\n"); (void) fprintf(fp, "systemdict /colorimage known not {\n"); (void) fprintf(fp, " /colorimage {\n"); (void) fprintf(fp, " pop\n"); (void) fprintf(fp, " pop\n"); (void) fprintf(fp, " /rgbproc exch def\n"); (void) fprintf(fp, " { bwproc } image\n"); (void) fprintf(fp, " } def\n"); (void) fprintf(fp, "} if\n"); (void) fprintf(fp, "/picstr %d string def\n", width * components); (void) fprintf(fp, "%d %d scale\n", width, height); (void) fprintf(fp, "%d %d %d\n", width, height, 8); (void) fprintf(fp, "[%d 0 0 %d 0 0]\n", width, height); (void) fprintf(fp, "{currentfile picstr readhexstring pop}\n"); (void) fprintf(fp, "false %d\n", components); (void) fprintf(fp, "colorimage\n"); curpix = (unsigned char *) pixels; pos = 0; for (i = width * height * components; i != 0; i--) { (void) fprintf(fp, "%02hx", *curpix++); if (++pos >= 40) { (void) fprintf(fp, "\n"); pos = 0; } } if (pos) (void) fprintf(fp, "\n"); (void) fprintf(fp, "grestore\n"); free(pixels); if (fclose(fp) != 0) return 1; return 0; } /* int Togl_DumpToEpsFile( const Togl *togl, const char *filename, int inColor, * void (*user_redraw)(void)) */ /* changed by GG */ int Togl_DumpToEpsFile(const Togl *togl, const char *filename, int inColor, void (*user_redraw) (const Togl *)) { Bool using_mesa = False; #if 0 Pixmap eps_pixmap; GLXPixmap eps_glxpixmap; XVisualInfo *vi = togl->VisInfo; Window win = Tk_WindowId(togl->TkWin); #endif int retval; unsigned int width = togl->Width, height = togl->Height; #if defined(TOGL_X11) Display *dpy = Tk_Display(togl->TkWin); int scrnum = Tk_ScreenNumber(togl->TkWin); if (strstr(glXQueryServerString(dpy, scrnum, GLX_VERSION), "Mesa")) using_mesa = True; else #endif /* TOGL_X11 */ using_mesa = False; /* I don't use Pixmap do drawn into, because the code should link with Mesa * libraries and OpenGL libraries, and the which library we use at run time * should not matter, but the name of the calls differs one from another: * MesaGl: glXCreateGLXPixmapMESA( dpy, vi, eps_pixmap, * Tk_Colormap(togl->TkWin)) OpenGl: glXCreateGLXPixmap( dpy, vi, * eps_pixmap); instead of this I read direct from back buffer of the * screeen. */ #if 0 eps_pixmap = XCreatePixmap(dpy, win, width, height, vi->depth); if (using_mesa) eps_glxpixmap = glXCreateGLXPixmapMESA(dpy, vi, eps_pixmap, Tk_Colormap(togl->TkWin)); else eps_glxpixmap = glXCreateGLXPixmap(dpy, vi, eps_pixmap); glXMakeCurrent(dpy, eps_glxpixmap, togl->GlCtx); user_redraw(); #endif if (!togl->RgbaFlag) { #if defined(TOGL_WGL) /* Due to the lack of a unique inverse mapping from the frame buffer to * the logical palette we need a translation map from the complete * logical palette. */ { int n, i; TkWinColormap *cmap = (TkWinColormap *) Tk_Colormap(togl->TkWin); LPPALETTEENTRY entry = malloc(togl->EpsMapSize * sizeof (PALETTEENTRY)); n = GetPaletteEntries(cmap->palette, 0, togl->EpsMapSize, entry); for (i = 0; i < n; i++) { togl->EpsRedMap[i] = (GLfloat) (entry[i].peRed / 255.0); togl->EpsGreenMap[i] = (GLfloat) (entry[i].peGreen / 255.0); togl->EpsBlueMap[i] = (GLfloat) (entry[i].peBlue / 255.0); } free(entry); } #endif /* TOGL_WGL */ glPixelMapfv(GL_PIXEL_MAP_I_TO_R, togl->EpsMapSize, togl->EpsRedMap); glPixelMapfv(GL_PIXEL_MAP_I_TO_G, togl->EpsMapSize, togl->EpsGreenMap); glPixelMapfv(GL_PIXEL_MAP_I_TO_B, togl->EpsMapSize, togl->EpsBlueMap); } /* user_redraw(); */ user_redraw(togl); /* changed by GG */ /* glReadBuffer( GL_FRONT); */ /* by default it read GL_BACK in double buffer mode */ glFlush(); retval = generateEPS(filename, inColor, width, height); #if 0 glXMakeCurrent(dpy, win, togl->GlCtx); glXDestroyGLXPixmap(dpy, eps_glxpixmap); XFreePixmap(dpy, eps_pixmap); #endif return retval; } /* * Full screen stereo for SGI graphics * Contributed by Ben Evans (Ben.Evans@anusf.anu.edu.au) * This code was based on SGI's /usr/share/src/OpenGL/teach/stereo */ #if defined(__sgi) static struct stereoStateRec { Bool useSGIStereo; Display *currentDisplay; Window currentWindow; GLXContext currentContext; GLenum currentDrawBuffer; int currentStereoBuffer; Bool enabled; char *stereoCommand; char *restoreCommand; } stereo; /* call instead of glDrawBuffer */ void Togl_OldStereoDrawBuffer(GLenum mode) { if (stereo.useSGIStereo) { stereo.currentDrawBuffer = mode; switch (mode) { case GL_FRONT: case GL_BACK: case GL_FRONT_AND_BACK: /* ** Simultaneous drawing to both left and right buffers isn't ** really possible if we don't have a stereo capable visual. ** For now just fall through and use the left buffer. */ case GL_LEFT: case GL_FRONT_LEFT: case GL_BACK_LEFT: stereo.currentStereoBuffer = STEREO_BUFFER_LEFT; break; case GL_RIGHT: case GL_FRONT_RIGHT: stereo.currentStereoBuffer = STEREO_BUFFER_RIGHT; mode = GL_FRONT; break; case GL_BACK_RIGHT: stereo.currentStereoBuffer = STEREO_BUFFER_RIGHT; mode = GL_BACK; break; default: break; } if (stereo.currentDisplay && stereo.currentWindow) { glXWaitGL(); /* sync with GL command stream before calling X */ XSGISetStereoBuffer(stereo.currentDisplay, stereo.currentWindow, stereo.currentStereoBuffer); glXWaitX(); /* sync with X command stream before calling GL */ } } glDrawBuffer(mode); } /* call instead of glClear */ void Togl_OldStereoClear(GLbitfield mask) { GLenum drawBuffer; if (stereo.useSGIStereo) { drawBuffer = stereo.currentDrawBuffer; switch (drawBuffer) { case GL_FRONT: Togl_OldStereoDrawBuffer(GL_FRONT_RIGHT); glClear(mask); Togl_OldStereoDrawBuffer(drawBuffer); break; case GL_BACK: Togl_OldStereoDrawBuffer(GL_BACK_RIGHT); glClear(mask); Togl_OldStereoDrawBuffer(drawBuffer); break; case GL_FRONT_AND_BACK: Togl_OldStereoDrawBuffer(GL_RIGHT); glClear(mask); Togl_OldStereoDrawBuffer(drawBuffer); break; case GL_LEFT: case GL_FRONT_LEFT: case GL_BACK_LEFT: case GL_RIGHT: case GL_FRONT_RIGHT: case GL_BACK_RIGHT: default: break; } } glClear(mask); } static void oldStereoMakeCurrent(Display *dpy, Window win, GLXContext ctx) { if (dpy && (dpy != stereo.currentDisplay)) { int event, error; /* Make sure new Display supports SGIStereo */ if (XSGIStereoQueryExtension(dpy, &event, &error) == False) { dpy = NULL; } } if (dpy && win && (win != stereo.currentWindow)) { /* Make sure new Window supports SGIStereo */ if (XSGIQueryStereoMode(dpy, win) == X_STEREO_UNSUPPORTED) { win = None; } } if (ctx && (ctx != stereo.currentContext)) { GLint drawBuffer; glGetIntegerv(GL_DRAW_BUFFER, &drawBuffer); Togl_OldStereoDrawBuffer((GLenum) drawBuffer); } stereo.currentDisplay = dpy; stereo.currentWindow = win; stereo.currentContext = ctx; } /* call before using stereo */ static void oldStereoInit(Togl *togl, int stereoEnabled) { stereo.useSGIStereo = stereoEnabled; stereo.currentDisplay = NULL; stereo.currentWindow = None; stereo.currentContext = NULL; stereo.currentDrawBuffer = GL_NONE; stereo.currentStereoBuffer = STEREO_BUFFER_NONE; stereo.enabled = False; } #endif /* __sgi STEREO */ void Togl_StereoFrustum(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar, GLfloat eyeDist, GLfloat eyeOffset) { GLfloat eyeShift = (eyeDist - zNear) * (eyeOffset / eyeDist); glFrustum(left + eyeShift, right + eyeShift, bottom, top, zNear, zFar); glTranslatef(-eyeShift, 0, 0); } #ifdef TOGL_AGL_CLASSIC /* needed to make shared library on Mac with CodeWarrior; should be overridden * by user app */ /* * int main(int argc, char *argv[]) { return -1; } */ /* the following code is borrowed from tkMacAppInit.c */ /* *---------------------------------------------------------------------- * * MacintoshInit -- * * This procedure calls Mac specific initialization calls. Most of * these calls must be made as soon as possible in the startup * process. * * Results: * Returns TCL_OK if everything went fine. If it didn't the * application should probably fail. * * Side effects: * Inits the application. * *---------------------------------------------------------------------- */ int Togl_MacInit(void) { int i; long result, mask = 0x0700; /* mask = system 7.x */ # if GENERATING68K && !GENERATINGCFM SetApplLimit(GetApplLimit() - (TK_MAC_68K_STACK_GROWTH)); # endif MaxApplZone(); for (i = 0; i < 4; i++) { (void) MoreMasters(); } /* * Tk needs us to set the qd pointer it uses. This is needed * so Tk doesn't have to assume the availability of the qd global * variable. Which in turn allows Tk to be used in code resources. */ tcl_macQdPtr = &qd; /* * If appearance is present, then register Tk as an Appearance client * This means that the mapping from non-Appearance to Appearance cdefs * will be done for Tk regardless of the setting in the Appearance * control panel. */ if (TkMacHaveAppearance()) { RegisterAppearanceClient(); } InitGraf(&tcl_macQdPtr->thePort); InitFonts(); InitWindows(); InitMenus(); InitDialogs((long) NULL); InitCursor(); /* * Make sure we are running on system 7 or higher */ if ((NGetTrapAddress(_Gestalt, ToolTrap) == NGetTrapAddress(_Unimplemented, ToolTrap)) || (((Gestalt(gestaltSystemVersion, &result) != noErr) || (result < mask)))) { panic("Tcl/Tk requires System 7 or higher."); } /* * Make sure we have color quick draw * (this means we can't run on 68000 macs) */ if (((Gestalt(gestaltQuickdrawVersion, &result) != noErr) || (result < gestalt32BitQD13))) { panic("Tk requires Color QuickDraw."); } FlushEvents(everyEvent, 0); SetEventMask(everyEvent); Tcl_MacSetEventProc(TkMacConvertEvent); return TCL_OK; } int Togl_MacSetupMainInterp(Tcl_Interp *interp) { TkMacInitAppleEvents(interp); TkMacInitMenus(interp); return TCL_OK; } #endif /* TOGL_AGL_CLASSIC */ netgen-6.2.1804/ng/drawing_togl17.tcl0000644000175000017500000001032313272137567015744 0ustar kurtkurt# # Creates a drawing frame, and binds mouse events # set oldmousex 0 set oldmousey 0 # # if { 1 } { if {[catch {togl .ndraw -width 400 -height 300 -rgba true -double true -depth true -privatecmap false -stereo false -indirect false }] } { puts "no OpenGL" } { # pack .ndraw -expand true -fill both -padx 10 -pady 10 catch { tkdnd::drop_target register .ndraw DND_Files } # bind .ndraw { set oldmousex %x; set oldmousey %y; } bind .ndraw { set oldmousex %x; set oldmousey %y; } bind .ndraw { set oldmousex %x; set oldmousey %y; } bind .ndraw { Ng_MouseMove $oldmousex $oldmousey %x %y $drawmode .ndraw render set oldmousex %x; set oldmousey %y; } bind .ndraw { Ng_MouseDblClick %x %y .ndraw render if { [winfo exists .bcprop_dlg] } { bcpropdialog } if { [winfo exists .surfacemeshsize_dlg] } { surfacemeshsizedialog } if { [winfo exists .fieldlines_dlg] } { fieldlinesdialog } } bind .ndraw { Ng_MouseMove $oldmousex $oldmousey %x %y move .ndraw render set oldmousex %x; set oldmousey %y; } bind .ndraw { if { $tcl_platform(os) == "Darwin" } { Ng_MouseMove $oldmousex $oldmousey %x %y move } { Ng_MouseMove $oldmousex $oldmousey %x %y zoom } .ndraw render set oldmousex %x; set oldmousey %y; } } proc popupcheckredraw { vari { x 0 } } { upvar $vari varname if { $varname == 1 } { set varname 0 } { # puts "popup-redraw $vari" Ng_Vis_Set parameters redraw } } proc popupcheckredraw2 { vari boolvar { x 0 } } { upvar $vari varname if { $varname == 1 } { set varname 0 } { Ng_SetVisParameters Ng_Vis_Set parameters if { $boolvar == 1 } { redraw } Ng_SetVisParameters } } proc popupcheckredraw3 { vari { x 0 } } { upvar $vari varname if { $varname == 1 } { set varname 0 } { Ng_Vis_Set parameters } } proc redraw { {x 0} } { if {[winfo exists .ndraw]} { .ndraw render } } bind . { Ng_MouseMove 0 0 -10 0 rotate; redraw } bind . { Ng_MouseMove 0 0 10 0 rotate; redraw } bind . { Ng_MouseMove 0 0 0 -10 rotate; redraw } bind . { Ng_MouseMove 0 0 0 10 rotate; redraw } bind . { Ng_MouseMove 0 0 -10 0 move; redraw } bind . { Ng_MouseMove 0 0 10 0 move; redraw } bind . { Ng_MouseMove 0 0 0 -10 move; redraw } bind . { Ng_MouseMove 0 0 0 10 move; redraw } bind . { Ng_MouseMove 0 0 0 -10 zoom; redraw } bind . { Ng_MouseMove 0 0 0 10 zoom; redraw } bind . \ {event generate [focus -displayof %W] -delta 120} bind . \ {event generate [focus -displayof %W] -delta -120} bind . { Ng_MouseMove 0 0 0 [expr {%D/-5}] zoom; redraw } # Drop callbacks: bind .ndraw <> { #tk_messageBox -message "Dropped files: \"[join %D {, }]\"" #%W state !active set index [string first . %D end-6] #tk_messageBox -message $index set type [string range %D $index+1 end] # tk_messageBox -message $type set ispde [string match -nocase $type "pde"] set isgeo [expr max([string match -nocase $type "geo"],[string match -nocase $type "in2d"])] set ismesh [expr max([string match -nocase $type "vol"],[string match -nocase $type "vol.gz"])] set ispy [string match -nocase $type "py"] if {$ispde == 1} { AddRecentNGSFile %D; NGS_LoadPDE %D; SetNumProcHelpMenu set selectvisual mesh; Ng_SetVisParameters } if {$ispy == 1} { AddRecentPYNGSFile %D; NGS_LoadPy %D; } if {$isgeo == 1} { AddRecentFile %D; Ng_LoadGeometry %D; Ng_ParseGeometry set selectvisual geometry Ng_SetVisParameters redraw wm title . [concat "$progname - " %D] set dirname [file dirname %D] set basefilename [file tail [file rootname %D]] } if {$ismesh == 1} { AddRecentMeshFile %D; Ng_LoadMesh %D; set selectvisual mesh Ng_SetVisParameters redraw Ng_ReadStatus; wm title . [concat "$progname - " %D] set dirname [file dirname %D] set basefilename [file tail [file rootname %D]] } return %A } netgen-6.2.1804/ng/CMakeLists.txt0000644000175000017500000000571713272137567015163 0ustar kurtkurtif(USE_INTERNAL_TCL) add_definitions(-DINTERNAL_TCL_DEFAULT=1) else() add_definitions(-DINTERNAL_TCL_DEFAULT=0) endif() set(netgen_sources ngappinit.cpp onetcl.cpp) if(WIN32) # add icon to netgen executable enable_language(RC) set(netgen_sources ${netgen_sources} ../windows/netgen.rc) # Don't use ccache here due to incompatibility with the resource compiler set_directory_properties(PROPERTIES RULE_LAUNCH_COMPILE "") endif(WIN32) if(USE_GUI) add_library(gui SHARED gui.cpp ngpkg.cpp demoview.cpp parallelfunc.cpp ../libsrc/stlgeom/stlpkg.cpp ../libsrc/visualization/visualpkg.cpp ../libsrc/csg/csgpkg.cpp ../libsrc/geom2d/geom2dpkg.cpp ../libsrc/occ/occpkg.cpp ../libsrc/occ/vsocc.cpp ) add_executable(netgen ngappinit.cpp onetcl.cpp) target_link_libraries( gui PUBLIC nglib ${ZLIB_LIBRARIES} ${JPEG_LIBRARIES} ${FFMPEG_LIBRARIES} ${X11_X11_LIB} ${OCC_LIBRARIES} ) target_link_libraries( gui PRIVATE ${LIBTOGL}) target_link_libraries( netgen nglib gui ) if(APPLE) # Leave decision about which tcl/tk version to use open to python (and it's tkinter package). # Thus, only link tcl/tk to the netgen executable and not to the gui library. target_link_libraries( netgen ${TK_LIBRARY} ${TCL_LIBRARY}) else(APPLE) # On other systems assume that the found libraries are compatible with python/tkinter target_link_libraries( gui PUBLIC ${TK_LIBRARY} ${TCL_LIBRARY}) endif(APPLE) if(NOT WIN32) target_link_libraries( netgen mesh stlvis stl geom2dvis interface geom2d csg stl visual csgvis ) target_link_libraries( gui PUBLIC mesh stlvis stl geom2dvis interface geom2d csg stl visual csgvis ) endif(NOT WIN32) install(TARGETS netgen ${NG_INSTALL_DIR}) install(TARGETS gui ${NG_INSTALL_DIR}) if(APPLE) set_target_properties(netgen PROPERTIES OUTPUT_NAME netgen) endif(APPLE) if(WIN32) set_target_properties( gui PROPERTIES OUTPUT_NAME libgui ) endif(WIN32) endif(USE_GUI) if(USE_PYTHON) add_library(ngpy SHARED netgenpy.cpp) target_link_libraries( ngpy nglib ) if(APPLE) set_target_properties( ngpy PROPERTIES SUFFIX ".so") elseif(WIN32) set_target_properties( ngpy PROPERTIES SUFFIX ".pyd") set_target_properties( ngpy PROPERTIES OUTPUT_NAME "libngpy") endif() set_target_properties(ngpy PROPERTIES INSTALL_RPATH "${NG_RPATH_TOKEN}/../${NETGEN_PYTHON_RPATH}") install(TARGETS ngpy DESTINATION ${NG_INSTALL_DIR_PYTHON}/${NG_INSTALL_SUFFIX} COMPONENT netgen) endif(USE_PYTHON) if(USE_GUI) if(NOT USE_INTERNAL_TCL) install(FILES dialog.tcl menustat.tcl ngicon.tcl ng.tcl ngvisual.tcl sockets.tcl nghelp.tcl ngshell.tcl ngtesting.tcl parameters.tcl variables.tcl csgeom.tcl stlgeom.tcl occgeom.tcl acisgeom.tcl netgen.ocf drawing.tcl DESTINATION ${NG_INSTALL_DIR_BIN} COMPONENT netgen) endif() add_subdirectory(Togl2.1) endif(USE_GUI) netgen-6.2.1804/ng/nghelp.tcl0000644000175000017500000002732213272137567014400 0ustar kurtkurtproc print_commandline_help { } { puts "Usage: ng { options }" puts "-geofile=filename Input geometry file (alternative: ng filename)" puts "-meshfile=filename Output mesh file" puts "-verycoarse, -coarse, -moderate, -fine, -veryfine" puts " Automatic mesh-size selection" puts "-meshsizefile=filename Load mesh-size file with local mesh sizes" puts "-meshfiletype={\"Neutral Format\", ...}" puts " Filetype of output file, default is netgen file" puts "-batchmode Run Netgen in batchmode" puts "-inputmeshfile=filename" puts " Input mesh file (batchmode only)" puts "-mergefile=filename Merge with mesh file (batchmode only)" puts "-refinementfile=filename" puts " Use refinementinfo from file (batchmode only)" puts "-serversocket=\#num Start a Netgen server with port \#num" puts "-V Print additional information" puts "-testout=filename file for test output" if { [catch { NGS_GetData } ] == 0 } { puts "\nNGSolve parameters:" puts "-pdefile=filename Load pde input file" puts "-solve Solve pde once" puts "-solve=n Solve pde by n adaptive refinement steps" puts "-recent Load and solve most recently loaded pde" } } proc set_menu_help { entry helpmsg } { global menuhelps set menuhelps($entry) $helpmsg } proc show_menu_help { entry } { global menuhelps if {[catch {set helptext $menuhelps($entry)}]} { set helptext "no help available " } .helpline configure -text $helptext if {[winfo exists .senshelp_dlg]==1} { .senshelp_dlg.text delete 1.0 end .senshelp_dlg.text insert end "Menu item: $entry\n\n" .senshelp_dlg.text insert end $helptext } } #tixBalloon .balloon -statusbar .helpline proc set_control_help { control helpmsg } { bind $control "show_control_help {$helpmsg}" bind $control "show_control_help {None}" .balloon bind $control -balloonmsg $helpmsg -statusmsg $helpmsg # puts "Add Help to $control" } proc show_control_help { helpmsg } { .helpline configure -text $helpmsg if {[winfo exists .senshelp_dlg]==1} { .senshelp_dlg.text delete 1.0 end .senshelp_dlg.text insert end $helpmsg } } proc sensitivehelpdialog { show } { set w .senshelp_dlg if {[winfo exists .senshelp_dlg] == 1} { if { $show == 1 } { wm withdraw .senshelp_dlg wm deiconify $w focus $w } { wm withdraw $w } } { toplevel $w # wm minsize $w 200 150 global senshelptext text $w.text -yscrollcommand "$w.scroll set" -setgrid true \ -width 40 -height 10 -wrap word scrollbar $w.scroll -command "$w.text yview" pack $w.scroll -side right -fill y pack $w.text -expand yes -fill both ttk::frame $w.bu pack $w.bu # -fill x ttk::button $w.close -text "Close" \ -command { wm withdraw .senshelp_dlg set showsensitivehelp 0 } pack $w.close if { $show == 1 } { wm withdraw $w wm geom $w +100+100 wm deiconify $w wm title $w "Help" focus $w } } } set_menu_help "File" "In File menu you can load and store geometries, meshes etc." set_menu_help "New Geometry" "Deletes current geometry" set_menu_help "Load Geometry" "Loads Geometry file in one of the formats STL (ASCII or binary), Constructive Solid Geometry (.geo) or 2D geometry. Please have a look into Netgen User's manuel for more details." set_menu_help "Save Geometry" "Saves STL Geometry in in either ASCII or binary STL format." set_menu_help "Load Mesh" "Loads surface and volume mesh in Netgen internal format." set_menu_help "Save Mesh" "Saves surface and volume mesh in Netgen internal format." set_menu_help "Write EPS File" "Dumps OpenGL rendering to EPS File." set_menu_help "Save Options" "Saves current options in file \"ng.opt\". These options will be loaded again when starting ng in the same directory." set_menu_help "Export Mesh" "Exports mesh in format defined by Export Filetype." set_menu_help "Export Filetype" "Selects file format for exporting mesh. Please have a look into the Netgen User's manual for more information." set_menu_help "Import Mesh" "Imports surface or volume mesh in exchange format." set_menu_help "Quit" "Quits Netgen" set_menu_help "Geometry" "Preparing geometries, visualiztion of geometries." set_menu_help "Scan CSG Geometry" "Generates surface triangulation for rendering" set_menu_help "CSG Options" "Sets Options for CSG visualization (bounding box, detail size, number of facets)." set_menu_help "CSG Properties" "Defines appearance of current CSG geometry (color, visibility, transparency)" set_menu_help "STL Doctor" "Calls STL Doctor for preprocessing STL geometry files." set_menu_help "STL Info" "Retrieves information about current STL geometry." set_menu_help "Mesh" "Menu for mesh generation" set_menu_help "Generate Mesh" "Generates mesh from geometry, same as Button \"Generate Mesh\"" set_menu_help "Stop Meshing" "Terminates meshgeneration. It may take a while until meshing terminates, please be patient." set_menu_help "Meshing Options" "Set options for mesh generation." set_menu_help "Delete Mesh" "Deletes mesh. Not necessary before generation of new mesh." set_menu_help "Delete Vol Mesh" "Deletes only volume mesh." set_menu_help "Mesh Quality" "Computs element shape measures. Triangle angles are inner angles of all triangles (faces of tetrahedra). Tet angles are angles between faces of tetrahedra." set_menu_help "Check Surface Mesh" "Checks consistency and overlap of surface mesh. Marks overlapping elements as bad elements, please enable visualization of bad elements in View->Mesh." set_menu_help "Check Volume Mesh" "Checks conformity of volume mesh." set_menu_help "Edit Boundary Conditions" "Open dialog for setting boundary condition numbers for individual faces." set_menu_help "Analyze Geometry" "Perform only first step in mesh generation. Action depends on geometry type, e.g. generates charts for STL mesh, find vertices in CSG geometries." set_menu_help "Mesh Edges" "Meshes edges" set_menu_help "Mesh Surface" "Generates surface mesh. Includes already surface optimization for some geometry types." set_menu_help "Optimize Surface" "Optimizes surface mesh." set_menu_help "Surface Optim. Step" "Performs a specific surface optimiztion step. Mesh smoothing moves nodes. edge swapping swaps the diagonal of a quadrilateral built by two triangles, criterion either by number of nodes, or anlges. Combine points eliminates triangles by combining points (in the center of gravity)." set_menu_help "Mesh Volume" "Performs volume meshing. Algorithm is a combination of Delaunay and Rule-based Advancing Front" set_menu_help "Optimize Volume" "Performs additional volume optimization steps" set_menu_help "Smooth Opt Volume" "Performs optimization steps by smoothing iterations" set_menu_help "Smooth Opt Volume Jacobian" "Volume optimization by smoothing iterations. Criterion is optimization of Jacobi determinants. This optimization step is also available for 10-node tetrahedra." set_menu_help "View" "Sets viewing options" set_menu_help "Zoom all" "Zooms scene to show whole object" set_menu_help "Center" "Defines center of rotation" set_menu_help "Viewing Options" "Sets viewing options for geometry, mesh, lighting" set_menu_help "Clipping Plane" "Introduces clipping plane. The clipping plane is defined by the normal vector, and a scaled offset. Clipping of performed by OpenGl rendering" set_menu_help "Quality Plot" "Shows the element quality distribution histogram. Measure is volume scaled by edge-length to the third. Optimal elements have measure 1." set_menu_help "Sensitive Help" "Shows this help window" set_menu_help "Mesh-size" "Manipulations of existing mesh" set_menu_help "Refine uniform" "Refines mesh by splitting elements into eight childs (algorithm of J. Bey)" set_menu_help "Second Order" "Converts 4 node elements to 10 node elements. Edge-midpoitns are projected to the geometry." set_menu_help "Refinement Dialog" "Controls local mesh refinement" set_menu_help "Load Meshsize" "Loads mesh-size file for local mesh refinement." set_menu_help "MS from Surf Mesh" "Defines mesh-size by the surface mesh." set f .options_dlg.nb.nbframe.general # set_control_help $f "General meshing page" set_control_help $f.fine "Controls relative mesh size.\nThis control affects other mesh-size controls in common" set_control_help $f.first "First step in mesh generation. Usually, meshing starts from \"analyze geometry\". If the surface mesh is already available \"First step\" should be set to \"mesh volume\"" set_control_help $f.last "Last step in mesh generation. If only the surface mesh is required, please set \"Last Step\" to \"Optimize Surface\"" set_control_help .bubar.surfm "Start mesh generation" set_control_help .bubar.stopm "Stop mesh generation" proc help_item { helptext } {p puts $helptext } proc show_help { } { set w .help if {[winfo exists .help] == 1} { wm withdraw $w wm deiconif $w focus $w } { toplevel $w frame $w.buttons pack $w.buttons -side bottom -fill x -pady 2m button $w.buttons.done -text Done -command "destroy $w" pack $w.buttons.done -side left -expand 1 text $w.text -yscrollcommand "$w.scroll set" -setgrid true \ -width 60 -height 24 -wrap word scrollbar $w.scroll -command "$w.text yview" pack $w.scroll -side right -fill y pack $w.text -expand yes -fill both } $w.text configure -state normal $w.text delete 1.0 end } set bold "-background #43ce80 -relief raised -borderwidth 1" set normal "-background {} -relief flat" proc help_main { } { show_help; set w .help global bold global normal $w.text insert 0.0 \ {NETGEN Help} $w.text insert end \n\n $w.text insert end \ {1. General} d1 $w.text insert end \n\n $w.text insert end \ {2. Menu items } d2 $w.text insert end \n\n foreach tag {d1 d2} { $w.text tag bind $tag "$w.text tag configure $tag $bold" $w.text tag bind $tag "$w.text tag configure $tag $normal" } $w.text tag bind d1 <1> { puts "general"; help_general } $w.text tag bind d2 <1> { help_menus } $w.text configure -state disabled } proc help_general { } { show_help; set w .help global bold global normal puts "general called" $w.text insert 0.0 \ {NETGEN is an automatic three dimensional tetrahedral mesh generation system. It accepts input from constructive solid geometry (CSG) or boundary representation (BRep) from STEP or STL file format. NETGEN contains modules for mesh optimization and hierarchical mesh refinement.} $w.text configure -state disabled } proc help_menus { } { show_help; set w .help global bold global normal $w.text insert 0.0 \ {The NETGEN Menu items are} $w.text insert end \n\n $w.text insert end \ {1. File} d1 $w.text insert end \n\n $w.text insert end \ {2. Geometry } d2 $w.text insert end \n\n $w.text insert end \ {3. Mesh } d3 $w.text insert end \n\n $w.text insert end \ {4. View } d4 $w.text insert end \n\n $w.text insert end \ {5. Mesh-size } d5 $w.text insert end \n\n $w.text insert end \ {6. STL } d6 foreach tag {d1 d2 d3 d4 d5 d6} { $w.text tag bind $tag "$w.text tag configure $tag $bold" $w.text tag bind $tag "$w.text tag configure $tag $normal" } $w.text tag bind d1 <1> {puts "File menu"} $w.text tag bind d2 <1> {puts "Geometry menu"} $w.text tag bind d3 <1> {puts "Mesh menu"} $w.text tag bind d4 <1> {puts "View menu"} $w.text tag bind d5 <1> {puts "Mesh-size menu"} $w.text tag bind d6 <1> {puts "STL menu"} $w.text configure -state disabled } netgen-6.2.1804/ng/ng.tcl0000644000175000017500000001553713272137567013534 0ustar kurtkurtcatch {lappend auto_path $env(NETGENDIR) } catch {lappend auto_path $env(NETGENDIR)/../lib } if {[catch {Ng_GetCommandLineParameter batchmode} result ]} { load libgui[info sharedlibextension] gui } set batchmode [Ng_GetCommandLineParameter batchmode] if {$batchmode=="undefined"} { # if {[catch {package require Tix } result ]} { # puts "cannot load package Tix" # puts "error : $result" # } if {[catch {package require tkdnd } result ]} { # puts "cannot load package tkdnd" # puts "error : $result" } } # if {[catch {package require Togl 2.0 } result ]} { # puts "cannot load package Togl 2.0" # puts "error : $result" # } # load [file dirname [info script]]/gears[info sharedlibextension] # puts "load togl lib" # load /Users/joachim/tcl_native3/Togl2.1/libTogl2.1.dylib # puts "have togl lib" # if {[catch {package require Togl 2.0 } result ]} { # puts "cannot load package Togl 2.0" # puts "error : $result" # } # userlevel 1..standard user 2..power-user 3..developer set userlevel 3 if { [Ng_GetCommandLineParameter expert]=="defined" } { set userlevel 3 } set progname "NETGEN" set ngdir "" if { [lsearch [array names env] NETGENDIR] != -1 } { set ngdir $env(NETGENDIR) } if { [string length $ngdir] == 0 } { set ngdir "." } set nguserdir "" if { [lsearch [array names env] NETGEN_USER_DIR] != -1 } { set nguserdir $env(NETGEN_USER_DIR) } if { [string length $nguserdir] == 0 } { set nguserdir "." } set batchmode [Ng_GetCommandLineParameter batchmode] set solvemode 0 if { [Ng_GetCommandLineParameter solve] != "undefined" || \ [Ng_GetCommandLineParameter recent] == "defined" } { set solvemode defined } set shellmode [Ng_GetCommandLineParameter shellmode] if { $shellmode == "defined" } { set batchmode "defined" } if { $batchmode != "defined" } { catch { wm withdraw . wm title . $progname wm geometry . =850x600 wm minsize . 400 300 } } source ${ngdir}/variables.tcl source ${ngdir}/parameters.tcl if { $batchmode != "defined" } { catch { source ${ngdir}/menustat.tcl } } catch { source ${ngdir}/dialog.tcl } catch { source ${ngdir}/drawing.tcl } # if { [catch { load libgeom2dvis[info sharedlibextension] Ng_Geom2d } result ] } { # puts "cannot load 2d meshing module" # puts "error: $result" # } catch { source ${ngdir}/csgeom.tcl } catch { source ${ngdir}/stlgeom.tcl } set hasocc no catch { source ${ngdir}/occgeom.tcl } source ${ngdir}/acisgeom.tcl catch { source ${ngdir}/nghelp.tcl } catch { source ${ngdir}/ngvisual.tcl } catch { source ${ngdir}/sockets.tcl } catch { source ${ngdir}/acis.tcl } set zugstange 0 catch { source ${ngdir}/trafo/menu.tcl } setgranularity ${meshoptions.fineness} Ng_SetMeshingParameters Ng_SetVisParameters Ng_SetDebugParameters Ng_STLDoctor Ng_GeometryOptions set if { $hasocc == "yes" } { Ng_SetOCCVisParameters } if { $batchmode != "defined" } { catch { wm protocol . WM_DELETE_WINDOW { .ngmenu.file invoke "Quit" } wm deiconify . } } set trafoapp 0 catch { source ${ngdir}/trafoapp/trafoapp.tcl } set geofilename [Ng_GetCommandLineParameter geofile] if { $geofilename != "undefined" && [info exists trafo] == 0 && $zugstange == 0} { if { [ catch { Ng_LoadGeometry $geofilename } errstring] == 0 } { if { $batchmode != "defined" } { AddRecentFile $geofilename } Ng_ParseGeometry if { $batchmode != "defined" } { set selectvisual geometry Ng_SetVisParameters redraw wm title . [concat "$progname - " $geofilename] } set dirname [file dirname $geofilename] set basefilename [file tail [file rootname $geofilename]] } { puts "Problem with input file:" puts "$errstring" } } set cnt 0 foreach { gran } { verycoarse coarse moderate fine veryfine } { set cnt [expr $cnt + 1] if { [Ng_GetCommandLineParameter $gran] == "defined" } { set meshoptions.fineness $cnt setgranularity ${meshoptions.fineness} } } set meshfilename [Ng_GetCommandLineParameter meshfile] if { $meshfilename == "undefined" } { set meshfilename out.mesh } set meshfiletype [Ng_GetCommandLineParameter meshfiletype] if { $meshfiletype == "undefined" } { set meshfiletype netgen } set inputmeshfilename [Ng_GetCommandLineParameter inputmeshfile] set mergemeshfilename [Ng_GetCommandLineParameter mergefile] set meshsizefilename [Ng_GetCommandLineParameter meshsizefile] if { $meshsizefilename != "undefined" } { set options.meshsizefilename $meshsizefilename } set refinementfilename [Ng_GetCommandLineParameter refinementfile] if { $batchmode == "defined" && $solvemode != "defined"} { set options.parthread 0 if { $shellmode == "undefined" } { # old batchmode: only processes commandline arguments set selectvisual mesh Ng_SetVisParameters set meshsize [Ng_GetCommandLineParameter meshsize] if {$meshsize != "undefined"} { set options.meshsize $meshsize } if { $inputmeshfilename == "undefined" } { Ng_GenerateMesh ${meshoptions.firststep} ${meshoptions.laststep} } else { Ng_LoadMesh $inputmeshfilename if { $mergemeshfilename != "undefined" } { Ng_MergeMesh $mergemeshfilename } } if { $refinementfilename != "undefined" } { Ng_Bisect $refinementfilename } if { $meshfiletype == "netgen" } { Ng_SaveMesh $meshfilename } else { if { [catch { Ng_ExportMesh $meshfilename $meshfiletype } ] == 1 } { puts "Unknown file format $meshfiletype" } } Ng_Exit; exit } else { set code [catch { source ${ngdir}/ngshell.tcl } errcode] if {$code} { puts "error: $errcode" } set code [ catch {Ng_RunShell} errcode] if {$code} { puts "error: $errcode" } Ng_Exit; exit } } set stereo [Ng_GetCommandLineParameter stereo] if { $stereo == "defined" } { set viewoptions.stereo 1 puts "use stereo mode" Ng_SetVisParameters; redraw } set ngsolve_loaded 0 catch { source ${ngdir}/ngsolve.tcl; set ngsolve_loaded 1 } # try to find ngsolve.tcl in PATH set pathlist [split $::env(PATH) \ [expr {$::tcl_platform(platform) == "windows" ? ";" : ":"}]] foreach dir $pathlist { if { $ngsolve_loaded != 1 } { catch { source ${dir}/ngsolve.tcl set ngsolve_loaded 1 } } } set scriptfilename [Ng_GetCommandLineParameter script] if { $scriptfilename != "undefined" } { if { [catch { source $scriptfilename } errstring] == 1 } { puts "Error in input: $errstring" } } if { [Ng_GetCommandLineParameter help]=="defined" } { if { $zugstange == 1 } { print_zug_commandline_help exit; } { if { $trafoapp == 1 } { print_trafo_commandline_help; } { print_commandline_help; Ng_Exit; exit } } } if { [file exists startup.tcl] } { source startup.tcl } catch { source ${ngdir}/demoapp.tcl } catch { source ${ngdir}/dropsexp.tcl } netgen-6.2.1804/ng/ngtesting.tcl0000644000175000017500000001332213272137567015120 0ustar kurtkurt # tests.tcl proc Ng_TestMeshing { infile outfile logfile} { if { ![file exists $infile]} { puts $logfile "error: file $infile does not exist" } else { puts -nonewline $logfile " loading geometry: "; ngtic; Ng_LoadGeometry "$infile"; ngtoc $logfile puts -nonewline $logfile " parsing geometry: "; ngtic; Ng_ParseGeometry; ngtoc $logfile puts -nonewline $logfile " generating mesh: "; ngtic; Ng_GenerateMesh; ngtoc $logfile puts -nonewline $logfile " saving mesh: "; ngtic; Ng_SaveMesh "$outfile"; ngtoc $logfile flush $logfile } } # tests.tcl proc Ngs_TestPDE { infile {nsolves 1} logfile } { if { ![file exists $infile]} { puts $logfile "error: file $infile does not exist" } else { puts -nonewline $logfile " loading PDE file: "; ngtic; ngsloadpde "$infile"; ngtoc $logfile for {set i 1} {$i<=$nsolves} {incr i 1} { puts -nonewline $logfile " solve PDE level $i: "; ngtic; ngssolvepde; ngtoc $logfile } flush $logfile } } proc ngtest { {t all} {f ""}} { ngset printmsg 0 if {$f == "" } { set logfile stdout } else { set logfile [open $f "w"] } global options.parthread set options.parthread 0 Ng_SetMeshingParameters if {$t == "all"} { ngtest in2d $f ngtest geo $f ngtest stl $f ngtest pde $f return } elseif {$t == "in2d"} { puts "\n*** performing in2d file tests ***" puts " ** writing results to $f" puts "\n ** testing in2d files in examples/ **" set testdir "$::ngdir/../examples" set in2dfiles { beam2d hyperbolic piezo2dround rectangle squareincl squareinsquare } foreach {tfile} $in2dfiles { if {$f != ""} { puts " * meshing file examples/$tfile.in2d..." } puts $logfile "\n * meshing file examples/$tfile.in2d..."; flush $logfile Ng_TestMeshing "$testdir/$tfile.in2d" "$testdir/$tfile.vol" $logfile } puts "\n ** testing in2d files in tutorials/ **" set testdir "$::ngdir/../share/netgen" set in2dfiles { demo2d newin2d square v2in2d } foreach {tfile} $in2dfiles { if {$f != ""} { puts " * meshing file tutorials/$tfile.in2d..." } puts $logfile "\n * meshing file tutorials/$tfile.in2d..."; flush $logfile Ng_TestMeshing "$testdir/$tfile.in2d" "$testdir/$tfile.vol" $logfile } puts "*** in2d tests complete" } elseif {$t == "geo"} { puts "\n*** performing geo file tests ***" puts " ** writing results to $f" puts "\n ** testing geo files in examples/ **" set testdir "$::ngdir/../examples" set geofiles { beam cylsphere rboxcyl thinc boxcyl fichera period saw_3d thinplate coilshield gamm3d plate shaft tripelpendel cube halfsphere poly shell twocubes cylinder kaese quarter3d skew_prisms } foreach {tfile} $geofiles { if {$f != ""} { puts " * meshing file examples/$tfile.geo..."; flush $logfile } puts $logfile "\n * meshing file examples/$tfile.geo..."; flush $logfile Ng_TestMeshing "$testdir/$tfile.geo" "$testdir/$tfile.vol" $logfile } puts "\n ** testing geo files in tutorials/ **" set testdir "$::ngdir/../share/netgen" set geofiles { boxcyl cubemcyl extrusion revolution trafo circle_on_cube cubemsphere fichera sculpture twobricks cone cylinder lshape3d shaft twocubes cubeandring cylsphere manyholes sphere twocyl cubeandspheres ellipsoid matrix sphereincube cube ellipticcyl period torus } foreach {tfile} $geofiles { if {$f != ""} { puts " * meshing file $tfile.geo..." } puts $logfile "\n * meshing file $tfile.geo..."; flush $logfile Ng_TestMeshing "$testdir/$tfile.geo" "$testdir/$tfile.vol" $logfile } } elseif {$t == "stl"} { puts "\n*** performing stl file tests ***" # set logfile [open stltest.log "w"] puts " ** writing results to $f" puts "\n ** testing stl files in examples/ **" set testdir "$::ngdir/../examples" set stlfiles { crankshaft hinge1 } foreach {tfile} $stlfiles { if {$f != ""} { puts " * meshing file examples/$tfile.stl..." } puts $logfile "\n * meshing file examples/$tfile.stl..."; flush $logfile Ng_TestMeshing "$testdir/$tfile.stl" "$testdir/$tfile.vol" $logfile } puts "\n ** testing stl files in tutorials/ **" set testdir "$::ngdir/../tutorials" set stlfiles { hinge part1 } foreach {tfile} $stlfiles { if {$f != ""} { puts " * meshing file tutorials/$tfile.stl..." } puts $logfile "\n * meshing file tutorials/$tfile.stl..."; flush $logfile Ng_TestMeshing "$testdir/$tfile.stl" "$testdir/$tfile.vol" $logfile } puts "*** stl tests complete" } elseif {$t == "pde"} { puts "\n*** preforming pde tests ***" # set logfile [open pdetest.log "w"] puts " ** writing results to $f" puts "\n ** testing pde files in ngsolve/pde_tutorial/ **" set testdir "$::ngdir/../ngsolve/pde_tutorial" set pdefiles { d1_square.pde d2_chip.pde d3_helmholtz.pde d4_cube.pde d5_beam.pde d6_shaft.pde d7_coil.pde d8_coilshield.pde } foreach {tfile} $pdefiles { if {$f != ""} { puts " * testing ngsolve/pde_tutorial/$tfile..." } puts $logfile "\n * testing ngsolve/pde_tutorial/$tfile..."; flush $logfile Ngs_TestPDE "$testdir/$tfile" 1 $logfile } puts "*** pde tests complete" } else { puts $logfile "error: unknown test program '$t'"; flush $logfile } puts "" } Ng_RegisterCmd "ngtest" "netgen" "ngtest" "perform ng standard tests: all in2d geo stl" netgen-6.2.1804/ng/parallelfunc.hpp0000644000175000017500000000035113272137567015571 0ustar kurtkurtdas braucht keiner mehr #ifndef FILE_PARALLELFUNC #define FILE_PARALLELFUNC void ParallelRun(); void LoadPDEParallel ( const char* filename ); #ifdef NGSOLVE // void NGS_ParallelRun ( const string & message); #endif #endif netgen-6.2.1804/ng/acisgeom.tcl0000644000175000017500000000056313272137567014710 0ustar kurtkurtif { [Ng_ACISCommand isACISavailable] == "yes" } { .ngmenu.geometry add command -label "ACIS Topology Explorer..." \ -command { acisdialog; } .ngmenu.geometry add command -label "ACIS combine all" \ -command { Ng_ACISCommand combineall } .ngmenu.geometry add command -label "ACIS Create CT" \ -command { Ng_ACISCommand createct } } netgen-6.2.1804/ng/ngvisual.tcl0000644000175000017500000017514313272137567014760 0ustar kurtkurtNg_Vis_Set parameters set viscnt 0 proc snapshottimer { } { after 2000 { snapshottimer } global viscnt set viscnt [expr $viscnt+1] set s1 0000$viscnt # puts $s1 set cnt [string range $s1 [expr [string length $s1]-4] end] set filename "p$cnt.jpg" # puts "cnt = $cnt" # puts "filename = $filename" # .ndraw Ng_SnapShot pictures/$filename } snapshottimer proc redrawtimer { } { global visoptions.autoredraw global visoptions.autoredrawtime set delay [expr int(${visoptions.autoredrawtime}*1000)] if { ${visoptions.autoredraw} == 1 } { redraw; } after $delay { redrawtimer } } redrawtimer set perstarttime [clock clicks -millisecond] proc redrawperiodic { } { global visoptions.redrawperiodic global perstarttime set curtime [clock clicks -millisecond] # puts "redraw periodic, time = $curtime" Ng_Vis_Set time [expr ($curtime - $perstarttime) / 5] redraw if { ${visoptions.redrawperiodic} == 1 } { after 30 { redrawperiodic } }; } proc addplotline { identifier datax datay plotinfo {color black}} { set c $identifier.c set xstart [lindex $plotinfo 0] set ystart [lindex $plotinfo 1] set xmin [lindex $plotinfo 2] set ymin [lindex $plotinfo 3] set unitx [lindex $plotinfo 4] set unity [lindex $plotinfo 5] set latestx [expr ([lindex $datax 0]-$xmin)*$unitx + $xstart] set latesty [expr ([lindex $datay 0]-$ymin)*$unity + $ystart] for {set i 1} {$i < [llength $datax]} {incr i} { set xpos [expr ([lindex $datax $i]-$xmin)*$unitx + $xstart] set ypos [expr ([lindex $datay $i]-$ymin)*$unity + $ystart] $c create line $latestx $latesty $xpos $ypos -width 1 -fill $color set latestx $xpos set latesty $ypos } } proc createlineplot { width height identifier title xmin xmax ymin ymax plotinfo} { set thiswidth $width set thisheight $height if { $thiswidth < 275 } { set thiswidth 275 } if { $thisheight < 225 } { seth thisheight 225 } set w $identifier if {[winfo exists $w] == 1} { wm withdraw $w wm deiconify $w focus $w } { toplevel $w set c $w.c canvas $c -relief raised -width $thiswidth -height $thisheight pack $w.c -side top -fill x set titleFont {Helvetica 18} set smallFont {Helvetica 12} set xstart 100 set xend [expr $thiswidth-75] set ystart [expr $thisheight-75] set yend 75 $c create line $xstart $ystart $xstart $yend -width 2 $c create line $xstart $ystart $xend $ystart -width 2 set unitx [expr double($xend-$xstart)/($xmax-$xmin)] set unity [expr double($yend-$ystart)/($ymax-$ymin)] for {set i 0} {$i <= 1} {set i [expr $i+0.2]} { $c create line [expr $xstart+$i*($xend-$xstart)] [expr $ystart] [expr $xstart+$i*($xend-$xstart)] [expr $ystart+5] -width 2 $c create text [expr $xstart+$i*($xend-$xstart)] [expr $ystart+7] -anchor n -font $smallFont \ -text [format "%.3g" [expr $xmin+$i*($xmax-$xmin)]] $c create line [expr $xstart] [expr $ystart+$i*($yend-$ystart)] [expr $xstart-7] [expr $ystart+$i*($yend-$ystart)] -width 2 $c create text [expr $xstart-9] [expr $ystart+$i*($yend-$ystart)] -anchor e -font $smallFont \ -text [format "%.3g" [expr $ymin+$i*($ymax-$ymin)]] } upvar $plotinfo ploti set ploti "$xstart $ystart $xmin $ymin $unitx $unity" button $w.close -text "Close" -command "destroy $w" pack $w.close wm withdraw $w wm geom $w +100+100 wm deiconify $w wm title $w $title focus $w } } proc getlineplotdata { datax datay xmini xmaxi ymini ymaxi} { upvar $datax datx upvar $datay daty upvar $xmini xmin upvar $xmaxi xmax upvar $ymini ymin upvar $ymaxi ymax global visoptions.lineplotusingx global visoptions.lineplotusingy global visoptions.lineplotsource global visoptions.lineplotfile set datx "" set daty "" set xmin 1e20 set xmax -1e20 set ymin 1e20 set ymax -1e20 if {${visoptions.lineplotsource} == "file"} { set fileId [open ${visoptions.lineplotfile} r] set line "" while {[gets $fileId line] >= 0} { if { [string index [lindex $line 0] 0] != "\#" } { if { ${visoptions.lineplotusingx} < [llength $line] } { lappend datx [lindex $line ${visoptions.lineplotusingx}] if { [lindex $datx end] < $xmin } {set xmin [lindex $datx end]} if { [lindex $datx end] > $xmax } {set xmax [lindex $datx end]} } { lappend datx 0 } if { ${visoptions.lineplotusingy} < [llength $line] } { lappend daty [lindex $line ${visoptions.lineplotusingy}] if { [lindex $daty end] < $ymin } {set ymin [lindex $daty end]} if { [lindex $daty end] > $ymax } {set ymax [lindex $daty end]} } { lappend daty 0 } } } close $fileId } } proc lineplotdialog { } { set w .lineplot_dlg if {[winfo exists .lineplot_dlg] == 1} { wm withdraw $w wm deiconify $w focus $w } { toplevel $w ttk::frame $w.filesettings -relief groove -borderwidth 3 ttk::frame $w.filesettings.title ttk::radiobutton $w.filesettings.title.choose -variable visoptions.lineplotsource \ -value file -text "Data from File" pack $w.filesettings.title.choose -side left pack $w.filesettings.title global visoptions.lineplotselectedeval global visoptions.lineplotfile global visoptions.evaluatefilenames global visoptions.evaluatefiledescriptions set evdata [NGS_GetData evaluatefiles] set visoptions.evaluatefilenames none set visoptions.evaluatefiledescriptions none for {set i 0} {[expr $i+1] < [llength $evdata]} {incr i 2} { lappend visoptions.evaluatefilenames [lindex $evdata $i] lappend visoptions.evaluatefiledescriptions [lindex $evdata [expr $i+1]] } # tixOptionMenu $w.filesettings.latestevals -label "Use Evaluate Results: " \ # -options { # label.width 25 # label.anchor e # menubutton.width 40 # } # for {set i 0} {$i < [llength ${visoptions.evaluatefilenames}]} {incr i} { # $w.filesettings.latestevals add command $i \ # -label "[lindex ${visoptions.evaluatefiledescriptions} $i] ([lindex ${visoptions.evaluatefilenames} $i])" # } # $w.filesettings.latestevals config -variable visoptions.lineplotselectedeval # pack $w.filesettings.latestevals ttk::frame $w.filesettings.latestevals ttk::label $w.filesettings.latestevals.lab -text "Use Evaluate Results: " ttk::menubutton $w.filesettings.latestevals.but -menu $w.filesettings.latestevals.menu -text "coarse" -width 40 menu $w.filesettings.latestevals.menu -tearoff 0 for {set i 0} {$i < [llength ${visoptions.evaluatefilenames}]} {incr i} { $w.filesettings.latestevals.menu add command -label $i\ -command "set visoptions.lineplotselectedeval $i ; $w.filesettings.latestevals.but configure -text \"[lindex ${visoptions.evaluatefiledescriptions} $i] ([lindex ${visoptions.evaluatefilenames} $i])\"" } $w.filesettings.latestevals.menu invoke ${visoptions.lineplotselectedeval} grid $w.filesettings.latestevals.lab $w.filesettings.latestevals.but -sticky nw pack $w.filesettings.latestevals ttk::frame $w.filesettings.sfn ttk::button $w.filesettings.sfn.bb -text "Browse" \ -command { set visoptions.lineplotfile [tk_getOpenFile] } ttk::entry $w.filesettings.sfn.fn -width 50 \ -textvariable visoptions.lineplotfile pack $w.filesettings.sfn.bb $w.filesettings.sfn.fn -side left pack $w.filesettings.sfn ttk::button $w.filesettings.refresh -text "Refresh" -command { if { ${visoptions.lineplotselectedeval} != 0} { set visoptions.lineplotfile [lindex ${visoptions.evaluatefilenames} ${visoptions.lineplotselectedeval}] } set saveusingx ${visoptions.lineplotusingx} set saveusingy ${visoptions.lineplotusingy} for { set i 0 } { $i < [llength ${visoptions.lineplotdatadescr}] } { incr i } { ${visoptions.lineplotxcoordselector} delete $i } for { set i 0 } { $i < [llength ${visoptions.lineplotdatadescr}] } { incr i } { ${visoptions.lineplotycoordselector} delete $i } set fileId [open ${visoptions.lineplotfile} r] set line "" gets $fileId line close $fileId if { [lindex $line 0] == "\#nglineplotinfo" } { set visoptions.lineplotdatadescr [lrange $line 1 end] } { set visoptions.lineplotdatadescr "" for { set i 0 } { $i < [llength $line] } { incr i } { lappend visoptions.lineplotdatadescr "data[expr $i+1]" } } for { set i 0 } { $i < [llength ${visoptions.lineplotdatadescr}] } { incr i } { ${visoptions.lineplotxcoordselector} add command $i -label [lindex ${visoptions.lineplotdatadescr} $i] } for { set i 0 } { $i < [llength ${visoptions.lineplotdatadescr}] } { incr i } { ${visoptions.lineplotycoordselector} add command $i -label [lindex ${visoptions.lineplotdatadescr} $i] } if { $saveusingx < [llength ${visoptions.lineplotdatadescr}] } { set visoptions.lineplotusingx $saveusingx } { set visoptions.lineplotusingx 0 } if { $saveusingy < [llength ${visoptions.lineplotdatadescr}] } { set visoptions.lineplotusingy $saveusingy } { set visoptions.lineplotusingy 1 } } pack $w.filesettings.refresh ttk::frame $w.filesettings.using global visoptions.lineplotdatadescr # tixOptionMenu $w.filesettings.using.xco -label "X-Coord:"\ # -options { # label.width 8 # label.anchor e # menubutton.width 15 # } # for { set i 0 } { $i < [llength ${visoptions.lineplotdatadescr}] } { incr i } { # $w.filesettings.using.xco add command $i -label [lindex ${visoptions.lineplotdatadescr} $i] # } ttk::frame $w.filesettings.using.xco ttk::label $w.filesettings.using.xco.lab -text "X-Coord:" ttk::menubutton $w.filesettings.using.xco.but -menu $w.filesettings.using.xco.menu -text "" -width 15 menu $w.filesettings.using.xco.menu -tearoff 0 for {set i 0} {$i < [llength ${visoptions.lineplotdatadescr}]} {incr i} { $w.filesettings.using.xco.menu add command -label [lindex ${visoptions.lineplotdatadescr} $i]\ -command "set visoptions.lineplotusingx $i ; $w.filesettings.using.xco.but configure -text \"[lindex ${visoptions.lineplotdatadescr} $i]\"" } $w.filesettings.using.xco.menu invoke [lindex ${visoptions.lineplotdatadescr} 0] grid $w.filesettings.using.xco.lab $w.filesettings.using.xco.but -sticky nw #pack $w.filesettings.using.xco # $w.filesettings.using.xco config -variable visoptions.lineplotusingx # tixOptionMenu $w.filesettings.using.yco -label "Y-Coord:"\ # -options { # label.width 8 # label.anchor e # menubutton.width 15 # } # for { set i 0 } { $i < [llength ${visoptions.lineplotdatadescr}] } { incr i } { # $w.filesettings.using.yco add command $i -label [lindex ${visoptions.lineplotdatadescr} $i] # } # $w.filesettings.using.yco config -variable visoptions.lineplotusingy ttk::frame $w.filesettings.using.yco ttk::label $w.filesettings.using.yco.lab -text "Y-Coord:" ttk::menubutton $w.filesettings.using.yco.but -menu $w.filesettings.using.yco.menu -text "" -width 15 menu $w.filesettings.using.yco.menu -tearoff 0 for {set i 0} {$i < [llength ${visoptions.lineplotdatadescr}]} {incr i} { $w.filesettings.using.yco.menu add command -label [lindex ${visoptions.lineplotdatadescr} $i]\ -command "set visoptions.lineplotusingy $i ; $w.filesettings.using.yco.but configure -text \"[lindex ${visoptions.lineplotdatadescr} $i]\"" } $w.filesettings.using.yco.menu invoke [lindex ${visoptions.lineplotdatadescr} 0] grid $w.filesettings.using.yco.lab $w.filesettings.using.yco.but -sticky nw global visoptions.lineplotxcoordselector global visoptions.lineplotycoordselector set visoptions.lineplotxcoordselector $w.filesettings.using.xco set visoptions.lineplotycoordselector $w.filesettings.using.yco pack $w.filesettings.using.xco $w.filesettings.using.yco -side left pack $w.filesettings.using pack $w.filesettings -fill x -ipady 3 ttk::frame $w.settings -relief groove -borderwidth 3 ttk::label $w.settings.title -text "\nSettings\n" pack $w.settings.title ttk::frame $w.settings.minmax ttk::checkbutton $w.settings.minmax.autoscale -text "Autoscale" -variable visoptions.lineplotautoscale # tixControl $w.settings.minmax.xmin -label "Min. x: " \ # -integer false -variable visoptions.lineplotxmin \ # -options { # entry.width 6 # label.width 8 # label.anchor e # } ttk::frame $w.settings.minmax.xmin ttk::label $w.settings.minmax.xmin.label -text "Min. x: " ttk::spinbox $w.settings.minmax.xmin.sp -textvariable visoptions.lineplotxmin -width 6 -increment 0.1 -validate focus -validatecommand "my_validatespinbox %W %P 3" \ -invalidcommand "my_invalidspinbox %W" -from -1e9 -to 1e9 # tixControl $w.settings.minmax.xmax -label "Max. x: " \ # -integer false -variable visoptions.lineplotxmax \ # -options { # entry.width 6 # label.width 8 # label.anchor e # } ttk::frame $w.settings.minmax.xmax ttk::label $w.settings.minmax.xmax.label -text "Max. x: " ttk::spinbox $w.settings.minmax.xmax.sp -textvariable visoptions.lineplotxmax -width 6 -increment 0.1 -validate focus -validatecommand "my_validatespinbox %W %P 3" \ -invalidcommand "my_invalidspinbox %W" -from -1e9 -to 1e9 # tixControl $w.settings.minmax.ymin -label "Min. y: " \ # -integer false -variable visoptions.lineplotymin \ # -options { # entry.width 6 # label.width 8 # label.anchor e # } ttk::frame $w.settings.minmax.ymin ttk::label $w.settings.minmax.ymin.label -text "Min. y: " ttk::spinbox $w.settings.minmax.ymin.sp -textvariable visoptions.lineplotymin -width 6 -increment 0.1 -validate focus -validatecommand "my_validatespinbox %W %P 3" \ -invalidcommand "my_invalidspinbox %W" -from -1e9 -to 1e9 # tixControl $w.settings.minmax.ymax -label "Max. y: " \ # -integer false -variable visoptions.lineplotymax \ # -options { # entry.width 6 # label.width 8 # label.anchor e # } ttk::frame $w.settings.minmax.ymax ttk::label $w.settings.minmax.ymax.label -text "Max. y: " ttk::spinbox $w.settings.minmax.ymax.sp -textvariable visoptions.lineplotymax -width 6 -increment 0.1 -validate focus -validatecommand "my_validatespinbox %W %P 3" \ -invalidcommand "my_invalidspinbox %W" -from -1e9 -to 1e9 pack $w.settings.minmax.xmin.label $w.settings.minmax.xmin.sp pack $w.settings.minmax.xmax.label $w.settings.minmax.xmax.sp pack $w.settings.minmax.ymin.label $w.settings.minmax.ymin.sp pack $w.settings.minmax.ymax.label $w.settings.minmax.ymax.sp pack $w.settings.minmax.autoscale $w.settings.minmax.xmin $w.settings.minmax.xmax \ $w.settings.minmax.ymin $w.settings.minmax.ymax -side left pack $w.settings.minmax ttk::label $w.settings.empty1 -text "" pack $w.settings.empty1 ttk::frame $w.settings.plotsize # tixControl $w.settings.plotsize.xsize -label "Plotsize x: "\ # -integer true -variable visoptions.lineplotsizex \ # -options { # entry.width 6 # label.width 13 # label.anchor e # } ttk::frame $w.settings.plotsize.xsize ttk::label $w.settings.plotsize.xsize.label -text "Plotsize x: " ttk::spinbox $w.settings.plotsize.xsize.sp -textvariable visoptions.lineplotsizex -width 6 -increment 1 -validate focus -validatecommand "my_validatespinbox %W %P 0" \ -invalidcommand "my_invalidspinbox %W" -from -1e9 -to 1e9 pack $w.settings.plotsize.xsize.label $w.settings.plotsize.xsize.sp # tixControl $w.settings.plotsize.ysize -label "y: "\ # -integer true -variable visoptions.lineplotsizey \ # -options { # entry.width 6 # label.width 3 # label.anchor e # } ttk::frame $w.settings.plotsize.ysize ttk::label $w.settings.plotsize.ysize.label -text "Plotsize y: " ttk::spinbox $w.settings.plotsize.ysize.sp -textvariable visoptions.lineplotsizey -width 6 -increment 1 -validate focus -validatecommand "my_validatespinbox %W %P 0" \ -invalidcommand "my_invalidspinbox %W" -from -1e9 -to 1e9 pack $w.settings.plotsize.ysize.label $w.settings.plotsize.ysize.sp pack $w.settings.plotsize.xsize $w.settings.plotsize.ysize -side left pack $w.settings.plotsize ttk::label $w.settings.empty2 -text "" pack $w.settings.empty2 # tixOptionMenu $w.settings.color -label "Linecolor: " \ # -options { # label.width 19 # label.anchor e # menubutton.width 15 # } # foreach step { red black blue green yellow } { # $w.settings.color add command $step -label $step # } # $w.settings.color config -variable visoptions.lineplotcolor ttk::frame $w.settings.color ttk::label $w.settings.color.lab -text "Linecolor: " ttk::menubutton $w.settings.color.but -menu $w.settings.color.menu -text "" -width 15 menu $w.settings.color.menu -tearoff 0 foreach step { red black blue green yellow } { $w.settings.color.menu add command -label $step -command "set visoptions.lineplotcolor $step; $w.settings.color.but configure -text \"$step\"" } # for {set i 0} {$i < [llength ${visoptions.lineplotdatadescr}]} {incr i} { # $w.filesettings.using.yco.menu add command -label [lindex ${visoptions.lineplotdatadescr} $i]\ # -command "set visoptions.lineplotusingy $i ; $w.filesettings.using.yco.but configure -text \"[lindex ${visoptions.lineplotdatadescr} $i]\"" # } $w.settings.color.menu invoke "red" grid $w.settings.color.lab $w.settings.color.but -sticky nw pack $w.settings.color pack $w.settings -fill x set datax "" set datay "" set xmin 0 set xmax 0 set ymin 0 set ymax 0 ttk::frame $w.plots -relief groove -borderwidth 3 # tixOptionMenu $w.plots.selplot -label "Selected Plot: " \ # -options { # label.width 19 # label.anchor e # menubutton.width 15 # } # $w.plots.selplot add command none -label "None" # $w.plots.selplot config -variable visoptions.lineplotselected ttk::frame $w.plots.selplot ttk::label $w.plots.selplot.lab -text "Linecolor: " ttk::menubutton $w.plots.selplot.but -menu $w.plots.selplot.menu -text "" -width 15 menu $w.plots.selplot.menu -tearoff 0 $w.plots.selplot.menu add command -label "None" -command "set visoptions.lineplotselected \"None\"; $w.plots.selplot.but configure -text \"None\"" grid $w.plots.selplot.lab $w.plots.selplot.but -sticky nw $w.plots.selplot.menu invoke "None" global visoptions.lineplotselector set visoptions.lineplotselector $w.plots.selplot.menu ttk::button $w.plots.new -text "Generate New Plot" -command { if { ${visoptions.lineplotselectedeval} != 0} { set visoptions.lineplotfile [lindex ${visoptions.evaluatefilenames} ${visoptions.lineplotselectedeval}] } getlineplotdata datax datay xmin xmax ymin ymax puts stdout "xmin $xmin xmax $xmax ymin $ymin ymax $ymax" global visoptions.lineplotautoscale if {! ${visoptions.lineplotautoscale}} { puts "using set min/max values" set xmin ${visoptions.lineplotxmin} set xmax ${visoptions.lineplotxmax} set ymin ${visoptions.lineplotymin} set ymax ${visoptions.lineplotymax} } incr visoptions.lineplotcurrentnum set ident .newplot${visoptions.lineplotcurrentnum} set plotinfo "" createlineplot ${visoptions.lineplotsizex} ${visoptions.lineplotsizey} \ $ident "Lineplot ${visoptions.lineplotcurrentnum}" \ $xmin $xmax $ymin $ymax plotinfo lappend visoptions.lineplotinfos $plotinfo ${visoptions.lineplotselector} add command ${visoptions.lineplotcurrentnum} -label "Lineplot ${visoptions.lineplotcurrentnum}" addplotline $ident $datax $datay $plotinfo ${visoptions.lineplotcolor} } ttk::button $w.plots.addto -text "Add to Selected Plot" -command { if { ${visoptions.lineplotselectedeval} != 0} { set visoptions.lineplotfile [lindex ${visoptions.evaluatefilenames} ${visoptions.lineplotselectedeval}] } if { ${visoptions.lineplotselected} != "none" } { getlineplotdata datax datay xmin xmax ymin ymax set ident .newplot${visoptions.lineplotselected} set plotinfo [lindex ${visoptions.lineplotinfos} ${visoptions.lineplotselected}] addplotline $ident $datax $datay $plotinfo ${visoptions.lineplotcolor} } } pack $w.plots.new $w.plots.addto $w.plots.selplot pack $w.plots -fill x -ipady 3 ttk::button $w.close -text "Close" -command "destroy $w" pack $w.close wm withdraw $w wm geom $w +200+100 wm deiconify $w wm title $w "2D Lineplots" focus $w } } set fieldlinesdialog_pop1 0 proc fieldlinesdialog { } { set w .fieldlines_dlg global fieldlinesdialog_pop1 set fieldlinesdialog_pop1 1 if {[winfo exists .fieldlines_dlg] == 1} { wm withdraw $w wm deiconify $w focus $w } { toplevel $w #tixNoteBook $w.nb -ipadx 6 -ipady 6 pack [ttk::notebook $w.nb] -fill both -side top -ipadx 6 -ipady 6 $w.nb add [ttk::frame $w.nb.draw] -text "Draw" -underline 0 $w.nb add [ttk::frame $w.nb.settings] -text "Settings" -underline 0 #$w.nb add draw -label "Draw" #$w.nb add settings -label "Settings" #pack $w.nb -expand yes -fill both -padx 5 -pady 5 -side top # Main Window set f $w.nb.draw ttk::labelframe $f.general -text "General settings" -relief groove -borderwidth 3 ttk::checkbutton $f.general.enable -text "Enable Fieldlines" \ -variable visoptions.drawfieldlines \ -command { # set visoptions.redrawperiodic ${visoptions.drawfieldlines} # redrawperiodic # redrawperiodic # sonst Ng_Vis_Set parameters; redraw } ttk::label $f.general.numl -text "num:" ttk::spinbox $f.general.num -from 0 -to 100 -increment 1 \ -textvariable visoptions.numfieldlines -width 4 #tixControl $f.general.num -label "Num: " -integer true \ -variable visoptions.numfieldlines \ -command { Ng_Vis_Set parameters; redraw } \ -options { # entry.width 6 # label.width 12 # label.anchor e # } grid $f.general.enable -sticky nw -padx 4 -pady 2 grid x $f.general.numl $f.general.num -rowspan 3 -sticky w -padx 4 -row 0 -pady 2 grid anchor $f.general center pack $f.general -pady 15 -fill x -ipady 3 ttk::label $f.labe0 -text " " pack $f.labe0 #ttk::frame $f.general1 ttk::checkbutton $f.general.randomstart -text "Field dependent density " \ -variable visoptions.fieldlinesrandomstart \ -command { Ng_Vis_Set parameters; redraw} ttk::checkbutton $f.general.redrawperiodic -text "Animate periodic" \ -variable visoptions.redrawperiodic \ -command { redrawperiodic Ng_Vis_Set parameters; redraw } grid $f.general.randomstart -sticky nw -padx 4 -row 1 grid $f.general.redrawperiodic -sticky nw -padx 4 -row 2 #pack $f.general1 ttk::label $f.lab0 -text " " pack $f.lab0 # tixOptionMenu $f.vecfun -label "Vector Function: " \ # -options { # label.width 18 # label.anchor e # menubutton.width 12 # } # $f.vecfun add command none -label None # for { set i 1 } { $i <= [Ng_Vis_Field getnfieldnames] } { incr i } { # set fname [Ng_Vis_Field getfieldname $i] # set fcomp [Ng_Vis_Field getfieldcomponents $i] # set iscomplex [Ng_Vis_Field iscomplex $i] # set sdim [Ng_Vis_Field getdimension] # if { $iscomplex == 1 } { set fcomp [expr $fcomp / 2] } # if { ($fcomp == $sdim) || ($fcomp == 3) } { # $f.vecfun add command $fname -label $fname # } # } # $f.vecfun configure -variable visoptions.fieldlinesvecfunction # $f.vecfun configure -command { Ng_Vis_Set parameters; redraw } ttk::frame $f.vecfun ttk::label $f.vecfun.lab -text "Vector Function: " ttk::menubutton $f.vecfun.but -menu $f.vecfun.menu -text "" -width 12 menu $f.vecfun.menu -tearoff 0 # for {set i 0} {$i < [llength ${visoptions.evaluatefilenames}]} {incr i} { # $w.filesettings.latestevals.menu add command -label $i\ # -command "set visoptions.lineplotselectedeval $i ; $w.filesettings.latestevals.but configure -text \"[lindex ${visoptions.evaluatefiledescriptions} $i] ([lindex ${visoptions.evaluatefilenames} $i])\"" # } for { set i 1 } { $i <= [Ng_Vis_Field getnfieldnames] } { incr i } { set fname [Ng_Vis_Field getfieldname $i] set fcomp [Ng_Vis_Field getfieldcomponents $i] set iscomplex [Ng_Vis_Field iscomplex $i] set sdim [Ng_Vis_Field getdimension] if { $iscomplex == 1 } { set fcomp [expr $fcomp / 2] } if { ($fcomp == $sdim) || ($fcomp == 3) } { $f.vecfun.menu add command -label $fname -command "set visoptions.fieldlinesvecfunction $fname;Ng_Vis_Set parameters; redraw;$f.vecfun.but configure -text \"$fname\" " } } grid $f.vecfun.lab $f.vecfun.but -sticky nw pack $f.vecfun ttk::label $f.lab00 -text " " pack $f.lab00 ttk::frame $f.phasesettings ttk::checkbutton $f.phasesettings.onephase -text "Fix Phase" -variable visoptions.fieldlinesonlyonephase # scale $f.phasesettings.phase -orient horizontal -length 300 -from 0 -to 360 \ # -label "phi" \ # -resolution 1 \ # -variable visoptions.fieldlinesphase \ # -command { popupcheckredraw3 fieldlinesdialog_pop1 } ttk::frame $f.phasesettings.phase ttk::label $f.phasesettings.phase.lab -text "phi" ttk::scale $f.phasesettings.phase.sc -orient horizontal -length 100 -from 0 -to 360 -variable visoptions.fieldlinesphase \ -command "roundscale $f.phasesettings.phase.sc 0; popupcheckredraw3 fieldlinesdialog_pop1" ttk::entry $f.phasesettings.phase.ent -width 4 -textvariable visoptions.fieldlinesphase -validate focus -takefocus 0 \ -validatecommand "popupcheckredraw3 fieldlinesdialog_pop1;my_validate %W 0 1 %P 0" \ -invalidcommand "my_invalid %W;popupcheckredraw3 fieldlinesdialog_pop1" grid $f.phasesettings.phase.lab $f.phasesettings.phase.sc $f.phasesettings.phase.ent -sticky nw -ipadx 4 pack $f.phasesettings.onephase $f.phasesettings.phase -side left pack $f.phasesettings ttk::label $f.lab1 -text " " pack $f.lab1 ttk::frame $f.boxsettings -relief groove -borderwidth 3 ttk::frame $f.boxsettings.title ttk::radiobutton $f.boxsettings.title.choose -variable visoptions.fieldlinesstartarea \ -value box -text "Startpoints in Box" pack $f.boxsettings.title.choose -side left pack $f.boxsettings.title ttk::frame $f.boxsettings.points ttk::label $f.boxsettings.points.lab2 -text "Pmin"; ttk::entry $f.boxsettings.points.ent1x -width 8 \ -textvariable visoptions.fieldlinesstartareap1x ttk::entry $f.boxsettings.points.ent1y -width 8 \ -textvariable visoptions.fieldlinesstartareap1y ttk::entry $f.boxsettings.points.ent1z -width 8 \ -textvariable visoptions.fieldlinesstartareap1z ttk::label $f.boxsettings.points.lab3 -text " Pmax"; ttk::entry $f.boxsettings.points.ent2x -width 8 \ -textvariable visoptions.fieldlinesstartareap2x ttk::entry $f.boxsettings.points.ent2y -width 8 \ -textvariable visoptions.fieldlinesstartareap2y ttk::entry $f.boxsettings.points.ent2z -width 8 \ -textvariable visoptions.fieldlinesstartareap2z pack $f.boxsettings.points pack $f.boxsettings.points.lab2 $f.boxsettings.points.ent1x $f.boxsettings.points.ent1y $f.boxsettings.points.ent1z -side left pack $f.boxsettings.points.lab3 $f.boxsettings.points.ent2x $f.boxsettings.points.ent2y $f.boxsettings.points.ent2z -side left ttk::button $f.boxsettings.settobb -text "Bounding Box" -command { set bbox [Ng_MeshInfo bbox] set visoptions.fieldlinesstartareap1x [lindex $bbox 0] set visoptions.fieldlinesstartareap2x [lindex $bbox 1] set visoptions.fieldlinesstartareap1y [lindex $bbox 2] set visoptions.fieldlinesstartareap2y [lindex $bbox 3] set visoptions.fieldlinesstartareap1z [lindex $bbox 4] set visoptions.fieldlinesstartareap2z [lindex $bbox 5] } pack $f.boxsettings.settobb pack $f.boxsettings -fill x -ipady 3 ttk::frame $f.facesettings -relief groove -borderwidth 3 ttk::frame $f.facesettings.title ttk::radiobutton $f.facesettings.title.choose -variable visoptions.fieldlinesstartarea \ -value face -text "Startpoints on Face" pack $f.facesettings.title.choose -side left pack $f.facesettings.title ttk::frame $f.facesettings.index ttk::label $f.facesettings.index.lab -text "face index:" ttk::label $f.facesettings.index.ent -text 1;# -padx 4 pack $f.facesettings.index.lab $f.facesettings.index.ent -side left pack $f.facesettings.index pack $f.facesettings -fill x -ipady 3 global visoptions.fieldlinesfilename ttk::frame $f.filesettings -relief groove -borderwidth 3 ttk::frame $f.filesettings.title ttk::radiobutton $f.filesettings.title.choose -variable visoptions.fieldlinesstartarea \ -value file -text "Startpoints from File" pack $f.filesettings.title.choose -side left pack $f.filesettings.title ttk::frame $f.filesettings.sfn ttk::button $f.filesettings.sfn.bb -text "Browse" \ -command { set types { { "Netgen Fieldlines" {.nef} } } set visoptions.fieldlinesfilename [tk_getOpenFile -filetypes $types -defaultextension ".nef"] } ttk::entry $f.filesettings.sfn.fn -width 50 \ -textvariable visoptions.fieldlinesfilename pack $f.filesettings.sfn.bb $f.filesettings.sfn.fn -side left pack $f.filesettings.sfn pack $f.filesettings -fill x -ipady 3 # Settings set g $w.nb.settings ttk::frame $g.linesettings -relief groove -borderwidth 3 ttk::label $g.linesettings.title -text "\nLine Settings\n" # tixControl $g.linesettings.length -label "rel. Length: " -integer false \ # -variable visoptions.fieldlineslength -min 0.00001 -max 10000 -step 0.1 \ # -options { # entry.width 6 # label.width 25 # label.anchor e # } ttk::frame $g.linesettings.length ttk::label $g.linesettings.length.lab -text "rel. Length: " ttk::spinbox $g.linesettings.length.sp -textvariable visoptions.fieldlineslength -width 6 -increment 0.1 -validate focus -validatecommand "my_validatespinbox %W %P 5" \ -invalidcommand "my_invalidspinbox %W" -from 0.00001 -to 10000 grid $g.linesettings.length.lab $g.linesettings.length.sp -sticky nw # tixControl $g.linesettings.maxpoints -label "max. Points: " -integer true \ # -variable visoptions.fieldlinesmaxpoints -min 0 -max 10000 -step 1 \ # -options { # entry.width 6 # label.width 25 # label.anchor e # } ttk::frame $g.linesettings.maxpoints ttk::label $g.linesettings.maxpoints.lab -text "max. Points: " ttk::spinbox $g.linesettings.maxpoints.sp -textvariable visoptions.fieldlinesmaxpoints -width 6 -increment 1 -validate focus -validatecommand "my_validatespinbox %W %P 0" \ -invalidcommand "my_invalidspinbox %W" -from 0 -to 10000 grid $g.linesettings.maxpoints.lab $g.linesettings.maxpoints.sp -sticky nw # tixControl $g.linesettings.thick -label "rel. Thickness: " -integer false \ # -variable visoptions.fieldlinesthickness -min 1e-10 -max 0.5 -step 0.001 \ # -options { # entry.width 6 # label.width 25 # label.anchor e # } ttk::frame $g.linesettings.thick ttk::label $g.linesettings.thick.lab -text "rel. Thickness: " ttk::spinbox $g.linesettings.thick.sp -textvariable visoptions.fieldlinesthickness -width 6 -increment 0.001 -validate focus -validatecommand "my_validatespinbox %W %P 6" \ -invalidcommand "my_invalidspinbox %W" -from 1e-10 -to 0.5 grid $g.linesettings.thick.lab $g.linesettings.thick.sp -stick nw pack $g.linesettings.title $g.linesettings.length $g.linesettings.maxpoints $g.linesettings.thick pack $g.linesettings -fill x -ipady 3 global visoptions.fieldlinestolerance ttk::frame $g.odesettings -relief groove -borderwidth 3 ttk::label $g.odesettings.title -text "\nODE Settings\n" # tixControl $g.odesettings.tol -label "rel. Tolerance: " -integer false \ # -variable visoptions.fieldlinestolerance -min 0.00001 -max 1 -step 0.01 \ # -options { # entry.width 6 # label.width 25 # label.anchor e # } ttk::frame $g.odesettings.tol ttk::label $g.odesettings.tol.lab -text "rel. Thickness: " ttk::spinbox $g.odesettings.tol.sp -textvariable visoptions.fieldlinestolerance -width 6 -increment 0.01 -validate focus -validatecommand "my_validatespinbox %W %P 5" \ -invalidcommand "my_invalidspinbox %W" -from 0.00001 -to 1 grid $g.odesettings.tol.lab $g.odesettings.tol.sp -stick nw # tixOptionMenu $g.odesettings.rktype -label "RK-Type " \ # -options { # label.width 20 # label.anchor e # menubutton.width 25 # } # $g.odesettings.rktype add command euler -label "Euler, order 1" # $g.odesettings.rktype add command eulercauchy -label "Euler-Cauchy, order 2" # $g.odesettings.rktype add command simpson -label "Simpson, order 3" # $g.odesettings.rktype add command crungekutta -label "classical Runge-Kutta, order 4" # $g.odesettings.rktype configure -variable visoptions.fieldlinesrktype # $g.odesettings.rktype configure -command { Ng_Vis_Set parameters; redraw } ttk::frame $g.odesettings.rktype ttk::label $g.odesettings.rktype.lab -text "RK-Type " ttk::menubutton $g.odesettings.rktype.but -menu $g.odesettings.rktype.menu -text "" -width 25 menu $g.odesettings.rktype.menu -tearoff 0 $g.odesettings.rktype.menu add command -label "Euler, order 1" -command "set visoptions.fieldlinesrktype \"euler\" ;Ng_Vis_Set parameters; redraw;$g.odesettings.rktype.but configure -text \"Euler,order 1\" " $g.odesettings.rktype.menu add command -label "Euler-Cauchy, order 2" -command "set visoptions.fieldlinesrktype \"eulercauchy\" ;Ng_Vis_Set parameters; redraw;$g.odesettings.rktype.but configure -text \"Euler-Cauchy,order 2\" " $g.odesettings.rktype.menu add command -label "Simpson, order 3" -command "set visoptions.fieldlinesrktype \"simpson\" ;Ng_Vis_Set parameters; redraw;$g.odesettings.rktype.but configure -text \"Simpson,order 3\"" $g.odesettings.rktype.menu add command -label "classical Runge-Kutta, order 4" -command "set visoptions.fieldlinesrktype \"crungekutta\" ;Ng_Vis_Set parameters; redraw; $g.odesettings.rktype.but configure -text \"classical Runge-Kutta,order 4\"" $g.odesettings.rktype.menu invoke "classical Runge-Kutta, order 4" grid $g.odesettings.rktype.lab $g.odesettings.rktype.but -sticky nw pack $g.odesettings.title $g.odesettings.tol $g.odesettings.rktype pack $g.odesettings -fill x -ipady 3 # buttons ttk::frame $w.bu pack $w.bu -fill x -ipady 3 ttk::button $w.bu.calc -text "Build Fieldlines" -command { if { ${visoptions.fieldlinesvecfunction} == "none" } { bgerror "Please select the vector function first!" } { set visoptions.drawfieldlines 1 Ng_Vis_Set parameters Ng_BuildFieldLines redraw } } ttk::button $w.bu.help -text "Help" -command { if {[winfo exists .fieldlines_help] == 1} { wm withdraw .fieldlines_help wm deiconify .fieldlines_help focus .fieldlines_help } { toplevel .fieldlines_help set f [frame .fieldlines_help.ht] #ttk::scrollbar $f.hsb -orient horizontal -command [list $f.t xview] ttk::scrollbar $f.vsb -orient vertical -command [list $f.t yview] text $f.t -yscrollcommand [list $f.vsb set] grid $f.t -row 0 -column 0 -sticky nsew grid $f.vsb -row 0 -column 1 -sticky nsew grid columnconfigure $f 0 -weight 1 grid rowconfigure $f 0 -weight 1 #tixScrolledText .fieldlines_help.ht -scrollbar y set text $f.t $text configure -setgrid true -wrap word $text tag configure bold -font *-*-bold-*-*-*-* $text insert end \ "Draw menu\n \n" bold $text insert end \ "Enable Fieldlines\n To turn on and off the calculated fieldlines. (Has to be turned on to start the calculation)\n" $text insert end \ "Num\n Number of fieldlines to calculate. (May not be used exactly.)" $text insert end \ "Field dependent density\n There will be more fieldline startpoints where the field is stronger\n\n" $text insert end \ "Animate periodic\n (for quasistationary fields) The fieldlines of the different phase angles are animated.\n ATTENTION: \"Fix Phase\" has to be turned off\n\n" $text insert end \ "Vector Function\n The function fixing the direction of the lines\n\n" $text insert end \ "Fix Phase\n (for quasistationary fields) Only calculate and draw fieldlines for one special phase angle.\n\n" $text insert end \ "Startpoints in Box\n Set the startpoints inside the box \[Pmin1,Pmax1\] x \[Pmin2,Pmax2\] x \[Pmin3,Pmax3\]\n" $text insert end \ " With the button \"Bounding Box\" the whole bounding box of the geometry is selected.\n\n" $text insert end \ "Startpoints on Face\n All startpoints will be set on one face. This face is selected by double-clicking with the mouse.\n\n" $text insert end \ "Startpoints from File\n The startpoint information will be read from the selected file.\n The entries in the file can be as follows:\n" $text insert end \ " point \n set a (potential) startpoint\n" $text insert end \ " line \n set n (potential) startpoints on the line from (x1,y1,z1) to (x2,y2,z2)\n" $text insert end \ " box \n set n (potential) startpoints inside the box \[x1,x2\] x \[y1,y2\] x \[z1,z2\]\n" $text insert end \ " ATTENTION: These are potential startpoints.\n The total number of startpoints will be bounded by the \"Num\"-parameter.\n \n \n \n" $text insert end \ "Settings Menu\n \n" bold $text insert end \ "rel. Length\n The maximal length of a fieldline relative to the diameter of the geometry.\n\n" $text insert end \ "max. Points\n The maximum number of Runge-Kutta steps.\n\n" $text insert end \ "rel. Thickness\n The thickness of the fieldlines relative to the diameter of the geometry.\n\n" $text insert end \ "rel. Tolerance\n The tolerance for the step-length control of the Runge-Kutta method.\n\n" $text insert end \ "RK-Type\n Which Runge-Kutta scheme to use\n \n \n \n" $text insert end \ "Button \"Build Fieldlines\"\n" bold $text insert end \ " Build the fieldlines." $text configure -state disabled pack .fieldlines_help.ht -expand yes -fill both wm withdraw .fieldlines_help wm geom .fieldlines_help +300+200 wm deiconify .fieldlines_help wm title .fieldlines_help "Fieldlines Help" focus .fieldlines_help } } ttk::button $w.bu.cancel -text "Done" -command "destroy $w" grid $w.bu.calc $w.bu.help $w.bu.cancel -sticky nw -padx 4 grid anchor $w.bu center wm withdraw $w wm geom $w +200+100 wm deiconify $w wm title $w "Fieldlines" # grab $w focus $w } global visoptions.fieldlinesstartface set f $w.nb.draw set visoptions.fieldlinesstartface [Ng_BCProp getactive] $f.facesettings.index.ent configure -text ${visoptions.fieldlinesstartface} } #proc popupcheckredraw { vari { x 0 } } { # upvar $vari varname # if { $varname == 1 } { # set varname 0 # } { # Ng_Vis_Set parameters # redraw # } #} set visual_dialog_pop1 0 set visual_dialog_pop2 0 set visual_dialog_pop3 0 set visual_dialog_pop4 0 set visual_dialog_pop5 0 set visual_dialog_pop6 0 set visual_dialog_pop7 0 proc visual_dialog { } { set w .visoptions_dlg global visual_dialog_pop1 global visual_dialog_pop2 global visual_dialog_pop3 global visual_dialog_pop4 global visual_dialog_pop5 global visual_dialog_pop6 global visual_dialog_pop7 set visual_dialog_pop1 1 set visual_dialog_pop2 1 set visual_dialog_pop3 1 set visual_dialog_pop4 1 set visual_dialog_pop5 1 set visual_dialog_pop6 1 set visual_dialog_pop7 1 if {[winfo exists .visoptions_dlg] == 1} { wm withdraw $w wm deiconify $w focus $w } { toplevel $w #ttk::frame $w.grid -relief groove -borderwidth 0 # change to: max gridsize 200 #scale $w.grid.size -orient horizontal -length 100 -from 1 -to 200 \ -label "Grid" \ -resolution 1 \ -variable visoptions.gridsize \ -command { popupcheckredraw visual_dialog_pop2 } # x- and y- offset #scale $w.grid.xoffset -orient horizontal -length 80 -from 0 -to 1 \ -label "x-Offset" \ -resolution 0.05 \ -variable visoptions.xoffset \ -command { popupcheckredraw visual_dialog_pop3 } ttk::frame $w.main pack $w.main -fill x set w $w.main ttk::frame $w.upperfr ;# -relief groove -borderwidth 3 -height 10 pack $w.upperfr -fill x;# -ipady 8 ttk::labelframe $w.upperfr.size -text "Grid" -relief groove -borderwidth 3 ttk::entry $w.upperfr.size.ent -width 3 -textvariable visoptions.gridsize -validate focus -takefocus 0 -validatecommand "popupcheckredraw visual_dialog_pop2;my_validate %W 0 200 %P 0" \ -invalidcommand "my_invalid %W;popupcheckredraw visual_dialog_pop2" ttk::scale $w.upperfr.size.sc -orient horizontal -length 100 -from 1 -to 200 -variable visoptions.gridsize\ -command "roundscale $w.upperfr.size.sc 0;popupcheckredraw visual_dialog_pop2" ttk::labelframe $w.upperfr.offsets -text "x / y offsets" -relief groove -borderwidth 3 ttk::label $w.upperfr.offsets.xlab -text "x" ttk::label $w.upperfr.offsets.ylab -text "y" ttk::scale $w.upperfr.offsets.xoffset -orient horizontal -length 100 -from 0 -to 1 -variable visoptions.xoffset \ -command "roundscale $w.upperfr.offsets.xoffset 2; popupcheckredraw visual_dialog_pop3" ttk::scale $w.upperfr.offsets.yoffset -orient horizontal -length 100 -from 0 -to 1 -variable visoptions.yoffset \ -command "roundscale $w.upperfr.offsets.yoffset 2; popupcheckredraw visual_dialog_pop4" ttk::entry $w.upperfr.offsets.entx -width 4 -textvariable visoptions.xoffset -validate focus -takefocus 0 \ -validatecommand "popupcheckredraw visual_dialog_pop3;my_validate %W 0 1 %P 2" \ -invalidcommand "my_invalid %W;popupcheckredraw visual_dialog_pop3" ttk::entry $w.upperfr.offsets.enty -width 4 -textvariable visoptions.yoffset -validate focus -takefocus 0 \ -validatecommand "popupcheckredraw visual_dialog_pop4;my_validate %W 0 1 %P 2" \ -invalidcommand "my_invalid %W;popupcheckredraw visual_dialog_pop4" # pack $w.showclipsolution pack $w.upperfr.size.sc $w.upperfr.size.ent -padx 4 -pady 12 -side left grid $w.upperfr.offsets.xoffset $w.upperfr.offsets.entx $w.upperfr.offsets.xlab -sticky nw -padx 4 grid $w.upperfr.offsets.yoffset $w.upperfr.offsets.enty $w.upperfr.offsets.ylab -sticky nw -padx 4 grid $w.upperfr.size $w.upperfr.offsets -sticky nw -pady 7 -padx 10 grid anchor $w.upperfr center # pack $w.lineartexture $w.numcols ttk::labelframe $w.deform -relief groove -borderwidth 3 -text "Deformation settings" ttk::checkbutton $w.deform.cb -text "Deformation" \ -variable visoptions.deformation \ -command { Ng_Vis_Set parameters; redraw } ttk::label $w.deform.l -text "Scale: " ttk::spinbox $w.deform.sc1 -from 0 -to 1e99 -textvariable visoptions.scaledeform1 -width 5 \ -command { Ng_Vis_Set parameters; redraw } \ -validate focusout -validatecommand { Ng_Vis_Set parameters; redraw; string is double %P } \ -invalidcommand { puts "invalid value, %P %s"; set visoptions.scaledeform1 1; } # tixControl $w.deform.sc1 -label "Scale: " -integer false \ # -variable visoptions.scaledeform1 \ # -command { Ng_Vis_Set parameters; redraw } \ # -options { # entry.width 6 # label.width 7 # label.anchor e # } ttk::scale $w.deform.sc2 -orient horizontal -length 100 -from 0 -to 1 \ -variable visoptions.scaledeform2 \ -command { popupcheckredraw visual_dialog_pop5 } pack $w.deform -fill x -ipady 2 -pady 4 -ipady 3 grid $w.deform.cb $w.deform.l $w.deform.sc1 $w.deform.sc2 -sticky nw -padx 4;# -side left -expand yes -anchor center -padx 4 grid anchor $w.deform center grid columnconfigure $w.deform 0 -pad 20 grid columnconfigure $w.deform 2 -pad 20 ttk::labelframe $w.as -relief groove -borderwidth 3 -text "Scaling options" ttk::checkbutton $w.as.autoscale -text "Autoscale" \ -variable visoptions.autoscale \ -command { Ng_Vis_Set parameters; redraw } ttk::label $w.as.lmin -text "Min-value" ttk::spinbox $w.as.smin -textvariable visoptions.mminval -width 5 -validate focus \ -validatecommand "my_validatespinbox %W %P 10" \ -command "Ng_Vis_Set parameters; redraw;" \ -invalidcommand "my_invalidspinbox %W" -from -1e10 -to 1e10 -increment 0.001 ttk::label $w.as.lmax -text "Max-value" ttk::spinbox $w.as.smax -textvariable visoptions.mmaxval -width 5 -validate focus \ -validatecommand "Ng_Vis_Set parameters; redraw;my_validatespinbox %W %P 10" \ -command "Ng_Vis_Set parameters; redraw;" \ -invalidcommand "my_invalidspinbox %W;Ng_Vis_Set parameters; redraw" -from -1e10 -to 1e10 -increment 0.001 #tixControl $w.as.minval -label "Min-value: " -integer false \ -variable visoptions.mminval \ -command { Ng_Vis_Set parametersrange; redraw } \ -options { # entry.width 6 # label.width 12 # label.anchor e # } #tixControl $w.as.maxval -label "Max-value: " -integer false \ -variable visoptions.mmaxval \ -command { Ng_Vis_Set parametersrange; redraw } \ -options { # entry.width 6 # label.width 12 # label.anchor e # } pack $w.as -fill x -pady 5 -ipady 3 grid $w.as.autoscale $w.as.lmin $w.as.smin $w.as.lmax $w.as.smax -sticky nw -padx 4 grid columnconfigure $w.as 0 -pad 20 grid columnconfigure $w.as 2 -pad 20 grid anchor $w.as center ttk::frame $w.iso; #-relief groove -borderwidth 0 pack $w.iso -anchor center;# -ipady 3 ttk::labelframe $w.iso.cb -relief groove -borderwidth 3 -text "Iso lines / surfaces" pack $w.iso.cb -side left -pady 7 -fill y ttk::checkbutton $w.iso.cb.isolines -text "Iso-lines" \ -variable visoptions.isolines \ -command { Ng_Vis_Set parameters; redraw } #pack $w.iso.cb.isolines -side top -anchor w ttk::checkbutton $w.iso.cb.isosurf -text "Iso-Surface" \ -variable visoptions.isosurf \ -command { Ng_Vis_Set parameters; redraw } #pack $w.iso.cb.isosurf -side top -anchor w ttk::label $w.iso.cb.numisol -text "amount" ttk::scale $w.iso.cb.numiso -orient horizontal -length 100 -from 2 -to 50 \ -variable visoptions.numiso \ -command "roundscale $w.iso.cb.numiso 0;popupcheckredraw visual_dialog_pop6" ttk::entry $w.iso.cb.entry -textvariable visoptions.numiso -width 3 \ -validate focus -validatecommand "popupcheckredraw visual_dialog_pop6;\ my_validate %W [$w.iso.cb.numiso cget -from] [$w.iso.cb.numiso cget -to] %P 0" \ -invalidcommand "my_invalid %W;popupcheckredraw visual_dialog_pop6" # -resolution 1 \ # -label "" \ grid $w.iso.cb.isolines $w.iso.cb.numisol $w.iso.cb.entry -sticky nw -padx 4 grid $w.iso.cb.isosurf -sticky nw -padx 4 grid $w.iso.cb.numiso -sticky nw -padx 4 -columnspan 2 -column 1 -row 1 #pack $w.iso.cb.numisol $w.iso.cb.numiso -anchor n # scale $w.iso.subdiv -orient horizontal -length 100 -from 0 -to 5 \ # -label "subdivision" \ # -resolution 1 \ # -variable visoptions.subdivisions \ # -command { popupcheckredraw visual_dialog_pop7 } # # -command { puts "subdiv-vis"; Ng_Vis_Set parameters; puts "cal redraw"; redraw } ttk::labelframe $w.iso.subdiv -text "Subdivision" -relief groove -borderwidth 3 ttk::radiobutton $w.iso.subdiv.zero -text "0" -variable visoptions.subdivisions -value 0 \ -command { #set visoptions.subdivisions 1; Ng_Vis_Set parameters; redraw; } ttk::radiobutton $w.iso.subdiv.one -text "1" -variable visoptions.subdivisions -value 1 \ -command { #set visoptions.subdivisions 1; Ng_Vis_Set parameters; redraw; } ttk::radiobutton $w.iso.subdiv.two -text "2" -variable visoptions.subdivisions -value 2 \ -command { #set visoptions.subdivisions 2; Ng_Vis_Set parameters; redraw; } ttk::radiobutton $w.iso.subdiv.three -text "3" -variable visoptions.subdivisions -value 3 \ -command { #set visoptions.subdivisions 3; Ng_Vis_Set parameters; redraw; } ttk::radiobutton $w.iso.subdiv.four -text "4" -variable visoptions.subdivisions -value 4 \ -command { #set visoptions.subdivisions 4; Ng_Vis_Set parameters; redraw; } ttk::radiobutton $w.iso.subdiv.five -text "5" -variable visoptions.subdivisions -value 5 \ -command { #set visoptions.subdivisions 5; Ng_Vis_Set parameters; redraw; } ttk::label $w.iso.subdiv.text -text "subdivision" pack $w.iso.subdiv -side right -fill y -padx 4 -pady 7 # ; Ng_SetNextTimeStamp #pack $w.iso.subdiv.text -side top #pack $w.iso.subdiv.zero -side left #pack $w.iso.subdiv.one -side left #pack $w.iso.subdiv.two -side left #pack $w.iso.subdiv.three -side left #pack $w.iso.subdiv.four -side left #pack $w.iso.subdiv.five -side left grid $w.iso.subdiv.zero $w.iso.subdiv.one $w.iso.subdiv.two $w.iso.subdiv.three $w.iso.subdiv.four $w.iso.subdiv.five grid anchor $w.iso.subdiv center # scale $w.iso.zpos -orient horizontal -length 100 -from 0 -to 1 \ # -label "z-position" \ # -resolution 0.01 \ # -variable visoptions.zposition \ # -command { # catch {NGS_Set zpos ${visoptions.zposition};} # redraw } # pack $w.iso.zpos -side right ttk::labelframe $w.redraw -relief groove -borderwidth 3 -text "Auto-redraw" ttk::checkbutton $w.redraw.auto -text "Auto-redraw after (sec)" \ -variable visoptions.autoredraw # tixControl $w.redraw.val -integer false \ # -variable visoptions.autoredrawtime \ # -options { # entry.width 6 # label.width 0 # label.anchor w # } ttk::spinbox $w.redraw.val -textvariable visoptions.autoredrawtime -from 0 -to 100 -width 3 pack $w.redraw -fill x -ipady 3 -pady 7 grid $w.redraw.auto $w.redraw.val -sticky nw grid anchor $w.redraw center ttk::labelframe $w.lowerframe -text "Additional viewing options" -relief groove -borderwidth 3 pack $w.lowerframe -fill x set w $w.lowerframe #pack [frame $w.f] -fill x #pack [ttk::frame $w.f1] -expand yes ttk::frame $w.f1 set f [ttk::frame $w.f1.clipsol] pack $f -anchor e menu $f.m ttk::menubutton $f.b -menu $f.m -width 12 ttk::label $f.l -text "Clipping Plane Sol: " global visoptions.clipsolution set clipsollabs(none) "None" set clipsollabs(scal) "Scalar Function" set clipsollabs(vec) "Vector Function" foreach i { none scal vec } { set textval $clipsollabs($i) $f.m add command -label "$textval" -command \ "$f.b configure -text \"$textval\" ; set visoptions.clipsolution $i ; Ng_Vis_Set parameters ; redraw " } pack $f.b $f.l -side right $f.m invoke $clipsollabs(${visoptions.clipsolution}) # pack [ttk::frame $w.f1.scalfun] -anchor e set f [ttk::frame $w.f1.scalfun] pack $f -anchor e menu $f.m ttk::menubutton $f.b -menu $f.m -width 12 ttk::label $f.l -text "Scalar Function: " set scalentries [list none None] for { set i 1 } { $i <= [Ng_Vis_Field getnfieldnames] } { incr i } { set fname [Ng_Vis_Field getfieldname $i] set fcomp [Ng_Vis_Field getfieldcomponents $i] if { $fcomp == 1 } { lappend scalentries $fname:1 $fname } { for { set j 1 } { $j <= $fcomp } { incr j } { lappend scalentries $fname:$j "$fname ($j)" } lappend scalentries $fname:0 "func ($fname)" } } global visoptions.scalfunction foreach { name textval } $scalentries { $f.m add command -label "$textval" -command \ "$f.b configure -text \"$textval\" ; set visoptions.scalfunction $name ; Ng_Vis_Set parameters ; redraw ; " } pack $f.b $f.l -side right foreach { name textval } $scalentries { if { ${visoptions.scalfunction} == $name } { $f.m invoke $textval } } set f [ttk::frame $w.f1.vecfun] pack $f -anchor e menu $f.m ttk::menubutton $f.b -menu $f.m -width 12 ttk::label $f.l -text "Vector Function: " set vecentries [list none None] for { set i 1 } { $i <= [Ng_Vis_Field getnfieldnames] } { incr i } { set fname [Ng_Vis_Field getfieldname $i] set fcomp [Ng_Vis_Field getfieldcomponents $i] set iscomplex [Ng_Vis_Field iscomplex $i] set sdim [Ng_Vis_Field getdimension] if { $iscomplex == 1 } { set fcomp [expr $fcomp / 2] } if { ($fcomp == $sdim) || ($fcomp == 3) } { lappend vecentries $fname $fname } } global visoptions.vecfunction foreach { name textval } $vecentries { $f.m add command -label "$textval" -command \ "$f.b configure -text \"$textval\" ; set visoptions.vecfunction $name ; Ng_Vis_Set parameters ; redraw ; " } pack $f.b $f.l -side right foreach { name textval } $vecentries { if { ${visoptions.vecfunction} == $name } { $f.m invoke $textval } } set f [ttk::frame $w.f1.evaluate] pack $f -anchor e menu $f.m ttk::menubutton $f.b -menu $f.m -width 12 ttk::label $f.l -text "Evaluate: " global visoptions.evaluate set evallabs(abs) "| |" set evallabs(abstens) "|tensor|" set evallabs(mises) "Mises" set evallabs(main) "Main" foreach i { abs abstens mises main } { set textval $evallabs($i) $f.m add command -label "$textval" -command \ "$f.b configure -text \"$textval\" ; set visoptions.evaluate $i ; " } pack $f.b $f.l -side right $f.m invoke $evallabs(${visoptions.evaluate}) pack [ttk::frame $w.f1.multidim] -fill x set f [ttk::frame $w.f1.multidim.f] pack $f -anchor e ttk::label $f.l1 -text "multidim-component: " ttk::spinbox $f.sb1 -from 0 -to 1e99 -textvariable visoptions.multidimcomponent -width 3 \ -command { Ng_Vis_Set parameters; redraw } pack $f.l1 $f.sb1 -side left ttk::frame $w.fcb # the 2 main frames grid $w.f1 $w.fcb -sticky nw -padx 7 -ipady 3 grid anchor $w center #pack $w.fcb ttk::frame $w.fcb.cb pack $w.fcb.cb ttk::checkbutton $w.fcb.cb.showsurfsolution -text "Draw Surface Vectors" \ -variable visoptions.showsurfacesolution \ -command { Ng_Vis_Set parameters; redraw } ttk::checkbutton $w.fcb.cb.showcurves -text "Show Curves" \ -variable visoptions.drawpointcurves \ -command { Ng_Vis_Set parameters; redraw } ttk::checkbutton $w.fcb.cb.imaginary -text "Imaginary Part" \ -variable visoptions.imaginary \ -command { Ng_Vis_Set parameters; redraw } ttk::checkbutton $w.fcb.cb.logscale -text "Log Scale" \ -variable visoptions.logscale \ -command { Ng_Vis_Set parameters; redraw } ttk::checkbutton $w.fcb.cb.invcolor -text "Inverse Color" \ -variable visoptions.invcolor \ -command { Ng_Vis_Set parametersrange; redraw } ttk::frame $w.fcb.cb.texframe ttk::checkbutton $w.fcb.cb.texframe.usetexture -text "Use Textures (" \ -variable visoptions.usetexture \ -command { Ng_Vis_Set parameters; redraw } ttk::checkbutton $w.fcb.cb.texframe.lintexture -text "Linear )" \ -variable visoptions.lineartexture \ -command { Ng_Vis_Set parametersrange; redraw } ttk::checkbutton $w.fcb.cb.lineartexture -text "Use Linear Texture" \ -variable visoptions.lineartexture \ -command { Ng_Vis_Set parameters; redraw } scale $w.numcols -orient horizontal -length 100 -from 0 -to 50 \ -resolution 1 \ -variable visoptions.numtexturecols \ -command { popupcheckredraw visual_dialog_pop1 } ttk::checkbutton $w.fcb.cb.showclipsolution -text "Draw Clipping Plane Solution" \ -variable visoptions.showclipsolution \ -command { Ng_Vis_Set parameters; redraw } ttk::checkbutton $w.fcb.cb.redrawperiodic -text "Animate periodic" \ -variable visoptions.redrawperiodic \ -command { redrawperiodic Ng_Vis_Set parameters; redraw } #pack $w.fcb.cb.showsurfsolution $w.fcb.cb.showcurves -anchor w #pack $w.fcb.cb.imaginary $w.fcb.cb.logscale $w.fcb.cb.texframe $w.fcb.cb.invcolor $w.fcb.cb.redrawperiodic -side top -anchor w #pack $w.fcb.cb.texframe.usetexture $w.fcb.cb.texframe.lintexture -side left -expand yes grid $w.fcb.cb.showsurfsolution -sticky nw grid $w.fcb.cb.showcurves -sticky nw grid $w.fcb.cb.imaginary -sticky nw grid $w.fcb.cb.logscale -sticky nw grid $w.fcb.cb.texframe -sticky nw grid $w.fcb.cb.invcolor -sticky nw grid $w.fcb.cb.redrawperiodic -sticky nw pack $w.fcb.cb.texframe.usetexture $w.fcb.cb.texframe.lintexture -side left -expand yes set w .visoptions_dlg.main ttk::frame $w.bu;# -relief groove -borderwidth 3 pack $w.bu -pady 5 -padx 4 ttk::button $w.bu.showsol -text "Show Solution" -command { set selectvisual solution Ng_SetVisParameters redraw } ttk::button $w.bu.clipping -text "Clipping" -command { clippingdialog; } ttk::button $w.bu.fieldlines -text "Fieldlines" -command { fieldlinesdialog; } ttk::button $w.bu.lineplot -text "2D Lineplot" -command { lineplotdialog; } ttk::button $w.bu.done -text "Close" -command { destroy .visoptions_dlg } pack $w.bu.showsol $w.bu.clipping $w.bu.fieldlines $w.bu.lineplot $w.bu.done -side left -expand yes set w .visoptions_dlg wm withdraw $w wm geom $w +100+100 wm deiconify $w wm title $w "Visualization" } } # proc reset_visual_dialog { } { # set w .visoptions_dlg # if {[winfo exists .visoptions_dlg] == 1} { # destroy $w.scalfun $w.vecfun $w.evaluate $w.multidimcomp # destroy $w.imaginary $w.logscale $w.texframe.usetexture $w.texframe.lintexture # destroy $w.texframe # destroy $w.invcolor $w.redrawperiodic # destroy $w.bu -pady 5 # destroy $w.bu.showsol $w.bu.clipping $w.bu.fieldlines $w.bu.lineplot $w.bu.done -side left -expand yes # checkbutton $w.imaginary -text "Imaginary Part" \ # -variable visoptions.imaginary \ # -command { Ng_Vis_Set parameters; redraw } # frame $w.texframe # checkbutton $w.texframe.usetexture -text "Use Textures (" \ # -variable visoptions.usetexture \ # -command { Ng_Vis_Set parameters; redraw } # checkbutton $w.texframe.lintexture -text "Linear )" \ # -variable visoptions.lineartexture \ # -command { Ng_Vis_Set parameters; redraw } # checkbutton $w.invcolor -text "Inverse Color" \ # -variable visoptions.invcolor \ # -command { Ng_Vis_Set parameters; redraw } # checkbutton $w.logscale -text "Log Scale" \ # -variable visoptions.logscale \ # -command { Ng_Vis_Set parameters; redraw } # checkbutton $w.redrawperiodic -text "Animate periodic" \ # -variable visoptions.redrawperiodic \ # -command { # redrawperiodic # Ng_Vis_Set parameters; # redraw # } # tixOptionMenu $w.scalfun -label "Scalar Function: " \ # -options { # label.width 18 # label.anchor e # menubutton.width 12 # } # tixOptionMenu $w.vecfun -label "Vector Function: " \ # -options { # label.width 18 # label.anchor e # menubutton.width 12 # } # $w.scalfun add command none -label None # for { set i 1 } { $i <= [Ng_Vis_Field getnfieldnames] } { incr i } { # set fname [Ng_Vis_Field getfieldname $i] # set fcomp [Ng_Vis_Field getfieldcomponents $i] # if { $fcomp == 1 } { # $w.scalfun add command $fname.1 -label $fname # } { # for { set j 1 } { $j <= $fcomp } { incr j } { # $w.scalfun add command $fname.$j -label "$fname ($j)" # } # $w.scalfun add command $fname.0 -label "func ($fname)" # } # } # $w.vecfun add command none -label None # for { set i 1 } { $i <= [Ng_Vis_Field getnfieldnames] } { incr i } { # set fname [Ng_Vis_Field getfieldname $i] # set fcomp [Ng_Vis_Field getfieldcomponents $i] # set iscomplex [Ng_Vis_Field iscomplex $i] # set sdim [Ng_Vis_Field getdimension] # if { $iscomplex == 1 } { set fcomp [expr $fcomp / 2] } # if { ($fcomp == $sdim) || ($fcomp == 3) } { # $w.vecfun add command $fname -label $fname # } # } # $w.scalfun configure -variable visoptions.scalfunction # $w.scalfun configure -command { Ng_Vis_Set parameters; redraw } # $w.vecfun configure -variable visoptions.vecfunction # $w.vecfun configure -command { Ng_Vis_Set parameters; redraw } # # puts "sclfunction = ${visoptions.scalfunction}" # tixOptionMenu $w.evaluate -label "Evaluate: " \ # -options { # label.width 18 # label.anchor e # menubutton.width 12 # } # $w.evaluate add command abs -label "|.|" # $w.evaluate add command abstens -label "|tensor|" # $w.evaluate add command mises -label "Mises" # $w.evaluate add command main -label "Main" # $w.evaluate configure -variable visoptions.evaluate # $w.evaluate configure -command { # Ng_Vis_Set parameters; # redraw # } # pack $w.scalfun $w.vecfun $w.evaluate # tixControl $w.multidimcomp -label "multidim-component: " -integer true \ # -variable visoptions.multidimcomponent -min 0 \ # -command { Ng_Vis_Set parameters; redraw } \ # -options { # entry.width 6 # label.width 18 # label.anchor e # } # pack $w.multidimcomp # pack $w.imaginary $w.logscale $w.texframe $w.invcolor $w.redrawperiodic # pack $w.texframe.usetexture $w.texframe.lintexture -side left -expand yes # frame $w.bu # pack $w.bu -pady 5 # button $w.bu.showsol -text "Show Solution" -command { # set selectvisual solution # Ng_SetVisParameters # redraw # } # button $w.bu.clipping -text "Clipping" -command { # clippingdialog; # } # button $w.bu.fieldlines -text "Fieldlines" -command { # fieldlinesdialog; # } # button $w.bu.lineplot -text "2D Lineplot" -command { # lineplotdialog; # } # button $w.bu.done -text "Close" -command { # destroy .visoptions_dlg # } # pack $w.bu.showsol $w.bu.clipping $w.bu.fieldlines $w.bu.lineplot $w.bu.done -side left -expand yes # wm withdraw $w # wm deiconify $w # } # } netgen-6.2.1804/ng/parameters.tcl0000644000175000017500000000322013272137567015255 0ustar kurtkurtproc setgranularity { gran } { # # puts "set granularity $gran" # if {$gran == 6} { return } set gran [expr $gran - 1] # global options.curvaturesafety set surfcurvlist { 1 1.5 2 3 5 } set options.curvaturesafety [lindex $surfcurvlist $gran] global options.segmentsperedge set spelist { 0.3 0.5 1 2 3 } set options.segmentsperedge [lindex $spelist $gran] global stloptions.resthsurfcurvfac set surfcurvfaclist { 0.25 0.5 1 1.5 3 } set stloptions.resthsurfcurvfac [lindex $surfcurvfaclist $gran] global stloptions.resthchartdistfac set chartdistfaclist { 0.8 1 1.5 2 5 } set stloptions.resthchartdistfac [lindex $chartdistfaclist $gran] global stloptions.resthlinelengthfac set linelengthfaclist { 0.2 0.35 0.5 1.5 3 } set stloptions.resthlinelengthfac [lindex $linelengthfaclist $gran] global stloptions.resthcloseedgefac set closeedgefaclist { 0.5 1 2 3.5 5 } set stloptions.resthcloseedgefac [lindex $closeedgefaclist $gran] global stloptions.resthminedgelen set minedgelenlist { 0.002 0.02 0.2 1.0 2.0 5.0 10.0 } set stloptions.resthminedgelen [lindex $minedgelenlist $gran] global stloptions.resthedgeanglefac set edgeanglefaclist { 0.25 0.5 1 1.5 3 } set stloptions.resthedgeanglefac [lindex $edgeanglefaclist $gran] global stloptions.resthsurfmeshcurvfac set surfmeshcurvlist { 1 1.5 2 3 5 } set stloptions.resthsurfmeshcurvfac [lindex $surfmeshcurvlist $gran] global options.grading set gradinglist { 0.7 0.5 0.3 0.2 0.1 } set options.grading [lindex $gradinglist $gran] } netgen-6.2.1804/netgen.icns0000644000175000017500000063072013272137567014153 0ustar kurtkurticns1TOC ic07Dic08Xic09$hic07DPNG  IHDR>asRGB pHYs  @IDATx^U@z!Lz'H "bAmuvuAA:,M ޓL2A%=;3L~9s`UJ*=PJTz@*=PJTz@Ul.X?E9}MtgcO^E?Pa &(t#UFGبIAZ;ގuK=ZMpKEGQA:@c8>Jw:]ͿEߎE]q|5PZAHz/jRx;*GS*>>QtWn}mvW%K'P'/!pG07>t$h }Kw`8AtT4mU|^W-j~W;sQrRusPAYmg."y"0%Y[4 8L rj'?x`a5ICR{lXEcR ,%|dZqyB 7T6.@3iUg4 !h2U A% PDse%wWYRo5X`d_P[g]< cDt\4Hؕ#"^bS5ha;o4RE(1]s埣G} !`u j!PAOx B҂B`XY\+):z qoEˢi"juN*_YW7~YXXP,r4 |գ𭽓 iDQ|EG} Ar9 m.>(VP DO9$ax<𵡼54$9Xo{Mڜu,9 z0(|2 ~ Pf`7H>ԄUϾL0orp{٠^0x;*&%=* AϬ =ϘhӍŹ{ˠ/QSwlyO@R X>fp<2^0iLz~O0 ep7 ~ȥ|Ѕ`] $H$+qP 53A1pAw穋Qʔ>qZg$4; iKߓ=1=27$H #јP>|n;;8!h:Pk'uЩLjpb̼h^MxkbuؓP,1f} T/Qtq\Ib.@`K}DOOe3jtN/0m>hQRDeOޱg6LP#}2ւx'jO9&'a_xo7Zpui y.OT~xRM,ڜrd`PL.O}j:>ki-|G=׋岌 }-KoԸ.0gwU s 'y\wey1m(5:r.}=f ̵jӍ,[iM S@ 4hd$!WPWdspFB/|Z7'x׃QyLuZ_сDfjހJG`0IvI .+%}ؿ;_v=|} H#LXtEg7x|x ~7]&Y=#y(qxr~y#dW4pjb'u\G;:$!!hftOٱzP!%Ia^+TF츗hA#ž?z#.@0yI{~Z'At0 |.5xVόϴ_/$4ֻ33J0 <!1O8-y4-~`0- Q 2d&5ALMp|H[\4*|}`f9.bУ+LDx.eLa(SHcAw;d+}8dž/!{Q*`A5?B5Rf]PԺ%=iRAOn&3SL2l?A\3w|>IF]Ƚ1YH'K*$%@wxzϽW9XoZQ.O[4do9K c DœˁbL&}ֵjCE τnJaRq2 al c&cγtb_\~m&AWBSW:ѨϽ$nk?. pqzAKUx ࿐k*yF0eI}+>I=:#>KIj Nv'7ڂq`A1`%h{ppn)q= =: 3mpyW7pyV1!J;Y6G!~~PeթT;{=Gf^N'34XNB1 +ZӭJoziZ`V^`қ`Bxd {&Ї7!#]C Y[&hi%N744Cuf-}uhb3J̹=R?{buNI>EROPhZ9 {Q|\U5LPgW Ꮰ[G'ur[sϺ]U/Z߀ I> $Y|b~eg)l~ C^{?z1Rq%&MR>=4 б=>Cض5 N["%z0Ÿ`$8Nj& (uع-u5}_ݢj{h\hAϒ^ Hg? ?IUMEТe$XOBkXn_$IkݫT(T-m}Wu|cl>L`qHI_{jQf=C`́π{ap=cVhΙ598gda>zn3z{YՎt//{k]mUvHy{λ :q b,uA0 @ZmR)j-`^: ΄i_ mAO`ٺ·~oԢ6l1W2ޙ6wm@৚N2]yn6`.p,C1Tm(1\\tI%oY3@{ȣ%Ll'@jM44Ejbpu5[<۠{ ULŒ__K[LU!>gHu]b@<%:*x E4J Й>zeLO94E1Ǖ`{/t7I%e*q ☼ؑ1y`NbkLq'TONM\.M 3!9=m],SzNUa&OG d874WU}M0>7h*$H7}ƌMXK=)ZE:6Xؚ:R[=ǒ m = F `~ sNJ9=:w#Q:Ư=Vk7"&"D 0i&;ls9iz6Ʋ|+3 S0`o}ƀIg3E_?nӞ0>X}XjWCrl`I:%))9x߾A1pς'j>TggvG/l 䘞& ||+UuuUvk$hORgb>ÜெW#:ռL̋ bkaRzPZ MORXjN]8On ڞ0zHy-pKqfO*}SӄI(3Ms|`]8zlG4[k:}DO%~COֺD..:j>:( B_5U-75>\'QˌC2TCB_P0h~bIlwABrӲn3>Z @FZVSn,SVcMrwχF,|jԬ1t-3q2g 8{_'*`KaJ̉N#8{&SσQ$s~~ }gѐM4'㹡[=80Am{/mhAwo+U( rV(ObldQ-` &1-ҹV7.Yw O8WƟݳS%X_4⼨zuJD$:9@k|NpM[.#p*o.& \ )&L#_G6XFZ_P=>&@)F2#J& &;tC/f`՘=K33&\_%QIYf<љz%ԸػC[yaƘ|z 2N`!)&QcI\=z.Y5 ;B40!Stb092eze 7?9\}|sOK0z+̧m3Zy̽4| +>sµΘˬ鮱©XLer|/A;, L /'PSw&` i 4F:e]g]FU j {I~2A3!w>[^cziǰZ.R idCz2>N4;e,$e$x ZpNPBԥ2|67_,n[FIn潊@ 8{huv53=@4./7A4]Z)lJ/H;H /I{t z}Ճk@Xΰ>Յ]OÅM<`lDk|a5,LU3j[F4!S:dD],pݲb*]G\&tL'xM}ϻF3A0'yjkj %'Dփ+=!г=xq2<[Q\]/$oqS=pB&` X%)%?EXeݗ1\ b?s6$+U3JIK tcFo/5д!tT^`?Q,nE[@qԆU`p].`p) gAE/4Bq~_`)}x]?MIP[0>1vq~Zmc1 ܑFu'p8kl1XzMTB| ln$?{m,_$@GBX7f+ t4NS <S Zw|y="SR?/v-!`: F>DMONMcrB06U $<~>Gt⟧h z~_qWeh,05MV d<-`;gx;04buE n5rpЁ:CqѤ-a5Zqr`s,z;Q;R]p::j`0}eSi/} sTa>ma+?:1ό<9v|upl8ן-Cp%88r P([`7gw`ڴ<mzX=A?58rLс* af;QLŀx.MXA|uƙKOcT><,?gy:bkT6}B p|f}0bi$L9>~LXGFda_Sxu|95|?T/]4=bX_ MRaÊ{π 2be au^~>ĉ_تA5Z@k".NQ~oN~+XN>'^~2.߭YLqapҢq@€sҀyջu xj-绁=Kxҋm5m:x!$Ex)٪l_hLE?!e;]r$6%=UJH4!u:,9%axOZ:}9pty-? ᢂbA5:5^K?w9ǯNǎHrxy= w9`ͳ@?̈́@|!X a\#!HJߠ 7 vMNL?N%r5pI^2:煎+jc<0Ʀ[=m(xsx3>'=t0tO~w_9PkQ2d !5 NM3ޭw1F 0&߱pL}k3I`E0$ {ٲ>!:Uo TG=>/|t;IX4̹`y kHS:P ˒ɧ ah Z*Y@I;51SW z%[i{=q&6X&lb=id0qr[J6RbD6Ya geyɥ hPqOmаuR4 Սk(7 bo K5Bn?F1RsиܫT=R*'j}0 S_!̰hdR4D nc*] pH -sBIoI669w?6#qn쩊L?gASa}!h|AEǙ!@= ڥ-xfBwPšk! ѳ,]SU3w^Ҟue%_`2?pSO+|HPE}]Xm"55]t?'ԁsds773usqznKejniJ#vNPkĭU '|MtܳځA1a]IB*d\^G =E+-fu^2\ot@7n4~*_)e\A#Aߛ6OMf ;Ky:Lp!/l\ 2+4~>[n%8knM%ՊdbΆqTzt\}FyF$QPk2Iz9< L3|19߀:|仇)x4IfφAcє{00ڽ ~q3q=̂QORhNE6)UpW:C PiRҋLrA?_<֞nd/LV "\{5pӘϩoǗn|FU9yBxlzOXbrh&'   6yX[u4޷ig yބL/+ ~iKqw!XUC`ս1lI\{ǹt,>Fŭ Ec$)5 OkÀrW?3>be .imIn W$O|jU?u-*j>} =DF34`iMNڔ0Ғ{ :x8l6)~[> j r1 NJ5.L_5+ STEv*׎%g*O*h7Gd7M~mA':1.y}F> )d Sj34ed?j@m8dCj0 }C:o ԇ2\FJ1փBc1y[ŃSM&pEDw~mQ2A_Y.ߴ, R>#ƃTr g=3' ]H萎IJqVҊJ&H:rߞ1G|4Hz^Y9^D&-V+cJ4bbx@WFO~M)8IНhg,Ihsc=t}7L0S+x@'7RL?K=ȨYKD/W 2Eн@xnq:́h j]X$q)<<it\:> {BCNն􎩯AIxkgL0B`};x.xX9*ځ qFZT:&<ӓbfqxZl0C9!:HR "blc`<)x( ze%,S'|U{uR[u!{d۠GhoCRjrậ`AC}PYl9V1:/rXOE#2v_#Eb11 naAw-?W^|e[t73II 1[C2p  ڧb ~df4$>xAιAE g ys ZPjaFYs^YnU6)a4a6N5eؔ >Ź_1Ж^>>dPB>́my0ky!P7~޳} 6BϺhȔwsi_,]SI13ց85a֥[J8/ncKXwJMۅ.I2y 1րzu9xw~kpbP`e~03ok"gl>`R|^Z>勞zg.wQ7UkdXB nX14De=Imğ58Sb6^JzEe~|uW).-f0@}Apy/n: >F;[v2X>'*^ t4|1dkWsԵ01U0Pf;Lkp3P05{vrG+3ALFgy tpH2a&g'**+J\ȇISWmUәRǻ9n Mjݫ"5atr^@ _|]1ʅ9V%0 #}~} bfC/mSzՈ2aU^7$8Q غN5R8ODx\Ew3̣0JiURnPu  ˠW.(3ڮA۴Q|΀O! XzB m0yz7oZKi}qaS) O6L!T '+:)zko2q}̽-'< N(xIPtd꟣V۵)K q&57a: ud`4,>ck}h"X_*4ܸ)}0 lnu#7p3̠di+M@ϻfAɡŠN RS3g]*O0-<k~1DN@8*τk?}µs^W3j}8<ǵ 093t褬`."-ŔR@g9l[ _7mIq-D06S#:' kRI>Un_T_^lnx:Wz7ӗ<"S}ۡ{b?dk3GA <CAL"cwu`x*= 3 T%npULtJPt Xy2IK^Jhߡ︢1!Ԍ[a(μS! 9d6o ICƾ41wnd<ɮg<:ޓ`e*G@8.(a뷤`ƸMVQvP ў tC٭#@zk竨\twlȵ߲-kᜬ#(sɮuE`+OQoE۽ V\ugO8%,ǽn.Ӎ~a"[*m`rBKWgMx0󠟦~`V$¢$g_kW'0WB`@i6.?C p13ګ?s{Ɓ󌥢n8f(NoA%Wa c1|W,(]ߍTT*½mBR|@}Lg׀c+^)S]pIbŅSϫ(Nu\lOkFփ`2h{s 3d3绞X}FKDGqM|`q 13I\GE Ażg'@9WÃzp'3{ "!ꨘ$8rï@=O]TtcF#4u m01 _[nx~UqH[m X闡p=K=yG~/{  zk FӼWpn\d`OA#, q_:`9UyS&MxTa ?ٞ:OGtHEC Ч^(Qg&DE7opྶ{':m  ^T,?mm}143TLLvLc{tC:OYzE?5V}YTtȭNKpr?D}]LRVߢfupϤGsLo1I2~_j쁱`ͨ`Bn$fA g~My &z}uJL:Atϭѻ_9lv7yE7gc+G@̈́ࡳ`F5w|k ~t~\m(׷&Sg_//nWaTs͖נEl (81HIoƛ5 < u<2E'zj eǭI=~ҤS~;rn~;*HƖy*;M2Z_EL}P+1ypb>g͹/. :TA3KQ+:Gj e-;bf"½d`#a_D7$F_srԤXyO&:q`KJ 0}ZB[зa/,~ x]C`窌{L3= a;8Oo_@Xz<źKelE珅`)WA晡*I5k'&NoXzJXdrm$d vj<=WIZ Du2h lm5@'&s0Z֍?3;c䁴bF_y_| @xT "`1a2ZAo5gd#C}5XLE 0Y}.jRmM:[ϪJ x,xxr0 aX!VpUؤһ{͇͎\ӭ Bn4Gr'ؤi qOP\dY>2<~$p8I9봯zMˁ#9C6@A< Y!REP13vޫWJ~Apv' Z=\T%[2d{@W0CRe t5-wIa9?Z+3Y%dZϘ43k:ԯ5Nd!J[rj `﹠ʐq6єC2͓s^R< !aڶ"\my⦗cm87YA;xw!ڃj# {{ ROEkVlw mŀʘIX +X d8.m}h z6(׵>OX}ŧ|rx ^!8'윊>pɿViJ_?_CdR( !>k߈..>EvSy#p>t卸*O' LiKD<[$oAO _&XO7g2դmh5'NR5ϩ`/E2|5^g.cOM䱪z ́g;|;6?E //J<,=Gox}GXT8>oj = ) n6?O^Ň'eb^ z C!y`[@ !vpξٙ>SiwPA)Un:m 3V iOyPӊ/ åpCMi_TCY5#j{R?׉A~ԫp1L/Z=,JI3}Ϗ1?zwե cg_M=Hܛ{w .M VD'Y) +0LZ`l o1wkX% 趜Z4*_ůO(PS6ܩ8-hjUJ*=PJTz@*=PJTzIENDB`ic08XPNG  IHDR\rfsRGB pHYs  @IDATxU(*"&!؉ >1ngO@n.@, VwYíTXk}`$M+дM+дM+дM+дM+дM+дM+дM+дM+дM+дM+дM+дM+дM+дM+дM+дM+дM+дM+дM+дM+дM+дM+дM+дM+дM+дM+дM+дM+дM+дM+дM+дM+д L>ьi M+0+Г.oǴ4l Via+pM Vsv1,\/LR97Mo^x~L7 T(\0fL;&Hx8ow* GX6 I6].>%aٽ['Aca2._|~Uvi&K(4/ .Ew$M+V(Y0ezKAKһ2AMaO GsR-Z i]S 9jp/ԪioT,| K8f) ./|RxCh2+'fٙ?PXb2=}'WcX ҝހy)K2Ga΅ +,-j!uB6h !T0>7 oz.mrFo$sǟn~pw0Tc+AR_G+WBa=TU0[,47f_4xAO8TZV͛ei {AV´# gC]5\_d4 U(tW;=y(~_xt~۷,e^3?-XP 'U'-L N]ßUZ "%r-~3S1Ys&Jυ-j~j2+l ;'%$Ζd\ɼ% L'C$//23y~ 9aLo˥ B܊u!4m8zpf0%_^I+(H8)x#Nҫ 1)*}Z~r~/ ZLwCyJk!n )W/YNJJx_dNL9Nbco@^şdc?KZu%p7m*n(Mݰ(IYxgH <ˉqVX DtJ>SWO`υzYu߀s|&?W^xp8'q6o+ckj kWiwaFL~%t0;òM?hN,~+i+/ ӑw S[-A%G1k8$A\t iWh\|[ 8qhproFSifV zQR_b|}kt:K(25C!u!xNfQiaa$+;=L[y^5owq7"COw6*3m 3L//CBәir\E*)1v5(N*&.}^fF^ޠJ$#bsuWZs8\5.df"ꌦX{1kaW ⸯCMIF;/ښnXO#քjku #ZMόJIrSp4J1|'IEKJ gW)pDYqg#r?ai^֙TtҚS+~{6Zsk~- +A Pˉ<>|?ԸRIv"}BK HoOrqia+>&"/̤%<؟b]FQIqCkx <6}%yu\8#N&?5>(t+,7dLr}u~i5hNY.cᤏDA<2"O~bܭO2D?3Kv&8']8Wnslz>M[WA!Ʀ) [yħ{dbYNldI\X1;WJL_c ?eQ5F4AǪop=ӁḢ;;aoKEPNlngt^RJ|Oi,Y{t+;,Y[2CO;P+[>UIJZ:ںLgIu3H]6oN!$E-5UPkxV4%Y4E?$\J<\3]oXg]oI a~K}~(M#e$,G>/ ʲT+~BZ?oְp3g >$=1[>ݢII~+FINã/TjoY'/t!D X(3tǛÛ0Tzʼn#[Ixg*_C* prˏU1< .݅]JEչv@Wko?O*28Я?ȯt@?ԐhL|A.PKtG0?Q?S%ƗV+p,0pZV5Jԋ>?<}‴JhຕK'Z3:>ε$U<쮚8,{(w`om] h$p9 ^F/UL@ެPYJƩ~\"p&j'_%QqqjaceF|6ҩXxTzkؚaYyUZ1/ZGk>|8vR-;0y-q? )9q~ɮMV#Q/fChBy;IJjUmReCrjݡ04J;uH~<`օa =#d*"{, WlIZ=A-Ӑ`,Π3FC 9ߡCӰaa$Mf'K y7A{ \DᤎlSLG *.Aa4?[FV"y nm.K' D3p!y:5U$;|TbZ=j Z4Oah(ӂYTѠ`yV&!`߮wMN:n*)_ 0<#y8an}vV3 **:qFp9_v}r9tUfm /{qJ>3>xx](?95r71djgWuXCE^#9*N#6_Eo=(X1j-c:ޟRYP w8 G<#↍cZ0[I[0KLLPN|{I:$^S D-nD%3~tjs@kw6X<=Km{ UasP#jop | =jHa<6DhY8JP#kiGD]w>yg75EMAvϡ1"^ǥ1ZLf}:Rc iTa%vY0Ȥm6OP o>׀8Uixt/XK/t~R7Jc㙟E3bW?u'g%h=< +UN ISZE:8xp]i|=l _C-b{CM$[s~l?yAʬz'?Fhs0}r:lX9;é$.0 4~g:+`CXdwRI,ʈzީA\ TJ ^b^ kv48lm`N`{cc9F eSP˪ikPIYa{{{0X29c6PK}ϸ{d\ rqtݖFVna4/:-`>x 6pg44wHuܱg|yiN(0&)|%61b v0s!O%Kg:緇a8jO)URnmT<cS"|ǼVO6p``Ui1u~8 !M"'4Pq·LAD/qQa_ZstqtW=JoJQ5XݼZ]v V4~f2>ΡhG:@#E|U>q5 m޵NNy)rr)홰?}a0T]j-? 07^&>s7`z T522 Cm9DCCcԝ`EB| Y(%;y^@@^2Ւ=m8އΠb+_c+Tz&gJWg*]5#ZVs/ksT`Y?F}i?X%: t<G~K5-x~)x\a|:%3bF,:3AϘVu9i=קD\~1=(nפqDPk `0+aO7 0~J?K?j෠uFsF4Z˳I6JlmƼ;>NYCgzoIgS$^wJ:dx(qe|4-8bnVnwjM~AvkyBp-,2ONwՓ-%lʨHI[ 9KTa>4)!;#3}:'`Tw^J{x:@w7f}6ɒbm|{{:pb= #N4\7Oqgjedm Ֆ*b_\pYI +f LrAۉp!d똷<}`xqVΆep4N71y'SӳZ[K()2.Y:v Ac[:Ùp\j@l#jlۇaFփJOqE9Q+~ A&DjF)'- " 4DrK7/(a߱@85`1S5+a.]K~ AC?/K+CcI' :UNK1M"tqG_/,_' q{؂z_P%ʫQI,4&D7x Pz'ZV'ple0-A^4PZc{Yp Q?BO_,.b}#Up >u (>~\yӑv+Y d'cF^!Xyo|W 'Of69LZ&<-iDbiťyPn8Des;yuϟǺ_ ;ԿTb%f$T^ ĝU{@OI)| !>B5~ UeG9k0VJM+'۾g1Π/m!;~6*N4B5ؓ}= tv5X+נ|Ap 8b]n u,⃻Z\9>ԱDzƩk1aFxv_¯c|Ax}9,p$t}a3!|a(>ga7`{8.pu"|i8IFdr2ɴ,$#݉5C+utɺ3ݏ59kMѠ?,F2RUߘWJ6ip;TxԳr '3Wų?GnKs >P#:t(-MJ&xo_CcEh΀@5x<} 0 ބ`9V P03N+Ȋ <qml1MW} >K0qu:E):|~*Hwܷ(G]8SW;NH;qPJ\Z(%3V)t4pd-}.һşF^@UD5ӥ-gz>z6F%m*zc6qu q :[XiBJd9|Zj8NbUTZZC? ڇ v"~ -`X6y7?Ƭl%ʲq9 YzN2~MW$5|k~'Nڞ1lH/m> ֋hcE+'Q< .1W|97UAV,_}]zelϋ8l}>&Wf>H&u֏6G:l\w qO|Iz#y .@Dk_ފ~ۓC/Q>kbѻ3ѮoD #yiEx\V^{B>Pd%#z i8@4: ćRTWݗY5gvc$NLSa؇cѰ||a0-۴ 4 :y[0::Ǥ蘏0 si:>#+W6/ώ׶c Q鴯_qhnsRtnhHi48bD GEO+A4IcxF4O\?E|Ņ$i ]0;"2 hVb7P1N4 Yբ>>t-;r8GR<=}MCe=ok F}Ageq%s v MCqz0̗Y1}~4m-;) ?#܌sqC(#]oi(e!}Н+3{cwC0\*n"ļȏ^13OxkwFqBD0"6MVq)^  A^&YK6mH?pwl՟*."\_]^1:t&ABڎ13*nz3B4l:5 2/2&pe_L>1Q- Cg.{k6 ~1|$3'}hKC7hُLp>l_,Bʷ- v'ϿIx4YAxڂs uUb\0P*r0ǡp )iF@4ۙl^#ny=̷;a}e>ߐg9ck95Hj*.QcelBo`!ߛ]M8?};^2~߅!EPTiz<lyэ-hMp(sIW ,+MN~aB- WK?uGI|%n&H&8aӹn`4(QH#)ŮǛp|:0nȏtjc޲r&sͽ 1Fȏ0_n:8 ]K%ʜs5t ֿm{FdW|Z"KTXU] A9ya8l @qBO5[48_jzxG6G7~45@qn5"n|+xt$#=PaET3CW_#шE}Fhpy(CШI|ؼyg¿`vP p y46 ] Ր\CPNG3`qXS x~p} L+iMbQ]I?GhٴH7hc lo7qᬄ]v>/*U)ۍCVZDߥ6..~EOp; M09鬰/ N>u{>Bш&JxE4j7VF9Jx-e8 3C3Pؗր/E_0 y]<:'DGVb7N"t >РrX:Ή4@or>A ހu AE,<|TA,`$+t̸>; k1)GE:k.eDť^>P'xwPܪc`oPEbJDKy ]aůIMx).d/'p't&ō}z+ј/ <霝}w m=e.xd˂d5ڧ/h*}bNM\ 77@sXt(gH'8O 4* DM~اu2MUĦ#"rwa~}6)`DKf<ɪw|۵u'C1/]s?(%'_yn pkv$|z p<% [d9þ>'`PŀWª,.#Hz{ů@T°pM[41S~>G@#gjLB`gĘt bW{|A &\|dA^ TgZcaV"sqUbZ ;bj8, '4߾9?aLQNNE˶ f=♎;D1Iɣn]6nE/'a' Eܺ}@tBbVE>IzyɌk5/#2a|{*z@Ж=X=AëU{ aW}\cA;`qJѸ=\ ]9CWa0|< g>g>hrccxV[8E[$II>||^o1F0e1dˬkmhǢs?h}8BRE\2xv8x`}bj|ݼL?dʷ#([عsH.]Ykm@ēwarfru#hXD`_XEt_O@w8Cn |yYTD <}mh *|M#4/moh:`0ly6?n; qg>|#á"يdqr0IF,Yb:ge?PrBO럧!j6|!Wp*Ӽi TZ2a f5g\B/7FRM<ՂUL˧ o 6Ĵdx42!lA=7>P|Fda X4`|.vY&Y/[~hPN0Ԣ0}~ij}śbs`Np/ VPJԒ`i(5RmYgۧo}/eQ2܊!'q~آo/V*˄pupign W׭x$Q 覣R2йZ< YiMYS]7a XqN:4A@laGmB(͚`Y]Rڑ;dIL'XYO4,:80n@YS腮6PPe}Eyt @? !-3Rgel"Ox6v-m7dܥyk̇Mޕ"eēo kO:?-˵ hwuQ02m.,wh/ڴ8'u|nJ v 5g;,$+,ײT 0}U2mgn3+]߳ә0vgZ9u݂S=ShG•7Jw:xL's-\8 db0a>}x:(627ڛ,>}䍑y_XѼ1@GԷzjk4b`;  σׂ+B>u+1@&>Km_ / 5aZ]GtHcVCmk[pwYn΂ jLN O&\I_%Ձ9 w̎r/`JQ Yhd3lRZ1^0D}~)fVH~f'~ :NuyM1xy&ӏlm9D~:XcWmqB7)oV|Ja*+QIx{SymQlhgF.pZx>A-}]ԜxK>,ׂ٫Fn& , %Zئ | Ub}Ccc> LN{c`$h`d59<,;R.5mHWshoI^Ww3dsvc%t! pC8ثiEz1(g"Db΄XXS? v?T ZWqIqnbuoQt(2 `n:,baVԸt3A%Kn0P_#S䌟2rOoz>r7pcb'fm ԷP=v,7F1iqx;@wH _6[|dcL-Jj5J#TC*$o~rYQ6(L7_'$ܳY](u;~~%u[9YaUYKIRyQ- TU!a9Xgճ\Jp6VǣM1Ri*vͭ;̠u'HҏP9ZQEKI`C7; n^9A C`%pԦ QX0Owf> ^e{`4l ?A;! oL~Q_7s;`\nخޝ;/BjդhC7#%]=#\ԑӽ2.8\soMs ޣvfF*YN` ,겜ɏ˕g$T%i|Ggxz:]bC{~s7_B˯`xtv’ _Q`3B dGiO5@Mt]34Z4{ay0o nBBT>p% Z4 85=7IM _mC݆j_Lߟrv=9.vD$"yxkG~`(PC]kPb~LY;萫%*_*6WF0o ')+}4}/˒L T8 YC|%5K湌sNAf8h=q>w@7}*|YcMVnU F>&q+x  / zǭag)_%jRѦ}p{6w!* r 7=}I${qڸ.hp>+Е֩HWt.Fnj`ɭd0aq[+tN+r8 *IݿOư? П{ig ?L'  Ѝ^*saS7,#Cm˔[v.\ɸ;60*c;|—xi.ՠЕJֲm&+_ޔ^:lc"tIS%E!߭GߛP{G&>x6m@Gb^c*[M(;Q O yyG9By Y"3Aa81u^)ntt\@mpj۠M^0|߸{z>hYqUu_5&_&xk*ɚž5^{o j"١ko01߸Vs)E-lb̿# k;Clzd QeO2|X_ _yg8c,a1Hmω[Z.T./UPc^ki:[$΁:2~7 YAV /qIk*;u{0;E'꼇\ճ w tb\űh:9?W?p{;?yBʼnJjƴIÒ)^\e҇9 %zõi^ nR-\~Z+l$c>ϪF⌓_6P?vԽ)+zUhQVN ^/GAq4*Z_^^}*.=pE,u+\Eʓl::nlPnc:(*GȮFģ48oњ>J:$,29.#^,=ju\xPeϕUKHcsN!+рh=D'.mͲbz0zU}{.;M6 И4OR< И~p>ۥqTn[U4u&_ި6{aSNtq.J6$#,oDD9 Xo^#{elh*'smM?-%wJU2–p, yqxN\/,V}I]4m=|iK^09 Bϑ~ z;Dy|'^U\sΪ6Rp7ɵ!W{q+%ɟ@D$n9erܖ%- Bв^[/ @zо_qwISd51?ڟ7#~).$ͼ2iY^`PwPv P'{ߓz!J=bHa,}qS#W\s2A.SSȊV̾f3;%NѴ8*\*O%sq$\jb+Ȋ /1]Ev2y:ZE\H,́tA="bsu<ƒtdܿg9BBz\efOgz֨+r#Q&tYYC ,ixZ|6$\;,LMoYq0ʂ$w' L(q*p y)LX.`&p|Y17EdK&x) .ӌ- 0x~QFu3eI^SH49u}F60T Ke 4( 3$"]#Q&df/DLT)}5 z4W ;I +Hܚp !r$`p >FUc螌hT&pV„6o`zpY1O/v3+%^'L8os%Ui3M %8[1YNNSgRN6Ϯyw;C>nZɍB./gnssǐ^]_̷Okj ^FTCݣ͊owb/̋yBҚC^Ao!݈]XaM)_FEs={$rj+5j$O~1/-J$mS&ԈҨJLI#߲8p|1WkV`=7+o@<&J~HUo/ %+?Od)gVQ9 y4a:cģlK- !KZʚҟ}g!T'?nTl%7Iky#%/}|䫖T9aZi6O`VXV-⽕TK_OZ M҆5ѲLR,nУcA#@|20A0~pu}a(K6WtQo4sܼHlGR>,oT"K9 X74se{2udɖL47CN^^JJ TR0ZD[{7Wij8Zd=#@Ɖ ”'ZTo4J2IhP`{~1\'L4-^*fL;5+w)esklP7hLɟ~ц 6|eG 1^d^50~ǚw* CVo?0w-(> >fC4YD ^>qEd!_C|t)E&dzf*Z|.USEfmG6iMG{ܟ`^ x4HV8*<TZ=KVFmjˠ+NPtiş Ysbe7t)H %r3M"Wx6KIaWsJJJ4-YH:p_pva)Kpoc16JܞZdԚ;S eQKŅ)0}д8Pw%%r E ſH"ǞSN[ށ5K"nhr %{v>v;-3Ɠ`-Z!$kn-ʿid?Bxݬ`[06TevwxBu29|pN%.+I' }+}0RMO2lKHx̧RU֗ mWD!gcJĺ`< Z2K-, K()E,s'^ڍt34@4  JvG WZٗJ)[kP}-X>8ыIߓ+7fJ&hULZ|F|{=ΚMFufriۂPi dO Chw4w/O'-k= LecPWZZ[Eɴ]kaH^e|~o@4{x C?* z4s%+am6n9m}o+cwPQJt& ڗb~sq|nWvlnN5ZQnjRuw>,p/y}ɾ,:IEԋ(+iE7_IgSE>Aܙ+*q:˂qmXbbֱ9FpOvHd"1|ٷ_iYh15P0nߌp|LsH'/ij`wzV_wN, (P>Nw[/Siv\X"߀bq m3T"gY]rc#.lۤp`<N?&B~APUm Nڰ<` DP>x ;ЙX_5_+F2b+a$.|㖿 8A`4/h ÖilA'h/3sb #^SVEebyFZXFܺܺ⃶r삃:I񌡝G'cpH̎C|\cGW-qo7C įzDa# ţ a÷mxr̡|NmtGYYo !t $ۘ^x<:U'Volw#bH)4toCsnUA#f@͏!:N3{#2QIO~&t' ټP"ք@44y:㮧B]Yn/D߁JznA:bJD}}0~d=FY>=.b~HģX#<G[q4ǥ$-9pYKv/I .Þ/'+Z]jE{(L}^7&d%҂O_ D3GR4~A^?|H3p%7;lӂ'H$ ,DVf; ҳ9 |{LEx *XTR'oh[O$==XRuʆIۥ]e-w'Du, hg<'6?<(>#::}/4d}o"gLg^?-_w|ibU,sORIbJe+>;@ˌ0:ÈwQ7rn1 }3ExoNoؗhdĝ. 35()I{ X4[ڈ ֗MY ^)>{&?_T,̊xtZ=?HB8^-.Ļ^HK}6F/Fr;x S.դ'gKY,9& \R> ;&+d6%(Q!ԋ@( &Ra|*I蕶fe$@%nPw$oA/㟠/œҏ,3[(jJOd˭_gMY4\ce!d?I xegD:ܳ{nci@wѨ [BX:}S>HD<sm: /b٣-/~9Um^J삪r$WZ^z`͒-@kbm٧N sp Byjؑ/6h":Yxt\!=?F(e* b BGp~%vȰ-l 37NOptK%sgy#ԟGVi8PoecU RYi׳y98OpN9,C$FBN[RZ|3 ۵%<'/&o|n`rcE=;o~0-Te&hw:upUA[ 8^;>G \[+>O>7"?ȏ|SNW@}ތkoY]N)%M]N1QZ1 \RoyQbZ^9ЧId+>vg5J"`<:2~OqtVQg;i]OLh%#PCk]9>PW]^v|'оЏX;>\$΃TZiX'^~}qhM]@ vah WiwP?F\Gt6ZtKˎ!_4` Υ>BHzp'qve+ /@*kN[z|z=5e(a]4Wգ:VgE|寂4x<і~7Ulo,38~w' mB"G+<['iXr\+ؠQM^u>\Vƀ Ql^ttXԳExVwS3j)ӐfW<ౠjv?pC}7*C`8< -Yx)p DTF}hoMWaùӣ]4[K>>y5D]>3[uNr,Lp~5N1)A{&#=|v-[X'[#\0)#ިGg%kw^Vׁ| nG`Xt/vVJ\ϹRV4:%&{6jX&sÉ8|y7ڮ8 CCԔ76՚ e-EJQ-d:qܸkPDz}Fҗ @X{#{+?NaB-3 2m:5uW8xFG{vB]L=k (׎sw%=ogHXQu1hڝc5 ˁA{PbH MEZV435æ&D?Y8{r"Q<[d4mz3nFV$ȖNIBFm3Бҥ8 U"_Kct5i&fu^{m2~*暨ʛaiؾ̬&avSWg8t$;Hµ?Ā'LG21-c7%{ S@V\TȧCnZ~h^6|C#ƛѕH9ڎ$l z_h6ad+Z@kpP'0P73[&. :c̣1(6.'F?Β<wŶt R篯hxnڍc,=!+qۥ⾛l! cĸy _4`fTakޔ 鐞`3ADiv-߃oeʽO[/G0`mi3yY9 O5=r (Γ'&w#1yI]mLfЁ֮S} xiQnǂ. {}0e8ww%T˃㤢 FxX@ā$? =@ Wrd>r4J*07{#Cin!<ɸkt.hI.P7[{ 1@Jp3tuD}M@FɷH]Oph7s1M%c<a% E sd_؇4JJfb p+NS{hvuVD`bWix \`]-r#tR7cJmoJX褿QEP  [FST{]@E𘉓 FZ6{gud|W激'lCJnjQ\Z-mm2J{0;7̗yEΠ.OS$I3i =dp vxvD+}HN{"V"NV~p(xFl 0aQ˥6q3a;pnOC#sN7>%8lc_S#2`( <ɍq߈l8R͔SAX΂2oDLUfLNjc z΢hTU^gA>7yv \2@{@xC|f57Ri;۫62;Ĉ"P7XowQ+KTb˵p`שߨE<s1К^L\k}yUX2튕$%SL'O%6aqh@ (61ܨSka] Cw< 3i2 ~"]j翚YJ% AU9#d/E A/$MC&6u:}PO| x♝ʧcLDQaf7Xl 5#Ɗ,iM^pL*,uMy(:%Y|{Բ+NK/pl-3A7u^}NǕQfGyF(6؝ג/0,d0x3-ۂc8}Àֈc8I<Am`#ODFQ[|(%*(7B+h  t~aY#Rb#6P3A=?y< gmV ,0./Ķi7ho: -ٲ3R(UܫmiF.mY8&Ï`7 #|o%RkЎݓGZ'\D}J,WL[1>pЈo` ˁ6q*.8tS-S 2W) %1ճ1 oĆ@` <\MY8-O=hLR>Ú+ 3;n&&eHy4i ˣ.Mحax&,%S()]uځ@7 ^I:HesB)9;AS]b>X*&5JmWY \ń>7|o5v.,)@>|pub:~N2;UA#@cD0vRWBshM@+ ɼ'Q8M_3!,kT~*q"PX\KP/>}0]% F^y$ڤvyagaԞ߂} O%xIε`#Ў & o;vc!vR;8sG_{JEӭM^6nb˘,R:`rD u^ O~dZMjz-8ƣ WygKRȶ"@0auy0t=?.:Sʞ~;?3xMxL'Yֵ+̧易/ 눼Ah9k.ht' w HE_ua?zcuN|sM)M[BZT20j$QkzSNź-<"%[#Q504?ؠ.Q`j`07Lb]oFv' 6ސWK] &:r].0υEJܗ{3҃-xݽ/P Qkǁt0.y¢XDS9#Mz[Rpxf?A8$<^mtEV+n Lt n.LWt}/3Ǟ\#Bp1(S%G~K&8 .5/Σa5pQ jWH{Ё=CJ58/':0S ^h9 oVXO~_SQ9ȭÏOqz-tn_\tmo2^;#`ר\x 2%+k؊4ρ<SaS 2?يt/%?HB{C@5Rg ೸OI0 yyrSLjg]?>NYJ4aRI{SL`z.X\H>e]bE`zxFNS (#T,. 6-c1 {oH(3yHQE=Ac_,̋mˆ8oUُiAn xq ]pg<ũN,7a=V =ňG5O.@}*D N1 zqֻ@}-dg7:y`wnP*@8$n.ёہ⢌ʵsm 6V wakh ׃GW862. sP_{kUvN'OįJ T觱8</ J'o |7sH Û/lͧtm7A{0(9i!NT_>KgBҮ2?ӭjrokXX\ohhkKݳDNh^<MC\6x0jD1ujVP=CЯɇS-)u?ppRz ւtxFn[DCɆ3h̺yƏwS`q~/ѳ&' G%l'3ijmhe%@]X%!u +[^1O:u(w NsLj}?l0L0DT|V4sy,# @ۘ]*e?Mr\⽰{2uǖ4j׌4E%L1̜4@vw;}]`x6|S~-dxO7`@ ̮- M} RqK xbnJCp]|7H rop\Ή W+|1dKJ};A<[W4cjئSq&:9x늯YNb dߩ4tJ R,~_n J>Η9 p @8um# 큏^ٗ> *s #;K>"mg|5v/%uBI)HN0| 2̫Gg^PWh@Wu0 F%e4d6Qn?=шl u#^*qHzxd 퀛sS|(կ ~Jx8_1j5x~^ {,q,hƷo4hVc`0Fj6~2;'q`gP|qD|KW wERWpE:8o30(A;P1R2,8~`7*d"-K&@ Ysparo`;Ǚrshn:uɨ1h`4u` kynYfMӬޢu :_4&/2.ES~ >ˑs Ou+~qpE)Nn&M_\)19 Ѿe[FSK^&^u ȅ@strb{u|By+F^s\۟w7lCDžI 0l|ι+@#(cmMvdz5 0/ %iP.p1߈Ǿ$-.ueJll{. -yu.FO<DvQ}I__y|cA1|x d i@~jξ`ܝt;P )Q*}fmTa/=n?sMHu1_䙬:xX?084Ⱥ0 -lZ0Jr8$M%~.; EMh{uYɗR7\.2y&ټm6 լ3X oze}ϡ@EV#e o58 4@'Isa'Sv^jSzmep8McM*PgZ8Cs#is_GH-<+գ/v۞aذ8@*>߀.pC=%my(M ﱯ+ Ֆ*EE"1"aҽ8Oz LTbŕ[mE~ˉa|鸔o 06<<˜uxmt |%HFq5+UԷ\tCKޜ @, |v]9m?<#`Dd.^]A< +Ϡ6 'ć`Awo<3='o eƔ`Ip)XvJ9j:sb ZGW# 3+%㋰ -C1+nLI|ރi  Ӡ.9"ڦ)xt`ں4/бuK%@Qm{+(xbVb=ހ15 f yٴXFR3^Q ΥSE\I-t.yp_v} o>]_6T.݈Rֿ!EA=(:()1<[f@#-%1f.ۓ//}j%(]KWK9_FgZj* =4yqXk)F;tc0XSq- NHeqdKnێh<{*x? Vؠ}'x@RF(=LQE-_5NV48L=̵ܾUhL53'Y]\«0%U j%]^}irb+16'# Xt%d528{0_z<Ė)x9=b%-sb{O@,)EٺΨ7*\ =@6ˇE?$ Dl"OQ&lNʮ ~KqH^XZ,iNN]ht/!h @qţacϬ[(*6 aИC|ci*p EA:pYTY4HS0 \X} ws:Wm'@QThDLHA2@IDATFgYrslMT 8X֧jڀ=vU$}N uL^1y<bD<X`-S<^ Az@!*4n rF2-2Ŵڃӈyv ,n#fUIE@D//v%Htί.=Y6a{j=Hl$mbzh.*de2 @,XKr ^U[t;tNoĜSRկu*˾џl8&p%xfclIu 7bZ^ 9sx܇϶U!D]U/~CDٟS14E`C #W,da  V+m: >)P&`oǏ ٳ F+E] 6SxcO]H]#@8g| @X}t-uLk3'b}gf]#I9/z-{R!:sjt1dւ/@7Vߡ #\]Nk89xU$l_%jOA;K`Tlg{rah2{F\pH8gS8S1ԗ`PN\p`puU*,cM";XsTQuGWy Ap9:ަ%IU[Ld.,# OEvwXvi}8 Ka X}9brm5a,i?_T하/[ao0r;~+:m ǃuJ6RҲ#b>?\QXԬoG7"b1*-W" _#>o:s}ȹ>Jk. /Rq;< qsEpc \p<&⿊$zEk0 \JM n" T'~חziv;ڷ'Wh g')5eʽυד J%RŸ`;Z`RbZ:~qDy:FI|I2Hռ"wϾPNc`y `UTY l!, Ո+ /zTv5Rit@󂱭z:tD=Rn[ux ~-$h >;h.Ma߂`/LyC0`2x:: \pLQ{D :(z hk+ε>:fcq|YZmH'\!qI>:υ³}΁34mźheԿDeX6"ƿ$Ja.psFdjÃV%Zê.o- OԻ-m V6+f%%]rTϫY8@, ې`up':8.ˀ`Ou*.0\JSq_we-Gj wmA;s*{Q37 ` x?;S)94}vTgm$ N֘Jρ6nzsY XJ(@%[G^iWXxĶ#aSavdE: Mh`+-`zGPx˻Gu*E h7lK@q֟p݃Tk@[$Twҽ:^ԅ#u43i?0,ӆҹ-R,[tP1 T\ y0 [wt|o9Qϊosi;kOh_q):Kdl$o-}CV$kq6(6pCXtRt#b+'[oqU@y)kvqw7 Shc{}szKJ/J|.MGpsy~A9qcr8()tzRc^gu^δQ1'}xQk%V+-wn@d3mڙ߲||ű |c2 ҵwgbۢߙY{3`Y- 6ĵ8FS[]cƍop |pܝab$[s4ļM/k(F{SQWp:hoNoXO3os׼ǧ7M(3D&1.ԁaӜLJ-%Z` Jq#<| CB7  B66<^c4gDu|OLҖ'4'xzýEaڶ[W]ƳlqHV<8b'.Υqj,Ϳ CX#.Bp?JԥvA6/8f˕rigྞMaq^[2eĜdzۄ|>7u;B)UE+@Jq.D9u;I\d1eK<o@r:f.W&jo⎔!PURta t,5*5\ `s(dkh8O)yBf8"Phd<;dy{~U_ 7 Ʊ f5Ɇ lӟ2 v.D[lrˢ.{d=іTcD<_mkk; aKv+?V/9"!f87",ͧc[z™`0(~ttP3EM1vo;l¢|/Z#NVa JD%(C@Jl}b: . !ϒq0(6]aop7`fl$UI㤵{QG7n*o)}rO<ٕ2Ko5 .d@KܤtÛzn~ :S=<Ӽb;xK1z+Ƶ8p<8)aܓmDu:~Zfޠ1?8Wm#:D^_ЋW۲y(%Nbcw! 񋝾e?t:解)̕i#[hC`0 BPAc{B' UC ŵ-Q=j|CNoKjkMa2noK# QmT"óg`6 :G}5UqGri:ւ zA$fw!ljy#4'#m4RUvA:GEm?qPo=Yk9>{[IoiX^7|I'bo?9_}layxޮy(۔s5۹N4xP_h0s|Š澻 >V#ÛuY.E9 bp &X `^a$}Drskvm2<3v|7hzO\8>iꅸ0 7>کXJmu7mkYHG8sp=b^X ْ!p h @~*3Jl/a A^܋t,Cbm5y6ջ |Z0RKg;1~w`6xZ^hg7K81VԾ*b2g,32mh٤.Lzjn6`;i>3}1๞p\)Y"Y; 6_#F{A77lGa7xʉcϻYFe?|%Pw%=!mSI~ "ZHKʯmAg{KRϖiCbh[.ukt%9moƒ{9sxmyB ^sɀtztg@SPl!lq?E#HБbP%F%juZ# Sby亁8΍p(RخJhUnMce秪FиTZ] }\{~أ6T8zWA͞,x*M_zdp^}a9 nt-Z, N%s+A:]ҁLՌC:Noċl -Ǝy(|Vyweucʟ`%8ܳ~cI,^ ԧ1\%|vLE 1S06ukD`N, /p8T:Mg^6>Z0adFmޣh[N\zv Եe!LQuQQ!?iɧ2)FQkWPi]]}\wE6˛FHo`STԱxvg{סX6ﳾ(i| ]QT+ tx.JnÇ\LIjD9C`[ kNqyS[yv)%s9 @c O ~} ռ܁i=% +nRL}L ljJjoM3'0k.lWD0H8A#iMq<*SV :i?3ѱf`j妻) Rɯ1#f T})"cY{R\e>\ZCmDd{z-DҨ- "BXRYg?:5~ :{4cXRpX JFJF{R7Q᥆|2ކ6wBA <5Ե̸:yAtL;.]F6kc_ڠ Gjkx %Qg{! μJZ @m#>Tg`۷zK1Gf;h:?vSP\LtIuMvr:Qɏ*9HbAdKPJmtԾ?ރO9\0 A\;Fx#EX\C^#)[ J`5ܯ6a?;E2ΠГ߄挨ʆ4k0yp%ІogOc]Ƙ:5?o`XևT`D^#~N1]пAC9n)1` 8\ʠqXXHo+SiVQ؃acHֱ HUëT4tք6Uiz ?cMTmbug?鴵kHPOuR4vw#0Fp94Vhڄ+T}@Y{D5Lm1U;JEP7O`h_G$1E/s?S,uB,*SObuu*TPJ_Xb3:ik a .^Gw΅˧o1}:Vz D])qzv8Ոky60|0`t*_jRh# [ r?bڰž3ILjVD~1>kw, i5b/&"3^%: FEƁeur+l :>)*t a=߁Լx~MҾmE;p,ph+ yL8Ж(6{+ai ұx3m Kņ$3< 6Q7@OYbe%.FI=raA| :aqc }&_X 4A#1p7Wi8щGU]LhgsLEl$vSf)<RXA2,Ye9C?FHի|L7@{O.@ٚ9# Iz^QQoLoi[ |%{Ak+Շ&Xw:?;_Z[F&8x**WE:W:)=ToTxރ-A?§0&/qmwH a>P9AcSq͎i=$CoRJPSO:݂mN)c+Էɤh6'n5ׅAl`]u3@y_AS)&nN^N&J(ϗ,BsmkZRbJvj }든j>8Eis-?3uGH+xIП=(>h+B>88m<8s l *n+1b޶deohk8X7z[8rO1<8 B#H4k } NX^x?9\&sxa3{[77`=,=o+țjߒ֥Sw\{gs#)$=ǵ5iۇc8YRT#~-JF*ˣ}aklԙcht,!-S|# c[ 4ǵRtAy.V*=P9r8W&"8/96l]@:!斔Zjύm  aA'Pyxm O1>esk/}PHǬcy뼘.ǝ!N{N>ŅM0b Í.zo=+&UP[{*uh[7#[VQv͵ДA#!YV8X^=d4:X$4;B۟_Үaړ OsObs|F`tճV>pyn:/x qsڽiv ZcYWt) tdchR|m-X!x Β/Wfy  $J:j8/VؠЦptw{a FU'*'iÞE<*@?*m2%=8kkbik%T3n yˤcYQ/ٵjoP)ŷ"qٹ*m/h⩗ =gA 1;A~Ѷ30Ȏ&hsa=p< ta3^%<^mba"3H;j`u;vHH.MnQN6waW!+Sq(0~ 1L4$HDZP:g쯒«ztTt0$3Ш-gV˃SGC,|P@D}bo6ٟ_ $ Ԉy>u$}V7/qoʋw6Dm0_o:%2mxlZ++|JYρsK$yadAHu967-:( Nu.8٭糛\/c(>+8hRk7(n<Pёmo(&ZD^BP8p L&yA9:G6GYԲ]`zl+N(QfUhX0xSƼdgj}-ϋ|:'BlLb;ʼn0yYSB*E/Y:0pw9p>|jE9&c<&`)O`r!ӆ2Y=Qɷn^}O?Cic mf&Ծi믁S`}Tԋjq`[1S"-<opvNk4P%ښw3知<ְ\}1 vB_PyQT#@e 3ulq_mZAVRiR.8ӯ'gRu34氿tA0ք`t[@3Me "$-4GhOcx܋y 臾s'gXD[ter?tFICŠ9} c [Ryh sFIou1c#dkۍVVV-օ⊏YGU>kTAl ׁΑkMCcC]^u51z<"pʬDGЉ V Ϋ] hK@mu@݋yiJQ0#:tb451QsԛNGS⢁"3|!#jz׌1`MTgb7RNT>p 4DP/+H0xmIۛ-#W߄x/K&۝ﱖcá3h_1L,>O^;u m{cl8.M3hӭ,48,iGay}`e+H|Z5/[ $clH5XtZop7l:mm_ WaqP*6Qa@^ixUm&=&<{@lb/8;5*1D9a漆Z|V^\-TustQ`BbWb0`M[Ns!G1<|} 'gm.ࢭ`cG^;2PlE]g׏-dڣ4 I5,;Mj6 A20{l}{Ї_WׯNs8I _p3ĝHꆫ8`lmC~5H+Y2O";= rDu8ҏ W\A- t\J\ ''(']w'Pk_6~h?}a&M'| 0fT~>6G@۴0PGi7`뇺]>Cґx4Z pRk)n{˶`pGVSXq$>ClQtq\SeE/O5BઈF&F]f2+o2(Qi&}oeو.~&t\7N5,$P] 'nu_L8ط~ us!?^<tdC|t?"!(  IV>c&C=ALߺ(f>J2F0@tp8'2dbt8|>8.-K1mvL+%\ u>0^`%>O\x4?RM+ d28(gN8DZ ڗ,f@WpSOr& y9bh׿*%UcCGH{0\Q(#&c:2P FFWN2Νl9([ i6b `p0.U|pݷ!865{WAiTe(c㶨4ƽpetN6]X /X!}/z$˒5a[C9\FզRTVuRȊ9 3x9yHN}5rľIww{WeVwe-Ue{ec-֧}&p]-86 :C|B:Jpm/Y ?mM8 > FJڃ  a]P:Yv24 TT\>Seg,KtV3Ax}S\9@~m& GlQIlexgEX)IuTXwTlo^17$mHoJ'ȓah~;΀|vlDCsSo'y*ܡ?joQǎk۸>Dqˌ67رyMt2Dm@p4G'8 T30T#6vαqU1E2\jL_q.7}⿮(^W总+tbv*B.V 6'N/Ah @R3@dgkdKdv̦ 6pl&JM p%8Wù_ a@iZoG SUiHzSHw>F*hP̪U?}EM2Y"1ժ#eM9^m]mۀBْ6d߃Q Z;O6=r~zgp3i@.;iP(Xdp#OJܹ7::`/-NC xy{Uh52Jna%t `'ܘ{ {~2#7Ád6 a$ 3=\$nB!E#Yq O I=29ZV2\dn@d/qm0mYkX +h lo@ؘKi ^|6@#]p!nu7 '}KS-ځz%3{'آ|r]X,OBb|e.D!Vr^6Ziպ˨{MqjO0own@9&g;sX 7`U:8Fvhphၡ׏TJʶ!mgŝHt'c:P걙9yy"qzS.Zh0w׹yʿf'Wy5#T®WQ'W\`&( hcot ~6p <:C_Ю,*ڭؼ5M~3{Bb~x*Ar{-w=-, Q8Qn8 01F*BkPyqm[uHz~Aiǘ(O$R-kjPy<^;;7:Gg'8&v0}`pfxD'팬=gSIC8=F'џ,X:Jܙ DXmk?*gMd+R)>B,,3a4v,/J'9蚧2‡@Z1f66CXbcn!fc-݌\_cX>{௝OF?X·` -=qhĶM 0z{vw%yMS5n(x` Q((FˤI/$˒s \ܓ^` H[PC)e/XFF7 kT5FVYcѷ.<: )O>qe)'z%9 <=.!.>9\[p!΅C!JQBUkrY9_y^3^iΆ?p5P|mhI>Y .'q`觖(aCovmyv.0|Q Dߕ~\qW3?XJ f\">rr08k'R4쳒vf{|\t͵@;%_n`%ܰ`X ڪϽ`ɯZK3;Z(z{\M2Rω#1*&-`o&dp*u@su.!'ftܘھ\}e^ùdž nE0}$_e?lkcacN hهtړY;yАMX2 8p[7p$8bb2QPv*>釡XJYNOA@K홟r7 )ek"Tkɵ!{p+AONڰu|U8JUX/&>?dKҽ3+blg g %FMhlwf[jIfe]+orF3B:$ށ) ѧ Cp-՞]t>d&7dg)r0?t %W5x(Us=Lgۋg:ԏ;U JThw|A=5rO0 ąGtR#Aw x2-߇̌u$,>?0c-7/q*?wRp#Pڴ'E7;?4<-@>q{FW8[ UC8 cB; CDxzPJ p0\ 3y_ƛي e4wwf[aqCD CPFG]'Г@pcIJ#g ݰIayrkڽ6_ẏ)iwH7mGu!  ۔".8 `hNJ3׀~/GEދo7ޝ^G5hkaX+h=!Uxµyn'*(ɝ#誼 y6x/U> rt:G5s8%JVsTЖo yIU2b<(ɵ{"O6*?-Z_;ė-u3TBw/_Fv 8<@&/LEL"'(Mɬ~=3iкL2ś F 8GV-|~9L%Ի9#鎊A.$~pgxyF;y3n_R_.hJv_nܞ~RϷl&;9oZ_FŊW]z#ۿǦBq~OJ5j @TR H5j @TR H5j @TR H5j @TR H5j @TR H5j @TR H5j @TR H5j @TR H5j @Tk[3'IENDB`ic09$hPNG  IHDRxsRGB pHYs  @IDATx\'[ܡ"RJ$A;EC(-N 8)B`+nIA}ww7}+w_;3w̙3w7B!J@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ģℚF)1j j`RՀ6LN%wJχxTTML C-m?bu[ k&ۿ)_f!dD_IBD D D D D D Lfo>sKxPh75coK[Nx ר @=h LM;w,Oͷ1X&]dkD t1v Lͳ7u19yx&f50~Bᅯ /ݽ}gֆ4X I)1?dQU4PmVy,&E $f"(^͚tO(|\xJiH;BsZ%j5{U(PXeX 3`67yá__S1a .7:4U@ o+lXy~4)w6Vb3aL)$ǩlПA_S8@F$ۨ4p<%PjP,:KP\^o[:߄ kX*8q (jI%j Lv]at] tHR3&GwPLF C}<!s(4 dNᨁz4R_=)9yfnM5ܸ|?Ӈ?,W k*6wpᏅi?;mK6A@7ZElX lu)xיl\ԥ~Z)_&e‹ŷ!%Oգԣ18kcy=v"|~/΃?pU0eɲ-4+cJ?d嗥\f/?ES~Fs/RRtS M-^uHr;DtQ0U`>_¸Ի;!J7@t&^.iYnZuO _nX&Oqm>ۿhZ%:žZq?o 0gZ"O e,c_3l@%1p+'.3q:ZHPIKmR|QqbKKWG_ȱzm{܏qOBlmSXK㈛Y̜=zhe2zot\Ah7DB]ƿ Oa<›n gcx1>#Q&A D`4v_ -NfO7`SZeōo (SO:2Lo+HU <}P'O;=?#1.b< y*X,QƫvN\QI a0P?é.Nkw]%x @gz8ۑp4aې{-E.:(D7w}ɑ v֬X{BӶu7!?mJ= YiXOxfrۉ6r50 19p"x_N r \b[+Noհ.q[*L9r="y~f[t(mw je )Li~2g6?Dd7f>'Z? kzةp _s.aTɛ ۙރ_B on.뱏pÍx _pM(e4u䮸:p] &Ќ\Se{Xvzod _OMSw} Q&R tO:КGy&կUtJ^6W7&zō<`j7IrW~ox†l~er;l߲R'v`}ÏGޗ)wSb^ wJ^ k{ؘ'-4ީVK۟8ZJ⊲;:e֡c#z/Sݗ'1 r iN\ejwwL1&e|\&Up*w1?iQ* AB6X3o/&Db DMG K95CxמHp c V7`֢{2v.pw=GrQE ? ~/8q 1oKmC gIpL#5{ [*Q3:0XTTϯP|Ƹ<s\}8!ض`^ɲ#E(7FH48Gp4lA|o}.ҿB/C*p4 >!:˔ `5+zE_N]rkx4h AJb^Iؠ\i?;l '8&H:>WzSNJSWɧiw1'p|t4½I#]*Σ;30N/R}BL\{-ŗ@2xl.:@R$Lp53tW!D0'v&_}/Io[bZuOnpUW!p TH.+nÕPd&WCg%Kh_YClS_g`/pKCe;Vt[7]#x Sңh.88/Wg4#vHmMocqOnxp&|8PJ-fs8f:C('Ν=v%'X :S>e{-wuԵ EYS~HxIxV{yO ws! i^&K$չ{D fg$3DŽ,p4'NmM~$g5{4Սyh{Ԓu&OSF~öUKFׂkuwz7tH+s2fo(UgWz='Ͷ,շ(4*]k6jٛBZ3/ 49:} +Ű pn/1cSL5Vei'_W3&HWwӫ~ZiSG.8 -֑47W;kxdq:րt<FިhQ9&8jjI {=u6,A3z|o7w6-nc[m0.sIv9=.jNe0g$_1m9F%(~;P]1G ?'Z2ր%Aqx#P<*r%^S_3: ua}2s^ -u9:͈2h@85#,O`m$Y)_õ9x GV к4"?0czwhʥ]h@E<t?n7L[ue q h-G%\]t&jbow"-o{B~nqtܟC@wl|/+exl;jߪV {MPV KBgRw_uG`eXք$uw2+8h N`Ey@hcK֝TE>([tWa=AfSJFk/ /++9aW/eY6d Z 2nXKNkT`;?^*F!'͸zD]~G`۪# Mt״۷hv:ɠӲ m]/ԅ~nF@4 ݥ`%prH%FW}V+>,\CSw_p f3"ovMkBe,rn]%{~^ ߶nlj5mdKU؝a}jW9_-vw!6XUCd&: !=ˁ7`K/pou]I_2<̠JZ(~44x;7+t\({v:\bz-֩pUSe`jy%lC}D5,:xK k52/]ky:c˲jg;G6[<rj; M1T6R<5>O&.oJי:St43 j*Oe1%/(0WһPMtJ.Kls_eٽ: ~u2TT$$8͊5YW*{:W΋ypnB#$AKBqz5SܯxᾸTH-KAt:\K:p> {q; $]Vj: kdE q7%/ eQT~]7CNe W9Tp֏oZ zlGvč6$YX0 JyuN % 8؎E@kg_ە7S`K=2{1x mnDӣݙ4,B^bg#Oi~tqhrkG+-?QSC@XqLΦA_q\ ܙeS4vMSJ+mHH^WMX^t[J.@椋9QVpMr?3E<.qAps+6-ըhelC|WkyKW>nC(W+Wwt]I'ͱ6Zu7cLa oWMLV _&lw.l6h?KdUO} ÿU:ܟ$} 64ۜ#JzEp3Qƃ1)㡹Ul+?>' ḶI>aw鞢\ `֍h<{ ۷#\ ˉ|yT5up ۧePEg8!?e g<y"mӱ 6J(c; r\C\s\p+ھG@n>qJ WP9L$ܿO!LM L ًwa۲2u(lŜWnJ, 3A/v`w Cf- T+ vmWrC`L;͌Cb(˶oSI? M2/٘s*~8wjup:n@k]j}|.O|a_܀ۧ}#~y(oE:}Xğ@ ؇U(]F=b?{24'BGYoO[E؍9f7V%|&J͂}W'@Kâ0'B;0s8CXʴ-;î/wvZY:1X_xaxj@l|oL땙B!Fc+hqhhK{h=ǯ L Z!3Ruh|Z1@{mhaeXLXXZX40 t@6uxz6&SPLIs#LMAN~pz-6EEGP,jN7#!Ož7}!G*1ϔT +e){ _es}g1<0 WKT2 -WL ev"ݍVh0htFƪT\ׁa*v){"hͦM̼73r7(+M㠮[Bcq+)ZnO:͟,!ʦ¼y8b F8;\C}.`0+ݸ]qw!#G@{V<+Jx'xbB:6 53qy9hcFS,<ʚ|%04RLٗ.{nfFgPhI\j p!pJ6{N 䔲?C>#(ir?CK BZbnEÄiMSh6} !X5y-:Zbb;N_nXYbh8+qQjz}ܵ Z=`g:gݨypt61cmSTUq8LJÛ`U C[߃˷{uo>&YhB`oxaFpʧv 1 J4Ҹ^=r_088ΓSqw):{ SƋO3 t b(p-k-ӂbki3LU.7VBEKlߎa#*> ,fO7Zp+خЖ{Sjq1wOAtˉUbu3sP]K#XVBl3[^|Aיͷj3d2`u$,m7nKxRic*PֆJIIlI/޿:`wPNq3q >ch!EgRǴ%tgu8z }MpήO#gVx $V:ES5Ty"yjW {xnOs;%/%~0Yj-JxΆP>D^"Dۧ^jBwK9 2_)R|6 D=kkۚ /.5bn&󠃡1U!**B| 4P Yln.:ެHu<-Í1*ꪜ[^/Z1ȶ?aAٿJ3DAB ULë\ ǂzUB]/tlCZa;3u*q8OGo!߱m UDuPNF Qϖ_OCd>R^fe_:}Qx̙g&ggPy! }ytE-~>,eޛ 4!O}8X[0XnWm Sۛl%=om}4,t<*E$4U2 puU\.=7`4 Nv?m`8AjoN pOiClL!1 n\c5tQSBO*>¦E0WFOaAX9V`9aS֠Nu97FhVo+DT8xgw!fpg¸ Z_IxΫ4RC!/r{lNlp(zWVEP_ARF Żq?0ZZ 2a|K?l fCϴH61XTSaQm+%~y]Jnd%zqu}d{3C28n)pڗW`ĸ4ޣԮՕ{ImᛧѪ͟p 1dZp!h?x; ~'Bܛu&akE5:ʖMwS yS>KalF&nr鍮ԥ):An{BНc h8.e acpqδJ= e;kkҜy&)?N!-D:*乐A?kXeD&NNK[|}EM/LӦQNu2,~sN+5@&5qMҏϸ"?Q{63rAl}*ИkUN GPi}6d-^0ɿ p6Xpôw/0٘^Xe\p-ZY; ~*^ޛ#| ]!r.w)@ۜOfrJ]_=n;XX ]&.U9~_B)0B{`C+\K`dS0mK9 7`xO>cހ{!M6n90-mY\':]Mtntt~mK3J 5hՒu V+W;+xzo6;&'κY2wV;c:v>kb{qݭC|HZCҏL89XU6:g&/:=pgDG?aUf\:// JZu:5RYĚ{3dȿ ~ﻫS35oh1 <n|8-+ΌAOǾryY6F=Q\^ƹ}2,]P]Yq^v2xZe}XL֝ޯ2yn*1p*~g;(zȠ׌ŗ[(>殪/g\:-J:O1i5@^KX\BoA<a.[amGUQЀ Je 87G~=㵨. 9ކV'7kDt;V[ghbLO=[©`?W;G@'%mBݞL¾Z% PVU)M5;"˹۟x;^̏+ۘNr0QyI ׏jAÔ؈i h;lf5W::f=nW:D `:'rqc_nr+ţs-Eu8.Z]AsNpo #7,c,ŗGL@ܢiAgݼ^%8^%f{!6%izhH߆VIO FmjsNa48nҧ!PX{\˰?ްaWKq5@_t6xO`pr~ C84=-jW;1T`, nzpY3/KPY1CX^_@W:,'΁6<:z`բǫY#IcNSL5뜽sv8E8109*5!HCluX'qU Q-A Q^&M^%y}ʁ%, 0ia;Y!l)-lxр=ʸH&P~vu'v o` p(>ɫ8r}\,04#n=-TZ5ͣ%5? >z>n CMB^e.5_x$U3ԢT@> nu[uRԧt6UGL'%oV u?P1ԃ]녴mw-UKߧӍOcblß"x~ @H'ؔrZ% S3zw5|$]VDj 42Nbox 7CZ,?wf1Ҫ /ϊpG^N'Lu"3 ,Í+'X7e7&R,*` 8gFS壡B}:<`bɯ`Q$1h9-'6QLSi\Qç!1(.*yl i[@"iCtBlG6\ z2yutn;mvL {Mq!lZH'X2i(h0*7[C7a QA[5I=d^Ά!o=ˮ(.Q:Ӏ=p.=;7SQKÂKbw$6za{bIn l[Im᳼/cB!+`g| }܁}l<Pt֔?@K:ȷ4dMp 8idTt(-SO4v`lyk8 7r) oːCsz4u8oVcXV}8ӼϦuq!>*!><ҋ?mŻ+6BZez τr7-KíLfk\MwVPh\ІU1\?/ggpjG^7.= ր' hA$hq m#WwdONWsj? AX)GJ}Pgۙ;J`;Y9(OC͊.(7l4X^ 0pWqSdcH |X?kjf7x{>\C{vb6z{ ꍱk;:+̶(i!r=^wSkk2O`kG@Of>ZY+r7L㔠$sx/B4D'8Ar8.BcD}Fú,,[u< nyๅu=dE=s2 qNl8FI Ϩ71O!\N6"6K fKa84"stV}d/aWR֦sNZf0#2t@wddn-&<:.V+$(gtUSp N$'ba-A5M+%$]rЍ#k=^nV\m PD^|1=jCȣMu<Zz#-urU[ 'mǑ\-Yq= lk?hx|?X,46ax?ķI%i7p_dOHd])kA=m${cJ^|^&U'сpgp ^N aJhVkz4)mI{%V{Xz^ɎY|4VJ GOL|np{Uԇއp%*XE]{S'nUVITGnw!`ۂYHͅyA?0}$4*y\w˾|`Aw%Qh]Źr JNssЮȇs-bifٚ9zWVqLFK4j#iW^V\VK|On :t&qRЈ@ѹ@')9#%8W͈}zo:+vW"osp*Nd84V\?b$אq{-U}7o#&lSK`T uy>כt:A ׀fd[v軦}%G.\afрS 6az'ϣ0<\9A-g'A=/ѕ3\ql8rw4 nvUlhtAۈRWr?%RЈ~D܏mgŇՖ-r\5 8;`1xw hdEXMag̙4ۣ8<6"}x *U\f'fD$n֟טZce΀[fg2<jiyt#+  X|ug8}-?0_|#8֏9 D0^m[6{%+qrY.m. WcZqB:ۚdGr9cص;ֲCl(BS3V))^JV ;szp5 _%TPpc> m=\$j4 2{UW6%E0i? QlH[aOmr?< ֦c'gkޅ߃k('u@g]+|:U蘼?S;Io^[>⽆pxMvAl%8 ^C8+IYs 5fmBfX_|^ OX [Ш2J}(M'$eo-_ W#Zgn$* pN7+0!(['I"5WA=&妫1-omd?:ngJZ%FE P,5x7fo݀u~VaU#8E'iAX tcn }"_:=`ZStmu3*W7-878S;Ƨ%;\>LÐd2EY/@t5hۂ|8ĩRIҧ>Qqk%u$HXf{!4ũC .eŲa|4+}S6pUw0 ox̤WAX-qc&_^n,EwKEoql .'2^h}v{Ɩ>.O:&u\u5SV./T0ªO%}n;UԩǷE1ԙps/碛_J23 [} Vk {ՄM7+eptNBfU %}Vya򩞟2O ۜ4jWn`=pg.٩opu~vStW tS܌Se_ *)̘.+"+K]I(9mP 0m&譞I XT9ad3>k_@X}["%Xp xҘڎa\QSV e夯#^GGCp&X΄(al<]7 iF&p3Ĺu6?+Z߂y,SJtˠ܎Ctx9Qƥ\ZGZi!ҹd{v`835N>XM} z6Nݛ.r)7Uu $xLu.?ؼd~^ʝ/&U b ; =ǰ3ˇ+Q/ \U2 ?aEp}[K"n{Cvuv)!-r&Ir"kC]y}P, 㸚ӷu~|Wi lwmn1*ߐWW)kܱ yaqIC^1 aۮXoیM WI+V]:(=Ż.t `,L_)8ޅt]z?9J&K&~PՆ%`#F vY Q㺝'uI/UW #& b|hH*!XXSx-ػNqaؖxƑ N[! {$?l}D5%3ΉjJp jl?臺CJ:+@?xg[|_A_p.e3DpuN t9{JJӹ 6N]dA5-h`܄c J$Ͽ}1lQag۪`b,<ۀH299+ #nAl3ɊqL1\JtCb=ÂTC%T\w,&PB+ v8Qm}9a7 zJP#DK$V7W~w[[CF{hӒ}&܇k6o whNi`(||1t#k|*#LtjCB]$`35 #J;p*s:Բ]j4FtG6O6_?4:~[%ؽ$;W&'G^=a#z =q uV%κ+`m'BSFQf mnѰK!*C7%(B3\O@LÅ搻8Wi51]ؖ!Lg\&8^Emxq=诿oԽ*}Jt>S/>pq)ݏa&өVlgϼcs$8iDŽ͂d- P}rn`CL5`?\r}A;]~W?yb5X)3x晔?8u&6[ 3!kdqUhPpO RD . "aZg>l. ڤV?-#j+v.ޙ¢g/*z)0pv|δ|W.lބ|Ї:vk}m HӌSB=^slӡGH\u)/!fQRuW2N>?M1]?}.Pە#ԍwf;8%܉:ozZ#s7aKқ4M8gsVtbtu=UjF.0z'fφ"rQ/$g`F@t"y$$=Yue!+:soNMtٺN7V+ukŝ#$SKS`0>&z6{_IBSJ9PƧKa1[6t@{˷L6XJi!o]dG\FπAZ73)kJh8} h+gV",Rg%Oe]jSNv%r mߊ=siR .֩כ_X6-SZ\͊E#U *P {M6|m/WRb/+Dp| C`p|>pOCOoB87-{K\nƟ#`y`^qײ+>c@gph[hѧ!}wَKaCضzˑXm{Wp:.B|ҍ3,!=ұ>JDR<.E`@|`Wheqv/#x>a pOKtZMS|:V`F->Y6\Owa3"ΥUV?~z#@0&Nόgw=m0\EуM̂J| m65߅f5ѿ7JNfM:~3R#@Uo,w8VuMC$Ё B'$=״scYA3ާCz:L`:l:O}yn? :6c>> :ud{mcUQe3Zk1:Ow6Bg`vwJi0"c|CXI Wm108U7$NMr7Oãs)C8O]T9Ɨć,AwGfUAE*C$$Ρ Yi *t2ـP8@ڒZ5V*/Qs†p|N.Oyș`{恬LA{eKAAgVZ2߼D]N^ CЧ{"}Ppto|Z|>i)3:z A|ֹ`?$;q.>>sf'n 8rt(X֤NӱQsz%~.]N64B|psi*kSDVDOHzp{dTgv&_lCp )6۪%tqpiBv$-N=]r-gݺ \%]Mp]*"8iK&uBT2pűlM"F1mO>V 7f*΂Y(nZa{ %MQ E6 W 4x6\ 날X? {; ak6>{MDn0y۩T/U 1qM勗eqcB0q2B5–;=CmR~H sN=P4BYcءxOQ7OFʝ̫?7{<ݥeJNT i+^0?| .{S.#6xlQG7gɖʳ_ҳυEK

>*'Ex;!Ih*?KЌ0%Mq龞 *M6p©26CxJYIsxn_nu'iqyOJrᢌ'= QnJW! PMg}~-pCq#>; ~!nXD8 \uId<8`A$p E%ga8% 8Xg4(֥8\.1 p1 4ؑ`"!W-L6oB~U%ȹ dӹg-Ǿ~.{@=z %QB}k:<yRNClSUq1oB 儫CN_ͣ2 n.g<sMo-3@ 'q G~ hTAFŽ>h*aM _I5EЈdK['I|8G\pwÇ5R]!n|U8kYo}z42`y1?7}>fYj"!Ie1SJC(~*Ds$+Ȱ=s׿rz+=6Ik6' a:I毄^+=f`ps*qA 3`:9<1jyO8v3v/^ƨ~4,a'XVRGpe$'{zw=<^J} yJW,΁8;X3H(?Wf牫ֹ˦3kPF6a{JupC_poO@?2nc@9|r(.P-!O vh'"aهyj8`ex@]3c.ۆd0O?1џE#[030W*=#S.IAe]29bO0vRp& [ 46ZEo4n䍊FFjmVԝQb|6y1 /ÕF[##Ejyj8alF Vz2OQ+^U1Mб L~ 8^v.+l|VyN'% eeC|CQ*Ao.C չa05FbV$Vw'够7g]p n8 kK<\ BFuNEթ7b/d(cAg涰:`$8Nw(0N ;^a-{6`ǂb^%<Id*r,_c `s2㐦3+&8+ntC!φ ^CY:7»ػ\? s݁kn [}VH d2}BݒO9 gBpU7CZ)jJ&8T|7yB|6ofŴtyq{^p7A/X:̻6 QDl][@29$%90^fpfzh{_ G/|* p8yn߂k? |`*i~e qKݸP $W7ۗprmoKւï-6y3.9ۦV:m3>-9E}R:HwN6"~v4 qާlt|O\2K{\7Hp PNŋ-ZŊ;EK)({Nnffgfgv7|y{{{gwSLt7apVd(3tH,r51X,;-DnmyP=ݧeWG'c9|.3.*D 濁 O<O#YœFdp(6 aQ%:pv-̙s'z$% ؾ"N2.Fy-)`8 g۠/Jﮇ hIB>JĠ{{ אc_ZVS~ݴ~1>D|%AKu^:6ba {WNriE1b8+oZeZQ7 _96Oϛ[;׿f=^1p}!I/cPWnXM'q(]M4wZAɧ2kM 6N3y'3h\}wJx\@?6R _&uPA ,sO#Ipٳڼ͐8B%^̋} fO 1W4Z/d pW)cw!L =n=aE#S e_ etGC_x /{hD\!౼ṳW-?\ 8W\`Mw H;:D; g)((Rs1¦EqCBp:Kڭ؂:ꉒߏ~7qyyicu*Q_;F}Cz8- Jt#3۽b}+fmnЌGPh$<¹ŠqyXVCNS-t/^r_)S|aW:p9X+DGmXفp( V|;󤒆EZćEx=`".ʶg5dZ?Grfo2Sy1+tErB_WZھge;~.1E_2 ñ<<$Rz#\gwߙ0 7N\b]r9.1NkS{ ^숓."\V |xB%TWAp. WWC D=\)j>`9RlLMiuBTEQm8w4p M^0Vv ʽy ե_!o X0R1o*t" s|!1O0}21.-6EX㢎Lkc@x#ˉ0TVQd\PUz% 'iRG\d{-׃|heZ Ϛw؛gwk]Yk6(Nf;Į[a/9XE!pA1KTR6w'f-L*wjeEr /VIse<o7(ĺAffFl,o !V޲Sl;OՀ]"`:VOI=փAb'ކ9V+Grq"LWa87-p,-SٓC(]81h=Nsh<.fx-:k˒ZqZ"-0 0'jz/bqq[_RaUM;֗%Yo|N]+3?K|$G#h#O˱[Qzk5<'"mY.,>0/uCL:6cpL^ u#Vt)lU%y1t^V;q*>OuRr5[ Lޒ߁`} L4MFXhLJtcDzl142KǨ ϝ>tF). 7ڻwҙT0oz{5qgF},'6x[xxa2( ր0PYB ?Un>Mhu0l@oMA` A8 mj;a_mws|)CpMZ'Rp1ŘzDgR./tp=XH| GerkvzKxu ]q\B\z3NzGV?QHqyBۏxB?f13Q7n2""ݱ>:R]an)/K/|2yϰ,NĶDGWFpn2;-ބ٠y%ZQCiXS< ,MQQdBaLK! pou36t]nrӿ{6{'+̉UMӹ)lCBV*Ϟ2}` pF[ʪʩ zn@}cv/nw'T6lGVlc5ˊ%/ p,1T093Z惥a 8k({\°_ix/DE_#I$G8uSPg/0 ^v\(,Bfqx0~{Ym8JC.u:SSFi6}O Q"ӱ/UQ,4-CEåʌ@".H!K>eGy?5z+a}OЛB[KM욶ٻ0'ӃKV3j3f!Si/+`{[IsuG{F{?#j =>!ƥ8t9=d>! 8$$qL0;Zb; G@~ lejX;e>~ b/:8 .'CR`6^KJaO3!ځ_)g\FF ӿ-v:hv>ۈy_>c0.{jf 5\Xg{ ~ Px| 2?xL a0vX p<ˀ}dh/!˲y\p&]1^L: \PmHF,pz!?⊮y8 ZU cUW6v\uCŸ/N\|`)KsiRuќk2x3),סç:ѧb;n7b\ׂ`zvh=_eU>Jnq\/?+ʼOBCv#_Djb^+J"X^zWƿi7$ʉ1.\mk\}Klɓ*꒜ީK47o4!`3PfrΦg?b=Q_@5i L( '~fd/ܳ״0=8==}$jUCnVF 0fśOh8hv8ZWn:pqy~J<)i1^+19+Y?1qöpL z`?>-c[uBup)TǴBWuk(8;[kP ] gwFACW ~gUb5wi4hÎp6`(N0<FN`TԁXxXgF:7(̯tzZ 'xKy+Q~Cv,}jb^ B)^W$pM!gm5^nq3=PTJ7MQ7E%lna,{e D=DFmEcRi^ߒ~5X4^b}Q:iƇDl@`3*{Pڰ4yGa)1uN9H`J'%qg& g X;[)Mخ-Lé}%| . ´m H7K$O#'0Wbwu¹`z\lǺMHw v6L߾}П %_}8Fr:X }om ><V>4Jzg-5>Rt#n/<LOۅhرb}.R8VDӸd"wKhԏ7kPig[q9do|5f|[*Z\ E wQc,VT+3_M3w؝bDB_K:n!"|a=⮈eFӺRN-y5Ko$T0 %Nsâ<e3"6`VMS[CބIHŅ3#̔?͠kq0-a0,"Yt> CeZg>6x9p,Nwv G0 lOׂ3av:(x"f(ֵé7Z (GհL Os`y*0 ly˞v/v;Na0i)+ lÚjZob}>N}M_Tl}[Tl"q:ŰKp'X֧o B(=|w:]=Xk ڐ߾"iЏaөrHA-D\ZNħyֻ~}xS' OP5ϣ:kzXU[z}^nZez$\gp.+޾e4͋w("Ai7`g]w-%M޲MNHN.6bn9I›cB#bf:ɡ;d*IlWQ[IԗYl\ka_/x!8ĸrn?"p̕)ʲǛisSԍ|\of\-s# 7ze%lv_˨Q3hm.-ʰj x=_էN)u?tGX(2(qÁГ] 3 K3ĭx!`K6k*1G J#jp7WdcDzc0o|)0h #-v݃%URڎ b9`BevEp vF8=cӳx /<4o>X ( ?B:=DuO!M f)iZ7q=˟8<'rxYFj R i;K}f>l WiGB<9͓M6>p/:[Esx[%p {Iұ6I+|j<0QN^'-X_Sˉ\c='/ֹnG0[nxO>4wZmzp5M{f!= % ,diN,7܀LOÿs1Se.:}Q.*<1Pn5"vAoD4zG"p%ZC(2W 8xoTbF~C2(z7Rqbl6^k Dlp;fP'4zX.o+reڮ#Vry[KB)WyBu7y i8ʈ6q ~> Nrpli^l2绛7Q_}*#Op\0ܙtEPm[;Dvyօ`v]9ɞ-_FQ)&viWIE D}gAx H̘!5B+ӟhhCplh9WdjGӪ!•ka^0*MV}5pөq )ߏ4FŶp|[>ؿv`/8%6i~-S xN'%ʲo7 E4N,Chq4-{k_[Fi?Ed!/C{ {+ mŇ\@r,bAwަ+VB 23k?o\lZ6filg:'!گnb` `ZߡU;>!mvte9߀tfҟMdpYFd!2=Xe7Lһ0F v'mlp9~'a?J~q&Q9|lx(xMSpa;ppA r>%W p 0qُdkdaz>VR\%my!9O,k@IDATI]=]x3T gYT7 B8Yn*47:p3 /2ihsąZIϸM8~UCǙ;m*OV dQQiSY"o'++y"pU48['Y"e/]),JӵO0' rQ"i'AQ$%6Qf,,Bt)K!.$}/ݛm7pm;HiwAW֌*(HJ% p2L =-~p-,σw;ΈKq1`_vz-G 伻 WF?u]a.8no?'ܨz\붎6yQu./-Q[[.\N7@ 7"$/2= NqWfBvor|[)VtQG*q`EV#  Ѯkq9[йo@JAq!h .bRfaB1h!:[! >Uxy0h$w'a+| GC-c>'zM@ Jyt3aln0VK՝x9*6lz XvQ+$W/7v`zIl^,?:s-8?kPT4tU{j:Pe6BWP7QA= ` 6R\\$v@%ڟ{gý 4}h$a]o+siǰwf.fuxYP ʝ(QkXWgfڅr0J]5)](Y3_Sp0|mgL1DS !0 - q ǭ`'g_ y;y~ aG=| K-رc[h=\c'V[j{&oؙaFYIס%Yr< j vzBlsg⠏Qayw*3f~7W[qȣz-ӥ_N_ơ|\b\,tx>;}NKh )h.a]Wxjo1\{a0?a8꥘I`W>΁72QoZ_c$0\I\D~5p%NZL%ZuIE p;s/ esx؝fC1rRٷu.! vy|Wzr{VT {i$2oԥ_u/a~L\/7,^Ά^_~s \N%Wñ2^9 wni^<+o}` EAoRIL-SG\dq8v}LA\ 0'I ]>R<ݱzm0=70'HqTkX(@Bii:#Ƈ? Uƻr.Qhk-|5uuW(TjmD껠|V2Ogr/ eSS2~%Y)ON,nŜr2ZDhRp%!xZu['J$__//Ǡ@e\[0 4ꏰqO+M/bZ_þ0O oYBFHsO{crRMazfp3|Mv})p OM| '1 6B3HczQ[6X\c4-ۆ,RA<<=K7*(m'c8r_Mܑ̍5Nv  S1}hGa; n/^`>q%{x۷z~5Φ1LNuLDCSEѓX Y}\0onЎLs<(pp{ mYGg-XK<ZwhNp']2 V)d+^yX7CliX |`©p%hi☟*p\9qܞëս XW#ɻsJ9kߺR)3λ0*S΍Wm^!Q^MrfF~֎0a&T,m6-ho ͎@OK.WO[J}աlIڠL} .AsXGĻqQy4?@`(gN]2MQ9YDwkge[p <nWQyx>ͺxC;`(|Ed::!l :ەNCy}4XW#em4q\=TmVx ׀iǀxڇT\x蚷Q~ "s?mGTlO_hV&6Ԩ<nz؇5}?.D!Ϙ :(%Cu>u )&Th<on9.W!b9pxZux"պp=%3POolu6¾kn £0ʉzZı: ,X,yۚ/Ϯ8Nk;hݎ_+ 2/8$I"Nu?O)8"ec)A( g·fCA\#Uy8lw1NYNE0;,Z%&?w(q0 LX3-C2qV3uVŧIl{%q-heA Lƭ ^^l7YH(p:\0ıN=%cy \ \.&FǸ`%$g 81ڨgj9(ԭW<C zQuP͎sn2 )} Zf+ك(oٍ >"ƹʢH26!%3Gxs~23NWI#C,pT`_5O} x)"scZNl_Î}W[rIm<6FdkI[ D}S,FNueO>{&B\8Z?DD?TY!W˞P<0#=a'pׂ;ŶW[޵e[`Exap|jgmA0|oYzTڙgJjrk;?Qu}LJw &)2թp1x5*Om_PnpRNc`# O,krbx0M> Oʔ[\Z,{&1ZI;_[d >s׶arbHԤk\ 4)>2B'¦uEb[GCURtŲ"L]`ؖruG\Q. bqy)H~ԨXn1{oʉCy.O4P6.O|YhKB\-Qr{̲q46wz* ꋭ u}x=dapY> o,5ڑ0ݽݮx ~ +,sb8W;J!ip-hYjV?}Ƌ8\7s n=bN Fp _H h΍c6L'% #j(;ƪS]n".t՗E4. 4ws>}w(+q^o;׻q{\Ky:>48?f)WcWC{VG<+0xVP z5ДuEG+nayX/e;4Mq:oK\l̆y{nJbý_V1In ^۸jJ Ᏸ#'1XlÝ 7kISf1Qm~m>j>3qwrvkD9-:"F\ж?ږ\QRgp&Ms >jDrxw)ײbX`1#ר)Ub[krXpX0DR5;- 5}L)oq{ Ox iyz;iiq)[ $r)+oZۮ7Ibz(\w%Lr.;]=xPBw0롒A x&X ^ە:$&{sSkfevoGī l~mpn~SKv n/YJ~k/vZ@=>J#)n:XxXigYS^ t(|q"SPʮ஫$.(O%in;ֽyV{`zgsMD3K\} 54nOezjl4JCKpm}˓79dt Kȕq#xyw(oiB6*F_,[p+M]SIņD\t;‘ޙe@34, Aev |m[vD")Φi1[@K{{sᏴu=K{Bff@\q<<2MdxW}sEd>' GpG;*j[%_Q*+yTZN^#mowfzXdσc&݁p:|dp\ 0 8NV[+UqampS1ponmߵ?6f3X1&H&g75Ӷڮ1.d3:_6:z +2vkqX)F)2bik+k~ڹukgaKe.]~*\&9??$m8͛ $.g㢫jmK.צϔ59+%^^_̀b,ȳ$<@bh/HД J!tm??]]zYݭQ {P}@ +goeo.{ [}kX|(0A# i'8:ձ!6\D5,ːUQӿRZ9Fˁ(Z?4P_L?|<'<8[ UjIemb&E.qSm#;=w>|͒?`jLs;~0si^m8.A__yQͩ?F 'Y/mPeZ JnzWgr'M n=ŝJ?4~ Lw#0g̺v.X-k BvЭPM8DzuQIsOM(AY9[nY݇Eu6 >0n n]`p#zsy>|G\~ffqcͳF:,ZQwzvYViR^vIq++G54|e'1?xMJcN~HmT頫O,Byv˧b-ShD$t3]Gm,'%n5xr4WH:? *lsq5ݞ wa8<O6|!,J_qzF@%p;cs0N(]W`!JYr3;§#~-`Ah&ħ <> fs ab2 <%w'O}t&n)jpggPmLx|w +5BvwV] #l ՟6 h"WtO6Au;=ڐ#|*mv1{(|JˎL8۔-FM+ G:%=Aq[;fV|y 8 `ЦDުz,lM({JnNjf=oKyÝ8/^Tۑ?1pa#ϓ{\XS ^`6,va{nj{w!!x!]0[U(Vt?X+.Qp*^:[{7W\vy9 slc7'p}`?;82(X^m#`C`jZZnڣb\ﯬk.?}7`hR8AZq^*'m+h./7X4Cl9VnC*qӡ 43C=2;ʚga8@g-OI- 0[U.M_J"+79ST9B}r ހ-a'g8` /i]Qvo@wF; c7{S= F: Æ8ۖ/&CK[{3]W}܊E$~ӝړZ\ڞI_ON)[a3[`um{(yJbNn: 5d)xjg:`1T0x3j~!α]f 47:/Դ1s2 <Wkȣ:~]F?xnĦs^#[_B>YS[[]x{D7(8+N Cf네5*\7=/$sc+]> ho3#kù(')6T?5@KV//Ҳ{BkaM_ϧm7s/RN4Y),W- '1Cn\x5v&#69y:7 \cǤLP~²Kx ׃O-)JJh֡IQ +]v.¿18 >NA`FB13rnmtmk"~44Kl>m9``ƿ2>(G|3羳.DlKҞ>pO}oQ/iO@"9c,Kƥ?G:D4.q:\H(&+k2\dn@vdA)#4ߝ9Iu&җ9 \a͟oH3RZnRӆ y$xf2ٯ㔤: ym |0n1/_ ^OV'{0;DCSxHxuYO3WN]&xopϾ%n^Zz"0I>p'=JZx t*b!ژusa+t,jO+'Ce@ Z @/QlVLvرbH,AO+~*g}~8EK3.^ԯ7;SY| ,qG#ƱmV{18|O`y Kkz(VDEj45Hb=y7a!|LH<]>e?+iQ Q*,XK4i\LY5)g7x fmR XX>!iL>?\'sZ :uoRqL2R˒laDn+ U]z4C*6;~q {2`|*H!t,KC#aYL{$2n=b^wx6Z- uw]G/b а|ЙD2~'|Xh%%=I|r.xp0Z>Lf,~s;=o/'cY#0]ӸCHqܻtR1=Io+#7Knp4dimkRɸrWp)1S;Lkfu yfTw 8ML&<a<,$~5 /1xU|r2Êsڐ +0-;%긗OmXi8 WY^UЗp**T"+O/Q G[7$#)*riT'Q?k6B,xӴRHHCϴ%d~yQa+SFWtuzoہv͑K%oź-ߗCk ee$hrہǫ>q5ꃇ![; { ɟ-p;0D.7yx&S!08.WqB\^F4 ^V_iMMOJG j˅ԚÑ.wL%tsRXg5̜1JԕƩo~'vh+i"K3$>*uZ4 .K@&! }Jv:YfJ/ W% n<[U;BFCtEoV qwẽ|[-S&=;D'͇ą͞jX یRbuKa;)FSʼn EJarlpZlp ={JkFѾ ;~8TEX6#bcnr%v/ 6M*ii^gbEߨB&eGop ƭmmOҖo8YOC;z tP2=C6g‹^֍38E>i\L[96s,iPV'%;sUr2Mgc)y//pFeb)3:sC_7-'-?ydMf"LQQ?TB\Zr܏?x<[31p.V(D(w%}2k}k.Mñ0%G_Uj2YGENM8\l, ..VHm9'D~p0]2F <|*auIwJPG5G15/~N C%S*{JcM)Vb: TYs^mEHߘjy*X|e\[( 6)(NHKr<#^v@;̟xd^L@&D.%m?%݈E 8σeso_(6(oA? TyJ툺ҼirnE\2%1v|'5FbF骯ݎؚ?ES(5늢OٛtB^!4_](%o#:X5!d{<=:LnSkfx*~GJ(%)ֻqs$t6_H+9ΞlQؙa& DM+$;T%ǖvZ҉*WՕ~:Z#ǹX̰l6͘ƱhOW{L7[Fu_9|yׇ:[%QxU֘Qv%K^?#qq~Oit_tq^a+Nq_kb`j0j/)͐ruD#Pu96<B/2eqZgoewڙ8~B/=|Pt)KYl3#H<>E/_M%;Xۂ|JkGM|sVNע^>~01{k#t.Qk8o0qm,فS(i\4.GA61Fuzn#aFshk5m1lqސ$)4JCUN %V~:3U^99Pk|[QEqQ1xK4.z  ш.ڢN <΃o8aςpkKcٙ8^b^̷1}dOӊ;ƾD2=ԉM\MuB9sL34i?Mupێ4SppoXp܌{qwF:uHd[<QDT><,W @=m Ҽw# uC;Y|UAhnS<IZ r$]>8jˉV)҅mp.ZZ!wU&ufVY +:}O8Մ)//]Ǧ5eNyI%&KT|Dz1sI<67_:tZHq-MT'I?}m.>_ *KL UVrovJ-?/& <Ӎ+-56ХQjt#(RLp eMw,?Ji>[:YVG ;zH*:ǐkyʗԵXa4Aw,oYJ6BDgHh)~)vl9d[V:K/H287AF&y\2蒲<*/$*>orǦ*ۋOJ׉c<l=~N@9rk"˥U15k+OfMe?@Y..UH+i\,ŹS4lHa*dP ߳U'ɄFTGHpľا>׉Yyә܇,34=.+W>"nq-,C={.|3817ShW9wWg;mlӉp*x ؍̒e{mwl'v}X4~mdf~6s"i1EOu_%v{ҷiziw/cDNH-߽_)ˊ7hp>Es[Ah\< W4%x%s>iy<ح@j{F3VMNMe=痗7vׂ? 7_qt&PX8in],Vnm+o8x >|?N 9$9 (YD * HF,I2(H (A$% A$9ګ}fvvwvЫ7]]]];IX \/rT+yRamGDpQn~cj'.= VtUp  ;VsT=Xr׆`\|T<6?vOw?ug^✏A#FAf,LrDF7LVV45#f\VCf!oˇlAŁ x偐,\&߀T [M6xoNT]wׯ3d4> 嫀s:Sݟx7qOx @mLۏKNe@+dE{>`qW'\@RwPX*Fvñ$}z̎E ^? >ǁ]wX ؆WJ݀Ad c6PG9{ul~%)|J?|Sa?eU+9 'bc!Do |*[fey>lD?|WJaDqNǃij`?}C&ԭ6 >+5> fDߜ)rܚ z, .bAر090 Fr2Ќ,xn; Նt7%GƱq4x3_ti#Ԩ<֏|7= @?~f> FṞc">2)NO`b~p(Q7ڌ>gLIqW:y,Й%(-bx5TWo=[!wpBMǥpX\"KV WokcuW63*+f9!hhY;<(LܔWހ[{ӱ(ہc}oJ|('h x'?6OD@^ǐӪ^ur^/se2ejlwtjqAV._U_f[So|"E_O2o>(3!42^4wq5!oc#A5[`&sp;_L^aQ_y,b< 0Q_(/u5w?##N7x_v",7o>;x3EJA]YxUd+)t0P=8 f/m𕯄lxUL6Joa+ROߍyou˲(/n8!ow]!3 YN3zG=s[Mz[|@؋4ee i#ˢ.{׎S\Fb"LDTHQVNʊ =?̆ ]T;#bb+5Qk֕_U>Yg=ˀ{FndO=e &! l]@wȔkyT4(YCۈXs͝'{"4<Amu,#dT8.X,X W7oyOm1|:ZLkQtvuOcpMft-"(q8FYsuB/TH#ϯ?NQ1=]nvz`jM9WĂ|VseQ/˔W}b<~T{kC|t 00X㢤+#mTt[5j$,(< vq_fը>Ti4uSߟw깮Q`H;cɌf=L:Cv̫  7?`->#&qv^iw磜l@yw('h z^܂bc3*v[7lcFHm@ӣs$It|+Umr"ou^V,Lt}Q]՗b>]Ӑeݺ8'N2kߓxXniJsm(ԺdOJEa}ҧAނG7'L?wcDklZF^; 7iL޲e^YKFZ?*嶋 X|*o*B/F>xqMK#4 ډC_k͠aׇ"GZVgڿpe=(o 3yZvGhok냬>YE.rb^*-N5ݘ^j mN*:/6Rĥ<1M4+Kz9 ba̓SZÝ&\5WQ(j^?-\Ւ"GmMiV Չ|nXEo=yąr$I<RNݬ_T}ub.b~,! )뙏H#x wG5&j˽%|:*%#[Wo1\ވnP֩]O>Rd> a}u8y6n#_SvU\ Tq.m993~-]nYg(NɎXz=' j01G؂A0p,𐐼>jF񶠳oκ5Q{f`u ;&Ŝwb aļ-A19 U޴Bt2t,{uں'Ou: |cYOU9G1ts(:e$ڽa،e u}v4ˤ(޼w@=ʤtr/&w}Uu J,gKI_˶d&6 yʶ6g4׫Z[Ͷ{`pQaCa6ȼuv#)2eS1%Aǧ%%teMv܃q3[.48gӀ~Xl I; lnڸYb23:m3<èӿ zHAeFRs긾"QCiF֣JD 왏I vˈ~؆eQ:e];d( iC'R9_)rG^, <좮po03X&Eyr'J7kV9|{׀Fu)*F:YOkFttC dS7oSޅMl~YIy;uz9b9]G@r'(rϧY@rϞۤV-@'YDJ[7@G.#bc!y9g>;>u8wz瀓=pl*o l Nw/ `Qg5^ΎVװ%bp-"J4d,BW:RB2C"biq]&;0FmPEY.,aD}QGY7md.7.6,4&8}O>կRQlޝΙ ЉTyR~<>ppQې,(,(31q<_SR%4 V җ1p#x!ϸMtUTޛ}{65ךq4[$X^XyoOBe8|Z!Ԭcӟ4e?63)&ӧRg ^IWu_v/5CAK6 FbÐ1;ζ+1|nD&orn73u{כhA!D;7~?9 ONJx aղhlL>꘏s:zUrdvsA>^Q#}lLo{j8'a[TeV3W7Ai4#U:q߿`.AXKu 4Z/+swg廍1c> 1'hC9xx9W3`8xmވ/5}SFA{Z]/^m1ܔ=~ GD<߀>LYRbLZ!OBFeGpRj+YW>[#[w\昈q2s]{r5r>7 $Iu=CVk|eqi{vg1;6.-lzԏZяȇ~{KcBgtϝfqvŹb[6ywQ؋Ԃ̛0 <lùKqAYވWQ?Ip'_ju#UZWZÞ5ӹx9*|wNIDwqrv2-䮓3L<|f!l[2GdF/m L 7 8['钎π+?㧘0WlG1Ү=|v ژBܖ Ϡ)/>}Xkeuo l-9MGEDЇ; f5pb\dky9SA9Nn/&"n=t͙^W;smB?UB{0(YlW>񎙷/SI[tT|_y :\)E'FO]n{\Eʽ뱔 66?2t Q\ }p"A'M9pGa@_|Dd^3f@b':*Ϥ2i A,QXp;3ĩpjs]  Adڜ΄A&F7~?xEa0X;{>Ώo{t?H߅C*K! X2A y sX۞lpBI3v='BA؉>ۆeqP|K\fF?uUte(oÇwV "E3m9pȯIѺ.GdC| l\ޖ܀sθ_&C`p:<eGyQGrY4Ko;N֏>rvP}<1|N;هLU e;,dvCnq~(+:tEH⢍H[vQ"*`1Ģ噔{p߫rOs#Eoz*p:"׾v^Q6.9}k2YrNmnq / i3AσMqDC8BDh7#J6@ y{,-@7!(di v(x ŶFpcw jo+ϋ:Vg`J;Dm( ܎U)|< ؖy/5ѯb,Weeˣ,d͐J^4{?nliycǐzal#1,|/E 4t*8Ec=*Biop?ph )(˃tv4/l6E]Sr Xt(m[Ԋ~ֱ^|.˼ߨ;:2Ԣ1L qK3PhiIsp 8~gσ?/,@E\( O}h囋 ʔIO|\lL=A- g똑X\^"u,楚w j>TW3Q|Y|=^{!d 2u \}WEa >4 {ǚZ7xuJYyHC͆Uk)tB K>;v)tErBp )(w kw8p︇l(`*Y./%hPu=iyA<Ҭ,[Gq2wzɿVv H=|xu $ϹA/3SpqXi3芾21xx1m({ ^61Nv`<Ā\i&tzU[ĺr#;֑ 0I/)Mppfw7g.N9_tt{hH3y \ˍ͚ˋ¨O:$ea#:u}/(pvrx2†y&ek`n>AdOKQSUJEˉ}aߚM'*[֧Oyy~ Jݲܶ/'7{;/%{n@S!"Ͳ0Ш,sFQģNGs1)4QIQ. /v x'`0oUѭiPh٘''܇`1IsL2)(/R9vسG r)n~ yh^|3T)p_k'nl&G\8_z|j.>̀3^oP.Y/3͝Wg)*U#$p<˦/෠䴇?fGۃMEݎ՗6K'1"綠(QL^e5O;),KO dq{6O4`J>wB/N:c#H{@$L ?G_H7 EP ">-Me- X.NBYڪ^a)ڊ&f|&iL\;wS[WvAƭeW~TWj0>Bz:de>leY3޲p1($Ͷ_nRقPs` ޴#*(o^F.U;}<i>Dz_R0 vRݜ RsAjzcc lُ]t65z:$5#ȇv֓ouM@ʶj{\ 6 }J@_:#>@{z1 cܔpXX0m9wG4F#  5g|<)ST{w, DNY'}.4X:YOukџ֓B'Қtg#h};9dn//GgucykE+}q3*(̫Hyp^<,r&Ļ 2^eޱWoE₢NM ש|#"yMI[ӌ,D{Z1I0s806@1 3 ;lWQ6`р.[aN+L vk,_ַL y-W{H^{y&G$;y;f`ᆜ~=ׁUW*w׏3`Q0nt:VSogGím='8n׻oLwG}l[|QP/ͭ,|ԋrkFQOUC_e_C7#Vu+yG> 1}a\HsmɀeTo*JVWy++@2X |TUF: +Ί&=p y2ʍ)R5l<' Cn*[11Xgp=D>ӌx8eEx3p f|WbP7!ȔN[6՝L9MAcktSTmCfkb|ɝC{$/@潈 F4 m! >pl"5񧇿OW'@iJ2ׂKƻ[lH? (,-,͗˕թxlRz݄L_m%]'WƓlWf_s>ЋQLyPFFYe>$uz`6l|*/4ۗ,ʣ^9mdRƝ ǣx#v/aUJ Y?+K[_R/5K ^ĩ~Q StR ۣAQ7*wmcD|6"] 7)x L`ȶD։Ut*^di SD%t 1.h| ~ބ|P}ԷH]č-kaN,Dld={zj˵XQ^UY_ک_I s7\iԍ:2Џ4t"i#r'u7Aա<1@ZXPeNAÀJTKM:0y3aᘌ{5x8cn:y,տz#q KSgd$mM*mGG;WFjYmȇ?"0sY` G\/zJ싁 ڙvP#m{K0 y; &Qvk?3^L>f~@Q2}@/$&si2Vq% Ǫh qWU2˥FeZ?*0tDq{,{VVM`~vwniX7~bvRv=:c`Q/1uv}7a~~ {#6 inlyҾtuV+&t|!5GQ@d╏@)IYod8.#n`MKb:c;9ڷxF/.{`Ho.lHZѱ}_s=GHvT4 ;jDs5}ʩ~uIwoć^sӌܫ? ~g\q\{9|| yd'YYku®;14?r{wCFv)7/*5uWi@Kq<|!-x>蛑/׋'z"K^-W{3.Ey(E`n`)Зto-7wRz= $ybX0SLαA%/\.'ƒܱ |C`w@s3u;;0^E)ˀ|ضλ%ݑtG`=E b;j<ڝfKGn4T /3'{ '䇁Հ\sC/RD]e\ȯʶ#L?>:do)`,=,9>@|||.g`6&e)ofQ_(M${h@.t ` /$bH@vqKyن?[)wR:\#'K`=:1R~:3:}¶՜V80aLN3%v8Y_8坳YA,g? 1w͢VA{'6x\xRLz |zFo/w<«9 pm :V9.`:U0`5t=>_KypwA.0hI 8xaSuzd Y ]w[8b*{ɼm [Tߜ`eF @tƩ%*Ki̱}*on^BQ.{XAUt^Ks/X^WmBӿM@|M='~sE uB| _)kއ0 v 3A48Af))Dnd e9 YxX/ t2Q=7Pki"<(1N0ݔJԖ,+v7lo^-a)9R)[C܋ic/{X5"eܮ .Y?HQzb7NøxHFi և)VՋ >w %]e}>E{8 d|ҒVrH?7y+s<*˶v\[k;MM8SOU[<шr|˲cOj<*$5< bdYjۂҧFl-O.f50l%+ςZ>6#pEIWKǀxsK5x0-3%m`Q,.EKY%~_ˋ `wïM fWO[ @z5IwY.Bc, k@ZK{PFin,2'p288׹lAYy fYFrOpt?V+ijUa*Aίd~bJQn)QnYXce-*6*>sŁ> L{< .yq_50-Bz*P~τg? RjL3neW[x" Zc ` 2S⯀x8'7be<|ɠmg] 7ܒ#Jzk(7#$k*pЏqSZSeqkϧqˣ I_0fHQ-^\܇O6 [Pɼ'L?v|^^ckn|. FJ4*e!][YQr9}ԱM>V[z=xJPe)&@> b/P'Y}ۗ˨IcW%2J%%ak 6y)E(v+$rө+D< DOv2<aq} d{\;kw@P#7* 9k?{g (NtF䲻,(QUųEUyeNq6LbEl6 0Z7O&iu–Rr}TuƲKp0X 9 2^zn"npba6;AYRgrnZnQ:Gm3%~58xx ጰM//:>/ ߂@Ѣw1Iven,08Rd#⻠L.,0VdK[Q).|F:YsY>i9G|S_ JRP1r>d'e .([^Θ\5.Wq qeN^(ן7fWe[G$o*$mY+Mے%6ɺug<ytv6t,~D.}#`B7T5_;ƪr]cH^p?t۳Fy \[p==0|uKSEEIE~qv^#ަ!! `qqڸ Vm#:㕺e4 w Cv2+)"f6T*>˪lY.c}A1l]R,|Y?e0>sb쟗fWPEnlF$mzğdSY&Z;ׂ5ho1՚7~m~\u]_reʷӞ[WrGqpBpo4젓Y#'^ܘ>*tC{z̫e fXq0[5]鏹9TY=r}]%4WcϨo݀ {"KQ'x.yԌ4>ĆRּ >6ll {`pH͕扲$hٞ؞A~@s}Pވ,s+=t ]V@6gijP;:(,Ut'kYI@=So`O[ӃgP\PWry𑪟ySp߄?vQ^ǁ)󹬯`3oF6 c߼\APo/yw'N~T2kr۽޹B/{s!1weԃ-xӘ ˄Ѧz>4QmCg(u';b` 9hTpqtDsSS* {N:7$<t:osS:AS8I/ }|§8|,ck/qc:|PԉTy+|~^r4,0Ueq-Q)(e7"x iQ>Gl7Vx+g"gڷ^ȗ0VLUV󲲰ᙔ^PWùӖeY,]m09Fnl6rmE'&BccpZi[sP`t:₨h(jHHL8Iv.0zkĥ@G"%Cd۶cM1t>T8IvFz6>NV\AmO k|w,oGV5E:CuYF6sF:Y<0 bຄOˏƟ(3ofmg^6@IDATtFUبa0WrJCW;$մH9J3PϨFYز,\<Uu4>OOv}<  9x΃7(p-6! &4Rh1M<` cq\ VUoj=[ː Lσt1_|+`)G 9"EJq7 yƷR/Gz v3E?",Uʌ^~%;'}*p"S oݬW7+bYι ׍^da o6)9MAy:ʺ,65uA+d6uI!2/(:0|\U`BJ 䡲X \ F,'U;s1<̿ ^AE1S=׾cљ{x#p OO1< T#OoC]49&:y;\? |=ݠ+ m7:8+{\_rnǂ#HppW@<ԣI5f:7È!>: lZ||+Ex2u""ƠLƛ<Қϐ!@kt8؊߯x2/|NZ\Nʼn;N_<$Glz^|57QN]ǡJZF!/6zo7yEJQ7r Bʣ<}mrFV`/`Ped 2- ܼ;@+Ѓ.p(`X愽 tKA ڞ@~PF'p Й;ۃ 9vV"m{E\dkA0~ѼrC_oї}11_k A|!46[n?C.FK1~_ɷb.Fyɐ \spOρoLr cw)I7} 3_.f^o1~8-;_Ua hDvUu9"F[(6SnLDȪ)KxЎ䆵@cvSzӖ|i0@ M#>s\7>i crμo YW>^:jO9_oQz+7N1X%H}2P*Oe\=Tv7 ɽa[p g0`2>REl%˳NYnw3l]e(Yo0ugg}(4B7gk^ޫWSy>y3eLwVA2vX *,E2t[4]C Y&fBv7 <8w~46Qτw^fuieCٮuewBŋ@2B;Nt1Ñ"ծyvb0ЄLߩup~ (t"U^Ň^8+B'ҚtN+Fi|g}\94W-bQvRNj\nM:gvDшGW;"}9Rc49EWF&ќ!1=mSl1;,S$#RLlAa7sW\uT]|蠟Nz]{0Py8>S/ KKk!#` Wk-{X4 4WHpX%u)؂|B< 0;d:[FEuiymMfqb{#:-!p82 ˮ ,(UU2䇤l^Ӷ wk]6L wVo1^$dYPyr'P_+7GafPt1wW[y=K M) pc6> Šy I:O_HGkJ0 #@a`o>ߡbSE[ &ĮfQ{bp #{DvCqo!h#aItl2CAsVzT-(+ >:*sw=t2ߩ s\eqAZѱ~CY__^`v=OW*0@Oުl!f^*)Em.q}bM%cLp-D![#О׽m5iՅſ! \lջ`nmTz88ܶNf`zA:ʜ~;? ـshY} S1"X," lp[;/ }ڈt.-_=roV{k98B*2vr*Jf]sԬ^MZ'kf16DndӀ_qŽi&pG<|.k/7sx0 h=p0nЇm.W@c7+< 75bl2݃@?׿3Ylj4 r?:Bͤd~ ҃:;AKF+Xhd'.o lS 19FchRXV;|?*+ +>؛`s} aC `{qw _[=kIZQMyn 

\K M.lAH!7 |p*]+r^מ قcχ^уگ9okʪ>e(UG1Vz|.˼za})xH?f+mԤO3yr}] jPnd;`6rnH 4|<֝>>lAڶlߒ~*}@Җ; OVč?PDyU6P+z/؆큓2HzrIrD+s'ς0p 0xR_s0$ڲԹ.^iy x hǚ{_RG?M΃>fєuΛZ|[Dc> nW#Z#`8pNd>~|;aPz"jHY'Bs> `#зay)n3Pu](l|.|#_Fa %(F"g*vK3EXص^"m!s p%HvZ8ࠜAY>A1PX6v1]W^ |7֍0yÃS4 jPKnX'`S Qxh\`YCM/`) Pˌ./7c2TӇsfM@8':C]{ٖ@Àr?w8\ \BUk%[΃wm0-8" ހl@~ t?.ρ TpdSRo~#TKnw p?Q*YԷLC/Ru2}*h@͔m o[p6N6v7ӳLٿq0mέ#GמJma^n& \$]-d8Q!bY'@|903p_\[!Ll }4NDwI"+O N9PoO`!p < ~['us}Fn[ ܘ $公Ij&#oʤt:`2)6hM —y6E`*q}b/zp %Jlk:Ҹ姁eRe(,+3pOFUⲸH!4dÐ0o/e2 I`ip-x (QXgY#|FeY/|泭 <vcXJ4i)r/̗8Զ }4:@ L>Vj-0h'd&01v&Ei\w{;a PtBf^D-$yY!-q7 &"q<@ '~Qt/6t˅e98xHaNd8ن{@2j30ɯSpV uv1 A_zl̽#N 7]u>/ݙBWY72o[dPs@i{\ļ/6EsM~obFQjV̗ F|_;o?Ǽp&/p_X;=o u"f^muTmE @T; S'C? 2?9po?nɼ6bbNK긶۝NNf$4:cO Fj8pL]4 6DyjNbq XJ`/z^Q'lhL0r"7"/Cרv0p:0&ݩdQk30jU=GY 0;x :Wg>7}ۥK!&/V5#ETE(k+ww@+_eԓw"z^$}Jf|mf:ejF_xh<GNA_|=r,}kNhX-gtyH`S[/1٠: S5 /#`u/x-'%x؂¦2,ڋrSv68xb5 Md0s|D0({umtPZވ67pm-!zxֶk TԹ -s>f8 8SY&6)$Չ=KI61πKizX4)\hdW#?O J؂B/RGZۮַQ;;7 GRWI&Ѝ}nCkO̗lb S]}8`p<xaLf+[^Ee_,x>:Le;ʲn^g>s[ym2 p΍йf}@fdwoǂ])0vڻRo}n) hWgᝰ}> ,~~N~(f=г͋d@?}\\ A1N/҃N`(?.N?ԑϾ?um50< $Ã^'_,/thOd=J2@JcE0?8 | 蔎 9"?^#){AoAc[]ͳfx*4T (wʝC-B&н\{0D]{AA5edd^C7RX`!;skՋs{g=kk^sLFB|lB/NupΖ2Яwn#TnHkÊdtQ;"yf `{^OY Mp? ?T\:>=]p,Sj)6<s7sI}pklmh؋X5Cx_242нAi1v]xv㭏(!\Hog:F&=$ o2?v {5e6y@RaF"yn*uçxJ 7 V<:.M >'>w  F`;+ðpcYi.<RkT^.]3#Nr7" 8a%}8k2 65VJ/ w6`K"+AN"]π⡛zPg7,}?ۥsX@;IvRiX;MvpVF`z|2N7oK[Z|87s0s aO0 X|Pu.2萊SВ9s~8( IḴҦOẓވ5>g=?gCM#pn,WS]%M}(e.wR7|~VKqb-{NI[1]Rb7_B7j2ψ6xQaR9[翁Im`Qp`X70'N;¯pc~\1 lMs:?/24Y4X&W;'vQm:aR{cVF?b%Xc׊O*UG2<I_̗7{W_؆ep?1__[y_e~ZnހZmPO4'<:I{08M#e~me㟰L+r-<^"ݟ'׻Fmp |/V$WbW7'*p[8 `KbEߺKub~I|ˬS>/>BKo FL[@ـ@r9PG غڌM鏁m:5`0Pl Ǜ%w7a`~ߙ򷔬h#7`sGL=p{s5#_v.=՝sNP?wwL8x=#w%9gO߀T63p'vҭQi; nj[z)eZ]7AAk'e>xg~fZNe)kp4濰,'累q_Ho? >X4-zZqpf {g)]yq޻׍bͣVRR^Ғ'ehޞK[sX݊8K'*GQ 0r \g*7-p#(;CU(U9&:`9s®`~<0/-@"8|⤺-i;;g1cVjzTbQղzIC"zNڛA8dSJ7l;u-~m\K/~ʺ NRb'٧bky[7ؠIpAiOw޻zK7agit%gfYCՏײs+bZJ7ʹÇ};~Epourgb*lYN )-|: |jb ^o)(^oIse|~i8O[\[Yzؑ΁H tϯe$,VE{, vh;́uA}(7mMVvCQȴ>n0P9s,źy {g;Jb,m4Oﱐ2 ai-ڪN=:i߃H_΂C` .h7tvYx=Z\]$U ˯C'o7;ep@3tۍ$7/k,^t3~)Cޞv\WMK%=.M^Y:Wz k"*V4v^ C,}3 ]XalUf#IaC^Z P[$ei WzscG$qe0Mb 9vO`5L;%p!CQ'ܠ焓bm.G&fݬ`Ka5Z6/2F&;SFxƧHxdD9s4;up 9uK{=yM|oe:o`je;%NC}KE xS^7mW(Xm\}KXB7G]L+usJF33%FaB+oNLtD7W`C)<0 L3ݭ-&J cW6?ķ @KMg-@lv&_ <׆籗IZ%=>Jң'=aswp4u|HVd$Q\nnFoV'~:u1]p6 r7#t K(877 XO I;ngp0< 3kCxC ^$voOš*WB5NihBJns8ء'_lƣ:8zG⟼>]pܯ=(181X˛ \$#!67cGK_O.Jgmenmtmͧ/| i7?[e =M:{3N @P/O^<) k˸ocK pQYӪ/V,pMtTlZMQ/NeZ:C>+[<>>o2IVzwKuGǵ~s39H9 1U2 pz x{9>:Ym(ۃCbZЮ>2Q+FS0nc+}4`epDW=e˲7T⫏7w7{I\Ʋ ɿ p`W>37`20=D z-ׁ.ۣ*gX'-I66t4lt؅pV0߾LR9Ј fZy#ğ,/zù۪1 "򨗩!ȺSsa}`~n>U]R'a~eYҿE5 25kݓӶ/n{k'õ`yD[{.y+S ILs1axV|xF:ʱOlbg%^chZzb? uP6nzꐋ Q.4eKs.z6|쨡a CƠzvWeJ\:R>$޻n,%so$p7 uc3S0d7:!63'<ۂ2h)ӆCaFxn_O;@w&a9\9(zYNy/幗\hBG LMnc滐f' ӐD_:$ ƕ4Ǝ)wo%ie|n͖U9Y]ɼL1 4uHč@6dhXel9~=x KUگXJ0;d`O+n#)?a6b>2'dks~Ap|<=Дc? j&_zOaqh8߿ {Rr"ZKEbӐ<=)?|>^<=qvq~BٌvL[Yo罝"8v4C%a#3Ё^/s觜.z, vL*:QbZjEvP\CQ&Ŵ~rK;!Ԯį@uL3iơ>E+>O"?Z.p;WXG!p6dip uI<`+7Vy%< |(to x PVߵ@Fjݫ\o pZ.tRtE0,n;\Krk^ԇZ\v%gۋM]}㏁{qG9lt]J:!{$. V:ĿSo*JwzS;*ϑzl yh $zл@~n{CO6Ե(| g(ʤ̌v,}΃'sYX66OR~7~kbL.VӃS+pC}7Mt #WV?!P6ysDXĉ$^}It$7߲[{'P&inGQ[Jb}Q*_7ݺ<35Ϋ' ɉi4JaRމGeta҉ٹwA 3i T50g- v|S'^9CaS2XιYa݋jfб؀ca".CмJ.!zL ^3]?b0 ҁ ŶlRr~o[yW~;f{19lX스NV<m2N:fo?}mfVbMt2xo '\0?x;kQ5`>;+ejܘ"Y{9PI+C]nnN>?{+}2^=T 7錉qmL|s0Jo@7*l _Úpv?P[ߦ?5vdz.'ͰҧW]n Ҡ> gu??6Ԗ-ez]:uLWp./6M֭)ia]K XN/=tT 2gjunHR%N"pXZIo\0Mxy'g]Uϫ]]y7< {K ˰)]Y`fWĽxfoډNNmX/C(jWcJʨ:յxgv>fV~-ȃS_L>27{ !_b‹5z^D,raDOo]ʴ^ni // ]:w/nKnb9du;i펮k;* ^aZ8842!>My}/70J/2ԞpI^cx&ܜI><]0WϺp1.uӖnj9_)*P}ka}JޯգT_b_۬AUyҏc ;Qa#pOU<({+kZl;ltJnӽb9|l? -Gt$G汥ִl3!Svqm๙rQM&mw©xO^=96.lh'Jdp|푲Җr&0˼2ߓdY7r~vyl03 -GX3>/ LoϏMtn|4dhL[l!9|\lge>Hgfˎ&Z}/p=&pԧQ-_{~'x#Z9w½c:I7 a\k3= @9<|f'1_]ү [$x2.ƫ7\v#wehax<)8-'`]7tB]H֖35Fm$YOznsR;K1) Tvo,|s #|k:HԳ܅糰L3ek|z|cf#:fwR,jM*uz/^֊y~3ElZÕ\\}EɸIcw#u㥔yR/ nxbCb>Bl_L =a0xӴYؒa4Cl16o I: iAHgu>R'A-7Rx[nC;M_[vD(G/74u7Kc3U~KrL )l`Аee'7$zM0=t''`;q.·wC9ekfޑ4nAكNM]cr}P6~K?NsrƯ}uXZ077[a/y0xN(f^vblِ[j%RƓ?w'n~az\%A[G9LRUp| '>~ [>8#Napu57 &_~7/ܣuJyWc;j}M߬moÙ0'3: s>1,pX'}P\/M@IDATeR7zi8Qlhv$ NAJ<gy?=!}X`|#h#AmnI-;x Pf48Sǵ9q5~2=2o^X | \¹p,U 6~m;|> ^$GO7>qXnvq]L/6[O @/Ut 4{ w E:]^+cb)^Lp<,\Cבg"].!C6`ԉ+z,vj ;$;A7 O x} nz׷)2a:׀s`S@}=R_ e< l^Yt<3*)㥞{`-x6ԉ40]znKb3|TMOח~V޾Կ(mtVb^'jx$,}u{6z5zSw~3sW"n1XYP|h'6+6<A;l(mj,WMT΀_[UQPVCd#vy:PYuڱ]?OAޮ :YZ]¶p$c=,?R/v, {q!td0i*ǻ&<0G۰HAͼ7H̑y=<bKք''n$|N`j饟Jhqm8 H<۟sGp,2/xYqo)uDę2#yOJ#*Rʸk 8ܨ `V(2/Ix>w^l`R # ;jKbK|*r 7bC3{fc8'ܬSٺ~έ$i;vo?b`yQOn2^m9l]9W{v|/:eGBxRyJЃyQx!MQ3sm w V`!a[x8~'Vʦu[&a:|YgMF s\v7,m0IZ$eZW_-g}~13 n}MYo,4}n4x)7b!< fC yPMB-6ju8 Zqө=W̓9Tvu/@?k?Wsd3\4 GN:!$\x87_"%IMGLC.4D|q5lP%lPc&W`~ɭr@|yؿ ?w[-2ldGe#g.*#Ɠ^ n"o/t#X.Ը>eNaY(luGYIN^ƞ^joSA2?_.lH^[5IpZP.C1ac8suQX|OpWe?15v8a!pAN, Jx']2Q{8nn^N7IY܄=`UӺ P;S<gK|QGD3vbOΐn6\t$9QNeƷn Tnv08^. ;$U\~ Ȧ-gK'Qlr`m6xg ޺s)/0rOԛ۽Gi_`ѷtmV;ާ?8y|J3&%'MIp#] Y0 \D'Id> bُD;$,LJseB`}2Шn( I>FkG4m0zMc?L^8ҿ%\ +Ӌxrk e!KXU> Fӕا5(/?<$G7%}f\iC)QqqP;57]w"[ .{ϰ8 o瀛Hk/=>C~+Ê`Lv 30|8<^EIi =$]md.Vmjh&ΓmӰ񆊛TkK\]Ǎ?/)8fG UY)Aq-AO3Rꉻ|,\Ksr:!aqPgC{ORHqxp&z&v tS[&s٭hTuMJƵVm`RQ鎩ivpxZ:igǽ*pr4ЍiC8X$MӠ7} N%_& 1H\R^\0kG[au8`i?/@ñp7x, aBTIw&m[OPFBP]xyt?9rh~ĞP\> cZPRF†r7J`!p+AOLCTsn;=Vohéa'0oKucP<=o0UgA..C}P˭3~IW<r1>p-lWxE\k+ӌOβs/&8jtrg)ԗ][9>8٨P'L$tics}CZnh›:z_9MhӴD6ٮjk^KH˫EllS08TPg k'QHǕ-Oy >ktq~;ÞA2zh?i%佄kFxӼyQ}1UR^/B6n2/+1퐽ޱMNs#a7ȢH?=0uΫK[7b5ZIxIO9E `}r&X,hIJH<v<x_=fX6>;,YLV T˖GK=T݆o{כqmZJ656L:u|N;9N\cܲLWz*tFV8pyϡmb\1~'\U8򥜄k[c>K{E_ $=aYϵ>ɿp.dQ'(]gtM(VuGoJv0My蠙GI HY:ywp¯g^9 y3&?z9b1 "diRԶl'6a1. * [5b@"ԡzHz ?ZY.`)PƉ:Ҵ[>pAr?JMG07))OB~l3@˰lciǽv˚V?px? ~cSa^.,#4'aʾ1-tuQwr s)y #/vBץbx|xƿ@׬j3|-q u.8;/CyPWK}җJ{?Miݯ+aVSFL.n=g&맏{vޤkEJ}J[~'$pOeq)7~ͦl:"\ > >'&TIyeŮS'nݎRyʴvzݿ[|v p?oP],'hSik?րS!oEz6 .t}'Islp>d^F8Dv3N&? ˂s ߇VP,K"tӻ%`BO .SU4cOw }C)co\y7Op<Q]֜w[Pm vVc_`k`m0߹`YnDÔ.9̴;|.@Vs!6?J,̗xLI h-wg8hX~'zKIO9؏ya8pЮz]ʺKV[a?~pPOq(g`SoSMOt%x x<$9W'Ӛq>%,)8`^+({;|N$s4tF 1]S`yVa$^9@ꗰv%|Ftä-%r!YczÊOH=P+I MUmK;3z_9.GO[J|IӾqy}b̘_.}m8M-uһ!Fxۉڰ',tj.[+rW_7Bƿ|Z$^&乆J=amKO~ź32-CI~`sy<VZISt=E:SuA3n`ZaSwM, ;q-pX~~ +ep5x } D7tpn=:=3yp26%iBcxNV6/+^`߸ڒ/ gY-˼YOiV'yG6\QT7×ǜ>͍@Êb$n<n4uayȤDDRܰw7Ndk~K4#{})F[IvOMOf$u\׈O^Cۖҏh+n z!/'ڊ\˜y>p*ކ-uf}zgSžzM4_[*:]>ݘ\nZąOt?yQ't>b|uN%m;a X0HmXDy_yU:4=bºx"yuC Wv6;U+Jp8 SCAļ ޯ)me3MLOZB}z.lc!}1/i~-ҮI3L~C7RL{;e맔Nz7 hQ9/.ap30v_>ϸ[#6n>?>i&O2diw7[l{tx2*.*o~@P=τK%9Z6J&J~M.: ւ#>>:s6!XR7gNFGU007ѻO7nHi/ o>*@~#;7i3ݎu97 XhZ'ĵR$en3=JE@IzFgFXʵ]| }#'c>)]9ImuA(63^[vz$' OWcEۻx 8GROJM(˨4rSy4$ϖ`]Zi܋0R}57 <<'P 7EaA>`ˤ!xl \]37b◛A7T*%=riw|87t.i <[PM3I:z܊'@1]q}67!s,*⍔WxGr/icԱ<5()-՝ve6\Zύn~MP/|ezt-{g'z_ϽsA~K uIyI\ uq,><^^ żJxJcvjB/vrHqF| Bq!<_m~ͶX7#f%pkwoxp!iwM8v8"eZzs7{(Njvs&b䋏| ? ^L e`]VKL+gXVG/;/K/@ڎZIʬco3<`NH֧Ot;YկnzN60΅8o.&>JۓP[u0zvCFx?e9IngKP)..)ҽ#y`:1&Lnp. }; q`ܔͥ# ez;c}. _J_cOX97խ6}aM$D[)iklI21>-ye|GKҏPsV:dn^-떼lIp aZM%k'쓱_Ow, ~4ꇦOtC$eM̃.؄4o84:, 74דy&EӋ?C딕'?0uZz=?ɭrLvyaCp5ĵY7I+};J)4۰5|\;SK==Shymy6_…8ط DH=0M'lNH5vZaATMlw;VVH_1V'qs Nl0:uP kp\Y:\be}n6,X&ͣeeHCOGƝΕs<вuEŁ.^▂af'2qifྰYY,׀|*^>]za|+_P5eXWRA]iKQW=vi@{$p^.Զx:_FcvN,3곍۔\yCpq Tt+ XvJ8!N`^nTwYix9Av]u=Cɳ'>CG ˈ ׄj'tNNvLWx9)um);xHIVgmD[3e(e/mbøݳ'ax=4=';V8(,~ Inn3MnO\͸H=_W7l'O7TJq?o*r.t_$}?LשH|Ji/a{<x=e?u"8I<2)-mss8 \xv ΄Y!jOd> n{2Zϻ`Y᮷6r΋Xz-g7Ӣ3|Uan¹i=,ˍ~JR/P`ZOTvJa]O^C}&oٖԖ^ڴ+JNp1,fx+y7lJ]ŷ#xs5NDrqxR ß>oU/oPE+6 :k =ԯN_{?]oU8ÌP_ X6я9OvԇCMz /3~f~%a[;ם{νԹքQWJęzkva8\69[F X0Z_ 77W;h*W}kpzx/ LC)֒`MK m [ ܸ܈p mZbۧlw!&x3=8FڷonRDp!ǎڠؕ)}*['vmæF٥2 N&E:q,o'BNE]+yx(&4AZi=e2]])ՕFԓ^e/! <bR.' Kf>i_zVIOv'a[ߨ9z5r6?O^g6,􅇯@;MR@?,_O±5`Fs2qIJ`~;x [vj7)"~62fQw0Wu[POº]܋r+owjnNaY-w/i%i@NuIʴ~ +/y.jKd%KM1⟼)׸b p=lcR+0iw)/YM)#'J]\R4,m3λ/>Yn>GO s?pSQfs"Q8A#B\ L'⤻&x[ kg!.ǁubF5LbwTuBθ%$l+|]+O2򤇤n 7ET;4kutYwtY(+[eX޼x /-CupxS\~B|Q+) ַOC}#wJRj'V{bJ=ef~c?s5 q8me7_RS97?:2Py}[<ΦH_-Jo.vDs &n w' IGSϜ\(C%;2-:zC bĪK4SVCO#̐0|^%`-ʎx<*[) ߸0M א }REB2M)eoy_6~7G'˷`7PeZ'yx8 ۢ/bK0뽓yzʉO CKgM)3q\*)㎛+6:1KwA΂NypiΧԡo'crŷtS.c'XO3\WN>'4wyb~7q@'qBy'7i'rDݲq7$'F*tʱCqh5\0OXRw^ps#x>[k~ŏs7 I6ͭvJxGPJ=n"p/O9uVyI+}^B\?K Qzo3(^~Ǹl{9aw@Ё|t) sGq# NkɎ].'(}=@m C"L}z\?WR^yϑt ,>LV77zH|ԥTyǯSa *ˆɃcN)yۅ3-Vp/ PYu{rzyp> #5^/O퓟6~RmSdhl gv~7&Z&6{a T!l n'4۲oMn7@),pd.8'.zZV>q 5wWyMg h˾{Tmw6E&#yPzN%/keMFz9G+U/mēPqpb| \Ž7|\>ˈrxW) m{bϳ)^}v+kҷ,SEg+n<p ['Kies=ᯯgMlp(|'i1OPNҮIy)cƿ@0yp{vT Ĝtw`_^C{!X(P+q?{g6Wq5`R $%)^8ݡxpw AHRܽhqBJ}Y滹 y73sgΜIC k/!_Ny #`GK uyРUZNרůNei TJz=j=_\q|:D[tNm"wKq A/zzIJI7)c-Ӗ]O@QD7Fٴ ϯ8๽/jOWW4yv 迁e4ٕ}2bμ(WQz#md\7Yо{=B^'d3}pS1k*>ނ2 UH%B Uc%,:/ۈ8`(S#m[փcu?Fy33J8sZQc3v<{ӥM%?nv(/Pֽ/]NsTT)i"m\xBh#֛c{i=㮅 ؟B= 3͆ݦ}$6mOIk:m3_;#Z{P9%//i1y!iMui(NIҴm$7w!JC5]7} }1謐JY~9?AmT܀iAx=({07UE ˺:Zun3YB<ί:iÆ\(HɺDݏo7%hj>B_A4'-1֌yRt~9| yqAjݐ߸viZ ]䳧O+'طvfb^XE%ox vsA_㉴a)ե|)ETg,.!E~:L[V w5X mj7m߃ < H S@|:GG-L >hOWhkNhMq/xq]Д)W |6ut;,F^L]gٺjK{ -DW[Oy%< UmZeKOFz3c` hl9 B\!.Bs1$+>gg N >E%=p#hъpx3K:ڷPQХawoB\=(- ׀-cR*i\mM?AKWe;i m~x쳭+d^:~).V}~9܋0.pVA'k.kGDNv4#S#cES>uJ@=ǎ#e6 y^,-@DKHG>\uX@IDATsԻGYAkŊ dѺ%븎Ҿ趂5s8a t~\ȩ>os]l nYsQs=@?b-;zb?#O%-P?#fo+S0 V퐕$c#}FiJN7/m3eaHXxX\Y?ti?iuUpM翂"v+j+teM>-;1}`sퟤ`=pm!nxyk'{ ^DiDw&_;&ívLγHtX'Ϭo t1{89։!nE o=A.[?>98p ]B:MŹ+`86Ӗ.v/?¯S!D_;w }yR>/uAp Ħͤ^^#aڎqǠCA\8'Ĝ mZLӢq-]+: 2+ZD~ebgԝB _ .쿌>+%Z`A| K|yX^1Dܰ"}Ntj{1(\:s@<|;Y'QTJ-%e Gg,,}[].p<~-Gês!p;η7d7caD3ټ x;S\-@g<~ n$\]Bw`>u^lh,Sl\ ` (n#!܌ؠ4 #M F9C #/KQ4x?b:ƣcӁ>D^e#`-]mDh1,`6p>X^<81x_IGg\2EȋtԉZilηi˸E/+??c;ej2y9z܀=`i њW&n huXB&w05Z4֬PYUNw#|'=r:Ob.9Ǯ+KK#E<t;@:x:4_"qc̏}Nӱy{րa0:Q(Mv&+"nW5@/J}Jڞi@V {B4m` eYpQ?BuWg=< օ! B,31p'V^^P>ъ.׌|\qEmGYXcjg L~'@񣪴cm K":ML;zxUքCLD 7Y i*.t+q}K|LNY&{~mƮ `,^4;.=.Li|:lZ?x}05" 0-1(Ko'awg/Ox(NzX?TLOG0]c6BKz/؇h8kmDji0OǂtHfR-3}Q.ȫJ?iOP\j?#Kc[O4,٤hK%tׁmo? O&8QEh8n#2xӍ'i8o/_8ޯ`Ex  ;XՄ[:EJ4{_ ײs2Y#HdzgepPH8 \`[K3~n磚Vs(1h{=@:=׊:tZ׸_x^e<3OmpMF'-E( $Ǽz Qhw~>$,:((/|;mj}"==0OIjI:k?xCu!"(yvx@S7T\˾WKyp 9u.[#n˃__hTt:Ĺarep mzX:Q]*]Mi-tT!;{V-*F<>c]u уxүٹ!^aWgV @q| ^H^*$YԳ3Ӓ7tc^^W-^1L<VjWp<1h;%"i*I{;Hoo !X|}5W /Yz&xק2i<-c\v~"HG-uH;`ޓE3(ꌇ;d_?qDk/٥?zb-i_ы8 `8dSS6*W]19 еQro}^ݹůB菿E3 Y= |d *"*tŸnGgI y'Fpxф^^0uzBzlXl'6='V2EZ!śuw^$!Z0, BVo{c`Z*mquW=Q0ȳs p&fuS}>^.Ÿr!iQ&"`r'>p?*qH6鴟4?ixLj\I"yrEeQ7ٻZil#m?ߦvh^(|]gzEO<Q ~?`[G2 t͉_N)/%n`L"rD$ㅨ0G#J7}J`~AZQo=y7_NQٌ >Zcv~DZ2|?(Gj :|""ݚn5/2;)gXikj>)] 9tNxr<ͽz@=Lj"]Q7kյLvp wFbuЕ%?e휤gFę{H}\sqx#,^E"^o8 <@I`J!Ի[:oT<7“?.έ.BWrMtMkip8MKc"ql~9hY-/rę,6Qt&\Py<;.Jw7BioA#b{sږq3\kuҖ}^0xd._7-qIUwaH"ϯ'] ۵=,s;>Gp<!`yum$ JҟQ[Ҏۆ{=xKjzha Mǜfӈp#>)M]ڃ4-y,>fGXT&S}Gq8~0?W2xݕh,օ@vS∦Zb[Wm}lnZ25gDcks&z6Ss}Wkk-2ٌ֫m/`_p ECi(hh `"%.oK⻒XCw2})zZ 1<#-  |o`(>Cq>hɊy+_9;UN#|N#/ 8E ԣ2^0G9rvѯD^|A~{6#DUW"/TV-k910'mk.2SQA&]W}XSذɹٿ_rf,sgK%̜ha9y 舑M:uap-2%-a$RM\6~ m.Q'N> JO`jbCU/SaZp=;K+(Q?E+&J`9.'4ǔPd \ ucKmTHo>S|e\Ce/yfH֗:L8y26M[ZT]awX<()AG<}Bm0?gJ9՛WM,DeÈ'm2:pLGgۣH=De3CKi,V\96eR|p\;D\r߂qg0٣W-l'ü0x7y 5\ {xvA np #\Ƭ>K^6ZimևWsқ< _*ݔdrNLɏ cKP& 5Wu`y`uN|ѯvb+F1Nn5W!Y.$ԷVrW/a&l-ɷgv_Rg:Cb2ˇ$-M[/ȇ>/xqȇŇLX}G\o!hc|XFIk/})iꣽh+Q2>0I&߇8Zs8l8*x/^p?].=n.? px88 D;Le!ԸkP<0SAbGf2x.`)p*>6sܒN}JM)sÛpAW8MI/pzRPry3ꬑ}>&5^;#ЖFrN?X-č9Ѧrp/s[Tbye~>좏!YMzCE?/~ 1|:j6>~:8;>伨^i(\ o|e]uQw,pk3\=V9ډ5q2 91D9HPuAG]ZV\)8HfmmjQ/D:Zu ~*C@ɷ.`{zp7IK㑟TKiI-77j:s?<o(~#%aѳL:w%W?Z=v}4\[៰vcrڇe,5pK'teE|A_  (:<Бw%yLi㌥MuGcyQwY*hDZ梻^8ɠhkm%ѿa=+Ÿaʲ>#D]qơ Lfm;(_Fx>J:[tZ'Fh{u3l >ޕt,i}w2YL;oM>R_qc pD3IĭtX<ˇM-WLZ.ʄ.M·|TIm?bga}XVp M6Kk2pӏ]vx|ume:,/x_`mpާPtn">FD%XknjAQh/ah,*藎ٸ/gzҕŇ|;5.j-q<A+x]~jJBy e"D"T_LV{6ItE6\5ω1{itQV]>׹b9Ly= g%m/YF9/[V:t|zEm63?$jz,g88- `;M8 D3ӃaL !e09~D;T[ث"pK5?++/׶9[nmhX|h6oC{&. o`G|Gt7;gށ}`ZBhk}0af_ P[6ir]68k7WKܜvj7/B/Vnr^9˻bke-s1 {/XO.(GPh63Q;<4/_v#eJ5K- 5^6DxrCp1 4'^^t3= x4b^BW/wBk+;`| :c΀KxkMuK'>u.r`0D$o:'/ .ƋYm;.a4ݖ/Zi>({p/v-@sb.{O_E1zPWE q]c68 F5A>a+|u|^[ ~vpgh8 >E*vH%(C"0::yϨSrWϏis?ܗ=:ƽ>ݗT-y-Inao99n}S`yE{>{,Twm kܠGH_$CI\fDp Lkk:?AZ*i97+PM>!oۘb "ڦ 1߾l}l G&h}~ N-2zoz}lxܻ0 @ZdEbNۉ莄CߠD{iNK|Uq\݆GI8>_rhȍE0(|3t9~s56,/ 4Nh9>U[l?gQ#mk# Fqwi.8CŸwG|M W$F W^k =$8/sV/ka>l9q A#q gg80xӴ:E>:Jģ|e8/}p'Dzf4scSh'BVNu%n x͋v ۈ{a\"?r+\3- {[]TKRGIK{|0ľ?aqmMhEB=8F=m._UȢ2 !,& ! _<1Q.;.8 <-7=Wj g!}zɝ WIOMEgxn8}6 :9 v/mKg;pyD?X ہv),$ݵ\Mk?jZ2+8w:|6vUK`~ M;2gX[ kp'x>M 6fV.±GƠ9X q,#,y eE3"mh=Y/vCדv,= \"mb̡3{"h%N:i\eG~M^_}AA桠bvbMHb3%v.E~uHwt9(v6ԏ+`M090<( C1M*RV_XVru\ d4ϯ6k1!x mm.#"q>a3s{{S<~.xn ;pvcÉ*XKF'f֪eaƞ&g,Lb}7D(hۻ|E_L;3}L>vN-BjZ^x1L5AyT. u@_V4Lʹd+ Q6TWOFHL>mzuð&D| < NLQÜ4~}bieb Q zU,~L>0Mw|e|:եyP?4EQ%ҏ:L)gQOZ.|fG jMk(ht荇.ۼHϗ)EK`Sŧ{R? 4"'c\ \vt^[\ 8 t3I6+=(qNu [YĽPށޠn+e:RC!"цD'y]:Ftl#ep҃CMdRKw]f' sv3V}j韙"9IzuhaYaׅz/>ϜgJhοĹhH7 ,"ж&^?lqzH"/Bū,E ='9NZ]*,d/ݑvutꕢ/c^\Ekx-YQ(ttl |Qd>@΍v55x%.{a.p!NOŀO*[{>u5+v)>a HOmz|5"Gi{dU[=BOK"țӲxZ(gph/')OVgkW֏a ]]Zv; |d?WE$?mc}!y*fzp |Ad}p?ۡG\^xn}xQhfD֝·-כZ$a5tШ|GT^# \_B$[%ģ,KcnKF~arXn JN⼺CN4^ؖ_FKs@8m*s(ރ`<@[K}N1]M-gjg+=_UEE^i8׉ Ǝjqvar-Kbo6p}hi_3IMcFX/Qݑ`(B9coi>#KZ{*p]Ϥi-wc S~8@W|vk42}3F93zC\>ɋ5#m77a^LdՅ˗l"ikNAutnӶ\5؟X6pu&nyF:NZx6zj+W`?`S^y :DUS4֊}Na7zetLh~{?N 2^y8Á`9 ECܗ|ls0G?4dmHC<ߜo^`)# m9^/_Ӥ]r" _$2Yߕ,c(IŢx4 O@ޞ;3}gN6ׅwC>K^ߡ-NM߳1TkY6+ҶW{A#KAyyw䓬H^-+͂re*mxc͛0XB^*1δͥLԏa-c^X)d"HCkD/;)`c>@< tt+ ɮH(.|>x ~]Όn˸{Gb6yϺtL˷O[.tW"mΏL)tHcC8h7pzT0&s߲{tHhp//FXꕼXw7|іkoZch&=B&c?9QU&w)O)s~M*"ay@5w7s(q[A-~a.`OFӮM?#Ϻ&ᛨ,j Ur M*Ϡek`C $zI{~J08^ϲ'6[챲+aI\5T,kPxY1G]`]GҦq%mQE<(yExGK+1[NE>!$:Cdl{KV&+\ڲ2婣DD>P80?_vK4 'xtQI㛉uIĝ@KW /nz΄_f8#*-Ϧ~/$#6Av|+`vϔ7tыi9!Q6MWDXJ()d&}GEZ|?AD{tQGqv0f|yTi#-iC{?e:2l .hk^DHX4c0b:G&1u]\Ө8gNewHC`?pl ap\nZq~3=۶^:?^:vpD3qiy }ڎj+Y5.7"G T4aЄ>Jt Ώn4=9b3CC1h>c^ï VI`c^6‹pxޕ81|:ڦy_@_㙿ӮXpMP8 k$ؾbW-zCN2.CsS*Q>BsfwVq\w @ԏU&6t?J7ˮ¿9P1m}/ag\kاb'\7q< uރa[zѻ: ,Z\¼p;4'9[^GcRq]B}&lщ9w@") Pv7|Acad4%l಩[XG B56yV? <[E|gC|l_N06:#V:@O=s~HX2%:-iOkå0`Y=LZi,T |-oh(L?ħ; S]miUx>jujZ壌a*lnV=bg^p˥ "/c`D?D]q a7X v+v(֊}yȼP.s@~8L~Jރu$o4DmN8bpp^;\󹡳u As󉱺GSߞSa-%sbE,`DK}蹇E<X|7~\6>DJӡ7<}FXoŴ>D_y%8Qz#2;D1V<+e* " [2k8+'ܺ a:.V]:d̊#:aHV/3{G~  ʋ;|ӊ~ >=X߀`yH}C ufaTo^H5ZN#U>75-s]a8bS}ʤtKèyZycL4|!WviXM>%[+ڬsUmsۅat@n`3/__"WptKCBX 㯗>8?h5ܗa8 7z߀Fp-8a[:v4#fv#άSh: 8`d$}l]} :Kűo G`6htTiq8Z<X)~ nfïO0:ʈ3%/ߕ7f74@sBDcRlpD3ja,Q^qU"~9^Ta4-r_MƑOǸɗQ_S:lfxbLQU@? ^￸?UX_}*QO2N!Sʤ=ˊsr'L|E$ mXll}j0͵`һ `K{kC3xyh݇帆OE^T5 ȱ.'/׹pMEZxW#tÕ=g{}Cvop"<Pp^0\"ڈ'Xjk|57wU@1>dA0[#Nh|z6Kl^>Eq G9ڽ/ QEv?xd>ds!$600/Wu =y `\ Rj:E_6޸oQ6BT]}ϤZ`,Ɇ:3WWX+4"^*^A90;K‰< .B\q'Abxi]F`Y ^:+xZl"/Zx5u`V(ރ?gnquѷCpWϺ ҋ7[m"\Av-,Ǡ9L}t>&(4$^|7ͼ <6Jςr 0imzay(M T&YOtLr9\ G_{5CkXjtx݇aXH\s Z|^>y=Q`_i4NVt^.DAT-7 hnt^ϋBp- nLDIR2xXvN>uf&8r 1Xi85x`R"Y(r6Eu 8 B[7͵H/ű/;8t>^{v@IDAT!h&> :b>|oq<(r}zB4%2S܁`r4TMpɍhf_|i_->ȿh\9o]`6(*LAV0ċ X V, MJjq+DY/OOsBҧF!yN๚\S%h;.¢nrҨ!p?ldUK*yO2ZmEY{H4zEZk.`aya:0Q9=8"D%5^a8sSHDh3zaC(G‡kfSMD7C֤ cnK Uȴx6G!Lt$1oCkC\b-ڳҨ ڱnZ ,Se~[b?lNA|֘sW[_,Gg66T@ T5E`_=rր}Mč*NxZ:#yiYWW٘6Ra>a?&Bb[nym?%k㷭 3Oјhz A"9 >dTkq72[+5U#8T|g!؁ǂLץC)$\Ցmp8 Iȳ#[` TvEAèWK_M}r/jxcu򺴬guW(]>mc< > #˛6=p"$|tcipON# ȋUEV-[T1էY.-K2.MOI~1'Tkq~<D^4 w (Iźnp{ץߦ0=H8/V p0,c~[Ρ}({ c=H? #/lqPPg6](EG78M' #XJSQ8VxHkbu7,8犓B: ._}D9v*з`3/=T0zca(xF]|]`|eH-øf`{V`45$E>s&R%Id=@Wt=ZuyZ ^O OclDwo,ՠV W/fQ_j8taIw~[۷|z\ ߁׾[M7!,:/a*?mxJض#!Cwd,~LM/?qb$=Z)]sݤ7K'ɲk 89ϵo>ݕRlX& x- Хm+iw=xރ'ڤ|:Z߻Cx *xVݓ* `;G4?<Бɪ~rHۿ{'N ZGȋ4YiO&DU7}#cR1t3 %봑@vmcCEbnpI;0Plm?4QS<qL @xm\փZU5<>ކ8I2n m:˗0J-r=$.''$х̸?`^ !x"+h8| Tj/D %Ks)~px C_6x'7-c܏=fE&Kv}uXS8iu{FEM_/'M/A q9y /±^޴aArspDEe>\<< x"٭p.x|FpB[T}㮩:h=SzOTs;\Z0F)ieBs$.x|0.`+@ Dhj@ZX'xziq}`,>c<-๊6)#ZX)'M>ŝOF%0?,OO)QjN7^,&UBǯ}Ӗn.pB|1ɵų<t~@ƑXl B4/%uDy G|U!OBa].mϹM%cC ^h%҈.:SC: (*x'kCP_\tav:ZV6r=9[VO@k/NtB^UD;tuƊ>>6VA-Gt- ÷ iuu0#藚"fFeMo_-EQ\Zz4S> /oy߸'>D\?8\ѿ{x6UyKpD]b6,v3K̰ҦZy/\#^eq~ .4F 5{·9zH۴0Ǣ_y a1c#ҚuI_`V|؟h}Й9R;j$34~a}{9hIH q?ジ&ZfEq/D?| ZҚ@;̰b}LIV=z11?LFu6"]OeKĻ`ay~Ȏs1F1ɪݸR-}~siO/>n{bD3~ +/E }~FfE#kwO>1Kk$6myu/7㈛x#KGI϶xbxxXSoxQYN1]mn8e/`n1DLܓ-چ:Nη=Dgy֔&x&9p,r2ƥ: O#DROPo}x~<>#~h/h)9zĹ  tgGH8з@]Nt5=MT$خ(^}<&0>5 >y@Hmn"n53WW~>/m/ kyWGwϾr>U"ZUlH&_K"mN+ M7y,HkiS[ybMbUŢ["\3 + =j 􃡰t_jсlWz> O)}b??'&Zh#, Ng]_՜`0)d&v/ [6eG8k?_=g(~?+#8^E~L>:ieBCoX,,oSXB9PzS"aIQWMZ'G^FZ(߻X7jZ=".ϩ@;4@ qIJrF 1L]u_Fx:hn K=/nS\(ØKi؇8΁mAm49:NץQY ~ż }3= É4,]?&gB~hX_?0诚b'Ğ/? `1#+`M?j+X"]CӸi:L{G_{P _lFC4N!6r?B:4o WKNjF,}`0=J:N7y>BTD:nB~ooßC% рqH8P8p8oaSЮA5v8|%_r&{`hmE')/||#q'n[` rYqg- ֏K`XE,.tJ"ja Ѭlt0-g/cZ\C_+^ߒַETM"}t6" u14X{Phh-"o8tpfS@awBDR]egN7&Ii[0Ŀ8ߴGHva~^o^i`;ShD{YK#^H[B[=t86hmqKb]_{gWQ= Boҕ*R (RA齄{H .**]A*nYfov~ߛ33gh\5[cW3_6=R[Df4Y.h$iPJs46mWq4`kjτӡl"67zU;E{-Re^@`ǀ6ŵp|֥hgihݔ/`٣aGkA7|}–Gym8bD)'});xHw/?FDB6f]9FS)ei7_ !Q6B+4؆䀍 8B~&{-u c4nII~= BRr95CztR_`zHLG|Ch3'/%GK&V\BXÏϓ.7?CCN[qSw=zVvb;8 h_\;QǶT"/Bܰ?$6*^֏xi{~0Խ}wv}X coD4Mph t.vs~*嶼?pHid>bӵJikEN[FՎ] n,>dTiYKDzfTi2՗@N7N'TNoToh hM8ɮN؈Gς=xP/͒i(8*MV{-򌐎OH j~.SA]^څP}/z/1 ,rufx= JpSeUs8=:OhʛE7cבvjO:Jǜ8Nd k'r3mئsx?4MWuuOB¦F_%_=#/ʓԙfy%D0F4cp1xH|n$^"qIe 훦DrڹD{urN2^ב3MP`R1C$THH#4ݸԍhkzQVg·xB7x9kR~t'Pm,A8\Ls'D9x{SYJI6 '!w.r9l >goQW) Ђq-:pv:ڟ[{5\GCNξaB7euLM^snhww7V(d&aiT)zQ{DveS:"LUW,/y8P$<7)Y%׃蠸Yyak]O~fj;o\4k? +hhk(ٯ!6r'M /ؾRO\G^嶣j|2*L'*Q.iE߅A@vܖuj3Oׁ2Wrj;КL ,߳F]޾odYtTo''pӡ=ZԛYQ֘X5 4YJp>h܋%<&yC~Ju_?ꍭpkC|PݠMioOp pyp s9_4g6&(\'N}ql.$"0MsNƴx*!b=svm?"LmZzycfGh&x.\ SW)ng~S ;".=-S~,򑟦;O_M nD\.@Ҷ:}·a}6.M4M(8 yR4)i7b$sYh8~q/IR@بr`zGo_W#~i#ֆJ.WWd6:=hFulI*&G6*2 :z_w#  '}%/+u߸tvD}Vj3Mr-koeI*$hǰZi^\bx1x0S0* f X X.KxMSp-!QGU۾_ZRduƀNqnׂcMrVPPG:e}!.~w $ؒ:\LeΠWStmmྀ~.~ݾDF=6=s\̴o-76[\6c+CA' Q\mVaj2;ca] ~GSMC{O'K{"$ CjriG^=Pڼl~wRnfiqyȢB!7*4Gz_om?KKkZ~妅zY>'{K8F7^l8mTo- t.oGކ9f\v\cˋY26Af|uu#gW@؝LLv%綶K0+ f}w8׻o0Cu톸, ?)Muxѱikrk]')EHRTJ$bʒXSZ7qtju,T3- &D; Oʼn-\*$u,$naGq'4nU DHRii~],Z'ExڋJZ=` wMű96/7Sn׭h6AA1TSJrW~;UX#b.8nk[!ѵҍ4IY5p6-_7=%V mv*BTv>Q~ wUmkc3?wv97oYO?9ˮ-@D^7-#LL8tȏRZF~w:Ჳ4SdIKՖiyw17!6r~+5`G Cɯ"j<nK8.A\v .շf{N6|)6!"r\Y;Mphu!} `]x+B`}E7,.][,li77qF2$wl4H|qO]u2Q$OKq+דq}%Pp'"0hN dHJJiFgC$_ *#MOg]=Rzƕ~{JNIU;Y](iEq3?3~ KCHlx_ſ+/F b\W`~>0+Zv0. 8KdL".xK\iӴnpj6=PkTO0x{V=`Vx az[`煷v]æ3M`5Q'NGP\u# {Fۏ*'kѾ `rP*5:u+hmduH]Jqg}abT.^+QVEWGju゚N'@$鳪þw4h}1\Ѵ\a Ǟ>NA7%O}69STEgXlHwN  0tk7{נ>6l{-nེkNl []ц,\՛O_rmP|v#-r42$uU딯zl-"@hey! sGHRiMԖyhuRG%>Ir~pԉ, g@8`(8tMaS;z[@G*6<{6 Ҟǀ po5W]Y*kc;\ tC7VZt D8=-z-~ iSG.sŸ@[ГTo^A~Y&\vp̋}#-kz`3Ӕ4:=E=}:oV&Tk.yݕK˖8:} $> JHzc@ndwo'V.y^+*+0^o#-X iN|hh9vp||uN%Qh{lv;+e]؏qʹXhM5I m0 .Mq~_;ESZm07z6~BrUǰ3}4mXֵxکj}:R$FX..f`FPʒ%/-W&ɸ"Ћt_41ȮħBBQ6(aߡ/?4ΕErgbs-ˤ]^Zquc8fS耐_qn3D9 t6CuAG::[OIcu>Q"O-` 'j‘zd,iSt aI`>v-U- Rqwky>hĎ}:+B3~6)=< :c3ph#;omzS/$WJ+Qkyཱུ3ڳj(aZδ)IoxF /J^ TO{خ{}xSϢQGA[kݿcW,!MrH\=\}I"ƕWqG- {tW P*jXbiGymYN4^)7Qt#vR:[T6za YC*q=\N޾)៰]cAc>/8W-EXEg[p<ca_x aRGu~[ne(;ÉRaαq?r T4E'f^3I7| :ЛwsBY\O?۽b_ ZW;נ2h3~hu΅M~< wfS9Xg{W|Vk`YPJܫT \F ` Tζ`gV%TRi7T+c-ZIDS dz_kIX޷?Bx [g8Cr{^ ^/ aр+n#@ yx/Aܗhbs9mG19Ŷ;$ .pj|~] oCnk7 C@390\ޮgaap^ 뙡'ѹwW[ cCp٣h/)|>cyh`!8v@@>KV"LTJK+:եw: F+wT AL06Г؉Sp|OKֽғlt2 cEͤ:M}=|] pb\H:G~-Qp 8Z{k.Yp/2c /d2"i] Lľ=ss1/J`GE ~>&n>I!.iچRn1Uijo, jRzZFozFޝX_FO;>߂aS"ڿATO{Ns>k,̓?LĤ,T+M4]JLSF0?n-:i\=d >ӊ+6b ux+5@WARvOیhצp4X496Y SqAnMÁEE'\([j^S &čV'onpq ;zѹ~7mL q'eRPABtıqL4>h k'px۸_hrloww#Œ=_[k X*Kp3h ΂&v|=dKH.ĵqCT1Ί jطk vePݙkm6?˦5=^yZ r4'⠃TGi(xgiܛDE&r<nSu/v*^SA(ظM'Rl .4Jڏ&Q9Q,cz&2g *H pZQgw q<6&DJ:c҈S[fCos79a9Nh;/D'zps^ D{q ڟ͡_TQ㚷O*qMkWGN0WⰡԝ6zPԣ6Z&0KQ4+aAXB2i|~xw>6AQ J9&==O8QAD I#zv</*۾ 4nRLSՉldNes^F5w'aPw 2=Š8-Synq{bLD`5Xq_Qp28[nQFqw}X#S6UTҀS=K}u>LƅE`N.gLSi=is~&"anP::&Sf!xVȴ[̮Ai`ٵa+;:| [)bI3#0m&x!-Ok݁SC➀U -^ PCD[^K<-kh; cJ#)(}hf=hhNk.eGJD4}zܐw3h8<>? /D4=_*ᯌaFtdUYQ35j ;5*\;:昼p=o4߅J=e#gT

ړ>)ZoSA{9D}LEC7ώ|Lj\*zx:hi,ݵMv!Qߋi~Z^4OIGpwp@h'q a }..D]րЉ}PWc>9s }lI{_ av 4=vͿZoky \~{{YtxZ/0l ҵt7;mBoE0h|*9f}G-谬 E:$kv]=s׎bO ѩ:,5.quF><FSj6!yK\}$z\#>ht J\$3`Ѻ㵶*C$@xRnVz^N~ `ػ!93BbUӘ 7Xzн/p.R\0]m{%6 [yvs^aS}J +k2.Cbr=ظq)h~~ ~j}y{*C+ :Ym`6‘pBz8U/tvHϸO=*!:!I]4z)߂PRN4rN7W"xZh#M)n o`䰯sɠ91 D#IDAT7+#@g:p m3s\((^o[|f!N,׀,K5>qZv!`(q;kP]np_]:Ƶ94h; mm6U҉A<ފzt0P/cUxs̐#C"$/ŵaJq45ǭDhzOq@/HŅG$q}6%W{J|:?s++7 @/tbSQ#agfĸbL}3VN,]&ͳ-O.΂aQ5hk$װnni7+Q{O+,G$L؈x8n\D223:2Wå ?&~_7\|F9"nu;l4B"͋Gh|80*)i=ۨeT$p#pMOSIHq:馃v|!G<ɦ%mERNCOYa8<ڬfRVY٬v@,n409K#K1:wHAmk-X܈mvrSaEvk7@;m؟T\'`o`{} 9+%P>ڠ^ّ7s=D< >XxfX& D|f)?mc..WIRm5k^%'b<N>ZmDQ}.V9jL+.j:JF߂訹z#;Ѿog9nR`Mdzt-=\\(8fӷ` Ov0_<ۏmXvy͔4poFy^a6s+j}Er!tq9 'FC:󺋛DJqV;w(SBڶinnxۀw0nX $- J#c4LVCe97h jKD΄f$x+L->|0!7򌧰Co@##Ɠkǵ%mFDbK'V9ŕ!Dn?[%ҰVݠvs 7` p0"L" sn8^Zδztap81|#ZQdOJ8PBF<[(7-,Di/QRNod%tSȟFHOun,S%M4M9KO \.tJv˥^":fxG۾BHai?w=u%.|doqx[5Xӿ)&YYaA5 \{Qݿ7U~GC-{%kK0'Xƾ5ClKwlھZkmz }*XSf*Q:ð?!+xG<4Z<-'o)PJZ>RB&wiusG\}H1p .=Q'v3WW%7>z <z~0, .g v#bfg5*o7~\TWR=3YZ'k7pCbP׆Yi7k"> CxKb|o`oh؎Ϲh!8m>=)Rni0;lz__F/-$ B#a{O˺b*-MA9_ Bi⛔gz}cd[NFS}g8J#R/&p-=ɤeNG'!Qg0i5)@=Sz;H| {{0,~9$ȳ9GYMhI W/AqgBNh⢸݌Q&pTZ$,Qp8\׊?ZHԀ65Ҁ}V[˟ָ'=vVm2\8x2#B)3q폖ֳmChDt<߲oUYYR)*NR MVlkxUHX࢝I*&yn츐Tq^Q˂_憽Pp"8s}K]7UOr,mV?Y>Gpd@ؾk__b/xǐ{M"W+N <0 ApYX߷}g×`fOA` sDW\(3aS#ڣ'0U-6g7VU2KWْsM*%D;bfgSѻi.*n6F~n:-~M3 4_U΍d.n,wu cavl XyyHg:Y0GhtmWڋ\ee ѵ)A`aM9@p/םh#Eq/Gs03?x@*(g_Uƕ7؟ A7w5Z֋2܂Tmv9kH(aTDuWg+psOŇ> |m=% }!q2M^}u :18Sq̶Nx%@rKY X,;퓛Ҍno)rM7 |mo-u ^0zxgr&X#q5&r{W`4x([?>]gC݉mS=] y2:ʿ_Yz5*ټ4Q *r";H''\ CwIvbˉ:||Zd2 oЩWlxǦ'.*hT/&n)+W7]:T̪Ө>LsO9@)9} l泰Oc~=/xHE n Op2MgX\ _?u뾥[Y;E%[9+A3Vzuaidcr, q(7O;:[Q׹`nZv0pt|l7&zS u l8InU/-hCdsпC.f9Dn.#Sp%. !u(I|<˘:St\iʶ5;,09;Zq`o7 ;nځ`% KꑿSIgFl"ڰv>?,' 芯 <*ɞ°CG^,Zt\@*J"M(p*; $ʝ΄z'Z8 :6A'4p9a3~LInp8߈l BfRأ5Y& t7]'Ǜcz$S9zqoX<Έԋ Axm0 R'9ж|`BhOft`.q>WnH vBZ_8 ،>81tr.:t:#NQ199zƻ((O#I-A]ڢç~4`57= <]RkŽ~Vl ]K]( :0W\=6xN]ݒlbpDլogg~}Ox"T92(*&(ZaϦbN 7?C}VEL+/l~'sO1: mT-g of.D{}BOu(Ұݿru%=AJޕ'Ue0'k ChJ/YmAnfy5 ݧ$pͯ^pvV9_G_5q%ZQPJ=I=u-d@5KlόF?< q7C\vR@[|ޅjb¬{ehзadKMxvgrK۽\]}?ϡnIv9Ӥ꿡M_/-S}6ONn.[.x+0O}).>XZ, \H{`>/FQRwe@ 1yp7?q؛WK[q ކj0W? K4?q:6x4U9k0(Z̀ç|6yӺM+~{Xbci";><:V7V:Ҫ7G/t[>LKLQׁ޷ Q&ToW»Dž+Pjdpd4Mx;mBH'xQG+o3aCORݏN'?{{H.[ JAqϚ3?'^FJ3_៟xyTq{;B :Pc#4Q+vwVin 0B~w(1;2gXh25B2j :<3p'nܰ7D;&<N]Lkw^7IngKmmVDD  8\k> 48M|u4)N^ GsaCǧبurrꍞ X'E74_03艿Q:t,Yhtu6#+ : 4tnYG%]Ƿ^SSn_x.wdcоF|6F 7|,䙜nW:C8)6"Dq7;hp2lVyɝPz,YU5Pﲪ`p5Qf\,nvp (Դ`Hۅۍofo@%'@;qX[2Md<GVʯ&twzr)j݇6-">`2Jp9sBW~)pJl=XW3k'Halc|e?+WC#>-< PDz(9^e6Mgkm"+(ِa~:.ز׶8- ڽeƍ<_'u Z)m[?z+:4."eܛ}۞OwFB442x5kbl;g6qmC^%#r?Yh`Aւt~/ swrtG=p#ÕZ6b,N~MTzErK䤞:1~盅+/ҮYj54~40;]ɯ7kWC?g!sG$ᣞIA;hF9#%k |JLNywMC\?ӺIZHK,ݕ A!)H9;>$z-ϧo\',K@htz7܁|ƤͰmݡm:# `'+D;8<),2he.,YMӀgͷb]P^gK8 =oy75c%kpreH5eg76>+qph=LOL^sr7]?{%950P4-:rr u҄VsY i ; oPU ?ӥK9Qt5iNg  u0x:?iZ8\+-w>k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k`jWIENDB`netgen-6.2.1804/README.md0000644000175000017500000000076513272137567013274 0ustar kurtkurtNetgen mesh generator NETGEN is an automatic 3d tetrahedral mesh generator. It accepts input from constructive solid geometry (CSG) or boundary representation (BRep) from STL file format. The connection to a geometry kernel allows the handling of IGES and STEP files. NETGEN contains modules for mesh optimization and hierarchical mesh refinement. Netgen 6.x supports scripting via a Python interface. Netgen is open source based on the LGPL license. It is available for Unix/Linux, Windows, and OSX.netgen-6.2.1804/cmake/0000755000175000017500000000000013272137567013065 5ustar kurtkurtnetgen-6.2.1804/cmake/cmake_uninstall.cmake.in0000644000175000017500000000201313272137567017641 0ustar kurtkurtif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") message(FATAL_ERROR "Cannot find install manifest: @CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files) string(REGEX REPLACE "\n" ";" files "${files}") foreach(file ${files}) message(STATUS "Uninstalling $ENV{DESTDIR}${file}") if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") exec_program( "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" OUTPUT_VARIABLE rm_out RETURN_VALUE rm_retval ) if(NOT "${rm_retval}" STREQUAL 0) message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}") endif(NOT "${rm_retval}" STREQUAL 0) else(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") message(STATUS "File $ENV{DESTDIR}${file} does not exist.") endif(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") endforeach(file) netgen-6.2.1804/cmake/external_projects/0000755000175000017500000000000013272137567016620 5ustar kurtkurtnetgen-6.2.1804/cmake/external_projects/zlib.cmake0000644000175000017500000000055413272137567020566 0ustar kurtkurtif(WIN32) ExternalProject_Add(project_win_zlib URL ${ZLIB_DOWNLOAD_URL_WIN} UPDATE_COMMAND "" # Disable update BUILD_IN_SOURCE 1 CONFIGURE_COMMAND "" BUILD_COMMAND "" INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory . ${CMAKE_INSTALL_PREFIX} LOG_DOWNLOAD 1 ) list(APPEND NETGEN_DEPENDENCIES project_win_zlib) endif(WIN32) netgen-6.2.1804/cmake/external_projects/tkdnd_macosx.patch0000644000175000017500000000227113272137567022321 0ustar kurtkurtdiff -Naur orig/tkdnd2.8/configure changed/tkdnd2.8/configure --- tkdnd2.8/configure 2015-05-13 19:24:32.000000000 +0200 +++ tkdnd2.8/configure 2016-02-22 15:26:37.000000000 +0100 @@ -6145,7 +6145,7 @@ - PKG_CFLAGS="$PKG_CFLAGS -DMAC_TK_COCOA -std=gnu99 -x objective-c -fobjc-gc" + PKG_CFLAGS="$PKG_CFLAGS -DMAC_TK_COCOA -std=gnu99 -x objective-c" diff -Naur orig/tkdnd2.8/configure.in changed/tkdnd2.8/configure.in --- tkdnd2.8/configure.in 2015-05-13 19:24:32.000000000 +0200 +++ tkdnd2.8/configure.in 2016-02-22 15:26:44.000000000 +0100 @@ -126,7 +126,7 @@ if test "${TEA_WINDOWINGSYSTEM}" = "aqua"; then TEA_ADD_SOURCES([macosx/macdnd.m]) - TEA_ADD_CFLAGS([-DMAC_TK_COCOA -std=gnu99 -x objective-c -fobjc-gc]) + TEA_ADD_CFLAGS([-DMAC_TK_COCOA -std=gnu99 -x objective-c]) TEA_ADD_LIBS([-framework Cocoa -framework Carbon]) fi diff -Naur orig/tkdnd2.8/macosx/macdnd.m changed/tkdnd2.8/macosx/macdnd.m --- tkdnd2.8/macosx/macdnd.m 2015-07-06 21:49:14.000000000 +0200 +++ tkdnd2.8/macosx/macdnd.m 2016-02-22 15:27:04.000000000 +0100 @@ -16,6 +16,7 @@ #import #import #import +#undef panic #import #import netgen-6.2.1804/cmake/external_projects/metis.cmake0000644000175000017500000000122513272137567020743 0ustar kurtkurtset(METIS_SRC_DIR ${CMAKE_CURRENT_BINARY_DIR}/dependencies/src/project_metis) set(METIS_DIR ${CMAKE_CURRENT_BINARY_DIR}/dependencies/metis) ExternalProject_Add(project_metis PREFIX ${CMAKE_CURRENT_BINARY_DIR}/dependencies URL "http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-5.1.0.tar.gz" URL_MD5 5465e67079419a69e0116de24fce58fe DOWNLOAD_DIR ${CMAKE_CURRENT_SOURCE_DIR}/external_dependencies CMAKE_ARGS -DGKLIB_PATH=${METIS_SRC_DIR}/GKlib -DCMAKE_INSTALL_PREFIX=${METIS_DIR} UPDATE_COMMAND "" # Disable update BUILD_IN_SOURCE 1 ) set_vars( NETGEN_CMAKE_ARGS METIS_DIR ) list(APPEND NETGEN_DEPENDENCIES project_metis) netgen-6.2.1804/cmake/external_projects/tcltk.cmake0000644000175000017500000001075113272137567020747 0ustar kurtkurtif(APPLE) # use system tcl/tk find_package(TCL 8.5 REQUIRED) # set(HOME $ENV{HOME}) # set(tcl_prefix ${CMAKE_INSTALL_PREFIX}/../../) # ExternalProject_Add(project_tcl # URL "http://sourceforge.net/projects/tcl/files/Tcl/8.6.4/tcl8.6.4-src.tar.gz" # URL_MD5 d7cbb91f1ded1919370a30edd1534304 # DOWNLOAD_DIR ${CMAKE_CURRENT_SOURCE_DIR}/external_dependencies # UPDATE_COMMAND "" # Disable update # CONFIGURE_COMMAND ../project_tcl/macosx/configure --enable-threads --enable-framework --prefix=${tcl_prefix} --libdir=${tcl_prefix}/Contents/Frameworks --bindir=${tcl_prefix}/Contents/Frameworks/Tcl.framework/bin # BUILD_COMMAND make -j4 binaries libraries # INSTALL_COMMAND make install-binaries install-headers install-libraries install-private-headers # LOG_DOWNLOAD 1 # LOG_BUILD 1 # LOG_CONFIGURE 1 # LOG_INSTALL 1 # ) # # ExternalProject_Add(project_tk # DEPENDS project_tcl # URL "http://sourceforge.net/projects/tcl/files/Tcl/8.6.4/tk8.6.4-src.tar.gz" # URL_MD5 261754d7dc2a582f00e35547777e1fea # DOWNLOAD_DIR ${CMAKE_CURRENT_SOURCE_DIR}/external_dependencies # UPDATE_COMMAND "" # Disable update # CONFIGURE_COMMAND ../project_tk/macosx/configure --enable-aqua=yes --enable-threads --enable-framework --prefix=${tcl_prefix} --libdir=${tcl_prefix}/Contents/Frameworks --bindir=${tcl_prefix}/Contents/Frameworks/Tcl.framework/bin --with-tcl=${tcl_prefix}/Contents/Frameworks/Tcl.framework # BUILD_COMMAND make -j4 binaries libraries # INSTALL_COMMAND make install-binaries install-headers install-libraries install-private-headers # LOG_DOWNLOAD 1 # LOG_BUILD 1 # LOG_CONFIGURE 1 # LOG_INSTALL 1 # ) # # ExternalProject_Add(project_tkdnd # URL "https://sourceforge.net/projects/tkdnd/files/OS%20X%20Binaries/TkDND%202.8/tkdnd2.8-OSX-MountainLion.tar.gz" # URL_MD5 2dbb471b1d66c5f391f3c3c5b71548fb # DOWNLOAD_DIR ${CMAKE_CURRENT_SOURCE_DIR}/external_dependencies # BUILD_IN_SOURCE 1 # CONFIGURE_COMMAND "" # BUILD_COMMAND "" # INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory . ${CMAKE_INSTALL_PREFIX}/../MacOS # LOG_DOWNLOAD 1 # LOG_CONFIGURE 1 # LOG_BUILD 1 # LOG_INSTALL 1 # ) # # list(APPEND NETGEN_DEPENDENCIES project_tcl project_tk project_tkdnd) # list(APPEND CMAKE_PREFIX_PATH ${CMAKE_INSTALL_PREFIX}../Frameworks) # set(TCL_INCLUDE_PATH ${CMAKE_INSTALL_PREFIX}/../Frameworks/Tcl.framework/Headers) # set(TCL_LIBRARY ${CMAKE_INSTALL_PREFIX}/../Frameworks/Tcl.framework) # set(TK_LIBRARY ${CMAKE_INSTALL_PREFIX}/../Frameworks/Tk.framework) # set(TK_INCLUDE_PATH ${CMAKE_INSTALL_PREFIX}/../Frameworks/Tk.framework/Headers) # ExternalProject_Add(project_tkdnd URL "http://sourceforge.net/projects/tkdnd/files/TkDND/TkDND%202.8/tkdnd2.8-src.tar.gz" URL_MD5 a6d47a996ea957416469b12965d4db91 DOWNLOAD_DIR ${CMAKE_CURRENT_SOURCE_DIR}/external_dependencies PATCH_COMMAND patch -p1 < ${CMAKE_CURRENT_LIST_DIR}/tkdnd_macosx.patch UPDATE_COMMAND "" # Disable update BUILD_IN_SOURCE 1 CONFIGURE_COMMAND ./configure --prefix=${CMAKE_INSTALL_PREFIX}/Contents/MacOS --libdir=${CMAKE_INSTALL_PREFIX}/Contents/MacOS BUILD_COMMAND make INSTALL_COMMAND make install LOG_DOWNLOAD 1 LOG_CONFIGURE 1 LOG_BUILD 1 LOG_INSTALL 1 ) list(APPEND NETGEN_DEPENDENCIES project_tkdnd) elseif(WIN32) ExternalProject_Add(project_win_tcltk URL ${TCLTK_DOWNLOAD_URL_WIN} UPDATE_COMMAND "" # Disable update BUILD_IN_SOURCE 1 CONFIGURE_COMMAND "" BUILD_COMMAND "" INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory . ${CMAKE_INSTALL_PREFIX} LOG_DOWNLOAD 1 ) set (TK_INCLUDE_PATH ${CMAKE_INSTALL_PREFIX}/include) set (TCL_INCLUDE_PATH ${CMAKE_INSTALL_PREFIX}/include) set (TCL_LIBRARY ${CMAKE_INSTALL_PREFIX}/lib/tcl86t.lib) set (TK_LIBRARY ${CMAKE_INSTALL_PREFIX}/lib/tk86t.lib) list(APPEND NETGEN_DEPENDENCIES project_win_tcltk) else(WIN32) find_package(TCL 8.5 REQUIRED) # ExternalProject_Add(project_tkdnd # GIT_REPOSITORY https://github.com/petasis/tkdnd.git # GIT_TAG d7cfd96087b248255da5349086ef70cc4bbfb619 # PREFIX ${CMAKE_CURRENT_BINARY_DIR}/tkdnd # CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}/lib # UPDATE_COMMAND "" # LOG_DOWNLOAD 1 # LOG_BUILD 1 # LOG_INSTALL 1 # ) # list(APPEND NETGEN_DEPENDENCIES project_tkdnd) endif(APPLE) # Propagate settings to Netgen subproject set_vars(NETGEN_CMAKE_ARGS TCL_INCLUDE_PATH TCL_LIBRARY TK_LIBRARY TK_INCLUDE_PATH TCL_TCLSH TK_WISH) netgen-6.2.1804/cmake/tk_macosx.patch0000644000175000017500000000567413272137567016112 0ustar kurtkurtdiff --git a/macosx/GNUmakefile b/macosx/GNUmakefile index 02240ed..aac1d4c 100644 --- a/macosx/GNUmakefile +++ b/macosx/GNUmakefile @@ -133,9 +133,7 @@ override EMBEDDED_BUILD := endif INSTALL_TARGETS = install-binaries install-libraries -ifeq (${EMBEDDED_BUILD},) INSTALL_TARGETS += install-private-headers install-headers install-demos -endif ifeq (${INSTALL_BUILD}_${EMBEDDED_BUILD}_${BUILD_STYLE},1__Deployment) INSTALL_TARGETS += html-tk ifneq (${INSTALL_MANPAGES},) @@ -253,43 +251,6 @@ ifeq (${BUILD_STYLE}_${EMBEDDED_BUILD},Development_) @cd "${INSTALL_ROOT}${LIBDIR}/${PRODUCT_NAME}.framework/Versions/${VERSION}" && \ ln -f "${PRODUCT_NAME}" "${PRODUCT_NAME}_debug" endif -ifeq (${TK_X11},) -ifeq (${EMBEDDED_BUILD},) -# install Wish.app link in APPLICATION_INSTALL_PATH and setup 'Wish Shell' compatibility links - @cd "${TOP_DIR}" && if [ -n "${APP_DIR}" ]; then mkdir -p "./${APP_DIR}" && rm -rf "./${APP_DIR}/Wish.app" && \ - ln -fsh "./$$(echo "${APP_DIR}" | sed -e 's#/[^/][^/]*#/..#g')/${FMWK_DIR}/${PRODUCT_NAME}.framework/Resources/Wish.app" "./${APP_DIR}" && \ - ln -fsh Wish.app "./${APP_DIR}/Wish Shell.app"; fi && \ - ln -fsh Wish.app "./${TK_FMWK_DIR}/Resources/Wish Shell.app" && \ - ln -fsh Wish "./${TK_FMWK_DIR}/Resources/Wish.app/Contents/MacOS/Wish Shell" -else -# if we are embedding frameworks, move them into the app and fix their install names - @cd "${TOP_DIR}" && \ - rm -rf "./${APP_DIR}/Wish.app" && mkdir -p "./${APP_DIR}" && \ - mv -f "./${TK_FMWK_DIR}/Resources/Wish.app" "./${APP_DIR}" && \ - ln -fsh Wish.app "./${APP_DIR}/Wish Shell.app" && \ - rm -rf "./${APP_DIR}/Wish.app/Contents/Frameworks" && \ - mkdir -p "./${APP_DIR}/Wish.app/Contents/Frameworks" && \ - ${CPPROG} -RH "./${FMWK_DIR}"/T{cl,k}.framework "./${APP_DIR}/Wish.app/Contents/Frameworks" && \ - cd "./${APP_DIR}/Wish.app/Contents" && \ - rm -rf Frameworks/Tcl.framework/{,/Versions/${TCL_VERSION}}/{Headers,PrivateHeaders,*_debug,lib*.a,*Config.sh} && \ - rm -rf Frameworks/Tk.framework/{,/Versions/${VERSION}}/{Headers,PrivateHeaders,*_debug,lib*.a,*Config.sh} && \ - fix_install_id ( ) { \ - chmod -RH a+w "$$1"; \ - install_name_tool -id $$(otool -L "$$1" | awk "/$$2\.framework.*[^:]\$$/ {sub(\"^.*/Frameworks\",\"@executable_path/../Frameworks\",\$$1); print \$$1}") "$$1"; \ - chmod -RH a-w "$$1"; \ - } && \ - fix_install_name ( ) { \ - chmod -RH a+w "$$1"; \ - install_name_tool -change $$(otool -L "$$1" | awk "/$$2\.framework.*[^:]\$$/ {print \$$1; sub(\"^.*/Frameworks\",\"@executable_path/../Frameworks\",\$$1); print \$$1}") "$$1"; \ - chmod -RH a-w "$$1"; \ - } && \ - fix_install_id Frameworks/Tcl.framework/Tcl Tcl && fix_install_id Frameworks/Tk.framework/Tk Tk && \ - fix_install_name MacOS/Wish Tcl && fix_install_name MacOS/Wish Tk -ifeq (${INSTALL_BUILD},1) - @cd "${TOP_DIR}" && rm -rf "./${FMWK_DIR}"/T{cl,k}.framework && rmdir -p "./${FMWK_DIR}" 2>&- || true -endif -endif -endif clean-${PROJECT}: %-${PROJECT}: ${DO_MAKE} netgen-6.2.1804/cmake/netgen_fixup.cmake0000644000175000017500000000275213272137567016570 0ustar kurtkurtinclude(BundleUtilities) function(netgen_fixup_bundle app libs dirs) message(STATUS "fixup_bundle") message(STATUS " app='${app}'") message(STATUS " libs='${libs}'") message(STATUS " dirs='${dirs}'") get_bundle_and_executable("${app}" bundle executable valid) if(valid) get_filename_component(exepath "${executable}" PATH) message(STATUS "fixup_bundle: preparing...") get_bundle_keys("${app}" "${libs}" "${dirs}" keys) message(STATUS "fixup_bundle: copying...") list(LENGTH keys n) math(EXPR n ${n}*2) set(i 0) foreach(key ${keys}) math(EXPR i ${i}+1) if(${${key}_COPYFLAG}) set(item "${${key}_ITEM}") if(item MATCHES "[^/]+\\.framework/") copy_resolved_framework_into_bundle("${${key}_RESOLVED_ITEM}" "${${key}_RESOLVED_EMBEDDED_ITEM}") else() copy_resolved_item_into_bundle("${${key}_RESOLVED_ITEM}" "${${key}_RESOLVED_EMBEDDED_ITEM}") endif() endif() endforeach() message(STATUS "fixup_bundle: fixing...") foreach(key ${keys}) math(EXPR i ${i}+1) message(STATUS "${i}/${n}: fixing up '${${key}_RESOLVED_EMBEDDED_ITEM}'") fixup_bundle_item("${${key}_RESOLVED_EMBEDDED_ITEM}" "${exepath}" "${dirs}") endforeach() message(STATUS "fixup_bundle: cleaning up...") clear_bundle_keys(keys) else() message(SEND_ERROR "error: fixup_bundle: not a valid bundle") endif() message(STATUS "fixup_bundle: done") endfunction() netgen-6.2.1804/cmake/NetgenConfig.cmake.in0000644000175000017500000000564413272137567017053 0ustar kurtkurtset(NETGEN_VERSION "@NETGEN_VERSION@") get_filename_component(NETGEN_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) get_filename_component(NETGEN_DIR "${NETGEN_CMAKE_DIR}/@NETGEN_DIR@" ABSOLUTE) set(NETGEN_COMPILE_DEFINITIONS "@NETGEN_COMPILE_DEFINITIONS@") get_filename_component(NETGEN_INCLUDE_DIR "${NETGEN_CMAKE_DIR}/@NETGEN_INCLUDE_DIR@" ABSOLUTE) get_filename_component(NETGEN_BINARY_DIR "${NETGEN_CMAKE_DIR}/@NETGEN_BINARY_DIR@" ABSOLUTE) get_filename_component(NETGEN_LIBRARY_DIR "${NETGEN_CMAKE_DIR}/@NETGEN_LIBRARY_DIR@" ABSOLUTE) get_filename_component(NETGEN_PYTHON_DIR "${NETGEN_CMAKE_DIR}/@NETGEN_PYTHON_DIR@" ABSOLUTE) get_filename_component(NETGEN_RESOURCE_DIR "${NETGEN_CMAKE_DIR}/@NETGEN_RESOURCE_DIR@" ABSOLUTE) set(NETGEN_SOURCE_DIR "@PROJECT_SOURCE_DIR@") set(NETGEN_INCLUDE_DIRS "${NETGEN_INCLUDE_DIR}/include;${NETGEN_INCLUDE_DIR}") set(NETGEN_CMAKE_THREAD_LIBS_INIT "@CMAKE_THREAD_LIBS_INIT@") set(NETGEN_FFMPEG_LIBRARIES "@FFMPEG_LIBRARIES@") set(NETGEN_JPEG_INCLUDE_DIR "@JPEG_INCLUDE_DIR@") set(NETGEN_JPEG_LIBRARIES "@JPEG_LIBRARIES@") set(NETGEN_LIBTOGL "@LIBTOGL@") set(NETGEN_METIS_INCLUDE_DIR "@METIS_INCLUDE_DIR@") set(NETGEN_METIS_LIBRARY "@METIS_LIBRARY@") set(NETGEN_MKL_LIBRARIES "@MKL_LIBRARIES@") set(NETGEN_MPI_CXX_INCLUDE_PATH "@MPI_CXX_INCLUDE_PATH@") set(NETGEN_MPI_CXX_LIBRARIES "@MPI_CXX_LIBRARIES@") set(NETGEN_OCC_INCLUDE_DIR "@OCC_INCLUDE_DIR@") set(NETGEN_OCC_LIBRARIES_BIN "@OCC_LIBRARIES_BIN@") set(NETGEN_OCC_LIBRARIES "@OCC_LIBRARIES@") set(NETGEN_OCC_LIBRARY_DIR "@OCC_LIBRARY_DIR@") set(NETGEN_OPENGL_LIBRARIES "@OPENGL_LIBRARIES@") set(NETGEN_PYTHON_EXECUTABLE "@PYTHON_EXECUTABLE@") set(NETGEN_PYTHON_INCLUDE_DIRS "@PYTHON_INCLUDE_DIRS@") set(NETGEN_PYTHON_LIBRARIES "@PYTHON_LIBRARIES@") set(NETGEN_TCL_INCLUDE_PATH "@TCL_INCLUDE_PATH@") set(NETGEN_TCL_LIBRARY "@TCL_LIBRARY@") set(NETGEN_TK_DND_LIBRARY "@TK_DND_LIBRARY@") set(NETGEN_TK_INCLUDE_PATH "@TK_INCLUDE_PATH@") set(NETGEN_TK_LIBRARY "@TK_LIBRARY@") set(NETGEN_X11_X11_LIB "@X11_X11_LIB@") set(NETGEN_X11_Xmu_LIB "@X11_Xmu_LIB@") set(NETGEN_ZLIB_INCLUDE_DIRS "@ZLIB_INCLUDE_DIRS@") set(NETGEN_ZLIB_LIBRARIES "@ZLIB_LIBRARIES@") set(NETGEN_USE_GUI @USE_GUI@) set(NETGEN_USE_PYTHON @USE_PYTHON@) set(NETGEN_USE_MPI @USE_MPI@) set(NETGEN_USE_OCC @USE_OCC@) set(NETGEN_USE_JPEG @USE_JPEG@) set(NETGEN_USE_MPEG @USE_MPEG@) set(NETGEN_INTEL_MIC @INTEL_MIC@) set(NETGEN_INSTALL_PROFILES @INSTALL_PROFILES@) set(NETGEN_USE_CCACHE @USE_CCACHE@) set(NETGEN_PYTHON_RPATH "@NETGEN_PYTHON_RPATH@") set(NETGEN_RPATH_TOKEN "@NG_RPATH_TOKEN@") set(NETGEN_INSTALL_DIR_PYTHON @NG_INSTALL_DIR_PYTHON@) set(NETGEN_INSTALL_DIR_BIN @NG_INSTALL_DIR_BIN@) set(NETGEN_INSTALL_DIR_LIB @NG_INSTALL_DIR_LIB@) set(NETGEN_INSTALL_DIR_INCLUDE @NG_INSTALL_DIR_INCLUDE@) set(NETGEN_INSTALL_DIR_CMAKE @NG_INSTALL_DIR_CMAKE@) set(NETGEN_INSTALL_DIR_RES @NG_INSTALL_DIR_RES@) include(${CMAKE_CURRENT_LIST_DIR}/netgen-targets.cmake) message(STATUS "Found Netgen: ${CMAKE_CURRENT_LIST_DIR}") netgen-6.2.1804/cmake/mic.cmake0000644000175000017500000000072013272137567014636 0ustar kurtkurtset(CMAKE_SYSTEM_NAME Linux) set(CMAKE_SYSTEM_PROCESSOR k1om) set(CMAKE_SYSTEM_VERSION 1) # specify the cross compiler set(CMAKE_C_COMPILER icc) set(CMAKE_CXX_COMPILER icpc) set(MPI_C_COMPILER mpiicc) set(_CMAKE_TOOLCHAIN_PREFIX x86_64-k1om-linux-) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmic") set(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -limf -lsvml -lirng -lintlc") # where is the target environment set(CMAKE_FIND_ROOT_PATH /usr/linux-k1om-4.7) netgen-6.2.1804/cmake/SuperBuild.cmake0000644000175000017500000001615313272137567016153 0ustar kurtkurtinclude (ExternalProject) set_property (DIRECTORY PROPERTY EP_PREFIX dependencies) set (NETGEN_DEPENDENCIES) set (LAPACK_DEPENDENCIES) set (NETGEN_CMAKE_ARGS "" CACHE INTERNAL "") macro(set_vars VAR_OUT) foreach(varname ${ARGN}) if(NOT "${${varname}}" STREQUAL "") string(REPLACE ";" "$" varvalue "${${varname}}" ) set(${VAR_OUT} ${${VAR_OUT}};-D${varname}=${varvalue} CACHE INTERNAL "") endif() endforeach() endmacro() ####################################################################### if(WIN32) set (DEPS_DOWNLOAD_URL "https://github.com/NGSolve/ngsolve_dependencies/releases/download/v1.0.0" CACHE STRING INTERNAL) set (OCC_DOWNLOAD_URL_WIN "${DEPS_DOWNLOAD_URL}/occ_win64.zip" CACHE STRING INTERNAL) set (TCLTK_DOWNLOAD_URL_WIN "${DEPS_DOWNLOAD_URL}/tcltk_win64.zip" CACHE STRING INTERNAL) set (ZLIB_DOWNLOAD_URL_WIN "${DEPS_DOWNLOAD_URL}/zlib_win64.zip" CACHE STRING INTERNAL) if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "Intel") string(REGEX REPLACE "/W[0-4]" "/W0" CMAKE_CXX_FLAGS_NEW ${CMAKE_CXX_FLAGS}) set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS_NEW} CACHE STRING "compile flags" FORCE) string(REGEX REPLACE "/W[0-4]" "/W0" CMAKE_CXX_FLAGS_NEW ${CMAKE_CXX_FLAGS_RELEASE}) set(CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_NEW} CACHE STRING "compile flags" FORCE) string(REGEX REPLACE "/W[0-4]" "/W0" CMAKE_SHARED_LINKER_FLAGS_NEW ${CMAKE_SHARED_LINKER_FLAGS}) set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS_NEW} /IGNORE:4217,4049" CACHE STRING "compile flags" FORCE) string(REGEX REPLACE "/W[0-4]" "/W0" CMAKE_EXE_LINKER_FLAGS_NEW ${CMAKE_EXE_LINKER_FLAGS}) set(CMAKE_EXE_LINKER_FLAGS"${CMAKE_EXE_LINKER_FLAGS_NEW}/IGNORE:4217,4049" CACHE STRING "compile flags" FORCE) endif(NOT CMAKE_CXX_COMPILER_ID STREQUAL "Intel") endif(WIN32) if(UNIX) message("Checking for write permissions in install directory...") execute_process(COMMAND mkdir -p ${CMAKE_INSTALL_PREFIX}) execute_process(COMMAND test -w ${CMAKE_INSTALL_PREFIX} RESULT_VARIABLE res) if(res) message(WARNING "No write access at install directory, please set correct permissions") endif() endif(UNIX) if(NOT WIN32) find_package(ZLIB REQUIRED) set_vars(NETGEN_CMAKE_ARGS ZLIB_INCLUDE_DIRS ZLIB_LIBRARIES) endif(NOT WIN32) ####################################################################### if (USE_PYTHON) find_path(PYBIND_INCLUDE_DIR pybind11/pybind11.h PATHS ${CMAKE_CURRENT_SOURCE_DIR}/external_dependencies/pybind11/include NO_DEFAULT_PATH) set(NG_INSTALL_PYBIND ON) if( NOT PYBIND_INCLUDE_DIR ) # if the pybind submodule is missing, try to initialize and update all submodules execute_process(COMMAND git submodule update --init --recursive WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) find_path(PYBIND_INCLUDE_DIR pybind11/pybind11.h PATHS ${CMAKE_CURRENT_SOURCE_DIR}/external_dependencies/pybind11/include NO_DEFAULT_PATH) endif( NOT PYBIND_INCLUDE_DIR ) if( PYBIND_INCLUDE_DIR ) message("-- Found Pybind11: ${PYBIND_INCLUDE_DIR}") else( PYBIND_INCLUDE_DIR ) message(FATAL_ERROR "Could NOT find pybind11!") endif( PYBIND_INCLUDE_DIR ) find_package(PythonInterp 3 REQUIRED) find_package(PythonLibs 3 REQUIRED) set_vars(NETGEN_CMAKE_ARGS PYTHON_INCLUDE_DIRS PYTHON_LIBRARIES PYTHON_EXECUTABLE PYTHON_VERSION PYBIND_INCLUDE_DIR NG_INSTALL_PYBIND ) endif (USE_PYTHON) ####################################################################### if(USE_OCC AND WIN32 AND NOT OCC_INCLUDE_DIR) ExternalProject_Add(win_download_occ PREFIX ${CMAKE_CURRENT_BINARY_DIR}/tcl URL ${OCC_DOWNLOAD_URL_WIN} UPDATE_COMMAND "" # Disable update BUILD_IN_SOURCE 1 CONFIGURE_COMMAND "" BUILD_COMMAND "" INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory . ${CMAKE_INSTALL_PREFIX} LOG_DOWNLOAD 1 ) list(APPEND NETGEN_DEPENDENCIES win_download_occ) endif(USE_OCC AND WIN32 AND NOT OCC_INCLUDE_DIR) ####################################################################### include(cmake/external_projects/zlib.cmake) if(USE_GUI) include(cmake/external_projects/tcltk.cmake) endif(USE_GUI) ####################################################################### if(USE_MPI) if(UNIX) find_package(METIS QUIET) if(NOT METIS_FOUND) message(STATUS "Could not find METIS, it will be built from source") include(cmake/external_projects/metis.cmake) endif() else(UNIX) find_package(METIS REQUIRED) endif(UNIX) endif(USE_MPI) ####################################################################### # propagate cmake variables to Netgen subproject set_vars( NETGEN_CMAKE_ARGS CMAKE_CXX_COMPILER CMAKE_BUILD_TYPE CMAKE_SHARED_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS_RELEASE CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_RELEASE USE_GUI USE_PYTHON USE_MPI USE_VT USE_VTUNE USE_NUMA USE_CCACHE USE_NATIVE_ARCH USE_OCC USE_MPEG USE_JPEG USE_INTERNAL_TCL INSTALL_PROFILES INTEL_MIC CMAKE_PREFIX_PATH CMAKE_INSTALL_PREFIX ) # propagate all variables set on the command line using cmake -DFOO=BAR # to Netgen subproject get_cmake_property(CACHE_VARS CACHE_VARIABLES) foreach(CACHE_VAR ${CACHE_VARS}) get_property(CACHE_VAR_HELPSTRING CACHE ${CACHE_VAR} PROPERTY HELPSTRING) if(CACHE_VAR_HELPSTRING STREQUAL "No help, variable specified on the command line.") get_property(CACHE_VAR_TYPE CACHE ${CACHE_VAR} PROPERTY TYPE) set(NETGEN_CMAKE_ARGS ${NETGEN_CMAKE_ARGS};-D${CACHE_VAR}:${CACHE_VAR_TYPE}=${${CACHE_VAR}} CACHE INTERNAL "") endif() endforeach() if(${CMAKE_GENERATOR} STREQUAL "Unix Makefiles") set(NETGEN_BUILD_COMMAND $(MAKE) --silent ) else() set(NETGEN_BUILD_COMMAND ${CMAKE_COMMAND} --build ${CMAKE_CURRENT_BINARY_DIR}/netgen --config ${CMAKE_BUILD_TYPE}) endif() ExternalProject_Add (netgen DEPENDS ${NETGEN_DEPENDENCIES} SOURCE_DIR ${PROJECT_SOURCE_DIR} CMAKE_ARGS -DUSE_SUPERBUILD=OFF ${NETGEN_CMAKE_ARGS} INSTALL_COMMAND "" BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/netgen BUILD_COMMAND ${NETGEN_BUILD_COMMAND} STEP_TARGETS build ) # Check if the git submodules (i.e. pybind11) are up to date # in case, something is wrong, emit a warning but continue ExternalProject_Add_Step(netgen check_submodules COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/check_submodules.cmake DEPENDERS install # Steps on which this step depends ) # Due to 'ALWAYS 1', this step is always run which also forces a build of # the Netgen subproject ExternalProject_Add_Step(netgen check_submodules1 COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/check_submodules.cmake DEPENDEES configure # Steps on which this step depends DEPENDERS build # Steps that depend on this step ALWAYS 1 # No stamp file, step always runs ) install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" --build . --target install --config ${CMAKE_BUILD_TYPE} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/netgen)") add_custom_target(test_netgen ${CMAKE_COMMAND} --build ${CMAKE_CURRENT_BINARY_DIR}/netgen --target test --config ${CMAKE_BUILD_TYPE} ) netgen-6.2.1804/cmake/cmake_modules/0000755000175000017500000000000013272137567015675 5ustar kurtkurtnetgen-6.2.1804/cmake/cmake_modules/FindFFMPEG.cmake0000644000175000017500000000523413272137567020450 0ustar kurtkurt# - Try to find ffmpeg libraries (libavcodec, libavformat, libavutil and swscale) # Once done this will define # # FFMPEG_FOUND - system has ffmpeg or libav # FFMPEG_INCLUDE_DIR - the ffmpeg include directory # FFMPEG_LIBRARIES - Link these to use ffmpeg # FFMPEG_LIBAVCODEC # FFMPEG_LIBAVFORMAT # FFMPEG_LIBAVUTIL # FFMPEG_SWSCALE # # Copyright (c) 2008 Andreas Schneider # Modified for other libraries by Lasse Kärkkäinen # Modified for Hedgewars by Stepik777 # Modified for Netgen by Christoph Lehrenfeld (2015) (current version) # # Redistribution and use is allowed according to the terms of the New # BSD license. # if (FFMPEG_LIBRARIES AND FFMPEG_INCLUDE_DIR) # in cache already set(FFMPEG_FOUND TRUE) else (FFMPEG_LIBRARIES AND FFMPEG_INCLUDE_DIR) # use pkg-config to get the directories and then use these values # in the FIND_PATH() and FIND_LIBRARY() calls find_package(PkgConfig) if (PKG_CONFIG_FOUND) pkg_check_modules(_FFMPEG_AVCODEC libavcodec) pkg_check_modules(_FFMPEG_AVFORMAT libavformat) pkg_check_modules(_FFMPEG_AVUTIL libavutil) pkg_check_modules(SWSCALE libswscale) endif (PKG_CONFIG_FOUND) find_path(FFMPEG_AVCODEC_INCLUDE_DIR NAMES libavcodec/avcodec.h PATHS ${_FFMPEG_AVCODEC_INCLUDE_DIRS} /usr/include /usr/local/include /opt/local/include /sw/include PATH_SUFFIXES ffmpeg libav ) find_library(FFMPEG_LIBAVCODEC NAMES avcodec PATHS ${_FFMPEG_AVCODEC_LIBRARY_DIRS} /usr/lib /usr/local/lib /opt/local/lib /sw/lib ) find_library(FFMPEG_LIBAVFORMAT NAMES avformat PATHS ${_FFMPEG_AVFORMAT_LIBRARY_DIRS} /usr/lib /usr/local/lib /opt/local/lib /sw/lib ) find_library(FFMPEG_LIBAVUTIL NAMES avutil PATHS ${_FFMPEG_AVUTIL_LIBRARY_DIRS} /usr/lib /usr/local/lib /opt/local/lib /sw/lib ) find_library(FFMPEG_SWSCALE NAMES swscale PATHS ${SWSCALE_LIBRARY_DIRS} /usr/lib /usr/local/lib /opt/local/lib /sw/lib ) if (FFMPEG_LIBAVCODEC AND FFMPEG_LIBAVFORMAT) set(FFMPEG_FOUND TRUE) endif() if (FFMPEG_FOUND) set(FFMPEG_INCLUDE_DIR ${FFMPEG_AVCODEC_INCLUDE_DIR}) set(FFMPEG_LIBRARIES ${FFMPEG_LIBAVCODEC} ${FFMPEG_LIBAVFORMAT} ${FFMPEG_LIBAVUTIL} ${FFMPEG_SWSCALE} ) endif (FFMPEG_FOUND) if (FFMPEG_FOUND) if (NOT FFMPEG_FIND_QUIETLY) message(STATUS "Found FFMPEG or Libav: ${FFMPEG_LIBRARIES}, ${FFMPEG_INCLUDE_DIR}") endif (NOT FFMPEG_FIND_QUIETLY) else (FFMPEG_FOUND) if (FFMPEG_FIND_REQUIRED) message(FATAL_ERROR "Could not find libavcodec or libavformat or libavutil") endif (FFMPEG_FIND_REQUIRED) endif (FFMPEG_FOUND) endif (FFMPEG_LIBRARIES AND FFMPEG_INCLUDE_DIR) netgen-6.2.1804/cmake/cmake_modules/FindMETIS.cmake0000644000175000017500000001030713272137567020362 0ustar kurtkurt# -*- mode: cmake -*- # # METIS Find Module for MSTK # Shamelessly stolen from Amanzi open source code https://software.lanl.gov/ascem/trac # # Usage: # Control the search through METIS_DIR or setting environment variable # METIS_ROOT to the METIS installation prefix. # # This module does not search default paths! # # Following variables are set: # METIS_FOUND (BOOL) Flag indicating if METIS was found # METIS_INCLUDE_DIR (PATH) Path to the METIS include file # METIS_INCLUDE_DIRS (LIST) List of all required include files # METIS_LIBRARY_DIR (PATH) Path to the METIS library # METIS_LIBRARY (FILE) METIS library # METIS_LIBRARIES (LIST) List of all required METIS libraries # # ############################################################################# # Standard CMake modules see CMAKE_ROOT/Modules include(FindPackageHandleStandardArgs) # Amanzi CMake functions see /tools/cmake for source # include(PrintVariable) if ( METIS_LIBRARIES AND METIS_INCLUDE_DIRS ) # Do nothing. Variables are set. No need to search again else(METIS_LIBRARIES AND METIS_INCLUDE_DIRS) # Cache variables if(METIS_DIR) set(METIS_DIR "${METIS_DIR}" CACHE PATH "Path to search for METIS include and library files") endif() if(METIS_INCLUDE_DIR) set(METIS_INCLUDE_DIR "${METIS_INCLUDE_DIR}" CACHE PATH "Path to search for METIS include files") endif() if(METIS_LIBRARY_DIR) set(METIS_LIBRARY_DIR "${METIS_LIBRARY_DIR}" CACHE PATH "Path to search for METIS library files") endif() # Search for include files # Search order preference: # (1) METIS_INCLUDE_DIR - check existence of path AND if the include files exist # (2) METIS_DIR/ # (3) Default CMake paths See cmake --html-help=out.html file for more information. # set(metis_inc_names "metis.h") if (METIS_INCLUDE_DIR) if (EXISTS "${METIS_INCLUDE_DIR}") find_path(metis_test_include_path NAMES ${metis_inc_names} HINTS ${METIS_INCLUDE_DIR} NO_DEFAULT_PATH) set(METIS_INCLUDE_DIR "${metis_test_include_path}") endif() else() # Metis sometimes puts the include files in a subdir called Lib set(metis_inc_suffixes "include" "Lib") if(METIS_DIR) if (EXISTS "${METIS_DIR}" ) find_path(METIS_INCLUDE_DIR NAMES ${metis_inc_names} HINTS ${METIS_DIR} PATH_SUFFIXES ${metis_inc_suffixes} NO_DEFAULT_PATH) endif() else() find_path(METIS_INCLUDE_DIR NAMES ${metis_inc_names} PATH_SUFFIXES ${metis_inc_suffixes}) endif() endif() # Search for libraries # Search order preference: # (1) METIS_LIBRARY_DIR - check existence of path AND if the library file exists # (2) METIS_DIR/ # (3) Default CMake paths See cmake --html-help=out.html file for more information. # set(metis_lib_names "metis5" "metis") if (METIS_LIBRARY_DIR) if (EXISTS "${METIS_LIBRARY_DIR}") find_library(METIS_LIBRARY NAMES ${metis_lib_names} HINTS ${METIS_LIBRARY_DIR} NO_DEFAULT_PATH) endif() else() list(APPEND metis_lib_suffixes "lib" "Lib") if(METIS_DIR) if (EXISTS "${METIS_DIR}" ) find_library(METIS_LIBRARY NAMES ${metis_lib_names} HINTS ${METIS_DIR} PATH_SUFFIXES ${metis_lib_suffixes} NO_DEFAULT_PATH) endif() else() find_library(METIS_LIBRARY NAMES ${metis_lib_names} PATH_SUFFIXES ${metis_lib_suffixes}) endif() endif() # Define prerequisite packages set(METIS_INCLUDE_DIRS ${METIS_INCLUDE_DIR}) set(METIS_LIBRARIES ${METIS_LIBRARY}) endif(METIS_LIBRARIES AND METIS_INCLUDE_DIRS ) # Send useful message if everything is found find_package_handle_standard_args(METIS DEFAULT_MSG METIS_LIBRARIES METIS_INCLUDE_DIRS) # find_package_handle_standard_args should set METIS_FOUND but it does not! if ( METIS_LIBRARIES AND METIS_INCLUDE_DIRS) set(METIS_FOUND TRUE) else() set(METIS_FOUND FALSE) endif() # Define the version mark_as_advanced( METIS_INCLUDE_DIR METIS_INCLUDE_DIRS METIS_LIBRARY METIS_LIBRARIES METIS_LIBRARY_DIR ) netgen-6.2.1804/cmake/cmake_modules/FindOpenCasCade.cmake0000644000175000017500000000500613272137567021606 0ustar kurtkurt# Try to find OCC # Once done this will define # # OCC_FOUND - system has OCC - OpenCASCADE # OCC_INCLUDE_DIR - where the OCC include directory can be found # OCC_LIBRARY_DIR - where the OCC library directory can be found # OCC_LIBRARIES - Link this to use OCC if(WIN32) find_path(OCC_INCLUDE_DIR Standard_Version.hxx PATH_SUFFIXES inc ../inc) find_library(OCC_LIBRARY TKernel) else(WIN32) find_path(OCC_INCLUDE_DIR Standard_Version.hxx /usr/include/opencascade /usr/local/include/opencascade /usr/include/oce /usr/local/include/oce /opt/opencascade/include /opt/opencascade/inc ) find_library(OCC_LIBRARY TKernel /usr/lib /usr/local/lib /opt/opencascade/lib ) endif(WIN32) if(OCC_LIBRARY) get_filename_component(OCC_LIBRARY_DIR ${OCC_LIBRARY} PATH) endif(OCC_LIBRARY) if(OCC_INCLUDE_DIR) file(STRINGS ${OCC_INCLUDE_DIR}/Standard_Version.hxx OCC_MAJOR REGEX "#define OCC_VERSION_MAJOR.*" ) string(REGEX MATCH "[0-9]+" OCC_MAJOR ${OCC_MAJOR}) file(STRINGS ${OCC_INCLUDE_DIR}/Standard_Version.hxx OCC_MINOR REGEX "#define OCC_VERSION_MINOR.*" ) string(REGEX MATCH "[0-9]+" OCC_MINOR ${OCC_MINOR}) file(STRINGS ${OCC_INCLUDE_DIR}/Standard_Version.hxx OCC_MAINT REGEX "#define OCC_VERSION_MAINTENANCE.*" ) string(REGEX MATCH "[0-9]+" OCC_MAINT ${OCC_MAINT}) set(OCC_VERSION_STRING "${OCC_MAJOR}.${OCC_MINOR}.${OCC_MAINT}") endif(OCC_INCLUDE_DIR) set(OCC_LIBRARY_NAMES TKBO TKBool TKBRep TKCAF TKCDF TKernel TKG2d TKG3d TKGeomAlgo TKGeomBase TKHLR TKIGES TKLCAF TKMath TKMesh TKOffset TKPrim TKService TKShHealing TKSTEP TKSTEP209 TKSTEPAttr TKSTEPBase TKSTL TKTopAlgo TKV3d TKXCAF TKXDEIGES TKXDESTEP TKXSBase ) foreach( libname ${OCC_LIBRARY_NAMES} ) find_library( ${libname} ${libname} ${OCC_LIBRARY_DIR} ) set(OCC_LIBRARIES ${OCC_LIBRARIES} ${${libname}}) endforeach() include(FindPackageHandleStandardArgs) find_package_handle_standard_args(OCC REQUIRED_VARS OCC_INCLUDE_DIR VERSION_VAR OCC_VERSION_STRING ${OCC_LIBRARIY_NAMES}) if(OCC_FOUND) message(STATUS "-- Found OpenCASCADE version: ${OCC_VERSION_STRING}") message(STATUS "-- OpenCASCADE include directory: ${OCC_INCLUDE_DIR}") message(STATUS "-- OpenCASCADE shared libraries directory: ${OCC_LIBRARY_DIR}") message(STATUS "-- OpenCASCADE shared libraries :\n ${OCC_LIBRARIES}") endif(OCC_FOUND) netgen-6.2.1804/cmake/check_submodules.cmake0000644000175000017500000000115613272137567017411 0ustar kurtkurtexecute_process(COMMAND git submodule status --recursive WORKING_DIRECTORY "${CMAKE_CURRENT_LIST_DIR}/../" OUTPUT_VARIABLE git_status_output) string(REPLACE "\n" ";" git_status_output "${git_status_output}") foreach( a ${git_status_output}) if(NOT ${a} MATCHES " [a-f,0-9]* external_dependencies[.]*") message(WARNING "***************************************************************** WARNING: The git submodules are out of sync! Please run git submodule update --init --recursive in your source directory *****************************************************************") endif() endforeach() netgen-6.2.1804/.gitmodules0000644000175000017500000000020213272137567014154 0ustar kurtkurt[submodule "external_dependencies/pybind11"] path = external_dependencies/pybind11 url = https://github.com/pybind/pybind11.git netgen-6.2.1804/external_dependencies/0000755000175000017500000000000013272137567016335 5ustar kurtkurtnetgen-6.2.1804/external_dependencies/.gitignore0000644000175000017500000000001113272137567020315 0ustar kurtkurt*.tar.gz netgen-6.2.1804/tutorials/0000755000175000017500000000000013272137567014033 5ustar kurtkurtnetgen-6.2.1804/tutorials/sphereincube.geo0000644000175000017500000000063613272137567017210 0ustar kurtkurtalgebraic3d # # Example with two sub-domains: # solid cube = plane (0, 0, 0; 0, 0, -1) and plane (0, 0, 0; 0, -1, 0) and plane (0, 0, 0; -1, 0, 0) and plane (1, 1, 1; 0, 0, 1) and plane (1, 1, 1; 0, 1, 0) and plane (1, 1, 1; 1, 0, 0); solid sph = sphere (0.5, 0.5, 0.5; 0.3); solid rest = cube and not sph; tlo rest -transparent -col=[0,0,1]; tlo sph -col=[1,0,0]; netgen-6.2.1804/tutorials/fichera.geo0000644000175000017500000000114513272137567016131 0ustar kurtkurt# ## Fichera Cube # algebraic3d solid c1 = plane (0, 0, 0; 0, 0, -1) and plane (0, 0, 0; 0, -1, 0) and plane (0, 0, 0; -1, 0, 0) and plane (1, 1, 1; 0, 0, 1) and plane (1, 1, 1; 0, 1, 0) and plane (1, 1, 1; 1, 0, 0) -bc=2; solid c2 = plane (-0.5, -0.5, -0.5; 0, 0, -1) and plane (-0.5, -0.5, -0.5; 0, -1, 0) and plane (-0.5, -0.5, -0.5; -1, 0, 0) and plane (0.5, 0.5, 0.5; 0, 0, 1) and plane (0.5, 0.5, 0.5; 0, 1, 0) and plane (0.5, 0.5, 0.5; 1, 0, 0); # cut off small cube solid main = c1 and not c2 -bc=1; tlo main; netgen-6.2.1804/tutorials/cone.geo0000644000175000017500000000033413272137567015453 0ustar kurtkurt# ## A cone # algebraic3d # Cone given by bottom circle and top circle # and cut by planes: solid cutcone = cone ( 0, 0, 0; 1; 3, 0, 0; 0.1 ) and plane (0, 0, 0; -1, 0, 0) and plane (3, 0, 0; 1, 0, 0); tlo cutcone; netgen-6.2.1804/tutorials/ortho.geo0000644000175000017500000000016313272137567015662 0ustar kurtkurt# ## A cube # algebraic3d # cube consisting of 6 planes: solid cube = orthobrick (0, 0, 0; 1, 1, 1); tlo cube; netgen-6.2.1804/tutorials/extrusion.geo0000644000175000017500000000223113272137567016565 0ustar kurtkurtalgebraic3d curve2d procurve1=(8; -1,0; -0.7,0.7; 0,1; 0.7,0.7; 1,0; 0.7,-0.7; 0,-1; -0.7,-0.7; 4; 3,1,2,3; 3,3,4,5; 3,5,6,7; 3,7,8,1); curve2d procurve2=(4; 1,1; 1,-1; -1,-1; -1,1; 4; 2,1,2; 2,2,3; 2,3,4; 2,4,1); curve3d pathcurve1=(9; 0,0,0; 10,0,5; 10,10,10; 10,20,15; 0,20,20; -10,20,25; -10,10,30; -10,0,35; 0,0,40; 4; 3,1,2,3; 3,3,4,5; 3,5,6,7; 3,7,8,9); curve3d pathcurve2=(2; 0,0,0; 0,10,0; 1; 2,1,2); curve3d pathcurve3=(3; 0,0,0; 10,0,5; 10,10,10; 1; 3,1,2,3); curve3d pathcurve4=(9; 0,0,0; 10,0,0; 10,10,0; 10,20,0; 0,20,0; -10,20,0; -10,10,0; -10,0,0; 0,0,0; 4; 3,1,2,3; 3,3,4,5; 3,5,6,7; 3,7,8,9); solid p1 = plane(1,0,0;-1,0,0); solid p2 = plane(10,9,10;0,1,0); solid p3 = plane(0,1,0;0,-1,0); solid p4 = plane(0,9,0;0,1,0); solid ob1 = orthobrick(-1,-5,-5;1,5,45); solid ext = extrusion(pathcurve1;procurve2;0,0,1) and not ob1; #solid ext = extrusion(pathcurve4;procurve2;0,0,1); #solid ext = extrusion(pathcurve3;procurve1;0,0,1) and p1 and p2; #solid ext = extrusion(pathcurve2;procurve2;0,0,1) and p3 and p4; solid sp = sphere(0,0,0;4); solid comb = sp or ext; #tlo ext; tlo comb;netgen-6.2.1804/tutorials/part1.stl0000644000175000017500000030145613272137567015617 0ustar kurtkurtsolid facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.055220e+000 5.027685e+000 5.332898e+000 vertex 3.066615e+000 4.897449e+000 5.332898e+000 vertex 3.305220e+000 5.027685e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.312817e+000 5.114509e+000 5.332898e+000 vertex 3.055220e+000 5.027685e+000 5.332898e+000 vertex 3.305220e+000 5.027685e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.312817e+000 5.114509e+000 5.332898e+000 vertex 3.066615e+000 5.157921e+000 5.332898e+000 vertex 3.055220e+000 5.027685e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.312817e+000 5.114509e+000 5.332898e+000 vertex 3.335374e+000 5.198695e+000 5.332898e+000 vertex 3.066615e+000 5.157921e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.066615e+000 5.157921e+000 5.332898e+000 vertex 3.335374e+000 5.198695e+000 5.332898e+000 vertex 3.100451e+000 5.284200e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.100451e+000 5.284200e+000 5.332898e+000 vertex 3.335374e+000 5.198695e+000 5.332898e+000 vertex 3.372208e+000 5.277685e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.155701e+000 5.402685e+000 5.332898e+000 vertex 3.372208e+000 5.277685e+000 5.332898e+000 vertex 3.422198e+000 5.349079e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.230687e+000 5.509776e+000 5.332898e+000 vertex 3.422198e+000 5.349079e+000 5.332898e+000 vertex 3.483827e+000 5.410707e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.323130e+000 5.602218e+000 5.332898e+000 vertex 3.483827e+000 5.410707e+000 5.332898e+000 vertex 3.555220e+000 5.460698e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.430220e+000 5.677204e+000 5.332898e+000 vertex 3.555220e+000 5.460698e+000 5.332898e+000 vertex 3.634210e+000 5.497531e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.548705e+000 5.732455e+000 5.332898e+000 vertex 3.634210e+000 5.497531e+000 5.332898e+000 vertex 3.718396e+000 5.520089e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.674984e+000 5.766291e+000 5.332898e+000 vertex 3.718396e+000 5.520089e+000 5.332898e+000 vertex 3.805220e+000 5.527685e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.805220e+000 5.777685e+000 5.332898e+000 vertex 3.805220e+000 5.527685e+000 5.332898e+000 vertex 3.892045e+000 5.520089e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.935457e+000 5.766291e+000 5.332898e+000 vertex 3.892045e+000 5.520089e+000 5.332898e+000 vertex 3.976231e+000 5.497531e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.061736e+000 5.732455e+000 5.332898e+000 vertex 3.976231e+000 5.497531e+000 5.332898e+000 vertex 4.055220e+000 5.460698e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.180220e+000 5.677204e+000 5.332898e+000 vertex 4.055220e+000 5.460698e+000 5.332898e+000 vertex 4.126614e+000 5.410707e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.287311e+000 5.602218e+000 5.332898e+000 vertex 4.126614e+000 5.410707e+000 5.332898e+000 vertex 4.188243e+000 5.349079e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.379754e+000 5.509776e+000 5.332898e+000 vertex 4.188243e+000 5.349079e+000 5.332898e+000 vertex 4.238233e+000 5.277685e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.454740e+000 5.402685e+000 5.332898e+000 vertex 4.238233e+000 5.277685e+000 5.332898e+000 vertex 4.275067e+000 5.198695e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.509990e+000 5.284200e+000 5.332898e+000 vertex 4.275067e+000 5.198695e+000 5.332898e+000 vertex 4.297624e+000 5.114509e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.543826e+000 5.157921e+000 5.332898e+000 vertex 4.297624e+000 5.114509e+000 5.332898e+000 vertex 4.305220e+000 5.027685e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.555220e+000 5.027685e+000 5.332898e+000 vertex 4.305220e+000 5.027685e+000 5.332898e+000 vertex 4.297624e+000 4.940861e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.543826e+000 4.897449e+000 5.332898e+000 vertex 4.297624e+000 4.940861e+000 5.332898e+000 vertex 4.275067e+000 4.856675e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.509990e+000 4.771170e+000 5.332898e+000 vertex 4.275067e+000 4.856675e+000 5.332898e+000 vertex 4.238233e+000 4.777685e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.454740e+000 4.652685e+000 5.332898e+000 vertex 4.238233e+000 4.777685e+000 5.332898e+000 vertex 4.188243e+000 4.706291e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.379754e+000 4.545594e+000 5.332898e+000 vertex 4.188243e+000 4.706291e+000 5.332898e+000 vertex 4.126614e+000 4.644663e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.287311e+000 4.453152e+000 5.332898e+000 vertex 4.126614e+000 4.644663e+000 5.332898e+000 vertex 4.055220e+000 4.594672e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.180220e+000 4.378166e+000 5.332898e+000 vertex 4.055220e+000 4.594672e+000 5.332898e+000 vertex 3.976231e+000 4.557839e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.061736e+000 4.322916e+000 5.332898e+000 vertex 3.976231e+000 4.557839e+000 5.332898e+000 vertex 3.892045e+000 4.535281e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.935457e+000 4.289079e+000 5.332898e+000 vertex 3.892045e+000 4.535281e+000 5.332898e+000 vertex 3.805220e+000 4.527685e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.805220e+000 4.277685e+000 5.332898e+000 vertex 3.805220e+000 4.527685e+000 5.332898e+000 vertex 3.718396e+000 4.535281e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.674984e+000 4.289079e+000 5.332898e+000 vertex 3.718396e+000 4.535281e+000 5.332898e+000 vertex 3.634210e+000 4.557839e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.548705e+000 4.322916e+000 5.332898e+000 vertex 3.634210e+000 4.557839e+000 5.332898e+000 vertex 3.555220e+000 4.594672e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.430220e+000 4.378166e+000 5.332898e+000 vertex 3.555220e+000 4.594672e+000 5.332898e+000 vertex 3.483827e+000 4.644663e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.323130e+000 4.453152e+000 5.332898e+000 vertex 3.483827e+000 4.644663e+000 5.332898e+000 vertex 3.422198e+000 4.706291e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.230687e+000 4.545594e+000 5.332898e+000 vertex 3.422198e+000 4.706291e+000 5.332898e+000 vertex 3.372208e+000 4.777685e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.155701e+000 4.652685e+000 5.332898e+000 vertex 3.372208e+000 4.777685e+000 5.332898e+000 vertex 3.335374e+000 4.856675e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.100451e+000 4.771170e+000 5.332898e+000 vertex 3.335374e+000 4.856675e+000 5.332898e+000 vertex 3.312817e+000 4.940861e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.066615e+000 4.897449e+000 5.332898e+000 vertex 3.312817e+000 4.940861e+000 5.332898e+000 vertex 3.305220e+000 5.027685e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.066615e+000 4.897449e+000 5.332898e+000 vertex 3.100451e+000 4.771170e+000 5.332898e+000 vertex 3.312817e+000 4.940861e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.100451e+000 4.771170e+000 5.332898e+000 vertex 3.155701e+000 4.652685e+000 5.332898e+000 vertex 3.335374e+000 4.856675e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.155701e+000 4.652685e+000 5.332898e+000 vertex 3.230687e+000 4.545594e+000 5.332898e+000 vertex 3.372208e+000 4.777685e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.230687e+000 4.545594e+000 5.332898e+000 vertex 3.323130e+000 4.453152e+000 5.332898e+000 vertex 3.422198e+000 4.706291e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.323130e+000 4.453152e+000 5.332898e+000 vertex 3.430220e+000 4.378166e+000 5.332898e+000 vertex 3.483827e+000 4.644663e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.430220e+000 4.378166e+000 5.332898e+000 vertex 3.548705e+000 4.322916e+000 5.332898e+000 vertex 3.555220e+000 4.594672e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.548705e+000 4.322916e+000 5.332898e+000 vertex 3.674984e+000 4.289079e+000 5.332898e+000 vertex 3.634210e+000 4.557839e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.674984e+000 4.289079e+000 5.332898e+000 vertex 3.805220e+000 4.277685e+000 5.332898e+000 vertex 3.718396e+000 4.535281e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.805220e+000 4.277685e+000 5.332898e+000 vertex 3.935457e+000 4.289079e+000 5.332898e+000 vertex 3.805220e+000 4.527685e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.935457e+000 4.289079e+000 5.332898e+000 vertex 4.061736e+000 4.322916e+000 5.332898e+000 vertex 3.892045e+000 4.535281e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.180220e+000 4.378166e+000 5.332898e+000 vertex 3.976231e+000 4.557839e+000 5.332898e+000 vertex 4.061736e+000 4.322916e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.180220e+000 4.378166e+000 5.332898e+000 vertex 4.287311e+000 4.453152e+000 5.332898e+000 vertex 4.055220e+000 4.594672e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.287311e+000 4.453152e+000 5.332898e+000 vertex 4.379754e+000 4.545594e+000 5.332898e+000 vertex 4.126614e+000 4.644663e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.379754e+000 4.545594e+000 5.332898e+000 vertex 4.454740e+000 4.652685e+000 5.332898e+000 vertex 4.188243e+000 4.706291e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.509990e+000 4.771170e+000 5.332898e+000 vertex 4.238233e+000 4.777685e+000 5.332898e+000 vertex 4.454740e+000 4.652685e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.509990e+000 4.771170e+000 5.332898e+000 vertex 4.543826e+000 4.897449e+000 5.332898e+000 vertex 4.275067e+000 4.856675e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.543826e+000 4.897449e+000 5.332898e+000 vertex 4.555220e+000 5.027685e+000 5.332898e+000 vertex 4.297624e+000 4.940861e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.555220e+000 5.027685e+000 5.332898e+000 vertex 4.543826e+000 5.157921e+000 5.332898e+000 vertex 4.305220e+000 5.027685e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.543826e+000 5.157921e+000 5.332898e+000 vertex 4.509990e+000 5.284200e+000 5.332898e+000 vertex 4.297624e+000 5.114509e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.509990e+000 5.284200e+000 5.332898e+000 vertex 4.454740e+000 5.402685e+000 5.332898e+000 vertex 4.275067e+000 5.198695e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.454740e+000 5.402685e+000 5.332898e+000 vertex 4.379754e+000 5.509776e+000 5.332898e+000 vertex 4.238233e+000 5.277685e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.379754e+000 5.509776e+000 5.332898e+000 vertex 4.287311e+000 5.602218e+000 5.332898e+000 vertex 4.188243e+000 5.349079e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.287311e+000 5.602218e+000 5.332898e+000 vertex 4.180220e+000 5.677204e+000 5.332898e+000 vertex 4.126614e+000 5.410707e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.055220e+000 5.460698e+000 5.332898e+000 vertex 4.180220e+000 5.677204e+000 5.332898e+000 vertex 4.061736e+000 5.732455e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.061736e+000 5.732455e+000 5.332898e+000 vertex 3.935457e+000 5.766291e+000 5.332898e+000 vertex 3.976231e+000 5.497531e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.935457e+000 5.766291e+000 5.332898e+000 vertex 3.805220e+000 5.777685e+000 5.332898e+000 vertex 3.892045e+000 5.520089e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.805220e+000 5.777685e+000 5.332898e+000 vertex 3.674984e+000 5.766291e+000 5.332898e+000 vertex 3.805220e+000 5.527685e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.674984e+000 5.766291e+000 5.332898e+000 vertex 3.548705e+000 5.732455e+000 5.332898e+000 vertex 3.718396e+000 5.520089e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.548705e+000 5.732455e+000 5.332898e+000 vertex 3.430220e+000 5.677204e+000 5.332898e+000 vertex 3.634210e+000 5.497531e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.430220e+000 5.677204e+000 5.332898e+000 vertex 3.323130e+000 5.602218e+000 5.332898e+000 vertex 3.555220e+000 5.460698e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.323130e+000 5.602218e+000 5.332898e+000 vertex 3.230687e+000 5.509776e+000 5.332898e+000 vertex 3.483827e+000 5.410707e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.230687e+000 5.509776e+000 5.332898e+000 vertex 3.155701e+000 5.402685e+000 5.332898e+000 vertex 3.422198e+000 5.349079e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.155701e+000 5.402685e+000 5.332898e+000 vertex 3.100451e+000 5.284200e+000 5.332898e+000 vertex 3.372208e+000 5.277685e+000 5.332898e+000 endloop endfacet facet normal -9.961947e-001 -8.715574e-002 -9.172298e-016 outer loop vertex 4.555220e+000 5.027685e+000 6.332898e+000 vertex 4.543826e+000 5.157921e+000 6.332898e+000 vertex 4.543826e+000 5.157921e+000 5.332898e+000 endloop endfacet facet normal -9.961947e-001 -8.715574e-002 9.289182e-016 outer loop vertex 4.555220e+000 5.027685e+000 5.332898e+000 vertex 4.555220e+000 5.027685e+000 6.332898e+000 vertex 4.543826e+000 5.157921e+000 5.332898e+000 endloop endfacet facet normal -9.961947e-001 8.715574e-002 -9.289182e-016 outer loop vertex 4.555220e+000 5.027685e+000 5.332898e+000 vertex 4.543826e+000 4.897449e+000 6.332898e+000 vertex 4.555220e+000 5.027685e+000 6.332898e+000 endloop endfacet facet normal -9.961947e-001 8.715574e-002 1.758162e-015 outer loop vertex 4.555220e+000 5.027685e+000 5.332898e+000 vertex 4.543826e+000 4.897449e+000 5.332898e+000 vertex 4.543826e+000 4.897449e+000 6.332898e+000 endloop endfacet facet normal -9.659258e-001 2.588190e-001 -1.855524e-015 outer loop vertex 4.543826e+000 4.897449e+000 6.332898e+000 vertex 4.543826e+000 4.897449e+000 5.332898e+000 vertex 4.509990e+000 4.771170e+000 6.332898e+000 endloop endfacet facet normal -9.659258e-001 2.588190e-001 2.035888e-015 outer loop vertex 4.509990e+000 4.771170e+000 6.332898e+000 vertex 4.543826e+000 4.897449e+000 5.332898e+000 vertex 4.509990e+000 4.771170e+000 5.332898e+000 endloop endfacet facet normal -9.063078e-001 4.226183e-001 2.152348e-015 outer loop vertex 4.454740e+000 4.652685e+000 6.332898e+000 vertex 4.509990e+000 4.771170e+000 5.332898e+000 vertex 4.454740e+000 4.652685e+000 5.332898e+000 endloop endfacet facet normal -8.191520e-001 5.735764e-001 1.743410e-015 outer loop vertex 4.379754e+000 4.545594e+000 6.332898e+000 vertex 4.454740e+000 4.652685e+000 5.332898e+000 vertex 4.379754e+000 4.545594e+000 5.332898e+000 endloop endfacet facet normal -7.071068e-001 7.071068e-001 1.256074e-015 outer loop vertex 4.287311e+000 4.453152e+000 6.332898e+000 vertex 4.379754e+000 4.545594e+000 5.332898e+000 vertex 4.287311e+000 4.453152e+000 5.332898e+000 endloop endfacet facet normal -5.735764e-001 8.191520e-001 1.458126e-015 outer loop vertex 4.180220e+000 4.378166e+000 6.332898e+000 vertex 4.287311e+000 4.453152e+000 5.332898e+000 vertex 4.180220e+000 4.378166e+000 5.332898e+000 endloop endfacet facet normal -4.226183e-001 9.063078e-001 1.442865e-015 outer loop vertex 4.061736e+000 4.322916e+000 6.332898e+000 vertex 4.180220e+000 4.378166e+000 5.332898e+000 vertex 4.061736e+000 4.322916e+000 5.332898e+000 endloop endfacet facet normal -2.588190e-001 9.659258e-001 1.855524e-015 outer loop vertex 3.935457e+000 4.289079e+000 6.332898e+000 vertex 4.061736e+000 4.322916e+000 5.332898e+000 vertex 3.935457e+000 4.289079e+000 5.332898e+000 endloop endfacet facet normal -8.715574e-002 9.961947e-001 1.819131e-015 outer loop vertex 3.805220e+000 4.277685e+000 6.332898e+000 vertex 3.935457e+000 4.289079e+000 5.332898e+000 vertex 3.805220e+000 4.277685e+000 5.332898e+000 endloop endfacet facet normal 8.715574e-002 9.961947e-001 1.797473e-015 outer loop vertex 3.674984e+000 4.289079e+000 6.332898e+000 vertex 3.805220e+000 4.277685e+000 5.332898e+000 vertex 3.674984e+000 4.289079e+000 5.332898e+000 endloop endfacet facet normal 2.588190e-001 9.659258e-001 1.063035e-015 outer loop vertex 3.548705e+000 4.322916e+000 6.332898e+000 vertex 3.674984e+000 4.289079e+000 5.332898e+000 vertex 3.548705e+000 4.322916e+000 5.332898e+000 endloop endfacet facet normal 4.226183e-001 9.063078e-001 2.152348e-015 outer loop vertex 3.430220e+000 4.378166e+000 6.332898e+000 vertex 3.548705e+000 4.322916e+000 5.332898e+000 vertex 3.430220e+000 4.378166e+000 5.332898e+000 endloop endfacet facet normal 5.735764e-001 8.191520e-001 1.998129e-015 outer loop vertex 3.323130e+000 4.453152e+000 6.332898e+000 vertex 3.430220e+000 4.378166e+000 5.332898e+000 vertex 3.323130e+000 4.453152e+000 5.332898e+000 endloop endfacet facet normal 7.071068e-001 7.071068e-001 1.884111e-015 outer loop vertex 3.230687e+000 4.545594e+000 6.332898e+000 vertex 3.323130e+000 4.453152e+000 5.332898e+000 vertex 3.230687e+000 4.545594e+000 5.332898e+000 endloop endfacet facet normal 8.191520e-001 5.735764e-001 1.458126e-015 outer loop vertex 3.155701e+000 4.652685e+000 6.332898e+000 vertex 3.230687e+000 4.545594e+000 5.332898e+000 vertex 3.155701e+000 4.652685e+000 5.332898e+000 endloop endfacet facet normal 9.063078e-001 4.226183e-001 1.442865e-015 outer loop vertex 3.100451e+000 4.771170e+000 6.332898e+000 vertex 3.155701e+000 4.652685e+000 5.332898e+000 vertex 3.100451e+000 4.771170e+000 5.332898e+000 endloop endfacet facet normal 9.659258e-001 2.588190e-001 1.855524e-015 outer loop vertex 3.066615e+000 4.897449e+000 6.332898e+000 vertex 3.100451e+000 4.771170e+000 5.332898e+000 vertex 3.066615e+000 4.897449e+000 5.332898e+000 endloop endfacet facet normal 9.961947e-001 8.715574e-002 9.289182e-016 outer loop vertex 3.055220e+000 5.027685e+000 6.332898e+000 vertex 3.066615e+000 4.897449e+000 5.332898e+000 vertex 3.055220e+000 5.027685e+000 5.332898e+000 endloop endfacet facet normal 9.961947e-001 -8.715574e-002 1.283078e-015 outer loop vertex 3.066615e+000 5.157921e+000 6.332898e+000 vertex 3.055220e+000 5.027685e+000 5.332898e+000 vertex 3.066615e+000 5.157921e+000 5.332898e+000 endloop endfacet facet normal 9.659258e-001 -2.588190e-001 9.030055e-016 outer loop vertex 3.100451e+000 5.284200e+000 6.332898e+000 vertex 3.066615e+000 5.157921e+000 5.332898e+000 vertex 3.100451e+000 5.284200e+000 5.332898e+000 endloop endfacet facet normal 9.063078e-001 -4.226183e-001 1.076174e-015 outer loop vertex 3.155701e+000 5.402685e+000 6.332898e+000 vertex 3.100451e+000 5.284200e+000 5.332898e+000 vertex 3.155701e+000 5.402685e+000 5.332898e+000 endloop endfacet facet normal 8.191520e-001 -5.735764e-001 8.717048e-016 outer loop vertex 3.230687e+000 5.509776e+000 6.332898e+000 vertex 3.155701e+000 5.402685e+000 5.332898e+000 vertex 3.230687e+000 5.509776e+000 5.332898e+000 endloop endfacet facet normal 7.071068e-001 -7.071068e-001 1.256074e-015 outer loop vertex 3.323130e+000 5.602218e+000 6.332898e+000 vertex 3.230687e+000 5.509776e+000 5.332898e+000 vertex 3.323130e+000 5.602218e+000 5.332898e+000 endloop endfacet facet normal 5.735764e-001 -8.191520e-001 7.290631e-016 outer loop vertex 3.430220e+000 5.677204e+000 6.332898e+000 vertex 3.323130e+000 5.602218e+000 5.332898e+000 vertex 3.430220e+000 5.677204e+000 5.332898e+000 endloop endfacet facet normal 4.226183e-001 -9.063078e-001 9.091125e-016 outer loop vertex 3.548705e+000 5.732455e+000 6.332898e+000 vertex 3.430220e+000 5.677204e+000 5.332898e+000 vertex 3.548705e+000 5.732455e+000 5.332898e+000 endloop endfacet facet normal 2.588190e-001 -9.659258e-001 1.847865e-016 outer loop vertex 3.674984e+000 5.766291e+000 6.332898e+000 vertex 3.548705e+000 5.732455e+000 5.332898e+000 vertex 3.674984e+000 5.766291e+000 5.332898e+000 endloop endfacet facet normal 8.715574e-002 -9.961947e-001 8.902133e-016 outer loop vertex 3.805220e+000 5.777685e+000 6.332898e+000 vertex 3.674984e+000 5.766291e+000 5.332898e+000 vertex 3.805220e+000 5.777685e+000 5.332898e+000 endloop endfacet facet normal -8.715574e-002 -9.961947e-001 8.406791e-016 outer loop vertex 3.935457e+000 5.766291e+000 6.332898e+000 vertex 3.805220e+000 5.777685e+000 5.332898e+000 vertex 3.935457e+000 5.766291e+000 5.332898e+000 endloop endfacet facet normal -2.588190e-001 -9.659258e-001 1.760920e-015 outer loop vertex 4.061736e+000 5.732455e+000 6.332898e+000 vertex 3.935457e+000 5.766291e+000 5.332898e+000 vertex 4.061736e+000 5.732455e+000 5.332898e+000 endloop endfacet facet normal -4.226183e-001 -9.063078e-001 1.076174e-015 outer loop vertex 4.180220e+000 5.677204e+000 6.332898e+000 vertex 4.061736e+000 5.732455e+000 5.332898e+000 vertex 4.180220e+000 5.677204e+000 5.332898e+000 endloop endfacet facet normal -5.735764e-001 -8.191520e-001 5.079283e-016 outer loop vertex 4.287311e+000 5.602218e+000 6.332898e+000 vertex 4.180220e+000 5.677204e+000 5.332898e+000 vertex 4.287311e+000 5.602218e+000 5.332898e+000 endloop endfacet facet normal -7.071068e-001 -7.071068e-001 6.280370e-016 outer loop vertex 4.379754e+000 5.509776e+000 6.332898e+000 vertex 4.287311e+000 5.602218e+000 5.332898e+000 vertex 4.379754e+000 5.509776e+000 5.332898e+000 endloop endfacet facet normal -8.191520e-001 -5.735764e-001 7.290631e-016 outer loop vertex 4.454740e+000 5.402685e+000 6.332898e+000 vertex 4.379754e+000 5.509776e+000 5.332898e+000 vertex 4.454740e+000 5.402685e+000 5.332898e+000 endloop endfacet facet normal -9.063078e-001 -4.226183e-001 9.091125e-016 outer loop vertex 4.509990e+000 5.284200e+000 6.332898e+000 vertex 4.454740e+000 5.402685e+000 5.332898e+000 vertex 4.509990e+000 5.284200e+000 5.332898e+000 endloop endfacet facet normal -9.659258e-001 -2.588190e-001 8.128234e-016 outer loop vertex 4.543826e+000 5.157921e+000 6.332898e+000 vertex 4.509990e+000 5.284200e+000 5.332898e+000 vertex 4.543826e+000 5.157921e+000 5.332898e+000 endloop endfacet facet normal -9.659258e-001 -2.588190e-001 -9.023020e-016 outer loop vertex 4.543826e+000 5.157921e+000 6.332898e+000 vertex 4.509990e+000 5.284200e+000 6.332898e+000 vertex 4.509990e+000 5.284200e+000 5.332898e+000 endloop endfacet facet normal -9.063078e-001 -4.226183e-001 -1.081435e-015 outer loop vertex 4.509990e+000 5.284200e+000 6.332898e+000 vertex 4.454740e+000 5.402685e+000 6.332898e+000 vertex 4.454740e+000 5.402685e+000 5.332898e+000 endloop endfacet facet normal -8.191520e-001 -5.735764e-001 -1.235481e-015 outer loop vertex 4.379754e+000 5.509776e+000 6.332898e+000 vertex 4.379754e+000 5.509776e+000 5.332898e+000 vertex 4.454740e+000 5.402685e+000 6.332898e+000 endloop endfacet facet normal -7.071068e-001 -7.071068e-001 -1.260569e-015 outer loop vertex 4.379754e+000 5.509776e+000 6.332898e+000 vertex 4.287311e+000 5.602218e+000 6.332898e+000 vertex 4.287311e+000 5.602218e+000 5.332898e+000 endloop endfacet facet normal -5.735764e-001 -8.191520e-001 -7.165339e-016 outer loop vertex 4.287311e+000 5.602218e+000 6.332898e+000 vertex 4.180220e+000 5.677204e+000 6.332898e+000 vertex 4.180220e+000 5.677204e+000 5.332898e+000 endloop endfacet facet normal -4.226183e-001 -9.063078e-001 -9.951860e-017 outer loop vertex 4.180220e+000 5.677204e+000 6.332898e+000 vertex 4.061736e+000 5.732455e+000 6.332898e+000 vertex 4.061736e+000 5.732455e+000 5.332898e+000 endloop endfacet facet normal -2.588190e-001 -9.659258e-001 -1.041628e-015 outer loop vertex 4.061736e+000 5.732455e+000 6.332898e+000 vertex 3.935457e+000 5.766291e+000 6.332898e+000 vertex 3.935457e+000 5.766291e+000 5.332898e+000 endloop endfacet facet normal -8.715574e-002 -9.961947e-001 -8.902133e-016 outer loop vertex 3.805220e+000 5.777685e+000 6.332898e+000 vertex 3.805220e+000 5.777685e+000 5.332898e+000 vertex 3.935457e+000 5.766291e+000 6.332898e+000 endloop endfacet facet normal 8.715574e-002 -9.961947e-001 -1.726648e-015 outer loop vertex 3.805220e+000 5.777685e+000 6.332898e+000 vertex 3.674984e+000 5.766291e+000 6.332898e+000 vertex 3.674984e+000 5.766291e+000 5.332898e+000 endloop endfacet facet normal 2.588190e-001 -9.659258e-001 -9.089365e-016 outer loop vertex 3.674984e+000 5.766291e+000 6.332898e+000 vertex 3.548705e+000 5.732455e+000 6.332898e+000 vertex 3.548705e+000 5.732455e+000 5.332898e+000 endloop endfacet facet normal 4.226183e-001 -9.063078e-001 -1.081435e-015 outer loop vertex 3.548705e+000 5.732455e+000 6.332898e+000 vertex 3.430220e+000 5.677204e+000 6.332898e+000 vertex 3.430220e+000 5.677204e+000 5.332898e+000 endloop endfacet facet normal 5.735764e-001 -8.191520e-001 -5.042276e-016 outer loop vertex 3.430220e+000 5.677204e+000 6.332898e+000 vertex 3.323130e+000 5.602218e+000 6.332898e+000 vertex 3.323130e+000 5.602218e+000 5.332898e+000 endloop endfacet facet normal 7.071068e-001 -7.071068e-001 -9.421094e-016 outer loop vertex 3.323130e+000 5.602218e+000 6.332898e+000 vertex 3.230687e+000 5.509776e+000 6.332898e+000 vertex 3.230687e+000 5.509776e+000 5.332898e+000 endloop endfacet facet normal 8.191520e-001 -5.735764e-001 -7.298031e-016 outer loop vertex 3.230687e+000 5.509776e+000 6.332898e+000 vertex 3.155701e+000 5.402685e+000 6.332898e+000 vertex 3.155701e+000 5.402685e+000 5.332898e+000 endloop endfacet facet normal 9.063078e-001 -4.226183e-001 -9.089365e-016 outer loop vertex 3.155701e+000 5.402685e+000 6.332898e+000 vertex 3.100451e+000 5.284200e+000 6.332898e+000 vertex 3.100451e+000 5.284200e+000 5.332898e+000 endloop endfacet facet normal 9.659258e-001 -2.588190e-001 -6.103807e-016 outer loop vertex 3.100451e+000 5.284200e+000 6.332898e+000 vertex 3.066615e+000 5.157921e+000 6.332898e+000 vertex 3.066615e+000 5.157921e+000 5.332898e+000 endloop endfacet facet normal 9.961947e-001 -8.715574e-002 -9.289182e-016 outer loop vertex 3.055220e+000 5.027685e+000 6.332898e+000 vertex 3.055220e+000 5.027685e+000 5.332898e+000 vertex 3.066615e+000 5.157921e+000 6.332898e+000 endloop endfacet facet normal 9.961947e-001 8.715574e-002 -1.759821e-015 outer loop vertex 3.055220e+000 5.027685e+000 6.332898e+000 vertex 3.066615e+000 4.897449e+000 6.332898e+000 vertex 3.066615e+000 4.897449e+000 5.332898e+000 endloop endfacet facet normal 9.659258e-001 2.588190e-001 -2.036814e-015 outer loop vertex 3.066615e+000 4.897449e+000 6.332898e+000 vertex 3.100451e+000 4.771170e+000 6.332898e+000 vertex 3.100451e+000 4.771170e+000 5.332898e+000 endloop endfacet facet normal 9.063078e-001 4.226183e-001 -2.149602e-015 outer loop vertex 3.100451e+000 4.771170e+000 6.332898e+000 vertex 3.155701e+000 4.652685e+000 6.332898e+000 vertex 3.155701e+000 4.652685e+000 5.332898e+000 endloop endfacet facet normal 8.191520e-001 5.735764e-001 -1.738258e-015 outer loop vertex 3.155701e+000 4.652685e+000 6.332898e+000 vertex 3.230687e+000 4.545594e+000 6.332898e+000 vertex 3.230687e+000 4.545594e+000 5.332898e+000 endloop endfacet facet normal 7.071068e-001 7.071068e-001 -1.579028e-015 outer loop vertex 3.230687e+000 4.545594e+000 6.332898e+000 vertex 3.323130e+000 4.453152e+000 6.332898e+000 vertex 3.323130e+000 4.453152e+000 5.332898e+000 endloop endfacet facet normal 5.735764e-001 8.191520e-001 -1.459606e-015 outer loop vertex 3.323130e+000 4.453152e+000 6.332898e+000 vertex 3.430220e+000 4.378166e+000 6.332898e+000 vertex 3.430220e+000 4.378166e+000 5.332898e+000 endloop endfacet facet normal 4.226183e-001 9.063078e-001 -2.434888e-015 outer loop vertex 3.430220e+000 4.378166e+000 6.332898e+000 vertex 3.548705e+000 4.322916e+000 6.332898e+000 vertex 3.548705e+000 4.322916e+000 5.332898e+000 endloop endfacet facet normal 2.588190e-001 9.659258e-001 -1.738258e-015 outer loop vertex 3.548705e+000 4.322916e+000 6.332898e+000 vertex 3.674984e+000 4.289079e+000 6.332898e+000 vertex 3.674984e+000 4.289079e+000 5.332898e+000 endloop endfacet facet normal 8.715574e-002 9.961947e-001 -1.819532e-015 outer loop vertex 3.674984e+000 4.289079e+000 6.332898e+000 vertex 3.805220e+000 4.277685e+000 6.332898e+000 vertex 3.805220e+000 4.277685e+000 5.332898e+000 endloop endfacet facet normal -8.715574e-002 9.961947e-001 -1.758162e-015 outer loop vertex 3.805220e+000 4.277685e+000 6.332898e+000 vertex 3.935457e+000 4.289079e+000 6.332898e+000 vertex 3.935457e+000 4.289079e+000 5.332898e+000 endloop endfacet facet normal -2.588190e-001 9.659258e-001 -2.036814e-015 outer loop vertex 3.935457e+000 4.289079e+000 6.332898e+000 vertex 4.061736e+000 4.322916e+000 6.332898e+000 vertex 4.061736e+000 4.322916e+000 5.332898e+000 endloop endfacet facet normal -4.226183e-001 9.063078e-001 -2.149602e-015 outer loop vertex 4.061736e+000 4.322916e+000 6.332898e+000 vertex 4.180220e+000 4.378166e+000 6.332898e+000 vertex 4.180220e+000 4.378166e+000 5.332898e+000 endloop endfacet facet normal -5.735764e-001 8.191520e-001 -2.242486e-015 outer loop vertex 4.180220e+000 4.378166e+000 6.332898e+000 vertex 4.287311e+000 4.453152e+000 6.332898e+000 vertex 4.287311e+000 4.453152e+000 5.332898e+000 endloop endfacet facet normal -7.071068e-001 7.071068e-001 -1.884219e-015 outer loop vertex 4.287311e+000 4.453152e+000 6.332898e+000 vertex 4.379754e+000 4.545594e+000 6.332898e+000 vertex 4.379754e+000 4.545594e+000 5.332898e+000 endloop endfacet facet normal -8.191520e-001 5.735764e-001 -1.459606e-015 outer loop vertex 4.379754e+000 4.545594e+000 6.332898e+000 vertex 4.454740e+000 4.652685e+000 6.332898e+000 vertex 4.454740e+000 4.652685e+000 5.332898e+000 endloop endfacet facet normal -9.063078e-001 4.226183e-001 -1.446337e-015 outer loop vertex 4.454740e+000 4.652685e+000 6.332898e+000 vertex 4.509990e+000 4.771170e+000 6.332898e+000 vertex 4.509990e+000 4.771170e+000 5.332898e+000 endloop endfacet facet normal -9.961947e-001 8.715574e-002 7.470115e-016 outer loop vertex 4.305220e+000 5.027685e+000 3.332898e+000 vertex 4.297624e+000 4.940861e+000 3.332898e+000 vertex 4.297624e+000 4.940861e+000 5.332898e+000 endloop endfacet facet normal -9.961947e-001 8.715574e-002 -3.096394e-016 outer loop vertex 4.305220e+000 5.027685e+000 5.332898e+000 vertex 4.305220e+000 5.027685e+000 3.332898e+000 vertex 4.297624e+000 4.940861e+000 5.332898e+000 endloop endfacet facet normal -9.961947e-001 -8.715574e-002 3.096394e-016 outer loop vertex 4.305220e+000 5.027685e+000 5.332898e+000 vertex 4.297624e+000 5.114509e+000 3.332898e+000 vertex 4.305220e+000 5.027685e+000 3.332898e+000 endloop endfacet facet normal -9.961947e-001 -8.715574e-002 -7.470115e-016 outer loop vertex 4.305220e+000 5.027685e+000 5.332898e+000 vertex 4.297624e+000 5.114509e+000 5.332898e+000 vertex 4.297624e+000 5.114509e+000 3.332898e+000 endloop endfacet facet normal -9.659258e-001 -2.588190e-001 4.372095e-016 outer loop vertex 4.297624e+000 5.114509e+000 3.332898e+000 vertex 4.297624e+000 5.114509e+000 5.332898e+000 vertex 4.275067e+000 5.198695e+000 3.332898e+000 endloop endfacet facet normal -9.659258e-001 -2.588190e-001 -4.207050e-016 outer loop vertex 4.275067e+000 5.198695e+000 3.332898e+000 vertex 4.297624e+000 5.114509e+000 5.332898e+000 vertex 4.275067e+000 5.198695e+000 5.332898e+000 endloop endfacet facet normal -9.063078e-001 -4.226183e-001 -5.923291e-016 outer loop vertex 4.238233e+000 5.277685e+000 3.332898e+000 vertex 4.275067e+000 5.198695e+000 5.332898e+000 vertex 4.238233e+000 5.277685e+000 5.332898e+000 endloop endfacet facet normal -8.191520e-001 -5.735764e-001 -3.264175e-016 outer loop vertex 4.188243e+000 5.349079e+000 3.332898e+000 vertex 4.238233e+000 5.277685e+000 5.332898e+000 vertex 4.188243e+000 5.349079e+000 5.332898e+000 endloop endfacet facet normal -7.071068e-001 -7.071068e-001 -6.280370e-016 outer loop vertex 4.126614e+000 5.410707e+000 3.332898e+000 vertex 4.188243e+000 5.349079e+000 5.332898e+000 vertex 4.126614e+000 5.410707e+000 5.332898e+000 endloop endfacet facet normal -5.735764e-001 -8.191520e-001 -4.011357e-016 outer loop vertex 4.055220e+000 5.460698e+000 3.332898e+000 vertex 4.126614e+000 5.410707e+000 5.332898e+000 vertex 4.055220e+000 5.460698e+000 5.332898e+000 endloop endfacet facet normal -4.226183e-001 -9.063078e-001 -4.003141e-016 outer loop vertex 3.976231e+000 5.497531e+000 3.332898e+000 vertex 4.055220e+000 5.460698e+000 5.332898e+000 vertex 3.976231e+000 5.497531e+000 5.332898e+000 endloop endfacet facet normal -2.588190e-001 -9.659258e-001 -9.236361e-016 outer loop vertex 3.892045e+000 5.520089e+000 3.332898e+000 vertex 3.976231e+000 5.497531e+000 5.332898e+000 vertex 3.892045e+000 5.520089e+000 5.332898e+000 endloop endfacet facet normal -8.715574e-002 -9.961947e-001 -5.999263e-016 outer loop vertex 3.805220e+000 5.527685e+000 3.332898e+000 vertex 3.892045e+000 5.520089e+000 5.332898e+000 vertex 3.805220e+000 5.527685e+000 5.332898e+000 endloop endfacet facet normal 8.715574e-002 -9.961947e-001 -7.272716e-016 outer loop vertex 3.718396e+000 5.520089e+000 3.332898e+000 vertex 3.805220e+000 5.527685e+000 5.332898e+000 vertex 3.718396e+000 5.520089e+000 5.332898e+000 endloop endfacet facet normal 2.588190e-001 -9.659258e-001 -4.207050e-016 outer loop vertex 3.634210e+000 5.497531e+000 3.332898e+000 vertex 3.718396e+000 5.520089e+000 5.332898e+000 vertex 3.634210e+000 5.497531e+000 5.332898e+000 endloop endfacet facet normal 4.226183e-001 -9.063078e-001 -6.861692e-016 outer loop vertex 3.555220e+000 5.460698e+000 3.332898e+000 vertex 3.634210e+000 5.497531e+000 5.332898e+000 vertex 3.555220e+000 5.460698e+000 5.332898e+000 endloop endfacet facet normal 5.735764e-001 -8.191520e-001 -5.811366e-016 outer loop vertex 3.483827e+000 5.410707e+000 3.332898e+000 vertex 3.555220e+000 5.460698e+000 5.332898e+000 vertex 3.483827e+000 5.410707e+000 5.332898e+000 endloop endfacet facet normal 7.071068e-001 -7.071068e-001 -6.280370e-016 outer loop vertex 3.422198e+000 5.349079e+000 3.332898e+000 vertex 3.483827e+000 5.410707e+000 5.332898e+000 vertex 3.422198e+000 5.349079e+000 5.332898e+000 endloop endfacet facet normal 8.191520e-001 -5.735764e-001 -5.830240e-016 outer loop vertex 3.372208e+000 5.277685e+000 3.332898e+000 vertex 3.422198e+000 5.349079e+000 5.332898e+000 vertex 3.372208e+000 5.277685e+000 5.332898e+000 endloop endfacet facet normal 9.063078e-001 -4.226183e-001 -4.138746e-016 outer loop vertex 3.335374e+000 5.198695e+000 3.332898e+000 vertex 3.372208e+000 5.277685e+000 5.332898e+000 vertex 3.335374e+000 5.198695e+000 5.332898e+000 endloop endfacet facet normal 9.659258e-001 -2.588190e-001 -4.372095e-016 outer loop vertex 3.312817e+000 5.114509e+000 3.332898e+000 vertex 3.335374e+000 5.198695e+000 5.332898e+000 vertex 3.312817e+000 5.114509e+000 5.332898e+000 endloop endfacet facet normal 9.961947e-001 -8.715574e-002 -6.192788e-016 outer loop vertex 3.305220e+000 5.027685e+000 3.332898e+000 vertex 3.312817e+000 5.114509e+000 5.332898e+000 vertex 3.305220e+000 5.027685e+000 5.332898e+000 endloop endfacet facet normal 9.961947e-001 8.715574e-002 -7.466241e-016 outer loop vertex 3.312817e+000 4.940861e+000 3.332898e+000 vertex 3.305220e+000 5.027685e+000 5.332898e+000 vertex 3.312817e+000 4.940861e+000 5.332898e+000 endloop endfacet facet normal 9.659258e-001 2.588190e-001 -7.501224e-016 outer loop vertex 3.335374e+000 4.856675e+000 3.332898e+000 vertex 3.312817e+000 4.940861e+000 5.332898e+000 vertex 3.335374e+000 4.856675e+000 5.332898e+000 endloop endfacet facet normal 9.063078e-001 4.226183e-001 -5.787686e-016 outer loop vertex 3.372208e+000 4.777685e+000 3.332898e+000 vertex 3.335374e+000 4.856675e+000 5.332898e+000 vertex 3.372208e+000 4.777685e+000 5.332898e+000 endloop endfacet facet normal 8.191520e-001 5.735764e-001 -5.811366e-016 outer loop vertex 3.422198e+000 4.706291e+000 3.332898e+000 vertex 3.372208e+000 4.777685e+000 5.332898e+000 vertex 3.422198e+000 4.706291e+000 5.332898e+000 endloop endfacet facet normal 7.071068e-001 7.071068e-001 -6.280370e-016 outer loop vertex 3.483827e+000 4.644663e+000 3.332898e+000 vertex 3.422198e+000 4.706291e+000 5.332898e+000 vertex 3.483827e+000 4.644663e+000 5.332898e+000 endloop endfacet facet normal 5.735764e-001 8.191520e-001 -5.284953e-016 outer loop vertex 3.555220e+000 4.594672e+000 3.332898e+000 vertex 3.483827e+000 4.644663e+000 5.332898e+000 vertex 3.555220e+000 4.594672e+000 5.332898e+000 endloop endfacet facet normal 4.226183e-001 9.063078e-001 -8.027956e-016 outer loop vertex 3.634210e+000 4.557839e+000 3.332898e+000 vertex 3.555220e+000 4.594672e+000 5.332898e+000 vertex 3.634210e+000 4.557839e+000 5.332898e+000 endloop endfacet facet normal 2.588190e-001 9.659258e-001 -4.946788e-016 outer loop vertex 3.718396e+000 4.535281e+000 3.332898e+000 vertex 3.634210e+000 4.557839e+000 5.332898e+000 vertex 3.718396e+000 4.535281e+000 5.332898e+000 endloop endfacet facet normal 8.715574e-002 9.961947e-001 -5.999263e-016 outer loop vertex 3.805220e+000 4.527685e+000 3.332898e+000 vertex 3.718396e+000 4.535281e+000 5.332898e+000 vertex 3.805220e+000 4.527685e+000 5.332898e+000 endloop endfacet facet normal -8.715574e-002 9.961947e-001 -2.848723e-016 outer loop vertex 3.892045e+000 4.535281e+000 3.332898e+000 vertex 3.805220e+000 4.527685e+000 5.332898e+000 vertex 3.892045e+000 4.535281e+000 5.332898e+000 endloop endfacet facet normal -2.588190e-001 9.659258e-001 -8.496622e-016 outer loop vertex 3.976231e+000 4.557839e+000 3.332898e+000 vertex 3.892045e+000 4.535281e+000 5.332898e+000 vertex 3.976231e+000 4.557839e+000 5.332898e+000 endloop endfacet facet normal -4.226183e-001 9.063078e-001 -7.800093e-016 outer loop vertex 4.055220e+000 4.594672e+000 3.332898e+000 vertex 3.976231e+000 4.557839e+000 5.332898e+000 vertex 4.055220e+000 4.594672e+000 5.332898e+000 endloop endfacet facet normal -5.735764e-001 8.191520e-001 -5.811366e-016 outer loop vertex 4.126614e+000 4.644663e+000 3.332898e+000 vertex 4.055220e+000 4.594672e+000 5.332898e+000 vertex 4.126614e+000 4.644663e+000 5.332898e+000 endloop endfacet facet normal -7.071068e-001 7.071068e-001 -9.420555e-016 outer loop vertex 4.188243e+000 4.706291e+000 3.332898e+000 vertex 4.126614e+000 4.644663e+000 5.332898e+000 vertex 4.188243e+000 4.706291e+000 5.332898e+000 endloop endfacet facet normal -8.191520e-001 5.735764e-001 -6.558548e-016 outer loop vertex 4.238233e+000 4.777685e+000 3.332898e+000 vertex 4.188243e+000 4.706291e+000 5.332898e+000 vertex 4.238233e+000 4.777685e+000 5.332898e+000 endloop endfacet facet normal -9.063078e-001 4.226183e-001 -8.027956e-016 outer loop vertex 4.275067e+000 4.856675e+000 3.332898e+000 vertex 4.238233e+000 4.777685e+000 5.332898e+000 vertex 4.275067e+000 4.856675e+000 5.332898e+000 endloop endfacet facet normal -9.659258e-001 2.588190e-001 -4.372095e-016 outer loop vertex 4.297624e+000 4.940861e+000 3.332898e+000 vertex 4.275067e+000 4.856675e+000 5.332898e+000 vertex 4.297624e+000 4.940861e+000 5.332898e+000 endloop endfacet facet normal -9.659258e-001 2.588190e-001 4.204661e-016 outer loop vertex 4.297624e+000 4.940861e+000 3.332898e+000 vertex 4.275067e+000 4.856675e+000 3.332898e+000 vertex 4.275067e+000 4.856675e+000 5.332898e+000 endloop endfacet facet normal -9.063078e-001 4.226183e-001 5.946236e-016 outer loop vertex 4.275067e+000 4.856675e+000 3.332898e+000 vertex 4.238233e+000 4.777685e+000 3.332898e+000 vertex 4.238233e+000 4.777685e+000 5.332898e+000 endloop endfacet facet normal -8.191520e-001 5.735764e-001 3.259234e-016 outer loop vertex 4.238233e+000 4.777685e+000 3.332898e+000 vertex 4.188243e+000 4.706291e+000 3.332898e+000 vertex 4.188243e+000 4.706291e+000 5.332898e+000 endloop endfacet facet normal -7.071068e-001 7.071068e-001 6.269672e-016 outer loop vertex 4.188243e+000 4.706291e+000 3.332898e+000 vertex 4.126614e+000 4.644663e+000 3.332898e+000 vertex 4.126614e+000 4.644663e+000 5.332898e+000 endloop endfacet facet normal -5.735764e-001 8.191520e-001 4.005624e-016 outer loop vertex 4.126614e+000 4.644663e+000 3.332898e+000 vertex 4.055220e+000 4.594672e+000 3.332898e+000 vertex 4.055220e+000 4.594672e+000 5.332898e+000 endloop endfacet facet normal -4.226183e-001 9.063078e-001 4.005624e-016 outer loop vertex 4.055220e+000 4.594672e+000 3.332898e+000 vertex 3.976231e+000 4.557839e+000 3.332898e+000 vertex 3.976231e+000 4.557839e+000 5.332898e+000 endloop endfacet facet normal -2.588190e-001 9.659258e-001 9.230350e-016 outer loop vertex 3.976231e+000 4.557839e+000 3.332898e+000 vertex 3.892045e+000 4.535281e+000 3.332898e+000 vertex 3.892045e+000 4.535281e+000 5.332898e+000 endloop endfacet facet normal -8.715574e-002 9.961947e-001 6.002215e-016 outer loop vertex 3.892045e+000 4.535281e+000 3.332898e+000 vertex 3.805220e+000 4.527685e+000 3.332898e+000 vertex 3.805220e+000 4.527685e+000 5.332898e+000 endloop endfacet facet normal 8.715574e-002 9.961947e-001 7.277298e-016 outer loop vertex 3.805220e+000 4.527685e+000 3.332898e+000 vertex 3.718396e+000 4.535281e+000 3.332898e+000 vertex 3.718396e+000 4.535281e+000 5.332898e+000 endloop endfacet facet normal 2.588190e-001 9.659258e-001 4.204661e-016 outer loop vertex 3.718396e+000 4.535281e+000 3.332898e+000 vertex 3.634210e+000 4.557839e+000 3.332898e+000 vertex 3.634210e+000 4.557839e+000 5.332898e+000 endloop endfacet facet normal 4.226183e-001 9.063078e-001 6.841904e-016 outer loop vertex 3.634210e+000 4.557839e+000 3.332898e+000 vertex 3.555220e+000 4.594672e+000 3.332898e+000 vertex 3.555220e+000 4.594672e+000 5.332898e+000 endloop endfacet facet normal 5.735764e-001 8.191520e-001 5.796958e-016 outer loop vertex 3.555220e+000 4.594672e+000 3.332898e+000 vertex 3.483827e+000 4.644663e+000 3.332898e+000 vertex 3.483827e+000 4.644663e+000 5.332898e+000 endloop endfacet facet normal 7.071068e-001 7.071068e-001 6.269672e-016 outer loop vertex 3.483827e+000 4.644663e+000 3.332898e+000 vertex 3.422198e+000 4.706291e+000 3.332898e+000 vertex 3.422198e+000 4.706291e+000 5.332898e+000 endloop endfacet facet normal 8.191520e-001 5.735764e-001 5.821838e-016 outer loop vertex 3.422198e+000 4.706291e+000 3.332898e+000 vertex 3.372208e+000 4.777685e+000 3.332898e+000 vertex 3.372208e+000 4.777685e+000 5.332898e+000 endloop endfacet facet normal 9.063078e-001 4.226183e-001 4.154901e-016 outer loop vertex 3.372208e+000 4.777685e+000 3.332898e+000 vertex 3.335374e+000 4.856675e+000 3.332898e+000 vertex 3.335374e+000 4.856675e+000 5.332898e+000 endloop endfacet facet normal 9.659258e-001 2.588190e-001 4.366379e-016 outer loop vertex 3.335374e+000 4.856675e+000 3.332898e+000 vertex 3.312817e+000 4.940861e+000 3.332898e+000 vertex 3.312817e+000 4.940861e+000 5.332898e+000 endloop endfacet facet normal 9.961947e-001 8.715574e-002 6.195033e-016 outer loop vertex 3.312817e+000 4.940861e+000 3.332898e+000 vertex 3.305220e+000 5.027685e+000 3.332898e+000 vertex 3.305220e+000 5.027685e+000 5.332898e+000 endloop endfacet facet normal 9.961947e-001 -8.715574e-002 7.470115e-016 outer loop vertex 3.305220e+000 5.027685e+000 3.332898e+000 vertex 3.312817e+000 5.114509e+000 3.332898e+000 vertex 3.312817e+000 5.114509e+000 5.332898e+000 endloop endfacet facet normal 9.659258e-001 -2.588190e-001 7.501214e-016 outer loop vertex 3.312817e+000 5.114509e+000 3.332898e+000 vertex 3.335374e+000 5.198695e+000 3.332898e+000 vertex 3.335374e+000 5.198695e+000 5.332898e+000 endloop endfacet facet normal 9.063078e-001 -4.226183e-001 5.796958e-016 outer loop vertex 3.335374e+000 5.198695e+000 3.332898e+000 vertex 3.372208e+000 5.277685e+000 3.332898e+000 vertex 3.372208e+000 5.277685e+000 5.332898e+000 endloop endfacet facet normal 8.191520e-001 -5.735764e-001 5.796958e-016 outer loop vertex 3.372208e+000 5.277685e+000 3.332898e+000 vertex 3.422198e+000 5.349079e+000 3.332898e+000 vertex 3.422198e+000 5.349079e+000 5.332898e+000 endloop endfacet facet normal 7.071068e-001 -7.071068e-001 6.269672e-016 outer loop vertex 3.422198e+000 5.349079e+000 3.332898e+000 vertex 3.483827e+000 5.410707e+000 3.332898e+000 vertex 3.483827e+000 5.410707e+000 5.332898e+000 endloop endfacet facet normal 5.735764e-001 -8.191520e-001 5.274486e-016 outer loop vertex 3.483827e+000 5.410707e+000 3.332898e+000 vertex 3.555220e+000 5.460698e+000 3.332898e+000 vertex 3.555220e+000 5.460698e+000 5.332898e+000 endloop endfacet facet normal 4.226183e-001 -9.063078e-001 8.036127e-016 outer loop vertex 3.555220e+000 5.460698e+000 3.332898e+000 vertex 3.634210e+000 5.497531e+000 3.332898e+000 vertex 3.634210e+000 5.497531e+000 5.332898e+000 endloop endfacet facet normal 2.588190e-001 -9.659258e-001 4.951050e-016 outer loop vertex 3.634210e+000 5.497531e+000 3.332898e+000 vertex 3.718396e+000 5.520089e+000 3.332898e+000 vertex 3.718396e+000 5.520089e+000 5.332898e+000 endloop endfacet facet normal 8.715574e-002 -9.961947e-001 5.995996e-016 outer loop vertex 3.718396e+000 5.520089e+000 3.332898e+000 vertex 3.805220e+000 5.527685e+000 3.332898e+000 vertex 3.805220e+000 5.527685e+000 5.332898e+000 endloop endfacet facet normal -8.715574e-002 -9.961947e-001 2.848720e-016 outer loop vertex 3.805220e+000 5.527685e+000 3.332898e+000 vertex 3.892045e+000 5.520089e+000 3.332898e+000 vertex 3.892045e+000 5.520089e+000 5.332898e+000 endloop endfacet facet normal -2.588190e-001 -9.659258e-001 8.496400e-016 outer loop vertex 3.892045e+000 5.520089e+000 3.332898e+000 vertex 3.976231e+000 5.497531e+000 3.332898e+000 vertex 3.976231e+000 5.497531e+000 5.332898e+000 endloop endfacet facet normal -4.226183e-001 -9.063078e-001 7.787330e-016 outer loop vertex 3.976231e+000 5.497531e+000 3.332898e+000 vertex 4.055220e+000 5.460698e+000 3.332898e+000 vertex 4.055220e+000 5.460698e+000 5.332898e+000 endloop endfacet facet normal -5.735764e-001 -8.191520e-001 5.796958e-016 outer loop vertex 4.055220e+000 5.460698e+000 3.332898e+000 vertex 4.126614e+000 5.410707e+000 3.332898e+000 vertex 4.126614e+000 5.410707e+000 5.332898e+000 endloop endfacet facet normal -7.071068e-001 -7.071068e-001 9.404508e-016 outer loop vertex 4.126614e+000 5.410707e+000 3.332898e+000 vertex 4.188243e+000 5.349079e+000 3.332898e+000 vertex 4.188243e+000 5.349079e+000 5.332898e+000 endloop endfacet facet normal -8.191520e-001 -5.735764e-001 6.543348e-016 outer loop vertex 4.188243e+000 5.349079e+000 3.332898e+000 vertex 4.238233e+000 5.277685e+000 3.332898e+000 vertex 4.238233e+000 5.277685e+000 5.332898e+000 endloop endfacet facet normal -9.063078e-001 -4.226183e-001 8.036127e-016 outer loop vertex 4.238233e+000 5.277685e+000 3.332898e+000 vertex 4.275067e+000 5.198695e+000 3.332898e+000 vertex 4.275067e+000 5.198695e+000 5.332898e+000 endloop endfacet facet normal 0.000000e+000 -8.000000e-001 6.000000e-001 outer loop vertex 6.805220e+000 4.027685e+000 6.332898e+000 vertex 8.052205e-001 4.027685e+000 6.332898e+000 vertex 6.805220e+000 2.527685e+000 4.332898e+000 endloop endfacet facet normal 0.000000e+000 -8.000000e-001 6.000000e-001 outer loop vertex 6.805220e+000 2.527685e+000 4.332898e+000 vertex 8.052205e-001 4.027685e+000 6.332898e+000 vertex 8.052205e-001 2.527685e+000 4.332898e+000 endloop endfacet facet normal 0.000000e+000 -1.000000e+000 0.000000e+000 outer loop vertex 6.805220e+000 2.527685e+000 4.332898e+000 vertex 8.052205e-001 2.527685e+000 4.332898e+000 vertex 8.052205e-001 2.527685e+000 3.332898e+000 endloop endfacet facet normal 0.000000e+000 -1.000000e+000 0.000000e+000 outer loop vertex 6.805220e+000 2.527685e+000 3.332898e+000 vertex 6.805220e+000 2.527685e+000 4.332898e+000 vertex 8.052205e-001 2.527685e+000 3.332898e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 8.052205e-001 2.527685e+000 4.332898e+000 vertex 8.052205e-001 4.027685e+000 6.332898e+000 vertex 8.052205e-001 6.527685e+000 3.332898e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 8.052205e-001 2.527685e+000 3.332898e+000 vertex 8.052205e-001 2.527685e+000 4.332898e+000 vertex 8.052205e-001 6.527685e+000 3.332898e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 8.052205e-001 4.027685e+000 6.332898e+000 vertex 8.052205e-001 6.527685e+000 6.332898e+000 vertex 8.052205e-001 6.527685e+000 3.332898e+000 endloop endfacet facet normal 8.715574e-002 9.961947e-001 0.000000e+000 outer loop vertex 5.805220e+000 7.527685e+000 3.332898e+000 vertex 5.805220e+000 7.527685e+000 6.332898e+000 vertex 5.978869e+000 7.512493e+000 3.332898e+000 endloop endfacet facet normal 8.715574e-002 9.961947e-001 0.000000e+000 outer loop vertex 5.978869e+000 7.512493e+000 3.332898e+000 vertex 5.805220e+000 7.527685e+000 6.332898e+000 vertex 5.978869e+000 7.512493e+000 6.332898e+000 endloop endfacet facet normal 2.588190e-001 9.659258e-001 0.000000e+000 outer loop vertex 6.147241e+000 7.467378e+000 3.332898e+000 vertex 5.978869e+000 7.512493e+000 6.332898e+000 vertex 6.147241e+000 7.467378e+000 6.332898e+000 endloop endfacet facet normal 4.226183e-001 9.063078e-001 0.000000e+000 outer loop vertex 6.305220e+000 7.393710e+000 3.332898e+000 vertex 6.147241e+000 7.467378e+000 6.332898e+000 vertex 6.305220e+000 7.393710e+000 6.332898e+000 endloop endfacet facet normal 5.735764e-001 8.191520e-001 0.000000e+000 outer loop vertex 6.448008e+000 7.293729e+000 3.332898e+000 vertex 6.305220e+000 7.393710e+000 6.332898e+000 vertex 6.448008e+000 7.293729e+000 6.332898e+000 endloop endfacet facet normal 7.071068e-001 7.071068e-001 0.000000e+000 outer loop vertex 6.571265e+000 7.170473e+000 3.332898e+000 vertex 6.448008e+000 7.293729e+000 6.332898e+000 vertex 6.571265e+000 7.170473e+000 6.332898e+000 endloop endfacet facet normal 8.191520e-001 5.735764e-001 0.000000e+000 outer loop vertex 6.671246e+000 7.027685e+000 3.332898e+000 vertex 6.571265e+000 7.170473e+000 6.332898e+000 vertex 6.671246e+000 7.027685e+000 6.332898e+000 endloop endfacet facet normal 9.063078e-001 4.226183e-001 0.000000e+000 outer loop vertex 6.744913e+000 6.869705e+000 3.332898e+000 vertex 6.671246e+000 7.027685e+000 6.332898e+000 vertex 6.744913e+000 6.869705e+000 6.332898e+000 endloop endfacet facet normal 9.659258e-001 2.588190e-001 0.000000e+000 outer loop vertex 6.790028e+000 6.701333e+000 3.332898e+000 vertex 6.744913e+000 6.869705e+000 6.332898e+000 vertex 6.790028e+000 6.701333e+000 6.332898e+000 endloop endfacet facet normal 9.961947e-001 8.715574e-002 0.000000e+000 outer loop vertex 6.805220e+000 6.527685e+000 3.332898e+000 vertex 6.790028e+000 6.701333e+000 6.332898e+000 vertex 6.805220e+000 6.527685e+000 6.332898e+000 endloop endfacet facet normal 9.961947e-001 8.715574e-002 0.000000e+000 outer loop vertex 6.805220e+000 6.527685e+000 3.332898e+000 vertex 6.790028e+000 6.701333e+000 3.332898e+000 vertex 6.790028e+000 6.701333e+000 6.332898e+000 endloop endfacet facet normal 9.659258e-001 2.588190e-001 0.000000e+000 outer loop vertex 6.790028e+000 6.701333e+000 3.332898e+000 vertex 6.744913e+000 6.869705e+000 3.332898e+000 vertex 6.744913e+000 6.869705e+000 6.332898e+000 endloop endfacet facet normal 9.063078e-001 4.226183e-001 0.000000e+000 outer loop vertex 6.744913e+000 6.869705e+000 3.332898e+000 vertex 6.671246e+000 7.027685e+000 3.332898e+000 vertex 6.671246e+000 7.027685e+000 6.332898e+000 endloop endfacet facet normal 8.191520e-001 5.735764e-001 0.000000e+000 outer loop vertex 6.671246e+000 7.027685e+000 3.332898e+000 vertex 6.571265e+000 7.170473e+000 3.332898e+000 vertex 6.571265e+000 7.170473e+000 6.332898e+000 endloop endfacet facet normal 7.071068e-001 7.071068e-001 0.000000e+000 outer loop vertex 6.571265e+000 7.170473e+000 3.332898e+000 vertex 6.448008e+000 7.293729e+000 3.332898e+000 vertex 6.448008e+000 7.293729e+000 6.332898e+000 endloop endfacet facet normal 5.735764e-001 8.191520e-001 0.000000e+000 outer loop vertex 6.448008e+000 7.293729e+000 3.332898e+000 vertex 6.305220e+000 7.393710e+000 3.332898e+000 vertex 6.305220e+000 7.393710e+000 6.332898e+000 endloop endfacet facet normal 4.226183e-001 9.063078e-001 0.000000e+000 outer loop vertex 6.305220e+000 7.393710e+000 3.332898e+000 vertex 6.147241e+000 7.467378e+000 3.332898e+000 vertex 6.147241e+000 7.467378e+000 6.332898e+000 endloop endfacet facet normal 2.588190e-001 9.659258e-001 0.000000e+000 outer loop vertex 6.147241e+000 7.467378e+000 3.332898e+000 vertex 5.978869e+000 7.512493e+000 3.332898e+000 vertex 5.978869e+000 7.512493e+000 6.332898e+000 endloop endfacet facet normal -9.961947e-001 8.715574e-002 0.000000e+000 outer loop vertex 8.052205e-001 6.527685e+000 3.332898e+000 vertex 8.052205e-001 6.527685e+000 6.332898e+000 vertex 8.204127e-001 6.701333e+000 3.332898e+000 endloop endfacet facet normal -9.961947e-001 8.715574e-002 0.000000e+000 outer loop vertex 8.204127e-001 6.701333e+000 3.332898e+000 vertex 8.052205e-001 6.527685e+000 6.332898e+000 vertex 8.204127e-001 6.701333e+000 6.332898e+000 endloop endfacet facet normal -9.659258e-001 2.588190e-001 0.000000e+000 outer loop vertex 8.655279e-001 6.869705e+000 3.332898e+000 vertex 8.204127e-001 6.701333e+000 6.332898e+000 vertex 8.655279e-001 6.869705e+000 6.332898e+000 endloop endfacet facet normal -9.063078e-001 4.226183e-001 0.000000e+000 outer loop vertex 9.391951e-001 7.027685e+000 6.332898e+000 vertex 8.655279e-001 6.869705e+000 3.332898e+000 vertex 8.655279e-001 6.869705e+000 6.332898e+000 endloop endfacet facet normal -9.063078e-001 4.226183e-001 -3.354013e-017 outer loop vertex 9.391951e-001 7.027685e+000 6.332898e+000 vertex 9.391951e-001 7.027685e+000 3.332898e+000 vertex 8.655279e-001 6.869705e+000 3.332898e+000 endloop endfacet facet normal -8.191520e-001 5.735764e-001 -3.031472e-017 outer loop vertex 9.391951e-001 7.027685e+000 6.332898e+000 vertex 1.039176e+000 7.170473e+000 6.332898e+000 vertex 9.391951e-001 7.027685e+000 3.332898e+000 endloop endfacet facet normal -8.191520e-001 5.735764e-001 0.000000e+000 outer loop vertex 9.391951e-001 7.027685e+000 3.332898e+000 vertex 1.039176e+000 7.170473e+000 6.332898e+000 vertex 1.039176e+000 7.170473e+000 3.332898e+000 endloop endfacet facet normal -7.071068e-001 7.071068e-001 0.000000e+000 outer loop vertex 1.039176e+000 7.170473e+000 3.332898e+000 vertex 1.039176e+000 7.170473e+000 6.332898e+000 vertex 1.162433e+000 7.293729e+000 3.332898e+000 endloop endfacet facet normal -7.071068e-001 7.071068e-001 0.000000e+000 outer loop vertex 1.162433e+000 7.293729e+000 3.332898e+000 vertex 1.039176e+000 7.170473e+000 6.332898e+000 vertex 1.162433e+000 7.293729e+000 6.332898e+000 endloop endfacet facet normal -5.735764e-001 8.191520e-001 0.000000e+000 outer loop vertex 1.305220e+000 7.393710e+000 6.332898e+000 vertex 1.162433e+000 7.293729e+000 3.332898e+000 vertex 1.162433e+000 7.293729e+000 6.332898e+000 endloop endfacet facet normal -5.735764e-001 8.191520e-001 -4.245318e-017 outer loop vertex 1.305220e+000 7.393710e+000 6.332898e+000 vertex 1.305220e+000 7.393710e+000 3.332898e+000 vertex 1.162433e+000 7.293729e+000 3.332898e+000 endloop endfacet facet normal -4.226183e-001 9.063078e-001 -3.128003e-017 outer loop vertex 1.305220e+000 7.393710e+000 6.332898e+000 vertex 1.463200e+000 7.467378e+000 6.332898e+000 vertex 1.305220e+000 7.393710e+000 3.332898e+000 endloop endfacet facet normal -4.226183e-001 9.063078e-001 0.000000e+000 outer loop vertex 1.305220e+000 7.393710e+000 3.332898e+000 vertex 1.463200e+000 7.467378e+000 6.332898e+000 vertex 1.463200e+000 7.467378e+000 3.332898e+000 endloop endfacet facet normal -2.588190e-001 9.659258e-001 0.000000e+000 outer loop vertex 1.463200e+000 7.467378e+000 3.332898e+000 vertex 1.463200e+000 7.467378e+000 6.332898e+000 vertex 1.631572e+000 7.512493e+000 3.332898e+000 endloop endfacet facet normal -2.588190e-001 9.659258e-001 0.000000e+000 outer loop vertex 1.631572e+000 7.512493e+000 3.332898e+000 vertex 1.463200e+000 7.467378e+000 6.332898e+000 vertex 1.631572e+000 7.512493e+000 6.332898e+000 endloop endfacet facet normal -8.715574e-002 9.961947e-001 0.000000e+000 outer loop vertex 1.805220e+000 7.527685e+000 3.332898e+000 vertex 1.631572e+000 7.512493e+000 6.332898e+000 vertex 1.805220e+000 7.527685e+000 6.332898e+000 endloop endfacet facet normal -8.715574e-002 9.961947e-001 0.000000e+000 outer loop vertex 1.805220e+000 7.527685e+000 3.332898e+000 vertex 1.631572e+000 7.512493e+000 3.332898e+000 vertex 1.631572e+000 7.512493e+000 6.332898e+000 endloop endfacet facet normal -9.659258e-001 2.588190e-001 0.000000e+000 outer loop vertex 8.655279e-001 6.869705e+000 3.332898e+000 vertex 8.204127e-001 6.701333e+000 3.332898e+000 vertex 8.204127e-001 6.701333e+000 6.332898e+000 endloop endfacet facet normal 0.000000e+000 1.000000e+000 0.000000e+000 outer loop vertex 5.805220e+000 7.527685e+000 6.332898e+000 vertex 5.805220e+000 7.527685e+000 3.332898e+000 vertex 1.805220e+000 7.527685e+000 6.332898e+000 endloop endfacet facet normal 0.000000e+000 1.000000e+000 0.000000e+000 outer loop vertex 1.805220e+000 7.527685e+000 6.332898e+000 vertex 5.805220e+000 7.527685e+000 3.332898e+000 vertex 1.805220e+000 7.527685e+000 3.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 4.305220e+000 5.027685e+000 3.332898e+000 vertex 4.297624e+000 5.114509e+000 3.332898e+000 vertex 6.805220e+000 6.527685e+000 3.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 4.297624e+000 4.940861e+000 3.332898e+000 vertex 6.805220e+000 6.527685e+000 3.332898e+000 vertex 6.805220e+000 2.527685e+000 3.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 4.275067e+000 4.856675e+000 3.332898e+000 vertex 6.805220e+000 2.527685e+000 3.332898e+000 vertex 4.238233e+000 4.777685e+000 3.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 4.275067e+000 4.856675e+000 3.332898e+000 vertex 4.297624e+000 4.940861e+000 3.332898e+000 vertex 6.805220e+000 2.527685e+000 3.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 4.275067e+000 5.198695e+000 3.332898e+000 vertex 6.805220e+000 6.527685e+000 3.332898e+000 vertex 4.297624e+000 5.114509e+000 3.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 4.275067e+000 5.198695e+000 3.332898e+000 vertex 4.238233e+000 5.277685e+000 3.332898e+000 vertex 6.805220e+000 6.527685e+000 3.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 6.805220e+000 6.527685e+000 3.332898e+000 vertex 4.238233e+000 5.277685e+000 3.332898e+000 vertex 4.188243e+000 5.349079e+000 3.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 4.126614e+000 5.410707e+000 3.332898e+000 vertex 6.805220e+000 6.527685e+000 3.332898e+000 vertex 4.188243e+000 5.349079e+000 3.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 4.126614e+000 5.410707e+000 3.332898e+000 vertex 5.805220e+000 7.527685e+000 3.332898e+000 vertex 6.805220e+000 6.527685e+000 3.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 4.126614e+000 5.410707e+000 3.332898e+000 vertex 4.055220e+000 5.460698e+000 3.332898e+000 vertex 5.805220e+000 7.527685e+000 3.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 5.805220e+000 7.527685e+000 3.332898e+000 vertex 4.055220e+000 5.460698e+000 3.332898e+000 vertex 3.976231e+000 5.497531e+000 3.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 3.892045e+000 5.520089e+000 3.332898e+000 vertex 5.805220e+000 7.527685e+000 3.332898e+000 vertex 3.976231e+000 5.497531e+000 3.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 3.892045e+000 5.520089e+000 3.332898e+000 vertex 3.805220e+000 5.527685e+000 3.332898e+000 vertex 5.805220e+000 7.527685e+000 3.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 5.805220e+000 7.527685e+000 3.332898e+000 vertex 3.805220e+000 5.527685e+000 3.332898e+000 vertex 1.805220e+000 7.527685e+000 3.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 1.805220e+000 7.527685e+000 3.332898e+000 vertex 3.805220e+000 5.527685e+000 3.332898e+000 vertex 3.718396e+000 5.520089e+000 3.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 3.634210e+000 5.497531e+000 3.332898e+000 vertex 1.805220e+000 7.527685e+000 3.332898e+000 vertex 3.718396e+000 5.520089e+000 3.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 3.634210e+000 5.497531e+000 3.332898e+000 vertex 3.555220e+000 5.460698e+000 3.332898e+000 vertex 1.805220e+000 7.527685e+000 3.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 1.805220e+000 7.527685e+000 3.332898e+000 vertex 3.555220e+000 5.460698e+000 3.332898e+000 vertex 3.483827e+000 5.410707e+000 3.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 8.052205e-001 6.527685e+000 3.332898e+000 vertex 3.483827e+000 5.410707e+000 3.332898e+000 vertex 3.422198e+000 5.349079e+000 3.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 3.372208e+000 5.277685e+000 3.332898e+000 vertex 8.052205e-001 6.527685e+000 3.332898e+000 vertex 3.422198e+000 5.349079e+000 3.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 3.372208e+000 5.277685e+000 3.332898e+000 vertex 3.335374e+000 5.198695e+000 3.332898e+000 vertex 8.052205e-001 6.527685e+000 3.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 8.052205e-001 6.527685e+000 3.332898e+000 vertex 3.335374e+000 5.198695e+000 3.332898e+000 vertex 3.312817e+000 5.114509e+000 3.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 3.305220e+000 5.027685e+000 3.332898e+000 vertex 8.052205e-001 6.527685e+000 3.332898e+000 vertex 3.312817e+000 5.114509e+000 3.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 3.305220e+000 5.027685e+000 3.332898e+000 vertex 3.312817e+000 4.940861e+000 3.332898e+000 vertex 8.052205e-001 6.527685e+000 3.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 8.052205e-001 6.527685e+000 3.332898e+000 vertex 3.312817e+000 4.940861e+000 3.332898e+000 vertex 8.052205e-001 2.527685e+000 3.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 8.052205e-001 2.527685e+000 3.332898e+000 vertex 3.312817e+000 4.940861e+000 3.332898e+000 vertex 3.335374e+000 4.856675e+000 3.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 3.372208e+000 4.777685e+000 3.332898e+000 vertex 8.052205e-001 2.527685e+000 3.332898e+000 vertex 3.335374e+000 4.856675e+000 3.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 3.372208e+000 4.777685e+000 3.332898e+000 vertex 3.422198e+000 4.706291e+000 3.332898e+000 vertex 8.052205e-001 2.527685e+000 3.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 8.052205e-001 2.527685e+000 3.332898e+000 vertex 3.422198e+000 4.706291e+000 3.332898e+000 vertex 3.483827e+000 4.644663e+000 3.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 3.555220e+000 4.594672e+000 3.332898e+000 vertex 8.052205e-001 2.527685e+000 3.332898e+000 vertex 3.483827e+000 4.644663e+000 3.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 3.555220e+000 4.594672e+000 3.332898e+000 vertex 3.634210e+000 4.557839e+000 3.332898e+000 vertex 8.052205e-001 2.527685e+000 3.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 8.052205e-001 2.527685e+000 3.332898e+000 vertex 3.634210e+000 4.557839e+000 3.332898e+000 vertex 3.718396e+000 4.535281e+000 3.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 3.805220e+000 4.527685e+000 3.332898e+000 vertex 8.052205e-001 2.527685e+000 3.332898e+000 vertex 3.718396e+000 4.535281e+000 3.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 3.805220e+000 4.527685e+000 3.332898e+000 vertex 6.805220e+000 2.527685e+000 3.332898e+000 vertex 8.052205e-001 2.527685e+000 3.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 3.805220e+000 4.527685e+000 3.332898e+000 vertex 3.892045e+000 4.535281e+000 3.332898e+000 vertex 6.805220e+000 2.527685e+000 3.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 6.805220e+000 2.527685e+000 3.332898e+000 vertex 3.892045e+000 4.535281e+000 3.332898e+000 vertex 3.976231e+000 4.557839e+000 3.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 4.055220e+000 4.594672e+000 3.332898e+000 vertex 6.805220e+000 2.527685e+000 3.332898e+000 vertex 3.976231e+000 4.557839e+000 3.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 4.055220e+000 4.594672e+000 3.332898e+000 vertex 4.126614e+000 4.644663e+000 3.332898e+000 vertex 6.805220e+000 2.527685e+000 3.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 6.805220e+000 2.527685e+000 3.332898e+000 vertex 4.126614e+000 4.644663e+000 3.332898e+000 vertex 4.188243e+000 4.706291e+000 3.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 4.238233e+000 4.777685e+000 3.332898e+000 vertex 6.805220e+000 2.527685e+000 3.332898e+000 vertex 4.188243e+000 4.706291e+000 3.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 4.305220e+000 5.027685e+000 3.332898e+000 vertex 6.805220e+000 6.527685e+000 3.332898e+000 vertex 4.297624e+000 4.940861e+000 3.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 6.147241e+000 7.467378e+000 3.332898e+000 vertex 5.805220e+000 7.527685e+000 3.332898e+000 vertex 5.978869e+000 7.512493e+000 3.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 6.147241e+000 7.467378e+000 3.332898e+000 vertex 6.305220e+000 7.393710e+000 3.332898e+000 vertex 5.805220e+000 7.527685e+000 3.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 5.805220e+000 7.527685e+000 3.332898e+000 vertex 6.305220e+000 7.393710e+000 3.332898e+000 vertex 6.448008e+000 7.293729e+000 3.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 6.571265e+000 7.170473e+000 3.332898e+000 vertex 5.805220e+000 7.527685e+000 3.332898e+000 vertex 6.448008e+000 7.293729e+000 3.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 6.571265e+000 7.170473e+000 3.332898e+000 vertex 6.671246e+000 7.027685e+000 3.332898e+000 vertex 5.805220e+000 7.527685e+000 3.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 5.805220e+000 7.527685e+000 3.332898e+000 vertex 6.671246e+000 7.027685e+000 3.332898e+000 vertex 6.744913e+000 6.869705e+000 3.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 6.790028e+000 6.701333e+000 3.332898e+000 vertex 5.805220e+000 7.527685e+000 3.332898e+000 vertex 6.744913e+000 6.869705e+000 3.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 6.790028e+000 6.701333e+000 3.332898e+000 vertex 6.805220e+000 6.527685e+000 3.332898e+000 vertex 5.805220e+000 7.527685e+000 3.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 8.052205e-001 6.527685e+000 3.332898e+000 vertex 8.204127e-001 6.701333e+000 3.332898e+000 vertex 1.805220e+000 7.527685e+000 3.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 3.483827e+000 5.410707e+000 3.332898e+000 vertex 8.052205e-001 6.527685e+000 3.332898e+000 vertex 1.805220e+000 7.527685e+000 3.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 8.655279e-001 6.869705e+000 3.332898e+000 vertex 1.805220e+000 7.527685e+000 3.332898e+000 vertex 8.204127e-001 6.701333e+000 3.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 8.655279e-001 6.869705e+000 3.332898e+000 vertex 9.391951e-001 7.027685e+000 3.332898e+000 vertex 1.805220e+000 7.527685e+000 3.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 1.805220e+000 7.527685e+000 3.332898e+000 vertex 9.391951e-001 7.027685e+000 3.332898e+000 vertex 1.039176e+000 7.170473e+000 3.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 1.162433e+000 7.293729e+000 3.332898e+000 vertex 1.805220e+000 7.527685e+000 3.332898e+000 vertex 1.039176e+000 7.170473e+000 3.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 1.162433e+000 7.293729e+000 3.332898e+000 vertex 1.305220e+000 7.393710e+000 3.332898e+000 vertex 1.805220e+000 7.527685e+000 3.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 1.805220e+000 7.527685e+000 3.332898e+000 vertex 1.305220e+000 7.393710e+000 3.332898e+000 vertex 1.463200e+000 7.467378e+000 3.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 1.631572e+000 7.512493e+000 3.332898e+000 vertex 1.805220e+000 7.527685e+000 3.332898e+000 vertex 1.463200e+000 7.467378e+000 3.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.555220e+000 5.027685e+000 6.332898e+000 vertex 4.543826e+000 4.897449e+000 6.332898e+000 vertex 6.805220e+000 4.027685e+000 6.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.543826e+000 5.157921e+000 6.332898e+000 vertex 6.805220e+000 4.027685e+000 6.332898e+000 vertex 6.805220e+000 6.527685e+000 6.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.509990e+000 5.284200e+000 6.332898e+000 vertex 6.805220e+000 6.527685e+000 6.332898e+000 vertex 4.454740e+000 5.402685e+000 6.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.509990e+000 5.284200e+000 6.332898e+000 vertex 4.543826e+000 5.157921e+000 6.332898e+000 vertex 6.805220e+000 6.527685e+000 6.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.543826e+000 4.897449e+000 6.332898e+000 vertex 4.509990e+000 4.771170e+000 6.332898e+000 vertex 6.805220e+000 4.027685e+000 6.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 6.805220e+000 4.027685e+000 6.332898e+000 vertex 4.509990e+000 4.771170e+000 6.332898e+000 vertex 4.454740e+000 4.652685e+000 6.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.379754e+000 4.545594e+000 6.332898e+000 vertex 6.805220e+000 4.027685e+000 6.332898e+000 vertex 4.454740e+000 4.652685e+000 6.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.379754e+000 4.545594e+000 6.332898e+000 vertex 4.287311e+000 4.453152e+000 6.332898e+000 vertex 6.805220e+000 4.027685e+000 6.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 6.805220e+000 4.027685e+000 6.332898e+000 vertex 4.287311e+000 4.453152e+000 6.332898e+000 vertex 4.180220e+000 4.378166e+000 6.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.061736e+000 4.322916e+000 6.332898e+000 vertex 6.805220e+000 4.027685e+000 6.332898e+000 vertex 4.180220e+000 4.378166e+000 6.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.061736e+000 4.322916e+000 6.332898e+000 vertex 3.935457e+000 4.289079e+000 6.332898e+000 vertex 6.805220e+000 4.027685e+000 6.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 6.805220e+000 4.027685e+000 6.332898e+000 vertex 3.935457e+000 4.289079e+000 6.332898e+000 vertex 3.805220e+000 4.277685e+000 6.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 8.052205e-001 4.027685e+000 6.332898e+000 vertex 3.805220e+000 4.277685e+000 6.332898e+000 vertex 3.674984e+000 4.289079e+000 6.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.548705e+000 4.322916e+000 6.332898e+000 vertex 8.052205e-001 4.027685e+000 6.332898e+000 vertex 3.674984e+000 4.289079e+000 6.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.548705e+000 4.322916e+000 6.332898e+000 vertex 3.430220e+000 4.378166e+000 6.332898e+000 vertex 8.052205e-001 4.027685e+000 6.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 8.052205e-001 4.027685e+000 6.332898e+000 vertex 3.430220e+000 4.378166e+000 6.332898e+000 vertex 3.323130e+000 4.453152e+000 6.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.230687e+000 4.545594e+000 6.332898e+000 vertex 8.052205e-001 4.027685e+000 6.332898e+000 vertex 3.323130e+000 4.453152e+000 6.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.230687e+000 4.545594e+000 6.332898e+000 vertex 3.155701e+000 4.652685e+000 6.332898e+000 vertex 8.052205e-001 4.027685e+000 6.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 8.052205e-001 4.027685e+000 6.332898e+000 vertex 3.155701e+000 4.652685e+000 6.332898e+000 vertex 3.100451e+000 4.771170e+000 6.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.066615e+000 4.897449e+000 6.332898e+000 vertex 8.052205e-001 4.027685e+000 6.332898e+000 vertex 3.100451e+000 4.771170e+000 6.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.066615e+000 4.897449e+000 6.332898e+000 vertex 3.055220e+000 5.027685e+000 6.332898e+000 vertex 8.052205e-001 4.027685e+000 6.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 8.052205e-001 4.027685e+000 6.332898e+000 vertex 3.055220e+000 5.027685e+000 6.332898e+000 vertex 3.066615e+000 5.157921e+000 6.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 8.052205e-001 6.527685e+000 6.332898e+000 vertex 3.066615e+000 5.157921e+000 6.332898e+000 vertex 3.100451e+000 5.284200e+000 6.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.155701e+000 5.402685e+000 6.332898e+000 vertex 8.052205e-001 6.527685e+000 6.332898e+000 vertex 3.100451e+000 5.284200e+000 6.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.155701e+000 5.402685e+000 6.332898e+000 vertex 3.230687e+000 5.509776e+000 6.332898e+000 vertex 8.052205e-001 6.527685e+000 6.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 8.052205e-001 6.527685e+000 6.332898e+000 vertex 3.230687e+000 5.509776e+000 6.332898e+000 vertex 3.323130e+000 5.602218e+000 6.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.430220e+000 5.677204e+000 6.332898e+000 vertex 8.052205e-001 6.527685e+000 6.332898e+000 vertex 3.323130e+000 5.602218e+000 6.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.430220e+000 5.677204e+000 6.332898e+000 vertex 3.548705e+000 5.732455e+000 6.332898e+000 vertex 8.052205e-001 6.527685e+000 6.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 8.052205e-001 6.527685e+000 6.332898e+000 vertex 3.548705e+000 5.732455e+000 6.332898e+000 vertex 8.204127e-001 6.701333e+000 6.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 8.204127e-001 6.701333e+000 6.332898e+000 vertex 3.548705e+000 5.732455e+000 6.332898e+000 vertex 1.805220e+000 7.527685e+000 6.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 8.655279e-001 6.869705e+000 6.332898e+000 vertex 1.805220e+000 7.527685e+000 6.332898e+000 vertex 9.391951e-001 7.027685e+000 6.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 8.655279e-001 6.869705e+000 6.332898e+000 vertex 8.204127e-001 6.701333e+000 6.332898e+000 vertex 1.805220e+000 7.527685e+000 6.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.548705e+000 5.732455e+000 6.332898e+000 vertex 3.674984e+000 5.766291e+000 6.332898e+000 vertex 1.805220e+000 7.527685e+000 6.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 1.805220e+000 7.527685e+000 6.332898e+000 vertex 3.674984e+000 5.766291e+000 6.332898e+000 vertex 3.805220e+000 5.777685e+000 6.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 5.805220e+000 7.527685e+000 6.332898e+000 vertex 3.805220e+000 5.777685e+000 6.332898e+000 vertex 3.935457e+000 5.766291e+000 6.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.061736e+000 5.732455e+000 6.332898e+000 vertex 5.805220e+000 7.527685e+000 6.332898e+000 vertex 3.935457e+000 5.766291e+000 6.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.061736e+000 5.732455e+000 6.332898e+000 vertex 6.790028e+000 6.701333e+000 6.332898e+000 vertex 5.805220e+000 7.527685e+000 6.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.061736e+000 5.732455e+000 6.332898e+000 vertex 6.805220e+000 6.527685e+000 6.332898e+000 vertex 6.790028e+000 6.701333e+000 6.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.061736e+000 5.732455e+000 6.332898e+000 vertex 4.180220e+000 5.677204e+000 6.332898e+000 vertex 6.805220e+000 6.527685e+000 6.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 6.805220e+000 6.527685e+000 6.332898e+000 vertex 4.180220e+000 5.677204e+000 6.332898e+000 vertex 4.287311e+000 5.602218e+000 6.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.379754e+000 5.509776e+000 6.332898e+000 vertex 6.805220e+000 6.527685e+000 6.332898e+000 vertex 4.287311e+000 5.602218e+000 6.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.379754e+000 5.509776e+000 6.332898e+000 vertex 4.454740e+000 5.402685e+000 6.332898e+000 vertex 6.805220e+000 6.527685e+000 6.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.555220e+000 5.027685e+000 6.332898e+000 vertex 6.805220e+000 4.027685e+000 6.332898e+000 vertex 4.543826e+000 5.157921e+000 6.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 8.052205e-001 4.027685e+000 6.332898e+000 vertex 6.805220e+000 4.027685e+000 6.332898e+000 vertex 3.805220e+000 4.277685e+000 6.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 6.744913e+000 6.869705e+000 6.332898e+000 vertex 5.805220e+000 7.527685e+000 6.332898e+000 vertex 6.790028e+000 6.701333e+000 6.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 6.744913e+000 6.869705e+000 6.332898e+000 vertex 6.671246e+000 7.027685e+000 6.332898e+000 vertex 5.805220e+000 7.527685e+000 6.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 5.805220e+000 7.527685e+000 6.332898e+000 vertex 6.671246e+000 7.027685e+000 6.332898e+000 vertex 6.571265e+000 7.170473e+000 6.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 6.448008e+000 7.293729e+000 6.332898e+000 vertex 5.805220e+000 7.527685e+000 6.332898e+000 vertex 6.571265e+000 7.170473e+000 6.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 6.448008e+000 7.293729e+000 6.332898e+000 vertex 6.305220e+000 7.393710e+000 6.332898e+000 vertex 5.805220e+000 7.527685e+000 6.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 5.805220e+000 7.527685e+000 6.332898e+000 vertex 6.305220e+000 7.393710e+000 6.332898e+000 vertex 6.147241e+000 7.467378e+000 6.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 5.978869e+000 7.512493e+000 6.332898e+000 vertex 5.805220e+000 7.527685e+000 6.332898e+000 vertex 6.147241e+000 7.467378e+000 6.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 1.805220e+000 7.527685e+000 6.332898e+000 vertex 3.805220e+000 5.777685e+000 6.332898e+000 vertex 5.805220e+000 7.527685e+000 6.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 1.463200e+000 7.467378e+000 6.332898e+000 vertex 1.805220e+000 7.527685e+000 6.332898e+000 vertex 1.631572e+000 7.512493e+000 6.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 1.463200e+000 7.467378e+000 6.332898e+000 vertex 1.305220e+000 7.393710e+000 6.332898e+000 vertex 1.805220e+000 7.527685e+000 6.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 1.805220e+000 7.527685e+000 6.332898e+000 vertex 1.305220e+000 7.393710e+000 6.332898e+000 vertex 1.162433e+000 7.293729e+000 6.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 1.039176e+000 7.170473e+000 6.332898e+000 vertex 1.805220e+000 7.527685e+000 6.332898e+000 vertex 1.162433e+000 7.293729e+000 6.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 1.039176e+000 7.170473e+000 6.332898e+000 vertex 9.391951e-001 7.027685e+000 6.332898e+000 vertex 1.805220e+000 7.527685e+000 6.332898e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 8.052205e-001 6.527685e+000 6.332898e+000 vertex 8.052205e-001 4.027685e+000 6.332898e+000 vertex 3.066615e+000 5.157921e+000 6.332898e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 6.805220e+000 4.027685e+000 6.332898e+000 vertex 6.805220e+000 2.527685e+000 4.332898e+000 vertex 6.805220e+000 6.527685e+000 3.332898e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 6.805220e+000 6.527685e+000 6.332898e+000 vertex 6.805220e+000 4.027685e+000 6.332898e+000 vertex 6.805220e+000 6.527685e+000 3.332898e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 6.805220e+000 2.527685e+000 4.332898e+000 vertex 6.805220e+000 2.527685e+000 3.332898e+000 vertex 6.805220e+000 6.527685e+000 3.332898e+000 endloop endfacet endsolid netgen-6.2.1804/tutorials/twocyl.geo0000644000175000017500000000047313272137567016054 0ustar kurtkurtalgebraic3d # # two intersecting cylinderes # solid cyl1 = cylinder ( 1, 0, 0; -1, 0, 0; 0.5 ) and plane (-1, 0, 0; -1, 0, 0) and plane (1, 0, 0; 1, 0, 0); solid cyl2 = cylinder ( 0, 1, 0.3; 0, -1, 0.3; 0.5 ) and plane (0, -1, 0; 0, -1, 0) and plane (0, 1, 0; 0, 1, 0); solid main = cyl1 or cyl2; tlo main; netgen-6.2.1804/tutorials/boxcyl.geo0000644000175000017500000000105613272137567016031 0ustar kurtkurt# ## Two cylinders on a box # algebraic3d #define box: solid box = plane (0, 0, 0.5; -1, 0, 0) and plane (0, 0, 0.5; 0, -1, 0) and plane (0, 0, 0.5; 0, 0, -1) and plane (2, 1.5, 1; 1, 0, 0) and plane (2, 1.5, 1; 0, 1, 0) and plane (2, 1.5, 1; 0, 0, 1); #define cylinders: solid cyls = (cylinder (0.5, 0.75, 0; 0.5, 0.75, 2; 0.3) or cylinder (1.5, 0.75, 0; 1.5, 0.75, 2; 0.3) ) and plane (0, 0, 0.7; 0, 0, -1) and plane (0, 0, 1.5; 0, 0, 1); #combine both: solid main = box or cyls; #define sub-domains: tlo main; singular edge box cyls; netgen-6.2.1804/tutorials/screw.step0000755000175000017500000025475013272137567016073 0ustar kurtkurtISO-10303-21; HEADER; FILE_DESCRIPTION(('a Product shape'),'1'); FILE_NAME('Euclid Shape Model','1998-09-10T11:25:01',('Author Name'),( 'MATRA-DATAVISION'),'OL-2.0B','EUCLID','Authorisation status'); FILE_SCHEMA(('AUTOMOTIVE_DESIGN_CC1 { 1 2 10303 214 -1 1 3 2}')); ENDSEC; DATA; #1 = PRODUCT_RELATED_PRODUCT_CATEGORY('Undefined Category','Undefined De scription',(#2)); #2 = PRODUCT('the product name','the product name','void',(#3)); #3 = MECHANICAL_CONTEXT('Mechanical',#4,'Assembly'); #4 = APPLICATION_CONTEXT('EUCLID'); #5 = APPLICATION_PROTOCOL_DEFINITION('CommitteeDraft','automotive_design ',1997,#4); #6 = SHAPE_DEFINITION_REPRESENTATION(#7,#11); #7 = PRODUCT_DEFINITION_SHAPE('void','void',#8); #8 = PRODUCT_DEFINITION('void','void',#9,#10); #9 = PRODUCT_DEFINITION_FORMATION('ID','void',#2); #10 = PRODUCT_DEFINITION_CONTEXT('as proposed',#4,'First_Design'); #11 = ADVANCED_BREP_SHAPE_REPRESENTATION('',(#12),#1236); #12 = MANIFOLD_SOLID_BREP('',#13); #13 = CLOSED_SHELL('',(#14,#257,#558,#709,#803,#874,#944,#1052,#1151, #1232)); #14 = ADVANCED_FACE('',(#15),#49,.F.); #15 = FACE_BOUND('',#16,.F.); #16 = EDGE_LOOP('',(#17,#136,#186,#214)); #17 = ORIENTED_EDGE('',*,*,#18,.T.); #18 = EDGE_CURVE('',#19,#21,#23,.T.); #19 = VERTEX_POINT('',#20); #20 = CARTESIAN_POINT('',(-27.8196811084,0.423702927757,5.43633)); #21 = VERTEX_POINT('',#22); #22 = CARTESIAN_POINT('',(-7.976546275424,0.423702927757,5.43633)); #23 = SURFACE_CURVE('',#24,(#48,#80),.PCURVE_S2.); #24 = B_SPLINE_CURVE_WITH_KNOTS('',3,(#25,#26,#27,#28,#29,#30,#31,#32, #33,#34,#35,#36,#37,#38,#39,#40,#41,#42,#43,#44,#45,#46,#47), .UNSPECIFIED.,.F.,.F.,(4,2,2,2,2,3,2,2,2,2,4),(-9.753048731913, -8.657376849694,-4.328688424847,-2.164344212423,-1.082172106212, 0.E+000,1.082172106212,2.164344212423,4.328688424847,8.657376849694, 9.753048731913),.UNSPECIFIED.); #25 = CARTESIAN_POINT('',(-27.8196811084,0.423702927757,5.43633)); #26 = CARTESIAN_POINT('',(-27.44664177115,0.423702927757,5.566853116015) ); #27 = CARTESIAN_POINT('',(-27.07201055731,0.423702927757,5.693350129935) ); #28 = CARTESIAN_POINT('',(-25.21253263571,0.423702927757,6.298546031822) ); #29 = CARTESIAN_POINT('',(-23.71979442537,0.423702927757,6.713431512354) ); #30 = CARTESIAN_POINT('',(-21.51106042838,0.423702927757,7.221607932559) ); #31 = CARTESIAN_POINT('',(-20.78124758741,0.423702927757,7.372657524772) ); #32 = CARTESIAN_POINT('',(-19.696293462,0.423702927757,7.56017012803)); #33 = CARTESIAN_POINT('',(-19.33642071715,0.423702927757,7.616304970701) ); #34 = CARTESIAN_POINT('',(-18.61775332841,0.423702927757,7.702450972357) ); #35 = CARTESIAN_POINT('',(-18.25883772732,0.423702927757,7.731450038723) ); #36 = CARTESIAN_POINT('',(-17.89811369191,0.423702927757,7.731450038723) ); #37 = CARTESIAN_POINT('',(-17.53738965651,0.423702927757,7.731450038723) ); #38 = CARTESIAN_POINT('',(-17.17847405541,0.423702927757,7.702450972357) ); #39 = CARTESIAN_POINT('',(-16.45980666667,0.423702927757,7.616304970701) ); #40 = CARTESIAN_POINT('',(-16.09993392183,0.423702927757,7.56017012803) ); #41 = CARTESIAN_POINT('',(-15.01497979641,0.423702927757,7.372657524772) ); #42 = CARTESIAN_POINT('',(-14.28516695545,0.423702927757,7.221607932559) ); #43 = CARTESIAN_POINT('',(-12.07643295845,0.423702927757,6.713431512354) ); #44 = CARTESIAN_POINT('',(-10.58369474811,0.423702927757,6.298546031822) ); #45 = CARTESIAN_POINT('',(-8.724216826515,0.423702927757,5.693350129935) ); #46 = CARTESIAN_POINT('',(-8.349585612678,0.423702927757,5.566853116015) ); #47 = CARTESIAN_POINT('',(-7.976546275424,0.423702927757,5.43633)); #48 = PCURVE('',#49,#54); #49 = PLANE('',#50); #50 = AXIS2_PLACEMENT_3D('',#51,#52,#53); #51 = CARTESIAN_POINT('',(-2.898113691917,0.423702927757,7.93633)); #52 = DIRECTION('',(0.E+000,1.,0.E+000)); #53 = DIRECTION('',(0.E+000,0.E+000,1.)); #54 = DEFINITIONAL_REPRESENTATION('',(#55),#79); #55 = B_SPLINE_CURVE_WITH_KNOTS('',3,(#56,#57,#58,#59,#60,#61,#62,#63, #64,#65,#66,#67,#68,#69,#70,#71,#72,#73,#74,#75,#76,#77,#78), .UNSPECIFIED.,.F.,.F.,(4,2,2,2,2,3,2,2,2,2,4),(-9.753048731913, -8.657376849694,-4.328688424847,-2.164344212423,-1.082172106212, 0.E+000,1.082172106212,2.164344212423,4.328688424847,8.657376849694, 9.753048731913),.UNSPECIFIED.); #56 = CARTESIAN_POINT('',(-2.5,-24.92156741649)); #57 = CARTESIAN_POINT('',(-2.369476883985,-24.54852807923)); #58 = CARTESIAN_POINT('',(-2.242979870065,-24.1738968654)); #59 = CARTESIAN_POINT('',(-1.637783968178,-22.31441894379)); #60 = CARTESIAN_POINT('',(-1.222898487646,-20.82168073346)); #61 = CARTESIAN_POINT('',(-0.714722067441,-18.61294673646)); #62 = CARTESIAN_POINT('',(-0.563672475228,-17.88313389549)); #63 = CARTESIAN_POINT('',(-0.37615987197,-16.79817977008)); #64 = CARTESIAN_POINT('',(-0.320025029299,-16.43830702524)); #65 = CARTESIAN_POINT('',(-0.233879027643,-15.71963963649)); #66 = CARTESIAN_POINT('',(-0.204879961277,-15.3607240354)); #67 = CARTESIAN_POINT('',(-0.204879961277,-15.)); #68 = CARTESIAN_POINT('',(-0.204879961277,-14.63927596459)); #69 = CARTESIAN_POINT('',(-0.233879027643,-14.2803603635)); #70 = CARTESIAN_POINT('',(-0.320025029299,-13.56169297476)); #71 = CARTESIAN_POINT('',(-0.37615987197,-13.20182022991)); #72 = CARTESIAN_POINT('',(-0.563672475228,-12.1168661045)); #73 = CARTESIAN_POINT('',(-0.714722067441,-11.38705326353)); #74 = CARTESIAN_POINT('',(-1.222898487646,-9.178319266539)); #75 = CARTESIAN_POINT('',(-1.637783968178,-7.685581056201)); #76 = CARTESIAN_POINT('',(-2.242979870065,-5.826103134599)); #77 = CARTESIAN_POINT('',(-2.369476883985,-5.451471920761)); #78 = CARTESIAN_POINT('',(-2.5,-5.078432583508)); #79 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' ) ); #80 = PCURVE('',#81,#86); #81 = TOROIDAL_SURFACE('',#82,8.25,54.873718663856); #82 = AXIS2_PLACEMENT_3D('',#83,#84,#85); #83 = CARTESIAN_POINT('',(-17.89811369191,-0.826297072243,-46.31367)); #84 = DIRECTION('',(0.E+000,-2.22044604925E-016,-1.)); #85 = DIRECTION('',(0.E+000,1.,-2.22044604925E-016)); #86 = DEFINITIONAL_REPRESENTATION('',(#87),#135); #87 = B_SPLINE_CURVE_WITH_KNOTS('',3,(#88,#89,#90,#91,#92,#93,#94,#95, #96,#97,#98,#99,#100,#101,#102,#103,#104,#105,#106,#107,#108,#109, #110,#111,#112,#113,#114,#115,#116,#117,#118,#119,#120,#121,#122, #123,#124,#125,#126,#127,#128,#129,#130,#131,#132,#133,#134), .UNSPECIFIED.,.F.,.F.,(4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 ,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4),(-9.753048731913, -9.309728335008,-8.866407938103,-8.423087541198,-7.979767144292, -7.536446747387,-7.093126350482,-6.649805953577,-6.206485556672, -5.763165159767,-5.319844762862,-4.876524365957,-4.433203969051, -3.989883572146,-3.546563175241,-3.103242778336,-2.659922381431, -2.216601984526,-1.773281587621,-1.329961190715,-0.88664079381, -0.443320396905,-3.552713678801E-015,0.443320396905,0.88664079381, 1.329961190715,1.773281587621,2.216601984526,2.659922381431, 3.103242778336,3.546563175241,3.989883572146,4.433203969051, 4.876524365957,5.319844762862,5.763165159767,6.206485556672, 6.649805953577,7.093126350482,7.536446747387,7.979767144292, 8.423087541198,8.866407938103,9.309728335008,9.753048731913), .UNSPECIFIED.); #88 = CARTESIAN_POINT('',(1.696124157963,-1.90983622455)); #89 = CARTESIAN_POINT('',(1.698012122136,-1.906942595099)); #90 = CARTESIAN_POINT('',(1.701959356034,-1.901155814072)); #91 = CARTESIAN_POINT('',(1.7084874644,-1.89248391648)); #92 = CARTESIAN_POINT('',(1.715711359905,-1.883824473771)); #93 = CARTESIAN_POINT('',(1.723736411497,-1.875190974748)); #94 = CARTESIAN_POINT('',(1.732699041614,-1.866586665031)); #95 = CARTESIAN_POINT('',(1.742767310299,-1.858016637247)); #96 = CARTESIAN_POINT('',(1.754151612829,-1.849486074495)); #97 = CARTESIAN_POINT('',(1.767118375587,-1.841000912303)); #98 = CARTESIAN_POINT('',(1.782009704244,-1.832567946628)); #99 = CARTESIAN_POINT('',(1.799271790701,-1.824195173621)); #100 = CARTESIAN_POINT('',(1.819496092675,-1.815892420892)); #101 = CARTESIAN_POINT('',(1.843483731328,-1.80767162354)); #102 = CARTESIAN_POINT('',(1.872335628537,-1.799549911231)); #103 = CARTESIAN_POINT('',(1.907592262986,-1.791552841646)); #104 = CARTESIAN_POINT('',(1.951530266856,-1.783707862826)); #105 = CARTESIAN_POINT('',(2.007543357991,-1.776058774724)); #106 = CARTESIAN_POINT('',(2.080862934592,-1.768674005145)); #107 = CARTESIAN_POINT('',(2.179681847184,-1.761668166881)); #108 = CARTESIAN_POINT('',(2.317050874271,-1.755240554276)); #109 = CARTESIAN_POINT('',(2.512524285783,-1.74974343193)); #110 = CARTESIAN_POINT('',(2.788441810662,-1.745797607263)); #111 = CARTESIAN_POINT('',(3.14159265359,-1.744297890708)); #112 = CARTESIAN_POINT('',(3.494743496518,-1.745797607263)); #113 = CARTESIAN_POINT('',(3.770661021397,-1.74974343193)); #114 = CARTESIAN_POINT('',(3.966134432908,-1.755240554276)); #115 = CARTESIAN_POINT('',(4.103503459996,-1.761668166881)); #116 = CARTESIAN_POINT('',(4.202322372587,-1.768674005145)); #117 = CARTESIAN_POINT('',(4.275641949188,-1.776058774724)); #118 = CARTESIAN_POINT('',(4.331655040323,-1.783707862826)); #119 = CARTESIAN_POINT('',(4.375593044193,-1.791552841646)); #120 = CARTESIAN_POINT('',(4.410849678643,-1.799549911231)); #121 = CARTESIAN_POINT('',(4.439701575852,-1.80767162354)); #122 = CARTESIAN_POINT('',(4.463689214504,-1.815892420892)); #123 = CARTESIAN_POINT('',(4.483913516478,-1.824195173621)); #124 = CARTESIAN_POINT('',(4.501175602935,-1.832567946628)); #125 = CARTESIAN_POINT('',(4.516066931592,-1.841000912303)); #126 = CARTESIAN_POINT('',(4.529033694351,-1.849486074495)); #127 = CARTESIAN_POINT('',(4.54041799688,-1.858016637247)); #128 = CARTESIAN_POINT('',(4.550486265566,-1.866586665031)); #129 = CARTESIAN_POINT('',(4.559448895683,-1.875190974748)); #130 = CARTESIAN_POINT('',(4.567473947275,-1.883824473771)); #131 = CARTESIAN_POINT('',(4.57469784278,-1.89248391648)); #132 = CARTESIAN_POINT('',(4.581225951145,-1.901155814072)); #133 = CARTESIAN_POINT('',(4.585173185044,-1.906942595099)); #134 = CARTESIAN_POINT('',(4.587061149217,-1.90983622455)); #135 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' ) ); #136 = ORIENTED_EDGE('',*,*,#137,.T.); #137 = EDGE_CURVE('',#21,#138,#140,.T.); #138 = VERTEX_POINT('',#139); #139 = CARTESIAN_POINT('',(-10.50301396304,0.423702927757,2.93633)); #140 = SURFACE_CURVE('',#141,(#145,#152),.PCURVE_S2.); #141 = ( BOUNDED_CURVE() B_SPLINE_CURVE(2,(#142,#143,#144), .UNSPECIFIED.,.F.,.F.) B_SPLINE_CURVE_WITH_KNOTS((3,3),(0.E+000, 3.554299705008),.PIECEWISE_BEZIER_KNOTS.) CURVE() GEOMETRIC_REPRESENTATION_ITEM() RATIONAL_B_SPLINE_CURVE((1., 1.010587075049,1.)) REPRESENTATION_ITEM('') ); #142 = CARTESIAN_POINT('',(-7.976546275424,0.423702927757,5.43633)); #143 = CARTESIAN_POINT('',(-9.420242096928,0.423702927757,4.003957457804 )); #144 = CARTESIAN_POINT('',(-10.50301396304,0.423702927757,2.93633)); #145 = PCURVE('',#49,#146); #146 = DEFINITIONAL_REPRESENTATION('',(#147),#151); #147 = ( BOUNDED_CURVE() B_SPLINE_CURVE(2,(#148,#149,#150), .UNSPECIFIED.,.F.,.F.) B_SPLINE_CURVE_WITH_KNOTS((3,3),(0.E+000, 3.554299705008),.PIECEWISE_BEZIER_KNOTS.) CURVE() GEOMETRIC_REPRESENTATION_ITEM() RATIONAL_B_SPLINE_CURVE((1., 1.010587075049,1.)) REPRESENTATION_ITEM('') ); #148 = CARTESIAN_POINT('',(-2.5,-5.078432583508)); #149 = CARTESIAN_POINT('',(-3.932372542196,-6.522128405011)); #150 = CARTESIAN_POINT('',(-5.,-7.604900271125)); #151 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' ) ); #152 = PCURVE('',#153,#158); #153 = CONICAL_SURFACE('',#154,7.5,0.785398163397); #154 = AXIS2_PLACEMENT_3D('',#155,#156,#157); #155 = CARTESIAN_POINT('',(-17.89811369191,-0.826297072243,-12.06367)); #156 = DIRECTION('',(0.E+000,-2.22044604925E-016,-1.)); #157 = DIRECTION('',(-1.,-1.224606353822E-016,2.719172340232E-032)); #158 = DEFINITIONAL_REPRESENTATION('',(#159),#185); #159 = B_SPLINE_CURVE_WITH_KNOTS('',3,(#160,#161,#162,#163,#164,#165, #166,#167,#168,#169,#170,#171,#172,#173,#174,#175,#176,#177,#178, #179,#180,#181,#182,#183,#184),.UNSPECIFIED.,.F.,.F.,(4,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4),(0.E+000,0.1615590775, 0.323118155001,0.484677232501,0.646236310001,0.807795387502, 0.969354465002,1.130913542503,1.292472620003,1.454031697503, 1.615590775004,1.777149852504,1.938708930004,2.100268007505, 2.261827085005,2.423386162505,2.584945240006,2.746504317506, 2.908063395007,3.069622472507,3.231181550007,3.392740627508, 3.554299705008),.QUASI_UNIFORM_KNOTS.); #160 = CARTESIAN_POINT('',(6.157857476012,-17.5)); #161 = CARTESIAN_POINT('',(6.157304831179,-17.45613532843)); #162 = CARTESIAN_POINT('',(6.156192803831,-17.369034253)); #163 = CARTESIAN_POINT('',(6.154504167531,-17.24022922767)); #164 = CARTESIAN_POINT('',(6.15279455739,-17.11323215337)); #165 = CARTESIAN_POINT('',(6.15106358201,-16.98800586851)); #166 = CARTESIAN_POINT('',(6.149310841213,-16.86451413191)); #167 = CARTESIAN_POINT('',(6.147535924576,-16.74272172673)); #168 = CARTESIAN_POINT('',(6.145738411434,-16.62259438981)); #169 = CARTESIAN_POINT('',(6.143917870468,-16.5040987895)); #170 = CARTESIAN_POINT('',(6.142073859396,-16.38720249214)); #171 = CARTESIAN_POINT('',(6.140205924616,-16.27187393322)); #172 = CARTESIAN_POINT('',(6.138313600849,-16.15808238872)); #173 = CARTESIAN_POINT('',(6.136396410758,-16.04579794794)); #174 = CARTESIAN_POINT('',(6.134453864564,-15.93499148723)); #175 = CARTESIAN_POINT('',(6.132485459637,-15.82563464481)); #176 = CARTESIAN_POINT('',(6.130490680076,-15.7176997966)); #177 = CARTESIAN_POINT('',(6.128468996271,-15.61116003298)); #178 = CARTESIAN_POINT('',(6.126419864458,-15.50598913612)); #179 = CARTESIAN_POINT('',(6.124342726204,-15.40216155983)); #180 = CARTESIAN_POINT('',(6.122237008073,-15.29965240364)); #181 = CARTESIAN_POINT('',(6.120102120531,-15.19843741256)); #182 = CARTESIAN_POINT('',(6.11793745959,-15.09849288457)); #183 = CARTESIAN_POINT('',(6.116474085284,-15.03269491212)); #184 = CARTESIAN_POINT('',(6.11573722796,-15.)); #185 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' ) ); #186 = ORIENTED_EDGE('',*,*,#187,.T.); #187 = EDGE_CURVE('',#138,#188,#190,.T.); #188 = VERTEX_POINT('',#189); #189 = CARTESIAN_POINT('',(-25.29321342079,0.423702927757,2.93633)); #190 = SURFACE_CURVE('',#191,(#195,#202),.PCURVE_S2.); #191 = LINE('',#192,#193); #192 = CARTESIAN_POINT('',(-2.898113691917,0.423702927757,2.93633)); #193 = VECTOR('',#194,1.); #194 = DIRECTION('',(-1.,0.E+000,0.E+000)); #195 = PCURVE('',#49,#196); #196 = DEFINITIONAL_REPRESENTATION('',(#197),#201); #197 = LINE('',#198,#199); #198 = CARTESIAN_POINT('',(-5.,0.E+000)); #199 = VECTOR('',#200,1.); #200 = DIRECTION('',(0.E+000,-1.)); #201 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' ) ); #202 = PCURVE('',#203,#208); #203 = PLANE('',#204); #204 = AXIS2_PLACEMENT_3D('',#205,#206,#207); #205 = CARTESIAN_POINT('',(-2.898113691917,0.423702927757,2.93633)); #206 = DIRECTION('',(0.E+000,0.E+000,-1.)); #207 = DIRECTION('',(1.,0.E+000,0.E+000)); #208 = DEFINITIONAL_REPRESENTATION('',(#209),#213); #209 = LINE('',#210,#211); #210 = CARTESIAN_POINT('',(0.E+000,0.E+000)); #211 = VECTOR('',#212,1.); #212 = DIRECTION('',(-1.,0.E+000)); #213 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' ) ); #214 = ORIENTED_EDGE('',*,*,#215,.T.); #215 = EDGE_CURVE('',#188,#19,#216,.T.); #216 = SURFACE_CURVE('',#217,(#221,#228),.PCURVE_S2.); #217 = ( BOUNDED_CURVE() B_SPLINE_CURVE(2,(#218,#219,#220), .UNSPECIFIED.,.F.,.F.) B_SPLINE_CURVE_WITH_KNOTS((3,3),(0.E+000, 3.554299705008),.PIECEWISE_BEZIER_KNOTS.) CURVE() GEOMETRIC_REPRESENTATION_ITEM() RATIONAL_B_SPLINE_CURVE((1., 1.010587075049,1.)) REPRESENTATION_ITEM('') ); #218 = CARTESIAN_POINT('',(-25.29321342079,0.423702927757,2.93633)); #219 = CARTESIAN_POINT('',(-26.3759852869,0.423702927757,4.003957457804) ); #220 = CARTESIAN_POINT('',(-27.8196811084,0.423702927757,5.43633)); #221 = PCURVE('',#49,#222); #222 = DEFINITIONAL_REPRESENTATION('',(#223),#227); #223 = ( BOUNDED_CURVE() B_SPLINE_CURVE(2,(#224,#225,#226), .UNSPECIFIED.,.F.,.F.) B_SPLINE_CURVE_WITH_KNOTS((3,3),(0.E+000, 3.554299705008),.PIECEWISE_BEZIER_KNOTS.) CURVE() GEOMETRIC_REPRESENTATION_ITEM() RATIONAL_B_SPLINE_CURVE((1., 1.010587075049,1.)) REPRESENTATION_ITEM('') ); #224 = CARTESIAN_POINT('',(-5.,-22.39509972887)); #225 = CARTESIAN_POINT('',(-3.932372542196,-23.47787159498)); #226 = CARTESIAN_POINT('',(-2.5,-24.92156741649)); #227 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' ) ); #228 = PCURVE('',#153,#229); #229 = DEFINITIONAL_REPRESENTATION('',(#230),#256); #230 = B_SPLINE_CURVE_WITH_KNOTS('',3,(#231,#232,#233,#234,#235,#236, #237,#238,#239,#240,#241,#242,#243,#244,#245,#246,#247,#248,#249, #250,#251,#252,#253,#254,#255),.UNSPECIFIED.,.F.,.F.,(4,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4),(0.E+000,0.1615590775, 0.323118155001,0.484677232501,0.646236310001,0.807795387502, 0.969354465002,1.130913542503,1.292472620003,1.454031697503, 1.615590775004,1.777149852504,1.938708930004,2.100268007505, 2.261827085005,2.423386162505,2.584945240006,2.746504317506, 2.908063395007,3.069622472507,3.231181550007,3.392740627508, 3.554299705008),.QUASI_UNIFORM_KNOTS.); #231 = CARTESIAN_POINT('',(3.309040732809,-15.)); #232 = CARTESIAN_POINT('',(3.308303875485,-15.03269491212)); #233 = CARTESIAN_POINT('',(3.306840501179,-15.09849288457)); #234 = CARTESIAN_POINT('',(3.304675840238,-15.19843741256)); #235 = CARTESIAN_POINT('',(3.302540952696,-15.29965240364)); #236 = CARTESIAN_POINT('',(3.300435234565,-15.40216155983)); #237 = CARTESIAN_POINT('',(3.298358096311,-15.50598913612)); #238 = CARTESIAN_POINT('',(3.296308964498,-15.61116003298)); #239 = CARTESIAN_POINT('',(3.294287280694,-15.7176997966)); #240 = CARTESIAN_POINT('',(3.292292501133,-15.82563464481)); #241 = CARTESIAN_POINT('',(3.290324096205,-15.93499148723)); #242 = CARTESIAN_POINT('',(3.288381550011,-16.04579794794)); #243 = CARTESIAN_POINT('',(3.286464359921,-16.15808238872)); #244 = CARTESIAN_POINT('',(3.284572036153,-16.27187393322)); #245 = CARTESIAN_POINT('',(3.282704101374,-16.38720249214)); #246 = CARTESIAN_POINT('',(3.280860090302,-16.5040987895)); #247 = CARTESIAN_POINT('',(3.279039549336,-16.62259438981)); #248 = CARTESIAN_POINT('',(3.277242036193,-16.74272172673)); #249 = CARTESIAN_POINT('',(3.275467119556,-16.86451413191)); #250 = CARTESIAN_POINT('',(3.273714378759,-16.98800586851)); #251 = CARTESIAN_POINT('',(3.271983403379,-17.11323215337)); #252 = CARTESIAN_POINT('',(3.270273793238,-17.24022922767)); #253 = CARTESIAN_POINT('',(3.268585156938,-17.369034253)); #254 = CARTESIAN_POINT('',(3.26747312959,-17.45613532843)); #255 = CARTESIAN_POINT('',(3.266920484758,-17.5)); #256 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' ) ); #257 = ADVANCED_FACE('',(#258),#272,.F.); #258 = FACE_BOUND('',#259,.F.); #259 = EDGE_LOOP('',(#260,#290,#335,#425,#515)); #260 = ORIENTED_EDGE('',*,*,#261,.T.); #261 = EDGE_CURVE('',#262,#264,#266,.T.); #262 = VERTEX_POINT('',#263); #263 = CARTESIAN_POINT('',(-25.29321342079,-2.076297072243,2.93633)); #264 = VERTEX_POINT('',#265); #265 = CARTESIAN_POINT('',(-10.50301396304,-2.076297072243,2.93633)); #266 = SURFACE_CURVE('',#267,(#271,#283),.PCURVE_S2.); #267 = LINE('',#268,#269); #268 = CARTESIAN_POINT('',(-32.89811369191,-2.076297072243,2.93633)); #269 = VECTOR('',#270,1.); #270 = DIRECTION('',(1.,0.E+000,0.E+000)); #271 = PCURVE('',#272,#277); #272 = PLANE('',#273); #273 = AXIS2_PLACEMENT_3D('',#274,#275,#276); #274 = CARTESIAN_POINT('',(-32.89811369191,-2.076297072243,7.93633)); #275 = DIRECTION('',(0.E+000,-1.,0.E+000)); #276 = DIRECTION('',(0.E+000,0.E+000,-1.)); #277 = DEFINITIONAL_REPRESENTATION('',(#278),#282); #278 = LINE('',#279,#280); #279 = CARTESIAN_POINT('',(5.,0.E+000)); #280 = VECTOR('',#281,1.); #281 = DIRECTION('',(0.E+000,1.)); #282 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' ) ); #283 = PCURVE('',#203,#284); #284 = DEFINITIONAL_REPRESENTATION('',(#285),#289); #285 = LINE('',#286,#287); #286 = CARTESIAN_POINT('',(-30.,2.5)); #287 = VECTOR('',#288,1.); #288 = DIRECTION('',(1.,0.E+000)); #289 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' ) ); #290 = ORIENTED_EDGE('',*,*,#291,.T.); #291 = EDGE_CURVE('',#264,#292,#294,.T.); #292 = VERTEX_POINT('',#293); #293 = CARTESIAN_POINT('',(-7.976546275424,-2.076297072243,5.43633)); #294 = SURFACE_CURVE('',#295,(#299,#306),.PCURVE_S2.); #295 = ( BOUNDED_CURVE() B_SPLINE_CURVE(2,(#296,#297,#298), .UNSPECIFIED.,.F.,.F.) B_SPLINE_CURVE_WITH_KNOTS((3,3),(0.E+000, 3.554299705008),.PIECEWISE_BEZIER_KNOTS.) CURVE() GEOMETRIC_REPRESENTATION_ITEM() RATIONAL_B_SPLINE_CURVE((1., 1.010587075051,1.)) REPRESENTATION_ITEM('') ); #296 = CARTESIAN_POINT('',(-10.50301396304,-2.076297072243,2.93633)); #297 = CARTESIAN_POINT('',(-9.420242096928,-2.076297072243, 4.003957457804)); #298 = CARTESIAN_POINT('',(-7.976546275424,-2.076297072243,5.43633)); #299 = PCURVE('',#272,#300); #300 = DEFINITIONAL_REPRESENTATION('',(#301),#305); #301 = ( BOUNDED_CURVE() B_SPLINE_CURVE(2,(#302,#303,#304), .UNSPECIFIED.,.F.,.F.) B_SPLINE_CURVE_WITH_KNOTS((3,3),(0.E+000, 3.554299705008),.PIECEWISE_BEZIER_KNOTS.) CURVE() GEOMETRIC_REPRESENTATION_ITEM() RATIONAL_B_SPLINE_CURVE((1., 1.010587075051,1.)) REPRESENTATION_ITEM('') ); #302 = CARTESIAN_POINT('',(5.,22.395099728875)); #303 = CARTESIAN_POINT('',(3.932372542196,23.477871594989)); #304 = CARTESIAN_POINT('',(2.5,24.921567416492)); #305 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' ) ); #306 = PCURVE('',#153,#307); #307 = DEFINITIONAL_REPRESENTATION('',(#308),#334); #308 = B_SPLINE_CURVE_WITH_KNOTS('',3,(#309,#310,#311,#312,#313,#314, #315,#316,#317,#318,#319,#320,#321,#322,#323,#324,#325,#326,#327, #328,#329,#330,#331,#332,#333),.UNSPECIFIED.,.F.,.F.,(4,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4),(0.E+000,0.1615590775, 0.323118155001,0.484677232501,0.646236310001,0.807795387502, 0.969354465002,1.130913542503,1.292472620003,1.454031697503, 1.615590775004,1.777149852504,1.938708930004,2.100268007505, 2.261827085005,2.423386162505,2.584945240006,2.746504317506, 2.908063395007,3.069622472507,3.231181550007,3.392740627508, 3.554299705008),.QUASI_UNIFORM_KNOTS.); #309 = CARTESIAN_POINT('',(0.16744807922,-15.)); #310 = CARTESIAN_POINT('',(0.166711221896,-15.03269491212)); #311 = CARTESIAN_POINT('',(0.16524784759,-15.09849288457)); #312 = CARTESIAN_POINT('',(0.163083186648,-15.19843741256)); #313 = CARTESIAN_POINT('',(0.160948299106,-15.29965240364)); #314 = CARTESIAN_POINT('',(0.158842580975,-15.40216155983)); #315 = CARTESIAN_POINT('',(0.156765442722,-15.50598913612)); #316 = CARTESIAN_POINT('',(0.154716310909,-15.61116003298)); #317 = CARTESIAN_POINT('',(0.152694627104,-15.7176997966)); #318 = CARTESIAN_POINT('',(0.150699847543,-15.82563464481)); #319 = CARTESIAN_POINT('',(0.148731442616,-15.93499148723)); #320 = CARTESIAN_POINT('',(0.146788896422,-16.04579794794)); #321 = CARTESIAN_POINT('',(0.144871706331,-16.15808238872)); #322 = CARTESIAN_POINT('',(0.142979382563,-16.27187393322)); #323 = CARTESIAN_POINT('',(0.141111447784,-16.38720249214)); #324 = CARTESIAN_POINT('',(0.139267436712,-16.5040987895)); #325 = CARTESIAN_POINT('',(0.137446895746,-16.62259438981)); #326 = CARTESIAN_POINT('',(0.135649382603,-16.74272172673)); #327 = CARTESIAN_POINT('',(0.133874465967,-16.86451413191)); #328 = CARTESIAN_POINT('',(0.132121725169,-16.98800586851)); #329 = CARTESIAN_POINT('',(0.130390749789,-17.11323215337)); #330 = CARTESIAN_POINT('',(0.128681139649,-17.24022922767)); #331 = CARTESIAN_POINT('',(0.126992503349,-17.369034253)); #332 = CARTESIAN_POINT('',(0.125880476001,-17.45613532843)); #333 = CARTESIAN_POINT('',(0.125327831168,-17.5)); #334 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' ) ); #335 = ORIENTED_EDGE('',*,*,#336,.T.); #336 = EDGE_CURVE('',#292,#337,#339,.T.); #337 = VERTEX_POINT('',#338); #338 = CARTESIAN_POINT('',(-17.89811369191,-2.076297072243, 7.731450038723)); #339 = SURFACE_CURVE('',#340,(#364,#391),.PCURVE_S2.); #340 = B_SPLINE_CURVE_WITH_KNOTS('',3,(#341,#342,#343,#344,#345,#346, #347,#348,#349,#350,#351,#352,#353,#354,#355,#356,#357,#358,#359, #360,#361,#362,#363),.UNSPECIFIED.,.F.,.F.,(4,2,2,2,2,3,2,2,2,2,4),( -9.753048731913,-8.657376849694,-4.328688424847,-2.164344212423, -1.082172106212,0.E+000,1.082172106212,2.164344212423,4.328688424847 ,8.657376849694,9.753048731913),.UNSPECIFIED.); #341 = CARTESIAN_POINT('',(-7.976546275424,-2.076297072243,5.43633)); #342 = CARTESIAN_POINT('',(-8.349585612678,-2.076297072243, 5.566853116015)); #343 = CARTESIAN_POINT('',(-8.724216826515,-2.076297072243, 5.693350129935)); #344 = CARTESIAN_POINT('',(-10.58369474811,-2.076297072243, 6.298546031822)); #345 = CARTESIAN_POINT('',(-12.07643295845,-2.076297072243, 6.713431512354)); #346 = CARTESIAN_POINT('',(-14.28516695545,-2.076297072243, 7.221607932559)); #347 = CARTESIAN_POINT('',(-15.01497979641,-2.076297072243, 7.372657524772)); #348 = CARTESIAN_POINT('',(-16.09993392183,-2.076297072243,7.56017012803 )); #349 = CARTESIAN_POINT('',(-16.45980666667,-2.076297072243, 7.616304970701)); #350 = CARTESIAN_POINT('',(-17.17847405541,-2.076297072243, 7.702450972357)); #351 = CARTESIAN_POINT('',(-17.53738965651,-2.076297072243, 7.731450038723)); #352 = CARTESIAN_POINT('',(-17.89811369191,-2.076297072243, 7.731450038723)); #353 = CARTESIAN_POINT('',(-18.25883772732,-2.076297072243, 7.731450038723)); #354 = CARTESIAN_POINT('',(-18.61775332841,-2.076297072243, 7.702450972357)); #355 = CARTESIAN_POINT('',(-19.33642071715,-2.076297072243, 7.616304970701)); #356 = CARTESIAN_POINT('',(-19.696293462,-2.076297072243,7.56017012803) ); #357 = CARTESIAN_POINT('',(-20.78124758741,-2.076297072243, 7.372657524772)); #358 = CARTESIAN_POINT('',(-21.51106042838,-2.076297072243, 7.221607932559)); #359 = CARTESIAN_POINT('',(-23.71979442537,-2.076297072243, 6.713431512354)); #360 = CARTESIAN_POINT('',(-25.21253263571,-2.076297072243, 6.298546031822)); #361 = CARTESIAN_POINT('',(-27.07201055731,-2.076297072243, 5.693350129935)); #362 = CARTESIAN_POINT('',(-27.44664177115,-2.076297072243, 5.566853116015)); #363 = CARTESIAN_POINT('',(-27.8196811084,-2.076297072243,5.43633)); #364 = PCURVE('',#272,#365); #365 = DEFINITIONAL_REPRESENTATION('',(#366),#390); #366 = B_SPLINE_CURVE_WITH_KNOTS('',3,(#367,#368,#369,#370,#371,#372, #373,#374,#375,#376,#377,#378,#379,#380,#381,#382,#383,#384,#385, #386,#387,#388,#389),.UNSPECIFIED.,.F.,.F.,(4,2,2,2,2,3,2,2,2,2,4),( -9.753048731913,-8.657376849694,-4.328688424847,-2.164344212423, -1.082172106212,0.E+000,1.082172106212,2.164344212423,4.328688424847 ,8.657376849694,9.753048731913),.UNSPECIFIED.); #367 = CARTESIAN_POINT('',(2.5,24.921567416492)); #368 = CARTESIAN_POINT('',(2.369476883985,24.548528079239)); #369 = CARTESIAN_POINT('',(2.242979870065,24.173896865401)); #370 = CARTESIAN_POINT('',(1.637783968178,22.314418943799)); #371 = CARTESIAN_POINT('',(1.222898487646,20.821680733461)); #372 = CARTESIAN_POINT('',(0.714722067441,18.612946736467)); #373 = CARTESIAN_POINT('',(0.563672475228,17.883133895499)); #374 = CARTESIAN_POINT('',(0.37615987197,16.798179770085)); #375 = CARTESIAN_POINT('',(0.320025029299,16.43830702524)); #376 = CARTESIAN_POINT('',(0.233879027643,15.719639636498)); #377 = CARTESIAN_POINT('',(0.204879961277,15.360724035404)); #378 = CARTESIAN_POINT('',(0.204879961277,15.)); #379 = CARTESIAN_POINT('',(0.204879961277,14.639275964596)); #380 = CARTESIAN_POINT('',(0.233879027643,14.280360363502)); #381 = CARTESIAN_POINT('',(0.320025029299,13.56169297476)); #382 = CARTESIAN_POINT('',(0.37615987197,13.201820229915)); #383 = CARTESIAN_POINT('',(0.563672475228,12.116866104502)); #384 = CARTESIAN_POINT('',(0.714722067441,11.387053263533)); #385 = CARTESIAN_POINT('',(1.222898487646,9.178319266539)); #386 = CARTESIAN_POINT('',(1.637783968178,7.685581056201)); #387 = CARTESIAN_POINT('',(2.242979870065,5.826103134599)); #388 = CARTESIAN_POINT('',(2.369476883985,5.451471920761)); #389 = CARTESIAN_POINT('',(2.5,5.078432583508)); #390 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' ) ); #391 = PCURVE('',#392,#397); #392 = TOROIDAL_SURFACE('',#393,8.25,54.873718663856); #393 = AXIS2_PLACEMENT_3D('',#394,#395,#396); #394 = CARTESIAN_POINT('',(-17.89811369191,-0.826297072243,-46.31367)); #395 = DIRECTION('',(0.E+000,-2.22044604925E-016,-1.)); #396 = DIRECTION('',(0.E+000,1.,-2.22044604925E-016)); #397 = DEFINITIONAL_REPRESENTATION('',(#398),#424); #398 = B_SPLINE_CURVE_WITH_KNOTS('',3,(#399,#400,#401,#402,#403,#404, #405,#406,#407,#408,#409,#410,#411,#412,#413,#414,#415,#416,#417, #418,#419,#420,#421,#422,#423),.UNSPECIFIED.,.F.,.F.,(4,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4),(-9.753048731913,-9.309728335008, -8.866407938103,-8.423087541198,-7.979767144292,-7.536446747387, -7.093126350482,-6.649805953577,-6.206485556672,-5.763165159767, -5.319844762862,-4.876524365957,-4.433203969051,-3.989883572146, -3.546563175241,-3.103242778336,-2.659922381431,-2.216601984526, -1.773281587621,-1.329961190715,-0.88664079381,-0.443320396905, 0.E+000),.UNSPECIFIED.); #399 = CARTESIAN_POINT('',(4.837716811553,-1.90983622455)); #400 = CARTESIAN_POINT('',(4.839604775725,-1.906942595099)); #401 = CARTESIAN_POINT('',(4.843552009624,-1.901155814072)); #402 = CARTESIAN_POINT('',(4.85008011799,-1.89248391648)); #403 = CARTESIAN_POINT('',(4.857304013494,-1.883824473771)); #404 = CARTESIAN_POINT('',(4.865329065086,-1.875190974748)); #405 = CARTESIAN_POINT('',(4.874291695205,-1.866586665031)); #406 = CARTESIAN_POINT('',(4.884359963883,-1.858016637247)); #407 = CARTESIAN_POINT('',(4.895744266443,-1.849486074495)); #408 = CARTESIAN_POINT('',(4.908711029087,-1.841000912302)); #409 = CARTESIAN_POINT('',(4.923602358169,-1.832567946629)); #410 = CARTESIAN_POINT('',(4.940864443041,-1.824195173617)); #411 = CARTESIAN_POINT('',(4.961088750932,-1.815892420907)); #412 = CARTESIAN_POINT('',(4.985076367501,-1.807671623483)); #413 = CARTESIAN_POINT('',(5.013928347127,-1.799549911442)); #414 = CARTESIAN_POINT('',(5.04918467399,-1.79155284086)); #415 = CARTESIAN_POINT('',(5.09312382579,-1.783707865756)); #416 = CARTESIAN_POINT('',(5.149132632791,-1.776058763789)); #417 = CARTESIAN_POINT('',(5.222468198,-1.768674045956)); #418 = CARTESIAN_POINT('',(5.321227440292,-1.761668014571)); #419 = CARTESIAN_POINT('',(5.458819159968,-1.755241122705)); #420 = CARTESIAN_POINT('',(5.653461471425,-1.749741310524)); #421 = CARTESIAN_POINT('',(5.932480703933,-1.745805524459)); #422 = CARTESIAN_POINT('',(6.160197445577,-1.744780737041)); #423 = CARTESIAN_POINT('',(6.28318530718,-1.744797796227)); #424 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' ) ); #425 = ORIENTED_EDGE('',*,*,#426,.T.); #426 = EDGE_CURVE('',#337,#427,#429,.T.); #427 = VERTEX_POINT('',#428); #428 = CARTESIAN_POINT('',(-27.8196811084,-2.076297072243,5.43633)); #429 = SURFACE_CURVE('',#430,(#454,#481),.PCURVE_S2.); #430 = B_SPLINE_CURVE_WITH_KNOTS('',3,(#431,#432,#433,#434,#435,#436, #437,#438,#439,#440,#441,#442,#443,#444,#445,#446,#447,#448,#449, #450,#451,#452,#453),.UNSPECIFIED.,.F.,.F.,(4,2,2,2,2,3,2,2,2,2,4),( -9.753048731913,-8.657376849694,-4.328688424847,-2.164344212423, -1.082172106212,0.E+000,1.082172106212,2.164344212423,4.328688424847 ,8.657376849694,9.753048731913),.UNSPECIFIED.); #431 = CARTESIAN_POINT('',(-7.976546275424,-2.076297072243,5.43633)); #432 = CARTESIAN_POINT('',(-8.349585612678,-2.076297072243, 5.566853116015)); #433 = CARTESIAN_POINT('',(-8.724216826515,-2.076297072243, 5.693350129935)); #434 = CARTESIAN_POINT('',(-10.58369474811,-2.076297072243, 6.298546031822)); #435 = CARTESIAN_POINT('',(-12.07643295845,-2.076297072243, 6.713431512354)); #436 = CARTESIAN_POINT('',(-14.28516695545,-2.076297072243, 7.221607932559)); #437 = CARTESIAN_POINT('',(-15.01497979641,-2.076297072243, 7.372657524772)); #438 = CARTESIAN_POINT('',(-16.09993392183,-2.076297072243,7.56017012803 )); #439 = CARTESIAN_POINT('',(-16.45980666667,-2.076297072243, 7.616304970701)); #440 = CARTESIAN_POINT('',(-17.17847405541,-2.076297072243, 7.702450972357)); #441 = CARTESIAN_POINT('',(-17.53738965651,-2.076297072243, 7.731450038723)); #442 = CARTESIAN_POINT('',(-17.89811369191,-2.076297072243, 7.731450038723)); #443 = CARTESIAN_POINT('',(-18.25883772732,-2.076297072243, 7.731450038723)); #444 = CARTESIAN_POINT('',(-18.61775332841,-2.076297072243, 7.702450972357)); #445 = CARTESIAN_POINT('',(-19.33642071715,-2.076297072243, 7.616304970701)); #446 = CARTESIAN_POINT('',(-19.696293462,-2.076297072243,7.56017012803) ); #447 = CARTESIAN_POINT('',(-20.78124758741,-2.076297072243, 7.372657524772)); #448 = CARTESIAN_POINT('',(-21.51106042838,-2.076297072243, 7.221607932559)); #449 = CARTESIAN_POINT('',(-23.71979442537,-2.076297072243, 6.713431512354)); #450 = CARTESIAN_POINT('',(-25.21253263571,-2.076297072243, 6.298546031822)); #451 = CARTESIAN_POINT('',(-27.07201055731,-2.076297072243, 5.693350129935)); #452 = CARTESIAN_POINT('',(-27.44664177115,-2.076297072243, 5.566853116015)); #453 = CARTESIAN_POINT('',(-27.8196811084,-2.076297072243,5.43633)); #454 = PCURVE('',#272,#455); #455 = DEFINITIONAL_REPRESENTATION('',(#456),#480); #456 = B_SPLINE_CURVE_WITH_KNOTS('',3,(#457,#458,#459,#460,#461,#462, #463,#464,#465,#466,#467,#468,#469,#470,#471,#472,#473,#474,#475, #476,#477,#478,#479),.UNSPECIFIED.,.F.,.F.,(4,2,2,2,2,3,2,2,2,2,4),( -9.753048731913,-8.657376849694,-4.328688424847,-2.164344212423, -1.082172106212,0.E+000,1.082172106212,2.164344212423,4.328688424847 ,8.657376849694,9.753048731913),.UNSPECIFIED.); #457 = CARTESIAN_POINT('',(2.5,24.921567416492)); #458 = CARTESIAN_POINT('',(2.369476883985,24.548528079239)); #459 = CARTESIAN_POINT('',(2.242979870065,24.173896865401)); #460 = CARTESIAN_POINT('',(1.637783968178,22.314418943799)); #461 = CARTESIAN_POINT('',(1.222898487646,20.821680733461)); #462 = CARTESIAN_POINT('',(0.714722067441,18.612946736467)); #463 = CARTESIAN_POINT('',(0.563672475228,17.883133895499)); #464 = CARTESIAN_POINT('',(0.37615987197,16.798179770085)); #465 = CARTESIAN_POINT('',(0.320025029299,16.43830702524)); #466 = CARTESIAN_POINT('',(0.233879027643,15.719639636498)); #467 = CARTESIAN_POINT('',(0.204879961277,15.360724035404)); #468 = CARTESIAN_POINT('',(0.204879961277,15.)); #469 = CARTESIAN_POINT('',(0.204879961277,14.639275964596)); #470 = CARTESIAN_POINT('',(0.233879027643,14.280360363502)); #471 = CARTESIAN_POINT('',(0.320025029299,13.56169297476)); #472 = CARTESIAN_POINT('',(0.37615987197,13.201820229915)); #473 = CARTESIAN_POINT('',(0.563672475228,12.116866104502)); #474 = CARTESIAN_POINT('',(0.714722067441,11.387053263533)); #475 = CARTESIAN_POINT('',(1.222898487646,9.178319266539)); #476 = CARTESIAN_POINT('',(1.637783968178,7.685581056201)); #477 = CARTESIAN_POINT('',(2.242979870065,5.826103134599)); #478 = CARTESIAN_POINT('',(2.369476883985,5.451471920761)); #479 = CARTESIAN_POINT('',(2.5,5.078432583508)); #480 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' ) ); #481 = PCURVE('',#482,#487); #482 = TOROIDAL_SURFACE('',#483,8.25,54.873718663856); #483 = AXIS2_PLACEMENT_3D('',#484,#485,#486); #484 = CARTESIAN_POINT('',(-17.89811369191,-0.826297072243,-46.31367)); #485 = DIRECTION('',(0.E+000,-2.22044604925E-016,-1.)); #486 = DIRECTION('',(0.E+000,1.,-2.22044604925E-016)); #487 = DEFINITIONAL_REPRESENTATION('',(#488),#514); #488 = B_SPLINE_CURVE_WITH_KNOTS('',3,(#489,#490,#491,#492,#493,#494, #495,#496,#497,#498,#499,#500,#501,#502,#503,#504,#505,#506,#507, #508,#509,#510,#511,#512,#513),.UNSPECIFIED.,.F.,.F.,(4,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4),(0.E+000,0.443320396905, 0.88664079381,1.329961190715,1.773281587621,2.216601984526, 2.659922381431,3.103242778336,3.546563175241,3.989883572146, 4.433203969051,4.876524365957,5.319844762862,5.763165159767, 6.206485556672,6.649805953577,7.093126350482,7.536446747387, 7.979767144292,8.423087541198,8.866407938103,9.309728335008, 9.753048731913),.QUASI_UNIFORM_KNOTS.); #489 = CARTESIAN_POINT('',(0.E+000,-1.744797796227)); #490 = CARTESIAN_POINT('',(0.122987861602,-1.744780737041)); #491 = CARTESIAN_POINT('',(0.350704603246,-1.745805524459)); #492 = CARTESIAN_POINT('',(0.629723835754,-1.749741310524)); #493 = CARTESIAN_POINT('',(0.824366147211,-1.755241122705)); #494 = CARTESIAN_POINT('',(0.961957866888,-1.761668014571)); #495 = CARTESIAN_POINT('',(1.06071710918,-1.768674045956)); #496 = CARTESIAN_POINT('',(1.134052674389,-1.776058763789)); #497 = CARTESIAN_POINT('',(1.190061481389,-1.783707865756)); #498 = CARTESIAN_POINT('',(1.23400063319,-1.79155284086)); #499 = CARTESIAN_POINT('',(1.269256960052,-1.799549911442)); #500 = CARTESIAN_POINT('',(1.298108939679,-1.807671623483)); #501 = CARTESIAN_POINT('',(1.322096556248,-1.815892420907)); #502 = CARTESIAN_POINT('',(1.342320864139,-1.824195173617)); #503 = CARTESIAN_POINT('',(1.359582949011,-1.832567946629)); #504 = CARTESIAN_POINT('',(1.374474278092,-1.841000912302)); #505 = CARTESIAN_POINT('',(1.387441040737,-1.849486074495)); #506 = CARTESIAN_POINT('',(1.398825343297,-1.858016637247)); #507 = CARTESIAN_POINT('',(1.408893611974,-1.866586665031)); #508 = CARTESIAN_POINT('',(1.417856242094,-1.875190974748)); #509 = CARTESIAN_POINT('',(1.425881293685,-1.883824473771)); #510 = CARTESIAN_POINT('',(1.43310518919,-1.89248391648)); #511 = CARTESIAN_POINT('',(1.439633297555,-1.901155814072)); #512 = CARTESIAN_POINT('',(1.443580531454,-1.906942595099)); #513 = CARTESIAN_POINT('',(1.445468495627,-1.90983622455)); #514 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' ) ); #515 = ORIENTED_EDGE('',*,*,#516,.T.); #516 = EDGE_CURVE('',#427,#262,#517,.T.); #517 = SURFACE_CURVE('',#518,(#522,#529),.PCURVE_S2.); #518 = ( BOUNDED_CURVE() B_SPLINE_CURVE(2,(#519,#520,#521), .UNSPECIFIED.,.F.,.F.) B_SPLINE_CURVE_WITH_KNOTS((3,3),(0.E+000, 3.554299705008),.PIECEWISE_BEZIER_KNOTS.) CURVE() GEOMETRIC_REPRESENTATION_ITEM() RATIONAL_B_SPLINE_CURVE((1., 1.010587075051,1.)) REPRESENTATION_ITEM('') ); #519 = CARTESIAN_POINT('',(-27.8196811084,-2.076297072243,5.43633)); #520 = CARTESIAN_POINT('',(-26.3759852869,-2.076297072243,4.003957457804 )); #521 = CARTESIAN_POINT('',(-25.29321342079,-2.076297072243,2.93633)); #522 = PCURVE('',#272,#523); #523 = DEFINITIONAL_REPRESENTATION('',(#524),#528); #524 = ( BOUNDED_CURVE() B_SPLINE_CURVE(2,(#525,#526,#527), .UNSPECIFIED.,.F.,.F.) B_SPLINE_CURVE_WITH_KNOTS((3,3),(0.E+000, 3.554299705008),.PIECEWISE_BEZIER_KNOTS.) CURVE() GEOMETRIC_REPRESENTATION_ITEM() RATIONAL_B_SPLINE_CURVE((1., 1.010587075051,1.)) REPRESENTATION_ITEM('') ); #525 = CARTESIAN_POINT('',(2.5,5.078432583508)); #526 = CARTESIAN_POINT('',(3.932372542196,6.522128405011)); #527 = CARTESIAN_POINT('',(5.,7.604900271125)); #528 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' ) ); #529 = PCURVE('',#153,#530); #530 = DEFINITIONAL_REPRESENTATION('',(#531),#557); #531 = B_SPLINE_CURVE_WITH_KNOTS('',3,(#532,#533,#534,#535,#536,#537, #538,#539,#540,#541,#542,#543,#544,#545,#546,#547,#548,#549,#550, #551,#552,#553,#554,#555,#556),.UNSPECIFIED.,.F.,.F.,(4,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4),(0.E+000,0.1615590775, 0.323118155001,0.484677232501,0.646236310001,0.807795387502, 0.969354465002,1.130913542503,1.292472620003,1.454031697503, 1.615590775004,1.777149852504,1.938708930004,2.100268007505, 2.261827085005,2.423386162505,2.584945240006,2.746504317506, 2.908063395007,3.069622472507,3.231181550007,3.392740627508, 3.554299705008),.QUASI_UNIFORM_KNOTS.); #532 = CARTESIAN_POINT('',(3.016264822422,-17.5)); #533 = CARTESIAN_POINT('',(3.015712177589,-17.45613532843)); #534 = CARTESIAN_POINT('',(3.014600150241,-17.369034253)); #535 = CARTESIAN_POINT('',(3.012911513941,-17.24022922767)); #536 = CARTESIAN_POINT('',(3.011201903801,-17.11323215337)); #537 = CARTESIAN_POINT('',(3.00947092842,-16.98800586851)); #538 = CARTESIAN_POINT('',(3.007718187623,-16.86451413191)); #539 = CARTESIAN_POINT('',(3.005943270986,-16.74272172673)); #540 = CARTESIAN_POINT('',(3.004145757844,-16.62259438981)); #541 = CARTESIAN_POINT('',(3.002325216878,-16.5040987895)); #542 = CARTESIAN_POINT('',(3.000481205806,-16.38720249214)); #543 = CARTESIAN_POINT('',(2.998613271026,-16.27187393322)); #544 = CARTESIAN_POINT('',(2.996720947259,-16.15808238872)); #545 = CARTESIAN_POINT('',(2.994803757168,-16.04579794794)); #546 = CARTESIAN_POINT('',(2.992861210974,-15.93499148723)); #547 = CARTESIAN_POINT('',(2.990892806047,-15.82563464481)); #548 = CARTESIAN_POINT('',(2.988898026486,-15.7176997966)); #549 = CARTESIAN_POINT('',(2.986876342681,-15.61116003298)); #550 = CARTESIAN_POINT('',(2.984827210868,-15.50598913612)); #551 = CARTESIAN_POINT('',(2.982750072614,-15.40216155983)); #552 = CARTESIAN_POINT('',(2.980644354484,-15.29965240364)); #553 = CARTESIAN_POINT('',(2.978509466942,-15.19843741256)); #554 = CARTESIAN_POINT('',(2.976344806,-15.09849288457)); #555 = CARTESIAN_POINT('',(2.974881431694,-15.03269491212)); #556 = CARTESIAN_POINT('',(2.97414457437,-15.)); #557 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' ) ); #558 = ADVANCED_FACE('',(#559),#203,.F.); #559 = FACE_BOUND('',#560,.F.); #560 = EDGE_LOOP('',(#561,#562,#612,#660,#661)); #561 = ORIENTED_EDGE('',*,*,#187,.F.); #562 = ORIENTED_EDGE('',*,*,#563,.T.); #563 = EDGE_CURVE('',#138,#564,#566,.T.); #564 = VERTEX_POINT('',#565); #565 = CARTESIAN_POINT('',(-10.39811369191,-0.826297072243,2.93633)); #566 = SURFACE_CURVE('',#567,(#572,#583),.PCURVE_S2.); #567 = CIRCLE('',#568,7.5); #568 = AXIS2_PLACEMENT_3D('',#569,#570,#571); #569 = CARTESIAN_POINT('',(-17.89811369191,-0.826297072243,2.93633)); #570 = DIRECTION('',(0.E+000,0.E+000,-1.)); #571 = DIRECTION('',(1.,0.E+000,0.E+000)); #572 = PCURVE('',#203,#573); #573 = DEFINITIONAL_REPRESENTATION('',(#574),#582); #574 = ( BOUNDED_CURVE() B_SPLINE_CURVE(2,(#575,#576,#577,#578,#579,#580 ,#581),.UNSPECIFIED.,.F.,.F.) B_SPLINE_CURVE_WITH_KNOTS((1,2,2,2,2,1),( -2.094395102393,0.E+000,2.094395102393,4.188790204786,6.28318530718, 8.377580409573),.UNSPECIFIED.) CURVE() GEOMETRIC_REPRESENTATION_ITEM() RATIONAL_B_SPLINE_CURVE((1.,0.5,1.,0.5,1.,0.5,1.)) REPRESENTATION_ITEM(' ') ); #575 = CARTESIAN_POINT('',(-7.5,1.25)); #576 = CARTESIAN_POINT('',(-7.5,14.240381056767)); #577 = CARTESIAN_POINT('',(-18.75,7.745190528383)); #578 = CARTESIAN_POINT('',(-30.,1.25)); #579 = CARTESIAN_POINT('',(-18.75,-5.245190528383)); #580 = CARTESIAN_POINT('',(-7.5,-11.74038105676)); #581 = CARTESIAN_POINT('',(-7.5,1.25)); #582 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' ) ); #583 = PCURVE('',#153,#584); #584 = DEFINITIONAL_REPRESENTATION('',(#585),#611); #585 = B_SPLINE_CURVE_WITH_KNOTS('',3,(#586,#587,#588,#589,#590,#591, #592,#593,#594,#595,#596,#597,#598,#599,#600,#601,#602,#603,#604, #605,#606,#607,#608,#609,#610),.UNSPECIFIED.,.F.,.F.,(4,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4),(6.11573722796,6.123348504288, 6.130959780616,6.138571056944,6.146182333273,6.153793609601, 6.161404885929,6.169016162257,6.176627438585,6.184238714913, 6.191849991242,6.19946126757,6.207072543898,6.214683820226, 6.222295096554,6.229906372882,6.237517649211,6.245128925539, 6.252740201867,6.260351478195,6.267962754523,6.275574030851, 6.28318530718),.QUASI_UNIFORM_KNOTS.); #586 = CARTESIAN_POINT('',(6.11573722796,-15.)); #587 = CARTESIAN_POINT('',(6.118274320069,-15.)); #588 = CARTESIAN_POINT('',(6.123348504288,-15.)); #589 = CARTESIAN_POINT('',(6.130959780616,-15.)); #590 = CARTESIAN_POINT('',(6.138571056944,-15.)); #591 = CARTESIAN_POINT('',(6.146182333273,-15.)); #592 = CARTESIAN_POINT('',(6.153793609601,-15.)); #593 = CARTESIAN_POINT('',(6.161404885929,-15.)); #594 = CARTESIAN_POINT('',(6.169016162257,-15.)); #595 = CARTESIAN_POINT('',(6.176627438585,-15.)); #596 = CARTESIAN_POINT('',(6.184238714913,-15.)); #597 = CARTESIAN_POINT('',(6.191849991242,-15.)); #598 = CARTESIAN_POINT('',(6.19946126757,-15.)); #599 = CARTESIAN_POINT('',(6.207072543898,-15.)); #600 = CARTESIAN_POINT('',(6.214683820226,-15.)); #601 = CARTESIAN_POINT('',(6.222295096554,-15.)); #602 = CARTESIAN_POINT('',(6.229906372882,-15.)); #603 = CARTESIAN_POINT('',(6.237517649211,-15.)); #604 = CARTESIAN_POINT('',(6.245128925539,-15.)); #605 = CARTESIAN_POINT('',(6.252740201867,-15.)); #606 = CARTESIAN_POINT('',(6.260351478195,-15.)); #607 = CARTESIAN_POINT('',(6.267962754523,-15.)); #608 = CARTESIAN_POINT('',(6.275574030851,-15.)); #609 = CARTESIAN_POINT('',(6.28064821507,-15.)); #610 = CARTESIAN_POINT('',(6.28318530718,-15.)); #611 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' ) ); #612 = ORIENTED_EDGE('',*,*,#613,.T.); #613 = EDGE_CURVE('',#564,#264,#614,.T.); #614 = SURFACE_CURVE('',#615,(#620,#631),.PCURVE_S2.); #615 = CIRCLE('',#616,7.5); #616 = AXIS2_PLACEMENT_3D('',#617,#618,#619); #617 = CARTESIAN_POINT('',(-17.89811369191,-0.826297072243,2.93633)); #618 = DIRECTION('',(0.E+000,0.E+000,-1.)); #619 = DIRECTION('',(1.,0.E+000,0.E+000)); #620 = PCURVE('',#203,#621); #621 = DEFINITIONAL_REPRESENTATION('',(#622),#630); #622 = ( BOUNDED_CURVE() B_SPLINE_CURVE(2,(#623,#624,#625,#626,#627,#628 ,#629),.UNSPECIFIED.,.F.,.F.) B_SPLINE_CURVE_WITH_KNOTS((1,2,2,2,2,1),( -2.094395102393,0.E+000,2.094395102393,4.188790204786,6.28318530718, 8.377580409573),.UNSPECIFIED.) CURVE() GEOMETRIC_REPRESENTATION_ITEM() RATIONAL_B_SPLINE_CURVE((1.,0.5,1.,0.5,1.,0.5,1.)) REPRESENTATION_ITEM(' ') ); #623 = CARTESIAN_POINT('',(-7.5,1.25)); #624 = CARTESIAN_POINT('',(-7.5,14.240381056767)); #625 = CARTESIAN_POINT('',(-18.75,7.745190528383)); #626 = CARTESIAN_POINT('',(-30.,1.25)); #627 = CARTESIAN_POINT('',(-18.75,-5.245190528383)); #628 = CARTESIAN_POINT('',(-7.5,-11.74038105676)); #629 = CARTESIAN_POINT('',(-7.5,1.25)); #630 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' ) ); #631 = PCURVE('',#153,#632); #632 = DEFINITIONAL_REPRESENTATION('',(#633),#659); #633 = B_SPLINE_CURVE_WITH_KNOTS('',3,(#634,#635,#636,#637,#638,#639, #640,#641,#642,#643,#644,#645,#646,#647,#648,#649,#650,#651,#652, #653,#654,#655,#656,#657,#658),.UNSPECIFIED.,.F.,.F.,(4,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4),(8.881784197001E-016, 7.611276328169E-003,1.522255265634E-002,2.28338289845E-002, 3.044510531267E-002,3.805638164084E-002,4.566765796901E-002, 5.327893429717E-002,6.089021062534E-002,6.850148695351E-002, 7.611276328168E-002,8.372403960985E-002,9.133531593801E-002, 9.894659226618E-002,0.106557868594,0.114169144923,0.121780421251, 0.129391697579,0.137002973907,0.144614250235,0.152225526563, 0.159836802892,0.16744807922),.QUASI_UNIFORM_KNOTS.); #634 = CARTESIAN_POINT('',(1.021405182655E-015,-15.)); #635 = CARTESIAN_POINT('',(2.53709210939E-003,-15.)); #636 = CARTESIAN_POINT('',(7.611276328169E-003,-15.)); #637 = CARTESIAN_POINT('',(1.522255265634E-002,-15.)); #638 = CARTESIAN_POINT('',(2.28338289845E-002,-15.)); #639 = CARTESIAN_POINT('',(3.044510531267E-002,-15.)); #640 = CARTESIAN_POINT('',(3.805638164084E-002,-15.)); #641 = CARTESIAN_POINT('',(4.566765796901E-002,-15.)); #642 = CARTESIAN_POINT('',(5.327893429717E-002,-15.)); #643 = CARTESIAN_POINT('',(6.089021062534E-002,-15.)); #644 = CARTESIAN_POINT('',(6.850148695351E-002,-15.)); #645 = CARTESIAN_POINT('',(7.611276328168E-002,-15.)); #646 = CARTESIAN_POINT('',(8.372403960985E-002,-15.)); #647 = CARTESIAN_POINT('',(9.133531593801E-002,-15.)); #648 = CARTESIAN_POINT('',(9.894659226618E-002,-15.)); #649 = CARTESIAN_POINT('',(0.106557868594,-15.)); #650 = CARTESIAN_POINT('',(0.114169144923,-15.)); #651 = CARTESIAN_POINT('',(0.121780421251,-15.)); #652 = CARTESIAN_POINT('',(0.129391697579,-15.)); #653 = CARTESIAN_POINT('',(0.137002973907,-15.)); #654 = CARTESIAN_POINT('',(0.144614250235,-15.)); #655 = CARTESIAN_POINT('',(0.152225526563,-15.)); #656 = CARTESIAN_POINT('',(0.159836802892,-15.)); #657 = CARTESIAN_POINT('',(0.16491098711,-15.)); #658 = CARTESIAN_POINT('',(0.16744807922,-15.)); #659 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' ) ); #660 = ORIENTED_EDGE('',*,*,#261,.F.); #661 = ORIENTED_EDGE('',*,*,#662,.T.); #662 = EDGE_CURVE('',#262,#188,#663,.T.); #663 = SURFACE_CURVE('',#664,(#669,#680),.PCURVE_S2.); #664 = CIRCLE('',#665,7.5); #665 = AXIS2_PLACEMENT_3D('',#666,#667,#668); #666 = CARTESIAN_POINT('',(-17.89811369191,-0.826297072243,2.93633)); #667 = DIRECTION('',(0.E+000,0.E+000,-1.)); #668 = DIRECTION('',(1.,0.E+000,0.E+000)); #669 = PCURVE('',#203,#670); #670 = DEFINITIONAL_REPRESENTATION('',(#671),#679); #671 = ( BOUNDED_CURVE() B_SPLINE_CURVE(2,(#672,#673,#674,#675,#676,#677 ,#678),.UNSPECIFIED.,.F.,.F.) B_SPLINE_CURVE_WITH_KNOTS((1,2,2,2,2,1),( -2.094395102393,0.E+000,2.094395102393,4.188790204786,6.28318530718, 8.377580409573),.UNSPECIFIED.) CURVE() GEOMETRIC_REPRESENTATION_ITEM() RATIONAL_B_SPLINE_CURVE((1.,0.5,1.,0.5,1.,0.5,1.)) REPRESENTATION_ITEM(' ') ); #672 = CARTESIAN_POINT('',(-7.5,1.25)); #673 = CARTESIAN_POINT('',(-7.5,14.240381056767)); #674 = CARTESIAN_POINT('',(-18.75,7.745190528383)); #675 = CARTESIAN_POINT('',(-30.,1.25)); #676 = CARTESIAN_POINT('',(-18.75,-5.245190528383)); #677 = CARTESIAN_POINT('',(-7.5,-11.74038105676)); #678 = CARTESIAN_POINT('',(-7.5,1.25)); #679 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' ) ); #680 = PCURVE('',#153,#681); #681 = DEFINITIONAL_REPRESENTATION('',(#682),#708); #682 = B_SPLINE_CURVE_WITH_KNOTS('',3,(#683,#684,#685,#686,#687,#688, #689,#690,#691,#692,#693,#694,#695,#696,#697,#698,#699,#700,#701, #702,#703,#704,#705,#706,#707),.UNSPECIFIED.,.F.,.F.,(4,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4),(2.97414457437,2.989367127026, 3.004589679683,3.019812232339,3.035034784995,3.050257337652, 3.065479890308,3.080702442964,3.095924995621,3.111147548277, 3.126370100933,3.14159265359,3.156815206246,3.172037758902, 3.187260311559,3.202482864215,3.217705416871,3.232927969528, 3.248150522184,3.26337307484,3.278595627497,3.293818180153, 3.309040732809),.QUASI_UNIFORM_KNOTS.); #683 = CARTESIAN_POINT('',(2.97414457437,-15.)); #684 = CARTESIAN_POINT('',(2.979218758589,-15.)); #685 = CARTESIAN_POINT('',(2.989367127026,-15.)); #686 = CARTESIAN_POINT('',(3.004589679683,-15.)); #687 = CARTESIAN_POINT('',(3.019812232339,-15.)); #688 = CARTESIAN_POINT('',(3.035034784995,-15.)); #689 = CARTESIAN_POINT('',(3.050257337652,-15.)); #690 = CARTESIAN_POINT('',(3.065479890308,-15.)); #691 = CARTESIAN_POINT('',(3.080702442964,-15.)); #692 = CARTESIAN_POINT('',(3.095924995621,-15.)); #693 = CARTESIAN_POINT('',(3.111147548277,-15.)); #694 = CARTESIAN_POINT('',(3.126370100933,-15.)); #695 = CARTESIAN_POINT('',(3.14159265359,-15.)); #696 = CARTESIAN_POINT('',(3.156815206246,-15.)); #697 = CARTESIAN_POINT('',(3.172037758902,-15.)); #698 = CARTESIAN_POINT('',(3.187260311559,-15.)); #699 = CARTESIAN_POINT('',(3.202482864215,-15.)); #700 = CARTESIAN_POINT('',(3.217705416871,-15.)); #701 = CARTESIAN_POINT('',(3.232927969528,-15.)); #702 = CARTESIAN_POINT('',(3.248150522184,-15.)); #703 = CARTESIAN_POINT('',(3.26337307484,-15.)); #704 = CARTESIAN_POINT('',(3.278595627497,-15.)); #705 = CARTESIAN_POINT('',(3.293818180153,-15.)); #706 = CARTESIAN_POINT('',(3.303966548591,-15.)); #707 = CARTESIAN_POINT('',(3.309040732809,-15.)); #708 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' ) ); #709 = ADVANCED_FACE('',(#710),#482,.F.); #710 = FACE_BOUND('',#711,.T.); #711 = EDGE_LOOP('',(#712,#713,#781)); #712 = ORIENTED_EDGE('',*,*,#426,.T.); #713 = ORIENTED_EDGE('',*,*,#714,.F.); #714 = EDGE_CURVE('',#715,#427,#717,.T.); #715 = VERTEX_POINT('',#716); #716 = CARTESIAN_POINT('',(-17.89811369191,-10.82629707224,5.43633)); #717 = SURFACE_CURVE('',#718,(#723,#752),.PCURVE_S2.); #718 = CIRCLE('',#719,10.); #719 = AXIS2_PLACEMENT_3D('',#720,#721,#722); #720 = CARTESIAN_POINT('',(-17.89811369191,-0.826297072243,5.43633)); #721 = DIRECTION('',(0.E+000,-2.22044604925E-016,-1.)); #722 = DIRECTION('',(1.,0.E+000,0.E+000)); #723 = PCURVE('',#482,#724); #724 = DEFINITIONAL_REPRESENTATION('',(#725),#751); #725 = B_SPLINE_CURVE_WITH_KNOTS('',3,(#726,#727,#728,#729,#730,#731, #732,#733,#734,#735,#736,#737,#738,#739,#740,#741,#742,#743,#744, #745,#746,#747,#748,#749,#750),.UNSPECIFIED.,.F.,.F.,(4,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4),(1.570796326795,1.636499440232, 1.70220255367,1.767905667108,1.833608780545,1.899311893983, 1.96501500742,2.030718120858,2.096421234296,2.162124347733, 2.227827461171,2.293530574608,2.359233688046,2.424936801483, 2.490639914921,2.556343028359,2.622046141796,2.687749255234, 2.753452368671,2.819155482109,2.884858595547,2.950561708984, 3.016264822422),.QUASI_UNIFORM_KNOTS.); #726 = CARTESIAN_POINT('',(0.E+000,-1.90983622455)); #727 = CARTESIAN_POINT('',(2.190103781253E-002,-1.90983622455)); #728 = CARTESIAN_POINT('',(6.570311343758E-002,-1.90983622455)); #729 = CARTESIAN_POINT('',(0.131406226875,-1.90983622455)); #730 = CARTESIAN_POINT('',(0.197109340313,-1.90983622455)); #731 = CARTESIAN_POINT('',(0.26281245375,-1.90983622455)); #732 = CARTESIAN_POINT('',(0.328515567188,-1.90983622455)); #733 = CARTESIAN_POINT('',(0.394218680625,-1.90983622455)); #734 = CARTESIAN_POINT('',(0.459921794063,-1.90983622455)); #735 = CARTESIAN_POINT('',(0.525624907501,-1.90983622455)); #736 = CARTESIAN_POINT('',(0.591328020938,-1.90983622455)); #737 = CARTESIAN_POINT('',(0.657031134376,-1.90983622455)); #738 = CARTESIAN_POINT('',(0.722734247813,-1.90983622455)); #739 = CARTESIAN_POINT('',(0.788437361251,-1.90983622455)); #740 = CARTESIAN_POINT('',(0.854140474689,-1.90983622455)); #741 = CARTESIAN_POINT('',(0.919843588126,-1.90983622455)); #742 = CARTESIAN_POINT('',(0.985546701564,-1.90983622455)); #743 = CARTESIAN_POINT('',(1.051249815001,-1.90983622455)); #744 = CARTESIAN_POINT('',(1.116952928439,-1.90983622455)); #745 = CARTESIAN_POINT('',(1.182656041876,-1.90983622455)); #746 = CARTESIAN_POINT('',(1.248359155314,-1.90983622455)); #747 = CARTESIAN_POINT('',(1.314062268752,-1.90983622455)); #748 = CARTESIAN_POINT('',(1.379765382189,-1.90983622455)); #749 = CARTESIAN_POINT('',(1.423567457814,-1.90983622455)); #750 = CARTESIAN_POINT('',(1.445468495627,-1.90983622455)); #751 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' ) ); #752 = PCURVE('',#153,#753); #753 = DEFINITIONAL_REPRESENTATION('',(#754),#780); #754 = B_SPLINE_CURVE_WITH_KNOTS('',3,(#755,#756,#757,#758,#759,#760, #761,#762,#763,#764,#765,#766,#767,#768,#769,#770,#771,#772,#773, #774,#775,#776,#777,#778,#779),.UNSPECIFIED.,.F.,.F.,(4,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4),(1.570796326795,1.636499440232, 1.70220255367,1.767905667108,1.833608780545,1.899311893983, 1.96501500742,2.030718120858,2.096421234296,2.162124347733, 2.227827461171,2.293530574608,2.359233688046,2.424936801483, 2.490639914921,2.556343028359,2.622046141796,2.687749255234, 2.753452368671,2.819155482109,2.884858595547,2.950561708984, 3.016264822422),.QUASI_UNIFORM_KNOTS.); #755 = CARTESIAN_POINT('',(1.570796326795,-17.5)); #756 = CARTESIAN_POINT('',(1.592697364607,-17.5)); #757 = CARTESIAN_POINT('',(1.636499440232,-17.5)); #758 = CARTESIAN_POINT('',(1.70220255367,-17.5)); #759 = CARTESIAN_POINT('',(1.767905667108,-17.5)); #760 = CARTESIAN_POINT('',(1.833608780545,-17.5)); #761 = CARTESIAN_POINT('',(1.899311893983,-17.5)); #762 = CARTESIAN_POINT('',(1.96501500742,-17.5)); #763 = CARTESIAN_POINT('',(2.030718120858,-17.5)); #764 = CARTESIAN_POINT('',(2.096421234296,-17.5)); #765 = CARTESIAN_POINT('',(2.162124347733,-17.5)); #766 = CARTESIAN_POINT('',(2.227827461171,-17.5)); #767 = CARTESIAN_POINT('',(2.293530574608,-17.5)); #768 = CARTESIAN_POINT('',(2.359233688046,-17.5)); #769 = CARTESIAN_POINT('',(2.424936801483,-17.5)); #770 = CARTESIAN_POINT('',(2.490639914921,-17.5)); #771 = CARTESIAN_POINT('',(2.556343028359,-17.5)); #772 = CARTESIAN_POINT('',(2.622046141796,-17.5)); #773 = CARTESIAN_POINT('',(2.687749255234,-17.5)); #774 = CARTESIAN_POINT('',(2.753452368671,-17.5)); #775 = CARTESIAN_POINT('',(2.819155482109,-17.5)); #776 = CARTESIAN_POINT('',(2.884858595547,-17.5)); #777 = CARTESIAN_POINT('',(2.950561708984,-17.5)); #778 = CARTESIAN_POINT('',(2.994363784609,-17.5)); #779 = CARTESIAN_POINT('',(3.016264822422,-17.5)); #780 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' ) ); #781 = ORIENTED_EDGE('',*,*,#782,.F.); #782 = EDGE_CURVE('',#337,#715,#783,.T.); #783 = SURFACE_CURVE('',#784,(#789,#796),.PCURVE_S2.); #784 = CIRCLE('',#785,54.873718663856); #785 = AXIS2_PLACEMENT_3D('',#786,#787,#788); #786 = CARTESIAN_POINT('',(-17.89811369191,7.423702927757,-46.31367)); #787 = DIRECTION('',(1.,0.E+000,0.E+000)); #788 = DIRECTION('',(0.E+000,1.,-2.22044604925E-016)); #789 = PCURVE('',#482,#790); #790 = DEFINITIONAL_REPRESENTATION('',(#791),#795); #791 = LINE('',#792,#793); #792 = CARTESIAN_POINT('',(0.E+000,0.E+000)); #793 = VECTOR('',#794,1.); #794 = DIRECTION('',(0.E+000,-1.)); #795 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' ) ); #796 = PCURVE('',#392,#797); #797 = DEFINITIONAL_REPRESENTATION('',(#798),#802); #798 = LINE('',#799,#800); #799 = CARTESIAN_POINT('',(6.28318530718,0.E+000)); #800 = VECTOR('',#801,1.); #801 = DIRECTION('',(0.E+000,-1.)); #802 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' ) ); #803 = ADVANCED_FACE('',(#804),#392,.F.); #804 = FACE_BOUND('',#805,.T.); #805 = EDGE_LOOP('',(#806,#872,#873)); #806 = ORIENTED_EDGE('',*,*,#807,.F.); #807 = EDGE_CURVE('',#292,#715,#808,.T.); #808 = SURFACE_CURVE('',#809,(#814,#843),.PCURVE_S2.); #809 = CIRCLE('',#810,10.); #810 = AXIS2_PLACEMENT_3D('',#811,#812,#813); #811 = CARTESIAN_POINT('',(-17.89811369191,-0.826297072243,5.43633)); #812 = DIRECTION('',(0.E+000,-2.22044604925E-016,-1.)); #813 = DIRECTION('',(1.,0.E+000,0.E+000)); #814 = PCURVE('',#392,#815); #815 = DEFINITIONAL_REPRESENTATION('',(#816),#842); #816 = B_SPLINE_CURVE_WITH_KNOTS('',3,(#817,#818,#819,#820,#821,#822, #823,#824,#825,#826,#827,#828,#829,#830,#831,#832,#833,#834,#835, #836,#837,#838,#839,#840,#841),.UNSPECIFIED.,.F.,.F.,(4,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4),(0.125327831168,0.191030944606, 0.256734058043,0.322437171481,0.388140284918,0.453843398356, 0.519546511794,0.585249625231,0.650952738669,0.716655852106, 0.782358965544,0.848062078981,0.913765192419,0.979468305857, 1.045171419294,1.110874532732,1.176577646169,1.242280759607, 1.307983873045,1.373686986482,1.43939009992,1.505093213357, 1.570796326795),.QUASI_UNIFORM_KNOTS.); #817 = CARTESIAN_POINT('',(4.837716811553,-1.90983622455)); #818 = CARTESIAN_POINT('',(4.859617849365,-1.90983622455)); #819 = CARTESIAN_POINT('',(4.90341992499,-1.90983622455)); #820 = CARTESIAN_POINT('',(4.969123038428,-1.90983622455)); #821 = CARTESIAN_POINT('',(5.034826151866,-1.90983622455)); #822 = CARTESIAN_POINT('',(5.100529265303,-1.90983622455)); #823 = CARTESIAN_POINT('',(5.166232378741,-1.90983622455)); #824 = CARTESIAN_POINT('',(5.231935492178,-1.90983622455)); #825 = CARTESIAN_POINT('',(5.297638605616,-1.90983622455)); #826 = CARTESIAN_POINT('',(5.363341719053,-1.90983622455)); #827 = CARTESIAN_POINT('',(5.429044832491,-1.90983622455)); #828 = CARTESIAN_POINT('',(5.494747945929,-1.90983622455)); #829 = CARTESIAN_POINT('',(5.560451059366,-1.90983622455)); #830 = CARTESIAN_POINT('',(5.626154172804,-1.90983622455)); #831 = CARTESIAN_POINT('',(5.691857286241,-1.90983622455)); #832 = CARTESIAN_POINT('',(5.757560399679,-1.90983622455)); #833 = CARTESIAN_POINT('',(5.823263513117,-1.90983622455)); #834 = CARTESIAN_POINT('',(5.888966626554,-1.90983622455)); #835 = CARTESIAN_POINT('',(5.954669739992,-1.90983622455)); #836 = CARTESIAN_POINT('',(6.020372853429,-1.90983622455)); #837 = CARTESIAN_POINT('',(6.086075966867,-1.90983622455)); #838 = CARTESIAN_POINT('',(6.151779080304,-1.90983622455)); #839 = CARTESIAN_POINT('',(6.217482193742,-1.90983622455)); #840 = CARTESIAN_POINT('',(6.261284269367,-1.90983622455)); #841 = CARTESIAN_POINT('',(6.28318530718,-1.90983622455)); #842 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' ) ); #843 = PCURVE('',#153,#844); #844 = DEFINITIONAL_REPRESENTATION('',(#845),#871); #845 = B_SPLINE_CURVE_WITH_KNOTS('',3,(#846,#847,#848,#849,#850,#851, #852,#853,#854,#855,#856,#857,#858,#859,#860,#861,#862,#863,#864, #865,#866,#867,#868,#869,#870),.UNSPECIFIED.,.F.,.F.,(4,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4),(0.125327831168,0.191030944606, 0.256734058043,0.322437171481,0.388140284918,0.453843398356, 0.519546511794,0.585249625231,0.650952738669,0.716655852106, 0.782358965544,0.848062078981,0.913765192419,0.979468305857, 1.045171419294,1.110874532732,1.176577646169,1.242280759607, 1.307983873045,1.373686986482,1.43939009992,1.505093213357, 1.570796326795),.QUASI_UNIFORM_KNOTS.); #846 = CARTESIAN_POINT('',(0.125327831168,-17.5)); #847 = CARTESIAN_POINT('',(0.147228868981,-17.5)); #848 = CARTESIAN_POINT('',(0.191030944606,-17.5)); #849 = CARTESIAN_POINT('',(0.256734058043,-17.5)); #850 = CARTESIAN_POINT('',(0.322437171481,-17.5)); #851 = CARTESIAN_POINT('',(0.388140284918,-17.5)); #852 = CARTESIAN_POINT('',(0.453843398356,-17.5)); #853 = CARTESIAN_POINT('',(0.519546511794,-17.5)); #854 = CARTESIAN_POINT('',(0.585249625231,-17.5)); #855 = CARTESIAN_POINT('',(0.650952738669,-17.5)); #856 = CARTESIAN_POINT('',(0.716655852106,-17.5)); #857 = CARTESIAN_POINT('',(0.782358965544,-17.5)); #858 = CARTESIAN_POINT('',(0.848062078981,-17.5)); #859 = CARTESIAN_POINT('',(0.913765192419,-17.5)); #860 = CARTESIAN_POINT('',(0.979468305857,-17.5)); #861 = CARTESIAN_POINT('',(1.045171419294,-17.5)); #862 = CARTESIAN_POINT('',(1.110874532732,-17.5)); #863 = CARTESIAN_POINT('',(1.176577646169,-17.5)); #864 = CARTESIAN_POINT('',(1.242280759607,-17.5)); #865 = CARTESIAN_POINT('',(1.307983873045,-17.5)); #866 = CARTESIAN_POINT('',(1.373686986482,-17.5)); #867 = CARTESIAN_POINT('',(1.43939009992,-17.5)); #868 = CARTESIAN_POINT('',(1.505093213357,-17.5)); #869 = CARTESIAN_POINT('',(1.548895288982,-17.5)); #870 = CARTESIAN_POINT('',(1.570796326795,-17.5)); #871 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' ) ); #872 = ORIENTED_EDGE('',*,*,#336,.T.); #873 = ORIENTED_EDGE('',*,*,#782,.T.); #874 = ADVANCED_FACE('',(#875),#81,.F.); #875 = FACE_BOUND('',#876,.T.); #876 = EDGE_LOOP('',(#877,#878)); #877 = ORIENTED_EDGE('',*,*,#18,.T.); #878 = ORIENTED_EDGE('',*,*,#879,.F.); #879 = EDGE_CURVE('',#19,#21,#880,.T.); #880 = SURFACE_CURVE('',#881,(#886,#915),.PCURVE_S2.); #881 = CIRCLE('',#882,10.); #882 = AXIS2_PLACEMENT_3D('',#883,#884,#885); #883 = CARTESIAN_POINT('',(-17.89811369191,-0.826297072243,5.43633)); #884 = DIRECTION('',(0.E+000,-2.22044604925E-016,-1.)); #885 = DIRECTION('',(1.,0.E+000,0.E+000)); #886 = PCURVE('',#81,#887); #887 = DEFINITIONAL_REPRESENTATION('',(#888),#914); #888 = B_SPLINE_CURVE_WITH_KNOTS('',3,(#889,#890,#891,#892,#893,#894, #895,#896,#897,#898,#899,#900,#901,#902,#903,#904,#905,#906,#907, #908,#909,#910,#911,#912,#913),.UNSPECIFIED.,.F.,.F.,(4,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4),(3.266920484758,3.398326711633, 3.529732938508,3.661139165383,3.792545392259,3.923951619134, 4.055357846009,4.186764072884,4.318170299759,4.449576526634, 4.58098275351,4.712388980385,4.84379520726,4.975201434135, 5.10660766101,5.238013887885,5.369420114761,5.500826341636, 5.632232568511,5.763638795386,5.895045022261,6.026451249136, 6.157857476012),.QUASI_UNIFORM_KNOTS.); #889 = CARTESIAN_POINT('',(1.696124157963,-1.90983622455)); #890 = CARTESIAN_POINT('',(1.739926233588,-1.90983622455)); #891 = CARTESIAN_POINT('',(1.827530384838,-1.90983622455)); #892 = CARTESIAN_POINT('',(1.958936611713,-1.90983622455)); #893 = CARTESIAN_POINT('',(2.090342838588,-1.90983622455)); #894 = CARTESIAN_POINT('',(2.221749065464,-1.90983622455)); #895 = CARTESIAN_POINT('',(2.353155292339,-1.90983622455)); #896 = CARTESIAN_POINT('',(2.484561519214,-1.90983622455)); #897 = CARTESIAN_POINT('',(2.615967746089,-1.90983622455)); #898 = CARTESIAN_POINT('',(2.747373972964,-1.90983622455)); #899 = CARTESIAN_POINT('',(2.878780199839,-1.90983622455)); #900 = CARTESIAN_POINT('',(3.010186426715,-1.90983622455)); #901 = CARTESIAN_POINT('',(3.14159265359,-1.90983622455)); #902 = CARTESIAN_POINT('',(3.272998880465,-1.90983622455)); #903 = CARTESIAN_POINT('',(3.40440510734,-1.90983622455)); #904 = CARTESIAN_POINT('',(3.535811334215,-1.90983622455)); #905 = CARTESIAN_POINT('',(3.66721756109,-1.90983622455)); #906 = CARTESIAN_POINT('',(3.798623787966,-1.90983622455)); #907 = CARTESIAN_POINT('',(3.930030014841,-1.90983622455)); #908 = CARTESIAN_POINT('',(4.061436241716,-1.90983622455)); #909 = CARTESIAN_POINT('',(4.192842468591,-1.90983622455)); #910 = CARTESIAN_POINT('',(4.324248695466,-1.90983622455)); #911 = CARTESIAN_POINT('',(4.455654922341,-1.90983622455)); #912 = CARTESIAN_POINT('',(4.543259073592,-1.90983622455)); #913 = CARTESIAN_POINT('',(4.587061149217,-1.90983622455)); #914 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' ) ); #915 = PCURVE('',#153,#916); #916 = DEFINITIONAL_REPRESENTATION('',(#917),#943); #917 = B_SPLINE_CURVE_WITH_KNOTS('',3,(#918,#919,#920,#921,#922,#923, #924,#925,#926,#927,#928,#929,#930,#931,#932,#933,#934,#935,#936, #937,#938,#939,#940,#941,#942),.UNSPECIFIED.,.F.,.F.,(4,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4),(3.266920484758,3.398326711633, 3.529732938508,3.661139165383,3.792545392259,3.923951619134, 4.055357846009,4.186764072884,4.318170299759,4.449576526634, 4.58098275351,4.712388980385,4.84379520726,4.975201434135, 5.10660766101,5.238013887885,5.369420114761,5.500826341636, 5.632232568511,5.763638795386,5.895045022261,6.026451249136, 6.157857476012),.QUASI_UNIFORM_KNOTS.); #918 = CARTESIAN_POINT('',(3.266920484758,-17.5)); #919 = CARTESIAN_POINT('',(3.310722560383,-17.5)); #920 = CARTESIAN_POINT('',(3.398326711633,-17.5)); #921 = CARTESIAN_POINT('',(3.529732938508,-17.5)); #922 = CARTESIAN_POINT('',(3.661139165383,-17.5)); #923 = CARTESIAN_POINT('',(3.792545392259,-17.5)); #924 = CARTESIAN_POINT('',(3.923951619134,-17.5)); #925 = CARTESIAN_POINT('',(4.055357846009,-17.5)); #926 = CARTESIAN_POINT('',(4.186764072884,-17.5)); #927 = CARTESIAN_POINT('',(4.318170299759,-17.5)); #928 = CARTESIAN_POINT('',(4.449576526634,-17.5)); #929 = CARTESIAN_POINT('',(4.58098275351,-17.5)); #930 = CARTESIAN_POINT('',(4.712388980385,-17.5)); #931 = CARTESIAN_POINT('',(4.84379520726,-17.5)); #932 = CARTESIAN_POINT('',(4.975201434135,-17.5)); #933 = CARTESIAN_POINT('',(5.10660766101,-17.5)); #934 = CARTESIAN_POINT('',(5.238013887885,-17.5)); #935 = CARTESIAN_POINT('',(5.369420114761,-17.5)); #936 = CARTESIAN_POINT('',(5.500826341636,-17.5)); #937 = CARTESIAN_POINT('',(5.632232568511,-17.5)); #938 = CARTESIAN_POINT('',(5.763638795386,-17.5)); #939 = CARTESIAN_POINT('',(5.895045022261,-17.5)); #940 = CARTESIAN_POINT('',(6.026451249136,-17.5)); #941 = CARTESIAN_POINT('',(6.114055400386,-17.5)); #942 = CARTESIAN_POINT('',(6.157857476012,-17.5)); #943 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' ) ); #944 = ADVANCED_FACE('',(#945),#153,.T.); #945 = FACE_BOUND('',#946,.T.); #946 = EDGE_LOOP('',(#947,#948,#949,#950,#951,#952,#953,#954,#955,#956, #957,#980,#1051)); #947 = ORIENTED_EDGE('',*,*,#613,.T.); #948 = ORIENTED_EDGE('',*,*,#291,.T.); #949 = ORIENTED_EDGE('',*,*,#807,.T.); #950 = ORIENTED_EDGE('',*,*,#714,.T.); #951 = ORIENTED_EDGE('',*,*,#516,.T.); #952 = ORIENTED_EDGE('',*,*,#662,.T.); #953 = ORIENTED_EDGE('',*,*,#215,.T.); #954 = ORIENTED_EDGE('',*,*,#879,.T.); #955 = ORIENTED_EDGE('',*,*,#137,.T.); #956 = ORIENTED_EDGE('',*,*,#563,.T.); #957 = ORIENTED_EDGE('',*,*,#958,.T.); #958 = EDGE_CURVE('',#564,#959,#961,.T.); #959 = VERTEX_POINT('',#960); #960 = CARTESIAN_POINT('',(-12.89811369191,-0.826297072243,0.43633)); #961 = SEAM_CURVE('',#962,(#966,#973),.PCURVE_S2.); #962 = LINE('',#963,#964); #963 = CARTESIAN_POINT('',(-25.39811369191,-0.826297072243,-12.06367)); #964 = VECTOR('',#965,1.); #965 = DIRECTION('',(-0.707106781187,-2.436019915756E-016, -0.707106781187)); #966 = PCURVE('',#153,#967); #967 = DEFINITIONAL_REPRESENTATION('',(#968),#972); #968 = LINE('',#969,#970); #969 = CARTESIAN_POINT('',(6.28318530718,0.E+000)); #970 = VECTOR('',#971,1.); #971 = DIRECTION('',(0.E+000,1.)); #972 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' ) ); #973 = PCURVE('',#153,#974); #974 = DEFINITIONAL_REPRESENTATION('',(#975),#979); #975 = LINE('',#976,#977); #976 = CARTESIAN_POINT('',(0.E+000,0.E+000)); #977 = VECTOR('',#978,1.); #978 = DIRECTION('',(0.E+000,1.)); #979 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' ) ); #980 = ORIENTED_EDGE('',*,*,#981,.F.); #981 = EDGE_CURVE('',#959,#959,#982,.T.); #982 = SURFACE_CURVE('',#983,(#988,#1017),.PCURVE_S2.); #983 = CIRCLE('',#984,5.); #984 = AXIS2_PLACEMENT_3D('',#985,#986,#987); #985 = CARTESIAN_POINT('',(-17.89811369191,-0.826297072243,0.43633)); #986 = DIRECTION('',(0.E+000,-2.22044604925E-016,-1.)); #987 = DIRECTION('',(1.,0.E+000,0.E+000)); #988 = PCURVE('',#153,#989); #989 = DEFINITIONAL_REPRESENTATION('',(#990),#1016); #990 = B_SPLINE_CURVE_WITH_KNOTS('',3,(#991,#992,#993,#994,#995,#996, #997,#998,#999,#1000,#1001,#1002,#1003,#1004,#1005,#1006,#1007,#1008 ,#1009,#1010,#1011,#1012,#1013,#1014,#1015),.UNSPECIFIED.,.F.,.F.,(4 ,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4),(0.E+000, 0.285599332145,0.571198664289,0.856797996434,1.142397328578, 1.427996660723,1.713595992867,1.999195325012,2.284794657156, 2.570393989301,2.855993321445,3.14159265359,3.427191985734, 3.712791317879,3.998390650023,4.283989982168,4.569589314312, 4.855188646457,5.140787978601,5.426387310746,5.711986642891, 5.997585975035,6.28318530718),.QUASI_UNIFORM_KNOTS.); #991 = CARTESIAN_POINT('',(1.33226762955E-016,-12.5)); #992 = CARTESIAN_POINT('',(9.519977738151E-002,-12.5)); #993 = CARTESIAN_POINT('',(0.285599332145,-12.5)); #994 = CARTESIAN_POINT('',(0.571198664289,-12.5)); #995 = CARTESIAN_POINT('',(0.856797996434,-12.5)); #996 = CARTESIAN_POINT('',(1.142397328578,-12.5)); #997 = CARTESIAN_POINT('',(1.427996660723,-12.5)); #998 = CARTESIAN_POINT('',(1.713595992867,-12.5)); #999 = CARTESIAN_POINT('',(1.999195325012,-12.5)); #1000 = CARTESIAN_POINT('',(2.284794657156,-12.5)); #1001 = CARTESIAN_POINT('',(2.570393989301,-12.5)); #1002 = CARTESIAN_POINT('',(2.855993321445,-12.5)); #1003 = CARTESIAN_POINT('',(3.14159265359,-12.5)); #1004 = CARTESIAN_POINT('',(3.427191985734,-12.5)); #1005 = CARTESIAN_POINT('',(3.712791317879,-12.5)); #1006 = CARTESIAN_POINT('',(3.998390650023,-12.5)); #1007 = CARTESIAN_POINT('',(4.283989982168,-12.5)); #1008 = CARTESIAN_POINT('',(4.569589314312,-12.5)); #1009 = CARTESIAN_POINT('',(4.855188646457,-12.5)); #1010 = CARTESIAN_POINT('',(5.140787978601,-12.5)); #1011 = CARTESIAN_POINT('',(5.426387310746,-12.5)); #1012 = CARTESIAN_POINT('',(5.711986642891,-12.5)); #1013 = CARTESIAN_POINT('',(5.997585975035,-12.5)); #1014 = CARTESIAN_POINT('',(6.187985529798,-12.5)); #1015 = CARTESIAN_POINT('',(6.28318530718,-12.5)); #1016 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' ) ); #1017 = PCURVE('',#1018,#1023); #1018 = CYLINDRICAL_SURFACE('',#1019,5.); #1019 = AXIS2_PLACEMENT_3D('',#1020,#1021,#1022); #1020 = CARTESIAN_POINT('',(-17.89811369191,-0.826297072243,-16.60362)); #1021 = DIRECTION('',(0.E+000,-2.22044604925E-016,-1.)); #1022 = DIRECTION('',(1.,0.E+000,0.E+000)); #1023 = DEFINITIONAL_REPRESENTATION('',(#1024),#1050); #1024 = B_SPLINE_CURVE_WITH_KNOTS('',3,(#1025,#1026,#1027,#1028,#1029, #1030,#1031,#1032,#1033,#1034,#1035,#1036,#1037,#1038,#1039,#1040, #1041,#1042,#1043,#1044,#1045,#1046,#1047,#1048,#1049), .UNSPECIFIED.,.F.,.F.,(4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4), (0.E+000,0.285599332145,0.571198664289,0.856797996434,1.142397328578, 1.427996660723,1.713595992867,1.999195325012,2.284794657156, 2.570393989301,2.855993321445,3.14159265359,3.427191985734, 3.712791317879,3.998390650023,4.283989982168,4.569589314312, 4.855188646457,5.140787978601,5.426387310746,5.711986642891, 5.997585975035,6.28318530718),.QUASI_UNIFORM_KNOTS.); #1025 = CARTESIAN_POINT('',(0.E+000,-17.03995)); #1026 = CARTESIAN_POINT('',(9.519977738151E-002,-17.03995)); #1027 = CARTESIAN_POINT('',(0.285599332145,-17.03995)); #1028 = CARTESIAN_POINT('',(0.571198664289,-17.03995)); #1029 = CARTESIAN_POINT('',(0.856797996434,-17.03995)); #1030 = CARTESIAN_POINT('',(1.142397328578,-17.03995)); #1031 = CARTESIAN_POINT('',(1.427996660723,-17.03995)); #1032 = CARTESIAN_POINT('',(1.713595992867,-17.03995)); #1033 = CARTESIAN_POINT('',(1.999195325012,-17.03995)); #1034 = CARTESIAN_POINT('',(2.284794657156,-17.03995)); #1035 = CARTESIAN_POINT('',(2.570393989301,-17.03995)); #1036 = CARTESIAN_POINT('',(2.855993321445,-17.03995)); #1037 = CARTESIAN_POINT('',(3.14159265359,-17.03995)); #1038 = CARTESIAN_POINT('',(3.427191985734,-17.03995)); #1039 = CARTESIAN_POINT('',(3.712791317879,-17.03995)); #1040 = CARTESIAN_POINT('',(3.998390650023,-17.03995)); #1041 = CARTESIAN_POINT('',(4.283989982168,-17.03995)); #1042 = CARTESIAN_POINT('',(4.569589314312,-17.03995)); #1043 = CARTESIAN_POINT('',(4.855188646457,-17.03995)); #1044 = CARTESIAN_POINT('',(5.140787978601,-17.03995)); #1045 = CARTESIAN_POINT('',(5.426387310746,-17.03995)); #1046 = CARTESIAN_POINT('',(5.711986642891,-17.03995)); #1047 = CARTESIAN_POINT('',(5.997585975035,-17.03995)); #1048 = CARTESIAN_POINT('',(6.187985529798,-17.03995)); #1049 = CARTESIAN_POINT('',(6.28318530718,-17.03995)); #1050 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' ) ); #1051 = ORIENTED_EDGE('',*,*,#958,.F.); #1052 = ADVANCED_FACE('',(#1053),#1018,.T.); #1053 = FACE_BOUND('',#1054,.T.); #1054 = EDGE_LOOP('',(#1055,#1128,#1149,#1150)); #1055 = ORIENTED_EDGE('',*,*,#1056,.F.); #1056 = EDGE_CURVE('',#1057,#1057,#1059,.T.); #1057 = VERTEX_POINT('',#1058); #1058 = CARTESIAN_POINT('',(-12.89811369191,-0.826297072243,-33.64357)); #1059 = SURFACE_CURVE('',#1060,(#1065,#1094),.PCURVE_S2.); #1060 = CIRCLE('',#1061,5.); #1061 = AXIS2_PLACEMENT_3D('',#1062,#1063,#1064); #1062 = CARTESIAN_POINT('',(-17.89811369191,-0.826297072243,-33.64357)); #1063 = DIRECTION('',(0.E+000,-2.22044604925E-016,-1.)); #1064 = DIRECTION('',(1.,0.E+000,0.E+000)); #1065 = PCURVE('',#1018,#1066); #1066 = DEFINITIONAL_REPRESENTATION('',(#1067),#1093); #1067 = B_SPLINE_CURVE_WITH_KNOTS('',3,(#1068,#1069,#1070,#1071,#1072, #1073,#1074,#1075,#1076,#1077,#1078,#1079,#1080,#1081,#1082,#1083, #1084,#1085,#1086,#1087,#1088,#1089,#1090,#1091,#1092), .UNSPECIFIED.,.F.,.F.,(4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4), (0.E+000,0.285599332145,0.571198664289,0.856797996434,1.142397328578, 1.427996660723,1.713595992867,1.999195325012,2.284794657156, 2.570393989301,2.855993321445,3.14159265359,3.427191985734, 3.712791317879,3.998390650023,4.283989982168,4.569589314312, 4.855188646457,5.140787978601,5.426387310746,5.711986642891, 5.997585975035,6.28318530718),.QUASI_UNIFORM_KNOTS.); #1068 = CARTESIAN_POINT('',(0.E+000,17.03995)); #1069 = CARTESIAN_POINT('',(9.519977738151E-002,17.03995)); #1070 = CARTESIAN_POINT('',(0.285599332145,17.03995)); #1071 = CARTESIAN_POINT('',(0.571198664289,17.03995)); #1072 = CARTESIAN_POINT('',(0.856797996434,17.03995)); #1073 = CARTESIAN_POINT('',(1.142397328578,17.03995)); #1074 = CARTESIAN_POINT('',(1.427996660723,17.03995)); #1075 = CARTESIAN_POINT('',(1.713595992867,17.03995)); #1076 = CARTESIAN_POINT('',(1.999195325012,17.03995)); #1077 = CARTESIAN_POINT('',(2.284794657156,17.03995)); #1078 = CARTESIAN_POINT('',(2.570393989301,17.03995)); #1079 = CARTESIAN_POINT('',(2.855993321445,17.03995)); #1080 = CARTESIAN_POINT('',(3.14159265359,17.03995)); #1081 = CARTESIAN_POINT('',(3.427191985734,17.03995)); #1082 = CARTESIAN_POINT('',(3.712791317879,17.03995)); #1083 = CARTESIAN_POINT('',(3.998390650023,17.03995)); #1084 = CARTESIAN_POINT('',(4.283989982168,17.03995)); #1085 = CARTESIAN_POINT('',(4.569589314312,17.03995)); #1086 = CARTESIAN_POINT('',(4.855188646457,17.03995)); #1087 = CARTESIAN_POINT('',(5.140787978601,17.03995)); #1088 = CARTESIAN_POINT('',(5.426387310746,17.03995)); #1089 = CARTESIAN_POINT('',(5.711986642891,17.03995)); #1090 = CARTESIAN_POINT('',(5.997585975035,17.03995)); #1091 = CARTESIAN_POINT('',(6.187985529798,17.03995)); #1092 = CARTESIAN_POINT('',(6.28318530718,17.03995)); #1093 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' ) ); #1094 = PCURVE('',#1095,#1100); #1095 = CONICAL_SURFACE('',#1096,4.53995,0.785398163397); #1096 = AXIS2_PLACEMENT_3D('',#1097,#1098,#1099); #1097 = CARTESIAN_POINT('',(-17.89811369191,-0.826297072243,-43.18352)); #1098 = DIRECTION('',(0.E+000,-2.22044604925E-016,-1.)); #1099 = DIRECTION('',(-1.,-1.224606353822E-016,2.719172340232E-032)); #1100 = DEFINITIONAL_REPRESENTATION('',(#1101),#1127); #1101 = B_SPLINE_CURVE_WITH_KNOTS('',3,(#1102,#1103,#1104,#1105,#1106, #1107,#1108,#1109,#1110,#1111,#1112,#1113,#1114,#1115,#1116,#1117, #1118,#1119,#1120,#1121,#1122,#1123,#1124,#1125,#1126), .UNSPECIFIED.,.F.,.F.,(4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4), (0.E+000,0.285599332145,0.571198664289,0.856797996434,1.142397328578, 1.427996660723,1.713595992867,1.999195325012,2.284794657156, 2.570393989301,2.855993321445,3.14159265359,3.427191985734, 3.712791317879,3.998390650023,4.283989982168,4.569589314312, 4.855188646457,5.140787978601,5.426387310746,5.711986642891, 5.997585975035,6.28318530718),.QUASI_UNIFORM_KNOTS.); #1102 = CARTESIAN_POINT('',(1.554312234475E-016,-9.53995)); #1103 = CARTESIAN_POINT('',(9.519977738151E-002,-9.53995)); #1104 = CARTESIAN_POINT('',(0.285599332145,-9.53995)); #1105 = CARTESIAN_POINT('',(0.571198664289,-9.53995)); #1106 = CARTESIAN_POINT('',(0.856797996434,-9.53995)); #1107 = CARTESIAN_POINT('',(1.142397328578,-9.53995)); #1108 = CARTESIAN_POINT('',(1.427996660723,-9.53995)); #1109 = CARTESIAN_POINT('',(1.713595992867,-9.53995)); #1110 = CARTESIAN_POINT('',(1.999195325012,-9.53995)); #1111 = CARTESIAN_POINT('',(2.284794657156,-9.53995)); #1112 = CARTESIAN_POINT('',(2.570393989301,-9.53995)); #1113 = CARTESIAN_POINT('',(2.855993321445,-9.53995)); #1114 = CARTESIAN_POINT('',(3.14159265359,-9.53995)); #1115 = CARTESIAN_POINT('',(3.427191985734,-9.53995)); #1116 = CARTESIAN_POINT('',(3.712791317879,-9.53995)); #1117 = CARTESIAN_POINT('',(3.998390650023,-9.53995)); #1118 = CARTESIAN_POINT('',(4.283989982168,-9.53995)); #1119 = CARTESIAN_POINT('',(4.569589314312,-9.53995)); #1120 = CARTESIAN_POINT('',(4.855188646457,-9.53995)); #1121 = CARTESIAN_POINT('',(5.140787978601,-9.53995)); #1122 = CARTESIAN_POINT('',(5.426387310746,-9.53995)); #1123 = CARTESIAN_POINT('',(5.711986642891,-9.53995)); #1124 = CARTESIAN_POINT('',(5.997585975035,-9.53995)); #1125 = CARTESIAN_POINT('',(6.187985529798,-9.53995)); #1126 = CARTESIAN_POINT('',(6.28318530718,-9.53995)); #1127 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' ) ); #1128 = ORIENTED_EDGE('',*,*,#1129,.F.); #1129 = EDGE_CURVE('',#959,#1057,#1130,.T.); #1130 = SEAM_CURVE('',#1131,(#1135,#1142),.PCURVE_S2.); #1131 = LINE('',#1132,#1133); #1132 = CARTESIAN_POINT('',(-12.89811369191,-0.826297072243,-16.60362)); #1133 = VECTOR('',#1134,1.); #1134 = DIRECTION('',(0.E+000,-2.22044604925E-016,-1.)); #1135 = PCURVE('',#1018,#1136); #1136 = DEFINITIONAL_REPRESENTATION('',(#1137),#1141); #1137 = LINE('',#1138,#1139); #1138 = CARTESIAN_POINT('',(0.E+000,0.E+000)); #1139 = VECTOR('',#1140,1.); #1140 = DIRECTION('',(0.E+000,1.)); #1141 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' ) ); #1142 = PCURVE('',#1018,#1143); #1143 = DEFINITIONAL_REPRESENTATION('',(#1144),#1148); #1144 = LINE('',#1145,#1146); #1145 = CARTESIAN_POINT('',(6.28318530718,0.E+000)); #1146 = VECTOR('',#1147,1.); #1147 = DIRECTION('',(0.E+000,1.)); #1148 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' ) ); #1149 = ORIENTED_EDGE('',*,*,#981,.T.); #1150 = ORIENTED_EDGE('',*,*,#1129,.T.); #1151 = ADVANCED_FACE('',(#1152),#1095,.T.); #1152 = FACE_BOUND('',#1153,.T.); #1153 = EDGE_LOOP('',(#1154,#1209,#1230,#1231)); #1154 = ORIENTED_EDGE('',*,*,#1155,.F.); #1155 = EDGE_CURVE('',#1156,#1156,#1158,.T.); #1156 = VERTEX_POINT('',#1157); #1157 = CARTESIAN_POINT('',(-13.81821369191,-0.826297072243,-34.56367)); #1158 = SURFACE_CURVE('',#1159,(#1164,#1193),.PCURVE_S2.); #1159 = CIRCLE('',#1160,4.0799); #1160 = AXIS2_PLACEMENT_3D('',#1161,#1162,#1163); #1161 = CARTESIAN_POINT('',(-17.89811369191,-0.826297072243,-34.56367)); #1162 = DIRECTION('',(0.E+000,-2.22044604925E-016,-1.)); #1163 = DIRECTION('',(1.,0.E+000,0.E+000)); #1164 = PCURVE('',#1095,#1165); #1165 = DEFINITIONAL_REPRESENTATION('',(#1166),#1192); #1166 = B_SPLINE_CURVE_WITH_KNOTS('',3,(#1167,#1168,#1169,#1170,#1171, #1172,#1173,#1174,#1175,#1176,#1177,#1178,#1179,#1180,#1181,#1182, #1183,#1184,#1185,#1186,#1187,#1188,#1189,#1190,#1191), .UNSPECIFIED.,.F.,.F.,(4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4), (0.E+000,0.285599332145,0.571198664289,0.856797996434,1.142397328578, 1.427996660723,1.713595992867,1.999195325012,2.284794657156, 2.570393989301,2.855993321445,3.14159265359,3.427191985734, 3.712791317879,3.998390650023,4.283989982168,4.569589314312, 4.855188646457,5.140787978601,5.426387310746,5.711986642891, 5.997585975035,6.28318530718),.QUASI_UNIFORM_KNOTS.); #1167 = CARTESIAN_POINT('',(1.632720936236E-016,-8.61985)); #1168 = CARTESIAN_POINT('',(9.519977738151E-002,-8.61985)); #1169 = CARTESIAN_POINT('',(0.285599332145,-8.61985)); #1170 = CARTESIAN_POINT('',(0.571198664289,-8.61985)); #1171 = CARTESIAN_POINT('',(0.856797996434,-8.61985)); #1172 = CARTESIAN_POINT('',(1.142397328578,-8.61985)); #1173 = CARTESIAN_POINT('',(1.427996660723,-8.61985)); #1174 = CARTESIAN_POINT('',(1.713595992867,-8.61985)); #1175 = CARTESIAN_POINT('',(1.999195325012,-8.61985)); #1176 = CARTESIAN_POINT('',(2.284794657156,-8.61985)); #1177 = CARTESIAN_POINT('',(2.570393989301,-8.61985)); #1178 = CARTESIAN_POINT('',(2.855993321445,-8.61985)); #1179 = CARTESIAN_POINT('',(3.14159265359,-8.61985)); #1180 = CARTESIAN_POINT('',(3.427191985734,-8.61985)); #1181 = CARTESIAN_POINT('',(3.712791317879,-8.61985)); #1182 = CARTESIAN_POINT('',(3.998390650023,-8.61985)); #1183 = CARTESIAN_POINT('',(4.283989982168,-8.61985)); #1184 = CARTESIAN_POINT('',(4.569589314312,-8.61985)); #1185 = CARTESIAN_POINT('',(4.855188646457,-8.61985)); #1186 = CARTESIAN_POINT('',(5.140787978601,-8.61985)); #1187 = CARTESIAN_POINT('',(5.426387310746,-8.61985)); #1188 = CARTESIAN_POINT('',(5.711986642891,-8.61985)); #1189 = CARTESIAN_POINT('',(5.997585975035,-8.61985)); #1190 = CARTESIAN_POINT('',(6.187985529798,-8.61985)); #1191 = CARTESIAN_POINT('',(6.28318530718,-8.61985)); #1192 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' ) ); #1193 = PCURVE('',#1194,#1199); #1194 = PLANE('',#1195); #1195 = AXIS2_PLACEMENT_3D('',#1196,#1197,#1198); #1196 = CARTESIAN_POINT('',(-15.85816369191,-0.826297072243,-34.56367)); #1197 = DIRECTION('',(0.E+000,-2.22044604925E-016,-1.)); #1198 = DIRECTION('',(0.E+000,1.,-2.22044604925E-016)); #1199 = DEFINITIONAL_REPRESENTATION('',(#1200),#1208); #1200 = ( BOUNDED_CURVE() B_SPLINE_CURVE(2,(#1201,#1202,#1203,#1204, #1205,#1206,#1207),.UNSPECIFIED.,.T.,.F.) B_SPLINE_CURVE_WITH_KNOTS((1,2 ,2,2,2,1),(-2.094395102393,0.E+000,2.094395102393,4.188790204786, 6.28318530718,8.377580409573),.UNSPECIFIED.) CURVE() GEOMETRIC_REPRESENTATION_ITEM() RATIONAL_B_SPLINE_CURVE((1.,0.5,1.,0.5, 1.,0.5,1.)) REPRESENTATION_ITEM('') ); #1201 = CARTESIAN_POINT('',(0.E+000,2.03995)); #1202 = CARTESIAN_POINT('',(-7.0665940898,2.03995)); #1203 = CARTESIAN_POINT('',(-3.5332970449,-4.0799)); #1204 = CARTESIAN_POINT('',(-9.99254292592E-016,-10.19975)); #1205 = CARTESIAN_POINT('',(3.5332970449,-4.0799)); #1206 = CARTESIAN_POINT('',(7.0665940898,2.03995)); #1207 = CARTESIAN_POINT('',(0.E+000,2.03995)); #1208 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' ) ); #1209 = ORIENTED_EDGE('',*,*,#1210,.F.); #1210 = EDGE_CURVE('',#1057,#1156,#1211,.T.); #1211 = SEAM_CURVE('',#1212,(#1216,#1223),.PCURVE_S2.); #1212 = LINE('',#1213,#1214); #1213 = CARTESIAN_POINT('',(-22.43806369191,-0.826297072243,-43.18352)); #1214 = VECTOR('',#1215,1.); #1215 = DIRECTION('',(-0.707106781187,-2.436019915756E-016, -0.707106781187)); #1216 = PCURVE('',#1095,#1217); #1217 = DEFINITIONAL_REPRESENTATION('',(#1218),#1222); #1218 = LINE('',#1219,#1220); #1219 = CARTESIAN_POINT('',(0.E+000,0.E+000)); #1220 = VECTOR('',#1221,1.); #1221 = DIRECTION('',(0.E+000,1.)); #1222 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' ) ); #1223 = PCURVE('',#1095,#1224); #1224 = DEFINITIONAL_REPRESENTATION('',(#1225),#1229); #1225 = LINE('',#1226,#1227); #1226 = CARTESIAN_POINT('',(6.28318530718,0.E+000)); #1227 = VECTOR('',#1228,1.); #1228 = DIRECTION('',(0.E+000,1.)); #1229 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE','' ) ); #1230 = ORIENTED_EDGE('',*,*,#1056,.T.); #1231 = ORIENTED_EDGE('',*,*,#1210,.T.); #1232 = ADVANCED_FACE('',(#1233),#1194,.T.); #1233 = FACE_BOUND('',#1234,.T.); #1234 = EDGE_LOOP('',(#1235)); #1235 = ORIENTED_EDGE('',*,*,#1155,.T.); #1236 = ( GEOMETRIC_REPRESENTATION_CONTEXT(3) GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#1239)) GLOBAL_UNIT_ASSIGNED_CONTEXT((#1237,#1238)) REPRESENTATION_CONTEXT('Cont ext #1','3D Context with UNIT and UNCERTAINTY') ); #1237 = ( LENGTH_UNIT() NAMED_UNIT(*) SI_UNIT(.MILLI.,.METRE.) ); #1238 = ( NAMED_UNIT(*) PLANE_ANGLE_UNIT() SI_UNIT($,.RADIAN.) ); #1239 = UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.E-006),#1237,'dis tance_accuracy_value','Confusion accuracy'); ENDSEC; END-ISO-10303-21; netgen-6.2.1804/tutorials/square.in2d0000644000175000017500000000134013272137567016107 0ustar kurtkurt# keyword for 2D geometry, version 2 splinecurves2dv2 # a global grading factor 2 # the points (point number, x and y coordinates) points 1 0 0 -maxh=0.01 2 1 0 3 1 1 4 0 1 # boundary curves consisting of # dl dr np p1 p1 flaglist # with # dl ... sub-domain nr on left side # dr ... sub-domain nr on right side # np ... curve is given by 2 (or 3) points # p1, p2 ... points defining the curve # flagslist segments 1 0 2 1 2 -bc=1 -maxh=0.1 1 0 2 2 3 -bc=1 1 0 2 3 4 -bc=1 1 0 2 4 1 -bc=2 materials 1 domain1 -maxh=0.3 netgen-6.2.1804/tutorials/boundarycondition.geo0000644000175000017500000000060413272137567020261 0ustar kurtkurtalgebraic3d solid p1 = plane (0.5, 0, 0; 1, 0, 0); # since surfaces of both bricks are identic they get the same bc id: solid brick1 = orthobrick (0,0,0; 1,1,1) and p1 -bc=1; solid brick2 = orthobrick (0,0,-1; 1,1,0) and p1 -bc=2; tlo brick1; tlo brick2; # override bc number: # all faces of solid p1 belonging to the boundary of tlo brick1 get bc=3 boundarycondition p1 brick1 3; netgen-6.2.1804/tutorials/cubemcyl.geo0000644000175000017500000000062713272137567016337 0ustar kurtkurt# ## Cube minus Cylinder # algebraic3d solid cube = plane (0, 0, 0; 0, 0, -1) and plane (0, 0, 0; 0, -1, 0) and plane (0, 0, 0; -1, 0, 0) and plane (1, 1, 1; 0, 0, 1) and plane (1, 1, 1; 0, 1, 0) and plane (1, 1, 1; 1, 0, 0); solid cyl = cylinder (0.5, 0.5, 0; 0.5, 0.5, 1; 0.03); # cut off small cylinder from cube: solid main = cube and not cyl; tlo main; netgen-6.2.1804/tutorials/torus.geo0000644000175000017500000000012713272137567015703 0ustar kurtkurt# ## a torus # algebraic3d solid tor = torus ( 0, 0, 0; 1, 0, 0; 2 ; 1 ); tlo tor; netgen-6.2.1804/tutorials/trafo.geo0000644000175000017500000000275313272137567015651 0ustar kurtkurtalgebraic3d # # a transformer # solid core = plane (-8, 0, 0; -1, 0, 0) and plane ( 8, 0, 0; 1, 0, 0) and plane ( 0, -6, 0; 0, -1, 0) and plane ( 0, 6, 0; 0, 1, 0) and plane ( 0, 0, -1; 0, 0, -1) and plane ( 0, 0, 1; 0, 0, 1) and not ( plane (-6, 0, 0; -1, 0, 0) and plane (-1, 0, 0; 1, 0, 0) and plane ( 0, -4, 0; 0, -1, 0) and plane ( 0, 4, 0; 0, 1, 0) ) and not ( plane ( 6, 0, 0; 1, 0, 0) and plane ( 1, 0, 0; -1, 0, 0) and plane ( 0, -4, 0; 0, -1, 0) and plane ( 0, 4, 0; 0, 1, 0) ); solid coil1 = cylinder (-7, -3, 0;-7, 3, 0; 3) and not cylinder (-7, -3, 0;-7, 3, 0; 2) and plane (0, -3, 0; 0, -1, 0) and plane (0, 3, 0; 0, 1, 0); solid coil2 = cylinder ( 0, -3, 0; 0, 3, 0; 3) and not cylinder ( 0, -3, 0; 0, 3, 0; 2) and plane (0, -3, 0; 0, -1, 0) and plane (0, 3, 0; 0, 1, 0); solid coil3 = cylinder ( 7, -3, 0; 7, 3, 0; 3) and not cylinder ( 7, -3, 0; 7, 3, 0; 2) and plane (0, -3, 0; 0, -1, 0) and plane (0, 3, 0; 0, 1, 0); solid box = plane (-12, 0, 0; -1, 0, 0) and plane ( 12, 0, 0; 1, 0, 0) and plane ( 0, 8, 0; 0, 1, 0) and plane ( 0,-8, 0; 0, -1, 0) and plane ( 0, 0, 5; 0, 0, 1) and plane ( 0, 0, -5; 0, 0, -1); solid air = box and not core and not coil1 and not coil2 and not coil3; tlo coil1 -col=[0,1,0]; tlo coil2 -col=[0,1,0]; tlo coil3 -col=[0,1,0]; tlo air -col=[0,0,1] -transparent; tlo core -col=[1,1,0]; netgen-6.2.1804/tutorials/ellipticcone.geo0000644000175000017500000000154013272137567017201 0ustar kurtkurt# ## An elliptic cone # # An elliptic cone, given by the point c = (c x , c y , c z ) at the base of the cone along the main axis, # the vectors v and w of the long and short axis of the ellipse, respectively, # the height of the cone, h, and ratio of base long axis length to top long axis length, r: # ellipticcone (c x , c y , c z ; v x , v y , v z ; w x , w y , w z; h; r) # Note: The elliptic cone has to be truncated by planes similar to a cone or an elliptic cylinder. # When r =1, the truncated elliptic cone becomes an elliptic cylinder. # When r tends to zero, the truncated elliptic cone tends to a full elliptic cone. # However, when r = 0, the top part becomes a point(tip) and meshing fails! algebraic3d solid cutcone = ellipticcone ( 0, 0, 0; 5, 0, 0; 0, 2, 0; 5; 0.5) and plane (0, 0, 0; 0, 0, -1) and plane (0, 0, 5; 0, 0, 1); tlo cutcone; netgen-6.2.1804/tutorials/period.geo0000644000175000017500000000123613272137567016013 0ustar kurtkurt## ## Example with periodic boundary conditions ## by Joachim Schoeberl ## ## algebraic3d solid p1 = plane (0, 0, 0; 0, 0, -1); solid p2 = plane (1, 1, 1; 0, 0, 1); solid p3 = plane (0, 0, 0; 0, -1, 0); solid p4 = plane (1, 1, 1; 0, 1, 0); solid p5 = plane (0, 0, 0; -1, 0, 0); solid p6 = plane (1, 1, 1; 1, 0, 0); solid cube = p1 and p2 and p3 and p4 and p5 and p6; solid cyls = cylinder (0.5, 0.5, 0; 0.5, 0.5, 1; 0.3) or cylinder (0, 0.5, 0.2; 1, 0.5, 0.2; 0.1); solid matrix = cube and not cyls; solid inner = cube and cyls; tlo matrix -transparent; tlo inner -col=[1,0,0]; identify periodic p1 p2; identify periodic p3 p4; identify periodic p5 p6; netgen-6.2.1804/tutorials/frame.step0000644000175000017500000170775013272137567016043 0ustar kurtkurtISO-10303-21; HEADER; FILE_DESCRIPTION((''),'2;1'); FILE_NAME('PROESOURCE','2002-11-04T',('user-01'),(''), 'PRO/ENGINEER BY PARAMETRIC TECHNOLOGY CORPORATION, 2002060', 'PRO/ENGINEER BY PARAMETRIC TECHNOLOGY CORPORATION, 2002060',''); FILE_SCHEMA(('CONFIG_CONTROL_DESIGN')); ENDSEC; DATA; #1=DIRECTION('',(-1.E0,0.E0,0.E0)); #2=VECTOR('',#1,1.693725393319E1); #3=CARTESIAN_POINT('',(2.046862696660E1,0.E0,8.E0)); #4=LINE('',#3,#2); #5=DIRECTION('',(-1.E0,0.E0,0.E0)); #6=VECTOR('',#5,9.E0); #7=CARTESIAN_POINT('',(1.65E1,0.E0,2.5E0)); #8=LINE('',#7,#6); #9=CARTESIAN_POINT('',(1.8E1,0.E0,3.075E1)); #10=DIRECTION('',(0.E0,-1.E0,0.E0)); #11=DIRECTION('',(1.E0,0.E0,0.E0)); #12=AXIS2_PLACEMENT_3D('',#9,#10,#11); #14=CARTESIAN_POINT('',(1.8E1,0.E0,3.075E1)); #15=DIRECTION('',(0.E0,-1.E0,0.E0)); #16=DIRECTION('',(-1.E0,0.E0,0.E0)); #17=AXIS2_PLACEMENT_3D('',#14,#15,#16); #19=CARTESIAN_POINT('',(1.8E1,0.E0,1.25E0)); #20=DIRECTION('',(0.E0,-1.E0,0.E0)); #21=DIRECTION('',(1.E0,0.E0,0.E0)); #22=AXIS2_PLACEMENT_3D('',#19,#20,#21); #24=CARTESIAN_POINT('',(1.8E1,0.E0,1.25E0)); #25=DIRECTION('',(0.E0,-1.E0,0.E0)); #26=DIRECTION('',(-1.E0,0.E0,0.E0)); #27=AXIS2_PLACEMENT_3D('',#24,#25,#26); #29=CARTESIAN_POINT('',(1.2E1,0.E0,3.075E1)); #30=DIRECTION('',(0.E0,-1.E0,0.E0)); #31=DIRECTION('',(1.E0,0.E0,0.E0)); #32=AXIS2_PLACEMENT_3D('',#29,#30,#31); #34=CARTESIAN_POINT('',(1.2E1,0.E0,3.075E1)); #35=DIRECTION('',(0.E0,-1.E0,0.E0)); #36=DIRECTION('',(-1.E0,0.E0,0.E0)); #37=AXIS2_PLACEMENT_3D('',#34,#35,#36); #39=CARTESIAN_POINT('',(6.E0,0.E0,3.075E1)); #40=DIRECTION('',(0.E0,-1.E0,0.E0)); #41=DIRECTION('',(1.E0,0.E0,0.E0)); #42=AXIS2_PLACEMENT_3D('',#39,#40,#41); #44=CARTESIAN_POINT('',(6.E0,0.E0,3.075E1)); #45=DIRECTION('',(0.E0,-1.E0,0.E0)); #46=DIRECTION('',(-1.E0,0.E0,0.E0)); #47=AXIS2_PLACEMENT_3D('',#44,#45,#46); #49=CARTESIAN_POINT('',(1.2E1,0.E0,1.25E0)); #50=DIRECTION('',(0.E0,-1.E0,0.E0)); #51=DIRECTION('',(1.E0,0.E0,0.E0)); #52=AXIS2_PLACEMENT_3D('',#49,#50,#51); #54=CARTESIAN_POINT('',(1.2E1,0.E0,1.25E0)); #55=DIRECTION('',(0.E0,-1.E0,0.E0)); #56=DIRECTION('',(-1.E0,0.E0,0.E0)); #57=AXIS2_PLACEMENT_3D('',#54,#55,#56); #59=CARTESIAN_POINT('',(2.2875E1,0.E0,2.4E1)); #60=DIRECTION('',(0.E0,-1.E0,0.E0)); #61=DIRECTION('',(1.E0,0.E0,0.E0)); #62=AXIS2_PLACEMENT_3D('',#59,#60,#61); #64=CARTESIAN_POINT('',(2.2875E1,0.E0,2.4E1)); #65=DIRECTION('',(0.E0,-1.E0,0.E0)); #66=DIRECTION('',(-1.E0,0.E0,0.E0)); #67=AXIS2_PLACEMENT_3D('',#64,#65,#66); #69=CARTESIAN_POINT('',(2.2875E1,0.E0,1.8E1)); #70=DIRECTION('',(0.E0,-1.E0,0.E0)); #71=DIRECTION('',(1.E0,0.E0,0.E0)); #72=AXIS2_PLACEMENT_3D('',#69,#70,#71); #74=CARTESIAN_POINT('',(2.2875E1,0.E0,1.8E1)); #75=DIRECTION('',(0.E0,-1.E0,0.E0)); #76=DIRECTION('',(-1.E0,0.E0,0.E0)); #77=AXIS2_PLACEMENT_3D('',#74,#75,#76); #79=CARTESIAN_POINT('',(2.2875E1,0.E0,1.2E1)); #80=DIRECTION('',(0.E0,-1.E0,0.E0)); #81=DIRECTION('',(1.E0,0.E0,0.E0)); #82=AXIS2_PLACEMENT_3D('',#79,#80,#81); #84=CARTESIAN_POINT('',(2.2875E1,0.E0,1.2E1)); #85=DIRECTION('',(0.E0,-1.E0,0.E0)); #86=DIRECTION('',(-1.E0,0.E0,0.E0)); #87=AXIS2_PLACEMENT_3D('',#84,#85,#86); #89=CARTESIAN_POINT('',(2.2875E1,0.E0,6.E0)); #90=DIRECTION('',(0.E0,-1.E0,0.E0)); #91=DIRECTION('',(1.E0,0.E0,0.E0)); #92=AXIS2_PLACEMENT_3D('',#89,#90,#91); #94=CARTESIAN_POINT('',(2.2875E1,0.E0,6.E0)); #95=DIRECTION('',(0.E0,-1.E0,0.E0)); #96=DIRECTION('',(-1.E0,0.E0,0.E0)); #97=AXIS2_PLACEMENT_3D('',#94,#95,#96); #99=CARTESIAN_POINT('',(1.125E0,0.E0,2.4E1)); #100=DIRECTION('',(0.E0,-1.E0,0.E0)); #101=DIRECTION('',(1.E0,0.E0,0.E0)); #102=AXIS2_PLACEMENT_3D('',#99,#100,#101); #104=CARTESIAN_POINT('',(1.125E0,0.E0,2.4E1)); #105=DIRECTION('',(0.E0,-1.E0,0.E0)); #106=DIRECTION('',(-1.E0,0.E0,0.E0)); #107=AXIS2_PLACEMENT_3D('',#104,#105,#106); #109=CARTESIAN_POINT('',(1.125E0,0.E0,1.8E1)); #110=DIRECTION('',(0.E0,-1.E0,0.E0)); #111=DIRECTION('',(1.E0,0.E0,0.E0)); #112=AXIS2_PLACEMENT_3D('',#109,#110,#111); #114=CARTESIAN_POINT('',(1.125E0,0.E0,1.8E1)); #115=DIRECTION('',(0.E0,-1.E0,0.E0)); #116=DIRECTION('',(-1.E0,0.E0,0.E0)); #117=AXIS2_PLACEMENT_3D('',#114,#115,#116); #119=CARTESIAN_POINT('',(1.125E0,0.E0,1.2E1)); #120=DIRECTION('',(0.E0,-1.E0,0.E0)); #121=DIRECTION('',(1.E0,0.E0,0.E0)); #122=AXIS2_PLACEMENT_3D('',#119,#120,#121); #124=CARTESIAN_POINT('',(1.125E0,0.E0,1.2E1)); #125=DIRECTION('',(0.E0,-1.E0,0.E0)); #126=DIRECTION('',(-1.E0,0.E0,0.E0)); #127=AXIS2_PLACEMENT_3D('',#124,#125,#126); #129=DIRECTION('',(1.E0,0.E0,0.E0)); #130=VECTOR('',#129,1.E0); #131=CARTESIAN_POINT('',(2.5E1,0.E0,8.E0)); #132=LINE('',#131,#130); #133=DIRECTION('',(0.E0,0.E0,-1.E0)); #134=VECTOR('',#133,3.E0); #135=CARTESIAN_POINT('',(2.4E1,0.E0,7.E0)); #136=LINE('',#135,#134); #137=DIRECTION('',(-1.E0,0.E0,0.E0)); #138=VECTOR('',#137,1.6E1); #139=CARTESIAN_POINT('',(2.E1,0.E0,0.E0)); #140=LINE('',#139,#138); #141=DIRECTION('',(0.E0,0.E0,1.E0)); #142=VECTOR('',#141,3.E0); #143=CARTESIAN_POINT('',(0.E0,0.E0,4.E0)); #144=LINE('',#143,#142); #145=DIRECTION('',(-1.E0,0.E0,0.E0)); #146=VECTOR('',#145,1.E0); #147=CARTESIAN_POINT('',(-1.E0,0.E0,8.E0)); #148=LINE('',#147,#146); #149=DIRECTION('',(0.E0,0.E0,1.E0)); #150=VECTOR('',#149,3.75E0); #151=CARTESIAN_POINT('',(-2.E0,0.E0,8.E0)); #152=LINE('',#151,#150); #153=DIRECTION('',(1.E0,0.E0,0.E0)); #154=VECTOR('',#153,5.E-1); #155=CARTESIAN_POINT('',(-1.5E0,0.E0,1.225E1)); #156=LINE('',#155,#154); #157=DIRECTION('',(0.E0,0.E0,1.E0)); #158=VECTOR('',#157,1.475E1); #159=CARTESIAN_POINT('',(0.E0,0.E0,1.325E1)); #160=LINE('',#159,#158); #161=DIRECTION('',(1.E0,0.E0,0.E0)); #162=VECTOR('',#161,1.6E1); #163=CARTESIAN_POINT('',(4.E0,0.E0,3.2E1)); #164=LINE('',#163,#162); #165=DIRECTION('',(0.E0,0.E0,-1.E0)); #166=VECTOR('',#165,1.475E1); #167=CARTESIAN_POINT('',(2.4E1,0.E0,2.8E1)); #168=LINE('',#167,#166); #169=DIRECTION('',(-1.E0,0.E0,0.E0)); #170=VECTOR('',#169,5.E-1); #171=CARTESIAN_POINT('',(2.55E1,0.E0,1.225E1)); #172=LINE('',#171,#170); #173=DIRECTION('',(0.E0,0.E0,1.E0)); #174=VECTOR('',#173,3.75E0); #175=CARTESIAN_POINT('',(2.6E1,0.E0,8.E0)); #176=LINE('',#175,#174); #177=CARTESIAN_POINT('',(1.125E0,0.E0,6.E0)); #178=DIRECTION('',(0.E0,-1.E0,0.E0)); #179=DIRECTION('',(1.E0,0.E0,0.E0)); #180=AXIS2_PLACEMENT_3D('',#177,#178,#179); #182=CARTESIAN_POINT('',(1.125E0,0.E0,6.E0)); #183=DIRECTION('',(0.E0,-1.E0,0.E0)); #184=DIRECTION('',(-1.E0,0.E0,0.E0)); #185=AXIS2_PLACEMENT_3D('',#182,#183,#184); #187=CARTESIAN_POINT('',(6.E0,0.E0,1.25E0)); #188=DIRECTION('',(0.E0,-1.E0,0.E0)); #189=DIRECTION('',(1.E0,0.E0,0.E0)); #190=AXIS2_PLACEMENT_3D('',#187,#188,#189); #192=CARTESIAN_POINT('',(6.E0,0.E0,1.25E0)); #193=DIRECTION('',(0.E0,-1.E0,0.E0)); #194=DIRECTION('',(-1.E0,0.E0,0.E0)); #195=AXIS2_PLACEMENT_3D('',#192,#193,#194); #197=DIRECTION('',(1.E0,0.E0,0.E0)); #198=VECTOR('',#197,1.3E1); #199=CARTESIAN_POINT('',(5.5E0,0.E0,1.89375E1)); #200=LINE('',#199,#198); #201=DIRECTION('',(0.E0,0.E0,-1.E0)); #202=VECTOR('',#201,2.5625E0); #203=CARTESIAN_POINT('',(2.15E1,0.E0,2.45E1)); #204=LINE('',#203,#202); #205=DIRECTION('',(1.E0,0.E0,0.E0)); #206=VECTOR('',#205,9.E0); #207=CARTESIAN_POINT('',(7.5E0,0.E0,2.95E1)); #208=LINE('',#207,#206); #209=DIRECTION('',(0.E0,0.E0,1.E0)); #210=VECTOR('',#209,2.5625E0); #211=CARTESIAN_POINT('',(2.5E0,0.E0,2.19375E1)); #212=LINE('',#211,#210); #213=DIRECTION('',(0.E0,0.E0,-1.E0)); #214=VECTOR('',#213,8.125E-1); #215=CARTESIAN_POINT('',(2.15E1,0.E0,1.40625E1)); #216=LINE('',#215,#214); #217=DIRECTION('',(-1.E0,0.E0,0.E0)); #218=VECTOR('',#217,1.3E1); #219=CARTESIAN_POINT('',(1.85E1,0.E0,1.70625E1)); #220=LINE('',#219,#218); #221=DIRECTION('',(0.E0,0.E0,1.E0)); #222=VECTOR('',#221,8.125E-1); #223=CARTESIAN_POINT('',(2.5E0,0.E0,1.325E1)); #224=LINE('',#223,#222); #225=DIRECTION('',(1.E0,0.E0,0.E0)); #226=VECTOR('',#225,1.E0); #227=CARTESIAN_POINT('',(3.5E0,0.E0,1.225E1)); #228=LINE('',#227,#226); #229=DIRECTION('',(0.E0,0.E0,-1.E0)); #230=VECTOR('',#229,7.5E-1); #231=CARTESIAN_POINT('',(5.E0,0.E0,1.175E1)); #232=LINE('',#231,#230); #233=DIRECTION('',(1.E0,0.E0,0.E0)); #234=VECTOR('',#233,1.2E1); #235=CARTESIAN_POINT('',(6.E0,0.E0,1.E1)); #236=LINE('',#235,#234); #237=DIRECTION('',(0.E0,0.E0,-1.E0)); #238=VECTOR('',#237,7.5E-1); #239=CARTESIAN_POINT('',(1.9E1,0.E0,1.175E1)); #240=LINE('',#239,#238); #241=DIRECTION('',(-1.E0,0.E0,0.E0)); #242=VECTOR('',#241,1.E0); #243=CARTESIAN_POINT('',(2.05E1,0.E0,1.225E1)); #244=LINE('',#243,#242); #245=CARTESIAN_POINT('',(6.E0,0.E0,9.E0)); #246=DIRECTION('',(0.E0,-1.E0,0.E0)); #247=DIRECTION('',(1.E0,0.E0,0.E0)); #248=AXIS2_PLACEMENT_3D('',#245,#246,#247); #250=CARTESIAN_POINT('',(6.E0,0.E0,9.E0)); #251=DIRECTION('',(0.E0,-1.E0,0.E0)); #252=DIRECTION('',(-1.E0,0.E0,0.E0)); #253=AXIS2_PLACEMENT_3D('',#250,#251,#252); #255=CARTESIAN_POINT('',(1.2E1,0.E0,9.E0)); #256=DIRECTION('',(0.E0,-1.E0,0.E0)); #257=DIRECTION('',(1.E0,0.E0,0.E0)); #258=AXIS2_PLACEMENT_3D('',#255,#256,#257); #260=CARTESIAN_POINT('',(1.2E1,0.E0,9.E0)); #261=DIRECTION('',(0.E0,-1.E0,0.E0)); #262=DIRECTION('',(-1.E0,0.E0,0.E0)); #263=AXIS2_PLACEMENT_3D('',#260,#261,#262); #265=CARTESIAN_POINT('',(1.8E1,0.E0,9.E0)); #266=DIRECTION('',(0.E0,-1.E0,0.E0)); #267=DIRECTION('',(1.E0,0.E0,0.E0)); #268=AXIS2_PLACEMENT_3D('',#265,#266,#267); #270=CARTESIAN_POINT('',(1.8E1,0.E0,9.E0)); #271=DIRECTION('',(0.E0,-1.E0,0.E0)); #272=DIRECTION('',(-1.E0,0.E0,0.E0)); #273=AXIS2_PLACEMENT_3D('',#270,#271,#272); #275=CARTESIAN_POINT('',(6.E0,0.E0,1.8E1)); #276=DIRECTION('',(0.E0,-1.E0,0.E0)); #277=DIRECTION('',(1.E0,0.E0,0.E0)); #278=AXIS2_PLACEMENT_3D('',#275,#276,#277); #280=CARTESIAN_POINT('',(6.E0,0.E0,1.8E1)); #281=DIRECTION('',(0.E0,-1.E0,0.E0)); #282=DIRECTION('',(-1.E0,0.E0,0.E0)); #283=AXIS2_PLACEMENT_3D('',#280,#281,#282); #285=CARTESIAN_POINT('',(1.2E1,0.E0,1.8E1)); #286=DIRECTION('',(0.E0,-1.E0,0.E0)); #287=DIRECTION('',(1.E0,0.E0,0.E0)); #288=AXIS2_PLACEMENT_3D('',#285,#286,#287); #290=CARTESIAN_POINT('',(1.2E1,0.E0,1.8E1)); #291=DIRECTION('',(0.E0,-1.E0,0.E0)); #292=DIRECTION('',(-1.E0,0.E0,0.E0)); #293=AXIS2_PLACEMENT_3D('',#290,#291,#292); #295=CARTESIAN_POINT('',(1.8E1,0.E0,1.8E1)); #296=DIRECTION('',(0.E0,-1.E0,0.E0)); #297=DIRECTION('',(1.E0,0.E0,0.E0)); #298=AXIS2_PLACEMENT_3D('',#295,#296,#297); #300=CARTESIAN_POINT('',(1.8E1,0.E0,1.8E1)); #301=DIRECTION('',(0.E0,-1.E0,0.E0)); #302=DIRECTION('',(-1.E0,0.E0,0.E0)); #303=AXIS2_PLACEMENT_3D('',#300,#301,#302); #305=DIRECTION('',(1.E0,0.E0,0.E0)); #306=VECTOR('',#305,3.E0); #307=CARTESIAN_POINT('',(7.5E0,0.E0,6.875E-1)); #308=LINE('',#307,#306); #309=CARTESIAN_POINT('',(1.05E1,0.E0,1.25E0)); #310=DIRECTION('',(0.E0,-1.E0,0.E0)); #311=DIRECTION('',(0.E0,0.E0,-1.E0)); #312=AXIS2_PLACEMENT_3D('',#309,#310,#311); #314=DIRECTION('',(-1.E0,0.E0,0.E0)); #315=VECTOR('',#314,3.E0); #316=CARTESIAN_POINT('',(1.05E1,0.E0,1.8125E0)); #317=LINE('',#316,#315); #318=CARTESIAN_POINT('',(7.5E0,0.E0,1.25E0)); #319=DIRECTION('',(0.E0,-1.E0,0.E0)); #320=DIRECTION('',(0.E0,0.E0,1.E0)); #321=AXIS2_PLACEMENT_3D('',#318,#319,#320); #323=CARTESIAN_POINT('',(1.61E0,0.E0,4.5E0)); #324=DIRECTION('',(0.E0,-1.E0,0.E0)); #325=DIRECTION('',(8.910741301059E-1,0.E0,4.538577912254E-1)); #326=AXIS2_PLACEMENT_3D('',#323,#324,#325); #328=DIRECTION('',(7.071067811865E-1,0.E0,-7.071067811865E-1)); #329=VECTOR('',#328,4.263248410977E0); #330=CARTESIAN_POINT('',(9.254066777019E-1,0.E0,4.046865146430E0)); #331=LINE('',#330,#329); #332=CARTESIAN_POINT('',(4.553039342392E0,0.E0,1.645354088550E0)); #333=DIRECTION('',(0.E0,-1.E0,0.E0)); #334=DIRECTION('',(-7.071067811865E-1,0.E0,-7.071067811865E-1)); #335=AXIS2_PLACEMENT_3D('',#332,#333,#334); #337=CARTESIAN_POINT('',(7.5E0,0.E0,7.5E0)); #338=DIRECTION('',(0.E0,-1.E0,0.E0)); #339=DIRECTION('',(-8.910741301059E-1,0.E0,-4.538577912254E-1)); #340=AXIS2_PLACEMENT_3D('',#337,#338,#339); #342=DIRECTION('',(0.E0,0.E0,-1.E0)); #343=VECTOR('',#342,3.15E-1); #344=CARTESIAN_POINT('',(6.9E-1,0.E0,7.815E0)); #345=LINE('',#344,#343); #346=CARTESIAN_POINT('',(1.25125E0,0.E0,7.5E0)); #347=DIRECTION('',(0.E0,-1.E0,0.E0)); #348=DIRECTION('',(-1.E0,0.E0,0.E0)); #349=AXIS2_PLACEMENT_3D('',#346,#347,#348); #351=DIRECTION('',(0.E0,0.E0,1.E0)); #352=VECTOR('',#351,3.15E-1); #353=CARTESIAN_POINT('',(1.8125E0,0.E0,7.5E0)); #354=LINE('',#353,#352); #355=DIRECTION('',(1.E0,0.E0,0.E0)); #356=VECTOR('',#355,7.5E-1); #357=CARTESIAN_POINT('',(2.6875E0,0.E0,8.69E0)); #358=LINE('',#357,#356); #359=DIRECTION('',(0.E0,0.E0,1.E0)); #360=VECTOR('',#359,8.1E-1); #361=CARTESIAN_POINT('',(4.3125E0,0.E0,9.565E0)); #362=LINE('',#361,#360); #363=DIRECTION('',(-1.E0,0.E0,0.E0)); #364=VECTOR('',#363,3.875E0); #365=CARTESIAN_POINT('',(3.4375E0,0.E0,1.125E1)); #366=LINE('',#365,#364); #367=DIRECTION('',(0.E0,0.E0,-1.E0)); #368=VECTOR('',#367,8.1E-1); #369=CARTESIAN_POINT('',(-1.3125E0,0.E0,1.0375E1)); #370=LINE('',#369,#368); #371=DIRECTION('',(1.E0,0.E0,0.E0)); #372=VECTOR('',#371,2.525E-1); #373=CARTESIAN_POINT('',(-4.375E-1,0.E0,8.69E0)); #374=LINE('',#373,#372); #375=DIRECTION('',(0.E0,0.E0,-1.E0)); #376=VECTOR('',#375,3.E0); #377=CARTESIAN_POINT('',(6.875E-1,0.E0,1.65E1)); #378=LINE('',#377,#376); #379=CARTESIAN_POINT('',(1.25E0,0.E0,1.35E1)); #380=DIRECTION('',(0.E0,-1.E0,0.E0)); #381=DIRECTION('',(-1.E0,0.E0,0.E0)); #382=AXIS2_PLACEMENT_3D('',#379,#380,#381); #384=DIRECTION('',(0.E0,0.E0,1.E0)); #385=VECTOR('',#384,3.E0); #386=CARTESIAN_POINT('',(1.8125E0,0.E0,1.35E1)); #387=LINE('',#386,#385); #388=CARTESIAN_POINT('',(1.25E0,0.E0,1.65E1)); #389=DIRECTION('',(0.E0,-1.E0,0.E0)); #390=DIRECTION('',(1.E0,0.E0,0.E0)); #391=AXIS2_PLACEMENT_3D('',#388,#389,#390); #393=DIRECTION('',(0.E0,0.E0,-1.E0)); #394=VECTOR('',#393,3.E0); #395=CARTESIAN_POINT('',(6.875E-1,0.E0,2.25E1)); #396=LINE('',#395,#394); #397=CARTESIAN_POINT('',(1.25E0,0.E0,1.95E1)); #398=DIRECTION('',(0.E0,-1.E0,0.E0)); #399=DIRECTION('',(-1.E0,0.E0,0.E0)); #400=AXIS2_PLACEMENT_3D('',#397,#398,#399); #402=DIRECTION('',(0.E0,0.E0,1.E0)); #403=VECTOR('',#402,3.E0); #404=CARTESIAN_POINT('',(1.8125E0,0.E0,1.95E1)); #405=LINE('',#404,#403); #406=CARTESIAN_POINT('',(1.25E0,0.E0,2.25E1)); #407=DIRECTION('',(0.E0,-1.E0,0.E0)); #408=DIRECTION('',(1.E0,0.E0,0.E0)); #409=AXIS2_PLACEMENT_3D('',#406,#407,#408); #411=DIRECTION('',(1.E0,0.E0,0.E0)); #412=VECTOR('',#411,3.E0); #413=CARTESIAN_POINT('',(7.5E0,0.E0,8.5E0)); #414=LINE('',#413,#412); #415=CARTESIAN_POINT('',(1.05E1,0.E0,9.E0)); #416=DIRECTION('',(0.E0,-1.E0,0.E0)); #417=DIRECTION('',(0.E0,0.E0,-1.E0)); #418=AXIS2_PLACEMENT_3D('',#415,#416,#417); #420=DIRECTION('',(-1.E0,0.E0,0.E0)); #421=VECTOR('',#420,3.E0); #422=CARTESIAN_POINT('',(1.05E1,0.E0,9.5E0)); #423=LINE('',#422,#421); #424=CARTESIAN_POINT('',(7.5E0,0.E0,9.E0)); #425=DIRECTION('',(0.E0,-1.E0,0.E0)); #426=DIRECTION('',(0.E0,0.E0,1.E0)); #427=AXIS2_PLACEMENT_3D('',#424,#425,#426); #429=DIRECTION('',(1.E0,0.E0,0.E0)); #430=VECTOR('',#429,3.E0); #431=CARTESIAN_POINT('',(7.5E0,0.E0,1.75625E1)); #432=LINE('',#431,#430); #433=CARTESIAN_POINT('',(1.05E1,0.E0,1.8E1)); #434=DIRECTION('',(0.E0,-1.E0,0.E0)); #435=DIRECTION('',(0.E0,0.E0,-1.E0)); #436=AXIS2_PLACEMENT_3D('',#433,#434,#435); #438=DIRECTION('',(-1.E0,0.E0,0.E0)); #439=VECTOR('',#438,3.E0); #440=CARTESIAN_POINT('',(1.05E1,0.E0,1.84375E1)); #441=LINE('',#440,#439); #442=CARTESIAN_POINT('',(7.5E0,0.E0,1.8E1)); #443=DIRECTION('',(0.E0,-1.E0,0.E0)); #444=DIRECTION('',(0.E0,0.E0,1.E0)); #445=AXIS2_PLACEMENT_3D('',#442,#443,#444); #447=DIRECTION('',(1.E0,0.E0,0.E0)); #448=VECTOR('',#447,3.E0); #449=CARTESIAN_POINT('',(7.5E0,0.E0,3.13125E1)); #450=LINE('',#449,#448); #451=CARTESIAN_POINT('',(7.5E0,0.E0,3.075E1)); #452=DIRECTION('',(0.E0,1.E0,0.E0)); #453=DIRECTION('',(0.E0,0.E0,-1.E0)); #454=AXIS2_PLACEMENT_3D('',#451,#452,#453); #456=DIRECTION('',(-1.E0,0.E0,0.E0)); #457=VECTOR('',#456,3.E0); #458=CARTESIAN_POINT('',(1.05E1,0.E0,3.01875E1)); #459=LINE('',#458,#457); #460=CARTESIAN_POINT('',(1.05E1,0.E0,3.075E1)); #461=DIRECTION('',(0.E0,1.E0,0.E0)); #462=DIRECTION('',(0.E0,0.E0,1.E0)); #463=AXIS2_PLACEMENT_3D('',#460,#461,#462); #465=DIRECTION('',(-1.E0,0.E0,0.E0)); #466=VECTOR('',#465,3.E0); #467=CARTESIAN_POINT('',(1.65E1,0.E0,6.875E-1)); #468=LINE('',#467,#466); #469=CARTESIAN_POINT('',(1.65E1,0.E0,1.25E0)); #470=DIRECTION('',(0.E0,1.E0,0.E0)); #471=DIRECTION('',(0.E0,0.E0,1.E0)); #472=AXIS2_PLACEMENT_3D('',#469,#470,#471); #474=DIRECTION('',(1.E0,0.E0,0.E0)); #475=VECTOR('',#474,3.E0); #476=CARTESIAN_POINT('',(1.35E1,0.E0,1.8125E0)); #477=LINE('',#476,#475); #478=CARTESIAN_POINT('',(1.35E1,0.E0,1.25E0)); #479=DIRECTION('',(0.E0,1.E0,0.E0)); #480=DIRECTION('',(0.E0,0.E0,-1.E0)); #481=AXIS2_PLACEMENT_3D('',#478,#479,#480); #483=DIRECTION('',(0.E0,0.E0,-1.E0)); #484=VECTOR('',#483,3.E0); #485=CARTESIAN_POINT('',(2.33125E1,0.E0,1.65E1)); #486=LINE('',#485,#484); #487=CARTESIAN_POINT('',(2.275E1,0.E0,1.65E1)); #488=DIRECTION('',(0.E0,1.E0,0.E0)); #489=DIRECTION('',(-1.E0,0.E0,0.E0)); #490=AXIS2_PLACEMENT_3D('',#487,#488,#489); #492=DIRECTION('',(0.E0,0.E0,1.E0)); #493=VECTOR('',#492,3.E0); #494=CARTESIAN_POINT('',(2.21875E1,0.E0,1.35E1)); #495=LINE('',#494,#493); #496=CARTESIAN_POINT('',(2.275E1,0.E0,1.35E1)); #497=DIRECTION('',(0.E0,1.E0,0.E0)); #498=DIRECTION('',(1.E0,0.E0,0.E0)); #499=AXIS2_PLACEMENT_3D('',#496,#497,#498); #501=DIRECTION('',(0.E0,0.E0,-1.E0)); #502=VECTOR('',#501,3.E0); #503=CARTESIAN_POINT('',(2.33125E1,0.E0,2.25E1)); #504=LINE('',#503,#502); #505=CARTESIAN_POINT('',(2.275E1,0.E0,2.25E1)); #506=DIRECTION('',(0.E0,1.E0,0.E0)); #507=DIRECTION('',(-1.E0,0.E0,0.E0)); #508=AXIS2_PLACEMENT_3D('',#505,#506,#507); #510=DIRECTION('',(0.E0,0.E0,1.E0)); #511=VECTOR('',#510,3.E0); #512=CARTESIAN_POINT('',(2.21875E1,0.E0,1.95E1)); #513=LINE('',#512,#511); #514=CARTESIAN_POINT('',(2.275E1,0.E0,1.95E1)); #515=DIRECTION('',(0.E0,1.E0,0.E0)); #516=DIRECTION('',(1.E0,0.E0,0.E0)); #517=AXIS2_PLACEMENT_3D('',#514,#515,#516); #519=DIRECTION('',(-1.E0,0.E0,0.E0)); #520=VECTOR('',#519,3.E0); #521=CARTESIAN_POINT('',(1.65E1,0.E0,8.5E0)); #522=LINE('',#521,#520); #523=CARTESIAN_POINT('',(1.65E1,0.E0,9.E0)); #524=DIRECTION('',(0.E0,1.E0,0.E0)); #525=DIRECTION('',(0.E0,0.E0,1.E0)); #526=AXIS2_PLACEMENT_3D('',#523,#524,#525); #528=DIRECTION('',(1.E0,0.E0,0.E0)); #529=VECTOR('',#528,3.E0); #530=CARTESIAN_POINT('',(1.35E1,0.E0,9.5E0)); #531=LINE('',#530,#529); #532=CARTESIAN_POINT('',(1.35E1,0.E0,9.E0)); #533=DIRECTION('',(0.E0,1.E0,0.E0)); #534=DIRECTION('',(0.E0,0.E0,-1.E0)); #535=AXIS2_PLACEMENT_3D('',#532,#533,#534); #537=DIRECTION('',(-1.E0,0.E0,0.E0)); #538=VECTOR('',#537,3.E0); #539=CARTESIAN_POINT('',(1.65E1,0.E0,1.75625E1)); #540=LINE('',#539,#538); #541=CARTESIAN_POINT('',(1.65E1,0.E0,1.8E1)); #542=DIRECTION('',(0.E0,1.E0,0.E0)); #543=DIRECTION('',(0.E0,0.E0,1.E0)); #544=AXIS2_PLACEMENT_3D('',#541,#542,#543); #546=DIRECTION('',(1.E0,0.E0,0.E0)); #547=VECTOR('',#546,3.E0); #548=CARTESIAN_POINT('',(1.35E1,0.E0,1.84375E1)); #549=LINE('',#548,#547); #550=CARTESIAN_POINT('',(1.35E1,0.E0,1.8E1)); #551=DIRECTION('',(0.E0,1.E0,0.E0)); #552=DIRECTION('',(0.E0,0.E0,-1.E0)); #553=AXIS2_PLACEMENT_3D('',#550,#551,#552); #555=DIRECTION('',(-1.E0,0.E0,0.E0)); #556=VECTOR('',#555,3.E0); #557=CARTESIAN_POINT('',(1.65E1,0.E0,3.13125E1)); #558=LINE('',#557,#556); #559=CARTESIAN_POINT('',(1.35E1,0.E0,3.075E1)); #560=DIRECTION('',(0.E0,-1.E0,0.E0)); #561=DIRECTION('',(0.E0,0.E0,1.E0)); #562=AXIS2_PLACEMENT_3D('',#559,#560,#561); #564=DIRECTION('',(1.E0,0.E0,0.E0)); #565=VECTOR('',#564,3.E0); #566=CARTESIAN_POINT('',(1.35E1,0.E0,3.01875E1)); #567=LINE('',#566,#565); #568=CARTESIAN_POINT('',(1.65E1,0.E0,3.075E1)); #569=DIRECTION('',(0.E0,-1.E0,0.E0)); #570=DIRECTION('',(0.E0,0.E0,-1.E0)); #571=AXIS2_PLACEMENT_3D('',#568,#569,#570); #573=DIRECTION('',(0.E0,0.E0,1.E0)); #574=VECTOR('',#573,3.1E-1); #575=CARTESIAN_POINT('',(2.21875E1,0.E0,7.5E0)); #576=LINE('',#575,#574); #577=CARTESIAN_POINT('',(2.274875E1,0.E0,7.5E0)); #578=DIRECTION('',(0.E0,1.E0,0.E0)); #579=DIRECTION('',(1.E0,0.E0,-3.956251312695E-14)); #580=AXIS2_PLACEMENT_3D('',#577,#578,#579); #582=DIRECTION('',(2.292073341162E-14,0.E0,-1.E0)); #583=VECTOR('',#582,3.1E-1); #584=CARTESIAN_POINT('',(2.331E1,0.E0,7.81E0)); #585=LINE('',#584,#583); #586=DIRECTION('',(-1.E0,0.E0,0.E0)); #587=VECTOR('',#586,2.425E-1); #588=CARTESIAN_POINT('',(2.44325E1,0.E0,8.69E0)); #589=LINE('',#588,#587); #590=DIRECTION('',(0.E0,0.E0,-1.E0)); #591=VECTOR('',#590,8.E-1); #592=CARTESIAN_POINT('',(2.53125E1,0.E0,1.037E1)); #593=LINE('',#592,#591); #594=DIRECTION('',(1.E0,0.E0,0.E0)); #595=VECTOR('',#594,3.865E0); #596=CARTESIAN_POINT('',(2.05675E1,0.E0,1.125E1)); #597=LINE('',#596,#595); #598=DIRECTION('',(0.E0,0.E0,1.E0)); #599=VECTOR('',#598,8.E-1); #600=CARTESIAN_POINT('',(1.96875E1,0.E0,9.57E0)); #601=LINE('',#600,#599); #602=DIRECTION('',(-1.E0,0.E0,0.E0)); #603=VECTOR('',#602,7.4E-1); #604=CARTESIAN_POINT('',(2.13075E1,0.E0,8.69E0)); #605=LINE('',#604,#603); #606=DIRECTION('',(-7.071067811865E-1,0.E0,-7.071067811865E-1)); #607=VECTOR('',#606,4.263248410977E0); #608=CARTESIAN_POINT('',(2.307459332230E1,0.E0,4.046865146430E0)); #609=LINE('',#608,#607); #610=CARTESIAN_POINT('',(2.239E1,0.E0,4.5E0)); #611=DIRECTION('',(0.E0,1.E0,0.E0)); #612=DIRECTION('',(-8.910741301059E-1,0.E0,4.538577912254E-1)); #613=AXIS2_PLACEMENT_3D('',#610,#611,#612); #615=CARTESIAN_POINT('',(1.65E1,0.E0,7.5E0)); #616=DIRECTION('',(0.E0,1.E0,0.E0)); #617=DIRECTION('',(8.910741301059E-1,0.E0,-4.538577912254E-1)); #618=AXIS2_PLACEMENT_3D('',#615,#616,#617); #620=CARTESIAN_POINT('',(1.944696065761E1,0.E0,1.645354088550E0)); #621=DIRECTION('',(0.E0,1.E0,0.E0)); #622=DIRECTION('',(7.071067811865E-1,0.E0,-7.071067811866E-1)); #623=AXIS2_PLACEMENT_3D('',#620,#621,#622); #625=DIRECTION('',(7.071067811865E-1,0.E0,7.071067811865E-1)); #626=VECTOR('',#625,4.263248410977E0); #627=CARTESIAN_POINT('',(9.254066777019E-1,0.E0,2.795313485357E1)); #628=LINE('',#627,#626); #629=CARTESIAN_POINT('',(1.61E0,0.E0,2.75E1)); #630=DIRECTION('',(0.E0,1.E0,0.E0)); #631=DIRECTION('',(8.910741301059E-1,0.E0,-4.538577912254E-1)); #632=AXIS2_PLACEMENT_3D('',#629,#630,#631); #634=CARTESIAN_POINT('',(7.5E0,0.E0,2.45E1)); #635=DIRECTION('',(0.E0,1.E0,0.E0)); #636=DIRECTION('',(-8.910741301059E-1,0.E0,4.538577912254E-1)); #637=AXIS2_PLACEMENT_3D('',#634,#635,#636); #639=CARTESIAN_POINT('',(4.553039342392E0,0.E0,3.035464591145E1)); #640=DIRECTION('',(0.E0,1.E0,0.E0)); #641=DIRECTION('',(-7.071067811865E-1,0.E0,7.071067811865E-1)); #642=AXIS2_PLACEMENT_3D('',#639,#640,#641); #644=CARTESIAN_POINT('',(2.239E1,0.E0,2.75E1)); #645=DIRECTION('',(0.E0,-1.E0,0.E0)); #646=DIRECTION('',(-8.910741301059E-1,0.E0,-4.538577912254E-1)); #647=AXIS2_PLACEMENT_3D('',#644,#645,#646); #649=DIRECTION('',(-7.071067811865E-1,0.E0,7.071067811865E-1)); #650=VECTOR('',#649,4.263248410977E0); #651=CARTESIAN_POINT('',(2.307459332230E1,0.E0,2.795313485357E1)); #652=LINE('',#651,#650); #653=CARTESIAN_POINT('',(1.944696065761E1,0.E0,3.035464591145E1)); #654=DIRECTION('',(0.E0,-1.E0,0.E0)); #655=DIRECTION('',(7.071067811865E-1,0.E0,7.071067811866E-1)); #656=AXIS2_PLACEMENT_3D('',#653,#654,#655); #658=CARTESIAN_POINT('',(1.65E1,0.E0,2.45E1)); #659=DIRECTION('',(0.E0,-1.E0,0.E0)); #660=DIRECTION('',(8.910741301059E-1,0.E0,4.538577912254E-1)); #661=AXIS2_PLACEMENT_3D('',#658,#659,#660); #663=CARTESIAN_POINT('',(1.975E1,1.09375E1,8.E0)); #664=DIRECTION('',(0.E0,0.E0,-1.E0)); #665=DIRECTION('',(-1.E0,0.E0,0.E0)); #666=AXIS2_PLACEMENT_3D('',#663,#664,#665); #668=CARTESIAN_POINT('',(1.975E1,1.09375E1,8.E0)); #669=DIRECTION('',(0.E0,0.E0,-1.E0)); #670=DIRECTION('',(1.E0,0.E0,0.E0)); #671=AXIS2_PLACEMENT_3D('',#668,#669,#670); #673=CARTESIAN_POINT('',(1.975E1,1.05E1,8.E0)); #674=DIRECTION('',(0.E0,0.E0,-1.E0)); #675=DIRECTION('',(-1.E0,0.E0,0.E0)); #676=AXIS2_PLACEMENT_3D('',#673,#674,#675); #678=CARTESIAN_POINT('',(1.975E1,1.05E1,8.E0)); #679=DIRECTION('',(0.E0,0.E0,-1.E0)); #680=DIRECTION('',(1.E0,0.E0,0.E0)); #681=AXIS2_PLACEMENT_3D('',#678,#679,#680); #683=CARTESIAN_POINT('',(2.01875E1,1.05E1,8.E0)); #684=DIRECTION('',(0.E0,0.E0,-1.E0)); #685=DIRECTION('',(-1.E0,0.E0,0.E0)); #686=AXIS2_PLACEMENT_3D('',#683,#684,#685); #688=CARTESIAN_POINT('',(2.01875E1,1.05E1,8.E0)); #689=DIRECTION('',(0.E0,0.E0,-1.E0)); #690=DIRECTION('',(1.E0,0.E0,0.E0)); #691=AXIS2_PLACEMENT_3D('',#688,#689,#690); #693=CARTESIAN_POINT('',(1.975E1,1.00625E1,8.E0)); #694=DIRECTION('',(0.E0,0.E0,-1.E0)); #695=DIRECTION('',(-1.E0,0.E0,0.E0)); #696=AXIS2_PLACEMENT_3D('',#693,#694,#695); #698=CARTESIAN_POINT('',(1.975E1,1.00625E1,8.E0)); #699=DIRECTION('',(0.E0,0.E0,-1.E0)); #700=DIRECTION('',(1.E0,0.E0,0.E0)); #701=AXIS2_PLACEMENT_3D('',#698,#699,#700); #703=CARTESIAN_POINT('',(4.25E0,1.00625E1,8.E0)); #704=DIRECTION('',(0.E0,0.E0,1.E0)); #705=DIRECTION('',(1.E0,0.E0,0.E0)); #706=AXIS2_PLACEMENT_3D('',#703,#704,#705); #708=CARTESIAN_POINT('',(4.25E0,1.00625E1,8.E0)); #709=DIRECTION('',(0.E0,0.E0,1.E0)); #710=DIRECTION('',(-1.E0,0.E0,0.E0)); #711=AXIS2_PLACEMENT_3D('',#708,#709,#710); #713=CARTESIAN_POINT('',(3.8125E0,1.05E1,8.E0)); #714=DIRECTION('',(0.E0,0.E0,1.E0)); #715=DIRECTION('',(1.E0,0.E0,0.E0)); #716=AXIS2_PLACEMENT_3D('',#713,#714,#715); #718=CARTESIAN_POINT('',(3.8125E0,1.05E1,8.E0)); #719=DIRECTION('',(0.E0,0.E0,1.E0)); #720=DIRECTION('',(-1.E0,0.E0,0.E0)); #721=AXIS2_PLACEMENT_3D('',#718,#719,#720); #723=CARTESIAN_POINT('',(4.25E0,1.05E1,8.E0)); #724=DIRECTION('',(0.E0,0.E0,1.E0)); #725=DIRECTION('',(1.E0,0.E0,0.E0)); #726=AXIS2_PLACEMENT_3D('',#723,#724,#725); #728=CARTESIAN_POINT('',(4.25E0,1.05E1,8.E0)); #729=DIRECTION('',(0.E0,0.E0,1.E0)); #730=DIRECTION('',(-1.E0,0.E0,0.E0)); #731=AXIS2_PLACEMENT_3D('',#728,#729,#730); #733=CARTESIAN_POINT('',(4.25E0,1.09375E1,8.E0)); #734=DIRECTION('',(0.E0,0.E0,1.E0)); #735=DIRECTION('',(1.E0,0.E0,0.E0)); #736=AXIS2_PLACEMENT_3D('',#733,#734,#735); #738=CARTESIAN_POINT('',(4.25E0,1.09375E1,8.E0)); #739=DIRECTION('',(0.E0,0.E0,1.E0)); #740=DIRECTION('',(-1.E0,0.E0,0.E0)); #741=AXIS2_PLACEMENT_3D('',#738,#739,#740); #743=DIRECTION('',(4.856429311786E-1,-8.741572761215E-1,0.E0)); #744=VECTOR('',#743,1.029563014099E1); #745=CARTESIAN_POINT('',(2.1E1,1.15E1,8.E0)); #746=LINE('',#745,#744); #747=DIRECTION('',(-1.E0,0.E0,0.E0)); #748=VECTOR('',#747,2.E0); #749=CARTESIAN_POINT('',(2.1E1,1.15E1,8.E0)); #750=LINE('',#749,#748); #751=DIRECTION('',(-1.E0,0.E0,0.E0)); #752=VECTOR('',#751,2.E0); #753=CARTESIAN_POINT('',(5.E0,1.15E1,8.E0)); #754=LINE('',#753,#752); #755=DIRECTION('',(-4.856429311786E-1,-8.741572761215E-1,0.E0)); #756=VECTOR('',#755,1.029563014099E1); #757=CARTESIAN_POINT('',(3.E0,1.15E1,8.E0)); #758=LINE('',#757,#756); #759=DIRECTION('',(-1.E0,0.E0,0.E0)); #760=VECTOR('',#759,3.895172754280E0); #761=CARTESIAN_POINT('',(3.75E0,2.E0,8.E0)); #762=LINE('',#761,#760); #763=DIRECTION('',(4.856429311786E-1,8.741572761215E-1,0.E0)); #764=VECTOR('',#763,6.863753427325E0); #765=CARTESIAN_POINT('',(-8.007907113711E-1,3.114232198384E0,8.E0)); #766=LINE('',#765,#764); #767=DIRECTION('',(1.E0,0.E0,0.E0)); #768=VECTOR('',#767,5.618394209466E-1); #769=CARTESIAN_POINT('',(3.188160579053E0,9.5E0,8.E0)); #770=LINE('',#769,#768); #771=DIRECTION('',(0.E0,-1.E0,0.E0)); #772=VECTOR('',#771,6.E0); #773=CARTESIAN_POINT('',(4.5E0,8.75E0,8.E0)); #774=LINE('',#773,#772); #775=DIRECTION('',(-4.856429311786E-1,8.741572761215E-1,0.E0)); #776=VECTOR('',#775,6.863753427325E0); #777=CARTESIAN_POINT('',(2.480079071137E1,3.114232198384E0,8.E0)); #778=LINE('',#777,#776); #779=DIRECTION('',(1.E0,0.E0,0.E0)); #780=VECTOR('',#779,3.895172754280E0); #781=CARTESIAN_POINT('',(2.025E1,2.E0,8.E0)); #782=LINE('',#781,#780); #783=DIRECTION('',(0.E0,-1.E0,0.E0)); #784=VECTOR('',#783,6.E0); #785=CARTESIAN_POINT('',(1.95E1,8.75E0,8.E0)); #786=LINE('',#785,#784); #787=DIRECTION('',(-1.E0,0.E0,0.E0)); #788=VECTOR('',#787,5.618394209466E-1); #789=CARTESIAN_POINT('',(2.081183942095E1,9.5E0,8.E0)); #790=LINE('',#789,#788); #791=DIRECTION('',(0.E0,0.E0,1.E0)); #792=VECTOR('',#791,2.5E-1); #793=CARTESIAN_POINT('',(1.9655E1,1.09375E1,8.E0)); #794=LINE('',#793,#792); #795=DIRECTION('',(0.E0,0.E0,1.E0)); #796=VECTOR('',#795,2.5E-1); #797=CARTESIAN_POINT('',(1.9845E1,1.09375E1,8.E0)); #798=LINE('',#797,#796); #799=CARTESIAN_POINT('',(1.975E1,1.09375E1,8.25E0)); #800=DIRECTION('',(0.E0,0.E0,-1.E0)); #801=DIRECTION('',(-1.E0,0.E0,0.E0)); #802=AXIS2_PLACEMENT_3D('',#799,#800,#801); #804=CARTESIAN_POINT('',(1.975E1,1.09375E1,8.25E0)); #805=DIRECTION('',(0.E0,0.E0,-1.E0)); #806=DIRECTION('',(1.E0,0.E0,0.E0)); #807=AXIS2_PLACEMENT_3D('',#804,#805,#806); #809=DIRECTION('',(0.E0,0.E0,1.E0)); #810=VECTOR('',#809,2.E0); #811=CARTESIAN_POINT('',(1.95875E1,1.05E1,8.E0)); #812=LINE('',#811,#810); #813=DIRECTION('',(0.E0,0.E0,1.E0)); #814=VECTOR('',#813,2.E0); #815=CARTESIAN_POINT('',(1.99125E1,1.05E1,8.E0)); #816=LINE('',#815,#814); #817=CARTESIAN_POINT('',(1.975E1,1.05E1,1.E1)); #818=DIRECTION('',(0.E0,0.E0,-1.E0)); #819=DIRECTION('',(-1.E0,0.E0,0.E0)); #820=AXIS2_PLACEMENT_3D('',#817,#818,#819); #822=CARTESIAN_POINT('',(1.975E1,1.05E1,1.E1)); #823=DIRECTION('',(0.E0,0.E0,-1.E0)); #824=DIRECTION('',(1.E0,0.E0,0.E0)); #825=AXIS2_PLACEMENT_3D('',#822,#823,#824); #827=DIRECTION('',(0.E0,1.E0,0.E0)); #828=VECTOR('',#827,5.E0); #829=CARTESIAN_POINT('',(2.375E1,1.5E0,1.E1)); #830=LINE('',#829,#828); #831=DIRECTION('',(-1.E0,0.E0,0.E0)); #832=VECTOR('',#831,1.75E0); #833=CARTESIAN_POINT('',(2.375E1,6.5E0,1.E1)); #834=LINE('',#833,#832); #835=DIRECTION('',(0.E0,1.E0,0.E0)); #836=VECTOR('',#835,5.E0); #837=CARTESIAN_POINT('',(2.2E1,1.5E0,1.E1)); #838=LINE('',#837,#836); #839=DIRECTION('',(0.E0,1.E0,0.E0)); #840=VECTOR('',#839,1.E1); #841=CARTESIAN_POINT('',(1.9E1,1.5E0,1.E1)); #842=LINE('',#841,#840); #843=DIRECTION('',(1.E0,0.E0,0.E0)); #844=VECTOR('',#843,2.E0); #845=CARTESIAN_POINT('',(1.9E1,1.15E1,1.E1)); #846=LINE('',#845,#844); #847=DIRECTION('',(4.856429311786E-1,-8.741572761215E-1,0.E0)); #848=VECTOR('',#847,1.029563014099E1); #849=CARTESIAN_POINT('',(2.1E1,1.15E1,1.E1)); #850=LINE('',#849,#848); #851=DIRECTION('',(0.E0,-1.E0,0.E0)); #852=VECTOR('',#851,1.E0); #853=CARTESIAN_POINT('',(2.6E1,2.5E0,1.E1)); #854=LINE('',#853,#852); #855=DIRECTION('',(-1.E0,0.E0,0.E0)); #856=VECTOR('',#855,1.972007605460E-1); #857=CARTESIAN_POINT('',(2.204720076055E1,7.E0,1.E1)); #858=LINE('',#857,#856); #859=DIRECTION('',(4.856429311786E-1,-8.741572761215E-1,0.E0)); #860=VECTOR('',#859,2.059126028197E0); #861=CARTESIAN_POINT('',(2.135315580719E1,9.319975025913E0,1.E1)); #862=LINE('',#861,#860); #863=DIRECTION('',(1.E0,0.E0,0.E0)); #864=VECTOR('',#863,1.197200760546E0); #865=CARTESIAN_POINT('',(1.985E1,9.5E0,1.E1)); #866=LINE('',#865,#864); #867=DIRECTION('',(0.E0,1.E0,0.E0)); #868=VECTOR('',#867,6.8E0); #869=CARTESIAN_POINT('',(1.95E1,2.35E0,1.E1)); #870=LINE('',#869,#868); #871=DIRECTION('',(-1.E0,0.E0,0.E0)); #872=VECTOR('',#871,1.3E0); #873=CARTESIAN_POINT('',(2.115E1,2.E0,1.E1)); #874=LINE('',#873,#872); #875=DIRECTION('',(0.E0,-1.E0,0.E0)); #876=VECTOR('',#875,4.3E0); #877=CARTESIAN_POINT('',(2.15E1,6.65E0,1.E1)); #878=LINE('',#877,#876); #879=DIRECTION('',(0.E0,-8.660254037844E-1,5.E-1)); #880=VECTOR('',#879,5.773502691896E0); #881=CARTESIAN_POINT('',(2.375E1,6.5E0,1.E1)); #882=LINE('',#881,#880); #883=CARTESIAN_POINT('',(6.45E0,1.5E0,2.975E1)); #884=DIRECTION('',(0.E0,-1.E0,0.E0)); #885=DIRECTION('',(-1.E0,0.E0,0.E0)); #886=AXIS2_PLACEMENT_3D('',#883,#884,#885); #888=CARTESIAN_POINT('',(6.45E0,1.5E0,2.975E1)); #889=DIRECTION('',(0.E0,-1.E0,0.E0)); #890=DIRECTION('',(1.E0,0.E0,0.E0)); #891=AXIS2_PLACEMENT_3D('',#888,#889,#890); #893=CARTESIAN_POINT('',(7.45E0,1.5E0,2.975E1)); #894=DIRECTION('',(0.E0,-1.E0,0.E0)); #895=DIRECTION('',(-1.E0,0.E0,0.E0)); #896=AXIS2_PLACEMENT_3D('',#893,#894,#895); #898=CARTESIAN_POINT('',(7.45E0,1.5E0,2.975E1)); #899=DIRECTION('',(0.E0,-1.E0,0.E0)); #900=DIRECTION('',(1.E0,0.E0,0.E0)); #901=AXIS2_PLACEMENT_3D('',#898,#899,#900); #903=DIRECTION('',(-1.E0,0.E0,0.E0)); #904=VECTOR('',#903,4.531373033403E0); #905=CARTESIAN_POINT('',(2.5E1,1.5E0,8.E0)); #906=LINE('',#905,#904); #907=DIRECTION('',(-1.E0,0.E0,0.E0)); #908=VECTOR('',#907,9.E0); #909=CARTESIAN_POINT('',(1.65E1,1.5E0,2.5E0)); #910=LINE('',#909,#908); #911=DIRECTION('',(-1.E0,0.E0,0.E0)); #912=VECTOR('',#911,4.531373033403E0); #913=CARTESIAN_POINT('',(3.531373033403E0,1.5E0,8.E0)); #914=LINE('',#913,#912); #915=DIRECTION('',(0.E0,0.E0,1.E0)); #916=VECTOR('',#915,3.E0); #917=CARTESIAN_POINT('',(0.E0,1.5E0,4.E0)); #918=LINE('',#917,#916); #919=DIRECTION('',(-1.E0,0.E0,0.E0)); #920=VECTOR('',#919,1.6E1); #921=CARTESIAN_POINT('',(2.E1,1.5E0,0.E0)); #922=LINE('',#921,#920); #923=DIRECTION('',(0.E0,0.E0,-1.E0)); #924=VECTOR('',#923,3.E0); #925=CARTESIAN_POINT('',(2.4E1,1.5E0,7.E0)); #926=LINE('',#925,#924); #927=CARTESIAN_POINT('',(1.755E1,1.5E0,2.975E1)); #928=DIRECTION('',(0.E0,1.E0,0.E0)); #929=DIRECTION('',(1.E0,0.E0,0.E0)); #930=AXIS2_PLACEMENT_3D('',#927,#928,#929); #932=CARTESIAN_POINT('',(1.755E1,1.5E0,2.975E1)); #933=DIRECTION('',(0.E0,1.E0,0.E0)); #934=DIRECTION('',(-1.E0,0.E0,0.E0)); #935=AXIS2_PLACEMENT_3D('',#932,#933,#934); #937=CARTESIAN_POINT('',(1.655E1,1.5E0,2.975E1)); #938=DIRECTION('',(0.E0,1.E0,0.E0)); #939=DIRECTION('',(1.E0,0.E0,0.E0)); #940=AXIS2_PLACEMENT_3D('',#937,#938,#939); #942=CARTESIAN_POINT('',(1.655E1,1.5E0,2.975E1)); #943=DIRECTION('',(0.E0,1.E0,0.E0)); #944=DIRECTION('',(-1.E0,0.E0,0.E0)); #945=AXIS2_PLACEMENT_3D('',#942,#943,#944); #947=CARTESIAN_POINT('',(1.125E0,1.5E0,6.E0)); #948=DIRECTION('',(0.E0,-1.E0,0.E0)); #949=DIRECTION('',(1.E0,0.E0,0.E0)); #950=AXIS2_PLACEMENT_3D('',#947,#948,#949); #952=CARTESIAN_POINT('',(1.125E0,1.5E0,6.E0)); #953=DIRECTION('',(0.E0,-1.E0,0.E0)); #954=DIRECTION('',(-1.E0,0.E0,0.E0)); #955=AXIS2_PLACEMENT_3D('',#952,#953,#954); #957=CARTESIAN_POINT('',(1.125E0,1.5E0,1.8E1)); #958=DIRECTION('',(0.E0,-1.E0,0.E0)); #959=DIRECTION('',(1.E0,0.E0,0.E0)); #960=AXIS2_PLACEMENT_3D('',#957,#958,#959); #962=CARTESIAN_POINT('',(1.125E0,1.5E0,1.8E1)); #963=DIRECTION('',(0.E0,-1.E0,0.E0)); #964=DIRECTION('',(-1.E0,0.E0,0.E0)); #965=AXIS2_PLACEMENT_3D('',#962,#963,#964); #967=CARTESIAN_POINT('',(1.125E0,1.5E0,2.4E1)); #968=DIRECTION('',(0.E0,-1.E0,0.E0)); #969=DIRECTION('',(1.E0,0.E0,0.E0)); #970=AXIS2_PLACEMENT_3D('',#967,#968,#969); #972=CARTESIAN_POINT('',(1.125E0,1.5E0,2.4E1)); #973=DIRECTION('',(0.E0,-1.E0,0.E0)); #974=DIRECTION('',(-1.E0,0.E0,0.E0)); #975=AXIS2_PLACEMENT_3D('',#972,#973,#974); #977=CARTESIAN_POINT('',(2.2875E1,1.5E0,6.E0)); #978=DIRECTION('',(0.E0,-1.E0,0.E0)); #979=DIRECTION('',(1.E0,0.E0,0.E0)); #980=AXIS2_PLACEMENT_3D('',#977,#978,#979); #982=CARTESIAN_POINT('',(2.2875E1,1.5E0,6.E0)); #983=DIRECTION('',(0.E0,-1.E0,0.E0)); #984=DIRECTION('',(-1.E0,0.E0,0.E0)); #985=AXIS2_PLACEMENT_3D('',#982,#983,#984); #987=CARTESIAN_POINT('',(2.2875E1,1.5E0,1.8E1)); #988=DIRECTION('',(0.E0,-1.E0,0.E0)); #989=DIRECTION('',(1.E0,0.E0,0.E0)); #990=AXIS2_PLACEMENT_3D('',#987,#988,#989); #992=CARTESIAN_POINT('',(2.2875E1,1.5E0,1.8E1)); #993=DIRECTION('',(0.E0,-1.E0,0.E0)); #994=DIRECTION('',(-1.E0,0.E0,0.E0)); #995=AXIS2_PLACEMENT_3D('',#992,#993,#994); #997=CARTESIAN_POINT('',(2.2875E1,1.5E0,2.4E1)); #998=DIRECTION('',(0.E0,-1.E0,0.E0)); #999=DIRECTION('',(1.E0,0.E0,0.E0)); #1000=AXIS2_PLACEMENT_3D('',#997,#998,#999); #1002=CARTESIAN_POINT('',(2.2875E1,1.5E0,2.4E1)); #1003=DIRECTION('',(0.E0,-1.E0,0.E0)); #1004=DIRECTION('',(-1.E0,0.E0,0.E0)); #1005=AXIS2_PLACEMENT_3D('',#1002,#1003,#1004); #1007=CARTESIAN_POINT('',(6.E0,1.5E0,1.25E0)); #1008=DIRECTION('',(0.E0,-1.E0,0.E0)); #1009=DIRECTION('',(1.E0,0.E0,0.E0)); #1010=AXIS2_PLACEMENT_3D('',#1007,#1008,#1009); #1012=CARTESIAN_POINT('',(6.E0,1.5E0,1.25E0)); #1013=DIRECTION('',(0.E0,-1.E0,0.E0)); #1014=DIRECTION('',(-1.E0,0.E0,0.E0)); #1015=AXIS2_PLACEMENT_3D('',#1012,#1013,#1014); #1017=CARTESIAN_POINT('',(1.2E1,1.5E0,1.25E0)); #1018=DIRECTION('',(0.E0,-1.E0,0.E0)); #1019=DIRECTION('',(1.E0,0.E0,0.E0)); #1020=AXIS2_PLACEMENT_3D('',#1017,#1018,#1019); #1022=CARTESIAN_POINT('',(1.2E1,1.5E0,1.25E0)); #1023=DIRECTION('',(0.E0,-1.E0,0.E0)); #1024=DIRECTION('',(-1.E0,0.E0,0.E0)); #1025=AXIS2_PLACEMENT_3D('',#1022,#1023,#1024); #1027=CARTESIAN_POINT('',(1.8E1,1.5E0,1.25E0)); #1028=DIRECTION('',(0.E0,-1.E0,0.E0)); #1029=DIRECTION('',(1.E0,0.E0,0.E0)); #1030=AXIS2_PLACEMENT_3D('',#1027,#1028,#1029); #1032=CARTESIAN_POINT('',(1.8E1,1.5E0,1.25E0)); #1033=DIRECTION('',(0.E0,-1.E0,0.E0)); #1034=DIRECTION('',(-1.E0,0.E0,0.E0)); #1035=AXIS2_PLACEMENT_3D('',#1032,#1033,#1034); #1037=CARTESIAN_POINT('',(6.E0,1.5E0,3.075E1)); #1038=DIRECTION('',(0.E0,-1.E0,0.E0)); #1039=DIRECTION('',(1.E0,0.E0,0.E0)); #1040=AXIS2_PLACEMENT_3D('',#1037,#1038,#1039); #1042=CARTESIAN_POINT('',(6.E0,1.5E0,3.075E1)); #1043=DIRECTION('',(0.E0,-1.E0,0.E0)); #1044=DIRECTION('',(-1.E0,0.E0,0.E0)); #1045=AXIS2_PLACEMENT_3D('',#1042,#1043,#1044); #1047=CARTESIAN_POINT('',(1.2E1,1.5E0,3.075E1)); #1048=DIRECTION('',(0.E0,-1.E0,0.E0)); #1049=DIRECTION('',(1.E0,0.E0,0.E0)); #1050=AXIS2_PLACEMENT_3D('',#1047,#1048,#1049); #1052=CARTESIAN_POINT('',(1.2E1,1.5E0,3.075E1)); #1053=DIRECTION('',(0.E0,-1.E0,0.E0)); #1054=DIRECTION('',(-1.E0,0.E0,0.E0)); #1055=AXIS2_PLACEMENT_3D('',#1052,#1053,#1054); #1057=CARTESIAN_POINT('',(1.8E1,1.5E0,3.075E1)); #1058=DIRECTION('',(0.E0,-1.E0,0.E0)); #1059=DIRECTION('',(1.E0,0.E0,0.E0)); #1060=AXIS2_PLACEMENT_3D('',#1057,#1058,#1059); #1062=CARTESIAN_POINT('',(1.8E1,1.5E0,3.075E1)); #1063=DIRECTION('',(0.E0,-1.E0,0.E0)); #1064=DIRECTION('',(-1.E0,0.E0,0.E0)); #1065=AXIS2_PLACEMENT_3D('',#1062,#1063,#1064); #1067=DIRECTION('',(0.E0,0.E0,-1.E0)); #1068=VECTOR('',#1067,2.5625E0); #1069=CARTESIAN_POINT('',(2.15E1,1.5E0,2.45E1)); #1070=LINE('',#1069,#1068); #1071=DIRECTION('',(1.E0,0.E0,0.E0)); #1072=VECTOR('',#1071,1.3E1); #1073=CARTESIAN_POINT('',(5.5E0,1.5E0,1.89375E1)); #1074=LINE('',#1073,#1072); #1075=DIRECTION('',(0.E0,0.E0,1.E0)); #1076=VECTOR('',#1075,2.5625E0); #1077=CARTESIAN_POINT('',(2.5E0,1.5E0,2.19375E1)); #1078=LINE('',#1077,#1076); #1079=DIRECTION('',(1.E0,0.E0,0.E0)); #1080=VECTOR('',#1079,9.E0); #1081=CARTESIAN_POINT('',(7.5E0,1.5E0,2.95E1)); #1082=LINE('',#1081,#1080); #1083=DIRECTION('',(-1.E0,0.E0,0.E0)); #1084=VECTOR('',#1083,1.3E1); #1085=CARTESIAN_POINT('',(1.85E1,1.5E0,1.70625E1)); #1086=LINE('',#1085,#1084); #1087=DIRECTION('',(0.E0,0.E0,-1.E0)); #1088=VECTOR('',#1087,8.125E-1); #1089=CARTESIAN_POINT('',(2.15E1,1.5E0,1.40625E1)); #1090=LINE('',#1089,#1088); #1091=DIRECTION('',(-1.E0,0.E0,0.E0)); #1092=VECTOR('',#1091,1.E0); #1093=CARTESIAN_POINT('',(2.05E1,1.5E0,1.225E1)); #1094=LINE('',#1093,#1092); #1095=DIRECTION('',(0.E0,0.E0,-1.E0)); #1096=VECTOR('',#1095,7.5E-1); #1097=CARTESIAN_POINT('',(1.9E1,1.5E0,1.175E1)); #1098=LINE('',#1097,#1096); #1099=DIRECTION('',(0.E0,0.E0,-1.E0)); #1100=VECTOR('',#1099,7.5E-1); #1101=CARTESIAN_POINT('',(5.E0,1.5E0,1.175E1)); #1102=LINE('',#1101,#1100); #1103=DIRECTION('',(1.E0,0.E0,0.E0)); #1104=VECTOR('',#1103,1.E0); #1105=CARTESIAN_POINT('',(3.5E0,1.5E0,1.225E1)); #1106=LINE('',#1105,#1104); #1107=DIRECTION('',(0.E0,0.E0,1.E0)); #1108=VECTOR('',#1107,8.125E-1); #1109=CARTESIAN_POINT('',(2.5E0,1.5E0,1.325E1)); #1110=LINE('',#1109,#1108); #1111=CARTESIAN_POINT('',(6.E0,1.5E0,9.E0)); #1112=DIRECTION('',(0.E0,-1.E0,0.E0)); #1113=DIRECTION('',(1.E0,0.E0,0.E0)); #1114=AXIS2_PLACEMENT_3D('',#1111,#1112,#1113); #1116=CARTESIAN_POINT('',(6.E0,1.5E0,9.E0)); #1117=DIRECTION('',(0.E0,-1.E0,0.E0)); #1118=DIRECTION('',(-1.E0,0.E0,0.E0)); #1119=AXIS2_PLACEMENT_3D('',#1116,#1117,#1118); #1121=CARTESIAN_POINT('',(1.2E1,1.5E0,9.E0)); #1122=DIRECTION('',(0.E0,-1.E0,0.E0)); #1123=DIRECTION('',(1.E0,0.E0,0.E0)); #1124=AXIS2_PLACEMENT_3D('',#1121,#1122,#1123); #1126=CARTESIAN_POINT('',(1.2E1,1.5E0,9.E0)); #1127=DIRECTION('',(0.E0,-1.E0,0.E0)); #1128=DIRECTION('',(-1.E0,0.E0,0.E0)); #1129=AXIS2_PLACEMENT_3D('',#1126,#1127,#1128); #1131=CARTESIAN_POINT('',(1.8E1,1.5E0,9.E0)); #1132=DIRECTION('',(0.E0,-1.E0,0.E0)); #1133=DIRECTION('',(1.E0,0.E0,0.E0)); #1134=AXIS2_PLACEMENT_3D('',#1131,#1132,#1133); #1136=CARTESIAN_POINT('',(1.8E1,1.5E0,9.E0)); #1137=DIRECTION('',(0.E0,-1.E0,0.E0)); #1138=DIRECTION('',(-1.E0,0.E0,0.E0)); #1139=AXIS2_PLACEMENT_3D('',#1136,#1137,#1138); #1141=CARTESIAN_POINT('',(6.E0,1.5E0,1.8E1)); #1142=DIRECTION('',(0.E0,-1.E0,0.E0)); #1143=DIRECTION('',(1.E0,0.E0,0.E0)); #1144=AXIS2_PLACEMENT_3D('',#1141,#1142,#1143); #1146=CARTESIAN_POINT('',(6.E0,1.5E0,1.8E1)); #1147=DIRECTION('',(0.E0,-1.E0,0.E0)); #1148=DIRECTION('',(-1.E0,0.E0,0.E0)); #1149=AXIS2_PLACEMENT_3D('',#1146,#1147,#1148); #1151=CARTESIAN_POINT('',(1.2E1,1.5E0,1.8E1)); #1152=DIRECTION('',(0.E0,-1.E0,0.E0)); #1153=DIRECTION('',(1.E0,0.E0,0.E0)); #1154=AXIS2_PLACEMENT_3D('',#1151,#1152,#1153); #1156=CARTESIAN_POINT('',(1.2E1,1.5E0,1.8E1)); #1157=DIRECTION('',(0.E0,-1.E0,0.E0)); #1158=DIRECTION('',(-1.E0,0.E0,0.E0)); #1159=AXIS2_PLACEMENT_3D('',#1156,#1157,#1158); #1161=CARTESIAN_POINT('',(1.8E1,1.5E0,1.8E1)); #1162=DIRECTION('',(0.E0,-1.E0,0.E0)); #1163=DIRECTION('',(1.E0,0.E0,0.E0)); #1164=AXIS2_PLACEMENT_3D('',#1161,#1162,#1163); #1166=CARTESIAN_POINT('',(1.8E1,1.5E0,1.8E1)); #1167=DIRECTION('',(0.E0,-1.E0,0.E0)); #1168=DIRECTION('',(-1.E0,0.E0,0.E0)); #1169=AXIS2_PLACEMENT_3D('',#1166,#1167,#1168); #1171=DIRECTION('',(0.E0,0.E0,-1.E0)); #1172=VECTOR('',#1171,2.886751345948E0); #1173=CARTESIAN_POINT('',(2.375E1,1.5E0,1.288675134595E1)); #1174=LINE('',#1173,#1172); #1175=DIRECTION('',(1.E0,0.E0,0.E0)); #1176=VECTOR('',#1175,2.25E0); #1177=CARTESIAN_POINT('',(2.375E1,1.5E0,1.E1)); #1178=LINE('',#1177,#1176); #1179=DIRECTION('',(0.E0,0.E0,1.E0)); #1180=VECTOR('',#1179,1.75E0); #1181=CARTESIAN_POINT('',(2.6E1,1.5E0,1.E1)); #1182=LINE('',#1181,#1180); #1183=DIRECTION('',(-1.E0,0.E0,0.E0)); #1184=VECTOR('',#1183,5.E-1); #1185=CARTESIAN_POINT('',(2.55E1,1.5E0,1.225E1)); #1186=LINE('',#1185,#1184); #1187=DIRECTION('',(0.E0,0.E0,-1.E0)); #1188=VECTOR('',#1187,1.475E1); #1189=CARTESIAN_POINT('',(2.4E1,1.5E0,2.8E1)); #1190=LINE('',#1189,#1188); #1191=DIRECTION('',(1.E0,0.E0,0.E0)); #1192=VECTOR('',#1191,1.6E1); #1193=CARTESIAN_POINT('',(4.E0,1.5E0,3.2E1)); #1194=LINE('',#1193,#1192); #1195=DIRECTION('',(0.E0,0.E0,1.E0)); #1196=VECTOR('',#1195,1.475E1); #1197=CARTESIAN_POINT('',(0.E0,1.5E0,1.325E1)); #1198=LINE('',#1197,#1196); #1199=DIRECTION('',(1.E0,0.E0,0.E0)); #1200=VECTOR('',#1199,5.E-1); #1201=CARTESIAN_POINT('',(-1.5E0,1.5E0,1.225E1)); #1202=LINE('',#1201,#1200); #1203=DIRECTION('',(0.E0,0.E0,1.E0)); #1204=VECTOR('',#1203,1.75E0); #1205=CARTESIAN_POINT('',(-2.E0,1.5E0,1.E1)); #1206=LINE('',#1205,#1204); #1207=DIRECTION('',(1.E0,0.E0,0.E0)); #1208=VECTOR('',#1207,2.25E0); #1209=CARTESIAN_POINT('',(-2.E0,1.5E0,1.E1)); #1210=LINE('',#1209,#1208); #1211=DIRECTION('',(0.E0,0.E0,-1.E0)); #1212=VECTOR('',#1211,2.886751345948E0); #1213=CARTESIAN_POINT('',(2.5E-1,1.5E0,1.288675134595E1)); #1214=LINE('',#1213,#1212); #1215=DIRECTION('',(1.E0,0.E0,0.E0)); #1216=VECTOR('',#1215,1.75E0); #1217=CARTESIAN_POINT('',(2.5E-1,1.5E0,1.288675134595E1)); #1218=LINE('',#1217,#1216); #1219=DIRECTION('',(0.E0,0.E0,-1.E0)); #1220=VECTOR('',#1219,2.886751345948E0); #1221=CARTESIAN_POINT('',(2.E0,1.5E0,1.288675134595E1)); #1222=LINE('',#1221,#1220); #1223=DIRECTION('',(1.E0,0.E0,0.E0)); #1224=VECTOR('',#1223,3.E0); #1225=CARTESIAN_POINT('',(2.E0,1.5E0,1.E1)); #1226=LINE('',#1225,#1224); #1227=DIRECTION('',(1.E0,0.E0,0.E0)); #1228=VECTOR('',#1227,1.4E1); #1229=CARTESIAN_POINT('',(5.E0,1.5E0,8.E0)); #1230=LINE('',#1229,#1228); #1231=DIRECTION('',(1.E0,0.E0,0.E0)); #1232=VECTOR('',#1231,3.E0); #1233=CARTESIAN_POINT('',(1.9E1,1.5E0,1.E1)); #1234=LINE('',#1233,#1232); #1235=DIRECTION('',(0.E0,0.E0,-1.E0)); #1236=VECTOR('',#1235,2.886751345948E0); #1237=CARTESIAN_POINT('',(2.2E1,1.5E0,1.288675134595E1)); #1238=LINE('',#1237,#1236); #1239=DIRECTION('',(-1.E0,0.E0,0.E0)); #1240=VECTOR('',#1239,1.75E0); #1241=CARTESIAN_POINT('',(2.375E1,1.5E0,1.288675134595E1)); #1242=LINE('',#1241,#1240); #1243=DIRECTION('',(0.E0,1.E0,0.E0)); #1244=VECTOR('',#1243,2.5E-1); #1245=CARTESIAN_POINT('',(6.35E0,1.25E0,2.975E1)); #1246=LINE('',#1245,#1244); #1247=DIRECTION('',(0.E0,1.E0,0.E0)); #1248=VECTOR('',#1247,2.5E-1); #1249=CARTESIAN_POINT('',(6.55E0,1.25E0,2.975E1)); #1250=LINE('',#1249,#1248); #1251=DIRECTION('',(8.660254037844E-1,5.E-1,0.E0)); #1252=VECTOR('',#1251,1.154700538379E-1); #1253=CARTESIAN_POINT('',(6.45E0,1.192264973081E0,2.975E1)); #1254=LINE('',#1253,#1252); #1255=CARTESIAN_POINT('',(6.45E0,1.25E0,2.975E1)); #1256=DIRECTION('',(0.E0,1.E0,0.E0)); #1257=DIRECTION('',(-1.E0,0.E0,0.E0)); #1258=AXIS2_PLACEMENT_3D('',#1255,#1256,#1257); #1260=DIRECTION('',(-8.660254037844E-1,5.E-1,0.E0)); #1261=VECTOR('',#1260,1.154700538379E-1); #1262=CARTESIAN_POINT('',(6.45E0,1.192264973081E0,2.975E1)); #1263=LINE('',#1262,#1261); #1264=CARTESIAN_POINT('',(6.45E0,1.25E0,2.975E1)); #1265=DIRECTION('',(0.E0,-1.E0,0.E0)); #1266=DIRECTION('',(-1.E0,0.E0,0.E0)); #1267=AXIS2_PLACEMENT_3D('',#1264,#1265,#1266); #1269=DIRECTION('',(0.E0,1.E0,0.E0)); #1270=VECTOR('',#1269,2.5E-1); #1271=CARTESIAN_POINT('',(7.35E0,1.25E0,2.975E1)); #1272=LINE('',#1271,#1270); #1273=DIRECTION('',(0.E0,1.E0,0.E0)); #1274=VECTOR('',#1273,2.5E-1); #1275=CARTESIAN_POINT('',(7.55E0,1.25E0,2.975E1)); #1276=LINE('',#1275,#1274); #1277=DIRECTION('',(8.660254037844E-1,5.E-1,0.E0)); #1278=VECTOR('',#1277,1.154700538379E-1); #1279=CARTESIAN_POINT('',(7.45E0,1.192264973081E0,2.975E1)); #1280=LINE('',#1279,#1278); #1281=CARTESIAN_POINT('',(7.45E0,1.25E0,2.975E1)); #1282=DIRECTION('',(0.E0,1.E0,0.E0)); #1283=DIRECTION('',(-1.E0,0.E0,0.E0)); #1284=AXIS2_PLACEMENT_3D('',#1281,#1282,#1283); #1286=DIRECTION('',(-8.660254037844E-1,5.E-1,0.E0)); #1287=VECTOR('',#1286,1.154700538379E-1); #1288=CARTESIAN_POINT('',(7.45E0,1.192264973081E0,2.975E1)); #1289=LINE('',#1288,#1287); #1290=CARTESIAN_POINT('',(7.45E0,1.25E0,2.975E1)); #1291=DIRECTION('',(0.E0,-1.E0,0.E0)); #1292=DIRECTION('',(-1.E0,0.E0,0.E0)); #1293=AXIS2_PLACEMENT_3D('',#1290,#1291,#1292); #1295=DIRECTION('',(0.E0,1.E0,0.E0)); #1296=VECTOR('',#1295,1.5E0); #1297=CARTESIAN_POINT('',(2.046862696660E1,0.E0,8.E0)); #1298=LINE('',#1297,#1296); #1299=CARTESIAN_POINT('',(2.046862696660E1,0.E0,7.E0)); #1300=DIRECTION('',(0.E0,1.E0,0.E0)); #1301=DIRECTION('',(0.E0,0.E0,1.E0)); #1302=AXIS2_PLACEMENT_3D('',#1299,#1300,#1301); #1304=DIRECTION('',(0.E0,1.E0,0.E0)); #1305=VECTOR('',#1304,1.5E0); #1306=CARTESIAN_POINT('',(2.146078370825E1,0.E0,6.875E0)); #1307=LINE('',#1306,#1305); #1308=CARTESIAN_POINT('',(2.046862696660E1,1.5E0,7.E0)); #1309=DIRECTION('',(0.E0,-1.E0,0.E0)); #1310=DIRECTION('',(9.921567416492E-1,0.E0,-1.25E-1)); #1311=AXIS2_PLACEMENT_3D('',#1308,#1309,#1310); #1313=CARTESIAN_POINT('',(1.65E1,0.E0,7.5E0)); #1314=DIRECTION('',(0.E0,1.E0,0.E0)); #1315=DIRECTION('',(9.921567416492E-1,0.E0,-1.25E-1)); #1316=AXIS2_PLACEMENT_3D('',#1313,#1314,#1315); #1318=DIRECTION('',(0.E0,-1.E0,0.E0)); #1319=VECTOR('',#1318,1.5E0); #1320=CARTESIAN_POINT('',(1.65E1,1.5E0,2.5E0)); #1321=LINE('',#1320,#1319); #1322=CARTESIAN_POINT('',(1.65E1,1.5E0,7.5E0)); #1323=DIRECTION('',(0.E0,-1.E0,0.E0)); #1324=DIRECTION('',(0.E0,0.E0,-1.E0)); #1325=AXIS2_PLACEMENT_3D('',#1322,#1323,#1324); #1327=CARTESIAN_POINT('',(7.5E0,1.5E0,7.5E0)); #1328=DIRECTION('',(0.E0,-1.E0,0.E0)); #1329=DIRECTION('',(-9.921567416492E-1,0.E0,-1.25E-1)); #1330=AXIS2_PLACEMENT_3D('',#1327,#1328,#1329); #1332=DIRECTION('',(0.E0,-1.E0,0.E0)); #1333=VECTOR('',#1332,1.5E0); #1334=CARTESIAN_POINT('',(7.5E0,1.5E0,2.5E0)); #1335=LINE('',#1334,#1333); #1336=CARTESIAN_POINT('',(7.5E0,0.E0,7.5E0)); #1337=DIRECTION('',(0.E0,1.E0,0.E0)); #1338=DIRECTION('',(0.E0,0.E0,-1.E0)); #1339=AXIS2_PLACEMENT_3D('',#1336,#1337,#1338); #1341=DIRECTION('',(0.E0,-1.E0,0.E0)); #1342=VECTOR('',#1341,1.5E0); #1343=CARTESIAN_POINT('',(3.531373033403E0,1.5E0,8.E0)); #1344=LINE('',#1343,#1342); #1345=CARTESIAN_POINT('',(3.531373033403E0,1.5E0,7.E0)); #1346=DIRECTION('',(0.E0,-1.E0,0.E0)); #1347=DIRECTION('',(0.E0,0.E0,1.E0)); #1348=AXIS2_PLACEMENT_3D('',#1345,#1346,#1347); #1350=DIRECTION('',(0.E0,-1.E0,0.E0)); #1351=VECTOR('',#1350,1.5E0); #1352=CARTESIAN_POINT('',(2.539216291754E0,1.5E0,6.875E0)); #1353=LINE('',#1352,#1351); #1354=CARTESIAN_POINT('',(3.531373033403E0,0.E0,7.E0)); #1355=DIRECTION('',(0.E0,1.E0,0.E0)); #1356=DIRECTION('',(-9.921567416492E-1,0.E0,-1.25E-1)); #1357=AXIS2_PLACEMENT_3D('',#1354,#1355,#1356); #1359=DIRECTION('',(0.E0,-1.E0,0.E0)); #1360=VECTOR('',#1359,1.5E0); #1361=CARTESIAN_POINT('',(0.E0,1.5E0,7.E0)); #1362=LINE('',#1361,#1360); #1363=CARTESIAN_POINT('',(-1.E0,1.5E0,7.E0)); #1364=DIRECTION('',(0.E0,-1.E0,0.E0)); #1365=DIRECTION('',(1.E0,0.E0,0.E0)); #1366=AXIS2_PLACEMENT_3D('',#1363,#1364,#1365); #1368=DIRECTION('',(0.E0,-1.E0,0.E0)); #1369=VECTOR('',#1368,1.5E0); #1370=CARTESIAN_POINT('',(-1.E0,1.5E0,8.E0)); #1371=LINE('',#1370,#1369); #1372=CARTESIAN_POINT('',(-1.E0,0.E0,7.E0)); #1373=DIRECTION('',(0.E0,1.E0,0.E0)); #1374=DIRECTION('',(0.E0,0.E0,1.E0)); #1375=AXIS2_PLACEMENT_3D('',#1372,#1373,#1374); #1377=DIRECTION('',(0.E0,1.E0,0.E0)); #1378=VECTOR('',#1377,1.5E0); #1379=CARTESIAN_POINT('',(0.E0,0.E0,1.325E1)); #1380=LINE('',#1379,#1378); #1381=CARTESIAN_POINT('',(-1.E0,0.E0,1.325E1)); #1382=DIRECTION('',(0.E0,1.E0,0.E0)); #1383=DIRECTION('',(1.E0,0.E0,0.E0)); #1384=AXIS2_PLACEMENT_3D('',#1381,#1382,#1383); #1386=DIRECTION('',(0.E0,1.E0,0.E0)); #1387=VECTOR('',#1386,1.5E0); #1388=CARTESIAN_POINT('',(-1.E0,0.E0,1.225E1)); #1389=LINE('',#1388,#1387); #1390=CARTESIAN_POINT('',(-1.E0,1.5E0,1.325E1)); #1391=DIRECTION('',(0.E0,-1.E0,0.E0)); #1392=DIRECTION('',(0.E0,0.E0,-1.E0)); #1393=AXIS2_PLACEMENT_3D('',#1390,#1391,#1392); #1395=DIRECTION('',(0.E0,-1.E0,0.E0)); #1396=VECTOR('',#1395,1.5E0); #1397=CARTESIAN_POINT('',(2.5E0,1.5E0,1.325E1)); #1398=LINE('',#1397,#1396); #1399=CARTESIAN_POINT('',(3.5E0,1.5E0,1.325E1)); #1400=DIRECTION('',(0.E0,-1.E0,0.E0)); #1401=DIRECTION('',(-1.E0,0.E0,0.E0)); #1402=AXIS2_PLACEMENT_3D('',#1399,#1400,#1401); #1404=DIRECTION('',(0.E0,-1.E0,0.E0)); #1405=VECTOR('',#1404,1.5E0); #1406=CARTESIAN_POINT('',(3.5E0,1.5E0,1.225E1)); #1407=LINE('',#1406,#1405); #1408=CARTESIAN_POINT('',(3.5E0,0.E0,1.325E1)); #1409=DIRECTION('',(0.E0,1.E0,0.E0)); #1410=DIRECTION('',(0.E0,0.E0,-1.E0)); #1411=AXIS2_PLACEMENT_3D('',#1408,#1409,#1410); #1413=DIRECTION('',(0.E0,-1.E0,0.E0)); #1414=VECTOR('',#1413,1.5E0); #1415=CARTESIAN_POINT('',(2.5E0,1.5E0,2.19375E1)); #1416=LINE('',#1415,#1414); #1417=CARTESIAN_POINT('',(5.5E0,1.5E0,2.19375E1)); #1418=DIRECTION('',(0.E0,-1.E0,0.E0)); #1419=DIRECTION('',(-1.E0,0.E0,0.E0)); #1420=AXIS2_PLACEMENT_3D('',#1417,#1418,#1419); #1422=DIRECTION('',(0.E0,-1.E0,0.E0)); #1423=VECTOR('',#1422,1.5E0); #1424=CARTESIAN_POINT('',(5.5E0,1.5E0,1.89375E1)); #1425=LINE('',#1424,#1423); #1426=CARTESIAN_POINT('',(5.5E0,0.E0,2.19375E1)); #1427=DIRECTION('',(0.E0,1.E0,0.E0)); #1428=DIRECTION('',(0.E0,0.E0,-1.E0)); #1429=AXIS2_PLACEMENT_3D('',#1426,#1427,#1428); #1431=DIRECTION('',(0.E0,1.E0,0.E0)); #1432=VECTOR('',#1431,1.5E0); #1433=CARTESIAN_POINT('',(2.15E1,0.E0,2.19375E1)); #1434=LINE('',#1433,#1432); #1435=CARTESIAN_POINT('',(1.85E1,0.E0,2.19375E1)); #1436=DIRECTION('',(0.E0,1.E0,0.E0)); #1437=DIRECTION('',(1.E0,0.E0,0.E0)); #1438=AXIS2_PLACEMENT_3D('',#1435,#1436,#1437); #1440=DIRECTION('',(0.E0,1.E0,0.E0)); #1441=VECTOR('',#1440,1.5E0); #1442=CARTESIAN_POINT('',(1.85E1,0.E0,1.89375E1)); #1443=LINE('',#1442,#1441); #1444=CARTESIAN_POINT('',(1.85E1,1.5E0,2.19375E1)); #1445=DIRECTION('',(0.E0,-1.E0,0.E0)); #1446=DIRECTION('',(0.E0,0.E0,-1.E0)); #1447=AXIS2_PLACEMENT_3D('',#1444,#1445,#1446); #1449=DIRECTION('',(0.E0,-1.E0,0.E0)); #1450=VECTOR('',#1449,1.5E0); #1451=CARTESIAN_POINT('',(2.15E1,1.5E0,2.45E1)); #1452=LINE('',#1451,#1450); #1453=CARTESIAN_POINT('',(1.65E1,1.5E0,2.45E1)); #1454=DIRECTION('',(0.E0,-1.E0,0.E0)); #1455=DIRECTION('',(1.E0,0.E0,0.E0)); #1456=AXIS2_PLACEMENT_3D('',#1453,#1454,#1455); #1458=DIRECTION('',(0.E0,-1.E0,0.E0)); #1459=VECTOR('',#1458,1.5E0); #1460=CARTESIAN_POINT('',(1.65E1,1.5E0,2.95E1)); #1461=LINE('',#1460,#1459); #1462=CARTESIAN_POINT('',(1.65E1,0.E0,2.45E1)); #1463=DIRECTION('',(0.E0,1.E0,0.E0)); #1464=DIRECTION('',(0.E0,0.E0,1.E0)); #1465=AXIS2_PLACEMENT_3D('',#1462,#1463,#1464); #1467=DIRECTION('',(0.E0,-1.E0,0.E0)); #1468=VECTOR('',#1467,1.5E0); #1469=CARTESIAN_POINT('',(7.5E0,1.5E0,2.95E1)); #1470=LINE('',#1469,#1468); #1471=CARTESIAN_POINT('',(7.5E0,1.5E0,2.45E1)); #1472=DIRECTION('',(0.E0,-1.E0,0.E0)); #1473=DIRECTION('',(0.E0,0.E0,1.E0)); #1474=AXIS2_PLACEMENT_3D('',#1471,#1472,#1473); #1476=DIRECTION('',(0.E0,-1.E0,0.E0)); #1477=VECTOR('',#1476,1.5E0); #1478=CARTESIAN_POINT('',(2.5E0,1.5E0,2.45E1)); #1479=LINE('',#1478,#1477); #1480=CARTESIAN_POINT('',(7.5E0,0.E0,2.45E1)); #1481=DIRECTION('',(0.E0,1.E0,0.E0)); #1482=DIRECTION('',(-1.E0,0.E0,0.E0)); #1483=AXIS2_PLACEMENT_3D('',#1480,#1481,#1482); #1485=DIRECTION('',(0.E0,-1.E0,0.E0)); #1486=VECTOR('',#1485,1.5E0); #1487=CARTESIAN_POINT('',(2.15E1,1.5E0,1.40625E1)); #1488=LINE('',#1487,#1486); #1489=CARTESIAN_POINT('',(1.85E1,1.5E0,1.40625E1)); #1490=DIRECTION('',(0.E0,-1.E0,0.E0)); #1491=DIRECTION('',(1.E0,0.E0,0.E0)); #1492=AXIS2_PLACEMENT_3D('',#1489,#1490,#1491); #1494=DIRECTION('',(0.E0,-1.E0,0.E0)); #1495=VECTOR('',#1494,1.5E0); #1496=CARTESIAN_POINT('',(1.85E1,1.5E0,1.70625E1)); #1497=LINE('',#1496,#1495); #1498=CARTESIAN_POINT('',(1.85E1,0.E0,1.40625E1)); #1499=DIRECTION('',(0.E0,1.E0,0.E0)); #1500=DIRECTION('',(0.E0,0.E0,1.E0)); #1501=AXIS2_PLACEMENT_3D('',#1498,#1499,#1500); #1503=DIRECTION('',(0.E0,1.E0,0.E0)); #1504=VECTOR('',#1503,1.5E0); #1505=CARTESIAN_POINT('',(2.5E0,0.E0,1.40625E1)); #1506=LINE('',#1505,#1504); #1507=CARTESIAN_POINT('',(5.5E0,0.E0,1.40625E1)); #1508=DIRECTION('',(0.E0,1.E0,0.E0)); #1509=DIRECTION('',(-1.E0,0.E0,0.E0)); #1510=AXIS2_PLACEMENT_3D('',#1507,#1508,#1509); #1512=DIRECTION('',(0.E0,1.E0,0.E0)); #1513=VECTOR('',#1512,1.5E0); #1514=CARTESIAN_POINT('',(5.5E0,0.E0,1.70625E1)); #1515=LINE('',#1514,#1513); #1516=CARTESIAN_POINT('',(5.5E0,1.5E0,1.40625E1)); #1517=DIRECTION('',(0.E0,-1.E0,0.E0)); #1518=DIRECTION('',(0.E0,0.E0,1.E0)); #1519=AXIS2_PLACEMENT_3D('',#1516,#1517,#1518); #1521=DIRECTION('',(0.E0,1.E0,0.E0)); #1522=VECTOR('',#1521,1.5E0); #1523=CARTESIAN_POINT('',(2.15E1,0.E0,1.325E1)); #1524=LINE('',#1523,#1522); #1525=CARTESIAN_POINT('',(2.05E1,0.E0,1.325E1)); #1526=DIRECTION('',(0.E0,1.E0,0.E0)); #1527=DIRECTION('',(1.E0,0.E0,0.E0)); #1528=AXIS2_PLACEMENT_3D('',#1525,#1526,#1527); #1530=DIRECTION('',(0.E0,1.E0,0.E0)); #1531=VECTOR('',#1530,1.5E0); #1532=CARTESIAN_POINT('',(2.05E1,0.E0,1.225E1)); #1533=LINE('',#1532,#1531); #1534=CARTESIAN_POINT('',(2.05E1,1.5E0,1.325E1)); #1535=DIRECTION('',(0.E0,-1.E0,0.E0)); #1536=DIRECTION('',(0.E0,0.E0,-1.E0)); #1537=AXIS2_PLACEMENT_3D('',#1534,#1535,#1536); #1539=DIRECTION('',(0.E0,-1.E0,0.E0)); #1540=VECTOR('',#1539,1.5E0); #1541=CARTESIAN_POINT('',(2.4E1,1.5E0,1.325E1)); #1542=LINE('',#1541,#1540); #1543=CARTESIAN_POINT('',(2.5E1,1.5E0,1.325E1)); #1544=DIRECTION('',(0.E0,-1.E0,0.E0)); #1545=DIRECTION('',(-1.E0,0.E0,0.E0)); #1546=AXIS2_PLACEMENT_3D('',#1543,#1544,#1545); #1548=DIRECTION('',(0.E0,-1.E0,0.E0)); #1549=VECTOR('',#1548,1.5E0); #1550=CARTESIAN_POINT('',(2.5E1,1.5E0,1.225E1)); #1551=LINE('',#1550,#1549); #1552=CARTESIAN_POINT('',(2.5E1,0.E0,1.325E1)); #1553=DIRECTION('',(0.E0,1.E0,0.E0)); #1554=DIRECTION('',(0.E0,0.E0,-1.E0)); #1555=AXIS2_PLACEMENT_3D('',#1552,#1553,#1554); #1557=DIRECTION('',(0.E0,1.E0,0.E0)); #1558=VECTOR('',#1557,1.5E0); #1559=CARTESIAN_POINT('',(2.4E1,0.E0,2.8E1)); #1560=LINE('',#1559,#1558); #1561=DIRECTION('',(-7.071067811865E-1,0.E0,7.071067811865E-1)); #1562=VECTOR('',#1561,5.656854249492E0); #1563=CARTESIAN_POINT('',(2.4E1,0.E0,2.8E1)); #1564=LINE('',#1563,#1562); #1565=DIRECTION('',(0.E0,1.E0,0.E0)); #1566=VECTOR('',#1565,1.5E0); #1567=CARTESIAN_POINT('',(2.E1,0.E0,3.2E1)); #1568=LINE('',#1567,#1566); #1569=DIRECTION('',(-7.071067811865E-1,0.E0,7.071067811865E-1)); #1570=VECTOR('',#1569,5.656854249492E0); #1571=CARTESIAN_POINT('',(2.4E1,1.5E0,2.8E1)); #1572=LINE('',#1571,#1570); #1573=DIRECTION('',(0.E0,1.E0,0.E0)); #1574=VECTOR('',#1573,1.5E0); #1575=CARTESIAN_POINT('',(4.E0,0.E0,3.2E1)); #1576=LINE('',#1575,#1574); #1577=DIRECTION('',(-7.071067811865E-1,0.E0,-7.071067811865E-1)); #1578=VECTOR('',#1577,5.656854249492E0); #1579=CARTESIAN_POINT('',(4.E0,0.E0,3.2E1)); #1580=LINE('',#1579,#1578); #1581=DIRECTION('',(0.E0,1.E0,0.E0)); #1582=VECTOR('',#1581,1.5E0); #1583=CARTESIAN_POINT('',(0.E0,0.E0,2.8E1)); #1584=LINE('',#1583,#1582); #1585=DIRECTION('',(-7.071067811865E-1,0.E0,-7.071067811865E-1)); #1586=VECTOR('',#1585,5.656854249492E0); #1587=CARTESIAN_POINT('',(4.E0,1.5E0,3.2E1)); #1588=LINE('',#1587,#1586); #1589=DIRECTION('',(0.E0,1.E0,0.E0)); #1590=VECTOR('',#1589,1.5E0); #1591=CARTESIAN_POINT('',(2.4E1,0.E0,7.E0)); #1592=LINE('',#1591,#1590); #1593=CARTESIAN_POINT('',(2.5E1,0.E0,7.E0)); #1594=DIRECTION('',(0.E0,1.E0,0.E0)); #1595=DIRECTION('',(-1.E0,0.E0,0.E0)); #1596=AXIS2_PLACEMENT_3D('',#1593,#1594,#1595); #1598=DIRECTION('',(0.E0,1.E0,0.E0)); #1599=VECTOR('',#1598,1.5E0); #1600=CARTESIAN_POINT('',(2.5E1,0.E0,8.E0)); #1601=LINE('',#1600,#1599); #1602=CARTESIAN_POINT('',(2.5E1,1.5E0,7.E0)); #1603=DIRECTION('',(0.E0,-1.E0,0.E0)); #1604=DIRECTION('',(0.E0,0.E0,1.E0)); #1605=AXIS2_PLACEMENT_3D('',#1602,#1603,#1604); #1607=DIRECTION('',(0.E0,1.E0,0.E0)); #1608=VECTOR('',#1607,1.5E0); #1609=CARTESIAN_POINT('',(2.E1,0.E0,0.E0)); #1610=LINE('',#1609,#1608); #1611=DIRECTION('',(7.071067811865E-1,0.E0,7.071067811865E-1)); #1612=VECTOR('',#1611,5.656854249492E0); #1613=CARTESIAN_POINT('',(2.E1,0.E0,0.E0)); #1614=LINE('',#1613,#1612); #1615=DIRECTION('',(0.E0,1.E0,0.E0)); #1616=VECTOR('',#1615,1.5E0); #1617=CARTESIAN_POINT('',(2.4E1,0.E0,4.E0)); #1618=LINE('',#1617,#1616); #1619=DIRECTION('',(7.071067811865E-1,0.E0,7.071067811865E-1)); #1620=VECTOR('',#1619,5.656854249492E0); #1621=CARTESIAN_POINT('',(2.E1,1.5E0,0.E0)); #1622=LINE('',#1621,#1620); #1623=DIRECTION('',(0.E0,1.E0,0.E0)); #1624=VECTOR('',#1623,1.5E0); #1625=CARTESIAN_POINT('',(0.E0,0.E0,4.E0)); #1626=LINE('',#1625,#1624); #1627=DIRECTION('',(7.071067811865E-1,0.E0,-7.071067811865E-1)); #1628=VECTOR('',#1627,5.656854249492E0); #1629=CARTESIAN_POINT('',(0.E0,0.E0,4.E0)); #1630=LINE('',#1629,#1628); #1631=DIRECTION('',(0.E0,1.E0,0.E0)); #1632=VECTOR('',#1631,1.5E0); #1633=CARTESIAN_POINT('',(4.E0,0.E0,0.E0)); #1634=LINE('',#1633,#1632); #1635=DIRECTION('',(7.071067811865E-1,0.E0,-7.071067811865E-1)); #1636=VECTOR('',#1635,5.656854249492E0); #1637=CARTESIAN_POINT('',(0.E0,1.5E0,4.E0)); #1638=LINE('',#1637,#1636); #1639=DIRECTION('',(0.E0,-1.E0,0.E0)); #1640=VECTOR('',#1639,1.5E0); #1641=CARTESIAN_POINT('',(2.55E1,1.5E0,1.225E1)); #1642=LINE('',#1641,#1640); #1643=DIRECTION('',(7.071067811865E-1,0.E0,-7.071067811865E-1)); #1644=VECTOR('',#1643,7.071067811865E-1); #1645=CARTESIAN_POINT('',(2.55E1,1.5E0,1.225E1)); #1646=LINE('',#1645,#1644); #1647=DIRECTION('',(0.E0,-1.E0,0.E0)); #1648=VECTOR('',#1647,1.5E0); #1649=CARTESIAN_POINT('',(2.6E1,1.5E0,1.175E1)); #1650=LINE('',#1649,#1648); #1651=DIRECTION('',(7.071067811865E-1,0.E0,-7.071067811865E-1)); #1652=VECTOR('',#1651,7.071067811865E-1); #1653=CARTESIAN_POINT('',(2.55E1,0.E0,1.225E1)); #1654=LINE('',#1653,#1652); #1655=DIRECTION('',(0.E0,-1.E0,0.E0)); #1656=VECTOR('',#1655,2.5E0); #1657=CARTESIAN_POINT('',(2.6E1,2.5E0,8.E0)); #1658=LINE('',#1657,#1656); #1659=DIRECTION('',(0.E0,0.E0,1.E0)); #1660=VECTOR('',#1659,2.E0); #1661=CARTESIAN_POINT('',(2.6E1,2.5E0,8.E0)); #1662=LINE('',#1661,#1660); #1663=DIRECTION('',(0.E0,0.E0,1.E0)); #1664=VECTOR('',#1663,2.E0); #1665=CARTESIAN_POINT('',(2.1E1,1.15E1,8.E0)); #1666=LINE('',#1665,#1664); #1667=DIRECTION('',(0.E0,0.E0,1.E0)); #1668=VECTOR('',#1667,2.E0); #1669=CARTESIAN_POINT('',(1.9E1,1.15E1,8.E0)); #1670=LINE('',#1669,#1668); #1671=CARTESIAN_POINT('',(2.E1,1.15E1,9.E0)); #1672=DIRECTION('',(0.E0,1.E0,0.E0)); #1673=DIRECTION('',(-1.E0,0.E0,0.E0)); #1674=AXIS2_PLACEMENT_3D('',#1671,#1672,#1673); #1676=CARTESIAN_POINT('',(2.E1,1.15E1,9.E0)); #1677=DIRECTION('',(0.E0,1.E0,0.E0)); #1678=DIRECTION('',(1.E0,0.E0,0.E0)); #1679=AXIS2_PLACEMENT_3D('',#1676,#1677,#1678); #1681=CARTESIAN_POINT('',(2.013258252147E1,1.15E1,9.132582521472E0)); #1682=DIRECTION('',(0.E0,1.E0,0.E0)); #1683=DIRECTION('',(-1.E0,0.E0,0.E0)); #1684=AXIS2_PLACEMENT_3D('',#1681,#1682,#1683); #1686=CARTESIAN_POINT('',(2.013258252147E1,1.15E1,9.132582521472E0)); #1687=DIRECTION('',(0.E0,1.E0,0.E0)); #1688=DIRECTION('',(1.E0,0.E0,0.E0)); #1689=AXIS2_PLACEMENT_3D('',#1686,#1687,#1688); #1691=DIRECTION('',(0.E0,0.E0,1.E0)); #1692=VECTOR('',#1691,2.E0); #1693=CARTESIAN_POINT('',(1.9E1,1.5E0,8.E0)); #1694=LINE('',#1693,#1692); #1695=DIRECTION('',(0.E0,1.E0,0.E0)); #1696=VECTOR('',#1695,1.E1); #1697=CARTESIAN_POINT('',(1.9E1,1.5E0,8.E0)); #1698=LINE('',#1697,#1696); #1699=DIRECTION('',(0.E0,1.E0,0.E0)); #1700=VECTOR('',#1699,1.5E0); #1701=CARTESIAN_POINT('',(1.9E1,0.E0,1.1E1)); #1702=LINE('',#1701,#1700); #1703=CARTESIAN_POINT('',(1.8E1,0.E0,1.1E1)); #1704=DIRECTION('',(0.E0,1.E0,0.E0)); #1705=DIRECTION('',(1.E0,0.E0,0.E0)); #1706=AXIS2_PLACEMENT_3D('',#1703,#1704,#1705); #1708=DIRECTION('',(0.E0,1.E0,0.E0)); #1709=VECTOR('',#1708,1.5E0); #1710=CARTESIAN_POINT('',(1.8E1,0.E0,1.E1)); #1711=LINE('',#1710,#1709); #1712=CARTESIAN_POINT('',(1.8E1,1.5E0,1.1E1)); #1713=DIRECTION('',(0.E0,-1.E0,0.E0)); #1714=DIRECTION('',(0.E0,0.E0,-1.E0)); #1715=AXIS2_PLACEMENT_3D('',#1712,#1713,#1714); #1717=DIRECTION('',(1.E0,0.E0,0.E0)); #1718=VECTOR('',#1717,1.2E1); #1719=CARTESIAN_POINT('',(6.E0,1.5E0,1.E1)); #1720=LINE('',#1719,#1718); #1721=DIRECTION('',(0.E0,-1.E0,0.E0)); #1722=VECTOR('',#1721,1.5E0); #1723=CARTESIAN_POINT('',(5.E0,1.5E0,1.1E1)); #1724=LINE('',#1723,#1722); #1725=CARTESIAN_POINT('',(6.E0,1.5E0,1.1E1)); #1726=DIRECTION('',(0.E0,-1.E0,0.E0)); #1727=DIRECTION('',(-1.E0,0.E0,0.E0)); #1728=AXIS2_PLACEMENT_3D('',#1725,#1726,#1727); #1730=DIRECTION('',(0.E0,-1.E0,0.E0)); #1731=VECTOR('',#1730,1.5E0); #1732=CARTESIAN_POINT('',(6.E0,1.5E0,1.E1)); #1733=LINE('',#1732,#1731); #1734=CARTESIAN_POINT('',(6.E0,0.E0,1.1E1)); #1735=DIRECTION('',(0.E0,1.E0,0.E0)); #1736=DIRECTION('',(0.E0,0.E0,-1.E0)); #1737=AXIS2_PLACEMENT_3D('',#1734,#1735,#1736); #1739=DIRECTION('',(0.E0,0.E0,1.E0)); #1740=VECTOR('',#1739,2.E0); #1741=CARTESIAN_POINT('',(5.E0,1.5E0,8.E0)); #1742=LINE('',#1741,#1740); #1743=DIRECTION('',(0.E0,-1.E0,0.E0)); #1744=VECTOR('',#1743,1.E1); #1745=CARTESIAN_POINT('',(5.E0,1.15E1,8.E0)); #1746=LINE('',#1745,#1744); #1747=DIRECTION('',(0.E0,1.E0,0.E0)); #1748=VECTOR('',#1747,1.5E0); #1749=CARTESIAN_POINT('',(5.E0,0.E0,1.175E1)); #1750=LINE('',#1749,#1748); #1751=DIRECTION('',(-7.071067811865E-1,0.E0,7.071067811865E-1)); #1752=VECTOR('',#1751,7.071067811865E-1); #1753=CARTESIAN_POINT('',(5.E0,0.E0,1.175E1)); #1754=LINE('',#1753,#1752); #1755=DIRECTION('',(0.E0,1.E0,0.E0)); #1756=VECTOR('',#1755,1.5E0); #1757=CARTESIAN_POINT('',(4.5E0,0.E0,1.225E1)); #1758=LINE('',#1757,#1756); #1759=DIRECTION('',(-7.071067811865E-1,0.E0,7.071067811865E-1)); #1760=VECTOR('',#1759,7.071067811865E-1); #1761=CARTESIAN_POINT('',(5.E0,1.5E0,1.175E1)); #1762=LINE('',#1761,#1760); #1763=CARTESIAN_POINT('',(4.25E0,1.05E1,1.E1)); #1764=DIRECTION('',(0.E0,0.E0,1.E0)); #1765=DIRECTION('',(1.E0,0.E0,0.E0)); #1766=AXIS2_PLACEMENT_3D('',#1763,#1764,#1765); #1768=CARTESIAN_POINT('',(4.25E0,1.05E1,1.E1)); #1769=DIRECTION('',(0.E0,0.E0,1.E0)); #1770=DIRECTION('',(-1.E0,0.E0,0.E0)); #1771=AXIS2_PLACEMENT_3D('',#1768,#1769,#1770); #1773=DIRECTION('',(0.E0,1.E0,0.E0)); #1774=VECTOR('',#1773,5.E0); #1775=CARTESIAN_POINT('',(2.5E-1,1.5E0,1.E1)); #1776=LINE('',#1775,#1774); #1777=DIRECTION('',(0.E0,-1.E0,0.E0)); #1778=VECTOR('',#1777,1.E0); #1779=CARTESIAN_POINT('',(-2.E0,2.5E0,1.E1)); #1780=LINE('',#1779,#1778); #1781=DIRECTION('',(-4.856429311786E-1,-8.741572761215E-1,0.E0)); #1782=VECTOR('',#1781,1.029563014099E1); #1783=CARTESIAN_POINT('',(3.E0,1.15E1,1.E1)); #1784=LINE('',#1783,#1782); #1785=DIRECTION('',(-1.E0,0.E0,0.E0)); #1786=VECTOR('',#1785,2.E0); #1787=CARTESIAN_POINT('',(5.E0,1.15E1,1.E1)); #1788=LINE('',#1787,#1786); #1789=DIRECTION('',(0.E0,1.E0,0.E0)); #1790=VECTOR('',#1789,1.E1); #1791=CARTESIAN_POINT('',(5.E0,1.5E0,1.E1)); #1792=LINE('',#1791,#1790); #1793=DIRECTION('',(0.E0,1.E0,0.E0)); #1794=VECTOR('',#1793,5.E0); #1795=CARTESIAN_POINT('',(2.E0,1.5E0,1.E1)); #1796=LINE('',#1795,#1794); #1797=DIRECTION('',(1.E0,0.E0,0.E0)); #1798=VECTOR('',#1797,1.75E0); #1799=CARTESIAN_POINT('',(2.5E-1,6.5E0,1.E1)); #1800=LINE('',#1799,#1798); #1801=DIRECTION('',(0.E0,-1.E0,0.E0)); #1802=VECTOR('',#1801,4.3E0); #1803=CARTESIAN_POINT('',(2.5E0,6.65E0,1.E1)); #1804=LINE('',#1803,#1802); #1805=DIRECTION('',(1.E0,0.E0,0.E0)); #1806=VECTOR('',#1805,1.3E0); #1807=CARTESIAN_POINT('',(2.85E0,2.E0,1.E1)); #1808=LINE('',#1807,#1806); #1809=DIRECTION('',(0.E0,1.E0,0.E0)); #1810=VECTOR('',#1809,6.8E0); #1811=CARTESIAN_POINT('',(4.5E0,2.35E0,1.E1)); #1812=LINE('',#1811,#1810); #1813=DIRECTION('',(-1.E0,0.E0,0.E0)); #1814=VECTOR('',#1813,1.197200760546E0); #1815=CARTESIAN_POINT('',(4.15E0,9.5E0,1.E1)); #1816=LINE('',#1815,#1814); #1817=DIRECTION('',(-4.856429311786E-1,-8.741572761215E-1,0.E0)); #1818=VECTOR('',#1817,2.059126028197E0); #1819=CARTESIAN_POINT('',(2.646844192811E0,9.319975025913E0,1.E1)); #1820=LINE('',#1819,#1818); #1821=DIRECTION('',(1.E0,0.E0,0.E0)); #1822=VECTOR('',#1821,1.972007605460E-1); #1823=CARTESIAN_POINT('',(1.952799239454E0,7.E0,1.E1)); #1824=LINE('',#1823,#1822); #1825=DIRECTION('',(0.E0,0.E0,1.E0)); #1826=VECTOR('',#1825,2.E0); #1827=CARTESIAN_POINT('',(4.4125E0,1.05E1,8.E0)); #1828=LINE('',#1827,#1826); #1829=DIRECTION('',(0.E0,0.E0,1.E0)); #1830=VECTOR('',#1829,2.E0); #1831=CARTESIAN_POINT('',(4.0875E0,1.05E1,8.E0)); #1832=LINE('',#1831,#1830); #1833=DIRECTION('',(0.E0,-8.660254037844E-1,5.E-1)); #1834=VECTOR('',#1833,5.773502691896E0); #1835=CARTESIAN_POINT('',(2.5E-1,6.5E0,1.E1)); #1836=LINE('',#1835,#1834); #1837=CARTESIAN_POINT('',(8.675E-1,3.035898384862E0,1.2E1)); #1838=CARTESIAN_POINT('',(8.675E-1,2.930774450068E0,1.206069333205E1)); #1839=CARTESIAN_POINT('',(9.058386382037E-1,2.745461691651E0,1.216768370301E1)); #1840=CARTESIAN_POINT('',(1.029862281194E0,2.608885438662E0,1.224653603944E1)); #1841=CARTESIAN_POINT('',(1.125E0,2.580400233539E0,1.226298198028E1)); #1842=CARTESIAN_POINT('',(1.220137718806E0,2.608885438662E0,1.224653603944E1)); #1843=CARTESIAN_POINT('',(1.344161361796E0,2.745461691651E0,1.216768370301E1)); #1844=CARTESIAN_POINT('',(1.3825E0,2.930774450068E0,1.206069333205E1)); #1845=CARTESIAN_POINT('',(1.3825E0,3.035898384862E0,1.2E1)); #1847=CARTESIAN_POINT('',(1.3825E0,3.035898384862E0,1.2E1)); #1848=CARTESIAN_POINT('',(1.3825E0,3.141022319657E0,1.193930666795E1)); #1849=CARTESIAN_POINT('',(1.344161361796E0,3.326335078073E0,1.183231629699E1)); #1850=CARTESIAN_POINT('',(1.220137718806E0,3.462911331062E0,1.175346396056E1)); #1851=CARTESIAN_POINT('',(1.125E0,3.491396536186E0,1.173701801972E1)); #1852=CARTESIAN_POINT('',(1.029862281194E0,3.462911331062E0,1.175346396056E1)); #1853=CARTESIAN_POINT('',(9.058386382037E-1,3.326335078073E0,1.183231629699E1)); #1854=CARTESIAN_POINT('',(8.675E-1,3.141022319657E0,1.193930666795E1)); #1855=CARTESIAN_POINT('',(8.675E-1,3.035898384862E0,1.2E1)); #1857=DIRECTION('',(0.E0,-8.660254037844E-1,5.E-1)); #1858=VECTOR('',#1857,5.773502691896E0); #1859=CARTESIAN_POINT('',(2.E0,6.5E0,1.E1)); #1860=LINE('',#1859,#1858); #1861=DIRECTION('',(0.E0,1.E0,0.E0)); #1862=VECTOR('',#1861,2.035898384862E0); #1863=CARTESIAN_POINT('',(8.675E-1,1.E0,1.2E1)); #1864=LINE('',#1863,#1862); #1865=DIRECTION('',(0.E0,-1.E0,0.E0)); #1866=VECTOR('',#1865,2.035898384862E0); #1867=CARTESIAN_POINT('',(1.3825E0,3.035898384862E0,1.2E1)); #1868=LINE('',#1867,#1866); #1869=CARTESIAN_POINT('',(1.125E0,1.E0,1.2E1)); #1870=DIRECTION('',(0.E0,-1.E0,0.E0)); #1871=DIRECTION('',(1.E0,0.E0,0.E0)); #1872=AXIS2_PLACEMENT_3D('',#1869,#1870,#1871); #1874=CARTESIAN_POINT('',(1.125E0,1.E0,1.2E1)); #1875=DIRECTION('',(0.E0,-1.E0,0.E0)); #1876=DIRECTION('',(-1.E0,0.E0,0.E0)); #1877=AXIS2_PLACEMENT_3D('',#1874,#1875,#1876); #1879=CARTESIAN_POINT('',(1.125E0,1.E0,1.2E1)); #1880=DIRECTION('',(0.E0,-1.E0,0.E0)); #1881=DIRECTION('',(1.E0,0.E0,0.E0)); #1882=AXIS2_PLACEMENT_3D('',#1879,#1880,#1881); #1884=CARTESIAN_POINT('',(1.125E0,1.E0,1.2E1)); #1885=DIRECTION('',(0.E0,-1.E0,0.E0)); #1886=DIRECTION('',(-1.E0,0.E0,0.E0)); #1887=AXIS2_PLACEMENT_3D('',#1884,#1885,#1886); #1889=DIRECTION('',(0.E0,-1.E0,0.E0)); #1890=VECTOR('',#1889,1.E0); #1891=CARTESIAN_POINT('',(1.3175E0,1.E0,1.2E1)); #1892=LINE('',#1891,#1890); #1893=DIRECTION('',(0.E0,-1.E0,0.E0)); #1894=VECTOR('',#1893,1.E0); #1895=CARTESIAN_POINT('',(9.325E-1,1.E0,1.2E1)); #1896=LINE('',#1895,#1894); #1897=DIRECTION('',(0.E0,1.E0,0.E0)); #1898=VECTOR('',#1897,2.5E0); #1899=CARTESIAN_POINT('',(-2.E0,0.E0,8.E0)); #1900=LINE('',#1899,#1898); #1901=DIRECTION('',(0.E0,0.E0,1.E0)); #1902=VECTOR('',#1901,2.E0); #1903=CARTESIAN_POINT('',(-2.E0,2.5E0,8.E0)); #1904=LINE('',#1903,#1902); #1905=DIRECTION('',(0.E0,1.E0,0.E0)); #1906=VECTOR('',#1905,1.5E0); #1907=CARTESIAN_POINT('',(-1.5E0,0.E0,1.225E1)); #1908=LINE('',#1907,#1906); #1909=DIRECTION('',(-7.071067811865E-1,0.E0,-7.071067811865E-1)); #1910=VECTOR('',#1909,7.071067811865E-1); #1911=CARTESIAN_POINT('',(-1.5E0,0.E0,1.225E1)); #1912=LINE('',#1911,#1910); #1913=DIRECTION('',(0.E0,1.E0,0.E0)); #1914=VECTOR('',#1913,1.5E0); #1915=CARTESIAN_POINT('',(-2.E0,0.E0,1.175E1)); #1916=LINE('',#1915,#1914); #1917=DIRECTION('',(-7.071067811865E-1,0.E0,-7.071067811865E-1)); #1918=VECTOR('',#1917,7.071067811865E-1); #1919=CARTESIAN_POINT('',(-1.5E0,1.5E0,1.225E1)); #1920=LINE('',#1919,#1918); #1921=DIRECTION('',(0.E0,0.E0,1.E0)); #1922=VECTOR('',#1921,2.E0); #1923=CARTESIAN_POINT('',(3.E0,1.15E1,8.E0)); #1924=LINE('',#1923,#1922); #1925=DIRECTION('',(0.E0,0.E0,1.E0)); #1926=VECTOR('',#1925,2.E0); #1927=CARTESIAN_POINT('',(5.E0,1.15E1,8.E0)); #1928=LINE('',#1927,#1926); #1929=CARTESIAN_POINT('',(4.E0,1.15E1,9.E0)); #1930=DIRECTION('',(0.E0,-1.E0,0.E0)); #1931=DIRECTION('',(1.E0,0.E0,0.E0)); #1932=AXIS2_PLACEMENT_3D('',#1929,#1930,#1931); #1934=CARTESIAN_POINT('',(4.E0,1.15E1,9.E0)); #1935=DIRECTION('',(0.E0,-1.E0,0.E0)); #1936=DIRECTION('',(-1.E0,0.E0,0.E0)); #1937=AXIS2_PLACEMENT_3D('',#1934,#1935,#1936); #1939=CARTESIAN_POINT('',(3.867417478528E0,1.15E1,9.132582521472E0)); #1940=DIRECTION('',(0.E0,-1.E0,0.E0)); #1941=DIRECTION('',(1.E0,0.E0,0.E0)); #1942=AXIS2_PLACEMENT_3D('',#1939,#1940,#1941); #1944=CARTESIAN_POINT('',(3.867417478528E0,1.15E1,9.132582521472E0)); #1945=DIRECTION('',(0.E0,-1.E0,0.E0)); #1946=DIRECTION('',(-1.E0,0.E0,0.E0)); #1947=AXIS2_PLACEMENT_3D('',#1944,#1945,#1946); #1949=DIRECTION('',(0.E0,-1.E0,0.E0)); #1950=VECTOR('',#1949,3.75E-1); #1951=CARTESIAN_POINT('',(4.095E0,1.15E1,9.E0)); #1952=LINE('',#1951,#1950); #1953=DIRECTION('',(0.E0,-1.E0,0.E0)); #1954=VECTOR('',#1953,3.75E-1); #1955=CARTESIAN_POINT('',(3.905E0,1.15E1,9.E0)); #1956=LINE('',#1955,#1954); #1957=CARTESIAN_POINT('',(4.E0,1.1125E1,9.E0)); #1958=DIRECTION('',(0.E0,-1.E0,0.E0)); #1959=DIRECTION('',(1.E0,0.E0,0.E0)); #1960=AXIS2_PLACEMENT_3D('',#1957,#1958,#1959); #1962=CARTESIAN_POINT('',(4.E0,1.1125E1,9.E0)); #1963=DIRECTION('',(0.E0,-1.E0,0.E0)); #1964=DIRECTION('',(-1.E0,0.E0,0.E0)); #1965=AXIS2_PLACEMENT_3D('',#1962,#1963,#1964); #1967=DIRECTION('',(0.E0,-1.E0,0.E0)); #1968=VECTOR('',#1967,2.5E-1); #1969=CARTESIAN_POINT('',(3.929917478528E0,1.15E1,9.132582521472E0)); #1970=LINE('',#1969,#1968); #1971=DIRECTION('',(0.E0,-1.E0,0.E0)); #1972=VECTOR('',#1971,2.5E-1); #1973=CARTESIAN_POINT('',(3.804917478528E0,1.15E1,9.132582521472E0)); #1974=LINE('',#1973,#1972); #1975=CARTESIAN_POINT('',(3.867417478528E0,1.125E1,9.132582521472E0)); #1976=DIRECTION('',(0.E0,-1.E0,0.E0)); #1977=DIRECTION('',(1.E0,0.E0,0.E0)); #1978=AXIS2_PLACEMENT_3D('',#1975,#1976,#1977); #1980=CARTESIAN_POINT('',(3.867417478528E0,1.125E1,9.132582521472E0)); #1981=DIRECTION('',(0.E0,-1.E0,0.E0)); #1982=DIRECTION('',(-1.E0,0.E0,0.E0)); #1983=AXIS2_PLACEMENT_3D('',#1980,#1981,#1982); #1985=DIRECTION('',(0.E0,0.E0,1.E0)); #1986=VECTOR('',#1985,5.E-1); #1987=CARTESIAN_POINT('',(2.5E0,6.65E0,9.5E0)); #1988=LINE('',#1987,#1986); #1989=CARTESIAN_POINT('',(2.15E0,6.65E0,1.E1)); #1990=DIRECTION('',(0.E0,0.E0,1.E0)); #1991=DIRECTION('',(1.E0,0.E0,0.E0)); #1992=AXIS2_PLACEMENT_3D('',#1989,#1990,#1991); #1994=DIRECTION('',(0.E0,0.E0,1.E0)); #1995=VECTOR('',#1994,5.E-1); #1996=CARTESIAN_POINT('',(2.15E0,7.E0,9.5E0)); #1997=LINE('',#1996,#1995); #1998=CARTESIAN_POINT('',(2.15E0,6.65E0,9.5E0)); #1999=DIRECTION('',(0.E0,0.E0,-1.E0)); #2000=DIRECTION('',(0.E0,1.E0,0.E0)); #2001=AXIS2_PLACEMENT_3D('',#1998,#1999,#2000); #2003=DIRECTION('',(0.E0,-1.E0,0.E0)); #2004=VECTOR('',#2003,4.3E0); #2005=CARTESIAN_POINT('',(2.5E0,6.65E0,9.5E0)); #2006=LINE('',#2005,#2004); #2007=DIRECTION('',(1.E0,0.E0,0.E0)); #2008=VECTOR('',#2007,1.972007605460E-1); #2009=CARTESIAN_POINT('',(1.952799239454E0,7.E0,9.5E0)); #2010=LINE('',#2009,#2008); #2011=DIRECTION('',(-4.856429311786E-1,-8.741572761215E-1,0.E0)); #2012=VECTOR('',#2011,2.059126028197E0); #2013=CARTESIAN_POINT('',(2.646844192811E0,9.319975025913E0,9.5E0)); #2014=LINE('',#2013,#2012); #2015=DIRECTION('',(-1.E0,0.E0,0.E0)); #2016=VECTOR('',#2015,1.197200760546E0); #2017=CARTESIAN_POINT('',(4.15E0,9.5E0,9.5E0)); #2018=LINE('',#2017,#2016); #2019=DIRECTION('',(0.E0,1.E0,0.E0)); #2020=VECTOR('',#2019,6.8E0); #2021=CARTESIAN_POINT('',(4.5E0,2.35E0,9.5E0)); #2022=LINE('',#2021,#2020); #2023=DIRECTION('',(1.E0,0.E0,0.E0)); #2024=VECTOR('',#2023,1.3E0); #2025=CARTESIAN_POINT('',(2.85E0,2.E0,9.5E0)); #2026=LINE('',#2025,#2024); #2027=DIRECTION('',(0.E0,0.E0,-1.E0)); #2028=VECTOR('',#2027,5.E-1); #2029=CARTESIAN_POINT('',(1.952799239454E0,7.E0,1.E1)); #2030=LINE('',#2029,#2028); #2031=CARTESIAN_POINT('',(1.952799239454E0,7.35E0,1.E1)); #2032=DIRECTION('',(0.E0,0.E0,-1.E0)); #2033=DIRECTION('',(0.E0,-1.E0,0.E0)); #2034=AXIS2_PLACEMENT_3D('',#2031,#2032,#2033); #2036=DIRECTION('',(0.E0,0.E0,-1.E0)); #2037=VECTOR('',#2036,5.E-1); #2038=CARTESIAN_POINT('',(1.646844192811E0,7.519975025913E0,1.E1)); #2039=LINE('',#2038,#2037); #2040=CARTESIAN_POINT('',(1.952799239454E0,7.35E0,9.5E0)); #2041=DIRECTION('',(0.E0,0.E0,1.E0)); #2042=DIRECTION('',(-8.741572761215E-1,4.856429311786E-1,0.E0)); #2043=AXIS2_PLACEMENT_3D('',#2040,#2041,#2042); #2045=DIRECTION('',(0.E0,0.E0,-1.E0)); #2046=VECTOR('',#2045,5.E-1); #2047=CARTESIAN_POINT('',(2.646844192811E0,9.319975025913E0,1.E1)); #2048=LINE('',#2047,#2046); #2049=CARTESIAN_POINT('',(2.952799239454E0,9.15E0,1.E1)); #2050=DIRECTION('',(0.E0,0.E0,-1.E0)); #2051=DIRECTION('',(-8.741572761215E-1,4.856429311786E-1,0.E0)); #2052=AXIS2_PLACEMENT_3D('',#2049,#2050,#2051); #2054=DIRECTION('',(0.E0,0.E0,-1.E0)); #2055=VECTOR('',#2054,5.E-1); #2056=CARTESIAN_POINT('',(2.952799239454E0,9.5E0,1.E1)); #2057=LINE('',#2056,#2055); #2058=CARTESIAN_POINT('',(2.952799239454E0,9.15E0,9.5E0)); #2059=DIRECTION('',(0.E0,0.E0,1.E0)); #2060=DIRECTION('',(0.E0,1.E0,0.E0)); #2061=AXIS2_PLACEMENT_3D('',#2058,#2059,#2060); #2063=DIRECTION('',(0.E0,0.E0,-1.E0)); #2064=VECTOR('',#2063,5.E-1); #2065=CARTESIAN_POINT('',(4.15E0,9.5E0,1.E1)); #2066=LINE('',#2065,#2064); #2067=CARTESIAN_POINT('',(4.15E0,9.15E0,1.E1)); #2068=DIRECTION('',(0.E0,0.E0,-1.E0)); #2069=DIRECTION('',(0.E0,1.E0,0.E0)); #2070=AXIS2_PLACEMENT_3D('',#2067,#2068,#2069); #2072=DIRECTION('',(0.E0,0.E0,-1.E0)); #2073=VECTOR('',#2072,5.E-1); #2074=CARTESIAN_POINT('',(4.5E0,9.15E0,1.E1)); #2075=LINE('',#2074,#2073); #2076=CARTESIAN_POINT('',(4.15E0,9.15E0,9.5E0)); #2077=DIRECTION('',(0.E0,0.E0,1.E0)); #2078=DIRECTION('',(1.E0,0.E0,0.E0)); #2079=AXIS2_PLACEMENT_3D('',#2076,#2077,#2078); #2081=DIRECTION('',(0.E0,0.E0,-1.E0)); #2082=VECTOR('',#2081,5.E-1); #2083=CARTESIAN_POINT('',(4.5E0,2.35E0,1.E1)); #2084=LINE('',#2083,#2082); #2085=CARTESIAN_POINT('',(4.15E0,2.35E0,1.E1)); #2086=DIRECTION('',(0.E0,0.E0,-1.E0)); #2087=DIRECTION('',(1.E0,0.E0,0.E0)); #2088=AXIS2_PLACEMENT_3D('',#2085,#2086,#2087); #2090=DIRECTION('',(0.E0,0.E0,-1.E0)); #2091=VECTOR('',#2090,5.E-1); #2092=CARTESIAN_POINT('',(4.15E0,2.E0,1.E1)); #2093=LINE('',#2092,#2091); #2094=CARTESIAN_POINT('',(4.15E0,2.35E0,9.5E0)); #2095=DIRECTION('',(0.E0,0.E0,1.E0)); #2096=DIRECTION('',(0.E0,-1.E0,0.E0)); #2097=AXIS2_PLACEMENT_3D('',#2094,#2095,#2096); #2099=DIRECTION('',(0.E0,0.E0,-1.E0)); #2100=VECTOR('',#2099,5.E-1); #2101=CARTESIAN_POINT('',(2.85E0,2.E0,1.E1)); #2102=LINE('',#2101,#2100); #2103=CARTESIAN_POINT('',(2.85E0,2.35E0,1.E1)); #2104=DIRECTION('',(0.E0,0.E0,-1.E0)); #2105=DIRECTION('',(0.E0,-1.E0,0.E0)); #2106=AXIS2_PLACEMENT_3D('',#2103,#2104,#2105); #2108=DIRECTION('',(0.E0,0.E0,-1.E0)); #2109=VECTOR('',#2108,5.E-1); #2110=CARTESIAN_POINT('',(2.5E0,2.35E0,1.E1)); #2111=LINE('',#2110,#2109); #2112=CARTESIAN_POINT('',(2.85E0,2.35E0,9.5E0)); #2113=DIRECTION('',(0.E0,0.E0,1.E0)); #2114=DIRECTION('',(-1.E0,0.E0,0.E0)); #2115=AXIS2_PLACEMENT_3D('',#2112,#2113,#2114); #2117=DIRECTION('',(0.E0,-1.E0,0.E0)); #2118=VECTOR('',#2117,1.5E0); #2119=CARTESIAN_POINT('',(1.9E1,1.5E0,1.175E1)); #2120=LINE('',#2119,#2118); #2121=DIRECTION('',(7.071067811865E-1,0.E0,7.071067811865E-1)); #2122=VECTOR('',#2121,7.071067811865E-1); #2123=CARTESIAN_POINT('',(1.9E1,1.5E0,1.175E1)); #2124=LINE('',#2123,#2122); #2125=DIRECTION('',(0.E0,-1.E0,0.E0)); #2126=VECTOR('',#2125,1.5E0); #2127=CARTESIAN_POINT('',(1.95E1,1.5E0,1.225E1)); #2128=LINE('',#2127,#2126); #2129=DIRECTION('',(7.071067811865E-1,0.E0,7.071067811865E-1)); #2130=VECTOR('',#2129,7.071067811865E-1); #2131=CARTESIAN_POINT('',(1.9E1,0.E0,1.175E1)); #2132=LINE('',#2131,#2130); #2133=DIRECTION('',(0.E0,-1.E0,0.E0)); #2134=VECTOR('',#2133,3.75E-1); #2135=CARTESIAN_POINT('',(1.9905E1,1.15E1,9.E0)); #2136=LINE('',#2135,#2134); #2137=DIRECTION('',(0.E0,-1.E0,0.E0)); #2138=VECTOR('',#2137,3.75E-1); #2139=CARTESIAN_POINT('',(2.0095E1,1.15E1,9.E0)); #2140=LINE('',#2139,#2138); #2141=CARTESIAN_POINT('',(2.E1,1.1125E1,9.E0)); #2142=DIRECTION('',(0.E0,1.E0,0.E0)); #2143=DIRECTION('',(-1.E0,0.E0,0.E0)); #2144=AXIS2_PLACEMENT_3D('',#2141,#2142,#2143); #2146=CARTESIAN_POINT('',(2.E1,1.1125E1,9.E0)); #2147=DIRECTION('',(0.E0,1.E0,0.E0)); #2148=DIRECTION('',(1.E0,0.E0,0.E0)); #2149=AXIS2_PLACEMENT_3D('',#2146,#2147,#2148); #2151=DIRECTION('',(0.E0,-1.E0,0.E0)); #2152=VECTOR('',#2151,2.5E-1); #2153=CARTESIAN_POINT('',(2.007008252147E1,1.15E1,9.132582521472E0)); #2154=LINE('',#2153,#2152); #2155=DIRECTION('',(0.E0,-1.E0,0.E0)); #2156=VECTOR('',#2155,2.5E-1); #2157=CARTESIAN_POINT('',(2.019508252147E1,1.15E1,9.132582521472E0)); #2158=LINE('',#2157,#2156); #2159=CARTESIAN_POINT('',(2.013258252147E1,1.125E1,9.132582521472E0)); #2160=DIRECTION('',(0.E0,1.E0,0.E0)); #2161=DIRECTION('',(-1.E0,0.E0,0.E0)); #2162=AXIS2_PLACEMENT_3D('',#2159,#2160,#2161); #2164=CARTESIAN_POINT('',(2.013258252147E1,1.125E1,9.132582521472E0)); #2165=DIRECTION('',(0.E0,1.E0,0.E0)); #2166=DIRECTION('',(1.E0,0.E0,0.E0)); #2167=AXIS2_PLACEMENT_3D('',#2164,#2165,#2166); #2169=DIRECTION('',(1.421085471520E-14,1.E0,0.E0)); #2170=VECTOR('',#2169,2.5E-1); #2171=CARTESIAN_POINT('',(1.745E1,1.25E0,2.975E1)); #2172=LINE('',#2171,#2170); #2173=DIRECTION('',(-1.421085471520E-14,1.E0,0.E0)); #2174=VECTOR('',#2173,2.5E-1); #2175=CARTESIAN_POINT('',(1.765E1,1.25E0,2.975E1)); #2176=LINE('',#2175,#2174); #2177=DIRECTION('',(-8.660254037844E-1,5.E-1,0.E0)); #2178=VECTOR('',#2177,1.154700538379E-1); #2179=CARTESIAN_POINT('',(1.755E1,1.192264973081E0,2.975E1)); #2180=LINE('',#2179,#2178); #2181=DIRECTION('',(8.660254037844E-1,5.E-1,0.E0)); #2182=VECTOR('',#2181,1.154700538379E-1); #2183=CARTESIAN_POINT('',(1.755E1,1.192264973081E0,2.975E1)); #2184=LINE('',#2183,#2182); #2185=CARTESIAN_POINT('',(1.755E1,1.25E0,2.975E1)); #2186=DIRECTION('',(0.E0,-1.E0,0.E0)); #2187=DIRECTION('',(1.E0,0.E0,0.E0)); #2188=AXIS2_PLACEMENT_3D('',#2185,#2186,#2187); #2190=CARTESIAN_POINT('',(1.755E1,1.25E0,2.975E1)); #2191=DIRECTION('',(0.E0,1.E0,0.E0)); #2192=DIRECTION('',(1.E0,0.E0,0.E0)); #2193=AXIS2_PLACEMENT_3D('',#2190,#2191,#2192); #2195=DIRECTION('',(1.421085471520E-14,1.E0,0.E0)); #2196=VECTOR('',#2195,2.5E-1); #2197=CARTESIAN_POINT('',(1.645E1,1.25E0,2.975E1)); #2198=LINE('',#2197,#2196); #2199=DIRECTION('',(-1.421085471520E-14,1.E0,0.E0)); #2200=VECTOR('',#2199,2.5E-1); #2201=CARTESIAN_POINT('',(1.665E1,1.25E0,2.975E1)); #2202=LINE('',#2201,#2200); #2203=DIRECTION('',(-8.660254037844E-1,5.E-1,0.E0)); #2204=VECTOR('',#2203,1.154700538379E-1); #2205=CARTESIAN_POINT('',(1.655E1,1.192264973081E0,2.975E1)); #2206=LINE('',#2205,#2204); #2207=DIRECTION('',(8.660254037844E-1,5.E-1,0.E0)); #2208=VECTOR('',#2207,1.154700538379E-1); #2209=CARTESIAN_POINT('',(1.655E1,1.192264973081E0,2.975E1)); #2210=LINE('',#2209,#2208); #2211=CARTESIAN_POINT('',(1.655E1,1.25E0,2.975E1)); #2212=DIRECTION('',(0.E0,-1.E0,0.E0)); #2213=DIRECTION('',(1.E0,0.E0,0.E0)); #2214=AXIS2_PLACEMENT_3D('',#2211,#2212,#2213); #2216=CARTESIAN_POINT('',(1.655E1,1.25E0,2.975E1)); #2217=DIRECTION('',(0.E0,1.E0,0.E0)); #2218=DIRECTION('',(1.E0,0.E0,0.E0)); #2219=AXIS2_PLACEMENT_3D('',#2216,#2217,#2218); #2221=DIRECTION('',(0.E0,-1.E0,0.E0)); #2222=VECTOR('',#2221,5.E-1); #2223=CARTESIAN_POINT('',(1.3825E0,1.5E0,6.E0)); #2224=LINE('',#2223,#2222); #2225=DIRECTION('',(0.E0,-1.E0,0.E0)); #2226=VECTOR('',#2225,5.E-1); #2227=CARTESIAN_POINT('',(8.675E-1,1.5E0,6.E0)); #2228=LINE('',#2227,#2226); #2229=CARTESIAN_POINT('',(1.125E0,1.E0,6.E0)); #2230=DIRECTION('',(0.E0,-1.E0,0.E0)); #2231=DIRECTION('',(1.E0,0.E0,0.E0)); #2232=AXIS2_PLACEMENT_3D('',#2229,#2230,#2231); #2234=CARTESIAN_POINT('',(1.125E0,1.E0,6.E0)); #2235=DIRECTION('',(0.E0,-1.E0,0.E0)); #2236=DIRECTION('',(-1.E0,0.E0,0.E0)); #2237=AXIS2_PLACEMENT_3D('',#2234,#2235,#2236); #2239=CARTESIAN_POINT('',(1.125E0,1.E0,6.E0)); #2240=DIRECTION('',(0.E0,-1.E0,0.E0)); #2241=DIRECTION('',(1.E0,0.E0,0.E0)); #2242=AXIS2_PLACEMENT_3D('',#2239,#2240,#2241); #2244=CARTESIAN_POINT('',(1.125E0,1.E0,6.E0)); #2245=DIRECTION('',(0.E0,-1.E0,0.E0)); #2246=DIRECTION('',(-1.E0,0.E0,0.E0)); #2247=AXIS2_PLACEMENT_3D('',#2244,#2245,#2246); #2249=DIRECTION('',(0.E0,-1.E0,0.E0)); #2250=VECTOR('',#2249,1.E0); #2251=CARTESIAN_POINT('',(1.3175E0,1.E0,6.E0)); #2252=LINE('',#2251,#2250); #2253=DIRECTION('',(0.E0,-1.E0,0.E0)); #2254=VECTOR('',#2253,1.E0); #2255=CARTESIAN_POINT('',(9.325E-1,1.E0,6.E0)); #2256=LINE('',#2255,#2254); #2257=DIRECTION('',(0.E0,-1.E0,0.E0)); #2258=VECTOR('',#2257,5.E-1); #2259=CARTESIAN_POINT('',(1.3825E0,1.5E0,1.8E1)); #2260=LINE('',#2259,#2258); #2261=DIRECTION('',(0.E0,-1.E0,0.E0)); #2262=VECTOR('',#2261,5.E-1); #2263=CARTESIAN_POINT('',(8.675E-1,1.5E0,1.8E1)); #2264=LINE('',#2263,#2262); #2265=CARTESIAN_POINT('',(1.125E0,1.E0,1.8E1)); #2266=DIRECTION('',(0.E0,-1.E0,0.E0)); #2267=DIRECTION('',(1.E0,0.E0,0.E0)); #2268=AXIS2_PLACEMENT_3D('',#2265,#2266,#2267); #2270=CARTESIAN_POINT('',(1.125E0,1.E0,1.8E1)); #2271=DIRECTION('',(0.E0,-1.E0,0.E0)); #2272=DIRECTION('',(-1.E0,0.E0,0.E0)); #2273=AXIS2_PLACEMENT_3D('',#2270,#2271,#2272); #2275=CARTESIAN_POINT('',(1.125E0,1.E0,1.8E1)); #2276=DIRECTION('',(0.E0,-1.E0,0.E0)); #2277=DIRECTION('',(1.E0,0.E0,0.E0)); #2278=AXIS2_PLACEMENT_3D('',#2275,#2276,#2277); #2280=CARTESIAN_POINT('',(1.125E0,1.E0,1.8E1)); #2281=DIRECTION('',(0.E0,-1.E0,0.E0)); #2282=DIRECTION('',(-1.E0,0.E0,0.E0)); #2283=AXIS2_PLACEMENT_3D('',#2280,#2281,#2282); #2285=DIRECTION('',(0.E0,-1.E0,0.E0)); #2286=VECTOR('',#2285,1.E0); #2287=CARTESIAN_POINT('',(1.3175E0,1.E0,1.8E1)); #2288=LINE('',#2287,#2286); #2289=DIRECTION('',(0.E0,-1.E0,0.E0)); #2290=VECTOR('',#2289,1.E0); #2291=CARTESIAN_POINT('',(9.325E-1,1.E0,1.8E1)); #2292=LINE('',#2291,#2290); #2293=DIRECTION('',(0.E0,-1.E0,0.E0)); #2294=VECTOR('',#2293,5.E-1); #2295=CARTESIAN_POINT('',(1.3825E0,1.5E0,2.4E1)); #2296=LINE('',#2295,#2294); #2297=DIRECTION('',(0.E0,-1.E0,0.E0)); #2298=VECTOR('',#2297,5.E-1); #2299=CARTESIAN_POINT('',(8.675E-1,1.5E0,2.4E1)); #2300=LINE('',#2299,#2298); #2301=CARTESIAN_POINT('',(1.125E0,1.E0,2.4E1)); #2302=DIRECTION('',(0.E0,-1.E0,0.E0)); #2303=DIRECTION('',(1.E0,0.E0,0.E0)); #2304=AXIS2_PLACEMENT_3D('',#2301,#2302,#2303); #2306=CARTESIAN_POINT('',(1.125E0,1.E0,2.4E1)); #2307=DIRECTION('',(0.E0,-1.E0,0.E0)); #2308=DIRECTION('',(-1.E0,0.E0,0.E0)); #2309=AXIS2_PLACEMENT_3D('',#2306,#2307,#2308); #2311=CARTESIAN_POINT('',(1.125E0,1.E0,2.4E1)); #2312=DIRECTION('',(0.E0,-1.E0,0.E0)); #2313=DIRECTION('',(1.E0,0.E0,0.E0)); #2314=AXIS2_PLACEMENT_3D('',#2311,#2312,#2313); #2316=CARTESIAN_POINT('',(1.125E0,1.E0,2.4E1)); #2317=DIRECTION('',(0.E0,-1.E0,0.E0)); #2318=DIRECTION('',(-1.E0,0.E0,0.E0)); #2319=AXIS2_PLACEMENT_3D('',#2316,#2317,#2318); #2321=DIRECTION('',(0.E0,-1.E0,0.E0)); #2322=VECTOR('',#2321,1.E0); #2323=CARTESIAN_POINT('',(1.3175E0,1.E0,2.4E1)); #2324=LINE('',#2323,#2322); #2325=DIRECTION('',(0.E0,-1.E0,0.E0)); #2326=VECTOR('',#2325,1.E0); #2327=CARTESIAN_POINT('',(9.325E-1,1.E0,2.4E1)); #2328=LINE('',#2327,#2326); #2329=DIRECTION('',(0.E0,-1.E0,0.E0)); #2330=VECTOR('',#2329,5.E-1); #2331=CARTESIAN_POINT('',(2.31325E1,1.5E0,6.E0)); #2332=LINE('',#2331,#2330); #2333=DIRECTION('',(0.E0,-1.E0,0.E0)); #2334=VECTOR('',#2333,5.E-1); #2335=CARTESIAN_POINT('',(2.26175E1,1.5E0,6.E0)); #2336=LINE('',#2335,#2334); #2337=CARTESIAN_POINT('',(2.2875E1,1.E0,6.E0)); #2338=DIRECTION('',(0.E0,-1.E0,0.E0)); #2339=DIRECTION('',(1.E0,0.E0,0.E0)); #2340=AXIS2_PLACEMENT_3D('',#2337,#2338,#2339); #2342=CARTESIAN_POINT('',(2.2875E1,1.E0,6.E0)); #2343=DIRECTION('',(0.E0,-1.E0,0.E0)); #2344=DIRECTION('',(-1.E0,0.E0,0.E0)); #2345=AXIS2_PLACEMENT_3D('',#2342,#2343,#2344); #2347=CARTESIAN_POINT('',(2.2875E1,1.E0,6.E0)); #2348=DIRECTION('',(0.E0,-1.E0,0.E0)); #2349=DIRECTION('',(1.E0,0.E0,0.E0)); #2350=AXIS2_PLACEMENT_3D('',#2347,#2348,#2349); #2352=CARTESIAN_POINT('',(2.2875E1,1.E0,6.E0)); #2353=DIRECTION('',(0.E0,-1.E0,0.E0)); #2354=DIRECTION('',(-1.E0,0.E0,0.E0)); #2355=AXIS2_PLACEMENT_3D('',#2352,#2353,#2354); #2357=DIRECTION('',(0.E0,-1.E0,0.E0)); #2358=VECTOR('',#2357,1.E0); #2359=CARTESIAN_POINT('',(2.30675E1,1.E0,6.E0)); #2360=LINE('',#2359,#2358); #2361=DIRECTION('',(0.E0,-1.E0,0.E0)); #2362=VECTOR('',#2361,1.E0); #2363=CARTESIAN_POINT('',(2.26825E1,1.E0,6.E0)); #2364=LINE('',#2363,#2362); #2365=DIRECTION('',(0.E0,-1.E0,0.E0)); #2366=VECTOR('',#2365,5.E-1); #2367=CARTESIAN_POINT('',(2.31325E1,1.5E0,1.8E1)); #2368=LINE('',#2367,#2366); #2369=DIRECTION('',(0.E0,-1.E0,0.E0)); #2370=VECTOR('',#2369,5.E-1); #2371=CARTESIAN_POINT('',(2.26175E1,1.5E0,1.8E1)); #2372=LINE('',#2371,#2370); #2373=CARTESIAN_POINT('',(2.2875E1,1.E0,1.8E1)); #2374=DIRECTION('',(0.E0,-1.E0,0.E0)); #2375=DIRECTION('',(1.E0,0.E0,0.E0)); #2376=AXIS2_PLACEMENT_3D('',#2373,#2374,#2375); #2378=CARTESIAN_POINT('',(2.2875E1,1.E0,1.8E1)); #2379=DIRECTION('',(0.E0,-1.E0,0.E0)); #2380=DIRECTION('',(-1.E0,0.E0,0.E0)); #2381=AXIS2_PLACEMENT_3D('',#2378,#2379,#2380); #2383=CARTESIAN_POINT('',(2.2875E1,1.E0,1.8E1)); #2384=DIRECTION('',(0.E0,-1.E0,0.E0)); #2385=DIRECTION('',(1.E0,0.E0,0.E0)); #2386=AXIS2_PLACEMENT_3D('',#2383,#2384,#2385); #2388=CARTESIAN_POINT('',(2.2875E1,1.E0,1.8E1)); #2389=DIRECTION('',(0.E0,-1.E0,0.E0)); #2390=DIRECTION('',(-1.E0,0.E0,0.E0)); #2391=AXIS2_PLACEMENT_3D('',#2388,#2389,#2390); #2393=DIRECTION('',(0.E0,-1.E0,0.E0)); #2394=VECTOR('',#2393,1.E0); #2395=CARTESIAN_POINT('',(2.30675E1,1.E0,1.8E1)); #2396=LINE('',#2395,#2394); #2397=DIRECTION('',(0.E0,-1.E0,0.E0)); #2398=VECTOR('',#2397,1.E0); #2399=CARTESIAN_POINT('',(2.26825E1,1.E0,1.8E1)); #2400=LINE('',#2399,#2398); #2401=DIRECTION('',(0.E0,-1.E0,0.E0)); #2402=VECTOR('',#2401,5.E-1); #2403=CARTESIAN_POINT('',(2.31325E1,1.5E0,2.4E1)); #2404=LINE('',#2403,#2402); #2405=DIRECTION('',(0.E0,-1.E0,0.E0)); #2406=VECTOR('',#2405,5.E-1); #2407=CARTESIAN_POINT('',(2.26175E1,1.5E0,2.4E1)); #2408=LINE('',#2407,#2406); #2409=CARTESIAN_POINT('',(2.2875E1,1.E0,2.4E1)); #2410=DIRECTION('',(0.E0,-1.E0,0.E0)); #2411=DIRECTION('',(1.E0,0.E0,0.E0)); #2412=AXIS2_PLACEMENT_3D('',#2409,#2410,#2411); #2414=CARTESIAN_POINT('',(2.2875E1,1.E0,2.4E1)); #2415=DIRECTION('',(0.E0,-1.E0,0.E0)); #2416=DIRECTION('',(-1.E0,0.E0,0.E0)); #2417=AXIS2_PLACEMENT_3D('',#2414,#2415,#2416); #2419=CARTESIAN_POINT('',(2.2875E1,1.E0,2.4E1)); #2420=DIRECTION('',(0.E0,-1.E0,0.E0)); #2421=DIRECTION('',(1.E0,0.E0,0.E0)); #2422=AXIS2_PLACEMENT_3D('',#2419,#2420,#2421); #2424=CARTESIAN_POINT('',(2.2875E1,1.E0,2.4E1)); #2425=DIRECTION('',(0.E0,-1.E0,0.E0)); #2426=DIRECTION('',(-1.E0,0.E0,0.E0)); #2427=AXIS2_PLACEMENT_3D('',#2424,#2425,#2426); #2429=DIRECTION('',(0.E0,-1.E0,0.E0)); #2430=VECTOR('',#2429,1.E0); #2431=CARTESIAN_POINT('',(2.30675E1,1.E0,2.4E1)); #2432=LINE('',#2431,#2430); #2433=DIRECTION('',(0.E0,-1.E0,0.E0)); #2434=VECTOR('',#2433,1.E0); #2435=CARTESIAN_POINT('',(2.26825E1,1.E0,2.4E1)); #2436=LINE('',#2435,#2434); #2437=DIRECTION('',(0.E0,-1.E0,0.E0)); #2438=VECTOR('',#2437,5.E-1); #2439=CARTESIAN_POINT('',(6.256E0,1.5E0,1.25E0)); #2440=LINE('',#2439,#2438); #2441=DIRECTION('',(0.E0,-1.E0,0.E0)); #2442=VECTOR('',#2441,5.E-1); #2443=CARTESIAN_POINT('',(5.744E0,1.5E0,1.25E0)); #2444=LINE('',#2443,#2442); #2445=CARTESIAN_POINT('',(6.E0,1.E0,1.25E0)); #2446=DIRECTION('',(0.E0,-1.E0,0.E0)); #2447=DIRECTION('',(1.E0,0.E0,0.E0)); #2448=AXIS2_PLACEMENT_3D('',#2445,#2446,#2447); #2450=CARTESIAN_POINT('',(6.E0,1.E0,1.25E0)); #2451=DIRECTION('',(0.E0,-1.E0,0.E0)); #2452=DIRECTION('',(-1.E0,0.E0,0.E0)); #2453=AXIS2_PLACEMENT_3D('',#2450,#2451,#2452); #2455=CARTESIAN_POINT('',(6.E0,1.E0,1.25E0)); #2456=DIRECTION('',(0.E0,-1.E0,0.E0)); #2457=DIRECTION('',(1.E0,0.E0,0.E0)); #2458=AXIS2_PLACEMENT_3D('',#2455,#2456,#2457); #2460=CARTESIAN_POINT('',(6.E0,1.E0,1.25E0)); #2461=DIRECTION('',(0.E0,-1.E0,0.E0)); #2462=DIRECTION('',(-1.E0,0.E0,0.E0)); #2463=AXIS2_PLACEMENT_3D('',#2460,#2461,#2462); #2465=DIRECTION('',(0.E0,-1.E0,0.E0)); #2466=VECTOR('',#2465,1.E0); #2467=CARTESIAN_POINT('',(6.1925E0,1.E0,1.25E0)); #2468=LINE('',#2467,#2466); #2469=DIRECTION('',(0.E0,-1.E0,0.E0)); #2470=VECTOR('',#2469,1.E0); #2471=CARTESIAN_POINT('',(5.8075E0,1.E0,1.25E0)); #2472=LINE('',#2471,#2470); #2473=DIRECTION('',(0.E0,-1.E0,0.E0)); #2474=VECTOR('',#2473,5.E-1); #2475=CARTESIAN_POINT('',(1.2256E1,1.5E0,1.25E0)); #2476=LINE('',#2475,#2474); #2477=DIRECTION('',(0.E0,-1.E0,0.E0)); #2478=VECTOR('',#2477,5.E-1); #2479=CARTESIAN_POINT('',(1.1744E1,1.5E0,1.25E0)); #2480=LINE('',#2479,#2478); #2481=CARTESIAN_POINT('',(1.2E1,1.E0,1.25E0)); #2482=DIRECTION('',(0.E0,-1.E0,0.E0)); #2483=DIRECTION('',(1.E0,0.E0,0.E0)); #2484=AXIS2_PLACEMENT_3D('',#2481,#2482,#2483); #2486=CARTESIAN_POINT('',(1.2E1,1.E0,1.25E0)); #2487=DIRECTION('',(0.E0,-1.E0,0.E0)); #2488=DIRECTION('',(-1.E0,0.E0,0.E0)); #2489=AXIS2_PLACEMENT_3D('',#2486,#2487,#2488); #2491=CARTESIAN_POINT('',(1.2E1,1.E0,1.25E0)); #2492=DIRECTION('',(0.E0,-1.E0,0.E0)); #2493=DIRECTION('',(1.E0,0.E0,0.E0)); #2494=AXIS2_PLACEMENT_3D('',#2491,#2492,#2493); #2496=CARTESIAN_POINT('',(1.2E1,1.E0,1.25E0)); #2497=DIRECTION('',(0.E0,-1.E0,0.E0)); #2498=DIRECTION('',(-1.E0,0.E0,0.E0)); #2499=AXIS2_PLACEMENT_3D('',#2496,#2497,#2498); #2501=DIRECTION('',(0.E0,-1.E0,0.E0)); #2502=VECTOR('',#2501,1.E0); #2503=CARTESIAN_POINT('',(1.21925E1,1.E0,1.25E0)); #2504=LINE('',#2503,#2502); #2505=DIRECTION('',(0.E0,-1.E0,0.E0)); #2506=VECTOR('',#2505,1.E0); #2507=CARTESIAN_POINT('',(1.18075E1,1.E0,1.25E0)); #2508=LINE('',#2507,#2506); #2509=DIRECTION('',(0.E0,-1.E0,0.E0)); #2510=VECTOR('',#2509,5.E-1); #2511=CARTESIAN_POINT('',(1.8256E1,1.5E0,1.25E0)); #2512=LINE('',#2511,#2510); #2513=DIRECTION('',(0.E0,-1.E0,0.E0)); #2514=VECTOR('',#2513,5.E-1); #2515=CARTESIAN_POINT('',(1.7744E1,1.5E0,1.25E0)); #2516=LINE('',#2515,#2514); #2517=CARTESIAN_POINT('',(1.8E1,1.E0,1.25E0)); #2518=DIRECTION('',(0.E0,-1.E0,0.E0)); #2519=DIRECTION('',(1.E0,0.E0,0.E0)); #2520=AXIS2_PLACEMENT_3D('',#2517,#2518,#2519); #2522=CARTESIAN_POINT('',(1.8E1,1.E0,1.25E0)); #2523=DIRECTION('',(0.E0,-1.E0,0.E0)); #2524=DIRECTION('',(-1.E0,0.E0,0.E0)); #2525=AXIS2_PLACEMENT_3D('',#2522,#2523,#2524); #2527=CARTESIAN_POINT('',(1.8E1,1.E0,1.25E0)); #2528=DIRECTION('',(0.E0,-1.E0,0.E0)); #2529=DIRECTION('',(1.E0,0.E0,0.E0)); #2530=AXIS2_PLACEMENT_3D('',#2527,#2528,#2529); #2532=CARTESIAN_POINT('',(1.8E1,1.E0,1.25E0)); #2533=DIRECTION('',(0.E0,-1.E0,0.E0)); #2534=DIRECTION('',(-1.E0,0.E0,0.E0)); #2535=AXIS2_PLACEMENT_3D('',#2532,#2533,#2534); #2537=DIRECTION('',(0.E0,-1.E0,0.E0)); #2538=VECTOR('',#2537,1.E0); #2539=CARTESIAN_POINT('',(1.81925E1,1.E0,1.25E0)); #2540=LINE('',#2539,#2538); #2541=DIRECTION('',(0.E0,-1.E0,0.E0)); #2542=VECTOR('',#2541,1.E0); #2543=CARTESIAN_POINT('',(1.78075E1,1.E0,1.25E0)); #2544=LINE('',#2543,#2542); #2545=DIRECTION('',(0.E0,-1.E0,0.E0)); #2546=VECTOR('',#2545,5.E-1); #2547=CARTESIAN_POINT('',(6.256E0,1.5E0,3.075E1)); #2548=LINE('',#2547,#2546); #2549=DIRECTION('',(0.E0,-1.E0,0.E0)); #2550=VECTOR('',#2549,5.E-1); #2551=CARTESIAN_POINT('',(5.744E0,1.5E0,3.075E1)); #2552=LINE('',#2551,#2550); #2553=CARTESIAN_POINT('',(6.E0,1.E0,3.075E1)); #2554=DIRECTION('',(0.E0,-1.E0,0.E0)); #2555=DIRECTION('',(1.E0,0.E0,0.E0)); #2556=AXIS2_PLACEMENT_3D('',#2553,#2554,#2555); #2558=CARTESIAN_POINT('',(6.E0,1.E0,3.075E1)); #2559=DIRECTION('',(0.E0,-1.E0,0.E0)); #2560=DIRECTION('',(-1.E0,0.E0,0.E0)); #2561=AXIS2_PLACEMENT_3D('',#2558,#2559,#2560); #2563=CARTESIAN_POINT('',(6.E0,1.E0,3.075E1)); #2564=DIRECTION('',(0.E0,-1.E0,0.E0)); #2565=DIRECTION('',(1.E0,0.E0,0.E0)); #2566=AXIS2_PLACEMENT_3D('',#2563,#2564,#2565); #2568=CARTESIAN_POINT('',(6.E0,1.E0,3.075E1)); #2569=DIRECTION('',(0.E0,-1.E0,0.E0)); #2570=DIRECTION('',(-1.E0,0.E0,0.E0)); #2571=AXIS2_PLACEMENT_3D('',#2568,#2569,#2570); #2573=DIRECTION('',(0.E0,-1.E0,0.E0)); #2574=VECTOR('',#2573,1.E0); #2575=CARTESIAN_POINT('',(6.1925E0,1.E0,3.075E1)); #2576=LINE('',#2575,#2574); #2577=DIRECTION('',(0.E0,-1.E0,0.E0)); #2578=VECTOR('',#2577,1.E0); #2579=CARTESIAN_POINT('',(5.8075E0,1.E0,3.075E1)); #2580=LINE('',#2579,#2578); #2581=DIRECTION('',(0.E0,-1.E0,0.E0)); #2582=VECTOR('',#2581,5.E-1); #2583=CARTESIAN_POINT('',(1.2256E1,1.5E0,3.075E1)); #2584=LINE('',#2583,#2582); #2585=DIRECTION('',(0.E0,-1.E0,0.E0)); #2586=VECTOR('',#2585,5.E-1); #2587=CARTESIAN_POINT('',(1.1744E1,1.5E0,3.075E1)); #2588=LINE('',#2587,#2586); #2589=CARTESIAN_POINT('',(1.2E1,1.E0,3.075E1)); #2590=DIRECTION('',(0.E0,-1.E0,0.E0)); #2591=DIRECTION('',(1.E0,0.E0,0.E0)); #2592=AXIS2_PLACEMENT_3D('',#2589,#2590,#2591); #2594=CARTESIAN_POINT('',(1.2E1,1.E0,3.075E1)); #2595=DIRECTION('',(0.E0,-1.E0,0.E0)); #2596=DIRECTION('',(-1.E0,0.E0,0.E0)); #2597=AXIS2_PLACEMENT_3D('',#2594,#2595,#2596); #2599=CARTESIAN_POINT('',(1.2E1,1.E0,3.075E1)); #2600=DIRECTION('',(0.E0,-1.E0,0.E0)); #2601=DIRECTION('',(1.E0,0.E0,0.E0)); #2602=AXIS2_PLACEMENT_3D('',#2599,#2600,#2601); #2604=CARTESIAN_POINT('',(1.2E1,1.E0,3.075E1)); #2605=DIRECTION('',(0.E0,-1.E0,0.E0)); #2606=DIRECTION('',(-1.E0,0.E0,0.E0)); #2607=AXIS2_PLACEMENT_3D('',#2604,#2605,#2606); #2609=DIRECTION('',(0.E0,-1.E0,0.E0)); #2610=VECTOR('',#2609,1.E0); #2611=CARTESIAN_POINT('',(1.21925E1,1.E0,3.075E1)); #2612=LINE('',#2611,#2610); #2613=DIRECTION('',(0.E0,-1.E0,0.E0)); #2614=VECTOR('',#2613,1.E0); #2615=CARTESIAN_POINT('',(1.18075E1,1.E0,3.075E1)); #2616=LINE('',#2615,#2614); #2617=DIRECTION('',(0.E0,-1.E0,0.E0)); #2618=VECTOR('',#2617,5.E-1); #2619=CARTESIAN_POINT('',(1.8256E1,1.5E0,3.075E1)); #2620=LINE('',#2619,#2618); #2621=DIRECTION('',(0.E0,-1.E0,0.E0)); #2622=VECTOR('',#2621,5.E-1); #2623=CARTESIAN_POINT('',(1.7744E1,1.5E0,3.075E1)); #2624=LINE('',#2623,#2622); #2625=CARTESIAN_POINT('',(1.8E1,1.E0,3.075E1)); #2626=DIRECTION('',(0.E0,-1.E0,0.E0)); #2627=DIRECTION('',(1.E0,0.E0,0.E0)); #2628=AXIS2_PLACEMENT_3D('',#2625,#2626,#2627); #2630=CARTESIAN_POINT('',(1.8E1,1.E0,3.075E1)); #2631=DIRECTION('',(0.E0,-1.E0,0.E0)); #2632=DIRECTION('',(-1.E0,0.E0,0.E0)); #2633=AXIS2_PLACEMENT_3D('',#2630,#2631,#2632); #2635=CARTESIAN_POINT('',(1.8E1,1.E0,3.075E1)); #2636=DIRECTION('',(0.E0,-1.E0,0.E0)); #2637=DIRECTION('',(1.E0,0.E0,0.E0)); #2638=AXIS2_PLACEMENT_3D('',#2635,#2636,#2637); #2640=CARTESIAN_POINT('',(1.8E1,1.E0,3.075E1)); #2641=DIRECTION('',(0.E0,-1.E0,0.E0)); #2642=DIRECTION('',(-1.E0,0.E0,0.E0)); #2643=AXIS2_PLACEMENT_3D('',#2640,#2641,#2642); #2645=DIRECTION('',(0.E0,-1.E0,0.E0)); #2646=VECTOR('',#2645,1.E0); #2647=CARTESIAN_POINT('',(1.81925E1,1.E0,3.075E1)); #2648=LINE('',#2647,#2646); #2649=DIRECTION('',(0.E0,-1.E0,0.E0)); #2650=VECTOR('',#2649,1.E0); #2651=CARTESIAN_POINT('',(1.78075E1,1.E0,3.075E1)); #2652=LINE('',#2651,#2650); #2653=DIRECTION('',(0.E0,-1.E0,0.E0)); #2654=VECTOR('',#2653,5.E-1); #2655=CARTESIAN_POINT('',(6.2575E0,1.5E0,9.E0)); #2656=LINE('',#2655,#2654); #2657=DIRECTION('',(0.E0,-1.E0,0.E0)); #2658=VECTOR('',#2657,5.E-1); #2659=CARTESIAN_POINT('',(5.7425E0,1.5E0,9.E0)); #2660=LINE('',#2659,#2658); #2661=CARTESIAN_POINT('',(6.E0,1.E0,9.E0)); #2662=DIRECTION('',(0.E0,-1.E0,0.E0)); #2663=DIRECTION('',(1.E0,0.E0,0.E0)); #2664=AXIS2_PLACEMENT_3D('',#2661,#2662,#2663); #2666=CARTESIAN_POINT('',(6.E0,1.E0,9.E0)); #2667=DIRECTION('',(0.E0,-1.E0,0.E0)); #2668=DIRECTION('',(-1.E0,0.E0,0.E0)); #2669=AXIS2_PLACEMENT_3D('',#2666,#2667,#2668); #2671=CARTESIAN_POINT('',(6.E0,1.E0,9.E0)); #2672=DIRECTION('',(0.E0,-1.E0,0.E0)); #2673=DIRECTION('',(1.E0,0.E0,0.E0)); #2674=AXIS2_PLACEMENT_3D('',#2671,#2672,#2673); #2676=CARTESIAN_POINT('',(6.E0,1.E0,9.E0)); #2677=DIRECTION('',(0.E0,-1.E0,0.E0)); #2678=DIRECTION('',(-1.E0,0.E0,0.E0)); #2679=AXIS2_PLACEMENT_3D('',#2676,#2677,#2678); #2681=DIRECTION('',(0.E0,-1.E0,0.E0)); #2682=VECTOR('',#2681,1.E0); #2683=CARTESIAN_POINT('',(6.1925E0,1.E0,9.E0)); #2684=LINE('',#2683,#2682); #2685=DIRECTION('',(0.E0,-1.E0,0.E0)); #2686=VECTOR('',#2685,1.E0); #2687=CARTESIAN_POINT('',(5.8075E0,1.E0,9.E0)); #2688=LINE('',#2687,#2686); #2689=DIRECTION('',(0.E0,-1.E0,0.E0)); #2690=VECTOR('',#2689,5.E-1); #2691=CARTESIAN_POINT('',(1.22575E1,1.5E0,9.E0)); #2692=LINE('',#2691,#2690); #2693=DIRECTION('',(0.E0,-1.E0,0.E0)); #2694=VECTOR('',#2693,5.E-1); #2695=CARTESIAN_POINT('',(1.17425E1,1.5E0,9.E0)); #2696=LINE('',#2695,#2694); #2697=CARTESIAN_POINT('',(1.2E1,1.E0,9.E0)); #2698=DIRECTION('',(0.E0,-1.E0,0.E0)); #2699=DIRECTION('',(1.E0,0.E0,0.E0)); #2700=AXIS2_PLACEMENT_3D('',#2697,#2698,#2699); #2702=CARTESIAN_POINT('',(1.2E1,1.E0,9.E0)); #2703=DIRECTION('',(0.E0,-1.E0,0.E0)); #2704=DIRECTION('',(-1.E0,0.E0,0.E0)); #2705=AXIS2_PLACEMENT_3D('',#2702,#2703,#2704); #2707=CARTESIAN_POINT('',(1.2E1,1.E0,9.E0)); #2708=DIRECTION('',(0.E0,-1.E0,0.E0)); #2709=DIRECTION('',(1.E0,0.E0,0.E0)); #2710=AXIS2_PLACEMENT_3D('',#2707,#2708,#2709); #2712=CARTESIAN_POINT('',(1.2E1,1.E0,9.E0)); #2713=DIRECTION('',(0.E0,-1.E0,0.E0)); #2714=DIRECTION('',(-1.E0,0.E0,0.E0)); #2715=AXIS2_PLACEMENT_3D('',#2712,#2713,#2714); #2717=DIRECTION('',(0.E0,-1.E0,0.E0)); #2718=VECTOR('',#2717,1.E0); #2719=CARTESIAN_POINT('',(1.21925E1,1.E0,9.E0)); #2720=LINE('',#2719,#2718); #2721=DIRECTION('',(0.E0,-1.E0,0.E0)); #2722=VECTOR('',#2721,1.E0); #2723=CARTESIAN_POINT('',(1.18075E1,1.E0,9.E0)); #2724=LINE('',#2723,#2722); #2725=DIRECTION('',(0.E0,-1.E0,0.E0)); #2726=VECTOR('',#2725,5.E-1); #2727=CARTESIAN_POINT('',(1.82575E1,1.5E0,9.E0)); #2728=LINE('',#2727,#2726); #2729=DIRECTION('',(0.E0,-1.E0,0.E0)); #2730=VECTOR('',#2729,5.E-1); #2731=CARTESIAN_POINT('',(1.77425E1,1.5E0,9.E0)); #2732=LINE('',#2731,#2730); #2733=CARTESIAN_POINT('',(1.8E1,1.E0,9.E0)); #2734=DIRECTION('',(0.E0,-1.E0,0.E0)); #2735=DIRECTION('',(1.E0,0.E0,0.E0)); #2736=AXIS2_PLACEMENT_3D('',#2733,#2734,#2735); #2738=CARTESIAN_POINT('',(1.8E1,1.E0,9.E0)); #2739=DIRECTION('',(0.E0,-1.E0,0.E0)); #2740=DIRECTION('',(-1.E0,0.E0,0.E0)); #2741=AXIS2_PLACEMENT_3D('',#2738,#2739,#2740); #2743=CARTESIAN_POINT('',(1.8E1,1.E0,9.E0)); #2744=DIRECTION('',(0.E0,-1.E0,0.E0)); #2745=DIRECTION('',(1.E0,0.E0,0.E0)); #2746=AXIS2_PLACEMENT_3D('',#2743,#2744,#2745); #2748=CARTESIAN_POINT('',(1.8E1,1.E0,9.E0)); #2749=DIRECTION('',(0.E0,-1.E0,0.E0)); #2750=DIRECTION('',(-1.E0,0.E0,0.E0)); #2751=AXIS2_PLACEMENT_3D('',#2748,#2749,#2750); #2753=DIRECTION('',(0.E0,-1.E0,0.E0)); #2754=VECTOR('',#2753,1.E0); #2755=CARTESIAN_POINT('',(1.81925E1,1.E0,9.E0)); #2756=LINE('',#2755,#2754); #2757=DIRECTION('',(0.E0,-1.E0,0.E0)); #2758=VECTOR('',#2757,1.E0); #2759=CARTESIAN_POINT('',(1.78075E1,1.E0,9.E0)); #2760=LINE('',#2759,#2758); #2761=DIRECTION('',(0.E0,-1.E0,0.E0)); #2762=VECTOR('',#2761,5.E-1); #2763=CARTESIAN_POINT('',(6.2575E0,1.5E0,1.8E1)); #2764=LINE('',#2763,#2762); #2765=DIRECTION('',(0.E0,-1.E0,0.E0)); #2766=VECTOR('',#2765,5.E-1); #2767=CARTESIAN_POINT('',(5.7425E0,1.5E0,1.8E1)); #2768=LINE('',#2767,#2766); #2769=CARTESIAN_POINT('',(6.E0,1.E0,1.8E1)); #2770=DIRECTION('',(0.E0,-1.E0,0.E0)); #2771=DIRECTION('',(1.E0,0.E0,0.E0)); #2772=AXIS2_PLACEMENT_3D('',#2769,#2770,#2771); #2774=CARTESIAN_POINT('',(6.E0,1.E0,1.8E1)); #2775=DIRECTION('',(0.E0,-1.E0,0.E0)); #2776=DIRECTION('',(-1.E0,0.E0,0.E0)); #2777=AXIS2_PLACEMENT_3D('',#2774,#2775,#2776); #2779=CARTESIAN_POINT('',(6.E0,1.E0,1.8E1)); #2780=DIRECTION('',(0.E0,-1.E0,0.E0)); #2781=DIRECTION('',(1.E0,0.E0,0.E0)); #2782=AXIS2_PLACEMENT_3D('',#2779,#2780,#2781); #2784=CARTESIAN_POINT('',(6.E0,1.E0,1.8E1)); #2785=DIRECTION('',(0.E0,-1.E0,0.E0)); #2786=DIRECTION('',(-1.E0,0.E0,0.E0)); #2787=AXIS2_PLACEMENT_3D('',#2784,#2785,#2786); #2789=DIRECTION('',(0.E0,-1.E0,0.E0)); #2790=VECTOR('',#2789,1.E0); #2791=CARTESIAN_POINT('',(6.1925E0,1.E0,1.8E1)); #2792=LINE('',#2791,#2790); #2793=DIRECTION('',(0.E0,-1.E0,0.E0)); #2794=VECTOR('',#2793,1.E0); #2795=CARTESIAN_POINT('',(5.8075E0,1.E0,1.8E1)); #2796=LINE('',#2795,#2794); #2797=DIRECTION('',(0.E0,-1.E0,0.E0)); #2798=VECTOR('',#2797,5.E-1); #2799=CARTESIAN_POINT('',(1.22575E1,1.5E0,1.8E1)); #2800=LINE('',#2799,#2798); #2801=DIRECTION('',(0.E0,-1.E0,0.E0)); #2802=VECTOR('',#2801,5.E-1); #2803=CARTESIAN_POINT('',(1.17425E1,1.5E0,1.8E1)); #2804=LINE('',#2803,#2802); #2805=CARTESIAN_POINT('',(1.2E1,1.E0,1.8E1)); #2806=DIRECTION('',(0.E0,-1.E0,0.E0)); #2807=DIRECTION('',(1.E0,0.E0,0.E0)); #2808=AXIS2_PLACEMENT_3D('',#2805,#2806,#2807); #2810=CARTESIAN_POINT('',(1.2E1,1.E0,1.8E1)); #2811=DIRECTION('',(0.E0,-1.E0,0.E0)); #2812=DIRECTION('',(-1.E0,0.E0,0.E0)); #2813=AXIS2_PLACEMENT_3D('',#2810,#2811,#2812); #2815=CARTESIAN_POINT('',(1.2E1,1.E0,1.8E1)); #2816=DIRECTION('',(0.E0,-1.E0,0.E0)); #2817=DIRECTION('',(1.E0,0.E0,0.E0)); #2818=AXIS2_PLACEMENT_3D('',#2815,#2816,#2817); #2820=CARTESIAN_POINT('',(1.2E1,1.E0,1.8E1)); #2821=DIRECTION('',(0.E0,-1.E0,0.E0)); #2822=DIRECTION('',(-1.E0,0.E0,0.E0)); #2823=AXIS2_PLACEMENT_3D('',#2820,#2821,#2822); #2825=DIRECTION('',(0.E0,-1.E0,0.E0)); #2826=VECTOR('',#2825,1.E0); #2827=CARTESIAN_POINT('',(1.21925E1,1.E0,1.8E1)); #2828=LINE('',#2827,#2826); #2829=DIRECTION('',(0.E0,-1.E0,0.E0)); #2830=VECTOR('',#2829,1.E0); #2831=CARTESIAN_POINT('',(1.18075E1,1.E0,1.8E1)); #2832=LINE('',#2831,#2830); #2833=DIRECTION('',(0.E0,-1.E0,0.E0)); #2834=VECTOR('',#2833,5.E-1); #2835=CARTESIAN_POINT('',(1.82575E1,1.5E0,1.8E1)); #2836=LINE('',#2835,#2834); #2837=DIRECTION('',(0.E0,-1.E0,0.E0)); #2838=VECTOR('',#2837,5.E-1); #2839=CARTESIAN_POINT('',(1.77425E1,1.5E0,1.8E1)); #2840=LINE('',#2839,#2838); #2841=CARTESIAN_POINT('',(1.8E1,1.E0,1.8E1)); #2842=DIRECTION('',(0.E0,-1.E0,0.E0)); #2843=DIRECTION('',(1.E0,0.E0,0.E0)); #2844=AXIS2_PLACEMENT_3D('',#2841,#2842,#2843); #2846=CARTESIAN_POINT('',(1.8E1,1.E0,1.8E1)); #2847=DIRECTION('',(0.E0,-1.E0,0.E0)); #2848=DIRECTION('',(-1.E0,0.E0,0.E0)); #2849=AXIS2_PLACEMENT_3D('',#2846,#2847,#2848); #2851=CARTESIAN_POINT('',(1.8E1,1.E0,1.8E1)); #2852=DIRECTION('',(0.E0,-1.E0,0.E0)); #2853=DIRECTION('',(1.E0,0.E0,0.E0)); #2854=AXIS2_PLACEMENT_3D('',#2851,#2852,#2853); #2856=CARTESIAN_POINT('',(1.8E1,1.E0,1.8E1)); #2857=DIRECTION('',(0.E0,-1.E0,0.E0)); #2858=DIRECTION('',(-1.E0,0.E0,0.E0)); #2859=AXIS2_PLACEMENT_3D('',#2856,#2857,#2858); #2861=DIRECTION('',(0.E0,-1.E0,0.E0)); #2862=VECTOR('',#2861,1.E0); #2863=CARTESIAN_POINT('',(1.81925E1,1.E0,1.8E1)); #2864=LINE('',#2863,#2862); #2865=DIRECTION('',(0.E0,-1.E0,0.E0)); #2866=VECTOR('',#2865,1.E0); #2867=CARTESIAN_POINT('',(1.78075E1,1.E0,1.8E1)); #2868=LINE('',#2867,#2866); #2869=DIRECTION('',(0.E0,-8.660254037844E-1,5.E-1)); #2870=VECTOR('',#2869,5.773502691896E0); #2871=CARTESIAN_POINT('',(2.2E1,6.5E0,1.E1)); #2872=LINE('',#2871,#2870); #2873=CARTESIAN_POINT('',(2.31325E1,3.035898384862E0,1.2E1)); #2874=CARTESIAN_POINT('',(2.31325E1,2.930774450068E0,1.206069333205E1)); #2875=CARTESIAN_POINT('',(2.309416136180E1,2.745461691651E0,1.216768370301E1)); #2876=CARTESIAN_POINT('',(2.297013771881E1,2.608885438662E0,1.224653603944E1)); #2877=CARTESIAN_POINT('',(2.2875E1,2.580400233539E0,1.226298198028E1)); #2878=CARTESIAN_POINT('',(2.277986228119E1,2.608885438662E0,1.224653603944E1)); #2879=CARTESIAN_POINT('',(2.265583863820E1,2.745461691651E0,1.216768370301E1)); #2880=CARTESIAN_POINT('',(2.26175E1,2.930774450068E0,1.206069333205E1)); #2881=CARTESIAN_POINT('',(2.26175E1,3.035898384862E0,1.2E1)); #2883=CARTESIAN_POINT('',(2.26175E1,3.035898384862E0,1.2E1)); #2884=CARTESIAN_POINT('',(2.26175E1,3.141022319657E0,1.193930666795E1)); #2885=CARTESIAN_POINT('',(2.265583863820E1,3.326335078073E0,1.183231629699E1)); #2886=CARTESIAN_POINT('',(2.277986228119E1,3.462911331062E0,1.175346396056E1)); #2887=CARTESIAN_POINT('',(2.2875E1,3.491396536186E0,1.173701801972E1)); #2888=CARTESIAN_POINT('',(2.297013771881E1,3.462911331062E0,1.175346396056E1)); #2889=CARTESIAN_POINT('',(2.309416136180E1,3.326335078073E0,1.183231629699E1)); #2890=CARTESIAN_POINT('',(2.31325E1,3.141022319657E0,1.193930666795E1)); #2891=CARTESIAN_POINT('',(2.31325E1,3.035898384862E0,1.2E1)); #2893=DIRECTION('',(0.E0,1.E0,0.E0)); #2894=VECTOR('',#2893,2.035898384862E0); #2895=CARTESIAN_POINT('',(2.26175E1,1.E0,1.2E1)); #2896=LINE('',#2895,#2894); #2897=DIRECTION('',(0.E0,-1.E0,0.E0)); #2898=VECTOR('',#2897,2.035898384862E0); #2899=CARTESIAN_POINT('',(2.31325E1,3.035898384862E0,1.2E1)); #2900=LINE('',#2899,#2898); #2901=CARTESIAN_POINT('',(2.2875E1,1.E0,1.2E1)); #2902=DIRECTION('',(0.E0,-1.E0,0.E0)); #2903=DIRECTION('',(1.E0,0.E0,0.E0)); #2904=AXIS2_PLACEMENT_3D('',#2901,#2902,#2903); #2906=CARTESIAN_POINT('',(2.2875E1,1.E0,1.2E1)); #2907=DIRECTION('',(0.E0,-1.E0,0.E0)); #2908=DIRECTION('',(-1.E0,0.E0,0.E0)); #2909=AXIS2_PLACEMENT_3D('',#2906,#2907,#2908); #2911=CARTESIAN_POINT('',(2.2875E1,1.E0,1.2E1)); #2912=DIRECTION('',(0.E0,-1.E0,0.E0)); #2913=DIRECTION('',(1.E0,0.E0,0.E0)); #2914=AXIS2_PLACEMENT_3D('',#2911,#2912,#2913); #2916=CARTESIAN_POINT('',(2.2875E1,1.E0,1.2E1)); #2917=DIRECTION('',(0.E0,-1.E0,0.E0)); #2918=DIRECTION('',(-1.E0,0.E0,0.E0)); #2919=AXIS2_PLACEMENT_3D('',#2916,#2917,#2918); #2921=DIRECTION('',(0.E0,-1.E0,0.E0)); #2922=VECTOR('',#2921,1.E0); #2923=CARTESIAN_POINT('',(2.30675E1,1.E0,1.2E1)); #2924=LINE('',#2923,#2922); #2925=DIRECTION('',(0.E0,-1.E0,0.E0)); #2926=VECTOR('',#2925,1.E0); #2927=CARTESIAN_POINT('',(2.26825E1,1.E0,1.2E1)); #2928=LINE('',#2927,#2926); #2929=DIRECTION('',(0.E0,0.E0,-1.E0)); #2930=VECTOR('',#2929,5.E-1); #2931=CARTESIAN_POINT('',(2.15E1,6.65E0,1.E1)); #2932=LINE('',#2931,#2930); #2933=CARTESIAN_POINT('',(2.185E1,6.65E0,9.5E0)); #2934=DIRECTION('',(0.E0,0.E0,-1.E0)); #2935=DIRECTION('',(-1.E0,0.E0,0.E0)); #2936=AXIS2_PLACEMENT_3D('',#2933,#2934,#2935); #2938=DIRECTION('',(0.E0,0.E0,-1.E0)); #2939=VECTOR('',#2938,5.E-1); #2940=CARTESIAN_POINT('',(2.185E1,7.E0,1.E1)); #2941=LINE('',#2940,#2939); #2942=CARTESIAN_POINT('',(2.185E1,6.65E0,1.E1)); #2943=DIRECTION('',(0.E0,0.E0,1.E0)); #2944=DIRECTION('',(1.015061051086E-14,1.E0,0.E0)); #2945=AXIS2_PLACEMENT_3D('',#2942,#2943,#2944); #2947=DIRECTION('',(0.E0,0.E0,1.E0)); #2948=VECTOR('',#2947,5.E-1); #2949=CARTESIAN_POINT('',(2.115E1,2.E0,9.5E0)); #2950=LINE('',#2949,#2948); #2951=CARTESIAN_POINT('',(2.115E1,2.35E0,9.5E0)); #2952=DIRECTION('',(0.E0,0.E0,1.E0)); #2953=DIRECTION('',(0.E0,-1.E0,0.E0)); #2954=AXIS2_PLACEMENT_3D('',#2951,#2952,#2953); #2956=DIRECTION('',(0.E0,0.E0,1.E0)); #2957=VECTOR('',#2956,5.E-1); #2958=CARTESIAN_POINT('',(2.15E1,2.35E0,9.5E0)); #2959=LINE('',#2958,#2957); #2960=CARTESIAN_POINT('',(2.115E1,2.35E0,1.E1)); #2961=DIRECTION('',(0.E0,0.E0,-1.E0)); #2962=DIRECTION('',(1.E0,0.E0,0.E0)); #2963=AXIS2_PLACEMENT_3D('',#2960,#2961,#2962); #2965=DIRECTION('',(0.E0,0.E0,1.E0)); #2966=VECTOR('',#2965,5.E-1); #2967=CARTESIAN_POINT('',(1.95E1,2.35E0,9.5E0)); #2968=LINE('',#2967,#2966); #2969=CARTESIAN_POINT('',(1.985E1,2.35E0,9.5E0)); #2970=DIRECTION('',(0.E0,0.E0,1.E0)); #2971=DIRECTION('',(-1.E0,0.E0,0.E0)); #2972=AXIS2_PLACEMENT_3D('',#2969,#2970,#2971); #2974=DIRECTION('',(0.E0,0.E0,1.E0)); #2975=VECTOR('',#2974,5.E-1); #2976=CARTESIAN_POINT('',(1.985E1,2.E0,9.5E0)); #2977=LINE('',#2976,#2975); #2978=CARTESIAN_POINT('',(1.985E1,2.35E0,1.E1)); #2979=DIRECTION('',(0.E0,0.E0,-1.E0)); #2980=DIRECTION('',(1.015061051086E-14,-1.E0,0.E0)); #2981=AXIS2_PLACEMENT_3D('',#2978,#2979,#2980); #2983=DIRECTION('',(0.E0,0.E0,1.E0)); #2984=VECTOR('',#2983,5.E-1); #2985=CARTESIAN_POINT('',(1.985E1,9.5E0,9.5E0)); #2986=LINE('',#2985,#2984); #2987=CARTESIAN_POINT('',(1.985E1,9.15E0,9.5E0)); #2988=DIRECTION('',(0.E0,0.E0,1.E0)); #2989=DIRECTION('',(1.015061051086E-14,1.E0,0.E0)); #2990=AXIS2_PLACEMENT_3D('',#2987,#2988,#2989); #2992=DIRECTION('',(0.E0,0.E0,1.E0)); #2993=VECTOR('',#2992,5.E-1); #2994=CARTESIAN_POINT('',(1.95E1,9.15E0,9.5E0)); #2995=LINE('',#2994,#2993); #2996=CARTESIAN_POINT('',(1.985E1,9.15E0,1.E1)); #2997=DIRECTION('',(0.E0,0.E0,-1.E0)); #2998=DIRECTION('',(-1.E0,0.E0,0.E0)); #2999=AXIS2_PLACEMENT_3D('',#2996,#2997,#2998); #3001=DIRECTION('',(0.E0,0.E0,1.E0)); #3002=VECTOR('',#3001,5.E-1); #3003=CARTESIAN_POINT('',(2.135315580719E1,9.319975025913E0,9.5E0)); #3004=LINE('',#3003,#3002); #3005=CARTESIAN_POINT('',(2.104720076055E1,9.15E0,9.5E0)); #3006=DIRECTION('',(0.E0,0.E0,1.E0)); #3007=DIRECTION('',(8.741572761215E-1,4.856429311786E-1,0.E0)); #3008=AXIS2_PLACEMENT_3D('',#3005,#3006,#3007); #3010=DIRECTION('',(0.E0,0.E0,1.E0)); #3011=VECTOR('',#3010,5.E-1); #3012=CARTESIAN_POINT('',(2.104720076055E1,9.5E0,9.5E0)); #3013=LINE('',#3012,#3011); #3014=CARTESIAN_POINT('',(2.104720076055E1,9.15E0,1.E1)); #3015=DIRECTION('',(0.E0,0.E0,-1.E0)); #3016=DIRECTION('',(0.E0,1.E0,0.E0)); #3017=AXIS2_PLACEMENT_3D('',#3014,#3015,#3016); #3019=DIRECTION('',(0.E0,0.E0,1.E0)); #3020=VECTOR('',#3019,5.E-1); #3021=CARTESIAN_POINT('',(2.204720076055E1,7.E0,9.5E0)); #3022=LINE('',#3021,#3020); #3023=CARTESIAN_POINT('',(2.204720076055E1,7.35E0,9.5E0)); #3024=DIRECTION('',(0.E0,0.E0,1.E0)); #3025=DIRECTION('',(0.E0,-1.E0,0.E0)); #3026=AXIS2_PLACEMENT_3D('',#3023,#3024,#3025); #3028=DIRECTION('',(0.E0,0.E0,1.E0)); #3029=VECTOR('',#3028,5.E-1); #3030=CARTESIAN_POINT('',(2.235315580719E1,7.519975025913E0,9.5E0)); #3031=LINE('',#3030,#3029); #3032=CARTESIAN_POINT('',(2.204720076055E1,7.35E0,1.E1)); #3033=DIRECTION('',(0.E0,0.E0,-1.E0)); #3034=DIRECTION('',(8.741572761215E-1,4.856429311786E-1,0.E0)); #3035=AXIS2_PLACEMENT_3D('',#3032,#3033,#3034); #3037=DIRECTION('',(-1.E0,0.E0,0.E0)); #3038=VECTOR('',#3037,1.972007605460E-1); #3039=CARTESIAN_POINT('',(2.204720076055E1,7.E0,9.5E0)); #3040=LINE('',#3039,#3038); #3041=DIRECTION('',(0.E0,-1.E0,0.E0)); #3042=VECTOR('',#3041,4.3E0); #3043=CARTESIAN_POINT('',(2.15E1,6.65E0,9.5E0)); #3044=LINE('',#3043,#3042); #3045=DIRECTION('',(-1.E0,0.E0,0.E0)); #3046=VECTOR('',#3045,1.3E0); #3047=CARTESIAN_POINT('',(2.115E1,2.E0,9.5E0)); #3048=LINE('',#3047,#3046); #3049=DIRECTION('',(0.E0,1.E0,0.E0)); #3050=VECTOR('',#3049,6.8E0); #3051=CARTESIAN_POINT('',(1.95E1,2.35E0,9.5E0)); #3052=LINE('',#3051,#3050); #3053=DIRECTION('',(1.E0,0.E0,0.E0)); #3054=VECTOR('',#3053,1.197200760546E0); #3055=CARTESIAN_POINT('',(1.985E1,9.5E0,9.5E0)); #3056=LINE('',#3055,#3054); #3057=DIRECTION('',(4.856429311786E-1,-8.741572761215E-1,0.E0)); #3058=VECTOR('',#3057,2.059126028197E0); #3059=CARTESIAN_POINT('',(2.135315580719E1,9.319975025913E0,9.5E0)); #3060=LINE('',#3059,#3058); #3061=DIRECTION('',(0.E0,0.E0,1.E0)); #3062=VECTOR('',#3061,2.5E-1); #3063=CARTESIAN_POINT('',(2.00925E1,1.05E1,8.E0)); #3064=LINE('',#3063,#3062); #3065=DIRECTION('',(0.E0,0.E0,1.E0)); #3066=VECTOR('',#3065,2.5E-1); #3067=CARTESIAN_POINT('',(2.02825E1,1.05E1,8.E0)); #3068=LINE('',#3067,#3066); #3069=CARTESIAN_POINT('',(2.01875E1,1.05E1,8.25E0)); #3070=DIRECTION('',(0.E0,0.E0,-1.E0)); #3071=DIRECTION('',(-1.E0,0.E0,0.E0)); #3072=AXIS2_PLACEMENT_3D('',#3069,#3070,#3071); #3074=CARTESIAN_POINT('',(2.01875E1,1.05E1,8.25E0)); #3075=DIRECTION('',(0.E0,0.E0,-1.E0)); #3076=DIRECTION('',(1.E0,0.E0,0.E0)); #3077=AXIS2_PLACEMENT_3D('',#3074,#3075,#3076); #3079=DIRECTION('',(0.E0,0.E0,1.E0)); #3080=VECTOR('',#3079,2.5E-1); #3081=CARTESIAN_POINT('',(1.9655E1,1.00625E1,8.E0)); #3082=LINE('',#3081,#3080); #3083=DIRECTION('',(0.E0,0.E0,1.E0)); #3084=VECTOR('',#3083,2.5E-1); #3085=CARTESIAN_POINT('',(1.9845E1,1.00625E1,8.E0)); #3086=LINE('',#3085,#3084); #3087=CARTESIAN_POINT('',(1.975E1,1.00625E1,8.25E0)); #3088=DIRECTION('',(0.E0,0.E0,-1.E0)); #3089=DIRECTION('',(-1.E0,0.E0,0.E0)); #3090=AXIS2_PLACEMENT_3D('',#3087,#3088,#3089); #3092=CARTESIAN_POINT('',(1.975E1,1.00625E1,8.25E0)); #3093=DIRECTION('',(0.E0,0.E0,-1.E0)); #3094=DIRECTION('',(1.E0,0.E0,0.E0)); #3095=AXIS2_PLACEMENT_3D('',#3092,#3093,#3094); #3097=DIRECTION('',(0.E0,0.E0,1.E0)); #3098=VECTOR('',#3097,2.5E-1); #3099=CARTESIAN_POINT('',(4.345E0,1.00625E1,8.E0)); #3100=LINE('',#3099,#3098); #3101=DIRECTION('',(0.E0,0.E0,1.E0)); #3102=VECTOR('',#3101,2.5E-1); #3103=CARTESIAN_POINT('',(4.155E0,1.00625E1,8.E0)); #3104=LINE('',#3103,#3102); #3105=CARTESIAN_POINT('',(4.25E0,1.00625E1,8.25E0)); #3106=DIRECTION('',(0.E0,0.E0,1.E0)); #3107=DIRECTION('',(1.E0,0.E0,0.E0)); #3108=AXIS2_PLACEMENT_3D('',#3105,#3106,#3107); #3110=CARTESIAN_POINT('',(4.25E0,1.00625E1,8.25E0)); #3111=DIRECTION('',(0.E0,0.E0,1.E0)); #3112=DIRECTION('',(-1.E0,0.E0,0.E0)); #3113=AXIS2_PLACEMENT_3D('',#3110,#3111,#3112); #3115=DIRECTION('',(0.E0,0.E0,1.E0)); #3116=VECTOR('',#3115,2.5E-1); #3117=CARTESIAN_POINT('',(3.9075E0,1.05E1,8.E0)); #3118=LINE('',#3117,#3116); #3119=DIRECTION('',(0.E0,0.E0,1.E0)); #3120=VECTOR('',#3119,2.5E-1); #3121=CARTESIAN_POINT('',(3.7175E0,1.05E1,8.E0)); #3122=LINE('',#3121,#3120); #3123=CARTESIAN_POINT('',(3.8125E0,1.05E1,8.25E0)); #3124=DIRECTION('',(0.E0,0.E0,1.E0)); #3125=DIRECTION('',(1.E0,0.E0,0.E0)); #3126=AXIS2_PLACEMENT_3D('',#3123,#3124,#3125); #3128=CARTESIAN_POINT('',(3.8125E0,1.05E1,8.25E0)); #3129=DIRECTION('',(0.E0,0.E0,1.E0)); #3130=DIRECTION('',(-1.E0,0.E0,0.E0)); #3131=AXIS2_PLACEMENT_3D('',#3128,#3129,#3130); #3133=DIRECTION('',(0.E0,0.E0,1.E0)); #3134=VECTOR('',#3133,2.5E-1); #3135=CARTESIAN_POINT('',(4.345E0,1.09375E1,8.E0)); #3136=LINE('',#3135,#3134); #3137=DIRECTION('',(0.E0,0.E0,1.E0)); #3138=VECTOR('',#3137,2.5E-1); #3139=CARTESIAN_POINT('',(4.155E0,1.09375E1,8.E0)); #3140=LINE('',#3139,#3138); #3141=CARTESIAN_POINT('',(4.25E0,1.09375E1,8.25E0)); #3142=DIRECTION('',(0.E0,0.E0,1.E0)); #3143=DIRECTION('',(1.E0,0.E0,0.E0)); #3144=AXIS2_PLACEMENT_3D('',#3141,#3142,#3143); #3146=CARTESIAN_POINT('',(4.25E0,1.09375E1,8.25E0)); #3147=DIRECTION('',(0.E0,0.E0,1.E0)); #3148=DIRECTION('',(-1.E0,0.E0,0.E0)); #3149=AXIS2_PLACEMENT_3D('',#3146,#3147,#3148); #3151=DIRECTION('',(0.E0,0.E0,1.E0)); #3152=VECTOR('',#3151,5.E-1); #3153=CARTESIAN_POINT('',(3.75E0,2.E0,8.E0)); #3154=LINE('',#3153,#3152); #3155=CARTESIAN_POINT('',(3.75E0,2.75E0,8.E0)); #3156=DIRECTION('',(0.E0,0.E0,1.E0)); #3157=DIRECTION('',(0.E0,-1.E0,0.E0)); #3158=AXIS2_PLACEMENT_3D('',#3155,#3156,#3157); #3160=DIRECTION('',(0.E0,0.E0,1.E0)); #3161=VECTOR('',#3160,5.E-1); #3162=CARTESIAN_POINT('',(4.5E0,2.75E0,8.E0)); #3163=LINE('',#3162,#3161); #3164=CARTESIAN_POINT('',(3.75E0,2.75E0,8.5E0)); #3165=DIRECTION('',(0.E0,0.E0,-1.E0)); #3166=DIRECTION('',(1.E0,0.E0,0.E0)); #3167=AXIS2_PLACEMENT_3D('',#3164,#3165,#3166); #3169=DIRECTION('',(0.E0,0.E0,1.E0)); #3170=VECTOR('',#3169,5.E-1); #3171=CARTESIAN_POINT('',(4.5E0,8.75E0,8.E0)); #3172=LINE('',#3171,#3170); #3173=CARTESIAN_POINT('',(3.75E0,8.75E0,8.E0)); #3174=DIRECTION('',(0.E0,0.E0,1.E0)); #3175=DIRECTION('',(1.E0,0.E0,0.E0)); #3176=AXIS2_PLACEMENT_3D('',#3173,#3174,#3175); #3178=DIRECTION('',(0.E0,0.E0,1.E0)); #3179=VECTOR('',#3178,5.E-1); #3180=CARTESIAN_POINT('',(3.75E0,9.5E0,8.E0)); #3181=LINE('',#3180,#3179); #3182=CARTESIAN_POINT('',(3.75E0,8.75E0,8.5E0)); #3183=DIRECTION('',(0.E0,0.E0,-1.E0)); #3184=DIRECTION('',(0.E0,1.E0,0.E0)); #3185=AXIS2_PLACEMENT_3D('',#3182,#3183,#3184); #3187=DIRECTION('',(0.E0,0.E0,1.E0)); #3188=VECTOR('',#3187,5.E-1); #3189=CARTESIAN_POINT('',(3.188160579053E0,9.5E0,8.E0)); #3190=LINE('',#3189,#3188); #3191=CARTESIAN_POINT('',(3.188160579053E0,8.75E0,8.E0)); #3192=DIRECTION('',(0.E0,0.E0,1.E0)); #3193=DIRECTION('',(0.E0,1.E0,0.E0)); #3194=AXIS2_PLACEMENT_3D('',#3191,#3192,#3193); #3196=DIRECTION('',(0.E0,0.E0,1.E0)); #3197=VECTOR('',#3196,5.E-1); #3198=CARTESIAN_POINT('',(2.532542621962E0,9.114232198384E0,8.E0)); #3199=LINE('',#3198,#3197); #3200=CARTESIAN_POINT('',(3.188160579053E0,8.75E0,8.5E0)); #3201=DIRECTION('',(0.E0,0.E0,-1.E0)); #3202=DIRECTION('',(-8.741572761215E-1,4.856429311786E-1,0.E0)); #3203=AXIS2_PLACEMENT_3D('',#3200,#3201,#3202); #3205=DIRECTION('',(0.E0,0.E0,1.E0)); #3206=VECTOR('',#3205,5.E-1); #3207=CARTESIAN_POINT('',(-8.007907113711E-1,3.114232198384E0,8.E0)); #3208=LINE('',#3207,#3206); #3209=CARTESIAN_POINT('',(-1.451727542799E-1,2.75E0,8.E0)); #3210=DIRECTION('',(0.E0,0.E0,1.E0)); #3211=DIRECTION('',(-8.741572761215E-1,4.856429311786E-1,0.E0)); #3212=AXIS2_PLACEMENT_3D('',#3209,#3210,#3211); #3214=DIRECTION('',(0.E0,0.E0,1.E0)); #3215=VECTOR('',#3214,5.E-1); #3216=CARTESIAN_POINT('',(-1.451727542799E-1,2.E0,8.E0)); #3217=LINE('',#3216,#3215); #3218=CARTESIAN_POINT('',(-1.451727542799E-1,2.75E0,8.5E0)); #3219=DIRECTION('',(0.E0,0.E0,-1.E0)); #3220=DIRECTION('',(0.E0,-1.E0,0.E0)); #3221=AXIS2_PLACEMENT_3D('',#3218,#3219,#3220); #3223=DIRECTION('',(0.E0,-1.E0,0.E0)); #3224=VECTOR('',#3223,6.E0); #3225=CARTESIAN_POINT('',(4.5E0,8.75E0,8.5E0)); #3226=LINE('',#3225,#3224); #3227=DIRECTION('',(1.E0,0.E0,0.E0)); #3228=VECTOR('',#3227,5.618394209466E-1); #3229=CARTESIAN_POINT('',(3.188160579053E0,9.5E0,8.5E0)); #3230=LINE('',#3229,#3228); #3231=DIRECTION('',(4.856429311786E-1,8.741572761215E-1,0.E0)); #3232=VECTOR('',#3231,6.863753427325E0); #3233=CARTESIAN_POINT('',(-8.007907113711E-1,3.114232198384E0,8.5E0)); #3234=LINE('',#3233,#3232); #3235=DIRECTION('',(-1.E0,0.E0,0.E0)); #3236=VECTOR('',#3235,3.895172754280E0); #3237=CARTESIAN_POINT('',(3.75E0,2.E0,8.5E0)); #3238=LINE('',#3237,#3236); #3239=DIRECTION('',(0.E0,0.E0,-1.E0)); #3240=VECTOR('',#3239,5.E-1); #3241=CARTESIAN_POINT('',(2.480079071137E1,3.114232198384E0,8.5E0)); #3242=LINE('',#3241,#3240); #3243=CARTESIAN_POINT('',(2.414517275428E1,2.75E0,8.5E0)); #3244=DIRECTION('',(0.E0,0.E0,-1.E0)); #3245=DIRECTION('',(8.741572761215E-1,4.856429311786E-1,0.E0)); #3246=AXIS2_PLACEMENT_3D('',#3243,#3244,#3245); #3248=DIRECTION('',(0.E0,0.E0,-1.E0)); #3249=VECTOR('',#3248,5.E-1); #3250=CARTESIAN_POINT('',(2.414517275428E1,2.E0,8.5E0)); #3251=LINE('',#3250,#3249); #3252=CARTESIAN_POINT('',(2.414517275428E1,2.75E0,8.E0)); #3253=DIRECTION('',(0.E0,0.E0,1.E0)); #3254=DIRECTION('',(0.E0,-1.E0,0.E0)); #3255=AXIS2_PLACEMENT_3D('',#3252,#3253,#3254); #3257=DIRECTION('',(1.E0,0.E0,0.E0)); #3258=VECTOR('',#3257,3.895172754280E0); #3259=CARTESIAN_POINT('',(2.025E1,2.E0,8.5E0)); #3260=LINE('',#3259,#3258); #3261=DIRECTION('',(-4.856429311786E-1,8.741572761215E-1,0.E0)); #3262=VECTOR('',#3261,6.863753427325E0); #3263=CARTESIAN_POINT('',(2.480079071137E1,3.114232198384E0,8.5E0)); #3264=LINE('',#3263,#3262); #3265=DIRECTION('',(-1.E0,0.E0,0.E0)); #3266=VECTOR('',#3265,5.618394209466E-1); #3267=CARTESIAN_POINT('',(2.081183942095E1,9.5E0,8.5E0)); #3268=LINE('',#3267,#3266); #3269=DIRECTION('',(0.E0,-1.E0,0.E0)); #3270=VECTOR('',#3269,6.E0); #3271=CARTESIAN_POINT('',(1.95E1,8.75E0,8.5E0)); #3272=LINE('',#3271,#3270); #3273=DIRECTION('',(0.E0,0.E0,-1.E0)); #3274=VECTOR('',#3273,5.E-1); #3275=CARTESIAN_POINT('',(2.025E1,2.E0,8.5E0)); #3276=LINE('',#3275,#3274); #3277=CARTESIAN_POINT('',(2.025E1,2.75E0,8.5E0)); #3278=DIRECTION('',(0.E0,0.E0,-1.E0)); #3279=DIRECTION('',(0.E0,-1.E0,0.E0)); #3280=AXIS2_PLACEMENT_3D('',#3277,#3278,#3279); #3282=DIRECTION('',(0.E0,0.E0,-1.E0)); #3283=VECTOR('',#3282,5.E-1); #3284=CARTESIAN_POINT('',(1.95E1,2.75E0,8.5E0)); #3285=LINE('',#3284,#3283); #3286=CARTESIAN_POINT('',(2.025E1,2.75E0,8.E0)); #3287=DIRECTION('',(0.E0,0.E0,1.E0)); #3288=DIRECTION('',(-1.E0,0.E0,0.E0)); #3289=AXIS2_PLACEMENT_3D('',#3286,#3287,#3288); #3291=DIRECTION('',(0.E0,0.E0,-1.E0)); #3292=VECTOR('',#3291,5.E-1); #3293=CARTESIAN_POINT('',(1.95E1,8.75E0,8.5E0)); #3294=LINE('',#3293,#3292); #3295=CARTESIAN_POINT('',(2.025E1,8.75E0,8.5E0)); #3296=DIRECTION('',(0.E0,0.E0,-1.E0)); #3297=DIRECTION('',(-1.E0,0.E0,0.E0)); #3298=AXIS2_PLACEMENT_3D('',#3295,#3296,#3297); #3300=DIRECTION('',(0.E0,0.E0,-1.E0)); #3301=VECTOR('',#3300,5.E-1); #3302=CARTESIAN_POINT('',(2.025E1,9.5E0,8.5E0)); #3303=LINE('',#3302,#3301); #3304=CARTESIAN_POINT('',(2.025E1,8.75E0,8.E0)); #3305=DIRECTION('',(0.E0,0.E0,1.E0)); #3306=DIRECTION('',(0.E0,1.E0,0.E0)); #3307=AXIS2_PLACEMENT_3D('',#3304,#3305,#3306); #3309=DIRECTION('',(0.E0,0.E0,-1.E0)); #3310=VECTOR('',#3309,5.E-1); #3311=CARTESIAN_POINT('',(2.081183942095E1,9.5E0,8.5E0)); #3312=LINE('',#3311,#3310); #3313=CARTESIAN_POINT('',(2.081183942095E1,8.75E0,8.5E0)); #3314=DIRECTION('',(0.E0,0.E0,-1.E0)); #3315=DIRECTION('',(0.E0,1.E0,0.E0)); #3316=AXIS2_PLACEMENT_3D('',#3313,#3314,#3315); #3318=DIRECTION('',(0.E0,0.E0,-1.E0)); #3319=VECTOR('',#3318,5.E-1); #3320=CARTESIAN_POINT('',(2.146745737804E1,9.114232198384E0,8.5E0)); #3321=LINE('',#3320,#3319); #3322=CARTESIAN_POINT('',(2.081183942095E1,8.75E0,8.E0)); #3323=DIRECTION('',(0.E0,0.E0,1.E0)); #3324=DIRECTION('',(8.741572761215E-1,4.856429311786E-1,0.E0)); #3325=AXIS2_PLACEMENT_3D('',#3322,#3323,#3324); #3327=DIRECTION('',(0.E0,1.E0,0.E0)); #3328=VECTOR('',#3327,6.875E-1); #3329=CARTESIAN_POINT('',(7.5E0,0.E0,6.875E-1)); #3330=LINE('',#3329,#3328); #3331=DIRECTION('',(0.E0,1.E0,0.E0)); #3332=VECTOR('',#3331,6.875E-1); #3333=CARTESIAN_POINT('',(7.5E0,0.E0,1.8125E0)); #3334=LINE('',#3333,#3332); #3335=DIRECTION('',(0.E0,1.E0,0.E0)); #3336=VECTOR('',#3335,6.875E-1); #3337=CARTESIAN_POINT('',(1.05E1,0.E0,1.8125E0)); #3338=LINE('',#3337,#3336); #3339=DIRECTION('',(0.E0,1.E0,0.E0)); #3340=VECTOR('',#3339,6.875E-1); #3341=CARTESIAN_POINT('',(1.05E1,0.E0,6.875E-1)); #3342=LINE('',#3341,#3340); #3343=DIRECTION('',(1.E0,0.E0,0.E0)); #3344=VECTOR('',#3343,3.E0); #3345=CARTESIAN_POINT('',(7.5E0,6.875E-1,6.875E-1)); #3346=LINE('',#3345,#3344); #3347=CARTESIAN_POINT('',(7.5E0,6.875E-1,1.25E0)); #3348=DIRECTION('',(0.E0,-1.E0,0.E0)); #3349=DIRECTION('',(0.E0,0.E0,1.E0)); #3350=AXIS2_PLACEMENT_3D('',#3347,#3348,#3349); #3352=DIRECTION('',(-1.E0,0.E0,0.E0)); #3353=VECTOR('',#3352,3.E0); #3354=CARTESIAN_POINT('',(1.05E1,6.875E-1,1.8125E0)); #3355=LINE('',#3354,#3353); #3356=CARTESIAN_POINT('',(1.05E1,6.875E-1,1.25E0)); #3357=DIRECTION('',(0.E0,-1.E0,0.E0)); #3358=DIRECTION('',(0.E0,0.E0,-1.E0)); #3359=AXIS2_PLACEMENT_3D('',#3356,#3357,#3358); #3361=CARTESIAN_POINT('',(1.61E0,6.875E-1,4.5E0)); #3362=DIRECTION('',(0.E0,-1.E0,0.E0)); #3363=DIRECTION('',(8.910741301059E-1,0.E0,4.538577912254E-1)); #3364=AXIS2_PLACEMENT_3D('',#3361,#3362,#3363); #3366=CARTESIAN_POINT('',(7.5E0,6.875E-1,7.5E0)); #3367=DIRECTION('',(0.E0,1.E0,0.E0)); #3368=DIRECTION('',(-4.496088413988E-1,0.E0,-8.932255536739E-1)); #3369=AXIS2_PLACEMENT_3D('',#3366,#3367,#3368); #3371=CARTESIAN_POINT('',(4.553039342392E0,6.875E-1,1.645354088550E0)); #3372=DIRECTION('',(0.E0,-1.E0,0.E0)); #3373=DIRECTION('',(-7.071067811865E-1,0.E0,-7.071067811865E-1)); #3374=AXIS2_PLACEMENT_3D('',#3371,#3372,#3373); #3376=DIRECTION('',(7.071067811865E-1,0.E0,-7.071067811865E-1)); #3377=VECTOR('',#3376,4.263248410977E0); #3378=CARTESIAN_POINT('',(9.254066777019E-1,6.875E-1,4.046865146430E0)); #3379=LINE('',#3378,#3377); #3380=DIRECTION('',(0.E0,1.E0,0.E0)); #3381=VECTOR('',#3380,6.875E-1); #3382=CARTESIAN_POINT('',(9.254066777019E-1,0.E0,4.046865146430E0)); #3383=LINE('',#3382,#3381); #3384=CARTESIAN_POINT('',(1.455736763592E0,0.E0,4.577195232320E0)); #3385=DIRECTION('',(0.E0,1.E0,0.E0)); #3386=DIRECTION('',(-7.071067811865E-1,0.E0,-7.071067811865E-1)); #3387=AXIS2_PLACEMENT_3D('',#3384,#3385,#3386); #3389=DIRECTION('',(0.E0,1.E0,0.E0)); #3390=VECTOR('',#3389,6.875E-1); #3391=CARTESIAN_POINT('',(7.850270400779E-1,0.E0,4.912826677187E0)); #3392=LINE('',#3391,#3390); #3393=CARTESIAN_POINT('',(1.455736763592E0,6.875E-1,4.577195232320E0)); #3394=DIRECTION('',(0.E0,-1.E0,0.E0)); #3395=DIRECTION('',(-8.942796313519E-1,0.E0,4.475085931567E-1)); #3396=AXIS2_PLACEMENT_3D('',#3393,#3394,#3395); #3398=DIRECTION('',(0.E0,1.E0,0.E0)); #3399=VECTOR('',#3398,6.875E-1); #3400=CARTESIAN_POINT('',(3.939978538987E0,0.E0,1.032293285145E0)); #3401=LINE('',#3400,#3399); #3402=DIRECTION('',(0.E0,1.E0,0.E0)); #3403=VECTOR('',#3402,6.875E-1); #3404=CARTESIAN_POINT('',(4.942849714544E0,0.E0,2.419779663480E0)); #3405=LINE('',#3404,#3403); #3406=DIRECTION('',(0.E0,1.E0,0.E0)); #3407=VECTOR('',#3406,6.875E-1); #3408=CARTESIAN_POINT('',(2.432015885023E0,0.E0,4.918683812405E0)); #3409=LINE('',#3408,#3407); #3410=DIRECTION('',(0.E0,-1.E0,0.E0)); #3411=VECTOR('',#3410,6.875E-1); #3412=CARTESIAN_POINT('',(6.9E-1,6.875E-1,7.815E0)); #3413=LINE('',#3412,#3411); #3414=CARTESIAN_POINT('',(-1.85E-1,0.E0,7.815E0)); #3415=DIRECTION('',(0.E0,-1.E0,0.E0)); #3416=DIRECTION('',(1.E0,0.E0,0.E0)); #3417=AXIS2_PLACEMENT_3D('',#3414,#3415,#3416); #3419=DIRECTION('',(0.E0,-1.E0,0.E0)); #3420=VECTOR('',#3419,6.875E-1); #3421=CARTESIAN_POINT('',(-1.85E-1,6.875E-1,8.69E0)); #3422=LINE('',#3421,#3420); #3423=CARTESIAN_POINT('',(-1.85E-1,6.875E-1,7.815E0)); #3424=DIRECTION('',(0.E0,1.E0,0.E0)); #3425=DIRECTION('',(0.E0,0.E0,1.E0)); #3426=AXIS2_PLACEMENT_3D('',#3423,#3424,#3425); #3428=DIRECTION('',(1.E0,0.E0,0.E0)); #3429=VECTOR('',#3428,7.5E-1); #3430=CARTESIAN_POINT('',(2.6875E0,6.875E-1,8.69E0)); #3431=LINE('',#3430,#3429); #3432=DIRECTION('',(0.E0,0.E0,1.E0)); #3433=VECTOR('',#3432,3.15E-1); #3434=CARTESIAN_POINT('',(1.8125E0,6.875E-1,7.5E0)); #3435=LINE('',#3434,#3433); #3436=CARTESIAN_POINT('',(1.25125E0,6.875E-1,7.5E0)); #3437=DIRECTION('',(0.E0,-1.E0,0.E0)); #3438=DIRECTION('',(-1.E0,0.E0,0.E0)); #3439=AXIS2_PLACEMENT_3D('',#3436,#3437,#3438); #3441=DIRECTION('',(0.E0,0.E0,-1.E0)); #3442=VECTOR('',#3441,3.15E-1); #3443=CARTESIAN_POINT('',(6.9E-1,6.875E-1,7.815E0)); #3444=LINE('',#3443,#3442); #3445=DIRECTION('',(1.E0,0.E0,0.E0)); #3446=VECTOR('',#3445,2.525E-1); #3447=CARTESIAN_POINT('',(-4.375E-1,6.875E-1,8.69E0)); #3448=LINE('',#3447,#3446); #3449=DIRECTION('',(0.E0,0.E0,-1.E0)); #3450=VECTOR('',#3449,8.1E-1); #3451=CARTESIAN_POINT('',(-1.3125E0,6.875E-1,1.0375E1)); #3452=LINE('',#3451,#3450); #3453=DIRECTION('',(-1.E0,0.E0,0.E0)); #3454=VECTOR('',#3453,3.875E0); #3455=CARTESIAN_POINT('',(3.4375E0,6.875E-1,1.125E1)); #3456=LINE('',#3455,#3454); #3457=DIRECTION('',(0.E0,0.E0,1.E0)); #3458=VECTOR('',#3457,8.1E-1); #3459=CARTESIAN_POINT('',(4.3125E0,6.875E-1,9.565E0)); #3460=LINE('',#3459,#3458); #3461=DIRECTION('',(0.E0,-1.E0,0.E0)); #3462=VECTOR('',#3461,6.875E-1); #3463=CARTESIAN_POINT('',(2.6875E0,6.875E-1,8.69E0)); #3464=LINE('',#3463,#3462); #3465=CARTESIAN_POINT('',(2.6875E0,0.E0,7.815E0)); #3466=DIRECTION('',(0.E0,-1.E0,0.E0)); #3467=DIRECTION('',(0.E0,0.E0,1.E0)); #3468=AXIS2_PLACEMENT_3D('',#3465,#3466,#3467); #3470=DIRECTION('',(0.E0,-1.E0,0.E0)); #3471=VECTOR('',#3470,6.875E-1); #3472=CARTESIAN_POINT('',(1.8125E0,6.875E-1,7.815E0)); #3473=LINE('',#3472,#3471); #3474=CARTESIAN_POINT('',(2.6875E0,6.875E-1,7.815E0)); #3475=DIRECTION('',(0.E0,1.E0,0.E0)); #3476=DIRECTION('',(-1.E0,0.E0,0.E0)); #3477=AXIS2_PLACEMENT_3D('',#3474,#3475,#3476); #3479=DIRECTION('',(0.E0,1.E0,0.E0)); #3480=VECTOR('',#3479,6.875E-1); #3481=CARTESIAN_POINT('',(1.8125E0,0.E0,7.5E0)); #3482=LINE('',#3481,#3480); #3483=DIRECTION('',(0.E0,1.E0,0.E0)); #3484=VECTOR('',#3483,6.875E-1); #3485=CARTESIAN_POINT('',(6.9E-1,0.E0,7.5E0)); #3486=LINE('',#3485,#3484); #3487=DIRECTION('',(0.E0,1.E0,0.E0)); #3488=VECTOR('',#3487,6.875E-1); #3489=CARTESIAN_POINT('',(4.3125E0,0.E0,9.565E0)); #3490=LINE('',#3489,#3488); #3491=CARTESIAN_POINT('',(3.4375E0,0.E0,9.565E0)); #3492=DIRECTION('',(0.E0,1.E0,0.E0)); #3493=DIRECTION('',(1.E0,0.E0,0.E0)); #3494=AXIS2_PLACEMENT_3D('',#3491,#3492,#3493); #3496=DIRECTION('',(0.E0,1.E0,0.E0)); #3497=VECTOR('',#3496,6.875E-1); #3498=CARTESIAN_POINT('',(3.4375E0,0.E0,8.69E0)); #3499=LINE('',#3498,#3497); #3500=CARTESIAN_POINT('',(3.4375E0,6.875E-1,9.565E0)); #3501=DIRECTION('',(0.E0,-1.E0,0.E0)); #3502=DIRECTION('',(0.E0,0.E0,-1.E0)); #3503=AXIS2_PLACEMENT_3D('',#3500,#3501,#3502); #3505=DIRECTION('',(0.E0,1.E0,0.E0)); #3506=VECTOR('',#3505,6.875E-1); #3507=CARTESIAN_POINT('',(3.4375E0,0.E0,1.125E1)); #3508=LINE('',#3507,#3506); #3509=CARTESIAN_POINT('',(3.4375E0,0.E0,1.0375E1)); #3510=DIRECTION('',(0.E0,1.E0,0.E0)); #3511=DIRECTION('',(0.E0,0.E0,1.E0)); #3512=AXIS2_PLACEMENT_3D('',#3509,#3510,#3511); #3514=DIRECTION('',(0.E0,1.E0,0.E0)); #3515=VECTOR('',#3514,6.875E-1); #3516=CARTESIAN_POINT('',(4.3125E0,0.E0,1.0375E1)); #3517=LINE('',#3516,#3515); #3518=CARTESIAN_POINT('',(3.4375E0,6.875E-1,1.0375E1)); #3519=DIRECTION('',(0.E0,-1.E0,0.E0)); #3520=DIRECTION('',(1.E0,0.E0,0.E0)); #3521=AXIS2_PLACEMENT_3D('',#3518,#3519,#3520); #3523=DIRECTION('',(0.E0,1.E0,0.E0)); #3524=VECTOR('',#3523,6.875E-1); #3525=CARTESIAN_POINT('',(-1.3125E0,0.E0,1.0375E1)); #3526=LINE('',#3525,#3524); #3527=CARTESIAN_POINT('',(-4.375E-1,0.E0,1.0375E1)); #3528=DIRECTION('',(0.E0,1.E0,0.E0)); #3529=DIRECTION('',(-1.E0,0.E0,0.E0)); #3530=AXIS2_PLACEMENT_3D('',#3527,#3528,#3529); #3532=DIRECTION('',(0.E0,1.E0,0.E0)); #3533=VECTOR('',#3532,6.875E-1); #3534=CARTESIAN_POINT('',(-4.375E-1,0.E0,1.125E1)); #3535=LINE('',#3534,#3533); #3536=CARTESIAN_POINT('',(-4.375E-1,6.875E-1,1.0375E1)); #3537=DIRECTION('',(0.E0,-1.E0,0.E0)); #3538=DIRECTION('',(0.E0,0.E0,1.E0)); #3539=AXIS2_PLACEMENT_3D('',#3536,#3537,#3538); #3541=DIRECTION('',(0.E0,1.E0,0.E0)); #3542=VECTOR('',#3541,6.875E-1); #3543=CARTESIAN_POINT('',(-4.375E-1,0.E0,8.69E0)); #3544=LINE('',#3543,#3542); #3545=CARTESIAN_POINT('',(-4.375E-1,0.E0,9.565E0)); #3546=DIRECTION('',(0.E0,1.E0,0.E0)); #3547=DIRECTION('',(0.E0,0.E0,-1.E0)); #3548=AXIS2_PLACEMENT_3D('',#3545,#3546,#3547); #3550=DIRECTION('',(0.E0,1.E0,0.E0)); #3551=VECTOR('',#3550,6.875E-1); #3552=CARTESIAN_POINT('',(-1.3125E0,0.E0,9.565E0)); #3553=LINE('',#3552,#3551); #3554=CARTESIAN_POINT('',(-4.375E-1,6.875E-1,9.565E0)); #3555=DIRECTION('',(0.E0,-1.E0,0.E0)); #3556=DIRECTION('',(-1.E0,0.E0,0.E0)); #3557=AXIS2_PLACEMENT_3D('',#3554,#3555,#3556); #3559=DIRECTION('',(0.E0,1.E0,0.E0)); #3560=VECTOR('',#3559,6.875E-1); #3561=CARTESIAN_POINT('',(6.875E-1,0.E0,1.65E1)); #3562=LINE('',#3561,#3560); #3563=DIRECTION('',(0.E0,1.E0,0.E0)); #3564=VECTOR('',#3563,6.875E-1); #3565=CARTESIAN_POINT('',(1.8125E0,0.E0,1.65E1)); #3566=LINE('',#3565,#3564); #3567=DIRECTION('',(0.E0,1.E0,0.E0)); #3568=VECTOR('',#3567,6.875E-1); #3569=CARTESIAN_POINT('',(1.8125E0,0.E0,1.35E1)); #3570=LINE('',#3569,#3568); #3571=DIRECTION('',(0.E0,1.E0,0.E0)); #3572=VECTOR('',#3571,6.875E-1); #3573=CARTESIAN_POINT('',(6.875E-1,0.E0,1.35E1)); #3574=LINE('',#3573,#3572); #3575=DIRECTION('',(0.E0,0.E0,-1.E0)); #3576=VECTOR('',#3575,3.E0); #3577=CARTESIAN_POINT('',(6.875E-1,6.875E-1,1.65E1)); #3578=LINE('',#3577,#3576); #3579=CARTESIAN_POINT('',(1.25E0,6.875E-1,1.65E1)); #3580=DIRECTION('',(0.E0,-1.E0,0.E0)); #3581=DIRECTION('',(1.E0,0.E0,0.E0)); #3582=AXIS2_PLACEMENT_3D('',#3579,#3580,#3581); #3584=DIRECTION('',(0.E0,0.E0,1.E0)); #3585=VECTOR('',#3584,3.E0); #3586=CARTESIAN_POINT('',(1.8125E0,6.875E-1,1.35E1)); #3587=LINE('',#3586,#3585); #3588=CARTESIAN_POINT('',(1.25E0,6.875E-1,1.35E1)); #3589=DIRECTION('',(0.E0,-1.E0,0.E0)); #3590=DIRECTION('',(-1.E0,0.E0,0.E0)); #3591=AXIS2_PLACEMENT_3D('',#3588,#3589,#3590); #3593=DIRECTION('',(0.E0,1.E0,0.E0)); #3594=VECTOR('',#3593,6.875E-1); #3595=CARTESIAN_POINT('',(6.875E-1,0.E0,2.25E1)); #3596=LINE('',#3595,#3594); #3597=DIRECTION('',(0.E0,1.E0,0.E0)); #3598=VECTOR('',#3597,6.875E-1); #3599=CARTESIAN_POINT('',(1.8125E0,0.E0,2.25E1)); #3600=LINE('',#3599,#3598); #3601=DIRECTION('',(0.E0,1.E0,0.E0)); #3602=VECTOR('',#3601,6.875E-1); #3603=CARTESIAN_POINT('',(1.8125E0,0.E0,1.95E1)); #3604=LINE('',#3603,#3602); #3605=DIRECTION('',(0.E0,1.E0,0.E0)); #3606=VECTOR('',#3605,6.875E-1); #3607=CARTESIAN_POINT('',(6.875E-1,0.E0,1.95E1)); #3608=LINE('',#3607,#3606); #3609=DIRECTION('',(0.E0,0.E0,-1.E0)); #3610=VECTOR('',#3609,3.E0); #3611=CARTESIAN_POINT('',(6.875E-1,6.875E-1,2.25E1)); #3612=LINE('',#3611,#3610); #3613=CARTESIAN_POINT('',(1.25E0,6.875E-1,2.25E1)); #3614=DIRECTION('',(0.E0,-1.E0,0.E0)); #3615=DIRECTION('',(1.E0,0.E0,0.E0)); #3616=AXIS2_PLACEMENT_3D('',#3613,#3614,#3615); #3618=DIRECTION('',(0.E0,0.E0,1.E0)); #3619=VECTOR('',#3618,3.E0); #3620=CARTESIAN_POINT('',(1.8125E0,6.875E-1,1.95E1)); #3621=LINE('',#3620,#3619); #3622=CARTESIAN_POINT('',(1.25E0,6.875E-1,1.95E1)); #3623=DIRECTION('',(0.E0,-1.E0,0.E0)); #3624=DIRECTION('',(-1.E0,0.E0,0.E0)); #3625=AXIS2_PLACEMENT_3D('',#3622,#3623,#3624); #3627=DIRECTION('',(0.E0,1.E0,0.E0)); #3628=VECTOR('',#3627,6.875E-1); #3629=CARTESIAN_POINT('',(7.5E0,0.E0,8.5E0)); #3630=LINE('',#3629,#3628); #3631=DIRECTION('',(0.E0,1.E0,0.E0)); #3632=VECTOR('',#3631,6.875E-1); #3633=CARTESIAN_POINT('',(7.5E0,0.E0,9.5E0)); #3634=LINE('',#3633,#3632); #3635=DIRECTION('',(0.E0,1.E0,0.E0)); #3636=VECTOR('',#3635,6.875E-1); #3637=CARTESIAN_POINT('',(1.05E1,0.E0,9.5E0)); #3638=LINE('',#3637,#3636); #3639=DIRECTION('',(0.E0,1.E0,0.E0)); #3640=VECTOR('',#3639,6.875E-1); #3641=CARTESIAN_POINT('',(1.05E1,0.E0,8.5E0)); #3642=LINE('',#3641,#3640); #3643=DIRECTION('',(1.E0,0.E0,0.E0)); #3644=VECTOR('',#3643,3.E0); #3645=CARTESIAN_POINT('',(7.5E0,6.875E-1,8.5E0)); #3646=LINE('',#3645,#3644); #3647=CARTESIAN_POINT('',(7.5E0,6.875E-1,9.E0)); #3648=DIRECTION('',(0.E0,-1.E0,0.E0)); #3649=DIRECTION('',(0.E0,0.E0,1.E0)); #3650=AXIS2_PLACEMENT_3D('',#3647,#3648,#3649); #3652=DIRECTION('',(-1.E0,0.E0,0.E0)); #3653=VECTOR('',#3652,3.E0); #3654=CARTESIAN_POINT('',(1.05E1,6.875E-1,9.5E0)); #3655=LINE('',#3654,#3653); #3656=CARTESIAN_POINT('',(1.05E1,6.875E-1,9.E0)); #3657=DIRECTION('',(0.E0,-1.E0,0.E0)); #3658=DIRECTION('',(0.E0,0.E0,-1.E0)); #3659=AXIS2_PLACEMENT_3D('',#3656,#3657,#3658); #3661=DIRECTION('',(0.E0,1.E0,0.E0)); #3662=VECTOR('',#3661,6.875E-1); #3663=CARTESIAN_POINT('',(7.5E0,0.E0,1.75625E1)); #3664=LINE('',#3663,#3662); #3665=DIRECTION('',(0.E0,1.E0,0.E0)); #3666=VECTOR('',#3665,6.875E-1); #3667=CARTESIAN_POINT('',(7.5E0,0.E0,1.84375E1)); #3668=LINE('',#3667,#3666); #3669=DIRECTION('',(0.E0,1.E0,0.E0)); #3670=VECTOR('',#3669,6.875E-1); #3671=CARTESIAN_POINT('',(1.05E1,0.E0,1.84375E1)); #3672=LINE('',#3671,#3670); #3673=DIRECTION('',(0.E0,1.E0,0.E0)); #3674=VECTOR('',#3673,6.875E-1); #3675=CARTESIAN_POINT('',(1.05E1,0.E0,1.75625E1)); #3676=LINE('',#3675,#3674); #3677=DIRECTION('',(1.E0,0.E0,0.E0)); #3678=VECTOR('',#3677,3.E0); #3679=CARTESIAN_POINT('',(7.5E0,6.875E-1,1.75625E1)); #3680=LINE('',#3679,#3678); #3681=CARTESIAN_POINT('',(7.5E0,6.875E-1,1.8E1)); #3682=DIRECTION('',(0.E0,-1.E0,0.E0)); #3683=DIRECTION('',(0.E0,0.E0,1.E0)); #3684=AXIS2_PLACEMENT_3D('',#3681,#3682,#3683); #3686=DIRECTION('',(-1.E0,0.E0,0.E0)); #3687=VECTOR('',#3686,3.E0); #3688=CARTESIAN_POINT('',(1.05E1,6.875E-1,1.84375E1)); #3689=LINE('',#3688,#3687); #3690=CARTESIAN_POINT('',(1.05E1,6.875E-1,1.8E1)); #3691=DIRECTION('',(0.E0,-1.E0,0.E0)); #3692=DIRECTION('',(0.E0,0.E0,-1.E0)); #3693=AXIS2_PLACEMENT_3D('',#3690,#3691,#3692); #3695=DIRECTION('',(0.E0,1.E0,0.E0)); #3696=VECTOR('',#3695,6.875E-1); #3697=CARTESIAN_POINT('',(7.5E0,0.E0,3.13125E1)); #3698=LINE('',#3697,#3696); #3699=DIRECTION('',(0.E0,1.E0,0.E0)); #3700=VECTOR('',#3699,6.875E-1); #3701=CARTESIAN_POINT('',(1.05E1,0.E0,3.13125E1)); #3702=LINE('',#3701,#3700); #3703=DIRECTION('',(0.E0,1.E0,0.E0)); #3704=VECTOR('',#3703,6.875E-1); #3705=CARTESIAN_POINT('',(1.05E1,0.E0,3.01875E1)); #3706=LINE('',#3705,#3704); #3707=DIRECTION('',(0.E0,1.E0,0.E0)); #3708=VECTOR('',#3707,6.875E-1); #3709=CARTESIAN_POINT('',(7.5E0,0.E0,3.01875E1)); #3710=LINE('',#3709,#3708); #3711=DIRECTION('',(1.E0,0.E0,0.E0)); #3712=VECTOR('',#3711,3.E0); #3713=CARTESIAN_POINT('',(7.5E0,6.875E-1,3.13125E1)); #3714=LINE('',#3713,#3712); #3715=CARTESIAN_POINT('',(1.05E1,6.875E-1,3.075E1)); #3716=DIRECTION('',(0.E0,1.E0,0.E0)); #3717=DIRECTION('',(0.E0,0.E0,1.E0)); #3718=AXIS2_PLACEMENT_3D('',#3715,#3716,#3717); #3720=DIRECTION('',(-1.E0,0.E0,0.E0)); #3721=VECTOR('',#3720,3.E0); #3722=CARTESIAN_POINT('',(1.05E1,6.875E-1,3.01875E1)); #3723=LINE('',#3722,#3721); #3724=CARTESIAN_POINT('',(7.5E0,6.875E-1,3.075E1)); #3725=DIRECTION('',(0.E0,1.E0,0.E0)); #3726=DIRECTION('',(0.E0,0.E0,-1.E0)); #3727=AXIS2_PLACEMENT_3D('',#3724,#3725,#3726); #3729=DIRECTION('',(7.071067811865E-1,0.E0,7.071067811865E-1)); #3730=VECTOR('',#3729,4.263248410977E0); #3731=CARTESIAN_POINT('',(9.254066777019E-1,6.875E-1,2.795313485357E1)); #3732=LINE('',#3731,#3730); #3733=CARTESIAN_POINT('',(4.553039342392E0,6.875E-1,3.035464591145E1)); #3734=DIRECTION('',(0.E0,1.E0,0.E0)); #3735=DIRECTION('',(-7.071067811865E-1,0.E0,7.071067811865E-1)); #3736=AXIS2_PLACEMENT_3D('',#3733,#3734,#3735); #3738=CARTESIAN_POINT('',(7.5E0,6.875E-1,2.45E1)); #3739=DIRECTION('',(0.E0,-1.E0,0.E0)); #3740=DIRECTION('',(-4.496088413988E-1,0.E0,8.932255536739E-1)); #3741=AXIS2_PLACEMENT_3D('',#3738,#3739,#3740); #3743=CARTESIAN_POINT('',(1.61E0,6.875E-1,2.75E1)); #3744=DIRECTION('',(0.E0,1.E0,0.E0)); #3745=DIRECTION('',(8.910741301059E-1,0.E0,-4.538577912254E-1)); #3746=AXIS2_PLACEMENT_3D('',#3743,#3744,#3745); #3748=DIRECTION('',(0.E0,1.E0,-1.033516706560E-14)); #3749=VECTOR('',#3748,6.875E-1); #3750=CARTESIAN_POINT('',(7.850270400779E-1,0.E0,2.708717332281E1)); #3751=LINE('',#3750,#3749); #3752=CARTESIAN_POINT('',(1.455736763592E0,0.E0,2.742280476768E1)); #3753=DIRECTION('',(0.E0,1.E0,0.E0)); #3754=DIRECTION('',(-8.942796313519E-1,0.E0,-4.475085931567E-1)); #3755=AXIS2_PLACEMENT_3D('',#3752,#3753,#3754); #3757=DIRECTION('',(0.E0,1.E0,1.033516706560E-14)); #3758=VECTOR('',#3757,6.875E-1); #3759=CARTESIAN_POINT('',(9.254066777019E-1,0.E0,2.795313485357E1)); #3760=LINE('',#3759,#3758); #3761=CARTESIAN_POINT('',(1.455736763592E0,6.875E-1,2.742280476768E1)); #3762=DIRECTION('',(0.E0,-1.E0,0.E0)); #3763=DIRECTION('',(-7.071067811865E-1,0.E0,7.071067811866E-1)); #3764=AXIS2_PLACEMENT_3D('',#3761,#3762,#3763); #3766=DIRECTION('',(0.E0,1.E0,1.033516706560E-14)); #3767=VECTOR('',#3766,6.875E-1); #3768=CARTESIAN_POINT('',(2.432015885023E0,0.E0,2.708131618759E1)); #3769=LINE('',#3768,#3767); #3770=DIRECTION('',(0.E0,1.E0,0.E0)); #3771=VECTOR('',#3770,6.875E-1); #3772=CARTESIAN_POINT('',(4.942849714544E0,0.E0,2.958022033652E1)); #3773=LINE('',#3772,#3771); #3774=DIRECTION('',(0.E0,1.E0,0.E0)); #3775=VECTOR('',#3774,6.875E-1); #3776=CARTESIAN_POINT('',(3.939978538987E0,0.E0,3.096770671486E1)); #3777=LINE('',#3776,#3775); #3778=DIRECTION('',(0.E0,1.E0,0.E0)); #3779=VECTOR('',#3778,6.875E-1); #3780=CARTESIAN_POINT('',(1.65E1,0.E0,6.875E-1)); #3781=LINE('',#3780,#3779); #3782=DIRECTION('',(0.E0,1.E0,0.E0)); #3783=VECTOR('',#3782,6.875E-1); #3784=CARTESIAN_POINT('',(1.35E1,0.E0,6.875E-1)); #3785=LINE('',#3784,#3783); #3786=DIRECTION('',(0.E0,1.E0,0.E0)); #3787=VECTOR('',#3786,6.875E-1); #3788=CARTESIAN_POINT('',(1.35E1,0.E0,1.8125E0)); #3789=LINE('',#3788,#3787); #3790=DIRECTION('',(0.E0,1.E0,0.E0)); #3791=VECTOR('',#3790,6.875E-1); #3792=CARTESIAN_POINT('',(1.65E1,0.E0,1.8125E0)); #3793=LINE('',#3792,#3791); #3794=DIRECTION('',(-1.E0,0.E0,0.E0)); #3795=VECTOR('',#3794,3.E0); #3796=CARTESIAN_POINT('',(1.65E1,6.875E-1,6.875E-1)); #3797=LINE('',#3796,#3795); #3798=CARTESIAN_POINT('',(1.35E1,6.875E-1,1.25E0)); #3799=DIRECTION('',(0.E0,1.E0,0.E0)); #3800=DIRECTION('',(0.E0,0.E0,-1.E0)); #3801=AXIS2_PLACEMENT_3D('',#3798,#3799,#3800); #3803=DIRECTION('',(1.E0,0.E0,0.E0)); #3804=VECTOR('',#3803,3.E0); #3805=CARTESIAN_POINT('',(1.35E1,6.875E-1,1.8125E0)); #3806=LINE('',#3805,#3804); #3807=CARTESIAN_POINT('',(1.65E1,6.875E-1,1.25E0)); #3808=DIRECTION('',(0.E0,1.E0,0.E0)); #3809=DIRECTION('',(0.E0,0.E0,1.E0)); #3810=AXIS2_PLACEMENT_3D('',#3807,#3808,#3809); #3812=DIRECTION('',(-7.071067811865E-1,0.E0,-7.071067811865E-1)); #3813=VECTOR('',#3812,4.263248410977E0); #3814=CARTESIAN_POINT('',(2.307459332230E1,6.875E-1,4.046865146430E0)); #3815=LINE('',#3814,#3813); #3816=CARTESIAN_POINT('',(1.944696065761E1,6.875E-1,1.645354088550E0)); #3817=DIRECTION('',(0.E0,1.E0,0.E0)); #3818=DIRECTION('',(7.071067811865E-1,0.E0,-7.071067811865E-1)); #3819=AXIS2_PLACEMENT_3D('',#3816,#3817,#3818); #3821=CARTESIAN_POINT('',(1.65E1,6.875E-1,7.5E0)); #3822=DIRECTION('',(0.E0,-1.E0,0.E0)); #3823=DIRECTION('',(4.496088413988E-1,0.E0,-8.932255536739E-1)); #3824=AXIS2_PLACEMENT_3D('',#3821,#3822,#3823); #3826=CARTESIAN_POINT('',(2.239E1,6.875E-1,4.5E0)); #3827=DIRECTION('',(0.E0,1.E0,0.E0)); #3828=DIRECTION('',(-8.910741301059E-1,0.E0,4.538577912254E-1)); #3829=AXIS2_PLACEMENT_3D('',#3826,#3827,#3828); #3831=DIRECTION('',(-1.033516706560E-14,1.E0,2.583791766400E-14)); #3832=VECTOR('',#3831,6.875E-1); #3833=CARTESIAN_POINT('',(2.321497295992E1,0.E0,4.912826677187E0)); #3834=LINE('',#3833,#3832); #3835=CARTESIAN_POINT('',(2.254426323641E1,0.E0,4.577195232320E0)); #3836=DIRECTION('',(0.E0,1.E0,0.E0)); #3837=DIRECTION('',(8.942796313519E-1,0.E0,4.475085931567E-1)); #3838=AXIS2_PLACEMENT_3D('',#3835,#3836,#3837); #3840=DIRECTION('',(0.E0,1.E0,0.E0)); #3841=VECTOR('',#3840,6.875E-1); #3842=CARTESIAN_POINT('',(2.307459332230E1,0.E0,4.046865146430E0)); #3843=LINE('',#3842,#3841); #3844=CARTESIAN_POINT('',(2.254426323641E1,6.875E-1,4.577195232320E0)); #3845=DIRECTION('',(0.E0,-1.E0,0.E0)); #3846=DIRECTION('',(7.071067811865E-1,0.E0,-7.071067811865E-1)); #3847=AXIS2_PLACEMENT_3D('',#3844,#3845,#3846); #3849=DIRECTION('',(-1.550275059840E-14,1.E0,-2.067033413120E-14)); #3850=VECTOR('',#3849,6.875E-1); #3851=CARTESIAN_POINT('',(2.156798411498E1,0.E0,4.918683812405E0)); #3852=LINE('',#3851,#3850); #3853=DIRECTION('',(1.550275059840E-14,1.E0,0.E0)); #3854=VECTOR('',#3853,6.875E-1); #3855=CARTESIAN_POINT('',(1.905715028546E1,0.E0,2.419779663480E0)); #3856=LINE('',#3855,#3854); #3857=DIRECTION('',(0.E0,1.E0,0.E0)); #3858=VECTOR('',#3857,6.875E-1); #3859=CARTESIAN_POINT('',(2.006002146101E1,0.E0,1.032293285145E0)); #3860=LINE('',#3859,#3858); #3861=DIRECTION('',(0.E0,1.E0,0.E0)); #3862=VECTOR('',#3861,6.875E-1); #3863=CARTESIAN_POINT('',(2.33125E1,0.E0,1.65E1)); #3864=LINE('',#3863,#3862); #3865=DIRECTION('',(0.E0,1.E0,0.E0)); #3866=VECTOR('',#3865,6.875E-1); #3867=CARTESIAN_POINT('',(2.33125E1,0.E0,1.35E1)); #3868=LINE('',#3867,#3866); #3869=DIRECTION('',(0.E0,1.E0,0.E0)); #3870=VECTOR('',#3869,6.875E-1); #3871=CARTESIAN_POINT('',(2.21875E1,0.E0,1.35E1)); #3872=LINE('',#3871,#3870); #3873=DIRECTION('',(0.E0,1.E0,0.E0)); #3874=VECTOR('',#3873,6.875E-1); #3875=CARTESIAN_POINT('',(2.21875E1,0.E0,1.65E1)); #3876=LINE('',#3875,#3874); #3877=DIRECTION('',(0.E0,0.E0,-1.E0)); #3878=VECTOR('',#3877,3.E0); #3879=CARTESIAN_POINT('',(2.33125E1,6.875E-1,1.65E1)); #3880=LINE('',#3879,#3878); #3881=CARTESIAN_POINT('',(2.275E1,6.875E-1,1.35E1)); #3882=DIRECTION('',(0.E0,1.E0,0.E0)); #3883=DIRECTION('',(1.E0,0.E0,0.E0)); #3884=AXIS2_PLACEMENT_3D('',#3881,#3882,#3883); #3886=DIRECTION('',(0.E0,0.E0,1.E0)); #3887=VECTOR('',#3886,3.E0); #3888=CARTESIAN_POINT('',(2.21875E1,6.875E-1,1.35E1)); #3889=LINE('',#3888,#3887); #3890=CARTESIAN_POINT('',(2.275E1,6.875E-1,1.65E1)); #3891=DIRECTION('',(0.E0,1.E0,0.E0)); #3892=DIRECTION('',(-1.E0,0.E0,0.E0)); #3893=AXIS2_PLACEMENT_3D('',#3890,#3891,#3892); #3895=DIRECTION('',(0.E0,1.E0,0.E0)); #3896=VECTOR('',#3895,6.875E-1); #3897=CARTESIAN_POINT('',(2.33125E1,0.E0,2.25E1)); #3898=LINE('',#3897,#3896); #3899=DIRECTION('',(0.E0,1.E0,0.E0)); #3900=VECTOR('',#3899,6.875E-1); #3901=CARTESIAN_POINT('',(2.33125E1,0.E0,1.95E1)); #3902=LINE('',#3901,#3900); #3903=DIRECTION('',(0.E0,1.E0,0.E0)); #3904=VECTOR('',#3903,6.875E-1); #3905=CARTESIAN_POINT('',(2.21875E1,0.E0,1.95E1)); #3906=LINE('',#3905,#3904); #3907=DIRECTION('',(0.E0,1.E0,0.E0)); #3908=VECTOR('',#3907,6.875E-1); #3909=CARTESIAN_POINT('',(2.21875E1,0.E0,2.25E1)); #3910=LINE('',#3909,#3908); #3911=DIRECTION('',(0.E0,0.E0,-1.E0)); #3912=VECTOR('',#3911,3.E0); #3913=CARTESIAN_POINT('',(2.33125E1,6.875E-1,2.25E1)); #3914=LINE('',#3913,#3912); #3915=CARTESIAN_POINT('',(2.275E1,6.875E-1,1.95E1)); #3916=DIRECTION('',(0.E0,1.E0,0.E0)); #3917=DIRECTION('',(1.E0,0.E0,0.E0)); #3918=AXIS2_PLACEMENT_3D('',#3915,#3916,#3917); #3920=DIRECTION('',(0.E0,0.E0,1.E0)); #3921=VECTOR('',#3920,3.E0); #3922=CARTESIAN_POINT('',(2.21875E1,6.875E-1,1.95E1)); #3923=LINE('',#3922,#3921); #3924=CARTESIAN_POINT('',(2.275E1,6.875E-1,2.25E1)); #3925=DIRECTION('',(0.E0,1.E0,0.E0)); #3926=DIRECTION('',(-1.E0,0.E0,0.E0)); #3927=AXIS2_PLACEMENT_3D('',#3924,#3925,#3926); #3929=DIRECTION('',(0.E0,1.E0,0.E0)); #3930=VECTOR('',#3929,6.875E-1); #3931=CARTESIAN_POINT('',(1.65E1,0.E0,8.5E0)); #3932=LINE('',#3931,#3930); #3933=DIRECTION('',(0.E0,1.E0,0.E0)); #3934=VECTOR('',#3933,6.875E-1); #3935=CARTESIAN_POINT('',(1.35E1,0.E0,8.5E0)); #3936=LINE('',#3935,#3934); #3937=DIRECTION('',(0.E0,1.E0,0.E0)); #3938=VECTOR('',#3937,6.875E-1); #3939=CARTESIAN_POINT('',(1.35E1,0.E0,9.5E0)); #3940=LINE('',#3939,#3938); #3941=DIRECTION('',(0.E0,1.E0,0.E0)); #3942=VECTOR('',#3941,6.875E-1); #3943=CARTESIAN_POINT('',(1.65E1,0.E0,9.5E0)); #3944=LINE('',#3943,#3942); #3945=DIRECTION('',(-1.E0,0.E0,0.E0)); #3946=VECTOR('',#3945,3.E0); #3947=CARTESIAN_POINT('',(1.65E1,6.875E-1,8.5E0)); #3948=LINE('',#3947,#3946); #3949=CARTESIAN_POINT('',(1.35E1,6.875E-1,9.E0)); #3950=DIRECTION('',(0.E0,1.E0,0.E0)); #3951=DIRECTION('',(0.E0,0.E0,-1.E0)); #3952=AXIS2_PLACEMENT_3D('',#3949,#3950,#3951); #3954=DIRECTION('',(1.E0,0.E0,0.E0)); #3955=VECTOR('',#3954,3.E0); #3956=CARTESIAN_POINT('',(1.35E1,6.875E-1,9.5E0)); #3957=LINE('',#3956,#3955); #3958=CARTESIAN_POINT('',(1.65E1,6.875E-1,9.E0)); #3959=DIRECTION('',(0.E0,1.E0,0.E0)); #3960=DIRECTION('',(0.E0,0.E0,1.E0)); #3961=AXIS2_PLACEMENT_3D('',#3958,#3959,#3960); #3963=DIRECTION('',(0.E0,1.E0,0.E0)); #3964=VECTOR('',#3963,6.875E-1); #3965=CARTESIAN_POINT('',(1.65E1,0.E0,1.75625E1)); #3966=LINE('',#3965,#3964); #3967=DIRECTION('',(0.E0,1.E0,0.E0)); #3968=VECTOR('',#3967,6.875E-1); #3969=CARTESIAN_POINT('',(1.35E1,0.E0,1.75625E1)); #3970=LINE('',#3969,#3968); #3971=DIRECTION('',(0.E0,1.E0,0.E0)); #3972=VECTOR('',#3971,6.875E-1); #3973=CARTESIAN_POINT('',(1.35E1,0.E0,1.84375E1)); #3974=LINE('',#3973,#3972); #3975=DIRECTION('',(0.E0,1.E0,0.E0)); #3976=VECTOR('',#3975,6.875E-1); #3977=CARTESIAN_POINT('',(1.65E1,0.E0,1.84375E1)); #3978=LINE('',#3977,#3976); #3979=DIRECTION('',(-1.E0,0.E0,0.E0)); #3980=VECTOR('',#3979,3.E0); #3981=CARTESIAN_POINT('',(1.65E1,6.875E-1,1.75625E1)); #3982=LINE('',#3981,#3980); #3983=CARTESIAN_POINT('',(1.35E1,6.875E-1,1.8E1)); #3984=DIRECTION('',(0.E0,1.E0,0.E0)); #3985=DIRECTION('',(0.E0,0.E0,-1.E0)); #3986=AXIS2_PLACEMENT_3D('',#3983,#3984,#3985); #3988=DIRECTION('',(1.E0,0.E0,0.E0)); #3989=VECTOR('',#3988,3.E0); #3990=CARTESIAN_POINT('',(1.35E1,6.875E-1,1.84375E1)); #3991=LINE('',#3990,#3989); #3992=CARTESIAN_POINT('',(1.65E1,6.875E-1,1.8E1)); #3993=DIRECTION('',(0.E0,1.E0,0.E0)); #3994=DIRECTION('',(0.E0,0.E0,1.E0)); #3995=AXIS2_PLACEMENT_3D('',#3992,#3993,#3994); #3997=DIRECTION('',(0.E0,1.E0,0.E0)); #3998=VECTOR('',#3997,6.875E-1); #3999=CARTESIAN_POINT('',(1.65E1,0.E0,3.13125E1)); #4000=LINE('',#3999,#3998); #4001=DIRECTION('',(0.E0,1.E0,0.E0)); #4002=VECTOR('',#4001,6.875E-1); #4003=CARTESIAN_POINT('',(1.65E1,0.E0,3.01875E1)); #4004=LINE('',#4003,#4002); #4005=DIRECTION('',(0.E0,1.E0,0.E0)); #4006=VECTOR('',#4005,6.875E-1); #4007=CARTESIAN_POINT('',(1.35E1,0.E0,3.01875E1)); #4008=LINE('',#4007,#4006); #4009=DIRECTION('',(0.E0,1.E0,0.E0)); #4010=VECTOR('',#4009,6.875E-1); #4011=CARTESIAN_POINT('',(1.35E1,0.E0,3.13125E1)); #4012=LINE('',#4011,#4010); #4013=DIRECTION('',(-1.E0,0.E0,0.E0)); #4014=VECTOR('',#4013,3.E0); #4015=CARTESIAN_POINT('',(1.65E1,6.875E-1,3.13125E1)); #4016=LINE('',#4015,#4014); #4017=CARTESIAN_POINT('',(1.65E1,6.875E-1,3.075E1)); #4018=DIRECTION('',(0.E0,-1.E0,0.E0)); #4019=DIRECTION('',(0.E0,0.E0,-1.E0)); #4020=AXIS2_PLACEMENT_3D('',#4017,#4018,#4019); #4022=DIRECTION('',(1.E0,0.E0,0.E0)); #4023=VECTOR('',#4022,3.E0); #4024=CARTESIAN_POINT('',(1.35E1,6.875E-1,3.01875E1)); #4025=LINE('',#4024,#4023); #4026=CARTESIAN_POINT('',(1.35E1,6.875E-1,3.075E1)); #4027=DIRECTION('',(0.E0,-1.E0,0.E0)); #4028=DIRECTION('',(0.E0,0.E0,1.E0)); #4029=AXIS2_PLACEMENT_3D('',#4026,#4027,#4028); #4031=CARTESIAN_POINT('',(2.239E1,6.875E-1,2.75E1)); #4032=DIRECTION('',(0.E0,-1.E0,0.E0)); #4033=DIRECTION('',(-8.910741301059E-1,0.E0,-4.538577912254E-1)); #4034=AXIS2_PLACEMENT_3D('',#4031,#4032,#4033); #4036=CARTESIAN_POINT('',(1.65E1,6.875E-1,2.45E1)); #4037=DIRECTION('',(0.E0,1.E0,0.E0)); #4038=DIRECTION('',(4.496088413988E-1,0.E0,8.932255536739E-1)); #4039=AXIS2_PLACEMENT_3D('',#4036,#4037,#4038); #4041=CARTESIAN_POINT('',(1.944696065761E1,6.875E-1,3.035464591145E1)); #4042=DIRECTION('',(0.E0,-1.E0,0.E0)); #4043=DIRECTION('',(7.071067811865E-1,0.E0,7.071067811865E-1)); #4044=AXIS2_PLACEMENT_3D('',#4041,#4042,#4043); #4046=DIRECTION('',(-7.071067811865E-1,0.E0,7.071067811865E-1)); #4047=VECTOR('',#4046,4.263248410977E0); #4048=CARTESIAN_POINT('',(2.307459332230E1,6.875E-1,2.795313485357E1)); #4049=LINE('',#4048,#4047); #4050=DIRECTION('',(0.E0,1.E0,0.E0)); #4051=VECTOR('',#4050,6.875E-1); #4052=CARTESIAN_POINT('',(2.307459332230E1,0.E0,2.795313485357E1)); #4053=LINE('',#4052,#4051); #4054=CARTESIAN_POINT('',(2.254426323641E1,0.E0,2.742280476768E1)); #4055=DIRECTION('',(0.E0,1.E0,0.E0)); #4056=DIRECTION('',(7.071067811865E-1,0.E0,7.071067811865E-1)); #4057=AXIS2_PLACEMENT_3D('',#4054,#4055,#4056); #4059=DIRECTION('',(0.E0,1.E0,2.067033413120E-14)); #4060=VECTOR('',#4059,6.875E-1); #4061=CARTESIAN_POINT('',(2.321497295992E1,0.E0,2.708717332281E1)); #4062=LINE('',#4061,#4060); #4063=CARTESIAN_POINT('',(2.254426323641E1,6.875E-1,2.742280476768E1)); #4064=DIRECTION('',(0.E0,-1.E0,0.E0)); #4065=DIRECTION('',(8.942796313519E-1,0.E0,-4.475085931567E-1)); #4066=AXIS2_PLACEMENT_3D('',#4063,#4064,#4065); #4068=DIRECTION('',(0.E0,1.E0,0.E0)); #4069=VECTOR('',#4068,6.875E-1); #4070=CARTESIAN_POINT('',(2.006002146101E1,0.E0,3.096770671486E1)); #4071=LINE('',#4070,#4069); #4072=DIRECTION('',(1.033516706560E-14,1.E0,0.E0)); #4073=VECTOR('',#4072,6.875E-1); #4074=CARTESIAN_POINT('',(1.905715028546E1,0.E0,2.958022033652E1)); #4075=LINE('',#4074,#4073); #4076=DIRECTION('',(-2.067033413120E-14,1.E0,3.100550119680E-14)); #4077=VECTOR('',#4076,6.875E-1); #4078=CARTESIAN_POINT('',(2.156798411498E1,0.E0,2.708131618759E1)); #4079=LINE('',#4078,#4077); #4080=DIRECTION('',(0.E0,1.E0,0.E0)); #4081=VECTOR('',#4080,6.875E-1); #4082=CARTESIAN_POINT('',(2.13075E1,0.E0,8.69E0)); #4083=LINE('',#4082,#4081); #4084=CARTESIAN_POINT('',(2.13075E1,6.875E-1,7.81E0)); #4085=DIRECTION('',(0.E0,1.E0,0.E0)); #4086=DIRECTION('',(0.E0,0.E0,1.E0)); #4087=AXIS2_PLACEMENT_3D('',#4084,#4085,#4086); #4089=DIRECTION('',(0.E0,1.E0,0.E0)); #4090=VECTOR('',#4089,6.875E-1); #4091=CARTESIAN_POINT('',(2.21875E1,0.E0,7.81E0)); #4092=LINE('',#4091,#4090); #4093=CARTESIAN_POINT('',(2.13075E1,0.E0,7.81E0)); #4094=DIRECTION('',(0.E0,-1.E0,0.E0)); #4095=DIRECTION('',(1.E0,0.E0,0.E0)); #4096=AXIS2_PLACEMENT_3D('',#4093,#4094,#4095); #4098=DIRECTION('',(0.E0,-1.E0,0.E0)); #4099=VECTOR('',#4098,6.875E-1); #4100=CARTESIAN_POINT('',(1.96875E1,6.875E-1,9.57E0)); #4101=LINE('',#4100,#4099); #4102=CARTESIAN_POINT('',(2.05675E1,6.875E-1,9.57E0)); #4103=DIRECTION('',(0.E0,-1.E0,0.E0)); #4104=DIRECTION('',(-1.E0,0.E0,0.E0)); #4105=AXIS2_PLACEMENT_3D('',#4102,#4103,#4104); #4107=DIRECTION('',(0.E0,-1.E0,0.E0)); #4108=VECTOR('',#4107,6.875E-1); #4109=CARTESIAN_POINT('',(2.05675E1,6.875E-1,8.69E0)); #4110=LINE('',#4109,#4108); #4111=CARTESIAN_POINT('',(2.05675E1,0.E0,9.57E0)); #4112=DIRECTION('',(0.E0,1.E0,0.E0)); #4113=DIRECTION('',(0.E0,0.E0,-1.E0)); #4114=AXIS2_PLACEMENT_3D('',#4111,#4112,#4113); #4116=DIRECTION('',(0.E0,-1.E0,0.E0)); #4117=VECTOR('',#4116,6.875E-1); #4118=CARTESIAN_POINT('',(2.05675E1,6.875E-1,1.125E1)); #4119=LINE('',#4118,#4117); #4120=CARTESIAN_POINT('',(2.05675E1,6.875E-1,1.037E1)); #4121=DIRECTION('',(0.E0,-1.E0,0.E0)); #4122=DIRECTION('',(0.E0,0.E0,1.E0)); #4123=AXIS2_PLACEMENT_3D('',#4120,#4121,#4122); #4125=DIRECTION('',(0.E0,-1.E0,0.E0)); #4126=VECTOR('',#4125,6.875E-1); #4127=CARTESIAN_POINT('',(1.96875E1,6.875E-1,1.037E1)); #4128=LINE('',#4127,#4126); #4129=CARTESIAN_POINT('',(2.05675E1,0.E0,1.037E1)); #4130=DIRECTION('',(0.E0,1.E0,0.E0)); #4131=DIRECTION('',(-1.E0,0.E0,0.E0)); #4132=AXIS2_PLACEMENT_3D('',#4129,#4130,#4131); #4134=DIRECTION('',(0.E0,-1.E0,0.E0)); #4135=VECTOR('',#4134,6.875E-1); #4136=CARTESIAN_POINT('',(2.53125E1,6.875E-1,1.037E1)); #4137=LINE('',#4136,#4135); #4138=CARTESIAN_POINT('',(2.44325E1,6.875E-1,1.037E1)); #4139=DIRECTION('',(0.E0,-1.E0,0.E0)); #4140=DIRECTION('',(1.E0,0.E0,0.E0)); #4141=AXIS2_PLACEMENT_3D('',#4138,#4139,#4140); #4143=DIRECTION('',(0.E0,-1.E0,0.E0)); #4144=VECTOR('',#4143,6.875E-1); #4145=CARTESIAN_POINT('',(2.44325E1,6.875E-1,1.125E1)); #4146=LINE('',#4145,#4144); #4147=CARTESIAN_POINT('',(2.44325E1,0.E0,1.037E1)); #4148=DIRECTION('',(0.E0,1.E0,0.E0)); #4149=DIRECTION('',(0.E0,0.E0,1.E0)); #4150=AXIS2_PLACEMENT_3D('',#4147,#4148,#4149); #4152=DIRECTION('',(0.E0,-1.E0,0.E0)); #4153=VECTOR('',#4152,6.875E-1); #4154=CARTESIAN_POINT('',(2.44325E1,6.875E-1,8.69E0)); #4155=LINE('',#4154,#4153); #4156=CARTESIAN_POINT('',(2.44325E1,6.875E-1,9.57E0)); #4157=DIRECTION('',(0.E0,-1.E0,0.E0)); #4158=DIRECTION('',(0.E0,0.E0,-1.E0)); #4159=AXIS2_PLACEMENT_3D('',#4156,#4157,#4158); #4161=DIRECTION('',(0.E0,-1.E0,0.E0)); #4162=VECTOR('',#4161,6.875E-1); #4163=CARTESIAN_POINT('',(2.53125E1,6.875E-1,9.57E0)); #4164=LINE('',#4163,#4162); #4165=CARTESIAN_POINT('',(2.44325E1,0.E0,9.57E0)); #4166=DIRECTION('',(0.E0,1.E0,0.E0)); #4167=DIRECTION('',(1.E0,0.E0,0.E0)); #4168=AXIS2_PLACEMENT_3D('',#4165,#4166,#4167); #4170=DIRECTION('',(0.E0,1.E0,0.E0)); #4171=VECTOR('',#4170,6.875E-1); #4172=CARTESIAN_POINT('',(2.331E1,0.E0,7.81E0)); #4173=LINE('',#4172,#4171); #4174=CARTESIAN_POINT('',(2.419E1,6.875E-1,7.81E0)); #4175=DIRECTION('',(0.E0,1.E0,0.E0)); #4176=DIRECTION('',(-1.E0,0.E0,0.E0)); #4177=AXIS2_PLACEMENT_3D('',#4174,#4175,#4176); #4179=DIRECTION('',(0.E0,1.E0,0.E0)); #4180=VECTOR('',#4179,6.875E-1); #4181=CARTESIAN_POINT('',(2.419E1,0.E0,8.69E0)); #4182=LINE('',#4181,#4180); #4183=CARTESIAN_POINT('',(2.419E1,0.E0,7.81E0)); #4184=DIRECTION('',(0.E0,-1.E0,0.E0)); #4185=DIRECTION('',(0.E0,0.E0,1.E0)); #4186=AXIS2_PLACEMENT_3D('',#4183,#4184,#4185); #4188=DIRECTION('',(0.E0,1.E0,1.033516706560E-14)); #4189=VECTOR('',#4188,6.875E-1); #4190=CARTESIAN_POINT('',(2.331E1,0.E0,7.5E0)); #4191=LINE('',#4190,#4189); #4192=DIRECTION('',(0.E0,1.E0,0.E0)); #4193=VECTOR('',#4192,6.875E-1); #4194=CARTESIAN_POINT('',(2.21875E1,0.E0,7.5E0)); #4195=LINE('',#4194,#4193); #4196=DIRECTION('',(-1.E0,0.E0,0.E0)); #4197=VECTOR('',#4196,2.425E-1); #4198=CARTESIAN_POINT('',(2.44325E1,6.875E-1,8.69E0)); #4199=LINE('',#4198,#4197); #4200=DIRECTION('',(0.E0,0.E0,-1.E0)); #4201=VECTOR('',#4200,3.1E-1); #4202=CARTESIAN_POINT('',(2.331E1,6.875E-1,7.81E0)); #4203=LINE('',#4202,#4201); #4204=CARTESIAN_POINT('',(2.274875E1,6.875E-1,7.5E0)); #4205=DIRECTION('',(0.E0,1.E0,0.E0)); #4206=DIRECTION('',(1.E0,0.E0,0.E0)); #4207=AXIS2_PLACEMENT_3D('',#4204,#4205,#4206); #4209=DIRECTION('',(0.E0,0.E0,1.E0)); #4210=VECTOR('',#4209,3.1E-1); #4211=CARTESIAN_POINT('',(2.21875E1,6.875E-1,7.5E0)); #4212=LINE('',#4211,#4210); #4213=DIRECTION('',(-1.E0,0.E0,0.E0)); #4214=VECTOR('',#4213,7.4E-1); #4215=CARTESIAN_POINT('',(2.13075E1,6.875E-1,8.69E0)); #4216=LINE('',#4215,#4214); #4217=DIRECTION('',(0.E0,0.E0,1.E0)); #4218=VECTOR('',#4217,8.E-1); #4219=CARTESIAN_POINT('',(1.96875E1,6.875E-1,9.57E0)); #4220=LINE('',#4219,#4218); #4221=DIRECTION('',(1.E0,0.E0,0.E0)); #4222=VECTOR('',#4221,3.865E0); #4223=CARTESIAN_POINT('',(2.05675E1,6.875E-1,1.125E1)); #4224=LINE('',#4223,#4222); #4225=DIRECTION('',(0.E0,0.E0,-1.E0)); #4226=VECTOR('',#4225,8.E-1); #4227=CARTESIAN_POINT('',(2.53125E1,6.875E-1,1.037E1)); #4228=LINE('',#4227,#4226); #4229=CARTESIAN_POINT('',(2.4E1,0.E0,2.8E1)); #4230=CARTESIAN_POINT('',(2.4E1,1.5E0,2.8E1)); #4231=VERTEX_POINT('',#4229); #4232=VERTEX_POINT('',#4230); #4233=CARTESIAN_POINT('',(2.E1,0.E0,3.2E1)); #4234=CARTESIAN_POINT('',(2.E1,1.5E0,3.2E1)); #4235=VERTEX_POINT('',#4233); #4236=VERTEX_POINT('',#4234); #4237=CARTESIAN_POINT('',(2.E1,0.E0,0.E0)); #4238=CARTESIAN_POINT('',(2.E1,1.5E0,0.E0)); #4239=VERTEX_POINT('',#4237); #4240=VERTEX_POINT('',#4238); #4241=CARTESIAN_POINT('',(2.4E1,0.E0,4.E0)); #4242=CARTESIAN_POINT('',(2.4E1,1.5E0,4.E0)); #4243=VERTEX_POINT('',#4241); #4244=VERTEX_POINT('',#4242); #4245=CARTESIAN_POINT('',(4.E0,0.E0,3.2E1)); #4246=CARTESIAN_POINT('',(4.E0,1.5E0,3.2E1)); #4247=VERTEX_POINT('',#4245); #4248=VERTEX_POINT('',#4246); #4249=CARTESIAN_POINT('',(0.E0,0.E0,2.8E1)); #4250=CARTESIAN_POINT('',(0.E0,1.5E0,2.8E1)); #4251=VERTEX_POINT('',#4249); #4252=VERTEX_POINT('',#4250); #4253=CARTESIAN_POINT('',(0.E0,0.E0,4.E0)); #4254=CARTESIAN_POINT('',(0.E0,1.5E0,4.E0)); #4255=VERTEX_POINT('',#4253); #4256=VERTEX_POINT('',#4254); #4257=CARTESIAN_POINT('',(4.E0,0.E0,0.E0)); #4258=CARTESIAN_POINT('',(4.E0,1.5E0,0.E0)); #4259=VERTEX_POINT('',#4257); #4260=VERTEX_POINT('',#4258); #4261=CARTESIAN_POINT('',(7.5E0,1.5E0,2.5E0)); #4262=CARTESIAN_POINT('',(7.5E0,0.E0,2.5E0)); #4263=VERTEX_POINT('',#4261); #4264=VERTEX_POINT('',#4262); #4265=CARTESIAN_POINT('',(1.65E1,1.5E0,2.5E0)); #4266=CARTESIAN_POINT('',(1.65E1,0.E0,2.5E0)); #4267=VERTEX_POINT('',#4265); #4268=VERTEX_POINT('',#4266); #4269=CARTESIAN_POINT('',(7.5E0,1.5E0,2.95E1)); #4270=CARTESIAN_POINT('',(7.5E0,0.E0,2.95E1)); #4271=VERTEX_POINT('',#4269); #4272=VERTEX_POINT('',#4270); #4273=CARTESIAN_POINT('',(2.5E0,1.5E0,2.45E1)); #4274=CARTESIAN_POINT('',(2.5E0,0.E0,2.45E1)); #4275=VERTEX_POINT('',#4273); #4276=VERTEX_POINT('',#4274); #4277=CARTESIAN_POINT('',(2.15E1,1.5E0,2.45E1)); #4278=CARTESIAN_POINT('',(2.15E1,0.E0,2.45E1)); #4279=VERTEX_POINT('',#4277); #4280=VERTEX_POINT('',#4278); #4281=CARTESIAN_POINT('',(1.65E1,1.5E0,2.95E1)); #4282=CARTESIAN_POINT('',(1.65E1,0.E0,2.95E1)); #4283=VERTEX_POINT('',#4281); #4284=VERTEX_POINT('',#4282); #4285=CARTESIAN_POINT('',(5.E0,1.15E1,8.E0)); #4286=CARTESIAN_POINT('',(3.E0,1.15E1,8.E0)); #4287=VERTEX_POINT('',#4285); #4288=VERTEX_POINT('',#4286); #4289=CARTESIAN_POINT('',(-2.E0,2.5E0,8.E0)); #4290=VERTEX_POINT('',#4289); #4291=CARTESIAN_POINT('',(5.E0,1.15E1,1.E1)); #4292=CARTESIAN_POINT('',(3.E0,1.15E1,1.E1)); #4293=VERTEX_POINT('',#4291); #4294=VERTEX_POINT('',#4292); #4295=CARTESIAN_POINT('',(-2.E0,2.5E0,1.E1)); #4296=VERTEX_POINT('',#4295); #4297=CARTESIAN_POINT('',(-2.E0,1.5E0,1.E1)); #4298=VERTEX_POINT('',#4297); #4299=CARTESIAN_POINT('',(-2.E0,0.E0,8.E0)); #4300=VERTEX_POINT('',#4299); #4301=CARTESIAN_POINT('',(2.5E0,1.5E0,1.325E1)); #4302=CARTESIAN_POINT('',(2.5E0,0.E0,1.325E1)); #4303=VERTEX_POINT('',#4301); #4304=VERTEX_POINT('',#4302); #4305=CARTESIAN_POINT('',(3.5E0,1.5E0,1.225E1)); #4306=CARTESIAN_POINT('',(3.5E0,0.E0,1.225E1)); #4307=VERTEX_POINT('',#4305); #4308=VERTEX_POINT('',#4306); #4309=CARTESIAN_POINT('',(0.E0,0.E0,1.325E1)); #4310=CARTESIAN_POINT('',(0.E0,1.5E0,1.325E1)); #4311=VERTEX_POINT('',#4309); #4312=VERTEX_POINT('',#4310); #4313=CARTESIAN_POINT('',(-1.E0,0.E0,1.225E1)); #4314=CARTESIAN_POINT('',(-1.E0,1.5E0,1.225E1)); #4315=VERTEX_POINT('',#4313); #4316=VERTEX_POINT('',#4314); #4317=CARTESIAN_POINT('',(0.E0,1.5E0,7.E0)); #4318=CARTESIAN_POINT('',(0.E0,0.E0,7.E0)); #4319=VERTEX_POINT('',#4317); #4320=VERTEX_POINT('',#4318); #4321=CARTESIAN_POINT('',(-1.E0,1.5E0,8.E0)); #4322=CARTESIAN_POINT('',(-1.E0,0.E0,8.E0)); #4323=VERTEX_POINT('',#4321); #4324=VERTEX_POINT('',#4322); #4325=CARTESIAN_POINT('',(3.531373033403E0,1.5E0,8.E0)); #4326=CARTESIAN_POINT('',(3.531373033403E0,0.E0,8.E0)); #4327=VERTEX_POINT('',#4325); #4328=VERTEX_POINT('',#4326); #4329=CARTESIAN_POINT('',(2.539216291754E0,1.5E0,6.875E0)); #4330=CARTESIAN_POINT('',(2.539216291754E0,0.E0,6.875E0)); #4331=VERTEX_POINT('',#4329); #4332=VERTEX_POINT('',#4330); #4333=CARTESIAN_POINT('',(5.E0,0.E0,1.175E1)); #4334=CARTESIAN_POINT('',(5.E0,1.5E0,1.175E1)); #4335=VERTEX_POINT('',#4333); #4336=VERTEX_POINT('',#4334); #4337=CARTESIAN_POINT('',(4.5E0,0.E0,1.225E1)); #4338=CARTESIAN_POINT('',(4.5E0,1.5E0,1.225E1)); #4339=VERTEX_POINT('',#4337); #4340=VERTEX_POINT('',#4338); #4341=CARTESIAN_POINT('',(-1.5E0,0.E0,1.225E1)); #4342=CARTESIAN_POINT('',(-1.5E0,1.5E0,1.225E1)); #4343=VERTEX_POINT('',#4341); #4344=VERTEX_POINT('',#4342); #4345=CARTESIAN_POINT('',(-2.E0,0.E0,1.175E1)); #4346=CARTESIAN_POINT('',(-2.E0,1.5E0,1.175E1)); #4347=VERTEX_POINT('',#4345); #4348=VERTEX_POINT('',#4346); #4349=CARTESIAN_POINT('',(4.095E0,1.1125E1,9.E0)); #4350=CARTESIAN_POINT('',(3.905E0,1.1125E1,9.E0)); #4351=VERTEX_POINT('',#4349); #4352=VERTEX_POINT('',#4350); #4353=CARTESIAN_POINT('',(4.095E0,1.15E1,9.E0)); #4354=CARTESIAN_POINT('',(3.905E0,1.15E1,9.E0)); #4355=VERTEX_POINT('',#4353); #4356=VERTEX_POINT('',#4354); #4357=CARTESIAN_POINT('',(3.929917478528E0,1.125E1,9.132582521472E0)); #4358=CARTESIAN_POINT('',(3.804917478528E0,1.125E1,9.132582521472E0)); #4359=VERTEX_POINT('',#4357); #4360=VERTEX_POINT('',#4358); #4361=CARTESIAN_POINT('',(3.929917478528E0,1.15E1,9.132582521472E0)); #4362=CARTESIAN_POINT('',(3.804917478528E0,1.15E1,9.132582521472E0)); #4363=VERTEX_POINT('',#4361); #4364=VERTEX_POINT('',#4362); #4365=CARTESIAN_POINT('',(6.45E0,1.192264973081E0,2.975E1)); #4366=CARTESIAN_POINT('',(6.55E0,1.25E0,2.975E1)); #4367=VERTEX_POINT('',#4365); #4368=VERTEX_POINT('',#4366); #4369=CARTESIAN_POINT('',(6.35E0,1.25E0,2.975E1)); #4370=VERTEX_POINT('',#4369); #4371=CARTESIAN_POINT('',(6.35E0,1.5E0,2.975E1)); #4372=CARTESIAN_POINT('',(6.55E0,1.5E0,2.975E1)); #4373=VERTEX_POINT('',#4371); #4374=VERTEX_POINT('',#4372); #4375=CARTESIAN_POINT('',(7.45E0,1.192264973081E0,2.975E1)); #4376=CARTESIAN_POINT('',(7.55E0,1.25E0,2.975E1)); #4377=VERTEX_POINT('',#4375); #4378=VERTEX_POINT('',#4376); #4379=CARTESIAN_POINT('',(7.35E0,1.25E0,2.975E1)); #4380=VERTEX_POINT('',#4379); #4381=CARTESIAN_POINT('',(7.35E0,1.5E0,2.975E1)); #4382=CARTESIAN_POINT('',(7.55E0,1.5E0,2.975E1)); #4383=VERTEX_POINT('',#4381); #4384=VERTEX_POINT('',#4382); #4385=CARTESIAN_POINT('',(2.1E1,1.15E1,8.E0)); #4386=CARTESIAN_POINT('',(1.9E1,1.15E1,8.E0)); #4387=VERTEX_POINT('',#4385); #4388=VERTEX_POINT('',#4386); #4389=CARTESIAN_POINT('',(2.6E1,2.5E0,8.E0)); #4390=VERTEX_POINT('',#4389); #4391=CARTESIAN_POINT('',(1.9E1,1.15E1,1.E1)); #4392=CARTESIAN_POINT('',(2.1E1,1.15E1,1.E1)); #4393=VERTEX_POINT('',#4391); #4394=VERTEX_POINT('',#4392); #4395=CARTESIAN_POINT('',(2.6E1,2.5E0,1.E1)); #4396=VERTEX_POINT('',#4395); #4397=CARTESIAN_POINT('',(2.6E1,1.5E0,1.E1)); #4398=VERTEX_POINT('',#4397); #4399=CARTESIAN_POINT('',(2.6E1,0.E0,8.E0)); #4400=VERTEX_POINT('',#4399); #4401=CARTESIAN_POINT('',(2.4E1,1.5E0,1.325E1)); #4402=CARTESIAN_POINT('',(2.4E1,0.E0,1.325E1)); #4403=VERTEX_POINT('',#4401); #4404=VERTEX_POINT('',#4402); #4405=CARTESIAN_POINT('',(2.5E1,1.5E0,1.225E1)); #4406=CARTESIAN_POINT('',(2.5E1,0.E0,1.225E1)); #4407=VERTEX_POINT('',#4405); #4408=VERTEX_POINT('',#4406); #4409=CARTESIAN_POINT('',(2.15E1,0.E0,1.325E1)); #4410=CARTESIAN_POINT('',(2.15E1,1.5E0,1.325E1)); #4411=VERTEX_POINT('',#4409); #4412=VERTEX_POINT('',#4410); #4413=CARTESIAN_POINT('',(2.05E1,0.E0,1.225E1)); #4414=CARTESIAN_POINT('',(2.05E1,1.5E0,1.225E1)); #4415=VERTEX_POINT('',#4413); #4416=VERTEX_POINT('',#4414); #4417=CARTESIAN_POINT('',(2.4E1,0.E0,7.E0)); #4418=CARTESIAN_POINT('',(2.4E1,1.5E0,7.E0)); #4419=VERTEX_POINT('',#4417); #4420=VERTEX_POINT('',#4418); #4421=CARTESIAN_POINT('',(2.5E1,0.E0,8.E0)); #4422=CARTESIAN_POINT('',(2.5E1,1.5E0,8.E0)); #4423=VERTEX_POINT('',#4421); #4424=VERTEX_POINT('',#4422); #4425=CARTESIAN_POINT('',(2.046862696660E1,0.E0,8.E0)); #4426=CARTESIAN_POINT('',(2.046862696660E1,1.5E0,8.E0)); #4427=VERTEX_POINT('',#4425); #4428=VERTEX_POINT('',#4426); #4429=CARTESIAN_POINT('',(2.146078370825E1,0.E0,6.875E0)); #4430=CARTESIAN_POINT('',(2.146078370825E1,1.5E0,6.875E0)); #4431=VERTEX_POINT('',#4429); #4432=VERTEX_POINT('',#4430); #4433=CARTESIAN_POINT('',(1.9E1,1.5E0,1.175E1)); #4434=CARTESIAN_POINT('',(1.9E1,0.E0,1.175E1)); #4435=VERTEX_POINT('',#4433); #4436=VERTEX_POINT('',#4434); #4437=CARTESIAN_POINT('',(1.95E1,1.5E0,1.225E1)); #4438=CARTESIAN_POINT('',(1.95E1,0.E0,1.225E1)); #4439=VERTEX_POINT('',#4437); #4440=VERTEX_POINT('',#4438); #4441=CARTESIAN_POINT('',(2.55E1,1.5E0,1.225E1)); #4442=CARTESIAN_POINT('',(2.55E1,0.E0,1.225E1)); #4443=VERTEX_POINT('',#4441); #4444=VERTEX_POINT('',#4442); #4445=CARTESIAN_POINT('',(2.6E1,1.5E0,1.175E1)); #4446=CARTESIAN_POINT('',(2.6E1,0.E0,1.175E1)); #4447=VERTEX_POINT('',#4445); #4448=VERTEX_POINT('',#4446); #4449=CARTESIAN_POINT('',(1.9905E1,1.1125E1,9.E0)); #4450=CARTESIAN_POINT('',(2.0095E1,1.1125E1,9.E0)); #4451=VERTEX_POINT('',#4449); #4452=VERTEX_POINT('',#4450); #4453=CARTESIAN_POINT('',(1.9905E1,1.15E1,9.E0)); #4454=CARTESIAN_POINT('',(2.0095E1,1.15E1,9.E0)); #4455=VERTEX_POINT('',#4453); #4456=VERTEX_POINT('',#4454); #4457=CARTESIAN_POINT('',(2.007008252147E1,1.125E1,9.132582521472E0)); #4458=CARTESIAN_POINT('',(2.019508252147E1,1.125E1,9.132582521472E0)); #4459=VERTEX_POINT('',#4457); #4460=VERTEX_POINT('',#4458); #4461=CARTESIAN_POINT('',(2.007008252147E1,1.15E1,9.132582521472E0)); #4462=CARTESIAN_POINT('',(2.019508252147E1,1.15E1,9.132582521472E0)); #4463=VERTEX_POINT('',#4461); #4464=VERTEX_POINT('',#4462); #4465=CARTESIAN_POINT('',(1.755E1,1.192264973081E0,2.975E1)); #4466=CARTESIAN_POINT('',(1.745E1,1.25E0,2.975E1)); #4467=VERTEX_POINT('',#4465); #4468=VERTEX_POINT('',#4466); #4469=CARTESIAN_POINT('',(1.765E1,1.25E0,2.975E1)); #4470=VERTEX_POINT('',#4469); #4471=CARTESIAN_POINT('',(1.765E1,1.5E0,2.975E1)); #4472=CARTESIAN_POINT('',(1.745E1,1.5E0,2.975E1)); #4473=VERTEX_POINT('',#4471); #4474=VERTEX_POINT('',#4472); #4475=CARTESIAN_POINT('',(1.655E1,1.192264973081E0,2.975E1)); #4476=CARTESIAN_POINT('',(1.645E1,1.25E0,2.975E1)); #4477=VERTEX_POINT('',#4475); #4478=VERTEX_POINT('',#4476); #4479=CARTESIAN_POINT('',(1.665E1,1.25E0,2.975E1)); #4480=VERTEX_POINT('',#4479); #4481=CARTESIAN_POINT('',(1.665E1,1.5E0,2.975E1)); #4482=CARTESIAN_POINT('',(1.645E1,1.5E0,2.975E1)); #4483=VERTEX_POINT('',#4481); #4484=VERTEX_POINT('',#4482); #4485=CARTESIAN_POINT('',(1.3175E0,0.E0,6.E0)); #4486=CARTESIAN_POINT('',(9.325E-1,0.E0,6.E0)); #4487=VERTEX_POINT('',#4485); #4488=VERTEX_POINT('',#4486); #4489=CARTESIAN_POINT('',(1.3825E0,1.E0,6.E0)); #4490=CARTESIAN_POINT('',(8.675E-1,1.E0,6.E0)); #4491=VERTEX_POINT('',#4489); #4492=VERTEX_POINT('',#4490); #4493=CARTESIAN_POINT('',(1.3825E0,1.5E0,6.E0)); #4494=CARTESIAN_POINT('',(8.675E-1,1.5E0,6.E0)); #4495=VERTEX_POINT('',#4493); #4496=VERTEX_POINT('',#4494); #4497=CARTESIAN_POINT('',(1.3175E0,1.E0,6.E0)); #4498=CARTESIAN_POINT('',(9.325E-1,1.E0,6.E0)); #4499=VERTEX_POINT('',#4497); #4500=VERTEX_POINT('',#4498); #4501=CARTESIAN_POINT('',(1.3175E0,0.E0,1.2E1)); #4502=CARTESIAN_POINT('',(9.325E-1,0.E0,1.2E1)); #4503=VERTEX_POINT('',#4501); #4504=VERTEX_POINT('',#4502); #4505=CARTESIAN_POINT('',(1.3175E0,0.E0,1.8E1)); #4506=CARTESIAN_POINT('',(9.325E-1,0.E0,1.8E1)); #4507=VERTEX_POINT('',#4505); #4508=VERTEX_POINT('',#4506); #4509=CARTESIAN_POINT('',(1.3175E0,0.E0,2.4E1)); #4510=CARTESIAN_POINT('',(9.325E-1,0.E0,2.4E1)); #4511=VERTEX_POINT('',#4509); #4512=VERTEX_POINT('',#4510); #4513=CARTESIAN_POINT('',(2.30675E1,0.E0,6.E0)); #4514=CARTESIAN_POINT('',(2.26825E1,0.E0,6.E0)); #4515=VERTEX_POINT('',#4513); #4516=VERTEX_POINT('',#4514); #4517=CARTESIAN_POINT('',(2.30675E1,0.E0,1.2E1)); #4518=CARTESIAN_POINT('',(2.26825E1,0.E0,1.2E1)); #4519=VERTEX_POINT('',#4517); #4520=VERTEX_POINT('',#4518); #4521=CARTESIAN_POINT('',(2.30675E1,0.E0,1.8E1)); #4522=CARTESIAN_POINT('',(2.26825E1,0.E0,1.8E1)); #4523=VERTEX_POINT('',#4521); #4524=VERTEX_POINT('',#4522); #4525=CARTESIAN_POINT('',(2.30675E1,0.E0,2.4E1)); #4526=CARTESIAN_POINT('',(2.26825E1,0.E0,2.4E1)); #4527=VERTEX_POINT('',#4525); #4528=VERTEX_POINT('',#4526); #4529=CARTESIAN_POINT('',(1.3825E0,1.E0,1.2E1)); #4530=CARTESIAN_POINT('',(8.675E-1,1.E0,1.2E1)); #4531=VERTEX_POINT('',#4529); #4532=VERTEX_POINT('',#4530); #4533=CARTESIAN_POINT('',(1.3175E0,1.E0,1.2E1)); #4534=CARTESIAN_POINT('',(9.325E-1,1.E0,1.2E1)); #4535=VERTEX_POINT('',#4533); #4536=VERTEX_POINT('',#4534); #4537=CARTESIAN_POINT('',(1.3825E0,1.E0,1.8E1)); #4538=CARTESIAN_POINT('',(8.675E-1,1.E0,1.8E1)); #4539=VERTEX_POINT('',#4537); #4540=VERTEX_POINT('',#4538); #4541=CARTESIAN_POINT('',(1.3825E0,1.5E0,1.8E1)); #4542=CARTESIAN_POINT('',(8.675E-1,1.5E0,1.8E1)); #4543=VERTEX_POINT('',#4541); #4544=VERTEX_POINT('',#4542); #4545=CARTESIAN_POINT('',(1.3175E0,1.E0,1.8E1)); #4546=CARTESIAN_POINT('',(9.325E-1,1.E0,1.8E1)); #4547=VERTEX_POINT('',#4545); #4548=VERTEX_POINT('',#4546); #4549=CARTESIAN_POINT('',(1.3825E0,1.E0,2.4E1)); #4550=CARTESIAN_POINT('',(8.675E-1,1.E0,2.4E1)); #4551=VERTEX_POINT('',#4549); #4552=VERTEX_POINT('',#4550); #4553=CARTESIAN_POINT('',(1.3825E0,1.5E0,2.4E1)); #4554=CARTESIAN_POINT('',(8.675E-1,1.5E0,2.4E1)); #4555=VERTEX_POINT('',#4553); #4556=VERTEX_POINT('',#4554); #4557=CARTESIAN_POINT('',(1.3175E0,1.E0,2.4E1)); #4558=CARTESIAN_POINT('',(9.325E-1,1.E0,2.4E1)); #4559=VERTEX_POINT('',#4557); #4560=VERTEX_POINT('',#4558); #4561=CARTESIAN_POINT('',(2.31325E1,1.E0,6.E0)); #4562=CARTESIAN_POINT('',(2.26175E1,1.E0,6.E0)); #4563=VERTEX_POINT('',#4561); #4564=VERTEX_POINT('',#4562); #4565=CARTESIAN_POINT('',(2.31325E1,1.5E0,6.E0)); #4566=CARTESIAN_POINT('',(2.26175E1,1.5E0,6.E0)); #4567=VERTEX_POINT('',#4565); #4568=VERTEX_POINT('',#4566); #4569=CARTESIAN_POINT('',(2.30675E1,1.E0,6.E0)); #4570=CARTESIAN_POINT('',(2.26825E1,1.E0,6.E0)); #4571=VERTEX_POINT('',#4569); #4572=VERTEX_POINT('',#4570); #4573=CARTESIAN_POINT('',(2.31325E1,1.E0,1.2E1)); #4574=CARTESIAN_POINT('',(2.26175E1,1.E0,1.2E1)); #4575=VERTEX_POINT('',#4573); #4576=VERTEX_POINT('',#4574); #4577=CARTESIAN_POINT('',(2.30675E1,1.E0,1.2E1)); #4578=CARTESIAN_POINT('',(2.26825E1,1.E0,1.2E1)); #4579=VERTEX_POINT('',#4577); #4580=VERTEX_POINT('',#4578); #4581=CARTESIAN_POINT('',(2.31325E1,1.E0,1.8E1)); #4582=CARTESIAN_POINT('',(2.26175E1,1.E0,1.8E1)); #4583=VERTEX_POINT('',#4581); #4584=VERTEX_POINT('',#4582); #4585=CARTESIAN_POINT('',(2.31325E1,1.5E0,1.8E1)); #4586=CARTESIAN_POINT('',(2.26175E1,1.5E0,1.8E1)); #4587=VERTEX_POINT('',#4585); #4588=VERTEX_POINT('',#4586); #4589=CARTESIAN_POINT('',(2.30675E1,1.E0,1.8E1)); #4590=CARTESIAN_POINT('',(2.26825E1,1.E0,1.8E1)); #4591=VERTEX_POINT('',#4589); #4592=VERTEX_POINT('',#4590); #4593=CARTESIAN_POINT('',(2.31325E1,1.E0,2.4E1)); #4594=CARTESIAN_POINT('',(2.26175E1,1.E0,2.4E1)); #4595=VERTEX_POINT('',#4593); #4596=VERTEX_POINT('',#4594); #4597=CARTESIAN_POINT('',(2.31325E1,1.5E0,2.4E1)); #4598=CARTESIAN_POINT('',(2.26175E1,1.5E0,2.4E1)); #4599=VERTEX_POINT('',#4597); #4600=VERTEX_POINT('',#4598); #4601=CARTESIAN_POINT('',(2.30675E1,1.E0,2.4E1)); #4602=CARTESIAN_POINT('',(2.26825E1,1.E0,2.4E1)); #4603=VERTEX_POINT('',#4601); #4604=VERTEX_POINT('',#4602); #4605=CARTESIAN_POINT('',(6.1925E0,0.E0,1.25E0)); #4606=CARTESIAN_POINT('',(5.8075E0,0.E0,1.25E0)); #4607=VERTEX_POINT('',#4605); #4608=VERTEX_POINT('',#4606); #4609=CARTESIAN_POINT('',(6.256E0,1.E0,1.25E0)); #4610=CARTESIAN_POINT('',(5.744E0,1.E0,1.25E0)); #4611=VERTEX_POINT('',#4609); #4612=VERTEX_POINT('',#4610); #4613=CARTESIAN_POINT('',(6.256E0,1.5E0,1.25E0)); #4614=CARTESIAN_POINT('',(5.744E0,1.5E0,1.25E0)); #4615=VERTEX_POINT('',#4613); #4616=VERTEX_POINT('',#4614); #4617=CARTESIAN_POINT('',(6.1925E0,1.E0,1.25E0)); #4618=CARTESIAN_POINT('',(5.8075E0,1.E0,1.25E0)); #4619=VERTEX_POINT('',#4617); #4620=VERTEX_POINT('',#4618); #4621=CARTESIAN_POINT('',(1.21925E1,0.E0,1.25E0)); #4622=CARTESIAN_POINT('',(1.18075E1,0.E0,1.25E0)); #4623=VERTEX_POINT('',#4621); #4624=VERTEX_POINT('',#4622); #4625=CARTESIAN_POINT('',(6.1925E0,0.E0,3.075E1)); #4626=CARTESIAN_POINT('',(5.8075E0,0.E0,3.075E1)); #4627=VERTEX_POINT('',#4625); #4628=VERTEX_POINT('',#4626); #4629=CARTESIAN_POINT('',(1.21925E1,0.E0,3.075E1)); #4630=CARTESIAN_POINT('',(1.18075E1,0.E0,3.075E1)); #4631=VERTEX_POINT('',#4629); #4632=VERTEX_POINT('',#4630); #4633=CARTESIAN_POINT('',(1.81925E1,0.E0,1.25E0)); #4634=CARTESIAN_POINT('',(1.78075E1,0.E0,1.25E0)); #4635=VERTEX_POINT('',#4633); #4636=VERTEX_POINT('',#4634); #4637=CARTESIAN_POINT('',(1.81925E1,0.E0,3.075E1)); #4638=CARTESIAN_POINT('',(1.78075E1,0.E0,3.075E1)); #4639=VERTEX_POINT('',#4637); #4640=VERTEX_POINT('',#4638); #4641=CARTESIAN_POINT('',(1.2256E1,1.E0,1.25E0)); #4642=CARTESIAN_POINT('',(1.1744E1,1.E0,1.25E0)); #4643=VERTEX_POINT('',#4641); #4644=VERTEX_POINT('',#4642); #4645=CARTESIAN_POINT('',(1.2256E1,1.5E0,1.25E0)); #4646=CARTESIAN_POINT('',(1.1744E1,1.5E0,1.25E0)); #4647=VERTEX_POINT('',#4645); #4648=VERTEX_POINT('',#4646); #4649=CARTESIAN_POINT('',(1.21925E1,1.E0,1.25E0)); #4650=CARTESIAN_POINT('',(1.18075E1,1.E0,1.25E0)); #4651=VERTEX_POINT('',#4649); #4652=VERTEX_POINT('',#4650); #4653=CARTESIAN_POINT('',(1.8256E1,1.E0,1.25E0)); #4654=CARTESIAN_POINT('',(1.7744E1,1.E0,1.25E0)); #4655=VERTEX_POINT('',#4653); #4656=VERTEX_POINT('',#4654); #4657=CARTESIAN_POINT('',(1.8256E1,1.5E0,1.25E0)); #4658=CARTESIAN_POINT('',(1.7744E1,1.5E0,1.25E0)); #4659=VERTEX_POINT('',#4657); #4660=VERTEX_POINT('',#4658); #4661=CARTESIAN_POINT('',(1.81925E1,1.E0,1.25E0)); #4662=CARTESIAN_POINT('',(1.78075E1,1.E0,1.25E0)); #4663=VERTEX_POINT('',#4661); #4664=VERTEX_POINT('',#4662); #4665=CARTESIAN_POINT('',(6.256E0,1.E0,3.075E1)); #4666=CARTESIAN_POINT('',(5.744E0,1.E0,3.075E1)); #4667=VERTEX_POINT('',#4665); #4668=VERTEX_POINT('',#4666); #4669=CARTESIAN_POINT('',(6.256E0,1.5E0,3.075E1)); #4670=CARTESIAN_POINT('',(5.744E0,1.5E0,3.075E1)); #4671=VERTEX_POINT('',#4669); #4672=VERTEX_POINT('',#4670); #4673=CARTESIAN_POINT('',(6.1925E0,1.E0,3.075E1)); #4674=CARTESIAN_POINT('',(5.8075E0,1.E0,3.075E1)); #4675=VERTEX_POINT('',#4673); #4676=VERTEX_POINT('',#4674); #4677=CARTESIAN_POINT('',(1.2256E1,1.E0,3.075E1)); #4678=CARTESIAN_POINT('',(1.1744E1,1.E0,3.075E1)); #4679=VERTEX_POINT('',#4677); #4680=VERTEX_POINT('',#4678); #4681=CARTESIAN_POINT('',(1.2256E1,1.5E0,3.075E1)); #4682=CARTESIAN_POINT('',(1.1744E1,1.5E0,3.075E1)); #4683=VERTEX_POINT('',#4681); #4684=VERTEX_POINT('',#4682); #4685=CARTESIAN_POINT('',(1.21925E1,1.E0,3.075E1)); #4686=CARTESIAN_POINT('',(1.18075E1,1.E0,3.075E1)); #4687=VERTEX_POINT('',#4685); #4688=VERTEX_POINT('',#4686); #4689=CARTESIAN_POINT('',(1.8256E1,1.E0,3.075E1)); #4690=CARTESIAN_POINT('',(1.7744E1,1.E0,3.075E1)); #4691=VERTEX_POINT('',#4689); #4692=VERTEX_POINT('',#4690); #4693=CARTESIAN_POINT('',(1.8256E1,1.5E0,3.075E1)); #4694=CARTESIAN_POINT('',(1.7744E1,1.5E0,3.075E1)); #4695=VERTEX_POINT('',#4693); #4696=VERTEX_POINT('',#4694); #4697=CARTESIAN_POINT('',(1.81925E1,1.E0,3.075E1)); #4698=CARTESIAN_POINT('',(1.78075E1,1.E0,3.075E1)); #4699=VERTEX_POINT('',#4697); #4700=VERTEX_POINT('',#4698); #4701=CARTESIAN_POINT('',(4.4125E0,1.05E1,8.E0)); #4702=CARTESIAN_POINT('',(4.0875E0,1.05E1,8.E0)); #4703=VERTEX_POINT('',#4701); #4704=VERTEX_POINT('',#4702); #4705=CARTESIAN_POINT('',(4.4125E0,1.05E1,1.E1)); #4706=CARTESIAN_POINT('',(4.0875E0,1.05E1,1.E1)); #4707=VERTEX_POINT('',#4705); #4708=VERTEX_POINT('',#4706); #4709=CARTESIAN_POINT('',(4.345E0,1.09375E1,8.25E0)); #4710=CARTESIAN_POINT('',(4.155E0,1.09375E1,8.25E0)); #4711=VERTEX_POINT('',#4709); #4712=VERTEX_POINT('',#4710); #4713=CARTESIAN_POINT('',(4.345E0,1.09375E1,8.E0)); #4714=CARTESIAN_POINT('',(4.155E0,1.09375E1,8.E0)); #4715=VERTEX_POINT('',#4713); #4716=VERTEX_POINT('',#4714); #4717=CARTESIAN_POINT('',(3.9075E0,1.05E1,8.25E0)); #4718=CARTESIAN_POINT('',(3.7175E0,1.05E1,8.25E0)); #4719=VERTEX_POINT('',#4717); #4720=VERTEX_POINT('',#4718); #4721=CARTESIAN_POINT('',(3.9075E0,1.05E1,8.E0)); #4722=CARTESIAN_POINT('',(3.7175E0,1.05E1,8.E0)); #4723=VERTEX_POINT('',#4721); #4724=VERTEX_POINT('',#4722); #4725=CARTESIAN_POINT('',(4.345E0,1.00625E1,8.25E0)); #4726=CARTESIAN_POINT('',(4.155E0,1.00625E1,8.25E0)); #4727=VERTEX_POINT('',#4725); #4728=VERTEX_POINT('',#4726); #4729=CARTESIAN_POINT('',(4.345E0,1.00625E1,8.E0)); #4730=CARTESIAN_POINT('',(4.155E0,1.00625E1,8.E0)); #4731=VERTEX_POINT('',#4729); #4732=VERTEX_POINT('',#4730); #4733=CARTESIAN_POINT('',(1.95875E1,1.05E1,8.E0)); #4734=CARTESIAN_POINT('',(1.99125E1,1.05E1,8.E0)); #4735=VERTEX_POINT('',#4733); #4736=VERTEX_POINT('',#4734); #4737=CARTESIAN_POINT('',(1.95875E1,1.05E1,1.E1)); #4738=CARTESIAN_POINT('',(1.99125E1,1.05E1,1.E1)); #4739=VERTEX_POINT('',#4737); #4740=VERTEX_POINT('',#4738); #4741=CARTESIAN_POINT('',(1.9655E1,1.09375E1,8.25E0)); #4742=CARTESIAN_POINT('',(1.9845E1,1.09375E1,8.25E0)); #4743=VERTEX_POINT('',#4741); #4744=VERTEX_POINT('',#4742); #4745=CARTESIAN_POINT('',(1.9655E1,1.09375E1,8.E0)); #4746=CARTESIAN_POINT('',(1.9845E1,1.09375E1,8.E0)); #4747=VERTEX_POINT('',#4745); #4748=VERTEX_POINT('',#4746); #4749=CARTESIAN_POINT('',(2.00925E1,1.05E1,8.25E0)); #4750=CARTESIAN_POINT('',(2.02825E1,1.05E1,8.25E0)); #4751=VERTEX_POINT('',#4749); #4752=VERTEX_POINT('',#4750); #4753=CARTESIAN_POINT('',(2.00925E1,1.05E1,8.E0)); #4754=CARTESIAN_POINT('',(2.02825E1,1.05E1,8.E0)); #4755=VERTEX_POINT('',#4753); #4756=VERTEX_POINT('',#4754); #4757=CARTESIAN_POINT('',(1.9655E1,1.00625E1,8.25E0)); #4758=CARTESIAN_POINT('',(1.9845E1,1.00625E1,8.25E0)); #4759=VERTEX_POINT('',#4757); #4760=VERTEX_POINT('',#4758); #4761=CARTESIAN_POINT('',(1.9655E1,1.00625E1,8.E0)); #4762=CARTESIAN_POINT('',(1.9845E1,1.00625E1,8.E0)); #4763=VERTEX_POINT('',#4761); #4764=VERTEX_POINT('',#4762); #4765=CARTESIAN_POINT('',(5.E0,1.5E0,8.E0)); #4766=CARTESIAN_POINT('',(1.9E1,1.5E0,8.E0)); #4767=VERTEX_POINT('',#4765); #4768=VERTEX_POINT('',#4766); #4769=CARTESIAN_POINT('',(5.E0,1.5E0,1.1E1)); #4770=CARTESIAN_POINT('',(5.E0,0.E0,1.1E1)); #4771=VERTEX_POINT('',#4769); #4772=VERTEX_POINT('',#4770); #4773=CARTESIAN_POINT('',(6.E0,1.5E0,1.E1)); #4774=CARTESIAN_POINT('',(6.E0,0.E0,1.E1)); #4775=VERTEX_POINT('',#4773); #4776=VERTEX_POINT('',#4774); #4777=CARTESIAN_POINT('',(1.9E1,0.E0,1.1E1)); #4778=CARTESIAN_POINT('',(1.9E1,1.5E0,1.1E1)); #4779=VERTEX_POINT('',#4777); #4780=VERTEX_POINT('',#4778); #4781=CARTESIAN_POINT('',(1.8E1,0.E0,1.E1)); #4782=CARTESIAN_POINT('',(1.8E1,1.5E0,1.E1)); #4783=VERTEX_POINT('',#4781); #4784=VERTEX_POINT('',#4782); #4785=CARTESIAN_POINT('',(5.E0,1.5E0,1.E1)); #4786=VERTEX_POINT('',#4785); #4787=CARTESIAN_POINT('',(1.9E1,1.5E0,1.E1)); #4788=VERTEX_POINT('',#4787); #4789=CARTESIAN_POINT('',(2.5E0,1.5E0,2.19375E1)); #4790=CARTESIAN_POINT('',(2.5E0,0.E0,2.19375E1)); #4791=VERTEX_POINT('',#4789); #4792=VERTEX_POINT('',#4790); #4793=CARTESIAN_POINT('',(5.5E0,1.5E0,1.89375E1)); #4794=CARTESIAN_POINT('',(5.5E0,0.E0,1.89375E1)); #4795=VERTEX_POINT('',#4793); #4796=VERTEX_POINT('',#4794); #4797=CARTESIAN_POINT('',(2.15E1,0.E0,2.19375E1)); #4798=CARTESIAN_POINT('',(2.15E1,1.5E0,2.19375E1)); #4799=VERTEX_POINT('',#4797); #4800=VERTEX_POINT('',#4798); #4801=CARTESIAN_POINT('',(1.85E1,0.E0,1.89375E1)); #4802=CARTESIAN_POINT('',(1.85E1,1.5E0,1.89375E1)); #4803=VERTEX_POINT('',#4801); #4804=VERTEX_POINT('',#4802); #4805=CARTESIAN_POINT('',(2.15E1,1.5E0,1.40625E1)); #4806=CARTESIAN_POINT('',(2.15E1,0.E0,1.40625E1)); #4807=VERTEX_POINT('',#4805); #4808=VERTEX_POINT('',#4806); #4809=CARTESIAN_POINT('',(1.85E1,1.5E0,1.70625E1)); #4810=CARTESIAN_POINT('',(1.85E1,0.E0,1.70625E1)); #4811=VERTEX_POINT('',#4809); #4812=VERTEX_POINT('',#4810); #4813=CARTESIAN_POINT('',(2.5E0,0.E0,1.40625E1)); #4814=CARTESIAN_POINT('',(2.5E0,1.5E0,1.40625E1)); #4815=VERTEX_POINT('',#4813); #4816=VERTEX_POINT('',#4814); #4817=CARTESIAN_POINT('',(5.5E0,0.E0,1.70625E1)); #4818=CARTESIAN_POINT('',(5.5E0,1.5E0,1.70625E1)); #4819=VERTEX_POINT('',#4817); #4820=VERTEX_POINT('',#4818); #4821=CARTESIAN_POINT('',(6.1925E0,0.E0,9.E0)); #4822=CARTESIAN_POINT('',(5.8075E0,0.E0,9.E0)); #4823=VERTEX_POINT('',#4821); #4824=VERTEX_POINT('',#4822); #4825=CARTESIAN_POINT('',(6.2575E0,1.E0,9.E0)); #4826=CARTESIAN_POINT('',(5.7425E0,1.E0,9.E0)); #4827=VERTEX_POINT('',#4825); #4828=VERTEX_POINT('',#4826); #4829=CARTESIAN_POINT('',(6.2575E0,1.5E0,9.E0)); #4830=CARTESIAN_POINT('',(5.7425E0,1.5E0,9.E0)); #4831=VERTEX_POINT('',#4829); #4832=VERTEX_POINT('',#4830); #4833=CARTESIAN_POINT('',(6.1925E0,1.E0,9.E0)); #4834=CARTESIAN_POINT('',(5.8075E0,1.E0,9.E0)); #4835=VERTEX_POINT('',#4833); #4836=VERTEX_POINT('',#4834); #4837=CARTESIAN_POINT('',(1.21925E1,0.E0,9.E0)); #4838=CARTESIAN_POINT('',(1.18075E1,0.E0,9.E0)); #4839=VERTEX_POINT('',#4837); #4840=VERTEX_POINT('',#4838); #4841=CARTESIAN_POINT('',(1.81925E1,0.E0,9.E0)); #4842=CARTESIAN_POINT('',(1.78075E1,0.E0,9.E0)); #4843=VERTEX_POINT('',#4841); #4844=VERTEX_POINT('',#4842); #4845=CARTESIAN_POINT('',(6.1925E0,0.E0,1.8E1)); #4846=CARTESIAN_POINT('',(5.8075E0,0.E0,1.8E1)); #4847=VERTEX_POINT('',#4845); #4848=VERTEX_POINT('',#4846); #4849=CARTESIAN_POINT('',(1.21925E1,0.E0,1.8E1)); #4850=CARTESIAN_POINT('',(1.18075E1,0.E0,1.8E1)); #4851=VERTEX_POINT('',#4849); #4852=VERTEX_POINT('',#4850); #4853=CARTESIAN_POINT('',(1.81925E1,0.E0,1.8E1)); #4854=CARTESIAN_POINT('',(1.78075E1,0.E0,1.8E1)); #4855=VERTEX_POINT('',#4853); #4856=VERTEX_POINT('',#4854); #4857=CARTESIAN_POINT('',(1.22575E1,1.E0,9.E0)); #4858=CARTESIAN_POINT('',(1.17425E1,1.E0,9.E0)); #4859=VERTEX_POINT('',#4857); #4860=VERTEX_POINT('',#4858); #4861=CARTESIAN_POINT('',(1.22575E1,1.5E0,9.E0)); #4862=CARTESIAN_POINT('',(1.17425E1,1.5E0,9.E0)); #4863=VERTEX_POINT('',#4861); #4864=VERTEX_POINT('',#4862); #4865=CARTESIAN_POINT('',(1.21925E1,1.E0,9.E0)); #4866=CARTESIAN_POINT('',(1.18075E1,1.E0,9.E0)); #4867=VERTEX_POINT('',#4865); #4868=VERTEX_POINT('',#4866); #4869=CARTESIAN_POINT('',(1.82575E1,1.E0,9.E0)); #4870=CARTESIAN_POINT('',(1.77425E1,1.E0,9.E0)); #4871=VERTEX_POINT('',#4869); #4872=VERTEX_POINT('',#4870); #4873=CARTESIAN_POINT('',(1.82575E1,1.5E0,9.E0)); #4874=CARTESIAN_POINT('',(1.77425E1,1.5E0,9.E0)); #4875=VERTEX_POINT('',#4873); #4876=VERTEX_POINT('',#4874); #4877=CARTESIAN_POINT('',(1.81925E1,1.E0,9.E0)); #4878=CARTESIAN_POINT('',(1.78075E1,1.E0,9.E0)); #4879=VERTEX_POINT('',#4877); #4880=VERTEX_POINT('',#4878); #4881=CARTESIAN_POINT('',(6.2575E0,1.E0,1.8E1)); #4882=CARTESIAN_POINT('',(5.7425E0,1.E0,1.8E1)); #4883=VERTEX_POINT('',#4881); #4884=VERTEX_POINT('',#4882); #4885=CARTESIAN_POINT('',(6.2575E0,1.5E0,1.8E1)); #4886=CARTESIAN_POINT('',(5.7425E0,1.5E0,1.8E1)); #4887=VERTEX_POINT('',#4885); #4888=VERTEX_POINT('',#4886); #4889=CARTESIAN_POINT('',(6.1925E0,1.E0,1.8E1)); #4890=CARTESIAN_POINT('',(5.8075E0,1.E0,1.8E1)); #4891=VERTEX_POINT('',#4889); #4892=VERTEX_POINT('',#4890); #4893=CARTESIAN_POINT('',(1.22575E1,1.E0,1.8E1)); #4894=CARTESIAN_POINT('',(1.17425E1,1.E0,1.8E1)); #4895=VERTEX_POINT('',#4893); #4896=VERTEX_POINT('',#4894); #4897=CARTESIAN_POINT('',(1.22575E1,1.5E0,1.8E1)); #4898=CARTESIAN_POINT('',(1.17425E1,1.5E0,1.8E1)); #4899=VERTEX_POINT('',#4897); #4900=VERTEX_POINT('',#4898); #4901=CARTESIAN_POINT('',(1.21925E1,1.E0,1.8E1)); #4902=CARTESIAN_POINT('',(1.18075E1,1.E0,1.8E1)); #4903=VERTEX_POINT('',#4901); #4904=VERTEX_POINT('',#4902); #4905=CARTESIAN_POINT('',(1.82575E1,1.E0,1.8E1)); #4906=CARTESIAN_POINT('',(1.77425E1,1.E0,1.8E1)); #4907=VERTEX_POINT('',#4905); #4908=VERTEX_POINT('',#4906); #4909=CARTESIAN_POINT('',(1.82575E1,1.5E0,1.8E1)); #4910=CARTESIAN_POINT('',(1.77425E1,1.5E0,1.8E1)); #4911=VERTEX_POINT('',#4909); #4912=VERTEX_POINT('',#4910); #4913=CARTESIAN_POINT('',(1.81925E1,1.E0,1.8E1)); #4914=CARTESIAN_POINT('',(1.78075E1,1.E0,1.8E1)); #4915=VERTEX_POINT('',#4913); #4916=VERTEX_POINT('',#4914); #4917=CARTESIAN_POINT('',(2.5E-1,1.5E0,1.288675134595E1)); #4918=CARTESIAN_POINT('',(2.5E-1,1.5E0,1.E1)); #4919=VERTEX_POINT('',#4917); #4920=VERTEX_POINT('',#4918); #4921=CARTESIAN_POINT('',(2.E0,1.5E0,1.288675134595E1)); #4922=CARTESIAN_POINT('',(2.E0,1.5E0,1.E1)); #4923=VERTEX_POINT('',#4921); #4924=VERTEX_POINT('',#4922); #4925=CARTESIAN_POINT('',(2.5E-1,6.5E0,1.E1)); #4926=VERTEX_POINT('',#4925); #4927=CARTESIAN_POINT('',(2.E0,6.5E0,1.E1)); #4928=VERTEX_POINT('',#4927); #4929=VERTEX_POINT('',#1837); #4930=VERTEX_POINT('',#1845); #4931=CARTESIAN_POINT('',(2.375E1,1.5E0,1.288675134595E1)); #4932=CARTESIAN_POINT('',(2.375E1,1.5E0,1.E1)); #4933=VERTEX_POINT('',#4931); #4934=VERTEX_POINT('',#4932); #4935=CARTESIAN_POINT('',(2.2E1,1.5E0,1.288675134595E1)); #4936=CARTESIAN_POINT('',(2.2E1,1.5E0,1.E1)); #4937=VERTEX_POINT('',#4935); #4938=VERTEX_POINT('',#4936); #4939=CARTESIAN_POINT('',(2.375E1,6.5E0,1.E1)); #4940=VERTEX_POINT('',#4939); #4941=CARTESIAN_POINT('',(2.2E1,6.5E0,1.E1)); #4942=VERTEX_POINT('',#4941); #4943=VERTEX_POINT('',#2873); #4944=VERTEX_POINT('',#2881); #4945=CARTESIAN_POINT('',(3.75E0,2.E0,8.E0)); #4946=CARTESIAN_POINT('',(3.75E0,2.E0,8.5E0)); #4947=VERTEX_POINT('',#4945); #4948=VERTEX_POINT('',#4946); #4949=CARTESIAN_POINT('',(4.5E0,2.75E0,8.E0)); #4950=CARTESIAN_POINT('',(4.5E0,2.75E0,8.5E0)); #4951=VERTEX_POINT('',#4949); #4952=VERTEX_POINT('',#4950); #4953=CARTESIAN_POINT('',(-8.007907113711E-1,3.114232198384E0,8.E0)); #4954=CARTESIAN_POINT('',(-8.007907113711E-1,3.114232198384E0,8.5E0)); #4955=VERTEX_POINT('',#4953); #4956=VERTEX_POINT('',#4954); #4957=CARTESIAN_POINT('',(-1.451727542799E-1,2.E0,8.E0)); #4958=CARTESIAN_POINT('',(-1.451727542799E-1,2.E0,8.5E0)); #4959=VERTEX_POINT('',#4957); #4960=VERTEX_POINT('',#4958); #4961=CARTESIAN_POINT('',(3.188160579053E0,9.5E0,8.E0)); #4962=CARTESIAN_POINT('',(3.188160579053E0,9.5E0,8.5E0)); #4963=VERTEX_POINT('',#4961); #4964=VERTEX_POINT('',#4962); #4965=CARTESIAN_POINT('',(2.532542621962E0,9.114232198384E0,8.E0)); #4966=CARTESIAN_POINT('',(2.532542621962E0,9.114232198384E0,8.5E0)); #4967=VERTEX_POINT('',#4965); #4968=VERTEX_POINT('',#4966); #4969=CARTESIAN_POINT('',(4.5E0,8.75E0,8.E0)); #4970=CARTESIAN_POINT('',(4.5E0,8.75E0,8.5E0)); #4971=VERTEX_POINT('',#4969); #4972=VERTEX_POINT('',#4970); #4973=CARTESIAN_POINT('',(3.75E0,9.5E0,8.E0)); #4974=CARTESIAN_POINT('',(3.75E0,9.5E0,8.5E0)); #4975=VERTEX_POINT('',#4973); #4976=VERTEX_POINT('',#4974); #4977=CARTESIAN_POINT('',(2.85E0,2.E0,1.E1)); #4978=CARTESIAN_POINT('',(2.85E0,2.E0,9.5E0)); #4979=VERTEX_POINT('',#4977); #4980=VERTEX_POINT('',#4978); #4981=CARTESIAN_POINT('',(2.5E0,2.35E0,1.E1)); #4982=CARTESIAN_POINT('',(2.5E0,2.35E0,9.5E0)); #4983=VERTEX_POINT('',#4981); #4984=VERTEX_POINT('',#4982); #4985=CARTESIAN_POINT('',(4.5E0,2.35E0,1.E1)); #4986=CARTESIAN_POINT('',(4.5E0,2.35E0,9.5E0)); #4987=VERTEX_POINT('',#4985); #4988=VERTEX_POINT('',#4986); #4989=CARTESIAN_POINT('',(4.15E0,2.E0,1.E1)); #4990=CARTESIAN_POINT('',(4.15E0,2.E0,9.5E0)); #4991=VERTEX_POINT('',#4989); #4992=VERTEX_POINT('',#4990); #4993=CARTESIAN_POINT('',(1.952799239454E0,7.E0,1.E1)); #4994=CARTESIAN_POINT('',(1.952799239454E0,7.E0,9.5E0)); #4995=VERTEX_POINT('',#4993); #4996=VERTEX_POINT('',#4994); #4997=CARTESIAN_POINT('',(1.646844192811E0,7.519975025913E0,1.E1)); #4998=CARTESIAN_POINT('',(1.646844192811E0,7.519975025913E0,9.5E0)); #4999=VERTEX_POINT('',#4997); #5000=VERTEX_POINT('',#4998); #5001=CARTESIAN_POINT('',(2.646844192811E0,9.319975025913E0,1.E1)); #5002=CARTESIAN_POINT('',(2.646844192811E0,9.319975025913E0,9.5E0)); #5003=VERTEX_POINT('',#5001); #5004=VERTEX_POINT('',#5002); #5005=CARTESIAN_POINT('',(2.952799239454E0,9.5E0,1.E1)); #5006=CARTESIAN_POINT('',(2.952799239454E0,9.5E0,9.5E0)); #5007=VERTEX_POINT('',#5005); #5008=VERTEX_POINT('',#5006); #5009=CARTESIAN_POINT('',(4.15E0,9.5E0,1.E1)); #5010=CARTESIAN_POINT('',(4.15E0,9.5E0,9.5E0)); #5011=VERTEX_POINT('',#5009); #5012=VERTEX_POINT('',#5010); #5013=CARTESIAN_POINT('',(4.5E0,9.15E0,1.E1)); #5014=CARTESIAN_POINT('',(4.5E0,9.15E0,9.5E0)); #5015=VERTEX_POINT('',#5013); #5016=VERTEX_POINT('',#5014); #5017=CARTESIAN_POINT('',(2.5E0,6.65E0,9.5E0)); #5018=CARTESIAN_POINT('',(2.5E0,6.65E0,1.E1)); #5019=VERTEX_POINT('',#5017); #5020=VERTEX_POINT('',#5018); #5021=CARTESIAN_POINT('',(2.15E0,7.E0,1.E1)); #5022=VERTEX_POINT('',#5021); #5023=CARTESIAN_POINT('',(2.15E0,7.E0,9.5E0)); #5024=VERTEX_POINT('',#5023); #5025=CARTESIAN_POINT('',(2.025E1,2.E0,8.5E0)); #5026=CARTESIAN_POINT('',(2.025E1,2.E0,8.E0)); #5027=VERTEX_POINT('',#5025); #5028=VERTEX_POINT('',#5026); #5029=CARTESIAN_POINT('',(1.95E1,2.75E0,8.5E0)); #5030=VERTEX_POINT('',#5029); #5031=CARTESIAN_POINT('',(1.95E1,2.75E0,8.E0)); #5032=VERTEX_POINT('',#5031); #5033=CARTESIAN_POINT('',(2.480079071137E1,3.114232198384E0,8.5E0)); #5034=CARTESIAN_POINT('',(2.480079071137E1,3.114232198384E0,8.E0)); #5035=VERTEX_POINT('',#5033); #5036=VERTEX_POINT('',#5034); #5037=CARTESIAN_POINT('',(2.414517275428E1,2.E0,8.5E0)); #5038=VERTEX_POINT('',#5037); #5039=CARTESIAN_POINT('',(2.414517275428E1,2.E0,8.E0)); #5040=VERTEX_POINT('',#5039); #5041=CARTESIAN_POINT('',(2.081183942095E1,9.5E0,8.5E0)); #5042=CARTESIAN_POINT('',(2.081183942095E1,9.5E0,8.E0)); #5043=VERTEX_POINT('',#5041); #5044=VERTEX_POINT('',#5042); #5045=CARTESIAN_POINT('',(2.146745737804E1,9.114232198384E0,8.5E0)); #5046=VERTEX_POINT('',#5045); #5047=CARTESIAN_POINT('',(2.146745737804E1,9.114232198384E0,8.E0)); #5048=VERTEX_POINT('',#5047); #5049=CARTESIAN_POINT('',(1.95E1,8.75E0,8.5E0)); #5050=CARTESIAN_POINT('',(1.95E1,8.75E0,8.E0)); #5051=VERTEX_POINT('',#5049); #5052=VERTEX_POINT('',#5050); #5053=CARTESIAN_POINT('',(2.025E1,9.5E0,8.5E0)); #5054=VERTEX_POINT('',#5053); #5055=CARTESIAN_POINT('',(2.025E1,9.5E0,8.E0)); #5056=VERTEX_POINT('',#5055); #5057=CARTESIAN_POINT('',(2.115E1,2.E0,9.5E0)); #5058=CARTESIAN_POINT('',(2.115E1,2.E0,1.E1)); #5059=VERTEX_POINT('',#5057); #5060=VERTEX_POINT('',#5058); #5061=CARTESIAN_POINT('',(2.15E1,2.35E0,9.5E0)); #5062=VERTEX_POINT('',#5061); #5063=CARTESIAN_POINT('',(2.15E1,2.35E0,1.E1)); #5064=VERTEX_POINT('',#5063); #5065=CARTESIAN_POINT('',(1.95E1,2.35E0,9.5E0)); #5066=CARTESIAN_POINT('',(1.95E1,2.35E0,1.E1)); #5067=VERTEX_POINT('',#5065); #5068=VERTEX_POINT('',#5066); #5069=CARTESIAN_POINT('',(1.985E1,2.E0,9.5E0)); #5070=VERTEX_POINT('',#5069); #5071=CARTESIAN_POINT('',(1.985E1,2.E0,1.E1)); #5072=VERTEX_POINT('',#5071); #5073=CARTESIAN_POINT('',(2.204720076055E1,7.E0,9.5E0)); #5074=CARTESIAN_POINT('',(2.204720076055E1,7.E0,1.E1)); #5075=VERTEX_POINT('',#5073); #5076=VERTEX_POINT('',#5074); #5077=CARTESIAN_POINT('',(2.235315580719E1,7.519975025913E0,9.5E0)); #5078=VERTEX_POINT('',#5077); #5079=CARTESIAN_POINT('',(2.235315580719E1,7.519975025913E0,1.E1)); #5080=VERTEX_POINT('',#5079); #5081=CARTESIAN_POINT('',(2.135315580719E1,9.319975025913E0,9.5E0)); #5082=CARTESIAN_POINT('',(2.135315580719E1,9.319975025913E0,1.E1)); #5083=VERTEX_POINT('',#5081); #5084=VERTEX_POINT('',#5082); #5085=CARTESIAN_POINT('',(2.104720076055E1,9.5E0,9.5E0)); #5086=VERTEX_POINT('',#5085); #5087=CARTESIAN_POINT('',(2.104720076055E1,9.5E0,1.E1)); #5088=VERTEX_POINT('',#5087); #5089=CARTESIAN_POINT('',(1.985E1,9.5E0,9.5E0)); #5090=CARTESIAN_POINT('',(1.985E1,9.5E0,1.E1)); #5091=VERTEX_POINT('',#5089); #5092=VERTEX_POINT('',#5090); #5093=CARTESIAN_POINT('',(1.95E1,9.15E0,9.5E0)); #5094=VERTEX_POINT('',#5093); #5095=CARTESIAN_POINT('',(1.95E1,9.15E0,1.E1)); #5096=VERTEX_POINT('',#5095); #5097=CARTESIAN_POINT('',(2.15E1,6.65E0,1.E1)); #5098=CARTESIAN_POINT('',(2.15E1,6.65E0,9.5E0)); #5099=VERTEX_POINT('',#5097); #5100=VERTEX_POINT('',#5098); #5101=CARTESIAN_POINT('',(2.185E1,7.E0,1.E1)); #5102=CARTESIAN_POINT('',(2.185E1,7.E0,9.5E0)); #5103=VERTEX_POINT('',#5101); #5104=VERTEX_POINT('',#5102); #5105=CARTESIAN_POINT('',(7.5E0,6.875E-1,6.875E-1)); #5106=CARTESIAN_POINT('',(1.05E1,6.875E-1,6.875E-1)); #5107=VERTEX_POINT('',#5105); #5108=VERTEX_POINT('',#5106); #5109=CARTESIAN_POINT('',(1.05E1,6.875E-1,1.8125E0)); #5110=VERTEX_POINT('',#5109); #5111=CARTESIAN_POINT('',(7.5E0,6.875E-1,1.8125E0)); #5112=VERTEX_POINT('',#5111); #5113=CARTESIAN_POINT('',(3.939978538987E0,6.875E-1,1.032293285145E0)); #5114=CARTESIAN_POINT('',(4.942849714544E0,6.875E-1,2.419779663480E0)); #5115=VERTEX_POINT('',#5113); #5116=VERTEX_POINT('',#5114); #5117=CARTESIAN_POINT('',(2.432015885023E0,6.875E-1,4.918683812405E0)); #5118=VERTEX_POINT('',#5117); #5119=CARTESIAN_POINT('',(7.5E0,0.E0,6.875E-1)); #5120=CARTESIAN_POINT('',(1.05E1,0.E0,6.875E-1)); #5121=VERTEX_POINT('',#5119); #5122=VERTEX_POINT('',#5120); #5123=CARTESIAN_POINT('',(1.05E1,0.E0,1.8125E0)); #5124=VERTEX_POINT('',#5123); #5125=CARTESIAN_POINT('',(7.5E0,0.E0,1.8125E0)); #5126=VERTEX_POINT('',#5125); #5127=CARTESIAN_POINT('',(3.939978538987E0,0.E0,1.032293285145E0)); #5128=CARTESIAN_POINT('',(4.942849714544E0,0.E0,2.419779663480E0)); #5129=VERTEX_POINT('',#5127); #5130=VERTEX_POINT('',#5128); #5131=CARTESIAN_POINT('',(2.432015885023E0,0.E0,4.918683812405E0)); #5132=VERTEX_POINT('',#5131); #5133=CARTESIAN_POINT('',(9.254066777019E-1,0.E0,4.046865146430E0)); #5134=CARTESIAN_POINT('',(9.254066777019E-1,6.875E-1,4.046865146430E0)); #5135=VERTEX_POINT('',#5133); #5136=VERTEX_POINT('',#5134); #5137=CARTESIAN_POINT('',(7.850270400779E-1,0.E0,4.912826677187E0)); #5138=CARTESIAN_POINT('',(7.850270400779E-1,6.875E-1,4.912826677187E0)); #5139=VERTEX_POINT('',#5137); #5140=VERTEX_POINT('',#5138); #5141=CARTESIAN_POINT('',(6.9E-1,6.875E-1,7.5E0)); #5142=CARTESIAN_POINT('',(1.8125E0,6.875E-1,7.5E0)); #5143=VERTEX_POINT('',#5141); #5144=VERTEX_POINT('',#5142); #5145=CARTESIAN_POINT('',(6.9E-1,0.E0,7.5E0)); #5146=CARTESIAN_POINT('',(1.8125E0,0.E0,7.5E0)); #5147=VERTEX_POINT('',#5145); #5148=VERTEX_POINT('',#5146); #5149=CARTESIAN_POINT('',(-1.3125E0,0.E0,1.0375E1)); #5150=CARTESIAN_POINT('',(-1.3125E0,6.875E-1,1.0375E1)); #5151=VERTEX_POINT('',#5149); #5152=VERTEX_POINT('',#5150); #5153=CARTESIAN_POINT('',(-4.375E-1,0.E0,1.125E1)); #5154=CARTESIAN_POINT('',(-4.375E-1,6.875E-1,1.125E1)); #5155=VERTEX_POINT('',#5153); #5156=VERTEX_POINT('',#5154); #5157=CARTESIAN_POINT('',(-4.375E-1,0.E0,8.69E0)); #5158=CARTESIAN_POINT('',(-4.375E-1,6.875E-1,8.69E0)); #5159=VERTEX_POINT('',#5157); #5160=VERTEX_POINT('',#5158); #5161=CARTESIAN_POINT('',(-1.3125E0,0.E0,9.565E0)); #5162=CARTESIAN_POINT('',(-1.3125E0,6.875E-1,9.565E0)); #5163=VERTEX_POINT('',#5161); #5164=VERTEX_POINT('',#5162); #5165=CARTESIAN_POINT('',(4.3125E0,0.E0,9.565E0)); #5166=CARTESIAN_POINT('',(4.3125E0,6.875E-1,9.565E0)); #5167=VERTEX_POINT('',#5165); #5168=VERTEX_POINT('',#5166); #5169=CARTESIAN_POINT('',(3.4375E0,0.E0,8.69E0)); #5170=CARTESIAN_POINT('',(3.4375E0,6.875E-1,8.69E0)); #5171=VERTEX_POINT('',#5169); #5172=VERTEX_POINT('',#5170); #5173=CARTESIAN_POINT('',(3.4375E0,0.E0,1.125E1)); #5174=CARTESIAN_POINT('',(3.4375E0,6.875E-1,1.125E1)); #5175=VERTEX_POINT('',#5173); #5176=VERTEX_POINT('',#5174); #5177=CARTESIAN_POINT('',(4.3125E0,0.E0,1.0375E1)); #5178=CARTESIAN_POINT('',(4.3125E0,6.875E-1,1.0375E1)); #5179=VERTEX_POINT('',#5177); #5180=VERTEX_POINT('',#5178); #5181=CARTESIAN_POINT('',(6.9E-1,6.875E-1,7.815E0)); #5182=CARTESIAN_POINT('',(6.9E-1,0.E0,7.815E0)); #5183=VERTEX_POINT('',#5181); #5184=VERTEX_POINT('',#5182); #5185=CARTESIAN_POINT('',(-1.85E-1,0.E0,8.69E0)); #5186=VERTEX_POINT('',#5185); #5187=CARTESIAN_POINT('',(-1.85E-1,6.875E-1,8.69E0)); #5188=VERTEX_POINT('',#5187); #5189=CARTESIAN_POINT('',(2.6875E0,6.875E-1,8.69E0)); #5190=CARTESIAN_POINT('',(2.6875E0,0.E0,8.69E0)); #5191=VERTEX_POINT('',#5189); #5192=VERTEX_POINT('',#5190); #5193=CARTESIAN_POINT('',(1.8125E0,0.E0,7.815E0)); #5194=VERTEX_POINT('',#5193); #5195=CARTESIAN_POINT('',(1.8125E0,6.875E-1,7.815E0)); #5196=VERTEX_POINT('',#5195); #5197=CARTESIAN_POINT('',(6.875E-1,6.875E-1,1.65E1)); #5198=CARTESIAN_POINT('',(6.875E-1,6.875E-1,1.35E1)); #5199=VERTEX_POINT('',#5197); #5200=VERTEX_POINT('',#5198); #5201=CARTESIAN_POINT('',(1.8125E0,6.875E-1,1.35E1)); #5202=VERTEX_POINT('',#5201); #5203=CARTESIAN_POINT('',(1.8125E0,6.875E-1,1.65E1)); #5204=VERTEX_POINT('',#5203); #5205=CARTESIAN_POINT('',(6.875E-1,0.E0,1.65E1)); #5206=CARTESIAN_POINT('',(6.875E-1,0.E0,1.35E1)); #5207=VERTEX_POINT('',#5205); #5208=VERTEX_POINT('',#5206); #5209=CARTESIAN_POINT('',(1.8125E0,0.E0,1.35E1)); #5210=VERTEX_POINT('',#5209); #5211=CARTESIAN_POINT('',(1.8125E0,0.E0,1.65E1)); #5212=VERTEX_POINT('',#5211); #5213=CARTESIAN_POINT('',(6.875E-1,6.875E-1,2.25E1)); #5214=CARTESIAN_POINT('',(6.875E-1,6.875E-1,1.95E1)); #5215=VERTEX_POINT('',#5213); #5216=VERTEX_POINT('',#5214); #5217=CARTESIAN_POINT('',(1.8125E0,6.875E-1,1.95E1)); #5218=VERTEX_POINT('',#5217); #5219=CARTESIAN_POINT('',(1.8125E0,6.875E-1,2.25E1)); #5220=VERTEX_POINT('',#5219); #5221=CARTESIAN_POINT('',(6.875E-1,0.E0,2.25E1)); #5222=CARTESIAN_POINT('',(6.875E-1,0.E0,1.95E1)); #5223=VERTEX_POINT('',#5221); #5224=VERTEX_POINT('',#5222); #5225=CARTESIAN_POINT('',(1.8125E0,0.E0,1.95E1)); #5226=VERTEX_POINT('',#5225); #5227=CARTESIAN_POINT('',(1.8125E0,0.E0,2.25E1)); #5228=VERTEX_POINT('',#5227); #5229=CARTESIAN_POINT('',(7.5E0,6.875E-1,8.5E0)); #5230=CARTESIAN_POINT('',(1.05E1,6.875E-1,8.5E0)); #5231=VERTEX_POINT('',#5229); #5232=VERTEX_POINT('',#5230); #5233=CARTESIAN_POINT('',(1.05E1,6.875E-1,9.5E0)); #5234=VERTEX_POINT('',#5233); #5235=CARTESIAN_POINT('',(7.5E0,6.875E-1,9.5E0)); #5236=VERTEX_POINT('',#5235); #5237=CARTESIAN_POINT('',(7.5E0,0.E0,8.5E0)); #5238=CARTESIAN_POINT('',(1.05E1,0.E0,8.5E0)); #5239=VERTEX_POINT('',#5237); #5240=VERTEX_POINT('',#5238); #5241=CARTESIAN_POINT('',(1.05E1,0.E0,9.5E0)); #5242=VERTEX_POINT('',#5241); #5243=CARTESIAN_POINT('',(7.5E0,0.E0,9.5E0)); #5244=VERTEX_POINT('',#5243); #5245=CARTESIAN_POINT('',(7.5E0,6.875E-1,1.75625E1)); #5246=CARTESIAN_POINT('',(1.05E1,6.875E-1,1.75625E1)); #5247=VERTEX_POINT('',#5245); #5248=VERTEX_POINT('',#5246); #5249=CARTESIAN_POINT('',(1.05E1,6.875E-1,1.84375E1)); #5250=VERTEX_POINT('',#5249); #5251=CARTESIAN_POINT('',(7.5E0,6.875E-1,1.84375E1)); #5252=VERTEX_POINT('',#5251); #5253=CARTESIAN_POINT('',(7.5E0,0.E0,1.75625E1)); #5254=CARTESIAN_POINT('',(1.05E1,0.E0,1.75625E1)); #5255=VERTEX_POINT('',#5253); #5256=VERTEX_POINT('',#5254); #5257=CARTESIAN_POINT('',(1.05E1,0.E0,1.84375E1)); #5258=VERTEX_POINT('',#5257); #5259=CARTESIAN_POINT('',(7.5E0,0.E0,1.84375E1)); #5260=VERTEX_POINT('',#5259); #5261=CARTESIAN_POINT('',(7.5E0,6.875E-1,3.13125E1)); #5262=CARTESIAN_POINT('',(1.05E1,6.875E-1,3.13125E1)); #5263=VERTEX_POINT('',#5261); #5264=VERTEX_POINT('',#5262); #5265=CARTESIAN_POINT('',(1.05E1,6.875E-1,3.01875E1)); #5266=VERTEX_POINT('',#5265); #5267=CARTESIAN_POINT('',(7.5E0,6.875E-1,3.01875E1)); #5268=VERTEX_POINT('',#5267); #5269=CARTESIAN_POINT('',(3.939978538987E0,6.875E-1,3.096770671486E1)); #5270=CARTESIAN_POINT('',(4.942849714544E0,6.875E-1,2.958022033652E1)); #5271=VERTEX_POINT('',#5269); #5272=VERTEX_POINT('',#5270); #5273=CARTESIAN_POINT('',(2.432015885023E0,6.875E-1,2.708131618759E1)); #5274=VERTEX_POINT('',#5273); #5275=CARTESIAN_POINT('',(7.5E0,0.E0,3.13125E1)); #5276=CARTESIAN_POINT('',(1.05E1,0.E0,3.13125E1)); #5277=VERTEX_POINT('',#5275); #5278=VERTEX_POINT('',#5276); #5279=CARTESIAN_POINT('',(1.05E1,0.E0,3.01875E1)); #5280=VERTEX_POINT('',#5279); #5281=CARTESIAN_POINT('',(7.5E0,0.E0,3.01875E1)); #5282=VERTEX_POINT('',#5281); #5283=CARTESIAN_POINT('',(3.939978538987E0,0.E0,3.096770671486E1)); #5284=CARTESIAN_POINT('',(4.942849714544E0,0.E0,2.958022033652E1)); #5285=VERTEX_POINT('',#5283); #5286=VERTEX_POINT('',#5284); #5287=CARTESIAN_POINT('',(2.432015885023E0,0.E0,2.708131618759E1)); #5288=VERTEX_POINT('',#5287); #5289=CARTESIAN_POINT('',(1.65E1,6.875E-1,6.875E-1)); #5290=CARTESIAN_POINT('',(1.35E1,6.875E-1,6.875E-1)); #5291=VERTEX_POINT('',#5289); #5292=VERTEX_POINT('',#5290); #5293=CARTESIAN_POINT('',(1.35E1,6.875E-1,1.8125E0)); #5294=VERTEX_POINT('',#5293); #5295=CARTESIAN_POINT('',(1.65E1,6.875E-1,1.8125E0)); #5296=VERTEX_POINT('',#5295); #5297=CARTESIAN_POINT('',(2.006002146101E1,6.875E-1,1.032293285145E0)); #5298=CARTESIAN_POINT('',(1.905715028546E1,6.875E-1,2.419779663480E0)); #5299=VERTEX_POINT('',#5297); #5300=VERTEX_POINT('',#5298); #5301=CARTESIAN_POINT('',(2.156798411498E1,6.875E-1,4.918683812405E0)); #5302=VERTEX_POINT('',#5301); #5303=CARTESIAN_POINT('',(1.65E1,0.E0,6.875E-1)); #5304=CARTESIAN_POINT('',(1.35E1,0.E0,6.875E-1)); #5305=VERTEX_POINT('',#5303); #5306=VERTEX_POINT('',#5304); #5307=CARTESIAN_POINT('',(1.35E1,0.E0,1.8125E0)); #5308=VERTEX_POINT('',#5307); #5309=CARTESIAN_POINT('',(1.65E1,0.E0,1.8125E0)); #5310=VERTEX_POINT('',#5309); #5311=CARTESIAN_POINT('',(2.006002146101E1,0.E0,1.032293285145E0)); #5312=CARTESIAN_POINT('',(1.905715028546E1,0.E0,2.419779663480E0)); #5313=VERTEX_POINT('',#5311); #5314=VERTEX_POINT('',#5312); #5315=CARTESIAN_POINT('',(2.156798411498E1,0.E0,4.918683812405E0)); #5316=VERTEX_POINT('',#5315); #5317=CARTESIAN_POINT('',(2.331E1,6.875E-1,7.5E0)); #5318=CARTESIAN_POINT('',(2.21875E1,6.875E-1,7.5E0)); #5319=VERTEX_POINT('',#5317); #5320=VERTEX_POINT('',#5318); #5321=CARTESIAN_POINT('',(2.331E1,0.E0,7.5E0)); #5322=CARTESIAN_POINT('',(2.21875E1,0.E0,7.5E0)); #5323=VERTEX_POINT('',#5321); #5324=VERTEX_POINT('',#5322); #5325=CARTESIAN_POINT('',(2.33125E1,6.875E-1,1.65E1)); #5326=CARTESIAN_POINT('',(2.33125E1,6.875E-1,1.35E1)); #5327=VERTEX_POINT('',#5325); #5328=VERTEX_POINT('',#5326); #5329=CARTESIAN_POINT('',(2.21875E1,6.875E-1,1.35E1)); #5330=VERTEX_POINT('',#5329); #5331=CARTESIAN_POINT('',(2.21875E1,6.875E-1,1.65E1)); #5332=VERTEX_POINT('',#5331); #5333=CARTESIAN_POINT('',(2.33125E1,0.E0,1.65E1)); #5334=CARTESIAN_POINT('',(2.33125E1,0.E0,1.35E1)); #5335=VERTEX_POINT('',#5333); #5336=VERTEX_POINT('',#5334); #5337=CARTESIAN_POINT('',(2.21875E1,0.E0,1.35E1)); #5338=VERTEX_POINT('',#5337); #5339=CARTESIAN_POINT('',(2.21875E1,0.E0,1.65E1)); #5340=VERTEX_POINT('',#5339); #5341=CARTESIAN_POINT('',(2.33125E1,6.875E-1,2.25E1)); #5342=CARTESIAN_POINT('',(2.33125E1,6.875E-1,1.95E1)); #5343=VERTEX_POINT('',#5341); #5344=VERTEX_POINT('',#5342); #5345=CARTESIAN_POINT('',(2.21875E1,6.875E-1,1.95E1)); #5346=VERTEX_POINT('',#5345); #5347=CARTESIAN_POINT('',(2.21875E1,6.875E-1,2.25E1)); #5348=VERTEX_POINT('',#5347); #5349=CARTESIAN_POINT('',(2.33125E1,0.E0,2.25E1)); #5350=CARTESIAN_POINT('',(2.33125E1,0.E0,1.95E1)); #5351=VERTEX_POINT('',#5349); #5352=VERTEX_POINT('',#5350); #5353=CARTESIAN_POINT('',(2.21875E1,0.E0,1.95E1)); #5354=VERTEX_POINT('',#5353); #5355=CARTESIAN_POINT('',(2.21875E1,0.E0,2.25E1)); #5356=VERTEX_POINT('',#5355); #5357=CARTESIAN_POINT('',(1.65E1,6.875E-1,8.5E0)); #5358=CARTESIAN_POINT('',(1.35E1,6.875E-1,8.5E0)); #5359=VERTEX_POINT('',#5357); #5360=VERTEX_POINT('',#5358); #5361=CARTESIAN_POINT('',(1.35E1,6.875E-1,9.5E0)); #5362=VERTEX_POINT('',#5361); #5363=CARTESIAN_POINT('',(1.65E1,6.875E-1,9.5E0)); #5364=VERTEX_POINT('',#5363); #5365=CARTESIAN_POINT('',(1.65E1,0.E0,8.5E0)); #5366=CARTESIAN_POINT('',(1.35E1,0.E0,8.5E0)); #5367=VERTEX_POINT('',#5365); #5368=VERTEX_POINT('',#5366); #5369=CARTESIAN_POINT('',(1.35E1,0.E0,9.5E0)); #5370=VERTEX_POINT('',#5369); #5371=CARTESIAN_POINT('',(1.65E1,0.E0,9.5E0)); #5372=VERTEX_POINT('',#5371); #5373=CARTESIAN_POINT('',(1.65E1,6.875E-1,1.75625E1)); #5374=CARTESIAN_POINT('',(1.35E1,6.875E-1,1.75625E1)); #5375=VERTEX_POINT('',#5373); #5376=VERTEX_POINT('',#5374); #5377=CARTESIAN_POINT('',(1.35E1,6.875E-1,1.84375E1)); #5378=VERTEX_POINT('',#5377); #5379=CARTESIAN_POINT('',(1.65E1,6.875E-1,1.84375E1)); #5380=VERTEX_POINT('',#5379); #5381=CARTESIAN_POINT('',(1.65E1,0.E0,1.75625E1)); #5382=CARTESIAN_POINT('',(1.35E1,0.E0,1.75625E1)); #5383=VERTEX_POINT('',#5381); #5384=VERTEX_POINT('',#5382); #5385=CARTESIAN_POINT('',(1.35E1,0.E0,1.84375E1)); #5386=VERTEX_POINT('',#5385); #5387=CARTESIAN_POINT('',(1.65E1,0.E0,1.84375E1)); #5388=VERTEX_POINT('',#5387); #5389=CARTESIAN_POINT('',(1.65E1,6.875E-1,3.13125E1)); #5390=CARTESIAN_POINT('',(1.35E1,6.875E-1,3.13125E1)); #5391=VERTEX_POINT('',#5389); #5392=VERTEX_POINT('',#5390); #5393=CARTESIAN_POINT('',(1.35E1,6.875E-1,3.01875E1)); #5394=VERTEX_POINT('',#5393); #5395=CARTESIAN_POINT('',(1.65E1,6.875E-1,3.01875E1)); #5396=VERTEX_POINT('',#5395); #5397=CARTESIAN_POINT('',(2.006002146101E1,6.875E-1,3.096770671486E1)); #5398=CARTESIAN_POINT('',(1.905715028546E1,6.875E-1,2.958022033652E1)); #5399=VERTEX_POINT('',#5397); #5400=VERTEX_POINT('',#5398); #5401=CARTESIAN_POINT('',(2.156798411498E1,6.875E-1,2.708131618759E1)); #5402=VERTEX_POINT('',#5401); #5403=CARTESIAN_POINT('',(1.65E1,0.E0,3.13125E1)); #5404=CARTESIAN_POINT('',(1.35E1,0.E0,3.13125E1)); #5405=VERTEX_POINT('',#5403); #5406=VERTEX_POINT('',#5404); #5407=CARTESIAN_POINT('',(1.35E1,0.E0,3.01875E1)); #5408=VERTEX_POINT('',#5407); #5409=CARTESIAN_POINT('',(1.65E1,0.E0,3.01875E1)); #5410=VERTEX_POINT('',#5409); #5411=CARTESIAN_POINT('',(2.006002146101E1,0.E0,3.096770671486E1)); #5412=CARTESIAN_POINT('',(1.905715028546E1,0.E0,2.958022033652E1)); #5413=VERTEX_POINT('',#5411); #5414=VERTEX_POINT('',#5412); #5415=CARTESIAN_POINT('',(2.156798411498E1,0.E0,2.708131618759E1)); #5416=VERTEX_POINT('',#5415); #5417=CARTESIAN_POINT('',(1.96875E1,6.875E-1,9.57E0)); #5418=CARTESIAN_POINT('',(1.96875E1,0.E0,9.57E0)); #5419=VERTEX_POINT('',#5417); #5420=VERTEX_POINT('',#5418); #5421=CARTESIAN_POINT('',(2.05675E1,6.875E-1,8.69E0)); #5422=VERTEX_POINT('',#5421); #5423=CARTESIAN_POINT('',(2.05675E1,0.E0,8.69E0)); #5424=VERTEX_POINT('',#5423); #5425=CARTESIAN_POINT('',(2.05675E1,6.875E-1,1.125E1)); #5426=CARTESIAN_POINT('',(2.05675E1,0.E0,1.125E1)); #5427=VERTEX_POINT('',#5425); #5428=VERTEX_POINT('',#5426); #5429=CARTESIAN_POINT('',(1.96875E1,6.875E-1,1.037E1)); #5430=VERTEX_POINT('',#5429); #5431=CARTESIAN_POINT('',(1.96875E1,0.E0,1.037E1)); #5432=VERTEX_POINT('',#5431); #5433=CARTESIAN_POINT('',(2.44325E1,6.875E-1,8.69E0)); #5434=CARTESIAN_POINT('',(2.44325E1,0.E0,8.69E0)); #5435=VERTEX_POINT('',#5433); #5436=VERTEX_POINT('',#5434); #5437=CARTESIAN_POINT('',(2.53125E1,6.875E-1,9.57E0)); #5438=VERTEX_POINT('',#5437); #5439=CARTESIAN_POINT('',(2.53125E1,0.E0,9.57E0)); #5440=VERTEX_POINT('',#5439); #5441=CARTESIAN_POINT('',(2.53125E1,6.875E-1,1.037E1)); #5442=CARTESIAN_POINT('',(2.53125E1,0.E0,1.037E1)); #5443=VERTEX_POINT('',#5441); #5444=VERTEX_POINT('',#5442); #5445=CARTESIAN_POINT('',(2.44325E1,6.875E-1,1.125E1)); #5446=VERTEX_POINT('',#5445); #5447=CARTESIAN_POINT('',(2.44325E1,0.E0,1.125E1)); #5448=VERTEX_POINT('',#5447); #5449=CARTESIAN_POINT('',(2.13075E1,0.E0,8.69E0)); #5450=CARTESIAN_POINT('',(2.13075E1,6.875E-1,8.69E0)); #5451=VERTEX_POINT('',#5449); #5452=VERTEX_POINT('',#5450); #5453=CARTESIAN_POINT('',(2.21875E1,0.E0,7.81E0)); #5454=CARTESIAN_POINT('',(2.21875E1,6.875E-1,7.81E0)); #5455=VERTEX_POINT('',#5453); #5456=VERTEX_POINT('',#5454); #5457=CARTESIAN_POINT('',(2.331E1,0.E0,7.81E0)); #5458=CARTESIAN_POINT('',(2.331E1,6.875E-1,7.81E0)); #5459=VERTEX_POINT('',#5457); #5460=VERTEX_POINT('',#5458); #5461=CARTESIAN_POINT('',(2.419E1,0.E0,8.69E0)); #5462=CARTESIAN_POINT('',(2.419E1,6.875E-1,8.69E0)); #5463=VERTEX_POINT('',#5461); #5464=VERTEX_POINT('',#5462); #5465=CARTESIAN_POINT('',(2.321497295992E1,0.E0,4.912826677187E0)); #5466=CARTESIAN_POINT('',(2.321497295992E1,6.875E-1,4.912826677187E0)); #5467=VERTEX_POINT('',#5465); #5468=VERTEX_POINT('',#5466); #5469=CARTESIAN_POINT('',(2.307459332230E1,0.E0,4.046865146430E0)); #5470=CARTESIAN_POINT('',(2.307459332230E1,6.875E-1,4.046865146430E0)); #5471=VERTEX_POINT('',#5469); #5472=VERTEX_POINT('',#5470); #5473=CARTESIAN_POINT('',(7.850270400779E-1,0.E0,2.708717332281E1)); #5474=CARTESIAN_POINT('',(7.850270400779E-1,6.875E-1,2.708717332281E1)); #5475=VERTEX_POINT('',#5473); #5476=VERTEX_POINT('',#5474); #5477=CARTESIAN_POINT('',(9.254066777019E-1,0.E0,2.795313485357E1)); #5478=CARTESIAN_POINT('',(9.254066777019E-1,6.875E-1,2.795313485357E1)); #5479=VERTEX_POINT('',#5477); #5480=VERTEX_POINT('',#5478); #5481=CARTESIAN_POINT('',(2.307459332230E1,0.E0,2.795313485357E1)); #5482=CARTESIAN_POINT('',(2.307459332230E1,6.875E-1,2.795313485357E1)); #5483=VERTEX_POINT('',#5481); #5484=VERTEX_POINT('',#5482); #5485=CARTESIAN_POINT('',(2.321497295992E1,0.E0,2.708717332281E1)); #5486=CARTESIAN_POINT('',(2.321497295992E1,6.875E-1,2.708717332281E1)); #5487=VERTEX_POINT('',#5485); #5488=VERTEX_POINT('',#5486); #5489=CARTESIAN_POINT('',(0.E0,0.E0,0.E0)); #5490=DIRECTION('',(0.E0,1.E0,0.E0)); #5491=DIRECTION('',(1.E0,0.E0,0.E0)); #5492=AXIS2_PLACEMENT_3D('',#5489,#5490,#5491); #5493=PLANE('',#5492); #5495=ORIENTED_EDGE('',*,*,#5494,.F.); #5497=ORIENTED_EDGE('',*,*,#5496,.F.); #5499=ORIENTED_EDGE('',*,*,#5498,.T.); #5501=ORIENTED_EDGE('',*,*,#5500,.F.); #5503=ORIENTED_EDGE('',*,*,#5502,.T.); #5505=ORIENTED_EDGE('',*,*,#5504,.F.); #5507=ORIENTED_EDGE('',*,*,#5506,.T.); #5509=ORIENTED_EDGE('',*,*,#5508,.F.); #5511=ORIENTED_EDGE('',*,*,#5510,.T.); #5513=ORIENTED_EDGE('',*,*,#5512,.T.); #5515=ORIENTED_EDGE('',*,*,#5514,.F.); #5517=ORIENTED_EDGE('',*,*,#5516,.T.); #5519=ORIENTED_EDGE('',*,*,#5518,.F.); #5521=ORIENTED_EDGE('',*,*,#5520,.T.); #5523=ORIENTED_EDGE('',*,*,#5522,.F.); #5525=ORIENTED_EDGE('',*,*,#5524,.T.); #5527=ORIENTED_EDGE('',*,*,#5526,.F.); #5529=ORIENTED_EDGE('',*,*,#5528,.T.); #5531=ORIENTED_EDGE('',*,*,#5530,.F.); #5533=ORIENTED_EDGE('',*,*,#5532,.F.); #5535=ORIENTED_EDGE('',*,*,#5534,.T.); #5537=ORIENTED_EDGE('',*,*,#5536,.F.); #5538=EDGE_LOOP('',(#5495,#5497,#5499,#5501,#5503,#5505,#5507,#5509,#5511,#5513, #5515,#5517,#5519,#5521,#5523,#5525,#5527,#5529,#5531,#5533,#5535,#5537)); #5539=FACE_OUTER_BOUND('',#5538,.F.); #5541=ORIENTED_EDGE('',*,*,#5540,.T.); #5543=ORIENTED_EDGE('',*,*,#5542,.F.); #5545=ORIENTED_EDGE('',*,*,#5544,.F.); #5547=ORIENTED_EDGE('',*,*,#5546,.F.); #5549=ORIENTED_EDGE('',*,*,#5548,.F.); #5551=ORIENTED_EDGE('',*,*,#5550,.F.); #5552=EDGE_LOOP('',(#5541,#5543,#5545,#5547,#5549,#5551)); #5553=FACE_BOUND('',#5552,.F.); #5555=ORIENTED_EDGE('',*,*,#5554,.T.); #5557=ORIENTED_EDGE('',*,*,#5556,.T.); #5558=EDGE_LOOP('',(#5555,#5557)); #5559=FACE_BOUND('',#5558,.F.); #5561=ORIENTED_EDGE('',*,*,#5560,.T.); #5563=ORIENTED_EDGE('',*,*,#5562,.T.); #5564=EDGE_LOOP('',(#5561,#5563)); #5565=FACE_BOUND('',#5564,.F.); #5567=ORIENTED_EDGE('',*,*,#5566,.T.); #5569=ORIENTED_EDGE('',*,*,#5568,.T.); #5570=EDGE_LOOP('',(#5567,#5569)); #5571=FACE_BOUND('',#5570,.F.); #5573=ORIENTED_EDGE('',*,*,#5572,.T.); #5575=ORIENTED_EDGE('',*,*,#5574,.T.); #5576=EDGE_LOOP('',(#5573,#5575)); #5577=FACE_BOUND('',#5576,.F.); #5579=ORIENTED_EDGE('',*,*,#5578,.T.); #5581=ORIENTED_EDGE('',*,*,#5580,.T.); #5582=EDGE_LOOP('',(#5579,#5581)); #5583=FACE_BOUND('',#5582,.F.); #5585=ORIENTED_EDGE('',*,*,#5584,.T.); #5587=ORIENTED_EDGE('',*,*,#5586,.T.); #5588=EDGE_LOOP('',(#5585,#5587)); #5589=FACE_BOUND('',#5588,.F.); #5591=ORIENTED_EDGE('',*,*,#5590,.T.); #5593=ORIENTED_EDGE('',*,*,#5592,.T.); #5594=EDGE_LOOP('',(#5591,#5593)); #5595=FACE_BOUND('',#5594,.F.); #5597=ORIENTED_EDGE('',*,*,#5596,.T.); #5599=ORIENTED_EDGE('',*,*,#5598,.T.); #5600=EDGE_LOOP('',(#5597,#5599)); #5601=FACE_BOUND('',#5600,.F.); #5603=ORIENTED_EDGE('',*,*,#5602,.T.); #5605=ORIENTED_EDGE('',*,*,#5604,.T.); #5606=EDGE_LOOP('',(#5603,#5605)); #5607=FACE_BOUND('',#5606,.F.); #5609=ORIENTED_EDGE('',*,*,#5608,.T.); #5611=ORIENTED_EDGE('',*,*,#5610,.T.); #5612=EDGE_LOOP('',(#5609,#5611)); #5613=FACE_BOUND('',#5612,.F.); #5615=ORIENTED_EDGE('',*,*,#5614,.T.); #5617=ORIENTED_EDGE('',*,*,#5616,.T.); #5618=EDGE_LOOP('',(#5615,#5617)); #5619=FACE_BOUND('',#5618,.F.); #5621=ORIENTED_EDGE('',*,*,#5620,.T.); #5623=ORIENTED_EDGE('',*,*,#5622,.T.); #5624=EDGE_LOOP('',(#5621,#5623)); #5625=FACE_BOUND('',#5624,.F.); #5627=ORIENTED_EDGE('',*,*,#5626,.T.); #5629=ORIENTED_EDGE('',*,*,#5628,.T.); #5630=EDGE_LOOP('',(#5627,#5629)); #5631=FACE_BOUND('',#5630,.F.); #5633=ORIENTED_EDGE('',*,*,#5632,.T.); #5635=ORIENTED_EDGE('',*,*,#5634,.T.); #5636=EDGE_LOOP('',(#5633,#5635)); #5637=FACE_BOUND('',#5636,.F.); #5639=ORIENTED_EDGE('',*,*,#5638,.T.); #5641=ORIENTED_EDGE('',*,*,#5640,.F.); #5643=ORIENTED_EDGE('',*,*,#5642,.F.); #5645=ORIENTED_EDGE('',*,*,#5644,.F.); #5647=ORIENTED_EDGE('',*,*,#5646,.F.); #5649=ORIENTED_EDGE('',*,*,#5648,.F.); #5651=ORIENTED_EDGE('',*,*,#5650,.F.); #5653=ORIENTED_EDGE('',*,*,#5652,.F.); #5654=EDGE_LOOP('',(#5639,#5641,#5643,#5645,#5647,#5649,#5651,#5653)); #5655=FACE_BOUND('',#5654,.F.); #5657=ORIENTED_EDGE('',*,*,#5656,.F.); #5659=ORIENTED_EDGE('',*,*,#5658,.F.); #5661=ORIENTED_EDGE('',*,*,#5660,.T.); #5663=ORIENTED_EDGE('',*,*,#5662,.F.); #5665=ORIENTED_EDGE('',*,*,#5664,.F.); #5667=ORIENTED_EDGE('',*,*,#5666,.F.); #5669=ORIENTED_EDGE('',*,*,#5668,.T.); #5671=ORIENTED_EDGE('',*,*,#5670,.F.); #5673=ORIENTED_EDGE('',*,*,#5672,.T.); #5675=ORIENTED_EDGE('',*,*,#5674,.F.); #5677=ORIENTED_EDGE('',*,*,#5676,.T.); #5679=ORIENTED_EDGE('',*,*,#5678,.F.); #5681=ORIENTED_EDGE('',*,*,#5680,.F.); #5683=ORIENTED_EDGE('',*,*,#5682,.T.); #5685=ORIENTED_EDGE('',*,*,#5684,.F.); #5687=ORIENTED_EDGE('',*,*,#5686,.F.); #5688=EDGE_LOOP('',(#5657,#5659,#5661,#5663,#5665,#5667,#5669,#5671,#5673,#5675, #5677,#5679,#5681,#5683,#5685,#5687)); #5689=FACE_BOUND('',#5688,.F.); #5691=ORIENTED_EDGE('',*,*,#5690,.T.); #5693=ORIENTED_EDGE('',*,*,#5692,.T.); #5694=EDGE_LOOP('',(#5691,#5693)); #5695=FACE_BOUND('',#5694,.F.); #5697=ORIENTED_EDGE('',*,*,#5696,.T.); #5699=ORIENTED_EDGE('',*,*,#5698,.T.); #5700=EDGE_LOOP('',(#5697,#5699)); #5701=FACE_BOUND('',#5700,.F.); #5703=ORIENTED_EDGE('',*,*,#5702,.T.); #5705=ORIENTED_EDGE('',*,*,#5704,.T.); #5706=EDGE_LOOP('',(#5703,#5705)); #5707=FACE_BOUND('',#5706,.F.); #5709=ORIENTED_EDGE('',*,*,#5708,.T.); #5711=ORIENTED_EDGE('',*,*,#5710,.T.); #5712=EDGE_LOOP('',(#5709,#5711)); #5713=FACE_BOUND('',#5712,.F.); #5715=ORIENTED_EDGE('',*,*,#5714,.T.); #5717=ORIENTED_EDGE('',*,*,#5716,.T.); #5718=EDGE_LOOP('',(#5715,#5717)); #5719=FACE_BOUND('',#5718,.F.); #5721=ORIENTED_EDGE('',*,*,#5720,.T.); #5723=ORIENTED_EDGE('',*,*,#5722,.T.); #5724=EDGE_LOOP('',(#5721,#5723)); #5725=FACE_BOUND('',#5724,.F.); #5727=ORIENTED_EDGE('',*,*,#5726,.T.); #5729=ORIENTED_EDGE('',*,*,#5728,.T.); #5731=ORIENTED_EDGE('',*,*,#5730,.T.); #5733=ORIENTED_EDGE('',*,*,#5732,.T.); #5734=EDGE_LOOP('',(#5727,#5729,#5731,#5733)); #5735=FACE_BOUND('',#5734,.F.); #5737=ORIENTED_EDGE('',*,*,#5736,.T.); #5739=ORIENTED_EDGE('',*,*,#5738,.F.); #5741=ORIENTED_EDGE('',*,*,#5740,.T.); #5743=ORIENTED_EDGE('',*,*,#5742,.T.); #5745=ORIENTED_EDGE('',*,*,#5744,.F.); #5746=EDGE_LOOP('',(#5737,#5739,#5741,#5743,#5745)); #5747=FACE_BOUND('',#5746,.F.); #5749=ORIENTED_EDGE('',*,*,#5748,.F.); #5751=ORIENTED_EDGE('',*,*,#5750,.T.); #5753=ORIENTED_EDGE('',*,*,#5752,.T.); #5755=ORIENTED_EDGE('',*,*,#5754,.T.); #5757=ORIENTED_EDGE('',*,*,#5756,.F.); #5759=ORIENTED_EDGE('',*,*,#5758,.T.); #5761=ORIENTED_EDGE('',*,*,#5760,.F.); #5763=ORIENTED_EDGE('',*,*,#5762,.T.); #5765=ORIENTED_EDGE('',*,*,#5764,.F.); #5767=ORIENTED_EDGE('',*,*,#5766,.T.); #5769=ORIENTED_EDGE('',*,*,#5768,.F.); #5771=ORIENTED_EDGE('',*,*,#5770,.T.); #5773=ORIENTED_EDGE('',*,*,#5772,.F.); #5775=ORIENTED_EDGE('',*,*,#5774,.T.); #5776=EDGE_LOOP('',(#5749,#5751,#5753,#5755,#5757,#5759,#5761,#5763,#5765,#5767, #5769,#5771,#5773,#5775)); #5777=FACE_BOUND('',#5776,.F.); #5779=ORIENTED_EDGE('',*,*,#5778,.T.); #5781=ORIENTED_EDGE('',*,*,#5780,.T.); #5783=ORIENTED_EDGE('',*,*,#5782,.T.); #5785=ORIENTED_EDGE('',*,*,#5784,.T.); #5786=EDGE_LOOP('',(#5779,#5781,#5783,#5785)); #5787=FACE_BOUND('',#5786,.F.); #5789=ORIENTED_EDGE('',*,*,#5788,.T.); #5791=ORIENTED_EDGE('',*,*,#5790,.T.); #5793=ORIENTED_EDGE('',*,*,#5792,.T.); #5795=ORIENTED_EDGE('',*,*,#5794,.T.); #5796=EDGE_LOOP('',(#5789,#5791,#5793,#5795)); #5797=FACE_BOUND('',#5796,.F.); #5799=ORIENTED_EDGE('',*,*,#5798,.T.); #5801=ORIENTED_EDGE('',*,*,#5800,.T.); #5803=ORIENTED_EDGE('',*,*,#5802,.T.); #5805=ORIENTED_EDGE('',*,*,#5804,.T.); #5806=EDGE_LOOP('',(#5799,#5801,#5803,#5805)); #5807=FACE_BOUND('',#5806,.F.); #5809=ORIENTED_EDGE('',*,*,#5808,.T.); #5811=ORIENTED_EDGE('',*,*,#5810,.T.); #5813=ORIENTED_EDGE('',*,*,#5812,.T.); #5815=ORIENTED_EDGE('',*,*,#5814,.T.); #5816=EDGE_LOOP('',(#5809,#5811,#5813,#5815)); #5817=FACE_BOUND('',#5816,.F.); #5819=ORIENTED_EDGE('',*,*,#5818,.F.); #5821=ORIENTED_EDGE('',*,*,#5820,.F.); #5823=ORIENTED_EDGE('',*,*,#5822,.F.); #5825=ORIENTED_EDGE('',*,*,#5824,.F.); #5826=EDGE_LOOP('',(#5819,#5821,#5823,#5825)); #5827=FACE_BOUND('',#5826,.F.); #5829=ORIENTED_EDGE('',*,*,#5828,.F.); #5831=ORIENTED_EDGE('',*,*,#5830,.F.); #5833=ORIENTED_EDGE('',*,*,#5832,.F.); #5835=ORIENTED_EDGE('',*,*,#5834,.F.); #5836=EDGE_LOOP('',(#5829,#5831,#5833,#5835)); #5837=FACE_BOUND('',#5836,.F.); #5839=ORIENTED_EDGE('',*,*,#5838,.F.); #5841=ORIENTED_EDGE('',*,*,#5840,.F.); #5843=ORIENTED_EDGE('',*,*,#5842,.F.); #5845=ORIENTED_EDGE('',*,*,#5844,.F.); #5846=EDGE_LOOP('',(#5839,#5841,#5843,#5845)); #5847=FACE_BOUND('',#5846,.F.); #5849=ORIENTED_EDGE('',*,*,#5848,.F.); #5851=ORIENTED_EDGE('',*,*,#5850,.F.); #5853=ORIENTED_EDGE('',*,*,#5852,.F.); #5855=ORIENTED_EDGE('',*,*,#5854,.F.); #5856=EDGE_LOOP('',(#5849,#5851,#5853,#5855)); #5857=FACE_BOUND('',#5856,.F.); #5859=ORIENTED_EDGE('',*,*,#5858,.F.); #5861=ORIENTED_EDGE('',*,*,#5860,.F.); #5863=ORIENTED_EDGE('',*,*,#5862,.F.); #5865=ORIENTED_EDGE('',*,*,#5864,.F.); #5866=EDGE_LOOP('',(#5859,#5861,#5863,#5865)); #5867=FACE_BOUND('',#5866,.F.); #5869=ORIENTED_EDGE('',*,*,#5868,.F.); #5871=ORIENTED_EDGE('',*,*,#5870,.F.); #5873=ORIENTED_EDGE('',*,*,#5872,.F.); #5875=ORIENTED_EDGE('',*,*,#5874,.F.); #5876=EDGE_LOOP('',(#5869,#5871,#5873,#5875)); #5877=FACE_BOUND('',#5876,.F.); #5879=ORIENTED_EDGE('',*,*,#5878,.T.); #5881=ORIENTED_EDGE('',*,*,#5880,.T.); #5883=ORIENTED_EDGE('',*,*,#5882,.T.); #5885=ORIENTED_EDGE('',*,*,#5884,.T.); #5886=EDGE_LOOP('',(#5879,#5881,#5883,#5885)); #5887=FACE_BOUND('',#5886,.F.); #5889=ORIENTED_EDGE('',*,*,#5888,.F.); #5891=ORIENTED_EDGE('',*,*,#5890,.F.); #5893=ORIENTED_EDGE('',*,*,#5892,.F.); #5895=ORIENTED_EDGE('',*,*,#5894,.F.); #5897=ORIENTED_EDGE('',*,*,#5896,.F.); #5899=ORIENTED_EDGE('',*,*,#5898,.F.); #5901=ORIENTED_EDGE('',*,*,#5900,.F.); #5903=ORIENTED_EDGE('',*,*,#5902,.F.); #5905=ORIENTED_EDGE('',*,*,#5904,.F.); #5907=ORIENTED_EDGE('',*,*,#5906,.F.); #5909=ORIENTED_EDGE('',*,*,#5908,.F.); #5911=ORIENTED_EDGE('',*,*,#5910,.F.); #5913=ORIENTED_EDGE('',*,*,#5912,.F.); #5915=ORIENTED_EDGE('',*,*,#5914,.F.); #5916=EDGE_LOOP('',(#5889,#5891,#5893,#5895,#5897,#5899,#5901,#5903,#5905,#5907, #5909,#5911,#5913,#5915)); #5917=FACE_BOUND('',#5916,.F.); #5919=ORIENTED_EDGE('',*,*,#5918,.F.); #5921=ORIENTED_EDGE('',*,*,#5920,.F.); #5923=ORIENTED_EDGE('',*,*,#5922,.F.); #5925=ORIENTED_EDGE('',*,*,#5924,.T.); #5927=ORIENTED_EDGE('',*,*,#5926,.F.); #5928=EDGE_LOOP('',(#5919,#5921,#5923,#5925,#5927)); #5929=FACE_BOUND('',#5928,.F.); #5931=ORIENTED_EDGE('',*,*,#5930,.F.); #5933=ORIENTED_EDGE('',*,*,#5932,.F.); #5935=ORIENTED_EDGE('',*,*,#5934,.F.); #5937=ORIENTED_EDGE('',*,*,#5936,.T.); #5939=ORIENTED_EDGE('',*,*,#5938,.F.); #5940=EDGE_LOOP('',(#5931,#5933,#5935,#5937,#5939)); #5941=FACE_BOUND('',#5940,.F.); #5943=ORIENTED_EDGE('',*,*,#5942,.T.); #5945=ORIENTED_EDGE('',*,*,#5944,.F.); #5947=ORIENTED_EDGE('',*,*,#5946,.T.); #5949=ORIENTED_EDGE('',*,*,#5948,.T.); #5951=ORIENTED_EDGE('',*,*,#5950,.F.); #5952=EDGE_LOOP('',(#5943,#5945,#5947,#5949,#5951)); #5953=FACE_BOUND('',#5952,.F.); #5954=ADVANCED_FACE('',(#5539,#5553,#5559,#5565,#5571,#5577,#5583,#5589,#5595, #5601,#5607,#5613,#5619,#5625,#5631,#5637,#5655,#5689,#5695,#5701,#5707,#5713, #5719,#5725,#5735,#5747,#5777,#5787,#5797,#5807,#5817,#5827,#5837,#5847,#5857, #5867,#5877,#5887,#5917,#5929,#5941,#5953),#5493,.F.); #5955=CARTESIAN_POINT('',(0.E0,0.E0,8.E0)); #5956=DIRECTION('',(0.E0,0.E0,1.E0)); #5957=DIRECTION('',(1.E0,0.E0,0.E0)); #5958=AXIS2_PLACEMENT_3D('',#5955,#5956,#5957); #5959=PLANE('',#5958); #5960=ORIENTED_EDGE('',*,*,#5540,.F.); #5962=ORIENTED_EDGE('',*,*,#5961,.T.); #5964=ORIENTED_EDGE('',*,*,#5963,.F.); #5966=ORIENTED_EDGE('',*,*,#5965,.F.); #5967=ORIENTED_EDGE('',*,*,#5494,.T.); #5969=ORIENTED_EDGE('',*,*,#5968,.F.); #5971=ORIENTED_EDGE('',*,*,#5970,.F.); #5973=ORIENTED_EDGE('',*,*,#5972,.T.); #5975=ORIENTED_EDGE('',*,*,#5974,.F.); #5977=ORIENTED_EDGE('',*,*,#5976,.F.); #5979=ORIENTED_EDGE('',*,*,#5978,.F.); #5981=ORIENTED_EDGE('',*,*,#5980,.T.); #5983=ORIENTED_EDGE('',*,*,#5982,.T.); #5985=ORIENTED_EDGE('',*,*,#5984,.F.); #5986=ORIENTED_EDGE('',*,*,#5510,.F.); #5988=ORIENTED_EDGE('',*,*,#5987,.F.); #5990=ORIENTED_EDGE('',*,*,#5989,.F.); #5992=ORIENTED_EDGE('',*,*,#5991,.T.); #5993=EDGE_LOOP('',(#5960,#5962,#5964,#5966,#5967,#5969,#5971,#5973,#5975,#5977, #5979,#5981,#5983,#5985,#5986,#5988,#5990,#5992)); #5994=FACE_OUTER_BOUND('',#5993,.F.); #5996=ORIENTED_EDGE('',*,*,#5995,.T.); #5998=ORIENTED_EDGE('',*,*,#5997,.T.); #5999=EDGE_LOOP('',(#5996,#5998)); #6000=FACE_BOUND('',#5999,.F.); #6002=ORIENTED_EDGE('',*,*,#6001,.T.); #6004=ORIENTED_EDGE('',*,*,#6003,.T.); #6005=EDGE_LOOP('',(#6002,#6004)); #6006=FACE_BOUND('',#6005,.F.); #6008=ORIENTED_EDGE('',*,*,#6007,.T.); #6010=ORIENTED_EDGE('',*,*,#6009,.T.); #6011=EDGE_LOOP('',(#6008,#6010)); #6012=FACE_BOUND('',#6011,.F.); #6014=ORIENTED_EDGE('',*,*,#6013,.T.); #6016=ORIENTED_EDGE('',*,*,#6015,.T.); #6017=EDGE_LOOP('',(#6014,#6016)); #6018=FACE_BOUND('',#6017,.F.); #6020=ORIENTED_EDGE('',*,*,#6019,.F.); #6022=ORIENTED_EDGE('',*,*,#6021,.F.); #6023=EDGE_LOOP('',(#6020,#6022)); #6024=FACE_BOUND('',#6023,.F.); #6026=ORIENTED_EDGE('',*,*,#6025,.F.); #6028=ORIENTED_EDGE('',*,*,#6027,.F.); #6029=EDGE_LOOP('',(#6026,#6028)); #6030=FACE_BOUND('',#6029,.F.); #6032=ORIENTED_EDGE('',*,*,#6031,.F.); #6034=ORIENTED_EDGE('',*,*,#6033,.F.); #6035=EDGE_LOOP('',(#6032,#6034)); #6036=FACE_BOUND('',#6035,.F.); #6038=ORIENTED_EDGE('',*,*,#6037,.F.); #6040=ORIENTED_EDGE('',*,*,#6039,.F.); #6041=EDGE_LOOP('',(#6038,#6040)); #6042=FACE_BOUND('',#6041,.F.); #6044=ORIENTED_EDGE('',*,*,#6043,.T.); #6046=ORIENTED_EDGE('',*,*,#6045,.F.); #6048=ORIENTED_EDGE('',*,*,#6047,.T.); #6050=ORIENTED_EDGE('',*,*,#6049,.F.); #6052=ORIENTED_EDGE('',*,*,#6051,.T.); #6054=ORIENTED_EDGE('',*,*,#6053,.F.); #6056=ORIENTED_EDGE('',*,*,#6055,.T.); #6058=ORIENTED_EDGE('',*,*,#6057,.F.); #6059=EDGE_LOOP('',(#6044,#6046,#6048,#6050,#6052,#6054,#6056,#6058)); #6060=FACE_BOUND('',#6059,.F.); #6062=ORIENTED_EDGE('',*,*,#6061,.F.); #6064=ORIENTED_EDGE('',*,*,#6063,.F.); #6066=ORIENTED_EDGE('',*,*,#6065,.F.); #6068=ORIENTED_EDGE('',*,*,#6067,.F.); #6070=ORIENTED_EDGE('',*,*,#6069,.F.); #6072=ORIENTED_EDGE('',*,*,#6071,.F.); #6074=ORIENTED_EDGE('',*,*,#6073,.F.); #6076=ORIENTED_EDGE('',*,*,#6075,.F.); #6077=EDGE_LOOP('',(#6062,#6064,#6066,#6068,#6070,#6072,#6074,#6076)); #6078=FACE_BOUND('',#6077,.F.); #6079=ADVANCED_FACE('',(#5994,#6000,#6006,#6012,#6018,#6024,#6030,#6036,#6042, #6060,#6078),#5959,.F.); #6080=CARTESIAN_POINT('',(1.975E1,1.09375E1,8.E0)); #6081=DIRECTION('',(0.E0,0.E0,-1.E0)); #6082=DIRECTION('',(-1.E0,0.E0,0.E0)); #6083=AXIS2_PLACEMENT_3D('',#6080,#6081,#6082); #6084=CYLINDRICAL_SURFACE('',#6083,9.5E-2); #6085=ORIENTED_EDGE('',*,*,#5995,.F.); #6087=ORIENTED_EDGE('',*,*,#6086,.T.); #6089=ORIENTED_EDGE('',*,*,#6088,.T.); #6091=ORIENTED_EDGE('',*,*,#6090,.F.); #6092=EDGE_LOOP('',(#6085,#6087,#6089,#6091)); #6093=FACE_OUTER_BOUND('',#6092,.F.); #6094=ADVANCED_FACE('',(#6093),#6084,.F.); #6095=CARTESIAN_POINT('',(1.975E1,1.09375E1,8.E0)); #6096=DIRECTION('',(0.E0,0.E0,-1.E0)); #6097=DIRECTION('',(-1.E0,0.E0,0.E0)); #6098=AXIS2_PLACEMENT_3D('',#6095,#6096,#6097); #6099=CYLINDRICAL_SURFACE('',#6098,9.5E-2); #6100=ORIENTED_EDGE('',*,*,#5997,.F.); #6101=ORIENTED_EDGE('',*,*,#6090,.T.); #6103=ORIENTED_EDGE('',*,*,#6102,.T.); #6104=ORIENTED_EDGE('',*,*,#6086,.F.); #6105=EDGE_LOOP('',(#6100,#6101,#6103,#6104)); #6106=FACE_OUTER_BOUND('',#6105,.F.); #6107=ADVANCED_FACE('',(#6106),#6099,.F.); #6108=CARTESIAN_POINT('',(1.975E1,1.09375E1,8.25E0)); #6109=DIRECTION('',(0.E0,0.E0,-1.E0)); #6110=DIRECTION('',(-1.E0,0.E0,0.E0)); #6111=AXIS2_PLACEMENT_3D('',#6108,#6109,#6110); #6112=PLANE('',#6111); #6113=ORIENTED_EDGE('',*,*,#6088,.F.); #6114=ORIENTED_EDGE('',*,*,#6102,.F.); #6115=EDGE_LOOP('',(#6113,#6114)); #6116=FACE_OUTER_BOUND('',#6115,.F.); #6117=ADVANCED_FACE('',(#6116),#6112,.T.); #6118=CARTESIAN_POINT('',(1.975E1,1.05E1,8.E0)); #6119=DIRECTION('',(0.E0,0.E0,-1.E0)); #6120=DIRECTION('',(-1.E0,0.E0,0.E0)); #6121=AXIS2_PLACEMENT_3D('',#6118,#6119,#6120); #6122=CYLINDRICAL_SURFACE('',#6121,1.625E-1); #6123=ORIENTED_EDGE('',*,*,#6001,.F.); #6125=ORIENTED_EDGE('',*,*,#6124,.T.); #6127=ORIENTED_EDGE('',*,*,#6126,.T.); #6129=ORIENTED_EDGE('',*,*,#6128,.F.); #6130=EDGE_LOOP('',(#6123,#6125,#6127,#6129)); #6131=FACE_OUTER_BOUND('',#6130,.F.); #6132=ADVANCED_FACE('',(#6131),#6122,.F.); #6133=CARTESIAN_POINT('',(1.975E1,1.05E1,8.E0)); #6134=DIRECTION('',(0.E0,0.E0,-1.E0)); #6135=DIRECTION('',(-1.E0,0.E0,0.E0)); #6136=AXIS2_PLACEMENT_3D('',#6133,#6134,#6135); #6137=CYLINDRICAL_SURFACE('',#6136,1.625E-1); #6138=ORIENTED_EDGE('',*,*,#6003,.F.); #6139=ORIENTED_EDGE('',*,*,#6128,.T.); #6141=ORIENTED_EDGE('',*,*,#6140,.T.); #6142=ORIENTED_EDGE('',*,*,#6124,.F.); #6143=EDGE_LOOP('',(#6138,#6139,#6141,#6142)); #6144=FACE_OUTER_BOUND('',#6143,.F.); #6145=ADVANCED_FACE('',(#6144),#6137,.F.); #6146=CARTESIAN_POINT('',(2.4E1,0.E0,1.E1)); #6147=DIRECTION('',(0.E0,0.E0,-1.E0)); #6148=DIRECTION('',(-1.E0,0.E0,0.E0)); #6149=AXIS2_PLACEMENT_3D('',#6146,#6147,#6148); #6150=PLANE('',#6149); #6152=ORIENTED_EDGE('',*,*,#6151,.T.); #6154=ORIENTED_EDGE('',*,*,#6153,.T.); #6156=ORIENTED_EDGE('',*,*,#6155,.F.); #6158=ORIENTED_EDGE('',*,*,#6157,.F.); #6160=ORIENTED_EDGE('',*,*,#6159,.T.); #6162=ORIENTED_EDGE('',*,*,#6161,.T.); #6164=ORIENTED_EDGE('',*,*,#6163,.T.); #6166=ORIENTED_EDGE('',*,*,#6165,.T.); #6168=ORIENTED_EDGE('',*,*,#6167,.F.); #6169=EDGE_LOOP('',(#6152,#6154,#6156,#6158,#6160,#6162,#6164,#6166,#6168)); #6170=FACE_OUTER_BOUND('',#6169,.F.); #6171=ORIENTED_EDGE('',*,*,#6126,.F.); #6172=ORIENTED_EDGE('',*,*,#6140,.F.); #6173=EDGE_LOOP('',(#6171,#6172)); #6174=FACE_BOUND('',#6173,.F.); #6176=ORIENTED_EDGE('',*,*,#6175,.F.); #6178=ORIENTED_EDGE('',*,*,#6177,.F.); #6180=ORIENTED_EDGE('',*,*,#6179,.F.); #6182=ORIENTED_EDGE('',*,*,#6181,.F.); #6184=ORIENTED_EDGE('',*,*,#6183,.F.); #6186=ORIENTED_EDGE('',*,*,#6185,.F.); #6188=ORIENTED_EDGE('',*,*,#6187,.F.); #6190=ORIENTED_EDGE('',*,*,#6189,.F.); #6192=ORIENTED_EDGE('',*,*,#6191,.F.); #6194=ORIENTED_EDGE('',*,*,#6193,.F.); #6196=ORIENTED_EDGE('',*,*,#6195,.F.); #6198=ORIENTED_EDGE('',*,*,#6197,.F.); #6199=EDGE_LOOP('',(#6176,#6178,#6180,#6182,#6184,#6186,#6188,#6190,#6192,#6194, #6196,#6198)); #6200=FACE_BOUND('',#6199,.F.); #6201=ADVANCED_FACE('',(#6170,#6174,#6200),#6150,.F.); #6202=CARTESIAN_POINT('',(2.375E1,1.5E0,1.2E1)); #6203=DIRECTION('',(1.E0,0.E0,0.E0)); #6204=DIRECTION('',(0.E0,-1.E0,0.E0)); #6205=AXIS2_PLACEMENT_3D('',#6202,#6203,#6204); #6206=PLANE('',#6205); #6208=ORIENTED_EDGE('',*,*,#6207,.F.); #6210=ORIENTED_EDGE('',*,*,#6209,.F.); #6211=ORIENTED_EDGE('',*,*,#6151,.F.); #6212=EDGE_LOOP('',(#6208,#6210,#6211)); #6213=FACE_OUTER_BOUND('',#6212,.F.); #6214=ADVANCED_FACE('',(#6213),#6206,.T.); #6215=CARTESIAN_POINT('',(0.E0,1.5E0,0.E0)); #6216=DIRECTION('',(0.E0,1.E0,0.E0)); #6217=DIRECTION('',(1.E0,0.E0,0.E0)); #6218=AXIS2_PLACEMENT_3D('',#6215,#6216,#6217); #6219=PLANE('',#6218); #6220=ORIENTED_EDGE('',*,*,#5963,.T.); #6222=ORIENTED_EDGE('',*,*,#6221,.F.); #6224=ORIENTED_EDGE('',*,*,#6223,.F.); #6226=ORIENTED_EDGE('',*,*,#6225,.T.); #6228=ORIENTED_EDGE('',*,*,#6227,.F.); #6230=ORIENTED_EDGE('',*,*,#6229,.F.); #6231=ORIENTED_EDGE('',*,*,#5989,.T.); #6233=ORIENTED_EDGE('',*,*,#6232,.F.); #6235=ORIENTED_EDGE('',*,*,#6234,.F.); #6237=ORIENTED_EDGE('',*,*,#6236,.T.); #6239=ORIENTED_EDGE('',*,*,#6238,.F.); #6241=ORIENTED_EDGE('',*,*,#6240,.T.); #6243=ORIENTED_EDGE('',*,*,#6242,.F.); #6245=ORIENTED_EDGE('',*,*,#6244,.F.); #6246=EDGE_LOOP('',(#6220,#6222,#6224,#6226,#6228,#6230,#6231,#6233,#6235,#6237, #6239,#6241,#6243,#6245)); #6247=FACE_OUTER_BOUND('',#6246,.F.); #6249=ORIENTED_EDGE('',*,*,#6248,.F.); #6251=ORIENTED_EDGE('',*,*,#6250,.F.); #6252=EDGE_LOOP('',(#6249,#6251)); #6253=FACE_BOUND('',#6252,.F.); #6255=ORIENTED_EDGE('',*,*,#6254,.F.); #6257=ORIENTED_EDGE('',*,*,#6256,.F.); #6258=EDGE_LOOP('',(#6255,#6257)); #6259=FACE_BOUND('',#6258,.F.); #6261=ORIENTED_EDGE('',*,*,#6260,.F.); #6263=ORIENTED_EDGE('',*,*,#6262,.F.); #6264=EDGE_LOOP('',(#6261,#6263)); #6265=FACE_BOUND('',#6264,.F.); #6267=ORIENTED_EDGE('',*,*,#6266,.F.); #6269=ORIENTED_EDGE('',*,*,#6268,.F.); #6270=EDGE_LOOP('',(#6267,#6269)); #6271=FACE_BOUND('',#6270,.F.); #6273=ORIENTED_EDGE('',*,*,#6272,.F.); #6275=ORIENTED_EDGE('',*,*,#6274,.F.); #6276=EDGE_LOOP('',(#6273,#6275)); #6277=FACE_BOUND('',#6276,.F.); #6278=ADVANCED_FACE('',(#6247,#6253,#6259,#6265,#6271,#6277),#6219,.T.); #6279=CARTESIAN_POINT('',(0.E0,1.5E0,0.E0)); #6280=DIRECTION('',(0.E0,1.E0,0.E0)); #6281=DIRECTION('',(1.E0,0.E0,0.E0)); #6282=AXIS2_PLACEMENT_3D('',#6279,#6280,#6281); #6283=PLANE('',#6282); #6284=ORIENTED_EDGE('',*,*,#6207,.T.); #6285=ORIENTED_EDGE('',*,*,#6167,.T.); #6287=ORIENTED_EDGE('',*,*,#6286,.T.); #6289=ORIENTED_EDGE('',*,*,#6288,.F.); #6291=ORIENTED_EDGE('',*,*,#6290,.T.); #6293=ORIENTED_EDGE('',*,*,#6292,.F.); #6295=ORIENTED_EDGE('',*,*,#6294,.F.); #6297=ORIENTED_EDGE('',*,*,#6296,.T.); #6299=ORIENTED_EDGE('',*,*,#6298,.F.); #6301=ORIENTED_EDGE('',*,*,#6300,.T.); #6303=ORIENTED_EDGE('',*,*,#6302,.F.); #6305=ORIENTED_EDGE('',*,*,#6304,.F.); #6307=ORIENTED_EDGE('',*,*,#6306,.F.); #6309=ORIENTED_EDGE('',*,*,#6308,.T.); #6311=ORIENTED_EDGE('',*,*,#6310,.F.); #6313=ORIENTED_EDGE('',*,*,#6312,.T.); #6315=ORIENTED_EDGE('',*,*,#6314,.F.); #6317=ORIENTED_EDGE('',*,*,#6316,.T.); #6319=ORIENTED_EDGE('',*,*,#6318,.T.); #6321=ORIENTED_EDGE('',*,*,#6320,.T.); #6323=ORIENTED_EDGE('',*,*,#6322,.F.); #6324=ORIENTED_EDGE('',*,*,#5976,.T.); #6326=ORIENTED_EDGE('',*,*,#6325,.T.); #6327=ORIENTED_EDGE('',*,*,#6157,.T.); #6329=ORIENTED_EDGE('',*,*,#6328,.F.); #6331=ORIENTED_EDGE('',*,*,#6330,.F.); #6332=EDGE_LOOP('',(#6284,#6285,#6287,#6289,#6291,#6293,#6295,#6297,#6299,#6301, #6303,#6305,#6307,#6309,#6311,#6313,#6315,#6317,#6319,#6321,#6323,#6324,#6326, #6327,#6329,#6331)); #6333=FACE_OUTER_BOUND('',#6332,.F.); #6335=ORIENTED_EDGE('',*,*,#6334,.F.); #6337=ORIENTED_EDGE('',*,*,#6336,.F.); #6338=EDGE_LOOP('',(#6335,#6337)); #6339=FACE_BOUND('',#6338,.F.); #6341=ORIENTED_EDGE('',*,*,#6340,.F.); #6343=ORIENTED_EDGE('',*,*,#6342,.F.); #6344=EDGE_LOOP('',(#6341,#6343)); #6345=FACE_BOUND('',#6344,.F.); #6347=ORIENTED_EDGE('',*,*,#6346,.T.); #6349=ORIENTED_EDGE('',*,*,#6348,.T.); #6350=EDGE_LOOP('',(#6347,#6349)); #6351=FACE_BOUND('',#6350,.F.); #6353=ORIENTED_EDGE('',*,*,#6352,.T.); #6355=ORIENTED_EDGE('',*,*,#6354,.T.); #6356=EDGE_LOOP('',(#6353,#6355)); #6357=FACE_BOUND('',#6356,.F.); #6359=ORIENTED_EDGE('',*,*,#6358,.F.); #6361=ORIENTED_EDGE('',*,*,#6360,.F.); #6362=EDGE_LOOP('',(#6359,#6361)); #6363=FACE_BOUND('',#6362,.F.); #6365=ORIENTED_EDGE('',*,*,#6364,.F.); #6367=ORIENTED_EDGE('',*,*,#6366,.F.); #6368=EDGE_LOOP('',(#6365,#6367)); #6369=FACE_BOUND('',#6368,.F.); #6371=ORIENTED_EDGE('',*,*,#6370,.F.); #6373=ORIENTED_EDGE('',*,*,#6372,.F.); #6374=EDGE_LOOP('',(#6371,#6373)); #6375=FACE_BOUND('',#6374,.F.); #6377=ORIENTED_EDGE('',*,*,#6376,.F.); #6379=ORIENTED_EDGE('',*,*,#6378,.F.); #6380=EDGE_LOOP('',(#6377,#6379)); #6381=FACE_BOUND('',#6380,.F.); #6383=ORIENTED_EDGE('',*,*,#6382,.F.); #6385=ORIENTED_EDGE('',*,*,#6384,.F.); #6386=EDGE_LOOP('',(#6383,#6385)); #6387=FACE_BOUND('',#6386,.F.); #6389=ORIENTED_EDGE('',*,*,#6388,.F.); #6391=ORIENTED_EDGE('',*,*,#6390,.F.); #6392=EDGE_LOOP('',(#6389,#6391)); #6393=FACE_BOUND('',#6392,.F.); #6395=ORIENTED_EDGE('',*,*,#6394,.F.); #6397=ORIENTED_EDGE('',*,*,#6396,.F.); #6398=EDGE_LOOP('',(#6395,#6397)); #6399=FACE_BOUND('',#6398,.F.); #6401=ORIENTED_EDGE('',*,*,#6400,.T.); #6403=ORIENTED_EDGE('',*,*,#6402,.F.); #6405=ORIENTED_EDGE('',*,*,#6404,.F.); #6407=ORIENTED_EDGE('',*,*,#6406,.F.); #6409=ORIENTED_EDGE('',*,*,#6408,.T.); #6411=ORIENTED_EDGE('',*,*,#6410,.F.); #6413=ORIENTED_EDGE('',*,*,#6412,.T.); #6415=ORIENTED_EDGE('',*,*,#6414,.F.); #6416=EDGE_LOOP('',(#6401,#6403,#6405,#6407,#6409,#6411,#6413,#6415)); #6417=FACE_BOUND('',#6416,.F.); #6419=ORIENTED_EDGE('',*,*,#6418,.F.); #6421=ORIENTED_EDGE('',*,*,#6420,.F.); #6423=ORIENTED_EDGE('',*,*,#6422,.T.); #6425=ORIENTED_EDGE('',*,*,#6424,.F.); #6427=ORIENTED_EDGE('',*,*,#6426,.T.); #6429=ORIENTED_EDGE('',*,*,#6428,.F.); #6431=ORIENTED_EDGE('',*,*,#6430,.T.); #6433=ORIENTED_EDGE('',*,*,#6432,.F.); #6435=ORIENTED_EDGE('',*,*,#6434,.F.); #6437=ORIENTED_EDGE('',*,*,#6436,.F.); #6439=ORIENTED_EDGE('',*,*,#6438,.F.); #6441=ORIENTED_EDGE('',*,*,#6440,.T.); #6443=ORIENTED_EDGE('',*,*,#6442,.F.); #6445=ORIENTED_EDGE('',*,*,#6444,.F.); #6447=ORIENTED_EDGE('',*,*,#6446,.T.); #6449=ORIENTED_EDGE('',*,*,#6448,.F.); #6450=EDGE_LOOP('',(#6419,#6421,#6423,#6425,#6427,#6429,#6431,#6433,#6435,#6437, #6439,#6441,#6443,#6445,#6447,#6449)); #6451=FACE_BOUND('',#6450,.F.); #6453=ORIENTED_EDGE('',*,*,#6452,.F.); #6455=ORIENTED_EDGE('',*,*,#6454,.F.); #6456=EDGE_LOOP('',(#6453,#6455)); #6457=FACE_BOUND('',#6456,.F.); #6459=ORIENTED_EDGE('',*,*,#6458,.F.); #6461=ORIENTED_EDGE('',*,*,#6460,.F.); #6462=EDGE_LOOP('',(#6459,#6461)); #6463=FACE_BOUND('',#6462,.F.); #6465=ORIENTED_EDGE('',*,*,#6464,.F.); #6467=ORIENTED_EDGE('',*,*,#6466,.F.); #6468=EDGE_LOOP('',(#6465,#6467)); #6469=FACE_BOUND('',#6468,.F.); #6471=ORIENTED_EDGE('',*,*,#6470,.F.); #6473=ORIENTED_EDGE('',*,*,#6472,.F.); #6474=EDGE_LOOP('',(#6471,#6473)); #6475=FACE_BOUND('',#6474,.F.); #6477=ORIENTED_EDGE('',*,*,#6476,.F.); #6479=ORIENTED_EDGE('',*,*,#6478,.F.); #6480=EDGE_LOOP('',(#6477,#6479)); #6481=FACE_BOUND('',#6480,.F.); #6483=ORIENTED_EDGE('',*,*,#6482,.F.); #6485=ORIENTED_EDGE('',*,*,#6484,.F.); #6486=EDGE_LOOP('',(#6483,#6485)); #6487=FACE_BOUND('',#6486,.F.); #6488=ADVANCED_FACE('',(#6333,#6339,#6345,#6351,#6357,#6363,#6369,#6375,#6381, #6387,#6393,#6399,#6417,#6451,#6457,#6463,#6469,#6475,#6481,#6487),#6283,.T.); #6489=CARTESIAN_POINT('',(6.45E0,1.176878221735E0,2.975E1)); #6490=DIRECTION('',(0.E0,1.E0,0.E0)); #6491=DIRECTION('',(-1.E0,0.E0,0.E0)); #6492=AXIS2_PLACEMENT_3D('',#6489,#6490,#6491); #6493=CYLINDRICAL_SURFACE('',#6492,1.E-1); #6494=ORIENTED_EDGE('',*,*,#6334,.T.); #6496=ORIENTED_EDGE('',*,*,#6495,.F.); #6498=ORIENTED_EDGE('',*,*,#6497,.F.); #6500=ORIENTED_EDGE('',*,*,#6499,.T.); #6501=EDGE_LOOP('',(#6494,#6496,#6498,#6500)); #6502=FACE_OUTER_BOUND('',#6501,.F.); #6503=ADVANCED_FACE('',(#6502),#6493,.F.); #6504=CARTESIAN_POINT('',(6.45E0,1.176878221735E0,2.975E1)); #6505=DIRECTION('',(0.E0,1.E0,0.E0)); #6506=DIRECTION('',(-1.E0,0.E0,0.E0)); #6507=AXIS2_PLACEMENT_3D('',#6504,#6505,#6506); #6508=CYLINDRICAL_SURFACE('',#6507,1.E-1); #6509=ORIENTED_EDGE('',*,*,#6336,.T.); #6510=ORIENTED_EDGE('',*,*,#6499,.F.); #6512=ORIENTED_EDGE('',*,*,#6511,.T.); #6513=ORIENTED_EDGE('',*,*,#6495,.T.); #6514=EDGE_LOOP('',(#6509,#6510,#6512,#6513)); #6515=FACE_OUTER_BOUND('',#6514,.F.); #6516=ADVANCED_FACE('',(#6515),#6508,.F.); #6517=CARTESIAN_POINT('',(6.45E0,1.234346967234E0,2.975E1)); #6518=DIRECTION('',(0.E0,1.E0,0.E0)); #6519=DIRECTION('',(-1.E0,0.E0,0.E0)); #6520=AXIS2_PLACEMENT_3D('',#6517,#6518,#6519); #6521=CONICAL_SURFACE('',#6520,7.288815195685E-2,6.E1); #6523=ORIENTED_EDGE('',*,*,#6522,.T.); #6524=ORIENTED_EDGE('',*,*,#6511,.F.); #6526=ORIENTED_EDGE('',*,*,#6525,.F.); #6527=EDGE_LOOP('',(#6523,#6524,#6526)); #6528=FACE_OUTER_BOUND('',#6527,.F.); #6529=ADVANCED_FACE('',(#6528),#6521,.F.); #6530=CARTESIAN_POINT('',(6.45E0,1.234346967234E0,2.975E1)); #6531=DIRECTION('',(0.E0,1.E0,0.E0)); #6532=DIRECTION('',(-1.E0,0.E0,0.E0)); #6533=AXIS2_PLACEMENT_3D('',#6530,#6531,#6532); #6534=CONICAL_SURFACE('',#6533,7.288815195685E-2,6.E1); #6535=ORIENTED_EDGE('',*,*,#6522,.F.); #6536=ORIENTED_EDGE('',*,*,#6525,.T.); #6537=ORIENTED_EDGE('',*,*,#6497,.T.); #6538=EDGE_LOOP('',(#6535,#6536,#6537)); #6539=FACE_OUTER_BOUND('',#6538,.F.); #6540=ADVANCED_FACE('',(#6539),#6534,.F.); #6541=CARTESIAN_POINT('',(7.45E0,1.176878221735E0,2.975E1)); #6542=DIRECTION('',(0.E0,1.E0,0.E0)); #6543=DIRECTION('',(-1.E0,0.E0,0.E0)); #6544=AXIS2_PLACEMENT_3D('',#6541,#6542,#6543); #6545=CYLINDRICAL_SURFACE('',#6544,1.E-1); #6546=ORIENTED_EDGE('',*,*,#6340,.T.); #6548=ORIENTED_EDGE('',*,*,#6547,.F.); #6550=ORIENTED_EDGE('',*,*,#6549,.F.); #6552=ORIENTED_EDGE('',*,*,#6551,.T.); #6553=EDGE_LOOP('',(#6546,#6548,#6550,#6552)); #6554=FACE_OUTER_BOUND('',#6553,.F.); #6555=ADVANCED_FACE('',(#6554),#6545,.F.); #6556=CARTESIAN_POINT('',(7.45E0,1.176878221735E0,2.975E1)); #6557=DIRECTION('',(0.E0,1.E0,0.E0)); #6558=DIRECTION('',(-1.E0,0.E0,0.E0)); #6559=AXIS2_PLACEMENT_3D('',#6556,#6557,#6558); #6560=CYLINDRICAL_SURFACE('',#6559,1.E-1); #6561=ORIENTED_EDGE('',*,*,#6342,.T.); #6562=ORIENTED_EDGE('',*,*,#6551,.F.); #6564=ORIENTED_EDGE('',*,*,#6563,.T.); #6565=ORIENTED_EDGE('',*,*,#6547,.T.); #6566=EDGE_LOOP('',(#6561,#6562,#6564,#6565)); #6567=FACE_OUTER_BOUND('',#6566,.F.); #6568=ADVANCED_FACE('',(#6567),#6560,.F.); #6569=CARTESIAN_POINT('',(7.45E0,1.234346967234E0,2.975E1)); #6570=DIRECTION('',(0.E0,1.E0,0.E0)); #6571=DIRECTION('',(-1.E0,0.E0,0.E0)); #6572=AXIS2_PLACEMENT_3D('',#6569,#6570,#6571); #6573=CONICAL_SURFACE('',#6572,7.288815195685E-2,6.E1); #6575=ORIENTED_EDGE('',*,*,#6574,.T.); #6576=ORIENTED_EDGE('',*,*,#6563,.F.); #6578=ORIENTED_EDGE('',*,*,#6577,.F.); #6579=EDGE_LOOP('',(#6575,#6576,#6578)); #6580=FACE_OUTER_BOUND('',#6579,.F.); #6581=ADVANCED_FACE('',(#6580),#6573,.F.); #6582=CARTESIAN_POINT('',(7.45E0,1.234346967234E0,2.975E1)); #6583=DIRECTION('',(0.E0,1.E0,0.E0)); #6584=DIRECTION('',(-1.E0,0.E0,0.E0)); #6585=AXIS2_PLACEMENT_3D('',#6582,#6583,#6584); #6586=CONICAL_SURFACE('',#6585,7.288815195685E-2,6.E1); #6587=ORIENTED_EDGE('',*,*,#6574,.F.); #6588=ORIENTED_EDGE('',*,*,#6577,.T.); #6589=ORIENTED_EDGE('',*,*,#6549,.T.); #6590=EDGE_LOOP('',(#6587,#6588,#6589)); #6591=FACE_OUTER_BOUND('',#6590,.F.); #6592=ADVANCED_FACE('',(#6591),#6586,.F.); #6593=CARTESIAN_POINT('',(2.046862696660E1,-7.805924235695E-2,7.E0)); #6594=DIRECTION('',(0.E0,1.E0,0.E0)); #6595=DIRECTION('',(0.E0,0.E0,1.E0)); #6596=AXIS2_PLACEMENT_3D('',#6593,#6594,#6595); #6597=CYLINDRICAL_SURFACE('',#6596,1.E0); #6598=ORIENTED_EDGE('',*,*,#5961,.F.); #6599=ORIENTED_EDGE('',*,*,#5550,.T.); #6601=ORIENTED_EDGE('',*,*,#6600,.T.); #6602=ORIENTED_EDGE('',*,*,#6221,.T.); #6603=EDGE_LOOP('',(#6598,#6599,#6601,#6602)); #6604=FACE_OUTER_BOUND('',#6603,.F.); #6605=ADVANCED_FACE('',(#6604),#6597,.F.); #6606=CARTESIAN_POINT('',(1.65E1,1.562633489099E0,7.5E0)); #6607=DIRECTION('',(0.E0,-1.E0,0.E0)); #6608=DIRECTION('',(0.E0,0.E0,-1.E0)); #6609=AXIS2_PLACEMENT_3D('',#6606,#6607,#6608); #6610=CYLINDRICAL_SURFACE('',#6609,5.E0); #6611=ORIENTED_EDGE('',*,*,#6600,.F.); #6612=ORIENTED_EDGE('',*,*,#5548,.T.); #6614=ORIENTED_EDGE('',*,*,#6613,.F.); #6615=ORIENTED_EDGE('',*,*,#6223,.T.); #6616=EDGE_LOOP('',(#6611,#6612,#6614,#6615)); #6617=FACE_OUTER_BOUND('',#6616,.F.); #6618=ADVANCED_FACE('',(#6617),#6610,.F.); #6619=CARTESIAN_POINT('',(2.15E1,1.5E0,2.5E0)); #6620=DIRECTION('',(0.E0,0.E0,-1.E0)); #6621=DIRECTION('',(-1.E0,0.E0,0.E0)); #6622=AXIS2_PLACEMENT_3D('',#6619,#6620,#6621); #6623=PLANE('',#6622); #6625=ORIENTED_EDGE('',*,*,#6624,.F.); #6626=ORIENTED_EDGE('',*,*,#6225,.F.); #6627=ORIENTED_EDGE('',*,*,#6613,.T.); #6628=ORIENTED_EDGE('',*,*,#5546,.T.); #6629=EDGE_LOOP('',(#6625,#6626,#6627,#6628)); #6630=FACE_OUTER_BOUND('',#6629,.F.); #6631=ADVANCED_FACE('',(#6630),#6623,.F.); #6632=CARTESIAN_POINT('',(7.5E0,1.562633489099E0,7.5E0)); #6633=DIRECTION('',(0.E0,-1.E0,0.E0)); #6634=DIRECTION('',(-1.E0,0.E0,0.E0)); #6635=AXIS2_PLACEMENT_3D('',#6632,#6633,#6634); #6636=CYLINDRICAL_SURFACE('',#6635,5.E0); #6638=ORIENTED_EDGE('',*,*,#6637,.F.); #6639=ORIENTED_EDGE('',*,*,#6227,.T.); #6640=ORIENTED_EDGE('',*,*,#6624,.T.); #6641=ORIENTED_EDGE('',*,*,#5544,.T.); #6642=EDGE_LOOP('',(#6638,#6639,#6640,#6641)); #6643=FACE_OUTER_BOUND('',#6642,.F.); #6644=ADVANCED_FACE('',(#6643),#6636,.F.); #6645=CARTESIAN_POINT('',(3.531373033403E0,1.157860978230E1,7.E0)); #6646=DIRECTION('',(0.E0,-1.E0,0.E0)); #6647=DIRECTION('',(0.E0,0.E0,1.E0)); #6648=AXIS2_PLACEMENT_3D('',#6645,#6646,#6647); #6649=CYLINDRICAL_SURFACE('',#6648,1.E0); #6650=ORIENTED_EDGE('',*,*,#5991,.F.); #6651=ORIENTED_EDGE('',*,*,#6229,.T.); #6652=ORIENTED_EDGE('',*,*,#6637,.T.); #6653=ORIENTED_EDGE('',*,*,#5542,.T.); #6654=EDGE_LOOP('',(#6650,#6651,#6652,#6653)); #6655=FACE_OUTER_BOUND('',#6654,.F.); #6656=ADVANCED_FACE('',(#6655),#6649,.F.); #6657=CARTESIAN_POINT('',(-1.E0,1.161044894892E1,7.E0)); #6658=DIRECTION('',(0.E0,-1.E0,0.E0)); #6659=DIRECTION('',(1.E0,0.E0,0.E0)); #6660=AXIS2_PLACEMENT_3D('',#6657,#6658,#6659); #6661=CYLINDRICAL_SURFACE('',#6660,1.E0); #6663=ORIENTED_EDGE('',*,*,#6662,.F.); #6664=ORIENTED_EDGE('',*,*,#6232,.T.); #6665=ORIENTED_EDGE('',*,*,#5987,.T.); #6666=ORIENTED_EDGE('',*,*,#5508,.T.); #6667=EDGE_LOOP('',(#6663,#6664,#6665,#6666)); #6668=FACE_OUTER_BOUND('',#6667,.F.); #6669=ADVANCED_FACE('',(#6668),#6661,.F.); #6670=CARTESIAN_POINT('',(0.E0,0.E0,0.E0)); #6671=DIRECTION('',(-1.E0,0.E0,0.E0)); #6672=DIRECTION('',(0.E0,0.E0,1.E0)); #6673=AXIS2_PLACEMENT_3D('',#6670,#6671,#6672); #6674=PLANE('',#6673); #6676=ORIENTED_EDGE('',*,*,#6675,.T.); #6677=ORIENTED_EDGE('',*,*,#6302,.T.); #6679=ORIENTED_EDGE('',*,*,#6678,.F.); #6680=ORIENTED_EDGE('',*,*,#5520,.F.); #6681=EDGE_LOOP('',(#6676,#6677,#6679,#6680)); #6682=FACE_OUTER_BOUND('',#6681,.F.); #6683=ADVANCED_FACE('',(#6682),#6674,.T.); #6684=CARTESIAN_POINT('',(0.E0,0.E0,0.E0)); #6685=DIRECTION('',(-1.E0,0.E0,0.E0)); #6686=DIRECTION('',(0.E0,0.E0,1.E0)); #6687=AXIS2_PLACEMENT_3D('',#6684,#6685,#6686); #6688=PLANE('',#6687); #6689=ORIENTED_EDGE('',*,*,#6662,.T.); #6690=ORIENTED_EDGE('',*,*,#5506,.F.); #6692=ORIENTED_EDGE('',*,*,#6691,.T.); #6693=ORIENTED_EDGE('',*,*,#6234,.T.); #6694=EDGE_LOOP('',(#6689,#6690,#6692,#6693)); #6695=FACE_OUTER_BOUND('',#6694,.F.); #6696=ADVANCED_FACE('',(#6695),#6688,.T.); #6697=CARTESIAN_POINT('',(-1.E0,-5.722942641981E-2,1.325E1)); #6698=DIRECTION('',(0.E0,1.E0,0.E0)); #6699=DIRECTION('',(1.E0,0.E0,0.E0)); #6700=AXIS2_PLACEMENT_3D('',#6697,#6698,#6699); #6701=CYLINDRICAL_SURFACE('',#6700,1.E0); #6702=ORIENTED_EDGE('',*,*,#6675,.F.); #6703=ORIENTED_EDGE('',*,*,#5518,.T.); #6705=ORIENTED_EDGE('',*,*,#6704,.T.); #6706=ORIENTED_EDGE('',*,*,#6304,.T.); #6707=EDGE_LOOP('',(#6702,#6703,#6705,#6706)); #6708=FACE_OUTER_BOUND('',#6707,.F.); #6709=ADVANCED_FACE('',(#6708),#6701,.F.); #6710=CARTESIAN_POINT('',(-2.E0,0.E0,1.225E1)); #6711=DIRECTION('',(0.E0,0.E0,1.E0)); #6712=DIRECTION('',(1.E0,0.E0,0.E0)); #6713=AXIS2_PLACEMENT_3D('',#6710,#6711,#6712); #6714=PLANE('',#6713); #6716=ORIENTED_EDGE('',*,*,#6715,.F.); #6717=ORIENTED_EDGE('',*,*,#6442,.T.); #6719=ORIENTED_EDGE('',*,*,#6718,.F.); #6720=ORIENTED_EDGE('',*,*,#5668,.F.); #6721=EDGE_LOOP('',(#6716,#6717,#6719,#6720)); #6722=FACE_OUTER_BOUND('',#6721,.F.); #6723=ADVANCED_FACE('',(#6722),#6714,.T.); #6724=CARTESIAN_POINT('',(-2.E0,0.E0,1.225E1)); #6725=DIRECTION('',(0.E0,0.E0,1.E0)); #6726=DIRECTION('',(1.E0,0.E0,0.E0)); #6727=AXIS2_PLACEMENT_3D('',#6724,#6725,#6726); #6728=PLANE('',#6727); #6729=ORIENTED_EDGE('',*,*,#6704,.F.); #6730=ORIENTED_EDGE('',*,*,#5516,.F.); #6732=ORIENTED_EDGE('',*,*,#6731,.T.); #6733=ORIENTED_EDGE('',*,*,#6306,.T.); #6734=EDGE_LOOP('',(#6729,#6730,#6732,#6733)); #6735=FACE_OUTER_BOUND('',#6734,.F.); #6736=ADVANCED_FACE('',(#6735),#6728,.T.); #6737=CARTESIAN_POINT('',(3.5E0,1.566978255297E0,1.325E1)); #6738=DIRECTION('',(0.E0,-1.E0,0.E0)); #6739=DIRECTION('',(-1.E0,0.E0,0.E0)); #6740=AXIS2_PLACEMENT_3D('',#6737,#6738,#6739); #6741=CYLINDRICAL_SURFACE('',#6740,1.E0); #6743=ORIENTED_EDGE('',*,*,#6742,.F.); #6744=ORIENTED_EDGE('',*,*,#6444,.T.); #6745=ORIENTED_EDGE('',*,*,#6715,.T.); #6746=ORIENTED_EDGE('',*,*,#5666,.T.); #6747=EDGE_LOOP('',(#6743,#6744,#6745,#6746)); #6748=FACE_OUTER_BOUND('',#6747,.F.); #6749=ADVANCED_FACE('',(#6748),#6741,.F.); #6750=CARTESIAN_POINT('',(2.5E0,1.5E0,2.5E0)); #6751=DIRECTION('',(-1.E0,0.E0,0.E0)); #6752=DIRECTION('',(0.E0,0.E0,1.E0)); #6753=AXIS2_PLACEMENT_3D('',#6750,#6751,#6752); #6754=PLANE('',#6753); #6756=ORIENTED_EDGE('',*,*,#6755,.T.); #6757=ORIENTED_EDGE('',*,*,#5650,.T.); #6759=ORIENTED_EDGE('',*,*,#6758,.F.); #6760=ORIENTED_EDGE('',*,*,#6408,.F.); #6761=EDGE_LOOP('',(#6756,#6757,#6759,#6760)); #6762=FACE_OUTER_BOUND('',#6761,.F.); #6763=ADVANCED_FACE('',(#6762),#6754,.F.); #6764=CARTESIAN_POINT('',(2.5E0,1.5E0,2.5E0)); #6765=DIRECTION('',(-1.E0,0.E0,0.E0)); #6766=DIRECTION('',(0.E0,0.E0,1.E0)); #6767=AXIS2_PLACEMENT_3D('',#6764,#6765,#6766); #6768=PLANE('',#6767); #6770=ORIENTED_EDGE('',*,*,#6769,.T.); #6771=ORIENTED_EDGE('',*,*,#6446,.F.); #6772=ORIENTED_EDGE('',*,*,#6742,.T.); #6773=ORIENTED_EDGE('',*,*,#5664,.T.); #6774=EDGE_LOOP('',(#6770,#6771,#6772,#6773)); #6775=FACE_OUTER_BOUND('',#6774,.F.); #6776=ADVANCED_FACE('',(#6775),#6768,.F.); #6777=CARTESIAN_POINT('',(5.5E0,1.568923974228E0,2.19375E1)); #6778=DIRECTION('',(0.E0,-1.E0,0.E0)); #6779=DIRECTION('',(-1.E0,0.E0,0.E0)); #6780=AXIS2_PLACEMENT_3D('',#6777,#6778,#6779); #6781=CYLINDRICAL_SURFACE('',#6780,3.E0); #6782=ORIENTED_EDGE('',*,*,#6755,.F.); #6783=ORIENTED_EDGE('',*,*,#6406,.T.); #6785=ORIENTED_EDGE('',*,*,#6784,.T.); #6786=ORIENTED_EDGE('',*,*,#5652,.T.); #6787=EDGE_LOOP('',(#6782,#6783,#6785,#6786)); #6788=FACE_OUTER_BOUND('',#6787,.F.); #6789=ADVANCED_FACE('',(#6788),#6781,.F.); #6790=CARTESIAN_POINT('',(2.5E0,0.E0,1.89375E1)); #6791=DIRECTION('',(0.E0,0.E0,1.E0)); #6792=DIRECTION('',(1.E0,0.E0,0.E0)); #6793=AXIS2_PLACEMENT_3D('',#6790,#6791,#6792); #6794=PLANE('',#6793); #6795=ORIENTED_EDGE('',*,*,#6784,.F.); #6796=ORIENTED_EDGE('',*,*,#6404,.T.); #6798=ORIENTED_EDGE('',*,*,#6797,.F.); #6799=ORIENTED_EDGE('',*,*,#5638,.F.); #6800=EDGE_LOOP('',(#6795,#6796,#6798,#6799)); #6801=FACE_OUTER_BOUND('',#6800,.F.); #6802=ADVANCED_FACE('',(#6801),#6794,.T.); #6803=CARTESIAN_POINT('',(1.85E1,-5.889194178308E-2,2.19375E1)); #6804=DIRECTION('',(0.E0,1.E0,0.E0)); #6805=DIRECTION('',(1.E0,0.E0,0.E0)); #6806=AXIS2_PLACEMENT_3D('',#6803,#6804,#6805); #6807=CYLINDRICAL_SURFACE('',#6806,3.E0); #6809=ORIENTED_EDGE('',*,*,#6808,.F.); #6810=ORIENTED_EDGE('',*,*,#5640,.T.); #6811=ORIENTED_EDGE('',*,*,#6797,.T.); #6812=ORIENTED_EDGE('',*,*,#6402,.T.); #6813=EDGE_LOOP('',(#6809,#6810,#6811,#6812)); #6814=FACE_OUTER_BOUND('',#6813,.F.); #6815=ADVANCED_FACE('',(#6814),#6807,.F.); #6816=CARTESIAN_POINT('',(2.15E1,1.5E0,2.95E1)); #6817=DIRECTION('',(1.E0,0.E0,0.E0)); #6818=DIRECTION('',(0.E0,0.E0,-1.E0)); #6819=AXIS2_PLACEMENT_3D('',#6816,#6817,#6818); #6820=PLANE('',#6819); #6821=ORIENTED_EDGE('',*,*,#6808,.T.); #6822=ORIENTED_EDGE('',*,*,#6400,.F.); #6824=ORIENTED_EDGE('',*,*,#6823,.T.); #6825=ORIENTED_EDGE('',*,*,#5642,.T.); #6826=EDGE_LOOP('',(#6821,#6822,#6824,#6825)); #6827=FACE_OUTER_BOUND('',#6826,.F.); #6828=ADVANCED_FACE('',(#6827),#6820,.F.); #6829=CARTESIAN_POINT('',(2.15E1,1.5E0,2.95E1)); #6830=DIRECTION('',(1.E0,0.E0,0.E0)); #6831=DIRECTION('',(0.E0,0.E0,-1.E0)); #6832=AXIS2_PLACEMENT_3D('',#6829,#6830,#6831); #6833=PLANE('',#6832); #6835=ORIENTED_EDGE('',*,*,#6834,.T.); #6836=ORIENTED_EDGE('',*,*,#5656,.T.); #6838=ORIENTED_EDGE('',*,*,#6837,.T.); #6839=ORIENTED_EDGE('',*,*,#6422,.F.); #6840=EDGE_LOOP('',(#6835,#6836,#6838,#6839)); #6841=FACE_OUTER_BOUND('',#6840,.F.); #6842=ADVANCED_FACE('',(#6841),#6833,.F.); #6843=CARTESIAN_POINT('',(1.65E1,1.562633489099E0,2.45E1)); #6844=DIRECTION('',(0.E0,-1.E0,0.E0)); #6845=DIRECTION('',(1.E0,0.E0,0.E0)); #6846=AXIS2_PLACEMENT_3D('',#6843,#6844,#6845); #6847=CYLINDRICAL_SURFACE('',#6846,5.E0); #6848=ORIENTED_EDGE('',*,*,#6823,.F.); #6849=ORIENTED_EDGE('',*,*,#6414,.T.); #6851=ORIENTED_EDGE('',*,*,#6850,.T.); #6852=ORIENTED_EDGE('',*,*,#5644,.T.); #6853=EDGE_LOOP('',(#6848,#6849,#6851,#6852)); #6854=FACE_OUTER_BOUND('',#6853,.F.); #6855=ADVANCED_FACE('',(#6854),#6847,.F.); #6856=CARTESIAN_POINT('',(2.5E0,1.5E0,2.95E1)); #6857=DIRECTION('',(0.E0,0.E0,1.E0)); #6858=DIRECTION('',(1.E0,0.E0,0.E0)); #6859=AXIS2_PLACEMENT_3D('',#6856,#6857,#6858); #6860=PLANE('',#6859); #6862=ORIENTED_EDGE('',*,*,#6861,.T.); #6863=ORIENTED_EDGE('',*,*,#5646,.T.); #6864=ORIENTED_EDGE('',*,*,#6850,.F.); #6865=ORIENTED_EDGE('',*,*,#6412,.F.); #6866=EDGE_LOOP('',(#6862,#6863,#6864,#6865)); #6867=FACE_OUTER_BOUND('',#6866,.F.); #6868=ADVANCED_FACE('',(#6867),#6860,.F.); #6869=CARTESIAN_POINT('',(7.5E0,1.562633489099E0,2.45E1)); #6870=DIRECTION('',(0.E0,-1.E0,0.E0)); #6871=DIRECTION('',(0.E0,0.E0,1.E0)); #6872=AXIS2_PLACEMENT_3D('',#6869,#6870,#6871); #6873=CYLINDRICAL_SURFACE('',#6872,5.E0); #6874=ORIENTED_EDGE('',*,*,#6861,.F.); #6875=ORIENTED_EDGE('',*,*,#6410,.T.); #6876=ORIENTED_EDGE('',*,*,#6758,.T.); #6877=ORIENTED_EDGE('',*,*,#5648,.T.); #6878=EDGE_LOOP('',(#6874,#6875,#6876,#6877)); #6879=FACE_OUTER_BOUND('',#6878,.F.); #6880=ADVANCED_FACE('',(#6879),#6873,.F.); #6881=CARTESIAN_POINT('',(1.85E1,1.568923974228E0,1.40625E1)); #6882=DIRECTION('',(0.E0,-1.E0,0.E0)); #6883=DIRECTION('',(1.E0,0.E0,0.E0)); #6884=AXIS2_PLACEMENT_3D('',#6881,#6882,#6883); #6885=CYLINDRICAL_SURFACE('',#6884,3.E0); #6886=ORIENTED_EDGE('',*,*,#6834,.F.); #6887=ORIENTED_EDGE('',*,*,#6420,.T.); #6889=ORIENTED_EDGE('',*,*,#6888,.T.); #6890=ORIENTED_EDGE('',*,*,#5658,.T.); #6891=EDGE_LOOP('',(#6886,#6887,#6889,#6890)); #6892=FACE_OUTER_BOUND('',#6891,.F.); #6893=ADVANCED_FACE('',(#6892),#6885,.F.); #6894=CARTESIAN_POINT('',(2.15E1,0.E0,1.70625E1)); #6895=DIRECTION('',(0.E0,0.E0,-1.E0)); #6896=DIRECTION('',(-1.E0,0.E0,0.E0)); #6897=AXIS2_PLACEMENT_3D('',#6894,#6895,#6896); #6898=PLANE('',#6897); #6899=ORIENTED_EDGE('',*,*,#6888,.F.); #6900=ORIENTED_EDGE('',*,*,#6418,.T.); #6902=ORIENTED_EDGE('',*,*,#6901,.F.); #6903=ORIENTED_EDGE('',*,*,#5660,.F.); #6904=EDGE_LOOP('',(#6899,#6900,#6902,#6903)); #6905=FACE_OUTER_BOUND('',#6904,.F.); #6906=ADVANCED_FACE('',(#6905),#6898,.T.); #6907=CARTESIAN_POINT('',(5.5E0,-5.889194178308E-2,1.40625E1)); #6908=DIRECTION('',(0.E0,1.E0,0.E0)); #6909=DIRECTION('',(-1.E0,0.E0,0.E0)); #6910=AXIS2_PLACEMENT_3D('',#6907,#6908,#6909); #6911=CYLINDRICAL_SURFACE('',#6910,3.E0); #6912=ORIENTED_EDGE('',*,*,#6769,.F.); #6913=ORIENTED_EDGE('',*,*,#5662,.T.); #6914=ORIENTED_EDGE('',*,*,#6901,.T.); #6915=ORIENTED_EDGE('',*,*,#6448,.T.); #6916=EDGE_LOOP('',(#6912,#6913,#6914,#6915)); #6917=FACE_OUTER_BOUND('',#6916,.F.); #6918=ADVANCED_FACE('',(#6917),#6911,.F.); #6919=CARTESIAN_POINT('',(2.05E1,-5.889194178308E-2,1.325E1)); #6920=DIRECTION('',(0.E0,1.E0,0.E0)); #6921=DIRECTION('',(1.E0,0.E0,0.E0)); #6922=AXIS2_PLACEMENT_3D('',#6919,#6920,#6921); #6923=CYLINDRICAL_SURFACE('',#6922,1.E0); #6924=ORIENTED_EDGE('',*,*,#6837,.F.); #6925=ORIENTED_EDGE('',*,*,#5686,.T.); #6927=ORIENTED_EDGE('',*,*,#6926,.T.); #6928=ORIENTED_EDGE('',*,*,#6424,.T.); #6929=EDGE_LOOP('',(#6924,#6925,#6927,#6928)); #6930=FACE_OUTER_BOUND('',#6929,.F.); #6931=ADVANCED_FACE('',(#6930),#6923,.F.); #6932=CARTESIAN_POINT('',(2.6E1,0.E0,1.225E1)); #6933=DIRECTION('',(0.E0,0.E0,-1.E0)); #6934=DIRECTION('',(-1.E0,0.E0,0.E0)); #6935=AXIS2_PLACEMENT_3D('',#6932,#6933,#6934); #6936=PLANE('',#6935); #6938=ORIENTED_EDGE('',*,*,#6937,.F.); #6939=ORIENTED_EDGE('',*,*,#6290,.F.); #6941=ORIENTED_EDGE('',*,*,#6940,.T.); #6942=ORIENTED_EDGE('',*,*,#5532,.T.); #6943=EDGE_LOOP('',(#6938,#6939,#6941,#6942)); #6944=FACE_OUTER_BOUND('',#6943,.F.); #6945=ADVANCED_FACE('',(#6944),#6936,.F.); #6946=CARTESIAN_POINT('',(2.6E1,0.E0,1.225E1)); #6947=DIRECTION('',(0.E0,0.E0,-1.E0)); #6948=DIRECTION('',(-1.E0,0.E0,0.E0)); #6949=AXIS2_PLACEMENT_3D('',#6946,#6947,#6948); #6950=PLANE('',#6949); #6951=ORIENTED_EDGE('',*,*,#6926,.F.); #6952=ORIENTED_EDGE('',*,*,#5684,.T.); #6954=ORIENTED_EDGE('',*,*,#6953,.F.); #6955=ORIENTED_EDGE('',*,*,#6426,.F.); #6956=EDGE_LOOP('',(#6951,#6952,#6954,#6955)); #6957=FACE_OUTER_BOUND('',#6956,.F.); #6958=ADVANCED_FACE('',(#6957),#6950,.F.); #6959=CARTESIAN_POINT('',(2.5E1,1.568923974228E0,1.325E1)); #6960=DIRECTION('',(0.E0,-1.E0,0.E0)); #6961=DIRECTION('',(-1.E0,0.E0,0.E0)); #6962=AXIS2_PLACEMENT_3D('',#6959,#6960,#6961); #6963=CYLINDRICAL_SURFACE('',#6962,1.E0); #6965=ORIENTED_EDGE('',*,*,#6964,.F.); #6966=ORIENTED_EDGE('',*,*,#6292,.T.); #6967=ORIENTED_EDGE('',*,*,#6937,.T.); #6968=ORIENTED_EDGE('',*,*,#5530,.T.); #6969=EDGE_LOOP('',(#6965,#6966,#6967,#6968)); #6970=FACE_OUTER_BOUND('',#6969,.F.); #6971=ADVANCED_FACE('',(#6970),#6963,.F.); #6972=CARTESIAN_POINT('',(2.4E1,0.E0,3.2E1)); #6973=DIRECTION('',(1.E0,0.E0,0.E0)); #6974=DIRECTION('',(0.E0,0.E0,-1.E0)); #6975=AXIS2_PLACEMENT_3D('',#6972,#6973,#6974); #6976=PLANE('',#6975); #6977=ORIENTED_EDGE('',*,*,#6964,.T.); #6978=ORIENTED_EDGE('',*,*,#5528,.F.); #6980=ORIENTED_EDGE('',*,*,#6979,.T.); #6981=ORIENTED_EDGE('',*,*,#6294,.T.); #6982=EDGE_LOOP('',(#6977,#6978,#6980,#6981)); #6983=FACE_OUTER_BOUND('',#6982,.F.); #6984=ADVANCED_FACE('',(#6983),#6976,.T.); #6985=CARTESIAN_POINT('',(2.4E1,0.E0,3.2E1)); #6986=DIRECTION('',(1.E0,0.E0,0.E0)); #6987=DIRECTION('',(0.E0,0.E0,-1.E0)); #6988=AXIS2_PLACEMENT_3D('',#6985,#6986,#6987); #6989=PLANE('',#6988); #6991=ORIENTED_EDGE('',*,*,#6990,.T.); #6992=ORIENTED_EDGE('',*,*,#6242,.T.); #6994=ORIENTED_EDGE('',*,*,#6993,.F.); #6995=ORIENTED_EDGE('',*,*,#5498,.F.); #6996=EDGE_LOOP('',(#6991,#6992,#6994,#6995)); #6997=FACE_OUTER_BOUND('',#6996,.F.); #6998=ADVANCED_FACE('',(#6997),#6989,.T.); #6999=CARTESIAN_POINT('',(2.4E1,0.E0,2.8E1)); #7000=DIRECTION('',(7.071067811865E-1,0.E0,7.071067811865E-1)); #7001=DIRECTION('',(0.E0,1.E0,0.E0)); #7002=AXIS2_PLACEMENT_3D('',#6999,#7000,#7001); #7003=PLANE('',#7002); #7004=ORIENTED_EDGE('',*,*,#6979,.F.); #7005=ORIENTED_EDGE('',*,*,#5526,.T.); #7007=ORIENTED_EDGE('',*,*,#7006,.T.); #7008=ORIENTED_EDGE('',*,*,#6296,.F.); #7009=EDGE_LOOP('',(#7004,#7005,#7007,#7008)); #7010=FACE_OUTER_BOUND('',#7009,.F.); #7011=ADVANCED_FACE('',(#7010),#7003,.T.); #7012=CARTESIAN_POINT('',(0.E0,0.E0,3.2E1)); #7013=DIRECTION('',(0.E0,0.E0,1.E0)); #7014=DIRECTION('',(1.E0,0.E0,0.E0)); #7015=AXIS2_PLACEMENT_3D('',#7012,#7013,#7014); #7016=PLANE('',#7015); #7017=ORIENTED_EDGE('',*,*,#5524,.F.); #7019=ORIENTED_EDGE('',*,*,#7018,.T.); #7020=ORIENTED_EDGE('',*,*,#6298,.T.); #7021=ORIENTED_EDGE('',*,*,#7006,.F.); #7022=EDGE_LOOP('',(#7017,#7019,#7020,#7021)); #7023=FACE_OUTER_BOUND('',#7022,.F.); #7024=ADVANCED_FACE('',(#7023),#7016,.T.); #7025=CARTESIAN_POINT('',(4.E0,0.E0,3.2E1)); #7026=DIRECTION('',(-7.071067811865E-1,0.E0,7.071067811865E-1)); #7027=DIRECTION('',(0.E0,1.E0,0.E0)); #7028=AXIS2_PLACEMENT_3D('',#7025,#7026,#7027); #7029=PLANE('',#7028); #7030=ORIENTED_EDGE('',*,*,#7018,.F.); #7031=ORIENTED_EDGE('',*,*,#5522,.T.); #7032=ORIENTED_EDGE('',*,*,#6678,.T.); #7033=ORIENTED_EDGE('',*,*,#6300,.F.); #7034=EDGE_LOOP('',(#7030,#7031,#7032,#7033)); #7035=FACE_OUTER_BOUND('',#7034,.F.); #7036=ADVANCED_FACE('',(#7035),#7029,.T.); #7037=CARTESIAN_POINT('',(2.5E1,-7.055249658685E-2,7.E0)); #7038=DIRECTION('',(0.E0,1.E0,0.E0)); #7039=DIRECTION('',(-1.E0,0.E0,0.E0)); #7040=AXIS2_PLACEMENT_3D('',#7037,#7038,#7039); #7041=CYLINDRICAL_SURFACE('',#7040,1.E0); #7042=ORIENTED_EDGE('',*,*,#6990,.F.); #7043=ORIENTED_EDGE('',*,*,#5496,.T.); #7044=ORIENTED_EDGE('',*,*,#5965,.T.); #7045=ORIENTED_EDGE('',*,*,#6244,.T.); #7046=EDGE_LOOP('',(#7042,#7043,#7044,#7045)); #7047=FACE_OUTER_BOUND('',#7046,.F.); #7048=ADVANCED_FACE('',(#7047),#7041,.F.); #7049=CARTESIAN_POINT('',(2.E1,0.E0,0.E0)); #7050=DIRECTION('',(7.071067811865E-1,0.E0,-7.071067811865E-1)); #7051=DIRECTION('',(0.E0,1.E0,0.E0)); #7052=AXIS2_PLACEMENT_3D('',#7049,#7050,#7051); #7053=PLANE('',#7052); #7055=ORIENTED_EDGE('',*,*,#7054,.F.); #7056=ORIENTED_EDGE('',*,*,#5500,.T.); #7057=ORIENTED_EDGE('',*,*,#6993,.T.); #7058=ORIENTED_EDGE('',*,*,#6240,.F.); #7059=EDGE_LOOP('',(#7055,#7056,#7057,#7058)); #7060=FACE_OUTER_BOUND('',#7059,.F.); #7061=ADVANCED_FACE('',(#7060),#7053,.T.); #7062=CARTESIAN_POINT('',(2.4E1,0.E0,0.E0)); #7063=DIRECTION('',(0.E0,0.E0,-1.E0)); #7064=DIRECTION('',(-1.E0,0.E0,0.E0)); #7065=AXIS2_PLACEMENT_3D('',#7062,#7063,#7064); #7066=PLANE('',#7065); #7067=ORIENTED_EDGE('',*,*,#5502,.F.); #7068=ORIENTED_EDGE('',*,*,#7054,.T.); #7069=ORIENTED_EDGE('',*,*,#6238,.T.); #7071=ORIENTED_EDGE('',*,*,#7070,.F.); #7072=EDGE_LOOP('',(#7067,#7068,#7069,#7071)); #7073=FACE_OUTER_BOUND('',#7072,.F.); #7074=ADVANCED_FACE('',(#7073),#7066,.T.); #7075=CARTESIAN_POINT('',(0.E0,0.E0,4.E0)); #7076=DIRECTION('',(-7.071067811865E-1,0.E0,-7.071067811865E-1)); #7077=DIRECTION('',(0.E0,1.E0,0.E0)); #7078=AXIS2_PLACEMENT_3D('',#7075,#7076,#7077); #7079=PLANE('',#7078); #7080=ORIENTED_EDGE('',*,*,#6691,.F.); #7081=ORIENTED_EDGE('',*,*,#5504,.T.); #7082=ORIENTED_EDGE('',*,*,#7070,.T.); #7083=ORIENTED_EDGE('',*,*,#6236,.F.); #7084=EDGE_LOOP('',(#7080,#7081,#7082,#7083)); #7085=FACE_OUTER_BOUND('',#7084,.F.); #7086=ADVANCED_FACE('',(#7085),#7079,.T.); #7087=CARTESIAN_POINT('',(2.55E1,1.5E0,1.225E1)); #7088=DIRECTION('',(7.071067811865E-1,0.E0,7.071067811865E-1)); #7089=DIRECTION('',(0.E0,-1.E0,0.E0)); #7090=AXIS2_PLACEMENT_3D('',#7087,#7088,#7089); #7091=PLANE('',#7090); #7092=ORIENTED_EDGE('',*,*,#6940,.F.); #7093=ORIENTED_EDGE('',*,*,#6288,.T.); #7095=ORIENTED_EDGE('',*,*,#7094,.T.); #7096=ORIENTED_EDGE('',*,*,#5534,.F.); #7097=EDGE_LOOP('',(#7092,#7093,#7095,#7096)); #7098=FACE_OUTER_BOUND('',#7097,.F.); #7099=ADVANCED_FACE('',(#7098),#7091,.T.); #7100=CARTESIAN_POINT('',(2.6E1,2.5E0,8.E0)); #7101=DIRECTION('',(-1.E0,0.E0,0.E0)); #7102=DIRECTION('',(0.E0,-1.E0,0.E0)); #7103=AXIS2_PLACEMENT_3D('',#7100,#7101,#7102); #7104=PLANE('',#7103); #7105=ORIENTED_EDGE('',*,*,#5968,.T.); #7106=ORIENTED_EDGE('',*,*,#5536,.T.); #7107=ORIENTED_EDGE('',*,*,#7094,.F.); #7108=ORIENTED_EDGE('',*,*,#6286,.F.); #7109=ORIENTED_EDGE('',*,*,#6165,.F.); #7111=ORIENTED_EDGE('',*,*,#7110,.F.); #7112=EDGE_LOOP('',(#7105,#7106,#7107,#7108,#7109,#7111)); #7113=FACE_OUTER_BOUND('',#7112,.F.); #7114=ADVANCED_FACE('',(#7113),#7104,.F.); #7115=CARTESIAN_POINT('',(2.1E1,1.15E1,8.E0)); #7116=DIRECTION('',(-8.741572761215E-1,-4.856429311786E-1,0.E0)); #7117=DIRECTION('',(4.856429311786E-1,-8.741572761215E-1,0.E0)); #7118=AXIS2_PLACEMENT_3D('',#7115,#7116,#7117); #7119=PLANE('',#7118); #7120=ORIENTED_EDGE('',*,*,#5970,.T.); #7121=ORIENTED_EDGE('',*,*,#7110,.T.); #7122=ORIENTED_EDGE('',*,*,#6163,.F.); #7124=ORIENTED_EDGE('',*,*,#7123,.F.); #7125=EDGE_LOOP('',(#7120,#7121,#7122,#7124)); #7126=FACE_OUTER_BOUND('',#7125,.F.); #7127=ADVANCED_FACE('',(#7126),#7119,.F.); #7128=CARTESIAN_POINT('',(1.9E1,1.15E1,8.E0)); #7129=DIRECTION('',(0.E0,-1.E0,0.E0)); #7130=DIRECTION('',(1.E0,0.E0,0.E0)); #7131=AXIS2_PLACEMENT_3D('',#7128,#7129,#7130); #7132=PLANE('',#7131); #7133=ORIENTED_EDGE('',*,*,#5972,.F.); #7134=ORIENTED_EDGE('',*,*,#7123,.T.); #7135=ORIENTED_EDGE('',*,*,#6161,.F.); #7137=ORIENTED_EDGE('',*,*,#7136,.F.); #7138=EDGE_LOOP('',(#7133,#7134,#7135,#7137)); #7139=FACE_OUTER_BOUND('',#7138,.F.); #7141=ORIENTED_EDGE('',*,*,#7140,.T.); #7143=ORIENTED_EDGE('',*,*,#7142,.T.); #7144=EDGE_LOOP('',(#7141,#7143)); #7145=FACE_BOUND('',#7144,.F.); #7147=ORIENTED_EDGE('',*,*,#7146,.T.); #7149=ORIENTED_EDGE('',*,*,#7148,.T.); #7150=EDGE_LOOP('',(#7147,#7149)); #7151=FACE_BOUND('',#7150,.F.); #7152=ADVANCED_FACE('',(#7139,#7145,#7151),#7132,.F.); #7153=CARTESIAN_POINT('',(1.9E1,1.5E0,8.E0)); #7154=DIRECTION('',(1.E0,0.E0,0.E0)); #7155=DIRECTION('',(0.E0,1.E0,0.E0)); #7156=AXIS2_PLACEMENT_3D('',#7153,#7154,#7155); #7157=PLANE('',#7156); #7159=ORIENTED_EDGE('',*,*,#7158,.T.); #7160=ORIENTED_EDGE('',*,*,#6430,.F.); #7162=ORIENTED_EDGE('',*,*,#7161,.T.); #7163=ORIENTED_EDGE('',*,*,#5680,.T.); #7164=EDGE_LOOP('',(#7159,#7160,#7162,#7163)); #7165=FACE_OUTER_BOUND('',#7164,.F.); #7166=ADVANCED_FACE('',(#7165),#7157,.F.); #7167=CARTESIAN_POINT('',(1.9E1,1.5E0,8.E0)); #7168=DIRECTION('',(1.E0,0.E0,0.E0)); #7169=DIRECTION('',(0.E0,1.E0,0.E0)); #7170=AXIS2_PLACEMENT_3D('',#7167,#7168,#7169); #7171=PLANE('',#7170); #7172=ORIENTED_EDGE('',*,*,#6325,.F.); #7173=ORIENTED_EDGE('',*,*,#5974,.T.); #7174=ORIENTED_EDGE('',*,*,#7136,.T.); #7175=ORIENTED_EDGE('',*,*,#6159,.F.); #7176=EDGE_LOOP('',(#7172,#7173,#7174,#7175)); #7177=FACE_OUTER_BOUND('',#7176,.F.); #7178=ADVANCED_FACE('',(#7177),#7171,.F.); #7179=CARTESIAN_POINT('',(1.8E1,-7.099592191979E-2,1.1E1)); #7180=DIRECTION('',(0.E0,1.E0,0.E0)); #7181=DIRECTION('',(1.E0,0.E0,0.E0)); #7182=AXIS2_PLACEMENT_3D('',#7179,#7180,#7181); #7183=CYLINDRICAL_SURFACE('',#7182,1.E0); #7184=ORIENTED_EDGE('',*,*,#7158,.F.); #7185=ORIENTED_EDGE('',*,*,#5678,.T.); #7187=ORIENTED_EDGE('',*,*,#7186,.T.); #7188=ORIENTED_EDGE('',*,*,#6432,.T.); #7189=EDGE_LOOP('',(#7184,#7185,#7187,#7188)); #7190=FACE_OUTER_BOUND('',#7189,.F.); #7191=ADVANCED_FACE('',(#7190),#7183,.F.); #7192=CARTESIAN_POINT('',(5.E0,1.5E0,1.E1)); #7193=DIRECTION('',(0.E0,0.E0,1.E0)); #7194=DIRECTION('',(0.E0,-1.E0,0.E0)); #7195=AXIS2_PLACEMENT_3D('',#7192,#7193,#7194); #7196=PLANE('',#7195); #7198=ORIENTED_EDGE('',*,*,#7197,.F.); #7199=ORIENTED_EDGE('',*,*,#6434,.T.); #7200=ORIENTED_EDGE('',*,*,#7186,.F.); #7201=ORIENTED_EDGE('',*,*,#5676,.F.); #7202=EDGE_LOOP('',(#7198,#7199,#7200,#7201)); #7203=FACE_OUTER_BOUND('',#7202,.F.); #7204=ADVANCED_FACE('',(#7203),#7196,.T.); #7205=CARTESIAN_POINT('',(6.E0,1.567729432957E0,1.1E1)); #7206=DIRECTION('',(0.E0,-1.E0,0.E0)); #7207=DIRECTION('',(-1.E0,0.E0,0.E0)); #7208=AXIS2_PLACEMENT_3D('',#7205,#7206,#7207); #7209=CYLINDRICAL_SURFACE('',#7208,1.E0); #7211=ORIENTED_EDGE('',*,*,#7210,.F.); #7212=ORIENTED_EDGE('',*,*,#6436,.T.); #7213=ORIENTED_EDGE('',*,*,#7197,.T.); #7214=ORIENTED_EDGE('',*,*,#5674,.T.); #7215=EDGE_LOOP('',(#7211,#7212,#7213,#7214)); #7216=FACE_OUTER_BOUND('',#7215,.F.); #7217=ADVANCED_FACE('',(#7216),#7209,.F.); #7218=CARTESIAN_POINT('',(5.E0,1.5E0,8.E0)); #7219=DIRECTION('',(1.E0,0.E0,0.E0)); #7220=DIRECTION('',(0.E0,1.E0,0.E0)); #7221=AXIS2_PLACEMENT_3D('',#7218,#7219,#7220); #7222=PLANE('',#7221); #7223=ORIENTED_EDGE('',*,*,#7210,.T.); #7224=ORIENTED_EDGE('',*,*,#5672,.F.); #7226=ORIENTED_EDGE('',*,*,#7225,.T.); #7227=ORIENTED_EDGE('',*,*,#6438,.T.); #7228=EDGE_LOOP('',(#7223,#7224,#7226,#7227)); #7229=FACE_OUTER_BOUND('',#7228,.F.); #7230=ADVANCED_FACE('',(#7229),#7222,.T.); #7231=CARTESIAN_POINT('',(5.E0,1.5E0,8.E0)); #7232=DIRECTION('',(1.E0,0.E0,0.E0)); #7233=DIRECTION('',(0.E0,1.E0,0.E0)); #7234=AXIS2_PLACEMENT_3D('',#7231,#7232,#7233); #7235=PLANE('',#7234); #7236=ORIENTED_EDGE('',*,*,#6322,.T.); #7238=ORIENTED_EDGE('',*,*,#7237,.T.); #7240=ORIENTED_EDGE('',*,*,#7239,.F.); #7241=ORIENTED_EDGE('',*,*,#5978,.T.); #7242=EDGE_LOOP('',(#7236,#7238,#7240,#7241)); #7243=FACE_OUTER_BOUND('',#7242,.F.); #7244=ADVANCED_FACE('',(#7243),#7235,.T.); #7245=CARTESIAN_POINT('',(5.E0,0.E0,1.175E1)); #7246=DIRECTION('',(7.071067811865E-1,0.E0,7.071067811865E-1)); #7247=DIRECTION('',(0.E0,1.E0,0.E0)); #7248=AXIS2_PLACEMENT_3D('',#7245,#7246,#7247); #7249=PLANE('',#7248); #7250=ORIENTED_EDGE('',*,*,#7225,.F.); #7251=ORIENTED_EDGE('',*,*,#5670,.T.); #7252=ORIENTED_EDGE('',*,*,#6718,.T.); #7253=ORIENTED_EDGE('',*,*,#6440,.F.); #7254=EDGE_LOOP('',(#7250,#7251,#7252,#7253)); #7255=FACE_OUTER_BOUND('',#7254,.F.); #7256=ADVANCED_FACE('',(#7255),#7249,.T.); #7257=CARTESIAN_POINT('',(0.E0,0.E0,1.E1)); #7258=DIRECTION('',(0.E0,0.E0,1.E0)); #7259=DIRECTION('',(1.E0,0.E0,0.E0)); #7260=AXIS2_PLACEMENT_3D('',#7257,#7258,#7259); #7261=PLANE('',#7260); #7263=ORIENTED_EDGE('',*,*,#7262,.F.); #7264=ORIENTED_EDGE('',*,*,#6312,.F.); #7266=ORIENTED_EDGE('',*,*,#7265,.F.); #7268=ORIENTED_EDGE('',*,*,#7267,.F.); #7270=ORIENTED_EDGE('',*,*,#7269,.F.); #7271=ORIENTED_EDGE('',*,*,#7237,.F.); #7272=ORIENTED_EDGE('',*,*,#6320,.F.); #7274=ORIENTED_EDGE('',*,*,#7273,.T.); #7276=ORIENTED_EDGE('',*,*,#7275,.F.); #7277=EDGE_LOOP('',(#7263,#7264,#7266,#7268,#7270,#7271,#7272,#7274,#7276)); #7278=FACE_OUTER_BOUND('',#7277,.F.); #7280=ORIENTED_EDGE('',*,*,#7279,.T.); #7282=ORIENTED_EDGE('',*,*,#7281,.T.); #7283=EDGE_LOOP('',(#7280,#7282)); #7284=FACE_BOUND('',#7283,.F.); #7286=ORIENTED_EDGE('',*,*,#7285,.F.); #7288=ORIENTED_EDGE('',*,*,#7287,.T.); #7290=ORIENTED_EDGE('',*,*,#7289,.F.); #7292=ORIENTED_EDGE('',*,*,#7291,.T.); #7294=ORIENTED_EDGE('',*,*,#7293,.F.); #7296=ORIENTED_EDGE('',*,*,#7295,.T.); #7298=ORIENTED_EDGE('',*,*,#7297,.F.); #7300=ORIENTED_EDGE('',*,*,#7299,.T.); #7302=ORIENTED_EDGE('',*,*,#7301,.F.); #7304=ORIENTED_EDGE('',*,*,#7303,.T.); #7306=ORIENTED_EDGE('',*,*,#7305,.F.); #7308=ORIENTED_EDGE('',*,*,#7307,.T.); #7309=EDGE_LOOP('',(#7286,#7288,#7290,#7292,#7294,#7296,#7298,#7300,#7302,#7304, #7306,#7308)); #7310=FACE_BOUND('',#7309,.F.); #7311=ADVANCED_FACE('',(#7278,#7284,#7310),#7261,.T.); #7312=CARTESIAN_POINT('',(4.25E0,1.05E1,8.E0)); #7313=DIRECTION('',(0.E0,0.E0,1.E0)); #7314=DIRECTION('',(1.E0,0.E0,0.E0)); #7315=AXIS2_PLACEMENT_3D('',#7312,#7313,#7314); #7316=CYLINDRICAL_SURFACE('',#7315,1.625E-1); #7317=ORIENTED_EDGE('',*,*,#6031,.T.); #7319=ORIENTED_EDGE('',*,*,#7318,.T.); #7320=ORIENTED_EDGE('',*,*,#7279,.F.); #7322=ORIENTED_EDGE('',*,*,#7321,.F.); #7323=EDGE_LOOP('',(#7317,#7319,#7320,#7322)); #7324=FACE_OUTER_BOUND('',#7323,.F.); #7325=ADVANCED_FACE('',(#7324),#7316,.F.); #7326=CARTESIAN_POINT('',(4.25E0,1.05E1,8.E0)); #7327=DIRECTION('',(0.E0,0.E0,1.E0)); #7328=DIRECTION('',(1.E0,0.E0,0.E0)); #7329=AXIS2_PLACEMENT_3D('',#7326,#7327,#7328); #7330=CYLINDRICAL_SURFACE('',#7329,1.625E-1); #7331=ORIENTED_EDGE('',*,*,#6033,.T.); #7332=ORIENTED_EDGE('',*,*,#7321,.T.); #7333=ORIENTED_EDGE('',*,*,#7281,.F.); #7334=ORIENTED_EDGE('',*,*,#7318,.F.); #7335=EDGE_LOOP('',(#7331,#7332,#7333,#7334)); #7336=FACE_OUTER_BOUND('',#7335,.F.); #7337=ADVANCED_FACE('',(#7336),#7330,.F.); #7338=CARTESIAN_POINT('',(2.5E-1,1.5E0,1.2E1)); #7339=DIRECTION('',(1.E0,0.E0,0.E0)); #7340=DIRECTION('',(0.E0,-1.E0,0.E0)); #7341=AXIS2_PLACEMENT_3D('',#7338,#7339,#7340); #7342=PLANE('',#7341); #7343=ORIENTED_EDGE('',*,*,#6314,.T.); #7344=ORIENTED_EDGE('',*,*,#7262,.T.); #7346=ORIENTED_EDGE('',*,*,#7345,.T.); #7347=EDGE_LOOP('',(#7343,#7344,#7346)); #7348=FACE_OUTER_BOUND('',#7347,.F.); #7349=ADVANCED_FACE('',(#7348),#7342,.F.); #7350=CARTESIAN_POINT('',(2.5E-1,6.5E0,1.E1)); #7351=DIRECTION('',(0.E0,5.E-1,8.660254037844E-1)); #7352=DIRECTION('',(0.E0,-8.660254037844E-1,5.E-1)); #7353=AXIS2_PLACEMENT_3D('',#7350,#7351,#7352); #7354=PLANE('',#7353); #7355=ORIENTED_EDGE('',*,*,#6316,.F.); #7356=ORIENTED_EDGE('',*,*,#7345,.F.); #7357=ORIENTED_EDGE('',*,*,#7275,.T.); #7359=ORIENTED_EDGE('',*,*,#7358,.T.); #7360=EDGE_LOOP('',(#7355,#7356,#7357,#7359)); #7361=FACE_OUTER_BOUND('',#7360,.F.); #7363=ORIENTED_EDGE('',*,*,#7362,.T.); #7365=ORIENTED_EDGE('',*,*,#7364,.T.); #7366=EDGE_LOOP('',(#7363,#7365)); #7367=FACE_BOUND('',#7366,.F.); #7368=ADVANCED_FACE('',(#7361,#7367),#7354,.T.); #7369=CARTESIAN_POINT('',(2.E0,1.5E0,1.2E1)); #7370=DIRECTION('',(1.E0,0.E0,0.E0)); #7371=DIRECTION('',(0.E0,-1.E0,0.E0)); #7372=AXIS2_PLACEMENT_3D('',#7369,#7370,#7371); #7373=PLANE('',#7372); #7374=ORIENTED_EDGE('',*,*,#6318,.F.); #7375=ORIENTED_EDGE('',*,*,#7358,.F.); #7376=ORIENTED_EDGE('',*,*,#7273,.F.); #7377=EDGE_LOOP('',(#7374,#7375,#7376)); #7378=FACE_OUTER_BOUND('',#7377,.F.); #7379=ADVANCED_FACE('',(#7378),#7373,.T.); #7380=CARTESIAN_POINT('',(1.125E0,1.5E0,1.2E1)); #7381=DIRECTION('',(0.E0,-1.E0,0.E0)); #7382=DIRECTION('',(1.E0,0.E0,0.E0)); #7383=AXIS2_PLACEMENT_3D('',#7380,#7381,#7382); #7384=CYLINDRICAL_SURFACE('',#7383,2.575E-1); #7386=ORIENTED_EDGE('',*,*,#7385,.F.); #7387=ORIENTED_EDGE('',*,*,#7362,.F.); #7389=ORIENTED_EDGE('',*,*,#7388,.F.); #7391=ORIENTED_EDGE('',*,*,#7390,.F.); #7392=EDGE_LOOP('',(#7386,#7387,#7389,#7391)); #7393=FACE_OUTER_BOUND('',#7392,.F.); #7394=ADVANCED_FACE('',(#7393),#7384,.F.); #7395=CARTESIAN_POINT('',(1.125E0,1.5E0,1.2E1)); #7396=DIRECTION('',(0.E0,-1.E0,0.E0)); #7397=DIRECTION('',(1.E0,0.E0,0.E0)); #7398=AXIS2_PLACEMENT_3D('',#7395,#7396,#7397); #7399=CYLINDRICAL_SURFACE('',#7398,2.575E-1); #7400=ORIENTED_EDGE('',*,*,#7388,.T.); #7401=ORIENTED_EDGE('',*,*,#7364,.F.); #7402=ORIENTED_EDGE('',*,*,#7385,.T.); #7404=ORIENTED_EDGE('',*,*,#7403,.F.); #7405=EDGE_LOOP('',(#7400,#7401,#7402,#7404)); #7406=FACE_OUTER_BOUND('',#7405,.F.); #7407=ADVANCED_FACE('',(#7406),#7399,.F.); #7408=CARTESIAN_POINT('',(1.125E0,1.E0,1.2E1)); #7409=DIRECTION('',(0.E0,-1.E0,0.E0)); #7410=DIRECTION('',(1.E0,0.E0,0.E0)); #7411=AXIS2_PLACEMENT_3D('',#7408,#7409,#7410); #7412=PLANE('',#7411); #7413=ORIENTED_EDGE('',*,*,#7390,.T.); #7414=ORIENTED_EDGE('',*,*,#7403,.T.); #7415=EDGE_LOOP('',(#7413,#7414)); #7416=FACE_OUTER_BOUND('',#7415,.F.); #7418=ORIENTED_EDGE('',*,*,#7417,.F.); #7420=ORIENTED_EDGE('',*,*,#7419,.F.); #7421=EDGE_LOOP('',(#7418,#7420)); #7422=FACE_BOUND('',#7421,.F.); #7423=ADVANCED_FACE('',(#7416,#7422),#7412,.F.); #7424=CARTESIAN_POINT('',(1.125E0,1.5E0,1.2E1)); #7425=DIRECTION('',(0.E0,-1.E0,0.E0)); #7426=DIRECTION('',(1.E0,0.E0,0.E0)); #7427=AXIS2_PLACEMENT_3D('',#7424,#7425,#7426); #7428=CYLINDRICAL_SURFACE('',#7427,1.925E-1); #7429=ORIENTED_EDGE('',*,*,#7417,.T.); #7431=ORIENTED_EDGE('',*,*,#7430,.T.); #7432=ORIENTED_EDGE('',*,*,#5620,.F.); #7434=ORIENTED_EDGE('',*,*,#7433,.F.); #7435=EDGE_LOOP('',(#7429,#7431,#7432,#7434)); #7436=FACE_OUTER_BOUND('',#7435,.F.); #7437=ADVANCED_FACE('',(#7436),#7428,.F.); #7438=CARTESIAN_POINT('',(1.125E0,1.5E0,1.2E1)); #7439=DIRECTION('',(0.E0,-1.E0,0.E0)); #7440=DIRECTION('',(1.E0,0.E0,0.E0)); #7441=AXIS2_PLACEMENT_3D('',#7438,#7439,#7440); #7442=CYLINDRICAL_SURFACE('',#7441,1.925E-1); #7443=ORIENTED_EDGE('',*,*,#7419,.T.); #7444=ORIENTED_EDGE('',*,*,#7433,.T.); #7445=ORIENTED_EDGE('',*,*,#5622,.F.); #7446=ORIENTED_EDGE('',*,*,#7430,.F.); #7447=EDGE_LOOP('',(#7443,#7444,#7445,#7446)); #7448=FACE_OUTER_BOUND('',#7447,.F.); #7449=ADVANCED_FACE('',(#7448),#7442,.F.); #7450=CARTESIAN_POINT('',(-2.E0,2.5E0,8.E0)); #7451=DIRECTION('',(-1.E0,0.E0,0.E0)); #7452=DIRECTION('',(0.E0,-1.E0,0.E0)); #7453=AXIS2_PLACEMENT_3D('',#7450,#7451,#7452); #7454=PLANE('',#7453); #7455=ORIENTED_EDGE('',*,*,#7265,.T.); #7456=ORIENTED_EDGE('',*,*,#6310,.T.); #7458=ORIENTED_EDGE('',*,*,#7457,.F.); #7459=ORIENTED_EDGE('',*,*,#5512,.F.); #7460=ORIENTED_EDGE('',*,*,#5984,.T.); #7462=ORIENTED_EDGE('',*,*,#7461,.T.); #7463=EDGE_LOOP('',(#7455,#7456,#7458,#7459,#7460,#7462)); #7464=FACE_OUTER_BOUND('',#7463,.F.); #7465=ADVANCED_FACE('',(#7464),#7454,.T.); #7466=CARTESIAN_POINT('',(-1.5E0,0.E0,1.225E1)); #7467=DIRECTION('',(-7.071067811865E-1,0.E0,7.071067811865E-1)); #7468=DIRECTION('',(0.E0,1.E0,0.E0)); #7469=AXIS2_PLACEMENT_3D('',#7466,#7467,#7468); #7470=PLANE('',#7469); #7471=ORIENTED_EDGE('',*,*,#6731,.F.); #7472=ORIENTED_EDGE('',*,*,#5514,.T.); #7473=ORIENTED_EDGE('',*,*,#7457,.T.); #7474=ORIENTED_EDGE('',*,*,#6308,.F.); #7475=EDGE_LOOP('',(#7471,#7472,#7473,#7474)); #7476=FACE_OUTER_BOUND('',#7475,.F.); #7477=ADVANCED_FACE('',(#7476),#7470,.T.); #7478=CARTESIAN_POINT('',(3.E0,1.15E1,8.E0)); #7479=DIRECTION('',(-8.741572761215E-1,4.856429311786E-1,0.E0)); #7480=DIRECTION('',(-4.856429311786E-1,-8.741572761215E-1,0.E0)); #7481=AXIS2_PLACEMENT_3D('',#7478,#7479,#7480); #7482=PLANE('',#7481); #7483=ORIENTED_EDGE('',*,*,#5982,.F.); #7485=ORIENTED_EDGE('',*,*,#7484,.T.); #7486=ORIENTED_EDGE('',*,*,#7267,.T.); #7487=ORIENTED_EDGE('',*,*,#7461,.F.); #7488=EDGE_LOOP('',(#7483,#7485,#7486,#7487)); #7489=FACE_OUTER_BOUND('',#7488,.F.); #7490=ADVANCED_FACE('',(#7489),#7482,.T.); #7491=CARTESIAN_POINT('',(5.E0,1.15E1,8.E0)); #7492=DIRECTION('',(0.E0,1.E0,0.E0)); #7493=DIRECTION('',(-1.E0,0.E0,0.E0)); #7494=AXIS2_PLACEMENT_3D('',#7491,#7492,#7493); #7495=PLANE('',#7494); #7496=ORIENTED_EDGE('',*,*,#5980,.F.); #7497=ORIENTED_EDGE('',*,*,#7239,.T.); #7498=ORIENTED_EDGE('',*,*,#7269,.T.); #7499=ORIENTED_EDGE('',*,*,#7484,.F.); #7500=EDGE_LOOP('',(#7496,#7497,#7498,#7499)); #7501=FACE_OUTER_BOUND('',#7500,.F.); #7503=ORIENTED_EDGE('',*,*,#7502,.F.); #7505=ORIENTED_EDGE('',*,*,#7504,.F.); #7506=EDGE_LOOP('',(#7503,#7505)); #7507=FACE_BOUND('',#7506,.F.); #7509=ORIENTED_EDGE('',*,*,#7508,.F.); #7511=ORIENTED_EDGE('',*,*,#7510,.F.); #7512=EDGE_LOOP('',(#7509,#7511)); #7513=FACE_BOUND('',#7512,.F.); #7514=ADVANCED_FACE('',(#7501,#7507,#7513),#7495,.T.); #7515=CARTESIAN_POINT('',(4.E0,1.15E1,9.E0)); #7516=DIRECTION('',(0.E0,-1.E0,0.E0)); #7517=DIRECTION('',(1.E0,0.E0,0.E0)); #7518=AXIS2_PLACEMENT_3D('',#7515,#7516,#7517); #7519=CYLINDRICAL_SURFACE('',#7518,9.5E-2); #7520=ORIENTED_EDGE('',*,*,#7502,.T.); #7522=ORIENTED_EDGE('',*,*,#7521,.T.); #7524=ORIENTED_EDGE('',*,*,#7523,.F.); #7526=ORIENTED_EDGE('',*,*,#7525,.F.); #7527=EDGE_LOOP('',(#7520,#7522,#7524,#7526)); #7528=FACE_OUTER_BOUND('',#7527,.F.); #7529=ADVANCED_FACE('',(#7528),#7519,.F.); #7530=CARTESIAN_POINT('',(4.E0,1.15E1,9.E0)); #7531=DIRECTION('',(0.E0,-1.E0,0.E0)); #7532=DIRECTION('',(1.E0,0.E0,0.E0)); #7533=AXIS2_PLACEMENT_3D('',#7530,#7531,#7532); #7534=CYLINDRICAL_SURFACE('',#7533,9.5E-2); #7535=ORIENTED_EDGE('',*,*,#7504,.T.); #7536=ORIENTED_EDGE('',*,*,#7525,.T.); #7538=ORIENTED_EDGE('',*,*,#7537,.F.); #7539=ORIENTED_EDGE('',*,*,#7521,.F.); #7540=EDGE_LOOP('',(#7535,#7536,#7538,#7539)); #7541=FACE_OUTER_BOUND('',#7540,.F.); #7542=ADVANCED_FACE('',(#7541),#7534,.F.); #7543=CARTESIAN_POINT('',(4.E0,1.1125E1,9.E0)); #7544=DIRECTION('',(0.E0,-1.E0,0.E0)); #7545=DIRECTION('',(1.E0,0.E0,0.E0)); #7546=AXIS2_PLACEMENT_3D('',#7543,#7544,#7545); #7547=PLANE('',#7546); #7548=ORIENTED_EDGE('',*,*,#7523,.T.); #7549=ORIENTED_EDGE('',*,*,#7537,.T.); #7550=EDGE_LOOP('',(#7548,#7549)); #7551=FACE_OUTER_BOUND('',#7550,.F.); #7552=ADVANCED_FACE('',(#7551),#7547,.F.); #7553=CARTESIAN_POINT('',(3.867417478528E0,1.15E1,9.132582521472E0)); #7554=DIRECTION('',(0.E0,-1.E0,0.E0)); #7555=DIRECTION('',(1.E0,0.E0,0.E0)); #7556=AXIS2_PLACEMENT_3D('',#7553,#7554,#7555); #7557=CYLINDRICAL_SURFACE('',#7556,6.25E-2); #7558=ORIENTED_EDGE('',*,*,#7508,.T.); #7560=ORIENTED_EDGE('',*,*,#7559,.T.); #7562=ORIENTED_EDGE('',*,*,#7561,.F.); #7564=ORIENTED_EDGE('',*,*,#7563,.F.); #7565=EDGE_LOOP('',(#7558,#7560,#7562,#7564)); #7566=FACE_OUTER_BOUND('',#7565,.F.); #7567=ADVANCED_FACE('',(#7566),#7557,.F.); #7568=CARTESIAN_POINT('',(3.867417478528E0,1.15E1,9.132582521472E0)); #7569=DIRECTION('',(0.E0,-1.E0,0.E0)); #7570=DIRECTION('',(1.E0,0.E0,0.E0)); #7571=AXIS2_PLACEMENT_3D('',#7568,#7569,#7570); #7572=CYLINDRICAL_SURFACE('',#7571,6.25E-2); #7573=ORIENTED_EDGE('',*,*,#7510,.T.); #7574=ORIENTED_EDGE('',*,*,#7563,.T.); #7576=ORIENTED_EDGE('',*,*,#7575,.F.); #7577=ORIENTED_EDGE('',*,*,#7559,.F.); #7578=EDGE_LOOP('',(#7573,#7574,#7576,#7577)); #7579=FACE_OUTER_BOUND('',#7578,.F.); #7580=ADVANCED_FACE('',(#7579),#7572,.F.); #7581=CARTESIAN_POINT('',(3.867417478528E0,1.125E1,9.132582521472E0)); #7582=DIRECTION('',(0.E0,-1.E0,0.E0)); #7583=DIRECTION('',(1.E0,0.E0,0.E0)); #7584=AXIS2_PLACEMENT_3D('',#7581,#7582,#7583); #7585=PLANE('',#7584); #7586=ORIENTED_EDGE('',*,*,#7561,.T.); #7587=ORIENTED_EDGE('',*,*,#7575,.T.); #7588=EDGE_LOOP('',(#7586,#7587)); #7589=FACE_OUTER_BOUND('',#7588,.F.); #7590=ADVANCED_FACE('',(#7589),#7585,.F.); #7591=CARTESIAN_POINT('',(2.15E0,6.65E0,9.441108058217E0)); #7592=DIRECTION('',(0.E0,0.E0,1.E0)); #7593=DIRECTION('',(1.E0,0.E0,0.E0)); #7594=AXIS2_PLACEMENT_3D('',#7591,#7592,#7593); #7595=CYLINDRICAL_SURFACE('',#7594,3.5E-1); #7597=ORIENTED_EDGE('',*,*,#7596,.T.); #7598=ORIENTED_EDGE('',*,*,#7285,.T.); #7600=ORIENTED_EDGE('',*,*,#7599,.F.); #7602=ORIENTED_EDGE('',*,*,#7601,.T.); #7603=EDGE_LOOP('',(#7597,#7598,#7600,#7602)); #7604=FACE_OUTER_BOUND('',#7603,.F.); #7605=ADVANCED_FACE('',(#7604),#7595,.T.); #7606=CARTESIAN_POINT('',(2.5E0,7.E0,1.E1)); #7607=DIRECTION('',(-1.E0,0.E0,0.E0)); #7608=DIRECTION('',(0.E0,-1.E0,0.E0)); #7609=AXIS2_PLACEMENT_3D('',#7606,#7607,#7608); #7610=PLANE('',#7609); #7611=ORIENTED_EDGE('',*,*,#7596,.F.); #7613=ORIENTED_EDGE('',*,*,#7612,.T.); #7615=ORIENTED_EDGE('',*,*,#7614,.F.); #7616=ORIENTED_EDGE('',*,*,#7287,.F.); #7617=EDGE_LOOP('',(#7611,#7613,#7615,#7616)); #7618=FACE_OUTER_BOUND('',#7617,.F.); #7619=ADVANCED_FACE('',(#7618),#7610,.F.); #7620=CARTESIAN_POINT('',(0.E0,0.E0,9.5E0)); #7621=DIRECTION('',(0.E0,0.E0,1.E0)); #7622=DIRECTION('',(1.E0,0.E0,0.E0)); #7623=AXIS2_PLACEMENT_3D('',#7620,#7621,#7622); #7624=PLANE('',#7623); #7625=ORIENTED_EDGE('',*,*,#7612,.F.); #7626=ORIENTED_EDGE('',*,*,#7601,.F.); #7628=ORIENTED_EDGE('',*,*,#7627,.F.); #7630=ORIENTED_EDGE('',*,*,#7629,.F.); #7632=ORIENTED_EDGE('',*,*,#7631,.F.); #7634=ORIENTED_EDGE('',*,*,#7633,.F.); #7636=ORIENTED_EDGE('',*,*,#7635,.F.); #7638=ORIENTED_EDGE('',*,*,#7637,.F.); #7640=ORIENTED_EDGE('',*,*,#7639,.F.); #7642=ORIENTED_EDGE('',*,*,#7641,.F.); #7644=ORIENTED_EDGE('',*,*,#7643,.F.); #7646=ORIENTED_EDGE('',*,*,#7645,.F.); #7647=EDGE_LOOP('',(#7625,#7626,#7628,#7630,#7632,#7634,#7636,#7638,#7640,#7642, #7644,#7646)); #7648=FACE_OUTER_BOUND('',#7647,.F.); #7649=ADVANCED_FACE('',(#7648),#7624,.T.); #7650=CARTESIAN_POINT('',(1.357969178416E0,7.E0,1.E1)); #7651=DIRECTION('',(0.E0,-1.E0,0.E0)); #7652=DIRECTION('',(1.E0,0.E0,0.E0)); #7653=AXIS2_PLACEMENT_3D('',#7650,#7651,#7652); #7654=PLANE('',#7653); #7655=ORIENTED_EDGE('',*,*,#7599,.T.); #7656=ORIENTED_EDGE('',*,*,#7307,.F.); #7658=ORIENTED_EDGE('',*,*,#7657,.T.); #7659=ORIENTED_EDGE('',*,*,#7627,.T.); #7660=EDGE_LOOP('',(#7655,#7656,#7658,#7659)); #7661=FACE_OUTER_BOUND('',#7660,.F.); #7662=ADVANCED_FACE('',(#7661),#7654,.F.); #7663=CARTESIAN_POINT('',(1.952799239454E0,7.35E0,1.006892397423E1)); #7664=DIRECTION('',(0.E0,0.E0,-1.E0)); #7665=DIRECTION('',(0.E0,-1.E0,0.E0)); #7666=AXIS2_PLACEMENT_3D('',#7663,#7664,#7665); #7667=CYLINDRICAL_SURFACE('',#7666,3.5E-1); #7668=ORIENTED_EDGE('',*,*,#7657,.F.); #7669=ORIENTED_EDGE('',*,*,#7305,.T.); #7671=ORIENTED_EDGE('',*,*,#7670,.T.); #7672=ORIENTED_EDGE('',*,*,#7629,.T.); #7673=EDGE_LOOP('',(#7668,#7669,#7671,#7672)); #7674=FACE_OUTER_BOUND('',#7673,.F.); #7675=ADVANCED_FACE('',(#7674),#7667,.F.); #7676=CARTESIAN_POINT('',(2.746858067304E0,9.5E0,1.E1)); #7677=DIRECTION('',(-8.741572761215E-1,4.856429311786E-1,0.E0)); #7678=DIRECTION('',(-4.856429311786E-1,-8.741572761215E-1,0.E0)); #7679=AXIS2_PLACEMENT_3D('',#7676,#7677,#7678); #7680=PLANE('',#7679); #7681=ORIENTED_EDGE('',*,*,#7670,.F.); #7682=ORIENTED_EDGE('',*,*,#7303,.F.); #7684=ORIENTED_EDGE('',*,*,#7683,.T.); #7685=ORIENTED_EDGE('',*,*,#7631,.T.); #7686=EDGE_LOOP('',(#7681,#7682,#7684,#7685)); #7687=FACE_OUTER_BOUND('',#7686,.F.); #7688=ADVANCED_FACE('',(#7687),#7680,.F.); #7689=CARTESIAN_POINT('',(2.952799239454E0,9.15E0,1.006892397423E1)); #7690=DIRECTION('',(0.E0,0.E0,-1.E0)); #7691=DIRECTION('',(-8.741572761215E-1,4.856429311786E-1,0.E0)); #7692=AXIS2_PLACEMENT_3D('',#7689,#7690,#7691); #7693=CYLINDRICAL_SURFACE('',#7692,3.5E-1); #7694=ORIENTED_EDGE('',*,*,#7683,.F.); #7695=ORIENTED_EDGE('',*,*,#7301,.T.); #7697=ORIENTED_EDGE('',*,*,#7696,.T.); #7698=ORIENTED_EDGE('',*,*,#7633,.T.); #7699=EDGE_LOOP('',(#7694,#7695,#7697,#7698)); #7700=FACE_OUTER_BOUND('',#7699,.F.); #7701=ADVANCED_FACE('',(#7700),#7693,.F.); #7702=CARTESIAN_POINT('',(4.5E0,9.5E0,1.E1)); #7703=DIRECTION('',(0.E0,1.E0,0.E0)); #7704=DIRECTION('',(-1.E0,0.E0,0.E0)); #7705=AXIS2_PLACEMENT_3D('',#7702,#7703,#7704); #7706=PLANE('',#7705); #7707=ORIENTED_EDGE('',*,*,#7696,.F.); #7708=ORIENTED_EDGE('',*,*,#7299,.F.); #7710=ORIENTED_EDGE('',*,*,#7709,.T.); #7711=ORIENTED_EDGE('',*,*,#7635,.T.); #7712=EDGE_LOOP('',(#7707,#7708,#7710,#7711)); #7713=FACE_OUTER_BOUND('',#7712,.F.); #7714=ADVANCED_FACE('',(#7713),#7706,.F.); #7715=CARTESIAN_POINT('',(4.15E0,9.15E0,1.006892397423E1)); #7716=DIRECTION('',(0.E0,0.E0,-1.E0)); #7717=DIRECTION('',(0.E0,1.E0,0.E0)); #7718=AXIS2_PLACEMENT_3D('',#7715,#7716,#7717); #7719=CYLINDRICAL_SURFACE('',#7718,3.5E-1); #7720=ORIENTED_EDGE('',*,*,#7709,.F.); #7721=ORIENTED_EDGE('',*,*,#7297,.T.); #7723=ORIENTED_EDGE('',*,*,#7722,.T.); #7724=ORIENTED_EDGE('',*,*,#7637,.T.); #7725=EDGE_LOOP('',(#7720,#7721,#7723,#7724)); #7726=FACE_OUTER_BOUND('',#7725,.F.); #7727=ADVANCED_FACE('',(#7726),#7719,.F.); #7728=CARTESIAN_POINT('',(4.5E0,2.E0,1.E1)); #7729=DIRECTION('',(1.E0,0.E0,0.E0)); #7730=DIRECTION('',(0.E0,1.E0,0.E0)); #7731=AXIS2_PLACEMENT_3D('',#7728,#7729,#7730); #7732=PLANE('',#7731); #7734=ORIENTED_EDGE('',*,*,#7733,.T.); #7735=ORIENTED_EDGE('',*,*,#7639,.T.); #7736=ORIENTED_EDGE('',*,*,#7722,.F.); #7737=ORIENTED_EDGE('',*,*,#7295,.F.); #7738=EDGE_LOOP('',(#7734,#7735,#7736,#7737)); #7739=FACE_OUTER_BOUND('',#7738,.F.); #7740=ADVANCED_FACE('',(#7739),#7732,.F.); #7741=CARTESIAN_POINT('',(4.15E0,2.35E0,1.006892397423E1)); #7742=DIRECTION('',(0.E0,0.E0,-1.E0)); #7743=DIRECTION('',(1.E0,0.E0,0.E0)); #7744=AXIS2_PLACEMENT_3D('',#7741,#7742,#7743); #7745=CYLINDRICAL_SURFACE('',#7744,3.5E-1); #7746=ORIENTED_EDGE('',*,*,#7733,.F.); #7747=ORIENTED_EDGE('',*,*,#7293,.T.); #7749=ORIENTED_EDGE('',*,*,#7748,.T.); #7750=ORIENTED_EDGE('',*,*,#7641,.T.); #7751=EDGE_LOOP('',(#7746,#7747,#7749,#7750)); #7752=FACE_OUTER_BOUND('',#7751,.F.); #7753=ADVANCED_FACE('',(#7752),#7745,.F.); #7754=CARTESIAN_POINT('',(2.5E0,2.E0,1.E1)); #7755=DIRECTION('',(0.E0,-1.E0,0.E0)); #7756=DIRECTION('',(1.E0,0.E0,0.E0)); #7757=AXIS2_PLACEMENT_3D('',#7754,#7755,#7756); #7758=PLANE('',#7757); #7760=ORIENTED_EDGE('',*,*,#7759,.T.); #7761=ORIENTED_EDGE('',*,*,#7643,.T.); #7762=ORIENTED_EDGE('',*,*,#7748,.F.); #7763=ORIENTED_EDGE('',*,*,#7291,.F.); #7764=EDGE_LOOP('',(#7760,#7761,#7762,#7763)); #7765=FACE_OUTER_BOUND('',#7764,.F.); #7766=ADVANCED_FACE('',(#7765),#7758,.F.); #7767=CARTESIAN_POINT('',(2.85E0,2.35E0,1.006892397423E1)); #7768=DIRECTION('',(0.E0,0.E0,-1.E0)); #7769=DIRECTION('',(0.E0,-1.E0,0.E0)); #7770=AXIS2_PLACEMENT_3D('',#7767,#7768,#7769); #7771=CYLINDRICAL_SURFACE('',#7770,3.5E-1); #7772=ORIENTED_EDGE('',*,*,#7759,.F.); #7773=ORIENTED_EDGE('',*,*,#7289,.T.); #7774=ORIENTED_EDGE('',*,*,#7614,.T.); #7775=ORIENTED_EDGE('',*,*,#7645,.T.); #7776=EDGE_LOOP('',(#7772,#7773,#7774,#7775)); #7777=FACE_OUTER_BOUND('',#7776,.F.); #7778=ADVANCED_FACE('',(#7777),#7771,.F.); #7779=CARTESIAN_POINT('',(1.9E1,1.5E0,1.175E1)); #7780=DIRECTION('',(-7.071067811865E-1,0.E0,7.071067811865E-1)); #7781=DIRECTION('',(0.E0,-1.E0,0.E0)); #7782=AXIS2_PLACEMENT_3D('',#7779,#7780,#7781); #7783=PLANE('',#7782); #7784=ORIENTED_EDGE('',*,*,#7161,.F.); #7785=ORIENTED_EDGE('',*,*,#6428,.T.); #7786=ORIENTED_EDGE('',*,*,#6953,.T.); #7787=ORIENTED_EDGE('',*,*,#5682,.F.); #7788=EDGE_LOOP('',(#7784,#7785,#7786,#7787)); #7789=FACE_OUTER_BOUND('',#7788,.F.); #7790=ADVANCED_FACE('',(#7789),#7783,.T.); #7791=CARTESIAN_POINT('',(2.E1,1.15E1,9.E0)); #7792=DIRECTION('',(0.E0,1.E0,0.E0)); #7793=DIRECTION('',(-1.E0,0.E0,0.E0)); #7794=AXIS2_PLACEMENT_3D('',#7791,#7792,#7793); #7795=CYLINDRICAL_SURFACE('',#7794,9.5E-2); #7796=ORIENTED_EDGE('',*,*,#7140,.F.); #7798=ORIENTED_EDGE('',*,*,#7797,.T.); #7800=ORIENTED_EDGE('',*,*,#7799,.T.); #7802=ORIENTED_EDGE('',*,*,#7801,.F.); #7803=EDGE_LOOP('',(#7796,#7798,#7800,#7802)); #7804=FACE_OUTER_BOUND('',#7803,.F.); #7805=ADVANCED_FACE('',(#7804),#7795,.F.); #7806=CARTESIAN_POINT('',(2.E1,1.15E1,9.E0)); #7807=DIRECTION('',(0.E0,1.E0,0.E0)); #7808=DIRECTION('',(-1.E0,0.E0,0.E0)); #7809=AXIS2_PLACEMENT_3D('',#7806,#7807,#7808); #7810=CYLINDRICAL_SURFACE('',#7809,9.5E-2); #7811=ORIENTED_EDGE('',*,*,#7142,.F.); #7812=ORIENTED_EDGE('',*,*,#7801,.T.); #7814=ORIENTED_EDGE('',*,*,#7813,.T.); #7815=ORIENTED_EDGE('',*,*,#7797,.F.); #7816=EDGE_LOOP('',(#7811,#7812,#7814,#7815)); #7817=FACE_OUTER_BOUND('',#7816,.F.); #7818=ADVANCED_FACE('',(#7817),#7810,.F.); #7819=CARTESIAN_POINT('',(2.E1,1.1125E1,9.E0)); #7820=DIRECTION('',(0.E0,1.E0,0.E0)); #7821=DIRECTION('',(-1.E0,0.E0,0.E0)); #7822=AXIS2_PLACEMENT_3D('',#7819,#7820,#7821); #7823=PLANE('',#7822); #7824=ORIENTED_EDGE('',*,*,#7799,.F.); #7825=ORIENTED_EDGE('',*,*,#7813,.F.); #7826=EDGE_LOOP('',(#7824,#7825)); #7827=FACE_OUTER_BOUND('',#7826,.F.); #7828=ADVANCED_FACE('',(#7827),#7823,.T.); #7829=CARTESIAN_POINT('',(2.013258252147E1,1.15E1,9.132582521472E0)); #7830=DIRECTION('',(0.E0,1.E0,0.E0)); #7831=DIRECTION('',(-1.E0,0.E0,0.E0)); #7832=AXIS2_PLACEMENT_3D('',#7829,#7830,#7831); #7833=CYLINDRICAL_SURFACE('',#7832,6.25E-2); #7834=ORIENTED_EDGE('',*,*,#7146,.F.); #7836=ORIENTED_EDGE('',*,*,#7835,.T.); #7838=ORIENTED_EDGE('',*,*,#7837,.T.); #7840=ORIENTED_EDGE('',*,*,#7839,.F.); #7841=EDGE_LOOP('',(#7834,#7836,#7838,#7840)); #7842=FACE_OUTER_BOUND('',#7841,.F.); #7843=ADVANCED_FACE('',(#7842),#7833,.F.); #7844=CARTESIAN_POINT('',(2.013258252147E1,1.15E1,9.132582521472E0)); #7845=DIRECTION('',(0.E0,1.E0,0.E0)); #7846=DIRECTION('',(-1.E0,0.E0,0.E0)); #7847=AXIS2_PLACEMENT_3D('',#7844,#7845,#7846); #7848=CYLINDRICAL_SURFACE('',#7847,6.25E-2); #7849=ORIENTED_EDGE('',*,*,#7148,.F.); #7850=ORIENTED_EDGE('',*,*,#7839,.T.); #7852=ORIENTED_EDGE('',*,*,#7851,.T.); #7853=ORIENTED_EDGE('',*,*,#7835,.F.); #7854=EDGE_LOOP('',(#7849,#7850,#7852,#7853)); #7855=FACE_OUTER_BOUND('',#7854,.F.); #7856=ADVANCED_FACE('',(#7855),#7848,.F.); #7857=CARTESIAN_POINT('',(2.013258252147E1,1.125E1,9.132582521472E0)); #7858=DIRECTION('',(0.E0,1.E0,0.E0)); #7859=DIRECTION('',(-1.E0,0.E0,0.E0)); #7860=AXIS2_PLACEMENT_3D('',#7857,#7858,#7859); #7861=PLANE('',#7860); #7862=ORIENTED_EDGE('',*,*,#7837,.F.); #7863=ORIENTED_EDGE('',*,*,#7851,.F.); #7864=EDGE_LOOP('',(#7862,#7863)); #7865=FACE_OUTER_BOUND('',#7864,.F.); #7866=ADVANCED_FACE('',(#7865),#7861,.T.); #7867=CARTESIAN_POINT('',(1.755E1,1.176878221735E0,2.975E1)); #7868=DIRECTION('',(0.E0,-1.E0,0.E0)); #7869=DIRECTION('',(1.E0,0.E0,0.E0)); #7870=AXIS2_PLACEMENT_3D('',#7867,#7868,#7869); #7871=CYLINDRICAL_SURFACE('',#7870,1.E-1); #7872=ORIENTED_EDGE('',*,*,#6346,.F.); #7874=ORIENTED_EDGE('',*,*,#7873,.F.); #7876=ORIENTED_EDGE('',*,*,#7875,.T.); #7878=ORIENTED_EDGE('',*,*,#7877,.T.); #7879=EDGE_LOOP('',(#7872,#7874,#7876,#7878)); #7880=FACE_OUTER_BOUND('',#7879,.F.); #7881=ADVANCED_FACE('',(#7880),#7871,.F.); #7882=CARTESIAN_POINT('',(1.755E1,1.176878221735E0,2.975E1)); #7883=DIRECTION('',(0.E0,-1.E0,0.E0)); #7884=DIRECTION('',(1.E0,0.E0,0.E0)); #7885=AXIS2_PLACEMENT_3D('',#7882,#7883,#7884); #7886=CYLINDRICAL_SURFACE('',#7885,1.E-1); #7887=ORIENTED_EDGE('',*,*,#6348,.F.); #7888=ORIENTED_EDGE('',*,*,#7877,.F.); #7890=ORIENTED_EDGE('',*,*,#7889,.F.); #7891=ORIENTED_EDGE('',*,*,#7873,.T.); #7892=EDGE_LOOP('',(#7887,#7888,#7890,#7891)); #7893=FACE_OUTER_BOUND('',#7892,.F.); #7894=ADVANCED_FACE('',(#7893),#7886,.F.); #7895=CARTESIAN_POINT('',(1.755E1,1.234346967234E0,2.975E1)); #7896=DIRECTION('',(0.E0,1.E0,0.E0)); #7897=DIRECTION('',(-1.E0,0.E0,0.E0)); #7898=AXIS2_PLACEMENT_3D('',#7895,#7896,#7897); #7899=CONICAL_SURFACE('',#7898,7.288815195685E-2,6.E1); #7901=ORIENTED_EDGE('',*,*,#7900,.F.); #7903=ORIENTED_EDGE('',*,*,#7902,.T.); #7904=ORIENTED_EDGE('',*,*,#7889,.T.); #7905=EDGE_LOOP('',(#7901,#7903,#7904)); #7906=FACE_OUTER_BOUND('',#7905,.F.); #7907=ADVANCED_FACE('',(#7906),#7899,.F.); #7908=CARTESIAN_POINT('',(1.755E1,1.234346967234E0,2.975E1)); #7909=DIRECTION('',(0.E0,1.E0,0.E0)); #7910=DIRECTION('',(-1.E0,0.E0,0.E0)); #7911=AXIS2_PLACEMENT_3D('',#7908,#7909,#7910); #7912=CONICAL_SURFACE('',#7911,7.288815195685E-2,6.E1); #7913=ORIENTED_EDGE('',*,*,#7900,.T.); #7914=ORIENTED_EDGE('',*,*,#7875,.F.); #7915=ORIENTED_EDGE('',*,*,#7902,.F.); #7916=EDGE_LOOP('',(#7913,#7914,#7915)); #7917=FACE_OUTER_BOUND('',#7916,.F.); #7918=ADVANCED_FACE('',(#7917),#7912,.F.); #7919=CARTESIAN_POINT('',(1.655E1,1.176878221735E0,2.975E1)); #7920=DIRECTION('',(0.E0,-1.E0,0.E0)); #7921=DIRECTION('',(1.E0,0.E0,0.E0)); #7922=AXIS2_PLACEMENT_3D('',#7919,#7920,#7921); #7923=CYLINDRICAL_SURFACE('',#7922,1.E-1); #7924=ORIENTED_EDGE('',*,*,#6352,.F.); #7926=ORIENTED_EDGE('',*,*,#7925,.F.); #7928=ORIENTED_EDGE('',*,*,#7927,.T.); #7930=ORIENTED_EDGE('',*,*,#7929,.T.); #7931=EDGE_LOOP('',(#7924,#7926,#7928,#7930)); #7932=FACE_OUTER_BOUND('',#7931,.F.); #7933=ADVANCED_FACE('',(#7932),#7923,.F.); #7934=CARTESIAN_POINT('',(1.655E1,1.176878221735E0,2.975E1)); #7935=DIRECTION('',(0.E0,-1.E0,0.E0)); #7936=DIRECTION('',(1.E0,0.E0,0.E0)); #7937=AXIS2_PLACEMENT_3D('',#7934,#7935,#7936); #7938=CYLINDRICAL_SURFACE('',#7937,1.E-1); #7939=ORIENTED_EDGE('',*,*,#6354,.F.); #7940=ORIENTED_EDGE('',*,*,#7929,.F.); #7942=ORIENTED_EDGE('',*,*,#7941,.F.); #7943=ORIENTED_EDGE('',*,*,#7925,.T.); #7944=EDGE_LOOP('',(#7939,#7940,#7942,#7943)); #7945=FACE_OUTER_BOUND('',#7944,.F.); #7946=ADVANCED_FACE('',(#7945),#7938,.F.); #7947=CARTESIAN_POINT('',(1.655E1,1.234346967234E0,2.975E1)); #7948=DIRECTION('',(0.E0,1.E0,0.E0)); #7949=DIRECTION('',(-1.E0,0.E0,0.E0)); #7950=AXIS2_PLACEMENT_3D('',#7947,#7948,#7949); #7951=CONICAL_SURFACE('',#7950,7.288815195685E-2,6.E1); #7953=ORIENTED_EDGE('',*,*,#7952,.F.); #7955=ORIENTED_EDGE('',*,*,#7954,.T.); #7956=ORIENTED_EDGE('',*,*,#7941,.T.); #7957=EDGE_LOOP('',(#7953,#7955,#7956)); #7958=FACE_OUTER_BOUND('',#7957,.F.); #7959=ADVANCED_FACE('',(#7958),#7951,.F.); #7960=CARTESIAN_POINT('',(1.655E1,1.234346967234E0,2.975E1)); #7961=DIRECTION('',(0.E0,1.E0,0.E0)); #7962=DIRECTION('',(-1.E0,0.E0,0.E0)); #7963=AXIS2_PLACEMENT_3D('',#7960,#7961,#7962); #7964=CONICAL_SURFACE('',#7963,7.288815195685E-2,6.E1); #7965=ORIENTED_EDGE('',*,*,#7952,.T.); #7966=ORIENTED_EDGE('',*,*,#7927,.F.); #7967=ORIENTED_EDGE('',*,*,#7954,.F.); #7968=EDGE_LOOP('',(#7965,#7966,#7967)); #7969=FACE_OUTER_BOUND('',#7968,.F.); #7970=ADVANCED_FACE('',(#7969),#7964,.F.); #7971=CARTESIAN_POINT('',(1.125E0,1.5E0,6.E0)); #7972=DIRECTION('',(0.E0,-1.E0,0.E0)); #7973=DIRECTION('',(1.E0,0.E0,0.E0)); #7974=AXIS2_PLACEMENT_3D('',#7971,#7972,#7973); #7975=CYLINDRICAL_SURFACE('',#7974,2.575E-1); #7976=ORIENTED_EDGE('',*,*,#6248,.T.); #7978=ORIENTED_EDGE('',*,*,#7977,.T.); #7980=ORIENTED_EDGE('',*,*,#7979,.F.); #7982=ORIENTED_EDGE('',*,*,#7981,.F.); #7983=EDGE_LOOP('',(#7976,#7978,#7980,#7982)); #7984=FACE_OUTER_BOUND('',#7983,.F.); #7985=ADVANCED_FACE('',(#7984),#7975,.F.); #7986=CARTESIAN_POINT('',(1.125E0,1.5E0,6.E0)); #7987=DIRECTION('',(0.E0,-1.E0,0.E0)); #7988=DIRECTION('',(1.E0,0.E0,0.E0)); #7989=AXIS2_PLACEMENT_3D('',#7986,#7987,#7988); #7990=CYLINDRICAL_SURFACE('',#7989,2.575E-1); #7991=ORIENTED_EDGE('',*,*,#6250,.T.); #7992=ORIENTED_EDGE('',*,*,#7981,.T.); #7994=ORIENTED_EDGE('',*,*,#7993,.F.); #7995=ORIENTED_EDGE('',*,*,#7977,.F.); #7996=EDGE_LOOP('',(#7991,#7992,#7994,#7995)); #7997=FACE_OUTER_BOUND('',#7996,.F.); #7998=ADVANCED_FACE('',(#7997),#7990,.F.); #7999=CARTESIAN_POINT('',(1.125E0,1.E0,6.E0)); #8000=DIRECTION('',(0.E0,-1.E0,0.E0)); #8001=DIRECTION('',(1.E0,0.E0,0.E0)); #8002=AXIS2_PLACEMENT_3D('',#7999,#8000,#8001); #8003=PLANE('',#8002); #8004=ORIENTED_EDGE('',*,*,#7979,.T.); #8005=ORIENTED_EDGE('',*,*,#7993,.T.); #8006=EDGE_LOOP('',(#8004,#8005)); #8007=FACE_OUTER_BOUND('',#8006,.F.); #8009=ORIENTED_EDGE('',*,*,#8008,.F.); #8011=ORIENTED_EDGE('',*,*,#8010,.F.); #8012=EDGE_LOOP('',(#8009,#8011)); #8013=FACE_BOUND('',#8012,.F.); #8014=ADVANCED_FACE('',(#8007,#8013),#8003,.F.); #8015=CARTESIAN_POINT('',(1.125E0,1.5E0,6.E0)); #8016=DIRECTION('',(0.E0,-1.E0,0.E0)); #8017=DIRECTION('',(1.E0,0.E0,0.E0)); #8018=AXIS2_PLACEMENT_3D('',#8015,#8016,#8017); #8019=CYLINDRICAL_SURFACE('',#8018,1.925E-1); #8020=ORIENTED_EDGE('',*,*,#8008,.T.); #8022=ORIENTED_EDGE('',*,*,#8021,.T.); #8023=ORIENTED_EDGE('',*,*,#5626,.F.); #8025=ORIENTED_EDGE('',*,*,#8024,.F.); #8026=EDGE_LOOP('',(#8020,#8022,#8023,#8025)); #8027=FACE_OUTER_BOUND('',#8026,.F.); #8028=ADVANCED_FACE('',(#8027),#8019,.F.); #8029=CARTESIAN_POINT('',(1.125E0,1.5E0,6.E0)); #8030=DIRECTION('',(0.E0,-1.E0,0.E0)); #8031=DIRECTION('',(1.E0,0.E0,0.E0)); #8032=AXIS2_PLACEMENT_3D('',#8029,#8030,#8031); #8033=CYLINDRICAL_SURFACE('',#8032,1.925E-1); #8034=ORIENTED_EDGE('',*,*,#8010,.T.); #8035=ORIENTED_EDGE('',*,*,#8024,.T.); #8036=ORIENTED_EDGE('',*,*,#5628,.F.); #8037=ORIENTED_EDGE('',*,*,#8021,.F.); #8038=EDGE_LOOP('',(#8034,#8035,#8036,#8037)); #8039=FACE_OUTER_BOUND('',#8038,.F.); #8040=ADVANCED_FACE('',(#8039),#8033,.F.); #8041=CARTESIAN_POINT('',(1.125E0,1.5E0,1.8E1)); #8042=DIRECTION('',(0.E0,-1.E0,0.E0)); #8043=DIRECTION('',(1.E0,0.E0,0.E0)); #8044=AXIS2_PLACEMENT_3D('',#8041,#8042,#8043); #8045=CYLINDRICAL_SURFACE('',#8044,2.575E-1); #8046=ORIENTED_EDGE('',*,*,#6358,.T.); #8048=ORIENTED_EDGE('',*,*,#8047,.T.); #8050=ORIENTED_EDGE('',*,*,#8049,.F.); #8052=ORIENTED_EDGE('',*,*,#8051,.F.); #8053=EDGE_LOOP('',(#8046,#8048,#8050,#8052)); #8054=FACE_OUTER_BOUND('',#8053,.F.); #8055=ADVANCED_FACE('',(#8054),#8045,.F.); #8056=CARTESIAN_POINT('',(1.125E0,1.5E0,1.8E1)); #8057=DIRECTION('',(0.E0,-1.E0,0.E0)); #8058=DIRECTION('',(1.E0,0.E0,0.E0)); #8059=AXIS2_PLACEMENT_3D('',#8056,#8057,#8058); #8060=CYLINDRICAL_SURFACE('',#8059,2.575E-1); #8061=ORIENTED_EDGE('',*,*,#6360,.T.); #8062=ORIENTED_EDGE('',*,*,#8051,.T.); #8064=ORIENTED_EDGE('',*,*,#8063,.F.); #8065=ORIENTED_EDGE('',*,*,#8047,.F.); #8066=EDGE_LOOP('',(#8061,#8062,#8064,#8065)); #8067=FACE_OUTER_BOUND('',#8066,.F.); #8068=ADVANCED_FACE('',(#8067),#8060,.F.); #8069=CARTESIAN_POINT('',(1.125E0,1.E0,1.8E1)); #8070=DIRECTION('',(0.E0,-1.E0,0.E0)); #8071=DIRECTION('',(1.E0,0.E0,0.E0)); #8072=AXIS2_PLACEMENT_3D('',#8069,#8070,#8071); #8073=PLANE('',#8072); #8074=ORIENTED_EDGE('',*,*,#8049,.T.); #8075=ORIENTED_EDGE('',*,*,#8063,.T.); #8076=EDGE_LOOP('',(#8074,#8075)); #8077=FACE_OUTER_BOUND('',#8076,.F.); #8079=ORIENTED_EDGE('',*,*,#8078,.F.); #8081=ORIENTED_EDGE('',*,*,#8080,.F.); #8082=EDGE_LOOP('',(#8079,#8081)); #8083=FACE_BOUND('',#8082,.F.); #8084=ADVANCED_FACE('',(#8077,#8083),#8073,.F.); #8085=CARTESIAN_POINT('',(1.125E0,1.5E0,1.8E1)); #8086=DIRECTION('',(0.E0,-1.E0,0.E0)); #8087=DIRECTION('',(1.E0,0.E0,0.E0)); #8088=AXIS2_PLACEMENT_3D('',#8085,#8086,#8087); #8089=CYLINDRICAL_SURFACE('',#8088,1.925E-1); #8090=ORIENTED_EDGE('',*,*,#8078,.T.); #8092=ORIENTED_EDGE('',*,*,#8091,.T.); #8093=ORIENTED_EDGE('',*,*,#5614,.F.); #8095=ORIENTED_EDGE('',*,*,#8094,.F.); #8096=EDGE_LOOP('',(#8090,#8092,#8093,#8095)); #8097=FACE_OUTER_BOUND('',#8096,.F.); #8098=ADVANCED_FACE('',(#8097),#8089,.F.); #8099=CARTESIAN_POINT('',(1.125E0,1.5E0,1.8E1)); #8100=DIRECTION('',(0.E0,-1.E0,0.E0)); #8101=DIRECTION('',(1.E0,0.E0,0.E0)); #8102=AXIS2_PLACEMENT_3D('',#8099,#8100,#8101); #8103=CYLINDRICAL_SURFACE('',#8102,1.925E-1); #8104=ORIENTED_EDGE('',*,*,#8080,.T.); #8105=ORIENTED_EDGE('',*,*,#8094,.T.); #8106=ORIENTED_EDGE('',*,*,#5616,.F.); #8107=ORIENTED_EDGE('',*,*,#8091,.F.); #8108=EDGE_LOOP('',(#8104,#8105,#8106,#8107)); #8109=FACE_OUTER_BOUND('',#8108,.F.); #8110=ADVANCED_FACE('',(#8109),#8103,.F.); #8111=CARTESIAN_POINT('',(1.125E0,1.5E0,2.4E1)); #8112=DIRECTION('',(0.E0,-1.E0,0.E0)); #8113=DIRECTION('',(1.E0,0.E0,0.E0)); #8114=AXIS2_PLACEMENT_3D('',#8111,#8112,#8113); #8115=CYLINDRICAL_SURFACE('',#8114,2.575E-1); #8116=ORIENTED_EDGE('',*,*,#6364,.T.); #8118=ORIENTED_EDGE('',*,*,#8117,.T.); #8120=ORIENTED_EDGE('',*,*,#8119,.F.); #8122=ORIENTED_EDGE('',*,*,#8121,.F.); #8123=EDGE_LOOP('',(#8116,#8118,#8120,#8122)); #8124=FACE_OUTER_BOUND('',#8123,.F.); #8125=ADVANCED_FACE('',(#8124),#8115,.F.); #8126=CARTESIAN_POINT('',(1.125E0,1.5E0,2.4E1)); #8127=DIRECTION('',(0.E0,-1.E0,0.E0)); #8128=DIRECTION('',(1.E0,0.E0,0.E0)); #8129=AXIS2_PLACEMENT_3D('',#8126,#8127,#8128); #8130=CYLINDRICAL_SURFACE('',#8129,2.575E-1); #8131=ORIENTED_EDGE('',*,*,#6366,.T.); #8132=ORIENTED_EDGE('',*,*,#8121,.T.); #8134=ORIENTED_EDGE('',*,*,#8133,.F.); #8135=ORIENTED_EDGE('',*,*,#8117,.F.); #8136=EDGE_LOOP('',(#8131,#8132,#8134,#8135)); #8137=FACE_OUTER_BOUND('',#8136,.F.); #8138=ADVANCED_FACE('',(#8137),#8130,.F.); #8139=CARTESIAN_POINT('',(1.125E0,1.E0,2.4E1)); #8140=DIRECTION('',(0.E0,-1.E0,0.E0)); #8141=DIRECTION('',(1.E0,0.E0,0.E0)); #8142=AXIS2_PLACEMENT_3D('',#8139,#8140,#8141); #8143=PLANE('',#8142); #8144=ORIENTED_EDGE('',*,*,#8119,.T.); #8145=ORIENTED_EDGE('',*,*,#8133,.T.); #8146=EDGE_LOOP('',(#8144,#8145)); #8147=FACE_OUTER_BOUND('',#8146,.F.); #8149=ORIENTED_EDGE('',*,*,#8148,.F.); #8151=ORIENTED_EDGE('',*,*,#8150,.F.); #8152=EDGE_LOOP('',(#8149,#8151)); #8153=FACE_BOUND('',#8152,.F.); #8154=ADVANCED_FACE('',(#8147,#8153),#8143,.F.); #8155=CARTESIAN_POINT('',(1.125E0,1.5E0,2.4E1)); #8156=DIRECTION('',(0.E0,-1.E0,0.E0)); #8157=DIRECTION('',(1.E0,0.E0,0.E0)); #8158=AXIS2_PLACEMENT_3D('',#8155,#8156,#8157); #8159=CYLINDRICAL_SURFACE('',#8158,1.925E-1); #8160=ORIENTED_EDGE('',*,*,#8148,.T.); #8162=ORIENTED_EDGE('',*,*,#8161,.T.); #8163=ORIENTED_EDGE('',*,*,#5608,.F.); #8165=ORIENTED_EDGE('',*,*,#8164,.F.); #8166=EDGE_LOOP('',(#8160,#8162,#8163,#8165)); #8167=FACE_OUTER_BOUND('',#8166,.F.); #8168=ADVANCED_FACE('',(#8167),#8159,.F.); #8169=CARTESIAN_POINT('',(1.125E0,1.5E0,2.4E1)); #8170=DIRECTION('',(0.E0,-1.E0,0.E0)); #8171=DIRECTION('',(1.E0,0.E0,0.E0)); #8172=AXIS2_PLACEMENT_3D('',#8169,#8170,#8171); #8173=CYLINDRICAL_SURFACE('',#8172,1.925E-1); #8174=ORIENTED_EDGE('',*,*,#8150,.T.); #8175=ORIENTED_EDGE('',*,*,#8164,.T.); #8176=ORIENTED_EDGE('',*,*,#5610,.F.); #8177=ORIENTED_EDGE('',*,*,#8161,.F.); #8178=EDGE_LOOP('',(#8174,#8175,#8176,#8177)); #8179=FACE_OUTER_BOUND('',#8178,.F.); #8180=ADVANCED_FACE('',(#8179),#8173,.F.); #8181=CARTESIAN_POINT('',(2.2875E1,1.5E0,6.E0)); #8182=DIRECTION('',(0.E0,-1.E0,0.E0)); #8183=DIRECTION('',(1.E0,0.E0,0.E0)); #8184=AXIS2_PLACEMENT_3D('',#8181,#8182,#8183); #8185=CYLINDRICAL_SURFACE('',#8184,2.575E-1); #8186=ORIENTED_EDGE('',*,*,#6254,.T.); #8188=ORIENTED_EDGE('',*,*,#8187,.T.); #8190=ORIENTED_EDGE('',*,*,#8189,.F.); #8192=ORIENTED_EDGE('',*,*,#8191,.F.); #8193=EDGE_LOOP('',(#8186,#8188,#8190,#8192)); #8194=FACE_OUTER_BOUND('',#8193,.F.); #8195=ADVANCED_FACE('',(#8194),#8185,.F.); #8196=CARTESIAN_POINT('',(2.2875E1,1.5E0,6.E0)); #8197=DIRECTION('',(0.E0,-1.E0,0.E0)); #8198=DIRECTION('',(1.E0,0.E0,0.E0)); #8199=AXIS2_PLACEMENT_3D('',#8196,#8197,#8198); #8200=CYLINDRICAL_SURFACE('',#8199,2.575E-1); #8201=ORIENTED_EDGE('',*,*,#6256,.T.); #8202=ORIENTED_EDGE('',*,*,#8191,.T.); #8204=ORIENTED_EDGE('',*,*,#8203,.F.); #8205=ORIENTED_EDGE('',*,*,#8187,.F.); #8206=EDGE_LOOP('',(#8201,#8202,#8204,#8205)); #8207=FACE_OUTER_BOUND('',#8206,.F.); #8208=ADVANCED_FACE('',(#8207),#8200,.F.); #8209=CARTESIAN_POINT('',(2.2875E1,1.E0,6.E0)); #8210=DIRECTION('',(0.E0,-1.E0,0.E0)); #8211=DIRECTION('',(1.E0,0.E0,0.E0)); #8212=AXIS2_PLACEMENT_3D('',#8209,#8210,#8211); #8213=PLANE('',#8212); #8214=ORIENTED_EDGE('',*,*,#8189,.T.); #8215=ORIENTED_EDGE('',*,*,#8203,.T.); #8216=EDGE_LOOP('',(#8214,#8215)); #8217=FACE_OUTER_BOUND('',#8216,.F.); #8219=ORIENTED_EDGE('',*,*,#8218,.F.); #8221=ORIENTED_EDGE('',*,*,#8220,.F.); #8222=EDGE_LOOP('',(#8219,#8221)); #8223=FACE_BOUND('',#8222,.F.); #8224=ADVANCED_FACE('',(#8217,#8223),#8213,.F.); #8225=CARTESIAN_POINT('',(2.2875E1,1.5E0,6.E0)); #8226=DIRECTION('',(0.E0,-1.E0,0.E0)); #8227=DIRECTION('',(1.E0,0.E0,0.E0)); #8228=AXIS2_PLACEMENT_3D('',#8225,#8226,#8227); #8229=CYLINDRICAL_SURFACE('',#8228,1.925E-1); #8230=ORIENTED_EDGE('',*,*,#8218,.T.); #8232=ORIENTED_EDGE('',*,*,#8231,.T.); #8233=ORIENTED_EDGE('',*,*,#5602,.F.); #8235=ORIENTED_EDGE('',*,*,#8234,.F.); #8236=EDGE_LOOP('',(#8230,#8232,#8233,#8235)); #8237=FACE_OUTER_BOUND('',#8236,.F.); #8238=ADVANCED_FACE('',(#8237),#8229,.F.); #8239=CARTESIAN_POINT('',(2.2875E1,1.5E0,6.E0)); #8240=DIRECTION('',(0.E0,-1.E0,0.E0)); #8241=DIRECTION('',(1.E0,0.E0,0.E0)); #8242=AXIS2_PLACEMENT_3D('',#8239,#8240,#8241); #8243=CYLINDRICAL_SURFACE('',#8242,1.925E-1); #8244=ORIENTED_EDGE('',*,*,#8220,.T.); #8245=ORIENTED_EDGE('',*,*,#8234,.T.); #8246=ORIENTED_EDGE('',*,*,#5604,.F.); #8247=ORIENTED_EDGE('',*,*,#8231,.F.); #8248=EDGE_LOOP('',(#8244,#8245,#8246,#8247)); #8249=FACE_OUTER_BOUND('',#8248,.F.); #8250=ADVANCED_FACE('',(#8249),#8243,.F.); #8251=CARTESIAN_POINT('',(2.2875E1,1.5E0,1.8E1)); #8252=DIRECTION('',(0.E0,-1.E0,0.E0)); #8253=DIRECTION('',(1.E0,0.E0,0.E0)); #8254=AXIS2_PLACEMENT_3D('',#8251,#8252,#8253); #8255=CYLINDRICAL_SURFACE('',#8254,2.575E-1); #8256=ORIENTED_EDGE('',*,*,#6370,.T.); #8258=ORIENTED_EDGE('',*,*,#8257,.T.); #8260=ORIENTED_EDGE('',*,*,#8259,.F.); #8262=ORIENTED_EDGE('',*,*,#8261,.F.); #8263=EDGE_LOOP('',(#8256,#8258,#8260,#8262)); #8264=FACE_OUTER_BOUND('',#8263,.F.); #8265=ADVANCED_FACE('',(#8264),#8255,.F.); #8266=CARTESIAN_POINT('',(2.2875E1,1.5E0,1.8E1)); #8267=DIRECTION('',(0.E0,-1.E0,0.E0)); #8268=DIRECTION('',(1.E0,0.E0,0.E0)); #8269=AXIS2_PLACEMENT_3D('',#8266,#8267,#8268); #8270=CYLINDRICAL_SURFACE('',#8269,2.575E-1); #8271=ORIENTED_EDGE('',*,*,#6372,.T.); #8272=ORIENTED_EDGE('',*,*,#8261,.T.); #8274=ORIENTED_EDGE('',*,*,#8273,.F.); #8275=ORIENTED_EDGE('',*,*,#8257,.F.); #8276=EDGE_LOOP('',(#8271,#8272,#8274,#8275)); #8277=FACE_OUTER_BOUND('',#8276,.F.); #8278=ADVANCED_FACE('',(#8277),#8270,.F.); #8279=CARTESIAN_POINT('',(2.2875E1,1.E0,1.8E1)); #8280=DIRECTION('',(0.E0,-1.E0,0.E0)); #8281=DIRECTION('',(1.E0,0.E0,0.E0)); #8282=AXIS2_PLACEMENT_3D('',#8279,#8280,#8281); #8283=PLANE('',#8282); #8284=ORIENTED_EDGE('',*,*,#8259,.T.); #8285=ORIENTED_EDGE('',*,*,#8273,.T.); #8286=EDGE_LOOP('',(#8284,#8285)); #8287=FACE_OUTER_BOUND('',#8286,.F.); #8289=ORIENTED_EDGE('',*,*,#8288,.F.); #8291=ORIENTED_EDGE('',*,*,#8290,.F.); #8292=EDGE_LOOP('',(#8289,#8291)); #8293=FACE_BOUND('',#8292,.F.); #8294=ADVANCED_FACE('',(#8287,#8293),#8283,.F.); #8295=CARTESIAN_POINT('',(2.2875E1,1.5E0,1.8E1)); #8296=DIRECTION('',(0.E0,-1.E0,0.E0)); #8297=DIRECTION('',(1.E0,0.E0,0.E0)); #8298=AXIS2_PLACEMENT_3D('',#8295,#8296,#8297); #8299=CYLINDRICAL_SURFACE('',#8298,1.925E-1); #8300=ORIENTED_EDGE('',*,*,#8288,.T.); #8302=ORIENTED_EDGE('',*,*,#8301,.T.); #8303=ORIENTED_EDGE('',*,*,#5590,.F.); #8305=ORIENTED_EDGE('',*,*,#8304,.F.); #8306=EDGE_LOOP('',(#8300,#8302,#8303,#8305)); #8307=FACE_OUTER_BOUND('',#8306,.F.); #8308=ADVANCED_FACE('',(#8307),#8299,.F.); #8309=CARTESIAN_POINT('',(2.2875E1,1.5E0,1.8E1)); #8310=DIRECTION('',(0.E0,-1.E0,0.E0)); #8311=DIRECTION('',(1.E0,0.E0,0.E0)); #8312=AXIS2_PLACEMENT_3D('',#8309,#8310,#8311); #8313=CYLINDRICAL_SURFACE('',#8312,1.925E-1); #8314=ORIENTED_EDGE('',*,*,#8290,.T.); #8315=ORIENTED_EDGE('',*,*,#8304,.T.); #8316=ORIENTED_EDGE('',*,*,#5592,.F.); #8317=ORIENTED_EDGE('',*,*,#8301,.F.); #8318=EDGE_LOOP('',(#8314,#8315,#8316,#8317)); #8319=FACE_OUTER_BOUND('',#8318,.F.); #8320=ADVANCED_FACE('',(#8319),#8313,.F.); #8321=CARTESIAN_POINT('',(2.2875E1,1.5E0,2.4E1)); #8322=DIRECTION('',(0.E0,-1.E0,0.E0)); #8323=DIRECTION('',(1.E0,0.E0,0.E0)); #8324=AXIS2_PLACEMENT_3D('',#8321,#8322,#8323); #8325=CYLINDRICAL_SURFACE('',#8324,2.575E-1); #8326=ORIENTED_EDGE('',*,*,#6376,.T.); #8328=ORIENTED_EDGE('',*,*,#8327,.T.); #8330=ORIENTED_EDGE('',*,*,#8329,.F.); #8332=ORIENTED_EDGE('',*,*,#8331,.F.); #8333=EDGE_LOOP('',(#8326,#8328,#8330,#8332)); #8334=FACE_OUTER_BOUND('',#8333,.F.); #8335=ADVANCED_FACE('',(#8334),#8325,.F.); #8336=CARTESIAN_POINT('',(2.2875E1,1.5E0,2.4E1)); #8337=DIRECTION('',(0.E0,-1.E0,0.E0)); #8338=DIRECTION('',(1.E0,0.E0,0.E0)); #8339=AXIS2_PLACEMENT_3D('',#8336,#8337,#8338); #8340=CYLINDRICAL_SURFACE('',#8339,2.575E-1); #8341=ORIENTED_EDGE('',*,*,#6378,.T.); #8342=ORIENTED_EDGE('',*,*,#8331,.T.); #8344=ORIENTED_EDGE('',*,*,#8343,.F.); #8345=ORIENTED_EDGE('',*,*,#8327,.F.); #8346=EDGE_LOOP('',(#8341,#8342,#8344,#8345)); #8347=FACE_OUTER_BOUND('',#8346,.F.); #8348=ADVANCED_FACE('',(#8347),#8340,.F.); #8349=CARTESIAN_POINT('',(2.2875E1,1.E0,2.4E1)); #8350=DIRECTION('',(0.E0,-1.E0,0.E0)); #8351=DIRECTION('',(1.E0,0.E0,0.E0)); #8352=AXIS2_PLACEMENT_3D('',#8349,#8350,#8351); #8353=PLANE('',#8352); #8354=ORIENTED_EDGE('',*,*,#8329,.T.); #8355=ORIENTED_EDGE('',*,*,#8343,.T.); #8356=EDGE_LOOP('',(#8354,#8355)); #8357=FACE_OUTER_BOUND('',#8356,.F.); #8359=ORIENTED_EDGE('',*,*,#8358,.F.); #8361=ORIENTED_EDGE('',*,*,#8360,.F.); #8362=EDGE_LOOP('',(#8359,#8361)); #8363=FACE_BOUND('',#8362,.F.); #8364=ADVANCED_FACE('',(#8357,#8363),#8353,.F.); #8365=CARTESIAN_POINT('',(2.2875E1,1.5E0,2.4E1)); #8366=DIRECTION('',(0.E0,-1.E0,0.E0)); #8367=DIRECTION('',(1.E0,0.E0,0.E0)); #8368=AXIS2_PLACEMENT_3D('',#8365,#8366,#8367); #8369=CYLINDRICAL_SURFACE('',#8368,1.925E-1); #8370=ORIENTED_EDGE('',*,*,#8358,.T.); #8372=ORIENTED_EDGE('',*,*,#8371,.T.); #8373=ORIENTED_EDGE('',*,*,#5584,.F.); #8375=ORIENTED_EDGE('',*,*,#8374,.F.); #8376=EDGE_LOOP('',(#8370,#8372,#8373,#8375)); #8377=FACE_OUTER_BOUND('',#8376,.F.); #8378=ADVANCED_FACE('',(#8377),#8369,.F.); #8379=CARTESIAN_POINT('',(2.2875E1,1.5E0,2.4E1)); #8380=DIRECTION('',(0.E0,-1.E0,0.E0)); #8381=DIRECTION('',(1.E0,0.E0,0.E0)); #8382=AXIS2_PLACEMENT_3D('',#8379,#8380,#8381); #8383=CYLINDRICAL_SURFACE('',#8382,1.925E-1); #8384=ORIENTED_EDGE('',*,*,#8360,.T.); #8385=ORIENTED_EDGE('',*,*,#8374,.T.); #8386=ORIENTED_EDGE('',*,*,#5586,.F.); #8387=ORIENTED_EDGE('',*,*,#8371,.F.); #8388=EDGE_LOOP('',(#8384,#8385,#8386,#8387)); #8389=FACE_OUTER_BOUND('',#8388,.F.); #8390=ADVANCED_FACE('',(#8389),#8383,.F.); #8391=CARTESIAN_POINT('',(6.E0,1.5E0,1.25E0)); #8392=DIRECTION('',(0.E0,-1.E0,0.E0)); #8393=DIRECTION('',(1.E0,0.E0,0.E0)); #8394=AXIS2_PLACEMENT_3D('',#8391,#8392,#8393); #8395=CYLINDRICAL_SURFACE('',#8394,2.56E-1); #8396=ORIENTED_EDGE('',*,*,#6260,.T.); #8398=ORIENTED_EDGE('',*,*,#8397,.T.); #8400=ORIENTED_EDGE('',*,*,#8399,.F.); #8402=ORIENTED_EDGE('',*,*,#8401,.F.); #8403=EDGE_LOOP('',(#8396,#8398,#8400,#8402)); #8404=FACE_OUTER_BOUND('',#8403,.F.); #8405=ADVANCED_FACE('',(#8404),#8395,.F.); #8406=CARTESIAN_POINT('',(6.E0,1.5E0,1.25E0)); #8407=DIRECTION('',(0.E0,-1.E0,0.E0)); #8408=DIRECTION('',(1.E0,0.E0,0.E0)); #8409=AXIS2_PLACEMENT_3D('',#8406,#8407,#8408); #8410=CYLINDRICAL_SURFACE('',#8409,2.56E-1); #8411=ORIENTED_EDGE('',*,*,#6262,.T.); #8412=ORIENTED_EDGE('',*,*,#8401,.T.); #8414=ORIENTED_EDGE('',*,*,#8413,.F.); #8415=ORIENTED_EDGE('',*,*,#8397,.F.); #8416=EDGE_LOOP('',(#8411,#8412,#8414,#8415)); #8417=FACE_OUTER_BOUND('',#8416,.F.); #8418=ADVANCED_FACE('',(#8417),#8410,.F.); #8419=CARTESIAN_POINT('',(6.E0,1.E0,1.25E0)); #8420=DIRECTION('',(0.E0,-1.E0,0.E0)); #8421=DIRECTION('',(1.E0,0.E0,0.E0)); #8422=AXIS2_PLACEMENT_3D('',#8419,#8420,#8421); #8423=PLANE('',#8422); #8424=ORIENTED_EDGE('',*,*,#8399,.T.); #8425=ORIENTED_EDGE('',*,*,#8413,.T.); #8426=EDGE_LOOP('',(#8424,#8425)); #8427=FACE_OUTER_BOUND('',#8426,.F.); #8429=ORIENTED_EDGE('',*,*,#8428,.F.); #8431=ORIENTED_EDGE('',*,*,#8430,.F.); #8432=EDGE_LOOP('',(#8429,#8431)); #8433=FACE_BOUND('',#8432,.F.); #8434=ADVANCED_FACE('',(#8427,#8433),#8423,.F.); #8435=CARTESIAN_POINT('',(6.E0,1.5E0,1.25E0)); #8436=DIRECTION('',(0.E0,-1.E0,0.E0)); #8437=DIRECTION('',(1.E0,0.E0,0.E0)); #8438=AXIS2_PLACEMENT_3D('',#8435,#8436,#8437); #8439=CYLINDRICAL_SURFACE('',#8438,1.925E-1); #8440=ORIENTED_EDGE('',*,*,#8428,.T.); #8442=ORIENTED_EDGE('',*,*,#8441,.T.); #8443=ORIENTED_EDGE('',*,*,#5632,.F.); #8445=ORIENTED_EDGE('',*,*,#8444,.F.); #8446=EDGE_LOOP('',(#8440,#8442,#8443,#8445)); #8447=FACE_OUTER_BOUND('',#8446,.F.); #8448=ADVANCED_FACE('',(#8447),#8439,.F.); #8449=CARTESIAN_POINT('',(6.E0,1.5E0,1.25E0)); #8450=DIRECTION('',(0.E0,-1.E0,0.E0)); #8451=DIRECTION('',(1.E0,0.E0,0.E0)); #8452=AXIS2_PLACEMENT_3D('',#8449,#8450,#8451); #8453=CYLINDRICAL_SURFACE('',#8452,1.925E-1); #8454=ORIENTED_EDGE('',*,*,#8430,.T.); #8455=ORIENTED_EDGE('',*,*,#8444,.T.); #8456=ORIENTED_EDGE('',*,*,#5634,.F.); #8457=ORIENTED_EDGE('',*,*,#8441,.F.); #8458=EDGE_LOOP('',(#8454,#8455,#8456,#8457)); #8459=FACE_OUTER_BOUND('',#8458,.F.); #8460=ADVANCED_FACE('',(#8459),#8453,.F.); #8461=CARTESIAN_POINT('',(1.2E1,1.5E0,1.25E0)); #8462=DIRECTION('',(0.E0,-1.E0,0.E0)); #8463=DIRECTION('',(1.E0,0.E0,0.E0)); #8464=AXIS2_PLACEMENT_3D('',#8461,#8462,#8463); #8465=CYLINDRICAL_SURFACE('',#8464,2.56E-1); #8466=ORIENTED_EDGE('',*,*,#6266,.T.); #8468=ORIENTED_EDGE('',*,*,#8467,.T.); #8470=ORIENTED_EDGE('',*,*,#8469,.F.); #8472=ORIENTED_EDGE('',*,*,#8471,.F.); #8473=EDGE_LOOP('',(#8466,#8468,#8470,#8472)); #8474=FACE_OUTER_BOUND('',#8473,.F.); #8475=ADVANCED_FACE('',(#8474),#8465,.F.); #8476=CARTESIAN_POINT('',(1.2E1,1.5E0,1.25E0)); #8477=DIRECTION('',(0.E0,-1.E0,0.E0)); #8478=DIRECTION('',(1.E0,0.E0,0.E0)); #8479=AXIS2_PLACEMENT_3D('',#8476,#8477,#8478); #8480=CYLINDRICAL_SURFACE('',#8479,2.56E-1); #8481=ORIENTED_EDGE('',*,*,#6268,.T.); #8482=ORIENTED_EDGE('',*,*,#8471,.T.); #8484=ORIENTED_EDGE('',*,*,#8483,.F.); #8485=ORIENTED_EDGE('',*,*,#8467,.F.); #8486=EDGE_LOOP('',(#8481,#8482,#8484,#8485)); #8487=FACE_OUTER_BOUND('',#8486,.F.); #8488=ADVANCED_FACE('',(#8487),#8480,.F.); #8489=CARTESIAN_POINT('',(1.2E1,1.E0,1.25E0)); #8490=DIRECTION('',(0.E0,-1.E0,0.E0)); #8491=DIRECTION('',(1.E0,0.E0,0.E0)); #8492=AXIS2_PLACEMENT_3D('',#8489,#8490,#8491); #8493=PLANE('',#8492); #8494=ORIENTED_EDGE('',*,*,#8469,.T.); #8495=ORIENTED_EDGE('',*,*,#8483,.T.); #8496=EDGE_LOOP('',(#8494,#8495)); #8497=FACE_OUTER_BOUND('',#8496,.F.); #8499=ORIENTED_EDGE('',*,*,#8498,.F.); #8501=ORIENTED_EDGE('',*,*,#8500,.F.); #8502=EDGE_LOOP('',(#8499,#8501)); #8503=FACE_BOUND('',#8502,.F.); #8504=ADVANCED_FACE('',(#8497,#8503),#8493,.F.); #8505=CARTESIAN_POINT('',(1.2E1,1.5E0,1.25E0)); #8506=DIRECTION('',(0.E0,-1.E0,0.E0)); #8507=DIRECTION('',(1.E0,0.E0,0.E0)); #8508=AXIS2_PLACEMENT_3D('',#8505,#8506,#8507); #8509=CYLINDRICAL_SURFACE('',#8508,1.925E-1); #8510=ORIENTED_EDGE('',*,*,#8498,.T.); #8512=ORIENTED_EDGE('',*,*,#8511,.T.); #8513=ORIENTED_EDGE('',*,*,#5578,.F.); #8515=ORIENTED_EDGE('',*,*,#8514,.F.); #8516=EDGE_LOOP('',(#8510,#8512,#8513,#8515)); #8517=FACE_OUTER_BOUND('',#8516,.F.); #8518=ADVANCED_FACE('',(#8517),#8509,.F.); #8519=CARTESIAN_POINT('',(1.2E1,1.5E0,1.25E0)); #8520=DIRECTION('',(0.E0,-1.E0,0.E0)); #8521=DIRECTION('',(1.E0,0.E0,0.E0)); #8522=AXIS2_PLACEMENT_3D('',#8519,#8520,#8521); #8523=CYLINDRICAL_SURFACE('',#8522,1.925E-1); #8524=ORIENTED_EDGE('',*,*,#8500,.T.); #8525=ORIENTED_EDGE('',*,*,#8514,.T.); #8526=ORIENTED_EDGE('',*,*,#5580,.F.); #8527=ORIENTED_EDGE('',*,*,#8511,.F.); #8528=EDGE_LOOP('',(#8524,#8525,#8526,#8527)); #8529=FACE_OUTER_BOUND('',#8528,.F.); #8530=ADVANCED_FACE('',(#8529),#8523,.F.); #8531=CARTESIAN_POINT('',(1.8E1,1.5E0,1.25E0)); #8532=DIRECTION('',(0.E0,-1.E0,0.E0)); #8533=DIRECTION('',(1.E0,0.E0,0.E0)); #8534=AXIS2_PLACEMENT_3D('',#8531,#8532,#8533); #8535=CYLINDRICAL_SURFACE('',#8534,2.56E-1); #8536=ORIENTED_EDGE('',*,*,#6272,.T.); #8538=ORIENTED_EDGE('',*,*,#8537,.T.); #8540=ORIENTED_EDGE('',*,*,#8539,.F.); #8542=ORIENTED_EDGE('',*,*,#8541,.F.); #8543=EDGE_LOOP('',(#8536,#8538,#8540,#8542)); #8544=FACE_OUTER_BOUND('',#8543,.F.); #8545=ADVANCED_FACE('',(#8544),#8535,.F.); #8546=CARTESIAN_POINT('',(1.8E1,1.5E0,1.25E0)); #8547=DIRECTION('',(0.E0,-1.E0,0.E0)); #8548=DIRECTION('',(1.E0,0.E0,0.E0)); #8549=AXIS2_PLACEMENT_3D('',#8546,#8547,#8548); #8550=CYLINDRICAL_SURFACE('',#8549,2.56E-1); #8551=ORIENTED_EDGE('',*,*,#6274,.T.); #8552=ORIENTED_EDGE('',*,*,#8541,.T.); #8554=ORIENTED_EDGE('',*,*,#8553,.F.); #8555=ORIENTED_EDGE('',*,*,#8537,.F.); #8556=EDGE_LOOP('',(#8551,#8552,#8554,#8555)); #8557=FACE_OUTER_BOUND('',#8556,.F.); #8558=ADVANCED_FACE('',(#8557),#8550,.F.); #8559=CARTESIAN_POINT('',(1.8E1,1.E0,1.25E0)); #8560=DIRECTION('',(0.E0,-1.E0,0.E0)); #8561=DIRECTION('',(1.E0,0.E0,0.E0)); #8562=AXIS2_PLACEMENT_3D('',#8559,#8560,#8561); #8563=PLANE('',#8562); #8564=ORIENTED_EDGE('',*,*,#8539,.T.); #8565=ORIENTED_EDGE('',*,*,#8553,.T.); #8566=EDGE_LOOP('',(#8564,#8565)); #8567=FACE_OUTER_BOUND('',#8566,.F.); #8569=ORIENTED_EDGE('',*,*,#8568,.F.); #8571=ORIENTED_EDGE('',*,*,#8570,.F.); #8572=EDGE_LOOP('',(#8569,#8571)); #8573=FACE_BOUND('',#8572,.F.); #8574=ADVANCED_FACE('',(#8567,#8573),#8563,.F.); #8575=CARTESIAN_POINT('',(1.8E1,1.5E0,1.25E0)); #8576=DIRECTION('',(0.E0,-1.E0,0.E0)); #8577=DIRECTION('',(1.E0,0.E0,0.E0)); #8578=AXIS2_PLACEMENT_3D('',#8575,#8576,#8577); #8579=CYLINDRICAL_SURFACE('',#8578,1.925E-1); #8580=ORIENTED_EDGE('',*,*,#8568,.T.); #8582=ORIENTED_EDGE('',*,*,#8581,.T.); #8583=ORIENTED_EDGE('',*,*,#5560,.F.); #8585=ORIENTED_EDGE('',*,*,#8584,.F.); #8586=EDGE_LOOP('',(#8580,#8582,#8583,#8585)); #8587=FACE_OUTER_BOUND('',#8586,.F.); #8588=ADVANCED_FACE('',(#8587),#8579,.F.); #8589=CARTESIAN_POINT('',(1.8E1,1.5E0,1.25E0)); #8590=DIRECTION('',(0.E0,-1.E0,0.E0)); #8591=DIRECTION('',(1.E0,0.E0,0.E0)); #8592=AXIS2_PLACEMENT_3D('',#8589,#8590,#8591); #8593=CYLINDRICAL_SURFACE('',#8592,1.925E-1); #8594=ORIENTED_EDGE('',*,*,#8570,.T.); #8595=ORIENTED_EDGE('',*,*,#8584,.T.); #8596=ORIENTED_EDGE('',*,*,#5562,.F.); #8597=ORIENTED_EDGE('',*,*,#8581,.F.); #8598=EDGE_LOOP('',(#8594,#8595,#8596,#8597)); #8599=FACE_OUTER_BOUND('',#8598,.F.); #8600=ADVANCED_FACE('',(#8599),#8593,.F.); #8601=CARTESIAN_POINT('',(6.E0,1.5E0,3.075E1)); #8602=DIRECTION('',(0.E0,-1.E0,0.E0)); #8603=DIRECTION('',(1.E0,0.E0,0.E0)); #8604=AXIS2_PLACEMENT_3D('',#8601,#8602,#8603); #8605=CYLINDRICAL_SURFACE('',#8604,2.56E-1); #8606=ORIENTED_EDGE('',*,*,#6382,.T.); #8608=ORIENTED_EDGE('',*,*,#8607,.T.); #8610=ORIENTED_EDGE('',*,*,#8609,.F.); #8612=ORIENTED_EDGE('',*,*,#8611,.F.); #8613=EDGE_LOOP('',(#8606,#8608,#8610,#8612)); #8614=FACE_OUTER_BOUND('',#8613,.F.); #8615=ADVANCED_FACE('',(#8614),#8605,.F.); #8616=CARTESIAN_POINT('',(6.E0,1.5E0,3.075E1)); #8617=DIRECTION('',(0.E0,-1.E0,0.E0)); #8618=DIRECTION('',(1.E0,0.E0,0.E0)); #8619=AXIS2_PLACEMENT_3D('',#8616,#8617,#8618); #8620=CYLINDRICAL_SURFACE('',#8619,2.56E-1); #8621=ORIENTED_EDGE('',*,*,#6384,.T.); #8622=ORIENTED_EDGE('',*,*,#8611,.T.); #8624=ORIENTED_EDGE('',*,*,#8623,.F.); #8625=ORIENTED_EDGE('',*,*,#8607,.F.); #8626=EDGE_LOOP('',(#8621,#8622,#8624,#8625)); #8627=FACE_OUTER_BOUND('',#8626,.F.); #8628=ADVANCED_FACE('',(#8627),#8620,.F.); #8629=CARTESIAN_POINT('',(6.E0,1.E0,3.075E1)); #8630=DIRECTION('',(0.E0,-1.E0,0.E0)); #8631=DIRECTION('',(1.E0,0.E0,0.E0)); #8632=AXIS2_PLACEMENT_3D('',#8629,#8630,#8631); #8633=PLANE('',#8632); #8634=ORIENTED_EDGE('',*,*,#8609,.T.); #8635=ORIENTED_EDGE('',*,*,#8623,.T.); #8636=EDGE_LOOP('',(#8634,#8635)); #8637=FACE_OUTER_BOUND('',#8636,.F.); #8639=ORIENTED_EDGE('',*,*,#8638,.F.); #8641=ORIENTED_EDGE('',*,*,#8640,.F.); #8642=EDGE_LOOP('',(#8639,#8641)); #8643=FACE_BOUND('',#8642,.F.); #8644=ADVANCED_FACE('',(#8637,#8643),#8633,.F.); #8645=CARTESIAN_POINT('',(6.E0,1.5E0,3.075E1)); #8646=DIRECTION('',(0.E0,-1.E0,0.E0)); #8647=DIRECTION('',(1.E0,0.E0,0.E0)); #8648=AXIS2_PLACEMENT_3D('',#8645,#8646,#8647); #8649=CYLINDRICAL_SURFACE('',#8648,1.925E-1); #8650=ORIENTED_EDGE('',*,*,#8638,.T.); #8652=ORIENTED_EDGE('',*,*,#8651,.T.); #8653=ORIENTED_EDGE('',*,*,#5572,.F.); #8655=ORIENTED_EDGE('',*,*,#8654,.F.); #8656=EDGE_LOOP('',(#8650,#8652,#8653,#8655)); #8657=FACE_OUTER_BOUND('',#8656,.F.); #8658=ADVANCED_FACE('',(#8657),#8649,.F.); #8659=CARTESIAN_POINT('',(6.E0,1.5E0,3.075E1)); #8660=DIRECTION('',(0.E0,-1.E0,0.E0)); #8661=DIRECTION('',(1.E0,0.E0,0.E0)); #8662=AXIS2_PLACEMENT_3D('',#8659,#8660,#8661); #8663=CYLINDRICAL_SURFACE('',#8662,1.925E-1); #8664=ORIENTED_EDGE('',*,*,#8640,.T.); #8665=ORIENTED_EDGE('',*,*,#8654,.T.); #8666=ORIENTED_EDGE('',*,*,#5574,.F.); #8667=ORIENTED_EDGE('',*,*,#8651,.F.); #8668=EDGE_LOOP('',(#8664,#8665,#8666,#8667)); #8669=FACE_OUTER_BOUND('',#8668,.F.); #8670=ADVANCED_FACE('',(#8669),#8663,.F.); #8671=CARTESIAN_POINT('',(1.2E1,1.5E0,3.075E1)); #8672=DIRECTION('',(0.E0,-1.E0,0.E0)); #8673=DIRECTION('',(1.E0,0.E0,0.E0)); #8674=AXIS2_PLACEMENT_3D('',#8671,#8672,#8673); #8675=CYLINDRICAL_SURFACE('',#8674,2.56E-1); #8676=ORIENTED_EDGE('',*,*,#6388,.T.); #8678=ORIENTED_EDGE('',*,*,#8677,.T.); #8680=ORIENTED_EDGE('',*,*,#8679,.F.); #8682=ORIENTED_EDGE('',*,*,#8681,.F.); #8683=EDGE_LOOP('',(#8676,#8678,#8680,#8682)); #8684=FACE_OUTER_BOUND('',#8683,.F.); #8685=ADVANCED_FACE('',(#8684),#8675,.F.); #8686=CARTESIAN_POINT('',(1.2E1,1.5E0,3.075E1)); #8687=DIRECTION('',(0.E0,-1.E0,0.E0)); #8688=DIRECTION('',(1.E0,0.E0,0.E0)); #8689=AXIS2_PLACEMENT_3D('',#8686,#8687,#8688); #8690=CYLINDRICAL_SURFACE('',#8689,2.56E-1); #8691=ORIENTED_EDGE('',*,*,#6390,.T.); #8692=ORIENTED_EDGE('',*,*,#8681,.T.); #8694=ORIENTED_EDGE('',*,*,#8693,.F.); #8695=ORIENTED_EDGE('',*,*,#8677,.F.); #8696=EDGE_LOOP('',(#8691,#8692,#8694,#8695)); #8697=FACE_OUTER_BOUND('',#8696,.F.); #8698=ADVANCED_FACE('',(#8697),#8690,.F.); #8699=CARTESIAN_POINT('',(1.2E1,1.E0,3.075E1)); #8700=DIRECTION('',(0.E0,-1.E0,0.E0)); #8701=DIRECTION('',(1.E0,0.E0,0.E0)); #8702=AXIS2_PLACEMENT_3D('',#8699,#8700,#8701); #8703=PLANE('',#8702); #8704=ORIENTED_EDGE('',*,*,#8679,.T.); #8705=ORIENTED_EDGE('',*,*,#8693,.T.); #8706=EDGE_LOOP('',(#8704,#8705)); #8707=FACE_OUTER_BOUND('',#8706,.F.); #8709=ORIENTED_EDGE('',*,*,#8708,.F.); #8711=ORIENTED_EDGE('',*,*,#8710,.F.); #8712=EDGE_LOOP('',(#8709,#8711)); #8713=FACE_BOUND('',#8712,.F.); #8714=ADVANCED_FACE('',(#8707,#8713),#8703,.F.); #8715=CARTESIAN_POINT('',(1.2E1,1.5E0,3.075E1)); #8716=DIRECTION('',(0.E0,-1.E0,0.E0)); #8717=DIRECTION('',(1.E0,0.E0,0.E0)); #8718=AXIS2_PLACEMENT_3D('',#8715,#8716,#8717); #8719=CYLINDRICAL_SURFACE('',#8718,1.925E-1); #8720=ORIENTED_EDGE('',*,*,#8708,.T.); #8722=ORIENTED_EDGE('',*,*,#8721,.T.); #8723=ORIENTED_EDGE('',*,*,#5566,.F.); #8725=ORIENTED_EDGE('',*,*,#8724,.F.); #8726=EDGE_LOOP('',(#8720,#8722,#8723,#8725)); #8727=FACE_OUTER_BOUND('',#8726,.F.); #8728=ADVANCED_FACE('',(#8727),#8719,.F.); #8729=CARTESIAN_POINT('',(1.2E1,1.5E0,3.075E1)); #8730=DIRECTION('',(0.E0,-1.E0,0.E0)); #8731=DIRECTION('',(1.E0,0.E0,0.E0)); #8732=AXIS2_PLACEMENT_3D('',#8729,#8730,#8731); #8733=CYLINDRICAL_SURFACE('',#8732,1.925E-1); #8734=ORIENTED_EDGE('',*,*,#8710,.T.); #8735=ORIENTED_EDGE('',*,*,#8724,.T.); #8736=ORIENTED_EDGE('',*,*,#5568,.F.); #8737=ORIENTED_EDGE('',*,*,#8721,.F.); #8738=EDGE_LOOP('',(#8734,#8735,#8736,#8737)); #8739=FACE_OUTER_BOUND('',#8738,.F.); #8740=ADVANCED_FACE('',(#8739),#8733,.F.); #8741=CARTESIAN_POINT('',(1.8E1,1.5E0,3.075E1)); #8742=DIRECTION('',(0.E0,-1.E0,0.E0)); #8743=DIRECTION('',(1.E0,0.E0,0.E0)); #8744=AXIS2_PLACEMENT_3D('',#8741,#8742,#8743); #8745=CYLINDRICAL_SURFACE('',#8744,2.56E-1); #8746=ORIENTED_EDGE('',*,*,#6394,.T.); #8748=ORIENTED_EDGE('',*,*,#8747,.T.); #8750=ORIENTED_EDGE('',*,*,#8749,.F.); #8752=ORIENTED_EDGE('',*,*,#8751,.F.); #8753=EDGE_LOOP('',(#8746,#8748,#8750,#8752)); #8754=FACE_OUTER_BOUND('',#8753,.F.); #8755=ADVANCED_FACE('',(#8754),#8745,.F.); #8756=CARTESIAN_POINT('',(1.8E1,1.5E0,3.075E1)); #8757=DIRECTION('',(0.E0,-1.E0,0.E0)); #8758=DIRECTION('',(1.E0,0.E0,0.E0)); #8759=AXIS2_PLACEMENT_3D('',#8756,#8757,#8758); #8760=CYLINDRICAL_SURFACE('',#8759,2.56E-1); #8761=ORIENTED_EDGE('',*,*,#6396,.T.); #8762=ORIENTED_EDGE('',*,*,#8751,.T.); #8764=ORIENTED_EDGE('',*,*,#8763,.F.); #8765=ORIENTED_EDGE('',*,*,#8747,.F.); #8766=EDGE_LOOP('',(#8761,#8762,#8764,#8765)); #8767=FACE_OUTER_BOUND('',#8766,.F.); #8768=ADVANCED_FACE('',(#8767),#8760,.F.); #8769=CARTESIAN_POINT('',(1.8E1,1.E0,3.075E1)); #8770=DIRECTION('',(0.E0,-1.E0,0.E0)); #8771=DIRECTION('',(1.E0,0.E0,0.E0)); #8772=AXIS2_PLACEMENT_3D('',#8769,#8770,#8771); #8773=PLANE('',#8772); #8774=ORIENTED_EDGE('',*,*,#8749,.T.); #8775=ORIENTED_EDGE('',*,*,#8763,.T.); #8776=EDGE_LOOP('',(#8774,#8775)); #8777=FACE_OUTER_BOUND('',#8776,.F.); #8779=ORIENTED_EDGE('',*,*,#8778,.F.); #8781=ORIENTED_EDGE('',*,*,#8780,.F.); #8782=EDGE_LOOP('',(#8779,#8781)); #8783=FACE_BOUND('',#8782,.F.); #8784=ADVANCED_FACE('',(#8777,#8783),#8773,.F.); #8785=CARTESIAN_POINT('',(1.8E1,1.5E0,3.075E1)); #8786=DIRECTION('',(0.E0,-1.E0,0.E0)); #8787=DIRECTION('',(1.E0,0.E0,0.E0)); #8788=AXIS2_PLACEMENT_3D('',#8785,#8786,#8787); #8789=CYLINDRICAL_SURFACE('',#8788,1.925E-1); #8790=ORIENTED_EDGE('',*,*,#8778,.T.); #8792=ORIENTED_EDGE('',*,*,#8791,.T.); #8793=ORIENTED_EDGE('',*,*,#5554,.F.); #8795=ORIENTED_EDGE('',*,*,#8794,.F.); #8796=EDGE_LOOP('',(#8790,#8792,#8793,#8795)); #8797=FACE_OUTER_BOUND('',#8796,.F.); #8798=ADVANCED_FACE('',(#8797),#8789,.F.); #8799=CARTESIAN_POINT('',(1.8E1,1.5E0,3.075E1)); #8800=DIRECTION('',(0.E0,-1.E0,0.E0)); #8801=DIRECTION('',(1.E0,0.E0,0.E0)); #8802=AXIS2_PLACEMENT_3D('',#8799,#8800,#8801); #8803=CYLINDRICAL_SURFACE('',#8802,1.925E-1); #8804=ORIENTED_EDGE('',*,*,#8780,.T.); #8805=ORIENTED_EDGE('',*,*,#8794,.T.); #8806=ORIENTED_EDGE('',*,*,#5556,.F.); #8807=ORIENTED_EDGE('',*,*,#8791,.F.); #8808=EDGE_LOOP('',(#8804,#8805,#8806,#8807)); #8809=FACE_OUTER_BOUND('',#8808,.F.); #8810=ADVANCED_FACE('',(#8809),#8803,.F.); #8811=CARTESIAN_POINT('',(6.E0,1.5E0,9.E0)); #8812=DIRECTION('',(0.E0,-1.E0,0.E0)); #8813=DIRECTION('',(1.E0,0.E0,0.E0)); #8814=AXIS2_PLACEMENT_3D('',#8811,#8812,#8813); #8815=CYLINDRICAL_SURFACE('',#8814,2.575E-1); #8816=ORIENTED_EDGE('',*,*,#6452,.T.); #8818=ORIENTED_EDGE('',*,*,#8817,.T.); #8820=ORIENTED_EDGE('',*,*,#8819,.F.); #8822=ORIENTED_EDGE('',*,*,#8821,.F.); #8823=EDGE_LOOP('',(#8816,#8818,#8820,#8822)); #8824=FACE_OUTER_BOUND('',#8823,.F.); #8825=ADVANCED_FACE('',(#8824),#8815,.F.); #8826=CARTESIAN_POINT('',(6.E0,1.5E0,9.E0)); #8827=DIRECTION('',(0.E0,-1.E0,0.E0)); #8828=DIRECTION('',(1.E0,0.E0,0.E0)); #8829=AXIS2_PLACEMENT_3D('',#8826,#8827,#8828); #8830=CYLINDRICAL_SURFACE('',#8829,2.575E-1); #8831=ORIENTED_EDGE('',*,*,#6454,.T.); #8832=ORIENTED_EDGE('',*,*,#8821,.T.); #8834=ORIENTED_EDGE('',*,*,#8833,.F.); #8835=ORIENTED_EDGE('',*,*,#8817,.F.); #8836=EDGE_LOOP('',(#8831,#8832,#8834,#8835)); #8837=FACE_OUTER_BOUND('',#8836,.F.); #8838=ADVANCED_FACE('',(#8837),#8830,.F.); #8839=CARTESIAN_POINT('',(6.E0,1.E0,9.E0)); #8840=DIRECTION('',(0.E0,-1.E0,0.E0)); #8841=DIRECTION('',(1.E0,0.E0,0.E0)); #8842=AXIS2_PLACEMENT_3D('',#8839,#8840,#8841); #8843=PLANE('',#8842); #8844=ORIENTED_EDGE('',*,*,#8819,.T.); #8845=ORIENTED_EDGE('',*,*,#8833,.T.); #8846=EDGE_LOOP('',(#8844,#8845)); #8847=FACE_OUTER_BOUND('',#8846,.F.); #8849=ORIENTED_EDGE('',*,*,#8848,.F.); #8851=ORIENTED_EDGE('',*,*,#8850,.F.); #8852=EDGE_LOOP('',(#8849,#8851)); #8853=FACE_BOUND('',#8852,.F.); #8854=ADVANCED_FACE('',(#8847,#8853),#8843,.F.); #8855=CARTESIAN_POINT('',(6.E0,1.5E0,9.E0)); #8856=DIRECTION('',(0.E0,-1.E0,0.E0)); #8857=DIRECTION('',(1.E0,0.E0,0.E0)); #8858=AXIS2_PLACEMENT_3D('',#8855,#8856,#8857); #8859=CYLINDRICAL_SURFACE('',#8858,1.925E-1); #8860=ORIENTED_EDGE('',*,*,#8848,.T.); #8862=ORIENTED_EDGE('',*,*,#8861,.T.); #8863=ORIENTED_EDGE('',*,*,#5690,.F.); #8865=ORIENTED_EDGE('',*,*,#8864,.F.); #8866=EDGE_LOOP('',(#8860,#8862,#8863,#8865)); #8867=FACE_OUTER_BOUND('',#8866,.F.); #8868=ADVANCED_FACE('',(#8867),#8859,.F.); #8869=CARTESIAN_POINT('',(6.E0,1.5E0,9.E0)); #8870=DIRECTION('',(0.E0,-1.E0,0.E0)); #8871=DIRECTION('',(1.E0,0.E0,0.E0)); #8872=AXIS2_PLACEMENT_3D('',#8869,#8870,#8871); #8873=CYLINDRICAL_SURFACE('',#8872,1.925E-1); #8874=ORIENTED_EDGE('',*,*,#8850,.T.); #8875=ORIENTED_EDGE('',*,*,#8864,.T.); #8876=ORIENTED_EDGE('',*,*,#5692,.F.); #8877=ORIENTED_EDGE('',*,*,#8861,.F.); #8878=EDGE_LOOP('',(#8874,#8875,#8876,#8877)); #8879=FACE_OUTER_BOUND('',#8878,.F.); #8880=ADVANCED_FACE('',(#8879),#8873,.F.); #8881=CARTESIAN_POINT('',(1.2E1,1.5E0,9.E0)); #8882=DIRECTION('',(0.E0,-1.E0,0.E0)); #8883=DIRECTION('',(1.E0,0.E0,0.E0)); #8884=AXIS2_PLACEMENT_3D('',#8881,#8882,#8883); #8885=CYLINDRICAL_SURFACE('',#8884,2.575E-1); #8886=ORIENTED_EDGE('',*,*,#6458,.T.); #8888=ORIENTED_EDGE('',*,*,#8887,.T.); #8890=ORIENTED_EDGE('',*,*,#8889,.F.); #8892=ORIENTED_EDGE('',*,*,#8891,.F.); #8893=EDGE_LOOP('',(#8886,#8888,#8890,#8892)); #8894=FACE_OUTER_BOUND('',#8893,.F.); #8895=ADVANCED_FACE('',(#8894),#8885,.F.); #8896=CARTESIAN_POINT('',(1.2E1,1.5E0,9.E0)); #8897=DIRECTION('',(0.E0,-1.E0,0.E0)); #8898=DIRECTION('',(1.E0,0.E0,0.E0)); #8899=AXIS2_PLACEMENT_3D('',#8896,#8897,#8898); #8900=CYLINDRICAL_SURFACE('',#8899,2.575E-1); #8901=ORIENTED_EDGE('',*,*,#6460,.T.); #8902=ORIENTED_EDGE('',*,*,#8891,.T.); #8904=ORIENTED_EDGE('',*,*,#8903,.F.); #8905=ORIENTED_EDGE('',*,*,#8887,.F.); #8906=EDGE_LOOP('',(#8901,#8902,#8904,#8905)); #8907=FACE_OUTER_BOUND('',#8906,.F.); #8908=ADVANCED_FACE('',(#8907),#8900,.F.); #8909=CARTESIAN_POINT('',(1.2E1,1.E0,9.E0)); #8910=DIRECTION('',(0.E0,-1.E0,0.E0)); #8911=DIRECTION('',(1.E0,0.E0,0.E0)); #8912=AXIS2_PLACEMENT_3D('',#8909,#8910,#8911); #8913=PLANE('',#8912); #8914=ORIENTED_EDGE('',*,*,#8889,.T.); #8915=ORIENTED_EDGE('',*,*,#8903,.T.); #8916=EDGE_LOOP('',(#8914,#8915)); #8917=FACE_OUTER_BOUND('',#8916,.F.); #8919=ORIENTED_EDGE('',*,*,#8918,.F.); #8921=ORIENTED_EDGE('',*,*,#8920,.F.); #8922=EDGE_LOOP('',(#8919,#8921)); #8923=FACE_BOUND('',#8922,.F.); #8924=ADVANCED_FACE('',(#8917,#8923),#8913,.F.); #8925=CARTESIAN_POINT('',(1.2E1,1.5E0,9.E0)); #8926=DIRECTION('',(0.E0,-1.E0,0.E0)); #8927=DIRECTION('',(1.E0,0.E0,0.E0)); #8928=AXIS2_PLACEMENT_3D('',#8925,#8926,#8927); #8929=CYLINDRICAL_SURFACE('',#8928,1.925E-1); #8930=ORIENTED_EDGE('',*,*,#8918,.T.); #8932=ORIENTED_EDGE('',*,*,#8931,.T.); #8933=ORIENTED_EDGE('',*,*,#5696,.F.); #8935=ORIENTED_EDGE('',*,*,#8934,.F.); #8936=EDGE_LOOP('',(#8930,#8932,#8933,#8935)); #8937=FACE_OUTER_BOUND('',#8936,.F.); #8938=ADVANCED_FACE('',(#8937),#8929,.F.); #8939=CARTESIAN_POINT('',(1.2E1,1.5E0,9.E0)); #8940=DIRECTION('',(0.E0,-1.E0,0.E0)); #8941=DIRECTION('',(1.E0,0.E0,0.E0)); #8942=AXIS2_PLACEMENT_3D('',#8939,#8940,#8941); #8943=CYLINDRICAL_SURFACE('',#8942,1.925E-1); #8944=ORIENTED_EDGE('',*,*,#8920,.T.); #8945=ORIENTED_EDGE('',*,*,#8934,.T.); #8946=ORIENTED_EDGE('',*,*,#5698,.F.); #8947=ORIENTED_EDGE('',*,*,#8931,.F.); #8948=EDGE_LOOP('',(#8944,#8945,#8946,#8947)); #8949=FACE_OUTER_BOUND('',#8948,.F.); #8950=ADVANCED_FACE('',(#8949),#8943,.F.); #8951=CARTESIAN_POINT('',(1.8E1,1.5E0,9.E0)); #8952=DIRECTION('',(0.E0,-1.E0,0.E0)); #8953=DIRECTION('',(1.E0,0.E0,0.E0)); #8954=AXIS2_PLACEMENT_3D('',#8951,#8952,#8953); #8955=CYLINDRICAL_SURFACE('',#8954,2.575E-1); #8956=ORIENTED_EDGE('',*,*,#6464,.T.); #8958=ORIENTED_EDGE('',*,*,#8957,.T.); #8960=ORIENTED_EDGE('',*,*,#8959,.F.); #8962=ORIENTED_EDGE('',*,*,#8961,.F.); #8963=EDGE_LOOP('',(#8956,#8958,#8960,#8962)); #8964=FACE_OUTER_BOUND('',#8963,.F.); #8965=ADVANCED_FACE('',(#8964),#8955,.F.); #8966=CARTESIAN_POINT('',(1.8E1,1.5E0,9.E0)); #8967=DIRECTION('',(0.E0,-1.E0,0.E0)); #8968=DIRECTION('',(1.E0,0.E0,0.E0)); #8969=AXIS2_PLACEMENT_3D('',#8966,#8967,#8968); #8970=CYLINDRICAL_SURFACE('',#8969,2.575E-1); #8971=ORIENTED_EDGE('',*,*,#6466,.T.); #8972=ORIENTED_EDGE('',*,*,#8961,.T.); #8974=ORIENTED_EDGE('',*,*,#8973,.F.); #8975=ORIENTED_EDGE('',*,*,#8957,.F.); #8976=EDGE_LOOP('',(#8971,#8972,#8974,#8975)); #8977=FACE_OUTER_BOUND('',#8976,.F.); #8978=ADVANCED_FACE('',(#8977),#8970,.F.); #8979=CARTESIAN_POINT('',(1.8E1,1.E0,9.E0)); #8980=DIRECTION('',(0.E0,-1.E0,0.E0)); #8981=DIRECTION('',(1.E0,0.E0,0.E0)); #8982=AXIS2_PLACEMENT_3D('',#8979,#8980,#8981); #8983=PLANE('',#8982); #8984=ORIENTED_EDGE('',*,*,#8959,.T.); #8985=ORIENTED_EDGE('',*,*,#8973,.T.); #8986=EDGE_LOOP('',(#8984,#8985)); #8987=FACE_OUTER_BOUND('',#8986,.F.); #8989=ORIENTED_EDGE('',*,*,#8988,.F.); #8991=ORIENTED_EDGE('',*,*,#8990,.F.); #8992=EDGE_LOOP('',(#8989,#8991)); #8993=FACE_BOUND('',#8992,.F.); #8994=ADVANCED_FACE('',(#8987,#8993),#8983,.F.); #8995=CARTESIAN_POINT('',(1.8E1,1.5E0,9.E0)); #8996=DIRECTION('',(0.E0,-1.E0,0.E0)); #8997=DIRECTION('',(1.E0,0.E0,0.E0)); #8998=AXIS2_PLACEMENT_3D('',#8995,#8996,#8997); #8999=CYLINDRICAL_SURFACE('',#8998,1.925E-1); #9000=ORIENTED_EDGE('',*,*,#8988,.T.); #9002=ORIENTED_EDGE('',*,*,#9001,.T.); #9003=ORIENTED_EDGE('',*,*,#5702,.F.); #9005=ORIENTED_EDGE('',*,*,#9004,.F.); #9006=EDGE_LOOP('',(#9000,#9002,#9003,#9005)); #9007=FACE_OUTER_BOUND('',#9006,.F.); #9008=ADVANCED_FACE('',(#9007),#8999,.F.); #9009=CARTESIAN_POINT('',(1.8E1,1.5E0,9.E0)); #9010=DIRECTION('',(0.E0,-1.E0,0.E0)); #9011=DIRECTION('',(1.E0,0.E0,0.E0)); #9012=AXIS2_PLACEMENT_3D('',#9009,#9010,#9011); #9013=CYLINDRICAL_SURFACE('',#9012,1.925E-1); #9014=ORIENTED_EDGE('',*,*,#8990,.T.); #9015=ORIENTED_EDGE('',*,*,#9004,.T.); #9016=ORIENTED_EDGE('',*,*,#5704,.F.); #9017=ORIENTED_EDGE('',*,*,#9001,.F.); #9018=EDGE_LOOP('',(#9014,#9015,#9016,#9017)); #9019=FACE_OUTER_BOUND('',#9018,.F.); #9020=ADVANCED_FACE('',(#9019),#9013,.F.); #9021=CARTESIAN_POINT('',(6.E0,1.5E0,1.8E1)); #9022=DIRECTION('',(0.E0,-1.E0,0.E0)); #9023=DIRECTION('',(1.E0,0.E0,0.E0)); #9024=AXIS2_PLACEMENT_3D('',#9021,#9022,#9023); #9025=CYLINDRICAL_SURFACE('',#9024,2.575E-1); #9026=ORIENTED_EDGE('',*,*,#6470,.T.); #9028=ORIENTED_EDGE('',*,*,#9027,.T.); #9030=ORIENTED_EDGE('',*,*,#9029,.F.); #9032=ORIENTED_EDGE('',*,*,#9031,.F.); #9033=EDGE_LOOP('',(#9026,#9028,#9030,#9032)); #9034=FACE_OUTER_BOUND('',#9033,.F.); #9035=ADVANCED_FACE('',(#9034),#9025,.F.); #9036=CARTESIAN_POINT('',(6.E0,1.5E0,1.8E1)); #9037=DIRECTION('',(0.E0,-1.E0,0.E0)); #9038=DIRECTION('',(1.E0,0.E0,0.E0)); #9039=AXIS2_PLACEMENT_3D('',#9036,#9037,#9038); #9040=CYLINDRICAL_SURFACE('',#9039,2.575E-1); #9041=ORIENTED_EDGE('',*,*,#6472,.T.); #9042=ORIENTED_EDGE('',*,*,#9031,.T.); #9044=ORIENTED_EDGE('',*,*,#9043,.F.); #9045=ORIENTED_EDGE('',*,*,#9027,.F.); #9046=EDGE_LOOP('',(#9041,#9042,#9044,#9045)); #9047=FACE_OUTER_BOUND('',#9046,.F.); #9048=ADVANCED_FACE('',(#9047),#9040,.F.); #9049=CARTESIAN_POINT('',(6.E0,1.E0,1.8E1)); #9050=DIRECTION('',(0.E0,-1.E0,0.E0)); #9051=DIRECTION('',(1.E0,0.E0,0.E0)); #9052=AXIS2_PLACEMENT_3D('',#9049,#9050,#9051); #9053=PLANE('',#9052); #9054=ORIENTED_EDGE('',*,*,#9029,.T.); #9055=ORIENTED_EDGE('',*,*,#9043,.T.); #9056=EDGE_LOOP('',(#9054,#9055)); #9057=FACE_OUTER_BOUND('',#9056,.F.); #9059=ORIENTED_EDGE('',*,*,#9058,.F.); #9061=ORIENTED_EDGE('',*,*,#9060,.F.); #9062=EDGE_LOOP('',(#9059,#9061)); #9063=FACE_BOUND('',#9062,.F.); #9064=ADVANCED_FACE('',(#9057,#9063),#9053,.F.); #9065=CARTESIAN_POINT('',(6.E0,1.5E0,1.8E1)); #9066=DIRECTION('',(0.E0,-1.E0,0.E0)); #9067=DIRECTION('',(1.E0,0.E0,0.E0)); #9068=AXIS2_PLACEMENT_3D('',#9065,#9066,#9067); #9069=CYLINDRICAL_SURFACE('',#9068,1.925E-1); #9070=ORIENTED_EDGE('',*,*,#9058,.T.); #9072=ORIENTED_EDGE('',*,*,#9071,.T.); #9073=ORIENTED_EDGE('',*,*,#5708,.F.); #9075=ORIENTED_EDGE('',*,*,#9074,.F.); #9076=EDGE_LOOP('',(#9070,#9072,#9073,#9075)); #9077=FACE_OUTER_BOUND('',#9076,.F.); #9078=ADVANCED_FACE('',(#9077),#9069,.F.); #9079=CARTESIAN_POINT('',(6.E0,1.5E0,1.8E1)); #9080=DIRECTION('',(0.E0,-1.E0,0.E0)); #9081=DIRECTION('',(1.E0,0.E0,0.E0)); #9082=AXIS2_PLACEMENT_3D('',#9079,#9080,#9081); #9083=CYLINDRICAL_SURFACE('',#9082,1.925E-1); #9084=ORIENTED_EDGE('',*,*,#9060,.T.); #9085=ORIENTED_EDGE('',*,*,#9074,.T.); #9086=ORIENTED_EDGE('',*,*,#5710,.F.); #9087=ORIENTED_EDGE('',*,*,#9071,.F.); #9088=EDGE_LOOP('',(#9084,#9085,#9086,#9087)); #9089=FACE_OUTER_BOUND('',#9088,.F.); #9090=ADVANCED_FACE('',(#9089),#9083,.F.); #9091=CARTESIAN_POINT('',(1.2E1,1.5E0,1.8E1)); #9092=DIRECTION('',(0.E0,-1.E0,0.E0)); #9093=DIRECTION('',(1.E0,0.E0,0.E0)); #9094=AXIS2_PLACEMENT_3D('',#9091,#9092,#9093); #9095=CYLINDRICAL_SURFACE('',#9094,2.575E-1); #9096=ORIENTED_EDGE('',*,*,#6476,.T.); #9098=ORIENTED_EDGE('',*,*,#9097,.T.); #9100=ORIENTED_EDGE('',*,*,#9099,.F.); #9102=ORIENTED_EDGE('',*,*,#9101,.F.); #9103=EDGE_LOOP('',(#9096,#9098,#9100,#9102)); #9104=FACE_OUTER_BOUND('',#9103,.F.); #9105=ADVANCED_FACE('',(#9104),#9095,.F.); #9106=CARTESIAN_POINT('',(1.2E1,1.5E0,1.8E1)); #9107=DIRECTION('',(0.E0,-1.E0,0.E0)); #9108=DIRECTION('',(1.E0,0.E0,0.E0)); #9109=AXIS2_PLACEMENT_3D('',#9106,#9107,#9108); #9110=CYLINDRICAL_SURFACE('',#9109,2.575E-1); #9111=ORIENTED_EDGE('',*,*,#6478,.T.); #9112=ORIENTED_EDGE('',*,*,#9101,.T.); #9114=ORIENTED_EDGE('',*,*,#9113,.F.); #9115=ORIENTED_EDGE('',*,*,#9097,.F.); #9116=EDGE_LOOP('',(#9111,#9112,#9114,#9115)); #9117=FACE_OUTER_BOUND('',#9116,.F.); #9118=ADVANCED_FACE('',(#9117),#9110,.F.); #9119=CARTESIAN_POINT('',(1.2E1,1.E0,1.8E1)); #9120=DIRECTION('',(0.E0,-1.E0,0.E0)); #9121=DIRECTION('',(1.E0,0.E0,0.E0)); #9122=AXIS2_PLACEMENT_3D('',#9119,#9120,#9121); #9123=PLANE('',#9122); #9124=ORIENTED_EDGE('',*,*,#9099,.T.); #9125=ORIENTED_EDGE('',*,*,#9113,.T.); #9126=EDGE_LOOP('',(#9124,#9125)); #9127=FACE_OUTER_BOUND('',#9126,.F.); #9129=ORIENTED_EDGE('',*,*,#9128,.F.); #9131=ORIENTED_EDGE('',*,*,#9130,.F.); #9132=EDGE_LOOP('',(#9129,#9131)); #9133=FACE_BOUND('',#9132,.F.); #9134=ADVANCED_FACE('',(#9127,#9133),#9123,.F.); #9135=CARTESIAN_POINT('',(1.2E1,1.5E0,1.8E1)); #9136=DIRECTION('',(0.E0,-1.E0,0.E0)); #9137=DIRECTION('',(1.E0,0.E0,0.E0)); #9138=AXIS2_PLACEMENT_3D('',#9135,#9136,#9137); #9139=CYLINDRICAL_SURFACE('',#9138,1.925E-1); #9140=ORIENTED_EDGE('',*,*,#9128,.T.); #9142=ORIENTED_EDGE('',*,*,#9141,.T.); #9143=ORIENTED_EDGE('',*,*,#5714,.F.); #9145=ORIENTED_EDGE('',*,*,#9144,.F.); #9146=EDGE_LOOP('',(#9140,#9142,#9143,#9145)); #9147=FACE_OUTER_BOUND('',#9146,.F.); #9148=ADVANCED_FACE('',(#9147),#9139,.F.); #9149=CARTESIAN_POINT('',(1.2E1,1.5E0,1.8E1)); #9150=DIRECTION('',(0.E0,-1.E0,0.E0)); #9151=DIRECTION('',(1.E0,0.E0,0.E0)); #9152=AXIS2_PLACEMENT_3D('',#9149,#9150,#9151); #9153=CYLINDRICAL_SURFACE('',#9152,1.925E-1); #9154=ORIENTED_EDGE('',*,*,#9130,.T.); #9155=ORIENTED_EDGE('',*,*,#9144,.T.); #9156=ORIENTED_EDGE('',*,*,#5716,.F.); #9157=ORIENTED_EDGE('',*,*,#9141,.F.); #9158=EDGE_LOOP('',(#9154,#9155,#9156,#9157)); #9159=FACE_OUTER_BOUND('',#9158,.F.); #9160=ADVANCED_FACE('',(#9159),#9153,.F.); #9161=CARTESIAN_POINT('',(1.8E1,1.5E0,1.8E1)); #9162=DIRECTION('',(0.E0,-1.E0,0.E0)); #9163=DIRECTION('',(1.E0,0.E0,0.E0)); #9164=AXIS2_PLACEMENT_3D('',#9161,#9162,#9163); #9165=CYLINDRICAL_SURFACE('',#9164,2.575E-1); #9166=ORIENTED_EDGE('',*,*,#6482,.T.); #9168=ORIENTED_EDGE('',*,*,#9167,.T.); #9170=ORIENTED_EDGE('',*,*,#9169,.F.); #9172=ORIENTED_EDGE('',*,*,#9171,.F.); #9173=EDGE_LOOP('',(#9166,#9168,#9170,#9172)); #9174=FACE_OUTER_BOUND('',#9173,.F.); #9175=ADVANCED_FACE('',(#9174),#9165,.F.); #9176=CARTESIAN_POINT('',(1.8E1,1.5E0,1.8E1)); #9177=DIRECTION('',(0.E0,-1.E0,0.E0)); #9178=DIRECTION('',(1.E0,0.E0,0.E0)); #9179=AXIS2_PLACEMENT_3D('',#9176,#9177,#9178); #9180=CYLINDRICAL_SURFACE('',#9179,2.575E-1); #9181=ORIENTED_EDGE('',*,*,#6484,.T.); #9182=ORIENTED_EDGE('',*,*,#9171,.T.); #9184=ORIENTED_EDGE('',*,*,#9183,.F.); #9185=ORIENTED_EDGE('',*,*,#9167,.F.); #9186=EDGE_LOOP('',(#9181,#9182,#9184,#9185)); #9187=FACE_OUTER_BOUND('',#9186,.F.); #9188=ADVANCED_FACE('',(#9187),#9180,.F.); #9189=CARTESIAN_POINT('',(1.8E1,1.E0,1.8E1)); #9190=DIRECTION('',(0.E0,-1.E0,0.E0)); #9191=DIRECTION('',(1.E0,0.E0,0.E0)); #9192=AXIS2_PLACEMENT_3D('',#9189,#9190,#9191); #9193=PLANE('',#9192); #9194=ORIENTED_EDGE('',*,*,#9169,.T.); #9195=ORIENTED_EDGE('',*,*,#9183,.T.); #9196=EDGE_LOOP('',(#9194,#9195)); #9197=FACE_OUTER_BOUND('',#9196,.F.); #9199=ORIENTED_EDGE('',*,*,#9198,.F.); #9201=ORIENTED_EDGE('',*,*,#9200,.F.); #9202=EDGE_LOOP('',(#9199,#9201)); #9203=FACE_BOUND('',#9202,.F.); #9204=ADVANCED_FACE('',(#9197,#9203),#9193,.F.); #9205=CARTESIAN_POINT('',(1.8E1,1.5E0,1.8E1)); #9206=DIRECTION('',(0.E0,-1.E0,0.E0)); #9207=DIRECTION('',(1.E0,0.E0,0.E0)); #9208=AXIS2_PLACEMENT_3D('',#9205,#9206,#9207); #9209=CYLINDRICAL_SURFACE('',#9208,1.925E-1); #9210=ORIENTED_EDGE('',*,*,#9198,.T.); #9212=ORIENTED_EDGE('',*,*,#9211,.T.); #9213=ORIENTED_EDGE('',*,*,#5720,.F.); #9215=ORIENTED_EDGE('',*,*,#9214,.F.); #9216=EDGE_LOOP('',(#9210,#9212,#9213,#9215)); #9217=FACE_OUTER_BOUND('',#9216,.F.); #9218=ADVANCED_FACE('',(#9217),#9209,.F.); #9219=CARTESIAN_POINT('',(1.8E1,1.5E0,1.8E1)); #9220=DIRECTION('',(0.E0,-1.E0,0.E0)); #9221=DIRECTION('',(1.E0,0.E0,0.E0)); #9222=AXIS2_PLACEMENT_3D('',#9219,#9220,#9221); #9223=CYLINDRICAL_SURFACE('',#9222,1.925E-1); #9224=ORIENTED_EDGE('',*,*,#9200,.T.); #9225=ORIENTED_EDGE('',*,*,#9214,.T.); #9226=ORIENTED_EDGE('',*,*,#5722,.F.); #9227=ORIENTED_EDGE('',*,*,#9211,.F.); #9228=EDGE_LOOP('',(#9224,#9225,#9226,#9227)); #9229=FACE_OUTER_BOUND('',#9228,.F.); #9230=ADVANCED_FACE('',(#9229),#9223,.F.); #9231=CARTESIAN_POINT('',(2.2E1,1.5E0,1.2E1)); #9232=DIRECTION('',(1.E0,0.E0,0.E0)); #9233=DIRECTION('',(0.E0,-1.E0,0.E0)); #9234=AXIS2_PLACEMENT_3D('',#9231,#9232,#9233); #9235=PLANE('',#9234); #9236=ORIENTED_EDGE('',*,*,#6328,.T.); #9237=ORIENTED_EDGE('',*,*,#6155,.T.); #9239=ORIENTED_EDGE('',*,*,#9238,.T.); #9240=EDGE_LOOP('',(#9236,#9237,#9239)); #9241=FACE_OUTER_BOUND('',#9240,.F.); #9242=ADVANCED_FACE('',(#9241),#9235,.F.); #9243=CARTESIAN_POINT('',(2.375E1,6.5E0,1.E1)); #9244=DIRECTION('',(0.E0,-5.E-1,-8.660254037844E-1)); #9245=DIRECTION('',(0.E0,-8.660254037844E-1,5.E-1)); #9246=AXIS2_PLACEMENT_3D('',#9243,#9244,#9245); #9247=PLANE('',#9246); #9248=ORIENTED_EDGE('',*,*,#6330,.T.); #9249=ORIENTED_EDGE('',*,*,#9238,.F.); #9250=ORIENTED_EDGE('',*,*,#6153,.F.); #9251=ORIENTED_EDGE('',*,*,#6209,.T.); #9252=EDGE_LOOP('',(#9248,#9249,#9250,#9251)); #9253=FACE_OUTER_BOUND('',#9252,.F.); #9255=ORIENTED_EDGE('',*,*,#9254,.F.); #9257=ORIENTED_EDGE('',*,*,#9256,.F.); #9258=EDGE_LOOP('',(#9255,#9257)); #9259=FACE_BOUND('',#9258,.F.); #9260=ADVANCED_FACE('',(#9253,#9259),#9247,.F.); #9261=CARTESIAN_POINT('',(2.2875E1,1.5E0,1.2E1)); #9262=DIRECTION('',(0.E0,-1.E0,0.E0)); #9263=DIRECTION('',(1.E0,0.E0,0.E0)); #9264=AXIS2_PLACEMENT_3D('',#9261,#9262,#9263); #9265=CYLINDRICAL_SURFACE('',#9264,2.575E-1); #9267=ORIENTED_EDGE('',*,*,#9266,.F.); #9268=ORIENTED_EDGE('',*,*,#9254,.T.); #9270=ORIENTED_EDGE('',*,*,#9269,.F.); #9272=ORIENTED_EDGE('',*,*,#9271,.F.); #9273=EDGE_LOOP('',(#9267,#9268,#9270,#9272)); #9274=FACE_OUTER_BOUND('',#9273,.F.); #9275=ADVANCED_FACE('',(#9274),#9265,.F.); #9276=CARTESIAN_POINT('',(2.2875E1,1.5E0,1.2E1)); #9277=DIRECTION('',(0.E0,-1.E0,0.E0)); #9278=DIRECTION('',(1.E0,0.E0,0.E0)); #9279=AXIS2_PLACEMENT_3D('',#9276,#9277,#9278); #9280=CYLINDRICAL_SURFACE('',#9279,2.575E-1); #9281=ORIENTED_EDGE('',*,*,#9269,.T.); #9282=ORIENTED_EDGE('',*,*,#9256,.T.); #9283=ORIENTED_EDGE('',*,*,#9266,.T.); #9285=ORIENTED_EDGE('',*,*,#9284,.F.); #9286=EDGE_LOOP('',(#9281,#9282,#9283,#9285)); #9287=FACE_OUTER_BOUND('',#9286,.F.); #9288=ADVANCED_FACE('',(#9287),#9280,.F.); #9289=CARTESIAN_POINT('',(2.2875E1,1.E0,1.2E1)); #9290=DIRECTION('',(0.E0,-1.E0,0.E0)); #9291=DIRECTION('',(1.E0,0.E0,0.E0)); #9292=AXIS2_PLACEMENT_3D('',#9289,#9290,#9291); #9293=PLANE('',#9292); #9294=ORIENTED_EDGE('',*,*,#9271,.T.); #9295=ORIENTED_EDGE('',*,*,#9284,.T.); #9296=EDGE_LOOP('',(#9294,#9295)); #9297=FACE_OUTER_BOUND('',#9296,.F.); #9299=ORIENTED_EDGE('',*,*,#9298,.F.); #9301=ORIENTED_EDGE('',*,*,#9300,.F.); #9302=EDGE_LOOP('',(#9299,#9301)); #9303=FACE_BOUND('',#9302,.F.); #9304=ADVANCED_FACE('',(#9297,#9303),#9293,.F.); #9305=CARTESIAN_POINT('',(2.2875E1,1.5E0,1.2E1)); #9306=DIRECTION('',(0.E0,-1.E0,0.E0)); #9307=DIRECTION('',(1.E0,0.E0,0.E0)); #9308=AXIS2_PLACEMENT_3D('',#9305,#9306,#9307); #9309=CYLINDRICAL_SURFACE('',#9308,1.925E-1); #9310=ORIENTED_EDGE('',*,*,#9298,.T.); #9312=ORIENTED_EDGE('',*,*,#9311,.T.); #9313=ORIENTED_EDGE('',*,*,#5596,.F.); #9315=ORIENTED_EDGE('',*,*,#9314,.F.); #9316=EDGE_LOOP('',(#9310,#9312,#9313,#9315)); #9317=FACE_OUTER_BOUND('',#9316,.F.); #9318=ADVANCED_FACE('',(#9317),#9309,.F.); #9319=CARTESIAN_POINT('',(2.2875E1,1.5E0,1.2E1)); #9320=DIRECTION('',(0.E0,-1.E0,0.E0)); #9321=DIRECTION('',(1.E0,0.E0,0.E0)); #9322=AXIS2_PLACEMENT_3D('',#9319,#9320,#9321); #9323=CYLINDRICAL_SURFACE('',#9322,1.925E-1); #9324=ORIENTED_EDGE('',*,*,#9300,.T.); #9325=ORIENTED_EDGE('',*,*,#9314,.T.); #9326=ORIENTED_EDGE('',*,*,#5598,.F.); #9327=ORIENTED_EDGE('',*,*,#9311,.F.); #9328=EDGE_LOOP('',(#9324,#9325,#9326,#9327)); #9329=FACE_OUTER_BOUND('',#9328,.F.); #9330=ADVANCED_FACE('',(#9329),#9323,.F.); #9331=CARTESIAN_POINT('',(2.185E1,6.65E0,1.006892397423E1)); #9332=DIRECTION('',(0.E0,0.E0,-1.E0)); #9333=DIRECTION('',(-1.E0,0.E0,0.E0)); #9334=AXIS2_PLACEMENT_3D('',#9331,#9332,#9333); #9335=CYLINDRICAL_SURFACE('',#9334,3.5E-1); #9337=ORIENTED_EDGE('',*,*,#9336,.T.); #9339=ORIENTED_EDGE('',*,*,#9338,.T.); #9341=ORIENTED_EDGE('',*,*,#9340,.F.); #9342=ORIENTED_EDGE('',*,*,#6175,.T.); #9343=EDGE_LOOP('',(#9337,#9339,#9341,#9342)); #9344=FACE_OUTER_BOUND('',#9343,.F.); #9345=ADVANCED_FACE('',(#9344),#9335,.T.); #9346=CARTESIAN_POINT('',(2.15E1,7.E0,1.E1)); #9347=DIRECTION('',(-1.E0,0.E0,0.E0)); #9348=DIRECTION('',(0.E0,-1.E0,0.E0)); #9349=AXIS2_PLACEMENT_3D('',#9346,#9347,#9348); #9350=PLANE('',#9349); #9351=ORIENTED_EDGE('',*,*,#9336,.F.); #9352=ORIENTED_EDGE('',*,*,#6197,.T.); #9354=ORIENTED_EDGE('',*,*,#9353,.F.); #9356=ORIENTED_EDGE('',*,*,#9355,.F.); #9357=EDGE_LOOP('',(#9351,#9352,#9354,#9356)); #9358=FACE_OUTER_BOUND('',#9357,.F.); #9359=ADVANCED_FACE('',(#9358),#9350,.T.); #9360=CARTESIAN_POINT('',(2.115E1,2.35E0,9.441108058217E0)); #9361=DIRECTION('',(0.E0,0.E0,1.E0)); #9362=DIRECTION('',(1.015061051086E-14,-1.E0,0.E0)); #9363=AXIS2_PLACEMENT_3D('',#9360,#9361,#9362); #9364=CYLINDRICAL_SURFACE('',#9363,3.5E-1); #9366=ORIENTED_EDGE('',*,*,#9365,.F.); #9368=ORIENTED_EDGE('',*,*,#9367,.T.); #9369=ORIENTED_EDGE('',*,*,#9353,.T.); #9370=ORIENTED_EDGE('',*,*,#6195,.T.); #9371=EDGE_LOOP('',(#9366,#9368,#9369,#9370)); #9372=FACE_OUTER_BOUND('',#9371,.F.); #9373=ADVANCED_FACE('',(#9372),#9364,.F.); #9374=CARTESIAN_POINT('',(2.15E1,2.E0,1.E1)); #9375=DIRECTION('',(0.E0,1.E0,0.E0)); #9376=DIRECTION('',(-1.E0,0.E0,0.E0)); #9377=AXIS2_PLACEMENT_3D('',#9374,#9375,#9376); #9378=PLANE('',#9377); #9379=ORIENTED_EDGE('',*,*,#9365,.T.); #9380=ORIENTED_EDGE('',*,*,#6193,.T.); #9382=ORIENTED_EDGE('',*,*,#9381,.F.); #9384=ORIENTED_EDGE('',*,*,#9383,.F.); #9385=EDGE_LOOP('',(#9379,#9380,#9382,#9384)); #9386=FACE_OUTER_BOUND('',#9385,.F.); #9387=ADVANCED_FACE('',(#9386),#9378,.T.); #9388=CARTESIAN_POINT('',(1.985E1,2.35E0,9.441108058217E0)); #9389=DIRECTION('',(0.E0,0.E0,1.E0)); #9390=DIRECTION('',(-1.E0,0.E0,0.E0)); #9391=AXIS2_PLACEMENT_3D('',#9388,#9389,#9390); #9392=CYLINDRICAL_SURFACE('',#9391,3.5E-1); #9394=ORIENTED_EDGE('',*,*,#9393,.F.); #9396=ORIENTED_EDGE('',*,*,#9395,.T.); #9397=ORIENTED_EDGE('',*,*,#9381,.T.); #9398=ORIENTED_EDGE('',*,*,#6191,.T.); #9399=EDGE_LOOP('',(#9394,#9396,#9397,#9398)); #9400=FACE_OUTER_BOUND('',#9399,.F.); #9401=ADVANCED_FACE('',(#9400),#9392,.F.); #9402=CARTESIAN_POINT('',(1.95E1,2.E0,1.E1)); #9403=DIRECTION('',(1.E0,0.E0,0.E0)); #9404=DIRECTION('',(0.E0,1.E0,0.E0)); #9405=AXIS2_PLACEMENT_3D('',#9402,#9403,#9404); #9406=PLANE('',#9405); #9407=ORIENTED_EDGE('',*,*,#9393,.T.); #9408=ORIENTED_EDGE('',*,*,#6189,.T.); #9410=ORIENTED_EDGE('',*,*,#9409,.F.); #9412=ORIENTED_EDGE('',*,*,#9411,.F.); #9413=EDGE_LOOP('',(#9407,#9408,#9410,#9412)); #9414=FACE_OUTER_BOUND('',#9413,.F.); #9415=ADVANCED_FACE('',(#9414),#9406,.T.); #9416=CARTESIAN_POINT('',(1.985E1,9.15E0,9.441108058217E0)); #9417=DIRECTION('',(0.E0,0.E0,1.E0)); #9418=DIRECTION('',(-1.015061051086E-14,1.E0,0.E0)); #9419=AXIS2_PLACEMENT_3D('',#9416,#9417,#9418); #9420=CYLINDRICAL_SURFACE('',#9419,3.5E-1); #9422=ORIENTED_EDGE('',*,*,#9421,.F.); #9424=ORIENTED_EDGE('',*,*,#9423,.T.); #9425=ORIENTED_EDGE('',*,*,#9409,.T.); #9426=ORIENTED_EDGE('',*,*,#6187,.T.); #9427=EDGE_LOOP('',(#9422,#9424,#9425,#9426)); #9428=FACE_OUTER_BOUND('',#9427,.F.); #9429=ADVANCED_FACE('',(#9428),#9420,.F.); #9430=CARTESIAN_POINT('',(1.95E1,9.5E0,1.E1)); #9431=DIRECTION('',(0.E0,-1.E0,0.E0)); #9432=DIRECTION('',(1.E0,0.E0,0.E0)); #9433=AXIS2_PLACEMENT_3D('',#9430,#9431,#9432); #9434=PLANE('',#9433); #9436=ORIENTED_EDGE('',*,*,#9435,.F.); #9438=ORIENTED_EDGE('',*,*,#9437,.F.); #9439=ORIENTED_EDGE('',*,*,#9421,.T.); #9440=ORIENTED_EDGE('',*,*,#6185,.T.); #9441=EDGE_LOOP('',(#9436,#9438,#9439,#9440)); #9442=FACE_OUTER_BOUND('',#9441,.F.); #9443=ADVANCED_FACE('',(#9442),#9434,.T.); #9444=CARTESIAN_POINT('',(2.104720076055E1,9.15E0,9.441108058217E0)); #9445=DIRECTION('',(0.E0,0.E0,1.E0)); #9446=DIRECTION('',(8.741572761215E-1,4.856429311786E-1,0.E0)); #9447=AXIS2_PLACEMENT_3D('',#9444,#9445,#9446); #9448=CYLINDRICAL_SURFACE('',#9447,3.5E-1); #9450=ORIENTED_EDGE('',*,*,#9449,.F.); #9452=ORIENTED_EDGE('',*,*,#9451,.T.); #9453=ORIENTED_EDGE('',*,*,#9435,.T.); #9454=ORIENTED_EDGE('',*,*,#6183,.T.); #9455=EDGE_LOOP('',(#9450,#9452,#9453,#9454)); #9456=FACE_OUTER_BOUND('',#9455,.F.); #9457=ADVANCED_FACE('',(#9456),#9448,.F.); #9458=CARTESIAN_POINT('',(2.125314193270E1,9.5E0,1.E1)); #9459=DIRECTION('',(-8.741572761215E-1,-4.856429311786E-1,0.E0)); #9460=DIRECTION('',(4.856429311786E-1,-8.741572761215E-1,0.E0)); #9461=AXIS2_PLACEMENT_3D('',#9458,#9459,#9460); #9462=PLANE('',#9461); #9464=ORIENTED_EDGE('',*,*,#9463,.F.); #9466=ORIENTED_EDGE('',*,*,#9465,.F.); #9467=ORIENTED_EDGE('',*,*,#9449,.T.); #9468=ORIENTED_EDGE('',*,*,#6181,.T.); #9469=EDGE_LOOP('',(#9464,#9466,#9467,#9468)); #9470=FACE_OUTER_BOUND('',#9469,.F.); #9471=ADVANCED_FACE('',(#9470),#9462,.T.); #9472=CARTESIAN_POINT('',(2.204720076055E1,7.35E0,9.441108058217E0)); #9473=DIRECTION('',(0.E0,0.E0,1.E0)); #9474=DIRECTION('',(0.E0,-1.E0,0.E0)); #9475=AXIS2_PLACEMENT_3D('',#9472,#9473,#9474); #9476=CYLINDRICAL_SURFACE('',#9475,3.5E-1); #9478=ORIENTED_EDGE('',*,*,#9477,.F.); #9480=ORIENTED_EDGE('',*,*,#9479,.T.); #9481=ORIENTED_EDGE('',*,*,#9463,.T.); #9482=ORIENTED_EDGE('',*,*,#6179,.T.); #9483=EDGE_LOOP('',(#9478,#9480,#9481,#9482)); #9484=FACE_OUTER_BOUND('',#9483,.F.); #9485=ADVANCED_FACE('',(#9484),#9476,.F.); #9486=CARTESIAN_POINT('',(2.264203082158E1,7.E0,1.E1)); #9487=DIRECTION('',(0.E0,1.E0,0.E0)); #9488=DIRECTION('',(-1.E0,0.E0,0.E0)); #9489=AXIS2_PLACEMENT_3D('',#9486,#9487,#9488); #9490=PLANE('',#9489); #9491=ORIENTED_EDGE('',*,*,#9340,.T.); #9493=ORIENTED_EDGE('',*,*,#9492,.F.); #9494=ORIENTED_EDGE('',*,*,#9477,.T.); #9495=ORIENTED_EDGE('',*,*,#6177,.T.); #9496=EDGE_LOOP('',(#9491,#9493,#9494,#9495)); #9497=FACE_OUTER_BOUND('',#9496,.F.); #9498=ADVANCED_FACE('',(#9497),#9490,.T.); #9499=CARTESIAN_POINT('',(2.4E1,0.E0,9.5E0)); #9500=DIRECTION('',(0.E0,0.E0,-1.E0)); #9501=DIRECTION('',(-1.E0,0.E0,0.E0)); #9502=AXIS2_PLACEMENT_3D('',#9499,#9500,#9501); #9503=PLANE('',#9502); #9504=ORIENTED_EDGE('',*,*,#9492,.T.); #9505=ORIENTED_EDGE('',*,*,#9338,.F.); #9506=ORIENTED_EDGE('',*,*,#9355,.T.); #9507=ORIENTED_EDGE('',*,*,#9367,.F.); #9508=ORIENTED_EDGE('',*,*,#9383,.T.); #9509=ORIENTED_EDGE('',*,*,#9395,.F.); #9510=ORIENTED_EDGE('',*,*,#9411,.T.); #9511=ORIENTED_EDGE('',*,*,#9423,.F.); #9512=ORIENTED_EDGE('',*,*,#9437,.T.); #9513=ORIENTED_EDGE('',*,*,#9451,.F.); #9514=ORIENTED_EDGE('',*,*,#9465,.T.); #9515=ORIENTED_EDGE('',*,*,#9479,.F.); #9516=EDGE_LOOP('',(#9504,#9505,#9506,#9507,#9508,#9509,#9510,#9511,#9512,#9513, #9514,#9515)); #9517=FACE_OUTER_BOUND('',#9516,.F.); #9518=ADVANCED_FACE('',(#9517),#9503,.F.); #9519=CARTESIAN_POINT('',(2.01875E1,1.05E1,8.E0)); #9520=DIRECTION('',(0.E0,0.E0,-1.E0)); #9521=DIRECTION('',(-1.E0,0.E0,0.E0)); #9522=AXIS2_PLACEMENT_3D('',#9519,#9520,#9521); #9523=CYLINDRICAL_SURFACE('',#9522,9.5E-2); #9524=ORIENTED_EDGE('',*,*,#6007,.F.); #9526=ORIENTED_EDGE('',*,*,#9525,.T.); #9528=ORIENTED_EDGE('',*,*,#9527,.T.); #9530=ORIENTED_EDGE('',*,*,#9529,.F.); #9531=EDGE_LOOP('',(#9524,#9526,#9528,#9530)); #9532=FACE_OUTER_BOUND('',#9531,.F.); #9533=ADVANCED_FACE('',(#9532),#9523,.F.); #9534=CARTESIAN_POINT('',(2.01875E1,1.05E1,8.E0)); #9535=DIRECTION('',(0.E0,0.E0,-1.E0)); #9536=DIRECTION('',(-1.E0,0.E0,0.E0)); #9537=AXIS2_PLACEMENT_3D('',#9534,#9535,#9536); #9538=CYLINDRICAL_SURFACE('',#9537,9.5E-2); #9539=ORIENTED_EDGE('',*,*,#6009,.F.); #9540=ORIENTED_EDGE('',*,*,#9529,.T.); #9542=ORIENTED_EDGE('',*,*,#9541,.T.); #9543=ORIENTED_EDGE('',*,*,#9525,.F.); #9544=EDGE_LOOP('',(#9539,#9540,#9542,#9543)); #9545=FACE_OUTER_BOUND('',#9544,.F.); #9546=ADVANCED_FACE('',(#9545),#9538,.F.); #9547=CARTESIAN_POINT('',(2.01875E1,1.05E1,8.25E0)); #9548=DIRECTION('',(0.E0,0.E0,-1.E0)); #9549=DIRECTION('',(-1.E0,0.E0,0.E0)); #9550=AXIS2_PLACEMENT_3D('',#9547,#9548,#9549); #9551=PLANE('',#9550); #9552=ORIENTED_EDGE('',*,*,#9527,.F.); #9553=ORIENTED_EDGE('',*,*,#9541,.F.); #9554=EDGE_LOOP('',(#9552,#9553)); #9555=FACE_OUTER_BOUND('',#9554,.F.); #9556=ADVANCED_FACE('',(#9555),#9551,.T.); #9557=CARTESIAN_POINT('',(1.975E1,1.00625E1,8.E0)); #9558=DIRECTION('',(0.E0,0.E0,-1.E0)); #9559=DIRECTION('',(-1.E0,0.E0,0.E0)); #9560=AXIS2_PLACEMENT_3D('',#9557,#9558,#9559); #9561=CYLINDRICAL_SURFACE('',#9560,9.5E-2); #9562=ORIENTED_EDGE('',*,*,#6013,.F.); #9564=ORIENTED_EDGE('',*,*,#9563,.T.); #9566=ORIENTED_EDGE('',*,*,#9565,.T.); #9568=ORIENTED_EDGE('',*,*,#9567,.F.); #9569=EDGE_LOOP('',(#9562,#9564,#9566,#9568)); #9570=FACE_OUTER_BOUND('',#9569,.F.); #9571=ADVANCED_FACE('',(#9570),#9561,.F.); #9572=CARTESIAN_POINT('',(1.975E1,1.00625E1,8.E0)); #9573=DIRECTION('',(0.E0,0.E0,-1.E0)); #9574=DIRECTION('',(-1.E0,0.E0,0.E0)); #9575=AXIS2_PLACEMENT_3D('',#9572,#9573,#9574); #9576=CYLINDRICAL_SURFACE('',#9575,9.5E-2); #9577=ORIENTED_EDGE('',*,*,#6015,.F.); #9578=ORIENTED_EDGE('',*,*,#9567,.T.); #9580=ORIENTED_EDGE('',*,*,#9579,.T.); #9581=ORIENTED_EDGE('',*,*,#9563,.F.); #9582=EDGE_LOOP('',(#9577,#9578,#9580,#9581)); #9583=FACE_OUTER_BOUND('',#9582,.F.); #9584=ADVANCED_FACE('',(#9583),#9576,.F.); #9585=CARTESIAN_POINT('',(1.975E1,1.00625E1,8.25E0)); #9586=DIRECTION('',(0.E0,0.E0,-1.E0)); #9587=DIRECTION('',(-1.E0,0.E0,0.E0)); #9588=AXIS2_PLACEMENT_3D('',#9585,#9586,#9587); #9589=PLANE('',#9588); #9590=ORIENTED_EDGE('',*,*,#9565,.F.); #9591=ORIENTED_EDGE('',*,*,#9579,.F.); #9592=EDGE_LOOP('',(#9590,#9591)); #9593=FACE_OUTER_BOUND('',#9592,.F.); #9594=ADVANCED_FACE('',(#9593),#9589,.T.); #9595=CARTESIAN_POINT('',(4.25E0,1.00625E1,8.E0)); #9596=DIRECTION('',(0.E0,0.E0,1.E0)); #9597=DIRECTION('',(1.E0,0.E0,0.E0)); #9598=AXIS2_PLACEMENT_3D('',#9595,#9596,#9597); #9599=CYLINDRICAL_SURFACE('',#9598,9.5E-2); #9600=ORIENTED_EDGE('',*,*,#6019,.T.); #9602=ORIENTED_EDGE('',*,*,#9601,.T.); #9604=ORIENTED_EDGE('',*,*,#9603,.F.); #9606=ORIENTED_EDGE('',*,*,#9605,.F.); #9607=EDGE_LOOP('',(#9600,#9602,#9604,#9606)); #9608=FACE_OUTER_BOUND('',#9607,.F.); #9609=ADVANCED_FACE('',(#9608),#9599,.F.); #9610=CARTESIAN_POINT('',(4.25E0,1.00625E1,8.E0)); #9611=DIRECTION('',(0.E0,0.E0,1.E0)); #9612=DIRECTION('',(1.E0,0.E0,0.E0)); #9613=AXIS2_PLACEMENT_3D('',#9610,#9611,#9612); #9614=CYLINDRICAL_SURFACE('',#9613,9.5E-2); #9615=ORIENTED_EDGE('',*,*,#6021,.T.); #9616=ORIENTED_EDGE('',*,*,#9605,.T.); #9618=ORIENTED_EDGE('',*,*,#9617,.F.); #9619=ORIENTED_EDGE('',*,*,#9601,.F.); #9620=EDGE_LOOP('',(#9615,#9616,#9618,#9619)); #9621=FACE_OUTER_BOUND('',#9620,.F.); #9622=ADVANCED_FACE('',(#9621),#9614,.F.); #9623=CARTESIAN_POINT('',(4.25E0,1.00625E1,8.25E0)); #9624=DIRECTION('',(0.E0,0.E0,1.E0)); #9625=DIRECTION('',(1.E0,0.E0,0.E0)); #9626=AXIS2_PLACEMENT_3D('',#9623,#9624,#9625); #9627=PLANE('',#9626); #9628=ORIENTED_EDGE('',*,*,#9603,.T.); #9629=ORIENTED_EDGE('',*,*,#9617,.T.); #9630=EDGE_LOOP('',(#9628,#9629)); #9631=FACE_OUTER_BOUND('',#9630,.F.); #9632=ADVANCED_FACE('',(#9631),#9627,.F.); #9633=CARTESIAN_POINT('',(3.8125E0,1.05E1,8.E0)); #9634=DIRECTION('',(0.E0,0.E0,1.E0)); #9635=DIRECTION('',(1.E0,0.E0,0.E0)); #9636=AXIS2_PLACEMENT_3D('',#9633,#9634,#9635); #9637=CYLINDRICAL_SURFACE('',#9636,9.5E-2); #9638=ORIENTED_EDGE('',*,*,#6025,.T.); #9640=ORIENTED_EDGE('',*,*,#9639,.T.); #9642=ORIENTED_EDGE('',*,*,#9641,.F.); #9644=ORIENTED_EDGE('',*,*,#9643,.F.); #9645=EDGE_LOOP('',(#9638,#9640,#9642,#9644)); #9646=FACE_OUTER_BOUND('',#9645,.F.); #9647=ADVANCED_FACE('',(#9646),#9637,.F.); #9648=CARTESIAN_POINT('',(3.8125E0,1.05E1,8.E0)); #9649=DIRECTION('',(0.E0,0.E0,1.E0)); #9650=DIRECTION('',(1.E0,0.E0,0.E0)); #9651=AXIS2_PLACEMENT_3D('',#9648,#9649,#9650); #9652=CYLINDRICAL_SURFACE('',#9651,9.5E-2); #9653=ORIENTED_EDGE('',*,*,#6027,.T.); #9654=ORIENTED_EDGE('',*,*,#9643,.T.); #9656=ORIENTED_EDGE('',*,*,#9655,.F.); #9657=ORIENTED_EDGE('',*,*,#9639,.F.); #9658=EDGE_LOOP('',(#9653,#9654,#9656,#9657)); #9659=FACE_OUTER_BOUND('',#9658,.F.); #9660=ADVANCED_FACE('',(#9659),#9652,.F.); #9661=CARTESIAN_POINT('',(3.8125E0,1.05E1,8.25E0)); #9662=DIRECTION('',(0.E0,0.E0,1.E0)); #9663=DIRECTION('',(1.E0,0.E0,0.E0)); #9664=AXIS2_PLACEMENT_3D('',#9661,#9662,#9663); #9665=PLANE('',#9664); #9666=ORIENTED_EDGE('',*,*,#9641,.T.); #9667=ORIENTED_EDGE('',*,*,#9655,.T.); #9668=EDGE_LOOP('',(#9666,#9667)); #9669=FACE_OUTER_BOUND('',#9668,.F.); #9670=ADVANCED_FACE('',(#9669),#9665,.F.); #9671=CARTESIAN_POINT('',(4.25E0,1.09375E1,8.E0)); #9672=DIRECTION('',(0.E0,0.E0,1.E0)); #9673=DIRECTION('',(1.E0,0.E0,0.E0)); #9674=AXIS2_PLACEMENT_3D('',#9671,#9672,#9673); #9675=CYLINDRICAL_SURFACE('',#9674,9.5E-2); #9676=ORIENTED_EDGE('',*,*,#6037,.T.); #9678=ORIENTED_EDGE('',*,*,#9677,.T.); #9680=ORIENTED_EDGE('',*,*,#9679,.F.); #9682=ORIENTED_EDGE('',*,*,#9681,.F.); #9683=EDGE_LOOP('',(#9676,#9678,#9680,#9682)); #9684=FACE_OUTER_BOUND('',#9683,.F.); #9685=ADVANCED_FACE('',(#9684),#9675,.F.); #9686=CARTESIAN_POINT('',(4.25E0,1.09375E1,8.E0)); #9687=DIRECTION('',(0.E0,0.E0,1.E0)); #9688=DIRECTION('',(1.E0,0.E0,0.E0)); #9689=AXIS2_PLACEMENT_3D('',#9686,#9687,#9688); #9690=CYLINDRICAL_SURFACE('',#9689,9.5E-2); #9691=ORIENTED_EDGE('',*,*,#6039,.T.); #9692=ORIENTED_EDGE('',*,*,#9681,.T.); #9694=ORIENTED_EDGE('',*,*,#9693,.F.); #9695=ORIENTED_EDGE('',*,*,#9677,.F.); #9696=EDGE_LOOP('',(#9691,#9692,#9694,#9695)); #9697=FACE_OUTER_BOUND('',#9696,.F.); #9698=ADVANCED_FACE('',(#9697),#9690,.F.); #9699=CARTESIAN_POINT('',(4.25E0,1.09375E1,8.25E0)); #9700=DIRECTION('',(0.E0,0.E0,1.E0)); #9701=DIRECTION('',(1.E0,0.E0,0.E0)); #9702=AXIS2_PLACEMENT_3D('',#9699,#9700,#9701); #9703=PLANE('',#9702); #9704=ORIENTED_EDGE('',*,*,#9679,.T.); #9705=ORIENTED_EDGE('',*,*,#9693,.T.); #9706=EDGE_LOOP('',(#9704,#9705)); #9707=FACE_OUTER_BOUND('',#9706,.F.); #9708=ADVANCED_FACE('',(#9707),#9703,.F.); #9709=CARTESIAN_POINT('',(4.5E0,2.E0,8.E0)); #9710=DIRECTION('',(0.E0,-1.E0,0.E0)); #9711=DIRECTION('',(-1.E0,0.E0,0.E0)); #9712=AXIS2_PLACEMENT_3D('',#9709,#9710,#9711); #9713=PLANE('',#9712); #9715=ORIENTED_EDGE('',*,*,#9714,.T.); #9717=ORIENTED_EDGE('',*,*,#9716,.T.); #9719=ORIENTED_EDGE('',*,*,#9718,.F.); #9720=ORIENTED_EDGE('',*,*,#6043,.F.); #9721=EDGE_LOOP('',(#9715,#9717,#9719,#9720)); #9722=FACE_OUTER_BOUND('',#9721,.F.); #9723=ADVANCED_FACE('',(#9722),#9713,.F.); #9724=CARTESIAN_POINT('',(3.75E0,2.75E0,7.931076025772E0)); #9725=DIRECTION('',(0.E0,0.E0,1.E0)); #9726=DIRECTION('',(0.E0,-1.E0,0.E0)); #9727=AXIS2_PLACEMENT_3D('',#9724,#9725,#9726); #9728=CYLINDRICAL_SURFACE('',#9727,7.5E-1); #9729=ORIENTED_EDGE('',*,*,#9714,.F.); #9730=ORIENTED_EDGE('',*,*,#6057,.T.); #9732=ORIENTED_EDGE('',*,*,#9731,.T.); #9734=ORIENTED_EDGE('',*,*,#9733,.T.); #9735=EDGE_LOOP('',(#9729,#9730,#9732,#9734)); #9736=FACE_OUTER_BOUND('',#9735,.F.); #9737=ADVANCED_FACE('',(#9736),#9728,.F.); #9738=CARTESIAN_POINT('',(4.5E0,9.5E0,8.E0)); #9739=DIRECTION('',(1.E0,0.E0,0.E0)); #9740=DIRECTION('',(0.E0,-1.E0,0.E0)); #9741=AXIS2_PLACEMENT_3D('',#9738,#9739,#9740); #9742=PLANE('',#9741); #9743=ORIENTED_EDGE('',*,*,#9731,.F.); #9744=ORIENTED_EDGE('',*,*,#6055,.F.); #9746=ORIENTED_EDGE('',*,*,#9745,.T.); #9748=ORIENTED_EDGE('',*,*,#9747,.T.); #9749=EDGE_LOOP('',(#9743,#9744,#9746,#9748)); #9750=FACE_OUTER_BOUND('',#9749,.F.); #9751=ADVANCED_FACE('',(#9750),#9742,.F.); #9752=CARTESIAN_POINT('',(3.75E0,8.75E0,7.931076025772E0)); #9753=DIRECTION('',(0.E0,0.E0,1.E0)); #9754=DIRECTION('',(1.E0,0.E0,0.E0)); #9755=AXIS2_PLACEMENT_3D('',#9752,#9753,#9754); #9756=CYLINDRICAL_SURFACE('',#9755,7.5E-1); #9757=ORIENTED_EDGE('',*,*,#9745,.F.); #9758=ORIENTED_EDGE('',*,*,#6053,.T.); #9760=ORIENTED_EDGE('',*,*,#9759,.T.); #9762=ORIENTED_EDGE('',*,*,#9761,.T.); #9763=EDGE_LOOP('',(#9757,#9758,#9760,#9762)); #9764=FACE_OUTER_BOUND('',#9763,.F.); #9765=ADVANCED_FACE('',(#9764),#9756,.F.); #9766=CARTESIAN_POINT('',(2.746858067304E0,9.5E0,8.E0)); #9767=DIRECTION('',(0.E0,1.E0,0.E0)); #9768=DIRECTION('',(1.E0,0.E0,0.E0)); #9769=AXIS2_PLACEMENT_3D('',#9766,#9767,#9768); #9770=PLANE('',#9769); #9772=ORIENTED_EDGE('',*,*,#9771,.T.); #9774=ORIENTED_EDGE('',*,*,#9773,.T.); #9775=ORIENTED_EDGE('',*,*,#9759,.F.); #9776=ORIENTED_EDGE('',*,*,#6051,.F.); #9777=EDGE_LOOP('',(#9772,#9774,#9775,#9776)); #9778=FACE_OUTER_BOUND('',#9777,.F.); #9779=ADVANCED_FACE('',(#9778),#9770,.F.); #9780=CARTESIAN_POINT('',(3.188160579053E0,8.75E0,7.931076025772E0)); #9781=DIRECTION('',(0.E0,0.E0,1.E0)); #9782=DIRECTION('',(0.E0,1.E0,0.E0)); #9783=AXIS2_PLACEMENT_3D('',#9780,#9781,#9782); #9784=CYLINDRICAL_SURFACE('',#9783,7.5E-1); #9785=ORIENTED_EDGE('',*,*,#9771,.F.); #9786=ORIENTED_EDGE('',*,*,#6049,.T.); #9788=ORIENTED_EDGE('',*,*,#9787,.T.); #9790=ORIENTED_EDGE('',*,*,#9789,.T.); #9791=EDGE_LOOP('',(#9785,#9786,#9788,#9790)); #9792=FACE_OUTER_BOUND('',#9791,.F.); #9793=ADVANCED_FACE('',(#9792),#9784,.F.); #9794=CARTESIAN_POINT('',(-1.419808599362E0,2.E0,8.E0)); #9795=DIRECTION('',(-8.741572761215E-1,4.856429311786E-1,0.E0)); #9796=DIRECTION('',(4.856429311786E-1,8.741572761215E-1,0.E0)); #9797=AXIS2_PLACEMENT_3D('',#9794,#9795,#9796); #9798=PLANE('',#9797); #9800=ORIENTED_EDGE('',*,*,#9799,.T.); #9802=ORIENTED_EDGE('',*,*,#9801,.T.); #9803=ORIENTED_EDGE('',*,*,#9787,.F.); #9804=ORIENTED_EDGE('',*,*,#6047,.F.); #9805=EDGE_LOOP('',(#9800,#9802,#9803,#9804)); #9806=FACE_OUTER_BOUND('',#9805,.F.); #9807=ADVANCED_FACE('',(#9806),#9798,.F.); #9808=CARTESIAN_POINT('',(-1.451727542799E-1,2.75E0,7.931076025772E0)); #9809=DIRECTION('',(0.E0,0.E0,1.E0)); #9810=DIRECTION('',(-8.741572761215E-1,4.856429311786E-1,0.E0)); #9811=AXIS2_PLACEMENT_3D('',#9808,#9809,#9810); #9812=CYLINDRICAL_SURFACE('',#9811,7.5E-1); #9813=ORIENTED_EDGE('',*,*,#9799,.F.); #9814=ORIENTED_EDGE('',*,*,#6045,.T.); #9815=ORIENTED_EDGE('',*,*,#9718,.T.); #9817=ORIENTED_EDGE('',*,*,#9816,.T.); #9818=EDGE_LOOP('',(#9813,#9814,#9815,#9817)); #9819=FACE_OUTER_BOUND('',#9818,.F.); #9820=ADVANCED_FACE('',(#9819),#9812,.F.); #9821=CARTESIAN_POINT('',(0.E0,0.E0,8.5E0)); #9822=DIRECTION('',(0.E0,0.E0,-1.E0)); #9823=DIRECTION('',(0.E0,-1.E0,0.E0)); #9824=AXIS2_PLACEMENT_3D('',#9821,#9822,#9823); #9825=PLANE('',#9824); #9826=ORIENTED_EDGE('',*,*,#9733,.F.); #9827=ORIENTED_EDGE('',*,*,#9747,.F.); #9828=ORIENTED_EDGE('',*,*,#9761,.F.); #9829=ORIENTED_EDGE('',*,*,#9773,.F.); #9830=ORIENTED_EDGE('',*,*,#9789,.F.); #9831=ORIENTED_EDGE('',*,*,#9801,.F.); #9832=ORIENTED_EDGE('',*,*,#9816,.F.); #9833=ORIENTED_EDGE('',*,*,#9716,.F.); #9834=EDGE_LOOP('',(#9826,#9827,#9828,#9829,#9830,#9831,#9832,#9833)); #9835=FACE_OUTER_BOUND('',#9834,.F.); #9836=ADVANCED_FACE('',(#9835),#9825,.T.); #9837=CARTESIAN_POINT('',(2.541980859936E1,2.E0,8.E0)); #9838=DIRECTION('',(-8.741572761215E-1,-4.856429311786E-1,0.E0)); #9839=DIRECTION('',(-4.856429311786E-1,8.741572761215E-1,0.E0)); #9840=AXIS2_PLACEMENT_3D('',#9837,#9838,#9839); #9841=PLANE('',#9840); #9843=ORIENTED_EDGE('',*,*,#9842,.T.); #9844=ORIENTED_EDGE('',*,*,#6061,.T.); #9846=ORIENTED_EDGE('',*,*,#9845,.F.); #9848=ORIENTED_EDGE('',*,*,#9847,.F.); #9849=EDGE_LOOP('',(#9843,#9844,#9846,#9848)); #9850=FACE_OUTER_BOUND('',#9849,.F.); #9851=ADVANCED_FACE('',(#9850),#9841,.T.); #9852=CARTESIAN_POINT('',(2.414517275428E1,2.75E0,8.558891941783E0)); #9853=DIRECTION('',(0.E0,0.E0,-1.E0)); #9854=DIRECTION('',(8.741572761215E-1,4.856429311786E-1,0.E0)); #9855=AXIS2_PLACEMENT_3D('',#9852,#9853,#9854); #9856=CYLINDRICAL_SURFACE('',#9855,7.5E-1); #9857=ORIENTED_EDGE('',*,*,#9842,.F.); #9859=ORIENTED_EDGE('',*,*,#9858,.T.); #9861=ORIENTED_EDGE('',*,*,#9860,.T.); #9862=ORIENTED_EDGE('',*,*,#6063,.T.); #9863=EDGE_LOOP('',(#9857,#9859,#9861,#9862)); #9864=FACE_OUTER_BOUND('',#9863,.F.); #9865=ADVANCED_FACE('',(#9864),#9856,.F.); #9866=CARTESIAN_POINT('',(2.4E1,0.E0,8.5E0)); #9867=DIRECTION('',(0.E0,0.E0,1.E0)); #9868=DIRECTION('',(0.E0,-1.E0,0.E0)); #9869=AXIS2_PLACEMENT_3D('',#9866,#9867,#9868); #9870=PLANE('',#9869); #9872=ORIENTED_EDGE('',*,*,#9871,.F.); #9874=ORIENTED_EDGE('',*,*,#9873,.T.); #9875=ORIENTED_EDGE('',*,*,#9858,.F.); #9876=ORIENTED_EDGE('',*,*,#9847,.T.); #9878=ORIENTED_EDGE('',*,*,#9877,.F.); #9880=ORIENTED_EDGE('',*,*,#9879,.T.); #9882=ORIENTED_EDGE('',*,*,#9881,.F.); #9884=ORIENTED_EDGE('',*,*,#9883,.T.); #9885=EDGE_LOOP('',(#9872,#9874,#9875,#9876,#9878,#9880,#9882,#9884)); #9886=FACE_OUTER_BOUND('',#9885,.F.); #9887=ADVANCED_FACE('',(#9886),#9870,.F.); #9888=CARTESIAN_POINT('',(2.025E1,2.75E0,8.558891941783E0)); #9889=DIRECTION('',(0.E0,0.E0,-1.E0)); #9890=DIRECTION('',(0.E0,-1.E0,0.E0)); #9891=AXIS2_PLACEMENT_3D('',#9888,#9889,#9890); #9892=CYLINDRICAL_SURFACE('',#9891,7.5E-1); #9894=ORIENTED_EDGE('',*,*,#9893,.F.); #9895=ORIENTED_EDGE('',*,*,#9871,.T.); #9897=ORIENTED_EDGE('',*,*,#9896,.T.); #9898=ORIENTED_EDGE('',*,*,#6067,.T.); #9899=EDGE_LOOP('',(#9894,#9895,#9897,#9898)); #9900=FACE_OUTER_BOUND('',#9899,.F.); #9901=ADVANCED_FACE('',(#9900),#9892,.F.); #9902=CARTESIAN_POINT('',(1.95E1,2.E0,8.E0)); #9903=DIRECTION('',(0.E0,1.E0,0.E0)); #9904=DIRECTION('',(1.E0,0.E0,0.E0)); #9905=AXIS2_PLACEMENT_3D('',#9902,#9903,#9904); #9906=PLANE('',#9905); #9907=ORIENTED_EDGE('',*,*,#9893,.T.); #9908=ORIENTED_EDGE('',*,*,#6065,.T.); #9909=ORIENTED_EDGE('',*,*,#9860,.F.); #9910=ORIENTED_EDGE('',*,*,#9873,.F.); #9911=EDGE_LOOP('',(#9907,#9908,#9909,#9910)); #9912=FACE_OUTER_BOUND('',#9911,.F.); #9913=ADVANCED_FACE('',(#9912),#9906,.T.); #9914=CARTESIAN_POINT('',(1.95E1,9.5E0,8.E0)); #9915=DIRECTION('',(1.E0,0.E0,0.E0)); #9916=DIRECTION('',(0.E0,-1.E0,0.E0)); #9917=AXIS2_PLACEMENT_3D('',#9914,#9915,#9916); #9918=PLANE('',#9917); #9919=ORIENTED_EDGE('',*,*,#9896,.F.); #9920=ORIENTED_EDGE('',*,*,#9883,.F.); #9922=ORIENTED_EDGE('',*,*,#9921,.T.); #9923=ORIENTED_EDGE('',*,*,#6069,.T.); #9924=EDGE_LOOP('',(#9919,#9920,#9922,#9923)); #9925=FACE_OUTER_BOUND('',#9924,.F.); #9926=ADVANCED_FACE('',(#9925),#9918,.T.); #9927=CARTESIAN_POINT('',(2.025E1,8.75E0,8.558891941783E0)); #9928=DIRECTION('',(0.E0,0.E0,-1.E0)); #9929=DIRECTION('',(-1.E0,0.E0,0.E0)); #9930=AXIS2_PLACEMENT_3D('',#9927,#9928,#9929); #9931=CYLINDRICAL_SURFACE('',#9930,7.5E-1); #9932=ORIENTED_EDGE('',*,*,#9921,.F.); #9933=ORIENTED_EDGE('',*,*,#9881,.T.); #9935=ORIENTED_EDGE('',*,*,#9934,.T.); #9936=ORIENTED_EDGE('',*,*,#6071,.T.); #9937=EDGE_LOOP('',(#9932,#9933,#9935,#9936)); #9938=FACE_OUTER_BOUND('',#9937,.F.); #9939=ADVANCED_FACE('',(#9938),#9931,.F.); #9940=CARTESIAN_POINT('',(2.125314193270E1,9.5E0,8.E0)); #9941=DIRECTION('',(0.E0,-1.E0,0.E0)); #9942=DIRECTION('',(-1.E0,0.E0,0.E0)); #9943=AXIS2_PLACEMENT_3D('',#9940,#9941,#9942); #9944=PLANE('',#9943); #9946=ORIENTED_EDGE('',*,*,#9945,.T.); #9947=ORIENTED_EDGE('',*,*,#6073,.T.); #9948=ORIENTED_EDGE('',*,*,#9934,.F.); #9949=ORIENTED_EDGE('',*,*,#9879,.F.); #9950=EDGE_LOOP('',(#9946,#9947,#9948,#9949)); #9951=FACE_OUTER_BOUND('',#9950,.F.); #9952=ADVANCED_FACE('',(#9951),#9944,.T.); #9953=CARTESIAN_POINT('',(2.081183942095E1,8.75E0,8.558891941783E0)); #9954=DIRECTION('',(0.E0,0.E0,-1.E0)); #9955=DIRECTION('',(0.E0,1.E0,0.E0)); #9956=AXIS2_PLACEMENT_3D('',#9953,#9954,#9955); #9957=CYLINDRICAL_SURFACE('',#9956,7.5E-1); #9958=ORIENTED_EDGE('',*,*,#9945,.F.); #9959=ORIENTED_EDGE('',*,*,#9877,.T.); #9960=ORIENTED_EDGE('',*,*,#9845,.T.); #9961=ORIENTED_EDGE('',*,*,#6075,.T.); #9962=EDGE_LOOP('',(#9958,#9959,#9960,#9961)); #9963=FACE_OUTER_BOUND('',#9962,.F.); #9964=ADVANCED_FACE('',(#9963),#9957,.F.); #9965=CARTESIAN_POINT('',(7.5E0,0.E0,6.875E-1)); #9966=DIRECTION('',(0.E0,0.E0,-1.E0)); #9967=DIRECTION('',(1.E0,0.E0,0.E0)); #9968=AXIS2_PLACEMENT_3D('',#9965,#9966,#9967); #9969=PLANE('',#9968); #9970=ORIENTED_EDGE('',*,*,#5726,.F.); #9972=ORIENTED_EDGE('',*,*,#9971,.T.); #9974=ORIENTED_EDGE('',*,*,#9973,.T.); #9976=ORIENTED_EDGE('',*,*,#9975,.F.); #9977=EDGE_LOOP('',(#9970,#9972,#9974,#9976)); #9978=FACE_OUTER_BOUND('',#9977,.F.); #9979=ADVANCED_FACE('',(#9978),#9969,.F.); #9980=CARTESIAN_POINT('',(7.5E0,0.E0,1.25E0)); #9981=DIRECTION('',(0.E0,-1.E0,0.E0)); #9982=DIRECTION('',(1.E0,0.E0,0.E0)); #9983=AXIS2_PLACEMENT_3D('',#9980,#9981,#9982); #9984=CYLINDRICAL_SURFACE('',#9983,5.625E-1); #9985=ORIENTED_EDGE('',*,*,#5732,.F.); #9987=ORIENTED_EDGE('',*,*,#9986,.T.); #9989=ORIENTED_EDGE('',*,*,#9988,.T.); #9990=ORIENTED_EDGE('',*,*,#9971,.F.); #9991=EDGE_LOOP('',(#9985,#9987,#9989,#9990)); #9992=FACE_OUTER_BOUND('',#9991,.F.); #9993=ADVANCED_FACE('',(#9992),#9984,.F.); #9994=CARTESIAN_POINT('',(1.05E1,0.E0,1.8125E0)); #9995=DIRECTION('',(0.E0,0.E0,1.E0)); #9996=DIRECTION('',(-1.E0,0.E0,0.E0)); #9997=AXIS2_PLACEMENT_3D('',#9994,#9995,#9996); #9998=PLANE('',#9997); #9999=ORIENTED_EDGE('',*,*,#5730,.F.); #10001=ORIENTED_EDGE('',*,*,#10000,.T.); #10003=ORIENTED_EDGE('',*,*,#10002,.T.); #10004=ORIENTED_EDGE('',*,*,#9986,.F.); #10005=EDGE_LOOP('',(#9999,#10001,#10003,#10004)); #10006=FACE_OUTER_BOUND('',#10005,.F.); #10007=ADVANCED_FACE('',(#10006),#9998,.F.); #10008=CARTESIAN_POINT('',(1.05E1,0.E0,1.25E0)); #10009=DIRECTION('',(0.E0,-1.E0,0.E0)); #10010=DIRECTION('',(1.E0,0.E0,0.E0)); #10011=AXIS2_PLACEMENT_3D('',#10008,#10009,#10010); #10012=CYLINDRICAL_SURFACE('',#10011,5.625E-1); #10013=ORIENTED_EDGE('',*,*,#5728,.F.); #10014=ORIENTED_EDGE('',*,*,#9975,.T.); #10016=ORIENTED_EDGE('',*,*,#10015,.T.); #10017=ORIENTED_EDGE('',*,*,#10000,.F.); #10018=EDGE_LOOP('',(#10013,#10014,#10016,#10017)); #10019=FACE_OUTER_BOUND('',#10018,.F.); #10020=ADVANCED_FACE('',(#10019),#10012,.F.); #10021=CARTESIAN_POINT('',(0.E0,6.875E-1,0.E0)); #10022=DIRECTION('',(0.E0,-1.E0,0.E0)); #10023=DIRECTION('',(1.E0,0.E0,0.E0)); #10024=AXIS2_PLACEMENT_3D('',#10021,#10022,#10023); #10025=PLANE('',#10024); #10026=ORIENTED_EDGE('',*,*,#9973,.F.); #10027=ORIENTED_EDGE('',*,*,#9988,.F.); #10028=ORIENTED_EDGE('',*,*,#10002,.F.); #10029=ORIENTED_EDGE('',*,*,#10015,.F.); #10030=EDGE_LOOP('',(#10026,#10027,#10028,#10029)); #10031=FACE_OUTER_BOUND('',#10030,.F.); #10032=ADVANCED_FACE('',(#10031),#10025,.T.); #10033=CARTESIAN_POINT('',(0.E0,6.875E-1,0.E0)); #10034=DIRECTION('',(0.E0,-1.E0,0.E0)); #10035=DIRECTION('',(1.E0,0.E0,0.E0)); #10036=AXIS2_PLACEMENT_3D('',#10033,#10034,#10035); #10037=PLANE('',#10036); #10039=ORIENTED_EDGE('',*,*,#10038,.F.); #10041=ORIENTED_EDGE('',*,*,#10040,.F.); #10043=ORIENTED_EDGE('',*,*,#10042,.F.); #10045=ORIENTED_EDGE('',*,*,#10044,.F.); #10047=ORIENTED_EDGE('',*,*,#10046,.F.); #10048=EDGE_LOOP('',(#10039,#10041,#10043,#10045,#10047)); #10049=FACE_OUTER_BOUND('',#10048,.F.); #10050=ADVANCED_FACE('',(#10049),#10037,.T.); #10051=CARTESIAN_POINT('',(1.455736763592E0,-6.892397422826E-2, 4.577195232320E0)); #10052=DIRECTION('',(0.E0,1.E0,0.E0)); #10053=DIRECTION('',(-7.071067811865E-1,0.E0,-7.071067811865E-1)); #10054=AXIS2_PLACEMENT_3D('',#10051,#10052,#10053); #10055=CYLINDRICAL_SURFACE('',#10054,7.5E-1); #10057=ORIENTED_EDGE('',*,*,#10056,.F.); #10058=ORIENTED_EDGE('',*,*,#5738,.T.); #10060=ORIENTED_EDGE('',*,*,#10059,.T.); #10061=ORIENTED_EDGE('',*,*,#10038,.T.); #10062=EDGE_LOOP('',(#10057,#10058,#10060,#10061)); #10063=FACE_OUTER_BOUND('',#10062,.F.); #10064=ADVANCED_FACE('',(#10063),#10055,.F.); #10065=CARTESIAN_POINT('',(6.875E-1,0.E0,4.284771824132E0)); #10066=DIRECTION('',(-7.071067811865E-1,0.E0,-7.071067811865E-1)); #10067=DIRECTION('',(7.071067811865E-1,0.E0,-7.071067811865E-1)); #10068=AXIS2_PLACEMENT_3D('',#10065,#10066,#10067); #10069=PLANE('',#10068); #10070=ORIENTED_EDGE('',*,*,#10056,.T.); #10071=ORIENTED_EDGE('',*,*,#10046,.T.); #10073=ORIENTED_EDGE('',*,*,#10072,.F.); #10074=ORIENTED_EDGE('',*,*,#5740,.F.); #10075=EDGE_LOOP('',(#10070,#10071,#10073,#10074)); #10076=FACE_OUTER_BOUND('',#10075,.F.); #10077=ADVANCED_FACE('',(#10076),#10069,.F.); #10078=CARTESIAN_POINT('',(4.553039342392E0,0.E0,1.645354088550E0)); #10079=DIRECTION('',(0.E0,-1.E0,0.E0)); #10080=DIRECTION('',(1.E0,0.E0,0.E0)); #10081=AXIS2_PLACEMENT_3D('',#10078,#10079,#10080); #10082=CYLINDRICAL_SURFACE('',#10081,8.669989027347E-1); #10083=ORIENTED_EDGE('',*,*,#5742,.F.); #10084=ORIENTED_EDGE('',*,*,#10072,.T.); #10085=ORIENTED_EDGE('',*,*,#10044,.T.); #10087=ORIENTED_EDGE('',*,*,#10086,.F.); #10088=EDGE_LOOP('',(#10083,#10084,#10085,#10087)); #10089=FACE_OUTER_BOUND('',#10088,.F.); #10090=ADVANCED_FACE('',(#10089),#10082,.F.); #10091=CARTESIAN_POINT('',(7.5E0,0.E0,7.5E0)); #10092=DIRECTION('',(0.E0,-1.E0,0.E0)); #10093=DIRECTION('',(1.E0,0.E0,0.E0)); #10094=AXIS2_PLACEMENT_3D('',#10091,#10092,#10093); #10095=CYLINDRICAL_SURFACE('',#10094,5.6875E0); #10096=ORIENTED_EDGE('',*,*,#5744,.T.); #10097=ORIENTED_EDGE('',*,*,#10086,.T.); #10098=ORIENTED_EDGE('',*,*,#10042,.T.); #10100=ORIENTED_EDGE('',*,*,#10099,.F.); #10101=EDGE_LOOP('',(#10096,#10097,#10098,#10100)); #10102=FACE_OUTER_BOUND('',#10101,.F.); #10103=ADVANCED_FACE('',(#10102),#10095,.T.); #10104=CARTESIAN_POINT('',(1.61E0,0.E0,4.5E0)); #10105=DIRECTION('',(0.E0,-1.E0,0.E0)); #10106=DIRECTION('',(1.E0,0.E0,0.E0)); #10107=AXIS2_PLACEMENT_3D('',#10104,#10105,#10106); #10108=CYLINDRICAL_SURFACE('',#10107,9.225E-1); #10109=ORIENTED_EDGE('',*,*,#10059,.F.); #10110=ORIENTED_EDGE('',*,*,#5736,.F.); #10111=ORIENTED_EDGE('',*,*,#10099,.T.); #10112=ORIENTED_EDGE('',*,*,#10040,.T.); #10113=EDGE_LOOP('',(#10109,#10110,#10111,#10112)); #10114=FACE_OUTER_BOUND('',#10113,.F.); #10115=ADVANCED_FACE('',(#10114),#10108,.F.); #10116=CARTESIAN_POINT('',(-1.85E-1,7.463919417831E-1,7.815E0)); #10117=DIRECTION('',(0.E0,-1.E0,0.E0)); #10118=DIRECTION('',(1.E0,0.E0,0.E0)); #10119=AXIS2_PLACEMENT_3D('',#10116,#10117,#10118); #10120=CYLINDRICAL_SURFACE('',#10119,8.75E-1); #10122=ORIENTED_EDGE('',*,*,#10121,.T.); #10123=ORIENTED_EDGE('',*,*,#5748,.T.); #10125=ORIENTED_EDGE('',*,*,#10124,.F.); #10127=ORIENTED_EDGE('',*,*,#10126,.T.); #10128=EDGE_LOOP('',(#10122,#10123,#10125,#10127)); #10129=FACE_OUTER_BOUND('',#10128,.F.); #10130=ADVANCED_FACE('',(#10129),#10120,.T.); #10131=CARTESIAN_POINT('',(6.9E-1,0.E0,8.69E0)); #10132=DIRECTION('',(-1.E0,0.E0,0.E0)); #10133=DIRECTION('',(0.E0,0.E0,-1.E0)); #10134=AXIS2_PLACEMENT_3D('',#10131,#10132,#10133); #10135=PLANE('',#10134); #10136=ORIENTED_EDGE('',*,*,#10121,.F.); #10138=ORIENTED_EDGE('',*,*,#10137,.T.); #10140=ORIENTED_EDGE('',*,*,#10139,.F.); #10141=ORIENTED_EDGE('',*,*,#5750,.F.); #10142=EDGE_LOOP('',(#10136,#10138,#10140,#10141)); #10143=FACE_OUTER_BOUND('',#10142,.F.); #10144=ADVANCED_FACE('',(#10143),#10135,.F.); #10145=CARTESIAN_POINT('',(0.E0,6.875E-1,0.E0)); #10146=DIRECTION('',(0.E0,-1.E0,0.E0)); #10147=DIRECTION('',(1.E0,0.E0,0.E0)); #10148=AXIS2_PLACEMENT_3D('',#10145,#10146,#10147); #10149=PLANE('',#10148); #10151=ORIENTED_EDGE('',*,*,#10150,.F.); #10153=ORIENTED_EDGE('',*,*,#10152,.F.); #10155=ORIENTED_EDGE('',*,*,#10154,.F.); #10157=ORIENTED_EDGE('',*,*,#10156,.F.); #10158=ORIENTED_EDGE('',*,*,#10137,.F.); #10159=ORIENTED_EDGE('',*,*,#10126,.F.); #10161=ORIENTED_EDGE('',*,*,#10160,.F.); #10163=ORIENTED_EDGE('',*,*,#10162,.F.); #10165=ORIENTED_EDGE('',*,*,#10164,.F.); #10167=ORIENTED_EDGE('',*,*,#10166,.F.); #10169=ORIENTED_EDGE('',*,*,#10168,.F.); #10171=ORIENTED_EDGE('',*,*,#10170,.F.); #10173=ORIENTED_EDGE('',*,*,#10172,.F.); #10175=ORIENTED_EDGE('',*,*,#10174,.F.); #10176=EDGE_LOOP('',(#10151,#10153,#10155,#10157,#10158,#10159,#10161,#10163, #10165,#10167,#10169,#10171,#10173,#10175)); #10177=FACE_OUTER_BOUND('',#10176,.F.); #10178=ADVANCED_FACE('',(#10177),#10149,.T.); #10179=CARTESIAN_POINT('',(1.8125E0,0.E0,8.69E0)); #10180=DIRECTION('',(0.E0,0.E0,-1.E0)); #10181=DIRECTION('',(1.E0,0.E0,0.E0)); #10182=AXIS2_PLACEMENT_3D('',#10179,#10180,#10181); #10183=PLANE('',#10182); #10185=ORIENTED_EDGE('',*,*,#10184,.F.); #10186=ORIENTED_EDGE('',*,*,#10150,.T.); #10188=ORIENTED_EDGE('',*,*,#10187,.F.); #10189=ORIENTED_EDGE('',*,*,#5758,.F.); #10190=EDGE_LOOP('',(#10185,#10186,#10188,#10189)); #10191=FACE_OUTER_BOUND('',#10190,.F.); #10192=ADVANCED_FACE('',(#10191),#10183,.F.); #10193=CARTESIAN_POINT('',(2.6875E0,7.463919417831E-1,7.815E0)); #10194=DIRECTION('',(0.E0,-1.E0,0.E0)); #10195=DIRECTION('',(0.E0,0.E0,1.E0)); #10196=AXIS2_PLACEMENT_3D('',#10193,#10194,#10195); #10197=CYLINDRICAL_SURFACE('',#10196,8.75E-1); #10198=ORIENTED_EDGE('',*,*,#10184,.T.); #10199=ORIENTED_EDGE('',*,*,#5756,.T.); #10201=ORIENTED_EDGE('',*,*,#10200,.F.); #10202=ORIENTED_EDGE('',*,*,#10152,.T.); #10203=EDGE_LOOP('',(#10198,#10199,#10201,#10202)); #10204=FACE_OUTER_BOUND('',#10203,.F.); #10205=ADVANCED_FACE('',(#10204),#10197,.T.); #10206=CARTESIAN_POINT('',(1.8125E0,0.E0,7.5E0)); #10207=DIRECTION('',(1.E0,0.E0,0.E0)); #10208=DIRECTION('',(0.E0,0.E0,1.E0)); #10209=AXIS2_PLACEMENT_3D('',#10206,#10207,#10208); #10210=PLANE('',#10209); #10211=ORIENTED_EDGE('',*,*,#10200,.T.); #10212=ORIENTED_EDGE('',*,*,#5754,.F.); #10214=ORIENTED_EDGE('',*,*,#10213,.T.); #10215=ORIENTED_EDGE('',*,*,#10154,.T.); #10216=EDGE_LOOP('',(#10211,#10212,#10214,#10215)); #10217=FACE_OUTER_BOUND('',#10216,.F.); #10218=ADVANCED_FACE('',(#10217),#10210,.F.); #10219=CARTESIAN_POINT('',(1.25125E0,0.E0,7.5E0)); #10220=DIRECTION('',(0.E0,-1.E0,0.E0)); #10221=DIRECTION('',(1.E0,0.E0,0.E0)); #10222=AXIS2_PLACEMENT_3D('',#10219,#10220,#10221); #10223=CYLINDRICAL_SURFACE('',#10222,5.6125E-1); #10224=ORIENTED_EDGE('',*,*,#5752,.F.); #10225=ORIENTED_EDGE('',*,*,#10139,.T.); #10226=ORIENTED_EDGE('',*,*,#10156,.T.); #10227=ORIENTED_EDGE('',*,*,#10213,.F.); #10228=EDGE_LOOP('',(#10224,#10225,#10226,#10227)); #10229=FACE_OUTER_BOUND('',#10228,.F.); #10230=ADVANCED_FACE('',(#10229),#10223,.F.); #10231=CARTESIAN_POINT('',(3.4375E0,-6.892397422826E-2,9.565E0)); #10232=DIRECTION('',(0.E0,1.E0,0.E0)); #10233=DIRECTION('',(1.E0,0.E0,0.E0)); #10234=AXIS2_PLACEMENT_3D('',#10231,#10232,#10233); #10235=CYLINDRICAL_SURFACE('',#10234,8.75E-1); #10237=ORIENTED_EDGE('',*,*,#10236,.F.); #10238=ORIENTED_EDGE('',*,*,#5760,.T.); #10239=ORIENTED_EDGE('',*,*,#10187,.T.); #10240=ORIENTED_EDGE('',*,*,#10174,.T.); #10241=EDGE_LOOP('',(#10237,#10238,#10239,#10240)); #10242=FACE_OUTER_BOUND('',#10241,.F.); #10243=ADVANCED_FACE('',(#10242),#10235,.F.); #10244=CARTESIAN_POINT('',(4.3125E0,0.E0,8.69E0)); #10245=DIRECTION('',(1.E0,0.E0,0.E0)); #10246=DIRECTION('',(0.E0,0.E0,1.E0)); #10247=AXIS2_PLACEMENT_3D('',#10244,#10245,#10246); #10248=PLANE('',#10247); #10249=ORIENTED_EDGE('',*,*,#10236,.T.); #10250=ORIENTED_EDGE('',*,*,#10172,.T.); #10252=ORIENTED_EDGE('',*,*,#10251,.F.); #10253=ORIENTED_EDGE('',*,*,#5762,.F.); #10254=EDGE_LOOP('',(#10249,#10250,#10252,#10253)); #10255=FACE_OUTER_BOUND('',#10254,.F.); #10256=ADVANCED_FACE('',(#10255),#10248,.F.); #10257=CARTESIAN_POINT('',(3.4375E0,-6.892397422826E-2,1.0375E1)); #10258=DIRECTION('',(0.E0,1.E0,0.E0)); #10259=DIRECTION('',(0.E0,0.E0,1.E0)); #10260=AXIS2_PLACEMENT_3D('',#10257,#10258,#10259); #10261=CYLINDRICAL_SURFACE('',#10260,8.75E-1); #10263=ORIENTED_EDGE('',*,*,#10262,.F.); #10264=ORIENTED_EDGE('',*,*,#5764,.T.); #10265=ORIENTED_EDGE('',*,*,#10251,.T.); #10266=ORIENTED_EDGE('',*,*,#10170,.T.); #10267=EDGE_LOOP('',(#10263,#10264,#10265,#10266)); #10268=FACE_OUTER_BOUND('',#10267,.F.); #10269=ADVANCED_FACE('',(#10268),#10261,.F.); #10270=CARTESIAN_POINT('',(4.3125E0,0.E0,1.125E1)); #10271=DIRECTION('',(0.E0,0.E0,1.E0)); #10272=DIRECTION('',(-1.E0,0.E0,0.E0)); #10273=AXIS2_PLACEMENT_3D('',#10270,#10271,#10272); #10274=PLANE('',#10273); #10276=ORIENTED_EDGE('',*,*,#10275,.F.); #10277=ORIENTED_EDGE('',*,*,#5766,.F.); #10278=ORIENTED_EDGE('',*,*,#10262,.T.); #10279=ORIENTED_EDGE('',*,*,#10168,.T.); #10280=EDGE_LOOP('',(#10276,#10277,#10278,#10279)); #10281=FACE_OUTER_BOUND('',#10280,.F.); #10282=ADVANCED_FACE('',(#10281),#10274,.F.); #10283=CARTESIAN_POINT('',(-4.375E-1,-6.892397422826E-2,1.0375E1)); #10284=DIRECTION('',(0.E0,1.E0,0.E0)); #10285=DIRECTION('',(-1.E0,0.E0,0.E0)); #10286=AXIS2_PLACEMENT_3D('',#10283,#10284,#10285); #10287=CYLINDRICAL_SURFACE('',#10286,8.75E-1); #10289=ORIENTED_EDGE('',*,*,#10288,.F.); #10290=ORIENTED_EDGE('',*,*,#5768,.T.); #10291=ORIENTED_EDGE('',*,*,#10275,.T.); #10292=ORIENTED_EDGE('',*,*,#10166,.T.); #10293=EDGE_LOOP('',(#10289,#10290,#10291,#10292)); #10294=FACE_OUTER_BOUND('',#10293,.F.); #10295=ADVANCED_FACE('',(#10294),#10287,.F.); #10296=CARTESIAN_POINT('',(-1.3125E0,0.E0,1.125E1)); #10297=DIRECTION('',(-1.E0,0.E0,0.E0)); #10298=DIRECTION('',(0.E0,0.E0,-1.E0)); #10299=AXIS2_PLACEMENT_3D('',#10296,#10297,#10298); #10300=PLANE('',#10299); #10301=ORIENTED_EDGE('',*,*,#10288,.T.); #10302=ORIENTED_EDGE('',*,*,#10164,.T.); #10304=ORIENTED_EDGE('',*,*,#10303,.F.); #10305=ORIENTED_EDGE('',*,*,#5770,.F.); #10306=EDGE_LOOP('',(#10301,#10302,#10304,#10305)); #10307=FACE_OUTER_BOUND('',#10306,.F.); #10308=ADVANCED_FACE('',(#10307),#10300,.F.); #10309=CARTESIAN_POINT('',(-4.375E-1,-6.892397422826E-2,9.565E0)); #10310=DIRECTION('',(0.E0,1.E0,0.E0)); #10311=DIRECTION('',(0.E0,0.E0,-1.E0)); #10312=AXIS2_PLACEMENT_3D('',#10309,#10310,#10311); #10313=CYLINDRICAL_SURFACE('',#10312,8.75E-1); #10315=ORIENTED_EDGE('',*,*,#10314,.F.); #10316=ORIENTED_EDGE('',*,*,#5772,.T.); #10317=ORIENTED_EDGE('',*,*,#10303,.T.); #10318=ORIENTED_EDGE('',*,*,#10162,.T.); #10319=EDGE_LOOP('',(#10315,#10316,#10317,#10318)); #10320=FACE_OUTER_BOUND('',#10319,.F.); #10321=ADVANCED_FACE('',(#10320),#10313,.F.); #10322=CARTESIAN_POINT('',(-1.3125E0,0.E0,8.69E0)); #10323=DIRECTION('',(0.E0,0.E0,-1.E0)); #10324=DIRECTION('',(1.E0,0.E0,0.E0)); #10325=AXIS2_PLACEMENT_3D('',#10322,#10323,#10324); #10326=PLANE('',#10325); #10327=ORIENTED_EDGE('',*,*,#10124,.T.); #10328=ORIENTED_EDGE('',*,*,#5774,.F.); #10329=ORIENTED_EDGE('',*,*,#10314,.T.); #10330=ORIENTED_EDGE('',*,*,#10160,.T.); #10331=EDGE_LOOP('',(#10327,#10328,#10329,#10330)); #10332=FACE_OUTER_BOUND('',#10331,.F.); #10333=ADVANCED_FACE('',(#10332),#10326,.F.); #10334=CARTESIAN_POINT('',(6.875E-1,0.E0,1.65E1)); #10335=DIRECTION('',(-1.E0,0.E0,0.E0)); #10336=DIRECTION('',(0.E0,0.E0,-1.E0)); #10337=AXIS2_PLACEMENT_3D('',#10334,#10335,#10336); #10338=PLANE('',#10337); #10339=ORIENTED_EDGE('',*,*,#5778,.F.); #10341=ORIENTED_EDGE('',*,*,#10340,.T.); #10343=ORIENTED_EDGE('',*,*,#10342,.T.); #10345=ORIENTED_EDGE('',*,*,#10344,.F.); #10346=EDGE_LOOP('',(#10339,#10341,#10343,#10345)); #10347=FACE_OUTER_BOUND('',#10346,.F.); #10348=ADVANCED_FACE('',(#10347),#10338,.F.); #10349=CARTESIAN_POINT('',(1.25E0,0.E0,1.65E1)); #10350=DIRECTION('',(0.E0,-1.E0,0.E0)); #10351=DIRECTION('',(1.E0,0.E0,0.E0)); #10352=AXIS2_PLACEMENT_3D('',#10349,#10350,#10351); #10353=CYLINDRICAL_SURFACE('',#10352,5.625E-1); #10354=ORIENTED_EDGE('',*,*,#5784,.F.); #10356=ORIENTED_EDGE('',*,*,#10355,.T.); #10358=ORIENTED_EDGE('',*,*,#10357,.T.); #10359=ORIENTED_EDGE('',*,*,#10340,.F.); #10360=EDGE_LOOP('',(#10354,#10356,#10358,#10359)); #10361=FACE_OUTER_BOUND('',#10360,.F.); #10362=ADVANCED_FACE('',(#10361),#10353,.F.); #10363=CARTESIAN_POINT('',(1.8125E0,0.E0,1.35E1)); #10364=DIRECTION('',(1.E0,0.E0,0.E0)); #10365=DIRECTION('',(0.E0,0.E0,1.E0)); #10366=AXIS2_PLACEMENT_3D('',#10363,#10364,#10365); #10367=PLANE('',#10366); #10368=ORIENTED_EDGE('',*,*,#5782,.F.); #10370=ORIENTED_EDGE('',*,*,#10369,.T.); #10372=ORIENTED_EDGE('',*,*,#10371,.T.); #10373=ORIENTED_EDGE('',*,*,#10355,.F.); #10374=EDGE_LOOP('',(#10368,#10370,#10372,#10373)); #10375=FACE_OUTER_BOUND('',#10374,.F.); #10376=ADVANCED_FACE('',(#10375),#10367,.F.); #10377=CARTESIAN_POINT('',(1.25E0,0.E0,1.35E1)); #10378=DIRECTION('',(0.E0,-1.E0,0.E0)); #10379=DIRECTION('',(1.E0,0.E0,0.E0)); #10380=AXIS2_PLACEMENT_3D('',#10377,#10378,#10379); #10381=CYLINDRICAL_SURFACE('',#10380,5.625E-1); #10382=ORIENTED_EDGE('',*,*,#5780,.F.); #10383=ORIENTED_EDGE('',*,*,#10344,.T.); #10385=ORIENTED_EDGE('',*,*,#10384,.T.); #10386=ORIENTED_EDGE('',*,*,#10369,.F.); #10387=EDGE_LOOP('',(#10382,#10383,#10385,#10386)); #10388=FACE_OUTER_BOUND('',#10387,.F.); #10389=ADVANCED_FACE('',(#10388),#10381,.F.); #10390=CARTESIAN_POINT('',(0.E0,6.875E-1,0.E0)); #10391=DIRECTION('',(0.E0,-1.E0,0.E0)); #10392=DIRECTION('',(1.E0,0.E0,0.E0)); #10393=AXIS2_PLACEMENT_3D('',#10390,#10391,#10392); #10394=PLANE('',#10393); #10395=ORIENTED_EDGE('',*,*,#10342,.F.); #10396=ORIENTED_EDGE('',*,*,#10357,.F.); #10397=ORIENTED_EDGE('',*,*,#10371,.F.); #10398=ORIENTED_EDGE('',*,*,#10384,.F.); #10399=EDGE_LOOP('',(#10395,#10396,#10397,#10398)); #10400=FACE_OUTER_BOUND('',#10399,.F.); #10401=ADVANCED_FACE('',(#10400),#10394,.T.); #10402=CARTESIAN_POINT('',(6.875E-1,0.E0,2.25E1)); #10403=DIRECTION('',(-1.E0,0.E0,0.E0)); #10404=DIRECTION('',(0.E0,0.E0,-1.E0)); #10405=AXIS2_PLACEMENT_3D('',#10402,#10403,#10404); #10406=PLANE('',#10405); #10407=ORIENTED_EDGE('',*,*,#5788,.F.); #10409=ORIENTED_EDGE('',*,*,#10408,.T.); #10411=ORIENTED_EDGE('',*,*,#10410,.T.); #10413=ORIENTED_EDGE('',*,*,#10412,.F.); #10414=EDGE_LOOP('',(#10407,#10409,#10411,#10413)); #10415=FACE_OUTER_BOUND('',#10414,.F.); #10416=ADVANCED_FACE('',(#10415),#10406,.F.); #10417=CARTESIAN_POINT('',(1.25E0,0.E0,2.25E1)); #10418=DIRECTION('',(0.E0,-1.E0,0.E0)); #10419=DIRECTION('',(1.E0,0.E0,0.E0)); #10420=AXIS2_PLACEMENT_3D('',#10417,#10418,#10419); #10421=CYLINDRICAL_SURFACE('',#10420,5.625E-1); #10422=ORIENTED_EDGE('',*,*,#5794,.F.); #10424=ORIENTED_EDGE('',*,*,#10423,.T.); #10426=ORIENTED_EDGE('',*,*,#10425,.T.); #10427=ORIENTED_EDGE('',*,*,#10408,.F.); #10428=EDGE_LOOP('',(#10422,#10424,#10426,#10427)); #10429=FACE_OUTER_BOUND('',#10428,.F.); #10430=ADVANCED_FACE('',(#10429),#10421,.F.); #10431=CARTESIAN_POINT('',(1.8125E0,0.E0,1.95E1)); #10432=DIRECTION('',(1.E0,0.E0,0.E0)); #10433=DIRECTION('',(0.E0,0.E0,1.E0)); #10434=AXIS2_PLACEMENT_3D('',#10431,#10432,#10433); #10435=PLANE('',#10434); #10436=ORIENTED_EDGE('',*,*,#5792,.F.); #10438=ORIENTED_EDGE('',*,*,#10437,.T.); #10440=ORIENTED_EDGE('',*,*,#10439,.T.); #10441=ORIENTED_EDGE('',*,*,#10423,.F.); #10442=EDGE_LOOP('',(#10436,#10438,#10440,#10441)); #10443=FACE_OUTER_BOUND('',#10442,.F.); #10444=ADVANCED_FACE('',(#10443),#10435,.F.); #10445=CARTESIAN_POINT('',(1.25E0,0.E0,1.95E1)); #10446=DIRECTION('',(0.E0,-1.E0,0.E0)); #10447=DIRECTION('',(1.E0,0.E0,0.E0)); #10448=AXIS2_PLACEMENT_3D('',#10445,#10446,#10447); #10449=CYLINDRICAL_SURFACE('',#10448,5.625E-1); #10450=ORIENTED_EDGE('',*,*,#5790,.F.); #10451=ORIENTED_EDGE('',*,*,#10412,.T.); #10453=ORIENTED_EDGE('',*,*,#10452,.T.); #10454=ORIENTED_EDGE('',*,*,#10437,.F.); #10455=EDGE_LOOP('',(#10450,#10451,#10453,#10454)); #10456=FACE_OUTER_BOUND('',#10455,.F.); #10457=ADVANCED_FACE('',(#10456),#10449,.F.); #10458=CARTESIAN_POINT('',(0.E0,6.875E-1,0.E0)); #10459=DIRECTION('',(0.E0,-1.E0,0.E0)); #10460=DIRECTION('',(1.E0,0.E0,0.E0)); #10461=AXIS2_PLACEMENT_3D('',#10458,#10459,#10460); #10462=PLANE('',#10461); #10463=ORIENTED_EDGE('',*,*,#10410,.F.); #10464=ORIENTED_EDGE('',*,*,#10425,.F.); #10465=ORIENTED_EDGE('',*,*,#10439,.F.); #10466=ORIENTED_EDGE('',*,*,#10452,.F.); #10467=EDGE_LOOP('',(#10463,#10464,#10465,#10466)); #10468=FACE_OUTER_BOUND('',#10467,.F.); #10469=ADVANCED_FACE('',(#10468),#10462,.T.); #10470=CARTESIAN_POINT('',(7.5E0,0.E0,8.5E0)); #10471=DIRECTION('',(0.E0,0.E0,-1.E0)); #10472=DIRECTION('',(1.E0,0.E0,0.E0)); #10473=AXIS2_PLACEMENT_3D('',#10470,#10471,#10472); #10474=PLANE('',#10473); #10475=ORIENTED_EDGE('',*,*,#5798,.F.); #10477=ORIENTED_EDGE('',*,*,#10476,.T.); #10479=ORIENTED_EDGE('',*,*,#10478,.T.); #10481=ORIENTED_EDGE('',*,*,#10480,.F.); #10482=EDGE_LOOP('',(#10475,#10477,#10479,#10481)); #10483=FACE_OUTER_BOUND('',#10482,.F.); #10484=ADVANCED_FACE('',(#10483),#10474,.F.); #10485=CARTESIAN_POINT('',(7.5E0,0.E0,9.E0)); #10486=DIRECTION('',(0.E0,-1.E0,0.E0)); #10487=DIRECTION('',(1.E0,0.E0,0.E0)); #10488=AXIS2_PLACEMENT_3D('',#10485,#10486,#10487); #10489=CYLINDRICAL_SURFACE('',#10488,5.E-1); #10490=ORIENTED_EDGE('',*,*,#5804,.F.); #10492=ORIENTED_EDGE('',*,*,#10491,.T.); #10494=ORIENTED_EDGE('',*,*,#10493,.T.); #10495=ORIENTED_EDGE('',*,*,#10476,.F.); #10496=EDGE_LOOP('',(#10490,#10492,#10494,#10495)); #10497=FACE_OUTER_BOUND('',#10496,.F.); #10498=ADVANCED_FACE('',(#10497),#10489,.F.); #10499=CARTESIAN_POINT('',(1.05E1,0.E0,9.5E0)); #10500=DIRECTION('',(0.E0,0.E0,1.E0)); #10501=DIRECTION('',(-1.E0,0.E0,0.E0)); #10502=AXIS2_PLACEMENT_3D('',#10499,#10500,#10501); #10503=PLANE('',#10502); #10504=ORIENTED_EDGE('',*,*,#5802,.F.); #10506=ORIENTED_EDGE('',*,*,#10505,.T.); #10508=ORIENTED_EDGE('',*,*,#10507,.T.); #10509=ORIENTED_EDGE('',*,*,#10491,.F.); #10510=EDGE_LOOP('',(#10504,#10506,#10508,#10509)); #10511=FACE_OUTER_BOUND('',#10510,.F.); #10512=ADVANCED_FACE('',(#10511),#10503,.F.); #10513=CARTESIAN_POINT('',(1.05E1,0.E0,9.E0)); #10514=DIRECTION('',(0.E0,-1.E0,0.E0)); #10515=DIRECTION('',(1.E0,0.E0,0.E0)); #10516=AXIS2_PLACEMENT_3D('',#10513,#10514,#10515); #10517=CYLINDRICAL_SURFACE('',#10516,5.E-1); #10518=ORIENTED_EDGE('',*,*,#5800,.F.); #10519=ORIENTED_EDGE('',*,*,#10480,.T.); #10521=ORIENTED_EDGE('',*,*,#10520,.T.); #10522=ORIENTED_EDGE('',*,*,#10505,.F.); #10523=EDGE_LOOP('',(#10518,#10519,#10521,#10522)); #10524=FACE_OUTER_BOUND('',#10523,.F.); #10525=ADVANCED_FACE('',(#10524),#10517,.F.); #10526=CARTESIAN_POINT('',(0.E0,6.875E-1,0.E0)); #10527=DIRECTION('',(0.E0,-1.E0,0.E0)); #10528=DIRECTION('',(1.E0,0.E0,0.E0)); #10529=AXIS2_PLACEMENT_3D('',#10526,#10527,#10528); #10530=PLANE('',#10529); #10531=ORIENTED_EDGE('',*,*,#10478,.F.); #10532=ORIENTED_EDGE('',*,*,#10493,.F.); #10533=ORIENTED_EDGE('',*,*,#10507,.F.); #10534=ORIENTED_EDGE('',*,*,#10520,.F.); #10535=EDGE_LOOP('',(#10531,#10532,#10533,#10534)); #10536=FACE_OUTER_BOUND('',#10535,.F.); #10537=ADVANCED_FACE('',(#10536),#10530,.T.); #10538=CARTESIAN_POINT('',(7.5E0,0.E0,1.75625E1)); #10539=DIRECTION('',(0.E0,0.E0,-1.E0)); #10540=DIRECTION('',(1.E0,0.E0,0.E0)); #10541=AXIS2_PLACEMENT_3D('',#10538,#10539,#10540); #10542=PLANE('',#10541); #10543=ORIENTED_EDGE('',*,*,#5808,.F.); #10545=ORIENTED_EDGE('',*,*,#10544,.T.); #10547=ORIENTED_EDGE('',*,*,#10546,.T.); #10549=ORIENTED_EDGE('',*,*,#10548,.F.); #10550=EDGE_LOOP('',(#10543,#10545,#10547,#10549)); #10551=FACE_OUTER_BOUND('',#10550,.F.); #10552=ADVANCED_FACE('',(#10551),#10542,.F.); #10553=CARTESIAN_POINT('',(7.5E0,0.E0,1.8E1)); #10554=DIRECTION('',(0.E0,-1.E0,0.E0)); #10555=DIRECTION('',(1.E0,0.E0,0.E0)); #10556=AXIS2_PLACEMENT_3D('',#10553,#10554,#10555); #10557=CYLINDRICAL_SURFACE('',#10556,4.375E-1); #10558=ORIENTED_EDGE('',*,*,#5814,.F.); #10560=ORIENTED_EDGE('',*,*,#10559,.T.); #10562=ORIENTED_EDGE('',*,*,#10561,.T.); #10563=ORIENTED_EDGE('',*,*,#10544,.F.); #10564=EDGE_LOOP('',(#10558,#10560,#10562,#10563)); #10565=FACE_OUTER_BOUND('',#10564,.F.); #10566=ADVANCED_FACE('',(#10565),#10557,.F.); #10567=CARTESIAN_POINT('',(1.05E1,0.E0,1.84375E1)); #10568=DIRECTION('',(0.E0,0.E0,1.E0)); #10569=DIRECTION('',(-1.E0,0.E0,0.E0)); #10570=AXIS2_PLACEMENT_3D('',#10567,#10568,#10569); #10571=PLANE('',#10570); #10572=ORIENTED_EDGE('',*,*,#5812,.F.); #10574=ORIENTED_EDGE('',*,*,#10573,.T.); #10576=ORIENTED_EDGE('',*,*,#10575,.T.); #10577=ORIENTED_EDGE('',*,*,#10559,.F.); #10578=EDGE_LOOP('',(#10572,#10574,#10576,#10577)); #10579=FACE_OUTER_BOUND('',#10578,.F.); #10580=ADVANCED_FACE('',(#10579),#10571,.F.); #10581=CARTESIAN_POINT('',(1.05E1,0.E0,1.8E1)); #10582=DIRECTION('',(0.E0,-1.E0,0.E0)); #10583=DIRECTION('',(1.E0,0.E0,0.E0)); #10584=AXIS2_PLACEMENT_3D('',#10581,#10582,#10583); #10585=CYLINDRICAL_SURFACE('',#10584,4.375E-1); #10586=ORIENTED_EDGE('',*,*,#5810,.F.); #10587=ORIENTED_EDGE('',*,*,#10548,.T.); #10589=ORIENTED_EDGE('',*,*,#10588,.T.); #10590=ORIENTED_EDGE('',*,*,#10573,.F.); #10591=EDGE_LOOP('',(#10586,#10587,#10589,#10590)); #10592=FACE_OUTER_BOUND('',#10591,.F.); #10593=ADVANCED_FACE('',(#10592),#10585,.F.); #10594=CARTESIAN_POINT('',(0.E0,6.875E-1,0.E0)); #10595=DIRECTION('',(0.E0,-1.E0,0.E0)); #10596=DIRECTION('',(1.E0,0.E0,0.E0)); #10597=AXIS2_PLACEMENT_3D('',#10594,#10595,#10596); #10598=PLANE('',#10597); #10599=ORIENTED_EDGE('',*,*,#10546,.F.); #10600=ORIENTED_EDGE('',*,*,#10561,.F.); #10601=ORIENTED_EDGE('',*,*,#10575,.F.); #10602=ORIENTED_EDGE('',*,*,#10588,.F.); #10603=EDGE_LOOP('',(#10599,#10600,#10601,#10602)); #10604=FACE_OUTER_BOUND('',#10603,.F.); #10605=ADVANCED_FACE('',(#10604),#10598,.T.); #10606=CARTESIAN_POINT('',(7.5E0,0.E0,3.13125E1)); #10607=DIRECTION('',(0.E0,0.E0,-1.E0)); #10608=DIRECTION('',(1.E0,0.E0,0.E0)); #10609=AXIS2_PLACEMENT_3D('',#10606,#10607,#10608); #10610=PLANE('',#10609); #10611=ORIENTED_EDGE('',*,*,#5818,.T.); #10613=ORIENTED_EDGE('',*,*,#10612,.T.); #10615=ORIENTED_EDGE('',*,*,#10614,.F.); #10617=ORIENTED_EDGE('',*,*,#10616,.F.); #10618=EDGE_LOOP('',(#10611,#10613,#10615,#10617)); #10619=FACE_OUTER_BOUND('',#10618,.F.); #10620=ADVANCED_FACE('',(#10619),#10610,.T.); #10621=CARTESIAN_POINT('',(1.05E1,0.E0,3.075E1)); #10622=DIRECTION('',(0.E0,1.E0,0.E0)); #10623=DIRECTION('',(1.E0,0.E0,0.E0)); #10624=AXIS2_PLACEMENT_3D('',#10621,#10622,#10623); #10625=CYLINDRICAL_SURFACE('',#10624,5.625E-1); #10626=ORIENTED_EDGE('',*,*,#5824,.T.); #10628=ORIENTED_EDGE('',*,*,#10627,.T.); #10630=ORIENTED_EDGE('',*,*,#10629,.F.); #10631=ORIENTED_EDGE('',*,*,#10612,.F.); #10632=EDGE_LOOP('',(#10626,#10628,#10630,#10631)); #10633=FACE_OUTER_BOUND('',#10632,.F.); #10634=ADVANCED_FACE('',(#10633),#10625,.F.); #10635=CARTESIAN_POINT('',(1.05E1,0.E0,3.01875E1)); #10636=DIRECTION('',(0.E0,0.E0,1.E0)); #10637=DIRECTION('',(-1.E0,0.E0,0.E0)); #10638=AXIS2_PLACEMENT_3D('',#10635,#10636,#10637); #10639=PLANE('',#10638); #10640=ORIENTED_EDGE('',*,*,#5822,.T.); #10642=ORIENTED_EDGE('',*,*,#10641,.T.); #10644=ORIENTED_EDGE('',*,*,#10643,.F.); #10645=ORIENTED_EDGE('',*,*,#10627,.F.); #10646=EDGE_LOOP('',(#10640,#10642,#10644,#10645)); #10647=FACE_OUTER_BOUND('',#10646,.F.); #10648=ADVANCED_FACE('',(#10647),#10639,.T.); #10649=CARTESIAN_POINT('',(7.5E0,0.E0,3.075E1)); #10650=DIRECTION('',(0.E0,1.E0,0.E0)); #10651=DIRECTION('',(1.E0,0.E0,0.E0)); #10652=AXIS2_PLACEMENT_3D('',#10649,#10650,#10651); #10653=CYLINDRICAL_SURFACE('',#10652,5.625E-1); #10654=ORIENTED_EDGE('',*,*,#5820,.T.); #10655=ORIENTED_EDGE('',*,*,#10616,.T.); #10657=ORIENTED_EDGE('',*,*,#10656,.F.); #10658=ORIENTED_EDGE('',*,*,#10641,.F.); #10659=EDGE_LOOP('',(#10654,#10655,#10657,#10658)); #10660=FACE_OUTER_BOUND('',#10659,.F.); #10661=ADVANCED_FACE('',(#10660),#10653,.F.); #10662=CARTESIAN_POINT('',(0.E0,6.875E-1,3.2E1)); #10663=DIRECTION('',(0.E0,1.E0,0.E0)); #10664=DIRECTION('',(1.E0,0.E0,0.E0)); #10665=AXIS2_PLACEMENT_3D('',#10662,#10663,#10664); #10666=PLANE('',#10665); #10667=ORIENTED_EDGE('',*,*,#10614,.T.); #10668=ORIENTED_EDGE('',*,*,#10629,.T.); #10669=ORIENTED_EDGE('',*,*,#10643,.T.); #10670=ORIENTED_EDGE('',*,*,#10656,.T.); #10671=EDGE_LOOP('',(#10667,#10668,#10669,#10670)); #10672=FACE_OUTER_BOUND('',#10671,.F.); #10673=ADVANCED_FACE('',(#10672),#10666,.F.); #10674=CARTESIAN_POINT('',(0.E0,6.875E-1,3.2E1)); #10675=DIRECTION('',(0.E0,1.E0,0.E0)); #10676=DIRECTION('',(1.E0,0.E0,0.E0)); #10677=AXIS2_PLACEMENT_3D('',#10674,#10675,#10676); #10678=PLANE('',#10677); #10680=ORIENTED_EDGE('',*,*,#10679,.F.); #10682=ORIENTED_EDGE('',*,*,#10681,.T.); #10684=ORIENTED_EDGE('',*,*,#10683,.T.); #10686=ORIENTED_EDGE('',*,*,#10685,.T.); #10688=ORIENTED_EDGE('',*,*,#10687,.T.); #10689=EDGE_LOOP('',(#10680,#10682,#10684,#10686,#10688)); #10690=FACE_OUTER_BOUND('',#10689,.F.); #10691=ADVANCED_FACE('',(#10690),#10678,.F.); #10692=CARTESIAN_POINT('',(1.455736763592E0,-6.642389448824E-2, 2.742280476768E1)); #10693=DIRECTION('',(0.E0,1.E0,0.E0)); #10694=DIRECTION('',(-8.942796313519E-1,0.E0,-4.475085931567E-1)); #10695=AXIS2_PLACEMENT_3D('',#10692,#10693,#10694); #10696=CYLINDRICAL_SURFACE('',#10695,7.5E-1); #10698=ORIENTED_EDGE('',*,*,#10697,.F.); #10699=ORIENTED_EDGE('',*,*,#5932,.T.); #10701=ORIENTED_EDGE('',*,*,#10700,.T.); #10702=ORIENTED_EDGE('',*,*,#10679,.T.); #10703=EDGE_LOOP('',(#10698,#10699,#10701,#10702)); #10704=FACE_OUTER_BOUND('',#10703,.F.); #10705=ADVANCED_FACE('',(#10704),#10696,.F.); #10706=CARTESIAN_POINT('',(1.61E0,0.E0,2.75E1)); #10707=DIRECTION('',(0.E0,1.E0,0.E0)); #10708=DIRECTION('',(1.E0,0.E0,0.E0)); #10709=AXIS2_PLACEMENT_3D('',#10706,#10707,#10708); #10710=CYLINDRICAL_SURFACE('',#10709,9.225E-1); #10711=ORIENTED_EDGE('',*,*,#10697,.T.); #10712=ORIENTED_EDGE('',*,*,#10687,.F.); #10714=ORIENTED_EDGE('',*,*,#10713,.F.); #10715=ORIENTED_EDGE('',*,*,#5934,.T.); #10716=EDGE_LOOP('',(#10711,#10712,#10714,#10715)); #10717=FACE_OUTER_BOUND('',#10716,.F.); #10718=ADVANCED_FACE('',(#10717),#10710,.F.); #10719=CARTESIAN_POINT('',(7.5E0,0.E0,2.45E1)); #10720=DIRECTION('',(0.E0,1.E0,0.E0)); #10721=DIRECTION('',(1.E0,0.E0,0.E0)); #10722=AXIS2_PLACEMENT_3D('',#10719,#10720,#10721); #10723=CYLINDRICAL_SURFACE('',#10722,5.6875E0); #10724=ORIENTED_EDGE('',*,*,#5936,.F.); #10725=ORIENTED_EDGE('',*,*,#10713,.T.); #10726=ORIENTED_EDGE('',*,*,#10685,.F.); #10728=ORIENTED_EDGE('',*,*,#10727,.F.); #10729=EDGE_LOOP('',(#10724,#10725,#10726,#10728)); #10730=FACE_OUTER_BOUND('',#10729,.F.); #10731=ADVANCED_FACE('',(#10730),#10723,.T.); #10732=CARTESIAN_POINT('',(4.553039342392E0,0.E0,3.035464591145E1)); #10733=DIRECTION('',(0.E0,1.E0,0.E0)); #10734=DIRECTION('',(1.E0,0.E0,0.E0)); #10735=AXIS2_PLACEMENT_3D('',#10732,#10733,#10734); #10736=CYLINDRICAL_SURFACE('',#10735,8.669989027347E-1); #10737=ORIENTED_EDGE('',*,*,#5938,.T.); #10738=ORIENTED_EDGE('',*,*,#10727,.T.); #10739=ORIENTED_EDGE('',*,*,#10683,.F.); #10741=ORIENTED_EDGE('',*,*,#10740,.F.); #10742=EDGE_LOOP('',(#10737,#10738,#10739,#10741)); #10743=FACE_OUTER_BOUND('',#10742,.F.); #10744=ADVANCED_FACE('',(#10743),#10736,.F.); #10745=CARTESIAN_POINT('',(6.875E-1,0.E0,2.771522817587E1)); #10746=DIRECTION('',(7.071067811865E-1,0.E0,-7.071067811865E-1)); #10747=DIRECTION('',(7.071067811865E-1,0.E0,7.071067811865E-1)); #10748=AXIS2_PLACEMENT_3D('',#10745,#10746,#10747); #10749=PLANE('',#10748); #10750=ORIENTED_EDGE('',*,*,#10700,.F.); #10751=ORIENTED_EDGE('',*,*,#5930,.T.); #10752=ORIENTED_EDGE('',*,*,#10740,.T.); #10753=ORIENTED_EDGE('',*,*,#10681,.F.); #10754=EDGE_LOOP('',(#10750,#10751,#10752,#10753)); #10755=FACE_OUTER_BOUND('',#10754,.F.); #10756=ADVANCED_FACE('',(#10755),#10749,.T.); #10757=CARTESIAN_POINT('',(1.65E1,0.E0,6.875E-1)); #10758=DIRECTION('',(0.E0,0.E0,1.E0)); #10759=DIRECTION('',(-1.E0,0.E0,0.E0)); #10760=AXIS2_PLACEMENT_3D('',#10757,#10758,#10759); #10761=PLANE('',#10760); #10762=ORIENTED_EDGE('',*,*,#5828,.T.); #10764=ORIENTED_EDGE('',*,*,#10763,.T.); #10766=ORIENTED_EDGE('',*,*,#10765,.F.); #10768=ORIENTED_EDGE('',*,*,#10767,.F.); #10769=EDGE_LOOP('',(#10762,#10764,#10766,#10768)); #10770=FACE_OUTER_BOUND('',#10769,.F.); #10771=ADVANCED_FACE('',(#10770),#10761,.T.); #10772=CARTESIAN_POINT('',(1.35E1,0.E0,1.25E0)); #10773=DIRECTION('',(0.E0,1.E0,0.E0)); #10774=DIRECTION('',(-1.E0,0.E0,0.E0)); #10775=AXIS2_PLACEMENT_3D('',#10772,#10773,#10774); #10776=CYLINDRICAL_SURFACE('',#10775,5.625E-1); #10777=ORIENTED_EDGE('',*,*,#5834,.T.); #10779=ORIENTED_EDGE('',*,*,#10778,.T.); #10781=ORIENTED_EDGE('',*,*,#10780,.F.); #10782=ORIENTED_EDGE('',*,*,#10763,.F.); #10783=EDGE_LOOP('',(#10777,#10779,#10781,#10782)); #10784=FACE_OUTER_BOUND('',#10783,.F.); #10785=ADVANCED_FACE('',(#10784),#10776,.F.); #10786=CARTESIAN_POINT('',(1.35E1,0.E0,1.8125E0)); #10787=DIRECTION('',(0.E0,0.E0,-1.E0)); #10788=DIRECTION('',(1.E0,0.E0,0.E0)); #10789=AXIS2_PLACEMENT_3D('',#10786,#10787,#10788); #10790=PLANE('',#10789); #10791=ORIENTED_EDGE('',*,*,#5832,.T.); #10793=ORIENTED_EDGE('',*,*,#10792,.T.); #10795=ORIENTED_EDGE('',*,*,#10794,.F.); #10796=ORIENTED_EDGE('',*,*,#10778,.F.); #10797=EDGE_LOOP('',(#10791,#10793,#10795,#10796)); #10798=FACE_OUTER_BOUND('',#10797,.F.); #10799=ADVANCED_FACE('',(#10798),#10790,.T.); #10800=CARTESIAN_POINT('',(1.65E1,0.E0,1.25E0)); #10801=DIRECTION('',(0.E0,1.E0,0.E0)); #10802=DIRECTION('',(-1.E0,0.E0,0.E0)); #10803=AXIS2_PLACEMENT_3D('',#10800,#10801,#10802); #10804=CYLINDRICAL_SURFACE('',#10803,5.625E-1); #10805=ORIENTED_EDGE('',*,*,#5830,.T.); #10806=ORIENTED_EDGE('',*,*,#10767,.T.); #10808=ORIENTED_EDGE('',*,*,#10807,.F.); #10809=ORIENTED_EDGE('',*,*,#10792,.F.); #10810=EDGE_LOOP('',(#10805,#10806,#10808,#10809)); #10811=FACE_OUTER_BOUND('',#10810,.F.); #10812=ADVANCED_FACE('',(#10811),#10804,.F.); #10813=CARTESIAN_POINT('',(2.4E1,6.875E-1,0.E0)); #10814=DIRECTION('',(0.E0,1.E0,0.E0)); #10815=DIRECTION('',(-1.E0,0.E0,0.E0)); #10816=AXIS2_PLACEMENT_3D('',#10813,#10814,#10815); #10817=PLANE('',#10816); #10818=ORIENTED_EDGE('',*,*,#10765,.T.); #10819=ORIENTED_EDGE('',*,*,#10780,.T.); #10820=ORIENTED_EDGE('',*,*,#10794,.T.); #10821=ORIENTED_EDGE('',*,*,#10807,.T.); #10822=EDGE_LOOP('',(#10818,#10819,#10820,#10821)); #10823=FACE_OUTER_BOUND('',#10822,.F.); #10824=ADVANCED_FACE('',(#10823),#10817,.F.); #10825=CARTESIAN_POINT('',(2.4E1,6.875E-1,0.E0)); #10826=DIRECTION('',(0.E0,1.E0,0.E0)); #10827=DIRECTION('',(-1.E0,0.E0,0.E0)); #10828=AXIS2_PLACEMENT_3D('',#10825,#10826,#10827); #10829=PLANE('',#10828); #10831=ORIENTED_EDGE('',*,*,#10830,.F.); #10833=ORIENTED_EDGE('',*,*,#10832,.T.); #10835=ORIENTED_EDGE('',*,*,#10834,.T.); #10837=ORIENTED_EDGE('',*,*,#10836,.T.); #10839=ORIENTED_EDGE('',*,*,#10838,.T.); #10840=EDGE_LOOP('',(#10831,#10833,#10835,#10837,#10839)); #10841=FACE_OUTER_BOUND('',#10840,.F.); #10842=ADVANCED_FACE('',(#10841),#10829,.F.); #10843=CARTESIAN_POINT('',(2.254426323641E1,-6.642389448824E-2, 4.577195232320E0)); #10844=DIRECTION('',(0.E0,1.E0,0.E0)); #10845=DIRECTION('',(8.942796313519E-1,0.E0,4.475085931567E-1)); #10846=AXIS2_PLACEMENT_3D('',#10843,#10844,#10845); #10847=CYLINDRICAL_SURFACE('',#10846,7.5E-1); #10849=ORIENTED_EDGE('',*,*,#10848,.F.); #10850=ORIENTED_EDGE('',*,*,#5920,.T.); #10852=ORIENTED_EDGE('',*,*,#10851,.T.); #10853=ORIENTED_EDGE('',*,*,#10830,.T.); #10854=EDGE_LOOP('',(#10849,#10850,#10852,#10853)); #10855=FACE_OUTER_BOUND('',#10854,.F.); #10856=ADVANCED_FACE('',(#10855),#10847,.F.); #10857=CARTESIAN_POINT('',(2.239E1,0.E0,4.5E0)); #10858=DIRECTION('',(0.E0,1.E0,0.E0)); #10859=DIRECTION('',(-1.E0,0.E0,0.E0)); #10860=AXIS2_PLACEMENT_3D('',#10857,#10858,#10859); #10861=CYLINDRICAL_SURFACE('',#10860,9.225E-1); #10862=ORIENTED_EDGE('',*,*,#10848,.T.); #10863=ORIENTED_EDGE('',*,*,#10838,.F.); #10865=ORIENTED_EDGE('',*,*,#10864,.F.); #10866=ORIENTED_EDGE('',*,*,#5922,.T.); #10867=EDGE_LOOP('',(#10862,#10863,#10865,#10866)); #10868=FACE_OUTER_BOUND('',#10867,.F.); #10869=ADVANCED_FACE('',(#10868),#10861,.F.); #10870=CARTESIAN_POINT('',(1.65E1,0.E0,7.5E0)); #10871=DIRECTION('',(0.E0,1.E0,0.E0)); #10872=DIRECTION('',(-1.E0,0.E0,0.E0)); #10873=AXIS2_PLACEMENT_3D('',#10870,#10871,#10872); #10874=CYLINDRICAL_SURFACE('',#10873,5.6875E0); #10875=ORIENTED_EDGE('',*,*,#5924,.F.); #10876=ORIENTED_EDGE('',*,*,#10864,.T.); #10877=ORIENTED_EDGE('',*,*,#10836,.F.); #10879=ORIENTED_EDGE('',*,*,#10878,.F.); #10880=EDGE_LOOP('',(#10875,#10876,#10877,#10879)); #10881=FACE_OUTER_BOUND('',#10880,.F.); #10882=ADVANCED_FACE('',(#10881),#10874,.T.); #10883=CARTESIAN_POINT('',(1.944696065761E1,0.E0,1.645354088550E0)); #10884=DIRECTION('',(0.E0,1.E0,0.E0)); #10885=DIRECTION('',(-1.E0,0.E0,0.E0)); #10886=AXIS2_PLACEMENT_3D('',#10883,#10884,#10885); #10887=CYLINDRICAL_SURFACE('',#10886,8.669989027347E-1); #10888=ORIENTED_EDGE('',*,*,#5926,.T.); #10889=ORIENTED_EDGE('',*,*,#10878,.T.); #10890=ORIENTED_EDGE('',*,*,#10834,.F.); #10892=ORIENTED_EDGE('',*,*,#10891,.F.); #10893=EDGE_LOOP('',(#10888,#10889,#10890,#10892)); #10894=FACE_OUTER_BOUND('',#10893,.F.); #10895=ADVANCED_FACE('',(#10894),#10887,.F.); #10896=CARTESIAN_POINT('',(2.33125E1,0.E0,4.284771824132E0)); #10897=DIRECTION('',(-7.071067811865E-1,0.E0,7.071067811865E-1)); #10898=DIRECTION('',(-7.071067811865E-1,0.E0,-7.071067811865E-1)); #10899=AXIS2_PLACEMENT_3D('',#10896,#10897,#10898); #10900=PLANE('',#10899); #10901=ORIENTED_EDGE('',*,*,#10851,.F.); #10902=ORIENTED_EDGE('',*,*,#5918,.T.); #10903=ORIENTED_EDGE('',*,*,#10891,.T.); #10904=ORIENTED_EDGE('',*,*,#10832,.F.); #10905=EDGE_LOOP('',(#10901,#10902,#10903,#10904)); #10906=FACE_OUTER_BOUND('',#10905,.F.); #10907=ADVANCED_FACE('',(#10906),#10900,.T.); #10908=CARTESIAN_POINT('',(2.33125E1,0.E0,1.65E1)); #10909=DIRECTION('',(-1.E0,0.E0,0.E0)); #10910=DIRECTION('',(0.E0,0.E0,-1.E0)); #10911=AXIS2_PLACEMENT_3D('',#10908,#10909,#10910); #10912=PLANE('',#10911); #10913=ORIENTED_EDGE('',*,*,#5838,.T.); #10915=ORIENTED_EDGE('',*,*,#10914,.T.); #10917=ORIENTED_EDGE('',*,*,#10916,.F.); #10919=ORIENTED_EDGE('',*,*,#10918,.F.); #10920=EDGE_LOOP('',(#10913,#10915,#10917,#10919)); #10921=FACE_OUTER_BOUND('',#10920,.F.); #10922=ADVANCED_FACE('',(#10921),#10912,.T.); #10923=CARTESIAN_POINT('',(2.275E1,0.E0,1.35E1)); #10924=DIRECTION('',(0.E0,1.E0,0.E0)); #10925=DIRECTION('',(-1.E0,0.E0,0.E0)); #10926=AXIS2_PLACEMENT_3D('',#10923,#10924,#10925); #10927=CYLINDRICAL_SURFACE('',#10926,5.625E-1); #10928=ORIENTED_EDGE('',*,*,#5844,.T.); #10930=ORIENTED_EDGE('',*,*,#10929,.T.); #10932=ORIENTED_EDGE('',*,*,#10931,.F.); #10933=ORIENTED_EDGE('',*,*,#10914,.F.); #10934=EDGE_LOOP('',(#10928,#10930,#10932,#10933)); #10935=FACE_OUTER_BOUND('',#10934,.F.); #10936=ADVANCED_FACE('',(#10935),#10927,.F.); #10937=CARTESIAN_POINT('',(2.21875E1,0.E0,1.35E1)); #10938=DIRECTION('',(1.E0,0.E0,0.E0)); #10939=DIRECTION('',(0.E0,0.E0,1.E0)); #10940=AXIS2_PLACEMENT_3D('',#10937,#10938,#10939); #10941=PLANE('',#10940); #10942=ORIENTED_EDGE('',*,*,#5842,.T.); #10944=ORIENTED_EDGE('',*,*,#10943,.T.); #10946=ORIENTED_EDGE('',*,*,#10945,.F.); #10947=ORIENTED_EDGE('',*,*,#10929,.F.); #10948=EDGE_LOOP('',(#10942,#10944,#10946,#10947)); #10949=FACE_OUTER_BOUND('',#10948,.F.); #10950=ADVANCED_FACE('',(#10949),#10941,.T.); #10951=CARTESIAN_POINT('',(2.275E1,0.E0,1.65E1)); #10952=DIRECTION('',(0.E0,1.E0,0.E0)); #10953=DIRECTION('',(-1.E0,0.E0,0.E0)); #10954=AXIS2_PLACEMENT_3D('',#10951,#10952,#10953); #10955=CYLINDRICAL_SURFACE('',#10954,5.625E-1); #10956=ORIENTED_EDGE('',*,*,#5840,.T.); #10957=ORIENTED_EDGE('',*,*,#10918,.T.); #10959=ORIENTED_EDGE('',*,*,#10958,.F.); #10960=ORIENTED_EDGE('',*,*,#10943,.F.); #10961=EDGE_LOOP('',(#10956,#10957,#10959,#10960)); #10962=FACE_OUTER_BOUND('',#10961,.F.); #10963=ADVANCED_FACE('',(#10962),#10955,.F.); #10964=CARTESIAN_POINT('',(2.4E1,6.875E-1,0.E0)); #10965=DIRECTION('',(0.E0,1.E0,0.E0)); #10966=DIRECTION('',(-1.E0,0.E0,0.E0)); #10967=AXIS2_PLACEMENT_3D('',#10964,#10965,#10966); #10968=PLANE('',#10967); #10969=ORIENTED_EDGE('',*,*,#10916,.T.); #10970=ORIENTED_EDGE('',*,*,#10931,.T.); #10971=ORIENTED_EDGE('',*,*,#10945,.T.); #10972=ORIENTED_EDGE('',*,*,#10958,.T.); #10973=EDGE_LOOP('',(#10969,#10970,#10971,#10972)); #10974=FACE_OUTER_BOUND('',#10973,.F.); #10975=ADVANCED_FACE('',(#10974),#10968,.F.); #10976=CARTESIAN_POINT('',(2.33125E1,0.E0,2.25E1)); #10977=DIRECTION('',(-1.E0,0.E0,0.E0)); #10978=DIRECTION('',(0.E0,0.E0,-1.E0)); #10979=AXIS2_PLACEMENT_3D('',#10976,#10977,#10978); #10980=PLANE('',#10979); #10981=ORIENTED_EDGE('',*,*,#5848,.T.); #10983=ORIENTED_EDGE('',*,*,#10982,.T.); #10985=ORIENTED_EDGE('',*,*,#10984,.F.); #10987=ORIENTED_EDGE('',*,*,#10986,.F.); #10988=EDGE_LOOP('',(#10981,#10983,#10985,#10987)); #10989=FACE_OUTER_BOUND('',#10988,.F.); #10990=ADVANCED_FACE('',(#10989),#10980,.T.); #10991=CARTESIAN_POINT('',(2.275E1,0.E0,1.95E1)); #10992=DIRECTION('',(0.E0,1.E0,0.E0)); #10993=DIRECTION('',(-1.E0,0.E0,0.E0)); #10994=AXIS2_PLACEMENT_3D('',#10991,#10992,#10993); #10995=CYLINDRICAL_SURFACE('',#10994,5.625E-1); #10996=ORIENTED_EDGE('',*,*,#5854,.T.); #10998=ORIENTED_EDGE('',*,*,#10997,.T.); #11000=ORIENTED_EDGE('',*,*,#10999,.F.); #11001=ORIENTED_EDGE('',*,*,#10982,.F.); #11002=EDGE_LOOP('',(#10996,#10998,#11000,#11001)); #11003=FACE_OUTER_BOUND('',#11002,.F.); #11004=ADVANCED_FACE('',(#11003),#10995,.F.); #11005=CARTESIAN_POINT('',(2.21875E1,0.E0,1.95E1)); #11006=DIRECTION('',(1.E0,0.E0,0.E0)); #11007=DIRECTION('',(0.E0,0.E0,1.E0)); #11008=AXIS2_PLACEMENT_3D('',#11005,#11006,#11007); #11009=PLANE('',#11008); #11010=ORIENTED_EDGE('',*,*,#5852,.T.); #11012=ORIENTED_EDGE('',*,*,#11011,.T.); #11014=ORIENTED_EDGE('',*,*,#11013,.F.); #11015=ORIENTED_EDGE('',*,*,#10997,.F.); #11016=EDGE_LOOP('',(#11010,#11012,#11014,#11015)); #11017=FACE_OUTER_BOUND('',#11016,.F.); #11018=ADVANCED_FACE('',(#11017),#11009,.T.); #11019=CARTESIAN_POINT('',(2.275E1,0.E0,2.25E1)); #11020=DIRECTION('',(0.E0,1.E0,0.E0)); #11021=DIRECTION('',(-1.E0,0.E0,0.E0)); #11022=AXIS2_PLACEMENT_3D('',#11019,#11020,#11021); #11023=CYLINDRICAL_SURFACE('',#11022,5.625E-1); #11024=ORIENTED_EDGE('',*,*,#5850,.T.); #11025=ORIENTED_EDGE('',*,*,#10986,.T.); #11027=ORIENTED_EDGE('',*,*,#11026,.F.); #11028=ORIENTED_EDGE('',*,*,#11011,.F.); #11029=EDGE_LOOP('',(#11024,#11025,#11027,#11028)); #11030=FACE_OUTER_BOUND('',#11029,.F.); #11031=ADVANCED_FACE('',(#11030),#11023,.F.); #11032=CARTESIAN_POINT('',(2.4E1,6.875E-1,0.E0)); #11033=DIRECTION('',(0.E0,1.E0,0.E0)); #11034=DIRECTION('',(-1.E0,0.E0,0.E0)); #11035=AXIS2_PLACEMENT_3D('',#11032,#11033,#11034); #11036=PLANE('',#11035); #11037=ORIENTED_EDGE('',*,*,#10984,.T.); #11038=ORIENTED_EDGE('',*,*,#10999,.T.); #11039=ORIENTED_EDGE('',*,*,#11013,.T.); #11040=ORIENTED_EDGE('',*,*,#11026,.T.); #11041=EDGE_LOOP('',(#11037,#11038,#11039,#11040)); #11042=FACE_OUTER_BOUND('',#11041,.F.); #11043=ADVANCED_FACE('',(#11042),#11036,.F.); #11044=CARTESIAN_POINT('',(1.65E1,0.E0,8.5E0)); #11045=DIRECTION('',(0.E0,0.E0,1.E0)); #11046=DIRECTION('',(-1.E0,0.E0,0.E0)); #11047=AXIS2_PLACEMENT_3D('',#11044,#11045,#11046); #11048=PLANE('',#11047); #11049=ORIENTED_EDGE('',*,*,#5858,.T.); #11051=ORIENTED_EDGE('',*,*,#11050,.T.); #11053=ORIENTED_EDGE('',*,*,#11052,.F.); #11055=ORIENTED_EDGE('',*,*,#11054,.F.); #11056=EDGE_LOOP('',(#11049,#11051,#11053,#11055)); #11057=FACE_OUTER_BOUND('',#11056,.F.); #11058=ADVANCED_FACE('',(#11057),#11048,.T.); #11059=CARTESIAN_POINT('',(1.35E1,0.E0,9.E0)); #11060=DIRECTION('',(0.E0,1.E0,0.E0)); #11061=DIRECTION('',(-1.E0,0.E0,0.E0)); #11062=AXIS2_PLACEMENT_3D('',#11059,#11060,#11061); #11063=CYLINDRICAL_SURFACE('',#11062,5.E-1); #11064=ORIENTED_EDGE('',*,*,#5864,.T.); #11066=ORIENTED_EDGE('',*,*,#11065,.T.); #11068=ORIENTED_EDGE('',*,*,#11067,.F.); #11069=ORIENTED_EDGE('',*,*,#11050,.F.); #11070=EDGE_LOOP('',(#11064,#11066,#11068,#11069)); #11071=FACE_OUTER_BOUND('',#11070,.F.); #11072=ADVANCED_FACE('',(#11071),#11063,.F.); #11073=CARTESIAN_POINT('',(1.35E1,0.E0,9.5E0)); #11074=DIRECTION('',(0.E0,0.E0,-1.E0)); #11075=DIRECTION('',(1.E0,0.E0,0.E0)); #11076=AXIS2_PLACEMENT_3D('',#11073,#11074,#11075); #11077=PLANE('',#11076); #11078=ORIENTED_EDGE('',*,*,#5862,.T.); #11080=ORIENTED_EDGE('',*,*,#11079,.T.); #11082=ORIENTED_EDGE('',*,*,#11081,.F.); #11083=ORIENTED_EDGE('',*,*,#11065,.F.); #11084=EDGE_LOOP('',(#11078,#11080,#11082,#11083)); #11085=FACE_OUTER_BOUND('',#11084,.F.); #11086=ADVANCED_FACE('',(#11085),#11077,.T.); #11087=CARTESIAN_POINT('',(1.65E1,0.E0,9.E0)); #11088=DIRECTION('',(0.E0,1.E0,0.E0)); #11089=DIRECTION('',(-1.E0,0.E0,0.E0)); #11090=AXIS2_PLACEMENT_3D('',#11087,#11088,#11089); #11091=CYLINDRICAL_SURFACE('',#11090,5.E-1); #11092=ORIENTED_EDGE('',*,*,#5860,.T.); #11093=ORIENTED_EDGE('',*,*,#11054,.T.); #11095=ORIENTED_EDGE('',*,*,#11094,.F.); #11096=ORIENTED_EDGE('',*,*,#11079,.F.); #11097=EDGE_LOOP('',(#11092,#11093,#11095,#11096)); #11098=FACE_OUTER_BOUND('',#11097,.F.); #11099=ADVANCED_FACE('',(#11098),#11091,.F.); #11100=CARTESIAN_POINT('',(2.4E1,6.875E-1,0.E0)); #11101=DIRECTION('',(0.E0,1.E0,0.E0)); #11102=DIRECTION('',(-1.E0,0.E0,0.E0)); #11103=AXIS2_PLACEMENT_3D('',#11100,#11101,#11102); #11104=PLANE('',#11103); #11105=ORIENTED_EDGE('',*,*,#11052,.T.); #11106=ORIENTED_EDGE('',*,*,#11067,.T.); #11107=ORIENTED_EDGE('',*,*,#11081,.T.); #11108=ORIENTED_EDGE('',*,*,#11094,.T.); #11109=EDGE_LOOP('',(#11105,#11106,#11107,#11108)); #11110=FACE_OUTER_BOUND('',#11109,.F.); #11111=ADVANCED_FACE('',(#11110),#11104,.F.); #11112=CARTESIAN_POINT('',(1.65E1,0.E0,1.75625E1)); #11113=DIRECTION('',(0.E0,0.E0,1.E0)); #11114=DIRECTION('',(-1.E0,0.E0,0.E0)); #11115=AXIS2_PLACEMENT_3D('',#11112,#11113,#11114); #11116=PLANE('',#11115); #11117=ORIENTED_EDGE('',*,*,#5868,.T.); #11119=ORIENTED_EDGE('',*,*,#11118,.T.); #11121=ORIENTED_EDGE('',*,*,#11120,.F.); #11123=ORIENTED_EDGE('',*,*,#11122,.F.); #11124=EDGE_LOOP('',(#11117,#11119,#11121,#11123)); #11125=FACE_OUTER_BOUND('',#11124,.F.); #11126=ADVANCED_FACE('',(#11125),#11116,.T.); #11127=CARTESIAN_POINT('',(1.35E1,0.E0,1.8E1)); #11128=DIRECTION('',(0.E0,1.E0,0.E0)); #11129=DIRECTION('',(-1.E0,0.E0,0.E0)); #11130=AXIS2_PLACEMENT_3D('',#11127,#11128,#11129); #11131=CYLINDRICAL_SURFACE('',#11130,4.375E-1); #11132=ORIENTED_EDGE('',*,*,#5874,.T.); #11134=ORIENTED_EDGE('',*,*,#11133,.T.); #11136=ORIENTED_EDGE('',*,*,#11135,.F.); #11137=ORIENTED_EDGE('',*,*,#11118,.F.); #11138=EDGE_LOOP('',(#11132,#11134,#11136,#11137)); #11139=FACE_OUTER_BOUND('',#11138,.F.); #11140=ADVANCED_FACE('',(#11139),#11131,.F.); #11141=CARTESIAN_POINT('',(1.35E1,0.E0,1.84375E1)); #11142=DIRECTION('',(0.E0,0.E0,-1.E0)); #11143=DIRECTION('',(1.E0,0.E0,0.E0)); #11144=AXIS2_PLACEMENT_3D('',#11141,#11142,#11143); #11145=PLANE('',#11144); #11146=ORIENTED_EDGE('',*,*,#5872,.T.); #11148=ORIENTED_EDGE('',*,*,#11147,.T.); #11150=ORIENTED_EDGE('',*,*,#11149,.F.); #11151=ORIENTED_EDGE('',*,*,#11133,.F.); #11152=EDGE_LOOP('',(#11146,#11148,#11150,#11151)); #11153=FACE_OUTER_BOUND('',#11152,.F.); #11154=ADVANCED_FACE('',(#11153),#11145,.T.); #11155=CARTESIAN_POINT('',(1.65E1,0.E0,1.8E1)); #11156=DIRECTION('',(0.E0,1.E0,0.E0)); #11157=DIRECTION('',(-1.E0,0.E0,0.E0)); #11158=AXIS2_PLACEMENT_3D('',#11155,#11156,#11157); #11159=CYLINDRICAL_SURFACE('',#11158,4.375E-1); #11160=ORIENTED_EDGE('',*,*,#5870,.T.); #11161=ORIENTED_EDGE('',*,*,#11122,.T.); #11163=ORIENTED_EDGE('',*,*,#11162,.F.); #11164=ORIENTED_EDGE('',*,*,#11147,.F.); #11165=EDGE_LOOP('',(#11160,#11161,#11163,#11164)); #11166=FACE_OUTER_BOUND('',#11165,.F.); #11167=ADVANCED_FACE('',(#11166),#11159,.F.); #11168=CARTESIAN_POINT('',(2.4E1,6.875E-1,0.E0)); #11169=DIRECTION('',(0.E0,1.E0,0.E0)); #11170=DIRECTION('',(-1.E0,0.E0,0.E0)); #11171=AXIS2_PLACEMENT_3D('',#11168,#11169,#11170); #11172=PLANE('',#11171); #11173=ORIENTED_EDGE('',*,*,#11120,.T.); #11174=ORIENTED_EDGE('',*,*,#11135,.T.); #11175=ORIENTED_EDGE('',*,*,#11149,.T.); #11176=ORIENTED_EDGE('',*,*,#11162,.T.); #11177=EDGE_LOOP('',(#11173,#11174,#11175,#11176)); #11178=FACE_OUTER_BOUND('',#11177,.F.); #11179=ADVANCED_FACE('',(#11178),#11172,.F.); #11180=CARTESIAN_POINT('',(1.65E1,0.E0,3.13125E1)); #11181=DIRECTION('',(0.E0,0.E0,1.E0)); #11182=DIRECTION('',(-1.E0,0.E0,0.E0)); #11183=AXIS2_PLACEMENT_3D('',#11180,#11181,#11182); #11184=PLANE('',#11183); #11185=ORIENTED_EDGE('',*,*,#5878,.F.); #11187=ORIENTED_EDGE('',*,*,#11186,.T.); #11189=ORIENTED_EDGE('',*,*,#11188,.T.); #11191=ORIENTED_EDGE('',*,*,#11190,.F.); #11192=EDGE_LOOP('',(#11185,#11187,#11189,#11191)); #11193=FACE_OUTER_BOUND('',#11192,.F.); #11194=ADVANCED_FACE('',(#11193),#11184,.F.); #11195=CARTESIAN_POINT('',(1.65E1,0.E0,3.075E1)); #11196=DIRECTION('',(0.E0,-1.E0,0.E0)); #11197=DIRECTION('',(-1.E0,0.E0,0.E0)); #11198=AXIS2_PLACEMENT_3D('',#11195,#11196,#11197); #11199=CYLINDRICAL_SURFACE('',#11198,5.625E-1); #11200=ORIENTED_EDGE('',*,*,#5884,.F.); #11202=ORIENTED_EDGE('',*,*,#11201,.T.); #11204=ORIENTED_EDGE('',*,*,#11203,.T.); #11205=ORIENTED_EDGE('',*,*,#11186,.F.); #11206=EDGE_LOOP('',(#11200,#11202,#11204,#11205)); #11207=FACE_OUTER_BOUND('',#11206,.F.); #11208=ADVANCED_FACE('',(#11207),#11199,.F.); #11209=CARTESIAN_POINT('',(1.35E1,0.E0,3.01875E1)); #11210=DIRECTION('',(0.E0,0.E0,-1.E0)); #11211=DIRECTION('',(1.E0,0.E0,0.E0)); #11212=AXIS2_PLACEMENT_3D('',#11209,#11210,#11211); #11213=PLANE('',#11212); #11214=ORIENTED_EDGE('',*,*,#5882,.F.); #11216=ORIENTED_EDGE('',*,*,#11215,.T.); #11218=ORIENTED_EDGE('',*,*,#11217,.T.); #11219=ORIENTED_EDGE('',*,*,#11201,.F.); #11220=EDGE_LOOP('',(#11214,#11216,#11218,#11219)); #11221=FACE_OUTER_BOUND('',#11220,.F.); #11222=ADVANCED_FACE('',(#11221),#11213,.F.); #11223=CARTESIAN_POINT('',(1.35E1,0.E0,3.075E1)); #11224=DIRECTION('',(0.E0,-1.E0,0.E0)); #11225=DIRECTION('',(-1.E0,0.E0,0.E0)); #11226=AXIS2_PLACEMENT_3D('',#11223,#11224,#11225); #11227=CYLINDRICAL_SURFACE('',#11226,5.625E-1); #11228=ORIENTED_EDGE('',*,*,#5880,.F.); #11229=ORIENTED_EDGE('',*,*,#11190,.T.); #11231=ORIENTED_EDGE('',*,*,#11230,.T.); #11232=ORIENTED_EDGE('',*,*,#11215,.F.); #11233=EDGE_LOOP('',(#11228,#11229,#11231,#11232)); #11234=FACE_OUTER_BOUND('',#11233,.F.); #11235=ADVANCED_FACE('',(#11234),#11227,.F.); #11236=CARTESIAN_POINT('',(2.4E1,6.875E-1,3.2E1)); #11237=DIRECTION('',(0.E0,-1.E0,0.E0)); #11238=DIRECTION('',(-1.E0,0.E0,0.E0)); #11239=AXIS2_PLACEMENT_3D('',#11236,#11237,#11238); #11240=PLANE('',#11239); #11241=ORIENTED_EDGE('',*,*,#11188,.F.); #11242=ORIENTED_EDGE('',*,*,#11203,.F.); #11243=ORIENTED_EDGE('',*,*,#11217,.F.); #11244=ORIENTED_EDGE('',*,*,#11230,.F.); #11245=EDGE_LOOP('',(#11241,#11242,#11243,#11244)); #11246=FACE_OUTER_BOUND('',#11245,.F.); #11247=ADVANCED_FACE('',(#11246),#11240,.T.); #11248=CARTESIAN_POINT('',(2.4E1,6.875E-1,3.2E1)); #11249=DIRECTION('',(0.E0,-1.E0,0.E0)); #11250=DIRECTION('',(-1.E0,0.E0,0.E0)); #11251=AXIS2_PLACEMENT_3D('',#11248,#11249,#11250); #11252=PLANE('',#11251); #11254=ORIENTED_EDGE('',*,*,#11253,.F.); #11256=ORIENTED_EDGE('',*,*,#11255,.F.); #11258=ORIENTED_EDGE('',*,*,#11257,.F.); #11260=ORIENTED_EDGE('',*,*,#11259,.F.); #11262=ORIENTED_EDGE('',*,*,#11261,.F.); #11263=EDGE_LOOP('',(#11254,#11256,#11258,#11260,#11262)); #11264=FACE_OUTER_BOUND('',#11263,.F.); #11265=ADVANCED_FACE('',(#11264),#11252,.T.); #11266=CARTESIAN_POINT('',(2.254426323641E1,-6.892397422826E-2, 2.742280476768E1)); #11267=DIRECTION('',(0.E0,1.E0,0.E0)); #11268=DIRECTION('',(7.071067811865E-1,0.E0,7.071067811865E-1)); #11269=AXIS2_PLACEMENT_3D('',#11266,#11267,#11268); #11270=CYLINDRICAL_SURFACE('',#11269,7.5E-1); #11272=ORIENTED_EDGE('',*,*,#11271,.F.); #11273=ORIENTED_EDGE('',*,*,#5944,.T.); #11275=ORIENTED_EDGE('',*,*,#11274,.T.); #11276=ORIENTED_EDGE('',*,*,#11253,.T.); #11277=EDGE_LOOP('',(#11272,#11273,#11275,#11276)); #11278=FACE_OUTER_BOUND('',#11277,.F.); #11279=ADVANCED_FACE('',(#11278),#11270,.F.); #11280=CARTESIAN_POINT('',(2.33125E1,0.E0,2.771522817587E1)); #11281=DIRECTION('',(7.071067811865E-1,0.E0,7.071067811865E-1)); #11282=DIRECTION('',(-7.071067811865E-1,0.E0,7.071067811865E-1)); #11283=AXIS2_PLACEMENT_3D('',#11280,#11281,#11282); #11284=PLANE('',#11283); #11285=ORIENTED_EDGE('',*,*,#11271,.T.); #11286=ORIENTED_EDGE('',*,*,#11261,.T.); #11288=ORIENTED_EDGE('',*,*,#11287,.F.); #11289=ORIENTED_EDGE('',*,*,#5946,.F.); #11290=EDGE_LOOP('',(#11285,#11286,#11288,#11289)); #11291=FACE_OUTER_BOUND('',#11290,.F.); #11292=ADVANCED_FACE('',(#11291),#11284,.F.); #11293=CARTESIAN_POINT('',(1.944696065761E1,0.E0,3.035464591145E1)); #11294=DIRECTION('',(0.E0,-1.E0,0.E0)); #11295=DIRECTION('',(-1.E0,0.E0,0.E0)); #11296=AXIS2_PLACEMENT_3D('',#11293,#11294,#11295); #11297=CYLINDRICAL_SURFACE('',#11296,8.669989027347E-1); #11298=ORIENTED_EDGE('',*,*,#5948,.F.); #11299=ORIENTED_EDGE('',*,*,#11287,.T.); #11300=ORIENTED_EDGE('',*,*,#11259,.T.); #11302=ORIENTED_EDGE('',*,*,#11301,.F.); #11303=EDGE_LOOP('',(#11298,#11299,#11300,#11302)); #11304=FACE_OUTER_BOUND('',#11303,.F.); #11305=ADVANCED_FACE('',(#11304),#11297,.F.); #11306=CARTESIAN_POINT('',(1.65E1,0.E0,2.45E1)); #11307=DIRECTION('',(0.E0,-1.E0,0.E0)); #11308=DIRECTION('',(-1.E0,0.E0,0.E0)); #11309=AXIS2_PLACEMENT_3D('',#11306,#11307,#11308); #11310=CYLINDRICAL_SURFACE('',#11309,5.6875E0); #11311=ORIENTED_EDGE('',*,*,#5950,.T.); #11312=ORIENTED_EDGE('',*,*,#11301,.T.); #11313=ORIENTED_EDGE('',*,*,#11257,.T.); #11315=ORIENTED_EDGE('',*,*,#11314,.F.); #11316=EDGE_LOOP('',(#11311,#11312,#11313,#11315)); #11317=FACE_OUTER_BOUND('',#11316,.F.); #11318=ADVANCED_FACE('',(#11317),#11310,.T.); #11319=CARTESIAN_POINT('',(2.239E1,0.E0,2.75E1)); #11320=DIRECTION('',(0.E0,-1.E0,0.E0)); #11321=DIRECTION('',(-1.E0,0.E0,0.E0)); #11322=AXIS2_PLACEMENT_3D('',#11319,#11320,#11321); #11323=CYLINDRICAL_SURFACE('',#11322,9.225E-1); #11324=ORIENTED_EDGE('',*,*,#11274,.F.); #11325=ORIENTED_EDGE('',*,*,#5942,.F.); #11326=ORIENTED_EDGE('',*,*,#11314,.T.); #11327=ORIENTED_EDGE('',*,*,#11255,.T.); #11328=EDGE_LOOP('',(#11324,#11325,#11326,#11327)); #11329=FACE_OUTER_BOUND('',#11328,.F.); #11330=ADVANCED_FACE('',(#11329),#11323,.F.); #11331=CARTESIAN_POINT('',(2.13075E1,-6.892397422826E-2,7.81E0)); #11332=DIRECTION('',(0.E0,1.E0,0.E0)); #11333=DIRECTION('',(0.E0,0.E0,1.E0)); #11334=AXIS2_PLACEMENT_3D('',#11331,#11332,#11333); #11335=CYLINDRICAL_SURFACE('',#11334,8.8E-1); #11337=ORIENTED_EDGE('',*,*,#11336,.T.); #11339=ORIENTED_EDGE('',*,*,#11338,.T.); #11341=ORIENTED_EDGE('',*,*,#11340,.F.); #11342=ORIENTED_EDGE('',*,*,#5888,.T.); #11343=EDGE_LOOP('',(#11337,#11339,#11341,#11342)); #11344=FACE_OUTER_BOUND('',#11343,.F.); #11345=ADVANCED_FACE('',(#11344),#11335,.T.); #11346=CARTESIAN_POINT('',(2.21875E1,0.E0,8.69E0)); #11347=DIRECTION('',(0.E0,0.E0,1.E0)); #11348=DIRECTION('',(-1.E0,0.E0,0.E0)); #11349=AXIS2_PLACEMENT_3D('',#11346,#11347,#11348); #11350=PLANE('',#11349); #11351=ORIENTED_EDGE('',*,*,#11336,.F.); #11352=ORIENTED_EDGE('',*,*,#5914,.T.); #11354=ORIENTED_EDGE('',*,*,#11353,.F.); #11356=ORIENTED_EDGE('',*,*,#11355,.F.); #11357=EDGE_LOOP('',(#11351,#11352,#11354,#11356)); #11358=FACE_OUTER_BOUND('',#11357,.F.); #11359=ADVANCED_FACE('',(#11358),#11350,.T.); #11360=CARTESIAN_POINT('',(2.05675E1,7.463919417831E-1,9.57E0)); #11361=DIRECTION('',(0.E0,-1.E0,0.E0)); #11362=DIRECTION('',(-1.E0,0.E0,0.E0)); #11363=AXIS2_PLACEMENT_3D('',#11360,#11361,#11362); #11364=CYLINDRICAL_SURFACE('',#11363,8.8E-1); #11366=ORIENTED_EDGE('',*,*,#11365,.F.); #11368=ORIENTED_EDGE('',*,*,#11367,.T.); #11369=ORIENTED_EDGE('',*,*,#11353,.T.); #11370=ORIENTED_EDGE('',*,*,#5912,.T.); #11371=EDGE_LOOP('',(#11366,#11368,#11369,#11370)); #11372=FACE_OUTER_BOUND('',#11371,.F.); #11373=ADVANCED_FACE('',(#11372),#11364,.F.); #11374=CARTESIAN_POINT('',(1.96875E1,0.E0,8.69E0)); #11375=DIRECTION('',(1.E0,0.E0,0.E0)); #11376=DIRECTION('',(0.E0,0.E0,1.E0)); #11377=AXIS2_PLACEMENT_3D('',#11374,#11375,#11376); #11378=PLANE('',#11377); #11379=ORIENTED_EDGE('',*,*,#11365,.T.); #11380=ORIENTED_EDGE('',*,*,#5910,.T.); #11382=ORIENTED_EDGE('',*,*,#11381,.F.); #11384=ORIENTED_EDGE('',*,*,#11383,.F.); #11385=EDGE_LOOP('',(#11379,#11380,#11382,#11384)); #11386=FACE_OUTER_BOUND('',#11385,.F.); #11387=ADVANCED_FACE('',(#11386),#11378,.T.); #11388=CARTESIAN_POINT('',(2.05675E1,7.463919417831E-1,1.037E1)); #11389=DIRECTION('',(0.E0,-1.E0,0.E0)); #11390=DIRECTION('',(0.E0,0.E0,1.E0)); #11391=AXIS2_PLACEMENT_3D('',#11388,#11389,#11390); #11392=CYLINDRICAL_SURFACE('',#11391,8.8E-1); #11394=ORIENTED_EDGE('',*,*,#11393,.F.); #11396=ORIENTED_EDGE('',*,*,#11395,.T.); #11397=ORIENTED_EDGE('',*,*,#11381,.T.); #11398=ORIENTED_EDGE('',*,*,#5908,.T.); #11399=EDGE_LOOP('',(#11394,#11396,#11397,#11398)); #11400=FACE_OUTER_BOUND('',#11399,.F.); #11401=ADVANCED_FACE('',(#11400),#11392,.F.); #11402=CARTESIAN_POINT('',(1.96875E1,0.E0,1.125E1)); #11403=DIRECTION('',(0.E0,0.E0,-1.E0)); #11404=DIRECTION('',(1.E0,0.E0,0.E0)); #11405=AXIS2_PLACEMENT_3D('',#11402,#11403,#11404); #11406=PLANE('',#11405); #11407=ORIENTED_EDGE('',*,*,#11393,.T.); #11408=ORIENTED_EDGE('',*,*,#5906,.T.); #11410=ORIENTED_EDGE('',*,*,#11409,.F.); #11412=ORIENTED_EDGE('',*,*,#11411,.F.); #11413=EDGE_LOOP('',(#11407,#11408,#11410,#11412)); #11414=FACE_OUTER_BOUND('',#11413,.F.); #11415=ADVANCED_FACE('',(#11414),#11406,.T.); #11416=CARTESIAN_POINT('',(2.44325E1,7.463919417831E-1,1.037E1)); #11417=DIRECTION('',(0.E0,-1.E0,0.E0)); #11418=DIRECTION('',(1.E0,0.E0,0.E0)); #11419=AXIS2_PLACEMENT_3D('',#11416,#11417,#11418); #11420=CYLINDRICAL_SURFACE('',#11419,8.8E-1); #11422=ORIENTED_EDGE('',*,*,#11421,.F.); #11424=ORIENTED_EDGE('',*,*,#11423,.T.); #11425=ORIENTED_EDGE('',*,*,#11409,.T.); #11426=ORIENTED_EDGE('',*,*,#5904,.T.); #11427=EDGE_LOOP('',(#11422,#11424,#11425,#11426)); #11428=FACE_OUTER_BOUND('',#11427,.F.); #11429=ADVANCED_FACE('',(#11428),#11420,.F.); #11430=CARTESIAN_POINT('',(2.53125E1,0.E0,1.125E1)); #11431=DIRECTION('',(-1.E0,0.E0,0.E0)); #11432=DIRECTION('',(0.E0,0.E0,-1.E0)); #11433=AXIS2_PLACEMENT_3D('',#11430,#11431,#11432); #11434=PLANE('',#11433); #11436=ORIENTED_EDGE('',*,*,#11435,.F.); #11438=ORIENTED_EDGE('',*,*,#11437,.F.); #11439=ORIENTED_EDGE('',*,*,#11421,.T.); #11440=ORIENTED_EDGE('',*,*,#5902,.T.); #11441=EDGE_LOOP('',(#11436,#11438,#11439,#11440)); #11442=FACE_OUTER_BOUND('',#11441,.F.); #11443=ADVANCED_FACE('',(#11442),#11434,.T.); #11444=CARTESIAN_POINT('',(2.44325E1,7.463919417831E-1,9.57E0)); #11445=DIRECTION('',(0.E0,-1.E0,0.E0)); #11446=DIRECTION('',(0.E0,0.E0,-1.E0)); #11447=AXIS2_PLACEMENT_3D('',#11444,#11445,#11446); #11448=CYLINDRICAL_SURFACE('',#11447,8.8E-1); #11450=ORIENTED_EDGE('',*,*,#11449,.F.); #11452=ORIENTED_EDGE('',*,*,#11451,.T.); #11453=ORIENTED_EDGE('',*,*,#11435,.T.); #11454=ORIENTED_EDGE('',*,*,#5900,.T.); #11455=EDGE_LOOP('',(#11450,#11452,#11453,#11454)); #11456=FACE_OUTER_BOUND('',#11455,.F.); #11457=ADVANCED_FACE('',(#11456),#11448,.F.); #11458=CARTESIAN_POINT('',(2.53125E1,0.E0,8.69E0)); #11459=DIRECTION('',(0.E0,0.E0,1.E0)); #11460=DIRECTION('',(-1.E0,0.E0,0.E0)); #11461=AXIS2_PLACEMENT_3D('',#11458,#11459,#11460); #11462=PLANE('',#11461); #11464=ORIENTED_EDGE('',*,*,#11463,.T.); #11466=ORIENTED_EDGE('',*,*,#11465,.F.); #11467=ORIENTED_EDGE('',*,*,#11449,.T.); #11468=ORIENTED_EDGE('',*,*,#5898,.T.); #11469=EDGE_LOOP('',(#11464,#11466,#11467,#11468)); #11470=FACE_OUTER_BOUND('',#11469,.F.); #11471=ADVANCED_FACE('',(#11470),#11462,.T.); #11472=CARTESIAN_POINT('',(2.419E1,-6.892397422826E-2,7.81E0)); #11473=DIRECTION('',(0.E0,1.E0,0.E0)); #11474=DIRECTION('',(-1.E0,0.E0,0.E0)); #11475=AXIS2_PLACEMENT_3D('',#11472,#11473,#11474); #11476=CYLINDRICAL_SURFACE('',#11475,8.8E-1); #11478=ORIENTED_EDGE('',*,*,#11477,.T.); #11480=ORIENTED_EDGE('',*,*,#11479,.T.); #11481=ORIENTED_EDGE('',*,*,#11463,.F.); #11482=ORIENTED_EDGE('',*,*,#5896,.T.); #11483=EDGE_LOOP('',(#11478,#11480,#11481,#11482)); #11484=FACE_OUTER_BOUND('',#11483,.F.); #11485=ADVANCED_FACE('',(#11484),#11476,.T.); #11486=CARTESIAN_POINT('',(2.331E1,0.E0,8.69E0)); #11487=DIRECTION('',(-1.E0,0.E0,0.E0)); #11488=DIRECTION('',(0.E0,0.E0,-1.E0)); #11489=AXIS2_PLACEMENT_3D('',#11486,#11487,#11488); #11490=PLANE('',#11489); #11491=ORIENTED_EDGE('',*,*,#11477,.F.); #11492=ORIENTED_EDGE('',*,*,#5894,.T.); #11494=ORIENTED_EDGE('',*,*,#11493,.T.); #11496=ORIENTED_EDGE('',*,*,#11495,.F.); #11497=EDGE_LOOP('',(#11491,#11492,#11494,#11496)); #11498=FACE_OUTER_BOUND('',#11497,.F.); #11499=ADVANCED_FACE('',(#11498),#11490,.T.); #11500=CARTESIAN_POINT('',(2.274875E1,0.E0,7.5E0)); #11501=DIRECTION('',(0.E0,1.E0,0.E0)); #11502=DIRECTION('',(-1.E0,0.E0,0.E0)); #11503=AXIS2_PLACEMENT_3D('',#11500,#11501,#11502); #11504=CYLINDRICAL_SURFACE('',#11503,5.6125E-1); #11505=ORIENTED_EDGE('',*,*,#5892,.T.); #11507=ORIENTED_EDGE('',*,*,#11506,.T.); #11509=ORIENTED_EDGE('',*,*,#11508,.F.); #11510=ORIENTED_EDGE('',*,*,#11493,.F.); #11511=EDGE_LOOP('',(#11505,#11507,#11509,#11510)); #11512=FACE_OUTER_BOUND('',#11511,.F.); #11513=ADVANCED_FACE('',(#11512),#11504,.F.); #11514=CARTESIAN_POINT('',(2.21875E1,0.E0,7.5E0)); #11515=DIRECTION('',(1.E0,0.E0,0.E0)); #11516=DIRECTION('',(0.E0,0.E0,1.E0)); #11517=AXIS2_PLACEMENT_3D('',#11514,#11515,#11516); #11518=PLANE('',#11517); #11519=ORIENTED_EDGE('',*,*,#11340,.T.); #11521=ORIENTED_EDGE('',*,*,#11520,.F.); #11522=ORIENTED_EDGE('',*,*,#11506,.F.); #11523=ORIENTED_EDGE('',*,*,#5890,.T.); #11524=EDGE_LOOP('',(#11519,#11521,#11522,#11523)); #11525=FACE_OUTER_BOUND('',#11524,.F.); #11526=ADVANCED_FACE('',(#11525),#11518,.T.); #11527=CARTESIAN_POINT('',(2.4E1,6.875E-1,0.E0)); #11528=DIRECTION('',(0.E0,1.E0,0.E0)); #11529=DIRECTION('',(-1.E0,0.E0,0.E0)); #11530=AXIS2_PLACEMENT_3D('',#11527,#11528,#11529); #11531=PLANE('',#11530); #11532=ORIENTED_EDGE('',*,*,#11465,.T.); #11533=ORIENTED_EDGE('',*,*,#11479,.F.); #11534=ORIENTED_EDGE('',*,*,#11495,.T.); #11535=ORIENTED_EDGE('',*,*,#11508,.T.); #11536=ORIENTED_EDGE('',*,*,#11520,.T.); #11537=ORIENTED_EDGE('',*,*,#11338,.F.); #11538=ORIENTED_EDGE('',*,*,#11355,.T.); #11539=ORIENTED_EDGE('',*,*,#11367,.F.); #11540=ORIENTED_EDGE('',*,*,#11383,.T.); #11541=ORIENTED_EDGE('',*,*,#11395,.F.); #11542=ORIENTED_EDGE('',*,*,#11411,.T.); #11543=ORIENTED_EDGE('',*,*,#11423,.F.); #11544=ORIENTED_EDGE('',*,*,#11437,.T.); #11545=ORIENTED_EDGE('',*,*,#11451,.F.); #11546=EDGE_LOOP('',(#11532,#11533,#11534,#11535,#11536,#11537,#11538,#11539, #11540,#11541,#11542,#11543,#11544,#11545)); #11547=FACE_OUTER_BOUND('',#11546,.F.); #11548=ADVANCED_FACE('',(#11547),#11531,.F.); #11549=CLOSED_SHELL('',(#5954,#6079,#6094,#6107,#6117,#6132,#6145,#6201,#6214, #6278,#6488,#6503,#6516,#6529,#6540,#6555,#6568,#6581,#6592,#6605,#6618,#6631, #6644,#6656,#6669,#6683,#6696,#6709,#6723,#6736,#6749,#6763,#6776,#6789,#6802, #6815,#6828,#6842,#6855,#6868,#6880,#6893,#6906,#6918,#6931,#6945,#6958,#6971, #6984,#6998,#7011,#7024,#7036,#7048,#7061,#7074,#7086,#7099,#7114,#7127,#7152, #7166,#7178,#7191,#7204,#7217,#7230,#7244,#7256,#7311,#7325,#7337,#7349,#7368, #7379,#7394,#7407,#7423,#7437,#7449,#7465,#7477,#7490,#7514,#7529,#7542,#7552, #7567,#7580,#7590,#7605,#7619,#7649,#7662,#7675,#7688,#7701,#7714,#7727,#7740, #7753,#7766,#7778,#7790,#7805,#7818,#7828,#7843,#7856,#7866,#7881,#7894,#7907, #7918,#7933,#7946,#7959,#7970,#7985,#7998,#8014,#8028,#8040,#8055,#8068,#8084, #8098,#8110,#8125,#8138,#8154,#8168,#8180,#8195,#8208,#8224,#8238,#8250,#8265, #8278,#8294,#8308,#8320,#8335,#8348,#8364,#8378,#8390,#8405,#8418,#8434,#8448, #8460,#8475,#8488,#8504,#8518,#8530,#8545,#8558,#8574,#8588,#8600,#8615,#8628, #8644,#8658,#8670,#8685,#8698,#8714,#8728,#8740,#8755,#8768,#8784,#8798,#8810, #8825,#8838,#8854,#8868,#8880,#8895,#8908,#8924,#8938,#8950,#8965,#8978,#8994, #9008,#9020,#9035,#9048,#9064,#9078,#9090,#9105,#9118,#9134,#9148,#9160,#9175, #9188,#9204,#9218,#9230,#9242,#9260,#9275,#9288,#9304,#9318,#9330,#9345,#9359, #9373,#9387,#9401,#9415,#9429,#9443,#9457,#9471,#9485,#9498,#9518,#9533,#9546, #9556,#9571,#9584,#9594,#9609,#9622,#9632,#9647,#9660,#9670,#9685,#9698,#9708, #9723,#9737,#9751,#9765,#9779,#9793,#9807,#9820,#9836,#9851,#9865,#9887,#9901, #9913,#9926,#9939,#9952,#9964,#9979,#9993,#10007,#10020,#10032,#10050,#10064, #10077,#10090,#10103,#10115,#10130,#10144,#10178,#10192,#10205,#10218,#10230, #10243,#10256,#10269,#10282,#10295,#10308,#10321,#10333,#10348,#10362,#10376, #10389,#10401,#10416,#10430,#10444,#10457,#10469,#10484,#10498,#10512,#10525, #10537,#10552,#10566,#10580,#10593,#10605,#10620,#10634,#10648,#10661,#10673, #10691,#10705,#10718,#10731,#10744,#10756,#10771,#10785,#10799,#10812,#10824, #10842,#10856,#10869,#10882,#10895,#10907,#10922,#10936,#10950,#10963,#10975, #10990,#11004,#11018,#11031,#11043,#11058,#11072,#11086,#11099,#11111,#11126, #11140,#11154,#11167,#11179,#11194,#11208,#11222,#11235,#11247,#11265,#11279, #11292,#11305,#11318,#11330,#11345,#11359,#11373,#11387,#11401,#11415,#11429, #11443,#11457,#11471,#11485,#11499,#11513,#11526,#11548)); #11550=MANIFOLD_SOLID_BREP('',#11549); #11551=DIMENSIONAL_EXPONENTS(1.E0,0.E0,0.E0,0.E0,0.E0,0.E0,0.E0); #11552=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)); #11553=LENGTH_MEASURE_WITH_UNIT(LENGTH_MEASURE(2.54E1),#11552); #11554=(CONVERSION_BASED_UNIT('INCH',#11553)LENGTH_UNIT()NAMED_UNIT(#11551)); #11555=DIMENSIONAL_EXPONENTS(0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,0.E0); #11556=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); #11557=PLANE_ANGLE_MEASURE_WITH_UNIT(PLANE_ANGLE_MEASURE(1.745329251994E-2), #11556); #11558=(CONVERSION_BASED_UNIT('DEGREE',#11557)NAMED_UNIT(#11555)PLANE_ANGLE_UNIT()); #11559=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); #11560=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(4.404650704771E-3),#11554, 'closure', 'Maximum model space distance between geometric entities at asserted connectivities'); #11561=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT(( #11560))GLOBAL_UNIT_ASSIGNED_CONTEXT((#11554,#11558,#11559))REPRESENTATION_CONTEXT('ID1','3')); #11563=APPLICATION_CONTEXT( 'CONFIGURATION CONTROLLED 3D DESIGNS OF MECHANICAL PARTS AND ASSEMBLIES'); #11564=APPLICATION_PROTOCOL_DEFINITION('international standard', 'config_control_design',1994,#11563); #11565=DESIGN_CONTEXT('',#11563,'design'); #11566=MECHANICAL_CONTEXT('',#11563,'mechanical'); #11567=PRODUCT('PROESOURCE','PROESOURCE','NOT SPECIFIED',(#11566)); #11568=PRODUCT_DEFINITION_FORMATION_WITH_SPECIFIED_SOURCE('1','LAST_VERSION', #11567,.MADE.); #11572=PRODUCT_CATEGORY('part',''); #11573=PRODUCT_RELATED_PRODUCT_CATEGORY('detail','',(#11567)); #11574=PRODUCT_CATEGORY_RELATIONSHIP('','',#11572,#11573); #11575=SECURITY_CLASSIFICATION_LEVEL('unclassified'); #11576=SECURITY_CLASSIFICATION('','',#11575); #11577=CC_DESIGN_SECURITY_CLASSIFICATION(#11576,(#11568)); #11578=APPROVAL_STATUS('approved'); #11579=APPROVAL(#11578,''); #11580=CC_DESIGN_APPROVAL(#11579,(#11576,#11568,#11569)); #11581=CALENDAR_DATE(102,4,11); #11582=COORDINATED_UNIVERSAL_TIME_OFFSET(5,0,.BEHIND.); #11583=LOCAL_TIME(14,0,4.8E1,#11582); #11584=DATE_AND_TIME(#11581,#11583); #11585=APPROVAL_DATE_TIME(#11584,#11579); #11586=DATE_TIME_ROLE('creation_date'); #11587=CC_DESIGN_DATE_AND_TIME_ASSIGNMENT(#11584,#11586,(#11569)); #11588=DATE_TIME_ROLE('classification_date'); #11589=CC_DESIGN_DATE_AND_TIME_ASSIGNMENT(#11584,#11588,(#11576)); #11590=PERSON('UNSPECIFIED','UNSPECIFIED',$,$,$,$); #11591=ORGANIZATION('UNSPECIFIED','UNSPECIFIED','UNSPECIFIED'); #11592=PERSON_AND_ORGANIZATION(#11590,#11591); #11593=APPROVAL_ROLE('approver'); #11594=APPROVAL_PERSON_ORGANIZATION(#11592,#11579,#11593); #11595=PERSON_AND_ORGANIZATION_ROLE('creator'); #11596=CC_DESIGN_PERSON_AND_ORGANIZATION_ASSIGNMENT(#11592,#11595,(#11568, #11569)); #11597=PERSON_AND_ORGANIZATION_ROLE('design_supplier'); #11598=CC_DESIGN_PERSON_AND_ORGANIZATION_ASSIGNMENT(#11592,#11597,(#11568)); #11599=PERSON_AND_ORGANIZATION_ROLE('classification_officer'); #11600=CC_DESIGN_PERSON_AND_ORGANIZATION_ASSIGNMENT(#11592,#11599,(#11576)); #11601=PERSON_AND_ORGANIZATION_ROLE('design_owner'); #11602=CC_DESIGN_PERSON_AND_ORGANIZATION_ASSIGNMENT(#11592,#11601,(#11567)); #13=CIRCLE('',#12,1.925E-1); #18=CIRCLE('',#17,1.925E-1); #23=CIRCLE('',#22,1.925E-1); #28=CIRCLE('',#27,1.925E-1); #33=CIRCLE('',#32,1.925E-1); #38=CIRCLE('',#37,1.925E-1); #43=CIRCLE('',#42,1.925E-1); #48=CIRCLE('',#47,1.925E-1); #53=CIRCLE('',#52,1.925E-1); #58=CIRCLE('',#57,1.925E-1); #63=CIRCLE('',#62,1.925E-1); #68=CIRCLE('',#67,1.925E-1); #73=CIRCLE('',#72,1.925E-1); #78=CIRCLE('',#77,1.925E-1); #83=CIRCLE('',#82,1.925E-1); #88=CIRCLE('',#87,1.925E-1); #93=CIRCLE('',#92,1.925E-1); #98=CIRCLE('',#97,1.925E-1); #103=CIRCLE('',#102,1.925E-1); #108=CIRCLE('',#107,1.925E-1); #113=CIRCLE('',#112,1.925E-1); #118=CIRCLE('',#117,1.925E-1); #123=CIRCLE('',#122,1.925E-1); #128=CIRCLE('',#127,1.925E-1); #181=CIRCLE('',#180,1.925E-1); #186=CIRCLE('',#185,1.925E-1); #191=CIRCLE('',#190,1.925E-1); #196=CIRCLE('',#195,1.925E-1); #249=CIRCLE('',#248,1.925E-1); #254=CIRCLE('',#253,1.925E-1); #259=CIRCLE('',#258,1.925E-1); #264=CIRCLE('',#263,1.925E-1); #269=CIRCLE('',#268,1.925E-1); #274=CIRCLE('',#273,1.925E-1); #279=CIRCLE('',#278,1.925E-1); #284=CIRCLE('',#283,1.925E-1); #289=CIRCLE('',#288,1.925E-1); #294=CIRCLE('',#293,1.925E-1); #299=CIRCLE('',#298,1.925E-1); #304=CIRCLE('',#303,1.925E-1); #313=CIRCLE('',#312,5.625E-1); #322=CIRCLE('',#321,5.625E-1); #327=CIRCLE('',#326,9.225E-1); #336=CIRCLE('',#335,8.669989027347E-1); #341=CIRCLE('',#340,5.6875E0); #350=CIRCLE('',#349,5.6125E-1); #383=CIRCLE('',#382,5.625E-1); #392=CIRCLE('',#391,5.625E-1); #401=CIRCLE('',#400,5.625E-1); #410=CIRCLE('',#409,5.625E-1); #419=CIRCLE('',#418,5.E-1); #428=CIRCLE('',#427,5.E-1); #437=CIRCLE('',#436,4.375E-1); #446=CIRCLE('',#445,4.375E-1); #455=CIRCLE('',#454,5.625E-1); #464=CIRCLE('',#463,5.625E-1); #473=CIRCLE('',#472,5.625E-1); #482=CIRCLE('',#481,5.625E-1); #491=CIRCLE('',#490,5.625E-1); #500=CIRCLE('',#499,5.625E-1); #509=CIRCLE('',#508,5.625E-1); #518=CIRCLE('',#517,5.625E-1); #527=CIRCLE('',#526,5.E-1); #536=CIRCLE('',#535,5.E-1); #545=CIRCLE('',#544,4.375E-1); #554=CIRCLE('',#553,4.375E-1); #563=CIRCLE('',#562,5.625E-1); #572=CIRCLE('',#571,5.625E-1); #581=CIRCLE('',#580,5.6125E-1); #614=CIRCLE('',#613,9.225E-1); #619=CIRCLE('',#618,5.6875E0); #624=CIRCLE('',#623,8.669989027347E-1); #633=CIRCLE('',#632,9.225E-1); #638=CIRCLE('',#637,5.6875E0); #643=CIRCLE('',#642,8.669989027347E-1); #648=CIRCLE('',#647,9.225E-1); #657=CIRCLE('',#656,8.669989027347E-1); #662=CIRCLE('',#661,5.6875E0); #667=CIRCLE('',#666,9.5E-2); #672=CIRCLE('',#671,9.5E-2); #677=CIRCLE('',#676,1.625E-1); #682=CIRCLE('',#681,1.625E-1); #687=CIRCLE('',#686,9.5E-2); #692=CIRCLE('',#691,9.5E-2); #697=CIRCLE('',#696,9.5E-2); #702=CIRCLE('',#701,9.5E-2); #707=CIRCLE('',#706,9.5E-2); #712=CIRCLE('',#711,9.5E-2); #717=CIRCLE('',#716,9.5E-2); #722=CIRCLE('',#721,9.5E-2); #727=CIRCLE('',#726,1.625E-1); #732=CIRCLE('',#731,1.625E-1); #737=CIRCLE('',#736,9.5E-2); #742=CIRCLE('',#741,9.5E-2); #803=CIRCLE('',#802,9.5E-2); #808=CIRCLE('',#807,9.5E-2); #821=CIRCLE('',#820,1.625E-1); #826=CIRCLE('',#825,1.625E-1); #887=CIRCLE('',#886,1.E-1); #892=CIRCLE('',#891,1.E-1); #897=CIRCLE('',#896,1.E-1); #902=CIRCLE('',#901,1.E-1); #931=CIRCLE('',#930,1.E-1); #936=CIRCLE('',#935,1.E-1); #941=CIRCLE('',#940,1.E-1); #946=CIRCLE('',#945,1.E-1); #951=CIRCLE('',#950,2.575E-1); #956=CIRCLE('',#955,2.575E-1); #961=CIRCLE('',#960,2.575E-1); #966=CIRCLE('',#965,2.575E-1); #971=CIRCLE('',#970,2.575E-1); #976=CIRCLE('',#975,2.575E-1); #981=CIRCLE('',#980,2.575E-1); #986=CIRCLE('',#985,2.575E-1); #991=CIRCLE('',#990,2.575E-1); #996=CIRCLE('',#995,2.575E-1); #1001=CIRCLE('',#1000,2.575E-1); #1006=CIRCLE('',#1005,2.575E-1); #1011=CIRCLE('',#1010,2.56E-1); #1016=CIRCLE('',#1015,2.56E-1); #1021=CIRCLE('',#1020,2.56E-1); #1026=CIRCLE('',#1025,2.56E-1); #1031=CIRCLE('',#1030,2.56E-1); #1036=CIRCLE('',#1035,2.56E-1); #1041=CIRCLE('',#1040,2.56E-1); #1046=CIRCLE('',#1045,2.56E-1); #1051=CIRCLE('',#1050,2.56E-1); #1056=CIRCLE('',#1055,2.56E-1); #1061=CIRCLE('',#1060,2.56E-1); #1066=CIRCLE('',#1065,2.56E-1); #1115=CIRCLE('',#1114,2.575E-1); #1120=CIRCLE('',#1119,2.575E-1); #1125=CIRCLE('',#1124,2.575E-1); #1130=CIRCLE('',#1129,2.575E-1); #1135=CIRCLE('',#1134,2.575E-1); #1140=CIRCLE('',#1139,2.575E-1); #1145=CIRCLE('',#1144,2.575E-1); #1150=CIRCLE('',#1149,2.575E-1); #1155=CIRCLE('',#1154,2.575E-1); #1160=CIRCLE('',#1159,2.575E-1); #1165=CIRCLE('',#1164,2.575E-1); #1170=CIRCLE('',#1169,2.575E-1); #1259=CIRCLE('',#1258,1.E-1); #1268=CIRCLE('',#1267,1.E-1); #1285=CIRCLE('',#1284,1.E-1); #1294=CIRCLE('',#1293,1.E-1); #1303=CIRCLE('',#1302,1.E0); #1312=CIRCLE('',#1311,1.E0); #1317=CIRCLE('',#1316,5.E0); #1326=CIRCLE('',#1325,5.E0); #1331=CIRCLE('',#1330,5.E0); #1340=CIRCLE('',#1339,5.E0); #1349=CIRCLE('',#1348,1.E0); #1358=CIRCLE('',#1357,1.E0); #1367=CIRCLE('',#1366,1.E0); #1376=CIRCLE('',#1375,1.E0); #1385=CIRCLE('',#1384,1.E0); #1394=CIRCLE('',#1393,1.E0); #1403=CIRCLE('',#1402,1.E0); #1412=CIRCLE('',#1411,1.E0); #1421=CIRCLE('',#1420,3.E0); #1430=CIRCLE('',#1429,3.E0); #1439=CIRCLE('',#1438,3.E0); #1448=CIRCLE('',#1447,3.E0); #1457=CIRCLE('',#1456,5.E0); #1466=CIRCLE('',#1465,5.E0); #1475=CIRCLE('',#1474,5.E0); #1484=CIRCLE('',#1483,5.E0); #1493=CIRCLE('',#1492,3.E0); #1502=CIRCLE('',#1501,3.E0); #1511=CIRCLE('',#1510,3.E0); #1520=CIRCLE('',#1519,3.E0); #1529=CIRCLE('',#1528,1.E0); #1538=CIRCLE('',#1537,1.E0); #1547=CIRCLE('',#1546,1.E0); #1556=CIRCLE('',#1555,1.E0); #1597=CIRCLE('',#1596,1.E0); #1606=CIRCLE('',#1605,1.E0); #1675=CIRCLE('',#1674,9.5E-2); #1680=CIRCLE('',#1679,9.5E-2); #1685=CIRCLE('',#1684,6.25E-2); #1690=CIRCLE('',#1689,6.25E-2); #1707=CIRCLE('',#1706,1.E0); #1716=CIRCLE('',#1715,1.E0); #1729=CIRCLE('',#1728,1.E0); #1738=CIRCLE('',#1737,1.E0); #1767=CIRCLE('',#1766,1.625E-1); #1772=CIRCLE('',#1771,1.625E-1); #1846=B_SPLINE_CURVE_WITH_KNOTS('',3,(#1837,#1838,#1839,#1840,#1841,#1842,#1843, #1844,#1845),.UNSPECIFIED.,.F.,.F.,(4,1,1,1,1,1,4),(0.E0,2.5E-1,3.75E-1,5.E-1, 6.25E-1,7.5E-1,1.E0),.UNSPECIFIED.); #1856=B_SPLINE_CURVE_WITH_KNOTS('',3,(#1847,#1848,#1849,#1850,#1851,#1852,#1853, #1854,#1855),.UNSPECIFIED.,.F.,.F.,(4,1,1,1,1,1,4),(0.E0,2.5E-1,3.75E-1,5.E-1, 6.25E-1,7.5E-1,1.E0),.UNSPECIFIED.); #1873=CIRCLE('',#1872,2.575E-1); #1878=CIRCLE('',#1877,2.575E-1); #1883=CIRCLE('',#1882,1.925E-1); #1888=CIRCLE('',#1887,1.925E-1); #1933=CIRCLE('',#1932,9.5E-2); #1938=CIRCLE('',#1937,9.5E-2); #1943=CIRCLE('',#1942,6.25E-2); #1948=CIRCLE('',#1947,6.25E-2); #1961=CIRCLE('',#1960,9.5E-2); #1966=CIRCLE('',#1965,9.5E-2); #1979=CIRCLE('',#1978,6.25E-2); #1984=CIRCLE('',#1983,6.25E-2); #1993=CIRCLE('',#1992,3.5E-1); #2002=CIRCLE('',#2001,3.5E-1); #2035=CIRCLE('',#2034,3.5E-1); #2044=CIRCLE('',#2043,3.5E-1); #2053=CIRCLE('',#2052,3.5E-1); #2062=CIRCLE('',#2061,3.5E-1); #2071=CIRCLE('',#2070,3.5E-1); #2080=CIRCLE('',#2079,3.5E-1); #2089=CIRCLE('',#2088,3.5E-1); #2098=CIRCLE('',#2097,3.5E-1); #2107=CIRCLE('',#2106,3.5E-1); #2116=CIRCLE('',#2115,3.5E-1); #2145=CIRCLE('',#2144,9.5E-2); #2150=CIRCLE('',#2149,9.5E-2); #2163=CIRCLE('',#2162,6.25E-2); #2168=CIRCLE('',#2167,6.25E-2); #2189=CIRCLE('',#2188,1.E-1); #2194=CIRCLE('',#2193,1.E-1); #2215=CIRCLE('',#2214,1.E-1); #2220=CIRCLE('',#2219,1.E-1); #2233=CIRCLE('',#2232,2.575E-1); #2238=CIRCLE('',#2237,2.575E-1); #2243=CIRCLE('',#2242,1.925E-1); #2248=CIRCLE('',#2247,1.925E-1); #2269=CIRCLE('',#2268,2.575E-1); #2274=CIRCLE('',#2273,2.575E-1); #2279=CIRCLE('',#2278,1.925E-1); #2284=CIRCLE('',#2283,1.925E-1); #2305=CIRCLE('',#2304,2.575E-1); #2310=CIRCLE('',#2309,2.575E-1); #2315=CIRCLE('',#2314,1.925E-1); #2320=CIRCLE('',#2319,1.925E-1); #2341=CIRCLE('',#2340,2.575E-1); #2346=CIRCLE('',#2345,2.575E-1); #2351=CIRCLE('',#2350,1.925E-1); #2356=CIRCLE('',#2355,1.925E-1); #2377=CIRCLE('',#2376,2.575E-1); #2382=CIRCLE('',#2381,2.575E-1); #2387=CIRCLE('',#2386,1.925E-1); #2392=CIRCLE('',#2391,1.925E-1); #2413=CIRCLE('',#2412,2.575E-1); #2418=CIRCLE('',#2417,2.575E-1); #2423=CIRCLE('',#2422,1.925E-1); #2428=CIRCLE('',#2427,1.925E-1); #2449=CIRCLE('',#2448,2.56E-1); #2454=CIRCLE('',#2453,2.56E-1); #2459=CIRCLE('',#2458,1.925E-1); #2464=CIRCLE('',#2463,1.925E-1); #2485=CIRCLE('',#2484,2.56E-1); #2490=CIRCLE('',#2489,2.56E-1); #2495=CIRCLE('',#2494,1.925E-1); #2500=CIRCLE('',#2499,1.925E-1); #2521=CIRCLE('',#2520,2.56E-1); #2526=CIRCLE('',#2525,2.56E-1); #2531=CIRCLE('',#2530,1.925E-1); #2536=CIRCLE('',#2535,1.925E-1); #2557=CIRCLE('',#2556,2.56E-1); #2562=CIRCLE('',#2561,2.56E-1); #2567=CIRCLE('',#2566,1.925E-1); #2572=CIRCLE('',#2571,1.925E-1); #2593=CIRCLE('',#2592,2.56E-1); #2598=CIRCLE('',#2597,2.56E-1); #2603=CIRCLE('',#2602,1.925E-1); #2608=CIRCLE('',#2607,1.925E-1); #2629=CIRCLE('',#2628,2.56E-1); #2634=CIRCLE('',#2633,2.56E-1); #2639=CIRCLE('',#2638,1.925E-1); #2644=CIRCLE('',#2643,1.925E-1); #2665=CIRCLE('',#2664,2.575E-1); #2670=CIRCLE('',#2669,2.575E-1); #2675=CIRCLE('',#2674,1.925E-1); #2680=CIRCLE('',#2679,1.925E-1); #2701=CIRCLE('',#2700,2.575E-1); #2706=CIRCLE('',#2705,2.575E-1); #2711=CIRCLE('',#2710,1.925E-1); #2716=CIRCLE('',#2715,1.925E-1); #2737=CIRCLE('',#2736,2.575E-1); #2742=CIRCLE('',#2741,2.575E-1); #2747=CIRCLE('',#2746,1.925E-1); #2752=CIRCLE('',#2751,1.925E-1); #2773=CIRCLE('',#2772,2.575E-1); #2778=CIRCLE('',#2777,2.575E-1); #2783=CIRCLE('',#2782,1.925E-1); #2788=CIRCLE('',#2787,1.925E-1); #2809=CIRCLE('',#2808,2.575E-1); #2814=CIRCLE('',#2813,2.575E-1); #2819=CIRCLE('',#2818,1.925E-1); #2824=CIRCLE('',#2823,1.925E-1); #2845=CIRCLE('',#2844,2.575E-1); #2850=CIRCLE('',#2849,2.575E-1); #2855=CIRCLE('',#2854,1.925E-1); #2860=CIRCLE('',#2859,1.925E-1); #2882=B_SPLINE_CURVE_WITH_KNOTS('',3,(#2873,#2874,#2875,#2876,#2877,#2878,#2879, #2880,#2881),.UNSPECIFIED.,.F.,.F.,(4,1,1,1,1,1,4),(0.E0,2.5E-1,3.75E-1,5.E-1, 6.25E-1,7.5E-1,1.E0),.UNSPECIFIED.); #2892=B_SPLINE_CURVE_WITH_KNOTS('',3,(#2883,#2884,#2885,#2886,#2887,#2888,#2889, #2890,#2891),.UNSPECIFIED.,.F.,.F.,(4,1,1,1,1,1,4),(0.E0,2.5E-1,3.75E-1,5.E-1, 6.25E-1,7.5E-1,1.E0),.UNSPECIFIED.); #2905=CIRCLE('',#2904,2.575E-1); #2910=CIRCLE('',#2909,2.575E-1); #2915=CIRCLE('',#2914,1.925E-1); #2920=CIRCLE('',#2919,1.925E-1); #2937=CIRCLE('',#2936,3.5E-1); #2946=CIRCLE('',#2945,3.5E-1); #2955=CIRCLE('',#2954,3.5E-1); #2964=CIRCLE('',#2963,3.5E-1); #2973=CIRCLE('',#2972,3.5E-1); #2982=CIRCLE('',#2981,3.5E-1); #2991=CIRCLE('',#2990,3.5E-1); #3000=CIRCLE('',#2999,3.5E-1); #3009=CIRCLE('',#3008,3.5E-1); #3018=CIRCLE('',#3017,3.5E-1); #3027=CIRCLE('',#3026,3.5E-1); #3036=CIRCLE('',#3035,3.5E-1); #3073=CIRCLE('',#3072,9.5E-2); #3078=CIRCLE('',#3077,9.5E-2); #3091=CIRCLE('',#3090,9.5E-2); #3096=CIRCLE('',#3095,9.5E-2); #3109=CIRCLE('',#3108,9.5E-2); #3114=CIRCLE('',#3113,9.5E-2); #3127=CIRCLE('',#3126,9.5E-2); #3132=CIRCLE('',#3131,9.5E-2); #3145=CIRCLE('',#3144,9.5E-2); #3150=CIRCLE('',#3149,9.5E-2); #3159=CIRCLE('',#3158,7.5E-1); #3168=CIRCLE('',#3167,7.5E-1); #3177=CIRCLE('',#3176,7.5E-1); #3186=CIRCLE('',#3185,7.5E-1); #3195=CIRCLE('',#3194,7.5E-1); #3204=CIRCLE('',#3203,7.5E-1); #3213=CIRCLE('',#3212,7.5E-1); #3222=CIRCLE('',#3221,7.5E-1); #3247=CIRCLE('',#3246,7.5E-1); #3256=CIRCLE('',#3255,7.5E-1); #3281=CIRCLE('',#3280,7.5E-1); #3290=CIRCLE('',#3289,7.5E-1); #3299=CIRCLE('',#3298,7.5E-1); #3308=CIRCLE('',#3307,7.5E-1); #3317=CIRCLE('',#3316,7.5E-1); #3326=CIRCLE('',#3325,7.5E-1); #3351=CIRCLE('',#3350,5.625E-1); #3360=CIRCLE('',#3359,5.625E-1); #3365=CIRCLE('',#3364,9.225E-1); #3370=CIRCLE('',#3369,5.6875E0); #3375=CIRCLE('',#3374,8.669989027347E-1); #3388=CIRCLE('',#3387,7.5E-1); #3397=CIRCLE('',#3396,7.5E-1); #3418=CIRCLE('',#3417,8.75E-1); #3427=CIRCLE('',#3426,8.75E-1); #3440=CIRCLE('',#3439,5.6125E-1); #3469=CIRCLE('',#3468,8.75E-1); #3478=CIRCLE('',#3477,8.75E-1); #3495=CIRCLE('',#3494,8.75E-1); #3504=CIRCLE('',#3503,8.75E-1); #3513=CIRCLE('',#3512,8.75E-1); #3522=CIRCLE('',#3521,8.75E-1); #3531=CIRCLE('',#3530,8.75E-1); #3540=CIRCLE('',#3539,8.75E-1); #3549=CIRCLE('',#3548,8.75E-1); #3558=CIRCLE('',#3557,8.75E-1); #3583=CIRCLE('',#3582,5.625E-1); #3592=CIRCLE('',#3591,5.625E-1); #3617=CIRCLE('',#3616,5.625E-1); #3626=CIRCLE('',#3625,5.625E-1); #3651=CIRCLE('',#3650,5.E-1); #3660=CIRCLE('',#3659,5.E-1); #3685=CIRCLE('',#3684,4.375E-1); #3694=CIRCLE('',#3693,4.375E-1); #3719=CIRCLE('',#3718,5.625E-1); #3728=CIRCLE('',#3727,5.625E-1); #3737=CIRCLE('',#3736,8.669989027347E-1); #3742=CIRCLE('',#3741,5.6875E0); #3747=CIRCLE('',#3746,9.225E-1); #3756=CIRCLE('',#3755,7.5E-1); #3765=CIRCLE('',#3764,7.5E-1); #3802=CIRCLE('',#3801,5.625E-1); #3811=CIRCLE('',#3810,5.625E-1); #3820=CIRCLE('',#3819,8.669989027347E-1); #3825=CIRCLE('',#3824,5.6875E0); #3830=CIRCLE('',#3829,9.225E-1); #3839=CIRCLE('',#3838,7.5E-1); #3848=CIRCLE('',#3847,7.5E-1); #3885=CIRCLE('',#3884,5.625E-1); #3894=CIRCLE('',#3893,5.625E-1); #3919=CIRCLE('',#3918,5.625E-1); #3928=CIRCLE('',#3927,5.625E-1); #3953=CIRCLE('',#3952,5.E-1); #3962=CIRCLE('',#3961,5.E-1); #3987=CIRCLE('',#3986,4.375E-1); #3996=CIRCLE('',#3995,4.375E-1); #4021=CIRCLE('',#4020,5.625E-1); #4030=CIRCLE('',#4029,5.625E-1); #4035=CIRCLE('',#4034,9.225E-1); #4040=CIRCLE('',#4039,5.6875E0); #4045=CIRCLE('',#4044,8.669989027347E-1); #4058=CIRCLE('',#4057,7.5E-1); #4067=CIRCLE('',#4066,7.5E-1); #4088=CIRCLE('',#4087,8.8E-1); #4097=CIRCLE('',#4096,8.8E-1); #4106=CIRCLE('',#4105,8.8E-1); #4115=CIRCLE('',#4114,8.8E-1); #4124=CIRCLE('',#4123,8.8E-1); #4133=CIRCLE('',#4132,8.8E-1); #4142=CIRCLE('',#4141,8.8E-1); #4151=CIRCLE('',#4150,8.8E-1); #4160=CIRCLE('',#4159,8.8E-1); #4169=CIRCLE('',#4168,8.8E-1); #4178=CIRCLE('',#4177,8.8E-1); #4187=CIRCLE('',#4186,8.8E-1); #4208=CIRCLE('',#4207,5.6125E-1); #5494=EDGE_CURVE('',#4423,#4400,#132,.T.); #5496=EDGE_CURVE('',#4419,#4423,#1597,.T.); #5498=EDGE_CURVE('',#4419,#4243,#136,.T.); #5500=EDGE_CURVE('',#4239,#4243,#1614,.T.); #5502=EDGE_CURVE('',#4239,#4259,#140,.T.); #5504=EDGE_CURVE('',#4255,#4259,#1630,.T.); #5506=EDGE_CURVE('',#4255,#4320,#144,.T.); #5508=EDGE_CURVE('',#4324,#4320,#1376,.T.); #5510=EDGE_CURVE('',#4324,#4300,#148,.T.); #5512=EDGE_CURVE('',#4300,#4347,#152,.T.); #5514=EDGE_CURVE('',#4343,#4347,#1912,.T.); #5516=EDGE_CURVE('',#4343,#4315,#156,.T.); #5518=EDGE_CURVE('',#4311,#4315,#1385,.T.); #5520=EDGE_CURVE('',#4311,#4251,#160,.T.); #5522=EDGE_CURVE('',#4247,#4251,#1580,.T.); #5524=EDGE_CURVE('',#4247,#4235,#164,.T.); #5526=EDGE_CURVE('',#4231,#4235,#1564,.T.); #5528=EDGE_CURVE('',#4231,#4404,#168,.T.); #5530=EDGE_CURVE('',#4408,#4404,#1556,.T.); #5532=EDGE_CURVE('',#4444,#4408,#172,.T.); #5534=EDGE_CURVE('',#4444,#4448,#1654,.T.); #5536=EDGE_CURVE('',#4400,#4448,#176,.T.); #5540=EDGE_CURVE('',#4427,#4328,#4,.T.); #5542=EDGE_CURVE('',#4332,#4328,#1358,.T.); #5544=EDGE_CURVE('',#4264,#4332,#1340,.T.); #5546=EDGE_CURVE('',#4268,#4264,#8,.T.); #5548=EDGE_CURVE('',#4431,#4268,#1317,.T.); #5550=EDGE_CURVE('',#4427,#4431,#1303,.T.); #5554=EDGE_CURVE('',#4639,#4640,#13,.T.); #5556=EDGE_CURVE('',#4640,#4639,#18,.T.); #5560=EDGE_CURVE('',#4635,#4636,#23,.T.); #5562=EDGE_CURVE('',#4636,#4635,#28,.T.); #5566=EDGE_CURVE('',#4631,#4632,#33,.T.); #5568=EDGE_CURVE('',#4632,#4631,#38,.T.); #5572=EDGE_CURVE('',#4627,#4628,#43,.T.); #5574=EDGE_CURVE('',#4628,#4627,#48,.T.); #5578=EDGE_CURVE('',#4623,#4624,#53,.T.); #5580=EDGE_CURVE('',#4624,#4623,#58,.T.); #5584=EDGE_CURVE('',#4527,#4528,#63,.T.); #5586=EDGE_CURVE('',#4528,#4527,#68,.T.); #5590=EDGE_CURVE('',#4523,#4524,#73,.T.); #5592=EDGE_CURVE('',#4524,#4523,#78,.T.); #5596=EDGE_CURVE('',#4519,#4520,#83,.T.); #5598=EDGE_CURVE('',#4520,#4519,#88,.T.); #5602=EDGE_CURVE('',#4515,#4516,#93,.T.); #5604=EDGE_CURVE('',#4516,#4515,#98,.T.); #5608=EDGE_CURVE('',#4511,#4512,#103,.T.); #5610=EDGE_CURVE('',#4512,#4511,#108,.T.); #5614=EDGE_CURVE('',#4507,#4508,#113,.T.); #5616=EDGE_CURVE('',#4508,#4507,#118,.T.); #5620=EDGE_CURVE('',#4503,#4504,#123,.T.); #5622=EDGE_CURVE('',#4504,#4503,#128,.T.); #5626=EDGE_CURVE('',#4487,#4488,#181,.T.); #5628=EDGE_CURVE('',#4488,#4487,#186,.T.); #5632=EDGE_CURVE('',#4607,#4608,#191,.T.); #5634=EDGE_CURVE('',#4608,#4607,#196,.T.); #5638=EDGE_CURVE('',#4796,#4803,#200,.T.); #5640=EDGE_CURVE('',#4799,#4803,#1439,.T.); #5642=EDGE_CURVE('',#4280,#4799,#204,.T.); #5644=EDGE_CURVE('',#4284,#4280,#1466,.T.); #5646=EDGE_CURVE('',#4272,#4284,#208,.T.); #5648=EDGE_CURVE('',#4276,#4272,#1484,.T.); #5650=EDGE_CURVE('',#4792,#4276,#212,.T.); #5652=EDGE_CURVE('',#4796,#4792,#1430,.T.); #5656=EDGE_CURVE('',#4808,#4411,#216,.T.); #5658=EDGE_CURVE('',#4812,#4808,#1502,.T.); #5660=EDGE_CURVE('',#4812,#4819,#220,.T.); #5662=EDGE_CURVE('',#4815,#4819,#1511,.T.); #5664=EDGE_CURVE('',#4304,#4815,#224,.T.); #5666=EDGE_CURVE('',#4308,#4304,#1412,.T.); #5668=EDGE_CURVE('',#4308,#4339,#228,.T.); #5670=EDGE_CURVE('',#4335,#4339,#1754,.T.); #5672=EDGE_CURVE('',#4335,#4772,#232,.T.); #5674=EDGE_CURVE('',#4776,#4772,#1738,.T.); #5676=EDGE_CURVE('',#4776,#4783,#236,.T.); #5678=EDGE_CURVE('',#4779,#4783,#1707,.T.); #5680=EDGE_CURVE('',#4436,#4779,#240,.T.); #5682=EDGE_CURVE('',#4436,#4440,#2132,.T.); #5684=EDGE_CURVE('',#4415,#4440,#244,.T.); #5686=EDGE_CURVE('',#4411,#4415,#1529,.T.); #5690=EDGE_CURVE('',#4823,#4824,#249,.T.); #5692=EDGE_CURVE('',#4824,#4823,#254,.T.); #5696=EDGE_CURVE('',#4839,#4840,#259,.T.); #5698=EDGE_CURVE('',#4840,#4839,#264,.T.); #5702=EDGE_CURVE('',#4843,#4844,#269,.T.); #5704=EDGE_CURVE('',#4844,#4843,#274,.T.); #5708=EDGE_CURVE('',#4847,#4848,#279,.T.); #5710=EDGE_CURVE('',#4848,#4847,#284,.T.); #5714=EDGE_CURVE('',#4851,#4852,#289,.T.); #5716=EDGE_CURVE('',#4852,#4851,#294,.T.); #5720=EDGE_CURVE('',#4855,#4856,#299,.T.); #5722=EDGE_CURVE('',#4856,#4855,#304,.T.); #5726=EDGE_CURVE('',#5121,#5122,#308,.T.); #5728=EDGE_CURVE('',#5122,#5124,#313,.T.); #5730=EDGE_CURVE('',#5124,#5126,#317,.T.); #5732=EDGE_CURVE('',#5126,#5121,#322,.T.); #5736=EDGE_CURVE('',#5132,#5139,#327,.T.); #5738=EDGE_CURVE('',#5135,#5139,#3388,.T.); #5740=EDGE_CURVE('',#5135,#5129,#331,.T.); #5742=EDGE_CURVE('',#5129,#5130,#336,.T.); #5744=EDGE_CURVE('',#5132,#5130,#341,.T.); #5748=EDGE_CURVE('',#5184,#5186,#3418,.T.); #5750=EDGE_CURVE('',#5184,#5147,#345,.T.); #5752=EDGE_CURVE('',#5147,#5148,#350,.T.); #5754=EDGE_CURVE('',#5148,#5194,#354,.T.); #5756=EDGE_CURVE('',#5192,#5194,#3469,.T.); #5758=EDGE_CURVE('',#5192,#5171,#358,.T.); #5760=EDGE_CURVE('',#5167,#5171,#3495,.T.); #5762=EDGE_CURVE('',#5167,#5179,#362,.T.); #5764=EDGE_CURVE('',#5175,#5179,#3513,.T.); #5766=EDGE_CURVE('',#5175,#5155,#366,.T.); #5768=EDGE_CURVE('',#5151,#5155,#3531,.T.); #5770=EDGE_CURVE('',#5151,#5163,#370,.T.); #5772=EDGE_CURVE('',#5159,#5163,#3549,.T.); #5774=EDGE_CURVE('',#5159,#5186,#374,.T.); #5778=EDGE_CURVE('',#5207,#5208,#378,.T.); #5780=EDGE_CURVE('',#5208,#5210,#383,.T.); #5782=EDGE_CURVE('',#5210,#5212,#387,.T.); #5784=EDGE_CURVE('',#5212,#5207,#392,.T.); #5788=EDGE_CURVE('',#5223,#5224,#396,.T.); #5790=EDGE_CURVE('',#5224,#5226,#401,.T.); #5792=EDGE_CURVE('',#5226,#5228,#405,.T.); #5794=EDGE_CURVE('',#5228,#5223,#410,.T.); #5798=EDGE_CURVE('',#5239,#5240,#414,.T.); #5800=EDGE_CURVE('',#5240,#5242,#419,.T.); #5802=EDGE_CURVE('',#5242,#5244,#423,.T.); #5804=EDGE_CURVE('',#5244,#5239,#428,.T.); #5808=EDGE_CURVE('',#5255,#5256,#432,.T.); #5810=EDGE_CURVE('',#5256,#5258,#437,.T.); #5812=EDGE_CURVE('',#5258,#5260,#441,.T.); #5814=EDGE_CURVE('',#5260,#5255,#446,.T.); #5818=EDGE_CURVE('',#5277,#5278,#450,.T.); #5820=EDGE_CURVE('',#5282,#5277,#455,.T.); #5822=EDGE_CURVE('',#5280,#5282,#459,.T.); #5824=EDGE_CURVE('',#5278,#5280,#464,.T.); #5828=EDGE_CURVE('',#5305,#5306,#468,.T.); #5830=EDGE_CURVE('',#5310,#5305,#473,.T.); #5832=EDGE_CURVE('',#5308,#5310,#477,.T.); #5834=EDGE_CURVE('',#5306,#5308,#482,.T.); #5838=EDGE_CURVE('',#5335,#5336,#486,.T.); #5840=EDGE_CURVE('',#5340,#5335,#491,.T.); #5842=EDGE_CURVE('',#5338,#5340,#495,.T.); #5844=EDGE_CURVE('',#5336,#5338,#500,.T.); #5848=EDGE_CURVE('',#5351,#5352,#504,.T.); #5850=EDGE_CURVE('',#5356,#5351,#509,.T.); #5852=EDGE_CURVE('',#5354,#5356,#513,.T.); #5854=EDGE_CURVE('',#5352,#5354,#518,.T.); #5858=EDGE_CURVE('',#5367,#5368,#522,.T.); #5860=EDGE_CURVE('',#5372,#5367,#527,.T.); #5862=EDGE_CURVE('',#5370,#5372,#531,.T.); #5864=EDGE_CURVE('',#5368,#5370,#536,.T.); #5868=EDGE_CURVE('',#5383,#5384,#540,.T.); #5870=EDGE_CURVE('',#5388,#5383,#545,.T.); #5872=EDGE_CURVE('',#5386,#5388,#549,.T.); #5874=EDGE_CURVE('',#5384,#5386,#554,.T.); #5878=EDGE_CURVE('',#5405,#5406,#558,.T.); #5880=EDGE_CURVE('',#5406,#5408,#563,.T.); #5882=EDGE_CURVE('',#5408,#5410,#567,.T.); #5884=EDGE_CURVE('',#5410,#5405,#572,.T.); #5888=EDGE_CURVE('',#5455,#5451,#4097,.T.); #5890=EDGE_CURVE('',#5324,#5455,#576,.T.); #5892=EDGE_CURVE('',#5323,#5324,#581,.T.); #5894=EDGE_CURVE('',#5459,#5323,#585,.T.); #5896=EDGE_CURVE('',#5463,#5459,#4187,.T.); #5898=EDGE_CURVE('',#5436,#5463,#589,.T.); #5900=EDGE_CURVE('',#5440,#5436,#4169,.T.); #5902=EDGE_CURVE('',#5444,#5440,#593,.T.); #5904=EDGE_CURVE('',#5448,#5444,#4151,.T.); #5906=EDGE_CURVE('',#5428,#5448,#597,.T.); #5908=EDGE_CURVE('',#5432,#5428,#4133,.T.); #5910=EDGE_CURVE('',#5420,#5432,#601,.T.); #5912=EDGE_CURVE('',#5424,#5420,#4115,.T.); #5914=EDGE_CURVE('',#5451,#5424,#605,.T.); #5918=EDGE_CURVE('',#5471,#5313,#609,.T.); #5920=EDGE_CURVE('',#5467,#5471,#3839,.T.); #5922=EDGE_CURVE('',#5316,#5467,#614,.T.); #5924=EDGE_CURVE('',#5316,#5314,#619,.T.); #5926=EDGE_CURVE('',#5313,#5314,#624,.T.); #5930=EDGE_CURVE('',#5479,#5285,#628,.T.); #5932=EDGE_CURVE('',#5475,#5479,#3756,.T.); #5934=EDGE_CURVE('',#5288,#5475,#633,.T.); #5936=EDGE_CURVE('',#5288,#5286,#638,.T.); #5938=EDGE_CURVE('',#5285,#5286,#643,.T.); #5942=EDGE_CURVE('',#5416,#5487,#648,.T.); #5944=EDGE_CURVE('',#5483,#5487,#4058,.T.); #5946=EDGE_CURVE('',#5483,#5413,#652,.T.); #5948=EDGE_CURVE('',#5413,#5414,#657,.T.); #5950=EDGE_CURVE('',#5416,#5414,#662,.T.); #5961=EDGE_CURVE('',#4427,#4428,#1298,.T.); #5963=EDGE_CURVE('',#4424,#4428,#906,.T.); #5965=EDGE_CURVE('',#4423,#4424,#1601,.T.); #5968=EDGE_CURVE('',#4390,#4400,#1658,.T.); #5970=EDGE_CURVE('',#4387,#4390,#746,.T.); #5972=EDGE_CURVE('',#4387,#4388,#750,.T.); #5974=EDGE_CURVE('',#4768,#4388,#1698,.T.); #5976=EDGE_CURVE('',#4767,#4768,#1230,.T.); #5978=EDGE_CURVE('',#4287,#4767,#1746,.T.); #5980=EDGE_CURVE('',#4287,#4288,#754,.T.); #5982=EDGE_CURVE('',#4288,#4290,#758,.T.); #5984=EDGE_CURVE('',#4300,#4290,#1900,.T.); #5987=EDGE_CURVE('',#4323,#4324,#1371,.T.); #5989=EDGE_CURVE('',#4327,#4323,#914,.T.); #5991=EDGE_CURVE('',#4327,#4328,#1344,.T.); #5995=EDGE_CURVE('',#4747,#4748,#667,.T.); #5997=EDGE_CURVE('',#4748,#4747,#672,.T.); #6001=EDGE_CURVE('',#4735,#4736,#677,.T.); #6003=EDGE_CURVE('',#4736,#4735,#682,.T.); #6007=EDGE_CURVE('',#4755,#4756,#687,.T.); #6009=EDGE_CURVE('',#4756,#4755,#692,.T.); #6013=EDGE_CURVE('',#4763,#4764,#697,.T.); #6015=EDGE_CURVE('',#4764,#4763,#702,.T.); #6019=EDGE_CURVE('',#4731,#4732,#707,.T.); #6021=EDGE_CURVE('',#4732,#4731,#712,.T.); #6025=EDGE_CURVE('',#4723,#4724,#717,.T.); #6027=EDGE_CURVE('',#4724,#4723,#722,.T.); #6031=EDGE_CURVE('',#4703,#4704,#727,.T.); #6033=EDGE_CURVE('',#4704,#4703,#732,.T.); #6037=EDGE_CURVE('',#4715,#4716,#737,.T.); #6039=EDGE_CURVE('',#4716,#4715,#742,.T.); #6043=EDGE_CURVE('',#4947,#4959,#762,.T.); #6045=EDGE_CURVE('',#4955,#4959,#3213,.T.); #6047=EDGE_CURVE('',#4955,#4967,#766,.T.); #6049=EDGE_CURVE('',#4963,#4967,#3195,.T.); #6051=EDGE_CURVE('',#4963,#4975,#770,.T.); #6053=EDGE_CURVE('',#4971,#4975,#3177,.T.); #6055=EDGE_CURVE('',#4971,#4951,#774,.T.); #6057=EDGE_CURVE('',#4947,#4951,#3159,.T.); #6061=EDGE_CURVE('',#5036,#5048,#778,.T.); #6063=EDGE_CURVE('',#5040,#5036,#3256,.T.); #6065=EDGE_CURVE('',#5028,#5040,#782,.T.); #6067=EDGE_CURVE('',#5032,#5028,#3290,.T.); #6069=EDGE_CURVE('',#5052,#5032,#786,.T.); #6071=EDGE_CURVE('',#5056,#5052,#3308,.T.); #6073=EDGE_CURVE('',#5044,#5056,#790,.T.); #6075=EDGE_CURVE('',#5048,#5044,#3326,.T.); #6086=EDGE_CURVE('',#4747,#4743,#794,.T.); #6088=EDGE_CURVE('',#4743,#4744,#803,.T.); #6090=EDGE_CURVE('',#4748,#4744,#798,.T.); #6102=EDGE_CURVE('',#4744,#4743,#808,.T.); #6124=EDGE_CURVE('',#4735,#4739,#812,.T.); #6126=EDGE_CURVE('',#4739,#4740,#821,.T.); #6128=EDGE_CURVE('',#4736,#4740,#816,.T.); #6140=EDGE_CURVE('',#4740,#4739,#826,.T.); #6151=EDGE_CURVE('',#4934,#4940,#830,.T.); #6153=EDGE_CURVE('',#4940,#4942,#834,.T.); #6155=EDGE_CURVE('',#4938,#4942,#838,.T.); #6157=EDGE_CURVE('',#4788,#4938,#1234,.T.); #6159=EDGE_CURVE('',#4788,#4393,#842,.T.); #6161=EDGE_CURVE('',#4393,#4394,#846,.T.); #6163=EDGE_CURVE('',#4394,#4396,#850,.T.); #6165=EDGE_CURVE('',#4396,#4398,#854,.T.); #6167=EDGE_CURVE('',#4934,#4398,#1178,.T.); #6175=EDGE_CURVE('',#5103,#5099,#2946,.T.); #6177=EDGE_CURVE('',#5076,#5103,#858,.T.); #6179=EDGE_CURVE('',#5080,#5076,#3036,.T.); #6181=EDGE_CURVE('',#5084,#5080,#862,.T.); #6183=EDGE_CURVE('',#5088,#5084,#3018,.T.); #6185=EDGE_CURVE('',#5092,#5088,#866,.T.); #6187=EDGE_CURVE('',#5096,#5092,#3000,.T.); #6189=EDGE_CURVE('',#5068,#5096,#870,.T.); #6191=EDGE_CURVE('',#5072,#5068,#2982,.T.); #6193=EDGE_CURVE('',#5060,#5072,#874,.T.); #6195=EDGE_CURVE('',#5064,#5060,#2964,.T.); #6197=EDGE_CURVE('',#5099,#5064,#878,.T.); #6207=EDGE_CURVE('',#4933,#4934,#1174,.T.); #6209=EDGE_CURVE('',#4940,#4933,#882,.T.); #6221=EDGE_CURVE('',#4432,#4428,#1312,.T.); #6223=EDGE_CURVE('',#4267,#4432,#1326,.T.); #6225=EDGE_CURVE('',#4267,#4263,#910,.T.); #6227=EDGE_CURVE('',#4331,#4263,#1331,.T.); #6229=EDGE_CURVE('',#4327,#4331,#1349,.T.); #6232=EDGE_CURVE('',#4319,#4323,#1367,.T.); #6234=EDGE_CURVE('',#4256,#4319,#918,.T.); #6236=EDGE_CURVE('',#4256,#4260,#1638,.T.); #6238=EDGE_CURVE('',#4240,#4260,#922,.T.); #6240=EDGE_CURVE('',#4240,#4244,#1622,.T.); #6242=EDGE_CURVE('',#4420,#4244,#926,.T.); #6244=EDGE_CURVE('',#4424,#4420,#1606,.T.); #6248=EDGE_CURVE('',#4495,#4496,#951,.T.); #6250=EDGE_CURVE('',#4496,#4495,#956,.T.); #6254=EDGE_CURVE('',#4567,#4568,#981,.T.); #6256=EDGE_CURVE('',#4568,#4567,#986,.T.); #6260=EDGE_CURVE('',#4615,#4616,#1011,.T.); #6262=EDGE_CURVE('',#4616,#4615,#1016,.T.); #6266=EDGE_CURVE('',#4647,#4648,#1021,.T.); #6268=EDGE_CURVE('',#4648,#4647,#1026,.T.); #6272=EDGE_CURVE('',#4659,#4660,#1031,.T.); #6274=EDGE_CURVE('',#4660,#4659,#1036,.T.); #6286=EDGE_CURVE('',#4398,#4447,#1182,.T.); #6288=EDGE_CURVE('',#4443,#4447,#1646,.T.); #6290=EDGE_CURVE('',#4443,#4407,#1186,.T.); #6292=EDGE_CURVE('',#4403,#4407,#1547,.T.); #6294=EDGE_CURVE('',#4232,#4403,#1190,.T.); #6296=EDGE_CURVE('',#4232,#4236,#1572,.T.); #6298=EDGE_CURVE('',#4248,#4236,#1194,.T.); #6300=EDGE_CURVE('',#4248,#4252,#1588,.T.); #6302=EDGE_CURVE('',#4312,#4252,#1198,.T.); #6304=EDGE_CURVE('',#4316,#4312,#1394,.T.); #6306=EDGE_CURVE('',#4344,#4316,#1202,.T.); #6308=EDGE_CURVE('',#4344,#4348,#1920,.T.); #6310=EDGE_CURVE('',#4298,#4348,#1206,.T.); #6312=EDGE_CURVE('',#4298,#4920,#1210,.T.); #6314=EDGE_CURVE('',#4919,#4920,#1214,.T.); #6316=EDGE_CURVE('',#4919,#4923,#1218,.T.); #6318=EDGE_CURVE('',#4923,#4924,#1222,.T.); #6320=EDGE_CURVE('',#4924,#4786,#1226,.T.); #6322=EDGE_CURVE('',#4767,#4786,#1742,.T.); #6325=EDGE_CURVE('',#4768,#4788,#1694,.T.); #6328=EDGE_CURVE('',#4937,#4938,#1238,.T.); #6330=EDGE_CURVE('',#4933,#4937,#1242,.T.); #6334=EDGE_CURVE('',#4373,#4374,#887,.T.); #6336=EDGE_CURVE('',#4374,#4373,#892,.T.); #6340=EDGE_CURVE('',#4383,#4384,#897,.T.); #6342=EDGE_CURVE('',#4384,#4383,#902,.T.); #6346=EDGE_CURVE('',#4473,#4474,#931,.T.); #6348=EDGE_CURVE('',#4474,#4473,#936,.T.); #6352=EDGE_CURVE('',#4483,#4484,#941,.T.); #6354=EDGE_CURVE('',#4484,#4483,#946,.T.); #6358=EDGE_CURVE('',#4543,#4544,#961,.T.); #6360=EDGE_CURVE('',#4544,#4543,#966,.T.); #6364=EDGE_CURVE('',#4555,#4556,#971,.T.); #6366=EDGE_CURVE('',#4556,#4555,#976,.T.); #6370=EDGE_CURVE('',#4587,#4588,#991,.T.); #6372=EDGE_CURVE('',#4588,#4587,#996,.T.); #6376=EDGE_CURVE('',#4599,#4600,#1001,.T.); #6378=EDGE_CURVE('',#4600,#4599,#1006,.T.); #6382=EDGE_CURVE('',#4671,#4672,#1041,.T.); #6384=EDGE_CURVE('',#4672,#4671,#1046,.T.); #6388=EDGE_CURVE('',#4683,#4684,#1051,.T.); #6390=EDGE_CURVE('',#4684,#4683,#1056,.T.); #6394=EDGE_CURVE('',#4695,#4696,#1061,.T.); #6396=EDGE_CURVE('',#4696,#4695,#1066,.T.); #6400=EDGE_CURVE('',#4279,#4800,#1070,.T.); #6402=EDGE_CURVE('',#4804,#4800,#1448,.T.); #6404=EDGE_CURVE('',#4795,#4804,#1074,.T.); #6406=EDGE_CURVE('',#4791,#4795,#1421,.T.); #6408=EDGE_CURVE('',#4791,#4275,#1078,.T.); #6410=EDGE_CURVE('',#4271,#4275,#1475,.T.); #6412=EDGE_CURVE('',#4271,#4283,#1082,.T.); #6414=EDGE_CURVE('',#4279,#4283,#1457,.T.); #6418=EDGE_CURVE('',#4811,#4820,#1086,.T.); #6420=EDGE_CURVE('',#4807,#4811,#1493,.T.); #6422=EDGE_CURVE('',#4807,#4412,#1090,.T.); #6424=EDGE_CURVE('',#4416,#4412,#1538,.T.); #6426=EDGE_CURVE('',#4416,#4439,#1094,.T.); #6428=EDGE_CURVE('',#4435,#4439,#2124,.T.); #6430=EDGE_CURVE('',#4435,#4780,#1098,.T.); #6432=EDGE_CURVE('',#4784,#4780,#1716,.T.); #6434=EDGE_CURVE('',#4775,#4784,#1720,.T.); #6436=EDGE_CURVE('',#4771,#4775,#1729,.T.); #6438=EDGE_CURVE('',#4336,#4771,#1102,.T.); #6440=EDGE_CURVE('',#4336,#4340,#1762,.T.); #6442=EDGE_CURVE('',#4307,#4340,#1106,.T.); #6444=EDGE_CURVE('',#4303,#4307,#1403,.T.); #6446=EDGE_CURVE('',#4303,#4816,#1110,.T.); #6448=EDGE_CURVE('',#4820,#4816,#1520,.T.); #6452=EDGE_CURVE('',#4831,#4832,#1115,.T.); #6454=EDGE_CURVE('',#4832,#4831,#1120,.T.); #6458=EDGE_CURVE('',#4863,#4864,#1125,.T.); #6460=EDGE_CURVE('',#4864,#4863,#1130,.T.); #6464=EDGE_CURVE('',#4875,#4876,#1135,.T.); #6466=EDGE_CURVE('',#4876,#4875,#1140,.T.); #6470=EDGE_CURVE('',#4887,#4888,#1145,.T.); #6472=EDGE_CURVE('',#4888,#4887,#1150,.T.); #6476=EDGE_CURVE('',#4899,#4900,#1155,.T.); #6478=EDGE_CURVE('',#4900,#4899,#1160,.T.); #6482=EDGE_CURVE('',#4911,#4912,#1165,.T.); #6484=EDGE_CURVE('',#4912,#4911,#1170,.T.); #6495=EDGE_CURVE('',#4368,#4374,#1250,.T.); #6497=EDGE_CURVE('',#4370,#4368,#1268,.T.); #6499=EDGE_CURVE('',#4370,#4373,#1246,.T.); #6511=EDGE_CURVE('',#4370,#4368,#1259,.T.); #6522=EDGE_CURVE('',#4367,#4368,#1254,.T.); #6525=EDGE_CURVE('',#4367,#4370,#1263,.T.); #6547=EDGE_CURVE('',#4378,#4384,#1276,.T.); #6549=EDGE_CURVE('',#4380,#4378,#1294,.T.); #6551=EDGE_CURVE('',#4380,#4383,#1272,.T.); #6563=EDGE_CURVE('',#4380,#4378,#1285,.T.); #6574=EDGE_CURVE('',#4377,#4378,#1280,.T.); #6577=EDGE_CURVE('',#4377,#4380,#1289,.T.); #6600=EDGE_CURVE('',#4431,#4432,#1307,.T.); #6613=EDGE_CURVE('',#4267,#4268,#1321,.T.); #6624=EDGE_CURVE('',#4263,#4264,#1335,.T.); #6637=EDGE_CURVE('',#4331,#4332,#1353,.T.); #6662=EDGE_CURVE('',#4319,#4320,#1362,.T.); #6675=EDGE_CURVE('',#4311,#4312,#1380,.T.); #6678=EDGE_CURVE('',#4251,#4252,#1584,.T.); #6691=EDGE_CURVE('',#4255,#4256,#1626,.T.); #6704=EDGE_CURVE('',#4315,#4316,#1389,.T.); #6715=EDGE_CURVE('',#4307,#4308,#1407,.T.); #6718=EDGE_CURVE('',#4339,#4340,#1758,.T.); #6731=EDGE_CURVE('',#4343,#4344,#1908,.T.); #6742=EDGE_CURVE('',#4303,#4304,#1398,.T.); #6755=EDGE_CURVE('',#4791,#4792,#1416,.T.); #6758=EDGE_CURVE('',#4275,#4276,#1479,.T.); #6769=EDGE_CURVE('',#4815,#4816,#1506,.T.); #6784=EDGE_CURVE('',#4795,#4796,#1425,.T.); #6797=EDGE_CURVE('',#4803,#4804,#1443,.T.); #6808=EDGE_CURVE('',#4799,#4800,#1434,.T.); #6823=EDGE_CURVE('',#4279,#4280,#1452,.T.); #6834=EDGE_CURVE('',#4807,#4808,#1488,.T.); #6837=EDGE_CURVE('',#4411,#4412,#1524,.T.); #6850=EDGE_CURVE('',#4283,#4284,#1461,.T.); #6861=EDGE_CURVE('',#4271,#4272,#1470,.T.); #6888=EDGE_CURVE('',#4811,#4812,#1497,.T.); #6901=EDGE_CURVE('',#4819,#4820,#1515,.T.); #6926=EDGE_CURVE('',#4415,#4416,#1533,.T.); #6937=EDGE_CURVE('',#4407,#4408,#1551,.T.); #6940=EDGE_CURVE('',#4443,#4444,#1642,.T.); #6953=EDGE_CURVE('',#4439,#4440,#2128,.T.); #6964=EDGE_CURVE('',#4403,#4404,#1542,.T.); #6979=EDGE_CURVE('',#4231,#4232,#1560,.T.); #6990=EDGE_CURVE('',#4419,#4420,#1592,.T.); #6993=EDGE_CURVE('',#4243,#4244,#1618,.T.); #7006=EDGE_CURVE('',#4235,#4236,#1568,.T.); #7018=EDGE_CURVE('',#4247,#4248,#1576,.T.); #7054=EDGE_CURVE('',#4239,#4240,#1610,.T.); #7070=EDGE_CURVE('',#4259,#4260,#1634,.T.); #7094=EDGE_CURVE('',#4447,#4448,#1650,.T.); #7110=EDGE_CURVE('',#4390,#4396,#1662,.T.); #7123=EDGE_CURVE('',#4387,#4394,#1666,.T.); #7136=EDGE_CURVE('',#4388,#4393,#1670,.T.); #7140=EDGE_CURVE('',#4455,#4456,#1675,.T.); #7142=EDGE_CURVE('',#4456,#4455,#1680,.T.); #7146=EDGE_CURVE('',#4463,#4464,#1685,.T.); #7148=EDGE_CURVE('',#4464,#4463,#1690,.T.); #7158=EDGE_CURVE('',#4779,#4780,#1702,.T.); #7161=EDGE_CURVE('',#4435,#4436,#2120,.T.); #7186=EDGE_CURVE('',#4783,#4784,#1711,.T.); #7197=EDGE_CURVE('',#4775,#4776,#1733,.T.); #7210=EDGE_CURVE('',#4771,#4772,#1724,.T.); #7225=EDGE_CURVE('',#4335,#4336,#1750,.T.); #7237=EDGE_CURVE('',#4786,#4293,#1792,.T.); #7239=EDGE_CURVE('',#4287,#4293,#1928,.T.); #7262=EDGE_CURVE('',#4920,#4926,#1776,.T.); #7265=EDGE_CURVE('',#4296,#4298,#1780,.T.); #7267=EDGE_CURVE('',#4294,#4296,#1784,.T.); #7269=EDGE_CURVE('',#4293,#4294,#1788,.T.); #7273=EDGE_CURVE('',#4924,#4928,#1796,.T.); #7275=EDGE_CURVE('',#4926,#4928,#1800,.T.); #7279=EDGE_CURVE('',#4707,#4708,#1767,.T.); #7281=EDGE_CURVE('',#4708,#4707,#1772,.T.); #7285=EDGE_CURVE('',#5020,#5022,#1993,.T.); #7287=EDGE_CURVE('',#5020,#4983,#1804,.T.); #7289=EDGE_CURVE('',#4979,#4983,#2107,.T.); #7291=EDGE_CURVE('',#4979,#4991,#1808,.T.); #7293=EDGE_CURVE('',#4987,#4991,#2089,.T.); #7295=EDGE_CURVE('',#4987,#5015,#1812,.T.); #7297=EDGE_CURVE('',#5011,#5015,#2071,.T.); #7299=EDGE_CURVE('',#5011,#5007,#1816,.T.); #7301=EDGE_CURVE('',#5003,#5007,#2053,.T.); #7303=EDGE_CURVE('',#5003,#4999,#1820,.T.); #7305=EDGE_CURVE('',#4995,#4999,#2035,.T.); #7307=EDGE_CURVE('',#4995,#5022,#1824,.T.); #7318=EDGE_CURVE('',#4704,#4708,#1832,.T.); #7321=EDGE_CURVE('',#4703,#4707,#1828,.T.); #7345=EDGE_CURVE('',#4926,#4919,#1836,.T.); #7358=EDGE_CURVE('',#4928,#4923,#1860,.T.); #7362=EDGE_CURVE('',#4929,#4930,#1846,.T.); #7364=EDGE_CURVE('',#4930,#4929,#1856,.T.); #7385=EDGE_CURVE('',#4930,#4531,#1868,.T.); #7388=EDGE_CURVE('',#4532,#4929,#1864,.T.); #7390=EDGE_CURVE('',#4531,#4532,#1873,.T.); #7403=EDGE_CURVE('',#4532,#4531,#1878,.T.); #7417=EDGE_CURVE('',#4535,#4536,#1883,.T.); #7419=EDGE_CURVE('',#4536,#4535,#1888,.T.); #7430=EDGE_CURVE('',#4536,#4504,#1896,.T.); #7433=EDGE_CURVE('',#4535,#4503,#1892,.T.); #7457=EDGE_CURVE('',#4347,#4348,#1916,.T.); #7461=EDGE_CURVE('',#4290,#4296,#1904,.T.); #7484=EDGE_CURVE('',#4288,#4294,#1924,.T.); #7502=EDGE_CURVE('',#4355,#4356,#1933,.T.); #7504=EDGE_CURVE('',#4356,#4355,#1938,.T.); #7508=EDGE_CURVE('',#4363,#4364,#1943,.T.); #7510=EDGE_CURVE('',#4364,#4363,#1948,.T.); #7521=EDGE_CURVE('',#4356,#4352,#1956,.T.); #7523=EDGE_CURVE('',#4351,#4352,#1961,.T.); #7525=EDGE_CURVE('',#4355,#4351,#1952,.T.); #7537=EDGE_CURVE('',#4352,#4351,#1966,.T.); #7559=EDGE_CURVE('',#4364,#4360,#1974,.T.); #7561=EDGE_CURVE('',#4359,#4360,#1979,.T.); #7563=EDGE_CURVE('',#4363,#4359,#1970,.T.); #7575=EDGE_CURVE('',#4360,#4359,#1984,.T.); #7596=EDGE_CURVE('',#5019,#5020,#1988,.T.); #7599=EDGE_CURVE('',#5024,#5022,#1997,.T.); #7601=EDGE_CURVE('',#5024,#5019,#2002,.T.); #7612=EDGE_CURVE('',#5019,#4984,#2006,.T.); #7614=EDGE_CURVE('',#4983,#4984,#2111,.T.); #7627=EDGE_CURVE('',#4996,#5024,#2010,.T.); #7629=EDGE_CURVE('',#5000,#4996,#2044,.T.); #7631=EDGE_CURVE('',#5004,#5000,#2014,.T.); #7633=EDGE_CURVE('',#5008,#5004,#2062,.T.); #7635=EDGE_CURVE('',#5012,#5008,#2018,.T.); #7637=EDGE_CURVE('',#5016,#5012,#2080,.T.); #7639=EDGE_CURVE('',#4988,#5016,#2022,.T.); #7641=EDGE_CURVE('',#4992,#4988,#2098,.T.); #7643=EDGE_CURVE('',#4980,#4992,#2026,.T.); #7645=EDGE_CURVE('',#4984,#4980,#2116,.T.); #7657=EDGE_CURVE('',#4995,#4996,#2030,.T.); #7670=EDGE_CURVE('',#4999,#5000,#2039,.T.); #7683=EDGE_CURVE('',#5003,#5004,#2048,.T.); #7696=EDGE_CURVE('',#5007,#5008,#2057,.T.); #7709=EDGE_CURVE('',#5011,#5012,#2066,.T.); #7722=EDGE_CURVE('',#5015,#5016,#2075,.T.); #7733=EDGE_CURVE('',#4987,#4988,#2084,.T.); #7748=EDGE_CURVE('',#4991,#4992,#2093,.T.); #7759=EDGE_CURVE('',#4979,#4980,#2102,.T.); #7797=EDGE_CURVE('',#4455,#4451,#2136,.T.); #7799=EDGE_CURVE('',#4451,#4452,#2145,.T.); #7801=EDGE_CURVE('',#4456,#4452,#2140,.T.); #7813=EDGE_CURVE('',#4452,#4451,#2150,.T.); #7835=EDGE_CURVE('',#4463,#4459,#2154,.T.); #7837=EDGE_CURVE('',#4459,#4460,#2163,.T.); #7839=EDGE_CURVE('',#4464,#4460,#2158,.T.); #7851=EDGE_CURVE('',#4460,#4459,#2168,.T.); #7873=EDGE_CURVE('',#4470,#4473,#2176,.T.); #7875=EDGE_CURVE('',#4470,#4468,#2194,.T.); #7877=EDGE_CURVE('',#4468,#4474,#2172,.T.); #7889=EDGE_CURVE('',#4470,#4468,#2189,.T.); #7900=EDGE_CURVE('',#4467,#4468,#2180,.T.); #7902=EDGE_CURVE('',#4467,#4470,#2184,.T.); #7925=EDGE_CURVE('',#4480,#4483,#2202,.T.); #7927=EDGE_CURVE('',#4480,#4478,#2220,.T.); #7929=EDGE_CURVE('',#4478,#4484,#2198,.T.); #7941=EDGE_CURVE('',#4480,#4478,#2215,.T.); #7952=EDGE_CURVE('',#4477,#4478,#2206,.T.); #7954=EDGE_CURVE('',#4477,#4480,#2210,.T.); #7977=EDGE_CURVE('',#4496,#4492,#2228,.T.); #7979=EDGE_CURVE('',#4491,#4492,#2233,.T.); #7981=EDGE_CURVE('',#4495,#4491,#2224,.T.); #7993=EDGE_CURVE('',#4492,#4491,#2238,.T.); #8008=EDGE_CURVE('',#4499,#4500,#2243,.T.); #8010=EDGE_CURVE('',#4500,#4499,#2248,.T.); #8021=EDGE_CURVE('',#4500,#4488,#2256,.T.); #8024=EDGE_CURVE('',#4499,#4487,#2252,.T.); #8047=EDGE_CURVE('',#4544,#4540,#2264,.T.); #8049=EDGE_CURVE('',#4539,#4540,#2269,.T.); #8051=EDGE_CURVE('',#4543,#4539,#2260,.T.); #8063=EDGE_CURVE('',#4540,#4539,#2274,.T.); #8078=EDGE_CURVE('',#4547,#4548,#2279,.T.); #8080=EDGE_CURVE('',#4548,#4547,#2284,.T.); #8091=EDGE_CURVE('',#4548,#4508,#2292,.T.); #8094=EDGE_CURVE('',#4547,#4507,#2288,.T.); #8117=EDGE_CURVE('',#4556,#4552,#2300,.T.); #8119=EDGE_CURVE('',#4551,#4552,#2305,.T.); #8121=EDGE_CURVE('',#4555,#4551,#2296,.T.); #8133=EDGE_CURVE('',#4552,#4551,#2310,.T.); #8148=EDGE_CURVE('',#4559,#4560,#2315,.T.); #8150=EDGE_CURVE('',#4560,#4559,#2320,.T.); #8161=EDGE_CURVE('',#4560,#4512,#2328,.T.); #8164=EDGE_CURVE('',#4559,#4511,#2324,.T.); #8187=EDGE_CURVE('',#4568,#4564,#2336,.T.); #8189=EDGE_CURVE('',#4563,#4564,#2341,.T.); #8191=EDGE_CURVE('',#4567,#4563,#2332,.T.); #8203=EDGE_CURVE('',#4564,#4563,#2346,.T.); #8218=EDGE_CURVE('',#4571,#4572,#2351,.T.); #8220=EDGE_CURVE('',#4572,#4571,#2356,.T.); #8231=EDGE_CURVE('',#4572,#4516,#2364,.T.); #8234=EDGE_CURVE('',#4571,#4515,#2360,.T.); #8257=EDGE_CURVE('',#4588,#4584,#2372,.T.); #8259=EDGE_CURVE('',#4583,#4584,#2377,.T.); #8261=EDGE_CURVE('',#4587,#4583,#2368,.T.); #8273=EDGE_CURVE('',#4584,#4583,#2382,.T.); #8288=EDGE_CURVE('',#4591,#4592,#2387,.T.); #8290=EDGE_CURVE('',#4592,#4591,#2392,.T.); #8301=EDGE_CURVE('',#4592,#4524,#2400,.T.); #8304=EDGE_CURVE('',#4591,#4523,#2396,.T.); #8327=EDGE_CURVE('',#4600,#4596,#2408,.T.); #8329=EDGE_CURVE('',#4595,#4596,#2413,.T.); #8331=EDGE_CURVE('',#4599,#4595,#2404,.T.); #8343=EDGE_CURVE('',#4596,#4595,#2418,.T.); #8358=EDGE_CURVE('',#4603,#4604,#2423,.T.); #8360=EDGE_CURVE('',#4604,#4603,#2428,.T.); #8371=EDGE_CURVE('',#4604,#4528,#2436,.T.); #8374=EDGE_CURVE('',#4603,#4527,#2432,.T.); #8397=EDGE_CURVE('',#4616,#4612,#2444,.T.); #8399=EDGE_CURVE('',#4611,#4612,#2449,.T.); #8401=EDGE_CURVE('',#4615,#4611,#2440,.T.); #8413=EDGE_CURVE('',#4612,#4611,#2454,.T.); #8428=EDGE_CURVE('',#4619,#4620,#2459,.T.); #8430=EDGE_CURVE('',#4620,#4619,#2464,.T.); #8441=EDGE_CURVE('',#4620,#4608,#2472,.T.); #8444=EDGE_CURVE('',#4619,#4607,#2468,.T.); #8467=EDGE_CURVE('',#4648,#4644,#2480,.T.); #8469=EDGE_CURVE('',#4643,#4644,#2485,.T.); #8471=EDGE_CURVE('',#4647,#4643,#2476,.T.); #8483=EDGE_CURVE('',#4644,#4643,#2490,.T.); #8498=EDGE_CURVE('',#4651,#4652,#2495,.T.); #8500=EDGE_CURVE('',#4652,#4651,#2500,.T.); #8511=EDGE_CURVE('',#4652,#4624,#2508,.T.); #8514=EDGE_CURVE('',#4651,#4623,#2504,.T.); #8537=EDGE_CURVE('',#4660,#4656,#2516,.T.); #8539=EDGE_CURVE('',#4655,#4656,#2521,.T.); #8541=EDGE_CURVE('',#4659,#4655,#2512,.T.); #8553=EDGE_CURVE('',#4656,#4655,#2526,.T.); #8568=EDGE_CURVE('',#4663,#4664,#2531,.T.); #8570=EDGE_CURVE('',#4664,#4663,#2536,.T.); #8581=EDGE_CURVE('',#4664,#4636,#2544,.T.); #8584=EDGE_CURVE('',#4663,#4635,#2540,.T.); #8607=EDGE_CURVE('',#4672,#4668,#2552,.T.); #8609=EDGE_CURVE('',#4667,#4668,#2557,.T.); #8611=EDGE_CURVE('',#4671,#4667,#2548,.T.); #8623=EDGE_CURVE('',#4668,#4667,#2562,.T.); #8638=EDGE_CURVE('',#4675,#4676,#2567,.T.); #8640=EDGE_CURVE('',#4676,#4675,#2572,.T.); #8651=EDGE_CURVE('',#4676,#4628,#2580,.T.); #8654=EDGE_CURVE('',#4675,#4627,#2576,.T.); #8677=EDGE_CURVE('',#4684,#4680,#2588,.T.); #8679=EDGE_CURVE('',#4679,#4680,#2593,.T.); #8681=EDGE_CURVE('',#4683,#4679,#2584,.T.); #8693=EDGE_CURVE('',#4680,#4679,#2598,.T.); #8708=EDGE_CURVE('',#4687,#4688,#2603,.T.); #8710=EDGE_CURVE('',#4688,#4687,#2608,.T.); #8721=EDGE_CURVE('',#4688,#4632,#2616,.T.); #8724=EDGE_CURVE('',#4687,#4631,#2612,.T.); #8747=EDGE_CURVE('',#4696,#4692,#2624,.T.); #8749=EDGE_CURVE('',#4691,#4692,#2629,.T.); #8751=EDGE_CURVE('',#4695,#4691,#2620,.T.); #8763=EDGE_CURVE('',#4692,#4691,#2634,.T.); #8778=EDGE_CURVE('',#4699,#4700,#2639,.T.); #8780=EDGE_CURVE('',#4700,#4699,#2644,.T.); #8791=EDGE_CURVE('',#4700,#4640,#2652,.T.); #8794=EDGE_CURVE('',#4699,#4639,#2648,.T.); #8817=EDGE_CURVE('',#4832,#4828,#2660,.T.); #8819=EDGE_CURVE('',#4827,#4828,#2665,.T.); #8821=EDGE_CURVE('',#4831,#4827,#2656,.T.); #8833=EDGE_CURVE('',#4828,#4827,#2670,.T.); #8848=EDGE_CURVE('',#4835,#4836,#2675,.T.); #8850=EDGE_CURVE('',#4836,#4835,#2680,.T.); #8861=EDGE_CURVE('',#4836,#4824,#2688,.T.); #8864=EDGE_CURVE('',#4835,#4823,#2684,.T.); #8887=EDGE_CURVE('',#4864,#4860,#2696,.T.); #8889=EDGE_CURVE('',#4859,#4860,#2701,.T.); #8891=EDGE_CURVE('',#4863,#4859,#2692,.T.); #8903=EDGE_CURVE('',#4860,#4859,#2706,.T.); #8918=EDGE_CURVE('',#4867,#4868,#2711,.T.); #8920=EDGE_CURVE('',#4868,#4867,#2716,.T.); #8931=EDGE_CURVE('',#4868,#4840,#2724,.T.); #8934=EDGE_CURVE('',#4867,#4839,#2720,.T.); #8957=EDGE_CURVE('',#4876,#4872,#2732,.T.); #8959=EDGE_CURVE('',#4871,#4872,#2737,.T.); #8961=EDGE_CURVE('',#4875,#4871,#2728,.T.); #8973=EDGE_CURVE('',#4872,#4871,#2742,.T.); #8988=EDGE_CURVE('',#4879,#4880,#2747,.T.); #8990=EDGE_CURVE('',#4880,#4879,#2752,.T.); #9001=EDGE_CURVE('',#4880,#4844,#2760,.T.); #9004=EDGE_CURVE('',#4879,#4843,#2756,.T.); #9027=EDGE_CURVE('',#4888,#4884,#2768,.T.); #9029=EDGE_CURVE('',#4883,#4884,#2773,.T.); #9031=EDGE_CURVE('',#4887,#4883,#2764,.T.); #9043=EDGE_CURVE('',#4884,#4883,#2778,.T.); #9058=EDGE_CURVE('',#4891,#4892,#2783,.T.); #9060=EDGE_CURVE('',#4892,#4891,#2788,.T.); #9071=EDGE_CURVE('',#4892,#4848,#2796,.T.); #9074=EDGE_CURVE('',#4891,#4847,#2792,.T.); #9097=EDGE_CURVE('',#4900,#4896,#2804,.T.); #9099=EDGE_CURVE('',#4895,#4896,#2809,.T.); #9101=EDGE_CURVE('',#4899,#4895,#2800,.T.); #9113=EDGE_CURVE('',#4896,#4895,#2814,.T.); #9128=EDGE_CURVE('',#4903,#4904,#2819,.T.); #9130=EDGE_CURVE('',#4904,#4903,#2824,.T.); #9141=EDGE_CURVE('',#4904,#4852,#2832,.T.); #9144=EDGE_CURVE('',#4903,#4851,#2828,.T.); #9167=EDGE_CURVE('',#4912,#4908,#2840,.T.); #9169=EDGE_CURVE('',#4907,#4908,#2845,.T.); #9171=EDGE_CURVE('',#4911,#4907,#2836,.T.); #9183=EDGE_CURVE('',#4908,#4907,#2850,.T.); #9198=EDGE_CURVE('',#4915,#4916,#2855,.T.); #9200=EDGE_CURVE('',#4916,#4915,#2860,.T.); #9211=EDGE_CURVE('',#4916,#4856,#2868,.T.); #9214=EDGE_CURVE('',#4915,#4855,#2864,.T.); #9238=EDGE_CURVE('',#4942,#4937,#2872,.T.); #9254=EDGE_CURVE('',#4943,#4944,#2882,.T.); #9256=EDGE_CURVE('',#4944,#4943,#2892,.T.); #9266=EDGE_CURVE('',#4943,#4575,#2900,.T.); #9269=EDGE_CURVE('',#4576,#4944,#2896,.T.); #9271=EDGE_CURVE('',#4575,#4576,#2905,.T.); #9284=EDGE_CURVE('',#4576,#4575,#2910,.T.); #9298=EDGE_CURVE('',#4579,#4580,#2915,.T.); #9300=EDGE_CURVE('',#4580,#4579,#2920,.T.); #9311=EDGE_CURVE('',#4580,#4520,#2928,.T.); #9314=EDGE_CURVE('',#4579,#4519,#2924,.T.); #9336=EDGE_CURVE('',#5099,#5100,#2932,.T.); #9338=EDGE_CURVE('',#5100,#5104,#2937,.T.); #9340=EDGE_CURVE('',#5103,#5104,#2941,.T.); #9353=EDGE_CURVE('',#5062,#5064,#2959,.T.); #9355=EDGE_CURVE('',#5100,#5062,#3044,.T.); #9365=EDGE_CURVE('',#5059,#5060,#2950,.T.); #9367=EDGE_CURVE('',#5059,#5062,#2955,.T.); #9381=EDGE_CURVE('',#5070,#5072,#2977,.T.); #9383=EDGE_CURVE('',#5059,#5070,#3048,.T.); #9393=EDGE_CURVE('',#5067,#5068,#2968,.T.); #9395=EDGE_CURVE('',#5067,#5070,#2973,.T.); #9409=EDGE_CURVE('',#5094,#5096,#2995,.T.); #9411=EDGE_CURVE('',#5067,#5094,#3052,.T.); #9421=EDGE_CURVE('',#5091,#5092,#2986,.T.); #9423=EDGE_CURVE('',#5091,#5094,#2991,.T.); #9435=EDGE_CURVE('',#5086,#5088,#3013,.T.); #9437=EDGE_CURVE('',#5091,#5086,#3056,.T.); #9449=EDGE_CURVE('',#5083,#5084,#3004,.T.); #9451=EDGE_CURVE('',#5083,#5086,#3009,.T.); #9463=EDGE_CURVE('',#5078,#5080,#3031,.T.); #9465=EDGE_CURVE('',#5083,#5078,#3060,.T.); #9477=EDGE_CURVE('',#5075,#5076,#3022,.T.); #9479=EDGE_CURVE('',#5075,#5078,#3027,.T.); #9492=EDGE_CURVE('',#5075,#5104,#3040,.T.); #9525=EDGE_CURVE('',#4755,#4751,#3064,.T.); #9527=EDGE_CURVE('',#4751,#4752,#3073,.T.); #9529=EDGE_CURVE('',#4756,#4752,#3068,.T.); #9541=EDGE_CURVE('',#4752,#4751,#3078,.T.); #9563=EDGE_CURVE('',#4763,#4759,#3082,.T.); #9565=EDGE_CURVE('',#4759,#4760,#3091,.T.); #9567=EDGE_CURVE('',#4764,#4760,#3086,.T.); #9579=EDGE_CURVE('',#4760,#4759,#3096,.T.); #9601=EDGE_CURVE('',#4732,#4728,#3104,.T.); #9603=EDGE_CURVE('',#4727,#4728,#3109,.T.); #9605=EDGE_CURVE('',#4731,#4727,#3100,.T.); #9617=EDGE_CURVE('',#4728,#4727,#3114,.T.); #9639=EDGE_CURVE('',#4724,#4720,#3122,.T.); #9641=EDGE_CURVE('',#4719,#4720,#3127,.T.); #9643=EDGE_CURVE('',#4723,#4719,#3118,.T.); #9655=EDGE_CURVE('',#4720,#4719,#3132,.T.); #9677=EDGE_CURVE('',#4716,#4712,#3140,.T.); #9679=EDGE_CURVE('',#4711,#4712,#3145,.T.); #9681=EDGE_CURVE('',#4715,#4711,#3136,.T.); #9693=EDGE_CURVE('',#4712,#4711,#3150,.T.); #9714=EDGE_CURVE('',#4947,#4948,#3154,.T.); #9716=EDGE_CURVE('',#4948,#4960,#3238,.T.); #9718=EDGE_CURVE('',#4959,#4960,#3217,.T.); #9731=EDGE_CURVE('',#4951,#4952,#3163,.T.); #9733=EDGE_CURVE('',#4952,#4948,#3168,.T.); #9745=EDGE_CURVE('',#4971,#4972,#3172,.T.); #9747=EDGE_CURVE('',#4972,#4952,#3226,.T.); #9759=EDGE_CURVE('',#4975,#4976,#3181,.T.); #9761=EDGE_CURVE('',#4976,#4972,#3186,.T.); #9771=EDGE_CURVE('',#4963,#4964,#3190,.T.); #9773=EDGE_CURVE('',#4964,#4976,#3230,.T.); #9787=EDGE_CURVE('',#4967,#4968,#3199,.T.); #9789=EDGE_CURVE('',#4968,#4964,#3204,.T.); #9799=EDGE_CURVE('',#4955,#4956,#3208,.T.); #9801=EDGE_CURVE('',#4956,#4968,#3234,.T.); #9816=EDGE_CURVE('',#4960,#4956,#3222,.T.); #9842=EDGE_CURVE('',#5035,#5036,#3242,.T.); #9845=EDGE_CURVE('',#5046,#5048,#3321,.T.); #9847=EDGE_CURVE('',#5035,#5046,#3264,.T.); #9858=EDGE_CURVE('',#5035,#5038,#3247,.T.); #9860=EDGE_CURVE('',#5038,#5040,#3251,.T.); #9871=EDGE_CURVE('',#5027,#5030,#3281,.T.); #9873=EDGE_CURVE('',#5027,#5038,#3260,.T.); #9877=EDGE_CURVE('',#5043,#5046,#3317,.T.); #9879=EDGE_CURVE('',#5043,#5054,#3268,.T.); #9881=EDGE_CURVE('',#5051,#5054,#3299,.T.); #9883=EDGE_CURVE('',#5051,#5030,#3272,.T.); #9893=EDGE_CURVE('',#5027,#5028,#3276,.T.); #9896=EDGE_CURVE('',#5030,#5032,#3285,.T.); #9921=EDGE_CURVE('',#5051,#5052,#3294,.T.); #9934=EDGE_CURVE('',#5054,#5056,#3303,.T.); #9945=EDGE_CURVE('',#5043,#5044,#3312,.T.); #9971=EDGE_CURVE('',#5121,#5107,#3330,.T.); #9973=EDGE_CURVE('',#5107,#5108,#3346,.T.); #9975=EDGE_CURVE('',#5122,#5108,#3342,.T.); #9986=EDGE_CURVE('',#5126,#5112,#3334,.T.); #9988=EDGE_CURVE('',#5112,#5107,#3351,.T.); #10000=EDGE_CURVE('',#5124,#5110,#3338,.T.); #10002=EDGE_CURVE('',#5110,#5112,#3355,.T.); #10015=EDGE_CURVE('',#5108,#5110,#3360,.T.); #10038=EDGE_CURVE('',#5140,#5136,#3397,.T.); #10040=EDGE_CURVE('',#5118,#5140,#3365,.T.); #10042=EDGE_CURVE('',#5116,#5118,#3370,.T.); #10044=EDGE_CURVE('',#5115,#5116,#3375,.T.); #10046=EDGE_CURVE('',#5136,#5115,#3379,.T.); #10056=EDGE_CURVE('',#5135,#5136,#3383,.T.); #10059=EDGE_CURVE('',#5139,#5140,#3392,.T.); #10072=EDGE_CURVE('',#5129,#5115,#3401,.T.); #10086=EDGE_CURVE('',#5130,#5116,#3405,.T.); #10099=EDGE_CURVE('',#5132,#5118,#3409,.T.); #10121=EDGE_CURVE('',#5183,#5184,#3413,.T.); #10124=EDGE_CURVE('',#5188,#5186,#3422,.T.); #10126=EDGE_CURVE('',#5188,#5183,#3427,.T.); #10137=EDGE_CURVE('',#5183,#5143,#3444,.T.); #10139=EDGE_CURVE('',#5147,#5143,#3486,.T.); #10150=EDGE_CURVE('',#5191,#5172,#3431,.T.); #10152=EDGE_CURVE('',#5196,#5191,#3478,.T.); #10154=EDGE_CURVE('',#5144,#5196,#3435,.T.); #10156=EDGE_CURVE('',#5143,#5144,#3440,.T.); #10160=EDGE_CURVE('',#5160,#5188,#3448,.T.); #10162=EDGE_CURVE('',#5164,#5160,#3558,.T.); #10164=EDGE_CURVE('',#5152,#5164,#3452,.T.); #10166=EDGE_CURVE('',#5156,#5152,#3540,.T.); #10168=EDGE_CURVE('',#5176,#5156,#3456,.T.); #10170=EDGE_CURVE('',#5180,#5176,#3522,.T.); #10172=EDGE_CURVE('',#5168,#5180,#3460,.T.); #10174=EDGE_CURVE('',#5172,#5168,#3504,.T.); #10184=EDGE_CURVE('',#5191,#5192,#3464,.T.); #10187=EDGE_CURVE('',#5171,#5172,#3499,.T.); #10200=EDGE_CURVE('',#5196,#5194,#3473,.T.); #10213=EDGE_CURVE('',#5148,#5144,#3482,.T.); #10236=EDGE_CURVE('',#5167,#5168,#3490,.T.); #10251=EDGE_CURVE('',#5179,#5180,#3517,.T.); #10262=EDGE_CURVE('',#5175,#5176,#3508,.T.); #10275=EDGE_CURVE('',#5155,#5156,#3535,.T.); #10288=EDGE_CURVE('',#5151,#5152,#3526,.T.); #10303=EDGE_CURVE('',#5163,#5164,#3553,.T.); #10314=EDGE_CURVE('',#5159,#5160,#3544,.T.); #10340=EDGE_CURVE('',#5207,#5199,#3562,.T.); #10342=EDGE_CURVE('',#5199,#5200,#3578,.T.); #10344=EDGE_CURVE('',#5208,#5200,#3574,.T.); #10355=EDGE_CURVE('',#5212,#5204,#3566,.T.); #10357=EDGE_CURVE('',#5204,#5199,#3583,.T.); #10369=EDGE_CURVE('',#5210,#5202,#3570,.T.); #10371=EDGE_CURVE('',#5202,#5204,#3587,.T.); #10384=EDGE_CURVE('',#5200,#5202,#3592,.T.); #10408=EDGE_CURVE('',#5223,#5215,#3596,.T.); #10410=EDGE_CURVE('',#5215,#5216,#3612,.T.); #10412=EDGE_CURVE('',#5224,#5216,#3608,.T.); #10423=EDGE_CURVE('',#5228,#5220,#3600,.T.); #10425=EDGE_CURVE('',#5220,#5215,#3617,.T.); #10437=EDGE_CURVE('',#5226,#5218,#3604,.T.); #10439=EDGE_CURVE('',#5218,#5220,#3621,.T.); #10452=EDGE_CURVE('',#5216,#5218,#3626,.T.); #10476=EDGE_CURVE('',#5239,#5231,#3630,.T.); #10478=EDGE_CURVE('',#5231,#5232,#3646,.T.); #10480=EDGE_CURVE('',#5240,#5232,#3642,.T.); #10491=EDGE_CURVE('',#5244,#5236,#3634,.T.); #10493=EDGE_CURVE('',#5236,#5231,#3651,.T.); #10505=EDGE_CURVE('',#5242,#5234,#3638,.T.); #10507=EDGE_CURVE('',#5234,#5236,#3655,.T.); #10520=EDGE_CURVE('',#5232,#5234,#3660,.T.); #10544=EDGE_CURVE('',#5255,#5247,#3664,.T.); #10546=EDGE_CURVE('',#5247,#5248,#3680,.T.); #10548=EDGE_CURVE('',#5256,#5248,#3676,.T.); #10559=EDGE_CURVE('',#5260,#5252,#3668,.T.); #10561=EDGE_CURVE('',#5252,#5247,#3685,.T.); #10573=EDGE_CURVE('',#5258,#5250,#3672,.T.); #10575=EDGE_CURVE('',#5250,#5252,#3689,.T.); #10588=EDGE_CURVE('',#5248,#5250,#3694,.T.); #10612=EDGE_CURVE('',#5278,#5264,#3702,.T.); #10614=EDGE_CURVE('',#5263,#5264,#3714,.T.); #10616=EDGE_CURVE('',#5277,#5263,#3698,.T.); #10627=EDGE_CURVE('',#5280,#5266,#3706,.T.); #10629=EDGE_CURVE('',#5264,#5266,#3719,.T.); #10641=EDGE_CURVE('',#5282,#5268,#3710,.T.); #10643=EDGE_CURVE('',#5266,#5268,#3723,.T.); #10656=EDGE_CURVE('',#5268,#5263,#3728,.T.); #10679=EDGE_CURVE('',#5480,#5476,#3765,.T.); #10681=EDGE_CURVE('',#5480,#5271,#3732,.T.); #10683=EDGE_CURVE('',#5271,#5272,#3737,.T.); #10685=EDGE_CURVE('',#5272,#5274,#3742,.T.); #10687=EDGE_CURVE('',#5274,#5476,#3747,.T.); #10697=EDGE_CURVE('',#5475,#5476,#3751,.T.); #10700=EDGE_CURVE('',#5479,#5480,#3760,.T.); #10713=EDGE_CURVE('',#5288,#5274,#3769,.T.); #10727=EDGE_CURVE('',#5286,#5272,#3773,.T.); #10740=EDGE_CURVE('',#5285,#5271,#3777,.T.); #10763=EDGE_CURVE('',#5306,#5292,#3785,.T.); #10765=EDGE_CURVE('',#5291,#5292,#3797,.T.); #10767=EDGE_CURVE('',#5305,#5291,#3781,.T.); #10778=EDGE_CURVE('',#5308,#5294,#3789,.T.); #10780=EDGE_CURVE('',#5292,#5294,#3802,.T.); #10792=EDGE_CURVE('',#5310,#5296,#3793,.T.); #10794=EDGE_CURVE('',#5294,#5296,#3806,.T.); #10807=EDGE_CURVE('',#5296,#5291,#3811,.T.); #10830=EDGE_CURVE('',#5472,#5468,#3848,.T.); #10832=EDGE_CURVE('',#5472,#5299,#3815,.T.); #10834=EDGE_CURVE('',#5299,#5300,#3820,.T.); #10836=EDGE_CURVE('',#5300,#5302,#3825,.T.); #10838=EDGE_CURVE('',#5302,#5468,#3830,.T.); #10848=EDGE_CURVE('',#5467,#5468,#3834,.T.); #10851=EDGE_CURVE('',#5471,#5472,#3843,.T.); #10864=EDGE_CURVE('',#5316,#5302,#3852,.T.); #10878=EDGE_CURVE('',#5314,#5300,#3856,.T.); #10891=EDGE_CURVE('',#5313,#5299,#3860,.T.); #10914=EDGE_CURVE('',#5336,#5328,#3868,.T.); #10916=EDGE_CURVE('',#5327,#5328,#3880,.T.); #10918=EDGE_CURVE('',#5335,#5327,#3864,.T.); #10929=EDGE_CURVE('',#5338,#5330,#3872,.T.); #10931=EDGE_CURVE('',#5328,#5330,#3885,.T.); #10943=EDGE_CURVE('',#5340,#5332,#3876,.T.); #10945=EDGE_CURVE('',#5330,#5332,#3889,.T.); #10958=EDGE_CURVE('',#5332,#5327,#3894,.T.); #10982=EDGE_CURVE('',#5352,#5344,#3902,.T.); #10984=EDGE_CURVE('',#5343,#5344,#3914,.T.); #10986=EDGE_CURVE('',#5351,#5343,#3898,.T.); #10997=EDGE_CURVE('',#5354,#5346,#3906,.T.); #10999=EDGE_CURVE('',#5344,#5346,#3919,.T.); #11011=EDGE_CURVE('',#5356,#5348,#3910,.T.); #11013=EDGE_CURVE('',#5346,#5348,#3923,.T.); #11026=EDGE_CURVE('',#5348,#5343,#3928,.T.); #11050=EDGE_CURVE('',#5368,#5360,#3936,.T.); #11052=EDGE_CURVE('',#5359,#5360,#3948,.T.); #11054=EDGE_CURVE('',#5367,#5359,#3932,.T.); #11065=EDGE_CURVE('',#5370,#5362,#3940,.T.); #11067=EDGE_CURVE('',#5360,#5362,#3953,.T.); #11079=EDGE_CURVE('',#5372,#5364,#3944,.T.); #11081=EDGE_CURVE('',#5362,#5364,#3957,.T.); #11094=EDGE_CURVE('',#5364,#5359,#3962,.T.); #11118=EDGE_CURVE('',#5384,#5376,#3970,.T.); #11120=EDGE_CURVE('',#5375,#5376,#3982,.T.); #11122=EDGE_CURVE('',#5383,#5375,#3966,.T.); #11133=EDGE_CURVE('',#5386,#5378,#3974,.T.); #11135=EDGE_CURVE('',#5376,#5378,#3987,.T.); #11147=EDGE_CURVE('',#5388,#5380,#3978,.T.); #11149=EDGE_CURVE('',#5378,#5380,#3991,.T.); #11162=EDGE_CURVE('',#5380,#5375,#3996,.T.); #11186=EDGE_CURVE('',#5405,#5391,#4000,.T.); #11188=EDGE_CURVE('',#5391,#5392,#4016,.T.); #11190=EDGE_CURVE('',#5406,#5392,#4012,.T.); #11201=EDGE_CURVE('',#5410,#5396,#4004,.T.); #11203=EDGE_CURVE('',#5396,#5391,#4021,.T.); #11215=EDGE_CURVE('',#5408,#5394,#4008,.T.); #11217=EDGE_CURVE('',#5394,#5396,#4025,.T.); #11230=EDGE_CURVE('',#5392,#5394,#4030,.T.); #11253=EDGE_CURVE('',#5488,#5484,#4067,.T.); #11255=EDGE_CURVE('',#5402,#5488,#4035,.T.); #11257=EDGE_CURVE('',#5400,#5402,#4040,.T.); #11259=EDGE_CURVE('',#5399,#5400,#4045,.T.); #11261=EDGE_CURVE('',#5484,#5399,#4049,.T.); #11271=EDGE_CURVE('',#5483,#5484,#4053,.T.); #11274=EDGE_CURVE('',#5487,#5488,#4062,.T.); #11287=EDGE_CURVE('',#5413,#5399,#4071,.T.); #11301=EDGE_CURVE('',#5414,#5400,#4075,.T.); #11314=EDGE_CURVE('',#5416,#5402,#4079,.T.); #11336=EDGE_CURVE('',#5451,#5452,#4083,.T.); #11338=EDGE_CURVE('',#5452,#5456,#4088,.T.); #11340=EDGE_CURVE('',#5455,#5456,#4092,.T.); #11353=EDGE_CURVE('',#5422,#5424,#4110,.T.); #11355=EDGE_CURVE('',#5452,#5422,#4216,.T.); #11365=EDGE_CURVE('',#5419,#5420,#4101,.T.); #11367=EDGE_CURVE('',#5419,#5422,#4106,.T.); #11381=EDGE_CURVE('',#5430,#5432,#4128,.T.); #11383=EDGE_CURVE('',#5419,#5430,#4220,.T.); #11393=EDGE_CURVE('',#5427,#5428,#4119,.T.); #11395=EDGE_CURVE('',#5427,#5430,#4124,.T.); #11409=EDGE_CURVE('',#5446,#5448,#4146,.T.); #11411=EDGE_CURVE('',#5427,#5446,#4224,.T.); #11421=EDGE_CURVE('',#5443,#5444,#4137,.T.); #11423=EDGE_CURVE('',#5443,#5446,#4142,.T.); #11435=EDGE_CURVE('',#5438,#5440,#4164,.T.); #11437=EDGE_CURVE('',#5443,#5438,#4228,.T.); #11449=EDGE_CURVE('',#5435,#5436,#4155,.T.); #11451=EDGE_CURVE('',#5435,#5438,#4160,.T.); #11463=EDGE_CURVE('',#5463,#5464,#4182,.T.); #11465=EDGE_CURVE('',#5435,#5464,#4199,.T.); #11477=EDGE_CURVE('',#5459,#5460,#4173,.T.); #11479=EDGE_CURVE('',#5460,#5464,#4178,.T.); #11493=EDGE_CURVE('',#5323,#5319,#4191,.T.); #11495=EDGE_CURVE('',#5460,#5319,#4203,.T.); #11506=EDGE_CURVE('',#5324,#5320,#4195,.T.); #11508=EDGE_CURVE('',#5319,#5320,#4208,.T.); #11520=EDGE_CURVE('',#5320,#5456,#4212,.T.); #11562=ADVANCED_BREP_SHAPE_REPRESENTATION('',(#11550),#11561); #11569=PRODUCT_DEFINITION('design','',#11568,#11565); #11570=PRODUCT_DEFINITION_SHAPE('','SHAPE FOR PROESOURCE.',#11569); #11571=SHAPE_DEFINITION_REPRESENTATION(#11570,#11562); ENDSEC; END-ISO-10303-21; netgen-6.2.1804/tutorials/twocubes.geo0000644000175000017500000000067213272137567016367 0ustar kurtkurtalgebraic3d # example with two sub-domains solid cube = plane (0, 0, 0; 0, 0, -1) and plane (0, 0, 0; 0, -1, 0) and plane (0, 0, 0; -1, 0, 0) and plane (1, 1, 1; 0, 0, 1) and plane (1, 1, 1; 0, 1, 0) and plane (1, 1, 1; 1, 0, 0); solid cutplane = plane (0.5, 0, 0; -1, 0, 0); solid right = cube and cutplane; solid left = cube and not cutplane; tlo right -col=[1,0,0]; tlo left -col=[0,0,1]; netgen-6.2.1804/tutorials/cubeandring.geo0000644000175000017500000000121013272137567017002 0ustar kurtkurtalgebraic3d curve2d testcurve=(8; -0.5,1; -0.55,1.5; # -0.275,1.775; -0.5,2; 0,2.05; 0.5,2; 0.55,1.5; 0.5,1; 0,0.95; 4; 3,8,1,2; 3,2,3,4; 3,4,5,6; 3,6,7,8); #curve2d testcurve=(8; # -0.5,1; # -0.55,1.5; # -0.5,2; # 0,2.05; # 0.5,2; # 0.55,1.5; # 0.5,1; # 0,0.95; # 4; # 3,8,1,2; # 3,2,3,4; # 3,4,5,6; # 3,6,7,8); curve2d testcurve1=(4; -0.55,1.5; 0,2.05; 0.55,1.5; 0,0.95; 4; 2,1,2; 2,2,3; 2,3,4; 2,4,1); solid mytorus = revolution(0,0,0.5;1,0,0.5;testcurve); #solid mytorus = revolution(0,0,0.5;1,0,0.5;testcurve1); solid bbb = orthobrick(-4,-4,-4;4,4,0.1); solid brickandring = mytorus or bbb; tlo brickandring; netgen-6.2.1804/tutorials/sphere.geo0000644000175000017500000000011513272137567016012 0ustar kurtkurtalgebraic3d solid main = sphere (0, 0, 0; 1); tlo main; point (0, 0, 0); netgen-6.2.1804/tutorials/squarecircle.in2d0000644000175000017500000000214113272137567017271 0ustar kurtkurt# keyword for 2D geometry, version 2 splinecurves2dv2 # a global grading factor 2 # the points (point number, x and y coordinates) points 1 0 0 2 1 0 3 1 1 4 0 1 5 0.5 0.4 6 0.6 0.4 7 0.6 0.5 8 0.6 0.6 9 0.5 0.6 10 0.4 0.6 11 0.4 0.5 12 0.4 0.4 # boundary curves consisting of # dl dr np p1 p1 flaglist # with # dl ... sub-domain nr on left side # dr ... sub-domain nr on right side # np ... curve is given by 2 (or 3) points # p1, p2 ... points defining the curve # flagslist segments 1 0 2 1 2 -bc=1 1 0 2 2 3 -bc=1 1 0 2 3 4 -bc=1 1 0 2 4 1 -bc=1 2 1 3 5 6 7 -bc=2 2 1 3 7 8 9 -bc=2 2 1 3 9 10 11 -bc=2 2 1 3 11 12 5 -bc=2 materials 1 domain1 -maxh=0.2 2 domain2 -maxh=0.05 netgen-6.2.1804/tutorials/revolution.geo0000644000175000017500000000027513272137567016741 0ustar kurtkurtalgebraic3d curve2d testcurve=(7; 1,0; 1,1; 1.5,1.5; 2,3; 2.5,1.5; 3,1; 3,0; 3; 3,1,2,3; 3,3,4,5; 3,5,6,7); solid something = revolution(0,0,0;1,0,0;testcurve); tlo something;netgen-6.2.1804/tutorials/cubeandspheres.geo0000644000175000017500000000072713272137567017530 0ustar kurtkurt# ## Cube and Spheres # algebraic3d # a cube solid cube = plane (0, 0, 0; 0, 0, -1) and plane (0, 0, 0; 0, -1, 0) and plane (0, 0, 0; -1, 0, 0) and plane (1, 1, 1; 0, 0, 1) and plane (1, 1, 1; 0, 1, 0) and plane (1, 1, 1; 1, 0, 0); # two shperes solid sph1 = sphere (0.5, 0.5, 0.5; 0.58); solid sph2 = sphere (0.5, 0.5, 0.5; 0.75); # cut cube with inner and outer sphere solid main = cube and sph2 and not sph1; tlo main; netgen-6.2.1804/tutorials/ellipsoid.geo0000644000175000017500000000017313272137567016514 0ustar kurtkurt# ## An elliptic cylinder # algebraic3d solid test = ellipsoid (0, 0, 0; 2, 0, 0; 0, 1, 0; 0, 0, 1) -maxh=0.5; tlo test; netgen-6.2.1804/tutorials/twobricks.geo0000644000175000017500000000065213272137567016541 0ustar kurtkurtalgebraic3d solid cube = plane (0, 0, 0; 0, 0, -1) and plane (0, 0, 0; 0, -1, 0) and plane (0, 0, 0; -1, 0, 0) and plane (1, 1, 1; 0, 0, 1) and plane (1, 1, 1; 0, 1, 0) and plane (1, 1, 1; 1, 0, 0); solid cutplane = plane (0.5, 0, 0; -1, 0, 0); solid right = cube and cutplane; solid left = cube and not cutplane; tlo right -col=[1,0,0] -material=copper; tlo left -col=[0,0,1]; netgen-6.2.1804/tutorials/cylsphere.geo0000644000175000017500000000033213272137567016523 0ustar kurtkurt# ## Cylinder and Spehre # algebraic3d solid cyl = cylinder ( 3, 0, 0; -3, 0, 0; 0.5 ) and plane (-2, 0, 0; -1, 0, 0) and plane (2, 0, 0; 1, 0, 0); solid sp = sphere (0, 0, 0; 1); solid main = sp or cyl; tlo main; netgen-6.2.1804/tutorials/shaft.geo0000644000175000017500000000435713272137567015645 0ustar kurtkurt# ## Crankshaft # algebraic3d solid p1 = plane (0, 0, 0; -1, 0, 0) and plane (10, 0, 0; 1, 0, 0) and ( plane (35, 0, 28; 0, -1, 3) and plane (35, 0, -28; 0, -1, -3) and plane (35, 0, 0; 0, 1, 0) and plane (35, -30, 0; 0, -1, 0) or cylinder (-10, 0, 0; 20, 0, 0; 30) or cylinder (-10, -30, 0; 20, -30, 0; 20) ); solid p2 = plane (35, 0, 0; -1, 0, 0) and plane (45, 0, 0; 1, 0, 0) and ( plane (35, 0, 28; 0, -1, 3) and plane (35, 0, -28; 0, -1, -3) and plane (35, 0, 0; 0, 1, 0) and plane (35, -30, 0; 0, -1, 0) or cylinder (30, 0, 0; 50, 0, 0; 30) or cylinder (30, -30, 0; 50, -30, 0; 20) ); solid p3 = plane (80, 0, 0; -1, 0, 0) and plane (90, 0, 0; 1, 0, 0) and ( plane (0, 0, 28; 0, 1, 3) and plane (0, 0, -28; 0, 1, -3) and plane (0, 0, 0; 0, -1, 0) and plane (0, 30, 0; 0, 1, 0) or cylinder (70, 0, 0; 100, 0, 0; 30) or cylinder (70, 30, 0; 100, 30, 0; 20) ); solid p4 = plane (115, 0, 0; -1, 0, 0) and plane (125, 0, 0; 1, 0, 0) and ( plane (35, 0, 28; 0, 1, 3) and plane (35, 0, -28; 0, 1, -3) and plane (35, 0, 0; 0, -1, 0) and plane (35, 30, 0; 0, 1, 0) or cylinder (110, 0, 0; 130, 0, 0; 30) or cylinder (110, 30, 0;130, 30, 0; 20) ); solid sh1 = cylinder (-50, 0, 0; 10, 0, 0; 15) and plane (-40, 0, 0; -1, 0, 0) and plane (5, 0, 0; 1, 0, 0); solid sh2 = cylinder (30, 0, 0; 90, 0, 0; 15) and plane (40, 0, 0; -1, 0, 0) and plane (85, 0, 0; 1, 0, 0); solid sh3 = cylinder (110, 0, 0; 170, 0, 0; 15) and plane (120, 0, 0; -1, 0, 0) and plane (165, 0, 0; 1, 0, 0); solid pl1 = cylinder (0, -30, 0; 50, -30, 0; 10) and plane (5, 0, 0; -1, 0, 0) and plane (40, 0, 0; 1, 0, 0); solid pl2 = cylinder (80, 30, 0; 130, 30, 0; 10) and plane (85, 0, 0; -1, 0, 0) and plane (120, 0, 0; 1, 0, 0); # # solid main = p1 or p2 or p3 or p4 or sh1 or sh2 or sh3 or pl1 or pl2; tlo main; netgen-6.2.1804/tutorials/shell.geo0000644000175000017500000000025113272137567015634 0ustar kurtkurtalgebraic3d solid main = sphere (0, 0, 0; 1) and not sphere (0, 0, 0; 0.98); # or orthobrick (-0.4, -0.4, -0.4; 0.4, 0.4, 0.4); tlo main -maxh=0.02; netgen-6.2.1804/tutorials/cubemsphere.geo0000644000175000017500000000057413272137567017037 0ustar kurtkurt# ## Cube minus Cylinder # algebraic3d solid cube = plane (0, 0, 0; 0, 0, -1) and plane (0, 0, 0; 0, -1, 0) and plane (0, 0, 0; -1, 0, 0) and plane (1, 1, 1; 0, 0, 1) and plane (1, 1, 1; 0, 1, 0) and plane (1, 1, 1; 1, 0, 0); solid sp = sphere (0.5, 0.5, 0; 0.001); # cut off small sphere: solid main = cube and not sp; tlo main; netgen-6.2.1804/tutorials/manyholes2.geo0000644000175000017500000000070213272137567016607 0ustar kurtkurtalgebraic3d # ## CSG feature copy # # define a axis parallel brick: solid br = orthobrick (0, 0, 0; 20, 20, 1); # define reference cylinder: solid cyl1 = cylinder (0.5, 0.5, -1; 0.5, 0.5, 3; 0.2); # make copies: solid cylx = multitranslate (1, 0, 0; 19; cyl1); solid cyls = multitranslate (0, 1, 0; 19; cylx); solid main = br and not cyls; tlo main; # provide bounding-box for fastening bisection alg: boundingbox (-1, -1, -1; 21, 21, 2); netgen-6.2.1804/tutorials/lshape3d.geo0000644000175000017500000000063013272137567016231 0ustar kurtkurtalgebraic3d # ## 3D Lshape - domain # solid c1 = plane (-1, -1, 0; 0, 0, -1) and plane (-1, -1, 0; 0, -1, 0) and plane (-1, -1, 0; -1, 0, 0) and plane (1, 1, 1; 0, 0, 1) and plane (1, 1, 1; 0, 1, 0) and plane (1, 1, 1; 1, 0, 0); solid f1 = plane (0, 0, 0; -1, 0, 0); solid f2 = plane (0, 0, 0; 0, 1, 0); solid main = c1 and not (f1 and f2); tlo main; netgen-6.2.1804/tutorials/cylinder.geo0000644000175000017500000000027013272137567016337 0ustar kurtkurt# ## a cylinder # algebraic3d # cut cylinder by planes: solid fincyl = cylinder ( 3, 0, 0; -1, 0, 0; 0.5 ) and plane (0, 0, 0; -1, 0, 0) and plane (2, 0, 0; 1, 0, 0); tlo fincyl; netgen-6.2.1804/tutorials/squarehole.in2d0000644000175000017500000000216013272137567016760 0ustar kurtkurt# keyword for 2D geometry, version 2 splinecurves2dv2 # a global grading factor 2 # the points (point number, x and y coordinates) points 1 0 0 2 1 0 3 1 1 4 0 1 5 0.5 0.4 6 0.6 0.4 7 0.6 0.5 8 0.6 0.6 9 0.5 0.6 10 0.4 0.6 11 0.4 0.5 12 0.4 0.4 # boundary curves consisting of # dl dr np p1 p1 flaglist # with # dl ... sub-domain nr on left side # dr ... sub-domain nr on right side # np ... curve is given by 2 (or 3) points # p1, p2 ... points defining the curve # flagslist segments 1 0 2 1 2 -bc=1 1 0 2 2 3 -bc=1 1 0 2 3 4 -bc=1 1 0 2 4 1 -bc=1 0 1 3 5 6 7 -bc=2 -maxh=0.05 0 1 3 7 8 9 -bc=2 -maxh=0.05 0 1 3 9 10 11 -bc=2 -maxh=0.05 0 1 3 11 12 5 -bc=2 -maxh=0.05 materials 1 domain1 -maxh=0.2 netgen-6.2.1804/tutorials/lense.in2d0000644000175000017500000000240613272137567015721 0ustar kurtkurtsplinecurves2dv2 5 points 1 -1.0 -1.0 2 -1.0 1.0 3 0.0 1.0 4 1.0 1.0 5 1.0 -1.0 6 0.0 -1.0 segments 0 1 2 6 1 -bc=1 0 1 2 1 2 -bc=1 0 1 2 2 3 -bc=1 0 2 2 3 4 -bc=1 0 2 2 4 5 -bc=1 0 2 2 5 6 -bc=1 1 3 bsplinepoints 21 4 0 -1.0000 -0.0380 -0.9000 -0.0720 -0.8000 -0.1020 -0.7000 -0.1280 -0.6000 -0.1500 -0.5000 -0.1680 -0.4000 -0.1820 -0.3000 -0.1920 -0.2000 -0.1980 -0.1000 -0.2000 0 -0.1980 0.1000 -0.1920 0.2000 -0.1820 0.3000 -0.1680 0.4000 -0.1500 0.5000 -0.1280 0.6000 -0.1020 0.7000 -0.0720 0.8000 -0.0380 0.9000 0 1.0000 -bc=2 -maxh=0.1 3 2 bsplinepoints 21 3 0 -1.0000 0.0380 -0.9000 0.0720 -0.8000 0.1020 -0.7000 0.1280 -0.6000 0.1500 -0.5000 0.1680 -0.4000 0.1820 -0.3000 0.1920 -0.2000 0.1980 -0.1000 0.2000 0 0.1980 0.1000 0.1920 0.2000 0.1820 0.3000 0.1680 0.4000 0.1500 0.5000 0.1280 0.6000 0.1020 0.7000 0.0720 0.8000 0.0380 0.9000 0 1.0000 -bc=2 -maxh=0.1 materials 1 domain1 -maxh=0.2 2 domain2 -maxh=0.2 3 domain3 -maxh=0.2 netgen-6.2.1804/tutorials/test.dem0000644000175000017500000000072713272137567015507 0ustar kurtkurt# Demo file t = 0; camerapos (0 : -7,0,0; 1: -6,0,0; 10: -5,0,0); camerapos (10: -5,0,0; 11: -5,-5,0; 12: 0,-5,0); camerapos (12: 0,-5,0); camerapos (14: 0,-5,0; 15: 0,-4,0); camerapos (15: 0,-4,0; 16: 4,-4,0; 17: 4,0,0); camerapos (17: 4,0,0; 18: 4,4,0; 19: 0,4,0); camerapos (19: 0,4,0; 20: -4,4,0; 21: -4,0,0); camerapos (21: -4,0,0); camerapos (22: 0,-4,-4); camerapos (23: -4,0,-4); camerapos (24: -4,-4,-4); camerapos (25: -4,-4,-4; 30: 4,-4,-4; 35: 4,4,4); netgen-6.2.1804/tutorials/hinge.stl0000644000175000017500000115516113272137567015663 0ustar kurtkurtsolid facet normal 5.145160e-001 4.501432e-002 8.562984e-001 outer loop vertex 3.832020e+001 1.706140e+001 5.000000e+000 vertex 3.837337e+001 1.645363e+001 5.000000e+000 vertex 3.932020e+001 1.706140e+001 4.399139e+000 endloop endfacet facet normal 5.145160e-001 -4.501432e-002 8.562984e-001 outer loop vertex 3.935818e+001 1.749552e+001 4.399139e+000 vertex 3.832020e+001 1.706140e+001 5.000000e+000 vertex 3.932020e+001 1.706140e+001 4.399139e+000 endloop endfacet facet normal 5.145160e-001 -4.501432e-002 8.562984e-001 outer loop vertex 3.935818e+001 1.749552e+001 4.399139e+000 vertex 3.837337e+001 1.766917e+001 5.000000e+000 vertex 3.832020e+001 1.706140e+001 5.000000e+000 endloop endfacet facet normal 4.988827e-001 -1.336752e-001 8.562984e-001 outer loop vertex 3.935818e+001 1.749552e+001 4.399139e+000 vertex 3.853128e+001 1.825847e+001 5.000000e+000 vertex 3.837337e+001 1.766917e+001 5.000000e+000 endloop endfacet facet normal 4.988827e-001 -1.336752e-001 8.562984e-001 outer loop vertex 3.935818e+001 1.749552e+001 4.399139e+000 vertex 3.947097e+001 1.791645e+001 4.399139e+000 vertex 3.853128e+001 1.825847e+001 5.000000e+000 endloop endfacet facet normal 4.680911e-001 -2.182745e-001 8.562984e-001 outer loop vertex 3.853128e+001 1.825847e+001 5.000000e+000 vertex 3.947097e+001 1.791645e+001 4.399139e+000 vertex 3.878911e+001 1.881140e+001 5.000000e+000 endloop endfacet facet normal 4.680911e-001 -2.182745e-001 8.562984e-001 outer loop vertex 3.878911e+001 1.881140e+001 5.000000e+000 vertex 3.947097e+001 1.791645e+001 4.399139e+000 vertex 3.965514e+001 1.831140e+001 4.399139e+000 endloop endfacet facet normal 4.230768e-001 -2.962415e-001 8.562984e-001 outer loop vertex 3.913904e+001 1.931116e+001 5.000000e+000 vertex 3.965514e+001 1.831140e+001 4.399139e+000 vertex 3.990509e+001 1.866837e+001 4.399139e+000 endloop endfacet facet normal 3.652075e-001 -3.652075e-001 8.562984e-001 outer loop vertex 4.021323e+001 1.897651e+001 4.399139e+000 vertex 3.913904e+001 1.931116e+001 5.000000e+000 vertex 3.990509e+001 1.866837e+001 4.399139e+000 endloop endfacet facet normal 3.652075e-001 -3.652075e-001 8.562984e-001 outer loop vertex 4.021323e+001 1.897651e+001 4.399139e+000 vertex 3.957044e+001 1.974256e+001 5.000000e+000 vertex 3.913904e+001 1.931116e+001 5.000000e+000 endloop endfacet facet normal 2.962415e-001 -4.230768e-001 8.562984e-001 outer loop vertex 4.021323e+001 1.897651e+001 4.399139e+000 vertex 4.057020e+001 1.922646e+001 4.399139e+000 vertex 3.957044e+001 1.974256e+001 5.000000e+000 endloop endfacet facet normal 2.962415e-001 -4.230768e-001 8.562984e-001 outer loop vertex 3.957044e+001 1.974256e+001 5.000000e+000 vertex 4.057020e+001 1.922646e+001 4.399139e+000 vertex 4.007020e+001 2.009249e+001 5.000000e+000 endloop endfacet facet normal 2.182745e-001 -4.680911e-001 8.562984e-001 outer loop vertex 4.007020e+001 2.009249e+001 5.000000e+000 vertex 4.057020e+001 1.922646e+001 4.399139e+000 vertex 4.062313e+001 2.035032e+001 5.000000e+000 endloop endfacet facet normal 2.182745e-001 -4.680911e-001 8.562984e-001 outer loop vertex 4.062313e+001 2.035032e+001 5.000000e+000 vertex 4.057020e+001 1.922646e+001 4.399139e+000 vertex 4.096515e+001 1.941063e+001 4.399139e+000 endloop endfacet facet normal 1.336752e-001 -4.988827e-001 8.562984e-001 outer loop vertex 4.121243e+001 2.050823e+001 5.000000e+000 vertex 4.096515e+001 1.941063e+001 4.399139e+000 vertex 4.138608e+001 1.952342e+001 4.399139e+000 endloop endfacet facet normal 4.501432e-002 -5.145160e-001 8.562984e-001 outer loop vertex 4.182020e+001 1.956140e+001 4.399139e+000 vertex 4.121243e+001 2.050823e+001 5.000000e+000 vertex 4.138608e+001 1.952342e+001 4.399139e+000 endloop endfacet facet normal 4.501432e-002 -5.145160e-001 8.562984e-001 outer loop vertex 4.182020e+001 1.956140e+001 4.399139e+000 vertex 4.182020e+001 2.056140e+001 5.000000e+000 vertex 4.121243e+001 2.050823e+001 5.000000e+000 endloop endfacet facet normal -4.501432e-002 -5.145160e-001 8.562984e-001 outer loop vertex 4.182020e+001 1.956140e+001 4.399139e+000 vertex 4.225432e+001 1.952342e+001 4.399139e+000 vertex 4.182020e+001 2.056140e+001 5.000000e+000 endloop endfacet facet normal -4.501432e-002 -5.145160e-001 8.562984e-001 outer loop vertex 4.182020e+001 2.056140e+001 5.000000e+000 vertex 4.225432e+001 1.952342e+001 4.399139e+000 vertex 4.242797e+001 2.050823e+001 5.000000e+000 endloop endfacet facet normal -1.336752e-001 -4.988827e-001 8.562984e-001 outer loop vertex 4.242797e+001 2.050823e+001 5.000000e+000 vertex 4.225432e+001 1.952342e+001 4.399139e+000 vertex 4.267525e+001 1.941063e+001 4.399139e+000 endloop endfacet facet normal -2.182745e-001 -4.680911e-001 8.562984e-001 outer loop vertex 4.301727e+001 2.035032e+001 5.000000e+000 vertex 4.267525e+001 1.941063e+001 4.399139e+000 vertex 4.307020e+001 1.922646e+001 4.399139e+000 endloop endfacet facet normal -2.962415e-001 -4.230768e-001 8.562984e-001 outer loop vertex 4.357020e+001 2.009249e+001 5.000000e+000 vertex 4.307020e+001 1.922646e+001 4.399139e+000 vertex 4.342717e+001 1.897651e+001 4.399139e+000 endloop endfacet facet normal -3.652075e-001 -3.652075e-001 8.562984e-001 outer loop vertex 4.406996e+001 1.974256e+001 5.000000e+000 vertex 4.342717e+001 1.897651e+001 4.399139e+000 vertex 4.373531e+001 1.866837e+001 4.399139e+000 endloop endfacet facet normal -4.230768e-001 -2.962415e-001 8.562984e-001 outer loop vertex 4.450136e+001 1.931116e+001 5.000000e+000 vertex 4.373531e+001 1.866837e+001 4.399139e+000 vertex 4.398526e+001 1.831140e+001 4.399139e+000 endloop endfacet facet normal -4.680911e-001 -2.182745e-001 8.562984e-001 outer loop vertex 4.485129e+001 1.881140e+001 5.000000e+000 vertex 4.398526e+001 1.831140e+001 4.399139e+000 vertex 4.510912e+001 1.825847e+001 5.000000e+000 endloop endfacet facet normal -4.230768e-001 -2.962415e-001 8.562984e-001 outer loop vertex 4.485129e+001 1.881140e+001 5.000000e+000 vertex 4.450136e+001 1.931116e+001 5.000000e+000 vertex 4.398526e+001 1.831140e+001 4.399139e+000 endloop endfacet facet normal 4.988827e-001 1.336752e-001 8.562984e-001 outer loop vertex 3.837337e+001 1.645363e+001 5.000000e+000 vertex 3.853128e+001 1.586433e+001 5.000000e+000 vertex 3.947097e+001 1.620635e+001 4.399139e+000 endloop endfacet facet normal 4.988827e-001 1.336752e-001 8.562984e-001 outer loop vertex 3.935818e+001 1.662728e+001 4.399139e+000 vertex 3.837337e+001 1.645363e+001 5.000000e+000 vertex 3.947097e+001 1.620635e+001 4.399139e+000 endloop endfacet facet normal 5.145160e-001 4.501432e-002 8.562984e-001 outer loop vertex 3.935818e+001 1.662728e+001 4.399139e+000 vertex 3.932020e+001 1.706140e+001 4.399139e+000 vertex 3.837337e+001 1.645363e+001 5.000000e+000 endloop endfacet facet normal 4.680911e-001 2.182745e-001 8.562984e-001 outer loop vertex 3.853128e+001 1.586433e+001 5.000000e+000 vertex 3.878911e+001 1.531140e+001 5.000000e+000 vertex 3.965514e+001 1.581140e+001 4.399139e+000 endloop endfacet facet normal 4.680911e-001 2.182745e-001 8.562984e-001 outer loop vertex 3.947097e+001 1.620635e+001 4.399139e+000 vertex 3.853128e+001 1.586433e+001 5.000000e+000 vertex 3.965514e+001 1.581140e+001 4.399139e+000 endloop endfacet facet normal 4.230768e-001 2.962415e-001 8.562984e-001 outer loop vertex 3.878911e+001 1.531140e+001 5.000000e+000 vertex 3.913904e+001 1.481164e+001 5.000000e+000 vertex 3.990509e+001 1.545443e+001 4.399139e+000 endloop endfacet facet normal 4.230768e-001 2.962415e-001 8.562984e-001 outer loop vertex 3.965514e+001 1.581140e+001 4.399139e+000 vertex 3.878911e+001 1.531140e+001 5.000000e+000 vertex 3.990509e+001 1.545443e+001 4.399139e+000 endloop endfacet facet normal 3.652075e-001 3.652075e-001 8.562984e-001 outer loop vertex 3.913904e+001 1.481164e+001 5.000000e+000 vertex 3.957044e+001 1.438024e+001 5.000000e+000 vertex 3.990509e+001 1.545443e+001 4.399139e+000 endloop endfacet facet normal 3.652075e-001 3.652075e-001 8.562984e-001 outer loop vertex 3.990509e+001 1.545443e+001 4.399139e+000 vertex 3.957044e+001 1.438024e+001 5.000000e+000 vertex 4.021323e+001 1.514629e+001 4.399139e+000 endloop endfacet facet normal 2.962415e-001 4.230768e-001 8.562984e-001 outer loop vertex 4.021323e+001 1.514629e+001 4.399139e+000 vertex 3.957044e+001 1.438024e+001 5.000000e+000 vertex 4.057020e+001 1.489634e+001 4.399139e+000 endloop endfacet facet normal 2.962415e-001 4.230768e-001 8.562984e-001 outer loop vertex 4.057020e+001 1.489634e+001 4.399139e+000 vertex 3.957044e+001 1.438024e+001 5.000000e+000 vertex 4.007020e+001 1.403031e+001 5.000000e+000 endloop endfacet facet normal 2.182745e-001 4.680911e-001 8.562984e-001 outer loop vertex 4.062313e+001 1.377248e+001 5.000000e+000 vertex 4.057020e+001 1.489634e+001 4.399139e+000 vertex 4.007020e+001 1.403031e+001 5.000000e+000 endloop endfacet facet normal 2.182745e-001 4.680911e-001 8.562984e-001 outer loop vertex 4.062313e+001 1.377248e+001 5.000000e+000 vertex 4.096515e+001 1.471217e+001 4.399139e+000 vertex 4.057020e+001 1.489634e+001 4.399139e+000 endloop endfacet facet normal 1.336752e-001 4.988827e-001 8.562984e-001 outer loop vertex 4.062313e+001 1.377248e+001 5.000000e+000 vertex 4.121243e+001 1.361457e+001 5.000000e+000 vertex 4.096515e+001 1.471217e+001 4.399139e+000 endloop endfacet facet normal 1.336752e-001 4.988827e-001 8.562984e-001 outer loop vertex 4.096515e+001 1.471217e+001 4.399139e+000 vertex 4.121243e+001 1.361457e+001 5.000000e+000 vertex 4.138608e+001 1.459938e+001 4.399139e+000 endloop endfacet facet normal 4.501432e-002 5.145160e-001 8.562984e-001 outer loop vertex 4.138608e+001 1.459938e+001 4.399139e+000 vertex 4.121243e+001 1.361457e+001 5.000000e+000 vertex 4.182020e+001 1.456140e+001 4.399139e+000 endloop endfacet facet normal 4.501432e-002 5.145160e-001 8.562984e-001 outer loop vertex 4.182020e+001 1.456140e+001 4.399139e+000 vertex 4.121243e+001 1.361457e+001 5.000000e+000 vertex 4.182020e+001 1.356140e+001 5.000000e+000 endloop endfacet facet normal -4.501432e-002 5.145160e-001 8.562984e-001 outer loop vertex 4.225432e+001 1.459938e+001 4.399139e+000 vertex 4.182020e+001 1.356140e+001 5.000000e+000 vertex 4.242797e+001 1.361457e+001 5.000000e+000 endloop endfacet facet normal -1.336752e-001 4.988827e-001 8.562984e-001 outer loop vertex 4.267525e+001 1.471217e+001 4.399139e+000 vertex 4.242797e+001 1.361457e+001 5.000000e+000 vertex 4.301727e+001 1.377248e+001 5.000000e+000 endloop endfacet facet normal -2.182745e-001 4.680911e-001 8.562984e-001 outer loop vertex 4.357020e+001 1.403031e+001 5.000000e+000 vertex 4.267525e+001 1.471217e+001 4.399139e+000 vertex 4.301727e+001 1.377248e+001 5.000000e+000 endloop endfacet facet normal -2.182745e-001 4.680911e-001 8.562984e-001 outer loop vertex 4.357020e+001 1.403031e+001 5.000000e+000 vertex 4.307020e+001 1.489634e+001 4.399139e+000 vertex 4.267525e+001 1.471217e+001 4.399139e+000 endloop endfacet facet normal -2.962415e-001 4.230768e-001 8.562984e-001 outer loop vertex 4.357020e+001 1.403031e+001 5.000000e+000 vertex 4.406996e+001 1.438024e+001 5.000000e+000 vertex 4.307020e+001 1.489634e+001 4.399139e+000 endloop endfacet facet normal -2.962415e-001 4.230768e-001 8.562984e-001 outer loop vertex 4.307020e+001 1.489634e+001 4.399139e+000 vertex 4.406996e+001 1.438024e+001 5.000000e+000 vertex 4.342717e+001 1.514629e+001 4.399139e+000 endloop endfacet facet normal -3.652075e-001 3.652075e-001 8.562984e-001 outer loop vertex 4.342717e+001 1.514629e+001 4.399139e+000 vertex 4.406996e+001 1.438024e+001 5.000000e+000 vertex 4.450136e+001 1.481164e+001 5.000000e+000 endloop endfacet facet normal -4.230768e-001 2.962415e-001 8.562984e-001 outer loop vertex 4.373531e+001 1.545443e+001 4.399139e+000 vertex 4.450136e+001 1.481164e+001 5.000000e+000 vertex 4.485129e+001 1.531140e+001 5.000000e+000 endloop endfacet facet normal -4.680911e-001 2.182745e-001 8.562984e-001 outer loop vertex 4.398526e+001 1.581140e+001 4.399139e+000 vertex 4.485129e+001 1.531140e+001 5.000000e+000 vertex 4.510912e+001 1.586433e+001 5.000000e+000 endloop endfacet facet normal -4.988827e-001 1.336752e-001 8.562984e-001 outer loop vertex 4.416943e+001 1.620635e+001 4.399139e+000 vertex 4.510912e+001 1.586433e+001 5.000000e+000 vertex 4.428222e+001 1.662728e+001 4.399139e+000 endloop endfacet facet normal -4.680911e-001 2.182745e-001 8.562984e-001 outer loop vertex 4.416943e+001 1.620635e+001 4.399139e+000 vertex 4.398526e+001 1.581140e+001 4.399139e+000 vertex 4.510912e+001 1.586433e+001 5.000000e+000 endloop endfacet facet normal -4.988827e-001 1.336752e-001 8.562984e-001 outer loop vertex 4.510912e+001 1.586433e+001 5.000000e+000 vertex 4.526703e+001 1.645363e+001 5.000000e+000 vertex 4.428222e+001 1.662728e+001 4.399139e+000 endloop endfacet facet normal -5.145160e-001 4.501432e-002 8.562984e-001 outer loop vertex 4.428222e+001 1.662728e+001 4.399139e+000 vertex 4.526703e+001 1.645363e+001 5.000000e+000 vertex 4.432020e+001 1.706140e+001 4.399139e+000 endloop endfacet facet normal -5.145160e-001 4.501432e-002 8.562984e-001 outer loop vertex 4.432020e+001 1.706140e+001 4.399139e+000 vertex 4.526703e+001 1.645363e+001 5.000000e+000 vertex 4.532020e+001 1.706140e+001 5.000000e+000 endloop endfacet facet normal -5.145160e-001 -4.501432e-002 8.562984e-001 outer loop vertex 4.428222e+001 1.749552e+001 4.399139e+000 vertex 4.532020e+001 1.706140e+001 5.000000e+000 vertex 4.526703e+001 1.766917e+001 5.000000e+000 endloop endfacet facet normal -4.988827e-001 -1.336752e-001 8.562984e-001 outer loop vertex 4.416943e+001 1.791645e+001 4.399139e+000 vertex 4.526703e+001 1.766917e+001 5.000000e+000 vertex 4.510912e+001 1.825847e+001 5.000000e+000 endloop endfacet facet normal -4.680911e-001 -2.182745e-001 8.562984e-001 outer loop vertex 4.398526e+001 1.831140e+001 4.399139e+000 vertex 4.416943e+001 1.791645e+001 4.399139e+000 vertex 4.510912e+001 1.825847e+001 5.000000e+000 endloop endfacet facet normal -3.652075e-001 -3.652075e-001 8.562984e-001 outer loop vertex 4.450136e+001 1.931116e+001 5.000000e+000 vertex 4.406996e+001 1.974256e+001 5.000000e+000 vertex 4.373531e+001 1.866837e+001 4.399139e+000 endloop endfacet facet normal -2.962415e-001 -4.230768e-001 8.562984e-001 outer loop vertex 4.406996e+001 1.974256e+001 5.000000e+000 vertex 4.357020e+001 2.009249e+001 5.000000e+000 vertex 4.342717e+001 1.897651e+001 4.399139e+000 endloop endfacet facet normal -2.182745e-001 -4.680911e-001 8.562984e-001 outer loop vertex 4.357020e+001 2.009249e+001 5.000000e+000 vertex 4.301727e+001 2.035032e+001 5.000000e+000 vertex 4.307020e+001 1.922646e+001 4.399139e+000 endloop endfacet facet normal -1.336752e-001 -4.988827e-001 8.562984e-001 outer loop vertex 4.301727e+001 2.035032e+001 5.000000e+000 vertex 4.242797e+001 2.050823e+001 5.000000e+000 vertex 4.267525e+001 1.941063e+001 4.399139e+000 endloop endfacet facet normal 1.336752e-001 -4.988827e-001 8.562984e-001 outer loop vertex 4.121243e+001 2.050823e+001 5.000000e+000 vertex 4.062313e+001 2.035032e+001 5.000000e+000 vertex 4.096515e+001 1.941063e+001 4.399139e+000 endloop endfacet facet normal 4.230768e-001 -2.962415e-001 8.562984e-001 outer loop vertex 3.913904e+001 1.931116e+001 5.000000e+000 vertex 3.878911e+001 1.881140e+001 5.000000e+000 vertex 3.965514e+001 1.831140e+001 4.399139e+000 endloop endfacet facet normal -4.988827e-001 -1.336752e-001 8.562984e-001 outer loop vertex 4.416943e+001 1.791645e+001 4.399139e+000 vertex 4.428222e+001 1.749552e+001 4.399139e+000 vertex 4.526703e+001 1.766917e+001 5.000000e+000 endloop endfacet facet normal -5.145160e-001 -4.501432e-002 8.562984e-001 outer loop vertex 4.428222e+001 1.749552e+001 4.399139e+000 vertex 4.432020e+001 1.706140e+001 4.399139e+000 vertex 4.532020e+001 1.706140e+001 5.000000e+000 endloop endfacet facet normal -4.230768e-001 2.962415e-001 8.562984e-001 outer loop vertex 4.398526e+001 1.581140e+001 4.399139e+000 vertex 4.373531e+001 1.545443e+001 4.399139e+000 vertex 4.485129e+001 1.531140e+001 5.000000e+000 endloop endfacet facet normal -3.652075e-001 3.652075e-001 8.562984e-001 outer loop vertex 4.342717e+001 1.514629e+001 4.399139e+000 vertex 4.450136e+001 1.481164e+001 5.000000e+000 vertex 4.373531e+001 1.545443e+001 4.399139e+000 endloop endfacet facet normal -1.336752e-001 4.988827e-001 8.562984e-001 outer loop vertex 4.267525e+001 1.471217e+001 4.399139e+000 vertex 4.225432e+001 1.459938e+001 4.399139e+000 vertex 4.242797e+001 1.361457e+001 5.000000e+000 endloop endfacet facet normal -4.501432e-002 5.145160e-001 8.562984e-001 outer loop vertex 4.225432e+001 1.459938e+001 4.399139e+000 vertex 4.182020e+001 1.456140e+001 4.399139e+000 vertex 4.182020e+001 1.356140e+001 5.000000e+000 endloop endfacet facet normal -9.961947e-001 8.715574e-002 0.000000e+000 outer loop vertex 4.432020e+001 1.706140e+001 -8.881784e-016 vertex 4.428222e+001 1.662728e+001 -8.881784e-016 vertex 4.428222e+001 1.662728e+001 4.399139e+000 endloop endfacet facet normal -9.961947e-001 8.715574e-002 0.000000e+000 outer loop vertex 4.432020e+001 1.706140e+001 4.399139e+000 vertex 4.432020e+001 1.706140e+001 -8.881784e-016 vertex 4.428222e+001 1.662728e+001 4.399139e+000 endloop endfacet facet normal -9.961947e-001 -8.715574e-002 0.000000e+000 outer loop vertex 4.432020e+001 1.706140e+001 4.399139e+000 vertex 4.428222e+001 1.749552e+001 -8.881784e-016 vertex 4.432020e+001 1.706140e+001 -8.881784e-016 endloop endfacet facet normal -9.961947e-001 -8.715574e-002 -9.048915e-016 outer loop vertex 4.432020e+001 1.706140e+001 4.399139e+000 vertex 4.428222e+001 1.749552e+001 4.399139e+000 vertex 4.428222e+001 1.749552e+001 -8.881784e-016 endloop endfacet facet normal -9.659258e-001 -2.588190e-001 5.300545e-016 outer loop vertex 4.428222e+001 1.749552e+001 -8.881784e-016 vertex 4.428222e+001 1.749552e+001 4.399139e+000 vertex 4.416943e+001 1.791645e+001 -8.881784e-016 endloop endfacet facet normal -9.659258e-001 -2.588190e-001 -1.030095e-015 outer loop vertex 4.416943e+001 1.791645e+001 -8.881784e-016 vertex 4.428222e+001 1.749552e+001 4.399139e+000 vertex 4.416943e+001 1.791645e+001 4.399139e+000 endloop endfacet facet normal -9.063078e-001 -4.226183e-001 1.440206e-016 outer loop vertex 4.398526e+001 1.831140e+001 -8.881784e-016 vertex 4.416943e+001 1.791645e+001 4.399139e+000 vertex 4.398526e+001 1.831140e+001 4.399139e+000 endloop endfacet facet normal -8.191520e-001 -5.735764e-001 -1.586601e-015 outer loop vertex 4.373531e+001 1.866837e+001 -8.881784e-016 vertex 4.398526e+001 1.831140e+001 4.399139e+000 vertex 4.373531e+001 1.866837e+001 4.399139e+000 endloop endfacet facet normal -7.071068e-001 -7.071068e-001 -1.142109e-015 outer loop vertex 4.342717e+001 1.897651e+001 -8.881784e-016 vertex 4.373531e+001 1.866837e+001 4.399139e+000 vertex 4.342717e+001 1.897651e+001 4.399139e+000 endloop endfacet facet normal -5.735764e-001 -8.191520e-001 -1.324456e-015 outer loop vertex 4.307020e+001 1.922646e+001 -8.881784e-016 vertex 4.342717e+001 1.897651e+001 4.399139e+000 vertex 4.307020e+001 1.922646e+001 4.399139e+000 endloop endfacet facet normal -4.226183e-001 -9.063078e-001 -1.217252e-015 outer loop vertex 4.267525e+001 1.941063e+001 -8.881784e-016 vertex 4.307020e+001 1.922646e+001 4.399139e+000 vertex 4.267525e+001 1.941063e+001 4.399139e+000 endloop endfacet facet normal -2.588190e-001 -9.659258e-001 -1.310129e-015 outer loop vertex 4.225432e+001 1.952342e+001 -8.881784e-016 vertex 4.267525e+001 1.941063e+001 4.399139e+000 vertex 4.225432e+001 1.952342e+001 4.399139e+000 endloop endfacet facet normal -8.715574e-002 -9.961947e-001 -7.038636e-016 outer loop vertex 4.182020e+001 1.956140e+001 -8.881784e-016 vertex 4.225432e+001 1.952342e+001 4.399139e+000 vertex 4.182020e+001 1.956140e+001 4.399139e+000 endloop endfacet facet normal 8.715574e-002 -9.961947e-001 -9.051759e-016 outer loop vertex 4.138608e+001 1.952342e+001 -8.881784e-016 vertex 4.182020e+001 1.956140e+001 4.399139e+000 vertex 4.138608e+001 1.952342e+001 4.399139e+000 endloop endfacet facet normal 2.588190e-001 -9.659258e-001 -2.500203e-016 outer loop vertex 4.096515e+001 1.941063e+001 -8.881784e-016 vertex 4.138608e+001 1.952342e+001 4.399139e+000 vertex 4.096515e+001 1.941063e+001 4.399139e+000 endloop endfacet facet normal 4.226183e-001 -9.063078e-001 -9.292106e-016 outer loop vertex 4.057020e+001 1.922646e+001 -8.881784e-016 vertex 4.096515e+001 1.941063e+001 4.399139e+000 vertex 4.057020e+001 1.922646e+001 4.399139e+000 endloop endfacet facet normal 5.735764e-001 -8.191520e-001 -9.250596e-016 outer loop vertex 4.021323e+001 1.897651e+001 -8.881784e-016 vertex 4.057020e+001 1.922646e+001 4.399139e+000 vertex 4.021323e+001 1.897651e+001 4.399139e+000 endloop endfacet facet normal 7.071068e-001 -7.071068e-001 -1.142109e-015 outer loop vertex 3.990509e+001 1.866837e+001 -8.881784e-016 vertex 4.021323e+001 1.897651e+001 4.399139e+000 vertex 3.990509e+001 1.866837e+001 4.399139e+000 endloop endfacet facet normal 8.191520e-001 -5.735764e-001 -1.059565e-015 outer loop vertex 3.965514e+001 1.831140e+001 -8.881784e-016 vertex 3.990509e+001 1.866837e+001 4.399139e+000 vertex 3.965514e+001 1.831140e+001 4.399139e+000 endloop endfacet facet normal 9.063078e-001 -4.226183e-001 -4.853241e-016 outer loop vertex 3.947097e+001 1.791645e+001 -8.881784e-016 vertex 3.965514e+001 1.831140e+001 4.399139e+000 vertex 3.947097e+001 1.791645e+001 4.399139e+000 endloop endfacet facet normal 9.659258e-001 -2.588190e-001 -5.300545e-016 outer loop vertex 3.935818e+001 1.749552e+001 -8.881784e-016 vertex 3.947097e+001 1.791645e+001 4.399139e+000 vertex 3.935818e+001 1.749552e+001 4.399139e+000 endloop endfacet facet normal 9.961947e-001 -8.715574e-002 -7.038636e-016 outer loop vertex 3.932020e+001 1.706140e+001 -8.881784e-016 vertex 3.935818e+001 1.749552e+001 4.399139e+000 vertex 3.932020e+001 1.706140e+001 4.399139e+000 endloop endfacet facet normal 9.961947e-001 8.715574e-002 7.038636e-017 outer loop vertex 3.935818e+001 1.662728e+001 -8.881784e-016 vertex 3.932020e+001 1.706140e+001 4.399139e+000 vertex 3.935818e+001 1.662728e+001 4.399139e+000 endloop endfacet facet normal 9.659258e-001 2.588190e-001 0.000000e+000 outer loop vertex 3.947097e+001 1.620635e+001 -8.881784e-016 vertex 3.935818e+001 1.662728e+001 4.399139e+000 vertex 3.947097e+001 1.620635e+001 4.399139e+000 endloop endfacet facet normal 9.063078e-001 4.226183e-001 0.000000e+000 outer loop vertex 3.965514e+001 1.581140e+001 -8.881784e-016 vertex 3.947097e+001 1.620635e+001 4.399139e+000 vertex 3.965514e+001 1.581140e+001 4.399139e+000 endloop endfacet facet normal 8.191520e-001 5.735764e-001 2.316081e-016 outer loop vertex 3.990509e+001 1.545443e+001 -8.881784e-016 vertex 3.965514e+001 1.581140e+001 4.399139e+000 vertex 3.990509e+001 1.545443e+001 4.399139e+000 endloop endfacet facet normal 7.071068e-001 7.071068e-001 2.855272e-016 outer loop vertex 4.021323e+001 1.514629e+001 -8.881784e-016 vertex 3.990509e+001 1.545443e+001 4.399139e+000 vertex 4.021323e+001 1.514629e+001 4.399139e+000 endloop endfacet facet normal 5.735764e-001 8.191520e-001 3.307707e-016 outer loop vertex 4.057020e+001 1.489634e+001 -8.881784e-016 vertex 4.021323e+001 1.514629e+001 4.399139e+000 vertex 4.057020e+001 1.489634e+001 4.399139e+000 endloop endfacet facet normal 4.226183e-001 9.063078e-001 -6.826070e-016 outer loop vertex 4.096515e+001 1.471217e+001 -8.881784e-016 vertex 4.057020e+001 1.489634e+001 4.399139e+000 vertex 4.096515e+001 1.471217e+001 4.399139e+000 endloop endfacet facet normal 2.588190e-001 9.659258e-001 -4.180408e-016 outer loop vertex 4.138608e+001 1.459938e+001 -8.881784e-016 vertex 4.096515e+001 1.471217e+001 4.399139e+000 vertex 4.138608e+001 1.459938e+001 4.399139e+000 endloop endfacet facet normal 8.715574e-002 9.961947e-001 0.000000e+000 outer loop vertex 4.182020e+001 1.456140e+001 -8.881784e-016 vertex 4.138608e+001 1.459938e+001 4.399139e+000 vertex 4.182020e+001 1.456140e+001 4.399139e+000 endloop endfacet facet normal -8.715574e-002 9.961947e-001 0.000000e+000 outer loop vertex 4.225432e+001 1.459938e+001 -8.881784e-016 vertex 4.182020e+001 1.456140e+001 4.399139e+000 vertex 4.225432e+001 1.459938e+001 4.399139e+000 endloop endfacet facet normal -2.588190e-001 9.659258e-001 2.800343e-017 outer loop vertex 4.267525e+001 1.471217e+001 -8.881784e-016 vertex 4.225432e+001 1.459938e+001 4.399139e+000 vertex 4.267525e+001 1.471217e+001 4.399139e+000 endloop endfacet facet normal -4.226183e-001 9.063078e-001 -3.659639e-016 outer loop vertex 4.307020e+001 1.489634e+001 -8.881784e-016 vertex 4.267525e+001 1.471217e+001 4.399139e+000 vertex 4.307020e+001 1.489634e+001 4.399139e+000 endloop endfacet facet normal -5.735764e-001 8.191520e-001 5.956618e-016 outer loop vertex 4.342717e+001 1.514629e+001 -8.881784e-016 vertex 4.307020e+001 1.489634e+001 4.399139e+000 vertex 4.342717e+001 1.514629e+001 4.399139e+000 endloop endfacet facet normal -7.071068e-001 7.071068e-001 0.000000e+000 outer loop vertex 4.373531e+001 1.545443e+001 -8.881784e-016 vertex 4.342717e+001 1.514629e+001 4.399139e+000 vertex 4.373531e+001 1.545443e+001 4.399139e+000 endloop endfacet facet normal -8.191520e-001 5.735764e-001 0.000000e+000 outer loop vertex 4.398526e+001 1.581140e+001 -8.881784e-016 vertex 4.373531e+001 1.545443e+001 4.399139e+000 vertex 4.398526e+001 1.581140e+001 4.399139e+000 endloop endfacet facet normal -9.063078e-001 4.226183e-001 0.000000e+000 outer loop vertex 4.416943e+001 1.620635e+001 -8.881784e-016 vertex 4.398526e+001 1.581140e+001 4.399139e+000 vertex 4.416943e+001 1.620635e+001 4.399139e+000 endloop endfacet facet normal -9.659258e-001 2.588190e-001 0.000000e+000 outer loop vertex 4.428222e+001 1.662728e+001 -8.881784e-016 vertex 4.416943e+001 1.620635e+001 4.399139e+000 vertex 4.428222e+001 1.662728e+001 4.399139e+000 endloop endfacet facet normal -9.659258e-001 2.588190e-001 0.000000e+000 outer loop vertex 4.428222e+001 1.662728e+001 -8.881784e-016 vertex 4.416943e+001 1.620635e+001 -8.881784e-016 vertex 4.416943e+001 1.620635e+001 4.399139e+000 endloop endfacet facet normal -9.063078e-001 4.226183e-001 0.000000e+000 outer loop vertex 4.416943e+001 1.620635e+001 -8.881784e-016 vertex 4.398526e+001 1.581140e+001 -8.881784e-016 vertex 4.398526e+001 1.581140e+001 4.399139e+000 endloop endfacet facet normal -8.191520e-001 5.735764e-001 0.000000e+000 outer loop vertex 4.398526e+001 1.581140e+001 -8.881784e-016 vertex 4.373531e+001 1.545443e+001 -8.881784e-016 vertex 4.373531e+001 1.545443e+001 4.399139e+000 endloop endfacet facet normal -7.071068e-001 7.071068e-001 8.614567e-016 outer loop vertex 4.373531e+001 1.545443e+001 -8.881784e-016 vertex 4.342717e+001 1.514629e+001 -8.881784e-016 vertex 4.342717e+001 1.514629e+001 4.399139e+000 endloop endfacet facet normal -5.735764e-001 8.191520e-001 -3.257609e-016 outer loop vertex 4.342717e+001 1.514629e+001 -8.881784e-016 vertex 4.307020e+001 1.489634e+001 -8.881784e-016 vertex 4.307020e+001 1.489634e+001 4.399139e+000 endloop endfacet facet normal -4.226183e-001 9.063078e-001 3.166431e-016 outer loop vertex 4.267525e+001 1.471217e+001 -8.881784e-016 vertex 4.267525e+001 1.471217e+001 4.399139e+000 vertex 4.307020e+001 1.489634e+001 -8.881784e-016 endloop endfacet facet normal -2.588190e-001 9.659258e-001 0.000000e+000 outer loop vertex 4.267525e+001 1.471217e+001 -8.881784e-016 vertex 4.225432e+001 1.459938e+001 -8.881784e-016 vertex 4.225432e+001 1.459938e+001 4.399139e+000 endloop endfacet facet normal -8.715574e-002 9.961947e-001 0.000000e+000 outer loop vertex 4.225432e+001 1.459938e+001 -8.881784e-016 vertex 4.182020e+001 1.456140e+001 -8.881784e-016 vertex 4.182020e+001 1.456140e+001 4.399139e+000 endloop endfacet facet normal 8.715574e-002 9.961947e-001 -1.411631e-016 outer loop vertex 4.182020e+001 1.456140e+001 -8.881784e-016 vertex 4.138608e+001 1.459938e+001 -8.881784e-016 vertex 4.138608e+001 1.459938e+001 4.399139e+000 endloop endfacet facet normal 2.588190e-001 9.659258e-001 -4.198697e-016 outer loop vertex 4.138608e+001 1.459938e+001 -8.881784e-016 vertex 4.096515e+001 1.471217e+001 -8.881784e-016 vertex 4.096515e+001 1.471217e+001 4.399139e+000 endloop endfacet facet normal 4.226183e-001 9.063078e-001 3.691957e-016 outer loop vertex 4.096515e+001 1.471217e+001 -8.881784e-016 vertex 4.057020e+001 1.489634e+001 -8.881784e-016 vertex 4.057020e+001 1.489634e+001 4.399139e+000 endloop endfacet facet normal 5.735764e-001 8.191520e-001 3.330001e-016 outer loop vertex 4.057020e+001 1.489634e+001 -8.881784e-016 vertex 4.021323e+001 1.514629e+001 -8.881784e-016 vertex 4.021323e+001 1.514629e+001 4.399139e+000 endloop endfacet facet normal 7.071068e-001 7.071068e-001 2.855272e-016 outer loop vertex 3.990509e+001 1.545443e+001 -8.881784e-016 vertex 3.990509e+001 1.545443e+001 4.399139e+000 vertex 4.021323e+001 1.514629e+001 -8.881784e-016 endloop endfacet facet normal 8.191520e-001 5.735764e-001 0.000000e+000 outer loop vertex 3.990509e+001 1.545443e+001 -8.881784e-016 vertex 3.965514e+001 1.581140e+001 -8.881784e-016 vertex 3.965514e+001 1.581140e+001 4.399139e+000 endloop endfacet facet normal 9.063078e-001 4.226183e-001 0.000000e+000 outer loop vertex 3.965514e+001 1.581140e+001 -8.881784e-016 vertex 3.947097e+001 1.620635e+001 -8.881784e-016 vertex 3.947097e+001 1.620635e+001 4.399139e+000 endloop endfacet facet normal 9.659258e-001 2.588190e-001 2.090204e-016 outer loop vertex 3.935818e+001 1.662728e+001 -8.881784e-016 vertex 3.935818e+001 1.662728e+001 4.399139e+000 vertex 3.947097e+001 1.620635e+001 -8.881784e-016 endloop endfacet facet normal 9.961947e-001 8.715574e-002 7.040056e-016 outer loop vertex 3.935818e+001 1.662728e+001 -8.881784e-016 vertex 3.932020e+001 1.706140e+001 -8.881784e-016 vertex 3.932020e+001 1.706140e+001 4.399139e+000 endloop endfacet facet normal 9.961947e-001 -8.715574e-002 9.048915e-016 outer loop vertex 3.932020e+001 1.706140e+001 -8.881784e-016 vertex 3.935818e+001 1.749552e+001 -8.881784e-016 vertex 3.935818e+001 1.749552e+001 4.399139e+000 endloop endfacet facet normal 9.659258e-001 -2.588190e-001 1.030095e-015 outer loop vertex 3.947097e+001 1.791645e+001 -8.881784e-016 vertex 3.947097e+001 1.791645e+001 4.399139e+000 vertex 3.935818e+001 1.749552e+001 -8.881784e-016 endloop endfacet facet normal 9.063078e-001 -4.226183e-001 1.954566e-016 outer loop vertex 3.947097e+001 1.791645e+001 -8.881784e-016 vertex 3.965514e+001 1.831140e+001 -8.881784e-016 vertex 3.965514e+001 1.831140e+001 4.399139e+000 endloop endfacet facet normal 8.191520e-001 -5.735764e-001 2.606088e-016 outer loop vertex 3.965514e+001 1.831140e+001 -8.881784e-016 vertex 3.990509e+001 1.866837e+001 -8.881784e-016 vertex 3.990509e+001 1.866837e+001 4.399139e+000 endloop endfacet facet normal 7.071068e-001 -7.071068e-001 5.710544e-016 outer loop vertex 4.021323e+001 1.897651e+001 -8.881784e-016 vertex 4.021323e+001 1.897651e+001 4.399139e+000 vertex 3.990509e+001 1.866837e+001 -8.881784e-016 endloop endfacet facet normal 5.735764e-001 -8.191520e-001 3.981523e-016 outer loop vertex 4.021323e+001 1.897651e+001 -8.881784e-016 vertex 4.057020e+001 1.922646e+001 -8.881784e-016 vertex 4.057020e+001 1.922646e+001 4.399139e+000 endloop endfacet facet normal 4.226183e-001 -9.063078e-001 1.216174e-015 outer loop vertex 4.057020e+001 1.922646e+001 -8.881784e-016 vertex 4.096515e+001 1.941063e+001 -8.881784e-016 vertex 4.096515e+001 1.941063e+001 4.399139e+000 endloop endfacet facet normal 2.588190e-001 -9.659258e-001 5.284567e-016 outer loop vertex 4.096515e+001 1.941063e+001 -8.881784e-016 vertex 4.138608e+001 1.952342e+001 -8.881784e-016 vertex 4.138608e+001 1.952342e+001 4.399139e+000 endloop endfacet facet normal 8.715574e-002 -9.961947e-001 7.040056e-016 outer loop vertex 4.138608e+001 1.952342e+001 -8.881784e-016 vertex 4.182020e+001 1.956140e+001 -8.881784e-016 vertex 4.182020e+001 1.956140e+001 4.399139e+000 endloop endfacet facet normal -8.715574e-002 -9.961947e-001 1.013479e-016 outer loop vertex 4.182020e+001 1.956140e+001 -8.881784e-016 vertex 4.225432e+001 1.952342e+001 -8.881784e-016 vertex 4.225432e+001 1.952342e+001 4.399139e+000 endloop endfacet facet normal -2.588190e-001 -9.659258e-001 2.497501e-016 outer loop vertex 4.225432e+001 1.952342e+001 -8.881784e-016 vertex 4.267525e+001 1.941063e+001 -8.881784e-016 vertex 4.267525e+001 1.941063e+001 4.399139e+000 endloop endfacet facet normal -4.226183e-001 -9.063078e-001 2.461305e-016 outer loop vertex 4.267525e+001 1.941063e+001 -8.881784e-016 vertex 4.307020e+001 1.922646e+001 -8.881784e-016 vertex 4.307020e+001 1.922646e+001 4.399139e+000 endloop endfacet facet normal -5.735764e-001 -8.191520e-001 2.678479e-016 outer loop vertex 4.307020e+001 1.922646e+001 -8.881784e-016 vertex 4.342717e+001 1.897651e+001 -8.881784e-016 vertex 4.342717e+001 1.897651e+001 4.399139e+000 endloop endfacet facet normal -7.071068e-001 -7.071068e-001 0.000000e+000 outer loop vertex 4.342717e+001 1.897651e+001 -8.881784e-016 vertex 4.373531e+001 1.866837e+001 -8.881784e-016 vertex 4.373531e+001 1.866837e+001 4.399139e+000 endloop endfacet facet normal -8.191520e-001 -5.735764e-001 1.520218e-015 outer loop vertex 4.373531e+001 1.866837e+001 -8.881784e-016 vertex 4.398526e+001 1.831140e+001 -8.881784e-016 vertex 4.398526e+001 1.831140e+001 4.399139e+000 endloop endfacet facet normal -9.063078e-001 -4.226183e-001 4.850219e-016 outer loop vertex 4.398526e+001 1.831140e+001 -8.881784e-016 vertex 4.416943e+001 1.791645e+001 -8.881784e-016 vertex 4.416943e+001 1.791645e+001 4.399139e+000 endloop endfacet facet normal 5.145160e-001 4.501432e-002 8.562984e-001 outer loop vertex 2.137337e+001 1.245363e+001 5.000000e+000 vertex 2.232020e+001 1.306140e+001 4.399139e+000 vertex 2.132020e+001 1.306140e+001 5.000000e+000 endloop endfacet facet normal 5.145160e-001 4.501432e-002 8.562984e-001 outer loop vertex 2.137337e+001 1.245363e+001 5.000000e+000 vertex 2.235818e+001 1.262728e+001 4.399139e+000 vertex 2.232020e+001 1.306140e+001 4.399139e+000 endloop endfacet facet normal 4.988827e-001 1.336752e-001 8.562984e-001 outer loop vertex 2.137337e+001 1.245363e+001 5.000000e+000 vertex 2.153128e+001 1.186433e+001 5.000000e+000 vertex 2.235818e+001 1.262728e+001 4.399139e+000 endloop endfacet facet normal 4.988827e-001 1.336752e-001 8.562984e-001 outer loop vertex 2.235818e+001 1.262728e+001 4.399139e+000 vertex 2.153128e+001 1.186433e+001 5.000000e+000 vertex 2.247097e+001 1.220635e+001 4.399139e+000 endloop endfacet facet normal 4.680911e-001 2.182745e-001 8.562984e-001 outer loop vertex 2.247097e+001 1.220635e+001 4.399139e+000 vertex 2.153128e+001 1.186433e+001 5.000000e+000 vertex 2.178911e+001 1.131140e+001 5.000000e+000 endloop endfacet facet normal 4.230768e-001 2.962415e-001 8.562984e-001 outer loop vertex 2.265514e+001 1.181140e+001 4.399139e+000 vertex 2.178911e+001 1.131140e+001 5.000000e+000 vertex 2.213904e+001 1.081164e+001 5.000000e+000 endloop endfacet facet normal 3.652075e-001 3.652075e-001 8.562984e-001 outer loop vertex 2.290509e+001 1.145443e+001 4.399139e+000 vertex 2.213904e+001 1.081164e+001 5.000000e+000 vertex 2.257044e+001 1.038024e+001 5.000000e+000 endloop endfacet facet normal 2.962415e-001 4.230768e-001 8.562984e-001 outer loop vertex 2.321323e+001 1.114629e+001 4.399139e+000 vertex 2.257044e+001 1.038024e+001 5.000000e+000 vertex 2.307020e+001 1.003031e+001 5.000000e+000 endloop endfacet facet normal 2.182745e-001 4.680911e-001 8.562984e-001 outer loop vertex 2.357020e+001 1.089634e+001 4.399139e+000 vertex 2.307020e+001 1.003031e+001 5.000000e+000 vertex 2.362313e+001 9.772476e+000 5.000000e+000 endloop endfacet facet normal 1.336752e-001 4.988827e-001 8.562984e-001 outer loop vertex 2.396515e+001 1.071217e+001 4.399139e+000 vertex 2.362313e+001 9.772476e+000 5.000000e+000 vertex 2.421243e+001 9.614573e+000 5.000000e+000 endloop endfacet facet normal 4.501432e-002 5.145160e-001 8.562984e-001 outer loop vertex 2.438608e+001 1.059938e+001 4.399139e+000 vertex 2.421243e+001 9.614573e+000 5.000000e+000 vertex 2.482020e+001 1.056140e+001 4.399139e+000 endloop endfacet facet normal 1.336752e-001 4.988827e-001 8.562984e-001 outer loop vertex 2.438608e+001 1.059938e+001 4.399139e+000 vertex 2.396515e+001 1.071217e+001 4.399139e+000 vertex 2.421243e+001 9.614573e+000 5.000000e+000 endloop endfacet facet normal 4.501432e-002 5.145160e-001 8.562984e-001 outer loop vertex 2.421243e+001 9.614573e+000 5.000000e+000 vertex 2.482020e+001 9.561400e+000 5.000000e+000 vertex 2.482020e+001 1.056140e+001 4.399139e+000 endloop endfacet facet normal -4.501432e-002 5.145160e-001 8.562984e-001 outer loop vertex 2.482020e+001 1.056140e+001 4.399139e+000 vertex 2.482020e+001 9.561400e+000 5.000000e+000 vertex 2.542797e+001 9.614573e+000 5.000000e+000 endloop endfacet facet normal -1.336752e-001 4.988827e-001 8.562984e-001 outer loop vertex 2.525432e+001 1.059938e+001 4.399139e+000 vertex 2.542797e+001 9.614573e+000 5.000000e+000 vertex 2.601727e+001 9.772476e+000 5.000000e+000 endloop endfacet facet normal -2.182745e-001 4.680911e-001 8.562984e-001 outer loop vertex 2.567525e+001 1.071217e+001 4.399139e+000 vertex 2.601727e+001 9.772476e+000 5.000000e+000 vertex 2.657020e+001 1.003031e+001 5.000000e+000 endloop endfacet facet normal -2.962415e-001 4.230768e-001 8.562984e-001 outer loop vertex 2.607020e+001 1.089634e+001 4.399139e+000 vertex 2.657020e+001 1.003031e+001 5.000000e+000 vertex 2.642717e+001 1.114629e+001 4.399139e+000 endloop endfacet facet normal -2.182745e-001 4.680911e-001 8.562984e-001 outer loop vertex 2.607020e+001 1.089634e+001 4.399139e+000 vertex 2.567525e+001 1.071217e+001 4.399139e+000 vertex 2.657020e+001 1.003031e+001 5.000000e+000 endloop endfacet facet normal -2.962415e-001 4.230768e-001 8.562984e-001 outer loop vertex 2.657020e+001 1.003031e+001 5.000000e+000 vertex 2.706996e+001 1.038024e+001 5.000000e+000 vertex 2.642717e+001 1.114629e+001 4.399139e+000 endloop endfacet facet normal -3.652075e-001 3.652075e-001 8.562984e-001 outer loop vertex 2.642717e+001 1.114629e+001 4.399139e+000 vertex 2.706996e+001 1.038024e+001 5.000000e+000 vertex 2.750136e+001 1.081164e+001 5.000000e+000 endloop endfacet facet normal -4.230768e-001 2.962415e-001 8.562984e-001 outer loop vertex 2.673531e+001 1.145443e+001 4.399139e+000 vertex 2.750136e+001 1.081164e+001 5.000000e+000 vertex 2.785129e+001 1.131140e+001 5.000000e+000 endloop endfacet facet normal -4.680911e-001 2.182745e-001 8.562984e-001 outer loop vertex 2.698526e+001 1.181140e+001 4.399139e+000 vertex 2.785129e+001 1.131140e+001 5.000000e+000 vertex 2.810912e+001 1.186433e+001 5.000000e+000 endloop endfacet facet normal -4.988827e-001 1.336752e-001 8.562984e-001 outer loop vertex 2.716943e+001 1.220635e+001 4.399139e+000 vertex 2.810912e+001 1.186433e+001 5.000000e+000 vertex 2.826703e+001 1.245363e+001 5.000000e+000 endloop endfacet facet normal -5.145160e-001 4.501432e-002 8.562984e-001 outer loop vertex 2.728222e+001 1.262728e+001 4.399139e+000 vertex 2.826703e+001 1.245363e+001 5.000000e+000 vertex 2.832020e+001 1.306140e+001 5.000000e+000 endloop endfacet facet normal -5.145160e-001 -4.501432e-002 8.562984e-001 outer loop vertex 2.732020e+001 1.306140e+001 4.399139e+000 vertex 2.832020e+001 1.306140e+001 5.000000e+000 vertex 2.728222e+001 1.349552e+001 4.399139e+000 endloop endfacet facet normal -5.145160e-001 4.501432e-002 8.562984e-001 outer loop vertex 2.732020e+001 1.306140e+001 4.399139e+000 vertex 2.728222e+001 1.262728e+001 4.399139e+000 vertex 2.832020e+001 1.306140e+001 5.000000e+000 endloop endfacet facet normal -5.145160e-001 -4.501432e-002 8.562984e-001 outer loop vertex 2.832020e+001 1.306140e+001 5.000000e+000 vertex 2.826703e+001 1.366917e+001 5.000000e+000 vertex 2.728222e+001 1.349552e+001 4.399139e+000 endloop endfacet facet normal -4.988827e-001 -1.336752e-001 8.562984e-001 outer loop vertex 2.728222e+001 1.349552e+001 4.399139e+000 vertex 2.826703e+001 1.366917e+001 5.000000e+000 vertex 2.716943e+001 1.391645e+001 4.399139e+000 endloop endfacet facet normal -4.988827e-001 -1.336752e-001 8.562984e-001 outer loop vertex 2.716943e+001 1.391645e+001 4.399139e+000 vertex 2.826703e+001 1.366917e+001 5.000000e+000 vertex 2.810912e+001 1.425847e+001 5.000000e+000 endloop endfacet facet normal -4.680911e-001 -2.182745e-001 8.562984e-001 outer loop vertex 2.698526e+001 1.431140e+001 4.399139e+000 vertex 2.810912e+001 1.425847e+001 5.000000e+000 vertex 2.785129e+001 1.481140e+001 5.000000e+000 endloop endfacet facet normal -4.230768e-001 -2.962415e-001 8.562984e-001 outer loop vertex 2.750136e+001 1.531116e+001 5.000000e+000 vertex 2.698526e+001 1.431140e+001 4.399139e+000 vertex 2.785129e+001 1.481140e+001 5.000000e+000 endloop endfacet facet normal -4.230768e-001 -2.962415e-001 8.562984e-001 outer loop vertex 2.750136e+001 1.531116e+001 5.000000e+000 vertex 2.673531e+001 1.466837e+001 4.399139e+000 vertex 2.698526e+001 1.431140e+001 4.399139e+000 endloop endfacet facet normal -3.652075e-001 -3.652075e-001 8.562984e-001 outer loop vertex 2.750136e+001 1.531116e+001 5.000000e+000 vertex 2.706996e+001 1.574256e+001 5.000000e+000 vertex 2.673531e+001 1.466837e+001 4.399139e+000 endloop endfacet facet normal -3.652075e-001 -3.652075e-001 8.562984e-001 outer loop vertex 2.673531e+001 1.466837e+001 4.399139e+000 vertex 2.706996e+001 1.574256e+001 5.000000e+000 vertex 2.642717e+001 1.497651e+001 4.399139e+000 endloop endfacet facet normal -2.962415e-001 -4.230768e-001 8.562984e-001 outer loop vertex 2.642717e+001 1.497651e+001 4.399139e+000 vertex 2.706996e+001 1.574256e+001 5.000000e+000 vertex 2.607020e+001 1.522646e+001 4.399139e+000 endloop endfacet facet normal -2.962415e-001 -4.230768e-001 8.562984e-001 outer loop vertex 2.607020e+001 1.522646e+001 4.399139e+000 vertex 2.706996e+001 1.574256e+001 5.000000e+000 vertex 2.657020e+001 1.609249e+001 5.000000e+000 endloop endfacet facet normal -2.182745e-001 -4.680911e-001 8.562984e-001 outer loop vertex 2.567525e+001 1.541063e+001 4.399139e+000 vertex 2.657020e+001 1.609249e+001 5.000000e+000 vertex 2.601727e+001 1.635032e+001 5.000000e+000 endloop endfacet facet normal -1.336752e-001 -4.988827e-001 8.562984e-001 outer loop vertex 2.525432e+001 1.552342e+001 4.399139e+000 vertex 2.601727e+001 1.635032e+001 5.000000e+000 vertex 2.542797e+001 1.650823e+001 5.000000e+000 endloop endfacet facet normal -4.501432e-002 -5.145160e-001 8.562984e-001 outer loop vertex 2.482020e+001 1.656140e+001 5.000000e+000 vertex 2.525432e+001 1.552342e+001 4.399139e+000 vertex 2.542797e+001 1.650823e+001 5.000000e+000 endloop endfacet facet normal -4.501432e-002 -5.145160e-001 8.562984e-001 outer loop vertex 2.482020e+001 1.656140e+001 5.000000e+000 vertex 2.482020e+001 1.556140e+001 4.399139e+000 vertex 2.525432e+001 1.552342e+001 4.399139e+000 endloop endfacet facet normal 4.501432e-002 -5.145160e-001 8.562984e-001 outer loop vertex 2.482020e+001 1.656140e+001 5.000000e+000 vertex 2.421243e+001 1.650823e+001 5.000000e+000 vertex 2.482020e+001 1.556140e+001 4.399139e+000 endloop endfacet facet normal 4.501432e-002 -5.145160e-001 8.562984e-001 outer loop vertex 2.482020e+001 1.556140e+001 4.399139e+000 vertex 2.421243e+001 1.650823e+001 5.000000e+000 vertex 2.438608e+001 1.552342e+001 4.399139e+000 endloop endfacet facet normal 1.336752e-001 -4.988827e-001 8.562984e-001 outer loop vertex 2.438608e+001 1.552342e+001 4.399139e+000 vertex 2.421243e+001 1.650823e+001 5.000000e+000 vertex 2.362313e+001 1.635032e+001 5.000000e+000 endloop endfacet facet normal 2.182745e-001 -4.680911e-001 8.562984e-001 outer loop vertex 2.396515e+001 1.541063e+001 4.399139e+000 vertex 2.362313e+001 1.635032e+001 5.000000e+000 vertex 2.307020e+001 1.609249e+001 5.000000e+000 endloop endfacet facet normal 2.962415e-001 -4.230768e-001 8.562984e-001 outer loop vertex 2.357020e+001 1.522646e+001 4.399139e+000 vertex 2.307020e+001 1.609249e+001 5.000000e+000 vertex 2.321323e+001 1.497651e+001 4.399139e+000 endloop endfacet facet normal 2.182745e-001 -4.680911e-001 8.562984e-001 outer loop vertex 2.357020e+001 1.522646e+001 4.399139e+000 vertex 2.396515e+001 1.541063e+001 4.399139e+000 vertex 2.307020e+001 1.609249e+001 5.000000e+000 endloop endfacet facet normal 2.962415e-001 -4.230768e-001 8.562984e-001 outer loop vertex 2.321323e+001 1.497651e+001 4.399139e+000 vertex 2.307020e+001 1.609249e+001 5.000000e+000 vertex 2.257044e+001 1.574256e+001 5.000000e+000 endloop endfacet facet normal 3.652075e-001 -3.652075e-001 8.562984e-001 outer loop vertex 2.213904e+001 1.531116e+001 5.000000e+000 vertex 2.321323e+001 1.497651e+001 4.399139e+000 vertex 2.257044e+001 1.574256e+001 5.000000e+000 endloop endfacet facet normal 3.652075e-001 -3.652075e-001 8.562984e-001 outer loop vertex 2.213904e+001 1.531116e+001 5.000000e+000 vertex 2.290509e+001 1.466837e+001 4.399139e+000 vertex 2.321323e+001 1.497651e+001 4.399139e+000 endloop endfacet facet normal 4.230768e-001 -2.962415e-001 8.562984e-001 outer loop vertex 2.213904e+001 1.531116e+001 5.000000e+000 vertex 2.178911e+001 1.481140e+001 5.000000e+000 vertex 2.290509e+001 1.466837e+001 4.399139e+000 endloop endfacet facet normal 4.230768e-001 -2.962415e-001 8.562984e-001 outer loop vertex 2.290509e+001 1.466837e+001 4.399139e+000 vertex 2.178911e+001 1.481140e+001 5.000000e+000 vertex 2.265514e+001 1.431140e+001 4.399139e+000 endloop endfacet facet normal 4.680911e-001 -2.182745e-001 8.562984e-001 outer loop vertex 2.265514e+001 1.431140e+001 4.399139e+000 vertex 2.178911e+001 1.481140e+001 5.000000e+000 vertex 2.153128e+001 1.425847e+001 5.000000e+000 endloop endfacet facet normal 4.988827e-001 -1.336752e-001 8.562984e-001 outer loop vertex 2.247097e+001 1.391645e+001 4.399139e+000 vertex 2.153128e+001 1.425847e+001 5.000000e+000 vertex 2.137337e+001 1.366917e+001 5.000000e+000 endloop endfacet facet normal 5.145160e-001 -4.501432e-002 8.562984e-001 outer loop vertex 2.235818e+001 1.349552e+001 4.399139e+000 vertex 2.137337e+001 1.366917e+001 5.000000e+000 vertex 2.132020e+001 1.306140e+001 5.000000e+000 endloop endfacet facet normal 5.145160e-001 -4.501432e-002 8.562984e-001 outer loop vertex 2.232020e+001 1.306140e+001 4.399139e+000 vertex 2.235818e+001 1.349552e+001 4.399139e+000 vertex 2.132020e+001 1.306140e+001 5.000000e+000 endloop endfacet facet normal 4.988827e-001 -1.336752e-001 8.562984e-001 outer loop vertex 2.235818e+001 1.349552e+001 4.399139e+000 vertex 2.247097e+001 1.391645e+001 4.399139e+000 vertex 2.137337e+001 1.366917e+001 5.000000e+000 endloop endfacet facet normal 4.680911e-001 -2.182745e-001 8.562984e-001 outer loop vertex 2.247097e+001 1.391645e+001 4.399139e+000 vertex 2.265514e+001 1.431140e+001 4.399139e+000 vertex 2.153128e+001 1.425847e+001 5.000000e+000 endloop endfacet facet normal 1.336752e-001 -4.988827e-001 8.562984e-001 outer loop vertex 2.396515e+001 1.541063e+001 4.399139e+000 vertex 2.438608e+001 1.552342e+001 4.399139e+000 vertex 2.362313e+001 1.635032e+001 5.000000e+000 endloop endfacet facet normal -1.336752e-001 -4.988827e-001 8.562984e-001 outer loop vertex 2.525432e+001 1.552342e+001 4.399139e+000 vertex 2.567525e+001 1.541063e+001 4.399139e+000 vertex 2.601727e+001 1.635032e+001 5.000000e+000 endloop endfacet facet normal -2.182745e-001 -4.680911e-001 8.562984e-001 outer loop vertex 2.567525e+001 1.541063e+001 4.399139e+000 vertex 2.607020e+001 1.522646e+001 4.399139e+000 vertex 2.657020e+001 1.609249e+001 5.000000e+000 endloop endfacet facet normal -4.680911e-001 -2.182745e-001 8.562984e-001 outer loop vertex 2.698526e+001 1.431140e+001 4.399139e+000 vertex 2.716943e+001 1.391645e+001 4.399139e+000 vertex 2.810912e+001 1.425847e+001 5.000000e+000 endloop endfacet facet normal -4.988827e-001 1.336752e-001 8.562984e-001 outer loop vertex 2.728222e+001 1.262728e+001 4.399139e+000 vertex 2.716943e+001 1.220635e+001 4.399139e+000 vertex 2.826703e+001 1.245363e+001 5.000000e+000 endloop endfacet facet normal -4.680911e-001 2.182745e-001 8.562984e-001 outer loop vertex 2.716943e+001 1.220635e+001 4.399139e+000 vertex 2.698526e+001 1.181140e+001 4.399139e+000 vertex 2.810912e+001 1.186433e+001 5.000000e+000 endloop endfacet facet normal -4.230768e-001 2.962415e-001 8.562984e-001 outer loop vertex 2.698526e+001 1.181140e+001 4.399139e+000 vertex 2.673531e+001 1.145443e+001 4.399139e+000 vertex 2.785129e+001 1.131140e+001 5.000000e+000 endloop endfacet facet normal -3.652075e-001 3.652075e-001 8.562984e-001 outer loop vertex 2.673531e+001 1.145443e+001 4.399139e+000 vertex 2.642717e+001 1.114629e+001 4.399139e+000 vertex 2.750136e+001 1.081164e+001 5.000000e+000 endloop endfacet facet normal -1.336752e-001 4.988827e-001 8.562984e-001 outer loop vertex 2.567525e+001 1.071217e+001 4.399139e+000 vertex 2.525432e+001 1.059938e+001 4.399139e+000 vertex 2.601727e+001 9.772476e+000 5.000000e+000 endloop endfacet facet normal -4.501432e-002 5.145160e-001 8.562984e-001 outer loop vertex 2.525432e+001 1.059938e+001 4.399139e+000 vertex 2.482020e+001 1.056140e+001 4.399139e+000 vertex 2.542797e+001 9.614573e+000 5.000000e+000 endloop endfacet facet normal 2.182745e-001 4.680911e-001 8.562984e-001 outer loop vertex 2.396515e+001 1.071217e+001 4.399139e+000 vertex 2.357020e+001 1.089634e+001 4.399139e+000 vertex 2.362313e+001 9.772476e+000 5.000000e+000 endloop endfacet facet normal 2.962415e-001 4.230768e-001 8.562984e-001 outer loop vertex 2.357020e+001 1.089634e+001 4.399139e+000 vertex 2.321323e+001 1.114629e+001 4.399139e+000 vertex 2.307020e+001 1.003031e+001 5.000000e+000 endloop endfacet facet normal 3.652075e-001 3.652075e-001 8.562984e-001 outer loop vertex 2.321323e+001 1.114629e+001 4.399139e+000 vertex 2.290509e+001 1.145443e+001 4.399139e+000 vertex 2.257044e+001 1.038024e+001 5.000000e+000 endloop endfacet facet normal 4.230768e-001 2.962415e-001 8.562984e-001 outer loop vertex 2.290509e+001 1.145443e+001 4.399139e+000 vertex 2.265514e+001 1.181140e+001 4.399139e+000 vertex 2.213904e+001 1.081164e+001 5.000000e+000 endloop endfacet facet normal 4.680911e-001 2.182745e-001 8.562984e-001 outer loop vertex 2.265514e+001 1.181140e+001 4.399139e+000 vertex 2.247097e+001 1.220635e+001 4.399139e+000 vertex 2.178911e+001 1.131140e+001 5.000000e+000 endloop endfacet facet normal -9.961947e-001 8.715574e-002 -3.438588e-017 outer loop vertex 2.732020e+001 1.306140e+001 0.000000e+000 vertex 2.728222e+001 1.262728e+001 0.000000e+000 vertex 2.728222e+001 1.262728e+001 4.399139e+000 endloop endfacet facet normal -9.961947e-001 8.715574e-002 0.000000e+000 outer loop vertex 2.732020e+001 1.306140e+001 4.399139e+000 vertex 2.732020e+001 1.306140e+001 0.000000e+000 vertex 2.728222e+001 1.262728e+001 4.399139e+000 endloop endfacet facet normal -9.961947e-001 -8.715574e-002 0.000000e+000 outer loop vertex 2.732020e+001 1.306140e+001 4.399139e+000 vertex 2.728222e+001 1.349552e+001 0.000000e+000 vertex 2.732020e+001 1.306140e+001 0.000000e+000 endloop endfacet facet normal -9.961947e-001 -8.715574e-002 -6.515219e-017 outer loop vertex 2.732020e+001 1.306140e+001 4.399139e+000 vertex 2.728222e+001 1.349552e+001 4.399139e+000 vertex 2.728222e+001 1.349552e+001 0.000000e+000 endloop endfacet facet normal -9.659258e-001 -2.588190e-001 1.414640e-015 outer loop vertex 2.728222e+001 1.349552e+001 0.000000e+000 vertex 2.728222e+001 1.349552e+001 4.399139e+000 vertex 2.716943e+001 1.391645e+001 0.000000e+000 endloop endfacet facet normal -9.659258e-001 -2.588190e-001 -3.545305e-016 outer loop vertex 2.716943e+001 1.391645e+001 0.000000e+000 vertex 2.728222e+001 1.349552e+001 4.399139e+000 vertex 2.716943e+001 1.391645e+001 4.399139e+000 endloop endfacet facet normal -9.063078e-001 -4.226183e-001 -7.585588e-016 outer loop vertex 2.698526e+001 1.431140e+001 0.000000e+000 vertex 2.716943e+001 1.391645e+001 4.399139e+000 vertex 2.698526e+001 1.431140e+001 4.399139e+000 endloop endfacet facet normal -8.191520e-001 -5.735764e-001 -2.635182e-016 outer loop vertex 2.673531e+001 1.466837e+001 0.000000e+000 vertex 2.698526e+001 1.431140e+001 4.399139e+000 vertex 2.673531e+001 1.466837e+001 4.399139e+000 endloop endfacet facet normal -7.071068e-001 -7.071068e-001 -5.710544e-016 outer loop vertex 2.642717e+001 1.497651e+001 0.000000e+000 vertex 2.673531e+001 1.466837e+001 4.399139e+000 vertex 2.642717e+001 1.497651e+001 4.399139e+000 endloop endfacet facet normal -5.735764e-001 -8.191520e-001 -8.612394e-016 outer loop vertex 2.607020e+001 1.522646e+001 0.000000e+000 vertex 2.642717e+001 1.497651e+001 4.399139e+000 vertex 2.607020e+001 1.522646e+001 4.399139e+000 endloop endfacet facet normal -4.226183e-001 -9.063078e-001 -4.853241e-016 outer loop vertex 2.567525e+001 1.541063e+001 0.000000e+000 vertex 2.607020e+001 1.522646e+001 4.399139e+000 vertex 2.567525e+001 1.541063e+001 4.399139e+000 endloop endfacet facet normal -2.588190e-001 -9.659258e-001 -5.300545e-016 outer loop vertex 2.525432e+001 1.552342e+001 0.000000e+000 vertex 2.567525e+001 1.541063e+001 4.399139e+000 vertex 2.525432e+001 1.552342e+001 4.399139e+000 endloop endfacet facet normal -8.715574e-002 -9.961947e-001 -7.038636e-016 outer loop vertex 2.482020e+001 1.556140e+001 0.000000e+000 vertex 2.525432e+001 1.552342e+001 4.399139e+000 vertex 2.482020e+001 1.556140e+001 4.399139e+000 endloop endfacet facet normal 8.715574e-002 -9.961947e-001 -5.029161e-016 outer loop vertex 2.438608e+001 1.552342e+001 0.000000e+000 vertex 2.482020e+001 1.556140e+001 4.399139e+000 vertex 2.438608e+001 1.552342e+001 4.399139e+000 endloop endfacet facet normal 2.588190e-001 -9.659258e-001 -6.400577e-016 outer loop vertex 2.396515e+001 1.541063e+001 0.000000e+000 vertex 2.438608e+001 1.552342e+001 4.399139e+000 vertex 2.396515e+001 1.541063e+001 4.399139e+000 endloop endfacet facet normal 4.226183e-001 -9.063078e-001 -5.879071e-016 outer loop vertex 2.357020e+001 1.522646e+001 0.000000e+000 vertex 2.396515e+001 1.541063e+001 4.399139e+000 vertex 2.357020e+001 1.522646e+001 4.399139e+000 endloop endfacet facet normal 5.735764e-001 -8.191520e-001 -5.942889e-016 outer loop vertex 2.321323e+001 1.497651e+001 0.000000e+000 vertex 2.357020e+001 1.522646e+001 4.399139e+000 vertex 2.321323e+001 1.497651e+001 4.399139e+000 endloop endfacet facet normal 7.071068e-001 -7.071068e-001 -5.710544e-016 outer loop vertex 2.290509e+001 1.466837e+001 0.000000e+000 vertex 2.321323e+001 1.497651e+001 4.399139e+000 vertex 2.290509e+001 1.466837e+001 4.399139e+000 endloop endfacet facet normal 8.191520e-001 -5.735764e-001 -8.612394e-016 outer loop vertex 2.265514e+001 1.431140e+001 0.000000e+000 vertex 2.290509e+001 1.466837e+001 4.399139e+000 vertex 2.265514e+001 1.431140e+001 4.399139e+000 endloop endfacet facet normal 9.063078e-001 -4.226183e-001 -3.146724e-016 outer loop vertex 2.247097e+001 1.391645e+001 0.000000e+000 vertex 2.265514e+001 1.431140e+001 4.399139e+000 vertex 2.247097e+001 1.391645e+001 4.399139e+000 endloop endfacet facet normal 9.659258e-001 -2.588190e-001 -5.300545e-016 outer loop vertex 2.235818e+001 1.349552e+001 0.000000e+000 vertex 2.247097e+001 1.391645e+001 4.399139e+000 vertex 2.235818e+001 1.349552e+001 4.399139e+000 endloop endfacet facet normal 9.961947e-001 -8.715574e-002 -7.038636e-016 outer loop vertex 2.232020e+001 1.306140e+001 0.000000e+000 vertex 2.235818e+001 1.349552e+001 4.399139e+000 vertex 2.232020e+001 1.306140e+001 4.399139e+000 endloop endfacet facet normal 9.961947e-001 8.715574e-002 3.519318e-017 outer loop vertex 2.235818e+001 1.262728e+001 0.000000e+000 vertex 2.232020e+001 1.306140e+001 4.399139e+000 vertex 2.235818e+001 1.262728e+001 4.399139e+000 endloop endfacet facet normal 9.659258e-001 2.588190e-001 -5.710544e-016 outer loop vertex 2.247097e+001 1.220635e+001 0.000000e+000 vertex 2.235818e+001 1.262728e+001 4.399139e+000 vertex 2.247097e+001 1.220635e+001 4.399139e+000 endloop endfacet facet normal 9.063078e-001 4.226183e-001 1.706518e-016 outer loop vertex 2.265514e+001 1.181140e+001 0.000000e+000 vertex 2.247097e+001 1.220635e+001 4.399139e+000 vertex 2.265514e+001 1.181140e+001 4.399139e+000 endloop endfacet facet normal 8.191520e-001 5.735764e-001 2.316081e-016 outer loop vertex 2.290509e+001 1.145443e+001 0.000000e+000 vertex 2.265514e+001 1.181140e+001 4.399139e+000 vertex 2.290509e+001 1.145443e+001 4.399139e+000 endloop endfacet facet normal 7.071068e-001 7.071068e-001 -2.855272e-016 outer loop vertex 2.321323e+001 1.114629e+001 0.000000e+000 vertex 2.290509e+001 1.145443e+001 4.399139e+000 vertex 2.321323e+001 1.114629e+001 4.399139e+000 endloop endfacet facet normal 5.735764e-001 8.191520e-001 0.000000e+000 outer loop vertex 2.357020e+001 1.089634e+001 0.000000e+000 vertex 2.321323e+001 1.114629e+001 4.399139e+000 vertex 2.357020e+001 1.089634e+001 4.399139e+000 endloop endfacet facet normal 4.226183e-001 9.063078e-001 -3.413035e-016 outer loop vertex 2.396515e+001 1.071217e+001 0.000000e+000 vertex 2.357020e+001 1.089634e+001 4.399139e+000 vertex 2.396515e+001 1.071217e+001 4.399139e+000 endloop endfacet facet normal 2.588190e-001 9.659258e-001 -2.090204e-016 outer loop vertex 2.438608e+001 1.059938e+001 0.000000e+000 vertex 2.396515e+001 1.071217e+001 4.399139e+000 vertex 2.438608e+001 1.059938e+001 4.399139e+000 endloop endfacet facet normal 8.715574e-002 9.961947e-001 -7.038636e-017 outer loop vertex 2.482020e+001 1.056140e+001 0.000000e+000 vertex 2.438608e+001 1.059938e+001 4.399139e+000 vertex 2.482020e+001 1.056140e+001 4.399139e+000 endloop endfacet facet normal -8.715574e-002 9.961947e-001 -3.318735e-016 outer loop vertex 2.525432e+001 1.059938e+001 0.000000e+000 vertex 2.482020e+001 1.056140e+001 4.399139e+000 vertex 2.525432e+001 1.059938e+001 4.399139e+000 endloop endfacet facet normal -2.588190e-001 9.659258e-001 2.090204e-016 outer loop vertex 2.567525e+001 1.071217e+001 0.000000e+000 vertex 2.525432e+001 1.059938e+001 4.399139e+000 vertex 2.567525e+001 1.071217e+001 4.399139e+000 endloop endfacet facet normal -4.226183e-001 9.063078e-001 0.000000e+000 outer loop vertex 2.607020e+001 1.089634e+001 0.000000e+000 vertex 2.567525e+001 1.071217e+001 4.399139e+000 vertex 2.607020e+001 1.089634e+001 4.399139e+000 endloop endfacet facet normal -5.735764e-001 8.191520e-001 1.324456e-016 outer loop vertex 2.642717e+001 1.114629e+001 0.000000e+000 vertex 2.607020e+001 1.089634e+001 4.399139e+000 vertex 2.642717e+001 1.114629e+001 4.399139e+000 endloop endfacet facet normal -7.071068e-001 7.071068e-001 5.710544e-016 outer loop vertex 2.673531e+001 1.145443e+001 0.000000e+000 vertex 2.642717e+001 1.114629e+001 4.399139e+000 vertex 2.673531e+001 1.145443e+001 4.399139e+000 endloop endfacet facet normal -8.191520e-001 5.735764e-001 0.000000e+000 outer loop vertex 2.698526e+001 1.181140e+001 0.000000e+000 vertex 2.673531e+001 1.145443e+001 4.399139e+000 vertex 2.698526e+001 1.181140e+001 4.399139e+000 endloop endfacet facet normal -9.063078e-001 4.226183e-001 -3.413035e-016 outer loop vertex 2.716943e+001 1.220635e+001 0.000000e+000 vertex 2.698526e+001 1.181140e+001 4.399139e+000 vertex 2.716943e+001 1.220635e+001 4.399139e+000 endloop endfacet facet normal -9.659258e-001 2.588190e-001 -1.045102e-016 outer loop vertex 2.728222e+001 1.262728e+001 0.000000e+000 vertex 2.716943e+001 1.220635e+001 4.399139e+000 vertex 2.728222e+001 1.262728e+001 4.399139e+000 endloop endfacet facet normal -9.659258e-001 2.588190e-001 -2.063153e-016 outer loop vertex 2.728222e+001 1.262728e+001 0.000000e+000 vertex 2.716943e+001 1.220635e+001 0.000000e+000 vertex 2.716943e+001 1.220635e+001 4.399139e+000 endloop endfacet facet normal -9.063078e-001 4.226183e-001 0.000000e+000 outer loop vertex 2.716943e+001 1.220635e+001 0.000000e+000 vertex 2.698526e+001 1.181140e+001 0.000000e+000 vertex 2.698526e+001 1.181140e+001 4.399139e+000 endloop endfacet facet normal -8.191520e-001 5.735764e-001 6.587610e-016 outer loop vertex 2.698526e+001 1.181140e+001 0.000000e+000 vertex 2.673531e+001 1.145443e+001 0.000000e+000 vertex 2.673531e+001 1.145443e+001 4.399139e+000 endloop endfacet facet normal -7.071068e-001 7.071068e-001 2.895653e-016 outer loop vertex 2.673531e+001 1.145443e+001 0.000000e+000 vertex 2.642717e+001 1.114629e+001 0.000000e+000 vertex 2.642717e+001 1.114629e+001 4.399139e+000 endloop endfacet facet normal -5.735764e-001 8.191520e-001 0.000000e+000 outer loop vertex 2.642717e+001 1.114629e+001 0.000000e+000 vertex 2.607020e+001 1.089634e+001 0.000000e+000 vertex 2.607020e+001 1.089634e+001 4.399139e+000 endloop endfacet facet normal -4.226183e-001 9.063078e-001 3.402392e-016 outer loop vertex 2.607020e+001 1.089634e+001 0.000000e+000 vertex 2.567525e+001 1.071217e+001 0.000000e+000 vertex 2.567525e+001 1.071217e+001 4.399139e+000 endloop endfacet facet normal -2.588190e-001 9.659258e-001 -1.845979e-016 outer loop vertex 2.567525e+001 1.071217e+001 0.000000e+000 vertex 2.525432e+001 1.059938e+001 0.000000e+000 vertex 2.525432e+001 1.059938e+001 4.399139e+000 endloop endfacet facet normal -8.715574e-002 9.961947e-001 7.058154e-017 outer loop vertex 2.525432e+001 1.059938e+001 0.000000e+000 vertex 2.482020e+001 1.056140e+001 0.000000e+000 vertex 2.482020e+001 1.056140e+001 4.399139e+000 endloop endfacet facet normal 8.715574e-002 9.961947e-001 -7.058154e-017 outer loop vertex 2.482020e+001 1.056140e+001 0.000000e+000 vertex 2.438608e+001 1.059938e+001 0.000000e+000 vertex 2.438608e+001 1.059938e+001 4.399139e+000 endloop endfacet facet normal 2.588190e-001 9.659258e-001 -2.099348e-016 outer loop vertex 2.438608e+001 1.059938e+001 0.000000e+000 vertex 2.396515e+001 1.071217e+001 0.000000e+000 vertex 2.396515e+001 1.071217e+001 4.399139e+000 endloop endfacet facet normal 4.226183e-001 9.063078e-001 0.000000e+000 outer loop vertex 2.396515e+001 1.071217e+001 0.000000e+000 vertex 2.357020e+001 1.089634e+001 0.000000e+000 vertex 2.357020e+001 1.089634e+001 4.399139e+000 endloop endfacet facet normal 5.735764e-001 8.191520e-001 -1.303044e-016 outer loop vertex 2.357020e+001 1.089634e+001 0.000000e+000 vertex 2.321323e+001 1.114629e+001 0.000000e+000 vertex 2.321323e+001 1.114629e+001 4.399139e+000 endloop endfacet facet normal 7.071068e-001 7.071068e-001 2.895653e-016 outer loop vertex 2.321323e+001 1.114629e+001 0.000000e+000 vertex 2.290509e+001 1.145443e+001 0.000000e+000 vertex 2.290509e+001 1.145443e+001 4.399139e+000 endloop endfacet facet normal 8.191520e-001 5.735764e-001 2.316522e-016 outer loop vertex 2.290509e+001 1.145443e+001 0.000000e+000 vertex 2.265514e+001 1.181140e+001 0.000000e+000 vertex 2.265514e+001 1.181140e+001 4.399139e+000 endloop endfacet facet normal 9.063078e-001 4.226183e-001 -3.909131e-016 outer loop vertex 2.265514e+001 1.181140e+001 0.000000e+000 vertex 2.247097e+001 1.220635e+001 0.000000e+000 vertex 2.247097e+001 1.220635e+001 4.399139e+000 endloop endfacet facet normal 9.659258e-001 2.588190e-001 1.049674e-016 outer loop vertex 2.247097e+001 1.220635e+001 0.000000e+000 vertex 2.235818e+001 1.262728e+001 0.000000e+000 vertex 2.235818e+001 1.262728e+001 4.399139e+000 endloop endfacet facet normal 9.961947e-001 8.715574e-002 7.040056e-016 outer loop vertex 2.235818e+001 1.262728e+001 0.000000e+000 vertex 2.232020e+001 1.306140e+001 0.000000e+000 vertex 2.232020e+001 1.306140e+001 4.399139e+000 endloop endfacet facet normal 9.961947e-001 -8.715574e-002 9.048915e-016 outer loop vertex 2.232020e+001 1.306140e+001 0.000000e+000 vertex 2.235818e+001 1.349552e+001 0.000000e+000 vertex 2.235818e+001 1.349552e+001 4.399139e+000 endloop endfacet facet normal 9.659258e-001 -2.588190e-001 1.134605e-015 outer loop vertex 2.247097e+001 1.391645e+001 0.000000e+000 vertex 2.247097e+001 1.391645e+001 4.399139e+000 vertex 2.235818e+001 1.349552e+001 0.000000e+000 endloop endfacet facet normal 9.063078e-001 -4.226183e-001 5.863697e-016 outer loop vertex 2.247097e+001 1.391645e+001 0.000000e+000 vertex 2.265514e+001 1.431140e+001 0.000000e+000 vertex 2.265514e+001 1.431140e+001 4.399139e+000 endloop endfacet facet normal 8.191520e-001 -5.735764e-001 9.266089e-016 outer loop vertex 2.265514e+001 1.431140e+001 0.000000e+000 vertex 2.290509e+001 1.466837e+001 0.000000e+000 vertex 2.290509e+001 1.466837e+001 4.399139e+000 endloop endfacet facet normal 7.071068e-001 -7.071068e-001 8.542176e-016 outer loop vertex 2.290509e+001 1.466837e+001 0.000000e+000 vertex 2.321323e+001 1.497651e+001 0.000000e+000 vertex 2.321323e+001 1.497651e+001 4.399139e+000 endloop endfacet facet normal 5.735764e-001 -8.191520e-001 8.612394e-016 outer loop vertex 2.357020e+001 1.522646e+001 0.000000e+000 vertex 2.357020e+001 1.522646e+001 4.399139e+000 vertex 2.321323e+001 1.497651e+001 0.000000e+000 endloop endfacet facet normal 4.226183e-001 -9.063078e-001 8.542176e-016 outer loop vertex 2.357020e+001 1.522646e+001 0.000000e+000 vertex 2.396515e+001 1.541063e+001 0.000000e+000 vertex 2.396515e+001 1.541063e+001 4.399139e+000 endloop endfacet facet normal 2.588190e-001 -9.659258e-001 9.193698e-016 outer loop vertex 2.396515e+001 1.541063e+001 0.000000e+000 vertex 2.438608e+001 1.552342e+001 0.000000e+000 vertex 2.438608e+001 1.552342e+001 4.399139e+000 endloop endfacet facet normal 8.715574e-002 -9.961947e-001 7.040056e-016 outer loop vertex 2.438608e+001 1.552342e+001 0.000000e+000 vertex 2.482020e+001 1.556140e+001 0.000000e+000 vertex 2.482020e+001 1.556140e+001 4.399139e+000 endloop endfacet facet normal -8.715574e-002 -9.961947e-001 9.051759e-016 outer loop vertex 2.525432e+001 1.552342e+001 0.000000e+000 vertex 2.525432e+001 1.552342e+001 4.399139e+000 vertex 2.482020e+001 1.556140e+001 0.000000e+000 endloop endfacet facet normal -2.588190e-001 -9.659258e-001 1.031576e-015 outer loop vertex 2.525432e+001 1.552342e+001 0.000000e+000 vertex 2.567525e+001 1.541063e+001 0.000000e+000 vertex 2.567525e+001 1.541063e+001 4.399139e+000 endloop endfacet facet normal -4.226183e-001 -9.063078e-001 5.863697e-016 outer loop vertex 2.567525e+001 1.541063e+001 0.000000e+000 vertex 2.607020e+001 1.522646e+001 0.000000e+000 vertex 2.607020e+001 1.522646e+001 4.399139e+000 endloop endfacet facet normal -5.735764e-001 -8.191520e-001 9.266089e-016 outer loop vertex 2.607020e+001 1.522646e+001 0.000000e+000 vertex 2.642717e+001 1.497651e+001 0.000000e+000 vertex 2.642717e+001 1.497651e+001 4.399139e+000 endloop endfacet facet normal -7.071068e-001 -7.071068e-001 1.143783e-015 outer loop vertex 2.642717e+001 1.497651e+001 0.000000e+000 vertex 2.673531e+001 1.466837e+001 0.000000e+000 vertex 2.673531e+001 1.466837e+001 4.399139e+000 endloop endfacet facet normal -8.191520e-001 -5.735764e-001 6.298045e-016 outer loop vertex 2.673531e+001 1.466837e+001 0.000000e+000 vertex 2.698526e+001 1.431140e+001 0.000000e+000 vertex 2.698526e+001 1.431140e+001 4.399139e+000 endloop endfacet facet normal -9.063078e-001 -4.226183e-001 1.049674e-015 outer loop vertex 2.698526e+001 1.431140e+001 0.000000e+000 vertex 2.716943e+001 1.391645e+001 0.000000e+000 vertex 2.716943e+001 1.391645e+001 4.399139e+000 endloop endfacet facet normal 5.145160e-001 4.501432e-002 8.562984e-001 outer loop vertex 4.320200e+000 1.706140e+001 5.000000e+000 vertex 4.373373e+000 1.645363e+001 5.000000e+000 vertex 5.320200e+000 1.706140e+001 4.399139e+000 endloop endfacet facet normal 5.145160e-001 -4.501432e-002 8.562984e-001 outer loop vertex 5.358181e+000 1.749552e+001 4.399139e+000 vertex 4.320200e+000 1.706140e+001 5.000000e+000 vertex 5.320200e+000 1.706140e+001 4.399139e+000 endloop endfacet facet normal 5.145160e-001 -4.501432e-002 8.562984e-001 outer loop vertex 5.358181e+000 1.749552e+001 4.399139e+000 vertex 4.373373e+000 1.766917e+001 5.000000e+000 vertex 4.320200e+000 1.706140e+001 5.000000e+000 endloop endfacet facet normal 4.988827e-001 -1.336752e-001 8.562984e-001 outer loop vertex 5.358181e+000 1.749552e+001 4.399139e+000 vertex 4.531276e+000 1.825847e+001 5.000000e+000 vertex 4.373373e+000 1.766917e+001 5.000000e+000 endloop endfacet facet normal 4.988827e-001 -1.336752e-001 8.562984e-001 outer loop vertex 5.358181e+000 1.749552e+001 4.399139e+000 vertex 5.470968e+000 1.791645e+001 4.399139e+000 vertex 4.531276e+000 1.825847e+001 5.000000e+000 endloop endfacet facet normal 4.680911e-001 -2.182745e-001 8.562984e-001 outer loop vertex 4.531276e+000 1.825847e+001 5.000000e+000 vertex 5.470968e+000 1.791645e+001 4.399139e+000 vertex 4.789111e+000 1.881140e+001 5.000000e+000 endloop endfacet facet normal 4.680911e-001 -2.182745e-001 8.562984e-001 outer loop vertex 4.789111e+000 1.881140e+001 5.000000e+000 vertex 5.470968e+000 1.791645e+001 4.399139e+000 vertex 5.655136e+000 1.831140e+001 4.399139e+000 endloop endfacet facet normal 4.230768e-001 -2.962415e-001 8.562984e-001 outer loop vertex 5.139044e+000 1.931116e+001 5.000000e+000 vertex 5.655136e+000 1.831140e+001 4.399139e+000 vertex 5.905089e+000 1.866837e+001 4.399139e+000 endloop endfacet facet normal 3.652075e-001 -3.652075e-001 8.562984e-001 outer loop vertex 5.570443e+000 1.974256e+001 5.000000e+000 vertex 5.905089e+000 1.866837e+001 4.399139e+000 vertex 6.213231e+000 1.897651e+001 4.399139e+000 endloop endfacet facet normal 2.962415e-001 -4.230768e-001 8.562984e-001 outer loop vertex 6.570200e+000 1.922646e+001 4.399139e+000 vertex 5.570443e+000 1.974256e+001 5.000000e+000 vertex 6.213231e+000 1.897651e+001 4.399139e+000 endloop endfacet facet normal 2.962415e-001 -4.230768e-001 8.562984e-001 outer loop vertex 6.570200e+000 1.922646e+001 4.399139e+000 vertex 6.070200e+000 2.009249e+001 5.000000e+000 vertex 5.570443e+000 1.974256e+001 5.000000e+000 endloop endfacet facet normal 2.182745e-001 -4.680911e-001 8.562984e-001 outer loop vertex 6.570200e+000 1.922646e+001 4.399139e+000 vertex 6.965150e+000 1.941063e+001 4.399139e+000 vertex 6.070200e+000 2.009249e+001 5.000000e+000 endloop endfacet facet normal 2.182745e-001 -4.680911e-001 8.562984e-001 outer loop vertex 6.070200e+000 2.009249e+001 5.000000e+000 vertex 6.965150e+000 1.941063e+001 4.399139e+000 vertex 6.623129e+000 2.035032e+001 5.000000e+000 endloop endfacet facet normal 1.336752e-001 -4.988827e-001 8.562984e-001 outer loop vertex 6.623129e+000 2.035032e+001 5.000000e+000 vertex 6.965150e+000 1.941063e+001 4.399139e+000 vertex 7.212431e+000 2.050823e+001 5.000000e+000 endloop endfacet facet normal 1.336752e-001 -4.988827e-001 8.562984e-001 outer loop vertex 7.212431e+000 2.050823e+001 5.000000e+000 vertex 6.965150e+000 1.941063e+001 4.399139e+000 vertex 7.386080e+000 1.952342e+001 4.399139e+000 endloop endfacet facet normal 4.501432e-002 -5.145160e-001 8.562984e-001 outer loop vertex 7.820200e+000 2.056140e+001 5.000000e+000 vertex 7.386080e+000 1.952342e+001 4.399139e+000 vertex 7.820200e+000 1.956140e+001 4.399139e+000 endloop endfacet facet normal -4.501432e-002 -5.145160e-001 8.562984e-001 outer loop vertex 8.427969e+000 2.050823e+001 5.000000e+000 vertex 7.820200e+000 1.956140e+001 4.399139e+000 vertex 8.254320e+000 1.952342e+001 4.399139e+000 endloop endfacet facet normal -1.336752e-001 -4.988827e-001 8.562984e-001 outer loop vertex 9.017271e+000 2.035032e+001 5.000000e+000 vertex 8.254320e+000 1.952342e+001 4.399139e+000 vertex 8.675250e+000 1.941063e+001 4.399139e+000 endloop endfacet facet normal -2.182745e-001 -4.680911e-001 8.562984e-001 outer loop vertex 9.570200e+000 2.009249e+001 5.000000e+000 vertex 8.675250e+000 1.941063e+001 4.399139e+000 vertex 9.070200e+000 1.922646e+001 4.399139e+000 endloop endfacet facet normal -2.962415e-001 -4.230768e-001 8.562984e-001 outer loop vertex 1.006996e+001 1.974256e+001 5.000000e+000 vertex 9.070200e+000 1.922646e+001 4.399139e+000 vertex 9.427169e+000 1.897651e+001 4.399139e+000 endloop endfacet facet normal -3.652075e-001 -3.652075e-001 8.562984e-001 outer loop vertex 9.735311e+000 1.866837e+001 4.399139e+000 vertex 1.006996e+001 1.974256e+001 5.000000e+000 vertex 9.427169e+000 1.897651e+001 4.399139e+000 endloop endfacet facet normal -3.652075e-001 -3.652075e-001 8.562984e-001 outer loop vertex 9.735311e+000 1.866837e+001 4.399139e+000 vertex 1.050136e+001 1.931116e+001 5.000000e+000 vertex 1.006996e+001 1.974256e+001 5.000000e+000 endloop endfacet facet normal -4.230768e-001 -2.962415e-001 8.562984e-001 outer loop vertex 9.735311e+000 1.866837e+001 4.399139e+000 vertex 9.985264e+000 1.831140e+001 4.399139e+000 vertex 1.050136e+001 1.931116e+001 5.000000e+000 endloop endfacet facet normal -4.230768e-001 -2.962415e-001 8.562984e-001 outer loop vertex 1.050136e+001 1.931116e+001 5.000000e+000 vertex 9.985264e+000 1.831140e+001 4.399139e+000 vertex 1.085129e+001 1.881140e+001 5.000000e+000 endloop endfacet facet normal -4.680911e-001 -2.182745e-001 8.562984e-001 outer loop vertex 1.085129e+001 1.881140e+001 5.000000e+000 vertex 9.985264e+000 1.831140e+001 4.399139e+000 vertex 1.016943e+001 1.791645e+001 4.399139e+000 endloop endfacet facet normal -4.988827e-001 -1.336752e-001 8.562984e-001 outer loop vertex 1.110912e+001 1.825847e+001 5.000000e+000 vertex 1.016943e+001 1.791645e+001 4.399139e+000 vertex 1.028222e+001 1.749552e+001 4.399139e+000 endloop endfacet facet normal -5.145160e-001 -4.501432e-002 8.562984e-001 outer loop vertex 1.126703e+001 1.766917e+001 5.000000e+000 vertex 1.028222e+001 1.749552e+001 4.399139e+000 vertex 1.132020e+001 1.706140e+001 5.000000e+000 endloop endfacet facet normal -4.988827e-001 -1.336752e-001 8.562984e-001 outer loop vertex 1.126703e+001 1.766917e+001 5.000000e+000 vertex 1.110912e+001 1.825847e+001 5.000000e+000 vertex 1.028222e+001 1.749552e+001 4.399139e+000 endloop endfacet facet normal 4.988827e-001 1.336752e-001 8.562984e-001 outer loop vertex 4.531276e+000 1.586433e+001 5.000000e+000 vertex 5.470968e+000 1.620635e+001 4.399139e+000 vertex 4.373373e+000 1.645363e+001 5.000000e+000 endloop endfacet facet normal 4.680911e-001 2.182745e-001 8.562984e-001 outer loop vertex 4.531276e+000 1.586433e+001 5.000000e+000 vertex 5.655136e+000 1.581140e+001 4.399139e+000 vertex 5.470968e+000 1.620635e+001 4.399139e+000 endloop endfacet facet normal 4.680911e-001 2.182745e-001 8.562984e-001 outer loop vertex 4.531276e+000 1.586433e+001 5.000000e+000 vertex 4.789111e+000 1.531140e+001 5.000000e+000 vertex 5.655136e+000 1.581140e+001 4.399139e+000 endloop endfacet facet normal 4.230768e-001 2.962415e-001 8.562984e-001 outer loop vertex 5.655136e+000 1.581140e+001 4.399139e+000 vertex 4.789111e+000 1.531140e+001 5.000000e+000 vertex 5.905089e+000 1.545443e+001 4.399139e+000 endloop endfacet facet normal 4.230768e-001 2.962415e-001 8.562984e-001 outer loop vertex 5.905089e+000 1.545443e+001 4.399139e+000 vertex 4.789111e+000 1.531140e+001 5.000000e+000 vertex 5.139044e+000 1.481164e+001 5.000000e+000 endloop endfacet facet normal 3.652075e-001 3.652075e-001 8.562984e-001 outer loop vertex 6.213231e+000 1.514629e+001 4.399139e+000 vertex 5.139044e+000 1.481164e+001 5.000000e+000 vertex 5.570443e+000 1.438024e+001 5.000000e+000 endloop endfacet facet normal 2.962415e-001 4.230768e-001 8.562984e-001 outer loop vertex 6.570200e+000 1.489634e+001 4.399139e+000 vertex 5.570443e+000 1.438024e+001 5.000000e+000 vertex 6.070200e+000 1.403031e+001 5.000000e+000 endloop endfacet facet normal 2.182745e-001 4.680911e-001 8.562984e-001 outer loop vertex 6.623129e+000 1.377248e+001 5.000000e+000 vertex 6.570200e+000 1.489634e+001 4.399139e+000 vertex 6.070200e+000 1.403031e+001 5.000000e+000 endloop endfacet facet normal 2.182745e-001 4.680911e-001 8.562984e-001 outer loop vertex 6.623129e+000 1.377248e+001 5.000000e+000 vertex 6.965150e+000 1.471217e+001 4.399139e+000 vertex 6.570200e+000 1.489634e+001 4.399139e+000 endloop endfacet facet normal 1.336752e-001 4.988827e-001 8.562984e-001 outer loop vertex 6.623129e+000 1.377248e+001 5.000000e+000 vertex 7.386080e+000 1.459938e+001 4.399139e+000 vertex 6.965150e+000 1.471217e+001 4.399139e+000 endloop endfacet facet normal 1.336752e-001 4.988827e-001 8.562984e-001 outer loop vertex 6.623129e+000 1.377248e+001 5.000000e+000 vertex 7.212431e+000 1.361457e+001 5.000000e+000 vertex 7.386080e+000 1.459938e+001 4.399139e+000 endloop endfacet facet normal 4.501432e-002 5.145160e-001 8.562984e-001 outer loop vertex 7.386080e+000 1.459938e+001 4.399139e+000 vertex 7.212431e+000 1.361457e+001 5.000000e+000 vertex 7.820200e+000 1.356140e+001 5.000000e+000 endloop endfacet facet normal -4.501432e-002 5.145160e-001 8.562984e-001 outer loop vertex 7.820200e+000 1.456140e+001 4.399139e+000 vertex 7.820200e+000 1.356140e+001 5.000000e+000 vertex 8.427969e+000 1.361457e+001 5.000000e+000 endloop endfacet facet normal -1.336752e-001 4.988827e-001 8.562984e-001 outer loop vertex 8.254320e+000 1.459938e+001 4.399139e+000 vertex 8.427969e+000 1.361457e+001 5.000000e+000 vertex 9.017271e+000 1.377248e+001 5.000000e+000 endloop endfacet facet normal -2.182745e-001 4.680911e-001 8.562984e-001 outer loop vertex 8.675250e+000 1.471217e+001 4.399139e+000 vertex 9.017271e+000 1.377248e+001 5.000000e+000 vertex 9.570200e+000 1.403031e+001 5.000000e+000 endloop endfacet facet normal -2.962415e-001 4.230768e-001 8.562984e-001 outer loop vertex 9.070200e+000 1.489634e+001 4.399139e+000 vertex 9.570200e+000 1.403031e+001 5.000000e+000 vertex 1.006996e+001 1.438024e+001 5.000000e+000 endloop endfacet facet normal -3.652075e-001 3.652075e-001 8.562984e-001 outer loop vertex 9.427169e+000 1.514629e+001 4.399139e+000 vertex 1.006996e+001 1.438024e+001 5.000000e+000 vertex 1.050136e+001 1.481164e+001 5.000000e+000 endloop endfacet facet normal -4.230768e-001 2.962415e-001 8.562984e-001 outer loop vertex 9.735311e+000 1.545443e+001 4.399139e+000 vertex 1.050136e+001 1.481164e+001 5.000000e+000 vertex 9.985264e+000 1.581140e+001 4.399139e+000 endloop endfacet facet normal -3.652075e-001 3.652075e-001 8.562984e-001 outer loop vertex 9.735311e+000 1.545443e+001 4.399139e+000 vertex 9.427169e+000 1.514629e+001 4.399139e+000 vertex 1.050136e+001 1.481164e+001 5.000000e+000 endloop endfacet facet normal -4.230768e-001 2.962415e-001 8.562984e-001 outer loop vertex 1.050136e+001 1.481164e+001 5.000000e+000 vertex 1.085129e+001 1.531140e+001 5.000000e+000 vertex 9.985264e+000 1.581140e+001 4.399139e+000 endloop endfacet facet normal -4.680911e-001 2.182745e-001 8.562984e-001 outer loop vertex 9.985264e+000 1.581140e+001 4.399139e+000 vertex 1.085129e+001 1.531140e+001 5.000000e+000 vertex 1.016943e+001 1.620635e+001 4.399139e+000 endloop endfacet facet normal -4.680911e-001 2.182745e-001 8.562984e-001 outer loop vertex 1.016943e+001 1.620635e+001 4.399139e+000 vertex 1.085129e+001 1.531140e+001 5.000000e+000 vertex 1.110912e+001 1.586433e+001 5.000000e+000 endloop endfacet facet normal -4.988827e-001 1.336752e-001 8.562984e-001 outer loop vertex 1.126703e+001 1.645363e+001 5.000000e+000 vertex 1.016943e+001 1.620635e+001 4.399139e+000 vertex 1.110912e+001 1.586433e+001 5.000000e+000 endloop endfacet facet normal -4.988827e-001 1.336752e-001 8.562984e-001 outer loop vertex 1.126703e+001 1.645363e+001 5.000000e+000 vertex 1.028222e+001 1.662728e+001 4.399139e+000 vertex 1.016943e+001 1.620635e+001 4.399139e+000 endloop endfacet facet normal -5.145160e-001 4.501432e-002 8.562984e-001 outer loop vertex 1.126703e+001 1.645363e+001 5.000000e+000 vertex 1.132020e+001 1.706140e+001 5.000000e+000 vertex 1.028222e+001 1.662728e+001 4.399139e+000 endloop endfacet facet normal -5.145160e-001 4.501432e-002 8.562984e-001 outer loop vertex 1.028222e+001 1.662728e+001 4.399139e+000 vertex 1.132020e+001 1.706140e+001 5.000000e+000 vertex 1.032020e+001 1.706140e+001 4.399139e+000 endloop endfacet facet normal -5.145160e-001 -4.501432e-002 8.562984e-001 outer loop vertex 1.032020e+001 1.706140e+001 4.399139e+000 vertex 1.132020e+001 1.706140e+001 5.000000e+000 vertex 1.028222e+001 1.749552e+001 4.399139e+000 endloop endfacet facet normal -4.680911e-001 -2.182745e-001 8.562984e-001 outer loop vertex 1.110912e+001 1.825847e+001 5.000000e+000 vertex 1.085129e+001 1.881140e+001 5.000000e+000 vertex 1.016943e+001 1.791645e+001 4.399139e+000 endloop endfacet facet normal -2.962415e-001 -4.230768e-001 8.562984e-001 outer loop vertex 9.070200e+000 1.922646e+001 4.399139e+000 vertex 1.006996e+001 1.974256e+001 5.000000e+000 vertex 9.570200e+000 2.009249e+001 5.000000e+000 endloop endfacet facet normal -2.182745e-001 -4.680911e-001 8.562984e-001 outer loop vertex 9.017271e+000 2.035032e+001 5.000000e+000 vertex 8.675250e+000 1.941063e+001 4.399139e+000 vertex 9.570200e+000 2.009249e+001 5.000000e+000 endloop endfacet facet normal -1.336752e-001 -4.988827e-001 8.562984e-001 outer loop vertex 9.017271e+000 2.035032e+001 5.000000e+000 vertex 8.427969e+000 2.050823e+001 5.000000e+000 vertex 8.254320e+000 1.952342e+001 4.399139e+000 endloop endfacet facet normal -4.501432e-002 -5.145160e-001 8.562984e-001 outer loop vertex 8.427969e+000 2.050823e+001 5.000000e+000 vertex 7.820200e+000 2.056140e+001 5.000000e+000 vertex 7.820200e+000 1.956140e+001 4.399139e+000 endloop endfacet facet normal 4.501432e-002 -5.145160e-001 8.562984e-001 outer loop vertex 7.386080e+000 1.952342e+001 4.399139e+000 vertex 7.820200e+000 2.056140e+001 5.000000e+000 vertex 7.212431e+000 2.050823e+001 5.000000e+000 endloop endfacet facet normal 3.652075e-001 -3.652075e-001 8.562984e-001 outer loop vertex 5.139044e+000 1.931116e+001 5.000000e+000 vertex 5.905089e+000 1.866837e+001 4.399139e+000 vertex 5.570443e+000 1.974256e+001 5.000000e+000 endloop endfacet facet normal 4.230768e-001 -2.962415e-001 8.562984e-001 outer loop vertex 5.139044e+000 1.931116e+001 5.000000e+000 vertex 4.789111e+000 1.881140e+001 5.000000e+000 vertex 5.655136e+000 1.831140e+001 4.399139e+000 endloop endfacet facet normal -2.962415e-001 4.230768e-001 8.562984e-001 outer loop vertex 1.006996e+001 1.438024e+001 5.000000e+000 vertex 9.427169e+000 1.514629e+001 4.399139e+000 vertex 9.070200e+000 1.489634e+001 4.399139e+000 endloop endfacet facet normal -2.182745e-001 4.680911e-001 8.562984e-001 outer loop vertex 9.070200e+000 1.489634e+001 4.399139e+000 vertex 8.675250e+000 1.471217e+001 4.399139e+000 vertex 9.570200e+000 1.403031e+001 5.000000e+000 endloop endfacet facet normal -1.336752e-001 4.988827e-001 8.562984e-001 outer loop vertex 8.675250e+000 1.471217e+001 4.399139e+000 vertex 8.254320e+000 1.459938e+001 4.399139e+000 vertex 9.017271e+000 1.377248e+001 5.000000e+000 endloop endfacet facet normal -4.501432e-002 5.145160e-001 8.562984e-001 outer loop vertex 8.254320e+000 1.459938e+001 4.399139e+000 vertex 7.820200e+000 1.456140e+001 4.399139e+000 vertex 8.427969e+000 1.361457e+001 5.000000e+000 endloop endfacet facet normal 4.501432e-002 5.145160e-001 8.562984e-001 outer loop vertex 7.820200e+000 1.456140e+001 4.399139e+000 vertex 7.386080e+000 1.459938e+001 4.399139e+000 vertex 7.820200e+000 1.356140e+001 5.000000e+000 endloop endfacet facet normal 2.962415e-001 4.230768e-001 8.562984e-001 outer loop vertex 6.570200e+000 1.489634e+001 4.399139e+000 vertex 6.213231e+000 1.514629e+001 4.399139e+000 vertex 5.570443e+000 1.438024e+001 5.000000e+000 endloop endfacet facet normal 3.652075e-001 3.652075e-001 8.562984e-001 outer loop vertex 5.139044e+000 1.481164e+001 5.000000e+000 vertex 6.213231e+000 1.514629e+001 4.399139e+000 vertex 5.905089e+000 1.545443e+001 4.399139e+000 endloop endfacet facet normal 4.988827e-001 1.336752e-001 8.562984e-001 outer loop vertex 5.358181e+000 1.662728e+001 4.399139e+000 vertex 4.373373e+000 1.645363e+001 5.000000e+000 vertex 5.470968e+000 1.620635e+001 4.399139e+000 endloop endfacet facet normal 5.145160e-001 4.501432e-002 8.562984e-001 outer loop vertex 5.358181e+000 1.662728e+001 4.399139e+000 vertex 5.320200e+000 1.706140e+001 4.399139e+000 vertex 4.373373e+000 1.645363e+001 5.000000e+000 endloop endfacet facet normal -9.961947e-001 8.715574e-002 0.000000e+000 outer loop vertex 1.032020e+001 1.706140e+001 -8.881784e-016 vertex 1.028222e+001 1.662728e+001 -8.881784e-016 vertex 1.028222e+001 1.662728e+001 4.399139e+000 endloop endfacet facet normal -9.961947e-001 8.715574e-002 0.000000e+000 outer loop vertex 1.032020e+001 1.706140e+001 4.399139e+000 vertex 1.032020e+001 1.706140e+001 -8.881784e-016 vertex 1.028222e+001 1.662728e+001 4.399139e+000 endloop endfacet facet normal -9.961947e-001 -8.715574e-002 0.000000e+000 outer loop vertex 1.032020e+001 1.706140e+001 4.399139e+000 vertex 1.028222e+001 1.749552e+001 -8.881784e-016 vertex 1.032020e+001 1.706140e+001 -8.881784e-016 endloop endfacet facet normal -9.961947e-001 -8.715574e-002 -9.067013e-016 outer loop vertex 1.032020e+001 1.706140e+001 4.399139e+000 vertex 1.028222e+001 1.749552e+001 4.399139e+000 vertex 1.028222e+001 1.749552e+001 -8.881784e-016 endloop endfacet facet normal -9.659258e-001 -2.588190e-001 5.300545e-016 outer loop vertex 1.028222e+001 1.749552e+001 -8.881784e-016 vertex 1.028222e+001 1.749552e+001 4.399139e+000 vertex 1.016943e+001 1.791645e+001 -8.881784e-016 endloop endfacet facet normal -9.659258e-001 -2.588190e-001 -6.400577e-016 outer loop vertex 1.016943e+001 1.791645e+001 -8.881784e-016 vertex 1.028222e+001 1.749552e+001 4.399139e+000 vertex 1.016943e+001 1.791645e+001 4.399139e+000 endloop endfacet facet normal -9.063078e-001 -4.226183e-001 -5.879071e-016 outer loop vertex 9.985264e+000 1.831140e+001 -8.881784e-016 vertex 1.016943e+001 1.791645e+001 4.399139e+000 vertex 9.985264e+000 1.831140e+001 4.399139e+000 endloop endfacet facet normal -8.191520e-001 -5.735764e-001 -5.942889e-016 outer loop vertex 9.735311e+000 1.866837e+001 -8.881784e-016 vertex 9.985264e+000 1.831140e+001 4.399139e+000 vertex 9.735311e+000 1.866837e+001 4.399139e+000 endloop endfacet facet normal -7.071068e-001 -7.071068e-001 -1.142109e-015 outer loop vertex 9.427169e+000 1.897651e+001 -8.881784e-016 vertex 9.735311e+000 1.866837e+001 4.399139e+000 vertex 9.427169e+000 1.897651e+001 4.399139e+000 endloop endfacet facet normal -5.735764e-001 -8.191520e-001 -6.296313e-016 outer loop vertex 9.070200e+000 1.922646e+001 -8.881784e-016 vertex 9.427169e+000 1.897651e+001 4.399139e+000 vertex 9.070200e+000 1.922646e+001 4.399139e+000 endloop endfacet facet normal -4.226183e-001 -9.063078e-001 -1.046600e-015 outer loop vertex 8.675250e+000 1.941063e+001 -8.881784e-016 vertex 9.070200e+000 1.922646e+001 4.399139e+000 vertex 8.675250e+000 1.941063e+001 4.399139e+000 endloop endfacet facet normal -2.588190e-001 -9.659258e-001 -1.310129e-015 outer loop vertex 8.254320e+000 1.952342e+001 -8.881784e-016 vertex 8.675250e+000 1.941063e+001 4.399139e+000 vertex 8.254320e+000 1.952342e+001 4.399139e+000 endloop endfacet facet normal -8.715574e-002 -9.961947e-001 -7.038636e-016 outer loop vertex 7.820200e+000 1.956140e+001 -8.881784e-016 vertex 8.254320e+000 1.952342e+001 4.399139e+000 vertex 7.820200e+000 1.956140e+001 4.399139e+000 endloop endfacet facet normal 8.715574e-002 -9.961947e-001 -9.051759e-016 outer loop vertex 7.386080e+000 1.952342e+001 -8.881784e-016 vertex 7.820200e+000 1.956140e+001 4.399139e+000 vertex 7.386080e+000 1.952342e+001 4.399139e+000 endloop endfacet facet normal 2.588190e-001 -9.659258e-001 -3.545305e-016 outer loop vertex 6.965150e+000 1.941063e+001 -8.881784e-016 vertex 7.386080e+000 1.952342e+001 4.399139e+000 vertex 6.965150e+000 1.941063e+001 4.399139e+000 endloop endfacet facet normal 4.226183e-001 -9.063078e-001 -7.585588e-016 outer loop vertex 6.570200e+000 1.922646e+001 -8.881784e-016 vertex 6.965150e+000 1.941063e+001 4.399139e+000 vertex 6.570200e+000 1.922646e+001 4.399139e+000 endloop endfacet facet normal 5.735764e-001 -8.191520e-001 -1.040864e-015 outer loop vertex 6.213231e+000 1.897651e+001 -8.881784e-016 vertex 6.570200e+000 1.922646e+001 4.399139e+000 vertex 6.213231e+000 1.897651e+001 4.399139e+000 endloop endfacet facet normal 7.071068e-001 -7.071068e-001 -8.565816e-016 outer loop vertex 5.905089e+000 1.866837e+001 -8.881784e-016 vertex 6.213231e+000 1.897651e+001 4.399139e+000 vertex 5.905089e+000 1.866837e+001 4.399139e+000 endloop endfacet facet normal 8.191520e-001 -5.735764e-001 -3.980232e-016 outer loop vertex 5.655136e+000 1.831140e+001 -8.881784e-016 vertex 5.905089e+000 1.866837e+001 4.399139e+000 vertex 5.655136e+000 1.831140e+001 4.399139e+000 endloop endfacet facet normal 9.063078e-001 -4.226183e-001 -8.512880e-016 outer loop vertex 5.470968e+000 1.791645e+001 -8.881784e-016 vertex 5.655136e+000 1.831140e+001 4.399139e+000 vertex 5.470968e+000 1.791645e+001 4.399139e+000 endloop endfacet facet normal 9.659258e-001 -2.588190e-001 -7.250733e-016 outer loop vertex 5.358181e+000 1.749552e+001 -8.881784e-016 vertex 5.470968e+000 1.791645e+001 4.399139e+000 vertex 5.358181e+000 1.749552e+001 4.399139e+000 endloop endfacet facet normal 9.961947e-001 -8.715574e-002 -7.038636e-016 outer loop vertex 5.320200e+000 1.706140e+001 -8.881784e-016 vertex 5.358181e+000 1.749552e+001 4.399139e+000 vertex 5.320200e+000 1.706140e+001 4.399139e+000 endloop endfacet facet normal 9.961947e-001 8.715574e-002 7.038636e-017 outer loop vertex 5.358181e+000 1.662728e+001 -8.881784e-016 vertex 5.320200e+000 1.706140e+001 4.399139e+000 vertex 5.358181e+000 1.662728e+001 4.399139e+000 endloop endfacet facet normal 9.659258e-001 2.588190e-001 -3.900374e-016 outer loop vertex 5.470968e+000 1.620635e+001 -8.881784e-016 vertex 5.358181e+000 1.662728e+001 4.399139e+000 vertex 5.470968e+000 1.620635e+001 4.399139e+000 endloop endfacet facet normal 9.063078e-001 4.226183e-001 -1.829819e-016 outer loop vertex 5.655136e+000 1.581140e+001 -8.881784e-016 vertex 5.470968e+000 1.620635e+001 4.399139e+000 vertex 5.655136e+000 1.581140e+001 4.399139e+000 endloop endfacet facet normal 8.191520e-001 5.735764e-001 6.622278e-017 outer loop vertex 5.905089e+000 1.545443e+001 -8.881784e-016 vertex 5.655136e+000 1.581140e+001 4.399139e+000 vertex 5.905089e+000 1.545443e+001 4.399139e+000 endloop endfacet facet normal 7.071068e-001 7.071068e-001 -6.583952e-030 outer loop vertex 6.213231e+000 1.514629e+001 -8.881784e-016 vertex 5.905089e+000 1.545443e+001 4.399139e+000 vertex 6.213231e+000 1.514629e+001 4.399139e+000 endloop endfacet facet normal 5.735764e-001 8.191520e-001 2.149666e-016 outer loop vertex 6.570200e+000 1.489634e+001 -8.881784e-016 vertex 6.213231e+000 1.514629e+001 4.399139e+000 vertex 6.570200e+000 1.489634e+001 4.399139e+000 endloop endfacet facet normal 4.226183e-001 9.063078e-001 -2.559776e-016 outer loop vertex 6.965150e+000 1.471217e+001 -8.881784e-016 vertex 6.570200e+000 1.489634e+001 4.399139e+000 vertex 6.965150e+000 1.471217e+001 4.399139e+000 endloop endfacet facet normal 2.588190e-001 9.659258e-001 -1.567653e-016 outer loop vertex 7.386080e+000 1.459938e+001 -8.881784e-016 vertex 6.965150e+000 1.471217e+001 4.399139e+000 vertex 7.386080e+000 1.459938e+001 4.399139e+000 endloop endfacet facet normal 8.715574e-002 9.961947e-001 -1.759659e-017 outer loop vertex 7.820200e+000 1.456140e+001 -8.881784e-016 vertex 7.386080e+000 1.459938e+001 4.399139e+000 vertex 7.820200e+000 1.456140e+001 4.399139e+000 endloop endfacet facet normal -8.715574e-002 9.961947e-001 7.038636e-017 outer loop vertex 8.254320e+000 1.459938e+001 -8.881784e-016 vertex 7.820200e+000 1.456140e+001 4.399139e+000 vertex 8.254320e+000 1.459938e+001 4.399139e+000 endloop endfacet facet normal -2.588190e-001 9.659258e-001 -2.855272e-016 outer loop vertex 8.675250e+000 1.471217e+001 -8.881784e-016 vertex 8.254320e+000 1.459938e+001 4.399139e+000 vertex 8.675250e+000 1.471217e+001 4.399139e+000 endloop endfacet facet normal -4.226183e-001 9.063078e-001 -1.953121e-016 outer loop vertex 9.070200e+000 1.489634e+001 -8.881784e-016 vertex 8.675250e+000 1.471217e+001 4.399139e+000 vertex 9.070200e+000 1.489634e+001 4.399139e+000 endloop endfacet facet normal -5.735764e-001 8.191520e-001 -9.916256e-017 outer loop vertex 9.427169e+000 1.514629e+001 -8.881784e-016 vertex 9.070200e+000 1.489634e+001 4.399139e+000 vertex 9.427169e+000 1.514629e+001 4.399139e+000 endloop endfacet facet normal -7.071068e-001 7.071068e-001 0.000000e+000 outer loop vertex 9.735311e+000 1.545443e+001 -8.881784e-016 vertex 9.427169e+000 1.514629e+001 4.399139e+000 vertex 9.735311e+000 1.545443e+001 4.399139e+000 endloop endfacet facet normal -8.191520e-001 5.735764e-001 0.000000e+000 outer loop vertex 9.985264e+000 1.581140e+001 -8.881784e-016 vertex 9.735311e+000 1.545443e+001 4.399139e+000 vertex 9.985264e+000 1.581140e+001 4.399139e+000 endloop endfacet facet normal -9.063078e-001 4.226183e-001 3.659639e-016 outer loop vertex 1.016943e+001 1.620635e+001 -8.881784e-016 vertex 9.985264e+000 1.581140e+001 4.399139e+000 vertex 1.016943e+001 1.620635e+001 4.399139e+000 endloop endfacet facet normal -9.659258e-001 2.588190e-001 0.000000e+000 outer loop vertex 1.028222e+001 1.662728e+001 -8.881784e-016 vertex 1.016943e+001 1.620635e+001 4.399139e+000 vertex 1.028222e+001 1.662728e+001 4.399139e+000 endloop endfacet facet normal -9.659258e-001 2.588190e-001 3.909131e-016 outer loop vertex 1.028222e+001 1.662728e+001 -8.881784e-016 vertex 1.016943e+001 1.620635e+001 -8.881784e-016 vertex 1.016943e+001 1.620635e+001 4.399139e+000 endloop endfacet facet normal -9.063078e-001 4.226183e-001 0.000000e+000 outer loop vertex 1.016943e+001 1.620635e+001 -8.881784e-016 vertex 9.985264e+000 1.581140e+001 -8.881784e-016 vertex 9.985264e+000 1.581140e+001 4.399139e+000 endloop endfacet facet normal -8.191520e-001 5.735764e-001 0.000000e+000 outer loop vertex 9.985264e+000 1.581140e+001 -8.881784e-016 vertex 9.735311e+000 1.545443e+001 -8.881784e-016 vertex 9.735311e+000 1.545443e+001 4.399139e+000 endloop endfacet facet normal -7.071068e-001 7.071068e-001 0.000000e+000 outer loop vertex 9.735311e+000 1.545443e+001 -8.881784e-016 vertex 9.427169e+000 1.514629e+001 -8.881784e-016 vertex 9.427169e+000 1.514629e+001 4.399139e+000 endloop endfacet facet normal -5.735764e-001 8.191520e-001 -9.410872e-017 outer loop vertex 9.427169e+000 1.514629e+001 -8.881784e-016 vertex 9.070200e+000 1.489634e+001 -8.881784e-016 vertex 9.070200e+000 1.489634e+001 4.399139e+000 endloop endfacet facet normal -4.226183e-001 9.063078e-001 -1.954566e-016 outer loop vertex 9.070200e+000 1.489634e+001 -8.881784e-016 vertex 8.675250e+000 1.471217e+001 -8.881784e-016 vertex 8.675250e+000 1.471217e+001 4.399139e+000 endloop endfacet facet normal -2.588190e-001 9.659258e-001 2.099348e-016 outer loop vertex 8.675250e+000 1.471217e+001 -8.881784e-016 vertex 8.254320e+000 1.459938e+001 -8.881784e-016 vertex 8.254320e+000 1.459938e+001 4.399139e+000 endloop endfacet facet normal -8.715574e-002 9.961947e-001 1.809783e-017 outer loop vertex 8.254320e+000 1.459938e+001 -8.881784e-016 vertex 7.820200e+000 1.456140e+001 -8.881784e-016 vertex 7.820200e+000 1.456140e+001 4.399139e+000 endloop endfacet facet normal 8.715574e-002 9.961947e-001 -5.429349e-017 outer loop vertex 7.820200e+000 1.456140e+001 -8.881784e-016 vertex 7.386080e+000 1.459938e+001 -8.881784e-016 vertex 7.386080e+000 1.459938e+001 4.399139e+000 endloop endfacet facet normal 2.588190e-001 9.659258e-001 -1.592609e-016 outer loop vertex 7.386080e+000 1.459938e+001 -8.881784e-016 vertex 6.965150e+000 1.471217e+001 -8.881784e-016 vertex 6.965150e+000 1.471217e+001 4.399139e+000 endloop endfacet facet normal 4.226183e-001 9.063078e-001 2.750870e-016 outer loop vertex 6.965150e+000 1.471217e+001 -8.881784e-016 vertex 6.570200e+000 1.489634e+001 -8.881784e-016 vertex 6.570200e+000 1.489634e+001 4.399139e+000 endloop endfacet facet normal 5.735764e-001 8.191520e-001 9.916256e-017 outer loop vertex 6.213231e+000 1.514629e+001 -8.881784e-016 vertex 6.213231e+000 1.514629e+001 4.399139e+000 vertex 6.570200e+000 1.489634e+001 -8.881784e-016 endloop endfacet facet normal 7.071068e-001 7.071068e-001 1.447826e-016 outer loop vertex 6.213231e+000 1.514629e+001 -8.881784e-016 vertex 5.905089e+000 1.545443e+001 -8.881784e-016 vertex 5.905089e+000 1.545443e+001 4.399139e+000 endloop endfacet facet normal 8.191520e-001 5.735764e-001 -1.592609e-016 outer loop vertex 5.905089e+000 1.545443e+001 -8.881784e-016 vertex 5.655136e+000 1.581140e+001 -8.881784e-016 vertex 5.655136e+000 1.581140e+001 4.399139e+000 endloop endfacet facet normal 9.063078e-001 4.226183e-001 -3.691957e-016 outer loop vertex 5.655136e+000 1.581140e+001 -8.881784e-016 vertex 5.470968e+000 1.620635e+001 -8.881784e-016 vertex 5.470968e+000 1.620635e+001 4.399139e+000 endloop endfacet facet normal 9.659258e-001 2.588190e-001 2.099348e-016 outer loop vertex 5.470968e+000 1.620635e+001 -8.881784e-016 vertex 5.358181e+000 1.662728e+001 -8.881784e-016 vertex 5.358181e+000 1.662728e+001 4.399139e+000 endloop endfacet facet normal 9.961947e-001 8.715574e-002 7.040056e-016 outer loop vertex 5.358181e+000 1.662728e+001 -8.881784e-016 vertex 5.320200e+000 1.706140e+001 -8.881784e-016 vertex 5.320200e+000 1.706140e+001 4.399139e+000 endloop endfacet facet normal 9.961947e-001 -8.715574e-002 7.040056e-016 outer loop vertex 5.320200e+000 1.706140e+001 -8.881784e-016 vertex 5.358181e+000 1.749552e+001 -8.881784e-016 vertex 5.358181e+000 1.749552e+001 4.399139e+000 endloop endfacet facet normal 9.659258e-001 -2.588190e-001 6.400577e-016 outer loop vertex 5.470968e+000 1.791645e+001 -8.881784e-016 vertex 5.470968e+000 1.791645e+001 4.399139e+000 vertex 5.358181e+000 1.749552e+001 -8.881784e-016 endloop endfacet facet normal 9.063078e-001 -4.226183e-001 9.338481e-016 outer loop vertex 5.470968e+000 1.791645e+001 -8.881784e-016 vertex 5.655136e+000 1.831140e+001 -8.881784e-016 vertex 5.655136e+000 1.831140e+001 4.399139e+000 endloop endfacet facet normal 8.191520e-001 -5.735764e-001 5.942889e-016 outer loop vertex 5.905089e+000 1.866837e+001 -8.881784e-016 vertex 5.905089e+000 1.866837e+001 4.399139e+000 vertex 5.655136e+000 1.831140e+001 -8.881784e-016 endloop endfacet facet normal 7.071068e-001 -7.071068e-001 4.271088e-016 outer loop vertex 5.905089e+000 1.866837e+001 -8.881784e-016 vertex 6.213231e+000 1.897651e+001 -8.881784e-016 vertex 6.213231e+000 1.897651e+001 4.399139e+000 endloop endfacet facet normal 5.735764e-001 -8.191520e-001 6.298045e-016 outer loop vertex 6.213231e+000 1.897651e+001 -8.881784e-016 vertex 6.570200e+000 1.922646e+001 -8.881784e-016 vertex 6.570200e+000 1.922646e+001 4.399139e+000 endloop endfacet facet normal 4.226183e-001 -9.063078e-001 1.049674e-015 outer loop vertex 6.570200e+000 1.922646e+001 -8.881784e-016 vertex 6.965150e+000 1.941063e+001 -8.881784e-016 vertex 6.965150e+000 1.941063e+001 4.399139e+000 endloop endfacet facet normal 2.588190e-001 -9.659258e-001 5.300545e-016 outer loop vertex 7.386080e+000 1.952342e+001 -8.881784e-016 vertex 7.386080e+000 1.952342e+001 4.399139e+000 vertex 6.965150e+000 1.941063e+001 -8.881784e-016 endloop endfacet facet normal 8.715574e-002 -9.961947e-001 7.040056e-016 outer loop vertex 7.386080e+000 1.952342e+001 -8.881784e-016 vertex 7.820200e+000 1.956140e+001 -8.881784e-016 vertex 7.820200e+000 1.956140e+001 4.399139e+000 endloop endfacet facet normal -8.715574e-002 -9.961947e-001 1.013479e-016 outer loop vertex 7.820200e+000 1.956140e+001 -8.881784e-016 vertex 8.254320e+000 1.952342e+001 -8.881784e-016 vertex 8.254320e+000 1.952342e+001 4.399139e+000 endloop endfacet facet normal -2.588190e-001 -9.659258e-001 3.547175e-016 outer loop vertex 8.254320e+000 1.952342e+001 -8.881784e-016 vertex 8.675250e+000 1.941063e+001 -8.881784e-016 vertex 8.675250e+000 1.941063e+001 4.399139e+000 endloop endfacet facet normal -4.226183e-001 -9.063078e-001 7.601089e-016 outer loop vertex 8.675250e+000 1.941063e+001 -8.881784e-016 vertex 9.070200e+000 1.922646e+001 -8.881784e-016 vertex 9.070200e+000 1.922646e+001 4.399139e+000 endloop endfacet facet normal -5.735764e-001 -8.191520e-001 2.678479e-016 outer loop vertex 9.070200e+000 1.922646e+001 -8.881784e-016 vertex 9.427169e+000 1.897651e+001 -8.881784e-016 vertex 9.427169e+000 1.897651e+001 4.399139e+000 endloop endfacet facet normal -7.071068e-001 -7.071068e-001 8.542176e-016 outer loop vertex 9.427169e+000 1.897651e+001 -8.881784e-016 vertex 9.735311e+000 1.866837e+001 -8.881784e-016 vertex 9.735311e+000 1.866837e+001 4.399139e+000 endloop endfacet facet normal -8.191520e-001 -5.735764e-001 8.614567e-016 outer loop vertex 9.735311e+000 1.866837e+001 -8.881784e-016 vertex 9.985264e+000 1.831140e+001 -8.881784e-016 vertex 9.985264e+000 1.831140e+001 4.399139e+000 endloop endfacet facet normal -9.063078e-001 -4.226183e-001 8.542176e-016 outer loop vertex 9.985264e+000 1.831140e+001 -8.881784e-016 vertex 1.016943e+001 1.791645e+001 -8.881784e-016 vertex 1.016943e+001 1.791645e+001 4.399139e+000 endloop endfacet facet normal 4.639778e-016 9.961947e-001 -8.715574e-002 outer loop vertex -1.798000e-001 -2.938600e+000 5.000000e+000 vertex -1.798000e-001 -2.893023e+000 5.520945e+000 vertex 1.482020e+001 -2.893023e+000 5.520945e+000 endloop endfacet facet normal -2.425509e-016 9.961947e-001 -8.715574e-002 outer loop vertex 1.482020e+001 -2.938600e+000 5.000000e+000 vertex -1.798000e-001 -2.938600e+000 5.000000e+000 vertex 1.482020e+001 -2.893023e+000 5.520945e+000 endloop endfacet facet normal 2.425509e-016 9.961947e-001 8.715574e-002 outer loop vertex 1.482020e+001 -2.938600e+000 5.000000e+000 vertex -1.798000e-001 -2.893023e+000 4.479055e+000 vertex -1.798000e-001 -2.938600e+000 5.000000e+000 endloop endfacet facet normal -4.635355e-016 9.961947e-001 8.715574e-002 outer loop vertex 1.482020e+001 -2.938600e+000 5.000000e+000 vertex 1.482020e+001 -2.893023e+000 4.479055e+000 vertex -1.798000e-001 -2.893023e+000 4.479055e+000 endloop endfacet facet normal 5.101317e-016 9.659258e-001 2.588190e-001 outer loop vertex -1.798000e-001 -2.893023e+000 4.479055e+000 vertex 1.482020e+001 -2.893023e+000 4.479055e+000 vertex -1.798000e-001 -2.757678e+000 3.973940e+000 endloop endfacet facet normal -5.234721e-016 9.659258e-001 2.588190e-001 outer loop vertex -1.798000e-001 -2.757678e+000 3.973940e+000 vertex 1.482020e+001 -2.893023e+000 4.479055e+000 vertex 1.482020e+001 -2.757678e+000 3.973940e+000 endloop endfacet facet normal -4.809511e-016 9.063078e-001 4.226183e-001 outer loop vertex -1.798000e-001 -2.536676e+000 3.500000e+000 vertex 1.482020e+001 -2.757678e+000 3.973940e+000 vertex 1.482020e+001 -2.536676e+000 3.500000e+000 endloop endfacet facet normal -5.134128e-016 8.191520e-001 5.735764e-001 outer loop vertex -1.798000e-001 -2.236733e+000 3.071637e+000 vertex 1.482020e+001 -2.536676e+000 3.500000e+000 vertex 1.482020e+001 -2.236733e+000 3.071637e+000 endloop endfacet facet normal -5.024296e-016 7.071068e-001 7.071068e-001 outer loop vertex -1.798000e-001 -1.866963e+000 2.701867e+000 vertex 1.482020e+001 -2.236733e+000 3.071637e+000 vertex 1.482020e+001 -1.866963e+000 2.701867e+000 endloop endfacet facet normal -4.870609e-016 5.735764e-001 8.191520e-001 outer loop vertex -1.798000e-001 -1.438600e+000 2.401924e+000 vertex 1.482020e+001 -1.866963e+000 2.701867e+000 vertex 1.482020e+001 -1.438600e+000 2.401924e+000 endloop endfacet facet normal -4.973720e-016 4.226183e-001 9.063078e-001 outer loop vertex -1.798000e-001 -9.646604e-001 2.180922e+000 vertex 1.482020e+001 -1.438600e+000 2.401924e+000 vertex 1.482020e+001 -9.646604e-001 2.180922e+000 endloop endfacet facet normal -4.930284e-016 2.588190e-001 9.659258e-001 outer loop vertex -1.798000e-001 -4.595445e-001 2.045577e+000 vertex 1.482020e+001 -9.646604e-001 2.180922e+000 vertex 1.482020e+001 -4.595445e-001 2.045577e+000 endloop endfacet facet normal -4.799411e-016 8.715574e-002 9.961947e-001 outer loop vertex -1.798000e-001 6.140000e-002 2.000000e+000 vertex 1.482020e+001 -4.595445e-001 2.045577e+000 vertex 1.482020e+001 6.140000e-002 2.000000e+000 endloop endfacet facet normal -4.933374e-016 -8.715574e-002 9.961947e-001 outer loop vertex -1.798000e-001 5.823445e-001 2.045577e+000 vertex 1.482020e+001 6.140000e-002 2.000000e+000 vertex 1.482020e+001 5.823445e-001 2.045577e+000 endloop endfacet facet normal -4.872123e-016 -2.588190e-001 9.659258e-001 outer loop vertex -1.798000e-001 1.087460e+000 2.180922e+000 vertex 1.482020e+001 5.823445e-001 2.045577e+000 vertex 1.482020e+001 1.087460e+000 2.180922e+000 endloop endfacet facet normal -4.809511e-016 -4.226183e-001 9.063078e-001 outer loop vertex -1.798000e-001 1.561400e+000 2.401924e+000 vertex 1.482020e+001 1.087460e+000 2.180922e+000 vertex 1.482020e+001 1.561400e+000 2.401924e+000 endloop endfacet facet normal -5.049222e-016 -5.735764e-001 8.191520e-001 outer loop vertex -1.798000e-001 1.989763e+000 2.701867e+000 vertex 1.482020e+001 1.561400e+000 2.401924e+000 vertex 1.482020e+001 1.989763e+000 2.701867e+000 endloop endfacet facet normal -4.605605e-016 -7.071068e-001 7.071068e-001 outer loop vertex -1.798000e-001 2.359533e+000 3.071637e+000 vertex 1.482020e+001 1.989763e+000 2.701867e+000 vertex 1.482020e+001 2.359533e+000 3.071637e+000 endloop endfacet facet normal -4.955515e-016 -8.191520e-001 5.735764e-001 outer loop vertex -1.798000e-001 2.659476e+000 3.500000e+000 vertex 1.482020e+001 2.359533e+000 3.071637e+000 vertex 1.482020e+001 2.659476e+000 3.500000e+000 endloop endfacet facet normal -4.562199e-016 -9.063078e-001 4.226183e-001 outer loop vertex -1.798000e-001 2.880478e+000 3.973940e+000 vertex 1.482020e+001 2.659476e+000 3.500000e+000 vertex 1.482020e+001 2.880478e+000 3.973940e+000 endloop endfacet facet normal -4.815345e-016 -9.659258e-001 2.588190e-001 outer loop vertex -1.798000e-001 3.015823e+000 4.479055e+000 vertex 1.482020e+001 2.880478e+000 3.973940e+000 vertex 1.482020e+001 3.015823e+000 4.479055e+000 endloop endfacet facet normal -4.851017e-016 -9.961947e-001 8.715574e-002 outer loop vertex -1.798000e-001 3.061400e+000 5.000000e+000 vertex 1.482020e+001 3.015823e+000 4.479055e+000 vertex 1.482020e+001 3.061400e+000 5.000000e+000 endloop endfacet facet normal -4.933374e-016 -9.961947e-001 -8.715574e-002 outer loop vertex -1.798000e-001 3.015823e+000 5.520945e+000 vertex 1.482020e+001 3.061400e+000 5.000000e+000 vertex 1.482020e+001 3.015823e+000 5.520945e+000 endloop endfacet facet normal -5.234721e-016 -9.659258e-001 -2.588190e-001 outer loop vertex -1.798000e-001 2.880478e+000 6.026060e+000 vertex 1.482020e+001 3.015823e+000 5.520945e+000 vertex 1.482020e+001 2.880478e+000 6.026060e+000 endloop endfacet facet normal -4.684391e-016 -9.063078e-001 -4.226183e-001 outer loop vertex -1.798000e-001 2.659476e+000 6.500000e+000 vertex 1.482020e+001 2.880478e+000 6.026060e+000 vertex 1.482020e+001 2.659476e+000 6.500000e+000 endloop endfacet facet normal -5.134128e-016 -8.191520e-001 -5.735764e-001 outer loop vertex -1.798000e-001 2.359533e+000 6.928363e+000 vertex 1.482020e+001 2.659476e+000 6.500000e+000 vertex 1.482020e+001 2.359533e+000 6.928363e+000 endloop endfacet facet normal -5.128969e-016 -7.071068e-001 -7.071068e-001 outer loop vertex -1.798000e-001 1.989763e+000 7.298133e+000 vertex 1.482020e+001 2.359533e+000 6.928363e+000 vertex 1.482020e+001 1.989763e+000 7.298133e+000 endloop endfacet facet normal -4.543185e-016 -5.735764e-001 -8.191520e-001 outer loop vertex -1.798000e-001 1.561400e+000 7.598076e+000 vertex 1.482020e+001 1.989763e+000 7.298133e+000 vertex 1.482020e+001 1.561400e+000 7.598076e+000 endloop endfacet facet normal -5.223961e-016 -4.226183e-001 -9.063078e-001 outer loop vertex -1.798000e-001 1.087460e+000 7.819078e+000 vertex 1.482020e+001 1.561400e+000 7.598076e+000 vertex 1.482020e+001 1.087460e+000 7.819078e+000 endloop endfacet facet normal -4.529374e-016 -2.588190e-001 -9.659258e-001 outer loop vertex -1.798000e-001 5.823445e-001 7.954423e+000 vertex 1.482020e+001 1.087460e+000 7.819078e+000 vertex 1.482020e+001 5.823445e-001 7.954423e+000 endloop endfacet facet normal -4.799411e-016 -8.715574e-002 -9.961947e-001 outer loop vertex -1.798000e-001 6.140000e-002 8.000000e+000 vertex 1.482020e+001 5.823445e-001 7.954423e+000 vertex 1.482020e+001 6.140000e-002 8.000000e+000 endloop endfacet facet normal -5.189602e-016 8.715574e-002 -9.961947e-001 outer loop vertex -1.798000e-001 -4.595445e-001 7.954423e+000 vertex 1.482020e+001 6.140000e-002 8.000000e+000 vertex 1.482020e+001 -4.595445e-001 7.954423e+000 endloop endfacet facet normal -4.739404e-016 2.588190e-001 -9.659258e-001 outer loop vertex -1.798000e-001 -9.646604e-001 7.819078e+000 vertex 1.482020e+001 -4.595445e-001 7.954423e+000 vertex 1.482020e+001 -9.646604e-001 7.819078e+000 endloop endfacet facet normal -5.015272e-016 4.226183e-001 -9.063078e-001 outer loop vertex -1.798000e-001 -1.438600e+000 7.598076e+000 vertex 1.482020e+001 -9.646604e-001 7.819078e+000 vertex 1.482020e+001 -1.438600e+000 7.598076e+000 endloop endfacet facet normal -4.479280e-016 5.735764e-001 -8.191520e-001 outer loop vertex -1.798000e-001 -1.866963e+000 7.298133e+000 vertex 1.482020e+001 -1.438600e+000 7.598076e+000 vertex 1.482020e+001 -1.866963e+000 7.298133e+000 endloop endfacet facet normal -4.605605e-016 7.071068e-001 -7.071068e-001 outer loop vertex -1.798000e-001 -2.236733e+000 6.928363e+000 vertex 1.482020e+001 -1.866963e+000 7.298133e+000 vertex 1.482020e+001 -2.236733e+000 6.928363e+000 endloop endfacet facet normal -4.955515e-016 8.191520e-001 -5.735764e-001 outer loop vertex -1.798000e-001 -2.536676e+000 6.500000e+000 vertex 1.482020e+001 -2.236733e+000 6.928363e+000 vertex 1.482020e+001 -2.536676e+000 6.500000e+000 endloop endfacet facet normal -4.562199e-016 9.063078e-001 -4.226183e-001 outer loop vertex -1.798000e-001 -2.757678e+000 6.026060e+000 vertex 1.482020e+001 -2.536676e+000 6.500000e+000 vertex 1.482020e+001 -2.757678e+000 6.026060e+000 endloop endfacet facet normal -5.101317e-016 9.659258e-001 -2.588190e-001 outer loop vertex -1.798000e-001 -2.893023e+000 5.520945e+000 vertex 1.482020e+001 -2.757678e+000 6.026060e+000 vertex 1.482020e+001 -2.893023e+000 5.520945e+000 endloop endfacet facet normal 5.236890e-016 9.659258e-001 -2.588190e-001 outer loop vertex -1.798000e-001 -2.893023e+000 5.520945e+000 vertex -1.798000e-001 -2.757678e+000 6.026060e+000 vertex 1.482020e+001 -2.757678e+000 6.026060e+000 endloop endfacet facet normal 4.688432e-016 9.063078e-001 -4.226183e-001 outer loop vertex -1.798000e-001 -2.757678e+000 6.026060e+000 vertex -1.798000e-001 -2.536676e+000 6.500000e+000 vertex 1.482020e+001 -2.536676e+000 6.500000e+000 endloop endfacet facet normal 5.130737e-016 8.191520e-001 -5.735764e-001 outer loop vertex -1.798000e-001 -2.536676e+000 6.500000e+000 vertex -1.798000e-001 -2.236733e+000 6.928363e+000 vertex 1.482020e+001 -2.236733e+000 6.928363e+000 endloop endfacet facet normal 5.236890e-016 7.071068e-001 -7.071068e-001 outer loop vertex -1.798000e-001 -2.236733e+000 6.928363e+000 vertex -1.798000e-001 -1.866963e+000 7.298133e+000 vertex 1.482020e+001 -1.866963e+000 7.298133e+000 endloop endfacet facet normal 4.635355e-016 5.735764e-001 -8.191520e-001 outer loop vertex -1.798000e-001 -1.866963e+000 7.298133e+000 vertex -1.798000e-001 -1.438600e+000 7.598076e+000 vertex 1.482020e+001 -1.438600e+000 7.598076e+000 endloop endfacet facet normal 4.971507e-016 4.226183e-001 -9.063078e-001 outer loop vertex -1.798000e-001 -1.438600e+000 7.598076e+000 vertex -1.798000e-001 -9.646604e-001 7.819078e+000 vertex 1.482020e+001 -9.646604e-001 7.819078e+000 endloop endfacet facet normal 4.635355e-016 2.588190e-001 -9.659258e-001 outer loop vertex -1.798000e-001 -9.646604e-001 7.819078e+000 vertex -1.798000e-001 -4.595445e-001 7.954423e+000 vertex 1.482020e+001 -4.595445e-001 7.954423e+000 endloop endfacet facet normal 4.799008e-016 8.715574e-002 -9.961947e-001 outer loop vertex -1.798000e-001 -4.595445e-001 7.954423e+000 vertex -1.798000e-001 6.140000e-002 8.000000e+000 vertex 1.482020e+001 6.140000e-002 8.000000e+000 endloop endfacet facet normal 5.228044e-016 -8.715574e-002 -9.961947e-001 outer loop vertex -1.798000e-001 6.140000e-002 8.000000e+000 vertex -1.798000e-001 5.823445e-001 7.954423e+000 vertex 1.482020e+001 5.823445e-001 7.954423e+000 endloop endfacet facet normal 4.582279e-016 -2.588190e-001 -9.659258e-001 outer loop vertex -1.798000e-001 5.823445e-001 7.954423e+000 vertex -1.798000e-001 1.087460e+000 7.819078e+000 vertex 1.482020e+001 1.087460e+000 7.819078e+000 endloop endfacet facet normal 5.077660e-016 -4.226183e-001 -9.063078e-001 outer loop vertex -1.798000e-001 1.087460e+000 7.819078e+000 vertex -1.798000e-001 1.561400e+000 7.598076e+000 vertex 1.482020e+001 1.561400e+000 7.598076e+000 endloop endfacet facet normal 4.564586e-016 -5.735764e-001 -8.191520e-001 outer loop vertex -1.798000e-001 1.561400e+000 7.598076e+000 vertex -1.798000e-001 1.989763e+000 7.298133e+000 vertex 1.482020e+001 1.989763e+000 7.298133e+000 endloop endfacet facet normal 4.599971e-016 -7.071068e-001 -7.071068e-001 outer loop vertex -1.798000e-001 1.989763e+000 7.298133e+000 vertex -1.798000e-001 2.359533e+000 6.928363e+000 vertex 1.482020e+001 2.359533e+000 6.928363e+000 endloop endfacet facet normal 4.953815e-016 -8.191520e-001 -5.735764e-001 outer loop vertex -1.798000e-001 2.359533e+000 6.928363e+000 vertex -1.798000e-001 2.659476e+000 6.500000e+000 vertex 1.482020e+001 2.659476e+000 6.500000e+000 endloop endfacet facet normal 4.564586e-016 -9.063078e-001 -4.226183e-001 outer loop vertex -1.798000e-001 2.659476e+000 6.500000e+000 vertex -1.798000e-001 2.880478e+000 6.026060e+000 vertex 1.482020e+001 2.880478e+000 6.026060e+000 endloop endfacet facet normal 4.829969e-016 -9.659258e-001 -2.588190e-001 outer loop vertex -1.798000e-001 2.880478e+000 6.026060e+000 vertex -1.798000e-001 3.015823e+000 5.520945e+000 vertex 1.482020e+001 3.015823e+000 5.520945e+000 endloop endfacet facet normal 4.852085e-016 -9.961947e-001 -8.715574e-002 outer loop vertex -1.798000e-001 3.015823e+000 5.520945e+000 vertex -1.798000e-001 3.061400e+000 5.000000e+000 vertex 1.482020e+001 3.061400e+000 5.000000e+000 endloop endfacet facet normal 4.936122e-016 -9.961947e-001 8.715574e-002 outer loop vertex -1.798000e-001 3.061400e+000 5.000000e+000 vertex -1.798000e-001 3.015823e+000 4.479055e+000 vertex 1.482020e+001 3.015823e+000 4.479055e+000 endloop endfacet facet normal 5.236890e-016 -9.659258e-001 2.588190e-001 outer loop vertex -1.798000e-001 3.015823e+000 4.479055e+000 vertex -1.798000e-001 2.880478e+000 3.973940e+000 vertex 1.482020e+001 2.880478e+000 3.973940e+000 endloop endfacet facet normal 4.670740e-016 -9.063078e-001 4.226183e-001 outer loop vertex -1.798000e-001 2.880478e+000 3.973940e+000 vertex -1.798000e-001 2.659476e+000 3.500000e+000 vertex 1.482020e+001 2.659476e+000 3.500000e+000 endloop endfacet facet normal 5.130737e-016 -8.191520e-001 5.735764e-001 outer loop vertex -1.798000e-001 2.659476e+000 3.500000e+000 vertex -1.798000e-001 2.359533e+000 3.071637e+000 vertex 1.482020e+001 2.359533e+000 3.071637e+000 endloop endfacet facet normal 4.706124e-016 -7.071068e-001 7.071068e-001 outer loop vertex -1.798000e-001 2.359533e+000 3.071637e+000 vertex -1.798000e-001 1.989763e+000 2.701867e+000 vertex 1.482020e+001 1.989763e+000 2.701867e+000 endloop endfacet facet normal 4.776893e-016 -5.735764e-001 8.191520e-001 outer loop vertex -1.798000e-001 1.989763e+000 2.701867e+000 vertex -1.798000e-001 1.561400e+000 2.401924e+000 vertex 1.482020e+001 1.561400e+000 2.401924e+000 endloop endfacet facet normal 4.953815e-016 -4.226183e-001 9.063078e-001 outer loop vertex -1.798000e-001 1.561400e+000 2.401924e+000 vertex -1.798000e-001 1.087460e+000 2.180922e+000 vertex 1.482020e+001 1.087460e+000 2.180922e+000 endloop endfacet facet normal 4.812277e-016 -2.588190e-001 9.659258e-001 outer loop vertex -1.798000e-001 1.087460e+000 2.180922e+000 vertex -1.798000e-001 5.823445e-001 2.045577e+000 vertex 1.482020e+001 5.823445e-001 2.045577e+000 endloop endfacet facet normal 4.799008e-016 -8.715574e-002 9.961947e-001 outer loop vertex -1.798000e-001 5.823445e-001 2.045577e+000 vertex -1.798000e-001 6.140000e-002 2.000000e+000 vertex 1.482020e+001 6.140000e-002 2.000000e+000 endloop endfacet facet normal 4.891892e-016 8.715574e-002 9.961947e-001 outer loop vertex -1.798000e-001 6.140000e-002 2.000000e+000 vertex -1.798000e-001 -4.595445e-001 2.045577e+000 vertex 1.482020e+001 -4.595445e-001 2.045577e+000 endloop endfacet facet normal 4.741508e-016 2.588190e-001 9.659258e-001 outer loop vertex -1.798000e-001 -4.595445e-001 2.045577e+000 vertex -1.798000e-001 -9.646604e-001 2.180922e+000 vertex 1.482020e+001 -9.646604e-001 2.180922e+000 endloop endfacet facet normal 4.759201e-016 4.226183e-001 9.063078e-001 outer loop vertex -1.798000e-001 -9.646604e-001 2.180922e+000 vertex -1.798000e-001 -1.438600e+000 2.401924e+000 vertex 1.482020e+001 -1.438600e+000 2.401924e+000 endloop endfacet facet normal 4.706124e-016 5.735764e-001 8.191520e-001 outer loop vertex -1.798000e-001 -1.438600e+000 2.401924e+000 vertex -1.798000e-001 -1.866963e+000 2.701867e+000 vertex 1.482020e+001 -1.866963e+000 2.701867e+000 endloop endfacet facet normal 4.599971e-016 7.071068e-001 7.071068e-001 outer loop vertex -1.798000e-001 -1.866963e+000 2.701867e+000 vertex -1.798000e-001 -2.236733e+000 3.071637e+000 vertex 1.482020e+001 -2.236733e+000 3.071637e+000 endloop endfacet facet normal 4.812277e-016 8.191520e-001 5.735764e-001 outer loop vertex -1.798000e-001 -2.236733e+000 3.071637e+000 vertex -1.798000e-001 -2.536676e+000 3.500000e+000 vertex 1.482020e+001 -2.536676e+000 3.500000e+000 endloop endfacet facet normal 4.546894e-016 9.063078e-001 4.226183e-001 outer loop vertex -1.798000e-001 -2.536676e+000 3.500000e+000 vertex -1.798000e-001 -2.757678e+000 3.973940e+000 vertex 1.482020e+001 -2.757678e+000 3.973940e+000 endloop endfacet facet normal 4.639778e-016 9.961947e-001 -8.715574e-002 outer loop vertex 3.482020e+001 -2.938600e+000 5.000000e+000 vertex 3.482020e+001 -2.893023e+000 5.520945e+000 vertex 4.982020e+001 -2.893023e+000 5.520945e+000 endloop endfacet facet normal -2.425509e-016 9.961947e-001 -8.715574e-002 outer loop vertex 4.982020e+001 -2.938600e+000 5.000000e+000 vertex 3.482020e+001 -2.938600e+000 5.000000e+000 vertex 4.982020e+001 -2.893023e+000 5.520945e+000 endloop endfacet facet normal 2.425509e-016 9.961947e-001 8.715574e-002 outer loop vertex 4.982020e+001 -2.938600e+000 5.000000e+000 vertex 3.482020e+001 -2.893023e+000 4.479055e+000 vertex 3.482020e+001 -2.938600e+000 5.000000e+000 endloop endfacet facet normal -4.635355e-016 9.961947e-001 8.715574e-002 outer loop vertex 4.982020e+001 -2.938600e+000 5.000000e+000 vertex 4.982020e+001 -2.893023e+000 4.479055e+000 vertex 3.482020e+001 -2.893023e+000 4.479055e+000 endloop endfacet facet normal 5.101317e-016 9.659258e-001 2.588190e-001 outer loop vertex 3.482020e+001 -2.893023e+000 4.479055e+000 vertex 4.982020e+001 -2.893023e+000 4.479055e+000 vertex 3.482020e+001 -2.757678e+000 3.973940e+000 endloop endfacet facet normal -5.234721e-016 9.659258e-001 2.588190e-001 outer loop vertex 3.482020e+001 -2.757678e+000 3.973940e+000 vertex 4.982020e+001 -2.893023e+000 4.479055e+000 vertex 4.982020e+001 -2.757678e+000 3.973940e+000 endloop endfacet facet normal -4.809511e-016 9.063078e-001 4.226183e-001 outer loop vertex 3.482020e+001 -2.536676e+000 3.500000e+000 vertex 4.982020e+001 -2.757678e+000 3.973940e+000 vertex 4.982020e+001 -2.536676e+000 3.500000e+000 endloop endfacet facet normal -5.134128e-016 8.191520e-001 5.735764e-001 outer loop vertex 3.482020e+001 -2.236733e+000 3.071637e+000 vertex 4.982020e+001 -2.536676e+000 3.500000e+000 vertex 4.982020e+001 -2.236733e+000 3.071637e+000 endloop endfacet facet normal -5.024296e-016 7.071068e-001 7.071068e-001 outer loop vertex 3.482020e+001 -1.866963e+000 2.701867e+000 vertex 4.982020e+001 -2.236733e+000 3.071637e+000 vertex 4.982020e+001 -1.866963e+000 2.701867e+000 endloop endfacet facet normal -4.870609e-016 5.735764e-001 8.191520e-001 outer loop vertex 3.482020e+001 -1.438600e+000 2.401924e+000 vertex 4.982020e+001 -1.866963e+000 2.701867e+000 vertex 4.982020e+001 -1.438600e+000 2.401924e+000 endloop endfacet facet normal -4.973720e-016 4.226183e-001 9.063078e-001 outer loop vertex 3.482020e+001 -9.646604e-001 2.180922e+000 vertex 4.982020e+001 -1.438600e+000 2.401924e+000 vertex 4.982020e+001 -9.646604e-001 2.180922e+000 endloop endfacet facet normal -4.930284e-016 2.588190e-001 9.659258e-001 outer loop vertex 3.482020e+001 -4.595445e-001 2.045577e+000 vertex 4.982020e+001 -9.646604e-001 2.180922e+000 vertex 4.982020e+001 -4.595445e-001 2.045577e+000 endloop endfacet facet normal -4.799411e-016 8.715574e-002 9.961947e-001 outer loop vertex 3.482020e+001 6.140000e-002 2.000000e+000 vertex 4.982020e+001 -4.595445e-001 2.045577e+000 vertex 4.982020e+001 6.140000e-002 2.000000e+000 endloop endfacet facet normal -4.933374e-016 -8.715574e-002 9.961947e-001 outer loop vertex 3.482020e+001 5.823445e-001 2.045577e+000 vertex 4.982020e+001 6.140000e-002 2.000000e+000 vertex 4.982020e+001 5.823445e-001 2.045577e+000 endloop endfacet facet normal -4.872123e-016 -2.588190e-001 9.659258e-001 outer loop vertex 3.482020e+001 1.087460e+000 2.180922e+000 vertex 4.982020e+001 5.823445e-001 2.045577e+000 vertex 4.982020e+001 1.087460e+000 2.180922e+000 endloop endfacet facet normal -4.809511e-016 -4.226183e-001 9.063078e-001 outer loop vertex 3.482020e+001 1.561400e+000 2.401924e+000 vertex 4.982020e+001 1.087460e+000 2.180922e+000 vertex 4.982020e+001 1.561400e+000 2.401924e+000 endloop endfacet facet normal -5.049222e-016 -5.735764e-001 8.191520e-001 outer loop vertex 3.482020e+001 1.989763e+000 2.701867e+000 vertex 4.982020e+001 1.561400e+000 2.401924e+000 vertex 4.982020e+001 1.989763e+000 2.701867e+000 endloop endfacet facet normal -4.605605e-016 -7.071068e-001 7.071068e-001 outer loop vertex 3.482020e+001 2.359533e+000 3.071637e+000 vertex 4.982020e+001 1.989763e+000 2.701867e+000 vertex 4.982020e+001 2.359533e+000 3.071637e+000 endloop endfacet facet normal -4.955515e-016 -8.191520e-001 5.735764e-001 outer loop vertex 3.482020e+001 2.659476e+000 3.500000e+000 vertex 4.982020e+001 2.359533e+000 3.071637e+000 vertex 4.982020e+001 2.659476e+000 3.500000e+000 endloop endfacet facet normal -4.562199e-016 -9.063078e-001 4.226183e-001 outer loop vertex 3.482020e+001 2.880478e+000 3.973940e+000 vertex 4.982020e+001 2.659476e+000 3.500000e+000 vertex 4.982020e+001 2.880478e+000 3.973940e+000 endloop endfacet facet normal -4.815345e-016 -9.659258e-001 2.588190e-001 outer loop vertex 3.482020e+001 3.015823e+000 4.479055e+000 vertex 4.982020e+001 2.880478e+000 3.973940e+000 vertex 4.982020e+001 3.015823e+000 4.479055e+000 endloop endfacet facet normal -4.851017e-016 -9.961947e-001 8.715574e-002 outer loop vertex 3.482020e+001 3.061400e+000 5.000000e+000 vertex 4.982020e+001 3.015823e+000 4.479055e+000 vertex 4.982020e+001 3.061400e+000 5.000000e+000 endloop endfacet facet normal -4.933374e-016 -9.961947e-001 -8.715574e-002 outer loop vertex 3.482020e+001 3.015823e+000 5.520945e+000 vertex 4.982020e+001 3.061400e+000 5.000000e+000 vertex 4.982020e+001 3.015823e+000 5.520945e+000 endloop endfacet facet normal -5.234721e-016 -9.659258e-001 -2.588190e-001 outer loop vertex 3.482020e+001 2.880478e+000 6.026060e+000 vertex 4.982020e+001 3.015823e+000 5.520945e+000 vertex 4.982020e+001 2.880478e+000 6.026060e+000 endloop endfacet facet normal -4.684391e-016 -9.063078e-001 -4.226183e-001 outer loop vertex 3.482020e+001 2.659476e+000 6.500000e+000 vertex 4.982020e+001 2.880478e+000 6.026060e+000 vertex 4.982020e+001 2.659476e+000 6.500000e+000 endloop endfacet facet normal -5.134128e-016 -8.191520e-001 -5.735764e-001 outer loop vertex 3.482020e+001 2.359533e+000 6.928363e+000 vertex 4.982020e+001 2.659476e+000 6.500000e+000 vertex 4.982020e+001 2.359533e+000 6.928363e+000 endloop endfacet facet normal -5.128969e-016 -7.071068e-001 -7.071068e-001 outer loop vertex 3.482020e+001 1.989763e+000 7.298133e+000 vertex 4.982020e+001 2.359533e+000 6.928363e+000 vertex 4.982020e+001 1.989763e+000 7.298133e+000 endloop endfacet facet normal -4.543185e-016 -5.735764e-001 -8.191520e-001 outer loop vertex 3.482020e+001 1.561400e+000 7.598076e+000 vertex 4.982020e+001 1.989763e+000 7.298133e+000 vertex 4.982020e+001 1.561400e+000 7.598076e+000 endloop endfacet facet normal -5.223961e-016 -4.226183e-001 -9.063078e-001 outer loop vertex 3.482020e+001 1.087460e+000 7.819078e+000 vertex 4.982020e+001 1.561400e+000 7.598076e+000 vertex 4.982020e+001 1.087460e+000 7.819078e+000 endloop endfacet facet normal -4.529374e-016 -2.588190e-001 -9.659258e-001 outer loop vertex 3.482020e+001 5.823445e-001 7.954423e+000 vertex 4.982020e+001 1.087460e+000 7.819078e+000 vertex 4.982020e+001 5.823445e-001 7.954423e+000 endloop endfacet facet normal -4.799411e-016 -8.715574e-002 -9.961947e-001 outer loop vertex 3.482020e+001 6.140000e-002 8.000000e+000 vertex 4.982020e+001 5.823445e-001 7.954423e+000 vertex 4.982020e+001 6.140000e-002 8.000000e+000 endloop endfacet facet normal -5.189602e-016 8.715574e-002 -9.961947e-001 outer loop vertex 3.482020e+001 -4.595445e-001 7.954423e+000 vertex 4.982020e+001 6.140000e-002 8.000000e+000 vertex 4.982020e+001 -4.595445e-001 7.954423e+000 endloop endfacet facet normal -4.739404e-016 2.588190e-001 -9.659258e-001 outer loop vertex 3.482020e+001 -9.646604e-001 7.819078e+000 vertex 4.982020e+001 -4.595445e-001 7.954423e+000 vertex 4.982020e+001 -9.646604e-001 7.819078e+000 endloop endfacet facet normal -5.015272e-016 4.226183e-001 -9.063078e-001 outer loop vertex 3.482020e+001 -1.438600e+000 7.598076e+000 vertex 4.982020e+001 -9.646604e-001 7.819078e+000 vertex 4.982020e+001 -1.438600e+000 7.598076e+000 endloop endfacet facet normal -4.479280e-016 5.735764e-001 -8.191520e-001 outer loop vertex 3.482020e+001 -1.866963e+000 7.298133e+000 vertex 4.982020e+001 -1.438600e+000 7.598076e+000 vertex 4.982020e+001 -1.866963e+000 7.298133e+000 endloop endfacet facet normal -4.605605e-016 7.071068e-001 -7.071068e-001 outer loop vertex 3.482020e+001 -2.236733e+000 6.928363e+000 vertex 4.982020e+001 -1.866963e+000 7.298133e+000 vertex 4.982020e+001 -2.236733e+000 6.928363e+000 endloop endfacet facet normal -4.955515e-016 8.191520e-001 -5.735764e-001 outer loop vertex 3.482020e+001 -2.536676e+000 6.500000e+000 vertex 4.982020e+001 -2.236733e+000 6.928363e+000 vertex 4.982020e+001 -2.536676e+000 6.500000e+000 endloop endfacet facet normal -4.562199e-016 9.063078e-001 -4.226183e-001 outer loop vertex 3.482020e+001 -2.757678e+000 6.026060e+000 vertex 4.982020e+001 -2.536676e+000 6.500000e+000 vertex 4.982020e+001 -2.757678e+000 6.026060e+000 endloop endfacet facet normal -5.101317e-016 9.659258e-001 -2.588190e-001 outer loop vertex 3.482020e+001 -2.893023e+000 5.520945e+000 vertex 4.982020e+001 -2.757678e+000 6.026060e+000 vertex 4.982020e+001 -2.893023e+000 5.520945e+000 endloop endfacet facet normal 5.236890e-016 9.659258e-001 -2.588190e-001 outer loop vertex 3.482020e+001 -2.893023e+000 5.520945e+000 vertex 3.482020e+001 -2.757678e+000 6.026060e+000 vertex 4.982020e+001 -2.757678e+000 6.026060e+000 endloop endfacet facet normal 4.688432e-016 9.063078e-001 -4.226183e-001 outer loop vertex 3.482020e+001 -2.757678e+000 6.026060e+000 vertex 3.482020e+001 -2.536676e+000 6.500000e+000 vertex 4.982020e+001 -2.536676e+000 6.500000e+000 endloop endfacet facet normal 5.130737e-016 8.191520e-001 -5.735764e-001 outer loop vertex 3.482020e+001 -2.536676e+000 6.500000e+000 vertex 3.482020e+001 -2.236733e+000 6.928363e+000 vertex 4.982020e+001 -2.236733e+000 6.928363e+000 endloop endfacet facet normal 5.236890e-016 7.071068e-001 -7.071068e-001 outer loop vertex 3.482020e+001 -2.236733e+000 6.928363e+000 vertex 3.482020e+001 -1.866963e+000 7.298133e+000 vertex 4.982020e+001 -1.866963e+000 7.298133e+000 endloop endfacet facet normal 4.635355e-016 5.735764e-001 -8.191520e-001 outer loop vertex 3.482020e+001 -1.866963e+000 7.298133e+000 vertex 3.482020e+001 -1.438600e+000 7.598076e+000 vertex 4.982020e+001 -1.438600e+000 7.598076e+000 endloop endfacet facet normal 4.971507e-016 4.226183e-001 -9.063078e-001 outer loop vertex 3.482020e+001 -1.438600e+000 7.598076e+000 vertex 3.482020e+001 -9.646604e-001 7.819078e+000 vertex 4.982020e+001 -9.646604e-001 7.819078e+000 endloop endfacet facet normal 4.635355e-016 2.588190e-001 -9.659258e-001 outer loop vertex 3.482020e+001 -9.646604e-001 7.819078e+000 vertex 3.482020e+001 -4.595445e-001 7.954423e+000 vertex 4.982020e+001 -4.595445e-001 7.954423e+000 endloop endfacet facet normal 4.799008e-016 8.715574e-002 -9.961947e-001 outer loop vertex 3.482020e+001 -4.595445e-001 7.954423e+000 vertex 3.482020e+001 6.140000e-002 8.000000e+000 vertex 4.982020e+001 6.140000e-002 8.000000e+000 endloop endfacet facet normal 5.228044e-016 -8.715574e-002 -9.961947e-001 outer loop vertex 3.482020e+001 6.140000e-002 8.000000e+000 vertex 3.482020e+001 5.823445e-001 7.954423e+000 vertex 4.982020e+001 5.823445e-001 7.954423e+000 endloop endfacet facet normal 4.582279e-016 -2.588190e-001 -9.659258e-001 outer loop vertex 3.482020e+001 5.823445e-001 7.954423e+000 vertex 3.482020e+001 1.087460e+000 7.819078e+000 vertex 4.982020e+001 1.087460e+000 7.819078e+000 endloop endfacet facet normal 5.077660e-016 -4.226183e-001 -9.063078e-001 outer loop vertex 3.482020e+001 1.087460e+000 7.819078e+000 vertex 3.482020e+001 1.561400e+000 7.598076e+000 vertex 4.982020e+001 1.561400e+000 7.598076e+000 endloop endfacet facet normal 4.564586e-016 -5.735764e-001 -8.191520e-001 outer loop vertex 3.482020e+001 1.561400e+000 7.598076e+000 vertex 3.482020e+001 1.989763e+000 7.298133e+000 vertex 4.982020e+001 1.989763e+000 7.298133e+000 endloop endfacet facet normal 4.599971e-016 -7.071068e-001 -7.071068e-001 outer loop vertex 3.482020e+001 1.989763e+000 7.298133e+000 vertex 3.482020e+001 2.359533e+000 6.928363e+000 vertex 4.982020e+001 2.359533e+000 6.928363e+000 endloop endfacet facet normal 4.953815e-016 -8.191520e-001 -5.735764e-001 outer loop vertex 3.482020e+001 2.359533e+000 6.928363e+000 vertex 3.482020e+001 2.659476e+000 6.500000e+000 vertex 4.982020e+001 2.659476e+000 6.500000e+000 endloop endfacet facet normal 4.564586e-016 -9.063078e-001 -4.226183e-001 outer loop vertex 3.482020e+001 2.659476e+000 6.500000e+000 vertex 3.482020e+001 2.880478e+000 6.026060e+000 vertex 4.982020e+001 2.880478e+000 6.026060e+000 endloop endfacet facet normal 4.829969e-016 -9.659258e-001 -2.588190e-001 outer loop vertex 3.482020e+001 2.880478e+000 6.026060e+000 vertex 3.482020e+001 3.015823e+000 5.520945e+000 vertex 4.982020e+001 3.015823e+000 5.520945e+000 endloop endfacet facet normal 4.852085e-016 -9.961947e-001 -8.715574e-002 outer loop vertex 3.482020e+001 3.015823e+000 5.520945e+000 vertex 3.482020e+001 3.061400e+000 5.000000e+000 vertex 4.982020e+001 3.061400e+000 5.000000e+000 endloop endfacet facet normal 4.936122e-016 -9.961947e-001 8.715574e-002 outer loop vertex 3.482020e+001 3.061400e+000 5.000000e+000 vertex 3.482020e+001 3.015823e+000 4.479055e+000 vertex 4.982020e+001 3.015823e+000 4.479055e+000 endloop endfacet facet normal 5.236890e-016 -9.659258e-001 2.588190e-001 outer loop vertex 3.482020e+001 3.015823e+000 4.479055e+000 vertex 3.482020e+001 2.880478e+000 3.973940e+000 vertex 4.982020e+001 2.880478e+000 3.973940e+000 endloop endfacet facet normal 4.670740e-016 -9.063078e-001 4.226183e-001 outer loop vertex 3.482020e+001 2.880478e+000 3.973940e+000 vertex 3.482020e+001 2.659476e+000 3.500000e+000 vertex 4.982020e+001 2.659476e+000 3.500000e+000 endloop endfacet facet normal 5.130737e-016 -8.191520e-001 5.735764e-001 outer loop vertex 3.482020e+001 2.659476e+000 3.500000e+000 vertex 3.482020e+001 2.359533e+000 3.071637e+000 vertex 4.982020e+001 2.359533e+000 3.071637e+000 endloop endfacet facet normal 4.706124e-016 -7.071068e-001 7.071068e-001 outer loop vertex 3.482020e+001 2.359533e+000 3.071637e+000 vertex 3.482020e+001 1.989763e+000 2.701867e+000 vertex 4.982020e+001 1.989763e+000 2.701867e+000 endloop endfacet facet normal 4.776893e-016 -5.735764e-001 8.191520e-001 outer loop vertex 3.482020e+001 1.989763e+000 2.701867e+000 vertex 3.482020e+001 1.561400e+000 2.401924e+000 vertex 4.982020e+001 1.561400e+000 2.401924e+000 endloop endfacet facet normal 4.953815e-016 -4.226183e-001 9.063078e-001 outer loop vertex 3.482020e+001 1.561400e+000 2.401924e+000 vertex 3.482020e+001 1.087460e+000 2.180922e+000 vertex 4.982020e+001 1.087460e+000 2.180922e+000 endloop endfacet facet normal 4.812277e-016 -2.588190e-001 9.659258e-001 outer loop vertex 3.482020e+001 1.087460e+000 2.180922e+000 vertex 3.482020e+001 5.823445e-001 2.045577e+000 vertex 4.982020e+001 5.823445e-001 2.045577e+000 endloop endfacet facet normal 4.799008e-016 -8.715574e-002 9.961947e-001 outer loop vertex 3.482020e+001 5.823445e-001 2.045577e+000 vertex 3.482020e+001 6.140000e-002 2.000000e+000 vertex 4.982020e+001 6.140000e-002 2.000000e+000 endloop endfacet facet normal 4.891892e-016 8.715574e-002 9.961947e-001 outer loop vertex 3.482020e+001 6.140000e-002 2.000000e+000 vertex 3.482020e+001 -4.595445e-001 2.045577e+000 vertex 4.982020e+001 -4.595445e-001 2.045577e+000 endloop endfacet facet normal 4.741508e-016 2.588190e-001 9.659258e-001 outer loop vertex 3.482020e+001 -4.595445e-001 2.045577e+000 vertex 3.482020e+001 -9.646604e-001 2.180922e+000 vertex 4.982020e+001 -9.646604e-001 2.180922e+000 endloop endfacet facet normal 4.759201e-016 4.226183e-001 9.063078e-001 outer loop vertex 3.482020e+001 -9.646604e-001 2.180922e+000 vertex 3.482020e+001 -1.438600e+000 2.401924e+000 vertex 4.982020e+001 -1.438600e+000 2.401924e+000 endloop endfacet facet normal 4.706124e-016 5.735764e-001 8.191520e-001 outer loop vertex 3.482020e+001 -1.438600e+000 2.401924e+000 vertex 3.482020e+001 -1.866963e+000 2.701867e+000 vertex 4.982020e+001 -1.866963e+000 2.701867e+000 endloop endfacet facet normal 4.599971e-016 7.071068e-001 7.071068e-001 outer loop vertex 3.482020e+001 -1.866963e+000 2.701867e+000 vertex 3.482020e+001 -2.236733e+000 3.071637e+000 vertex 4.982020e+001 -2.236733e+000 3.071637e+000 endloop endfacet facet normal 4.812277e-016 8.191520e-001 5.735764e-001 outer loop vertex 3.482020e+001 -2.236733e+000 3.071637e+000 vertex 3.482020e+001 -2.536676e+000 3.500000e+000 vertex 4.982020e+001 -2.536676e+000 3.500000e+000 endloop endfacet facet normal 4.546894e-016 9.063078e-001 4.226183e-001 outer loop vertex 3.482020e+001 -2.536676e+000 3.500000e+000 vertex 3.482020e+001 -2.757678e+000 3.973940e+000 vertex 4.982020e+001 -2.757678e+000 3.973940e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -2.893023e+000 4.479055e+000 vertex 3.482020e+001 -4.938600e+000 5.000000e+000 vertex 3.482020e+001 -2.938600e+000 5.000000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -2.893023e+000 4.479055e+000 vertex 3.482020e+001 -4.862639e+000 4.131759e+000 vertex 3.482020e+001 -4.938600e+000 5.000000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -2.893023e+000 4.479055e+000 vertex 3.482020e+001 -2.757678e+000 3.973940e+000 vertex 3.482020e+001 -4.862639e+000 4.131759e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -4.862639e+000 4.131759e+000 vertex 3.482020e+001 -2.757678e+000 3.973940e+000 vertex 3.482020e+001 -4.637063e+000 3.289899e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -4.637063e+000 3.289899e+000 vertex 3.482020e+001 -2.757678e+000 3.973940e+000 vertex 3.482020e+001 -2.536676e+000 3.500000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -4.268727e+000 2.500000e+000 vertex 3.482020e+001 -2.536676e+000 3.500000e+000 vertex 3.482020e+001 -2.236733e+000 3.071637e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -3.768822e+000 1.786062e+000 vertex 3.482020e+001 -2.236733e+000 3.071637e+000 vertex 3.482020e+001 -1.866963e+000 2.701867e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -3.152538e+000 1.169778e+000 vertex 3.482020e+001 -1.866963e+000 2.701867e+000 vertex 3.482020e+001 -2.438600e+000 6.698730e-001 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -3.152538e+000 1.169778e+000 vertex 3.482020e+001 -3.768822e+000 1.786062e+000 vertex 3.482020e+001 -1.866963e+000 2.701867e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -1.866963e+000 2.701867e+000 vertex 3.482020e+001 -1.438600e+000 2.401924e+000 vertex 3.482020e+001 -2.438600e+000 6.698730e-001 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -2.438600e+000 6.698730e-001 vertex 3.482020e+001 -1.438600e+000 2.401924e+000 vertex 3.482020e+001 -1.648701e+000 3.015369e-001 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -1.648701e+000 3.015369e-001 vertex 3.482020e+001 -1.438600e+000 2.401924e+000 vertex 3.482020e+001 -9.646604e-001 2.180922e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -8.068409e-001 7.596123e-002 vertex 3.482020e+001 -9.646604e-001 2.180922e+000 vertex 3.482020e+001 -4.595445e-001 2.045577e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 6.140000e-002 0.000000e+000 vertex 3.482020e+001 -4.595445e-001 2.045577e+000 vertex 3.482020e+001 6.140000e-002 2.000000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 5.823445e-001 2.045577e+000 vertex 3.482020e+001 6.140000e-002 0.000000e+000 vertex 3.482020e+001 6.140000e-002 2.000000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 5.823445e-001 2.045577e+000 vertex 3.482020e+001 1.087460e+000 2.180922e+000 vertex 3.482020e+001 6.140000e-002 0.000000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 6.140000e-002 0.000000e+000 vertex 3.482020e+001 1.087460e+000 2.180922e+000 vertex 3.482020e+001 3.378025e+000 0.000000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 3.378025e+000 0.000000e+000 vertex 3.482020e+001 1.087460e+000 2.180922e+000 vertex 3.482020e+001 1.561400e+000 2.401924e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 1.989763e+000 2.701867e+000 vertex 3.482020e+001 3.378025e+000 0.000000e+000 vertex 3.482020e+001 1.561400e+000 2.401924e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 1.989763e+000 2.701867e+000 vertex 3.482020e+001 4.150665e+000 6.093379e-001 vertex 3.482020e+001 3.378025e+000 0.000000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 1.989763e+000 2.701867e+000 vertex 3.482020e+001 2.359533e+000 3.071637e+000 vertex 3.482020e+001 4.150665e+000 6.093379e-001 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 4.150665e+000 6.093379e-001 vertex 3.482020e+001 2.359533e+000 3.071637e+000 vertex 3.482020e+001 4.813319e+000 1.336768e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 4.813319e+000 1.336768e+000 vertex 3.482020e+001 2.359533e+000 3.071637e+000 vertex 3.482020e+001 2.659476e+000 3.500000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 5.348164e+000 2.162726e+000 vertex 3.482020e+001 2.659476e+000 3.500000e+000 vertex 3.482020e+001 2.880478e+000 3.973940e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 5.740815e+000 3.064995e+000 vertex 3.482020e+001 2.880478e+000 3.973940e+000 vertex 3.482020e+001 3.015823e+000 4.479055e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 5.061400e+000 5.000000e+000 vertex 3.482020e+001 3.015823e+000 4.479055e+000 vertex 3.482020e+001 3.061400e+000 5.000000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 3.015823e+000 5.520945e+000 vertex 3.482020e+001 5.061400e+000 5.000000e+000 vertex 3.482020e+001 3.061400e+000 5.000000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 3.015823e+000 5.520945e+000 vertex 3.482020e+001 4.985439e+000 5.868241e+000 vertex 3.482020e+001 5.061400e+000 5.000000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 3.015823e+000 5.520945e+000 vertex 3.482020e+001 2.880478e+000 6.026060e+000 vertex 3.482020e+001 4.985439e+000 5.868241e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 4.985439e+000 5.868241e+000 vertex 3.482020e+001 2.880478e+000 6.026060e+000 vertex 3.482020e+001 4.759863e+000 6.710101e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 4.759863e+000 6.710101e+000 vertex 3.482020e+001 2.880478e+000 6.026060e+000 vertex 3.482020e+001 2.659476e+000 6.500000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 4.391527e+000 7.500000e+000 vertex 3.482020e+001 2.659476e+000 6.500000e+000 vertex 3.482020e+001 2.359533e+000 6.928363e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 3.891622e+000 8.213938e+000 vertex 3.482020e+001 2.359533e+000 6.928363e+000 vertex 3.482020e+001 1.989763e+000 7.298133e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 3.275338e+000 8.830222e+000 vertex 3.482020e+001 1.989763e+000 7.298133e+000 vertex 3.482020e+001 2.561400e+000 9.330127e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 3.275338e+000 8.830222e+000 vertex 3.482020e+001 3.891622e+000 8.213938e+000 vertex 3.482020e+001 1.989763e+000 7.298133e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 1.989763e+000 7.298133e+000 vertex 3.482020e+001 1.561400e+000 7.598076e+000 vertex 3.482020e+001 2.561400e+000 9.330127e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 2.561400e+000 9.330127e+000 vertex 3.482020e+001 1.561400e+000 7.598076e+000 vertex 3.482020e+001 1.771501e+000 9.698463e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 1.771501e+000 9.698463e+000 vertex 3.482020e+001 1.561400e+000 7.598076e+000 vertex 3.482020e+001 1.087460e+000 7.819078e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 9.296409e-001 9.924039e+000 vertex 3.482020e+001 1.087460e+000 7.819078e+000 vertex 3.482020e+001 5.823445e-001 7.954423e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 6.140000e-002 1.000000e+001 vertex 3.482020e+001 5.823445e-001 7.954423e+000 vertex 3.482020e+001 6.140000e-002 8.000000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -8.068409e-001 9.924039e+000 vertex 3.482020e+001 6.140000e-002 8.000000e+000 vertex 3.482020e+001 -4.595445e-001 7.954423e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -1.648701e+000 9.698463e+000 vertex 3.482020e+001 -4.595445e-001 7.954423e+000 vertex 3.482020e+001 -9.646604e-001 7.819078e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -2.438600e+000 9.330127e+000 vertex 3.482020e+001 -9.646604e-001 7.819078e+000 vertex 3.482020e+001 -1.438600e+000 7.598076e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -3.152538e+000 8.830222e+000 vertex 3.482020e+001 -1.438600e+000 7.598076e+000 vertex 3.482020e+001 -1.866963e+000 7.298133e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -2.236733e+000 6.928363e+000 vertex 3.482020e+001 -3.152538e+000 8.830222e+000 vertex 3.482020e+001 -1.866963e+000 7.298133e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -2.236733e+000 6.928363e+000 vertex 3.482020e+001 -3.768822e+000 8.213938e+000 vertex 3.482020e+001 -3.152538e+000 8.830222e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -2.236733e+000 6.928363e+000 vertex 3.482020e+001 -2.536676e+000 6.500000e+000 vertex 3.482020e+001 -3.768822e+000 8.213938e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -3.768822e+000 8.213938e+000 vertex 3.482020e+001 -2.536676e+000 6.500000e+000 vertex 3.482020e+001 -4.268727e+000 7.500000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -4.268727e+000 7.500000e+000 vertex 3.482020e+001 -2.536676e+000 6.500000e+000 vertex 3.482020e+001 -2.757678e+000 6.026060e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -4.637063e+000 6.710101e+000 vertex 3.482020e+001 -2.757678e+000 6.026060e+000 vertex 3.482020e+001 -2.893023e+000 5.520945e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -4.862639e+000 5.868241e+000 vertex 3.482020e+001 -2.893023e+000 5.520945e+000 vertex 3.482020e+001 -2.938600e+000 5.000000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -4.938600e+000 5.000000e+000 vertex 3.482020e+001 -4.862639e+000 5.868241e+000 vertex 3.482020e+001 -2.938600e+000 5.000000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 5.061400e+000 5.000000e+000 vertex 3.482020e+001 6.061400e+000 5.000000e+000 vertex 3.482020e+001 5.980711e+000 4.019309e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 5.740815e+000 3.064995e+000 vertex 3.482020e+001 5.061400e+000 5.000000e+000 vertex 3.482020e+001 5.980711e+000 4.019309e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 5.740815e+000 3.064995e+000 vertex 3.482020e+001 3.015823e+000 4.479055e+000 vertex 3.482020e+001 5.061400e+000 5.000000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 5.740815e+000 3.064995e+000 vertex 3.482020e+001 5.348164e+000 2.162726e+000 vertex 3.482020e+001 2.880478e+000 3.973940e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 5.348164e+000 2.162726e+000 vertex 3.482020e+001 4.813319e+000 1.336768e+000 vertex 3.482020e+001 2.659476e+000 3.500000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 6.140000e-002 0.000000e+000 vertex 3.482020e+001 -8.068409e-001 7.596123e-002 vertex 3.482020e+001 -4.595445e-001 2.045577e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -1.648701e+000 3.015369e-001 vertex 3.482020e+001 -9.646604e-001 2.180922e+000 vertex 3.482020e+001 -8.068409e-001 7.596123e-002 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -3.768822e+000 1.786062e+000 vertex 3.482020e+001 -4.268727e+000 2.500000e+000 vertex 3.482020e+001 -2.236733e+000 3.071637e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -4.268727e+000 2.500000e+000 vertex 3.482020e+001 -4.637063e+000 3.289899e+000 vertex 3.482020e+001 -2.536676e+000 3.500000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -4.862639e+000 5.868241e+000 vertex 3.482020e+001 -4.637063e+000 6.710101e+000 vertex 3.482020e+001 -2.893023e+000 5.520945e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -4.637063e+000 6.710101e+000 vertex 3.482020e+001 -4.268727e+000 7.500000e+000 vertex 3.482020e+001 -2.757678e+000 6.026060e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -3.152538e+000 8.830222e+000 vertex 3.482020e+001 -2.438600e+000 9.330127e+000 vertex 3.482020e+001 -1.438600e+000 7.598076e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -2.438600e+000 9.330127e+000 vertex 3.482020e+001 -1.648701e+000 9.698463e+000 vertex 3.482020e+001 -9.646604e-001 7.819078e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -1.648701e+000 9.698463e+000 vertex 3.482020e+001 -8.068409e-001 9.924039e+000 vertex 3.482020e+001 -4.595445e-001 7.954423e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 6.140000e-002 1.000000e+001 vertex 3.482020e+001 6.140000e-002 8.000000e+000 vertex 3.482020e+001 -8.068409e-001 9.924039e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 9.296409e-001 9.924039e+000 vertex 3.482020e+001 5.823445e-001 7.954423e+000 vertex 3.482020e+001 6.140000e-002 1.000000e+001 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 1.771501e+000 9.698463e+000 vertex 3.482020e+001 1.087460e+000 7.819078e+000 vertex 3.482020e+001 9.296409e-001 9.924039e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 2.359533e+000 6.928363e+000 vertex 3.482020e+001 3.891622e+000 8.213938e+000 vertex 3.482020e+001 4.391527e+000 7.500000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 4.759863e+000 6.710101e+000 vertex 3.482020e+001 2.659476e+000 6.500000e+000 vertex 3.482020e+001 4.391527e+000 7.500000e+000 endloop endfacet facet normal 0.000000e+000 -9.966323e-001 8.200039e-002 outer loop vertex 3.482020e+001 6.061400e+000 5.000000e+000 vertex 1.482020e+001 6.061400e+000 5.000000e+000 vertex 1.482020e+001 5.980711e+000 4.019309e+000 endloop endfacet facet normal -4.306895e-017 -9.698266e-001 2.437957e-001 outer loop vertex 3.482020e+001 5.980711e+000 4.019309e+000 vertex 1.482020e+001 5.980711e+000 4.019309e+000 vertex 3.482020e+001 5.740815e+000 3.064995e+000 endloop endfacet facet normal -4.425936e-017 -9.966323e-001 8.200039e-002 outer loop vertex 3.482020e+001 5.980711e+000 4.019309e+000 vertex 3.482020e+001 6.061400e+000 5.000000e+000 vertex 1.482020e+001 5.980711e+000 4.019309e+000 endloop endfacet facet normal 1.692405e-017 -9.698266e-001 2.437957e-001 outer loop vertex 1.482020e+001 5.980711e+000 4.019309e+000 vertex 1.482020e+001 5.740815e+000 3.064995e+000 vertex 3.482020e+001 5.740815e+000 3.064995e+000 endloop endfacet facet normal -3.581497e-018 -9.169362e-001 3.990338e-001 outer loop vertex 3.482020e+001 5.740815e+000 3.064995e+000 vertex 1.482020e+001 5.740815e+000 3.064995e+000 vertex 3.482020e+001 5.348164e+000 2.162726e+000 endloop endfacet facet normal 0.000000e+000 -9.169362e-001 3.990338e-001 outer loop vertex 3.482020e+001 5.348164e+000 2.162726e+000 vertex 1.482020e+001 5.740815e+000 3.064995e+000 vertex 1.482020e+001 5.348164e+000 2.162726e+000 endloop endfacet facet normal 1.313813e-017 -8.393837e-001 5.435393e-001 outer loop vertex 3.482020e+001 4.813319e+000 1.336768e+000 vertex 1.482020e+001 5.348164e+000 2.162726e+000 vertex 1.482020e+001 4.813319e+000 1.336768e+000 endloop endfacet facet normal 0.000000e+000 -7.392549e-001 6.734257e-001 outer loop vertex 3.482020e+001 4.150665e+000 6.093379e-001 vertex 1.482020e+001 4.813319e+000 1.336768e+000 vertex 1.482020e+001 4.150665e+000 6.093379e-001 endloop endfacet facet normal 0.000000e+000 -6.192429e-001 7.851995e-001 outer loop vertex 3.482020e+001 3.378025e+000 0.000000e+000 vertex 1.482020e+001 4.150665e+000 6.093379e-001 vertex 1.482020e+001 3.378025e+000 0.000000e+000 endloop endfacet facet normal 0.000000e+000 -6.192429e-001 7.851995e-001 outer loop vertex 3.482020e+001 3.378025e+000 0.000000e+000 vertex 3.482020e+001 4.150665e+000 6.093379e-001 vertex 1.482020e+001 4.150665e+000 6.093379e-001 endloop endfacet facet normal 2.820675e-018 -7.392549e-001 6.734257e-001 outer loop vertex 3.482020e+001 4.150665e+000 6.093379e-001 vertex 3.482020e+001 4.813319e+000 1.336768e+000 vertex 1.482020e+001 4.813319e+000 1.336768e+000 endloop endfacet facet normal 0.000000e+000 -8.393837e-001 5.435393e-001 outer loop vertex 3.482020e+001 4.813319e+000 1.336768e+000 vertex 3.482020e+001 5.348164e+000 2.162726e+000 vertex 1.482020e+001 5.348164e+000 2.162726e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -2.893023e+000 5.520945e+000 vertex 1.482020e+001 -4.862639e+000 5.868241e+000 vertex 1.482020e+001 -2.938600e+000 5.000000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -2.893023e+000 5.520945e+000 vertex 1.482020e+001 -4.637063e+000 6.710101e+000 vertex 1.482020e+001 -4.862639e+000 5.868241e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -2.893023e+000 5.520945e+000 vertex 1.482020e+001 -2.757678e+000 6.026060e+000 vertex 1.482020e+001 -4.637063e+000 6.710101e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -4.637063e+000 6.710101e+000 vertex 1.482020e+001 -2.757678e+000 6.026060e+000 vertex 1.482020e+001 -4.268727e+000 7.500000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -4.268727e+000 7.500000e+000 vertex 1.482020e+001 -2.757678e+000 6.026060e+000 vertex 1.482020e+001 -2.536676e+000 6.500000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -3.768822e+000 8.213938e+000 vertex 1.482020e+001 -2.536676e+000 6.500000e+000 vertex 1.482020e+001 -2.236733e+000 6.928363e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -1.866963e+000 7.298133e+000 vertex 1.482020e+001 -3.768822e+000 8.213938e+000 vertex 1.482020e+001 -2.236733e+000 6.928363e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -1.866963e+000 7.298133e+000 vertex 1.482020e+001 -3.152538e+000 8.830222e+000 vertex 1.482020e+001 -3.768822e+000 8.213938e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -1.866963e+000 7.298133e+000 vertex 1.482020e+001 -1.438600e+000 7.598076e+000 vertex 1.482020e+001 -3.152538e+000 8.830222e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -3.152538e+000 8.830222e+000 vertex 1.482020e+001 -1.438600e+000 7.598076e+000 vertex 1.482020e+001 -2.438600e+000 9.330127e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -2.438600e+000 9.330127e+000 vertex 1.482020e+001 -1.438600e+000 7.598076e+000 vertex 1.482020e+001 -9.646604e-001 7.819078e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -1.648701e+000 9.698463e+000 vertex 1.482020e+001 -9.646604e-001 7.819078e+000 vertex 1.482020e+001 -4.595445e-001 7.954423e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -8.068409e-001 9.924039e+000 vertex 1.482020e+001 -4.595445e-001 7.954423e+000 vertex 1.482020e+001 6.140000e-002 8.000000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 6.140000e-002 1.000000e+001 vertex 1.482020e+001 6.140000e-002 8.000000e+000 vertex 1.482020e+001 5.823445e-001 7.954423e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 9.296409e-001 9.924039e+000 vertex 1.482020e+001 5.823445e-001 7.954423e+000 vertex 1.482020e+001 1.087460e+000 7.819078e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 1.771501e+000 9.698463e+000 vertex 1.482020e+001 1.087460e+000 7.819078e+000 vertex 1.482020e+001 1.561400e+000 7.598076e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 2.561400e+000 9.330127e+000 vertex 1.482020e+001 1.561400e+000 7.598076e+000 vertex 1.482020e+001 1.989763e+000 7.298133e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 3.275338e+000 8.830222e+000 vertex 1.482020e+001 1.989763e+000 7.298133e+000 vertex 1.482020e+001 2.359533e+000 6.928363e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 3.891622e+000 8.213938e+000 vertex 1.482020e+001 2.359533e+000 6.928363e+000 vertex 1.482020e+001 4.391527e+000 7.500000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 3.891622e+000 8.213938e+000 vertex 1.482020e+001 3.275338e+000 8.830222e+000 vertex 1.482020e+001 2.359533e+000 6.928363e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 2.659476e+000 6.500000e+000 vertex 1.482020e+001 4.391527e+000 7.500000e+000 vertex 1.482020e+001 2.359533e+000 6.928363e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 2.659476e+000 6.500000e+000 vertex 1.482020e+001 4.759863e+000 6.710101e+000 vertex 1.482020e+001 4.391527e+000 7.500000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 2.659476e+000 6.500000e+000 vertex 1.482020e+001 2.880478e+000 6.026060e+000 vertex 1.482020e+001 4.759863e+000 6.710101e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 4.759863e+000 6.710101e+000 vertex 1.482020e+001 2.880478e+000 6.026060e+000 vertex 1.482020e+001 4.985439e+000 5.868241e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 4.985439e+000 5.868241e+000 vertex 1.482020e+001 2.880478e+000 6.026060e+000 vertex 1.482020e+001 3.015823e+000 5.520945e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 5.061400e+000 5.000000e+000 vertex 1.482020e+001 3.015823e+000 5.520945e+000 vertex 1.482020e+001 3.061400e+000 5.000000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 3.015823e+000 4.479055e+000 vertex 1.482020e+001 5.061400e+000 5.000000e+000 vertex 1.482020e+001 3.061400e+000 5.000000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 3.015823e+000 4.479055e+000 vertex 1.482020e+001 5.740815e+000 3.064995e+000 vertex 1.482020e+001 5.061400e+000 5.000000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 3.015823e+000 4.479055e+000 vertex 1.482020e+001 2.880478e+000 3.973940e+000 vertex 1.482020e+001 5.740815e+000 3.064995e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 5.740815e+000 3.064995e+000 vertex 1.482020e+001 2.880478e+000 3.973940e+000 vertex 1.482020e+001 5.348164e+000 2.162726e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 5.348164e+000 2.162726e+000 vertex 1.482020e+001 2.880478e+000 3.973940e+000 vertex 1.482020e+001 2.659476e+000 3.500000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 4.813319e+000 1.336768e+000 vertex 1.482020e+001 2.659476e+000 3.500000e+000 vertex 1.482020e+001 2.359533e+000 3.071637e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 4.150665e+000 6.093379e-001 vertex 1.482020e+001 2.359533e+000 3.071637e+000 vertex 1.482020e+001 1.989763e+000 2.701867e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 3.378025e+000 0.000000e+000 vertex 1.482020e+001 1.989763e+000 2.701867e+000 vertex 1.482020e+001 1.561400e+000 2.401924e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 1.087460e+000 2.180922e+000 vertex 1.482020e+001 3.378025e+000 0.000000e+000 vertex 1.482020e+001 1.561400e+000 2.401924e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 1.087460e+000 2.180922e+000 vertex 1.482020e+001 6.140000e-002 0.000000e+000 vertex 1.482020e+001 3.378025e+000 0.000000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 1.087460e+000 2.180922e+000 vertex 1.482020e+001 5.823445e-001 2.045577e+000 vertex 1.482020e+001 6.140000e-002 0.000000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 6.140000e-002 0.000000e+000 vertex 1.482020e+001 5.823445e-001 2.045577e+000 vertex 1.482020e+001 6.140000e-002 2.000000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -4.595445e-001 2.045577e+000 vertex 1.482020e+001 6.140000e-002 0.000000e+000 vertex 1.482020e+001 6.140000e-002 2.000000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -4.595445e-001 2.045577e+000 vertex 1.482020e+001 -8.068409e-001 7.596123e-002 vertex 1.482020e+001 6.140000e-002 0.000000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -4.595445e-001 2.045577e+000 vertex 1.482020e+001 -9.646604e-001 2.180922e+000 vertex 1.482020e+001 -8.068409e-001 7.596123e-002 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -8.068409e-001 7.596123e-002 vertex 1.482020e+001 -9.646604e-001 2.180922e+000 vertex 1.482020e+001 -1.648701e+000 3.015369e-001 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -1.648701e+000 3.015369e-001 vertex 1.482020e+001 -9.646604e-001 2.180922e+000 vertex 1.482020e+001 -1.438600e+000 2.401924e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -2.438600e+000 6.698730e-001 vertex 1.482020e+001 -1.438600e+000 2.401924e+000 vertex 1.482020e+001 -1.866963e+000 2.701867e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -3.152538e+000 1.169778e+000 vertex 1.482020e+001 -1.866963e+000 2.701867e+000 vertex 1.482020e+001 -2.236733e+000 3.071637e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -3.768822e+000 1.786062e+000 vertex 1.482020e+001 -2.236733e+000 3.071637e+000 vertex 1.482020e+001 -4.268727e+000 2.500000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -3.768822e+000 1.786062e+000 vertex 1.482020e+001 -3.152538e+000 1.169778e+000 vertex 1.482020e+001 -2.236733e+000 3.071637e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -2.236733e+000 3.071637e+000 vertex 1.482020e+001 -2.536676e+000 3.500000e+000 vertex 1.482020e+001 -4.268727e+000 2.500000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -4.268727e+000 2.500000e+000 vertex 1.482020e+001 -2.536676e+000 3.500000e+000 vertex 1.482020e+001 -4.637063e+000 3.289899e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -4.637063e+000 3.289899e+000 vertex 1.482020e+001 -2.536676e+000 3.500000e+000 vertex 1.482020e+001 -2.757678e+000 3.973940e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -4.862639e+000 4.131759e+000 vertex 1.482020e+001 -2.757678e+000 3.973940e+000 vertex 1.482020e+001 -2.893023e+000 4.479055e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -4.938600e+000 5.000000e+000 vertex 1.482020e+001 -2.893023e+000 4.479055e+000 vertex 1.482020e+001 -2.938600e+000 5.000000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -4.862639e+000 5.868241e+000 vertex 1.482020e+001 -4.938600e+000 5.000000e+000 vertex 1.482020e+001 -2.938600e+000 5.000000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 6.061400e+000 5.000000e+000 vertex 1.482020e+001 5.061400e+000 5.000000e+000 vertex 1.482020e+001 5.980711e+000 4.019309e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 5.980711e+000 4.019309e+000 vertex 1.482020e+001 5.061400e+000 5.000000e+000 vertex 1.482020e+001 5.740815e+000 3.064995e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 5.061400e+000 5.000000e+000 vertex 1.482020e+001 4.985439e+000 5.868241e+000 vertex 1.482020e+001 3.015823e+000 5.520945e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 2.561400e+000 9.330127e+000 vertex 1.482020e+001 1.989763e+000 7.298133e+000 vertex 1.482020e+001 3.275338e+000 8.830222e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 2.561400e+000 9.330127e+000 vertex 1.482020e+001 1.771501e+000 9.698463e+000 vertex 1.482020e+001 1.561400e+000 7.598076e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 1.771501e+000 9.698463e+000 vertex 1.482020e+001 9.296409e-001 9.924039e+000 vertex 1.482020e+001 1.087460e+000 7.819078e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 6.140000e-002 1.000000e+001 vertex 1.482020e+001 5.823445e-001 7.954423e+000 vertex 1.482020e+001 9.296409e-001 9.924039e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -8.068409e-001 9.924039e+000 vertex 1.482020e+001 6.140000e-002 8.000000e+000 vertex 1.482020e+001 6.140000e-002 1.000000e+001 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -8.068409e-001 9.924039e+000 vertex 1.482020e+001 -1.648701e+000 9.698463e+000 vertex 1.482020e+001 -4.595445e-001 7.954423e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -1.648701e+000 9.698463e+000 vertex 1.482020e+001 -2.438600e+000 9.330127e+000 vertex 1.482020e+001 -9.646604e-001 7.819078e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -3.768822e+000 8.213938e+000 vertex 1.482020e+001 -4.268727e+000 7.500000e+000 vertex 1.482020e+001 -2.536676e+000 6.500000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -4.938600e+000 5.000000e+000 vertex 1.482020e+001 -4.862639e+000 4.131759e+000 vertex 1.482020e+001 -2.893023e+000 4.479055e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -4.862639e+000 4.131759e+000 vertex 1.482020e+001 -4.637063e+000 3.289899e+000 vertex 1.482020e+001 -2.757678e+000 3.973940e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -2.438600e+000 6.698730e-001 vertex 1.482020e+001 -1.866963e+000 2.701867e+000 vertex 1.482020e+001 -3.152538e+000 1.169778e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -2.438600e+000 6.698730e-001 vertex 1.482020e+001 -1.648701e+000 3.015369e-001 vertex 1.482020e+001 -1.438600e+000 2.401924e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 3.378025e+000 0.000000e+000 vertex 1.482020e+001 4.150665e+000 6.093379e-001 vertex 1.482020e+001 1.989763e+000 2.701867e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 4.150665e+000 6.093379e-001 vertex 1.482020e+001 4.813319e+000 1.336768e+000 vertex 1.482020e+001 2.359533e+000 3.071637e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 4.813319e+000 1.336768e+000 vertex 1.482020e+001 5.348164e+000 2.162726e+000 vertex 1.482020e+001 2.659476e+000 3.500000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.832020e+001 1.706140e+001 5.000000e+000 vertex 3.837337e+001 1.766917e+001 5.000000e+000 vertex 2.657020e+001 1.609249e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.706996e+001 1.574256e+001 5.000000e+000 vertex 3.832020e+001 1.706140e+001 5.000000e+000 vertex 2.657020e+001 1.609249e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.706996e+001 1.574256e+001 5.000000e+000 vertex 3.837337e+001 1.645363e+001 5.000000e+000 vertex 3.832020e+001 1.706140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.706996e+001 1.574256e+001 5.000000e+000 vertex 2.750136e+001 1.531116e+001 5.000000e+000 vertex 3.837337e+001 1.645363e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.837337e+001 1.645363e+001 5.000000e+000 vertex 2.750136e+001 1.531116e+001 5.000000e+000 vertex 3.853128e+001 1.586433e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.853128e+001 1.586433e+001 5.000000e+000 vertex 2.750136e+001 1.531116e+001 5.000000e+000 vertex 2.785129e+001 1.481140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.878911e+001 1.531140e+001 5.000000e+000 vertex 2.785129e+001 1.481140e+001 5.000000e+000 vertex 2.810912e+001 1.425847e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.913904e+001 1.481164e+001 5.000000e+000 vertex 2.810912e+001 1.425847e+001 5.000000e+000 vertex 2.826703e+001 1.366917e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.957044e+001 1.438024e+001 5.000000e+000 vertex 2.826703e+001 1.366917e+001 5.000000e+000 vertex 2.832020e+001 1.306140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.007020e+001 1.403031e+001 5.000000e+000 vertex 2.832020e+001 1.306140e+001 5.000000e+000 vertex 2.826703e+001 1.245363e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.062313e+001 1.377248e+001 5.000000e+000 vertex 2.826703e+001 1.245363e+001 5.000000e+000 vertex 2.810912e+001 1.186433e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.785129e+001 1.131140e+001 5.000000e+000 vertex 4.062313e+001 1.377248e+001 5.000000e+000 vertex 2.810912e+001 1.186433e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.785129e+001 1.131140e+001 5.000000e+000 vertex 4.121243e+001 1.361457e+001 5.000000e+000 vertex 4.062313e+001 1.377248e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.785129e+001 1.131140e+001 5.000000e+000 vertex 2.750136e+001 1.081164e+001 5.000000e+000 vertex 4.121243e+001 1.361457e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.121243e+001 1.361457e+001 5.000000e+000 vertex 2.750136e+001 1.081164e+001 5.000000e+000 vertex 3.482020e+001 6.061400e+000 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.182020e+001 1.356140e+001 5.000000e+000 vertex 3.482020e+001 6.061400e+000 5.000000e+000 vertex 4.982020e+001 5.061400e+000 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.242797e+001 1.361457e+001 5.000000e+000 vertex 4.982020e+001 5.061400e+000 5.000000e+000 vertex 4.301727e+001 1.377248e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.242797e+001 1.361457e+001 5.000000e+000 vertex 4.182020e+001 1.356140e+001 5.000000e+000 vertex 4.982020e+001 5.061400e+000 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.837337e+001 1.766917e+001 5.000000e+000 vertex 3.853128e+001 1.825847e+001 5.000000e+000 vertex 2.601727e+001 1.635032e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.657020e+001 1.609249e+001 5.000000e+000 vertex 3.837337e+001 1.766917e+001 5.000000e+000 vertex 2.601727e+001 1.635032e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.878911e+001 1.881140e+001 5.000000e+000 vertex 2.601727e+001 1.635032e+001 5.000000e+000 vertex 3.853128e+001 1.825847e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.878911e+001 1.881140e+001 5.000000e+000 vertex 2.542797e+001 1.650823e+001 5.000000e+000 vertex 2.601727e+001 1.635032e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.878911e+001 1.881140e+001 5.000000e+000 vertex 3.913904e+001 1.931116e+001 5.000000e+000 vertex 2.542797e+001 1.650823e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.542797e+001 1.650823e+001 5.000000e+000 vertex 3.913904e+001 1.931116e+001 5.000000e+000 vertex 3.957044e+001 1.974256e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.482020e+001 1.656140e+001 5.000000e+000 vertex 3.957044e+001 1.974256e+001 5.000000e+000 vertex 4.007020e+001 2.009249e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 9.570200e+000 2.009249e+001 5.000000e+000 vertex 4.007020e+001 2.009249e+001 5.000000e+000 vertex 9.017271e+000 2.035032e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 9.570200e+000 2.009249e+001 5.000000e+000 vertex 2.482020e+001 1.656140e+001 5.000000e+000 vertex 4.007020e+001 2.009249e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 9.570200e+000 2.009249e+001 5.000000e+000 vertex 1.006996e+001 1.974256e+001 5.000000e+000 vertex 2.482020e+001 1.656140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.482020e+001 1.656140e+001 5.000000e+000 vertex 1.006996e+001 1.974256e+001 5.000000e+000 vertex 2.421243e+001 1.650823e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.421243e+001 1.650823e+001 5.000000e+000 vertex 1.006996e+001 1.974256e+001 5.000000e+000 vertex 1.050136e+001 1.931116e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 1.085129e+001 1.881140e+001 5.000000e+000 vertex 2.421243e+001 1.650823e+001 5.000000e+000 vertex 1.050136e+001 1.931116e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 1.085129e+001 1.881140e+001 5.000000e+000 vertex 2.362313e+001 1.635032e+001 5.000000e+000 vertex 2.421243e+001 1.650823e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 1.085129e+001 1.881140e+001 5.000000e+000 vertex 1.110912e+001 1.825847e+001 5.000000e+000 vertex 2.362313e+001 1.635032e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.362313e+001 1.635032e+001 5.000000e+000 vertex 1.110912e+001 1.825847e+001 5.000000e+000 vertex 1.126703e+001 1.766917e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.307020e+001 1.609249e+001 5.000000e+000 vertex 1.126703e+001 1.766917e+001 5.000000e+000 vertex 1.132020e+001 1.706140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.257044e+001 1.574256e+001 5.000000e+000 vertex 1.132020e+001 1.706140e+001 5.000000e+000 vertex 1.126703e+001 1.645363e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.213904e+001 1.531116e+001 5.000000e+000 vertex 1.126703e+001 1.645363e+001 5.000000e+000 vertex 1.110912e+001 1.586433e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.178911e+001 1.481140e+001 5.000000e+000 vertex 1.110912e+001 1.586433e+001 5.000000e+000 vertex 1.085129e+001 1.531140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.153128e+001 1.425847e+001 5.000000e+000 vertex 1.085129e+001 1.531140e+001 5.000000e+000 vertex 1.050136e+001 1.481164e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.137337e+001 1.366917e+001 5.000000e+000 vertex 1.050136e+001 1.481164e+001 5.000000e+000 vertex 1.006996e+001 1.438024e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.132020e+001 1.306140e+001 5.000000e+000 vertex 1.006996e+001 1.438024e+001 5.000000e+000 vertex 9.570200e+000 1.403031e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.137337e+001 1.245363e+001 5.000000e+000 vertex 9.570200e+000 1.403031e+001 5.000000e+000 vertex 9.017271e+000 1.377248e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.153128e+001 1.186433e+001 5.000000e+000 vertex 9.017271e+000 1.377248e+001 5.000000e+000 vertex 2.178911e+001 1.131140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.153128e+001 1.186433e+001 5.000000e+000 vertex 2.137337e+001 1.245363e+001 5.000000e+000 vertex 9.017271e+000 1.377248e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.007020e+001 2.009249e+001 5.000000e+000 vertex 4.062313e+001 2.035032e+001 5.000000e+000 vertex 9.017271e+000 2.035032e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 9.017271e+000 2.035032e+001 5.000000e+000 vertex 4.062313e+001 2.035032e+001 5.000000e+000 vertex -1.798000e-001 2.506140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 8.427969e+000 2.050823e+001 5.000000e+000 vertex -1.798000e-001 2.506140e+001 5.000000e+000 vertex 7.820200e+000 2.056140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 8.427969e+000 2.050823e+001 5.000000e+000 vertex 9.017271e+000 2.035032e+001 5.000000e+000 vertex -1.798000e-001 2.506140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.121243e+001 2.050823e+001 5.000000e+000 vertex 4.982020e+001 2.506140e+001 5.000000e+000 vertex 4.062313e+001 2.035032e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.121243e+001 2.050823e+001 5.000000e+000 vertex 4.182020e+001 2.056140e+001 5.000000e+000 vertex 4.982020e+001 2.506140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.982020e+001 2.506140e+001 5.000000e+000 vertex 4.182020e+001 2.056140e+001 5.000000e+000 vertex 4.242797e+001 2.050823e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.301727e+001 2.035032e+001 5.000000e+000 vertex 4.982020e+001 2.506140e+001 5.000000e+000 vertex 4.242797e+001 2.050823e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.301727e+001 2.035032e+001 5.000000e+000 vertex 4.357020e+001 2.009249e+001 5.000000e+000 vertex 4.982020e+001 2.506140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.982020e+001 2.506140e+001 5.000000e+000 vertex 4.357020e+001 2.009249e+001 5.000000e+000 vertex 4.406996e+001 1.974256e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.450136e+001 1.931116e+001 5.000000e+000 vertex 4.982020e+001 2.506140e+001 5.000000e+000 vertex 4.406996e+001 1.974256e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.450136e+001 1.931116e+001 5.000000e+000 vertex 4.485129e+001 1.881140e+001 5.000000e+000 vertex 4.982020e+001 2.506140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.982020e+001 2.506140e+001 5.000000e+000 vertex 4.485129e+001 1.881140e+001 5.000000e+000 vertex 4.510912e+001 1.825847e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.526703e+001 1.766917e+001 5.000000e+000 vertex 4.982020e+001 2.506140e+001 5.000000e+000 vertex 4.510912e+001 1.825847e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.526703e+001 1.766917e+001 5.000000e+000 vertex 4.532020e+001 1.706140e+001 5.000000e+000 vertex 4.982020e+001 2.506140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.982020e+001 2.506140e+001 5.000000e+000 vertex 4.532020e+001 1.706140e+001 5.000000e+000 vertex 4.526703e+001 1.645363e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.982020e+001 5.061400e+000 5.000000e+000 vertex 4.526703e+001 1.645363e+001 5.000000e+000 vertex 4.510912e+001 1.586433e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.485129e+001 1.531140e+001 5.000000e+000 vertex 4.982020e+001 5.061400e+000 5.000000e+000 vertex 4.510912e+001 1.586433e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.485129e+001 1.531140e+001 5.000000e+000 vertex 4.450136e+001 1.481164e+001 5.000000e+000 vertex 4.982020e+001 5.061400e+000 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.982020e+001 5.061400e+000 5.000000e+000 vertex 4.450136e+001 1.481164e+001 5.000000e+000 vertex 4.406996e+001 1.438024e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.357020e+001 1.403031e+001 5.000000e+000 vertex 4.982020e+001 5.061400e+000 5.000000e+000 vertex 4.406996e+001 1.438024e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.357020e+001 1.403031e+001 5.000000e+000 vertex 4.301727e+001 1.377248e+001 5.000000e+000 vertex 4.982020e+001 5.061400e+000 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.121243e+001 1.361457e+001 5.000000e+000 vertex 3.482020e+001 6.061400e+000 5.000000e+000 vertex 4.182020e+001 1.356140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.062313e+001 1.377248e+001 5.000000e+000 vertex 4.007020e+001 1.403031e+001 5.000000e+000 vertex 2.826703e+001 1.245363e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.957044e+001 1.438024e+001 5.000000e+000 vertex 2.832020e+001 1.306140e+001 5.000000e+000 vertex 4.007020e+001 1.403031e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.957044e+001 1.438024e+001 5.000000e+000 vertex 3.913904e+001 1.481164e+001 5.000000e+000 vertex 2.826703e+001 1.366917e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.878911e+001 1.531140e+001 5.000000e+000 vertex 2.810912e+001 1.425847e+001 5.000000e+000 vertex 3.913904e+001 1.481164e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.878911e+001 1.531140e+001 5.000000e+000 vertex 3.853128e+001 1.586433e+001 5.000000e+000 vertex 2.785129e+001 1.481140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.137337e+001 1.366917e+001 5.000000e+000 vertex 1.006996e+001 1.438024e+001 5.000000e+000 vertex 2.132020e+001 1.306140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.137337e+001 1.366917e+001 5.000000e+000 vertex 2.153128e+001 1.425847e+001 5.000000e+000 vertex 1.050136e+001 1.481164e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.178911e+001 1.481140e+001 5.000000e+000 vertex 1.085129e+001 1.531140e+001 5.000000e+000 vertex 2.153128e+001 1.425847e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.213904e+001 1.531116e+001 5.000000e+000 vertex 1.110912e+001 1.586433e+001 5.000000e+000 vertex 2.178911e+001 1.481140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.213904e+001 1.531116e+001 5.000000e+000 vertex 2.257044e+001 1.574256e+001 5.000000e+000 vertex 1.126703e+001 1.645363e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.257044e+001 1.574256e+001 5.000000e+000 vertex 2.307020e+001 1.609249e+001 5.000000e+000 vertex 1.132020e+001 1.706140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.307020e+001 1.609249e+001 5.000000e+000 vertex 2.362313e+001 1.635032e+001 5.000000e+000 vertex 1.126703e+001 1.766917e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.482020e+001 1.656140e+001 5.000000e+000 vertex 2.542797e+001 1.650823e+001 5.000000e+000 vertex 3.957044e+001 1.974256e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.750136e+001 1.081164e+001 5.000000e+000 vertex 2.706996e+001 1.038024e+001 5.000000e+000 vertex 3.482020e+001 6.061400e+000 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.482020e+001 6.061400e+000 5.000000e+000 vertex 2.706996e+001 1.038024e+001 5.000000e+000 vertex 2.657020e+001 1.003031e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.601727e+001 9.772476e+000 5.000000e+000 vertex 3.482020e+001 6.061400e+000 5.000000e+000 vertex 2.657020e+001 1.003031e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.601727e+001 9.772476e+000 5.000000e+000 vertex 2.542797e+001 9.614573e+000 5.000000e+000 vertex 3.482020e+001 6.061400e+000 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.482020e+001 6.061400e+000 5.000000e+000 vertex 2.542797e+001 9.614573e+000 5.000000e+000 vertex 2.482020e+001 9.561400e+000 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 1.482020e+001 6.061400e+000 5.000000e+000 vertex 2.482020e+001 9.561400e+000 5.000000e+000 vertex 2.421243e+001 9.614573e+000 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.362313e+001 9.772476e+000 5.000000e+000 vertex 1.482020e+001 6.061400e+000 5.000000e+000 vertex 2.421243e+001 9.614573e+000 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.362313e+001 9.772476e+000 5.000000e+000 vertex 2.307020e+001 1.003031e+001 5.000000e+000 vertex 1.482020e+001 6.061400e+000 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 1.482020e+001 6.061400e+000 5.000000e+000 vertex 2.307020e+001 1.003031e+001 5.000000e+000 vertex 2.257044e+001 1.038024e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.213904e+001 1.081164e+001 5.000000e+000 vertex 1.482020e+001 6.061400e+000 5.000000e+000 vertex 2.257044e+001 1.038024e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.213904e+001 1.081164e+001 5.000000e+000 vertex 8.427969e+000 1.361457e+001 5.000000e+000 vertex 1.482020e+001 6.061400e+000 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.213904e+001 1.081164e+001 5.000000e+000 vertex 2.178911e+001 1.131140e+001 5.000000e+000 vertex 8.427969e+000 1.361457e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 8.427969e+000 1.361457e+001 5.000000e+000 vertex 2.178911e+001 1.131140e+001 5.000000e+000 vertex 9.017271e+000 1.377248e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.132020e+001 1.306140e+001 5.000000e+000 vertex 9.570200e+000 1.403031e+001 5.000000e+000 vertex 2.137337e+001 1.245363e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.373373e+000 1.766917e+001 5.000000e+000 vertex -1.798000e-001 2.506140e+001 5.000000e+000 vertex 4.320200e+000 1.706140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.373373e+000 1.766917e+001 5.000000e+000 vertex 4.531276e+000 1.825847e+001 5.000000e+000 vertex -1.798000e-001 2.506140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex -1.798000e-001 2.506140e+001 5.000000e+000 vertex 4.531276e+000 1.825847e+001 5.000000e+000 vertex 4.789111e+000 1.881140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 5.139044e+000 1.931116e+001 5.000000e+000 vertex -1.798000e-001 2.506140e+001 5.000000e+000 vertex 4.789111e+000 1.881140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 5.139044e+000 1.931116e+001 5.000000e+000 vertex 5.570443e+000 1.974256e+001 5.000000e+000 vertex -1.798000e-001 2.506140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex -1.798000e-001 2.506140e+001 5.000000e+000 vertex 5.570443e+000 1.974256e+001 5.000000e+000 vertex 6.070200e+000 2.009249e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 6.623129e+000 2.035032e+001 5.000000e+000 vertex -1.798000e-001 2.506140e+001 5.000000e+000 vertex 6.070200e+000 2.009249e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 6.623129e+000 2.035032e+001 5.000000e+000 vertex 7.212431e+000 2.050823e+001 5.000000e+000 vertex -1.798000e-001 2.506140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex -1.798000e-001 2.506140e+001 5.000000e+000 vertex 7.212431e+000 2.050823e+001 5.000000e+000 vertex 7.820200e+000 2.056140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 8.427969e+000 1.361457e+001 5.000000e+000 vertex 7.820200e+000 1.356140e+001 5.000000e+000 vertex 1.482020e+001 6.061400e+000 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 1.482020e+001 6.061400e+000 5.000000e+000 vertex 7.820200e+000 1.356140e+001 5.000000e+000 vertex -1.798000e-001 5.061400e+000 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 1.482020e+001 5.061400e+000 5.000000e+000 vertex 1.482020e+001 6.061400e+000 5.000000e+000 vertex -1.798000e-001 5.061400e+000 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 7.212431e+000 1.361457e+001 5.000000e+000 vertex -1.798000e-001 5.061400e+000 5.000000e+000 vertex 7.820200e+000 1.356140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 7.212431e+000 1.361457e+001 5.000000e+000 vertex 6.623129e+000 1.377248e+001 5.000000e+000 vertex -1.798000e-001 5.061400e+000 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex -1.798000e-001 5.061400e+000 5.000000e+000 vertex 6.623129e+000 1.377248e+001 5.000000e+000 vertex 6.070200e+000 1.403031e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 5.570443e+000 1.438024e+001 5.000000e+000 vertex -1.798000e-001 5.061400e+000 5.000000e+000 vertex 6.070200e+000 1.403031e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 5.570443e+000 1.438024e+001 5.000000e+000 vertex 5.139044e+000 1.481164e+001 5.000000e+000 vertex -1.798000e-001 5.061400e+000 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex -1.798000e-001 5.061400e+000 5.000000e+000 vertex 5.139044e+000 1.481164e+001 5.000000e+000 vertex 4.789111e+000 1.531140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.531276e+000 1.586433e+001 5.000000e+000 vertex -1.798000e-001 5.061400e+000 5.000000e+000 vertex 4.789111e+000 1.531140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.531276e+000 1.586433e+001 5.000000e+000 vertex 4.373373e+000 1.645363e+001 5.000000e+000 vertex -1.798000e-001 5.061400e+000 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex -1.798000e-001 5.061400e+000 5.000000e+000 vertex 4.373373e+000 1.645363e+001 5.000000e+000 vertex -1.798000e-001 2.506140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex -1.798000e-001 2.506140e+001 5.000000e+000 vertex 4.373373e+000 1.645363e+001 5.000000e+000 vertex 4.320200e+000 1.706140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 1.482020e+001 6.061400e+000 5.000000e+000 vertex 3.482020e+001 6.061400e+000 5.000000e+000 vertex 2.482020e+001 9.561400e+000 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.482020e+001 6.061400e+000 5.000000e+000 vertex 3.482020e+001 5.061400e+000 5.000000e+000 vertex 4.982020e+001 5.061400e+000 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.982020e+001 2.506140e+001 5.000000e+000 vertex 4.526703e+001 1.645363e+001 5.000000e+000 vertex 4.982020e+001 5.061400e+000 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex -1.798000e-001 2.506140e+001 5.000000e+000 vertex 4.062313e+001 2.035032e+001 5.000000e+000 vertex 4.982020e+001 2.506140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 9.961947e-001 8.715574e-002 outer loop vertex 3.482020e+001 5.061400e+000 5.000000e+000 vertex 3.482020e+001 4.985439e+000 5.868241e+000 vertex 4.982020e+001 5.061400e+000 5.000000e+000 endloop endfacet facet normal 0.000000e+000 9.961947e-001 8.715574e-002 outer loop vertex 4.982020e+001 5.061400e+000 5.000000e+000 vertex 3.482020e+001 4.985439e+000 5.868241e+000 vertex 4.982020e+001 4.985439e+000 5.868241e+000 endloop endfacet facet normal 0.000000e+000 9.659258e-001 2.588190e-001 outer loop vertex 4.982020e+001 4.985439e+000 5.868241e+000 vertex 3.482020e+001 4.985439e+000 5.868241e+000 vertex 3.482020e+001 4.759863e+000 6.710101e+000 endloop endfacet facet normal 0.000000e+000 9.063078e-001 4.226183e-001 outer loop vertex 4.982020e+001 4.759863e+000 6.710101e+000 vertex 3.482020e+001 4.759863e+000 6.710101e+000 vertex 3.482020e+001 4.391527e+000 7.500000e+000 endloop endfacet facet normal 0.000000e+000 8.191520e-001 5.735764e-001 outer loop vertex 4.982020e+001 4.391527e+000 7.500000e+000 vertex 3.482020e+001 4.391527e+000 7.500000e+000 vertex 3.482020e+001 3.891622e+000 8.213938e+000 endloop endfacet facet normal 0.000000e+000 7.071068e-001 7.071068e-001 outer loop vertex 4.982020e+001 3.891622e+000 8.213938e+000 vertex 3.482020e+001 3.891622e+000 8.213938e+000 vertex 3.482020e+001 3.275338e+000 8.830222e+000 endloop endfacet facet normal 0.000000e+000 5.735764e-001 8.191520e-001 outer loop vertex 4.982020e+001 3.275338e+000 8.830222e+000 vertex 3.482020e+001 3.275338e+000 8.830222e+000 vertex 3.482020e+001 2.561400e+000 9.330127e+000 endloop endfacet facet normal 0.000000e+000 4.226183e-001 9.063078e-001 outer loop vertex 4.982020e+001 2.561400e+000 9.330127e+000 vertex 3.482020e+001 2.561400e+000 9.330127e+000 vertex 3.482020e+001 1.771501e+000 9.698463e+000 endloop endfacet facet normal 0.000000e+000 2.588190e-001 9.659258e-001 outer loop vertex 4.982020e+001 1.771501e+000 9.698463e+000 vertex 3.482020e+001 1.771501e+000 9.698463e+000 vertex 3.482020e+001 9.296409e-001 9.924039e+000 endloop endfacet facet normal 0.000000e+000 8.715574e-002 9.961947e-001 outer loop vertex 4.982020e+001 9.296409e-001 9.924039e+000 vertex 3.482020e+001 9.296409e-001 9.924039e+000 vertex 3.482020e+001 6.140000e-002 1.000000e+001 endloop endfacet facet normal 0.000000e+000 -8.715574e-002 9.961947e-001 outer loop vertex 4.982020e+001 6.140000e-002 1.000000e+001 vertex 3.482020e+001 6.140000e-002 1.000000e+001 vertex 3.482020e+001 -8.068409e-001 9.924039e+000 endloop endfacet facet normal 0.000000e+000 -2.588190e-001 9.659258e-001 outer loop vertex 4.982020e+001 -8.068409e-001 9.924039e+000 vertex 3.482020e+001 -8.068409e-001 9.924039e+000 vertex 3.482020e+001 -1.648701e+000 9.698463e+000 endloop endfacet facet normal 0.000000e+000 -4.226183e-001 9.063078e-001 outer loop vertex 4.982020e+001 -1.648701e+000 9.698463e+000 vertex 3.482020e+001 -1.648701e+000 9.698463e+000 vertex 3.482020e+001 -2.438600e+000 9.330127e+000 endloop endfacet facet normal 0.000000e+000 -5.735764e-001 8.191520e-001 outer loop vertex 4.982020e+001 -2.438600e+000 9.330127e+000 vertex 3.482020e+001 -2.438600e+000 9.330127e+000 vertex 3.482020e+001 -3.152538e+000 8.830222e+000 endloop endfacet facet normal 0.000000e+000 -7.071068e-001 7.071068e-001 outer loop vertex 4.982020e+001 -3.152538e+000 8.830222e+000 vertex 3.482020e+001 -3.152538e+000 8.830222e+000 vertex 3.482020e+001 -3.768822e+000 8.213938e+000 endloop endfacet facet normal 0.000000e+000 -8.191520e-001 5.735764e-001 outer loop vertex 4.982020e+001 -3.768822e+000 8.213938e+000 vertex 3.482020e+001 -3.768822e+000 8.213938e+000 vertex 3.482020e+001 -4.268727e+000 7.500000e+000 endloop endfacet facet normal 0.000000e+000 -9.063078e-001 4.226183e-001 outer loop vertex 4.982020e+001 -4.268727e+000 7.500000e+000 vertex 3.482020e+001 -4.268727e+000 7.500000e+000 vertex 3.482020e+001 -4.637063e+000 6.710101e+000 endloop endfacet facet normal 0.000000e+000 -9.659258e-001 2.588190e-001 outer loop vertex 4.982020e+001 -4.637063e+000 6.710101e+000 vertex 3.482020e+001 -4.637063e+000 6.710101e+000 vertex 3.482020e+001 -4.862639e+000 5.868241e+000 endloop endfacet facet normal 0.000000e+000 -9.961947e-001 8.715574e-002 outer loop vertex 4.982020e+001 -4.862639e+000 5.868241e+000 vertex 3.482020e+001 -4.862639e+000 5.868241e+000 vertex 3.482020e+001 -4.938600e+000 5.000000e+000 endloop endfacet facet normal 0.000000e+000 -9.961947e-001 -8.715574e-002 outer loop vertex 4.982020e+001 -4.938600e+000 5.000000e+000 vertex 3.482020e+001 -4.938600e+000 5.000000e+000 vertex 3.482020e+001 -4.862639e+000 4.131759e+000 endloop endfacet facet normal 0.000000e+000 -9.659258e-001 -2.588190e-001 outer loop vertex 4.982020e+001 -4.862639e+000 4.131759e+000 vertex 3.482020e+001 -4.862639e+000 4.131759e+000 vertex 3.482020e+001 -4.637063e+000 3.289899e+000 endloop endfacet facet normal 0.000000e+000 -9.063078e-001 -4.226183e-001 outer loop vertex 4.982020e+001 -4.637063e+000 3.289899e+000 vertex 3.482020e+001 -4.637063e+000 3.289899e+000 vertex 3.482020e+001 -4.268727e+000 2.500000e+000 endloop endfacet facet normal 0.000000e+000 -8.191520e-001 -5.735764e-001 outer loop vertex 4.982020e+001 -4.268727e+000 2.500000e+000 vertex 3.482020e+001 -4.268727e+000 2.500000e+000 vertex 3.482020e+001 -3.768822e+000 1.786062e+000 endloop endfacet facet normal 0.000000e+000 -7.071068e-001 -7.071068e-001 outer loop vertex 4.982020e+001 -3.768822e+000 1.786062e+000 vertex 3.482020e+001 -3.768822e+000 1.786062e+000 vertex 3.482020e+001 -3.152538e+000 1.169778e+000 endloop endfacet facet normal 0.000000e+000 -5.735764e-001 -8.191520e-001 outer loop vertex 4.982020e+001 -3.152538e+000 1.169778e+000 vertex 3.482020e+001 -3.152538e+000 1.169778e+000 vertex 3.482020e+001 -2.438600e+000 6.698730e-001 endloop endfacet facet normal 0.000000e+000 -4.226183e-001 -9.063078e-001 outer loop vertex 4.982020e+001 -2.438600e+000 6.698730e-001 vertex 3.482020e+001 -2.438600e+000 6.698730e-001 vertex 3.482020e+001 -1.648701e+000 3.015369e-001 endloop endfacet facet normal 0.000000e+000 -2.588190e-001 -9.659258e-001 outer loop vertex 4.982020e+001 -1.648701e+000 3.015369e-001 vertex 3.482020e+001 -1.648701e+000 3.015369e-001 vertex 3.482020e+001 -8.068409e-001 7.596123e-002 endloop endfacet facet normal 0.000000e+000 -8.715574e-002 -9.961947e-001 outer loop vertex 4.982020e+001 -8.068409e-001 7.596123e-002 vertex 3.482020e+001 -8.068409e-001 7.596123e-002 vertex 3.482020e+001 6.140000e-002 0.000000e+000 endloop endfacet facet normal -5.124559e-017 -8.715574e-002 -9.961947e-001 outer loop vertex 4.982020e+001 6.140000e-002 -8.881784e-016 vertex 4.982020e+001 -8.068409e-001 7.596123e-002 vertex 3.482020e+001 6.140000e-002 0.000000e+000 endloop endfacet facet normal 0.000000e+000 -2.588190e-001 -9.659258e-001 outer loop vertex 4.982020e+001 -8.068409e-001 7.596123e-002 vertex 4.982020e+001 -1.648701e+000 3.015369e-001 vertex 3.482020e+001 -8.068409e-001 7.596123e-002 endloop endfacet facet normal 0.000000e+000 -4.226183e-001 -9.063078e-001 outer loop vertex 4.982020e+001 -1.648701e+000 3.015369e-001 vertex 4.982020e+001 -2.438600e+000 6.698730e-001 vertex 3.482020e+001 -1.648701e+000 3.015369e-001 endloop endfacet facet normal 0.000000e+000 -5.735764e-001 -8.191520e-001 outer loop vertex 4.982020e+001 -2.438600e+000 6.698730e-001 vertex 4.982020e+001 -3.152538e+000 1.169778e+000 vertex 3.482020e+001 -2.438600e+000 6.698730e-001 endloop endfacet facet normal 0.000000e+000 -7.071068e-001 -7.071068e-001 outer loop vertex 4.982020e+001 -3.152538e+000 1.169778e+000 vertex 4.982020e+001 -3.768822e+000 1.786062e+000 vertex 3.482020e+001 -3.152538e+000 1.169778e+000 endloop endfacet facet normal 0.000000e+000 -8.191520e-001 -5.735764e-001 outer loop vertex 4.982020e+001 -3.768822e+000 1.786062e+000 vertex 4.982020e+001 -4.268727e+000 2.500000e+000 vertex 3.482020e+001 -3.768822e+000 1.786062e+000 endloop endfacet facet normal 0.000000e+000 -9.063078e-001 -4.226183e-001 outer loop vertex 4.982020e+001 -4.268727e+000 2.500000e+000 vertex 4.982020e+001 -4.637063e+000 3.289899e+000 vertex 3.482020e+001 -4.268727e+000 2.500000e+000 endloop endfacet facet normal 0.000000e+000 -9.659258e-001 -2.588190e-001 outer loop vertex 4.982020e+001 -4.637063e+000 3.289899e+000 vertex 4.982020e+001 -4.862639e+000 4.131759e+000 vertex 3.482020e+001 -4.637063e+000 3.289899e+000 endloop endfacet facet normal 0.000000e+000 -9.961947e-001 -8.715574e-002 outer loop vertex 4.982020e+001 -4.862639e+000 4.131759e+000 vertex 4.982020e+001 -4.938600e+000 5.000000e+000 vertex 3.482020e+001 -4.862639e+000 4.131759e+000 endloop endfacet facet normal 0.000000e+000 -9.961947e-001 8.715574e-002 outer loop vertex 4.982020e+001 -4.938600e+000 5.000000e+000 vertex 4.982020e+001 -4.862639e+000 5.868241e+000 vertex 3.482020e+001 -4.938600e+000 5.000000e+000 endloop endfacet facet normal 0.000000e+000 -9.659258e-001 2.588190e-001 outer loop vertex 4.982020e+001 -4.862639e+000 5.868241e+000 vertex 4.982020e+001 -4.637063e+000 6.710101e+000 vertex 3.482020e+001 -4.862639e+000 5.868241e+000 endloop endfacet facet normal 0.000000e+000 -9.063078e-001 4.226183e-001 outer loop vertex 4.982020e+001 -4.637063e+000 6.710101e+000 vertex 4.982020e+001 -4.268727e+000 7.500000e+000 vertex 3.482020e+001 -4.637063e+000 6.710101e+000 endloop endfacet facet normal 0.000000e+000 -8.191520e-001 5.735764e-001 outer loop vertex 4.982020e+001 -4.268727e+000 7.500000e+000 vertex 4.982020e+001 -3.768822e+000 8.213938e+000 vertex 3.482020e+001 -4.268727e+000 7.500000e+000 endloop endfacet facet normal 0.000000e+000 -7.071068e-001 7.071068e-001 outer loop vertex 4.982020e+001 -3.768822e+000 8.213938e+000 vertex 4.982020e+001 -3.152538e+000 8.830222e+000 vertex 3.482020e+001 -3.768822e+000 8.213938e+000 endloop endfacet facet normal 0.000000e+000 -5.735764e-001 8.191520e-001 outer loop vertex 4.982020e+001 -3.152538e+000 8.830222e+000 vertex 4.982020e+001 -2.438600e+000 9.330127e+000 vertex 3.482020e+001 -3.152538e+000 8.830222e+000 endloop endfacet facet normal 0.000000e+000 -4.226183e-001 9.063078e-001 outer loop vertex 4.982020e+001 -2.438600e+000 9.330127e+000 vertex 4.982020e+001 -1.648701e+000 9.698463e+000 vertex 3.482020e+001 -2.438600e+000 9.330127e+000 endloop endfacet facet normal 0.000000e+000 -2.588190e-001 9.659258e-001 outer loop vertex 4.982020e+001 -1.648701e+000 9.698463e+000 vertex 4.982020e+001 -8.068409e-001 9.924039e+000 vertex 3.482020e+001 -1.648701e+000 9.698463e+000 endloop endfacet facet normal 0.000000e+000 -8.715574e-002 9.961947e-001 outer loop vertex 4.982020e+001 -8.068409e-001 9.924039e+000 vertex 4.982020e+001 6.140000e-002 1.000000e+001 vertex 3.482020e+001 -8.068409e-001 9.924039e+000 endloop endfacet facet normal 0.000000e+000 8.715574e-002 9.961947e-001 outer loop vertex 4.982020e+001 6.140000e-002 1.000000e+001 vertex 4.982020e+001 9.296409e-001 9.924039e+000 vertex 3.482020e+001 6.140000e-002 1.000000e+001 endloop endfacet facet normal 0.000000e+000 2.588190e-001 9.659258e-001 outer loop vertex 4.982020e+001 9.296409e-001 9.924039e+000 vertex 4.982020e+001 1.771501e+000 9.698463e+000 vertex 3.482020e+001 9.296409e-001 9.924039e+000 endloop endfacet facet normal 0.000000e+000 4.226183e-001 9.063078e-001 outer loop vertex 4.982020e+001 1.771501e+000 9.698463e+000 vertex 4.982020e+001 2.561400e+000 9.330127e+000 vertex 3.482020e+001 1.771501e+000 9.698463e+000 endloop endfacet facet normal 0.000000e+000 5.735764e-001 8.191520e-001 outer loop vertex 4.982020e+001 2.561400e+000 9.330127e+000 vertex 4.982020e+001 3.275338e+000 8.830222e+000 vertex 3.482020e+001 2.561400e+000 9.330127e+000 endloop endfacet facet normal 0.000000e+000 7.071068e-001 7.071068e-001 outer loop vertex 4.982020e+001 3.275338e+000 8.830222e+000 vertex 4.982020e+001 3.891622e+000 8.213938e+000 vertex 3.482020e+001 3.275338e+000 8.830222e+000 endloop endfacet facet normal 0.000000e+000 8.191520e-001 5.735764e-001 outer loop vertex 4.982020e+001 3.891622e+000 8.213938e+000 vertex 4.982020e+001 4.391527e+000 7.500000e+000 vertex 3.482020e+001 3.891622e+000 8.213938e+000 endloop endfacet facet normal 0.000000e+000 9.063078e-001 4.226183e-001 outer loop vertex 4.982020e+001 4.391527e+000 7.500000e+000 vertex 4.982020e+001 4.759863e+000 6.710101e+000 vertex 3.482020e+001 4.391527e+000 7.500000e+000 endloop endfacet facet normal 0.000000e+000 9.659258e-001 2.588190e-001 outer loop vertex 4.982020e+001 4.759863e+000 6.710101e+000 vertex 4.982020e+001 4.985439e+000 5.868241e+000 vertex 3.482020e+001 4.759863e+000 6.710101e+000 endloop endfacet facet normal 1.432567e-016 1.253334e-017 -1.000000e+000 outer loop vertex 4.428222e+001 1.749552e+001 -8.881784e-016 vertex 4.982020e+001 2.506140e+001 0.000000e+000 vertex 4.432020e+001 1.706140e+001 -8.881784e-016 endloop endfacet facet normal 1.174024e-016 3.145787e-017 -1.000000e+000 outer loop vertex 4.428222e+001 1.749552e+001 -8.881784e-016 vertex 4.416943e+001 1.791645e+001 -8.881784e-016 vertex 4.982020e+001 2.506140e+001 0.000000e+000 endloop endfacet facet normal 9.887861e-017 4.610785e-017 -1.000000e+000 outer loop vertex 4.982020e+001 2.506140e+001 0.000000e+000 vertex 4.416943e+001 1.791645e+001 -8.881784e-016 vertex 4.398526e+001 1.831140e+001 -8.881784e-016 endloop endfacet facet normal 8.409715e-017 5.888546e-017 -1.000000e+000 outer loop vertex 4.373531e+001 1.866837e+001 -8.881784e-016 vertex 4.982020e+001 2.506140e+001 0.000000e+000 vertex 4.398526e+001 1.831140e+001 -8.881784e-016 endloop endfacet facet normal 7.118001e-017 7.118001e-017 -1.000000e+000 outer loop vertex 4.373531e+001 1.866837e+001 -8.881784e-016 vertex 4.342717e+001 1.897651e+001 -8.881784e-016 vertex 4.982020e+001 2.506140e+001 0.000000e+000 endloop endfacet facet normal 5.888546e-017 8.409715e-017 -1.000000e+000 outer loop vertex 4.982020e+001 2.506140e+001 0.000000e+000 vertex 4.342717e+001 1.897651e+001 -8.881784e-016 vertex 4.307020e+001 1.922646e+001 -8.881784e-016 endloop endfacet facet normal 4.610785e-017 9.887861e-017 -1.000000e+000 outer loop vertex 4.267525e+001 1.941063e+001 -8.881784e-016 vertex 4.982020e+001 2.506140e+001 0.000000e+000 vertex 4.307020e+001 1.922646e+001 -8.881784e-016 endloop endfacet facet normal 3.145787e-017 1.174024e-016 -1.000000e+000 outer loop vertex 4.267525e+001 1.941063e+001 -8.881784e-016 vertex 4.225432e+001 1.952342e+001 -8.881784e-016 vertex 4.982020e+001 2.506140e+001 0.000000e+000 endloop endfacet facet normal 1.253334e-017 1.432567e-016 -1.000000e+000 outer loop vertex 4.982020e+001 2.506140e+001 0.000000e+000 vertex 4.225432e+001 1.952342e+001 -8.881784e-016 vertex 4.182020e+001 1.956140e+001 -8.881784e-016 endloop endfacet facet normal -1.618835e-017 1.850337e-016 -1.000000e+000 outer loop vertex 4.138608e+001 1.952342e+001 -8.881784e-016 vertex 4.982020e+001 2.506140e+001 0.000000e+000 vertex 4.182020e+001 1.956140e+001 -8.881784e-016 endloop endfacet facet normal -7.259975e-017 2.709460e-016 -1.000000e+000 outer loop vertex 4.138608e+001 1.952342e+001 -8.881784e-016 vertex 4.096515e+001 1.941063e+001 -8.881784e-016 vertex 4.982020e+001 2.506140e+001 0.000000e+000 endloop endfacet facet normal 0.000000e+000 1.571783e-016 -1.000000e+000 outer loop vertex 4.982020e+001 2.506140e+001 0.000000e+000 vertex 4.096515e+001 1.941063e+001 -8.881784e-016 vertex -1.798000e-001 2.506140e+001 0.000000e+000 endloop endfacet facet normal -1.383491e-031 1.571783e-016 -1.000000e+000 outer loop vertex -1.798000e-001 2.506140e+001 0.000000e+000 vertex 4.096515e+001 1.941063e+001 -8.881784e-016 vertex 8.675250e+000 1.941063e+001 -8.881784e-016 endloop endfacet facet normal 7.259975e-017 2.709460e-016 -1.000000e+000 outer loop vertex 8.254320e+000 1.952342e+001 -8.881784e-016 vertex -1.798000e-001 2.506140e+001 0.000000e+000 vertex 8.675250e+000 1.941063e+001 -8.881784e-016 endloop endfacet facet normal 1.618835e-017 1.850337e-016 -1.000000e+000 outer loop vertex 8.254320e+000 1.952342e+001 -8.881784e-016 vertex 7.820200e+000 1.956140e+001 -8.881784e-016 vertex -1.798000e-001 2.506140e+001 0.000000e+000 endloop endfacet facet normal -1.253334e-017 1.432567e-016 -1.000000e+000 outer loop vertex -1.798000e-001 2.506140e+001 0.000000e+000 vertex 7.820200e+000 1.956140e+001 -8.881784e-016 vertex 7.386080e+000 1.952342e+001 -8.881784e-016 endloop endfacet facet normal -3.145787e-017 1.174024e-016 -1.000000e+000 outer loop vertex 6.965150e+000 1.941063e+001 -8.881784e-016 vertex -1.798000e-001 2.506140e+001 0.000000e+000 vertex 7.386080e+000 1.952342e+001 -8.881784e-016 endloop endfacet facet normal -4.610785e-017 9.887861e-017 -1.000000e+000 outer loop vertex 6.965150e+000 1.941063e+001 -8.881784e-016 vertex 6.570200e+000 1.922646e+001 -8.881784e-016 vertex -1.798000e-001 2.506140e+001 0.000000e+000 endloop endfacet facet normal -5.888546e-017 8.409715e-017 -1.000000e+000 outer loop vertex -1.798000e-001 2.506140e+001 0.000000e+000 vertex 6.570200e+000 1.922646e+001 -8.881784e-016 vertex 6.213231e+000 1.897651e+001 -8.881784e-016 endloop endfacet facet normal -7.118001e-017 7.118001e-017 -1.000000e+000 outer loop vertex 5.905089e+000 1.866837e+001 -8.881784e-016 vertex -1.798000e-001 2.506140e+001 0.000000e+000 vertex 6.213231e+000 1.897651e+001 -8.881784e-016 endloop endfacet facet normal -8.409715e-017 5.888546e-017 -1.000000e+000 outer loop vertex 5.905089e+000 1.866837e+001 -8.881784e-016 vertex 5.655136e+000 1.831140e+001 -8.881784e-016 vertex -1.798000e-001 2.506140e+001 0.000000e+000 endloop endfacet facet normal -9.887861e-017 4.610785e-017 -1.000000e+000 outer loop vertex -1.798000e-001 2.506140e+001 0.000000e+000 vertex 5.655136e+000 1.831140e+001 -8.881784e-016 vertex 5.470968e+000 1.791645e+001 -8.881784e-016 endloop endfacet facet normal -1.174024e-016 3.145787e-017 -1.000000e+000 outer loop vertex 5.358181e+000 1.749552e+001 -8.881784e-016 vertex -1.798000e-001 2.506140e+001 0.000000e+000 vertex 5.470968e+000 1.791645e+001 -8.881784e-016 endloop endfacet facet normal -1.432567e-016 1.253334e-017 -1.000000e+000 outer loop vertex 5.358181e+000 1.749552e+001 -8.881784e-016 vertex 5.320200e+000 1.706140e+001 -8.881784e-016 vertex -1.798000e-001 2.506140e+001 0.000000e+000 endloop endfacet facet normal -1.850337e-016 -1.618835e-017 -1.000000e+000 outer loop vertex -1.798000e-001 2.506140e+001 0.000000e+000 vertex 5.320200e+000 1.706140e+001 -8.881784e-016 vertex 5.358181e+000 1.662728e+001 -8.881784e-016 endloop endfacet facet normal -2.709460e-016 -7.259975e-017 -1.000000e+000 outer loop vertex 5.470968e+000 1.620635e+001 -8.881784e-016 vertex -1.798000e-001 2.506140e+001 0.000000e+000 vertex 5.358181e+000 1.662728e+001 -8.881784e-016 endloop endfacet facet normal -1.015055e-016 3.552714e-017 -1.000000e+000 outer loop vertex 5.470968e+000 1.620635e+001 -8.881784e-016 vertex -1.798000e-001 6.140000e-002 -8.881784e-016 vertex -1.798000e-001 2.506140e+001 0.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 5.470968e+000 1.620635e+001 -8.881784e-016 vertex 5.655136e+000 1.581140e+001 -8.881784e-016 vertex -1.798000e-001 6.140000e-002 -8.881784e-016 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex -1.798000e-001 6.140000e-002 -8.881784e-016 vertex 5.655136e+000 1.581140e+001 -8.881784e-016 vertex 5.905089e+000 1.545443e+001 -8.881784e-016 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 6.213231e+000 1.514629e+001 -8.881784e-016 vertex -1.798000e-001 6.140000e-002 -8.881784e-016 vertex 5.905089e+000 1.545443e+001 -8.881784e-016 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 6.213231e+000 1.514629e+001 -8.881784e-016 vertex 6.570200e+000 1.489634e+001 -8.881784e-016 vertex -1.798000e-001 6.140000e-002 -8.881784e-016 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex -1.798000e-001 6.140000e-002 -8.881784e-016 vertex 6.570200e+000 1.489634e+001 -8.881784e-016 vertex 6.965150e+000 1.471217e+001 -8.881784e-016 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 7.386080e+000 1.459938e+001 -8.881784e-016 vertex -1.798000e-001 6.140000e-002 -8.881784e-016 vertex 6.965150e+000 1.471217e+001 -8.881784e-016 endloop endfacet facet normal 6.691135e-017 -3.482212e-017 -1.000000e+000 outer loop vertex 7.386080e+000 1.459938e+001 -8.881784e-016 vertex 1.482020e+001 3.378025e+000 0.000000e+000 vertex -1.798000e-001 6.140000e-002 -8.881784e-016 endloop endfacet facet normal -7.350854e-018 -8.402064e-017 -1.000000e+000 outer loop vertex 7.386080e+000 1.459938e+001 -8.881784e-016 vertex 7.820200e+000 1.456140e+001 -8.881784e-016 vertex 1.482020e+001 3.378025e+000 0.000000e+000 endloop endfacet facet normal 6.587563e-018 -7.529618e-017 -1.000000e+000 outer loop vertex 1.482020e+001 3.378025e+000 0.000000e+000 vertex 7.820200e+000 1.456140e+001 -8.881784e-016 vertex 8.254320e+000 1.459938e+001 -8.881784e-016 endloop endfacet facet normal 7.134736e-017 4.995796e-017 -1.000000e+000 outer loop vertex 2.290509e+001 1.145443e+001 0.000000e+000 vertex 8.254320e+000 1.459938e+001 -8.881784e-016 vertex 2.265514e+001 1.181140e+001 0.000000e+000 endloop endfacet facet normal 4.990041e-017 -4.995282e-017 -1.000000e+000 outer loop vertex 2.290509e+001 1.145443e+001 0.000000e+000 vertex 1.482020e+001 3.378025e+000 0.000000e+000 vertex 8.254320e+000 1.459938e+001 -8.881784e-016 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 2.290509e+001 1.145443e+001 0.000000e+000 vertex 2.321323e+001 1.114629e+001 0.000000e+000 vertex 1.482020e+001 3.378025e+000 0.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 1.482020e+001 3.378025e+000 0.000000e+000 vertex 2.321323e+001 1.114629e+001 0.000000e+000 vertex 2.357020e+001 1.089634e+001 0.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 2.396515e+001 1.071217e+001 0.000000e+000 vertex 1.482020e+001 3.378025e+000 0.000000e+000 vertex 2.357020e+001 1.089634e+001 0.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 2.396515e+001 1.071217e+001 0.000000e+000 vertex 2.438608e+001 1.059938e+001 0.000000e+000 vertex 1.482020e+001 3.378025e+000 0.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 1.482020e+001 3.378025e+000 0.000000e+000 vertex 2.438608e+001 1.059938e+001 0.000000e+000 vertex 2.482020e+001 1.056140e+001 0.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 3.482020e+001 3.378025e+000 0.000000e+000 vertex 2.482020e+001 1.056140e+001 0.000000e+000 vertex 2.525432e+001 1.059938e+001 0.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 2.567525e+001 1.071217e+001 0.000000e+000 vertex 3.482020e+001 3.378025e+000 0.000000e+000 vertex 2.525432e+001 1.059938e+001 0.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 2.567525e+001 1.071217e+001 0.000000e+000 vertex 2.607020e+001 1.089634e+001 0.000000e+000 vertex 3.482020e+001 3.378025e+000 0.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 3.482020e+001 3.378025e+000 0.000000e+000 vertex 2.607020e+001 1.089634e+001 0.000000e+000 vertex 2.642717e+001 1.114629e+001 0.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 2.673531e+001 1.145443e+001 0.000000e+000 vertex 3.482020e+001 3.378025e+000 0.000000e+000 vertex 2.642717e+001 1.114629e+001 0.000000e+000 endloop endfacet facet normal -4.990041e-017 -4.995282e-017 -1.000000e+000 outer loop vertex 2.673531e+001 1.145443e+001 0.000000e+000 vertex 4.138608e+001 1.459938e+001 -8.881784e-016 vertex 3.482020e+001 3.378025e+000 0.000000e+000 endloop endfacet facet normal -7.134736e-017 4.995796e-017 -1.000000e+000 outer loop vertex 2.673531e+001 1.145443e+001 0.000000e+000 vertex 2.698526e+001 1.181140e+001 0.000000e+000 vertex 4.138608e+001 1.459938e+001 -8.881784e-016 endloop endfacet facet normal -3.580541e-017 -1.336276e-016 -1.000000e+000 outer loop vertex 4.138608e+001 1.459938e+001 -8.881784e-016 vertex 2.698526e+001 1.181140e+001 0.000000e+000 vertex 4.096515e+001 1.471217e+001 -8.881784e-016 endloop endfacet facet normal -7.033831e-017 3.279929e-017 -1.000000e+000 outer loop vertex 4.096515e+001 1.471217e+001 -8.881784e-016 vertex 2.698526e+001 1.181140e+001 0.000000e+000 vertex 2.716943e+001 1.220635e+001 0.000000e+000 endloop endfacet facet normal -7.004568e-017 1.876868e-017 -1.000000e+000 outer loop vertex 4.057020e+001 1.489634e+001 -8.881784e-016 vertex 2.716943e+001 1.220635e+001 0.000000e+000 vertex 2.728222e+001 1.262728e+001 0.000000e+000 endloop endfacet facet normal -6.785445e-017 5.936495e-018 -1.000000e+000 outer loop vertex 2.732020e+001 1.306140e+001 0.000000e+000 vertex 4.057020e+001 1.489634e+001 -8.881784e-016 vertex 2.728222e+001 1.262728e+001 0.000000e+000 endloop endfacet facet normal -5.596390e-017 -7.992473e-017 -1.000000e+000 outer loop vertex 2.732020e+001 1.306140e+001 0.000000e+000 vertex 4.021323e+001 1.514629e+001 -8.881784e-016 vertex 4.057020e+001 1.489634e+001 -8.881784e-016 endloop endfacet facet normal -6.792726e-017 -5.942865e-018 -1.000000e+000 outer loop vertex 2.732020e+001 1.306140e+001 0.000000e+000 vertex 2.728222e+001 1.349552e+001 0.000000e+000 vertex 4.021323e+001 1.514629e+001 -8.881784e-016 endloop endfacet facet normal -6.091015e-017 -6.091015e-017 -1.000000e+000 outer loop vertex 4.021323e+001 1.514629e+001 -8.881784e-016 vertex 2.728222e+001 1.349552e+001 0.000000e+000 vertex 3.990509e+001 1.545443e+001 -8.881784e-016 endloop endfacet facet normal -6.755360e-017 -1.810093e-017 -1.000000e+000 outer loop vertex 3.990509e+001 1.545443e+001 -8.881784e-016 vertex 2.728222e+001 1.349552e+001 0.000000e+000 vertex 2.716943e+001 1.391645e+001 0.000000e+000 endloop endfacet facet normal -6.643400e-017 -3.097868e-017 -1.000000e+000 outer loop vertex 3.965514e+001 1.581140e+001 -8.881784e-016 vertex 2.716943e+001 1.391645e+001 0.000000e+000 vertex 2.698526e+001 1.431140e+001 0.000000e+000 endloop endfacet facet normal -6.430222e-017 -4.502490e-017 -1.000000e+000 outer loop vertex 3.947097e+001 1.620635e+001 -8.881784e-016 vertex 2.698526e+001 1.431140e+001 0.000000e+000 vertex 2.673531e+001 1.466837e+001 0.000000e+000 endloop endfacet facet normal -6.091015e-017 -6.091015e-017 -1.000000e+000 outer loop vertex 3.935818e+001 1.662728e+001 -8.881784e-016 vertex 2.673531e+001 1.466837e+001 0.000000e+000 vertex 2.642717e+001 1.497651e+001 0.000000e+000 endloop endfacet facet normal -5.596390e-017 -7.992473e-017 -1.000000e+000 outer loop vertex 3.932020e+001 1.706140e+001 -8.881784e-016 vertex 2.642717e+001 1.497651e+001 0.000000e+000 vertex 2.607020e+001 1.522646e+001 0.000000e+000 endloop endfacet facet normal -7.004568e-017 1.876868e-017 -1.000000e+000 outer loop vertex 3.935818e+001 1.749552e+001 -8.881784e-016 vertex 2.607020e+001 1.522646e+001 0.000000e+000 vertex 3.947097e+001 1.791645e+001 -8.881784e-016 endloop endfacet facet normal -6.785445e-017 5.936495e-018 -1.000000e+000 outer loop vertex 3.935818e+001 1.749552e+001 -8.881784e-016 vertex 3.932020e+001 1.706140e+001 -8.881784e-016 vertex 2.607020e+001 1.522646e+001 0.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 4.096515e+001 1.941063e+001 -8.881784e-016 vertex 4.057020e+001 1.922646e+001 -8.881784e-016 vertex 8.675250e+000 1.941063e+001 -8.881784e-016 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 8.675250e+000 1.941063e+001 -8.881784e-016 vertex 4.057020e+001 1.922646e+001 -8.881784e-016 vertex 9.070200e+000 1.922646e+001 -8.881784e-016 endloop endfacet facet normal 3.279817e-031 -2.423364e-016 -1.000000e+000 outer loop vertex 9.070200e+000 1.922646e+001 -8.881784e-016 vertex 4.057020e+001 1.922646e+001 -8.881784e-016 vertex 2.482020e+001 1.556140e+001 0.000000e+000 endloop endfacet facet normal 1.631843e-017 -1.865205e-016 -1.000000e+000 outer loop vertex 9.427169e+000 1.897651e+001 -8.881784e-016 vertex 2.482020e+001 1.556140e+001 0.000000e+000 vertex 2.438608e+001 1.552342e+001 0.000000e+000 endloop endfacet facet normal 7.134736e-017 4.995796e-017 -1.000000e+000 outer loop vertex 9.735311e+000 1.866837e+001 -8.881784e-016 vertex 2.438608e+001 1.552342e+001 0.000000e+000 vertex 9.985264e+000 1.831140e+001 -8.881784e-016 endloop endfacet facet normal 7.719385e-017 7.719385e-017 -1.000000e+000 outer loop vertex 9.735311e+000 1.866837e+001 -8.881784e-016 vertex 9.427169e+000 1.897651e+001 -8.881784e-016 vertex 2.438608e+001 1.552342e+001 0.000000e+000 endloop endfacet facet normal -8.446175e-017 1.206239e-016 -1.000000e+000 outer loop vertex 4.021323e+001 1.897651e+001 -8.881784e-016 vertex 2.482020e+001 1.556140e+001 0.000000e+000 vertex 4.057020e+001 1.922646e+001 -8.881784e-016 endloop endfacet facet normal -1.631843e-017 -1.865205e-016 -1.000000e+000 outer loop vertex 4.021323e+001 1.897651e+001 -8.881784e-016 vertex 2.525432e+001 1.552342e+001 0.000000e+000 vertex 2.482020e+001 1.556140e+001 0.000000e+000 endloop endfacet facet normal -7.719385e-017 7.719385e-017 -1.000000e+000 outer loop vertex 4.021323e+001 1.897651e+001 -8.881784e-016 vertex 3.990509e+001 1.866837e+001 -8.881784e-016 vertex 2.525432e+001 1.552342e+001 0.000000e+000 endloop endfacet facet normal -7.134736e-017 4.995796e-017 -1.000000e+000 outer loop vertex 2.525432e+001 1.552342e+001 0.000000e+000 vertex 3.990509e+001 1.866837e+001 -8.881784e-016 vertex 3.965514e+001 1.831140e+001 -8.881784e-016 endloop endfacet facet normal -7.033831e-017 3.279929e-017 -1.000000e+000 outer loop vertex 2.567525e+001 1.541063e+001 0.000000e+000 vertex 3.965514e+001 1.831140e+001 -8.881784e-016 vertex 3.947097e+001 1.791645e+001 -8.881784e-016 endloop endfacet facet normal -4.633298e-017 -9.936140e-017 -1.000000e+000 outer loop vertex 2.607020e+001 1.522646e+001 0.000000e+000 vertex 2.567525e+001 1.541063e+001 0.000000e+000 vertex 3.947097e+001 1.791645e+001 -8.881784e-016 endloop endfacet facet normal -6.792726e-017 -5.942865e-018 -1.000000e+000 outer loop vertex 3.932020e+001 1.706140e+001 -8.881784e-016 vertex 3.935818e+001 1.662728e+001 -8.881784e-016 vertex 2.642717e+001 1.497651e+001 0.000000e+000 endloop endfacet facet normal -6.755360e-017 -1.810093e-017 -1.000000e+000 outer loop vertex 3.947097e+001 1.620635e+001 -8.881784e-016 vertex 2.673531e+001 1.466837e+001 0.000000e+000 vertex 3.935818e+001 1.662728e+001 -8.881784e-016 endloop endfacet facet normal -6.643400e-017 -3.097868e-017 -1.000000e+000 outer loop vertex 3.947097e+001 1.620635e+001 -8.881784e-016 vertex 3.965514e+001 1.581140e+001 -8.881784e-016 vertex 2.698526e+001 1.431140e+001 0.000000e+000 endloop endfacet facet normal -6.430222e-017 -4.502490e-017 -1.000000e+000 outer loop vertex 3.965514e+001 1.581140e+001 -8.881784e-016 vertex 3.990509e+001 1.545443e+001 -8.881784e-016 vertex 2.716943e+001 1.391645e+001 0.000000e+000 endloop endfacet facet normal -4.633298e-017 -9.936140e-017 -1.000000e+000 outer loop vertex 4.096515e+001 1.471217e+001 -8.881784e-016 vertex 2.716943e+001 1.220635e+001 0.000000e+000 vertex 4.057020e+001 1.489634e+001 -8.881784e-016 endloop endfacet facet normal -6.587563e-018 -7.529618e-017 -1.000000e+000 outer loop vertex 4.182020e+001 1.456140e+001 -8.881784e-016 vertex 3.482020e+001 3.378025e+000 0.000000e+000 vertex 4.138608e+001 1.459938e+001 -8.881784e-016 endloop endfacet facet normal 7.350854e-018 -8.402064e-017 -1.000000e+000 outer loop vertex 4.182020e+001 1.456140e+001 -8.881784e-016 vertex 4.225432e+001 1.459938e+001 -8.881784e-016 vertex 3.482020e+001 3.378025e+000 0.000000e+000 endloop endfacet facet normal -6.691135e-017 -3.482212e-017 -1.000000e+000 outer loop vertex 3.482020e+001 3.378025e+000 0.000000e+000 vertex 4.225432e+001 1.459938e+001 -8.881784e-016 vertex 4.982020e+001 6.140000e-002 -8.881784e-016 endloop endfacet facet normal -5.921189e-017 0.000000e+000 -1.000000e+000 outer loop vertex 3.482020e+001 6.140000e-002 0.000000e+000 vertex 3.482020e+001 3.378025e+000 0.000000e+000 vertex 4.982020e+001 6.140000e-002 -8.881784e-016 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 4.267525e+001 1.471217e+001 -8.881784e-016 vertex 4.982020e+001 6.140000e-002 -8.881784e-016 vertex 4.225432e+001 1.459938e+001 -8.881784e-016 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 4.267525e+001 1.471217e+001 -8.881784e-016 vertex 4.307020e+001 1.489634e+001 -8.881784e-016 vertex 4.982020e+001 6.140000e-002 -8.881784e-016 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 4.982020e+001 6.140000e-002 -8.881784e-016 vertex 4.307020e+001 1.489634e+001 -8.881784e-016 vertex 4.342717e+001 1.514629e+001 -8.881784e-016 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 4.373531e+001 1.545443e+001 -8.881784e-016 vertex 4.982020e+001 6.140000e-002 -8.881784e-016 vertex 4.342717e+001 1.514629e+001 -8.881784e-016 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 4.373531e+001 1.545443e+001 -8.881784e-016 vertex 4.398526e+001 1.581140e+001 -8.881784e-016 vertex 4.982020e+001 6.140000e-002 -8.881784e-016 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 4.982020e+001 6.140000e-002 -8.881784e-016 vertex 4.398526e+001 1.581140e+001 -8.881784e-016 vertex 4.416943e+001 1.620635e+001 -8.881784e-016 endloop endfacet facet normal 2.709460e-016 -7.259975e-017 -1.000000e+000 outer loop vertex 4.982020e+001 2.506140e+001 0.000000e+000 vertex 4.416943e+001 1.620635e+001 -8.881784e-016 vertex 4.428222e+001 1.662728e+001 -8.881784e-016 endloop endfacet facet normal 1.850337e-016 -1.618835e-017 -1.000000e+000 outer loop vertex 4.432020e+001 1.706140e+001 -8.881784e-016 vertex 4.982020e+001 2.506140e+001 0.000000e+000 vertex 4.428222e+001 1.662728e+001 -8.881784e-016 endloop endfacet facet normal -3.580541e-017 -1.336276e-016 -1.000000e+000 outer loop vertex 2.567525e+001 1.541063e+001 0.000000e+000 vertex 2.525432e+001 1.552342e+001 0.000000e+000 vertex 3.965514e+001 1.831140e+001 -8.881784e-016 endloop endfacet facet normal 3.580541e-017 -1.336276e-016 -1.000000e+000 outer loop vertex 2.438608e+001 1.552342e+001 0.000000e+000 vertex 2.396515e+001 1.541063e+001 0.000000e+000 vertex 9.985264e+000 1.831140e+001 -8.881784e-016 endloop endfacet facet normal 7.033831e-017 3.279929e-017 -1.000000e+000 outer loop vertex 9.985264e+000 1.831140e+001 -8.881784e-016 vertex 2.396515e+001 1.541063e+001 0.000000e+000 vertex 1.016943e+001 1.791645e+001 -8.881784e-016 endloop endfacet facet normal 4.633298e-017 -9.936140e-017 -1.000000e+000 outer loop vertex 1.016943e+001 1.791645e+001 -8.881784e-016 vertex 2.396515e+001 1.541063e+001 0.000000e+000 vertex 2.357020e+001 1.522646e+001 0.000000e+000 endloop endfacet facet normal 6.785445e-017 5.936495e-018 -1.000000e+000 outer loop vertex 1.028222e+001 1.749552e+001 -8.881784e-016 vertex 2.357020e+001 1.522646e+001 0.000000e+000 vertex 1.032020e+001 1.706140e+001 -8.881784e-016 endloop endfacet facet normal 7.004568e-017 1.876868e-017 -1.000000e+000 outer loop vertex 1.028222e+001 1.749552e+001 -8.881784e-016 vertex 1.016943e+001 1.791645e+001 -8.881784e-016 vertex 2.357020e+001 1.522646e+001 0.000000e+000 endloop endfacet facet normal 5.596390e-017 -7.992473e-017 -1.000000e+000 outer loop vertex 2.357020e+001 1.522646e+001 0.000000e+000 vertex 2.321323e+001 1.497651e+001 0.000000e+000 vertex 1.032020e+001 1.706140e+001 -8.881784e-016 endloop endfacet facet normal 6.792726e-017 -5.942865e-018 -1.000000e+000 outer loop vertex 1.032020e+001 1.706140e+001 -8.881784e-016 vertex 2.321323e+001 1.497651e+001 0.000000e+000 vertex 1.028222e+001 1.662728e+001 -8.881784e-016 endloop endfacet facet normal 6.091015e-017 -6.091015e-017 -1.000000e+000 outer loop vertex 1.028222e+001 1.662728e+001 -8.881784e-016 vertex 2.321323e+001 1.497651e+001 0.000000e+000 vertex 2.290509e+001 1.466837e+001 0.000000e+000 endloop endfacet facet normal 6.430222e-017 -4.502490e-017 -1.000000e+000 outer loop vertex 1.016943e+001 1.620635e+001 -8.881784e-016 vertex 2.290509e+001 1.466837e+001 0.000000e+000 vertex 2.265514e+001 1.431140e+001 0.000000e+000 endloop endfacet facet normal 6.643400e-017 -3.097868e-017 -1.000000e+000 outer loop vertex 9.985264e+000 1.581140e+001 -8.881784e-016 vertex 2.265514e+001 1.431140e+001 0.000000e+000 vertex 2.247097e+001 1.391645e+001 0.000000e+000 endloop endfacet facet normal 6.755360e-017 -1.810093e-017 -1.000000e+000 outer loop vertex 9.735311e+000 1.545443e+001 -8.881784e-016 vertex 2.247097e+001 1.391645e+001 0.000000e+000 vertex 2.235818e+001 1.349552e+001 0.000000e+000 endloop endfacet facet normal 6.792726e-017 -5.942865e-018 -1.000000e+000 outer loop vertex 9.427169e+000 1.514629e+001 -8.881784e-016 vertex 2.235818e+001 1.349552e+001 0.000000e+000 vertex 2.232020e+001 1.306140e+001 0.000000e+000 endloop endfacet facet normal 6.785445e-017 5.936495e-018 -1.000000e+000 outer loop vertex 9.070200e+000 1.489634e+001 -8.881784e-016 vertex 2.232020e+001 1.306140e+001 0.000000e+000 vertex 2.235818e+001 1.262728e+001 0.000000e+000 endloop endfacet facet normal 7.004568e-017 1.876868e-017 -1.000000e+000 outer loop vertex 2.247097e+001 1.220635e+001 0.000000e+000 vertex 9.070200e+000 1.489634e+001 -8.881784e-016 vertex 2.235818e+001 1.262728e+001 0.000000e+000 endloop endfacet facet normal 4.633298e-017 -9.936140e-017 -1.000000e+000 outer loop vertex 2.247097e+001 1.220635e+001 0.000000e+000 vertex 8.675250e+000 1.471217e+001 -8.881784e-016 vertex 9.070200e+000 1.489634e+001 -8.881784e-016 endloop endfacet facet normal 7.033831e-017 3.279929e-017 -1.000000e+000 outer loop vertex 2.247097e+001 1.220635e+001 0.000000e+000 vertex 2.265514e+001 1.181140e+001 0.000000e+000 vertex 8.675250e+000 1.471217e+001 -8.881784e-016 endloop endfacet facet normal 3.580541e-017 -1.336276e-016 -1.000000e+000 outer loop vertex 8.675250e+000 1.471217e+001 -8.881784e-016 vertex 2.265514e+001 1.181140e+001 0.000000e+000 vertex 8.254320e+000 1.459938e+001 -8.881784e-016 endloop endfacet facet normal 8.446175e-017 1.206239e-016 -1.000000e+000 outer loop vertex 9.427169e+000 1.897651e+001 -8.881784e-016 vertex 9.070200e+000 1.922646e+001 -8.881784e-016 vertex 2.482020e+001 1.556140e+001 0.000000e+000 endloop endfacet facet normal 5.596390e-017 -7.992473e-017 -1.000000e+000 outer loop vertex 9.427169e+000 1.514629e+001 -8.881784e-016 vertex 2.232020e+001 1.306140e+001 0.000000e+000 vertex 9.070200e+000 1.489634e+001 -8.881784e-016 endloop endfacet facet normal 6.091015e-017 -6.091015e-017 -1.000000e+000 outer loop vertex 9.427169e+000 1.514629e+001 -8.881784e-016 vertex 9.735311e+000 1.545443e+001 -8.881784e-016 vertex 2.235818e+001 1.349552e+001 0.000000e+000 endloop endfacet facet normal 6.430222e-017 -4.502490e-017 -1.000000e+000 outer loop vertex 9.985264e+000 1.581140e+001 -8.881784e-016 vertex 2.247097e+001 1.391645e+001 0.000000e+000 vertex 9.735311e+000 1.545443e+001 -8.881784e-016 endloop endfacet facet normal 6.643400e-017 -3.097868e-017 -1.000000e+000 outer loop vertex 9.985264e+000 1.581140e+001 -8.881784e-016 vertex 1.016943e+001 1.620635e+001 -8.881784e-016 vertex 2.265514e+001 1.431140e+001 0.000000e+000 endloop endfacet facet normal 6.755360e-017 -1.810093e-017 -1.000000e+000 outer loop vertex 1.028222e+001 1.662728e+001 -8.881784e-016 vertex 2.290509e+001 1.466837e+001 0.000000e+000 vertex 1.016943e+001 1.620635e+001 -8.881784e-016 endloop endfacet facet normal 5.921189e-017 0.000000e+000 -1.000000e+000 outer loop vertex 1.482020e+001 3.378025e+000 0.000000e+000 vertex 1.482020e+001 6.140000e-002 0.000000e+000 vertex -1.798000e-001 6.140000e-002 -8.881784e-016 endloop endfacet facet normal 1.015055e-016 3.552714e-017 -1.000000e+000 outer loop vertex 4.982020e+001 2.506140e+001 0.000000e+000 vertex 4.982020e+001 6.140000e-002 -8.881784e-016 vertex 4.416943e+001 1.620635e+001 -8.881784e-016 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 3.482020e+001 3.378025e+000 0.000000e+000 vertex 1.482020e+001 3.378025e+000 0.000000e+000 vertex 2.482020e+001 1.056140e+001 0.000000e+000 endloop endfacet facet normal 0.000000e+000 1.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 2.506140e+001 5.000000e+000 vertex 4.982020e+001 2.506140e+001 0.000000e+000 vertex -1.798000e-001 2.506140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 1.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 2.506140e+001 5.000000e+000 vertex 4.982020e+001 2.506140e+001 0.000000e+000 vertex -1.798000e-001 2.506140e+001 0.000000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -2.938600e+000 5.000000e+000 vertex -1.798000e-001 -2.893023e+000 4.479055e+000 vertex -1.798000e-001 -4.938600e+000 5.000000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -4.862639e+000 5.868241e+000 vertex -1.798000e-001 -2.938600e+000 5.000000e+000 vertex -1.798000e-001 -4.938600e+000 5.000000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -4.862639e+000 5.868241e+000 vertex -1.798000e-001 -2.893023e+000 5.520945e+000 vertex -1.798000e-001 -2.938600e+000 5.000000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -4.862639e+000 5.868241e+000 vertex -1.798000e-001 -4.637063e+000 6.710101e+000 vertex -1.798000e-001 -2.893023e+000 5.520945e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -2.893023e+000 5.520945e+000 vertex -1.798000e-001 -4.637063e+000 6.710101e+000 vertex -1.798000e-001 -2.757678e+000 6.026060e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -2.757678e+000 6.026060e+000 vertex -1.798000e-001 -4.637063e+000 6.710101e+000 vertex -1.798000e-001 -4.268727e+000 7.500000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -2.536676e+000 6.500000e+000 vertex -1.798000e-001 -4.268727e+000 7.500000e+000 vertex -1.798000e-001 -3.768822e+000 8.213938e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -2.236733e+000 6.928363e+000 vertex -1.798000e-001 -3.768822e+000 8.213938e+000 vertex -1.798000e-001 -3.152538e+000 8.830222e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -1.866963e+000 7.298133e+000 vertex -1.798000e-001 -3.152538e+000 8.830222e+000 vertex -1.798000e-001 -1.438600e+000 7.598076e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -1.866963e+000 7.298133e+000 vertex -1.798000e-001 -2.236733e+000 6.928363e+000 vertex -1.798000e-001 -3.152538e+000 8.830222e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -2.893023e+000 4.479055e+000 vertex -1.798000e-001 -2.757678e+000 3.973940e+000 vertex -1.798000e-001 -4.862639e+000 4.131759e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -4.938600e+000 5.000000e+000 vertex -1.798000e-001 -2.893023e+000 4.479055e+000 vertex -1.798000e-001 -4.862639e+000 4.131759e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -2.536676e+000 3.500000e+000 vertex -1.798000e-001 -4.637063e+000 3.289899e+000 vertex -1.798000e-001 -2.757678e+000 3.973940e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -2.536676e+000 3.500000e+000 vertex -1.798000e-001 -4.268727e+000 2.500000e+000 vertex -1.798000e-001 -4.637063e+000 3.289899e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -2.536676e+000 3.500000e+000 vertex -1.798000e-001 -2.236733e+000 3.071637e+000 vertex -1.798000e-001 -4.268727e+000 2.500000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -4.268727e+000 2.500000e+000 vertex -1.798000e-001 -2.236733e+000 3.071637e+000 vertex -1.798000e-001 -3.768822e+000 1.786062e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -3.768822e+000 1.786062e+000 vertex -1.798000e-001 -2.236733e+000 3.071637e+000 vertex -1.798000e-001 -1.866963e+000 2.701867e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -3.152538e+000 1.169778e+000 vertex -1.798000e-001 -1.866963e+000 2.701867e+000 vertex -1.798000e-001 -2.438600e+000 6.698730e-001 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -3.152538e+000 1.169778e+000 vertex -1.798000e-001 -3.768822e+000 1.786062e+000 vertex -1.798000e-001 -1.866963e+000 2.701867e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -1.438600e+000 2.401924e+000 vertex -1.798000e-001 -2.438600e+000 6.698730e-001 vertex -1.798000e-001 -1.866963e+000 2.701867e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -1.438600e+000 2.401924e+000 vertex -1.798000e-001 -1.648701e+000 3.015369e-001 vertex -1.798000e-001 -2.438600e+000 6.698730e-001 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -1.438600e+000 2.401924e+000 vertex -1.798000e-001 -9.646604e-001 2.180922e+000 vertex -1.798000e-001 -1.648701e+000 3.015369e-001 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -1.648701e+000 3.015369e-001 vertex -1.798000e-001 -9.646604e-001 2.180922e+000 vertex -1.798000e-001 -8.068409e-001 7.596123e-002 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -8.068409e-001 7.596123e-002 vertex -1.798000e-001 -9.646604e-001 2.180922e+000 vertex -1.798000e-001 -4.595445e-001 2.045577e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 6.140000e-002 -8.881784e-016 vertex -1.798000e-001 -4.595445e-001 2.045577e+000 vertex -1.798000e-001 6.140000e-002 2.000000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 5.823445e-001 2.045577e+000 vertex -1.798000e-001 6.140000e-002 -8.881784e-016 vertex -1.798000e-001 6.140000e-002 2.000000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 5.823445e-001 2.045577e+000 vertex -1.798000e-001 1.087460e+000 2.180922e+000 vertex -1.798000e-001 6.140000e-002 -8.881784e-016 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 6.140000e-002 -8.881784e-016 vertex -1.798000e-001 1.087460e+000 2.180922e+000 vertex -1.798000e-001 1.561400e+000 2.401924e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 1.989763e+000 2.701867e+000 vertex -1.798000e-001 6.140000e-002 -8.881784e-016 vertex -1.798000e-001 1.561400e+000 2.401924e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 1.989763e+000 2.701867e+000 vertex -1.798000e-001 2.359533e+000 3.071637e+000 vertex -1.798000e-001 6.140000e-002 -8.881784e-016 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 6.140000e-002 -8.881784e-016 vertex -1.798000e-001 2.359533e+000 3.071637e+000 vertex -1.798000e-001 2.506140e+001 0.000000e+000 endloop endfacet facet normal -1.000000e+000 -2.095500e-016 -1.548743e-015 outer loop vertex -1.798000e-001 2.506140e+001 0.000000e+000 vertex -1.798000e-001 2.359533e+000 3.071637e+000 vertex -1.798000e-001 5.061400e+000 5.000000e+000 endloop endfacet facet normal -1.000000e+000 1.776357e-016 0.000000e+000 outer loop vertex -1.798000e-001 2.506140e+001 5.000000e+000 vertex -1.798000e-001 2.506140e+001 0.000000e+000 vertex -1.798000e-001 5.061400e+000 5.000000e+000 endloop endfacet facet normal -1.000000e+000 -2.628500e-015 1.840496e-015 outer loop vertex -1.798000e-001 2.359533e+000 3.071637e+000 vertex -1.798000e-001 2.659476e+000 3.500000e+000 vertex -1.798000e-001 5.061400e+000 5.000000e+000 endloop endfacet facet normal -1.000000e+000 -2.086809e-015 9.730950e-016 outer loop vertex -1.798000e-001 5.061400e+000 5.000000e+000 vertex -1.798000e-001 2.659476e+000 3.500000e+000 vertex -1.798000e-001 2.880478e+000 3.973940e+000 endloop endfacet facet normal -1.000000e+000 -1.863973e-015 4.994500e-016 outer loop vertex -1.798000e-001 3.015823e+000 4.479055e+000 vertex -1.798000e-001 5.061400e+000 5.000000e+000 vertex -1.798000e-001 2.880478e+000 3.973940e+000 endloop endfacet facet normal -1.000000e+000 -1.776357e-015 1.554111e-016 outer loop vertex -1.798000e-001 3.015823e+000 4.479055e+000 vertex -1.798000e-001 3.061400e+000 5.000000e+000 vertex -1.798000e-001 5.061400e+000 5.000000e+000 endloop endfacet facet normal -1.000000e+000 -1.776357e-015 -1.554111e-016 outer loop vertex -1.798000e-001 5.061400e+000 5.000000e+000 vertex -1.798000e-001 3.061400e+000 5.000000e+000 vertex -1.798000e-001 3.015823e+000 5.520945e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 4.985439e+000 5.868241e+000 vertex -1.798000e-001 3.015823e+000 5.520945e+000 vertex -1.798000e-001 2.880478e+000 6.026060e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 4.759863e+000 6.710101e+000 vertex -1.798000e-001 2.880478e+000 6.026060e+000 vertex -1.798000e-001 2.659476e+000 6.500000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 4.391527e+000 7.500000e+000 vertex -1.798000e-001 2.659476e+000 6.500000e+000 vertex -1.798000e-001 2.359533e+000 6.928363e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 3.891622e+000 8.213938e+000 vertex -1.798000e-001 2.359533e+000 6.928363e+000 vertex -1.798000e-001 1.989763e+000 7.298133e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 3.275338e+000 8.830222e+000 vertex -1.798000e-001 1.989763e+000 7.298133e+000 vertex -1.798000e-001 2.561400e+000 9.330127e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 3.275338e+000 8.830222e+000 vertex -1.798000e-001 3.891622e+000 8.213938e+000 vertex -1.798000e-001 1.989763e+000 7.298133e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 1.989763e+000 7.298133e+000 vertex -1.798000e-001 1.561400e+000 7.598076e+000 vertex -1.798000e-001 2.561400e+000 9.330127e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 2.561400e+000 9.330127e+000 vertex -1.798000e-001 1.561400e+000 7.598076e+000 vertex -1.798000e-001 1.771501e+000 9.698463e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 1.771501e+000 9.698463e+000 vertex -1.798000e-001 1.561400e+000 7.598076e+000 vertex -1.798000e-001 1.087460e+000 7.819078e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 9.296409e-001 9.924039e+000 vertex -1.798000e-001 1.087460e+000 7.819078e+000 vertex -1.798000e-001 5.823445e-001 7.954423e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 6.140000e-002 1.000000e+001 vertex -1.798000e-001 5.823445e-001 7.954423e+000 vertex -1.798000e-001 6.140000e-002 8.000000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -8.068409e-001 9.924039e+000 vertex -1.798000e-001 6.140000e-002 8.000000e+000 vertex -1.798000e-001 -4.595445e-001 7.954423e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -1.648701e+000 9.698463e+000 vertex -1.798000e-001 -4.595445e-001 7.954423e+000 vertex -1.798000e-001 -9.646604e-001 7.819078e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -2.438600e+000 9.330127e+000 vertex -1.798000e-001 -9.646604e-001 7.819078e+000 vertex -1.798000e-001 -1.438600e+000 7.598076e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -3.152538e+000 8.830222e+000 vertex -1.798000e-001 -2.438600e+000 9.330127e+000 vertex -1.798000e-001 -1.438600e+000 7.598076e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -2.536676e+000 6.500000e+000 vertex -1.798000e-001 -3.768822e+000 8.213938e+000 vertex -1.798000e-001 -2.236733e+000 6.928363e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -4.268727e+000 7.500000e+000 vertex -1.798000e-001 -2.536676e+000 6.500000e+000 vertex -1.798000e-001 -2.757678e+000 6.026060e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 6.140000e-002 -8.881784e-016 vertex -1.798000e-001 -8.068409e-001 7.596123e-002 vertex -1.798000e-001 -4.595445e-001 2.045577e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -4.637063e+000 3.289899e+000 vertex -1.798000e-001 -4.862639e+000 4.131759e+000 vertex -1.798000e-001 -2.757678e+000 3.973940e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -2.438600e+000 9.330127e+000 vertex -1.798000e-001 -1.648701e+000 9.698463e+000 vertex -1.798000e-001 -9.646604e-001 7.819078e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -1.648701e+000 9.698463e+000 vertex -1.798000e-001 -8.068409e-001 9.924039e+000 vertex -1.798000e-001 -4.595445e-001 7.954423e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 6.140000e-002 1.000000e+001 vertex -1.798000e-001 6.140000e-002 8.000000e+000 vertex -1.798000e-001 -8.068409e-001 9.924039e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 6.140000e-002 1.000000e+001 vertex -1.798000e-001 9.296409e-001 9.924039e+000 vertex -1.798000e-001 5.823445e-001 7.954423e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 9.296409e-001 9.924039e+000 vertex -1.798000e-001 1.771501e+000 9.698463e+000 vertex -1.798000e-001 1.087460e+000 7.819078e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 2.359533e+000 6.928363e+000 vertex -1.798000e-001 3.891622e+000 8.213938e+000 vertex -1.798000e-001 4.391527e+000 7.500000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 4.391527e+000 7.500000e+000 vertex -1.798000e-001 4.759863e+000 6.710101e+000 vertex -1.798000e-001 2.659476e+000 6.500000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 4.759863e+000 6.710101e+000 vertex -1.798000e-001 4.985439e+000 5.868241e+000 vertex -1.798000e-001 2.880478e+000 6.026060e+000 endloop endfacet facet normal -1.000000e+000 -7.105427e-016 4.029688e-015 outer loop vertex -1.798000e-001 4.985439e+000 5.868241e+000 vertex -1.798000e-001 5.061400e+000 5.000000e+000 vertex -1.798000e-001 3.015823e+000 5.520945e+000 endloop endfacet facet normal -1.061532e-017 -8.715574e-002 -9.961947e-001 outer loop vertex 1.482020e+001 6.140000e-002 0.000000e+000 vertex 1.482020e+001 -8.068409e-001 7.596123e-002 vertex -1.798000e-001 -8.068409e-001 7.596123e-002 endloop endfacet facet normal 5.124559e-017 -8.715574e-002 -9.961947e-001 outer loop vertex -1.798000e-001 6.140000e-002 -8.881784e-016 vertex 1.482020e+001 6.140000e-002 0.000000e+000 vertex -1.798000e-001 -8.068409e-001 7.596123e-002 endloop endfacet facet normal 2.547676e-017 -2.588190e-001 -9.659258e-001 outer loop vertex 1.482020e+001 -8.068409e-001 7.596123e-002 vertex 1.482020e+001 -1.648701e+000 3.015369e-001 vertex -1.798000e-001 -1.648701e+000 3.015369e-001 endloop endfacet facet normal -3.065033e-017 -2.588190e-001 -9.659258e-001 outer loop vertex -1.798000e-001 -8.068409e-001 7.596123e-002 vertex 1.482020e+001 -8.068409e-001 7.596123e-002 vertex -1.798000e-001 -1.648701e+000 3.015369e-001 endloop endfacet facet normal 4.246127e-018 -4.226183e-001 -9.063078e-001 outer loop vertex 1.482020e+001 -1.648701e+000 3.015369e-001 vertex 1.482020e+001 -2.438600e+000 6.698730e-001 vertex -1.798000e-001 -2.438600e+000 6.698730e-001 endloop endfacet facet normal 3.616145e-018 -4.226183e-001 -9.063078e-001 outer loop vertex -1.798000e-001 -1.648701e+000 3.015369e-001 vertex 1.482020e+001 -1.648701e+000 3.015369e-001 vertex -1.798000e-001 -2.438600e+000 6.698730e-001 endloop endfacet facet normal 8.492254e-018 -5.735764e-001 -8.191520e-001 outer loop vertex 1.482020e+001 -2.438600e+000 6.698730e-001 vertex 1.482020e+001 -3.152538e+000 1.169778e+000 vertex -1.798000e-001 -3.152538e+000 1.169778e+000 endloop endfacet facet normal -2.427694e-017 -5.735764e-001 -8.191520e-001 outer loop vertex -1.798000e-001 -2.438600e+000 6.698730e-001 vertex 1.482020e+001 -2.438600e+000 6.698730e-001 vertex -1.798000e-001 -3.152538e+000 1.169778e+000 endloop endfacet facet normal 0.000000e+000 -7.071068e-001 -7.071068e-001 outer loop vertex 1.482020e+001 -3.152538e+000 1.169778e+000 vertex 1.482020e+001 -3.768822e+000 1.786062e+000 vertex -1.798000e-001 -3.768822e+000 1.786062e+000 endloop endfacet facet normal -4.186913e-017 -7.071068e-001 -7.071068e-001 outer loop vertex -1.798000e-001 -3.152538e+000 1.169778e+000 vertex 1.482020e+001 -3.152538e+000 1.169778e+000 vertex -1.798000e-001 -3.768822e+000 1.786062e+000 endloop endfacet facet normal 2.123063e-017 -8.191520e-001 -5.735764e-001 outer loop vertex 1.482020e+001 -3.768822e+000 1.786062e+000 vertex 1.482020e+001 -4.268727e+000 2.500000e+000 vertex -1.798000e-001 -4.268727e+000 2.500000e+000 endloop endfacet facet normal -2.908199e-017 -8.191520e-001 -5.735764e-001 outer loop vertex -1.798000e-001 -3.768822e+000 1.786062e+000 vertex 1.482020e+001 -3.768822e+000 1.786062e+000 vertex -1.798000e-001 -4.268727e+000 2.500000e+000 endloop endfacet facet normal -3.616145e-018 -9.063078e-001 -4.226183e-001 outer loop vertex 1.482020e+001 -4.268727e+000 2.500000e+000 vertex 1.482020e+001 -4.637063e+000 3.289899e+000 vertex -1.798000e-001 -4.268727e+000 2.500000e+000 endloop endfacet facet normal 0.000000e+000 -9.063078e-001 -4.226183e-001 outer loop vertex -1.798000e-001 -4.268727e+000 2.500000e+000 vertex 1.482020e+001 -4.637063e+000 3.289899e+000 vertex -1.798000e-001 -4.637063e+000 3.289899e+000 endloop endfacet facet normal 0.000000e+000 -9.659258e-001 -2.588190e-001 outer loop vertex -1.798000e-001 -4.637063e+000 3.289899e+000 vertex 1.482020e+001 -4.637063e+000 3.289899e+000 vertex -1.798000e-001 -4.862639e+000 4.131759e+000 endloop endfacet facet normal 6.130066e-017 -9.659258e-001 -2.588190e-001 outer loop vertex -1.798000e-001 -4.862639e+000 4.131759e+000 vertex 1.482020e+001 -4.637063e+000 3.289899e+000 vertex 1.482020e+001 -4.862639e+000 4.131759e+000 endloop endfacet facet normal -2.802264e-017 -9.961947e-001 -8.715574e-002 outer loop vertex -1.798000e-001 -4.938600e+000 5.000000e+000 vertex 1.482020e+001 -4.862639e+000 4.131759e+000 vertex 1.482020e+001 -4.938600e+000 5.000000e+000 endloop endfacet facet normal 3.318329e-017 -9.961947e-001 8.715574e-002 outer loop vertex -1.798000e-001 -4.862639e+000 5.868241e+000 vertex 1.482020e+001 -4.938600e+000 5.000000e+000 vertex 1.482020e+001 -4.862639e+000 5.868241e+000 endloop endfacet facet normal 0.000000e+000 -9.659258e-001 2.588190e-001 outer loop vertex -1.798000e-001 -4.637063e+000 6.710101e+000 vertex 1.482020e+001 -4.862639e+000 5.868241e+000 vertex 1.482020e+001 -4.637063e+000 6.710101e+000 endloop endfacet facet normal 7.232290e-018 -9.063078e-001 4.226183e-001 outer loop vertex -1.798000e-001 -4.268727e+000 7.500000e+000 vertex 1.482020e+001 -4.637063e+000 6.710101e+000 vertex 1.482020e+001 -4.268727e+000 7.500000e+000 endloop endfacet facet normal 0.000000e+000 -8.191520e-001 5.735764e-001 outer loop vertex -1.798000e-001 -3.768822e+000 8.213938e+000 vertex 1.482020e+001 -4.268727e+000 7.500000e+000 vertex 1.482020e+001 -3.768822e+000 8.213938e+000 endloop endfacet facet normal -2.172279e-030 -7.071068e-001 7.071068e-001 outer loop vertex -1.798000e-001 -3.152538e+000 8.830222e+000 vertex 1.482020e+001 -3.768822e+000 8.213938e+000 vertex 1.482020e+001 -3.152538e+000 8.830222e+000 endloop endfacet facet normal 3.884310e-017 -5.735764e-001 8.191520e-001 outer loop vertex -1.798000e-001 -2.438600e+000 9.330127e+000 vertex 1.482020e+001 -3.152538e+000 8.830222e+000 vertex 1.482020e+001 -2.438600e+000 9.330127e+000 endloop endfacet facet normal 0.000000e+000 -4.226183e-001 9.063078e-001 outer loop vertex -1.798000e-001 -1.648701e+000 9.698463e+000 vertex 1.482020e+001 -2.438600e+000 9.330127e+000 vertex 1.482020e+001 -1.648701e+000 9.698463e+000 endloop endfacet facet normal 8.428841e-017 -2.588190e-001 9.659258e-001 outer loop vertex -1.798000e-001 -8.068409e-001 9.924039e+000 vertex 1.482020e+001 -1.648701e+000 9.698463e+000 vertex 1.482020e+001 -8.068409e-001 9.924039e+000 endloop endfacet facet normal 0.000000e+000 -8.715574e-002 9.961947e-001 outer loop vertex -1.798000e-001 6.140000e-002 1.000000e+001 vertex 1.482020e+001 -8.068409e-001 9.924039e+000 vertex 1.482020e+001 6.140000e-002 1.000000e+001 endloop endfacet facet normal -2.322295e-017 8.715574e-002 9.961947e-001 outer loop vertex -1.798000e-001 9.296409e-001 9.924039e+000 vertex 1.482020e+001 6.140000e-002 1.000000e+001 vertex 1.482020e+001 9.296409e-001 9.924039e+000 endloop endfacet facet normal 4.159406e-017 2.588190e-001 9.659258e-001 outer loop vertex -1.798000e-001 1.771501e+000 9.698463e+000 vertex 1.482020e+001 9.296409e-001 9.924039e+000 vertex 1.482020e+001 1.771501e+000 9.698463e+000 endloop endfacet facet normal 0.000000e+000 4.226183e-001 9.063078e-001 outer loop vertex -1.798000e-001 2.561400e+000 9.330127e+000 vertex 1.482020e+001 1.771501e+000 9.698463e+000 vertex 1.482020e+001 2.561400e+000 9.330127e+000 endloop endfacet facet normal 5.816399e-017 5.735764e-001 8.191520e-001 outer loop vertex -1.798000e-001 3.275338e+000 8.830222e+000 vertex 1.482020e+001 2.561400e+000 9.330127e+000 vertex 1.482020e+001 3.275338e+000 8.830222e+000 endloop endfacet facet normal 0.000000e+000 7.071068e-001 7.071068e-001 outer loop vertex -1.798000e-001 3.891622e+000 8.213938e+000 vertex 1.482020e+001 3.275338e+000 8.830222e+000 vertex 1.482020e+001 3.891622e+000 8.213938e+000 endloop endfacet facet normal 3.884310e-017 8.191520e-001 5.735764e-001 outer loop vertex -1.798000e-001 4.391527e+000 7.500000e+000 vertex 1.482020e+001 3.891622e+000 8.213938e+000 vertex 1.482020e+001 4.391527e+000 7.500000e+000 endloop endfacet facet normal 7.145594e-017 9.063078e-001 4.226183e-001 outer loop vertex -1.798000e-001 4.759863e+000 6.710101e+000 vertex 1.482020e+001 4.391527e+000 7.500000e+000 vertex 1.482020e+001 4.759863e+000 6.710101e+000 endloop endfacet facet normal 0.000000e+000 9.659258e-001 2.588190e-001 outer loop vertex -1.798000e-001 4.985439e+000 5.868241e+000 vertex 1.482020e+001 4.759863e+000 6.710101e+000 vertex 1.482020e+001 4.985439e+000 5.868241e+000 endloop endfacet facet normal 0.000000e+000 9.961947e-001 8.715574e-002 outer loop vertex 1.482020e+001 5.061400e+000 5.000000e+000 vertex -1.798000e-001 4.985439e+000 5.868241e+000 vertex 1.482020e+001 4.985439e+000 5.868241e+000 endloop endfacet facet normal 0.000000e+000 9.961947e-001 8.715574e-002 outer loop vertex 1.482020e+001 5.061400e+000 5.000000e+000 vertex -1.798000e-001 5.061400e+000 5.000000e+000 vertex -1.798000e-001 4.985439e+000 5.868241e+000 endloop endfacet facet normal 1.910757e-017 9.659258e-001 2.588190e-001 outer loop vertex -1.798000e-001 4.985439e+000 5.868241e+000 vertex -1.798000e-001 4.759863e+000 6.710101e+000 vertex 1.482020e+001 4.759863e+000 6.710101e+000 endloop endfacet facet normal -8.492254e-018 9.063078e-001 4.226183e-001 outer loop vertex -1.798000e-001 4.759863e+000 6.710101e+000 vertex -1.798000e-001 4.391527e+000 7.500000e+000 vertex 1.482020e+001 4.391527e+000 7.500000e+000 endloop endfacet facet normal 0.000000e+000 8.191520e-001 5.735764e-001 outer loop vertex -1.798000e-001 4.391527e+000 7.500000e+000 vertex -1.798000e-001 3.891622e+000 8.213938e+000 vertex 1.482020e+001 3.891622e+000 8.213938e+000 endloop endfacet facet normal -4.344559e-030 7.071068e-001 7.071068e-001 outer loop vertex -1.798000e-001 3.275338e+000 8.830222e+000 vertex 1.482020e+001 3.275338e+000 8.830222e+000 vertex -1.798000e-001 3.891622e+000 8.213938e+000 endloop endfacet facet normal 0.000000e+000 5.735764e-001 8.191520e-001 outer loop vertex -1.798000e-001 3.275338e+000 8.830222e+000 vertex -1.798000e-001 2.561400e+000 9.330127e+000 vertex 1.482020e+001 2.561400e+000 9.330127e+000 endloop endfacet facet normal -1.153573e-017 4.226183e-001 9.063078e-001 outer loop vertex -1.798000e-001 1.771501e+000 9.698463e+000 vertex 1.482020e+001 1.771501e+000 9.698463e+000 vertex -1.798000e-001 2.561400e+000 9.330127e+000 endloop endfacet facet normal -6.793803e-017 2.588190e-001 9.659258e-001 outer loop vertex -1.798000e-001 1.771501e+000 9.698463e+000 vertex -1.798000e-001 9.296409e-001 9.924039e+000 vertex 1.482020e+001 9.296409e-001 9.924039e+000 endloop endfacet facet normal 0.000000e+000 8.715574e-002 9.961947e-001 outer loop vertex -1.798000e-001 9.296409e-001 9.924039e+000 vertex -1.798000e-001 6.140000e-002 1.000000e+001 vertex 1.482020e+001 6.140000e-002 1.000000e+001 endloop endfacet facet normal 2.866136e-017 -8.715574e-002 9.961947e-001 outer loop vertex -1.798000e-001 6.140000e-002 1.000000e+001 vertex -1.798000e-001 -8.068409e-001 9.924039e+000 vertex 1.482020e+001 -8.068409e-001 9.924039e+000 endloop endfacet facet normal 0.000000e+000 -2.588190e-001 9.659258e-001 outer loop vertex -1.798000e-001 -8.068409e-001 9.924039e+000 vertex -1.798000e-001 -1.648701e+000 9.698463e+000 vertex 1.482020e+001 -1.648701e+000 9.698463e+000 endloop endfacet facet normal -8.492254e-018 -4.226183e-001 9.063078e-001 outer loop vertex -1.798000e-001 -1.648701e+000 9.698463e+000 vertex -1.798000e-001 -2.438600e+000 9.330127e+000 vertex 1.482020e+001 -2.438600e+000 9.330127e+000 endloop endfacet facet normal -5.944578e-017 -5.735764e-001 8.191520e-001 outer loop vertex -1.798000e-001 -2.438600e+000 9.330127e+000 vertex -1.798000e-001 -3.152538e+000 8.830222e+000 vertex 1.482020e+001 -3.152538e+000 8.830222e+000 endloop endfacet facet normal 0.000000e+000 -7.071068e-001 7.071068e-001 outer loop vertex -1.798000e-001 -3.152538e+000 8.830222e+000 vertex -1.798000e-001 -3.768822e+000 8.213938e+000 vertex 1.482020e+001 -3.768822e+000 8.213938e+000 endloop endfacet facet normal -3.821514e-017 -8.191520e-001 5.735764e-001 outer loop vertex -1.798000e-001 -3.768822e+000 8.213938e+000 vertex -1.798000e-001 -4.268727e+000 7.500000e+000 vertex 1.482020e+001 -4.268727e+000 7.500000e+000 endloop endfacet facet normal 0.000000e+000 -9.063078e-001 4.226183e-001 outer loop vertex -1.798000e-001 -4.268727e+000 7.500000e+000 vertex -1.798000e-001 -4.637063e+000 6.710101e+000 vertex 1.482020e+001 -4.637063e+000 6.710101e+000 endloop endfacet facet normal -1.910757e-017 -9.659258e-001 2.588190e-001 outer loop vertex -1.798000e-001 -4.637063e+000 6.710101e+000 vertex -1.798000e-001 -4.862639e+000 5.868241e+000 vertex 1.482020e+001 -4.862639e+000 5.868241e+000 endloop endfacet facet normal -9.023020e-017 -9.961947e-001 8.715574e-002 outer loop vertex -1.798000e-001 -4.862639e+000 5.868241e+000 vertex -1.798000e-001 -4.938600e+000 5.000000e+000 vertex 1.482020e+001 -4.938600e+000 5.000000e+000 endloop endfacet facet normal 2.016910e-017 -9.961947e-001 -8.715574e-002 outer loop vertex -1.798000e-001 -4.938600e+000 5.000000e+000 vertex -1.798000e-001 -4.862639e+000 4.131759e+000 vertex 1.482020e+001 -4.862639e+000 4.131759e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -2.893023e+000 5.520945e+000 vertex 4.982020e+001 -4.862639e+000 5.868241e+000 vertex 4.982020e+001 -2.938600e+000 5.000000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -2.893023e+000 5.520945e+000 vertex 4.982020e+001 -4.637063e+000 6.710101e+000 vertex 4.982020e+001 -4.862639e+000 5.868241e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -2.893023e+000 5.520945e+000 vertex 4.982020e+001 -2.757678e+000 6.026060e+000 vertex 4.982020e+001 -4.637063e+000 6.710101e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -4.637063e+000 6.710101e+000 vertex 4.982020e+001 -2.757678e+000 6.026060e+000 vertex 4.982020e+001 -4.268727e+000 7.500000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -4.268727e+000 7.500000e+000 vertex 4.982020e+001 -2.757678e+000 6.026060e+000 vertex 4.982020e+001 -2.536676e+000 6.500000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -3.768822e+000 8.213938e+000 vertex 4.982020e+001 -2.536676e+000 6.500000e+000 vertex 4.982020e+001 -2.236733e+000 6.928363e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -1.866963e+000 7.298133e+000 vertex 4.982020e+001 -3.768822e+000 8.213938e+000 vertex 4.982020e+001 -2.236733e+000 6.928363e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -1.866963e+000 7.298133e+000 vertex 4.982020e+001 -3.152538e+000 8.830222e+000 vertex 4.982020e+001 -3.768822e+000 8.213938e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -1.866963e+000 7.298133e+000 vertex 4.982020e+001 -1.438600e+000 7.598076e+000 vertex 4.982020e+001 -3.152538e+000 8.830222e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -3.152538e+000 8.830222e+000 vertex 4.982020e+001 -1.438600e+000 7.598076e+000 vertex 4.982020e+001 -2.438600e+000 9.330127e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -2.438600e+000 9.330127e+000 vertex 4.982020e+001 -1.438600e+000 7.598076e+000 vertex 4.982020e+001 -9.646604e-001 7.819078e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -1.648701e+000 9.698463e+000 vertex 4.982020e+001 -9.646604e-001 7.819078e+000 vertex 4.982020e+001 -4.595445e-001 7.954423e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -8.068409e-001 9.924039e+000 vertex 4.982020e+001 -4.595445e-001 7.954423e+000 vertex 4.982020e+001 6.140000e-002 8.000000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 6.140000e-002 1.000000e+001 vertex 4.982020e+001 6.140000e-002 8.000000e+000 vertex 4.982020e+001 5.823445e-001 7.954423e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 9.296409e-001 9.924039e+000 vertex 4.982020e+001 5.823445e-001 7.954423e+000 vertex 4.982020e+001 1.087460e+000 7.819078e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 1.771501e+000 9.698463e+000 vertex 4.982020e+001 1.087460e+000 7.819078e+000 vertex 4.982020e+001 1.561400e+000 7.598076e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 2.561400e+000 9.330127e+000 vertex 4.982020e+001 1.561400e+000 7.598076e+000 vertex 4.982020e+001 1.989763e+000 7.298133e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 3.275338e+000 8.830222e+000 vertex 4.982020e+001 1.989763e+000 7.298133e+000 vertex 4.982020e+001 2.359533e+000 6.928363e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 3.891622e+000 8.213938e+000 vertex 4.982020e+001 2.359533e+000 6.928363e+000 vertex 4.982020e+001 4.391527e+000 7.500000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 3.891622e+000 8.213938e+000 vertex 4.982020e+001 3.275338e+000 8.830222e+000 vertex 4.982020e+001 2.359533e+000 6.928363e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 2.359533e+000 6.928363e+000 vertex 4.982020e+001 2.659476e+000 6.500000e+000 vertex 4.982020e+001 4.391527e+000 7.500000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 4.391527e+000 7.500000e+000 vertex 4.982020e+001 2.659476e+000 6.500000e+000 vertex 4.982020e+001 4.759863e+000 6.710101e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 4.759863e+000 6.710101e+000 vertex 4.982020e+001 2.659476e+000 6.500000e+000 vertex 4.982020e+001 2.880478e+000 6.026060e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 4.985439e+000 5.868241e+000 vertex 4.982020e+001 2.880478e+000 6.026060e+000 vertex 4.982020e+001 3.015823e+000 5.520945e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 5.061400e+000 5.000000e+000 vertex 4.982020e+001 3.015823e+000 5.520945e+000 vertex 4.982020e+001 3.061400e+000 5.000000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 3.015823e+000 4.479055e+000 vertex 4.982020e+001 5.061400e+000 5.000000e+000 vertex 4.982020e+001 3.061400e+000 5.000000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 3.015823e+000 4.479055e+000 vertex 4.982020e+001 2.880478e+000 3.973940e+000 vertex 4.982020e+001 5.061400e+000 5.000000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 5.061400e+000 5.000000e+000 vertex 4.982020e+001 2.880478e+000 3.973940e+000 vertex 4.982020e+001 2.659476e+000 3.500000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 2.359533e+000 3.071637e+000 vertex 4.982020e+001 5.061400e+000 5.000000e+000 vertex 4.982020e+001 2.659476e+000 3.500000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 2.359533e+000 3.071637e+000 vertex 4.982020e+001 1.989763e+000 2.701867e+000 vertex 4.982020e+001 5.061400e+000 5.000000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 5.061400e+000 5.000000e+000 vertex 4.982020e+001 1.989763e+000 2.701867e+000 vertex 4.982020e+001 2.506140e+001 0.000000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 2.506140e+001 5.000000e+000 vertex 4.982020e+001 5.061400e+000 5.000000e+000 vertex 4.982020e+001 2.506140e+001 0.000000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 1.989763e+000 2.701867e+000 vertex 4.982020e+001 1.561400e+000 2.401924e+000 vertex 4.982020e+001 6.140000e-002 -8.881784e-016 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 2.506140e+001 0.000000e+000 vertex 4.982020e+001 1.989763e+000 2.701867e+000 vertex 4.982020e+001 6.140000e-002 -8.881784e-016 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 1.561400e+000 2.401924e+000 vertex 4.982020e+001 1.087460e+000 2.180922e+000 vertex 4.982020e+001 6.140000e-002 -8.881784e-016 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 6.140000e-002 -8.881784e-016 vertex 4.982020e+001 1.087460e+000 2.180922e+000 vertex 4.982020e+001 5.823445e-001 2.045577e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 6.140000e-002 2.000000e+000 vertex 4.982020e+001 6.140000e-002 -8.881784e-016 vertex 4.982020e+001 5.823445e-001 2.045577e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 6.140000e-002 2.000000e+000 vertex 4.982020e+001 -4.595445e-001 2.045577e+000 vertex 4.982020e+001 6.140000e-002 -8.881784e-016 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 6.140000e-002 -8.881784e-016 vertex 4.982020e+001 -4.595445e-001 2.045577e+000 vertex 4.982020e+001 -8.068409e-001 7.596123e-002 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -8.068409e-001 7.596123e-002 vertex 4.982020e+001 -4.595445e-001 2.045577e+000 vertex 4.982020e+001 -9.646604e-001 2.180922e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -1.648701e+000 3.015369e-001 vertex 4.982020e+001 -9.646604e-001 2.180922e+000 vertex 4.982020e+001 -1.438600e+000 2.401924e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -2.438600e+000 6.698730e-001 vertex 4.982020e+001 -1.438600e+000 2.401924e+000 vertex 4.982020e+001 -1.866963e+000 2.701867e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -3.152538e+000 1.169778e+000 vertex 4.982020e+001 -1.866963e+000 2.701867e+000 vertex 4.982020e+001 -3.768822e+000 1.786062e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -3.152538e+000 1.169778e+000 vertex 4.982020e+001 -2.438600e+000 6.698730e-001 vertex 4.982020e+001 -1.866963e+000 2.701867e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -1.866963e+000 2.701867e+000 vertex 4.982020e+001 -2.236733e+000 3.071637e+000 vertex 4.982020e+001 -3.768822e+000 1.786062e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -3.768822e+000 1.786062e+000 vertex 4.982020e+001 -2.236733e+000 3.071637e+000 vertex 4.982020e+001 -4.268727e+000 2.500000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -4.268727e+000 2.500000e+000 vertex 4.982020e+001 -2.236733e+000 3.071637e+000 vertex 4.982020e+001 -2.536676e+000 3.500000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -4.637063e+000 3.289899e+000 vertex 4.982020e+001 -2.536676e+000 3.500000e+000 vertex 4.982020e+001 -2.757678e+000 3.973940e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -4.862639e+000 4.131759e+000 vertex 4.982020e+001 -2.757678e+000 3.973940e+000 vertex 4.982020e+001 -2.893023e+000 4.479055e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -4.938600e+000 5.000000e+000 vertex 4.982020e+001 -2.893023e+000 4.479055e+000 vertex 4.982020e+001 -2.938600e+000 5.000000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -4.862639e+000 5.868241e+000 vertex 4.982020e+001 -4.938600e+000 5.000000e+000 vertex 4.982020e+001 -2.938600e+000 5.000000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 5.061400e+000 5.000000e+000 vertex 4.982020e+001 4.985439e+000 5.868241e+000 vertex 4.982020e+001 3.015823e+000 5.520945e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 4.759863e+000 6.710101e+000 vertex 4.982020e+001 2.880478e+000 6.026060e+000 vertex 4.982020e+001 4.985439e+000 5.868241e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 3.275338e+000 8.830222e+000 vertex 4.982020e+001 2.561400e+000 9.330127e+000 vertex 4.982020e+001 1.989763e+000 7.298133e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 2.561400e+000 9.330127e+000 vertex 4.982020e+001 1.771501e+000 9.698463e+000 vertex 4.982020e+001 1.561400e+000 7.598076e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 1.771501e+000 9.698463e+000 vertex 4.982020e+001 9.296409e-001 9.924039e+000 vertex 4.982020e+001 1.087460e+000 7.819078e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 9.296409e-001 9.924039e+000 vertex 4.982020e+001 6.140000e-002 1.000000e+001 vertex 4.982020e+001 5.823445e-001 7.954423e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 6.140000e-002 1.000000e+001 vertex 4.982020e+001 -8.068409e-001 9.924039e+000 vertex 4.982020e+001 6.140000e-002 8.000000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -8.068409e-001 9.924039e+000 vertex 4.982020e+001 -1.648701e+000 9.698463e+000 vertex 4.982020e+001 -4.595445e-001 7.954423e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -1.648701e+000 9.698463e+000 vertex 4.982020e+001 -2.438600e+000 9.330127e+000 vertex 4.982020e+001 -9.646604e-001 7.819078e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -3.768822e+000 8.213938e+000 vertex 4.982020e+001 -4.268727e+000 7.500000e+000 vertex 4.982020e+001 -2.536676e+000 6.500000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -4.862639e+000 4.131759e+000 vertex 4.982020e+001 -2.893023e+000 4.479055e+000 vertex 4.982020e+001 -4.938600e+000 5.000000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -4.862639e+000 4.131759e+000 vertex 4.982020e+001 -4.637063e+000 3.289899e+000 vertex 4.982020e+001 -2.757678e+000 3.973940e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -4.637063e+000 3.289899e+000 vertex 4.982020e+001 -4.268727e+000 2.500000e+000 vertex 4.982020e+001 -2.536676e+000 3.500000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -2.438600e+000 6.698730e-001 vertex 4.982020e+001 -1.648701e+000 3.015369e-001 vertex 4.982020e+001 -1.438600e+000 2.401924e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -8.068409e-001 7.596123e-002 vertex 4.982020e+001 -9.646604e-001 2.180922e+000 vertex 4.982020e+001 -1.648701e+000 3.015369e-001 endloop endfacet endsolid netgen-6.2.1804/tutorials/sculpture.geo0000644000175000017500000000062413272137567016557 0ustar kurtkurtalgebraic3d # # intersection of sphere and cylinders # motivated by a sculpture found in St. Gallen # solid cyls = cylinder ( -100, 0, 0; 200, 0, 0; 40 ) or cylinder ( 100, -100, 100; 100, 200, 100; 40) or cylinder ( 0, 100, -100; 0, 100, 200; 40); solid sculpture = sphere (50, 50, 50; 80) and not cyls and not sphere (50, 50, 50; 50); tlo sculpture -col=[0.5, 0.5, 0.5]; netgen-6.2.1804/tutorials/cube.geo0000644000175000017500000000046013272137567015445 0ustar kurtkurt# ## A cube # algebraic3d # cube consisting of 6 planes: solid cube = plane (0, 0, 0; 0, 0, -1) and plane (0, 0, 0; 0, -1, 0) and plane (0, 0, 0; -1, 0, 0) and plane (1, 1, 1; 0, 0, 1) and plane (1, 1, 1; 0, 1, 0) and plane (1, 1, 1; 1, 0, 0); tlo cube; netgen-6.2.1804/tutorials/CMakeLists.txt0000644000175000017500000000133513272137567016575 0ustar kurtkurtinstall( FILES boxcyl.geo circle_on_cube.geo cone.geo cube.geo cubeandring.geo cubeandspheres.geo cubemcyl.geo cubemsphere.geo cylinder.geo cylsphere.geo ellipsoid.geo ellipticcyl.geo extrusion.geo fichera.geo lshape3d.geo manyholes.geo manyholes2.geo matrix.geo ortho.geo period.geo revolution.geo sculpture.geo shaft.geo shell.geo sphere.geo sphereincube.geo torus.geo trafo.geo twobricks.geo twocubes.geo twocyl.geo boundarycondition.geo hinge.stl part1.stl frame.step screw.step squarehole.in2d squarecircle.in2d square.in2d DESTINATION ${NG_INSTALL_DIR_RES}/${NG_INSTALL_SUFFIX} COMPONENT netgen_tutorial ) netgen-6.2.1804/tutorials/matrix.geo0000644000175000017500000000133113272137567016031 0ustar kurtkurt# # a matrix with holes # algebraic3d solid holes = sphere (0.3, 0.4, 0.4; 0.1) or sphere (0.7, 0.2, 0.8; 0.15) or sphere (0.8, 0.5, 0.4; 0.11) or sphere (0.6, 0.2, 0.8; 0.13) or sphere (0.4, 0.3, 0.6; 0.14) or sphere (0.6, 0.3, 0.4; 0.16) or sphere (0.2, 0.8, 0.6; 0.17) or sphere (0.4, 0.6, 0.5; 0.2); solid cube = plane (0, 0, 0; 0, 0, -1) and plane (0, 0, 0; 0, -1, 0) and plane (0, 0, 0; -1, 0, 0) and plane (1, 1, 1; 0, 0, 1) and plane (1, 1, 1; 0, 1, 0) and plane (1, 1, 1; 1, 0, 0); solid rest = cube and not holes; # two sub-domains tlo holes -col=[1,0,0]; tlo rest -col=[0,0,1] -transparent; netgen-6.2.1804/tutorials/ellipticcyl.geo0000644000175000017500000000026513272137567017047 0ustar kurtkurt# ## An elliptic cylinder # algebraic3d solid cutcone = ellipticcylinder ( 0, 0, 0; 1, 0, 0; 0, 0.5, 0) and plane (0, 0, 0; 0, 0, -1) and plane (0, 0, 1; 0, 0, 1); tlo cutcone; netgen-6.2.1804/tutorials/circle_on_cube.geo0000644000175000017500000000077213272137567017470 0ustar kurtkurt# ## A cube # algebraic3d # cube consisting of 6 planes: solid cube = plane (0, 0, 0; 0, 0, -1) and plane (0, 0, 0; 0, -1, 0) and plane (0, 0, 0; -1, 0, 0) and plane (1, 1, 1; 0, 0, 1) and plane (1, 1, 1; 0, 1, 0) and plane (1, 1, 1; 1, 0, 0); solid top = plane (1,1,1; 0, 0, 1); solid cyl = top and plane (0,0,0; 0, 0, -1) and cylinder (0.5, 0.5, 0; 0.5, 0.5, 1; 0.2); tlo cube; # take just surface 'top' of solid 'cyl' tlo cyl top -col=[1,0,0]; netgen-6.2.1804/tutorials/manyholes.geo0000644000175000017500000000070013272137567016523 0ustar kurtkurtalgebraic3d # ## CSG feature copy # # define a axis parallel brick: solid br = orthobrick (0, 0, 0; 10, 10, 1); # define reference cylinder: solid cyl1 = cylinder (0.5, 0.5, -1; 0.5, 0.5, 3; 0.2); # make copies: solid cylx = multitranslate (1, 0, 0; 9; cyl1); solid cyls = multitranslate (0, 1, 0; 9; cylx); solid main = br and not cyls; tlo main; # provide bounding-box for fastening bisection alg: boundingbox (-1, -1, -1; 11, 11, 2); netgen-6.2.1804/nglib/0000755000175000017500000000000013272137567013100 5ustar kurtkurtnetgen-6.2.1804/nglib/parallelfunc.cpp0000644000175000017500000000377313272137567016266 0ustar kurtkurt#ifdef PARALLEL #include "dlfcn.h" // #include #include // #include #include void (*NGS_ParallelRun) (const string & message) = NULL; namespace netgen { #include "../interface/writeuser.hpp" extern string ngdir; } void Parallel_Exit(); namespace netgen { extern AutoPtr mesh; // extern VisualSceneMesh vsmesh; extern DLL_HEADER MeshingParameters mparam; } using namespace netgen; using netgen::RegisterUserFormats; namespace netgen { // int id, ntasks; MPI_Comm mesh_comm; } void ParallelRun() { string message; MPI_Status status; MPI_Comm_size(MPI_COMM_WORLD, &ntasks); MPI_Comm_rank(MPI_COMM_WORLD, &id); while ( true ) { message = MyMPI_RecvCmd(); if ( message.compare(0, 3, "ngs") == 0 ) { if (NGS_ParallelRun == NULL) { static int timer = NgProfiler::CreateTimer ("load shared library ngsolve"); NgProfiler::RegionTimer reg (timer); void * handle = dlopen ("libngsolve.so", RTLD_NOW | RTLD_GLOBAL); if (!handle) { cerr << "cannot load shared library libngsolve.so" << endl; exit(1); } NGS_ParallelRun = (void (*) (const string & message)) dlsym (handle, "NGS_ParallelRun"); if (!NGS_ParallelRun) { cerr << "cannot bind function NGS_ParallelRun" << endl; exit(1); } } (*NGS_ParallelRun) (message); } else if ( message == "mesh" ) { VT_USER_START ("Mesh::ReceiveParallelMesh"); mesh.Reset( new netgen::Mesh); mesh->SendRecvMesh(); VT_USER_END ("Mesh::ReceiveParallelMesh"); } else if ( message == "visualize" ) { cout << "parallel message visualize depreciated" << endl; } else if ( message == "bcastparthread" ) { MyMPI_Bcast (mparam.parthread); } else if ( message == "end" ) { break; } else { PrintMessage ( 1, "received unidentified message '" + message + "'\n"); break; } } } #endif netgen-6.2.1804/nglib/ng_vol.cpp0000644000175000017500000000326413272137567015075 0ustar kurtkurt#include #include using namespace std; namespace nglib { #include } int main (int argc, char ** argv) { using namespace nglib; cout << "Netgen Testing" << endl; if (argc < 2) { cerr << "use: ng_vol filename" << endl; return 1; } Ng_Mesh * mesh; Ng_Init(); // creates mesh structure mesh = Ng_NewMesh (); int i, np, nse, ne; double point[3]; int trig[3], tet[4]; // reads surface mesh from file ifstream in(argv[1]); in >> np; cout << "Reading " << np << " points..."; cout.flush(); for (i = 1; i <= np; i++) { in >> point[0] >> point[1] >> point[2]; Ng_AddPoint (mesh, point); } cout << "done" << endl; in >> nse; cout << "Reading " << nse << " faces..."; cout.flush(); for (i = 1; i <= nse; i++) { in >> trig[0] >> trig[1] >> trig[2]; Ng_AddSurfaceElement (mesh, NG_TRIG, trig); } cout << "done" << endl; // generate volume mesh Ng_Meshing_Parameters mp; mp.maxh = 1e6; mp.fineness = 1; mp.second_order = 0; cout << "start meshing" << endl; Ng_GenerateVolumeMesh (mesh, &mp); cout << "meshing done" << endl; // volume mesh output np = Ng_GetNP(mesh); cout << "Points: " << np << endl; for (i = 1; i <= np; i++) { Ng_GetPoint (mesh, i, point); cout << i << ": " << point[0] << " " << point[1] << " " << point[2] << endl; } ne = Ng_GetNE(mesh); cout << "Elements: " << ne << endl; for (i = 1; i <= ne; i++) { Ng_GetVolumeElement (mesh, i, tet); cout << i << ": " << tet[0] << " " << tet[1] << " " << tet[2] << " " << tet[3] << endl; } Ng_SaveMesh(mesh,"test.vol"); return 0; } netgen-6.2.1804/nglib/nglib.h0000644000175000017500000006437313272137567014361 0ustar kurtkurt#ifndef NGLIB #define NGLIB /**************************************************************************/ /* File: nglib.h */ /* Author: Joachim Schoeberl */ /* Date: 7. May. 2000 */ /**************************************************************************/ /*! \file nglib.h \brief Library interface to the netgen meshing kernel \author Joachim Schoeberl \date 7. May 2000 This header file provides access to the core functionality of the Netgen Mesher via a library interface, without an interactive User Interface. The intention of providing these set of functions is to allow system developers to integrate Netgen into top-level code, to act as the low level mesh generation / optimisation kernel. */ // Philippose - 14.02.2009 // Modifications for creating a DLL in Windows #ifdef WIN32 #ifdef NGLIB_EXPORTS || nglib_EXPORTS #define DLL_HEADER __declspec(dllexport) #else #define DLL_HEADER __declspec(dllimport) #endif #else #define DLL_HEADER #endif // ** Constants used within Netgen ********************* /// Maximum allowed number of nodes per volume element #define NG_VOLUME_ELEMENT_MAXPOINTS 10 /// Maximum allowed number of nodes per surface element #define NG_SURFACE_ELEMENT_MAXPOINTS 8 // *** Data-types for accessing Netgen functionality *** /// Data type for NETGEN mesh typedef void * Ng_Mesh; /// Data type for NETGEN CSG geometry typedef void * Ng_CSG_Geometry; /// Data type for NETGEN 2D geometry typedef void * Ng_Geometry_2D; /// Data type for NETGEN STL geometry typedef void * Ng_STL_Geometry; #ifdef OCCGEOMETRY /// Data type for NETGEN OpenCascade geometry typedef void * Ng_OCC_Geometry; typedef void * Ng_OCC_TopTools_IndexedMapOfShape; #endif // *** Special Enum types used within Netgen *********** /// Currently implemented surface element types enum Ng_Surface_Element_Type { NG_TRIG = 1, NG_QUAD = 2, NG_TRIG6 = 3, NG_QUAD6 = 4, NG_QUAD8 = 5 }; /// Currently implemented volume element types enum Ng_Volume_Element_Type { NG_TET = 1, NG_PYRAMID = 2, NG_PRISM = 3, NG_TET10 = 4 }; /// Values returned by Netgen functions enum Ng_Result { NG_ERROR = -1, NG_OK = 0, NG_SURFACE_INPUT_ERROR = 1, NG_VOLUME_FAILURE = 2, NG_STL_INPUT_ERROR = 3, NG_SURFACE_FAILURE = 4, NG_FILE_NOT_FOUND = 5 }; // *** Classes required for use within Netgen ********** /// Netgen Meshing Parameters class class Ng_Meshing_Parameters { public: int uselocalh; //!< Switch to enable / disable usage of local mesh size modifiers double maxh; //!< Maximum global mesh size allowed double minh; //!< Minimum global mesh size allowed double fineness; //!< Mesh density: 0...1 (0 => coarse; 1 => fine) double grading; //!< Mesh grading: 0...1 (0 => uniform mesh; 1 => aggressive local grading) double elementsperedge; //!< Number of elements to generate per edge of the geometry double elementspercurve; //!< Elements to generate per curvature radius int closeedgeenable; //!< Enable / Disable mesh refinement at close edges double closeedgefact; //!< Factor to use for refinement at close edges (larger => finer) int minedgelenenable; //!< Enable / Disable user defined minimum edge length for edge subdivision double minedgelen; //!< Minimum edge length to use while subdividing the edges (default = 1e-4) int second_order; //!< Generate second-order surface and volume elements int quad_dominated; //!< Creates a Quad-dominated mesh char * meshsize_filename; //!< Optional external mesh size file int optsurfmeshenable; //!< Enable / Disable automatic surface mesh optimization int optvolmeshenable; //!< Enable / Disable automatic volume mesh optimization int optsteps_3d; //!< Number of optimize steps to use for 3-D mesh optimization int optsteps_2d; //!< Number of optimize steps to use for 2-D mesh optimization // Philippose - 13/09/2010 // Added a couple more parameters into the meshing parameters list // from Netgen into Nglib int invert_tets; //!< Invert all the volume elements int invert_trigs; //!< Invert all the surface triangle elements int check_overlap; //!< Check for overlapping surfaces during Surface meshing int check_overlapping_boundary; //!< Check for overlapping surface elements before volume meshing /*! Default constructor for the Mesh Parameters class Note: This constructor initialises the variables in the class with the following default values - #uselocalh: 1 - #maxh: 1000.0 - #fineness: 0.5 - #grading: 0.3 - #elementsperedge: 2.0 - #elementspercurve: 2.0 - #closeedgeenable: 0 - #closeedgefact: 2.0 - #secondorder: 0 - #meshsize_filename: null - #quad_dominated: 0 - #optsurfmeshenable: 1 - #optvolmeshenable: 1 - #optsteps_2d: 3 - #optsteps_3d: 3 - #invert_tets: 0 - #invert_trigs:0 - #check_overlap: 1 - #check_overlapping_boundary: 1 */ DLL_HEADER Ng_Meshing_Parameters(); /*! Reset the meshing parameters to their defaults This member function resets all the meshing parameters of the object to the default values */ DLL_HEADER void Reset_Parameters(); /*! Transfer local meshing parameters to internal meshing parameters This member function transfers all the meshing parameters defined in the local meshing parameters structure of nglib into the internal meshing parameters structure used by the Netgen core */ DLL_HEADER void Transfer_Parameters(); }; // *** Functions Exported by this Library ************* // ------------------------------------------------------------------ // Netgen library initialisation / destruction functions /*! \brief Initialise the Netgen library and prepare for use This function needs to be called by the third-party program before beginning to use the other Netgen specific functions. */ DLL_HEADER void Ng_Init (); /*! \brief Exit the Netgen meshing kernel in a clean manner Use this function to exit the meshing sub-system in a clean and orderly manner. */ DLL_HEADER void Ng_Exit (); /*! \brief Create a new (and empty) Netgen Mesh Structure This function creates a new Netgen Mesh, initialises it, and returns a pointer to the created mesh structure. Use the returned pointer for subsequent operations which involve mesh operations. \return Ng_Mesh Pointer to a Netgen Mesh type #Ng_Mesh */ DLL_HEADER Ng_Mesh * Ng_NewMesh (); /*! \brief Delete an existing Netgen Mesh Structure Use this function to delete an existing Netgen mesh structure and release the used memory. \param mesh Pointer to an existing Netgen Mesh structure of type #Ng_Mesh */ DLL_HEADER void Ng_DeleteMesh (Ng_Mesh * mesh); /*! \brief Save a Netgen Mesh to disk This function allows a generated mesh structure to be saved to disk. A Mesh saved using this function, will be written to disk in the Netgen VOL file format. \param mesh Pointer to an existing Netgen Mesh structure of type #Ng_Mesh \param filename Pointer to a character array containing the name of the file to which the mesh should be saved */ DLL_HEADER void Ng_SaveMesh(Ng_Mesh * mesh, const char* filename); /*! \brief Load a Netgen VOL Mesh from disk into memory A Netgen mesh saved in the internal VOL format can be loaded into a Netgen Mesh structure using this function. \param filename Pointer to a character array containing the name of the file to load \return Ng_Mesh Pointer to a Netgen Mesh type #Ng_Mesh containing the mesh loaded from disk */ DLL_HEADER Ng_Mesh * Ng_LoadMesh(const char* filename); /*! \brief Merge a Netgen VOL Mesh from disk into an existing mesh in memory A Netgen mesh saved in the internal VOL format can be merged into an existing Netgen Mesh structure using this function. \param mesh Name of the Mesh structure already existent in memory \param filename Pointer to a character array containing the name of the file to load \return Ng_Result Status of the merge operation */ DLL_HEADER Ng_Result Ng_MergeMesh(Ng_Mesh * mesh, const char* filename); /*! \brief Merge one Netgen Mesh into another Netgen Mesh in the case when both are already in memory (NOTE: FUNCTION STILL WORK IN PROGRESS!!!) This function can be used to merge two Netgen meshes already present in memory. \param mesh1 Parent Mesh structure into which the second mesh will be merged \param mesh2 Child mesh structure which will get merged into the parent mesh \return Ng_Result Status of the merge operation */ DLL_HEADER Ng_Result Ng_MergeMesh(Ng_Mesh * mesh1, Ng_Mesh * mesh2); // ------------------------------------------------------------------ // ------------------------------------------------------------------ // Basic Meshing functions for manually adding points, surface elements // and volume elements to a Netgen Mesh structure /*! \brief Add a point to a given Netgen Mesh Structure This function allows points to be directly added to a Netgen mesh structure by providing the co-ordinates. Each call to the function allows only one point to be added. \param mesh Pointer to an existing Netgen Mesh structure of type #Ng_Mesh \param x Pointer to an array of type double containing the co-ordinates of the point to be added in the form: \n - x[0] = X co-ordinate - x[1] = Y co-ordinate - x[2] = Z co-ordinate */ DLL_HEADER void Ng_AddPoint (Ng_Mesh * mesh, double * x); /*! \brief Add a surface element to a given Netgen Mesh Structure This function allows the top-level code to directly add individual Surface Elements to a Netgen Mesh Structure by providing the type of element to be added and the indices of the points which constitute the element. Note: - The points referred to by the surface elements must have been added prior to calling this function. - Currently only triangular elements are supported, and the Surface Element Type argument is not used. \param mesh Pointer to an existing Netgen Mesh structure of type #Ng_Mesh \param et Surface Element type provided via the enumerated type #Ng_Surface_Element_Type \param pi Pointer to an array of integers containing the indices of the points which constitute the surface element being added */ DLL_HEADER void Ng_AddSurfaceElement (Ng_Mesh * mesh, Ng_Surface_Element_Type et, int * pi); /*! \brief Add a volume element to a given Netgen Mesh Structure This function allows the top-level code to directly add individual Volume Elements to a Netgen Mesh Structure by providing the type of element to be added and the indices of the points which constitute the element. Note: - The points referred to by the volume elements must have been added prior to calling this function. - Currently only tetrahedral elements are supported, and the Volume Element Type argument is not used. \param mesh Pointer to an existing Netgen Mesh structure of type #Ng_Mesh \param et Volume Element type provided via the enumerated type #Ng_Volume_Element_Type \param pi Pointer to an array of integers containing the indices of the points which constitute the volume element being added */ DLL_HEADER void Ng_AddVolumeElement (Ng_Mesh * mesh, Ng_Volume_Element_Type et, int * pi); // ------------------------------------------------------------------ // ------------------------------------------------------------------ // Local Mesh Size restriction / limiting utilities /*! \brief Apply a global restriction on mesh element size This utility allows the user to apply a global mesh element size limitation. During mesh creation, in the absence of an explicit local size restriction around the neighbourhood of a point within the meshing domain, this global size restriction will be utilised. Note: This function only limits the Maximum size of an element within the mesh. \param mesh Pointer to an existing Netgen Mesh structure of type #Ng_Mesh \param h Variable of type double, specifying the maximum allowable mesh size */ DLL_HEADER void Ng_RestrictMeshSizeGlobal (Ng_Mesh * mesh, double h); /*! \brief Locally restrict the mesh element size at the given point Unlike the function #Ng_RestrictMeshSizeGlobal, this function allows the user to locally restrict the maximum allowable mesh size at a given point. The point is specified via its three cartesian co-ordinates. Note: This function only limits the Maximum size of the elements around the specified point. \param mesh Pointer to an existing Netgen Mesh structure of type #Ng_Mesh \param p Pointer to an Array of type double, containing the three co-ordinates of the point in the form: \n - p[0] = X co-ordinate - p[1] = Y co-ordinate - p[2] = Z co-ordinate \param h Variable of type double, specifying the maximum allowable mesh size at that point */ DLL_HEADER void Ng_RestrictMeshSizePoint (Ng_Mesh * mesh, double * p, double h); /*! \brief Locally restrict the mesh element size within a specified box Similar to the function #Ng_RestrictMeshSizePoint, this function allows the size of elements within a mesh to be locally limited. However, rather than limit the mesh size at a single point, this utility restricts the local mesh size within a 3D Box region, specified via the co-ordinates of the two diagonally opposite points of a cuboid. Note: This function only limits the Maximum size of the elements within the specified region. \param mesh Pointer to an existing Netgen Mesh structure of type #Ng_Mesh \param pmin Pointer to an Array of type double, containing the three co-ordinates of the first point of the cuboid: \n - pmin[0] = X co-ordinate - pmin[1] = Y co-ordinate - pmin[2] = Z co-ordinate \param pmax Pointer to an Array of type double, containing the three co-ordinates of the opposite point of the cuboid: \n - pmax[0] = X co-ordinate - pmax[1] = Y co-ordinate - pmax[2] = Z co-ordinate \param h Variable of type double, specifying the maximum allowable mesh size at that point */ DLL_HEADER void Ng_RestrictMeshSizeBox (Ng_Mesh * mesh, double * pmin, double * pmax, double h); // ------------------------------------------------------------------ // ------------------------------------------------------------------ // 3D Mesh Generation functions /*! \brief Create a 3D Volume Mesh given a Surface Mesh After creating a surface mesh, this function can be utilised to automatically generate the corresponding 3D Volume Mesh. Mesh generation parameters (such as grading, maximum element size, etc.) are specified via the meshing parameters class which also needs to be passed to this function. Note: Currently, Netgen generates pure tetrahedral volume meshes. \param mesh Pointer to an existing Netgen Mesh structure of type #Ng_Mesh \param mp Pointer to a copy of the Meshing Parameters class (#Ng_Meshing_Parameters), filled up with the required values \return Ng_Result Status of the Mesh Generation routine. More details regarding the return value can be found in the description of #Ng_Result */ DLL_HEADER Ng_Result Ng_GenerateVolumeMesh (Ng_Mesh * mesh, Ng_Meshing_Parameters * mp); // ------------------------------------------------------------------ // ------------------------------------------------------------------ // Basic Mesh information functions /*! \brief Returns the Number of Points present in the specified Mesh Given an already existent Netgen Mesh Structure, this function returns the number of points currently present within the Mesh. \param mesh Pointer to an existing Netgen Mesh structure of type #Ng_Mesh \return Integer Data-type with the number of points in the Mesh */ DLL_HEADER int Ng_GetNP (Ng_Mesh * mesh); /*! \brief Returns the Number of Surface Elements present in the specified Mesh Given an already existent Netgen Mesh Structure, this function returns the number of surface elements currently present within the Mesh. \param mesh Pointer to an existing Netgen Mesh structure of type #Ng_Mesh \return Integer Data-type with the number of surface elements in the Mesh */ DLL_HEADER int Ng_GetNSE (Ng_Mesh * mesh); /*! \brief Returns the Number of Volume Elements present in the specified Mesh Given an already existent Netgen Mesh Structure, this function returns the number of volume elements currently present within the Mesh. \param mesh Pointer to an existing Netgen Mesh structure of type #Ng_Mesh \return Integer Data-type with the number of volume elements in the Mesh */ DLL_HEADER int Ng_GetNE (Ng_Mesh * mesh); // ------------------------------------------------------------------ // ------------------------------------------------------------------ // Mesh Topology functions // Use these functions to extract points, surface / volume elements, // perform topological searches, etc..etc... // Return the Point Coordinates of a specified Point // The x, y and z co-ordinates are returned in the array pointer as // x[0] = x ; x[1] = y ; x[2] = z DLL_HEADER void Ng_GetPoint (Ng_Mesh * mesh, int num, double * x); // return surface and volume element in pi DLL_HEADER Ng_Surface_Element_Type Ng_GetSurfaceElement (Ng_Mesh * mesh, int num, int * pi); DLL_HEADER Ng_Volume_Element_Type Ng_GetVolumeElement (Ng_Mesh * mesh, int num, int * pi); // ------------------------------------------------------------------ // ********************************************************** // ** 2D Meshing ** // ********************************************************** // feeds points and boundary to mesh DLL_HEADER void Ng_AddPoint_2D (Ng_Mesh * mesh, double * x); DLL_HEADER void Ng_AddBoundarySeg_2D (Ng_Mesh * mesh, int pi1, int pi2); // ask for number of points, elements and boundary segments DLL_HEADER int Ng_GetNP_2D (Ng_Mesh * mesh); DLL_HEADER int Ng_GetNE_2D (Ng_Mesh * mesh); DLL_HEADER int Ng_GetNSeg_2D (Ng_Mesh * mesh); // return point coordinates DLL_HEADER void Ng_GetPoint_2D (Ng_Mesh * mesh, int num, double * x); // return 2d elements DLL_HEADER Ng_Surface_Element_Type Ng_GetElement_2D (Ng_Mesh * mesh, int num, int * pi, int * matnum = NULL); // return 2d boundary segment DLL_HEADER void Ng_GetSegment_2D (Ng_Mesh * mesh, int num, int * pi, int * matnum = NULL); // load 2d netgen spline geometry DLL_HEADER Ng_Geometry_2D * Ng_LoadGeometry_2D (const char * filename); // generate 2d mesh, mesh is allocated by function DLL_HEADER Ng_Result Ng_GenerateMesh_2D (Ng_Geometry_2D * geom, Ng_Mesh ** mesh, Ng_Meshing_Parameters * mp); DLL_HEADER void Ng_HP_Refinement (Ng_Geometry_2D * geom, Ng_Mesh * mesh, int levels); // ********************************************************** // ** STL Meshing ** // ********************************************************** // loads geometry from STL file DLL_HEADER Ng_STL_Geometry * Ng_STL_LoadGeometry (const char * filename, int binary = 0); // generate new STL Geometry DLL_HEADER Ng_STL_Geometry * Ng_STL_NewGeometry (); // fills STL Geometry // positive orientation // normal vector may be null-pointer DLL_HEADER void Ng_STL_AddTriangle (Ng_STL_Geometry * geom, double * p1, double * p2, double * p3, double * nv = NULL); // add (optional) edges : DLL_HEADER void Ng_STL_AddEdge (Ng_STL_Geometry * geom, double * p1, double * p2); // after adding triangles (and edges) initialize DLL_HEADER Ng_Result Ng_STL_InitSTLGeometry (Ng_STL_Geometry * geom); // automatically generates edges: DLL_HEADER Ng_Result Ng_STL_MakeEdges (Ng_STL_Geometry * geom, Ng_Mesh* mesh, Ng_Meshing_Parameters * mp); // generates mesh, empty mesh must be already created. DLL_HEADER Ng_Result Ng_STL_GenerateSurfaceMesh (Ng_STL_Geometry * geom, Ng_Mesh * mesh, Ng_Meshing_Parameters * mp); #ifdef ACIS // ********************************************************** // ** ACIS Meshing ** // ********************************************************** /// Data type for NETGEN STL geomty typedef void * Ng_ACIS_Geometry; // loads geometry from STL file DLL_HEADER Ng_ACIS_Geometry * Ng_ACIS_LoadGeometry (const char * filename); // generates mesh, empty mesh must be already created. DLL_HEADER Ng_Result Ng_ACIS_GenerateSurfaceMesh (Ng_ACIS_Geometry * geom, Ng_Mesh * mesh, Ng_Meshing_Parameters * mp); #endif #ifdef OCCGEOMETRY // ********************************************************** // ** OpenCascade Geometry / Meshing Utilities ** // ********************************************************** // Create new OCC Geometry Object DLL_HEADER Ng_OCC_Geometry * Ng_OCC_NewGeometry (); // Delete an OCC Geometry Object DLL_HEADER Ng_Result Ng_OCC_DeleteGeometry (Ng_OCC_Geometry * geom); // Loads geometry from STEP file DLL_HEADER Ng_OCC_Geometry * Ng_OCC_Load_STEP (const char * filename); // Loads geometry from IGES file DLL_HEADER Ng_OCC_Geometry * Ng_OCC_Load_IGES (const char * filename); // Loads geometry from BREP file DLL_HEADER Ng_OCC_Geometry * Ng_OCC_Load_BREP (const char * filename); // Set the local mesh size based on geometry / topology DLL_HEADER Ng_Result Ng_OCC_SetLocalMeshSize (Ng_OCC_Geometry * geom, Ng_Mesh * mesh, Ng_Meshing_Parameters * mp); // Mesh the edges and add Face descriptors to prepare for surface meshing DLL_HEADER Ng_Result Ng_OCC_GenerateEdgeMesh (Ng_OCC_Geometry * geom, Ng_Mesh * mesh, Ng_Meshing_Parameters * mp); // Mesh the surfaces of an OCC geometry DLL_HEADER Ng_Result Ng_OCC_GenerateSurfaceMesh (Ng_OCC_Geometry * geom, Ng_Mesh * mesh, Ng_Meshing_Parameters * mp); // Get the face map of an already loaded OCC geometry DLL_HEADER Ng_Result Ng_OCC_GetFMap(Ng_OCC_Geometry * geom, Ng_OCC_TopTools_IndexedMapOfShape * FMap); #endif // OCCGEOMETRY // ********************************************************** // ** Mesh refinement algorithms ** // ********************************************************** // uniform mesh refinement DLL_HEADER void Ng_Uniform_Refinement (Ng_Mesh * mesh); // uniform mesh refinement with geometry adaption: DLL_HEADER void Ng_2D_Uniform_Refinement (Ng_Geometry_2D * geom, Ng_Mesh * mesh); DLL_HEADER void Ng_STL_Uniform_Refinement (Ng_STL_Geometry * geom, Ng_Mesh * mesh); DLL_HEADER void Ng_CSG_Uniform_Refinement (Ng_CSG_Geometry * geom, Ng_Mesh * mesh); #ifdef OCCGEOMETRY DLL_HEADER void Ng_OCC_Uniform_Refinement (Ng_OCC_Geometry * geom, Ng_Mesh * mesh); #endif // ********************************************************** // ** Second Order mesh algorithms ** // ********************************************************** // convert mesh to second order DLL_HEADER void Ng_Generate_SecondOrder (Ng_Mesh * mesh); // convert mesh to second order with geometry adaption: DLL_HEADER void Ng_2D_Generate_SecondOrder (Ng_Geometry_2D * geom, Ng_Mesh * mesh); DLL_HEADER void Ng_STL_Generate_SecondOrder (Ng_STL_Geometry * geom, Ng_Mesh * mesh); DLL_HEADER void Ng_CSG_Generate_SecondOrder (Ng_CSG_Geometry * geom, Ng_Mesh * mesh); #ifdef OCCGEOMETRY DLL_HEADER void Ng_OCC_Generate_SecondOrder (Ng_OCC_Geometry * geom, Ng_Mesh * mesh); #endif #endif // NGLIB netgen-6.2.1804/nglib/netgen.py0000644000175000017500000000043613272137567014735 0ustar kurtkurtimport sys try: # Linux from libmesh import meshing from libgeom2d import geom2d from libcsg import csg except: # Windows from nglib import * sys.modules['netgen.meshing'] = meshing sys.modules['netgen.geom2d'] = geom2d sys.modules['netgen.csg'] = csg del sys netgen-6.2.1804/nglib/ng_stl.cpp0000644000175000017500000000564713272137567015106 0ustar kurtkurt/*! \file ng_stl.cpp \author Philippose Rajan \date 14 Feb 2009 (Created) This sample utility demonstrates the use of the Netgen nglib library for reading, and meshing an STL geometry. The Program takes as input the name of an STL file saved in the STL ASCII Format, and generates a 3D Volume mesh which is saved into the file "test.vol". test.vol can be viewed using the usual Netgen Mesher GUI */ #include #include using namespace std; namespace nglib { #include } int main (int argc, char ** argv) { using namespace nglib; cout << "Netgen (nglib) STL Testing" << endl; if (argc < 2) { cerr << "use: ng_stl STL_filename" << endl; return 1; } // Define pointer to a new Netgen Mesh Ng_Mesh *mesh; // Define pointer to STL Geometry Ng_STL_Geometry *stl_geom; // Result of Netgen Operations Ng_Result ng_res; // Initialise the Netgen Core library Ng_Init(); // Actually create the mesh structure mesh = Ng_NewMesh(); int np, ne; // Read in the STL File stl_geom = Ng_STL_LoadGeometry(argv[1]); if(!stl_geom) { cout << "Error reading in STL File: " << argv[1] << endl; return 1; } cout << "Successfully loaded STL File: " << argv[1] << endl; // Set the Meshing Parameters to be used Ng_Meshing_Parameters mp; mp.maxh = 1.0e+6; mp.fineness = 0.4; mp.second_order = 0; cout << "Initialise the STL Geometry structure...." << endl; ng_res = Ng_STL_InitSTLGeometry(stl_geom); if(ng_res != NG_OK) { cout << "Error Initialising the STL Geometry....Aborting!!" << endl; return 1; } cout << "Start Edge Meshing...." << endl; ng_res = Ng_STL_MakeEdges(stl_geom, mesh, &mp); if(ng_res != NG_OK) { cout << "Error in Edge Meshing....Aborting!!" << endl; return 1; } cout << "Start Surface Meshing...." << endl; ng_res = Ng_STL_GenerateSurfaceMesh(stl_geom, mesh, &mp); if(ng_res != NG_OK) { cout << "Error in Surface Meshing....Aborting!!" << endl; return 1; } cout << "Start Volume Meshing...." << endl; ng_res = Ng_GenerateVolumeMesh (mesh, &mp); if(ng_res != NG_OK) { cout << "Error in Volume Meshing....Aborting!!" << endl; return 1; } cout << "Meshing successfully completed....!!" << endl; // volume mesh output np = Ng_GetNP(mesh); cout << "Points: " << np << endl; ne = Ng_GetNE(mesh); cout << "Elements: " << ne << endl; cout << "Saving Mesh in VOL Format...." << endl; Ng_SaveMesh(mesh,"test.vol"); // refinement without geomety adaption: // Ng_Uniform_Refinement (mesh); // refinement with geomety adaption: Ng_STL_Uniform_Refinement (stl_geom, mesh); cout << "elements after refinement: " << Ng_GetNE(mesh) << endl; cout << "points after refinement: " << Ng_GetNP(mesh) << endl; Ng_SaveMesh(mesh,"test_ref.vol"); return 0; } netgen-6.2.1804/nglib/cube.surf0000644000175000017500000000105113272137567014714 0ustar kurtkurt8 0 0 0 1 0 0 1 1 1 1 0 1 0 1 1 0 0 1 0 1 0 1 1 0 12 2 1 7 8 2 7 6 1 2 4 6 2 4 3 5 5 6 4 8 3 4 8 4 2 5 3 8 7 5 8 1 6 5 7 1 5 netgen-6.2.1804/nglib/hinge.stl0000644000175000017500000115516113272137567014730 0ustar kurtkurtsolid facet normal 5.145160e-001 4.501432e-002 8.562984e-001 outer loop vertex 3.832020e+001 1.706140e+001 5.000000e+000 vertex 3.837337e+001 1.645363e+001 5.000000e+000 vertex 3.932020e+001 1.706140e+001 4.399139e+000 endloop endfacet facet normal 5.145160e-001 -4.501432e-002 8.562984e-001 outer loop vertex 3.935818e+001 1.749552e+001 4.399139e+000 vertex 3.832020e+001 1.706140e+001 5.000000e+000 vertex 3.932020e+001 1.706140e+001 4.399139e+000 endloop endfacet facet normal 5.145160e-001 -4.501432e-002 8.562984e-001 outer loop vertex 3.935818e+001 1.749552e+001 4.399139e+000 vertex 3.837337e+001 1.766917e+001 5.000000e+000 vertex 3.832020e+001 1.706140e+001 5.000000e+000 endloop endfacet facet normal 4.988827e-001 -1.336752e-001 8.562984e-001 outer loop vertex 3.935818e+001 1.749552e+001 4.399139e+000 vertex 3.853128e+001 1.825847e+001 5.000000e+000 vertex 3.837337e+001 1.766917e+001 5.000000e+000 endloop endfacet facet normal 4.988827e-001 -1.336752e-001 8.562984e-001 outer loop vertex 3.935818e+001 1.749552e+001 4.399139e+000 vertex 3.947097e+001 1.791645e+001 4.399139e+000 vertex 3.853128e+001 1.825847e+001 5.000000e+000 endloop endfacet facet normal 4.680911e-001 -2.182745e-001 8.562984e-001 outer loop vertex 3.853128e+001 1.825847e+001 5.000000e+000 vertex 3.947097e+001 1.791645e+001 4.399139e+000 vertex 3.878911e+001 1.881140e+001 5.000000e+000 endloop endfacet facet normal 4.680911e-001 -2.182745e-001 8.562984e-001 outer loop vertex 3.878911e+001 1.881140e+001 5.000000e+000 vertex 3.947097e+001 1.791645e+001 4.399139e+000 vertex 3.965514e+001 1.831140e+001 4.399139e+000 endloop endfacet facet normal 4.230768e-001 -2.962415e-001 8.562984e-001 outer loop vertex 3.913904e+001 1.931116e+001 5.000000e+000 vertex 3.965514e+001 1.831140e+001 4.399139e+000 vertex 3.990509e+001 1.866837e+001 4.399139e+000 endloop endfacet facet normal 3.652075e-001 -3.652075e-001 8.562984e-001 outer loop vertex 4.021323e+001 1.897651e+001 4.399139e+000 vertex 3.913904e+001 1.931116e+001 5.000000e+000 vertex 3.990509e+001 1.866837e+001 4.399139e+000 endloop endfacet facet normal 3.652075e-001 -3.652075e-001 8.562984e-001 outer loop vertex 4.021323e+001 1.897651e+001 4.399139e+000 vertex 3.957044e+001 1.974256e+001 5.000000e+000 vertex 3.913904e+001 1.931116e+001 5.000000e+000 endloop endfacet facet normal 2.962415e-001 -4.230768e-001 8.562984e-001 outer loop vertex 4.021323e+001 1.897651e+001 4.399139e+000 vertex 4.057020e+001 1.922646e+001 4.399139e+000 vertex 3.957044e+001 1.974256e+001 5.000000e+000 endloop endfacet facet normal 2.962415e-001 -4.230768e-001 8.562984e-001 outer loop vertex 3.957044e+001 1.974256e+001 5.000000e+000 vertex 4.057020e+001 1.922646e+001 4.399139e+000 vertex 4.007020e+001 2.009249e+001 5.000000e+000 endloop endfacet facet normal 2.182745e-001 -4.680911e-001 8.562984e-001 outer loop vertex 4.007020e+001 2.009249e+001 5.000000e+000 vertex 4.057020e+001 1.922646e+001 4.399139e+000 vertex 4.062313e+001 2.035032e+001 5.000000e+000 endloop endfacet facet normal 2.182745e-001 -4.680911e-001 8.562984e-001 outer loop vertex 4.062313e+001 2.035032e+001 5.000000e+000 vertex 4.057020e+001 1.922646e+001 4.399139e+000 vertex 4.096515e+001 1.941063e+001 4.399139e+000 endloop endfacet facet normal 1.336752e-001 -4.988827e-001 8.562984e-001 outer loop vertex 4.121243e+001 2.050823e+001 5.000000e+000 vertex 4.096515e+001 1.941063e+001 4.399139e+000 vertex 4.138608e+001 1.952342e+001 4.399139e+000 endloop endfacet facet normal 4.501432e-002 -5.145160e-001 8.562984e-001 outer loop vertex 4.182020e+001 1.956140e+001 4.399139e+000 vertex 4.121243e+001 2.050823e+001 5.000000e+000 vertex 4.138608e+001 1.952342e+001 4.399139e+000 endloop endfacet facet normal 4.501432e-002 -5.145160e-001 8.562984e-001 outer loop vertex 4.182020e+001 1.956140e+001 4.399139e+000 vertex 4.182020e+001 2.056140e+001 5.000000e+000 vertex 4.121243e+001 2.050823e+001 5.000000e+000 endloop endfacet facet normal -4.501432e-002 -5.145160e-001 8.562984e-001 outer loop vertex 4.182020e+001 1.956140e+001 4.399139e+000 vertex 4.225432e+001 1.952342e+001 4.399139e+000 vertex 4.182020e+001 2.056140e+001 5.000000e+000 endloop endfacet facet normal -4.501432e-002 -5.145160e-001 8.562984e-001 outer loop vertex 4.182020e+001 2.056140e+001 5.000000e+000 vertex 4.225432e+001 1.952342e+001 4.399139e+000 vertex 4.242797e+001 2.050823e+001 5.000000e+000 endloop endfacet facet normal -1.336752e-001 -4.988827e-001 8.562984e-001 outer loop vertex 4.242797e+001 2.050823e+001 5.000000e+000 vertex 4.225432e+001 1.952342e+001 4.399139e+000 vertex 4.267525e+001 1.941063e+001 4.399139e+000 endloop endfacet facet normal -2.182745e-001 -4.680911e-001 8.562984e-001 outer loop vertex 4.301727e+001 2.035032e+001 5.000000e+000 vertex 4.267525e+001 1.941063e+001 4.399139e+000 vertex 4.307020e+001 1.922646e+001 4.399139e+000 endloop endfacet facet normal -2.962415e-001 -4.230768e-001 8.562984e-001 outer loop vertex 4.357020e+001 2.009249e+001 5.000000e+000 vertex 4.307020e+001 1.922646e+001 4.399139e+000 vertex 4.342717e+001 1.897651e+001 4.399139e+000 endloop endfacet facet normal -3.652075e-001 -3.652075e-001 8.562984e-001 outer loop vertex 4.406996e+001 1.974256e+001 5.000000e+000 vertex 4.342717e+001 1.897651e+001 4.399139e+000 vertex 4.373531e+001 1.866837e+001 4.399139e+000 endloop endfacet facet normal -4.230768e-001 -2.962415e-001 8.562984e-001 outer loop vertex 4.450136e+001 1.931116e+001 5.000000e+000 vertex 4.373531e+001 1.866837e+001 4.399139e+000 vertex 4.398526e+001 1.831140e+001 4.399139e+000 endloop endfacet facet normal -4.680911e-001 -2.182745e-001 8.562984e-001 outer loop vertex 4.485129e+001 1.881140e+001 5.000000e+000 vertex 4.398526e+001 1.831140e+001 4.399139e+000 vertex 4.510912e+001 1.825847e+001 5.000000e+000 endloop endfacet facet normal -4.230768e-001 -2.962415e-001 8.562984e-001 outer loop vertex 4.485129e+001 1.881140e+001 5.000000e+000 vertex 4.450136e+001 1.931116e+001 5.000000e+000 vertex 4.398526e+001 1.831140e+001 4.399139e+000 endloop endfacet facet normal 4.988827e-001 1.336752e-001 8.562984e-001 outer loop vertex 3.837337e+001 1.645363e+001 5.000000e+000 vertex 3.853128e+001 1.586433e+001 5.000000e+000 vertex 3.947097e+001 1.620635e+001 4.399139e+000 endloop endfacet facet normal 4.988827e-001 1.336752e-001 8.562984e-001 outer loop vertex 3.935818e+001 1.662728e+001 4.399139e+000 vertex 3.837337e+001 1.645363e+001 5.000000e+000 vertex 3.947097e+001 1.620635e+001 4.399139e+000 endloop endfacet facet normal 5.145160e-001 4.501432e-002 8.562984e-001 outer loop vertex 3.935818e+001 1.662728e+001 4.399139e+000 vertex 3.932020e+001 1.706140e+001 4.399139e+000 vertex 3.837337e+001 1.645363e+001 5.000000e+000 endloop endfacet facet normal 4.680911e-001 2.182745e-001 8.562984e-001 outer loop vertex 3.853128e+001 1.586433e+001 5.000000e+000 vertex 3.878911e+001 1.531140e+001 5.000000e+000 vertex 3.965514e+001 1.581140e+001 4.399139e+000 endloop endfacet facet normal 4.680911e-001 2.182745e-001 8.562984e-001 outer loop vertex 3.947097e+001 1.620635e+001 4.399139e+000 vertex 3.853128e+001 1.586433e+001 5.000000e+000 vertex 3.965514e+001 1.581140e+001 4.399139e+000 endloop endfacet facet normal 4.230768e-001 2.962415e-001 8.562984e-001 outer loop vertex 3.878911e+001 1.531140e+001 5.000000e+000 vertex 3.913904e+001 1.481164e+001 5.000000e+000 vertex 3.990509e+001 1.545443e+001 4.399139e+000 endloop endfacet facet normal 4.230768e-001 2.962415e-001 8.562984e-001 outer loop vertex 3.965514e+001 1.581140e+001 4.399139e+000 vertex 3.878911e+001 1.531140e+001 5.000000e+000 vertex 3.990509e+001 1.545443e+001 4.399139e+000 endloop endfacet facet normal 3.652075e-001 3.652075e-001 8.562984e-001 outer loop vertex 3.913904e+001 1.481164e+001 5.000000e+000 vertex 3.957044e+001 1.438024e+001 5.000000e+000 vertex 3.990509e+001 1.545443e+001 4.399139e+000 endloop endfacet facet normal 3.652075e-001 3.652075e-001 8.562984e-001 outer loop vertex 3.990509e+001 1.545443e+001 4.399139e+000 vertex 3.957044e+001 1.438024e+001 5.000000e+000 vertex 4.021323e+001 1.514629e+001 4.399139e+000 endloop endfacet facet normal 2.962415e-001 4.230768e-001 8.562984e-001 outer loop vertex 4.021323e+001 1.514629e+001 4.399139e+000 vertex 3.957044e+001 1.438024e+001 5.000000e+000 vertex 4.057020e+001 1.489634e+001 4.399139e+000 endloop endfacet facet normal 2.962415e-001 4.230768e-001 8.562984e-001 outer loop vertex 4.057020e+001 1.489634e+001 4.399139e+000 vertex 3.957044e+001 1.438024e+001 5.000000e+000 vertex 4.007020e+001 1.403031e+001 5.000000e+000 endloop endfacet facet normal 2.182745e-001 4.680911e-001 8.562984e-001 outer loop vertex 4.062313e+001 1.377248e+001 5.000000e+000 vertex 4.057020e+001 1.489634e+001 4.399139e+000 vertex 4.007020e+001 1.403031e+001 5.000000e+000 endloop endfacet facet normal 2.182745e-001 4.680911e-001 8.562984e-001 outer loop vertex 4.062313e+001 1.377248e+001 5.000000e+000 vertex 4.096515e+001 1.471217e+001 4.399139e+000 vertex 4.057020e+001 1.489634e+001 4.399139e+000 endloop endfacet facet normal 1.336752e-001 4.988827e-001 8.562984e-001 outer loop vertex 4.062313e+001 1.377248e+001 5.000000e+000 vertex 4.121243e+001 1.361457e+001 5.000000e+000 vertex 4.096515e+001 1.471217e+001 4.399139e+000 endloop endfacet facet normal 1.336752e-001 4.988827e-001 8.562984e-001 outer loop vertex 4.096515e+001 1.471217e+001 4.399139e+000 vertex 4.121243e+001 1.361457e+001 5.000000e+000 vertex 4.138608e+001 1.459938e+001 4.399139e+000 endloop endfacet facet normal 4.501432e-002 5.145160e-001 8.562984e-001 outer loop vertex 4.138608e+001 1.459938e+001 4.399139e+000 vertex 4.121243e+001 1.361457e+001 5.000000e+000 vertex 4.182020e+001 1.456140e+001 4.399139e+000 endloop endfacet facet normal 4.501432e-002 5.145160e-001 8.562984e-001 outer loop vertex 4.182020e+001 1.456140e+001 4.399139e+000 vertex 4.121243e+001 1.361457e+001 5.000000e+000 vertex 4.182020e+001 1.356140e+001 5.000000e+000 endloop endfacet facet normal -4.501432e-002 5.145160e-001 8.562984e-001 outer loop vertex 4.225432e+001 1.459938e+001 4.399139e+000 vertex 4.182020e+001 1.356140e+001 5.000000e+000 vertex 4.242797e+001 1.361457e+001 5.000000e+000 endloop endfacet facet normal -1.336752e-001 4.988827e-001 8.562984e-001 outer loop vertex 4.267525e+001 1.471217e+001 4.399139e+000 vertex 4.242797e+001 1.361457e+001 5.000000e+000 vertex 4.301727e+001 1.377248e+001 5.000000e+000 endloop endfacet facet normal -2.182745e-001 4.680911e-001 8.562984e-001 outer loop vertex 4.357020e+001 1.403031e+001 5.000000e+000 vertex 4.267525e+001 1.471217e+001 4.399139e+000 vertex 4.301727e+001 1.377248e+001 5.000000e+000 endloop endfacet facet normal -2.182745e-001 4.680911e-001 8.562984e-001 outer loop vertex 4.357020e+001 1.403031e+001 5.000000e+000 vertex 4.307020e+001 1.489634e+001 4.399139e+000 vertex 4.267525e+001 1.471217e+001 4.399139e+000 endloop endfacet facet normal -2.962415e-001 4.230768e-001 8.562984e-001 outer loop vertex 4.357020e+001 1.403031e+001 5.000000e+000 vertex 4.406996e+001 1.438024e+001 5.000000e+000 vertex 4.307020e+001 1.489634e+001 4.399139e+000 endloop endfacet facet normal -2.962415e-001 4.230768e-001 8.562984e-001 outer loop vertex 4.307020e+001 1.489634e+001 4.399139e+000 vertex 4.406996e+001 1.438024e+001 5.000000e+000 vertex 4.342717e+001 1.514629e+001 4.399139e+000 endloop endfacet facet normal -3.652075e-001 3.652075e-001 8.562984e-001 outer loop vertex 4.342717e+001 1.514629e+001 4.399139e+000 vertex 4.406996e+001 1.438024e+001 5.000000e+000 vertex 4.450136e+001 1.481164e+001 5.000000e+000 endloop endfacet facet normal -4.230768e-001 2.962415e-001 8.562984e-001 outer loop vertex 4.373531e+001 1.545443e+001 4.399139e+000 vertex 4.450136e+001 1.481164e+001 5.000000e+000 vertex 4.485129e+001 1.531140e+001 5.000000e+000 endloop endfacet facet normal -4.680911e-001 2.182745e-001 8.562984e-001 outer loop vertex 4.398526e+001 1.581140e+001 4.399139e+000 vertex 4.485129e+001 1.531140e+001 5.000000e+000 vertex 4.510912e+001 1.586433e+001 5.000000e+000 endloop endfacet facet normal -4.988827e-001 1.336752e-001 8.562984e-001 outer loop vertex 4.416943e+001 1.620635e+001 4.399139e+000 vertex 4.510912e+001 1.586433e+001 5.000000e+000 vertex 4.428222e+001 1.662728e+001 4.399139e+000 endloop endfacet facet normal -4.680911e-001 2.182745e-001 8.562984e-001 outer loop vertex 4.416943e+001 1.620635e+001 4.399139e+000 vertex 4.398526e+001 1.581140e+001 4.399139e+000 vertex 4.510912e+001 1.586433e+001 5.000000e+000 endloop endfacet facet normal -4.988827e-001 1.336752e-001 8.562984e-001 outer loop vertex 4.510912e+001 1.586433e+001 5.000000e+000 vertex 4.526703e+001 1.645363e+001 5.000000e+000 vertex 4.428222e+001 1.662728e+001 4.399139e+000 endloop endfacet facet normal -5.145160e-001 4.501432e-002 8.562984e-001 outer loop vertex 4.428222e+001 1.662728e+001 4.399139e+000 vertex 4.526703e+001 1.645363e+001 5.000000e+000 vertex 4.432020e+001 1.706140e+001 4.399139e+000 endloop endfacet facet normal -5.145160e-001 4.501432e-002 8.562984e-001 outer loop vertex 4.432020e+001 1.706140e+001 4.399139e+000 vertex 4.526703e+001 1.645363e+001 5.000000e+000 vertex 4.532020e+001 1.706140e+001 5.000000e+000 endloop endfacet facet normal -5.145160e-001 -4.501432e-002 8.562984e-001 outer loop vertex 4.428222e+001 1.749552e+001 4.399139e+000 vertex 4.532020e+001 1.706140e+001 5.000000e+000 vertex 4.526703e+001 1.766917e+001 5.000000e+000 endloop endfacet facet normal -4.988827e-001 -1.336752e-001 8.562984e-001 outer loop vertex 4.416943e+001 1.791645e+001 4.399139e+000 vertex 4.526703e+001 1.766917e+001 5.000000e+000 vertex 4.510912e+001 1.825847e+001 5.000000e+000 endloop endfacet facet normal -4.680911e-001 -2.182745e-001 8.562984e-001 outer loop vertex 4.398526e+001 1.831140e+001 4.399139e+000 vertex 4.416943e+001 1.791645e+001 4.399139e+000 vertex 4.510912e+001 1.825847e+001 5.000000e+000 endloop endfacet facet normal -3.652075e-001 -3.652075e-001 8.562984e-001 outer loop vertex 4.450136e+001 1.931116e+001 5.000000e+000 vertex 4.406996e+001 1.974256e+001 5.000000e+000 vertex 4.373531e+001 1.866837e+001 4.399139e+000 endloop endfacet facet normal -2.962415e-001 -4.230768e-001 8.562984e-001 outer loop vertex 4.406996e+001 1.974256e+001 5.000000e+000 vertex 4.357020e+001 2.009249e+001 5.000000e+000 vertex 4.342717e+001 1.897651e+001 4.399139e+000 endloop endfacet facet normal -2.182745e-001 -4.680911e-001 8.562984e-001 outer loop vertex 4.357020e+001 2.009249e+001 5.000000e+000 vertex 4.301727e+001 2.035032e+001 5.000000e+000 vertex 4.307020e+001 1.922646e+001 4.399139e+000 endloop endfacet facet normal -1.336752e-001 -4.988827e-001 8.562984e-001 outer loop vertex 4.301727e+001 2.035032e+001 5.000000e+000 vertex 4.242797e+001 2.050823e+001 5.000000e+000 vertex 4.267525e+001 1.941063e+001 4.399139e+000 endloop endfacet facet normal 1.336752e-001 -4.988827e-001 8.562984e-001 outer loop vertex 4.121243e+001 2.050823e+001 5.000000e+000 vertex 4.062313e+001 2.035032e+001 5.000000e+000 vertex 4.096515e+001 1.941063e+001 4.399139e+000 endloop endfacet facet normal 4.230768e-001 -2.962415e-001 8.562984e-001 outer loop vertex 3.913904e+001 1.931116e+001 5.000000e+000 vertex 3.878911e+001 1.881140e+001 5.000000e+000 vertex 3.965514e+001 1.831140e+001 4.399139e+000 endloop endfacet facet normal -4.988827e-001 -1.336752e-001 8.562984e-001 outer loop vertex 4.416943e+001 1.791645e+001 4.399139e+000 vertex 4.428222e+001 1.749552e+001 4.399139e+000 vertex 4.526703e+001 1.766917e+001 5.000000e+000 endloop endfacet facet normal -5.145160e-001 -4.501432e-002 8.562984e-001 outer loop vertex 4.428222e+001 1.749552e+001 4.399139e+000 vertex 4.432020e+001 1.706140e+001 4.399139e+000 vertex 4.532020e+001 1.706140e+001 5.000000e+000 endloop endfacet facet normal -4.230768e-001 2.962415e-001 8.562984e-001 outer loop vertex 4.398526e+001 1.581140e+001 4.399139e+000 vertex 4.373531e+001 1.545443e+001 4.399139e+000 vertex 4.485129e+001 1.531140e+001 5.000000e+000 endloop endfacet facet normal -3.652075e-001 3.652075e-001 8.562984e-001 outer loop vertex 4.342717e+001 1.514629e+001 4.399139e+000 vertex 4.450136e+001 1.481164e+001 5.000000e+000 vertex 4.373531e+001 1.545443e+001 4.399139e+000 endloop endfacet facet normal -1.336752e-001 4.988827e-001 8.562984e-001 outer loop vertex 4.267525e+001 1.471217e+001 4.399139e+000 vertex 4.225432e+001 1.459938e+001 4.399139e+000 vertex 4.242797e+001 1.361457e+001 5.000000e+000 endloop endfacet facet normal -4.501432e-002 5.145160e-001 8.562984e-001 outer loop vertex 4.225432e+001 1.459938e+001 4.399139e+000 vertex 4.182020e+001 1.456140e+001 4.399139e+000 vertex 4.182020e+001 1.356140e+001 5.000000e+000 endloop endfacet facet normal -9.961947e-001 8.715574e-002 0.000000e+000 outer loop vertex 4.432020e+001 1.706140e+001 -8.881784e-016 vertex 4.428222e+001 1.662728e+001 -8.881784e-016 vertex 4.428222e+001 1.662728e+001 4.399139e+000 endloop endfacet facet normal -9.961947e-001 8.715574e-002 0.000000e+000 outer loop vertex 4.432020e+001 1.706140e+001 4.399139e+000 vertex 4.432020e+001 1.706140e+001 -8.881784e-016 vertex 4.428222e+001 1.662728e+001 4.399139e+000 endloop endfacet facet normal -9.961947e-001 -8.715574e-002 0.000000e+000 outer loop vertex 4.432020e+001 1.706140e+001 4.399139e+000 vertex 4.428222e+001 1.749552e+001 -8.881784e-016 vertex 4.432020e+001 1.706140e+001 -8.881784e-016 endloop endfacet facet normal -9.961947e-001 -8.715574e-002 -9.048915e-016 outer loop vertex 4.432020e+001 1.706140e+001 4.399139e+000 vertex 4.428222e+001 1.749552e+001 4.399139e+000 vertex 4.428222e+001 1.749552e+001 -8.881784e-016 endloop endfacet facet normal -9.659258e-001 -2.588190e-001 5.300545e-016 outer loop vertex 4.428222e+001 1.749552e+001 -8.881784e-016 vertex 4.428222e+001 1.749552e+001 4.399139e+000 vertex 4.416943e+001 1.791645e+001 -8.881784e-016 endloop endfacet facet normal -9.659258e-001 -2.588190e-001 -1.030095e-015 outer loop vertex 4.416943e+001 1.791645e+001 -8.881784e-016 vertex 4.428222e+001 1.749552e+001 4.399139e+000 vertex 4.416943e+001 1.791645e+001 4.399139e+000 endloop endfacet facet normal -9.063078e-001 -4.226183e-001 1.440206e-016 outer loop vertex 4.398526e+001 1.831140e+001 -8.881784e-016 vertex 4.416943e+001 1.791645e+001 4.399139e+000 vertex 4.398526e+001 1.831140e+001 4.399139e+000 endloop endfacet facet normal -8.191520e-001 -5.735764e-001 -1.586601e-015 outer loop vertex 4.373531e+001 1.866837e+001 -8.881784e-016 vertex 4.398526e+001 1.831140e+001 4.399139e+000 vertex 4.373531e+001 1.866837e+001 4.399139e+000 endloop endfacet facet normal -7.071068e-001 -7.071068e-001 -1.142109e-015 outer loop vertex 4.342717e+001 1.897651e+001 -8.881784e-016 vertex 4.373531e+001 1.866837e+001 4.399139e+000 vertex 4.342717e+001 1.897651e+001 4.399139e+000 endloop endfacet facet normal -5.735764e-001 -8.191520e-001 -1.324456e-015 outer loop vertex 4.307020e+001 1.922646e+001 -8.881784e-016 vertex 4.342717e+001 1.897651e+001 4.399139e+000 vertex 4.307020e+001 1.922646e+001 4.399139e+000 endloop endfacet facet normal -4.226183e-001 -9.063078e-001 -1.217252e-015 outer loop vertex 4.267525e+001 1.941063e+001 -8.881784e-016 vertex 4.307020e+001 1.922646e+001 4.399139e+000 vertex 4.267525e+001 1.941063e+001 4.399139e+000 endloop endfacet facet normal -2.588190e-001 -9.659258e-001 -1.310129e-015 outer loop vertex 4.225432e+001 1.952342e+001 -8.881784e-016 vertex 4.267525e+001 1.941063e+001 4.399139e+000 vertex 4.225432e+001 1.952342e+001 4.399139e+000 endloop endfacet facet normal -8.715574e-002 -9.961947e-001 -7.038636e-016 outer loop vertex 4.182020e+001 1.956140e+001 -8.881784e-016 vertex 4.225432e+001 1.952342e+001 4.399139e+000 vertex 4.182020e+001 1.956140e+001 4.399139e+000 endloop endfacet facet normal 8.715574e-002 -9.961947e-001 -9.051759e-016 outer loop vertex 4.138608e+001 1.952342e+001 -8.881784e-016 vertex 4.182020e+001 1.956140e+001 4.399139e+000 vertex 4.138608e+001 1.952342e+001 4.399139e+000 endloop endfacet facet normal 2.588190e-001 -9.659258e-001 -2.500203e-016 outer loop vertex 4.096515e+001 1.941063e+001 -8.881784e-016 vertex 4.138608e+001 1.952342e+001 4.399139e+000 vertex 4.096515e+001 1.941063e+001 4.399139e+000 endloop endfacet facet normal 4.226183e-001 -9.063078e-001 -9.292106e-016 outer loop vertex 4.057020e+001 1.922646e+001 -8.881784e-016 vertex 4.096515e+001 1.941063e+001 4.399139e+000 vertex 4.057020e+001 1.922646e+001 4.399139e+000 endloop endfacet facet normal 5.735764e-001 -8.191520e-001 -9.250596e-016 outer loop vertex 4.021323e+001 1.897651e+001 -8.881784e-016 vertex 4.057020e+001 1.922646e+001 4.399139e+000 vertex 4.021323e+001 1.897651e+001 4.399139e+000 endloop endfacet facet normal 7.071068e-001 -7.071068e-001 -1.142109e-015 outer loop vertex 3.990509e+001 1.866837e+001 -8.881784e-016 vertex 4.021323e+001 1.897651e+001 4.399139e+000 vertex 3.990509e+001 1.866837e+001 4.399139e+000 endloop endfacet facet normal 8.191520e-001 -5.735764e-001 -1.059565e-015 outer loop vertex 3.965514e+001 1.831140e+001 -8.881784e-016 vertex 3.990509e+001 1.866837e+001 4.399139e+000 vertex 3.965514e+001 1.831140e+001 4.399139e+000 endloop endfacet facet normal 9.063078e-001 -4.226183e-001 -4.853241e-016 outer loop vertex 3.947097e+001 1.791645e+001 -8.881784e-016 vertex 3.965514e+001 1.831140e+001 4.399139e+000 vertex 3.947097e+001 1.791645e+001 4.399139e+000 endloop endfacet facet normal 9.659258e-001 -2.588190e-001 -5.300545e-016 outer loop vertex 3.935818e+001 1.749552e+001 -8.881784e-016 vertex 3.947097e+001 1.791645e+001 4.399139e+000 vertex 3.935818e+001 1.749552e+001 4.399139e+000 endloop endfacet facet normal 9.961947e-001 -8.715574e-002 -7.038636e-016 outer loop vertex 3.932020e+001 1.706140e+001 -8.881784e-016 vertex 3.935818e+001 1.749552e+001 4.399139e+000 vertex 3.932020e+001 1.706140e+001 4.399139e+000 endloop endfacet facet normal 9.961947e-001 8.715574e-002 7.038636e-017 outer loop vertex 3.935818e+001 1.662728e+001 -8.881784e-016 vertex 3.932020e+001 1.706140e+001 4.399139e+000 vertex 3.935818e+001 1.662728e+001 4.399139e+000 endloop endfacet facet normal 9.659258e-001 2.588190e-001 0.000000e+000 outer loop vertex 3.947097e+001 1.620635e+001 -8.881784e-016 vertex 3.935818e+001 1.662728e+001 4.399139e+000 vertex 3.947097e+001 1.620635e+001 4.399139e+000 endloop endfacet facet normal 9.063078e-001 4.226183e-001 0.000000e+000 outer loop vertex 3.965514e+001 1.581140e+001 -8.881784e-016 vertex 3.947097e+001 1.620635e+001 4.399139e+000 vertex 3.965514e+001 1.581140e+001 4.399139e+000 endloop endfacet facet normal 8.191520e-001 5.735764e-001 2.316081e-016 outer loop vertex 3.990509e+001 1.545443e+001 -8.881784e-016 vertex 3.965514e+001 1.581140e+001 4.399139e+000 vertex 3.990509e+001 1.545443e+001 4.399139e+000 endloop endfacet facet normal 7.071068e-001 7.071068e-001 2.855272e-016 outer loop vertex 4.021323e+001 1.514629e+001 -8.881784e-016 vertex 3.990509e+001 1.545443e+001 4.399139e+000 vertex 4.021323e+001 1.514629e+001 4.399139e+000 endloop endfacet facet normal 5.735764e-001 8.191520e-001 3.307707e-016 outer loop vertex 4.057020e+001 1.489634e+001 -8.881784e-016 vertex 4.021323e+001 1.514629e+001 4.399139e+000 vertex 4.057020e+001 1.489634e+001 4.399139e+000 endloop endfacet facet normal 4.226183e-001 9.063078e-001 -6.826070e-016 outer loop vertex 4.096515e+001 1.471217e+001 -8.881784e-016 vertex 4.057020e+001 1.489634e+001 4.399139e+000 vertex 4.096515e+001 1.471217e+001 4.399139e+000 endloop endfacet facet normal 2.588190e-001 9.659258e-001 -4.180408e-016 outer loop vertex 4.138608e+001 1.459938e+001 -8.881784e-016 vertex 4.096515e+001 1.471217e+001 4.399139e+000 vertex 4.138608e+001 1.459938e+001 4.399139e+000 endloop endfacet facet normal 8.715574e-002 9.961947e-001 0.000000e+000 outer loop vertex 4.182020e+001 1.456140e+001 -8.881784e-016 vertex 4.138608e+001 1.459938e+001 4.399139e+000 vertex 4.182020e+001 1.456140e+001 4.399139e+000 endloop endfacet facet normal -8.715574e-002 9.961947e-001 0.000000e+000 outer loop vertex 4.225432e+001 1.459938e+001 -8.881784e-016 vertex 4.182020e+001 1.456140e+001 4.399139e+000 vertex 4.225432e+001 1.459938e+001 4.399139e+000 endloop endfacet facet normal -2.588190e-001 9.659258e-001 2.800343e-017 outer loop vertex 4.267525e+001 1.471217e+001 -8.881784e-016 vertex 4.225432e+001 1.459938e+001 4.399139e+000 vertex 4.267525e+001 1.471217e+001 4.399139e+000 endloop endfacet facet normal -4.226183e-001 9.063078e-001 -3.659639e-016 outer loop vertex 4.307020e+001 1.489634e+001 -8.881784e-016 vertex 4.267525e+001 1.471217e+001 4.399139e+000 vertex 4.307020e+001 1.489634e+001 4.399139e+000 endloop endfacet facet normal -5.735764e-001 8.191520e-001 5.956618e-016 outer loop vertex 4.342717e+001 1.514629e+001 -8.881784e-016 vertex 4.307020e+001 1.489634e+001 4.399139e+000 vertex 4.342717e+001 1.514629e+001 4.399139e+000 endloop endfacet facet normal -7.071068e-001 7.071068e-001 0.000000e+000 outer loop vertex 4.373531e+001 1.545443e+001 -8.881784e-016 vertex 4.342717e+001 1.514629e+001 4.399139e+000 vertex 4.373531e+001 1.545443e+001 4.399139e+000 endloop endfacet facet normal -8.191520e-001 5.735764e-001 0.000000e+000 outer loop vertex 4.398526e+001 1.581140e+001 -8.881784e-016 vertex 4.373531e+001 1.545443e+001 4.399139e+000 vertex 4.398526e+001 1.581140e+001 4.399139e+000 endloop endfacet facet normal -9.063078e-001 4.226183e-001 0.000000e+000 outer loop vertex 4.416943e+001 1.620635e+001 -8.881784e-016 vertex 4.398526e+001 1.581140e+001 4.399139e+000 vertex 4.416943e+001 1.620635e+001 4.399139e+000 endloop endfacet facet normal -9.659258e-001 2.588190e-001 0.000000e+000 outer loop vertex 4.428222e+001 1.662728e+001 -8.881784e-016 vertex 4.416943e+001 1.620635e+001 4.399139e+000 vertex 4.428222e+001 1.662728e+001 4.399139e+000 endloop endfacet facet normal -9.659258e-001 2.588190e-001 0.000000e+000 outer loop vertex 4.428222e+001 1.662728e+001 -8.881784e-016 vertex 4.416943e+001 1.620635e+001 -8.881784e-016 vertex 4.416943e+001 1.620635e+001 4.399139e+000 endloop endfacet facet normal -9.063078e-001 4.226183e-001 0.000000e+000 outer loop vertex 4.416943e+001 1.620635e+001 -8.881784e-016 vertex 4.398526e+001 1.581140e+001 -8.881784e-016 vertex 4.398526e+001 1.581140e+001 4.399139e+000 endloop endfacet facet normal -8.191520e-001 5.735764e-001 0.000000e+000 outer loop vertex 4.398526e+001 1.581140e+001 -8.881784e-016 vertex 4.373531e+001 1.545443e+001 -8.881784e-016 vertex 4.373531e+001 1.545443e+001 4.399139e+000 endloop endfacet facet normal -7.071068e-001 7.071068e-001 8.614567e-016 outer loop vertex 4.373531e+001 1.545443e+001 -8.881784e-016 vertex 4.342717e+001 1.514629e+001 -8.881784e-016 vertex 4.342717e+001 1.514629e+001 4.399139e+000 endloop endfacet facet normal -5.735764e-001 8.191520e-001 -3.257609e-016 outer loop vertex 4.342717e+001 1.514629e+001 -8.881784e-016 vertex 4.307020e+001 1.489634e+001 -8.881784e-016 vertex 4.307020e+001 1.489634e+001 4.399139e+000 endloop endfacet facet normal -4.226183e-001 9.063078e-001 3.166431e-016 outer loop vertex 4.267525e+001 1.471217e+001 -8.881784e-016 vertex 4.267525e+001 1.471217e+001 4.399139e+000 vertex 4.307020e+001 1.489634e+001 -8.881784e-016 endloop endfacet facet normal -2.588190e-001 9.659258e-001 0.000000e+000 outer loop vertex 4.267525e+001 1.471217e+001 -8.881784e-016 vertex 4.225432e+001 1.459938e+001 -8.881784e-016 vertex 4.225432e+001 1.459938e+001 4.399139e+000 endloop endfacet facet normal -8.715574e-002 9.961947e-001 0.000000e+000 outer loop vertex 4.225432e+001 1.459938e+001 -8.881784e-016 vertex 4.182020e+001 1.456140e+001 -8.881784e-016 vertex 4.182020e+001 1.456140e+001 4.399139e+000 endloop endfacet facet normal 8.715574e-002 9.961947e-001 -1.411631e-016 outer loop vertex 4.182020e+001 1.456140e+001 -8.881784e-016 vertex 4.138608e+001 1.459938e+001 -8.881784e-016 vertex 4.138608e+001 1.459938e+001 4.399139e+000 endloop endfacet facet normal 2.588190e-001 9.659258e-001 -4.198697e-016 outer loop vertex 4.138608e+001 1.459938e+001 -8.881784e-016 vertex 4.096515e+001 1.471217e+001 -8.881784e-016 vertex 4.096515e+001 1.471217e+001 4.399139e+000 endloop endfacet facet normal 4.226183e-001 9.063078e-001 3.691957e-016 outer loop vertex 4.096515e+001 1.471217e+001 -8.881784e-016 vertex 4.057020e+001 1.489634e+001 -8.881784e-016 vertex 4.057020e+001 1.489634e+001 4.399139e+000 endloop endfacet facet normal 5.735764e-001 8.191520e-001 3.330001e-016 outer loop vertex 4.057020e+001 1.489634e+001 -8.881784e-016 vertex 4.021323e+001 1.514629e+001 -8.881784e-016 vertex 4.021323e+001 1.514629e+001 4.399139e+000 endloop endfacet facet normal 7.071068e-001 7.071068e-001 2.855272e-016 outer loop vertex 3.990509e+001 1.545443e+001 -8.881784e-016 vertex 3.990509e+001 1.545443e+001 4.399139e+000 vertex 4.021323e+001 1.514629e+001 -8.881784e-016 endloop endfacet facet normal 8.191520e-001 5.735764e-001 0.000000e+000 outer loop vertex 3.990509e+001 1.545443e+001 -8.881784e-016 vertex 3.965514e+001 1.581140e+001 -8.881784e-016 vertex 3.965514e+001 1.581140e+001 4.399139e+000 endloop endfacet facet normal 9.063078e-001 4.226183e-001 0.000000e+000 outer loop vertex 3.965514e+001 1.581140e+001 -8.881784e-016 vertex 3.947097e+001 1.620635e+001 -8.881784e-016 vertex 3.947097e+001 1.620635e+001 4.399139e+000 endloop endfacet facet normal 9.659258e-001 2.588190e-001 2.090204e-016 outer loop vertex 3.935818e+001 1.662728e+001 -8.881784e-016 vertex 3.935818e+001 1.662728e+001 4.399139e+000 vertex 3.947097e+001 1.620635e+001 -8.881784e-016 endloop endfacet facet normal 9.961947e-001 8.715574e-002 7.040056e-016 outer loop vertex 3.935818e+001 1.662728e+001 -8.881784e-016 vertex 3.932020e+001 1.706140e+001 -8.881784e-016 vertex 3.932020e+001 1.706140e+001 4.399139e+000 endloop endfacet facet normal 9.961947e-001 -8.715574e-002 9.048915e-016 outer loop vertex 3.932020e+001 1.706140e+001 -8.881784e-016 vertex 3.935818e+001 1.749552e+001 -8.881784e-016 vertex 3.935818e+001 1.749552e+001 4.399139e+000 endloop endfacet facet normal 9.659258e-001 -2.588190e-001 1.030095e-015 outer loop vertex 3.947097e+001 1.791645e+001 -8.881784e-016 vertex 3.947097e+001 1.791645e+001 4.399139e+000 vertex 3.935818e+001 1.749552e+001 -8.881784e-016 endloop endfacet facet normal 9.063078e-001 -4.226183e-001 1.954566e-016 outer loop vertex 3.947097e+001 1.791645e+001 -8.881784e-016 vertex 3.965514e+001 1.831140e+001 -8.881784e-016 vertex 3.965514e+001 1.831140e+001 4.399139e+000 endloop endfacet facet normal 8.191520e-001 -5.735764e-001 2.606088e-016 outer loop vertex 3.965514e+001 1.831140e+001 -8.881784e-016 vertex 3.990509e+001 1.866837e+001 -8.881784e-016 vertex 3.990509e+001 1.866837e+001 4.399139e+000 endloop endfacet facet normal 7.071068e-001 -7.071068e-001 5.710544e-016 outer loop vertex 4.021323e+001 1.897651e+001 -8.881784e-016 vertex 4.021323e+001 1.897651e+001 4.399139e+000 vertex 3.990509e+001 1.866837e+001 -8.881784e-016 endloop endfacet facet normal 5.735764e-001 -8.191520e-001 3.981523e-016 outer loop vertex 4.021323e+001 1.897651e+001 -8.881784e-016 vertex 4.057020e+001 1.922646e+001 -8.881784e-016 vertex 4.057020e+001 1.922646e+001 4.399139e+000 endloop endfacet facet normal 4.226183e-001 -9.063078e-001 1.216174e-015 outer loop vertex 4.057020e+001 1.922646e+001 -8.881784e-016 vertex 4.096515e+001 1.941063e+001 -8.881784e-016 vertex 4.096515e+001 1.941063e+001 4.399139e+000 endloop endfacet facet normal 2.588190e-001 -9.659258e-001 5.284567e-016 outer loop vertex 4.096515e+001 1.941063e+001 -8.881784e-016 vertex 4.138608e+001 1.952342e+001 -8.881784e-016 vertex 4.138608e+001 1.952342e+001 4.399139e+000 endloop endfacet facet normal 8.715574e-002 -9.961947e-001 7.040056e-016 outer loop vertex 4.138608e+001 1.952342e+001 -8.881784e-016 vertex 4.182020e+001 1.956140e+001 -8.881784e-016 vertex 4.182020e+001 1.956140e+001 4.399139e+000 endloop endfacet facet normal -8.715574e-002 -9.961947e-001 1.013479e-016 outer loop vertex 4.182020e+001 1.956140e+001 -8.881784e-016 vertex 4.225432e+001 1.952342e+001 -8.881784e-016 vertex 4.225432e+001 1.952342e+001 4.399139e+000 endloop endfacet facet normal -2.588190e-001 -9.659258e-001 2.497501e-016 outer loop vertex 4.225432e+001 1.952342e+001 -8.881784e-016 vertex 4.267525e+001 1.941063e+001 -8.881784e-016 vertex 4.267525e+001 1.941063e+001 4.399139e+000 endloop endfacet facet normal -4.226183e-001 -9.063078e-001 2.461305e-016 outer loop vertex 4.267525e+001 1.941063e+001 -8.881784e-016 vertex 4.307020e+001 1.922646e+001 -8.881784e-016 vertex 4.307020e+001 1.922646e+001 4.399139e+000 endloop endfacet facet normal -5.735764e-001 -8.191520e-001 2.678479e-016 outer loop vertex 4.307020e+001 1.922646e+001 -8.881784e-016 vertex 4.342717e+001 1.897651e+001 -8.881784e-016 vertex 4.342717e+001 1.897651e+001 4.399139e+000 endloop endfacet facet normal -7.071068e-001 -7.071068e-001 0.000000e+000 outer loop vertex 4.342717e+001 1.897651e+001 -8.881784e-016 vertex 4.373531e+001 1.866837e+001 -8.881784e-016 vertex 4.373531e+001 1.866837e+001 4.399139e+000 endloop endfacet facet normal -8.191520e-001 -5.735764e-001 1.520218e-015 outer loop vertex 4.373531e+001 1.866837e+001 -8.881784e-016 vertex 4.398526e+001 1.831140e+001 -8.881784e-016 vertex 4.398526e+001 1.831140e+001 4.399139e+000 endloop endfacet facet normal -9.063078e-001 -4.226183e-001 4.850219e-016 outer loop vertex 4.398526e+001 1.831140e+001 -8.881784e-016 vertex 4.416943e+001 1.791645e+001 -8.881784e-016 vertex 4.416943e+001 1.791645e+001 4.399139e+000 endloop endfacet facet normal 5.145160e-001 4.501432e-002 8.562984e-001 outer loop vertex 2.137337e+001 1.245363e+001 5.000000e+000 vertex 2.232020e+001 1.306140e+001 4.399139e+000 vertex 2.132020e+001 1.306140e+001 5.000000e+000 endloop endfacet facet normal 5.145160e-001 4.501432e-002 8.562984e-001 outer loop vertex 2.137337e+001 1.245363e+001 5.000000e+000 vertex 2.235818e+001 1.262728e+001 4.399139e+000 vertex 2.232020e+001 1.306140e+001 4.399139e+000 endloop endfacet facet normal 4.988827e-001 1.336752e-001 8.562984e-001 outer loop vertex 2.137337e+001 1.245363e+001 5.000000e+000 vertex 2.153128e+001 1.186433e+001 5.000000e+000 vertex 2.235818e+001 1.262728e+001 4.399139e+000 endloop endfacet facet normal 4.988827e-001 1.336752e-001 8.562984e-001 outer loop vertex 2.235818e+001 1.262728e+001 4.399139e+000 vertex 2.153128e+001 1.186433e+001 5.000000e+000 vertex 2.247097e+001 1.220635e+001 4.399139e+000 endloop endfacet facet normal 4.680911e-001 2.182745e-001 8.562984e-001 outer loop vertex 2.247097e+001 1.220635e+001 4.399139e+000 vertex 2.153128e+001 1.186433e+001 5.000000e+000 vertex 2.178911e+001 1.131140e+001 5.000000e+000 endloop endfacet facet normal 4.230768e-001 2.962415e-001 8.562984e-001 outer loop vertex 2.265514e+001 1.181140e+001 4.399139e+000 vertex 2.178911e+001 1.131140e+001 5.000000e+000 vertex 2.213904e+001 1.081164e+001 5.000000e+000 endloop endfacet facet normal 3.652075e-001 3.652075e-001 8.562984e-001 outer loop vertex 2.290509e+001 1.145443e+001 4.399139e+000 vertex 2.213904e+001 1.081164e+001 5.000000e+000 vertex 2.257044e+001 1.038024e+001 5.000000e+000 endloop endfacet facet normal 2.962415e-001 4.230768e-001 8.562984e-001 outer loop vertex 2.321323e+001 1.114629e+001 4.399139e+000 vertex 2.257044e+001 1.038024e+001 5.000000e+000 vertex 2.307020e+001 1.003031e+001 5.000000e+000 endloop endfacet facet normal 2.182745e-001 4.680911e-001 8.562984e-001 outer loop vertex 2.357020e+001 1.089634e+001 4.399139e+000 vertex 2.307020e+001 1.003031e+001 5.000000e+000 vertex 2.362313e+001 9.772476e+000 5.000000e+000 endloop endfacet facet normal 1.336752e-001 4.988827e-001 8.562984e-001 outer loop vertex 2.396515e+001 1.071217e+001 4.399139e+000 vertex 2.362313e+001 9.772476e+000 5.000000e+000 vertex 2.421243e+001 9.614573e+000 5.000000e+000 endloop endfacet facet normal 4.501432e-002 5.145160e-001 8.562984e-001 outer loop vertex 2.438608e+001 1.059938e+001 4.399139e+000 vertex 2.421243e+001 9.614573e+000 5.000000e+000 vertex 2.482020e+001 1.056140e+001 4.399139e+000 endloop endfacet facet normal 1.336752e-001 4.988827e-001 8.562984e-001 outer loop vertex 2.438608e+001 1.059938e+001 4.399139e+000 vertex 2.396515e+001 1.071217e+001 4.399139e+000 vertex 2.421243e+001 9.614573e+000 5.000000e+000 endloop endfacet facet normal 4.501432e-002 5.145160e-001 8.562984e-001 outer loop vertex 2.421243e+001 9.614573e+000 5.000000e+000 vertex 2.482020e+001 9.561400e+000 5.000000e+000 vertex 2.482020e+001 1.056140e+001 4.399139e+000 endloop endfacet facet normal -4.501432e-002 5.145160e-001 8.562984e-001 outer loop vertex 2.482020e+001 1.056140e+001 4.399139e+000 vertex 2.482020e+001 9.561400e+000 5.000000e+000 vertex 2.542797e+001 9.614573e+000 5.000000e+000 endloop endfacet facet normal -1.336752e-001 4.988827e-001 8.562984e-001 outer loop vertex 2.525432e+001 1.059938e+001 4.399139e+000 vertex 2.542797e+001 9.614573e+000 5.000000e+000 vertex 2.601727e+001 9.772476e+000 5.000000e+000 endloop endfacet facet normal -2.182745e-001 4.680911e-001 8.562984e-001 outer loop vertex 2.567525e+001 1.071217e+001 4.399139e+000 vertex 2.601727e+001 9.772476e+000 5.000000e+000 vertex 2.657020e+001 1.003031e+001 5.000000e+000 endloop endfacet facet normal -2.962415e-001 4.230768e-001 8.562984e-001 outer loop vertex 2.607020e+001 1.089634e+001 4.399139e+000 vertex 2.657020e+001 1.003031e+001 5.000000e+000 vertex 2.642717e+001 1.114629e+001 4.399139e+000 endloop endfacet facet normal -2.182745e-001 4.680911e-001 8.562984e-001 outer loop vertex 2.607020e+001 1.089634e+001 4.399139e+000 vertex 2.567525e+001 1.071217e+001 4.399139e+000 vertex 2.657020e+001 1.003031e+001 5.000000e+000 endloop endfacet facet normal -2.962415e-001 4.230768e-001 8.562984e-001 outer loop vertex 2.657020e+001 1.003031e+001 5.000000e+000 vertex 2.706996e+001 1.038024e+001 5.000000e+000 vertex 2.642717e+001 1.114629e+001 4.399139e+000 endloop endfacet facet normal -3.652075e-001 3.652075e-001 8.562984e-001 outer loop vertex 2.642717e+001 1.114629e+001 4.399139e+000 vertex 2.706996e+001 1.038024e+001 5.000000e+000 vertex 2.750136e+001 1.081164e+001 5.000000e+000 endloop endfacet facet normal -4.230768e-001 2.962415e-001 8.562984e-001 outer loop vertex 2.673531e+001 1.145443e+001 4.399139e+000 vertex 2.750136e+001 1.081164e+001 5.000000e+000 vertex 2.785129e+001 1.131140e+001 5.000000e+000 endloop endfacet facet normal -4.680911e-001 2.182745e-001 8.562984e-001 outer loop vertex 2.698526e+001 1.181140e+001 4.399139e+000 vertex 2.785129e+001 1.131140e+001 5.000000e+000 vertex 2.810912e+001 1.186433e+001 5.000000e+000 endloop endfacet facet normal -4.988827e-001 1.336752e-001 8.562984e-001 outer loop vertex 2.716943e+001 1.220635e+001 4.399139e+000 vertex 2.810912e+001 1.186433e+001 5.000000e+000 vertex 2.826703e+001 1.245363e+001 5.000000e+000 endloop endfacet facet normal -5.145160e-001 4.501432e-002 8.562984e-001 outer loop vertex 2.728222e+001 1.262728e+001 4.399139e+000 vertex 2.826703e+001 1.245363e+001 5.000000e+000 vertex 2.832020e+001 1.306140e+001 5.000000e+000 endloop endfacet facet normal -5.145160e-001 -4.501432e-002 8.562984e-001 outer loop vertex 2.732020e+001 1.306140e+001 4.399139e+000 vertex 2.832020e+001 1.306140e+001 5.000000e+000 vertex 2.728222e+001 1.349552e+001 4.399139e+000 endloop endfacet facet normal -5.145160e-001 4.501432e-002 8.562984e-001 outer loop vertex 2.732020e+001 1.306140e+001 4.399139e+000 vertex 2.728222e+001 1.262728e+001 4.399139e+000 vertex 2.832020e+001 1.306140e+001 5.000000e+000 endloop endfacet facet normal -5.145160e-001 -4.501432e-002 8.562984e-001 outer loop vertex 2.832020e+001 1.306140e+001 5.000000e+000 vertex 2.826703e+001 1.366917e+001 5.000000e+000 vertex 2.728222e+001 1.349552e+001 4.399139e+000 endloop endfacet facet normal -4.988827e-001 -1.336752e-001 8.562984e-001 outer loop vertex 2.728222e+001 1.349552e+001 4.399139e+000 vertex 2.826703e+001 1.366917e+001 5.000000e+000 vertex 2.716943e+001 1.391645e+001 4.399139e+000 endloop endfacet facet normal -4.988827e-001 -1.336752e-001 8.562984e-001 outer loop vertex 2.716943e+001 1.391645e+001 4.399139e+000 vertex 2.826703e+001 1.366917e+001 5.000000e+000 vertex 2.810912e+001 1.425847e+001 5.000000e+000 endloop endfacet facet normal -4.680911e-001 -2.182745e-001 8.562984e-001 outer loop vertex 2.698526e+001 1.431140e+001 4.399139e+000 vertex 2.810912e+001 1.425847e+001 5.000000e+000 vertex 2.785129e+001 1.481140e+001 5.000000e+000 endloop endfacet facet normal -4.230768e-001 -2.962415e-001 8.562984e-001 outer loop vertex 2.750136e+001 1.531116e+001 5.000000e+000 vertex 2.698526e+001 1.431140e+001 4.399139e+000 vertex 2.785129e+001 1.481140e+001 5.000000e+000 endloop endfacet facet normal -4.230768e-001 -2.962415e-001 8.562984e-001 outer loop vertex 2.750136e+001 1.531116e+001 5.000000e+000 vertex 2.673531e+001 1.466837e+001 4.399139e+000 vertex 2.698526e+001 1.431140e+001 4.399139e+000 endloop endfacet facet normal -3.652075e-001 -3.652075e-001 8.562984e-001 outer loop vertex 2.750136e+001 1.531116e+001 5.000000e+000 vertex 2.706996e+001 1.574256e+001 5.000000e+000 vertex 2.673531e+001 1.466837e+001 4.399139e+000 endloop endfacet facet normal -3.652075e-001 -3.652075e-001 8.562984e-001 outer loop vertex 2.673531e+001 1.466837e+001 4.399139e+000 vertex 2.706996e+001 1.574256e+001 5.000000e+000 vertex 2.642717e+001 1.497651e+001 4.399139e+000 endloop endfacet facet normal -2.962415e-001 -4.230768e-001 8.562984e-001 outer loop vertex 2.642717e+001 1.497651e+001 4.399139e+000 vertex 2.706996e+001 1.574256e+001 5.000000e+000 vertex 2.607020e+001 1.522646e+001 4.399139e+000 endloop endfacet facet normal -2.962415e-001 -4.230768e-001 8.562984e-001 outer loop vertex 2.607020e+001 1.522646e+001 4.399139e+000 vertex 2.706996e+001 1.574256e+001 5.000000e+000 vertex 2.657020e+001 1.609249e+001 5.000000e+000 endloop endfacet facet normal -2.182745e-001 -4.680911e-001 8.562984e-001 outer loop vertex 2.567525e+001 1.541063e+001 4.399139e+000 vertex 2.657020e+001 1.609249e+001 5.000000e+000 vertex 2.601727e+001 1.635032e+001 5.000000e+000 endloop endfacet facet normal -1.336752e-001 -4.988827e-001 8.562984e-001 outer loop vertex 2.525432e+001 1.552342e+001 4.399139e+000 vertex 2.601727e+001 1.635032e+001 5.000000e+000 vertex 2.542797e+001 1.650823e+001 5.000000e+000 endloop endfacet facet normal -4.501432e-002 -5.145160e-001 8.562984e-001 outer loop vertex 2.482020e+001 1.656140e+001 5.000000e+000 vertex 2.525432e+001 1.552342e+001 4.399139e+000 vertex 2.542797e+001 1.650823e+001 5.000000e+000 endloop endfacet facet normal -4.501432e-002 -5.145160e-001 8.562984e-001 outer loop vertex 2.482020e+001 1.656140e+001 5.000000e+000 vertex 2.482020e+001 1.556140e+001 4.399139e+000 vertex 2.525432e+001 1.552342e+001 4.399139e+000 endloop endfacet facet normal 4.501432e-002 -5.145160e-001 8.562984e-001 outer loop vertex 2.482020e+001 1.656140e+001 5.000000e+000 vertex 2.421243e+001 1.650823e+001 5.000000e+000 vertex 2.482020e+001 1.556140e+001 4.399139e+000 endloop endfacet facet normal 4.501432e-002 -5.145160e-001 8.562984e-001 outer loop vertex 2.482020e+001 1.556140e+001 4.399139e+000 vertex 2.421243e+001 1.650823e+001 5.000000e+000 vertex 2.438608e+001 1.552342e+001 4.399139e+000 endloop endfacet facet normal 1.336752e-001 -4.988827e-001 8.562984e-001 outer loop vertex 2.438608e+001 1.552342e+001 4.399139e+000 vertex 2.421243e+001 1.650823e+001 5.000000e+000 vertex 2.362313e+001 1.635032e+001 5.000000e+000 endloop endfacet facet normal 2.182745e-001 -4.680911e-001 8.562984e-001 outer loop vertex 2.396515e+001 1.541063e+001 4.399139e+000 vertex 2.362313e+001 1.635032e+001 5.000000e+000 vertex 2.307020e+001 1.609249e+001 5.000000e+000 endloop endfacet facet normal 2.962415e-001 -4.230768e-001 8.562984e-001 outer loop vertex 2.357020e+001 1.522646e+001 4.399139e+000 vertex 2.307020e+001 1.609249e+001 5.000000e+000 vertex 2.321323e+001 1.497651e+001 4.399139e+000 endloop endfacet facet normal 2.182745e-001 -4.680911e-001 8.562984e-001 outer loop vertex 2.357020e+001 1.522646e+001 4.399139e+000 vertex 2.396515e+001 1.541063e+001 4.399139e+000 vertex 2.307020e+001 1.609249e+001 5.000000e+000 endloop endfacet facet normal 2.962415e-001 -4.230768e-001 8.562984e-001 outer loop vertex 2.321323e+001 1.497651e+001 4.399139e+000 vertex 2.307020e+001 1.609249e+001 5.000000e+000 vertex 2.257044e+001 1.574256e+001 5.000000e+000 endloop endfacet facet normal 3.652075e-001 -3.652075e-001 8.562984e-001 outer loop vertex 2.213904e+001 1.531116e+001 5.000000e+000 vertex 2.321323e+001 1.497651e+001 4.399139e+000 vertex 2.257044e+001 1.574256e+001 5.000000e+000 endloop endfacet facet normal 3.652075e-001 -3.652075e-001 8.562984e-001 outer loop vertex 2.213904e+001 1.531116e+001 5.000000e+000 vertex 2.290509e+001 1.466837e+001 4.399139e+000 vertex 2.321323e+001 1.497651e+001 4.399139e+000 endloop endfacet facet normal 4.230768e-001 -2.962415e-001 8.562984e-001 outer loop vertex 2.213904e+001 1.531116e+001 5.000000e+000 vertex 2.178911e+001 1.481140e+001 5.000000e+000 vertex 2.290509e+001 1.466837e+001 4.399139e+000 endloop endfacet facet normal 4.230768e-001 -2.962415e-001 8.562984e-001 outer loop vertex 2.290509e+001 1.466837e+001 4.399139e+000 vertex 2.178911e+001 1.481140e+001 5.000000e+000 vertex 2.265514e+001 1.431140e+001 4.399139e+000 endloop endfacet facet normal 4.680911e-001 -2.182745e-001 8.562984e-001 outer loop vertex 2.265514e+001 1.431140e+001 4.399139e+000 vertex 2.178911e+001 1.481140e+001 5.000000e+000 vertex 2.153128e+001 1.425847e+001 5.000000e+000 endloop endfacet facet normal 4.988827e-001 -1.336752e-001 8.562984e-001 outer loop vertex 2.247097e+001 1.391645e+001 4.399139e+000 vertex 2.153128e+001 1.425847e+001 5.000000e+000 vertex 2.137337e+001 1.366917e+001 5.000000e+000 endloop endfacet facet normal 5.145160e-001 -4.501432e-002 8.562984e-001 outer loop vertex 2.235818e+001 1.349552e+001 4.399139e+000 vertex 2.137337e+001 1.366917e+001 5.000000e+000 vertex 2.132020e+001 1.306140e+001 5.000000e+000 endloop endfacet facet normal 5.145160e-001 -4.501432e-002 8.562984e-001 outer loop vertex 2.232020e+001 1.306140e+001 4.399139e+000 vertex 2.235818e+001 1.349552e+001 4.399139e+000 vertex 2.132020e+001 1.306140e+001 5.000000e+000 endloop endfacet facet normal 4.988827e-001 -1.336752e-001 8.562984e-001 outer loop vertex 2.235818e+001 1.349552e+001 4.399139e+000 vertex 2.247097e+001 1.391645e+001 4.399139e+000 vertex 2.137337e+001 1.366917e+001 5.000000e+000 endloop endfacet facet normal 4.680911e-001 -2.182745e-001 8.562984e-001 outer loop vertex 2.247097e+001 1.391645e+001 4.399139e+000 vertex 2.265514e+001 1.431140e+001 4.399139e+000 vertex 2.153128e+001 1.425847e+001 5.000000e+000 endloop endfacet facet normal 1.336752e-001 -4.988827e-001 8.562984e-001 outer loop vertex 2.396515e+001 1.541063e+001 4.399139e+000 vertex 2.438608e+001 1.552342e+001 4.399139e+000 vertex 2.362313e+001 1.635032e+001 5.000000e+000 endloop endfacet facet normal -1.336752e-001 -4.988827e-001 8.562984e-001 outer loop vertex 2.525432e+001 1.552342e+001 4.399139e+000 vertex 2.567525e+001 1.541063e+001 4.399139e+000 vertex 2.601727e+001 1.635032e+001 5.000000e+000 endloop endfacet facet normal -2.182745e-001 -4.680911e-001 8.562984e-001 outer loop vertex 2.567525e+001 1.541063e+001 4.399139e+000 vertex 2.607020e+001 1.522646e+001 4.399139e+000 vertex 2.657020e+001 1.609249e+001 5.000000e+000 endloop endfacet facet normal -4.680911e-001 -2.182745e-001 8.562984e-001 outer loop vertex 2.698526e+001 1.431140e+001 4.399139e+000 vertex 2.716943e+001 1.391645e+001 4.399139e+000 vertex 2.810912e+001 1.425847e+001 5.000000e+000 endloop endfacet facet normal -4.988827e-001 1.336752e-001 8.562984e-001 outer loop vertex 2.728222e+001 1.262728e+001 4.399139e+000 vertex 2.716943e+001 1.220635e+001 4.399139e+000 vertex 2.826703e+001 1.245363e+001 5.000000e+000 endloop endfacet facet normal -4.680911e-001 2.182745e-001 8.562984e-001 outer loop vertex 2.716943e+001 1.220635e+001 4.399139e+000 vertex 2.698526e+001 1.181140e+001 4.399139e+000 vertex 2.810912e+001 1.186433e+001 5.000000e+000 endloop endfacet facet normal -4.230768e-001 2.962415e-001 8.562984e-001 outer loop vertex 2.698526e+001 1.181140e+001 4.399139e+000 vertex 2.673531e+001 1.145443e+001 4.399139e+000 vertex 2.785129e+001 1.131140e+001 5.000000e+000 endloop endfacet facet normal -3.652075e-001 3.652075e-001 8.562984e-001 outer loop vertex 2.673531e+001 1.145443e+001 4.399139e+000 vertex 2.642717e+001 1.114629e+001 4.399139e+000 vertex 2.750136e+001 1.081164e+001 5.000000e+000 endloop endfacet facet normal -1.336752e-001 4.988827e-001 8.562984e-001 outer loop vertex 2.567525e+001 1.071217e+001 4.399139e+000 vertex 2.525432e+001 1.059938e+001 4.399139e+000 vertex 2.601727e+001 9.772476e+000 5.000000e+000 endloop endfacet facet normal -4.501432e-002 5.145160e-001 8.562984e-001 outer loop vertex 2.525432e+001 1.059938e+001 4.399139e+000 vertex 2.482020e+001 1.056140e+001 4.399139e+000 vertex 2.542797e+001 9.614573e+000 5.000000e+000 endloop endfacet facet normal 2.182745e-001 4.680911e-001 8.562984e-001 outer loop vertex 2.396515e+001 1.071217e+001 4.399139e+000 vertex 2.357020e+001 1.089634e+001 4.399139e+000 vertex 2.362313e+001 9.772476e+000 5.000000e+000 endloop endfacet facet normal 2.962415e-001 4.230768e-001 8.562984e-001 outer loop vertex 2.357020e+001 1.089634e+001 4.399139e+000 vertex 2.321323e+001 1.114629e+001 4.399139e+000 vertex 2.307020e+001 1.003031e+001 5.000000e+000 endloop endfacet facet normal 3.652075e-001 3.652075e-001 8.562984e-001 outer loop vertex 2.321323e+001 1.114629e+001 4.399139e+000 vertex 2.290509e+001 1.145443e+001 4.399139e+000 vertex 2.257044e+001 1.038024e+001 5.000000e+000 endloop endfacet facet normal 4.230768e-001 2.962415e-001 8.562984e-001 outer loop vertex 2.290509e+001 1.145443e+001 4.399139e+000 vertex 2.265514e+001 1.181140e+001 4.399139e+000 vertex 2.213904e+001 1.081164e+001 5.000000e+000 endloop endfacet facet normal 4.680911e-001 2.182745e-001 8.562984e-001 outer loop vertex 2.265514e+001 1.181140e+001 4.399139e+000 vertex 2.247097e+001 1.220635e+001 4.399139e+000 vertex 2.178911e+001 1.131140e+001 5.000000e+000 endloop endfacet facet normal -9.961947e-001 8.715574e-002 -3.438588e-017 outer loop vertex 2.732020e+001 1.306140e+001 0.000000e+000 vertex 2.728222e+001 1.262728e+001 0.000000e+000 vertex 2.728222e+001 1.262728e+001 4.399139e+000 endloop endfacet facet normal -9.961947e-001 8.715574e-002 0.000000e+000 outer loop vertex 2.732020e+001 1.306140e+001 4.399139e+000 vertex 2.732020e+001 1.306140e+001 0.000000e+000 vertex 2.728222e+001 1.262728e+001 4.399139e+000 endloop endfacet facet normal -9.961947e-001 -8.715574e-002 0.000000e+000 outer loop vertex 2.732020e+001 1.306140e+001 4.399139e+000 vertex 2.728222e+001 1.349552e+001 0.000000e+000 vertex 2.732020e+001 1.306140e+001 0.000000e+000 endloop endfacet facet normal -9.961947e-001 -8.715574e-002 -6.515219e-017 outer loop vertex 2.732020e+001 1.306140e+001 4.399139e+000 vertex 2.728222e+001 1.349552e+001 4.399139e+000 vertex 2.728222e+001 1.349552e+001 0.000000e+000 endloop endfacet facet normal -9.659258e-001 -2.588190e-001 1.414640e-015 outer loop vertex 2.728222e+001 1.349552e+001 0.000000e+000 vertex 2.728222e+001 1.349552e+001 4.399139e+000 vertex 2.716943e+001 1.391645e+001 0.000000e+000 endloop endfacet facet normal -9.659258e-001 -2.588190e-001 -3.545305e-016 outer loop vertex 2.716943e+001 1.391645e+001 0.000000e+000 vertex 2.728222e+001 1.349552e+001 4.399139e+000 vertex 2.716943e+001 1.391645e+001 4.399139e+000 endloop endfacet facet normal -9.063078e-001 -4.226183e-001 -7.585588e-016 outer loop vertex 2.698526e+001 1.431140e+001 0.000000e+000 vertex 2.716943e+001 1.391645e+001 4.399139e+000 vertex 2.698526e+001 1.431140e+001 4.399139e+000 endloop endfacet facet normal -8.191520e-001 -5.735764e-001 -2.635182e-016 outer loop vertex 2.673531e+001 1.466837e+001 0.000000e+000 vertex 2.698526e+001 1.431140e+001 4.399139e+000 vertex 2.673531e+001 1.466837e+001 4.399139e+000 endloop endfacet facet normal -7.071068e-001 -7.071068e-001 -5.710544e-016 outer loop vertex 2.642717e+001 1.497651e+001 0.000000e+000 vertex 2.673531e+001 1.466837e+001 4.399139e+000 vertex 2.642717e+001 1.497651e+001 4.399139e+000 endloop endfacet facet normal -5.735764e-001 -8.191520e-001 -8.612394e-016 outer loop vertex 2.607020e+001 1.522646e+001 0.000000e+000 vertex 2.642717e+001 1.497651e+001 4.399139e+000 vertex 2.607020e+001 1.522646e+001 4.399139e+000 endloop endfacet facet normal -4.226183e-001 -9.063078e-001 -4.853241e-016 outer loop vertex 2.567525e+001 1.541063e+001 0.000000e+000 vertex 2.607020e+001 1.522646e+001 4.399139e+000 vertex 2.567525e+001 1.541063e+001 4.399139e+000 endloop endfacet facet normal -2.588190e-001 -9.659258e-001 -5.300545e-016 outer loop vertex 2.525432e+001 1.552342e+001 0.000000e+000 vertex 2.567525e+001 1.541063e+001 4.399139e+000 vertex 2.525432e+001 1.552342e+001 4.399139e+000 endloop endfacet facet normal -8.715574e-002 -9.961947e-001 -7.038636e-016 outer loop vertex 2.482020e+001 1.556140e+001 0.000000e+000 vertex 2.525432e+001 1.552342e+001 4.399139e+000 vertex 2.482020e+001 1.556140e+001 4.399139e+000 endloop endfacet facet normal 8.715574e-002 -9.961947e-001 -5.029161e-016 outer loop vertex 2.438608e+001 1.552342e+001 0.000000e+000 vertex 2.482020e+001 1.556140e+001 4.399139e+000 vertex 2.438608e+001 1.552342e+001 4.399139e+000 endloop endfacet facet normal 2.588190e-001 -9.659258e-001 -6.400577e-016 outer loop vertex 2.396515e+001 1.541063e+001 0.000000e+000 vertex 2.438608e+001 1.552342e+001 4.399139e+000 vertex 2.396515e+001 1.541063e+001 4.399139e+000 endloop endfacet facet normal 4.226183e-001 -9.063078e-001 -5.879071e-016 outer loop vertex 2.357020e+001 1.522646e+001 0.000000e+000 vertex 2.396515e+001 1.541063e+001 4.399139e+000 vertex 2.357020e+001 1.522646e+001 4.399139e+000 endloop endfacet facet normal 5.735764e-001 -8.191520e-001 -5.942889e-016 outer loop vertex 2.321323e+001 1.497651e+001 0.000000e+000 vertex 2.357020e+001 1.522646e+001 4.399139e+000 vertex 2.321323e+001 1.497651e+001 4.399139e+000 endloop endfacet facet normal 7.071068e-001 -7.071068e-001 -5.710544e-016 outer loop vertex 2.290509e+001 1.466837e+001 0.000000e+000 vertex 2.321323e+001 1.497651e+001 4.399139e+000 vertex 2.290509e+001 1.466837e+001 4.399139e+000 endloop endfacet facet normal 8.191520e-001 -5.735764e-001 -8.612394e-016 outer loop vertex 2.265514e+001 1.431140e+001 0.000000e+000 vertex 2.290509e+001 1.466837e+001 4.399139e+000 vertex 2.265514e+001 1.431140e+001 4.399139e+000 endloop endfacet facet normal 9.063078e-001 -4.226183e-001 -3.146724e-016 outer loop vertex 2.247097e+001 1.391645e+001 0.000000e+000 vertex 2.265514e+001 1.431140e+001 4.399139e+000 vertex 2.247097e+001 1.391645e+001 4.399139e+000 endloop endfacet facet normal 9.659258e-001 -2.588190e-001 -5.300545e-016 outer loop vertex 2.235818e+001 1.349552e+001 0.000000e+000 vertex 2.247097e+001 1.391645e+001 4.399139e+000 vertex 2.235818e+001 1.349552e+001 4.399139e+000 endloop endfacet facet normal 9.961947e-001 -8.715574e-002 -7.038636e-016 outer loop vertex 2.232020e+001 1.306140e+001 0.000000e+000 vertex 2.235818e+001 1.349552e+001 4.399139e+000 vertex 2.232020e+001 1.306140e+001 4.399139e+000 endloop endfacet facet normal 9.961947e-001 8.715574e-002 3.519318e-017 outer loop vertex 2.235818e+001 1.262728e+001 0.000000e+000 vertex 2.232020e+001 1.306140e+001 4.399139e+000 vertex 2.235818e+001 1.262728e+001 4.399139e+000 endloop endfacet facet normal 9.659258e-001 2.588190e-001 -5.710544e-016 outer loop vertex 2.247097e+001 1.220635e+001 0.000000e+000 vertex 2.235818e+001 1.262728e+001 4.399139e+000 vertex 2.247097e+001 1.220635e+001 4.399139e+000 endloop endfacet facet normal 9.063078e-001 4.226183e-001 1.706518e-016 outer loop vertex 2.265514e+001 1.181140e+001 0.000000e+000 vertex 2.247097e+001 1.220635e+001 4.399139e+000 vertex 2.265514e+001 1.181140e+001 4.399139e+000 endloop endfacet facet normal 8.191520e-001 5.735764e-001 2.316081e-016 outer loop vertex 2.290509e+001 1.145443e+001 0.000000e+000 vertex 2.265514e+001 1.181140e+001 4.399139e+000 vertex 2.290509e+001 1.145443e+001 4.399139e+000 endloop endfacet facet normal 7.071068e-001 7.071068e-001 -2.855272e-016 outer loop vertex 2.321323e+001 1.114629e+001 0.000000e+000 vertex 2.290509e+001 1.145443e+001 4.399139e+000 vertex 2.321323e+001 1.114629e+001 4.399139e+000 endloop endfacet facet normal 5.735764e-001 8.191520e-001 0.000000e+000 outer loop vertex 2.357020e+001 1.089634e+001 0.000000e+000 vertex 2.321323e+001 1.114629e+001 4.399139e+000 vertex 2.357020e+001 1.089634e+001 4.399139e+000 endloop endfacet facet normal 4.226183e-001 9.063078e-001 -3.413035e-016 outer loop vertex 2.396515e+001 1.071217e+001 0.000000e+000 vertex 2.357020e+001 1.089634e+001 4.399139e+000 vertex 2.396515e+001 1.071217e+001 4.399139e+000 endloop endfacet facet normal 2.588190e-001 9.659258e-001 -2.090204e-016 outer loop vertex 2.438608e+001 1.059938e+001 0.000000e+000 vertex 2.396515e+001 1.071217e+001 4.399139e+000 vertex 2.438608e+001 1.059938e+001 4.399139e+000 endloop endfacet facet normal 8.715574e-002 9.961947e-001 -7.038636e-017 outer loop vertex 2.482020e+001 1.056140e+001 0.000000e+000 vertex 2.438608e+001 1.059938e+001 4.399139e+000 vertex 2.482020e+001 1.056140e+001 4.399139e+000 endloop endfacet facet normal -8.715574e-002 9.961947e-001 -3.318735e-016 outer loop vertex 2.525432e+001 1.059938e+001 0.000000e+000 vertex 2.482020e+001 1.056140e+001 4.399139e+000 vertex 2.525432e+001 1.059938e+001 4.399139e+000 endloop endfacet facet normal -2.588190e-001 9.659258e-001 2.090204e-016 outer loop vertex 2.567525e+001 1.071217e+001 0.000000e+000 vertex 2.525432e+001 1.059938e+001 4.399139e+000 vertex 2.567525e+001 1.071217e+001 4.399139e+000 endloop endfacet facet normal -4.226183e-001 9.063078e-001 0.000000e+000 outer loop vertex 2.607020e+001 1.089634e+001 0.000000e+000 vertex 2.567525e+001 1.071217e+001 4.399139e+000 vertex 2.607020e+001 1.089634e+001 4.399139e+000 endloop endfacet facet normal -5.735764e-001 8.191520e-001 1.324456e-016 outer loop vertex 2.642717e+001 1.114629e+001 0.000000e+000 vertex 2.607020e+001 1.089634e+001 4.399139e+000 vertex 2.642717e+001 1.114629e+001 4.399139e+000 endloop endfacet facet normal -7.071068e-001 7.071068e-001 5.710544e-016 outer loop vertex 2.673531e+001 1.145443e+001 0.000000e+000 vertex 2.642717e+001 1.114629e+001 4.399139e+000 vertex 2.673531e+001 1.145443e+001 4.399139e+000 endloop endfacet facet normal -8.191520e-001 5.735764e-001 0.000000e+000 outer loop vertex 2.698526e+001 1.181140e+001 0.000000e+000 vertex 2.673531e+001 1.145443e+001 4.399139e+000 vertex 2.698526e+001 1.181140e+001 4.399139e+000 endloop endfacet facet normal -9.063078e-001 4.226183e-001 -3.413035e-016 outer loop vertex 2.716943e+001 1.220635e+001 0.000000e+000 vertex 2.698526e+001 1.181140e+001 4.399139e+000 vertex 2.716943e+001 1.220635e+001 4.399139e+000 endloop endfacet facet normal -9.659258e-001 2.588190e-001 -1.045102e-016 outer loop vertex 2.728222e+001 1.262728e+001 0.000000e+000 vertex 2.716943e+001 1.220635e+001 4.399139e+000 vertex 2.728222e+001 1.262728e+001 4.399139e+000 endloop endfacet facet normal -9.659258e-001 2.588190e-001 -2.063153e-016 outer loop vertex 2.728222e+001 1.262728e+001 0.000000e+000 vertex 2.716943e+001 1.220635e+001 0.000000e+000 vertex 2.716943e+001 1.220635e+001 4.399139e+000 endloop endfacet facet normal -9.063078e-001 4.226183e-001 0.000000e+000 outer loop vertex 2.716943e+001 1.220635e+001 0.000000e+000 vertex 2.698526e+001 1.181140e+001 0.000000e+000 vertex 2.698526e+001 1.181140e+001 4.399139e+000 endloop endfacet facet normal -8.191520e-001 5.735764e-001 6.587610e-016 outer loop vertex 2.698526e+001 1.181140e+001 0.000000e+000 vertex 2.673531e+001 1.145443e+001 0.000000e+000 vertex 2.673531e+001 1.145443e+001 4.399139e+000 endloop endfacet facet normal -7.071068e-001 7.071068e-001 2.895653e-016 outer loop vertex 2.673531e+001 1.145443e+001 0.000000e+000 vertex 2.642717e+001 1.114629e+001 0.000000e+000 vertex 2.642717e+001 1.114629e+001 4.399139e+000 endloop endfacet facet normal -5.735764e-001 8.191520e-001 0.000000e+000 outer loop vertex 2.642717e+001 1.114629e+001 0.000000e+000 vertex 2.607020e+001 1.089634e+001 0.000000e+000 vertex 2.607020e+001 1.089634e+001 4.399139e+000 endloop endfacet facet normal -4.226183e-001 9.063078e-001 3.402392e-016 outer loop vertex 2.607020e+001 1.089634e+001 0.000000e+000 vertex 2.567525e+001 1.071217e+001 0.000000e+000 vertex 2.567525e+001 1.071217e+001 4.399139e+000 endloop endfacet facet normal -2.588190e-001 9.659258e-001 -1.845979e-016 outer loop vertex 2.567525e+001 1.071217e+001 0.000000e+000 vertex 2.525432e+001 1.059938e+001 0.000000e+000 vertex 2.525432e+001 1.059938e+001 4.399139e+000 endloop endfacet facet normal -8.715574e-002 9.961947e-001 7.058154e-017 outer loop vertex 2.525432e+001 1.059938e+001 0.000000e+000 vertex 2.482020e+001 1.056140e+001 0.000000e+000 vertex 2.482020e+001 1.056140e+001 4.399139e+000 endloop endfacet facet normal 8.715574e-002 9.961947e-001 -7.058154e-017 outer loop vertex 2.482020e+001 1.056140e+001 0.000000e+000 vertex 2.438608e+001 1.059938e+001 0.000000e+000 vertex 2.438608e+001 1.059938e+001 4.399139e+000 endloop endfacet facet normal 2.588190e-001 9.659258e-001 -2.099348e-016 outer loop vertex 2.438608e+001 1.059938e+001 0.000000e+000 vertex 2.396515e+001 1.071217e+001 0.000000e+000 vertex 2.396515e+001 1.071217e+001 4.399139e+000 endloop endfacet facet normal 4.226183e-001 9.063078e-001 0.000000e+000 outer loop vertex 2.396515e+001 1.071217e+001 0.000000e+000 vertex 2.357020e+001 1.089634e+001 0.000000e+000 vertex 2.357020e+001 1.089634e+001 4.399139e+000 endloop endfacet facet normal 5.735764e-001 8.191520e-001 -1.303044e-016 outer loop vertex 2.357020e+001 1.089634e+001 0.000000e+000 vertex 2.321323e+001 1.114629e+001 0.000000e+000 vertex 2.321323e+001 1.114629e+001 4.399139e+000 endloop endfacet facet normal 7.071068e-001 7.071068e-001 2.895653e-016 outer loop vertex 2.321323e+001 1.114629e+001 0.000000e+000 vertex 2.290509e+001 1.145443e+001 0.000000e+000 vertex 2.290509e+001 1.145443e+001 4.399139e+000 endloop endfacet facet normal 8.191520e-001 5.735764e-001 2.316522e-016 outer loop vertex 2.290509e+001 1.145443e+001 0.000000e+000 vertex 2.265514e+001 1.181140e+001 0.000000e+000 vertex 2.265514e+001 1.181140e+001 4.399139e+000 endloop endfacet facet normal 9.063078e-001 4.226183e-001 -3.909131e-016 outer loop vertex 2.265514e+001 1.181140e+001 0.000000e+000 vertex 2.247097e+001 1.220635e+001 0.000000e+000 vertex 2.247097e+001 1.220635e+001 4.399139e+000 endloop endfacet facet normal 9.659258e-001 2.588190e-001 1.049674e-016 outer loop vertex 2.247097e+001 1.220635e+001 0.000000e+000 vertex 2.235818e+001 1.262728e+001 0.000000e+000 vertex 2.235818e+001 1.262728e+001 4.399139e+000 endloop endfacet facet normal 9.961947e-001 8.715574e-002 7.040056e-016 outer loop vertex 2.235818e+001 1.262728e+001 0.000000e+000 vertex 2.232020e+001 1.306140e+001 0.000000e+000 vertex 2.232020e+001 1.306140e+001 4.399139e+000 endloop endfacet facet normal 9.961947e-001 -8.715574e-002 9.048915e-016 outer loop vertex 2.232020e+001 1.306140e+001 0.000000e+000 vertex 2.235818e+001 1.349552e+001 0.000000e+000 vertex 2.235818e+001 1.349552e+001 4.399139e+000 endloop endfacet facet normal 9.659258e-001 -2.588190e-001 1.134605e-015 outer loop vertex 2.247097e+001 1.391645e+001 0.000000e+000 vertex 2.247097e+001 1.391645e+001 4.399139e+000 vertex 2.235818e+001 1.349552e+001 0.000000e+000 endloop endfacet facet normal 9.063078e-001 -4.226183e-001 5.863697e-016 outer loop vertex 2.247097e+001 1.391645e+001 0.000000e+000 vertex 2.265514e+001 1.431140e+001 0.000000e+000 vertex 2.265514e+001 1.431140e+001 4.399139e+000 endloop endfacet facet normal 8.191520e-001 -5.735764e-001 9.266089e-016 outer loop vertex 2.265514e+001 1.431140e+001 0.000000e+000 vertex 2.290509e+001 1.466837e+001 0.000000e+000 vertex 2.290509e+001 1.466837e+001 4.399139e+000 endloop endfacet facet normal 7.071068e-001 -7.071068e-001 8.542176e-016 outer loop vertex 2.290509e+001 1.466837e+001 0.000000e+000 vertex 2.321323e+001 1.497651e+001 0.000000e+000 vertex 2.321323e+001 1.497651e+001 4.399139e+000 endloop endfacet facet normal 5.735764e-001 -8.191520e-001 8.612394e-016 outer loop vertex 2.357020e+001 1.522646e+001 0.000000e+000 vertex 2.357020e+001 1.522646e+001 4.399139e+000 vertex 2.321323e+001 1.497651e+001 0.000000e+000 endloop endfacet facet normal 4.226183e-001 -9.063078e-001 8.542176e-016 outer loop vertex 2.357020e+001 1.522646e+001 0.000000e+000 vertex 2.396515e+001 1.541063e+001 0.000000e+000 vertex 2.396515e+001 1.541063e+001 4.399139e+000 endloop endfacet facet normal 2.588190e-001 -9.659258e-001 9.193698e-016 outer loop vertex 2.396515e+001 1.541063e+001 0.000000e+000 vertex 2.438608e+001 1.552342e+001 0.000000e+000 vertex 2.438608e+001 1.552342e+001 4.399139e+000 endloop endfacet facet normal 8.715574e-002 -9.961947e-001 7.040056e-016 outer loop vertex 2.438608e+001 1.552342e+001 0.000000e+000 vertex 2.482020e+001 1.556140e+001 0.000000e+000 vertex 2.482020e+001 1.556140e+001 4.399139e+000 endloop endfacet facet normal -8.715574e-002 -9.961947e-001 9.051759e-016 outer loop vertex 2.525432e+001 1.552342e+001 0.000000e+000 vertex 2.525432e+001 1.552342e+001 4.399139e+000 vertex 2.482020e+001 1.556140e+001 0.000000e+000 endloop endfacet facet normal -2.588190e-001 -9.659258e-001 1.031576e-015 outer loop vertex 2.525432e+001 1.552342e+001 0.000000e+000 vertex 2.567525e+001 1.541063e+001 0.000000e+000 vertex 2.567525e+001 1.541063e+001 4.399139e+000 endloop endfacet facet normal -4.226183e-001 -9.063078e-001 5.863697e-016 outer loop vertex 2.567525e+001 1.541063e+001 0.000000e+000 vertex 2.607020e+001 1.522646e+001 0.000000e+000 vertex 2.607020e+001 1.522646e+001 4.399139e+000 endloop endfacet facet normal -5.735764e-001 -8.191520e-001 9.266089e-016 outer loop vertex 2.607020e+001 1.522646e+001 0.000000e+000 vertex 2.642717e+001 1.497651e+001 0.000000e+000 vertex 2.642717e+001 1.497651e+001 4.399139e+000 endloop endfacet facet normal -7.071068e-001 -7.071068e-001 1.143783e-015 outer loop vertex 2.642717e+001 1.497651e+001 0.000000e+000 vertex 2.673531e+001 1.466837e+001 0.000000e+000 vertex 2.673531e+001 1.466837e+001 4.399139e+000 endloop endfacet facet normal -8.191520e-001 -5.735764e-001 6.298045e-016 outer loop vertex 2.673531e+001 1.466837e+001 0.000000e+000 vertex 2.698526e+001 1.431140e+001 0.000000e+000 vertex 2.698526e+001 1.431140e+001 4.399139e+000 endloop endfacet facet normal -9.063078e-001 -4.226183e-001 1.049674e-015 outer loop vertex 2.698526e+001 1.431140e+001 0.000000e+000 vertex 2.716943e+001 1.391645e+001 0.000000e+000 vertex 2.716943e+001 1.391645e+001 4.399139e+000 endloop endfacet facet normal 5.145160e-001 4.501432e-002 8.562984e-001 outer loop vertex 4.320200e+000 1.706140e+001 5.000000e+000 vertex 4.373373e+000 1.645363e+001 5.000000e+000 vertex 5.320200e+000 1.706140e+001 4.399139e+000 endloop endfacet facet normal 5.145160e-001 -4.501432e-002 8.562984e-001 outer loop vertex 5.358181e+000 1.749552e+001 4.399139e+000 vertex 4.320200e+000 1.706140e+001 5.000000e+000 vertex 5.320200e+000 1.706140e+001 4.399139e+000 endloop endfacet facet normal 5.145160e-001 -4.501432e-002 8.562984e-001 outer loop vertex 5.358181e+000 1.749552e+001 4.399139e+000 vertex 4.373373e+000 1.766917e+001 5.000000e+000 vertex 4.320200e+000 1.706140e+001 5.000000e+000 endloop endfacet facet normal 4.988827e-001 -1.336752e-001 8.562984e-001 outer loop vertex 5.358181e+000 1.749552e+001 4.399139e+000 vertex 4.531276e+000 1.825847e+001 5.000000e+000 vertex 4.373373e+000 1.766917e+001 5.000000e+000 endloop endfacet facet normal 4.988827e-001 -1.336752e-001 8.562984e-001 outer loop vertex 5.358181e+000 1.749552e+001 4.399139e+000 vertex 5.470968e+000 1.791645e+001 4.399139e+000 vertex 4.531276e+000 1.825847e+001 5.000000e+000 endloop endfacet facet normal 4.680911e-001 -2.182745e-001 8.562984e-001 outer loop vertex 4.531276e+000 1.825847e+001 5.000000e+000 vertex 5.470968e+000 1.791645e+001 4.399139e+000 vertex 4.789111e+000 1.881140e+001 5.000000e+000 endloop endfacet facet normal 4.680911e-001 -2.182745e-001 8.562984e-001 outer loop vertex 4.789111e+000 1.881140e+001 5.000000e+000 vertex 5.470968e+000 1.791645e+001 4.399139e+000 vertex 5.655136e+000 1.831140e+001 4.399139e+000 endloop endfacet facet normal 4.230768e-001 -2.962415e-001 8.562984e-001 outer loop vertex 5.139044e+000 1.931116e+001 5.000000e+000 vertex 5.655136e+000 1.831140e+001 4.399139e+000 vertex 5.905089e+000 1.866837e+001 4.399139e+000 endloop endfacet facet normal 3.652075e-001 -3.652075e-001 8.562984e-001 outer loop vertex 5.570443e+000 1.974256e+001 5.000000e+000 vertex 5.905089e+000 1.866837e+001 4.399139e+000 vertex 6.213231e+000 1.897651e+001 4.399139e+000 endloop endfacet facet normal 2.962415e-001 -4.230768e-001 8.562984e-001 outer loop vertex 6.570200e+000 1.922646e+001 4.399139e+000 vertex 5.570443e+000 1.974256e+001 5.000000e+000 vertex 6.213231e+000 1.897651e+001 4.399139e+000 endloop endfacet facet normal 2.962415e-001 -4.230768e-001 8.562984e-001 outer loop vertex 6.570200e+000 1.922646e+001 4.399139e+000 vertex 6.070200e+000 2.009249e+001 5.000000e+000 vertex 5.570443e+000 1.974256e+001 5.000000e+000 endloop endfacet facet normal 2.182745e-001 -4.680911e-001 8.562984e-001 outer loop vertex 6.570200e+000 1.922646e+001 4.399139e+000 vertex 6.965150e+000 1.941063e+001 4.399139e+000 vertex 6.070200e+000 2.009249e+001 5.000000e+000 endloop endfacet facet normal 2.182745e-001 -4.680911e-001 8.562984e-001 outer loop vertex 6.070200e+000 2.009249e+001 5.000000e+000 vertex 6.965150e+000 1.941063e+001 4.399139e+000 vertex 6.623129e+000 2.035032e+001 5.000000e+000 endloop endfacet facet normal 1.336752e-001 -4.988827e-001 8.562984e-001 outer loop vertex 6.623129e+000 2.035032e+001 5.000000e+000 vertex 6.965150e+000 1.941063e+001 4.399139e+000 vertex 7.212431e+000 2.050823e+001 5.000000e+000 endloop endfacet facet normal 1.336752e-001 -4.988827e-001 8.562984e-001 outer loop vertex 7.212431e+000 2.050823e+001 5.000000e+000 vertex 6.965150e+000 1.941063e+001 4.399139e+000 vertex 7.386080e+000 1.952342e+001 4.399139e+000 endloop endfacet facet normal 4.501432e-002 -5.145160e-001 8.562984e-001 outer loop vertex 7.820200e+000 2.056140e+001 5.000000e+000 vertex 7.386080e+000 1.952342e+001 4.399139e+000 vertex 7.820200e+000 1.956140e+001 4.399139e+000 endloop endfacet facet normal -4.501432e-002 -5.145160e-001 8.562984e-001 outer loop vertex 8.427969e+000 2.050823e+001 5.000000e+000 vertex 7.820200e+000 1.956140e+001 4.399139e+000 vertex 8.254320e+000 1.952342e+001 4.399139e+000 endloop endfacet facet normal -1.336752e-001 -4.988827e-001 8.562984e-001 outer loop vertex 9.017271e+000 2.035032e+001 5.000000e+000 vertex 8.254320e+000 1.952342e+001 4.399139e+000 vertex 8.675250e+000 1.941063e+001 4.399139e+000 endloop endfacet facet normal -2.182745e-001 -4.680911e-001 8.562984e-001 outer loop vertex 9.570200e+000 2.009249e+001 5.000000e+000 vertex 8.675250e+000 1.941063e+001 4.399139e+000 vertex 9.070200e+000 1.922646e+001 4.399139e+000 endloop endfacet facet normal -2.962415e-001 -4.230768e-001 8.562984e-001 outer loop vertex 1.006996e+001 1.974256e+001 5.000000e+000 vertex 9.070200e+000 1.922646e+001 4.399139e+000 vertex 9.427169e+000 1.897651e+001 4.399139e+000 endloop endfacet facet normal -3.652075e-001 -3.652075e-001 8.562984e-001 outer loop vertex 9.735311e+000 1.866837e+001 4.399139e+000 vertex 1.006996e+001 1.974256e+001 5.000000e+000 vertex 9.427169e+000 1.897651e+001 4.399139e+000 endloop endfacet facet normal -3.652075e-001 -3.652075e-001 8.562984e-001 outer loop vertex 9.735311e+000 1.866837e+001 4.399139e+000 vertex 1.050136e+001 1.931116e+001 5.000000e+000 vertex 1.006996e+001 1.974256e+001 5.000000e+000 endloop endfacet facet normal -4.230768e-001 -2.962415e-001 8.562984e-001 outer loop vertex 9.735311e+000 1.866837e+001 4.399139e+000 vertex 9.985264e+000 1.831140e+001 4.399139e+000 vertex 1.050136e+001 1.931116e+001 5.000000e+000 endloop endfacet facet normal -4.230768e-001 -2.962415e-001 8.562984e-001 outer loop vertex 1.050136e+001 1.931116e+001 5.000000e+000 vertex 9.985264e+000 1.831140e+001 4.399139e+000 vertex 1.085129e+001 1.881140e+001 5.000000e+000 endloop endfacet facet normal -4.680911e-001 -2.182745e-001 8.562984e-001 outer loop vertex 1.085129e+001 1.881140e+001 5.000000e+000 vertex 9.985264e+000 1.831140e+001 4.399139e+000 vertex 1.016943e+001 1.791645e+001 4.399139e+000 endloop endfacet facet normal -4.988827e-001 -1.336752e-001 8.562984e-001 outer loop vertex 1.110912e+001 1.825847e+001 5.000000e+000 vertex 1.016943e+001 1.791645e+001 4.399139e+000 vertex 1.028222e+001 1.749552e+001 4.399139e+000 endloop endfacet facet normal -5.145160e-001 -4.501432e-002 8.562984e-001 outer loop vertex 1.126703e+001 1.766917e+001 5.000000e+000 vertex 1.028222e+001 1.749552e+001 4.399139e+000 vertex 1.132020e+001 1.706140e+001 5.000000e+000 endloop endfacet facet normal -4.988827e-001 -1.336752e-001 8.562984e-001 outer loop vertex 1.126703e+001 1.766917e+001 5.000000e+000 vertex 1.110912e+001 1.825847e+001 5.000000e+000 vertex 1.028222e+001 1.749552e+001 4.399139e+000 endloop endfacet facet normal 4.988827e-001 1.336752e-001 8.562984e-001 outer loop vertex 4.531276e+000 1.586433e+001 5.000000e+000 vertex 5.470968e+000 1.620635e+001 4.399139e+000 vertex 4.373373e+000 1.645363e+001 5.000000e+000 endloop endfacet facet normal 4.680911e-001 2.182745e-001 8.562984e-001 outer loop vertex 4.531276e+000 1.586433e+001 5.000000e+000 vertex 5.655136e+000 1.581140e+001 4.399139e+000 vertex 5.470968e+000 1.620635e+001 4.399139e+000 endloop endfacet facet normal 4.680911e-001 2.182745e-001 8.562984e-001 outer loop vertex 4.531276e+000 1.586433e+001 5.000000e+000 vertex 4.789111e+000 1.531140e+001 5.000000e+000 vertex 5.655136e+000 1.581140e+001 4.399139e+000 endloop endfacet facet normal 4.230768e-001 2.962415e-001 8.562984e-001 outer loop vertex 5.655136e+000 1.581140e+001 4.399139e+000 vertex 4.789111e+000 1.531140e+001 5.000000e+000 vertex 5.905089e+000 1.545443e+001 4.399139e+000 endloop endfacet facet normal 4.230768e-001 2.962415e-001 8.562984e-001 outer loop vertex 5.905089e+000 1.545443e+001 4.399139e+000 vertex 4.789111e+000 1.531140e+001 5.000000e+000 vertex 5.139044e+000 1.481164e+001 5.000000e+000 endloop endfacet facet normal 3.652075e-001 3.652075e-001 8.562984e-001 outer loop vertex 6.213231e+000 1.514629e+001 4.399139e+000 vertex 5.139044e+000 1.481164e+001 5.000000e+000 vertex 5.570443e+000 1.438024e+001 5.000000e+000 endloop endfacet facet normal 2.962415e-001 4.230768e-001 8.562984e-001 outer loop vertex 6.570200e+000 1.489634e+001 4.399139e+000 vertex 5.570443e+000 1.438024e+001 5.000000e+000 vertex 6.070200e+000 1.403031e+001 5.000000e+000 endloop endfacet facet normal 2.182745e-001 4.680911e-001 8.562984e-001 outer loop vertex 6.623129e+000 1.377248e+001 5.000000e+000 vertex 6.570200e+000 1.489634e+001 4.399139e+000 vertex 6.070200e+000 1.403031e+001 5.000000e+000 endloop endfacet facet normal 2.182745e-001 4.680911e-001 8.562984e-001 outer loop vertex 6.623129e+000 1.377248e+001 5.000000e+000 vertex 6.965150e+000 1.471217e+001 4.399139e+000 vertex 6.570200e+000 1.489634e+001 4.399139e+000 endloop endfacet facet normal 1.336752e-001 4.988827e-001 8.562984e-001 outer loop vertex 6.623129e+000 1.377248e+001 5.000000e+000 vertex 7.386080e+000 1.459938e+001 4.399139e+000 vertex 6.965150e+000 1.471217e+001 4.399139e+000 endloop endfacet facet normal 1.336752e-001 4.988827e-001 8.562984e-001 outer loop vertex 6.623129e+000 1.377248e+001 5.000000e+000 vertex 7.212431e+000 1.361457e+001 5.000000e+000 vertex 7.386080e+000 1.459938e+001 4.399139e+000 endloop endfacet facet normal 4.501432e-002 5.145160e-001 8.562984e-001 outer loop vertex 7.386080e+000 1.459938e+001 4.399139e+000 vertex 7.212431e+000 1.361457e+001 5.000000e+000 vertex 7.820200e+000 1.356140e+001 5.000000e+000 endloop endfacet facet normal -4.501432e-002 5.145160e-001 8.562984e-001 outer loop vertex 7.820200e+000 1.456140e+001 4.399139e+000 vertex 7.820200e+000 1.356140e+001 5.000000e+000 vertex 8.427969e+000 1.361457e+001 5.000000e+000 endloop endfacet facet normal -1.336752e-001 4.988827e-001 8.562984e-001 outer loop vertex 8.254320e+000 1.459938e+001 4.399139e+000 vertex 8.427969e+000 1.361457e+001 5.000000e+000 vertex 9.017271e+000 1.377248e+001 5.000000e+000 endloop endfacet facet normal -2.182745e-001 4.680911e-001 8.562984e-001 outer loop vertex 8.675250e+000 1.471217e+001 4.399139e+000 vertex 9.017271e+000 1.377248e+001 5.000000e+000 vertex 9.570200e+000 1.403031e+001 5.000000e+000 endloop endfacet facet normal -2.962415e-001 4.230768e-001 8.562984e-001 outer loop vertex 9.070200e+000 1.489634e+001 4.399139e+000 vertex 9.570200e+000 1.403031e+001 5.000000e+000 vertex 1.006996e+001 1.438024e+001 5.000000e+000 endloop endfacet facet normal -3.652075e-001 3.652075e-001 8.562984e-001 outer loop vertex 9.427169e+000 1.514629e+001 4.399139e+000 vertex 1.006996e+001 1.438024e+001 5.000000e+000 vertex 1.050136e+001 1.481164e+001 5.000000e+000 endloop endfacet facet normal -4.230768e-001 2.962415e-001 8.562984e-001 outer loop vertex 9.735311e+000 1.545443e+001 4.399139e+000 vertex 1.050136e+001 1.481164e+001 5.000000e+000 vertex 9.985264e+000 1.581140e+001 4.399139e+000 endloop endfacet facet normal -3.652075e-001 3.652075e-001 8.562984e-001 outer loop vertex 9.735311e+000 1.545443e+001 4.399139e+000 vertex 9.427169e+000 1.514629e+001 4.399139e+000 vertex 1.050136e+001 1.481164e+001 5.000000e+000 endloop endfacet facet normal -4.230768e-001 2.962415e-001 8.562984e-001 outer loop vertex 1.050136e+001 1.481164e+001 5.000000e+000 vertex 1.085129e+001 1.531140e+001 5.000000e+000 vertex 9.985264e+000 1.581140e+001 4.399139e+000 endloop endfacet facet normal -4.680911e-001 2.182745e-001 8.562984e-001 outer loop vertex 9.985264e+000 1.581140e+001 4.399139e+000 vertex 1.085129e+001 1.531140e+001 5.000000e+000 vertex 1.016943e+001 1.620635e+001 4.399139e+000 endloop endfacet facet normal -4.680911e-001 2.182745e-001 8.562984e-001 outer loop vertex 1.016943e+001 1.620635e+001 4.399139e+000 vertex 1.085129e+001 1.531140e+001 5.000000e+000 vertex 1.110912e+001 1.586433e+001 5.000000e+000 endloop endfacet facet normal -4.988827e-001 1.336752e-001 8.562984e-001 outer loop vertex 1.126703e+001 1.645363e+001 5.000000e+000 vertex 1.016943e+001 1.620635e+001 4.399139e+000 vertex 1.110912e+001 1.586433e+001 5.000000e+000 endloop endfacet facet normal -4.988827e-001 1.336752e-001 8.562984e-001 outer loop vertex 1.126703e+001 1.645363e+001 5.000000e+000 vertex 1.028222e+001 1.662728e+001 4.399139e+000 vertex 1.016943e+001 1.620635e+001 4.399139e+000 endloop endfacet facet normal -5.145160e-001 4.501432e-002 8.562984e-001 outer loop vertex 1.126703e+001 1.645363e+001 5.000000e+000 vertex 1.132020e+001 1.706140e+001 5.000000e+000 vertex 1.028222e+001 1.662728e+001 4.399139e+000 endloop endfacet facet normal -5.145160e-001 4.501432e-002 8.562984e-001 outer loop vertex 1.028222e+001 1.662728e+001 4.399139e+000 vertex 1.132020e+001 1.706140e+001 5.000000e+000 vertex 1.032020e+001 1.706140e+001 4.399139e+000 endloop endfacet facet normal -5.145160e-001 -4.501432e-002 8.562984e-001 outer loop vertex 1.032020e+001 1.706140e+001 4.399139e+000 vertex 1.132020e+001 1.706140e+001 5.000000e+000 vertex 1.028222e+001 1.749552e+001 4.399139e+000 endloop endfacet facet normal -4.680911e-001 -2.182745e-001 8.562984e-001 outer loop vertex 1.110912e+001 1.825847e+001 5.000000e+000 vertex 1.085129e+001 1.881140e+001 5.000000e+000 vertex 1.016943e+001 1.791645e+001 4.399139e+000 endloop endfacet facet normal -2.962415e-001 -4.230768e-001 8.562984e-001 outer loop vertex 9.070200e+000 1.922646e+001 4.399139e+000 vertex 1.006996e+001 1.974256e+001 5.000000e+000 vertex 9.570200e+000 2.009249e+001 5.000000e+000 endloop endfacet facet normal -2.182745e-001 -4.680911e-001 8.562984e-001 outer loop vertex 9.017271e+000 2.035032e+001 5.000000e+000 vertex 8.675250e+000 1.941063e+001 4.399139e+000 vertex 9.570200e+000 2.009249e+001 5.000000e+000 endloop endfacet facet normal -1.336752e-001 -4.988827e-001 8.562984e-001 outer loop vertex 9.017271e+000 2.035032e+001 5.000000e+000 vertex 8.427969e+000 2.050823e+001 5.000000e+000 vertex 8.254320e+000 1.952342e+001 4.399139e+000 endloop endfacet facet normal -4.501432e-002 -5.145160e-001 8.562984e-001 outer loop vertex 8.427969e+000 2.050823e+001 5.000000e+000 vertex 7.820200e+000 2.056140e+001 5.000000e+000 vertex 7.820200e+000 1.956140e+001 4.399139e+000 endloop endfacet facet normal 4.501432e-002 -5.145160e-001 8.562984e-001 outer loop vertex 7.386080e+000 1.952342e+001 4.399139e+000 vertex 7.820200e+000 2.056140e+001 5.000000e+000 vertex 7.212431e+000 2.050823e+001 5.000000e+000 endloop endfacet facet normal 3.652075e-001 -3.652075e-001 8.562984e-001 outer loop vertex 5.139044e+000 1.931116e+001 5.000000e+000 vertex 5.905089e+000 1.866837e+001 4.399139e+000 vertex 5.570443e+000 1.974256e+001 5.000000e+000 endloop endfacet facet normal 4.230768e-001 -2.962415e-001 8.562984e-001 outer loop vertex 5.139044e+000 1.931116e+001 5.000000e+000 vertex 4.789111e+000 1.881140e+001 5.000000e+000 vertex 5.655136e+000 1.831140e+001 4.399139e+000 endloop endfacet facet normal -2.962415e-001 4.230768e-001 8.562984e-001 outer loop vertex 1.006996e+001 1.438024e+001 5.000000e+000 vertex 9.427169e+000 1.514629e+001 4.399139e+000 vertex 9.070200e+000 1.489634e+001 4.399139e+000 endloop endfacet facet normal -2.182745e-001 4.680911e-001 8.562984e-001 outer loop vertex 9.070200e+000 1.489634e+001 4.399139e+000 vertex 8.675250e+000 1.471217e+001 4.399139e+000 vertex 9.570200e+000 1.403031e+001 5.000000e+000 endloop endfacet facet normal -1.336752e-001 4.988827e-001 8.562984e-001 outer loop vertex 8.675250e+000 1.471217e+001 4.399139e+000 vertex 8.254320e+000 1.459938e+001 4.399139e+000 vertex 9.017271e+000 1.377248e+001 5.000000e+000 endloop endfacet facet normal -4.501432e-002 5.145160e-001 8.562984e-001 outer loop vertex 8.254320e+000 1.459938e+001 4.399139e+000 vertex 7.820200e+000 1.456140e+001 4.399139e+000 vertex 8.427969e+000 1.361457e+001 5.000000e+000 endloop endfacet facet normal 4.501432e-002 5.145160e-001 8.562984e-001 outer loop vertex 7.820200e+000 1.456140e+001 4.399139e+000 vertex 7.386080e+000 1.459938e+001 4.399139e+000 vertex 7.820200e+000 1.356140e+001 5.000000e+000 endloop endfacet facet normal 2.962415e-001 4.230768e-001 8.562984e-001 outer loop vertex 6.570200e+000 1.489634e+001 4.399139e+000 vertex 6.213231e+000 1.514629e+001 4.399139e+000 vertex 5.570443e+000 1.438024e+001 5.000000e+000 endloop endfacet facet normal 3.652075e-001 3.652075e-001 8.562984e-001 outer loop vertex 5.139044e+000 1.481164e+001 5.000000e+000 vertex 6.213231e+000 1.514629e+001 4.399139e+000 vertex 5.905089e+000 1.545443e+001 4.399139e+000 endloop endfacet facet normal 4.988827e-001 1.336752e-001 8.562984e-001 outer loop vertex 5.358181e+000 1.662728e+001 4.399139e+000 vertex 4.373373e+000 1.645363e+001 5.000000e+000 vertex 5.470968e+000 1.620635e+001 4.399139e+000 endloop endfacet facet normal 5.145160e-001 4.501432e-002 8.562984e-001 outer loop vertex 5.358181e+000 1.662728e+001 4.399139e+000 vertex 5.320200e+000 1.706140e+001 4.399139e+000 vertex 4.373373e+000 1.645363e+001 5.000000e+000 endloop endfacet facet normal -9.961947e-001 8.715574e-002 0.000000e+000 outer loop vertex 1.032020e+001 1.706140e+001 -8.881784e-016 vertex 1.028222e+001 1.662728e+001 -8.881784e-016 vertex 1.028222e+001 1.662728e+001 4.399139e+000 endloop endfacet facet normal -9.961947e-001 8.715574e-002 0.000000e+000 outer loop vertex 1.032020e+001 1.706140e+001 4.399139e+000 vertex 1.032020e+001 1.706140e+001 -8.881784e-016 vertex 1.028222e+001 1.662728e+001 4.399139e+000 endloop endfacet facet normal -9.961947e-001 -8.715574e-002 0.000000e+000 outer loop vertex 1.032020e+001 1.706140e+001 4.399139e+000 vertex 1.028222e+001 1.749552e+001 -8.881784e-016 vertex 1.032020e+001 1.706140e+001 -8.881784e-016 endloop endfacet facet normal -9.961947e-001 -8.715574e-002 -9.067013e-016 outer loop vertex 1.032020e+001 1.706140e+001 4.399139e+000 vertex 1.028222e+001 1.749552e+001 4.399139e+000 vertex 1.028222e+001 1.749552e+001 -8.881784e-016 endloop endfacet facet normal -9.659258e-001 -2.588190e-001 5.300545e-016 outer loop vertex 1.028222e+001 1.749552e+001 -8.881784e-016 vertex 1.028222e+001 1.749552e+001 4.399139e+000 vertex 1.016943e+001 1.791645e+001 -8.881784e-016 endloop endfacet facet normal -9.659258e-001 -2.588190e-001 -6.400577e-016 outer loop vertex 1.016943e+001 1.791645e+001 -8.881784e-016 vertex 1.028222e+001 1.749552e+001 4.399139e+000 vertex 1.016943e+001 1.791645e+001 4.399139e+000 endloop endfacet facet normal -9.063078e-001 -4.226183e-001 -5.879071e-016 outer loop vertex 9.985264e+000 1.831140e+001 -8.881784e-016 vertex 1.016943e+001 1.791645e+001 4.399139e+000 vertex 9.985264e+000 1.831140e+001 4.399139e+000 endloop endfacet facet normal -8.191520e-001 -5.735764e-001 -5.942889e-016 outer loop vertex 9.735311e+000 1.866837e+001 -8.881784e-016 vertex 9.985264e+000 1.831140e+001 4.399139e+000 vertex 9.735311e+000 1.866837e+001 4.399139e+000 endloop endfacet facet normal -7.071068e-001 -7.071068e-001 -1.142109e-015 outer loop vertex 9.427169e+000 1.897651e+001 -8.881784e-016 vertex 9.735311e+000 1.866837e+001 4.399139e+000 vertex 9.427169e+000 1.897651e+001 4.399139e+000 endloop endfacet facet normal -5.735764e-001 -8.191520e-001 -6.296313e-016 outer loop vertex 9.070200e+000 1.922646e+001 -8.881784e-016 vertex 9.427169e+000 1.897651e+001 4.399139e+000 vertex 9.070200e+000 1.922646e+001 4.399139e+000 endloop endfacet facet normal -4.226183e-001 -9.063078e-001 -1.046600e-015 outer loop vertex 8.675250e+000 1.941063e+001 -8.881784e-016 vertex 9.070200e+000 1.922646e+001 4.399139e+000 vertex 8.675250e+000 1.941063e+001 4.399139e+000 endloop endfacet facet normal -2.588190e-001 -9.659258e-001 -1.310129e-015 outer loop vertex 8.254320e+000 1.952342e+001 -8.881784e-016 vertex 8.675250e+000 1.941063e+001 4.399139e+000 vertex 8.254320e+000 1.952342e+001 4.399139e+000 endloop endfacet facet normal -8.715574e-002 -9.961947e-001 -7.038636e-016 outer loop vertex 7.820200e+000 1.956140e+001 -8.881784e-016 vertex 8.254320e+000 1.952342e+001 4.399139e+000 vertex 7.820200e+000 1.956140e+001 4.399139e+000 endloop endfacet facet normal 8.715574e-002 -9.961947e-001 -9.051759e-016 outer loop vertex 7.386080e+000 1.952342e+001 -8.881784e-016 vertex 7.820200e+000 1.956140e+001 4.399139e+000 vertex 7.386080e+000 1.952342e+001 4.399139e+000 endloop endfacet facet normal 2.588190e-001 -9.659258e-001 -3.545305e-016 outer loop vertex 6.965150e+000 1.941063e+001 -8.881784e-016 vertex 7.386080e+000 1.952342e+001 4.399139e+000 vertex 6.965150e+000 1.941063e+001 4.399139e+000 endloop endfacet facet normal 4.226183e-001 -9.063078e-001 -7.585588e-016 outer loop vertex 6.570200e+000 1.922646e+001 -8.881784e-016 vertex 6.965150e+000 1.941063e+001 4.399139e+000 vertex 6.570200e+000 1.922646e+001 4.399139e+000 endloop endfacet facet normal 5.735764e-001 -8.191520e-001 -1.040864e-015 outer loop vertex 6.213231e+000 1.897651e+001 -8.881784e-016 vertex 6.570200e+000 1.922646e+001 4.399139e+000 vertex 6.213231e+000 1.897651e+001 4.399139e+000 endloop endfacet facet normal 7.071068e-001 -7.071068e-001 -8.565816e-016 outer loop vertex 5.905089e+000 1.866837e+001 -8.881784e-016 vertex 6.213231e+000 1.897651e+001 4.399139e+000 vertex 5.905089e+000 1.866837e+001 4.399139e+000 endloop endfacet facet normal 8.191520e-001 -5.735764e-001 -3.980232e-016 outer loop vertex 5.655136e+000 1.831140e+001 -8.881784e-016 vertex 5.905089e+000 1.866837e+001 4.399139e+000 vertex 5.655136e+000 1.831140e+001 4.399139e+000 endloop endfacet facet normal 9.063078e-001 -4.226183e-001 -8.512880e-016 outer loop vertex 5.470968e+000 1.791645e+001 -8.881784e-016 vertex 5.655136e+000 1.831140e+001 4.399139e+000 vertex 5.470968e+000 1.791645e+001 4.399139e+000 endloop endfacet facet normal 9.659258e-001 -2.588190e-001 -7.250733e-016 outer loop vertex 5.358181e+000 1.749552e+001 -8.881784e-016 vertex 5.470968e+000 1.791645e+001 4.399139e+000 vertex 5.358181e+000 1.749552e+001 4.399139e+000 endloop endfacet facet normal 9.961947e-001 -8.715574e-002 -7.038636e-016 outer loop vertex 5.320200e+000 1.706140e+001 -8.881784e-016 vertex 5.358181e+000 1.749552e+001 4.399139e+000 vertex 5.320200e+000 1.706140e+001 4.399139e+000 endloop endfacet facet normal 9.961947e-001 8.715574e-002 7.038636e-017 outer loop vertex 5.358181e+000 1.662728e+001 -8.881784e-016 vertex 5.320200e+000 1.706140e+001 4.399139e+000 vertex 5.358181e+000 1.662728e+001 4.399139e+000 endloop endfacet facet normal 9.659258e-001 2.588190e-001 -3.900374e-016 outer loop vertex 5.470968e+000 1.620635e+001 -8.881784e-016 vertex 5.358181e+000 1.662728e+001 4.399139e+000 vertex 5.470968e+000 1.620635e+001 4.399139e+000 endloop endfacet facet normal 9.063078e-001 4.226183e-001 -1.829819e-016 outer loop vertex 5.655136e+000 1.581140e+001 -8.881784e-016 vertex 5.470968e+000 1.620635e+001 4.399139e+000 vertex 5.655136e+000 1.581140e+001 4.399139e+000 endloop endfacet facet normal 8.191520e-001 5.735764e-001 6.622278e-017 outer loop vertex 5.905089e+000 1.545443e+001 -8.881784e-016 vertex 5.655136e+000 1.581140e+001 4.399139e+000 vertex 5.905089e+000 1.545443e+001 4.399139e+000 endloop endfacet facet normal 7.071068e-001 7.071068e-001 -6.583952e-030 outer loop vertex 6.213231e+000 1.514629e+001 -8.881784e-016 vertex 5.905089e+000 1.545443e+001 4.399139e+000 vertex 6.213231e+000 1.514629e+001 4.399139e+000 endloop endfacet facet normal 5.735764e-001 8.191520e-001 2.149666e-016 outer loop vertex 6.570200e+000 1.489634e+001 -8.881784e-016 vertex 6.213231e+000 1.514629e+001 4.399139e+000 vertex 6.570200e+000 1.489634e+001 4.399139e+000 endloop endfacet facet normal 4.226183e-001 9.063078e-001 -2.559776e-016 outer loop vertex 6.965150e+000 1.471217e+001 -8.881784e-016 vertex 6.570200e+000 1.489634e+001 4.399139e+000 vertex 6.965150e+000 1.471217e+001 4.399139e+000 endloop endfacet facet normal 2.588190e-001 9.659258e-001 -1.567653e-016 outer loop vertex 7.386080e+000 1.459938e+001 -8.881784e-016 vertex 6.965150e+000 1.471217e+001 4.399139e+000 vertex 7.386080e+000 1.459938e+001 4.399139e+000 endloop endfacet facet normal 8.715574e-002 9.961947e-001 -1.759659e-017 outer loop vertex 7.820200e+000 1.456140e+001 -8.881784e-016 vertex 7.386080e+000 1.459938e+001 4.399139e+000 vertex 7.820200e+000 1.456140e+001 4.399139e+000 endloop endfacet facet normal -8.715574e-002 9.961947e-001 7.038636e-017 outer loop vertex 8.254320e+000 1.459938e+001 -8.881784e-016 vertex 7.820200e+000 1.456140e+001 4.399139e+000 vertex 8.254320e+000 1.459938e+001 4.399139e+000 endloop endfacet facet normal -2.588190e-001 9.659258e-001 -2.855272e-016 outer loop vertex 8.675250e+000 1.471217e+001 -8.881784e-016 vertex 8.254320e+000 1.459938e+001 4.399139e+000 vertex 8.675250e+000 1.471217e+001 4.399139e+000 endloop endfacet facet normal -4.226183e-001 9.063078e-001 -1.953121e-016 outer loop vertex 9.070200e+000 1.489634e+001 -8.881784e-016 vertex 8.675250e+000 1.471217e+001 4.399139e+000 vertex 9.070200e+000 1.489634e+001 4.399139e+000 endloop endfacet facet normal -5.735764e-001 8.191520e-001 -9.916256e-017 outer loop vertex 9.427169e+000 1.514629e+001 -8.881784e-016 vertex 9.070200e+000 1.489634e+001 4.399139e+000 vertex 9.427169e+000 1.514629e+001 4.399139e+000 endloop endfacet facet normal -7.071068e-001 7.071068e-001 0.000000e+000 outer loop vertex 9.735311e+000 1.545443e+001 -8.881784e-016 vertex 9.427169e+000 1.514629e+001 4.399139e+000 vertex 9.735311e+000 1.545443e+001 4.399139e+000 endloop endfacet facet normal -8.191520e-001 5.735764e-001 0.000000e+000 outer loop vertex 9.985264e+000 1.581140e+001 -8.881784e-016 vertex 9.735311e+000 1.545443e+001 4.399139e+000 vertex 9.985264e+000 1.581140e+001 4.399139e+000 endloop endfacet facet normal -9.063078e-001 4.226183e-001 3.659639e-016 outer loop vertex 1.016943e+001 1.620635e+001 -8.881784e-016 vertex 9.985264e+000 1.581140e+001 4.399139e+000 vertex 1.016943e+001 1.620635e+001 4.399139e+000 endloop endfacet facet normal -9.659258e-001 2.588190e-001 0.000000e+000 outer loop vertex 1.028222e+001 1.662728e+001 -8.881784e-016 vertex 1.016943e+001 1.620635e+001 4.399139e+000 vertex 1.028222e+001 1.662728e+001 4.399139e+000 endloop endfacet facet normal -9.659258e-001 2.588190e-001 3.909131e-016 outer loop vertex 1.028222e+001 1.662728e+001 -8.881784e-016 vertex 1.016943e+001 1.620635e+001 -8.881784e-016 vertex 1.016943e+001 1.620635e+001 4.399139e+000 endloop endfacet facet normal -9.063078e-001 4.226183e-001 0.000000e+000 outer loop vertex 1.016943e+001 1.620635e+001 -8.881784e-016 vertex 9.985264e+000 1.581140e+001 -8.881784e-016 vertex 9.985264e+000 1.581140e+001 4.399139e+000 endloop endfacet facet normal -8.191520e-001 5.735764e-001 0.000000e+000 outer loop vertex 9.985264e+000 1.581140e+001 -8.881784e-016 vertex 9.735311e+000 1.545443e+001 -8.881784e-016 vertex 9.735311e+000 1.545443e+001 4.399139e+000 endloop endfacet facet normal -7.071068e-001 7.071068e-001 0.000000e+000 outer loop vertex 9.735311e+000 1.545443e+001 -8.881784e-016 vertex 9.427169e+000 1.514629e+001 -8.881784e-016 vertex 9.427169e+000 1.514629e+001 4.399139e+000 endloop endfacet facet normal -5.735764e-001 8.191520e-001 -9.410872e-017 outer loop vertex 9.427169e+000 1.514629e+001 -8.881784e-016 vertex 9.070200e+000 1.489634e+001 -8.881784e-016 vertex 9.070200e+000 1.489634e+001 4.399139e+000 endloop endfacet facet normal -4.226183e-001 9.063078e-001 -1.954566e-016 outer loop vertex 9.070200e+000 1.489634e+001 -8.881784e-016 vertex 8.675250e+000 1.471217e+001 -8.881784e-016 vertex 8.675250e+000 1.471217e+001 4.399139e+000 endloop endfacet facet normal -2.588190e-001 9.659258e-001 2.099348e-016 outer loop vertex 8.675250e+000 1.471217e+001 -8.881784e-016 vertex 8.254320e+000 1.459938e+001 -8.881784e-016 vertex 8.254320e+000 1.459938e+001 4.399139e+000 endloop endfacet facet normal -8.715574e-002 9.961947e-001 1.809783e-017 outer loop vertex 8.254320e+000 1.459938e+001 -8.881784e-016 vertex 7.820200e+000 1.456140e+001 -8.881784e-016 vertex 7.820200e+000 1.456140e+001 4.399139e+000 endloop endfacet facet normal 8.715574e-002 9.961947e-001 -5.429349e-017 outer loop vertex 7.820200e+000 1.456140e+001 -8.881784e-016 vertex 7.386080e+000 1.459938e+001 -8.881784e-016 vertex 7.386080e+000 1.459938e+001 4.399139e+000 endloop endfacet facet normal 2.588190e-001 9.659258e-001 -1.592609e-016 outer loop vertex 7.386080e+000 1.459938e+001 -8.881784e-016 vertex 6.965150e+000 1.471217e+001 -8.881784e-016 vertex 6.965150e+000 1.471217e+001 4.399139e+000 endloop endfacet facet normal 4.226183e-001 9.063078e-001 2.750870e-016 outer loop vertex 6.965150e+000 1.471217e+001 -8.881784e-016 vertex 6.570200e+000 1.489634e+001 -8.881784e-016 vertex 6.570200e+000 1.489634e+001 4.399139e+000 endloop endfacet facet normal 5.735764e-001 8.191520e-001 9.916256e-017 outer loop vertex 6.213231e+000 1.514629e+001 -8.881784e-016 vertex 6.213231e+000 1.514629e+001 4.399139e+000 vertex 6.570200e+000 1.489634e+001 -8.881784e-016 endloop endfacet facet normal 7.071068e-001 7.071068e-001 1.447826e-016 outer loop vertex 6.213231e+000 1.514629e+001 -8.881784e-016 vertex 5.905089e+000 1.545443e+001 -8.881784e-016 vertex 5.905089e+000 1.545443e+001 4.399139e+000 endloop endfacet facet normal 8.191520e-001 5.735764e-001 -1.592609e-016 outer loop vertex 5.905089e+000 1.545443e+001 -8.881784e-016 vertex 5.655136e+000 1.581140e+001 -8.881784e-016 vertex 5.655136e+000 1.581140e+001 4.399139e+000 endloop endfacet facet normal 9.063078e-001 4.226183e-001 -3.691957e-016 outer loop vertex 5.655136e+000 1.581140e+001 -8.881784e-016 vertex 5.470968e+000 1.620635e+001 -8.881784e-016 vertex 5.470968e+000 1.620635e+001 4.399139e+000 endloop endfacet facet normal 9.659258e-001 2.588190e-001 2.099348e-016 outer loop vertex 5.470968e+000 1.620635e+001 -8.881784e-016 vertex 5.358181e+000 1.662728e+001 -8.881784e-016 vertex 5.358181e+000 1.662728e+001 4.399139e+000 endloop endfacet facet normal 9.961947e-001 8.715574e-002 7.040056e-016 outer loop vertex 5.358181e+000 1.662728e+001 -8.881784e-016 vertex 5.320200e+000 1.706140e+001 -8.881784e-016 vertex 5.320200e+000 1.706140e+001 4.399139e+000 endloop endfacet facet normal 9.961947e-001 -8.715574e-002 7.040056e-016 outer loop vertex 5.320200e+000 1.706140e+001 -8.881784e-016 vertex 5.358181e+000 1.749552e+001 -8.881784e-016 vertex 5.358181e+000 1.749552e+001 4.399139e+000 endloop endfacet facet normal 9.659258e-001 -2.588190e-001 6.400577e-016 outer loop vertex 5.470968e+000 1.791645e+001 -8.881784e-016 vertex 5.470968e+000 1.791645e+001 4.399139e+000 vertex 5.358181e+000 1.749552e+001 -8.881784e-016 endloop endfacet facet normal 9.063078e-001 -4.226183e-001 9.338481e-016 outer loop vertex 5.470968e+000 1.791645e+001 -8.881784e-016 vertex 5.655136e+000 1.831140e+001 -8.881784e-016 vertex 5.655136e+000 1.831140e+001 4.399139e+000 endloop endfacet facet normal 8.191520e-001 -5.735764e-001 5.942889e-016 outer loop vertex 5.905089e+000 1.866837e+001 -8.881784e-016 vertex 5.905089e+000 1.866837e+001 4.399139e+000 vertex 5.655136e+000 1.831140e+001 -8.881784e-016 endloop endfacet facet normal 7.071068e-001 -7.071068e-001 4.271088e-016 outer loop vertex 5.905089e+000 1.866837e+001 -8.881784e-016 vertex 6.213231e+000 1.897651e+001 -8.881784e-016 vertex 6.213231e+000 1.897651e+001 4.399139e+000 endloop endfacet facet normal 5.735764e-001 -8.191520e-001 6.298045e-016 outer loop vertex 6.213231e+000 1.897651e+001 -8.881784e-016 vertex 6.570200e+000 1.922646e+001 -8.881784e-016 vertex 6.570200e+000 1.922646e+001 4.399139e+000 endloop endfacet facet normal 4.226183e-001 -9.063078e-001 1.049674e-015 outer loop vertex 6.570200e+000 1.922646e+001 -8.881784e-016 vertex 6.965150e+000 1.941063e+001 -8.881784e-016 vertex 6.965150e+000 1.941063e+001 4.399139e+000 endloop endfacet facet normal 2.588190e-001 -9.659258e-001 5.300545e-016 outer loop vertex 7.386080e+000 1.952342e+001 -8.881784e-016 vertex 7.386080e+000 1.952342e+001 4.399139e+000 vertex 6.965150e+000 1.941063e+001 -8.881784e-016 endloop endfacet facet normal 8.715574e-002 -9.961947e-001 7.040056e-016 outer loop vertex 7.386080e+000 1.952342e+001 -8.881784e-016 vertex 7.820200e+000 1.956140e+001 -8.881784e-016 vertex 7.820200e+000 1.956140e+001 4.399139e+000 endloop endfacet facet normal -8.715574e-002 -9.961947e-001 1.013479e-016 outer loop vertex 7.820200e+000 1.956140e+001 -8.881784e-016 vertex 8.254320e+000 1.952342e+001 -8.881784e-016 vertex 8.254320e+000 1.952342e+001 4.399139e+000 endloop endfacet facet normal -2.588190e-001 -9.659258e-001 3.547175e-016 outer loop vertex 8.254320e+000 1.952342e+001 -8.881784e-016 vertex 8.675250e+000 1.941063e+001 -8.881784e-016 vertex 8.675250e+000 1.941063e+001 4.399139e+000 endloop endfacet facet normal -4.226183e-001 -9.063078e-001 7.601089e-016 outer loop vertex 8.675250e+000 1.941063e+001 -8.881784e-016 vertex 9.070200e+000 1.922646e+001 -8.881784e-016 vertex 9.070200e+000 1.922646e+001 4.399139e+000 endloop endfacet facet normal -5.735764e-001 -8.191520e-001 2.678479e-016 outer loop vertex 9.070200e+000 1.922646e+001 -8.881784e-016 vertex 9.427169e+000 1.897651e+001 -8.881784e-016 vertex 9.427169e+000 1.897651e+001 4.399139e+000 endloop endfacet facet normal -7.071068e-001 -7.071068e-001 8.542176e-016 outer loop vertex 9.427169e+000 1.897651e+001 -8.881784e-016 vertex 9.735311e+000 1.866837e+001 -8.881784e-016 vertex 9.735311e+000 1.866837e+001 4.399139e+000 endloop endfacet facet normal -8.191520e-001 -5.735764e-001 8.614567e-016 outer loop vertex 9.735311e+000 1.866837e+001 -8.881784e-016 vertex 9.985264e+000 1.831140e+001 -8.881784e-016 vertex 9.985264e+000 1.831140e+001 4.399139e+000 endloop endfacet facet normal -9.063078e-001 -4.226183e-001 8.542176e-016 outer loop vertex 9.985264e+000 1.831140e+001 -8.881784e-016 vertex 1.016943e+001 1.791645e+001 -8.881784e-016 vertex 1.016943e+001 1.791645e+001 4.399139e+000 endloop endfacet facet normal 4.639778e-016 9.961947e-001 -8.715574e-002 outer loop vertex -1.798000e-001 -2.938600e+000 5.000000e+000 vertex -1.798000e-001 -2.893023e+000 5.520945e+000 vertex 1.482020e+001 -2.893023e+000 5.520945e+000 endloop endfacet facet normal -2.425509e-016 9.961947e-001 -8.715574e-002 outer loop vertex 1.482020e+001 -2.938600e+000 5.000000e+000 vertex -1.798000e-001 -2.938600e+000 5.000000e+000 vertex 1.482020e+001 -2.893023e+000 5.520945e+000 endloop endfacet facet normal 2.425509e-016 9.961947e-001 8.715574e-002 outer loop vertex 1.482020e+001 -2.938600e+000 5.000000e+000 vertex -1.798000e-001 -2.893023e+000 4.479055e+000 vertex -1.798000e-001 -2.938600e+000 5.000000e+000 endloop endfacet facet normal -4.635355e-016 9.961947e-001 8.715574e-002 outer loop vertex 1.482020e+001 -2.938600e+000 5.000000e+000 vertex 1.482020e+001 -2.893023e+000 4.479055e+000 vertex -1.798000e-001 -2.893023e+000 4.479055e+000 endloop endfacet facet normal 5.101317e-016 9.659258e-001 2.588190e-001 outer loop vertex -1.798000e-001 -2.893023e+000 4.479055e+000 vertex 1.482020e+001 -2.893023e+000 4.479055e+000 vertex -1.798000e-001 -2.757678e+000 3.973940e+000 endloop endfacet facet normal -5.234721e-016 9.659258e-001 2.588190e-001 outer loop vertex -1.798000e-001 -2.757678e+000 3.973940e+000 vertex 1.482020e+001 -2.893023e+000 4.479055e+000 vertex 1.482020e+001 -2.757678e+000 3.973940e+000 endloop endfacet facet normal -4.809511e-016 9.063078e-001 4.226183e-001 outer loop vertex -1.798000e-001 -2.536676e+000 3.500000e+000 vertex 1.482020e+001 -2.757678e+000 3.973940e+000 vertex 1.482020e+001 -2.536676e+000 3.500000e+000 endloop endfacet facet normal -5.134128e-016 8.191520e-001 5.735764e-001 outer loop vertex -1.798000e-001 -2.236733e+000 3.071637e+000 vertex 1.482020e+001 -2.536676e+000 3.500000e+000 vertex 1.482020e+001 -2.236733e+000 3.071637e+000 endloop endfacet facet normal -5.024296e-016 7.071068e-001 7.071068e-001 outer loop vertex -1.798000e-001 -1.866963e+000 2.701867e+000 vertex 1.482020e+001 -2.236733e+000 3.071637e+000 vertex 1.482020e+001 -1.866963e+000 2.701867e+000 endloop endfacet facet normal -4.870609e-016 5.735764e-001 8.191520e-001 outer loop vertex -1.798000e-001 -1.438600e+000 2.401924e+000 vertex 1.482020e+001 -1.866963e+000 2.701867e+000 vertex 1.482020e+001 -1.438600e+000 2.401924e+000 endloop endfacet facet normal -4.973720e-016 4.226183e-001 9.063078e-001 outer loop vertex -1.798000e-001 -9.646604e-001 2.180922e+000 vertex 1.482020e+001 -1.438600e+000 2.401924e+000 vertex 1.482020e+001 -9.646604e-001 2.180922e+000 endloop endfacet facet normal -4.930284e-016 2.588190e-001 9.659258e-001 outer loop vertex -1.798000e-001 -4.595445e-001 2.045577e+000 vertex 1.482020e+001 -9.646604e-001 2.180922e+000 vertex 1.482020e+001 -4.595445e-001 2.045577e+000 endloop endfacet facet normal -4.799411e-016 8.715574e-002 9.961947e-001 outer loop vertex -1.798000e-001 6.140000e-002 2.000000e+000 vertex 1.482020e+001 -4.595445e-001 2.045577e+000 vertex 1.482020e+001 6.140000e-002 2.000000e+000 endloop endfacet facet normal -4.933374e-016 -8.715574e-002 9.961947e-001 outer loop vertex -1.798000e-001 5.823445e-001 2.045577e+000 vertex 1.482020e+001 6.140000e-002 2.000000e+000 vertex 1.482020e+001 5.823445e-001 2.045577e+000 endloop endfacet facet normal -4.872123e-016 -2.588190e-001 9.659258e-001 outer loop vertex -1.798000e-001 1.087460e+000 2.180922e+000 vertex 1.482020e+001 5.823445e-001 2.045577e+000 vertex 1.482020e+001 1.087460e+000 2.180922e+000 endloop endfacet facet normal -4.809511e-016 -4.226183e-001 9.063078e-001 outer loop vertex -1.798000e-001 1.561400e+000 2.401924e+000 vertex 1.482020e+001 1.087460e+000 2.180922e+000 vertex 1.482020e+001 1.561400e+000 2.401924e+000 endloop endfacet facet normal -5.049222e-016 -5.735764e-001 8.191520e-001 outer loop vertex -1.798000e-001 1.989763e+000 2.701867e+000 vertex 1.482020e+001 1.561400e+000 2.401924e+000 vertex 1.482020e+001 1.989763e+000 2.701867e+000 endloop endfacet facet normal -4.605605e-016 -7.071068e-001 7.071068e-001 outer loop vertex -1.798000e-001 2.359533e+000 3.071637e+000 vertex 1.482020e+001 1.989763e+000 2.701867e+000 vertex 1.482020e+001 2.359533e+000 3.071637e+000 endloop endfacet facet normal -4.955515e-016 -8.191520e-001 5.735764e-001 outer loop vertex -1.798000e-001 2.659476e+000 3.500000e+000 vertex 1.482020e+001 2.359533e+000 3.071637e+000 vertex 1.482020e+001 2.659476e+000 3.500000e+000 endloop endfacet facet normal -4.562199e-016 -9.063078e-001 4.226183e-001 outer loop vertex -1.798000e-001 2.880478e+000 3.973940e+000 vertex 1.482020e+001 2.659476e+000 3.500000e+000 vertex 1.482020e+001 2.880478e+000 3.973940e+000 endloop endfacet facet normal -4.815345e-016 -9.659258e-001 2.588190e-001 outer loop vertex -1.798000e-001 3.015823e+000 4.479055e+000 vertex 1.482020e+001 2.880478e+000 3.973940e+000 vertex 1.482020e+001 3.015823e+000 4.479055e+000 endloop endfacet facet normal -4.851017e-016 -9.961947e-001 8.715574e-002 outer loop vertex -1.798000e-001 3.061400e+000 5.000000e+000 vertex 1.482020e+001 3.015823e+000 4.479055e+000 vertex 1.482020e+001 3.061400e+000 5.000000e+000 endloop endfacet facet normal -4.933374e-016 -9.961947e-001 -8.715574e-002 outer loop vertex -1.798000e-001 3.015823e+000 5.520945e+000 vertex 1.482020e+001 3.061400e+000 5.000000e+000 vertex 1.482020e+001 3.015823e+000 5.520945e+000 endloop endfacet facet normal -5.234721e-016 -9.659258e-001 -2.588190e-001 outer loop vertex -1.798000e-001 2.880478e+000 6.026060e+000 vertex 1.482020e+001 3.015823e+000 5.520945e+000 vertex 1.482020e+001 2.880478e+000 6.026060e+000 endloop endfacet facet normal -4.684391e-016 -9.063078e-001 -4.226183e-001 outer loop vertex -1.798000e-001 2.659476e+000 6.500000e+000 vertex 1.482020e+001 2.880478e+000 6.026060e+000 vertex 1.482020e+001 2.659476e+000 6.500000e+000 endloop endfacet facet normal -5.134128e-016 -8.191520e-001 -5.735764e-001 outer loop vertex -1.798000e-001 2.359533e+000 6.928363e+000 vertex 1.482020e+001 2.659476e+000 6.500000e+000 vertex 1.482020e+001 2.359533e+000 6.928363e+000 endloop endfacet facet normal -5.128969e-016 -7.071068e-001 -7.071068e-001 outer loop vertex -1.798000e-001 1.989763e+000 7.298133e+000 vertex 1.482020e+001 2.359533e+000 6.928363e+000 vertex 1.482020e+001 1.989763e+000 7.298133e+000 endloop endfacet facet normal -4.543185e-016 -5.735764e-001 -8.191520e-001 outer loop vertex -1.798000e-001 1.561400e+000 7.598076e+000 vertex 1.482020e+001 1.989763e+000 7.298133e+000 vertex 1.482020e+001 1.561400e+000 7.598076e+000 endloop endfacet facet normal -5.223961e-016 -4.226183e-001 -9.063078e-001 outer loop vertex -1.798000e-001 1.087460e+000 7.819078e+000 vertex 1.482020e+001 1.561400e+000 7.598076e+000 vertex 1.482020e+001 1.087460e+000 7.819078e+000 endloop endfacet facet normal -4.529374e-016 -2.588190e-001 -9.659258e-001 outer loop vertex -1.798000e-001 5.823445e-001 7.954423e+000 vertex 1.482020e+001 1.087460e+000 7.819078e+000 vertex 1.482020e+001 5.823445e-001 7.954423e+000 endloop endfacet facet normal -4.799411e-016 -8.715574e-002 -9.961947e-001 outer loop vertex -1.798000e-001 6.140000e-002 8.000000e+000 vertex 1.482020e+001 5.823445e-001 7.954423e+000 vertex 1.482020e+001 6.140000e-002 8.000000e+000 endloop endfacet facet normal -5.189602e-016 8.715574e-002 -9.961947e-001 outer loop vertex -1.798000e-001 -4.595445e-001 7.954423e+000 vertex 1.482020e+001 6.140000e-002 8.000000e+000 vertex 1.482020e+001 -4.595445e-001 7.954423e+000 endloop endfacet facet normal -4.739404e-016 2.588190e-001 -9.659258e-001 outer loop vertex -1.798000e-001 -9.646604e-001 7.819078e+000 vertex 1.482020e+001 -4.595445e-001 7.954423e+000 vertex 1.482020e+001 -9.646604e-001 7.819078e+000 endloop endfacet facet normal -5.015272e-016 4.226183e-001 -9.063078e-001 outer loop vertex -1.798000e-001 -1.438600e+000 7.598076e+000 vertex 1.482020e+001 -9.646604e-001 7.819078e+000 vertex 1.482020e+001 -1.438600e+000 7.598076e+000 endloop endfacet facet normal -4.479280e-016 5.735764e-001 -8.191520e-001 outer loop vertex -1.798000e-001 -1.866963e+000 7.298133e+000 vertex 1.482020e+001 -1.438600e+000 7.598076e+000 vertex 1.482020e+001 -1.866963e+000 7.298133e+000 endloop endfacet facet normal -4.605605e-016 7.071068e-001 -7.071068e-001 outer loop vertex -1.798000e-001 -2.236733e+000 6.928363e+000 vertex 1.482020e+001 -1.866963e+000 7.298133e+000 vertex 1.482020e+001 -2.236733e+000 6.928363e+000 endloop endfacet facet normal -4.955515e-016 8.191520e-001 -5.735764e-001 outer loop vertex -1.798000e-001 -2.536676e+000 6.500000e+000 vertex 1.482020e+001 -2.236733e+000 6.928363e+000 vertex 1.482020e+001 -2.536676e+000 6.500000e+000 endloop endfacet facet normal -4.562199e-016 9.063078e-001 -4.226183e-001 outer loop vertex -1.798000e-001 -2.757678e+000 6.026060e+000 vertex 1.482020e+001 -2.536676e+000 6.500000e+000 vertex 1.482020e+001 -2.757678e+000 6.026060e+000 endloop endfacet facet normal -5.101317e-016 9.659258e-001 -2.588190e-001 outer loop vertex -1.798000e-001 -2.893023e+000 5.520945e+000 vertex 1.482020e+001 -2.757678e+000 6.026060e+000 vertex 1.482020e+001 -2.893023e+000 5.520945e+000 endloop endfacet facet normal 5.236890e-016 9.659258e-001 -2.588190e-001 outer loop vertex -1.798000e-001 -2.893023e+000 5.520945e+000 vertex -1.798000e-001 -2.757678e+000 6.026060e+000 vertex 1.482020e+001 -2.757678e+000 6.026060e+000 endloop endfacet facet normal 4.688432e-016 9.063078e-001 -4.226183e-001 outer loop vertex -1.798000e-001 -2.757678e+000 6.026060e+000 vertex -1.798000e-001 -2.536676e+000 6.500000e+000 vertex 1.482020e+001 -2.536676e+000 6.500000e+000 endloop endfacet facet normal 5.130737e-016 8.191520e-001 -5.735764e-001 outer loop vertex -1.798000e-001 -2.536676e+000 6.500000e+000 vertex -1.798000e-001 -2.236733e+000 6.928363e+000 vertex 1.482020e+001 -2.236733e+000 6.928363e+000 endloop endfacet facet normal 5.236890e-016 7.071068e-001 -7.071068e-001 outer loop vertex -1.798000e-001 -2.236733e+000 6.928363e+000 vertex -1.798000e-001 -1.866963e+000 7.298133e+000 vertex 1.482020e+001 -1.866963e+000 7.298133e+000 endloop endfacet facet normal 4.635355e-016 5.735764e-001 -8.191520e-001 outer loop vertex -1.798000e-001 -1.866963e+000 7.298133e+000 vertex -1.798000e-001 -1.438600e+000 7.598076e+000 vertex 1.482020e+001 -1.438600e+000 7.598076e+000 endloop endfacet facet normal 4.971507e-016 4.226183e-001 -9.063078e-001 outer loop vertex -1.798000e-001 -1.438600e+000 7.598076e+000 vertex -1.798000e-001 -9.646604e-001 7.819078e+000 vertex 1.482020e+001 -9.646604e-001 7.819078e+000 endloop endfacet facet normal 4.635355e-016 2.588190e-001 -9.659258e-001 outer loop vertex -1.798000e-001 -9.646604e-001 7.819078e+000 vertex -1.798000e-001 -4.595445e-001 7.954423e+000 vertex 1.482020e+001 -4.595445e-001 7.954423e+000 endloop endfacet facet normal 4.799008e-016 8.715574e-002 -9.961947e-001 outer loop vertex -1.798000e-001 -4.595445e-001 7.954423e+000 vertex -1.798000e-001 6.140000e-002 8.000000e+000 vertex 1.482020e+001 6.140000e-002 8.000000e+000 endloop endfacet facet normal 5.228044e-016 -8.715574e-002 -9.961947e-001 outer loop vertex -1.798000e-001 6.140000e-002 8.000000e+000 vertex -1.798000e-001 5.823445e-001 7.954423e+000 vertex 1.482020e+001 5.823445e-001 7.954423e+000 endloop endfacet facet normal 4.582279e-016 -2.588190e-001 -9.659258e-001 outer loop vertex -1.798000e-001 5.823445e-001 7.954423e+000 vertex -1.798000e-001 1.087460e+000 7.819078e+000 vertex 1.482020e+001 1.087460e+000 7.819078e+000 endloop endfacet facet normal 5.077660e-016 -4.226183e-001 -9.063078e-001 outer loop vertex -1.798000e-001 1.087460e+000 7.819078e+000 vertex -1.798000e-001 1.561400e+000 7.598076e+000 vertex 1.482020e+001 1.561400e+000 7.598076e+000 endloop endfacet facet normal 4.564586e-016 -5.735764e-001 -8.191520e-001 outer loop vertex -1.798000e-001 1.561400e+000 7.598076e+000 vertex -1.798000e-001 1.989763e+000 7.298133e+000 vertex 1.482020e+001 1.989763e+000 7.298133e+000 endloop endfacet facet normal 4.599971e-016 -7.071068e-001 -7.071068e-001 outer loop vertex -1.798000e-001 1.989763e+000 7.298133e+000 vertex -1.798000e-001 2.359533e+000 6.928363e+000 vertex 1.482020e+001 2.359533e+000 6.928363e+000 endloop endfacet facet normal 4.953815e-016 -8.191520e-001 -5.735764e-001 outer loop vertex -1.798000e-001 2.359533e+000 6.928363e+000 vertex -1.798000e-001 2.659476e+000 6.500000e+000 vertex 1.482020e+001 2.659476e+000 6.500000e+000 endloop endfacet facet normal 4.564586e-016 -9.063078e-001 -4.226183e-001 outer loop vertex -1.798000e-001 2.659476e+000 6.500000e+000 vertex -1.798000e-001 2.880478e+000 6.026060e+000 vertex 1.482020e+001 2.880478e+000 6.026060e+000 endloop endfacet facet normal 4.829969e-016 -9.659258e-001 -2.588190e-001 outer loop vertex -1.798000e-001 2.880478e+000 6.026060e+000 vertex -1.798000e-001 3.015823e+000 5.520945e+000 vertex 1.482020e+001 3.015823e+000 5.520945e+000 endloop endfacet facet normal 4.852085e-016 -9.961947e-001 -8.715574e-002 outer loop vertex -1.798000e-001 3.015823e+000 5.520945e+000 vertex -1.798000e-001 3.061400e+000 5.000000e+000 vertex 1.482020e+001 3.061400e+000 5.000000e+000 endloop endfacet facet normal 4.936122e-016 -9.961947e-001 8.715574e-002 outer loop vertex -1.798000e-001 3.061400e+000 5.000000e+000 vertex -1.798000e-001 3.015823e+000 4.479055e+000 vertex 1.482020e+001 3.015823e+000 4.479055e+000 endloop endfacet facet normal 5.236890e-016 -9.659258e-001 2.588190e-001 outer loop vertex -1.798000e-001 3.015823e+000 4.479055e+000 vertex -1.798000e-001 2.880478e+000 3.973940e+000 vertex 1.482020e+001 2.880478e+000 3.973940e+000 endloop endfacet facet normal 4.670740e-016 -9.063078e-001 4.226183e-001 outer loop vertex -1.798000e-001 2.880478e+000 3.973940e+000 vertex -1.798000e-001 2.659476e+000 3.500000e+000 vertex 1.482020e+001 2.659476e+000 3.500000e+000 endloop endfacet facet normal 5.130737e-016 -8.191520e-001 5.735764e-001 outer loop vertex -1.798000e-001 2.659476e+000 3.500000e+000 vertex -1.798000e-001 2.359533e+000 3.071637e+000 vertex 1.482020e+001 2.359533e+000 3.071637e+000 endloop endfacet facet normal 4.706124e-016 -7.071068e-001 7.071068e-001 outer loop vertex -1.798000e-001 2.359533e+000 3.071637e+000 vertex -1.798000e-001 1.989763e+000 2.701867e+000 vertex 1.482020e+001 1.989763e+000 2.701867e+000 endloop endfacet facet normal 4.776893e-016 -5.735764e-001 8.191520e-001 outer loop vertex -1.798000e-001 1.989763e+000 2.701867e+000 vertex -1.798000e-001 1.561400e+000 2.401924e+000 vertex 1.482020e+001 1.561400e+000 2.401924e+000 endloop endfacet facet normal 4.953815e-016 -4.226183e-001 9.063078e-001 outer loop vertex -1.798000e-001 1.561400e+000 2.401924e+000 vertex -1.798000e-001 1.087460e+000 2.180922e+000 vertex 1.482020e+001 1.087460e+000 2.180922e+000 endloop endfacet facet normal 4.812277e-016 -2.588190e-001 9.659258e-001 outer loop vertex -1.798000e-001 1.087460e+000 2.180922e+000 vertex -1.798000e-001 5.823445e-001 2.045577e+000 vertex 1.482020e+001 5.823445e-001 2.045577e+000 endloop endfacet facet normal 4.799008e-016 -8.715574e-002 9.961947e-001 outer loop vertex -1.798000e-001 5.823445e-001 2.045577e+000 vertex -1.798000e-001 6.140000e-002 2.000000e+000 vertex 1.482020e+001 6.140000e-002 2.000000e+000 endloop endfacet facet normal 4.891892e-016 8.715574e-002 9.961947e-001 outer loop vertex -1.798000e-001 6.140000e-002 2.000000e+000 vertex -1.798000e-001 -4.595445e-001 2.045577e+000 vertex 1.482020e+001 -4.595445e-001 2.045577e+000 endloop endfacet facet normal 4.741508e-016 2.588190e-001 9.659258e-001 outer loop vertex -1.798000e-001 -4.595445e-001 2.045577e+000 vertex -1.798000e-001 -9.646604e-001 2.180922e+000 vertex 1.482020e+001 -9.646604e-001 2.180922e+000 endloop endfacet facet normal 4.759201e-016 4.226183e-001 9.063078e-001 outer loop vertex -1.798000e-001 -9.646604e-001 2.180922e+000 vertex -1.798000e-001 -1.438600e+000 2.401924e+000 vertex 1.482020e+001 -1.438600e+000 2.401924e+000 endloop endfacet facet normal 4.706124e-016 5.735764e-001 8.191520e-001 outer loop vertex -1.798000e-001 -1.438600e+000 2.401924e+000 vertex -1.798000e-001 -1.866963e+000 2.701867e+000 vertex 1.482020e+001 -1.866963e+000 2.701867e+000 endloop endfacet facet normal 4.599971e-016 7.071068e-001 7.071068e-001 outer loop vertex -1.798000e-001 -1.866963e+000 2.701867e+000 vertex -1.798000e-001 -2.236733e+000 3.071637e+000 vertex 1.482020e+001 -2.236733e+000 3.071637e+000 endloop endfacet facet normal 4.812277e-016 8.191520e-001 5.735764e-001 outer loop vertex -1.798000e-001 -2.236733e+000 3.071637e+000 vertex -1.798000e-001 -2.536676e+000 3.500000e+000 vertex 1.482020e+001 -2.536676e+000 3.500000e+000 endloop endfacet facet normal 4.546894e-016 9.063078e-001 4.226183e-001 outer loop vertex -1.798000e-001 -2.536676e+000 3.500000e+000 vertex -1.798000e-001 -2.757678e+000 3.973940e+000 vertex 1.482020e+001 -2.757678e+000 3.973940e+000 endloop endfacet facet normal 4.639778e-016 9.961947e-001 -8.715574e-002 outer loop vertex 3.482020e+001 -2.938600e+000 5.000000e+000 vertex 3.482020e+001 -2.893023e+000 5.520945e+000 vertex 4.982020e+001 -2.893023e+000 5.520945e+000 endloop endfacet facet normal -2.425509e-016 9.961947e-001 -8.715574e-002 outer loop vertex 4.982020e+001 -2.938600e+000 5.000000e+000 vertex 3.482020e+001 -2.938600e+000 5.000000e+000 vertex 4.982020e+001 -2.893023e+000 5.520945e+000 endloop endfacet facet normal 2.425509e-016 9.961947e-001 8.715574e-002 outer loop vertex 4.982020e+001 -2.938600e+000 5.000000e+000 vertex 3.482020e+001 -2.893023e+000 4.479055e+000 vertex 3.482020e+001 -2.938600e+000 5.000000e+000 endloop endfacet facet normal -4.635355e-016 9.961947e-001 8.715574e-002 outer loop vertex 4.982020e+001 -2.938600e+000 5.000000e+000 vertex 4.982020e+001 -2.893023e+000 4.479055e+000 vertex 3.482020e+001 -2.893023e+000 4.479055e+000 endloop endfacet facet normal 5.101317e-016 9.659258e-001 2.588190e-001 outer loop vertex 3.482020e+001 -2.893023e+000 4.479055e+000 vertex 4.982020e+001 -2.893023e+000 4.479055e+000 vertex 3.482020e+001 -2.757678e+000 3.973940e+000 endloop endfacet facet normal -5.234721e-016 9.659258e-001 2.588190e-001 outer loop vertex 3.482020e+001 -2.757678e+000 3.973940e+000 vertex 4.982020e+001 -2.893023e+000 4.479055e+000 vertex 4.982020e+001 -2.757678e+000 3.973940e+000 endloop endfacet facet normal -4.809511e-016 9.063078e-001 4.226183e-001 outer loop vertex 3.482020e+001 -2.536676e+000 3.500000e+000 vertex 4.982020e+001 -2.757678e+000 3.973940e+000 vertex 4.982020e+001 -2.536676e+000 3.500000e+000 endloop endfacet facet normal -5.134128e-016 8.191520e-001 5.735764e-001 outer loop vertex 3.482020e+001 -2.236733e+000 3.071637e+000 vertex 4.982020e+001 -2.536676e+000 3.500000e+000 vertex 4.982020e+001 -2.236733e+000 3.071637e+000 endloop endfacet facet normal -5.024296e-016 7.071068e-001 7.071068e-001 outer loop vertex 3.482020e+001 -1.866963e+000 2.701867e+000 vertex 4.982020e+001 -2.236733e+000 3.071637e+000 vertex 4.982020e+001 -1.866963e+000 2.701867e+000 endloop endfacet facet normal -4.870609e-016 5.735764e-001 8.191520e-001 outer loop vertex 3.482020e+001 -1.438600e+000 2.401924e+000 vertex 4.982020e+001 -1.866963e+000 2.701867e+000 vertex 4.982020e+001 -1.438600e+000 2.401924e+000 endloop endfacet facet normal -4.973720e-016 4.226183e-001 9.063078e-001 outer loop vertex 3.482020e+001 -9.646604e-001 2.180922e+000 vertex 4.982020e+001 -1.438600e+000 2.401924e+000 vertex 4.982020e+001 -9.646604e-001 2.180922e+000 endloop endfacet facet normal -4.930284e-016 2.588190e-001 9.659258e-001 outer loop vertex 3.482020e+001 -4.595445e-001 2.045577e+000 vertex 4.982020e+001 -9.646604e-001 2.180922e+000 vertex 4.982020e+001 -4.595445e-001 2.045577e+000 endloop endfacet facet normal -4.799411e-016 8.715574e-002 9.961947e-001 outer loop vertex 3.482020e+001 6.140000e-002 2.000000e+000 vertex 4.982020e+001 -4.595445e-001 2.045577e+000 vertex 4.982020e+001 6.140000e-002 2.000000e+000 endloop endfacet facet normal -4.933374e-016 -8.715574e-002 9.961947e-001 outer loop vertex 3.482020e+001 5.823445e-001 2.045577e+000 vertex 4.982020e+001 6.140000e-002 2.000000e+000 vertex 4.982020e+001 5.823445e-001 2.045577e+000 endloop endfacet facet normal -4.872123e-016 -2.588190e-001 9.659258e-001 outer loop vertex 3.482020e+001 1.087460e+000 2.180922e+000 vertex 4.982020e+001 5.823445e-001 2.045577e+000 vertex 4.982020e+001 1.087460e+000 2.180922e+000 endloop endfacet facet normal -4.809511e-016 -4.226183e-001 9.063078e-001 outer loop vertex 3.482020e+001 1.561400e+000 2.401924e+000 vertex 4.982020e+001 1.087460e+000 2.180922e+000 vertex 4.982020e+001 1.561400e+000 2.401924e+000 endloop endfacet facet normal -5.049222e-016 -5.735764e-001 8.191520e-001 outer loop vertex 3.482020e+001 1.989763e+000 2.701867e+000 vertex 4.982020e+001 1.561400e+000 2.401924e+000 vertex 4.982020e+001 1.989763e+000 2.701867e+000 endloop endfacet facet normal -4.605605e-016 -7.071068e-001 7.071068e-001 outer loop vertex 3.482020e+001 2.359533e+000 3.071637e+000 vertex 4.982020e+001 1.989763e+000 2.701867e+000 vertex 4.982020e+001 2.359533e+000 3.071637e+000 endloop endfacet facet normal -4.955515e-016 -8.191520e-001 5.735764e-001 outer loop vertex 3.482020e+001 2.659476e+000 3.500000e+000 vertex 4.982020e+001 2.359533e+000 3.071637e+000 vertex 4.982020e+001 2.659476e+000 3.500000e+000 endloop endfacet facet normal -4.562199e-016 -9.063078e-001 4.226183e-001 outer loop vertex 3.482020e+001 2.880478e+000 3.973940e+000 vertex 4.982020e+001 2.659476e+000 3.500000e+000 vertex 4.982020e+001 2.880478e+000 3.973940e+000 endloop endfacet facet normal -4.815345e-016 -9.659258e-001 2.588190e-001 outer loop vertex 3.482020e+001 3.015823e+000 4.479055e+000 vertex 4.982020e+001 2.880478e+000 3.973940e+000 vertex 4.982020e+001 3.015823e+000 4.479055e+000 endloop endfacet facet normal -4.851017e-016 -9.961947e-001 8.715574e-002 outer loop vertex 3.482020e+001 3.061400e+000 5.000000e+000 vertex 4.982020e+001 3.015823e+000 4.479055e+000 vertex 4.982020e+001 3.061400e+000 5.000000e+000 endloop endfacet facet normal -4.933374e-016 -9.961947e-001 -8.715574e-002 outer loop vertex 3.482020e+001 3.015823e+000 5.520945e+000 vertex 4.982020e+001 3.061400e+000 5.000000e+000 vertex 4.982020e+001 3.015823e+000 5.520945e+000 endloop endfacet facet normal -5.234721e-016 -9.659258e-001 -2.588190e-001 outer loop vertex 3.482020e+001 2.880478e+000 6.026060e+000 vertex 4.982020e+001 3.015823e+000 5.520945e+000 vertex 4.982020e+001 2.880478e+000 6.026060e+000 endloop endfacet facet normal -4.684391e-016 -9.063078e-001 -4.226183e-001 outer loop vertex 3.482020e+001 2.659476e+000 6.500000e+000 vertex 4.982020e+001 2.880478e+000 6.026060e+000 vertex 4.982020e+001 2.659476e+000 6.500000e+000 endloop endfacet facet normal -5.134128e-016 -8.191520e-001 -5.735764e-001 outer loop vertex 3.482020e+001 2.359533e+000 6.928363e+000 vertex 4.982020e+001 2.659476e+000 6.500000e+000 vertex 4.982020e+001 2.359533e+000 6.928363e+000 endloop endfacet facet normal -5.128969e-016 -7.071068e-001 -7.071068e-001 outer loop vertex 3.482020e+001 1.989763e+000 7.298133e+000 vertex 4.982020e+001 2.359533e+000 6.928363e+000 vertex 4.982020e+001 1.989763e+000 7.298133e+000 endloop endfacet facet normal -4.543185e-016 -5.735764e-001 -8.191520e-001 outer loop vertex 3.482020e+001 1.561400e+000 7.598076e+000 vertex 4.982020e+001 1.989763e+000 7.298133e+000 vertex 4.982020e+001 1.561400e+000 7.598076e+000 endloop endfacet facet normal -5.223961e-016 -4.226183e-001 -9.063078e-001 outer loop vertex 3.482020e+001 1.087460e+000 7.819078e+000 vertex 4.982020e+001 1.561400e+000 7.598076e+000 vertex 4.982020e+001 1.087460e+000 7.819078e+000 endloop endfacet facet normal -4.529374e-016 -2.588190e-001 -9.659258e-001 outer loop vertex 3.482020e+001 5.823445e-001 7.954423e+000 vertex 4.982020e+001 1.087460e+000 7.819078e+000 vertex 4.982020e+001 5.823445e-001 7.954423e+000 endloop endfacet facet normal -4.799411e-016 -8.715574e-002 -9.961947e-001 outer loop vertex 3.482020e+001 6.140000e-002 8.000000e+000 vertex 4.982020e+001 5.823445e-001 7.954423e+000 vertex 4.982020e+001 6.140000e-002 8.000000e+000 endloop endfacet facet normal -5.189602e-016 8.715574e-002 -9.961947e-001 outer loop vertex 3.482020e+001 -4.595445e-001 7.954423e+000 vertex 4.982020e+001 6.140000e-002 8.000000e+000 vertex 4.982020e+001 -4.595445e-001 7.954423e+000 endloop endfacet facet normal -4.739404e-016 2.588190e-001 -9.659258e-001 outer loop vertex 3.482020e+001 -9.646604e-001 7.819078e+000 vertex 4.982020e+001 -4.595445e-001 7.954423e+000 vertex 4.982020e+001 -9.646604e-001 7.819078e+000 endloop endfacet facet normal -5.015272e-016 4.226183e-001 -9.063078e-001 outer loop vertex 3.482020e+001 -1.438600e+000 7.598076e+000 vertex 4.982020e+001 -9.646604e-001 7.819078e+000 vertex 4.982020e+001 -1.438600e+000 7.598076e+000 endloop endfacet facet normal -4.479280e-016 5.735764e-001 -8.191520e-001 outer loop vertex 3.482020e+001 -1.866963e+000 7.298133e+000 vertex 4.982020e+001 -1.438600e+000 7.598076e+000 vertex 4.982020e+001 -1.866963e+000 7.298133e+000 endloop endfacet facet normal -4.605605e-016 7.071068e-001 -7.071068e-001 outer loop vertex 3.482020e+001 -2.236733e+000 6.928363e+000 vertex 4.982020e+001 -1.866963e+000 7.298133e+000 vertex 4.982020e+001 -2.236733e+000 6.928363e+000 endloop endfacet facet normal -4.955515e-016 8.191520e-001 -5.735764e-001 outer loop vertex 3.482020e+001 -2.536676e+000 6.500000e+000 vertex 4.982020e+001 -2.236733e+000 6.928363e+000 vertex 4.982020e+001 -2.536676e+000 6.500000e+000 endloop endfacet facet normal -4.562199e-016 9.063078e-001 -4.226183e-001 outer loop vertex 3.482020e+001 -2.757678e+000 6.026060e+000 vertex 4.982020e+001 -2.536676e+000 6.500000e+000 vertex 4.982020e+001 -2.757678e+000 6.026060e+000 endloop endfacet facet normal -5.101317e-016 9.659258e-001 -2.588190e-001 outer loop vertex 3.482020e+001 -2.893023e+000 5.520945e+000 vertex 4.982020e+001 -2.757678e+000 6.026060e+000 vertex 4.982020e+001 -2.893023e+000 5.520945e+000 endloop endfacet facet normal 5.236890e-016 9.659258e-001 -2.588190e-001 outer loop vertex 3.482020e+001 -2.893023e+000 5.520945e+000 vertex 3.482020e+001 -2.757678e+000 6.026060e+000 vertex 4.982020e+001 -2.757678e+000 6.026060e+000 endloop endfacet facet normal 4.688432e-016 9.063078e-001 -4.226183e-001 outer loop vertex 3.482020e+001 -2.757678e+000 6.026060e+000 vertex 3.482020e+001 -2.536676e+000 6.500000e+000 vertex 4.982020e+001 -2.536676e+000 6.500000e+000 endloop endfacet facet normal 5.130737e-016 8.191520e-001 -5.735764e-001 outer loop vertex 3.482020e+001 -2.536676e+000 6.500000e+000 vertex 3.482020e+001 -2.236733e+000 6.928363e+000 vertex 4.982020e+001 -2.236733e+000 6.928363e+000 endloop endfacet facet normal 5.236890e-016 7.071068e-001 -7.071068e-001 outer loop vertex 3.482020e+001 -2.236733e+000 6.928363e+000 vertex 3.482020e+001 -1.866963e+000 7.298133e+000 vertex 4.982020e+001 -1.866963e+000 7.298133e+000 endloop endfacet facet normal 4.635355e-016 5.735764e-001 -8.191520e-001 outer loop vertex 3.482020e+001 -1.866963e+000 7.298133e+000 vertex 3.482020e+001 -1.438600e+000 7.598076e+000 vertex 4.982020e+001 -1.438600e+000 7.598076e+000 endloop endfacet facet normal 4.971507e-016 4.226183e-001 -9.063078e-001 outer loop vertex 3.482020e+001 -1.438600e+000 7.598076e+000 vertex 3.482020e+001 -9.646604e-001 7.819078e+000 vertex 4.982020e+001 -9.646604e-001 7.819078e+000 endloop endfacet facet normal 4.635355e-016 2.588190e-001 -9.659258e-001 outer loop vertex 3.482020e+001 -9.646604e-001 7.819078e+000 vertex 3.482020e+001 -4.595445e-001 7.954423e+000 vertex 4.982020e+001 -4.595445e-001 7.954423e+000 endloop endfacet facet normal 4.799008e-016 8.715574e-002 -9.961947e-001 outer loop vertex 3.482020e+001 -4.595445e-001 7.954423e+000 vertex 3.482020e+001 6.140000e-002 8.000000e+000 vertex 4.982020e+001 6.140000e-002 8.000000e+000 endloop endfacet facet normal 5.228044e-016 -8.715574e-002 -9.961947e-001 outer loop vertex 3.482020e+001 6.140000e-002 8.000000e+000 vertex 3.482020e+001 5.823445e-001 7.954423e+000 vertex 4.982020e+001 5.823445e-001 7.954423e+000 endloop endfacet facet normal 4.582279e-016 -2.588190e-001 -9.659258e-001 outer loop vertex 3.482020e+001 5.823445e-001 7.954423e+000 vertex 3.482020e+001 1.087460e+000 7.819078e+000 vertex 4.982020e+001 1.087460e+000 7.819078e+000 endloop endfacet facet normal 5.077660e-016 -4.226183e-001 -9.063078e-001 outer loop vertex 3.482020e+001 1.087460e+000 7.819078e+000 vertex 3.482020e+001 1.561400e+000 7.598076e+000 vertex 4.982020e+001 1.561400e+000 7.598076e+000 endloop endfacet facet normal 4.564586e-016 -5.735764e-001 -8.191520e-001 outer loop vertex 3.482020e+001 1.561400e+000 7.598076e+000 vertex 3.482020e+001 1.989763e+000 7.298133e+000 vertex 4.982020e+001 1.989763e+000 7.298133e+000 endloop endfacet facet normal 4.599971e-016 -7.071068e-001 -7.071068e-001 outer loop vertex 3.482020e+001 1.989763e+000 7.298133e+000 vertex 3.482020e+001 2.359533e+000 6.928363e+000 vertex 4.982020e+001 2.359533e+000 6.928363e+000 endloop endfacet facet normal 4.953815e-016 -8.191520e-001 -5.735764e-001 outer loop vertex 3.482020e+001 2.359533e+000 6.928363e+000 vertex 3.482020e+001 2.659476e+000 6.500000e+000 vertex 4.982020e+001 2.659476e+000 6.500000e+000 endloop endfacet facet normal 4.564586e-016 -9.063078e-001 -4.226183e-001 outer loop vertex 3.482020e+001 2.659476e+000 6.500000e+000 vertex 3.482020e+001 2.880478e+000 6.026060e+000 vertex 4.982020e+001 2.880478e+000 6.026060e+000 endloop endfacet facet normal 4.829969e-016 -9.659258e-001 -2.588190e-001 outer loop vertex 3.482020e+001 2.880478e+000 6.026060e+000 vertex 3.482020e+001 3.015823e+000 5.520945e+000 vertex 4.982020e+001 3.015823e+000 5.520945e+000 endloop endfacet facet normal 4.852085e-016 -9.961947e-001 -8.715574e-002 outer loop vertex 3.482020e+001 3.015823e+000 5.520945e+000 vertex 3.482020e+001 3.061400e+000 5.000000e+000 vertex 4.982020e+001 3.061400e+000 5.000000e+000 endloop endfacet facet normal 4.936122e-016 -9.961947e-001 8.715574e-002 outer loop vertex 3.482020e+001 3.061400e+000 5.000000e+000 vertex 3.482020e+001 3.015823e+000 4.479055e+000 vertex 4.982020e+001 3.015823e+000 4.479055e+000 endloop endfacet facet normal 5.236890e-016 -9.659258e-001 2.588190e-001 outer loop vertex 3.482020e+001 3.015823e+000 4.479055e+000 vertex 3.482020e+001 2.880478e+000 3.973940e+000 vertex 4.982020e+001 2.880478e+000 3.973940e+000 endloop endfacet facet normal 4.670740e-016 -9.063078e-001 4.226183e-001 outer loop vertex 3.482020e+001 2.880478e+000 3.973940e+000 vertex 3.482020e+001 2.659476e+000 3.500000e+000 vertex 4.982020e+001 2.659476e+000 3.500000e+000 endloop endfacet facet normal 5.130737e-016 -8.191520e-001 5.735764e-001 outer loop vertex 3.482020e+001 2.659476e+000 3.500000e+000 vertex 3.482020e+001 2.359533e+000 3.071637e+000 vertex 4.982020e+001 2.359533e+000 3.071637e+000 endloop endfacet facet normal 4.706124e-016 -7.071068e-001 7.071068e-001 outer loop vertex 3.482020e+001 2.359533e+000 3.071637e+000 vertex 3.482020e+001 1.989763e+000 2.701867e+000 vertex 4.982020e+001 1.989763e+000 2.701867e+000 endloop endfacet facet normal 4.776893e-016 -5.735764e-001 8.191520e-001 outer loop vertex 3.482020e+001 1.989763e+000 2.701867e+000 vertex 3.482020e+001 1.561400e+000 2.401924e+000 vertex 4.982020e+001 1.561400e+000 2.401924e+000 endloop endfacet facet normal 4.953815e-016 -4.226183e-001 9.063078e-001 outer loop vertex 3.482020e+001 1.561400e+000 2.401924e+000 vertex 3.482020e+001 1.087460e+000 2.180922e+000 vertex 4.982020e+001 1.087460e+000 2.180922e+000 endloop endfacet facet normal 4.812277e-016 -2.588190e-001 9.659258e-001 outer loop vertex 3.482020e+001 1.087460e+000 2.180922e+000 vertex 3.482020e+001 5.823445e-001 2.045577e+000 vertex 4.982020e+001 5.823445e-001 2.045577e+000 endloop endfacet facet normal 4.799008e-016 -8.715574e-002 9.961947e-001 outer loop vertex 3.482020e+001 5.823445e-001 2.045577e+000 vertex 3.482020e+001 6.140000e-002 2.000000e+000 vertex 4.982020e+001 6.140000e-002 2.000000e+000 endloop endfacet facet normal 4.891892e-016 8.715574e-002 9.961947e-001 outer loop vertex 3.482020e+001 6.140000e-002 2.000000e+000 vertex 3.482020e+001 -4.595445e-001 2.045577e+000 vertex 4.982020e+001 -4.595445e-001 2.045577e+000 endloop endfacet facet normal 4.741508e-016 2.588190e-001 9.659258e-001 outer loop vertex 3.482020e+001 -4.595445e-001 2.045577e+000 vertex 3.482020e+001 -9.646604e-001 2.180922e+000 vertex 4.982020e+001 -9.646604e-001 2.180922e+000 endloop endfacet facet normal 4.759201e-016 4.226183e-001 9.063078e-001 outer loop vertex 3.482020e+001 -9.646604e-001 2.180922e+000 vertex 3.482020e+001 -1.438600e+000 2.401924e+000 vertex 4.982020e+001 -1.438600e+000 2.401924e+000 endloop endfacet facet normal 4.706124e-016 5.735764e-001 8.191520e-001 outer loop vertex 3.482020e+001 -1.438600e+000 2.401924e+000 vertex 3.482020e+001 -1.866963e+000 2.701867e+000 vertex 4.982020e+001 -1.866963e+000 2.701867e+000 endloop endfacet facet normal 4.599971e-016 7.071068e-001 7.071068e-001 outer loop vertex 3.482020e+001 -1.866963e+000 2.701867e+000 vertex 3.482020e+001 -2.236733e+000 3.071637e+000 vertex 4.982020e+001 -2.236733e+000 3.071637e+000 endloop endfacet facet normal 4.812277e-016 8.191520e-001 5.735764e-001 outer loop vertex 3.482020e+001 -2.236733e+000 3.071637e+000 vertex 3.482020e+001 -2.536676e+000 3.500000e+000 vertex 4.982020e+001 -2.536676e+000 3.500000e+000 endloop endfacet facet normal 4.546894e-016 9.063078e-001 4.226183e-001 outer loop vertex 3.482020e+001 -2.536676e+000 3.500000e+000 vertex 3.482020e+001 -2.757678e+000 3.973940e+000 vertex 4.982020e+001 -2.757678e+000 3.973940e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -2.893023e+000 4.479055e+000 vertex 3.482020e+001 -4.938600e+000 5.000000e+000 vertex 3.482020e+001 -2.938600e+000 5.000000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -2.893023e+000 4.479055e+000 vertex 3.482020e+001 -4.862639e+000 4.131759e+000 vertex 3.482020e+001 -4.938600e+000 5.000000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -2.893023e+000 4.479055e+000 vertex 3.482020e+001 -2.757678e+000 3.973940e+000 vertex 3.482020e+001 -4.862639e+000 4.131759e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -4.862639e+000 4.131759e+000 vertex 3.482020e+001 -2.757678e+000 3.973940e+000 vertex 3.482020e+001 -4.637063e+000 3.289899e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -4.637063e+000 3.289899e+000 vertex 3.482020e+001 -2.757678e+000 3.973940e+000 vertex 3.482020e+001 -2.536676e+000 3.500000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -4.268727e+000 2.500000e+000 vertex 3.482020e+001 -2.536676e+000 3.500000e+000 vertex 3.482020e+001 -2.236733e+000 3.071637e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -3.768822e+000 1.786062e+000 vertex 3.482020e+001 -2.236733e+000 3.071637e+000 vertex 3.482020e+001 -1.866963e+000 2.701867e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -3.152538e+000 1.169778e+000 vertex 3.482020e+001 -1.866963e+000 2.701867e+000 vertex 3.482020e+001 -2.438600e+000 6.698730e-001 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -3.152538e+000 1.169778e+000 vertex 3.482020e+001 -3.768822e+000 1.786062e+000 vertex 3.482020e+001 -1.866963e+000 2.701867e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -1.866963e+000 2.701867e+000 vertex 3.482020e+001 -1.438600e+000 2.401924e+000 vertex 3.482020e+001 -2.438600e+000 6.698730e-001 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -2.438600e+000 6.698730e-001 vertex 3.482020e+001 -1.438600e+000 2.401924e+000 vertex 3.482020e+001 -1.648701e+000 3.015369e-001 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -1.648701e+000 3.015369e-001 vertex 3.482020e+001 -1.438600e+000 2.401924e+000 vertex 3.482020e+001 -9.646604e-001 2.180922e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -8.068409e-001 7.596123e-002 vertex 3.482020e+001 -9.646604e-001 2.180922e+000 vertex 3.482020e+001 -4.595445e-001 2.045577e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 6.140000e-002 0.000000e+000 vertex 3.482020e+001 -4.595445e-001 2.045577e+000 vertex 3.482020e+001 6.140000e-002 2.000000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 5.823445e-001 2.045577e+000 vertex 3.482020e+001 6.140000e-002 0.000000e+000 vertex 3.482020e+001 6.140000e-002 2.000000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 5.823445e-001 2.045577e+000 vertex 3.482020e+001 1.087460e+000 2.180922e+000 vertex 3.482020e+001 6.140000e-002 0.000000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 6.140000e-002 0.000000e+000 vertex 3.482020e+001 1.087460e+000 2.180922e+000 vertex 3.482020e+001 3.378025e+000 0.000000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 3.378025e+000 0.000000e+000 vertex 3.482020e+001 1.087460e+000 2.180922e+000 vertex 3.482020e+001 1.561400e+000 2.401924e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 1.989763e+000 2.701867e+000 vertex 3.482020e+001 3.378025e+000 0.000000e+000 vertex 3.482020e+001 1.561400e+000 2.401924e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 1.989763e+000 2.701867e+000 vertex 3.482020e+001 4.150665e+000 6.093379e-001 vertex 3.482020e+001 3.378025e+000 0.000000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 1.989763e+000 2.701867e+000 vertex 3.482020e+001 2.359533e+000 3.071637e+000 vertex 3.482020e+001 4.150665e+000 6.093379e-001 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 4.150665e+000 6.093379e-001 vertex 3.482020e+001 2.359533e+000 3.071637e+000 vertex 3.482020e+001 4.813319e+000 1.336768e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 4.813319e+000 1.336768e+000 vertex 3.482020e+001 2.359533e+000 3.071637e+000 vertex 3.482020e+001 2.659476e+000 3.500000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 5.348164e+000 2.162726e+000 vertex 3.482020e+001 2.659476e+000 3.500000e+000 vertex 3.482020e+001 2.880478e+000 3.973940e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 5.740815e+000 3.064995e+000 vertex 3.482020e+001 2.880478e+000 3.973940e+000 vertex 3.482020e+001 3.015823e+000 4.479055e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 5.061400e+000 5.000000e+000 vertex 3.482020e+001 3.015823e+000 4.479055e+000 vertex 3.482020e+001 3.061400e+000 5.000000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 3.015823e+000 5.520945e+000 vertex 3.482020e+001 5.061400e+000 5.000000e+000 vertex 3.482020e+001 3.061400e+000 5.000000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 3.015823e+000 5.520945e+000 vertex 3.482020e+001 4.985439e+000 5.868241e+000 vertex 3.482020e+001 5.061400e+000 5.000000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 3.015823e+000 5.520945e+000 vertex 3.482020e+001 2.880478e+000 6.026060e+000 vertex 3.482020e+001 4.985439e+000 5.868241e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 4.985439e+000 5.868241e+000 vertex 3.482020e+001 2.880478e+000 6.026060e+000 vertex 3.482020e+001 4.759863e+000 6.710101e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 4.759863e+000 6.710101e+000 vertex 3.482020e+001 2.880478e+000 6.026060e+000 vertex 3.482020e+001 2.659476e+000 6.500000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 4.391527e+000 7.500000e+000 vertex 3.482020e+001 2.659476e+000 6.500000e+000 vertex 3.482020e+001 2.359533e+000 6.928363e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 3.891622e+000 8.213938e+000 vertex 3.482020e+001 2.359533e+000 6.928363e+000 vertex 3.482020e+001 1.989763e+000 7.298133e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 3.275338e+000 8.830222e+000 vertex 3.482020e+001 1.989763e+000 7.298133e+000 vertex 3.482020e+001 2.561400e+000 9.330127e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 3.275338e+000 8.830222e+000 vertex 3.482020e+001 3.891622e+000 8.213938e+000 vertex 3.482020e+001 1.989763e+000 7.298133e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 1.989763e+000 7.298133e+000 vertex 3.482020e+001 1.561400e+000 7.598076e+000 vertex 3.482020e+001 2.561400e+000 9.330127e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 2.561400e+000 9.330127e+000 vertex 3.482020e+001 1.561400e+000 7.598076e+000 vertex 3.482020e+001 1.771501e+000 9.698463e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 1.771501e+000 9.698463e+000 vertex 3.482020e+001 1.561400e+000 7.598076e+000 vertex 3.482020e+001 1.087460e+000 7.819078e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 9.296409e-001 9.924039e+000 vertex 3.482020e+001 1.087460e+000 7.819078e+000 vertex 3.482020e+001 5.823445e-001 7.954423e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 6.140000e-002 1.000000e+001 vertex 3.482020e+001 5.823445e-001 7.954423e+000 vertex 3.482020e+001 6.140000e-002 8.000000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -8.068409e-001 9.924039e+000 vertex 3.482020e+001 6.140000e-002 8.000000e+000 vertex 3.482020e+001 -4.595445e-001 7.954423e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -1.648701e+000 9.698463e+000 vertex 3.482020e+001 -4.595445e-001 7.954423e+000 vertex 3.482020e+001 -9.646604e-001 7.819078e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -2.438600e+000 9.330127e+000 vertex 3.482020e+001 -9.646604e-001 7.819078e+000 vertex 3.482020e+001 -1.438600e+000 7.598076e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -3.152538e+000 8.830222e+000 vertex 3.482020e+001 -1.438600e+000 7.598076e+000 vertex 3.482020e+001 -1.866963e+000 7.298133e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -2.236733e+000 6.928363e+000 vertex 3.482020e+001 -3.152538e+000 8.830222e+000 vertex 3.482020e+001 -1.866963e+000 7.298133e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -2.236733e+000 6.928363e+000 vertex 3.482020e+001 -3.768822e+000 8.213938e+000 vertex 3.482020e+001 -3.152538e+000 8.830222e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -2.236733e+000 6.928363e+000 vertex 3.482020e+001 -2.536676e+000 6.500000e+000 vertex 3.482020e+001 -3.768822e+000 8.213938e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -3.768822e+000 8.213938e+000 vertex 3.482020e+001 -2.536676e+000 6.500000e+000 vertex 3.482020e+001 -4.268727e+000 7.500000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -4.268727e+000 7.500000e+000 vertex 3.482020e+001 -2.536676e+000 6.500000e+000 vertex 3.482020e+001 -2.757678e+000 6.026060e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -4.637063e+000 6.710101e+000 vertex 3.482020e+001 -2.757678e+000 6.026060e+000 vertex 3.482020e+001 -2.893023e+000 5.520945e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -4.862639e+000 5.868241e+000 vertex 3.482020e+001 -2.893023e+000 5.520945e+000 vertex 3.482020e+001 -2.938600e+000 5.000000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -4.938600e+000 5.000000e+000 vertex 3.482020e+001 -4.862639e+000 5.868241e+000 vertex 3.482020e+001 -2.938600e+000 5.000000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 5.061400e+000 5.000000e+000 vertex 3.482020e+001 6.061400e+000 5.000000e+000 vertex 3.482020e+001 5.980711e+000 4.019309e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 5.740815e+000 3.064995e+000 vertex 3.482020e+001 5.061400e+000 5.000000e+000 vertex 3.482020e+001 5.980711e+000 4.019309e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 5.740815e+000 3.064995e+000 vertex 3.482020e+001 3.015823e+000 4.479055e+000 vertex 3.482020e+001 5.061400e+000 5.000000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 5.740815e+000 3.064995e+000 vertex 3.482020e+001 5.348164e+000 2.162726e+000 vertex 3.482020e+001 2.880478e+000 3.973940e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 5.348164e+000 2.162726e+000 vertex 3.482020e+001 4.813319e+000 1.336768e+000 vertex 3.482020e+001 2.659476e+000 3.500000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 6.140000e-002 0.000000e+000 vertex 3.482020e+001 -8.068409e-001 7.596123e-002 vertex 3.482020e+001 -4.595445e-001 2.045577e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -1.648701e+000 3.015369e-001 vertex 3.482020e+001 -9.646604e-001 2.180922e+000 vertex 3.482020e+001 -8.068409e-001 7.596123e-002 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -3.768822e+000 1.786062e+000 vertex 3.482020e+001 -4.268727e+000 2.500000e+000 vertex 3.482020e+001 -2.236733e+000 3.071637e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -4.268727e+000 2.500000e+000 vertex 3.482020e+001 -4.637063e+000 3.289899e+000 vertex 3.482020e+001 -2.536676e+000 3.500000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -4.862639e+000 5.868241e+000 vertex 3.482020e+001 -4.637063e+000 6.710101e+000 vertex 3.482020e+001 -2.893023e+000 5.520945e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -4.637063e+000 6.710101e+000 vertex 3.482020e+001 -4.268727e+000 7.500000e+000 vertex 3.482020e+001 -2.757678e+000 6.026060e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -3.152538e+000 8.830222e+000 vertex 3.482020e+001 -2.438600e+000 9.330127e+000 vertex 3.482020e+001 -1.438600e+000 7.598076e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -2.438600e+000 9.330127e+000 vertex 3.482020e+001 -1.648701e+000 9.698463e+000 vertex 3.482020e+001 -9.646604e-001 7.819078e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 -1.648701e+000 9.698463e+000 vertex 3.482020e+001 -8.068409e-001 9.924039e+000 vertex 3.482020e+001 -4.595445e-001 7.954423e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 6.140000e-002 1.000000e+001 vertex 3.482020e+001 6.140000e-002 8.000000e+000 vertex 3.482020e+001 -8.068409e-001 9.924039e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 9.296409e-001 9.924039e+000 vertex 3.482020e+001 5.823445e-001 7.954423e+000 vertex 3.482020e+001 6.140000e-002 1.000000e+001 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 1.771501e+000 9.698463e+000 vertex 3.482020e+001 1.087460e+000 7.819078e+000 vertex 3.482020e+001 9.296409e-001 9.924039e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 2.359533e+000 6.928363e+000 vertex 3.482020e+001 3.891622e+000 8.213938e+000 vertex 3.482020e+001 4.391527e+000 7.500000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 3.482020e+001 4.759863e+000 6.710101e+000 vertex 3.482020e+001 2.659476e+000 6.500000e+000 vertex 3.482020e+001 4.391527e+000 7.500000e+000 endloop endfacet facet normal 0.000000e+000 -9.966323e-001 8.200039e-002 outer loop vertex 3.482020e+001 6.061400e+000 5.000000e+000 vertex 1.482020e+001 6.061400e+000 5.000000e+000 vertex 1.482020e+001 5.980711e+000 4.019309e+000 endloop endfacet facet normal -4.306895e-017 -9.698266e-001 2.437957e-001 outer loop vertex 3.482020e+001 5.980711e+000 4.019309e+000 vertex 1.482020e+001 5.980711e+000 4.019309e+000 vertex 3.482020e+001 5.740815e+000 3.064995e+000 endloop endfacet facet normal -4.425936e-017 -9.966323e-001 8.200039e-002 outer loop vertex 3.482020e+001 5.980711e+000 4.019309e+000 vertex 3.482020e+001 6.061400e+000 5.000000e+000 vertex 1.482020e+001 5.980711e+000 4.019309e+000 endloop endfacet facet normal 1.692405e-017 -9.698266e-001 2.437957e-001 outer loop vertex 1.482020e+001 5.980711e+000 4.019309e+000 vertex 1.482020e+001 5.740815e+000 3.064995e+000 vertex 3.482020e+001 5.740815e+000 3.064995e+000 endloop endfacet facet normal -3.581497e-018 -9.169362e-001 3.990338e-001 outer loop vertex 3.482020e+001 5.740815e+000 3.064995e+000 vertex 1.482020e+001 5.740815e+000 3.064995e+000 vertex 3.482020e+001 5.348164e+000 2.162726e+000 endloop endfacet facet normal 0.000000e+000 -9.169362e-001 3.990338e-001 outer loop vertex 3.482020e+001 5.348164e+000 2.162726e+000 vertex 1.482020e+001 5.740815e+000 3.064995e+000 vertex 1.482020e+001 5.348164e+000 2.162726e+000 endloop endfacet facet normal 1.313813e-017 -8.393837e-001 5.435393e-001 outer loop vertex 3.482020e+001 4.813319e+000 1.336768e+000 vertex 1.482020e+001 5.348164e+000 2.162726e+000 vertex 1.482020e+001 4.813319e+000 1.336768e+000 endloop endfacet facet normal 0.000000e+000 -7.392549e-001 6.734257e-001 outer loop vertex 3.482020e+001 4.150665e+000 6.093379e-001 vertex 1.482020e+001 4.813319e+000 1.336768e+000 vertex 1.482020e+001 4.150665e+000 6.093379e-001 endloop endfacet facet normal 0.000000e+000 -6.192429e-001 7.851995e-001 outer loop vertex 3.482020e+001 3.378025e+000 0.000000e+000 vertex 1.482020e+001 4.150665e+000 6.093379e-001 vertex 1.482020e+001 3.378025e+000 0.000000e+000 endloop endfacet facet normal 0.000000e+000 -6.192429e-001 7.851995e-001 outer loop vertex 3.482020e+001 3.378025e+000 0.000000e+000 vertex 3.482020e+001 4.150665e+000 6.093379e-001 vertex 1.482020e+001 4.150665e+000 6.093379e-001 endloop endfacet facet normal 2.820675e-018 -7.392549e-001 6.734257e-001 outer loop vertex 3.482020e+001 4.150665e+000 6.093379e-001 vertex 3.482020e+001 4.813319e+000 1.336768e+000 vertex 1.482020e+001 4.813319e+000 1.336768e+000 endloop endfacet facet normal 0.000000e+000 -8.393837e-001 5.435393e-001 outer loop vertex 3.482020e+001 4.813319e+000 1.336768e+000 vertex 3.482020e+001 5.348164e+000 2.162726e+000 vertex 1.482020e+001 5.348164e+000 2.162726e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -2.893023e+000 5.520945e+000 vertex 1.482020e+001 -4.862639e+000 5.868241e+000 vertex 1.482020e+001 -2.938600e+000 5.000000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -2.893023e+000 5.520945e+000 vertex 1.482020e+001 -4.637063e+000 6.710101e+000 vertex 1.482020e+001 -4.862639e+000 5.868241e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -2.893023e+000 5.520945e+000 vertex 1.482020e+001 -2.757678e+000 6.026060e+000 vertex 1.482020e+001 -4.637063e+000 6.710101e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -4.637063e+000 6.710101e+000 vertex 1.482020e+001 -2.757678e+000 6.026060e+000 vertex 1.482020e+001 -4.268727e+000 7.500000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -4.268727e+000 7.500000e+000 vertex 1.482020e+001 -2.757678e+000 6.026060e+000 vertex 1.482020e+001 -2.536676e+000 6.500000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -3.768822e+000 8.213938e+000 vertex 1.482020e+001 -2.536676e+000 6.500000e+000 vertex 1.482020e+001 -2.236733e+000 6.928363e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -1.866963e+000 7.298133e+000 vertex 1.482020e+001 -3.768822e+000 8.213938e+000 vertex 1.482020e+001 -2.236733e+000 6.928363e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -1.866963e+000 7.298133e+000 vertex 1.482020e+001 -3.152538e+000 8.830222e+000 vertex 1.482020e+001 -3.768822e+000 8.213938e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -1.866963e+000 7.298133e+000 vertex 1.482020e+001 -1.438600e+000 7.598076e+000 vertex 1.482020e+001 -3.152538e+000 8.830222e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -3.152538e+000 8.830222e+000 vertex 1.482020e+001 -1.438600e+000 7.598076e+000 vertex 1.482020e+001 -2.438600e+000 9.330127e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -2.438600e+000 9.330127e+000 vertex 1.482020e+001 -1.438600e+000 7.598076e+000 vertex 1.482020e+001 -9.646604e-001 7.819078e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -1.648701e+000 9.698463e+000 vertex 1.482020e+001 -9.646604e-001 7.819078e+000 vertex 1.482020e+001 -4.595445e-001 7.954423e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -8.068409e-001 9.924039e+000 vertex 1.482020e+001 -4.595445e-001 7.954423e+000 vertex 1.482020e+001 6.140000e-002 8.000000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 6.140000e-002 1.000000e+001 vertex 1.482020e+001 6.140000e-002 8.000000e+000 vertex 1.482020e+001 5.823445e-001 7.954423e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 9.296409e-001 9.924039e+000 vertex 1.482020e+001 5.823445e-001 7.954423e+000 vertex 1.482020e+001 1.087460e+000 7.819078e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 1.771501e+000 9.698463e+000 vertex 1.482020e+001 1.087460e+000 7.819078e+000 vertex 1.482020e+001 1.561400e+000 7.598076e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 2.561400e+000 9.330127e+000 vertex 1.482020e+001 1.561400e+000 7.598076e+000 vertex 1.482020e+001 1.989763e+000 7.298133e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 3.275338e+000 8.830222e+000 vertex 1.482020e+001 1.989763e+000 7.298133e+000 vertex 1.482020e+001 2.359533e+000 6.928363e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 3.891622e+000 8.213938e+000 vertex 1.482020e+001 2.359533e+000 6.928363e+000 vertex 1.482020e+001 4.391527e+000 7.500000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 3.891622e+000 8.213938e+000 vertex 1.482020e+001 3.275338e+000 8.830222e+000 vertex 1.482020e+001 2.359533e+000 6.928363e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 2.659476e+000 6.500000e+000 vertex 1.482020e+001 4.391527e+000 7.500000e+000 vertex 1.482020e+001 2.359533e+000 6.928363e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 2.659476e+000 6.500000e+000 vertex 1.482020e+001 4.759863e+000 6.710101e+000 vertex 1.482020e+001 4.391527e+000 7.500000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 2.659476e+000 6.500000e+000 vertex 1.482020e+001 2.880478e+000 6.026060e+000 vertex 1.482020e+001 4.759863e+000 6.710101e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 4.759863e+000 6.710101e+000 vertex 1.482020e+001 2.880478e+000 6.026060e+000 vertex 1.482020e+001 4.985439e+000 5.868241e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 4.985439e+000 5.868241e+000 vertex 1.482020e+001 2.880478e+000 6.026060e+000 vertex 1.482020e+001 3.015823e+000 5.520945e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 5.061400e+000 5.000000e+000 vertex 1.482020e+001 3.015823e+000 5.520945e+000 vertex 1.482020e+001 3.061400e+000 5.000000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 3.015823e+000 4.479055e+000 vertex 1.482020e+001 5.061400e+000 5.000000e+000 vertex 1.482020e+001 3.061400e+000 5.000000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 3.015823e+000 4.479055e+000 vertex 1.482020e+001 5.740815e+000 3.064995e+000 vertex 1.482020e+001 5.061400e+000 5.000000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 3.015823e+000 4.479055e+000 vertex 1.482020e+001 2.880478e+000 3.973940e+000 vertex 1.482020e+001 5.740815e+000 3.064995e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 5.740815e+000 3.064995e+000 vertex 1.482020e+001 2.880478e+000 3.973940e+000 vertex 1.482020e+001 5.348164e+000 2.162726e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 5.348164e+000 2.162726e+000 vertex 1.482020e+001 2.880478e+000 3.973940e+000 vertex 1.482020e+001 2.659476e+000 3.500000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 4.813319e+000 1.336768e+000 vertex 1.482020e+001 2.659476e+000 3.500000e+000 vertex 1.482020e+001 2.359533e+000 3.071637e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 4.150665e+000 6.093379e-001 vertex 1.482020e+001 2.359533e+000 3.071637e+000 vertex 1.482020e+001 1.989763e+000 2.701867e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 3.378025e+000 0.000000e+000 vertex 1.482020e+001 1.989763e+000 2.701867e+000 vertex 1.482020e+001 1.561400e+000 2.401924e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 1.087460e+000 2.180922e+000 vertex 1.482020e+001 3.378025e+000 0.000000e+000 vertex 1.482020e+001 1.561400e+000 2.401924e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 1.087460e+000 2.180922e+000 vertex 1.482020e+001 6.140000e-002 0.000000e+000 vertex 1.482020e+001 3.378025e+000 0.000000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 1.087460e+000 2.180922e+000 vertex 1.482020e+001 5.823445e-001 2.045577e+000 vertex 1.482020e+001 6.140000e-002 0.000000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 6.140000e-002 0.000000e+000 vertex 1.482020e+001 5.823445e-001 2.045577e+000 vertex 1.482020e+001 6.140000e-002 2.000000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -4.595445e-001 2.045577e+000 vertex 1.482020e+001 6.140000e-002 0.000000e+000 vertex 1.482020e+001 6.140000e-002 2.000000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -4.595445e-001 2.045577e+000 vertex 1.482020e+001 -8.068409e-001 7.596123e-002 vertex 1.482020e+001 6.140000e-002 0.000000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -4.595445e-001 2.045577e+000 vertex 1.482020e+001 -9.646604e-001 2.180922e+000 vertex 1.482020e+001 -8.068409e-001 7.596123e-002 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -8.068409e-001 7.596123e-002 vertex 1.482020e+001 -9.646604e-001 2.180922e+000 vertex 1.482020e+001 -1.648701e+000 3.015369e-001 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -1.648701e+000 3.015369e-001 vertex 1.482020e+001 -9.646604e-001 2.180922e+000 vertex 1.482020e+001 -1.438600e+000 2.401924e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -2.438600e+000 6.698730e-001 vertex 1.482020e+001 -1.438600e+000 2.401924e+000 vertex 1.482020e+001 -1.866963e+000 2.701867e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -3.152538e+000 1.169778e+000 vertex 1.482020e+001 -1.866963e+000 2.701867e+000 vertex 1.482020e+001 -2.236733e+000 3.071637e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -3.768822e+000 1.786062e+000 vertex 1.482020e+001 -2.236733e+000 3.071637e+000 vertex 1.482020e+001 -4.268727e+000 2.500000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -3.768822e+000 1.786062e+000 vertex 1.482020e+001 -3.152538e+000 1.169778e+000 vertex 1.482020e+001 -2.236733e+000 3.071637e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -2.236733e+000 3.071637e+000 vertex 1.482020e+001 -2.536676e+000 3.500000e+000 vertex 1.482020e+001 -4.268727e+000 2.500000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -4.268727e+000 2.500000e+000 vertex 1.482020e+001 -2.536676e+000 3.500000e+000 vertex 1.482020e+001 -4.637063e+000 3.289899e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -4.637063e+000 3.289899e+000 vertex 1.482020e+001 -2.536676e+000 3.500000e+000 vertex 1.482020e+001 -2.757678e+000 3.973940e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -4.862639e+000 4.131759e+000 vertex 1.482020e+001 -2.757678e+000 3.973940e+000 vertex 1.482020e+001 -2.893023e+000 4.479055e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -4.938600e+000 5.000000e+000 vertex 1.482020e+001 -2.893023e+000 4.479055e+000 vertex 1.482020e+001 -2.938600e+000 5.000000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -4.862639e+000 5.868241e+000 vertex 1.482020e+001 -4.938600e+000 5.000000e+000 vertex 1.482020e+001 -2.938600e+000 5.000000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 6.061400e+000 5.000000e+000 vertex 1.482020e+001 5.061400e+000 5.000000e+000 vertex 1.482020e+001 5.980711e+000 4.019309e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 5.980711e+000 4.019309e+000 vertex 1.482020e+001 5.061400e+000 5.000000e+000 vertex 1.482020e+001 5.740815e+000 3.064995e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 5.061400e+000 5.000000e+000 vertex 1.482020e+001 4.985439e+000 5.868241e+000 vertex 1.482020e+001 3.015823e+000 5.520945e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 2.561400e+000 9.330127e+000 vertex 1.482020e+001 1.989763e+000 7.298133e+000 vertex 1.482020e+001 3.275338e+000 8.830222e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 2.561400e+000 9.330127e+000 vertex 1.482020e+001 1.771501e+000 9.698463e+000 vertex 1.482020e+001 1.561400e+000 7.598076e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 1.771501e+000 9.698463e+000 vertex 1.482020e+001 9.296409e-001 9.924039e+000 vertex 1.482020e+001 1.087460e+000 7.819078e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 6.140000e-002 1.000000e+001 vertex 1.482020e+001 5.823445e-001 7.954423e+000 vertex 1.482020e+001 9.296409e-001 9.924039e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -8.068409e-001 9.924039e+000 vertex 1.482020e+001 6.140000e-002 8.000000e+000 vertex 1.482020e+001 6.140000e-002 1.000000e+001 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -8.068409e-001 9.924039e+000 vertex 1.482020e+001 -1.648701e+000 9.698463e+000 vertex 1.482020e+001 -4.595445e-001 7.954423e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -1.648701e+000 9.698463e+000 vertex 1.482020e+001 -2.438600e+000 9.330127e+000 vertex 1.482020e+001 -9.646604e-001 7.819078e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -3.768822e+000 8.213938e+000 vertex 1.482020e+001 -4.268727e+000 7.500000e+000 vertex 1.482020e+001 -2.536676e+000 6.500000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -4.938600e+000 5.000000e+000 vertex 1.482020e+001 -4.862639e+000 4.131759e+000 vertex 1.482020e+001 -2.893023e+000 4.479055e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -4.862639e+000 4.131759e+000 vertex 1.482020e+001 -4.637063e+000 3.289899e+000 vertex 1.482020e+001 -2.757678e+000 3.973940e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -2.438600e+000 6.698730e-001 vertex 1.482020e+001 -1.866963e+000 2.701867e+000 vertex 1.482020e+001 -3.152538e+000 1.169778e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 -2.438600e+000 6.698730e-001 vertex 1.482020e+001 -1.648701e+000 3.015369e-001 vertex 1.482020e+001 -1.438600e+000 2.401924e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 3.378025e+000 0.000000e+000 vertex 1.482020e+001 4.150665e+000 6.093379e-001 vertex 1.482020e+001 1.989763e+000 2.701867e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 4.150665e+000 6.093379e-001 vertex 1.482020e+001 4.813319e+000 1.336768e+000 vertex 1.482020e+001 2.359533e+000 3.071637e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 1.482020e+001 4.813319e+000 1.336768e+000 vertex 1.482020e+001 5.348164e+000 2.162726e+000 vertex 1.482020e+001 2.659476e+000 3.500000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.832020e+001 1.706140e+001 5.000000e+000 vertex 3.837337e+001 1.766917e+001 5.000000e+000 vertex 2.657020e+001 1.609249e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.706996e+001 1.574256e+001 5.000000e+000 vertex 3.832020e+001 1.706140e+001 5.000000e+000 vertex 2.657020e+001 1.609249e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.706996e+001 1.574256e+001 5.000000e+000 vertex 3.837337e+001 1.645363e+001 5.000000e+000 vertex 3.832020e+001 1.706140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.706996e+001 1.574256e+001 5.000000e+000 vertex 2.750136e+001 1.531116e+001 5.000000e+000 vertex 3.837337e+001 1.645363e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.837337e+001 1.645363e+001 5.000000e+000 vertex 2.750136e+001 1.531116e+001 5.000000e+000 vertex 3.853128e+001 1.586433e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.853128e+001 1.586433e+001 5.000000e+000 vertex 2.750136e+001 1.531116e+001 5.000000e+000 vertex 2.785129e+001 1.481140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.878911e+001 1.531140e+001 5.000000e+000 vertex 2.785129e+001 1.481140e+001 5.000000e+000 vertex 2.810912e+001 1.425847e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.913904e+001 1.481164e+001 5.000000e+000 vertex 2.810912e+001 1.425847e+001 5.000000e+000 vertex 2.826703e+001 1.366917e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.957044e+001 1.438024e+001 5.000000e+000 vertex 2.826703e+001 1.366917e+001 5.000000e+000 vertex 2.832020e+001 1.306140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.007020e+001 1.403031e+001 5.000000e+000 vertex 2.832020e+001 1.306140e+001 5.000000e+000 vertex 2.826703e+001 1.245363e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.062313e+001 1.377248e+001 5.000000e+000 vertex 2.826703e+001 1.245363e+001 5.000000e+000 vertex 2.810912e+001 1.186433e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.785129e+001 1.131140e+001 5.000000e+000 vertex 4.062313e+001 1.377248e+001 5.000000e+000 vertex 2.810912e+001 1.186433e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.785129e+001 1.131140e+001 5.000000e+000 vertex 4.121243e+001 1.361457e+001 5.000000e+000 vertex 4.062313e+001 1.377248e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.785129e+001 1.131140e+001 5.000000e+000 vertex 2.750136e+001 1.081164e+001 5.000000e+000 vertex 4.121243e+001 1.361457e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.121243e+001 1.361457e+001 5.000000e+000 vertex 2.750136e+001 1.081164e+001 5.000000e+000 vertex 3.482020e+001 6.061400e+000 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.182020e+001 1.356140e+001 5.000000e+000 vertex 3.482020e+001 6.061400e+000 5.000000e+000 vertex 4.982020e+001 5.061400e+000 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.242797e+001 1.361457e+001 5.000000e+000 vertex 4.982020e+001 5.061400e+000 5.000000e+000 vertex 4.301727e+001 1.377248e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.242797e+001 1.361457e+001 5.000000e+000 vertex 4.182020e+001 1.356140e+001 5.000000e+000 vertex 4.982020e+001 5.061400e+000 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.837337e+001 1.766917e+001 5.000000e+000 vertex 3.853128e+001 1.825847e+001 5.000000e+000 vertex 2.601727e+001 1.635032e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.657020e+001 1.609249e+001 5.000000e+000 vertex 3.837337e+001 1.766917e+001 5.000000e+000 vertex 2.601727e+001 1.635032e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.878911e+001 1.881140e+001 5.000000e+000 vertex 2.601727e+001 1.635032e+001 5.000000e+000 vertex 3.853128e+001 1.825847e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.878911e+001 1.881140e+001 5.000000e+000 vertex 2.542797e+001 1.650823e+001 5.000000e+000 vertex 2.601727e+001 1.635032e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.878911e+001 1.881140e+001 5.000000e+000 vertex 3.913904e+001 1.931116e+001 5.000000e+000 vertex 2.542797e+001 1.650823e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.542797e+001 1.650823e+001 5.000000e+000 vertex 3.913904e+001 1.931116e+001 5.000000e+000 vertex 3.957044e+001 1.974256e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.482020e+001 1.656140e+001 5.000000e+000 vertex 3.957044e+001 1.974256e+001 5.000000e+000 vertex 4.007020e+001 2.009249e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 9.570200e+000 2.009249e+001 5.000000e+000 vertex 4.007020e+001 2.009249e+001 5.000000e+000 vertex 9.017271e+000 2.035032e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 9.570200e+000 2.009249e+001 5.000000e+000 vertex 2.482020e+001 1.656140e+001 5.000000e+000 vertex 4.007020e+001 2.009249e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 9.570200e+000 2.009249e+001 5.000000e+000 vertex 1.006996e+001 1.974256e+001 5.000000e+000 vertex 2.482020e+001 1.656140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.482020e+001 1.656140e+001 5.000000e+000 vertex 1.006996e+001 1.974256e+001 5.000000e+000 vertex 2.421243e+001 1.650823e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.421243e+001 1.650823e+001 5.000000e+000 vertex 1.006996e+001 1.974256e+001 5.000000e+000 vertex 1.050136e+001 1.931116e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 1.085129e+001 1.881140e+001 5.000000e+000 vertex 2.421243e+001 1.650823e+001 5.000000e+000 vertex 1.050136e+001 1.931116e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 1.085129e+001 1.881140e+001 5.000000e+000 vertex 2.362313e+001 1.635032e+001 5.000000e+000 vertex 2.421243e+001 1.650823e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 1.085129e+001 1.881140e+001 5.000000e+000 vertex 1.110912e+001 1.825847e+001 5.000000e+000 vertex 2.362313e+001 1.635032e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.362313e+001 1.635032e+001 5.000000e+000 vertex 1.110912e+001 1.825847e+001 5.000000e+000 vertex 1.126703e+001 1.766917e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.307020e+001 1.609249e+001 5.000000e+000 vertex 1.126703e+001 1.766917e+001 5.000000e+000 vertex 1.132020e+001 1.706140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.257044e+001 1.574256e+001 5.000000e+000 vertex 1.132020e+001 1.706140e+001 5.000000e+000 vertex 1.126703e+001 1.645363e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.213904e+001 1.531116e+001 5.000000e+000 vertex 1.126703e+001 1.645363e+001 5.000000e+000 vertex 1.110912e+001 1.586433e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.178911e+001 1.481140e+001 5.000000e+000 vertex 1.110912e+001 1.586433e+001 5.000000e+000 vertex 1.085129e+001 1.531140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.153128e+001 1.425847e+001 5.000000e+000 vertex 1.085129e+001 1.531140e+001 5.000000e+000 vertex 1.050136e+001 1.481164e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.137337e+001 1.366917e+001 5.000000e+000 vertex 1.050136e+001 1.481164e+001 5.000000e+000 vertex 1.006996e+001 1.438024e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.132020e+001 1.306140e+001 5.000000e+000 vertex 1.006996e+001 1.438024e+001 5.000000e+000 vertex 9.570200e+000 1.403031e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.137337e+001 1.245363e+001 5.000000e+000 vertex 9.570200e+000 1.403031e+001 5.000000e+000 vertex 9.017271e+000 1.377248e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.153128e+001 1.186433e+001 5.000000e+000 vertex 9.017271e+000 1.377248e+001 5.000000e+000 vertex 2.178911e+001 1.131140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.153128e+001 1.186433e+001 5.000000e+000 vertex 2.137337e+001 1.245363e+001 5.000000e+000 vertex 9.017271e+000 1.377248e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.007020e+001 2.009249e+001 5.000000e+000 vertex 4.062313e+001 2.035032e+001 5.000000e+000 vertex 9.017271e+000 2.035032e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 9.017271e+000 2.035032e+001 5.000000e+000 vertex 4.062313e+001 2.035032e+001 5.000000e+000 vertex -1.798000e-001 2.506140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 8.427969e+000 2.050823e+001 5.000000e+000 vertex -1.798000e-001 2.506140e+001 5.000000e+000 vertex 7.820200e+000 2.056140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 8.427969e+000 2.050823e+001 5.000000e+000 vertex 9.017271e+000 2.035032e+001 5.000000e+000 vertex -1.798000e-001 2.506140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.121243e+001 2.050823e+001 5.000000e+000 vertex 4.982020e+001 2.506140e+001 5.000000e+000 vertex 4.062313e+001 2.035032e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.121243e+001 2.050823e+001 5.000000e+000 vertex 4.182020e+001 2.056140e+001 5.000000e+000 vertex 4.982020e+001 2.506140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.982020e+001 2.506140e+001 5.000000e+000 vertex 4.182020e+001 2.056140e+001 5.000000e+000 vertex 4.242797e+001 2.050823e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.301727e+001 2.035032e+001 5.000000e+000 vertex 4.982020e+001 2.506140e+001 5.000000e+000 vertex 4.242797e+001 2.050823e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.301727e+001 2.035032e+001 5.000000e+000 vertex 4.357020e+001 2.009249e+001 5.000000e+000 vertex 4.982020e+001 2.506140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.982020e+001 2.506140e+001 5.000000e+000 vertex 4.357020e+001 2.009249e+001 5.000000e+000 vertex 4.406996e+001 1.974256e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.450136e+001 1.931116e+001 5.000000e+000 vertex 4.982020e+001 2.506140e+001 5.000000e+000 vertex 4.406996e+001 1.974256e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.450136e+001 1.931116e+001 5.000000e+000 vertex 4.485129e+001 1.881140e+001 5.000000e+000 vertex 4.982020e+001 2.506140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.982020e+001 2.506140e+001 5.000000e+000 vertex 4.485129e+001 1.881140e+001 5.000000e+000 vertex 4.510912e+001 1.825847e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.526703e+001 1.766917e+001 5.000000e+000 vertex 4.982020e+001 2.506140e+001 5.000000e+000 vertex 4.510912e+001 1.825847e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.526703e+001 1.766917e+001 5.000000e+000 vertex 4.532020e+001 1.706140e+001 5.000000e+000 vertex 4.982020e+001 2.506140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.982020e+001 2.506140e+001 5.000000e+000 vertex 4.532020e+001 1.706140e+001 5.000000e+000 vertex 4.526703e+001 1.645363e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.982020e+001 5.061400e+000 5.000000e+000 vertex 4.526703e+001 1.645363e+001 5.000000e+000 vertex 4.510912e+001 1.586433e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.485129e+001 1.531140e+001 5.000000e+000 vertex 4.982020e+001 5.061400e+000 5.000000e+000 vertex 4.510912e+001 1.586433e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.485129e+001 1.531140e+001 5.000000e+000 vertex 4.450136e+001 1.481164e+001 5.000000e+000 vertex 4.982020e+001 5.061400e+000 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.982020e+001 5.061400e+000 5.000000e+000 vertex 4.450136e+001 1.481164e+001 5.000000e+000 vertex 4.406996e+001 1.438024e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.357020e+001 1.403031e+001 5.000000e+000 vertex 4.982020e+001 5.061400e+000 5.000000e+000 vertex 4.406996e+001 1.438024e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.357020e+001 1.403031e+001 5.000000e+000 vertex 4.301727e+001 1.377248e+001 5.000000e+000 vertex 4.982020e+001 5.061400e+000 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.121243e+001 1.361457e+001 5.000000e+000 vertex 3.482020e+001 6.061400e+000 5.000000e+000 vertex 4.182020e+001 1.356140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.062313e+001 1.377248e+001 5.000000e+000 vertex 4.007020e+001 1.403031e+001 5.000000e+000 vertex 2.826703e+001 1.245363e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.957044e+001 1.438024e+001 5.000000e+000 vertex 2.832020e+001 1.306140e+001 5.000000e+000 vertex 4.007020e+001 1.403031e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.957044e+001 1.438024e+001 5.000000e+000 vertex 3.913904e+001 1.481164e+001 5.000000e+000 vertex 2.826703e+001 1.366917e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.878911e+001 1.531140e+001 5.000000e+000 vertex 2.810912e+001 1.425847e+001 5.000000e+000 vertex 3.913904e+001 1.481164e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.878911e+001 1.531140e+001 5.000000e+000 vertex 3.853128e+001 1.586433e+001 5.000000e+000 vertex 2.785129e+001 1.481140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.137337e+001 1.366917e+001 5.000000e+000 vertex 1.006996e+001 1.438024e+001 5.000000e+000 vertex 2.132020e+001 1.306140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.137337e+001 1.366917e+001 5.000000e+000 vertex 2.153128e+001 1.425847e+001 5.000000e+000 vertex 1.050136e+001 1.481164e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.178911e+001 1.481140e+001 5.000000e+000 vertex 1.085129e+001 1.531140e+001 5.000000e+000 vertex 2.153128e+001 1.425847e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.213904e+001 1.531116e+001 5.000000e+000 vertex 1.110912e+001 1.586433e+001 5.000000e+000 vertex 2.178911e+001 1.481140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.213904e+001 1.531116e+001 5.000000e+000 vertex 2.257044e+001 1.574256e+001 5.000000e+000 vertex 1.126703e+001 1.645363e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.257044e+001 1.574256e+001 5.000000e+000 vertex 2.307020e+001 1.609249e+001 5.000000e+000 vertex 1.132020e+001 1.706140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.307020e+001 1.609249e+001 5.000000e+000 vertex 2.362313e+001 1.635032e+001 5.000000e+000 vertex 1.126703e+001 1.766917e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.482020e+001 1.656140e+001 5.000000e+000 vertex 2.542797e+001 1.650823e+001 5.000000e+000 vertex 3.957044e+001 1.974256e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.750136e+001 1.081164e+001 5.000000e+000 vertex 2.706996e+001 1.038024e+001 5.000000e+000 vertex 3.482020e+001 6.061400e+000 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.482020e+001 6.061400e+000 5.000000e+000 vertex 2.706996e+001 1.038024e+001 5.000000e+000 vertex 2.657020e+001 1.003031e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.601727e+001 9.772476e+000 5.000000e+000 vertex 3.482020e+001 6.061400e+000 5.000000e+000 vertex 2.657020e+001 1.003031e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.601727e+001 9.772476e+000 5.000000e+000 vertex 2.542797e+001 9.614573e+000 5.000000e+000 vertex 3.482020e+001 6.061400e+000 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.482020e+001 6.061400e+000 5.000000e+000 vertex 2.542797e+001 9.614573e+000 5.000000e+000 vertex 2.482020e+001 9.561400e+000 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 1.482020e+001 6.061400e+000 5.000000e+000 vertex 2.482020e+001 9.561400e+000 5.000000e+000 vertex 2.421243e+001 9.614573e+000 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.362313e+001 9.772476e+000 5.000000e+000 vertex 1.482020e+001 6.061400e+000 5.000000e+000 vertex 2.421243e+001 9.614573e+000 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.362313e+001 9.772476e+000 5.000000e+000 vertex 2.307020e+001 1.003031e+001 5.000000e+000 vertex 1.482020e+001 6.061400e+000 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 1.482020e+001 6.061400e+000 5.000000e+000 vertex 2.307020e+001 1.003031e+001 5.000000e+000 vertex 2.257044e+001 1.038024e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.213904e+001 1.081164e+001 5.000000e+000 vertex 1.482020e+001 6.061400e+000 5.000000e+000 vertex 2.257044e+001 1.038024e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.213904e+001 1.081164e+001 5.000000e+000 vertex 8.427969e+000 1.361457e+001 5.000000e+000 vertex 1.482020e+001 6.061400e+000 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.213904e+001 1.081164e+001 5.000000e+000 vertex 2.178911e+001 1.131140e+001 5.000000e+000 vertex 8.427969e+000 1.361457e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 8.427969e+000 1.361457e+001 5.000000e+000 vertex 2.178911e+001 1.131140e+001 5.000000e+000 vertex 9.017271e+000 1.377248e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 2.132020e+001 1.306140e+001 5.000000e+000 vertex 9.570200e+000 1.403031e+001 5.000000e+000 vertex 2.137337e+001 1.245363e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.373373e+000 1.766917e+001 5.000000e+000 vertex -1.798000e-001 2.506140e+001 5.000000e+000 vertex 4.320200e+000 1.706140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.373373e+000 1.766917e+001 5.000000e+000 vertex 4.531276e+000 1.825847e+001 5.000000e+000 vertex -1.798000e-001 2.506140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex -1.798000e-001 2.506140e+001 5.000000e+000 vertex 4.531276e+000 1.825847e+001 5.000000e+000 vertex 4.789111e+000 1.881140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 5.139044e+000 1.931116e+001 5.000000e+000 vertex -1.798000e-001 2.506140e+001 5.000000e+000 vertex 4.789111e+000 1.881140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 5.139044e+000 1.931116e+001 5.000000e+000 vertex 5.570443e+000 1.974256e+001 5.000000e+000 vertex -1.798000e-001 2.506140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex -1.798000e-001 2.506140e+001 5.000000e+000 vertex 5.570443e+000 1.974256e+001 5.000000e+000 vertex 6.070200e+000 2.009249e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 6.623129e+000 2.035032e+001 5.000000e+000 vertex -1.798000e-001 2.506140e+001 5.000000e+000 vertex 6.070200e+000 2.009249e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 6.623129e+000 2.035032e+001 5.000000e+000 vertex 7.212431e+000 2.050823e+001 5.000000e+000 vertex -1.798000e-001 2.506140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex -1.798000e-001 2.506140e+001 5.000000e+000 vertex 7.212431e+000 2.050823e+001 5.000000e+000 vertex 7.820200e+000 2.056140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 8.427969e+000 1.361457e+001 5.000000e+000 vertex 7.820200e+000 1.356140e+001 5.000000e+000 vertex 1.482020e+001 6.061400e+000 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 1.482020e+001 6.061400e+000 5.000000e+000 vertex 7.820200e+000 1.356140e+001 5.000000e+000 vertex -1.798000e-001 5.061400e+000 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 1.482020e+001 5.061400e+000 5.000000e+000 vertex 1.482020e+001 6.061400e+000 5.000000e+000 vertex -1.798000e-001 5.061400e+000 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 7.212431e+000 1.361457e+001 5.000000e+000 vertex -1.798000e-001 5.061400e+000 5.000000e+000 vertex 7.820200e+000 1.356140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 7.212431e+000 1.361457e+001 5.000000e+000 vertex 6.623129e+000 1.377248e+001 5.000000e+000 vertex -1.798000e-001 5.061400e+000 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex -1.798000e-001 5.061400e+000 5.000000e+000 vertex 6.623129e+000 1.377248e+001 5.000000e+000 vertex 6.070200e+000 1.403031e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 5.570443e+000 1.438024e+001 5.000000e+000 vertex -1.798000e-001 5.061400e+000 5.000000e+000 vertex 6.070200e+000 1.403031e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 5.570443e+000 1.438024e+001 5.000000e+000 vertex 5.139044e+000 1.481164e+001 5.000000e+000 vertex -1.798000e-001 5.061400e+000 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex -1.798000e-001 5.061400e+000 5.000000e+000 vertex 5.139044e+000 1.481164e+001 5.000000e+000 vertex 4.789111e+000 1.531140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.531276e+000 1.586433e+001 5.000000e+000 vertex -1.798000e-001 5.061400e+000 5.000000e+000 vertex 4.789111e+000 1.531140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.531276e+000 1.586433e+001 5.000000e+000 vertex 4.373373e+000 1.645363e+001 5.000000e+000 vertex -1.798000e-001 5.061400e+000 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex -1.798000e-001 5.061400e+000 5.000000e+000 vertex 4.373373e+000 1.645363e+001 5.000000e+000 vertex -1.798000e-001 2.506140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex -1.798000e-001 2.506140e+001 5.000000e+000 vertex 4.373373e+000 1.645363e+001 5.000000e+000 vertex 4.320200e+000 1.706140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 1.482020e+001 6.061400e+000 5.000000e+000 vertex 3.482020e+001 6.061400e+000 5.000000e+000 vertex 2.482020e+001 9.561400e+000 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 3.482020e+001 6.061400e+000 5.000000e+000 vertex 3.482020e+001 5.061400e+000 5.000000e+000 vertex 4.982020e+001 5.061400e+000 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 4.982020e+001 2.506140e+001 5.000000e+000 vertex 4.526703e+001 1.645363e+001 5.000000e+000 vertex 4.982020e+001 5.061400e+000 5.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex -1.798000e-001 2.506140e+001 5.000000e+000 vertex 4.062313e+001 2.035032e+001 5.000000e+000 vertex 4.982020e+001 2.506140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 9.961947e-001 8.715574e-002 outer loop vertex 3.482020e+001 5.061400e+000 5.000000e+000 vertex 3.482020e+001 4.985439e+000 5.868241e+000 vertex 4.982020e+001 5.061400e+000 5.000000e+000 endloop endfacet facet normal 0.000000e+000 9.961947e-001 8.715574e-002 outer loop vertex 4.982020e+001 5.061400e+000 5.000000e+000 vertex 3.482020e+001 4.985439e+000 5.868241e+000 vertex 4.982020e+001 4.985439e+000 5.868241e+000 endloop endfacet facet normal 0.000000e+000 9.659258e-001 2.588190e-001 outer loop vertex 4.982020e+001 4.985439e+000 5.868241e+000 vertex 3.482020e+001 4.985439e+000 5.868241e+000 vertex 3.482020e+001 4.759863e+000 6.710101e+000 endloop endfacet facet normal 0.000000e+000 9.063078e-001 4.226183e-001 outer loop vertex 4.982020e+001 4.759863e+000 6.710101e+000 vertex 3.482020e+001 4.759863e+000 6.710101e+000 vertex 3.482020e+001 4.391527e+000 7.500000e+000 endloop endfacet facet normal 0.000000e+000 8.191520e-001 5.735764e-001 outer loop vertex 4.982020e+001 4.391527e+000 7.500000e+000 vertex 3.482020e+001 4.391527e+000 7.500000e+000 vertex 3.482020e+001 3.891622e+000 8.213938e+000 endloop endfacet facet normal 0.000000e+000 7.071068e-001 7.071068e-001 outer loop vertex 4.982020e+001 3.891622e+000 8.213938e+000 vertex 3.482020e+001 3.891622e+000 8.213938e+000 vertex 3.482020e+001 3.275338e+000 8.830222e+000 endloop endfacet facet normal 0.000000e+000 5.735764e-001 8.191520e-001 outer loop vertex 4.982020e+001 3.275338e+000 8.830222e+000 vertex 3.482020e+001 3.275338e+000 8.830222e+000 vertex 3.482020e+001 2.561400e+000 9.330127e+000 endloop endfacet facet normal 0.000000e+000 4.226183e-001 9.063078e-001 outer loop vertex 4.982020e+001 2.561400e+000 9.330127e+000 vertex 3.482020e+001 2.561400e+000 9.330127e+000 vertex 3.482020e+001 1.771501e+000 9.698463e+000 endloop endfacet facet normal 0.000000e+000 2.588190e-001 9.659258e-001 outer loop vertex 4.982020e+001 1.771501e+000 9.698463e+000 vertex 3.482020e+001 1.771501e+000 9.698463e+000 vertex 3.482020e+001 9.296409e-001 9.924039e+000 endloop endfacet facet normal 0.000000e+000 8.715574e-002 9.961947e-001 outer loop vertex 4.982020e+001 9.296409e-001 9.924039e+000 vertex 3.482020e+001 9.296409e-001 9.924039e+000 vertex 3.482020e+001 6.140000e-002 1.000000e+001 endloop endfacet facet normal 0.000000e+000 -8.715574e-002 9.961947e-001 outer loop vertex 4.982020e+001 6.140000e-002 1.000000e+001 vertex 3.482020e+001 6.140000e-002 1.000000e+001 vertex 3.482020e+001 -8.068409e-001 9.924039e+000 endloop endfacet facet normal 0.000000e+000 -2.588190e-001 9.659258e-001 outer loop vertex 4.982020e+001 -8.068409e-001 9.924039e+000 vertex 3.482020e+001 -8.068409e-001 9.924039e+000 vertex 3.482020e+001 -1.648701e+000 9.698463e+000 endloop endfacet facet normal 0.000000e+000 -4.226183e-001 9.063078e-001 outer loop vertex 4.982020e+001 -1.648701e+000 9.698463e+000 vertex 3.482020e+001 -1.648701e+000 9.698463e+000 vertex 3.482020e+001 -2.438600e+000 9.330127e+000 endloop endfacet facet normal 0.000000e+000 -5.735764e-001 8.191520e-001 outer loop vertex 4.982020e+001 -2.438600e+000 9.330127e+000 vertex 3.482020e+001 -2.438600e+000 9.330127e+000 vertex 3.482020e+001 -3.152538e+000 8.830222e+000 endloop endfacet facet normal 0.000000e+000 -7.071068e-001 7.071068e-001 outer loop vertex 4.982020e+001 -3.152538e+000 8.830222e+000 vertex 3.482020e+001 -3.152538e+000 8.830222e+000 vertex 3.482020e+001 -3.768822e+000 8.213938e+000 endloop endfacet facet normal 0.000000e+000 -8.191520e-001 5.735764e-001 outer loop vertex 4.982020e+001 -3.768822e+000 8.213938e+000 vertex 3.482020e+001 -3.768822e+000 8.213938e+000 vertex 3.482020e+001 -4.268727e+000 7.500000e+000 endloop endfacet facet normal 0.000000e+000 -9.063078e-001 4.226183e-001 outer loop vertex 4.982020e+001 -4.268727e+000 7.500000e+000 vertex 3.482020e+001 -4.268727e+000 7.500000e+000 vertex 3.482020e+001 -4.637063e+000 6.710101e+000 endloop endfacet facet normal 0.000000e+000 -9.659258e-001 2.588190e-001 outer loop vertex 4.982020e+001 -4.637063e+000 6.710101e+000 vertex 3.482020e+001 -4.637063e+000 6.710101e+000 vertex 3.482020e+001 -4.862639e+000 5.868241e+000 endloop endfacet facet normal 0.000000e+000 -9.961947e-001 8.715574e-002 outer loop vertex 4.982020e+001 -4.862639e+000 5.868241e+000 vertex 3.482020e+001 -4.862639e+000 5.868241e+000 vertex 3.482020e+001 -4.938600e+000 5.000000e+000 endloop endfacet facet normal 0.000000e+000 -9.961947e-001 -8.715574e-002 outer loop vertex 4.982020e+001 -4.938600e+000 5.000000e+000 vertex 3.482020e+001 -4.938600e+000 5.000000e+000 vertex 3.482020e+001 -4.862639e+000 4.131759e+000 endloop endfacet facet normal 0.000000e+000 -9.659258e-001 -2.588190e-001 outer loop vertex 4.982020e+001 -4.862639e+000 4.131759e+000 vertex 3.482020e+001 -4.862639e+000 4.131759e+000 vertex 3.482020e+001 -4.637063e+000 3.289899e+000 endloop endfacet facet normal 0.000000e+000 -9.063078e-001 -4.226183e-001 outer loop vertex 4.982020e+001 -4.637063e+000 3.289899e+000 vertex 3.482020e+001 -4.637063e+000 3.289899e+000 vertex 3.482020e+001 -4.268727e+000 2.500000e+000 endloop endfacet facet normal 0.000000e+000 -8.191520e-001 -5.735764e-001 outer loop vertex 4.982020e+001 -4.268727e+000 2.500000e+000 vertex 3.482020e+001 -4.268727e+000 2.500000e+000 vertex 3.482020e+001 -3.768822e+000 1.786062e+000 endloop endfacet facet normal 0.000000e+000 -7.071068e-001 -7.071068e-001 outer loop vertex 4.982020e+001 -3.768822e+000 1.786062e+000 vertex 3.482020e+001 -3.768822e+000 1.786062e+000 vertex 3.482020e+001 -3.152538e+000 1.169778e+000 endloop endfacet facet normal 0.000000e+000 -5.735764e-001 -8.191520e-001 outer loop vertex 4.982020e+001 -3.152538e+000 1.169778e+000 vertex 3.482020e+001 -3.152538e+000 1.169778e+000 vertex 3.482020e+001 -2.438600e+000 6.698730e-001 endloop endfacet facet normal 0.000000e+000 -4.226183e-001 -9.063078e-001 outer loop vertex 4.982020e+001 -2.438600e+000 6.698730e-001 vertex 3.482020e+001 -2.438600e+000 6.698730e-001 vertex 3.482020e+001 -1.648701e+000 3.015369e-001 endloop endfacet facet normal 0.000000e+000 -2.588190e-001 -9.659258e-001 outer loop vertex 4.982020e+001 -1.648701e+000 3.015369e-001 vertex 3.482020e+001 -1.648701e+000 3.015369e-001 vertex 3.482020e+001 -8.068409e-001 7.596123e-002 endloop endfacet facet normal 0.000000e+000 -8.715574e-002 -9.961947e-001 outer loop vertex 4.982020e+001 -8.068409e-001 7.596123e-002 vertex 3.482020e+001 -8.068409e-001 7.596123e-002 vertex 3.482020e+001 6.140000e-002 0.000000e+000 endloop endfacet facet normal -5.124559e-017 -8.715574e-002 -9.961947e-001 outer loop vertex 4.982020e+001 6.140000e-002 -8.881784e-016 vertex 4.982020e+001 -8.068409e-001 7.596123e-002 vertex 3.482020e+001 6.140000e-002 0.000000e+000 endloop endfacet facet normal 0.000000e+000 -2.588190e-001 -9.659258e-001 outer loop vertex 4.982020e+001 -8.068409e-001 7.596123e-002 vertex 4.982020e+001 -1.648701e+000 3.015369e-001 vertex 3.482020e+001 -8.068409e-001 7.596123e-002 endloop endfacet facet normal 0.000000e+000 -4.226183e-001 -9.063078e-001 outer loop vertex 4.982020e+001 -1.648701e+000 3.015369e-001 vertex 4.982020e+001 -2.438600e+000 6.698730e-001 vertex 3.482020e+001 -1.648701e+000 3.015369e-001 endloop endfacet facet normal 0.000000e+000 -5.735764e-001 -8.191520e-001 outer loop vertex 4.982020e+001 -2.438600e+000 6.698730e-001 vertex 4.982020e+001 -3.152538e+000 1.169778e+000 vertex 3.482020e+001 -2.438600e+000 6.698730e-001 endloop endfacet facet normal 0.000000e+000 -7.071068e-001 -7.071068e-001 outer loop vertex 4.982020e+001 -3.152538e+000 1.169778e+000 vertex 4.982020e+001 -3.768822e+000 1.786062e+000 vertex 3.482020e+001 -3.152538e+000 1.169778e+000 endloop endfacet facet normal 0.000000e+000 -8.191520e-001 -5.735764e-001 outer loop vertex 4.982020e+001 -3.768822e+000 1.786062e+000 vertex 4.982020e+001 -4.268727e+000 2.500000e+000 vertex 3.482020e+001 -3.768822e+000 1.786062e+000 endloop endfacet facet normal 0.000000e+000 -9.063078e-001 -4.226183e-001 outer loop vertex 4.982020e+001 -4.268727e+000 2.500000e+000 vertex 4.982020e+001 -4.637063e+000 3.289899e+000 vertex 3.482020e+001 -4.268727e+000 2.500000e+000 endloop endfacet facet normal 0.000000e+000 -9.659258e-001 -2.588190e-001 outer loop vertex 4.982020e+001 -4.637063e+000 3.289899e+000 vertex 4.982020e+001 -4.862639e+000 4.131759e+000 vertex 3.482020e+001 -4.637063e+000 3.289899e+000 endloop endfacet facet normal 0.000000e+000 -9.961947e-001 -8.715574e-002 outer loop vertex 4.982020e+001 -4.862639e+000 4.131759e+000 vertex 4.982020e+001 -4.938600e+000 5.000000e+000 vertex 3.482020e+001 -4.862639e+000 4.131759e+000 endloop endfacet facet normal 0.000000e+000 -9.961947e-001 8.715574e-002 outer loop vertex 4.982020e+001 -4.938600e+000 5.000000e+000 vertex 4.982020e+001 -4.862639e+000 5.868241e+000 vertex 3.482020e+001 -4.938600e+000 5.000000e+000 endloop endfacet facet normal 0.000000e+000 -9.659258e-001 2.588190e-001 outer loop vertex 4.982020e+001 -4.862639e+000 5.868241e+000 vertex 4.982020e+001 -4.637063e+000 6.710101e+000 vertex 3.482020e+001 -4.862639e+000 5.868241e+000 endloop endfacet facet normal 0.000000e+000 -9.063078e-001 4.226183e-001 outer loop vertex 4.982020e+001 -4.637063e+000 6.710101e+000 vertex 4.982020e+001 -4.268727e+000 7.500000e+000 vertex 3.482020e+001 -4.637063e+000 6.710101e+000 endloop endfacet facet normal 0.000000e+000 -8.191520e-001 5.735764e-001 outer loop vertex 4.982020e+001 -4.268727e+000 7.500000e+000 vertex 4.982020e+001 -3.768822e+000 8.213938e+000 vertex 3.482020e+001 -4.268727e+000 7.500000e+000 endloop endfacet facet normal 0.000000e+000 -7.071068e-001 7.071068e-001 outer loop vertex 4.982020e+001 -3.768822e+000 8.213938e+000 vertex 4.982020e+001 -3.152538e+000 8.830222e+000 vertex 3.482020e+001 -3.768822e+000 8.213938e+000 endloop endfacet facet normal 0.000000e+000 -5.735764e-001 8.191520e-001 outer loop vertex 4.982020e+001 -3.152538e+000 8.830222e+000 vertex 4.982020e+001 -2.438600e+000 9.330127e+000 vertex 3.482020e+001 -3.152538e+000 8.830222e+000 endloop endfacet facet normal 0.000000e+000 -4.226183e-001 9.063078e-001 outer loop vertex 4.982020e+001 -2.438600e+000 9.330127e+000 vertex 4.982020e+001 -1.648701e+000 9.698463e+000 vertex 3.482020e+001 -2.438600e+000 9.330127e+000 endloop endfacet facet normal 0.000000e+000 -2.588190e-001 9.659258e-001 outer loop vertex 4.982020e+001 -1.648701e+000 9.698463e+000 vertex 4.982020e+001 -8.068409e-001 9.924039e+000 vertex 3.482020e+001 -1.648701e+000 9.698463e+000 endloop endfacet facet normal 0.000000e+000 -8.715574e-002 9.961947e-001 outer loop vertex 4.982020e+001 -8.068409e-001 9.924039e+000 vertex 4.982020e+001 6.140000e-002 1.000000e+001 vertex 3.482020e+001 -8.068409e-001 9.924039e+000 endloop endfacet facet normal 0.000000e+000 8.715574e-002 9.961947e-001 outer loop vertex 4.982020e+001 6.140000e-002 1.000000e+001 vertex 4.982020e+001 9.296409e-001 9.924039e+000 vertex 3.482020e+001 6.140000e-002 1.000000e+001 endloop endfacet facet normal 0.000000e+000 2.588190e-001 9.659258e-001 outer loop vertex 4.982020e+001 9.296409e-001 9.924039e+000 vertex 4.982020e+001 1.771501e+000 9.698463e+000 vertex 3.482020e+001 9.296409e-001 9.924039e+000 endloop endfacet facet normal 0.000000e+000 4.226183e-001 9.063078e-001 outer loop vertex 4.982020e+001 1.771501e+000 9.698463e+000 vertex 4.982020e+001 2.561400e+000 9.330127e+000 vertex 3.482020e+001 1.771501e+000 9.698463e+000 endloop endfacet facet normal 0.000000e+000 5.735764e-001 8.191520e-001 outer loop vertex 4.982020e+001 2.561400e+000 9.330127e+000 vertex 4.982020e+001 3.275338e+000 8.830222e+000 vertex 3.482020e+001 2.561400e+000 9.330127e+000 endloop endfacet facet normal 0.000000e+000 7.071068e-001 7.071068e-001 outer loop vertex 4.982020e+001 3.275338e+000 8.830222e+000 vertex 4.982020e+001 3.891622e+000 8.213938e+000 vertex 3.482020e+001 3.275338e+000 8.830222e+000 endloop endfacet facet normal 0.000000e+000 8.191520e-001 5.735764e-001 outer loop vertex 4.982020e+001 3.891622e+000 8.213938e+000 vertex 4.982020e+001 4.391527e+000 7.500000e+000 vertex 3.482020e+001 3.891622e+000 8.213938e+000 endloop endfacet facet normal 0.000000e+000 9.063078e-001 4.226183e-001 outer loop vertex 4.982020e+001 4.391527e+000 7.500000e+000 vertex 4.982020e+001 4.759863e+000 6.710101e+000 vertex 3.482020e+001 4.391527e+000 7.500000e+000 endloop endfacet facet normal 0.000000e+000 9.659258e-001 2.588190e-001 outer loop vertex 4.982020e+001 4.759863e+000 6.710101e+000 vertex 4.982020e+001 4.985439e+000 5.868241e+000 vertex 3.482020e+001 4.759863e+000 6.710101e+000 endloop endfacet facet normal 1.432567e-016 1.253334e-017 -1.000000e+000 outer loop vertex 4.428222e+001 1.749552e+001 -8.881784e-016 vertex 4.982020e+001 2.506140e+001 0.000000e+000 vertex 4.432020e+001 1.706140e+001 -8.881784e-016 endloop endfacet facet normal 1.174024e-016 3.145787e-017 -1.000000e+000 outer loop vertex 4.428222e+001 1.749552e+001 -8.881784e-016 vertex 4.416943e+001 1.791645e+001 -8.881784e-016 vertex 4.982020e+001 2.506140e+001 0.000000e+000 endloop endfacet facet normal 9.887861e-017 4.610785e-017 -1.000000e+000 outer loop vertex 4.982020e+001 2.506140e+001 0.000000e+000 vertex 4.416943e+001 1.791645e+001 -8.881784e-016 vertex 4.398526e+001 1.831140e+001 -8.881784e-016 endloop endfacet facet normal 8.409715e-017 5.888546e-017 -1.000000e+000 outer loop vertex 4.373531e+001 1.866837e+001 -8.881784e-016 vertex 4.982020e+001 2.506140e+001 0.000000e+000 vertex 4.398526e+001 1.831140e+001 -8.881784e-016 endloop endfacet facet normal 7.118001e-017 7.118001e-017 -1.000000e+000 outer loop vertex 4.373531e+001 1.866837e+001 -8.881784e-016 vertex 4.342717e+001 1.897651e+001 -8.881784e-016 vertex 4.982020e+001 2.506140e+001 0.000000e+000 endloop endfacet facet normal 5.888546e-017 8.409715e-017 -1.000000e+000 outer loop vertex 4.982020e+001 2.506140e+001 0.000000e+000 vertex 4.342717e+001 1.897651e+001 -8.881784e-016 vertex 4.307020e+001 1.922646e+001 -8.881784e-016 endloop endfacet facet normal 4.610785e-017 9.887861e-017 -1.000000e+000 outer loop vertex 4.267525e+001 1.941063e+001 -8.881784e-016 vertex 4.982020e+001 2.506140e+001 0.000000e+000 vertex 4.307020e+001 1.922646e+001 -8.881784e-016 endloop endfacet facet normal 3.145787e-017 1.174024e-016 -1.000000e+000 outer loop vertex 4.267525e+001 1.941063e+001 -8.881784e-016 vertex 4.225432e+001 1.952342e+001 -8.881784e-016 vertex 4.982020e+001 2.506140e+001 0.000000e+000 endloop endfacet facet normal 1.253334e-017 1.432567e-016 -1.000000e+000 outer loop vertex 4.982020e+001 2.506140e+001 0.000000e+000 vertex 4.225432e+001 1.952342e+001 -8.881784e-016 vertex 4.182020e+001 1.956140e+001 -8.881784e-016 endloop endfacet facet normal -1.618835e-017 1.850337e-016 -1.000000e+000 outer loop vertex 4.138608e+001 1.952342e+001 -8.881784e-016 vertex 4.982020e+001 2.506140e+001 0.000000e+000 vertex 4.182020e+001 1.956140e+001 -8.881784e-016 endloop endfacet facet normal -7.259975e-017 2.709460e-016 -1.000000e+000 outer loop vertex 4.138608e+001 1.952342e+001 -8.881784e-016 vertex 4.096515e+001 1.941063e+001 -8.881784e-016 vertex 4.982020e+001 2.506140e+001 0.000000e+000 endloop endfacet facet normal 0.000000e+000 1.571783e-016 -1.000000e+000 outer loop vertex 4.982020e+001 2.506140e+001 0.000000e+000 vertex 4.096515e+001 1.941063e+001 -8.881784e-016 vertex -1.798000e-001 2.506140e+001 0.000000e+000 endloop endfacet facet normal -1.383491e-031 1.571783e-016 -1.000000e+000 outer loop vertex -1.798000e-001 2.506140e+001 0.000000e+000 vertex 4.096515e+001 1.941063e+001 -8.881784e-016 vertex 8.675250e+000 1.941063e+001 -8.881784e-016 endloop endfacet facet normal 7.259975e-017 2.709460e-016 -1.000000e+000 outer loop vertex 8.254320e+000 1.952342e+001 -8.881784e-016 vertex -1.798000e-001 2.506140e+001 0.000000e+000 vertex 8.675250e+000 1.941063e+001 -8.881784e-016 endloop endfacet facet normal 1.618835e-017 1.850337e-016 -1.000000e+000 outer loop vertex 8.254320e+000 1.952342e+001 -8.881784e-016 vertex 7.820200e+000 1.956140e+001 -8.881784e-016 vertex -1.798000e-001 2.506140e+001 0.000000e+000 endloop endfacet facet normal -1.253334e-017 1.432567e-016 -1.000000e+000 outer loop vertex -1.798000e-001 2.506140e+001 0.000000e+000 vertex 7.820200e+000 1.956140e+001 -8.881784e-016 vertex 7.386080e+000 1.952342e+001 -8.881784e-016 endloop endfacet facet normal -3.145787e-017 1.174024e-016 -1.000000e+000 outer loop vertex 6.965150e+000 1.941063e+001 -8.881784e-016 vertex -1.798000e-001 2.506140e+001 0.000000e+000 vertex 7.386080e+000 1.952342e+001 -8.881784e-016 endloop endfacet facet normal -4.610785e-017 9.887861e-017 -1.000000e+000 outer loop vertex 6.965150e+000 1.941063e+001 -8.881784e-016 vertex 6.570200e+000 1.922646e+001 -8.881784e-016 vertex -1.798000e-001 2.506140e+001 0.000000e+000 endloop endfacet facet normal -5.888546e-017 8.409715e-017 -1.000000e+000 outer loop vertex -1.798000e-001 2.506140e+001 0.000000e+000 vertex 6.570200e+000 1.922646e+001 -8.881784e-016 vertex 6.213231e+000 1.897651e+001 -8.881784e-016 endloop endfacet facet normal -7.118001e-017 7.118001e-017 -1.000000e+000 outer loop vertex 5.905089e+000 1.866837e+001 -8.881784e-016 vertex -1.798000e-001 2.506140e+001 0.000000e+000 vertex 6.213231e+000 1.897651e+001 -8.881784e-016 endloop endfacet facet normal -8.409715e-017 5.888546e-017 -1.000000e+000 outer loop vertex 5.905089e+000 1.866837e+001 -8.881784e-016 vertex 5.655136e+000 1.831140e+001 -8.881784e-016 vertex -1.798000e-001 2.506140e+001 0.000000e+000 endloop endfacet facet normal -9.887861e-017 4.610785e-017 -1.000000e+000 outer loop vertex -1.798000e-001 2.506140e+001 0.000000e+000 vertex 5.655136e+000 1.831140e+001 -8.881784e-016 vertex 5.470968e+000 1.791645e+001 -8.881784e-016 endloop endfacet facet normal -1.174024e-016 3.145787e-017 -1.000000e+000 outer loop vertex 5.358181e+000 1.749552e+001 -8.881784e-016 vertex -1.798000e-001 2.506140e+001 0.000000e+000 vertex 5.470968e+000 1.791645e+001 -8.881784e-016 endloop endfacet facet normal -1.432567e-016 1.253334e-017 -1.000000e+000 outer loop vertex 5.358181e+000 1.749552e+001 -8.881784e-016 vertex 5.320200e+000 1.706140e+001 -8.881784e-016 vertex -1.798000e-001 2.506140e+001 0.000000e+000 endloop endfacet facet normal -1.850337e-016 -1.618835e-017 -1.000000e+000 outer loop vertex -1.798000e-001 2.506140e+001 0.000000e+000 vertex 5.320200e+000 1.706140e+001 -8.881784e-016 vertex 5.358181e+000 1.662728e+001 -8.881784e-016 endloop endfacet facet normal -2.709460e-016 -7.259975e-017 -1.000000e+000 outer loop vertex 5.470968e+000 1.620635e+001 -8.881784e-016 vertex -1.798000e-001 2.506140e+001 0.000000e+000 vertex 5.358181e+000 1.662728e+001 -8.881784e-016 endloop endfacet facet normal -1.015055e-016 3.552714e-017 -1.000000e+000 outer loop vertex 5.470968e+000 1.620635e+001 -8.881784e-016 vertex -1.798000e-001 6.140000e-002 -8.881784e-016 vertex -1.798000e-001 2.506140e+001 0.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 5.470968e+000 1.620635e+001 -8.881784e-016 vertex 5.655136e+000 1.581140e+001 -8.881784e-016 vertex -1.798000e-001 6.140000e-002 -8.881784e-016 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex -1.798000e-001 6.140000e-002 -8.881784e-016 vertex 5.655136e+000 1.581140e+001 -8.881784e-016 vertex 5.905089e+000 1.545443e+001 -8.881784e-016 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 6.213231e+000 1.514629e+001 -8.881784e-016 vertex -1.798000e-001 6.140000e-002 -8.881784e-016 vertex 5.905089e+000 1.545443e+001 -8.881784e-016 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 6.213231e+000 1.514629e+001 -8.881784e-016 vertex 6.570200e+000 1.489634e+001 -8.881784e-016 vertex -1.798000e-001 6.140000e-002 -8.881784e-016 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex -1.798000e-001 6.140000e-002 -8.881784e-016 vertex 6.570200e+000 1.489634e+001 -8.881784e-016 vertex 6.965150e+000 1.471217e+001 -8.881784e-016 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 7.386080e+000 1.459938e+001 -8.881784e-016 vertex -1.798000e-001 6.140000e-002 -8.881784e-016 vertex 6.965150e+000 1.471217e+001 -8.881784e-016 endloop endfacet facet normal 6.691135e-017 -3.482212e-017 -1.000000e+000 outer loop vertex 7.386080e+000 1.459938e+001 -8.881784e-016 vertex 1.482020e+001 3.378025e+000 0.000000e+000 vertex -1.798000e-001 6.140000e-002 -8.881784e-016 endloop endfacet facet normal -7.350854e-018 -8.402064e-017 -1.000000e+000 outer loop vertex 7.386080e+000 1.459938e+001 -8.881784e-016 vertex 7.820200e+000 1.456140e+001 -8.881784e-016 vertex 1.482020e+001 3.378025e+000 0.000000e+000 endloop endfacet facet normal 6.587563e-018 -7.529618e-017 -1.000000e+000 outer loop vertex 1.482020e+001 3.378025e+000 0.000000e+000 vertex 7.820200e+000 1.456140e+001 -8.881784e-016 vertex 8.254320e+000 1.459938e+001 -8.881784e-016 endloop endfacet facet normal 7.134736e-017 4.995796e-017 -1.000000e+000 outer loop vertex 2.290509e+001 1.145443e+001 0.000000e+000 vertex 8.254320e+000 1.459938e+001 -8.881784e-016 vertex 2.265514e+001 1.181140e+001 0.000000e+000 endloop endfacet facet normal 4.990041e-017 -4.995282e-017 -1.000000e+000 outer loop vertex 2.290509e+001 1.145443e+001 0.000000e+000 vertex 1.482020e+001 3.378025e+000 0.000000e+000 vertex 8.254320e+000 1.459938e+001 -8.881784e-016 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 2.290509e+001 1.145443e+001 0.000000e+000 vertex 2.321323e+001 1.114629e+001 0.000000e+000 vertex 1.482020e+001 3.378025e+000 0.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 1.482020e+001 3.378025e+000 0.000000e+000 vertex 2.321323e+001 1.114629e+001 0.000000e+000 vertex 2.357020e+001 1.089634e+001 0.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 2.396515e+001 1.071217e+001 0.000000e+000 vertex 1.482020e+001 3.378025e+000 0.000000e+000 vertex 2.357020e+001 1.089634e+001 0.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 2.396515e+001 1.071217e+001 0.000000e+000 vertex 2.438608e+001 1.059938e+001 0.000000e+000 vertex 1.482020e+001 3.378025e+000 0.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 1.482020e+001 3.378025e+000 0.000000e+000 vertex 2.438608e+001 1.059938e+001 0.000000e+000 vertex 2.482020e+001 1.056140e+001 0.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 3.482020e+001 3.378025e+000 0.000000e+000 vertex 2.482020e+001 1.056140e+001 0.000000e+000 vertex 2.525432e+001 1.059938e+001 0.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 2.567525e+001 1.071217e+001 0.000000e+000 vertex 3.482020e+001 3.378025e+000 0.000000e+000 vertex 2.525432e+001 1.059938e+001 0.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 2.567525e+001 1.071217e+001 0.000000e+000 vertex 2.607020e+001 1.089634e+001 0.000000e+000 vertex 3.482020e+001 3.378025e+000 0.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 3.482020e+001 3.378025e+000 0.000000e+000 vertex 2.607020e+001 1.089634e+001 0.000000e+000 vertex 2.642717e+001 1.114629e+001 0.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 2.673531e+001 1.145443e+001 0.000000e+000 vertex 3.482020e+001 3.378025e+000 0.000000e+000 vertex 2.642717e+001 1.114629e+001 0.000000e+000 endloop endfacet facet normal -4.990041e-017 -4.995282e-017 -1.000000e+000 outer loop vertex 2.673531e+001 1.145443e+001 0.000000e+000 vertex 4.138608e+001 1.459938e+001 -8.881784e-016 vertex 3.482020e+001 3.378025e+000 0.000000e+000 endloop endfacet facet normal -7.134736e-017 4.995796e-017 -1.000000e+000 outer loop vertex 2.673531e+001 1.145443e+001 0.000000e+000 vertex 2.698526e+001 1.181140e+001 0.000000e+000 vertex 4.138608e+001 1.459938e+001 -8.881784e-016 endloop endfacet facet normal -3.580541e-017 -1.336276e-016 -1.000000e+000 outer loop vertex 4.138608e+001 1.459938e+001 -8.881784e-016 vertex 2.698526e+001 1.181140e+001 0.000000e+000 vertex 4.096515e+001 1.471217e+001 -8.881784e-016 endloop endfacet facet normal -7.033831e-017 3.279929e-017 -1.000000e+000 outer loop vertex 4.096515e+001 1.471217e+001 -8.881784e-016 vertex 2.698526e+001 1.181140e+001 0.000000e+000 vertex 2.716943e+001 1.220635e+001 0.000000e+000 endloop endfacet facet normal -7.004568e-017 1.876868e-017 -1.000000e+000 outer loop vertex 4.057020e+001 1.489634e+001 -8.881784e-016 vertex 2.716943e+001 1.220635e+001 0.000000e+000 vertex 2.728222e+001 1.262728e+001 0.000000e+000 endloop endfacet facet normal -6.785445e-017 5.936495e-018 -1.000000e+000 outer loop vertex 2.732020e+001 1.306140e+001 0.000000e+000 vertex 4.057020e+001 1.489634e+001 -8.881784e-016 vertex 2.728222e+001 1.262728e+001 0.000000e+000 endloop endfacet facet normal -5.596390e-017 -7.992473e-017 -1.000000e+000 outer loop vertex 2.732020e+001 1.306140e+001 0.000000e+000 vertex 4.021323e+001 1.514629e+001 -8.881784e-016 vertex 4.057020e+001 1.489634e+001 -8.881784e-016 endloop endfacet facet normal -6.792726e-017 -5.942865e-018 -1.000000e+000 outer loop vertex 2.732020e+001 1.306140e+001 0.000000e+000 vertex 2.728222e+001 1.349552e+001 0.000000e+000 vertex 4.021323e+001 1.514629e+001 -8.881784e-016 endloop endfacet facet normal -6.091015e-017 -6.091015e-017 -1.000000e+000 outer loop vertex 4.021323e+001 1.514629e+001 -8.881784e-016 vertex 2.728222e+001 1.349552e+001 0.000000e+000 vertex 3.990509e+001 1.545443e+001 -8.881784e-016 endloop endfacet facet normal -6.755360e-017 -1.810093e-017 -1.000000e+000 outer loop vertex 3.990509e+001 1.545443e+001 -8.881784e-016 vertex 2.728222e+001 1.349552e+001 0.000000e+000 vertex 2.716943e+001 1.391645e+001 0.000000e+000 endloop endfacet facet normal -6.643400e-017 -3.097868e-017 -1.000000e+000 outer loop vertex 3.965514e+001 1.581140e+001 -8.881784e-016 vertex 2.716943e+001 1.391645e+001 0.000000e+000 vertex 2.698526e+001 1.431140e+001 0.000000e+000 endloop endfacet facet normal -6.430222e-017 -4.502490e-017 -1.000000e+000 outer loop vertex 3.947097e+001 1.620635e+001 -8.881784e-016 vertex 2.698526e+001 1.431140e+001 0.000000e+000 vertex 2.673531e+001 1.466837e+001 0.000000e+000 endloop endfacet facet normal -6.091015e-017 -6.091015e-017 -1.000000e+000 outer loop vertex 3.935818e+001 1.662728e+001 -8.881784e-016 vertex 2.673531e+001 1.466837e+001 0.000000e+000 vertex 2.642717e+001 1.497651e+001 0.000000e+000 endloop endfacet facet normal -5.596390e-017 -7.992473e-017 -1.000000e+000 outer loop vertex 3.932020e+001 1.706140e+001 -8.881784e-016 vertex 2.642717e+001 1.497651e+001 0.000000e+000 vertex 2.607020e+001 1.522646e+001 0.000000e+000 endloop endfacet facet normal -7.004568e-017 1.876868e-017 -1.000000e+000 outer loop vertex 3.935818e+001 1.749552e+001 -8.881784e-016 vertex 2.607020e+001 1.522646e+001 0.000000e+000 vertex 3.947097e+001 1.791645e+001 -8.881784e-016 endloop endfacet facet normal -6.785445e-017 5.936495e-018 -1.000000e+000 outer loop vertex 3.935818e+001 1.749552e+001 -8.881784e-016 vertex 3.932020e+001 1.706140e+001 -8.881784e-016 vertex 2.607020e+001 1.522646e+001 0.000000e+000 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 4.096515e+001 1.941063e+001 -8.881784e-016 vertex 4.057020e+001 1.922646e+001 -8.881784e-016 vertex 8.675250e+000 1.941063e+001 -8.881784e-016 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 8.675250e+000 1.941063e+001 -8.881784e-016 vertex 4.057020e+001 1.922646e+001 -8.881784e-016 vertex 9.070200e+000 1.922646e+001 -8.881784e-016 endloop endfacet facet normal 3.279817e-031 -2.423364e-016 -1.000000e+000 outer loop vertex 9.070200e+000 1.922646e+001 -8.881784e-016 vertex 4.057020e+001 1.922646e+001 -8.881784e-016 vertex 2.482020e+001 1.556140e+001 0.000000e+000 endloop endfacet facet normal 1.631843e-017 -1.865205e-016 -1.000000e+000 outer loop vertex 9.427169e+000 1.897651e+001 -8.881784e-016 vertex 2.482020e+001 1.556140e+001 0.000000e+000 vertex 2.438608e+001 1.552342e+001 0.000000e+000 endloop endfacet facet normal 7.134736e-017 4.995796e-017 -1.000000e+000 outer loop vertex 9.735311e+000 1.866837e+001 -8.881784e-016 vertex 2.438608e+001 1.552342e+001 0.000000e+000 vertex 9.985264e+000 1.831140e+001 -8.881784e-016 endloop endfacet facet normal 7.719385e-017 7.719385e-017 -1.000000e+000 outer loop vertex 9.735311e+000 1.866837e+001 -8.881784e-016 vertex 9.427169e+000 1.897651e+001 -8.881784e-016 vertex 2.438608e+001 1.552342e+001 0.000000e+000 endloop endfacet facet normal -8.446175e-017 1.206239e-016 -1.000000e+000 outer loop vertex 4.021323e+001 1.897651e+001 -8.881784e-016 vertex 2.482020e+001 1.556140e+001 0.000000e+000 vertex 4.057020e+001 1.922646e+001 -8.881784e-016 endloop endfacet facet normal -1.631843e-017 -1.865205e-016 -1.000000e+000 outer loop vertex 4.021323e+001 1.897651e+001 -8.881784e-016 vertex 2.525432e+001 1.552342e+001 0.000000e+000 vertex 2.482020e+001 1.556140e+001 0.000000e+000 endloop endfacet facet normal -7.719385e-017 7.719385e-017 -1.000000e+000 outer loop vertex 4.021323e+001 1.897651e+001 -8.881784e-016 vertex 3.990509e+001 1.866837e+001 -8.881784e-016 vertex 2.525432e+001 1.552342e+001 0.000000e+000 endloop endfacet facet normal -7.134736e-017 4.995796e-017 -1.000000e+000 outer loop vertex 2.525432e+001 1.552342e+001 0.000000e+000 vertex 3.990509e+001 1.866837e+001 -8.881784e-016 vertex 3.965514e+001 1.831140e+001 -8.881784e-016 endloop endfacet facet normal -7.033831e-017 3.279929e-017 -1.000000e+000 outer loop vertex 2.567525e+001 1.541063e+001 0.000000e+000 vertex 3.965514e+001 1.831140e+001 -8.881784e-016 vertex 3.947097e+001 1.791645e+001 -8.881784e-016 endloop endfacet facet normal -4.633298e-017 -9.936140e-017 -1.000000e+000 outer loop vertex 2.607020e+001 1.522646e+001 0.000000e+000 vertex 2.567525e+001 1.541063e+001 0.000000e+000 vertex 3.947097e+001 1.791645e+001 -8.881784e-016 endloop endfacet facet normal -6.792726e-017 -5.942865e-018 -1.000000e+000 outer loop vertex 3.932020e+001 1.706140e+001 -8.881784e-016 vertex 3.935818e+001 1.662728e+001 -8.881784e-016 vertex 2.642717e+001 1.497651e+001 0.000000e+000 endloop endfacet facet normal -6.755360e-017 -1.810093e-017 -1.000000e+000 outer loop vertex 3.947097e+001 1.620635e+001 -8.881784e-016 vertex 2.673531e+001 1.466837e+001 0.000000e+000 vertex 3.935818e+001 1.662728e+001 -8.881784e-016 endloop endfacet facet normal -6.643400e-017 -3.097868e-017 -1.000000e+000 outer loop vertex 3.947097e+001 1.620635e+001 -8.881784e-016 vertex 3.965514e+001 1.581140e+001 -8.881784e-016 vertex 2.698526e+001 1.431140e+001 0.000000e+000 endloop endfacet facet normal -6.430222e-017 -4.502490e-017 -1.000000e+000 outer loop vertex 3.965514e+001 1.581140e+001 -8.881784e-016 vertex 3.990509e+001 1.545443e+001 -8.881784e-016 vertex 2.716943e+001 1.391645e+001 0.000000e+000 endloop endfacet facet normal -4.633298e-017 -9.936140e-017 -1.000000e+000 outer loop vertex 4.096515e+001 1.471217e+001 -8.881784e-016 vertex 2.716943e+001 1.220635e+001 0.000000e+000 vertex 4.057020e+001 1.489634e+001 -8.881784e-016 endloop endfacet facet normal -6.587563e-018 -7.529618e-017 -1.000000e+000 outer loop vertex 4.182020e+001 1.456140e+001 -8.881784e-016 vertex 3.482020e+001 3.378025e+000 0.000000e+000 vertex 4.138608e+001 1.459938e+001 -8.881784e-016 endloop endfacet facet normal 7.350854e-018 -8.402064e-017 -1.000000e+000 outer loop vertex 4.182020e+001 1.456140e+001 -8.881784e-016 vertex 4.225432e+001 1.459938e+001 -8.881784e-016 vertex 3.482020e+001 3.378025e+000 0.000000e+000 endloop endfacet facet normal -6.691135e-017 -3.482212e-017 -1.000000e+000 outer loop vertex 3.482020e+001 3.378025e+000 0.000000e+000 vertex 4.225432e+001 1.459938e+001 -8.881784e-016 vertex 4.982020e+001 6.140000e-002 -8.881784e-016 endloop endfacet facet normal -5.921189e-017 0.000000e+000 -1.000000e+000 outer loop vertex 3.482020e+001 6.140000e-002 0.000000e+000 vertex 3.482020e+001 3.378025e+000 0.000000e+000 vertex 4.982020e+001 6.140000e-002 -8.881784e-016 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 4.267525e+001 1.471217e+001 -8.881784e-016 vertex 4.982020e+001 6.140000e-002 -8.881784e-016 vertex 4.225432e+001 1.459938e+001 -8.881784e-016 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 4.267525e+001 1.471217e+001 -8.881784e-016 vertex 4.307020e+001 1.489634e+001 -8.881784e-016 vertex 4.982020e+001 6.140000e-002 -8.881784e-016 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 4.982020e+001 6.140000e-002 -8.881784e-016 vertex 4.307020e+001 1.489634e+001 -8.881784e-016 vertex 4.342717e+001 1.514629e+001 -8.881784e-016 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 4.373531e+001 1.545443e+001 -8.881784e-016 vertex 4.982020e+001 6.140000e-002 -8.881784e-016 vertex 4.342717e+001 1.514629e+001 -8.881784e-016 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 4.373531e+001 1.545443e+001 -8.881784e-016 vertex 4.398526e+001 1.581140e+001 -8.881784e-016 vertex 4.982020e+001 6.140000e-002 -8.881784e-016 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 4.982020e+001 6.140000e-002 -8.881784e-016 vertex 4.398526e+001 1.581140e+001 -8.881784e-016 vertex 4.416943e+001 1.620635e+001 -8.881784e-016 endloop endfacet facet normal 2.709460e-016 -7.259975e-017 -1.000000e+000 outer loop vertex 4.982020e+001 2.506140e+001 0.000000e+000 vertex 4.416943e+001 1.620635e+001 -8.881784e-016 vertex 4.428222e+001 1.662728e+001 -8.881784e-016 endloop endfacet facet normal 1.850337e-016 -1.618835e-017 -1.000000e+000 outer loop vertex 4.432020e+001 1.706140e+001 -8.881784e-016 vertex 4.982020e+001 2.506140e+001 0.000000e+000 vertex 4.428222e+001 1.662728e+001 -8.881784e-016 endloop endfacet facet normal -3.580541e-017 -1.336276e-016 -1.000000e+000 outer loop vertex 2.567525e+001 1.541063e+001 0.000000e+000 vertex 2.525432e+001 1.552342e+001 0.000000e+000 vertex 3.965514e+001 1.831140e+001 -8.881784e-016 endloop endfacet facet normal 3.580541e-017 -1.336276e-016 -1.000000e+000 outer loop vertex 2.438608e+001 1.552342e+001 0.000000e+000 vertex 2.396515e+001 1.541063e+001 0.000000e+000 vertex 9.985264e+000 1.831140e+001 -8.881784e-016 endloop endfacet facet normal 7.033831e-017 3.279929e-017 -1.000000e+000 outer loop vertex 9.985264e+000 1.831140e+001 -8.881784e-016 vertex 2.396515e+001 1.541063e+001 0.000000e+000 vertex 1.016943e+001 1.791645e+001 -8.881784e-016 endloop endfacet facet normal 4.633298e-017 -9.936140e-017 -1.000000e+000 outer loop vertex 1.016943e+001 1.791645e+001 -8.881784e-016 vertex 2.396515e+001 1.541063e+001 0.000000e+000 vertex 2.357020e+001 1.522646e+001 0.000000e+000 endloop endfacet facet normal 6.785445e-017 5.936495e-018 -1.000000e+000 outer loop vertex 1.028222e+001 1.749552e+001 -8.881784e-016 vertex 2.357020e+001 1.522646e+001 0.000000e+000 vertex 1.032020e+001 1.706140e+001 -8.881784e-016 endloop endfacet facet normal 7.004568e-017 1.876868e-017 -1.000000e+000 outer loop vertex 1.028222e+001 1.749552e+001 -8.881784e-016 vertex 1.016943e+001 1.791645e+001 -8.881784e-016 vertex 2.357020e+001 1.522646e+001 0.000000e+000 endloop endfacet facet normal 5.596390e-017 -7.992473e-017 -1.000000e+000 outer loop vertex 2.357020e+001 1.522646e+001 0.000000e+000 vertex 2.321323e+001 1.497651e+001 0.000000e+000 vertex 1.032020e+001 1.706140e+001 -8.881784e-016 endloop endfacet facet normal 6.792726e-017 -5.942865e-018 -1.000000e+000 outer loop vertex 1.032020e+001 1.706140e+001 -8.881784e-016 vertex 2.321323e+001 1.497651e+001 0.000000e+000 vertex 1.028222e+001 1.662728e+001 -8.881784e-016 endloop endfacet facet normal 6.091015e-017 -6.091015e-017 -1.000000e+000 outer loop vertex 1.028222e+001 1.662728e+001 -8.881784e-016 vertex 2.321323e+001 1.497651e+001 0.000000e+000 vertex 2.290509e+001 1.466837e+001 0.000000e+000 endloop endfacet facet normal 6.430222e-017 -4.502490e-017 -1.000000e+000 outer loop vertex 1.016943e+001 1.620635e+001 -8.881784e-016 vertex 2.290509e+001 1.466837e+001 0.000000e+000 vertex 2.265514e+001 1.431140e+001 0.000000e+000 endloop endfacet facet normal 6.643400e-017 -3.097868e-017 -1.000000e+000 outer loop vertex 9.985264e+000 1.581140e+001 -8.881784e-016 vertex 2.265514e+001 1.431140e+001 0.000000e+000 vertex 2.247097e+001 1.391645e+001 0.000000e+000 endloop endfacet facet normal 6.755360e-017 -1.810093e-017 -1.000000e+000 outer loop vertex 9.735311e+000 1.545443e+001 -8.881784e-016 vertex 2.247097e+001 1.391645e+001 0.000000e+000 vertex 2.235818e+001 1.349552e+001 0.000000e+000 endloop endfacet facet normal 6.792726e-017 -5.942865e-018 -1.000000e+000 outer loop vertex 9.427169e+000 1.514629e+001 -8.881784e-016 vertex 2.235818e+001 1.349552e+001 0.000000e+000 vertex 2.232020e+001 1.306140e+001 0.000000e+000 endloop endfacet facet normal 6.785445e-017 5.936495e-018 -1.000000e+000 outer loop vertex 9.070200e+000 1.489634e+001 -8.881784e-016 vertex 2.232020e+001 1.306140e+001 0.000000e+000 vertex 2.235818e+001 1.262728e+001 0.000000e+000 endloop endfacet facet normal 7.004568e-017 1.876868e-017 -1.000000e+000 outer loop vertex 2.247097e+001 1.220635e+001 0.000000e+000 vertex 9.070200e+000 1.489634e+001 -8.881784e-016 vertex 2.235818e+001 1.262728e+001 0.000000e+000 endloop endfacet facet normal 4.633298e-017 -9.936140e-017 -1.000000e+000 outer loop vertex 2.247097e+001 1.220635e+001 0.000000e+000 vertex 8.675250e+000 1.471217e+001 -8.881784e-016 vertex 9.070200e+000 1.489634e+001 -8.881784e-016 endloop endfacet facet normal 7.033831e-017 3.279929e-017 -1.000000e+000 outer loop vertex 2.247097e+001 1.220635e+001 0.000000e+000 vertex 2.265514e+001 1.181140e+001 0.000000e+000 vertex 8.675250e+000 1.471217e+001 -8.881784e-016 endloop endfacet facet normal 3.580541e-017 -1.336276e-016 -1.000000e+000 outer loop vertex 8.675250e+000 1.471217e+001 -8.881784e-016 vertex 2.265514e+001 1.181140e+001 0.000000e+000 vertex 8.254320e+000 1.459938e+001 -8.881784e-016 endloop endfacet facet normal 8.446175e-017 1.206239e-016 -1.000000e+000 outer loop vertex 9.427169e+000 1.897651e+001 -8.881784e-016 vertex 9.070200e+000 1.922646e+001 -8.881784e-016 vertex 2.482020e+001 1.556140e+001 0.000000e+000 endloop endfacet facet normal 5.596390e-017 -7.992473e-017 -1.000000e+000 outer loop vertex 9.427169e+000 1.514629e+001 -8.881784e-016 vertex 2.232020e+001 1.306140e+001 0.000000e+000 vertex 9.070200e+000 1.489634e+001 -8.881784e-016 endloop endfacet facet normal 6.091015e-017 -6.091015e-017 -1.000000e+000 outer loop vertex 9.427169e+000 1.514629e+001 -8.881784e-016 vertex 9.735311e+000 1.545443e+001 -8.881784e-016 vertex 2.235818e+001 1.349552e+001 0.000000e+000 endloop endfacet facet normal 6.430222e-017 -4.502490e-017 -1.000000e+000 outer loop vertex 9.985264e+000 1.581140e+001 -8.881784e-016 vertex 2.247097e+001 1.391645e+001 0.000000e+000 vertex 9.735311e+000 1.545443e+001 -8.881784e-016 endloop endfacet facet normal 6.643400e-017 -3.097868e-017 -1.000000e+000 outer loop vertex 9.985264e+000 1.581140e+001 -8.881784e-016 vertex 1.016943e+001 1.620635e+001 -8.881784e-016 vertex 2.265514e+001 1.431140e+001 0.000000e+000 endloop endfacet facet normal 6.755360e-017 -1.810093e-017 -1.000000e+000 outer loop vertex 1.028222e+001 1.662728e+001 -8.881784e-016 vertex 2.290509e+001 1.466837e+001 0.000000e+000 vertex 1.016943e+001 1.620635e+001 -8.881784e-016 endloop endfacet facet normal 5.921189e-017 0.000000e+000 -1.000000e+000 outer loop vertex 1.482020e+001 3.378025e+000 0.000000e+000 vertex 1.482020e+001 6.140000e-002 0.000000e+000 vertex -1.798000e-001 6.140000e-002 -8.881784e-016 endloop endfacet facet normal 1.015055e-016 3.552714e-017 -1.000000e+000 outer loop vertex 4.982020e+001 2.506140e+001 0.000000e+000 vertex 4.982020e+001 6.140000e-002 -8.881784e-016 vertex 4.416943e+001 1.620635e+001 -8.881784e-016 endloop endfacet facet normal 0.000000e+000 0.000000e+000 -1.000000e+000 outer loop vertex 3.482020e+001 3.378025e+000 0.000000e+000 vertex 1.482020e+001 3.378025e+000 0.000000e+000 vertex 2.482020e+001 1.056140e+001 0.000000e+000 endloop endfacet facet normal 0.000000e+000 1.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 2.506140e+001 5.000000e+000 vertex 4.982020e+001 2.506140e+001 0.000000e+000 vertex -1.798000e-001 2.506140e+001 5.000000e+000 endloop endfacet facet normal 0.000000e+000 1.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 2.506140e+001 5.000000e+000 vertex 4.982020e+001 2.506140e+001 0.000000e+000 vertex -1.798000e-001 2.506140e+001 0.000000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -2.938600e+000 5.000000e+000 vertex -1.798000e-001 -2.893023e+000 4.479055e+000 vertex -1.798000e-001 -4.938600e+000 5.000000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -4.862639e+000 5.868241e+000 vertex -1.798000e-001 -2.938600e+000 5.000000e+000 vertex -1.798000e-001 -4.938600e+000 5.000000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -4.862639e+000 5.868241e+000 vertex -1.798000e-001 -2.893023e+000 5.520945e+000 vertex -1.798000e-001 -2.938600e+000 5.000000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -4.862639e+000 5.868241e+000 vertex -1.798000e-001 -4.637063e+000 6.710101e+000 vertex -1.798000e-001 -2.893023e+000 5.520945e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -2.893023e+000 5.520945e+000 vertex -1.798000e-001 -4.637063e+000 6.710101e+000 vertex -1.798000e-001 -2.757678e+000 6.026060e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -2.757678e+000 6.026060e+000 vertex -1.798000e-001 -4.637063e+000 6.710101e+000 vertex -1.798000e-001 -4.268727e+000 7.500000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -2.536676e+000 6.500000e+000 vertex -1.798000e-001 -4.268727e+000 7.500000e+000 vertex -1.798000e-001 -3.768822e+000 8.213938e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -2.236733e+000 6.928363e+000 vertex -1.798000e-001 -3.768822e+000 8.213938e+000 vertex -1.798000e-001 -3.152538e+000 8.830222e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -1.866963e+000 7.298133e+000 vertex -1.798000e-001 -3.152538e+000 8.830222e+000 vertex -1.798000e-001 -1.438600e+000 7.598076e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -1.866963e+000 7.298133e+000 vertex -1.798000e-001 -2.236733e+000 6.928363e+000 vertex -1.798000e-001 -3.152538e+000 8.830222e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -2.893023e+000 4.479055e+000 vertex -1.798000e-001 -2.757678e+000 3.973940e+000 vertex -1.798000e-001 -4.862639e+000 4.131759e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -4.938600e+000 5.000000e+000 vertex -1.798000e-001 -2.893023e+000 4.479055e+000 vertex -1.798000e-001 -4.862639e+000 4.131759e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -2.536676e+000 3.500000e+000 vertex -1.798000e-001 -4.637063e+000 3.289899e+000 vertex -1.798000e-001 -2.757678e+000 3.973940e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -2.536676e+000 3.500000e+000 vertex -1.798000e-001 -4.268727e+000 2.500000e+000 vertex -1.798000e-001 -4.637063e+000 3.289899e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -2.536676e+000 3.500000e+000 vertex -1.798000e-001 -2.236733e+000 3.071637e+000 vertex -1.798000e-001 -4.268727e+000 2.500000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -4.268727e+000 2.500000e+000 vertex -1.798000e-001 -2.236733e+000 3.071637e+000 vertex -1.798000e-001 -3.768822e+000 1.786062e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -3.768822e+000 1.786062e+000 vertex -1.798000e-001 -2.236733e+000 3.071637e+000 vertex -1.798000e-001 -1.866963e+000 2.701867e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -3.152538e+000 1.169778e+000 vertex -1.798000e-001 -1.866963e+000 2.701867e+000 vertex -1.798000e-001 -2.438600e+000 6.698730e-001 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -3.152538e+000 1.169778e+000 vertex -1.798000e-001 -3.768822e+000 1.786062e+000 vertex -1.798000e-001 -1.866963e+000 2.701867e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -1.438600e+000 2.401924e+000 vertex -1.798000e-001 -2.438600e+000 6.698730e-001 vertex -1.798000e-001 -1.866963e+000 2.701867e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -1.438600e+000 2.401924e+000 vertex -1.798000e-001 -1.648701e+000 3.015369e-001 vertex -1.798000e-001 -2.438600e+000 6.698730e-001 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -1.438600e+000 2.401924e+000 vertex -1.798000e-001 -9.646604e-001 2.180922e+000 vertex -1.798000e-001 -1.648701e+000 3.015369e-001 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -1.648701e+000 3.015369e-001 vertex -1.798000e-001 -9.646604e-001 2.180922e+000 vertex -1.798000e-001 -8.068409e-001 7.596123e-002 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -8.068409e-001 7.596123e-002 vertex -1.798000e-001 -9.646604e-001 2.180922e+000 vertex -1.798000e-001 -4.595445e-001 2.045577e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 6.140000e-002 -8.881784e-016 vertex -1.798000e-001 -4.595445e-001 2.045577e+000 vertex -1.798000e-001 6.140000e-002 2.000000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 5.823445e-001 2.045577e+000 vertex -1.798000e-001 6.140000e-002 -8.881784e-016 vertex -1.798000e-001 6.140000e-002 2.000000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 5.823445e-001 2.045577e+000 vertex -1.798000e-001 1.087460e+000 2.180922e+000 vertex -1.798000e-001 6.140000e-002 -8.881784e-016 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 6.140000e-002 -8.881784e-016 vertex -1.798000e-001 1.087460e+000 2.180922e+000 vertex -1.798000e-001 1.561400e+000 2.401924e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 1.989763e+000 2.701867e+000 vertex -1.798000e-001 6.140000e-002 -8.881784e-016 vertex -1.798000e-001 1.561400e+000 2.401924e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 1.989763e+000 2.701867e+000 vertex -1.798000e-001 2.359533e+000 3.071637e+000 vertex -1.798000e-001 6.140000e-002 -8.881784e-016 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 6.140000e-002 -8.881784e-016 vertex -1.798000e-001 2.359533e+000 3.071637e+000 vertex -1.798000e-001 2.506140e+001 0.000000e+000 endloop endfacet facet normal -1.000000e+000 -2.095500e-016 -1.548743e-015 outer loop vertex -1.798000e-001 2.506140e+001 0.000000e+000 vertex -1.798000e-001 2.359533e+000 3.071637e+000 vertex -1.798000e-001 5.061400e+000 5.000000e+000 endloop endfacet facet normal -1.000000e+000 1.776357e-016 0.000000e+000 outer loop vertex -1.798000e-001 2.506140e+001 5.000000e+000 vertex -1.798000e-001 2.506140e+001 0.000000e+000 vertex -1.798000e-001 5.061400e+000 5.000000e+000 endloop endfacet facet normal -1.000000e+000 -2.628500e-015 1.840496e-015 outer loop vertex -1.798000e-001 2.359533e+000 3.071637e+000 vertex -1.798000e-001 2.659476e+000 3.500000e+000 vertex -1.798000e-001 5.061400e+000 5.000000e+000 endloop endfacet facet normal -1.000000e+000 -2.086809e-015 9.730950e-016 outer loop vertex -1.798000e-001 5.061400e+000 5.000000e+000 vertex -1.798000e-001 2.659476e+000 3.500000e+000 vertex -1.798000e-001 2.880478e+000 3.973940e+000 endloop endfacet facet normal -1.000000e+000 -1.863973e-015 4.994500e-016 outer loop vertex -1.798000e-001 3.015823e+000 4.479055e+000 vertex -1.798000e-001 5.061400e+000 5.000000e+000 vertex -1.798000e-001 2.880478e+000 3.973940e+000 endloop endfacet facet normal -1.000000e+000 -1.776357e-015 1.554111e-016 outer loop vertex -1.798000e-001 3.015823e+000 4.479055e+000 vertex -1.798000e-001 3.061400e+000 5.000000e+000 vertex -1.798000e-001 5.061400e+000 5.000000e+000 endloop endfacet facet normal -1.000000e+000 -1.776357e-015 -1.554111e-016 outer loop vertex -1.798000e-001 5.061400e+000 5.000000e+000 vertex -1.798000e-001 3.061400e+000 5.000000e+000 vertex -1.798000e-001 3.015823e+000 5.520945e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 4.985439e+000 5.868241e+000 vertex -1.798000e-001 3.015823e+000 5.520945e+000 vertex -1.798000e-001 2.880478e+000 6.026060e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 4.759863e+000 6.710101e+000 vertex -1.798000e-001 2.880478e+000 6.026060e+000 vertex -1.798000e-001 2.659476e+000 6.500000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 4.391527e+000 7.500000e+000 vertex -1.798000e-001 2.659476e+000 6.500000e+000 vertex -1.798000e-001 2.359533e+000 6.928363e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 3.891622e+000 8.213938e+000 vertex -1.798000e-001 2.359533e+000 6.928363e+000 vertex -1.798000e-001 1.989763e+000 7.298133e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 3.275338e+000 8.830222e+000 vertex -1.798000e-001 1.989763e+000 7.298133e+000 vertex -1.798000e-001 2.561400e+000 9.330127e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 3.275338e+000 8.830222e+000 vertex -1.798000e-001 3.891622e+000 8.213938e+000 vertex -1.798000e-001 1.989763e+000 7.298133e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 1.989763e+000 7.298133e+000 vertex -1.798000e-001 1.561400e+000 7.598076e+000 vertex -1.798000e-001 2.561400e+000 9.330127e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 2.561400e+000 9.330127e+000 vertex -1.798000e-001 1.561400e+000 7.598076e+000 vertex -1.798000e-001 1.771501e+000 9.698463e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 1.771501e+000 9.698463e+000 vertex -1.798000e-001 1.561400e+000 7.598076e+000 vertex -1.798000e-001 1.087460e+000 7.819078e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 9.296409e-001 9.924039e+000 vertex -1.798000e-001 1.087460e+000 7.819078e+000 vertex -1.798000e-001 5.823445e-001 7.954423e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 6.140000e-002 1.000000e+001 vertex -1.798000e-001 5.823445e-001 7.954423e+000 vertex -1.798000e-001 6.140000e-002 8.000000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -8.068409e-001 9.924039e+000 vertex -1.798000e-001 6.140000e-002 8.000000e+000 vertex -1.798000e-001 -4.595445e-001 7.954423e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -1.648701e+000 9.698463e+000 vertex -1.798000e-001 -4.595445e-001 7.954423e+000 vertex -1.798000e-001 -9.646604e-001 7.819078e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -2.438600e+000 9.330127e+000 vertex -1.798000e-001 -9.646604e-001 7.819078e+000 vertex -1.798000e-001 -1.438600e+000 7.598076e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -3.152538e+000 8.830222e+000 vertex -1.798000e-001 -2.438600e+000 9.330127e+000 vertex -1.798000e-001 -1.438600e+000 7.598076e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -2.536676e+000 6.500000e+000 vertex -1.798000e-001 -3.768822e+000 8.213938e+000 vertex -1.798000e-001 -2.236733e+000 6.928363e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -4.268727e+000 7.500000e+000 vertex -1.798000e-001 -2.536676e+000 6.500000e+000 vertex -1.798000e-001 -2.757678e+000 6.026060e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 6.140000e-002 -8.881784e-016 vertex -1.798000e-001 -8.068409e-001 7.596123e-002 vertex -1.798000e-001 -4.595445e-001 2.045577e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -4.637063e+000 3.289899e+000 vertex -1.798000e-001 -4.862639e+000 4.131759e+000 vertex -1.798000e-001 -2.757678e+000 3.973940e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -2.438600e+000 9.330127e+000 vertex -1.798000e-001 -1.648701e+000 9.698463e+000 vertex -1.798000e-001 -9.646604e-001 7.819078e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 -1.648701e+000 9.698463e+000 vertex -1.798000e-001 -8.068409e-001 9.924039e+000 vertex -1.798000e-001 -4.595445e-001 7.954423e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 6.140000e-002 1.000000e+001 vertex -1.798000e-001 6.140000e-002 8.000000e+000 vertex -1.798000e-001 -8.068409e-001 9.924039e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 6.140000e-002 1.000000e+001 vertex -1.798000e-001 9.296409e-001 9.924039e+000 vertex -1.798000e-001 5.823445e-001 7.954423e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 9.296409e-001 9.924039e+000 vertex -1.798000e-001 1.771501e+000 9.698463e+000 vertex -1.798000e-001 1.087460e+000 7.819078e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 2.359533e+000 6.928363e+000 vertex -1.798000e-001 3.891622e+000 8.213938e+000 vertex -1.798000e-001 4.391527e+000 7.500000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 4.391527e+000 7.500000e+000 vertex -1.798000e-001 4.759863e+000 6.710101e+000 vertex -1.798000e-001 2.659476e+000 6.500000e+000 endloop endfacet facet normal -1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex -1.798000e-001 4.759863e+000 6.710101e+000 vertex -1.798000e-001 4.985439e+000 5.868241e+000 vertex -1.798000e-001 2.880478e+000 6.026060e+000 endloop endfacet facet normal -1.000000e+000 -7.105427e-016 4.029688e-015 outer loop vertex -1.798000e-001 4.985439e+000 5.868241e+000 vertex -1.798000e-001 5.061400e+000 5.000000e+000 vertex -1.798000e-001 3.015823e+000 5.520945e+000 endloop endfacet facet normal -1.061532e-017 -8.715574e-002 -9.961947e-001 outer loop vertex 1.482020e+001 6.140000e-002 0.000000e+000 vertex 1.482020e+001 -8.068409e-001 7.596123e-002 vertex -1.798000e-001 -8.068409e-001 7.596123e-002 endloop endfacet facet normal 5.124559e-017 -8.715574e-002 -9.961947e-001 outer loop vertex -1.798000e-001 6.140000e-002 -8.881784e-016 vertex 1.482020e+001 6.140000e-002 0.000000e+000 vertex -1.798000e-001 -8.068409e-001 7.596123e-002 endloop endfacet facet normal 2.547676e-017 -2.588190e-001 -9.659258e-001 outer loop vertex 1.482020e+001 -8.068409e-001 7.596123e-002 vertex 1.482020e+001 -1.648701e+000 3.015369e-001 vertex -1.798000e-001 -1.648701e+000 3.015369e-001 endloop endfacet facet normal -3.065033e-017 -2.588190e-001 -9.659258e-001 outer loop vertex -1.798000e-001 -8.068409e-001 7.596123e-002 vertex 1.482020e+001 -8.068409e-001 7.596123e-002 vertex -1.798000e-001 -1.648701e+000 3.015369e-001 endloop endfacet facet normal 4.246127e-018 -4.226183e-001 -9.063078e-001 outer loop vertex 1.482020e+001 -1.648701e+000 3.015369e-001 vertex 1.482020e+001 -2.438600e+000 6.698730e-001 vertex -1.798000e-001 -2.438600e+000 6.698730e-001 endloop endfacet facet normal 3.616145e-018 -4.226183e-001 -9.063078e-001 outer loop vertex -1.798000e-001 -1.648701e+000 3.015369e-001 vertex 1.482020e+001 -1.648701e+000 3.015369e-001 vertex -1.798000e-001 -2.438600e+000 6.698730e-001 endloop endfacet facet normal 8.492254e-018 -5.735764e-001 -8.191520e-001 outer loop vertex 1.482020e+001 -2.438600e+000 6.698730e-001 vertex 1.482020e+001 -3.152538e+000 1.169778e+000 vertex -1.798000e-001 -3.152538e+000 1.169778e+000 endloop endfacet facet normal -2.427694e-017 -5.735764e-001 -8.191520e-001 outer loop vertex -1.798000e-001 -2.438600e+000 6.698730e-001 vertex 1.482020e+001 -2.438600e+000 6.698730e-001 vertex -1.798000e-001 -3.152538e+000 1.169778e+000 endloop endfacet facet normal 0.000000e+000 -7.071068e-001 -7.071068e-001 outer loop vertex 1.482020e+001 -3.152538e+000 1.169778e+000 vertex 1.482020e+001 -3.768822e+000 1.786062e+000 vertex -1.798000e-001 -3.768822e+000 1.786062e+000 endloop endfacet facet normal -4.186913e-017 -7.071068e-001 -7.071068e-001 outer loop vertex -1.798000e-001 -3.152538e+000 1.169778e+000 vertex 1.482020e+001 -3.152538e+000 1.169778e+000 vertex -1.798000e-001 -3.768822e+000 1.786062e+000 endloop endfacet facet normal 2.123063e-017 -8.191520e-001 -5.735764e-001 outer loop vertex 1.482020e+001 -3.768822e+000 1.786062e+000 vertex 1.482020e+001 -4.268727e+000 2.500000e+000 vertex -1.798000e-001 -4.268727e+000 2.500000e+000 endloop endfacet facet normal -2.908199e-017 -8.191520e-001 -5.735764e-001 outer loop vertex -1.798000e-001 -3.768822e+000 1.786062e+000 vertex 1.482020e+001 -3.768822e+000 1.786062e+000 vertex -1.798000e-001 -4.268727e+000 2.500000e+000 endloop endfacet facet normal -3.616145e-018 -9.063078e-001 -4.226183e-001 outer loop vertex 1.482020e+001 -4.268727e+000 2.500000e+000 vertex 1.482020e+001 -4.637063e+000 3.289899e+000 vertex -1.798000e-001 -4.268727e+000 2.500000e+000 endloop endfacet facet normal 0.000000e+000 -9.063078e-001 -4.226183e-001 outer loop vertex -1.798000e-001 -4.268727e+000 2.500000e+000 vertex 1.482020e+001 -4.637063e+000 3.289899e+000 vertex -1.798000e-001 -4.637063e+000 3.289899e+000 endloop endfacet facet normal 0.000000e+000 -9.659258e-001 -2.588190e-001 outer loop vertex -1.798000e-001 -4.637063e+000 3.289899e+000 vertex 1.482020e+001 -4.637063e+000 3.289899e+000 vertex -1.798000e-001 -4.862639e+000 4.131759e+000 endloop endfacet facet normal 6.130066e-017 -9.659258e-001 -2.588190e-001 outer loop vertex -1.798000e-001 -4.862639e+000 4.131759e+000 vertex 1.482020e+001 -4.637063e+000 3.289899e+000 vertex 1.482020e+001 -4.862639e+000 4.131759e+000 endloop endfacet facet normal -2.802264e-017 -9.961947e-001 -8.715574e-002 outer loop vertex -1.798000e-001 -4.938600e+000 5.000000e+000 vertex 1.482020e+001 -4.862639e+000 4.131759e+000 vertex 1.482020e+001 -4.938600e+000 5.000000e+000 endloop endfacet facet normal 3.318329e-017 -9.961947e-001 8.715574e-002 outer loop vertex -1.798000e-001 -4.862639e+000 5.868241e+000 vertex 1.482020e+001 -4.938600e+000 5.000000e+000 vertex 1.482020e+001 -4.862639e+000 5.868241e+000 endloop endfacet facet normal 0.000000e+000 -9.659258e-001 2.588190e-001 outer loop vertex -1.798000e-001 -4.637063e+000 6.710101e+000 vertex 1.482020e+001 -4.862639e+000 5.868241e+000 vertex 1.482020e+001 -4.637063e+000 6.710101e+000 endloop endfacet facet normal 7.232290e-018 -9.063078e-001 4.226183e-001 outer loop vertex -1.798000e-001 -4.268727e+000 7.500000e+000 vertex 1.482020e+001 -4.637063e+000 6.710101e+000 vertex 1.482020e+001 -4.268727e+000 7.500000e+000 endloop endfacet facet normal 0.000000e+000 -8.191520e-001 5.735764e-001 outer loop vertex -1.798000e-001 -3.768822e+000 8.213938e+000 vertex 1.482020e+001 -4.268727e+000 7.500000e+000 vertex 1.482020e+001 -3.768822e+000 8.213938e+000 endloop endfacet facet normal -2.172279e-030 -7.071068e-001 7.071068e-001 outer loop vertex -1.798000e-001 -3.152538e+000 8.830222e+000 vertex 1.482020e+001 -3.768822e+000 8.213938e+000 vertex 1.482020e+001 -3.152538e+000 8.830222e+000 endloop endfacet facet normal 3.884310e-017 -5.735764e-001 8.191520e-001 outer loop vertex -1.798000e-001 -2.438600e+000 9.330127e+000 vertex 1.482020e+001 -3.152538e+000 8.830222e+000 vertex 1.482020e+001 -2.438600e+000 9.330127e+000 endloop endfacet facet normal 0.000000e+000 -4.226183e-001 9.063078e-001 outer loop vertex -1.798000e-001 -1.648701e+000 9.698463e+000 vertex 1.482020e+001 -2.438600e+000 9.330127e+000 vertex 1.482020e+001 -1.648701e+000 9.698463e+000 endloop endfacet facet normal 8.428841e-017 -2.588190e-001 9.659258e-001 outer loop vertex -1.798000e-001 -8.068409e-001 9.924039e+000 vertex 1.482020e+001 -1.648701e+000 9.698463e+000 vertex 1.482020e+001 -8.068409e-001 9.924039e+000 endloop endfacet facet normal 0.000000e+000 -8.715574e-002 9.961947e-001 outer loop vertex -1.798000e-001 6.140000e-002 1.000000e+001 vertex 1.482020e+001 -8.068409e-001 9.924039e+000 vertex 1.482020e+001 6.140000e-002 1.000000e+001 endloop endfacet facet normal -2.322295e-017 8.715574e-002 9.961947e-001 outer loop vertex -1.798000e-001 9.296409e-001 9.924039e+000 vertex 1.482020e+001 6.140000e-002 1.000000e+001 vertex 1.482020e+001 9.296409e-001 9.924039e+000 endloop endfacet facet normal 4.159406e-017 2.588190e-001 9.659258e-001 outer loop vertex -1.798000e-001 1.771501e+000 9.698463e+000 vertex 1.482020e+001 9.296409e-001 9.924039e+000 vertex 1.482020e+001 1.771501e+000 9.698463e+000 endloop endfacet facet normal 0.000000e+000 4.226183e-001 9.063078e-001 outer loop vertex -1.798000e-001 2.561400e+000 9.330127e+000 vertex 1.482020e+001 1.771501e+000 9.698463e+000 vertex 1.482020e+001 2.561400e+000 9.330127e+000 endloop endfacet facet normal 5.816399e-017 5.735764e-001 8.191520e-001 outer loop vertex -1.798000e-001 3.275338e+000 8.830222e+000 vertex 1.482020e+001 2.561400e+000 9.330127e+000 vertex 1.482020e+001 3.275338e+000 8.830222e+000 endloop endfacet facet normal 0.000000e+000 7.071068e-001 7.071068e-001 outer loop vertex -1.798000e-001 3.891622e+000 8.213938e+000 vertex 1.482020e+001 3.275338e+000 8.830222e+000 vertex 1.482020e+001 3.891622e+000 8.213938e+000 endloop endfacet facet normal 3.884310e-017 8.191520e-001 5.735764e-001 outer loop vertex -1.798000e-001 4.391527e+000 7.500000e+000 vertex 1.482020e+001 3.891622e+000 8.213938e+000 vertex 1.482020e+001 4.391527e+000 7.500000e+000 endloop endfacet facet normal 7.145594e-017 9.063078e-001 4.226183e-001 outer loop vertex -1.798000e-001 4.759863e+000 6.710101e+000 vertex 1.482020e+001 4.391527e+000 7.500000e+000 vertex 1.482020e+001 4.759863e+000 6.710101e+000 endloop endfacet facet normal 0.000000e+000 9.659258e-001 2.588190e-001 outer loop vertex -1.798000e-001 4.985439e+000 5.868241e+000 vertex 1.482020e+001 4.759863e+000 6.710101e+000 vertex 1.482020e+001 4.985439e+000 5.868241e+000 endloop endfacet facet normal 0.000000e+000 9.961947e-001 8.715574e-002 outer loop vertex 1.482020e+001 5.061400e+000 5.000000e+000 vertex -1.798000e-001 4.985439e+000 5.868241e+000 vertex 1.482020e+001 4.985439e+000 5.868241e+000 endloop endfacet facet normal 0.000000e+000 9.961947e-001 8.715574e-002 outer loop vertex 1.482020e+001 5.061400e+000 5.000000e+000 vertex -1.798000e-001 5.061400e+000 5.000000e+000 vertex -1.798000e-001 4.985439e+000 5.868241e+000 endloop endfacet facet normal 1.910757e-017 9.659258e-001 2.588190e-001 outer loop vertex -1.798000e-001 4.985439e+000 5.868241e+000 vertex -1.798000e-001 4.759863e+000 6.710101e+000 vertex 1.482020e+001 4.759863e+000 6.710101e+000 endloop endfacet facet normal -8.492254e-018 9.063078e-001 4.226183e-001 outer loop vertex -1.798000e-001 4.759863e+000 6.710101e+000 vertex -1.798000e-001 4.391527e+000 7.500000e+000 vertex 1.482020e+001 4.391527e+000 7.500000e+000 endloop endfacet facet normal 0.000000e+000 8.191520e-001 5.735764e-001 outer loop vertex -1.798000e-001 4.391527e+000 7.500000e+000 vertex -1.798000e-001 3.891622e+000 8.213938e+000 vertex 1.482020e+001 3.891622e+000 8.213938e+000 endloop endfacet facet normal -4.344559e-030 7.071068e-001 7.071068e-001 outer loop vertex -1.798000e-001 3.275338e+000 8.830222e+000 vertex 1.482020e+001 3.275338e+000 8.830222e+000 vertex -1.798000e-001 3.891622e+000 8.213938e+000 endloop endfacet facet normal 0.000000e+000 5.735764e-001 8.191520e-001 outer loop vertex -1.798000e-001 3.275338e+000 8.830222e+000 vertex -1.798000e-001 2.561400e+000 9.330127e+000 vertex 1.482020e+001 2.561400e+000 9.330127e+000 endloop endfacet facet normal -1.153573e-017 4.226183e-001 9.063078e-001 outer loop vertex -1.798000e-001 1.771501e+000 9.698463e+000 vertex 1.482020e+001 1.771501e+000 9.698463e+000 vertex -1.798000e-001 2.561400e+000 9.330127e+000 endloop endfacet facet normal -6.793803e-017 2.588190e-001 9.659258e-001 outer loop vertex -1.798000e-001 1.771501e+000 9.698463e+000 vertex -1.798000e-001 9.296409e-001 9.924039e+000 vertex 1.482020e+001 9.296409e-001 9.924039e+000 endloop endfacet facet normal 0.000000e+000 8.715574e-002 9.961947e-001 outer loop vertex -1.798000e-001 9.296409e-001 9.924039e+000 vertex -1.798000e-001 6.140000e-002 1.000000e+001 vertex 1.482020e+001 6.140000e-002 1.000000e+001 endloop endfacet facet normal 2.866136e-017 -8.715574e-002 9.961947e-001 outer loop vertex -1.798000e-001 6.140000e-002 1.000000e+001 vertex -1.798000e-001 -8.068409e-001 9.924039e+000 vertex 1.482020e+001 -8.068409e-001 9.924039e+000 endloop endfacet facet normal 0.000000e+000 -2.588190e-001 9.659258e-001 outer loop vertex -1.798000e-001 -8.068409e-001 9.924039e+000 vertex -1.798000e-001 -1.648701e+000 9.698463e+000 vertex 1.482020e+001 -1.648701e+000 9.698463e+000 endloop endfacet facet normal -8.492254e-018 -4.226183e-001 9.063078e-001 outer loop vertex -1.798000e-001 -1.648701e+000 9.698463e+000 vertex -1.798000e-001 -2.438600e+000 9.330127e+000 vertex 1.482020e+001 -2.438600e+000 9.330127e+000 endloop endfacet facet normal -5.944578e-017 -5.735764e-001 8.191520e-001 outer loop vertex -1.798000e-001 -2.438600e+000 9.330127e+000 vertex -1.798000e-001 -3.152538e+000 8.830222e+000 vertex 1.482020e+001 -3.152538e+000 8.830222e+000 endloop endfacet facet normal 0.000000e+000 -7.071068e-001 7.071068e-001 outer loop vertex -1.798000e-001 -3.152538e+000 8.830222e+000 vertex -1.798000e-001 -3.768822e+000 8.213938e+000 vertex 1.482020e+001 -3.768822e+000 8.213938e+000 endloop endfacet facet normal -3.821514e-017 -8.191520e-001 5.735764e-001 outer loop vertex -1.798000e-001 -3.768822e+000 8.213938e+000 vertex -1.798000e-001 -4.268727e+000 7.500000e+000 vertex 1.482020e+001 -4.268727e+000 7.500000e+000 endloop endfacet facet normal 0.000000e+000 -9.063078e-001 4.226183e-001 outer loop vertex -1.798000e-001 -4.268727e+000 7.500000e+000 vertex -1.798000e-001 -4.637063e+000 6.710101e+000 vertex 1.482020e+001 -4.637063e+000 6.710101e+000 endloop endfacet facet normal -1.910757e-017 -9.659258e-001 2.588190e-001 outer loop vertex -1.798000e-001 -4.637063e+000 6.710101e+000 vertex -1.798000e-001 -4.862639e+000 5.868241e+000 vertex 1.482020e+001 -4.862639e+000 5.868241e+000 endloop endfacet facet normal -9.023020e-017 -9.961947e-001 8.715574e-002 outer loop vertex -1.798000e-001 -4.862639e+000 5.868241e+000 vertex -1.798000e-001 -4.938600e+000 5.000000e+000 vertex 1.482020e+001 -4.938600e+000 5.000000e+000 endloop endfacet facet normal 2.016910e-017 -9.961947e-001 -8.715574e-002 outer loop vertex -1.798000e-001 -4.938600e+000 5.000000e+000 vertex -1.798000e-001 -4.862639e+000 4.131759e+000 vertex 1.482020e+001 -4.862639e+000 4.131759e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -2.893023e+000 5.520945e+000 vertex 4.982020e+001 -4.862639e+000 5.868241e+000 vertex 4.982020e+001 -2.938600e+000 5.000000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -2.893023e+000 5.520945e+000 vertex 4.982020e+001 -4.637063e+000 6.710101e+000 vertex 4.982020e+001 -4.862639e+000 5.868241e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -2.893023e+000 5.520945e+000 vertex 4.982020e+001 -2.757678e+000 6.026060e+000 vertex 4.982020e+001 -4.637063e+000 6.710101e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -4.637063e+000 6.710101e+000 vertex 4.982020e+001 -2.757678e+000 6.026060e+000 vertex 4.982020e+001 -4.268727e+000 7.500000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -4.268727e+000 7.500000e+000 vertex 4.982020e+001 -2.757678e+000 6.026060e+000 vertex 4.982020e+001 -2.536676e+000 6.500000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -3.768822e+000 8.213938e+000 vertex 4.982020e+001 -2.536676e+000 6.500000e+000 vertex 4.982020e+001 -2.236733e+000 6.928363e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -1.866963e+000 7.298133e+000 vertex 4.982020e+001 -3.768822e+000 8.213938e+000 vertex 4.982020e+001 -2.236733e+000 6.928363e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -1.866963e+000 7.298133e+000 vertex 4.982020e+001 -3.152538e+000 8.830222e+000 vertex 4.982020e+001 -3.768822e+000 8.213938e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -1.866963e+000 7.298133e+000 vertex 4.982020e+001 -1.438600e+000 7.598076e+000 vertex 4.982020e+001 -3.152538e+000 8.830222e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -3.152538e+000 8.830222e+000 vertex 4.982020e+001 -1.438600e+000 7.598076e+000 vertex 4.982020e+001 -2.438600e+000 9.330127e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -2.438600e+000 9.330127e+000 vertex 4.982020e+001 -1.438600e+000 7.598076e+000 vertex 4.982020e+001 -9.646604e-001 7.819078e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -1.648701e+000 9.698463e+000 vertex 4.982020e+001 -9.646604e-001 7.819078e+000 vertex 4.982020e+001 -4.595445e-001 7.954423e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -8.068409e-001 9.924039e+000 vertex 4.982020e+001 -4.595445e-001 7.954423e+000 vertex 4.982020e+001 6.140000e-002 8.000000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 6.140000e-002 1.000000e+001 vertex 4.982020e+001 6.140000e-002 8.000000e+000 vertex 4.982020e+001 5.823445e-001 7.954423e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 9.296409e-001 9.924039e+000 vertex 4.982020e+001 5.823445e-001 7.954423e+000 vertex 4.982020e+001 1.087460e+000 7.819078e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 1.771501e+000 9.698463e+000 vertex 4.982020e+001 1.087460e+000 7.819078e+000 vertex 4.982020e+001 1.561400e+000 7.598076e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 2.561400e+000 9.330127e+000 vertex 4.982020e+001 1.561400e+000 7.598076e+000 vertex 4.982020e+001 1.989763e+000 7.298133e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 3.275338e+000 8.830222e+000 vertex 4.982020e+001 1.989763e+000 7.298133e+000 vertex 4.982020e+001 2.359533e+000 6.928363e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 3.891622e+000 8.213938e+000 vertex 4.982020e+001 2.359533e+000 6.928363e+000 vertex 4.982020e+001 4.391527e+000 7.500000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 3.891622e+000 8.213938e+000 vertex 4.982020e+001 3.275338e+000 8.830222e+000 vertex 4.982020e+001 2.359533e+000 6.928363e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 2.359533e+000 6.928363e+000 vertex 4.982020e+001 2.659476e+000 6.500000e+000 vertex 4.982020e+001 4.391527e+000 7.500000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 4.391527e+000 7.500000e+000 vertex 4.982020e+001 2.659476e+000 6.500000e+000 vertex 4.982020e+001 4.759863e+000 6.710101e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 4.759863e+000 6.710101e+000 vertex 4.982020e+001 2.659476e+000 6.500000e+000 vertex 4.982020e+001 2.880478e+000 6.026060e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 4.985439e+000 5.868241e+000 vertex 4.982020e+001 2.880478e+000 6.026060e+000 vertex 4.982020e+001 3.015823e+000 5.520945e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 5.061400e+000 5.000000e+000 vertex 4.982020e+001 3.015823e+000 5.520945e+000 vertex 4.982020e+001 3.061400e+000 5.000000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 3.015823e+000 4.479055e+000 vertex 4.982020e+001 5.061400e+000 5.000000e+000 vertex 4.982020e+001 3.061400e+000 5.000000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 3.015823e+000 4.479055e+000 vertex 4.982020e+001 2.880478e+000 3.973940e+000 vertex 4.982020e+001 5.061400e+000 5.000000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 5.061400e+000 5.000000e+000 vertex 4.982020e+001 2.880478e+000 3.973940e+000 vertex 4.982020e+001 2.659476e+000 3.500000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 2.359533e+000 3.071637e+000 vertex 4.982020e+001 5.061400e+000 5.000000e+000 vertex 4.982020e+001 2.659476e+000 3.500000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 2.359533e+000 3.071637e+000 vertex 4.982020e+001 1.989763e+000 2.701867e+000 vertex 4.982020e+001 5.061400e+000 5.000000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 5.061400e+000 5.000000e+000 vertex 4.982020e+001 1.989763e+000 2.701867e+000 vertex 4.982020e+001 2.506140e+001 0.000000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 2.506140e+001 5.000000e+000 vertex 4.982020e+001 5.061400e+000 5.000000e+000 vertex 4.982020e+001 2.506140e+001 0.000000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 1.989763e+000 2.701867e+000 vertex 4.982020e+001 1.561400e+000 2.401924e+000 vertex 4.982020e+001 6.140000e-002 -8.881784e-016 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 2.506140e+001 0.000000e+000 vertex 4.982020e+001 1.989763e+000 2.701867e+000 vertex 4.982020e+001 6.140000e-002 -8.881784e-016 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 1.561400e+000 2.401924e+000 vertex 4.982020e+001 1.087460e+000 2.180922e+000 vertex 4.982020e+001 6.140000e-002 -8.881784e-016 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 6.140000e-002 -8.881784e-016 vertex 4.982020e+001 1.087460e+000 2.180922e+000 vertex 4.982020e+001 5.823445e-001 2.045577e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 6.140000e-002 2.000000e+000 vertex 4.982020e+001 6.140000e-002 -8.881784e-016 vertex 4.982020e+001 5.823445e-001 2.045577e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 6.140000e-002 2.000000e+000 vertex 4.982020e+001 -4.595445e-001 2.045577e+000 vertex 4.982020e+001 6.140000e-002 -8.881784e-016 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 6.140000e-002 -8.881784e-016 vertex 4.982020e+001 -4.595445e-001 2.045577e+000 vertex 4.982020e+001 -8.068409e-001 7.596123e-002 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -8.068409e-001 7.596123e-002 vertex 4.982020e+001 -4.595445e-001 2.045577e+000 vertex 4.982020e+001 -9.646604e-001 2.180922e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -1.648701e+000 3.015369e-001 vertex 4.982020e+001 -9.646604e-001 2.180922e+000 vertex 4.982020e+001 -1.438600e+000 2.401924e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -2.438600e+000 6.698730e-001 vertex 4.982020e+001 -1.438600e+000 2.401924e+000 vertex 4.982020e+001 -1.866963e+000 2.701867e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -3.152538e+000 1.169778e+000 vertex 4.982020e+001 -1.866963e+000 2.701867e+000 vertex 4.982020e+001 -3.768822e+000 1.786062e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -3.152538e+000 1.169778e+000 vertex 4.982020e+001 -2.438600e+000 6.698730e-001 vertex 4.982020e+001 -1.866963e+000 2.701867e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -1.866963e+000 2.701867e+000 vertex 4.982020e+001 -2.236733e+000 3.071637e+000 vertex 4.982020e+001 -3.768822e+000 1.786062e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -3.768822e+000 1.786062e+000 vertex 4.982020e+001 -2.236733e+000 3.071637e+000 vertex 4.982020e+001 -4.268727e+000 2.500000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -4.268727e+000 2.500000e+000 vertex 4.982020e+001 -2.236733e+000 3.071637e+000 vertex 4.982020e+001 -2.536676e+000 3.500000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -4.637063e+000 3.289899e+000 vertex 4.982020e+001 -2.536676e+000 3.500000e+000 vertex 4.982020e+001 -2.757678e+000 3.973940e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -4.862639e+000 4.131759e+000 vertex 4.982020e+001 -2.757678e+000 3.973940e+000 vertex 4.982020e+001 -2.893023e+000 4.479055e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -4.938600e+000 5.000000e+000 vertex 4.982020e+001 -2.893023e+000 4.479055e+000 vertex 4.982020e+001 -2.938600e+000 5.000000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -4.862639e+000 5.868241e+000 vertex 4.982020e+001 -4.938600e+000 5.000000e+000 vertex 4.982020e+001 -2.938600e+000 5.000000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 5.061400e+000 5.000000e+000 vertex 4.982020e+001 4.985439e+000 5.868241e+000 vertex 4.982020e+001 3.015823e+000 5.520945e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 4.759863e+000 6.710101e+000 vertex 4.982020e+001 2.880478e+000 6.026060e+000 vertex 4.982020e+001 4.985439e+000 5.868241e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 3.275338e+000 8.830222e+000 vertex 4.982020e+001 2.561400e+000 9.330127e+000 vertex 4.982020e+001 1.989763e+000 7.298133e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 2.561400e+000 9.330127e+000 vertex 4.982020e+001 1.771501e+000 9.698463e+000 vertex 4.982020e+001 1.561400e+000 7.598076e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 1.771501e+000 9.698463e+000 vertex 4.982020e+001 9.296409e-001 9.924039e+000 vertex 4.982020e+001 1.087460e+000 7.819078e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 9.296409e-001 9.924039e+000 vertex 4.982020e+001 6.140000e-002 1.000000e+001 vertex 4.982020e+001 5.823445e-001 7.954423e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 6.140000e-002 1.000000e+001 vertex 4.982020e+001 -8.068409e-001 9.924039e+000 vertex 4.982020e+001 6.140000e-002 8.000000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -8.068409e-001 9.924039e+000 vertex 4.982020e+001 -1.648701e+000 9.698463e+000 vertex 4.982020e+001 -4.595445e-001 7.954423e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -1.648701e+000 9.698463e+000 vertex 4.982020e+001 -2.438600e+000 9.330127e+000 vertex 4.982020e+001 -9.646604e-001 7.819078e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -3.768822e+000 8.213938e+000 vertex 4.982020e+001 -4.268727e+000 7.500000e+000 vertex 4.982020e+001 -2.536676e+000 6.500000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -4.862639e+000 4.131759e+000 vertex 4.982020e+001 -2.893023e+000 4.479055e+000 vertex 4.982020e+001 -4.938600e+000 5.000000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -4.862639e+000 4.131759e+000 vertex 4.982020e+001 -4.637063e+000 3.289899e+000 vertex 4.982020e+001 -2.757678e+000 3.973940e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -4.637063e+000 3.289899e+000 vertex 4.982020e+001 -4.268727e+000 2.500000e+000 vertex 4.982020e+001 -2.536676e+000 3.500000e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -2.438600e+000 6.698730e-001 vertex 4.982020e+001 -1.648701e+000 3.015369e-001 vertex 4.982020e+001 -1.438600e+000 2.401924e+000 endloop endfacet facet normal 1.000000e+000 0.000000e+000 0.000000e+000 outer loop vertex 4.982020e+001 -8.068409e-001 7.596123e-002 vertex 4.982020e+001 -9.646604e-001 2.180922e+000 vertex 4.982020e+001 -1.648701e+000 3.015369e-001 endloop endfacet endsolid netgen-6.2.1804/nglib/CMakeLists.txt0000644000175000017500000000263613272137567015647 0ustar kurtkurtadd_definitions(-DNGLIB_EXPORTS) if(WIN32) set(nglib_objects $ $ $ $ $ $ $ $ $ $ $ ) if(USE_GUI) set(nglib_objects ${nglib_objects} $ $ $ ) endif(USE_GUI) endif(WIN32) add_library(nglib SHARED nglib.cpp ${nglib_objects}) if(NOT WIN32) target_link_libraries( nglib mesh stl interface geom2d csg stl visual) if(USE_GUI) target_link_libraries( nglib stlvis geom2dvis csgvis ) endif(USE_GUI) endif(NOT WIN32) target_link_libraries( nglib ${OCC_LIBRARIES} ${MPI_CXX_LIBRARIES} ${OPENGL_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${X11_Xmu_LIB} ${JPEG_LIBRARIES} ${MKL_LIBRARIES} ${ZLIB_LIBRARIES} ${OCC_LIBRARIES} ) if(USE_OCC AND NOT WIN32) target_link_libraries(nglib occ) endif(USE_OCC AND NOT WIN32) if(USE_PYTHON) target_link_libraries(nglib ${PYTHON_LIBRARIES}) endif(USE_PYTHON) install(TARGETS nglib ${NG_INSTALL_DIR}) install(FILES nglib.h DESTINATION ${NG_INSTALL_DIR_INCLUDE} COMPONENT netgen_devel) netgen-6.2.1804/nglib/ng_occ.cpp0000644000175000017500000000723113272137567015037 0ustar kurtkurt#include #include #include "TopTools_IndexedMapOfShape.hxx" #include "TopoDS.hxx" #include "TopoDS_Face.hxx" #include "TopoDS_Shape.hxx" #include "GProp_GProps.hxx" #include "BRepGProp.hxx" using namespace std; namespace nglib { #include } int main (int argc, char ** argv) { using namespace nglib; cout << "Netgen NgLib - OpenCascade Test Case" << endl; if (argc != 2) { cerr << "use: ng_occ " << endl; return 1; } // Define pointer to OCC Geometry Ng_OCC_Geometry *occ_geom; Ng_Mesh *occ_mesh; Ng_Meshing_Parameters mp; TopTools_IndexedMapOfShape FMap; Ng_OCC_TopTools_IndexedMapOfShape *occ_fmap = (Ng_OCC_TopTools_IndexedMapOfShape*)&FMap; // Result of Netgen Operations Ng_Result ng_res; // Initialise the Netgen Core library Ng_Init(); // Read in the OCC File occ_geom = Ng_OCC_Load_STEP(argv[1]); if(!occ_geom) { cout << "Error reading in STEP File: " << argv[1] << endl; return 1; } cout << "Successfully loaded STEP File: " << argv[1] << endl; occ_mesh = Ng_NewMesh(); ng_res = Ng_OCC_GetFMap(occ_geom,occ_fmap); cout << "ng_res = " << ng_res << endl; if(!FMap.Extent()) { cout << "Error retrieving Face map...." << endl; return 1; } cout << "Successfully extracted the Face Map....:" << FMap.Extent() << endl; for(int i = 1; i <= FMap.Extent(); i++) { TopoDS_Face OCCface; OCCface = TopoDS::Face(FMap.FindKey(i)); GProp_GProps faceProps; BRepGProp::SurfaceProperties(OCCface,faceProps); cout << "Index: " << i << " :: Area: " << faceProps.Mass() << " :: Hash: " << OCCface.HashCode(1e+6) << endl; } mp.uselocalh = 1; mp.elementsperedge = 2.0; mp.elementspercurve = 2.0; mp.maxh = 10.0; mp.grading = 0.2; mp.closeedgeenable = 0; mp.closeedgefact = 1.0; mp.optsurfmeshenable = 1; cout << "Setting Local Mesh size....." << endl; cout << "OCC Mesh Pointer before call = " << occ_mesh << endl; Ng_OCC_SetLocalMeshSize(occ_geom, occ_mesh, &mp); cout << "Local Mesh size successfully set....." << endl; cout << "OCC Mesh Pointer after call = " << occ_mesh << endl; cout << "Creating Edge Mesh....." << endl; ng_res = Ng_OCC_GenerateEdgeMesh(occ_geom, occ_mesh, &mp); if(ng_res != NG_OK) { Ng_DeleteMesh(occ_mesh); cout << "Error creating Edge Mesh.... Aborting!!" << endl; return 1; } else { cout << "Edge Mesh successfully created....." << endl; cout << "Number of points = " << Ng_GetNP(occ_mesh) << endl; } cout << "Creating Surface Mesh....." << endl; ng_res = Ng_OCC_GenerateSurfaceMesh(occ_geom, occ_mesh, &mp); if(ng_res != NG_OK) { Ng_DeleteMesh(occ_mesh); cout << "Error creating Surface Mesh..... Aborting!!" << endl; return 1; } else { cout << "Surface Mesh successfully created....." << endl; cout << "Number of points = " << Ng_GetNP(occ_mesh) << endl; cout << "Number of surface elements = " << Ng_GetNSE(occ_mesh) << endl; } cout << "Creating Volume Mesh....." << endl; ng_res = Ng_GenerateVolumeMesh(occ_mesh, &mp); cout << "Volume Mesh successfully created....." << endl; cout << "Number of points = " << Ng_GetNP(occ_mesh) << endl; cout << "Number of volume elements = " << Ng_GetNE(occ_mesh) << endl; cout << "Saving Mesh as VOL file....." << endl; Ng_SaveMesh(occ_mesh,"test_occ.vol"); return 0; } netgen-6.2.1804/nglib/nglib.cpp0000644000175000017500000007162213272137567014707 0ustar kurtkurt/**************************************************************************/ /* File: nglib.cpp */ /* Author: Joachim Schoeberl */ /* Date: 7. May. 2000 */ /**************************************************************************/ /* Interface to the netgen meshing kernel */ #include #include #include #include #include #include #include #include <../visualization/soldata.hpp> #ifdef OCCGEOMETRY #include #endif #include namespace netgen { extern void MeshFromSpline2D (SplineGeometry2d & geometry, shared_ptr & mesh, MeshingParameters & mp); } #ifdef PARALLEL #include namespace netgen { // int id = 0, ntasks = 1; MPI_Comm mesh_comm; } #endif /* namespace netgen { int id = 0, ntasks = 1; } */ /* // should not be needed (occ currently requires it) namespace netgen { #include "../libsrc/visualization/vispar.hpp" VisualizationParameters vispar; VisualizationParameters :: VisualizationParameters() { ; } } */ namespace nglib { #include "nglib.h" } using namespace netgen; // constants and types: namespace nglib { inline void NOOP_Deleter(void *) { ; } // initialize, deconstruct Netgen library: DLL_HEADER void Ng_Init () { mycout = &cout; myerr = &cerr; // netgen::testout->SetOutStream (new ofstream ("test.out")); testout = new ofstream ("test.out"); } // Clean-up functions before ending usage of nglib DLL_HEADER void Ng_Exit () { ; } // Create a new netgen mesh object DLL_HEADER Ng_Mesh * Ng_NewMesh () { Mesh * mesh = new Mesh; mesh->AddFaceDescriptor (FaceDescriptor (1, 1, 0, 1)); return (Ng_Mesh*)(void*)mesh; } // Delete an existing netgen mesh object DLL_HEADER void Ng_DeleteMesh (Ng_Mesh * mesh) { if(mesh != NULL) { // Delete the Mesh structures ((Mesh*)mesh)->DeleteMesh(); // Now delete the Mesh class itself delete (Mesh*)mesh; // Set the Ng_Mesh pointer to NULL mesh = NULL; } } // Save a netgen mesh in the native VOL format DLL_HEADER void Ng_SaveMesh(Ng_Mesh * mesh, const char* filename) { ((Mesh*)mesh)->Save(filename); } // Load a netgen native VOL mesh from a given file DLL_HEADER Ng_Mesh * Ng_LoadMesh(const char* filename) { Mesh * mesh = new Mesh; mesh->Load(filename); return ( (Ng_Mesh*)mesh ); } // Merge another mesh file into the currently loaded one DLL_HEADER Ng_Result Ng_MergeMesh( Ng_Mesh* mesh, const char* filename) { Ng_Result status = NG_OK; ifstream infile(filename); Mesh * m = (Mesh*)mesh; if(!infile.good()) { status = NG_FILE_NOT_FOUND; } if(!m) { status = NG_ERROR; } if(status == NG_OK) { const int num_pts = m->GetNP(); const int face_offset = m->GetNFD(); m->Merge(infile, face_offset); if(m->GetNP() > num_pts) { status = NG_OK; } else { status = NG_ERROR; } } return status; } // Merge another mesh file into the currently loaded one DLL_HEADER Ng_Result Ng_MergeMesh( Ng_Mesh* mesh1, Ng_Mesh* mesh2) { return NG_ERROR; } // Manually add a point to an existing mesh object DLL_HEADER void Ng_AddPoint (Ng_Mesh * mesh, double * x) { Mesh * m = (Mesh*)mesh; m->AddPoint (Point3d (x[0], x[1], x[2])); } // Manually add a surface element of a given type to an existing mesh object DLL_HEADER void Ng_AddSurfaceElement (Ng_Mesh * mesh, Ng_Surface_Element_Type et, int * pi) { Mesh * m = (Mesh*)mesh; Element2d el (3); el.SetIndex (1); el.PNum(1) = pi[0]; el.PNum(2) = pi[1]; el.PNum(3) = pi[2]; m->AddSurfaceElement (el); } // Manually add a volume element of a given type to an existing mesh object DLL_HEADER void Ng_AddVolumeElement (Ng_Mesh * mesh, Ng_Volume_Element_Type et, int * pi) { Mesh * m = (Mesh*)mesh; Element el (4); el.SetIndex (1); el.PNum(1) = pi[0]; el.PNum(2) = pi[1]; el.PNum(3) = pi[2]; el.PNum(4) = pi[3]; m->AddVolumeElement (el); } // Obtain the number of points in the mesh DLL_HEADER int Ng_GetNP (Ng_Mesh * mesh) { return ((Mesh*)mesh) -> GetNP(); } // Obtain the number of surface elements in the mesh DLL_HEADER int Ng_GetNSE (Ng_Mesh * mesh) { return ((Mesh*)mesh) -> GetNSE(); } // Obtain the number of volume elements in the mesh DLL_HEADER int Ng_GetNE (Ng_Mesh * mesh) { return ((Mesh*)mesh) -> GetNE(); } // Return point coordinates of a given point index in the mesh DLL_HEADER void Ng_GetPoint (Ng_Mesh * mesh, int num, double * x) { const Point3d & p = ((Mesh*)mesh)->Point(num); x[0] = p.X(); x[1] = p.Y(); x[2] = p.Z(); } // Return the surface element at a given index "pi" DLL_HEADER Ng_Surface_Element_Type Ng_GetSurfaceElement (Ng_Mesh * mesh, int num, int * pi) { const Element2d & el = ((Mesh*)mesh)->SurfaceElement(num); for (int i = 1; i <= el.GetNP(); i++) pi[i-1] = el.PNum(i); Ng_Surface_Element_Type et; switch (el.GetNP()) { case 3: et = NG_TRIG; break; case 4: et = NG_QUAD; break; case 6: switch (el.GetNV()) { case 3: et = NG_TRIG6; break; case 4: et = NG_QUAD6; break; default: et = NG_TRIG6; break; } break; case 8: et = NG_QUAD8; break; default: et = NG_TRIG; break; // for the compiler } return et; } // Return the volume element at a given index "pi" DLL_HEADER Ng_Volume_Element_Type Ng_GetVolumeElement (Ng_Mesh * mesh, int num, int * pi) { const Element & el = ((Mesh*)mesh)->VolumeElement(num); for (int i = 1; i <= el.GetNP(); i++) pi[i-1] = el.PNum(i); Ng_Volume_Element_Type et; switch (el.GetNP()) { case 4: et = NG_TET; break; case 5: et = NG_PYRAMID; break; case 6: et = NG_PRISM; break; case 10: et = NG_TET10; break; default: et = NG_TET; break; // for the compiler } return et; } // Set a global limit on the maximum mesh size allowed DLL_HEADER void Ng_RestrictMeshSizeGlobal (Ng_Mesh * mesh, double h) { ((Mesh*)mesh) -> SetGlobalH (h); } // Set a local limit on the maximum mesh size allowed around the given point DLL_HEADER void Ng_RestrictMeshSizePoint (Ng_Mesh * mesh, double * p, double h) { ((Mesh*)mesh) -> RestrictLocalH (Point3d (p[0], p[1], p[2]), h); } // Set a local limit on the maximum mesh size allowed within a given box region DLL_HEADER void Ng_RestrictMeshSizeBox (Ng_Mesh * mesh, double * pmin, double * pmax, double h) { for (double x = pmin[0]; x < pmax[0]; x += h) for (double y = pmin[1]; y < pmax[1]; y += h) for (double z = pmin[2]; z < pmax[2]; z += h) ((Mesh*)mesh) -> RestrictLocalH (Point3d (x, y, z), h); } // Generates volume mesh from an existing surface mesh DLL_HEADER Ng_Result Ng_GenerateVolumeMesh (Ng_Mesh * mesh, Ng_Meshing_Parameters * mp) { Mesh * m = (Mesh*)mesh; // Philippose - 30/08/2009 // Do not locally re-define "mparam" here... "mparam" is a global // object //MeshingParameters mparam; mp->Transfer_Parameters(); m->CalcLocalH(mparam.grading); MeshVolume (mparam, *m); RemoveIllegalElements (*m); OptimizeVolume (mparam, *m); return NG_OK; } /* ------------------ 2D Meshing Functions ------------------------- */ DLL_HEADER void Ng_AddPoint_2D (Ng_Mesh * mesh, double * x) { Mesh * m = (Mesh*)mesh; m->AddPoint (Point3d (x[0], x[1], 0)); } DLL_HEADER void Ng_AddBoundarySeg_2D (Ng_Mesh * mesh, int pi1, int pi2) { Mesh * m = (Mesh*)mesh; Segment seg; seg[0] = pi1; seg[1] = pi2; m->AddSegment (seg); } DLL_HEADER int Ng_GetNP_2D (Ng_Mesh * mesh) { Mesh * m = (Mesh*)mesh; return m->GetNP(); } DLL_HEADER int Ng_GetNE_2D (Ng_Mesh * mesh) { Mesh * m = (Mesh*)mesh; return m->GetNSE(); } DLL_HEADER int Ng_GetNSeg_2D (Ng_Mesh * mesh) { Mesh * m = (Mesh*)mesh; return m->GetNSeg(); } DLL_HEADER void Ng_GetPoint_2D (Ng_Mesh * mesh, int num, double * x) { Mesh * m = (Mesh*)mesh; Point<3> & p = m->Point(num); x[0] = p(0); x[1] = p(1); } DLL_HEADER Ng_Surface_Element_Type Ng_GetElement_2D (Ng_Mesh * mesh, int num, int * pi, int * matnum) { const Element2d & el = ((Mesh*)mesh)->SurfaceElement(num); for (int i = 1; i <= el.GetNP(); i++) pi[i-1] = el.PNum(i); Ng_Surface_Element_Type et; switch (el.GetNP()) { case 3: et = NG_TRIG; break; case 4: et = NG_QUAD; break; case 6: switch (el.GetNV()) { case 3: et = NG_TRIG6; break; case 4: et = NG_QUAD6; break; default: et = NG_TRIG6; break; } break; case 8: et = NG_QUAD8; break; default: et = NG_TRIG; break; // for the compiler } if (matnum) *matnum = el.GetIndex(); return et; } DLL_HEADER void Ng_GetSegment_2D (Ng_Mesh * mesh, int num, int * pi, int * matnum) { const Segment & seg = ((Mesh*)mesh)->LineSegment(num); pi[0] = seg[0]; pi[1] = seg[1]; if (matnum) *matnum = seg.edgenr; } DLL_HEADER Ng_Geometry_2D * Ng_LoadGeometry_2D (const char * filename) { SplineGeometry2d * geom = new SplineGeometry2d(); geom -> Load (filename); return (Ng_Geometry_2D *)geom; } DLL_HEADER Ng_Result Ng_GenerateMesh_2D (Ng_Geometry_2D * geom, Ng_Mesh ** mesh, Ng_Meshing_Parameters * mp) { // use global variable mparam // MeshingParameters mparam; mp->Transfer_Parameters(); shared_ptr m(new Mesh, &NOOP_Deleter); MeshFromSpline2D (*(SplineGeometry2d*)geom, m, mparam); // new shared_ptr (m); // hack to keep mesh m alive cout << m->GetNSE() << " elements, " << m->GetNP() << " points" << endl; *mesh = (Ng_Mesh*)m.get(); return NG_OK; } DLL_HEADER void Ng_HP_Refinement (Ng_Geometry_2D * geom, Ng_Mesh * mesh, int levels) { Refinement2d ref(*(SplineGeometry2d*)geom); HPRefinement (*(Mesh*)mesh, &ref, levels); } DLL_HEADER void Ng_HP_Refinement (Ng_Geometry_2D * geom, Ng_Mesh * mesh, int levels, double parameter) { Refinement2d ref(*(SplineGeometry2d*)geom); HPRefinement (*(Mesh*)mesh, &ref, levels, parameter); } Array readtrias; //only before initstlgeometry Array > readedges; //only before init stlgeometry // loads geometry from STL file DLL_HEADER Ng_STL_Geometry * Ng_STL_LoadGeometry (const char * filename, int binary) { int i; STLGeometry geom; STLGeometry* geo; ifstream ist(filename); if (binary) { geo = geom.LoadBinary(ist); } else { geo = geom.Load(ist); } readtrias.SetSize(0); readedges.SetSize(0); Point3d p; Vec3d normal; double p1[3]; double p2[3]; double p3[3]; double n[3]; Ng_STL_Geometry * geo2 = Ng_STL_NewGeometry(); for (i = 1; i <= geo->GetNT(); i++) { const STLTriangle& t = geo->GetTriangle(i); p = geo->GetPoint(t.PNum(1)); p1[0] = p.X(); p1[1] = p.Y(); p1[2] = p.Z(); p = geo->GetPoint(t.PNum(2)); p2[0] = p.X(); p2[1] = p.Y(); p2[2] = p.Z(); p = geo->GetPoint(t.PNum(3)); p3[0] = p.X(); p3[1] = p.Y(); p3[2] = p.Z(); normal = t.Normal(); n[0] = normal.X(); n[1] = normal.Y(); n[2] = normal.Z(); Ng_STL_AddTriangle(geo2, p1, p2, p3, n); } return geo2; } // generate new STL Geometry DLL_HEADER Ng_STL_Geometry * Ng_STL_NewGeometry () { return (Ng_STL_Geometry*)(void*)new STLGeometry; } // after adding triangles (and edges) initialize DLL_HEADER Ng_Result Ng_STL_InitSTLGeometry (Ng_STL_Geometry * geom) { STLGeometry* geo = (STLGeometry*)geom; geo->InitSTLGeometry(readtrias); readtrias.SetSize(0); if (readedges.Size() != 0) { /* for (int i = 1; i <= readedges.Size(); i+=2) { cout << "e(" << readedges.Get(i) << "," << readedges.Get(i+1) << ")" << endl; } */ geo->AddEdges(readedges); } if (geo->GetStatus() == STLTopology::STL_GOOD || geo->GetStatus() == STLTopology::STL_WARNING) return NG_OK; return NG_SURFACE_INPUT_ERROR; } // automatically generates edges: DLL_HEADER Ng_Result Ng_STL_MakeEdges (Ng_STL_Geometry * geom, Ng_Mesh* mesh, Ng_Meshing_Parameters * mp) { STLGeometry* stlgeometry = (STLGeometry*)geom; Mesh* me = (Mesh*)mesh; // Philippose - 27/07/2009 // Do not locally re-define "mparam" here... "mparam" is a global // object //MeshingParameters mparam; mp->Transfer_Parameters(); me -> SetGlobalH (mparam.maxh); me -> SetLocalH (stlgeometry->GetBoundingBox().PMin() - Vec3d(10, 10, 10), stlgeometry->GetBoundingBox().PMax() + Vec3d(10, 10, 10), 0.3); // cout << "meshsize = " << mp->meshsize_filename << endl; if (mp->meshsize_filename) me -> LoadLocalMeshSize (mp->meshsize_filename); /* if (mp->meshsize_filename) { ifstream infile (mp->meshsize_filename); if (!infile.good()) return NG_FILE_NOT_FOUND; me -> LoadLocalMeshSize (infile); } */ STLMeshing (*stlgeometry, *me); stlgeometry->edgesfound = 1; stlgeometry->surfacemeshed = 0; stlgeometry->surfaceoptimized = 0; stlgeometry->volumemeshed = 0; return NG_OK; } // generates mesh, empty mesh be already created. DLL_HEADER Ng_Result Ng_STL_GenerateSurfaceMesh (Ng_STL_Geometry * geom, Ng_Mesh* mesh, Ng_Meshing_Parameters * mp) { STLGeometry* stlgeometry = (STLGeometry*)geom; Mesh* me = (Mesh*)mesh; // Philippose - 27/07/2009 // Do not locally re-define "mparam" here... "mparam" is a global // object //MeshingParameters mparam; mp->Transfer_Parameters(); /* me -> SetGlobalH (mparam.maxh); me -> SetLocalH (stlgeometry->GetBoundingBox().PMin() - Vec3d(10, 10, 10), stlgeometry->GetBoundingBox().PMax() + Vec3d(10, 10, 10), 0.3); */ /* STLMeshing (*stlgeometry, *me); stlgeometry->edgesfound = 1; stlgeometry->surfacemeshed = 0; stlgeometry->surfaceoptimized = 0; stlgeometry->volumemeshed = 0; */ int retval = STLSurfaceMeshing (*stlgeometry, *me); if (retval == MESHING3_OK) { (*mycout) << "Success !!!!" << endl; stlgeometry->surfacemeshed = 1; stlgeometry->surfaceoptimized = 0; stlgeometry->volumemeshed = 0; } else if (retval == MESHING3_OUTERSTEPSEXCEEDED) { (*mycout) << "ERROR: Give up because of too many trials. Meshing aborted!" << endl; } else if (retval == MESHING3_TERMINATE) { (*mycout) << "Meshing Stopped!" << endl; } else { (*mycout) << "ERROR: Surface meshing not successful. Meshing aborted!" << endl; } STLSurfaceOptimization (*stlgeometry, *me, mparam); return NG_OK; } // fills STL Geometry // positive orientation // normal vector may be null-pointer DLL_HEADER void Ng_STL_AddTriangle (Ng_STL_Geometry * geom, double * p1, double * p2, double * p3, double * nv) { Point<3> apts[3]; apts[0] = Point<3>(p1[0],p1[1],p1[2]); apts[1] = Point<3>(p2[0],p2[1],p2[2]); apts[2] = Point<3>(p3[0],p3[1],p3[2]); Vec<3> n; if (!nv) n = Cross (apts[0]-apts[1], apts[0]-apts[2]); else n = Vec<3>(nv[0],nv[1],nv[2]); readtrias.Append(STLReadTriangle(apts,n)); } // add (optional) edges: DLL_HEADER void Ng_STL_AddEdge (Ng_STL_Geometry * geom, double * p1, double * p2) { readedges.Append(Point3d(p1[0],p1[1],p1[2])); readedges.Append(Point3d(p2[0],p2[1],p2[2])); } #ifdef OCCGEOMETRY // --------------------- OCC Geometry / Meshing Utility Functions ------------------- // Create new OCC Geometry Object DLL_HEADER Ng_OCC_Geometry * Ng_OCC_NewGeometry () { return (Ng_OCC_Geometry*)(void*)new OCCGeometry; } // Delete the OCC Geometry Object DLL_HEADER Ng_Result Ng_OCC_DeleteGeometry(Ng_OCC_Geometry * geom) { if (geom != NULL) { delete (OCCGeometry*)geom; geom = NULL; return NG_OK; } return NG_ERROR; } // Loads geometry from STEP File DLL_HEADER Ng_OCC_Geometry * Ng_OCC_Load_STEP (const char * filename) { // Call the STEP File Load function. Note.. the geometry class // is created and instantiated within the load function OCCGeometry * occgeo = LoadOCC_STEP(filename); return ((Ng_OCC_Geometry *)occgeo); } // Loads geometry from IGES File DLL_HEADER Ng_OCC_Geometry * Ng_OCC_Load_IGES (const char * filename) { // Call the IGES File Load function. Note.. the geometry class // is created and instantiated within the load function OCCGeometry * occgeo = LoadOCC_IGES(filename); return ((Ng_OCC_Geometry *)occgeo); } // Loads geometry from BREP File DLL_HEADER Ng_OCC_Geometry * Ng_OCC_Load_BREP (const char * filename) { // Call the BREP File Load function. Note.. the geometry class // is created and instantiated within the load function OCCGeometry * occgeo = LoadOCC_BREP(filename); return ((Ng_OCC_Geometry *)occgeo); } // Locally limit the size of the mesh to be generated at various points // based on the topology of the geometry DLL_HEADER Ng_Result Ng_OCC_SetLocalMeshSize (Ng_OCC_Geometry * geom, Ng_Mesh * mesh, Ng_Meshing_Parameters * mp) { OCCGeometry * occgeom = (OCCGeometry*)geom; Mesh * me = (Mesh*)mesh; me->geomtype = Mesh::GEOM_OCC; mp->Transfer_Parameters(); occparam.resthcloseedgeenable = mp->closeedgeenable; occparam.resthcloseedgefac = mp->closeedgefact; // Delete the mesh structures in order to start with a clean // slate me->DeleteMesh(); OCCSetLocalMeshSize(*occgeom, *me); return(NG_OK); } // Mesh the edges and add Face descriptors to prepare for surface meshing DLL_HEADER Ng_Result Ng_OCC_GenerateEdgeMesh (Ng_OCC_Geometry * geom, Ng_Mesh * mesh, Ng_Meshing_Parameters * mp) { OCCGeometry * occgeom = (OCCGeometry*)geom; Mesh * me = (Mesh*)mesh; mp->Transfer_Parameters(); OCCFindEdges(*occgeom, *me); if((me->GetNP()) && (me->GetNFD())) { return NG_OK; } else { return NG_ERROR; } } // Mesh the edges and add Face descriptors to prepare for surface meshing DLL_HEADER Ng_Result Ng_OCC_GenerateSurfaceMesh (Ng_OCC_Geometry * geom, Ng_Mesh * mesh, Ng_Meshing_Parameters * mp) { int numpoints = 0; OCCGeometry * occgeom = (OCCGeometry*)geom; Mesh * me = (Mesh*)mesh; // Set the internal meshing parameters structure from the nglib meshing // parameters structure mp->Transfer_Parameters(); // Only go into surface meshing if the face descriptors have already been added if(!me->GetNFD()) return NG_ERROR; numpoints = me->GetNP(); // Initially set up only for surface meshing without any optimisation int perfstepsend = MESHCONST_MESHSURFACE; // Check and if required, enable surface mesh optimisation step if(mp->optsurfmeshenable) { perfstepsend = MESHCONST_OPTSURFACE; } OCCMeshSurface(*occgeom, *me, perfstepsend); me->CalcSurfacesOfNode(); if(me->GetNP() <= numpoints) return NG_ERROR; if(me->GetNSE() <= 0) return NG_ERROR; return NG_OK; } // Extract the face map from the OCC geometry // The face map basically gives an index to each face in the geometry, // which can be used to access a specific face DLL_HEADER Ng_Result Ng_OCC_GetFMap(Ng_OCC_Geometry * geom, Ng_OCC_TopTools_IndexedMapOfShape * FMap) { OCCGeometry* occgeom = (OCCGeometry*)geom; TopTools_IndexedMapOfShape *occfmap = (TopTools_IndexedMapOfShape *)FMap; // Copy the face map from the geometry to the given variable occfmap->Assign(occgeom->fmap); if(occfmap->Extent()) { return NG_OK; } else { return NG_ERROR; } } // ------------------ End - OCC Geometry / Meshing Utility Functions ---------------- #endif // ------------------ Begin - Meshing Parameters related functions ------------------ // Constructor for the local nglib meshing parameters class DLL_HEADER Ng_Meshing_Parameters :: Ng_Meshing_Parameters() { uselocalh = 1; maxh = 1000; minh = 0.0; fineness = 0.5; grading = 0.3; elementsperedge = 2.0; elementspercurve = 2.0; closeedgeenable = 0; closeedgefact = 2.0; minedgelenenable = 0; minedgelen = 1e-4; second_order = 0; quad_dominated = 0; meshsize_filename = 0; optsurfmeshenable = 1; optvolmeshenable = 1; optsteps_2d = 3; optsteps_3d = 3; invert_tets = 0; invert_trigs = 0; check_overlap = 1; check_overlapping_boundary = 1; } // Reset the local meshing parameters to the default values DLL_HEADER void Ng_Meshing_Parameters :: Reset_Parameters() { uselocalh = 1; maxh = 1000; minh = 0; fineness = 0.5; grading = 0.3; elementsperedge = 2.0; elementspercurve = 2.0; closeedgeenable = 0; closeedgefact = 2.0; minedgelenenable = 0; minedgelen = 1e-4; second_order = 0; quad_dominated = 0; meshsize_filename = 0; optsurfmeshenable = 1; optvolmeshenable = 1; optsteps_2d = 3; optsteps_3d = 3; invert_tets = 0; invert_trigs = 0; check_overlap = 1; check_overlapping_boundary = 1; } // DLL_HEADER void Ng_Meshing_Parameters :: Transfer_Parameters() { mparam.uselocalh = uselocalh; mparam.maxh = maxh; mparam.minh = minh; mparam.grading = grading; mparam.curvaturesafety = elementspercurve; mparam.segmentsperedge = elementsperedge; mparam.secondorder = second_order; mparam.quad = quad_dominated; if (meshsize_filename) mparam.meshsizefilename = meshsize_filename; else mparam.meshsizefilename = ""; mparam.optsteps2d = optsteps_2d; mparam.optsteps3d = optsteps_3d; mparam.inverttets = invert_tets; mparam.inverttrigs = invert_trigs; mparam.checkoverlap = check_overlap; mparam.checkoverlappingboundary = check_overlapping_boundary; } // ------------------ End - Meshing Parameters related functions -------------------- // ------------------ Begin - Second Order Mesh generation functions ---------------- DLL_HEADER void Ng_Generate_SecondOrder(Ng_Mesh * mesh) { Refinement ref; ref.MakeSecondOrder(*(Mesh*) mesh); } DLL_HEADER void Ng_2D_Generate_SecondOrder(Ng_Geometry_2D * geom, Ng_Mesh * mesh) { ( (SplineGeometry2d*)geom ) -> GetRefinement().MakeSecondOrder( * (Mesh*) mesh ); } DLL_HEADER void Ng_STL_Generate_SecondOrder(Ng_STL_Geometry * geom, Ng_Mesh * mesh) { ((STLGeometry*)geom)->GetRefinement().MakeSecondOrder(*(Mesh*) mesh); } DLL_HEADER void Ng_CSG_Generate_SecondOrder (Ng_CSG_Geometry * geom, Ng_Mesh * mesh) { ((CSGeometry*)geom)->GetRefinement().MakeSecondOrder(*(Mesh*) mesh); } #ifdef OCCGEOMETRY DLL_HEADER void Ng_OCC_Generate_SecondOrder (Ng_OCC_Geometry * geom, Ng_Mesh * mesh) { ((OCCGeometry*)geom )->GetRefinement().MakeSecondOrder(*(Mesh*) mesh); } #endif // ------------------ End - Second Order Mesh generation functions ------------------ // ------------------ Begin - Uniform Mesh Refinement functions --------------------- DLL_HEADER void Ng_Uniform_Refinement (Ng_Mesh * mesh) { Refinement ref; ref.Refine ( * (Mesh*) mesh ); } DLL_HEADER void Ng_2D_Uniform_Refinement (Ng_Geometry_2D * geom, Ng_Mesh * mesh) { ( (SplineGeometry2d*)geom ) -> GetRefinement().Refine ( * (Mesh*) mesh ); } DLL_HEADER void Ng_STL_Uniform_Refinement (Ng_STL_Geometry * geom, Ng_Mesh * mesh) { ( (STLGeometry*)geom ) -> GetRefinement().Refine ( * (Mesh*) mesh ); } DLL_HEADER void Ng_CSG_Uniform_Refinement (Ng_CSG_Geometry * geom, Ng_Mesh * mesh) { ( (CSGeometry*)geom ) -> GetRefinement().Refine ( * (Mesh*) mesh ); } #ifdef OCCGEOMETRY DLL_HEADER void Ng_OCC_Uniform_Refinement (Ng_OCC_Geometry * geom, Ng_Mesh * mesh) { ( (OCCGeometry*)geom ) -> GetRefinement().Refine ( * (Mesh*) mesh ); } #endif // ------------------ End - Uniform Mesh Refinement functions ----------------------- } // End of namespace nglib // compatibility functions: namespace netgen { char geomfilename[255]; DLL_HEADER void MyError2 (const char * ch) { cerr << ch; } //Destination for messages, errors, ... DLL_HEADER void Ng_PrintDest2(const char * s) { #ifdef PARALLEL int id = 0; MPI_Comm_rank(MPI_COMM_WORLD, &id); if (id != 0) return; #endif (*mycout) << s << flush; } /* DLL_HEADER double GetTime () { return 0; } */ #ifndef WIN32 void ResetTime () { ; } #endif void MyBeep (int i) { ; } //void Render() { ; } } // End of namespace netgen /* #ifndef WIN32 void Ng_Redraw () { ; } void Ng_ClearSolutionData() { ; } #endif void Ng_SetSolutionData (Ng_SolutionData * soldata) { delete soldata->solclass; } void Ng_InitSolutionData (Ng_SolutionData * soldata) { ; } */ // Force linking libinterface to libnglib #include <../interface/writeuser.hpp> void MyDummyToForceLinkingLibInterface(Mesh &mesh, NetgenGeometry &geom) { netgen::WriteUserFormat("", mesh, /* geom, */ ""); } netgen-6.2.1804/CMakeLists.txt0000644000175000017500000005161713272137567014557 0ustar kurtkurtif(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING INTERNAL) endif(NOT CMAKE_BUILD_TYPE) cmake_minimum_required(VERSION 3.1.3) if(NOT WIN32) option( USE_NATIVE_ARCH "build which -march=native" ON) endif(NOT WIN32) option( USE_GUI "don't build netgen with GUI" ON ) option( USE_PYTHON "build with python interface" ON ) option( USE_MPI "enable mpi parallelization" OFF ) option( USE_OCC "(not supported) compile with OpenCascade geometry kernel" OFF) option( USE_JPEG "enable snapshots using library libjpeg" OFF ) option( USE_MPEG "enable video recording with FFmpeg, uses libavcodec" OFF ) option( INTEL_MIC "cross compile for intel xeon phi") option( INSTALL_PROFILES "install environment variable settings to /etc/profile.d" OFF ) option( USE_CCACHE "use ccache") option( USE_INTERNAL_TCL "Compile tcl files into the code and don't install them" ON) option( USE_SUPERBUILD "use ccache" ON) set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" "${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_modules") if(APPLE) set(INSTALL_DIR_DEFAULT /Applications/Netgen.app) else(APPLE) if(WIN32) set(INSTALL_DIR_DEFAULT "C:/netgen") else(WIN32) set(INSTALL_DIR_DEFAULT /opt/netgen) endif(WIN32) endif(APPLE) if(INSTALL_DIR) message(WARNING "INSTALL_DIR is deprecated, use CMAKE_INSTALL_PREFIX instead") set(INSTALL_DIR_DEFAULT ${INSTALL_DIR}) endif(INSTALL_DIR) if(UNIX) message("Checking for write permissions in install directory...") execute_process(COMMAND mkdir -p ${CMAKE_INSTALL_PREFIX}) execute_process(COMMAND test -w ${CMAKE_INSTALL_PREFIX} RESULT_VARIABLE res) if(res) message(WARNING "No write access at install directory, please set correct permissions") endif() endif(UNIX) if (USE_SUPERBUILD) project (SUPERBUILD) if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) set(CMAKE_INSTALL_PREFIX "${INSTALL_DIR_DEFAULT}" CACHE PATH "Install directory" FORCE) endif() # execute the superbuild (this script will be invoked again without the # USE_SUPERBUILD option this time) include (cmake/SuperBuild.cmake) return() # stop processing this file further else() project(Netgen) if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) set(CMAKE_INSTALL_PREFIX "${INSTALL_DIR_DEFAULT}" CACHE PATH "Install directory" FORCE) endif() endif() set(NETGEN_VERSION_MAJOR 6) set(NETGEN_VERSION_MINOR 2) string(TIMESTAMP NETGEN_VERSION_PATCH "%y%U%w" ) set(NETGEN_VERSION "${NETGEN_VERSION_MAJOR}.${NETGEN_VERSION_MINOR}-dev") set(PACKAGE_VERSION "${NETGEN_VERSION_MAJOR}.${NETGEN_VERSION_MINOR}-${NETGEN_VERSION_PATCH}") set(CPACK_PACKAGE_VERSION "${PACKAGE_VERSION}") ####################################################################### if(USE_CCACHE) find_program(CCACHE_FOUND NAMES ccache ccache.bat) if(CCACHE_FOUND) set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${CCACHE_FOUND}) endif(CCACHE_FOUND) endif(USE_CCACHE) ####################################################################### if(USE_NATIVE_ARCH) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native") endif(USE_NATIVE_ARCH) ####################################################################### if(INTEL_MIC) set(MKL_ARCH "mic") include(cmake/mic.cmake) else(INTEL_MIC) set(MKL_ARCH "intel64") endif(INTEL_MIC) ####################################################################### # Append install paths of software in non-standard paths (e.g. openmpi, metis, intel mkl, ...) # cmake -DUSE_MPI=ON -DCMAKE_PREFIX_PATH="/opt/openmpi165;/opt/metis51" ../ set(ADDITIONAL_PATHS "" CACHE PATH "List of paths to additional libraries in non-standard locations, separated by ';'") if (ADDITIONAL_PATHS) set(CMAKE_PREFIX_PATH ${ADDITIONAL_PATHS}) endif (ADDITIONAL_PATHS) ####################################################################### # build options include_directories ("${PROJECT_SOURCE_DIR}/include") include_directories ("${PROJECT_SOURCE_DIR}/libsrc/include") include_directories ("${PROJECT_BINARY_DIR}") set(CMAKE_INCLUDE_CURRENT_DIR ON) if(USE_PYTHON) find_package(PythonInterp 3 REQUIRED) find_package(PythonLibs 3 REQUIRED) execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1,0,''))" OUTPUT_VARIABLE PYTHON_PACKAGES_INSTALL_DIR OUTPUT_STRIP_TRAILING_WHITESPACE) file(TO_CMAKE_PATH ${PYTHON_PACKAGES_INSTALL_DIR} PYTHON_PACKAGES_INSTALL_DIR) endif(USE_PYTHON) set(NG_INSTALL_SUFFIX netgen CACHE STRING "Suffix appended to install directories (project name)") if(APPLE) set(NG_INSTALL_DIR_BIN_DEFAULT Contents/MacOS) set(NG_INSTALL_DIR_LIB_DEFAULT Contents/MacOS) set(NG_INSTALL_DIR_CMAKE_DEFAULT Contents/Resources/CMake) set(NG_INSTALL_DIR_PYTHON_DEFAULT Contents/Resources/${PYTHON_PACKAGES_INSTALL_DIR}) set(NG_INSTALL_DIR_RES_DEFAULT Contents/Resources/share) set(NG_INSTALL_DIR_INCLUDE_DEFAULT Contents/Resources/include) set(NG_RPATH_TOKEN "@loader_path") else(APPLE) set(NG_INSTALL_DIR_BIN_DEFAULT bin) set(NG_INSTALL_DIR_LIB_DEFAULT lib) if(WIN32) set(NG_INSTALL_DIR_CMAKE_DEFAULT cmake) else(WIN32) set(NG_INSTALL_DIR_CMAKE_DEFAULT lib/cmake/${NG_INSTALL_SUFFIX}) endif(WIN32) set(NG_INSTALL_DIR_PYTHON_DEFAULT ${PYTHON_PACKAGES_INSTALL_DIR}) set(NG_INSTALL_DIR_RES_DEFAULT share) set(NG_INSTALL_DIR_INCLUDE_DEFAULT include) set(NG_RPATH_TOKEN "\$ORIGIN") endif(APPLE) set(NG_INSTALL_DIR_PYTHON ${NG_INSTALL_DIR_PYTHON_DEFAULT} CACHE STRING "Install directory for Python files") set(NG_INSTALL_DIR_BIN ${NG_INSTALL_DIR_BIN_DEFAULT} CACHE STRING "Install directory for executables") set(NG_INSTALL_DIR_LIB ${NG_INSTALL_DIR_LIB_DEFAULT} CACHE STRING "Install directory for libraries") set(NG_INSTALL_DIR_INCLUDE ${NG_INSTALL_DIR_INCLUDE_DEFAULT} CACHE STRING "Install directory for header files") set(NG_INSTALL_DIR_CMAKE ${NG_INSTALL_DIR_CMAKE_DEFAULT} CACHE STRING "Install directory for CMake files") set(NG_INSTALL_DIR_RES ${NG_INSTALL_DIR_RES_DEFAULT} CACHE STRING "Install directory for resources") get_filename_component(NETGEN_CMAKE_DIR_ABSOLUTE ${NG_INSTALL_DIR_CMAKE} ABSOLUTE BASE_DIR ${CMAKE_INSTALL_PREFIX}) get_filename_component(NETGEN_BINARY_DIR_ABSOLUTE ${NG_INSTALL_DIR_BIN} ABSOLUTE BASE_DIR ${CMAKE_INSTALL_PREFIX}) get_filename_component(NETGEN_LIBRARY_DIR_ABSOLUTE ${NG_INSTALL_DIR_LIB} ABSOLUTE BASE_DIR ${CMAKE_INSTALL_PREFIX}) get_filename_component(NETGEN_INCLUDE_DIR_ABSOLUTE ${NG_INSTALL_DIR_INCLUDE} ABSOLUTE BASE_DIR ${CMAKE_INSTALL_PREFIX}) get_filename_component(NETGEN_RESOURCE_DIR_ABSOLUTE ${NG_INSTALL_DIR_RES} ABSOLUTE BASE_DIR ${CMAKE_INSTALL_PREFIX}) file(RELATIVE_PATH NETGEN_DIR ${NETGEN_CMAKE_DIR_ABSOLUTE} ${CMAKE_INSTALL_PREFIX}) file(RELATIVE_PATH NETGEN_BINARY_DIR ${NETGEN_CMAKE_DIR_ABSOLUTE} ${NETGEN_BINARY_DIR_ABSOLUTE}) file(RELATIVE_PATH NETGEN_LIBRARY_DIR ${NETGEN_CMAKE_DIR_ABSOLUTE} ${NETGEN_LIBRARY_DIR_ABSOLUTE}) file(RELATIVE_PATH NETGEN_INCLUDE_DIR ${NETGEN_CMAKE_DIR_ABSOLUTE} ${NETGEN_INCLUDE_DIR_ABSOLUTE}) file(RELATIVE_PATH NETGEN_RESOURCE_DIR ${NETGEN_CMAKE_DIR_ABSOLUTE} ${NETGEN_RESOURCE_DIR_ABSOLUTE}) file(RELATIVE_PATH NETGEN_RPATH ${NETGEN_BINARY_DIR_ABSOLUTE} ${NETGEN_LIBRARY_DIR_ABSOLUTE}) if(USE_PYTHON) get_filename_component(NETGEN_PYTHON_DIR_ABSOLUTE ${NG_INSTALL_DIR_PYTHON} ABSOLUTE BASE_DIR ${CMAKE_INSTALL_PREFIX}) file(RELATIVE_PATH NETGEN_PYTHON_DIR ${NETGEN_CMAKE_DIR_ABSOLUTE} ${NETGEN_PYTHON_DIR_ABSOLUTE}) file(RELATIVE_PATH NETGEN_PYTHON_RPATH_BIN ${NETGEN_PYTHON_DIR_ABSOLUTE} ${NETGEN_BINARY_DIR_ABSOLUTE}) file(RELATIVE_PATH NETGEN_PYTHON_RPATH ${NETGEN_PYTHON_DIR_ABSOLUTE} ${NETGEN_LIBRARY_DIR_ABSOLUTE}) if(WIN32) set(NETGEN_PYTHON_RPATH ${NETGEN_PYTHON_RPATH_BIN}) endif(WIN32) endif(USE_PYTHON) set(NG_INSTALL_DIR EXPORT netgen-targets RUNTIME DESTINATION ${NG_INSTALL_DIR_BIN} COMPONENT netgen LIBRARY DESTINATION ${NG_INSTALL_DIR_LIB} COMPONENT netgen_devel ARCHIVE DESTINATION ${NG_INSTALL_DIR_LIB} COMPONENT netgen_devel) install(EXPORT netgen-targets DESTINATION ${NG_INSTALL_DIR_CMAKE} COMPONENT netgen_devel) set(CMAKE_MACOSX_RPATH TRUE) set(CMAKE_INSTALL_RPATH "${NG_RPATH_TOKEN};${NG_RPATH_TOKEN}/${NETGEN_RPATH}") include (CheckIncludeFiles) check_include_files (dlfcn.h HAVE_DLFCN_H) if(HAVE_DLFCN_H) add_definitions(-DHAVE_DLFCN_H) endif() add_definitions(-DNETGEN_VERSION="${NETGEN_VERSION}") include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR}) ####################################################################### # platform specific definitions and flags macro(get_WIN32_WINNT version) if (WIN32 AND CMAKE_SYSTEM_VERSION) if("${CMAKE_SYSTEM_VERSION}" MATCHES "^([0-9]+)\\.([0-9]+)") math(EXPR ver "${CMAKE_MATCH_1}*100 + ${CMAKE_MATCH_2}") endif() set(${version} "0x${ver}") endif() endmacro() macro(get_dll_from_lib dll_path lib_path) get_filename_component(parent_lib_path ${lib} DIRECTORY) get_filename_component(lib_name ${lib} name) endmacro() set(CMAKE_CXX_STANDARD 14) if(WIN32) get_WIN32_WINNT(ver) add_definitions(-D_WIN32_WINNT=${ver} -DWNT -DWNT_WINDOW -DNOMINMAX) set(CMAKE_MFC_FLAG 0) add_definitions(-DMSVC_EXPRESS -D_CRT_SECURE_NO_WARNINGS -DHAVE_STRUCT_TIMESPEC) # build convenience (aka object) libraries in windows) set(NG_LIB_TYPE OBJECT) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP /wd4244 /wd4800") else(WIN32) # build shared libraries set(NG_LIB_TYPE SHARED) endif(WIN32) if(APPLE) set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -undefined dynamic_lookup") endif(APPLE) ####################################################################### if(NOT ZLIB_INCLUDE_DIRS) find_package(ZLIB REQUIRED) endif(NOT ZLIB_INCLUDE_DIRS) include_directories(${ZLIB_INCLUDE_DIRS}) ####################################################################### if (USE_GUI) find_package(TCL 8.5 REQUIRED) find_package(Threads REQUIRED) if(APPLE) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -framework AppKit") else(APPLE) find_package(X11 REQUIRED) endif(APPLE) find_package(OpenGL REQUIRED) add_definitions(-DTCL -DOPENGL -DUSE_TOGL_2) include_directories(${TCL_INCLUDE_PATH}) include_directories(${TK_INCLUDE_PATH}) set(LIBTOGL togl) if(WIN32) add_definitions(-DTOGL_WGL) else(WIN32) if(APPLE) ADD_DEFINITIONS(-DTOGL_NSOPENGL) else(APPLE) ADD_DEFINITIONS(-DTOGL_X11) endif(APPLE) endif(WIN32) endif (USE_GUI) ####################################################################### if (USE_PYTHON) add_definitions(-DNG_PYTHON) find_path(PYBIND_INCLUDE_DIR pybind11/pybind11.h HINTS ${PYTHON_INCLUDE_DIR}) if( PYBIND_INCLUDE_DIR ) message(STATUS "Found Pybind11: ${PYBIND_INCLUDE_DIR}") else( PYBIND_INCLUDE_DIR ) message(FATAL_ERROR "Could NOT find pybind11!") endif( PYBIND_INCLUDE_DIR ) include_directories(${PYBIND_INCLUDE_DIR}) include_directories(${PYTHON_INCLUDE_DIRS}) if(NG_INSTALL_PYBIND) install(DIRECTORY ${PYBIND_INCLUDE_DIR}/pybind11 DESTINATION ${NG_INSTALL_DIR_INCLUDE} COMPONENT netgen_devel) install(FILES ${PYBIND_INCLUDE_DIR}/../LICENSE DESTINATION ${NG_INSTALL_DIR_INCLUDE}/pybind11 COMPONENT netgen_devel) endif(NG_INSTALL_PYBIND) endif (USE_PYTHON) ####################################################################### if (USE_MPI) find_package(MPI REQUIRED) find_package(METIS REQUIRED) add_definitions(-DPARALLEL -DMETIS) include_directories(${MPI_CXX_INCLUDE_PATH}) include_directories(${METIS_INCLUDE_DIR}) endif (USE_MPI) ####################################################################### if (USE_OCC) find_package(OpenCasCade REQUIRED) add_definitions(-DOCCGEOMETRY -D_OCC64) include_directories(${OCC_INCLUDE_DIR}) endif (USE_OCC) ####################################################################### if (USE_JPEG) find_package(JPEG REQUIRED) add_definitions(-DJPEGLIB) include_directories(${JPEG_INCLUDE_DIR}) endif (USE_JPEG) ####################################################################### if (USE_MPEG) find_package(FFMPEG REQUIRED) add_definitions(-DFFMPEG -D__STDC_CONSTANT_MACROS) include_directories(${FFMPEG_INCLUDE_DIR}) endif (USE_MPEG) ####################################################################### if(INSTALL_PROFILES) file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/netgen.sh "#!/bin/sh\n") file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/netgen.sh "export PATH=${CMAKE_INSTALL_PREFIX}/bin:$PATH\n") file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/netgen.sh "export NETGENDIR=${CMAKE_INSTALL_PREFIX}/bin\n") file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/netgen.sh "export PYTHONPATH=${CMAKE_INSTALL_PREFIX}/${PYTHON_PACKAGES_INSTALL_DIR}:.\n") file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/netgen.sh "export LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib:.\n") install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/netgen.sh DESTINATION /etc/profile.d COMPONENT netgen) string(ASCII 27 Esc) file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/postinst "#!/bin/sh\n") file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/postinst "echo \"${Esc}[0;31mPlease log out and in again or do 'source /etc/profile.d/netgen.sh' to load the correct environment variables!${Esc}[m\"") set( CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_CURRENT_BINARY_DIR}/postinst") endif(INSTALL_PROFILES) ####################################################################### file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/fixup.cmake "\ include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/netgen_fixup.cmake) set(APP ${CMAKE_INSTALL_PREFIX}) message(\${APP}) set(BU_CHMOD_BUNDLE_ITEMS ON) file(GLOB libs ${CMAKE_INSTALL_PREFIX}/${NG_INSTALL_DIR_LIB}/*.dylib ${CMAKE_INSTALL_PREFIX}/${NG_INSTALL_DIR_LIB}/*.so) message(\"\${libs}\") netgen_fixup_bundle( \${APP}/Contents/MacOS/netgen \"\${libs}\" ${CMAKE_INSTALL_PREFIX}/${NG_INSTALL_DIR_LIB} ) execute_process(COMMAND ln -s /Applications ${CMAKE_INSTALL_PREFIX}/../Applications) set (bundle_filename \$ENV{NETGEN_BUNDLE_NAME}) if(NOT bundle_filename) set(bundle_filename netgen) endif(NOT bundle_filename) execute_process(COMMAND hdiutil create -volname Netgen -srcfolder ${CMAKE_INSTALL_PREFIX} -ov -format UDZO \${bundle_filename}-${PACKAGE_VERSION}.dmg) ") add_custom_target(bundle COMMAND ${CMAKE_COMMAND} "-P" "${CMAKE_CURRENT_BINARY_DIR}/fixup.cmake") ####################################################################### # CTest enable_testing() include(CTest) ####################################################################### add_subdirectory(libsrc) add_subdirectory(ng) add_subdirectory(tutorials) if (USE_PYTHON) add_subdirectory(python) endif (USE_PYTHON) add_subdirectory(py_tutorials) add_subdirectory(doc) add_subdirectory(windows) add_subdirectory(nglib) add_subdirectory(tests) ####################################################################### # Debian packager if(UNIX) set(CPACK_SOURCE_GENERATOR "TGZ") set(CPACK_SOURCE_IGNORE_FILES "/cmake/;/build/;/.gz/;~$;${CPACK_SOURCE_IGNORE_FILES}") set(CPACK_PACKAGE_VERSION ${PACKAGE_VERSION} ) set(CPACK_PACKAGE_NAME netgen) set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "automatic 3d tetrahedral mesh generator") set(CPACK_PACKAGE_DESCRIPTION "NETGEN is an automatic 3d tetrahedral mesh generator. It accepts input from constructive solid geometry (CSG) or boundary representation (BRep) from STL file format. The connection to a geometry kernel allows the handling of IGES and STEP files. NETGEN contains modules for mesh optimization and hierarchical mesh refinement. Netgen is open source based on the LGPL license. It is available for Unix/Linux and Windows.") set(CPACK_PACKAGING_INSTALL_PREFIX "/opt/netgen") execute_process(COMMAND grep CODENAME /etc/lsb-release OUTPUT_VARIABLE temp OUTPUT_STRIP_TRAILING_WHITESPACE) execute_process(COMMAND dpkg --print-architecture OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE OUTPUT_STRIP_TRAILING_WHITESPACE) if(temp) set(CPACK_GENERATOR "DEB") string(SUBSTRING ${temp} 17 -1 UBUNTU_VERSION) message("ubuntu version: ${UBUNTU_VERSION}") set(CPACK_DEBIAN_PACKAGE_DEPENDS "python3, libtk8.5, libtcl8.5, tix, libxmu6") execute_process(COMMAND dpkg --print-architecture OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE OUTPUT_STRIP_TRAILING_WHITESPACE) set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Matthias Hochsteger ") if(USE_MPI) set(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS}, libmetis5, openmpi-bin") set(CPACK_PACKAGE_NAME "${CPACK_PACKAGE_NAME}_mpi") endif(USE_MPI) if(USE_OCC) set(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS}, liboce-ocaf-dev") endif(USE_OCC) set(CPACK_DEBIAN_PACKAGE_SECTION Science) set(CPACK_DEBIAN_PACKAGE_NAME ${CPACK_PACKAGE_NAME}) set(CPACK_PACKAGE_FILE_NAME "netgen-${PACKAGE_VERSION}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}") endif(temp) endif(UNIX) if(APPLE) # create some auxiliary files set(mac_startup ${CMAKE_CURRENT_BINARY_DIR}/startup.sh) file(WRITE ${mac_startup} "\ #!/bin/sh Netgen_BUNDLE=\"`echo \"$0\" | sed -e 's/\\/Contents\\/MacOS\\/startup.sh//'`\" Netgen_MACOS=\"$Netgen_BUNDLE/Contents/MacOS\" export NETGENDIR=$Netgen_MACOS export DYLD_LIBRARY_PATH=$Netgen_MACOS:$DYLD_LIBRARY_PATH # export TIX_LIBRARY=$Netgen_MACOS/library # export TCLLIBPATH=$Netgen_MACOS:$TCLLIBPATH export PYTHONPATH=$Netgen_BUNDLE/Contents/Resources/${PYTHON_PACKAGES_INSTALL_DIR}:$PYTHONPATH cd $Netgen_MACOS $Netgen_MACOS/netgen ") install(PROGRAMS ${mac_startup} DESTINATION ${NG_INSTALL_DIR_BIN}) set(mac_ngsuite ${CMAKE_CURRENT_BINARY_DIR}/ngsuite.sh) file(WRITE ${mac_ngsuite} "\ #!/bin/sh Netgen_BUNDLE=\"`echo \"$0\" | sed -e 's/\\/Contents\\/MacOS\\/Netgen1//'`\" Netgen_MACOS=\"$Netgen_BUNDLE/Contents/MacOS\" open -a /Applications/Utilities/Terminal.app $Netgen_MACOS/startup.sh ") install(PROGRAMS ${mac_ngsuite} DESTINATION ${NG_INSTALL_DIR_BIN} RENAME Netgen1) set(mac_plist ${CMAKE_CURRENT_BINARY_DIR}/Info.plist) file(WRITE ${mac_plist} " CFBundleDevelopmentRegion English CFBundleExecutable Netgen1 CFBundleIconFile Netgen.icns NSHighResolutionCapable True ") install(FILES ${mac_plist} DESTINATION ${NG_INSTALL_DIR_BIN}/../) install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/netgen.icns DESTINATION ${NG_INSTALL_DIR_RES}/../ RENAME Netgen.icns) endif(APPLE) if(NOT APPLE) include(CPack) endif() ####################################################################### # uninstall target configure_file( "${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" IMMEDIATE @ONLY) add_custom_target(uninstall COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake) ####################################################################### # Generate package config file get_directory_property(NETGEN_COMPILE_DEFINITIONS COMPILE_DEFINITIONS) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/NetgenConfig.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/NetgenConfig.cmake @ONLY ESCAPE_QUOTES) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/NetgenConfig.cmake DESTINATION ${NG_INSTALL_DIR_CMAKE} COMPONENT netgen_devel) ####################################################################### # Configure message # TODO: other message in case of failure string(TOUPPER "CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE}" name) set(flags "${${name}} ${CMAKE_CXX_FLAGS}") message(" ------------------------------------------------------------------------ ${PROJECT_NAME} ${PACKAGE_VERSION}: Automatic configuration OK. Build type: ${CMAKE_BUILD_TYPE} Flags: ${flags} Enabled functionality: OCC: ............... ${USE_OCC} JPEGlib: ........... ${USE_JPEG} FFMPEG: ............ ${USE_MPEG} GUI: ............... ${USE_GUI} MPI: ............... ${USE_MPI} PYTHON: ............ ${USE_PYTHON} Building: ") if(WIN32) message(" Open ${CMAKE_BINARY_DIR}/Netgen.sln and build solution to compile ${PROJECT_NAME}. Build \"INSTALL\" to install ${PROJECT_NAME}. ") else(WIN32) message(" Type 'make' to compile ${PROJECT_NAME}. Type 'make install' to install ${PROJECT_NAME}. ") endif(WIN32) message(" Install directory: ${CMAKE_INSTALL_PREFIX} Please set the following environment variables: NETGENDIR=${CMAKE_INSTALL_PREFIX}/bin") if(USE_PYTHON) message(" PYTHONPATH=.:${CMAKE_INSTALL_PREFIX}/${PYTHON_PACKAGES_INSTALL_DIR}") endif(USE_PYTHON) message(" ------------------------------------------------------------------------ ") if (ADDITIONAL_PATHS) message(WARNING "The use of ADDITIONAL_PATHS is deprecated, use CMAKE_PREFIX_PATH instead") endif (ADDITIONAL_PATHS) netgen-6.2.1804/mkinstalldirs0000755000175000017500000000370413272137567014617 0ustar kurtkurt#! /bin/sh # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman # Created: 1993-05-16 # Public domain errstatus=0 dirmode="" usage="\ Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..." # process command line arguments while test $# -gt 0 ; do case $1 in -h | --help | --h*) # -h for help echo "$usage" 1>&2 exit 0 ;; -m) # -m PERM arg shift test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } dirmode=$1 shift ;; --) # stop option processing shift break ;; -*) # unknown option echo "$usage" 1>&2 exit 1 ;; *) # first non-opt arg break ;; esac done for file do if test -d "$file"; then shift else break fi done case $# in 0) exit 0 ;; esac case $dirmode in '') if mkdir -p -- . 2>/dev/null; then echo "mkdir -p -- $*" exec mkdir -p -- "$@" fi ;; *) if mkdir -m "$dirmode" -p -- . 2>/dev/null; then echo "mkdir -m $dirmode -p -- $*" exec mkdir -m "$dirmode" -p -- "$@" fi ;; esac for file do set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` shift pathcomp= for d do pathcomp="$pathcomp$d" case $pathcomp in -*) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr else if test ! -z "$dirmode"; then echo "chmod $dirmode $pathcomp" lasterr="" chmod "$dirmode" "$pathcomp" || lasterr=$? if test ! -z "$lasterr"; then errstatus=$lasterr fi fi fi fi pathcomp="$pathcomp/" done done exit $errstatus # Local Variables: # mode: shell-script # sh-indentation: 2 # End: # mkinstalldirs ends here netgen-6.2.1804/python/0000755000175000017500000000000013272137567013326 5ustar kurtkurtnetgen-6.2.1804/python/gengeom_curve.py0000644000175000017500000000130713272137567016526 0ustar kurtkurt geom = SplineGeometry() # Define Points pi1 = geom.AppendPoint(0,0) pi2 = geom.AppendPoint(1,0) pi3 = geom.AppendPoint(1,0.5) pi4 = geom.AppendPoint(1,1) pi5 = geom.AppendPoint(0.5,1) pi6 = geom.AppendPoint(0,1) # Define Segments geom.Append(Line(pi1,pi2)) geom.Append(Line(pi2,pi3)) geom.Append(Spline3(pi3,pi4,pi5)) geom.Append(Line(pi5,pi6)) geom.Append(Line(pi6,pi1)) # Plot Geometry geom.Plot() # Plot Point Index geom.ShowPoints() # Plot Domain Numbers geom.ShowDomains() # Hide point indices and domain numbers geom.ShowPoints(False) geom.ShowDomains(False) # Set Meshing Parameters mparam = MeshingParameters() mparam.maxh = 0.1 mesh = geom.GenerateMesh(mparam)netgen-6.2.1804/python/pymesh.vol0000644000175000017500000074001613272137567015365 0ustar kurtkurtmesh3d dimension 3 geomtype 0 # surfnr bcnr domin domout np p1 p2 p3 surfaceelements 1748 1 1 1 0 3 1 33 339 1 1 1 0 3 34 35 340 1 1 1 0 3 35 36 341 1 1 1 0 3 340 35 341 1 1 1 0 3 36 37 341 1 1 1 0 3 37 38 342 1 1 1 0 3 341 37 342 1 1 1 0 3 38 39 342 1 1 1 0 3 40 5 343 1 1 1 0 3 2 1 344 1 1 1 0 3 50 2 345 1 1 1 0 3 51 50 346 1 1 1 0 3 50 345 346 1 1 1 0 3 53 52 247 1 1 1 0 3 54 355 55 1 1 1 0 3 245 356 55 1 1 1 0 3 58 57 243 1 1 1 0 3 242 241 59 1 1 1 0 3 7 61 347 1 1 1 0 3 5 7 348 1 1 1 0 3 236 235 349 1 1 1 0 3 237 236 345 1 1 1 0 3 238 237 350 1 1 1 0 3 239 238 351 1 1 1 0 3 240 239 352 1 1 1 0 3 33 34 353 1 1 1 0 3 345 2 344 1 1 1 0 3 344 1 339 1 1 1 0 3 39 40 354 1 1 1 0 3 53 247 355 1 1 1 0 3 54 53 355 1 1 1 0 3 56 55 356 1 1 1 0 3 57 56 356 1 1 1 0 3 241 347 60 1 1 1 0 3 59 58 242 1 1 1 0 3 7 347 348 1 1 1 0 3 355 247 246 1 1 1 0 3 354 40 343 1 1 1 0 3 242 58 243 1 1 1 0 3 60 59 241 1 1 1 0 3 5 348 343 1 1 1 0 3 237 345 350 1 1 1 0 3 238 350 351 1 1 1 0 3 239 351 352 1 1 1 0 3 33 353 339 1 1 1 0 3 241 240 347 1 1 1 0 3 39 354 342 1 1 1 0 3 353 34 340 1 1 1 0 3 347 240 352 1 1 1 0 3 347 352 348 1 1 1 0 3 340 341 357 1 1 1 0 3 341 342 357 1 1 1 0 3 245 55 355 1 1 1 0 3 247 52 235 1 1 1 0 3 52 51 349 1 1 1 0 3 243 57 356 1 1 1 0 3 349 346 236 1 1 1 0 3 348 352 358 1 1 1 0 3 343 348 358 1 1 1 0 3 352 351 358 1 1 1 0 3 244 243 356 1 1 1 0 3 246 245 355 1 1 1 0 3 354 343 359 1 1 1 0 3 343 358 359 1 1 1 0 3 235 52 349 1 1 1 0 3 353 340 360 1 1 1 0 3 340 357 360 1 1 1 0 3 350 345 344 1 1 1 0 3 351 350 360 1 1 1 0 3 350 344 360 1 1 1 0 3 358 351 357 1 1 1 0 3 342 354 359 1 1 1 0 3 339 353 360 1 1 1 0 3 351 360 357 1 1 1 0 3 61 60 347 1 1 1 0 3 51 346 349 1 1 1 0 3 245 244 356 1 1 1 0 3 345 236 346 1 1 1 0 3 339 360 344 1 1 1 0 3 357 342 359 1 1 1 0 3 359 358 357 8 2 1 0 3 361 33 41 8 2 1 0 3 34 33 361 8 2 1 0 3 35 34 65 8 2 1 0 3 36 35 66 8 2 1 0 3 37 36 67 8 2 1 0 3 38 37 68 8 2 1 0 3 39 38 69 8 2 1 0 3 40 39 362 8 2 1 0 3 5 40 163 8 2 1 0 3 41 3 63 8 2 1 0 3 63 64 361 8 2 1 0 3 65 66 35 8 2 1 0 3 66 67 36 8 2 1 0 3 67 68 37 8 2 1 0 3 68 69 38 8 2 1 0 3 70 71 362 8 2 1 0 3 362 71 163 8 2 1 0 3 41 63 361 8 2 1 0 3 363 164 173 8 2 1 0 3 165 164 363 8 2 1 0 3 166 165 192 8 2 1 0 3 167 166 191 8 2 1 0 3 168 167 190 8 2 1 0 3 169 168 189 8 2 1 0 3 170 169 188 8 2 1 0 3 171 170 187 8 2 1 0 3 13 172 195 8 2 1 0 3 173 10 193 8 2 1 0 3 364 186 195 8 2 1 0 3 188 187 170 8 2 1 0 3 189 188 169 8 2 1 0 3 190 189 168 8 2 1 0 3 191 190 167 8 2 1 0 3 192 191 166 8 2 1 0 3 173 193 363 8 2 1 0 3 1 41 33 8 2 1 0 3 163 40 362 8 2 1 0 3 6 173 164 8 2 1 0 3 8 163 71 8 2 1 0 3 39 69 70 8 2 1 0 3 64 65 34 8 2 1 0 3 195 172 364 8 2 1 0 3 172 171 364 8 2 1 0 3 187 186 364 8 2 1 0 3 193 192 363 8 2 1 0 3 15 195 186 8 2 1 0 3 187 364 171 8 2 1 0 3 64 34 361 8 2 1 0 3 192 165 363 8 2 1 0 3 39 70 362 4 3 1 0 3 1 2 41 4 3 1 0 3 3 41 62 4 3 1 0 3 2 62 41 4 3 1 0 3 62 4 3 4 3 1 0 3 6 9 208 4 3 1 0 3 173 6 208 4 3 1 0 3 10 173 12 4 3 1 0 3 173 208 12 26 4 1 0 3 42 32 365 26 4 1 0 3 43 42 366 26 4 1 0 3 42 365 366 26 4 1 0 3 45 44 367 26 4 1 0 3 46 45 368 26 4 1 0 3 45 367 368 26 4 1 0 3 47 46 368 26 4 1 0 3 48 47 369 26 4 1 0 3 47 368 369 26 4 1 0 3 49 48 369 26 4 1 0 3 32 31 370 26 4 1 0 3 26 28 371 26 4 1 0 3 31 84 372 26 4 1 0 3 86 378 85 26 4 1 0 3 87 88 292 26 4 1 0 3 89 90 290 26 4 1 0 3 91 92 288 26 4 1 0 3 94 383 93 26 4 1 0 3 95 26 373 26 4 1 0 3 26 371 373 26 4 1 0 3 295 296 374 26 4 1 0 3 296 297 375 26 4 1 0 3 297 298 376 26 4 1 0 3 43 366 44 26 4 1 0 3 32 370 365 26 4 1 0 3 370 31 372 26 4 1 0 3 28 49 377 26 4 1 0 3 294 372 85 26 4 1 0 3 86 87 378 26 4 1 0 3 88 89 379 26 4 1 0 3 90 91 289 26 4 1 0 3 92 93 287 26 4 1 0 3 374 296 375 26 4 1 0 3 291 292 379 26 4 1 0 3 293 294 378 26 4 1 0 3 294 295 372 26 4 1 0 3 297 376 375 26 4 1 0 3 383 380 299 26 4 1 0 3 294 85 378 26 4 1 0 3 292 88 379 26 4 1 0 3 298 380 376 26 4 1 0 3 289 91 288 26 4 1 0 3 372 295 374 26 4 1 0 3 365 370 381 26 4 1 0 3 369 368 382 26 4 1 0 3 368 367 382 26 4 1 0 3 371 28 377 26 4 1 0 3 89 290 379 26 4 1 0 3 90 289 290 26 4 1 0 3 92 287 288 26 4 1 0 3 93 383 287 26 4 1 0 3 95 373 383 26 4 1 0 3 94 95 383 26 4 1 0 3 372 374 370 26 4 1 0 3 290 291 379 26 4 1 0 3 292 293 378 26 4 1 0 3 375 376 382 26 4 1 0 3 298 299 380 26 4 1 0 3 383 373 380 26 4 1 0 3 371 377 384 26 4 1 0 3 373 371 380 26 4 1 0 3 370 374 381 26 4 1 0 3 292 378 87 26 4 1 0 3 380 371 376 26 4 1 0 3 376 371 384 26 4 1 0 3 374 375 381 26 4 1 0 3 382 385 375 26 4 1 0 3 367 44 366 26 4 1 0 3 376 384 382 26 4 1 0 3 377 49 369 26 4 1 0 3 84 85 372 26 4 1 0 3 365 381 385 26 4 1 0 3 377 369 384 26 4 1 0 3 365 385 366 26 4 1 0 3 299 287 383 26 4 1 0 3 369 382 384 26 4 1 0 3 381 375 385 26 4 1 0 3 382 367 385 26 4 1 0 3 366 385 367 24 5 1 0 3 32 42 72 24 5 1 0 3 42 43 122 24 5 1 0 3 43 44 121 24 5 1 0 3 44 45 120 24 5 1 0 3 45 46 119 24 5 1 0 3 46 47 118 24 5 1 0 3 47 48 117 24 5 1 0 3 49 386 48 24 5 1 0 3 49 28 114 24 5 1 0 3 30 72 122 24 5 1 0 3 27 96 105 24 5 1 0 3 96 97 107 24 5 1 0 3 97 98 108 24 5 1 0 3 98 99 109 24 5 1 0 3 99 100 110 24 5 1 0 3 100 101 111 24 5 1 0 3 101 102 112 24 5 1 0 3 103 20 124 24 5 1 0 3 23 105 106 24 5 1 0 3 108 107 97 24 5 1 0 3 109 108 98 24 5 1 0 3 110 109 99 24 5 1 0 3 111 110 100 24 5 1 0 3 112 111 101 24 5 1 0 3 18 113 124 24 5 1 0 3 114 25 115 24 5 1 0 3 116 117 48 24 5 1 0 3 117 118 47 24 5 1 0 3 118 119 46 24 5 1 0 3 119 120 45 24 5 1 0 3 120 121 44 24 5 1 0 3 121 122 43 24 5 1 0 3 72 42 122 24 5 1 0 3 49 114 386 24 5 1 0 3 386 114 115 24 5 1 0 3 124 113 387 24 5 1 0 3 103 124 387 24 5 1 0 3 102 103 387 24 5 1 0 3 96 107 106 24 5 1 0 3 113 112 387 24 5 1 0 3 115 116 386 24 5 1 0 3 105 96 106 24 5 1 0 3 102 387 112 24 5 1 0 3 116 48 386 7 6 1 0 3 2 50 62 7 6 1 0 3 50 51 73 7 6 1 0 3 51 52 75 7 6 1 0 3 52 53 76 7 6 1 0 3 53 54 76 7 6 1 0 3 54 55 77 7 6 1 0 3 55 56 78 7 6 1 0 3 56 57 79 7 6 1 0 3 57 58 80 7 6 1 0 3 58 59 81 7 6 1 0 3 59 60 82 7 6 1 0 3 60 61 83 7 6 1 0 3 61 7 174 7 6 1 0 3 4 62 73 7 6 1 0 3 76 75 52 7 6 1 0 3 77 76 54 7 6 1 0 3 78 77 55 7 6 1 0 3 79 78 56 7 6 1 0 3 80 79 57 7 6 1 0 3 81 80 58 7 6 1 0 3 82 81 59 7 6 1 0 3 83 82 60 7 6 1 0 3 11 83 174 7 6 1 0 3 84 31 162 7 6 1 0 3 85 84 160 7 6 1 0 3 86 85 159 7 6 1 0 3 87 86 158 7 6 1 0 3 88 87 157 7 6 1 0 3 89 88 156 7 6 1 0 3 90 89 155 7 6 1 0 3 91 90 154 7 6 1 0 3 92 91 153 7 6 1 0 3 93 92 152 7 6 1 0 3 94 93 151 7 6 1 0 3 26 95 104 7 6 1 0 3 22 104 150 41 20 1 0 3 876 874 875 7 6 1 0 3 104 95 150 7 6 1 0 3 123 19 138 7 6 1 0 3 17 123 136 7 6 1 0 3 21 125 137 7 6 1 0 3 125 126 148 7 6 1 0 3 126 127 147 7 6 1 0 3 127 128 146 7 6 1 0 3 128 129 145 7 6 1 0 3 129 130 144 7 6 1 0 3 130 131 143 7 6 1 0 3 131 132 142 7 6 1 0 3 132 133 141 7 6 1 0 3 133 134 141 7 6 1 0 3 134 135 140 7 6 1 0 3 135 136 139 7 6 1 0 3 24 137 149 7 6 1 0 3 139 140 135 7 6 1 0 3 140 141 134 7 6 1 0 3 141 142 132 7 6 1 0 3 142 143 131 7 6 1 0 3 143 144 130 7 6 1 0 3 144 145 129 7 6 1 0 3 145 146 128 7 6 1 0 3 146 147 127 7 6 1 0 3 147 148 126 7 6 1 0 3 152 151 93 7 6 1 0 3 153 152 92 7 6 1 0 3 154 153 91 7 6 1 0 3 155 154 90 7 6 1 0 3 156 155 89 7 6 1 0 3 157 156 88 7 6 1 0 3 158 157 87 7 6 1 0 3 159 158 86 7 6 1 0 3 160 159 85 7 6 1 0 3 29 161 162 7 6 1 0 3 73 62 50 7 6 1 0 3 9 175 208 7 6 1 0 3 206 388 176 7 6 1 0 3 176 177 205 7 6 1 0 3 177 178 204 7 6 1 0 3 178 179 203 7 6 1 0 3 179 180 202 7 6 1 0 3 180 181 201 7 6 1 0 3 181 182 200 7 6 1 0 3 182 183 199 7 6 1 0 3 183 184 198 7 6 1 0 3 184 185 196 7 6 1 0 3 185 14 194 7 6 1 0 3 194 16 196 7 6 1 0 3 198 199 183 7 6 1 0 3 199 200 182 7 6 1 0 3 200 201 181 7 6 1 0 3 201 202 180 7 6 1 0 3 202 203 179 7 6 1 0 3 203 204 178 7 6 1 0 3 204 205 177 7 6 1 0 3 205 206 176 7 6 1 0 3 207 12 208 7 6 1 0 3 83 61 174 7 6 1 0 3 196 185 194 7 6 1 0 3 73 51 74 7 6 1 0 3 51 75 74 7 6 1 0 3 208 175 388 7 6 1 0 3 160 84 161 7 6 1 0 3 94 151 150 7 6 1 0 3 95 94 150 7 6 1 0 3 138 139 136 7 6 1 0 3 148 149 125 7 6 1 0 3 125 149 137 7 6 1 0 3 161 84 162 7 6 1 0 3 138 136 123 7 6 1 0 3 207 208 388 7 6 1 0 3 184 196 197 7 6 1 0 3 184 197 198 7 6 1 0 3 206 207 388 41 20 1 0 3 875 869 876 7 6 1 0 3 175 176 388 25 7 1 0 3 29 30 389 25 7 1 0 3 25 22 390 25 7 1 0 3 115 25 391 25 7 1 0 3 119 118 323 25 7 1 0 3 323 324 119 25 7 1 0 3 324 325 120 25 7 1 0 3 30 122 392 25 7 1 0 3 22 150 393 25 7 1 0 3 151 152 394 25 7 1 0 3 152 153 395 25 7 1 0 3 394 152 395 25 7 1 0 3 153 154 395 25 7 1 0 3 154 155 396 25 7 1 0 3 395 154 396 25 7 1 0 3 155 156 396 25 7 1 0 3 156 157 397 25 7 1 0 3 396 156 397 25 7 1 0 3 157 158 397 25 7 1 0 3 158 159 398 25 7 1 0 3 397 158 398 25 7 1 0 3 159 160 398 25 7 1 0 3 161 29 399 25 7 1 0 3 313 314 400 25 7 1 0 3 314 315 401 25 7 1 0 3 315 316 402 25 7 1 0 3 316 317 403 25 7 1 0 3 317 318 404 25 7 1 0 3 318 319 405 25 7 1 0 3 319 320 406 25 7 1 0 3 320 321 407 25 7 1 0 3 321 322 408 25 7 1 0 3 25 390 391 25 7 1 0 3 115 406 116 25 7 1 0 3 117 116 407 25 7 1 0 3 118 117 408 25 7 1 0 3 30 392 389 25 7 1 0 3 22 393 390 25 7 1 0 3 150 151 409 25 7 1 0 3 403 317 404 25 7 1 0 3 402 316 403 25 7 1 0 3 401 315 402 25 7 1 0 3 400 314 401 25 7 1 0 3 160 161 410 25 7 1 0 3 318 405 404 25 7 1 0 3 406 391 319 25 7 1 0 3 320 407 406 25 7 1 0 3 321 408 407 25 7 1 0 3 325 313 411 25 7 1 0 3 29 389 399 25 7 1 0 3 150 409 393 25 7 1 0 3 392 122 411 25 7 1 0 3 117 407 408 25 7 1 0 3 410 161 399 25 7 1 0 3 411 313 400 25 7 1 0 3 121 325 411 25 7 1 0 3 410 399 412 25 7 1 0 3 389 392 400 25 7 1 0 3 120 119 324 25 7 1 0 3 121 120 325 25 7 1 0 3 122 121 411 25 7 1 0 3 403 404 413 25 7 1 0 3 394 395 414 25 7 1 0 3 395 396 414 25 7 1 0 3 397 398 415 25 7 1 0 3 160 410 398 25 7 1 0 3 400 401 389 25 7 1 0 3 401 402 412 25 7 1 0 3 402 403 416 25 7 1 0 3 399 389 401 25 7 1 0 3 323 118 322 25 7 1 0 3 322 118 408 25 7 1 0 3 399 401 412 25 7 1 0 3 393 409 417 25 7 1 0 3 407 116 406 25 7 1 0 3 115 391 406 25 7 1 0 3 409 151 394 25 7 1 0 3 396 397 414 25 7 1 0 3 398 410 418 25 7 1 0 3 411 400 392 25 7 1 0 3 404 405 419 25 7 1 0 3 413 404 419 25 7 1 0 3 416 403 420 25 7 1 0 3 403 413 420 25 7 1 0 3 419 405 390 25 7 1 0 3 391 390 405 25 7 1 0 3 390 393 419 25 7 1 0 3 409 394 417 25 7 1 0 3 398 418 415 25 7 1 0 3 419 393 417 25 7 1 0 3 405 319 391 25 7 1 0 3 415 418 416 25 7 1 0 3 397 415 414 25 7 1 0 3 394 414 420 25 7 1 0 3 418 410 412 25 7 1 0 3 416 418 412 25 7 1 0 3 414 415 420 25 7 1 0 3 394 420 413 25 7 1 0 3 419 417 413 25 7 1 0 3 412 402 416 25 7 1 0 3 417 394 413 25 7 1 0 3 420 415 416 19 8 1 0 3 30 29 72 19 8 1 0 3 31 32 162 19 8 1 0 3 32 72 162 19 8 1 0 3 24 27 105 19 8 1 0 3 105 23 137 19 8 1 0 3 105 137 24 19 8 1 0 3 21 137 23 19 8 1 0 3 162 72 29 2 9 1 0 3 3 4 421 2 9 1 0 3 63 3 422 2 9 1 0 3 71 70 423 2 9 1 0 3 4 73 424 2 9 1 0 3 74 75 425 2 9 1 0 3 75 76 426 2 9 1 0 3 425 75 426 2 9 1 0 3 76 77 426 2 9 1 0 3 77 78 427 2 9 1 0 3 426 77 427 2 9 1 0 3 78 79 427 2 9 1 0 3 79 80 428 2 9 1 0 3 428 455 79 2 9 1 0 3 80 81 428 2 9 1 0 3 82 83 429 2 9 1 0 3 11 8 430 2 9 1 0 3 274 275 431 2 9 1 0 3 275 276 432 2 9 1 0 3 276 277 433 2 9 1 0 3 277 278 434 2 9 1 0 3 278 279 435 2 9 1 0 3 279 280 436 2 9 1 0 3 280 281 437 2 9 1 0 3 281 282 438 2 9 1 0 3 282 283 439 2 9 1 0 3 283 284 423 2 9 1 0 3 284 285 440 2 9 1 0 3 285 286 441 2 9 1 0 3 286 274 442 2 9 1 0 3 422 434 63 2 9 1 0 3 65 64 435 2 9 1 0 3 66 65 436 2 9 1 0 3 67 66 437 2 9 1 0 3 68 67 437 2 9 1 0 3 69 68 438 2 9 1 0 3 70 69 439 2 9 1 0 3 4 424 421 2 9 1 0 3 8 71 443 2 9 1 0 3 73 74 444 2 9 1 0 3 432 276 433 2 9 1 0 3 431 275 432 2 9 1 0 3 430 8 443 2 9 1 0 3 81 82 445 2 9 1 0 3 83 11 446 2 9 1 0 3 274 431 442 2 9 1 0 3 278 435 434 2 9 1 0 3 279 436 435 2 9 1 0 3 280 437 436 2 9 1 0 3 281 438 437 2 9 1 0 3 282 439 438 2 9 1 0 3 283 423 439 2 9 1 0 3 285 441 440 2 9 1 0 3 286 442 441 2 9 1 0 3 3 421 422 2 9 1 0 3 81 445 428 2 9 1 0 3 423 70 439 2 9 1 0 3 424 73 444 2 9 1 0 3 436 65 435 2 9 1 0 3 437 66 436 2 9 1 0 3 439 69 438 2 9 1 0 3 444 74 425 2 9 1 0 3 68 437 438 2 9 1 0 3 446 11 430 2 9 1 0 3 445 82 429 2 9 1 0 3 71 423 443 2 9 1 0 3 426 427 447 2 9 1 0 3 83 446 429 2 9 1 0 3 445 429 448 2 9 1 0 3 442 431 449 2 9 1 0 3 430 443 440 2 9 1 0 3 431 432 450 2 9 1 0 3 434 422 277 2 9 1 0 3 284 440 443 2 9 1 0 3 284 443 423 2 9 1 0 3 429 446 451 2 9 1 0 3 448 429 451 2 9 1 0 3 446 430 451 2 9 1 0 3 441 451 440 2 9 1 0 3 444 425 452 2 9 1 0 3 441 442 453 2 9 1 0 3 435 64 434 2 9 1 0 3 430 440 451 2 9 1 0 3 421 424 454 2 9 1 0 3 426 447 425 2 9 1 0 3 432 433 454 2 9 1 0 3 432 454 450 2 9 1 0 3 427 79 455 2 9 1 0 3 449 431 450 2 9 1 0 3 442 449 453 2 9 1 0 3 456 453 449 2 9 1 0 3 428 445 457 2 9 1 0 3 445 448 457 2 9 1 0 3 427 455 447 2 9 1 0 3 424 444 452 2 9 1 0 3 424 452 454 2 9 1 0 3 425 447 452 2 9 1 0 3 455 428 457 2 9 1 0 3 454 433 421 2 9 1 0 3 421 433 422 2 9 1 0 3 64 63 434 2 9 1 0 3 441 453 451 2 9 1 0 3 452 447 458 2 9 1 0 3 450 454 452 2 9 1 0 3 456 449 458 2 9 1 0 3 447 455 458 2 9 1 0 3 453 456 448 2 9 1 0 3 457 448 456 2 9 1 0 3 453 448 451 2 9 1 0 3 450 452 458 2 9 1 0 3 449 450 458 2 9 1 0 3 433 277 422 2 9 1 0 3 455 457 458 2 9 1 0 3 457 456 458 20 10 1 0 3 28 26 114 20 10 1 0 3 26 104 114 20 10 1 0 3 104 22 25 20 10 1 0 3 25 114 104 20 10 1 0 3 20 19 124 20 10 1 0 3 19 123 124 20 10 1 0 3 123 17 18 20 10 1 0 3 124 123 18 18 11 1 0 3 96 27 459 18 11 1 0 3 100 99 219 18 11 1 0 3 219 220 100 18 11 1 0 3 103 102 460 18 11 1 0 3 27 24 461 18 11 1 0 3 19 20 462 18 11 1 0 3 138 19 463 18 11 1 0 3 139 138 464 18 11 1 0 3 138 463 464 18 11 1 0 3 142 141 465 18 11 1 0 3 143 142 466 18 11 1 0 3 144 143 466 18 11 1 0 3 142 465 466 18 11 1 0 3 145 144 467 18 11 1 0 3 144 466 467 18 11 1 0 3 146 145 467 18 11 1 0 3 147 146 468 18 11 1 0 3 468 479 147 18 11 1 0 3 146 467 468 18 11 1 0 3 24 149 469 18 11 1 0 3 209 210 470 18 11 1 0 3 210 211 471 18 11 1 0 3 211 212 472 18 11 1 0 3 212 213 473 18 11 1 0 3 213 214 474 18 11 1 0 3 214 215 475 18 11 1 0 3 215 216 459 18 11 1 0 3 216 217 476 18 11 1 0 3 217 218 477 18 11 1 0 3 221 209 460 18 11 1 0 3 97 96 476 18 11 1 0 3 98 97 476 18 11 1 0 3 99 98 477 18 11 1 0 3 27 461 459 18 11 1 0 3 20 103 478 18 11 1 0 3 19 462 463 18 11 1 0 3 148 147 479 18 11 1 0 3 140 139 464 18 11 1 0 3 141 140 480 18 11 1 0 3 465 141 480 18 11 1 0 3 140 464 480 18 11 1 0 3 24 469 461 18 11 1 0 3 472 212 473 18 11 1 0 3 471 211 472 18 11 1 0 3 470 210 471 18 11 1 0 3 213 474 473 18 11 1 0 3 214 475 474 18 11 1 0 3 215 459 475 18 11 1 0 3 216 476 459 18 11 1 0 3 217 477 476 18 11 1 0 3 221 460 481 18 11 1 0 3 220 221 481 18 11 1 0 3 460 102 481 18 11 1 0 3 96 459 476 18 11 1 0 3 20 478 462 18 11 1 0 3 98 476 477 18 11 1 0 3 478 103 460 18 11 1 0 3 481 102 101 18 11 1 0 3 459 461 475 18 11 1 0 3 475 461 482 18 11 1 0 3 474 475 482 18 11 1 0 3 461 469 482 18 11 1 0 3 479 468 483 18 11 1 0 3 467 466 484 18 11 1 0 3 468 467 484 18 11 1 0 3 466 465 484 41 20 1 0 3 873 874 876 18 11 1 0 3 473 474 485 18 11 1 0 3 218 219 99 18 11 1 0 3 99 477 218 18 11 1 0 3 472 473 486 18 11 1 0 3 460 209 478 18 11 1 0 3 481 101 220 18 11 1 0 3 101 100 220 18 11 1 0 3 482 469 479 18 11 1 0 3 463 462 487 18 11 1 0 3 479 483 485 18 11 1 0 3 485 474 482 18 11 1 0 3 473 485 486 18 11 1 0 3 149 148 469 18 11 1 0 3 209 470 478 18 11 1 0 3 472 486 488 18 11 1 0 3 471 472 488 18 11 1 0 3 482 479 485 18 11 1 0 3 464 463 489 18 11 1 0 3 463 487 489 18 11 1 0 3 464 489 480 18 11 1 0 3 462 470 487 41 20 1 0 3 872 873 876 18 11 1 0 3 484 465 490 18 11 1 0 3 468 484 483 18 11 1 0 3 490 465 480 18 11 1 0 3 483 484 490 18 11 1 0 3 488 486 490 18 11 1 0 3 488 490 480 18 11 1 0 3 490 486 483 18 11 1 0 3 480 489 488 18 11 1 0 3 471 487 470 18 11 1 0 3 488 489 487 18 11 1 0 3 487 471 488 18 11 1 0 3 478 470 462 18 11 1 0 3 483 486 485 18 11 1 0 3 148 479 469 17 12 1 0 3 23 106 491 17 12 1 0 3 107 108 492 17 12 1 0 3 108 109 493 17 12 1 0 3 492 108 493 17 12 1 0 3 109 110 493 17 12 1 0 3 110 111 494 17 12 1 0 3 493 110 494 17 12 1 0 3 111 112 494 17 12 1 0 3 113 18 495 17 12 1 0 3 125 21 496 17 12 1 0 3 125 496 126 17 12 1 0 3 497 126 496 17 12 1 0 3 128 127 226 17 12 1 0 3 227 228 129 17 12 1 0 3 131 506 132 17 12 1 0 3 133 132 230 17 12 1 0 3 232 507 134 17 12 1 0 3 17 136 498 17 12 1 0 3 18 17 499 17 12 1 0 3 21 23 500 17 12 1 0 3 222 223 501 17 12 1 0 3 223 224 502 41 20 1 0 3 871 872 876 17 12 1 0 3 233 234 503 17 12 1 0 3 234 222 504 17 12 1 0 3 107 492 106 17 12 1 0 3 496 21 500 17 12 1 0 3 112 113 505 17 12 1 0 3 226 227 128 17 12 1 0 3 130 228 506 17 12 1 0 3 135 134 507 17 12 1 0 3 133 231 134 17 12 1 0 3 17 498 499 17 12 1 0 3 136 135 498 17 12 1 0 3 18 499 495 17 12 1 0 3 112 505 494 17 12 1 0 3 222 501 504 17 12 1 0 3 223 502 501 41 20 1 0 3 870 871 876 17 12 1 0 3 228 229 506 17 12 1 0 3 234 504 503 17 12 1 0 3 23 491 500 17 12 1 0 3 492 493 508 17 12 1 0 3 493 494 508 17 12 1 0 3 505 113 495 17 12 1 0 3 129 128 227 17 12 1 0 3 126 497 127 17 12 1 0 3 497 225 127 17 12 1 0 3 130 129 228 17 12 1 0 3 131 130 506 17 12 1 0 3 133 230 231 17 12 1 0 3 229 230 506 17 12 1 0 3 232 233 507 17 12 1 0 3 505 495 509 17 12 1 0 3 504 501 510 17 12 1 0 3 494 505 511 17 12 1 0 3 508 494 511 17 12 1 0 3 505 509 511 17 12 1 0 3 495 499 509 17 12 1 0 3 500 491 512 17 12 1 0 3 509 499 503 17 12 1 0 3 496 500 502 17 12 1 0 3 502 500 501 17 12 1 0 3 503 499 498 17 12 1 0 3 503 504 509 17 12 1 0 3 135 507 498 17 12 1 0 3 232 134 231 17 12 1 0 3 509 504 510 17 12 1 0 3 233 503 507 17 12 1 0 3 507 503 498 17 12 1 0 3 230 132 506 17 12 1 0 3 492 508 512 17 12 1 0 3 502 224 496 17 12 1 0 3 501 500 512 17 12 1 0 3 510 501 512 17 12 1 0 3 492 512 491 17 12 1 0 3 106 492 491 17 12 1 0 3 226 127 225 17 12 1 0 3 509 510 511 17 12 1 0 3 510 512 508 17 12 1 0 3 508 511 510 17 12 1 0 3 225 497 224 17 12 1 0 3 496 224 497 3 13 1 0 3 7 5 163 3 13 1 0 3 163 8 174 3 13 1 0 3 174 7 163 3 13 1 0 3 11 174 8 3 13 1 0 3 15 16 195 3 13 1 0 3 194 14 13 3 13 1 0 3 16 194 195 3 13 1 0 3 13 195 194 9 14 1 0 3 6 164 513 9 14 1 0 3 165 532 164 9 14 1 0 3 169 170 256 9 14 1 0 3 171 172 514 9 14 1 0 3 9 6 515 9 14 1 0 3 175 9 516 9 14 1 0 3 176 175 517 9 14 1 0 3 175 516 517 9 14 1 0 3 178 177 518 9 14 1 0 3 179 178 519 9 14 1 0 3 180 179 519 9 14 1 0 3 178 518 519 9 14 1 0 3 181 180 520 9 14 1 0 3 180 519 520 9 14 1 0 3 182 181 520 9 14 1 0 3 183 182 521 9 14 1 0 3 184 183 521 9 14 1 0 3 182 520 521 9 14 1 0 3 14 185 522 9 14 1 0 3 13 14 523 9 14 1 0 3 248 249 513 9 14 1 0 3 249 250 524 9 14 1 0 3 250 251 525 9 14 1 0 3 251 252 526 9 14 1 0 3 252 253 527 9 14 1 0 3 253 254 528 9 14 1 0 3 254 255 514 9 14 1 0 3 257 258 529 9 14 1 0 3 258 259 530 9 14 1 0 3 259 260 531 9 14 1 0 3 260 248 532 9 14 1 0 3 531 260 532 9 14 1 0 3 248 513 532 9 14 1 0 3 513 164 532 9 14 1 0 3 256 170 533 9 14 1 0 3 165 166 531 9 14 1 0 3 166 167 530 9 14 1 0 3 167 168 530 9 14 1 0 3 168 169 529 9 14 1 0 3 9 515 516 9 14 1 0 3 172 13 534 9 14 1 0 3 184 521 535 9 14 1 0 3 176 543 177 9 14 1 0 3 14 522 523 9 14 1 0 3 524 250 525 9 14 1 0 3 185 184 535 9 14 1 0 3 13 523 534 9 14 1 0 3 532 165 531 9 14 1 0 3 249 524 515 9 14 1 0 3 251 526 525 9 14 1 0 3 252 527 526 9 14 1 0 3 253 528 527 9 14 1 0 3 255 256 533 9 14 1 0 3 258 530 529 9 14 1 0 3 259 531 530 9 14 1 0 3 249 515 513 9 14 1 0 3 168 529 530 9 14 1 0 3 6 513 515 9 14 1 0 3 531 166 530 9 14 1 0 3 516 515 536 9 14 1 0 3 515 524 536 9 14 1 0 3 534 523 528 9 14 1 0 3 520 519 537 9 14 1 0 3 519 518 537 9 14 1 0 3 524 525 536 9 14 1 0 3 525 526 544 9 14 1 0 3 254 514 534 9 14 1 0 3 169 256 257 9 14 1 0 3 514 172 534 9 14 1 0 3 517 516 538 9 14 1 0 3 516 536 538 9 14 1 0 3 526 527 539 9 14 1 0 3 527 528 540 9 14 1 0 3 528 523 540 9 14 1 0 3 255 533 514 9 14 1 0 3 528 254 534 9 14 1 0 3 535 521 541 9 14 1 0 3 169 257 529 9 14 1 0 3 535 541 539 9 14 1 0 3 525 544 536 9 14 1 0 3 527 540 539 9 14 1 0 3 171 514 533 9 14 1 0 3 170 171 533 9 14 1 0 3 523 522 540 9 14 1 0 3 544 526 539 9 14 1 0 3 541 521 520 9 14 1 0 3 185 535 522 9 14 1 0 3 541 520 537 9 14 1 0 3 522 535 540 9 14 1 0 3 539 541 544 9 14 1 0 3 537 518 542 9 14 1 0 3 537 544 541 9 14 1 0 3 536 544 538 9 14 1 0 3 518 177 543 9 14 1 0 3 518 543 542 9 14 1 0 3 542 543 538 9 14 1 0 3 517 538 543 9 14 1 0 3 535 539 540 9 14 1 0 3 543 176 517 9 14 1 0 3 537 542 544 41 20 1 0 3 869 870 876 9 14 1 0 3 542 538 544 41 20 1 0 3 326 869 875 10 15 1 0 3 16 15 545 10 15 1 0 3 15 186 546 10 15 1 0 3 187 188 547 10 15 1 0 3 188 189 548 10 15 1 0 3 547 188 548 10 15 1 0 3 189 190 548 10 15 1 0 3 190 191 549 10 15 1 0 3 548 190 549 10 15 1 0 3 192 559 191 10 15 1 0 3 193 10 550 10 15 1 0 3 196 16 551 10 15 1 0 3 197 196 552 10 15 1 0 3 196 551 552 10 15 1 0 3 199 198 271 10 15 1 0 3 201 200 273 10 15 1 0 3 203 202 262 10 15 1 0 3 205 204 264 10 15 1 0 3 207 206 553 10 15 1 0 3 12 207 553 41 20 1 0 3 338 326 875 10 15 1 0 3 10 12 554 10 15 1 0 3 265 266 553 10 15 1 0 3 266 267 555 10 15 1 0 3 267 268 556 10 15 1 0 3 268 269 557 10 15 1 0 3 269 270 551 10 15 1 0 3 15 546 545 10 15 1 0 3 186 187 558 10 15 1 0 3 551 16 545 10 15 1 0 3 192 193 559 10 15 1 0 3 271 198 560 10 15 1 0 3 201 273 561 10 15 1 0 3 200 199 272 10 15 1 0 3 202 201 561 10 15 1 0 3 264 265 205 10 15 1 0 3 204 203 263 10 15 1 0 3 10 554 550 10 15 1 0 3 558 187 547 10 15 1 0 3 559 193 550 10 15 1 0 3 271 560 270 10 15 1 0 3 200 272 273 10 15 1 0 3 263 203 262 10 15 1 0 3 204 263 264 10 15 1 0 3 12 553 554 10 15 1 0 3 267 556 555 10 15 1 0 3 268 557 556 10 15 1 0 3 269 551 557 10 15 1 0 3 549 191 559 10 15 1 0 3 186 558 546 10 15 1 0 3 272 199 271 10 15 1 0 3 550 566 559 10 15 1 0 3 551 545 557 10 15 1 0 3 547 548 563 10 15 1 0 3 548 549 563 10 15 1 0 3 552 560 197 10 15 1 0 3 555 556 562 41 20 1 0 3 874 337 875 10 15 1 0 3 266 555 553 10 15 1 0 3 546 558 564 10 15 1 0 3 558 547 564 10 15 1 0 3 554 553 555 41 20 1 0 3 337 338 875 10 15 1 0 3 549 559 562 10 15 1 0 3 557 545 565 10 15 1 0 3 556 557 565 10 15 1 0 3 545 546 565 10 15 1 0 3 563 549 562 10 15 1 0 3 206 205 265 10 15 1 0 3 562 556 563 10 15 1 0 3 550 554 566 10 15 1 0 3 261 262 561 10 15 1 0 3 563 556 565 10 15 1 0 3 273 261 561 10 15 1 0 3 546 564 565 10 15 1 0 3 564 547 563 10 15 1 0 3 206 265 553 10 15 1 0 3 551 270 552 10 15 1 0 3 270 560 552 10 15 1 0 3 562 559 566 10 15 1 0 3 561 262 202 10 15 1 0 3 563 565 564 10 15 1 0 3 554 555 566 41 20 1 0 3 336 337 874 10 15 1 0 3 198 197 560 10 15 1 0 3 555 562 566 45 16 1 0 3 210 209 567 45 16 1 0 3 211 210 568 45 16 1 0 3 210 567 568 45 16 1 0 3 212 211 569 45 16 1 0 3 211 568 569 45 16 1 0 3 213 212 570 45 16 1 0 3 212 569 570 45 16 1 0 3 214 213 571 45 16 1 0 3 213 570 571 45 16 1 0 3 215 214 572 45 16 1 0 3 214 571 572 45 16 1 0 3 216 215 573 45 16 1 0 3 215 572 573 45 16 1 0 3 217 216 574 45 16 1 0 3 216 573 574 45 16 1 0 3 218 217 575 45 16 1 0 3 217 574 575 45 16 1 0 3 219 218 576 45 16 1 0 3 218 575 576 45 16 1 0 3 220 219 577 45 16 1 0 3 219 576 577 45 16 1 0 3 221 220 578 45 16 1 0 3 220 577 578 45 16 1 0 3 209 221 579 45 16 1 0 3 567 209 579 45 16 1 0 3 221 578 579 45 16 1 0 3 314 313 580 45 16 1 0 3 315 314 581 45 16 1 0 3 314 580 581 45 16 1 0 3 316 315 582 45 16 1 0 3 315 581 582 45 16 1 0 3 317 316 583 45 16 1 0 3 316 582 583 45 16 1 0 3 318 317 584 45 16 1 0 3 317 583 584 45 16 1 0 3 319 318 585 45 16 1 0 3 318 584 585 45 16 1 0 3 320 319 586 45 16 1 0 3 319 585 586 45 16 1 0 3 321 320 587 45 16 1 0 3 320 586 587 45 16 1 0 3 322 321 588 45 16 1 0 3 321 587 588 45 16 1 0 3 323 322 589 45 16 1 0 3 322 588 589 45 16 1 0 3 324 323 590 45 16 1 0 3 323 589 590 45 16 1 0 3 325 324 591 45 16 1 0 3 324 590 591 45 16 1 0 3 313 325 592 45 16 1 0 3 580 313 592 45 16 1 0 3 325 591 592 45 16 1 0 3 569 568 593 45 16 1 0 3 570 569 594 45 16 1 0 3 569 593 594 45 16 1 0 3 571 570 595 45 16 1 0 3 570 594 595 45 16 1 0 3 572 571 596 45 16 1 0 3 571 595 596 45 16 1 0 3 573 572 597 45 16 1 0 3 572 596 597 45 16 1 0 3 574 573 598 45 16 1 0 3 573 597 598 45 16 1 0 3 575 574 599 45 16 1 0 3 574 598 599 45 16 1 0 3 576 575 600 45 16 1 0 3 575 599 600 45 16 1 0 3 577 576 601 45 16 1 0 3 576 600 601 45 16 1 0 3 578 577 602 45 16 1 0 3 577 601 602 45 16 1 0 3 581 580 603 45 16 1 0 3 582 581 604 45 16 1 0 3 581 603 604 45 16 1 0 3 583 582 605 45 16 1 0 3 582 604 605 45 16 1 0 3 584 583 606 45 16 1 0 3 583 605 606 45 16 1 0 3 585 584 607 45 16 1 0 3 584 606 607 45 16 1 0 3 586 585 608 45 16 1 0 3 585 607 608 45 16 1 0 3 587 586 609 45 16 1 0 3 586 608 609 45 16 1 0 3 588 587 610 45 16 1 0 3 587 609 610 45 16 1 0 3 589 588 611 45 16 1 0 3 588 610 611 45 16 1 0 3 590 589 612 45 16 1 0 3 589 611 612 45 16 1 0 3 591 590 613 45 16 1 0 3 590 612 613 45 16 1 0 3 603 580 614 45 16 1 0 3 580 592 614 45 16 1 0 3 579 578 615 45 16 1 0 3 578 602 615 45 16 1 0 3 592 591 616 45 16 1 0 3 614 592 616 45 16 1 0 3 591 613 616 45 16 1 0 3 567 579 617 45 16 1 0 3 579 615 617 45 16 1 0 3 593 568 618 45 16 1 0 3 568 567 618 45 16 1 0 3 567 617 618 45 16 1 0 3 593 618 619 45 16 1 0 3 595 594 620 45 16 1 0 3 596 595 604 45 16 1 0 3 597 596 603 45 16 1 0 3 598 597 614 45 16 1 0 3 599 598 616 45 16 1 0 3 600 599 613 45 16 1 0 3 601 600 612 45 16 1 0 3 602 601 611 45 16 1 0 3 605 604 620 45 16 1 0 3 606 605 620 45 16 1 0 3 606 622 607 45 16 1 0 3 608 607 619 45 16 1 0 3 609 608 621 45 16 1 0 3 610 609 615 45 16 1 0 3 611 610 602 45 16 1 0 3 612 611 601 45 16 1 0 3 613 612 600 45 16 1 0 3 604 595 620 45 16 1 0 3 604 603 596 45 16 1 0 3 613 599 616 45 16 1 0 3 602 610 615 45 16 1 0 3 597 603 614 45 16 1 0 3 619 618 621 45 16 1 0 3 608 619 621 45 16 1 0 3 594 593 622 45 16 1 0 3 618 617 621 45 16 1 0 3 616 598 614 45 16 1 0 3 609 621 615 45 16 1 0 3 606 620 622 45 16 1 0 3 619 607 622 45 16 1 0 3 594 622 620 45 16 1 0 3 617 615 621 45 16 1 0 3 593 619 622 33 17 1 0 3 223 222 623 33 17 1 0 3 224 223 624 33 17 1 0 3 223 623 624 33 17 1 0 3 225 224 625 33 17 1 0 3 224 624 625 33 17 1 0 3 226 225 626 33 17 1 0 3 225 625 626 33 17 1 0 3 227 226 627 33 17 1 0 3 226 626 627 33 17 1 0 3 228 227 628 33 17 1 0 3 227 627 628 33 17 1 0 3 229 228 629 33 17 1 0 3 228 628 629 33 17 1 0 3 230 229 630 33 17 1 0 3 229 629 630 33 17 1 0 3 231 230 631 33 17 1 0 3 230 630 631 33 17 1 0 3 232 231 632 33 17 1 0 3 231 631 632 33 17 1 0 3 233 232 633 33 17 1 0 3 232 632 633 33 17 1 0 3 234 233 634 33 17 1 0 3 233 633 634 33 17 1 0 3 222 234 635 33 17 1 0 3 234 634 635 33 17 1 0 3 235 236 636 33 17 1 0 3 237 238 637 33 17 1 0 3 239 240 638 33 17 1 0 3 241 242 639 33 17 1 0 3 243 244 640 33 17 1 0 3 245 246 641 33 17 1 0 3 247 235 642 33 17 1 0 3 235 636 642 33 17 1 0 3 262 261 643 33 17 1 0 3 263 262 644 33 17 1 0 3 262 643 644 33 17 1 0 3 264 263 645 33 17 1 0 3 263 644 645 33 17 1 0 3 265 264 646 33 17 1 0 3 264 645 646 33 17 1 0 3 266 265 647 33 17 1 0 3 265 646 647 33 17 1 0 3 267 266 648 33 17 1 0 3 266 647 648 33 17 1 0 3 268 267 649 33 17 1 0 3 267 648 649 33 17 1 0 3 269 268 650 33 17 1 0 3 268 649 650 33 17 1 0 3 270 269 651 33 17 1 0 3 269 650 651 33 17 1 0 3 271 270 652 33 17 1 0 3 270 651 652 33 17 1 0 3 272 271 653 33 17 1 0 3 271 652 653 33 17 1 0 3 273 272 654 33 17 1 0 3 272 653 654 33 17 1 0 3 261 273 655 33 17 1 0 3 643 261 655 33 17 1 0 3 273 654 655 33 17 1 0 3 288 287 656 33 17 1 0 3 289 288 657 33 17 1 0 3 288 656 657 33 17 1 0 3 290 289 658 33 17 1 0 3 289 657 658 33 17 1 0 3 291 290 659 33 17 1 0 3 290 658 659 33 17 1 0 3 292 291 660 33 17 1 0 3 291 659 660 33 17 1 0 3 293 292 661 33 17 1 0 3 292 660 661 33 17 1 0 3 294 293 662 33 17 1 0 3 293 661 662 33 17 1 0 3 295 294 663 33 17 1 0 3 294 662 663 33 17 1 0 3 296 295 664 33 17 1 0 3 295 663 664 33 17 1 0 3 297 296 665 33 17 1 0 3 296 664 665 33 17 1 0 3 298 297 666 33 17 1 0 3 297 665 666 33 17 1 0 3 299 298 667 33 17 1 0 3 298 666 667 33 17 1 0 3 287 299 668 33 17 1 0 3 656 287 668 33 17 1 0 3 299 667 668 33 17 1 0 3 300 301 669 33 17 1 0 3 302 303 670 33 17 1 0 3 304 305 671 33 17 1 0 3 306 307 672 33 17 1 0 3 308 309 673 33 17 1 0 3 310 311 674 33 17 1 0 3 312 300 675 33 17 1 0 3 300 669 675 33 17 1 0 3 327 326 676 33 17 1 0 3 328 327 677 33 17 1 0 3 327 676 677 33 17 1 0 3 329 328 678 33 17 1 0 3 328 677 678 33 17 1 0 3 330 329 679 33 17 1 0 3 329 678 679 33 17 1 0 3 331 330 680 33 17 1 0 3 330 679 680 33 17 1 0 3 332 331 681 33 17 1 0 3 331 680 681 33 17 1 0 3 333 332 682 33 17 1 0 3 332 681 682 33 17 1 0 3 334 333 683 33 17 1 0 3 333 682 683 33 17 1 0 3 335 334 684 33 17 1 0 3 334 683 684 33 17 1 0 3 336 335 685 33 17 1 0 3 335 684 685 33 17 1 0 3 337 336 686 33 17 1 0 3 336 685 686 33 17 1 0 3 338 337 687 33 17 1 0 3 337 686 687 33 17 1 0 3 326 338 688 33 17 1 0 3 676 326 688 33 17 1 0 3 338 687 688 33 17 1 0 3 636 236 689 33 17 1 0 3 236 237 689 33 17 1 0 3 237 637 689 33 17 1 0 3 238 239 690 33 17 1 0 3 240 241 691 33 17 1 0 3 242 243 692 33 17 1 0 3 244 245 693 33 17 1 0 3 246 247 694 33 17 1 0 3 670 303 695 33 17 1 0 3 303 304 695 33 17 1 0 3 301 302 696 33 17 1 0 3 304 671 695 33 17 1 0 3 301 696 669 33 17 1 0 3 305 306 697 33 17 1 0 3 307 308 698 33 17 1 0 3 309 310 699 33 17 1 0 3 311 312 700 33 17 1 0 3 238 690 637 33 17 1 0 3 692 243 640 33 17 1 0 3 222 635 623 33 17 1 0 3 638 240 691 33 17 1 0 3 639 242 692 33 17 1 0 3 640 244 693 33 17 1 0 3 641 246 694 33 17 1 0 3 671 305 697 33 17 1 0 3 672 307 698 33 17 1 0 3 673 309 699 33 17 1 0 3 674 311 700 33 17 1 0 3 693 245 641 33 17 1 0 3 694 247 642 33 17 1 0 3 699 310 674 33 17 1 0 3 700 312 675 33 17 1 0 3 691 241 639 33 17 1 0 3 690 239 638 33 17 1 0 3 696 302 670 33 17 1 0 3 698 308 673 33 17 1 0 3 697 306 672 33 17 1 0 3 625 624 701 33 17 1 0 3 626 625 702 33 17 1 0 3 625 701 702 33 17 1 0 3 627 626 703 33 17 1 0 3 626 702 703 33 17 1 0 3 628 627 704 33 17 1 0 3 627 703 704 33 17 1 0 3 629 628 705 33 17 1 0 3 628 704 705 33 17 1 0 3 630 629 706 33 17 1 0 3 629 705 706 33 17 1 0 3 631 630 707 33 17 1 0 3 630 706 707 33 17 1 0 3 632 631 708 33 17 1 0 3 631 707 708 33 17 1 0 3 633 632 709 33 17 1 0 3 632 708 709 33 17 1 0 3 634 633 710 33 17 1 0 3 633 709 710 33 17 1 0 3 635 634 711 33 17 1 0 3 634 710 711 33 17 1 0 3 689 637 712 33 17 1 0 3 696 670 713 33 17 1 0 3 639 692 714 33 17 1 0 3 690 638 715 33 17 1 0 3 640 693 716 33 17 1 0 3 623 635 717 33 17 1 0 3 635 711 717 33 17 1 0 3 641 694 718 33 17 1 0 3 671 697 719 33 17 1 0 3 699 674 720 33 17 1 0 3 672 698 721 33 17 1 0 3 645 644 722 33 17 1 0 3 646 645 723 33 17 1 0 3 645 722 723 33 17 1 0 3 647 646 724 33 17 1 0 3 646 723 724 33 17 1 0 3 648 647 725 33 17 1 0 3 647 724 725 33 17 1 0 3 649 648 726 33 17 1 0 3 648 725 726 33 17 1 0 3 650 649 727 33 17 1 0 3 649 726 727 33 17 1 0 3 651 650 728 33 17 1 0 3 650 727 728 33 17 1 0 3 652 651 729 33 17 1 0 3 651 728 729 33 17 1 0 3 653 652 730 33 17 1 0 3 652 729 730 33 17 1 0 3 654 653 731 33 17 1 0 3 653 730 731 33 17 1 0 3 657 656 732 33 17 1 0 3 658 657 733 33 17 1 0 3 657 732 733 33 17 1 0 3 659 658 734 33 17 1 0 3 658 733 734 33 17 1 0 3 660 659 735 33 17 1 0 3 659 734 735 33 17 1 0 3 661 660 736 33 17 1 0 3 660 735 736 33 17 1 0 3 662 661 737 33 17 1 0 3 661 736 737 33 17 1 0 3 663 662 738 33 17 1 0 3 662 737 738 33 17 1 0 3 664 663 739 33 17 1 0 3 663 738 739 33 17 1 0 3 665 664 740 33 17 1 0 3 664 739 740 33 17 1 0 3 666 665 741 33 17 1 0 3 665 740 741 33 17 1 0 3 667 666 742 33 17 1 0 3 666 741 742 33 17 1 0 3 695 671 743 33 17 1 0 3 671 719 743 33 17 1 0 3 673 699 744 33 17 1 0 3 699 720 744 33 17 1 0 3 697 672 745 33 17 1 0 3 719 697 745 33 17 1 0 3 672 721 745 33 17 1 0 3 700 675 746 33 17 1 0 3 693 641 747 33 17 1 0 3 716 693 747 33 17 1 0 3 641 718 747 33 17 1 0 3 691 639 748 33 17 1 0 3 639 714 748 33 17 1 0 3 637 690 749 33 17 1 0 3 712 637 749 33 17 1 0 3 690 715 749 33 17 1 0 3 636 689 750 33 17 1 0 3 689 712 750 33 17 1 0 3 678 677 751 33 17 1 0 3 679 678 752 33 17 1 0 3 678 751 752 33 17 1 0 3 680 679 753 33 17 1 0 3 679 752 753 33 17 1 0 3 681 680 754 33 17 1 0 3 680 753 754 33 17 1 0 3 682 681 755 33 17 1 0 3 681 754 755 33 17 1 0 3 683 682 756 33 17 1 0 3 682 755 756 33 17 1 0 3 684 683 757 33 17 1 0 3 683 756 757 33 17 1 0 3 685 684 758 33 17 1 0 3 684 757 758 33 17 1 0 3 686 685 759 33 17 1 0 3 685 758 759 33 17 1 0 3 687 686 760 33 17 1 0 3 686 759 760 33 17 1 0 3 638 691 761 33 17 1 0 3 715 638 761 33 17 1 0 3 691 748 761 33 17 1 0 3 624 623 762 33 17 1 0 3 701 624 762 33 17 1 0 3 623 717 762 33 17 1 0 3 692 640 763 33 17 1 0 3 714 692 763 33 17 1 0 3 640 716 763 33 17 1 0 3 642 636 764 33 17 1 0 3 636 750 764 33 17 1 0 3 669 696 765 33 17 1 0 3 696 713 765 33 17 1 0 3 643 655 766 33 17 1 0 3 718 694 767 33 17 1 0 3 694 642 767 33 17 1 0 3 670 695 768 33 17 1 0 3 732 656 769 33 17 1 0 3 656 668 769 33 17 1 0 3 655 654 770 33 17 1 0 3 766 655 770 33 17 1 0 3 654 731 770 33 17 1 0 3 695 743 768 33 17 1 0 3 676 688 771 33 17 1 0 3 668 667 772 33 17 1 0 3 769 668 772 33 17 1 0 3 667 742 772 33 17 1 0 3 713 670 768 33 17 1 0 3 698 673 773 33 17 1 0 3 674 700 774 33 17 1 0 3 751 677 775 33 17 1 0 3 677 676 775 33 17 1 0 3 688 687 776 33 17 1 0 3 771 688 776 33 17 1 0 3 687 760 776 33 17 1 0 3 774 700 746 33 17 1 0 3 767 642 764 33 17 1 0 3 644 643 777 33 17 1 0 3 722 644 777 33 17 1 0 3 721 698 773 33 17 1 0 3 675 669 778 33 17 1 0 3 720 674 774 33 17 1 0 3 746 675 778 33 17 1 0 3 676 771 775 33 17 1 0 3 773 673 744 33 17 1 0 3 777 643 766 33 17 1 0 3 778 669 765 33 17 1 0 3 718 767 779 33 17 1 0 3 703 702 730 33 17 1 0 3 704 703 729 33 17 1 0 3 705 704 728 33 17 1 0 3 706 705 727 33 17 1 0 3 707 706 726 33 17 1 0 3 708 707 725 33 17 1 0 3 709 708 724 33 17 1 0 3 710 709 723 33 17 1 0 3 711 710 722 33 17 1 0 3 750 712 780 33 17 1 0 3 764 750 781 33 17 1 0 3 750 780 781 33 17 1 0 3 778 765 782 33 17 1 0 3 721 773 779 33 17 1 0 3 728 704 729 33 17 1 0 3 777 766 717 33 17 1 0 3 775 771 783 33 17 1 0 3 767 764 784 33 17 1 0 3 779 767 784 33 17 1 0 3 764 781 784 33 17 1 0 3 713 768 785 33 17 1 0 3 724 723 709 33 17 1 0 3 725 724 708 33 17 1 0 3 726 725 707 33 17 1 0 3 727 726 706 33 17 1 0 3 728 727 705 33 17 1 0 3 777 717 711 33 17 1 0 3 730 729 703 33 17 1 0 3 731 730 702 33 17 1 0 3 734 733 783 33 17 1 0 3 736 735 786 33 17 1 0 3 737 736 787 33 17 1 0 3 736 786 787 33 17 1 0 3 738 737 788 33 17 1 0 3 737 787 788 33 17 1 0 3 739 738 789 33 17 1 0 3 738 788 789 33 17 1 0 3 740 739 790 33 17 1 0 3 739 789 790 33 17 1 0 3 741 740 791 33 17 1 0 3 740 790 791 33 17 1 0 3 742 741 792 33 17 1 0 3 741 791 792 33 17 1 0 3 743 719 780 33 17 1 0 3 773 744 779 33 17 1 0 3 746 778 793 33 17 1 0 3 778 782 793 33 17 1 0 3 744 720 794 33 17 1 0 3 702 701 731 33 17 1 0 3 752 751 795 33 17 1 0 3 774 746 796 33 17 1 0 3 746 793 796 33 17 1 0 3 753 752 797 33 17 1 0 3 752 795 797 33 17 1 0 3 754 753 798 33 17 1 0 3 753 797 798 33 17 1 0 3 755 754 792 33 17 1 0 3 756 755 791 33 17 1 0 3 757 756 790 33 17 1 0 3 758 757 789 33 17 1 0 3 759 758 788 33 17 1 0 3 760 759 787 33 17 1 0 3 722 710 723 33 17 1 0 3 765 713 799 33 17 1 0 3 782 765 799 33 17 1 0 3 713 785 799 33 17 1 0 3 722 777 711 33 17 1 0 3 720 774 800 33 17 1 0 3 794 720 800 33 17 1 0 3 774 796 800 33 17 1 0 3 748 714 793 33 17 1 0 3 717 766 762 33 17 1 0 3 731 701 770 33 17 1 0 3 754 798 792 33 17 1 0 3 715 761 799 33 17 1 0 3 788 758 789 33 17 1 0 3 744 794 779 33 17 1 0 3 770 701 762 33 17 1 0 3 721 779 784 33 17 1 0 3 718 779 794 33 17 1 0 3 714 763 796 33 17 1 0 3 783 771 801 33 17 1 0 3 734 783 801 33 17 1 0 3 771 776 801 33 17 1 0 3 775 783 802 33 17 1 0 3 751 775 802 33 17 1 0 3 783 733 802 33 17 1 0 3 718 794 747 33 17 1 0 3 719 745 781 33 17 1 0 3 732 769 795 33 17 1 0 3 766 770 762 33 17 1 0 3 768 743 803 33 17 1 0 3 789 757 790 33 17 1 0 3 791 755 792 33 17 1 0 3 780 712 803 33 17 1 0 3 742 792 798 33 17 1 0 3 735 734 801 33 17 1 0 3 743 780 803 33 17 1 0 3 714 796 793 33 17 1 0 3 780 719 781 33 17 1 0 3 786 735 801 33 17 1 0 3 795 751 802 33 17 1 0 3 763 716 800 33 17 1 0 3 721 784 745 33 17 1 0 3 716 747 794 33 17 1 0 3 803 712 749 33 17 1 0 3 749 715 785 33 17 1 0 3 748 793 782 33 17 1 0 3 776 760 786 33 17 1 0 3 715 799 785 33 17 1 0 3 756 791 790 33 17 1 0 3 759 788 787 33 17 1 0 3 760 787 786 33 17 1 0 3 761 748 782 33 17 1 0 3 802 733 732 33 17 1 0 3 785 768 803 33 17 1 0 3 772 742 798 33 17 1 0 3 732 795 802 33 17 1 0 3 800 716 794 33 17 1 0 3 799 761 782 33 17 1 0 3 800 796 763 33 17 1 0 3 801 776 786 33 17 1 0 3 749 785 803 33 17 1 0 3 784 781 745 33 17 1 0 3 769 772 797 33 17 1 0 3 769 797 795 33 17 1 0 3 798 797 772 42 18 1 0 3 249 248 804 42 18 1 0 3 250 249 805 42 18 1 0 3 249 804 805 42 18 1 0 3 251 250 806 42 18 1 0 3 250 805 806 42 18 1 0 3 252 251 807 42 18 1 0 3 251 806 807 42 18 1 0 3 253 252 808 42 18 1 0 3 252 807 808 42 18 1 0 3 254 253 809 42 18 1 0 3 253 808 809 42 18 1 0 3 255 254 810 42 18 1 0 3 254 809 810 42 18 1 0 3 256 255 811 42 18 1 0 3 255 810 811 42 18 1 0 3 257 256 812 42 18 1 0 3 256 811 812 42 18 1 0 3 258 257 813 42 18 1 0 3 257 812 813 42 18 1 0 3 259 258 814 42 18 1 0 3 258 813 814 42 18 1 0 3 260 259 815 42 18 1 0 3 259 814 815 42 18 1 0 3 248 260 816 42 18 1 0 3 804 248 816 42 18 1 0 3 260 815 816 42 18 1 0 3 275 274 817 42 18 1 0 3 276 275 818 42 18 1 0 3 275 817 818 42 18 1 0 3 277 276 819 42 18 1 0 3 276 818 819 42 18 1 0 3 278 277 820 42 18 1 0 3 277 819 820 42 18 1 0 3 279 278 821 42 18 1 0 3 278 820 821 42 18 1 0 3 280 279 822 42 18 1 0 3 279 821 822 42 18 1 0 3 281 280 823 42 18 1 0 3 280 822 823 42 18 1 0 3 282 281 824 42 18 1 0 3 281 823 824 42 18 1 0 3 283 282 825 42 18 1 0 3 282 824 825 42 18 1 0 3 284 283 826 42 18 1 0 3 283 825 826 42 18 1 0 3 285 284 827 42 18 1 0 3 284 826 827 42 18 1 0 3 286 285 828 42 18 1 0 3 285 827 828 42 18 1 0 3 274 286 829 42 18 1 0 3 817 274 829 42 18 1 0 3 286 828 829 42 18 1 0 3 806 805 830 42 18 1 0 3 807 806 831 42 18 1 0 3 806 830 831 42 18 1 0 3 808 807 832 42 18 1 0 3 807 831 832 42 18 1 0 3 809 808 833 42 18 1 0 3 808 832 833 42 18 1 0 3 810 809 834 42 18 1 0 3 809 833 834 42 18 1 0 3 811 810 835 42 18 1 0 3 810 834 835 42 18 1 0 3 812 811 836 42 18 1 0 3 811 835 836 42 18 1 0 3 813 812 837 42 18 1 0 3 812 836 837 42 18 1 0 3 814 813 838 42 18 1 0 3 813 837 838 42 18 1 0 3 815 814 839 42 18 1 0 3 814 838 839 42 18 1 0 3 818 817 840 42 18 1 0 3 819 818 841 42 18 1 0 3 818 840 841 42 18 1 0 3 820 819 842 42 18 1 0 3 819 841 842 42 18 1 0 3 821 820 843 42 18 1 0 3 820 842 843 42 18 1 0 3 822 821 844 42 18 1 0 3 821 843 844 42 18 1 0 3 823 822 845 42 18 1 0 3 822 844 845 42 18 1 0 3 824 823 846 42 18 1 0 3 823 845 846 42 18 1 0 3 825 824 847 42 18 1 0 3 824 846 847 42 18 1 0 3 826 825 848 42 18 1 0 3 825 847 848 42 18 1 0 3 827 826 849 42 18 1 0 3 826 848 849 42 18 1 0 3 828 827 850 42 18 1 0 3 827 849 850 42 18 1 0 3 840 817 851 42 18 1 0 3 817 829 851 42 18 1 0 3 816 815 852 42 18 1 0 3 815 839 852 42 18 1 0 3 829 828 853 42 18 1 0 3 851 829 853 42 18 1 0 3 828 850 853 42 18 1 0 3 804 816 854 42 18 1 0 3 816 852 854 42 18 1 0 3 830 805 855 42 18 1 0 3 805 804 855 42 18 1 0 3 804 854 855 42 18 1 0 3 830 855 856 42 18 1 0 3 832 831 857 42 18 1 0 3 833 832 853 42 18 1 0 3 834 833 850 42 18 1 0 3 835 834 849 42 18 1 0 3 836 835 848 42 18 1 0 3 837 836 847 42 18 1 0 3 838 837 846 42 18 1 0 3 839 838 845 42 18 1 0 3 843 842 858 42 18 1 0 3 844 843 852 42 18 1 0 3 845 844 839 42 18 1 0 3 846 845 838 42 18 1 0 3 847 846 837 42 18 1 0 3 848 847 836 42 18 1 0 3 849 848 835 42 18 1 0 3 850 849 834 42 18 1 0 3 831 830 859 42 18 1 0 3 857 831 859 42 18 1 0 3 830 856 859 42 18 1 0 3 841 840 856 42 18 1 0 3 850 833 853 42 18 1 0 3 839 844 852 42 18 1 0 3 840 851 859 42 18 1 0 3 856 855 860 42 18 1 0 3 841 856 860 42 18 1 0 3 855 854 860 42 18 1 0 3 842 841 860 42 18 1 0 3 860 854 858 42 18 1 0 3 854 852 858 42 18 1 0 3 856 840 859 42 18 1 0 3 842 860 858 42 18 1 0 3 832 857 853 42 18 1 0 3 851 853 857 42 18 1 0 3 857 859 851 42 18 1 0 3 843 858 852 34 19 1 0 3 301 300 861 34 19 1 0 3 302 301 862 34 19 1 0 3 301 861 862 34 19 1 0 3 303 302 862 34 19 1 0 3 304 303 863 34 19 1 0 3 303 862 863 34 19 1 0 3 305 304 863 34 19 1 0 3 306 305 864 34 19 1 0 3 307 306 864 34 19 1 0 3 305 863 864 34 19 1 0 3 308 307 865 34 19 1 0 3 307 864 865 34 19 1 0 3 309 308 865 34 19 1 0 3 310 309 866 34 19 1 0 3 311 310 866 34 19 1 0 3 309 865 866 34 19 1 0 3 312 311 867 34 19 1 0 3 300 312 867 34 19 1 0 3 311 866 867 34 19 1 0 3 300 867 861 34 19 1 0 3 863 862 868 34 19 1 0 3 862 861 868 34 19 1 0 3 864 863 868 34 19 1 0 3 865 864 868 34 19 1 0 3 866 865 868 34 19 1 0 3 861 867 868 34 19 1 0 3 867 866 868 41 20 1 0 3 326 327 869 41 20 1 0 3 327 328 870 41 20 1 0 3 869 327 870 41 20 1 0 3 328 329 870 41 20 1 0 3 329 330 871 41 20 1 0 3 870 329 871 41 20 1 0 3 330 331 871 41 20 1 0 3 331 332 872 41 20 1 0 3 871 331 872 41 20 1 0 3 332 333 872 41 20 1 0 3 333 334 873 41 20 1 0 3 872 333 873 41 20 1 0 3 334 335 873 41 20 1 0 3 335 336 874 41 20 1 0 3 873 335 874 # matnr np p1 p2 p3 p4 volumeelements 2709 1 4 918 916 268 917 1 4 731 960 730 956 1 4 533 893 255 920 1 4 888 891 524 536 1 4 259 815 260 911 1 4 341 37 931 36 1 4 419 376 298 404 1 4 721 672 698 939 1 4 939 779 721 938 1 4 428 59 445 242 1 4 254 809 911 253 1 4 116 386 407 48 1 4 923 270 894 895 1 4 914 544 915 891 1 4 308 698 307 865 1 4 365 385 313 935 1 4 477 218 493 217 1 4 390 391 25 114 1 4 429 61 347 60 1 4 787 789 955 944 1 4 731 960 956 770 1 4 450 449 431 238 1 4 560 895 535 552 1 4 520 273 541 272 1 4 317 297 376 404 1 4 956 770 701 731 1 4 544 917 922 915 1 4 93 152 151 394 1 4 936 604 603 581 1 4 942 644 922 645 1 4 100 111 110 494 1 4 329 330 871 679 1 4 211 510 509 901 1 4 940 779 767 718 1 4 940 747 718 641 1 4 240 451 448 453 1 4 456 457 241 908 1 4 380 409 393 417 1 4 242 639 908 692 1 4 235 247 906 642 1 4 880 278 277 877 1 4 924 820 819 277 1 4 434 422 277 877 1 4 956 770 937 701 1 4 961 950 959 876 1 4 880 276 277 924 1 4 880 924 277 278 1 4 708 631 707 905 1 4 897 523 528 896 1 4 412 296 416 295 1 4 23 105 500 137 1 4 428 59 242 58 1 4 631 630 707 905 1 4 914 915 544 922 1 4 904 604 596 603 1 4 396 290 289 90 1 4 762 717 937 623 1 4 471 210 509 470 1 4 911 815 260 816 1 4 447 452 235 906 1 4 529 921 257 258 1 4 154 395 91 289 1 4 413 298 299 420 1 4 940 774 800 796 1 4 558 920 893 533 1 4 429 61 446 347 1 4 225 224 937 905 1 4 160 159 85 398 1 4 154 91 90 289 1 4 396 154 289 395 1 4 940 779 718 794 1 4 558 920 533 547 1 4 558 920 547 564 1 4 267 648 922 266 1 4 888 555 266 553 1 4 939 779 938 940 1 4 248 804 249 911 1 4 555 888 887 554 1 4 806 913 911 805 1 4 291 659 932 933 1 4 956 960 730 937 1 4 258 921 257 910 1 4 466 506 229 228 1 4 913 804 911 805 1 4 917 268 922 915 1 4 829 924 927 817 1 4 466 484 228 229 1 4 659 933 290 658 1 4 279 924 278 821 1 4 31 32 162 370 1 4 781 784 938 745 1 4 840 913 927 851 1 4 913 814 813 911 1 4 889 248 260 886 1 4 909 889 260 886 1 4 539 917 923 541 1 4 950 790 957 955 1 4 484 466 465 229 1 4 380 419 371 376 1 4 372 374 370 399 1 4 665 741 932 740 1 4 915 266 914 891 1 4 248 532 260 886 1 4 735 948 932 801 1 4 790 955 789 757 1 4 287 93 152 92 1 4 583 605 936 582 1 4 441 286 442 885 1 4 237 450 881 882 1 4 936 318 376 384 1 4 195 523 194 13 1 4 908 693 641 245 1 4 698 308 673 865 1 4 884 362 354 343 1 4 915 266 891 267 1 4 936 589 322 323 1 4 863 868 939 862 1 4 408 369 321 368 1 4 633 232 905 233 1 4 864 697 306 305 1 4 779 939 744 940 1 4 782 748 940 761 1 4 949 681 872 682 1 4 588 589 322 936 1 4 773 698 673 865 1 4 537 520 519 261 1 4 870 329 679 678 1 4 949 681 682 755 1 4 6 208 173 515 1 4 959 932 950 787 1 4 351 883 238 350 1 4 882 237 238 350 1 4 943 797 769 795 1 4 787 759 788 955 1 4 950 943 753 941 1 4 204 518 203 263 1 4 883 882 238 350 1 4 904 618 621 900 1 4 294 378 293 398 1 4 318 317 376 404 1 4 297 933 932 666 1 4 943 752 751 947 1 4 737 738 662 932 1 4 465 229 490 484 1 4 526 544 525 915 1 4 407 116 48 117 1 4 392 42 411 365 1 4 544 891 525 915 1 4 917 526 892 915 1 4 940 720 800 774 1 4 947 950 753 871 1 4 259 909 260 531 1 4 33 339 1 41 1 4 422 434 361 877 1 4 924 286 829 828 1 4 909 889 910 260 1 4 228 484 227 905 1 4 537 273 261 922 1 4 264 265 914 922 1 4 925 280 929 931 1 4 431 883 238 442 1 4 955 932 790 789 1 4 534 364 514 172 1 4 716 940 763 640 1 4 281 925 930 931 1 4 371 390 391 405 1 4 437 280 931 436 1 4 375 385 935 936 1 4 375 385 381 935 1 4 375 402 316 315 1 4 257 912 919 256 1 4 925 281 280 931 1 4 72 381 365 400 1 4 463 136 498 464 1 4 688 776 875 687 1 4 959 947 943 775 1 4 280 929 931 436 1 4 395 92 91 288 1 4 797 941 798 753 1 4 904 616 598 599 1 4 660 659 735 932 1 4 792 950 791 755 1 4 413 394 420 299 1 4 592 936 614 580 1 4 941 950 754 753 1 4 940 714 796 763 1 4 803 743 780 938 1 4 406 384 369 377 1 4 369 384 406 320 1 4 915 266 267 922 1 4 163 362 343 40 1 4 384 319 318 405 1 4 900 567 579 209 1 4 934 933 414 291 1 4 555 891 266 267 1 4 785 713 768 938 1 4 685 873 874 335 1 4 830 913 805 855 1 4 385 313 325 366 1 4 904 610 615 609 1 4 713 765 939 938 1 4 553 890 266 888 1 4 890 516 888 553 1 4 889 911 910 260 1 4 815 852 913 839 1 4 274 924 829 817 1 4 837 847 846 913 1 4 749 715 785 938 1 4 842 913 927 841 1 4 737 944 932 787 1 4 578 900 577 602 1 4 714 692 763 940 1 4 913 831 832 857 1 4 919 921 189 548 1 4 715 749 940 938 1 4 943 769 732 795 1 4 295 418 410 294 1 4 913 834 850 833 1 4 904 603 596 597 1 4 340 925 880 929 1 4 940 939 765 938 1 4 765 939 940 778 1 4 915 266 922 914 1 4 520 521 272 541 1 4 36 66 436 35 1 4 853 828 850 927 1 4 845 823 822 927 1 4 788 787 955 944 1 4 841 819 818 927 1 4 435 65 35 436 1 4 611 589 588 936 1 4 32 72 365 42 1 4 940 765 799 938 1 4 801 787 953 948 1 4 419 104 390 393 1 4 954 952 730 960 1 4 942 710 709 905 1 4 952 653 954 730 1 4 913 809 834 833 1 4 904 600 613 599 1 4 831 913 832 807 1 4 900 215 572 214 1 4 562 898 889 903 1 4 270 551 269 894 1 4 149 137 469 24 1 4 565 556 916 898 1 4 423 884 283 284 1 4 694 247 642 906 1 4 399 162 161 29 1 4 940 749 712 938 1 4 651 728 729 922 1 4 225 226 483 905 1 4 895 521 541 271 1 4 275 924 817 818 1 4 148 149 125 469 1 4 437 438 37 931 1 4 137 496 125 469 1 4 149 137 125 469 1 4 506 143 142 131 1 4 518 537 264 542 1 4 923 895 541 271 1 4 166 165 192 531 1 4 918 539 527 917 1 4 902 891 250 524 1 4 249 887 513 886 1 4 913 831 806 807 1 4 911 250 805 249 1 4 550 363 886 559 1 4 531 886 192 559 1 4 647 265 646 922 1 4 187 170 547 533 1 4 555 562 566 902 1 4 516 890 388 553 1 4 912 920 893 564 1 4 224 223 937 905 1 4 731 960 770 954 1 4 891 555 902 903 1 4 422 433 878 421 1 4 270 895 923 271 1 4 858 842 913 843 1 4 924 825 282 283 1 4 358 440 885 884 1 4 913 835 849 834 1 4 936 375 382 376 1 4 191 921 909 549 1 4 483 223 224 905 1 4 954 730 653 731 1 4 913 814 839 838 1 4 97 108 107 476 1 4 888 516 538 536 1 4 372 31 84 162 1 4 421 3 62 41 1 4 911 806 805 250 1 4 259 815 911 814 1 4 712 940 750 689 1 4 942 726 707 725 1 4 401 314 935 400 1 4 4 424 62 73 1 4 292 934 415 291 1 4 943 732 769 932 1 4 419 298 413 404 1 4 771 959 953 787 1 4 402 375 374 315 1 4 298 380 417 299 1 4 181 272 520 182 1 4 490 483 905 486 1 4 240 352 453 239 1 4 882 275 928 883 1 4 78 356 79 427 1 4 396 291 414 290 1 4 93 287 152 394 1 4 706 942 726 707 1 4 352 885 453 239 1 4 214 502 474 501 1 4 286 274 442 885 1 4 812 256 811 911 1 4 924 275 817 274 1 4 814 913 813 838 1 4 566 555 887 554 1 4 943 732 802 795 1 4 358 440 884 348 1 4 229 905 228 629 1 4 143 506 130 131 1 4 942 707 708 725 1 4 433 879 421 454 1 4 918 551 269 557 1 4 920 912 893 255 1 4 562 903 889 902 1 4 217 508 216 901 1 4 889 248 911 260 1 4 913 837 813 838 1 4 912 911 910 889 1 4 882 275 883 431 1 4 555 566 887 902 1 4 432 928 433 882 1 4 276 275 928 432 1 4 677 870 327 869 1 4 947 950 943 753 1 4 834 913 850 849 1 4 528 916 896 527 1 4 769 932 668 772 1 4 393 95 150 409 1 4 826 848 849 927 1 4 358 440 348 352 1 4 668 932 667 772 1 4 884 423 443 284 1 4 786 801 953 948 1 4 913 850 849 927 1 4 423 884 443 362 1 4 311 674 310 866 1 4 934 296 664 295 1 4 756 790 957 791 1 4 301 862 696 861 1 4 301 669 300 861 1 4 953 760 786 787 1 4 386 369 48 49 1 4 39 342 439 354 1 4 848 913 849 927 1 4 771 953 801 787 1 4 717 635 937 623 1 4 276 433 928 878 1 4 930 281 282 924 1 4 927 822 844 821 1 4 466 506 465 229 1 4 841 913 856 860 1 4 142 230 141 465 1 4 141 230 133 231 1 4 467 144 129 145 1 4 918 540 896 527 1 4 921 549 190 548 1 4 226 468 467 128 1 4 506 142 466 465 1 4 142 506 230 465 1 4 141 230 142 132 1 4 141 230 231 465 1 4 904 605 604 936 1 4 917 918 269 268 1 4 934 665 932 664 1 4 140 135 139 464 1 4 886 173 363 550 1 4 842 913 841 860 1 4 842 858 913 860 1 4 683 682 873 333 1 4 776 760 875 687 1 4 283 930 924 926 1 4 394 383 409 151 1 4 875 686 874 337 1 4 93 94 383 151 1 4 3 422 63 41 1 4 158 397 378 398 1 4 716 693 747 940 1 4 343 362 354 40 1 4 924 930 283 282 1 4 942 708 707 905 1 4 952 945 922 946 1 4 870 775 947 876 1 4 273 181 201 200 1 4 654 952 954 770 1 4 913 808 832 807 1 4 243 428 57 356 1 4 672 864 306 307 1 4 677 947 870 775 1 4 864 672 306 697 1 4 108 476 492 107 1 4 231 490 480 465 1 4 936 375 315 935 1 4 297 933 666 298 1 4 942 708 724 725 1 4 904 606 936 607 1 4 886 902 566 889 1 4 934 664 663 295 1 4 236 444 345 881 1 4 463 462 123 19 1 4 894 270 923 269 1 4 55 77 355 427 1 4 241 908 691 240 1 4 900 219 218 901 1 4 236 452 444 881 1 4 471 499 509 503 1 4 471 499 503 487 1 4 488 471 503 487 1 4 185 184 535 552 1 4 489 487 503 498 1 4 848 836 835 913 1 4 528 916 527 253 1 4 677 947 775 751 1 4 909 259 260 910 1 4 489 488 503 487 1 4 232 231 632 905 1 4 899 275 274 883 1 4 934 661 662 932 1 4 471 488 503 234 1 4 787 932 801 783 1 4 831 859 857 913 1 4 388 176 890 517 1 4 735 948 801 786 1 4 487 499 503 498 1 4 709 942 905 708 1 4 893 898 912 565 1 4 729 946 952 922 1 4 346 236 349 444 1 4 239 908 690 238 1 4 450 452 881 454 1 4 192 191 531 559 1 4 625 626 937 702 1 4 946 730 952 960 1 4 435 34 35 65 1 4 815 852 816 913 1 4 959 876 947 775 1 4 452 907 450 881 1 4 78 56 79 356 1 4 194 897 195 545 1 4 551 545 194 16 1 4 929 435 436 279 1 4 16 551 196 194 1 4 444 236 425 452 1 4 259 814 911 258 1 4 558 564 546 893 1 4 549 562 563 910 1 4 757 957 949 756 1 4 512 501 500 214 1 4 391 384 377 371 1 4 951 777 717 766 1 4 384 391 405 371 1 4 930 925 357 341 1 4 356 428 57 79 1 4 297 420 403 934 1 4 906 940 689 636 1 4 423 71 70 362 1 4 560 198 521 271 1 4 930 925 341 931 1 4 521 199 272 271 1 4 439 38 69 438 1 4 951 777 937 717 1 4 919 912 910 563 1 4 185 522 894 535 1 4 208 6 9 515 1 4 203 518 204 178 1 4 919 189 188 548 1 4 905 942 711 937 1 4 889 566 886 559 1 4 264 543 890 205 1 4 548 919 910 563 1 4 369 408 47 368 1 4 191 909 531 559 1 4 777 937 946 951 1 4 921 548 919 910 1 4 408 369 47 407 1 4 221 578 579 900 1 4 257 921 919 910 1 4 168 190 530 167 1 4 369 320 407 321 1 4 259 921 530 258 1 4 550 566 886 887 1 4 909 562 549 910 1 4 77 76 355 426 1 4 792 950 755 754 1 4 561 180 520 519 1 4 276 275 818 924 1 4 912 563 898 889 1 4 562 898 903 556 1 4 961 950 876 949 1 4 912 911 889 898 1 4 911 903 889 898 1 4 388 890 516 517 1 4 388 553 890 206 1 4 703 946 937 730 1 4 946 730 960 937 1 4 521 272 541 271 1 4 194 897 545 896 1 4 561 262 519 261 1 4 897 545 546 195 1 4 897 545 565 546 1 4 166 192 191 531 1 4 251 807 911 806 1 4 905 623 937 635 1 4 268 917 892 915 1 4 210 900 211 901 1 4 427 77 355 426 1 4 467 129 228 227 1 4 467 146 145 128 1 4 711 942 905 710 1 4 287 414 420 933 1 4 931 438 342 930 1 4 627 704 937 703 1 4 635 905 711 937 1 4 711 942 777 937 1 4 114 28 371 377 1 4 104 26 371 114 1 4 771 776 801 953 1 4 702 956 730 937 1 4 955 932 789 787 1 4 587 936 586 609 1 4 711 905 635 634 1 4 297 420 934 933 1 4 635 905 222 234 1 4 364 171 533 514 1 4 949 950 957 955 1 4 792 950 754 941 1 4 105 459 491 475 1 4 113 505 112 387 1 4 942 724 647 725 1 4 319 320 936 586 1 4 82 60 445 59 1 4 890 176 388 206 1 4 449 431 238 442 1 4 225 226 937 626 1 4 499 462 123 487 1 4 886 173 550 887 1 4 717 711 777 937 1 4 301 302 696 862 1 4 224 225 937 625 1 4 479 468 497 147 1 4 468 479 497 225 1 4 126 496 497 148 1 4 886 173 887 513 1 4 548 919 563 547 1 4 263 644 922 262 1 4 497 482 496 224 1 4 531 260 886 909 1 4 921 259 910 258 1 4 909 259 910 921 1 4 89 88 156 379 1 4 259 911 260 910 1 4 528 916 253 897 1 4 900 572 596 571 1 4 900 572 597 596 1 4 913 848 849 835 1 4 257 912 256 911 1 4 528 916 897 896 1 4 913 911 811 810 1 4 942 646 922 647 1 4 836 913 812 811 1 4 912 254 893 255 1 4 194 897 896 523 1 4 703 946 730 729 1 4 563 912 910 889 1 4 913 836 835 811 1 4 34 435 35 340 1 4 920 912 256 919 1 4 460 103 102 387 1 4 737 944 787 788 1 4 497 482 224 479 1 4 565 912 564 563 1 4 54 76 53 355 1 4 897 565 916 898 1 4 99 109 477 493 1 4 329 870 328 678 1 4 177 518 264 543 1 4 262 537 519 261 1 4 645 942 722 723 1 4 521 895 541 535 1 4 897 916 557 896 1 4 455 243 457 908 1 4 517 176 175 388 1 4 808 809 913 833 1 4 950 949 872 876 1 4 192 165 532 531 1 4 253 898 897 916 1 4 897 898 253 254 1 4 507 489 480 233 1 4 176 543 205 890 1 4 934 660 661 932 1 4 189 921 919 529 1 4 900 578 615 602 1 4 919 189 529 169 1 4 257 813 911 812 1 4 600 900 576 575 1 4 325 44 366 121 1 4 104 380 393 419 1 4 925 930 926 924 1 4 651 728 922 650 1 4 402 412 296 416 1 4 364 187 186 558 1 4 520 561 519 261 1 4 921 548 190 189 1 4 913 853 850 927 1 4 880 925 926 924 1 4 269 270 922 651 1 4 219 218 508 493 1 4 494 219 901 508 1 4 119 368 46 118 1 4 511 510 508 901 1 4 210 900 901 209 1 4 489 507 464 498 1 4 180 561 201 202 1 4 895 894 535 552 1 4 104 22 390 393 1 4 818 924 817 927 1 4 212 501 473 222 1 4 504 471 509 503 1 4 391 386 377 406 1 4 105 27 96 459 1 4 225 479 497 224 1 4 496 137 482 469 1 4 627 905 937 628 1 4 462 499 470 487 1 4 429 61 60 83 1 4 380 409 373 393 1 4 409 299 417 380 1 4 747 716 940 794 1 4 563 562 889 910 1 4 684 961 758 685 1 4 900 210 211 568 1 4 215 900 901 214 1 4 220 111 494 481 1 4 424 50 73 444 1 4 626 627 937 703 1 4 840 851 927 817 1 4 693 747 940 641 1 4 12 208 207 553 1 4 235 452 447 425 1 4 757 949 955 758 1 4 55 356 427 245 1 4 900 593 568 569 1 4 611 904 601 612 1 4 499 124 18 123 1 4 403 416 934 420 1 4 853 829 828 927 1 4 829 853 851 927 1 4 906 245 908 641 1 4 807 913 911 806 1 4 256 912 255 911 1 4 961 873 949 876 1 4 906 641 908 940 1 4 449 907 458 908 1 4 544 891 536 525 1 4 402 374 296 412 1 4 583 936 317 316 1 4 622 904 619 607 1 4 851 829 927 817 1 4 28 49 377 114 1 4 906 641 940 694 1 4 908 693 940 641 1 4 952 945 770 654 1 4 942 650 649 922 1 4 661 737 932 736 1 4 925 279 929 280 1 4 659 932 658 734 1 4 925 279 280 924 1 4 925 279 924 880 1 4 946 705 937 942 1 4 140 507 480 134 1 4 402 375 296 374 1 4 41 877 878 422 1 4 685 961 758 759 1 4 339 361 877 41 1 4 226 468 484 467 1 4 649 942 922 648 1 4 947 871 870 876 1 4 446 430 174 11 1 4 961 874 873 876 1 4 917 544 922 541 1 4 463 489 464 498 1 4 948 787 736 932 1 4 429 60 445 82 1 4 396 89 290 90 1 4 154 155 396 90 1 4 942 650 922 728 1 4 948 787 786 736 1 4 684 961 949 758 1 4 269 917 922 923 1 4 654 655 945 770 1 4 946 705 942 728 1 4 787 786 953 948 1 4 513 363 886 173 1 4 705 942 905 937 1 4 675 669 939 861 1 4 932 659 291 660 1 4 934 660 932 291 1 4 958 105 96 459 1 4 298 933 299 420 1 4 868 720 940 674 1 4 912 547 919 920 1 4 418 934 294 295 1 4 934 933 291 932 1 4 934 660 291 292 1 4 936 375 317 316 1 4 544 537 542 914 1 4 494 219 508 493 1 4 316 296 403 402 1 4 948 787 932 801 1 4 720 940 674 774 1 4 900 600 904 599 1 4 935 374 401 381 1 4 473 485 486 223 1 4 868 774 674 940 1 4 311 867 674 866 1 4 875 771 869 876 1 4 397 415 293 398 1 4 428 59 58 81 1 4 894 185 535 552 1 4 943 751 775 947 1 4 82 445 81 59 1 4 642 235 636 906 1 4 926 351 885 358 1 4 879 350 878 344 1 4 879 424 421 454 1 4 891 555 903 892 1 4 397 292 293 415 1 4 768 713 939 938 1 4 940 764 750 636 1 4 292 157 397 87 1 4 826 848 927 825 1 4 642 940 906 636 1 4 78 56 356 55 1 4 513 363 173 164 1 4 259 258 911 910 1 4 940 764 636 642 1 4 867 312 311 700 1 4 544 537 914 922 1 4 868 746 939 675 1 4 55 78 427 356 1 4 367 120 325 324 1 4 44 45 120 367 1 4 294 934 415 293 1 4 43 411 42 366 1 4 37 38 438 68 1 4 679 947 752 753 1 4 334 335 873 684 1 4 325 44 367 366 1 4 679 947 678 752 1 4 934 292 415 293 1 4 671 863 304 305 1 4 163 440 348 884 1 4 507 489 464 480 1 4 43 122 42 411 1 4 959 874 759 961 1 4 952 945 654 922 1 4 670 862 939 696 1 4 313 936 592 580 1 4 934 663 664 932 1 4 573 900 597 598 1 4 94 383 409 95 1 4 497 482 479 469 1 4 900 571 570 213 1 4 45 368 323 367 1 4 314 313 936 935 1 4 45 324 119 120 1 4 386 116 407 406 1 4 713 765 938 799 1 4 936 314 315 581 1 4 777 922 946 942 1 4 950 680 753 871 1 4 872 680 950 871 1 4 396 89 379 290 1 4 287 933 299 668 1 4 243 457 242 428 1 4 385 313 935 936 1 4 681 331 872 332 1 4 799 765 940 782 1 4 121 43 366 411 1 4 313 325 366 411 1 4 325 121 366 411 1 4 83 446 174 11 1 4 163 174 7 348 1 4 888 536 914 891 1 4 163 440 884 443 1 4 940 782 761 799 1 4 534 364 172 195 1 4 440 885 884 285 1 4 540 918 894 535 1 4 960 952 945 770 1 4 320 369 407 406 1 4 276 924 819 277 1 4 882 237 350 879 1 4 621 904 615 609 1 4 94 383 151 409 1 4 934 665 664 296 1 4 286 924 829 274 1 4 736 660 735 932 1 4 929 435 279 278 1 4 904 608 619 607 1 4 393 95 409 373 1 4 785 713 938 799 1 4 753 752 943 947 1 4 871 959 950 876 1 4 537 264 914 922 1 4 934 663 294 295 1 4 900 617 567 618 1 4 899 276 275 928 1 4 889 250 902 903 1 4 888 891 914 266 1 4 468 226 484 483 1 4 517 175 516 388 1 4 263 264 537 922 1 4 709 942 708 724 1 4 390 419 405 371 1 4 946 705 728 704 1 4 104 390 25 114 1 4 501 473 222 223 1 4 766 951 777 945 1 4 582 936 315 581 1 4 16 545 194 195 1 4 246 427 426 447 1 4 199 182 521 272 1 4 132 506 230 142 1 4 193 363 173 550 1 4 946 922 777 945 1 4 899 878 928 350 1 4 644 643 777 922 1 4 196 551 552 894 1 4 477 108 492 493 1 4 198 199 521 271 1 4 749 803 712 938 1 4 429 445 241 448 1 4 342 930 357 341 1 4 847 848 927 913 1 4 681 950 754 755 1 4 950 872 871 876 1 4 924 285 284 926 1 4 137 105 461 24 1 4 429 61 83 446 1 4 105 27 461 24 1 4 537 264 542 914 1 4 515 887 173 513 1 4 814 258 813 911 1 4 628 705 905 937 1 4 875 688 338 326 1 4 770 945 766 655 1 4 791 932 740 790 1 4 932 791 740 741 1 4 397 292 87 378 1 4 230 229 630 905 1 4 813 258 257 911 1 4 573 215 572 900 1 4 410 160 161 84 1 4 575 900 217 574 1 4 621 904 608 619 1 4 688 875 869 326 1 4 219 900 218 576 1 4 950 680 681 754 1 4 273 655 261 922 1 4 677 947 751 678 1 4 703 946 729 704 1 4 875 959 953 771 1 4 934 662 293 294 1 4 137 496 21 125 1 4 949 681 755 950 1 4 569 900 211 568 1 4 949 872 876 873 1 4 946 729 704 728 1 4 576 900 218 575 1 4 942 710 722 723 1 4 391 386 115 114 1 4 900 594 593 569 1 4 936 616 591 592 1 4 901 501 212 510 1 4 440 885 285 441 1 4 942 646 647 724 1 4 633 232 632 905 1 4 499 471 509 470 1 4 273 654 922 272 1 4 510 512 508 901 1 4 473 501 212 213 1 4 946 705 704 937 1 4 211 510 901 212 1 4 107 958 106 96 1 4 196 185 894 552 1 4 71 362 443 163 1 4 230 490 229 905 1 4 462 124 123 19 1 4 883 899 885 274 1 4 853 913 850 833 1 4 869 771 775 876 1 4 871 959 876 947 1 4 495 499 124 18 1 4 269 918 557 268 1 4 808 913 911 807 1 4 897 523 534 528 1 4 941 792 742 798 1 4 960 945 952 946 1 4 632 231 631 905 1 4 958 492 106 491 1 4 643 262 261 922 1 4 201 520 561 180 1 4 556 903 892 898 1 4 22 104 150 393 1 4 737 944 788 738 1 4 110 219 494 493 1 4 936 608 607 585 1 4 737 944 738 932 1 4 504 501 212 222 1 4 320 936 321 382 1 4 942 728 922 946 1 4 248 804 911 816 1 4 210 567 900 209 1 4 232 490 231 905 1 4 631 230 630 905 1 4 578 900 220 577 1 4 631 632 905 708 1 4 234 488 503 233 1 4 479 485 482 224 1 4 137 500 482 461 1 4 93 287 394 383 1 4 384 391 319 405 1 4 472 504 212 222 1 4 407 369 47 48 1 4 488 489 503 233 1 4 425 247 52 426 1 4 673 866 744 865 1 4 325 120 367 44 1 4 942 650 728 727 1 4 550 566 887 554 1 4 698 672 865 939 1 4 248 532 886 513 1 4 208 888 554 887 1 4 309 699 673 866 1 4 728 946 729 922 1 4 944 789 738 932 1 4 72 122 30 392 1 4 495 209 509 505 1 4 565 912 893 564 1 4 875 686 760 874 1 4 900 572 571 214 1 4 944 789 788 738 1 4 551 918 896 557 1 4 268 916 918 557 1 4 85 159 378 398 1 4 789 788 955 944 1 4 265 890 206 205 1 4 537 273 520 261 1 4 898 911 254 912 1 4 599 900 575 574 1 4 958 492 216 476 1 4 858 913 860 854 1 4 476 477 492 217 1 4 900 600 599 575 1 4 900 599 598 574 1 4 958 216 492 491 1 4 242 243 428 58 1 4 874 336 337 686 1 4 201 520 180 181 1 4 159 158 378 398 1 4 938 764 750 940 1 4 960 945 951 770 1 4 940 715 938 799 1 4 610 936 587 609 1 4 544 538 536 914 1 4 610 904 936 609 1 4 119 368 118 323 1 4 428 59 81 445 1 4 932 659 735 734 1 4 688 771 676 869 1 4 119 368 323 45 1 4 776 760 786 953 1 4 119 368 45 46 1 4 934 665 296 297 1 4 904 598 614 597 1 4 900 573 597 572 1 4 944 789 932 787 1 4 935 374 381 375 1 4 589 936 590 323 1 4 668 933 299 667 1 4 939 698 773 865 1 4 900 600 601 904 1 4 803 780 712 938 1 4 960 951 945 946 1 4 779 721 938 784 1 4 941 742 772 798 1 4 945 643 766 655 1 4 485 474 502 223 1 4 913 809 810 834 1 4 904 593 900 594 1 4 594 904 622 620 1 4 538 517 890 543 1 4 521 184 198 560 1 4 594 904 620 595 1 4 914 536 888 538 1 4 903 251 911 250 1 4 902 250 249 524 1 4 483 223 905 486 1 4 694 247 906 246 1 4 744 939 779 773 1 4 939 779 773 721 1 4 386 391 115 406 1 4 380 409 383 373 1 4 941 772 742 932 1 4 934 665 297 932 1 4 891 887 524 902 1 4 264 518 542 543 1 4 960 951 937 770 1 4 342 930 359 357 1 4 275 274 883 431 1 4 715 638 761 940 1 4 694 940 906 642 1 4 930 884 359 926 1 4 955 758 788 789 1 4 930 354 359 884 1 4 537 544 541 922 1 4 263 644 645 922 1 4 952 652 653 730 1 4 884 343 354 359 1 4 868 867 866 674 1 4 716 940 800 763 1 4 884 358 343 359 1 4 917 269 922 268 1 4 918 894 535 923 1 4 774 940 746 796 1 4 942 644 645 722 1 4 958 216 459 476 1 4 389 401 399 370 1 4 958 459 216 491 1 4 872 680 871 331 1 4 687 875 338 337 1 4 924 285 827 284 1 4 891 544 536 914 1 4 682 681 872 332 1 4 933 298 299 667 1 4 334 683 873 333 1 4 685 873 335 684 1 4 677 869 676 775 1 4 323 368 382 367 1 4 410 160 85 398 1 4 872 680 331 681 1 4 675 312 300 867 1 4 908 692 940 640 1 4 72 381 400 389 1 4 400 935 381 365 1 4 868 746 675 700 1 4 868 720 674 866 1 4 829 924 828 927 1 4 913 837 838 846 1 4 874 336 686 685 1 4 751 752 943 795 1 4 837 836 847 913 1 4 171 364 533 187 1 4 37 437 67 68 1 4 347 61 446 174 1 4 825 924 824 927 1 4 820 842 927 819 1 4 685 961 759 874 1 4 335 336 874 685 1 4 743 719 938 939 1 4 37 438 437 68 1 4 127 126 497 147 1 4 374 401 381 370 1 4 746 675 778 939 1 4 960 937 951 946 1 4 527 252 916 526 1 4 705 628 905 629 1 4 254 911 810 255 1 4 647 648 266 922 1 4 888 208 516 515 1 4 670 863 939 862 1 4 886 260 531 532 1 4 265 890 914 266 1 4 893 195 546 364 1 4 75 52 349 51 1 4 826 825 927 924 1 4 401 400 935 381 1 4 239 885 442 238 1 4 229 630 905 629 1 4 762 951 770 937 1 4 911 811 810 255 1 4 762 951 937 717 1 4 899 357 360 351 1 4 483 223 486 485 1 4 903 252 911 251 1 4 905 623 635 222 1 4 199 198 521 183 1 4 868 744 865 939 1 4 713 670 768 939 1 4 425 247 426 447 1 4 72 381 389 370 1 4 669 675 300 861 1 4 868 862 861 939 1 4 913 847 846 927 1 4 344 339 41 1 1 4 669 939 861 696 1 4 675 867 300 861 1 4 939 862 861 696 1 4 682 949 755 756 1 4 239 442 885 453 1 4 512 501 214 901 1 4 760 759 874 686 1 4 845 913 839 838 1 4 680 753 871 679 1 4 847 825 824 927 1 4 814 815 913 839 1 4 345 879 344 350 1 4 841 818 840 927 1 4 858 913 854 852 1 4 440 285 884 284 1 4 226 627 937 626 1 4 251 252 526 892 1 4 330 680 871 679 1 4 474 485 473 223 1 4 113 495 124 18 1 4 522 540 894 535 1 4 905 623 222 223 1 4 17 499 18 123 1 4 943 732 733 802 1 4 904 593 594 622 1 4 501 474 473 223 1 4 943 733 732 932 1 4 331 330 680 871 1 4 239 442 449 238 1 4 908 638 691 240 1 4 389 401 370 381 1 4 347 174 348 7 1 4 930 354 884 439 1 4 797 943 752 795 1 4 790 932 950 791 1 4 819 842 927 841 1 4 495 505 113 387 1 4 941 772 797 798 1 4 943 733 783 802 1 4 913 859 840 856 1 4 952 652 271 653 1 4 882 237 879 881 1 4 837 836 913 812 1 4 891 525 524 536 1 4 775 870 677 869 1 4 191 921 549 190 1 4 933 932 656 657 1 4 191 190 167 530 1 4 187 171 170 533 1 4 38 342 37 438 1 4 950 943 941 932 1 4 943 751 795 802 1 4 6 515 173 513 1 4 759 874 686 685 1 4 606 605 904 936 1 4 298 376 419 380 1 4 345 424 879 881 1 4 345 344 62 2 1 4 114 391 377 371 1 4 104 380 419 371 1 4 875 959 771 876 1 4 281 438 437 931 1 4 281 924 280 823 1 4 900 221 901 209 1 4 684 961 685 873 1 4 959 783 787 771 1 4 345 424 881 444 1 4 675 868 700 867 1 4 428 243 57 58 1 4 388 207 553 206 1 4 401 389 400 381 1 4 207 208 388 553 1 4 912 547 920 564 1 4 248 889 249 886 1 4 666 298 933 667 1 4 907 637 908 238 1 4 226 127 225 468 1 4 793 714 796 940 1 4 236 906 689 636 1 4 33 361 339 41 1 4 126 148 497 147 1 4 239 449 442 453 1 4 350 360 899 878 1 4 391 390 371 114 1 4 242 639 241 908 1 4 672 864 939 697 1 4 929 435 877 340 1 4 938 764 940 784 1 4 669 765 939 696 1 4 880 878 360 877 1 4 292 157 379 397 1 4 940 793 746 796 1 4 412 374 295 372 1 4 763 940 800 796 1 4 868 744 939 940 1 4 435 434 278 877 1 4 878 339 360 877 1 4 340 877 34 435 1 4 392 42 365 72 1 4 42 411 365 366 1 4 812 257 256 911 1 4 879 41 344 878 1 4 906 245 641 246 1 4 345 50 2 62 1 4 933 291 659 290 1 4 236 907 689 906 1 4 940 908 906 689 1 4 637 908 940 689 1 4 347 352 451 240 1 4 907 908 689 906 1 4 454 450 882 881 1 4 952 271 652 922 1 4 675 868 867 861 1 4 868 774 940 746 1 4 729 652 651 922 1 4 896 522 894 194 1 4 649 650 268 922 1 4 924 826 827 927 1 4 356 428 79 455 1 4 237 450 882 238 1 4 214 900 213 571 1 4 888 516 536 515 1 4 577 900 219 576 1 4 526 252 916 892 1 4 943 783 733 932 1 4 882 454 881 879 1 4 269 650 922 268 1 4 747 940 718 794 1 4 449 907 908 238 1 4 463 136 464 138 1 4 463 136 138 123 1 4 499 487 123 498 1 4 487 463 123 498 1 4 846 913 927 845 1 4 468 127 147 146 1 4 163 440 443 430 1 4 239 449 908 238 1 4 456 239 908 240 1 4 243 356 455 428 1 4 925 279 880 929 1 4 456 239 449 908 1 4 912 254 255 911 1 4 824 924 823 927 1 4 825 826 283 924 1 4 913 859 851 840 1 4 859 913 851 857 1 4 943 751 802 775 1 4 918 540 539 535 1 4 823 846 927 845 1 4 232 490 480 231 1 4 133 231 134 141 1 4 930 354 439 342 1 4 900 617 618 621 1 4 135 507 140 134 1 4 324 323 382 367 1 4 140 141 134 480 1 4 588 610 936 587 1 4 952 271 272 653 1 4 882 450 454 432 1 4 863 303 862 670 1 4 785 803 938 768 1 4 303 302 862 670 1 4 699 309 310 866 1 4 748 940 761 691 1 4 946 777 942 937 1 4 943 783 775 802 1 4 129 467 145 128 1 4 467 468 146 128 1 4 496 148 125 469 1 4 952 272 271 922 1 4 511 510 901 509 1 4 654 945 655 922 1 4 957 755 949 756 1 4 47 118 368 408 1 4 440 352 885 441 1 4 52 235 425 349 1 4 236 235 349 425 1 4 720 699 674 866 1 4 226 127 468 128 1 4 468 127 146 128 1 4 798 754 753 941 1 4 452 236 907 881 1 4 237 879 345 350 1 4 344 878 339 360 1 4 437 36 436 931 1 4 928 879 433 882 1 4 957 950 949 755 1 4 932 790 739 740 1 4 232 507 480 233 1 4 425 236 444 349 1 4 779 940 767 784 1 4 236 452 235 425 1 4 176 517 543 890 1 4 867 868 700 674 1 4 921 529 530 258 1 4 844 927 821 843 1 4 936 582 315 316 1 4 209 901 509 511 1 4 191 921 190 530 1 4 578 221 220 900 1 4 879 433 421 878 1 4 218 217 901 508 1 4 798 754 941 792 1 4 236 237 907 881 1 4 529 921 530 168 1 4 168 921 530 190 1 4 616 904 613 599 1 4 868 774 746 700 1 4 882 275 432 928 1 4 75 74 349 425 1 4 247 53 426 355 1 4 952 272 654 653 1 4 74 444 349 425 1 4 252 808 911 807 1 4 594 904 595 900 1 4 254 911 898 253 1 4 957 757 949 955 1 4 130 466 467 228 1 4 808 809 911 913 1 4 945 643 655 922 1 4 248 889 911 249 1 4 565 556 557 916 1 4 565 912 563 898 1 4 467 466 130 144 1 4 952 654 272 922 1 4 896 918 527 916 1 4 735 948 786 736 1 4 292 397 293 378 1 4 953 776 801 786 1 4 757 957 756 790 1 4 253 897 254 528 1 4 846 824 823 927 1 4 287 414 933 288 1 4 919 189 169 188 1 4 140 507 464 480 1 4 226 468 225 483 1 4 562 889 910 909 1 4 903 562 555 902 1 4 340 925 929 341 1 4 547 170 187 188 1 4 886 902 889 249 1 4 921 529 189 168 1 4 364 893 533 558 1 4 266 890 553 265 1 4 899 878 276 928 1 4 899 276 880 924 1 4 276 878 899 880 1 4 899 276 924 275 1 4 534 364 893 514 1 4 515 888 524 536 1 4 909 259 921 530 1 4 957 790 757 955 1 4 658 933 289 657 1 4 408 369 407 321 1 4 284 924 926 283 1 4 609 936 586 608 1 4 428 81 58 80 1 4 384 320 936 319 1 4 900 220 219 901 1 4 77 54 355 76 1 4 702 625 701 937 1 4 438 281 930 931 1 4 182 199 521 183 1 4 36 929 35 436 1 4 408 368 321 322 1 4 560 270 271 895 1 4 185 196 184 552 1 4 36 929 436 931 1 4 323 324 382 936 1 4 382 325 385 936 1 4 368 369 321 382 1 4 908 457 455 458 1 4 456 908 449 458 1 4 237 450 238 907 1 4 743 671 939 695 1 4 904 610 602 615 1 4 247 246 426 447 1 4 246 247 906 447 1 4 245 447 906 455 1 4 566 550 886 559 1 4 720 940 794 744 1 4 245 447 455 427 1 4 452 907 458 450 1 4 890 538 542 914 1 4 60 445 59 241 1 4 177 204 205 264 1 4 456 239 240 453 1 4 504 472 212 211 1 4 912 547 564 563 1 4 471 472 504 211 1 4 471 504 509 211 1 4 908 455 244 245 1 4 342 341 37 931 1 4 706 942 707 905 1 4 177 518 204 264 1 4 210 471 509 211 1 4 6 164 513 173 1 4 879 41 878 421 1 4 445 457 241 448 1 4 900 221 220 901 1 4 901 219 494 220 1 4 890 516 517 538 1 4 280 929 436 279 1 4 41 344 1 2 1 4 163 430 174 348 1 4 648 942 725 726 1 4 533 919 920 256 1 4 363 165 164 532 1 4 245 455 356 427 1 4 456 239 453 449 1 4 264 537 518 263 1 4 358 357 359 926 1 4 908 243 244 455 1 4 264 543 542 890 1 4 526 917 892 916 1 4 356 455 245 244 1 4 949 756 683 757 1 4 325 313 936 592 1 4 375 936 317 376 1 4 884 358 348 343 1 4 384 405 376 371 1 4 231 490 230 905 1 4 232 490 905 233 1 4 935 374 375 315 1 4 900 904 601 602 1 4 56 356 57 79 1 4 617 900 615 621 1 4 440 352 441 451 1 4 472 473 486 222 1 4 297 317 403 404 1 4 869 771 676 775 1 4 137 461 469 24 1 4 946 730 729 952 1 4 461 137 469 482 1 4 688 875 338 687 1 4 873 682 872 333 1 4 538 544 542 914 1 4 938 764 784 781 1 4 627 905 628 227 1 4 869 677 676 327 1 4 197 198 184 560 1 4 452 236 235 906 1 4 243 242 908 692 1 4 424 452 881 444 1 4 693 908 244 245 1 4 924 274 885 899 1 4 235 236 636 906 1 4 880 925 357 926 1 4 694 940 642 767 1 4 693 908 940 640 1 4 828 924 827 927 1 4 949 683 682 873 1 4 940 692 763 640 1 4 627 905 227 226 1 4 933 932 667 668 1 4 710 905 711 634 1 4 913 846 838 845 1 4 716 693 940 640 1 4 808 913 832 833 1 4 255 893 533 514 1 4 853 913 833 832 1 4 911 256 811 255 1 4 955 932 787 950 1 4 489 488 480 233 1 4 104 373 371 26 1 4 313 385 365 366 1 4 908 907 458 906 1 4 533 920 255 256 1 4 159 158 86 378 1 4 840 818 817 927 1 4 906 455 447 458 1 4 342 438 931 37 1 4 870 329 871 679 1 4 959 783 932 787 1 4 649 942 648 726 1 4 225 483 224 905 1 4 224 625 937 624 1 4 949 683 684 757 1 4 949 684 683 873 1 4 570 900 212 569 1 4 369 320 382 384 1 4 949 684 758 757 1 4 324 45 119 323 1 4 709 942 724 723 1 4 490 488 233 480 1 4 419 298 380 417 1 4 904 936 608 607 1 4 408 47 118 117 1 4 37 437 931 36 1 4 813 913 911 812 1 4 422 433 277 878 1 4 433 276 277 878 1 4 430 163 8 443 1 4 347 446 429 451 1 4 880 878 877 277 1 4 163 5 343 348 1 4 880 276 878 277 1 4 467 484 228 466 1 4 884 423 283 439 1 4 430 163 174 8 1 4 927 826 827 849 1 4 884 163 443 362 1 4 906 641 694 246 1 4 352 451 240 453 1 4 66 65 436 35 1 4 11 430 174 8 1 4 462 463 123 487 1 4 913 845 839 844 1 4 621 904 609 608 1 4 409 299 380 383 1 4 445 242 59 241 1 4 138 463 123 19 1 4 666 742 667 932 1 4 17 136 498 123 1 4 925 930 357 926 1 4 473 223 486 222 1 4 499 462 124 123 1 4 462 478 470 124 1 4 584 606 607 936 1 4 804 913 854 855 1 4 416 934 420 415 1 4 533 919 256 170 1 4 932 933 656 668 1 4 287 92 152 288 1 4 917 527 916 526 1 4 92 395 152 288 1 4 232 490 233 480 1 4 507 489 503 498 1 4 923 917 922 541 1 4 499 471 470 487 1 4 317 297 403 316 1 4 208 516 388 553 1 4 221 511 505 494 1 4 229 484 228 905 1 4 934 418 415 416 1 4 490 229 465 230 1 4 628 627 704 937 1 4 512 215 491 216 1 4 296 403 416 934 1 4 841 913 840 856 1 4 879 424 62 421 1 4 395 152 288 394 1 4 516 208 9 515 1 4 684 961 873 949 1 4 402 296 403 416 1 4 152 287 288 394 1 4 188 548 547 919 1 4 254 897 534 528 1 4 940 764 767 784 1 4 940 694 718 767 1 4 394 287 420 299 1 4 926 351 358 357 1 4 648 942 922 647 1 4 523 540 528 896 1 4 459 215 491 475 1 4 253 809 911 808 1 4 413 417 394 299 1 4 413 298 417 299 1 4 959 955 759 787 1 4 404 403 298 413 1 4 491 214 512 500 1 4 112 102 460 481 1 4 424 4 62 421 1 4 508 512 216 901 1 4 491 214 500 475 1 4 100 220 494 219 1 4 496 500 502 482 1 4 703 946 704 937 1 4 428 80 57 79 1 4 471 504 234 503 1 4 868 774 700 674 1 4 661 737 662 932 1 4 505 460 112 387 1 4 324 936 590 591 1 4 880 357 899 926 1 4 479 148 497 469 1 4 314 936 315 935 1 4 121 122 43 411 1 4 622 606 620 904 1 4 556 555 267 892 1 4 900 904 615 621 1 4 586 936 585 608 1 4 887 515 249 513 1 4 605 904 604 620 1 4 322 368 321 382 1 4 413 298 420 403 1 4 900 904 602 615 1 4 904 936 609 608 1 4 936 584 318 585 1 4 904 593 622 619 1 4 900 594 569 570 1 4 424 50 444 345 1 4 397 292 415 291 1 4 936 603 614 580 1 4 904 616 614 598 1 4 499 17 498 123 1 4 606 605 620 904 1 4 385 325 367 366 1 4 495 460 505 387 1 4 345 424 62 879 1 4 484 490 483 905 1 4 588 936 322 321 1 4 904 595 604 620 1 4 408 407 47 117 1 4 378 159 85 86 1 4 224 485 502 223 1 4 297 420 933 298 1 4 904 595 596 604 1 4 372 412 399 410 1 4 412 374 296 295 1 4 188 170 169 919 1 4 241 456 908 240 1 4 407 48 47 117 1 4 666 297 665 932 1 4 440 352 451 348 1 4 215 900 216 901 1 4 639 692 940 908 1 4 936 588 587 321 1 4 410 162 372 84 1 4 410 162 84 161 1 4 949 681 950 872 1 4 888 538 890 914 1 4 427 55 245 355 1 4 77 55 355 54 1 4 905 623 223 937 1 4 246 427 245 355 1 4 111 481 101 112 1 4 482 500 502 475 1 4 573 215 900 216 1 4 444 74 349 51 1 4 74 75 349 51 1 4 105 27 459 461 1 4 878 422 877 277 1 4 247 246 355 426 1 4 346 444 349 51 1 4 940 779 938 784 1 4 958 105 106 96 1 4 719 939 745 938 1 4 64 434 361 63 1 4 904 618 900 593 1 4 237 236 345 881 1 4 368 118 47 46 1 4 879 41 421 62 1 4 422 878 41 421 1 4 333 682 872 332 1 4 561 202 519 262 1 4 246 427 355 426 1 4 947 950 871 959 1 4 884 163 362 343 1 4 884 163 343 348 1 4 457 243 455 428 1 4 864 868 865 939 1 4 391 115 25 114 1 4 424 879 881 454 1 4 457 242 241 908 1 4 952 652 730 729 1 4 5 163 7 348 1 4 242 457 445 428 1 4 468 479 225 483 1 4 23 105 106 491 1 4 347 352 348 451 1 4 346 50 444 51 1 4 907 637 238 237 1 4 423 884 362 354 1 4 408 368 322 118 1 4 959 874 961 876 1 4 884 423 439 354 1 4 345 444 236 346 1 4 758 955 757 789 1 4 423 362 70 354 1 4 362 39 70 354 1 4 393 95 373 104 1 4 418 934 415 294 1 4 368 323 322 118 1 4 39 439 70 354 1 4 141 230 132 133 1 4 624 625 937 701 1 4 900 212 211 901 1 4 506 466 130 228 1 4 632 709 905 708 1 4 439 423 70 354 1 4 694 940 718 641 1 4 952 653 654 954 1 4 55 78 77 427 1 4 762 624 937 701 1 4 693 908 640 244 1 4 219 99 218 493 1 4 484 226 467 227 1 4 401 374 399 370 1 4 433 928 432 276 1 4 959 759 760 787 1 4 365 313 366 411 1 4 904 611 601 602 1 4 901 494 511 221 1 4 870 677 328 678 1 4 900 904 596 597 1 4 225 626 937 625 1 4 309 866 673 865 1 4 127 468 497 225 1 4 405 419 404 376 1 4 900 214 213 901 1 4 461 500 482 475 1 4 104 380 371 373 1 4 901 494 221 220 1 4 419 405 371 376 1 4 419 380 393 417 1 4 803 743 938 768 1 4 75 52 425 349 1 4 934 933 420 414 1 4 382 325 936 324 1 4 924 820 278 821 1 4 934 291 414 415 1 4 236 452 907 906 1 4 410 162 161 399 1 4 409 299 383 394 1 4 245 447 427 246 1 4 460 102 112 387 1 4 389 72 29 30 1 4 351 352 239 885 1 4 478 103 387 124 1 4 38 39 439 69 1 4 103 478 387 460 1 4 882 454 879 433 1 4 499 495 470 509 1 4 549 548 910 563 1 4 495 113 124 387 1 4 72 32 365 370 1 4 478 495 124 387 1 4 248 249 513 886 1 4 924 826 283 284 1 4 5 163 343 40 1 4 393 95 104 150 1 4 913 842 927 843 1 4 347 446 451 174 1 4 913 859 856 830 1 4 850 828 827 927 1 4 439 884 930 283 1 4 446 430 451 174 1 4 556 565 563 898 1 4 913 841 840 927 1 4 836 848 847 913 1 4 439 39 70 69 1 4 930 354 342 359 1 4 360 877 340 880 1 4 364 171 514 172 1 4 34 877 340 353 1 4 934 661 292 293 1 4 593 900 568 618 1 4 874 959 875 876 1 4 837 913 813 812 1 4 281 925 280 924 1 4 924 820 927 819 1 4 595 900 571 570 1 4 347 451 348 174 1 4 451 430 348 174 1 4 257 912 911 910 1 4 415 294 293 398 1 4 285 924 827 828 1 4 72 381 370 365 1 4 947 871 753 679 1 4 560 270 895 552 1 4 682 683 949 756 1 4 286 924 285 828 1 4 214 502 501 500 1 4 551 896 894 194 1 4 959 760 953 787 1 4 683 334 873 684 1 4 820 924 927 821 1 4 852 913 844 843 1 4 214 502 500 475 1 4 545 16 15 195 1 4 859 831 830 913 1 4 357 930 359 926 1 4 913 855 860 854 1 4 194 897 523 195 1 4 523 897 534 195 1 4 267 268 892 915 1 4 913 804 854 816 1 4 193 550 173 10 1 4 208 888 887 515 1 4 551 918 269 894 1 4 556 268 557 916 1 4 196 185 194 894 1 4 553 265 890 206 1 4 955 932 950 790 1 4 263 262 922 537 1 4 253 808 911 252 1 4 909 921 910 549 1 4 879 237 345 881 1 4 557 916 897 565 1 4 925 281 930 924 1 4 358 884 885 926 1 4 875 959 874 760 1 4 950 790 791 957 1 4 265 264 890 205 1 4 64 434 877 361 1 4 208 888 516 553 1 4 934 661 293 662 1 4 34 64 877 361 1 4 368 323 382 322 1 4 738 663 662 932 1 4 265 266 914 922 1 4 424 50 345 62 1 4 143 506 466 130 1 4 424 50 62 73 1 4 950 957 791 755 1 4 889 562 566 559 1 4 220 221 481 494 1 4 477 493 492 217 1 4 99 110 493 219 1 4 199 182 272 200 1 4 512 492 508 216 1 4 99 477 218 493 1 4 559 562 909 889 1 4 945 643 922 777 1 4 525 891 892 915 1 4 493 217 508 492 1 4 512 215 216 901 1 4 577 900 601 602 1 4 484 467 228 227 1 4 467 130 228 129 1 4 170 169 919 256 1 4 365 313 411 400 1 4 912 547 563 919 1 4 386 369 49 377 1 4 875 959 760 953 1 4 272 273 541 922 1 4 762 951 717 766 1 4 74 444 73 51 1 4 352 441 451 453 1 4 429 83 60 82 1 4 358 352 351 885 1 4 286 924 885 285 1 4 34 435 877 64 1 4 903 252 892 898 1 4 297 420 298 403 1 4 903 891 525 250 1 4 950 680 754 753 1 4 403 296 316 297 1 4 830 831 806 913 1 4 814 815 911 913 1 4 444 50 73 51 1 4 943 783 959 775 1 4 187 533 547 558 1 4 135 507 464 140 1 4 900 904 597 598 1 4 543 538 542 890 1 4 223 222 905 486 1 4 425 247 447 235 1 4 890 264 914 542 1 4 94 409 150 95 1 4 93 383 394 151 1 4 196 197 184 552 1 4 72 389 392 30 1 4 560 895 521 535 1 4 735 948 736 932 1 4 275 899 928 883 1 4 435 434 877 64 1 4 903 891 892 525 1 4 440 430 348 451 1 4 436 36 437 66 1 4 884 930 283 926 1 4 494 505 481 112 1 4 526 251 892 525 1 4 284 285 884 926 1 4 884 285 885 926 1 4 768 743 938 939 1 4 412 295 410 372 1 4 507 232 480 134 1 4 906 245 455 908 1 4 85 378 294 398 1 4 863 671 304 695 1 4 706 705 942 905 1 4 220 111 100 494 1 4 395 91 289 288 1 4 934 660 292 661 1 4 361 422 877 41 1 4 513 363 164 532 1 4 797 753 752 943 1 4 742 666 741 932 1 4 181 272 182 200 1 4 584 583 936 317 1 4 955 759 788 758 1 4 908 637 690 238 1 4 375 402 296 316 1 4 358 440 352 885 1 4 943 753 941 797 1 4 933 659 932 658 1 4 297 375 296 316 1 4 484 226 227 905 1 4 71 423 443 362 1 4 166 191 167 530 1 4 900 595 594 570 1 4 870 677 327 328 1 4 362 39 354 40 1 4 104 419 390 371 1 4 923 539 541 535 1 4 252 807 911 251 1 4 37 437 36 67 1 4 501 474 213 473 1 4 885 351 238 239 1 4 529 169 189 168 1 4 352 441 453 885 1 4 780 781 938 719 1 4 108 477 492 476 1 4 395 394 288 414 1 4 595 900 596 571 1 4 72 389 29 162 1 4 904 616 613 936 1 4 191 921 530 909 1 4 259 909 531 530 1 4 342 39 439 38 1 4 883 351 238 885 1 4 743 780 938 719 1 4 163 71 8 443 1 4 395 289 414 288 1 4 396 397 414 291 1 4 237 450 907 881 1 4 372 410 84 85 1 4 916 556 892 898 1 4 410 160 84 85 1 4 3 422 41 421 1 4 396 290 414 289 1 4 375 385 936 382 1 4 868 744 866 865 1 4 104 22 25 390 1 4 241 639 691 908 1 4 457 456 241 448 1 4 940 638 761 691 1 4 353 34 361 33 1 4 942 644 722 777 1 4 715 940 761 799 1 4 203 202 519 179 1 4 284 884 283 926 1 4 344 41 62 2 1 4 353 33 361 339 1 4 291 933 414 290 1 4 347 61 174 7 1 4 926 351 357 899 1 4 389 72 370 162 1 4 83 61 174 446 1 4 440 284 884 443 1 4 412 418 410 295 1 4 401 374 412 399 1 4 202 203 519 262 1 4 289 933 414 288 1 4 907 452 458 906 1 4 933 666 667 932 1 4 565 546 893 897 1 4 947 950 959 943 1 4 934 662 294 663 1 4 933 657 656 288 1 4 132 506 142 131 1 4 932 742 667 772 1 4 539 918 923 917 1 4 917 918 923 269 1 4 537 273 541 520 1 4 439 342 438 930 1 4 36 929 931 341 1 4 323 936 382 322 1 4 940 712 750 938 1 4 439 283 930 282 1 4 49 386 377 114 1 4 509 901 209 210 1 4 209 511 509 505 1 4 880 924 926 899 1 4 290 933 414 289 1 4 285 924 885 926 1 4 297 933 934 932 1 4 225 479 224 483 1 4 231 141 465 480 1 4 384 320 319 406 1 4 287 414 288 394 1 4 418 412 416 295 1 4 934 418 416 295 1 4 418 294 415 398 1 4 485 224 502 482 1 4 490 484 229 905 1 4 137 496 500 21 1 4 410 372 294 85 1 4 391 384 319 406 1 4 391 384 406 377 1 4 26 28 371 114 1 4 369 386 406 377 1 4 215 459 491 216 1 4 378 397 293 398 1 4 395 396 414 289 1 4 144 467 129 130 1 4 450 882 238 431 1 4 850 927 827 849 1 4 268 267 922 915 1 4 929 435 35 436 1 4 882 275 431 432 1 4 945 643 777 766 1 4 932 933 658 657 1 4 645 942 723 646 1 4 940 764 642 767 1 4 404 403 297 298 1 4 452 906 447 458 1 4 456 457 908 458 1 4 342 38 439 438 1 4 744 866 673 699 1 4 224 496 502 482 1 4 438 439 930 282 1 4 450 882 431 432 1 4 274 883 431 442 1 4 868 720 866 744 1 4 924 825 824 282 1 4 202 180 519 179 1 4 852 913 839 844 1 4 638 908 239 240 1 4 959 783 771 775 1 4 936 583 582 316 1 4 375 936 315 316 1 4 410 162 399 372 1 4 402 374 401 315 1 4 927 845 844 822 1 4 177 518 178 204 1 4 762 951 766 770 1 4 214 502 475 474 1 4 468 127 497 147 1 4 274 883 442 885 1 4 241 347 448 240 1 4 263 518 519 537 1 4 460 505 112 481 1 4 929 435 278 877 1 4 549 909 191 559 1 4 495 460 387 478 1 4 221 209 460 505 1 4 456 241 448 240 1 4 153 395 152 92 1 4 900 617 579 567 1 4 900 617 615 579 1 4 499 462 470 124 1 4 191 166 531 530 1 4 869 676 326 327 1 4 869 688 326 676 1 4 501 510 504 212 1 4 245 447 246 906 1 4 257 912 910 919 1 4 473 472 212 222 1 4 153 154 395 91 1 4 441 885 442 453 1 4 400 72 392 365 1 4 389 399 29 162 1 4 192 886 531 532 1 4 545 551 896 557 1 4 497 482 469 496 1 4 153 395 92 91 1 4 868 720 744 940 1 4 201 520 181 273 1 4 104 390 114 371 1 4 762 770 701 937 1 4 479 485 224 483 1 4 474 482 502 475 1 4 559 909 531 886 1 4 346 50 345 444 1 4 97 476 107 96 1 4 584 936 607 585 1 4 231 232 134 480 1 4 711 942 710 722 1 4 141 231 134 480 1 4 474 501 502 223 1 4 287 414 394 420 1 4 292 397 379 291 1 4 292 157 87 88 1 4 899 880 878 360 1 4 943 941 772 797 1 4 291 396 379 290 1 4 943 772 941 932 1 4 917 539 527 526 1 4 357 880 899 360 1 4 674 699 310 866 1 4 940 636 750 689 1 4 365 313 400 935 1 4 900 904 598 599 1 4 939 744 865 773 1 4 606 583 605 936 1 4 606 584 583 936 1 4 880 357 340 360 1 4 936 616 613 591 1 4 324 45 323 367 1 4 45 324 120 367 1 4 340 877 360 353 1 4 320 587 321 936 1 4 507 135 464 498 1 4 889 250 903 911 1 4 523 14 194 13 1 4 135 136 464 498 1 4 775 870 869 876 1 4 384 318 376 405 1 4 405 318 376 404 1 4 673 773 865 744 1 4 455 356 243 244 1 4 928 879 882 350 1 4 452 424 881 454 1 4 193 363 559 192 1 4 866 744 720 699 1 4 924 281 824 823 1 4 363 193 559 550 1 4 275 924 899 274 1 4 878 877 41 339 1 4 116 386 115 406 1 4 936 322 321 382 1 4 463 136 123 498 1 4 376 318 936 317 1 4 384 320 382 936 1 4 320 936 586 587 1 4 212 501 901 213 1 4 732 769 932 656 1 4 396 397 291 379 1 4 909 191 531 530 1 4 409 299 394 417 1 4 236 237 689 907 1 4 23 105 491 500 1 4 297 375 317 376 1 4 386 391 377 114 1 4 900 213 570 212 1 4 491 214 475 215 1 4 318 584 936 317 1 4 209 221 901 511 1 4 780 781 750 938 1 4 296 403 934 297 1 4 313 314 400 935 1 4 936 582 604 581 1 4 402 374 412 401 1 4 276 924 818 819 1 4 958 105 459 491 1 4 935 374 315 401 1 4 491 214 215 512 1 4 168 921 190 189 1 4 105 461 459 475 1 4 401 314 315 935 1 4 712 780 750 938 1 4 137 496 482 500 1 4 936 605 604 582 1 4 137 105 500 461 1 4 291 397 414 415 1 4 287 933 420 299 1 4 936 581 603 580 1 4 76 75 52 426 1 4 603 904 614 597 1 4 52 75 425 426 1 4 438 38 69 68 1 4 325 324 591 936 1 4 325 936 591 592 1 4 880 929 278 877 1 4 247 53 52 426 1 4 31 372 370 162 1 4 924 880 279 278 1 4 53 76 52 426 1 4 906 455 458 908 1 4 936 616 592 614 1 4 428 58 57 80 1 4 251 903 525 250 1 4 347 429 60 241 1 4 495 460 209 505 1 4 895 923 541 535 1 4 278 434 277 877 1 4 904 616 936 614 1 4 242 457 241 445 1 4 247 235 906 447 1 4 105 500 461 475 1 4 425 247 235 52 1 4 457 243 242 908 1 4 627 905 226 937 1 4 942 710 723 709 1 4 488 490 234 486 1 4 472 234 222 486 1 4 472 488 234 486 1 4 148 479 497 147 1 4 506 230 465 229 1 4 893 898 565 897 1 4 904 618 593 619 1 4 488 490 233 234 1 4 887 515 524 249 1 4 429 347 448 241 1 4 234 222 486 905 1 4 637 940 712 689 1 4 887 888 524 515 1 4 474 501 213 214 1 4 528 540 527 896 1 4 347 451 448 240 1 4 385 313 936 325 1 4 347 429 448 451 1 4 456 240 448 453 1 4 936 904 614 603 1 4 490 234 486 905 1 4 212 900 211 569 1 4 472 488 471 234 1 4 223 624 937 623 1 4 891 887 902 555 1 4 495 460 478 209 1 4 888 208 554 553 1 4 914 264 890 265 1 4 654 954 653 731 1 4 493 218 508 217 1 4 646 264 645 922 1 4 664 663 739 932 1 4 942 644 777 922 1 4 265 264 646 922 1 4 894 895 535 923 1 4 186 364 558 546 1 4 539 917 544 526 1 4 934 662 663 932 1 4 252 253 898 911 1 4 253 252 916 527 1 4 942 705 706 727 1 4 96 476 958 459 1 4 932 801 783 734 1 4 270 269 922 923 1 4 521 182 520 272 1 4 905 628 227 228 1 4 364 186 195 546 1 4 379 88 156 157 1 4 226 467 227 128 1 4 89 396 379 156 1 4 476 217 492 216 1 4 555 562 903 556 1 4 765 713 939 696 1 4 940 793 778 746 1 4 918 917 527 916 1 4 231 230 631 905 1 4 512 215 901 214 1 4 209 495 470 478 1 4 529 919 169 257 1 4 675 669 778 939 1 4 766 951 945 770 1 4 209 495 509 470 1 4 186 15 195 546 1 4 213 900 901 212 1 4 218 900 217 575 1 4 940 720 794 800 1 4 201 520 273 561 1 4 411 400 392 365 1 4 181 272 200 273 1 4 369 386 407 406 1 4 872 680 681 950 1 4 210 209 509 470 1 4 382 325 324 367 1 4 495 499 470 124 1 4 478 495 470 124 1 4 481 102 101 112 1 4 111 494 481 112 1 4 900 217 574 216 1 4 936 904 603 604 1 4 99 100 110 219 1 4 505 221 481 460 1 4 494 221 481 505 1 4 218 900 901 217 1 4 483 223 485 224 1 4 958 105 491 106 1 4 573 900 574 216 1 4 386 369 407 48 1 4 220 111 481 101 1 4 104 380 373 393 1 4 942 650 727 649 1 4 633 632 709 905 1 4 654 954 731 770 1 4 107 958 96 476 1 4 397 379 156 157 1 4 864 863 868 939 1 4 462 478 124 20 1 4 917 544 526 915 1 4 489 463 487 498 1 4 32 72 162 370 1 4 297 375 316 317 1 4 853 913 851 927 1 4 890 888 914 266 1 4 887 249 524 902 1 4 864 671 939 697 1 4 940 716 800 794 1 4 234 905 233 634 1 4 208 887 173 515 1 4 671 697 719 939 1 4 179 203 178 519 1 4 292 157 88 379 1 4 917 539 544 541 1 4 655 643 261 922 1 4 467 129 227 128 1 4 472 471 504 234 1 4 905 234 635 634 1 4 905 633 233 634 1 4 711 942 722 777 1 4 945 946 951 777 1 4 500 105 491 475 1 4 633 710 634 905 1 4 518 204 264 263 1 4 489 507 503 233 1 4 913 812 811 911 1 4 203 518 178 519 1 4 540 918 896 894 1 4 514 254 255 893 1 4 669 765 778 939 1 4 675 312 867 700 1 4 181 272 273 520 1 4 913 809 911 810 1 4 868 746 940 939 1 4 522 185 194 14 1 4 896 522 194 523 1 4 940 746 778 939 1 4 950 943 932 959 1 4 791 957 756 755 1 4 501 512 510 901 1 4 203 263 519 262 1 4 809 254 911 810 1 4 251 903 892 525 1 4 203 518 519 263 1 4 107 958 476 492 1 4 297 298 376 404 1 4 940 779 794 744 1 4 721 698 773 939 1 4 252 916 892 898 1 4 909 562 559 549 1 4 903 252 251 892 1 4 748 793 940 714 1 4 943 772 769 797 1 4 907 637 237 689 1 4 639 692 714 940 1 4 373 104 95 26 1 4 875 953 760 776 1 4 959 874 760 759 1 4 748 639 714 940 1 4 23 137 500 21 1 4 474 485 502 482 1 4 226 484 483 905 1 4 633 710 905 709 1 4 781 719 745 938 1 4 670 768 939 695 1 4 717 635 711 937 1 4 397 396 156 379 1 4 89 155 396 156 1 4 664 665 932 740 1 4 740 664 739 932 1 4 412 374 372 399 1 4 279 924 821 822 1 4 383 373 409 95 1 4 737 787 932 736 1 4 943 769 772 932 1 4 875 953 776 771 1 4 864 671 863 939 1 4 884 358 359 926 1 4 913 856 860 855 1 4 938 764 781 750 1 4 539 918 535 923 1 4 875 686 337 687 1 4 281 924 824 282 1 4 705 628 704 937 1 4 60 429 445 241 1 4 561 180 519 202 1 4 672 864 865 939 1 4 558 364 893 546 1 4 913 830 805 806 1 4 302 670 696 862 1 4 545 15 546 195 1 4 533 919 170 547 1 4 170 188 547 919 1 4 385 935 365 381 1 4 913 830 856 855 1 4 893 195 897 546 1 4 875 686 687 760 1 4 415 934 420 414 1 4 187 364 533 558 1 4 933 290 658 289 1 4 682 949 873 872 1 4 449 907 238 450 1 4 533 919 547 920 1 4 492 512 491 216 1 4 534 254 514 893 1 4 280 281 437 931 1 4 341 925 929 931 1 4 66 67 36 437 1 4 893 898 897 254 1 4 697 672 745 939 1 4 932 658 734 733 1 4 533 893 364 514 1 4 214 501 213 901 1 4 600 900 601 576 1 4 210 567 568 900 1 4 959 775 771 876 1 4 893 195 364 534 1 4 419 298 417 413 1 4 924 280 823 822 1 4 893 195 534 897 1 4 932 735 801 734 1 4 924 823 927 822 1 4 560 521 184 535 1 4 36 929 341 35 1 4 893 546 565 564 1 4 790 932 739 789 1 4 184 560 535 552 1 4 267 891 915 892 1 4 648 942 647 725 1 4 959 783 943 932 1 4 280 924 279 822 1 4 913 804 805 855 1 4 880 929 279 278 1 4 313 314 936 580 1 4 961 950 949 955 1 4 341 929 340 35 1 4 858 913 852 843 1 4 389 72 392 400 1 4 867 311 674 700 1 4 10 550 173 554 1 4 787 771 783 801 1 4 562 898 556 563 1 4 672 721 745 939 1 4 743 671 719 939 1 4 912 920 256 255 1 4 110 99 493 109 1 4 392 42 72 122 1 4 899 360 350 351 1 4 221 900 579 209 1 4 438 281 282 930 1 4 819 924 818 927 1 4 669 301 696 861 1 4 462 20 124 19 1 4 675 868 861 939 1 4 372 399 370 162 1 4 803 749 785 938 1 4 308 309 673 865 1 4 782 793 940 748 1 4 897 545 557 565 1 4 578 900 615 579 1 4 928 879 350 878 1 4 713 670 939 696 1 4 768 743 939 695 1 4 784 721 938 745 1 4 787 959 955 950 1 4 353 339 361 877 1 4 857 913 853 832 1 4 677 947 678 870 1 4 339 353 360 877 1 4 218 219 508 901 1 4 899 924 926 885 1 4 492 217 508 216 1 4 34 353 361 877 1 4 478 103 124 20 1 4 251 806 911 250 1 4 782 793 778 940 1 4 410 85 294 398 1 4 441 286 885 285 1 4 638 908 690 239 1 4 847 824 846 927 1 4 928 879 878 433 1 4 908 638 940 691 1 4 765 782 778 940 1 4 363 192 886 559 1 4 540 918 539 527 1 4 192 363 886 532 1 4 513 363 532 886 1 4 10 12 554 173 1 4 550 887 173 554 1 4 169 257 919 256 1 4 835 913 810 834 1 4 529 919 257 921 1 4 545 897 557 896 1 4 825 848 927 847 1 4 721 939 938 745 1 4 875 771 688 869 1 4 209 221 511 505 1 4 340 925 341 357 1 4 185 522 194 894 1 4 551 196 194 894 1 4 896 522 523 540 1 4 896 522 540 894 1 4 588 611 936 610 1 4 611 904 936 610 1 4 600 904 613 612 1 4 369 320 321 382 1 4 342 930 341 931 1 4 878 350 360 344 1 4 270 895 552 894 1 4 927 913 843 844 1 4 842 820 927 843 1 4 435 929 35 340 1 4 175 208 516 388 1 4 551 270 552 894 1 4 252 253 916 898 1 4 886 902 249 887 1 4 891 887 555 888 1 4 555 888 554 553 1 4 891 887 888 524 1 4 611 904 612 936 1 4 257 258 910 911 1 4 886 902 887 566 1 4 889 562 902 566 1 4 926 351 899 885 1 4 933 289 657 288 1 4 163 440 430 348 1 4 220 111 101 100 1 4 555 556 903 892 1 4 231 490 465 230 1 4 562 898 563 889 1 4 555 891 267 892 1 4 269 918 923 894 1 4 268 556 892 916 1 4 917 268 892 916 1 4 749 637 940 712 1 4 556 268 892 267 1 4 899 928 883 350 1 4 928 882 883 350 1 4 900 595 596 904 1 4 929 880 340 877 1 4 110 100 494 219 1 4 372 295 410 294 1 4 351 899 883 350 1 4 705 942 728 727 1 4 885 274 924 286 1 4 340 925 357 880 1 4 889 250 911 249 1 4 397 87 158 378 1 4 158 87 86 378 1 4 899 883 885 351 1 4 44 325 120 121 1 4 901 494 508 511 1 4 98 99 109 477 1 4 952 652 729 922 1 4 477 109 108 493 1 4 845 913 927 844 1 4 490 234 905 233 1 4 509 210 211 901 1 4 882 454 433 432 1 4 397 87 157 158 1 4 94 151 150 409 1 4 936 591 613 590 1 4 136 135 464 139 1 4 220 900 219 577 1 4 98 97 476 108 1 4 138 136 464 139 1 4 879 41 62 344 1 4 4 3 62 421 1 4 913 853 851 857 1 4 626 703 937 702 1 4 551 545 896 194 1 4 702 956 937 701 1 4 296 934 416 295 1 4 389 399 162 370 1 4 936 314 581 580 1 4 889 909 559 886 1 4 921 549 548 910 1 4 947 871 679 870 1 4 941 950 791 792 1 4 698 672 307 865 1 4 703 730 937 702 1 4 672 864 307 865 1 4 622 606 904 607 1 4 904 600 601 612 1 4 863 671 695 939 1 4 947 678 752 751 1 4 12 208 554 173 1 4 208 887 554 173 1 4 870 947 678 679 1 4 107 958 492 106 1 4 826 924 827 284 1 4 648 649 267 922 1 4 496 126 125 148 1 4 197 560 184 552 1 4 148 496 497 469 1 4 504 472 234 222 1 4 265 647 266 922 1 4 941 791 950 932 1 4 211 510 212 504 1 4 211 510 504 509 1 4 889 250 249 902 1 4 652 270 651 922 1 4 936 904 612 613 1 4 121 44 366 43 1 4 392 42 122 411 1 4 932 738 739 789 1 4 875 771 776 688 1 4 936 613 612 590 1 4 702 956 701 731 1 4 649 268 267 922 1 4 273 561 520 261 1 4 560 895 271 521 1 4 356 455 79 427 1 4 422 361 63 41 1 4 820 924 278 277 1 4 435 34 65 64 1 4 927 820 821 843 1 4 924 927 821 822 1 4 923 541 922 271 1 4 941 791 741 792 1 4 270 923 922 271 1 4 226 225 937 905 1 4 273 537 541 922 1 4 589 611 612 936 1 4 864 671 697 305 1 4 303 863 695 670 1 4 660 661 932 736 1 4 410 418 398 294 1 4 318 319 936 585 1 4 900 567 568 618 1 4 732 932 733 657 1 4 932 658 733 657 1 4 941 741 791 932 1 4 932 734 783 733 1 4 715 785 938 799 1 4 573 900 598 574 1 4 109 98 477 108 1 4 644 643 922 262 1 4 383 287 394 299 1 4 913 835 810 811 1 4 936 324 590 323 1 4 707 630 706 905 1 4 769 932 656 668 1 4 732 932 657 656 1 4 900 577 601 576 1 4 287 933 656 288 1 4 905 630 706 629 1 4 589 936 612 590 1 4 905 628 228 629 1 4 705 905 706 629 1 4 198 184 521 183 1 4 908 243 640 244 1 4 692 243 640 908 1 4 143 506 142 466 1 4 702 956 731 730 1 4 384 319 936 318 1 4 541 272 922 271 1 4 706 942 727 726 1 4 885 883 442 238 1 4 933 287 656 668 1 4 637 749 940 690 1 4 749 715 940 690 1 4 715 638 940 690 1 4 637 908 690 940 1 4 852 913 854 816 1 4 913 815 911 816 1 4 908 638 690 940 1 4 262 537 261 922 1 4 804 913 911 816 1 4 165 363 192 532 1 4 248 911 260 816 1 4 804 911 805 249 1 4 449 907 450 458 1 4 936 319 586 585 1 4 264 263 645 922 1 4 891 903 902 250 1 4 671 864 863 305 1 4 382 325 367 385 1 4 903 252 898 911 1 4 144 143 466 130 1 4 649 942 726 727 1 4 896 918 916 557 1 4 384 936 382 376 1 4 345 879 62 344 1 4 897 534 893 254 1 4 534 523 195 13 1 4 942 646 724 723 1 4 223 224 937 624 1 4 883 882 431 238 1 4 262 263 519 537 1 4 918 551 896 894 1 4 645 942 646 922 1 4 907 637 689 908 1 4 434 422 361 63 1 4 891 250 524 525 1 4 670 863 695 939 1 4 904 618 619 621 1 4 303 863 304 695 1 4 762 624 623 937 1 4 175 208 9 516 1 4 208 12 554 553 1 4 890 516 538 888 1 4 904 611 602 610 1 4 477 98 476 108 1 4 900 217 216 901 1 4 650 269 922 651 1 4 685 961 874 873 1 4 655 654 922 273 1 4 663 738 739 932 1 4 558 920 564 893 1 4 666 665 741 932 1 4 53 76 426 355 1 4 522 523 14 194 1 4 878 344 339 41 1 4 155 89 396 90 1 4 639 908 940 691 1 4 639 748 691 940 1 4 264 177 543 205 1 4 176 177 205 543 1 4 154 396 289 90 1 4 176 890 205 206 1 4 893 898 254 912 1 4 525 526 915 892 1 4 719 697 745 939 1 4 652 270 922 271 1 4 891 555 266 888 1 4 534 195 172 13 1 4 956 770 960 937 1 4 954 952 960 770 1 4 731 960 954 730 1 4 941 741 742 792 1 4 941 742 741 932 1 4 961 950 955 959 1 4 961 955 949 758 1 4 961 759 955 758 1 4 959 759 955 961 # surfid 0 p1 p2 trignum1 trignum2 domin/surfnr1 domout/surfnr2 ednr1 dist1 ednr2 dist2 edgesegmentsgi2 708 1 0 1 33 -1 -1 1 8 1 0 0 0 2 0 33 1 -1 -1 1 8 1 0 0 0 1 0 33 34 -1 -1 1 8 1 0 0 0 2 0 34 33 -1 -1 1 8 1 0 0 0 1 0 34 35 -1 -1 1 8 1 0 0 0 2 0 35 34 -1 -1 1 8 1 0 0 0 1 0 35 36 -1 -1 1 8 1 0 0 0 2 0 36 35 -1 -1 1 8 1 0 0 0 1 0 36 37 -1 -1 1 8 1 0 0 0 2 0 37 36 -1 -1 1 8 1 0 0 0 1 0 37 38 -1 -1 1 8 1 0 0 0 2 0 38 37 -1 -1 1 8 1 0 0 0 1 0 38 39 -1 -1 1 8 1 0 0 0 2 0 39 38 -1 -1 1 8 1 0 0 0 1 0 39 40 -1 -1 1 8 1 0 0 0 2 0 40 39 -1 -1 1 8 1 0 0 0 1 0 40 5 -1 -1 1 8 1 0 0 0 2 0 5 40 -1 -1 1 8 1 0 0 0 1 0 2 1 -1 -1 4 1 2 0 0 0 3 0 1 2 -1 -1 4 1 2 0 0 0 3 0 41 1 -1 -1 4 8 3 0 0 0 2 0 1 41 -1 -1 4 8 3 0 0 0 3 0 3 41 -1 -1 4 8 3 0 0 0 2 0 41 3 -1 -1 4 8 3 0 0 0 4 0 42 32 -1 -1 32 26 4 0 0 0 5 0 32 42 -1 -1 32 26 4 0 0 0 4 0 43 42 -1 -1 32 26 4 0 0 0 5 0 42 43 -1 -1 32 26 4 0 0 0 4 0 44 43 -1 -1 32 26 4 0 0 0 5 0 43 44 -1 -1 32 26 4 0 0 0 4 0 45 44 -1 -1 32 26 4 0 0 0 5 0 44 45 -1 -1 32 26 4 0 0 0 4 0 46 45 -1 -1 32 26 4 0 0 0 5 0 45 46 -1 -1 32 26 4 0 0 0 4 0 47 46 -1 -1 32 26 4 0 0 0 5 0 46 47 -1 -1 32 26 4 0 0 0 4 0 48 47 -1 -1 32 26 4 0 0 0 5 0 47 48 -1 -1 32 26 4 0 0 0 4 0 49 48 -1 -1 32 26 4 0 0 0 5 0 48 49 -1 -1 32 26 4 0 0 0 4 0 28 49 -1 -1 32 26 4 0 0 0 5 0 49 28 -1 -1 32 26 4 0 0 0 1 0 50 2 -1 -1 7 1 5 0 0 0 6 0 2 50 -1 -1 7 1 5 0 0 0 1 0 51 50 -1 -1 7 1 5 0 0 0 6 0 50 51 -1 -1 7 1 5 0 0 0 1 0 52 51 -1 -1 7 1 5 0 0 0 6 0 51 52 -1 -1 7 1 5 0 0 0 1 0 53 52 -1 -1 7 1 5 0 0 0 6 0 52 53 -1 -1 7 1 5 0 0 0 1 0 54 53 -1 -1 7 1 5 0 0 0 6 0 53 54 -1 -1 7 1 5 0 0 0 1 0 55 54 -1 -1 7 1 5 0 0 0 6 0 54 55 -1 -1 7 1 5 0 0 0 1 0 56 55 -1 -1 7 1 5 0 0 0 6 0 55 56 -1 -1 7 1 5 0 0 0 1 0 57 56 -1 -1 7 1 5 0 0 0 6 0 56 57 -1 -1 7 1 5 0 0 0 1 0 58 57 -1 -1 7 1 5 0 0 0 6 0 57 58 -1 -1 7 1 5 0 0 0 1 0 59 58 -1 -1 7 1 5 0 0 0 6 0 58 59 -1 -1 7 1 5 0 0 0 1 0 60 59 -1 -1 7 1 5 0 0 0 6 0 59 60 -1 -1 7 1 5 0 0 0 1 0 61 60 -1 -1 7 1 5 0 0 0 6 0 60 61 -1 -1 7 1 5 0 0 0 1 0 7 61 -1 -1 7 1 5 0 0 0 6 0 61 7 -1 -1 7 1 5 0 0 0 7 0 29 30 -1 -1 27 25 6 0 0 0 8 0 30 29 -1 -1 27 25 6 0 0 0 3 0 2 62 -1 -1 7 4 7 0 0 0 6 0 62 2 -1 -1 7 4 7 0 0 0 3 0 62 4 -1 -1 7 4 7 0 0 0 6 0 4 62 -1 -1 7 4 7 0 0 0 9 0 3 4 -1 -1 2 4 8 0 0 0 3 0 4 3 -1 -1 2 4 8 0 0 0 4 0 32 31 -1 -1 27 26 9 0 0 0 8 0 31 32 -1 -1 27 26 9 0 0 0 9 0 63 3 -1 -1 8 2 10 0 0 0 2 0 3 63 -1 -1 8 2 10 0 0 0 9 0 64 63 -1 -1 8 2 10 0 0 0 2 0 63 64 -1 -1 8 2 10 0 0 0 9 0 65 64 -1 -1 8 2 10 0 0 0 2 0 64 65 -1 -1 8 2 10 0 0 0 9 0 66 65 -1 -1 8 2 10 0 0 0 2 0 65 66 -1 -1 8 2 10 0 0 0 9 0 67 66 -1 -1 8 2 10 0 0 0 2 0 66 67 -1 -1 8 2 10 0 0 0 9 0 68 67 -1 -1 8 2 10 0 0 0 2 0 67 68 -1 -1 8 2 10 0 0 0 9 0 69 68 -1 -1 8 2 10 0 0 0 2 0 68 69 -1 -1 8 2 10 0 0 0 9 0 70 69 -1 -1 8 2 10 0 0 0 2 0 69 70 -1 -1 8 2 10 0 0 0 9 0 71 70 -1 -1 8 2 10 0 0 0 2 0 70 71 -1 -1 8 2 10 0 0 0 9 0 8 71 -1 -1 8 2 10 0 0 0 2 0 71 8 -1 -1 8 2 10 0 0 0 8 0 32 72 -1 -1 32 27 11 0 0 0 5 0 72 32 -1 -1 32 27 11 0 0 0 8 0 72 30 -1 -1 32 27 11 0 0 0 5 0 30 72 -1 -1 32 27 11 0 0 0 4 0 26 28 -1 -1 28 26 12 0 0 0 10 0 28 26 -1 -1 28 26 12 0 0 0 9 0 4 73 -1 -1 2 7 13 0 0 0 6 0 73 4 -1 -1 2 7 13 0 0 0 9 0 73 74 -1 -1 2 7 13 0 0 0 6 0 74 73 -1 -1 2 7 13 0 0 0 9 0 74 75 -1 -1 2 7 13 0 0 0 6 0 75 74 -1 -1 2 7 13 0 0 0 9 0 75 76 -1 -1 2 7 13 0 0 0 6 0 76 75 -1 -1 2 7 13 0 0 0 9 0 76 77 -1 -1 2 7 13 0 0 0 6 0 77 76 -1 -1 2 7 13 0 0 0 9 0 77 78 -1 -1 2 7 13 0 0 0 6 0 78 77 -1 -1 2 7 13 0 0 0 9 0 78 79 -1 -1 2 7 13 0 0 0 6 0 79 78 -1 -1 2 7 13 0 0 0 9 0 79 80 -1 -1 2 7 13 0 0 0 6 0 80 79 -1 -1 2 7 13 0 0 0 9 0 80 81 -1 -1 2 7 13 0 0 0 6 0 81 80 -1 -1 2 7 13 0 0 0 9 0 81 82 -1 -1 2 7 13 0 0 0 6 0 82 81 -1 -1 2 7 13 0 0 0 9 0 82 83 -1 -1 2 7 13 0 0 0 6 0 83 82 -1 -1 2 7 13 0 0 0 9 0 83 11 -1 -1 2 7 13 0 0 0 6 0 11 83 -1 -1 2 7 13 0 0 0 4 0 31 84 -1 -1 26 31 14 0 0 0 6 0 84 31 -1 -1 26 31 14 0 0 0 4 0 84 85 -1 -1 26 31 14 0 0 0 6 0 85 84 -1 -1 26 31 14 0 0 0 4 0 85 86 -1 -1 26 31 14 0 0 0 6 0 86 85 -1 -1 26 31 14 0 0 0 4 0 86 87 -1 -1 26 31 14 0 0 0 6 0 87 86 -1 -1 26 31 14 0 0 0 4 0 87 88 -1 -1 26 31 14 0 0 0 6 0 88 87 -1 -1 26 31 14 0 0 0 4 0 88 89 -1 -1 26 31 14 0 0 0 6 0 89 88 -1 -1 26 31 14 0 0 0 4 0 89 90 -1 -1 26 31 14 0 0 0 6 0 90 89 -1 -1 26 31 14 0 0 0 4 0 90 91 -1 -1 26 31 14 0 0 0 6 0 91 90 -1 -1 26 31 14 0 0 0 4 0 91 92 -1 -1 26 31 14 0 0 0 6 0 92 91 -1 -1 26 31 14 0 0 0 4 0 92 93 -1 -1 26 31 14 0 0 0 6 0 93 92 -1 -1 26 31 14 0 0 0 4 0 93 94 -1 -1 26 31 14 0 0 0 6 0 94 93 -1 -1 26 31 14 0 0 0 4 0 94 95 -1 -1 26 31 14 0 0 0 6 0 95 94 -1 -1 26 31 14 0 0 0 4 0 95 26 -1 -1 26 31 14 0 0 0 6 0 26 95 -1 -1 26 31 14 0 0 0 11 0 96 27 -1 -1 24 18 15 0 0 0 5 0 27 96 -1 -1 24 18 15 0 0 0 11 0 97 96 -1 -1 24 18 15 0 0 0 5 0 96 97 -1 -1 24 18 15 0 0 0 11 0 98 97 -1 -1 24 18 15 0 0 0 5 0 97 98 -1 -1 24 18 15 0 0 0 11 0 99 98 -1 -1 24 18 15 0 0 0 5 0 98 99 -1 -1 24 18 15 0 0 0 11 0 100 99 -1 -1 24 18 15 0 0 0 5 0 99 100 -1 -1 24 18 15 0 0 0 11 0 101 100 -1 -1 24 18 15 0 0 0 5 0 100 101 -1 -1 24 18 15 0 0 0 11 0 102 101 -1 -1 24 18 15 0 0 0 5 0 101 102 -1 -1 24 18 15 0 0 0 11 0 103 102 -1 -1 24 18 15 0 0 0 5 0 102 103 -1 -1 24 18 15 0 0 0 11 0 20 103 -1 -1 24 18 15 0 0 0 5 0 103 20 -1 -1 24 18 15 0 0 0 10 0 26 104 -1 -1 31 28 16 0 0 0 6 0 104 26 -1 -1 31 28 16 0 0 0 10 0 104 22 -1 -1 31 28 16 0 0 0 6 0 22 104 -1 -1 31 28 16 0 0 0 11 0 27 24 -1 -1 19 18 17 0 0 0 8 0 24 27 -1 -1 19 18 17 0 0 0 8 0 105 23 -1 -1 19 24 18 0 0 0 5 0 23 105 -1 -1 19 24 18 0 0 0 8 0 27 105 -1 -1 19 24 18 0 0 0 5 0 105 27 -1 -1 19 24 18 0 0 0 12 0 23 106 -1 -1 17 24 19 0 0 0 5 0 106 23 -1 -1 17 24 19 0 0 0 12 0 106 107 -1 -1 17 24 19 0 0 0 5 0 107 106 -1 -1 17 24 19 0 0 0 12 0 107 108 -1 -1 17 24 19 0 0 0 5 0 108 107 -1 -1 17 24 19 0 0 0 12 0 108 109 -1 -1 17 24 19 0 0 0 5 0 109 108 -1 -1 17 24 19 0 0 0 12 0 109 110 -1 -1 17 24 19 0 0 0 5 0 110 109 -1 -1 17 24 19 0 0 0 12 0 110 111 -1 -1 17 24 19 0 0 0 5 0 111 110 -1 -1 17 24 19 0 0 0 12 0 111 112 -1 -1 17 24 19 0 0 0 5 0 112 111 -1 -1 17 24 19 0 0 0 12 0 112 113 -1 -1 17 24 19 0 0 0 5 0 113 112 -1 -1 17 24 19 0 0 0 12 0 113 18 -1 -1 17 24 19 0 0 0 5 0 18 113 -1 -1 17 24 19 0 0 0 7 0 25 22 -1 -1 28 25 20 0 0 0 10 0 22 25 -1 -1 28 25 20 0 0 0 10 0 25 114 -1 -1 32 28 21 0 0 0 5 0 114 25 -1 -1 32 28 21 0 0 0 10 0 114 28 -1 -1 32 28 21 0 0 0 5 0 28 114 -1 -1 32 28 21 0 0 0 7 0 115 25 -1 -1 32 25 22 0 0 0 5 0 25 115 -1 -1 32 25 22 0 0 0 7 0 116 115 -1 -1 32 25 22 0 0 0 5 0 115 116 -1 -1 32 25 22 0 0 0 7 0 117 116 -1 -1 32 25 22 0 0 0 5 0 116 117 -1 -1 32 25 22 0 0 0 7 0 118 117 -1 -1 32 25 22 0 0 0 5 0 117 118 -1 -1 32 25 22 0 0 0 7 0 119 118 -1 -1 32 25 22 0 0 0 5 0 118 119 -1 -1 32 25 22 0 0 0 7 0 120 119 -1 -1 32 25 22 0 0 0 5 0 119 120 -1 -1 32 25 22 0 0 0 7 0 121 120 -1 -1 32 25 22 0 0 0 5 0 120 121 -1 -1 32 25 22 0 0 0 7 0 122 121 -1 -1 32 25 22 0 0 0 5 0 121 122 -1 -1 32 25 22 0 0 0 7 0 30 122 -1 -1 32 25 22 0 0 0 5 0 122 30 -1 -1 32 25 22 0 0 0 11 0 19 20 -1 -1 20 18 23 0 0 0 10 0 20 19 -1 -1 20 18 23 0 0 0 10 0 19 123 -1 -1 23 20 24 0 0 0 6 0 123 19 -1 -1 23 20 24 0 0 0 10 0 123 17 -1 -1 23 20 24 0 0 0 6 0 17 123 -1 -1 23 20 24 0 0 0 10 0 124 20 -1 -1 20 24 25 0 0 0 5 0 20 124 -1 -1 20 24 25 0 0 0 10 0 18 124 -1 -1 20 24 25 0 0 0 5 0 124 18 -1 -1 20 24 25 0 0 0 12 0 125 21 -1 -1 23 17 26 0 0 0 6 0 21 125 -1 -1 23 17 26 0 0 0 12 0 126 125 -1 -1 23 17 26 0 0 0 6 0 125 126 -1 -1 23 17 26 0 0 0 12 0 127 126 -1 -1 23 17 26 0 0 0 6 0 126 127 -1 -1 23 17 26 0 0 0 12 0 128 127 -1 -1 23 17 26 0 0 0 6 0 127 128 -1 -1 23 17 26 0 0 0 12 0 129 128 -1 -1 23 17 26 0 0 0 6 0 128 129 -1 -1 23 17 26 0 0 0 12 0 130 129 -1 -1 23 17 26 0 0 0 6 0 129 130 -1 -1 23 17 26 0 0 0 12 0 131 130 -1 -1 23 17 26 0 0 0 6 0 130 131 -1 -1 23 17 26 0 0 0 12 0 132 131 -1 -1 23 17 26 0 0 0 6 0 131 132 -1 -1 23 17 26 0 0 0 12 0 133 132 -1 -1 23 17 26 0 0 0 6 0 132 133 -1 -1 23 17 26 0 0 0 12 0 134 133 -1 -1 23 17 26 0 0 0 6 0 133 134 -1 -1 23 17 26 0 0 0 12 0 135 134 -1 -1 23 17 26 0 0 0 6 0 134 135 -1 -1 23 17 26 0 0 0 12 0 136 135 -1 -1 23 17 26 0 0 0 6 0 135 136 -1 -1 23 17 26 0 0 0 12 0 17 136 -1 -1 23 17 26 0 0 0 6 0 136 17 -1 -1 23 17 26 0 0 0 8 0 21 137 -1 -1 23 19 27 0 0 0 6 0 137 21 -1 -1 23 19 27 0 0 0 8 0 137 24 -1 -1 23 19 27 0 0 0 6 0 24 137 -1 -1 23 19 27 0 0 0 11 0 138 19 -1 -1 23 18 28 0 0 0 6 0 19 138 -1 -1 23 18 28 0 0 0 11 0 139 138 -1 -1 23 18 28 0 0 0 6 0 138 139 -1 -1 23 18 28 0 0 0 11 0 140 139 -1 -1 23 18 28 0 0 0 6 0 139 140 -1 -1 23 18 28 0 0 0 11 0 141 140 -1 -1 23 18 28 0 0 0 6 0 140 141 -1 -1 23 18 28 0 0 0 11 0 142 141 -1 -1 23 18 28 0 0 0 6 0 141 142 -1 -1 23 18 28 0 0 0 11 0 143 142 -1 -1 23 18 28 0 0 0 6 0 142 143 -1 -1 23 18 28 0 0 0 11 0 144 143 -1 -1 23 18 28 0 0 0 6 0 143 144 -1 -1 23 18 28 0 0 0 11 0 145 144 -1 -1 23 18 28 0 0 0 6 0 144 145 -1 -1 23 18 28 0 0 0 11 0 146 145 -1 -1 23 18 28 0 0 0 6 0 145 146 -1 -1 23 18 28 0 0 0 11 0 147 146 -1 -1 23 18 28 0 0 0 6 0 146 147 -1 -1 23 18 28 0 0 0 11 0 148 147 -1 -1 23 18 28 0 0 0 6 0 147 148 -1 -1 23 18 28 0 0 0 11 0 149 148 -1 -1 23 18 28 0 0 0 6 0 148 149 -1 -1 23 18 28 0 0 0 11 0 24 149 -1 -1 23 18 28 0 0 0 6 0 149 24 -1 -1 23 18 28 0 0 0 12 0 18 17 -1 -1 20 17 29 0 0 0 10 0 17 18 -1 -1 20 17 29 0 0 0 12 0 21 23 -1 -1 17 19 30 0 0 0 8 0 23 21 -1 -1 17 19 30 0 0 0 7 0 22 150 -1 -1 25 31 31 0 0 0 6 0 150 22 -1 -1 25 31 31 0 0 0 7 0 150 151 -1 -1 25 31 31 0 0 0 6 0 151 150 -1 -1 25 31 31 0 0 0 7 0 151 152 -1 -1 25 31 31 0 0 0 6 0 152 151 -1 -1 25 31 31 0 0 0 7 0 152 153 -1 -1 25 31 31 0 0 0 6 0 153 152 -1 -1 25 31 31 0 0 0 7 0 153 154 -1 -1 25 31 31 0 0 0 6 0 154 153 -1 -1 25 31 31 0 0 0 7 0 154 155 -1 -1 25 31 31 0 0 0 6 0 155 154 -1 -1 25 31 31 0 0 0 7 0 155 156 -1 -1 25 31 31 0 0 0 6 0 156 155 -1 -1 25 31 31 0 0 0 7 0 156 157 -1 -1 25 31 31 0 0 0 6 0 157 156 -1 -1 25 31 31 0 0 0 7 0 157 158 -1 -1 25 31 31 0 0 0 6 0 158 157 -1 -1 25 31 31 0 0 0 7 0 158 159 -1 -1 25 31 31 0 0 0 6 0 159 158 -1 -1 25 31 31 0 0 0 7 0 159 160 -1 -1 25 31 31 0 0 0 6 0 160 159 -1 -1 25 31 31 0 0 0 7 0 160 161 -1 -1 25 31 31 0 0 0 6 0 161 160 -1 -1 25 31 31 0 0 0 7 0 161 29 -1 -1 25 31 31 0 0 0 6 0 29 161 -1 -1 25 31 31 0 0 0 1 0 5 7 -1 -1 1 3 32 0 0 0 13 0 7 5 -1 -1 1 3 32 0 0 0 8 0 162 31 -1 -1 27 31 33 0 0 0 6 0 31 162 -1 -1 27 31 33 0 0 0 8 0 29 162 -1 -1 27 31 33 0 0 0 6 0 162 29 -1 -1 27 31 33 0 0 0 13 0 5 163 -1 -1 8 3 34 0 0 0 2 0 163 5 -1 -1 8 3 34 0 0 0 13 0 163 8 -1 -1 8 3 34 0 0 0 2 0 8 163 -1 -1 8 3 34 0 0 0 14 0 6 164 -1 -1 9 16 35 0 0 0 2 0 164 6 -1 -1 9 16 35 0 0 0 14 0 164 165 -1 -1 9 16 35 0 0 0 2 0 165 164 -1 -1 9 16 35 0 0 0 14 0 165 166 -1 -1 9 16 35 0 0 0 2 0 166 165 -1 -1 9 16 35 0 0 0 14 0 166 167 -1 -1 9 16 35 0 0 0 2 0 167 166 -1 -1 9 16 35 0 0 0 14 0 167 168 -1 -1 9 16 35 0 0 0 2 0 168 167 -1 -1 9 16 35 0 0 0 14 0 168 169 -1 -1 9 16 35 0 0 0 2 0 169 168 -1 -1 9 16 35 0 0 0 14 0 169 170 -1 -1 9 16 35 0 0 0 2 0 170 169 -1 -1 9 16 35 0 0 0 14 0 170 171 -1 -1 9 16 35 0 0 0 2 0 171 170 -1 -1 9 16 35 0 0 0 14 0 171 172 -1 -1 9 16 35 0 0 0 2 0 172 171 -1 -1 9 16 35 0 0 0 14 0 172 13 -1 -1 9 16 35 0 0 0 2 0 13 172 -1 -1 9 16 35 0 0 0 14 0 9 6 -1 -1 12 9 36 0 0 0 3 0 6 9 -1 -1 12 9 36 0 0 0 3 0 173 6 -1 -1 12 16 37 0 0 0 2 0 6 173 -1 -1 12 16 37 0 0 0 3 0 10 173 -1 -1 12 16 37 0 0 0 2 0 173 10 -1 -1 12 16 37 0 0 0 13 0 174 7 -1 -1 3 7 38 0 0 0 6 0 7 174 -1 -1 3 7 38 0 0 0 13 0 11 174 -1 -1 3 7 38 0 0 0 6 0 174 11 -1 -1 3 7 38 0 0 0 9 0 11 8 -1 -1 3 2 39 0 0 0 13 0 8 11 -1 -1 3 2 39 0 0 0 14 0 175 9 -1 -1 15 9 40 0 0 0 6 0 9 175 -1 -1 15 9 40 0 0 0 14 0 176 175 -1 -1 15 9 40 0 0 0 6 0 175 176 -1 -1 15 9 40 0 0 0 14 0 177 176 -1 -1 15 9 40 0 0 0 6 0 176 177 -1 -1 15 9 40 0 0 0 14 0 178 177 -1 -1 15 9 40 0 0 0 6 0 177 178 -1 -1 15 9 40 0 0 0 14 0 179 178 -1 -1 15 9 40 0 0 0 6 0 178 179 -1 -1 15 9 40 0 0 0 14 0 180 179 -1 -1 15 9 40 0 0 0 6 0 179 180 -1 -1 15 9 40 0 0 0 14 0 181 180 -1 -1 15 9 40 0 0 0 6 0 180 181 -1 -1 15 9 40 0 0 0 14 0 182 181 -1 -1 15 9 40 0 0 0 6 0 181 182 -1 -1 15 9 40 0 0 0 14 0 183 182 -1 -1 15 9 40 0 0 0 6 0 182 183 -1 -1 15 9 40 0 0 0 14 0 184 183 -1 -1 15 9 40 0 0 0 6 0 183 184 -1 -1 15 9 40 0 0 0 14 0 185 184 -1 -1 15 9 40 0 0 0 6 0 184 185 -1 -1 15 9 40 0 0 0 14 0 14 185 -1 -1 15 9 40 0 0 0 6 0 185 14 -1 -1 15 9 40 0 0 0 15 0 16 15 -1 -1 11 10 41 0 0 0 13 0 15 16 -1 -1 11 10 41 0 0 0 15 0 15 186 -1 -1 10 16 42 0 0 0 2 0 186 15 -1 -1 10 16 42 0 0 0 15 0 186 187 -1 -1 10 16 42 0 0 0 2 0 187 186 -1 -1 10 16 42 0 0 0 15 0 187 188 -1 -1 10 16 42 0 0 0 2 0 188 187 -1 -1 10 16 42 0 0 0 15 0 188 189 -1 -1 10 16 42 0 0 0 2 0 189 188 -1 -1 10 16 42 0 0 0 15 0 189 190 -1 -1 10 16 42 0 0 0 2 0 190 189 -1 -1 10 16 42 0 0 0 15 0 190 191 -1 -1 10 16 42 0 0 0 2 0 191 190 -1 -1 10 16 42 0 0 0 15 0 191 192 -1 -1 10 16 42 0 0 0 2 0 192 191 -1 -1 10 16 42 0 0 0 15 0 192 193 -1 -1 10 16 42 0 0 0 2 0 193 192 -1 -1 10 16 42 0 0 0 15 0 193 10 -1 -1 10 16 42 0 0 0 2 0 10 193 -1 -1 10 16 42 0 0 0 13 0 194 14 -1 -1 11 15 43 0 0 0 6 0 14 194 -1 -1 11 15 43 0 0 0 13 0 16 194 -1 -1 11 15 43 0 0 0 6 0 194 16 -1 -1 11 15 43 0 0 0 13 0 13 195 -1 -1 16 11 44 0 0 0 2 0 195 13 -1 -1 16 11 44 0 0 0 13 0 195 15 -1 -1 16 11 44 0 0 0 2 0 15 195 -1 -1 16 11 44 0 0 0 14 0 13 14 -1 -1 9 11 45 0 0 0 13 0 14 13 -1 -1 9 11 45 0 0 0 15 0 196 16 -1 -1 15 10 46 0 0 0 6 0 16 196 -1 -1 15 10 46 0 0 0 15 0 197 196 -1 -1 15 10 46 0 0 0 6 0 196 197 -1 -1 15 10 46 0 0 0 15 0 198 197 -1 -1 15 10 46 0 0 0 6 0 197 198 -1 -1 15 10 46 0 0 0 15 0 199 198 -1 -1 15 10 46 0 0 0 6 0 198 199 -1 -1 15 10 46 0 0 0 15 0 200 199 -1 -1 15 10 46 0 0 0 6 0 199 200 -1 -1 15 10 46 0 0 0 15 0 201 200 -1 -1 15 10 46 0 0 0 6 0 200 201 -1 -1 15 10 46 0 0 0 15 0 202 201 -1 -1 15 10 46 0 0 0 6 0 201 202 -1 -1 15 10 46 0 0 0 15 0 203 202 -1 -1 15 10 46 0 0 0 6 0 202 203 -1 -1 15 10 46 0 0 0 15 0 204 203 -1 -1 15 10 46 0 0 0 6 0 203 204 -1 -1 15 10 46 0 0 0 15 0 205 204 -1 -1 15 10 46 0 0 0 6 0 204 205 -1 -1 15 10 46 0 0 0 15 0 206 205 -1 -1 15 10 46 0 0 0 6 0 205 206 -1 -1 15 10 46 0 0 0 15 0 207 206 -1 -1 15 10 46 0 0 0 6 0 206 207 -1 -1 15 10 46 0 0 0 15 0 12 207 -1 -1 15 10 46 0 0 0 6 0 207 12 -1 -1 15 10 46 0 0 0 3 0 9 208 -1 -1 15 12 47 0 0 0 6 0 208 9 -1 -1 15 12 47 0 0 0 3 0 208 12 -1 -1 15 12 47 0 0 0 6 0 12 208 -1 -1 15 12 47 0 0 0 15 0 10 12 -1 -1 12 10 48 0 0 0 3 0 12 10 -1 -1 12 10 48 0 0 0 11 0 209 210 -1 -1 45 18 49 0 0 0 16 0 210 209 -1 -1 45 18 49 0 0 0 11 0 210 211 -1 -1 45 18 49 0 0 0 16 0 211 210 -1 -1 45 18 49 0 0 0 11 0 211 212 -1 -1 45 18 49 0 0 0 16 0 212 211 -1 -1 45 18 49 0 0 0 11 0 212 213 -1 -1 45 18 49 0 0 0 16 0 213 212 -1 -1 45 18 49 0 0 0 11 0 213 214 -1 -1 45 18 49 0 0 0 16 0 214 213 -1 -1 45 18 49 0 0 0 11 0 214 215 -1 -1 45 18 49 0 0 0 16 0 215 214 -1 -1 45 18 49 0 0 0 11 0 215 216 -1 -1 45 18 49 0 0 0 16 0 216 215 -1 -1 45 18 49 0 0 0 11 0 216 217 -1 -1 45 18 49 0 0 0 16 0 217 216 -1 -1 45 18 49 0 0 0 11 0 217 218 -1 -1 45 18 49 0 0 0 16 0 218 217 -1 -1 45 18 49 0 0 0 11 0 218 219 -1 -1 45 18 49 0 0 0 16 0 219 218 -1 -1 45 18 49 0 0 0 11 0 219 220 -1 -1 45 18 49 0 0 0 16 0 220 219 -1 -1 45 18 49 0 0 0 11 0 220 221 -1 -1 45 18 49 0 0 0 16 0 221 220 -1 -1 45 18 49 0 0 0 11 0 221 209 -1 -1 45 18 49 0 0 0 16 0 209 221 -1 -1 45 18 49 0 0 0 12 0 222 223 -1 -1 36 17 50 0 0 0 17 0 223 222 -1 -1 36 17 50 0 0 0 12 0 223 224 -1 -1 36 17 50 0 0 0 17 0 224 223 -1 -1 36 17 50 0 0 0 12 0 224 225 -1 -1 36 17 50 0 0 0 17 0 225 224 -1 -1 36 17 50 0 0 0 12 0 225 226 -1 -1 36 17 50 0 0 0 17 0 226 225 -1 -1 36 17 50 0 0 0 12 0 226 227 -1 -1 36 17 50 0 0 0 17 0 227 226 -1 -1 36 17 50 0 0 0 12 0 227 228 -1 -1 36 17 50 0 0 0 17 0 228 227 -1 -1 36 17 50 0 0 0 12 0 228 229 -1 -1 36 17 50 0 0 0 17 0 229 228 -1 -1 36 17 50 0 0 0 12 0 229 230 -1 -1 36 17 50 0 0 0 17 0 230 229 -1 -1 36 17 50 0 0 0 12 0 230 231 -1 -1 36 17 50 0 0 0 17 0 231 230 -1 -1 36 17 50 0 0 0 12 0 231 232 -1 -1 36 17 50 0 0 0 17 0 232 231 -1 -1 36 17 50 0 0 0 12 0 232 233 -1 -1 36 17 50 0 0 0 17 0 233 232 -1 -1 36 17 50 0 0 0 12 0 233 234 -1 -1 36 17 50 0 0 0 17 0 234 233 -1 -1 36 17 50 0 0 0 12 0 234 222 -1 -1 36 17 50 0 0 0 17 0 222 234 -1 -1 36 17 50 0 0 0 1 0 236 235 -1 -1 1 33 51 0 0 0 17 0 235 236 -1 -1 1 33 51 0 0 0 1 0 237 236 -1 -1 1 33 51 0 0 0 17 0 236 237 -1 -1 1 33 51 0 0 0 1 0 238 237 -1 -1 1 33 51 0 0 0 17 0 237 238 -1 -1 1 33 51 0 0 0 1 0 239 238 -1 -1 1 33 51 0 0 0 17 0 238 239 -1 -1 1 33 51 0 0 0 1 0 240 239 -1 -1 1 33 51 0 0 0 17 0 239 240 -1 -1 1 33 51 0 0 0 1 0 241 240 -1 -1 1 33 51 0 0 0 17 0 240 241 -1 -1 1 33 51 0 0 0 1 0 242 241 -1 -1 1 33 51 0 0 0 17 0 241 242 -1 -1 1 33 51 0 0 0 1 0 243 242 -1 -1 1 33 51 0 0 0 17 0 242 243 -1 -1 1 33 51 0 0 0 1 0 244 243 -1 -1 1 33 51 0 0 0 17 0 243 244 -1 -1 1 33 51 0 0 0 1 0 245 244 -1 -1 1 33 51 0 0 0 17 0 244 245 -1 -1 1 33 51 0 0 0 1 0 246 245 -1 -1 1 33 51 0 0 0 17 0 245 246 -1 -1 1 33 51 0 0 0 1 0 247 246 -1 -1 1 33 51 0 0 0 17 0 246 247 -1 -1 1 33 51 0 0 0 1 0 235 247 -1 -1 1 33 51 0 0 0 17 0 247 235 -1 -1 1 33 51 0 0 0 14 0 248 249 -1 -1 42 9 52 0 0 0 18 0 249 248 -1 -1 42 9 52 0 0 0 14 0 249 250 -1 -1 42 9 52 0 0 0 18 0 250 249 -1 -1 42 9 52 0 0 0 14 0 250 251 -1 -1 42 9 52 0 0 0 18 0 251 250 -1 -1 42 9 52 0 0 0 14 0 251 252 -1 -1 42 9 52 0 0 0 18 0 252 251 -1 -1 42 9 52 0 0 0 14 0 252 253 -1 -1 42 9 52 0 0 0 18 0 253 252 -1 -1 42 9 52 0 0 0 14 0 253 254 -1 -1 42 9 52 0 0 0 18 0 254 253 -1 -1 42 9 52 0 0 0 14 0 254 255 -1 -1 42 9 52 0 0 0 18 0 255 254 -1 -1 42 9 52 0 0 0 14 0 255 256 -1 -1 42 9 52 0 0 0 18 0 256 255 -1 -1 42 9 52 0 0 0 14 0 256 257 -1 -1 42 9 52 0 0 0 18 0 257 256 -1 -1 42 9 52 0 0 0 14 0 257 258 -1 -1 42 9 52 0 0 0 18 0 258 257 -1 -1 42 9 52 0 0 0 14 0 258 259 -1 -1 42 9 52 0 0 0 18 0 259 258 -1 -1 42 9 52 0 0 0 14 0 259 260 -1 -1 42 9 52 0 0 0 18 0 260 259 -1 -1 42 9 52 0 0 0 14 0 260 248 -1 -1 42 9 52 0 0 0 18 0 248 260 -1 -1 42 9 52 0 0 0 15 0 261 262 -1 -1 36 10 53 0 0 0 17 0 262 261 -1 -1 36 10 53 0 0 0 15 0 262 263 -1 -1 36 10 53 0 0 0 17 0 263 262 -1 -1 36 10 53 0 0 0 15 0 263 264 -1 -1 36 10 53 0 0 0 17 0 264 263 -1 -1 36 10 53 0 0 0 15 0 264 265 -1 -1 36 10 53 0 0 0 17 0 265 264 -1 -1 36 10 53 0 0 0 15 0 265 266 -1 -1 36 10 53 0 0 0 17 0 266 265 -1 -1 36 10 53 0 0 0 15 0 266 267 -1 -1 36 10 53 0 0 0 17 0 267 266 -1 -1 36 10 53 0 0 0 15 0 267 268 -1 -1 36 10 53 0 0 0 17 0 268 267 -1 -1 36 10 53 0 0 0 15 0 268 269 -1 -1 36 10 53 0 0 0 17 0 269 268 -1 -1 36 10 53 0 0 0 15 0 269 270 -1 -1 36 10 53 0 0 0 17 0 270 269 -1 -1 36 10 53 0 0 0 15 0 270 271 -1 -1 36 10 53 0 0 0 17 0 271 270 -1 -1 36 10 53 0 0 0 15 0 271 272 -1 -1 36 10 53 0 0 0 17 0 272 271 -1 -1 36 10 53 0 0 0 15 0 272 273 -1 -1 36 10 53 0 0 0 17 0 273 272 -1 -1 36 10 53 0 0 0 15 0 273 261 -1 -1 36 10 53 0 0 0 17 0 261 273 -1 -1 36 10 53 0 0 0 9 0 274 275 -1 -1 42 2 54 0 0 0 18 0 275 274 -1 -1 42 2 54 0 0 0 9 0 275 276 -1 -1 42 2 54 0 0 0 18 0 276 275 -1 -1 42 2 54 0 0 0 9 0 276 277 -1 -1 42 2 54 0 0 0 18 0 277 276 -1 -1 42 2 54 0 0 0 9 0 277 278 -1 -1 42 2 54 0 0 0 18 0 278 277 -1 -1 42 2 54 0 0 0 9 0 278 279 -1 -1 42 2 54 0 0 0 18 0 279 278 -1 -1 42 2 54 0 0 0 9 0 279 280 -1 -1 42 2 54 0 0 0 18 0 280 279 -1 -1 42 2 54 0 0 0 9 0 280 281 -1 -1 42 2 54 0 0 0 18 0 281 280 -1 -1 42 2 54 0 0 0 9 0 281 282 -1 -1 42 2 54 0 0 0 18 0 282 281 -1 -1 42 2 54 0 0 0 9 0 282 283 -1 -1 42 2 54 0 0 0 18 0 283 282 -1 -1 42 2 54 0 0 0 9 0 283 284 -1 -1 42 2 54 0 0 0 18 0 284 283 -1 -1 42 2 54 0 0 0 9 0 284 285 -1 -1 42 2 54 0 0 0 18 0 285 284 -1 -1 42 2 54 0 0 0 9 0 285 286 -1 -1 42 2 54 0 0 0 18 0 286 285 -1 -1 42 2 54 0 0 0 9 0 286 274 -1 -1 42 2 54 0 0 0 18 0 274 286 -1 -1 42 2 54 0 0 0 4 0 287 288 -1 -1 39 26 55 0 0 0 17 0 288 287 -1 -1 39 26 55 0 0 0 4 0 288 289 -1 -1 39 26 55 0 0 0 17 0 289 288 -1 -1 39 26 55 0 0 0 4 0 289 290 -1 -1 39 26 55 0 0 0 17 0 290 289 -1 -1 39 26 55 0 0 0 4 0 290 291 -1 -1 39 26 55 0 0 0 17 0 291 290 -1 -1 39 26 55 0 0 0 4 0 291 292 -1 -1 39 26 55 0 0 0 17 0 292 291 -1 -1 39 26 55 0 0 0 4 0 292 293 -1 -1 39 26 55 0 0 0 17 0 293 292 -1 -1 39 26 55 0 0 0 4 0 293 294 -1 -1 39 26 55 0 0 0 17 0 294 293 -1 -1 39 26 55 0 0 0 4 0 294 295 -1 -1 39 26 55 0 0 0 17 0 295 294 -1 -1 39 26 55 0 0 0 4 0 295 296 -1 -1 39 26 55 0 0 0 17 0 296 295 -1 -1 39 26 55 0 0 0 4 0 296 297 -1 -1 39 26 55 0 0 0 17 0 297 296 -1 -1 39 26 55 0 0 0 4 0 297 298 -1 -1 39 26 55 0 0 0 17 0 298 297 -1 -1 39 26 55 0 0 0 4 0 298 299 -1 -1 39 26 55 0 0 0 17 0 299 298 -1 -1 39 26 55 0 0 0 4 0 299 287 -1 -1 39 26 55 0 0 0 17 0 287 299 -1 -1 39 26 55 0 0 0 17 0 300 301 -1 -1 33 34 56 0 0 0 19 0 301 300 -1 -1 33 34 56 0 0 0 17 0 301 302 -1 -1 33 34 56 0 0 0 19 0 302 301 -1 -1 33 34 56 0 0 0 17 0 302 303 -1 -1 33 34 56 0 0 0 19 0 303 302 -1 -1 33 34 56 0 0 0 17 0 303 304 -1 -1 33 34 56 0 0 0 19 0 304 303 -1 -1 33 34 56 0 0 0 17 0 304 305 -1 -1 33 34 56 0 0 0 19 0 305 304 -1 -1 33 34 56 0 0 0 17 0 305 306 -1 -1 33 34 56 0 0 0 19 0 306 305 -1 -1 33 34 56 0 0 0 17 0 306 307 -1 -1 33 34 56 0 0 0 19 0 307 306 -1 -1 33 34 56 0 0 0 17 0 307 308 -1 -1 33 34 56 0 0 0 19 0 308 307 -1 -1 33 34 56 0 0 0 17 0 308 309 -1 -1 33 34 56 0 0 0 19 0 309 308 -1 -1 33 34 56 0 0 0 17 0 309 310 -1 -1 33 34 56 0 0 0 19 0 310 309 -1 -1 33 34 56 0 0 0 17 0 310 311 -1 -1 33 34 56 0 0 0 19 0 311 310 -1 -1 33 34 56 0 0 0 17 0 311 312 -1 -1 33 34 56 0 0 0 19 0 312 311 -1 -1 33 34 56 0 0 0 17 0 312 300 -1 -1 33 34 56 0 0 0 19 0 300 312 -1 -1 33 34 56 0 0 0 7 0 313 314 -1 -1 45 25 57 0 0 0 16 0 314 313 -1 -1 45 25 57 0 0 0 7 0 314 315 -1 -1 45 25 57 0 0 0 16 0 315 314 -1 -1 45 25 57 0 0 0 7 0 315 316 -1 -1 45 25 57 0 0 0 16 0 316 315 -1 -1 45 25 57 0 0 0 7 0 316 317 -1 -1 45 25 57 0 0 0 16 0 317 316 -1 -1 45 25 57 0 0 0 7 0 317 318 -1 -1 45 25 57 0 0 0 16 0 318 317 -1 -1 45 25 57 0 0 0 7 0 318 319 -1 -1 45 25 57 0 0 0 16 0 319 318 -1 -1 45 25 57 0 0 0 7 0 319 320 -1 -1 45 25 57 0 0 0 16 0 320 319 -1 -1 45 25 57 0 0 0 7 0 320 321 -1 -1 45 25 57 0 0 0 16 0 321 320 -1 -1 45 25 57 0 0 0 7 0 321 322 -1 -1 45 25 57 0 0 0 16 0 322 321 -1 -1 45 25 57 0 0 0 7 0 322 323 -1 -1 45 25 57 0 0 0 16 0 323 322 -1 -1 45 25 57 0 0 0 7 0 323 324 -1 -1 45 25 57 0 0 0 16 0 324 323 -1 -1 45 25 57 0 0 0 7 0 324 325 -1 -1 45 25 57 0 0 0 16 0 325 324 -1 -1 45 25 57 0 0 0 7 0 325 313 -1 -1 45 25 57 0 0 0 16 0 313 325 -1 -1 45 25 57 0 0 0 17 0 327 326 -1 -1 41 39 58 0 0 0 20 0 326 327 -1 -1 41 39 58 0 0 0 17 0 328 327 -1 -1 41 39 58 0 0 0 20 0 327 328 -1 -1 41 39 58 0 0 0 17 0 329 328 -1 -1 41 39 58 0 0 0 20 0 328 329 -1 -1 41 39 58 0 0 0 17 0 330 329 -1 -1 41 39 58 0 0 0 20 0 329 330 -1 -1 41 39 58 0 0 0 17 0 331 330 -1 -1 41 39 58 0 0 0 20 0 330 331 -1 -1 41 39 58 0 0 0 17 0 332 331 -1 -1 41 39 58 0 0 0 20 0 331 332 -1 -1 41 39 58 0 0 0 17 0 333 332 -1 -1 41 39 58 0 0 0 20 0 332 333 -1 -1 41 39 58 0 0 0 17 0 334 333 -1 -1 41 39 58 0 0 0 20 0 333 334 -1 -1 41 39 58 0 0 0 17 0 335 334 -1 -1 41 39 58 0 0 0 20 0 334 335 -1 -1 41 39 58 0 0 0 17 0 336 335 -1 -1 41 39 58 0 0 0 20 0 335 336 -1 -1 41 39 58 0 0 0 17 0 337 336 -1 -1 41 39 58 0 0 0 20 0 336 337 -1 -1 41 39 58 0 0 0 17 0 338 337 -1 -1 41 39 58 0 0 0 20 0 337 338 -1 -1 41 39 58 0 0 0 17 0 326 338 -1 -1 41 39 58 0 0 0 20 0 338 326 -1 -1 41 39 58 0 0 0 # X Y Z points 961 0.0000000000000000 -25.5227534201074064 -19.4924155266308681 0.0000000000000000 -21.6272446110291625 -20.7909184629902839 10.0000000000000000 -25.5227534201074064 -19.4924155266308681 10.0000000000000000 -21.6272446110291625 -20.7909184629902839 0.0000000000000000 -25.5227534201074064 19.4924155266308681 35.0000000000000000 -25.5227534201074064 -19.4924155266308681 0.0000000000000000 -21.6272446110291625 20.7909184629902839 10.0000000000000000 -25.5227534201074064 19.4924155266308681 35.0000000000000000 -21.6272446110291625 -20.7909184629902839 45.0000000000000000 -25.5227534201074064 -19.4924155266308681 10.0000000000000000 -21.6272446110291625 20.7909184629902839 45.0000000000000000 -21.6272446110291625 -20.7909184629902839 35.0000000000000000 -25.5227534201074064 19.4924155266308681 35.0000000000000000 -21.6272446110291625 20.7909184629902839 45.0000000000000000 -25.5227534201074064 19.4924155266308681 45.0000000000000000 -21.6272446110291625 20.7909184629902839 80.0000000000000000 21.6272446110291625 -20.7909184629902839 80.0000000000000000 25.5227534201074064 -19.4924155266308681 90.0000000000000000 21.6272446110291625 -20.7909184629902839 90.0000000000000000 25.5227534201074064 -19.4924155266308681 80.0000000000000000 21.6272446110291625 20.7909184629902839 115.0000000000000000 21.6272446110291625 -20.7909184629902839 80.0000000000000000 25.5227534201074064 19.4924155266308681 90.0000000000000000 21.6272446110291625 20.7909184629902839 115.0000000000000000 25.5227534201074064 -19.4924155266308681 125.0000000000000000 21.6272446110291625 -20.7909184629902839 90.0000000000000000 25.5227534201074064 19.4924155266308681 125.0000000000000000 25.5227534201074064 -19.4924155266308681 115.0000000000000000 21.6272446110291625 20.7909184629902839 115.0000000000000000 25.5227534201074064 19.4924155266308681 125.0000000000000000 21.6272446110291625 20.7909184629902839 125.0000000000000000 25.5227534201074064 19.4924155266308681 0.0000000000000000 -30.1825532885556171 -19.9991668400670513 0.0000000000000000 -36.9095329944445751 -18.7685469282702257 0.0000000000000000 -44.6215891091046331 -13.6458466913751018 0.0000000000000000 -49.4474059759894473 -4.6688757538672974 0.0000000000000000 -49.2229978854725445 5.5205391308383929 0.0000000000000000 -44.0835025371168712 14.2005266200596374 0.0000000000000000 -36.5672767228092823 18.8910263470793822 0.0000000000000000 -30.0916748278812989 19.9997898920446850 4.7830170012282940 -25.5227534201073993 -19.4924155266308645 125.0000000000000000 30.0292831974557224 19.9999785623471773 125.0000000000000000 37.0313594027195521 18.7232471796370596 125.0000000000000000 44.5632325669363780 13.7081091767363556 125.0000000000000000 49.2335891195224775 5.4835252877493330 125.0000000000000000 49.6025454532816994 -3.9673935716065460 125.0000000000000000 45.5875850744350188 -12.5310491000255233 125.0000000000000000 38.0866132018506036 -18.2922575677157866 125.0000000000000000 30.0217186816775445 -19.9999882074681778 0.0000000000000000 -17.5629147998640462 -24.3216780616123671 0.0000000000000000 -11.1291254514078179 -27.8593353597465914 0.0000000000000000 1.3621462669519726 -29.9690600044016868 0.0000000000000000 15.3475794402880243 -25.7769626861670496 0.0000000000000000 25.7115627873477983 -15.4568929294432262 0.0000000000000000 29.7696602227781817 -3.7104353141294100 0.0000000000000000 28.7908616099578616 8.4312684547613994 0.0000000000000000 22.5761076910944425 19.7565017530965328 0.0000000000000000 12.5866558974154596 27.2318947802031701 0.0000000000000000 0.6323325227749578 29.9933351860149280 0.0000000000000000 -10.8366994460985868 27.9743801560450400 0.0000000000000000 -17.8835203716831188 24.0869196684755629 4.8523274434813892 -21.6272446110291625 -20.7909184629902803 10.0000000000000000 -30.3122773888822898 -19.9975619222042376 10.0000000000000000 -36.7059243383271223 -18.8422551402063299 10.0000000000000000 -43.6784186860220984 -14.5911227206778502 10.0000000000000000 -48.5297114021048230 -7.5266058322929545 10.0000000000000000 -49.9967152717528194 0.3624615020212330 10.0000000000000000 -48.2447668065567612 8.1931974328930082 10.0000000000000000 -43.6367907383349447 14.6300354872728224 10.0000000000000000 -36.4282896528679956 18.9387721919566445 10.0000000000000000 -30.1305258757512675 19.9995740703585838 119.3859836803779615 25.5227534201073993 19.4924155266308645 10.0000000000000000 -17.4986844939320179 -24.3679305847218615 10.0000000000000000 -10.8936079801113923 -27.9522683368569105 10.0000000000000000 0.8546703407115473 -29.9878231722262214 10.0000000000000000 15.3671532528939618 -25.7652983856595483 10.0000000000000000 25.8729513460983362 -15.1852029503206918 10.0000000000000000 29.9874264834633344 -0.8684773450596720 10.0000000000000000 26.6464545366632386 13.7828320974152181 10.0000000000000000 16.5411367995726266 25.0278004103002267 10.0000000000000000 2.1768730850404787 29.9209161552855250 10.0000000000000000 -10.6002196534867004 28.0648417650596116 10.0000000000000000 -17.8199121854635258 24.1340160292970829 125.0000000000000000 17.6854347837153227 24.2327339875415682 125.0000000000000000 10.5648475352238265 28.0781765176707125 125.0000000000000000 -0.4488897040706961 29.9966414458948947 125.0000000000000000 -12.4711277855658729 27.2849953592828527 125.0000000000000000 -23.8606411037434505 18.1843285858551447 125.0000000000000000 -29.4608533582884178 5.6619889969361585 125.0000000000000000 -28.6759965595133401 -8.8140354729703247 125.0000000000000000 -21.1799289908011978 -21.2464257686938716 125.0000000000000000 -10.5356767283122625 -28.0891351927484507 125.0000000000000000 1.8798413759761616 -29.9410453458319985 125.0000000000000000 12.5893706746451510 -27.2306398385418902 125.0000000000000000 17.7626164452226831 -24.1762167639997969 90.0000000000000000 30.5271789050367346 19.9930508527859274 90.0000000000000000 38.4988041115103314 18.1044284271604390 90.0000000000000000 45.9821230692718643 12.0237989919429307 90.0000000000000000 49.6942680898871458 3.4836481457880870 90.0000000000000000 48.8227945486469679 -6.7603554181289729 90.0000000000000000 44.1858740584431828 -14.0982614955883356 90.0000000000000000 37.1744081741329708 -18.6689010750749311 90.0000000000000000 30.5192359107854685 -19.9932587156008843 119.9822511366060809 21.6272446110291625 -20.7909184629902803 85.5657714606245889 25.5227534201073993 19.4924155266308645 80.0000000000000000 30.1476163111392665 19.9994552281977285 80.0000000000000000 37.3844739148701493 18.5868110497901782 80.0000000000000000 44.9714276381138376 13.2610842119609824 80.0000000000000000 49.4391761474425095 4.7030235709277708 80.0000000000000000 49.3775399869352896 -4.9508528613486016 80.0000000000000000 44.8008852839428329 -13.4511633255850551 80.0000000000000000 37.1383721683087415 -18.6827097281608232 80.0000000000000000 30.1416227547027198 -19.9994985685979216 120.1840407194472959 25.5227534201073993 -19.4924155266308645 115.0000000000000000 30.2151082389553274 -19.9988431776823887 115.0000000000000000 37.5846998800221996 -18.5060078820363394 115.0000000000000000 44.5667441264859931 -13.7043776054765001 115.0000000000000000 49.0302993290955200 -6.1520490444262856 115.0000000000000000 49.7295308265662186 3.2780502381099996 115.0000000000000000 46.0027710081717487 11.9963044334502253 115.0000000000000000 38.4796977311771116 18.1133852823780508 115.0000000000000000 30.2074005006563482 19.9989245968958897 85.0009489597230470 21.6272446110291625 -20.7909184629902803 85.4951796296640794 25.5227534201073993 -19.4924155266308645 80.0000000000000000 17.9127966223200694 24.0651556647240241 80.0000000000000000 11.4056406996159811 27.7472766272883717 80.0000000000000000 0.5397450791894292 29.9951441945107327 80.0000000000000000 -11.8805915562018960 27.5472601954296756 80.0000000000000000 -23.2983776357749299 18.8993544741830455 80.0000000000000000 -29.3377975847532753 6.2684633584352154 80.0000000000000000 -28.9876388314103330 -7.7276642641688174 80.0000000000000000 -22.2300602980533952 -20.1450842426858614 80.0000000000000000 -12.5730553296351548 -27.2381768787474670 80.0000000000000000 -0.8237184027006297 -29.9886893343649206 80.0000000000000000 11.1385190469002087 -27.8555810106671657 80.0000000000000000 17.8564165733266762 -24.1070194582371471 85.5212266097881297 21.6272446110291625 20.7909184629902803 90.0000000000000000 17.7262826895256786 -24.2028697061117590 90.0000000000000000 12.5351095217891739 -27.2556604997338177 90.0000000000000000 1.4813404515223711 -29.9634048543666580 90.0000000000000000 -12.7241451736697329 -27.1679246465271476 90.0000000000000000 -23.9661752754419553 -18.0450115729193890 90.0000000000000000 -29.5262755299274957 -5.3102780841312542 90.0000000000000000 -28.7780532221730105 8.4748836417839719 90.0000000000000000 -21.8736612714118692 20.5315109668902984 90.0000000000000000 -9.7816305968728585 28.3605307225785310 90.0000000000000000 2.6038453125346810 29.8867862037454799 90.0000000000000000 12.5759121644208118 27.2368579911995816 90.0000000000000000 18.2793436089336936 23.7879296540605836 115.0000000000000000 16.9258369896044840 -24.7692559880456784 115.0000000000000000 8.2512620588162751 -28.8429657704740698 115.0000000000000000 -5.6717228526970676 -29.4589809715508295 115.0000000000000000 -17.9374123432083259 -24.0468134776672180 115.0000000000000000 -26.6041169843367946 -13.8643773565105537 115.0000000000000000 -29.9439920062106815 -1.8323053053437244 115.0000000000000000 -28.0960660129957738 10.5171799734236693 115.0000000000000000 -21.1982101263903466 21.2281861551429252 115.0000000000000000 -10.7195594724062797 28.0194761677934459 115.0000000000000000 0.8969426652006018 29.9865885664798952 115.0000000000000000 11.2901804099100644 27.7944567551100548 115.0000000000000000 17.7789921797686326 24.1641767306839128 119.9732660319776727 21.6272446110291625 20.7909184629902768 4.7830170012282940 -25.5227534201073993 19.4924155266308645 35.0000000000000000 -30.3122778634971581 -19.9975619147927510 35.0000000000000000 -36.7059255008512295 -18.8422547264660736 35.0000000000000000 -43.6784103194357343 -14.5911305639129250 35.0000000000000000 -48.5296982043469640 -7.5266383237020600 35.0000000000000000 -49.9967158533520930 0.3624294142268001 35.0000000000000000 -48.2447855082817298 8.1931557874113956 35.0000000000000000 -43.6368043023063095 14.6300228441585158 35.0000000000000000 -36.4282910907531061 18.9387717039026633 35.0000000000000000 -30.1305263504177958 19.9995740672606956 39.7914079970866084 -25.5227534201073993 -19.4924155266308645 4.8523274434813892 -21.6272446110291625 20.7909184629902803 35.0000000000000000 -17.4620332873189419 -24.3942081952369456 35.0000000000000000 -10.7590567657456901 -28.0043335487824443 35.0000000000000000 2.3137546735472672 -29.9106425760236441 35.0000000000000000 16.4477055725322252 -25.0893001376940035 35.0000000000000000 26.5934675769845406 -13.8847932009040704 35.0000000000000000 29.9883657196522861 0.8354169404456140 35.0000000000000000 25.7229858752712950 15.4378754257376194 35.0000000000000000 14.8092217324870319 26.0899779930538429 35.0000000000000000 2.4202123961222868 29.9022168401885544 35.0000000000000000 -10.4651292388997526 28.1154951941651845 35.0000000000000000 -17.7836153845568639 24.1607744878791593 45.0000000000000000 -30.1825532885556171 19.9991668400670513 45.0000000000000000 -36.9095329944445751 18.7685469282702257 45.0000000000000000 -44.4653796299569493 13.8113283995865697 45.0000000000000000 -49.3822562638882587 4.9323566498139719 45.0000000000000000 -49.2961434381399286 -5.2591680344641354 45.0000000000000000 -44.1990830509328489 -14.0849579521101624 45.0000000000000000 -36.5672767228092823 -18.8910263470793822 45.0000000000000000 -30.0916748278812989 -19.9997898920446850 40.2197646315965613 -21.6272446110291625 20.7909184629902803 40.2999302275845963 -25.5227534201073993 19.4924155266308645 45.0000000000000000 -17.7757530973424132 24.1665595776958213 45.0000000000000000 -10.2062868655997203 28.2104893331733386 45.0000000000000000 1.2957199666216104 29.9720054345400477 45.0000000000000000 13.3209559742137653 26.8803298330407152 45.0000000000000000 24.2625466619973622 17.6445127298659230 45.0000000000000000 29.6170488081600674 4.7781188657320248 45.0000000000000000 28.8572848362672367 -8.2010433408524950 45.0000000000000000 22.1769185130325539 -20.2035711018204367 45.0000000000000000 12.2102947105463517 -27.4027134255278426 45.0000000000000000 -1.6097300428410117 -29.9567816894467995 45.0000000000000000 -11.9620535816500730 -27.5119841907073770 45.0000000000000000 -17.8126274070007433 -24.1393932164701717 39.6678831327176979 -21.6272446110291625 -20.7909184629902803 90.0000000000000000 30.0000000000000000 -10.0000000000000000 90.0000000000000000 25.3666721292596868 -8.8618436480351566 90.0000000000000000 21.7790138533099018 -5.6934512183674162 90.0000000000000000 20.0796266075829415 -1.2594410486496204 90.0000000000000000 20.6316803204081936 3.4977973613365410 90.0000000000000000 23.3486912212375515 7.4672680097581603 90.0000000000000000 27.5570182371279024 9.6970016039121258 90.0000000000000000 32.4357965692131813 9.6988089512789841 90.0000000000000000 36.6249668615248396 7.4906484421375437 90.0000000000000000 39.3301126094325753 3.5984717166190285 90.0000000000000000 39.9204362317382646 -1.2589459766068418 90.0000000000000000 38.1848960285465537 -5.7452133991595860 90.0000000000000000 34.5965720520217204 -8.8809642140126179 80.0000000000000000 15.0000000000000000 0.0000000000000000 80.0000000000000000 13.2721358004643033 6.9893069251560105 80.0000000000000000 8.5646033036892977 12.3145267976660140 80.0000000000000000 1.9036280655210267 14.8787163488037724 80.0000000000000000 -5.2212601495048494 14.0619501652933128 80.0000000000000000 -11.1943169797760600 9.9843511234480022 80.0000000000000000 -14.5613977616579433 3.6007909168379997 80.0000000000000000 -14.5842933297563100 -3.5069057688545899 80.0000000000000000 -11.3325818828561715 -9.8271352828970500 80.0000000000000000 -5.5078387842640630 -13.9521938033614106 80.0000000000000000 1.5335065412340134 -14.9214060224897214 80.0000000000000000 8.2717098513397200 -12.5131457329981348 80.0000000000000000 13.1685575252334086 -7.1825547477634020 0.0000000000000000 0.0000000000000000 -15.0000000000000000 0.0000000000000000 -6.8913628898363788 -13.3232547645305495 0.0000000000000000 -12.2773621218752016 -8.6177943424256807 0.0000000000000000 -14.8809545820038611 -1.8860516239854930 0.0000000000000000 -14.0327718655240545 5.2991804809948251 0.0000000000000000 -10.0295934553000592 11.1538000305457423 0.0000000000000000 -3.6653074960828920 14.5452920547907372 0.0000000000000000 3.5361598102440621 14.5772279187921967 0.0000000000000000 9.9379865430423671 11.2354983632373369 0.0000000000000000 13.9999878135772029 5.3851964884941621 0.0000000000000000 14.8913069875870399 -1.8024916647356195 0.0000000000000000 12.2897996982226854 -8.6000478706554642 0.0000000000000000 6.8914512334578868 -13.3232090690220648 35.0000000000000000 -30.0000000000000000 -10.0000000000000000 35.0000000000000000 -25.3513572252419763 -8.8538195346805004 35.0000000000000000 -21.7585030024226072 -5.6637202648897507 35.0000000000000000 -20.0732280641681449 -1.2079730684005225 35.0000000000000000 -20.6571977661459165 3.5653956889931724 35.0000000000000000 -23.4003549353462361 7.5129677904667718 35.0000000000000000 -27.6180440344096034 9.7121720422358848 35.0000000000000000 -32.4134777204011328 9.7043869096984832 35.0000000000000000 -36.6214251152885595 7.4937793831034165 35.0000000000000000 -39.3348286572294370 3.5862200072176273 35.0000000000000000 -39.9339278031288458 -1.1476403627546394 35.0000000000000000 -38.2177747113994073 -5.6980855375015489 35.0000000000000000 -34.6119198646121760 -8.8730037282982970 45.0000000000000000 15.0000000000000000 0.0000000000000000 45.0000000000000000 13.2521365431372633 -7.0271528403789523 45.0000000000000000 8.3790139703849498 -12.4415483314615560 45.0000000000000000 1.6792253732651412 -14.9057103871564127 45.0000000000000000 -5.3851711662555228 -13.9999975539330048 45.0000000000000000 -11.2759954983928257 -9.8920132187651628 45.0000000000000000 -14.5675043369788675 -3.5760057874815989 45.0000000000000000 -14.5747872973151740 3.5462057523528254 45.0000000000000000 -11.1965939185517129 9.9817976649023912 45.0000000000000000 -5.1798204596836381 14.0772674907257063 45.0000000000000000 1.9226550005821488 14.8762696180439153 45.0000000000000000 8.5925653179065336 12.2950323813119660 45.0000000000000000 13.3090916612320829 6.9186761127344765 10.0000000000000000 -19.9999999999999964 0.0000000000000000 10.0000000000000000 -21.1283154533808286 -4.6144569892110416 10.0000000000000000 -24.3119306298783222 -8.2247107451073038 10.0000000000000000 -28.7710761991219890 -9.9242000328306297 10.0000000000000000 -33.5100864309105262 -9.3637221897885112 10.0000000000000000 -37.5002223960413588 -6.6141260957075527 10.0000000000000000 -39.7136092271452554 -2.3760883363878644 10.0000000000000000 -39.7087270248894129 2.3959590055303446 10.0000000000000000 -37.4887200209890707 6.6271466293750798 10.0000000000000000 -33.6306301000463108 9.3176458977918681 10.0000000000000000 -28.7720241530193803 9.9243173729598197 10.0000000000000000 -24.3127394303108488 8.2252700388776905 10.0000000000000000 -21.1402072914789869 4.6372484473055504 125.0000000000000000 0.0000000000000000 -15.0000000000000000 125.0000000000000000 -6.8913628898363788 -13.3232547645305495 125.0000000000000000 -12.2773621218752016 -8.6177943424256807 125.0000000000000000 -14.8809545820038611 -1.8860516239854930 125.0000000000000000 -14.0327718655240545 5.2991804809948251 125.0000000000000000 -10.0295934553000592 11.1538000305457423 125.0000000000000000 -3.6653074960828920 14.5452920547907372 125.0000000000000000 3.5361598102440621 14.5772279187921967 125.0000000000000000 9.9379865430423671 11.2354983632373369 125.0000000000000000 13.9999878135772029 5.3851964884941621 125.0000000000000000 14.8913069875870399 -1.8024916647356195 125.0000000000000000 12.2897996982226854 -8.6000478706554642 125.0000000000000000 6.8914512334578868 -13.3232090690220648 -40.0000000000000000 0.0000000000000000 15.0000000000000000 -40.0000000000000000 -7.0271528403789523 13.2521365431372633 -40.0000000000000000 -12.4415483314615560 8.3790139703849498 -40.0000000000000000 -14.9057103871564127 1.6792253732651412 -40.0000000000000000 -13.9999975539330048 -5.3851711662555228 -40.0000000000000000 -9.8920132187651628 -11.2759954983928257 -40.0000000000000000 -3.5760057874815989 -14.5675043369788675 -40.0000000000000000 3.5462057523528254 -14.5747872973151740 -40.0000000000000000 9.9817976649023912 -11.1965939185517129 -40.0000000000000000 14.0772674907257063 -5.1798204596836381 -40.0000000000000000 14.8762696180439153 1.9226550005821488 -40.0000000000000000 12.2950323813119660 8.5925653179065336 -40.0000000000000000 6.9186761127344765 13.3090916612320829 115.0000000000000000 30.0000000000000000 10.0000000000000000 115.0000000000000000 25.3820062342101522 8.8698440560770813 115.0000000000000000 21.7752747154409363 5.6880483466242397 115.0000000000000000 20.0811339173095611 1.2712575009230862 115.0000000000000000 20.6589545052023063 -3.5699956672410180 115.0000000000000000 23.3769366240852747 -7.4923315141961684 115.0000000000000000 27.5753030509412405 -9.7015898029768870 115.0000000000000000 32.3129173411988333 -9.7288444006871444 115.0000000000000000 36.5257929736953955 -7.5772043699815637 115.0000000000000000 39.2703559298654170 -3.7497334483412241 115.0000000000000000 39.9415628285502748 1.0795038332434974 115.0000000000000000 38.2494639738598323 5.6521097073560798 115.0000000000000000 34.5963456505002824 8.8810813902996717 165.0000000000000000 -15.0000000000000000 0.0000000000000000 165.0000000000000000 -13.3232547645305495 -6.8913628898363788 165.0000000000000000 -8.6177943424256807 -12.2773621218752016 165.0000000000000000 -1.8860516239854930 -14.8809545820038611 165.0000000000000000 5.2991804809948251 -14.0327718655240545 165.0000000000000000 11.1538000305457423 -10.0295934553000592 165.0000000000000000 14.5452920547907372 -3.6653074960828920 165.0000000000000000 14.5772279187921967 3.5361598102440621 165.0000000000000000 11.2354983632373369 9.9379865430423671 165.0000000000000000 5.3851964884941621 13.9999878135772029 165.0000000000000000 -1.8024916647356195 14.8913069875870399 165.0000000000000000 -8.6000478706554642 12.2897996982226854 165.0000000000000000 -13.3232090690220648 6.8914512334578868 0.0000000000000000 -27.4395478947925611 -15.2855598675772093 0.0000000000000000 -36.3787625864294242 -8.8512059835638972 0.0000000000000000 -41.2512287622966483 -1.7455417652967402 0.0000000000000000 -38.6900880587856406 8.3671520127792096 0.0000000000000000 -27.5450660202925839 14.5993594879463018 0.0000000000000000 -22.4596038652928627 -14.6517893299058297 0.0000000000000000 -16.2360763333618294 -15.9652460417585491 0.0000000000000000 -11.6964395459694188 -20.5133787508896184 0.0000000000000000 -14.8499679183758460 18.0048494572991942 0.0000000000000000 -21.7934547687102338 15.3151924755909654 0.0000000000000000 -5.2318420134834200 -21.8438218655899838 0.0000000000000000 -19.3438515330001515 -8.1667645531480773 0.0000000000000000 -21.8023491058967949 0.7263091271910939 0.0000000000000000 -17.6782914126974298 10.4732590256655840 0.0000000000000000 -32.0477553712337340 -14.2023104406219041 0.0000000000000000 -32.9082445912541672 14.6823625044680206 0.0000000000000000 17.4090724485541912 -11.8126217882456146 0.0000000000000000 20.4479648080407124 7.5104919308130267 0.0000000000000000 -31.6927743488130886 0.6141236304695813 0.0000000000000000 -24.8183499361170803 8.2749854112187560 0.0000000000000000 -31.2275981974643742 8.8983198189938726 0.0000000000000000 -27.2661661584493906 -8.3715338369379708 4.8765493266711868 -31.9647085893614573 -19.9032640579099294 4.8840778839819752 -31.7722594735376944 19.9213226558493304 39.9171765877715643 -31.8758615510785255 -19.9118342560695609 40.0348400935757951 -31.9559618566763248 19.9041255325429276 125.0000000000000000 27.5102899896904702 14.4550857129803116 125.0000000000000000 33.9645532356443454 13.2341479729825622 125.0000000000000000 38.0858506089849129 5.5197260944949065 125.0000000000000000 40.7552560196882823 -3.0955671747883007 125.0000000000000000 34.7651901353928423 -10.9835949167788112 125.0000000000000000 21.6420908484758883 15.7349143921123460 125.0000000000000000 21.7636841327421848 -14.8048831156337073 125.0000000000000000 14.4950494273592589 18.5713585754112174 125.0000000000000000 17.0192967893805154 -18.9723926289889668 125.0000000000000000 17.2543698928201650 10.9350097095154055 125.0000000000000000 21.2421245226443496 3.2630204845971953 125.0000000000000000 20.1098568151265304 -6.5902086187290054 125.0000000000000000 27.8522288165634535 -14.9508603708825039 125.0000000000000000 -3.7023066823219786 21.3868346557390119 125.0000000000000000 -19.9931175327199249 8.1031194903468879 125.0000000000000000 14.6331249700745616 -13.8875334038964855 125.0000000000000000 23.3537314271561520 10.3064744656374181 125.0000000000000000 30.2594839635431008 -1.6622689300396234 125.0000000000000000 10.2765995613496042 -20.6292986746745086 125.0000000000000000 27.1208913405416681 -8.8637485796528352 125.0000000000000000 29.3563405623861833 7.2682967967641119 119.9127194179386322 32.3226522549326631 -19.8646743366876315 85.2654689889866546 32.2540864945814505 -19.8725714006754934 39.9956819047515069 -16.1426449484265930 -25.2866568385193489 115.0000000000000000 22.7911949787905392 16.2394581101957591 115.0000000000000000 21.5216918458234190 -16.6923706696937835 115.0000000000000000 26.7405260057597545 -15.2096632272123440 115.0000000000000000 27.4430128654063594 16.6207078609558074 115.0000000000000000 16.5763082094245426 -18.8951170562342803 115.0000000000000000 2.0405668144817950 -15.6975746229595785 115.0000000000000000 -12.0003014792267777 -14.1914754319442462 115.0000000000000000 -18.7989157559221525 -1.5832065513571019 115.0000000000000000 -12.3257562629618960 11.8056033759711934 115.0000000000000000 0.7292558856864504 19.8970162221056093 115.0000000000000000 17.5290863790627931 17.5205763331697106 115.0000000000000000 26.1521885176565085 12.9556894518195129 115.0000000000000000 20.1800751316228464 11.5199705933645813 115.0000000000000000 16.3511563972060650 5.5349084796559618 115.0000000000000000 14.2567806303765607 -1.5197775817016062 115.0000000000000000 17.8018547517746981 -7.5984030161285805 115.0000000000000000 22.4062170470229880 -11.7502202669903362 115.0000000000000000 31.9706350953795457 -14.5310680110794657 115.0000000000000000 37.3507623050899014 -12.4236347614843616 115.0000000000000000 41.1723551130463861 -8.8114816242607521 115.0000000000000000 11.0539062999375091 -21.2719452175466053 115.0000000000000000 11.5234107787511846 19.7421888822911065 115.0000000000000000 31.7467860552051846 14.6045881509261868 115.0000000000000000 13.6207312422036146 12.5392061982057044 115.0000000000000000 10.9920828500313998 -8.4875795203172402 115.0000000000000000 -6.6293244208033464 -2.6724800444737089 115.0000000000000000 -0.4925055848581460 7.5271755609653956 115.0000000000000000 8.9296394311370477 5.2846455380068535 115.0000000000000000 11.1308331744034685 -15.4613397004273736 115.0000000000000000 6.5463331403919520 13.2947638930554426 115.0000000000000000 16.7255455468892826 -13.1501840163660528 115.0000000000000000 4.7307361421015406 -2.5965112563329122 10.0000000000000000 -21.6916674674817678 -16.6789882745480433 10.0000000000000000 -27.2192160788711419 -15.3386302630300637 10.0000000000000000 -32.3301649046769981 14.2718481547687350 10.0000000000000000 -16.4087544162393577 -18.5271457774109045 10.0000000000000000 -2.3712152016765677 -20.2677274499560589 10.0000000000000000 10.8547821610566331 -16.6967508424375062 10.0000000000000000 17.6877521591567834 -4.4700851437897375 10.0000000000000000 9.4117241971536245 16.2696889650871874 10.0000000000000000 -11.9039715681664386 19.9080706514243637 10.0000000000000000 -21.8529344341728233 16.4674120029385520 10.0000000000000000 -16.4027688009058963 -2.8644044227323557 10.0000000000000000 -18.7343406992264043 -8.2195247551836186 10.0000000000000000 -23.1763741606156302 -12.0442416134438108 10.0000000000000000 -32.5620036833879709 -14.5248793693475022 10.0000000000000000 -37.9052522839695811 -12.0300753347081173 10.0000000000000000 -42.5937144805846231 -7.1909077170875735 10.0000000000000000 -44.3637853100479234 0.1945834485905564 10.0000000000000000 -42.4310716142796522 7.4135488176562987 10.0000000000000000 -38.0432288126070759 11.6785439492510896 10.0000000000000000 -23.0284658312562200 12.1343902718532011 10.0000000000000000 -18.8559328527387322 8.5118809038221013 10.0000000000000000 -16.5358950603311996 3.2754929827962043 10.0000000000000000 -26.9620200166184780 15.1630277041451347 10.0000000000000000 -10.9811076008401418 -21.1240322262866336 10.0000000000000000 -2.7636580980255752 19.9908857821013726 10.0000000000000000 -17.8482093714633763 19.0449357057625690 10.0000000000000000 4.5018204325979294 -9.1803701806499483 10.0000000000000000 -8.0594525744558094 13.5101042498197117 10.0000000000000000 -10.5612196159700229 0.6008549339736421 10.0000000000000000 -11.6857086052395704 -7.2853839961875533 10.0000000000000000 -16.3112344367169655 13.8906475092668664 10.0000000000000000 -8.0857587097059351 -13.7915829378505794 10.0000000000000000 -12.8675283692942557 7.7838205492095538 10.0000000000000000 -16.6487712196267026 -13.0246355832625866 10.0000000000000000 9.9673054224929984 3.4765163845493672 10.0000000000000000 -6.0420297365513527 6.0204972756429385 10.0000000000000000 1.1094644669003038 9.6992802283085684 10.0000000000000000 -1.9408869794189429 -2.2465354599679710 90.0000000000000000 28.0372254424078378 14.7615624789775737 90.0000000000000000 33.0730254480711281 -14.4415854162132433 90.0000000000000000 21.5597239620831722 16.4731686240500217 90.0000000000000000 21.9209923038383998 -17.1196760226769129 90.0000000000000000 16.9605180342327273 -19.1777788536387703 90.0000000000000000 10.3143737452874760 -22.1005323387493569 90.0000000000000000 -9.6137360229462221 -10.5433783881123393 90.0000000000000000 -18.2775226986107029 -1.3079188470403342 90.0000000000000000 -14.5538001191202273 11.7543656091260402 90.0000000000000000 -2.7090000621942774 16.4940337195525402 90.0000000000000000 16.1411277629439311 19.5050947204210630 90.0000000000000000 23.7404933622376326 -12.6701876872863828 90.0000000000000000 19.1598332633727004 -9.3522008575609572 90.0000000000000000 15.6387224939732210 -3.6687221890395052 90.0000000000000000 15.5266058965799321 2.4305328270573150 90.0000000000000000 18.1823692652081554 7.8661665986021552 90.0000000000000000 22.5391459447082276 11.8521552806741113 90.0000000000000000 36.3365457648548400 12.9079682545957297 90.0000000000000000 41.4601352893386235 8.2521812396561387 90.0000000000000000 27.7432455021141244 -15.5415871001951675 90.0000000000000000 8.4151927897087528 17.5937355603358156 90.0000000000000000 2.0002014787255797 -16.7835505485621717 90.0000000000000000 37.9899055621220043 -12.5492794083069796 90.0000000000000000 16.2932890287140069 13.7527325131745037 90.0000000000000000 3.2385505373645898 7.1121495009397471 90.0000000000000000 -7.3327835022454817 3.3290581754064639 90.0000000000000000 11.4523889120543867 8.1017961526880207 90.0000000000000000 9.2833170699070138 0.1994413637772655 90.0000000000000000 17.2355653272733989 -14.0899617286728702 90.0000000000000000 10.6609465167186350 -9.0197836721842677 90.0000000000000000 11.3045504939303374 -16.1944169783074869 90.0000000000000000 0.6832103315419464 -4.4649593957585809 80.0000000000000000 28.0246443476016260 14.5354297157494639 80.0000000000000000 35.0193348718761968 11.3171661542683832 80.0000000000000000 41.5401442940012942 3.3638861843880044 80.0000000000000000 38.9608577101505205 -6.7216248036722437 80.0000000000000000 27.1158104391908239 -15.3156260261793271 80.0000000000000000 15.1753573065174709 18.9862155969938762 80.0000000000000000 7.5287869663253657 20.4039148810427058 80.0000000000000000 15.9304841573644893 -19.2690923916234418 80.0000000000000000 21.5763867687468966 -15.9591737168049352 80.0000000000000000 21.9951896961521491 14.3649058988596234 80.0000000000000000 20.3414311868151856 5.2666979618447929 80.0000000000000000 16.1221420377745943 11.9884948304353269 80.0000000000000000 16.2636828746638571 -12.9505324427981918 80.0000000000000000 19.8150586499374626 -4.1613215332923907 80.0000000000000000 32.1206027167532753 -12.7549865190230616 80.0000000000000000 -20.7880059018260290 -4.7892335706489657 80.0000000000000000 8.6197654057525170 -19.1831142780791843 80.0000000000000000 33.9908772811194311 2.0005319580004568 80.0000000000000000 24.8527172339728004 -9.3592988202750806 80.0000000000000000 26.2147101458790104 -0.4571108875412392 80.0000000000000000 31.5752920657392231 -5.5003730188790039 80.0000000000000000 27.5278469090980806 7.8112011626789588 35.0000000000000000 -27.4731223470137920 -14.6571750272096200 35.0000000000000000 -31.3671957220142623 14.4543250835293531 35.0000000000000000 -21.7887196242071184 -14.8683813418306219 35.0000000000000000 -16.3830666599733235 -17.9564559793566652 35.0000000000000000 -11.3817881620159582 -21.2460959628506885 35.0000000000000000 6.9410618719231509 -16.6855266357397838 35.0000000000000000 16.4459260757492949 -7.8333759508225613 35.0000000000000000 13.1127266025873901 8.1358422689597631 35.0000000000000000 1.7144938925798676 19.3441412667116239 35.0000000000000000 -17.5061356184295711 18.7935333587920006 35.0000000000000000 -21.6022491726261983 16.3843043805562552 35.0000000000000000 -20.1450669359795072 -9.4259406938882329 35.0000000000000000 -16.4746476479373101 -4.9808267415942984 35.0000000000000000 -15.1000364510252769 1.5449715654265888 35.0000000000000000 -17.7340249713774085 7.6467151418411321 35.0000000000000000 -22.2994348905466673 11.8914004062224752 35.0000000000000000 -44.1563334927505480 1.2073049581095658 35.0000000000000000 -43.5270673720726293 -5.6566754797097740 35.0000000000000000 -38.6149043930815381 -11.5641991891861338 35.0000000000000000 -33.1800733449552752 -14.2589805625640693 35.0000000000000000 -36.3559375868276220 12.7309989633162139 35.0000000000000000 -26.3964911994209324 15.0459297643104488 35.0000000000000000 -10.0092594486266400 18.2014825127275159 35.0000000000000000 -14.9749859348085810 -11.1824270819238745 35.0000000000000000 5.0418811453579577 -3.4516499153141695 35.0000000000000000 -9.1479566939031685 -14.4379199356772983 35.0000000000000000 -10.4480848867179681 7.6664999406535346 35.0000000000000000 -16.4412879307830373 13.5510475992702570 35.0000000000000000 -0.7574296687082382 7.8522500654455367 35.0000000000000000 -1.5465859238045807 -11.5845031789031800 35.0000000000000000 -3.4165862029122298 -20.9245279630239231 35.0000000000000000 -8.0230089510528284 -3.7401658279744781 45.0000000000000000 -22.1058766293619158 15.0689010706589617 45.0000000000000000 -27.6489103584092639 14.8597406883522307 45.0000000000000000 -37.2607363984067135 10.3606365278950339 45.0000000000000000 -41.6652658533786919 3.2140610762407280 45.0000000000000000 -38.4513070819043818 -4.9664912629641202 45.0000000000000000 -27.7504745388013880 -15.7059116449730460 45.0000000000000000 -15.8328757327595309 16.5652956797154189 45.0000000000000000 -10.9971157958474492 20.9136700901191226 45.0000000000000000 -15.1934274951533173 -17.6055360622486035 45.0000000000000000 -22.1569827250846814 -15.4548838652706220 45.0000000000000000 -19.6353615320884209 -8.4630493769534585 45.0000000000000000 -22.0899842711995937 0.7412175761725966 45.0000000000000000 -18.5571572252121300 9.4514414003021550 45.0000000000000000 -32.6290149066311486 15.2250543337940574 45.0000000000000000 -33.4290722941932756 -12.7014035232913134 45.0000000000000000 -3.9750669778152887 21.6496546755168353 45.0000000000000000 21.2491743028148221 -0.3782835622796439 45.0000000000000000 -28.6645946583235975 -4.6722300811291415 45.0000000000000000 -32.2412032555874006 2.9474779765080470 45.0000000000000000 -30.9641558432386148 10.0878467386985786 45.0000000000000000 -25.1680916567908497 8.4837319406015794 45.0000000000000000 -26.2071785770838872 -10.9020499777818696 93.7330276012128394 27.7181049068137355 -9.7361673559821504 93.8922080568202233 23.4844189219440693 -7.5859872933771442 93.9445597345789025 20.7330182373833409 -3.7580645299582449 94.1607773435772657 20.0568243044472005 1.0645454839357968 94.4612100493113473 21.6822137620773674 5.5510748599009974 94.6092466941488794 25.1903620667157000 8.7674045732310493 94.7476294497688940 30.0214581003823966 9.9999769774698972 94.7136767591290152 34.6402569743575199 8.8582173834201186 94.7304642956319896 38.2127901079143442 5.7052676224121397 94.8986129603000421 39.9197763136488248 1.2641352329445164 94.7289993813181894 39.2421450409205619 -3.8187373623473420 94.6224347459132957 36.4363879461999929 -7.6532940754952987 94.0920189232417385 32.3561733871693562 -9.7184590841138441 110.2527349212214887 27.5803282848729516 9.7028443660101100 110.3306322723177004 23.3018827874383305 7.4253098121751862 110.9509034758214057 20.6978469658221016 3.6701429030400070 111.2207111161112323 20.0601640862917492 -1.0952908328638729 111.0725439362662854 21.6064569959854040 -5.4358472973178360 110.8708101215365502 25.1935328451098997 -8.7691432585494162 110.7238952207708138 29.8631813178590413 -9.9990639886049948 110.4469910667384482 34.4703477002627281 -8.9451658139330075 110.3327217200511257 38.0985052146302152 -5.8663628671100145 110.0560082583736659 39.8991578584632549 -1.4165711041897160 110.0835473973484682 39.3066178614180046 3.6588063602130259 110.2632671918822922 36.6576655404700062 7.4616010045591574 110.3120541734181899 32.3324063071112278 9.7241904968253152 98.2607899472692878 22.0906528721826483 -6.1190054757033359 98.6488806763609887 20.1550255107341698 -1.7539889696645654 99.2127038589713521 20.5042384844132890 3.1353649291752883 99.7660140852156729 23.0969973763149525 7.2352301122630021 99.9841791710308314 27.4403976658651061 9.6668731185989607 100.0130759844900865 32.3648765857477159 9.7163449266780475 99.9265789643960858 36.6073377242913196 7.5062033144031464 99.9850149909353405 39.3425365934774476 3.5660916981388548 100.0220157812824340 39.8996730239963426 -1.4129663895362383 99.9202704717577888 37.9396136011348233 -6.0796822174086529 105.0364231036648874 25.0835713754061729 8.7079693143277908 104.8816413846848832 21.3609532536947526 5.0365535155652497 107.1493836710667296 20.0655698139244514 1.1432833760669059 106.7241139645653902 20.5027317909675588 -3.1307980716906307 106.4841253316585750 22.8663881588039501 -7.0079656177201333 106.1751330186152131 27.0430941251604793 -9.5528376751277158 105.5711530553011670 32.0235538523500267 -9.7931215557981997 105.1355986851395841 36.2856143593832954 -7.7775993806003223 104.9939579501780855 39.2399080622637157 -3.8241468330745394 104.9834819850421042 39.9373416199644140 1.1176947383445690 105.1117280967642813 38.2092799317543168 5.7103172418085375 105.0430804326702514 29.9278021110859775 9.9997393698454129 99.8751925188496017 33.8000138218912909 -9.2498591856003483 105.0058431743353253 34.5596470686962647 8.8999785735095784 97.6045138328284452 29.8310222640388361 -9.9985722243102995 98.0080674551000754 25.7152587771801322 -9.0355405291254218 102.1901086509490852 24.3116406846373110 -8.2245102163792421 102.9749789483321081 20.0008457098603287 0.1300518434373245 101.6197443077294764 28.7438341862561586 -9.9207886505247789 102.5120389877823470 21.1272860328179632 -4.6124773014696538 73.5047235677151747 14.7309391755442505 2.8283265381521381 73.4405676698778365 11.7063461261551538 9.3787771257585710 72.8528925234052736 5.8387863204688317 13.8169668995733659 72.7570235527685725 -1.0662803767123326 14.9620535408157860 73.0326026582864927 -7.9079575092376748 12.7461448301865552 73.0974698103055545 -12.9351933548634435 7.5947859003593141 72.8962603166841063 -14.9814274157983256 0.7462121582809431 73.0626661714459544 -13.5987254227826000 -6.3304555030239520 72.9815085403465531 -9.2791556796105148 -11.7854685894771229 73.0912738431300681 -2.6461521076230277 -14.7647512347252974 73.0154168670272128 4.3508287768564822 -14.3551485173256754 73.1559826050689992 10.3411895871646333 -10.8655325650571655 73.4599627551115191 14.3736786612784542 -4.2892145833833482 -6.6418041742095655 -4.0621496538905246 -14.4394923799071648 -6.4173733489597753 -14.2449746733133527 -4.6990101677546052 -6.6233567919938610 -12.0423183208073059 8.9432974601289406 -6.5643828987600514 0.8011194199483744 14.9785916452442738 -6.3569030412555803 12.6550709469336127 8.0528988152141086 -6.0553433760354274 13.9150188797878744 -5.6010936052834390 -6.7310923255951316 3.3438694582051847 -14.6225352468880221 51.7616496419948859 14.7006298129849267 -2.9818590009554016 51.7848821855323322 11.4865366279423995 -9.6467339703620762 51.6285157021404189 5.9492082023403698 -13.7697829236777043 51.8723363806145130 -1.2232655551436220 -14.9500375043542668 51.8675956757443544 -8.0243313165663785 -12.6732042878654845 51.7874091424333542 -13.0370690528389908 -7.4185463880404408 51.7850046044842784 -14.9830673076351371 -0.7125265292430407 51.8085709162717905 -13.5185410294222841 6.4999268023437224 51.4575649256662402 -9.0367572830828955 11.9723438727196712 51.7573048982076074 -2.6260194824300869 14.7683452586231745 51.7940647812319455 4.6893674651678978 14.2481519074097740 51.7269688386079594 10.8318923677783889 10.3764207573162857 51.7345016226976071 14.3677536660227858 4.3090201429662445 131.2444378915379559 -3.8399920333115221 -14.5001538331185991 131.3344382665403600 -10.0107648494907586 -11.1707021770433155 131.3277986635465027 -14.0752787162993460 -5.1852221802436427 131.3439508681632333 -14.8625814328832710 2.0257524900425201 131.1267678181843053 -12.2389796911209476 8.6722186388679656 131.2338986784542385 -6.7935411065396130 13.3733989409482774 131.3541837030701060 0.2039298433447050 14.9986136899045928 131.4017663435443239 7.2444205876034227 13.1346248652143753 131.3709868667145599 12.3964341366577209 8.4456154716815721 131.4572349927778703 14.9075553943817951 1.6627664187847451 131.4828715262421781 13.9172967172055966 -5.5954313582831414 131.4327521546285311 9.6153395048701356 -11.5128296350672965 131.3880518538889248 3.3876621864706564 -14.6124517077168399 -33.0525134557309741 -3.9707243991388115 14.4649005439402760 -33.0885068224836658 -14.2495339562097634 4.6851661689661483 -33.1575394024413015 -11.9896967968962613 -9.0137212469931374 -33.3139143108565250 0.6747441927191997 -14.9848163243461787 -33.7410861496594094 12.5862749063947401 -8.1600051458720344 -32.8201978381739110 13.9108862856120314 5.6113494587996513 -33.0525209245080305 3.1775237949154986 14.6595819358106461 158.8010033647460091 -14.5057394464715319 -3.8188379267886896 158.7823079357216898 -11.0835386470697692 -10.1071841310481112 158.6586470870190624 -5.1133207663442084 -14.1015584507696552 158.6083191557652299 2.1021338971231973 -14.8519706799658628 158.7381309344645217 8.7259858004773427 -12.2007037424022293 158.7436549346283527 13.3965827064637910 -6.7477086324822357 158.6281104442734602 14.9969383633897024 0.3030506965677323 158.5791191870197281 13.0669784797748747 7.3657364471653679 158.5904619047867925 8.3298961216674705 12.4744871879460142 158.5163092928068522 1.5723818502047768 14.9173595289899286 158.4924055180853202 -5.6101994682540237 13.9113501115600666 158.6173152353134412 -11.4693666454495293 9.6671417053982296 158.7656620853149718 -14.6353435781641608 3.2873573503787346 -6.4491935760346388 -10.1516413264489298 -11.0428338020244698 -6.5622207498281879 -14.8370980735650217 2.2046588750673219 -6.5201354564409790 -6.4356719084882084 13.5492482111110402 -6.5169785495357804 7.3620850147485051 13.0690360867056885 -5.8890801482989428 14.9171492706828488 1.5743753161702525 -6.6503016952319438 9.8638205786607909 -11.3006656260588425 -32.9940259700720020 -14.8189107123938992 -2.3237653276734580 -33.2790545342320101 -10.4513039913744681 10.7596582138969499 -33.2040043391415054 -6.3991845999179313 -13.5665189513070441 -33.7625526005826586 7.3133260869670504 -13.0963835292681932 -33.1429230249931592 14.9227582572448583 -1.5202914180611526 -32.9816302609740930 9.6622724406548421 11.4734690169347626 65.6309378753040562 9.6162697785136722 11.5120526209205885 66.1114905927763914 3.1761039743913346 14.6598896156777254 66.0694442681286915 -3.9487725008271068 14.4709086009383530 66.0249847448287284 -10.2355802880682916 10.9650762043183203 66.2448962620787825 -14.1686568145147174 4.9243440245890300 66.3586330871331711 -14.8391246746492875 -2.1909766977799414 66.3989331042099593 -12.1713866955469978 -8.7668321477864222 66.4293521001172138 -6.7628351224601584 -13.3889529503400411 66.4128132382410428 0.1673261198110074 -14.9990667032862071 66.2272132238281870 7.0936327395032404 -13.2166703279247972 65.8041746961646510 12.1851728859340920 -8.7476603580555565 -13.2637575077836409 -12.9904493306769897 -7.4998817448752950 -26.3701982681733149 -13.0678672055709537 7.3641596056551615 -13.1448532976073160 4.8777109751337733 14.1847783078573197 -13.3766582162239764 -13.5514863936559795 6.4309576676072808 -12.9334642847955603 14.3923993664696859 4.2259721338460094 65.5938546409532677 14.9231924467264729 -1.5160234819969050 -13.1484534622161977 12.3086030373366970 -8.5731144439617637 -26.1821221099626378 -8.9437945163043331 -12.0419491632428244 -26.1175355982429842 14.8372418774276849 2.2036908745797765 -26.7790793370398497 4.7680980754786635 -14.2219984792087732 58.8387742092983430 9.5936200776608160 -11.5309346457910014 58.9457645528367209 2.8655910110021825 -14.7237355368012324 58.9048218546301072 -4.1617092438124947 -14.4111129400183948 58.9120099505070414 -10.3296442690207435 -10.8765090573900096 58.8536621201139809 -14.1748215686699801 -4.9065704413947158 58.8196350942963022 -14.8477138904205077 2.1319925488176330 58.9611987369465993 -12.2750439702417662 8.6210959586720328 58.7553419688771115 -6.4003852174253071 13.5659525676807373 58.6966183689403209 0.4514959094285885 14.9932035083823649 58.6798178923692220 7.3826508811156568 13.0574295314032707 137.9627693590459785 -7.3629846235630945 -13.0685292758279967 138.0768895343074405 -12.6154440512595158 -8.1148364980165102 138.1289134496781799 -14.9403159885518058 -1.3367715445143500 138.3264462132417236 -13.8736763368240705 5.7027278473593555 138.2906846656499624 -9.5543370395580425 11.5635048205346997 138.2504703964650901 -2.9832549740416110 14.7003465863855052 138.1467837386803694 4.0694583229790764 14.4374342927521706 138.0735246209553395 10.3341278040775890 10.8722491936576997 138.0671073752306484 14.1319258669476504 5.0287842756570775 137.9983659179725919 14.8270225182624547 -2.2714319806980972 138.1061120214816356 11.9817985124016868 -9.0242176618368806 -26.2924148343331296 -13.5938140307445927 -6.3409951977218393 -26.3259588088447565 13.9738176070388906 -5.4527443994020022 -26.3979690107004075 -2.2539130116956194 -14.8296957533089397 -26.3191798967448989 6.1954124076334418 13.6607783489573382 -11.5213052813393322 14.8290848256647809 -2.2579289699276446 -13.3694581805053581 -2.0889402352314024 14.8538321214975166 -13.1821296830680890 -14.9937348743053942 -0.4334910829973318 -13.2071994805950137 -7.6892470331109477 -12.8792655094843997 151.8046188660595135 -7.9669179375674641 -12.7093752236711381 151.8434407291991874 -1.2664611898113312 -14.9464402469183835 151.6019735299431659 5.9683993854566380 -13.7614755304684095 151.7166820420236206 11.5597337452869660 -9.5588992953202396 151.7551067132008882 14.7222695282820286 -2.8731132829421235 151.8416626129673546 14.3630339994537515 4.3247259254819328 151.8719171915289223 10.6786048171078640 10.5341064718390189 151.8299875309572826 4.7259462014410953 14.2360609896517545 151.9107037268563261 -2.3097875719154062 14.8210958222604159 151.8349966206311024 -9.0380970594814336 11.9713324882150456 -13.3831864515168668 -9.1393039491027075 11.8942474888458420 65.6327017571239253 13.8588464757971099 5.7386735715046608 -13.2105992258180400 10.8251784531494017 10.3834248423855762 -13.4659631692422828 -0.6227285777364300 -14.9870680627823383 -26.4671233643985886 -7.8451036046230884 12.7849266494857066 58.6063234946150402 14.9431504821595897 1.3047044368490563 -13.5349390209010334 6.7726513018176755 -13.3839902250407885 -26.4637721142078775 -14.9856683981286363 0.6555476041667264 138.1363315078118319 -0.4316020304981992 -14.9937893705117062 58.7516658269956764 12.5000501509122710 8.2914863700471759 151.7503929220484338 -14.9876973358766676 -0.6073949029712808 138.1854439550159270 6.3871996544420790 -13.5721656552775318 -28.1033315430489026 10.5585687265945207 -10.6544181655208270 -26.3596901935162862 11.9333857534269043 9.0881408692816699 151.8222808746968440 -13.0493688258558187 -7.3968894304824042 151.7334377482154082 -13.5755983328469991 6.3799004620136364 58.6978417309975526 13.8578826783557165 -5.7410005811642790 -26.5602990922623867 -0.8391085290641012 14.9765115055693752 -20.6664275410152669 10.4045736815275927 -10.8048529145779373 -19.9827338081945634 -11.2301798746590205 -9.9439961777347587 -19.8457871552089244 -4.9709631434765269 -14.1523681914440722 -19.9242318154706837 -5.1684447770587694 14.0814480287537886 144.9447161396341528 -14.3015298393184818 -4.5239633348517696 -20.0691303965405972 2.6020322177359487 -14.7725904410114932 -19.9639939506375264 -14.5239130589918162 3.7491264922441592 145.0343912022995312 -11.8612943033477780 9.1820312267694639 145.2399238551505221 -6.2074506901784661 13.6553123702463459 145.0365615539781743 0.8196825181302704 14.9775872746404541 144.9599067384949080 7.6504074159387665 12.9023744469825843 144.9854763535823849 12.7391322854872140 7.9192492455318870 145.0526173559913445 14.9620547309564351 1.0662636765191575 144.7674445828217245 13.6892159954847727 -6.1323213735879687 -19.9774731622343111 1.9843514428953599 14.8681656350431854 -19.1997766093361832 14.8487800298008938 -2.1245544536646195 144.9212449381980150 -4.3647221784517445 -14.3509302940586903 -19.9193072401278002 8.9045613575769753 12.0709894801191364 144.8048630430596404 2.9409474958406463 -14.7088690192927025 144.8646353809885738 9.1176286695938416 -11.9108709775314257 -19.8088508732680992 -11.1847450417436232 9.9950727036471019 -19.8433578553795193 13.6040889939362568 6.3189210032300922 144.9922772001237945 -14.7726216957758663 2.6018547679477009 144.9415918969651500 -10.5561083935604874 -10.6568558019427950 -20.0703446510751142 -14.5603910932130454 -3.6048593887532112 30.7061731964557580 -27.4292821505605140 -9.6639231028901094 30.6765016289013346 -23.3028485932114542 -7.4261809185172831 30.8164726807909801 -20.6190227147104181 -3.4637068543514116 30.4901559566635854 -20.0748388329814915 1.2211370966061927 30.2219221178762147 -21.7784858728608022 5.6926887722104222 30.0071727305421163 -25.2113710240628031 8.7788969996699837 29.9826461992322670 -29.6282258737861213 9.9930868103443355 30.0401835760501115 -34.3923963895935429 8.9836993469664588 30.0280749888158063 -38.0762782215449676 5.8969254775856239 30.0776351694112307 -39.9170759039830543 1.2851480516417966 29.8458235699287897 -39.4006542823149246 -3.4099412112812302 29.7215778056906039 -36.7149553635614438 -7.4100859958152601 30.1130709688244416 -32.4314563135393570 -9.6998979476770586 14.3759701023626025 -20.2989422703853819 -2.4268248652683027 14.3171120800349758 -22.5469863541328124 -6.6672773749497987 14.3272667894222749 -26.5618611968386702 -9.3903781377640172 14.4917042522266062 -31.2058073758484760 -9.9270352357765610 14.7967570706227622 -35.6365964332897462 -8.2600714675010725 15.0026743088463501 -38.7812847838174690 -4.7842489008720888 15.0378158155474395 -39.9968418570839788 -0.2513023765382696 14.9550826937007884 -38.9458507994851857 4.4689767814736063 14.9864963750193549 -35.7683105577528977 8.1686347273774231 15.0077335094050088 -31.3796768387187690 9.9043673104698104 15.0889130078963962 -26.4656998454883947 9.3546096881601244 15.1889964961591755 -22.6534799472751871 6.7844412529634468 14.8080494854540863 -20.3288433946444833 2.5433697951120604 26.8956719411769676 -21.6344497591851166 -5.4788291786112522 26.7609842255685351 -20.0575694214023628 -1.0714822395945733 26.1089018168933791 -20.5931660515619406 3.3928564759672963 25.4371670566441246 -23.0575770334870960 7.1974136572823282 25.3043341933994697 -26.9540894334923671 9.5248322200885589 25.2943117018364880 -31.9267455252228380 9.8126271548976014 25.1337595688624624 -36.0932054105215485 7.9292400534471748 25.2792503703482403 -39.1558197782342319 4.0213137391274074 25.2624381284357504 -39.9523429507146730 -0.9751255259503779 24.9031631103801381 -38.3350909892756846 -5.5250573029150791 18.2793505280045565 -21.2983826952057598 -4.9276623545962908 18.3258299183216167 -24.5316866448935400 -8.3724279065492304 18.3021438691180265 -28.8733943842970362 -9.9363353298218833 19.0080658678193402 -33.4053321738191045 -9.4023248606901717 19.8225414213252478 -37.1531085293384038 -6.9880639928027408 19.8825147795813102 -39.5420650279052381 -2.9914870889288241 19.7741101864290627 -39.7984907201128664 1.9973932031180170 19.8392446321232292 -37.6665474022014664 6.4205958391568227 19.9547156245136712 -33.9157561710928803 9.2014593195073147 19.8789189401900508 -28.9532827618441537 9.9450682764547871 20.0825727631069419 -24.5294276927289019 8.3709520743412789 18.7428994597139074 -20.0059081528103846 -0.3436977595767258 24.5716897720106253 -34.6223275655055076 -8.8675863614158228 20.4450612257134168 -21.1247603798381505 4.6076156181597128 26.2906403613616426 -29.6681063506719020 -9.9944908127195600 26.7331704478883481 -24.9720704448594759 -8.6440687403875049 22.4783624895156429 -23.0466127298947825 -7.1868216529936708 22.9622462114248869 -20.0456487334950637 0.9544060262967441 22.1016965118366535 -30.9168541484436012 -9.9578802197295850 22.7218028719341021 -20.4940599013246612 -3.1043683480534776 22.3837480916100873 -26.7656007481996490 -9.4624870663030940 -40.0000000000000000 -2.3377868743711305 8.3050618576517028 -40.0000000000000000 -7.8567207167593232 4.5519040426330459 -40.0000000000000000 -8.3669737406161122 -2.9172263885618990 -40.0000000000000000 -2.0631098405249189 -8.4142118516920910 -40.0000000000000000 5.5645874786205320 -6.5545455396489016 -40.0000000000000000 8.4538475296833759 1.0085529047193125 -40.0000000000000000 4.4559588353952595 7.7073159457794453 -40.0000000000000000 -0.4677685677567581 0.2487475776893501 165.0000000000000000 -8.4520743943515502 -2.0531478058678196 165.0000000000000000 -4.7484019573533125 -7.5933161183124227 165.0000000000000000 3.3096857908651591 -8.2513670106539561 165.0000000000000000 8.2343279959251294 -2.2274183487553749 165.0000000000000000 6.5267527235663900 5.4026777960826724 165.0000000000000000 -0.7923396612676762 7.6991762579159415 165.0000000000000000 -7.8582134510278951 4.1653658027006006 165.0000000000000000 -0.4530672739541060 -0.3430519769158414 5.2293847436127141 -32.0656497341298561 -12.4375681191815133 5.1077651481495128 -25.4806736349857239 -11.5631094707410291 4.8983004876374503 -19.6356053674992737 -13.5404718695172779 5.4249177184666300 -31.0414828856041360 -5.4902040832972521 5.3525000599183503 -12.5130023077087440 -13.1156612956216954 5.9342650955042497 -17.1377579506647670 -8.0475794187449790 5.0828438084934460 -19.5689841843476202 -2.3796663703379952 5.1020589270918490 -28.9021023235818362 11.2447763961275840 5.1627963025615502 -21.3631485614611343 4.7699316649312058 39.1346519377717925 -31.2946223754064903 -12.0929873421427629 39.9687602032851146 -23.0986333933928272 -13.0221512872335303 39.9673057016783204 -16.3076328123550702 -13.5579302413182052 39.1140832983089837 -29.3679993237165888 -4.9388793380603238 39.6326536286779643 -8.3938970430249533 -18.7489480277385354 39.6372742016989079 -16.5636910830728077 -7.5260354122935809 40.1883391589364791 -17.6556057239486499 -0.2279520387043655 39.7079072872845842 -29.6761612916442807 12.1012406145124736 40.3319856699250181 -13.3792359103331631 16.7239505448177113 40.1513093482680432 -4.4193405577831690 16.1354263929901052 39.5211118941323107 -18.7345197695096815 13.6291561389575211 39.8936881262481435 -23.8493355798018385 12.2391346557553806 39.9109094969594622 -25.5536069773317287 3.6815376339052772 4.9527669271549248 -25.0856929927072230 -3.1890063314645958 94.6742564225029071 29.7908798539342428 -0.6143208141822247 86.5724701218873065 29.8714394558581056 -0.1745723144750019 40.0303135034346695 -23.7083010592048353 -7.8616341916649928 39.6236955567867639 -22.6316257434614201 -2.5999773461104061 102.7797276869535352 28.7601074248622659 -0.6248723155713336 75.6693860871465489 -1.0530669198941780 -2.1915900246399955 -0.4988008740540514 1.9949059614459834 -6.6480869531520472 2.4342127093845569 -6.9712039991661454 -5.9083327335897540 -1.7596530407542015 -0.3271569727470047 3.4272340895521611 40.3071558220620716 -37.0472175065589298 -7.7328438986889676 39.9299234094200131 -35.7375638875215103 -1.4392976373541015 33.2978192963646293 -29.6898810598186245 -0.1022240758432640 39.7013904166963982 -32.1987996985011478 5.0674030171654287 24.8705889624541285 -29.1045923512932383 -0.7879618742126908 39.8417476925128824 -6.7640482953067629 -9.2764122101438549 40.4010091790902877 -11.6743302276733907 -2.3678127823672583 39.8891744810386939 -19.3996637047946408 6.5141520685989489 39.6235962896934240 -10.6627213259593727 4.1697767453553052 39.8296185837705821 -14.0909591065110504 10.3045071989876256 40.1942648127563729 -40.6105507999693174 6.5185090710973261 39.7893177758609156 -34.1476581294432009 9.6403860119500759 39.9919704568429850 -42.4461243784177498 -1.9421350197695550 47.9246978301495332 -0.7588648321930458 0.4567381981639672 40.0515195424559067 -6.4783114222444054 10.1594748850070715 10.9302606426144084 -29.9171821876555768 -0.0329271341092181 5.1999109816815299 -35.5558941660320826 -1.2910144263914392 5.0131317986666302 -28.9837496518252458 4.0834430761936709 17.4265529437831326 -29.8933210572338268 -0.3424640764550995 6.1872859916151901 -21.8150940671218976 -7.7740385579088089 5.4324152422771634 -38.4892353299303025 -6.5846235466938783 4.9554297417122957 -35.7006584125911601 5.7637709778337145 5.1286038115313604 -41.9871866873045079 0.7391216239873422 136.8092752545582016 -0.5165470711394659 1.3840647361268126 126.4077956279565029 -1.3014304195069630 -4.6236482654143884 125.2359524258172883 2.4734029007985510 5.5573102815106417 119.8339526801827759 25.2741477256744247 7.2111449275544786 111.7264476565441100 29.3518592722474310 -0.0647950029201442 68.4323516574046664 3.0854819521613090 5.3185315230646335 -21.5230538476851763 -6.0107342052455204 -3.6762334276650299 -30.0161362062287225 -4.4764980939048931 -1.5134118894566557 -15.2089369644446286 1.9021537992354145 1.4247881891437193 143.9873287984771935 6.5063403108368796 -6.2807456409615456 59.4346822738597780 -2.9770109024793361 -4.7707089375274299 145.8107535634225655 -2.7567776472125201 -8.0334374792340189 141.7842826556439775 0.8181007699239407 14.0207072462129823 55.6990549683819651 8.4926944405451437 3.3024057415520844 59.8260020781869031 -1.0640749843105852 4.2715362287200431 155.4449384226973336 -2.7868112051100007 -8.9272207619672841 141.9553624639171403 -11.0553197036935131 8.6289640015788258 155.1039153852546804 8.2230824843333767 4.9004437086998509 150.3579544953713309 5.7672894201275557 -0.9493467820785474 61.1561324651367926 9.8450080850188684 3.3496870262703586 53.4458834575131689 2.9141377715544805 8.3487309589199956 149.8725107870543809 -10.9275583592163272 8.3167759370189387 55.8946158943015945 5.4534595215053452 11.1204409054799580 148.9893345321267475 1.5617940226630151 13.7093742181476976 62.9060230931689119 5.8527949180801659 10.7347825896239186 150.3445084920132899 10.4571006742033070 4.4057570268697228 84.9545371169878507 31.9453054190667594 15.7140016311384727 152.2755778191676939 -3.6743867254479183 2.9438880582974116 59.4143493294735308 4.3429539161096811 7.6995475478619344 156.4667692236237144 2.0786027622657559 7.9456648360543731 # Surfnr Red Green Blue face_colours 31 1 0.00000000 1.00000000 0.00000000 8 0.00000000 1.00000000 0.00000000 4 0.00000000 1.00000000 0.00000000 26 0.00000000 1.00000000 0.00000000 24 0.00000000 1.00000000 0.00000000 7 0.00000000 1.00000000 0.00000000 25 0.00000000 1.00000000 0.00000000 19 0.00000000 1.00000000 0.00000000 2 0.00000000 1.00000000 0.00000000 20 0.00000000 1.00000000 0.00000000 18 0.00000000 1.00000000 0.00000000 17 0.00000000 1.00000000 0.00000000 3 0.00000000 1.00000000 0.00000000 9 0.00000000 1.00000000 0.00000000 10 0.00000000 1.00000000 0.00000000 45 0.00000000 1.00000000 0.00000000 33 0.00000000 1.00000000 0.00000000 42 0.00000000 1.00000000 0.00000000 34 0.00000000 1.00000000 0.00000000 41 0.00000000 1.00000000 0.00000000 8 0.00000000 1.00000000 0.00000000 4 0.00000000 1.00000000 0.00000000 24 0.00000000 1.00000000 0.00000000 7 0.00000000 1.00000000 0.00000000 19 0.00000000 1.00000000 0.00000000 20 0.00000000 1.00000000 0.00000000 3 0.00000000 1.00000000 0.00000000 33 0.00000000 1.00000000 0.00000000 7 0.00000000 1.00000000 0.00000000 33 0.00000000 1.00000000 0.00000000 7 0.00000000 1.00000000 0.00000000 netgen-6.2.1804/python/csg.py0000644000175000017500000000216413272137567014457 0ustar kurtkurtfrom netgen.libngpy._csg import * from netgen.libngpy._meshing import MeshingParameters from netgen.libngpy._meshing import Pnt from netgen.libngpy._meshing import Vec from netgen.libngpy._meshing import Trafo try: import libngpy.csgvis as csgvis from libngpy.csgvis import MouseMove CSGeometry.VS = csgvis.VS SetBackGroundColor = csgvis.SetBackGroundColor del csgvis def VS (obj): return obj.VS() except: pass def csg_meshing_func (geom, **args): if "mp" in args: return GenerateMesh (geom, args["mp"]) else: return GenerateMesh (geom, MeshingParameters (**args)) # return GenerateMesh (geom, MeshingParameters (**args)) CSGeometry.GenerateMesh = csg_meshing_func unit_cube = CSGeometry() p1 = Plane(Pnt(0,0,0),Vec(-1,0,0)).bc("back") p2 = Plane(Pnt(1,1,1),Vec(1,0,0)).bc("front") p3 = Plane(Pnt(0,0,0),Vec(0,-1,0)).bc("left") p4 = Plane(Pnt(1,1,1),Vec(0,1,0)).bc("right") p5 = Plane(Pnt(0,0,0),Vec(0,0,-1)).bc("bottom") p6 = Plane(Pnt(1,1,1),Vec(0,0,1)).bc("top") unit_cube.Add (p1*p2*p3*p4*p5*p6, col=(0,0,1)) # unit_cube.Add (OrthoBrick(Pnt(0,0,0), Pnt(1,1,1))) netgen-6.2.1804/python/shaft.vol.gz0000644000175000017500000016407513272137567015611 0ustar kurtkurt]Tshaft.volKSYsTͥuouj 2#NWe>\x8ۿo?O/X|}?_?>/ ߱{d?BM폏|*f(-E*FiiU~͍2Ƕtlʋ)k*gVS=52#:ԚG.#N\? _8-Pٌ:۹꣉(sǣ5/M9?lGk>yl:7&A}Hʬ2Ȥ2JȤ ~ycyT4*_ϛ@>]){j- ^g}4,rY]p4r`_\te[x4,tet0wBMMٳ94E+>SˇH K;u^i[8R~|$?{2;LP>[%zj skʦjF ^aeZϭ \yeBecZ̜RZ]b|6{!R'? 6V~? 7G~M^lp@̫}nQMۛ+L5) ~L$t6g)5h>*G._u*gaۺ3ew~ 7&#mMM9ao-^vG?7;҉nכ`;]0|^c>.sDP>%jo%;bܚB\έ[/ZBhXaͭߦ3"! 3,*MrML<4ɲL6$k"gS-y!NH-gZ"O/K~W֩yGr<ڶ9Gӧhϖә2Q̊yh%Hӗk"LtJl43"?6ҡꦾM|me_ȉI_<ܮ{^4ؼ_Al jn.+饢΋x7IC_E.zh&멻&˩-af=e\N V1)rE8mÚNtHC)D4jc[B8+@uj4ӫrsIs>MKhΧ)Li ]Ks>MffC6B=}0xiIe[LTA\xp&Q\ 1=O|g>[:wA\>!MkT(4ɽ҉rmbzn&CfiZ)Ҵ IG+*FTV ,l8ɔ 1.ٔIp;'M0LMEuCSD +eY~J}~_ _ۛ2ukS?6~qi/A}$&+ SL v! m6lKQږimEk[闶mSV;ywٳTPjjԽ=g|~gEmZ?O'-MO:(qj_"NrS f\%c'7MfQnk=\:3:y9/J Fܿo3{'_C=qxϢp};XS7G1lJڧ3)iȲ|F[lZmޞA<ƷE^xF\E1'[qfm=>INw>zi]8_!%swϦ¼߂md+wn/6hs|n|fn˕*#\K4zqym>G3ڟ̷z}uܞYش\cNۮ{헅p>,FxI֨U'T~ЊO Ҍ> 3:u=(>y Ǧz~G[ 8J1!'eb}R.7fb -6VjX1%VmۥqÌKO!uq)&7^8GªEs3sfY:]ӹYch[P%k=7͸%qlfyi 3q3輤W$:L|D"QWy&2GU4nOn.L/^Cct̪=U>9' hs{eZ҉{-24zfMh-^]+]yw I q$tfgϭ޼tѸѼ$}sk;g~dXuҡ.~]3Of=SLyi»N;.lnmoI˼;ٸ)OIOh`/g[z{ lhn.ssIE˯a~ Zٿ(uGi~ 51@2?-+ӌ4C7˾zgw.Smleu0|1mS[潑m=8&U]u~ވ˦a4滽`w6,>ke\􏚇ve]guc LG-'Ͷ<:{vs.+΄WR˝j3E̹c+LFf^2%plwz;Ns}+î.]5{xٹXiu^Vww5r38R~7|_Mzr]A:e.ۇ nMCVツ?IX7d/7JRZi~xVԎϝʵ=+ej`MCFfqM7VEM1[@jW7<$\Kv7y^eeC< `D0\E.3xwZ vkE']#Jy ku%n'zQ#X.hwA,84q>El{$[pĤo7=>mu3b+`o\sѷ߈־/k_NGVuy#jkRMW$ZܮG_vcQzYZ65S3WQޅ۹\nK_x3^L{Suى'fJK1ޝAىQo9Ƹ\S.j¸WSm$P7 ;9F4=Z4Lt״h~C+YYij4[>b@nYx^@.J[$ &0yjlXvL||,|$^6.S|?;yrh漞g'dL'a=~`{ Ǣ^߀,M{ӣ5+o 7t.;*#y#gPr!B!y5=uؖdlA>lAm7[0rK 6&|%z} 5Q5o\~m)S{ٙd<,pNlv7RʦЛ2yw|'7gηP<6ix·t;c2wvʝxfN4;ij0͌ڷN{Am'Ov6/ڵhRs>{R05a1s xzaղaD͊x#ejWi 'ol9t}@#xjm~C&_Ezyܜ~}gYA2wKN]Y2 S9=)I%e3jKSWyTF=dn1"ad=f:P!zC~ff~^?DV37]_F =VUKI.Dnu6%b^|=z0|^z 3O.+q^cwyY<(}~+o>i\ZXM<|Go( 鎎ԧԋ *ۛ)<0ʷ+~3dJ߉1-\ "ryP⵫[׮2ֶ냦o單]elv[v1\ubr*]h. SR]e.냨o֮]e{+y=HV楥 [yV۴Wuyڦ5W-ݼlwy 7]ᢺ>Vn?v}MWh>MWsAѷʲtmwUpJ~}[eWP=t5/qޘWP׻VYt [eWP݃oe^Am,wUy=VYv[%+H0U¼ڸ<7 eV˪!\o(|9Symcs-\^:ƼBWq1<%85Wi=ռ%"6r|sp3|L;~L"cxuiy"ppvnc?y ڡ׹ҳ8Ѓ? <ѶNWґ(K k˴~j/WP¶υ]@2](oEX._\l$wtj.[lRv~a:Qd}*Up]'굫r@AvUh<خ]&l>+o\sWAԷ:6>:/6>HVYƻjx fu^ZM],PbJ҂21GZVGI󴧬QJg2x̧Rz84d:O6 3yviD->Vikr*m^m wUڼPd}yq{Pt[KAӷJV ɴDɾدZW7."gQAE{T*E(ZT*E(*JmfZwNjyV4S.gИ̓llzk.7r O6/؟~ۅmO6ww.nZ>Ym:k^Bޝף Qtu=Jn=yJ 5NjrC:디]U,*&crڬhEi`辚B16|>Udj TE4˃7wUypmwUyiq{[u'Q֖rJ~}@EJ݃ohw쭺kAҷjלF7U Ҹ<@B[eSe5\ܡyu =U5\>n(Ç9kMz\q=qWE x[u6:Yz[u6:Yc{[u6:Ycy@#.Ź4ֻQߪ{F'm^$}F'k\)UOmK)AQ}S+恪|16oʃy=z@My06o~YFA^)`^Zm 76U4:´1.wTҿ:7Lol ~k|w~2Gmd݃6Cy` GgڈzyPMLG ?g5t:Ȭ1y6V.z^eћ:Ӻ`U,LWN ׬FyJ`jCfU`R3x[ oll*ƻ\¼5ې=Pyʋ$jhoVNk}`jD9X ~^ /Ԏ^LLzl.{W>`l[z fk5ޚ͸Xd{2*曅RܬJf vNyx^O61uxxyƨwUzlw,كrXm+$Ao\J17|{: m>\q.eU"!7Yr^oNaĵ+(z圫+Lb]׽o7SVf!D>Xu5dD䫋!,g"ef|"Fbr;#7])? wp@(ռD}yiq{`o8/6Ijq^Amw⼴X}yi<"㴴WuyC9.jpuƛDy[zo`xkM7]!](sMWEZsAk7]Av Z/kNc{Ќeyi9D*z-]f2Com|O6rR-֝W&˺(u(I T&w0#2#A]kP>h됔!=scoH6{d(oͱ`Ǽ[1aXņoTըl˳x8}M< }.7AYcn,kcY n/Wqx=Ggvƅȯ3(0[|Zvw+\l~h>{Q=c^֛Utʔqi[%H3C XPPM~lWp~BN߇or!u&E,~`V>1cF֜T;Q>@=ʜʴ Jʝמgrƭ7L @23 w]Nc*dkPqU tM#%n[َ㧁/~5F6,ͧۺۙ^15buð@Pmm1zd! 㚏v/a[Y.]΋۶chߨǻuф;q[lc}\7!|41pGQDm4Uﰈ$~ 4)ET䷝Q;>-3AS_DO蓾f)u)y@m;] 8Uk++ *:, Za$$% t'zPk{ XcǾs_[3U,oYt;NF|o:2vv43l2PF%Կ9M#LԤmyJ]-aX1>\o8|]0oՋjcI{8X[%׍Ztd D}Hg l\2@!XݫfQS@[45^,jB&_5C[07wFCF.e,_8uJmA$;C#IzP2 8 g};iE3۷rXŰD 7| @$wX_^Nc{,@Z ژzZ1 }5ge>Bfg+6a'4(X[67-*RZ\D$v*)?3,gߚUj.?i"۩1.FE3JqXq%d:. %T ? 8i^ pkPhv+>_}bZ1kK͊ 8)?F;% ' 3emSy}-֤0!{z:۸3(Sn7osPf \/Gne\|RY7 hXuyE_r왙y|A 7Wp,0t+LFBׂaBJx,)F~szqI gɏ1, C]V{lJyXId(Ijallj}2ݾln9fq8@4?X& Ah&oB/@o5?5ҿJOn 0Ww4e`OǷYƾ|J:tDQCwYm9LEՂߢ*-Vlo0Y{omlfuf30A|YUM!j1w+U5Y/WJ&e+8WElv@ݚau]/FxmgGP"n)WYTfȫݒV.8{Vs{Unq;4(:o%u@8Y}*`酽!mH 24@A]P4:f8# :wta>)n% S?L#6ésc'7n!mbWVT˝vA}{:{ 0<սk݆Ki9w6Qʮru߻:9ՅشwEcwټVۨ0؉5o鬪,WE:2(+غlS@]XgeATa{aةBUHPEE:1,;eZA.їUuܭY:ng[g $R^Ӷӷlp(l`vף4IJ$˸>^բr0E=Y!cݾ1iᴏ\NK.HE`'[fCݏjk=Ujmư-{m M~lh:߁xנ;5I eofY]mʂ~ێ6-:,@fGuvxl68T7kb-|ɂkhM9]Vk$|֌-[{(pߧ"q;nR.*@p<y=;IoQs ^xicK72zPS>(]l ~VWpͷnlg^/x5wiPNm:QZ?ozR&I,۸kvhyk5jjҌD[2,U'k Z4Ýln^$/[+x4:7::;{N8;amPkG'dk\o4:hX_V47"I,#ˆ~Hažf|\4>n5u m{\ZV-jn;FtdD ͦWȹ;:wwqZ=A tvyҐy8SG S#'ª՝XgG..[!_k`ݳݢw m8vV#'RHd!.]U`wy ACtfWt`gXn.彀o524q)U3es=zA?((:S8}ﴕ#}vc0ԼKZG[*X PI $cqcɧ8BdK&r3H_u~?+@*Hg\ۃ2(S@#^ICsޖhw c=u"8 LJh@)_4(Q.uWb{'7uE0=`x!ZV5z9%,ð f!G]4w^OG[((=.pk0sO[2g곷i|1.Ss=9-dX2;jɚjVuϓp'۴Xv1n~Rz<䵇Z~?ؤq u]-ZtG{LOpqo<0׺Zs~gal9qlw ܛ|Ys=#FA Qf<'kGR=ܰ=Cbn )]?o P_Z~s3^ZΠ[dt;InDPhlJstN;W0zi4v^q~;Z0ka{;HIdnS[s7/䦐p,}qRg%sm1ZYH/#;<)nĥhqEwhZafPD ڿJZAAn3:y3ꆽt'p>&܀䒺]g,S aޱ5if%lJ{1\ u@սS=barfssf*̙ϋj8z /h!lшhC0`jG_gPfrW0eu@+ b;(ŪΤ>D0dCH.wgXCh`1v䔊^%g1mdbKd7Ś /!XtI=Ihap|IVhjլc$d8X(X.;uczd7/{ۈ k:DyU8p".{ĩV1zwQ8-tcYI`  rtpȴA9ydW@V,׃t `A!xg!tr 4tq2=[\aFlKOu8Fm[m,N0U_tOU^ BcY]&G3P<3ws=w!s lDh[] ~;Ism 9Ũ0g d" t4{%'exHMj^[4 aZ͋ fҶ8^Ib?w 1G@b߃{9!*C7H5\[Wrq4DQM5A `K{Las w|rZ.3/{[<ӳi'kγ ͿΙ˓ߵZEo D7 Y4:Ewu5M9f/pJ~R:Pטq={[JG ӭgϮ=/M*ݕЀ1w渚7vK Yk$C\6 ctFYaG%bxPMP(`e n9P\/m}fİ9U6BvЭ澙UAh'NJ{-գ S;L=9Emͫ:Xe\ =9iX$K`cuC@L :&^5;"aׇ݃q򑡨0tO$+ke#ޓ42LU5뙛MWpbO7fHUVyX_o/i]-=%N|f;^Ur0MO=UT,xc\)XF UoCmS)ՂӰ~aj;|RI;Z9-Y$/O,j b ǭg&uI]cl֢FEX f@VZe3O<GNZ413_5ꭣqӱߴ/(j|0~ ;HM Cup+Us&mBJоf={ mzN n 1 KkqhdHJT*0՛;\=)(0umm-b:C<jse+ce\6q&̭C#`7ű-}MKrg7lS)FP|:}kﻔd`ǃF8Lj۪+<.g*?J5J4r+Ki`Je_k_ˊ3˿ Yd+ˑw_]=32C'c{Cgᘻ<䈭.iP'To`%.[Xr]Dڭ:ыשhWŎ^Y4ܡ NrV\&q'8fC^Gv0:(bKk=Gp(ds|cȩ `V7Y5׬hՄ]P2\`ѸgB,P8FC<8?l!ѐÍYT Ѹo{a S(QBGBg s;;Ӭm{GW>0{).M&vmo=Z{C=JI!ۢ)1(tᓝ {ػ Z| +}M#`ŀR)#CÒЃS QKp QuC(Uo#o9SwRN=7>5.|Ew 7؈%X# -:jAjRi蜆t*bFh ڝg»Ez Abδ/eF:z푘b{8c|a@Lb{\f!x$x̪z% 48HQqVj[Q&gNڒha=>_{IIvPkL+]ÎL/Vr{r+Q3O Zr80B IlJ2=H B4$xin& K >O6x*%Gq2Ӏ8+9R|,{Q;#Z倩s@CFF ՑwSK8ݓMK޶٭v3zMsڼ8x7ݼ,B]fdݷd\HI{WMc0,ݍ_S ܩ5tBX6}cmߵOyOb;sϊ~CaFu;_v|Ǩ8rgq|z Cl*ZShj'MZ7bvJcoT^fE1P%'Da$n{ }8X=Dle#US =ʗ[͋X~C9(-0eaaGaJ Um!ոE&_M{ pCaӲ<-s8=^I`S ;*H jq/󞧸x;2f(!NQK!9D1}Ղd]S~uSjد6H4@T0c>L=YC]d:}zNH\8WIFubw7ZrY4gJ޷j7xxY:(8d Ǭ~/]BVN:kf-~RMRK 褡O{Sx٨DdZ*DnăC!X3W(.yj;LʷS1:@2.0F \ݝ{[֜GmH2=n:pGx1'!js8+*BYtVKu,tLWDг#}YӶ)|>(Ė b]e>2^* puaC9\?G7uyѰ/^%flQT@VVX7Ğ!{ZBPY =vl`u=Ћ] _7(}]eݼT5­r=jSW8{(b5Չ7WYF!Y3лD5>o{j\"-9#TP}10YmxJWO5ZؙˆGjZ)UFVWzoiDq,e)~KiNĹU#[ډ-=,cesEɴc>C pGz7?v:[xL͋#>WQM-x\l/Yh@+Z/szBVdr̻ECTnxBHOD=MsI3z})ʃ}y8B/${#z :D uڅyFh^y,FQ['+uGPS eCKsssOD,5!:$9%F9.iyg]jҿmыd4 Úm>ߴaap |RDER/p^mrua^nͭ;ʳcX_gð=$!; O_MMzJ؝qxɶ C1eLOb>hԳSGm=4G.=ħKkJ<9/7t#ypNc(D=]ΨPZ]1Epx[+ =+SwP\"Qlc ,5"5y@x^"kvĿ3:Tϊm4Y:*9,ZS7! vL8&}n 8l:$KBzH!w[7l QyRl;o;G<-kj(a>橁Ѱ<&vE^Y;gIׇ n3=e t#iɲx0:#ñ߱"F44e]۵92COiFVz9q B4m& [bG9hMnBhi {L $wvٞgRrc9ė{\a>DS7n?wGΧ$tHb_{9gYn+<۳vSywzPRمw+<!pvsxZ#`mllɟO䏅zѲq8D 8y *T?dGPi =7zicrZY>Й,q\VSʮ8=uC#Z6/,;4On֥.|vj1 8h; Oͬb_L􏑥fjs"#(:H˨i WTݿ9{$ެHZj>YuJt@y )Uoؓ0C996'n2`NG9LWLe5:ɉfGKTMnuf7^9Fm Q_4Uz݊v4SPW=Y{H0yأ^ ŭܪF;hkGpG|cޭmuȵdJznnU rdոڃZM֋M{=g^bgܙQ-n=Rbǵ=F߶Vȷfb~^_[& yC't@]1yˢFYu}o6Q8ܜPVu0r.__mi)C PS)[Ӏ=9*u]2z؅QNkAv9T=yv`cTp,4ύ = L'8ꮷ!Dm$W%S!8tϨlFr GL\{ejc]/G_v@t= "a/ց#1,MX:Y{LEBː1{2W=㎎4VZs ;=?T9uUzRU='D |.tFG:+ \-c{H7'k[Tm1j̿h;UǷ.5U:|ŘQOmE}ح{&,fݸDnmkͳ[ c<½yw _޼Zh9f j_:'aʃBk_cxL '/Z͍0ڂ:?Kst#lO3~Z!iG`͹4?UlDc5e*,1}:ԕ^vK ,^zUE%;RzA|Fe/|1.)432ܸuVZ'.T[#]qG ppdaP!eĄS'^b%"':rF-'DCP Y dDR1q<`y D7WFqS?en-fE#c:R2 P媎귀tU:'ڻE{x󲃼j EHܓ#C JҥM;@EcQ_O%mpՒZT^ ɿY,jbv.N[c%Ik=5H(j s>A<Ff=*@@b`ZaE:Il< H1:KMJgLŸ=O&rp>h.Z0ֳa EJY{!ؒ9;pg9^w<0{)VWűiw/2W|3[JSJێ,9|Ng=:|H?2[~0phTy I%CwF>t赸\Y>ǻ+!ďvZ}8y\W#dǐ={ozKGivv6Gc3㱎rRK,gjJ᪮U~Sw= nvA=|/k削VTbGJa{%szΌ,Q[bӊX݇Yi_a:v(nEQ搚;b%rxqP.n E(N1Eu~x{u3/ t`}ccV?^dUSieQsYoAxz#2AW:YTbOV*Fih. uMQw !j; roe'caC/s4xީM)P| aΗHM=bNgyJ[ӓ=I13C.æy^y#0bdFs2藧ǩJ1Nq=&%*rU?gHZRF>|r$Zjks+unL^8qȃRːCz[VeϜqBX)[4}d{0g峋 >$bt'e_R,;1B*6= @aITCk2uI}re|Ɂk(G5Nshv-E@GPtN!iUmXf7f̸){!\t 0x~m. 9*Uh`G$sPt׈jun1]9>,3謦t΂;6tJ5!8˗xp.1"fǦ[WcՌe^w-Q ŢntZkMa@yz*{ޘ1h?"#U+-؃Pd2D>)c,ˈud/mH¶LW"Dw~btT0Ync߱ǻHz5-78}=-s_n8nluOUp&:yf-9P#xS5Ķ[tj&V}bݍqOs dFWYVsV:F&&a7{N}w^BR=szƤk ݛjBMkw{CYS?HhᎃA+t^Pm:[8IͻQU[zY6'::o3bڽJ/wSgi+({"R{+2Of}]Yݦa6xB8b(E>qi( -<XBFcs ׻=F|X/l qH; h!z>Gk4B]sn> gp8{ ™}{G?wn=JH:z&Ji<53HqL=@h?lւ!LRkI@;\-!H nmRHn"#{V;;"n`5.Ce J1|~{ PNt,wHA 4` g%`WOk\U@}/lBtY!QL'zYT*օ#-y_qxv;I]lInb's߳={p2R)f.4*'h8m^>Ǻ6N4^"fҩQDTu˗7XWh́,uxj=,AvR G'G v\'&N=)Y&v!7zzir$ C2֩Y4Ėpq)jy~9{l(`UZNwFm?3{kAY!Z72twPdkfq\U6ΰf&M[z^=!y1=e*tt{17_`6~B{>T(pl#poXOt'fǁ93=. ^dlcF#}\msV֕;No#k6؆RrVqGg kOm. Otp9ݠЦl8gJXnrS{hlQz=^D-fNnUPw\©1k;ҋq#yjXͬPA$r nb54T3Os=zǣ֑52a]0fP41θ "B=xw* 2xNzW!.oΛO]$a ! vMe$v4t|Mo4wNPy);>gg 藺0MAOR}S:qj>w}{|1W0L|yJw8CAk?`|ӌGѯ0`>?)5) }g }J?K_L3 8SSb ˻))\.}1~.g }J?K_L˥opЧsƷ8S~\gF _LO4) p0OBҷ 8SSM3S{Bw8SS`M|->^Kay3>RX=LO5w8SS`M|-ۻ))}&2Q~ 0{2 v 8S蝼n0+q3d/ Oi8KU"KpFpp z'mz?P8W[7M_>>~ic1NOWa85,>S:&p]?8{fi8S(ñx->(3{BeLg }JdR=LO2Z ]ۀ3>K)p;~ û(o{{߀3ێ,DNW΍/ 8yf|/FCN?ߥp~w_Oήh!Jcm^a~ESI?Qg^߭opS:S>ȥ0~?>\Z yS>ȥ~?>Z ]x۔rk)tmS:SҗRئNRB@Z ySLoJg v)m>"Ɛ]<|'l^CO{0' }b yS>(3~?>"Ƌ)OvNRBۦt}.bmۘLa8~ }k)Ob )zߔ?%@ҙP4c! 8Q8J }Me 8~>`d4 ?|1R+r%8<ΜƧ k 8"S)-BWf6_p=^(M)P~.yv(?_LK }qOpSN>2͋)B]Bz(t?RS:琺Vxq2>uƒ? ^vK_G1W ^@w)=tl]yۀ3λ) |K(pЧ+i/Џ)) .mBүx(NN?@a|3>_{zhg J 8K=F1qGc!a٪=Q1@ .yaqvdxK_>e7x44(t~[MŃPXt/v_1*fD:4_/{.mOa:Sng y0y >__B/~EL| ^() PS1%7xЧ+bK(oBOWdPX~K_Ka8 oҙB4oҙBA.}-i|`ޯ0 }?@ r(nRXO>Z i|K_Kv(>T{-<)*˽p(tv)vk%~'u@m޾RlҿA ″ms׾PiLdc|'vrv_ppzoґOTwmq Dk}.' }Twxה^(5 }ӼkJ/k)BӼB4 >C1RBaK)OTw?@P?@aRoJ/2j4T(N,40`_pDri~Ӕ7S8zBKκ(plm!6wg16@OmڀS%1Ѓ130EvW(o mjM:w8enP]^vi> ׀ }J0^Ka{ }J^Kw xЧ]) ?@ax3<Pk)LoBOk)oBO4 x0Or 'W醌Z i|^KKm }b}p;~ }b}/0 }?@ 4P+)&Ml2OBE_𒭞|U<,) X<Q-cp/҇]R(ۦ=S}8,ǀqXΛ&M/p."+3qXΜPX<8_0A/~ ]~׀ }J`~q9Sn' }P47xЧ &Py >_0A/~^ PSk(,oBO4{߀ }JH xQ#"Gĵ@_14/p4.=|;;af~!B_p§b|ppe|eiop|{14P~K_La< Km/p= Km/0 }ϥSO>Rۋ),Bs?@b i|SӗR~?>Nԋ) BmLa< ?%83>O4}7NL4?K]~۔N{jvWƴ/ xY|^(oBO` _Ca{ }J^KBOK)LgJ4P?&LS>Ao{J|UoF xfC8Lak)OP?@Z i|x-i|x-4P>|(?^Ka9  }]34PL])|(Z ySOLv N%M|Qٽq}eIŇJ:qB+P }8J^Ba: _ x 4P~%%?@PXO>W?^BoҙB+/EMLak)OPn?@S2MS:SLzLSMT9 Ru~? κE(>ck^(bTx 4P~Ũ i iQ%)P|@-<)P_La8 _qx((y i||0 }i@ >O4}MBi~j )=>ӑ5|_p-@ x|0*B15 ⯥p;~ }SN>Q?@`Tx-i|pt(%0 }Gk),B]z(JoJ/?%8RۦB Q?K])]|}} xVf||/8S>\0 } B~-4P>\0 } ?@p[z(.RN>Z ?@a|}14PLzLSt9?f L6r%0_P~5?@(y-4P>z(z iBk(t]SzۗPB+0 }RO>. i))PL;yߔ^(tv ҙ~?am9_pL~ ۛPSp㿖B5B҇gJ4PuMm 2K*ݰgXefV{ B[9H2%yykEO龴VVjjM71 EU&՘ۃ%-K[e⣘$DZC(X~eaV篑)UĶ0FL1˚R-5zlkE6g&_Kdܸ[s, z4S~|MZ ks59D+Ժ>vS-kX|]aMkY~FV*U^ȲVygKcOKnd߈*."":Mslm]74IONg([sglk,Es7Re=kJ f⯼!0Y>qR*-}4qN,kٜ5* / ~:Z0T坒UDۖ㶔PB\K}~!䐖*nMղ,P-%en_-7YiF!l2WE~y"C. ߖ^Vk٤&TUY ?KL.V~4e"[OvBQ|3lA925 dU627!%>45>|6گ!Iwm%٭E>IΡ\1֔}#;Ove+)ndf9UTʞV*dDa%uy7'Q07 |6uainu-gxkeAK>om+/EXio.[fLgMN{ֶUoYtM9Ხ2-k~ep aZc7Z΀ܰ{^MKo8q)HO$jKvr! Nd{Mnc%o^OCr,ȹz} s <) AU੝ D&^>Cv3<},Se/|xh6Jl벴gdnCnr}uMIvHDLלrJ&/T%ΔH# [Pn<7HCY3 u !Y>ITJ~£~&Wzl'U.~9SIn޸f Fh#e[n䄋$!r \bN|V O{- z*1$< ߒϒ9ɍ!')ߒeƐnU%$E4 ELjǧXd8DDSa啑>vSD7(*%W!m+CZ=>IVH7\VI Rr. -IFo6hZ1?piANhIղ86/Qz17Of '}= ' &m|58&ڪ F#y]eeD,"%"Yu,D!{|-<> ?RE 2JS,W] h&2Wl#<4ZM lMxS7q*k"w(peɍ)|m5rZFoO;Ab!MOsLMmΜOLnMVX7TnD.s LBD7a\[m.^ =< błڐ D.!ڳ"<} uP`r*˂˵=΍~h 9,΋:/?yWaQAYTf!]#d"NNs^wr,lqO5NVOB`!;9%u[%qkr"Y'sFY%ʇnDeɕ,R^WξTVFvM|ȄxfV)qE0=.}쒨Bm]T|,d¡d *n֤ )ZGC/ .];nwEA_]o+IΞ'7J\HB &ݔrڒ+2`{0Nm0öR0SurZS7"ˎ/#Bm"gAO9Xi(Ó$QIV9.rJlt#i^Pl+}͟zExr_ -2@c%LLf^c~3:#Q` ybLr0 %X\6lTv6aE"b0/'z!|I^&ۆk8IM%[}F897'7ɰmaDVŧݨP.iޭ"^=1!- 726u~"IX09R702"gyV4Mva mH[|ˊ#j}bE(-('uewU?nqvD-r|oe' v'o" ʞ-9\ؐ#hsş)(DDX"Wp^)3|"=>v~M''YŭYojq >uІ5^"c#IP*I.;Nt%=S'x^*gG\Q^y04j^fU?X3#YhQir4˺f `YH D$KHJD@B/v#'YHU9GbAiyԚuAz)>.ΣQ\!rFS,.0$ ^Rq`W+EAv]TX>^4R٩"Cp\qW%r)?vSa[R2<(U&g׽kY<־w^TgV"3 PIv*R {NMwuY:܆ʪ.@HKw2e"ɖ(w&OQLQVRKV\s7T[o\ulK\8VES`S$r4`Έ~doZ¬vSGwސ]>5XJ5T.2o(M>fߨ PYarpw4D%a}T˾L(9YEO? 7$nM?> 7U:Sav'"O!A*@Ôo+ybC7raB+޼H"M.d6n;|H2|KۋBB Yn> 7pӇ 7pӄAWT\b8f\ |Q*e8C+uE}cf`Vu~idDֵn X1Ȋ㕖c.f+x1XV5טY˄OC Tѫ#b屛0Q3E00> DU٭rE5ukLBȱxm&|iV8\"ґ GVD**a4pYR+S7a[ vj " dy~׆]sZX i%cS%tmc@%O&gH[˗8B\GI!"GU['AL`jH;NF[yD ,(Z{D~ܹPB,VҳQ* HĕFniCЭ`gSRl\97k81(>&hǧ .b@ QEv!{lv~KDz5JG 튟Ah)kgtC7"!r =x"uVEzkVD_Q @ qD4Ak!9DŽ KLL^u "=S7W#MtAh@A)c|ǯwFˈE (5@9/kIӜ MKӐfzrapUſII> lVlj#c &b=nu>;bYV]Vduٗ D-GsW|\q f":L5aWBqS^(\nȻa2s@y"4wk""ŪrueAkH1&G*Ra3jzV؝WB?jA}ςnihf|5*`9`"&U$GGlo V-V[ 9ž`2"Dw8FpxY.U_ 9+H1׏l.Y! 2&M~N5L7†\,GVjiabO0VA{rF!oB 1h wэ ΍d<dj"eƈlm'悰 KĨث%)6H܋Gk-f؆1S/f>TVλkUÂKJAtQCF)Z_\k2Ӳyn9$ a"9(5e[|"DJ%ǕvfhEU)ʩ"Ъ5CnD${agc'%Ҭƶm7BaVQeA憺EX@;ꪨnϖ}źGi, NAB(>V\OS"#ኬ~&JDt1Kc8 +IOrG%"DEňK[rcՓ#IH.GZ׈|C k,OFdh4?:4M»honl(+&' _$A"ur8*\ N!/-k\Z3i? xT}Ъ^Du~`Q旈)cv@l (Kų#T0t'2Q`J$(~jGHmܦQAv$ºN$0QHd$?>Y:O!rDFk$4,\}BJl9˜|FT.Sœ8m)]2aX~BYe͋La,ѻAf=)E٣MHZJ}#JZ{u= Zp/b݈.GVs*#XqnDBЌzP~C6F?}OSǕZqa/cwLvظ-F n_5 n?95 ڈ@(G cɪ X4Cf9y6׷tϳk>e~CoO|C|ʻK|k~ͷtk~ͷtͧo蚟ͷt?@wS77O,>ts':ۚnust FU}j_n; ~\G7UpufAէxt,ςc7Wշ,>Up0 <'>@a6 {-,d8Q  D 1K"9욱u}V'x@136$[z& F^h1W@WT7đ1Zvr;p(b1s\:~MBC4FJZ.AC#㇊LLn0$H~ Ư)25"lIJ_ZI{PC2";_oPZ5RԞy]W!/$H-M60S2\Xa}[ȥKw~M0f AMLnMU}Npc7W՚S77w3 OU}*.u3 FU Qj\L,ZWAw > N,n-gպ _8 GՈ ON7塭p G$+Eq% a| 1 y ,H8(^ߧnRЌHOHVz/wCZb7T%ETYLB%\bjfÐ7(8rѿ>Va*@$ BnVag @BIxm)pVa8 j8؍ GK["ED%"P zGOE ȁUi(B.1#|BiZfV=c;sGQ- +Dn`E.YQ~c԰C*w Lh'UHa_HD 0Fo[k)%Sb`\DM߶㙜87`r, k6-[hI]BNc,~spq[+O‹0,ϨjV"STj0dd} |r~+ivkٖg)&^pHߓ2,a+,]_`}R02p^M`!$MG :E塜G9☍fID5LhNhdH4f=؍m |r 6چ,gşeDִ^& JL`y=e'/%u KpKm=AX_UR J/f7.D24hW ezHA~OKP@13@vBː_)xG,X~4*O G@ 55jRDHW)g?X"?Ȁآʭ? Ȉ1N++t?YNY?cDڅ*pZkJbp\5,y9R)Fa#n :X|fM{UQ6HPx@'2e~=cp݉6ETye-.i)1E#7$<óA^H2i({_R@ +&Lu!؍hqY9 c_#H^Q&$HWacH|/U&đ"bRQa#km+)k=B' Ĝe=JD%,hT ~@(*;yDe`m!uxuld oɰ`4-Y,L|waa1`sn:|׬sp"!6.2sGty nxDLͶdT}Ӓ~#qNh"#O8`6.qkV$ϾY#9ҍʑ~•kdחoME[pW W*CP)zrD6DH}`.dOlẩ1@ ӁqߐKZY)DB+cJ"x7(܈_>ǂXLR¢`DD$~s~5|z <sA/D"Z5aM0C"/vj#5DgQ `v9N֑A؀Ɛ}5" $ry@_&džX! Nf4u:r*h$Hߠc}R7l6 fPW{F%QMk_\ǔY$I_d"p20'&1=E=s /F\BÓH"4R4 fHF`KgrO-#g n& jDĪ)a:O_U=gElT](yO˝$GPf!ɶquDx&{x(`]'U6ѴV55;kŧB&+k~e ݀q ;+.Ue#8 8xqOQkQITD_.x "uCL[l.QM7!H/Ԟ衸sl?2@ ΀fAWkOȕ5Q ,t'_7Mv3F; DluCYĻcI R 9Z$1MOG8c|fh0ص++(h!xn"\d^.YCأq=_0h DMkp_&. LբNQ2@ o7Ya7D x:QsQ-P})j_(mM}[͑Z#.$#LK0Q\ @""|wYG r0fnhǢ5aɷ |!Ftψ6Q=?BS!Pc$O -2FS4~8d2V"ߠj @R+y3ǯi&_KԈPN(,,Vf g$CD?a H ) [L"ZXj_qnJM:zT3/b]`gܤKv43M#jF 'nD1.|#?=GDmO>5L^R)#>FDHQWr+BKQH3NA*R[B$-жi9vVa#wDbfGuضFԏQQo**,8REB7ޖ]F1 ֞r(Pט.k)%'/|I"k- I؈KԻiTg h+mfOZBy=@ vU r&o"DN(&)Q#gd( NY$hz7r4"iXLi[LdKN3/΢Yv@G Hh0 UR ӵh o[PAEA|dMDX<%J U @=g)W3' 3?C'y+z0Uq G!FHs88 Efk dH ,a(!Vb#I/_ sL)YUC:(@#@>>@ɋmv}(do>T?":|0* qِ/pnEyށ-ey,'QV$*[ W2"\3>^"ymw 5~T%#ѭ/R~qPIݔҧd,# r~X)'-;R5@M҅ɺ/׻% ֘TЩ6"K m~f &k@YĆ>VDTwՌ. M#ݬTD(bzZD"t\jF:O0J|}=i+bמ]7&fpl܀fTGaf-Y;s IEzf||Ghqݺ[3d@vU$9ۂ-u) ?B%n扖hW7~Lt5=<;3MnaL'ǺO1;dk)Q|<n+r@Ȭ%ӄ^Ȋxޢ = JR&|u]zQWT2J 3,25/Ff#EmŭKx,a.W$>=r !fi Y +X7GZ1b^+iawzC@ď#=5k#‡d?J c ~Rt=#l0ky@Q> /#2?oafuB";fuhnFgܨ*CdW4ZX@/_XZ,C6H[dF[5~ $ֆ0c[ӬJ_s!QD*>7Dؑ䶑%&} FNo"E}D}}0Uym yI 6F|!^_G;gžs!7D`]AuY 䵰 )WKdj;QBaU71c[GI%R"LuDG|1M.}\p8&V*Jt6::9%0օL@DYi.J\H\e {qjܚKpDE i.v\+1#Ty Zdަ@VQ?R 6/"{ B"`/h1u)"PTƳn.T+RP=1SX's ~HPBptP=6k^a&CUb/hLf 3 ӬcӳuDGuII DŽn8ĕPsCA+|zDMw@WmTl%ȁ38Q*,AnEKnY7򕉬kjJ6xI;9=n W6'" Lt_BLC`!ʂ, hCD-J*א)Zɻ! ܏ƾi\1"m-<1z1b _8N`R0.PinM/3gیZ*h;&!C/۬CFQ[T๜>)ld ^ vB]k HrQO3yw" beMK [g-[CIl!p# 8D!ە>Pn h{! #LDn6ԫ^{ AnTvД(oi\L'Ex ? :i7M .Q8Lvo=t#s ]YX|3Ei$a'D rn߽J,zS,Y6\A/ LH^O!GAj N28ͫMRY\ E%N~i1nH_ZhA)=s%,F))#8D+ p0f†Gzq6;4pa2Mn)@懁X %4 S X"41"c5+I=aNkӒ bF- ޔî-D˟mM5y".)[p!IE``!rnn`nD3@6N 0mH6rYk^5$wmS+dYcn2BM`^0R:/T+yQ"Im('~]63|n0 `QzwC BrG9RUqT% U֢ȾA"E+xSv&J2Z7I$B+B[o*Tmc`4ʿ{'(rR *#o ̒]I7 G9K@C.w)#kr7g ̅jԆSfT&ȬErQe/!}5EzkD$J:lՊW :((7F^9ݨm:+ZbՓ{Wb͐NFKOH& &LR|Zb.m$cVs#d}Sл?Qnu$Nfn/j#TX5nCUvUnwga2 7M+jVy ïֱR˜2$EeS9aQw @àdDdY"VQLJD/P_b/62Ou9JBTn59YDޥq3 v L* D6C-*K!. Q$,.햕AV|*"mFYE1Ĺ:AF'J.*[@=M&OЍLMa18,1Z)Ʀ8;C+jxy1M3LI§ݠ$WyGnYv" O#V8n:y(Y:0)A=Ok5@h`W٠QwhB.hA=yq-bP&w0A] W(>nF[F?>+lѭ0W¯a̭P Ff5KD᎖ӌ]^1Hĕ&½6<c4n8*Y{X(D/{$d _jAׂE֨@+iŰ}n0B]bAC@Nv ApHNTV|A~a `\w>]PĕD Sc]⠍`j-iVyX.NDZda54Dv g.\ Avfc@q)7Z$ 2knƍA PKJ܍D`e+4?AgbgK>k~W1~7kF"gCX=BߞyR Z8'!*쨴ŷ<'`c_(RYٚkP,F6ٺ<_'4C!`Ϭ:2jS<)tĈҵ;r"1aǦT Z`ʤz |D$H»[lP GSDZDu#6i ӄp ^kD3JÐ(eCn<mF>.E#9++ (]HUn@j`.Y)xED^-8k8aJ X'R n x$ȹ.A 2>XTq/)Z ԫKkBK_͒Ii0(VXoFKIfE^\vxMX_4̺V?ud D.ϪT)u0B-\_baYF6S߆lRסasM 6-h<TH|T)Q~7+WRCtrt+7"JDVqJQrMM^pz7r(ŧgF,_ & M,eFnHRY SގaGFɻDp5Xz[#+$4nWIsMTXo!<-౲j S\G2~ˉ&]!ѪQ;K$fəd뷾TV1*ջeD]e7"DuKlG@5v AfIj.K#Ns+ښH&(pm y֋B]&EkH G17jlYP1RdJ{"Zv@Jp>`Ұ3qD'0)RFIDnR */؉0_a k%-iJװmOS:DȌkZz!1"ckh@Wi m\nܕ$catCt掋zmp9c y~ɔVT3VU21U7ة\)"$P[VmU6P[kѸbԌ<݂OO{xU8d%@L#(~t R ",}TzT#m]筡=DnTG1D0@%ldb2xd*`sX͖0g6+H8C7) zzq-a̤:P1D17S^؆8sJ.w#E;j9nj+N+[XT8ֲQ5{pHbWŇG*dbG'n /N"$c˾bņq#_ 3-闘q .& G\y>iuaJY%`~ @6T'ƾ6ܰ! $+#\tu.RmRu4p83Obȯl]3X!F 4R#ې0ҀYv^*!g Uf9#x*ryQ W35 .cfQ"~F['R<QI *&n ,Q!5IMdD )SV Eox/1w^명c-%ѥv!?C,ز"6rNSdA]IJN:lԏ!TA F4A}w-`8UYkq *#CTUFbaC!&`c7'pSIʹ݀;*Nb2M#(n\akvIvoBE-a\y9(4j‰Q׼kԢ[%pT 뇣 `h &whi`'x77>Pb 0(s4NMj_IJ1^VH>&-s>@H;ǥYW$ׯlej\9j|Aŏ&^Y@H+; @Np0f7=FM+%kYQC-ѰC-~4BvTf1r>$Qd/M2íitWB)?)D"zgaɢ͈'\ Nw@ug§SJd&xSqS`)^̲uQG*˱뱓*b/Gq֪EN+H=VNnDc6g0SbDH r(A[`QT6t9U+ijN[I} 2ݤ#t^L1f|S}wG0Xz( 3` Mi뮖Q3ꀰro!9u, EcwVuX_C)yE@V?!m7 gy+jJ+7Hq60 d iQyU i$GL7,,6U\k56p*'%.FojJ;h!yQk>,z7@Dt\k%0sa'nCP\ɻmG] ſМ(fݐ_4 1a!6K3eVn(%Qx4 /1Tc0HIO6}^͚DͲsm 8cj-tvp@ 5F\uwm3Q#bz74 d"To*+}"ɔ2`- V;I>(E8:Q u:pda@,lPKØbF^eH /b4,}k4_ͪi00iNQ2ԜѹYj'2x{mZ#bj%CEo޿ `+`!- {-rG UaTY6Sf*t"|0 qXY։JdV ˱"dkU7e:j~o5zRx :zYpB-)=cm SLmvH"*.glFMZB}uYӨUO= Ls ӒdC;SZQX)l679V/PZ-`%l+) %o ` zS7a/^)p@u ;FJb7SXjyi+ jxH4Px%.8f70]Y#Q pDŽBi mEH(؍J //5u-jN޶͓lo#n@\D㇡C%ov` ~= HD2U:9h:^M"I XfQ@  sRkЦ-|SnIR!̣_`')K hH τXu◭O dP0m#-EXZi.D1\Iz$u/&4iԪlnH}?%JY42Y~Q'M˼# ph?X7@\O6E>VkdgI(xv-D8&z*\‹;^zu LTFzΨ말P֬Ӽǫ\uDp: s0Ȩ"t/ObR9w`.6aKlTҟ8jGO_J_ )]@.ڽ[TySF݈|B*gԔ8Д .-7{/pEmP tX5dQ ec- s)/p{"$w5S`i,FQ;yd#lY_) @vMQӢ+K`$DezZ*`{!oMYB=Yk$Clv'nSzQ4܉& h^gwS5$L>1R.q'QQ/-em&4 k<k )pMpItkc7NxRRr3J pN"9!38 gMChм JXE< %ȬcT&hߪ8ea&զN4V$m෦;: rfZ"S\Ÿq[qπLiZKK%6? |1]-w90aQH ׺h$0&0;/Fg_[E.6y*בŧr%iVnMhp*+8VS@\ຠZSj7!:<^c^ShECa=$?ԻlyTc&aeB<4xqjgX@ BV8ƌ&-:Q>#0vq U>I(o#237!yrY_ CD#=?]ْDbn I )`yT +K?ǖ 13M&.Yq h҅^SLfِĸ3p 8l k~Z'&=@=mĢ+-j 4|W҈wkZ4c}@vF;z\i{f& 6 7'eI߬ń*.Ta(e̜=*)aN[!cD/#_b򀪈qL=YD8FQ:8&[ĎUǾXQ yUc T@P JJoJ-;V)9?>bJn. 2~Ufp]%.~:) ?x7VE@b놔i8ɋ+GE0vc&_C U7Gfx5e~%ȐT٨I>744E}~%rC:P JAmY,)D5Qj(ͶLejq4FQCq~R)a7$OMHGz(quAX[u@\;4g8i\|QmUSNTa! \?yBd104&h6iޓ0RLQOqtI B֝AG6-Z:JWNOot Bͤ(ܰ krFh 1uDBw{f~;&vS8D?ٙQ;rE>_v1)nXEU\\0Q;qTwqs4r\4#rA^, Aĩ@]EpԆ\V#@P}KXCD2ٶhlTeRײ ZBr-V΍vw(UtPaIe YK48A"JQl..@h8 @g@體}aІ~fr rKZbUiu-LuQ]1mk8SPdQwVpaX p-8Q^{LIPƢV :#Dt%% 8fԹd1& g M%(\a5 q h)(*DґCeIX5yd@L\P"Ϯ*.ldէ}RPU1zqU `)ڼiن.oRt^dB[BF#eĉn@p恜Q˜gn|0u9I++*{7iDȢzګHTt"̲GPӐ&ZikL#lq VQ[( 68QeJ1ZӰN+iqS3&2)%ڏXi/r/ +%>Q)OY^A&2V-TF}1qZ>Ϊ9b$S3wݳq#a6ΐc2h# !-ei{0ՂaXd g00\R$gWDFӚ!dS&w*F1.)ݠF6mլHEq̟dEk dnb \`4ܛ"Dʪ>Qo>&%rbv;!IbŲRDWяfS=>I#\H+RPk]WZRH^=ڙ8 0J{ \PJY4|b/d3;*ϴ]4ҒXd40&I腬UqOZ?/oI_oG7C<?߷o>}*|~>o~zos~7M\ߟ^7g]z/?ۿ@(?~1 }:vT-#VZԜY+?ݟ;Dۿ}?BbJ}oo1؏鷝3ُ$qN_nl '4O}g;D~a-mX=m+brŗ2cg، l7zl;M?ϰ@_c_/ߺǾ~)De~ޑ~/~""}K2_d~k~{_>Vnetgen-6.2.1804/python/gui.py0000644000175000017500000000077413272137567014474 0ustar kurtkurtimport netgen def StartGUI(): from tkinter import Tk global win win = Tk() win.tk.eval('lappend ::auto_path ' + netgen._netgen_lib_dir) win.tk.eval('lappend ::auto_path ' + netgen._netgen_bin_dir) # load with absolute path to avoid issues on MacOS win.tk.eval('load "'+netgen._netgen_lib_dir.replace('\\','/')+'/libgui[info sharedlibextension]" gui') win.tk.eval( netgen.libngpy._meshing._ngscript) if not netgen.libngpy._meshing._netgen_executable_started: StartGUI() netgen-6.2.1804/python/NgOCC.py0000644000175000017500000000047613272137567014600 0ustar kurtkurtfrom netgen.libngpy._NgOCC import * from netgen.libngpy._meshing import MeshingParameters def NgOCC_meshing_func (geom, **args): if "mp" in args: return GenerateMesh (geom, args["mp"]) else: return GenerateMesh (geom, MeshingParameters (**args)) OCCGeometry.GenerateMesh = NgOCC_meshing_func netgen-6.2.1804/python/geom2d.py0000644000175000017500000000354513272137567015064 0ustar kurtkurtfrom netgen.libngpy._geom2d import * from netgen.libngpy._meshing import * tmp_generate_mesh = SplineGeometry.GenerateMesh def geom2d_meshing_func (geom, **args): if "mp" in args: return tmp_generate_mesh (geom, args["mp"]) else: return tmp_generate_mesh (geom, MeshingParameters (**args)) SplineGeometry.GenerateMesh = geom2d_meshing_func unit_square = SplineGeometry() pnts = [ (0,0), (1,0), (1,1), (0,1) ] lines = [ (0,1,1,"bottom"), (1,2,2,"right"), (2,3,3,"top"), (3,0,4,"left") ] pnums = [unit_square.AppendPoint(*p) for p in pnts] for l1,l2,bc,bcname in lines: unit_square.Append( ["line", pnums[l1], pnums[l2]], bc=bcname) def MakeRectangle (geo, p1, p2, bc=None, bcs=None, **args): p1x, p1y = p1 p2x, p2y = p2 p1x,p2x = min(p1x,p2x), max(p1x, p2x) p1y,p2y = min(p1y,p2y), max(p1y, p2y) if not bcs: bcs=4*[bc] pts = [geo.AppendPoint(*p) for p in [(p1x,p1y), (p2x, p1y), (p2x, p2y), (p1x, p2y)]] for p1,p2,bc in [(0,1,bcs[0]), (1, 2, bcs[1]), (2, 3, bcs[2]), (3, 0, bcs[3])]: geo.Append( ["line", pts[p1], pts[p2]], bc=bc, **args) def MakeCircle (geo, c, r, **args): cx,cy = c pts = [geo.AppendPoint(*p) for p in [(cx,cy-r), (cx+r,cy-r), (cx+r,cy), (cx+r,cy+r), \ (cx,cy+r), (cx-r,cy+r), (cx-r,cy), (cx-r,cy-r)]] for p1,p2,p3 in [(0,1,2), (2,3,4), (4, 5, 6), (6, 7, 0)]: geo.Append( ["spline3", pts[p1], pts[p2], pts[p3]], **args) SplineGeometry.AddCircle = lambda geo, c, r, **args : MakeCircle(geo, c, r, **args) SplineGeometry.AddRectangle = lambda geo, p1, p2, **args : MakeRectangle(geo, p1, p2, **args) SplineGeometry.AddSegment = lambda *args, **kwargs : SplineGeometry.Append(*args, **kwargs) SplineGeometry.AddPoint = lambda *args, **kwargs : SplineGeometry.AppendPoint(*args, **kwargs) __all__ = ['SplineGeometry', 'unit_square'] netgen-6.2.1804/python/init_geom2d.py0000644000175000017500000000447713272137567016114 0ustar kurtkurttry: # Linux from libgeom2d.geom2d import * except: # Windows from nglib.geom2d import * import matplotlib.pyplot as plt ############################################################################ def plotgeom(self): plt.close() coords = self.PlotData() for i in range(0,len(coords[2])): plt.plot(coords[2][i],coords[3][i],color='b') plt.axis('equal') plt.xlim(coords[0]) plt.ylim(coords[1]) plt.show(block=False) SplineGeometry.Plot = plotgeom del plotgeom ############################################################################ def plotpointindex(self,show = True): try: self._txt except: self._txt = list() if show: if len(self._txt) == 0: pi = self.PointData() for i in range(0,len(pi[0])): self._txt.append(plt.text(pi[0][i],pi[1][i],str(pi[2][i]))) self._txt.append(plt.plot(pi[0][i],pi[1][i],'ro')) else: pass else: for i in range(0,len(self._txt)): try: self._txt[i].remove() except: self._txt[i][0].remove() self._txt.clear() #plt.draw() plt.show(block=False) SplineGeometry.ShowPoints = plotpointindex del plotpointindex ############################################################################ def plotdomainindex(self, show = True): try: self._dom except: self._dom = list() if show: if len(self._dom) == 0: segdata = self.SegmentData() for i in range(0,len(segdata[0])): if segdata[0][i][2]: horr = 'right' horl = 'left' else: horr = 'left' horl = 'right' if segdata[0][i][3]: vertr = 'top' vertl = 'bottom' else: vertr = 'bottom' vertl = 'top' self._dom.append(plt.text(segdata[0][i][0],segdata[0][i][1],str(segdata[2][i]),horizontalalignment=horl,verticalalignment=vertl)) self._dom.append(plt.text(segdata[1][i][0],segdata[1][i][1],str(segdata[3][i]),horizontalalignment=horr,verticalalignment=vertr)) else: pass else: for i in range(0,len(self._dom)): self._dom[i].remove() self._dom.clear() #plt.draw() plt.show(block=False) SplineGeometry.ShowDomains = plotdomainindex del plotdomainindex ############################################################################ def Line(point_index1,point_index2): return ["line",point_index1,point_index2] def Spline3(point_index1,point_index2,point_index3): return ["spline3",point_index1,point_index2,point_index3] netgen-6.2.1804/python/__init__.py0000644000175000017500000000100213272137567015430 0ustar kurtkurtimport os import sys # import tkinter only if Netgen was configured with USE_GUI=ON if @IMPORT_TKINTER@: import tkinter _netgen_bin_dir=os.path.realpath(os.path.join(os.path.dirname(__file__),'..','@NETGEN_PYTHON_RPATH_BIN@')) _netgen_lib_dir=os.path.realpath(os.path.join(os.path.dirname(__file__),'..','@NETGEN_PYTHON_RPATH@')) if sys.platform.startswith('win'): os.environ['PATH'] += ';'+os.path.realpath(os.path.join(os.path.dirname(__file__),'../../../bin')) del sys del os from . import libngpy netgen-6.2.1804/python/gengeom.py0000644000175000017500000000102613272137567015320 0ustar kurtkurt geom = SplineGeometry() # Define Points pi1 = geom.AppendPoint(0,0) pi2 = geom.AppendPoint(1,0) pi3 = geom.AppendPoint(1,1) pi4 = geom.AppendPoint(0,1) # Define Segments geom.AppendSegment([pi1,pi2]) geom.AppendSegment([pi2,pi3]) geom.AppendSegment([pi3,pi4]) geom.AppendSegment([pi4,pi1]) # Plot Geometry geom.Plot() # Plot Point Index geom.ShowPoints() # Plot Domain Numbers geom.ShowDomains() # Set Meshing Parameters mparam = MeshingParameters() mparam.maxh = 0.1 mesh = geom.GenerateMesh(mparam)netgen-6.2.1804/python/stl.py0000644000175000017500000000056613272137567014511 0ustar kurtkurtfrom netgen.libngpy._stl import * from netgen.libngpy._meshing import MeshingParameters def stl_meshing_func (geom, **args): if "mp" in args: return GenerateMesh (geom, args["mp"]) else: return GenerateMesh (geom, MeshingParameters (**args)) # return GenerateMesh (geom, MeshingParameters (**args)) STLGeometry.GenerateMesh = stl_meshing_func netgen-6.2.1804/python/CMakeLists.txt0000644000175000017500000000061013272137567016063 0ustar kurtkurtif(USE_GUI) set(IMPORT_TKINTER True) else() set(IMPORT_TKINTER False) endif() configure_file(__init__.py ${CMAKE_CURRENT_BINARY_DIR}/__init__.py @ONLY) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/__init__.py meshing.py csg.py geom2d.py stl.py gui.py NgOCC.py read_gmsh.py DESTINATION ${NG_INSTALL_DIR_PYTHON}/${NG_INSTALL_SUFFIX} COMPONENT netgen ) netgen-6.2.1804/python/meshing.py0000644000175000017500000000004613272137567015332 0ustar kurtkurtfrom netgen.libngpy._meshing import * netgen-6.2.1804/python/read_gmsh.py0000644000175000017500000001521113272137567015631 0ustar kurtkurtfrom netgen.meshing import * def ReadGmsh(filename): meshdim = 1 with open(filename + ".msh", 'r') as f: while f.readline().split()[0] != "$Elements": pass nelem = int(f.readline()) for i in range(nelem): line = f.readline() eltype = int(line.split()[1]) if eltype > 1 and eltype != 15: meshdim = 2 if eltype > 3 and eltype != 15: meshdim = 3 break f = open(filename + ".msh", 'r') mesh = Mesh(dim=meshdim) pointmap = {} facedescriptormap = {} namemap = {} materialmap = {} bbcmap = {} while True: line = f.readline() if line == "": break if line.split()[0] == "$PhysicalNames": print('WARNING: Physical groups detected - Be sure to define them for every geometrical entity.') numnames = int(f.readline()) for i in range(numnames): f.readline line = f.readline() namemap[int(line.split()[1])] = line.split()[2][1:-1] if line.split()[0] == "$Nodes": num = int(f.readline().split()[0]) for i in range(num): line = f.readline() nodenum, x, y, z = line.split()[0:4] pnum = mesh.Add(MeshPoint(Pnt(float(x), float(y), float(z)))) pointmap[int(nodenum)] = pnum if line.split()[0] == "$Elements": num = int(f.readline().split()[0]) for i in range(num): line = f.readline().split() elmnum = int(line[0]) elmtype = int(line[1]) numtags = int(line[2]) # the first tag is the physical group nr, the second tag is the group nr of the dim tags = [int(line[3 + k]) for k in range(numtags)] if elmtype == 1: # 2-node line num_nodes = 2 elif elmtype == 2: # 3-node trig num_nodes = 3 elif elmtype == 3: # 4-node quad num_nodes = 4 elif elmtype == 4: # 4-node tet num_nodes = 4 elif elmtype == 5: # 8-node hex num_nodes = 8 elif elmtype == 6: # 6-node prism num_nodes = 6 elif elmtype == 7: # 5-node pyramid num_nodes = 5 elif elmtype == 15: # 1-node point num_nodes = 1 else: raise Exception("element type", elmtype, "not implemented") nodenums = line[3 + numtags:3 + numtags + num_nodes] nodenums2 = [pointmap[int(nn)] for nn in nodenums] if elmtype == 1: if meshdim == 3: if tags[1] in bbcmap: index = bbcmap[tags[1]] else: index = len(bbcmap) + 1 if len(namemap): mesh.SetCD2Name(index, namemap[tags[0]]) else: mesh.SetCD2Name(index, "line" + str(tags[1])) bbcmap[tags[1]] = index elif meshdim == 2: if tags[1] in facedescriptormap.keys(): index = facedescriptormap[tags[1]] else: index = len(facedescriptormap) + 1 fd = FaceDescriptor(bc=index) if len(namemap): fd.bcname = namemap[tags[0]] else: fd.bcname = 'line' + str(tags[1]) mesh.SetBCName(index - 1, fd.bcname) mesh.Add(fd) facedescriptormap[tags[1]] = index else: if tags[1] in materialmap: index = materialmap[tags[1]] else: index = len(materialmap) + 1 if len(namemap): mesh.SetMaterial(index, namemap[tags[0]]) else: mesh.SetMaterial(index, "line" + str(tags[1])) materialmap[tags[1]] = index mesh.Add(Element1D(index=index, vertices=nodenums2)) if elmtype in [2, 3]: # 2d elements if meshdim == 3: if tags[1] in facedescriptormap.keys(): index = facedescriptormap[tags[1]] else: index = len(facedescriptormap) + 1 fd = FaceDescriptor(bc=index) if len(namemap): fd.bcname = namemap[tags[0]] else: fd.bcname = "surf" + str(tags[1]) mesh.SetBCName(index - 1, fd.bcname) mesh.Add(fd) facedescriptormap[tags[1]] = index else: if tags[1] in materialmap: index = materialmap[tags[1]] else: index = len(materialmap) + 1 if len(namemap): mesh.SetMaterial(index, namemap[tags[0]]) else: mesh.SetMaterial(index, "surf" + str(tags[1])) materialmap[tags[1]] = index mesh.Add(Element2D(index, nodenums2)) if elmtype in [4, 5, 6, 7]: # volume elements if tags[1] in materialmap: index = materialmap[tags[1]] else: index = len(materialmap) + 1 if len(namemap): mesh.SetMaterial(index, namemap[tags[0]]) else: mesh.SetMaterial(index, "vol" + str(tags[1])) materialmap[tags[1]] = index nodenums2 = [pointmap[int(nn)] for nn in nodenums] if elmtype == 4: mesh.Add(Element3D(index, [nodenums2[0], nodenums2[1], nodenums2[3], nodenums2[2]])) elif elmtype in [5, 6, 7]: mesh.Add(Element3D(index, nodenums2)) return mesh netgen-6.2.1804/NEWS0000644000175000017500000000000013272137567012472 0ustar kurtkurt