MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / moved

Method moved

src/ifcgeom/kernels/cgal/CgalConversionResult.cpp:757–777  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

755}
756
757ConversionResultShape* ifcopenshell::geometry::CgalShape::moved(ifcopenshell::geometry::taxonomy::matrix4::ptr place) const
758{
759 cgal_shape_t s = *this;
760
761 if (!place->is_identity()) {
762 const auto& m = place->ccomponents();
763
764 // @todo check
765 const cgal_placement_t trsf(
766 m(0, 0), m(0, 1), m(0, 2), m(0, 3),
767 m(1, 0), m(1, 1), m(1, 2), m(1, 3),
768 m(2, 0), m(2, 1), m(2, 2), m(2, 3));
769
770 // Apply transformation
771 for (auto &vertex : s.vertex_handles()) {
772 vertex->point() = vertex->point().transform(trsf);
773 }
774 }
775
776 return new CgalShape(s, convex_tag_);
777}
778
779void ifcopenshell::geometry::CgalShape::map(OpaqueCoordinate<4>&, OpaqueCoordinate<4>&) {
780 throw std::runtime_error("Not implemented");

Callers 3

itemMethod · 0.45
apply_transformFunction · 0.45
extract_geometryMethod · 0.45

Calls 1

is_identityMethod · 0.80

Tested by

no test coverage detected