mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
16aa247f86 | ||
|
180044d16d |
@@ -150,6 +150,7 @@ static Standard_Boolean Connect (const Handle(ShapeAnalysis_Wire)& theSAW,
|
||||
const Standard_Integer number,
|
||||
Handle(ShapeExtend_WireData)& Gsewd)
|
||||
{
|
||||
(void)number;
|
||||
Gsewd = new ShapeExtend_WireData;//local translation (for mysewd)
|
||||
Handle(ShapeExtend_WireData) Gsewd3d = new ShapeExtend_WireData;//local translation (for mysewd3d)
|
||||
Handle(ShapeExtend_WireData) Gsewd2d = new ShapeExtend_WireData;//local translation (for mysewd2d)
|
||||
@@ -384,17 +385,31 @@ static Standard_Boolean Connect (const Handle(ShapeAnalysis_Wire)& theSAW,
|
||||
}
|
||||
}
|
||||
|
||||
if (number > 1) {
|
||||
okCurve = okCurve && Connect (saw, mysewd, Gsewd, (len3d > 1) || (len2d > 1), maxtol,
|
||||
distmin, revsewd, revnextsewd);
|
||||
if (!mysewd.IsNull())
|
||||
{
|
||||
okCurve = okCurve && Connect(saw, mysewd, Gsewd, (len3d > 1) || (len2d > 1), maxtol,
|
||||
distmin, revsewd, revnextsewd);
|
||||
}
|
||||
else
|
||||
{
|
||||
mysewd = Gsewd;
|
||||
}
|
||||
if (!mysewd3d.IsNull())
|
||||
{
|
||||
okCurve3d = okCurve3d && Connect (saw3d, mysewd3d, Gsewd3d, len3d > 1, maxtol,
|
||||
distmin, revsewd, revnextsewd);
|
||||
}
|
||||
else
|
||||
{
|
||||
mysewd3d = Gsewd3d;
|
||||
}
|
||||
if (!mysewd2d.IsNull())
|
||||
{
|
||||
okCurve2d = okCurve2d && Connect (saw2d, mysewd2d, Gsewd2d, len2d > 1, maxtol,
|
||||
distmin, revsewd, revnextsewd);
|
||||
}
|
||||
else {
|
||||
mysewd = Gsewd;
|
||||
mysewd3d = Gsewd3d;
|
||||
else
|
||||
{
|
||||
mysewd2d = Gsewd2d;
|
||||
}
|
||||
return okCurve;
|
||||
|
@@ -395,7 +395,7 @@ TopoDS_Shape IGESToBRep_BRepEntity::TransferLoop(const Handle(IGESSolid_Loop)& s
|
||||
Curves2d->SetValue (i, start->ParametricCurve(iedge,i));
|
||||
}
|
||||
Handle(ShapeExtend_WireData) lsewd;//result of translation of current edge
|
||||
Result = Result & IB->Transfer (okCurve, okCurve3d, okCurve2d,
|
||||
Result = Result && IB->Transfer (okCurve, okCurve3d, okCurve2d,
|
||||
curve3d, Curves2d, !orientation,
|
||||
iedge, lsewd);
|
||||
if (iedge == 1) sewd = IB->WireData();//initialization
|
||||
|
@@ -343,7 +343,7 @@ Handle(Geom_Curve) IGESToBRep_BasicCurve::TransferConicArc
|
||||
//The dimensions should be also obliged:
|
||||
//[a]=[b]=[c]=L^-2
|
||||
//if ( (Abs(a-c) <= GetEpsGeom()) && (Abs(b) < GetEpsCoeff()))
|
||||
Standard_Real eps2 = Precision::PConfusion() * Precision::PConfusion();
|
||||
Standard_Real eps2 = (Precision::PConfusion() * Precision::PConfusion()) / GetUnitFactor();
|
||||
if ( (Abs(a-c) <= eps2) && (Abs(b) < eps2)) {
|
||||
|
||||
// =================
|
||||
@@ -358,8 +358,8 @@ Handle(Geom_Curve) IGESToBRep_BasicCurve::TransferConicArc
|
||||
|
||||
t1 = ElCLib::Parameter(circ, startPoint);
|
||||
t2 = ElCLib::Parameter(circ, endPoint);
|
||||
if (t1 > t2 && (t1 - t2) > Precision::Confusion()) t2 += 2.*M_PI;
|
||||
if (Abs(t1 - t2) <= Precision::Confusion()) { // t1 = t2
|
||||
if (t1 > t2 && (t1 - t2) > Precision::Confusion() / GetUnitFactor()) t2 += 2.*M_PI;
|
||||
if (Abs(t1 - t2) <= Precision::Confusion() / GetUnitFactor()) { // t1 = t2
|
||||
Message_Msg msg1160("IGES_1160");
|
||||
SendWarning(st, msg1160);
|
||||
}
|
||||
@@ -1249,7 +1249,7 @@ Handle(Geom_Curve) IGESToBRep_BasicCurve::TransferLine
|
||||
|
||||
// modif du 15/10/97 : test moins severe
|
||||
// beaucoup de points confondus a GetEpsGeom()*GetUnitFactor()
|
||||
if (!Ps.IsEqual(Pe,Precision::Confusion())) { //:l3 abv 11 Jan 99: GetEpsGeom()*GetUnitFactor()/10.)) {
|
||||
if (!Ps.IsEqual(Pe,Precision::Confusion() / GetUnitFactor())) { //:l3 abv 11 Jan 99: GetEpsGeom()*GetUnitFactor()/10.)) {
|
||||
gp_Lin line(Ps, gp_Dir(gp_Vec(Ps,Pe)));
|
||||
Standard_Real t1 = ElCLib::Parameter(line, Ps);
|
||||
Standard_Real t2 = ElCLib::Parameter(line, Pe);
|
||||
@@ -1299,7 +1299,7 @@ Handle(Geom2d_Curve) IGESToBRep_BasicCurve::Transfer2dLine
|
||||
start->EndPoint().Y());
|
||||
}
|
||||
|
||||
if (!beg.IsEqual(end,Precision::PConfusion())) { //:l3 abv 11 Jan 99: GetEpsCoeff())) {
|
||||
if (!beg.IsEqual(end,Precision::PConfusion() / GetUnitFactor())) { //:l3 abv 11 Jan 99: GetEpsCoeff())) {
|
||||
gp_Lin2d line2d(beg, gp_Dir2d(gp_Vec2d(beg,end)));
|
||||
Standard_Real t1 = ElCLib::Parameter(line2d, beg);
|
||||
Standard_Real t2 = ElCLib::Parameter(line2d, end);
|
||||
|
@@ -312,7 +312,7 @@ Handle(Geom_CylindricalSurface) IGESToBRep_BasicSurface::TransferRigthCylindrica
|
||||
// Direction Reading Error : Null IGESEntity
|
||||
return res;
|
||||
}
|
||||
if (radius < Precision::Confusion()) {
|
||||
if (radius < Precision::Confusion() / GetUnitFactor()) {
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -374,7 +374,7 @@ Handle(Geom_ConicalSurface) IGESToBRep_BasicSurface::TransferRigthConicalSurface
|
||||
if (radius < 0) {
|
||||
return res;
|
||||
}
|
||||
if (radius < Precision::Confusion())
|
||||
if (radius < Precision::Confusion() / GetUnitFactor())
|
||||
radius = 0.;
|
||||
|
||||
gp_Pnt Pt = Point->Value();
|
||||
@@ -427,7 +427,7 @@ Handle(Geom_SphericalSurface) IGESToBRep_BasicSurface::TransferSphericalSurface
|
||||
// Direction Reading Error : Null IGESEntity
|
||||
return res;
|
||||
}
|
||||
if (radius < Precision::Confusion()){
|
||||
if (radius < Precision::Confusion() / GetUnitFactor()){
|
||||
|
||||
return res;
|
||||
}
|
||||
@@ -483,7 +483,7 @@ Handle(Geom_ToroidalSurface) IGESToBRep_BasicSurface::TransferToroidalSurface
|
||||
// Direction Reading Error : Null IGESEntity
|
||||
return res;
|
||||
}
|
||||
if (major < Precision::Confusion()||minor < Precision::Confusion()){
|
||||
if (major < Precision::Confusion() / GetUnitFactor() || minor < Precision::Confusion() / GetUnitFactor()){
|
||||
|
||||
return res;
|
||||
}
|
||||
|
@@ -1330,7 +1330,7 @@ TopoDS_Shape IGESToBRep_TopoCurve::TransferBoundaryOnFace(TopoDS_Face& face,
|
||||
}
|
||||
else
|
||||
Curves2d = start->ParameterCurves(i);
|
||||
Result = Result & IB->Transfer (okCurve, okCurve3d, okCurve2d,
|
||||
Result = Result && IB->Transfer (okCurve, okCurve3d, okCurve2d,
|
||||
start->ModelSpaceCurve(i), start->Sense(i) == 2,
|
||||
Curves2d, i);
|
||||
}
|
||||
|
Reference in New Issue
Block a user