mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-05 18:16:23 +03:00
0022240: Bad triangulation of transformed shapes
Correction of out transformation for the curves on plane surface. Added test case bugs/vis/bug22240 Modified test cases according to new behavior.
This commit is contained in:
parent
69b43824ac
commit
bdd1223f46
@ -314,28 +314,30 @@ Handle(Geom2d_Curve) BRep_Tool::CurveOnSurface(const TopoDS_Edge& E,
|
||||
GP = Handle(Geom_Plane)::DownCast(S);
|
||||
//fin modif du 21-05-97
|
||||
|
||||
if (!GP.IsNull()) {
|
||||
|
||||
if (!GP.IsNull())
|
||||
{
|
||||
Handle(GeomAdaptor_HCurve) HC;
|
||||
Handle(GeomAdaptor_HSurface) HS;
|
||||
|
||||
HC = new GeomAdaptor_HCurve();
|
||||
HS = new GeomAdaptor_HSurface();
|
||||
|
||||
TopLoc_Location LC;
|
||||
TopLoc_Location aCurveLocation;
|
||||
|
||||
Standard_Real f, l;// for those who call with (u,u).
|
||||
Handle(Geom_Curve) C3d =
|
||||
BRep_Tool::Curve(E,/*LC,*/f,l); // transforming plane instead of curve
|
||||
// we can loose scale factor of Curve transformation (eap 13 May 2002)
|
||||
Handle(Geom_Curve) C3d = BRep_Tool::Curve(E, aCurveLocation, f, l);
|
||||
|
||||
LC = L/*.Predivided(LC)*/;
|
||||
if (C3d.IsNull())
|
||||
{
|
||||
return nullPCurve;
|
||||
}
|
||||
|
||||
if (C3d.IsNull()) return nullPCurve;
|
||||
aCurveLocation = L.Predivided(aCurveLocation);
|
||||
|
||||
Handle(Geom_Plane) Plane = GP;
|
||||
if (!LC.IsIdentity()) {
|
||||
const gp_Trsf& T = LC.Transformation();
|
||||
if (!aCurveLocation.IsIdentity())
|
||||
{
|
||||
const gp_Trsf& T = aCurveLocation.Transformation();
|
||||
Handle(Geom_Geometry) GPT = GP->Transformed(T);
|
||||
Plane = *((Handle(Geom_Plane)*)&GPT);
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ set BugNumber OCC22196
|
||||
|
||||
restore [locate_data_file OCC22196-scaled.brep] result
|
||||
|
||||
set square 147.003
|
||||
set square 148.902
|
||||
|
||||
set nb_v_good 75
|
||||
set nb_e_good 157
|
||||
|
21
tests/bugs/vis/bug22240
Normal file
21
tests/bugs/vis/bug22240
Normal file
@ -0,0 +1,21 @@
|
||||
puts "==========="
|
||||
puts "OCC22240"
|
||||
puts "==========="
|
||||
puts ""
|
||||
############################################
|
||||
# Bad triangulation of transformed shapes
|
||||
############################################
|
||||
|
||||
restore [locate_data_file bug22240_Pump_Nut.brep] a
|
||||
restore [locate_data_file bug22240_Pump_Nut.brep] b
|
||||
bscale b 0 0 0 2.
|
||||
vinit
|
||||
vdisplay a b
|
||||
vsetdispmode a 1
|
||||
vsetdispmode b 1
|
||||
vfit
|
||||
|
||||
checkcolor 320 104 0.78 0.55 0.09
|
||||
|
||||
set only_screen 1
|
||||
|
@ -14,8 +14,8 @@ set ref_data {
|
||||
DATA : Faulties = 0 ( 0 ) Warnings = 0 ( 0 ) Summary = 0 ( 0 )
|
||||
TPSTAT : Faulties = 30 ( 36 ) Warnings = 570 ( 1854 ) Summary = 600 ( 1890 )
|
||||
CHECKSHAPE : Wires = 7 ( 6 ) Faces = 7 ( 6 ) Shells = 0 ( 0 ) Solids = 0 ( 0 )
|
||||
NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 3500 ( 3499 ) Summary = 43166 ( 43109 )
|
||||
STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 3500 ( 3499 ) FreeWire = 0 ( 0 ) FreeEdge = 164 ( 164 ) SharedEdge = 18147 ( 18117 )
|
||||
NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 3500 ( 3499 ) Summary = 43162 ( 43109 )
|
||||
STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 3500 ( 3499 ) FreeWire = 0 ( 0 ) FreeEdge = 164 ( 164 ) SharedEdge = 18145 ( 18117 )
|
||||
TOLERANCE : MaxTol = 0.9816000285 ( 5.284023931 ) AvgTol = 0.02459126458 ( 0.02803193293 )
|
||||
LABELS : N0Labels = 12 ( 30 ) N1Labels = 3661 ( 3666 ) N2Labels = 0 ( 0 ) TotalLabels = 3673 ( 3696 ) NameLabels = 1379 ( 3694 ) ColorLabels = 3661 ( 3662 ) LayerLabels = 0 ( 0 )
|
||||
PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 )
|
||||
|
Loading…
x
Reference in New Issue
Block a user