From d75bc8e5b129bc5d0e6aea3c34f12e7439e76d51 Mon Sep 17 00:00:00 2001 From: isn Date: Fri, 16 Oct 2015 14:55:15 +0300 Subject: [PATCH] test_merge_faces() // boxes --- src/HYDRO_tests/reference_data/cs11.png | Bin 0 -> 3716 bytes src/HYDRO_tests/reference_data/cs12.png | Bin 0 -> 3437 bytes src/HYDRO_tests/reference_data/cs13.png | Bin 0 -> 3288 bytes src/HYDRO_tests/reference_data/cs14.png | Bin 0 -> 3278 bytes src/HYDRO_tests/reference_data/cs21.png | Bin 0 -> 3716 bytes src/HYDRO_tests/reference_data/cs22.png | Bin 0 -> 3437 bytes src/HYDRO_tests/reference_data/cs23.png | Bin 0 -> 3288 bytes src/HYDRO_tests/reference_data/cs24.png | Bin 0 -> 3278 bytes src/HYDRO_tests/reference_data/pp1.brep | 86 ++++++++++++++++ src/HYDRO_tests/reference_data/pp2.brep | 86 ++++++++++++++++ src/HYDRO_tests/reference_data/pp3.brep | 86 ++++++++++++++++ src/HYDRO_tests/reference_data/pp4.brep | 86 ++++++++++++++++ .../test_HYDROData_LandCoverMap.cxx | 96 ++++++++++++++++++ 13 files changed, 440 insertions(+) create mode 100644 src/HYDRO_tests/reference_data/cs11.png create mode 100644 src/HYDRO_tests/reference_data/cs12.png create mode 100644 src/HYDRO_tests/reference_data/cs13.png create mode 100644 src/HYDRO_tests/reference_data/cs14.png create mode 100644 src/HYDRO_tests/reference_data/cs21.png create mode 100644 src/HYDRO_tests/reference_data/cs22.png create mode 100644 src/HYDRO_tests/reference_data/cs23.png create mode 100644 src/HYDRO_tests/reference_data/cs24.png create mode 100644 src/HYDRO_tests/reference_data/pp1.brep create mode 100644 src/HYDRO_tests/reference_data/pp2.brep create mode 100644 src/HYDRO_tests/reference_data/pp3.brep create mode 100644 src/HYDRO_tests/reference_data/pp4.brep diff --git a/src/HYDRO_tests/reference_data/cs11.png b/src/HYDRO_tests/reference_data/cs11.png new file mode 100644 index 0000000000000000000000000000000000000000..748b4ba6804266b36a819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08uz8L zCraTPYcWiwOTspyI~E?W4%75wM@UaQR=2pix{Cdo(36#g->>F(u7(8TIW;gDB5_F} z4}R!Y@;S@A`;VzBSXQ!>g`hnX(266x51&$TXN0rbf|D2|opWUUFa-oHl+y~&_?oXN l{k@r5yJ1++|ABN_E5#0^Nv)yhH-UcLequa6j<@S*#h?5-KhFRF literal 0 HcmV?d00001 diff --git a/src/HYDRO_tests/reference_data/cs12.png b/src/HYDRO_tests/reference_data/cs12.png new file mode 100644 index 0000000000000000000000000000000000000000..57c99a942c01bec931e876032b625ba494c35aec GIT binary patch literal 3437 zcmeH}X;2eJ6o5BC1+k*7$5_OHPNo7CL-S+Xh={50H$^Tn1owwf-@$rf9Rny%L)vQvVc-xk#rr7H>ZchW&vQ; zv(XS`2dwtO#oI!Ijz;Ctl;XscGVQ)zwIsj2YVVHy$xkeu+ma8P@mkq+L-FqQJwu(> z?q<7Q|HRT1eNO%%X7Xvh;!IK_vEF=*PkrU>7)bt9eEjIXzWGfr?nnE^qaB+QcCKLS z@I+xCE{3L~In69}`V9W0Dxl0vtA5WPSfs&_jq?8^Fnh3=wXi&3S|P(YnZ+!lbg$HL zC^rz6u?|E+{-A9W#@P&jS(FLvuYY6*K)?-v0N{+71pwQT0RT|L#XT3ji^9 zFm))sNTFntwJ0BVcg;!qs3`zWnfBOPQC1fpfX9;$?hJ2nXe`Asq6@nT{naF;ghT07 zsZ>dH{yWo|ff{nYc3ynmmu&?={T3TkK?iI2JPdOB)X3ZiP>YXIVeeXuaXBp?ZIO(% zpBsMMnJusF$dqzzS&5u=HFQVvVIPE6?}U0)Ru++aX)~;{6)`L05gU~i?_k*3oLJf^ zQ>&a|AwHr0_-<`;SOfhlE~#)UJWA)6M*^%5SU1Yr=ZNjJgr1%?G~q_riEl@fqYB^-4>LTy{&fv6&p9(2haSH~_Y9&V;{uDjB)9XZ%XGV`KZ+F^WLsztr$N7NHJl$S7(r{qvEHQui5}i_XRy*i1A9 z@0q6c_syLz$l;YcbE<{o9T`)%2yNazhYx4IPLse~O3$6-n7;Wd^1KT(UZ<2sMq(2k zq;qekk}0|w+ff!JrI55hE5T7#<~WHIHLEgT+cwDEmL^Imjo?ao6_Sn|<;%J+NaJe( zUE=ln(un=`_791I)(Lxi3~g5U+l4WPb{Y@=b%x@x1dmF8bCQl5#i;I(H|SfNxZin_ z$~mLi-e2>j{mZM+YWlXRy`l~IddT2Txm|iG{^CCg{C>5{FkwqTXy*Ie47)ZwhaSfS JF#}Iu{u@Fh&6EHD literal 0 HcmV?d00001 diff --git a/src/HYDRO_tests/reference_data/cs13.png b/src/HYDRO_tests/reference_data/cs13.png new file mode 100644 index 0000000000000000000000000000000000000000..36ed14260e659ded32611f1d572add94902133f6 GIT binary patch literal 3288 zcmeH~X;2eJ6vvkUmP5dH3Roya$0-yTQCiRfrXodua zD_7K}U?>DZ3`aRE=MV^2V~P+HU?8NC5C|kfu5SCm&;8KObf&zSy?1us{&wg6XY;=D z^)k>i(*pn)c%Sh=1E6^T0K{3HJ+KGi@QV@_S_$sn{yNZ7bs}SpHA`91|Ii_<%fN+4~Q~qj}&6X)fpFm?RE-ns9S7&8sTV_(#x0n!{$vrBT6@yEW z$XYUVmE!rnSw0?D&mzW2Rn@4J^k#zaMb0wb5&-d-%ZBk!MvR?cHJ+?k^OVL+ak=U~DwQe_2>f!gvvJO8 zJDaL@Cd3;}5?@Z1u_+}}(MHNkm({=ed0o@)?<*XfnM7Oh zHlvQ@b}O${9E;i+8&&OW35^^p#wLr4i@%@~jiLJud1}MqyMB$I_oQy4d}@EJb_pE8 zED1i!P|1)l8q>m}V%92|*bM1R23@^Xb8nj`8E24aA@~yX$Uwd+w>y4mq~=)kTykh9 zNA*Jq+REDcc*8}yh(AH>CYTF7R2 z5kd^vgxl8XDCkUZBF{knTE|)3upB{+d`mrJ0CeI!U9SWsm#j)7ZsK=QJ)5!w9PiSFP-2DQTihCt3QUXi+C`)`Zn#|h zZNr#NUgU3PLBvVh(MNb4BJxp|&rMSWT7&8A_ft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-UI;3rnCWKD+b#^u-y!{ThaC+{O?}FH{lik za!&?csZwwe8@c8I+|;A_DrG|@19{o+)NM|0^PB?M^z^#@A%c}O4p4{31qRRKjx=J z@|03PNO!g`^arv?H9Bv&_)}!9&K~wJcbCCn*iDJ(XFSoo@r7Eb=*+Pg^}-I_<0Krz zqL*9Sph-<~DdF#+uiVfeW)snnHDv_xR-_*5)ai%oYwu?$e0%G2&mjpzO&oZj zVMac88@g9T+`M5zzqII zzF9qGn46nx9OCR)GN(x=ZXFvCdU|>yF+%ZI(psM?f85&hG^qms9|Y8|4pa1pZuY6> z%Y0*sNhRUS{g(m-jd-qcPq-`0a9k+jV&gTs@%7l0AWMc+h)OiZTqG<5m*}l1CkAC9 zcx-TYC1Uzk&Pc;?d>w|GAGrkp3f~-q(vWt9nP(pI5uX#NW24V!Q!(1^PFJkFVMcKz zlY#Sz$}_KIM|g8TE_!vF&1U!2QI+gU^hpSEL18z4hDO0`l(e>nEeWJPsdS?J$FjD< z+*djtG5T~smWa`Fe&)WGVs6w@#-ov`Tn(dmerok)%ON4%G_`g@I9*(jmzO7pC|q(c z^?=woRa+7LekIK@WND;7fx7sDD|44{C0qGMJ#MXFBt@?HwN(EW_qe&&$2zh08uz8L zCraTPYcWiwOTspyI~E?W4%75wM@UaQR=2pix{Cdo(36#g->>F(u7(8TIW;gDB5_F} z4}R!Y@;S@A`;VzBSXQ!>g`hnX(266x51&$TXN0rbf|D2|opWUUFa-oHl+y~&_?oXN l{k@r5yJ1++|ABN_E5#0^Nv)yhH-UcLequa6j<@S*#h?5-KhFRF literal 0 HcmV?d00001 diff --git a/src/HYDRO_tests/reference_data/cs22.png b/src/HYDRO_tests/reference_data/cs22.png new file mode 100644 index 0000000000000000000000000000000000000000..57c99a942c01bec931e876032b625ba494c35aec GIT binary patch literal 3437 zcmeH}X;2eJ6o5BC1+k*7$5_OHPNo7CL-S+Xh={50H$^Tn1owwf-@$rf9Rny%L)vQvVc-xk#rr7H>ZchW&vQ; zv(XS`2dwtO#oI!Ijz;Ctl;XscGVQ)zwIsj2YVVHy$xkeu+ma8P@mkq+L-FqQJwu(> z?q<7Q|HRT1eNO%%X7Xvh;!IK_vEF=*PkrU>7)bt9eEjIXzWGfr?nnE^qaB+QcCKLS z@I+xCE{3L~In69}`V9W0Dxl0vtA5WPSfs&_jq?8^Fnh3=wXi&3S|P(YnZ+!lbg$HL zC^rz6u?|E+{-A9W#@P&jS(FLvuYY6*K)?-v0N{+71pwQT0RT|L#XT3ji^9 zFm))sNTFntwJ0BVcg;!qs3`zWnfBOPQC1fpfX9;$?hJ2nXe`Asq6@nT{naF;ghT07 zsZ>dH{yWo|ff{nYc3ynmmu&?={T3TkK?iI2JPdOB)X3ZiP>YXIVeeXuaXBp?ZIO(% zpBsMMnJusF$dqzzS&5u=HFQVvVIPE6?}U0)Ru++aX)~;{6)`L05gU~i?_k*3oLJf^ zQ>&a|AwHr0_-<`;SOfhlE~#)UJWA)6M*^%5SU1Yr=ZNjJgr1%?G~q_riEl@fqYB^-4>LTy{&fv6&p9(2haSH~_Y9&V;{uDjB)9XZ%XGV`KZ+F^WLsztr$N7NHJl$S7(r{qvEHQui5}i_XRy*i1A9 z@0q6c_syLz$l;YcbE<{o9T`)%2yNazhYx4IPLse~O3$6-n7;Wd^1KT(UZ<2sMq(2k zq;qekk}0|w+ff!JrI55hE5T7#<~WHIHLEgT+cwDEmL^Imjo?ao6_Sn|<;%J+NaJe( zUE=ln(un=`_791I)(Lxi3~g5U+l4WPb{Y@=b%x@x1dmF8bCQl5#i;I(H|SfNxZin_ z$~mLi-e2>j{mZM+YWlXRy`l~IddT2Txm|iG{^CCg{C>5{FkwqTXy*Ie47)ZwhaSfS JF#}Iu{u@Fh&6EHD literal 0 HcmV?d00001 diff --git a/src/HYDRO_tests/reference_data/cs23.png b/src/HYDRO_tests/reference_data/cs23.png new file mode 100644 index 0000000000000000000000000000000000000000..36ed14260e659ded32611f1d572add94902133f6 GIT binary patch literal 3288 zcmeH~X;2eJ6vv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;cH?PVXXpl@9ueXb4F327PNnEL}Pxm zI#A#-*cLa_DGKK&{p>k-bfffY;IJ`vTgHxjn3Ll)Ha^~%N+8TOkNN;GEt!?Unnh@w zbNif})Q9pm8p$oQk0DJN`ucLUwYBk1w_fe2i-w>N0y%dh zCV6k1oi|L@Zx#GXn-$G`3ET9qj8AIH+bk+sWx8eedsD*?D{H+e;UAML63Yv$1TjlpUEj&Q==F|I=lvoMZ>&x# z$CGG6#pk@J(yk^fAl@TKZ&7VHPPxfEO@ zS;~XnZe_BbG_cYr=RjS2*nM@~=y|D1mO|uUbEI1nCe@rRQI7F~6*XLMoJu!ObAnpZ wCvjRsxr1=nU<{gCvQ6Gbz3JY6dQL^BY8g;BqFn #include +#include + +const QString REF_DATA_PATH = qgetenv( "HYDRO_REFERENCE_DATA" ); TopoDS_Edge Spline( const QList& theXYList, bool isClosed = false ) { @@ -252,5 +255,98 @@ void test_HYDROData_LandCoverMap::test_remove() void test_HYDROData_LandCoverMap::test_merge_faces() { + TopoDS_Shape pp1, pp2, pp3, pp4; + BRep_Builder BB; + BRepTools::Read(pp1, (REF_DATA_PATH + "/pp1.brep").toStdString().c_str(), BB); + BRepTools::Read(pp2, (REF_DATA_PATH + "/pp2.brep").toStdString().c_str(), BB); + BRepTools::Read(pp3, (REF_DATA_PATH + "/pp3.brep").toStdString().c_str(), BB); + BRepTools::Read(pp4, (REF_DATA_PATH + "/pp4.brep").toStdString().c_str(), BB); + + CPPUNIT_ASSERT(!pp1.IsNull()); + CPPUNIT_ASSERT(!pp2.IsNull()); + CPPUNIT_ASSERT(!pp3.IsNull()); + CPPUNIT_ASSERT(!pp4.IsNull()); + + //Test mergeFaces() func; USD == true + { + TopTools_ListOfShape Faces; + Faces.Append(pp1); + Faces.Append(pp2); + TopoDS_Shape aMergedFace = HYDROData_LandCoverMap::MergeFaces( Faces, true ); + TestViewer::show( aMergedFace, AIS_Shaded, true ); + TestViewer::AssertEqual( "cs11" ); + CPPUNIT_ASSERT(aMergedFace.ShapeType() == TopAbs_FACE); + } + { + TopTools_ListOfShape Faces; + Faces.Append(pp1); + Faces.Append(pp3); + TopoDS_Shape aMergedFace = HYDROData_LandCoverMap::MergeFaces( Faces, true ); + TestViewer::show( aMergedFace, AIS_Shaded, true ); + TestViewer::AssertEqual( "cs12" ); + CPPUNIT_ASSERT(aMergedFace.ShapeType() == TopAbs_SHELL); + } + { + TopTools_ListOfShape Faces; + Faces.Append(pp1); + Faces.Append(pp2); + Faces.Append(pp4); + TopoDS_Shape aMergedFace = HYDROData_LandCoverMap::MergeFaces( Faces, true ); + TestViewer::show( aMergedFace, AIS_Shaded, true ); + TestViewer::AssertEqual( "cs13" ); + CPPUNIT_ASSERT(aMergedFace.ShapeType() == TopAbs_SHELL); + } + { + TopTools_ListOfShape Faces; + Faces.Append(pp1); + Faces.Append(pp3); + Faces.Append(pp4); + Faces.Append(pp2); + TopoDS_Shape aMergedFace = HYDROData_LandCoverMap::MergeFaces( Faces, true ); + TestViewer::show( aMergedFace, AIS_Shaded, true ); + TestViewer::AssertEqual( "cs14" ); + CPPUNIT_ASSERT(aMergedFace.ShapeType() == TopAbs_FACE); + } + // + //Test mergeFaces() func; USD == false + { + TopTools_ListOfShape Faces; + Faces.Append(pp1); + Faces.Append(pp2); + TopoDS_Shape aMergedFace = HYDROData_LandCoverMap::MergeFaces( Faces, false ); + TestViewer::show( aMergedFace, AIS_Shaded, true ); + TestViewer::AssertEqual( "cs21" ); + CPPUNIT_ASSERT(aMergedFace.ShapeType() == TopAbs_SHELL); + } + { + TopTools_ListOfShape Faces; + Faces.Append(pp1); + Faces.Append(pp3); + TopoDS_Shape aMergedFace = HYDROData_LandCoverMap::MergeFaces( Faces, false ); + TestViewer::show( aMergedFace, AIS_Shaded, true ); + TestViewer::AssertEqual( "cs22" ); + CPPUNIT_ASSERT(aMergedFace.ShapeType() == TopAbs_SHELL); + } + { + TopTools_ListOfShape Faces; + Faces.Append(pp1); + Faces.Append(pp2); + Faces.Append(pp4); + TopoDS_Shape aMergedFace = HYDROData_LandCoverMap::MergeFaces( Faces, false ); + TestViewer::show( aMergedFace, AIS_Shaded, true ); + TestViewer::AssertEqual( "cs23" ); + CPPUNIT_ASSERT(aMergedFace.ShapeType() == TopAbs_SHELL); + } + { + TopTools_ListOfShape Faces; + Faces.Append(pp1); + Faces.Append(pp3); + Faces.Append(pp4); + Faces.Append(pp2); + TopoDS_Shape aMergedFace = HYDROData_LandCoverMap::MergeFaces( Faces, false ); + TestViewer::show( aMergedFace, AIS_Shaded, true ); + TestViewer::AssertEqual( "cs24" ); + CPPUNIT_ASSERT(aMergedFace.ShapeType() == TopAbs_SHELL); + } } -- 2.39.2