1 // Created on: 1991-09-27
2 // Created by: Christophe MARION
3 // Copyright (c) 1991-1999 Matra Datavision
4 // Copyright (c) 1999-2012 OPEN CASCADE SAS
6 // The content of this file is subject to the Open CASCADE Technology Public
7 // License Version 6.5 (the "License"). You may not use the content of this file
8 // except in compliance with the License. Please obtain a copy of the License
9 // at http://www.opencascade.org and read it completely before using this file.
11 // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
14 // The Original Code and all software distributed under the License is
15 // distributed on an "AS IS" basis, without warranty of any kind, and the
16 // Initial Developer hereby disclaims all such warranties, including without
17 // limitation, any warranties of merchantability, fitness for a particular
18 // purpose or non-infringement. Please see the License for the specific terms
19 // and conditions governing the rights and limitations under the License.
22 #include <Precision.hxx>
29 #include <Standard_DomainError.hxx>
30 #include <Standard_OutOfRange.hxx>
35 #define Standard_True ((Standard_Boolean) 1)
36 #define Standard_False ((Standard_Boolean) 0)
43 static const Standard_Integer num[6] = {0,1,2,3,4,5};
44 static const Standard_Integer val[6] = {0,4,0,2,0,1};
45 static const Standard_Integer tab[6][6] = {{-1,-1, 0, 1, 8, 9},
52 //=======================================================================
53 //function : Primitives_Wedge_NumDir1
54 //purpose : when giving a direction return the range of the face
55 //=======================================================================
57 static Standard_Integer Primitives_Wedge_NumDir1
58 (const Primitives_Direction d1) { return num[d1]; }
60 //=======================================================================
61 //function : Primitives_Wedge_NumDir2
62 //purpose : when giving two directions return the range of the edge
63 //=======================================================================
65 static Standard_Integer Primitives_Wedge_NumDir2
66 (const Primitives_Direction d1,
67 const Primitives_Direction d2)
69 Standard_Integer i1 = Primitives_Wedge_NumDir1(d1);
70 Standard_Integer i2 = Primitives_Wedge_NumDir1(d2);
71 if ( i1/2 == i2/2 ) Standard_DomainError::Raise();
75 //=======================================================================
76 //function : Primitives_Wedge_NumDir3
77 //purpose : when giving three directions return the range of the vertex
78 //=======================================================================
80 static Standard_Integer Primitives_Wedge_NumDir3
81 (const Primitives_Direction d1,
82 const Primitives_Direction d2,
83 const Primitives_Direction d3)
85 Standard_Integer i1 = Primitives_Wedge_NumDir1(d1);
86 Standard_Integer i2 = Primitives_Wedge_NumDir1(d2);
87 Standard_Integer i3 = Primitives_Wedge_NumDir1(d3);
88 if (( i1/2 == i2/2 ) ||
90 ( i3/2 == i1/2 )) Standard_DomainError::Raise();
91 return val[i1]+val[i2]+val[i3];
94 //=======================================================================
95 //function : Primitives_Wedge_Check
96 //purpose : raise Standard_DomainError if something was built
97 //=======================================================================
99 static void Primitives_Wedge_Check(const Standard_Boolean V[],
100 const Standard_Boolean E[],
101 const Standard_Boolean W[],
102 const Standard_Boolean F[])
105 for (i = 0; i < NBVERTICES; i++)
106 if (V[i]) Standard_DomainError::Raise();
107 for (i = 0; i < NBEDGES; i++)
108 if (E[i]) Standard_DomainError::Raise();
109 for (i = 0; i < NBWIRES; i++)
110 if (W[i]) Standard_DomainError::Raise();
111 for (i = 0; i < NBFACES; i++)
112 if (F[i]) Standard_DomainError::Raise();
115 //=======================================================================
116 //function : Primitives_Wedge_Init
117 //purpose : Set arrays to Standard_False
118 //=======================================================================
120 static void Primitives_Wedge_Init(Standard_Boolean& S,
121 Standard_Boolean V[],
122 Standard_Boolean E[],
123 Standard_Boolean W[],
124 Standard_Boolean F[])
128 for (i = 0; i < NBVERTICES; i++)
129 V[i] = Standard_False;
130 for (i = 0; i < NBEDGES; i++)
131 E[i] = Standard_False;
132 for (i = 0; i < NBWIRES; i++)
133 W[i] = Standard_False;
134 for (i = 0; i < NBFACES; i++)
135 F[i] = Standard_False;
138 //=======================================================================
139 //function : Primitives_Wedge
140 //purpose : build a box
141 //=======================================================================
143 Primitives_Wedge::Primitives_Wedge (const TheBuilder& B,
145 const Standard_Real dx,
146 const Standard_Real dy,
147 const Standard_Real dz) :
161 for (Standard_Integer i = 0; i < NBFACES; i++) { myInfinite[i]=Standard_False; }
162 if ( ( dx <= Precision::Confusion() ) ||
163 ( dy <= Precision::Confusion() ) ||
164 ( dz <= Precision::Confusion() ) )
165 Standard_DomainError::Raise();
166 Primitives_Wedge_Init(ShellBuilt,VerticesBuilt,EdgesBuilt,
167 WiresBuilt,FacesBuilt);
170 //=======================================================================
171 //function : Primitives_Wedge
172 //purpose : build a STEP wedge
173 //=======================================================================
175 Primitives_Wedge::Primitives_Wedge (const TheBuilder& B,
177 const Standard_Real dx,
178 const Standard_Real dy,
179 const Standard_Real dz,
180 const Standard_Real ltx) :
194 for (Standard_Integer i = 0; i < NBFACES; i++) { myInfinite[i]=Standard_False; }
195 if ( ( dx <= Precision::Confusion() ) ||
196 ( dy <= Precision::Confusion() ) ||
197 ( dz <= Precision::Confusion() ) ||
199 Standard_DomainError::Raise();
200 Primitives_Wedge_Init(ShellBuilt,VerticesBuilt,EdgesBuilt,
201 WiresBuilt,FacesBuilt);
204 //=======================================================================
205 //function : Primitives_Wedge
206 //purpose : build a wedge by giving all the fields
207 //=======================================================================
209 Primitives_Wedge::Primitives_Wedge (const TheBuilder& B,
211 const Standard_Real xmin,
212 const Standard_Real ymin,
213 const Standard_Real zmin,
214 const Standard_Real z2min,
215 const Standard_Real x2min,
216 const Standard_Real xmax,
217 const Standard_Real ymax,
218 const Standard_Real zmax,
219 const Standard_Real z2max,
220 const Standard_Real x2max) :
234 for (Standard_Integer i = 0; i < NBFACES; i++) { myInfinite[i]=Standard_False; }
235 if ( ( XMax-XMin <= Precision::Confusion() ) ||
236 ( YMax-YMin <= Precision::Confusion() ) ||
237 ( ZMax-ZMin <= Precision::Confusion() ) ||
238 ( Z2Max-Z2Min < 0 ) ||
239 ( X2Max-X2Min < 0 ) )
240 Standard_DomainError::Raise();
241 Primitives_Wedge_Init(ShellBuilt,VerticesBuilt,EdgesBuilt,
242 WiresBuilt,FacesBuilt);
245 //=======================================================================
247 // GetXMin, GetYMin, GetZMin, GetZ2Min, GetX2Min
248 // GetXMax, GetYMax, GetZMax, GetZ2Max, GetX2Max
250 //=======================================================================
252 gp_Ax2 Primitives_Wedge::Axes () const { return myAxes; }
253 Standard_Real Primitives_Wedge::GetXMin () const { return XMin; }
254 Standard_Real Primitives_Wedge::GetYMin () const { return YMin; }
255 Standard_Real Primitives_Wedge::GetZMin () const { return ZMin; }
256 Standard_Real Primitives_Wedge::GetZ2Min () const { return Z2Min; }
257 Standard_Real Primitives_Wedge::GetX2Min () const { return X2Min; }
258 Standard_Real Primitives_Wedge::GetXMax () const { return XMax; }
259 Standard_Real Primitives_Wedge::GetYMax () const { return YMax; }
260 Standard_Real Primitives_Wedge::GetZMax () const { return ZMax; }
261 Standard_Real Primitives_Wedge::GetZ2Max () const { return Z2Max; }
262 Standard_Real Primitives_Wedge::GetX2Max () const { return X2Max; }
264 //=======================================================================
267 //=======================================================================
269 void Primitives_Wedge::Open (const Primitives_Direction d1)
271 Primitives_Wedge_Check(VerticesBuilt,EdgesBuilt,WiresBuilt,FacesBuilt);
272 myInfinite[Primitives_Wedge_NumDir1(d1)] = Standard_True;
275 //=======================================================================
278 //=======================================================================
280 void Primitives_Wedge::Close (const Primitives_Direction d1)
282 Primitives_Wedge_Check(VerticesBuilt,EdgesBuilt,WiresBuilt,FacesBuilt);
283 myInfinite[Primitives_Wedge_NumDir1(d1)] = Standard_False;
286 //=======================================================================
287 //function : IsInfinite
288 //purpose : true if it is open in the given direction
289 //=======================================================================
291 Standard_Boolean Primitives_Wedge::IsInfinite (const Primitives_Direction d1) const
292 { return myInfinite[Primitives_Wedge_NumDir1(d1)]; }
294 //=======================================================================
297 //=======================================================================
299 const TheShell& Primitives_Wedge::Shell() {
301 myBuilder.MakeShell(myShell);
303 if (HasFace(Primitives_XMin))
304 myBuilder.AddShellFace(myShell,Face(Primitives_XMin));
305 if (HasFace(Primitives_XMax))
306 myBuilder.AddShellFace(myShell,Face(Primitives_XMax));
307 if (HasFace(Primitives_YMin))
308 myBuilder.AddShellFace(myShell,Face(Primitives_YMin));
309 if (HasFace(Primitives_YMax))
310 myBuilder.AddShellFace(myShell,Face(Primitives_YMax));
311 if (HasFace(Primitives_ZMin))
312 myBuilder.AddShellFace(myShell,Face(Primitives_ZMin));
313 if (HasFace(Primitives_ZMax))
314 myBuilder.AddShellFace(myShell,Face(Primitives_ZMax));
316 myBuilder.CompleteShell(myShell);
317 ShellBuilt = Standard_True;
322 //=======================================================================
324 //purpose : true if the face exist in one direction
325 //=======================================================================
327 Standard_Boolean Primitives_Wedge::HasFace (const Primitives_Direction d1) const
329 Standard_Boolean state = !myInfinite[Primitives_Wedge_NumDir1(d1)];
330 if ( d1 == Primitives_YMax ) state = state && ( Z2Max != Z2Min )
331 && ( X2Max != X2Min );
335 //=======================================================================
338 //=======================================================================
340 gp_Pln Primitives_Wedge::Plane(const Primitives_Direction d1)
343 Standard_Integer i = Primitives_Wedge_NumDir1(d1);
346 gp_Vec VX = myAxes.XDirection();
347 gp_Vec VY = myAxes.YDirection();
348 gp_Vec VZ = myAxes.Direction();
353 D = myAxes.XDirection();
357 D = myAxes.YDirection();
361 D = myAxes.Direction();
365 Standard_Real X = 0., Y = 0., Z = 0.;
374 if ( X2Min != XMin ) D = gp_Dir((YMax-YMin)*VX+(XMin-X2Min)*VY);
382 if ( X2Max != XMax ) D = gp_Dir((YMax-YMin)*VX+(XMax-X2Max)*VY);
404 if ( Z2Min != ZMin ) D = gp_Dir((YMax-YMin)*VZ+(ZMin-Z2Min)*VY);
412 if ( Z2Max != ZMax ) D = gp_Dir((YMax-YMin)*VZ+(ZMax-Z2Max)*VY);
417 gp_Pnt P = myAxes.Location();
418 P.Translate(X*gp_Vec(myAxes.XDirection()));
419 P.Translate(Y*gp_Vec(myAxes.YDirection()));
420 P.Translate(Z*gp_Vec(myAxes.Direction ()));
425 //=======================================================================
427 //purpose : the face in one direction
428 //=======================================================================
430 const TheFace& Primitives_Wedge::Face
431 (const Primitives_Direction d1)
434 Standard_Integer i = Primitives_Wedge_NumDir1(d1);
436 if (!FacesBuilt[i]) {
437 gp_Pln P = Plane(d1);
438 myBuilder.MakeFace(myFaces[i],P);
439 if (HasWire(d1)) myBuilder.AddFaceWire(myFaces[i],Wire(d1));
440 if ( i%2 == 0 ) myBuilder.ReverseFace(myFaces[i]);
444 Primitives_Direction dd1 = Primitives_ZMin, dd2 = Primitives_YMax,
445 dd3 = Primitives_ZMax,dd4 = Primitives_YMin;
451 dd1 = Primitives_ZMin;
452 dd2 = Primitives_YMax;
453 dd3 = Primitives_ZMax;
454 dd4 = Primitives_YMin;
459 dd1 = Primitives_XMin;
460 dd2 = Primitives_ZMax;
461 dd3 = Primitives_XMax;
462 dd4 = Primitives_ZMin;
467 dd1 = Primitives_YMin;
468 dd2 = Primitives_XMax;
469 dd3 = Primitives_YMax;
470 dd4 = Primitives_XMin;
476 gp_Dir DX = P.XAxis().Direction();
477 gp_Dir DY = P.YAxis().Direction();
478 Standard_Real U,V,DU,DV;
479 if (HasEdge(d1,dd4)) {
481 ElSLib::Parameters(P,L.Location(),U,V);
482 DU = L.Direction() * DX;
483 DV = L.Direction() * DY;
484 myBuilder.SetPCurve(myEdges[Primitives_Wedge_NumDir2(d1,dd4)],
486 gp_Lin2d(gp_Pnt2d(U,V),gp_Dir2d(DU,DV)));
488 if (HasEdge(d1,dd3)) {
490 ElSLib::Parameters(P,L.Location(),U,V);
491 DU = L.Direction() * DX;
492 DV = L.Direction() * DY;
493 myBuilder.SetPCurve(myEdges[Primitives_Wedge_NumDir2(d1,dd3)],
495 gp_Lin2d(gp_Pnt2d(U,V),gp_Dir2d(DU,DV)));
498 if (HasEdge(d1,dd2)) {
500 ElSLib::Parameters(P,L.Location(),U,V);
501 DU = L.Direction() * DX;
502 DV = L.Direction() * DY;
503 myBuilder.SetPCurve(myEdges[Primitives_Wedge_NumDir2(d1,dd2)],
505 gp_Lin2d(gp_Pnt2d(U,V),gp_Dir2d(DU,DV)));
508 if (HasEdge(d1,dd1)) {
510 ElSLib::Parameters(P,L.Location(),U,V);
511 DU = L.Direction() * DX;
512 DV = L.Direction() * DY;
513 myBuilder.SetPCurve(myEdges[Primitives_Wedge_NumDir2(d1,dd1)],
515 gp_Lin2d(gp_Pnt2d(U,V),gp_Dir2d(DU,DV)));
519 myBuilder.CompleteFace(myFaces[i]);
520 FacesBuilt[i] = Standard_True;
527 //=======================================================================
530 //=======================================================================
532 Standard_Boolean Primitives_Wedge::HasWire (const Primitives_Direction d1) const
534 Standard_Integer i = Primitives_Wedge_NumDir1(d1);
536 if (myInfinite[i]) return Standard_False;
537 Primitives_Direction dd1 = Primitives_XMin,dd2 = Primitives_YMax,dd3 = Primitives_XMax ,dd4 = Primitives_ZMin;
543 dd1 = Primitives_ZMin;
544 dd2 = Primitives_YMax;
545 dd3 = Primitives_ZMax;
546 dd4 = Primitives_YMin;
551 dd1 = Primitives_XMin;
552 dd2 = Primitives_ZMax;
553 dd3 = Primitives_XMax;
554 dd4 = Primitives_ZMin;
559 dd1 = Primitives_YMin;
560 dd2 = Primitives_XMax;
561 dd3 = Primitives_YMax;
562 dd4 = Primitives_XMin;
570 return HasEdge(d1,dd1)||HasEdge(d1,dd2)||HasEdge(d1,dd3)||HasEdge(d1,dd4);
574 //=======================================================================
577 //=======================================================================
579 const TheWire& Primitives_Wedge::Wire
580 (const Primitives_Direction d1)
582 Standard_Integer i = Primitives_Wedge_NumDir1(d1);
584 Primitives_Direction dd1 = Primitives_XMin,dd2 = Primitives_YMax,dd3 = Primitives_XMax ,dd4 = Primitives_ZMin;
586 if (!WiresBuilt[i]) {
592 dd1 = Primitives_ZMin;
593 dd2 = Primitives_YMax;
594 dd3 = Primitives_ZMax;
595 dd4 = Primitives_YMin;
600 dd1 = Primitives_XMin;
601 dd2 = Primitives_ZMax;
602 dd3 = Primitives_XMax;
603 dd4 = Primitives_ZMin;
608 dd1 = Primitives_YMin;
609 dd2 = Primitives_XMax;
610 dd3 = Primitives_YMax;
611 dd4 = Primitives_XMin;
619 myBuilder.MakeWire(myWires[i]);
622 myBuilder.AddWireEdge(myWires[i],Edge(d1,dd4),Standard_False);
624 myBuilder.AddWireEdge(myWires[i],Edge(d1,dd3),Standard_False);
626 myBuilder.AddWireEdge(myWires[i],Edge(d1,dd2),Standard_True );
628 myBuilder.AddWireEdge(myWires[i],Edge(d1,dd1),Standard_True );
630 myBuilder.CompleteWire(myWires[i]);
631 WiresBuilt[i] = Standard_True;
638 //=======================================================================
641 //=======================================================================
643 Standard_Boolean Primitives_Wedge::HasEdge (const Primitives_Direction d1,
644 const Primitives_Direction d2) const
646 Standard_Boolean state = !(myInfinite[Primitives_Wedge_NumDir1(d1)] ||
647 myInfinite[Primitives_Wedge_NumDir1(d2)]);
648 Standard_Integer i = Primitives_Wedge_NumDir2(d1,d2);
649 if ( i == 6 || i == 7 ) state = state && ( X2Max != X2Min );
650 else if ( i == 1 || i == 3 ) state = state && ( Z2Max != Z2Min );
654 //=======================================================================
657 //=======================================================================
659 gp_Lin Primitives_Wedge::Line
660 (const Primitives_Direction d1,
661 const Primitives_Direction d2)
663 if (!HasEdge(d1,d2)) Standard_DomainError::Raise();
665 Standard_Integer i = Primitives_Wedge_NumDir2(d1,d2);
667 Standard_Real X =0., Y =0., Z =0.;
670 gp_Vec VX = myAxes.XDirection();
671 gp_Vec VY = myAxes.YDirection();
672 gp_Vec VZ = myAxes.Direction();
673 Primitives_Direction dd1,dd2;
678 D = myAxes.Direction();
679 dd1 = Primitives_ZMin;
680 dd2 = Primitives_ZMax;
684 D = myAxes.XDirection();
685 dd1 = Primitives_XMin;
686 dd2 = Primitives_XMax;
690 D = myAxes.YDirection();
691 dd1 = Primitives_YMin;
692 dd2 = Primitives_YMax;
760 if ( (XMin != X2Min) || (ZMin != Z2Min) )
761 D = gp_Vec( (X2Min-XMin)*VX + (YMax-YMin)*VY + (Z2Min-ZMin)*VZ);
769 if ( (XMin != X2Min) || (ZMax != Z2Max) )
770 D = gp_Vec( (X2Min-XMin)*VX + (YMax-YMin)*VY + (Z2Max-ZMax)*VZ);
778 if ( (XMax != X2Max) || (ZMin != Z2Min) )
779 D = gp_Vec( (X2Max-XMax)*VX + (YMax-YMin)*VY + (Z2Min-ZMin)*VZ);
787 if ( (XMax != X2Max) || (ZMax != Z2Max) )
788 D = gp_Vec(gp_Pnt(XMax,YMin,ZMax),gp_Pnt(X2Max,YMax,Z2Max));
789 D = gp_Vec( (X2Max-XMax)*VX + (YMax-YMin)*VY + (Z2Max-ZMax)*VZ);
794 gp_Pnt P = myAxes.Location();
795 P.Translate(X*gp_Vec(myAxes.XDirection()));
796 P.Translate(Y*gp_Vec(myAxes.YDirection()));
797 P.Translate(Z*gp_Vec(myAxes.Direction ()));
798 return gp_Lin(gp_Ax1(P,D));
802 //=======================================================================
805 //=======================================================================
807 const TheEdge& Primitives_Wedge::Edge
808 (const Primitives_Direction d1,
809 const Primitives_Direction d2)
811 if (!HasEdge(d1,d2)) Standard_DomainError::Raise();
813 Standard_Integer i = Primitives_Wedge_NumDir2(d1,d2);
815 if (!EdgesBuilt[i]) {
817 Primitives_Direction dd1 = Primitives_XMin ,dd2 = Primitives_XMax;
822 dd1 = Primitives_ZMin;
823 dd2 = Primitives_ZMax;
827 dd1 = Primitives_XMin;
828 dd2 = Primitives_XMax;
832 dd1 = Primitives_YMin;
833 dd2 = Primitives_YMax;
841 gp_Lin L = Line(d1,d2);
842 myBuilder.MakeEdge(myEdges[i],L);
844 if (HasVertex(d1,d2,dd2)) {
845 myBuilder.AddEdgeVertex(myEdges[i],Vertex(d1,d2,dd2),
846 ElCLib::Parameter(L,Point(d1,d2,dd2)),
849 if (HasVertex(d1,d2,dd1)) {
850 myBuilder.AddEdgeVertex(myEdges[i],Vertex(d1,d2,dd1),
851 ElCLib::Parameter(L,Point(d1,d2,dd1)),
855 if ( Z2Max == Z2Min ) {
857 myEdges[7] = myEdges[6];
858 EdgesBuilt[7] = Standard_True;
861 myEdges[6] = myEdges[7];
862 EdgesBuilt[6] = Standard_True;
865 if ( X2Max == X2Min ) {
867 myEdges[3] = myEdges[1];
868 EdgesBuilt[3] = Standard_True;
871 myEdges[1] = myEdges[3];
872 EdgesBuilt[1] = Standard_True;
876 myBuilder.CompleteEdge(myEdges[i]);
877 EdgesBuilt[i] = Standard_True;
884 //=======================================================================
885 //function : HasVertex
887 //=======================================================================
889 Standard_Boolean Primitives_Wedge::HasVertex
890 (const Primitives_Direction d1,
891 const Primitives_Direction d2,
892 const Primitives_Direction d3) const
893 { return !(myInfinite[Primitives_Wedge_NumDir1(d1)] ||
894 myInfinite[Primitives_Wedge_NumDir1(d2)] ||
895 myInfinite[Primitives_Wedge_NumDir1(d3)]); }
897 //=======================================================================
900 //=======================================================================
902 gp_Pnt Primitives_Wedge::Point
903 (const Primitives_Direction d1,
904 const Primitives_Direction d2,
905 const Primitives_Direction d3)
907 if (!HasVertex(d1,d2,d3)) Standard_DomainError::Raise();
909 Standard_Integer i = Primitives_Wedge_NumDir3(d1,d2,d3);
911 Standard_Real X =0., Y =0., Z =0.;
965 gp_Pnt P = myAxes.Location();
966 P.Translate(X*gp_Vec(myAxes.XDirection()));
967 P.Translate(Y*gp_Vec(myAxes.YDirection()));
968 P.Translate(Z*gp_Vec(myAxes.Direction ()));
972 //=======================================================================
975 //=======================================================================
977 const TheVertex& Primitives_Wedge::Vertex
978 (const Primitives_Direction d1,
979 const Primitives_Direction d2,
980 const Primitives_Direction d3)
982 if (!HasVertex(d1,d2,d3)) Standard_DomainError::Raise();
984 Standard_Integer i = Primitives_Wedge_NumDir3(d1,d2,d3);
986 if (!VerticesBuilt[i]) {
988 myBuilder.MakeVertex(myVertices[i],Point(d1,d2,d3));
990 if ( Z2Max == Z2Min ) {
991 if ( i == 2 || i == 6 ) {
992 myVertices[3] = myVertices[2];
993 myVertices[7] = myVertices[6];
994 VerticesBuilt[3] = Standard_True;
995 VerticesBuilt[7] = Standard_True;
997 else if ( i == 3 || i == 7 ) {
998 myVertices[2] = myVertices[3];
999 myVertices[6] = myVertices[7];
1000 VerticesBuilt[2] = Standard_True;
1001 VerticesBuilt[6] = Standard_True;
1004 if ( X2Max == X2Min ) {
1005 if ( i == 2 || i == 3 ) {
1006 myVertices[6] = myVertices[2];
1007 myVertices[7] = myVertices[3];
1008 VerticesBuilt[6] = Standard_True;
1009 VerticesBuilt[7] = Standard_True;
1011 else if ( i == 6 || i == 7 ) {
1012 myVertices[2] = myVertices[6];
1013 myVertices[3] = myVertices[7];
1014 VerticesBuilt[2] = Standard_True;
1015 VerticesBuilt[3] = Standard_True;
1019 VerticesBuilt[i] = Standard_True;
1022 return myVertices[i];