mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-10 06:00:51 +00:00
Merge remote-tracking branch 'origin/v0.6.0' into v0.7.0
# Conflicts: # .github/workflows/ci.yml # src/ifcparse/IfcParse.cpp
This commit is contained in:
@@ -2968,7 +2968,9 @@ namespace {
|
||||
auto result_shape = split.Shape();
|
||||
std::list<TopoDS_Shape> subs;
|
||||
subshapes(result_shape, subs);
|
||||
if (subs.size() == 1 && operands.Size() - 2 > (int)subs.size() && (subs.front().ShapeType() == TopAbs_COMPSOLID || subs.front().ShapeType() == TopAbs_COMPOUND)) {
|
||||
|
||||
// Sometimes there is more nesting of compounds, so when we find a single compound we again try to explode it into a list.
|
||||
if (subs.size() == 1 && (subs.front().ShapeType() == TopAbs_COMPSOLID || subs.front().ShapeType() == TopAbs_COMPOUND)) {
|
||||
auto s = subs.front();
|
||||
subs.clear();
|
||||
subshapes(s, subs);
|
||||
@@ -3240,6 +3242,13 @@ bool IfcGeom::Kernel::apply_layerset(const IfcRepresentationShapeItems& items, c
|
||||
operands.Append(face);
|
||||
}
|
||||
|
||||
/*
|
||||
// enable this is you want to see how IfcOpenShell has placed the layer surfaces
|
||||
for (auto& x : operands) {
|
||||
result.push_back(IfcRepresentationShapeItem(it->ItemId(), it->Placement(), x, nullptr));
|
||||
}
|
||||
*/
|
||||
|
||||
std::vector<TopoDS_Shape> slices;
|
||||
if (split(*this, it->Shape(), operands, getValue(GV_PRECISION), slices) && slices.size() == styles.size()) {
|
||||
for (size_t i = 0; i < slices.size(); ++i) {
|
||||
|
||||
@@ -1382,7 +1382,7 @@ namespace {
|
||||
|
||||
// @todo this probably still does not work on a closed wire consisting of one (circular) edge.
|
||||
|
||||
while (sorted_edges.size() < num_edges &&
|
||||
while ((int) sorted_edges.size() < num_edges &&
|
||||
(!v0.IsSame(v1) || ignore_first_equality_because_closed))
|
||||
{
|
||||
ignore_first_equality_because_closed = false;
|
||||
|
||||
@@ -232,7 +232,7 @@ namespace IfcGeom {
|
||||
const TopoDS_Shape& B = shapes_.find(*it)->second;
|
||||
if (extend > 0.0) {
|
||||
BRepExtrema_DistShapeShape dss(v, B);
|
||||
if (dss.Perform() && dss.NbSolution() >= 1) {
|
||||
if (dss.Perform() && dss.NbSolution() >= 1 && dss.Value() <= extend) {
|
||||
ts_filtered.push_back(*it);
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user