mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0022715: Incorrect faces of the filleted cube after import from iges file
Writing and reading tabulated cylinders in IGES were changed in accordance of Type 122 (parametrization [0,1]x[0,1] some cosmetic changes Adding test cases for this fix
This commit is contained in:
@@ -445,17 +445,10 @@ Handle(IGESData_IGESEntity) BRepToIGES_BRWire ::TransferEdge (const TopoDS_Edge&
|
||||
// trans.SetScale(gp_Pnt2d(0,0),1./Vlast);
|
||||
|
||||
Standard_Real du = 1.;
|
||||
Handle(Geom_SurfaceOfLinearExtrusion) LE =
|
||||
Handle(Geom_SurfaceOfLinearExtrusion)::DownCast(Surf);
|
||||
if(LE->BasisCurve()->IsKind(STANDARD_TYPE(Geom_TrimmedCurve))) {
|
||||
Handle(Geom_TrimmedCurve) tc =
|
||||
Handle(Geom_TrimmedCurve)::DownCast(LE->BasisCurve());
|
||||
if(tc->BasisCurve()->IsKind(STANDARD_TYPE(Geom_Line))) {
|
||||
Standard_Real us1,us2,vs1,vs2;
|
||||
Surf->Bounds(us1,us2,vs1,vs2);
|
||||
du = us2-us1;
|
||||
}
|
||||
}
|
||||
Standard_Real us1,us2,vs1,vs2;
|
||||
//scaling parameterization to [0,1]
|
||||
Surf->Bounds(us1,us2,vs1,vs2);
|
||||
du = us2-us1;
|
||||
//emv: changed for bug OCC22126 17.12.2010
|
||||
uFact = (Vlast - Vfirst)/du;
|
||||
//uFact = aDiv/du;
|
||||
@@ -475,7 +468,11 @@ Handle(IGESData_IGESEntity) BRepToIGES_BRWire ::TransferEdge (const TopoDS_Edge&
|
||||
if(Surf->IsKind(STANDARD_TYPE(Geom_SurfaceOfLinearExtrusion))) {
|
||||
//emv: changed for bug OCC22126 17.12.2010
|
||||
gp_Trsf2d trans1;
|
||||
trans1.SetTranslation(gp_Vec2d(0.,-Vfirst/(Vlast-Vfirst)));
|
||||
Standard_Real us1,us2,vs1,vs2,du;
|
||||
//computing shift of pcurves
|
||||
Surf->Bounds(us1,us2,vs1,vs2);
|
||||
du = us2-us1;
|
||||
trans1.SetTranslation(gp_Vec2d(-us1/du,-Vfirst/(Vlast-Vfirst)));
|
||||
Curve2d = sbe.TransformPCurve(Curve2d,trans1,1.,First,Last);
|
||||
}
|
||||
|
||||
|
@@ -899,16 +899,6 @@ TopoDS_Shape IGESToBRep_TopoSurface::TransferTabulatedCylinder
|
||||
try {
|
||||
OCC_CATCH_SIGNALS
|
||||
if (extractCurve3d(directrix, aBasisCurve)) {
|
||||
// PTV 29.08.2002 OCC663 file D44-11325-6.igs, entity 4640
|
||||
if (igesDirectrix->IsKind(STANDARD_TYPE(IGESGeom_ConicArc))) {
|
||||
// PTV 30.08.2002 remove regression on xloop k1.brep in face and brep mode.
|
||||
Standard_Real tmpF, tmpL, tmpToler;
|
||||
tmpF = aBasisCurve->FirstParameter();
|
||||
tmpL = aBasisCurve->LastParameter();
|
||||
tmpToler = Precision::PConfusion();
|
||||
if ( (fabs(tmpF) >= tmpToler) && (fabs(tmpL - 2*M_PI) >= tmpToler) )
|
||||
reparamBSpline (aBasisCurve, tmpF, tmpL);
|
||||
}
|
||||
gp_Vec dir (pt1, pt2);
|
||||
Handle(Geom_Surface) aResultSurf =
|
||||
new Geom_SurfaceOfLinearExtrusion(aBasisCurve, dir);
|
||||
@@ -1804,15 +1794,13 @@ TopoDS_Shape IGESToBRep_TopoSurface::ParamSurface(const Handle(IGESData_IGESEnti
|
||||
Handle(IGESGeom_TabulatedCylinder) igtc = Handle(IGESGeom_TabulatedCylinder)::DownCast(isrf);
|
||||
Handle(IGESData_IGESEntity) idie = igtc->Directrix();
|
||||
Standard_Real uln=1;
|
||||
if(idie->TypeNumber()==110) {
|
||||
Handle(IGESGeom_Line) igl = Handle(IGESGeom_Line)::DownCast(idie);
|
||||
gp_Pnt SP = igl->StartPoint();
|
||||
gp_Pnt EP = igl->EndPoint();
|
||||
// PTV OCC659
|
||||
// PTV file D44-11325-6.igs. Faces with parametric curves need * GetUnitFactor();
|
||||
uln=SP.Distance(EP) * GetUnitFactor();
|
||||
}
|
||||
Standard_Real Umin,Umax,Vmin,Vmax;
|
||||
//scaling parameterization from [0,1]
|
||||
Surf->Bounds(Umin,Umax,Vmin,Vmax);
|
||||
uln = Abs(Umax-Umin);
|
||||
//computing shift of pcurves
|
||||
uscale = uln/cscale;
|
||||
paramu = Umin/uln;
|
||||
}
|
||||
|
||||
if (isrf->IsKind(STANDARD_TYPE(IGESSolid_CylindricalSurface))||
|
||||
|
Reference in New Issue
Block a user