| 35 | static int x = 0; |
| 36 | |
| 37 | void create_testcase(IfcHierarchyHelper<IfcSchema>& file, IfcSchema::IfcFace* face, const std::string& name) { |
| 38 | IfcSchema::IfcFace::list::ptr faces(new IfcSchema::IfcFace::list); |
| 39 | faces->push(face); |
| 40 | IfcSchema::IfcOpenShell* shell = new IfcSchema::IfcOpenShell(faces); |
| 41 | |
| 42 | IfcSchema::IfcConnectedFaceSet::list::ptr shells(new IfcSchema::IfcConnectedFaceSet::list); |
| 43 | shells->push(shell); |
| 44 | IfcSchema::IfcFaceBasedSurfaceModel* model = new IfcSchema::IfcFaceBasedSurfaceModel(shells); |
| 45 | |
| 46 | IfcSchema::IfcBuildingElementProxy* product = new IfcSchema::IfcBuildingElementProxy( |
| 47 | guid(), 0, name, null, null, 0, 0, null, null); |
| 48 | file.addBuildingProduct(product); |
| 49 | product->setOwnerHistory(file.getSingle<IfcSchema::IfcOwnerHistory>()); |
| 50 | |
| 51 | product->setObjectPlacement(file.addLocalPlacement(0, 1000 * x++, 0)); |
| 52 | |
| 53 | IfcSchema::IfcRepresentation::list::ptr reps (new IfcSchema::IfcRepresentation::list); |
| 54 | IfcSchema::IfcRepresentationItem::list::ptr items (new IfcSchema::IfcRepresentationItem::list); |
| 55 | |
| 56 | items->push(model); |
| 57 | IfcSchema::IfcShapeRepresentation* rep = new IfcSchema::IfcShapeRepresentation( |
| 58 | file.getRepresentationContext("Model"), S("Body"), S("SurfaceModel"), items); |
| 59 | reps->push(rep); |
| 60 | |
| 61 | IfcSchema::IfcProductDefinitionShape* shape = new IfcSchema::IfcProductDefinitionShape(boost::none, boost::none, reps); |
| 62 | file.addEntity(shape); |
| 63 | |
| 64 | product->setRepresentation(shape); |
| 65 | } |
| 66 | |
| 67 | int main(int argc, char** argv) { |
| 68 | IfcHierarchyHelper<IfcSchema> file; |
no test coverage detected