| 65 | } |
| 66 | |
| 67 | int main(int argc, char** argv) { |
| 68 | IfcHierarchyHelper<IfcSchema> file; |
| 69 | { |
| 70 | IfcSchema::IfcCartesianPoint::list::ptr points (new IfcSchema::IfcCartesianPoint::list); |
| 71 | points->push(file.addTriplet<IfcSchema::IfcCartesianPoint>(-400, -400, 0)); |
| 72 | points->push(file.addTriplet<IfcSchema::IfcCartesianPoint>(+400, -400, 0)); |
| 73 | points->push(file.addTriplet<IfcSchema::IfcCartesianPoint>(+400, +400, 0)); |
| 74 | points->push(file.addTriplet<IfcSchema::IfcCartesianPoint>(-400, +400, 0)); |
| 75 | IfcSchema::IfcPolyLoop* loop = new IfcSchema::IfcPolyLoop(points); |
| 76 | IfcSchema::IfcFaceOuterBound* bound = new IfcSchema::IfcFaceOuterBound(loop, true); |
| 77 | |
| 78 | IfcSchema::IfcFaceBound::list::ptr bounds (new IfcSchema::IfcFaceBound::list); |
| 79 | bounds->push(bound); |
| 80 | IfcSchema::IfcFace* face = new IfcSchema::IfcFace(bounds); |
| 81 | create_testcase(file, face, "polyloop"); |
| 82 | } |
| 83 | { |
| 84 | IfcSchema::IfcCartesianPoint* point1 = file.addTriplet<IfcSchema::IfcCartesianPoint>(+400, 0., 0.); |
| 85 | IfcSchema::IfcCartesianPoint* point2 = file.addTriplet<IfcSchema::IfcCartesianPoint>(-400, 0., 0.); |
| 86 | IfcSchema::IfcVertexPoint* vertex1 = new IfcSchema::IfcVertexPoint(point1); |
| 87 | IfcSchema::IfcVertexPoint* vertex2 = new IfcSchema::IfcVertexPoint(point2); |
| 88 | IfcSchema::IfcCircle* circle = new IfcSchema::IfcCircle(file.addPlacement2d(), 400.); |
| 89 | IfcSchema::IfcEdgeCurve* edge1 = new IfcSchema::IfcEdgeCurve(vertex1, vertex2, circle, true); |
| 90 | IfcSchema::IfcEdgeCurve* edge2 = new IfcSchema::IfcEdgeCurve(vertex2, vertex1, circle, true); |
| 91 | IfcSchema::IfcOrientedEdge* oriented_edge1 = new IfcSchema::IfcOrientedEdge(edge1, true); |
| 92 | IfcSchema::IfcOrientedEdge* oriented_edge2 = new IfcSchema::IfcOrientedEdge(edge2, true); |
| 93 | IfcSchema::IfcOrientedEdge::list::ptr edges(new IfcSchema::IfcOrientedEdge::list); |
| 94 | edges->push(oriented_edge1); |
| 95 | edges->push(oriented_edge2); |
| 96 | IfcSchema::IfcEdgeLoop* loop = new IfcSchema::IfcEdgeLoop(edges); |
| 97 | IfcSchema::IfcFaceOuterBound* bound = new IfcSchema::IfcFaceOuterBound(loop, true); |
| 98 | |
| 99 | IfcSchema::IfcFaceBound::list::ptr bounds (new IfcSchema::IfcFaceBound::list); |
| 100 | bounds->push(bound); |
| 101 | IfcSchema::IfcFace* face = new IfcSchema::IfcFace(bounds); |
| 102 | create_testcase(file, face, "circle"); |
| 103 | } |
| 104 | { |
| 105 | IfcSchema::IfcCartesianPoint::list::ptr points (new IfcSchema::IfcCartesianPoint::list); |
| 106 | points->push(file.addTriplet<IfcSchema::IfcCartesianPoint>(-400, -400, 0)); |
| 107 | points->push(file.addTriplet<IfcSchema::IfcCartesianPoint>(+400, -400, 0)); |
| 108 | points->push(file.addTriplet<IfcSchema::IfcCartesianPoint>(+400, +400, 0)); |
| 109 | points->push(file.addTriplet<IfcSchema::IfcCartesianPoint>(-400, +400, 0)); |
| 110 | IfcSchema::IfcPolyLoop* loop = new IfcSchema::IfcPolyLoop(points); |
| 111 | IfcSchema::IfcFaceOuterBound* outer_bound = new IfcSchema::IfcFaceOuterBound(loop, true); |
| 112 | |
| 113 | IfcSchema::IfcCartesianPoint::list::ptr points2 (new IfcSchema::IfcCartesianPoint::list); |
| 114 | points2->push(file.addTriplet<IfcSchema::IfcCartesianPoint>(-300, -300, 0)); |
| 115 | points2->push(file.addTriplet<IfcSchema::IfcCartesianPoint>(-100, -300, 0)); |
| 116 | points2->push(file.addTriplet<IfcSchema::IfcCartesianPoint>(-100, +300, 0)); |
| 117 | points2->push(file.addTriplet<IfcSchema::IfcCartesianPoint>(-300, +300, 0)); |
| 118 | IfcSchema::IfcPolyLoop* loop2 = new IfcSchema::IfcPolyLoop(points2); |
| 119 | IfcSchema::IfcFaceBound* inner_bound1 = new IfcSchema::IfcFaceBound(loop2, false); |
| 120 | |
| 121 | IfcSchema::IfcCartesianPoint::list::ptr points3 (new IfcSchema::IfcCartesianPoint::list); |
| 122 | points3->push(file.addTriplet<IfcSchema::IfcCartesianPoint>(+100, +300, 0)); |
| 123 | points3->push(file.addTriplet<IfcSchema::IfcCartesianPoint>(+300, +300, 0)); |
| 124 | points3->push(file.addTriplet<IfcSchema::IfcCartesianPoint>(+300, -300, 0)); |
nothing calls this directly
no test coverage detected