1 # -*- coding: iso-8859-1 -*-
2 # Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
4 # Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
5 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
7 # This library is free software; you can redistribute it and/or
8 # modify it under the terms of the GNU Lesser General Public
9 # License as published by the Free Software Foundation; either
10 # version 2.1 of the License, or (at your option) any later version.
12 # This library is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 # Lesser General Public License for more details.
17 # You should have received a copy of the GNU Lesser General Public
18 # License along with this library; if not, write to the Free Software
19 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
24 #==============================================================================
26 # Bug (from script, bug) : shellSolid_modified.py, PAL6611
27 # Modified : 25/11/2004
28 # Author : Kovaltchuk Alexey
29 # Project : PAL/SALOME
30 #==============================================================================
37 from salome.geom import geomBuilder
38 geompy = geomBuilder.New(salome.myStudy)
40 # Interface with geometry
41 # -----------------------
43 #geom = salome.lcc.FindOrLoadComponent("FactoryServer", "GEOM")
44 geomgui = salome.ImportComponentGUI("GEOM")
46 # Interface with study
47 # --------------------
49 def addToStudy(shape, name):
50 i = geompy.addToStudy(shape, name)
51 salome.sg.updateObjBrowser(0)
52 # geomgui.createAndDisplayGO(i)
56 obj.SetName(salome.orb.object_to_string(obj))
59 def MakeVertex(x, y, z):
60 v = geompy.MakeVertex(x, y, z)
65 e = geompy.MakeEdge(v1, v2)
70 e = geompy.MakeArc(f, p, t)
74 def MakeArcCenter(c, f, t):
76 e = geompy.MakeArc(f, p, t)
83 # cf. makeTiledSurfByContour
85 def MakeQuadFace(e1, e2, e3, e4):
91 w = geompy.MakeWire(l)
92 f = geompy.MakeFace(w, 1)
96 # cf. makeTiledSurfBetweenTwolines
98 def MakeQuadFaceEdge(e1, e2):
101 # cf. makeTiledSurfByPointsOfContour
104 def MakeQuadFaceVertex(v1, v2, v3, v4):
114 w = geompy.MakeWire(l)
115 f = geompy.MakeFace(w, 1)
122 # cf. makePavedVolWithContour
123 # cf. makeVolWithEnvolope
125 def MakeHexaSolid(f1, f2, f3, f4, f5, f6):
133 s = geompy.MakeShell(l)
137 s = geompy.MakeSolid(l)
138 # FKL: MakeSolid crash
142 # cf. makeVolBetweenTwoSurfaces
144 def MakeHexaSolidFace(f1, f2):
147 # Face (with 4 edges) and solid (with 6 faces)
148 # --------------------------------------------
150 # makeTiledSurfByRotationOfLine
152 def MakeRevolution(g, pt, ve, angle):
154 Creates a face by rotation of an edge with an angle around an axis defined by a point and a vector or
155 creates a solid by rotation of a face with an angle around an axis defined by a point and a vector
157 axis = geompy.MakeAxisStruct(pt.x, pt.y, pt.z, ve.x, ve.y, ve.z)
158 s = geompy.MakeRevolution(g, axis, angle)
162 # cf. makeSurfSewingTwolines
166 Creates a face by sewing common edges between a list of faces or
167 Creates a solid by sewing common faces between a list of solids
169 s = geompy.MakeSewing(ls)
173 # cf. makeIntersectionBetweenTwoMeshes
175 def MakeCommon(s1, s2):
177 Creates the common face between 2 faces or
178 Creates the common solid between 2 solids
180 s = geompy.MakeBoolean(s1, s2, 1)
186 def MakeFuse(s1, s2):
188 Fuses 2 faces or 2 solids
190 s = geompy.MakeBoolean(s1, s2, 3)
198 Cuts 2 faces or 2 solids
200 s = geompy.MakeBoolean(s1, s2, 2)
204 # Edge, face (with 4 edges) and solid (with 6 faces)
205 # --------------------------------------------------
207 # cf. makeSurfByTranslation
208 # cf. makeVolByTranslation
212 Creates a edge defined by a vertex and along a vector
213 Creates a face defined by a edge and along a vector
214 Creates a solid defined by a face and along a vector
216 r = geompy.MakePrism(s, point(0, 0, 0), v)
222 def MakeScaleTransform(s, center, factor):
224 Creates a homothety of a geometric object
226 r = geompy.MakeScaleTransform(s, center, factor)
230 # Vertex, edge, face (with 4 edges) and solid (with 6 faces)
231 # ----------------------------------------------------------
235 def MakeTranslation(s, vx, vy, vz):
237 Translates a vertex, an edge, a face or a solid
239 r = geompy.MakeTranslation(s, vx, vy, vz)
245 def MakeRotation(g, pt, ve, angle):
247 Creates a rotation of the geometric object with an angle around an axis defined by a point and a vector
249 axis = geompy.MakeAxisStruct(pt.x, pt.y, pt.z, ve.x, ve.y, ve.z)
250 s = geompy.MakeRotation(g, axis, angle)
254 # cf. symmetryByPoint
256 def MakeMirrorByPoint(s, point):
258 Creates a symmetric object by point symetry
264 def MakeMirrorByLine(s, line):
266 Creates a symmetric object by line symetry
270 # cf. symmetryByPlane
272 def MakeMirrorByPlane(s, pt, ve):
274 Creates a symmetric object by plane symetry defined by a point and a normal vector
277 r = geompy.MakeMirrorByplane(s, p)
286 def BlockMakeCompound(ls):
288 Creates a compound defined by a list and glue faces
291 r = MakeGlueFaces(c, 1.e-5)
298 def mergePointsNearBy(l, v):
300 Modifies a list of shape by replacing all vertex near a new vextex
309 Gets the coordinates of the vertex
313 def extractBeginPoint(e):
315 Gets the first point of an edge
319 def extractEndPoint(e):
321 Gets the second point of an edge
325 # fkl more functionalities
333 def CheckQuadFace(f):
335 Checks if a face has 4 edges
339 def CheckHexaSolid(s):
341 Checks if a solid has 6 faces and each faces have 4 edges
345 # fkl more if other kind of solid like: tetra, penta, etc
351 p = geompy.MakeVertex(x, y, z)
355 p = geompy.MakePlane(pt, d, 100)
361 def MakeCylinder(center, dir, radius, height):
362 s = geompy.MakeCylinder(center, dir, radius, height)
367 s = geompy.MakeBoxTwoPnt(p1, p2)
374 def MakePartitionList(solids, tools):
376 Creates a list of shape by a partition of a list of solids by a list of tools
378 p = geompy.Partition(solids, tools, [], [], geompy.ShapeType["SHAPE"]);
379 l = geompy.SubShapeAll(p, geompy.ShapeType["SHAPE"])
382 def MakePartition(solids, tools):
384 Creates a partition of a list of solids by a list of tools
386 l = MakePartitionList(solids, tools)
391 def BlockMakeMultiTranslation1D(shape, dir, step, times):
392 m = geompy.MakeMultiTranslation1D(shape, dir, step, times)
393 c = MakeGlueFaces(m, 1.e-5)
397 def BlockMakeMultiTranslation2D(shape, dir1, step1, times1, dir2, step2, times2):
398 m = geompy.MakeMultiTranslation2D(shape, dir1, step1, times1, dir2, step2, times2)
399 c = MakeGlueFaces(m, 1.e-5)
403 def BlockMakeMultiRotation1D(shape, dir, point, times):
404 m = geompy.MakeMultiRotation1D(shape, dir, point, times)
405 c = MakeGlueFaces(m, 1.e-5)
409 def BlockMakeMultiRotation2D(shape, dir, point, angle, times1, step, times2):
410 m = geompy.MakeMultiRotation2D(shape, dir, point, angle, times1, step, times2)
411 c = MakeGlueFaces(m, 1.e-5)
418 def MakeCompound(ls):
420 Creates a compound defined by a list
422 c = geompy.MakeCompound(ls)
425 def MakeSewingShape(s, eps):
427 Creates a shape fully sewed
429 r = geompy.MakeSewingShape(s, eps)
432 def MakeGlueFaces(s, eps):
434 Touched faces are replaced by one
436 r = geompy.MakeGlueFaces(s, eps)
443 # A small cube centered and put on a great cube
448 greatPoint111 = point( 0, 0, 0)
449 greatPoint211 = point(10, 0, 0)
450 greatPoint311 = point(20, 0, 0)
451 greatPoint411 = point(30, 0, 0)
453 greatPoint121 = point( 0, 10, 0)
454 greatPoint221 = point(10, 10, 0)
455 greatPoint321 = point(20, 10, 0)
456 greatPoint421 = point(30, 10, 0)
458 greatPoint112 = point( 0, 0, 10)
459 greatPoint212 = point(10, 0, 10)
460 greatPoint312 = point(20, 0, 10)
461 greatPoint412 = point(30, 0, 10)
463 greatPoint122 = point( 0, 10, 10)
464 greatPoint222 = point(10, 10, 10)
465 greatPoint322 = point(20, 10, 10)
466 greatPoint422 = point(30, 10, 10)
468 greatPoint113 = point( 0, 0, 20)
469 greatPoint213 = point(10, 0, 20)
470 greatPoint313 = point(20, 0, 20)
471 greatPoint413 = point(30, 0, 20)
473 greatPoint123 = point( 0, 10, 20)
474 greatPoint223 = point(10, 10, 20)
475 greatPoint323 = point(20, 10, 20)
476 greatPoint423 = point(30, 10, 20)
478 greatPoint114 = point( 0, 0, 30)
479 greatPoint214 = point(10, 0, 30)
480 greatPoint314 = point(20, 0, 30)
481 greatPoint414 = point(30, 0, 30)
483 greatPoint124 = point( 0, 10, 30)
484 greatPoint224 = point(10, 10, 30)
485 greatPoint324 = point(20, 10, 30)
486 greatPoint424 = point(30, 10, 30)
489 smallPoint111 = greatPoint222
490 smallPoint211 = greatPoint322
491 smallPoint121 = point(10, 20, 10)
492 smallPoint221 = point(20, 20, 10)
494 smallPoint112 = greatPoint223
495 smallPoint212 = greatPoint323
496 smallPoint122 = point(10, 20, 20)
497 smallPoint222 = point(20, 20, 20)
502 smallEdgeX11 = MakeEdge(smallPoint111, smallPoint211)
503 smallEdgeX21 = MakeEdge(smallPoint121, smallPoint221)
504 smallEdgeX12 = MakeEdge(smallPoint112, smallPoint212)
505 smallEdgeX22 = MakeEdge(smallPoint122, smallPoint222)
507 smallEdgeY11 = MakeEdge(smallPoint111, smallPoint121)
508 smallEdgeY21 = MakeEdge(smallPoint211, smallPoint221)
509 smallEdgeY12 = MakeEdge(smallPoint112, smallPoint122)
510 smallEdgeY22 = MakeEdge(smallPoint212, smallPoint222)
512 smallEdgeZ11 = MakeEdge(smallPoint111, smallPoint112)
513 smallEdgeZ21 = MakeEdge(smallPoint211, smallPoint212)
514 smallEdgeZ12 = MakeEdge(smallPoint121, smallPoint122)
515 smallEdgeZ22 = MakeEdge(smallPoint221, smallPoint222)
518 greatEdgeX111 = MakeEdge(greatPoint111, greatPoint211)
519 greatEdgeX211 = MakeEdge(greatPoint211, greatPoint311)
520 greatEdgeX311 = MakeEdge(greatPoint311, greatPoint411)
521 greatEdgeX121 = MakeEdge(greatPoint121, greatPoint221)
522 greatEdgeX221 = MakeEdge(greatPoint221, greatPoint321)
523 greatEdgeX321 = MakeEdge(greatPoint321, greatPoint421)
525 greatEdgeX112 = MakeEdge(greatPoint112, greatPoint212)
526 greatEdgeX212 = MakeEdge(greatPoint212, greatPoint312)
527 greatEdgeX312 = MakeEdge(greatPoint312, greatPoint412)
528 greatEdgeX122 = MakeEdge(greatPoint122, greatPoint222)
529 greatEdgeX222 = smallEdgeX11
530 greatEdgeX322 = MakeEdge(greatPoint322, greatPoint422)
532 greatEdgeX113 = MakeEdge(greatPoint113, greatPoint213)
533 greatEdgeX213 = MakeEdge(greatPoint213, greatPoint313)
534 greatEdgeX313 = MakeEdge(greatPoint313, greatPoint413)
535 greatEdgeX123 = MakeEdge(greatPoint123, greatPoint223)
536 greatEdgeX223 = smallEdgeX12
537 greatEdgeX323 = MakeEdge(greatPoint323, greatPoint423)
539 greatEdgeX114 = MakeEdge(greatPoint114, greatPoint214)
540 greatEdgeX214 = MakeEdge(greatPoint214, greatPoint314)
541 greatEdgeX314 = MakeEdge(greatPoint314, greatPoint414)
542 greatEdgeX124 = MakeEdge(greatPoint124, greatPoint224)
543 greatEdgeX224 = MakeEdge(greatPoint224, greatPoint324)
544 greatEdgeX324 = MakeEdge(greatPoint324, greatPoint424)
546 greatEdgeY11 = MakeEdge(greatPoint111, greatPoint121)
547 greatEdgeY21 = MakeEdge(greatPoint211, greatPoint221)
548 greatEdgeY31 = MakeEdge(greatPoint311, greatPoint321)
549 greatEdgeY41 = MakeEdge(greatPoint411, greatPoint421)
551 greatEdgeY12 = MakeEdge(greatPoint112, greatPoint122)
552 greatEdgeY22 = MakeEdge(greatPoint212, greatPoint222)
553 greatEdgeY32 = MakeEdge(greatPoint312, greatPoint322)
554 greatEdgeY42 = MakeEdge(greatPoint412, greatPoint422)
556 greatEdgeY13 = MakeEdge(greatPoint113, greatPoint123)
557 greatEdgeY23 = MakeEdge(greatPoint213, greatPoint223)
558 greatEdgeY33 = MakeEdge(greatPoint313, greatPoint323)
559 greatEdgeY43 = MakeEdge(greatPoint413, greatPoint423)
561 greatEdgeY14 = MakeEdge(greatPoint114, greatPoint124)
562 greatEdgeY24 = MakeEdge(greatPoint214, greatPoint224)
563 greatEdgeY34 = MakeEdge(greatPoint314, greatPoint324)
564 greatEdgeY44 = MakeEdge(greatPoint414, greatPoint424)
566 greatEdgeZ111 = MakeEdge(greatPoint111, greatPoint112)
567 greatEdgeZ211 = MakeEdge(greatPoint211, greatPoint212)
568 greatEdgeZ311 = MakeEdge(greatPoint311, greatPoint312)
569 greatEdgeZ411 = MakeEdge(greatPoint411, greatPoint412)
571 greatEdgeZ121 = MakeEdge(greatPoint121, greatPoint122)
572 greatEdgeZ221 = MakeEdge(greatPoint221, greatPoint222)
573 greatEdgeZ321 = MakeEdge(greatPoint321, greatPoint322)
574 greatEdgeZ421 = MakeEdge(greatPoint421, greatPoint422)
576 greatEdgeZ112 = MakeEdge(greatPoint112, greatPoint113)
577 greatEdgeZ212 = MakeEdge(greatPoint212, greatPoint213)
578 greatEdgeZ312 = MakeEdge(greatPoint312, greatPoint313)
579 greatEdgeZ412 = MakeEdge(greatPoint412, greatPoint413)
581 greatEdgeZ122 = MakeEdge(greatPoint122, greatPoint123)
582 greatEdgeZ222 = smallEdgeZ11
583 greatEdgeZ322 = smallEdgeZ21
584 greatEdgeZ422 = MakeEdge(greatPoint422, greatPoint423)
586 greatEdgeZ113 = MakeEdge(greatPoint113, greatPoint114)
587 greatEdgeZ213 = MakeEdge(greatPoint213, greatPoint214)
588 greatEdgeZ313 = MakeEdge(greatPoint313, greatPoint314)
589 greatEdgeZ413 = MakeEdge(greatPoint413, greatPoint414)
591 greatEdgeZ123 = MakeEdge(greatPoint123, greatPoint124)
592 greatEdgeZ223 = MakeEdge(greatPoint223, greatPoint224)
593 greatEdgeZ323 = MakeEdge(greatPoint323, greatPoint324)
594 greatEdgeZ423 = MakeEdge(greatPoint423, greatPoint424)
599 smallFaceX1 = MakeQuadFace(smallEdgeY11, smallEdgeZ11, smallEdgeY12, smallEdgeZ12)
600 smallFaceX2 = MakeQuadFace(smallEdgeY21, smallEdgeZ21, smallEdgeY22, smallEdgeZ22)
601 smallFaceY1 = MakeQuadFace(smallEdgeX11, smallEdgeZ11, smallEdgeX12, smallEdgeZ21)
602 smallFaceY2 = MakeQuadFace(smallEdgeX21, smallEdgeZ12, smallEdgeX22, smallEdgeZ22)
603 smallFaceZ1 = MakeQuadFace(smallEdgeX11, smallEdgeY11, smallEdgeX21, smallEdgeY21)
604 smallFaceZ2 = MakeQuadFace(smallEdgeX12, smallEdgeY12, smallEdgeX22, smallEdgeY22)
607 greatFaceX11 = MakeQuadFace(greatEdgeY11, greatEdgeZ111, greatEdgeY12, greatEdgeZ121)
608 greatFaceX21 = MakeQuadFace(greatEdgeY21, greatEdgeZ211, greatEdgeY22, greatEdgeZ221)
609 greatFaceX31 = MakeQuadFace(greatEdgeY31, greatEdgeZ311, greatEdgeY32, greatEdgeZ321)
610 greatFaceX41 = MakeQuadFace(greatEdgeY41, greatEdgeZ411, greatEdgeY42, greatEdgeZ421)
612 greatFaceX12 = MakeQuadFace(greatEdgeY12, greatEdgeZ112, greatEdgeY13, greatEdgeZ122)
613 greatFaceX22 = MakeQuadFace(greatEdgeY22, greatEdgeZ212, greatEdgeY23, greatEdgeZ222)
614 greatFaceX32 = MakeQuadFace(greatEdgeY32, greatEdgeZ312, greatEdgeY33, greatEdgeZ322)
615 greatFaceX42 = MakeQuadFace(greatEdgeY42, greatEdgeZ412, greatEdgeY43, greatEdgeZ422)
617 greatFaceX13 = MakeQuadFace(greatEdgeY13, greatEdgeZ113, greatEdgeY14, greatEdgeZ123)
618 greatFaceX23 = MakeQuadFace(greatEdgeY23, greatEdgeZ213, greatEdgeY24, greatEdgeZ223)
619 greatFaceX33 = MakeQuadFace(greatEdgeY33, greatEdgeZ313, greatEdgeY34, greatEdgeZ323)
620 greatFaceX43 = MakeQuadFace(greatEdgeY43, greatEdgeZ413, greatEdgeY44, greatEdgeZ423)
622 greatFaceY111 = MakeQuadFace(greatEdgeX111, greatEdgeZ111, greatEdgeX112, greatEdgeZ211)
623 greatFaceY211 = MakeQuadFace(greatEdgeX211, greatEdgeZ211, greatEdgeX212, greatEdgeZ311)
624 greatFaceY311 = MakeQuadFace(greatEdgeX311, greatEdgeZ311, greatEdgeX312, greatEdgeZ411)
625 greatFaceY121 = MakeQuadFace(greatEdgeX121, greatEdgeZ121, greatEdgeX122, greatEdgeZ221)
626 greatFaceY221 = MakeQuadFace(greatEdgeX221, greatEdgeZ221, greatEdgeX222, greatEdgeZ321)
627 greatFaceY321 = MakeQuadFace(greatEdgeX321, greatEdgeZ321, greatEdgeX322, greatEdgeZ421)
629 greatFaceY112 = MakeQuadFace(greatEdgeX112, greatEdgeZ112, greatEdgeX113, greatEdgeZ212)
630 greatFaceY212 = MakeQuadFace(greatEdgeX212, greatEdgeZ212, greatEdgeX213, greatEdgeZ312)
631 greatFaceY312 = MakeQuadFace(greatEdgeX312, greatEdgeZ312, greatEdgeX313, greatEdgeZ412)
632 greatFaceY122 = MakeQuadFace(greatEdgeX122, greatEdgeZ122, greatEdgeX123, greatEdgeZ222)
633 greatFaceY222 = smallFaceY1
634 greatFaceY322 = MakeQuadFace(greatEdgeX322, greatEdgeZ322, greatEdgeX323, greatEdgeZ422)
636 greatFaceY113 = MakeQuadFace(greatEdgeX113, greatEdgeZ113, greatEdgeX114, greatEdgeZ213)
637 greatFaceY213 = MakeQuadFace(greatEdgeX213, greatEdgeZ213, greatEdgeX214, greatEdgeZ313)
638 greatFaceY313 = MakeQuadFace(greatEdgeX313, greatEdgeZ313, greatEdgeX314, greatEdgeZ413)
639 greatFaceY123 = MakeQuadFace(greatEdgeX123, greatEdgeZ123, greatEdgeX124, greatEdgeZ223)
640 greatFaceY223 = MakeQuadFace(greatEdgeX223, greatEdgeZ223, greatEdgeX224, greatEdgeZ323)
641 greatFaceY323 = MakeQuadFace(greatEdgeX323, greatEdgeZ323, greatEdgeX324, greatEdgeZ423)
643 greatFaceZ11 = MakeQuadFace(greatEdgeX111, greatEdgeY11, greatEdgeX121, greatEdgeY21)
644 greatFaceZ21 = MakeQuadFace(greatEdgeX211, greatEdgeY21, greatEdgeX221, greatEdgeY31)
645 greatFaceZ31 = MakeQuadFace(greatEdgeX311, greatEdgeY31, greatEdgeX321, greatEdgeY41)
647 greatFaceZ12 = MakeQuadFace(greatEdgeX112, greatEdgeY12, greatEdgeX122, greatEdgeY22)
648 greatFaceZ22 = MakeQuadFace(greatEdgeX212, greatEdgeY22, greatEdgeX222, greatEdgeY32)
649 greatFaceZ32 = MakeQuadFace(greatEdgeX312, greatEdgeY32, greatEdgeX322, greatEdgeY42)
651 greatFaceZ13 = MakeQuadFace(greatEdgeX113, greatEdgeY13, greatEdgeX123, greatEdgeY23)
652 greatFaceZ23 = MakeQuadFace(greatEdgeX213, greatEdgeY23, greatEdgeX223, greatEdgeY33)
653 greatFaceZ33 = MakeQuadFace(greatEdgeX313, greatEdgeY33, greatEdgeX323, greatEdgeY43)
655 greatFaceZ14 = MakeQuadFace(greatEdgeX114, greatEdgeY14, greatEdgeX124, greatEdgeY24)
656 greatFaceZ24 = MakeQuadFace(greatEdgeX214, greatEdgeY24, greatEdgeX224, greatEdgeY34)
657 greatFaceZ34 = MakeQuadFace(greatEdgeX314, greatEdgeY34, greatEdgeX324, greatEdgeY44)
662 smallBlock = MakeHexaSolid(smallFaceX1, smallFaceX2, smallFaceY1, smallFaceY2, smallFaceZ1, smallFaceZ2)
664 greatBlock11 = MakeHexaSolid(greatFaceX11, greatFaceX21, greatFaceY111, greatFaceY121, greatFaceZ11, greatFaceZ12)
665 greatBlock21 = MakeHexaSolid(greatFaceX21, greatFaceX31, greatFaceY211, greatFaceY221, greatFaceZ21, greatFaceZ22)
666 greatBlock31 = MakeHexaSolid(greatFaceX31, greatFaceX41, greatFaceY311, greatFaceY321, greatFaceZ31, greatFaceZ32)
668 greatBlock12 = MakeHexaSolid(greatFaceX12, greatFaceX22, greatFaceY112, greatFaceY122, greatFaceZ12, greatFaceZ13)
669 greatBlock22 = MakeHexaSolid(greatFaceX22, greatFaceX32, greatFaceY212, greatFaceY222, greatFaceZ22, greatFaceZ23)
670 greatBlock32 = MakeHexaSolid(greatFaceX32, greatFaceX42, greatFaceY312, greatFaceY322, greatFaceZ32, greatFaceZ33)
672 greatBlock13 = MakeHexaSolid(greatFaceX13, greatFaceX23, greatFaceY113, greatFaceY123, greatFaceZ13, greatFaceZ14)
673 greatBlock23 = MakeHexaSolid(greatFaceX23, greatFaceX33, greatFaceY213, greatFaceY223, greatFaceZ23, greatFaceZ24)
674 greatBlock33 = MakeHexaSolid(greatFaceX33, greatFaceX43, greatFaceY313, greatFaceY323, greatFaceZ33, greatFaceZ34)
681 l.append(greatBlock11)
682 l.append(greatBlock21)
683 l.append(greatBlock31)
684 l.append(greatBlock12)
685 l.append(greatBlock22)
686 l.append(greatBlock32)
687 l.append(greatBlock13)
688 l.append(greatBlock23)
689 l.append(greatBlock33)
691 piece = MakeCompound(l)
696 idpiece = addToStudy(piece, "Cubes2pyGibi")
697 #geompy.InsertOp.Export(piece,"piece.brep", "BREP")