mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 18:16:40 +00:00
#1227 layer slicing
This commit is contained in:
@@ -2984,7 +2984,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);
|
||||
@@ -3256,6 +3258,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) {
|
||||
|
||||
Reference in New Issue
Block a user