1 // File: BRepFill_Generator.cxx
2 // Created: Mon Mar 7 10:01:42 1994
3 // Author: Bruno DUMORTIER
6 #include <BRepFill_Generator.ixx>
8 #include <TopoDS_Face.hxx>
9 #include <TopoDS_Wire.hxx>
10 #include <TopoDS_Edge.hxx>
11 #include <TopoDS_Vertex.hxx>
12 #include <BRep_Builder.hxx>
13 #include <TopLoc_Location.hxx>
14 #include <TopExp_Explorer.hxx>
15 #include <gp_Pnt2d.hxx>
16 #include <gp_Dir2d.hxx>
19 #include <gp_Circ.hxx>
21 #include <GeomAbs_Shape.hxx>
22 #include <GeomAdaptor_Curve.hxx>
23 #include <Geom_Circle.hxx>
24 #include <Geom_Line.hxx>
25 #include <Geom_Curve.hxx>
26 #include <Geom_BezierCurve.hxx>
27 #include <Geom_TrimmedCurve.hxx>
28 #include <Geom_Surface.hxx>
29 #include <Geom_Plane.hxx>
30 #include <Geom_CylindricalSurface.hxx>
31 #include <Geom_ConicalSurface.hxx>
32 #include <Geom_RectangularTrimmedSurface.hxx>
33 #include <Geom2d_Line.hxx>
34 #include <Geom2d_BezierCurve.hxx>
35 #include <GeomFill_Generator.hxx>
37 #include <TopTools_DataMapOfShapeShape.hxx>
38 #include <GeomFill.hxx>
39 #include <BRep_Tool.hxx>
42 #include <Precision.hxx>
43 #include <BRepLib.hxx>
45 #include <TColgp_Array1OfPnt.hxx>
46 #include <TColgp_Array1OfPnt2d.hxx>
47 #include <Geom_BSplineCurve.hxx>
49 #include <GeomConvert.hxx>
51 #include <BRepTools_WireExplorer.hxx>
52 #include <BRepTools.hxx>
56 //=======================================================================
57 //function : DetectKPart
59 //=======================================================================
61 Standard_Integer DetectKPart(const TopoDS_Edge& Edge1,
62 const TopoDS_Edge& Edge2)
65 Standard_Integer IType = 0;
67 // characteristics of the first edge
68 Standard_Real first1, last1, first2, last2, ff, ll;
71 Handle(Geom_Curve) curv1, curv;
72 GeomAdaptor_Curve AdC1;
73 Standard_Boolean degen1 = BRep_Tool::Degenerated(Edge1);
75 // find the particular case
79 Standard_Real dist1 =0.;
87 TopExp::Vertices(Edge1,V1,V2);
88 pos1 = BRep_Tool::Pnt(V1);
91 curv1 = BRep_Tool::Curve(Edge1, loc, first1, last1);
93 Handle(Geom_Curve)::DownCast(curv1->Transformed(loc.Transformation()));
96 if (Edge1.Orientation() == TopAbs_REVERSED) {
98 first1 = curv1->ReversedParameter(ll);
99 last1 = curv1->ReversedParameter(ff);
102 if (AdC1.GetType() == GeomAbs_Circle) {
103 // first circular section
105 pos1 = AdC1.Circle().Location();
106 dist1 = AdC1.Circle().Radius();
107 axe1 = AdC1.Circle().Axis();
109 else if (AdC1.GetType() == GeomAbs_Line) {
110 // first straight line section
112 pos1 = AdC1.Line().Location();
113 dist1 = AdC1.Value(first1).Distance(AdC1.Value(last1));
114 gp_Vec vec(AdC1.Value(first1),AdC1.Value(last1));
116 axe1 = gp_Ax1(AdC1.Value(first1),dir);
119 // first section of any type
126 Standard_Boolean degen2 = BRep_Tool::Degenerated(Edge2);
128 TopExp::Vertices(Edge2,V1,V2);
129 pos = BRep_Tool::Pnt(V1);
131 // the only particular case with degenerated edge at end : the cone
132 if (pos.IsEqual(pos1,Precision::Confusion())) {
133 // the top is mixed with the center of the circle
137 gp_Vec vec(pos1,pos);
139 axe = gp_Ax1(pos1,dir);
140 if (axe.IsParallel(axe1,Precision::Angular())) {
141 // the top is on the axis of the circle
145 // incorrect top --> no particular case
150 else if (IType != 4) { //not a plane
151 // no particular case
156 curv = BRep_Tool::Curve(Edge2, loc, first2, last2);
158 Handle(Geom_Curve)::DownCast(curv->Transformed(loc.Transformation()));
161 if (Edge2.Orientation() == TopAbs_REVERSED) {
163 first2 = curv->ReversedParameter(ll);
164 last2 = curv->ReversedParameter(ff);
166 GeomAdaptor_Curve AdC(curv);
168 if (IType>0 && IType<4) {
169 if (AdC.GetType() != GeomAbs_Circle) {
170 // section not circular --> no particular case
174 if (AdC.Circle().Axis()
175 .IsCoaxial(axe1,Precision::Angular(),Precision::Confusion())) {
177 if (Abs(AdC.Circle().Radius()-dist1)< Precision::Confusion()) {
178 // possibility of cylinder or a piece of cylinder
179 Standard_Real h1 = Abs(last1-first1), h2 = Abs(last2-first2);
180 Standard_Boolean Same,
181 SameParametricLength = ( Abs(h1-h2) < Precision::PConfusion() );
182 Standard_Real m1=(first1+last1)/2., m2=(first2+last2)/2.;
187 Same = SameParametricLength
188 && ( gp_Vec(P1,P2).IsNormal(DU,Precision::Angular()) ) ;
190 // cylinder or piece of cylinder
194 // the interval of definition is not correct
199 // possibility of cone truncation
200 Standard_Real h1 = Abs(last1-first1), h2 = Abs(last2-first2);
201 Standard_Boolean Same,
202 SameParametricLength = ( Abs(h1-h2) < Precision::PConfusion() );
203 Standard_Real m1=(first1+last1)/2., m2=(first2+last2)/2.;
208 Same = SameParametricLength
209 && ( gp_Vec(P1,P2).IsNormal(DU,Precision::Angular()) ) ;
211 // truncation of cone
215 // the interval of definition is not correct
219 if (AdC.Circle().Location().IsEqual(pos1,Precision::Confusion())) {
220 // the centers are mixed
226 if (AdC.Circle().Radius()==dist1) {
231 // different radius --> no particular case
238 if (AdC.GetType() != GeomAbs_Line) {
239 // not a straight line section --> no particular case
243 pos = AdC.Line().Location();
244 dist = AdC.Value(first2).Distance(AdC.Value(last2));
245 gp_Vec vec(AdC.Value(first2),AdC.Value(last2));
247 axe = gp_Ax1(AdC.Value(first2),dir);
248 if (axe.IsParallel(axe1,Precision::Angular())) {
249 // parallel straight line
250 if (Abs(dist-dist1)<Precision::Confusion()) {
251 gp_Dir dir(gp_Vec(AdC1.Value(first1),AdC.Value(first2)));
252 if (dir.IsNormal(gp_Dir(vec),Precision::Angular())) {
262 // different length --> no particular case
267 // not parallel straight line --> no particular case
272 else if (IType==-2) {
273 if (AdC.GetType() == GeomAbs_Line)
275 else if (AdC.GetType() == GeomAbs_Circle)
277 // the only particular case with degenerated edge at the beginning the cone
278 pos = AdC.Circle().Location();
279 axe = AdC.Circle().Axis();
280 if (pos1.IsEqual(pos,Precision::Confusion())) {
281 // the top is mixed with the center of the circle
285 gp_Vec vec(pos1,pos);
287 axe1 = gp_Ax1(pos1,dir);
288 if (axe.IsParallel(axe1,Precision::Angular())) {
289 // the top is on the axis of the circle
293 // incorrect top --> no particular case
304 // torus and extrusion are not particular cases.
305 if (IType == 3 || IType == 5) IType = 0;
310 //=======================================================================
311 //function : CreateKPart
313 //=======================================================================
315 void CreateKPart(const TopoDS_Edge& Edge1,const TopoDS_Edge& Edge2,
316 const Standard_Integer IType,
317 Handle(Geom_Surface)& Surf)
319 // find the dimension
320 TopoDS_Vertex V1, V2;
323 Standard_Real a1, b1, aa =0., bb =0.;
324 TopoDS_Vertex v1f,v1l,v2f,v2l;
326 // find characteristics of the first edge
327 Handle(Geom_Curve) C1;
328 Standard_Boolean degen1 = BRep_Tool::Degenerated(Edge1);
330 // cone with degenerated edge at the top
331 TopExp::Vertices(Edge1,v1f,v1l);
334 C1 = BRep_Tool::Curve(Edge1, loc, a1, b1);
335 C1 = Handle(Geom_Curve)::DownCast(C1->Transformed(loc.Transformation()));
338 if (Edge1.Orientation() == TopAbs_REVERSED) {
340 aa = C1->ReversedParameter(b1);
341 bb = C1->ReversedParameter(a1);
342 TopExp::Vertices(Edge1,v1l,v1f);
345 TopExp::Vertices(Edge1,v1f,v1l);
349 // find characteristics of the second edge
350 Handle(Geom_Curve) C2;
351 Standard_Boolean degen2 = BRep_Tool::Degenerated(Edge2);
353 // cone with degenerated edge at the top
354 TopExp::Vertices(Edge2,v2f,v2l);
357 C2 = BRep_Tool::Curve(Edge2, loc, a1, b1);
358 C2 = Handle(Geom_Curve)::DownCast(C2->Transformed(loc.Transformation()));
359 if (Edge2.Orientation() == TopAbs_REVERSED) {
365 TopExp::Vertices(Edge2,v2l,v2f);
369 aa = a1; //C2->ReversedParameter(b1);
370 bb = b1; //C2->ReversedParameter(a1);
372 TopExp::Vertices(Edge2,v2f,v2l);
376 // create the new surface
380 TopoDS_Edge edge1, edge2, edge3, edge4, couture;
385 TopoDS_Wire newW1, newW2;
386 BRep_Builder BW1, BW2;
391 // calculate the surface
392 Handle(Geom_Surface) surface;
393 Standard_Real V, Rad;
395 // cylindrical surface
396 gp_Circ c1 = (Handle(Geom_Circle)::DownCast(C1))->Circ();
397 gp_Circ c2 = (Handle(Geom_Circle)::DownCast(C2))->Circ();
398 gp_Ax3 Ac1 = c1.Position();
399 V = gp_Vec( c1.Location(),c2.Location()).Dot(gp_Vec(Ac1.Direction()));
404 Handle(Geom_CylindricalSurface) Cyl =
405 new Geom_CylindricalSurface( Ac1, c1.Radius());
406 surface = new Geom_RectangularTrimmedSurface
407 ( Cyl, aa, bb, Min(0.,V), Max(0.,V) );
411 gp_Circ k1 = (Handle(Geom_Circle)::DownCast(C1))->Circ();
412 gp_Ax3 Ak1 = k1.Position();
414 V = gp_Vec( k1.Location(),BRep_Tool::Pnt(v2f))
415 .Dot(gp_Vec(Ak1.Direction()));
419 gp_Circ k2 = (Handle(Geom_Circle)::DownCast(C2))->Circ();
420 V = gp_Vec( k1.Location(),k2.Location()).Dot(gp_Vec(Ak1.Direction()));
421 Rad = k2.Radius() - k1.Radius();
428 Standard_Real Ang = ATan( Rad / V);
429 Handle(Geom_ConicalSurface) Cone =
430 new Geom_ConicalSurface( Ak1, Ang, k1.Radius());
432 surface = new Geom_RectangularTrimmedSurface
433 ( Cone, aa, bb, Min(0.,V), Max(0.,V) );
435 else if (IType==-2) {
436 // conical surface with the top at the beginning (degen1 is true)
437 gp_Circ k2 = (Handle(Geom_Circle)::DownCast(C2))->Circ();
438 gp_Ax3 Ak2 = k2.Position();
439 Ak2.SetLocation(BRep_Tool::Pnt(v1f));
440 V = gp_Vec(BRep_Tool::Pnt(v1f),k2.Location())
441 .Dot(gp_Vec(Ak2.Direction()));
442 Rad = k2.Radius(); // - k2.Radius();
447 Standard_Real Ang = ATan( Rad / V);
448 Handle(Geom_ConicalSurface) Cone =
449 new Geom_ConicalSurface( Ak2, Ang, 0.);
451 surface = new Geom_RectangularTrimmedSurface
452 ( Cone, aa, bb, Min(0.,V), Max(0.,V) );
459 gp_Lin L1, L2, aLine;
462 L1 = (Handle(Geom_Line)::DownCast(C1))->Lin();
467 L2 = (Handle(Geom_Line)::DownCast(C2))->Lin();
471 gp_Pnt P1 = (degen1)? BRep_Tool::Pnt(v1f) : L1.Location();
472 gp_Pnt P2 = (degen2)? BRep_Tool::Pnt(v2f) : L2.Location();
474 gp_Vec P1P2( P1, P2 );
475 gp_Dir D1 = aLine.Direction();
476 gp_Ax3 Ax( aLine.Location(), gp_Dir(D1.Crossed(P1P2)), D1 );
477 Handle(Geom_Plane) Plan = new Geom_Plane(Ax);
478 V = P1P2.Dot( Ax.YDirection());
480 //surface = new Geom_RectangularTrimmedSurface
481 //( Plan, aa, bb, Min(0.,V), Max(0.,V) );
484 // surface of extrusion ?
493 //=======================================================================
494 //function : BRepFill_Generator
496 //=======================================================================
498 BRepFill_Generator::BRepFill_Generator()
503 //=======================================================================
506 //=======================================================================
508 void BRepFill_Generator::AddWire(const TopoDS_Wire& Wire)
510 myWires.Append( Wire);
514 //=======================================================================
517 //=======================================================================
519 void BRepFill_Generator::Perform()
524 TopoDS_Edge Edge1, Edge2, Edge3, Edge4, Couture;
527 B.MakeShell(myShell);
529 Standard_Integer Nb = myWires.Length();
531 BRepTools_WireExplorer ex1,ex2;
533 Standard_Boolean wPoint1, wPoint2, uClosed, DegenFirst, DegenLast;
535 for ( Standard_Integer i = 1; i <= Nb-1; i++) {
537 TopoDS_Wire Wire1 = TopoDS::Wire(myWires( i ));
538 TopoDS_Wire Wire2 = TopoDS::Wire(myWires(i+1));
540 wPoint1 = Standard_False;
542 wPoint1 = Standard_True;
543 for(ex1.Init(Wire1); ex1.More(); ex1.Next()) {
544 wPoint1 = wPoint1 && (BRep_Tool::Degenerated(ex1.Current()));
546 DegenFirst = wPoint1;
548 TopoDS_Vertex V1, V2;
549 TopExp::Vertices(Wire1, V1, V2);
550 uClosed = V1.IsSame(V2);
553 wPoint2 = Standard_False;
555 wPoint2 = Standard_True;
556 for(ex2.Init(Wire2); ex2.More(); ex2.Next()) {
557 wPoint2 = wPoint2 && (BRep_Tool::Degenerated(ex2.Current()));
565 TopTools_DataMapOfShapeShape Map;
567 Standard_Boolean tantque = ex1.More() && ex2.More();
571 TopoDS_Vertex V1f,V1l,V2f,V2l, Vf_toMap, Vl_toMap;
573 Standard_Boolean degen1
574 = BRep_Tool::Degenerated(TopoDS::Edge(ex1.Current()));
575 Standard_Boolean degen2
576 = BRep_Tool::Degenerated(TopoDS::Edge(ex2.Current()));
579 TopoDS_Shape aLocalShape = ex1.Current().EmptyCopied();
580 Edge1 = TopoDS::Edge(aLocalShape);
581 // Edge1 = TopoDS::Edge(ex1.Current().EmptyCopied());
582 // aLocalShape = ex1.Current();
583 // TopExp::Vertices(TopoDS::Edge(aLocalShape),V1f,V1l);
584 TopExp::Vertices(TopoDS::Edge(ex1.Current()),V1f,V1l);
585 V1f.Orientation(TopAbs_FORWARD);
587 V1l.Orientation(TopAbs_REVERSED);
592 TopoDS_Shape aLocalShape = ex1.Current();
593 Edge1 = TopoDS::Edge(aLocalShape);
594 // Edge1 = TopoDS::Edge(ex1.Current());
598 TopoDS_Shape aLocalShape = ex2.Current().EmptyCopied();
599 Edge2 = TopoDS::Edge(aLocalShape);
600 // Edge2 = TopoDS::Edge(ex2.Current().EmptyCopied());
601 TopExp::Vertices(TopoDS::Edge(ex2.Current()),V2f,V2l);
602 V2f.Orientation(TopAbs_FORWARD);
604 V2l.Orientation(TopAbs_REVERSED);
609 Edge2 = TopoDS::Edge(ex2.Current());
612 Standard_Boolean Periodic
613 = (Edge1.Closed() || degen1) && (Edge2.Closed() || degen2);
614 // ATTENTION : a non-punctual wire should not
615 // contain a punctual edge
616 if (!wPoint1) ex1.Next();
617 if (!wPoint2) ex2.Next();
619 // initialization of vertices
620 Handle(Geom_Surface) Surf;
621 Standard_Real f1=0, l1=1, f2=0, l2=1;
622 if (Edge1.Orientation() == TopAbs_REVERSED)
623 TopExp::Vertices(Edge1,V1l,V1f);
625 TopExp::Vertices(Edge1,V1f,V1l);
626 if (Edge2.Orientation() == TopAbs_REVERSED)
627 TopExp::Vertices(Edge2,V2l,V2f);
629 TopExp::Vertices(Edge2,V2f,V2l);
642 Standard_Boolean E1IsReallyClosed = BRepTools::Compare(V1f,V1l);
643 Standard_Boolean E2IsReallyClosed = BRepTools::Compare(V2f,V2l);
645 = (E1IsReallyClosed || degen1) && (E2IsReallyClosed || degen2);
647 // processing of KPart
648 Standard_Integer IType = DetectKPart(Edge1,Edge2);
651 TopLoc_Location L,L1,L2;
653 Handle(Geom_Curve) C1, C2;
654 TColgp_Array1OfPnt Extremities(1,2);
657 Extremities(1) = BRep_Tool::Pnt(V1f);
658 Extremities(2) = BRep_Tool::Pnt(V1l);
659 C1 = new Geom_BezierCurve(Extremities);
662 C1 = BRep_Tool::Curve(Edge1,L1,f1,l1);
665 Extremities(1) = BRep_Tool::Pnt(V2l);
666 Extremities(2) = BRep_Tool::Pnt(V2f);
667 C2 = new Geom_BezierCurve(Extremities);
670 C2 = BRep_Tool::Curve(Edge2,L2,f2,l2);
673 // compute the location
674 Standard_Boolean SameLoc = Standard_False;
676 // transform and trim the curves
678 if (Abs(f1 - C1->FirstParameter()) > Precision::PConfusion() ||
679 Abs(l1 - C1->LastParameter()) > Precision::PConfusion() ) {
680 C1 = new Geom_TrimmedCurve(C1,f1,l1);
683 C1 = Handle(Geom_Curve)::DownCast(C1->Copy());
685 if (!SameLoc) C1->Transform(L1.Transformation());
686 if (Edge1.Orientation() == TopAbs_REVERSED) {
690 if (Abs(f2 - C2->FirstParameter()) > Precision::PConfusion() ||
691 Abs(l2 - C2->LastParameter()) > Precision::PConfusion() ) {
692 C2 = new Geom_TrimmedCurve(C2,f2,l2);
695 C2 = Handle(Geom_Curve)::DownCast(C2->Copy());
697 if (!SameLoc) C2->Transform(L2.Transformation());
698 if (Edge2.Orientation() == TopAbs_REVERSED) {
702 GeomFill_Generator Generator;
703 Generator.AddCurve( C1);
704 Generator.AddCurve( C2);
705 Generator.Perform( Precision::PConfusion());
707 Surf = Generator.Surface();
708 B.MakeFace(Face,Surf,Precision::Confusion());
712 CreateKPart(Edge1,Edge2,IType,Surf);
713 B.MakeFace(Face,Surf,Precision::Confusion());
716 // make the missing edges
717 Standard_Real first,last;
718 Surf->Bounds(f1,l1,f2,l2);
720 if ( Map.IsBound(Vf_toMap)) {
721 TopoDS_Shape aLocalShape = Map(Vf_toMap).Reversed();
722 Edge3 = TopoDS::Edge(aLocalShape);
723 // Edge3 = TopoDS::Edge(Map(V1f).Reversed());
726 Handle(Geom_Curve) CC;
727 TColgp_Array1OfPnt Extremities(1,2);
729 // general case : Edge3 corresponds to iso U=f1
735 // particular case : it is required to calculate the curve 3d
736 Extremities(1) = BRep_Tool::Pnt(V1f);
737 Extremities(2) = BRep_Tool::Pnt(V2f);
738 CC = new Geom_BezierCurve(Extremities);
742 B.MakeEdge(Edge3,CC,Precision::Confusion());
743 V1f.Orientation(TopAbs_FORWARD);
745 V2f.Orientation(TopAbs_REVERSED);
747 B.Range(Edge3,first,last);
749 Map.Bind(Vf_toMap, Edge3);
752 Standard_Boolean CommonEdge = Standard_False;
753 if ( Map.IsBound(Vl_toMap) ) {
754 TopoDS_Shape aLocalShape = Map(Vl_toMap).Reversed();
755 const TopoDS_Edge CommonE = TopoDS::Edge(aLocalShape);
756 // const TopoDS_Edge CommonE = TopoDS::Edge(Map(V1l).Reversed());
757 TopoDS_Vertex V1, V2;
758 TopExp::Vertices(CommonE,V1,V2);
759 CommonEdge = V1.IsSame(V1l) && V2.IsSame(V2l);
762 TopoDS_Shape aLocalShape = Map(Vl_toMap).Reversed();
763 Edge4 = TopoDS::Edge(aLocalShape);
764 // Edge4 = TopoDS::Edge(Map(V1l).Reversed());
767 Handle(Geom_Curve) CC;
768 TColgp_Array1OfPnt Extremities(1,2);
770 // general case : Edge4 corresponds to iso U=l1
776 // particular case : it is required to calculate the curve 3d
777 Extremities(1) = BRep_Tool::Pnt(V1l);
778 Extremities(2) = BRep_Tool::Pnt(V2l);
779 CC = new Geom_BezierCurve(Extremities);
783 B.MakeEdge(Edge4,CC,Precision::Confusion());
784 V1l.Orientation(TopAbs_FORWARD);
786 V2l.Orientation(TopAbs_REVERSED);
788 B.Range(Edge4,first,last);
789 Map.Bind(Vl_toMap, Edge4);
797 if (! (degen1 && IType == 4))
800 if (! (degen2 && IType == 4))
801 B.Add(W,Edge2.Reversed());
808 // complete myMap for edge1
809 if (! (degen1 && IType == 4))
811 TopTools_ListOfShape Empty;
812 if (!myMap.IsBound(Edge1)) myMap.Bind(Edge1,Empty);
813 myMap(Edge1).Append(Face);
818 Standard_Real T = Precision::Confusion();
820 if (IType != 4) //not plane
822 if ( Edge1.Orientation() == TopAbs_REVERSED ) {
824 new Geom2d_Line(gp_Pnt2d(0,f2),gp_Dir2d(-1,0)),
826 B.Range(Edge1,Face,-l1,-f1);
830 new Geom2d_Line(gp_Pnt2d(0,f2),gp_Dir2d(1,0)),
832 B.Range(Edge1,Face,f1,l1);
835 if ( Edge2.Orientation() == TopAbs_REVERSED ) {
837 new Geom2d_Line(gp_Pnt2d(0,l2),gp_Dir2d(-1,0)),
839 B.Range(Edge2,Face,-l1,-f1);
843 new Geom2d_Line(gp_Pnt2d(0,l2),gp_Dir2d(1,0)),
845 B.Range(Edge2,Face,f1,l1);
852 new Geom2d_Line(gp_Pnt2d(l1,0),gp_Dir2d(0,1)),
853 new Geom2d_Line(gp_Pnt2d(f1,0),gp_Dir2d(0,1)),
858 new Geom2d_Line(gp_Pnt2d(f1,0),gp_Dir2d(0,1)),
861 new Geom2d_Line(gp_Pnt2d(l1,0),gp_Dir2d(0,1)),
868 TColgp_Array1OfPnt2d Extrem1(1,2);
869 Extrem1(1).SetCoord(l1,f2);
870 Extrem1(2).SetCoord(l1,l2);
871 TColgp_Array1OfPnt2d Extrem2(1,2);
872 Extrem2(1).SetCoord(f1,f2);
873 Extrem2(2).SetCoord(f1,l2);
875 new Geom2d_BezierCurve(Extrem1),
876 new Geom2d_BezierCurve(Extrem2),
879 else if (IType != 4) { //not plane
880 TColgp_Array1OfPnt2d Extrem2(1,2);
881 Extrem2(1).SetCoord(f1,f2);
882 Extrem2(2).SetCoord(f1,l2);
884 new Geom2d_BezierCurve(Extrem2),
886 TColgp_Array1OfPnt2d Extrem1(1,2);
887 Extrem1(1).SetCoord(l1,f2);
888 Extrem1(2).SetCoord(l1,l2);
890 new Geom2d_BezierCurve(Extrem1),
894 // Set the non parameter flag;
895 B.SameParameter(Edge1,Standard_False);
896 B.SameParameter(Edge2,Standard_False);
897 B.SameParameter(Edge3,Standard_False);
898 B.SameParameter(Edge4,Standard_False);
899 B.SameRange(Edge1,Standard_False);
900 B.SameRange(Edge2,Standard_False);
901 B.SameRange(Edge3,Standard_False);
902 B.SameRange(Edge4,Standard_False);
904 tantque = ex1.More() && ex2.More();
905 if (wPoint1) tantque = ex2.More();
906 if (wPoint2) tantque = ex1.More();
909 BRepLib::SameParameter(myShell);
911 if (uClosed && DegenFirst && DegenLast)
912 myShell.Closed(Standard_True);
916 //=======================================================================
917 //function : GeneratedShapes
919 //=======================================================================
921 const TopTools_ListOfShape&
922 BRepFill_Generator::GeneratedShapes (const TopoDS_Shape& SSection) const
924 if (myMap.IsBound(SSection)) {
925 return myMap(SSection);
928 static TopTools_ListOfShape Empty;
933 //=======================================================================
934 //function : Generated
936 //=================================================================== ====
938 const TopTools_DataMapOfShapeListOfShape& BRepFill_Generator::Generated() const