]> OCCT Git - occt-copy.git/commitdiff
Next intermediate version CR26907_1
authorjgv <jgv@opencascade.com>
Mon, 29 May 2017 13:38:50 +0000 (16:38 +0300)
committerjgv <jgv@opencascade.com>
Mon, 29 May 2017 13:40:23 +0000 (16:40 +0300)
16 files changed:
src/ChFi3d/ChFi3d.cxx
src/ChFi3d/ChFi3d.hxx
src/ChFi3d/ChFi3d_Builder.cxx
src/ChFi3d/ChFi3d_Builder.hxx
src/ChFi3d/ChFi3d_Builder_0.cxx
src/ChFi3d/ChFi3d_Builder_0.hxx
src/ChFi3d/ChFi3d_Builder_1.cxx
src/ChFi3d/ChFi3d_Builder_2.cxx
src/ChFi3d/ChFi3d_Builder_6.cxx
src/ChFi3d/ChFi3d_Builder_C1.cxx
src/ChFi3d/ChFi3d_ChBuilder.cxx
src/ChFi3d/ChFi3d_FilBuilder.cxx
src/ChFi3d/ChFi3d_FilBuilder_C2.cxx
src/ChFiDS/ChFiDS_Spine.cxx
src/ChFiDS/ChFiDS_Spine.hxx
src/ChFiDS/ChFiDS_Spine.lxx

index 0c05b9e5d779759e6aaac4393be4e9e67089f92a..fc0e727771e5e7d2a28b97cda296359b521a18ba 100644 (file)
@@ -37,7 +37,8 @@
 //=======================================================================
 Standard_Integer ChFi3d::ConcaveSide(const BRepAdaptor_Surface& S1, 
                                     const BRepAdaptor_Surface& S2, 
-                                    const TopoDS_Edge& E, 
+                                    const TopoDS_Edge& E,
+                                     BRepOffset_Type& ConnectType,
                                     TopAbs_Orientation& Or1, 
                                     TopAbs_Orientation& Or2)
 
