CPPUNIT_ASSERT(geom != NULL);
CPPUNIT_ASSERT_EQUAL(std::string("mygeom"), geom->getName());
- CPPUNIT_ASSERT_EQUAL(4, geom->countVertices());
+ CPPUNIT_ASSERT_EQUAL(8, geom->countVertices());
CPPUNIT_ASSERT_EQUAL(std::string("v1"), geom->getVertexName(0));
- CPPUNIT_ASSERT_EQUAL(std::string("1"), geom->getVertexReference(0));
+ CPPUNIT_ASSERT_EQUAL(std::string("6"), geom->getVertexReference(0));
CPPUNIT_ASSERT_EQUAL(std::string(""), geom->getVertexName(1));
- CPPUNIT_ASSERT_EQUAL(std::string("2"), geom->getVertexReference(1));
+ CPPUNIT_ASSERT_EQUAL(std::string("7"), geom->getVertexReference(1));
CPPUNIT_ASSERT_EQUAL(std::string("v3"), geom->getVertexName(2));
- CPPUNIT_ASSERT_EQUAL(std::string("3"), geom->getVertexReference(2));
+ CPPUNIT_ASSERT_EQUAL(std::string("9"), geom->getVertexReference(2));
CPPUNIT_ASSERT_EQUAL(std::string(""), geom->getVertexName(3));
- CPPUNIT_ASSERT_EQUAL(std::string("4"), geom->getVertexReference(3));
-
- CPPUNIT_ASSERT_EQUAL(3, geom->countEdges());
+ CPPUNIT_ASSERT_EQUAL(std::string("11"), geom->getVertexReference(3));
+ CPPUNIT_ASSERT_EQUAL(std::string("v5"), geom->getVertexName(4));
+ CPPUNIT_ASSERT_EQUAL(std::string("16"), geom->getVertexReference(4));
+ CPPUNIT_ASSERT_EQUAL(std::string(""), geom->getVertexName(5));
+ CPPUNIT_ASSERT_EQUAL(std::string("17"), geom->getVertexReference(5));
+ CPPUNIT_ASSERT_EQUAL(std::string("v7"), geom->getVertexName(6));
+ CPPUNIT_ASSERT_EQUAL(std::string("19"), geom->getVertexReference(6));
+ CPPUNIT_ASSERT_EQUAL(std::string(""), geom->getVertexName(7));
+ CPPUNIT_ASSERT_EQUAL(std::string("21"), geom->getVertexReference(7));
+
+ CPPUNIT_ASSERT_EQUAL(12, geom->countEdges());
CPPUNIT_ASSERT_EQUAL(std::string("e1"), geom->getEdgeName(0));
CPPUNIT_ASSERT_EQUAL(std::string("5"), geom->getEdgeReference(0));
CPPUNIT_ASSERT_EQUAL(std::string(""), geom->getEdgeName(1));
- CPPUNIT_ASSERT_EQUAL(std::string("6"), geom->getEdgeReference(1));
+ CPPUNIT_ASSERT_EQUAL(std::string("8"), geom->getEdgeReference(1));
CPPUNIT_ASSERT_EQUAL(std::string("e3"), geom->getEdgeName(2));
- CPPUNIT_ASSERT_EQUAL(std::string("7"), geom->getEdgeReference(2));
-
- CPPUNIT_ASSERT_EQUAL(2, geom->countFaces());
+ CPPUNIT_ASSERT_EQUAL(std::string("10"), geom->getEdgeReference(2));
+ CPPUNIT_ASSERT_EQUAL(std::string(""), geom->getEdgeName(3));
+ CPPUNIT_ASSERT_EQUAL(std::string("12"), geom->getEdgeReference(3));
+ CPPUNIT_ASSERT_EQUAL(std::string("e5"), geom->getEdgeName(4));
+ CPPUNIT_ASSERT_EQUAL(std::string("15"), geom->getEdgeReference(4));
+ CPPUNIT_ASSERT_EQUAL(std::string(""), geom->getEdgeName(5));
+ CPPUNIT_ASSERT_EQUAL(std::string("18"), geom->getEdgeReference(5));
+ CPPUNIT_ASSERT_EQUAL(std::string("e7"), geom->getEdgeName(6));
+ CPPUNIT_ASSERT_EQUAL(std::string("20"), geom->getEdgeReference(6));
+ CPPUNIT_ASSERT_EQUAL(std::string(""), geom->getEdgeName(7));
+ CPPUNIT_ASSERT_EQUAL(std::string("22"), geom->getEdgeReference(7));
+ CPPUNIT_ASSERT_EQUAL(std::string("e9"), geom->getEdgeName(8));
+ CPPUNIT_ASSERT_EQUAL(std::string("25"), geom->getEdgeReference(8));
+ CPPUNIT_ASSERT_EQUAL(std::string(""), geom->getEdgeName(9));
+ CPPUNIT_ASSERT_EQUAL(std::string("26"), geom->getEdgeReference(9));
+ CPPUNIT_ASSERT_EQUAL(std::string("e11"), geom->getEdgeName(10));
+ CPPUNIT_ASSERT_EQUAL(std::string("29"), geom->getEdgeReference(10));
+ CPPUNIT_ASSERT_EQUAL(std::string(""), geom->getEdgeName(11));
+ CPPUNIT_ASSERT_EQUAL(std::string("30"), geom->getEdgeReference(11));
+
+ CPPUNIT_ASSERT_EQUAL(6, geom->countFaces());
CPPUNIT_ASSERT_EQUAL(std::string("f1"), geom->getFaceName(0));
- CPPUNIT_ASSERT_EQUAL(std::string("8"), geom->getFaceReference(0));
+ CPPUNIT_ASSERT_EQUAL(std::string("3"), geom->getFaceReference(0));
CPPUNIT_ASSERT_EQUAL(std::string(""), geom->getFaceName(1));
- CPPUNIT_ASSERT_EQUAL(std::string("9"), geom->getFaceReference(1));
+ CPPUNIT_ASSERT_EQUAL(std::string("13"), geom->getFaceReference(1));
+ CPPUNIT_ASSERT_EQUAL(std::string("f3"), geom->getFaceName(2));
+ CPPUNIT_ASSERT_EQUAL(std::string("23"), geom->getFaceReference(2));
+ CPPUNIT_ASSERT_EQUAL(std::string(""), geom->getFaceName(3));
+ CPPUNIT_ASSERT_EQUAL(std::string("27"), geom->getFaceReference(3));
+ CPPUNIT_ASSERT_EQUAL(std::string("f5"), geom->getFaceName(4));
+ CPPUNIT_ASSERT_EQUAL(std::string("31"), geom->getFaceReference(4));
+ CPPUNIT_ASSERT_EQUAL(std::string(""), geom->getFaceName(5));
+ CPPUNIT_ASSERT_EQUAL(std::string("33"), geom->getFaceReference(5));
CPPUNIT_ASSERT_EQUAL(1, geom->countSolids());
CPPUNIT_ASSERT_EQUAL(std::string("s1"), geom->getSolidName(0));
- CPPUNIT_ASSERT_EQUAL(std::string("10"), geom->getSolidReference(0));
+ CPPUNIT_ASSERT_EQUAL(std::string("1"), geom->getSolidReference(0));
CPPUNIT_ASSERT_EQUAL(2, xao.countGroups());
Group* group = xao.getGroup(0);
CPPUNIT_ASSERT_EQUAL(XAO::FACE, group->getDimension());
CPPUNIT_ASSERT_EQUAL(0, group->get(0));
CPPUNIT_ASSERT_EQUAL(1, group->get(1));
+
+ CPPUNIT_ASSERT_EQUAL(1, xao.countFields());
+ Field* field= xao.getField(0);
+ CPPUNIT_ASSERT_EQUAL(std::string("color"), field->getName());
+ CPPUNIT_ASSERT_EQUAL(XAO::INTEGER, field->getType());
+ CPPUNIT_ASSERT_EQUAL(XAO::SOLID, field->getDimension());
+
}
<?xml version="1.0" encoding="UTF-8"?>
<XAO version="1.0" author="me">
<geometry name="mygeom">
- <shape format="BREP">
-<![CDATA[
-DBRep_DrawableShape
-
+ <shape format="BREP"><![CDATA[
CASCADE Topology V1, (c) Matra-Datavision
Locations 0
Curve2ds 24
1 0 200 0 1 0 -0
1 0 200 200 1 0 -0
Polygon3D 0
-PolygonOnTriangulations 0
+PolygonOnTriangulations 24
+2 1 2
+p 0.8000000008 1 0 200
+2 1 4
+p 0.8000000008 1 0 200
+2 2 3
+p 0.8000000008 1 0 200
+2 1 2
+p 0.8000000008 1 0 200
+2 4 3
+p 0.8000000008 1 0 200
+2 1 4
+p 0.8000000008 1 0 200
+2 1 4
+p 0.8000000008 1 0 200
+2 1 2
+p 0.8000000008 1 0 200
+2 1 2
+p 0.8000000008 1 0 200
+2 2 3
+p 0.8000000008 1 0 200
+2 2 3
+p 0.8000000008 1 0 200
+2 4 3
+p 0.8000000008 1 0 200
+2 4 3
+p 0.8000000008 1 0 200
+2 2 3
+p 0.8000000008 1 0 200
+2 1 4
+p 0.8000000008 1 0 200
+2 4 3
+p 0.8000000008 1 0 200
+2 1 2
+p 0.8000000008 1 0 200
+2 1 4
+p 0.8000000008 1 0 200
+2 4 3
+p 0.8000000008 1 0 200
+2 1 4
+p 0.8000000008 1 0 200
+2 1 2
+p 0.8000000008 1 0 200
+2 2 3
+p 0.8000000008 1 0 200
+2 4 3
+p 0.8000000008 1 0 200
+2 2 3
+p 0.8000000008 1 0 200
Surfaces 6
1 0 0 0 1 0 -0 0 0 1 0 -1 0
1 0 0 0 -0 1 0 0 0 1 1 0 -0
1 0 200 0 -0 1 0 0 0 1 1 0 -0
1 0 0 0 0 0 1 1 0 -0 -0 1 0
1 200 0 0 1 0 -0 0 0 1 0 -1 0
-Triangulations 0
+Triangulations 6
+4 2 1 0
+0 0 0 0 0 200 0 200 200 0 200 0 0 0 200 0 200 -200 0 -200 2 4 3 2 1 4
+4 2 1 0
+0 0 0 200 0 0 200 0 200 0 0 200 0 0 0 200 200 200 200 0 3 2 1 3 1 4
+4 2 1 0
+0 0 200 0 200 200 200 200 200 200 0 200 0 0 0 200 200 200 200 0 3 2 1 3 1 4
+4 2 1 0
+0 200 0 200 200 0 200 200 200 0 200 200 0 0 0 200 200 200 200 0 3 2 1 3 1 4
+4 2 1 0
+0 0 0 0 200 0 200 200 0 200 0 0 0 0 0 200 200 200 200 0 3 2 1 3 1 4
+4 2 1 0
+200 0 0 200 0 200 200 200 200 200 200 0 0 0 200 0 200 -200 0 -200 2 4 3 2 1 4
TShapes 34
Ve
1 1 0 0 200
2 1 1 0 0 200
2 2 2 0 0 200
+6 1 1 0
+6 2 2 0
0
0101000
1 2 0 0 200
2 3 1 0 0 200
2 4 3 0 0 200
+6 3 1 0
+6 4 3 0
0
0101000
1 3 0 0 200
2 5 1 0 0 200
2 6 4 0 0 200
+6 5 1 0
+6 6 4 0
0
0101000
1 4 0 0 200
2 7 1 0 0 200
2 8 5 0 0 200
+6 7 1 0
+6 8 5 0
0
0101000
-32 0 -30 0 +28 0 +27 0 *
Fa
0 1e-07 1 0
-
-0111000
+2 1
+0101000
+26 0 *
Ve
1e-07
1 5 0 0 200
2 9 6 0 0 200
2 10 2 0 0 200
+6 9 6 0
+6 10 2 0
0
0101000
1 6 0 0 200
2 11 6 0 0 200
2 12 3 0 0 200
+6 11 6 0
+6 12 3 0
0
0101000
1 7 0 0 200
2 13 6 0 0 200
2 14 4 0 0 200
+6 13 6 0
+6 14 4 0
0
0101000
1 8 0 0 200
2 15 6 0 0 200
2 16 5 0 0 200
+6 15 6 0
+6 16 5 0
0
0101000
-22 0 -20 0 +18 0 +17 0 *
Fa
0 1e-07 6 0
-
-0111000
+2 6
+0101000
+16 0 *
Ed
1e-07 1 1 0
1 9 0 0 200
2 17 2 0 0 200
2 18 5 0 0 200
+6 17 2 0
+6 18 5 0
0
0101000
1 10 0 0 200
2 19 2 0 0 200
2 20 3 0 0 200
+6 19 2 0
+6 20 3 0
0
0101000
-14 0 -22 0 +13 0 +32 0 *
Fa
0 1e-07 2 0
-
-0111000
+2 2
+0101000
+12 0 *
Ed
1e-07 1 1 0
1 11 0 0 200
2 21 4 0 0 200
2 22 5 0 0 200
+6 21 4 0
+6 22 5 0
0
0101000
1 12 0 0 200
2 23 4 0 0 200
2 24 3 0 0 200
+6 23 4 0
+6 24 3 0
0
0101000
-10 0 -18 0 +9 0 +28 0 *
Fa
0 1e-07 4 0
-
-0111000
+2 4
+0101000
+8 0 *
Wi
-27 0 -10 0 +17 0 +14 0 *
Fa
0 1e-07 5 0
-
-0111000
+2 5
+0101000
+6 0 *
Wi
-30 0 -9 0 +20 0 +13 0 *
Fa
0 1e-07 3 0
-
-0111000
+2 3
+0101000
+4 0 *
Sh
1100000
+2 0 *
-+1 0
-]]>
- </shape>
++1 0 ]]></shape>
<topology>
- <vertices count="4">
- <vertex index="0" name="v1" reference="1"/>
- <vertex index="1" name="" reference="2"/>
- <vertex index="2" name="v3" reference="3"/>
- <vertex index="3" name="" reference="4"/>
+ <vertices count="8">
+ <vertex index="0" name="v1" reference="6"/>
+ <vertex index="1" name="" reference="7"/>
+ <vertex index="2" name="v3" reference="9"/>
+ <vertex index="3" name="" reference="11"/>
+ <vertex index="4" name="v5" reference="16"/>
+ <vertex index="5" name="" reference="17"/>
+ <vertex index="6" name="v7" reference="19"/>
+ <vertex index="7" name="" reference="21"/>
</vertices>
- <edges count="3">
+ <edges count="12">
<edge index="0" name="e1" reference="5"/>
- <edge index="1" name="" reference="6"/>
- <edge index="2" name="e3" reference="7"/>
+ <edge index="1" name="" reference="8"/>
+ <edge index="2" name="e3" reference="10"/>
+ <edge index="3" name="" reference="12"/>
+ <edge index="4" name="e5" reference="15"/>
+ <edge index="5" name="" reference="18"/>
+ <edge index="6" name="e7" reference="20"/>
+ <edge index="7" name="" reference="22"/>
+ <edge index="8" name="e9" reference="25"/>
+ <edge index="9" name="" reference="26"/>
+ <edge index="10" name="e11" reference="29"/>
+ <edge index="11" name="" reference="30"/>
</edges>
- <faces count="2">
- <face index="0" name="f1" reference="8"/>
- <face index="1" name="" reference="9"/>
+ <faces count="6">
+ <face index="0" name="f1" reference="3"/>
+ <face index="1" name="" reference="13"/>
+ <face index="2" name="f3" reference="23"/>
+ <face index="3" name="" reference="27"/>
+ <face index="4" name="f5" reference="31"/>
+ <face index="5" name="" reference="33"/>
</faces>
<solids count="1">
- <solid index="0" name="s1" reference="10"/>
+ <solid index="0" name="s1" reference="1"/>
</solids>
</topology>
</geometry>
- <groups>
+ <groups count="1">
<group name="boite_1" dimension="solid" count="1">
<element index="0" />
</group>