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

Method length

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

Source from the content-addressed store, hash-verified

486}
487
488OpaqueNumber* ifcopenshell::geometry::CgalShape::CgalShape::length()
489{
490 to_poly();
491 Kernel_::FT len = 0;
492 for (auto it = shape_->edges_begin(); it != shape_->edges_end(); ++it) {
493 len += CGAL::approximate_sqrt(CGAL::Segment_3<Kernel_>(
494 it->vertex()->point(),
495 it->next()->vertex()->point()
496 ).squared_length());
497 }
498 return new NumberType(len);
499}
500
501OpaqueNumber* ifcopenshell::geometry::CgalShape::area()
502{

Callers

nothing calls this directly

Calls 5

to_polyFunction · 0.85
edges_beginMethod · 0.80
edges_endMethod · 0.80
vertexMethod · 0.80
nextMethod · 0.45

Tested by

no test coverage detected