mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-12 02:23:34 +00:00
[g++-warning-fix] Fix sign comparison, unused function, unused variables in IfcGeomShapes.cpp
This commit is contained in:
@@ -1302,26 +1302,6 @@ namespace {
|
||||
}
|
||||
}
|
||||
|
||||
void segment_tiny_edges(const TopoDS_Wire& wire, std::vector<TopoDS_Wire>& wires, double eps) {
|
||||
std::vector<TopoDS_Edge> sorted_edges;
|
||||
sort_edges(wire, sorted_edges);
|
||||
|
||||
bool segment_next = true;
|
||||
|
||||
BRep_Builder B;
|
||||
|
||||
for (const auto& e : sorted_edges) {
|
||||
GProp_GProps prop;
|
||||
BRepGProp::LinearProperties(e, prop);
|
||||
const double l = prop.Mass();
|
||||
if (l < eps || segment_next) {
|
||||
wires.emplace_back();
|
||||
B.MakeWire(wires.back());
|
||||
segment_next = l < eps;
|
||||
}
|
||||
B.Add(wires.back(), e);
|
||||
}
|
||||
}
|
||||
|
||||
// #939: a closed loop causes failed triangulation in 7.3 and artefacts
|
||||
// in 7.4 so we break up a closed wire into two equal parts.
|
||||
@@ -1335,12 +1315,11 @@ namespace {
|
||||
}
|
||||
|
||||
BRep_Builder B;
|
||||
double u, v;
|
||||
|
||||
wires.emplace_back();
|
||||
B.MakeWire(wires.back());
|
||||
|
||||
for (int i = 0; i < sorted_edges.size(); ++i) {
|
||||
for (uint i = 0; i < sorted_edges.size(); ++i) {
|
||||
if (i == sorted_edges.size() / 2) {
|
||||
wires.emplace_back();
|
||||
B.MakeWire(wires.back());
|
||||
|
||||
Reference in New Issue
Block a user