#ifndef PROFILE_HELPER_H #define PROFILE_HELPER_H #include "ifc_geom_api.h" #include "taxonomy.h" namespace ifcopenshell { namespace geometry { struct profile_point { std::array xy; std::optional radius; profile_point(const std::array& p, const std::optional& r = std::nullopt) : xy(p), radius(r) { } }; struct profile_point_with_edges { Eigen::Vector2d xy; std::optional radius; taxonomy::edge::ptr previous, next; }; struct profile_point_with_edges_3d { Eigen::Vector3d xy; std::optional radius; taxonomy::edge::ptr previous, next; }; IFC_GEOM_API taxonomy::loop::ptr polygon_from_points(const std::vector& ps, bool external = true); IFC_GEOM_API taxonomy::loop::ptr profile_helper(const taxonomy::matrix4::ptr& m4, const std::vector& points); IFC_GEOM_API taxonomy::loop::ptr fillet_loop(taxonomy::loop::ptr lp, double radius); IFC_GEOM_API void remove_duplicate_points_from_loop(std::vector& polygon, bool closed, double tol); IFC_GEOM_API std::pair, std::vector>> remove_duplicate_points_from_loop(const std::vector& polygon, const std::vector& tags); } } #endif