@@ -49,7 +50,8 @@ Standard_Integer ChFi3d::ConcaveSide(const BRepAdaptor_Surface& S1,
   Standard_Real last = CE.LastParameter();
   Standard_Real par = 0.691254*first + 0.308746*last;
 
-  gp_Pnt pt, pt1, pt2; gp_Vec tgE, tgE1, tgE2, ns1, ns2, dint1, dint2;
+  gp_Pnt pt, pt1, pt2;
+  gp_Vec tgE, tgE1, tgE2, ns1, ns2, dint1, dint2;
   TopoDS_Face F1 = S1.Face();
   TopoDS_Face F2 = S2.Face();
   //F1.Orientation(TopAbs_FORWARD);
@@ -110,8 +112,18 @@ Standard_Integer ChFi3d::ConcaveSide(const BRepAdaptor_Surface& S1,
 
   dint1 = ns1.Crossed(tgE1);
   dint2 = ns2.Crossed(tgE2);
-  Standard_Real ang = ns1.CrossMagnitude(ns2);
+  gp_Vec ProdNormals = ns1 ^ ns2;
+  //Standard_Real ang = ns1.CrossMagnitude(ns2);
+  Standard_Real ang = ProdNormals.Magnitude();
   if(ang > 0.0001*M_PI){
+
+    ProdNormals /= ang;
+    Standard_Real ScalProd = tgE1 * ProdNormals;
+    if (ScalProd > 0.)
+      ConnectType = BRepOffset_Convex;
+    else
+      ConnectType = BRepOffset_Concave;
+    
     Standard_Real scal = ns2.Dot(dint1);
     if ( scal <= 0. ){
       ns2.Reverse();
@@ -185,6 +197,15 @@ Standard_Integer ChFi3d::ConcaveSide(const BRepAdaptor_Surface& S1,
       ns2 = DU2.Crossed(DV2);
       if (F2.Orientation() == TopAbs_REVERSED)
         ns2.Reverse();
+
+      ProdNormals = ns1 ^ ns2;
+      ProdNormals.Normalize();
+      Standard_Real ScalProd = tgE1 * ProdNormals;
+      if (ScalProd > 0.)
+        ConnectType = BRepOffset_Convex;
+      else
+        ConnectType = BRepOffset_Concave;
+      
       gp_Vec vref(pt1,pt2);
       if(ns1.Dot(vref) < 0.){
        Or1 = TopAbs_REVERSED;
index 3623dd47d4aeaff894adcdb6fd43b6763639e0ad..aa329f3b68e32e85bb4f59250a10c7397fcd2490 100644 (file)
@@ -23,6 +23,7 @@
 
 #include <Standard_Integer.hxx>
 #include <TopAbs_Orientation.hxx>
+#include <BRepOffset_Type.hxx>
 #include <Standard_Boolean.hxx>
 class BRepAdaptor_Surface;
 class TopoDS_Edge;
@@ -49,7 +50,12 @@ public:
   //! if  not, it  returns the  number of  choice of  the fillet
   //! or chamfer corresponding to  the orientations  calculated
   //! and  to  the tangent to  the  guide line read in  E.
-  Standard_EXPORT static Standard_Integer ConcaveSide (const BRepAdaptor_Surface& S1, const BRepAdaptor_Surface& S2, const TopoDS_Edge& E, TopAbs_Orientation& Or1, TopAbs_Orientation& Or2);
+  Standard_EXPORT static Standard_Integer ConcaveSide (const BRepAdaptor_Surface& S1,
+                                                       const BRepAdaptor_Surface& S2,
+                                                       const TopoDS_Edge& E,
+                                                       BRepOffset_Type& ConnectType,
+                                                       TopAbs_Orientation& Or1,
+                                                       TopAbs_Orientation& Or2);
   
   //! Same  as ConcaveSide, but the orientations are
   //! logically  deduced from  the result of  the call of
index 9514f7cc101500d7f0a8e23942526c9c647c1f48..76ded8826b717d2a82ee9859f3ce341a3b673ded 100644 (file)
@@ -68,6 +68,8 @@
 #include <TopoDS_Face.hxx>
 #include <TopoDS_Shape.hxx>
 #include <TopoDS_Vertex.hxx>
+//#include <BRepAlgoAPI_Fuse.hxx>
+#include <BOPAlgo_Builder.hxx>
 #include <TopOpeBRepBuild_HBuilder.hxx>
 #include <TopOpeBRepDS_BuildTool.hxx>
 #include <TopOpeBRepDS_Curve.hxx>
@@ -372,7 +374,7 @@ void  ChFi3d_Builder::Compute()
     
     
     if (done) {
-      BRep_Builder B1;
+      BRep_Builder BB;
       CompleteDS(DStr,myShape);
       //Update tolerances on vertex to max adjacent edges or
       //Update tolerances on degenerated edge to max of adjacent vertexes.
@@ -398,7 +400,7 @@ void  ChFi3d_Builder::Compute()
              if( tolc < tolv ) tolc = tolv + 0.00001;
            }
            if(degen && tolc < tolv) tolc = tolv;
-           else if(tolc>tolv) B1.UpdateVertex(v,tolc);
+           else if(tolc>tolv) BB.UpdateVertex(v,tolc);
          }
          else if(gk == TopOpeBRepDS_POINT){
            TopOpeBRepDS_Point& p = DStr.ChangePoint(gi);
@@ -409,7 +411,60 @@ void  ChFi3d_Builder::Compute()
        }
        if(degen) c.Tolerance(tolc);
       }
+      //jgv
+      
+      //for (on modified faces)
+      //compound of wires from each face
+      //compound of new edges for this face
+      //general fuse (compound of wires from a face, compound of new edges for this face)
+      //method building new face from old and new edges
+      //assembling of resulting shape from modified and unmodified faces.
+      for (Standard_Integer i = 1; i <= myNewFaces.Extent(); i++)
+      {
+        TopoDS_Shape aFace = myNewFaces(i);
+        aFace.Orientation(TopAbs_FORWARD);
+        TopoDS_Compound aWires;
+        BB.MakeCompound(aWires);
+        TopoDS_Iterator itw(aFace);
+        for (; itw.More(); itw.Next())
+          BB.Add(aWires, itw.Value());
+
+        TopoDS_Compound aNewEdges;
+        BB.MakeCompound(aNewEdges);
+        ChFi3d_ListIteratorOfListOfQualifiedEdge itl(myFaceNewEdges.FindFromKey(i));
+        for (; itl.More(); itl.Next())
+        {
+          Standard_Integer anIndex = itl.Value().Index;
+          TopoDS_Shape aNewEdge = myNewEdges(anIndex);
+          aNewEdge.Orientation(itl.Value().Orientation);
+          BB.Add(aNewEdges, aNewEdge);
+        }
+        //BRepAlgoAPI_Fuse aFuse(aWires, aNewEdges);
+        BOPAlgo_Builder GenFuse;
+        GenFuse.AddArgument(aWires);
+        GenFuse.AddArgument(aNewEdges);
+        GenFuse.Perform();
+        TopoDS_Shape aNewFace = aFace.EmptyCopied();
+        const TopoDS_Shape& aResFuse = GenFuse.Shape();
+        const BOPCol_DataMapOfShapeListOfShape& ModifiedShapes = GenFuse.Images();
+        for (itw.Initialize(aWires); itw.More(); itw.Next())
+        {
+          const TopoDS_Shape& aWire = itw.Value();
+          if (!ModifiedShapes.IsBound(aWire))
+            continue;
+          const TopTools_ListOfShape& aListOfModified = ModifiedShapes(aWire);
+          TopTools_ListIteratorOfListOfShape itwm(aListOfModified);
+          for (; itwm.More(); itwm.Next())
+          {
+            const TopoDS_Shape& aModifiedWire = itwm.Value();
+            cout<<"a Modified Wire ..."<<endl;
+          }
+        }
+      }
+
       myCoup->Perform(myDS);
+      //jgv//
+      
       TColStd_MapIteratorOfMapOfInteger It(MapIndSo);
       for(; It.More(); It.Next()){
        Standard_Integer indsol = It.Key();
@@ -431,18 +486,18 @@ void  ChFi3d_Builder::Compute()
          for (; exv.More(); exv.Next() ) {
            const TopoDS_Vertex& v = TopoDS::Vertex(exv.Current());
            Standard_Real tolv = BRep_Tool::Tolerance(v);
-           if (tole>tolv) B1.UpdateVertex(v,tole);
+           if (tole>tolv) BB.UpdateVertex(v,tole);
          }
        }
       }
       if (!hasresult) {
-      B1.MakeCompound(TopoDS::Compound(myShapeResult));
+      BB.MakeCompound(TopoDS::Compound(myShapeResult));
       for(It.Reset(); It.More(); It.Next()){
        Standard_Integer indsol = It.Key();
        const TopoDS_Shape& curshape = DStr.Shape(indsol);
        TopTools_ListIteratorOfListOfShape 
          its = myCoup->Merged(curshape,TopAbs_IN);
-       if(!its.More()) B1.Add(myShapeResult,curshape);
+       if(!its.More()) BB.Add(myShapeResult,curshape);
        else {
          //If the old type of Shape is Shell, Shell is placed instead of Solid, 
           //However there is a problem for compound of open Shell.
@@ -452,11 +507,11 @@ void  ChFi3d_Builder::Compute()
              TopExp_Explorer expsh2(its.Value(),TopAbs_SHELL);
              const TopoDS_Shape& cursh = expsh2.Current();
              TopoDS_Shape tt = cursh;
-             B1.Add(myShapeResult,cursh);
+             BB.Add(myShapeResult,cursh);
              its.Next();
            }
            else {
-             B1.Add(myShapeResult,its.Value());
+             BB.Add(myShapeResult,its.Value());
              its.Next();
            }
          }
@@ -465,16 +520,16 @@ void  ChFi3d_Builder::Compute()
       }
       else {
        done=Standard_False;
-       B1.MakeCompound(TopoDS::Compound(badShape));
+       BB.MakeCompound(TopoDS::Compound(badShape));
       for(It.Reset(); It.More(); It.Next()){
        Standard_Integer indsol = It.Key();
        const TopoDS_Shape& curshape = DStr.Shape(indsol);
        TopTools_ListIteratorOfListOfShape 
          its = myCoup->Merged(curshape,TopAbs_IN);
-       if(!its.More()) B1.Add(badShape,curshape);
+       if(!its.More()) BB.Add(badShape,curshape);
        else {
          while (its.More()) { 
-           B1.Add(badShape,its.Value());
+           BB.Add(badShape,its.Value());
            its.Next();
          }
        }
index d94cb9691964b5b2cb5421be84c1dd796fb01a2b..27699176a242a58790be7e8c6c453dda201b78be 100644 (file)
@@ -89,6 +89,7 @@ struct QualifiedEdge
 };
 
 typedef NCollection_List<QualifiedEdge> ChFi3d_ListOfQualifiedEdge;
+typedef ChFi3d_ListOfQualifiedEdge::Iterator ChFi3d_ListIteratorOfListOfQualifiedEdge;
 
 //! Root  class  for calculation of  surfaces (fillets,
 //! chamfers)  destined  to smooth edges  of
@@ -240,7 +241,7 @@ protected:
   
   Standard_EXPORT Standard_Boolean PerformElement (const Handle(ChFiDS_Spine)& CElement);
   
-  Standard_EXPORT void PerformExtremity (const Handle(ChFiDS_Spine)& CElement);
+  Standard_EXPORT void PerformExtremity (Handle(ChFiDS_Spine)& CElement);
   
   Standard_EXPORT void PerformSetOfSurf (Handle(ChFiDS_Stripe)& S, const Standard_Boolean Simul = Standard_False);
   
@@ -370,7 +371,11 @@ private:
   
   Standard_EXPORT void StartSol (const Handle(ChFiDS_Stripe)& S, const Handle(ChFiDS_HElSpine)& HGuide, Handle(BRepAdaptor_HSurface)& HS1, Handle(BRepAdaptor_HSurface)& HS2, Handle(BRepTopAdaptor_TopolTool)& I1, Handle(BRepTopAdaptor_TopolTool)& I2, gp_Pnt2d& P1, gp_Pnt2d& P2, Standard_Real& First) const;
   
-  Standard_EXPORT void ConexFaces (const Handle(ChFiDS_Spine)& Sp, const Standard_Integer IEdge, const Standard_Integer RefChoix, Handle(BRepAdaptor_HSurface)& HS1, Handle(BRepAdaptor_HSurface)& HS2) const;
+  Standard_EXPORT void ConexFaces (Handle(ChFiDS_Spine)& Sp,
+                                   const Standard_Integer IEdge,
+                                   const Standard_Integer RefChoix,
+                                   Handle(BRepAdaptor_HSurface)& HS1,
+                                   Handle(BRepAdaptor_HSurface)& HS2) const;
 
 
   TopoDS_Shape myShape;
index bc48e9bb5491657f6cc37b1a1329110d3411a4d1..2bbb1178d149141c0eeafb3a182750bae98d0601 100644 (file)
@@ -653,15 +653,16 @@ ChFiDS_State ChFi3d_EdgeState(TopoDS_Edge* E,
   if (F2.IsNull() || F4.IsNull() || F6.IsNull())
     sst = ChFiDS_FreeBoundary;
   else{
+    BRepOffset_Type aConnectType;
     TopAbs_Orientation o01,o02,o11,o12,o21,o22;
     /*
     i=ChFi3d::ConcaveSide(F[0],F[1],E[0],o01,o02);
     i=ChFi3d::ConcaveSide(F[0],F[2],E[1],o11,o12);
     j=ChFi3d::ConcaveSide(F[1],F[2],E[2],o21,o22);
     */
-    i=ChFi3d::ConcaveSide(F1, F2, E[0], o01, o02);
-    i=ChFi3d::ConcaveSide(F3, F4, E[1], o11, o12);
-    j=ChFi3d::ConcaveSide(F5, F6, E[2], o21, o22);
+    i=ChFi3d::ConcaveSide(F1, F2, E[0], aConnectType, o01, o02);
+    i=ChFi3d::ConcaveSide(F3, F4, E[1], aConnectType, o11, o12);
+    j=ChFi3d::ConcaveSide(F5, F6, E[2], aConnectType, o21, o22);
     
     if(o01==o11 && o02==o21 && o12==o22) sst = ChFiDS_AllSame;
     else if(o12==o22 || i ==10 || j ==10) sst = ChFiDS_OnDiff;
@@ -4949,6 +4950,24 @@ Standard_Integer ChFi3d_NumberOfSharpEdges(const TopoDS_Vertex& Vtx,
   return nba;
 }
 
+//=======================================================================
+//function : IsInSingularity
+//purpose  :
+//
+//=======================================================================
+Standard_Boolean ChFi3d_IsInSingularity(const TopoDS_Vertex& Vtx,
+                                        const ChFiDS_Map& VEMap)
+{
+  TopTools_ListIteratorOfListOfShape ItE;
+  for (ItE.Initialize(VEMap(Vtx)); ItE.More(); ItE.Next())
+  {
+    const TopoDS_Edge& cur = TopoDS::Edge(ItE.Value());
+    if (BRep_Tool::Degenerated(cur))
+      return Standard_True;
+  }
+  return Standard_False;
+}
+
 //=====================================================
 // function cherche_vertex
 // finds common vertex between two edges 
index 8ec8dede5b3fe911438a718629d72da37ddb884f..c32c793dbc0fdfec724673a6bbce60b24aef4f68 100644 (file)
@@ -573,6 +573,9 @@ Standard_Integer ChFi3d_NumberOfSharpEdges(const TopoDS_Vertex& Vtx,
                                            const ChFiDS_Map& VEMap,
                                            const ChFiDS_Map& EFmap);
 
+Standard_Boolean ChFi3d_IsInSingularity(const TopoDS_Vertex& Vtx,
+                                        const ChFiDS_Map& VEMap);
+
 void ChFi3d_cherche_vertex (const TopoDS_Edge & E1,
                            const TopoDS_Edge & E2,
                            TopoDS_Vertex & vertex,
index 37f4d2d642981b2b150f0c0a396bccb4e15dfec1..2b67fdbfd123dc856bdace16a14facfebd516d0e 100644 (file)
@@ -454,7 +454,7 @@ static Standard_Boolean TangentOnVertex(const TopoDS_Vertex&    V,
 //           depending on concavities between neighbour faces of the top.
 //=======================================================================
 
-void ChFi3d_Builder::PerformExtremity (const Handle(ChFiDS_Spine)& Spine) 
+void ChFi3d_Builder::PerformExtremity (Handle(ChFiDS_Spine)& Spine) 
 {
   Standard_Integer NbG1Connections = 0;
   
index c7d003f0c96e562625a5ce58d2fc2f3ef7213c7e..bb70f7cd1b55180219ee21aeffc8fa2f67e3c69f 100644 (file)
@@ -732,8 +732,9 @@ Standard_Boolean ChFi3d_Builder::StripeOrientations
   ff2.Orientation(TopAbs_FORWARD);
   Sb2.Initialize(ff2);
 
+  BRepOffset_Type aConnectType;
   ChoixConge = ChFi3d::ConcaveSide(Sb1,Sb2,Spine->Edges(1),
-                                  Or1,Or2);
+                                  aConnectType,Or1,Or2);
   Or1 = TopAbs::Compose(Or1,Of1);
   Or2 = TopAbs::Compose(Or2,Of2);
   return Standard_True;
@@ -745,7 +746,7 @@ Standard_Boolean ChFi3d_Builder::StripeOrientations
 //purpose  : 
 //=======================================================================
 
-void ChFi3d_Builder::ConexFaces (const Handle(ChFiDS_Spine)&   Spine,
+void ChFi3d_Builder::ConexFaces (Handle(ChFiDS_Spine)&         Spine,
                                 const Standard_Integer        IEdge,
                                 const Standard_Integer        RC,      
                                 Handle(BRepAdaptor_HSurface)& HS1,
@@ -761,10 +762,13 @@ void ChFi3d_Builder::ConexFaces (const Handle(ChFiDS_Spine)&   Spine,
 
   Sb1.Initialize(ff1);
   Sb2.Initialize(ff2);
-  
+
+  BRepOffset_Type aConnectType = Spine->ConnectType();
   TopAbs_Orientation Or1,Or2;
   Standard_Integer Choix = ChFi3d::ConcaveSide(Sb1,Sb2,Spine->Edges(IEdge),
-                                              Or1,Or2);  
+                                              aConnectType, Or1,Or2);
+  Spine->SetConnectType(aConnectType);
+  
   if (RC%2 != Choix%2) {
     Sb1.Initialize(ff2);
     Sb2.Initialize(ff1);
index 54cdd6f8f3dceae57d421fdee03fcc01bb391c87..b6b6dacd1d5458efbc844ae2810b72f5cd93cee6 100644 (file)
@@ -98,6 +98,7 @@
 #include <TopOpeBRepDS_Surface.hxx>
 #include <TopTools_ListIteratorOfListOfShape.hxx>
 #include <TopTools_ListOfShape.hxx>
+#include <BRepLib_MakeEdge.hxx>
 
 #include <stdio.h>
 
@@ -795,6 +796,30 @@ Standard_Boolean ChFi3d_Builder::StoreData(Handle(ChFiDS_SurfData)& Data,
   if(Reversed) TraOn1 = ChFi3d_TrsfTrans(lin->TransitionOnS2());
   else TraOn1 = ChFi3d_TrsfTrans(lin->TransitionOnS1());
   Fint1.SetInterference(Index1OfCurve,TraOn1,PCurveOnFace,PCurveOnSurf);
+
+  //jgv
+  BRep_Builder BB;
+  TopoDS_Edge Boundary1 = BRepLib_MakeEdge(Crv3d1, pppdeb, pppfin);
+  BB.UpdateEdge(Boundary1, tolcheck);
+  TopLoc_Location aLoc;
+  BB.UpdateEdge(Boundary1, PCurveOnSurf, Surf, aLoc, 0.);
+  BB.UpdateEdge(Boundary1, PCurveOnFace, BS1->ChangeSurface().Face(), 0.);
+  myNewEdges.Add(Boundary1);
+
+  Standard_Integer IndF1;
+  if (!myNewFaces.Contains(BS1->ChangeSurface().Face()))
+    myNewFaces.Add(BS1->ChangeSurface().Face());
+  IndF1 = myNewFaces.FindIndex(BS1->ChangeSurface().Face());
+  if (!myFaceNewEdges.Contains(IndF1))
+  {
+    ChFi3d_ListOfQualifiedEdge aList;
+    myFaceNewEdges.Add(IndF1, aList);
+  }
+  Standard_Integer IndE1 = myNewEdges.FindIndex(Boundary1);
+  TopAbs_Orientation Et = (Reversed)? TopAbs_REVERSED : TopAbs_FORWARD;
+  QualifiedEdge aQE1(IndE1, Et, BRepOffset_Convex);
+  myFaceNewEdges.ChangeFromKey(IndF1).Append(aQE1);
+  /////
   
   // SurfData is filled in what concerns S2,
   Handle(Geom_Curve) Crv3d2 = Surf->UIso(Uon2);
@@ -848,6 +873,27 @@ Standard_Boolean ChFi3d_Builder::StoreData(Handle(ChFiDS_SurfData)& Data,
     if(Reversed) TraOn2 = ChFi3d_TrsfTrans(lin->TransitionOnS1());
     else TraOn2 = ChFi3d_TrsfTrans(lin->TransitionOnS2());
     Fint2.SetInterference(Index2OfCurve,TraOn2,PCurveOnFace,PCurveOnSurf);
+
+    //jgv
+    TopoDS_Edge Boundary2 = BRepLib_MakeEdge(Crv3d2, pppdeb, pppfin);
+    BB.UpdateEdge(Boundary2, tolcheck);
+    BB.UpdateEdge(Boundary2, PCurveOnSurf, Surf, aLoc, 0.);
+    BB.UpdateEdge(Boundary2, PCurveOnFace, BS2->ChangeSurface().Face(), 0.);
+    myNewEdges.Add(Boundary2);
+
+    Standard_Integer IndF2;
+    if (!myNewFaces.Contains(BS2->ChangeSurface().Face()))
+      myNewFaces.Add(BS2->ChangeSurface().Face());
+    IndF2 = myNewFaces.FindIndex(BS2->ChangeSurface().Face());
+    if (!myFaceNewEdges.Contains(IndF2))
+    {
+     ChFi3d_ListOfQualifiedEdge aList;
+     myFaceNewEdges.Add(IndF2, aList);
+    }
+    Standard_Integer IndE2 = myNewEdges.FindIndex(Boundary2);
+    QualifiedEdge aQE2(IndE2, TopAbs::Reverse(Et), BRepOffset_Convex);
+    myFaceNewEdges.ChangeFromKey(IndF2).Append(aQE2);
+    /////
   }
   else {
     Handle(Geom2d_Curve) bidpc;
index 6ef8f18453ddddd044914c6544b403bf8b7b317f..10d347e9454a2d48bfda594d12ffb4f9d14eb14f 100644 (file)
@@ -574,6 +574,7 @@ void ChFi3d_Builder::PerformOneCorner(const Standard_Integer Index,
   if ( ! ChFi3d_SelectStripe (StrIt, Vtx, thePrepareOnSame)) return;
   Handle(ChFiDS_Stripe) stripe = StrIt.Value();
   const Handle(ChFiDS_Spine) spine = stripe->Spine();
+  BRepOffset_Type aConnectType = spine->ConnectType();
   ChFiDS_SequenceOfSurfData& SeqFil =
     stripe->ChangeSetOfSurfData()->ChangeSequence();
   // SurfData and its CommonPoints,
@@ -962,7 +963,8 @@ void ChFi3d_Builder::PerformOneCorner(const Standard_Integer Index,
     myFaceNewEdges.Add(IndFv, aList);
   }
   Standard_Integer IndE = myNewEdges.FindIndex(aNewEdge);
-  QualifiedEdge aQE(IndE, Et, BRepOffset_Convex);
+  aConnectType = (onsame)? BRepOffset_Concave : BRepOffset_Convex;
+  QualifiedEdge aQE(IndE, Et, aConnectType);
   myFaceNewEdges.ChangeFromKey(IndFv).Append(aQE);
 
 #ifdef OCCT_DEBUG
@@ -1272,7 +1274,8 @@ void ChFi3d_Builder::PerformOneCorner(const Standard_Integer Index,
     Hc = BRep_Tool::CurveOnSurface(Arcprol,Fop,Ubid,Ubid);
     pop1 = Hc->Value(parVtx);
     pop2 = Fiop.PCurveOnFace()->Value(Fiop.Parameter(isfirst));
-    ChFi3d_AdjustSecondPointToFirstPoint(pop1, pop2, Bop);
+    if (!ChFi3d_IsInSingularity(Vtx, myVEMap))
+      ChFi3d_AdjustSecondPointToFirstPoint(pop1, pop2, Bop);
     Hc = BRep_Tool::CurveOnSurface(Arcprol,Fv,Ubid,Ubid);
     pv1 = Hc->Value(parVtx);
     pv2 = p2dbout;
@@ -1325,127 +1328,62 @@ void ChFi3d_Builder::PerformOneCorner(const Standard_Integer Index,
     TopOpeBRepDS_Curve Zob(zob3d,tolreached);
     Standard_Integer IZob = DStr.AddCurve(Zob);
 
-// it is determined if Fop has an edge of sewing 
-// it is determined if the curve has an intersection with the edge of sewing
+    Et = TopAbs::Reverse(TopAbs::Compose(OVtx,OArcprolv));
 
-    //TopoDS_Edge edgecouture;
-    //Standard_Boolean couture;
-    ChFi3d_Couture(Fop,couture,edgecouture);
-
-    if (couture  && !BRep_Tool::Degenerated(edgecouture)) {
-      BRepLib_MakeEdge Bedge (zob3d);
-      TopoDS_Edge edg =Bedge. Edge();
-      BRepExtrema_ExtCC extCC (edgecouture,edg);
-      if (extCC.IsDone()&&extCC.NbExt()!=0) {
-        for (Standard_Integer i=1; i<=extCC.NbExt()&&!intcouture;i++) {
-         if (extCC.SquareDistance(i)<=1.e-8) {
-           par1=extCC.ParameterOnE1(i);
-           par2=extCC.ParameterOnE2(i);
-           gp_Pnt P1=extCC.PointOnE1(i);
-           TopOpeBRepDS_Point tpoint(P1,1.e-4);
-           indpt=DStr.AddPoint(tpoint);
-           intcouture=Standard_True;
-           curv1 = new Geom_TrimmedCurve(zob3d,Udeb,par2);
-           curv2 = new Geom_TrimmedCurve(zob3d,par2,Ufin);
-           TopOpeBRepDS_Curve tcurv1(curv1,tolreached);
-           TopOpeBRepDS_Curve tcurv2(curv2,tolreached);
-           Icurv1=DStr.AddCurve(tcurv1);
-           Icurv2=DStr.AddCurve(tcurv2);
-         }
-       }
-      }
-    }
-    if (intcouture) {
-
-// interference of curv1 and curv2 on Ishape
-      Et = TopAbs::Reverse(TopAbs::Compose(OVtx,OArcprolv));
-      ComputeCurve2d(curv1,Fop,c2d1);
-      Handle(TopOpeBRepDS_SurfaceCurveInterference)
-       InterFv = ChFi3d_FilCurveInDS(Icurv1,IShape,/*zob2dv*/c2d1,Et);
-      DStr.ChangeShapeInterferences(IShape).Append(InterFv);
-      ComputeCurve2d(curv2,Fop,c2d2);
-      InterFv = ChFi3d_FilCurveInDS(Icurv2,IShape,/*zob2dv*/c2d2,Et);
-      DStr.ChangeShapeInterferences(IShape).Append(InterFv);
-
-      // limitation of the sewing edge
-      Standard_Integer Iarc=DStr.AddShape(edgecouture);
-      Handle(TopOpeBRepDS_CurvePointInterference) Interfedge;
-      TopAbs_Orientation ori;
-      TopoDS_Vertex Vdeb,Vfin;
-      Vdeb=TopExp::FirstVertex(edgecouture);
-      Vfin=TopExp::LastVertex(edgecouture);
-      Standard_Real pard,parf;
-      pard=BRep_Tool::Parameter(Vdeb,edgecouture);
-      parf=BRep_Tool::Parameter(Vfin,edgecouture);
-      if (Abs(par1-pard)<Abs(parf-par1)) ori=TopAbs_REVERSED;
-      else ori=TopAbs_FORWARD;
-      Interfedge = ChFi3d_FilPointInDS(ori,Iarc,indpt,par1);
-      DStr.ChangeShapeInterferences(Iarc).Append(Interfedge);
-
-    //  interference of curv1 and curv2 on Iop
-      Standard_Integer Iop = DStr.AddShape(Fop);
-      Et = TopAbs::Reverse(TopAbs::Compose(OVtx,OArcprolop));
-      Handle(TopOpeBRepDS_SurfaceCurveInterference)  Interfop;
-      ComputeCurve2d(curv1,Fop,c2d1);
-      Interfop  = ChFi3d_FilCurveInDS(Icurv1,Iop,c2d1,Et);
-      DStr.ChangeShapeInterferences(Iop).Append(Interfop);
-      ComputeCurve2d(curv2,Fop,c2d2);
-      Interfop  = ChFi3d_FilCurveInDS(Icurv2,Iop,c2d2,Et);
-      DStr.ChangeShapeInterferences(Iop).Append(Interfop);
-      Handle(TopOpeBRepDS_CurvePointInterference)
-       interfprol = ChFi3d_FilVertexInDS(TopAbs_FORWARD,Icurv1,IVtx,Udeb);
-      DStr.ChangeCurveInterferences(Icurv1).Append(interfprol);
-      interfprol = ChFi3d_FilPointInDS(TopAbs_REVERSED,Icurv1,indpt,par2);
-      DStr.ChangeCurveInterferences(Icurv1).Append(interfprol);
-      Standard_Integer icc = stripe->IndexPoint(isfirst,IFopArc);
-      interfprol = ChFi3d_FilPointInDS(TopAbs_FORWARD,Icurv2,indpt,par2);
-      DStr.ChangeCurveInterferences(Icurv2).Append(interfprol);
-      interfprol = ChFi3d_FilPointInDS(TopAbs_REVERSED,Icurv2,icc,Ufin);
-      DStr.ChangeCurveInterferences(Icurv2).Append(interfprol);
+    Standard_Integer IndFop;
+    if (!myNewFaces.Contains(Fop))
+      myNewFaces.Add(Fop);
+    IndFop = myNewFaces.FindIndex(Fop);
+    if (!myFaceNewEdges.Contains(IndFop))
+    {
+      ChFi3d_ListOfQualifiedEdge aList;
+      myFaceNewEdges.Add(IndFop, aList);
     }
-    else {
-      Et = TopAbs::Reverse(TopAbs::Compose(OVtx,OArcprolv));
-
-      Standard_Integer IndZobE = myNewEdges.FindIndex(aZobEdge);
-      QualifiedEdge aQzobE(IndZobE, Et, BRepOffset_Convex);
+    for (itl.Initialize(aNewZobList); itl.More(); itl.Next())
+    {
+      Standard_Integer IndZobE = myNewEdges.FindIndex(itl.Value());
+      QualifiedEdge aQzobE(IndZobE, Et, aConnectType);
       myFaceNewEdges.ChangeFromKey(IndFv).Append(aQzobE);
-      
-      Handle(TopOpeBRepDS_SurfaceCurveInterference)
-       InterFv = ChFi3d_FilCurveInDS(IZob,IShape,zob2dv,Et);
-      DStr.ChangeShapeInterferences(IShape).Append(InterFv);
-      Et = TopAbs::Reverse(TopAbs::Compose(OVtx,OArcprolop));
-      Standard_Integer Iop = DStr.AddShape(Fop);
-      Handle(TopOpeBRepDS_SurfaceCurveInterference)
-       Interfop = ChFi3d_FilCurveInDS(IZob,Iop,zob2dop,Et);
-      DStr.ChangeShapeInterferences(Iop).Append(Interfop);
-      Handle(TopOpeBRepDS_CurvePointInterference) interfprol;
-      #ifdef VARIANT1
-       interfprol = ChFi3d_FilVertexInDS(TopAbs_FORWARD,IZob,IVtx,Udeb);
-      #else 
-      {
-       Standard_Integer IV2 = DStr.AddShape(V2); // VARIANT 2
-       interfprol = ChFi3d_FilVertexInDS(TopAbs_FORWARD,IZob,IV2,Udeb);
-      }
-      #endif
-      DStr.ChangeCurveInterferences(IZob).Append(interfprol);
-      Standard_Integer icc = stripe->IndexPoint(isfirst,IFopArc);
-      interfprol = ChFi3d_FilPointInDS(TopAbs_REVERSED,IZob,icc,Ufin);
-      DStr.ChangeCurveInterferences(IZob).Append(interfprol);
-      #ifdef VARIANT1 
-      {
-       if (IFopArc == 1) box1.Add( zob3d->Value(Ufin) );
-       else              box2.Add( zob3d->Value(Ufin) );
-      }
-      #else 
-      {
-        // cut off existing Arcprol
-        Standard_Integer iArcprol = DStr.AddShape(Arcprol);
-        interfprol = ChFi3d_FilPointInDS(OVtx,iArcprol,icc,Udeb);
-        DStr.ChangeShapeInterferences(Arcprol).Append(interfprol);
-      }
-      #endif
+      QualifiedEdge aQzopEonFop(IndZobE, TopAbs::Reverse(Et), BRepOffset_Convex);
+      myFaceNewEdges.ChangeFromKey(IndFop).Append(aQzopEonFop);
     }
-  }
+    
+    Handle(TopOpeBRepDS_SurfaceCurveInterference)
+      InterFv = ChFi3d_FilCurveInDS(IZob,IShape,zob2dv,Et);
+    DStr.ChangeShapeInterferences(IShape).Append(InterFv);
+    Et = TopAbs::Reverse(TopAbs::Compose(OVtx,OArcprolop));
+    Standard_Integer Iop = DStr.AddShape(Fop);
+    Handle(TopOpeBRepDS_SurfaceCurveInterference)
+      Interfop = ChFi3d_FilCurveInDS(IZob,Iop,zob2dop,Et);
+    DStr.ChangeShapeInterferences(Iop).Append(Interfop);
+    Handle(TopOpeBRepDS_CurvePointInterference) interfprol;
+#ifdef VARIANT1
+    interfprol = ChFi3d_FilVertexInDS(TopAbs_FORWARD,IZob,IVtx,Udeb);
+#else 
+    {
+      Standard_Integer IV2 = DStr.AddShape(V2); // VARIANT 2
+      interfprol = ChFi3d_FilVertexInDS(TopAbs_FORWARD,IZob,IV2,Udeb);
+    }
+#endif
+    DStr.ChangeCurveInterferences(IZob).Append(interfprol);
+    Standard_Integer icc = stripe->IndexPoint(isfirst,IFopArc);
+    interfprol = ChFi3d_FilPointInDS(TopAbs_REVERSED,IZob,icc,Ufin);
+    DStr.ChangeCurveInterferences(IZob).Append(interfprol);
+#ifdef VARIANT1 
+    {
+      if (IFopArc == 1) box1.Add( zob3d->Value(Ufin) );
+      else              box2.Add( zob3d->Value(Ufin) );
+    }
+#else 
+    {
+      // cut off existing Arcprol
+      Standard_Integer iArcprol = DStr.AddShape(Arcprol);
+      interfprol = ChFi3d_FilPointInDS(OVtx,iArcprol,icc,Udeb);
+      DStr.ChangeShapeInterferences(Arcprol).Append(interfprol);
+    }
+#endif
+  } //if (onsame && inters)
+  
   ChFi3d_EnlargeBox(DStr,stripe,Fd,box1,box2,isfirst);
   if (CV1.IsOnArc()) {
     ChFi3d_EnlargeBox(CV1.Arc(),myEFMap(CV1.Arc()),CV1.ParameterOnArc(),box1);
index e086d05e1bcca9455a3fc9869af82128fd9b87bc..2ff9fdeef2135a8f3c705315266f77d462625972 100644 (file)
@@ -202,7 +202,8 @@ void  ChFi3d_ChBuilder::Add(const TopoDS_Edge& E)
     E_wnt.Orientation(TopAbs_FORWARD);
     Spine->SetEdges(E_wnt);
     if(PerformElement(Spine)){
-      PerformExtremity(Spine);
+      //PerformExtremity(Spine);
+      PerformExtremity(Sp);
       Spine->Load();
       myListStripe.Append(Stripe);
     }
@@ -239,8 +240,9 @@ void  ChFi3d_ChBuilder::Add(const Standard_Real Dis,
       BRepAdaptor_Surface Sb1,Sb2;
       Sb1.Initialize(F1);
       Sb2.Initialize(F2);
+      BRepOffset_Type aConnectType;
       TopAbs_Orientation Or1,Or2;
-      ChFi3d::ConcaveSide(Sb1,Sb2,E_wnt,Or1,Or2); 
+      ChFi3d::ConcaveSide(Sb1,Sb2,E_wnt,aConnectType,Or1,Or2); 
       Handle(ChFiDS_Stripe) Stripe = new ChFiDS_Stripe();
       Handle(ChFiDS_Spine)& Sp = Stripe->ChangeSpine();
       Sp = new ChFiDS_ChamfSpine(tolesp);
@@ -254,7 +256,8 @@ void  ChFi3d_ChBuilder::Add(const Standard_Real Dis,
        
        Spine->SetDist(Dis);
 
-       PerformExtremity(Spine);
+       //PerformExtremity(Spine);
+       PerformExtremity(Sp);
       }
     }
   }
@@ -351,8 +354,9 @@ void  ChFi3d_ChBuilder::Add(const Standard_Real Dis1,
       BRepAdaptor_Surface Sb1,Sb2;
       Sb1.Initialize(F1);
       Sb2.Initialize(F2);
+      BRepOffset_Type aConnectType;
       TopAbs_Orientation Or1,Or2;
-      Standard_Integer Choix = ChFi3d::ConcaveSide(Sb1,Sb2,E_wnt,Or1,Or2); 
+      Standard_Integer Choix = ChFi3d::ConcaveSide(Sb1,Sb2,E_wnt,aConnectType,Or1,Or2); 
 
       Handle(ChFiDS_Stripe) Stripe = new ChFiDS_Stripe();
       Handle(ChFiDS_Spine)& Sp = Stripe->ChangeSpine();
@@ -371,6 +375,7 @@ void  ChFi3d_ChBuilder::Add(const Standard_Real Dis1,
        Sb2.Initialize(F2);
        ChoixConge = ChFi3d::ConcaveSide(Sb1,Sb2,
                                         Spine->Edges(1),
+                                         aConnectType,
                                         Or1,Or2);
 
 
@@ -381,7 +386,8 @@ void  ChFi3d_ChBuilder::Add(const Standard_Real Dis1,
          Spine->SetDists(Dis2, Dis1);
        else Spine->SetDists(Dis1, Dis2);
 
-       PerformExtremity(Spine);
+       //PerformExtremity(Spine);
+       PerformExtremity(Sp);
       }
     }
   }
@@ -405,6 +411,7 @@ void  ChFi3d_ChBuilder::SetDists(const Standard_Real    Dis1,
 
     // Search the first edge which has a common face equal to F
     TopoDS_Face F1,F2,FirstF1,FirstF2;
+    BRepOffset_Type aConnectType;
     TopAbs_Orientation Or1,Or2;
     Standard_Integer Choix, ChoixConge;
     BRepAdaptor_Surface Sb1,Sb2;
@@ -429,11 +436,13 @@ void  ChFi3d_ChBuilder::SetDists(const Standard_Real    Dis1,
       Sb2.Initialize(F2);
       Choix = ChFi3d::ConcaveSide(Sb1,Sb2,
                                  csp->Edges(i-1),
+                                  aConnectType,
                                  Or1,Or2);
       Sb1.Initialize(FirstF1);
       Sb2.Initialize(FirstF2);
       ChoixConge = ChFi3d::ConcaveSide(Sb1,Sb2,
                                       csp->Edges(1),
+                                       aConnectType,
                                       Or1,Or2);
       if ( ChoixConge%2 != Choix%2 )
        csp->SetDists(Dis2,Dis1);
@@ -493,8 +502,9 @@ void  ChFi3d_ChBuilder::AddDA(const Standard_Real Dis1,
       BRepAdaptor_Surface Sb1,Sb2;
       Sb1.Initialize(F1);
       Sb2.Initialize(F2);
+      BRepOffset_Type aConnectType;
       TopAbs_Orientation Or1,Or2;
-      Standard_Integer Choix = ChFi3d::ConcaveSide(Sb1,Sb2,E_wnt,Or1,Or2); 
+      Standard_Integer Choix = ChFi3d::ConcaveSide(Sb1,Sb2,E_wnt,aConnectType,Or1,Or2);
 
       Handle(ChFiDS_Stripe) Stripe = new ChFiDS_Stripe();
       Handle(ChFiDS_Spine)& Sp = Stripe->ChangeSpine();
@@ -513,6 +523,7 @@ void  ChFi3d_ChBuilder::AddDA(const Standard_Real Dis1,
        Sb2.Initialize(F2);
        ChoixConge = ChFi3d::ConcaveSide(Sb1,Sb2,
                                         Spine->Edges(1),
+                                         aConnectType,
                                         Or1,Or2);
 
        // compare the 2 computed choices to know how to set the 
@@ -525,7 +536,8 @@ void  ChFi3d_ChBuilder::AddDA(const Standard_Real Dis1,
           Spine->SetDistAngle(Dis1, Angle, Standard_True);
         }
        
-       PerformExtremity(Spine);
+       //PerformExtremity(Spine);
+       PerformExtremity(Sp);
       }
     }
   }
@@ -549,6 +561,7 @@ void  ChFi3d_ChBuilder::SetDistAngle(const Standard_Real    Dis,
 
     // Search the first edge which has a common face equal to F
     TopoDS_Face F1,F2,FirstF1,FirstF2;
+    BRepOffset_Type aConnectType;
     TopAbs_Orientation Or1,Or2;
     Standard_Integer Choix, ChoixConge;
     BRepAdaptor_Surface Sb1,Sb2;
@@ -575,11 +588,13 @@ void  ChFi3d_ChBuilder::SetDistAngle(const Standard_Real    Dis,
       Sb2.Initialize(F2);
       Choix = ChFi3d::ConcaveSide(Sb1,Sb2,
                                  csp->Edges(i-1),
+                                  aConnectType,
                                  Or1,Or2);
       Sb1.Initialize(FirstF1);
       Sb2.Initialize(FirstF2);
       ChoixConge = ChFi3d::ConcaveSide(Sb1,Sb2,
                                       csp->Edges(1),
+                                       aConnectType,
                                       Or1,Or2);
       if ( ChoixConge%2 != Choix%2 ) {
        csp->SetDistAngle(Dis, Angle, Standard_False);
@@ -2204,6 +2219,7 @@ void ChFi3d_ChBuilder::ConexFaces (const Handle(ChFiDS_Spine)&  Spine,
                                   TopoDS_Face&                 F2) const
 {
   BRepAdaptor_Surface Sb1,Sb2;
+  BRepOffset_Type aConnectType;
   TopAbs_Orientation tmp1,tmp2;
   Standard_Integer RC,Choix;
   TopoDS_Face f1,f2,ff1,ff2;
@@ -2215,13 +2231,13 @@ void ChFi3d_ChBuilder::ConexFaces (const Handle(ChFiDS_Spine)&  Spine,
   Sb1.Initialize(ff1);
   ff2.Orientation(TopAbs_FORWARD);
   Sb2.Initialize(ff2);
-  RC = ChFi3d::ConcaveSide(Sb1,Sb2,Spine->Edges(1),tmp1,tmp2);
+  RC = ChFi3d::ConcaveSide(Sb1,Sb2,Spine->Edges(1),aConnectType,tmp1,tmp2);
                                  
   //calculate the connected faces
   SearchCommonFaces(myEFMap,Spine->Edges(IEdge),f1,f2);
   Sb1.Initialize(f1);
   Sb2.Initialize(f2);
-  Choix = ChFi3d::ConcaveSide(Sb1,Sb2,Spine->Edges(IEdge),tmp1,tmp2);
+  Choix = ChFi3d::ConcaveSide(Sb1,Sb2,Spine->Edges(IEdge),aConnectType,tmp1,tmp2);
 
   if (RC%2 != Choix%2) {
     F1 = f2;
index b7b1d896da34cdfd9c0b53cb8decc1b282efe394..8415602158e898f05e8cd99fec1b534c1ff166c5 100644 (file)
@@ -209,7 +209,8 @@ void  ChFi3d_FilBuilder::Add(const TopoDS_Edge& E)
     E_wnt.Orientation(TopAbs_FORWARD);
     Spine->SetEdges(E_wnt);
     if(PerformElement(Spine)){
-      PerformExtremity(Spine);
+      //PerformExtremity(Spine);
+      PerformExtremity(Sp);
       Spine->Load();
       myListStripe.Append(Stripe);
     }
index fc219ee55b82dcf231f23b6a0bf694cc613a035c..b8007bdbeb984fe5f93912e80884c34373461315 100644 (file)
@@ -474,8 +474,9 @@ void ChFi3d_FilBuilder::PerformTwoCorner(const Standard_Integer Index)
        TopAbs_Orientation oriSFF1 = st1->Orientation(IFaArc1);
        bid = 1;
        bid = ChFi3d::NextSide(ori,OFF1,oriS,oriSFF1,bid);
+        BRepOffset_Type aConnectType;
        TopAbs_Orientation op1 = TopAbs_FORWARD,op2 = TopAbs_FORWARD;
-       if(yapiv) bid = ChFi3d::ConcaveSide(BRS1,BRS2,pivot,op1,op2);
+       if(yapiv) bid = ChFi3d::ConcaveSide(BRS1,BRS2,pivot,aConnectType,op1,op2);
        op1 = TopAbs::Reverse(op1);
        op2 = TopAbs::Reverse(op2);
 #ifdef OCCT_DEBUG
index f99213a7aa5f8af6607d237b4efbbcfab658b7f6..970405123eb4fd91967dd0d2725c3c0d38ed2a5c 100644 (file)
@@ -42,6 +42,7 @@ IMPLEMENT_STANDARD_RTTIEXT(ChFiDS_Spine,MMgt_TShared)
 //=======================================================================
 ChFiDS_Spine::ChFiDS_Spine():
        splitdone(Standard_False),
+       myConnectType(BRepOffset_Other),
        tolesp(Precision::Confusion()),
        firstprolon(Standard_False), 
        lastprolon(Standard_False),
@@ -55,6 +56,7 @@ ChFiDS_Spine::ChFiDS_Spine():
 
 ChFiDS_Spine::ChFiDS_Spine(const Standard_Real Tol):
        splitdone(Standard_False),
+       myConnectType(BRepOffset_Other),
        tolesp(Tol),
        firstprolon(Standard_False), 
        lastprolon(Standard_False),
index dfcaecaa8fc404d3ee98fb001c62b436cdf762ff..84bf992de40bcf44b7c02542987e0065627f2e94 100644 (file)
@@ -23,6 +23,7 @@
 #include <BRepAdaptor_Curve.hxx>
 #include <Standard_Integer.hxx>
 #include <ChFiDS_State.hxx>
+#include <BRepOffset_Type.hxx>
 #include <TopTools_SequenceOfShape.hxx>
 #include <TColStd_HArray1OfReal.hxx>
 #include <Standard_Boolean.hxx>
@@ -125,10 +126,16 @@ public:
   
   Standard_EXPORT Standard_Boolean IsClosed() const;
   
+  Standard_EXPORT BRepOffset_Type ConnectType() const;
+  
   Standard_EXPORT Standard_Real FirstParameter() const;
   
   Standard_EXPORT Standard_Real LastParameter() const;
   
+  //! sets the type of connection between faces for all edges of spine:
+  //! it may be Concave, Convex or Other(undefined)
+  Standard_EXPORT void SetConnectType (const BRepOffset_Type theConnectType);
+  
   Standard_EXPORT void SetFirstParameter (const Standard_Real Par);
   
   Standard_EXPORT void SetLastParameter (const Standard_Real Par);
@@ -248,6 +255,7 @@ private:
   ChFiDS_State firstState;
   ChFiDS_State lastState;
   TopTools_SequenceOfShape spine;
+  BRepOffset_Type          myConnectType;
   Handle(TColStd_HArray1OfReal) abscissa;
   Standard_Real tolesp;
   Standard_Real firstparam;
index 8aa01184493c49edbc4fddbf951c70dba30ad950..34e35a0e66fc544f1b34f00673c6200e269f3788 100644 (file)
 
 #include <TopoDS.hxx>
 
+//=======================================================================
+//function : SetConnectType
+//purpose  : 
+//=======================================================================
+
+inline void  ChFiDS_Spine::SetConnectType(const BRepOffset_Type theConnectType)
+{
+  myConnectType = theConnectType;
+}
+
 //=======================================================================
 //function : SetFirstStatus
 //purpose  : 
@@ -36,6 +46,17 @@ inline void  ChFiDS_Spine::SetLastStatus(const ChFiDS_State S)
 {
   lastState = S;
 }
+
+//=======================================================================
+//function : ConnectType
+//purpose  : 
+//=======================================================================
+
+inline BRepOffset_Type  ChFiDS_Spine::ConnectType()const 
+{
+  return myConnectType;
+}
+
 //=======================================================================
 //function : FirstStatus
 //purpose  : 
@@ -46,7 +67,6 @@ inline ChFiDS_State  ChFiDS_Spine::FirstStatus()const
   return firstState;
 }
 
-
 //=======================================================================
 //function : LastStatus
 //purpose  :