-// File: ChFi3d_Builder_5.cxx
-// Created: Tue Mar 29 16:13:48 1994
-// Author: Isabelle GRIGNON
-// Copyright: OPEN CASCADE 1994
+// Created on: 1994-03-29
+// Created by: Isabelle GRIGNON
+// Copyright (c) 1994-1999 Matra Datavision
+// Copyright (c) 1999-2014 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
-#include <ChFi3d_FilBuilder.jxx>
+#include <Adaptor3d_CurveOnSurface.hxx>
+#include <Adaptor3d_HCurveOnSurface.hxx>
+#include <Adaptor3d_TopolTool.hxx>
+#include <BRep_Tool.hxx>
+#include <BRepAdaptor_Curve.hxx>
+#include <BRepAdaptor_Curve2d.hxx>
+#include <BRepAdaptor_HCurve.hxx>
+#include <BRepAdaptor_HCurve2d.hxx>
+#include <BRepAdaptor_HSurface.hxx>
+#include <BRepAdaptor_Surface.hxx>
+#include <BRepBlend_CSCircular.hxx>
+#include <BRepBlend_Line.hxx>
+#include <BRepLProp_CLProps.hxx>
+#include <BRepTopAdaptor_TopolTool.hxx>
+#include <BSplCLib.hxx>
#include <ChFi3d.hxx>
#include <ChFi3d_Builder_0.hxx>
-
-#include <StdFail_NotDone.hxx>
-#include <Standard_NotImplemented.hxx>
-#include <Standard_ErrorHandler.hxx>
-
-#include <math_Vector.hxx>
-#include <TColgp_Array1OfPnt.hxx>
-#include <TColgp_Array1OfPnt2d.hxx>
-#include <TColStd_Array1OfReal.hxx>
-#include <TColStd_Array1OfInteger.hxx>
-#include <TColStd_ListOfInteger.hxx>
-#include <gp_Pnt.hxx>
-#include <gp_Pnt2d.hxx>
-#include <gp_Dir.hxx>
-#include <gp_Lin.hxx>
-#include <gp_Pln.hxx>
-#include <gp_Ax3.hxx>
-#include <Geom_BSplineCurve.hxx>
-#include <Geom2d_TrimmedCurve.hxx>
+#include <ChFi3d_FilBuilder.hxx>
+#include <ChFiDS_CommonPoint.hxx>
+#include <ChFiDS_FaceInterference.hxx>
+#include <ChFiDS_FilSpine.hxx>
+#include <ChFiDS_HData.hxx>
+#include <ChFiDS_HElSpine.hxx>
+#include <ChFiDS_ListIteratorOfListOfStripe.hxx>
+#include <ChFiDS_Regul.hxx>
+#include <ChFiDS_SequenceOfSurfData.hxx>
+#include <ChFiDS_Spine.hxx>
+#include <ChFiDS_State.hxx>
+#include <ChFiDS_Stripe.hxx>
+#include <ChFiDS_SurfData.hxx>
+#include <ChFiKPart_ComputeData.hxx>
#include <Geom2d_BSplineCurve.hxx>
-#include <Law_Linear.hxx>
-#include <BRepBlend_CSCircular.hxx>
-#include <BRepBlend_Line.hxx>
+#include <Geom2d_TrimmedCurve.hxx>
+#include <Geom2dAdaptor_Curve.hxx>
+#include <Geom2dAdaptor_HCurve.hxx>
#include <Geom2dConvert.hxx>
-#include <BSplCLib.hxx>
-
-#include <Adaptor3d_CurveOnSurface.hxx>
-#include <Adaptor3d_HCurveOnSurface.hxx>
-#include <BRepLProp_CLProps.hxx>
+#include <Geom_BSplineCurve.hxx>
+#include <Geom_BSplineSurface.hxx>
#include <GeomAdaptor_Curve.hxx>
#include <GeomAdaptor_HCurve.hxx>
-#include <Geom2dAdaptor_Curve.hxx>
-#include <Geom2dAdaptor_HCurve.hxx>
-#include <GeomAdaptor_Surface.hxx>
#include <GeomAdaptor_HSurface.hxx>
-#include <BRep_Tool.hxx>
-#include <BRepAdaptor_Curve2d.hxx>
-#include <BRepAdaptor_Curve.hxx>
-#include <BRepAdaptor_HCurve.hxx>
-#include <BRepAdaptor_Surface.hxx>
-#include <BRepAdaptor_HSurface.hxx>
-#include <BRepTopAdaptor_TopolTool.hxx>
+#include <GeomAdaptor_Surface.hxx>
#include <GeomFill_ConstrainedFilling.hxx>
#include <GeomFill_SimpleBound.hxx>
-
+#include <gp_Ax3.hxx>
+#include <gp_Dir.hxx>
+#include <gp_Lin.hxx>
+#include <gp_Pln.hxx>
+#include <gp_Pnt.hxx>
+#include <gp_Pnt2d.hxx>
+#include <gp_XY.hxx>
+#include <IntCurveSurface_HInter.hxx>
+#include <IntCurveSurface_IntersectionPoint.hxx>
#include <IntSurf_LineOn2S.hxx>
#include <IntSurf_Transition.hxx>
#include <IntSurf_TypeTrans.hxx>
-#include <IntCurveSurface_HInter.hxx>
-#include <IntCurveSurface_IntersectionPoint.hxx>
-
+#include <Law_Function.hxx>
+#include <Law_Linear.hxx>
+#include <math_Vector.hxx>
+#include <Standard_ErrorHandler.hxx>
+#include <Standard_NotImplemented.hxx>
+#include <StdFail_NotDone.hxx>
+#include <TColgp_Array1OfPnt.hxx>
+#include <TColgp_Array1OfPnt2d.hxx>
+#include <TColStd_Array1OfInteger.hxx>
+#include <TColStd_Array1OfReal.hxx>
+#include <TColStd_ListOfInteger.hxx>
+#include <TopAbs.hxx>
+#include <TopAbs_Orientation.hxx>
+#include <TopExp.hxx>
#include <TopoDS.hxx>
-#include <TopoDS_Vertex.hxx>
+#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
+#include <TopoDS_Shape.hxx>
+#include <TopoDS_Vertex.hxx>
#include <TopOpeBRepDS_DataStructure.hxx>
+#include <TopOpeBRepDS_HDataStructure.hxx>
#include <TopOpeBRepDS_ListOfInterference.hxx>
-#include <TopAbs.hxx>
-#include <TopAbs_Orientation.hxx>
-#include <TopExp.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
-#include <TopOpeBRepDS_HDataStructure.hxx>
-#include <ChFiDS_Regul.hxx>
-#include <ChFiDS_State.hxx>
-#include <ChFiDS_SequenceOfSurfData.hxx>
-#include <ChFiDS_SurfData.hxx>
-#include <ChFiDS_FaceInterference.hxx>
-#include <ChFiDS_ListIteratorOfListOfStripe.hxx>
-#include <ChFiDS_Stripe.hxx>
-#include <ChFiDS_Spine.hxx>
-#include <ChFiDS_FilSpine.hxx>
-#include <ChFiDS_HData.hxx>
-#include <ChFiDS_CommonPoint.hxx>
-
-#include <ChFiKPart_ComputeData.hxx>
#ifdef DRAW
#include <DrawTrSurf.hxx>
#endif
-#ifdef DEB
+#ifdef OCCT_DEBUG
#include <Geom_TrimmedCurve.hxx>
extern Standard_Boolean ChFi3d_GettraceDRAWSPINE();
extern Standard_Boolean ChFi3d_GetcontextFORCEFILLING();
void ChFi3d_FilBuilder::PerformTwoCorner(const Standard_Integer Index)
{
-#ifdef DEB
+#ifdef OCCT_DEBUG
OSD_Chronometer ch;
ChFi3d_InitChron(ch); // init perf initialisation
#endif
yapiv = (pivot.IsSame(CP2.Arc()));
}
Handle(BRepAdaptor_HCurve) Hpivot;
-#ifndef DEB
Standard_Boolean sameparam = Standard_False;
Standard_Real parCP1 = 0., parCP2 = 0.;
-#else
- Standard_Boolean sameparam;
- Standard_Real parCP1, parCP2;
-#endif
if(yapiv) {
Hpivot = new BRepAdaptor_HCurve(pivot);
parCP1 = CP1.ParameterOnArc();
BRFaCo.Initialize(FaCo);
TopoDS_Face FF1,FF2,F,FaPiv;
-#ifndef DEB
TopAbs_Orientation pctrans = TopAbs_FORWARD ;
-#else
- TopAbs_Orientation pctrans;
-#endif
Handle(Geom2d_BSplineCurve) PCurveOnPiv;
FF1 = TopoDS::Face(DStr.Shape(sd1->Index(IFaArc1)));
FF2 = TopoDS::Face(DStr.Shape(sd2->Index(IFaArc2)));
}
}
-#ifdef DEB
+#ifdef OCCT_DEBUG
ChFi3d_ResultChron(ch ,t_t2cornerinit);//result perf initialisation
#endif
ChFiDS_FaceInterference intf11,intf12,intf21,intf22;
if(c1biseau){
-#ifdef DEB
+#ifdef OCCT_DEBUG
ChFi3d_InitChron(ch); // init perf PerformTwoCornerbyInter
#endif
done = PerformTwoCornerbyInter(Index);
-#ifdef DEB
+#ifdef OCCT_DEBUG
ChFi3d_ResultChron(ch , t_perf2cornerbyinter); // result perf PerformTwoCornerbyInter
#endif
intf12 = sd1->InterferenceOnS2();
intf21 = sd2->InterferenceOnS1();
intf22 = sd2->InterferenceOnS2();
-#ifdef DEB
+#ifdef OCCT_DEBUG
ChFi3d_InitChron(ch); // init perf PerformTwoCornerbyInter
#endif
done = PerformTwoCornerbyInter(Index);
-#ifdef DEB
+#ifdef OCCT_DEBUG
ChFi3d_ResultChron(ch , t_perf2cornerbyinter); // result perf PerformTwoCornerbyInter
#endif
if (!done) {
TopAbs_Orientation oriSFF1 = st1->Orientation(IFaArc1);
bid = 1;
bid = ChFi3d::NextSide(ori,OFF1,oriS,oriSFF1,bid);
- TopAbs_Orientation op1,op2;
+ TopAbs_Orientation op1 = TopAbs_FORWARD,op2 = TopAbs_FORWARD;
if(yapiv) bid = ChFi3d::ConcaveSide(BRS1,BRS2,pivot,op1,op2);
op1 = TopAbs::Reverse(op1);
op2 = TopAbs::Reverse(op2);
-#ifdef DEB
+#ifdef OCCT_DEBUG
ChFi3d_InitChron(ch);// init perf ChFiKPart_ComputeData
#endif
Standard_Real radius =
Handle(ChFiDS_FilSpine)::DownCast(st1->Spine())->Radius();
done = ChFiKPart_ComputeData::ComputeCorner(DStr,coin,HFaCo,HBRS1,HBRS2,
OFaCo,ori,op1,op2,radius);
-#ifdef DEB
+#ifdef OCCT_DEBUG
ChFi3d_ResultChron(ch , t_chfikpartcompdata);//result perf ChFiKPart_ComputeData
#endif
}
p2da2 = sd2->Interference(IFaArc2).PCurveOnSurf()->Value(uPCArc2);
p2df2 = sd2->Interference(IFaCo2).PCurveOnSurf()->Value(uPCArc2);
sd2->Interference(IFaCo2).PCurveOnFace()->D1(uPCArc2,p2dfac2,v2dfac2);
-#ifdef DEB
+#ifdef OCCT_DEBUG
ChFi3d_InitChron(ch ); // init perf filling
#endif
B1 = ChFi3d_mkbound(surf1,p2df1,p2da1,tolesp,2.e-4);
HFaCo,PCurveOnFace,
HFaPiv,PCurveOnPiv,OFaCo,1,
0,0,0,0);
-#ifdef DEB
+#ifdef OCCT_DEBUG
ChFi3d_ResultChron(ch , t_remplissage);// result perf filling
#endif
}
-#ifdef DEB
+#ifdef OCCT_DEBUG
ChFi3d_InitChron(ch); // init perf update DS
#endif
if (done){
sd2->ChangeInterference(IFaCo2).SetParameter(par2,isfirst2);
if (IFaCo2 == 2) st2->SetOrientation(TopAbs_REVERSED,isfirst2);
}
-#ifdef DEB
+#ifdef OCCT_DEBUG
ChFi3d_ResultChron(ch , t_t2cornerDS);// result perf update DS
#endif
}
}
Handle(ChFiDS_Stripe) stsam, stdif;
Handle(ChFiDS_SurfData) sdsam, sddif;
-#ifndef DEB
Standard_Real uintpcsam = 0., uintpcdif = 0.;
Standard_Integer ifacosam = 0, ifacodif = 0, ifaopsam = 0, ifaopdif = 0;
Standard_Boolean isfirstsam = Standard_False, isfirstdif = Standard_False;
-#else
- Standard_Real uintpcsam, uintpcdif;
- Standard_Integer ifacosam, ifacodif, ifaopsam, ifaopdif;
- Standard_Boolean isfirstsam, isfirstdif;
-#endif
if(Stat1 == ChFiDS_OnSame && Stat2 == ChFiDS_OnDiff){
stsam = st1; sdsam = sd1; uintpcsam = UIntPC1;
ifacosam = IFaCo1; ifaopsam = IFaArc1; isfirstsam = isfirst1;
("TwoCorner : No common face to loop the contour");
}
}
-#ifdef DEB
+#ifdef OCCT_DEBUG
ChFi3d_InitChron(ch ); // init perf filling
#endif
Handle(GeomFill_Boundary) Bsam,Bdif,Bfac;
curvopsam->D1(uintpcsam,PPfacsam,VVfacsam);
BRepAdaptor_Curve2d PCArcFac(Arcopdif,Fopsam);
PCArcFac.D0(cpopdif.ParameterOnArc(),ppfacdif);
+ //jgv for OCC26173
+ BRepAdaptor_Surface SurFopsam(Fopsam);
+ if (SurFopsam.IsUClosed())
+ {
+ Standard_Real Uperiod = SurFopsam.LastUParameter() - SurFopsam.FirstUParameter();
+ if (Abs(ppfacsam.X() - ppfacdif.X()) > Uperiod/2)
+ {
+ if (ppfacdif.X() < ppfacsam.X())
+ ppfacdif.SetX(ppfacdif.X() + Uperiod);
+ else
+ ppfacdif.SetX(ppfacdif.X() - Uperiod);
+ }
+ }
+ //////////////////
BRepAdaptor_Curve CArcFac(Arcopdif);
CArcFac.D1(cpopdif.ParameterOnArc(),PPfacdif,VVfacdif);
Handle(BRepAdaptor_HSurface) HBRFopsam = new BRepAdaptor_HSurface();
Hsurfsam,pcsurfsam,
HBRFopsam,pcnul,Osurfsam,1,
0,0,0,0);
-#ifdef DEB
+#ifdef OCCT_DEBUG
ChFi3d_ResultChron(ch , t_remplissage);// result perf filling
#endif
if(!done) Standard_Failure::Raise("concavites inverted : fail");
-#ifdef DEB
+#ifdef OCCT_DEBUG
ChFi3d_InitChron(ch); // init perf update DS
#endif
// Update 3 CornerData and the DS
sddif->ChangeVertex(isfirstdif,ifacodif) = Pl1;
sddif->ChangeInterference(ifacodif).SetParameter(uintpcdif,isfirstdif);
if (ifaopdif == 1) stdif->SetOrientation(TopAbs_REVERSED,isfirstdif);
-#ifdef DEB
+#ifdef OCCT_DEBUG
ChFi3d_ResultChron(ch , t_t2cornerDS);// result perf update DS
#endif
}