1 // Created on: 1998-06-08
2 // Created by: Stephanie HUMEAU
3 // Copyright (c) 1998-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
18 #include <Adaptor3d_HCurve.hxx>
19 #include <Adaptor3d_Surface.hxx>
20 #include <Bnd_Box.hxx>
21 #include <BndLib_Add3dCurve.hxx>
22 #include <BndLib_AddSurface.hxx>
23 #include <BOPAlgo_Builder.hxx>
24 #include <BOPAlgo_PaveFiller.hxx>
25 #include <BRep_Builder.hxx>
26 #include <BRep_Tool.hxx>
27 #include <BRepAdaptor_Curve.hxx>
28 #include <BRepAdaptor_Surface.hxx>
29 #include <BRepAlgoAPI_Section.hxx>
30 #include <BRepBuilderAPI_Sewing.hxx>
31 #include <BRepClass3d_SolidClassifier.hxx>
32 #include <BRepExtrema_DistShapeShape.hxx>
33 #include <BRepFill_DataMapOfShapeHArray2OfShape.hxx>
34 #include <BRepFill_Draft.hxx>
35 #include <BRepFill_DraftLaw.hxx>
36 #include <BRepFill_SectionLaw.hxx>
37 #include <BRepFill_ShapeLaw.hxx>
38 #include <BRepFill_Sweep.hxx>
39 #include <BRepLib_FindSurface.hxx>
40 #include <BRepLib_MakeEdge.hxx>
41 #include <BRepLib_MakeFace.hxx>
42 #include <BRepLib_MakeWire.hxx>
43 #include <BRepTools.hxx>
44 #include <Geom_Geometry.hxx>
45 #include <Geom_Line.hxx>
46 #include <Geom_Plane.hxx>
47 #include <Geom_RectangularTrimmedSurface.hxx>
48 #include <Geom_Surface.hxx>
49 #include <Geom_TrimmedCurve.hxx>
50 #include <GeomAdaptor_HSurface.hxx>
51 #include <GeomAdaptor_Surface.hxx>
52 #include <GeomFill_LocationDraft.hxx>
53 #include <GeomLProp_SLProps.hxx>
59 #include <gp_Trsf.hxx>
60 #include <Precision.hxx>
61 #include <Standard_NoSuchObject.hxx>
62 #include <StdFail_NotDone.hxx>
63 #include <TColgp_Array1OfPnt.hxx>
64 #include <TColStd_Array1OfReal.hxx>
67 #include <TopExp_Explorer.hxx>
69 #include <TopoDS_Edge.hxx>
70 #include <TopoDS_Iterator.hxx>
71 #include <TopoDS_Shape.hxx>
72 #include <TopoDS_Shell.hxx>
73 #include <TopoDS_Solid.hxx>
74 #include <TopoDS_Wire.hxx>
75 #include <TopTools_ListIteratorOfListOfShape.hxx>
76 #include <TopTools_ListOfShape.hxx>
79 #include <Geom_Circle.hxx>
82 #include <DrawTrSurf.hxx>
83 static Standard_Boolean Affich = 0;
86 //=======================================================================
89 //======================================================================
90 static void ComputeTrsf(const TopoDS_Wire& W,
95 // Calculate approximate barycenter
96 BRepTools_WireExplorer Exp(W);
97 // Class BRep_Tool without fields and without Constructor :
99 gp_XYZ Bary(0.,0.,0.);
102 for (nb=0; Exp.More(); Exp.Next()) {
103 // Bary += BT.Pnt(Exp.CurrentVertex()).XYZ();
104 Bary += BRep_Tool::Pnt(Exp.CurrentVertex()).XYZ();
109 // Calculate the Transformation
111 Tf.SetTransformation(N);
112 BRepAdaptor_Curve AC;
113 // BndLib_Add3dCurve BC;
115 // transformation to the wire
116 TopoDS_Wire TheW = W;
117 TopLoc_Location Loc(Tf);
123 for (Exp.Init(TheW); Exp.More(); Exp.Next()) {
124 AC.Initialize(Exp.Current());
125 // BC.Add(AC, 0.1, Box);
126 BndLib_Add3dCurve::Add(AC, 0.1, Box);
130 //=======================================================================
133 //======================================================================
134 static Standard_Real Longueur(const Bnd_Box& WBox,
139 // face of the box most remoted from the face input in
140 // the direction of skin
141 Standard_Real Xmin,Ymin,Zmin,Xmax,Ymax,Zmax,WZmin,WZmax,L;
144 WBox.Get(Xmin,Ymin,Zmin,Xmax,Ymax,Zmax);
148 SBox.Get(Xmin,Ymin,Zmin,Xmax,Ymax,Zmax);
149 P.SetCoord( (Xmin+Xmax)/2, (Ymin+Ymax)/2, Zmax);
152 // Skin in the wrong direction. Invert...
163 //=======================================================================
164 //function : GoodOrientation
165 //purpose : Check if the law is oriented to have an exterior skin
166 //======================================================================
167 static Standard_Boolean GoodOrientation(const Bnd_Box& B,
168 const Handle(BRepFill_LocationLaw)& Law,
171 Standard_Real f, l, r, t;
172 Standard_Real aXmin, aYmin, aZmin, aXmax, aYmax, aZmax;
174 B.Get(aXmin, aYmin, aZmin, aXmax, aYmax, aZmax);
175 gp_Pnt P1(aXmin, aYmin, aZmin), P2(aXmax, aYmax, aZmax);
178 Law->CurvilinearBounds(Law->NbLaw(), f, l);
181 Standard_Integer ii, Ind;
183 Standard_Integer Nb = (Standard_Integer) (4+(10*r));
185 // Standard_Integer Nb = 4+(10*r);
189 Nb++; // Number of points
191 TColgp_Array1OfPnt Pnts(1, Nb);
192 Handle(Adaptor3d_HCurve) AC;
193 gp_XYZ Bary(0.,0.,0.);
195 for (ii=1; ii<=Nb; ii++) {
196 Law->Parameter((ii-1)*r, Ind, t);
197 AC = Law->Law(Ind)->GetCurve();
199 Bary+= Pnts(ii).XYZ();
204 gp_Vec Normal(D.XYZ());
205 Standard_Real Angle = 0;
206 gp_Vec Ref(Centre, Pnts(1));
208 for (ii=2; ii<=Nb; ii++) {
209 gp_Vec R(Centre, Pnts(ii));
210 Angle += Ref.AngleWithRef(R, Normal);
217 //=======================================================================
218 //function : Constructeur
220 //======================================================================
221 BRepFill_Draft::BRepFill_Draft(const TopoDS_Shape& S,
223 const Standard_Real Angle)
228 mySections.Nullify();
230 switch (S.ShapeType()) {
233 myWire = TopoDS::Wire(S);
238 TopoDS_Iterator Exp (S);
239 myWire = TopoDS::Wire(Exp.Value());
244 TopTools_ListOfShape List;
245 TopTools_IndexedDataMapOfShapeListOfShape edgemap;
246 TopExp::MapShapesAndAncestors(S,TopAbs_EDGE,TopAbs_FACE,edgemap);
247 Standard_Integer iedge, nbf;
248 for (iedge = 1; iedge <= edgemap.Extent(); iedge++) {
249 const TopoDS_Edge& theEdge = TopoDS::Edge(edgemap.FindKey(iedge));
250 // skip degenerated edges
251 if (!BRep_Tool::Degenerated(theEdge)) {
252 nbf = edgemap(iedge).Extent();
253 if (nbf==1) List.Append(theEdge);
257 if( List.Extent()>0) {
260 BRepLib_WireError Err = MW.Error();
261 if (Err == BRepLib_WireDone) {
266 std::cout << "Error in MakeWire" << std::endl;
268 throw Standard_ConstructionError("BRepFill_Draft");
273 std::cout << "No Free Borders !" << std::endl;
275 throw Standard_ConstructionError("BRepFill_Draft");
280 throw Standard_ConstructionError("BRepFill_Draft");
283 // Attention to closed non declared wires !
284 if (!myWire.Closed()) {
285 TopoDS_Vertex Vf, Vl;
286 TopExp::Vertices(myWire, Vf, Vl);
287 if (Vf.IsSame(Vl)) myWire.Closed(Standard_True);
291 DBRep::Set("TheWire", myWire);
295 myAngle = Abs(Angle);
298 myDone = Standard_False;
305 //=======================================================================
306 //function :SetOptions
307 //purpose : Defines the style
308 //======================================================================
309 void BRepFill_Draft::SetOptions(const BRepFill_TransitionStyle Style,
310 const Standard_Real Min,
311 const Standard_Real Max)
318 //=======================================================================
321 //======================================================================
322 void BRepFill_Draft::SetDraft(const Standard_Boolean Internal)
324 IsInternal = Internal;
328 //=======================================================================
330 //purpose : calculate a surface of skinning
331 //======================================================================
332 void BRepFill_Draft::Perform(const Standard_Real LengthMax)
334 Handle(Geom_Surface) S;
336 Bnd_Box WBox;//, SBox;
340 ComputeTrsf(myWire, myDir, WBox, Trsf);
341 Init(S, LengthMax, WBox);
346 //=======================================================================
348 //purpose : calculate a surface of skinning
349 //======================================================================
350 void BRepFill_Draft::Perform(const Handle(Geom_Surface)& Surface,
351 const Standard_Boolean KeepInsideSurface)
358 ComputeTrsf(myWire, myDir, WBox, Trsf);
360 // box with bounds of the stop surface
361 Handle(Geom_Surface) Surf;
362 Surf = Handle(Geom_Surface)::DownCast(Surface->Transformed(Trsf));
363 GeomAdaptor_Surface S1 (Surf);
364 // BndLib_AddSurface AS;
365 // AS.Add(S1, 0.1, SBox);
366 BndLib_AddSurface::Add(S1, 0.1, SBox);
368 // calculate the maximum length of the rule.
369 L = Longueur(WBox, SBox, myDir, Pt);
370 L /= Abs(Cos(myAngle));
373 Init(Surface, L, WBox);
374 BuildShell(Surface, !KeepInsideSurface);
378 //================================================================
380 //purpose : calculate the surface of skinning, stopped by a shape
381 //================================================================
382 void BRepFill_Draft::Perform(const TopoDS_Shape& StopShape,
383 const Standard_Boolean KeepOutSide)
390 ComputeTrsf(myWire, myDir, WBox, Trsf);
392 // bounding box of the stop shape
393 Bnd_Box BSurf;//, TheBox;
394 Standard_Real Umin, Umax, Vmin, Vmax;
397 Handle(Geom_Surface) Surf;
399 // BndLib_AddSurface AS;
401 TopExp_Explorer Ex (StopShape, TopAbs_FACE);
404 while (Ex.More()) { // parse faces of the stop shape
405 // B.UVBounds(TopoDS::Face(Ex.Current()), Umin,Umax,Vmin,Vmax);
406 BRepTools::UVBounds(TopoDS::Face(Ex.Current()), Umin,Umax,Vmin,Vmax);
407 Surf = Handle(Geom_Surface)::DownCast(
408 // BT.Surface(TopoDS::Face(Ex.Current()))->Transformed(Trsf) );
409 BRep_Tool::Surface(TopoDS::Face(Ex.Current()))->Transformed(Trsf) );
410 GeomAdaptor_Surface S1 (Surf);
411 // bounding box of the current face
412 // AS.Add(S1, Umin, Umax, Vmin, Vmax, 0.1, BSurf);
413 BndLib_AddSurface::Add(S1, Umin, Umax, Vmin, Vmax, 0.1, BSurf);
414 SBox.Add(BSurf); // group boxes
418 // calculate the maximum length of the rule.
419 L = Longueur(WBox, SBox, myDir, Pt);
420 L /= Abs(Cos(myAngle));
424 Inv = Trsf.Inverted(); // inverted transformation
425 Pt.Transform(Inv); // coordinate in the absolute reference
426 Handle(Geom_Plane) Plan = new (Geom_Plane)(Pt, myDir);
427 Surf = new (Geom_RectangularTrimmedSurface) (Plan,-L, L, -L, L);
431 char* Temp = "ThePlan" ;
432 DrawTrSurf::Set(Temp, Surf);
433 // DrawTrSurf::Set("ThePlan", Surf);
437 // Sweeping and restriction
438 Init(Plan, L*1.01, WBox);
439 BuildShell(Surf, Standard_False);
440 Fuse(StopShape, KeepOutSide);
444 //=======================================================================
446 //purpose : Construction of laws.
447 //======================================================================
448 void BRepFill_Draft::Init(const Handle(Geom_Surface)& ,
449 const Standard_Real Length,
454 // law of positioning
455 Handle(GeomFill_LocationDraft) Loc
456 = new (GeomFill_LocationDraft) (myDir, myAngle);
457 myLoc = new (BRepFill_DraftLaw) (myWire, Loc);
459 B = GoodOrientation(Box, myLoc, myDir);
461 if (IsInternal ^ (!B) ) {
463 Loc->SetAngle(myAngle);
464 myLoc = new (BRepFill_DraftLaw) (myWire, Loc);
467 myLoc->CleanLaw(angmin); // Clean small discontinuities.
470 // generating line is straight and parallel to binormal.
472 gp_Vec D (0., 1., 0.);
474 // Control of the orientation
476 myLoc->Law(1)->GetDomain(f,l);
480 myLoc->Law(1)->D0( (f+l)/2, M, Bid);
481 gp_Dir BN(M.Column(2));
483 Standard_Real ang = myDir.Angle(BN);
484 if (ang > M_PI/2) D.Reverse();
485 Handle(Geom_Line) L = new (Geom_Line) (P, D);
487 Handle(Geom_Curve) TC = new (Geom_TrimmedCurve) (L, 0, Length);
492 TC = new (Geom_Circle) (gp::XOY(), Length);
496 BRepLib_MakeEdge ME(TC);
497 TopoDS_Edge EG = ME.Edge();
499 BRepLib_MakeWire MW(EG);
500 TopoDS_Wire G = MW.Wire();
502 mySec = new (BRepFill_ShapeLaw) (G, Standard_True);
506 //=======================================================================
507 //function : BuildShell
508 //purpose : Construction of the skinning surface
509 //======================================================================
510 void BRepFill_Draft::BuildShell(const Handle(Geom_Surface)& Surf,
511 const Standard_Boolean KeepOutSide)
513 // construction of the surface
514 BRepFill_Sweep Sweep(mySec, myLoc, Standard_True);
515 Sweep.SetTolerance(myTol);
516 Sweep.SetAngularControl(angmin, angmax);
517 TopTools_MapOfShape Dummy;
518 BRepFill_DataMapOfShapeHArray2OfShape Dummy2;
519 BRepFill_DataMapOfShapeHArray2OfShape Dummy3;
520 Sweep.Build(Dummy, Dummy2, Dummy3, myStyle, myCont);
521 if (Sweep.IsDone()) {
522 myShape = Sweep.Shape();
523 myShell = TopoDS::Shell(myShape);
524 myFaces = Sweep.SubShape();
525 mySections = Sweep.Sections();
526 myDone = Standard_True;
527 // Control of the orientation
528 Standard_Boolean out=Standard_True;
529 TopExp_Explorer ex(myShell,TopAbs_FACE);
531 F = TopoDS::Face(ex.Current());
532 BRepAdaptor_Surface SF(F);
536 u = SF.FirstUParameter();
537 v = SF.FirstVParameter();
540 if (F.Orientation() == TopAbs_REVERSED) V.Reverse();
541 if (V.Magnitude() > 1.e-10) {
542 out = myDir.Angle(V) > M_PI/2;
544 if (out == IsInternal) {
550 myDone = Standard_False;
554 if (!Surf.IsNull()) { // Add the face at end
556 // Waiting the use of traces & retriction in BRepFill_Sweep
558 BRepLib_MakeFace MkF;
559 MkF.Init(Surf, Standard_True, Precision::Confusion());
560 Fuse(MkF.Face(), KeepOutSide);
565 //=======================================================================
567 //purpose : Boolean operation between the skin and the
569 //======================================================================
570 Standard_Boolean BRepFill_Draft::Fuse(const TopoDS_Shape& StopShape,
571 const Standard_Boolean KeepOutSide)
574 Standard_Boolean issolid = Standard_False;
575 TopoDS_Solid Sol1, Sol2;
576 TopAbs_State State1 = TopAbs_OUT, State2 = TopAbs_OUT;
579 if (myShape.ShapeType()==TopAbs_SOLID) {
580 Sol1 = TopoDS::Solid(myShape);
581 issolid = Standard_True;
585 B.Add(Sol1, myShape); // shell => solid (for fusion)
589 switch (StopShape.ShapeType()) {
590 case TopAbs_COMPOUND :
592 TopoDS_Iterator It(StopShape);
593 return Fuse(It.Value(), KeepOutSide);
597 Sol2 = TopoDS::Solid(StopShape);
603 B.Add(Sol2, StopShape); // shell => solid (for fusion)
612 S.Closed (BRep_Tool::IsClosed (S));
614 B.Add(Sol2, S); // shell => solid (for fusion)
620 return Standard_False; // Impossible to do
624 // Perform intersection of solids
625 BOPAlgo_PaveFiller aPF;
626 TopTools_ListOfShape anArgs;
629 aPF.SetArguments(anArgs);
632 return Standard_False;
634 BRepAlgoAPI_Section aSec(Sol1, Sol2, aPF);
635 const TopoDS_Shape& aSection = aSec.Shape();
637 TopExp_Explorer exp(aSection, TopAbs_EDGE);
639 // No section edges produced
640 return Standard_False;
642 if (StopShape.ShapeType() != TopAbs_SOLID)
644 // It is required to choose the state by the geometry
646 // We need to find the section edge, closest to myWire
648 Standard_Real Dmin = Precision::Infinite();
649 BRepExtrema_DistShapeShape DistTool;
650 DistTool.LoadS1(myWire);
652 for (; exp.More(); exp.Next())
654 const TopoDS_Shape& aSE = exp.Current();
655 DistTool.LoadS2(aSE);
657 if (DistTool.IsDone())
659 Standard_Real D = DistTool.Value();
663 aSEMin = TopoDS::Edge(aSE);
664 if (Dmin < Precision::Confusion())
670 if (!aSEMin.IsNull())
672 // Get geometry of StopShape
673 Handle(Geom_Surface) S;
674 Handle(Geom2d_Curve) C2d;
678 BRep_Tool::CurveOnSurface(aSEMin, C2d, S, L, f, l, 2);
681 C2d->D0((f + l) / 2, P2d);
682 GeomLProp_SLProps SP(S, P2d.X(), P2d.Y(), 1, 1.e-12);
683 if (!SP.IsNormalDefined())
685 C2d->D0((3 * f + l) / 4, P2d);
686 SP.SetParameters(P2d.X(), P2d.Y());
687 if (!SP.IsNormalDefined())
689 C2d->D0((f + 3 * l) / 4, P2d);
690 SP.SetParameters(P2d.X(), P2d.Y());
694 if (SP.IsNormalDefined())
697 if (myDir.Angle(SP.Normal()) < M_PI / 2) State1 = TopAbs_IN;
698 else State1 = TopAbs_OUT;
703 if (! KeepOutSide) { // Invert State2;
704 if (State2 == TopAbs_IN) State2 = TopAbs_OUT;
705 else State2 = TopAbs_IN;
708 // Perform Boolean operation
709 BOPAlgo_Builder aBuilder;
710 aBuilder.AddArgument(Sol1);
711 aBuilder.AddArgument(Sol2);
712 aBuilder.PerformWithFiller(aPF);
713 if (aBuilder.HasErrors())
714 return Standard_False;
717 Handle(BRepTools_History) aHistory = new BRepTools_History;
719 Standard_Boolean isSingleOpNeeded = Standard_True;
720 // To get rid of the unnecessary parts of first solid make the cutting first
721 if (State1 == TopAbs_OUT)
723 TopTools_ListOfShape aLO, aLT;
726 aBuilder.BuildBOP(aLO, aLT, BOPAlgo_CUT);
727 if (!aBuilder.HasErrors())
729 TopoDS_Solid aCutMin;
730 TopExp_Explorer anExpS(aBuilder.Shape(), TopAbs_SOLID);
733 aCutMin = TopoDS::Solid(anExpS.Current());
737 Standard_Real aDMin = Precision::Infinite();
738 BRepExtrema_DistShapeShape DistTool;
739 DistTool.LoadS1(myWire);
741 for (anExpS.ReInit(); anExpS.More(); anExpS.Next())
743 const TopoDS_Shape& aCut = anExpS.Current();
744 DistTool.LoadS2(aCut);
746 if (DistTool.IsDone())
748 Standard_Real D = DistTool.Value();
752 aCutMin = TopoDS::Solid(aCut);
759 if (!aCutMin.IsNull())
761 // Save history for first argument only
762 aHistory->Merge(aLO, aBuilder);
764 // Perform needed operation with result of Cut
765 BOPAlgo_Builder aGluer;
766 aGluer.AddArgument(aCutMin);
767 aGluer.AddArgument(Sol2);
768 aGluer.SetGlue(BOPAlgo_GlueShift);
773 aGluer.BuildBOP(aLO, State1, aLT, State2);
775 if (!aGluer.HasErrors())
777 aHistory->Merge(aGluer.History());
779 result = aGluer.Shape();
780 anExpS.Init(result, TopAbs_SOLID);
781 isSingleOpNeeded = !anExpS.More();
787 if (isSingleOpNeeded)
791 TopTools_ListOfShape aLO, aLT;
795 aBuilder.BuildBOP(aLO, State1, aLT, State2);
796 if (aBuilder.HasErrors())
797 return Standard_False;
799 aHistory->Merge(aBuilder.History());
800 result = aBuilder.Shape();
803 if (issolid) myShape = result;
806 Exp.Init(result, TopAbs_SHELL);
807 if (Exp.More()) myShape = Exp.Current();
810 // Update the History
812 for (ii=1; ii<=myLoc->NbLaw(); ii++) {
813 const TopTools_ListOfShape& L = aHistory->Modified(myFaces->Value(1,ii));
815 myFaces->SetValue(1, ii, L.First());
817 for (ii=1; ii<=myLoc->NbLaw()+1; ii++) {
818 const TopTools_ListOfShape& L = aHistory->Modified(mySections->Value(1,ii));
820 mySections->SetValue(1, ii, L.First());
823 return Standard_True;
826 //=======================================================================
828 //purpose : Assemble the skin with the above face
829 //======================================================================
830 Standard_Boolean BRepFill_Draft::Sewing()
832 Standard_Boolean ToAss;
833 Standard_Boolean Ok = Standard_False;
834 ToAss = (myTop.ShapeType() != TopAbs_WIRE);
836 if ((!ToAss) || (!myDone)) return Standard_False;
838 // Assembly make a shell from the faces of the shape + the input shape
839 Handle(BRepBuilderAPI_Sewing) Ass = new BRepBuilderAPI_Sewing(5*myTol, Standard_True,
840 Standard_True, Standard_False);
843 ToAss = Standard_True;
846 Standard_Integer NbCE;
849 // Check if the assembly is real.
850 NbCE = Ass->NbContigousEdges();
854 res = Ass->SewedShape();
855 if ((res.ShapeType() == TopAbs_SHELL)||
856 (res.ShapeType() == TopAbs_SOLID)) {
860 else if (res.ShapeType() == TopAbs_COMPOUND) {
861 TopoDS_Iterator It(res);
864 if (!It.More()) {//Only one part => this is correct
872 // Update the History
874 for (ii=1; ii<=myLoc->NbLaw(); ii++) {
875 if (Ass->IsModified(myFaces->Value(1,ii)))
876 myFaces->SetValue(1, ii,
877 Ass->Modified(myFaces->Value(1,ii)));
879 for (ii=1; ii<=myLoc->NbLaw()+1; ii++) {
880 if (Ass->IsModified(mySections->Value(1,ii)))
881 mySections->SetValue(1, ii,
882 Ass->Modified(mySections->Value(1,ii)));
885 if (myShape.Closed()) { // Make a Solid
889 BS.Add(solid,TopoDS::Shell(myShape));
891 BRepClass3d_SolidClassifier SC(solid);
892 SC.PerformInfinitePoint(Precision::Confusion());
893 if ( SC.State() == TopAbs_IN) {
896 BS.Add(solid,TopoDS::Shell(myShape));
902 else std::cout << "Draft : No assembly !" << std::endl;
907 //=======================================================================
908 //function : Generated
909 //purpose : return a sub-part generated by sweeping
910 //======================================================================
911 const TopTools_ListOfShape&
912 BRepFill_Draft::Generated(const TopoDS_Shape& S)
919 for (ii=0; ii<=myLoc->NbLaw(); ii++)
920 if (E.IsSame(myLoc->Vertex(ii))) {
921 myGenerated.Append(mySections->Value(1, ii+1));
926 for (ii=1; ii<=myLoc->NbLaw(); ii++)
927 if (E.IsSame(myLoc->Edge(ii))) {
928 myGenerated.Append(myFaces->Value(1, ii));
936 //=======================================================================
938 //purpose : return the complete shape
939 //======================================================================
940 TopoDS_Shape BRepFill_Draft::Shape()const
945 //=====================================================================
947 //purpose : surface of skinning with the input face (=>shell)
948 //=====================================================================
949 TopoDS_Shell BRepFill_Draft::Shell()const
954 //=======================================================================
957 //======================================================================
958 Standard_Boolean BRepFill_Draft::IsDone()const