mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
0024177: Eliminate CLang compiler warning -Wlogical-op-parentheses (&& within ||)
Some fixes to eliminate warning
This commit is contained in:
parent
e97ea58f01
commit
0ebaa4dbc9
@ -1094,7 +1094,7 @@ void AIS_LengthDimension::ComputeFaceSelection( const Handle( SelectMgr_Selectio
|
|||||||
gp_Lin LengthLine( myPosition, DirOfArrow1 );
|
gp_Lin LengthLine( myPosition, DirOfArrow1 );
|
||||||
Standard_Real Par1 = ElCLib::Parameter( LengthLine, EndOfArrow1 );
|
Standard_Real Par1 = ElCLib::Parameter( LengthLine, EndOfArrow1 );
|
||||||
Standard_Real Par2 = ElCLib::Parameter( LengthLine, EndOfArrow2 );
|
Standard_Real Par2 = ElCLib::Parameter( LengthLine, EndOfArrow2 );
|
||||||
if (Par1 > 0.0 && Par2 > 0.0 || Par1 < 0.0 && Par2 < 0.0)
|
if ((Par1 > 0.0 && Par2 > 0.0) || (Par1 < 0.0 && Par2 < 0.0))
|
||||||
{
|
{
|
||||||
FirstPoint = myPosition;
|
FirstPoint = myPosition;
|
||||||
LastPoint = (Abs( Par1 ) > Abs( Par2 ))? EndOfArrow1 : EndOfArrow2;
|
LastPoint = (Abs( Par1 ) > Abs( Par2 ))? EndOfArrow1 : EndOfArrow2;
|
||||||
|
@ -150,12 +150,7 @@ void AppParCurves_Variational::Adjusting(
|
|||||||
j1cibl = Sqrt(myCriterium[0] / (NbrPnt - NbrConstraint));
|
j1cibl = Sqrt(myCriterium[0] / (NbrPnt - NbrConstraint));
|
||||||
vseuil = Sqrt(vocri[1]) + (erold - myMaxError) * 4;
|
vseuil = Sqrt(vocri[1]) + (erold - myMaxError) * 4;
|
||||||
|
|
||||||
// if(CNew->NbElements() == TheCurve->NbElements())
|
lrejet = ((myMaxError > WQuality) && (myMaxError > erold * 1.01)) || (Sqrt(myCriterium[1]) > vseuil * 1.05);
|
||||||
lrejet = myMaxError > WQuality && myMaxError > erold * 1.01
|
|
||||||
|| Sqrt(myCriterium[1]) > vseuil * 1.05;
|
|
||||||
// else
|
|
||||||
// lrejet = myMaxError > WQuality && myMaxError > erold * 1.05
|
|
||||||
// || Sqrt(myCriterium[1]) > vseuil * 1.01;
|
|
||||||
|
|
||||||
if (lrejet) {
|
if (lrejet) {
|
||||||
myCriterium[0] = vocri[0];
|
myCriterium[0] = vocri[0];
|
||||||
@ -175,7 +170,7 @@ void AppParCurves_Variational::Adjusting(
|
|||||||
|
|
||||||
/* (7) Test de convergence */
|
/* (7) Test de convergence */
|
||||||
|
|
||||||
if (iter >= mxiter && myMaxSegment == CNew->NbElements() || myMaxError < WQuality) {
|
if (((iter >= mxiter) && (myMaxSegment == CNew->NbElements())) || myMaxError < WQuality) {
|
||||||
loptim = Standard_False;
|
loptim = Standard_False;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1231,8 +1231,8 @@ void BOPAlgo_PaveFiller::PerformFF()
|
|||||||
const BOPDS_InterfEF& aEF = aEFs(i);
|
const BOPDS_InterfEF& aEF = aEFs(i);
|
||||||
nE = aEF.Index1();
|
nE = aEF.Index1();
|
||||||
nFOpposite = aEF.Index2();
|
nFOpposite = aEF.Index2();
|
||||||
if(aMIF1.Contains(nE) && aMIF2.Contains(nFOpposite) ||
|
if((aMIF1.Contains(nE) && aMIF2.Contains(nFOpposite)) ||
|
||||||
aMIF1.Contains(nFOpposite) && aMIF2.Contains(nE)) {
|
(aMIF1.Contains(nFOpposite) && aMIF2.Contains(nE))) {
|
||||||
//
|
//
|
||||||
IntTools_CommonPrt aCP = aEF.CommonPart();
|
IntTools_CommonPrt aCP = aEF.CommonPart();
|
||||||
if(aCP.Type() == TopAbs_VERTEX) {
|
if(aCP.Type() == TopAbs_VERTEX) {
|
||||||
@ -1462,8 +1462,8 @@ void BOPAlgo_PaveFiller::PerformFF()
|
|||||||
const BOPDS_InterfVV& aVV = aVVs(i);
|
const BOPDS_InterfVV& aVV = aVVs(i);
|
||||||
nV1 = aVV.Index1();
|
nV1 = aVV.Index1();
|
||||||
nV2 = aVV.Index2();
|
nV2 = aVV.Index2();
|
||||||
if(aMIF1.Contains(nV1) && aMIF2.Contains(nV2) ||
|
if((aMIF1.Contains(nV1) && aMIF2.Contains(nV2)) ||
|
||||||
aMIF1.Contains(nV2) && aMIF2.Contains(nV1)) {
|
(aMIF1.Contains(nV2) && aMIF2.Contains(nV1))) {
|
||||||
if (aVV.HasIndexNew()) {
|
if (aVV.HasIndexNew()) {
|
||||||
nVNew = aVV.IndexNew();
|
nVNew = aVV.IndexNew();
|
||||||
aMVStick.Add(nVNew);
|
aMVStick.Add(nVNew);
|
||||||
@ -1475,8 +1475,8 @@ void BOPAlgo_PaveFiller::PerformFF()
|
|||||||
const BOPDS_InterfVE& aVE = aVEs(i);
|
const BOPDS_InterfVE& aVE = aVEs(i);
|
||||||
nV = aVE.Index1();
|
nV = aVE.Index1();
|
||||||
nE = aVE.Index2();
|
nE = aVE.Index2();
|
||||||
if(aMIF1.Contains(nV) && aMIF2.Contains(nE) ||
|
if((aMIF1.Contains(nV) && aMIF2.Contains(nE)) ||
|
||||||
aMIF1.Contains(nE) && aMIF2.Contains(nV)) {
|
(aMIF1.Contains(nE) && aMIF2.Contains(nV))) {
|
||||||
aMVStick.Add(nV);
|
aMVStick.Add(nV);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1485,8 +1485,8 @@ void BOPAlgo_PaveFiller::PerformFF()
|
|||||||
const BOPDS_InterfEE& aEE = aEEs(i);
|
const BOPDS_InterfEE& aEE = aEEs(i);
|
||||||
nE1 = aEE.Index1();
|
nE1 = aEE.Index1();
|
||||||
nE2 = aEE.Index2();
|
nE2 = aEE.Index2();
|
||||||
if(aMIF1.Contains(nE1) && aMIF2.Contains(nE2) ||
|
if((aMIF1.Contains(nE1) && aMIF2.Contains(nE2)) ||
|
||||||
aMIF1.Contains(nE2) && aMIF2.Contains(nE1)) {
|
(aMIF1.Contains(nE2) && aMIF2.Contains(nE1))) {
|
||||||
IntTools_CommonPrt aCP = aEE.CommonPart();
|
IntTools_CommonPrt aCP = aEE.CommonPart();
|
||||||
if(aCP.Type() == TopAbs_VERTEX) {
|
if(aCP.Type() == TopAbs_VERTEX) {
|
||||||
nVNew = aEE.IndexNew();
|
nVNew = aEE.IndexNew();
|
||||||
@ -1499,8 +1499,8 @@ void BOPAlgo_PaveFiller::PerformFF()
|
|||||||
const BOPDS_InterfVF& aVF = aVFs(i);
|
const BOPDS_InterfVF& aVF = aVFs(i);
|
||||||
nV = aVF.Index1();
|
nV = aVF.Index1();
|
||||||
nF = aVF.Index2();
|
nF = aVF.Index2();
|
||||||
if(aMIF1.Contains(nV) && aMIF2.Contains(nF) ||
|
if((aMIF1.Contains(nV) && aMIF2.Contains(nF)) ||
|
||||||
aMIF1.Contains(nF) && aMIF2.Contains(nV)) {
|
(aMIF1.Contains(nF) && aMIF2.Contains(nV))) {
|
||||||
aMVStick.Add(nV);
|
aMVStick.Add(nV);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1509,8 +1509,8 @@ void BOPAlgo_PaveFiller::PerformFF()
|
|||||||
const BOPDS_InterfEF& aEF = aEFs(i);
|
const BOPDS_InterfEF& aEF = aEFs(i);
|
||||||
nE = aEF.Index1();
|
nE = aEF.Index1();
|
||||||
nF = aEF.Index2();
|
nF = aEF.Index2();
|
||||||
if(aMIF1.Contains(nE) && aMIF2.Contains(nF) ||
|
if((aMIF1.Contains(nE) && aMIF2.Contains(nF)) ||
|
||||||
aMIF1.Contains(nF) && aMIF2.Contains(nE)) {
|
(aMIF1.Contains(nF) && aMIF2.Contains(nE))) {
|
||||||
IntTools_CommonPrt aCP = aEF.CommonPart();
|
IntTools_CommonPrt aCP = aEF.CommonPart();
|
||||||
if(aCP.Type() == TopAbs_VERTEX) {
|
if(aCP.Type() == TopAbs_VERTEX) {
|
||||||
nVNew = aEF.IndexNew();
|
nVNew = aEF.IndexNew();
|
||||||
|
@ -357,10 +357,8 @@ void BRepFill_TrimEdgeTool::IntersectWith(const TopoDS_Edge& Edge1,
|
|||||||
Standard_Real TolInit= 1.e-9;
|
Standard_Real TolInit= 1.e-9;
|
||||||
Standard_Integer nn = 7;
|
Standard_Integer nn = 7;
|
||||||
|
|
||||||
if(AC1.GetType() != GeomAbs_Circle &&
|
if((AC1.GetType() != GeomAbs_Circle && AC1.GetType() != GeomAbs_Line) ||
|
||||||
AC1.GetType() != GeomAbs_Line ||
|
(AC2.GetType() != GeomAbs_Circle && AC2.GetType() != GeomAbs_Line)) {
|
||||||
AC2.GetType() != GeomAbs_Circle &&
|
|
||||||
AC2.GetType() != GeomAbs_Line ) {
|
|
||||||
|
|
||||||
TolInit = 1.e-8;
|
TolInit = 1.e-8;
|
||||||
nn = 6;
|
nn = 6;
|
||||||
|
@ -483,7 +483,7 @@ void BRepLib_FindSurface::Init(const TopoDS_Shape& S,
|
|||||||
//static Standard_Real weakness = 5.0;
|
//static Standard_Real weakness = 5.0;
|
||||||
Standard_Real weakness = 5.0;
|
Standard_Real weakness = 5.0;
|
||||||
//XXf
|
//XXf
|
||||||
if(dfDist <= myTolerance || dfDist < myTolerance*weakness && Tol<0) {
|
if(dfDist <= myTolerance || (dfDist < myTolerance*weakness && Tol<0)) {
|
||||||
//XXf
|
//XXf
|
||||||
//myTolReached = dfDist;
|
//myTolReached = dfDist;
|
||||||
//XXt
|
//XXt
|
||||||
|
@ -950,8 +950,8 @@ static Standard_Boolean AreClosed(const TopoDS_Edge& E1,
|
|||||||
TopExp::Vertices( E1, V11, V12 );
|
TopExp::Vertices( E1, V11, V12 );
|
||||||
TopExp::Vertices( E2, V21, V22 );
|
TopExp::Vertices( E2, V21, V22 );
|
||||||
|
|
||||||
if (V11.IsSame(V21) && V12.IsSame(V22) ||
|
if ((V11.IsSame(V21) && V12.IsSame(V22)) ||
|
||||||
V11.IsSame(V22) && V12.IsSame(V21))
|
(V11.IsSame(V22) && V12.IsSame(V21)))
|
||||||
return Standard_True;
|
return Standard_True;
|
||||||
|
|
||||||
return Standard_False;
|
return Standard_False;
|
||||||
@ -1417,14 +1417,14 @@ static Standard_Boolean CheckIntersFF(const BOPDS_PDS& pDS,
|
|||||||
|
|
||||||
if (V1onBound && V2onBound)
|
if (V1onBound && V2onBound)
|
||||||
{
|
{
|
||||||
if (TangFirst.IsParallel(RefTangFirst,AngTol) && TangLast.IsParallel(RefTangLast,AngTol) ||
|
if ((TangFirst.IsParallel(RefTangFirst,AngTol) && TangLast.IsParallel(RefTangLast,AngTol)) ||
|
||||||
TangFirst.IsParallel(RefTangLast,AngTol) && TangLast.IsParallel(RefTangFirst,AngTol))
|
(TangFirst.IsParallel(RefTangLast,AngTol) && TangLast.IsParallel(RefTangFirst,AngTol)))
|
||||||
{
|
{
|
||||||
TrueEdges.Add( Edges(i) );
|
TrueEdges.Add( Edges(i) );
|
||||||
return Standard_True;
|
return Standard_True;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return Standard_False;
|
return Standard_False;
|
||||||
}
|
}
|
||||||
|
|
||||||
//StartEonF1 = (V1onBound)? VEmapF1( V1 ) : VEmapF1( V2 );
|
//StartEonF1 = (V1onBound)? VEmapF1( V1 ) : VEmapF1( V2 );
|
||||||
|
@ -536,8 +536,8 @@ void BRepOffsetAPI_MiddlePath::Build()
|
|||||||
{
|
{
|
||||||
anEdge = TopoDS::Edge(itl.Value());
|
anEdge = TopoDS::Edge(itl.Value());
|
||||||
TopExp::Vertices(anEdge, V1, V2);
|
TopExp::Vertices(anEdge, V1, V2);
|
||||||
if ((V1.IsSame(PrevVertex) && V2.IsSame(CurVertex) ||
|
if (((V1.IsSame(PrevVertex) && V2.IsSame(CurVertex)) ||
|
||||||
V1.IsSame(CurVertex) && V2.IsSame(PrevVertex)) &&
|
(V1.IsSame(CurVertex) && V2.IsSame(PrevVertex))) &&
|
||||||
!anEdge.IsSame(E1))
|
!anEdge.IsSame(E1))
|
||||||
{
|
{
|
||||||
ProperEdge = anEdge;
|
ProperEdge = anEdge;
|
||||||
@ -852,8 +852,8 @@ void BRepOffsetAPI_MiddlePath::Build()
|
|||||||
}
|
}
|
||||||
gp_Dir aDir1 = gp_Vec(aCirc.Location(), Pnt1);
|
gp_Dir aDir1 = gp_Vec(aCirc.Location(), Pnt1);
|
||||||
gp_Dir aDir2 = gp_Vec(aCirc.Location(), Pnt2);
|
gp_Dir aDir2 = gp_Vec(aCirc.Location(), Pnt2);
|
||||||
if (!(aDir1.IsEqual(theDir1, AngTol) && aDir2.IsEqual(theDir2, AngTol) ||
|
if (!((aDir1.IsEqual(theDir1, AngTol) && aDir2.IsEqual(theDir2, AngTol)) ||
|
||||||
aDir1.IsEqual(theDir2, AngTol) && aDir2.IsEqual(theDir1, AngTol)))
|
(aDir1.IsEqual(theDir2, AngTol) && aDir2.IsEqual(theDir1, AngTol))))
|
||||||
{
|
{
|
||||||
SimilarArcs = Standard_False;
|
SimilarArcs = Standard_False;
|
||||||
break;
|
break;
|
||||||
|
@ -62,7 +62,7 @@ Standard_Integer props(Draw_Interpretor& di, Standard_Integer n, const char** a)
|
|||||||
Standard_Boolean onlyClosed = Standard_False;
|
Standard_Boolean onlyClosed = Standard_False;
|
||||||
Standard_Real eps = 1.0;
|
Standard_Real eps = 1.0;
|
||||||
Standard_Boolean witheps = Standard_False;
|
Standard_Boolean witheps = Standard_False;
|
||||||
if(n > 2 && *a[2]=='c' || n > 3 && *a[3]=='c') onlyClosed = Standard_True;
|
if((n > 2 && *a[2]=='c') || (n > 3 && *a[3]=='c')) onlyClosed = Standard_True;
|
||||||
if(n > 2 && *a[2]!='c' && n != 5) {eps = Draw::Atof (a[2]); witheps = Standard_True;}
|
if(n > 2 && *a[2]!='c' && n != 5) {eps = Draw::Atof (a[2]); witheps = Standard_True;}
|
||||||
|
|
||||||
if (witheps){
|
if (witheps){
|
||||||
|
@ -505,7 +505,7 @@ TopAbs_State BRepTopAdaptor_FClass2d::Perform(const gp_Pnt2d& _Puv,
|
|||||||
Status = aClassifier.State();
|
Status = aClassifier.State();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!RecadreOnPeriodic || !IsUPer && !IsVPer)
|
if (!RecadreOnPeriodic || (!IsUPer && !IsVPer))
|
||||||
return Status;
|
return Status;
|
||||||
if (Status == TopAbs_IN || Status == TopAbs_ON)
|
if (Status == TopAbs_IN || Status == TopAbs_ON)
|
||||||
return Status;
|
return Status;
|
||||||
@ -635,7 +635,7 @@ TopAbs_State BRepTopAdaptor_FClass2d::TestOnRestriction(const gp_Pnt2d& _Puv,
|
|||||||
Status = aClassifier.State();
|
Status = aClassifier.State();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!RecadreOnPeriodic || !IsUPer && !IsVPer)
|
if (!RecadreOnPeriodic || (!IsUPer && !IsVPer))
|
||||||
return Status;
|
return Status;
|
||||||
if (Status == TopAbs_IN || Status == TopAbs_ON)
|
if (Status == TopAbs_IN || Status == TopAbs_ON)
|
||||||
return Status;
|
return Status;
|
||||||
|
@ -472,8 +472,8 @@ Standard_Boolean Blend_Walking::Continu(Blend_Function& Func,
|
|||||||
if (sens < 0.) {
|
if (sens < 0.) {
|
||||||
Ext1 = line->StartPointOnFirst();
|
Ext1 = line->StartPointOnFirst();
|
||||||
Ext2 = line->StartPointOnSecond();
|
Ext2 = line->StartPointOnSecond();
|
||||||
if (OnS1 && Ext1.NbPointOnRst() == 0 ||
|
if ((OnS1 && Ext1.NbPointOnRst() == 0) ||
|
||||||
!OnS1 && Ext2.NbPointOnRst() == 0) {
|
(!OnS1 && Ext2.NbPointOnRst() == 0)) {
|
||||||
return Standard_False;
|
return Standard_False;
|
||||||
}
|
}
|
||||||
previousP = line->Point(1);
|
previousP = line->Point(1);
|
||||||
@ -483,8 +483,8 @@ Standard_Boolean Blend_Walking::Continu(Blend_Function& Func,
|
|||||||
else {
|
else {
|
||||||
Ext1 = line->EndPointOnFirst();
|
Ext1 = line->EndPointOnFirst();
|
||||||
Ext2 = line->EndPointOnSecond();
|
Ext2 = line->EndPointOnSecond();
|
||||||
if (OnS1 && Ext1.NbPointOnRst() == 0 ||
|
if ((OnS1 && Ext1.NbPointOnRst() == 0) ||
|
||||||
!OnS1 && Ext2.NbPointOnRst() == 0) {
|
(!OnS1 && Ext2.NbPointOnRst() == 0)) {
|
||||||
return Standard_False;
|
return Standard_False;
|
||||||
}
|
}
|
||||||
previousP = line->Point(line->NbPoints());
|
previousP = line->Point(line->NbPoints());
|
||||||
@ -505,16 +505,16 @@ Standard_Boolean Blend_Walking::Continu(Blend_Function& Func,
|
|||||||
|
|
||||||
Standard_Integer newlength = line->NbPoints();
|
Standard_Integer newlength = line->NbPoints();
|
||||||
if (sens <0.) {
|
if (sens <0.) {
|
||||||
if (OnS1 && line->StartPointOnSecond().NbPointOnRst() == 0 ||
|
if ((OnS1 && line->StartPointOnSecond().NbPointOnRst() == 0) ||
|
||||||
!OnS1 && line->StartPointOnFirst().NbPointOnRst() == 0) {
|
(!OnS1 && line->StartPointOnFirst().NbPointOnRst() == 0)) {
|
||||||
line->Remove(1,newlength-length);
|
line->Remove(1,newlength-length);
|
||||||
line->SetStartPoints(Ext1,Ext2);
|
line->SetStartPoints(Ext1,Ext2);
|
||||||
return Standard_False;
|
return Standard_False;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (OnS1 && line->EndPointOnSecond().NbPointOnRst() == 0 ||
|
if ((OnS1 && line->EndPointOnSecond().NbPointOnRst() == 0) ||
|
||||||
!OnS1 && line->EndPointOnFirst().NbPointOnRst() == 0) {
|
(!OnS1 && line->EndPointOnFirst().NbPointOnRst() == 0)) {
|
||||||
line->Remove(length,newlength);
|
line->Remove(length,newlength);
|
||||||
line->SetEndPoints(Ext1,Ext2);
|
line->SetEndPoints(Ext1,Ext2);
|
||||||
return Standard_False;
|
return Standard_False;
|
||||||
|
@ -832,7 +832,7 @@ Standard_Boolean Bnd_Box::IsOut (const gp_Trsf& T1,
|
|||||||
|
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : IsOut
|
//function : IsSegmentOut
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
@ -848,12 +848,14 @@ static Standard_Boolean IsSegmentOut(Standard_Real x1,Standard_Real y1,
|
|||||||
Standard_Real ysmax = Max (ys1, ys2);
|
Standard_Real ysmax = Max (ys1, ys2);
|
||||||
|
|
||||||
if (ysmax-ysmin < eps && (y1-ys1 < eps && ys1-y2 < eps) &&
|
if (ysmax-ysmin < eps && (y1-ys1 < eps && ys1-y2 < eps) &&
|
||||||
(xsmin-x1 < eps && x1-xsmax < eps || xsmin-x2 < eps && x2-xsmax < eps ||
|
((xsmin-x1 < eps && x1-xsmax < eps) ||
|
||||||
x1-xs1 < eps && xs1-x2 < eps))
|
(xsmin-x2 < eps && x2-xsmax < eps) ||
|
||||||
|
(x1-xs1 < eps && xs1-x2 < eps)))
|
||||||
return Standard_False;
|
return Standard_False;
|
||||||
if (xsmax-xsmin < eps && (x1-xs1 < eps && xs1-x2 < eps) &&
|
if (xsmax-xsmin < eps && (x1-xs1 < eps && xs1-x2 < eps) &&
|
||||||
(ysmin-y1 < eps && y1-ysmax < eps || ysmin-y2 < eps && y2-ysmax < eps ||
|
((ysmin-y1 < eps && y1-ysmax < eps) ||
|
||||||
y1-ys1 < eps && ys1-y2 < eps))
|
(ysmin-y2 < eps && y2-ysmax < eps) ||
|
||||||
|
(y1-ys1 < eps && ys1-y2 < eps)))
|
||||||
return Standard_False;
|
return Standard_False;
|
||||||
|
|
||||||
if ((xs1 < x1 && xs2 < x1) || (xs1 > x2 && xs2 > x2) ||
|
if ((xs1 < x1 && xs2 < x1) || (xs1 > x2 && xs2 > x2) ||
|
||||||
|
@ -1093,8 +1093,8 @@ TopoDS_Edge ChFi2d_Builder::BuildFilletEdge(const TopoDS_Vertex& V,
|
|||||||
if (U1 > Vv1 && U1 > 2.*M_PI) {
|
if (U1 > Vv1 && U1 > 2.*M_PI) {
|
||||||
ElCLib::AdjustPeriodic(0.,2.*M_PI,Precision::Confusion(),U1,Vv1);
|
ElCLib::AdjustPeriodic(0.,2.*M_PI,Precision::Confusion(),U1,Vv1);
|
||||||
} // if (U1 ...
|
} // if (U1 ...
|
||||||
if (O1 == TopAbs_FORWARD && OE1 == TopAbs_FORWARD ||
|
if ( (O1 == TopAbs_FORWARD && OE1 == TopAbs_FORWARD) ||
|
||||||
O1 == TopAbs_REVERSED && OE1 == TopAbs_REVERSED ) {
|
(O1 == TopAbs_REVERSED && OE1 == TopAbs_REVERSED) ) {
|
||||||
filletEdge = BRepLib_MakeEdge(circle, refSurf,
|
filletEdge = BRepLib_MakeEdge(circle, refSurf,
|
||||||
NewExtr1, NewExtr2, U1, Vv1);
|
NewExtr1, NewExtr2, U1, Vv1);
|
||||||
} // if (O1 == ...
|
} // if (O1 == ...
|
||||||
@ -1104,8 +1104,8 @@ TopoDS_Edge ChFi2d_Builder::BuildFilletEdge(const TopoDS_Vertex& V,
|
|||||||
} // else ...
|
} // else ...
|
||||||
if (!Sense) {
|
if (!Sense) {
|
||||||
TopAbs_Orientation S1 = filletEdge.Orientation();
|
TopAbs_Orientation S1 = filletEdge.Orientation();
|
||||||
if (O1 == TopAbs_FORWARD && OE1 == TopAbs_FORWARD ||
|
if ((O1 == TopAbs_FORWARD && OE1 == TopAbs_FORWARD) ||
|
||||||
O1 == TopAbs_REVERSED && OE1 == TopAbs_REVERSED ) {
|
(O1 == TopAbs_REVERSED && OE1 == TopAbs_REVERSED) ) {
|
||||||
filletEdge = BRepLib_MakeEdge(circle, refSurf,
|
filletEdge = BRepLib_MakeEdge(circle, refSurf,
|
||||||
NewExtr2, NewExtr1, Vv1, U1);
|
NewExtr2, NewExtr1, Vv1, U1);
|
||||||
}
|
}
|
||||||
|
@ -389,9 +389,9 @@ void ChFi3d_Builder::Trunc(const Handle(ChFiDS_SurfData)& SD,
|
|||||||
TopoDS_Face F2 = BS2->ChangeSurface().Face();
|
TopoDS_Face F2 = BS2->ChangeSurface().Face();
|
||||||
const ChFiDS_CommonPoint& cp1 = SD->Vertex(isfirst,1);
|
const ChFiDS_CommonPoint& cp1 = SD->Vertex(isfirst,1);
|
||||||
const ChFiDS_CommonPoint& cp2 = SD->Vertex(isfirst,2);
|
const ChFiDS_CommonPoint& cp2 = SD->Vertex(isfirst,2);
|
||||||
if(!(cp1.IsOnArc() && SearchFace(Spine,cp1,F1,FBID) ||
|
if(!((cp1.IsOnArc() && SearchFace(Spine,cp1,F1,FBID)) ||
|
||||||
cp2.IsOnArc() && SearchFace(Spine,cp2,F2,FBID))) {
|
(cp2.IsOnArc() && SearchFace(Spine,cp2,F2,FBID)))) {
|
||||||
tron = ChFi3d_KParticular(Spine,ivois,BS1->ChangeSurface(),BS2->ChangeSurface());
|
tron = ChFi3d_KParticular(Spine,ivois,BS1->ChangeSurface(),BS2->ChangeSurface());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -273,11 +273,11 @@ Standard_Boolean ChFiDS_FilSpine::IsConstant(const Standard_Integer IE)const
|
|||||||
rad = parandrad(i).Y();
|
rad = parandrad(i).Y();
|
||||||
Standard_Real nextpar = parandrad(i+1).X();
|
Standard_Real nextpar = parandrad(i+1).X();
|
||||||
if (Abs( Uf-par ) <= gp::Resolution() ||
|
if (Abs( Uf-par ) <= gp::Resolution() ||
|
||||||
par < Uf && Uf < nextpar && nextpar-Uf > gp::Resolution())
|
(par < Uf && Uf < nextpar && nextpar-Uf > gp::Resolution()))
|
||||||
{
|
{
|
||||||
StartRad = rad;
|
StartRad = rad;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (i++; i <= parandrad.Length(); i++)
|
for (i++; i <= parandrad.Length(); i++)
|
||||||
{
|
{
|
||||||
@ -322,11 +322,11 @@ Standard_Real ChFiDS_FilSpine::Radius(const Standard_Integer IE)const
|
|||||||
rad = parandrad(i).Y();
|
rad = parandrad(i).Y();
|
||||||
Standard_Real nextpar = parandrad(i+1).X();
|
Standard_Real nextpar = parandrad(i+1).X();
|
||||||
if (Abs( Uf-par ) <= gp::Resolution() ||
|
if (Abs( Uf-par ) <= gp::Resolution() ||
|
||||||
par < Uf && Uf < nextpar && nextpar-Uf > gp::Resolution())
|
(par < Uf && Uf < nextpar && nextpar-Uf > gp::Resolution()))
|
||||||
{
|
{
|
||||||
StartRad = rad;
|
StartRad = rad;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (i++; i <= parandrad.Length(); i++)
|
for (i++; i <= parandrad.Length(); i++)
|
||||||
{
|
{
|
||||||
|
@ -502,8 +502,8 @@ static void ComputeTangency (const Contap_TheSearch& solrst,
|
|||||||
LocTrans = TopAbs_EXTERNAL; // et pourquoi pas INTERNAL
|
LocTrans = TopAbs_EXTERNAL; // et pourquoi pas INTERNAL
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if ((test > 0.)&& arcorien == TopAbs_FORWARD ||
|
if ((test > 0. && arcorien == TopAbs_FORWARD) ||
|
||||||
(test < 0.)&& arcorien == TopAbs_REVERSED){
|
(test < 0. && arcorien == TopAbs_REVERSED)){
|
||||||
LocTrans = TopAbs_FORWARD;
|
LocTrans = TopAbs_FORWARD;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -544,8 +544,8 @@ static void ComputeTangency (const Contap_TheSearch& solrst,
|
|||||||
LocTrans = TopAbs_EXTERNAL; // et pourquoi pas INTERNAL
|
LocTrans = TopAbs_EXTERNAL; // et pourquoi pas INTERNAL
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if ((test > 0.)&& arcorien == TopAbs_FORWARD ||
|
if ((test > 0. && arcorien == TopAbs_FORWARD) ||
|
||||||
(test < 0.)&& arcorien == TopAbs_REVERSED){
|
(test < 0. && arcorien == TopAbs_REVERSED)){
|
||||||
LocTrans = TopAbs_FORWARD;
|
LocTrans = TopAbs_FORWARD;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -159,7 +159,7 @@ void DsgPrs_LengthPresentation::Add( const Handle(Prs3d_Presentation)& aPresenta
|
|||||||
Standard_Real Par1 = ElCLib::Parameter( LengthLine, EndOfArrow1 );
|
Standard_Real Par1 = ElCLib::Parameter( LengthLine, EndOfArrow1 );
|
||||||
Standard_Real Par2 = ElCLib::Parameter( LengthLine, EndOfArrow2 );
|
Standard_Real Par2 = ElCLib::Parameter( LengthLine, EndOfArrow2 );
|
||||||
gp_Pnt FirstPoint, LastPoint;
|
gp_Pnt FirstPoint, LastPoint;
|
||||||
if (Par1 > 0.0 && Par2 > 0.0 || Par1 < 0.0 && Par2 < 0.0)
|
if ((Par1 > 0.0 && Par2 > 0.0) || (Par1 < 0.0 && Par2 < 0.0))
|
||||||
{
|
{
|
||||||
FirstPoint = OffsetPoint;
|
FirstPoint = OffsetPoint;
|
||||||
LastPoint = (Abs( Par1 ) > Abs( Par2 ))? EndOfArrow1 : EndOfArrow2;
|
LastPoint = (Abs( Par1 ) > Abs( Par2 ))? EndOfArrow1 : EndOfArrow2;
|
||||||
@ -310,7 +310,7 @@ void DsgPrs_LengthPresentation::Add( const Handle(Prs3d_Presentation)& aPresenta
|
|||||||
Standard_Real Par1 = ElCLib::Parameter( LengthLine, AttachmentPoint1 );
|
Standard_Real Par1 = ElCLib::Parameter( LengthLine, AttachmentPoint1 );
|
||||||
Standard_Real Par2 = ElCLib::Parameter( LengthLine, EndOfArrow2 );
|
Standard_Real Par2 = ElCLib::Parameter( LengthLine, EndOfArrow2 );
|
||||||
gp_Pnt FirstPoint, LastPoint;
|
gp_Pnt FirstPoint, LastPoint;
|
||||||
if (Par1 > 0.0 && Par2 > 0.0 || Par1 < 0.0 && Par2 < 0.0)
|
if ((Par1 > 0.0 && Par2 > 0.0) || (Par1 < 0.0 && Par2 < 0.0))
|
||||||
{
|
{
|
||||||
FirstPoint = OffsetPoint;
|
FirstPoint = OffsetPoint;
|
||||||
LastPoint = (Abs( Par1 ) > Abs( Par2 ))? AttachmentPoint1 : EndOfArrow2;
|
LastPoint = (Abs( Par1 ) > Abs( Par2 ))? AttachmentPoint1 : EndOfArrow2;
|
||||||
|
@ -178,8 +178,8 @@ static Standard_Boolean ComputeDir(const TopoDS_Shape& shape, gp_Pnt& pt, gp_Dir
|
|||||||
pt = lProps.Value();
|
pt = lProps.Value();
|
||||||
dir = lProps.Normal();
|
dir = lProps.Normal();
|
||||||
}
|
}
|
||||||
if ((shape.Orientation() == TopAbs_FORWARD) && (mode == 1) ||
|
if (((shape.Orientation() == TopAbs_FORWARD) && (mode == 1)) ||
|
||||||
(shape.Orientation() == TopAbs_REVERSED) && (mode == 0)) {
|
((shape.Orientation() == TopAbs_REVERSED) && (mode == 0))) {
|
||||||
dir.Reverse();
|
dir.Reverse();
|
||||||
}
|
}
|
||||||
return Standard_True;
|
return Standard_True;
|
||||||
|
@ -1663,7 +1663,7 @@ void Geom_OffsetSurface::SetD0(const Standard_Real U, const Standard_Real V,
|
|||||||
CSLib_NormalStatus NStatus;
|
CSLib_NormalStatus NStatus;
|
||||||
CSLib::Normal (D1U, D1V, MagTol, NStatus, Normal);
|
CSLib::Normal (D1U, D1V, MagTol, NStatus, Normal);
|
||||||
|
|
||||||
if ((NStatus == CSLib_Defined)) // akm - only in singularities && !AlongU && !AlongV)
|
if (NStatus == CSLib_Defined) // akm - only in singularities && !AlongU && !AlongV)
|
||||||
{
|
{
|
||||||
P.SetXYZ(P.XYZ() + offsetValue * Normal.XYZ());
|
P.SetXYZ(P.XYZ() + offsetValue * Normal.XYZ());
|
||||||
}
|
}
|
||||||
|
@ -103,8 +103,8 @@ Handle(Geom2d_Curve) Geom2dAdaptor::MakeCurve
|
|||||||
|
|
||||||
// trim the curve if necassary.
|
// trim the curve if necassary.
|
||||||
if (! C2D.IsNull() &&
|
if (! C2D.IsNull() &&
|
||||||
(HC.FirstParameter() != C2D->FirstParameter()) ||
|
((HC.FirstParameter() != C2D->FirstParameter()) ||
|
||||||
(HC.LastParameter() != C2D->LastParameter())) {
|
(HC.LastParameter() != C2D->LastParameter()))) {
|
||||||
|
|
||||||
C2D = new Geom2d_TrimmedCurve
|
C2D = new Geom2d_TrimmedCurve
|
||||||
(C2D,HC.FirstParameter(),HC.LastParameter());
|
(C2D,HC.FirstParameter(),HC.LastParameter());
|
||||||
|
@ -90,8 +90,8 @@ Handle(Geom_Curve) GeomAdaptor::MakeCurve (const Adaptor3d_Curve& HC)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// trim the curve if necassary.
|
// trim the curve if necassary.
|
||||||
if (! C.IsNull() &&
|
if ((! C.IsNull() &&
|
||||||
(HC.FirstParameter() != C->FirstParameter()) ||
|
(HC.FirstParameter() != C->FirstParameter())) ||
|
||||||
(HC.LastParameter() != C->LastParameter())) {
|
(HC.LastParameter() != C->LastParameter())) {
|
||||||
|
|
||||||
C = new Geom_TrimmedCurve(C,HC.FirstParameter(),HC.LastParameter());
|
C = new Geom_TrimmedCurve(C,HC.FirstParameter(),HC.LastParameter());
|
||||||
|
@ -513,8 +513,8 @@ void IGESData_VerifyDate(const Handle(TCollection_HAsciiString)& str,
|
|||||||
(stdvar->Value(5) == '3' && stdvar->Value(6) > '1'))&&(stdvar->Length() == 13)) ach->SendFail(Msg57);
|
(stdvar->Value(5) == '3' && stdvar->Value(6) > '1'))&&(stdvar->Length() == 13)) ach->SendFail(Msg57);
|
||||||
else if ((stdvar->Value(7) != '.' || stdvar->Value(10) > '5' || stdvar->Value(12) > '5')&&(stdvar->Length() == 13))
|
else if ((stdvar->Value(7) != '.' || stdvar->Value(10) > '5' || stdvar->Value(12) > '5')&&(stdvar->Length() == 13))
|
||||||
ach->SendFail(Msg57);
|
ach->SendFail(Msg57);
|
||||||
else if ((stdvar->Value(8) > '2' ||
|
else if ((stdvar->Value(8) > '2' || (stdvar->Value(8) == '2' && stdvar->Value(9) > '3')) &&
|
||||||
stdvar->Value(8) == '2' && stdvar->Value(9) > '3')&&(stdvar->Length() == 13)) ach->SendFail(Msg57);
|
(stdvar->Length() == 13)) ach->SendFail(Msg57);
|
||||||
//smh#13 For long year date
|
//smh#13 For long year date
|
||||||
else if ( (stdvar->Value(5) > '1' ||
|
else if ( (stdvar->Value(5) > '1' ||
|
||||||
(stdvar->Value(5) == '1' && stdvar->Value(6) > '2'))&&(stdvar->Length() == 15)) ach->SendFail(Msg57);
|
(stdvar->Value(5) == '1' && stdvar->Value(6) > '2'))&&(stdvar->Length() == 15)) ach->SendFail(Msg57);
|
||||||
@ -523,7 +523,7 @@ void IGESData_VerifyDate(const Handle(TCollection_HAsciiString)& str,
|
|||||||
else if ((stdvar->Value(9) != '.' || stdvar->Value(12) > '5' || stdvar->Value(14) > '5')&&(stdvar->Length() == 15))
|
else if ((stdvar->Value(9) != '.' || stdvar->Value(12) > '5' || stdvar->Value(14) > '5')&&(stdvar->Length() == 15))
|
||||||
ach->SendFail(Msg57);
|
ach->SendFail(Msg57);
|
||||||
else if ((stdvar->Value(10) > '2' ||
|
else if ((stdvar->Value(10) > '2' ||
|
||||||
stdvar->Value(10) == '2' && stdvar->Value(11) > '3')&&(stdvar->Length() == 15)) ach->SendFail(Msg57);
|
(stdvar->Value(10) == '2' && stdvar->Value(11) > '3'))&&(stdvar->Length() == 15)) ach->SendFail(Msg57);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -94,9 +94,9 @@ Standard_Boolean IGESToBRep_Actor::Recognize
|
|||||||
Standard_Integer typnum = ent->TypeNumber();
|
Standard_Integer typnum = ent->TypeNumber();
|
||||||
Standard_Integer fornum = ent->FormNumber();
|
Standard_Integer fornum = ent->FormNumber();
|
||||||
if (IGESToBRep::IsCurveAndSurface(ent) ||
|
if (IGESToBRep::IsCurveAndSurface(ent) ||
|
||||||
(typnum == 402 && (fornum == 1 || fornum == 7 ||
|
((typnum == 402 && (fornum == 1 || fornum == 7 ||
|
||||||
fornum == 14 || fornum == 15) ||
|
fornum == 14 || fornum == 15)) ||
|
||||||
(typnum == 408 ) || (typnum == 308)))
|
(typnum == 408 ) || (typnum == 308)))
|
||||||
return Standard_True;
|
return Standard_True;
|
||||||
|
|
||||||
// Cas restants : non reconnus
|
// Cas restants : non reconnus
|
||||||
|
@ -253,8 +253,8 @@ void ComputeTangency (const IntPatch_TheSOnBounds& solrst,
|
|||||||
LocTrans = TopAbs_EXTERNAL; // et pourquoi pas INTERNAL
|
LocTrans = TopAbs_EXTERNAL; // et pourquoi pas INTERNAL
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if ((test > 0.)&& arcorien == TopAbs_FORWARD ||
|
if (((test > 0.)&& arcorien == TopAbs_FORWARD) ||
|
||||||
(test < 0.)&& arcorien == TopAbs_REVERSED){
|
((test < 0.)&& arcorien == TopAbs_REVERSED)){
|
||||||
LocTrans = TopAbs_FORWARD;
|
LocTrans = TopAbs_FORWARD;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -292,8 +292,8 @@ void ComputeTangency (const IntPatch_TheSOnBounds& solrst,
|
|||||||
LocTrans = TopAbs_EXTERNAL; // et pourquoi pas INTERNAL
|
LocTrans = TopAbs_EXTERNAL; // et pourquoi pas INTERNAL
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if ((test > 0.)&& arcorien == TopAbs_FORWARD ||
|
if (((test > 0.)&& arcorien == TopAbs_FORWARD) ||
|
||||||
(test < 0.)&& arcorien == TopAbs_REVERSED){
|
((test < 0.)&& arcorien == TopAbs_REVERSED)){
|
||||||
LocTrans = TopAbs_FORWARD;
|
LocTrans = TopAbs_FORWARD;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -818,32 +818,32 @@ static Standard_Boolean TestWLineIsARLine(const IntPatch_SequenceOfLine& slinref
|
|||||||
if(slinref.Value(i)->ArcType()==IntPatch_Restriction) {
|
if(slinref.Value(i)->ArcType()==IntPatch_Restriction) {
|
||||||
Handle(IntPatch_RLine)& rlin = *((Handle(IntPatch_RLine) *)&(slinref(i)));
|
Handle(IntPatch_RLine)& rlin = *((Handle(IntPatch_RLine) *)&(slinref(i)));
|
||||||
for (Standard_Integer is=0; is<2; is++) {
|
for (Standard_Integer is=0; is<2; is++) {
|
||||||
Standard_Boolean onFirst = is==0;
|
Standard_Boolean onFirst = is==0;
|
||||||
if(onFirst && rlin->IsArcOnS1() || !onFirst && rlin->IsArcOnS2()) {
|
if((onFirst && rlin->IsArcOnS1()) || (!onFirst && rlin->IsArcOnS2())) {
|
||||||
Handle(Adaptor2d_HCurve2d) arc;
|
Handle(Adaptor2d_HCurve2d) arc;
|
||||||
Standard_Real u,v,u1,v1;
|
Standard_Real u,v,u1,v1;
|
||||||
if (onFirst) {
|
if (onFirst) {
|
||||||
arc = rlin->ArcOnS1();
|
arc = rlin->ArcOnS1();
|
||||||
POn2S.ParametersOnS1(u,v);
|
POn2S.ParametersOnS1(u,v);
|
||||||
POn2S1.ParametersOnS1(u1,v1);
|
POn2S1.ParametersOnS1(u1,v1);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
arc = rlin->ArcOnS2();
|
arc = rlin->ArcOnS2();
|
||||||
POn2S.ParametersOnS2(u,v);
|
POn2S.ParametersOnS2(u,v);
|
||||||
POn2S1.ParametersOnS2(u1,v1);
|
POn2S1.ParametersOnS2(u1,v1);
|
||||||
}
|
}
|
||||||
if (indicepnt == 1) {
|
if (indicepnt == 1) {
|
||||||
u = (u+u1)*0.5;
|
u = (u+u1)*0.5;
|
||||||
v = (v+v1)*0.5;
|
v = (v+v1)*0.5;
|
||||||
}
|
}
|
||||||
const Adaptor2d_Curve2d& C2d=arc->Curve2d();
|
const Adaptor2d_Curve2d& C2d=arc->Curve2d();
|
||||||
gp_Pnt2d PObt,P2d(u,v);
|
gp_Pnt2d PObt,P2d(u,v);
|
||||||
Standard_Real par= Geom2dInt_TheProjPCurOfGInter::FindParameter(C2d,P2d,1e-7);
|
Standard_Real par= Geom2dInt_TheProjPCurOfGInter::FindParameter(C2d,P2d,1e-7);
|
||||||
PObt=C2d.Value(par);
|
PObt=C2d.Value(par);
|
||||||
if(PObt.Distance(P2d) < tol2d) {
|
if(PObt.Distance(P2d) < tol2d) {
|
||||||
return Standard_True;
|
return Standard_True;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -970,8 +970,8 @@ static void TestWLineToRLine(const IntPatch_SequenceOfLine& slinref,
|
|||||||
Standard_Integer is;
|
Standard_Integer is;
|
||||||
for (is=0; is<2; is++) {
|
for (is=0; is<2; is++) {
|
||||||
Standard_Boolean onFirst = is==0;
|
Standard_Boolean onFirst = is==0;
|
||||||
if( onFirst && WLine->HasArcOnS1() ||
|
if(( onFirst && WLine->HasArcOnS1()) ||
|
||||||
!onFirst && WLine->HasArcOnS2()) {
|
(!onFirst && WLine->HasArcOnS2())) {
|
||||||
PiParOnS piParOnS;
|
PiParOnS piParOnS;
|
||||||
PQuery pIsOnDomS;
|
PQuery pIsOnDomS;
|
||||||
PArcOnS pArcOnS;
|
PArcOnS pArcOnS;
|
||||||
|
@ -695,8 +695,8 @@ void IntPatch_RstInt::PutVertexOnLine (Handle(IntPatch_Line)& L,
|
|||||||
tolU = Max(tolULast,tolU); tolV = Max(tolVLast,tolV);
|
tolU = Max(tolULast,tolU); tolV = Max(tolVLast,tolV);
|
||||||
}
|
}
|
||||||
Standard_Real nptCh = UMaxCh-UMinCh;
|
Standard_Real nptCh = UMaxCh-UMinCh;
|
||||||
Standard_Boolean isNptLow = nptCh < 10. && nptCh < Nbptlin/100. ||
|
Standard_Boolean isNptLow = (nptCh < 10. && nptCh < Nbptlin/100.) ||
|
||||||
!Domain->Has3d() && Standard_Integer(nptCh)+1 < Nbptlin;
|
(!Domain->Has3d() && Standard_Integer(nptCh)+1 < Nbptlin);
|
||||||
if (!isNptLow && !IsSegment2dSmall(Brise,UMinAr,UMaxAr,tolU,tolV)) {
|
if (!isNptLow && !IsSegment2dSmall(Brise,UMinAr,UMaxAr,tolU,tolV)) {
|
||||||
// treat both ends
|
// treat both ends
|
||||||
Standard_Real UMinChP,UMaxChP,UMinArP,UMaxArP;
|
Standard_Real UMinChP,UMaxChP,UMinArP,UMaxArP;
|
||||||
@ -797,8 +797,8 @@ void IntPatch_RstInt::PutVertexOnLine (Handle(IntPatch_Line)& L,
|
|||||||
if (ptsommet.Distance(locpt(j)) <= edgeTol) {
|
if (ptsommet.Distance(locpt(j)) <= edgeTol) {
|
||||||
if (possiblyClosed) {
|
if (possiblyClosed) {
|
||||||
locpt2(j).Coord(U,V);
|
locpt2(j).Coord(U,V);
|
||||||
if (OSurfaceIsUClosed && Abs(U-U2) > tolOUClosed ||
|
if ((OSurfaceIsUClosed && Abs(U-U2) > tolOUClosed) ||
|
||||||
OSurfaceIsVClosed && Abs(V-V2) > tolOVClosed)
|
(OSurfaceIsVClosed && Abs(V-V2) > tolOVClosed))
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
duplicate = Standard_True;
|
duplicate = Standard_True;
|
||||||
@ -827,14 +827,14 @@ void IntPatch_RstInt::PutVertexOnLine (Handle(IntPatch_Line)& L,
|
|||||||
// check in 2d
|
// check in 2d
|
||||||
if (SurfaceIsUClosed || SurfaceIsVClosed) {
|
if (SurfaceIsUClosed || SurfaceIsVClosed) {
|
||||||
GetLinePoint2d (L, paramline, OnFirst, U,V);
|
GetLinePoint2d (L, paramline, OnFirst, U,V);
|
||||||
if (SurfaceIsUClosed && Abs(U-U1) > tolUClosed ||
|
if ((SurfaceIsUClosed && Abs(U-U1) > tolUClosed) ||
|
||||||
SurfaceIsVClosed && Abs(V-V1) > tolVClosed)
|
(SurfaceIsVClosed && Abs(V-V1) > tolVClosed))
|
||||||
found = Standard_False;
|
found = Standard_False;
|
||||||
}
|
}
|
||||||
if (found && (OSurfaceIsUClosed || OSurfaceIsVClosed)) {
|
if (found && (OSurfaceIsUClosed || OSurfaceIsVClosed)) {
|
||||||
GetLinePoint2d (L, paramline, !OnFirst, U,V);
|
GetLinePoint2d (L, paramline, !OnFirst, U,V);
|
||||||
if (OSurfaceIsUClosed && Abs(U-U2) > tolOUClosed ||
|
if ((OSurfaceIsUClosed && Abs(U-U2) > tolOUClosed) ||
|
||||||
OSurfaceIsVClosed && Abs(V-V2) > tolOVClosed)
|
(OSurfaceIsVClosed && Abs(V-V2) > tolOVClosed))
|
||||||
found = Standard_False;
|
found = Standard_False;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -861,22 +861,22 @@ void IntPatch_RstInt::PutVertexOnLine (Handle(IntPatch_Line)& L,
|
|||||||
? wlin->Vertex(j)
|
? wlin->Vertex(j)
|
||||||
: rlin->Vertex(j));
|
: rlin->Vertex(j));
|
||||||
Standard_Boolean APointOnRstStillExist =
|
Standard_Boolean APointOnRstStillExist =
|
||||||
(OnFirst && Rptline.IsOnDomS1() && Rptline.ArcOnS1() == arc ||
|
((OnFirst && Rptline.IsOnDomS1() && Rptline.ArcOnS1() == arc) ||
|
||||||
!OnFirst && Rptline.IsOnDomS2() && Rptline.ArcOnS2() == arc);
|
(!OnFirst && Rptline.IsOnDomS2() && Rptline.ArcOnS2() == arc));
|
||||||
if(!APointOnRstStillExist) {
|
if(!APointOnRstStillExist) {
|
||||||
if (possiblyClosed) {
|
if (possiblyClosed) {
|
||||||
if (SurfaceIsUClosed || SurfaceIsVClosed) {
|
if (SurfaceIsUClosed || SurfaceIsVClosed) {
|
||||||
if (OnFirst) Rptline.ParametersOnS1(U,V);
|
if (OnFirst) Rptline.ParametersOnS1(U,V);
|
||||||
else Rptline.ParametersOnS2(U,V);
|
else Rptline.ParametersOnS2(U,V);
|
||||||
if (SurfaceIsUClosed && Abs(U-U1) > tolUClosed ||
|
if ((SurfaceIsUClosed && Abs(U-U1) > tolUClosed) ||
|
||||||
SurfaceIsVClosed && Abs(V-V1) > tolVClosed)
|
(SurfaceIsVClosed && Abs(V-V1) > tolVClosed))
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (OSurfaceIsUClosed || OSurfaceIsVClosed) {
|
if (OSurfaceIsUClosed || OSurfaceIsVClosed) {
|
||||||
if (OnFirst) Rptline.ParametersOnS2(U,V);
|
if (OnFirst) Rptline.ParametersOnS2(U,V);
|
||||||
else Rptline.ParametersOnS1(U,V);
|
else Rptline.ParametersOnS1(U,V);
|
||||||
if (OSurfaceIsUClosed && Abs(U-U2) > tolOUClosed ||
|
if ((OSurfaceIsUClosed && Abs(U-U2) > tolOUClosed) ||
|
||||||
OSurfaceIsVClosed && Abs(V-V2) > tolOVClosed)
|
(OSurfaceIsVClosed && Abs(V-V2) > tolOVClosed))
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -983,8 +983,8 @@ void IntPatch_RstInt::PutVertexOnLine (Handle(IntPatch_Line)& L,
|
|||||||
// on doit avoir VtxOnArc = True. On duplique le point sur S1
|
// on doit avoir VtxOnArc = True. On duplique le point sur S1
|
||||||
// en changeant ArcOnS2.
|
// en changeant ArcOnS2.
|
||||||
Standard_Boolean OnDifferentRst =
|
Standard_Boolean OnDifferentRst =
|
||||||
(OnFirst && ptline.IsOnDomS1() && ptline.ArcOnS1() != arc ||
|
((OnFirst && ptline.IsOnDomS1() && ptline.ArcOnS1() != arc) ||
|
||||||
!OnFirst && ptline.IsOnDomS2() && ptline.ArcOnS2() != arc);
|
(!OnFirst && ptline.IsOnDomS2() && ptline.ArcOnS2() != arc));
|
||||||
ptline.SetTolerance(vtxTol);
|
ptline.SetTolerance(vtxTol);
|
||||||
if ( (!ptline.IsVertexOnS1() && OnFirst)
|
if ( (!ptline.IsVertexOnS1() && OnFirst)
|
||||||
|| (!ptline.IsVertexOnS2() && !OnFirst)
|
|| (!ptline.IsVertexOnS2() && !OnFirst)
|
||||||
|
@ -614,15 +614,14 @@ Standard_Boolean IntPoly_ShapeSection::Intersect(const gp_Pnt& S1,
|
|||||||
//=======================================================================
|
//=======================================================================
|
||||||
#define epsilon 0.000000000001
|
#define epsilon 0.000000000001
|
||||||
|
|
||||||
Standard_Boolean IntPoly_ShapeSection::IsEqual(const gp_Pnt& Pt1,
|
Standard_Boolean IntPoly_ShapeSection::IsEqual(const gp_Pnt& Pt1, const gp_Pnt& Pt2)
|
||||||
const gp_Pnt& Pt2)
|
|
||||||
{
|
{
|
||||||
return ((Pt1.X() <= Pt2.X() && Pt2.X() < Pt1.X()+epsilon ||
|
return (((Pt1.X() <= Pt2.X() && Pt2.X() < Pt1.X()+epsilon) ||
|
||||||
Pt2.X() <= Pt1.X() && Pt1.X() < Pt2.X()+epsilon) &&
|
(Pt2.X() <= Pt1.X() && Pt1.X() < Pt2.X()+epsilon)) &&
|
||||||
(Pt1.Y() <= Pt2.Y() && Pt2.Y() < Pt1.Y()+epsilon ||
|
((Pt1.Y() <= Pt2.Y() && Pt2.Y() < Pt1.Y()+epsilon) ||
|
||||||
Pt2.Y() <= Pt1.Y() && Pt1.Y() < Pt2.Y()+epsilon) &&
|
(Pt2.Y() <= Pt1.Y() && Pt1.Y() < Pt2.Y()+epsilon)) &&
|
||||||
(Pt1.Z() <= Pt2.Z() && Pt2.Z() < Pt1.Z()+epsilon ||
|
((Pt1.Z() <= Pt2.Z() && Pt2.Z() < Pt1.Z()+epsilon) ||
|
||||||
Pt2.Z() <= Pt1.Z() && Pt1.Z() < Pt2.Z()+epsilon));
|
(Pt2.Z() <= Pt1.Z() && Pt1.Z() < Pt2.Z()+epsilon)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2610,7 +2610,7 @@ Standard_Integer IntPolyh_MaillageAffinage::TriangleEdgeContact
|
|||||||
&&(Abs(SP1.V1()-SP2.V1())<MyConfusionPrecision) ) NbPoints=1;
|
&&(Abs(SP1.V1()-SP2.V1())<MyConfusionPrecision) ) NbPoints=1;
|
||||||
if (NbPoints>=2) return(NbPoints);
|
if (NbPoints>=2) return(NbPoints);
|
||||||
//= remove
|
//= remove
|
||||||
else if ( ( (pp3>ppe1)&&(pp1<=ppe1)&&(pp2<=ppe1) ) || ( (pp3<ppe1)&&(pp1>=ppe1)&&(pp2>=ppe1) )
|
else if ( (( (pp3>ppe1)&&(pp1<=ppe1)&&(pp2<=ppe1) ) || ( (pp3<ppe1)&&(pp1>=ppe1)&&(pp2>=ppe1) ))
|
||||||
&& (NbPoints<2) ) {
|
&& (NbPoints<2) ) {
|
||||||
//there are two sides (common top PT3) that can cut the edge
|
//there are two sides (common top PT3) that can cut the edge
|
||||||
|
|
||||||
@ -2895,8 +2895,8 @@ Standard_Integer IntPolyh_MaillageAffinage::TriangleEdgeContact2
|
|||||||
&&(Abs(SP1.V1()-SP2.V1())<MyConfusionPrecision) ) NbPoints=1;
|
&&(Abs(SP1.V1()-SP2.V1())<MyConfusionPrecision) ) NbPoints=1;
|
||||||
if (NbPoints>=2) return(NbPoints);
|
if (NbPoints>=2) return(NbPoints);
|
||||||
|
|
||||||
else if ( ( (pp3>=ppe1)&&(pp1<=ppe1)&&(pp2<=ppe1) ) || ( (pp3<=ppe1)&&(pp1>=ppe1)&&(pp2>=ppe1) )
|
else if ( (( (pp3>=ppe1)&&(pp1<=ppe1)&&(pp2<=ppe1) ) || ( (pp3<=ppe1)&&(pp1>=ppe1)&&(pp2>=ppe1) ))
|
||||||
&& (NbPoints<2) ) {
|
&& (NbPoints<2) ) {
|
||||||
//there are two sides (common top PT3) that can cut the edge
|
//there are two sides (common top PT3) that can cut the edge
|
||||||
|
|
||||||
//first side
|
//first side
|
||||||
|
@ -629,7 +629,7 @@ IntTools_FClass2d::IntTools_FClass2d()
|
|||||||
Status = aClassifier.State();
|
Status = aClassifier.State();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!RecadreOnPeriodic || !IsUPer && !IsVPer)
|
if (!RecadreOnPeriodic || (!IsUPer && !IsVPer))
|
||||||
return Status;
|
return Status;
|
||||||
|
|
||||||
if (Status == TopAbs_IN || Status == TopAbs_ON)
|
if (Status == TopAbs_IN || Status == TopAbs_ON)
|
||||||
@ -762,7 +762,7 @@ IntTools_FClass2d::IntTools_FClass2d()
|
|||||||
Status = aClassifier.State();
|
Status = aClassifier.State();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!RecadreOnPeriodic || !IsUPer && !IsVPer)
|
if (!RecadreOnPeriodic || (!IsUPer && !IsVPer))
|
||||||
return Status;
|
return Status;
|
||||||
if (Status == TopAbs_IN || Status == TopAbs_ON)
|
if (Status == TopAbs_IN || Status == TopAbs_ON)
|
||||||
return Status;
|
return Status;
|
||||||
|
@ -241,7 +241,7 @@ Standard_Integer IntTools_MarkedRangeSet::GetIndex(const Standard_Real theValue,
|
|||||||
{
|
{
|
||||||
Standard_Integer anIndex = 0;
|
Standard_Integer anIndex = 0;
|
||||||
|
|
||||||
if(UseLower && (theValue < myRangeSetStorer(1)) ||
|
if((UseLower && (theValue < myRangeSetStorer(1))) ||
|
||||||
(!UseLower && (theValue <= myRangeSetStorer(1))))
|
(!UseLower && (theValue <= myRangeSetStorer(1))))
|
||||||
anIndex = 0;
|
anIndex = 0;
|
||||||
else {
|
else {
|
||||||
|
@ -321,8 +321,8 @@ Standard_Boolean Intf_TangentZone::HasCommonRange
|
|||||||
Other.ParamOnFirst(c1, d1);
|
Other.ParamOnFirst(c1, d1);
|
||||||
Other.ParamOnSecond(c2, d2);
|
Other.ParamOnSecond(c2, d2);
|
||||||
|
|
||||||
if ((c1<=a1 && a1<=d1 || c1<=b1 && b1<=d1 || a1<=c1 && c1<=b1) &&
|
if (((c1<=a1 && a1<=d1) || (c1<=b1 && b1<=d1) || (a1<=c1 && c1<=b1)) &&
|
||||||
(c2<=a2 && a2<=d2 || c2<=b2 && b2<=d2 || a2<=c2 && c2<=b2))
|
((c2<=a2 && a2<=d2) || (c2<=b2 && b2<=d2) || (a2<=c2 && c2<=b2)))
|
||||||
return Standard_True;
|
return Standard_True;
|
||||||
return Standard_False;
|
return Standard_False;
|
||||||
}
|
}
|
||||||
|
@ -159,8 +159,8 @@ LocOpe_Pipe::LocOpe_Pipe(const TopoDS_Wire& Spine,
|
|||||||
}
|
}
|
||||||
Plref = Handle(Geom_Plane)::DownCast(P)->Pln();
|
Plref = Handle(Geom_Plane)::DownCast(P)->Pln();
|
||||||
gp_Dir Dirref(Plref.Axis().Direction());
|
gp_Dir Dirref(Plref.Axis().Direction());
|
||||||
if (Plref.Direct() && orref == TopAbs_REVERSED ||
|
if ((Plref.Direct() && orref == TopAbs_REVERSED) ||
|
||||||
!Plref.Direct() && orref == TopAbs_FORWARD) {
|
(!Plref.Direct() && orref == TopAbs_FORWARD)) {
|
||||||
Dirref.Reverse();
|
Dirref.Reverse();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -201,8 +201,8 @@ LocOpe_Pipe::LocOpe_Pipe(const TopoDS_Wire& Spine,
|
|||||||
}
|
}
|
||||||
gp_Pln Pl = Handle(Geom_Plane)::DownCast(OtherP)->Pln();
|
gp_Pln Pl = Handle(Geom_Plane)::DownCast(OtherP)->Pln();
|
||||||
gp_Dir Dirpl(Pl.Axis().Direction());
|
gp_Dir Dirpl(Pl.Axis().Direction());
|
||||||
if (Pl.Direct() && orrelat == TopAbs_REVERSED ||
|
if ((Pl.Direct() && orrelat == TopAbs_REVERSED) ||
|
||||||
!Plref.Direct() && orrelat == TopAbs_FORWARD) {
|
(!Plref.Direct() && orrelat == TopAbs_FORWARD)) {
|
||||||
Dirpl.Reverse();
|
Dirpl.Reverse();
|
||||||
}
|
}
|
||||||
if (Dirpl.Dot(Dirref) > 0) {
|
if (Dirpl.Dot(Dirref) > 0) {
|
||||||
|
@ -1350,8 +1350,8 @@ static Standard_Boolean NewPlane(const TopoDS_Face& F,
|
|||||||
if (!Modify) {
|
if (!Modify) {
|
||||||
Newpl = Plorig;
|
Newpl = Plorig;
|
||||||
NormalF = Newpl.Axis();
|
NormalF = Newpl.Axis();
|
||||||
if (Newpl.Direct() && F.Orientation() == TopAbs_REVERSED ||
|
if ((Newpl.Direct() && F.Orientation() == TopAbs_REVERSED) ||
|
||||||
!Newpl.Direct() && F.Orientation() == TopAbs_FORWARD) {
|
(!Newpl.Direct() && F.Orientation() == TopAbs_FORWARD)) {
|
||||||
NormalF.Reverse();
|
NormalF.Reverse();
|
||||||
}
|
}
|
||||||
return Standard_True;
|
return Standard_True;
|
||||||
|
@ -170,8 +170,8 @@ void MeshVS_NodalColorPrsBuilder::Build ( const Handle(Prs3d_Presentation)& Prs,
|
|||||||
if ( !( DisplayMode & GetFlags() ) || !IsElement )
|
if ( !( DisplayMode & GetFlags() ) || !IsElement )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if ( myUseTexture && ( !myTextureCoords.Extent() || !myTextureColorMap.Length() ) ||
|
if ( (myUseTexture && ( !myTextureCoords.Extent() || !myTextureColorMap.Length() )) ||
|
||||||
!myUseTexture && !myNodeColorMap.Extent() )
|
(!myUseTexture && !myNodeColorMap.Extent()) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// subtract the hidden elements and ids to exclude (to minimise allocated memory)
|
// subtract the hidden elements and ids to exclude (to minimise allocated memory)
|
||||||
|
@ -238,7 +238,7 @@ void PLib_DoubleJacobiPolynomial::ReduceDegree(const Standard_Integer Dimension,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
while (ErrU > ErrV && ErrV <= EpmsCut || ErrV >= ErrU && ErrU <= EpmsCut);
|
while ((ErrU > ErrV && ErrV <= EpmsCut) || (ErrV >= ErrU && ErrU <= EpmsCut));
|
||||||
|
|
||||||
//-------------------------- Recuperation des degres -------------------
|
//-------------------------- Recuperation des degres -------------------
|
||||||
|
|
||||||
|
@ -62,11 +62,11 @@ const Standard_Integer UNDEFINED=-999;
|
|||||||
void PLib_JacobiPolynomial::Points(const Standard_Integer NbGaussPoints,
|
void PLib_JacobiPolynomial::Points(const Standard_Integer NbGaussPoints,
|
||||||
TColStd_Array1OfReal& TabPoints) const
|
TColStd_Array1OfReal& TabPoints) const
|
||||||
{
|
{
|
||||||
if (NbGaussPoints != NDEG8 && NbGaussPoints != NDEG10 &&
|
if ((NbGaussPoints != NDEG8 && NbGaussPoints != NDEG10 &&
|
||||||
NbGaussPoints != NDEG15 && NbGaussPoints != NDEG20 &&
|
NbGaussPoints != NDEG15 && NbGaussPoints != NDEG20 &&
|
||||||
NbGaussPoints != NDEG25 && NbGaussPoints != NDEG30 &&
|
NbGaussPoints != NDEG25 && NbGaussPoints != NDEG30 &&
|
||||||
NbGaussPoints != NDEG40 && NbGaussPoints != NDEG50 &&
|
NbGaussPoints != NDEG40 && NbGaussPoints != NDEG50 &&
|
||||||
NbGaussPoints != NDEG61 ||
|
NbGaussPoints != NDEG61) ||
|
||||||
NbGaussPoints <= myDegree)
|
NbGaussPoints <= myDegree)
|
||||||
Standard_ConstructionError::Raise("Invalid NbGaussPoints");
|
Standard_ConstructionError::Raise("Invalid NbGaussPoints");
|
||||||
|
|
||||||
|
@ -424,8 +424,8 @@ void Poly_MakeLoops::markHangChain(Standard_Integer theNode, Standard_Integer th
|
|||||||
Standard_Integer aInd = myMapLink.FindIndex(aL);
|
Standard_Integer aInd = myMapLink.FindIndex(aL);
|
||||||
if (aInd == 0 || aInd == aIndex)
|
if (aInd == 0 || aInd == aIndex)
|
||||||
continue;
|
continue;
|
||||||
if (isOut && aNode1 == aL.node1 ||
|
if ((isOut && aNode1 == aL.node1) ||
|
||||||
!isOut && aNode1 == aL.node2)
|
(!isOut && aNode1 == aL.node2))
|
||||||
aInd = -aInd;
|
aInd = -aInd;
|
||||||
if (canLinkBeTaken(aInd))
|
if (canLinkBeTaken(aInd))
|
||||||
nEdges++;
|
nEdges++;
|
||||||
@ -451,8 +451,8 @@ void Poly_MakeLoops::markHangChain(Standard_Integer theNode, Standard_Integer th
|
|||||||
Standard_Integer aInd = myMapLink.FindIndex(aL);
|
Standard_Integer aInd = myMapLink.FindIndex(aL);
|
||||||
if (aInd == 0 || aInd == aIndex)
|
if (aInd == 0 || aInd == aIndex)
|
||||||
continue;
|
continue;
|
||||||
if (isOut && aNode1 == aL.node2 ||
|
if ((isOut && aNode1 == aL.node2) ||
|
||||||
!isOut && aNode1 == aL.node1)
|
(!isOut && aNode1 == aL.node1))
|
||||||
aInd = -aInd;
|
aInd = -aInd;
|
||||||
if (canLinkBeTaken(aInd))
|
if (canLinkBeTaken(aInd))
|
||||||
{
|
{
|
||||||
|
@ -271,10 +271,8 @@ inline Standard_Integer HashCode(const Poly_MakeLoops::Link& theKey,
|
|||||||
inline Standard_Boolean IsEqual(const Poly_MakeLoops::Link& theKey1,
|
inline Standard_Boolean IsEqual(const Poly_MakeLoops::Link& theKey1,
|
||||||
const Poly_MakeLoops::Link& theKey2)
|
const Poly_MakeLoops::Link& theKey2)
|
||||||
{
|
{
|
||||||
return (theKey1.node1 == theKey2.node1 &&
|
return ((theKey1.node1 == theKey2.node1 && theKey1.node2 == theKey2.node2) ||
|
||||||
theKey1.node2 == theKey2.node2 ||
|
(theKey1.node1 == theKey2.node2 && theKey1.node2 == theKey2.node1));
|
||||||
theKey1.node1 == theKey2.node2 &&
|
|
||||||
theKey1.node2 == theKey2.node1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1386,8 +1386,8 @@ gp_Vec2d ProjLib_CompProjectedCurve::DN(const Standard_Real t,
|
|||||||
TUdisc.Append(mySequence->Value(i)->Value(j).X());
|
TUdisc.Append(mySequence->Value(i)->Value(j).X());
|
||||||
else if(Abs(Ur - CutPntsU(k)) <= myTolU)
|
else if(Abs(Ur - CutPntsU(k)) <= myTolU)
|
||||||
TUdisc.Append(mySequence->Value(i)->Value(j + 1).X());
|
TUdisc.Append(mySequence->Value(i)->Value(j + 1).X());
|
||||||
else if(Ul < CutPntsU(k) && CutPntsU(k) < Ur ||
|
else if((Ul < CutPntsU(k) && CutPntsU(k) < Ur) ||
|
||||||
Ur < CutPntsU(k) && CutPntsU(k) < Ul)
|
(Ur < CutPntsU(k) && CutPntsU(k) < Ul))
|
||||||
{
|
{
|
||||||
Standard_Real V;
|
Standard_Real V;
|
||||||
V = (mySequence->Value(i)->Value(j).Z()
|
V = (mySequence->Value(i)->Value(j).Z()
|
||||||
@ -1440,8 +1440,8 @@ gp_Vec2d ProjLib_CompProjectedCurve::DN(const Standard_Real t,
|
|||||||
TVdisc.Append(mySequence->Value(i)->Value(j).X());
|
TVdisc.Append(mySequence->Value(i)->Value(j).X());
|
||||||
else if (Abs(Vr - CutPntsV(k)) <= myTolV)
|
else if (Abs(Vr - CutPntsV(k)) <= myTolV)
|
||||||
TVdisc.Append(mySequence->Value(i)->Value(j + 1).X());
|
TVdisc.Append(mySequence->Value(i)->Value(j + 1).X());
|
||||||
else if(Vl < CutPntsV(k) && CutPntsV(k) < Vr ||
|
else if((Vl < CutPntsV(k) && CutPntsV(k) < Vr) ||
|
||||||
Vr < CutPntsV(k) && CutPntsV(k) < Vl)
|
(Vr < CutPntsV(k) && CutPntsV(k) < Vl))
|
||||||
{
|
{
|
||||||
Standard_Real U;
|
Standard_Real U;
|
||||||
U = (mySequence->Value(i)->Value(j).Y()
|
U = (mySequence->Value(i)->Value(j).Y()
|
||||||
|
@ -1123,7 +1123,7 @@ ProjLib_ComputeApprox::ProjLib_ComputeApprox
|
|||||||
number = (Standard_Integer) (Floor((newV-v)/(F.myV2-F.myV1)));
|
number = (Standard_Integer) (Floor((newV-v)/(F.myV2-F.myV1)));
|
||||||
dv -= number*(F.myV2-F.myV1);
|
dv -= number*(F.myV2-F.myV1);
|
||||||
}
|
}
|
||||||
if (F.UCouture || F.VCouture && SType == GeomAbs_Sphere)
|
if (F.UCouture || (F.VCouture && SType == GeomAbs_Sphere))
|
||||||
{
|
{
|
||||||
gp_Pnt2d P2d = F.Value( UFirst );
|
gp_Pnt2d P2d = F.Value( UFirst );
|
||||||
number = (Standard_Integer) (Floor((P2d.X()-u)/M_PI + Epsilon(M_PI)));
|
number = (Standard_Integer) (Floor((P2d.X()-u)/M_PI + Epsilon(M_PI)));
|
||||||
|
@ -18,6 +18,6 @@
|
|||||||
|
|
||||||
inline Standard_Boolean Quantity_Date::IsLeap (const Standard_Integer yy){
|
inline Standard_Boolean Quantity_Date::IsLeap (const Standard_Integer yy){
|
||||||
|
|
||||||
return ( ( yy % 4 == 0 && yy % 100 != 0 || yy % 400 == 0)
|
return (((yy % 4 == 0) && (yy % 100 != 0)) || (yy % 400) == 0)
|
||||||
? Standard_True : Standard_False );
|
? Standard_True : Standard_False;
|
||||||
}
|
}
|
||||||
|
@ -1244,8 +1244,8 @@ Standard_Boolean ShapeCustom_BSplineRestriction::ConvertCurve2d(Handle(Geom2d_Cu
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (aCurve->IsKind(STANDARD_TYPE(Geom2d_BSplineCurve)) ||
|
if (aCurve->IsKind(STANDARD_TYPE(Geom2d_BSplineCurve)) ||
|
||||||
aCurve->IsKind(STANDARD_TYPE(Geom2d_BezierCurve)) ||
|
aCurve->IsKind(STANDARD_TYPE(Geom2d_BezierCurve)) ||
|
||||||
(aCurve->IsKind(STANDARD_TYPE(Geom2d_OffsetCurve))) && !IsOf ) {
|
((aCurve->IsKind(STANDARD_TYPE(Geom2d_OffsetCurve))) && !IsOf )) {
|
||||||
Standard_Integer Deg=1;
|
Standard_Integer Deg=1;
|
||||||
|
|
||||||
if (aCurve->IsKind(STANDARD_TYPE(Geom2d_BSplineCurve))) {
|
if (aCurve->IsKind(STANDARD_TYPE(Geom2d_BSplineCurve))) {
|
||||||
|
@ -684,7 +684,7 @@ void TopOpeBRepBuild_Builder::GFillPointTopologyPVS(const TopoDS_Shape& E,
|
|||||||
// xpu110398 cto 009 L2 : e6ou en v11
|
// xpu110398 cto 009 L2 : e6ou en v11
|
||||||
// xpu140898 USA60111 : e9ou (!=0) + e7ou(=0)
|
// xpu140898 USA60111 : e9ou (!=0) + e7ou(=0)
|
||||||
Standard_Boolean INTEXT = (oriI == TopAbs_INTERNAL) && (TB == TopAbs_IN);
|
Standard_Boolean INTEXT = (oriI == TopAbs_INTERNAL) && (TB == TopAbs_IN);
|
||||||
INTEXT = INTEXT || (oriI == TopAbs_EXTERNAL) && (TB == TopAbs_OUT);
|
INTEXT = INTEXT || ((oriI == TopAbs_EXTERNAL) && (TB == TopAbs_OUT));
|
||||||
kpbound = lesmemes && Eclosed && INTEXT;
|
kpbound = lesmemes && Eclosed && INTEXT;
|
||||||
if ( kpbound ) {
|
if ( kpbound ) {
|
||||||
kpbound = vclo.IsSame(VIG);
|
kpbound = vclo.IsSame(VIG);
|
||||||
|
@ -1331,8 +1331,9 @@ static Standard_Boolean AreFacesCoincideInArea (const TopoDS_Shape& theBaseFace,
|
|||||||
Standard_Real tolE = BRep_Tool::Tolerance(aE);
|
Standard_Real tolE = BRep_Tool::Tolerance(aE);
|
||||||
if (tolE > maxDist) maxDist = tolE;
|
if (tolE > maxDist) maxDist = tolE;
|
||||||
if (aE.IsEqual(anEdge) ||
|
if (aE.IsEqual(anEdge) ||
|
||||||
aE.Orientation() != TopAbs_FORWARD && aE.Orientation() != TopAbs_REVERSED &&
|
(aE.Orientation() != TopAbs_FORWARD &&
|
||||||
aE.IsSame(anEdge))
|
aE.Orientation() != TopAbs_REVERSED &&
|
||||||
|
aE.IsSame(anEdge)))
|
||||||
continue; // the same pcurve
|
continue; // the same pcurve
|
||||||
Handle(Geom2d_Curve) PC = BRep_Tool::CurveOnSurface(aE,aBaseFace,pf,pl);
|
Handle(Geom2d_Curve) PC = BRep_Tool::CurveOnSurface(aE,aBaseFace,pf,pl);
|
||||||
if (PC.IsNull()) {
|
if (PC.IsNull()) {
|
||||||
|
@ -305,23 +305,23 @@ void TopOpeBRepBuild_Builder::SplitSectionEdges()
|
|||||||
Standard_Integer nLESDspon = LESDspon.Extent();
|
Standard_Integer nLESDspon = LESDspon.Extent();
|
||||||
|
|
||||||
if ( nLEspon != 0 && nLESDspon != 0 ) {
|
if ( nLEspon != 0 && nLESDspon != 0 ) {
|
||||||
Standard_Boolean takeE = (rE == 1 && iESD != iRef || iE == iRef);
|
Standard_Boolean takeE = ((rE == 1 && iESD != iRef) || iE == iRef);
|
||||||
pE1 = takeE ? &E : &ESD;
|
pE1 = takeE ? &E : &ESD;
|
||||||
pE2 = !takeE ? &E : &ESD;
|
pE2 = !takeE ? &E : &ESD;
|
||||||
plos1 = takeE ? &LEspon : &LESDspon;
|
plos1 = takeE ? &LEspon : &LESDspon;
|
||||||
plos2 = !takeE ? &LEspon : &LESDspon;
|
plos2 = !takeE ? &LEspon : &LESDspon;
|
||||||
}
|
}
|
||||||
else if ( nLEspon != 0 ) {
|
else if ( nLEspon != 0 ) {
|
||||||
pE1 = &E;
|
pE1 = &E;
|
||||||
pE2 = &ESD;
|
pE2 = &ESD;
|
||||||
plos1 = &LEspon;
|
plos1 = &LEspon;
|
||||||
plos2 = &LESDspon;
|
plos2 = &LESDspon;
|
||||||
}
|
}
|
||||||
else if ( nLESDspon != 0 ) {
|
else if ( nLESDspon != 0 ) {
|
||||||
pE1 = &ESD;
|
pE1 = &ESD;
|
||||||
pE2 = &E;
|
pE2 = &E;
|
||||||
plos1 = &LESDspon;
|
plos1 = &LESDspon;
|
||||||
plos2 = &LEspon;
|
plos2 = &LEspon;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pE1 == NULL || pE2 == NULL) continue;
|
if (pE1 == NULL || pE2 == NULL) continue;
|
||||||
|
@ -356,10 +356,10 @@ Standard_Boolean TopOpeBRepTool_mkTondgE::MkTonE(const TopoDS_Edge& ei, Standard
|
|||||||
Standard_Real dot = tgi.Dot(xxri);
|
Standard_Real dot = tgi.Dot(xxri);
|
||||||
if (Abs(dot) < FUN_tola())
|
if (Abs(dot) < FUN_tola())
|
||||||
{
|
{
|
||||||
if (!onfi && !onli || closedi)
|
if ((!onfi && !onli) || closedi)
|
||||||
{ mkT = MKI12; return Standard_True; }
|
{ mkT = MKI12; return Standard_True; }
|
||||||
else
|
else
|
||||||
dot = tgi.Dot(tgin1di);
|
dot = tgi.Dot(tgin1di);
|
||||||
}
|
}
|
||||||
Standard_Boolean keepang = (dot > 0);
|
Standard_Boolean keepang = (dot > 0);
|
||||||
if (keepang) mkT = outin ? MKI1 : MKI2;
|
if (keepang) mkT = outin ? MKI1 : MKI2;
|
||||||
|
@ -154,7 +154,7 @@ static void SetDisplayConnection (const Handle(Aspect_DisplayConnection)& theDis
|
|||||||
#if defined(_WIN32) || (!defined(__APPLE__) || defined(MACOSX_USE_GLX))
|
#if defined(_WIN32) || (!defined(__APPLE__) || defined(MACOSX_USE_GLX))
|
||||||
Aspect_Handle GetWindowHandle(const Handle(Aspect_Window)& theWindow)
|
Aspect_Handle GetWindowHandle(const Handle(Aspect_Window)& theWindow)
|
||||||
{
|
{
|
||||||
Aspect_Handle aWindowHandle = NULL;
|
Aspect_Handle aWindowHandle = (Aspect_Handle)NULL;
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
const Handle (WNT_Window) aWindow = Handle(WNT_Window)::DownCast (theWindow);
|
const Handle (WNT_Window) aWindow = Handle(WNT_Window)::DownCast (theWindow);
|
||||||
if (!aWindow.IsNull())
|
if (!aWindow.IsNull())
|
||||||
|
@ -122,7 +122,7 @@ void XCAFPrs::CollectStyleSettings (const TDF_Label &L,
|
|||||||
for ( Standard_Integer iL = 1; iL <= LayNames->Length(); iL++) {
|
for ( Standard_Integer iL = 1; iL <= LayNames->Length(); iL++) {
|
||||||
if ( !LTool->IsVisible( LTool->FindLayer(LayNames->Value(iL)) ) ) InVisCount++;
|
if ( !LTool->IsVisible( LTool->FindLayer(LayNames->Value(iL)) ) ) InVisCount++;
|
||||||
}
|
}
|
||||||
if ( InVisCount >0 && InVisCount == LayNames->Length() ||
|
if ( (InVisCount >0 && InVisCount == LayNames->Length()) ||
|
||||||
!CTool->IsVisible(lab) ) {
|
!CTool->IsVisible(lab) ) {
|
||||||
style.SetVisibility(Standard_False);
|
style.SetVisibility(Standard_False);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user