mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-24 13:50:49 +03:00
0022792: Globally defined symbol PI conflicts with VTK definition (Intel compiler)
This commit is contained in:
@@ -979,7 +979,7 @@ void AIS::ComputeAngleBetweenCurvilinearFaces( const TopoDS_Face & FirstFac
|
||||
if (! Xdirection.IsEqual( ToFirstAttach, Precision::Angular() ) &&
|
||||
! Xdirection.IsOpposite( ToFirstAttach, Precision::Angular() ) &&
|
||||
(Xdirection ^ ToFirstAttach) * Cone2->Cone().Axis().Direction() < 0.0e0)
|
||||
SecondU = 2*PI - SecondU ;
|
||||
SecondU = 2*M_PI - SecondU ;
|
||||
|
||||
SecondLine = Handle( Geom_Line )::DownCast( Cone2->UIso( SecondU ) );
|
||||
|
||||
@@ -1233,18 +1233,18 @@ Standard_Boolean AIS::InDomain(const Standard_Real fpar,
|
||||
if(lpar > fpar)
|
||||
return ((para >= fpar) && (para <= lpar));
|
||||
else { // fpar > lpar
|
||||
Standard_Real delta = 2*PI-fpar;
|
||||
Standard_Real delta = 2*M_PI-fpar;
|
||||
Standard_Real lp, par, fp;
|
||||
lp = lpar + delta;
|
||||
par = para + delta;
|
||||
while(lp > 2*PI) lp-=2*PI;
|
||||
while(par > 2*PI) par-=2*PI;
|
||||
while(lp > 2*M_PI) lp-=2*M_PI;
|
||||
while(par > 2*M_PI) par-=2*M_PI;
|
||||
fp = 0.;
|
||||
return ((par >= fp) && (par <= lp));
|
||||
}
|
||||
|
||||
}
|
||||
if (para >= (fpar+2*PI)) return Standard_True;
|
||||
if (para >= (fpar+2*M_PI)) return Standard_True;
|
||||
if (para <= lpar) return Standard_True;
|
||||
return Standard_False;
|
||||
}
|
||||
@@ -1260,37 +1260,37 @@ Standard_Real AIS::DistanceFromApex(const gp_Elips & elips,
|
||||
{
|
||||
Standard_Real dist;
|
||||
Standard_Real parApex = ElCLib::Parameter ( elips, Apex );
|
||||
if(parApex == 0.0 || parApex == PI)
|
||||
if(parApex == 0.0 || parApex == M_PI)
|
||||
{//Major case
|
||||
if(parApex == 0.0) //pos Apex
|
||||
dist = (par < PI) ? par : (2*PI - par);
|
||||
dist = (par < M_PI) ? par : (2*M_PI - par);
|
||||
else //neg Apex
|
||||
dist = (par < PI) ? ( PI - par) : ( par - PI );
|
||||
dist = (par < M_PI) ? ( M_PI - par) : ( par - M_PI );
|
||||
}
|
||||
else
|
||||
{// Minor case
|
||||
if(parApex == PI / 2) //pos Apex
|
||||
if(parApex == M_PI / 2) //pos Apex
|
||||
{
|
||||
if(par <= parApex + PI && par > parApex) // 3/2*PI < par < PI/2
|
||||
if(par <= parApex + M_PI && par > parApex) // 3/2*M_PI < par < M_PI/2
|
||||
dist = par - parApex;
|
||||
else
|
||||
{
|
||||
if(par > parApex + PI) // 3/2*PI < par < 2*PI
|
||||
dist = 2*PI - par + parApex;
|
||||
if(par > parApex + M_PI) // 3/2*M_PI < par < 2*M_PI
|
||||
dist = 2*M_PI - par + parApex;
|
||||
else
|
||||
dist = parApex - par;
|
||||
}
|
||||
}
|
||||
else //neg Apex == 3/2*PI
|
||||
else //neg Apex == 3/2*M_PI
|
||||
{
|
||||
if(par <= parApex && par >= PI/2) // PI/2 < par < 3/2*PI
|
||||
if(par <= parApex && par >= M_PI/2) // M_PI/2 < par < 3/2*M_PI
|
||||
dist = parApex - par;
|
||||
else
|
||||
{
|
||||
if(par > parApex) // 3/2*PI < par < 2*PI
|
||||
if(par > parApex) // 3/2*M_PI < par < 2*M_PI
|
||||
dist = par - parApex;
|
||||
else
|
||||
dist = par + PI/2; // 0 < par < PI/2
|
||||
dist = par + M_PI/2; // 0 < par < M_PI/2
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -592,7 +592,7 @@ void AIS_AngleDimension::ComputeConeAngle(const Handle(Prs3d_Presentation)& aPre
|
||||
aCurve = aSurf->VIso(midV);
|
||||
myCircle = Handle(Geom_Circle)::DownCast(aCurve)->Circ();
|
||||
|
||||
myPosition = ElCLib::Value(Standard_PI/2.0, myCircle);
|
||||
myPosition = ElCLib::Value(M_PI / 2.0, myCircle);
|
||||
myAutomaticPosition = Standard_False;
|
||||
}
|
||||
else {
|
||||
@@ -678,7 +678,7 @@ void AIS_AngleDimension::ComputeTwoCurvilinearFacesAngle(const Handle(Prs3d_Pres
|
||||
#endif
|
||||
|
||||
|
||||
if (myVal <= Precision::Angular() || Abs( PI-myVal ) <= Precision::Angular())
|
||||
if (myVal <= Precision::Angular() || Abs( M_PI-myVal ) <= Precision::Angular())
|
||||
DsgPrs_AnglePresentation::Add(aPresentation,
|
||||
myDrawer,
|
||||
myVal,
|
||||
@@ -931,7 +931,7 @@ void AIS_AngleDimension::ComputeTwoEdgesNotNullAngle(const Handle(Prs3d_Presenta
|
||||
Standard_Boolean In1(Standard_False);
|
||||
Standard_Boolean In2(Standard_False);
|
||||
if ( !(Abs(d1.Angle(d2) - Abs(myVal)) <= Precision::Confusion())
|
||||
&& (Abs(myVal) < PI) ) {
|
||||
&& (Abs(myVal) < M_PI) ) {
|
||||
Standard_Real parcent1 = ElCLib::Parameter(l1->Lin(), myCenter);
|
||||
Standard_Real par11 = ElCLib::Parameter(l1->Lin(), ptat11);
|
||||
Standard_Real par12 = ElCLib::Parameter(l1->Lin(), ptat12);
|
||||
@@ -961,7 +961,7 @@ void AIS_AngleDimension::ComputeTwoEdgesNotNullAngle(const Handle(Prs3d_Presenta
|
||||
gp_Lin gpl2 = l2->Lin();
|
||||
theaxis = gp_Lin(myCenter,myFDir^mySDir);
|
||||
|
||||
if (myVal > PI) {
|
||||
if (myVal > M_PI) {
|
||||
theaxis.Reverse();
|
||||
}
|
||||
|
||||
@@ -1022,7 +1022,7 @@ void AIS_AngleDimension::ComputeTwoEdgesNotNullAngle(const Handle(Prs3d_Presenta
|
||||
mySAttach = ElCLib::Value(par_p2_attach,gpl2);
|
||||
}
|
||||
}
|
||||
if ( myVal < PI) curpos.SetXYZ(.5*(myFAttach.XYZ()+mySAttach.XYZ()));
|
||||
if ( myVal < M_PI) curpos.SetXYZ(.5*(myFAttach.XYZ()+mySAttach.XYZ()));
|
||||
else {
|
||||
curpos.SetXYZ(.5*(myFAttach.XYZ()+mySAttach.XYZ()));
|
||||
gp_Vec transl(curpos, myCenter);
|
||||
@@ -1074,9 +1074,9 @@ void AIS_AngleDimension::ComputeTwoEdgesNotNullAngle(const Handle(Prs3d_Presenta
|
||||
Standard_Real udeb = uc1;
|
||||
Standard_Real ufin = uc2;
|
||||
if (uco > ufin) {
|
||||
if (Abs(myVal)<PI) {
|
||||
if (Abs(myVal)<M_PI) {
|
||||
// test if uco is in the opposite sector
|
||||
if (uco > udeb+PI && uco < ufin+PI){
|
||||
if (uco > udeb+M_PI && uco < ufin+M_PI){
|
||||
dist = -dist;
|
||||
}
|
||||
}
|
||||
@@ -1493,7 +1493,7 @@ void AIS_AngleDimension::Compute3DSelection( const Handle( SelectMgr_Selection )
|
||||
Standard_Real FirstParAngleCirc, LastParAngleCirc, FirstParAttachCirc, LastParAttachCirc;
|
||||
gp_Pnt EndOfArrow1, EndOfArrow2, ProjAttachPoint2;
|
||||
gp_Dir DirOfArrow1, DirOfArrow2;
|
||||
gp_Dir axisdir = (myVal <= Precision::Angular() || Abs( PI-myVal ) <= Precision::Angular())?
|
||||
gp_Dir axisdir = (myVal <= Precision::Angular() || Abs( M_PI-myVal ) <= Precision::Angular())?
|
||||
myPlane->Pln().Axis().Direction() : (myFDir ^ mySDir);
|
||||
Standard_Boolean isPlane = (myFirstSurfType == AIS_KOS_Plane)? Standard_True : Standard_False;
|
||||
|
||||
@@ -1527,7 +1527,7 @@ void AIS_AngleDimension::Compute3DSelection( const Handle( SelectMgr_Selection )
|
||||
Handle( Select3D_SensitiveCurve ) SensCurve;
|
||||
|
||||
// Angle's arc or line
|
||||
if (myVal > Precision::Angular() && Abs( PI-myVal ) > Precision::Angular())
|
||||
if (myVal > Precision::Angular() && Abs( M_PI-myVal ) > Precision::Angular())
|
||||
{
|
||||
curve = new Geom_TrimmedCurve( new Geom_Circle( AngleCirc ), FirstParAngleCirc, LastParAngleCirc );
|
||||
SensCurve = new Select3D_SensitiveCurve( own, curve );
|
||||
@@ -1611,12 +1611,12 @@ void AIS_AngleDimension::Compute2DSelection(const Handle(SelectMgr_Selection)& a
|
||||
gp_Lin l2(cu2.Line());
|
||||
|
||||
// it is patch!
|
||||
if (Abs( myVal ) <= Precision::Angular() || Abs( PI - myVal ) <= Precision::Angular())
|
||||
if (Abs( myVal ) <= Precision::Angular() || Abs( M_PI - myVal ) <= Precision::Angular())
|
||||
/*
|
||||
//---------------------------------------------------------
|
||||
// Cas de droites paralleles ( <=> angle nul a PI pres)
|
||||
// Cas de droites paralleles ( <=> angle nul a M_PI pres)
|
||||
if ((Abs(l1.Angle(l2)) < Precision::Angular()) ||
|
||||
(Abs((l1.Angle(l2) - PI)) < Precision::Angular()) )
|
||||
(Abs((l1.Angle(l2) - M_PI)) < Precision::Angular()) )
|
||||
*/
|
||||
{
|
||||
|
||||
@@ -1677,19 +1677,19 @@ void AIS_AngleDimension::Compute2DSelection(const Handle(SelectMgr_Selection)& a
|
||||
Standard_Real ufin = uc2;
|
||||
|
||||
if (uco > ufin) {
|
||||
if (Abs(myVal)<PI) {
|
||||
if (Abs(myVal)<M_PI) {
|
||||
// test if uco is in the opposing sector
|
||||
if (uco > udeb+PI && uco < ufin+PI){
|
||||
udeb = udeb + PI;
|
||||
ufin = ufin + PI;
|
||||
if (uco > udeb+M_PI && uco < ufin+M_PI){
|
||||
udeb = udeb + M_PI;
|
||||
ufin = ufin + M_PI;
|
||||
uc1 = udeb;
|
||||
uc2 = ufin;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (uco > ufin) {
|
||||
if ((uco-uc2) < (uc1-uco+(2*PI))) ufin = uco;
|
||||
else udeb = uco - 2*PI;
|
||||
if ((uco-uc2) < (uc1-uco+(2*M_PI))) ufin = uco;
|
||||
else udeb = uco - 2*M_PI;
|
||||
}
|
||||
p1 = ElCLib::Value(udeb,cer);
|
||||
p2 = ElCLib::Value(ufin,cer);
|
||||
@@ -1770,11 +1770,11 @@ void AIS_AngleDimension::ComputeNull2DSelection(
|
||||
Standard_Real ufin = uc2;
|
||||
|
||||
if (uco > ufin) {
|
||||
if (Abs(myVal)<PI) {
|
||||
if (Abs(myVal)<M_PI) {
|
||||
// test if uco is in the opposing sector
|
||||
if (uco > udeb+PI && uco < ufin+PI){
|
||||
udeb = udeb + PI;
|
||||
ufin = ufin + PI;
|
||||
if (uco > udeb+M_PI && uco < ufin+M_PI){
|
||||
udeb = udeb + M_PI;
|
||||
ufin = ufin + M_PI;
|
||||
uc1 = udeb;
|
||||
uc2 = ufin;
|
||||
}
|
||||
@@ -1782,11 +1782,11 @@ void AIS_AngleDimension::ComputeNull2DSelection(
|
||||
}
|
||||
|
||||
if (uco > ufin) {
|
||||
if ((uco-uc2) < (uc1-uco+(2*PI))) {
|
||||
if ((uco-uc2) < (uc1-uco+(2*M_PI))) {
|
||||
ufin = uco;
|
||||
}
|
||||
else {
|
||||
udeb = uco - 2*PI;
|
||||
udeb = uco - 2*M_PI;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1929,7 +1929,7 @@ void AIS_AngleDimension::ComputeConeAngleSelection(const Handle(SelectMgr_Select
|
||||
aCurve = aSurf->VIso(midV);
|
||||
myCircle = Handle(Geom_Circle)::DownCast(aCurve)->Circ();
|
||||
|
||||
myPosition = ElCLib::Value(Standard_PI / 2.0, myCircle);
|
||||
myPosition = ElCLib::Value(M_PI / 2.0, myCircle);
|
||||
myAutomaticPosition = Standard_False;
|
||||
}
|
||||
else {
|
||||
@@ -1966,7 +1966,7 @@ void AIS_AngleDimension::ComputeConeAngleSelection(const Handle(SelectMgr_Select
|
||||
|
||||
aPnt = Apex;
|
||||
gp_Pnt P1 = ElCLib::Value(0., myCircle);
|
||||
gp_Pnt P2 = ElCLib::Value(Standard_PI, myCircle);
|
||||
gp_Pnt P2 = ElCLib::Value(M_PI, myCircle);
|
||||
|
||||
gce_MakePln mkPln(P1, P2, aPnt); // create a plane whitch defines plane for projection aPosition on it
|
||||
|
||||
@@ -1994,8 +1994,8 @@ void AIS_AngleDimension::ComputeConeAngleSelection(const Handle(SelectMgr_Select
|
||||
Standard_Real AttParam = ElCLib::Parameter(aCircle2, AttachmentPnt);
|
||||
Standard_Real OppParam = ElCLib::Parameter(aCircle2, OppositePnt);
|
||||
|
||||
while ( AttParam >= 2*Standard_PI ) AttParam -= 2*Standard_PI;
|
||||
while ( OppParam >= 2*Standard_PI ) OppParam -= 2*Standard_PI;
|
||||
while ( AttParam >= 2 * M_PI ) AttParam -= 2 * M_PI;
|
||||
while ( OppParam >= 2 * M_PI ) OppParam -= 2 * M_PI;
|
||||
|
||||
if( myPosition.Distance( myCircle.Location() ) <= myCircle.Radius() )
|
||||
if( 2 * myCircle.Radius() > aCircle2.Radius() * 0.4 ) IsArrowOut = Standard_False; //four times more than an arrow size
|
||||
@@ -2006,10 +2006,10 @@ void AIS_AngleDimension::ComputeConeAngleSelection(const Handle(SelectMgr_Select
|
||||
param = ElCLib::Parameter(aCircle2, tmpPnt);
|
||||
|
||||
if(IsArrowOut) {
|
||||
angle = OppParam - AttParam + Standard_PI/6; //An angle between AttParam and OppParam + 30 degrees
|
||||
param = AttParam - Standard_PI/12; //out parts of dimension line are 15 degrees
|
||||
angle = OppParam - AttParam + M_PI / 6; //An angle between AttParam and OppParam + 30 degrees
|
||||
param = AttParam - M_PI / 12; //out parts of dimension line are 15 degrees
|
||||
|
||||
while ( angle > 2*Standard_PI ) angle -= 2*Standard_PI;
|
||||
while ( angle > 2 * M_PI ) angle -= 2 * M_PI;
|
||||
for( i = 0; i <= 11; i++ ) { //calculating of arc
|
||||
aPnt = ElCLib::Value(param + angle/11 * i, aCircle2);
|
||||
aPnt.Coord(X, Y, Z);
|
||||
@@ -2020,7 +2020,7 @@ void AIS_AngleDimension::ComputeConeAngleSelection(const Handle(SelectMgr_Select
|
||||
else {
|
||||
angle = OppParam - AttParam;
|
||||
param = AttParam;
|
||||
while ( angle > 2*Standard_PI ) angle -= 2*Standard_PI;
|
||||
while ( angle > 2 * M_PI ) angle -= 2 * M_PI;
|
||||
for( i = 0; i <= 11; i++ ) { //calculating of arc
|
||||
aPnt = ElCLib::Value(param + angle/11 * i, aCircle2);
|
||||
aPnt.Coord(X, Y, Z);
|
||||
|
@@ -34,7 +34,7 @@ AIS_Circle::AIS_Circle(const Handle(Geom_Circle)& aComponent):
|
||||
AIS_InteractiveObject(PrsMgr_TOP_AllView),
|
||||
myComponent(aComponent),
|
||||
myUStart(0.),
|
||||
myUEnd(2*PI),
|
||||
myUEnd(2*M_PI),
|
||||
myCircleIsArc(Standard_False)
|
||||
{
|
||||
}
|
||||
|
@@ -266,8 +266,8 @@ void AIS_ConcentricRelation::ComputeSelection(const Handle(SelectMgr_Selection)&
|
||||
aSelection->Add(seg);
|
||||
|
||||
gp_Ax1 RotateAxis(myCenter, myDir);
|
||||
gp_Pnt FPnt = myCenter.Rotated(RotateAxis, PI/2);
|
||||
gp_Pnt SPnt = myCenter.Rotated(RotateAxis, -PI/2);
|
||||
gp_Pnt FPnt = myCenter.Rotated(RotateAxis, M_PI/2);
|
||||
gp_Pnt SPnt = myCenter.Rotated(RotateAxis, -M_PI/2);
|
||||
seg = new Select3D_SensitiveSegment(own,
|
||||
FPnt,
|
||||
SPnt);
|
||||
|
@@ -242,17 +242,17 @@ void AIS_DiameterDimension::ComputeArcSelection(const Handle(SelectMgr_Selection
|
||||
|
||||
Handle(SelectMgr_EntityOwner) own = new SelectMgr_EntityOwner(this,7);
|
||||
gp_Pnt theCenter = myCircle.Location();
|
||||
while (lpara > 2*PI) {
|
||||
fpara -= 2*PI;
|
||||
lpara -= 2*PI;
|
||||
while (lpara > 2*M_PI) {
|
||||
fpara -= 2*M_PI;
|
||||
lpara -= 2*M_PI;
|
||||
}
|
||||
Standard_Real parat = ElCLib::Parameter(myCircle,myPosition);
|
||||
Standard_Boolean otherside(Standard_False);
|
||||
gp_Pnt attpoint = myPosition;
|
||||
|
||||
if (!AIS::InDomain(fpara,lpara,parat)) {
|
||||
Standard_Real otherpar = parat + PI;
|
||||
if (otherpar > 2*PI) otherpar -= 2*PI;
|
||||
Standard_Real otherpar = parat + M_PI;
|
||||
if (otherpar > 2*M_PI) otherpar -= 2*M_PI;
|
||||
if (AIS::InDomain(fpara,lpara,otherpar)) {
|
||||
parat = otherpar;
|
||||
otherside = Standard_True;
|
||||
@@ -530,7 +530,7 @@ void AIS_DiameterDimension::ComputeArcDiameter(
|
||||
myFirstPar = parfirst;
|
||||
myLastPar = parend;
|
||||
if ( parfirst > parend) {
|
||||
parfirst -= 2*PI;
|
||||
parfirst -= 2*M_PI;
|
||||
}
|
||||
if (myAutomaticPosition) {
|
||||
Standard_Real pcurpos = (parfirst + parend)/2.;
|
||||
@@ -667,7 +667,7 @@ void AIS_DiameterDimension::ComputeOnePlanarFaceDiameter(const Handle(Prs3d_Pres
|
||||
parfirst = ElCLib::Parameter(myCircle, ptfirst);
|
||||
parend = ElCLib::Parameter(myCircle, ptend);
|
||||
if ( parfirst > parend) {
|
||||
parfirst -= 2*PI;
|
||||
parfirst -= 2*M_PI;
|
||||
}
|
||||
Standard_Real parcurPos = (parfirst + parend) * 0.5;
|
||||
curPos = ElCLib::Value(parcurPos, myCircle);
|
||||
|
@@ -79,10 +79,10 @@ void AIS_EllipseRadiusDimension::ComputeGeometry()
|
||||
default:
|
||||
break;
|
||||
}
|
||||
while (myFirstPar > 2*PI) myFirstPar -= 2*PI;
|
||||
while (myLastPar > 2*PI) myLastPar -= 2*PI;
|
||||
while (myFirstPar < 0.0) myFirstPar += 2*PI;
|
||||
while (myLastPar < 0.0) myLastPar += 2*PI;
|
||||
while (myFirstPar > 2*M_PI) myFirstPar -= 2*M_PI;
|
||||
while (myLastPar > 2*M_PI) myLastPar -= 2*M_PI;
|
||||
while (myFirstPar < 0.0) myFirstPar += 2*M_PI;
|
||||
while (myLastPar < 0.0) myLastPar += 2*M_PI;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
|
@@ -278,7 +278,7 @@ void AIS_EqualDistanceRelation::ComputeSelection( const Handle( SelectMgr_Select
|
||||
Handle(Geom_Circle) aCircle = Handle(Geom_Circle)::DownCast(aCurve.Curve().Curve());
|
||||
Standard_Real FirstPar = ElCLib::Parameter(aCircle->Circ(), myAttachPoint1),
|
||||
LastPar = ElCLib::Parameter(aCircle->Circ(), myPoint1);
|
||||
if (LastPar < FirstPar ) LastPar+=PI*2;
|
||||
if (LastPar < FirstPar ) LastPar+=M_PI*2;
|
||||
//add sensetive arc
|
||||
Handle(Select3D_SensitiveCircle) circ =
|
||||
new Select3D_SensitiveCircle( own, aCircle, FirstPar, LastPar);
|
||||
@@ -301,7 +301,7 @@ void AIS_EqualDistanceRelation::ComputeSelection( const Handle( SelectMgr_Select
|
||||
Handle(Geom_Circle) aCircle = Handle(Geom_Circle)::DownCast(aCurve.Curve().Curve());
|
||||
Standard_Real FirstPar = ElCLib::Parameter(aCircle->Circ(), myAttachPoint2),
|
||||
LastPar = ElCLib::Parameter(aCircle->Circ(), myPoint2);
|
||||
if (LastPar < FirstPar ) LastPar+=PI*2;
|
||||
if (LastPar < FirstPar ) LastPar+=M_PI*2;
|
||||
//add sensetive arc
|
||||
Handle(Select3D_SensitiveCircle) circ =
|
||||
new Select3D_SensitiveCircle( own,aCircle, FirstPar, LastPar);
|
||||
@@ -324,7 +324,7 @@ void AIS_EqualDistanceRelation::ComputeSelection( const Handle( SelectMgr_Select
|
||||
Handle(Geom_Circle) aCircle = Handle(Geom_Circle)::DownCast(aCurve.Curve().Curve());
|
||||
Standard_Real FirstPar = ElCLib::Parameter(aCircle->Circ(), myAttachPoint3),
|
||||
LastPar = ElCLib::Parameter(aCircle->Circ(), myPoint3);
|
||||
if (LastPar < FirstPar ) LastPar+=PI*2;
|
||||
if (LastPar < FirstPar ) LastPar+=M_PI*2;
|
||||
Handle(Select3D_SensitiveCircle) circ =
|
||||
new Select3D_SensitiveCircle( own, aCircle, FirstPar, LastPar);
|
||||
aSelection->Add( circ );
|
||||
@@ -350,7 +350,7 @@ void AIS_EqualDistanceRelation::ComputeSelection( const Handle( SelectMgr_Select
|
||||
Handle(Geom_Circle) aCircle = Handle(Geom_Circle)::DownCast(aCurve.Curve().Curve());
|
||||
Standard_Real FirstPar = ElCLib::Parameter(aCircle->Circ(), myAttachPoint4),
|
||||
LastPar = ElCLib::Parameter(aCircle->Circ(), myPoint4);
|
||||
if (LastPar < FirstPar ) LastPar+=PI*2;
|
||||
if (LastPar < FirstPar ) LastPar+=M_PI*2;
|
||||
//add sensetive arc
|
||||
Handle(Select3D_SensitiveCircle) circ =
|
||||
new Select3D_SensitiveCircle( own,aCircle, FirstPar, LastPar);
|
||||
@@ -530,18 +530,18 @@ void AIS_EqualDistanceRelation::ComputeTwoEdgesLength( const Handle( Prs3d_Prese
|
||||
if (PrPnt12.Distance(PrCenter) >Precision::Confusion())
|
||||
{
|
||||
gp_Dir aDir1(PrPnt12.XYZ() - PrCenter.XYZ());
|
||||
Standard_Real anAngle = aDir1.Angle(XDir); //Get the angle in range [0, PI]
|
||||
Standard_Real anAngle = aDir1.Angle(XDir); //Get the angle in range [0, M_PI]
|
||||
if (aDir1.Dot(YDir) < 0)
|
||||
anAngle = 2*Standard_PI - anAngle;
|
||||
anAngle = 2 * M_PI - anAngle;
|
||||
par1 = anAngle;
|
||||
}
|
||||
|
||||
if (PrPnt22.Distance(PrCenter) >Precision::Confusion())
|
||||
{
|
||||
gp_Dir aDir2(PrPnt22.XYZ() - PrCenter.XYZ());
|
||||
Standard_Real anAngle = aDir2.Angle(XDir); //Get the angle in range [0, PI]
|
||||
Standard_Real anAngle = aDir2.Angle(XDir); //Get the angle in range [0, M_PI]
|
||||
if (aDir2.Dot(YDir) < 0)
|
||||
anAngle = 2*Standard_PI - anAngle;
|
||||
anAngle = 2 * M_PI - anAngle;
|
||||
par2 = anAngle;
|
||||
}
|
||||
|
||||
@@ -627,7 +627,7 @@ void AIS_EqualDistanceRelation::ComputeTwoVerticesLength( const Handle( Prs3d_Pr
|
||||
else {
|
||||
if (!samePoint) {
|
||||
DirAttach.SetXYZ(SecondAttach.XYZ() - FirstAttach.XYZ());
|
||||
DirAttach.Rotate(Plane->Pln().Axis(),PI/2.);
|
||||
DirAttach.Rotate(Plane->Pln().Axis(),M_PI/2.);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -84,8 +84,8 @@ void AIS_EqualRadiusRelation::Compute( const Handle( PrsMgr_PresentationManager3
|
||||
}
|
||||
else {
|
||||
Standard_Real aPar = ElCLib::Parameter(FirstCirc, myFirstPoint);
|
||||
if (IntegerPart(0.5*LastPar1/PI) != 0 && aPar < FirstPar1 )
|
||||
aPar +=2*PI*IntegerPart(0.5*LastPar1/PI);
|
||||
if (IntegerPart(0.5*LastPar1/M_PI) != 0 && aPar < FirstPar1 )
|
||||
aPar +=2*M_PI*IntegerPart(0.5*LastPar1/M_PI);
|
||||
Standard_Real aRadius = FirstCirc.Radius();
|
||||
|
||||
if (Abs(myFirstPoint.Distance(myFirstCenter) - aRadius) >= Precision::Confusion())
|
||||
@@ -104,8 +104,8 @@ void AIS_EqualRadiusRelation::Compute( const Handle( PrsMgr_PresentationManager3
|
||||
|
||||
|
||||
aPar = ElCLib::Parameter(SecondCirc, mySecondPoint);
|
||||
if (IntegerPart(0.5*LastPar2/PI) != 0 && aPar < FirstPar2 )
|
||||
aPar +=2*PI*IntegerPart(0.5*LastPar2/PI);
|
||||
if (IntegerPart(0.5*LastPar2/M_PI) != 0 && aPar < FirstPar2 )
|
||||
aPar +=2*M_PI*IntegerPart(0.5*LastPar2/M_PI);
|
||||
|
||||
aRadius = SecondCirc.Radius();
|
||||
if (Abs(mySecondPoint.Distance(mySecondCenter) - aRadius) >= Precision::Confusion())
|
||||
|
@@ -61,7 +61,7 @@ static Standard_Boolean InDomain(const Standard_Real fpar,
|
||||
if (fpar >= 0.) {
|
||||
return ((para >= fpar) && (para <= lpar));
|
||||
}
|
||||
if (para >= (fpar+2*PI)) return Standard_True;
|
||||
if (para >= (fpar+2*M_PI)) return Standard_True;
|
||||
if (para <= lpar) return Standard_True;
|
||||
return Standard_False;
|
||||
}
|
||||
@@ -270,7 +270,7 @@ void AIS_FixRelation::ComputeSelection(const Handle(SelectMgr_Selection)& aSelec
|
||||
dirac.Normalize();
|
||||
gp_Vec norac = dirac.Crossed(gp_Vec(norm));
|
||||
gp_Ax1 ax(myPosition, norm);
|
||||
norac.Rotate(ax, PI/8);
|
||||
norac.Rotate(ax, M_PI/8);
|
||||
|
||||
norac*=(myArrowSize/2);
|
||||
gp_Pnt P1 = myPosition.Translated(norac);
|
||||
@@ -414,7 +414,7 @@ gp_Pnt AIS_FixRelation::ComputePosition(const Handle(Geom_Curve)& curv,
|
||||
gp_Vec transvec = vec*myArrowSize;
|
||||
curpos = myPntAttach.Translated(transvec);
|
||||
gp_Ax1 RotAx( myPntAttach, NormPln);
|
||||
curpos.Rotate(RotAx, PI/10);
|
||||
curpos.Rotate(RotAx, M_PI/10);
|
||||
}
|
||||
|
||||
return curpos;
|
||||
@@ -526,10 +526,10 @@ void AIS_FixRelation::ComputeCirclePosition(
|
||||
Standard_Real& plast)
|
||||
{
|
||||
// readjust parametres on the circle
|
||||
if (plast > 2*PI ) {
|
||||
Standard_Real nbtours = Floor(plast / (2*PI));
|
||||
plast -= nbtours*2*PI;
|
||||
pfirst -= nbtours*2*PI;
|
||||
if (plast > 2*M_PI ) {
|
||||
Standard_Real nbtours = Floor(plast / (2*M_PI));
|
||||
plast -= nbtours*2*M_PI;
|
||||
pfirst -= nbtours*2*M_PI;
|
||||
}
|
||||
|
||||
if (myAutomaticPosition) {
|
||||
@@ -539,8 +539,8 @@ void AIS_FixRelation::ComputeCirclePosition(
|
||||
Standard_Real circparam = (pfirst + plast)/2.;
|
||||
|
||||
if ( !InDomain(pfirst,plast,circparam)) {
|
||||
Standard_Real otherpar = circparam + PI;
|
||||
if (otherpar > 2*PI) otherpar -= 2*PI;
|
||||
Standard_Real otherpar = circparam + M_PI;
|
||||
if (otherpar > 2*M_PI) otherpar -= 2*M_PI;
|
||||
circparam = otherpar;
|
||||
}
|
||||
|
||||
@@ -563,8 +563,8 @@ void AIS_FixRelation::ComputeCirclePosition(
|
||||
Standard_Real circparam = ElCLib::Parameter(gcirc, pos);
|
||||
|
||||
if ( !InDomain(pfirst,plast,circparam)) {
|
||||
Standard_Real otherpar = circparam + PI;
|
||||
if (otherpar > 2*PI) otherpar -= 2*PI;
|
||||
Standard_Real otherpar = circparam + M_PI;
|
||||
if (otherpar > 2*M_PI) otherpar -= 2*M_PI;
|
||||
circparam = otherpar;
|
||||
}
|
||||
|
||||
|
@@ -58,8 +58,8 @@
|
||||
|
||||
static Standard_Real Modulo2PI(const Standard_Real ANGLE)
|
||||
{
|
||||
if ( ANGLE < 0 ) return Modulo2PI(ANGLE + 2*PI);
|
||||
else if ( ANGLE >= 2*PI ) return Modulo2PI(ANGLE - 2*PI);
|
||||
if ( ANGLE < 0 ) return Modulo2PI(ANGLE + 2*M_PI);
|
||||
else if ( ANGLE >= 2*M_PI ) return Modulo2PI(ANGLE - 2*M_PI);
|
||||
return ANGLE;
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ static Standard_Boolean IsEqual2PI(const Standard_Real angle1,
|
||||
{
|
||||
Standard_Real diff = Abs(angle1-angle2);
|
||||
if ( diff < precision ) return Standard_True;
|
||||
else if ( Abs(diff-2*PI) < precision ) return Standard_True;
|
||||
else if ( Abs(diff-2*M_PI) < precision ) return Standard_True;
|
||||
return Standard_False;
|
||||
}
|
||||
// jfa 15/10/2000 end
|
||||
@@ -187,18 +187,18 @@ static Standard_Boolean ComputeAttach(const gp_Circ& thecirc,
|
||||
Standard_Real deltap = pSAttachM - pFAttach;
|
||||
if ( deltap < 0 )
|
||||
{
|
||||
deltap += 2*Standard_PI;
|
||||
pSAttachM += 2*Standard_PI;
|
||||
deltap += 2 * M_PI;
|
||||
pSAttachM += 2 * M_PI;
|
||||
}
|
||||
pSAttachM -= pFAttach;
|
||||
|
||||
Standard_Real pmiddleout = pSAttachM/2.0 + Standard_PI;
|
||||
Standard_Real pmiddleout = pSAttachM/2.0 + M_PI;
|
||||
|
||||
Standard_Real pcurpos1 = pcurpos;
|
||||
// define where curpos lays
|
||||
if ( pcurpos1 < pFAttach )
|
||||
{
|
||||
pcurpos1 = pcurpos1 + 2*Standard_PI - pFAttach;
|
||||
pcurpos1 = pcurpos1 + 2 * M_PI - pFAttach;
|
||||
if ( pcurpos1 > pSAttachM ) // out
|
||||
{
|
||||
if ( pcurpos1 > pmiddleout ) pcurpos = pFAttach;
|
||||
@@ -255,18 +255,18 @@ static Standard_Boolean ComputeAttach(const gp_Elips& theEll,
|
||||
Standard_Real deltap = pSAttachM - pFAttach;
|
||||
if ( deltap < 0 )
|
||||
{
|
||||
deltap += 2*Standard_PI;
|
||||
pSAttachM += 2*Standard_PI;
|
||||
deltap += 2 * M_PI;
|
||||
pSAttachM += 2 * M_PI;
|
||||
}
|
||||
pSAttachM -= pFAttach;
|
||||
|
||||
Standard_Real pmiddleout = pSAttachM/2.0 + Standard_PI;
|
||||
Standard_Real pmiddleout = pSAttachM/2.0 + M_PI;
|
||||
|
||||
Standard_Real pcurpos1 = pcurpos;
|
||||
// define where curpos lays
|
||||
if ( pcurpos1 < pFAttach )
|
||||
{
|
||||
pcurpos1 = pcurpos1 + 2*Standard_PI - pFAttach;
|
||||
pcurpos1 = pcurpos1 + 2 * M_PI - pFAttach;
|
||||
if ( pcurpos1 > pSAttachM ) // out
|
||||
{
|
||||
if ( pcurpos1 > pmiddleout ) pcurpos = pFAttach;
|
||||
@@ -746,7 +746,7 @@ void AIS_IdenticRelation::ComputeTwoCirclesPresentation(const Handle(Prs3d_Prese
|
||||
|
||||
myCenter = thecirc->Location();
|
||||
Standard_Real aSegSize = thecirc->Radius()/5.0;
|
||||
Standard_Real rad = Standard_PI/5.0;
|
||||
Standard_Real rad = M_PI / 5.0;
|
||||
|
||||
// I. Case of 2 complete circles
|
||||
if ( circ1complete && circ2complete )
|
||||
@@ -984,7 +984,7 @@ void AIS_IdenticRelation::ComputeAutoArcPresentation(const Handle(Geom_Circle)&
|
||||
const Standard_Boolean isstatic)
|
||||
{
|
||||
Standard_Real aSegSize = thecirc->Radius()/5.0;
|
||||
Standard_Real rad = Standard_PI/5.0;
|
||||
Standard_Real rad = M_PI / 5.0;
|
||||
|
||||
Standard_Real pFA = ElCLib::Parameter(thecirc->Circ(),firstp);
|
||||
Standard_Real pSA = ElCLib::Parameter(thecirc->Circ(),lastp);
|
||||
@@ -1027,7 +1027,7 @@ void AIS_IdenticRelation::ComputeNotAutoCircPresentation(const Handle(Geom_Circl
|
||||
curpos.Translate(vprec*1e-5);
|
||||
}
|
||||
|
||||
Standard_Real rad = Standard_PI/5.0;
|
||||
Standard_Real rad = M_PI / 5.0;
|
||||
Standard_Real pcurpos = ElCLib::Parameter(cirNotAuto->Circ(),curpos);
|
||||
Standard_Real pFAttach = pcurpos - rad;
|
||||
Standard_Real pSAttach = pcurpos + rad;
|
||||
@@ -1055,7 +1055,7 @@ void AIS_IdenticRelation::ComputeNotAutoArcPresentation(const Handle(Geom_Circle
|
||||
Standard_Real pSPnt = ElCLib::Parameter(cirNotAuto, pntlast);
|
||||
Standard_Real deltap = Modulo2PI(pSPnt - pFPnt)/2.0;
|
||||
|
||||
Standard_Real rad = Standard_PI/5;
|
||||
Standard_Real rad = M_PI / 5;
|
||||
if ( deltap < rad )
|
||||
{
|
||||
myFAttach = pntfirst;
|
||||
@@ -1101,7 +1101,7 @@ void AIS_IdenticRelation::ComputeTwoEllipsesPresentation(const Handle(Prs3d_Pres
|
||||
|
||||
myCenter = theEll->Location();
|
||||
Standard_Real aSegSize = theEll->MajorRadius()/5.0;
|
||||
Standard_Real rad = Standard_PI/5.0;
|
||||
Standard_Real rad = M_PI / 5.0;
|
||||
|
||||
// I. Case of 2 complete ellipses
|
||||
if ( circ1complete && circ2complete )
|
||||
@@ -1338,7 +1338,7 @@ void AIS_IdenticRelation::ComputeAutoArcPresentation(const Handle(Geom_Ellipse)&
|
||||
const Standard_Boolean isstatic)
|
||||
{
|
||||
Standard_Real aSegSize = theEll->MajorRadius()/5.0;
|
||||
Standard_Real rad = Standard_PI/5.0;
|
||||
Standard_Real rad = M_PI / 5.0;
|
||||
|
||||
gp_Elips anEll = theEll->Elips();
|
||||
|
||||
@@ -1383,7 +1383,7 @@ void AIS_IdenticRelation::ComputeNotAutoElipsPresentation(const Handle(Geom_Elli
|
||||
curpos.Translate(vprec*1e-5);
|
||||
}
|
||||
|
||||
Standard_Real rad = Standard_PI/5.0;
|
||||
Standard_Real rad = M_PI / 5.0;
|
||||
// Standard_Real pcurpos = ElCLib::Parameter(anEll,curpos);
|
||||
GeomAPI_ProjectPointOnCurve aProj (curpos, theEll);
|
||||
Standard_Real pcurpos = aProj.LowerDistanceParameter();
|
||||
@@ -1414,7 +1414,7 @@ void AIS_IdenticRelation::ComputeNotAutoArcPresentation(const Handle(Geom_Ellips
|
||||
Standard_Real pSPnt = ElCLib::Parameter(anEll, pntlast);
|
||||
Standard_Real deltap = Modulo2PI(pSPnt - pFPnt)/2.0;
|
||||
|
||||
Standard_Real rad = Standard_PI/5;
|
||||
Standard_Real rad = M_PI / 5;
|
||||
if ( deltap < rad )
|
||||
{
|
||||
myFAttach = pntfirst;
|
||||
|
@@ -1650,7 +1650,7 @@ void AIS_InteractiveContext::SetDeviationAngle(const Standard_Real anAngle)
|
||||
|
||||
Standard_Real AIS_InteractiveContext::DeviationAngle() const
|
||||
{
|
||||
return PI/180.0e0 ;
|
||||
return M_PI/180.0e0 ;
|
||||
// return myDefaultDrawer->DeviationAngle();
|
||||
}
|
||||
|
||||
@@ -1963,7 +1963,7 @@ void AIS_InteractiveContext::SetColor(const Handle(AIS_InteractiveObject)& anIOb
|
||||
// gp_Dir D =Tr->Component()->XDirection();
|
||||
// gp_Pnt O = Tr->Component()->Location();
|
||||
// gp_Vec V(D);V*=Lx/5.;
|
||||
// T.SetRotation(gp_Ax1(O,D),PI/6.);
|
||||
// T.SetRotation(gp_Ax1(O,D),M_PI/6.);
|
||||
// T.SetTranslationPart(V);
|
||||
// TopLoc_Location L,IncLoc(T);
|
||||
|
||||
@@ -2128,7 +2128,7 @@ void AIS_InteractiveContext::SetAngleAndDeviation(
|
||||
{
|
||||
// cout<<" Angle:"<< anAngle <<endl;
|
||||
if(anIObj.IsNull()) return ;
|
||||
// Standard_Real anAngleRad = PI*anAngle/180; test rob...
|
||||
// Standard_Real anAngleRad = M_PI*anAngle/180; test rob...
|
||||
if(!anIObj->HasInteractiveContext())
|
||||
anIObj->SetContext(this);
|
||||
|
||||
|
@@ -930,7 +930,7 @@ void AIS_LengthDimension::ComputeTwoVerticesLength( const Handle( Prs3d_Presenta
|
||||
else {
|
||||
if (!samePoint) {
|
||||
DirAttach = gce_MakeDir(FirstAttach,SecondAttach);
|
||||
DirAttach.Rotate(Plane->Pln().Axis(),PI/2.);
|
||||
DirAttach.Rotate(Plane->Pln().Axis(),M_PI/2.);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -487,7 +487,7 @@ void AIS_MidPointRelation::ComputePointsOnCirc(const gp_Circ& aCirc,
|
||||
|
||||
Standard_Real pcurpos = ElCLib::Parameter(aCirc,curpos);
|
||||
|
||||
Standard_Real rad = Standard_PI/5.0;
|
||||
Standard_Real rad = M_PI / 5.0;
|
||||
Standard_Real segm;
|
||||
|
||||
Standard_Real pFPnt;
|
||||
@@ -507,18 +507,18 @@ void AIS_MidPointRelation::ComputePointsOnCirc(const gp_Circ& aCirc,
|
||||
Standard_Real deltap = pSAttachM - pFAttach;
|
||||
if ( deltap < 0 )
|
||||
{
|
||||
deltap += 2*Standard_PI;
|
||||
pSAttachM += 2*Standard_PI;
|
||||
deltap += 2 * M_PI;
|
||||
pSAttachM += 2 * M_PI;
|
||||
}
|
||||
pSAttachM -= pFAttach;
|
||||
|
||||
Standard_Real pmiddleout = pSAttachM/2.0 + Standard_PI;
|
||||
Standard_Real pmiddleout = pSAttachM/2.0 + M_PI;
|
||||
|
||||
Standard_Real pcurpos1 = pcurpos;
|
||||
// define where curpos lays
|
||||
if ( pcurpos1 < pFAttach )
|
||||
{
|
||||
pcurpos1 = pcurpos1 + 2*Standard_PI - pFAttach;
|
||||
pcurpos1 = pcurpos1 + 2 * M_PI - pFAttach;
|
||||
if ( pcurpos1 > pSAttachM ) // out
|
||||
{
|
||||
segm = Min(rad,deltap*0.75);
|
||||
@@ -614,7 +614,7 @@ void AIS_MidPointRelation::ComputePointsOnElips(const gp_Elips& anEll,
|
||||
|
||||
Standard_Real pcurpos = ElCLib::Parameter(anEll,curpos);
|
||||
|
||||
Standard_Real rad = Standard_PI/5.0;
|
||||
Standard_Real rad = M_PI / 5.0;
|
||||
Standard_Real segm;
|
||||
|
||||
Standard_Real pFPnt;
|
||||
@@ -634,18 +634,18 @@ void AIS_MidPointRelation::ComputePointsOnElips(const gp_Elips& anEll,
|
||||
Standard_Real deltap = pSAttachM - pFAttach;
|
||||
if ( deltap < 0 )
|
||||
{
|
||||
deltap += 2*Standard_PI;
|
||||
pSAttachM += 2*Standard_PI;
|
||||
deltap += 2 * M_PI;
|
||||
pSAttachM += 2 * M_PI;
|
||||
}
|
||||
pSAttachM -= pFAttach;
|
||||
|
||||
Standard_Real pmiddleout = pSAttachM/2.0 + Standard_PI;
|
||||
Standard_Real pmiddleout = pSAttachM / 2.0 + M_PI;
|
||||
|
||||
Standard_Real pcurpos1 = pcurpos;
|
||||
// define where curpos lays
|
||||
if ( pcurpos1 < pFAttach )
|
||||
{
|
||||
pcurpos1 = pcurpos1 + 2*Standard_PI - pFAttach;
|
||||
pcurpos1 = pcurpos1 + 2 * M_PI - pFAttach;
|
||||
if ( pcurpos1 > pSAttachM ) // out
|
||||
{
|
||||
segm = Min(rad,deltap*0.75);
|
||||
|
@@ -232,10 +232,10 @@ void AIS_RadiusDimension::InitFirstShape()
|
||||
|
||||
myCenter = myCircle.Location();
|
||||
myCircle.SetRadius(myVal);
|
||||
while (myFirstPar > 2*PI) myFirstPar -= 2*PI;
|
||||
while (myFirstPar < 0.0 ) myFirstPar += 2*PI;
|
||||
while (myLastPar > 2*PI) myLastPar -= 2*PI;
|
||||
while (myLastPar < 0.0 ) myLastPar += 2*PI;
|
||||
while (myFirstPar > 2*M_PI) myFirstPar -= 2*M_PI;
|
||||
while (myFirstPar < 0.0 ) myFirstPar += 2*M_PI;
|
||||
while (myLastPar > 2*M_PI) myLastPar -= 2*M_PI;
|
||||
while (myLastPar < 0.0 ) myLastPar += 2*M_PI;
|
||||
myPlane = new Geom_Plane(gp_Pln(gp_Ax3(myCircle.Position())));
|
||||
myFirstLine = gce_MakeLin( myCenter, ElCLib::Value( myFirstPar, myCircle ) );
|
||||
myLastLine = gce_MakeLin( myCenter, ElCLib::Value( myLastPar, myCircle ) );
|
||||
@@ -359,18 +359,18 @@ void AIS_RadiusDimension::ComputeRadius( const Handle( Prs3d_Presentation )& aPr
|
||||
Standard_Real PosPar = ElCLib::Parameter( myCircle, myPosition );
|
||||
if (!AIS::InDomain(myFirstPar, myLastPar, PosPar))
|
||||
{ // not in domain
|
||||
Standard_Real otherpar = PosPar + PI;
|
||||
if (otherpar > 2*PI) otherpar -= 2*PI;
|
||||
Standard_Real otherpar = PosPar + M_PI;
|
||||
if (otherpar > 2*M_PI) otherpar -= 2*M_PI;
|
||||
if (AIS::InDomain(myFirstPar, myLastPar, otherpar)){
|
||||
PosPar = otherpar;// parameter on circle
|
||||
myEndOfArrow = ElCLib::Value( PosPar, myCircle );
|
||||
}
|
||||
else {
|
||||
Standard_Real Teta1 = Abs( PosPar - myFirstPar ), Teta2 = Abs( PosPar - myLastPar );
|
||||
if (Teta1 > PI)
|
||||
Teta1 = 2.0*PI - Teta1;
|
||||
if (Teta2 > PI)
|
||||
Teta2 = 2.0*PI - Teta2;
|
||||
if (Teta1 > M_PI)
|
||||
Teta1 = 2.0*M_PI - Teta1;
|
||||
if (Teta2 > M_PI)
|
||||
Teta2 = 2.0*M_PI - Teta2;
|
||||
if (Teta1 < Teta2)
|
||||
{
|
||||
if(myFirstLine.Contains(myPosition,Precision::Confusion()))
|
||||
|
@@ -227,7 +227,7 @@ static Standard_Boolean ComputeTangencyPoint(const Handle(Geom_Curve)& GC1,
|
||||
ElCLib::D1(par_inter,ellipse->Elips(),P2,aVector2);
|
||||
}
|
||||
// if ( aVector1.IsParallel(aVector2, 100*Precision::Angular()) ) break;
|
||||
if ( aVector1.IsParallel(aVector2, Standard_PI/360.0) ) break; // 0.5 graduce
|
||||
if ( aVector1.IsParallel(aVector2, M_PI / 360.0) ) break; // 0.5 graduce
|
||||
}
|
||||
}
|
||||
aPoint = PC1;
|
||||
|
Reference in New Issue
Block a user