From ad20683fe42c826ddabc26653c88207fe2081021 Mon Sep 17 00:00:00 2001 From: ink Date: Tue, 30 Dec 2014 10:50:21 +0300 Subject: [PATCH] 0025654: Disable writing pcurves to STEP and IGES by default Changed default value of write.surfacecurve.mode to 0. Added SplitClosedFaces to XSTEPResource/STEP. This is necessary for correct display of closed surfaces (such as a torus) in applications such as ProEngineer, SolidWorks, Rhinoceros. Tests changed in connection with changing tolerance. In test bugs/iges/bug23018 enabled writing pcurves. --- src/Interface/Interface_StaticStandards.cxx | 2 +- tests/bugs/iges/bug23018 | 1 + tests/bugs/xde/bug9490 | 2 +- tests/bugs/xde/bug9531 | 2 +- tests/xcaf/end | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Interface/Interface_StaticStandards.cxx b/src/Interface/Interface_StaticStandards.cxx index 3229e183c9..606e87162c 100644 --- a/src/Interface/Interface_StaticStandards.cxx +++ b/src/Interface/Interface_StaticStandards.cxx @@ -82,7 +82,7 @@ void Interface_Static::Standards () Interface_Static::Init("XSTEP" ,"write.surfacecurve.mode", '&',"eval Off"); Interface_Static::Init("XSTEP" ,"write.surfacecurve.mode", '&',"eval On"); // Interface_Static::Init("XSTEP" ,"write.surfacecurve.mode", '&',"eval NoAnalytic"); - Interface_Static::SetIVal ("write.surfacecurve.mode",1); + Interface_Static::SetIVal ("write.surfacecurve.mode",0); // lastpreci : pour recuperer la derniere valeur codee (cf XSControl) // (0 pour dire : pas codee) diff --git a/tests/bugs/iges/bug23018 b/tests/bugs/iges/bug23018 index 1e11bf375d..4d241fbe29 100644 --- a/tests/bugs/iges/bug23018 +++ b/tests/bugs/iges/bug23018 @@ -7,6 +7,7 @@ puts "" ####################################### restore [locate_data_file bug23018_f-ext.brep] f +param write.surfacecurve.mode 1 brepiges f ${imagedir}/bug23018_f-ext.igs set info [entity 6] regexp {Starting +Point +: +\x28([-0-9.+eE]+),([-0-9.+eE]+),([-0-9.+eE]+)\x29} ${info} full x1 y1 z1 diff --git a/tests/bugs/xde/bug9490 b/tests/bugs/xde/bug9490 index 98dcde0142..d2b07ca1bf 100755 --- a/tests/bugs/xde/bug9490 +++ b/tests/bugs/xde/bug9490 @@ -33,7 +33,7 @@ if { ${IsOk} == 1} { set Tol1 [lindex [split [tolerance OCC9490a] ${aTokList}] 2] set Tol2 [lindex [split [tolerance OCC9490b] ${aTokList}] 2] set percent_max 0.1 - set Tolerance_percent [GetPercent ${Tol1} ${Tol2}] + set Tolerance_percent [expr abs( ${Tol2})-abs(${Tol1})/abs(${Tol1})*100.] puts "Tolerance_percent = ${Tolerance_percent} %" if { ${Tolerance_percent} > ${percent_max} } { set IsOk 0 diff --git a/tests/bugs/xde/bug9531 b/tests/bugs/xde/bug9531 index d6468d9096..67214b44fd 100755 --- a/tests/bugs/xde/bug9531 +++ b/tests/bugs/xde/bug9531 @@ -35,7 +35,7 @@ if { ${IsOk} == 1} { set Tol1 [lindex [split [tolerance OCC9531a] ${aTokList}] 2] set Tol2 [lindex [split [tolerance OCC9531b] ${aTokList}] 2] set percent_max 0.1 - set Tolerance_percent [GetPercent ${Tol1} ${Tol2}] + set Tolerance_percent [expr abs( ${Tol2})-abs(${Tol1})/abs(${Tol1})*100.] puts "Tolerance_percent = ${Tolerance_percent} %" if { ${Tolerance_percent} > ${percent_max} } { set IsOk 0 diff --git a/tests/xcaf/end b/tests/xcaf/end index 78aebe90ae..e55772d6ba 100644 --- a/tests/xcaf/end +++ b/tests/xcaf/end @@ -598,7 +598,7 @@ if {[regexp "VOLUME_EXACTLY" $CompareDocumentsMode] || [regexp "ALL" $CompareDoc # Perform sewing of resulting shape. If amount of closed shells of resulting shape is not equal to amount of # closed shells of initial shape increace tolerance and perform sewing again set nbClosedShells_Second 0 - set toler 0.00001 + set toler 0.005 set IsSewingPerformedCorrectly 0 XGetOneShape Shape_Second D_Second for {set k 0} {$k < 5} {incr k} { -- 2.39.5