Remove implemented throws, add faces and materials

This commit is contained in:
Ken Arroyo Ohori
2017-02-08 17:12:56 -06:00
parent 1755752ab7
commit 44634eb42d
2 changed files with 5 additions and 7 deletions
@@ -6,9 +6,9 @@ void IfcGeom::CgalShape::Triangulate(const IfcGeom::IteratorSettings & settings,
const cgal_placement_t& trsf = dynamic_cast<const CgalPlacement*>(place)->trsf(); const cgal_placement_t& trsf = dynamic_cast<const CgalPlacement*>(place)->trsf();
// Apply transformation // Apply transformation
for (auto &vertex: vertices(s)) { // for (auto &vertex: vertices(s)) {
vertex->point() = vertex->point().transform(trsf); // vertex->point() = vertex->point().transform(trsf);
} // }
// Triangulate the shape and compute the normals // Triangulate the shape and compute the normals
std::map<cgal_vertex_descriptor_t, Kernel::Vector_3> vertex_normals; std::map<cgal_vertex_descriptor_t, Kernel::Vector_3> vertex_normals;
@@ -36,11 +36,11 @@ void IfcGeom::CgalShape::Triangulate(const IfcGeom::IteratorSettings & settings,
CGAL::to_double(current_halfedge->vertex()->point().cartesian(1)), CGAL::to_double(current_halfedge->vertex()->point().cartesian(1)),
CGAL::to_double(current_halfedge->vertex()->point().cartesian(2))); CGAL::to_double(current_halfedge->vertex()->point().cartesian(2)));
for (int i = 0; i < 3; ++i) t->normals().push_back(CGAL::to_double(face_normals_map[face].cartesian(i))); for (int i = 0; i < 3; ++i) t->normals().push_back(CGAL::to_double(face_normals_map[face].cartesian(i)));
// t->faces().push_back(num_vertices); t->faces().push_back(num_vertices);
++num_vertices; ++num_vertices;
++current_halfedge; ++current_halfedge;
} while (current_halfedge != face->facet_begin()); } while (current_halfedge != face->facet_begin());
// t->material_ids().push_back(surface_style_id); t->material_ids().push_back(surface_style_id);
++num_faces; ++num_faces;
} }
} }
@@ -40,12 +40,10 @@ namespace IfcGeom {
virtual void Multiply(const ConversionResultPlacement* other) { virtual void Multiply(const ConversionResultPlacement* other) {
// TODO: Check // TODO: Check
trsf_ = ((CgalPlacement *)other)->trsf_ * trsf_; trsf_ = ((CgalPlacement *)other)->trsf_ * trsf_;
throw std::runtime_error("Not implemented");
} }
virtual void PreMultiply(const ConversionResultPlacement* other) { virtual void PreMultiply(const ConversionResultPlacement* other) {
// TODO: Check // TODO: Check
trsf_ = trsf_ * ((CgalPlacement *)other)->trsf_; trsf_ = trsf_ * ((CgalPlacement *)other)->trsf_;
throw std::runtime_error("Not implemented");
} }
virtual ConversionResultPlacement* clone() const { virtual ConversionResultPlacement* clone() const {
return new CgalPlacement(trsf_); return new CgalPlacement(trsf_);