Back to index

salome-geom  6.5.0
GEOM_shellSolid.py
Go to the documentation of this file.
00001 #  -*- coding: iso-8859-1 -*-
00002 # Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00003 #
00004 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00005 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00006 #
00007 # This library is free software; you can redistribute it and/or
00008 # modify it under the terms of the GNU Lesser General Public
00009 # License as published by the Free Software Foundation; either
00010 # version 2.1 of the License.
00011 #
00012 # This library is distributed in the hope that it will be useful,
00013 # but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015 # Lesser General Public License for more details.
00016 #
00017 # You should have received a copy of the GNU Lesser General Public
00018 # License along with this library; if not, write to the Free Software
00019 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00020 #
00021 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00022 #
00023 
00024 #==============================================================================
00025 #  Info.
00026 #  Bug (from script, bug)   : shellSolid_modified.py, PAL6611
00027 #  Modified                 : 25/11/2004
00028 #  Author                   : Kovaltchuk Alexey
00029 #  Project                  : PAL/SALOME
00030 #==============================================================================
00031 # Imports
00032 # -------
00033 #
00034 import salome
00035 import SALOMEDS
00036 
00037 import geompy
00038 
00039 # Interface with geometry
00040 # -----------------------
00041 
00042 #geom = salome.lcc.FindOrLoadComponent("FactoryServer", "GEOM")
00043 geomgui = salome.ImportComponentGUI("GEOM")
00044 
00045 geom = geompy
00046 
00047 # Interface with study
00048 # --------------------
00049 
00050 def addToStudy(shape, name):
00051     i = geompy.addToStudy(shape, name)
00052     salome.sg.updateObjBrowser(0)
00053 #    geomgui.createAndDisplayGO(i)
00054     return i
00055 
00056 def setName(obj):
00057     obj.SetName(salome.orb.object_to_string(obj))
00058 
00059 
00060 def MakeVertex(x, y, z):
00061     v = geom.MakeVertex(x, y, z)
00062     setName(v)
00063     return v
00064 
00065 def MakeEdge(v1, v2):
00066     e = geom.MakeEdge(v1, v2)
00067     setName(e)
00068     return e
00069 
00070 def MakeArc(f, p, t):
00071     e = geom.MakeArc(f, p, t)
00072     setName(e)
00073     return e
00074 
00075 def MakeArcCenter(c, f, t):
00076     p = fkl(c, f, t)
00077     e = geom.MakeArc(f, p, t)
00078     setName(e)
00079     return e
00080 
00081 # Face with 4 edges
00082 # -----------------
00083 
00084 # cf. makeTiledSurfByContour
00085 
00086 def MakeQuadFace(e1, e2, e3, e4):
00087     l = []
00088     l.append(e1)
00089     l.append(e2)
00090     l.append(e3)
00091     l.append(e4)
00092     w = geom.MakeWire(l)
00093     f = geom.MakeFace(w, 1)
00094     setName(f)
00095     return f
00096 
00097 # cf. makeTiledSurfBetweenTwolines
00098 
00099 def MakeQuadFaceEdge(e1, e2):
00100     return fkl
00101 
00102 # cf. makeTiledSurfByPointsOfContour
00103 # cf. makeMesh
00104 
00105 def MakeQuadFaceVertex(v1, v2, v3, v4):
00106     l = []
00107     e = MakeEdge(v1, v2)
00108     l.append(e)
00109     e = MakeEdge(v2, v3)
00110     l.append(e)
00111     e = MakeEdge(v3, v4)
00112     l.append(e)
00113     e = MakeEdge(v4, v1)
00114     l.append(e)
00115     w = geom.MakeWire(l)
00116     f = geom.MakeFace(w, 1)
00117     setName(f)
00118     return f
00119 
00120 # Solid with 6 faces
00121 # ------------------
00122 
00123 # cf. makePavedVolWithContour
00124 # cf. makeVolWithEnvolope
00125 
00126 def MakeHexaSolid(f1, f2, f3, f4, f5, f6):
00127     l = []
00128     l.append(f1)
00129     l.append(f2)
00130     l.append(f3)
00131     l.append(f4)
00132     l.append(f5)
00133     l.append(f6)
00134     s = geom.MakeShell(l)
00135 # FKL: bad shell
00136     l = []
00137     l.append(s)
00138     s = geom.MakeSolid(l)
00139 # FKL: MakeSolid crash
00140     setName(s)
00141     return s
00142 
00143 # cf. makeVolBetweenTwoSurfaces
00144 
00145 def MakeHexaSolidFace(f1, f2):
00146     return fkl
00147 
00148 # Face (with 4 edges) and solid (with 6 faces)
00149 # --------------------------------------------
00150 
00151 # makeTiledSurfByRotationOfLine
00152 
00153 def MakeRevolution(g, pt, ve, angle):
00154     """
00155     Creates a face  by rotation of an edge with an angle around an axis defined by a point and a vector or
00156     creates a solid by rotation of a  face with an angle around an axis defined by a point and a vector
00157     """
00158     axis = geom.MakeAxisStruct(pt.x, pt.y, pt.z, ve.x, ve.y, ve.z)
00159     s = geom.MakeRevolution(g, axis, angle)
00160     setName(s)
00161     return s
00162 
00163 # cf. makeSurfSewingTwolines
00164 
00165 def MakeSewing(ls):
00166     """
00167     Creates a face  by sewing common edges between a list of faces or
00168     Creates a solid by sewing common faces between a list of solids
00169     """
00170     s = geom.MakeSewing(ls)
00171     setName(s)
00172     return s
00173 
00174 # cf. makeIntersectionBetweenTwoMeshes
00175 
00176 def MakeCommon(s1, s2):
00177     """
00178     Creates the common face  between 2 faces or
00179     Creates the common solid between 2 solids
00180     """
00181     s = geom.MakeBoolean(s1, s2, 1)
00182     setName(s)
00183     return s
00184 
00185 # cf. makeMerge
00186 
00187 def MakeFuse(s1, s2):
00188     """
00189     Fuses 2 faces or 2 solids
00190     """
00191     s = geom.MakeBoolean(s1, s2, 3)
00192     setName(s)
00193     return s
00194 
00195 # Additional
00196 
00197 def MakeCut(s1, s2):
00198     """
00199     Cuts 2 faces or 2 solids
00200     """
00201     s = geom.MakeBoolean(s1, s2, 2)
00202     setName(s)
00203     return s
00204 
00205 # Edge, face (with 4 edges) and solid (with 6 faces)
00206 # --------------------------------------------------
00207 
00208 # cf. makeSurfByTranslation
00209 # cf. makeVolByTranslation
00210 
00211 def MakePrism(s, v):
00212     """
00213     Creates a edge  defined by a vertex and along a vector
00214     Creates a face  defined by a edge   and along a vector
00215     Creates a solid defined by a face   and along a vector
00216     """
00217     r = geom.MakePrism(s, point(0, 0, 0), v)
00218     setName(r)
00219     return r
00220 
00221 # cf. homothety
00222 
00223 def MakeScaleTransform(s, center, factor):
00224     """
00225     Creates a homothety of a geometric object
00226     """
00227     r = geom.MakeScaleTransform(s, center, factor)
00228     setName(r)
00229     return r
00230 
00231 # Vertex, edge, face (with 4 edges) and solid (with 6 faces)
00232 # ----------------------------------------------------------
00233 
00234 # cf. translate
00235 
00236 def MakeTranslation(s, vx, vy, vz):
00237     """
00238     Translates a vertex, an edge, a face or a solid
00239     """
00240     r = geom.MakeTranslation(s, vx, vy, vz)
00241     setName(r)
00242     return r
00243 
00244 # cf. rotation
00245 
00246 def MakeRotation(g, pt, ve, angle):
00247     """
00248     Creates a rotation of the geometric object with an angle around an axis defined by a point and a vector
00249     """
00250     axis = geom.MakeAxisStruct(pt.x, pt.y, pt.z, ve.x, ve.y, ve.z)
00251     s = geom.MakeRotation(g, axis, angle)
00252     setName(s)
00253     return s
00254 
00255 # cf. symmetryByPoint
00256 
00257 def MakeMirrorByPoint(s, point):
00258     """
00259     Creates a symmetric object by point symetry
00260     """
00261     return fkl
00262 
00263 # cf. symmetryByLine
00264 
00265 def MakeMirrorByLine(s, line):
00266     """
00267     Creates a symmetric object by line symetry
00268     """
00269     return fkl
00270 
00271 # cf. symmetryByPlane
00272 
00273 def MakeMirrorByPlane(s, pt, ve):
00274     """
00275     Creates a symmetric object by plane symetry defined by a point and a normal vector
00276     """
00277     p = plane(pt, ve)
00278     r = geom.MakeMirrorByplane(s, p)
00279     setName(r)
00280     return r
00281 
00282 # Compound
00283 # --------
00284 
00285 # Additional
00286 
00287 def BlockMakeCompound(ls):
00288     """
00289     Creates a compound defined by a list and glue faces
00290     """
00291     c = MakeCompound(ls)
00292     r = MakeGlueFaces(c, 1.e-5)
00293     setName(r)
00294     return r
00295 
00296 # Boolean operators
00297 # -----------------
00298 
00299 def mergePointsNearBy(l, v):
00300     """
00301     Modifies a list of shape by replacing all vertex near a new vextex
00302     """
00303     return fkl
00304 
00305 # Acces operators
00306 # ---------------
00307 
00308 def getCoords(v):
00309     """
00310     Gets the coordinates of the vertex
00311     """
00312     return fkl
00313 
00314 def extractBeginPoint(e):
00315     """
00316     Gets the first point of an edge
00317     """
00318     return fkl
00319 
00320 def extractEndPoint(e):
00321     """
00322     Gets the second point of an edge
00323     """
00324     return fkl
00325 
00326 # fkl more functionalities
00327 
00328 # Addionnal
00329 # =========
00330 
00331 # Check geometry
00332 # --------------
00333 
00334 def CheckQuadFace(f):
00335     """
00336     Checks if a face has 4 edges
00337     """
00338     return fkl
00339 
00340 def CheckHexaSolid(s):
00341     """
00342     Checks if a solid has 6 faces and each faces have 4 edges
00343     """
00344     return fkl
00345 
00346 # fkl more if other kind of solid like: tetra, penta, etc
00347 
00348 # point for building
00349 # ------------------
00350 
00351 def point(x, y, z):
00352     p = geom.MakeVertex(x, y, z)
00353     return p
00354 
00355 def plane(pt, dir):
00356     p = geom.MakePlane(pt, d, 100)
00357     return p
00358 
00359 # Solid
00360 # -----
00361 
00362 def MakeCylinder(center, dir, radius, height):
00363     s = geom.MakeCylinder(center, dir, radius, height)
00364     setName(s)
00365     return s
00366 
00367 def MakeBox(p1, p2):
00368     s = geom.MakeBoxTwoPnt(p1, p2)
00369     setName(s)
00370     return s
00371 
00372 # Compound
00373 # --------
00374 
00375 ShapeType = {"COMPOUND":0, "COMPSOLID":1, "SOLID":2, "SHELL":3, "FACE":4, "WIRE":5, "EDGE":6, "VERTEX":7, "SHAPE":8}
00376 
00377 def MakePartitionList(solids, tools):
00378     """
00379     Creates a list of shape by a partition of a list of solids by a list of tools
00380     """
00381     p = geom.Partition(solids, tools, [], [], ShapeType["SHAPE"]);
00382     l = geom.SubShapeAll(p, ShapeType["SHAPE"])
00383     return l
00384 
00385 def MakePartition(solids, tools):
00386     """
00387     Creates a partition of a list of solids by a list of tools
00388     """
00389     l = MakePartitionList(solids, tools)
00390     c = MakeCompound(l)
00391     setName(c)
00392     return c
00393 
00394 def BlockMakeMultiTranslation1D(shape, dir, step, times):
00395     m = geom.MakeMultiTranslation1D(shape, dir, step, times)
00396     c  = MakeGlueFaces(m, 1.e-5)
00397     setName(c)
00398     return c
00399 
00400 def BlockMakeMultiTranslation2D(shape, dir1, step1, times1, dir2, step2, times2):
00401     m  = geom.MakeMultiTranslation2D(shape, dir1, step1, times1, dir2, step2, times2)
00402     c  = MakeGlueFaces(m, 1.e-5)
00403     setName(c)
00404     return c
00405 
00406 def BlockMakeMultiRotation1D(shape, dir, point, times):
00407     m = geom.MakeMultiRotation1D(shape, dir, point, times)
00408     c  = MakeGlueFaces(m, 1.e-5)
00409     setName(c)
00410     return c
00411 
00412 def BlockMakeMultiRotation2D(shape, dir, point, angle, times1, step, times2):
00413     m = geom.MakeMultiRotation2D(shape, dir, point, angle, times1, step, times2)
00414     c  = MakeGlueFaces(m, 1.e-5)
00415     setName(c)
00416     return c
00417 
00418 # internal
00419 # --------
00420 
00421 def MakeCompound(ls):
00422     """
00423     Creates a compound defined by a list
00424     """
00425     c = geom.MakeCompound(ls)
00426     return c
00427 
00428 def MakeSewingShape(s, eps):
00429     """
00430     Creates a shape fully sewed
00431     """
00432     r = geom.MakeSewingShape(s, eps)
00433     return r
00434 
00435 def MakeGlueFaces(s, eps):
00436     """
00437     Touched faces are replaced by one
00438     """
00439     r = geom.MakeGlueFaces(s, eps)
00440     return r
00441 
00442 
00443 # Geometry
00444 # ========
00445 
00446 # A small cube centered and put on a great cube
00447 
00448 # Points
00449 # ------
00450 
00451 greatPoint111 = point( 0,  0,  0)
00452 greatPoint211 = point(10,  0,  0)
00453 greatPoint311 = point(20,  0,  0)
00454 greatPoint411 = point(30,  0,  0)
00455 
00456 greatPoint121 = point( 0, 10,  0)
00457 greatPoint221 = point(10, 10,  0)
00458 greatPoint321 = point(20, 10,  0)
00459 greatPoint421 = point(30, 10,  0)
00460 
00461 greatPoint112 = point( 0,  0, 10)
00462 greatPoint212 = point(10,  0, 10)
00463 greatPoint312 = point(20,  0, 10)
00464 greatPoint412 = point(30,  0, 10)
00465 
00466 greatPoint122 = point( 0, 10, 10)
00467 greatPoint222 = point(10, 10, 10)
00468 greatPoint322 = point(20, 10, 10)
00469 greatPoint422 = point(30, 10, 10)
00470 
00471 greatPoint113 = point( 0,  0, 20)
00472 greatPoint213 = point(10,  0, 20)
00473 greatPoint313 = point(20,  0, 20)
00474 greatPoint413 = point(30,  0, 20)
00475 
00476 greatPoint123 = point( 0, 10, 20)
00477 greatPoint223 = point(10, 10, 20)
00478 greatPoint323 = point(20, 10, 20)
00479 greatPoint423 = point(30, 10, 20)
00480 
00481 greatPoint114 = point( 0,  0, 30)
00482 greatPoint214 = point(10,  0, 30)
00483 greatPoint314 = point(20,  0, 30)
00484 greatPoint414 = point(30,  0, 30)
00485 
00486 greatPoint124 = point( 0, 10, 30)
00487 greatPoint224 = point(10, 10, 30)
00488 greatPoint324 = point(20, 10, 30)
00489 greatPoint424 = point(30, 10, 30)
00490 
00491 
00492 smallPoint111 = greatPoint222
00493 smallPoint211 = greatPoint322
00494 smallPoint121 = point(10, 20, 10)
00495 smallPoint221 = point(20, 20, 10)
00496 
00497 smallPoint112 = greatPoint223
00498 smallPoint212 = greatPoint323
00499 smallPoint122 = point(10, 20, 20)
00500 smallPoint222 = point(20, 20, 20)
00501 
00502 # Edges
00503 # -----
00504 
00505 smallEdgeX11 = MakeEdge(smallPoint111, smallPoint211)
00506 smallEdgeX21 = MakeEdge(smallPoint121, smallPoint221)
00507 smallEdgeX12 = MakeEdge(smallPoint112, smallPoint212)
00508 smallEdgeX22 = MakeEdge(smallPoint122, smallPoint222)
00509 
00510 smallEdgeY11 = MakeEdge(smallPoint111, smallPoint121)
00511 smallEdgeY21 = MakeEdge(smallPoint211, smallPoint221)
00512 smallEdgeY12 = MakeEdge(smallPoint112, smallPoint122)
00513 smallEdgeY22 = MakeEdge(smallPoint212, smallPoint222)
00514 
00515 smallEdgeZ11 = MakeEdge(smallPoint111, smallPoint112)
00516 smallEdgeZ21 = MakeEdge(smallPoint211, smallPoint212)
00517 smallEdgeZ12 = MakeEdge(smallPoint121, smallPoint122)
00518 smallEdgeZ22 = MakeEdge(smallPoint221, smallPoint222)
00519 
00520 
00521 greatEdgeX111 = MakeEdge(greatPoint111, greatPoint211)
00522 greatEdgeX211 = MakeEdge(greatPoint211, greatPoint311)
00523 greatEdgeX311 = MakeEdge(greatPoint311, greatPoint411)
00524 greatEdgeX121 = MakeEdge(greatPoint121, greatPoint221)
00525 greatEdgeX221 = MakeEdge(greatPoint221, greatPoint321)
00526 greatEdgeX321 = MakeEdge(greatPoint321, greatPoint421)
00527 
00528 greatEdgeX112 = MakeEdge(greatPoint112, greatPoint212)
00529 greatEdgeX212 = MakeEdge(greatPoint212, greatPoint312)
00530 greatEdgeX312 = MakeEdge(greatPoint312, greatPoint412)
00531 greatEdgeX122 = MakeEdge(greatPoint122, greatPoint222)
00532 greatEdgeX222 = smallEdgeX11
00533 greatEdgeX322 = MakeEdge(greatPoint322, greatPoint422)
00534 
00535 greatEdgeX113 = MakeEdge(greatPoint113, greatPoint213)
00536 greatEdgeX213 = MakeEdge(greatPoint213, greatPoint313)
00537 greatEdgeX313 = MakeEdge(greatPoint313, greatPoint413)
00538 greatEdgeX123 = MakeEdge(greatPoint123, greatPoint223)
00539 greatEdgeX223 = smallEdgeX12
00540 greatEdgeX323 = MakeEdge(greatPoint323, greatPoint423)
00541 
00542 greatEdgeX114 = MakeEdge(greatPoint114, greatPoint214)
00543 greatEdgeX214 = MakeEdge(greatPoint214, greatPoint314)
00544 greatEdgeX314 = MakeEdge(greatPoint314, greatPoint414)
00545 greatEdgeX124 = MakeEdge(greatPoint124, greatPoint224)
00546 greatEdgeX224 = MakeEdge(greatPoint224, greatPoint324)
00547 greatEdgeX324 = MakeEdge(greatPoint324, greatPoint424)
00548 
00549 greatEdgeY11 = MakeEdge(greatPoint111, greatPoint121)
00550 greatEdgeY21 = MakeEdge(greatPoint211, greatPoint221)
00551 greatEdgeY31 = MakeEdge(greatPoint311, greatPoint321)
00552 greatEdgeY41 = MakeEdge(greatPoint411, greatPoint421)
00553 
00554 greatEdgeY12 = MakeEdge(greatPoint112, greatPoint122)
00555 greatEdgeY22 = MakeEdge(greatPoint212, greatPoint222)
00556 greatEdgeY32 = MakeEdge(greatPoint312, greatPoint322)
00557 greatEdgeY42 = MakeEdge(greatPoint412, greatPoint422)
00558 
00559 greatEdgeY13 = MakeEdge(greatPoint113, greatPoint123)
00560 greatEdgeY23 = MakeEdge(greatPoint213, greatPoint223)
00561 greatEdgeY33 = MakeEdge(greatPoint313, greatPoint323)
00562 greatEdgeY43 = MakeEdge(greatPoint413, greatPoint423)
00563 
00564 greatEdgeY14 = MakeEdge(greatPoint114, greatPoint124)
00565 greatEdgeY24 = MakeEdge(greatPoint214, greatPoint224)
00566 greatEdgeY34 = MakeEdge(greatPoint314, greatPoint324)
00567 greatEdgeY44 = MakeEdge(greatPoint414, greatPoint424)
00568 
00569 greatEdgeZ111 = MakeEdge(greatPoint111, greatPoint112)
00570 greatEdgeZ211 = MakeEdge(greatPoint211, greatPoint212)
00571 greatEdgeZ311 = MakeEdge(greatPoint311, greatPoint312)
00572 greatEdgeZ411 = MakeEdge(greatPoint411, greatPoint412)
00573 
00574 greatEdgeZ121 = MakeEdge(greatPoint121, greatPoint122)
00575 greatEdgeZ221 = MakeEdge(greatPoint221, greatPoint222)
00576 greatEdgeZ321 = MakeEdge(greatPoint321, greatPoint322)
00577 greatEdgeZ421 = MakeEdge(greatPoint421, greatPoint422)
00578 
00579 greatEdgeZ112 = MakeEdge(greatPoint112, greatPoint113)
00580 greatEdgeZ212 = MakeEdge(greatPoint212, greatPoint213)
00581 greatEdgeZ312 = MakeEdge(greatPoint312, greatPoint313)
00582 greatEdgeZ412 = MakeEdge(greatPoint412, greatPoint413)
00583 
00584 greatEdgeZ122 = MakeEdge(greatPoint122, greatPoint123)
00585 greatEdgeZ222 = smallEdgeZ11
00586 greatEdgeZ322 = smallEdgeZ21
00587 greatEdgeZ422 = MakeEdge(greatPoint422, greatPoint423)
00588 
00589 greatEdgeZ113 = MakeEdge(greatPoint113, greatPoint114)
00590 greatEdgeZ213 = MakeEdge(greatPoint213, greatPoint214)
00591 greatEdgeZ313 = MakeEdge(greatPoint313, greatPoint314)
00592 greatEdgeZ413 = MakeEdge(greatPoint413, greatPoint414)
00593 
00594 greatEdgeZ123 = MakeEdge(greatPoint123, greatPoint124)
00595 greatEdgeZ223 = MakeEdge(greatPoint223, greatPoint224)
00596 greatEdgeZ323 = MakeEdge(greatPoint323, greatPoint324)
00597 greatEdgeZ423 = MakeEdge(greatPoint423, greatPoint424)
00598 
00599 # Faces
00600 # -----
00601 
00602 smallFaceX1 = MakeQuadFace(smallEdgeY11, smallEdgeZ11, smallEdgeY12, smallEdgeZ12)
00603 smallFaceX2 = MakeQuadFace(smallEdgeY21, smallEdgeZ21, smallEdgeY22, smallEdgeZ22)
00604 smallFaceY1 = MakeQuadFace(smallEdgeX11, smallEdgeZ11, smallEdgeX12, smallEdgeZ21)
00605 smallFaceY2 = MakeQuadFace(smallEdgeX21, smallEdgeZ12, smallEdgeX22, smallEdgeZ22)
00606 smallFaceZ1 = MakeQuadFace(smallEdgeX11, smallEdgeY11, smallEdgeX21, smallEdgeY21)
00607 smallFaceZ2 = MakeQuadFace(smallEdgeX12, smallEdgeY12, smallEdgeX22, smallEdgeY22)
00608 
00609 
00610 greatFaceX11 = MakeQuadFace(greatEdgeY11, greatEdgeZ111, greatEdgeY12, greatEdgeZ121)
00611 greatFaceX21 = MakeQuadFace(greatEdgeY21, greatEdgeZ211, greatEdgeY22, greatEdgeZ221)
00612 greatFaceX31 = MakeQuadFace(greatEdgeY31, greatEdgeZ311, greatEdgeY32, greatEdgeZ321)
00613 greatFaceX41 = MakeQuadFace(greatEdgeY41, greatEdgeZ411, greatEdgeY42, greatEdgeZ421)
00614 
00615 greatFaceX12 = MakeQuadFace(greatEdgeY12, greatEdgeZ112, greatEdgeY13, greatEdgeZ122)
00616 greatFaceX22 = MakeQuadFace(greatEdgeY22, greatEdgeZ212, greatEdgeY23, greatEdgeZ222)
00617 greatFaceX32 = MakeQuadFace(greatEdgeY32, greatEdgeZ312, greatEdgeY33, greatEdgeZ322)
00618 greatFaceX42 = MakeQuadFace(greatEdgeY42, greatEdgeZ412, greatEdgeY43, greatEdgeZ422)
00619 
00620 greatFaceX13 = MakeQuadFace(greatEdgeY13, greatEdgeZ113, greatEdgeY14, greatEdgeZ123)
00621 greatFaceX23 = MakeQuadFace(greatEdgeY23, greatEdgeZ213, greatEdgeY24, greatEdgeZ223)
00622 greatFaceX33 = MakeQuadFace(greatEdgeY33, greatEdgeZ313, greatEdgeY34, greatEdgeZ323)
00623 greatFaceX43 = MakeQuadFace(greatEdgeY43, greatEdgeZ413, greatEdgeY44, greatEdgeZ423)
00624 
00625 greatFaceY111 = MakeQuadFace(greatEdgeX111, greatEdgeZ111, greatEdgeX112, greatEdgeZ211)
00626 greatFaceY211 = MakeQuadFace(greatEdgeX211, greatEdgeZ211, greatEdgeX212, greatEdgeZ311)
00627 greatFaceY311 = MakeQuadFace(greatEdgeX311, greatEdgeZ311, greatEdgeX312, greatEdgeZ411)
00628 greatFaceY121 = MakeQuadFace(greatEdgeX121, greatEdgeZ121, greatEdgeX122, greatEdgeZ221)
00629 greatFaceY221 = MakeQuadFace(greatEdgeX221, greatEdgeZ221, greatEdgeX222, greatEdgeZ321)
00630 greatFaceY321 = MakeQuadFace(greatEdgeX321, greatEdgeZ321, greatEdgeX322, greatEdgeZ421)
00631 
00632 greatFaceY112 = MakeQuadFace(greatEdgeX112, greatEdgeZ112, greatEdgeX113, greatEdgeZ212)
00633 greatFaceY212 = MakeQuadFace(greatEdgeX212, greatEdgeZ212, greatEdgeX213, greatEdgeZ312)
00634 greatFaceY312 = MakeQuadFace(greatEdgeX312, greatEdgeZ312, greatEdgeX313, greatEdgeZ412)
00635 greatFaceY122 = MakeQuadFace(greatEdgeX122, greatEdgeZ122, greatEdgeX123, greatEdgeZ222)
00636 greatFaceY222 = smallFaceY1
00637 greatFaceY322 = MakeQuadFace(greatEdgeX322, greatEdgeZ322, greatEdgeX323, greatEdgeZ422)
00638 
00639 greatFaceY113 = MakeQuadFace(greatEdgeX113, greatEdgeZ113, greatEdgeX114, greatEdgeZ213)
00640 greatFaceY213 = MakeQuadFace(greatEdgeX213, greatEdgeZ213, greatEdgeX214, greatEdgeZ313)
00641 greatFaceY313 = MakeQuadFace(greatEdgeX313, greatEdgeZ313, greatEdgeX314, greatEdgeZ413)
00642 greatFaceY123 = MakeQuadFace(greatEdgeX123, greatEdgeZ123, greatEdgeX124, greatEdgeZ223)
00643 greatFaceY223 = MakeQuadFace(greatEdgeX223, greatEdgeZ223, greatEdgeX224, greatEdgeZ323)
00644 greatFaceY323 = MakeQuadFace(greatEdgeX323, greatEdgeZ323, greatEdgeX324, greatEdgeZ423)
00645 
00646 greatFaceZ11 = MakeQuadFace(greatEdgeX111, greatEdgeY11, greatEdgeX121, greatEdgeY21)
00647 greatFaceZ21 = MakeQuadFace(greatEdgeX211, greatEdgeY21, greatEdgeX221, greatEdgeY31)
00648 greatFaceZ31 = MakeQuadFace(greatEdgeX311, greatEdgeY31, greatEdgeX321, greatEdgeY41)
00649 
00650 greatFaceZ12 = MakeQuadFace(greatEdgeX112, greatEdgeY12, greatEdgeX122, greatEdgeY22)
00651 greatFaceZ22 = MakeQuadFace(greatEdgeX212, greatEdgeY22, greatEdgeX222, greatEdgeY32)
00652 greatFaceZ32 = MakeQuadFace(greatEdgeX312, greatEdgeY32, greatEdgeX322, greatEdgeY42)
00653 
00654 greatFaceZ13 = MakeQuadFace(greatEdgeX113, greatEdgeY13, greatEdgeX123, greatEdgeY23)
00655 greatFaceZ23 = MakeQuadFace(greatEdgeX213, greatEdgeY23, greatEdgeX223, greatEdgeY33)
00656 greatFaceZ33 = MakeQuadFace(greatEdgeX313, greatEdgeY33, greatEdgeX323, greatEdgeY43)
00657 
00658 greatFaceZ14 = MakeQuadFace(greatEdgeX114, greatEdgeY14, greatEdgeX124, greatEdgeY24)
00659 greatFaceZ24 = MakeQuadFace(greatEdgeX214, greatEdgeY24, greatEdgeX224, greatEdgeY34)
00660 greatFaceZ34 = MakeQuadFace(greatEdgeX314, greatEdgeY34, greatEdgeX324, greatEdgeY44)
00661 
00662 # Solids
00663 # ------
00664 
00665 smallBlock   = MakeHexaSolid(smallFaceX1, smallFaceX2, smallFaceY1, smallFaceY2, smallFaceZ1, smallFaceZ2)
00666 
00667 greatBlock11 = MakeHexaSolid(greatFaceX11, greatFaceX21, greatFaceY111, greatFaceY121, greatFaceZ11, greatFaceZ12)
00668 greatBlock21 = MakeHexaSolid(greatFaceX21, greatFaceX31, greatFaceY211, greatFaceY221, greatFaceZ21, greatFaceZ22)
00669 greatBlock31 = MakeHexaSolid(greatFaceX31, greatFaceX41, greatFaceY311, greatFaceY321, greatFaceZ31, greatFaceZ32)
00670 
00671 greatBlock12 = MakeHexaSolid(greatFaceX12, greatFaceX22, greatFaceY112, greatFaceY122, greatFaceZ12, greatFaceZ13)
00672 greatBlock22 = MakeHexaSolid(greatFaceX22, greatFaceX32, greatFaceY212, greatFaceY222, greatFaceZ22, greatFaceZ23)
00673 greatBlock32 = MakeHexaSolid(greatFaceX32, greatFaceX42, greatFaceY312, greatFaceY322, greatFaceZ32, greatFaceZ33)
00674 
00675 greatBlock13 = MakeHexaSolid(greatFaceX13, greatFaceX23, greatFaceY113, greatFaceY123, greatFaceZ13, greatFaceZ14)
00676 greatBlock23 = MakeHexaSolid(greatFaceX23, greatFaceX33, greatFaceY213, greatFaceY223, greatFaceZ23, greatFaceZ24)
00677 greatBlock33 = MakeHexaSolid(greatFaceX33, greatFaceX43, greatFaceY313, greatFaceY323, greatFaceZ33, greatFaceZ34)
00678 
00679 # Compound
00680 # --------
00681 
00682 l = []
00683 l.append(smallBlock)
00684 l.append(greatBlock11)
00685 l.append(greatBlock21)
00686 l.append(greatBlock31)
00687 l.append(greatBlock12)
00688 l.append(greatBlock22)
00689 l.append(greatBlock32)
00690 l.append(greatBlock13)
00691 l.append(greatBlock23)
00692 l.append(greatBlock33)
00693 
00694 piece = MakeCompound(l)
00695 
00696 # Add in study
00697 # ------------
00698 
00699 idpiece = addToStudy(piece, "Cubes2pyGibi")
00700 #geom.InsertOp.Export(piece,"piece.brep", "BREP")