Files
IfcOpenShell/src/ifcgeom/profile_helper.h
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

45 lines
1.3 KiB
C++
Raw Normal View History

2022-11-14 09:38:51 +01:00
#ifndef PROFILE_HELPER_H
#define PROFILE_HELPER_H
2026-04-17 11:24:09 +02:00
#include "ifc_geom_api.h"
2023-03-21 20:15:01 +01:00
#include "taxonomy.h"
2022-11-14 09:38:51 +01:00
2023-03-21 20:15:01 +01:00
namespace ifcopenshell {
namespace geometry {
struct profile_point {
std::array<double, 2> xy;
std::optional<double> radius;
2025-08-27 11:03:16 +02:00
profile_point(const std::array<double, 2>& p, const std::optional<double>& r = std::nullopt)
2025-08-27 11:03:16 +02:00
: xy(p), radius(r) {
}
2023-03-21 20:15:01 +01:00
};
struct profile_point_with_edges {
Eigen::Vector2d xy;
std::optional<double> radius;
taxonomy::edge::ptr previous, next;
2023-03-21 20:15:01 +01:00
};
struct profile_point_with_edges_3d {
Eigen::Vector3d xy;
std::optional<double> radius;
taxonomy::edge::ptr previous, next;
2023-03-21 20:15:01 +01:00
};
2026-04-17 11:24:09 +02:00
IFC_GEOM_API taxonomy::loop::ptr polygon_from_points(const std::vector<taxonomy::point3::ptr>& ps, bool external = true);
2023-03-21 20:15:01 +01:00
2026-04-17 11:24:09 +02:00
IFC_GEOM_API taxonomy::loop::ptr profile_helper(const taxonomy::matrix4::ptr& m4, const std::vector<profile_point>& points);
2023-03-21 20:15:01 +01:00
2026-04-17 11:24:09 +02:00
IFC_GEOM_API taxonomy::loop::ptr fillet_loop(taxonomy::loop::ptr lp, double radius);
2024-12-10 21:30:43 +01:00
2026-04-17 11:24:09 +02:00
IFC_GEOM_API void remove_duplicate_points_from_loop(std::vector<taxonomy::point3::ptr>& polygon, bool closed, double tol);
2026-04-17 11:24:09 +02:00
IFC_GEOM_API std::pair<std::vector<taxonomy::point3::ptr>, std::vector<std::set<std::string>>> remove_duplicate_points_from_loop(const std::vector<taxonomy::point3::ptr>& polygon, const std::vector<std::string>& tags);
2022-11-14 09:38:51 +01:00
}
2023-03-21 20:15:01 +01:00
2022-11-14 09:38:51 +01:00
}
2026-04-17 11:24:09 +02:00
#endif