mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-16 10:08:36 +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:
parent
bfff00a894
commit
a9da59ffb6
@ -445,17 +445,10 @@ Handle(IGESData_IGESEntity) BRepToIGES_BRWire ::TransferEdge (const TopoDS_Edge&
|
|||||||
// trans.SetScale(gp_Pnt2d(0,0),1./Vlast);
|
// trans.SetScale(gp_Pnt2d(0,0),1./Vlast);
|
||||||
|
|
||||||
Standard_Real du = 1.;
|
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;
|
Standard_Real us1,us2,vs1,vs2;
|
||||||
|
//scaling parameterization to [0,1]
|
||||||
Surf->Bounds(us1,us2,vs1,vs2);
|
Surf->Bounds(us1,us2,vs1,vs2);
|
||||||
du = us2-us1;
|
du = us2-us1;
|
||||||
}
|
|
||||||
}
|
|
||||||
//emv: changed for bug OCC22126 17.12.2010
|
//emv: changed for bug OCC22126 17.12.2010
|
||||||
uFact = (Vlast - Vfirst)/du;
|
uFact = (Vlast - Vfirst)/du;
|
||||||
//uFact = aDiv/du;
|
//uFact = aDiv/du;
|
||||||
@ -475,7 +468,11 @@ Handle(IGESData_IGESEntity) BRepToIGES_BRWire ::TransferEdge (const TopoDS_Edge&
|
|||||||
if(Surf->IsKind(STANDARD_TYPE(Geom_SurfaceOfLinearExtrusion))) {
|
if(Surf->IsKind(STANDARD_TYPE(Geom_SurfaceOfLinearExtrusion))) {
|
||||||
//emv: changed for bug OCC22126 17.12.2010
|
//emv: changed for bug OCC22126 17.12.2010
|
||||||
gp_Trsf2d trans1;
|
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);
|
Curve2d = sbe.TransformPCurve(Curve2d,trans1,1.,First,Last);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -899,16 +899,6 @@ TopoDS_Shape IGESToBRep_TopoSurface::TransferTabulatedCylinder
|
|||||||
try {
|
try {
|
||||||
OCC_CATCH_SIGNALS
|
OCC_CATCH_SIGNALS
|
||||||
if (extractCurve3d(directrix, aBasisCurve)) {
|
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);
|
gp_Vec dir (pt1, pt2);
|
||||||
Handle(Geom_Surface) aResultSurf =
|
Handle(Geom_Surface) aResultSurf =
|
||||||
new Geom_SurfaceOfLinearExtrusion(aBasisCurve, dir);
|
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(IGESGeom_TabulatedCylinder) igtc = Handle(IGESGeom_TabulatedCylinder)::DownCast(isrf);
|
||||||
Handle(IGESData_IGESEntity) idie = igtc->Directrix();
|
Handle(IGESData_IGESEntity) idie = igtc->Directrix();
|
||||||
Standard_Real uln=1;
|
Standard_Real uln=1;
|
||||||
if(idie->TypeNumber()==110) {
|
Standard_Real Umin,Umax,Vmin,Vmax;
|
||||||
Handle(IGESGeom_Line) igl = Handle(IGESGeom_Line)::DownCast(idie);
|
//scaling parameterization from [0,1]
|
||||||
gp_Pnt SP = igl->StartPoint();
|
Surf->Bounds(Umin,Umax,Vmin,Vmax);
|
||||||
gp_Pnt EP = igl->EndPoint();
|
uln = Abs(Umax-Umin);
|
||||||
// PTV OCC659
|
//computing shift of pcurves
|
||||||
// PTV file D44-11325-6.igs. Faces with parametric curves need * GetUnitFactor();
|
|
||||||
uln=SP.Distance(EP) * GetUnitFactor();
|
|
||||||
}
|
|
||||||
uscale = uln/cscale;
|
uscale = uln/cscale;
|
||||||
|
paramu = Umin/uln;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isrf->IsKind(STANDARD_TYPE(IGESSolid_CylindricalSurface))||
|
if (isrf->IsKind(STANDARD_TYPE(IGESSolid_CylindricalSurface))||
|
||||||
|
45
tests/bugs/iges/bug22715_1
Executable file
45
tests/bugs/iges/bug22715_1
Executable file
@ -0,0 +1,45 @@
|
|||||||
|
puts "============"
|
||||||
|
puts "OCC22715"
|
||||||
|
puts "============"
|
||||||
|
puts ""
|
||||||
|
#######################################################################
|
||||||
|
# Incorrect faces of the filleted cube after import from iges file
|
||||||
|
#######################################################################
|
||||||
|
|
||||||
|
readstep [locate_data_file bug22715_cube.stp] s1 *
|
||||||
|
puts [whatis s1]
|
||||||
|
explode s1 F
|
||||||
|
|
||||||
|
checkshape s1_1
|
||||||
|
checkshape s1_2
|
||||||
|
checkshape s1_3
|
||||||
|
checkshape s1_4
|
||||||
|
checkshape s1_5
|
||||||
|
checkshape s1_6
|
||||||
|
checkshape s1_7
|
||||||
|
checkshape s1_8
|
||||||
|
checkshape s1_9
|
||||||
|
checkshape s1_10
|
||||||
|
checkshape s1_12
|
||||||
|
checkshape s1_13
|
||||||
|
checkshape s1_14
|
||||||
|
checkshape s1_15
|
||||||
|
checkshape s1_16
|
||||||
|
checkshape s1_17
|
||||||
|
checkshape s1_18
|
||||||
|
checkshape s1_19
|
||||||
|
checkshape s1_20
|
||||||
|
checkshape s1_21
|
||||||
|
checkshape s1_22
|
||||||
|
checkshape s1_23
|
||||||
|
checkshape s1_24
|
||||||
|
checkshape s1_25
|
||||||
|
checkshape s1_26
|
||||||
|
|
||||||
|
renamevar s1 result
|
||||||
|
|
||||||
|
set check_square 1
|
||||||
|
|
||||||
|
set square 49245
|
||||||
|
|
||||||
|
set 3dviewer 1
|
46
tests/bugs/iges/bug22715_2
Executable file
46
tests/bugs/iges/bug22715_2
Executable file
@ -0,0 +1,46 @@
|
|||||||
|
puts "============"
|
||||||
|
puts "OCC22715"
|
||||||
|
puts "============"
|
||||||
|
puts ""
|
||||||
|
#######################################################################
|
||||||
|
# Incorrect faces of the filleted cube after import from iges file
|
||||||
|
#######################################################################
|
||||||
|
|
||||||
|
igesbrep [locate_data_file bug22715_cube.igs] s2 *
|
||||||
|
puts [whatis s2]
|
||||||
|
explode s2 F
|
||||||
|
explode s2
|
||||||
|
|
||||||
|
checkshape s2_1
|
||||||
|
checkshape s2_2
|
||||||
|
checkshape s2_3
|
||||||
|
checkshape s2_4
|
||||||
|
checkshape s2_5
|
||||||
|
checkshape s2_6
|
||||||
|
checkshape s2_7
|
||||||
|
checkshape s2_8
|
||||||
|
checkshape s2_9
|
||||||
|
checkshape s2_10
|
||||||
|
checkshape s2_12
|
||||||
|
checkshape s2_13
|
||||||
|
checkshape s2_14
|
||||||
|
checkshape s2_15
|
||||||
|
checkshape s2_16
|
||||||
|
checkshape s2_17
|
||||||
|
checkshape s2_18
|
||||||
|
checkshape s2_19
|
||||||
|
checkshape s2_20
|
||||||
|
checkshape s2_21
|
||||||
|
checkshape s2_22
|
||||||
|
checkshape s2_23
|
||||||
|
checkshape s2_24
|
||||||
|
checkshape s2_25
|
||||||
|
checkshape s2_26
|
||||||
|
|
||||||
|
renamevar s2 result
|
||||||
|
|
||||||
|
set check_square 1
|
||||||
|
|
||||||
|
set square 49245
|
||||||
|
|
||||||
|
set 3dviewer 1
|
Loading…
x
Reference in New Issue
Block a user