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

Function build_run_box_records

src/svgfill/src/arrange_polygons.cpp:1221–1238  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1219}
1220
1221std::vector<RunBoxRecord> build_run_box_records(const std::vector<LineRun>& runs) {
1222 std::vector<RunBoxRecord> records;
1223 records.reserve(runs.size());
1224 for (size_t i = 0; i < runs.size(); ++i) {
1225 auto corners = rectangle_corners(runs[i].start, runs[i].end, runs[i].avg_width);
1226 records.push_back({
1227 i,
1228 runs[i].start,
1229 runs[i].end,
1230 unit(runs[i].end - runs[i].start),
1231 runs[i].avg_width,
1232 runs[i].length,
1233 corners,
1234 aabb_from_points(corners)
1235 });
1236 }
1237 return records;
1238}
1239
1240template <typename T>
1241std::pair<double, double> projected_interval_on_axis(const T& box, const DDir& axis_u) {

Calls 6

rectangle_cornersFunction · 0.85
aabb_from_pointsFunction · 0.85
reserveMethod · 0.80
push_backMethod · 0.80
unitFunction · 0.70
sizeMethod · 0.45

Tested by

no test coverage detected