-
-
Notifications
You must be signed in to change notification settings - Fork 902
Expand file tree
/
Copy pathprofile_helper.h
More file actions
41 lines (29 loc) · 1.03 KB
/
profile_helper.h
File metadata and controls
41 lines (29 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#ifndef PROFILE_HELPER_H
#define PROFILE_HELPER_H
#include "taxonomy.h"
namespace ifcopenshell {
namespace geometry {
struct profile_point {
std::array<double, 2> xy;
boost::optional<double> radius;
profile_point(const std::array<double, 2>& p, const boost::optional<double>& r = boost::none)
: xy(p), radius(r) {
}
};
struct profile_point_with_edges {
Eigen::Vector2d xy;
boost::optional<double> radius;
taxonomy::edge::ptr previous, next;
};
struct profile_point_with_edges_3d {
Eigen::Vector3d xy;
boost::optional<double> radius;
taxonomy::edge::ptr previous, next;
};
taxonomy::loop::ptr polygon_from_points(const std::vector<taxonomy::point3::ptr>& ps, bool external = true);
taxonomy::loop::ptr profile_helper(const taxonomy::matrix4::ptr& m4, const std::vector<profile_point>& points);
taxonomy::loop::ptr fillet_loop(taxonomy::loop::ptr lp, double radius);
void remove_duplicate_points_from_loop(std::vector<taxonomy::point3::ptr>& polygon, bool closed, double tol);
}
}
#endif